From 044b81798aad210b687b0b2cfae661075092e90f Mon Sep 17 00:00:00 2001 From: Renato Machado Date: Wed, 31 Jul 2024 17:54:25 -0300 Subject: [PATCH 01/24] fix: crash in addZone when creating tile (#2771) --- src/map/mapcache.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/map/mapcache.cpp b/src/map/mapcache.cpp index cb3e95eb30e..e6e2f79b806 100644 --- a/src/map/mapcache.cpp +++ b/src/map/mapcache.cpp @@ -12,6 +12,7 @@ #include "mapcache.hpp" #include "game/movement/teleport.hpp" +#include "game/scheduling/dispatcher.hpp" #include "items/bed.hpp" #include "io/iologindata.hpp" #include "items/item.hpp" @@ -135,9 +136,13 @@ std::shared_ptr MapCache::getOrCreateTileFromCache(const std::unique_ptrsetFlag(static_cast(cachedTile->flags)); - for (const auto &zone : Zone::getZones(pos)) { - tile->addZone(zone); - } + + // add zone synchronously + g_dispatcher().context().tryAddEvent([tile, pos] { + for (const auto &zone : Zone::getZones(pos)) { + tile->addZone(zone); + } + }); floor->setTile(x, y, tile); From 19c55a3c195317579cfadc5f340316f55aa13527 Mon Sep 17 00:00:00 2001 From: Renato Machado Date: Wed, 31 Jul 2024 17:54:42 -0300 Subject: [PATCH 02/24] improve: canThrowObjectTo (#2768) Contains some fixes/improvements related to canThrowObjectTo. --- src/creatures/combat/spells.cpp | 4 ++-- src/game/game.cpp | 8 ++++---- src/game/game.hpp | 2 +- src/lua/creature/actions.cpp | 2 +- src/map/map.cpp | 19 ++++++++++--------- src/map/map.hpp | 3 +-- src/map/map_definitions.hpp | 7 +++++++ 7 files changed, 26 insertions(+), 19 deletions(-) diff --git a/src/creatures/combat/spells.cpp b/src/creatures/combat/spells.cpp index f8852c5e534..105bf734c23 100644 --- a/src/creatures/combat/spells.cpp +++ b/src/creatures/combat/spells.cpp @@ -552,7 +552,7 @@ bool Spell::playerRuneSpellCheck(std::shared_ptr player, const Position return false; } - if (range != -1 && !g_game().canThrowObjectTo(playerPos, toPos, true, range, range)) { + if (range != -1 && !g_game().canThrowObjectTo(playerPos, toPos, SightLine_CheckSightLineAndFloor, range, range)) { player->sendCancelMessage(RETURNVALUE_DESTINATIONOUTOFREACH); g_game().addMagicEffect(player->getPosition(), CONST_ME_POFF); return false; @@ -900,7 +900,7 @@ bool InstantSpell::playerCastInstant(std::shared_ptr player, std::string bool InstantSpell::canThrowSpell(std::shared_ptr creature, std::shared_ptr target) const { const Position &fromPos = creature->getPosition(); const Position &toPos = target->getPosition(); - if (fromPos.z != toPos.z || (range == -1 && !g_game().canThrowObjectTo(fromPos, toPos, checkLineOfSight)) || (range != -1 && !g_game().canThrowObjectTo(fromPos, toPos, checkLineOfSight, range, range))) { + if (fromPos.z != toPos.z || (range == -1 && !g_game().canThrowObjectTo(fromPos, toPos, checkLineOfSight ? SightLine_CheckSightLineAndFloor : SightLine_NoCheck)) || (range != -1 && !g_game().canThrowObjectTo(fromPos, toPos, checkLineOfSight ? SightLine_CheckSightLineAndFloor : SightLine_NoCheck, range, range))) { return false; } return true; diff --git a/src/game/game.cpp b/src/game/game.cpp index 8cc6754392c..6e7660ecbb5 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -4776,7 +4776,7 @@ void Game::playerRequestTrade(uint32_t playerId, const Position &pos, uint8_t st return; } - if (!canThrowObjectTo(tradePartner->getPosition(), player->getPosition())) { + if (!canThrowObjectTo(tradePartner->getPosition(), player->getPosition(), SightLine_CheckSightLineAndFloor)) { player->sendCancelMessage(RETURNVALUE_CREATUREISNOTREACHABLE); return; } @@ -4946,7 +4946,7 @@ void Game::playerAcceptTrade(uint32_t playerId) { return; } - if (!canThrowObjectTo(tradePartner->getPosition(), player->getPosition())) { + if (!canThrowObjectTo(tradePartner->getPosition(), player->getPosition(), SightLine_CheckSightLineAndFloor)) { player->sendCancelMessage(RETURNVALUE_CREATUREISNOTREACHABLE); return; } @@ -6223,8 +6223,8 @@ std::shared_ptr Game::createPlayerTask(uint32_t delay, std::function creature, int32_t varSpeedDelta); diff --git a/src/lua/creature/actions.cpp b/src/lua/creature/actions.cpp index 485509cae06..9e16ee7b33e 100644 --- a/src/lua/creature/actions.cpp +++ b/src/lua/creature/actions.cpp @@ -203,7 +203,7 @@ ReturnValue Actions::canUseFar(std::shared_ptr creature, const Positio return RETURNVALUE_TOOFARAWAY; } - if (checkLineOfSight && !g_game().canThrowObjectTo(creaturePos, toPos)) { + if (checkLineOfSight && !g_game().canThrowObjectTo(creaturePos, toPos, checkFloor ? SightLine_CheckSightLineAndFloor : SightLine_CheckSightLine)) { return RETURNVALUE_CANNOTTHROW; } diff --git a/src/map/map.cpp b/src/map/map.cpp index 0d9a38b7cc1..85e7de50484 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -429,7 +429,7 @@ void Map::moveCreature(const std::shared_ptr &creature, const std::sha g_game().afterCreatureZoneChange(creature, fromZones, toZones); } -bool Map::canThrowObjectTo(const Position &fromPos, const Position &toPos, bool checkLineOfSight /*= true*/, int32_t rangex /*= MAP_MAX_CLIENT_VIEW_PORT_X*/, int32_t rangey /*= MAP_MAX_CLIENT_VIEW_PORT_Y*/) { +bool Map::canThrowObjectTo(const Position &fromPos, const Position &toPos, const SightLines_t lineOfSight /*= SightLine_CheckSightLine*/, const int32_t rangex /*= Map::maxClientViewportX*/, const int32_t rangey /*= Map::maxClientViewportY*/) { // z checks // underground 8->15 // ground level and above 7->0 @@ -451,10 +451,11 @@ bool Map::canThrowObjectTo(const Position &fromPos, const Position &toPos, bool return false; } - if (!checkLineOfSight) { + if (!(lineOfSight & SightLine_CheckSightLine)) { return true; } - return isSightClear(fromPos, toPos, false); + + return isSightClear(fromPos, toPos, lineOfSight & SightLine_FloorCheck); } bool Map::checkSightLine(Position start, Position destination) { @@ -472,7 +473,7 @@ bool Map::checkSightLine(Position start, Position destination) { start.x += delta; const auto &tile = getTile(start.x, start.y, start.z); - if (tile && tile->hasFlag(TILESTATE_BLOCKPROJECTILE)) { + if (tile && tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) { return false; } } @@ -483,7 +484,7 @@ bool Map::checkSightLine(Position start, Position destination) { start.y += delta; const auto &tile = getTile(start.x, start.y, start.z); - if (tile && tile->hasFlag(TILESTATE_BLOCKPROJECTILE)) { + if (tile && tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) { return false; } } @@ -516,7 +517,7 @@ bool Map::checkSightLine(Position start, Position destination) { } const auto &tile = getTile(start.x + xIncrease, start.y + deltaY, start.z); - if (tile && tile->hasFlag(TILESTATE_BLOCKPROJECTILE)) { + if (tile && tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) { if (Position::areInRange<1, 1>(start, destination)) { return true; } @@ -547,7 +548,7 @@ bool Map::checkSightLine(Position start, Position destination) { } const auto &tile = getTile(start.x + deltaX, start.y + yIncrease, start.z); - if (tile && tile->hasFlag(TILESTATE_BLOCKPROJECTILE)) { + if (tile && tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) { if (Position::areInRange<1, 1>(start, destination)) { return true; } @@ -590,7 +591,7 @@ bool Map::isSightClear(const Position &fromPos, const Position &toPos, bool floo } else { // Check if we can throw above obstacle const auto &tile = getTile(fromPos.x, fromPos.y, fromPos.z - 1); - if ((tile && (tile->getGround() || tile->hasFlag(TILESTATE_BLOCKPROJECTILE))) || !checkSightLine(Position(fromPos.x, fromPos.y, fromPos.z - 1), Position(toPos.x, toPos.y, toPos.z - 1))) { + if ((tile && (tile->getGround() || tile->hasProperty(CONST_PROP_BLOCKPROJECTILE))) || !checkSightLine(Position(fromPos.x, fromPos.y, fromPos.z - 1), Position(toPos.x, toPos.y, toPos.z - 1))) { return false; } @@ -605,7 +606,7 @@ bool Map::isSightClear(const Position &fromPos, const Position &toPos, bool floo // now we need to perform a jump between floors to see if everything is clear (literally) for (; startZ != toPos.z; ++startZ) { const auto &tile = getTile(toPos.x, toPos.y, startZ); - if (tile && (tile->getGround() || tile->hasFlag(TILESTATE_BLOCKPROJECTILE))) { + if (tile && (tile->getGround() || tile->hasProperty(CONST_PROP_BLOCKPROJECTILE))) { return false; } } diff --git a/src/map/map.hpp b/src/map/map.hpp index a2000766382..f6e38cb3eac 100644 --- a/src/map/map.hpp +++ b/src/map/map.hpp @@ -108,8 +108,7 @@ class Map : public MapCache { * \param checkLineOfSight checks if there is any blocking objects in the way * \returns The result if you can throw there or not */ - bool canThrowObjectTo(const Position &fromPos, const Position &toPos, bool checkLineOfSight = true, int32_t rangex = MAP_MAX_CLIENT_VIEW_PORT_X, int32_t rangey = MAP_MAX_CLIENT_VIEW_PORT_Y); - + bool canThrowObjectTo(const Position &fromPos, const Position &toPos, SightLines_t lineOfSight = SightLine_CheckSightLine, int32_t rangex = MAP_MAX_CLIENT_VIEW_PORT_X, int32_t rangey = MAP_MAX_CLIENT_VIEW_PORT_Y); /** * Checks if path is clear from fromPos to toPos * Notice: This only checks a straight line if the path is clear, for path finding use getPathTo. diff --git a/src/map/map_definitions.hpp b/src/map/map_definitions.hpp index 67c9878b92d..da3447efc68 100644 --- a/src/map/map_definitions.hpp +++ b/src/map/map_definitions.hpp @@ -29,3 +29,10 @@ enum RentPeriod_t { RENTPERIOD_YEARLY, RENTPERIOD_NEVER, }; + +enum SightLines_t : uint8_t { + SightLine_NoCheck = 0, + SightLine_CheckSightLine = 1 << 0, + SightLine_FloorCheck = 1 << 1, + SightLine_CheckSightLineAndFloor = SightLine_CheckSightLine | SightLine_FloorCheck, +}; From 43fdb88ea14c24d58ac7c9cd50b28c5196f9c5d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Renato=20Foot=20Guimar=C3=A3es=20Costallat?= Date: Sat, 3 Aug 2024 11:39:06 -0300 Subject: [PATCH 03/24] add: qodana static code analysis (#2783) --- .github/workflows/analysis-qodana.yml | 28 +++++++++++++++++++++++++++ CMakeLists.txt | 2 ++ CMakePresets.json | 15 ++++++++++++-- qodana.yml | 14 ++++++++++++++ 4 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/analysis-qodana.yml create mode 100644 qodana.yml diff --git a/.github/workflows/analysis-qodana.yml b/.github/workflows/analysis-qodana.yml new file mode 100644 index 00000000000..3c7b0154270 --- /dev/null +++ b/.github/workflows/analysis-qodana.yml @@ -0,0 +1,28 @@ +--- +name: Analysis - Qodana +on: + workflow_dispatch: + pull_request: + push: + branches: + - main + +jobs: + qodana: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + checks: write + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + + - name: 'Qodana Scan' + uses: JetBrains/qodana-action@v2024.1 + with: + args: --compile-commands,./build/linux-debug/compile_commands.json + env: + QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} diff --git a/CMakeLists.txt b/CMakeLists.txt index 07701451aad..90c355fed54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,8 @@ endif() set(VCPKG_FEATURE_FLAGS "versions") set(VCPKG_BUILD_TYPE "release") +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + # ***************************************************************************** # Project canary diff --git a/CMakePresets.json b/CMakePresets.json index 49f631e1921..e548742e157 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -84,8 +84,19 @@ "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug", "DEBUG_LOG": "ON", - "SPEED_UP_BUILD_UNITY": "OFF", - "ASAN_ENABLED": "ON" + "SPEED_UP_BUILD_UNITY": "OFF" + } + }, + { + "name": "linux-debug-asan", + "inherits": "linux-release", + "displayName": "Linux - Debug Build", + "description": "Build Debug Mode With ASAN Enable", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "DEBUG_LOG": "ON", + "ASAN_ENABLED": "ON", + "SPEED_UP_BUILD_UNITY": "OFF" } }, { diff --git a/qodana.yml b/qodana.yml new file mode 100644 index 00000000000..e921c4027a6 --- /dev/null +++ b/qodana.yml @@ -0,0 +1,14 @@ +--- +version: "1.0" +bootstrap: | + sudo apt-get update + sudo apt-get install -y cmake git unzip build-essential ca-certificates curl zip unzip tar pkg-config ninja-build autoconf automake libtool python3 + cd ~ + git clone https://github.com/Microsoft/vcpkg.git + cd vcpkg + ./bootstrap-vcpkg.sh + cd /data/project + rm -rf build + mkdir -p build + cd build + cmake -DCMAKE_TOOLCHAIN_FILE=~/vcpkg/scripts/buildsystems/vcpkg.cmake .. --preset linux-debug || true From c396ae88b7a7c9e0ab961123e45df4b82e467dec Mon Sep 17 00:00:00 2001 From: Beats Date: Tue, 6 Aug 2024 08:34:36 -0300 Subject: [PATCH 04/24] add: qodana configurations and checks for code analysis (#2793) --- .github/workflows/analysis-qodana.yml | 4 +- qodana.sarif.json | 184891 +++++++++++++++++++++++ qodana.yml | 81 + 3 files changed, 184974 insertions(+), 2 deletions(-) create mode 100644 qodana.sarif.json diff --git a/.github/workflows/analysis-qodana.yml b/.github/workflows/analysis-qodana.yml index 3c7b0154270..f89bc828e6e 100644 --- a/.github/workflows/analysis-qodana.yml +++ b/.github/workflows/analysis-qodana.yml @@ -15,7 +15,7 @@ jobs: pull-requests: write checks: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 @@ -23,6 +23,6 @@ jobs: - name: 'Qodana Scan' uses: JetBrains/qodana-action@v2024.1 with: - args: --compile-commands,./build/linux-debug/compile_commands.json + args: --compile-commands,./build/linux-debug/compile_commands.json,--baseline,./qodana.sarif.json env: QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} diff --git a/qodana.sarif.json b/qodana.sarif.json new file mode 100644 index 00000000000..afc2ec4974d --- /dev/null +++ b/qodana.sarif.json @@ -0,0 +1,184891 @@ +{ + "$schema": "https://raw.githubusercontent.com/schemastore/schemastore/master/src/schemas/json/sarif-2.1.0-rtm.5.json", + "version": "2.1.0", + "runs": [ + { + "tool": { + "driver": { + "name": "CL", + "fullName": "Qodana", + "version": "241.18034.45", + "rules": [ + { + "id": "ArrayIndexOutOfBounds", + "shortDescription": { + "text": "Array Index Out Of Bounds" + }, + "fullDescription": { + "text": "Reports array or pointer variable access expressions where index may be out of bounds of an array or allocated buffer. Example: 'void foo() {\n int buffer[100];\n\n for (int i = 0; i <= 100; i ++)\n buffer[i] = 0; // buffer overflow when i is equal to 100\n }' New in 2022.2", + "markdown": "Reports array or pointer variable access expressions where index may be out of bounds of an array or allocated buffer.\n\n**Example:**\n\n\n void foo() {\n int buffer[100];\n\n for (int i = 0; i <= 100; i ++)\n buffer[i] = 0; // buffer overflow when i is equal to 100\n }\n\nNew in 2022.2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "ArrayIndexOutOfBounds", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnconstrainedVariableType", + "shortDescription": { + "text": "Unconstrained variable type" + }, + "fullDescription": { + "text": "Reports cases where an expression constrained by a concept is assigned to a variable declared as 'auto' and suggests adding a type constraint. Example: 'template\n concept Foo = true;\n\n Foo auto func() { return true; }\n\n void bar() {\n auto f = func(); //warn here to add constraint 'Foo'\n }'", + "markdown": "Reports cases where an expression constrained by a concept is assigned to a variable declared as `auto` and suggests adding a type constraint.\n\n**Example:**\n\n\n template\n concept Foo = true;\n\n Foo auto func() { return true; }\n\n void bar() {\n auto f = func(); //warn here to add constraint 'Foo'\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "UnconstrainedVariableType", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/General", + "index": 28, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ConstantConditionsOC", + "shortDescription": { + "text": "Constant condition" + }, + "fullDescription": { + "text": "Reports conditions that are always 'true' or 'false' and expressions whose value is statically proven to be constant. Example: 'void process(State current) {\n current = State::Started;\n\n if (current == State::Stopped) {\n //code\n }\n //code\n }'", + "markdown": "Reports conditions that are always `true` or `false` and expressions whose value is statically proven to be constant.\n\n**Example:**\n\n\n void process(State current) {\n current = State::Started;\n\n if (current == State::Stopped) {\n //code\n }\n //code\n }\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "ConstantConditionsOC", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnusedLocalVariable", + "shortDescription": { + "text": "Unused Local Variable" + }, + "fullDescription": { + "text": "Reports the local variables that are declared but never accessed for reading. Such declarations and assignment can be removed safely.", + "markdown": "Reports the local variables that are declared but never accessed for reading. Such declarations and assignment can be removed safely." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "UnusedLocalVariable", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCInconsistentNaming", + "shortDescription": { + "text": "Inconsistent Naming" + }, + "fullDescription": { + "text": "Reports the names that don't match the naming convention for that kind of symbol. Learn More", + "markdown": "Reports the names that don't match the naming convention for that kind of symbol.\n\n[Learn More](https://www.jetbrains.com/help/clion/naming-conventions.html)" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "OCInconsistentNaming", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/General", + "index": 28, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PreprocessorComment", + "shortDescription": { + "text": "Preprocessor directive comment" + }, + "fullDescription": { + "text": "Reports the mismatches between the preprocessor '#endif' comments and macro names. Example: '#ifndef _UTILS_H\n #define _UTILS_H\n\n #endif //_UTILS'", + "markdown": "Reports the mismatches between the preprocessor `#endif` comments and macro names.\n\n**Example:**\n\n\n #ifndef _UTILS_H\n #define _UTILS_H\n\n #endif //_UTILS\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PreprocessorComment", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/General", + "index": 28, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "VirtualCallInCtorOrDtor", + "shortDescription": { + "text": "Virtual call from constructor or destructor" + }, + "fullDescription": { + "text": "Reports virtual member function calls from constructors or destructors. Since construction starts with the base class and moves to the derived classes, the resources of the derived class are not yet initialized. Destruction is performed in reverse order, so calling a virtual function can lead to accessing the resources that have already been destroyed. Example: 'class Test {\n public:\n void virtual setUp();\n\n Test() {\n setUp();\n }\n };'", + "markdown": "Reports virtual member function calls from constructors or destructors. Since construction starts with the base class and moves to the derived classes, the resources of the derived class are not yet initialized. Destruction is performed in reverse order, so calling a virtual function can lead to accessing the resources that have already been destroyed.\n\n**Example:**\n\n\n class Test {\n public:\n void virtual setUp();\n\n Test() {\n setUp();\n }\n };\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "VirtualCallInCtorOrDtor", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/General", + "index": 28, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "EmptyDeclOrStmt", + "shortDescription": { + "text": "Empty declaration or statement" + }, + "fullDescription": { + "text": "Reports empty declarations and statements that can be removed safely. Example: 'void foo() {\n //code\n }; // redundant empty declaration'", + "markdown": "Reports empty declarations and statements that can be removed safely.\n\n**Example:**\n\n\n void foo() {\n //code\n }; // redundant empty declaration\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "EmptyDeclOrStmt", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/General", + "index": 28, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCUnusedGlobalDeclaration", + "shortDescription": { + "text": "Unused Global Declaration" + }, + "fullDescription": { + "text": "Reports the global function and variable declarations that are never used and can be removed safely.", + "markdown": "Reports the global function and variable declarations that are never used and can be removed safely." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "OCUnusedGlobalDeclaration", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Unused code", + "index": 55, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HidingNonVirtualFunction", + "shortDescription": { + "text": "Hiding non-virtual function" + }, + "fullDescription": { + "text": "Reports the functions that hide non-virtual functions with the same signature declared in the base class. Example: class Base {\n public:\n void operate() {}\n};\n\nclass Derived : public Base {\n public:\n void operate() {}\n}", + "markdown": "Reports the functions that hide non-virtual functions with the same signature declared in the base class.\n\nExample:\n\n```\nclass Base {\n public:\n void operate() {}\n};\n\nclass Derived : public Base {\n public:\n void operate() {}\n}\n```" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "HidingNonVirtualFunction", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Functions", + "index": 56, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "LoopDoesntUseConditionVariable", + "shortDescription": { + "text": "Loop condition isn't updated inside the loop" + }, + "fullDescription": { + "text": "Reports the loop conditions that are not updated inside the loop. This can indicate code defects and cause infinite loops at runtime. Example: 'int i = 0, j = 0;\n while (i < 10) {\n ++j;\n }'", + "markdown": "Reports the loop conditions that are not updated inside the loop. This can indicate code defects and cause infinite loops at runtime.\n\n**Example:**\n\n\n int i = 0, j = 0;\n while (i < 10) {\n ++j;\n }\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "LoopDoesntUseConditionVariable", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MemoryLeak", + "shortDescription": { + "text": "Memory Leak" + }, + "fullDescription": { + "text": "Reports the allocations of memory (either 'new' operator or 'malloc()' function) that were not released before they become non-accessible. Example: 'class MyClass {\n int* leakedField = new int;\n };\n\n void foo() {\n MyClass* c = new MyClass;\n delete c;\n }'", + "markdown": "Reports the allocations of memory (either `new` operator or `malloc()` function) that were not released before they become non-accessible.\n\n**Example:**\n\n\n class MyClass {\n int* leakedField = new int;\n };\n\n void foo() {\n MyClass* c = new MyClass;\n delete c;\n }\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "MemoryLeak", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCUnusedInstanceVariable", + "shortDescription": { + "text": "Unused Instance Variable" + }, + "fullDescription": { + "text": "Reports the instance variables that are never accessed or written.", + "markdown": "Reports the instance variables that are never accessed or written." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "OCUnusedInstanceVariable", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Objective-C/Unused code", + "index": 60, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnreachableCode", + "shortDescription": { + "text": "Unreachable Code" + }, + "fullDescription": { + "text": "Reports the code pieces that are never executed in any control flow and can be removed safely.", + "markdown": "Reports the code pieces that are never executed in any control flow and can be removed safely." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "UnreachableCode", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCUnusedMethod", + "shortDescription": { + "text": "Unused Method" + }, + "fullDescription": { + "text": "Reports the methods that are never called, for example, in send message expressions, '@selector' expressions, and other places like XIB files.", + "markdown": "Reports the methods that are never called, for example, in send message expressions, `@selector` expressions, and other places like XIB files." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "OCUnusedMethod", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Objective-C/Unused code", + "index": 60, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "LocalValueEscapesScope", + "shortDescription": { + "text": "Local Value Escapes Scope" + }, + "fullDescription": { + "text": "Reports the references to local values that escape the function Example: 'int *escapeLocalScope() {\n int lv = 100;\n return &lv;\n }'", + "markdown": "Reports the references to local values that escape the function\n\n**Example:**\n\n\n int *escapeLocalScope() {\n int lv = 100;\n return &lv;\n }\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "LocalValueEscapesScope", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCUnusedMacro", + "shortDescription": { + "text": "Unused Macro" + }, + "fullDescription": { + "text": "Reports the macro definitions that are never used and can be removed safely.", + "markdown": "Reports the macro definitions that are never used and can be removed safely." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "OCUnusedMacro", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Unused code", + "index": 55, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCUnusedConcept", + "shortDescription": { + "text": "Unused Concept" + }, + "fullDescription": { + "text": "Reports the concepts that are never used and can be removed safely.", + "markdown": "Reports the concepts that are never used and can be removed safely." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "OCUnusedConcept", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Unused code", + "index": 55, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCDFA", + "shortDescription": { + "text": "Context-sensitive analysis" + }, + "fullDescription": { + "text": "Reports the issues found by the context-sensitive data flow analyser. Such as: \"Constant condition\", \"Dangling pointer\", \"Null dereference\", \"Unreachable code\", and so on.", + "markdown": "Reports the issues found by the context-sensitive data flow analyser. Such as: \"Constant condition\", \"Dangling pointer\", \"Null dereference\", \"Unreachable code\", and so on." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "OCDFA", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Clazy", + "shortDescription": { + "text": "Clazy" + }, + "fullDescription": { + "text": "Reports the Qt-related compiler warnings, ranging from unneeded memory allocations to the misused API.", + "markdown": "Reports the Qt-related compiler warnings, ranging from unneeded memory allocations to the misused API." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "Clazy", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Static Analysis Tools", + "index": 70, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "EndlessLoop", + "shortDescription": { + "text": "Endless Loop" + }, + "fullDescription": { + "text": "Reports the 'for', 'while', 'do while', and 'goto' statements that exit only by throwing an exception. Even though such statements may be correct, they often indicate code errors.", + "markdown": "Reports the `for`, `while`, `do while`, and `goto` statements that exit only by throwing an exception. Even though such statements may be correct, they often indicate code errors." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "EndlessLoop", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Simplify", + "shortDescription": { + "text": "Simplifiable statement" + }, + "fullDescription": { + "text": "Reports the statements that can be simplified, such as constant conditions, identical if branches, redundant boolean expressions, and others. Use the checkboxes below to control the analysis options: Simplify \"if (true)\", \"while(false)\": suggest replacing the 'if'/'while' statement with a boolean literal. Simplify \"condition == true\": suggest replacing equality statements with boolean literals. Simplify \"condition1 ? true : condition2;\": suggest simplifying ternary operators where one of the expressions is a boolean literal. Simplify \"if (condition1) return true; return condition2;\": suggest simplifying 'if' where a boolean literal is returned if the condition is true and another condition is returned otherwise.", + "markdown": "Reports the statements that can be simplified, such as constant conditions, identical if branches, redundant boolean expressions, and others. Use the checkboxes below to control the analysis options:\n\n* **Simplify \"if (true)\", \"while(false)\"** : suggest replacing the `if`/`while` statement with a boolean literal.\n* **Simplify \"condition == true\"**: suggest replacing equality statements with boolean literals.\n* **Simplify \"condition1 ? true : condition2;\"**: suggest simplifying ternary operators where one of the expressions is a boolean literal.\n* **Simplify \"if (condition1) return true; return condition2;\"** : suggest simplifying `if` where a boolean literal is returned if the condition is true and another condition is returned otherwise." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "Simplify", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/General", + "index": 28, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCUnusedIncludeDirective", + "shortDescription": { + "text": "Unused Include Directive" + }, + "fullDescription": { + "text": "Reports the include directives that are not used or not required and can be removed safely. Detect completely unused An include directive is considered unused if declarations from it are never used within the translation unit. Detect not directly used An include directive is considered unused if declarations from it are not used in the file directly. This works best with the \"Include What You Use\" policy. Detect not required Detects the minimal set of include directives for the file to be compilable. All other #include directives are considered unused. Use the checkbox below to run inspection in header files.", + "markdown": "Reports the include directives that are not used or not required and can be removed safely.\n\n**Detect completely unused**\n: An include directive is considered unused if declarations from it are never used within the translation unit.\n\n**Detect not directly used**\n: An include directive is considered unused if declarations from it are not used in the file directly. This works best with the \"Include What You Use\" policy.\n\n**Detect not required**\n: Detects the minimal set of include directives for the file to be compilable. All other #include directives are considered unused.\n\nUse the checkbox below to run inspection in header files." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "OCUnusedIncludeDirective", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Unused code", + "index": 55, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCUnusedProperty", + "shortDescription": { + "text": "Unused Property" + }, + "fullDescription": { + "text": "Reports the properties that are never accessed or written, neither in qualified expressions nor in accessor method calls.", + "markdown": "Reports the properties that are never accessed or written, neither in qualified expressions nor in accessor method calls." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "OCUnusedProperty", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Objective-C/Unused code", + "index": 60, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ConstantFunctionResult", + "shortDescription": { + "text": "Constant Function Result" + }, + "fullDescription": { + "text": "Reports the functions where the return value is always the same constant.", + "markdown": "Reports the functions where the return value is always the same constant." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "ConstantFunctionResult", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnusedValue", + "shortDescription": { + "text": "Unused Value" + }, + "fullDescription": { + "text": "Reports the variable values that are never used after being assigned. This can happen in the following cases: the variable is never read after the assignment the value is overwritten by another assignment before it is accessed for reading the variable initializer is redundant (for one of the above two reasons) the variable itself is never used. Example: 'class C {\n int field;\n\n void foo() {\n field = unused_value;\n }\n\n void bar() {\n use(field);\n foo();\n }\n };' Use the checkbox below to have this inspection ignore variable initializers.", + "markdown": "Reports the variable values that are never used after being assigned. This can happen in the following cases:\n\n* the variable is never read after the assignment\n* the value is overwritten by another assignment before it is accessed for reading\n* the variable initializer is redundant (for one of the above two reasons)\n* the variable itself is never used.\n\n**Example:**\n\n\n class C {\n int field;\n\n void foo() {\n field = unused_value;\n }\n\n void bar() {\n use(field);\n foo();\n }\n };\n\nUse the checkbox below to have this inspection ignore variable initializers." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "UnusedValue", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ConstantParameter", + "shortDescription": { + "text": "Constant Parameter" + }, + "fullDescription": { + "text": "Reports function parameters that always have the same value.", + "markdown": "Reports function parameters that always have the same value." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "ConstantParameter", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCUnusedTypeAlias", + "shortDescription": { + "text": "Unused Type Alias" + }, + "fullDescription": { + "text": "Reports the statements that are never used and can be removed safely.", + "markdown": "Reports the statements that are never used and can be removed safely." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "OCUnusedTypeAlias", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Unused code", + "index": 55, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ArgumentSelectionDefects", + "shortDescription": { + "text": "Argument selection defect" + }, + "fullDescription": { + "text": "Reports mismatches between the argument identifier name and the formal parameter name. This can help detect programming errors, for example, when you accidentally switch the arguments of the same type. The original research paper can be found here. Example: 'const User* get_User(int64_t company_id, int64_t user_id) {\n return new User{company_id, user_id, \"foo\"};\n }\n\n void call_User(int64_t company_id, int64_t user_id) {\n const User* user = get_User(user_id, company_id); // potential issue here\n //...\n }' Use the checkbox below to inspect arguments with names shorter than three symbols. Learn More.", + "markdown": "Reports mismatches between the argument identifier name and the formal parameter name. This can help detect programming errors, for example, when you accidentally switch the arguments of the same type. The original research paper can be found [here](https://static.googleusercontent.com/media/research.google.com/ru//pubs/archive/46317.pdf).\n\n**Example:**\n\n\n const User* get_User(int64_t company_id, int64_t user_id) {\n return new User{company_id, user_id, \"foo\"};\n }\n\n void call_User(int64_t company_id, int64_t user_id) {\n const User* user = get_User(user_id, company_id); // potential issue here\n //...\n }\n\nUse the checkbox below to inspect arguments with names shorter than three symbols.\n\n[Learn More.](https://www.jetbrains.com/help/clion/argument-selection-defects-inspection.html)" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ArgumentSelectionDefects", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/General", + "index": 28, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Misra", + "shortDescription": { + "text": "MISRA" + }, + "fullDescription": { + "text": "Reports various issues defined by the MISRA C 2012 and MISRA C++ 2008 guidelines. The list of currently supported checks is here.", + "markdown": "Reports various issues defined by the MISRA C 2012 and MISRA C++ 2008 guidelines.\n\nThe list of currently supported checks is [here](https://youtrack.jetbrains.com/articles/CPP-A-191430682/MISRA-checks-supported-in-CLion)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "Misra", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Static Analysis Tools", + "index": 70, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NotImplementedFunctions", + "shortDescription": { + "text": "Not Implemented Functions" + }, + "fullDescription": { + "text": "Reports the functions that were declared in a class but have no implementations. Example: class Test {\n public:\n void setUp();\n};", + "markdown": "Reports the functions that were declared in a class but have no implementations.\n\n**Example:**\n\n```\nclass Test {\n public:\n void setUp();\n};\n```" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "NotImplementedFunctions", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Functions", + "index": 56, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnusedParameter", + "shortDescription": { + "text": "Unused Parameter" + }, + "fullDescription": { + "text": "Reports the parameters that are declared but never accessed for reading and can be removed safely.", + "markdown": "Reports the parameters that are declared but never accessed for reading and can be removed safely." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "UnusedParameter", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnreachableCallsOfFunction", + "shortDescription": { + "text": "Unreachable Calls Of Function" + }, + "fullDescription": { + "text": "Reports the functions which calls are never used. Such functions are also never executed.", + "markdown": "Reports the functions which calls are never used. Such functions are also never executed." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "UnreachableCallsOfFunction", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCUnusedClass", + "shortDescription": { + "text": "Unused Class" + }, + "fullDescription": { + "text": "Reports Objective-C classes and protocols that are never used.", + "markdown": "Reports Objective-C classes and protocols that are never used." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "OCUnusedClass", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Objective-C/Unused code", + "index": 60, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ClangdErrorsAndWarnings", + "shortDescription": { + "text": "Clangd errors and warnings" + }, + "fullDescription": { + "text": "Reports C/C++ errors and warnings from clangd.", + "markdown": "Reports C/C++ errors and warnings from clangd. " + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ClangdErrorsAndWarnings", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/General", + "index": 28, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCUnusedTemplateParameter", + "shortDescription": { + "text": "Unused Template Parameter" + }, + "fullDescription": { + "text": "Reports the template parameters that are never used and can be removed safely.", + "markdown": "Reports the template parameters that are never used and can be removed safely." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "OCUnusedTemplateParameter", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Unused code", + "index": 55, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCUnusedStruct", + "shortDescription": { + "text": "Unused Struct" + }, + "fullDescription": { + "text": "Reports the classes and structures that are never used and can be removed safely.", + "markdown": "Reports the classes and structures that are never used and can be removed safely." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "OCUnusedStruct", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Unused code", + "index": 55, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NotInitializedField", + "shortDescription": { + "text": "Not Initialized Field" + }, + "fullDescription": { + "text": "Reports the fields that may have not been initialized before their usage. Initialization and usage may be in different functions.", + "markdown": "Reports the fields that may have not been initialized before their usage. Initialization and usage may be in different functions." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "NotInitializedField", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DanglingPointer", + "shortDescription": { + "text": "Dangling Pointer" + }, + "fullDescription": { + "text": "Reports the usages of the pointers that refer to the memory already deleted by the 'delete' operator or the 'free(void* ptr)' function. Example: 'void process() {\n for(node *pt = head; pt != nullptr; pt = pt->next) {\n delete pt;\n }\n }'", + "markdown": "Reports the usages of the pointers that refer to the memory already deleted by the `delete` operator or the `free(void* ptr)` function.\n\n**Example:**\n\n\n void process() {\n for(node *pt = head; pt != nullptr; pt = pt->next) {\n delete pt;\n }\n }\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "DanglingPointer", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ClangTidy", + "shortDescription": { + "text": "Clang-Tidy" + }, + "fullDescription": { + "text": "Reports various issues related to The C++ Core Guidelines, Modernize, Readability and Performance. CLion's default configuration is described here. For more information, visit the official Clang-Tidy page. Use the checkbox below to have this inspection ignore the IDE settings and use a list of checks specified in the .clang-tidy file if any exist.", + "markdown": "Reports various issues related to The C++ Core Guidelines, Modernize, Readability and Performance. \nCLion's default configuration is described [here](https://youtrack.jetbrains.com/articles/CPP-A-90276519/Clang-Tidy-in-CLion:-default-configuration). \nFor more information, visit the official [Clang-Tidy](https://clang.llvm.org/extra/clang-tidy/) page.\n\nUse the checkbox below to have this inspection ignore the IDE settings and use a list of checks specified in the **.clang-tidy** file if any exist." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "ClangTidy", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Static Analysis Tools", + "index": 70, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "InfiniteRecursion", + "shortDescription": { + "text": "Infinite Recursion" + }, + "fullDescription": { + "text": "Reports methods and functions with infinite recursion. Example: 'int factorial(int n) {\n return n * factorial(n - 1);\n }'", + "markdown": "Reports methods and functions with infinite recursion.\n\n**Example:**\n\n\n int factorial(int n) {\n return n * factorial(n - 1);\n }\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "InfiniteRecursion", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NullDereference", + "shortDescription": { + "text": "Null Dereference" + }, + "fullDescription": { + "text": "Reports dereferences of the pointers that may contain 'nullptr'. Example: 'using namespace std;\n void process(string *a, string b) {\n if (a != nullptr || a->length()) {\n a = &b;\n }\n }'", + "markdown": "Reports dereferences of the pointers that may contain `nullptr`.\n\n**Example:**\n\n\n using namespace std;\n void process(string *a, string b) {\n if (a != nullptr || a->length()) {\n a = &b;\n }\n }\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "NullDereference", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "taxa": [ + { + "id": "Python", + "name": "Python" + }, + { + "id": "JavaScript and TypeScript", + "name": "JavaScript and TypeScript" + }, + { + "id": "JavaScript and TypeScript/Control flow issues", + "name": "Control flow issues", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Angular", + "name": "Angular" + }, + { + "id": "PostCSS", + "name": "PostCSS" + }, + { + "id": "XPath", + "name": "XPath" + }, + { + "id": "Sass_SCSS", + "name": "Sass/SCSS" + }, + { + "id": "Shell script", + "name": "Shell script" + }, + { + "id": "JavaScript and TypeScript/Unit testing", + "name": "Unit testing", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Makefile", + "name": "Makefile" + }, + { + "id": "CMake", + "name": "CMake" + }, + { + "id": "CMake/General", + "name": "General", + "relationships": [ + { + "target": { + "id": "CMake", + "index": 10, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSON and JSON5", + "name": "JSON and JSON5" + }, + { + "id": "C_C++", + "name": "C/C++" + }, + { + "id": "C_C++/Data Flow Analysis", + "name": "Data Flow Analysis", + "relationships": [ + { + "target": { + "id": "C_C++", + "index": 13, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MongoJS", + "name": "MongoJS" + }, + { + "id": "JavaScript and TypeScript/General", + "name": "General", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/Code style issues", + "name": "Code style issues", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MySQL", + "name": "MySQL" + }, + { + "id": "JavaScript and TypeScript/Potentially undesirable code constructs", + "name": "Potentially undesirable code constructs", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/Flow type checker", + "name": "Flow type checker", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Markdown", + "name": "Markdown" + }, + { + "id": "JavaScript and TypeScript/Probable bugs", + "name": "Probable bugs", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HTTP Client", + "name": "HTTP Client" + }, + { + "id": "Devicetree", + "name": "Devicetree" + }, + { + "id": "HTML", + "name": "HTML" + }, + { + "id": "JavaScript and TypeScript/Unused symbols", + "name": "Unused symbols", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/Data flow", + "name": "Data flow", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "C_C++/General", + "name": "General", + "relationships": [ + { + "target": { + "id": "C_C++", + "index": 13, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/Bitwise operation issues", + "name": "Bitwise operation issues", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/ES2015 migration aids", + "name": "ES2015 migration aids", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "General", + "name": "General" + }, + { + "id": "HTML/Accessibility", + "name": "Accessibility", + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/React", + "name": "React", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/TypeScript", + "name": "TypeScript", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/Validity issues", + "name": "Validity issues", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Docker-compose", + "name": "Docker-compose" + }, + { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "name": "Potentially confusing code constructs", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CSS", + "name": "CSS" + }, + { + "id": "CSS/Invalid elements", + "name": "Invalid elements", + "relationships": [ + { + "target": { + "id": "CSS", + "index": 38, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Dockerfile", + "name": "Dockerfile" + }, + { + "id": "SQL", + "name": "SQL" + }, + { + "id": "JavaScript and TypeScript/Try statement issues", + "name": "Try statement issues", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Structural search", + "name": "Structural search" + }, + { + "id": "JavaScript and TypeScript/Function metrics", + "name": "Function metrics", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "YAML", + "name": "YAML" + }, + { + "id": "Requirements", + "name": "Requirements" + }, + { + "id": "XML", + "name": "XML" + }, + { + "id": "JavaScript and TypeScript/Assignment issues", + "name": "Assignment issues", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CSS/Code style issues", + "name": "Code style issues", + "relationships": [ + { + "target": { + "id": "CSS", + "index": 38, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Less", + "name": "Less" + }, + { + "id": "RegExp", + "name": "RegExp" + }, + { + "id": "Vue", + "name": "Vue" + }, + { + "id": "JavaScript and TypeScript/Node.js", + "name": "Node.js", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XSLT", + "name": "XSLT" + }, + { + "id": "C_C++/Unused code", + "name": "Unused code", + "relationships": [ + { + "target": { + "id": "C_C++", + "index": 13, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "C_C++/Functions", + "name": "Functions", + "relationships": [ + { + "target": { + "id": "C_C++", + "index": 13, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/Imports and dependencies", + "name": "Imports and dependencies", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RELAX NG", + "name": "RELAX NG" + }, + { + "id": "Objective-C", + "name": "Objective-C" + }, + { + "id": "Objective-C/Unused code", + "name": "Unused code", + "relationships": [ + { + "target": { + "id": "Objective-C", + "index": 59, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CSS/Probable bugs", + "name": "Probable bugs", + "relationships": [ + { + "target": { + "id": "CSS", + "index": 38, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/Naming conventions", + "name": "Naming conventions", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/Switch statement issues", + "name": "Switch statement issues", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/DOM issues", + "name": "DOM issues", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/Async code and promises", + "name": "Async code and promises", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript and TypeScript/Code quality tools", + "name": "Code quality tools", + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript", + "index": 1, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Code Coverage", + "name": "Code Coverage" + }, + { + "id": "Proofreading", + "name": "Proofreading" + }, + { + "id": "GitHub actions", + "name": "GitHub actions" + }, + { + "id": "C_C++/Static Analysis Tools", + "name": "Static Analysis Tools", + "relationships": [ + { + "target": { + "id": "C_C++", + "index": 13, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CSS/Code quality tools", + "name": "Code quality tools", + "relationships": [ + { + "target": { + "id": "CSS", + "index": 38, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PostgreSQL", + "name": "PostgreSQL" + }, + { + "id": "SQL server", + "name": "SQL server" + }, + { + "id": "ReST", + "name": "ReST" + }, + { + "id": "JSONPath", + "name": "JSONPath" + }, + { + "id": "Qodana", + "name": "Qodana" + }, + { + "id": "Security", + "name": "Security" + }, + { + "id": "Oracle", + "name": "Oracle" + }, + { + "id": "Internationalization", + "name": "Internationalization" + }, + { + "id": "TOML", + "name": "TOML" + }, + { + "id": "Version control", + "name": "Version control" + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + "extensions": [ + { + "name": "PythonCore", + "version": "241.18034.45", + "rules": [ + { + "id": "PyPandasSeriesToListInspection", + "shortDescription": { + "text": "Method Series.to_list() is recommended" + }, + "fullDescription": { + "text": "Reports redundant 'list' in 'list(Series.values)' statement for pandas and polars libraries. Such 'Series' values extraction can be replaced with the 'to_list()' function call. Example: list(df['column'].values)\n When the quick-fix is applied, the code changes to: df['column'].to_list()", + "markdown": "Reports redundant `list` in `list(Series.values)` statement for pandas and polars libraries.\nSuch `Series` values extraction can be replaced with the `to_list()` function call.\n\n**Example:**\n\n```\nlist(df['column'].values)\n```\n\nWhen the quick-fix is applied, the code changes to:\n\n```\ndf['column'].to_list()\n```" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyPackages", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PySetFunctionToLiteralInspection", + "shortDescription": { + "text": "Function call can be replaced with set literal" + }, + "fullDescription": { + "text": "Reports calls to the 'set' function that can be replaced with the 'set' literal. Example: 'def do_mult(a, b):\n c = a * b\n return set([c, a, b])' When the quick-fix is applied, the code changes to: 'def do_mult(a, b):\n c = a * b\n return {c, a, b}'", + "markdown": "Reports calls to the `set` function that can be replaced with\nthe `set` literal.\n\n**Example:**\n\n\n def do_mult(a, b):\n c = a * b\n return set([c, a, b])\n\nWhen the quick-fix is applied, the code changes to:\n\n\n def do_mult(a, b):\n c = a * b\n return {c, a, b}\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PySetFunctionToLiteral", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyOverridesInspection", + "shortDescription": { + "text": "Invalid usages of @override decorator" + }, + "fullDescription": { + "text": "Reports when a method decorated with @override doesn't have a matching method in its ancestor classes Example: 'from typing import override\n\nclass Parent:\n def foo(self) -> int:\n return 1\n\n def bar(self, x: str) -> str:\n return x\n\nclass Child(Parent):\n @override\n def foo(self) -> int:\n return 2\n\n @override # Missing super method for override function\n def baz(self) -> int:\n return 1'", + "markdown": "Reports when a method decorated with @override doesn't have a matching method in its ancestor classes\n\n**Example:**\n\n\n from typing import override\n\n class Parent:\n def foo(self) -> int:\n return 1\n\n def bar(self, x: str) -> str:\n return x\n\n class Child(Parent):\n @override\n def foo(self) -> int:\n return 2\n\n @override # Missing super method for override function\n def baz(self) -> int:\n return 1\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyOverrides", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyInitNewSignatureInspection", + "shortDescription": { + "text": "Incompatible signatures of __new__ and __init__" + }, + "fullDescription": { + "text": "Reports incompatible signatures of the '__new__' and '__init__' methods. Example: 'class MyClass(object):\n def __new__(cls, arg1):\n return super().__new__(cls)\n\n def __init__(self):\n pass' If the '__new__' and '__init__' have different arguments, then the 'MyClass' cannot be instantiated. As a fix, the IDE offers to apply the Change Signature refactoring.", + "markdown": "Reports incompatible signatures of the `__new__` and `__init__` methods.\n\n**Example:**\n\n\n class MyClass(object):\n def __new__(cls, arg1):\n return super().__new__(cls)\n\n def __init__(self):\n pass\n\nIf the `__new__` and `__init__` have different arguments, then the `MyClass`\ncannot be instantiated.\n\nAs a fix, the IDE offers to apply the Change Signature refactoring." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyInitNewSignature", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyMissingConstructorInspection", + "shortDescription": { + "text": "Missed call to '__init__' of the super class" + }, + "fullDescription": { + "text": "Reports cases when a call to the 'super' constructor in a class is missed. Example: 'class Fruit:\n def __init__(self):\n pass\n\n\nclass Pear(Fruit):\n def __init__(self):\n pass' The 'Pear' class should have a 'super' call in the '__init__' method. When the quick-fix is applied, the code changes to: 'class Fruit:\n def __init__(self):\n pass\n\n\nclass Pear(Fruit):\n def __init__(self):\n super().__init__()'", + "markdown": "Reports cases when a call to the `super` constructor in a class is missed.\n\n**Example:**\n\n\n class Fruit:\n def __init__(self):\n pass\n\n\n class Pear(Fruit):\n def __init__(self):\n pass\n\nThe `Pear` class should have a `super` call in the `__init__`\nmethod.\n\nWhen the quick-fix is applied, the code changes to:\n\n\n class Fruit:\n def __init__(self):\n pass\n\n\n class Pear(Fruit):\n def __init__(self):\n super().__init__()\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyMissingConstructor", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PySimplifyBooleanCheckInspection", + "shortDescription": { + "text": "Redundant boolean variable check" + }, + "fullDescription": { + "text": "Reports equality comparison with a boolean literal. Example: 'def func(s):\n if s.isdigit() == True:\n return int(s)' With the quick-fix applied, the code fragment will be simplified to: 'def func(s):\n if s.isdigit():\n return int(s)'", + "markdown": "Reports equality comparison with a boolean literal.\n\n**Example:**\n\n\n def func(s):\n if s.isdigit() == True:\n return int(s)\n\nWith the quick-fix applied, the code fragment will be simplified to:\n\n\n def func(s):\n if s.isdigit():\n return int(s)\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PySimplifyBooleanCheck", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyCallingNonCallableInspection", + "shortDescription": { + "text": "Attempt to call a non-callable object" + }, + "fullDescription": { + "text": "Reports a problem when you are trying to call objects that are not callable, like, for example, properties: Example: 'class Record:\n @property\n def as_json(self):\n\njson = Record().as_json()'", + "markdown": "Reports a problem when you are trying\nto call objects that are not callable, like, for example, properties:\n\n**Example:**\n\n\n class Record:\n @property\n def as_json(self):\n\n json = Record().as_json()\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyCallingNonCallable", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyUnreachableCodeInspection", + "shortDescription": { + "text": "Unreachable code" + }, + "fullDescription": { + "text": "Reports code fragments that cannot be normally reached. Example: 'if True:\n print('Yes')\nelse:\n print('No')' As a fix, you might want to check and modify the algorithm to ensure it implements the expected logic.", + "markdown": "Reports code fragments that cannot be normally reached.\n\n**Example:**\n\n\n if True:\n print('Yes')\n else:\n print('No')\n\nAs a fix, you might want to check and modify the algorithm to ensure it implements\nthe expected logic." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyUnreachableCode", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyChainedComparisonsInspection", + "shortDescription": { + "text": "Too complex chained comparisons" + }, + "fullDescription": { + "text": "Reports chained comparisons that can be simplified. Example: 'def do_comparison(x):\n xmin = 10\n xmax = 100\n if x >= xmin and x <= xmax:\n pass' The IDE offers to simplify 'if x >= xmin and x <= xmax'. When the quick-fix is applied, the code changes to: 'def do_comparison(x):\n xmin = 10\n xmax = 100\n if xmin <= x <= xmax:\n pass'", + "markdown": "Reports chained comparisons that can be simplified.\n\n**Example:**\n\n\n def do_comparison(x):\n xmin = 10\n xmax = 100\n if x >= xmin and x <= xmax:\n pass\n\nThe IDE offers to simplify `if x >= xmin and x <= xmax`.\nWhen the quick-fix is applied, the code changes to:\n\n\n def do_comparison(x):\n xmin = 10\n xmax = 100\n if xmin <= x <= xmax:\n pass\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyChainedComparisons", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyCompatibilityInspection", + "shortDescription": { + "text": "Code is incompatible with specific Python versions" + }, + "fullDescription": { + "text": "Reports incompatibility with the specified versions of Python. Enable this inspection if you need your code to be compatible with a range of Python versions, for example, if you are building a library. To define the range of the inspected Python versions, select the corresponding checkboxes in the Options section. For more information about the Python versions supported by the IDE, see the web help.", + "markdown": "Reports incompatibility with the specified versions of Python.\nEnable this inspection if you need your code to be compatible with a range of Python versions, for example,\nif you are building a library.\n\nTo define the range of the inspected Python versions, select the corresponding checkboxes in the **Options**\nsection.\n\nFor more information about the Python versions supported by the IDE, see the\n[web help](https://www.jetbrains.com/help/pycharm/python.html#support)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PyCompatibility", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyGlobalUndefinedInspection", + "shortDescription": { + "text": "Global variable is not defined at the module level" + }, + "fullDescription": { + "text": "Reports problems when a variable defined through the 'global' statement is not defined in the module scope. Example: 'def foo():\n global bar\n print(bar)\n\nfoo()' As a fix, you can move the global variable declaration: 'global bar\n\n\ndef foo():\n print(bar)'", + "markdown": "Reports problems when a variable defined through the `global`\nstatement is not defined in the module scope.\n\n**Example:**\n\n\n def foo():\n global bar\n print(bar)\n\n foo()\n\nAs a fix, you can move the global variable declaration:\n\n\n global bar\n\n\n def foo():\n print(bar)\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyGlobalUndefined", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnsatisfiedRequirementInspection", + "shortDescription": { + "text": "Requirement is not satisfied" + }, + "fullDescription": { + "text": "Reports packages mentioned in requirements files (for example, 'requirements.txt', or 'dependencies' section in 'pyproject.toml' files) but not installed, or imported but not mentioned in requirements files.", + "markdown": "Reports packages mentioned in requirements files (for example, `requirements.txt`, or `dependencies` section in `pyproject.toml` files) but not installed,\nor imported but not mentioned in requirements files." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "UnsatisfiedRequirement", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Requirements", + "index": 46, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyProtocolInspection", + "shortDescription": { + "text": "Invalid protocol definitions and usages" + }, + "fullDescription": { + "text": "Reports invalid definitions and usages of protocols introduced in PEP-544. Example: 'from typing import Protocol\n\n\nclass MyProtocol(Protocol):\n def method(self, p: int) -> str:\n pass\n\n\nclass MyClass(MyProtocol):\n def method(self, p: str) -> int: # Type of 'method' is not compatible with 'MyProtocol'\n pass\n\n\nclass MyAnotherProtocol(MyClass, Protocol): # All bases of a protocol must be protocols\n pass'", + "markdown": "Reports invalid definitions and usages of protocols introduced in\n[PEP-544](https://www.python.org/dev/peps/pep-0544/).\n\n**Example:**\n\n\n from typing import Protocol\n\n\n class MyProtocol(Protocol):\n def method(self, p: int) -> str:\n pass\n\n\n class MyClass(MyProtocol):\n def method(self, p: str) -> int: # Type of 'method' is not compatible with 'MyProtocol'\n pass\n\n\n class MyAnotherProtocol(MyClass, Protocol): # All bases of a protocol must be protocols\n pass\n\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyProtocol", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyTypeHintsInspection", + "shortDescription": { + "text": "Invalid type hints definitions and usages" + }, + "fullDescription": { + "text": "Reports invalid usages of type hints. Example: 'from typing import TypeVar\n\nT0 = TypeVar('T1') # Argument of 'TypeVar' must be 'T0'\n\n\ndef b(p: int) -> int: # Type specified both in a comment and annotation\n # type: (int) -> int\n pass\n\n\ndef c(p1, p2): # Type signature has too many arguments\n # type: (int) -> int\n pass' Available quick-fixes offer various actions. You can rename, remove, or move problematic elements. You can also manually modify type declarations to ensure no warning is shown.", + "markdown": "Reports invalid usages of type hints.\n\n**Example:**\n\n\n from typing import TypeVar\n\n T0 = TypeVar('T1') # Argument of 'TypeVar' must be 'T0'\n\n\n def b(p: int) -> int: # Type specified both in a comment and annotation\n # type: (int) -> int\n pass\n\n\n def c(p1, p2): # Type signature has too many arguments\n # type: (int) -> int\n pass\n\nAvailable quick-fixes offer various actions. You can rename, remove, or move problematic elements. You can also manually modify type declarations to ensure no warning is shown." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyTypeHints", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyMethodMayBeStaticInspection", + "shortDescription": { + "text": "Method is not declared static" + }, + "fullDescription": { + "text": "Reports any methods that do not require a class instance creation and can be made static. Example: 'class MyClass(object):\n def my_method(self, x):\n print(x)' If a Make function from method quick-fix is applied, the code changes to: 'def my_method(x):\n print(x)\n\n\nclass MyClass(object):\n pass' If you select the Make method static quick-fix, the '@staticmethod' decorator is added: 'class MyClass(object):\n @staticmethod\n def my_method(x):\n print(x)'", + "markdown": "Reports any methods that do not require a class instance creation and can be\nmade static.\n\n**Example:**\n\n\n class MyClass(object):\n def my_method(self, x):\n print(x)\n\nIf a **Make function from method** quick-fix is applied, the code changes to:\n\n\n def my_method(x):\n print(x)\n\n\n class MyClass(object):\n pass\n\nIf you select the **Make method static** quick-fix, the `@staticmethod` decorator is added:\n\n\n class MyClass(object):\n @staticmethod\n def my_method(x):\n print(x)\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyMethodMayBeStatic", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyDictCreationInspection", + "shortDescription": { + "text": "Dictionary creation can be rewritten by dictionary literal" + }, + "fullDescription": { + "text": "Reports situations when you can rewrite dictionary creation by using a dictionary literal. This approach brings performance improvements. Example: 'dic = {}\ndic['var'] = 1' When the quick-fix is applied, the code changes to: 'dic = {'var': 1}'", + "markdown": "Reports situations when you can rewrite dictionary creation\nby using a dictionary literal.\n\nThis approach brings performance improvements.\n\n**Example:**\n\n\n dic = {}\n dic['var'] = 1\n\nWhen the quick-fix is applied, the code changes to:\n\n\n dic = {'var': 1}\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyDictCreation", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyStringFormatInspection", + "shortDescription": { + "text": "Errors in string formatting operations" + }, + "fullDescription": { + "text": "Reports errors in string formatting operations. Example 1: '\"Hello {1}\".format(\"people\")' Example 2: 'def bar():\n return 1\n\n\n\"%s %s\" % bar()' As a fix, you need to rewrite string formatting fragments to adhere to the formatting syntax.", + "markdown": "Reports errors in string formatting operations.\n\n**Example 1:**\n\n\n \"Hello {1}\".format(\"people\")\n\n**Example 2:**\n\n\n def bar():\n return 1\n\n\n \"%s %s\" % bar()\n\nAs a fix, you need to rewrite string formatting fragments to\nadhere to the [formatting syntax](https://docs.python.org/3/library/string.html#format-string-syntax)." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyStringFormat", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyExceptionInheritInspection", + "shortDescription": { + "text": "Exceptions do not inherit from standard 'Exception' class" + }, + "fullDescription": { + "text": "Reports cases when a custom exception class is raised but does not inherit from the builtin Exception class. Example: 'class A:\n pass\n\n\ndef me_exception():\n raise A()' The proposed quick-fix changes the code to: 'class A(Exception):\n pass\n\n\ndef me_exception():\n raise A()'", + "markdown": "Reports cases when a custom exception class is\nraised but does not inherit from the\n[builtin Exception class](https://docs.python.org/3/library/exceptions.html).\n\n**Example:**\n\n\n class A:\n pass\n\n\n def me_exception():\n raise A()\n\nThe proposed quick-fix changes the code to:\n\n\n class A(Exception):\n pass\n\n\n def me_exception():\n raise A()\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyExceptionInherit", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyAssignmentToLoopOrWithParameterInspection", + "shortDescription": { + "text": "Assignments to 'for' loop or 'with' statement parameter" + }, + "fullDescription": { + "text": "Reports the cases when you rewrite a loop variable with an inner loop. Example: 'for i in range(5):\n for i in range(20, 25):\n print(\"Inner\", i)\n print(\"Outer\", i)' It also warns you if a variable declared in the 'with' statement is redeclared inside the statement body: 'with open(\"file\") as f:\n f.read()\n with open(\"file\") as f:'", + "markdown": "Reports the cases when you rewrite a loop variable with an inner loop.\n\n**Example:**\n\n\n for i in range(5):\n for i in range(20, 25):\n print(\"Inner\", i)\n print(\"Outer\", i)\n \nIt also warns you if a variable declared in the `with` statement is redeclared inside the statement body:\n\n\n with open(\"file\") as f:\n f.read()\n with open(\"file\") as f:\n \n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyAssignmentToLoopOrWithParameter", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PySuperArgumentsInspection", + "shortDescription": { + "text": "Wrong arguments to call super" + }, + "fullDescription": { + "text": "Reports cases when any call to 'super(A, B)' does not meet the following requirements: 'B' is an instance of 'A' 'B' a subclass of 'A' Example: 'class Figure:\n def color(self):\n pass\n\n\nclass Rectangle(Figure):\n def color(self):\n pass\n\n\nclass Square(Figure):\n def color(self):\n return super(Rectangle, self).color() # Square is not an instance or subclass of Rectangle' As a fix, you can make the 'Square' an instance of the 'Rectangle' class.", + "markdown": "Reports cases when any call to `super(A, B)` does not meet the\nfollowing requirements:\n\n* `B` is an instance of `A`\n* `B` a subclass of `A`\n\n**Example:**\n\n\n class Figure:\n def color(self):\n pass\n\n\n class Rectangle(Figure):\n def color(self):\n pass\n\n\n class Square(Figure):\n def color(self):\n return super(Rectangle, self).color() # Square is not an instance or subclass of Rectangle\n\nAs a fix, you can make the `Square` an instance of the `Rectangle` class." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PySuperArguments", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyNonAsciiCharInspection", + "shortDescription": { + "text": "File contains non-ASCII character" + }, + "fullDescription": { + "text": "Reports cases in Python 2 when a file contains non-ASCII characters and does not have an encoding declaration at the top. Example: 'class A(object):\n# №5\n def __init__(self):\n pass' In this example, the IDE reports a non-ASCII symbol in a comment and a lack of encoding declaration. Apply the proposed quick-fix to add a missing encoding declaration: '# coding=utf-8\nclass A(object)\n# №5\n def __init__(self):\n pass'", + "markdown": "Reports cases in Python 2 when a file contains non-ASCII characters and does not\nhave an encoding declaration at the top.\n\n**Example:**\n\n\n class A(object):\n # №5\n def __init__(self):\n pass\n\nIn this example, the IDE reports a non-ASCII symbol in a comment and a lack of encoding\ndeclaration. Apply the proposed quick-fix to add a missing encoding declaration:\n\n\n # coding=utf-8\n class A(object)\n # №5\n def __init__(self):\n pass\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyNonAsciiChar", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyAbstractClassInspection", + "shortDescription": { + "text": "Class must implement all abstract methods" + }, + "fullDescription": { + "text": "Reports cases when not all abstract properties or methods are defined in a subclass. Example: 'from abc import abstractmethod, ABC\n\n\nclass Figure(ABC):\n\n @abstractmethod\n def do_figure(self):\n pass\n\n\nclass Triangle(Figure):\n def do_triangle(self):\n pass' When the quick-fix is applied, the IDE implements an abstract method for the 'Triangle' class: 'from abc import abstractmethod, ABC\n\n\nclass Figure(ABC):\n\n @abstractmethod\n def do_figure(self):\n pass\n\n\nclass Triangle(Figure):\n def do_figure(self):\n pass\n\n def do_triangle(self):\n pass'", + "markdown": "Reports cases when not all abstract properties or methods are defined in\na subclass.\n\n**Example:**\n\n\n from abc import abstractmethod, ABC\n\n\n class Figure(ABC):\n\n @abstractmethod\n def do_figure(self):\n pass\n\n\n class Triangle(Figure):\n def do_triangle(self):\n pass\n\nWhen the quick-fix is applied, the IDE implements an abstract method for the `Triangle` class:\n\n\n from abc import abstractmethod, ABC\n\n\n class Figure(ABC):\n\n @abstractmethod\n def do_figure(self):\n pass\n\n\n class Triangle(Figure):\n def do_figure(self):\n pass\n\n def do_triangle(self):\n pass\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyAbstractClass", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyOldStyleClassesInspection", + "shortDescription": { + "text": "Old-style class contains new-style class features" + }, + "fullDescription": { + "text": "Reports occurrences of new-style class features in old-style classes. The inspection highlights '__slots__', '__getattribute__', and 'super()' inside old-style classes.", + "markdown": "Reports occurrences of\n[new-style class features](https://www.python.org/doc/newstyle/)\nin old-style classes. The inspection highlights\n`__slots__`, `__getattribute__`, and `super()`\ninside old-style classes." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyOldStyleClasses", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyBroadExceptionInspection", + "shortDescription": { + "text": "Unclear exception clauses" + }, + "fullDescription": { + "text": "Reports exception clauses that do not provide specific information about the problem. Example: Clauses that do not specify an exception class Clauses that are specified as 'Exception'", + "markdown": "Reports exception clauses that do not provide specific information\nabout the problem.\n\n**Example:**\n\n* Clauses that do not specify an exception class\n* Clauses that are specified as `Exception`" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyBroadException", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyTypeCheckerInspection", + "shortDescription": { + "text": "Incorrect type" + }, + "fullDescription": { + "text": "Reports type errors in function call expressions, targets, and return values. In a dynamically typed language, this is possible in a limited number of cases. Types of function parameters can be specified in docstrings or in Python 3 function annotations. Example: 'def foo() -> int:\n return \"abc\" # Expected int, got str\n\n\na: str\na = foo() # Expected str, got int' With the quick-fix, you can modify the problematic types: 'def foo() -> str:\n return \"abc\"\n\n\na: str\na = foo()'", + "markdown": "Reports type errors in function call expressions, targets, and return values. In a dynamically typed language, this is possible in a limited number of cases.\n\nTypes of function parameters can be specified in\ndocstrings or in Python 3 function annotations.\n\n**Example:**\n\n\n def foo() -> int:\n return \"abc\" # Expected int, got str\n\n\n a: str\n a = foo() # Expected str, got int\n\nWith the quick-fix, you can modify the problematic types:\n\n\n def foo() -> str:\n return \"abc\"\n\n\n a: str\n a = foo()\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyTypeChecker", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyByteLiteralInspection", + "shortDescription": { + "text": "A byte literal contains a non-ASCII character" + }, + "fullDescription": { + "text": "Reports characters in byte literals that are outside ASCII range. Example: 's = b'№5''", + "markdown": "Reports characters in byte literals that are outside ASCII range.\n\n**Example:**\n\n\n s = b'№5'\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyByteLiteral", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyAugmentAssignmentInspection", + "shortDescription": { + "text": "Assignment can be replaced with augmented assignment" + }, + "fullDescription": { + "text": "Reports assignments that can be replaced with augmented assignments. Example: 'a = 23\nb = 3\na = a + b' After the quick-fix is applied, the code changes to: 'a = 23\nb = 3\na += b'", + "markdown": "Reports assignments that can be replaced with augmented assignments.\n\n**Example:**\n\n\n a = 23\n b = 3\n a = a + b\n\nAfter the quick-fix is applied, the code changes to:\n\n\n a = 23\n b = 3\n a += b\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "PyAugmentAssignment", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyDeprecationInspection", + "shortDescription": { + "text": "Deprecated function, class, or module" + }, + "fullDescription": { + "text": "Reports usages of Python functions, or methods that are marked as deprecated and raise the 'DeprecationWarning' or 'PendingDeprecationWarning' warning. Also, this inspection highlights usages of 'abc.abstractstaticmethod', 'abc.abstractproperty', and 'abc.abstractclassmethod' decorators. Example: 'class Foo:\n @property\n def bar(self):\n import warnings\n warnings.warn(\"this is deprecated\", DeprecationWarning, 2)\n return 5\n\n\nfoo = Foo()\nprint(foo.bar)'", + "markdown": "Reports usages of Python functions, or methods that are marked as\ndeprecated and raise the `DeprecationWarning` or `PendingDeprecationWarning` warning.\n\nAlso, this inspection highlights usages of `abc.abstractstaticmethod`, `abc.abstractproperty`, and `abc.abstractclassmethod`\ndecorators.\n\n**Example:**\n\n\n class Foo:\n @property\n def bar(self):\n import warnings\n warnings.warn(\"this is deprecated\", DeprecationWarning, 2)\n return 5\n\n\n foo = Foo()\n print(foo.bar)\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyDeprecation", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyUnnecessaryBackslashInspection", + "shortDescription": { + "text": "Unnecessary backslash" + }, + "fullDescription": { + "text": "Reports backslashes in places where line continuation is implicit inside '()', '[]', and '{}'. Example: 'a = ('first', \\\n 'second', 'third')' When the quick-fix is applied, the redundant backslash is deleted.", + "markdown": "Reports backslashes in places where line continuation is implicit inside `()`,\n`[]`, and `{}`.\n\n**Example:**\n\n\n a = ('first', \\\n 'second', 'third')\n\nWhen the quick-fix is applied, the redundant backslash is deleted." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyUnnecessaryBackslash", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyShadowingNamesInspection", + "shortDescription": { + "text": "Shadowing names from outer scopes" + }, + "fullDescription": { + "text": "Reports shadowing names defined in outer scopes. Example: 'def outer(p):\n def inner(p):\n pass' As a quick-fix, the IDE offers to remove a parameter or rename it.", + "markdown": "Reports shadowing names defined in outer scopes.\n\n**Example:**\n\n\n def outer(p):\n def inner(p):\n pass\n\nAs a quick-fix, the IDE offers to remove a parameter or rename it." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyShadowingNames", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyFinalInspection", + "shortDescription": { + "text": "Invalid usages of final classes, methods, and variables" + }, + "fullDescription": { + "text": "Reports invalid usages of final classes, methods and variables. Example: 'from typing import final\n\n\n@final\nclass A:\n def a_method(self):\n pass\n\n\nclass B(A):\n def a_method(self):\n pass'", + "markdown": "Reports invalid usages of final classes,\nmethods and variables.\n\n**Example:**\n\n\n from typing import final\n\n\n @final\n class A:\n def a_method(self):\n pass\n\n\n class B(A):\n def a_method(self):\n pass\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyFinal", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PySingleQuotedDocstringInspection", + "shortDescription": { + "text": "Single quoted docstring" + }, + "fullDescription": { + "text": "Reports docstrings that do not adhere to the triple double-quoted string format. Example: 'def calc(self, balance=0):\n 'param: balance'\n self.balance = balance' When the quick-fix is applied, the code changes to: 'def calc(self, balance=0):\n \"\"\"param: balance\"\"\"\n self.balance = balance'", + "markdown": "Reports docstrings that do not adhere to the triple double-quoted string format.\n\n**Example:**\n\n\n def calc(self, balance=0):\n 'param: balance'\n self.balance = balance\n\nWhen the quick-fix is applied, the code changes to:\n\n\n def calc(self, balance=0):\n \"\"\"param: balance\"\"\"\n self.balance = balance\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PySingleQuotedDocstring", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyUnusedLocalInspection", + "shortDescription": { + "text": "Unused local symbols" + }, + "fullDescription": { + "text": "Reports local variables, parameters, and functions that are locally defined, but not used name in a function.", + "markdown": "Reports local variables, parameters, and functions that are locally defined, but not used name in a function." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyUnusedLocal", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyReturnFromInitInspection", + "shortDescription": { + "text": "__init__ method that returns a value" + }, + "fullDescription": { + "text": "Reports occurrences of 'return' statements with a return value inside '__init__' methods of classes. Example: 'class Sum:\n def __init__(self, a, b):\n self.a = a\n self.b = b\n self.sum = a + b\n return self.sum' A constructor should not return any value. The '__init__' method should only initialize the values of instance members for news objects. As a quick-fix, the IDE offers to remove the 'return' statement.", + "markdown": "Reports occurrences of `return` statements with a return value inside\n`__init__` methods of classes.\n\n**Example:**\n\n\n class Sum:\n def __init__(self, a, b):\n self.a = a\n self.b = b\n self.sum = a + b\n return self.sum\n\nA constructor should not return any value. The `__init__` method should\nonly initialize the values of instance members for news objects.\n\nAs a quick-fix, the IDE offers to remove the `return` statement." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyReturnFromInit", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyMissingOrEmptyDocstringInspection", + "shortDescription": { + "text": "Missing or empty docstring" + }, + "fullDescription": { + "text": "Reports missing and empty docstrings. Example of a missing docstring 'def demo(a):\n c = a ** 2' Example of an empty docstring 'def demo(a):\n \"\"\"\n \"\"\"\n c = a ** 2' When the quick-fix is applied, the code fragments change to: 'def demo(a):\n \"\"\"\n\n :param a:\n \"\"\"\n c = a ** 2' You need to provide some details about the parameter in the generated template.", + "markdown": "Reports missing and empty docstrings.\n\n**Example of a missing docstring**\n\n\n def demo(a):\n c = a ** 2\n\n**Example of an empty docstring**\n\n\n def demo(a):\n \"\"\"\n \"\"\"\n c = a ** 2\n\nWhen the quick-fix is applied, the code fragments change to:\n\n\n def demo(a):\n \"\"\"\n\n :param a:\n \"\"\"\n c = a ** 2\n\nYou need to provide some details about the parameter in the generated template." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "PyMissingOrEmptyDocstring", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyPep8NamingInspection", + "shortDescription": { + "text": "PEP 8 naming convention violation" + }, + "fullDescription": { + "text": "Reports violations of the PEP8 naming conventions. Example: 'class mammalia(object):\n extremities = 4\n\n def feeds(self):\n print(\"milk\")' In this code fragment, IDE offers to rename 'mammalia' to 'Mammalia'. When the quick-fix is applied, the code change to: 'class Mammalia(object):\n extremities = 4\n\n def feeds(self):\n print(\"milk\")'", + "markdown": "Reports violations of the\n[PEP8](https://www.python.org/dev/peps/pep-0008/) naming conventions.\n\n**Example:**\n\n\n class mammalia(object):\n extremities = 4\n\n def feeds(self):\n print(\"milk\")\n\nIn this code fragment, IDE offers to rename `mammalia` to `Mammalia`.\nWhen the quick-fix is applied, the code change to:\n\n\n class Mammalia(object):\n extremities = 4\n\n def feeds(self):\n print(\"milk\")\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyPep8Naming", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyDictDuplicateKeysInspection", + "shortDescription": { + "text": "Dictionary contains duplicate keys" + }, + "fullDescription": { + "text": "Reports using the same value as the dictionary key twice. Example: 'dic = {\"a\": [1, 2], \"a\": [3, 4]}'", + "markdown": "Reports using the same value as the dictionary key twice.\n\n**Example:**\n\n\n dic = {\"a\": [1, 2], \"a\": [3, 4]}\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyDictDuplicateKeys", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyNoneFunctionAssignmentInspection", + "shortDescription": { + "text": "Assigning function calls that don't return anything" + }, + "fullDescription": { + "text": "Reports cases when an assignment is done on a function that does not return anything. This inspection is similar to pylint inspection E1111. Example: 'def just_print():\n print(\"Hello!\")\n\n\naction = just_print()' As a quick-fix, the IDE offers to remove the assignment.", + "markdown": "Reports cases when an assignment is done on a function that does not return anything.\nThis inspection is similar to [pylint inspection E1111](https://docs.pylint.org/en/1.6.0/features.html#id6).\n\n**Example:**\n\n\n def just_print():\n print(\"Hello!\")\n\n\n action = just_print()\n\nAs a quick-fix, the IDE offers to remove the assignment." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyNoneFunctionAssignment", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyStatementEffectInspection", + "shortDescription": { + "text": "Statement has no effect" + }, + "fullDescription": { + "text": "Reports statements that have no effect. Example: 'class Car:\n def __init__(self, speed=0):\n self.speed = speed\n self.time # has no effect\n\n2 + 3 # has no effect' In this example, you can either add a field 'time' to the 'Car' class or introduce variables for the problematic statements.", + "markdown": "Reports statements that have no effect.\n\n**Example:**\n\n\n class Car:\n def __init__(self, speed=0):\n self.speed = speed\n self.time # has no effect\n\n 2 + 3 # has no effect\n\nIn this example, you can either add a field `time` to the `Car` class or\nintroduce variables for the problematic statements." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyStatementEffect", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyMandatoryEncodingInspection", + "shortDescription": { + "text": "No encoding specified for file" + }, + "fullDescription": { + "text": "Reports a missing encoding comment in Python 2. Example: 'class Book(object):\n def __init__(self):\n pass' When the quick-fix is applied, the missing comment is added: '# coding=utf-8\nclass Book(object):\n def __init__(self):\n pass'", + "markdown": "Reports a missing encoding comment in Python 2.\n\n**Example:**\n\n\n class Book(object):\n def __init__(self):\n pass\n\nWhen the quick-fix is applied, the missing comment is added:\n\n\n # coding=utf-8\n class Book(object):\n def __init__(self):\n pass\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PyMandatoryEncoding", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyInconsistentIndentationInspection", + "shortDescription": { + "text": "Inconsistent indentation" + }, + "fullDescription": { + "text": "Reports inconsistent indentation in Python source files when, for example, you use a mixture of tabs and spaces in your code.", + "markdown": "Reports inconsistent indentation in Python source files when, for example,\nyou use a mixture of tabs and spaces in your code." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyInconsistentIndentation", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyAttributeOutsideInitInspection", + "shortDescription": { + "text": "An instance attribute is defined outside `__init__`" + }, + "fullDescription": { + "text": "Reports a problem when instance attribute definition is outside '__init__' method. Example: 'class Book:\n def __init__(self):\n self.author = 'Mark Twain'\n\n def release(self):\n self.year = '1889'' When the quick-fix is applied, the code sample changes to: 'class Book:\n def __init__(self):\n self.year = '1889'\n self.author = 'Mark Twain'\n\n def release(self):\n pass'", + "markdown": "Reports a problem when instance attribute definition is outside `__init__` method.\n\n**Example:**\n\n\n class Book:\n def __init__(self):\n self.author = 'Mark Twain'\n\n def release(self):\n self.year = '1889'\n\n\nWhen the quick-fix is applied, the code sample changes to:\n\n\n class Book:\n def __init__(self):\n self.year = '1889'\n self.author = 'Mark Twain'\n\n def release(self):\n pass\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyAttributeOutsideInit", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyTypedDictInspection", + "shortDescription": { + "text": "Invalid TypedDict definition and usages" + }, + "fullDescription": { + "text": "Reports invalid definition and usage of TypedDict. Example: 'from typing import TypedDict\n\n\nclass Movie(TypedDict):\n name: str\n year: int\n rate: int = 10 # Right-hand side values are not supported\n\n def method(self): # Invalid statement in TypedDict\n pass\n\n\nm = Movie(name=\"name\", year=1000, rate=9)\nprint(m[\"director\"]) # There is no the 'director' key in 'Movie'\ndel m[\"name\"] # The 'name' key cannot be deleted\nm[\"year\"] = \"1001\" # Expected 'int', got 'str''", + "markdown": "Reports invalid definition and usage of\n[TypedDict](https://www.python.org/dev/peps/pep-0589/).\n\n**Example:**\n\n\n from typing import TypedDict\n\n\n class Movie(TypedDict):\n name: str\n year: int\n rate: int = 10 # Right-hand side values are not supported\n\n def method(self): # Invalid statement in TypedDict\n pass\n\n\n m = Movie(name=\"name\", year=1000, rate=9)\n print(m[\"director\"]) # There is no the 'director' key in 'Movie'\n del m[\"name\"] # The 'name' key cannot be deleted\n m[\"year\"] = \"1001\" # Expected 'int', got 'str'\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyTypedDict", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyPep8Inspection", + "shortDescription": { + "text": "PEP 8 coding style violation" + }, + "fullDescription": { + "text": "Reports violations of the PEP 8 coding style guide by running the bundled pycodestyle.py tool.", + "markdown": "Reports violations of the [PEP 8 coding style guide](https://www.python.org/dev/peps/pep-0008/) by running the bundled [pycodestyle.py](https://github.com/PyCQA/pycodestyle) tool." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyPep8", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyMissingTypeHintsInspection", + "shortDescription": { + "text": "Missing type hinting for function definition" + }, + "fullDescription": { + "text": "Reports missing type hints for function declaration in one of the two formats: parameter annotations or a type comment. Select the Only when types are known checkbox if you want the inspection check the types collected from runtime or inferred.", + "markdown": "Reports missing type hints for function declaration in\none of the two formats: parameter annotations or a type comment.\n\nSelect the **Only when types are known** checkbox if you want the inspection check\nthe types collected from runtime or inferred." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "PyMissingTypeHints", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyTupleItemAssignmentInspection", + "shortDescription": { + "text": "Tuple item assignment is prohibited" + }, + "fullDescription": { + "text": "Reports assignments to a tuple item. Example: 't = ('red', 'blue', 'green', 'white')\nt[3] = 'black'' A quick-fix offers to replace the tuple with a list.", + "markdown": "Reports assignments to a tuple item.\n\n**Example:**\n\n\n t = ('red', 'blue', 'green', 'white')\n t[3] = 'black'\n\nA quick-fix offers to replace the tuple with a list." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyTupleItemAssignment", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyDunderSlotsInspection", + "shortDescription": { + "text": "Invalid usages of classes with '__slots__' definitions" + }, + "fullDescription": { + "text": "Reports invalid usages of a class with '__slots__' definitions. Example: 'class Foo:\n __slots__ = ['foo', 'bar']\n\n\nfoo = Foo()\nfoo.baz = 'spam''", + "markdown": "Reports invalid usages of a class with `__slots__` definitions.\n\n**Example:**\n\n\n class Foo:\n __slots__ = ['foo', 'bar']\n\n\n foo = Foo()\n foo.baz = 'spam'\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyDunderSlots", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyDefaultArgumentInspection", + "shortDescription": { + "text": "The default argument is mutable" + }, + "fullDescription": { + "text": "Reports a problem when a mutable value as a list or dictionary is detected in a default value for an argument. Default argument values are evaluated only once at function definition time, which means that modifying the default value of the argument will affect all subsequent calls of that function. Example: 'def func(s, cache={}):\n cache[s] = None' When the quick-fix is applied, the code changes to: 'def func(s, cache=None):\n if cache is None:\n cache = {}\n cache[s] = None'", + "markdown": "Reports a problem when a mutable value as a list or dictionary is detected in a default value for\nan argument. \n\nDefault argument values are evaluated only once at function definition time,\nwhich means that modifying the\ndefault value of the argument will affect all subsequent calls of that function.\n\n**Example:**\n\n\n def func(s, cache={}):\n cache[s] = None\n\nWhen the quick-fix is applied, the code changes to:\n\n\n def func(s, cache=None):\n if cache is None:\n cache = {}\n cache[s] = None\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyDefaultArgument", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyTestUnpassedFixtureInspection", + "shortDescription": { + "text": "Fixture is not requested by test functions" + }, + "fullDescription": { + "text": "Reports if a fixture is used without being passed to test function parameters or to '@pytest.mark.usefixtures' decorator", + "markdown": "Reports if a fixture is used without being passed to test function parameters or to `@pytest.mark.usefixtures` decorator" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyTestUnpassedFixture", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyShadowingBuiltinsInspection", + "shortDescription": { + "text": "Shadowing built-in names" + }, + "fullDescription": { + "text": "Reports shadowing built-in names, such as 'len' or 'list'. Example: 'def len(a, b, c):\n d = a + b + c\n return d' In this code fragment, the 'len' built-in name is used. The IDE offers to apply the Rename refactoring as a fix.", + "markdown": "Reports shadowing built-in names, such as `len` or `list`.\n\n**Example:**\n\n\n def len(a, b, c):\n d = a + b + c\n return d\n\nIn this code fragment, the `len` built-in name is used. The IDE offers to\napply the Rename refactoring as a fix." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyShadowingBuiltins", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyMethodOverridingInspection", + "shortDescription": { + "text": "Method signature does not match signature of overridden method" + }, + "fullDescription": { + "text": "Reports inconsistencies in overriding method signatures. Example: 'class Book:\n def add_title(self):\n pass\n\n\nclass Novel(Book):\n def add_title(self, text):\n pass' Parameters of the 'add_title' method in the 'Novel' class do not match the method signature specified in the 'Book' class. As a fix, the IDE offers to apply the Change Signature refactoring.", + "markdown": "Reports inconsistencies in overriding method signatures.\n\n**Example:**\n\n\n class Book:\n def add_title(self):\n pass\n\n\n class Novel(Book):\n def add_title(self, text):\n pass\n\nParameters of the `add_title` method in the `Novel` class do not match the method\nsignature specified in the `Book` class. As a fix, the IDE offers to apply the Change Signature\nrefactoring." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyMethodOverriding", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PoetryPackageVersionsInspection", + "shortDescription": { + "text": "Poetry package versions" + }, + "fullDescription": { + "text": "Reports outdated versions of packages in '[tool.poetry.dependencies]' and '[tool.poetry.dev-dependencies]' sections of 'pyproject.toml'.", + "markdown": "Reports outdated versions of packages in `[tool.poetry.dependencies]` and `[tool.poetry.dev-dependencies]`\nsections of `pyproject.toml`." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PoetryPackageVersions", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyTestParametrizedInspection", + "shortDescription": { + "text": "Incorrect arguments in @pytest.mark.parametrize" + }, + "fullDescription": { + "text": "Reports functions that are decorated with @pytest.mark.parametrize but do not have arguments to accept parameters of the decorator.", + "markdown": "Reports functions that are decorated with [@pytest.mark.parametrize](https://docs.pytest.org/en/stable/parametrize.html) but do not have arguments to accept\nparameters of the decorator." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyTestParametrized", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyDecoratorInspection", + "shortDescription": { + "text": "Class-specific decorator is used outside the class" + }, + "fullDescription": { + "text": "Reports usages of '@classmethod' or '@staticmethod' decorators in methods outside a class. Example: 'class State(object):\n\n @classmethod\n def my_state(cls, name):\n cls.name = name\n\n\n@classmethod\ndef change_state(self):\n pass' The 'change_state' method should not use the '@classmethod' decorator or it should be moved to the 'State' class declaration. If you apply the 'Remove decorator' action, the code changes to: 'class State(object):\n\n @classmethod\n def my_state(cls, name):\n cls.name = name\n\n\ndef change_state(self):\n pass'", + "markdown": "Reports usages of `@classmethod` or `@staticmethod` decorators\nin methods outside a class.\n\n**Example:**\n\n\n class State(object):\n\n @classmethod\n def my_state(cls, name):\n cls.name = name\n\n\n @classmethod\n def change_state(self):\n pass\n\nThe `change_state` method should not use the `@classmethod` decorator or it should be\nmoved to the `State` class declaration.\n\nIf you apply the `Remove decorator` action, the code changes to:\n\n\n class State(object):\n\n @classmethod\n def my_state(cls, name):\n cls.name = name\n\n\n def change_state(self):\n pass\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyDecorator", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyAsyncCallInspection", + "shortDescription": { + "text": "Missing `await` syntax in coroutine calls" + }, + "fullDescription": { + "text": "Reports coroutines that were called without using the 'await' syntax. Example: 'async def bar():\n pass\n\n\nasync def foo():\n bar()' After the quick-fix is applied, the code changes to: 'async def bar():\n pass\n\n\nasync def foo():\n await bar()'", + "markdown": "Reports coroutines that were called\nwithout using the `await` syntax.\n\n**Example:**\n\n\n async def bar():\n pass\n\n\n async def foo():\n bar()\n\nAfter the quick-fix is applied, the code changes to:\n\n\n async def bar():\n pass\n\n\n async def foo():\n await bar()\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyAsyncCall", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RestRoleInspection", + "shortDescription": { + "text": "Role is not defined" + }, + "fullDescription": { + "text": "Reports undefined roles in reStructuredText files. Example: '.. role:: custom\n.. role:: newcustom(emphasis)\n\nAn example of using :custom:`interpreted text`\nAn example of using :newcustom:`interpreted text`\nAn example of using :emphasis:`interpreted text`\n\n\nSome text using undefined role :undef:`interpreted text`'", + "markdown": "Reports undefined roles in reStructuredText files.\n\n**Example:**\n\n\n .. role:: custom\n .. role:: newcustom(emphasis)\n\n An example of using :custom:`interpreted text`\n An example of using :newcustom:`interpreted text`\n An example of using :emphasis:`interpreted text`\n\n\n Some text using undefined role :undef:`interpreted text`\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "RestRoleInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "ReST", + "index": 74, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CommandLineInspection", + "shortDescription": { + "text": "Incorrect CLI syntax" + }, + "fullDescription": { + "text": "Reports the problems if the arguments of the command you type in the console are not in the proper order. The inspection also verifies that option names and arguments are correct. Do not disable the inspection if you are going to use command-line interfaces like manage.py in Django.", + "markdown": "Reports the problems if the arguments of the command you type in the console are not in the proper order. The inspection also verifies\nthat option names and arguments are correct.\n\nDo not disable the inspection if you are going to use command-line interfaces like [manage.py in Django](https://www.jetbrains.com/help/pycharm/running-manage-py.html)." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "CommandLineInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyComparisonWithNoneInspection", + "shortDescription": { + "text": "Using equality operators to compare with None" + }, + "fullDescription": { + "text": "Reports comparisons with 'None'. That type of comparisons should always be done with 'is' or 'is not', never the equality operators. Example: 'a = 2\n\n\nif a == None:\n print(\"Success\")' Once the quick-fix is applied, the code changes to: 'a = 2\n\n\nif a is None:\n print(\"Success\")'", + "markdown": "Reports comparisons with `None`. That type of comparisons\nshould always be done with `is` or `is not`, never\nthe equality operators.\n\n**Example:**\n\n\n a = 2\n\n\n if a == None:\n print(\"Success\")\n\nOnce the quick-fix is applied, the code changes to:\n\n\n a = 2\n\n\n if a is None:\n print(\"Success\")\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyComparisonWithNone", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyMethodParametersInspection", + "shortDescription": { + "text": "Improper first parameter" + }, + "fullDescription": { + "text": "Reports methods that lack the first parameter that is usually named 'self'. Example: 'class Movie:\n\n def show():\n pass' When the quick-fix is applied, the code changes to: 'class Movie:\n\n def show(self):\n pass' The inspection also reports naming issues in class methods. Example: 'class Movie:\n @classmethod\n def show(abc):\n pass' Since the first parameter of a class method should be 'cls', the IDE provides a quick-fix to rename it.", + "markdown": "Reports methods that lack the first parameter that is usually\nnamed `self`.\n\n**Example:**\n\n\n class Movie:\n\n def show():\n pass\n\nWhen the quick-fix is applied, the code changes to:\n\n\n class Movie:\n\n def show(self):\n pass\n\nThe inspection also reports naming issues in class methods.\n\n**Example:**\n\n\n class Movie:\n @classmethod\n def show(abc):\n pass\n\nSince the first parameter of a class method should be `cls`, the IDE provides a quick-fix\nto rename it." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyMethodParameters", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyDocstringTypesInspection", + "shortDescription": { + "text": "Type in docstring does not match inferred type" + }, + "fullDescription": { + "text": "Reports types in docstring that do not match dynamically inferred types.", + "markdown": "Reports types in docstring that do not match dynamically inferred types." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyDocstringTypes", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyMethodFirstArgAssignmentInspection", + "shortDescription": { + "text": "First argument of the method is reassigned" + }, + "fullDescription": { + "text": "Reports cases when the first parameter, such as 'self' or 'cls', is reassigned in a method. Because in most cases, there are no objectives in such reassignment, the IDE indicates an error. Example: 'class Account:\n def calc(self, balance):\n if balance == 0:\n self = balance\n return self' As a fix, you might want to check and modify the algorithm to ensure that reassignment is needed. If everything is correct, you can invoke intention actions for this code and opt to ignore the warning.", + "markdown": "Reports cases when the first parameter,\nsuch as `self` or `cls`, is reassigned in a method.\nBecause in most cases, there are no objectives in such reassignment, the\nIDE indicates an error.\n\n**Example:**\n\n\n class Account:\n def calc(self, balance):\n if balance == 0:\n self = balance\n return self\n\nAs a fix, you might want to check and modify the algorithm to ensure that reassignment is needed. If everything is correct,\nyou can invoke intention actions for this code and opt to ignore the warning." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyMethodFirstArgAssignment", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyNewStyleGenericSyntaxInspection", + "shortDescription": { + "text": "Invalid usage of new-style type parameters and type aliases" + }, + "fullDescription": { + "text": "Reports invalid usage of PEP 695 type parameter syntax Finds the following problems in function and class definitions and new-style type alias statements: Extending typing.Generic in new-style generic classes Extending parameterized typing.Protocol in new-style generic classes Using generic upper bounds and constraints with type parameters for ParamSpec and TypeVarTuple Mixing traditional and new-style type variables Using traditional type variables in new-style type aliases Examples: 'from typing import Generic\n\n class Example[T](Generic[T]): ... # Classes with type parameter list should not extend 'Generic'' 'class Example[T: (list[S], str)]: ... # Generic types are not allowed inside constraints and bounds of type parameters' 'from typing import TypeVar\n\n K = TypeVar(\"K\")\n\n class ClassC[V]:\n def method2[M](self, a: M, b: K) -> M | K: ... # Mixing traditional and new-style TypeVars is not allowed'", + "markdown": "Reports invalid usage of [PEP 695](https://www.python.org/dev/peps/pep-0695/) type parameter syntax\n\n\nFinds the following problems in function and class definitions and new-style type alias statements:\n\n* Extending typing.Generic in new-style generic classes\n* Extending parameterized typing.Protocol in new-style generic classes\n* Using generic upper bounds and constraints with type parameters for ParamSpec and TypeVarTuple\n* Mixing traditional and new-style type variables\n* Using traditional type variables in new-style type aliases\n\n\nExamples:\n\n\n from typing import Generic\n\n class Example[T](Generic[T]): ... # Classes with type parameter list should not extend 'Generic'\n\n\n class Example[T: (list[S], str)]: ... # Generic types are not allowed inside constraints and bounds of type parameters\n\n\n from typing import TypeVar\n\n K = TypeVar(\"K\")\n\n class ClassC[V]:\n def method2[M](self, a: M, b: K) -> M | K: ... # Mixing traditional and new-style TypeVars is not allowed\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyNewStyleGenericSyntax", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyTupleAssignmentBalanceInspection", + "shortDescription": { + "text": "Tuple assignment balance is incorrect" + }, + "fullDescription": { + "text": "Reports cases when the number of expressions on the right-hand side and targets on the left-hand side are not the same. Example: 't = ('red', 'blue', 'green', 'white')\n(c1, c2, c3) = t' As a quick-fix, you can modify the highlighted code fragment to restore the tuple balance.", + "markdown": "Reports cases when the number of expressions on the right-hand side\nand targets on the left-hand side are not the same.\n\n**Example:**\n\n\n t = ('red', 'blue', 'green', 'white')\n (c1, c2, c3) = t\n\nAs a quick-fix, you can modify the highlighted code fragment to restore the tuple\nbalance." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyTupleAssignmentBalance", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyClassHasNoInitInspection", + "shortDescription": { + "text": "Class has no `__init__` method" + }, + "fullDescription": { + "text": "Reports cases in Python 2 when a class has no '__init__' method, neither its parent classes. Example: 'class Book():\n pass' The quick-fix adds the '__init__' method: 'class Book():\n def __init__(self):\n pass'", + "markdown": "Reports cases in Python 2 when a class has no `__init__` method, neither its parent\nclasses.\n\n**Example:**\n\n\n class Book():\n pass\n\nThe quick-fix adds the `__init__` method:\n\n\n class Book():\n def __init__(self):\n pass\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyClassHasNoInit", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyArgumentEqualDefaultInspection", + "shortDescription": { + "text": "The function argument is equal to the default parameter value" + }, + "fullDescription": { + "text": "Reports a problem when an argument passed to the function is equal to the default parameter value. This inspection is disabled by default to avoid performance degradation. Example: 'def my_function(a: int = 2):\n print(a)\n\n\nmy_function(2)'", + "markdown": "Reports a problem when an argument\npassed to the function is equal to the default parameter value.\n\nThis inspection is disabled by default to avoid performance degradation.\n\n**Example:**\n\n\n def my_function(a: int = 2):\n print(a)\n\n\n my_function(2)\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "PyArgumentEqualDefault", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyClassVarInspection", + "shortDescription": { + "text": "Invalid usage of ClassVar variables" + }, + "fullDescription": { + "text": "Reports invalid usages of ClassVar annotations. Example: 'from typing import ClassVar\n\n\nclass Cat:\n color: ClassVar[str] = \"white\"\n weight: int\n\n def __init__(self, weight: int):\n self.weight = weight\n\n\nCat.color = \"black\" # OK\nmy_cat = Cat(5)\nmy_cat.color = \"gray\" # Error, setting class variable on instance'", + "markdown": "Reports invalid usages of [ClassVar](https://docs.python.org/3/library/typing.html#typing.ClassVar) annotations.\n\n**Example:**\n\n\n from typing import ClassVar\n\n\n class Cat:\n color: ClassVar[str] = \"white\"\n weight: int\n\n def __init__(self, weight: int):\n self.weight = weight\n\n\n Cat.color = \"black\" # OK\n my_cat = Cat(5)\n my_cat.color = \"gray\" # Error, setting class variable on instance\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyClassVar", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyFromFutureImportInspection", + "shortDescription": { + "text": "Improper position of from __future__ import" + }, + "fullDescription": { + "text": "Reports 'from __future__ import' statements that are used not at the beginning of a file. Example: 'a = 1\nfrom __future__ import print_function\nprint()' When the quick-fix is applied, the code changes to: 'from __future__ import print_function\n\na = 1\nprint()'", + "markdown": "Reports `from __future__ import`\nstatements that are used not at\nthe beginning of a file.\n\n**Example:**\n\n\n a = 1\n from __future__ import print_function\n print()\n\nWhen the quick-fix is applied, the code changes to:\n\n\n from __future__ import print_function\n\n a = 1\n print()\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyFromFutureImport", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyUnresolvedReferencesInspection", + "shortDescription": { + "text": "Unresolved references" + }, + "fullDescription": { + "text": "Reports references in your code that cannot be resolved. In a dynamically typed language, this is possible in a limited number of cases. If a reference type is unknown, then its attributes are not highlighted as unresolved even if you know that they should be: 'def print_string(s):\n print(s.abc())' In this code fragment 's' is always a string and 'abc' should be highlighted as unresolved. However, 's' type is inferred as 'Any' and no warning is reported. The IDE provides quick-fix actions to add missing references on-the-fly.", + "markdown": "Reports references in your code that cannot be resolved.\n\nIn a dynamically typed language, this is possible in a limited number of cases.\n\nIf a reference type is unknown, then its attributes are not highlighted as unresolved even if you know that they should be:\n\n\n def print_string(s):\n print(s.abc())\n\nIn this code fragment `s` is always a string and `abc` should be highlighted as unresolved. However, `s`\ntype is inferred as `Any` and no warning is reported.\n\nThe IDE provides quick-fix actions to add missing references on-the-fly." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PyUnresolvedReferences", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyPackageRequirementsInspection", + "shortDescription": { + "text": "Unsatisfied package requirements" + }, + "fullDescription": { + "text": "Reports packages mentioned in requirements files (for example, 'requirements.txt' or 'Pipfile') but not installed, or imported but not mentioned in requirements files. The IDE shows a quick-fix banner so that you can install the missing packages in one click.", + "markdown": "Reports packages mentioned in requirements files (for example, `requirements.txt` or `Pipfile`) but not installed,\nor imported but not mentioned in requirements files.\n\n\nThe IDE shows a quick-fix banner so that you can install the missing packages in one click." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyPackageRequirements", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyTrailingSemicolonInspection", + "shortDescription": { + "text": "Prohibited trailing semicolon in a statement" + }, + "fullDescription": { + "text": "Reports trailing semicolons in statements. Example: 'def my_func(a):\n c = a ** 2;\n return c' IDE provides a quick-fix that removes a trailing semicolon. When you apply it, the code changes to: 'def my_func(a):\n c = a ** 2\n return c'", + "markdown": "Reports trailing semicolons in statements.\n\n**Example:**\n\n\n def my_func(a):\n c = a ** 2;\n return c\n\nIDE provides a quick-fix that removes a trailing semicolon. When you\napply it, the code changes to:\n\n\n def my_func(a):\n c = a ** 2\n return c\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyTrailingSemicolon", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyRedundantParenthesesInspection", + "shortDescription": { + "text": "Redundant parentheses" + }, + "fullDescription": { + "text": "Reports about redundant parentheses in expressions. The IDE provides the quick-fix action to remove the redundant parentheses.", + "markdown": "Reports about redundant parentheses in expressions.\n\nThe IDE provides the quick-fix action to remove the redundant parentheses." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyRedundantParentheses", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyArgumentListInspection", + "shortDescription": { + "text": "Incorrect call arguments" + }, + "fullDescription": { + "text": "Reports discrepancies between declared parameters and actual arguments, as well as incorrect arguments, for example, duplicate named arguments, and incorrect argument order. Example: 'class Foo:\n def __call__(self, p1: int, *, p2: str = \"%\"):\n return p2 * p1\n\n\nbar = Foo()\nbar.__call__() # unfilled parameter\nbar(5, \"#\") # unexpected argument' The correct code fragment looks at follows: 'class Foo:\n def __call__(self, p1: int, *, p2: str = \"%\"):\n return p2 * p1\n\n\nbar = Foo()\nbar.__call__(5)\nbar(5, p2=\"#\")'", + "markdown": "Reports discrepancies between declared parameters and actual arguments, as well as\nincorrect arguments, for example, duplicate named arguments, and incorrect argument order.\n\n**Example:**\n\n\n class Foo:\n def __call__(self, p1: int, *, p2: str = \"%\"):\n return p2 * p1\n\n\n bar = Foo()\n bar.__call__() # unfilled parameter\n bar(5, \"#\") # unexpected argument\n\nThe correct code fragment looks at follows:\n\n\n class Foo:\n def __call__(self, p1: int, *, p2: str = \"%\"):\n return p2 * p1\n\n\n bar = Foo()\n bar.__call__(5)\n bar(5, p2=\"#\")\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyArgumentList", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyInterpreterInspection", + "shortDescription": { + "text": "An invalid interpreter" + }, + "fullDescription": { + "text": "Reports problems if there is no Python interpreter configured for the project or if the interpreter is invalid. Without a properly configured interpreter, you cannot execute your Python scripts and benefit from some Python code insight features. The IDE provides quick access to the interpreter settings.", + "markdown": "Reports problems if there is no Python interpreter configured for the project or if the interpreter is invalid. Without a properly\nconfigured interpreter, you cannot execute your Python scripts and benefit from some Python code insight features.\n\nThe IDE provides quick access to the interpreter settings." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PyInterpreter", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyPropertyAccessInspection", + "shortDescription": { + "text": "Inappropriate access to properties" + }, + "fullDescription": { + "text": "Reports cases when properties are accessed inappropriately: Read-only properties are set Write-only properties are read Non-deletable properties are deleted Example: 'class MyClass:\n @property\n def read_only(self): return None\n\n def __write_only_setter(self, value): pass\n\n write_only = property(None, __write_only_setter)\n\n\na = MyClass()\na.read_only = 10 # property cannot be set\ndel a.read_only # property cannot be deleted\nprint(a.write_only) # property cannot be read'", + "markdown": "Reports cases when properties are accessed inappropriately:\n\n* Read-only properties are set\n* Write-only properties are read\n* Non-deletable properties are deleted\n\n**Example:**\n\n\n class MyClass:\n @property\n def read_only(self): return None\n\n def __write_only_setter(self, value): pass\n\n write_only = property(None, __write_only_setter)\n\n\n a = MyClass()\n a.read_only = 10 # property cannot be set\n del a.read_only # property cannot be deleted\n print(a.write_only) # property cannot be read\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyPropertyAccess", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyStubPackagesAdvertiser", + "shortDescription": { + "text": "Stub packages advertiser" + }, + "fullDescription": { + "text": "Reports availability of stub packages. Stub package is a package that contains type information for the corresponding runtime package. Using stub packages ensures better coding assistance for the corresponding python package.", + "markdown": "Reports availability of stub packages.\n\n\n[Stub package](https://www.python.org/dev/peps/pep-0561/) is a package that contains type information for the corresponding\nruntime package.\n\nUsing stub packages ensures better coding assistance for the corresponding python package." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyStubPackagesAdvertiser", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyRelativeImportInspection", + "shortDescription": { + "text": "Suspicious relative imports" + }, + "fullDescription": { + "text": "Reports usages of relative imports inside plain directories, for example, directories neither containing '__init__.py' nor explicitly marked as namespace packages.", + "markdown": "Reports usages of relative imports inside plain directories, for example, directories neither containing `__init__.py` nor\nexplicitly marked as namespace packages." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyPackages", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyRedeclarationInspection", + "shortDescription": { + "text": "Redeclared names without usages" + }, + "fullDescription": { + "text": "Reports unconditional redeclarations of names without being used in between. Example: 'def x(): pass\n\n\nx = 2' It applies to function and class declarations, and top-level assignments. When the warning is shown, you can try a recommended action, for example, you might be prompted to rename the variable.", + "markdown": "Reports unconditional redeclarations of names without being used in between.\n\n**Example:**\n\n\n def x(): pass\n\n\n x = 2\n\nIt applies to function and class declarations, and top-level assignments.\n\nWhen the warning is shown, you can try a recommended action, for example, you might be prompted to\nrename the variable." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyRedeclaration", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyProtectedMemberInspection", + "shortDescription": { + "text": "Accessing a protected member of a class or a module" + }, + "fullDescription": { + "text": "Reports cases when a protected member is accessed outside the class, a descendant of the class where it is defined, or a module. Example: 'class Foo:\n def _protected_method(self):\n pass\n\n\nclass Bar(Foo):\n def public_method(self):\n self._protected_method()\n\n\nfoo = Foo()\nfoo._protected_method() # Access to a protected method'", + "markdown": "Reports cases when a protected member is accessed outside the class,\na descendant of the class where it is defined, or a module.\n\n**Example:**\n\n\n class Foo:\n def _protected_method(self):\n pass\n\n\n class Bar(Foo):\n def public_method(self):\n self._protected_method()\n\n\n foo = Foo()\n foo._protected_method() # Access to a protected method\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyProtectedMember", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyStubPackagesCompatibilityInspection", + "shortDescription": { + "text": "Incompatible stub packages" + }, + "fullDescription": { + "text": "Reports stub packages that do not support the version of the corresponding runtime package. A stub package contains type information for some runtime package.", + "markdown": "Reports stub packages that do not support the version of the corresponding runtime package.\n\nA [stub package](https://www.python.org/dev/peps/pep-0561/) contains type information for some runtime package." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyStubPackagesCompatibility", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyUnboundLocalVariableInspection", + "shortDescription": { + "text": "Unbound local variables" + }, + "fullDescription": { + "text": "Reports local variables referenced before assignment. Example: 'x = 0\nif x > 10:\n b = 3\nprint(b)' The IDE reports a problem for 'print(b)'. A possible fix is: 'x = 0\nif x > 10:\n b = 3\n print(b)'", + "markdown": "Reports local variables referenced before assignment.\n\n**Example:**\n\n\n x = 0\n if x > 10:\n b = 3\n print(b)\n\nThe IDE reports a problem for `print(b)`. A possible fix is:\n\n\n x = 0\n if x > 10:\n b = 3\n print(b)\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyUnboundLocalVariable", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyNamedTupleInspection", + "shortDescription": { + "text": "Invalid definition of 'typing.NamedTuple'" + }, + "fullDescription": { + "text": "Reports invalid definition of a typing.NamedTuple. Example: 'import typing\n\n\nclass FullName(typing.NamedTuple):\n first: str\n last: str = \"\"\n middle: str' As a fix, place the field with the default value after the fields without default values: 'import typing\n\n\nclass FullName(typing.NamedTuple):\n first: str\n middle: str\n last: str = \"\"'", + "markdown": "Reports invalid definition of a\n[typing.NamedTuple](https://docs.python.org/3/library/typing.html#typing.NamedTuple).\n\n**Example:**\n\n\n import typing\n\n\n class FullName(typing.NamedTuple):\n first: str\n last: str = \"\"\n middle: str\n\nAs a fix, place the field with the default value after the fields without default values:\n\n\n import typing\n\n\n class FullName(typing.NamedTuple):\n first: str\n middle: str\n last: str = \"\"\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyNamedTuple", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyNestedDecoratorsInspection", + "shortDescription": { + "text": "Problematic nesting of decorators" + }, + "fullDescription": { + "text": "Reports problems with nesting decorators. The inspection highlights the cases when 'classmethod' or 'staticmethod' is applied before another decorator. Example: 'def innocent(f):\n return f\n\n\nclass A:\n @innocent # Decorator will not receive a callable it may expect\n @classmethod\n def f2(cls):\n pass\n\n @innocent # Decorator will not receive a callable it may expect\n @staticmethod\n def f1():\n pass' As a quick-fix, the IDE offers to remove the decorator.", + "markdown": "Reports problems with nesting decorators. The inspection highlights the cases when `classmethod` or `staticmethod`\nis applied before another decorator.\n\n**Example:**\n\n\n def innocent(f):\n return f\n\n\n class A:\n @innocent # Decorator will not receive a callable it may expect\n @classmethod\n def f2(cls):\n pass\n\n @innocent # Decorator will not receive a callable it may expect\n @staticmethod\n def f1():\n pass\n\nAs a quick-fix, the IDE offers to remove the decorator." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyNestedDecorators", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyOverloadsInspection", + "shortDescription": { + "text": "Overloads in regular Python files" + }, + "fullDescription": { + "text": "Reports cases when overloads in regular Python files are placed after the implementation or when their signatures are not compatible with the implementation. Example: 'from typing import overload\n\n\n@overload\ndef foo(p1, p2): # Overload signature is not compatible with the implementation\n pass\n\n\n@overload\ndef foo(p1): # Overload signature is not compatible with the implementation\n pass\n\n\ndef foo(p1, p2, p3):\n print(p1, p2, p3)'", + "markdown": "Reports cases when overloads in regular Python files are placed after the implementation or when their signatures are\nnot compatible with the implementation.\n\n**Example:**\n\n\n from typing import overload\n\n\n @overload\n def foo(p1, p2): # Overload signature is not compatible with the implementation\n pass\n\n\n @overload\n def foo(p1): # Overload signature is not compatible with the implementation\n pass\n\n\n def foo(p1, p2, p3):\n print(p1, p2, p3)\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyOverloads", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyExceptClausesOrderInspection", + "shortDescription": { + "text": "Wrong order of 'except' clauses" + }, + "fullDescription": { + "text": "Reports cases when 'except' clauses are not in the proper order, from the more specific to the more generic, or one exception class is caught twice. If you do not fix the order, some exceptions may not be caught by the most specific handler. Example: 'try:\n call()\nexcept ValueError:\n pass\nexcept UnicodeError:\n pass' The IDE recommends moving the clause up. When the quick-fix is applied, the code changes to: 'try:\n call()\nexcept UnicodeError:\n pass\nexcept ValueError:\n pass'", + "markdown": "Reports cases when `except` clauses are not in the proper order,\nfrom the more specific to the more generic, or one exception class is caught twice.\n\n\nIf you do not fix the order, some exceptions may not be caught by the most specific handler.\n\n**Example:**\n\n\n try:\n call()\n except ValueError:\n pass\n except UnicodeError:\n pass\n\nThe IDE recommends moving the clause up. When the quick-fix is applied, the code changes to:\n\n\n try:\n call()\n except UnicodeError:\n pass\n except ValueError:\n pass\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyExceptClausesOrder", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyDataclassInspection", + "shortDescription": { + "text": "Invalid definition and usage of Data Classes" + }, + "fullDescription": { + "text": "Reports invalid definitions and usages of classes created with 'dataclasses' or 'attr' modules. Example: 'import dataclasses\n\n\n@dataclasses.dataclass\nclass FullName:\n first: str\n middle: str = \"\"\n last: str'", + "markdown": "Reports invalid definitions and usages of classes created with\n`dataclasses` or `attr` modules.\n\n**Example:**\n\n\n import dataclasses\n\n\n @dataclasses.dataclass\n class FullName:\n first: str\n middle: str = \"\"\n last: str\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyDataclass", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyClassicStyleClassInspection", + "shortDescription": { + "text": "Classic style class usage" + }, + "fullDescription": { + "text": "Reports classic style classes usage. This inspection applies only to Python 2. Example: 'class A:\n pass' With quick-fixes provided by the IDE, this code fragment changes to: 'class A(object):\n def __init__(self):\n pass'", + "markdown": "Reports [classic style classes](https://docs.python.org/2/reference/datamodel.html#new-style-and-classic-classes) usage. This inspection applies only to Python 2.\n\n**Example:**\n\n\n class A:\n pass\n\nWith quick-fixes provided by the IDE, this code fragment changes to:\n\n\n class A(object):\n def __init__(self):\n pass\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PyClassicStyleClass", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyPropertyDefinitionInspection", + "shortDescription": { + "text": "Incorrect property definition" + }, + "fullDescription": { + "text": "Reports problems with the arguments of 'property()' and functions annotated with '@property'. 'class C:\n @property\n def abc(self): # Getter should return or yield something\n pass\n\n @abc.setter\n def foo(self, value): # Names of function and decorator don't match\n pass\n\n @abc.setter\n def abc(self, v1, v2): # Setter signature should be (self, value)\n pass\n\n @abc.deleter\n def abc(self, v1): # Delete signature should be (self)\n pass' A quick-fix offers to update parameters.", + "markdown": "Reports problems with the arguments of `property()` and functions\nannotated with `@property`.\n\n\n class C:\n @property\n def abc(self): # Getter should return or yield something\n pass\n\n @abc.setter\n def foo(self, value): # Names of function and decorator don't match\n pass\n\n @abc.setter\n def abc(self, v1, v2): # Setter signature should be (self, value)\n pass\n\n @abc.deleter\n def abc(self, v1): # Delete signature should be (self)\n pass\n\nA quick-fix offers to update parameters." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PyPropertyDefinition", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyIncorrectDocstringInspection", + "shortDescription": { + "text": "Incorrect docstring" + }, + "fullDescription": { + "text": "Reports mismatched parameters in a docstring. For example, 'b' is highlighted, because there is no such a parameter in the 'add' function. 'def add(a, c):\n \"\"\"\n @param a:\n @param b:\n @return:\n \"\"\"\n pass' The inspection does not warn you of missing parameters if none of them is mentioned in a docstring: 'def mult(a, c):\n \"\"\"\n @return:\n \"\"\"\n pass'", + "markdown": "Reports mismatched parameters in a docstring. For example, `b` is highlighted, because there is no\nsuch a parameter in the `add` function.\n\n\n def add(a, c):\n \"\"\"\n @param a:\n @param b:\n @return:\n \"\"\"\n pass\n\nThe inspection does not warn you of missing parameters if none of them is mentioned in a docstring:\n\n\n def mult(a, c):\n \"\"\"\n @return:\n \"\"\"\n pass\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyIncorrectDocstring", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PyListCreationInspection", + "shortDescription": { + "text": "Non-optimal list declaration" + }, + "fullDescription": { + "text": "Reports cases when a list declaration can be rewritten with a list literal. This ensures better performance of your application. Example: 'l = [1]\nl.append(2)' When the quick-fix is applied, the code changes to: 'l = [1, 2]'", + "markdown": "Reports cases when a list declaration\ncan be rewritten with a list literal.\n\nThis ensures better performance of your application.\n\n**Example:**\n\n\n l = [1]\n l.append(2)\n\nWhen the quick-fix is applied, the code changes to:\n\n\n l = [1, 2]\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "PyListCreation", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Python", + "index": 0, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "JavaScript", + "version": "241.18034.45", + "rules": [ + { + "id": "ConstantConditionalExpressionJS", + "shortDescription": { + "text": "Constant conditional expression" + }, + "fullDescription": { + "text": "Reports a conditional expression in the format 'true? result1: result2' or 'false? result1: result2. Suggests simplifying the expression.'", + "markdown": "Reports a conditional expression in the format `true? result1: result2` or `false? result1: result2``.\nSuggests simplifying the expression.\n`" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "ConstantConditionalExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Control flow issues", + "index": 2, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSTestFailedLine", + "shortDescription": { + "text": "Highlight failure line in test code" + }, + "fullDescription": { + "text": "Reports a failed method call or an assertion in a test.", + "markdown": "Reports a failed method call or an assertion in a test." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSTestFailedLine", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Unit testing", + "index": 8, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSValidateJSDoc", + "shortDescription": { + "text": "Syntax errors and unresolved references in JSDoc" + }, + "fullDescription": { + "text": "Reports a syntax discrepancy in a documentation comment.", + "markdown": "Reports a syntax discrepancy in a documentation comment." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSValidateJSDoc", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NonBlockStatementBodyJS", + "shortDescription": { + "text": "Statement body without braces" + }, + "fullDescription": { + "text": "Reports a 'if', 'while', 'for', or 'with' statements whose body is not a block statement. Using code block in statement bodies is usually safer for downstream maintenance.", + "markdown": "Reports a `if`, `while`, `for`, or `with` statements whose body is not a block statement. Using code block in statement bodies is usually safer for downstream maintenance." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "NonBlockStatementBodyJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Code style issues", + "index": 17, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "IfStatementWithTooManyBranchesJS", + "shortDescription": { + "text": "'if' statement with too many branches" + }, + "fullDescription": { + "text": "Reports an 'if' statement with too many branches. Such statements may be confusing, and often indicate inadequate levels of design abstraction. Use the field below to specify the maximum number of branches expected.", + "markdown": "Reports an `if` statement with too many branches. Such statements may be confusing, and often indicate inadequate levels of design abstraction.\n\n\nUse the field below to specify the maximum number of branches expected." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "IfStatementWithTooManyBranchesJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Control flow issues", + "index": 2, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "BreakStatementJS", + "shortDescription": { + "text": "'break' statement" + }, + "fullDescription": { + "text": "Reports a 'break' statements. Ignores 'break' statements that end case blocks.", + "markdown": "Reports a `break` statements. Ignores `break` statements that end case blocks." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "BreakStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially undesirable code constructs", + "index": 19, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "FlowJSConfig", + "shortDescription": { + "text": "Missing .flowconfig" + }, + "fullDescription": { + "text": "Reports a JavaScript file with a '@flow' flag that doesn't have an associated '.flowconfig' file in the project.", + "markdown": "Reports a JavaScript file with a `@flow` flag that doesn't have an associated `.flowconfig` file in the project." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "FlowJSConfig", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Flow type checker", + "index": 20, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSPotentiallyInvalidUsageOfClassThis", + "shortDescription": { + "text": "Potentially invalid reference to 'this' of a class from closure" + }, + "fullDescription": { + "text": "Reports an attempt to reference a member of an ECMAScript class via the 'this.' qualifier in a nested function that is not a lambda. 'this' in a nested function that is not a lambda is the function's own 'this' and doesn't relate to the outer class.", + "markdown": "Reports an attempt to reference a member of an ECMAScript class via the `this.` qualifier in a nested function that is not a lambda. \n`this` in a nested function that is not a lambda is the function's own `this` and doesn't relate to the outer class." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSPotentiallyInvalidUsageOfClassThis", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Probable bugs", + "index": 22, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DebuggerStatementJS", + "shortDescription": { + "text": "'debugger' statement" + }, + "fullDescription": { + "text": "Reports a 'debugger' statement used for interaction with the Javascript debuggers. Such statements should not appear in production code.", + "markdown": "Reports a `debugger` statement used for interaction with the Javascript debuggers. Such statements should not appear in production code." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "DebuggerStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially undesirable code constructs", + "index": 19, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSUnusedAssignment", + "shortDescription": { + "text": "Unused assignment" + }, + "fullDescription": { + "text": "Reports a variable whose value is never used after assignment. Suggests removing the unused variable to shorten the code and to avoid redundant allocations. The following cases are reported: A variable is never read after assignment. The value of a variable is always overwritten with another assignment before the variable is read next time. The initializer of a variable is redundant (for one of the above-mentioned reasons).", + "markdown": "Reports a variable whose value is never used after assignment. \nSuggests removing the unused variable to shorten the code and to avoid redundant allocations.\n\nThe following cases are reported:\n\n* A variable is never read after assignment.\n* The value of a variable is always overwritten with another assignment before the variable is read next time.\n* The initializer of a variable is redundant (for one of the above-mentioned reasons)." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "JSUnusedAssignment", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Unused symbols", + "index": 26, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "FlowJSError", + "shortDescription": { + "text": "Flow type checker" + }, + "fullDescription": { + "text": "Reports errors from Flow.", + "markdown": "Reports errors from [Flow](https://flowtype.org/)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "FlowJSError", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Flow type checker", + "index": 20, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ReuseOfLocalVariableJS", + "shortDescription": { + "text": "Reuse of local variable" + }, + "fullDescription": { + "text": "Reports reusing a local variable and overwriting its value with a new value that is not related to the original variable usage. Reusing a local variable in this way may be confusing because the intended semantics of the local variable may vary with each usage. It may also cause bugs, if code changes result in values that were expected to be overwritten while they are actually live. It is good practices to keep variable lifetimes as short as possible, and not reuse local variables for the sake of brevity.", + "markdown": "Reports reusing a local variable and overwriting its value with a new value that is not related to the original variable usage. Reusing a local variable in this way may be confusing because the intended semantics of the local variable may vary with each usage. It may also cause bugs, if code changes result in values that were expected to be overwritten while they are actually live. It is good practices to keep variable lifetimes as short as possible, and not reuse local variables for the sake of brevity." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ReuseOfLocalVariableJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Data flow", + "index": 27, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ShiftOutOfRangeJS", + "shortDescription": { + "text": "Shift operation by possibly wrong constant" + }, + "fullDescription": { + "text": "Reports a shift operation where the second operand is a constant outside the reasonable range, for example, an integer shift operation outside the range '0..31', shifting by negative or overly large values.", + "markdown": "Reports a shift operation where the second operand is a constant outside the reasonable range, for example, an integer shift operation outside the range `0..31`, shifting by negative or overly large values." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ShiftOutOfRangeJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Bitwise operation issues", + "index": 29, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSClosureCompilerSyntax", + "shortDescription": { + "text": "Incorrect usage of JSDoc tags" + }, + "fullDescription": { + "text": "Reports warnings implied by Google Closure Compiler annotations including correct use of '@abstract', '@interface', and '@implements' tags.", + "markdown": "Reports warnings implied by *Google Closure Compiler* annotations including correct use of `@abstract`, `@interface`, and `@implements` tags." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSClosureCompilerSyntax", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnnecessaryContinueJS", + "shortDescription": { + "text": "Unnecessary 'continue' statement" + }, + "fullDescription": { + "text": "Reports an unnecessary 'continue' statement at the end of a loop. Suggests removing such statements.", + "markdown": "Reports an unnecessary `continue` statement at the end of a loop. Suggests removing such statements." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "UnnecessaryContinueJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Control flow issues", + "index": 2, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6ConvertLetToConst", + "shortDescription": { + "text": "'let' is used instead of 'const'" + }, + "fullDescription": { + "text": "Reports a 'let' declaration that can be made 'const'.", + "markdown": "Reports a `let` declaration that can be made `const`. " + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6ConvertLetToConst", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/ES2015 migration aids", + "index": 30, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSXDomNesting", + "shortDescription": { + "text": "Invalid DOM element nesting" + }, + "fullDescription": { + "text": "Detects HTML elements in JSX files which are not nested properly according to the DOM specification. React reports runtime warnings on incorrectly nested elements.", + "markdown": "Detects HTML elements in JSX files which are not nested properly according to the DOM specification. React reports runtime warnings on incorrectly nested elements." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSXDomNesting", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/React", + "index": 33, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptValidateTypes", + "shortDescription": { + "text": "Type mismatch" + }, + "fullDescription": { + "text": "Reports a parameter, return value, or assigned expression of incorrect type.", + "markdown": "Reports a parameter, return value, or assigned expression of incorrect type." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "TypeScriptValidateTypes", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "BadExpressionStatementJS", + "shortDescription": { + "text": "Expression statement which is not assignment or call" + }, + "fullDescription": { + "text": "Reports an expression statement that is neither an assignment nor a call. Such statements usually indicate an error.", + "markdown": "Reports an expression statement that is neither an assignment nor a call. Such statements usually indicate an error." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "BadExpressionStatementJS", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Validity issues", + "index": 35, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ConfusingFloatingPointLiteralJS", + "shortDescription": { + "text": "Confusing floating point literal" + }, + "fullDescription": { + "text": "Reports any floating point number that does not have a decimal point, or any numbers before the decimal point, or and numbers after the decimal point. Such literals may be confusing, and violate several coding standards.", + "markdown": "Reports any floating point number that does not have a decimal point, or any numbers before the decimal point, or and numbers after the decimal point. Such literals may be confusing, and violate several coding standards." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ConfusingFloatingPointLiteralJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 37, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "BreakStatementWithLabelJS", + "shortDescription": { + "text": "'break' statement with label" + }, + "fullDescription": { + "text": "Reports a labeled 'break' statement.", + "markdown": "Reports a labeled `break` statement." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "BreakStatementWithLabelJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially undesirable code constructs", + "index": 19, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ContinueOrBreakFromFinallyBlockJS", + "shortDescription": { + "text": "'continue' or 'break' inside 'finally' block" + }, + "fullDescription": { + "text": "Reports a 'break' or 'continue' statement inside a 'finally' block. Such statements are very confusing, may hide exceptions, and complicate debugging.", + "markdown": "Reports a `break` or `continue` statement inside a `finally` block. Such statements are very confusing, may hide exceptions, and complicate debugging." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ContinueOrBreakFromFinallyBlockJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Try statement issues", + "index": 42, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "StatementsPerFunctionJS", + "shortDescription": { + "text": "Overly long function" + }, + "fullDescription": { + "text": "Reports an overly long function. Function length is calculated by counting up the number of non-empty statements in the function. Functions that are too long are error-prone and difficult to test. Use the field below to specify the maximum acceptable number of statements in a function.", + "markdown": "Reports an overly long function. Function length is calculated by counting up the number of non-empty statements in the function. Functions that are too long are error-prone and difficult to test.\n\n\nUse the field below to specify the maximum acceptable number of statements in a function." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "FunctionTooLongJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Function metrics", + "index": 44, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnnecessaryLocalVariableJS", + "shortDescription": { + "text": "Redundant local variable" + }, + "fullDescription": { + "text": "Reports an unnecessary local variable that does not make a function more comprehensible: a local variable that is immediately returned a local variable that is immediately assigned to another variable and is not used anymore a local variable that always has the same value as another local variable or parameter. Use the checkbox below to have this inspection ignore variables that are immediately returned or thrown. Some coding styles suggest using such variables for clarity and ease of debugging.", + "markdown": "Reports an unnecessary local variable that does not make a function more comprehensible:\n\n* a local variable that is immediately returned\n* a local variable that is immediately assigned to another variable and is not used anymore\n* a local variable that always has the same value as another local variable or parameter.\n\n\nUse the checkbox below to have this inspection ignore variables that are immediately\nreturned or thrown. Some coding styles suggest using such variables for clarity and\nease of debugging." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "UnnecessaryLocalVariableJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Data flow", + "index": 27, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSMethodCanBeStatic", + "shortDescription": { + "text": "Method can be made 'static'" + }, + "fullDescription": { + "text": "Reports a class method that can be safely made 'static'. A method can be 'static' if it does not reference any of its class' non-static methods and non-static fields and is not overridden in a subclass. Use the first checkbox below to inspect only 'private' methods.", + "markdown": "Reports a class method that can be safely made `static`. A method can be `static` if it does not reference any of its class' non-static methods and non-static fields and is not overridden in a subclass.\n\n\nUse the first checkbox below to inspect only `private` methods." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSMethodCanBeStatic", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSDeclarationsAtScopeStart", + "shortDescription": { + "text": "'var' declared not at the beginning of a function" + }, + "fullDescription": { + "text": "Checks that declarations of local variables declared with var are at the top of a function scope. By default, variable declarations are always moved (\"hoisted\") invisibly to the top of their containing scope when the code is executed. Therefore, declaring them at the top of the scope helps represent this behavior in the code.", + "markdown": "Checks that declarations of local variables declared with **var** are at the top of a function scope. \n\nBy default, variable declarations are always moved (\"hoisted\") invisibly to the top of their containing scope when the code is executed. Therefore, declaring them at the top of the scope helps represent this behavior in the code." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSDeclarationsAtScopeStart", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Code style issues", + "index": 17, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ContinueStatementWithLabelJS", + "shortDescription": { + "text": "'continue' statement with label" + }, + "fullDescription": { + "text": "Reports a labeled 'continue' statement.", + "markdown": "Reports a labeled `continue` statement." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ContinueStatementWithLabelJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially undesirable code constructs", + "index": 19, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSObjectNullOrUndefined", + "shortDescription": { + "text": "Object is 'null' or 'undefined'" + }, + "fullDescription": { + "text": "Reports an error caused by invoking a method, accessing a property, or calling a function on an object that is 'undefined' or 'null'.", + "markdown": "Reports an error caused by invoking a method, accessing a property, or calling a function on an object that is `undefined` or `null`." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "JSObjectNullOrUndefined", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Control flow issues", + "index": 2, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptMissingConfigOption", + "shortDescription": { + "text": "Missing tsconfig.json option " + }, + "fullDescription": { + "text": "Reports a usage that requires an explicit option in 'tsconfig.json'. For example, to use JSX in '.tsx' files, 'tsconfig.json' must contain '\"jsx\"' property.", + "markdown": "Reports a usage that requires an explicit option in `tsconfig.json`. For example, to use JSX in `.tsx` files, `tsconfig.json` must contain `\"jsx\"` property." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "TypeScriptMissingConfigOption", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSXUnresolvedComponent", + "shortDescription": { + "text": "Unresolved JSX component" + }, + "fullDescription": { + "text": "Reports an unresolved reference to a JSX component. Suggests adding a missing import statement if the referenced component is defined in the project or its dependencies or creating a new component with this name. The template for a new component can be modified in Editor | File and Code Templates.", + "markdown": "Reports an unresolved reference to a JSX component. Suggests adding a missing import statement if the referenced component is defined in the project or its dependencies or creating a new component with this name.\n\nThe template for a new component can be modified in Editor \\| File and Code Templates." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSXUnresolvedComponent", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnnecessaryLabelOnBreakStatementJS", + "shortDescription": { + "text": "Unnecessary label on 'break' statement" + }, + "fullDescription": { + "text": "Reports a labeled 'break' statement whose labels may be removed without changing the flow of control.", + "markdown": "Reports a labeled `break` statement whose labels may be removed without changing the flow of control." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "UnnecessaryLabelOnBreakStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Control flow issues", + "index": 2, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6ShorthandObjectProperty", + "shortDescription": { + "text": "Property can be replaced with shorthand" + }, + "fullDescription": { + "text": "Reports an object property that can be converted to ES6 shorthand style and provides a quick-fix to do it. Example: 'var obj = {foo:foo}' After applying the quick-fix the code looks as follows: 'var obj = {foo}'", + "markdown": "Reports an object property that can be converted to ES6 shorthand style and provides a quick-fix to do it.\n\nExample:\n\n\n var obj = {foo:foo}\n\nAfter applying the quick-fix the code looks as follows:\n\n\n var obj = {foo}\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6ShorthandObjectProperty", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ContinueStatementJS", + "shortDescription": { + "text": "'continue' statement" + }, + "fullDescription": { + "text": "Reports a 'continue' statement.", + "markdown": "Reports a `continue` statement." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ContinueStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially undesirable code constructs", + "index": 19, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AssignmentToForLoopParameterJS", + "shortDescription": { + "text": "Assignment to 'for' loop parameter" + }, + "fullDescription": { + "text": "Reports an assignment to a variable declared as a 'for' loop parameter. Although occasionally intended, this construct can be extremely confusing, and is often a result of an error.", + "markdown": "Reports an assignment to a variable declared as a `for` loop parameter. Although occasionally intended, this construct can be extremely confusing, and is often a result of an error." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "AssignmentToForLoopParameterJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Assignment issues", + "index": 48, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSPotentiallyInvalidConstructorUsage", + "shortDescription": { + "text": "Potentially invalid constructor usage" + }, + "fullDescription": { + "text": "Reports a usage of a potentially invalid constructor function, for example: a function that is not a constructor after 'new', using a constructor's prototype or calling a constructor without 'new'. A constructor function is assumed to have an upper case name (optional) or have an explicit JSDoc '@constructor' tag.", + "markdown": "Reports a usage of a potentially invalid constructor function, for example: a function that is not a constructor after `new`, using a constructor's prototype or calling a constructor without `new`. A constructor function is assumed to have an upper case name (optional) or have an explicit JSDoc `@constructor` tag." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSPotentiallyInvalidConstructorUsage", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Probable bugs", + "index": 22, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PointlessArithmeticExpressionJS", + "shortDescription": { + "text": "Pointless arithmetic expression" + }, + "fullDescription": { + "text": "Reports an arithmetic expression that include adding or subtracting zero, multiplying by zero or one, division by one, and shift by zero. Such expressions may result from not fully completed automated refactoring.", + "markdown": "Reports an arithmetic expression that include adding or subtracting zero, multiplying by zero or one, division by one, and shift by zero. Such expressions may result from not fully completed automated refactoring." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PointlessArithmeticExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 37, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NodeCoreCodingAssistance", + "shortDescription": { + "text": "Unresolved Node.js APIs" + }, + "fullDescription": { + "text": "Suggests configuring coding assistance for Node.js, for example, 'require' and/or core modules ('path', 'http', 'fs', etc.). See https://nodejs.org/api/ for the complete list.", + "markdown": "Suggests configuring coding assistance for Node.js, for example, `require` and/or core modules ('path', 'http', 'fs', etc.).\n\n\nSee for the complete list." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "NodeCoreCodingAssistance", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Node.js", + "index": 53, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSUndeclaredVariable", + "shortDescription": { + "text": "Implicitly declared global JavaScript variable" + }, + "fullDescription": { + "text": "Reports an implicit declaration of a global variable. Example: 'var aaa = 1; // good\n bbb = 2; // bad, if bbb is not declared with 'var' somewhere'", + "markdown": "Reports an implicit declaration of a global variable.\n\nExample:\n\n\n var aaa = 1; // good\n bbb = 2; // bad, if bbb is not declared with 'var' somewhere\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSUndeclaredVariable", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DivideByZeroJS", + "shortDescription": { + "text": "Division by zero" + }, + "fullDescription": { + "text": "Reports division by zero or a remainder by zero.", + "markdown": "Reports division by zero or a remainder by zero." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "DivideByZeroJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Probable bugs", + "index": 22, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSPrimitiveTypeWrapperUsage", + "shortDescription": { + "text": "Primitive type object wrapper used" + }, + "fullDescription": { + "text": "Reports an improper usage of a wrapper for primitive types or a property of a primitive type being modified, as in the latter case the assigned value will be lost.", + "markdown": "Reports an improper usage of a wrapper for primitive types or a property of a primitive type being modified, as in the latter case the assigned value will be lost." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSPrimitiveTypeWrapperUsage", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptSmartCast", + "shortDescription": { + "text": "Narrowed type" + }, + "fullDescription": { + "text": "Reports a usage of a variable where the variable type is narrowed by a type guard. Note that severity level doesn't affect this inspection.", + "markdown": "Reports a usage of a variable where the variable type is narrowed by a type guard. Note that severity level doesn't affect this inspection." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "TypeScriptSmartCast", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6ConvertIndexedForToForOf", + "shortDescription": { + "text": "Indexed 'for' is used instead of 'for..of'" + }, + "fullDescription": { + "text": "Reports an indexed 'for' loop used on an array. Suggests replacing it with a 'for..of' loop. 'for..of' loops are introduced in ECMAScript 6 and iterate over 'iterable' objects.", + "markdown": "Reports an indexed [for](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) loop used on an array. Suggests replacing it with a [for..of](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) loop. \n`for..of` loops are introduced in ECMAScript 6 and iterate over `iterable` objects." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6ConvertIndexedForToForOf", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/ES2015 migration aids", + "index": 30, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSLastCommaInArrayLiteral", + "shortDescription": { + "text": "Unneeded last comma in array literal" + }, + "fullDescription": { + "text": "Reports a usage of a trailing comma in an array literal. The warning is reported only when the JavaScript language version is set to ECMAScript 5.1. Although trailing commas in arrays are allowed by the specification, some browsers may throw an error when a trailing comma is used. You can configure formatting options for trailing commas in Code Style | JavaScript or TypeScript | Punctuation.", + "markdown": "Reports a usage of a trailing comma in an array literal.\n\nThe warning is reported only when the JavaScript language version is set to ECMAScript 5.1.\n\nAlthough trailing commas in arrays are allowed by the specification, some browsers may throw an error when a trailing comma is used.\n\nYou can configure formatting options for trailing commas in **Code Style** \\| **JavaScript** or **TypeScript** \\| **Punctuation**." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSLastCommaInArrayLiteral", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ConditionalExpressionJS", + "shortDescription": { + "text": "Conditional expression" + }, + "fullDescription": { + "text": "Reports a ternary conditional expression. Some coding standards prohibit such expressions in favor of explicit 'if' statements.", + "markdown": "Reports a ternary conditional expression. Some coding standards prohibit such expressions in favor of explicit `if` statements." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ConditionalExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially undesirable code constructs", + "index": 19, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6ConvertVarToLetConst", + "shortDescription": { + "text": "'var' is used instead of 'let' or 'const'" + }, + "fullDescription": { + "text": "Reports a 'var' declaration that is used instead of 'let' or 'const'. Both 'let' and 'const' are block-scoped and behave more strictly. Suggests replacing all 'var' declarations with 'let' or 'const' declarations, depending on the semantics of a particular value. The declarations may be moved to the top of the function or placed before the first usage of the variable to avoid Reference errors. Select the 'Conservatively convert var with Fix all action' option to prevent any changes in these complex cases when using the 'Fix all' action.", + "markdown": "Reports a `var` declaration that is used instead of `let` or `const`. \nBoth `let` and `const` are block-scoped and behave more strictly. \n\nSuggests replacing all `var` declarations with `let` or `const` declarations, depending on the semantics of a particular value. The declarations may be moved to the top of the function or placed before the first usage of the variable to avoid Reference errors. \nSelect the 'Conservatively convert var with Fix all action' option to prevent any changes in these complex cases when using the 'Fix all' action." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6ConvertVarToLetConst", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/ES2015 migration aids", + "index": 30, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSReferencingMutableVariableFromClosure", + "shortDescription": { + "text": "Referencing mutable variable from closure" + }, + "fullDescription": { + "text": "Reports access to outer mutable variables from functions. Example: 'for (var i = 1; i <= 3; i++) {\n setTimeout(function() {\n console.log(i); // bad\n }, 0);\n }'", + "markdown": "Reports access to outer mutable variables from functions.\n\nExample:\n\n\n for (var i = 1; i <= 3; i++) {\n setTimeout(function() {\n console.log(i); // bad\n }, 0);\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSReferencingMutableVariableFromClosure", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PointlessBooleanExpressionJS", + "shortDescription": { + "text": "Pointless statement or boolean expression" + }, + "fullDescription": { + "text": "Reports a pointless or pointlessly complicated boolean expression or statement. Example: 'let a = !(false && x);\n let b = false || x;' After the quick fix is applied the result looks like: 'let a = true;\n let b = x;'", + "markdown": "Reports a pointless or pointlessly complicated boolean expression or statement.\n\nExample:\n\n\n let a = !(false && x);\n let b = false || x;\n\nAfter the quick fix is applied the result looks like:\n\n\n let a = true;\n let b = x;\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "PointlessBooleanExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Control flow issues", + "index": 2, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DynamicallyGeneratedCodeJS", + "shortDescription": { + "text": "Execution of dynamically generated code" + }, + "fullDescription": { + "text": "Reports a call of the 'eval()', 'setTimeout()', or 'setInterval()' function or an allocation of a 'Function' object. These functions are used to execute arbitrary strings of JavaScript text, which often dynamically generated. This can be very confusing, and may be a security risk. Ignores the cases when a callback function is provided to these methods statically, without code generation.", + "markdown": "Reports a call of the `eval()`, `setTimeout()`, or `setInterval()` function or an allocation of a `Function` object. These functions are used to execute arbitrary strings of JavaScript text, which often dynamically generated. This can be very confusing, and may be a security risk. \n\nIgnores the cases when a callback function is provided to these methods statically, without code generation." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "DynamicallyGeneratedCodeJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 37, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NegatedConditionalExpressionJS", + "shortDescription": { + "text": "Negated conditional expression" + }, + "fullDescription": { + "text": "Reports a conditional expression whose condition is negated. Suggests flipping the order of branches in the conditional expression to increase the clarity of the statement. Example: '!condition ? 2 : 1'", + "markdown": "Reports a conditional expression whose condition is negated. Suggests flipping the order of branches in the conditional expression to increase the clarity of the statement. Example: `!condition ? 2 : 1`" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "NegatedConditionalExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 37, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSUrlImportUsage", + "shortDescription": { + "text": "URL import is used" + }, + "fullDescription": { + "text": "Checks used URL imports in the JavaScript language. Suggests downloading the module for the specified remote URL. Such association enables the IDE to provide proper code completion and navigation. URLs in import specifiers are supported only for ECMAScript modules in the JavaScript language.", + "markdown": "Checks used URL imports in the JavaScript language. Suggests downloading the module for the specified remote URL. Such association enables the IDE to provide proper code completion and navigation. \n\nURLs in import specifiers are supported only for ECMAScript modules in the JavaScript language." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSUrlImportUsage", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Imports and dependencies", + "index": 57, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnnecessaryLabelOnContinueStatementJS", + "shortDescription": { + "text": "Unnecessary label on 'continue' statement" + }, + "fullDescription": { + "text": "Reports a labeled 'continue' statement whose labels may be removed without changing the flow of control.", + "markdown": "Reports a labeled `continue` statement whose labels may be removed without changing the flow of control." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "UnnecessaryLabelOnContinueStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Control flow issues", + "index": 2, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ChainedEqualityJS", + "shortDescription": { + "text": "Chained equality" + }, + "fullDescription": { + "text": "Reports a chained equality comparison (i.e. 'a==b==c'). Such comparisons are confusing.", + "markdown": "Reports a chained equality comparison (i.e. `a==b==c`). Such comparisons are confusing." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ChainedEqualityComparisonsJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Code style issues", + "index": 17, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SillyAssignmentJS", + "shortDescription": { + "text": "Variable is assigned to itself" + }, + "fullDescription": { + "text": "Reports an assignment in the form 'x = x'.", + "markdown": "Reports an assignment in the form `x = x`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SillyAssignmentJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Assignment issues", + "index": 48, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSPotentiallyInvalidTargetOfIndexedPropertyAccess", + "shortDescription": { + "text": "Possibly incorrect target of indexed property access" + }, + "fullDescription": { + "text": "Reports a potentially invalid indexed property access, for example, 'Array[1]'.", + "markdown": "Reports a potentially invalid indexed property access, for example, `Array[1]`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSPotentiallyInvalidTargetOfIndexedPropertyAccess", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Probable bugs", + "index": 22, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSAccessibilityCheck", + "shortDescription": { + "text": "Inaccessible @private and @protected members referenced" + }, + "fullDescription": { + "text": "Reports a reference to a JavaScript member that is marked with a '@private' or '@protected' tag but does not comply with visibility rules that these tags imply.", + "markdown": "Reports a reference to a JavaScript member that is marked with a `@private` or `@protected` tag but does not comply with visibility rules that these tags imply." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "JSAccessibilityCheck", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6ConvertRequireIntoImport", + "shortDescription": { + "text": "'require()' is used instead of 'import'" + }, + "fullDescription": { + "text": "Reports a 'require()' statement. Suggests converting it to a 'require()' call with an 'import' statement. Enable 'Convert require() inside inner scopes with Fix all action' to convert all 'require()' calls inside the nested functions and statements when using the 'Fix all' action. Please note that converting 'require()' statements inside inner scopes to 'import' statements may cause changes in the semantics of the code. Import statements are static module dependencies and are hoisted, which means that they are moved to the top of the current module. 'require()' calls load modules dynamically. They can be executed conditionally, and their scope is defined by the expression in which they are used. Clear the 'Convert require() inside inner scopes with Fix all action' checkbox to prevent any changes in these complex cases when using the 'Fix all' action.", + "markdown": "Reports a `require()` statement. Suggests converting it to a `require()` call with an `import` statement. \n\nEnable 'Convert require() inside inner scopes with Fix all action' to convert all `require()` calls inside the nested functions and statements when using the 'Fix all' action. \n\nPlease note that converting `require()` statements inside inner scopes to `import` statements may cause changes in the semantics of the code. Import statements are static module dependencies and are hoisted, which means that they are moved to the top of the current module. `require()` calls load modules dynamically. They can be executed conditionally, and their scope is defined by the expression in which they are used. \nClear the 'Convert require() inside inner scopes with Fix all action' checkbox to prevent any changes in these complex cases when using the 'Fix all' action." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6ConvertRequireIntoImport", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/ES2015 migration aids", + "index": 30, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "FunctionWithMultipleLoopsJS", + "shortDescription": { + "text": "Function with multiple loops" + }, + "fullDescription": { + "text": "Reports a function with multiple loop statements.", + "markdown": "Reports a function with multiple loop statements." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "FunctionWithMultipleLoopsJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Function metrics", + "index": 44, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "LabeledStatementJS", + "shortDescription": { + "text": "Labeled statement" + }, + "fullDescription": { + "text": "Reports a labeled statement.", + "markdown": "Reports a labeled statement." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "LabeledStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially undesirable code constructs", + "index": 19, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnusedCatchParameterJS", + "shortDescription": { + "text": "Unused 'catch' parameter" + }, + "fullDescription": { + "text": "Reports a 'catch' parameter that is not used in the corresponding block. The 'catch' parameters named 'ignore' or 'ignored' are ignored. Use the checkbox below to disable this inspection for 'catch' blocks with comments.", + "markdown": "Reports a `catch` parameter that is not used in the corresponding block. The `catch` parameters named `ignore` or `ignored` are ignored.\n\n\nUse the checkbox below to disable this inspection for `catch`\nblocks with comments." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "UnusedCatchParameterJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Try statement issues", + "index": 42, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NpmUsedModulesInstalled", + "shortDescription": { + "text": "Missing module dependency" + }, + "fullDescription": { + "text": "Reports a module from a 'require()' call or an 'import' statement that is not installed or is not listed in package.json dependencies. Suggests installing the module and/or including it into package.json. For 'require()' calls, works only in the files from the scope of Node.js Core JavaScript library.", + "markdown": "Reports a module from a `require()` call or an `import` statement that is not installed or is not listed in package.json dependencies.\n\nSuggests installing the module and/or including it into package.json.\n\nFor `require()` calls, works only in the files from the scope of *Node.js Core* JavaScript library." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "NpmUsedModulesInstalled", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Imports and dependencies", + "index": 57, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "WithStatementJS", + "shortDescription": { + "text": "'with' statement" + }, + "fullDescription": { + "text": "Reports a 'with' statements. Such statements result in potentially confusing implicit bindings, and may behave strangely in setting new variables.", + "markdown": "Reports a `with` statements. Such statements result in potentially confusing implicit bindings, and may behave strangely in setting new variables." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "WithStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially undesirable code constructs", + "index": 19, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptCheckImport", + "shortDescription": { + "text": "Unresolved imported name" + }, + "fullDescription": { + "text": "Reports an unresolved name or binding in an 'import' declaration in TypeScript code.", + "markdown": "Reports an unresolved name or binding in an `import` declaration in TypeScript code." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "TypeScriptCheckImport", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSConstantReassignment", + "shortDescription": { + "text": "Attempt to assign to const or readonly variable" + }, + "fullDescription": { + "text": "Reports reassigning a value to a constant or a readonly variable.", + "markdown": "Reports reassigning a value to a constant or a readonly variable." + }, + "defaultConfiguration": { + "enabled": true, + "level": "error", + "parameters": { + "suppressToolId": "JSConstantReassignment", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Validity issues", + "index": 35, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MagicNumberJS", + "shortDescription": { + "text": "Magic number" + }, + "fullDescription": { + "text": "Reports a \"magic number\" that is a numeric literal used without being named by a constant declaration. Magic numbers can result in code whose intention is unclear, and may result in errors if a magic number is changed in one code location but remains unchanged in another. The numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100, 1000, 0.0 and 1.0 are ignored.", + "markdown": "Reports a \"magic number\" that is a numeric literal used without being named by a constant declaration. Magic numbers can result in code whose intention is unclear, and may result in errors if a magic number is changed in one code location but remains unchanged in another. The numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100, 1000, 0.0 and 1.0 are ignored." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MagicNumberJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 37, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "FunctionNamingConventionJS", + "shortDescription": { + "text": "Function naming convention" + }, + "fullDescription": { + "text": "Reports a function whose name is too short, too long, or does not follow the specified regular expression pattern. Use the fields provided below to specify minimum length, maximum length, and a regular expression for function names. Use the standard 'java.util.regex' format for regular expressions.", + "markdown": "Reports a function whose name is too short, too long, or does not follow the specified regular expression pattern.\n\n\nUse the fields provided below to specify minimum length, maximum length, and a regular expression\nfor function names. Use the standard `java.util.regex` format for regular expressions." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "FunctionNamingConventionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Naming conventions", + "index": 62, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSXSyntaxUsed", + "shortDescription": { + "text": "JSX syntax used" + }, + "fullDescription": { + "text": "Reports a usage of a JSX tag in JavaScript code.", + "markdown": "Reports a usage of a JSX tag in JavaScript code." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "JSXSyntaxUsed", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSJoinVariableDeclarationAndAssignment", + "shortDescription": { + "text": "Variable declaration can be merged with the first assignment to the variable" + }, + "fullDescription": { + "text": "Reports a variable that is declared without an initializer and is used much further in the code or in a single nested scope. Suggests moving the variable closer to its usages and joining it with the initializer expression.", + "markdown": "Reports a variable that is declared without an initializer and is used much further in the code or in a single nested scope. Suggests moving the variable closer to its usages and joining it with the initializer expression." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSJoinVariableDeclarationAndAssignment", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSRedundantSwitchStatement", + "shortDescription": { + "text": "'switch' statement is redundant and can be replaced" + }, + "fullDescription": { + "text": "Reports a 'switch' statement with an empty body, or with only one 'case' branch, or with a 'default' branch only.", + "markdown": "Reports a `switch` statement with an empty body, or with only one `case` branch, or with a `default` branch only." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "JSRedundantSwitchStatement", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Switch statement issues", + "index": 63, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptLibrary", + "shortDescription": { + "text": "Missing global library" + }, + "fullDescription": { + "text": "Reports a TypeScript library file that is required for a symbol but is not listed under the 'lib' compiler option in 'tsconfig.json'.", + "markdown": "Reports a TypeScript library file that is required for a symbol but is not listed under the `lib` compiler option in `tsconfig.json`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "TypeScriptLibrary", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptMissingAugmentationImport", + "shortDescription": { + "text": "Missing augmentation import" + }, + "fullDescription": { + "text": "Reports a usage from augmentation module without an explicit import.", + "markdown": "Reports a usage from [augmentation module](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation) without an explicit import." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "TypeScriptMissingAugmentationImport", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSUnusedGlobalSymbols", + "shortDescription": { + "text": "Unused global symbol" + }, + "fullDescription": { + "text": "Reports an unused globally accessible public function, variable, class, or property.", + "markdown": "Reports an unused globally accessible public function, variable, class, or property." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "JSUnusedGlobalSymbols", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Unused symbols", + "index": 26, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6ConvertModuleExportToExport", + "shortDescription": { + "text": "'module.exports' is used instead of 'export'" + }, + "fullDescription": { + "text": "Reports a 'module.export' statement. Suggests replacing it with an 'export' or 'export default' statement. Please note that the quick-fix for converting 'module.export' into 'export' is not available for 'module.export' inside functions or statements because 'export' statements can only be at the top level of a module.", + "markdown": "Reports a `module.export` statement. Suggests replacing it with an `export` or `export default` statement. \n\nPlease note that the quick-fix for converting `module.export` into `export` is not available for `module.export` inside functions or statements because `export` statements can only be at the top level of a module." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6ConvertModuleExportToExport", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/ES2015 migration aids", + "index": 30, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DocumentWriteJS", + "shortDescription": { + "text": "Call to 'document.write()'" + }, + "fullDescription": { + "text": "Reports a method call to 'document.write()' or 'document.writeln()'. Most usages of such calls are performed better with explicit DOM calls, such as 'getElementByID()' and 'createElement()'. Additionally, the 'write()' and 'writeln()' calls will not work with XML DOMs, including DOMs for XHTML if viewed as XML. This can result in difficulty to point out bugs.", + "markdown": "Reports a method call to `document.write()` or `document.writeln()`. Most usages of such calls are performed better with explicit DOM calls, such as `getElementByID()` and `createElement()`. Additionally, the `write()` and `writeln()` calls will not work with XML DOMs, including DOMs for XHTML if viewed as XML. This can result in difficulty to point out bugs." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "DocumentWriteJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/DOM issues", + "index": 64, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AnonymousFunctionJS", + "shortDescription": { + "text": "Anonymous function" + }, + "fullDescription": { + "text": "Reports an anonymous function. An explicit name of a function expression may be helpful for debugging. Ignores function expressions without names if they have a 'name' property specified in the ECMAScript 6 standard. For example, 'var bar = function() {};' is not reported.", + "markdown": "Reports an anonymous function. An explicit name of a function expression may be helpful for debugging. Ignores function expressions without names if they have a `name` property specified in the ECMAScript 6 standard. For example, `var bar = function() {};` is not reported." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "AnonymousFunctionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially undesirable code constructs", + "index": 19, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "BlockStatementJS", + "shortDescription": { + "text": "Unnecessary block statement" + }, + "fullDescription": { + "text": "Reports a block statement that is not used as the body of 'if', 'for', 'while', 'do', 'with', or 'try' statements, or as the body of a function declaration. Starting from ECMAScript 6, JavaScript blocks introduce new scopes for 'let' and 'const' variables, but still free-standing block statements may be confusing and result in subtle bugs when used with 'var' variables.", + "markdown": "Reports a block statement that is not used as the body of `if`, `for`, `while`, `do`, `with`, or `try` statements, or as the body of a function declaration. Starting from ECMAScript 6, JavaScript blocks introduce new scopes for `let` and `const` variables, but still free-standing block statements may be confusing and result in subtle bugs when used with `var` variables." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "BlockStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 37, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ObjectAllocationIgnoredJS", + "shortDescription": { + "text": "Result of object allocation ignored" + }, + "fullDescription": { + "text": "Reports object allocation where the result of the allocated object is ignored, for example, 'new Error();' as a statement, without any assignment. Such allocation expressions may indicate an odd object initialization strategy.", + "markdown": "Reports object allocation where the result of the allocated object is ignored, for example, `new Error();` as a statement, without any assignment. Such allocation expressions may indicate an odd object initialization strategy." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ObjectAllocationIgnored", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Probable bugs", + "index": 22, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "InfiniteRecursionJS", + "shortDescription": { + "text": "Infinite recursion" + }, + "fullDescription": { + "text": "Reports a function which must either recurse infinitely or throw an exception. Such functions may not return normally.", + "markdown": "Reports a function which must either recurse infinitely or throw an exception. Such functions may not return normally." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "InfiniteRecursionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Probable bugs", + "index": 22, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NestedConditionalExpressionJS", + "shortDescription": { + "text": "Nested conditional expression" + }, + "fullDescription": { + "text": "Reports a ternary conditional expression within another ternary condition. Such nested conditionals may be extremely confusing, and best replaced by more explicit conditional logic.", + "markdown": "Reports a ternary conditional expression within another ternary condition. Such nested conditionals may be extremely confusing, and best replaced by more explicit conditional logic." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "NestedConditionalExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 37, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSTypeOfValues", + "shortDescription": { + "text": "'typeof' comparison with non-standard value" + }, + "fullDescription": { + "text": "Reports a comparison of a 'typeof' expression with a literal string which is not one of the standard types: 'undefined', 'object', 'boolean', 'number', 'string', 'function', or 'symbol'. Such comparisons always return 'false'.", + "markdown": "Reports a comparison of a `typeof` expression with a literal string which is not one of the standard types: `undefined`, `object`, `boolean`, `number`, `string`, `function`, or `symbol`. Such comparisons always return `false`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSTypeOfValues", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Probable bugs", + "index": 22, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "IncompatibleMaskJS", + "shortDescription": { + "text": "Incompatible bitwise mask operation" + }, + "fullDescription": { + "text": "Reports a bitwise mask expression which for sure evaluates to 'true' or 'false'. Expressions are of the form '(var & constant1) == constant2' or '(var | constant1) == constant2', where 'constant1' and 'constant2' are incompatible bitmask constants. Example: '// Incompatible mask: as the last byte in mask is zero,\n// something like 0x1200 would be possible, but not 0x1234\nif ((mask & 0xFF00) == 0x1234) {...}'", + "markdown": "Reports a bitwise mask expression which for sure evaluates to `true` or `false`. Expressions are of the form `(var & constant1) == constant2` or `(var | constant1) == constant2`, where `constant1` and `constant2` are incompatible bitmask constants.\n\nExample:\n\n\n // Incompatible mask: as the last byte in mask is zero,\n // something like 0x1200 would be possible, but not 0x1234\n if ((mask & 0xFF00) == 0x1234) {...}\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "IncompatibleBitwiseMaskOperation", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Bitwise operation issues", + "index": 29, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6PossiblyAsyncFunction", + "shortDescription": { + "text": "'await' in non-async function" + }, + "fullDescription": { + "text": "Reports a usage of 'await' in a function that was possibly intended to be async but is actually missing the 'async' modifier. Although 'await' can be used as an identifier, it is likely that it was intended to be used as an operator, so the containing function should be made 'async'.", + "markdown": "Reports a usage of `await` in a function that was possibly intended to be async but is actually missing the `async` modifier. Although `await` can be used as an identifier, it is likely that it was intended to be used as an operator, so the containing function should be made `async`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6PossiblyAsyncFunction", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Async code and promises", + "index": 65, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TextLabelInSwitchStatementJS", + "shortDescription": { + "text": "Text label in 'switch' statement" + }, + "fullDescription": { + "text": "Reports a labeled statement inside a 'switch' statement, which often results from a typo. Example: 'switch(x)\n {\n case 1:\n case2: //typo!\n case 3:\n break;\n }'", + "markdown": "Reports a labeled statement inside a `switch` statement, which often results from a typo.\n\nExample:\n\n\n switch(x)\n {\n case 1:\n case2: //typo!\n case 3:\n break;\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "TextLabelInSwitchStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Switch statement issues", + "index": 63, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "EmptyCatchBlockJS", + "shortDescription": { + "text": "Empty 'catch' block" + }, + "fullDescription": { + "text": "Reports an empty 'catch' block. This indicates that errors are simply ignored instead of handling them. Any comment in a 'catch' block mutes the inspection.", + "markdown": "Reports an empty `catch` block. This indicates that errors are simply ignored instead of handling them. \n\nAny comment in a `catch` block mutes the inspection." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "EmptyCatchBlockJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Try statement issues", + "index": 42, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSHint", + "shortDescription": { + "text": "JSHint" + }, + "fullDescription": { + "text": "Reports a problem detected by the JSHint linter.", + "markdown": "Reports a problem detected by the [JSHint](https://jshint.com/) linter." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "JSHint", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Code quality tools", + "index": 66, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "FlowJSFlagCommentPlacement", + "shortDescription": { + "text": "Misplaced @flow flag" + }, + "fullDescription": { + "text": "Reports a '@flow' flag comment that is not located at the top of a file.", + "markdown": "Reports a `@flow` flag comment that is not located at the top of a file." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "FlowJSFlagCommentPlacement", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Flow type checker", + "index": 20, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Eslint", + "shortDescription": { + "text": "ESLint" + }, + "fullDescription": { + "text": "Reports a discrepancy detected by the ESLint linter. The highlighting is based on the rule severity specified in the ESLint configuration file for each individual rule. Clear the 'Use rule severity from the configuration file' checkbox to use the severity configured in this inspection for all ESLint rules.", + "markdown": "Reports a discrepancy detected by the [ESLint](https://eslint.org) linter. \n\nThe highlighting is based on the rule severity specified in the [ESLint configuration file](https://eslint.org/docs/user-guide/configuring) for each individual rule. \n\nClear the 'Use rule severity from the configuration file' checkbox to use the severity configured in this inspection for all ESLint rules." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "Eslint", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Code quality tools", + "index": 66, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSDuplicatedDeclaration", + "shortDescription": { + "text": "Duplicate declaration" + }, + "fullDescription": { + "text": "Reports multiple declarations in a scope.", + "markdown": "Reports multiple declarations in a scope." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSDuplicatedDeclaration", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSEqualityComparisonWithCoercion.TS", + "shortDescription": { + "text": "Equality operator may cause type coercion" + }, + "fullDescription": { + "text": "Reports a usage of equality operators may cause unexpected type coercions. Suggests replacing '==' or '!=' equality operators with type-safe '===' or '!==' operators. Depending on the option selected, one of the following cases will be reported: All usages of '==' and '!=' operators. All usages except comparison with null. Some code styles allow using 'x == null' as a replacement for 'x === null || x === undefined'. Only suspicious expressions, such as: '==' or '!=' comparisons with '0', '''', 'null', 'true', 'false', or 'undefined'.", + "markdown": "Reports a usage of equality operators may cause unexpected type coercions. Suggests replacing `==` or `!=` equality operators with type-safe `===` or `!==` operators.\n\nDepending on the option selected, one of the following cases will be reported:\n\n* All usages of `==` and `!=` operators.\n* All usages except comparison with null. Some code styles allow using `x == null` as a replacement for `x === null || x === undefined`.\n* Only suspicious expressions, such as: `==` or `!=` comparisons with `0`, `''`, `null`, `true`, `false`, or `undefined`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "EqualityComparisonWithCoercionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSOctalInteger", + "shortDescription": { + "text": "Octal integer" + }, + "fullDescription": { + "text": "Reports a deprecated octal integer literal prefixed with '0' instead of '0o'. Such literals are not allowed in modern ECMAScript code, and using them in the strict mode is an error. To force this inspection for ES5 and ES3 language levels, select the 'Warn about obsolete octal literals in ES5- code' checkbox below.", + "markdown": "Reports a deprecated octal integer literal prefixed with `0` instead of `0o`. \nSuch literals are not allowed in modern ECMAScript code, and using them in the strict mode is an error. \nTo force this inspection for ES5 and ES3 language levels, select the 'Warn about obsolete octal literals in ES5- code' checkbox below." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "JSOctalInteger", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Validity issues", + "index": 35, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ExceptionCaughtLocallyJS", + "shortDescription": { + "text": "Exception used for local control-flow" + }, + "fullDescription": { + "text": "Reports a 'throw' statement whose exceptions are always caught by the containing 'try' statement. Using 'throw' statements as a 'goto' to change the local flow of control is confusing.", + "markdown": "Reports a `throw` statement whose exceptions are always caught by the containing `try` statement. Using `throw` statements as a `goto` to change the local flow of control is confusing." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ExceptionCaughtLocallyJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Try statement issues", + "index": 42, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ThrowFromFinallyBlockJS", + "shortDescription": { + "text": "'throw' inside 'finally' block" + }, + "fullDescription": { + "text": "Reports s 'throw' statement inside a 'finally' block. Such 'throw' statements may mask exceptions thrown, and complicate debugging.", + "markdown": "Reports s `throw` statement inside a `finally` block. Such `throw` statements may mask exceptions thrown, and complicate debugging." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ThrowInsideFinallyBlockJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Try statement issues", + "index": 42, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptValidateGenericTypes", + "shortDescription": { + "text": "Incorrect generic type argument" + }, + "fullDescription": { + "text": "Reports an invalid type argument in a function, interface, or class declaration.", + "markdown": "Reports an invalid type argument in a function, interface, or class declaration." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "TypeScriptValidateGenericTypes", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CyclomaticComplexityJS", + "shortDescription": { + "text": "Overly complex function" + }, + "fullDescription": { + "text": "Reports a function with too many branching points in a function (too high cyclomatic complexity). Such functions may be confusing and hard to test. Use the field provided below to specify the maximum acceptable cyclomatic complexity for a function.", + "markdown": "Reports a function with too many branching points in a function (too high cyclomatic complexity). Such functions may be confusing and hard to test.\n\n\nUse the field provided below to specify the maximum acceptable cyclomatic complexity for a function." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "OverlyComplexFunctionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Function metrics", + "index": 44, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSMismatchedCollectionQueryUpdate", + "shortDescription": { + "text": "Mismatched query and update of collection" + }, + "fullDescription": { + "text": "Reports a collection of fields or variables whose contents are either queried and not updated or updated and not queried. Such mismatched queries and updates are pointless and may indicate either dead code or a typographical error. Query methods are automatically detected, based on whether they return something, or a callback is passed to them. Use the table below to specify which methods are update methods.", + "markdown": "Reports a collection of fields or variables whose contents are either queried and not updated or updated and not queried. Such mismatched queries and updates are pointless and may indicate either dead code or a typographical error.\n\n\nQuery methods are automatically detected, based on whether they return something, or a callback is passed to them.\nUse the table below to specify which methods are update methods." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSMismatchedCollectionQueryUpdate", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PackageJsonMismatchedDependency", + "shortDescription": { + "text": "Mismatched dependencies in package.json" + }, + "fullDescription": { + "text": "Reports a dependency from package.json that is not installed or doesn't match the specified version range.", + "markdown": "Reports a dependency from package.json that is not installed or doesn't match the specified [version range](https://docs.npmjs.com/about-semantic-versioning)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PackageJsonMismatchedDependency", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Imports and dependencies", + "index": 57, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSPotentiallyInvalidUsageOfThis", + "shortDescription": { + "text": "Potentially invalid reference to 'this' from closure" + }, + "fullDescription": { + "text": "Reports a 'this' in closure that is used for referencing properties of outer context. Example: 'function Outer() {\n this.outerProp = 1;\n function inner() {\n // bad, because 'outerProp' of Outer\n // won't be updated here\n // on calling 'new Outer()' as may be expected\n this.outerProp = 2;\n }\n inner();\n}'", + "markdown": "Reports a `this` in closure that is used for referencing properties of outer context.\n\nExample:\n\n\n function Outer() {\n this.outerProp = 1;\n function inner() {\n // bad, because 'outerProp' of Outer\n // won't be updated here\n // on calling 'new Outer()' as may be expected\n this.outerProp = 2;\n }\n inner();\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSPotentiallyInvalidUsageOfThis", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Probable bugs", + "index": 22, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSMissingSwitchDefault", + "shortDescription": { + "text": "'switch' statement has no 'default' branch" + }, + "fullDescription": { + "text": "Reports a 'switch' statement without a 'default' clause when some possible values are not enumerated.", + "markdown": "Reports a `switch` statement without a `default` clause when some possible values are not enumerated." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "JSMissingSwitchDefault", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Switch statement issues", + "index": 63, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSXNamespaceValidation", + "shortDescription": { + "text": "Missing JSX namespace" + }, + "fullDescription": { + "text": "Reports a usage of a JSX construction without importing namespace. Having the namespace in the file scope ensures proper code compilation.", + "markdown": "Reports a usage of a JSX construction without importing namespace. Having the namespace in the file scope ensures proper code compilation." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSXNamespaceValidation", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Imports and dependencies", + "index": 57, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSUnresolvedLibraryURL", + "shortDescription": { + "text": "Missed locally stored library for HTTP link" + }, + "fullDescription": { + "text": "Reports a URL of an external JavaScript library that is not associated with any locally stored file. Suggests downloading the library. Such association enables the IDE to provide proper code completion and navigation.", + "markdown": "Reports a URL of an external JavaScript library that is not associated with any locally stored file. Suggests downloading the library. Such association enables the IDE to provide proper code completion and navigation." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSUnresolvedLibraryURL", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6PreferShortImport", + "shortDescription": { + "text": "Import can be shortened" + }, + "fullDescription": { + "text": "Reports an ES6 import whose 'from' part can be shortened. Suggests importing the parent directory.", + "markdown": "Reports an ES6 import whose `from` part can be shortened. Suggests importing the parent directory." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ES6PreferShortImport", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PointlessBitwiseExpressionJS", + "shortDescription": { + "text": "Bitwise expression can be simplified" + }, + "fullDescription": { + "text": "Reports an expression that includes 'and' with zero, 'or' by zero, or shifting by zero. Such expressions may result from not fully completed automated refactorings.", + "markdown": "Reports an expression that includes `and` with zero, `or` by zero, or shifting by zero. Such expressions may result from not fully completed automated refactorings." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PointlessBitwiseExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Bitwise operation issues", + "index": 29, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "InfiniteLoopJS", + "shortDescription": { + "text": "Infinite loop statement" + }, + "fullDescription": { + "text": "Reports a 'for', 'while', or 'do' statement which can only exit by throwing an exception. Such statements often indicate coding errors.", + "markdown": "Reports a `for`, `while`, or `do` statement which can only exit by throwing an exception. Such statements often indicate coding errors." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "InfiniteLoopJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Probable bugs", + "index": 22, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSStringConcatenationToES6Template", + "shortDescription": { + "text": "String concatenation is used instead of template literal" + }, + "fullDescription": { + "text": "Reports a string concatenation. Suggests replacing it with a template literal Example '\"result: \" + a + \".\"' After applying the quick-fix the code looks as follows: '`result: ${a}.`'", + "markdown": "Reports a string concatenation. Suggests replacing it with a [template literal](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)\n\nExample\n\n \"result: \" + a + \".\" \n\nAfter applying the quick-fix the code looks as follows:\n\n `result: ${a}.` \n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSStringConcatenationToES6Template", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/ES2015 migration aids", + "index": 30, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSArrowFunctionBracesCanBeRemoved", + "shortDescription": { + "text": "Redundant braces around arrow function body" + }, + "fullDescription": { + "text": "Reports an arrow function whose body only consists of braces and exactly one statement. Suggests converting to concise syntax without braces. 'let incrementer = (x) => {return x + 1};' After the quick-fix is applied, the code fragment looks as follows: 'let incrementer = (x) => x + 1;'", + "markdown": "Reports an arrow function whose body only consists of braces and exactly one statement. Suggests converting to concise syntax without braces.\n\n\n let incrementer = (x) => {return x + 1};\n\nAfter the quick-fix is applied, the code fragment looks as follows:\n\n\n let incrementer = (x) => x + 1;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSArrowFunctionBracesCanBeRemoved", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Code style issues", + "index": 17, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ReplaceAssignmentWithOperatorAssignmentJS", + "shortDescription": { + "text": "Assignment could be replaced with operator assignment" + }, + "fullDescription": { + "text": "Reports an assignment operation that can be replaced by an operator assignment to make your code shorter and probably clearer. Example: 'x = x + 3;'\n 'x = x / 3;'\n After the quick fix is applied the result looks like: 'x += 3;'\n 'x /= 3;'", + "markdown": "Reports an assignment operation that can be replaced by an operator assignment to make your code shorter and probably clearer.\n\n\nExample:\n\n x = x + 3;\n x = x / 3;\n\nAfter the quick fix is applied the result looks like:\n\n x += 3;\n x /= 3;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "AssignmentReplaceableWithOperatorAssignmentJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Assignment issues", + "index": 48, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSFileReferences", + "shortDescription": { + "text": "Unresolved file reference" + }, + "fullDescription": { + "text": "Reports an unresolved file reference in a JavaScript file, including CommonJS and AMD modules references.", + "markdown": "Reports an unresolved file reference in a JavaScript file, including CommonJS and AMD modules references." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSFileReferences", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "FunctionWithInconsistentReturnsJS", + "shortDescription": { + "text": "Function with inconsistent returns" + }, + "fullDescription": { + "text": "Reports a function that returns a value in some cases while in other cases no value is returned. This usually indicates an error. Example: 'function foo() {\n if (true)\n return 3;\n return;\n}'", + "markdown": "Reports a function that returns a value in some cases while in other cases no value is returned. This usually indicates an error.\n\nExample:\n\n\n function foo() {\n if (true)\n return 3;\n return;\n }\n\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "FunctionWithInconsistentReturnsJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Validity issues", + "index": 35, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "EmptyTryBlockJS", + "shortDescription": { + "text": "Empty 'try' block" + }, + "fullDescription": { + "text": "Reports an empty 'try' block, which usually indicates an error.", + "markdown": "Reports an empty `try` block, which usually indicates an error." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "EmptyTryBlockJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Try statement issues", + "index": 42, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6ClassMemberInitializationOrder", + "shortDescription": { + "text": "Use of possibly unassigned property in a static initializer" + }, + "fullDescription": { + "text": "Reports a class member initializer which references another non-hoisted class member while the latter may be not initialized yet. Initialization of class members happens consequently for fields, so a field cannot reference another field that is declared later.", + "markdown": "Reports a class member initializer which references another non-hoisted class member while the latter may be not initialized yet. \n\nInitialization of class members happens consequently for fields, so a field cannot reference another field that is declared later." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ES6ClassMemberInitializationOrder", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ReservedWordUsedAsNameJS", + "shortDescription": { + "text": "Reserved word used as name" + }, + "fullDescription": { + "text": "Reports a JavaScript reserved word used as a name. The JavaScript specification reserves a number of words which are currently not used as keywords. Using those words as identifiers may result in broken code if later versions of JavaScript start using them as keywords.", + "markdown": "Reports a JavaScript reserved word used as a name. The JavaScript specification reserves a number of words which are currently not used as keywords. Using those words as identifiers may result in broken code if later versions of JavaScript start using them as keywords." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ReservedWordAsName", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Validity issues", + "index": 35, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSClassNamingConvention", + "shortDescription": { + "text": "Class naming convention" + }, + "fullDescription": { + "text": "Reports a class or a function that is annotated with a JSDoc '@constructor' or '@class' tag whose names are too short, too long, or do not follow the specified regular expression pattern. Use the fields provided below to specify minimum length, maximum length, and a regular expression expected for classes names. Use the standard 'java.util.regex' format for regular expressions.", + "markdown": "Reports a class or a function that is annotated with a JSDoc `@constructor` or `@class` tag whose names are too short, too long, or do not follow the specified regular expression pattern.\n\n\nUse the fields provided below to specify minimum length, maximum length, and a regular expression\nexpected for classes names. Use the standard `java.util.regex` format for regular expressions." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSClassNamingConvention", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Naming conventions", + "index": 62, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NestedFunctionJS", + "shortDescription": { + "text": "Nested function" + }, + "fullDescription": { + "text": "Reports a function nested inside another function. Although JavaScript allows functions to be nested, such constructs may be confusing. Use the checkbox below to ignore anonymous nested functions.", + "markdown": "Reports a function nested inside another function. Although JavaScript allows functions to be nested, such constructs may be confusing.\n\n\nUse the checkbox below to ignore anonymous nested functions." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "NestedFunctionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 37, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XHTMLIncompatabilitiesJS", + "shortDescription": { + "text": "Incompatible XHTML usages" + }, + "fullDescription": { + "text": "Reports common JavaScript DOM patterns which may present problems with XHTML documents. In particular, the patterns detected will behave completely differently depending on whether the document is loaded as XML or HTML. This can result in subtle bugs where script behaviour is dependent on the MIME-type of the document, rather than its content. Patterns detected include document.body, document.images, document.applets, document.links, document.forms, and document.anchors.", + "markdown": "Reports common JavaScript DOM patterns which may present problems with XHTML documents. In particular, the patterns detected will behave completely differently depending on whether the document is loaded as XML or HTML. This can result in subtle bugs where script behaviour is dependent on the MIME-type of the document, rather than its content. Patterns detected include **document.body** , **document.images** , **document.applets** , **document.links** , **document.forms** , and **document.anchors**." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "XHTMLIncompatabilitiesJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/DOM issues", + "index": 64, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "IncrementDecrementResultUsedJS", + "shortDescription": { + "text": "Result of increment or decrement used" + }, + "fullDescription": { + "text": "Reports an increment ('++') or decrement ('--') expression where the result of the assignment is used in a containing expression. Such assignments can result in confusion due to the order of operations, as evaluation of the assignment may affect the outer expression in unexpected ways. Example: 'var a = b++'", + "markdown": "Reports an increment (`++`) or decrement (`--`) expression where the result of the assignment is used in a containing expression. Such assignments can result in confusion due to the order of operations, as evaluation of the assignment may affect the outer expression in unexpected ways. Example: `var a = b++`" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "IncrementDecrementResultUsedJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 37, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SuspiciousTypeOfGuard", + "shortDescription": { + "text": "Unsound type guard check" + }, + "fullDescription": { + "text": "Reports a 'typeof' or 'instanceof' unsound type guard check. The 'typeof x' type guard can be unsound in one of the following two cases: 'typeof x' never corresponds to the specified value (for example, 'typeof x === 'number'' when 'x' is of the type 'string | boolean') 'typeof x' always corresponds to the specified value (for example, 'typeof x === 'string'' when 'x' is of the type 'string') The 'x instanceof A' type guard can be unsound in one of the following two cases: The type of 'x' is not related to 'A' The type of 'x' is 'A' or a subtype of 'A'", + "markdown": "Reports a `typeof` or `instanceof` unsound type guard check. The `typeof x` type guard can be unsound in one of the following two cases:\n\n* `typeof x` never corresponds to the specified value (for example, `typeof x === 'number'` when `x` is of the type 'string \\| boolean')\n* `typeof x` always corresponds to the specified value (for example, `typeof x === 'string'` when `x` is of the type 'string')\n\nThe `x instanceof A` type guard can be unsound in one of the following two cases:\n\n* The type of `x` is not related to `A`\n* The type of `x` is `A` or a subtype of `A`" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "SuspiciousTypeOfGuard", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Control flow issues", + "index": 2, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptJSXUnresolvedComponent", + "shortDescription": { + "text": "Unresolved JSX component" + }, + "fullDescription": { + "text": "Reports an unresolved reference to a JSX component. Suggests adding an import statement if the referenced component is defined in the project or its dependencies or creating a new component with the specified name. The template for a new component can be modified in Editor | File and Code Templates.", + "markdown": "Reports an unresolved reference to a JSX component. Suggests adding an import statement if the referenced component is defined in the project or its dependencies or creating a new component with the specified name.\n\nThe template for a new component can be modified in Editor \\| File and Code Templates." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "TypeScriptJSXUnresolvedComponent", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptFieldCanBeMadeReadonly", + "shortDescription": { + "text": "Field can be readonly" + }, + "fullDescription": { + "text": "Reports a private field that can be made readonly (for example, if the field is assigned only in the constructor).", + "markdown": "Reports a private field that can be made readonly (for example, if the field is assigned only in the constructor)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "TypeScriptFieldCanBeMadeReadonly", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6DestructuringVariablesMerge", + "shortDescription": { + "text": "Destructuring properties with the same key" + }, + "fullDescription": { + "text": "Reports multiple destructuring properties with identical keys. Suggests merging the properties.", + "markdown": "Reports multiple destructuring properties with identical keys. Suggests merging the properties." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6DestructuringVariablesMerge", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "LoopStatementThatDoesntLoopJS", + "shortDescription": { + "text": "Loop statement that doesn't loop" + }, + "fullDescription": { + "text": "Reports a 'for', 'while', or 'do' statement whose bodies are guaranteed to execute at most once. Normally, this indicates an error.", + "markdown": "Reports a `for`, `while`, or `do` statement whose bodies are guaranteed to execute at most once. Normally, this indicates an error." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "LoopStatementThatDoesntLoopJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Control flow issues", + "index": 2, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NegatedIfStatementJS", + "shortDescription": { + "text": "Negated 'if' statement" + }, + "fullDescription": { + "text": "Reports if statements which have an else branch and a negated condition. Flipping the order of the if and else branches will usually increase the clarity of such statements.", + "markdown": "Reports **if** statements which have an **else** branch and a negated condition. Flipping the order of the **if** and **else** branches will usually increase the clarity of such statements." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "NegatedIfStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 37, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSNonASCIINames", + "shortDescription": { + "text": "Identifiers with non-ASCII symbols" + }, + "fullDescription": { + "text": "Reports a non-ASCII symbol in a name. If the 'Allow only ASCII names' option is selected, reports all names that contain non-ASCII symbols. Otherwise reports all names that contain both ASCII and non-ASCII symbols.", + "markdown": "Reports a non-ASCII symbol in a name. \n\nIf the 'Allow only ASCII names' option is selected, reports all names that contain non-ASCII symbols. \nOtherwise reports all names that contain both ASCII and non-ASCII symbols." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSNonASCIINames", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Naming conventions", + "index": 62, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptRedundantGenericType", + "shortDescription": { + "text": "Redundant type arguments" + }, + "fullDescription": { + "text": "Reports a type argument that is equal to the default one and can be removed. Example: 'type Foo = T;\nlet z: Foo;'", + "markdown": "Reports a type argument that is equal to the default one and can be removed.\n\n\nExample:\n\n\n type Foo = T;\n let z: Foo;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "TypeScriptRedundantGenericType", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptUMDGlobal", + "shortDescription": { + "text": "Referenced UMD global variable" + }, + "fullDescription": { + "text": "Reports a usage of a Universal Module Definition (UMD) global variable if the current file is a module (ECMAScript or CommonJS). Referencing UMD variables without explicit imports can lead to a runtime error if the library isn't included implicitly.", + "markdown": "Reports a usage of a Universal Module Definition (UMD) global variable if the current file is a module (ECMAScript or CommonJS). Referencing UMD variables without explicit imports can lead to a runtime error if the library isn't included implicitly." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "TypeScriptUMDGlobal", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnnecessaryReturnJS", + "shortDescription": { + "text": "Unnecessary 'return' statement" + }, + "fullDescription": { + "text": "Reports an unnecessary 'return' statement, that is, a 'return' statement that returns no value and occurs just before the function would have \"fallen through\" the bottom. These statements may be safely removed.", + "markdown": "Reports an unnecessary `return` statement, that is, a `return` statement that returns no value and occurs just before the function would have \"fallen through\" the bottom. These statements may be safely removed." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "UnnecessaryReturnStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Control flow issues", + "index": 2, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ConditionalExpressionWithIdenticalBranchesJS", + "shortDescription": { + "text": "Conditional expression with identical branches" + }, + "fullDescription": { + "text": "Reports a ternary conditional expression with identical 'then' and 'else' branches.", + "markdown": "Reports a ternary conditional expression with identical `then` and `else` branches." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "ConditionalExpressionWithIdenticalBranchesJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Control flow issues", + "index": 2, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSAnnotator", + "shortDescription": { + "text": "ECMAScript specification is not followed" + }, + "fullDescription": { + "text": "Reports basic syntax issues and inconsistencies with language specification, such as invalid usages of keywords, usages of incompatible numeric format, or multiple parameters to getters/setters. Generally, such errors must always be reported and shouldn't be disabled. But in some cases, such as issues due to the dynamic nature of JavaScript, the use of not yet supported language features, or bugs in IDE's checker, it may be handy to disable reporting these very basic errors.", + "markdown": "Reports basic syntax issues and inconsistencies with language specification, such as invalid usages of keywords, usages of incompatible numeric format, or multiple parameters to getters/setters. \nGenerally, such errors must always be reported and shouldn't be disabled. But in some cases, such as issues due to the dynamic nature of JavaScript, the use of not yet supported language features, or bugs in IDE's checker, it may be handy to disable reporting these very basic errors." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "JSAnnotator", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSUnfilteredForInLoop", + "shortDescription": { + "text": "Unfiltered for..in loop" + }, + "fullDescription": { + "text": "Reports unfiltered 'for-in' loops. The use of this construct results in processing not only own properties of an object but properties from its prototype as well. It may be unexpected in some specific cases, for example, in utility methods that copy or modify all properties or when 'Object''s prototype may be incorrectly modified. For example, the following code will print 42 and myMethod: 'Object.prototype.myMethod = function myMethod() {};\nlet a = { foo: 42 };\nfor (let i in a) {\n console.log(a[i]);\n}' Suggests replacing the whole loop with a 'Object.keys()' method or adding a 'hasOwnProperty()' check. After applying the quick-fix the code looks as follows: 'for (let i in a) {\n if (a.hasOwnProperty(i)) {\n console.log(a[i]);\n }\n}'", + "markdown": "Reports unfiltered `for-in` loops. \n\nThe use of this construct results in processing not only own properties of an object but properties from its prototype as well. It may be unexpected in some specific cases, for example, in utility methods that copy or modify all properties or when `Object`'s prototype may be incorrectly modified. For example, the following code will print **42** and **myMethod** : \n\n\n Object.prototype.myMethod = function myMethod() {};\n let a = { foo: 42 };\n for (let i in a) {\n console.log(a[i]);\n }\n\nSuggests replacing the whole loop with a `Object.keys()` method or adding a `hasOwnProperty()` check. After applying the quick-fix the code looks as follows:\n\n\n for (let i in a) {\n if (a.hasOwnProperty(i)) {\n console.log(a[i]);\n }\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSUnfilteredForInLoop", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSIncompatibleTypesComparison", + "shortDescription": { + "text": "Comparison of expressions having incompatible types" + }, + "fullDescription": { + "text": "Reports a comparison with operands of incompatible types or an operand with a type without possible common values.", + "markdown": "Reports a comparison with operands of incompatible types or an operand with a type without possible common values." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSIncompatibleTypesComparison", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Probable bugs", + "index": 22, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSLastCommaInObjectLiteral", + "shortDescription": { + "text": "Unneeded last comma in object literal" + }, + "fullDescription": { + "text": "Reports usages of a trailing comma in object literals. The warning is reported only when the JavaScript language version is set to ECMAScript 5.1. Trailing commas in object literals are allowed by the specification, however, some browsers might throw an error when a trailing comma is used. You can configure formatting options for trailing commas in Code Style | JavaScript or TypeScript | Punctuation.", + "markdown": "Reports usages of a trailing comma in object literals.\n\nThe warning is reported only when the JavaScript language version is set to ECMAScript 5.1.\n\nTrailing commas in object literals are allowed by the specification, however, some browsers might throw an error when a trailing comma is used.\n\nYou can configure formatting options for trailing commas in **Code Style** \\| **JavaScript** or **TypeScript** \\| **Punctuation**." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSLastCommaInObjectLiteral", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSFunctionExpressionToArrowFunction", + "shortDescription": { + "text": "Function expression is used instead of arrow function" + }, + "fullDescription": { + "text": "Reports a function expression. Suggests converting it to an arrow function. Example: 'arr.map(function(el) {return el + 1})' After applying the quick-fix the code looks as follows: 'arr.map(el => el + 1)'", + "markdown": "Reports a [function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/function) expression. Suggests converting it to an [arrow function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions).\n\nExample:\n\n arr.map(function(el) {return el + 1})\n\nAfter applying the quick-fix the code looks as follows:\n\n arr.map(el => el + 1)\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSFunctionExpressionToArrowFunction", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/ES2015 migration aids", + "index": 30, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6TopLevelAwaitExpression", + "shortDescription": { + "text": "Top-level 'await' expression" + }, + "fullDescription": { + "text": "Reports a usage of a top-level 'await' expression. While the new 'top-level async' proposal is on its way, using 'await' outside async functions is not allowed.", + "markdown": "Reports a usage of a top-level `await` expression. While the new 'top-level async' proposal is on its way, using `await` outside async functions is not allowed." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "ES6TopLevelAwaitExpression", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Async code and promises", + "index": 65, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6MissingAwait", + "shortDescription": { + "text": "Missing await for an async function call" + }, + "fullDescription": { + "text": "Reports an 'async' function call without an expected 'await' prefix inside an 'async' function. Such call returns a 'Promise' and control flow is continued immediately. Example: 'async function bar() { /* ... */ }\nasync function foo() {\n bar(); // bad\n}' After the quick-fix is applied, the 'await' prefix is added: 'async function bar() { /* ... */ }\nasync function foo() {\n await bar(); // good\n}' When the 'Report for promises in return statements' checkbox is selected, also suggests adding 'await' in return statements. While this is generally not necessary, it gives two main benefits. You won't forget to add 'await' when surrounding your code with 'try-catch'. An explicit 'await' helps V8 runtime to provide async stack traces.", + "markdown": "Reports an `async` function call without an expected `await` prefix inside an `async` function. Such call returns a `Promise` and control flow is continued immediately.\n\nExample:\n\n\n async function bar() { /* ... */ }\n async function foo() {\n bar(); // bad\n }\n\n\nAfter the quick-fix is applied, the `await` prefix is added:\n\n\n async function bar() { /* ... */ }\n async function foo() {\n await bar(); // good\n }\n\nWhen the 'Report for promises in return statements' checkbox is selected, also suggests adding `await` in return statements. \nWhile this is generally not necessary, it gives two main benefits. \n\n* You won't forget to add `await` when surrounding your code with `try-catch`.\n* An explicit `await` helps V8 runtime to provide [async stack traces](https://bit.ly/v8-zero-cost-async-stack-traces)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6MissingAwait", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Async code and promises", + "index": 65, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TailRecursionJS", + "shortDescription": { + "text": "Tail recursion" + }, + "fullDescription": { + "text": "Reports a tail recursion, that is, when a function calls itself as its last action before returning. A tail recursion can always be replaced by looping, which will be considerably faster. Some JavaScript engines perform this optimization, while others do not. Thus, tail recursive solutions may have considerably different performance characteristics in different environments.", + "markdown": "Reports a tail recursion, that is, when a function calls itself as its last action before returning. A tail recursion can always be replaced by looping, which will be considerably faster. Some JavaScript engines perform this optimization, while others do not. Thus, tail recursive solutions may have considerably different performance characteristics in different environments." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "TailRecursionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Control flow issues", + "index": 2, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6ConvertToForOf", + "shortDescription": { + "text": "'for..in' is used instead of 'for..of'" + }, + "fullDescription": { + "text": "Reports a usage of a 'for..in' loop on an array. Suggests replacing it with a 'for..of' loop. 'for..of' loops, which are introduced in ECMAScript 6, iterate over 'iterable' objects. For arrays, this structure is preferable to 'for..in', because it works only with array values but not with array object's properties.", + "markdown": "Reports a usage of a [for..in](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) loop on an array. Suggests replacing it with a [for..of](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) loop. \n`for..of` loops, which are introduced in ECMAScript 6, iterate over `iterable` objects. For arrays, this structure is preferable to `for..in`, because it works only with array values but not with array object's properties." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6ConvertToForOf", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/ES2015 migration aids", + "index": 30, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "FlowJSCoverage", + "shortDescription": { + "text": "Code is not covered by Flow" + }, + "fullDescription": { + "text": "Reports JavaScript code fragments that are not covered by the Flow type checker. To use this inspection, configure the Flow executable in Settings | Languages & Frameworks | JavaScript.", + "markdown": "Reports JavaScript code fragments that are not covered by the Flow type checker. To use this inspection, configure the Flow executable in [Settings \\| Languages \\& Frameworks \\| JavaScript](settings://Settings.JavaScript)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "FlowJSCoverage", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Flow type checker", + "index": 20, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ParameterNamingConventionJS", + "shortDescription": { + "text": "Function parameter naming convention" + }, + "fullDescription": { + "text": "Reports a function parameter whose name is too short, too long, or doesn't follow the specified regular expression pattern. Use the fields provided below to specify minimum length, maximum length and regular expression expected for local variables names. Use the standard 'java.util.regex' format regular expressions.", + "markdown": "Reports a function parameter whose name is too short, too long, or doesn't follow the specified regular expression pattern.\n\n\nUse the fields provided below to specify minimum length, maximum length and regular expression\nexpected for local variables names. Use the standard `java.util.regex` format regular expressions." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ParameterNamingConventionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Naming conventions", + "index": 62, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSUndefinedPropertyAssignment", + "shortDescription": { + "text": "Undefined property assignment" + }, + "fullDescription": { + "text": "Reports an assignment to a property that is not defined in the type of a variable. Example: '/**\n * @type {{ property1: string, property2: number }}\n */\nlet myVariable = create();\n\nmyVariable.newProperty = 3; // bad'", + "markdown": "Reports an assignment to a property that is not defined in the type of a variable.\n\nExample:\n\n\n /**\n * @type {{ property1: string, property2: number }}\n */\n let myVariable = create();\n\n myVariable.newProperty = 3; // bad\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSUndefinedPropertyAssignment", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Code style issues", + "index": 17, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "StandardJS", + "shortDescription": { + "text": "Standard code style" + }, + "fullDescription": { + "text": "Reports a discrepancy detected by the JavaScript Standard Style linter. The highlighting severity in the editor is based on the severity level the linter reports.", + "markdown": "Reports a discrepancy detected by the [JavaScript Standard Style](https://standardjs.com/) linter. \n\nThe highlighting severity in the editor is based on the severity level the linter reports." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "StandardJS", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Code quality tools", + "index": 66, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ParametersPerFunctionJS", + "shortDescription": { + "text": "Function with too many parameters" + }, + "fullDescription": { + "text": "Reports a function with too many parameters. Such functions often indicate problems with design. Use the field below to specify the maximum acceptable number of parameters for a function.", + "markdown": "Reports a function with too many parameters. Such functions often indicate problems with design.\n\n\nUse the field below to specify the maximum acceptable number of parameters for a function." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "OverlyComplexFunctionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Function metrics", + "index": 44, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ThisExpressionReferencesGlobalObjectJS", + "shortDescription": { + "text": "'this' expression which references the global object" + }, + "fullDescription": { + "text": "Reports a 'this' expression outside an object literal or a constructor body. Such 'this' expressions reference the top-level \"global\" JavaScript object, but are mostly useless.", + "markdown": "Reports a `this` expression outside an object literal or a constructor body. Such `this` expressions reference the top-level \"global\" JavaScript object, but are mostly useless." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "ThisExpressionReferencesGlobalObjectJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Validity issues", + "index": 35, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NestedAssignmentJS", + "shortDescription": { + "text": "Nested assignment" + }, + "fullDescription": { + "text": "Reports an assignment expression nested inside another expression, for example, 'a = b = 1'. Such expressions may be confusing and violate the general design principle that a given construct should do precisely one thing.", + "markdown": "Reports an assignment expression nested inside another expression, for example, `a = b = 1`. Such expressions may be confusing and violate the general design principle that a given construct should do precisely one thing." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "NestedAssignmentJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Assignment issues", + "index": 48, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DefaultNotLastCaseInSwitchJS", + "shortDescription": { + "text": "'default' not last case in 'switch'" + }, + "fullDescription": { + "text": "Reports a 'switch' statement where the 'default' case comes before another case instead of being the very last case, which may cause confusion.", + "markdown": "Reports a `switch` statement where the `default` case comes before another case instead of being the very last case, which may cause confusion." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "DefaultNotLastCaseInSwitchJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Switch statement issues", + "index": 63, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ConfusingPlusesOrMinusesJS", + "shortDescription": { + "text": "Confusing sequence of '+' or '-'" + }, + "fullDescription": { + "text": "Reports a suspicious combination of '+' or '-' characters in JavaScript code (for example, 'a+++b'. Such sequences are confusing, and their semantics may change through changes in the whitespace.", + "markdown": "Reports a suspicious combination of `+` or `-` characters in JavaScript code (for example, `a+++b`. Such sequences are confusing, and their semantics may change through changes in the whitespace." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ConfusingPlusesOrMinusesJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 37, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSDeprecatedSymbols", + "shortDescription": { + "text": "Deprecated symbol used" + }, + "fullDescription": { + "text": "Reports a usage of a deprecated function variable.", + "markdown": "Reports a usage of a deprecated function variable." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "JSDeprecatedSymbols", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "LocalVariableNamingConventionJS", + "shortDescription": { + "text": "Local variable naming convention" + }, + "fullDescription": { + "text": "Reports a local variable whose name is too short, too long, or doesn't follow the specified regular expression pattern. Use the fields provided below to specify minimum length, maximum length, and a regular expression expected for local variables names. Use the standard 'java.util.regex' format regular expressions.", + "markdown": "Reports a local variable whose name is too short, too long, or doesn't follow the specified regular expression pattern.\n\n\nUse the fields provided below to specify minimum length, maximum length, and a regular expression\nexpected for local variables names. Use the standard `java.util.regex` format regular expressions." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "LocalVariableNamingConventionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Naming conventions", + "index": 62, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "EmptyFinallyBlockJS", + "shortDescription": { + "text": "Empty 'finally' block" + }, + "fullDescription": { + "text": "Reports an empty 'finally' block, which usually indicates an error.", + "markdown": "Reports an empty `finally` block, which usually indicates an error." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "EmptyFinallyBlockJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Try statement issues", + "index": 42, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSCommentMatchesSignature", + "shortDescription": { + "text": "Mismatched JSDoc and function signature" + }, + "fullDescription": { + "text": "Reports mismatch between the names and the number of parameters within a JSDoc comment and the actual parameters of a function. Suggests updating parameters in JSDoc comment. Example: '/**\n * @param height Height in pixels\n */\nfunction sq(height, width) {} // width is not documented' After the quick-fix is applied: '/**\n * @param height Height in pixels\n * @param width\n */\nfunction sq(height, width) {}'", + "markdown": "Reports mismatch between the names and the number of parameters within a JSDoc comment and the actual parameters of a function. Suggests updating parameters in JSDoc comment.\n\n**Example:**\n\n\n /**\n * @param height Height in pixels\n */\n function sq(height, width) {} // width is not documented\n\nAfter the quick-fix is applied:\n\n\n /**\n * @param height Height in pixels\n * @param width\n */\n function sq(height, width) {}\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSCommentMatchesSignature", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UpdateDependencyToLatestVersion", + "shortDescription": { + "text": "Update package.json dependencies to latest versions" + }, + "fullDescription": { + "text": "Suggests to upgrade your package.json dependencies to the latest versions, ignoring specified versions.", + "markdown": "Suggests to upgrade your package.json dependencies to the latest versions, ignoring specified versions." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "UpdateDependencyToLatestVersion", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Imports and dependencies", + "index": 57, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptConfig", + "shortDescription": { + "text": "Inconsistent tsconfig.json properties" + }, + "fullDescription": { + "text": "Reports inconsistency of a 'paths', 'checkJs', or 'extends' property in a tsconfig.json file. The 'checkJs' property requires 'allowJs'. The 'extends' property should be a valid file reference.", + "markdown": "Reports inconsistency of a `paths`, `checkJs`, or `extends` property in a tsconfig.json file. \nThe `checkJs` property requires `allowJs`. \nThe `extends` property should be a valid file reference." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "TypeScriptConfig", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSSuspiciousNameCombination", + "shortDescription": { + "text": "Suspicious variable/parameter name combination" + }, + "fullDescription": { + "text": "Reports an assignment or a function call where the name of the target variable or the function parameter does not match the name of the value assigned to it. Example: 'var x = 0;\n var y = x;' or 'var x = 0, y = 0;\n var rc = new Rectangle(y, x, 20, 20);' Here the inspection guesses that 'x' and 'y' are mixed up. Specify the names that should not be used together. An error is reported if a parameter name or an assignment target name contains words from one group while the name of the assigned or passed variable contains words from another group.", + "markdown": "Reports an assignment or a function call where the name of the target variable or the function parameter does not match the name of the value assigned to it.\n\nExample:\n\n\n var x = 0;\n var y = x;\n\nor\n\n\n var x = 0, y = 0;\n var rc = new Rectangle(y, x, 20, 20);\n\nHere the inspection guesses that `x` and `y` are mixed up.\n\nSpecify the names that should not be used together. An error is reported\nif a parameter name or an assignment target name contains words from one group while the name of the assigned or passed\nvariable contains words from another group." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSSuspiciousNameCombination", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Probable bugs", + "index": 22, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSUnresolvedExtXType", + "shortDescription": { + "text": "Unresolved Ext JS xtype" + }, + "fullDescription": { + "text": "Reports an Ext JS 'xtype' reference that doesn't have a corresponding class.", + "markdown": "Reports an Ext JS `xtype` reference that doesn't have a corresponding class." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSUnresolvedExtXType", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ForLoopThatDoesntUseLoopVariableJS", + "shortDescription": { + "text": "'for' loop where update or condition does not use loop variable" + }, + "fullDescription": { + "text": "Reports a 'for' loop where the condition or update does not use the 'for' loop variable.", + "markdown": "Reports a `for` loop where the condition or update does not use the `for` loop variable." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ForLoopThatDoesntUseLoopVariableJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Probable bugs", + "index": 22, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptAbstractClassConstructorCanBeMadeProtected", + "shortDescription": { + "text": "Abstract class constructor can be made protected" + }, + "fullDescription": { + "text": "Reports a public constructor of an abstract class and suggests making it protected (because it is useless to have it public).", + "markdown": "Reports a public constructor of an abstract class and suggests making it protected (because it is useless to have it public)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "TypeScriptAbstractClassConstructorCanBeMadeProtected", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/TypeScript", + "index": 34, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "FunctionWithMultipleReturnPointsJS", + "shortDescription": { + "text": "Function with multiple return points" + }, + "fullDescription": { + "text": "Reports a function with multiple return points. Such functions are hard to understand and maintain.", + "markdown": "Reports a function with multiple return points. Such functions are hard to understand and maintain." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "FunctionWithMultipleReturnPointsJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Function metrics", + "index": 44, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSIgnoredPromiseFromCall", + "shortDescription": { + "text": "Result of method call returning a promise is ignored" + }, + "fullDescription": { + "text": "Reports a function call that returns a 'Promise' that is not used later. Such calls are usually unintended and indicate an error.", + "markdown": "Reports a function call that returns a `Promise` that is not used later. Such calls are usually unintended and indicate an error." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSIgnoredPromiseFromCall", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Async code and promises", + "index": 65, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ThreeNegationsPerFunctionJS", + "shortDescription": { + "text": "Function with more than three negations" + }, + "fullDescription": { + "text": "Reports a function with three or more negation operations ('!' or '!='). Such functions may be unnecessarily confusing.", + "markdown": "Reports a function with three or more negation operations (`!` or `!=`). Such functions may be unnecessarily confusing." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "FunctionWithMoreThanThreeNegationsJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Function metrics", + "index": 44, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSRemoveUnnecessaryParentheses", + "shortDescription": { + "text": "Unnecessary parentheses" + }, + "fullDescription": { + "text": "Reports redundant parentheses. In expressions: 'var x = ((1) + 2) + 3' In arrow function argument lists: 'var incrementer = (x) => x + 1' In TypeScript and Flow type declarations: 'type Card = (Suit & Rank) | (Suit & Number)'", + "markdown": "Reports redundant parentheses.\n\nIn expressions:\n\n var x = ((1) + 2) + 3\n\nIn arrow function argument lists:\n\n var incrementer = (x) => x + 1\n\nIn TypeScript and Flow type declarations:\n\n type Card = (Suit & Rank) | (Suit & Number)\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSRemoveUnnecessaryParentheses", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Code style issues", + "index": 17, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OverlyComplexBooleanExpressionJS", + "shortDescription": { + "text": "Overly complex boolean expression" + }, + "fullDescription": { + "text": "Reports a boolean expression with too many terms. Such expressions may be confusing and bug-prone. Use the field below to specify the maximum number of terms allowed in an arithmetic expression.", + "markdown": "Reports a boolean expression with too many terms. Such expressions may be confusing and bug-prone.\n\n\nUse the field below to specify the maximum number of terms allowed in an arithmetic expression." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "OverlyComplexBooleanExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 37, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OverlyComplexArithmeticExpressionJS", + "shortDescription": { + "text": "Overly complex arithmetic expression" + }, + "fullDescription": { + "text": "Reports an arithmetic expression with too many terms. Such expressions may be confusing and bug-prone. Use the field below to specify the maximum number of terms allowed in an arithmetic expression.", + "markdown": "Reports an arithmetic expression with too many terms. Such expressions may be confusing and bug-prone.\n\n\nUse the field below to specify the maximum number of terms allowed in an arithmetic expression." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "OverlyComplexArithmeticExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Potentially confusing code constructs", + "index": 37, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6RedundantNestingInTemplateLiteral", + "shortDescription": { + "text": "Redundant nesting in template literal" + }, + "fullDescription": { + "text": "Reports nested instances of a string or a template literal. Suggests inlining the nested instances into the containing template string. Example: 'let a = `Hello, ${`Brave ${\"New\"}`} ${\"World\"}!`' After applying the quick-fix the code looks as follows: 'let a = `Hello, Brave New World!`'", + "markdown": "Reports nested instances of a string or a template literal. Suggests inlining the nested instances into the containing template string.\n\nExample:\n\n\n let a = `Hello, ${`Brave ${\"New\"}`} ${\"World\"}!`\n\nAfter applying the quick-fix the code looks as follows:\n\n\n let a = `Hello, Brave New World!`\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6RedundantNestingInTemplateLiteral", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "StringLiteralBreaksHTMLJS", + "shortDescription": { + "text": "String literal which breaks HTML parsing" + }, + "fullDescription": { + "text": "Reports a string literal that contains a '' or multiple components matched on any other element.", + "markdown": "Reports a component that is matched on an embedded template element `` or multiple components matched on any other element." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularAmbiguousComponentTag", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularUndefinedModuleExport", + "shortDescription": { + "text": "Undefined export from Angular module" + }, + "fullDescription": { + "text": "Reports an export of an undeclared or unimported component, directive, or pipes from an Angular module.", + "markdown": "Reports an export of an undeclared or unimported component, directive, or pipes from an Angular module." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularUndefinedModuleExport", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularInvalidI18nAttribute", + "shortDescription": { + "text": "Invalid i18n attribute" + }, + "fullDescription": { + "text": "Reports a problem with a 'i18n-*' attribute.", + "markdown": "Reports a problem with a `i18n-*` attribute." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "AngularInvalidI18nAttribute", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularForBlockNonIterableVar", + "shortDescription": { + "text": "Non-iterable type in @for block" + }, + "fullDescription": { + "text": "Reports that the type of variable to iterate over does not have '[Symbol.iterator]()' method, which returns an iterator.", + "markdown": "Reports that the type of variable to iterate over does not have `[Symbol.iterator]()` method, which returns an iterator." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularForBlockNonIterableVar", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularIncorrectTemplateDefinition", + "shortDescription": { + "text": "Incorrect component template definition" + }, + "fullDescription": { + "text": "Reports a component that doesn’t have an associated template or uses both 'template' and 'templateUrl' properties.", + "markdown": "Reports a component that doesn't have an associated template or uses both `template` and `templateUrl` properties." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularIncorrectTemplateDefinition", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularNonStandaloneComponentImports", + "shortDescription": { + "text": "Invalid usage of imports in non-standalone components" + }, + "fullDescription": { + "text": "Reports usages of imports property in non-standalone component decorators. Imports can be used only in standalone components.", + "markdown": "Reports usages of imports property in non-standalone component decorators. Imports can be used only in standalone components." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularNonStandaloneComponentImports", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularMissingOrInvalidDeclarationInModule", + "shortDescription": { + "text": "Missing or invalid component, directive or pipe declaration in a module" + }, + "fullDescription": { + "text": "Reports a non-standalone Angular component, directive, or pipe that is not declared in any module or is declared in multiple modules.", + "markdown": "Reports a non-standalone Angular component, directive, or pipe that is not declared in any module or is declared in multiple modules." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularMissingOrInvalidDeclarationInModule", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularInvalidAnimationTriggerAssignment", + "shortDescription": { + "text": "Invalid animation trigger assignment" + }, + "fullDescription": { + "text": "Reports an invalid assignment of an animation trigger. To attach an animation to an element, use '[@triggerName]=\"expression\"' or an attribute without a value '@triggerName'.", + "markdown": "Reports an invalid assignment of an animation trigger. To attach an animation to an element, use `[@triggerName]=\"expression\"` or an attribute without a value `@triggerName`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularInvalidAnimationTriggerAssignment", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularInvalidEntryComponent", + "shortDescription": { + "text": "Invalid entry component" + }, + "fullDescription": { + "text": "Reports an invalid Angular component specified in the module’s 'bootstrap' or 'entryComponents' property.", + "markdown": "Reports an invalid Angular component specified in the module's `bootstrap` or `entryComponents` property." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularInvalidEntryComponent", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularRecursiveModuleImportExport", + "shortDescription": { + "text": "Recursive import or export of an Angular module or a standalone component" + }, + "fullDescription": { + "text": "Reports a cyclic dependency between Angular modules or standalone components.", + "markdown": "Reports a cyclic dependency between Angular modules or standalone components." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularRecursiveModuleImportExport", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularInvalidSelector", + "shortDescription": { + "text": "Missing or invalid selector" + }, + "fullDescription": { + "text": "Reports an invalid 'selector' property of a component or directive.", + "markdown": "Reports an invalid `selector` property of a component or directive." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularInvalidSelector", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularBindingTypeMismatch", + "shortDescription": { + "text": "Invalid binding type" + }, + "fullDescription": { + "text": "Reports a mismatch between actual and expected directive binding type.", + "markdown": "Reports a mismatch between actual and expected directive binding type." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularBindingTypeMismatch", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularNonEmptyNgContent", + "shortDescription": { + "text": "Content inside tag" + }, + "fullDescription": { + "text": "Reports a text or tag occurrence inside a '' tag used for content projection.", + "markdown": "Reports a text or tag occurrence inside a `` tag used for content projection." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularNonEmptyNgContent", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularMissingRequiredDirectiveInputBinding", + "shortDescription": { + "text": "Missing required directive input" + }, + "fullDescription": { + "text": "Reports a missing binding for a required directive input.", + "markdown": "Reports a missing binding for a required directive input." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularMissingRequiredDirectiveInputBinding", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularInsecureBindingToEvent", + "shortDescription": { + "text": "Insecure binding to event" + }, + "fullDescription": { + "text": "Reports a binding to an event property or attribute, for example, '[onclick]' or '[attr.onclick]' instead of '(click)'.", + "markdown": "Reports a binding to an event property or attribute, for example, `[onclick]` or `[attr.onclick]` instead of `(click)`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "AngularInsecureBindingToEvent", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 3, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.intellij.plugins.postcss", + "version": "241.18034.45", + "rules": [ + { + "id": "PostCssCustomSelector", + "shortDescription": { + "text": "Invalid custom selector" + }, + "fullDescription": { + "text": "Reports a syntax error in PostCSS Custom Selector. Example: '@custom-selector :--heading h1, h2, h3;'", + "markdown": "Reports a syntax error in [PostCSS Custom Selector](https://github.com/postcss/postcss-custom-selectors).\n\nExample:\n\n\n @custom-selector :--heading h1, h2, h3;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "PostCssCustomSelector", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "PostCSS", + "index": 4, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PostCssUnresolvedModuleValueReference", + "shortDescription": { + "text": "Unresolved CSS module value" + }, + "fullDescription": { + "text": "Reports an unresolved reference to a CSS Module Value ('@value' declaration). Example: '@value foo from unknown;'", + "markdown": "Reports an unresolved reference to a [CSS Module Value](https://github.com/css-modules/postcss-modules-values) (`@value` declaration).\n\nExample:\n\n\n @value foo from unknown;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "PostCssUnresolvedModuleValueReference", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "PostCSS", + "index": 4, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PostCssNesting", + "shortDescription": { + "text": "Invalid nested rule" + }, + "fullDescription": { + "text": "Reports a nested style rule whose syntax doesn't comply with the PostCSS Nested or the PostCSS Nesting specification. Example: '.phone {\n &_title {}\n}'", + "markdown": "Reports a nested style rule whose syntax doesn't comply with the [PostCSS Nested](https://github.com/postcss/postcss-nested) or the [PostCSS Nesting](https://github.com/csstools/postcss-nesting) specification.\n\nExample:\n\n\n .phone {\n &_title {}\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PostCssNesting", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "PostCSS", + "index": 4, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PostCssCustomMedia", + "shortDescription": { + "text": "Invalid custom media" + }, + "fullDescription": { + "text": "Reports a syntax error in a PostCSS Custom Media query. Example: '@custom-media --small-viewport (max-width: 30em);'", + "markdown": "Reports a syntax error in a [PostCSS Custom Media](https://github.com/postcss/postcss-custom-media) query.\n\nExample:\n\n\n @custom-media --small-viewport (max-width: 30em);\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "PostCssCustomMedia", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "PostCSS", + "index": 4, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PostCssMediaRange", + "shortDescription": { + "text": "Invalid media query range" + }, + "fullDescription": { + "text": "Checks range context syntax, which may alternatively be used for media features with a 'range' type. Example: '@media screen and (500px <= width <= 1200px) {}'", + "markdown": "Checks [range context](https://github.com/postcss/postcss-media-minmax) syntax, which may alternatively be used for media features with a 'range' type.\n\nExample:\n\n\n @media screen and (500px <= width <= 1200px) {}\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "PostCssMediaRange", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "PostCSS", + "index": 4, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "XPathView", + "version": "241.18034.45", + "rules": [ + { + "id": "IndexZeroUsage", + "shortDescription": { + "text": "XPath predicate with index 0" + }, + "fullDescription": { + "text": "Reports usages of '0' in a predicate index or in a comparison with the function 'position()'. Such usage is almost always a bug because in XPath, the index starts at '1', not at '0'. Example: '//someelement[position() = 0]' or '//something[0]'", + "markdown": "Reports usages of `0` in a predicate index or in a comparison with the function `position()`. Such usage is almost always a bug because in XPath, the index starts at `1`, *not* at `0`.\n\n**Example:**\n\n\n //someelement[position() = 0] or //something[0]\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "IndexZeroUsage", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "XPath", + "index": 5, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CheckNodeTest", + "shortDescription": { + "text": "Unknown element or attribute name" + }, + "fullDescription": { + "text": "Reports names of elements or attributes that are used in an XPath-expression but are missing in the associated XML files and are not defined in the referenced schemas. Such names are often the result of typos and would otherwise probably only be discovered at runtime. Example: '' If the 'h' is bound to the XHTML namespace, the inspection will report this part of the 'match' expression as an unknown element name because the correct name of the element is \"textarea\".", + "markdown": "Reports names of elements or attributes that are used in an XPath-expression but are missing in the associated XML files and are not defined in the referenced schemas. Such names are often the result of typos and would otherwise probably only be discovered at runtime.\n\n**Example:**\n\n\n \n\n\nIf the `h` is bound to the XHTML namespace, the inspection will report this part of the `match` expression as an\nunknown element name because the correct name of the element is \"textarea\"." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CheckNodeTest", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "XPath", + "index": 5, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XsltUnusedDeclaration", + "shortDescription": { + "text": "Unused variable or parameter" + }, + "fullDescription": { + "text": "Reports local variables and parameters that are never used.", + "markdown": "Reports local variables and parameters that are never used." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "XsltUnusedDeclaration", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "XSLT", + "index": 54, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XsltDeclarations", + "shortDescription": { + "text": "Incorrect declaration" + }, + "fullDescription": { + "text": "Reports duplicate declarations and illegal identifiers in XSLT variables, parameters, and named templates:", + "markdown": "Reports duplicate declarations and illegal identifiers in XSLT variables, parameters, and named templates:" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "XsltDeclarations", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "XSLT", + "index": 54, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XsltVariableShadowing", + "shortDescription": { + "text": "Shadowed variable" + }, + "fullDescription": { + "text": "Reports shadowed XSLT variables.", + "markdown": "Reports shadowed XSLT variables." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "XsltVariableShadowing", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "XSLT", + "index": 54, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HardwiredNamespacePrefix", + "shortDescription": { + "text": "Hardcoded namespace prefix" + }, + "fullDescription": { + "text": "Reports comparisons of the 'name()' function with a string that contains a colon (':'). Such usages usually indicate a hardcoded namespace prefix in the comparison. As a result, the code will break when run against XML that uses another prefix for the same namespace. Example: '...'", + "markdown": "Reports comparisons of the `name()` function with a string that contains a colon (`:`). Such usages usually indicate a hardcoded namespace prefix in the comparison. As a result, the code will break when run against XML that uses another prefix for the same namespace.\n\n**Example:**\n\n\n ...\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HardwiredNamespacePrefix", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "XPath", + "index": 5, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RedundantTypeConversion", + "shortDescription": { + "text": "Redundant type conversion" + }, + "fullDescription": { + "text": "Reports unnecessary type conversions. Type conversions are unnecessary when the argument type of a 'string()', 'number()', or 'boolean()' function is already the same as the function's return type or if the expected expression type is 'any'. Suggests removing the unnecessary conversion.", + "markdown": "Reports unnecessary type conversions. Type conversions are unnecessary when the argument type of a `string()`, `number()`, or `boolean()` function is already the same as the function's return type or if the expected expression type is `any`. Suggests removing the unnecessary conversion." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "RedundantTypeConversion", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "XPath", + "index": 5, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XsltTemplateInvocation", + "shortDescription": { + "text": "Incorrect template invocation" + }, + "fullDescription": { + "text": "Reports missing arguments, passing arguments that are not declared, and passing arguments for parameters more than once in named XSLT template invocations. Parameters declared with a default value are optional and will not be reported as missing.", + "markdown": "Reports missing arguments, passing arguments that are not declared, and passing arguments for parameters more than once in named XSLT template invocations.\n\n\nParameters declared with a default value are optional and will not be reported as missing." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "XsltTemplateInvocation", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "XSLT", + "index": 54, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ImplicitTypeConversion", + "shortDescription": { + "text": "Implicit type conversion" + }, + "fullDescription": { + "text": "Reports implicit conversions between the predefined XPath-types 'STRING', 'NUMBER', 'BOOLEAN', and 'NODESET'. Helps to write XSLT scripts that are more expressive about types and prevents subtle bugs: Example: '' is not the same as '' The first test checks whether the element \"foo\" exists ('count(foo) > 0)'; the latter one however is only true if the element actually contains any text ('string-length(foo) > 0'). Suggests making the type conversion more explicit. Use the following options to configure the inspection: Enable or disable implicit conversions between certain types Always report explicit conversions that do not result in the actually expected type, for example, '' Ignore conversion from 'NODESET' to 'BOOLEAN' by using the 'string()' function as a shortcut for writing 'string-length() > 0'.", + "markdown": "Reports implicit conversions between the predefined XPath-types `STRING`, `NUMBER`, `BOOLEAN`, and `NODESET`. Helps to write XSLT scripts that are more expressive about types and prevents subtle bugs:\n\n**Example:**\n\n\n \n\nis not the same as\n\n\n \n\n\nThe first test checks whether the element \"foo\" exists (`count(foo) > 0)`; the latter one however is only\ntrue if the element actually contains any text (`string-length(foo) > 0`). Suggests making\nthe type conversion more explicit.\n\n\nUse the following options to configure the inspection:\n\n* Enable or disable implicit conversions between certain types\n* Always report explicit conversions that do not result in the actually expected type, for example, ``\n* Ignore conversion from `NODESET` to `BOOLEAN` by using the `string()` function as a shortcut for writing `string-length() > 0`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ImplicitTypeConversion", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "XPath", + "index": 5, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.jetbrains.plugins.sass", + "version": "241.18034.45", + "rules": [ + { + "id": "SassScssUnresolvedMixin", + "shortDescription": { + "text": "Unresolved mixin" + }, + "fullDescription": { + "text": "Reports an unresolved Sass/SCSS mixin reference. Example: '* {\n @include unknown-mixin;\n}'", + "markdown": "Reports an unresolved [Sass/SCSS mixin](https://sass-lang.com/documentation/at-rules/mixin) reference.\n\n**Example:**\n\n\n * {\n @include unknown-mixin;\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SassScssUnresolvedMixin", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Sass_SCSS", + "index": 6, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SassScssResolvedByNameOnly", + "shortDescription": { + "text": "Missing import" + }, + "fullDescription": { + "text": "Reports a reference to a variable, mixin, or function that is declared in another file but this file isn't explicitly imported in the current file. Example: '* {\n margin: $var-in-other-file;\n}'", + "markdown": "Reports a reference to a variable, mixin, or function that is declared in another file but this file isn't explicitly [imported](https://sass-lang.com/documentation/at-rules/import) in the current file.\n\n**Example:**\n\n\n * {\n margin: $var-in-other-file;\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "SassScssResolvedByNameOnly", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Sass_SCSS", + "index": 6, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SassScssUnresolvedPlaceholderSelector", + "shortDescription": { + "text": "Unresolved placeholder selector" + }, + "fullDescription": { + "text": "Reports an unresolved Sass/SCSS placeholder selector reference. Example: '* {\n @extend %unknown-placeholder-selector;\n}'", + "markdown": "Reports an unresolved [Sass/SCSS placeholder selector](https://sass-lang.com/documentation/variables) reference.\n\n**Example:**\n\n\n * {\n @extend %unknown-placeholder-selector;\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SassScssUnresolvedPlaceholderSelector", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Sass_SCSS", + "index": 6, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SassScssUnresolvedVariable", + "shortDescription": { + "text": "Unresolved variable" + }, + "fullDescription": { + "text": "Reports an unresolved Sass/SCSS variable reference. Example: '* {\n margin: $unknown-var;\n}'", + "markdown": "Reports an unresolved [Sass/SCSS variable](https://sass-lang.com/documentation/variables) reference.\n\n**Example:**\n\n\n * {\n margin: $unknown-var;\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SassScssUnresolvedVariable", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Sass_SCSS", + "index": 6, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "com.jetbrains.sh", + "version": "241.18034.45", + "rules": [ + { + "id": "ShellCheck", + "shortDescription": { + "text": "ShellCheck" + }, + "fullDescription": { + "text": "Reports shell script bugs detected by the integrated ShellCheck static analysis tool.", + "markdown": "Reports shell script bugs detected by the integrated [ShellCheck](https://github.com/koalaman/shellcheck) static analysis tool." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "ShellCheck", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Shell script", + "index": 7, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "name.kropp.intellij.makefile", + "version": "241.18034.45", + "rules": [ + { + "id": "MakefileUnresolvedPrerequisite", + "shortDescription": { + "text": "Unresolved prerequisite" + }, + "fullDescription": { + "text": "Reports unresolved target prerequisites", + "markdown": "Reports unresolved target prerequisites" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "MakefileUnresolvedPrerequisite", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Makefile", + "index": 9, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "com.intellij.clion", + "version": "241.18034.45", + "rules": [ + { + "id": "CMakeMismatchedCommandArguments", + "shortDescription": { + "text": "Mismatched command arguments" + }, + "fullDescription": { + "text": "Reports mismatched arguments in opening- and closing commands. Example: 'if (A)\nendif (B)'", + "markdown": "Reports mismatched arguments in opening- and closing commands.\n\n**Example:**\n\n\n if (A)\n endif (B)\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CMakeMismatchedCommandArguments", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CMake/General", + "index": 11, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CMakeDeprecatedCommands", + "shortDescription": { + "text": "Deprecated command used" + }, + "fullDescription": { + "text": "Reports a usage of a deprecated command.", + "markdown": "Reports a usage of a deprecated command." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "CMakeDeprecatedCommands", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CMake/General", + "index": 11, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OCGlobalDFAInspection", + "shortDescription": { + "text": "Interprocedural analysis" + }, + "fullDescription": { + "text": "Interprocedural summary-based static code analysis", + "markdown": "Interprocedural summary-based static code analysis" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "OCGlobalDFAInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "C_C++/Data Flow Analysis", + "index": 14, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "Karma", + "version": "241.18034.45", + "rules": [ + { + "id": "KarmaConfigFile", + "shortDescription": { + "text": "Invalid Karma configuration file" + }, + "fullDescription": { + "text": "Reports a potential error in a file path ('basePath', 'files') for a Karma configuration file, for example, 'karma.conf.js'.", + "markdown": "Reports a potential error in a file path ('basePath', 'files') for a Karma configuration file, for example, `karma.conf.js`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "KarmaConfigFile", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Unit testing", + "index": 8, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "com.intellij", + "version": "241.18034.45", + "rules": [ + { + "id": "JsonSchemaDeprecation", + "shortDescription": { + "text": "Deprecated JSON property" + }, + "fullDescription": { + "text": "Reports a deprecated property in a JSON file. Note that deprecation mechanism is not defined in the JSON Schema specification yet, and this inspection uses a non-standard extension 'deprecationMessage'.", + "markdown": "Reports a deprecated property in a JSON file. \nNote that deprecation mechanism is not defined in the JSON Schema specification yet, and this inspection uses a non-standard extension 'deprecationMessage'." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JsonSchemaDeprecation", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "JSON and JSON5", + "index": 12, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JsonSchemaRefReference", + "shortDescription": { + "text": "Unresolved '$ref' and '$schema' references" + }, + "fullDescription": { + "text": "Reports an unresolved '$ref' or '$schema' path in a JSON schema.", + "markdown": "Reports an unresolved `$ref` or `$schema` path in a JSON schema. " + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JsonSchemaRefReference", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JSON and JSON5", + "index": 12, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlUnknownBooleanAttribute", + "shortDescription": { + "text": "Incorrect boolean attribute" + }, + "fullDescription": { + "text": "Reports an HTML non-boolean attribute without a value. Suggests configuring attributes that should not be reported.", + "markdown": "Reports an HTML non-boolean attribute without a value. Suggests configuring attributes that should not be reported." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlUnknownBooleanAttribute", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DuplicatedCode", + "shortDescription": { + "text": "Duplicated code fragment" + }, + "fullDescription": { + "text": "Reports duplicated blocks of code from the selected scope: the same file or the entire project. The inspection features quick-fixes that help you to set the size of detected duplicates, navigate to repetitive code fragments, and compare them in a tool window. The inspection options allow you to select the scope of the reported duplicated fragments and set the initial size for the duplicated language constructs. You can also configure the constructs that you want to anonymize in File | Settings | Editor | Duplicates.", + "markdown": "Reports duplicated blocks of code from the selected scope: the same file or the entire project.\n\nThe inspection features quick-fixes that help you to set the size of detected duplicates, navigate to repetitive code fragments, and compare them in a tool window.\n\nThe inspection options allow you to select the scope of the reported duplicated fragments and set the initial size for the duplicated language constructs.\n\nYou can also configure the constructs that you want to anonymize in [File \\| Settings \\| Editor \\| Duplicates](settings://duplicates.index)." + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "DuplicatedCode", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "General", + "index": 31, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "InconsistentLineSeparators", + "shortDescription": { + "text": "Inconsistent line separators" + }, + "fullDescription": { + "text": "Reports files with line separators different from the ones that are specified in the project's settings. For example, the inspection will be triggered if you set the line separator to '\\n' in Settings | Editor | Code Style | Line separator, while the file you are editing uses '\\r\\n' as a line separator. The inspection also warns you about mixed line separators within a file.", + "markdown": "Reports files with line separators different from the ones that are specified in the project's settings.\n\nFor example, the inspection will be triggered if you set the line separator to `\\n` in\n[Settings \\| Editor \\| Code Style \\| Line separator](settings://preferences.sourceCode?Line%20separator),\nwhile the file you are editing uses `\\r\\n` as a line separator.\n\nThe inspection also warns you about mixed line separators within a file." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "InconsistentLineSeparators", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "General", + "index": 31, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RedundantSuppression", + "shortDescription": { + "text": "Redundant suppression" + }, + "fullDescription": { + "text": "Reports usages of the following elements that can be safely removed because the inspection they affect is no longer applicable in this context: '@SuppressWarning' annotation, or '// noinspection' line comment, or '/** noinspection */' JavaDoc comment Example: 'public class C {\n // symbol is already private,\n // but annotation is still around\n @SuppressWarnings({\"WeakerAccess\"})\n private boolean CONST = true;\n void f() {\n CONST = false;\n }\n}'", + "markdown": "Reports usages of the following elements that can be safely removed because the inspection they affect is no longer applicable in this context:\n\n* `@SuppressWarning` annotation, or\n* `// noinspection` line comment, or\n* `/** noinspection */` JavaDoc comment\n\nExample:\n\n\n public class C {\n // symbol is already private,\n // but annotation is still around\n @SuppressWarnings({\"WeakerAccess\"})\n private boolean CONST = true;\n void f() {\n CONST = false;\n }\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "RedundantSuppression", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "General", + "index": 31, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ProblematicWhitespace", + "shortDescription": { + "text": "Problematic whitespace" + }, + "fullDescription": { + "text": "Reports the following problems: Tabs used for indentation when the code style is configured to use only spaces. Spaces used for indentation when the code style is configured to use only tabs. Spaces used for indentation and tabs used for alignment when the code style is configured to use smart tabs.", + "markdown": "Reports the following problems:\n\n* Tabs used for indentation when the code style is configured to use only spaces.\n* Spaces used for indentation when the code style is configured to use only tabs.\n* Spaces used for indentation and tabs used for alignment when the code style is configured to use smart tabs." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ProblematicWhitespace", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "General", + "index": 31, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlUnknownTarget", + "shortDescription": { + "text": "Unresolved file in a link" + }, + "fullDescription": { + "text": "Reports an unresolved file in a link.", + "markdown": "Reports an unresolved file in a link." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlUnknownTarget", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SSBasedInspection", + "shortDescription": { + "text": "Structural search inspection" + }, + "fullDescription": { + "text": "Allows configuring Structural Search/Structural Replace templates that you can apply to the file you are editing. All matches will be highlighted and marked with the template name that you have configured. If you configure the Structural Replace pattern as well, the corresponding replace option will be available as a quick-fix.", + "markdown": "Allows configuring **Structural Search/Structural Replace** templates that you can apply to the file you are editing.\n\nAll matches will be highlighted and marked with the template name that you have configured.\nIf you configure the **Structural Replace** pattern as well, the corresponding replace option will be available as a quick-fix." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SSBasedInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Structural search", + "index": 43, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "LongLine", + "shortDescription": { + "text": "Line is longer than allowed by code style" + }, + "fullDescription": { + "text": "Reports lines that are longer than the Hard wrap at parameter specified in Settings | Editor | Code Style | General.", + "markdown": "Reports lines that are longer than the **Hard wrap at** parameter specified in [Settings \\| Editor \\| Code Style \\| General](settings://preferences.sourceCode?Hard%20wrap%20at)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "LongLine", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "General", + "index": 31, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlWrongRootElement", + "shortDescription": { + "text": "Wrong root element" + }, + "fullDescription": { + "text": "Reports a root tag name different from the name specified in the '' tag.", + "markdown": "Reports a root tag name different from the name specified in the `` tag." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "XmlWrongRootElement", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CheckValidXmlInScriptTagBody", + "shortDescription": { + "text": "Malformed content of 'script' tag" + }, + "fullDescription": { + "text": "Reports contents of 'script' tags that are invalid XML. Example: '' After the quick-fix is applied: ''", + "markdown": "Reports contents of `script` tags that are invalid XML. \n\n**Example:**\n\n\n \n\nAfter the quick-fix is applied:\n\n\n \n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CheckValidXmlInScriptTagBody", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpSuspiciousBackref", + "shortDescription": { + "text": "Suspicious back reference" + }, + "fullDescription": { + "text": "Reports back references that will not be resolvable at runtime. This means that the back reference can never match anything. A back reference will not be resolvable when the group is defined after the back reference, or if the group is defined in a different branch of an alternation. Example of a group defined after its back reference: '\\1(abc)' Example of a group and a back reference in different branches: 'a(b)c|(xy)\\1z' New in 2022.1", + "markdown": "Reports back references that will not be resolvable at runtime. This means that the back reference can never match anything. A back reference will not be resolvable when the group is defined after the back reference, or if the group is defined in a different branch of an alternation.\n\n**Example of a group defined after its back reference:**\n\n\n \\1(abc)\n\n**Example of a group and a back reference in different branches:**\n\n\n a(b)c|(xy)\\1z\n\nNew in 2022.1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpSuspiciousBackref", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpSingleCharAlternation", + "shortDescription": { + "text": "Single character alternation" + }, + "fullDescription": { + "text": "Reports single char alternation in a RegExp. It is simpler to use a character class instead. This may also provide better matching performance. Example: 'a|b|c|d' After the quick-fix is applied: '[abcd]' New in 2017.1", + "markdown": "Reports single char alternation in a RegExp. It is simpler to use a character class instead. This may also provide better matching performance.\n\n**Example:**\n\n\n a|b|c|d\n\nAfter the quick-fix is applied:\n\n\n [abcd]\n\n\nNew in 2017.1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpSingleCharAlternation", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlUnknownAttribute", + "shortDescription": { + "text": "Unknown attribute" + }, + "fullDescription": { + "text": "Reports an unknown HTML attribute. Suggests configuring attributes that should not be reported.", + "markdown": "Reports an unknown HTML attribute. Suggests configuring attributes that should not be reported." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlUnknownAttribute", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CheckTagEmptyBody", + "shortDescription": { + "text": "Empty element content" + }, + "fullDescription": { + "text": "Reports XML elements without contents. Example: '\n \n ' After the quick-fix is applied: '\n \n '", + "markdown": "Reports XML elements without contents.\n\n**Example:**\n\n\n \n \n \n\nAfter the quick-fix is applied:\n\n\n \n \n \n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CheckTagEmptyBody", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpRedundantEscape", + "shortDescription": { + "text": "Redundant character escape" + }, + "fullDescription": { + "text": "Reports redundant character escape sequences that can be replaced with unescaped characters preserving the meaning. Many escape sequences that are necessary outside of a character class are redundant inside square brackets '[]' of a character class. Although unescaped opening curly braces '{' outside of character classes are allowed in some dialects (JavaScript, Python, and so on), it can cause confusion and make the pattern less portable, because there are dialects that require escaping curly braces as characters. For this reason the inspection does not report escaped opening curly braces. Example: '\\-\\;[\\.]' After the quick-fix is applied: '-;[.]' The Ignore escaped closing brackets '}' and ']' option specifies whether to report '\\}' and '\\]' outside of a character class when they are allowed to be unescaped by the RegExp dialect. New in 2017.3", + "markdown": "Reports redundant character escape sequences that can be replaced with unescaped characters preserving the meaning. Many escape sequences that are necessary outside of a character class are redundant inside square brackets `[]` of a character class.\n\n\nAlthough unescaped opening curly braces `{` outside of character classes are allowed in some dialects (JavaScript, Python, and so on),\nit can cause confusion and make the pattern less portable, because there are dialects that require escaping curly braces as characters.\nFor this reason the inspection does not report escaped opening curly braces.\n\n**Example:**\n\n\n \\-\\;[\\.]\n\nAfter the quick-fix is applied:\n\n\n -;[.]\n\n\nThe **Ignore escaped closing brackets '}' and '\\]'** option specifies whether to report `\\}` and `\\]` outside of a character class\nwhen they are allowed to be unescaped by the RegExp dialect.\n\nNew in 2017.3" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpRedundantEscape", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnresolvedReference", + "shortDescription": { + "text": "Unresolved reference" + }, + "fullDescription": { + "text": "Reports an unresolved reference to a named pattern ('define') in RELAX-NG files that use XML syntax. Suggests creating the referenced 'define' element.", + "markdown": "Reports an unresolved reference to a named pattern (`define`) in RELAX-NG files that use XML syntax. Suggests creating the referenced `define` element." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "UnresolvedReference", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "RELAX NG", + "index": 58, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlMissingClosingTag", + "shortDescription": { + "text": "Missing closing tag" + }, + "fullDescription": { + "text": "Reports an HTML element without a closing tag. Some coding styles require that HTML elements have closing tags even where this is optional. Example: '\n \n

Behold!\n \n ' After the quick-fix is applied: '\n \n

Behold!

\n \n '", + "markdown": "Reports an HTML element without a closing tag. Some coding styles require that HTML elements have closing tags even where this is optional.\n\n**Example:**\n\n\n \n \n

Behold!\n \n \n\nAfter the quick-fix is applied:\n\n\n \n \n

Behold!

\n \n \n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "HtmlMissingClosingTag", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CustomRegExpInspection", + "shortDescription": { + "text": "Custom RegExp inspection" + }, + "fullDescription": { + "text": "Custom Regex Inspection", + "markdown": "Custom Regex Inspection" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "CustomRegExpInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "IncorrectFormatting", + "shortDescription": { + "text": "Incorrect formatting" + }, + "fullDescription": { + "text": "Reports formatting issues that appear if your code doesn't follow your project's code style settings. This inspection is not compatible with languages that require third-party formatters for code formatting, for example, Go or C with CLangFormat enabled.", + "markdown": "Reports formatting issues that appear if your code doesn't\nfollow your project's code style settings.\n\n\nThis inspection is not compatible with languages that require\nthird-party formatters for code formatting, for example, Go or\nC with CLangFormat enabled." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "IncorrectFormatting", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "General", + "index": 31, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlExtraClosingTag", + "shortDescription": { + "text": "Redundant closing tag" + }, + "fullDescription": { + "text": "Reports redundant closing tags on empty elements, for example, 'img' or 'br'. Example: '\n \n

\n \n ' After the quick-fix is applied: '\n \n
\n \n '", + "markdown": "Reports redundant closing tags on empty elements, for example, `img` or `br`.\n\n**Example:**\n\n\n \n \n

\n \n \n\nAfter the quick-fix is applied:\n\n\n \n \n
\n \n \n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlExtraClosingTag", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlUnknownAnchorTarget", + "shortDescription": { + "text": "Unresolved fragment in a link" + }, + "fullDescription": { + "text": "Reports an unresolved last part of an URL after the '#' sign.", + "markdown": "Reports an unresolved last part of an URL after the `#` sign." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlUnknownAnchorTarget", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpUnexpectedAnchor", + "shortDescription": { + "text": "Begin or end anchor in unexpected position" + }, + "fullDescription": { + "text": "Reports '^' or '\\A' anchors not at the beginning of the pattern and '$', '\\Z' or '\\z' anchors not at the end of the pattern. In the wrong position these RegExp anchors prevent the pattern from matching anything. In case of the '^' and '$' anchors, most likely the literal character was meant and the escape forgotten. Example: '(Price $10)' New in 2018.1", + "markdown": "Reports `^` or `\\A` anchors not at the beginning of the pattern and `$`, `\\Z` or `\\z` anchors not at the end of the pattern. In the wrong position these RegExp anchors prevent the pattern from matching anything. In case of the `^` and `$` anchors, most likely the literal character was meant and the escape forgotten.\n\n**Example:**\n\n\n (Price $10)\n\n\nNew in 2018.1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpUnexpectedAnchor", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SpellCheckingInspection", + "shortDescription": { + "text": "Typo" + }, + "fullDescription": { + "text": "Reports typos and misspellings in your code, comments, and literals and fixes them with one click.", + "markdown": "Reports typos and misspellings in your code, comments, and literals and fixes them with one click." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "SpellCheckingInspection", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "Proofreading", + "index": 68, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CheckXmlFileWithXercesValidator", + "shortDescription": { + "text": "Failed external validation" + }, + "fullDescription": { + "text": "Reports a discrepancy in an XML file with the specified DTD or schema detected by the Xerces validator.", + "markdown": "Reports a discrepancy in an XML file with the specified DTD or schema detected by the Xerces validator." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CheckXmlFileWithXercesValidator", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlUnknownTag", + "shortDescription": { + "text": "Unknown tag" + }, + "fullDescription": { + "text": "Reports an unknown HTML tag. Suggests configuring tags that should not be reported.", + "markdown": "Reports an unknown HTML tag. Suggests configuring tags that should not be reported." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlUnknownTag", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpEscapedMetaCharacter", + "shortDescription": { + "text": "Escaped meta character" + }, + "fullDescription": { + "text": "Reports escaped meta characters. Some RegExp coding styles specify that meta characters should be placed inside a character class, to make the regular expression easier to understand. This inspection does not warn about the meta character '[', ']' and '^', because those would need additional escaping inside a character class. Example: '\\d+\\.\\d+' After the quick-fix is applied: '\\d+[.]\\d+' New in 2017.1", + "markdown": "Reports escaped meta characters. Some RegExp coding styles specify that meta characters should be placed inside a character class, to make the regular expression easier to understand. This inspection does not warn about the meta character `[`, `]` and `^`, because those would need additional escaping inside a character class.\n\n**Example:**\n\n\n \\d+\\.\\d+\n\nAfter the quick-fix is applied:\n\n\n \\d+[.]\\d+\n\nNew in 2017.1" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "RegExpEscapedMetaCharacter", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlHighlighting", + "shortDescription": { + "text": "XML highlighting" + }, + "fullDescription": { + "text": "Reports XML validation problems in the results of a batch code inspection.", + "markdown": "Reports XML validation problems in the results of a batch code inspection." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "XmlHighlighting", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlDuplicatedId", + "shortDescription": { + "text": "Duplicate 'id' attribute" + }, + "fullDescription": { + "text": "Reports a duplicate 'id' attribute in XML.", + "markdown": "Reports a duplicate `id` attribute in XML." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "XmlDuplicatedId", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpDuplicateCharacterInClass", + "shortDescription": { + "text": "Duplicate character in character class" + }, + "fullDescription": { + "text": "Reports duplicate characters inside a RegExp character class. Duplicate characters are unnecessary and can be removed without changing the semantics of the regex. Example: '[aabc]' After the quick-fix is applied: '[abc]'", + "markdown": "Reports duplicate characters inside a RegExp character class. Duplicate characters are unnecessary and can be removed without changing the semantics of the regex.\n\n**Example:**\n\n\n [aabc]\n\nAfter the quick-fix is applied:\n\n\n [abc]\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpDuplicateCharacterInClass", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlInvalidId", + "shortDescription": { + "text": "Unresolved 'id' reference" + }, + "fullDescription": { + "text": "Reports an unresolved 'id' reference in XML.", + "markdown": "Reports an unresolved `id` reference in XML." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "XmlInvalidId", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlUnboundNsPrefix", + "shortDescription": { + "text": "Unbound namespace prefix" + }, + "fullDescription": { + "text": "Reports an unbound namespace prefix in XML.", + "markdown": "Reports an unbound namespace prefix in XML." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "XmlUnboundNsPrefix", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RequiredAttributes", + "shortDescription": { + "text": "Missing required attribute" + }, + "fullDescription": { + "text": "Reports a missing mandatory attribute in an XML/HTML tag. Suggests configuring attributes that should not be reported.", + "markdown": "Reports a missing mandatory attribute in an XML/HTML tag. Suggests configuring attributes that should not be reported." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "RequiredAttributes", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ReassignedToPlainText", + "shortDescription": { + "text": "Reassigned to plain text" + }, + "fullDescription": { + "text": "Reports files that were explicitly re-assigned to Plain Text File Type. This association is unnecessary because the platform auto-detects text files by content automatically. You can dismiss this warning by removing the file type association in Settings | Editor | File Types | Text.", + "markdown": "Reports files that were explicitly re-assigned to Plain Text File Type. This association is unnecessary because the platform auto-detects text files by content automatically.\n\nYou can dismiss this warning by removing the file type association\nin **Settings \\| Editor \\| File Types \\| Text**." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ReassignedToPlainText", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "General", + "index": 31, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlUnusedNamespaceDeclaration", + "shortDescription": { + "text": "Unused schema declaration" + }, + "fullDescription": { + "text": "Reports an unused namespace declaration or location hint in XML.", + "markdown": "Reports an unused namespace declaration or location hint in XML." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "XmlUnusedNamespaceDeclaration", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpRedundantClassElement", + "shortDescription": { + "text": "Redundant '\\d', '[:digit:]', or '\\D' class elements" + }, + "fullDescription": { + "text": "Reports redundant '\\d' or '[:digit:]' that are used in one class with '\\w' or '[:word:]' ('\\D' with '\\W') and can be removed. Example: '[\\w\\d]' After the quick-fix is applied: '[\\w]' New in 2022.2", + "markdown": "Reports redundant `\\d` or `[:digit:]` that are used in one class with `\\w` or `[:word:]` (`\\D` with `\\W`) and can be removed.\n\n**Example:**\n\n\n [\\w\\d]\n\nAfter the quick-fix is applied:\n\n\n [\\w]\n\nNew in 2022.2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "RegExpRedundantClassElement", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpSimplifiable", + "shortDescription": { + "text": "Regular expression can be simplified" + }, + "fullDescription": { + "text": "Reports regular expressions that can be simplified. Example: '[a] xx* [ah-hz]' After the quick-fix is applied: 'a x+ [ahz]' New in 2022.1", + "markdown": "Reports regular expressions that can be simplified.\n\n**Example:**\n\n\n [a] xx* [ah-hz]\n\nAfter the quick-fix is applied:\n\n\n a x+ [ahz]\n\nNew in 2022.1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "RegExpSimplifiable", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpEmptyAlternationBranch", + "shortDescription": { + "text": "Empty branch in alternation" + }, + "fullDescription": { + "text": "Reports empty branches in a RegExp alternation. An empty branch will only match the empty string, and in most cases that is not what is desired. This inspection will not report a single empty branch at the start or the end of an alternation. Example: '(alpha||bravo)' After the quick-fix is applied: '(alpha|bravo)' New in 2017.2", + "markdown": "Reports empty branches in a RegExp alternation. An empty branch will only match the empty string, and in most cases that is not what is desired. This inspection will not report a single empty branch at the start or the end of an alternation.\n\n**Example:**\n\n\n (alpha||bravo)\n\nAfter the quick-fix is applied:\n\n\n (alpha|bravo)\n\nNew in 2017.2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpEmptyAlternationBranch", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Annotator", + "shortDescription": { + "text": "Annotator" + }, + "fullDescription": { + "text": "Reports issues essential to this file (e.g., syntax errors) in the result of a batch code inspection run. These issues are usually always highlighted in the editor and can't be configured, unlike inspections. These options control the scope of checks performed by this inspection: Option \"Report syntax errors\": report parser-related issues. Option \"Report issues from language-specific annotators\": report issues found by annotators configured for the relevant language. See Custom Language Support: Annotators for details. Option \"Report other highlighting problems\": report issues specific to the language of the current file (e.g., type mismatches or unreported exceptions). See Custom Language Support: Highlighting for details.", + "markdown": "Reports issues essential to this file (e.g., syntax errors) in the result of a batch code inspection run. These issues are usually always highlighted in the editor and can't be configured, unlike inspections. These options control the scope of checks performed by this inspection:\n\n* Option \"**Report syntax errors**\": report parser-related issues.\n* Option \"**Report issues from language-specific annotators** \": report issues found by annotators configured for the relevant language. See [Custom Language Support: Annotators](https://plugins.jetbrains.com/docs/intellij/annotator.html) for details.\n* Option \"**Report other highlighting problems** \": report issues specific to the language of the current file (e.g., type mismatches or unreported exceptions). See [Custom Language Support: Highlighting](https://plugins.jetbrains.com/docs/intellij/syntax-highlighting-and-error-highlighting.html#semantic-highlighting) for details." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "Annotator", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "General", + "index": 31, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlPathReference", + "shortDescription": { + "text": "Unresolved file reference" + }, + "fullDescription": { + "text": "Reports an unresolved file reference in XML.", + "markdown": "Reports an unresolved file reference in XML." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "XmlPathReference", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpUnnecessaryNonCapturingGroup", + "shortDescription": { + "text": "Unnecessary non-capturing group" + }, + "fullDescription": { + "text": "Reports unnecessary non-capturing groups, which have no influence on the match result. Example: 'Everybody be cool, (?:this) is a robbery!' After the quick-fix is applied: 'Everybody be cool, this is a robbery!' New in 2021.1", + "markdown": "Reports unnecessary non-capturing groups, which have no influence on the match result.\n\n**Example:**\n\n\n Everybody be cool, (?:this) is a robbery!\n\nAfter the quick-fix is applied:\n\n\n Everybody be cool, this is a robbery!\n\nNew in 2021.1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpUnnecessaryNonCapturingGroup", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TodoComment", + "shortDescription": { + "text": "TODO comment" + }, + "fullDescription": { + "text": "Reports TODO comments in your code. You can configure the format for TODO comments in Settings | Editor | TODO. Enable the Only warn on TODO comments without any details option to only warn on empty TODO comments, that don't provide any description on the task that should be done. Disable to report all TODO comments.", + "markdown": "Reports **TODO** comments in your code.\n\nYou can configure the format for **TODO** comments in [Settings \\| Editor \\| TODO](settings://preferences.toDoOptions).\n\nEnable the **Only warn on TODO comments without any details** option to only warn on empty TODO comments, that\ndon't provide any description on the task that should be done. Disable to report all TODO comments." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "TodoComment", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "General", + "index": 31, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Json5StandardCompliance", + "shortDescription": { + "text": "Compliance with JSON5 standard" + }, + "fullDescription": { + "text": "Reports inconsistency with the language specification in a JSON5 file.", + "markdown": "Reports inconsistency with [the language specification](http://json5.org) in a JSON5 file." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "Json5StandardCompliance", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JSON and JSON5", + "index": 12, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JsonDuplicatePropertyKeys", + "shortDescription": { + "text": "Duplicate keys in object literals" + }, + "fullDescription": { + "text": "Reports a duplicate key in an object literal.", + "markdown": "Reports a duplicate key in an object literal." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JsonDuplicatePropertyKeys", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JSON and JSON5", + "index": 12, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlDeprecatedElement", + "shortDescription": { + "text": "Deprecated symbol" + }, + "fullDescription": { + "text": "Reports a deprecated XML element or attribute. Symbols can be marked by XML comment or documentation tag with text 'deprecated'.", + "markdown": "Reports a deprecated XML element or attribute.\n\nSymbols can be marked by XML comment or documentation tag with text 'deprecated'." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "XmlDeprecatedElement", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpRedundantNestedCharacterClass", + "shortDescription": { + "text": "Redundant nested character class" + }, + "fullDescription": { + "text": "Reports unnecessary nested character classes. Example: '[a-c[x-z]]' After the quick-fix is applied: '[a-cx-z]' New in 2020.2", + "markdown": "Reports unnecessary nested character classes.\n\n**Example:**\n\n\n [a-c[x-z]]\n\nAfter the quick-fix is applied:\n\n\n [a-cx-z]\n\nNew in 2020.2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpRedundantNestedCharacterClass", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlWrongAttributeValue", + "shortDescription": { + "text": "Wrong attribute value" + }, + "fullDescription": { + "text": "Reports an incorrect HTML attribute value.", + "markdown": "Reports an incorrect HTML attribute value." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlWrongAttributeValue", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlDefaultAttributeValue", + "shortDescription": { + "text": "Redundant attribute with default value" + }, + "fullDescription": { + "text": "Reports a redundant assignment of the default value to an XML attribute.", + "markdown": "Reports a redundant assignment of the default value to an XML attribute." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "XmlDefaultAttributeValue", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpOctalEscape", + "shortDescription": { + "text": "Octal escape" + }, + "fullDescription": { + "text": "Reports octal escapes, which are easily confused with back references. Use hexadecimal escapes to avoid confusion. Example: '\\07' After the quick-fix is applied: '\\x07' New in 2017.1", + "markdown": "Reports octal escapes, which are easily confused with back references. Use hexadecimal escapes to avoid confusion.\n\n**Example:**\n\n\n \\07\n\nAfter the quick-fix is applied:\n\n\n \\x07\n\nNew in 2017.1" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "RegExpOctalEscape", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnusedDefine", + "shortDescription": { + "text": "Unused define" + }, + "fullDescription": { + "text": "Reports an unused named pattern ('define') in a RELAX-NG file (XML or Compact Syntax). 'define' elements that are used through an include in another file are ignored.", + "markdown": "Reports an unused named pattern (`define`) in a RELAX-NG file (XML or Compact Syntax). `define` elements that are used through an include in another file are ignored." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "UnusedDefine", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "RELAX NG", + "index": 58, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JsonSchemaCompliance", + "shortDescription": { + "text": "Compliance with JSON schema" + }, + "fullDescription": { + "text": "Reports inconsistence between a JSON file and the JSON schema that is assigned to it.", + "markdown": "Reports inconsistence between a JSON file and the [JSON schema](https://json-schema.org) that is assigned to it. " + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JsonSchemaCompliance", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JSON and JSON5", + "index": 12, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "EmptyDirectory", + "shortDescription": { + "text": "Empty directory" + }, + "fullDescription": { + "text": "Reports empty directories. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor. Use the Only report empty directories located under a source folder option to have only directories under source roots reported.", + "markdown": "Reports empty directories.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor.\n\nUse the **Only report empty directories located under a source folder** option to have only directories under source\nroots reported." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "EmptyDirectory", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "General", + "index": 31, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpAnonymousGroup", + "shortDescription": { + "text": "Anonymous capturing group or numeric back reference" + }, + "fullDescription": { + "text": "Reports anonymous capturing groups and numeric back references in a RegExp. These are only reported when the RegExp dialect supports named group and named group references. Named groups and named back references improve code readability and are recommended to use instead. When a capture is not needed, matching can be more performant and use less memory by using a non-capturing group, i.e. '(?:xxx)' instead of '(xxx)'. Example: '(\\d\\d\\d\\d)\\1' A better regex pattern could look like this: '(?\\d\\d\\d\\d)\\k' New in 2017.2", + "markdown": "Reports anonymous capturing groups and numeric back references in a RegExp. These are only reported when the RegExp dialect supports named group and named group references. Named groups and named back references improve code readability and are recommended to use instead. When a capture is not needed, matching can be more performant and use less memory by using a non-capturing group, i.e. `(?:xxx)` instead of `(xxx)`.\n\n**Example:**\n\n\n (\\d\\d\\d\\d)\\1\n\nA better regex pattern could look like this:\n\n\n (?\\d\\d\\d\\d)\\k\n\nNew in 2017.2" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpAnonymousGroup", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CheckDtdRefs", + "shortDescription": { + "text": "Unresolved DTD reference" + }, + "fullDescription": { + "text": "Reports inconsistency in a DTD-specific reference, for example, in a reference to an XML entity or to a DTD element declaration. Works in DTD an XML files.", + "markdown": "Reports inconsistency in a DTD-specific reference, for example, in a reference to an XML entity or to a DTD element declaration. Works in DTD an XML files." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CheckDtdRefs", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NonAsciiCharacters", + "shortDescription": { + "text": "Non-ASCII characters" + }, + "fullDescription": { + "text": "Reports code elements that use non-ASCII symbols in an unusual context. Example: Non-ASCII characters used in identifiers, strings, or comments. Identifiers written in different languages, such as 'myСollection' with the letter 'C' written in Cyrillic. Comments or strings containing Unicode symbols, such as long dashes and arrows.", + "markdown": "Reports code elements that use non-ASCII symbols in an unusual context.\n\nExample:\n\n* Non-ASCII characters used in identifiers, strings, or comments.\n* Identifiers written in different languages, such as `my`**С**`ollection` with the letter **C** written in Cyrillic.\n* Comments or strings containing Unicode symbols, such as long dashes and arrows." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "NonAsciiCharacters", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Internationalization", + "index": 79, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlUnresolvedReference", + "shortDescription": { + "text": "Unresolved references" + }, + "fullDescription": { + "text": "Reports an unresolved references in XML.", + "markdown": "Reports an unresolved references in XML." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "XmlUnresolvedReference", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "LossyEncoding", + "shortDescription": { + "text": "Lossy encoding" + }, + "fullDescription": { + "text": "Reports characters that cannot be displayed because of the current document encoding. Examples: If you type international characters in a document with the US-ASCII charset, some characters will be lost on save. If you load a UTF-8-encoded file using the ISO-8859-1 one-byte charset, some characters will be displayed incorrectly. You can fix this by changing the file encoding either by specifying the encoding directly in the file, e.g. by editing 'encoding=' attribute in the XML prolog of XML file, or by changing the corresponding options in Settings | Editor | File Encodings.", + "markdown": "Reports characters that cannot be displayed because of the current document encoding.\n\nExamples:\n\n* If you type international characters in a document with the **US-ASCII** charset, some characters will be lost on save.\n* If you load a **UTF-8** -encoded file using the **ISO-8859-1** one-byte charset, some characters will be displayed incorrectly.\n\nYou can fix this by changing the file encoding\neither by specifying the encoding directly in the file, e.g. by editing `encoding=` attribute in the XML prolog of XML file,\nor by changing the corresponding options in **Settings \\| Editor \\| File Encodings**." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "LossyEncoding", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Internationalization", + "index": 79, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpRepeatedSpace", + "shortDescription": { + "text": "Consecutive spaces" + }, + "fullDescription": { + "text": "Reports multiple consecutive spaces in a RegExp. Because spaces are not visible by default, it can be hard to see how many spaces are required. The RegExp can be made more clear by replacing the consecutive spaces with a single space and a counted quantifier. Example: '( )' After the quick-fix is applied: '( {5})' New in 2017.1", + "markdown": "Reports multiple consecutive spaces in a RegExp. Because spaces are not visible by default, it can be hard to see how many spaces are required. The RegExp can be made more clear by replacing the consecutive spaces with a single space and a counted quantifier.\n\n**Example:**\n\n\n ( )\n\nAfter the quick-fix is applied:\n\n\n ( {5})\n\n\nNew in 2017.1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpRepeatedSpace", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpDuplicateAlternationBranch", + "shortDescription": { + "text": "Duplicate branch in alternation" + }, + "fullDescription": { + "text": "Reports duplicate branches in a RegExp alternation. Duplicate branches slow down matching and obscure the intent of the expression. Example: '(alpha|bravo|charlie|alpha)' After the quick-fix is applied: '(alpha|bravo|charlie)' New in 2017.1", + "markdown": "Reports duplicate branches in a RegExp alternation. Duplicate branches slow down matching and obscure the intent of the expression.\n\n**Example:**\n\n\n (alpha|bravo|charlie|alpha)\n\nAfter the quick-fix is applied:\n\n\n (alpha|bravo|charlie)\n\nNew in 2017.1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpDuplicateAlternationBranch", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "RegExp", + "index": 51, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "IgnoreFileDuplicateEntry", + "shortDescription": { + "text": "Ignore file duplicates" + }, + "fullDescription": { + "text": "Reports duplicate entries (patterns) in the ignore file (e.g. .gitignore, .hgignore). Duplicate entries in these files are redundant and can be removed. Example: '# Output directories\n /out/\n /target/\n /out/'", + "markdown": "Reports duplicate entries (patterns) in the ignore file (e.g. .gitignore, .hgignore). Duplicate entries in these files are redundant and can be removed.\n\nExample:\n\n\n # Output directories\n /out/\n /target/\n /out/\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "IgnoreFileDuplicateEntry", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Version control", + "index": 81, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JsonStandardCompliance", + "shortDescription": { + "text": "Compliance with JSON standard" + }, + "fullDescription": { + "text": "Reports the following discrepancies of a JSON file with the language specification: A line or block comment (configurable). Multiple top-level values (expect for JSON Lines files, configurable for others). A trailing comma in an object or array (configurable). A single quoted string. A property key is a not a double quoted strings. A NaN or Infinity/-Infinity numeric value as a floating point literal (configurable).", + "markdown": "Reports the following discrepancies of a JSON file with [the language specification](https://tools.ietf.org/html/rfc7159):\n\n* A line or block comment (configurable).\n* Multiple top-level values (expect for JSON Lines files, configurable for others).\n* A trailing comma in an object or array (configurable).\n* A single quoted string.\n* A property key is a not a double quoted strings.\n* A NaN or Infinity/-Infinity numeric value as a floating point literal (configurable)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "JsonStandardCompliance", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "JSON and JSON5", + "index": 12, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CheckEmptyScriptTag", + "shortDescription": { + "text": "Empty tag" + }, + "fullDescription": { + "text": "Reports empty tags that do not work in some browsers. Example: '\n \n '", + "markdown": "Reports empty tags that do not work in some browsers.\n\n**Example:**\n\n\n \n \n \n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CheckEmptyScriptTag", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "com.intellij.database", + "version": "241.18034.45", + "rules": [ + { + "id": "MongoJSSideEffectsInspection", + "shortDescription": { + "text": "Statement with side effects" + }, + "fullDescription": { + "text": "Reports statements that can cause side effects while the data source is in read-only mode. For more information about enabling read-only mode, see Enable read-only mode for a connection in the IDE documentation. The Disable read-only mode quick-fix turns off the read-only mode for the respective data source. Example: 'db.my_collection.insertOne()'", + "markdown": "Reports statements that can cause side effects while the data source is in read-only mode.\n\nFor more information about enabling read-only mode, see\n[Enable\nread-only mode for a connection in the IDE documentation](https://www.jetbrains.com/help/datagrip/configuring-database-connections.html#enable-read-only-mode-for-a-connection).\n\nThe **Disable read-only mode** quick-fix turns off the read-only mode for the respective data source.\n\nExample:\n\n\n db.my_collection.insertOne()\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MongoJSSideEffects", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "MongoJS", + "index": 15, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MysqlLoadDataPathInspection", + "shortDescription": { + "text": "LOAD statement path" + }, + "fullDescription": { + "text": "Reports paths that start with the tilde character in LOAD statements. Example (MySQL): 'CREATE TABLE table_name (id int);\nLOAD DATA LOCAL INFILE '~/Documents/some_file.txt'\nINTO TABLE table_name FIELDS TERMINATED BY ',' LINES TERMINATED BY '\\n'\nIGNORE 1 LINES;' Instead of the tilde character, use a full path to the file.", + "markdown": "Reports paths that start with the tilde character in LOAD statements.\n\nExample (MySQL):\n\n CREATE TABLE table_name (id int);\n LOAD DATA LOCAL INFILE '~/Documents/some_file.txt'\n INTO TABLE table_name FIELDS TERMINATED BY ',' LINES TERMINATED BY '\\n'\n IGNORE 1 LINES;\n\nInstead of the tilde character, use a full path to the file." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MysqlLoadDataPath", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "MySQL", + "index": 18, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MongoJSExtSideEffectsInspection", + "shortDescription": { + "text": "Statement with side effects" + }, + "fullDescription": { + "text": "Reports statements that may cause side effects while the data source is in read-only mode. The quick-fix turns off the read-only mode for the respective data source. Example: 'db.my_collection.insertOne()'", + "markdown": "Reports statements that may cause side effects while the data source is in read-only mode.\n\nThe quick-fix turns off the read-only mode for the respective data source.\n\nExample:\n\n\n db.my_collection.insertOne()\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MongoJSSideEffects", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "MongoJS", + "index": 15, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MysqlSpaceAfterFunctionNameInspection", + "shortDescription": { + "text": "Whitespace between the function name and the open parenthesis" + }, + "fullDescription": { + "text": "Reports any whitespace in a function call between the function name and the open parenthesis, which is not supported by default. Example (MySQL): 'SELECT MAX (qty) FROM orders;'", + "markdown": "Reports any whitespace in a function call between the function name and the open parenthesis, which is not supported by default.\n\nExample (MySQL):\n\n SELECT MAX (qty) FROM orders;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "MysqlSpaceAfterFunctionName", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "MySQL", + "index": 18, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlMissingReturnInspection", + "shortDescription": { + "text": "Missing return statement" + }, + "fullDescription": { + "text": "Reports functions that have no RETURN statements. Example (Oracle): 'CREATE FUNCTION foo RETURN int AS\nBEGIN\nEND;' The 'foo' function must return the integer value but the function body returns nothing. To fix the error, add a RETURN statement (for example, 'return 1;'). 'CREATE FUNCTION foo RETURN int AS\nBEGIN\n RETURN 1;\nEND;'", + "markdown": "Reports functions that have no RETURN statements.\n\nExample (Oracle):\n\n CREATE FUNCTION foo RETURN int AS\n BEGIN\n END;\n\nThe `foo` function must return the integer value but the function body returns nothing. To fix the error,\nadd a RETURN statement (for example, `return 1;`).\n\n CREATE FUNCTION foo RETURN int AS\n BEGIN\n RETURN 1;\n END;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "SqlMissingReturn", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlUnusedSubqueryItemInspection", + "shortDescription": { + "text": "Unused subquery item" + }, + "fullDescription": { + "text": "Reports columns, aliases, and other subquery items that are not referenced in the outer query expression. Example (PostgreSQL): 'CREATE TABLE for_subquery(id INT);\nSELECT a, q FROM (SELECT 1 AS a, 10 AS b, 2 + 3 AS q, id\n FROM for_subquery) x;' We reference 'a' and 'q' aliases from a subquery. But the 'b' alias and the 'id' column are not referenced in the outer SELECT statement. Therefore, 'b' and 'id' are grayed out.", + "markdown": "Reports columns, aliases, and other subquery items that are not referenced in the outer query expression.\n\nExample (PostgreSQL):\n\n CREATE TABLE for_subquery(id INT);\n SELECT a, q FROM (SELECT 1 AS a, 10 AS b, 2 + 3 AS q, id\n FROM for_subquery) x;\n\nWe reference `a` and `q` aliases from a subquery. But the `b` alias and the `id` column are\nnot referenced in the outer SELECT statement. Therefore, `b` and `id` are grayed out." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlUnused", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlCaseVsIfInspection", + "shortDescription": { + "text": "Using CASE instead of conditional function and vice versa" + }, + "fullDescription": { + "text": "Reports situations when CASE and IF are interchangeable. Example (MySQL): 'SELECT CASE\nWHEN C1 IS NULL THEN 1\nELSE 0\nEND\nFROM dual;' To keep your code short, you can replace the CASE structure with IF. You can do that by applying the Replace with 'IF' call intention action. The example code will look as follows: 'SELECT IF(C1 IS NULL, 1, 0)\nFROM dual;' To revert IF to CASE, click IF and apply the Replace with CASE expression intention action.", + "markdown": "Reports situations when CASE and IF are interchangeable.\n\nExample (MySQL):\n\n SELECT CASE\n WHEN C1 IS NULL THEN 1\n ELSE 0\n END\n FROM dual;\n\nTo keep your code short, you can replace the CASE structure with IF. You can do that by applying the **Replace with 'IF' call**\nintention action. The example code will look as follows:\n\n SELECT IF(C1 IS NULL, 1, 0)\n FROM dual;\n\nTo revert IF to CASE, click IF and apply the **Replace with CASE expression** intention action." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlCaseVsIf", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlShouldBeInGroupByInspection", + "shortDescription": { + "text": "Column should be in group by clause" + }, + "fullDescription": { + "text": "Reports columns that are not in the GROUP BY clause or inside an aggregate function call. Example (Microsoft SQL Server): 'CREATE TABLE t1 (a INT, b INT);\nSELECT a, b FROM t1 GROUP BY a;' If you run the SELECT query, you will receive an error because Microsoft SQL Server expects the 'b' column in GROUP BY or used inside an aggregate function. The following two examples will fix the error. 'SELECT a, b FROM t1 GROUP BY a, b;\nSELECT a, max(b) max_b FROM t1 GROUP BY a;'", + "markdown": "Reports columns that are not in the GROUP BY clause or inside an aggregate function call.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE t1 (a INT, b INT);\n SELECT a, b FROM t1 GROUP BY a;\n\nIf you run the SELECT query, you will receive an error because Microsoft SQL Server expects the `b` column in GROUP BY or used\ninside an aggregate function. The following two examples will fix the error.\n\n SELECT a, b FROM t1 GROUP BY a, b;\n SELECT a, max(b) max_b FROM t1 GROUP BY a;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlShouldBeInGroupBy", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlAutoIncrementDuplicateInspection", + "shortDescription": { + "text": "Auto-increment duplicate" + }, + "fullDescription": { + "text": "Reports tables that contain two columns with an automatic increment. In MySQL, Microsoft SQL Server, and Db2 dialects, a table can have only one field with a auto-increment option, and this field must be a key. Example (MySQL): 'CREATE TABLE my_table\n(\n id INT AUTO_INCREMENT,\n c2 INT AUTO_INCREMENT,\n);' The AUTO_INCREMENT constraint for 'c2' will be highlighted as 'c1' already has this constraint. To fix the warning, you can make 'id' a primary key and delete AUTO_INCREMENT for 'c2'. 'CREATE TABLE my_table\n(\n id INT AUTO_INCREMENT PRIMARY KEY,\n c2 INT,\n);'", + "markdown": "Reports tables that contain two columns with an automatic increment. In MySQL, Microsoft SQL Server, and Db2 dialects, a table can have only one field with a auto-increment option, and this field must be a key.\n\nExample (MySQL):\n\n CREATE TABLE my_table\n (\n id INT AUTO_INCREMENT,\n c2 INT AUTO_INCREMENT,\n );\n\nThe AUTO_INCREMENT constraint for `c2` will be highlighted as `c1` already has this constraint. To fix the warning,\nyou can make `id` a primary key and delete AUTO_INCREMENT for `c2`.\n\n CREATE TABLE my_table\n (\n id INT AUTO_INCREMENT PRIMARY KEY,\n c2 INT,\n );\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlAutoIncrementDuplicate", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlStringLengthExceededInspection", + "shortDescription": { + "text": "Implicit string truncation" + }, + "fullDescription": { + "text": "Reports variables that exceed the defined length in characters. Example (Microsoft SQL Server): 'CREATE PROCEDURE test() AS\nBEGIN\nDECLARE myVarOk VARCHAR(5) = 'abcde';\nDECLARE myVarExceeded VARCHAR(5) = 'abcde12345';\n\nSET myVarOk = 'xyz';\nSET myVarExceeded = '123456789';\nEND;' The 'myVarExceeded' variable is defined as 'VARCHAR(5)' but both assigned values (''abcde12345'' and ''123456789'') exceed this limitation. You can truncate assigned values or increase the defined length. To increase the length, use the Increase type length quick-fix. After the quick-fix is applied: 'CREATE PROCEDURE test() AS\nBEGIN\nDECLARE myVarOk VARCHAR(5) = 'abcde';\nDECLARE myVarExceeded VARCHAR(10) = 'abcde12345';\n\nSET myVarOk = 'xyz';\nSET myVarExceeded = '123456789';\nEND;'", + "markdown": "Reports variables that exceed the defined length in characters.\n\nExample (Microsoft SQL Server):\n\n CREATE PROCEDURE test() AS\n BEGIN\n DECLARE myVarOk VARCHAR(5) = 'abcde';\n DECLARE myVarExceeded VARCHAR(5) = 'abcde12345';\n\n SET myVarOk = 'xyz';\n SET myVarExceeded = '123456789';\n END;\n\nThe `myVarExceeded` variable is defined as `VARCHAR(5)` but both assigned values (`'abcde12345'` and\n`'123456789'`) exceed this limitation. You can truncate assigned values or increase the defined length.\nTo increase the length, use the **Increase type length** quick-fix.\n\nAfter the quick-fix is applied:\n\n CREATE PROCEDURE test() AS\n BEGIN\n DECLARE myVarOk VARCHAR(5) = 'abcde';\n DECLARE myVarExceeded VARCHAR(10) = 'abcde12345';\n\n SET myVarOk = 'xyz';\n SET myVarExceeded = '123456789';\n END;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlStringLengthExceeded", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlSideEffectsInspection", + "shortDescription": { + "text": "Statement with side effects" + }, + "fullDescription": { + "text": "Reports statements that might lead to modification of a database during a read-only connection. To enable read-only mode for a connection, right-click a data source in the Database tool window (View | Tool Windows | Database) and select Properties. In the Data Sources and Drivers dialog, click the Options tab and select the Read-only checkbox. Example (MySQL): 'CREATE TABLE foo(a INT);\nINSERT INTO foo VALUES (1);' As 'CREATE TABLE' and 'INSERT INTO' statements lead to a database modification, these statements will be highlighted in read-only connection mode.", + "markdown": "Reports statements that might lead to modification of a database during a read-only connection.\n\nTo enable read-only mode for a\nconnection,\nright-click a data source in the **Database** tool window (**View \\| Tool Windows \\| Database** ) and select **Properties** .\nIn the **Data Sources and Drivers** dialog, click the **Options** tab and select the **Read-only** checkbox.\n\nExample (MySQL):\n\n CREATE TABLE foo(a INT);\n INSERT INTO foo VALUES (1);\n\nAs `CREATE TABLE` and `INSERT INTO` statements lead to a database modification, these statements will be highlighted\nin read-only connection mode." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlSideEffects", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlDtInspection", + "shortDescription": { + "text": "Ill-formed date/time literals" + }, + "fullDescription": { + "text": "Reports errors in date and time literals. This inspection is available in MySQL, Oracle, Db2, and H2. Example (MySQL): 'SELECT TIME '10 -12:13:14' FROM dual;\nSELECT TIME ' 12 : 13 : 14 ' FROM dual;\nSELECT TIME '12 13 14' FROM dual;\nSELECT TIME '12-13-14' FROM dual;\nSELECT TIME '12.13.14' FROM dual;\nSELECT TIME '12:13:' FROM dual;\nSELECT TIME '12:13' FROM dual;\nSELECT TIME '12:' FROM dual;' In this example, dates ignore the MySQL standard for date and time literals. Therefore, they will be highlighted. For more information about date and time literals in MySQL, see Date and Time Literals at dev.mysql.com. The following date and type literals are valid for MySQL. 'SELECT TIME '12:13:14' FROM dual;\nSELECT TIME '12:13:14.555' FROM dual;\nSELECT TIME '12:13:14.' FROM dual;\nSELECT TIME '-12:13:14' FROM dual;\nSELECT TIME '10 12:13:14' FROM dual;\nSELECT TIME '-10 12:13:14' FROM dual;'", + "markdown": "Reports errors in date and time literals. This inspection is available in MySQL, Oracle, Db2, and H2.\n\nExample (MySQL):\n\n SELECT TIME '10 -12:13:14' FROM dual;\n SELECT TIME ' 12 : 13 : 14 ' FROM dual;\n SELECT TIME '12 13 14' FROM dual;\n SELECT TIME '12-13-14' FROM dual;\n SELECT TIME '12.13.14' FROM dual;\n SELECT TIME '12:13:' FROM dual;\n SELECT TIME '12:13' FROM dual;\n SELECT TIME '12:' FROM dual;\n\nIn this example, dates ignore the MySQL standard for date and time literals. Therefore, they will be highlighted.\nFor more information about date and time literals in MySQL, see [Date and Time Literals at dev.mysql.com](https://dev.mysql.com/doc/refman/8.0/en/date-and-time-literals.html).\n\nThe following date and type literals are valid for MySQL.\n\n SELECT TIME '12:13:14' FROM dual;\n SELECT TIME '12:13:14.555' FROM dual;\n SELECT TIME '12:13:14.' FROM dual;\n SELECT TIME '-12:13:14' FROM dual;\n SELECT TIME '10 12:13:14' FROM dual;\n SELECT TIME '-10 12:13:14' FROM dual;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlDateTime", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlIllegalCursorStateInspection", + "shortDescription": { + "text": "Illegal cursor state" + }, + "fullDescription": { + "text": "Reports illegal cursor states inside SQL routines. A routine has CLOSE or FETCH statements but a cursor might be closed. A routine has the OPEN statement but a cursor might be opened. Example (Microsoft SQL Server): 'CREATE TABLE t(col INT);\n\nCREATE PROCEDURE foo() AS\nBEGIN\nDECLARE my_cursor CURSOR FOR SELECT * FROM t;\nDECLARE a INT;\nFETCH my_cursor INTO a;\nCLOSE my_cursor;\nEND;' According to CLOSE (Transact-SQL) at docs.microsoft.com, CLOSE must be issued on an open cursor, and CLOSE is not allowed on cursors that have only been declared or are already closed. So, we need to open the cursor to fix the warning. 'CREATE PROCEDURE foo() AS\nBEGIN\nDECLARE my_cursor CURSOR FOR SELECT * FROM t;\nDECLARE a INT;\nOPEN my_cursor;\nFETCH my_cursor INTO a;\nCLOSE my_cursor;\nEND;'", + "markdown": "Reports illegal cursor states inside SQL routines.\n\n* A routine has CLOSE or FETCH statements but a cursor might be closed.\n* A routine has the OPEN statement but a cursor might be opened.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE t(col INT);\n\n CREATE PROCEDURE foo() AS\n BEGIN\n DECLARE my_cursor CURSOR FOR SELECT * FROM t;\n DECLARE a INT;\n FETCH my_cursor INTO a;\n CLOSE my_cursor;\n END;\n\nAccording to [CLOSE (Transact-SQL) at\ndocs.microsoft.com](https://docs.microsoft.com/en-us/sql/t-sql/language-elements/close-transact-sql), CLOSE must be issued on an open cursor, and CLOSE is not allowed on cursors that have only been declared or are\nalready closed. So, we need to open the cursor to fix the warning.\n\n CREATE PROCEDURE foo() AS\n BEGIN\n DECLARE my_cursor CURSOR FOR SELECT * FROM t;\n DECLARE a INT;\n OPEN my_cursor;\n FETCH my_cursor INTO a;\n CLOSE my_cursor;\n END;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlIllegalCursorState", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlJoinWithoutOnInspection", + "shortDescription": { + "text": "Unsafe 'join' clause in 'delete' statement" + }, + "fullDescription": { + "text": "Reports missing conditional checks for statements that might modify the whole database. For example, usages of JOIN clauses inside DELETE statements without ON or WHERE. Without conditional checks on JOIN, DELETE drops contents of the entire table. Example (MySQL): 'CREATE TABLE foo (a INT,b INT,c INT);\nCREATE TABLE bar (a INT,b INT,c INT);\n\nDELETE table1 FROM foo table1 INNER JOIN bar table2;'", + "markdown": "Reports missing conditional checks for statements that might modify the whole database.\n\nFor example, usages of JOIN clauses inside DELETE statements without ON or WHERE. Without conditional checks on JOIN, DELETE drops\ncontents of the entire table.\n\nExample (MySQL):\n\n CREATE TABLE foo (a INT,b INT,c INT);\n CREATE TABLE bar (a INT,b INT,c INT);\n\n DELETE table1 FROM foo table1 INNER JOIN bar table2;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlJoinWithoutOn", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlDropIndexedColumnInspection", + "shortDescription": { + "text": "Index is dependent on column" + }, + "fullDescription": { + "text": "Reports cases when you try to drop columns from indexed tables. This inspection is available in Microsoft SQL Server and Sybase ASE. Example (Microsoft SQL Server): 'CREATE TABLE test_index\n(\ncol INT NOT NULL,\ncol2 INT NOT NULL,\ncol3 INT NOT NULL UNIQUE,\ncol4 VARCHAR(200)\n);\n\nCREATE UNIQUE INDEX aaaa ON test_index (col, col2);\n\nALTER TABLE test_index\nDROP COLUMN col;' You cannot delete the 'col' column because it is in the indexed table. To delete the column, you need to delete the 'aaaa' index first (for example, DROP INDEX aaaa).", + "markdown": "Reports cases when you try to drop columns from indexed tables. This inspection is available in Microsoft SQL Server and Sybase ASE.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE test_index\n (\n col INT NOT NULL,\n col2 INT NOT NULL,\n col3 INT NOT NULL UNIQUE,\n col4 VARCHAR(200)\n );\n\n CREATE UNIQUE INDEX aaaa ON test_index (col, col2);\n\n ALTER TABLE test_index\n DROP COLUMN col;\n\nYou cannot delete the `col` column because it is in the indexed table. To delete the column, you need to delete the\n`aaaa` index first (for example, DROP INDEX aaaa)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlDropIndexedColumn", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlCheckUsingColumnsInspection", + "shortDescription": { + "text": "Check using clause columns" + }, + "fullDescription": { + "text": "Reports columns in the USING clause that does not exist in both tables. Example (MySQL): 'CREATE TABLE t1 (i INT, j INT);\nCREATE TABLE t2 (k INT, l INT);\nSELECT * FROM t1 JOIN t2 USING (j);' In USING clauses, a column name must be present in both tables, and the SELECT query will automatically join those tables by using the given column name. As we do not have the 'j' column in 't2', we can rewrite the query using ON. The ON clause can join tables where the column names do not match in both tables. 'SELECT * FROM t1 JOIN t2 ON t1.j = t2.l;'", + "markdown": "Reports columns in the USING clause that does not exist in both tables.\n\nExample (MySQL):\n\n CREATE TABLE t1 (i INT, j INT);\n CREATE TABLE t2 (k INT, l INT);\n SELECT * FROM t1 JOIN t2 USING (j);\n\nIn USING clauses, a column name must be present in both tables, and the SELECT query will automatically join\nthose tables by using the given column name. As we do not have the `j` column in `t2`, we can\nrewrite the query using ON. The ON clause can join tables where the column names do not match in both tables.\n\n SELECT * FROM t1 JOIN t2 ON t1.j = t2.l;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlCheckUsingColumns", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlInsertValuesInspection", + "shortDescription": { + "text": "VALUES clause cardinality" + }, + "fullDescription": { + "text": "Reports situations when a number of parameters in VALUES does not match a number of columns in a target table. Example (MySQL): 'CREATE TABLE foo(a INT, b INT, c INT);\n\nINSERT INTO foo VALUES (1,2,3,4)' The 'foo' table has three columns but in the INSERT INTO statement we pass four.", + "markdown": "Reports situations when a number of parameters in VALUES does not match a number of columns in a target table.\n\nExample (MySQL):\n\n CREATE TABLE foo(a INT, b INT, c INT);\n\n INSERT INTO foo VALUES (1,2,3,4)\n\nThe `foo` table has three columns but in the INSERT INTO statement we pass four." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlInsertValues", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlConstantConditionInspection", + "shortDescription": { + "text": "Constant condition" + }, + "fullDescription": { + "text": "Reports conditions in WHERE or JOIN clauses that are always TRUE or always FALSE. Example (MySQL): 'CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\nSELECT a FROM t1 WHERE 'Cat' = 'Cat';' The ''Cat' = 'Cat'' is always true and will be reported.", + "markdown": "Reports conditions in WHERE or JOIN clauses that are always TRUE or always FALSE.\n\nExample (MySQL):\n\n CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\n SELECT a FROM t1 WHERE 'Cat' = 'Cat';\n\nThe `'Cat' = 'Cat'` is always true and will be reported." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlConstantCondition", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlDialectInspection", + "shortDescription": { + "text": "SQL dialect detection" + }, + "fullDescription": { + "text": "Reports situations when a dialect is not assigned to an SQL file. For example, when you open a new SQL file without assigning a dialect to it, you see a notification where the best matching dialect is advised. Click the Use link to use the advised dialect. Alternatively, click the Change dialect to link to select the other dialect.", + "markdown": "Reports situations when a dialect is not assigned to an SQL file.\n\nFor example, when you open a new SQL file without assigning a dialect\nto it, you see a notification where the best matching dialect is advised. Click the **Use \\** link to use the advised\ndialect. Alternatively, click the **Change dialect to** link to select the other dialect." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlDialectInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlRedundantElseNullInspection", + "shortDescription": { + "text": "Redundant ELSE NULL clause" + }, + "fullDescription": { + "text": "Reports redundant ELSE NULL clauses. Example (MySQL): 'SELECT CASE WHEN 2 > 1 THEN 'OK' ELSE NULL END AS alias FROM foo;' The 'ELSE NULL' part will never be executed and may be omitted.", + "markdown": "Reports redundant ELSE NULL clauses.\n\nExample (MySQL):\n\n SELECT CASE WHEN 2 > 1 THEN 'OK' ELSE NULL END AS alias FROM foo;\n\nThe `ELSE NULL` part will never be executed and may be omitted." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlRedundantElseNull", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MysqlParsingInspection", + "shortDescription": { + "text": "Unsupported syntax in pre-8.0 versions" + }, + "fullDescription": { + "text": "Reports invalid usages of UNION in queries. The inspection works in MySQL versions that are earlier than 8.0. Example (MySQL): 'SELECT * FROM (SELECT 1 UNION (SELECT 1 UNION SELECT 2)) a;'", + "markdown": "Reports invalid usages of UNION in queries.\n\nThe inspection works in MySQL versions that are earlier than 8.0.\n\nExample (MySQL):\n\n\n SELECT * FROM (SELECT 1 UNION (SELECT 1 UNION SELECT 2)) a;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MysqlParsing", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "MySQL", + "index": 18, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlCallNotationInspection", + "shortDescription": { + "text": "Using of named and positional arguments" + }, + "fullDescription": { + "text": "Reports calls in which positional arguments go after the named ones. Works in PostgreSQL, Oracle, and Db2. Example (In PostgreSQL): 'CREATE FUNCTION foo(a int, b int, c int) RETURNS int\n LANGUAGE plpgsql AS\n$$\nBEGIN\n RETURN a + b + c;\nEND\n$$;\nSELECT foo(a => 1, b => 2, c => 3);\n -- `3` goes after the named argument\nSELECT foo(1, b => 2, 3);\n -- `1` and `3` go after the named argument\nSELECT foo(b => 2, 1, 3);'", + "markdown": "Reports calls in which positional arguments go after the named ones. Works in PostgreSQL, Oracle, and Db2.\n\nExample (In PostgreSQL):\n\n CREATE FUNCTION foo(a int, b int, c int) RETURNS int\n LANGUAGE plpgsql AS\n $$\n BEGIN\n RETURN a + b + c;\n END\n $$;\n SELECT foo(a => 1, b => 2, c => 3);\n -- `3` goes after the named argument\n SELECT foo(1, b => 2, 3);\n -- `1` and `3` go after the named argument\n SELECT foo(b => 2, 1, 3);\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "SqlCallNotation", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MongoJSExtDeprecationInspection", + "shortDescription": { + "text": "Deprecated element" + }, + "fullDescription": { + "text": "Reports usages of deprecated methods in MongoDB and JavaScript code. The quick-fix replaces deprecated methods with recommended alternatives. Example: 'db.my_collection.insert()' After the quick-fix is applied: 'db.my_collection.insertOne()'", + "markdown": "Reports usages of deprecated methods in MongoDB and JavaScript code.\n\nThe quick-fix replaces deprecated methods with recommended alternatives.\n\nExample:\n\n\n db.my_collection.insert()\n\nAfter the quick-fix is applied:\n\n\n db.my_collection.insertOne()\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MongoJSDeprecation", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "MongoJS", + "index": 15, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlDuplicateColumnInspection", + "shortDescription": { + "text": "Duplicating column name in SELECT" + }, + "fullDescription": { + "text": "Reports duplicated names of column aliases in SELECT lists. Example (Sybase ASE): 'CREATE TABLE t1 (a TEXT, b INT, c INT);\n\nSELECT a AS x, b AS x FROM t1;' The 'x' alias name is used for 'a' and 'b' columns. These assignments are highlighted as errors because you cannot use identical alias names for columns in Sybase ASE.", + "markdown": "Reports duplicated names of column aliases in SELECT lists.\n\nExample (Sybase ASE):\n\n CREATE TABLE t1 (a TEXT, b INT, c INT);\n\n SELECT a AS x, b AS x FROM t1;\n\nThe `x` alias name is used for `a` and `b` columns. These assignments are highlighted as errors because\nyou cannot use identical alias names for columns in Sybase ASE." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlDuplicateColumn", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlShadowingAliasInspection", + "shortDescription": { + "text": "Column is shadowed by alias" + }, + "fullDescription": { + "text": "Reports SELECT aliases with names that match column names in the FROM clause. Example (MySQL): 'CREATE TABLE foo (a INT, b INT, c INT);\nSELECT a b, c FROM foo;' The 'a' column uses the 'b' alias but the 'b' name is also used by the column from the 'foo' table.", + "markdown": "Reports SELECT aliases with names that match column names in the FROM clause.\n\nExample (MySQL):\n\n CREATE TABLE foo (a INT, b INT, c INT);\n SELECT a b, c FROM foo;\n\nThe `a` column uses the `b` alias but the `b` name is also used by the column from the `foo`\ntable." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlShadowingAlias", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MongoJSDeprecationInspection", + "shortDescription": { + "text": "Deprecated element" + }, + "fullDescription": { + "text": "Reports usages of deprecated methods in MongoDB and JavaScript code. The quick-fix replaces deprecated methods with recommended alternatives. Example: 'db.my_collection.insert()' After the quick-fix is applied: 'db.my_collection.insertOne()'", + "markdown": "Reports usages of deprecated methods in MongoDB and JavaScript code.\n\nThe quick-fix replaces deprecated methods with recommended alternatives.\n\nExample:\n\n db.my_collection.insert()\n\nAfter the quick-fix is applied:\n\n db.my_collection.insertOne()\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MongoJSDeprecation", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "MongoJS", + "index": 15, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlTypeInspection", + "shortDescription": { + "text": "Types compatibility" + }, + "fullDescription": { + "text": "Reports type-related errors.", + "markdown": "Reports type-related errors." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlType", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlUnreachableCodeInspection", + "shortDescription": { + "text": "Unreachable code" + }, + "fullDescription": { + "text": "Reports unreachable statements inside SQL routines. Example (Microsoft SQL Server): 'CREATE FUNCTION foo() RETURNS INT AS\nBEGIN\n THROW;\n RETURN 1;\nEND;' In Microsoft SQL Server, the 'THROW' statement raises an exception and transfers execution to the CATCH block of the TRY...CATCH construct. Therefore, the 'RETURN 1;' part will never be executed.", + "markdown": "Reports unreachable statements inside SQL routines.\n\nExample (Microsoft SQL Server):\n\n CREATE FUNCTION foo() RETURNS INT AS\n BEGIN\n THROW;\n RETURN 1;\n END;\n\nIn Microsoft SQL Server, the `THROW` statement raises an exception and transfers execution to the CATCH block of the TRY...CATCH\nconstruct. Therefore, the `RETURN 1;` part will never be executed." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlUnreachable", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlUnicodeStringLiteralInspection", + "shortDescription": { + "text": "Unicode usage in SQL" + }, + "fullDescription": { + "text": "Reports string literals that use national characters without the 'N' prefix. Without the N prefix, the string is converted to the default code page of the database. This default code page may not recognize certain characters. For more information, see nchar and nvarchar (Transact-SQL) at docs.microsoft.com. Example (Microsoft SQL Server): 'SELECT 'abcde' AS a;\nSELECT N'abcde' AS b;\nSELECT 'абвгд' AS c;\nSELECT N'абвгд' AS d;' The 'SELECT 'абвгд' AS c;' does not have the 'N' prefix, the ''абвгд'' part will be highlighted.", + "markdown": "Reports string literals that use national characters without the `N` prefix.\n\nWithout the N prefix, the string is converted to the default\ncode page of the database. This default code page may not recognize certain characters. For more information, see\n[nchar and nvarchar\n(Transact-SQL)\nat docs.microsoft.com](https://docs.microsoft.com/en-us/sql/t-sql/data-types/nchar-and-nvarchar-transact-sql).\n\nExample (Microsoft SQL Server):\n\n SELECT 'abcde' AS a;\n SELECT N'abcde' AS b;\n SELECT 'абвгд' AS c;\n SELECT N'абвгд' AS d;\n\nThe `SELECT 'абвгд' AS c;` does not have the `N` prefix, the `'абвгд'` part will be highlighted." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlUnicodeStringLiteral", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlNoDataSourceInspection", + "shortDescription": { + "text": "No data sources configured" + }, + "fullDescription": { + "text": "Reports the absence of data sources in the Database tool window (View | Tool Windows | Database).", + "markdown": "Reports the absence of data sources in the **Database** tool window (**View \\| Tool Windows \\| Database**)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlNoDataSourceInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlUnusedVariableInspection", + "shortDescription": { + "text": "Unused variable" + }, + "fullDescription": { + "text": "Reports unused arguments, variables, or parameters. Example (PostgreSQL): 'CREATE FUNCTION foo(PARAMUSED INT, PARAMUNUSED INT) RETURNS INT AS\n$$\nBEGIN\n RETURN PARAMUSED;\nEND\n$$ LANGUAGE plpgsql;' The 'PARAMUNUSED' parameter is not used in the function and might be deleted.", + "markdown": "Reports unused arguments, variables, or parameters.\n\nExample (PostgreSQL):\n\n CREATE FUNCTION foo(PARAMUSED INT, PARAMUNUSED INT) RETURNS INT AS\n $$\n BEGIN\n RETURN PARAMUSED;\n END\n $$ LANGUAGE plpgsql;\n\nThe `PARAMUNUSED` parameter is not used in the function and might be deleted." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlUnused", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlResolveInspection", + "shortDescription": { + "text": "Unresolved reference" + }, + "fullDescription": { + "text": "Reports unresolved SQL references. Example (MySQL): 'CREATE TABLE users(id INT, name VARCHAR(40));\nCREATE TABLE admins(id INT, col1 INT);\n\nSELECT users.id, admins.id FROM admins WHERE admins.id > 1;' The 'users.id' column is unresolved because the 'users' table is missing in the FROM clause.", + "markdown": "Reports unresolved SQL references.\n\nExample (MySQL):\n\n CREATE TABLE users(id INT, name VARCHAR(40));\n CREATE TABLE admins(id INT, col1 INT);\n\n SELECT users.id, admins.id FROM admins WHERE admins.id > 1;\n\nThe `users.id` column is unresolved because the `users` table is missing in the FROM clause." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "SqlResolve", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PgSelectFromProcedureInspection", + "shortDescription": { + "text": "Postgres: Select from procedure call" + }, + "fullDescription": { + "text": "Reports situations when you make SELECT from a function or a DBLINK without an alias with a type (for example, 'AS t1(s VARCHAR)'). This requirement does not apply to scalar functions. Example (PostgreSQL): 'CREATE FUNCTION produce_a_table() RETURNS RECORD AS $$\nSELECT 1;\n$$ LANGUAGE sql;\nSELECT * FROM produce_a_table() AS s (c1 INT);\nSELECT * FROM produce_a_table() AS s (c1);\nSELECT * FROM DBLINK('dbname=mydb', 'SELECT proname, prosrc FROM pg_proc') AS t1;' The 'AS s (c1 INT)' has a typed alias, while 'AS s (c1)' and 'AS t1' do not. In this case, the second call of 'produce_a_table()' and 'DBLINK()' will be highlighted.", + "markdown": "Reports situations when you make SELECT from a function or a DBLINK without an alias with a type (for example, `AS t1(s VARCHAR)`).\n\nThis requirement does not apply to scalar functions.\n\nExample (PostgreSQL):\n\n CREATE FUNCTION produce_a_table() RETURNS RECORD AS $$\n SELECT 1;\n $$ LANGUAGE sql;\n SELECT * FROM produce_a_table() AS s (c1 INT);\n SELECT * FROM produce_a_table() AS s (c1);\n SELECT * FROM DBLINK('dbname=mydb', 'SELECT proname, prosrc FROM pg_proc') AS t1;\n\nThe `AS s (c1 INT)` has a typed alias, while `AS s (c1)` and `AS t1` do not.\nIn this case, the second call of `produce_a_table()` and `DBLINK()` will be highlighted." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PgSelectFromProcedure", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "PostgreSQL", + "index": 72, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlCurrentSchemaInspection", + "shortDescription": { + "text": "Current console schema introspected" + }, + "fullDescription": { + "text": "Reports schemas and databases in the current session that are not introspected. For example, this warning might occur when you try to create a table in the schema that is not introspected. Introspection is a method of inspecting a data source. When you perform introspection, structural information in the data source is inspected to detect tables, columns, functions, and other elements with their attributes.", + "markdown": "Reports schemas and databases in the current session that are not introspected.\n\nFor example, this warning might occur when you try to create a table in the schema that is not introspected.\n\nIntrospection is a method of inspecting a data source. When you perform introspection, structural information in the data source is\ninspected to detect tables, columns, functions, and other elements with their attributes." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlCurrentSchemaInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlMisleadingReferenceInspection", + "shortDescription": { + "text": "Misleading references" + }, + "fullDescription": { + "text": "Reports ambiguous references in SQL code. For example, when a name refer to both a table column and a routine parameter. The execution of such code might lead to errors or unexpected results due to counter-intuitive resolution logic. Usually, names with a more local scope have higher priority. Example (PostgreSQL): 'CREATE TABLE foo\n(\n id INT,\n name VARCHAR(5)\n);\nCREATE FUNCTION func(name VARCHAR(5)) RETURNS INT AS\n$$\nDECLARE\n b INT;\nBEGIN\n -- `name` is ambiguous as it is used as a column name and a parameter\n SELECT COUNT(*) INTO b FROM foo t WHERE t.name = name;\n RETURN b;\nEND;\n$$ LANGUAGE plpgsql;' In PostgreSQL, you can use the '#variable_conflict' directives to explicitly specify a correct reference. For example, use '#variable_conflict use_column' to refer to a column name, or '#variable_conflict use_variable' to refer to a parameter. 'CREATE TABLE foo\n(\n id INT,\n name VARCHAR(5)\n);\nCREATE FUNCTION func(name VARCHAR(5)) RETURNS INT AS\n$$\n #variable_conflict use_column\nDECLARE\n b INT;\nBEGIN\n SELECT COUNT(*) INTO b FROM foo t WHERE t.name = name;\n RETURN b;\nEND;\n$$ LANGUAGE plpgsql;'", + "markdown": "Reports ambiguous references in SQL code.\n\nFor example, when a name refer to both a table column and a routine parameter. The execution of such code might lead to errors or unexpected\nresults due to counter-intuitive resolution logic. Usually, names with a more local scope have higher priority.\n\nExample (PostgreSQL):\n\n CREATE TABLE foo\n (\n id INT,\n name VARCHAR(5)\n );\n CREATE FUNCTION func(name VARCHAR(5)) RETURNS INT AS\n $$\n DECLARE\n b INT;\n BEGIN\n -- `name` is ambiguous as it is used as a column name and a parameter\n SELECT COUNT(*) INTO b FROM foo t WHERE t.name = name;\n RETURN b;\n END;\n $$ LANGUAGE plpgsql;\n\nIn PostgreSQL, you can use the `#variable_conflict` directives to explicitly specify a correct reference. For example,\nuse `#variable_conflict use_column` to refer to a column name, or `#variable_conflict use_variable` to refer to a\nparameter.\n\n CREATE TABLE foo\n (\n id INT,\n name VARCHAR(5)\n );\n CREATE FUNCTION func(name VARCHAR(5)) RETURNS INT AS\n $$\n #variable_conflict use_column\n DECLARE\n b INT;\n BEGIN\n SELECT COUNT(*) INTO b FROM foo t WHERE t.name = name;\n RETURN b;\n END;\n $$ LANGUAGE plpgsql;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlMisleadingReference", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlInsertIntoGeneratedColumnInspection", + "shortDescription": { + "text": "Insertion into generated columns" + }, + "fullDescription": { + "text": "Reports INSERT statements that assign values to generated columns. Generated columns can be read, but their values can not be directly written. Example (PostgreSQL): 'CREATE TABLE foo\n(\n col1 INT,\n col2 INT GENERATED ALWAYS AS (col1 + 1) STORED\n);\nINSERT INTO foo(col1, col2) VALUES (1, 2);'\n You cannot insert '2' into the 'col2' column because this column is generated. For this script to work, you can change '2' to DEFAULT. 'INSERT INTO foo(col1, col2) VALUES (1, DEFAULT);'", + "markdown": "Reports INSERT statements that assign values to generated columns. Generated columns can be read, but their values can not be directly written.\n\nExample (PostgreSQL):\n\n CREATE TABLE foo\n (\n col1 INT,\n col2 INT GENERATED ALWAYS AS (col1 + 1) STORED\n );\n INSERT INTO foo(col1, col2) VALUES (1, 2);\n\nYou cannot insert `2` into the `col2` column because this column is generated.\nFor this script to work, you can change `2` to DEFAULT.\n`INSERT INTO foo(col1, col2) VALUES (1, DEFAULT);`" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlInsertIntoGeneratedColumn", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlRedundantLimitInspection", + "shortDescription": { + "text": "Redundant row limiting in queries" + }, + "fullDescription": { + "text": "Reports redundant row limiting clauses like FETCH and LIMIT in queries. Example (PostgreSQL): 'CREATE TABLE foo(a INT);\n\nSELECT * FROM foo WHERE EXISTS(SELECT * FROM foo LIMIT 2);\nSELECT * FROM foo WHERE EXISTS(SELECT * FROM foo FETCH FIRST 2 ROWS ONLY);' To fix the warning, you can add OFFSET to limiting clauses. If OFFSET is missing, then LIMIT is redundant because the usage of LIMIT does not influence the operation result of EXISTS. In case with OFFSET, we skip first 'N' rows and this will influence the output. 'SELECT * FROM foo WHERE EXISTS(SELECT * FROM foo OFFSET 1 ROW LIMIT 2);\nSELECT * FROM foo WHERE EXISTS(SELECT * FROM foo OFFSET 1 ROW FETCH FIRST 2 ROWS ONLY);'", + "markdown": "Reports redundant row limiting clauses like FETCH and LIMIT in queries.\n\nExample (PostgreSQL):\n\n CREATE TABLE foo(a INT);\n\n SELECT * FROM foo WHERE EXISTS(SELECT * FROM foo LIMIT 2);\n SELECT * FROM foo WHERE EXISTS(SELECT * FROM foo FETCH FIRST 2 ROWS ONLY);\n\nTo fix the warning, you can add OFFSET to limiting clauses. If OFFSET is missing, then LIMIT is redundant because\nthe usage of LIMIT does not influence the operation result of EXISTS. In case with OFFSET, we skip first `N` rows and this will\ninfluence the output.\n\n SELECT * FROM foo WHERE EXISTS(SELECT * FROM foo OFFSET 1 ROW LIMIT 2);\n SELECT * FROM foo WHERE EXISTS(SELECT * FROM foo OFFSET 1 ROW FETCH FIRST 2 ROWS ONLY);\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlRedundantLimit", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlInsertNullIntoNotNullInspection", + "shortDescription": { + "text": "Insert NULL into NOT NULL column" + }, + "fullDescription": { + "text": "Reports cases when you insert NULL values into columns that accept only NOT NULL values. Example (Microsoft SQL Server): 'CREATE TABLE br2 (\nid INT NOT NULL,\ncol1 NVARCHAR (20) NOT NULL,\ncol2 NVARCHAR (20) NOT NULL,\n);\n--\nINSERT INTO br2 (id, col1, col2)\nVALUES (1, NULL, NULL);' You cannot insert NULL values in 'col1' and 'col2' because they are defined as NOT NULL. If you run the script as is, you will receive an error. To fix this code, replace NULL in the VALUES part with some values (for example, '42' and ''bird''). INSERT INTO br2 (id, col1, col2)\nVALUES (1, 42, 'bird');", + "markdown": "Reports cases when you insert NULL values into columns that accept only NOT NULL values.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE br2 (\n id INT NOT NULL,\n col1 NVARCHAR (20) NOT NULL,\n col2 NVARCHAR (20) NOT NULL,\n );\n --\n INSERT INTO br2 (id, col1, col2)\n VALUES (1, NULL, NULL);\n\nYou cannot insert NULL values in `col1` and `col2` because they are defined as NOT NULL. If you run the script as\nis,\nyou will receive an error. To fix this code, replace NULL in the VALUES part with some values (for example, `42` and\n`'bird'`).\n\n```\nINSERT INTO br2 (id, col1, col2)\nVALUES (1, 42, 'bird');\n```" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlInsertNullIntoNotNull", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlDerivedTableAliasInspection", + "shortDescription": { + "text": "Each derived table should have alias" + }, + "fullDescription": { + "text": "Reports derived tables without aliases. Example (MySQL): 'CREATE TABLE table1 (id INT, name VARCHAR(20), cats FLOAT);\nCREATE TABLE table2 (id INT, age INTEGER);\n\nSELECT id AS ID, name, cats, age\nFROM (SELECT table1.id, name, cats, age\nFROM table1\nJOIN table2 ON table1.id = table2.id);' According to Derived Tables at dev.mysql.com, an alias is mandatory. You can add the alias by using the Introduce alias quick-fix. After the quick-fix is applied: 'SELECT id AS ID, name, cats, age\nFROM (SELECT table1.id, name, cats, age\nFROM table1\nJOIN table2 ON table1.id = table2.id);'", + "markdown": "Reports derived tables without aliases.\n\nExample (MySQL):\n\n CREATE TABLE table1 (id INT, name VARCHAR(20), cats FLOAT);\n CREATE TABLE table2 (id INT, age INTEGER);\n\n SELECT id AS ID, name, cats, age\n FROM (SELECT table1.id, name, cats, age\n FROM table1\n JOIN table2 ON table1.id = table2.id);\n\nAccording to [Derived Tables at dev.mysql.com](https://dev.mysql.com/doc/refman/8.0/en/derived-tables.html), an alias is\nmandatory. You can add the alias by using the **Introduce alias** quick-fix.\n\nAfter the quick-fix is applied:\n\n SELECT id AS ID, name, cats, age\n FROM (SELECT table1.id, name, cats, age\n FROM table1\n JOIN table2 ON table1.id = table2.id);\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlDerivedTableAlias", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MsBuiltinInspection", + "shortDescription": { + "text": "Builtin functions" + }, + "fullDescription": { + "text": "Reports truncations of string arguments in ISNULL functions. The ISNULL syntax is 'ISNULL(check_expression, replacement_value)'. According to ISNULL at docs.microsoft.com, 'replacement_value' will be truncated if 'replacement_value' is longer than 'check_expression'. Example (Microsoft SQL Server): 'DECLARE @name1 VARCHAR(2) = NULL;\nDECLARE @name2 VARCHAR(10) = 'Example';\nDECLARE @name3 VARCHAR(2) = 'Hi';\n\n -- `@name2` is VARCHAR(10) and will be truncated\nSELECT ISNULL(@name1, @name2);\n\n -- `@name3` is VARCHAR(2) as `@name1` and will not be truncated\nSELECT ISNULL(@name1, @name3);'", + "markdown": "Reports truncations of string arguments in ISNULL functions.\n\nThe ISNULL syntax is `ISNULL(check_expression, replacement_value)`.\n\nAccording to [ISNULL at\ndocs.microsoft.com](https://docs.microsoft.com/en-us/sql/t-sql/functions/isnull-transact-sql), `replacement_value` will be truncated if `replacement_value` is longer than\n`check_expression`.\n\nExample (Microsoft SQL Server):\n\n DECLARE @name1 VARCHAR(2) = NULL;\n DECLARE @name2 VARCHAR(10) = 'Example';\n DECLARE @name3 VARCHAR(2) = 'Hi';\n\n -- `@name2` is VARCHAR(10) and will be truncated\n SELECT ISNULL(@name1, @name2);\n\n -- `@name3` is VARCHAR(2) as `@name1` and will not be truncated\n SELECT ISNULL(@name1, @name3);\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MssqlBuiltin", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL server", + "index": 73, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlTriggerTransitionInspection", + "shortDescription": { + "text": "Suspicious code in triggers" + }, + "fullDescription": { + "text": "Reports incorrect usages of transition table variables in triggers. Example (HSQLDB): 'CREATE TABLE foo(a INT);\n\nCREATE TRIGGER trg\n AFTER DELETE ON foo\nBEGIN\n SELECT * FROM NEW;\nEND;\n\nCREATE TRIGGER trig AFTER INSERT ON foo\n REFERENCING OLD ROW AS newrow\n FOR EACH ROW WHEN (a > 1)\n INSERT INTO foo VALUES (1)' In HSQLDB, DELETE triggers may be used only with the OLD state while INSERT triggers may have only the NEW state. So, in the previous example, NEW in 'SELECT * FROM NEW;' will be highlighted as well as OLD in 'REFERENCING OLD ROW AS newrow'.", + "markdown": "Reports incorrect usages of transition table variables in triggers.\n\nExample (HSQLDB):\n\n CREATE TABLE foo(a INT);\n\n CREATE TRIGGER trg\n AFTER DELETE ON foo\n BEGIN\n SELECT * FROM NEW;\n END;\n\n CREATE TRIGGER trig AFTER INSERT ON foo\n REFERENCING OLD ROW AS newrow\n FOR EACH ROW WHEN (a > 1)\n INSERT INTO foo VALUES (1)\n\nIn HSQLDB, DELETE triggers may be used only with the OLD state while INSERT triggers may have only the NEW state. So, in the previous\nexample, NEW in `SELECT * FROM NEW;` will be highlighted as well as OLD in `REFERENCING OLD ROW AS newrow`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlTriggerTransition", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlMultipleLimitClausesInspection", + "shortDescription": { + "text": "Multiple row limiting/offset clauses in queries" + }, + "fullDescription": { + "text": "Reports usages of multiple row limiting clauses in a single query. Example (Microsoft SQL Server): 'create table foo(a int);\nselect top 1 * from foo order by a offset 10 rows fetch next 20 rows only;' The SELECT TOP clause is used to specify that only 1 record must be returned. The FETCH clause specifies the number of rows to return after the OFFSET clause has been processed. But as we already have the SELECT TOP limiting clause, the FETCH clause might be redundant.", + "markdown": "Reports usages of multiple row limiting clauses in a single query.\n\nExample (Microsoft SQL Server):\n\n create table foo(a int);\n select top 1 * from foo order by a offset 10 rows fetch next 20 rows only;\n\nThe SELECT TOP clause is used to specify that only 1 record must be\nreturned. The FETCH clause specifies the number of rows to return after the OFFSET\nclause has been processed. But as we already have the SELECT TOP limiting clause, the FETCH clause might be redundant." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlMultipleLimitClauses", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlNamedArgumentsInspection", + "shortDescription": { + "text": "Named arguments should be used" + }, + "fullDescription": { + "text": "Reports arguments that are used without names in routine calls. By default, this inspection is disabled. For more information about the difference between named and unnamed parameters, see Binding Parameters by Name (Named Parameters) at docs.microsoft.com . Example (Microsoft SQL Server): 'CREATE FUNCTION foo(n INT, m INT) RETURNS INT AS\nBEGIN\n RETURN n + m;\nEND;\n\nCREATE PROCEDURE test AS\nBEGIN\n foo n = 1, m = 2;\n\n--- The following call misses parameter names and will be highlighted\n foo 1, 2;\nEND;' Parameters '1, 2' in the 'foo 1, 2;' call are highlighted because they miss names.", + "markdown": "Reports arguments that are used without names in routine calls. By default, this inspection is disabled.\n\nFor more information about the difference between named and unnamed parameters, see [Binding Parameters by Name (Named Parameters) at docs.microsoft.com](https://docs.microsoft.com/en-us/sql/odbc/reference/develop-app/binding-parameters-by-name-named-parameters).\n\nExample (Microsoft SQL Server):\n\n CREATE FUNCTION foo(n INT, m INT) RETURNS INT AS\n BEGIN\n RETURN n + m;\n END;\n\n CREATE PROCEDURE test AS\n BEGIN\n foo n = 1, m = 2;\n\n --- The following call misses parameter names and will be highlighted\n foo 1, 2;\n END;\n\nParameters `1, 2` in the `foo 1, 2;` call are highlighted because they miss names." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlNamedArguments", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlCaseVsCoalesceInspection", + "shortDescription": { + "text": "Using CASE instead of COALESCE function and vice versa" + }, + "fullDescription": { + "text": "Reports situations when CASE and COALESCE calls are interchangeable. This inspection has the following intention actions: Replace with 'COALESCE' call and the opposite one Replace with CASE expression. Example (MySQL): 'SELECT\n -- this CASE may be replaced by COALESCE\n\tCASE\n\t\tWHEN C1 IS NOT NULL THEN C1\n\t\tELSE 0\n\t\tEND\nFROM dual;' In the example, the CASE statement can be replaced with 'SELECT COALESCE(C1, 0)' that produces the same output. If you prefer using CASE expressions, select the Prefer CASE expressions over COALESCE function option on the inspection page.", + "markdown": "Reports situations when CASE and COALESCE calls are interchangeable. This inspection has the following intention actions: **Replace\nwith 'COALESCE' call** and the opposite one **Replace with CASE expression** .\n\nExample (MySQL):\n\n SELECT\n -- this CASE may be replaced by COALESCE\n \tCASE\n \t\tWHEN C1 IS NOT NULL THEN C1\n \t\tELSE 0\n \t\tEND\n FROM dual;\n\nIn the example, the CASE statement can be replaced with `SELECT COALESCE(C1, 0)` that produces the same output.\n\nIf you prefer using CASE expressions, select the **Prefer CASE expressions over COALESCE function** option on\nthe inspection page." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlCaseVsCoalesce", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlRedundantAliasInspection", + "shortDescription": { + "text": "Redundant alias expressions" + }, + "fullDescription": { + "text": "Reports alias expressions that duplicate names of columns in tables and might be redundant. Example (PostgreSQL): 'CREATE TABLE foo(a INT, b INT);\n\nSELECT * FROM foo foo(a, b);\nSELECT * FROM foo foo(a);\nSELECT * FROM foo foo(x);\nSELECT * FROM foo foo(x, y);' The first two aliases use the same column names as in the 'foo' table. They are considered redundant because they column names are identical.", + "markdown": "Reports alias expressions that duplicate names of columns in tables and might be redundant.\n\nExample (PostgreSQL):\n\n CREATE TABLE foo(a INT, b INT);\n\n SELECT * FROM foo foo(a, b);\n SELECT * FROM foo foo(a);\n SELECT * FROM foo foo(x);\n SELECT * FROM foo foo(x, y);\n\nThe first two aliases use the same column names as in the `foo` table. They are considered redundant because they\ncolumn names are identical." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlRedundantAlias", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlIdentifierInspection", + "shortDescription": { + "text": "Identifier should be quoted" + }, + "fullDescription": { + "text": "Reports situations when you use SQL reserved keywords as identifier names in your query. Example (Microsoft SQL Server): 'CREATE TABLE select (identity INT IDENTITY NOT NULL, order INT NOT NULL);' We use 'select', 'identity', and 'order' as table and column names. But they are also reserved keywords in Microsoft SQL Server. Therefore, in order to use them as object names in the query, you must quote these identifiers. To quote them, you can use the Quote identifier quick-fix. After the quick-fix is applied: 'CREATE TABLE [select] ([identity] INT IDENTITY NOT NULL, [order] INT NOT NULL);'", + "markdown": "Reports situations when you use SQL reserved keywords as identifier names in your query.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE select (identity INT IDENTITY NOT NULL, order INT NOT NULL);\n\nWe use `select`, `identity`, and `order` as table and column names.\nBut they are also reserved keywords in Microsoft SQL Server.\nTherefore, in order to use them as object names in the query, you must quote these identifiers. To quote them, you can use the\n**Quote identifier** quick-fix.\n\nAfter the quick-fix is applied:\n\n CREATE TABLE [select] ([identity] INT IDENTITY NOT NULL, [order] INT NOT NULL);\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlIdentifier", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlTransactionStatementInTriggerInspection", + "shortDescription": { + "text": "Use of transaction management statements in triggers" + }, + "fullDescription": { + "text": "Reports usages of transaction management statements like COMMIT or ROLLBACK in trigger bodies. With COMMIT or ROLLBACK statements in a trigger body, the trigger will not compile. The fail happens because triggers start during transactions. When the trigger starts the current transaction is still not complete. As COMMIT terminates a transaction, both statements (COMMIT and ROLLBACK) would lead to an exception. Changes that are executed in a trigger should be committed (or rolled back) by the owning transaction that started the trigger. Example (Oracle): 'CREATE TABLE employee_audit\n(\n id INT NOT NULL,\n update_date DATE NOT NULL,\n old_name VARCHAR2(100),\n new_name VARCHAR2(100)\n);\n\nCREATE TABLE employees\n(\n id INT NOT NULL,\n name VARCHAR2(100) NOT NULL\n);\n\nCREATE OR REPLACE TRIGGER trig_commit\n AFTER UPDATE OF name\n ON employees\n FOR EACH ROW\nBEGIN\n INSERT INTO employee_audit VALUES (:old.id, SYSDATE, :old.name, :new.name);\n COMMIT;\nEND;\n\nCREATE OR REPLACE TRIGGER trig_rollback\n AFTER UPDATE OF name\n ON employees\n FOR EACH ROW\nBEGIN\n INSERT INTO employee_audit VALUES (:old.id, SYSDATE, :old.name, :new.name);\n ROLLBACK;\nEND;'", + "markdown": "Reports usages of transaction management statements like COMMIT or ROLLBACK in trigger bodies.\n\nWith COMMIT or ROLLBACK statements in a trigger body, the trigger will not compile.\nThe fail happens because triggers start during transactions. When the trigger starts the current transaction is still not complete. As\nCOMMIT\nterminates a transaction, both statements (COMMIT and ROLLBACK) would lead to an exception.\nChanges that are executed in a trigger should be committed (or rolled back) by the owning transaction that started the trigger.\n\nExample (Oracle):\n\n CREATE TABLE employee_audit\n (\n id INT NOT NULL,\n update_date DATE NOT NULL,\n old_name VARCHAR2(100),\n new_name VARCHAR2(100)\n );\n\n CREATE TABLE employees\n (\n id INT NOT NULL,\n name VARCHAR2(100) NOT NULL\n );\n\n CREATE OR REPLACE TRIGGER trig_commit\n AFTER UPDATE OF name\n ON employees\n FOR EACH ROW\n BEGIN\n INSERT INTO employee_audit VALUES (:old.id, SYSDATE, :old.name, :new.name);\n COMMIT;\n END;\n\n CREATE OR REPLACE TRIGGER trig_rollback\n AFTER UPDATE OF name\n ON employees\n FOR EACH ROW\n BEGIN\n INSERT INTO employee_audit VALUES (:old.id, SYSDATE, :old.name, :new.name);\n ROLLBACK;\n END;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlTransactionStatementInTrigger", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlRedundantCodeInCoalesceInspection", + "shortDescription": { + "text": "Redundant code in COALESCE call" + }, + "fullDescription": { + "text": "Reports all the arguments except for the first expression that does not evaluate to NULL in COALESCE functions. Example (MySQL): 'SELECT COALESCE(NULL, NULL, NULL, 42, NULL, 'string') as a;' The first NOT NULL argument is '42', all other arguments will be grayed out.", + "markdown": "Reports all the arguments except for the first expression that does not evaluate to NULL in COALESCE functions.\n\nExample (MySQL):\n\n SELECT COALESCE(NULL, NULL, NULL, 42, NULL, 'string') as a;\n\nThe first NOT NULL argument is `42`, all other arguments will be grayed out." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlRedundantCodeInCoalesce", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlStorageInspection", + "shortDescription": { + "text": "SQL source modification detection" + }, + "fullDescription": { + "text": "Reports situations when source code of a database object has been changed. The inspection is triggered when you perform database or object introspection. The introspection is run when you open source code of an object, run statements, and perform code refactoring. Also, you can run introspection by right-clicking an object and selecting Refresh. The inspection covers the following situations: Object source code was changed in the database but code in the editor was not updated. Works in PostgreSQL, Microsoft SQL Server, Oracle, and Sybase ASE. You changed the object source code, introspected the database, but source code has been already changed by someone else. The database introspector was updated in the IDE and you need to download new object properties that were missing in the previous introspector version.", + "markdown": "Reports situations when source code of a database object has been changed.\n\nThe inspection is triggered when you perform database or object introspection. The introspection is run when you open source code of an\nobject, run statements, and perform code refactoring.\nAlso, you can run introspection by right-clicking an object and selecting **Refresh**.\n\nThe inspection covers the following situations:\n\n* Object source code was changed in the database but code in the editor was not updated. Works in PostgreSQL, Microsoft SQL Server, Oracle, and Sybase ASE.\n* You changed the object source code, introspected the database, but source code has been already changed by someone else.\n* The database introspector was updated in the IDE and you need to download new object properties that were missing in the previous introspector version." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlStorageInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MsOrderByInspection", + "shortDescription": { + "text": "ORDER BY in queries" + }, + "fullDescription": { + "text": "Reports usages when the 'ORDER BY' clause is used without 'TOP', 'OFFSET', or 'FOR XML' in views, inline functions, derived tables, subqueries, and common table expressions. For more information about usages of 'ORDER BY', see SELECT - ORDER BY Clause (Transact-SQL) at docs.microsoft.com. Example (Microsoft SQL server): 'CREATE TABLE foo (a INT NOT NULL, b INT NOT NULL);\n\nSELECT *\nFROM (SELECT a, b\nFROM foo A\nWHERE a < 89\nORDER BY b) ALIAS;' In a subquery, ORDER BY will be highlighted as an error. You can add TOP, OFFSET, or FOR XML to a subquery. Alternatively, use the Delete element quick-fix to delete the ORDER BY section. After the quick-fix is applied: 'SELECT *\nFROM (SELECT a, b\nFROM foo A\nWHERE a < 89) ALIAS;'", + "markdown": "Reports usages when the `ORDER BY` clause is used without `TOP`, `OFFSET`, or `FOR XML` in views, inline functions, derived tables, subqueries, and common table expressions.\n\nFor more information about usages of `ORDER BY`, see [SELECT - ORDER BY Clause (Transact-SQL) at\ndocs.microsoft.com](https://docs.microsoft.com/en-us/sql/t-sql/queries/select-order-by-clause-transact-sql).\n\nExample (Microsoft SQL server):\n\n CREATE TABLE foo (a INT NOT NULL, b INT NOT NULL);\n\n SELECT *\n FROM (SELECT a, b\n FROM foo A\n WHERE a < 89\n ORDER BY b) ALIAS;\n\nIn a subquery, ORDER BY will be highlighted as an error. You can add TOP, OFFSET, or FOR XML to a subquery.\nAlternatively, use the **Delete element** quick-fix to delete the ORDER BY section.\n\nAfter the quick-fix is applied:\n\n SELECT *\n FROM (SELECT a, b\n FROM foo A\n WHERE a < 89) ALIAS;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "MsOrderBy", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "SQL server", + "index": 73, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlSignatureInspection", + "shortDescription": { + "text": "Function signature" + }, + "fullDescription": { + "text": "Reports signature issues for built-in functions. The inspection will report a wrong number of arguments, invalid keywords, wrong data types, and other issues. Example (MySQL): 'CREATE TABLE foo (a INT, b INT, c INT)\n\nSELECT IFNULL() FROM foo; -- error\nSELECT IFNULL(a) FROM foo; -- error\nSELECT IFNULL(a, b) FROM foo; -- OK\nSELECT IFNULL(a, b, c) FROM foo; -- error' In MySQL, the 'IFNULL()' function accepts strictly two arguments. So, only the 'SELECT IFNULL(a, b) FROM foo;' query is correct.", + "markdown": "Reports signature issues for built-in functions.\n\nThe inspection will report a wrong number of arguments, invalid keywords, wrong data types, and other issues.\n\nExample (MySQL):\n\n CREATE TABLE foo (a INT, b INT, c INT)\n\n SELECT IFNULL() FROM foo; -- error\n SELECT IFNULL(a) FROM foo; -- error\n SELECT IFNULL(a, b) FROM foo; -- OK\n SELECT IFNULL(a, b, c) FROM foo; -- error\n\nIn MySQL, the `IFNULL()` function accepts strictly two arguments. So, only the `SELECT IFNULL(a, b) FROM foo;`\nquery is correct." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlSignature", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlRedundantOrderingDirectionInspection", + "shortDescription": { + "text": "Redundant ordering direction" + }, + "fullDescription": { + "text": "Reports redundant ordering directions like ASC and DESC in ORDER BY clauses. Example (MySQL): 'CREATE TABLE foo(a INT, b INT, c INT);\nSELECT * FROM foo ORDER BY a ASC, b DESC, c ASC;' The ORDER BY keyword sorts the records in the ascending order by default. So, the 'ASC' keyword for 'a' and 'c' columns is redundant.", + "markdown": "Reports redundant ordering directions like ASC and DESC in ORDER BY clauses.\n\nExample (MySQL):\n\n CREATE TABLE foo(a INT, b INT, c INT);\n SELECT * FROM foo ORDER BY a ASC, b DESC, c ASC;\n\nThe ORDER BY keyword sorts the records in the ascending order by default. So, the `ASC` keyword for `a` and\n`c` columns is redundant." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlRedundantOrderingDirection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlDeprecateTypeInspection", + "shortDescription": { + "text": "Deprecated type" + }, + "fullDescription": { + "text": "Reports usages of types that are deprecated and might disappear in future versions of DBMS. Reported types: LONG in Oracle (see Deprecated and Desupported Features at docs.oracle.com). TEXT, NTEXT, and IMAGE in Microsoft SQL Server (see Deprecated Database Engine Features in SQL Server 2016 at docs.microsoft.com). Example (Oracle): 'CREATE TABLE ot.foo(\na NUMBER GENERATED BY DEFAULT AS IDENTITY,\nb LONG NOT NULL\n);'", + "markdown": "Reports usages of types that are deprecated and might disappear in future versions of DBMS.\n\nReported types:\n\n* LONG in Oracle (see [Deprecated\n and Desupported Features at docs.oracle.com](https://docs.oracle.com/cd/A91202_01/901_doc/server.901/a90120/ch4_dep.htm#6690)).\n* TEXT, NTEXT, and IMAGE in Microsoft SQL Server (see [Deprecated Database Engine Features in SQL Server 2016 at docs.microsoft.com](https://docs.microsoft.com/en-us/sql/database-engine/deprecated-database-engine-features-in-sql-server-2016?view=sql-server-ver15)).\n\nExample (Oracle):\n\n CREATE TABLE ot.foo(\n a NUMBER GENERATED BY DEFAULT AS IDENTITY,\n b LONG NOT NULL\n );\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlDeprecateType", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlAggregatesInspection", + "shortDescription": { + "text": "Aggregate-related problems" + }, + "fullDescription": { + "text": "Reports invalid usages of SQL aggregate functions. The following situations are considered: Columns that are used in HAVING and ORDER BY clauses but are missed in GROUP BY clauses. 'CREATE TABLE foo(id INT PRIMARY KEY, a INT, b INT);\nSELECT a, MAX(b) FROM foo GROUP BY a HAVING b > 0;\nSELECT * FROM foo GROUP BY a ORDER BY b;' This rule does not apply when grouping is made by the primary key. 'SELECT * FROM foo GROUP BY id ORDER BY b;' Aggregate functions in a wrong context. Usually, you can use aggregate functions in the following contexts: a list of expressions in SELECT; in HAVING and ORDER BY sections; and other dialect-specific cases. The following queries will display an error. 'SELECT a FROM foo WHERE MAX(b) > 0;\nSELECT a FROM foo GROUP BY MAX(a);' Nested calls of aggregate functions. 'SELECT MAX(SUM(a)) FROM foo GROUP BY a;' This rule does not apply to analytic functions. The following query is valid and correct. 'SELECT MAX(SUM(a) OVER ()) FROM foo;' Usages of HAVING without aggregate functions. In this case, consider rewriting your code using the WHERE section. 'SELECT a, MAX(b) FROM foo GROUP BY a HAVING a > 0;'", + "markdown": "Reports invalid usages of SQL aggregate functions.\n\nThe following situations are considered:\n\n* Columns that are used in HAVING and ORDER BY clauses but are missed in GROUP BY clauses.\n\n CREATE TABLE foo(id INT PRIMARY KEY, a INT, b INT);\n SELECT a, MAX(b) FROM foo GROUP BY a HAVING b > 0;\n SELECT * FROM foo GROUP BY a ORDER BY b;\n\n This rule does not apply when grouping is made by the primary key.\n\n SELECT * FROM foo GROUP BY id ORDER BY b;\n\n* Aggregate functions in a wrong context. Usually, you can use aggregate functions in the following contexts: a list of expressions in\n SELECT; in HAVING and ORDER BY sections; and other dialect-specific cases. The following queries will display an error.\n\n SELECT a FROM foo WHERE MAX(b) > 0;\n SELECT a FROM foo GROUP BY MAX(a);\n\n* Nested calls of aggregate functions.\n\n SELECT MAX(SUM(a)) FROM foo GROUP BY a;\n\n This rule does not apply to analytic functions. The following query is valid and correct.\n\n SELECT MAX(SUM(a) OVER ()) FROM foo;\n\n* Usages of HAVING without aggregate functions. In this case, consider rewriting your code using the WHERE section.\n\n SELECT a, MAX(b) FROM foo GROUP BY a HAVING a > 0;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlAggregates", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlConstantExpressionInspection", + "shortDescription": { + "text": "Constant expression" + }, + "fullDescription": { + "text": "Reports conditions and expressions that are always true, false or null. Example (MySQL): 'CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\nSELECT a FROM t1 WHERE 'Cat' = 'Cat';\nSELECT a FROM t1 WHERE 'Cat' = null;' The ''Cat' = 'Cat'' is always true and will be reported. The ''Cat' = null' is always null and will be reported.", + "markdown": "Reports conditions and expressions that are always true, false or null.\n\nExample (MySQL):\n\n CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\n SELECT a FROM t1 WHERE 'Cat' = 'Cat';\n SELECT a FROM t1 WHERE 'Cat' = null;\n\nThe `'Cat' = 'Cat'` is always true and will be reported.\n\nThe `'Cat' = null` is always null and will be reported." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlConstantExpression", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlMissingColumnAliasesInspection", + "shortDescription": { + "text": "Missing column aliases" + }, + "fullDescription": { + "text": "Reports queries without explicit aliases in output expressions (for example, in the SELECT statement). Example (PostgreSQL): 'CREATE TABLE foo(a INT, b INT);\n\nSELECT 1, a + 1 AS A2, MAX(b) AS M\nFROM foo;'", + "markdown": "Reports queries without explicit aliases in output expressions (for example, in the SELECT statement).\n\nExample (PostgreSQL):\n\n CREATE TABLE foo(a INT, b INT);\n\n SELECT 1, a + 1 AS A2, MAX(b) AS M\n FROM foo;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlMissingColumnAliases", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlAddNotNullColumnInspection", + "shortDescription": { + "text": "Adding not null column without default value" + }, + "fullDescription": { + "text": "Reports attempts to create NOT NULL columns without DEFAULT values. Example (Microsoft SQL Server): 'CREATE TABLE foo (a INT, b INT)\n\nALTER TABLE foo ADD c INT NOT NULL;' By default, a column holds NULL values. In the example, we use the NOT NULL constraint that enforces a column not to accept NULL values. If we prohibit to use NULL values, we must set the DEFAULT value that SQL can use when we create a new record. 'ALTER TABLE foo ADD c INT NOT NULL DEFAULT 42;' You can quickly add the DEFAULT value by using the Add DEFAULT value quick-fix.", + "markdown": "Reports attempts to create NOT NULL columns without DEFAULT values.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE foo (a INT, b INT)\n\n ALTER TABLE foo ADD c INT NOT NULL;\n\nBy default, a column holds NULL values. In the example, we use the NOT NULL constraint that enforces a column not to accept NULL values.\nIf we prohibit to use NULL values, we must set the DEFAULT value that SQL can use when we create a new record.\n\n ALTER TABLE foo ADD c INT NOT NULL DEFAULT 42;\n\nYou can quickly add the DEFAULT value by using the **Add DEFAULT value** quick-fix." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlAddNotNullColumn", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OraOverloadInspection", + "shortDescription": { + "text": "Overloading errors" + }, + "fullDescription": { + "text": "Reports invalid cases of subprogram overloading in Oracle. Example (Oracle): 'DECLARE\n SUBTYPE fff IS BINARY_INTEGER;\n SUBTYPE ggg IS NATURAL;\n PROCEDURE foo (a IN ggg) IS BEGIN NULL; END;\n PROCEDURE foo (a IN fff) IS BEGIN NULL; END;\nBEGIN\n NULL;\nEND;' You cannot overload subprograms which parameters differ only in subtypes. For example, you cannot overload procedures where one accepts a BINARY INTEGER parameter and the other accepts a NATURAL parameter. For more information about restrictions on procedure overloading, see Restrictions on Overloading at docs.oracle.com.", + "markdown": "Reports invalid cases of subprogram overloading in Oracle.\n\nExample (Oracle):\n\n DECLARE\n SUBTYPE fff IS BINARY_INTEGER;\n SUBTYPE ggg IS NATURAL;\n PROCEDURE foo (a IN ggg) IS BEGIN NULL; END;\n PROCEDURE foo (a IN fff) IS BEGIN NULL; END;\n BEGIN\n NULL;\n END;\n\nYou cannot overload subprograms which parameters differ only in subtypes. For example, you cannot overload procedures where one accepts a\nBINARY INTEGER parameter and the other accepts a NATURAL parameter. For more information about restrictions on procedure overloading,\nsee [Restrictions on Overloading at docs.oracle.com](https://docs.oracle.com/cd/B19306_01/appdev.102/b14261/subprograms.htm)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlOverload", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Oracle", + "index": 78, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OraMissingBodyInspection", + "shortDescription": { + "text": "Missing body for package/object type specification" + }, + "fullDescription": { + "text": "Reports package and object type specifications that are missing body declarations. Package specifications and object types that declare routines as well as package specifications with cursors must have body declarations where those routines and cursors are implemented. Absence of a body leads to a runtime error when routines or cursors are invoked in program code. Example (Oracle): 'CREATE OR REPLACE PACKAGE ppp IS\n FUNCTION foo(a INT) RETURN INT;\nEND;'", + "markdown": "Reports package and object type specifications that are missing body declarations.\n\nPackage specifications and object types that declare routines as well as package specifications with cursors must have body\ndeclarations where those routines and cursors are implemented. Absence of a body leads to a runtime error when routines or cursors are\ninvoked in program code.\n\nExample (Oracle):\n\n CREATE OR REPLACE PACKAGE ppp IS\n FUNCTION foo(a INT) RETURN INT;\n END;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlMissingBody", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Oracle", + "index": 78, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OraUnmatchedForwardDeclarationInspection", + "shortDescription": { + "text": "Forward declaration without definition" + }, + "fullDescription": { + "text": "Reports declarations of procedures and functions that are missing their implementation in code. In Oracle, you can declare a procedure or a function without its body, and write the implementation later. The inspection will report names of such procedures or functions that are left without implementation. Example (Oracle): 'DECLARE PROCEDURE foo(a int, b varchar2);\nBEGIN\n NULL;\nEND;' The 'foo' procedure is declared but is missing implementation. We can add the implementation to get rid of the error. 'DECLARE PROCEDURE foo(a int, b varchar2);\n PROCEDURE foo(a int, b varchar2) IS\nBEGIN\n NULL;\nEND;\nBEGIN\n NULL;\nEND;'", + "markdown": "Reports declarations of procedures and functions that are missing their implementation in code.\n\nIn Oracle, you can declare a procedure or a function without its body, and write the implementation later. The inspection will report names\nof such procedures or functions that are left without implementation.\n\nExample (Oracle):\n\n DECLARE PROCEDURE foo(a int, b varchar2);\n BEGIN\n NULL;\n END;\n\nThe `foo` procedure is declared but is missing implementation. We can add the implementation to get rid of the error.\n\n DECLARE PROCEDURE foo(a int, b varchar2);\n PROCEDURE foo(a int, b varchar2) IS\n BEGIN\n NULL;\n END;\n BEGIN\n NULL;\n END;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "SqlUnmatchedForwardDeclaration", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Oracle", + "index": 78, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlGotoInspection", + "shortDescription": { + "text": "Usages of GOTO statements" + }, + "fullDescription": { + "text": "Reports usages of backward GOTO statements and GOTO statements used to exit a loop. The extensive use of GOTO statements is generally not recommended. For details, see GOTO statement in SQL procedures at ibm.com. Instead of jumping back to a previous statement using GOTO, consider using a loop. Instead of exiting the WHILE loop with GOTO, consider using other control-of-flow statements (for example, RETURN or BREAK). Example (Oracle): 'CREATE PROCEDURE test(n INT) AS\nDECLARE\n x INT;\nBEGIN\n x := 0;\n GOTO a;\n <> x := 1;\n IF (n = 0) THEN\n GOTO a;\n END IF;\n WHILE TRUE\n LOOP\n GOTO b;\n END LOOP;\n <> x := 3;\nEND;'", + "markdown": "Reports usages of backward GOTO statements and GOTO statements used to exit a loop.\n\nThe extensive use of GOTO statements is generally\nnot recommended. For details, see [GOTO statement in\nSQL\nprocedures at ibm.com](https://www.ibm.com/docs/no/db2/11.5?topic=procedures-goto-statement-in-sql).\n\nInstead of jumping back to a previous statement using GOTO, consider using a loop.\n\nInstead of exiting the WHILE loop with GOTO, consider using other control-of-flow statements (for example, RETURN or BREAK).\n\nExample (Oracle):\n\n CREATE PROCEDURE test(n INT) AS\n DECLARE\n x INT;\n BEGIN\n x := 0;\n GOTO a;\n <> x := 1;\n IF (n = 0) THEN\n GOTO a;\n END IF;\n WHILE TRUE\n LOOP\n GOTO b;\n END LOOP;\n <> x := 3;\n END;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlGoto", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MongoJSExtResolveInspection", + "shortDescription": { + "text": "Resolution problems" + }, + "fullDescription": { + "text": "Reports unresolved references in MongoDB and JavaScript code.", + "markdown": "Reports unresolved references in MongoDB and JavaScript code." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MongoJSResolve", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "MongoJS", + "index": 15, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlWithoutWhereInspection", + "shortDescription": { + "text": "Delete or update statement without where clauses" + }, + "fullDescription": { + "text": "Reports usages of DELETE or UPDATE statements without WHERE clauses. Without WHERE clauses, DELETE drops all the data from the table, and UPDATE overwrites values for all the table rows. Example (MySQL): 'CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\nupdate t1 set a = 'Smith';\ndelete from t1;'", + "markdown": "Reports usages of DELETE or UPDATE statements without WHERE clauses.\n\nWithout WHERE clauses, DELETE drops all the data from the table, and UPDATE overwrites values for all the table rows.\n\nExample (MySQL):\n\n CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\n update t1 set a = 'Smith';\n delete from t1;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlWithoutWhere", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlAmbiguousColumnInspection", + "shortDescription": { + "text": "Ambiguous reference" + }, + "fullDescription": { + "text": "Reports columns that have identical names but belong to different tables. Example (MySQL): 'CREATE TABLE foo(id INT PRIMARY KEY);\nCREATE TABLE bar(id INT PRIMARY KEY);\n\nSELECT foo.id, bar.id FROM foo, bar WHERE id > 0;' The 'id' column appears in 'foo' and 'bar' tables. You need to qualify the column name to make the query correct. 'SELECT foo.id, bar.id FROM foo, bar WHERE foo.id > 0;'", + "markdown": "Reports columns that have identical names but belong to different tables.\n\nExample (MySQL):\n\n CREATE TABLE foo(id INT PRIMARY KEY);\n CREATE TABLE bar(id INT PRIMARY KEY);\n\n SELECT foo.id, bar.id FROM foo, bar WHERE id > 0;\n\nThe `id` column appears in `foo` and `bar` tables. You need to qualify the column name to\nmake the query correct.\n\n SELECT foo.id, bar.id FROM foo, bar WHERE foo.id > 0;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlAmbiguousColumn", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlUnusedCteInspection", + "shortDescription": { + "text": "Unused common table expression" + }, + "fullDescription": { + "text": "Reports unused common table expressions (CTE) inside the query. Example (PostgreSQL): 'CREATE TABLE foo(a INT);\n\nWITH a AS (SELECT 1 AS x FROM foo)\nSELECT 1 + 2 FROM foo;' By using WITH, we create a temporary named result set with the name 'a', also known as a common table expression (CTE). But we do not use this CTE later in the code. The unused CTE is greyed out.", + "markdown": "Reports unused common table expressions (CTE) inside the query.\n\nExample (PostgreSQL):\n\n CREATE TABLE foo(a INT);\n\n WITH a AS (SELECT 1 AS x FROM foo)\n SELECT 1 + 2 FROM foo;\n\nBy using WITH, we create a temporary named result set with the name `a`, also known as a common table expression (CTE). But\nwe do not use this CTE later in the code. The unused CTE is greyed out." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlUnusedCte", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MongoJSResolveInspection", + "shortDescription": { + "text": "Resolution problems" + }, + "fullDescription": { + "text": "Reports unresolved references in MongoDB and JavaScript code. Example: 'db\nuse foo\n -- a reference to a non-existing collection\ndb.non_existing_collection\ndb['non_existing_collection']\ndb['non_existing_collection'].find().hasNext()' The 'non_existing_collection' collection does not exist in the database and will be reported.", + "markdown": "Reports unresolved references in MongoDB and JavaScript code.\n\nExample:\n\n db\n use foo\n -- a reference to a non-existing collection\n db.non_existing_collection\n db['non_existing_collection']\n db['non_existing_collection'].find().hasNext()\n\nThe `non_existing_collection` collection does not exist in the database and will be reported." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MongoJSResolve", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "MongoJS", + "index": 15, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlNullComparisonInspection", + "shortDescription": { + "text": "Null comparison" + }, + "fullDescription": { + "text": "Reports comparisons with NULL that can be replaced with IS NULL or IS NOT NULL operators. Example (Microsoft SQL Server): 'CREATE TABLE foo ( id int );\n\nSELECT * FROM foo WHERE NULL = NULL;\nSELECT * FROM foo WHERE NULL != NULL;' The 'NULL = NULL' can be replaced with 'IS NULL', the 'NULL != NULL' comparison with 'IS NOT NULL'. To do this replacement, you can use Use IS NULL operator or Use IS NOT NULL operator quick-fixes. 'SELECT * FROM foo WHERE NULL IS NULL;\nSELECT * FROM foo WHERE NULL IS NOT NULL;'", + "markdown": "Reports comparisons with NULL that can be replaced with IS NULL or IS NOT NULL operators.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE foo ( id int );\n\n SELECT * FROM foo WHERE NULL = NULL;\n SELECT * FROM foo WHERE NULL != NULL;\n\nThe `NULL = NULL` can be replaced with `IS NULL`, the `NULL != NULL` comparison\nwith `IS NOT NULL`. To do this replacement, you can use **Use IS NULL operator** or **Use IS NOT NULL operator**\nquick-fixes.\n\n SELECT * FROM foo WHERE NULL IS NULL;\n SELECT * FROM foo WHERE NULL IS NOT NULL;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlNullComparison", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 41, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.intellij.plugins.markdown", + "version": "241.18034.45", + "rules": [ + { + "id": "MarkdownOutdatedTableOfContents", + "shortDescription": { + "text": "Outdated table of contents section" + }, + "fullDescription": { + "text": "Checks if a particular table of contents section corresponds to the actual structure of the document.", + "markdown": "Checks if a particular table of contents section corresponds to the actual structure of the document." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MarkdownOutdatedTableOfContents", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Markdown", + "index": 21, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MarkdownUnresolvedLinkLabel", + "shortDescription": { + "text": "Unresolved link label" + }, + "fullDescription": { + "text": "Reports unresolved link labels in Markdown files.", + "markdown": "Reports unresolved link labels in Markdown files." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MarkdownUnresolvedLinkLabel", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Markdown", + "index": 21, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MarkdownIncorrectTableFormatting", + "shortDescription": { + "text": "Incorrect table formatting" + }, + "fullDescription": { + "text": "Checks if table is correctly formatted.", + "markdown": "Checks if table is correctly formatted." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "MarkdownIncorrectTableFormatting", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Markdown", + "index": 21, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MarkdownIncorrectlyNumberedListItem", + "shortDescription": { + "text": "Incorrectly numbered list item" + }, + "fullDescription": { + "text": "Ordered list items are expected to have straight numeration starting from 1. The motivation behind this is that most of Markdown processors are ignoring the numbering of ordered lists. A processor will generate an '
    ' element for such list, that will number items continuously from 1.", + "markdown": "Ordered list items are expected to have straight numeration starting from 1.\n\nThe motivation behind this is that most of Markdown processors are ignoring the numbering of ordered lists. A processor will generate an `
      ` element for such list, that will number items continuously from 1." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MarkdownIncorrectlyNumberedListItem", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Markdown", + "index": 21, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MarkdownLinkDestinationWithSpaces", + "shortDescription": { + "text": "Links should not contain spaces" + }, + "fullDescription": { + "text": "To ensure consistency between different tools, file links should not contain spaces. Example: '[Some file link](some file.md)' A quick-fix replaces spaces with their url-encoded equivalent: '[Some file link](some%20file.md)'", + "markdown": "To ensure consistency between different tools, file links should not contain spaces.\n\n**Example:**\n\n\n [Some file link](some file.md)\n\nA quick-fix replaces spaces with their url-encoded equivalent:\n\n\n [Some file link](some%20file.md)\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MarkdownLinkDestinationWithSpaces", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Markdown", + "index": 21, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MarkdownNoTableBorders", + "shortDescription": { + "text": "Table doesn't have side borders" + }, + "fullDescription": { + "text": "Checks if table has correct side borders. For compatibility reasons all table rows should have borders (pipe symbols) at the start and at the end.", + "markdown": "Checks if table has correct side borders. For compatibility reasons all table rows should have borders (pipe symbols) at the start and at the end." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MarkdownNoTableBorders", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Markdown", + "index": 21, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MarkdownUnresolvedFileReference", + "shortDescription": { + "text": "Unresolved file references" + }, + "fullDescription": { + "text": "Reports unresolved file references in Markdown files.", + "markdown": "Reports unresolved file references in Markdown files." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MarkdownUnresolvedFileReference", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Markdown", + "index": 21, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MarkdownUnresolvedHeaderReference", + "shortDescription": { + "text": "Unresolved header reference" + }, + "fullDescription": { + "text": "Reports unresolved header references in Markdown files.", + "markdown": "Reports unresolved header references in Markdown files." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MarkdownUnresolvedHeaderReference", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Markdown", + "index": 21, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "com.jetbrains.restClient", + "version": "241.18034.45", + "rules": [ + { + "id": "HttpRequestRequestSeparatorJsonBodyInspection", + "shortDescription": { + "text": "Missing request separator in JSON body" + }, + "fullDescription": { + "text": "Reports possible requests in injected JSON body where request separator '###' is missing. The quick fix suggests adding the separator '###' before the request.", + "markdown": "Reports possible requests in injected JSON body where request separator `###` is missing. The quick fix suggests adding the separator `###` before the request." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "HttpRequestRequestSeparatorJsonBodyInspection", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "HTTP Client", + "index": 23, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HttpRequestWhitespaceInsideRequestTargetPath", + "shortDescription": { + "text": "Whitespace in URL in request" + }, + "fullDescription": { + "text": "Highlights spaces inside URL path segments. HTTP Client will ignore them. For better composing use Split Lines action.", + "markdown": "Highlights spaces inside URL path segments. HTTP Client will ignore them. For better composing use Split Lines action." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "HttpRequestWhitespaceInsideRequestTargetPath", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "HTTP Client", + "index": 23, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HttpClientUnresolvedAuthId", + "shortDescription": { + "text": "Unresolved Auth identifier" + }, + "fullDescription": { + "text": "Highlights references to non-existent Auth configurations. Suggests creating a new one in the current environment.", + "markdown": "Highlights references to non-existent Auth configurations. Suggests creating a new one in the current environment." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "HttpClientUnresolvedAuthId", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "HTTP Client", + "index": 23, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HttpRequestEnvironmentAuthConfigurationValidationInspection", + "shortDescription": { + "text": "Auth configuration validation" + }, + "fullDescription": { + "text": "Reports Auth configuration the following problems in HTTP Client environment files: Missing properties in Auth configuration Auth/Security configuration placed in private environment file", + "markdown": "Reports Auth configuration the following problems in HTTP Client environment files:\n\n* Missing properties in Auth configuration\n* Auth/Security configuration placed in private environment file" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HttpRequestEnvironmentAuthConfigurationValidationInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTTP Client", + "index": 23, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HttpRequestContentLengthIsIgnored", + "shortDescription": { + "text": "Redundant 'Content-Length'" + }, + "fullDescription": { + "text": "Reports an explicitly set 'Content-Length' header. The header is redundant because HTTP Client uses the actual request body length.", + "markdown": "Reports an explicitly set `Content-Length` header. The header is redundant because HTTP Client uses the actual request body length." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HttpRequestContentLengthIsIgnored", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTTP Client", + "index": 23, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HttpRequestRequestSeparatorXmlBodyInspection", + "shortDescription": { + "text": "Missing request separator in HTML/XML body" + }, + "fullDescription": { + "text": "Reports possible requests in injected XML/HTML body where request separator '###' is missing. The quick fix suggests adding the separator '###' before the request.", + "markdown": "Reports possible requests in injected XML/HTML body where request separator `###` is missing. The quick fix suggests adding the separator `###` before the request." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "HttpRequestRequestSeparatorXmlBodyInspection", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "HTTP Client", + "index": 23, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "IncorrectHttpHeaderInspection", + "shortDescription": { + "text": "Incorrect HTTP header" + }, + "fullDescription": { + "text": "Reports unknown HTTP headers that do not match any publicly known headers. The quick fix suggests adding the header to the list of custom headers when the Use custom HTTP headers option is enabled. HTTP headers from the list of custom headers will not trigger the inspection.", + "markdown": "Reports unknown HTTP headers that do not match any [publicly\nknown headers](https://www.iana.org/assignments/message-headers/message-headers.xml). The quick fix suggests adding the header to the list of custom headers when the **Use custom HTTP headers** option\nis enabled. HTTP headers from the list of custom headers will not trigger the inspection." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "IncorrectHttpHeaderInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTTP Client", + "index": 23, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HttpClientInappropriateProtocolUsageInspection", + "shortDescription": { + "text": "Inappropriate HTTP Protocol usage" + }, + "fullDescription": { + "text": "Reports inappropriate usage of HTTP protocol keyword, e.g. 'HTTP/2', with non-HTTP method requests. Such a usage will be ignored.", + "markdown": "Reports inappropriate usage of HTTP protocol keyword, e.g. `HTTP/2`, with non-HTTP method requests. Such a usage will be ignored." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "HttpClientInappropriateProtocolUsageInspection", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "HTTP Client", + "index": 23, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HttpRequestPlaceholder", + "shortDescription": { + "text": "'$placeholder' in HTTP Request" + }, + "fullDescription": { + "text": "Reports a '$placeholder' inside a request. A '$placeholder' to be replaced by the user is created automatically when a tool cannot recognize a part of a request. For example, a request mapping '/aaaa/*/bbb' will be generated as 'GET localhost/aaaa/{{$placeholder}}/bbb'.", + "markdown": "Reports a `$placeholder` inside a request.\n\nA `$placeholder` to be replaced by the user is created automatically when a tool cannot recognize a part of a request. For example, a request mapping `/aaaa/*/bbb` will be generated as `GET localhost/aaaa/{{$placeholder}}/bbb`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HttpRequestPlaceholder", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTTP Client", + "index": 23, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HttpClientUnresolvedVariable", + "shortDescription": { + "text": "Unresolved environment variable" + }, + "fullDescription": { + "text": "Reports variables undeclared in the current environment HTTP Client. Executing requests with undeclared variables probably fail. Consider adding a variable to the environment or selecting an environment with this variable. Inspection doesn't report variables in request bodies, because it can be a valid syntax of the body. Some variables may be not reported as unresolved, because they are declared in response or pre-request handler scripts via 'client.global.set' or 'request.variables.set' functions call.", + "markdown": "Reports variables undeclared in the current environment HTTP Client.\n\n\nExecuting requests with undeclared variables probably fail.\nConsider adding a variable to the environment or selecting an environment with this variable.\n\nInspection doesn't report variables in request bodies, because it can be a valid syntax of the body.\n\n\nSome variables may be not reported as unresolved, because they are declared in response or pre-request handler scripts via\n`client.global.set` or `request.variables.set` functions call." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HttpClientUnresolvedVariable", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTTP Client", + "index": 23, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HttpRequestRequestSeparatorYamlBodyInspection", + "shortDescription": { + "text": "Missing request separator in YAML body" + }, + "fullDescription": { + "text": "Reports possible requests in injected YAML body where request separator '###' is missing. The quick fix suggests adding the separator '###' before the request.", + "markdown": "Reports possible requests in injected YAML body where request separator `###` is missing. The quick fix suggests adding the separator `###` before the request." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "HttpRequestRequestSeparatorYamlBodyInspection", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "HTTP Client", + "index": 23, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HttpUrlsUsage", + "shortDescription": { + "text": "Link with unencrypted protocol" + }, + "fullDescription": { + "text": "Reports the links that use unencrypted protocols (such as HTTP), which can expose your data to man-in-the-middle attacks. These attacks are dangerous in general and may be especially harmful for artifact repositories. Use protocols with encryption, such as HTTPS, instead. See HTTPS: Difference from HTTP (wikipedia.org).", + "markdown": "Reports the links that use unencrypted protocols (such as HTTP), which can expose your data to man-in-the-middle attacks. These attacks\nare dangerous in general and may be especially harmful for artifact repositories. Use protocols with encryption, such as HTTPS,\ninstead.\n\nSee [HTTPS: Difference from HTTP (wikipedia.org)](https://en.wikipedia.org/wiki/HTTPS#Difference_from_HTTP)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "HttpUrlsUsage", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Security", + "index": 77, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "com.intellij.dts", + "version": "241.18034.45", + "rules": [ + { + "id": "DtsPropertyEnum", + "shortDescription": { + "text": "Invalid property value (enum)" + }, + "fullDescription": { + "text": "Reports enum properties with invalid values. The values of an enum property are specified in the node binding.", + "markdown": "Reports enum properties with invalid values. The values of an enum property are specified in the node binding." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DtsPropertyEnum", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Devicetree", + "index": 24, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DtsDuplicateElement", + "shortDescription": { + "text": "Duplicate element" + }, + "fullDescription": { + "text": "Reports duplicated elements inside a node. This could either be two or more properties with the same name or two or more nodes.", + "markdown": "Reports duplicated elements inside a node. This could either be two or more properties with the same name or two or more nodes." + }, + "defaultConfiguration": { + "enabled": true, + "level": "error", + "parameters": { + "suppressToolId": "DtsDuplicateElement", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Devicetree", + "index": 24, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DtsRequiredProperty", + "shortDescription": { + "text": "Required properties" + }, + "fullDescription": { + "text": "Reports missing required properties. Properties are considered required if they are marked as required in the binding.", + "markdown": "Reports missing required properties. Properties are considered required if they are marked as required in the binding." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DtsRequiredProperty", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Devicetree", + "index": 24, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DtsBits", + "shortDescription": { + "text": "Invalid array element size" + }, + "fullDescription": { + "text": "Reports invalid array element size. Array elements must be 8, 16, 32 or 64-bits.", + "markdown": "Reports invalid array element size. Array elements must be 8, 16, 32 or 64-bits." + }, + "defaultConfiguration": { + "enabled": true, + "level": "error", + "parameters": { + "suppressToolId": "DtsBits", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Devicetree", + "index": 24, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DtsNodeName", + "shortDescription": { + "text": "Invalid node name" + }, + "fullDescription": { + "text": "Reports invalid node names. Node names should match '[a-zA-Z0-9,._+@-]+' and should only include at most one '@'.", + "markdown": "Reports invalid node names. Node names should match `[a-zA-Z0-9,._+@-]+` and should only include at most one `@`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DtsNodeName", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Devicetree", + "index": 24, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DtsPropertyType", + "shortDescription": { + "text": "Invalid property type" + }, + "fullDescription": { + "text": "Reports properties with invalid type. The type of the property is specified in the node binding.", + "markdown": "Reports properties with invalid type. The type of the property is specified in the node binding." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DtsPropertyType", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Devicetree", + "index": 24, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DtsLabelName", + "shortDescription": { + "text": "Invalid label name" + }, + "fullDescription": { + "text": "Reports invalid label names. Label names should match '[a-zA-Z_][a-zA-Z0-9_]*'.", + "markdown": "Reports invalid label names. Label names should match `[a-zA-Z_][a-zA-Z0-9_]*`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DtsLabelName", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Devicetree", + "index": 24, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DtsUnitName", + "shortDescription": { + "text": "Invalid unit name" + }, + "fullDescription": { + "text": "Reports invalid unit names inside node names. Unit names should not have leading 0s or start with 0x.", + "markdown": "Reports invalid unit names inside node names. Unit names should not have leading 0s or start with 0x." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "DtsUnitName", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Devicetree", + "index": 24, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DtsPropertyName", + "shortDescription": { + "text": "Invalid property name" + }, + "fullDescription": { + "text": "Reports invalid property names. Property names should match '[a-zA-Z0-9,._+*#?-]+'.", + "markdown": "Reports invalid property names. Property names should match `[a-zA-Z0-9,._+*#?-]+`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DtsPropertyName", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Devicetree", + "index": 24, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DtsContainer", + "shortDescription": { + "text": "Invalid entry location" + }, + "fullDescription": { + "text": "Reports if an entry is not valid in its current location. For example if a property was defied on the root level of a devicetree source file.", + "markdown": "Reports if an entry is not valid in its current location. For example if a property was defied on the root level of a devicetree source file." + }, + "defaultConfiguration": { + "enabled": true, + "level": "error", + "parameters": { + "suppressToolId": "DtsContainer", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Devicetree", + "index": 24, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DtsPropertyConst", + "shortDescription": { + "text": "Invalid property value (const)" + }, + "fullDescription": { + "text": "Reports const properties with invalid values. The value of a const property is specified in the node binding.", + "markdown": "Reports const properties with invalid values. The value of a const property is specified in the node binding." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DtsPropertyConst", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Devicetree", + "index": 24, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DtsStatementOrder", + "shortDescription": { + "text": "Invalid entry order" + }, + "fullDescription": { + "text": "Reports if property and node entries are in the wrong order. Property definitions should always come before node definitions.", + "markdown": "Reports if property and node entries are in the wrong order. Property definitions should always come before node definitions." + }, + "defaultConfiguration": { + "enabled": true, + "level": "error", + "parameters": { + "suppressToolId": "DtsStatementOrder", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Devicetree", + "index": 24, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DtsUndeclaredProperty", + "shortDescription": { + "text": "Undeclared property" + }, + "fullDescription": { + "text": "Reports undeclared properties. Properties are undeclared if there not present in the properties section of the binding. There are some exceptions: Property name ends with: '-controller' Property name starts with: '#' Property name starts with: 'pinctrl-' And the following properties are allowed: status compatible phandle ranges device_type interrupts-extended interrupt-parent", + "markdown": "Reports undeclared properties. Properties are undeclared if there not present in the properties section of the binding. \n\nThere are some exceptions:\n\n* Property name ends with: `-controller`\n* Property name starts with: `#`\n* Property name starts with: `pinctrl-`\n\nAnd the following properties are allowed:\n\n\n\n* status\n* compatible\n* phandle\n* ranges\n* device_type\n* interrupts-extended\n* interrupt-parent" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DtsUndeclaredProperty", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Devicetree", + "index": 24, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "HtmlTools", + "version": "241.18034.45", + "rules": [ + { + "id": "HtmlRequiredAltAttribute", + "shortDescription": { + "text": "Missing required 'alt' attribute" + }, + "fullDescription": { + "text": "Reports a missing 'alt' attribute in a 'img' or 'applet' tag or in a 'area' element of an image map. Suggests adding a required attribute with a text alternative for the contents of the tag. Based on WCAG 2.0: H24, H35, H36, H37.", + "markdown": "Reports a missing `alt` attribute in a `img` or `applet` tag or in a `area` element of an image map. Suggests adding a required attribute with a text alternative for the contents of the tag. Based on WCAG 2.0: [H24](https://www.w3.org/TR/WCAG20-TECHS/H24.html), [H35](https://www.w3.org/TR/WCAG20-TECHS/H35.html), [H36](https://www.w3.org/TR/WCAG20-TECHS/H36.html), [H37](https://www.w3.org/TR/WCAG20-TECHS/H37.html)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlRequiredAltAttribute", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML/Accessibility", + "index": 32, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlFormInputWithoutLabel", + "shortDescription": { + "text": "Missing associated label" + }, + "fullDescription": { + "text": "Reports a form element ('input', 'textarea', or 'select') without an associated label. Suggests creating a new label. Based on WCAG 2.0: H44.", + "markdown": "Reports a form element (`input`, `textarea`, or `select`) without an associated label. Suggests creating a new label. Based on WCAG 2.0: [H44](https://www.w3.org/TR/WCAG20-TECHS/H44.html). " + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlFormInputWithoutLabel", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML/Accessibility", + "index": 32, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlRequiredTitleAttribute", + "shortDescription": { + "text": "Missing required 'title' attribute" + }, + "fullDescription": { + "text": "Reports a missing title attribute 'frame', 'iframe', 'dl', and 'a' tags. Suggests adding a title attribute. Based on WCAG 2.0: H33, H40, and H64.", + "markdown": "Reports a missing title attribute `frame`, `iframe`, `dl`, and `a` tags. Suggests adding a title attribute. Based on WCAG 2.0: [H33](https://www.w3.org/TR/WCAG20-TECHS/H33.html), [H40](https://www.w3.org/TR/WCAG20-TECHS/H40.html), and [H64](https://www.w3.org/TR/WCAG20-TECHS/H64.html)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "HtmlRequiredTitleAttribute", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "HTML/Accessibility", + "index": 32, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlDeprecatedTag", + "shortDescription": { + "text": "Obsolete tag" + }, + "fullDescription": { + "text": "Reports an obsolete HTML5 tag. Suggests replacing the obsolete tag with a CSS or another tag.", + "markdown": "Reports an obsolete HTML5 tag. Suggests replacing the obsolete tag with a CSS or another tag." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlDeprecatedTag", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CheckImageSize", + "shortDescription": { + "text": "Mismatched image size" + }, + "fullDescription": { + "text": "Reports a 'width' and 'height' attribute value of a 'img' tag that is different from the actual width and height of the referenced image.", + "markdown": "Reports a `width` and `height` attribute value of a `img` tag that is different from the actual width and height of the referenced image." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CheckImageSize", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlRequiredSummaryAttribute", + "shortDescription": { + "text": "Missing required 'summary' attribute" + }, + "fullDescription": { + "text": "Reports a missing 'summary' attribute in a 'table' tag. Suggests adding a'summary' attribute. Based on WCAG 2.0: H73.", + "markdown": "Reports a missing `summary` attribute in a `table` tag. Suggests adding a`summary` attribute. Based on WCAG 2.0: [H73](https://www.w3.org/TR/WCAG20-TECHS/H73.html)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "HtmlRequiredSummaryAttribute", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "HTML/Accessibility", + "index": 32, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlRequiredLangAttribute", + "shortDescription": { + "text": "Missing required 'lang' attribute" + }, + "fullDescription": { + "text": "Reports a missing 'lang' (or 'xml:lang') attribute in a 'html' tag. Suggests adding a required attribute to state the default language of the document. Based on WCAG 2.0: H57.", + "markdown": "Reports a missing `lang` (or `xml:lang`) attribute in a `html` tag. Suggests adding a required attribute to state the default language of the document. Based on WCAG 2.0: [H57](https://www.w3.org/TR/WCAG20-TECHS/H57.html)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlRequiredLangAttribute", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML/Accessibility", + "index": 32, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlNonExistentInternetResource", + "shortDescription": { + "text": "Unresolved web link" + }, + "fullDescription": { + "text": "Reports an unresolved web link. Works by making network requests in the background.", + "markdown": "Reports an unresolved web link. Works by making network requests in the background." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlNonExistentInternetResource", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlRequiredTitleElement", + "shortDescription": { + "text": "Missing required 'title' element" + }, + "fullDescription": { + "text": "Reports a missing 'title' element inside a 'head' section. Suggests adding a 'title' element. The title should describe the document. Based on WCAG 2.0: H25.", + "markdown": "Reports a missing `title` element inside a `head` section. Suggests adding a `title` element. The title should describe the document. Based on WCAG 2.0: [H25](https://www.w3.org/TR/WCAG20-TECHS/H25.html)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlRequiredTitleElement", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML/Accessibility", + "index": 32, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlDeprecatedAttribute", + "shortDescription": { + "text": "Obsolete attribute" + }, + "fullDescription": { + "text": "Reports an obsolete HTML5 attribute.", + "markdown": "Reports an obsolete HTML5 attribute." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlDeprecatedAttribute", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlPresentationalElement", + "shortDescription": { + "text": "Presentational tag" + }, + "fullDescription": { + "text": "Reports a presentational HTML tag. Suggests replacing the presentational tag with a CSS or another tag.", + "markdown": "Reports a presentational HTML tag. Suggests replacing the presentational tag with a CSS or another tag." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "HtmlPresentationalElement", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 25, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "Docker", + "version": "241.18034.45", + "rules": [ + { + "id": "ComposeMissingKeys", + "shortDescription": { + "text": "Missing docker-compose YAML keys" + }, + "fullDescription": { + "text": "Reports missing required keys in Docker Compose files.", + "markdown": "Reports missing required keys in Docker Compose files. " + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "ComposeMissingKeys", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Docker-compose", + "index": 36, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DockerFileAssignments", + "shortDescription": { + "text": "Invalid spaces in ''key=value'' pair" + }, + "fullDescription": { + "text": "Reports incorrect spacing for key-value pairs in 'ARG', 'ENV', and 'LABEL' commands. While it is not explicitly specified in the Dockerfile specification, some combinations of spacing for key-value pairs are not allowed. Docker build will fail after reaching the problem instruction. Examples: The 'ARG' command does not allow any spaces around '=' 'ENV' and 'LABEL' do not allow spaces after '=' '# all the commands below will fail\n ARG answer = 42\n ARG version= \"1.0.0\"\n LABEL \"maintained.by\"= someone@gmail.com\n ENV JAVA_HOME= \"/docker-java-home\"' After the quick-fix is applied: 'ARG answer=2\n ARG version=\"1.0.0\"\n LABEL \"maintained.by\"=someone@gmail.com\n ENV JAVA_HOME=\"/docker-java-home\"'", + "markdown": "Reports incorrect spacing for key-value pairs in `ARG`, `ENV`, and `LABEL` commands.\n\n\nWhile it is not explicitly specified in the [Dockerfile specification](https://docs.docker.com/engine/reference/builder/#arg),\nsome combinations of spacing for key-value pairs are not allowed.\nDocker build will fail after reaching the problem instruction.\n\n**Examples:**\n\n* The `ARG` command does not allow any spaces around '='\n* `ENV` and `LABEL` do not allow spaces after '='\n\n\n # all the commands below will fail\n ARG answer = 42\n ARG version= \"1.0.0\"\n LABEL \"maintained.by\"= someone@gmail.com\n ENV JAVA_HOME= \"/docker-java-home\"\n\nAfter the quick-fix is applied:\n\n\n ARG answer=2\n ARG version=\"1.0.0\"\n LABEL \"maintained.by\"=someone@gmail.com\n ENV JAVA_HOME=\"/docker-java-home\"\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DockerFileAssignments", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Dockerfile", + "index": 40, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DockerFileAddOrCopyPaths", + "shortDescription": { + "text": "Invalid destination for ''ADD''/''COPY'' commands" + }, + "fullDescription": { + "text": "Reports invalid destination directories in 'ADD' and 'COPY' commands. According to the Dockerfile specification, if multiple sources are specified, then the destination must be a directory, and it must end with a slash '/'. Otherwise, Docker build will fail. Examples: '# all the commands below will fail\n ADD textA.txt textB.txt relativeDir\n ADD [\"binaryA.jar\", \"binary2.jar\", \"destination\"]\n COPY text3.txt text4.txt /absolute/path' After the quick-fix is applied: 'ADD textA.txt textB.txt relativeDir/\n ADD [\"binaryA.jar\", \"binary2.jar\", \"destination/\"]\n COPY text3.txt text4.txt /absolute/path/'", + "markdown": "Reports invalid destination directories in `ADD` and `COPY` commands.\n\n\nAccording to the [Dockerfile specification](https://docs.docker.com/engine/reference/builder/#add),\nif multiple sources are specified, then the destination must be a directory, and it must end with a slash '/'.\nOtherwise, Docker build will fail.\n\n**Examples:**\n\n\n # all the commands below will fail\n ADD textA.txt textB.txt relativeDir\n ADD [\"binaryA.jar\", \"binary2.jar\", \"destination\"]\n COPY text3.txt text4.txt /absolute/path\n\nAfter the quick-fix is applied:\n\n\n ADD textA.txt textB.txt relativeDir/\n ADD [\"binaryA.jar\", \"binary2.jar\", \"destination/\"]\n COPY text3.txt text4.txt /absolute/path/\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "DockerFileAddOrCopyPaths", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Dockerfile", + "index": 40, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DockerFileRunCommandMissingContinuation", + "shortDescription": { + "text": "Missing continuation character for ''RUN'' command" + }, + "fullDescription": { + "text": "Reports missing continuation characters in 'RUN' command. In the shell form of 'RUN' command you should use a '\\' (backslash) to continue a single 'RUN' instruction onto the next line. Otherwise, Docker build will fail. Examples: '# the command below will fail\n RUN /bin/bash -c 'source $HOME/.bashrc;\n echo $HOME'' After the quick-fix is applied: 'RUN /bin/bash -c 'source $HOME/.bashrc; \\\n echo $HOME''", + "markdown": "Reports missing continuation characters in `RUN` command.\n\n\nIn the *shell* form of `RUN` command you should use a '\\\\' (backslash)\nto continue a single `RUN` instruction onto the next line.\nOtherwise, Docker build will fail.\n\n**Examples:**\n\n\n # the command below will fail\n RUN /bin/bash -c 'source $HOME/.bashrc;\n echo $HOME'\n\nAfter the quick-fix is applied:\n\n\n RUN /bin/bash -c 'source $HOME/.bashrc; \\\n echo $HOME'\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DockerFileRunCommandMissingContinuation", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Dockerfile", + "index": 40, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DockerJsonFormStringLiterals", + "shortDescription": { + "text": "A single quoted string in JSON array format" + }, + "fullDescription": { + "text": "Reports a single quoted string in JSON array format. JSON array form, must use double-quotes (\") around words not single-quotes ('). Otherwise, Docker build will fail. Examples: '# all the commands below will fail\n RUN ['/bin/bash', '-c', 'echo hello']\n ADD ['binaryA.jar', 'binary2.jar', 'destination/']\n COPY ['binaryA.jar', 'binary2.jar', 'destination/']' After the quick-fix is applied: 'RUN [\"/bin/bash\", \"-c\", \"echo hello\"]\n ADD [\"binaryA.jar\", \"binary2.jar\", \"destination/\"]\n COPY [\"binaryA.jar\", \"binary2.jar\", \"destination/\"]'", + "markdown": "Reports a single quoted string in JSON array format.\n\n\nJSON array form, must use double-quotes (\") around words not single-quotes ('). Otherwise, Docker build will fail.\n\n**Examples:**\n\n\n # all the commands below will fail\n RUN ['/bin/bash', '-c', 'echo hello']\n ADD ['binaryA.jar', 'binary2.jar', 'destination/']\n COPY ['binaryA.jar', 'binary2.jar', 'destination/']\n\nAfter the quick-fix is applied:\n\n\n RUN [\"/bin/bash\", \"-c\", \"echo hello\"]\n ADD [\"binaryA.jar\", \"binary2.jar\", \"destination/\"]\n COPY [\"binaryA.jar\", \"binary2.jar\", \"destination/\"]\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "DockerJsonFormStringLiterals", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Dockerfile", + "index": 40, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ComposeUnknownValues", + "shortDescription": { + "text": "Unknown docker-compose YAML values" + }, + "fullDescription": { + "text": "Reports unrecognized values in Docker Compose files.", + "markdown": "Reports unrecognized values in Docker Compose files. " + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "ComposeUnknownValues", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Docker-compose", + "index": 36, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ComposeUnknownKeys", + "shortDescription": { + "text": "Unknown docker-compose YAML keys" + }, + "fullDescription": { + "text": "Reports unrecognized keys in Docker Compose files.", + "markdown": "Reports unrecognized keys in Docker Compose files. " + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "ComposeUnknownKeys", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Docker-compose", + "index": 36, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ComposeUnquotedPorts", + "shortDescription": { + "text": "Unquoted port mappings" + }, + "fullDescription": { + "text": "Reports unquoted port mappings in Docker Compose files. According to the Compose file specification, mapping ports in the 'HOST:CONTAINER' format may lead to erroneous results when using a container port lower than 60, because YAML parses numbers in the format 'xx:yy' as a base-60 value. For this reason, we recommend always explicitly specifying the port mappings as strings. Examples: 'ports:\n - 3000\n - 3000-3005\n - 22:22\n - 8080:8080' After the quick-fix is applied: 'ports:\n - \"3000\"\n - \"3000-3005\"\n - \"22:22\"\n - \"8080:8080\"'", + "markdown": "Reports unquoted port mappings in Docker Compose files.\n\n\nAccording to the [Compose file specification](https://docs.docker.com/compose/compose-file/compose-file-v3/#short-syntax-1),\nmapping ports in the `HOST:CONTAINER` format may lead to erroneous results when using a container port lower than 60,\nbecause YAML parses numbers in the format `xx:yy` as a base-60 value.\nFor this reason, we recommend always explicitly specifying the port mappings as strings.\n\n**Examples:**\n\n\n ports:\n - 3000\n - 3000-3005\n - 22:22\n - 8080:8080\n\nAfter the quick-fix is applied:\n\n\n ports:\n - \"3000\"\n - \"3000-3005\"\n - \"22:22\"\n - \"8080:8080\"\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ComposeUnquotedPorts", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Docker-compose", + "index": 36, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DockerFileArgumentCount", + "shortDescription": { + "text": "Wrong number of arguments" + }, + "fullDescription": { + "text": "Reports invalid number of arguments for the Dockerfile commands. Docker build will fail after reaching the instruction with an invalid number of arguments.", + "markdown": "Reports invalid number of arguments for the Dockerfile commands.\n\n\nDocker build will fail after reaching the instruction with an invalid number of arguments." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DockerFileArgumentCount", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Dockerfile", + "index": 40, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "com.intellij.css", + "version": "241.18034.45", + "rules": [ + { + "id": "CssInvalidHtmlTagReference", + "shortDescription": { + "text": "Invalid type selector" + }, + "fullDescription": { + "text": "Reports a CSS type selector that matches an unknown HTML element.", + "markdown": "Reports a CSS [type selector](https://developer.mozilla.org/en-US/docs/Web/CSS/Type_selectors) that matches an unknown HTML element." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssInvalidHtmlTagReference", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidCustomPropertyAtRuleDeclaration", + "shortDescription": { + "text": "Invalid @property declaration" + }, + "fullDescription": { + "text": "Reports a missing required syntax, inherits, or initial-value property in a declaration of a custom property.", + "markdown": "Reports a missing required [syntax](https://developer.mozilla.org/en-US/docs/web/css/@property/syntax), [inherits](https://developer.mozilla.org/en-US/docs/web/css/@property/inherits), or [initial-value](https://developer.mozilla.org/en-US/docs/web/css/@property/initial-value) property in a declaration of a custom property." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssInvalidCustomPropertyAtRuleDeclaration", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidFunction", + "shortDescription": { + "text": "Invalid function" + }, + "fullDescription": { + "text": "Reports an unknown CSS function or an incorrect function parameter.", + "markdown": "Reports an unknown [CSS function](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Functions) or an incorrect function parameter." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssInvalidFunction", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssMissingSemicolon", + "shortDescription": { + "text": "Missing semicolon" + }, + "fullDescription": { + "text": "Reports a missing semicolon at the end of a declaration.", + "markdown": "Reports a missing semicolon at the end of a declaration." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssMissingSemicolon", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Code style issues", + "index": 49, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssRedundantUnit", + "shortDescription": { + "text": "Redundant measure unit" + }, + "fullDescription": { + "text": "Reports a measure unit of a zero value where units are not required by the specification. Example: 'width: 0px'", + "markdown": "Reports a measure unit of a zero value where units are not required by the specification.\n\n**Example:**\n\n width: 0px\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssRedundantUnit", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Code style issues", + "index": 49, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssMissingComma", + "shortDescription": { + "text": "Missing comma in selector list" + }, + "fullDescription": { + "text": "Reports a multi-line selector. Most likely this means that several single-line selectors are actually intended but a comma is missing at the end of one or several lines. Example: 'input /* comma has probably been forgotten */\n.button {\n margin: 1px;\n}'", + "markdown": "Reports a multi-line selector. Most likely this means that several single-line selectors are actually intended but a comma is missing at the end of one or several lines.\n\n**Example:**\n\n\n input /* comma has probably been forgotten */\n .button {\n margin: 1px;\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssMissingComma", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Probable bugs", + "index": 61, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidPropertyValue", + "shortDescription": { + "text": "Invalid property value" + }, + "fullDescription": { + "text": "Reports an incorrect CSS property value.", + "markdown": "Reports an incorrect CSS property value." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssInvalidPropertyValue", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssBrowserCompatibilityForProperties", + "shortDescription": { + "text": "Property is incompatible with selected browsers" + }, + "fullDescription": { + "text": "Reports a CSS property that is not supported by the specified browsers. Based on the MDN Compatibility Data.", + "markdown": "Reports a CSS property that is not supported by the specified browsers. Based on the [MDN Compatibility Data](https://github.com/mdn/browser-compat-data)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssBrowserCompatibilityForProperties", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS", + "index": 38, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidCustomPropertyAtRuleName", + "shortDescription": { + "text": "Invalid @property name" + }, + "fullDescription": { + "text": "Reports an invalid custom property name. Custom property name should be prefixed with two dashes. Example: '@property invalid-property-name {\n ...\n}\n\n@property --valid-property-name {\n ...\n}'", + "markdown": "Reports an invalid custom property name. Custom property name should be prefixed with two dashes.\n\n**Example:**\n\n\n @property invalid-property-name {\n ...\n }\n\n @property --valid-property-name {\n ...\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssInvalidCustomPropertyAtRuleName", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssConvertColorToHexInspection", + "shortDescription": { + "text": "Color could be replaced with #-hex" + }, + "fullDescription": { + "text": "Reports an 'rgb()', 'hsl()', or other color function. Suggests replacing a color function with an equivalent hexadecimal notation. Example: 'rgb(12, 15, 255)' After the quick-fix is applied: '#0c0fff'.", + "markdown": "Reports an `rgb()`, `hsl()`, or other color function.\n\nSuggests replacing a color function with an equivalent hexadecimal notation.\n\n**Example:**\n\n rgb(12, 15, 255)\n\nAfter the quick-fix is applied:\n\n #0c0fff.\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssConvertColorToHexInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS", + "index": 38, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssReplaceWithShorthandUnsafely", + "shortDescription": { + "text": "Properties may probably be replaced with a shorthand" + }, + "fullDescription": { + "text": "Reports a set of longhand CSS properties and suggests replacing an incomplete set of longhand CSS properties with a shorthand form, which is however not 100% equivalent in this case. For example, 2 properties: 'outline-color' and 'outline-style' may be replaced with a single 'outline'. Such replacement is not 100% equivalent because shorthands reset all omitted sub-values to their initial states. In this example, switching to the 'outline' shorthand means that 'outline-width' is also set to its initial value, which is 'medium'. This inspection doesn't handle full sets of longhand properties (when switching to shorthand is 100% safe). For such cases see the 'Properties may be safely replaced with a shorthand' inspection instead.", + "markdown": "Reports a set of longhand CSS properties and suggests replacing an incomplete set of longhand CSS properties with a shorthand form, which is however not 100% equivalent in this case.\n\n\nFor example, 2 properties: `outline-color` and `outline-style` may be replaced with a single `outline`.\nSuch replacement is not 100% equivalent because shorthands reset all omitted sub-values to their initial states.\nIn this example, switching to the `outline` shorthand means that `outline-width` is also set to its initial value,\nwhich is `medium`.\n\n\nThis inspection doesn't handle full sets of longhand properties (when switching to shorthand is 100% safe).\nFor such cases see the 'Properties may be safely replaced with a shorthand' inspection instead." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "CssReplaceWithShorthandUnsafely", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "CSS", + "index": 38, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssUnknownUnit", + "shortDescription": { + "text": "Unknown unit" + }, + "fullDescription": { + "text": "Reports an unknown unit.", + "markdown": "Reports an unknown unit." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssUnknownUnit", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidMediaFeature", + "shortDescription": { + "text": "Invalid media feature" + }, + "fullDescription": { + "text": "Reports an unknown CSS media feature or an incorrect media feature value.", + "markdown": "Reports an unknown [CSS media feature](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries) or an incorrect media feature value." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssInvalidMediaFeature", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssConvertColorToRgbInspection", + "shortDescription": { + "text": "Color could be replaced with rgb()" + }, + "fullDescription": { + "text": "Reports an 'hsl()' or 'hwb()' color function or a hexadecimal color notation. Suggests replacing such color value with an equivalent 'rgb()' or 'rgba()' color function. Example: '#0c0fff' After the quick-fix is applied: 'rgb(12, 15, 255)'.", + "markdown": "Reports an `hsl()` or `hwb()` color function or a hexadecimal color notation.\n\nSuggests replacing such color value with an equivalent `rgb()` or `rgba()` color function.\n\n**Example:**\n\n #0c0fff\n\nAfter the quick-fix is applied:\n\n rgb(12, 15, 255).\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssConvertColorToRgbInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS", + "index": 38, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssUnusedSymbol", + "shortDescription": { + "text": "Unused selector" + }, + "fullDescription": { + "text": "Reports a CSS class or an element IDs that appears in selectors but is not used in HTML. Note that complete inspection results are available only when running it via Code | Inspect Code or Code | Analyze Code | Run Inspection by Name. Due to performance reasons, style sheet files are not inspected on the fly.", + "markdown": "Reports a CSS class or an element IDs that appears in selectors but is not used in HTML.\n\n\nNote that complete inspection results are available only when running it via **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name**.\nDue to performance reasons, style sheet files are not inspected on the fly." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssUnusedSymbol", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS", + "index": 38, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssDeprecatedValue", + "shortDescription": { + "text": "Deprecated value" + }, + "fullDescription": { + "text": "Reports a deprecated CSS value. Suggests replacing the deprecated value with its valid equivalent.", + "markdown": "Reports a deprecated CSS value. Suggests replacing the deprecated value with its valid equivalent." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssDeprecatedValue", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS", + "index": 38, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssNonIntegerLengthInPixels", + "shortDescription": { + "text": "Non-integer length in pixels" + }, + "fullDescription": { + "text": "Reports a non-integer length in pixels. Example: 'width: 3.14px'", + "markdown": "Reports a non-integer length in pixels.\n\n**Example:**\n\n width: 3.14px\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "CssNonIntegerLengthInPixels", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Probable bugs", + "index": 61, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidImport", + "shortDescription": { + "text": "Misplaced @import" + }, + "fullDescription": { + "text": "Reports a misplaced '@import' statement. According to the specification, '@import' rules must precede all other types of rules, except '@charset' rules.", + "markdown": "Reports a misplaced `@import` statement.\n\n\nAccording to the [specification](https://developer.mozilla.org/en-US/docs/Web/CSS/@import),\n`@import` rules must precede all other types of rules, except `@charset` rules." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssInvalidImport", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidAtRule", + "shortDescription": { + "text": "Unknown at-rule" + }, + "fullDescription": { + "text": "Reports an unknown CSS at-rule.", + "markdown": "Reports an unknown [CSS at-rule](https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssInvalidAtRule", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssUnresolvedCustomProperty", + "shortDescription": { + "text": "Unresolved custom property" + }, + "fullDescription": { + "text": "Reports an unresolved reference to a custom property among the arguments of the 'var()' function.", + "markdown": "Reports an unresolved reference to a [custom property](https://developer.mozilla.org/en-US/docs/Web/CSS/--*) among the arguments of the `var()` function." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssUnresolvedCustomProperty", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssOverwrittenProperties", + "shortDescription": { + "text": "Overwritten property" + }, + "fullDescription": { + "text": "Reports a duplicated CSS property within a ruleset. Respects shorthand properties. Example: '.foo {\n margin-bottom: 1px;\n margin-bottom: 1px; /* duplicates margin-bottom */\n margin: 0; /* overrides margin-bottom */\n}'", + "markdown": "Reports a duplicated CSS property within a ruleset. Respects shorthand properties.\n\n**Example:**\n\n\n .foo {\n margin-bottom: 1px;\n margin-bottom: 1px; /* duplicates margin-bottom */\n margin: 0; /* overrides margin-bottom */\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssOverwrittenProperties", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS", + "index": 38, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssUnknownTarget", + "shortDescription": { + "text": "Unresolved file reference" + }, + "fullDescription": { + "text": "Reports an unresolved file reference, for example, an incorrect path in an '@import' statement.", + "markdown": "Reports an unresolved file reference, for example, an incorrect path in an `@import` statement." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssUnknownTarget", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssNegativeValue", + "shortDescription": { + "text": "Negative property value" + }, + "fullDescription": { + "text": "Reports a negative value of a CSS property that is not expected to be less than zero, for example, object width or height.", + "markdown": "Reports a negative value of a CSS property that is not expected to be less than zero, for example, object width or height." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssNegativeValue", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssNoGenericFontName", + "shortDescription": { + "text": "Missing generic font family name" + }, + "fullDescription": { + "text": "Verifies that the 'font-family' property contains a generic font family name as a fallback alternative. Generic font family names are: 'serif', 'sans-serif', 'cursive', 'fantasy', and 'monospace'.", + "markdown": "Verifies that the [font-family](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family) property contains a generic font family name as a fallback alternative.\n\n\nGeneric font family names are: `serif`, `sans-serif`, `cursive`, `fantasy`,\nand `monospace`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssNoGenericFontName", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Probable bugs", + "index": 61, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssUnresolvedClassInComposesRule", + "shortDescription": { + "text": "Unresolved class in 'composes' rule" + }, + "fullDescription": { + "text": "Reports a CSS class reference in the 'composes' rule that cannot be resolved to any valid target. Example: '.className {/* ... */}\n\n .otherClassName {\n composes: className;\n }'", + "markdown": "Reports a CSS class reference in the ['composes'](https://github.com/css-modules/css-modules#composition) rule that cannot be resolved to any valid target.\n\n**Example:**\n\n\n .className {/* ... */}\n\n .otherClassName {\n composes: className;\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssUnresolvedClassInComposesRule", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidCharsetRule", + "shortDescription": { + "text": "Misplaced or incorrect @charset" + }, + "fullDescription": { + "text": "Reports a misplaced '@charset' at-rule or an incorrect charset value.", + "markdown": "Reports a misplaced `@charset` at-rule or an incorrect charset value." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssInvalidCharsetRule", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssReplaceWithShorthandSafely", + "shortDescription": { + "text": "Properties may be safely replaced with a shorthand" + }, + "fullDescription": { + "text": "Reports a set of longhand properties. Suggests replacing a complete set of longhand CSS properties with an equivalent shorthand form. For example, 4 properties: 'padding-top', 'padding-right', 'padding-bottom', and 'padding-left' can be safely replaced with a single 'padding' property. Note that this inspection doesn't show up if the set of longhand properties is incomplete (e.g. only 3 'padding-xxx' properties in a ruleset) because switching to a shorthand may change the result. For such cases consider the 'Properties may probably be replaced with a shorthand' inspection.", + "markdown": "Reports a set of longhand properties. Suggests replacing a complete set of longhand CSS properties with an equivalent shorthand form.\n\n\nFor example, 4 properties: `padding-top`, `padding-right`, `padding-bottom`, and\n`padding-left`\ncan be safely replaced with a single `padding` property.\n\n\nNote that this inspection doesn't show up if the set of longhand properties is incomplete\n(e.g. only 3 `padding-xxx` properties in a ruleset)\nbecause switching to a shorthand may change the result.\nFor such cases consider the 'Properties may probably be replaced with a shorthand'\ninspection." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "CssReplaceWithShorthandSafely", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "CSS", + "index": 38, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssUnknownProperty", + "shortDescription": { + "text": "Unknown property" + }, + "fullDescription": { + "text": "Reports an unknown CSS property or a property used in a wrong context. Add the unknown property to the 'Custom CSS properties' list to skip validation.", + "markdown": "Reports an unknown CSS property or a property used in a wrong context.\n\nAdd the unknown property to the 'Custom CSS properties' list to skip validation." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssUnknownProperty", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidPseudoSelector", + "shortDescription": { + "text": "Invalid pseudo-selector" + }, + "fullDescription": { + "text": "Reports an incorrect CSS pseudo-class pseudo-element.", + "markdown": "Reports an incorrect CSS [pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes) [pseudo-element](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssInvalidPseudoSelector", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidNestedSelector", + "shortDescription": { + "text": "Invalid nested selector" + }, + "fullDescription": { + "text": "Reports a nested selector starting with an identifier or a functional notation.", + "markdown": "Reports a nested selector starting with an identifier or a functional notation." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssInvalidNestedSelector", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Invalid elements", + "index": 39, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.jetbrains.plugins.yaml", + "version": "241.18034.45", + "rules": [ + { + "id": "YAMLSchemaValidation", + "shortDescription": { + "text": "Validation by JSON Schema" + }, + "fullDescription": { + "text": "Reports inconsistencies between a YAML file and a JSON Schema if the schema is specified. Scheme example: '{\n \"properties\": {\n \"SomeNumberProperty\": {\n \"type\": \"number\"\n }\n }\n }' The following is an example with the corresponding warning: 'SomeNumberProperty: hello world'", + "markdown": "Reports inconsistencies between a YAML file and a JSON Schema if the schema is specified.\n\n**Scheme example:**\n\n\n {\n \"properties\": {\n \"SomeNumberProperty\": {\n \"type\": \"number\"\n }\n }\n }\n\n**The following is an example with the corresponding warning:**\n\n\n SomeNumberProperty: hello world\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "YAMLSchemaValidation", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "YAML", + "index": 45, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "YAMLIncompatibleTypes", + "shortDescription": { + "text": "Suspicious type mismatch" + }, + "fullDescription": { + "text": "Reports a mismatch between a scalar value type in YAML file and types of the values in the similar positions. Example: 'myElements:\n - value1\n - value2\n - false # <- reported, because it is a boolean value, while other values are strings'", + "markdown": "Reports a mismatch between a scalar value type in YAML file and types of the values in the similar positions.\n\n**Example:**\n\n\n myElements:\n - value1\n - value2\n - false # <- reported, because it is a boolean value, while other values are strings\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "YAMLIncompatibleTypes", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "YAML", + "index": 45, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "YAMLUnresolvedAlias", + "shortDescription": { + "text": "Unresolved alias" + }, + "fullDescription": { + "text": "Reports unresolved aliases in YAML files. Example: 'some_key: *unknown_alias'", + "markdown": "Reports unresolved aliases in YAML files.\n\n**Example:**\n\n\n some_key: *unknown_alias\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "YAMLUnresolvedAlias", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "YAML", + "index": 45, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "YAMLSchemaDeprecation", + "shortDescription": { + "text": "Deprecated YAML key" + }, + "fullDescription": { + "text": "Reports deprecated keys in YAML files. Deprecation is checked only if there exists a JSON schema associated with the corresponding YAML file. Note that the deprecation mechanism is not defined in the JSON Schema specification yet, and this inspection uses a non-standard 'deprecationMessage' extension. Scheme deprecation example: '{\n \"properties\": {\n \"SomeDeprecatedProperty\": {\n \"deprecationMessage\": \"Baz\",\n \"description\": \"Foo bar\"\n }\n }\n }' The following is an example with the corresponding warning: 'SomeDeprecatedProperty: some value'", + "markdown": "Reports deprecated keys in YAML files.\n\nDeprecation is checked only if there exists a JSON schema associated with the corresponding YAML file.\n\nNote that the deprecation mechanism is not defined in the JSON Schema specification yet,\nand this inspection uses a non-standard `deprecationMessage` extension.\n\n**Scheme deprecation example:**\n\n\n {\n \"properties\": {\n \"SomeDeprecatedProperty\": {\n \"deprecationMessage\": \"Baz\",\n \"description\": \"Foo bar\"\n }\n }\n }\n\n**The following is an example with the corresponding warning:**\n\n\n SomeDeprecatedProperty: some value\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "YAMLSchemaDeprecation", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "YAML", + "index": 45, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "YAMLRecursiveAlias", + "shortDescription": { + "text": "Recursive alias" + }, + "fullDescription": { + "text": "Reports recursion in YAML aliases. Alias can't be recursive and be used inside the data referenced by a corresponding anchor. Example: 'some_key: &some_anchor\n sub_key1: value1\n sub_key2: *some_anchor'", + "markdown": "Reports recursion in YAML aliases.\n\nAlias can't be recursive and be used inside the data referenced by a corresponding anchor.\n\n**Example:**\n\n\n some_key: &some_anchor\n sub_key1: value1\n sub_key2: *some_anchor\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "YAMLRecursiveAlias", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "YAML", + "index": 45, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "YAMLDuplicatedKeys", + "shortDescription": { + "text": "Duplicated YAML keys" + }, + "fullDescription": { + "text": "Reports duplicated keys in YAML files. Example: 'same_key: some value\n same_key: another value'", + "markdown": "Reports duplicated keys in YAML files.\n\n**Example:**\n\n\n same_key: some value\n same_key: another value\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "YAMLDuplicatedKeys", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "YAML", + "index": 45, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "YAMLUnusedAnchor", + "shortDescription": { + "text": "Unused anchor" + }, + "fullDescription": { + "text": "Reports unused anchors. Example: 'some_key: &some_anchor\n key1: value1'", + "markdown": "Reports unused anchors.\n\n**Example:**\n\n\n some_key: &some_anchor\n key1: value1\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "YAMLUnusedAnchor", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "YAML", + "index": 45, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.jetbrains.plugins.less", + "version": "241.18034.45", + "rules": [ + { + "id": "LessUnresolvedMixin", + "shortDescription": { + "text": "Unresolved mixin" + }, + "fullDescription": { + "text": "Reports a reference to a Less mixin that is not resolved. Example: '* {\n .unknown-mixin();\n}'", + "markdown": "Reports a reference to a [Less mixin](http://lesscss.org/features/#mixins-feature) that is not resolved.\n\n**Example:**\n\n\n * {\n .unknown-mixin();\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "LessUnresolvedMixin", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Less", + "index": 50, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "LessUnresolvedVariable", + "shortDescription": { + "text": "Unresolved variable" + }, + "fullDescription": { + "text": "Reports a reference to a Less variable that is not resolved. Example: '* {\n margin: @unknown-var;\n}'", + "markdown": "Reports a reference to a [Less variable](http://lesscss.org/features/#variables-feature) that is not resolved.\n\n**Example:**\n\n\n * {\n margin: @unknown-var;\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "LessUnresolvedVariable", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Less", + "index": 50, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "LessResolvedByNameOnly", + "shortDescription": { + "text": "Missing import" + }, + "fullDescription": { + "text": "Reports a reference to a variable or mixin that is declared in another file, which is not explicitly imported in the current file. Example: '* {\n margin: @var-in-other-file;\n}'", + "markdown": "Reports a reference to a variable or mixin that is declared in another file, which is not explicitly [imported](http://lesscss.org/features/#import-atrules-feature) in the current file.\n\n**Example:**\n\n\n * {\n margin: @var-in-other-file;\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "LessResolvedByNameOnly", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Less", + "index": 50, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.intellij.intelliLang", + "version": "241.18034.45", + "rules": [ + { + "id": "InjectedReferences", + "shortDescription": { + "text": "Injected references" + }, + "fullDescription": { + "text": "Reports unresolved references injected by Language Injections. Example: '@Language(\"file-reference\")\n String fileName = \"/home/user/nonexistent.file\"; // highlighted if file doesn't exist'", + "markdown": "Reports unresolved references injected by [Language Injections](https://www.jetbrains.com/help/idea/using-language-injections.html).\n\nExample:\n\n\n @Language(\"file-reference\")\n String fileName = \"/home/user/nonexistent.file\"; // highlighted if file doesn't exist\n" + }, + "defaultConfiguration": { + "enabled": true, + "level": "error", + "parameters": { + "suppressToolId": "InjectedReferences", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "General", + "index": 31, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.jetbrains.plugins.vue", + "version": "241.18034.45", + "rules": [ + { + "id": "VueDataFunction", + "shortDescription": { + "text": "Data function" + }, + "fullDescription": { + "text": "Reports a Vue component data property that is not a function. Suggests wrapping an object literal with a function. When defining a component, 'data' must be declared as a function that returns the initial data object, because the same definition will be used for creating numerous instances. If a plain object is still used for 'data', that very object will be shared by reference across all instances created! With a 'data' function, every time a new instance is created we can simply call it to return a fresh copy of the initial data.", + "markdown": "Reports a Vue component [data](https://vuejs.org/v2/api/#data) property that is not a function. Suggests wrapping an object literal with a function.\n\nWhen defining a component, `data` must be declared as a function that returns the initial data object, because the same definition will be used for creating numerous instances. If a plain object is still used for `data`, that very object will be shared by reference across all instances created! With a `data` function, every time a new instance is created we can simply call it to return a fresh copy of the initial data." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "VueDataFunction", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Vue", + "index": 52, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "VueUnrecognizedSlot", + "shortDescription": { + "text": "Unrecognized slot" + }, + "fullDescription": { + "text": "Reports an unrecognized Vue slot.", + "markdown": "Reports an unrecognized Vue slot." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "VueUnrecognizedSlot", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" + } + }, + "relationships": [ + { + "target": { + "id": "Vue", + "index": 52, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "VueMissingComponentImportInspection", + "shortDescription": { + "text": "Missing component import" + }, + "fullDescription": { + "text": "Reports Vue components, which require to be imported in Vue templates. It provides a quick fix to add the missing import.", + "markdown": "Reports Vue components, which require to be imported in Vue templates. It provides a quick fix to add the missing import." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "VueMissingComponentImportInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Vue", + "index": 52, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "VueUnrecognizedDirective", + "shortDescription": { + "text": "Unrecognized directive" + }, + "fullDescription": { + "text": "Reports an unrecognized Vue directive.", + "markdown": "Reports an unrecognized Vue directive." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "VueUnrecognizedDirective", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Vue", + "index": 52, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "VueDuplicateTag", + "shortDescription": { + "text": "Duplicate template/script tag" + }, + "fullDescription": { + "text": "Reports multiple usages of the 'template' or 'script' tag in a Vue file. Vue Component specification indicates that each '*.vue' file can contain at most one 'template' or 'script' block at a time.", + "markdown": "Reports multiple usages of the `template` or `script` tag in a Vue file.\n\n[Vue Component specification](https://vue-loader.vuejs.org/spec.html) indicates that each `*.vue` file can contain at most one `template` or `script` block at a time." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "VueDuplicateTag", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Vue", + "index": 52, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "VueDeprecatedSymbol", + "shortDescription": { + "text": "Deprecated symbol" + }, + "fullDescription": { + "text": "Reports a deprecated Vue symbol.", + "markdown": "Reports a deprecated Vue symbol." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "VueDeprecatedSymbol", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Vue", + "index": 52, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.intellij.qodana", + "version": "241.18034.8", + "rules": [ + { + "id": "JsCoverageInspection", + "shortDescription": { + "text": "Check JavaScript and TypeScript source code coverage" + }, + "fullDescription": { + "text": "Reports methods, classes and files whose coverage is below a certain threshold.", + "markdown": "Reports methods, classes and files whose coverage is below a certain threshold." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JsCoverageInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Code Coverage", + "index": 67, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "QodanaSanity", + "shortDescription": { + "text": "Sanity" + }, + "fullDescription": { + "text": "Reports issues essential to this file like syntax errors, unresolved methods and variables, etc...", + "markdown": "Reports issues essential to this file like syntax errors, unresolved methods and variables, etc..." + }, + "defaultConfiguration": { + "enabled": true, + "level": "error", + "parameters": { + "suppressToolId": "QodanaSanity", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "Qodana", + "index": 76, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.jetbrains.plugins.github", + "version": "241.18034.45", + "rules": [ + { + "id": "GithubFunctionSignatureValidation", + "shortDescription": { + "text": "Standard library functions validation" + }, + "fullDescription": { + "text": "Reports invalid GitHub Actions Expression language standard library function calls For more information on GitHub Actions Expression language, see the GitHub documentation.", + "markdown": "Reports invalid GitHub Actions Expression language standard library function calls\n\n\nFor more information on GitHub Actions Expression language, see the [GitHub documentation](https://docs.github.com/en/actions/learn-github-actions/expressions)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "GithubFunctionSignatureValidation", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "GitHub actions", + "index": 69, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UndefinedParamsPresent", + "shortDescription": { + "text": "Undefined action parameters" + }, + "fullDescription": { + "text": "Reports the presence of parameters which are not defined in an action. It also provides a Quick Fix by removing the undefined parameters. For more information on action params, see the GitHub documentation.", + "markdown": "Reports the presence of parameters which are not defined in an action. It also provides a Quick Fix by removing the undefined parameters.\n\n\nFor more information on action params, see the [GitHub documentation](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runsstepswith)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "UndefinedParamsPresent", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "GitHub actions", + "index": 69, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MandatoryParamsAbsent", + "shortDescription": { + "text": "Invalid action parameters" + }, + "fullDescription": { + "text": "Reports the absence of mandatory parameters that do not have a default value for an action. It also provides a Quick Fix by adding the missing parameters with an empty value. For more information on action params, see the GitHub documentation.", + "markdown": "Reports the absence of mandatory parameters that do not have a default value for an action. It also provides a Quick Fix by adding the missing parameters with an empty value.\n\n\nFor more information on action params, see the [GitHub documentation](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runsstepswith)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "MandatoryParamsAbsent", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "GitHub actions", + "index": 69, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UndefinedAction", + "shortDescription": { + "text": "Undefined action reference" + }, + "fullDescription": { + "text": "Detects unresolved action references in GitHub action and workflow files. For more information on action references, see the GitHub documentation.", + "markdown": "Detects unresolved action references in GitHub action and workflow files.\n\n\nFor more information on action references, see the [GitHub documentation](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsuses)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "UndefinedAction", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "GitHub actions", + "index": 69, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "com.intellij.stylelint", + "version": "241.18034.45", + "rules": [ + { + "id": "Stylelint", + "shortDescription": { + "text": "Stylelint" + }, + "fullDescription": { + "text": "Reports a discrepancy detected by the Stylelint linter. The highlighting is based on the rule severity specified in the Stylelint configuration file for each individual rule.", + "markdown": "Reports a discrepancy detected by the [Stylelint](http://stylelint.io) linter. \n\nThe highlighting is based on the rule severity specified in the [Stylelint configuration file](https://stylelint.io/user-guide/configure) for each individual rule." + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "Stylelint", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/Code quality tools", + "index": 71, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "intellij.webpack", + "version": "241.18034.45", + "rules": [ + { + "id": "WebpackConfigHighlighting", + "shortDescription": { + "text": "Webpack config compliance with JSON Schema" + }, + "fullDescription": { + "text": "Validates options in webpack config files (which name should start with `webpack`, e.g. `webpack.config.js`) against webpack options schema. Disable this inspection to turn off validation and code completion inside the configuration object.", + "markdown": "Validates options in webpack config files (which name should start with \\`webpack\\`, e.g. \\`webpack.config.js\\`) against [webpack options schema](https://github.com/webpack/webpack/blob/master/schemas/WebpackOptions.json). \n\nDisable this inspection to turn off validation and code completion inside the configuration object." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "WebpackConfigHighlighting", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/General", + "index": 16, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "tslint", + "version": "241.18034.45", + "rules": [ + { + "id": "TsLint", + "shortDescription": { + "text": "TSLint" + }, + "fullDescription": { + "text": "Reports a discrepancy detected by the TSLint linter. The highlighting is based on the rule severity specified in the TSLint configuration file for each individual rule. Clear the 'Use rule severity from the configuration file' checkbox to use the severity configured in this inspection for all TSLint rules.", + "markdown": "Reports a discrepancy detected by the [TSLint](https://github.com/palantir/tslint) linter. \n\nThe highlighting is based on the rule severity specified in the [TSLint configuration file](https://palantir.github.io/tslint/usage/configuration/) for each individual rule. \n\nClear the 'Use rule severity from the configuration file' checkbox to use the severity configured in this inspection for all TSLint rules." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "TsLint", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript and TypeScript/Code quality tools", + "index": 66, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "com.intellij.jsonpath", + "version": "241.18034.45", + "rules": [ + { + "id": "JsonPathEvaluateUnknownKey", + "shortDescription": { + "text": "Unknown property key used for JSONPath evaluate expression" + }, + "fullDescription": { + "text": "Reports a key in a JSONPath expression that is missing in the source JSON document to evaluate.", + "markdown": "Reports a key in a JSONPath expression that is missing in the source JSON document to evaluate." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JsonPathEvaluateUnknownKey", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JSONPath", + "index": 75, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JsonPathUnknownFunction", + "shortDescription": { + "text": "Unknown JSONPath function" + }, + "fullDescription": { + "text": "Reports an unknown name in a JSONPath function call instead of known standard function names: 'concat', 'keys', 'length', 'min', 'max', 'avg', 'stddev', 'sum'.", + "markdown": "Reports an unknown name in a JSONPath function call instead of known standard function names: `concat`, `keys`, `length`, `min`, `max`, `avg`, `stddev`, `sum`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JsonPathUnknownFunction", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JSONPath", + "index": 75, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JsonPathUnknownOperator", + "shortDescription": { + "text": "Unknown JSONPath operator" + }, + "fullDescription": { + "text": "Reports an unknown operator on a JSONPath expression instead of one of the standard ones: 'in', 'nin', 'subsetof', 'anyof', 'noneof', 'size', 'empty', 'contains'.", + "markdown": "Reports an unknown operator on a JSONPath expression instead of one of the standard ones: `in`, `nin`, `subsetof`, `anyof`, `noneof`, `size`, `empty`, `contains`." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JsonPathUnknownOperator", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "JSONPath", + "index": 75, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "tanvd.grazi", + "version": "241.18034.45", + "rules": [ + { + "id": "LanguageDetectionInspection", + "shortDescription": { + "text": "Natural language detection" + }, + "fullDescription": { + "text": "Detects natural languages and suggests enabling corresponding grammar and spelling checks.", + "markdown": "Detects natural languages and suggests enabling corresponding grammar and spelling checks." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "LanguageDetectionInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Proofreading", + "index": 68, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "GrazieInspection", + "shortDescription": { + "text": "Grammar" + }, + "fullDescription": { + "text": "Reports grammar mistakes in your text. You can configure the inspection in Settings | Editor | Natural Languages | Grammar.", + "markdown": "Reports grammar mistakes in your text. You can configure the inspection in [Settings \\| Editor \\| Natural Languages \\| Grammar](settings://reference.settingsdialog.project.grazie)." + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "GrazieInspection", + "ideaSeverity": "GRAMMAR_ERROR", + "qodanaSeverity": "Info" + } + }, + "relationships": [ + { + "target": { + "id": "Proofreading", + "index": 68, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.toml.lang", + "version": "241.18034.45", + "rules": [ + { + "id": "TomlUnresolvedReference", + "shortDescription": { + "text": "Unresolved reference" + }, + "fullDescription": { + "text": "Reports unresolved references in TOML files.", + "markdown": "Reports unresolved references in TOML files." + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "TomlUnresolvedReference", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "TOML", + "index": 80, + "toolComponent": { + "name": "CL" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + } + ] + }, + "invocations": [ + { + "startTimeUtc": "2024-08-05T01:26:57.0086298Z", + "exitCode": 0, + "executionSuccessful": true + } + ], + "language": "en-US", + "versionControlProvenance": [ + { + "repositoryUri": "https://github.com/opentibiabr/canary.git", + "revisionId": "43fdb88ea14c24d58ac7c9cd50b28c5196f9c5d3", + "branch": "main", + "properties": { + "repoUrl": "https://github.com/opentibiabr/canary.git", + "lastAuthorName": "Renato Foot Guimarães Costallat", + "vcsType": "Git", + "lastAuthorEmail": "costallat@hotmail.com" + } + } + ], + "results": [ + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3112, + "startColumn": 2, + "charOffset": 95313, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3110, + "startColumn": 1, + "charOffset": 95306, + "charLength": 186, + "snippet": { + "text": "\t}\r\n\r\n\tuint16_t amount = msg.get();\r\n\tuint64_t price = oldProtocol ? static_cast(msg.get()) : msg.get();\r\n\tbool anonymous = (msg.getByte() != 0);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7f50018899484f2f", + "equalIndicator/v1": "002ce4e3c9047eedc500d63944d02fc7ce8ea38a0dfd3e3f99c06ceef1158c97" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'signed char' is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'signed char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 120, + "startColumn": 54, + "charOffset": 4409, + "charLength": 9, + "snippet": { + "text": "centerPos" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 118, + "startColumn": 1, + "charOffset": 4289, + "charLength": 333, + "snippet": { + "text": "\tif (multifloor) {\r\n\t\tif (centerPos.z > MAP_INIT_SURFACE_LAYER) {\r\n\t\t\tminRangeZ = static_cast(std::max(centerPos.z - MAP_LAYER_VIEW_LIMIT, 0u));\r\n\t\t\tmaxRangeZ = static_cast(std::min(centerPos.z + MAP_LAYER_VIEW_LIMIT, MAP_MAX_LAYERS - 1));\r\n\t\t} else if (centerPos.z == MAP_INIT_SURFACE_LAYER - 1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4fc5526566efba35", + "equalIndicator/v1": "004d334de55f140a7b9942527421c319880c44ed00f7575e0662732eca02a2cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1038, + "startColumn": 100, + "charOffset": 39484, + "charLength": 6, + "snippet": { + "text": "corpse" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1036, + "startColumn": 1, + "charOffset": 39371, + "charLength": 239, + "snippet": { + "text": "\r\n// Monster\r\nvoid EventCallback::monsterOnDropLoot(std::shared_ptr monster, std::shared_ptr corpse) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::monsterOnDropLoot - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d88af56504dd865f", + "equalIndicator/v1": "004fb00d6d7fe1aa3f378e2253d7d8adc92ce7344b4fa9fe1cebce5ff8f58e37" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1216, + "startColumn": 7, + "charOffset": 46383, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1214, + "startColumn": 1, + "charOffset": 46259, + "charLength": 276, + "snippet": { + "text": "\r\nvoid EventCallback::zoneAfterCreatureLeave(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneAfterCreatureLeave - \"\r\n\t\t \"Zone {} Creature {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "14e9ffd99da27466", + "equalIndicator/v1": "00506df460be7534e24eefe56822e9a0f2228b554f549f8c43be7dfb971f000f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1200, + "startColumn": 41, + "charOffset": 45764, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1198, + "startColumn": 1, + "charOffset": 45718, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bd2302c1a1bdb0b8", + "equalIndicator/v1": "005d3d29d53506de065563e6127b224c6de4f5b38b5b0755af5bfb696d17cfe9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1937, + "startColumn": 2, + "charOffset": 59034, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1935, + "startColumn": 1, + "charOffset": 58967, + "charLength": 229, + "snippet": { + "text": "\r\nvoid ProtocolGame::parsePlayerBuyOnShop(NetworkMessage &msg) {\r\n\tuint16_t id = msg.get();\r\n\tuint8_t count = msg.getByte();\r\n\tuint16_t amount = oldProtocol ? static_cast(msg.getByte()) : msg.get();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5a2e28489ef0999e", + "equalIndicator/v1": "00686a79b6f8930a89ad12d9036583ef29efb7130b7706d2c5db1707c7bee443" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1110, + "startColumn": 38, + "charOffset": 32995, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1108, + "startColumn": 1, + "charOffset": 32835, + "charLength": 350, + "snippet": { + "text": "\r\n\t\tif (!mType->info.soundVector.empty() && (mType->info.soundChance >= static_cast(uniform_random(1, 100)))) {\r\n\t\t\tint64_t index = uniform_random(0, static_cast(mType->info.soundVector.size() - 1));\r\n\t\t\tg_game().sendSingleSoundEffect(static_self_cast()->getPosition(), mType->info.soundVector[index], getMonster());\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2124272d95057ae8", + "equalIndicator/v1": "0085585729435a9f832f5568fe43827ab194ec08392f70e615266a8b513e3b2d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 15, + "startColumn": 57, + "charOffset": 538, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 13, + "startColumn": 1, + "charOffset": 454, + "charLength": 284, + "snippet": { + "text": "#include \"game/game.hpp\"\r\n\r\nbool IOLoginDataSave::saveItems(std::shared_ptr player, const ItemBlockList &itemList, DBInsert &query_insert, PropWriteStream &propWriteStream) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2b3c0ee5d196bdd4", + "equalIndicator/v1": "00ab8119b5f9538c4ce7d026cc1b857eecf55f6ca69923f1ce62773631760396" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 95, + "startColumn": 74, + "charOffset": 2854, + "charLength": 9, + "snippet": { + "text": "moveEvent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 93, + "startColumn": 1, + "charOffset": 2776, + "charLength": 180, + "snippet": { + "text": "}\r\n\r\nbool MoveEvents::registerLuaUniqueEvent(const std::shared_ptr moveEvent) {\r\n\tauto uniqueIdVector = moveEvent->getUniqueIdsVector();\r\n\tif (uniqueIdVector.empty()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2750afa9c22913fa", + "equalIndicator/v1": "00b4db4b8db0971fa7854b21584ee615c4b97199a2bd91ee149e8c61acf9c7af" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 955, + "startColumn": 64, + "charOffset": 34449, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 953, + "startColumn": 1, + "charOffset": 34381, + "charLength": 220, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) {\r\n\t// Player:onTradeRequest(target, item)\r\n\tif (info.playerOnTradeRequest == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9b6cf1a2a7419b78", + "equalIndicator/v1": "00c51789f6f132103913b144b2efe83207e7808d4ec2294e8d31d0990ae956e6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 925, + "startColumn": 73, + "charOffset": 30081, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 923, + "startColumn": 1, + "charOffset": 30004, + "charLength": 239, + "snippet": { + "text": "}\r\n\r\nvoid Creature::applyAbsorbDamageModifications(std::shared_ptr attacker, int32_t &damage, CombatType_t combatType) const {\r\n\tif (combatType != COMBAT_HEALING && damage != 0) {\r\n\t\tint32_t value = getAbsorbPercent(combatType);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8e3a48ea87f07dd3", + "equalIndicator/v1": "00db005be4c23f2dd13b21e92d979f49723ff7a85ef1305a0d001ca2f0cf46d1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead", + "markdown": "Do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 47, + "startColumn": 22, + "charOffset": 1228, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 45, + "startColumn": 1, + "charOffset": 1133, + "charLength": 251, + "snippet": { + "text": "\r\nbool Modules::registerEvent(Event_ptr event, const pugi::xml_node &) {\r\n\tModule_ptr module { static_cast(event.release()) };\r\n\tif (module->getEventType() == MODULE_TYPE_NONE) {\r\n\t\tg_logger().error(\"Trying to register event without type!\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "79a46945fbf9945b", + "equalIndicator/v1": "00ddc1665d49ad2913b4365b679221b32825e81c5b12a8f057080ebeb17a57bf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1098, + "startColumn": 2, + "charOffset": 39398, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1096, + "startColumn": 1, + "charOffset": 39391, + "charLength": 46, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "37dd9ae4c092c453", + "equalIndicator/v1": "00e8b9c40b3260a7ad761078e41767441085af54feddf773c4d9e5cc2c4bf249" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 792, + "startColumn": 21, + "charOffset": 25738, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 790, + "startColumn": 1, + "charOffset": 25659, + "charLength": 176, + "snippet": { + "text": "\r\n\tint32_t minValue = std::round(player->getLevel() / 5);\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue) / 2;\r\n\r\n\tif (target) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "705b2ee940b80d44", + "equalIndicator/v1": "0100a5f5d1f05b7aac933746d3bae79feb6594c026a50d6651547dd6ba3f74d2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7627, + "startColumn": 91, + "charOffset": 266830, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7625, + "startColumn": 1, + "charOffset": 266735, + "charLength": 247, + "snippet": { + "text": "}\r\n\r\nbool Game::combatChangeMana(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage) {\r\n\tconst Position &targetPos = target->getPosition();\r\n\tauto manaChange = damage.primary.value + damage.secondary.value;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9bcf026fbe379b1d", + "equalIndicator/v1": "0111414d953b5734e2c898401b5a87fd755cf4fa433c00bb84b68242d8c8dff4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 536, + "startColumn": 24, + "charOffset": 14291, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 534, + "startColumn": 1, + "charOffset": 14262, + "charLength": 175, + "snippet": { + "text": "\t}\r\n\r\n\tcreature->healthMax = getNumber(L, 2);\r\n\tcreature->health = std::min(creature->health, creature->healthMax);\r\n\tg_game().addCreatureHealth(creature);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b83b9de834b85115", + "equalIndicator/v1": "0123ae2a480b40ce5864b4d0862f1739d2af30e3c6fc3d0f4a41746b2d9d0afd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'operator vector' must be marked explicit to avoid unintentional implicit conversions", + "markdown": "'operator vector' must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 116, + "startColumn": 27, + "charOffset": 3371, + "charLength": 9, + "snippet": { + "text": "ArrayType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 114, + "startColumn": 1, + "charOffset": 3339, + "charLength": 84, + "snippet": { + "text": "\t}\r\n\r\n\texplicit(false) operator ArrayType() const {\r\n\t\treturn get();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d771443d71c08e16", + "equalIndicator/v1": "013323c06ce4b94b69ad560d82506536047025f471ffb47fcb750a165b7eb1d0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1119, + "startColumn": 16, + "charOffset": 33833, + "charLength": 5, + "snippet": { + "text": "index" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1117, + "startColumn": 1, + "charOffset": 33743, + "charLength": 148, + "snippet": { + "text": "\r\nvoid Tile::replaceThing(uint32_t index, std::shared_ptr thing) {\r\n\tint32_t pos = index;\r\n\r\n\tstd::shared_ptr item = thing->getItem();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a85fc7bf062db0a3", + "equalIndicator/v1": "0133b1e2b81c9446ad2d8ee64728120ef27a775740b7243eca16a9addce9daf1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 867, + "startColumn": 17, + "charOffset": 26090, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 865, + "startColumn": 1, + "charOffset": 26069, + "charLength": 234, + "snippet": { + "text": "}\r\n\r\nvoid Container::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tstd::shared_ptr topParent = getTopParent();\r\n\tif (topParent->getCreature()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4d216bf40b0d008b", + "equalIndicator/v1": "0158e545c4080b094679202f04677076481fbaa8c17870e7936de49c89007c51" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2818, + "startColumn": 2, + "charOffset": 86087, + "charLength": 11, + "snippet": { + "text": "charmRune_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2816, + "startColumn": 1, + "charOffset": 86080, + "charLength": 144, + "snippet": { + "text": "\t}\r\n\r\n\tcharmRune_t runeID = static_cast(msg.getByte());\r\n\tuint8_t action = msg.getByte();\r\n\tuint16_t raceid = msg.get();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5912f7bf9e525631", + "equalIndicator/v1": "015afa847af1b098989965396c735561e53402b6ed179c0c955a49b7b882aad8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 368, + "startColumn": 103, + "charOffset": 13203, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 366, + "startColumn": 1, + "charOffset": 13096, + "charLength": 334, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventCreatureOnDrainHealth(std::shared_ptr creature, std::shared_ptr attacker, CombatType_t &typePrimary, int32_t &damagePrimary, CombatType_t &typeSecondary, int32_t &damageSecondary, TextColor_t &colorPrimary, TextColor_t &colorSecondary) {\r\n\tif (info.creatureOnDrainHealth == -1) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "407c559e2fb7e9b4", + "equalIndicator/v1": "01a2d4bdb41c837eb9a69d253d01180fe3b99075d1f83105b73573130ce739fc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 230, + "startColumn": 21, + "charOffset": 6296, + "charLength": 7, + "snippet": { + "text": "npcType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 228, + "startColumn": 1, + "charOffset": 6257, + "charLength": 167, + "snippet": { + "text": "\r\n\tint index = 0;\r\n\tlua_createtable(L, npcType->info.voiceVector.size(), 0);\r\n\tfor (const auto &voiceBlock : npcType->info.voiceVector) {\r\n\t\tlua_createtable(L, 0, 2);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6f5061ede8d0ca74", + "equalIndicator/v1": "01a951af123a4d48eb7f8d4f98009e7797d792575c68dab6263119f9c1380a87" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'result' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'result' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 107, + "startColumn": 75, + "charOffset": 4016, + "charLength": 6, + "snippet": { + "text": "result" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 105, + "startColumn": 1, + "charOffset": 3937, + "charLength": 218, + "snippet": { + "text": "}\r\n\r\nbool IOLoginData::loadPlayer(std::shared_ptr player, DBResult_ptr result, bool disableIrrelevantInfo /* = false*/) {\r\n\tif (!result || !player) {\r\n\t\tstd::string nullptrType = !result ? \"Result\" : \"Player\";\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a1a5a8590f41dcfc", + "equalIndicator/v1": "01b9b35abb7fa8ea6e04102eacb59a474a92b26795d4eca965a9c5d23953132c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5135, + "startColumn": 55, + "charOffset": 183013, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5133, + "startColumn": 1, + "charOffset": 182954, + "charLength": 252, + "snippet": { + "text": "}\r\n\r\nvoid Game::internalCloseTrade(std::shared_ptr player) {\r\n\tstd::shared_ptr tradePartner = player->tradePartner;\r\n\tif ((tradePartner && tradePartner->getTradeState() == TRADE_TRANSFER) || player->getTradeState() == TRADE_TRANSFER) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4ff3908507f6223e", + "equalIndicator/v1": "01f2e7555fc6bd49820d92f39137bb718c5aed47091ff17d983f7ea2b711a409" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6495, + "startColumn": 111, + "charOffset": 224192, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6493, + "startColumn": 1, + "charOffset": 224077, + "charLength": 273, + "snippet": { + "text": "}\r\n\r\nbool Game::combatBlockHit(CombatDamage &damage, std::shared_ptr attacker, std::shared_ptr target, bool checkDefense, bool checkArmor, bool field) {\r\n\tif (damage.primary.type == COMBAT_NONE && damage.secondary.type == COMBAT_NONE) {\r\n\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f06168c685bef74e", + "equalIndicator/v1": "023103e87a498e099ae83a2106c16c880f22287b0d440a7718864ba83e3b9826" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'raidEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'raidEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 103, + "startColumn": 24, + "charOffset": 2597, + "charLength": 32, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 101, + "startColumn": 1, + "charOffset": 2552, + "charLength": 112, + "snippet": { + "text": "\tvoid startRaid();\r\n\r\n\tvoid executeRaidEvent(const std::shared_ptr raidEvent);\r\n\tvoid resetRaid();\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3e6e273d6c07c68f", + "equalIndicator/v1": "0245d7ce534cdc6fdca6e0505f094da91469bd5a46782f403bbafcc637e3bee7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1190, + "startColumn": 50, + "charOffset": 34801, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1188, + "startColumn": 1, + "charOffset": 34747, + "charLength": 217, + "snippet": { + "text": "}\r\n\r\nvoid Player::sendLootStats(std::shared_ptr item, uint8_t count) {\r\n\tuint64_t value = 0;\r\n\tif (item->getID() == ITEM_GOLD_COIN || item->getID() == ITEM_PLATINUM_COIN || item->getID() == ITEM_CRYSTAL_COIN) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2ea4a18d76ef7e9d", + "equalIndicator/v1": "0249279da9018252358aac7e2b595c4595da930b0ee82245ab97bda5cbce66c2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 706, + "startColumn": 97, + "charOffset": 27162, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 704, + "startColumn": 1, + "charOffset": 27061, + "charLength": 291, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeAccept - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6f9ae60b5c397ef2", + "equalIndicator/v1": "02492d87ad46632b4ad64a3bd8f35ed5cd57f3abccecbbd24e59f10cec16cd5a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotchest.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 27, + "startColumn": 7, + "charOffset": 984, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 25, + "startColumn": 1, + "charOffset": 823, + "charLength": 351, + "snippet": { + "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r\n\tbool isDepotChest() const override {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6d98bb0e0959a9f3", + "equalIndicator/v1": "026ab7b08fe677994468f010175dd6592f596fa17079ac759d03374711196d53" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 621, + "startColumn": 27, + "charOffset": 22121, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 619, + "startColumn": 1, + "charOffset": 22089, + "charLength": 135, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnLookInBattleList, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3a2814a1eb1bdd89", + "equalIndicator/v1": "02723b263663384d79efc4838389f7ef123c5ba28fbb353ac1e4f969ce642722" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotchest.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 22, + "startColumn": 25, + "charOffset": 632, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 603, + "charLength": 246, + "snippet": { + "text": "}\r\n\r\nReturnValue DepotChest::queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor /* = nullptr*/) {\r\n\tstd::shared_ptr item = thing->getItem();\r\n\tif (item == nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "771dea193711d651", + "equalIndicator/v1": "0275985241458ba719a4dc0ef74e53e9b601c421c7391f92ed635af52e6dcf0e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'conn' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'conn' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 26, + "startColumn": 12, + "charOffset": 835, + "charLength": 4, + "snippet": { + "text": "conn" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 24, + "startColumn": 1, + "charOffset": 773, + "charLength": 131, + "snippet": { + "text": "\r\n\texplicit ProtocolStatus(Connection_ptr conn) :\r\n\t\tProtocol(conn) { }\r\n\r\n\tvoid onRecvFirstMessage(NetworkMessage &msg) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bfbe7b4aa4990636", + "equalIndicator/v1": "02ad0e3f6649af90f929938052cc018dff739ebd9c727de848e4729e2e4765ac" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2037, + "startColumn": 63, + "charOffset": 60349, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2035, + "startColumn": 1, + "charOffset": 60282, + "charLength": 172, + "snippet": { + "text": "}\r\n\r\nvoid Player::onRemoveContainerItem(std::shared_ptr container, std::shared_ptr item) {\r\n\tif (tradeState != TRADE_TRANSFER) {\r\n\t\tcheckTradeState(item);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e8adc3bca0b10eec", + "equalIndicator/v1": "02ea6f1dbcc1a813b89d8d2786d1e1d954e488066a3308f8a04051644166205b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 554, + "startColumn": 27, + "charOffset": 19630, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 552, + "startColumn": 1, + "charOffset": 19598, + "charLength": 130, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnBrowseField, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "de5607edd8c49744", + "equalIndicator/v1": "02ff6b12402271562ec6b7f23db7029b691eaef3fd86ea4b053bad57123ac479" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 234, + "startColumn": 27, + "charOffset": 8420, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 232, + "startColumn": 1, + "charOffset": 8388, + "charLength": 133, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.creatureOnChangeOutfit, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4a39da1a5eed26ea", + "equalIndicator/v1": "0319d61ed3366dd769890abf744ea8a1bfdb20a3e11de7ccc77be11e5b5957ac" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 464, + "startColumn": 7, + "charOffset": 17506, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 462, + "startColumn": 1, + "charOffset": 17389, + "charLength": 257, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnRemoveCount(std::shared_ptr player, std::shared_ptr item) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnMove - \"\r\n\t\t \"Player {} item {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "08e6ddc14ab4d444", + "equalIndicator/v1": "031fbbde9fc44c879ccf672eb4056ae81f9e0007169655cee1591a8a03acc294" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: m_maxItems", + "markdown": "Constructor does not initialize these fields: m_maxItems" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 34, + "startColumn": 12, + "charOffset": 1067, + "charLength": 9, + "snippet": { + "text": "Container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 32, + "startColumn": 1, + "charOffset": 1051, + "charLength": 168, + "snippet": { + "text": "}\r\n\r\nContainer::Container(uint16_t initType, uint16_t initSize, bool initUnlocked /*= true*/, bool initPagination /*= false*/) :\r\n\tItem(initType),\r\n\tmaxSize(initSize),\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "14f9250ed32dc8f6", + "equalIndicator/v1": "0378f6e80a53c4b5c58ac6dd790b3eb69c8a3f8d8f8de7659b6da9c773b65a4f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 217, + "startColumn": 7, + "charOffset": 6532, + "charLength": 8, + "snippet": { + "text": "addThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 215, + "startColumn": 1, + "charOffset": 6464, + "charLength": 196, + "snippet": { + "text": "\tstd::vector> getSurroundingTiles();\r\n\r\n\tvoid addThing(std::shared_ptr thing) override final;\r\n\tvoid addThing(int32_t index, std::shared_ptr thing) override;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cbd945e8b12400e0", + "equalIndicator/v1": "037cb83b2e9333076794f413f19da0df8f40b9be4eb3a275acf91e016e3944c2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 706, + "startColumn": 65, + "charOffset": 27130, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 704, + "startColumn": 1, + "charOffset": 27061, + "charLength": 291, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeAccept - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "956a83004595ec2b", + "equalIndicator/v1": "039051f28398b7b77755c9b854debe54318546679b26ab3ad3924c6bc89bf53a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 475, + "startColumn": 90, + "charOffset": 15688, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 473, + "startColumn": 1, + "charOffset": 15594, + "charLength": 145, + "snippet": { + "text": "}\r\n\r\nvoid Actions::showUseHotkeyMessage(std::shared_ptr player, std::shared_ptr item, uint32_t count) {\r\n\tstd::ostringstream ss;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9fdf8b8f46bc426a", + "equalIndicator/v1": "0397b7981b363289c4cede45bfb0d5d191309983632c15c9568d4aecfda068aa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Escaped string literal can be written as a raw string literal", + "markdown": "Escaped string literal can be written as a raw string literal" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 133, + "startColumn": 15, + "charOffset": 4253, + "charLength": 28, + "snippet": { + "text": "\"\\\"footer\\\": { \\\"text\\\": \\\"\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 131, + "startColumn": 1, + "charOffset": 4160, + "charLength": 182, + "snippet": { + "text": "\t\t}\r\n\t\tif (g_configManager().getBoolean(DISCORD_SEND_FOOTER, __FUNCTION__)) {\r\n\t\t\tpayload << \"\\\"footer\\\": { \\\"text\\\": \\\"\" << footer_text.str() << \"\\\" }, \";\r\n\t\t}\r\n\t\tif (color >= 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5338e735d454f92e", + "equalIndicator/v1": "03b2f90dadede9ab253a16c7bf2d6c941cbaf0aa00549c3c5c876cdb46c63c73" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 259, + "startColumn": 62, + "charOffset": 7604, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 257, + "startColumn": 1, + "charOffset": 7538, + "charLength": 152, + "snippet": { + "text": "}\r\n\r\nPosition Spells::getCasterPosition(std::shared_ptr creature, Direction dir) {\r\n\treturn getNextPosition(dir, creature->getPosition());\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "86ed948a90a06c81", + "equalIndicator/v1": "03c2681d50399708c0a6bca8f63e3e528572140bb1b8e89855e4312b506cb4f2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Converting integer literal to bool, use bool literal instead", + "markdown": "Converting integer literal to bool, use bool literal instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 56, + "startColumn": 10, + "charOffset": 1453, + "charLength": 1, + "snippet": { + "text": "0" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 54, + "startColumn": 1, + "charOffset": 1392, + "charLength": 104, + "snippet": { + "text": "\tauto bankable = getBankable();\r\n\tif (!bankable) {\r\n\t\treturn 0;\r\n\t}\r\n\tbankable->setBankBalance(amount);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "67663aea5c33e972", + "equalIndicator/v1": "03d390431b97ac5c73a888dc47dcea6a4a49bcc1f02dab2450d854c7ccc9944d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1257, + "startColumn": 89, + "charOffset": 41487, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1255, + "startColumn": 1, + "charOffset": 41394, + "charLength": 344, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatHealth(std::shared_ptr caster, std::shared_ptr target, const Position &origin, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\r\n\tif ((caster && target)\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "276ded4f964a9fb6", + "equalIndicator/v1": "03d7080c05bb2ca7f90fb67e8803cce4ffd5ed62e2b0d9eda316b188054c377a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 480, + "startColumn": 132, + "charOffset": 13683, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 478, + "startColumn": 1, + "charOffset": 13547, + "charLength": 379, + "snippet": { + "text": "}\r\n\r\nvoid Tile::onRemoveTileItem(const CreatureVector &spectators, const std::vector &oldStackPosVector, std::shared_ptr item) {\r\n\tif ((item->hasProperty(CONST_PROP_MOVABLE) || item->getContainer()) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) {\r\n\t\tauto it = g_game().browseFields.find(getTile());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "72138b473d08a740", + "equalIndicator/v1": "04042f0b214a2d8cd13ae31301e6406e5412baa74325f0d3896f9f961fe52b71" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 297, + "startColumn": 2, + "charOffset": 8746, + "charLength": 2, + "snippet": { + "text": "if" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 295, + "startColumn": 1, + "charOffset": 8644, + "charLength": 183, + "snippet": { + "text": "\t// monster:getTargetCount()\r\n\tstd::shared_ptr monster = getUserdataShared(L, 1);\r\n\tif (monster) {\r\n\t\tlua_pushnumber(L, monster->getTargetList().size());\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2dc650adcf0ee234", + "equalIndicator/v1": "042e4ecc21e0e8344175ab6f0570f8b99c70e4312ae7f6c51cfb234c455f309b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1167, + "startColumn": 99, + "charOffset": 44404, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1165, + "startColumn": 1, + "charOffset": 44301, + "charLength": 237, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::zoneBeforeCreatureLeave(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneBeforeCreatureLeave - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "077900b51d4344a1", + "equalIndicator/v1": "043f94d8de84bec7c6950addd6386048c9264bea35e34970554890a03309371f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2565, + "startColumn": 3, + "charOffset": 74588, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2563, + "startColumn": 1, + "charOffset": 74524, + "charLength": 180, + "snippet": { + "text": "\t}\r\n\tbool isConcoctionActive(Concoction_t concotion) const {\r\n\t\tuint16_t itemId = static_cast(concotion);\r\n\t\tif (!activeConcoctions.contains(itemId)) {\r\n\t\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eca87d319d6a6fbe", + "equalIndicator/v1": "044e762af59b09a34d9d497dea1f4cf18336c1e3257de0eb9e999b799486f10b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 10519, + "startColumn": 62, + "charOffset": 365267, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10517, + "startColumn": 1, + "charOffset": 365201, + "charLength": 232, + "snippet": { + "text": "}\r\n\r\nvoid Game::afterCreatureZoneChange(std::shared_ptr creature, const std::unordered_set> &fromZones, const std::unordered_set> &toZones) const {\r\n\tif (!creature) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "72eeaa554fc29398", + "equalIndicator/v1": "04830bc4398e7dc0aa46f1ada569bfad14d4181c63be9a5650b02f68ed59d070" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 667, + "startColumn": 26, + "charOffset": 31232, + "charLength": 19, + "snippet": { + "text": "MITIGATION_INCREASE" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 665, + "startColumn": 1, + "charOffset": 31037, + "charLength": 336, + "snippet": { + "text": "// SLOT_BLUE_TOP_100 = 19\r\nvoid IOWheel::slotBlueTop100(const std::shared_ptr &player, uint16_t points, uint8_t, PlayerWheelMethodsBonusData &bonusData) const {\r\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\r\n\taddVesselResonance(player, bonusData, WheelSlots_t::SLOT_BLUE_TOP_100, WheelGemAffinity_t::Blue, points);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b47ccb4943d2db59", + "equalIndicator/v1": "04bad30583703148e7f51afc8e5855a5e4ad7ee7db4c68fe6a409bd654b12a7e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotchest.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 26, + "startColumn": 7, + "charOffset": 831, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 24, + "startColumn": 1, + "charOffset": 663, + "charLength": 472, + "snippet": { + "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a0ae5b3c0c0908cc", + "equalIndicator/v1": "04c7fd228204fd80edd881b1f36b8423fbd93836a7c6a0581cbbf8f13d1f566a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 253, + "startColumn": 10, + "charOffset": 7708, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 251, + "startColumn": 1, + "charOffset": 7612, + "charLength": 117, + "snippet": { + "text": "std::string LuaFunctionsLoader::popString(lua_State* L) {\r\n\tif (lua_gettop(L) == 0) {\r\n\t\treturn std::string();\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a539a658bd38f813", + "equalIndicator/v1": "04e1d1df948597f40c99d4989d038384bd0784660d0a57938794c3425389c247" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 272, + "startColumn": 23, + "charOffset": 9047, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 270, + "startColumn": 1, + "charOffset": 8921, + "charLength": 144, + "snippet": { + "text": "\t\tg_game().sendSingleSoundEffect(tile->getPosition(), SoundEffect_t::PHYSICAL_RANGE_MISS, player);\r\n\t}\r\n\tonUsedWeapon(player, item, tile);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "380a6be5c3ac7f60", + "equalIndicator/v1": "04e380af2b42f02629f270c9e5c9c87384e850af894e7f37634daf9eaeb8c1c1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 34, + "startColumn": 23, + "charOffset": 1151, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 32, + "startColumn": 1, + "charOffset": 1124, + "charLength": 163, + "snippet": { + "text": "}\r\n\r\nReturnValue Teleport::queryAdd(int32_t, const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr) {\r\n\treturn RETURNVALUE_NOTPOSSIBLE;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b4bacdda553068de", + "equalIndicator/v1": "04ef3f3a05de61d096256fc48b9bd667ebbf9aee7343934ff89bacc9eb1c69aa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1084, + "startColumn": 49, + "charOffset": 35404, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1082, + "startColumn": 1, + "charOffset": 35351, + "charLength": 230, + "snippet": { + "text": "}\r\n\r\nbool Combat::doCombat(std::shared_ptr caster, std::shared_ptr target, const Position &origin, int affected /* = 1 */) const {\r\n\t// target combat callback function\r\n\tif (params.combatType != COMBAT_NONE) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1abe8d5a89b6d01b", + "equalIndicator/v1": "05072b81ab91984708e144eee9329976e8c800567c5b2ce354f028d4edaf776a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4710, + "startColumn": 56, + "charOffset": 148694, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4708, + "startColumn": 1, + "charOffset": 148634, + "charLength": 109, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendLootStats(std::shared_ptr item, uint8_t count) {\r\n\tif (!item) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bafd73ff774f619a", + "equalIndicator/v1": "0508afcbc72617d3cb1007d820c3709bee8aaa8d78a6f112d490cc1fc085b60c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 378, + "startColumn": 10, + "charOffset": 11694, + "charLength": 5, + "snippet": { + "text": "items" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 376, + "startColumn": 1, + "charOffset": 11633, + "charLength": 116, + "snippet": { + "text": "\r\n\tint16_t getMagicShieldCapacityPercent() const {\r\n\t\treturn items[id].abilities->magicShieldCapacityPercent;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7a2915915fcb6869", + "equalIndicator/v1": "050efc96bfcba13c6edf2ab2bc7a7daa008bbfc1c62cbb07e8f5c18989fea97c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 809, + "startColumn": 25, + "charOffset": 26155, + "charLength": 15, + "snippet": { + "text": "getWeaponDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 807, + "startColumn": 1, + "charOffset": 26126, + "charLength": 245, + "snippet": { + "text": "}\r\n\r\nint32_t WeaponDistance::getWeaponDamage(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, bool maxDamage /*= false*/) const {\r\n\tint32_t attackValue = item->getAttack();\r\n\tbool hasElement = false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "552b91f1ec0e07c8", + "equalIndicator/v1": "0530e2f0b329c6cc180c3498a156c86c4425c08ecb75b82e86752a07060fc195" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'transformItem' is within a recursive call chain", + "markdown": "Function 'transformItem' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2691, + "startColumn": 29, + "charOffset": 101179, + "charLength": 13, + "snippet": { + "text": "transformItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2689, + "startColumn": 1, + "charOffset": 101146, + "charLength": 321, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Game::transformItem(std::shared_ptr item, uint16_t newId, int32_t newCount /*= -1*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (item->getID() == newId && (newCount == -1 || (newCount == item->getSubType() && newCount != 0))) { // chargeless item placed on map = infinite\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a8187066f9503cf3", + "equalIndicator/v1": "053388149a89e0130a781d129939936f0a212f10b703c4650669c8f21c243c87" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first.", + "markdown": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 728, + "startColumn": 15, + "charOffset": 23678, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 726, + "startColumn": 1, + "charOffset": 23637, + "charLength": 74, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tchance = it.hitChance;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3d4a690e93b22f0f", + "equalIndicator/v1": "0543f3fc2ec0d9092104f60d595dfe14755339bca29684771d6bb5e8e5230c92" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 835, + "startColumn": 60, + "charOffset": 31937, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 833, + "startColumn": 1, + "charOffset": 31873, + "charLength": 271, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnCombat - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0c36d01405770872", + "equalIndicator/v1": "055bf7faa61cb709bba54af43bd4377d91bf60fbbd314a0c08670350772b99d0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 136, + "startColumn": 2, + "charOffset": 4235, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 134, + "startColumn": 1, + "charOffset": 4186, + "charLength": 123, + "snippet": { + "text": "\tint32_t itemCount = 1;\r\n\tint32_t subType = 1;\r\n\tuint32_t count = getNumber(L, 3, 1);\r\n\r\n\tif (it.hasSubType()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "18f030d8fefe6873", + "equalIndicator/v1": "0567a8fb0f0ff2aa43580a6bfae8ae3e6830132be50cb802b4e160450ce7700a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1215, + "startColumn": 36, + "charOffset": 35778, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1213, + "startColumn": 1, + "charOffset": 35639, + "charLength": 172, + "snippet": { + "text": "\tvoid sendCreatureWalkthrough(std::shared_ptr creature, bool walkthrough) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureWalkthrough(creature, walkthrough);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "85066812fb5268dc", + "equalIndicator/v1": "05708e798f0f7c1701b6a5b889370ce39731099857765153a6f5828bdefd3be6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::list::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::list::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5165, + "startColumn": 95, + "charOffset": 162688, + "charLength": 3, + "snippet": { + "text": "810" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5163, + "startColumn": 1, + "charOffset": 162431, + "charLength": 307, + "snippet": { + "text": "\tstd::map counterMap;\r\n\tuint32_t buyOffersToSend = std::min(buyOffers.size(), 810 + std::max(0, 810 - sellOffers.size()));\r\n\tuint32_t sellOffersToSend = std::min(sellOffers.size(), 810 + std::max(0, 810 - buyOffers.size()));\r\n\r\n\tNetworkMessage msg;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bcf40b9a2e0fefee", + "equalIndicator/v1": "0576a0d7af0e59172bcab62a506d78b8ae8557e89fc5dbc5f4789acec7d2d608" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 596, + "startColumn": 13, + "charOffset": 28975, + "charLength": 11, + "snippet": { + "text": "stringValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 594, + "startColumn": 1, + "charOffset": 28781, + "charLength": 416, + "snippet": { + "text": "\t} else if (stringValue == \"absorbpercentmanadrain\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_MANADRAIN)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentdrown\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_DROWNDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentphysical\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "851e6d94beec7005", + "equalIndicator/v1": "0583f9f6070f11a684e54867a4d862ceac9a2a8bb9926ec462e9818eb8b840a5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 933, + "startColumn": 7, + "charOffset": 33704, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 931, + "startColumn": 1, + "charOffset": 33692, + "charLength": 136, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnTurn - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fec4ff5d46845ef9", + "equalIndicator/v1": "0592d608535b6352c996b18d986083a38bdf6e746d60cc58b8533627ce04e64d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: channelId", + "markdown": "Constructor does not initialize these fields: channelId" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 43, + "startColumn": 2, + "charOffset": 1162, + "charLength": 11, + "snippet": { + "text": "TextMessage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 41, + "startColumn": 1, + "charOffset": 1112, + "charLength": 162, + "snippet": { + "text": "struct TextMessage {\r\n\tTextMessage() = default;\r\n\tTextMessage(MessageClasses initType, std::string initText) :\r\n\t\ttype(initType), text(std::move(initText)) { }\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5cc0b4630a5a121d", + "equalIndicator/v1": "05cd2ddee7658ce2cae6377e80194f55e6f0dfc0ca69bd70eebc4a47dde420c9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 58, + "startColumn": 41, + "charOffset": 1800, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 56, + "startColumn": 1, + "charOffset": 1754, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c228fe8a89531189", + "equalIndicator/v1": "05e15418463bf450ed6c22ed6f85e1c8f8a926a1156a500b0281b5474a4357c2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 419, + "startColumn": 10, + "charOffset": 11205, + "charLength": 17, + "snippet": { + "text": "getReflectPercent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 417, + "startColumn": 1, + "charOffset": 11190, + "charLength": 184, + "snippet": { + "text": "\t}\r\n\r\n\tint32_t getReflectPercent(CombatType_t combat, bool useCharges = false) const override;\r\n\r\n\tint32_t getReflectFlat(CombatType_t combat, bool useCharges = false) const override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2fd24d3f8cf018c9", + "equalIndicator/v1": "060283e76764a0cf44ee2039fd56fde9d89546a8bd0d47d0a72c9a1217b823ca" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 391, + "startColumn": 113, + "charOffset": 12624, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 389, + "startColumn": 1, + "charOffset": 12507, + "charLength": 243, + "snippet": { + "text": "}\r\n\r\nbool Actions::useItem(std::shared_ptr player, const Position &pos, uint8_t index, std::shared_ptr item, bool isHotkey) {\r\n\tconst ItemType &it = Item::items[item->getID()];\r\n\tif (it.isRune() || it.type == ITEM_TYPE_POTION) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2d7a5d8e5d5abbfe", + "equalIndicator/v1": "0607f1a546bbd9d086295463c26732736263945a9314de5c0936e6e2116a6456" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Valty', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Valty', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/arraylist.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 102, + "startColumn": 22, + "charOffset": 2309, + "charLength": 6, + "snippet": { + "text": "_Valty" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 100, + "startColumn": 1, + "charOffset": 2281, + "charLength": 109, + "snippet": { + "text": "\t\t}\r\n\r\n\t\ttemplate \r\n\t\tdecltype(auto) emplace_front(_Valty &&... v) {\r\n\t\t\tneedUpdate = true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "680e21a97f1df0ed", + "equalIndicator/v1": "060dc568bd27032686b8c86f3c173dbfdf57eaf6dce7bf832f0c0baa4a16bb81" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 183, + "startColumn": 2, + "charOffset": 6788, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 181, + "startColumn": 1, + "charOffset": 6781, + "charLength": 46, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8f6b25bd0b4b8d81", + "equalIndicator/v1": "061f81cae0c0c5744929e0121c8fb79612de4520cddf24049313ba549a600d10" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2088, + "startColumn": 58, + "charOffset": 61649, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2086, + "startColumn": 1, + "charOffset": 61587, + "charLength": 134, + "snippet": { + "text": "}\r\n\r\nvoid Player::onRemoveInventoryItem(std::shared_ptr item) {\r\n\tif (tradeState != TRADE_TRANSFER) {\r\n\t\tcheckTradeState(item);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ac6267b84fa7822f", + "equalIndicator/v1": "0625daa73c94b3554445f06276733506d4c5fd38f32a9a822a5b258277807dd0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 199, + "startColumn": 63, + "charOffset": 6067, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 197, + "startColumn": 1, + "charOffset": 6000, + "charLength": 186, + "snippet": { + "text": "}\r\n\r\nReturnValue Combat::canTargetCreature(std::shared_ptr player, std::shared_ptr target) {\r\n\tif (player == target) {\r\n\t\treturn RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "66a7a373ead18b90", + "equalIndicator/v1": "062d63181b8168c55090ffb3a168b571875d9dc47e7a70b3897130d9acb1ffce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3521, + "startColumn": 14, + "charOffset": 106528, + "charLength": 1, + "snippet": { + "text": "n" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3519, + "startColumn": 1, + "charOffset": 106372, + "charLength": 213, + "snippet": { + "text": "\t\t\t\t// try find an already existing item to stack with\r\n\t\t\t\tif (tmpItem->equals(item) && tmpItem->getItemCount() < tmpItem->getStackSize()) {\r\n\t\t\t\t\tindex = n;\r\n\t\t\t\t\t*destItem = tmpItem;\r\n\t\t\t\t\treturn tmpContainer;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b647f842edbafcbd", + "equalIndicator/v1": "065219692d5308f976d9f14146f8f6ef973e576f6524f757bca638b3aa16e445" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 213, + "startColumn": 66, + "charOffset": 6731, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 211, + "startColumn": 1, + "charOffset": 6661, + "charLength": 223, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Actions::getAction(std::shared_ptr item) {\r\n\tif (item->hasAttribute(ItemAttribute_t::UNIQUEID)) {\r\n\t\tauto it = uniqueItemMap.find(item->getAttribute(ItemAttribute_t::UNIQUEID));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3fb1ea88033404d0", + "equalIndicator/v1": "066f7c51628a4411add5681f1e9ec1b5e533e5ece7c1dae45cd8e902ee293599" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7809, + "startColumn": 62, + "charOffset": 245631, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7807, + "startColumn": 1, + "charOffset": 245565, + "charLength": 121, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::openImbuementWindow(std::shared_ptr item) {\r\n\tif (!item || item->isRemoved()) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "de6d5a0456e8ba19", + "equalIndicator/v1": "066f92050658460e4b2739eadd040090b590393fb0663aac585e6877f5ac37b4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'name' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'name' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2923, + "startColumn": 48, + "charOffset": 102908, + "charLength": 4, + "snippet": { + "text": "name" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2921, + "startColumn": 1, + "charOffset": 102856, + "charLength": 169, + "snippet": { + "text": "}\r\n\r\nbool PlayerWheel::getInstant(const std::string name) const {\r\n\tif (name == \"Battle Instinct\") {\r\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::BATTLE_INSTINCT);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4b0254e56a30f776", + "equalIndicator/v1": "066fab314f43598ce21f62696e75eb5cad24866d4cac9bfa63704a2d33a25608" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 455, + "startColumn": 22, + "charOffset": 24166, + "charLength": 31, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 453, + "startColumn": 1, + "charOffset": 24014, + "charLength": 316, + "snippet": { + "text": "\tvoid changeLight(const std::shared_ptr creature);\r\n\tvoid updateCreatureIcon(const std::shared_ptr creature);\r\n\tvoid reloadCreature(const std::shared_ptr creature);\r\n\tvoid updateCreatureSkull(std::shared_ptr player);\r\n\tvoid updatePlayerShield(std::shared_ptr player);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3ac2600f362a5a1e", + "equalIndicator/v1": "06781621800ba7458c9433a4aba2420d3adb72d5b79d56b636fc3db514abeae4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3460, + "startColumn": 38, + "charOffset": 105859, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3458, + "startColumn": 1, + "charOffset": 105621, + "charLength": 431, + "snippet": { + "text": "\tmsg.add(std::min(player->getHealth(), std::numeric_limits::max()));\r\n\tmsg.add(std::min(player->getMaxHealth(), std::numeric_limits::max()));\r\n\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\r\n\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\r\n\tmsg.addByte(player->getSoul());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "88664f2a0ab8d8e9", + "equalIndicator/v1": "069a82498b0f12f701fbcc681c79e5a056d093ab8d5c6222ee1654af4df0405e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 597, + "startColumn": 8, + "charOffset": 14733, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 595, + "startColumn": 1, + "charOffset": 14631, + "charLength": 220, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetWrapableTo(lua_State* L) {\r\n\t// itemType:getWrapableTo()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->wrapableTo);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "10376e1f2c882f79", + "equalIndicator/v1": "06a4796f652f83eaeb7e6291b777cb996a89f5b28b50d6a9b47c8b440cc987ae" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1206, + "startColumn": 40, + "charOffset": 35367, + "charLength": 5, + "snippet": { + "text": "value" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1204, + "startColumn": 1, + "charOffset": 35288, + "charLength": 134, + "snippet": { + "text": "\t\tvalue = iType.sellPrice * count;\r\n\t}\r\n\tg_metrics().addCounter(\"player_loot\", value, { { \"player\", getName() } });\r\n\r\n\tif (client) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f538737986a781eb", + "equalIndicator/v1": "06bc7882725be6017c1397e3765a42a74fe975fc84e3a97bb6a862721d4d1b7b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2535, + "startColumn": 35, + "charOffset": 75781, + "charLength": 7, + "snippet": { + "text": "manaMax" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2533, + "startColumn": 1, + "charOffset": 75662, + "charLength": 232, + "snippet": { + "text": "\t\t} else {\r\n\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\r\n\t\t\tmanaMax = std::max(0, manaMax - vocation->getManaGain());\r\n\t\t\tcapacity = std::max(0, capacity - vocation->getCapGain());\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "90c8270af225201d", + "equalIndicator/v1": "06cabf517114f142f1620baee4d61a400d9d2416d4e14f890959037851b8387f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6921, + "startColumn": 29, + "charOffset": 240347, + "charLength": 36, + "snippet": { + "text": "(damage.primary.value * damageBonus)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6919, + "startColumn": 1, + "charOffset": 240212, + "charLength": 264, + "snippet": { + "text": "\t\t\tint32_t damageBonus = attackerPlayer->wheel()->checkDivineGrenade(target);\r\n\t\t\tif (damageBonus != 0) {\r\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\r\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b5f7f55592b5f38b", + "equalIndicator/v1": "06d275c181a1264484c3f7d38415abcf9861c2b24ec01b9a42fa57be9b686e5f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'protocol' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'protocol' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/outputmessage.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 38, + "startColumn": 60, + "charOffset": 1114, + "charLength": 8, + "snippet": { + "text": "protocol" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 36, + "startColumn": 1, + "charOffset": 1050, + "charLength": 134, + "snippet": { + "text": "}\r\n\r\nvoid OutputMessagePool::addProtocolToAutosend(Protocol_ptr protocol) {\r\n\t// dispatcher thread\r\n\tif (bufferedProtocols.empty()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1f54ac55acd1575e", + "equalIndicator/v1": "06dfd02f58b12fb8cbaffce8c4c929afde424ed633c98c80c990ed984b092949" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 507, + "startColumn": 65, + "charOffset": 18047, + "charLength": 5, + "snippet": { + "text": "party" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 505, + "startColumn": 1, + "charOffset": 17978, + "charLength": 208, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPartyOnShareExperience(std::shared_ptr party, uint64_t &exp) {\r\n\t// Party:onShareExperience(exp) or Party.onShareExperience(self, exp)\r\n\tif (info.partyOnShareExperience == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a7140ac1e8b56e8b", + "equalIndicator/v1": "06eeadc3dc6337818258f9701e63a0f7329a462ad16ad2b890b5e83184b8d58e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7831, + "startColumn": 90, + "charOffset": 273772, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7829, + "startColumn": 1, + "charOffset": 273678, + "charLength": 294, + "snippet": { + "text": "}\r\n\r\nvoid Game::addCreatureHealth(const CreatureVector &spectators, std::shared_ptr target) {\r\n\tuint8_t healthPercent = std::ceil((static_cast(target->getHealth()) / std::max(target->getMaxHealth(), 1)) * 100);\r\n\tif (const auto &targetPlayer = target->getPlayer()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c961c67199f109c4", + "equalIndicator/v1": "071cbf6851b71eaf6e3142e771ec76dbcbd0e8a7173cc78d07e3a1ff28f60541" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1387, + "startColumn": 36, + "charOffset": 41694, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1385, + "startColumn": 1, + "charOffset": 41544, + "charLength": 185, + "snippet": { + "text": "\tvoid sendPartyCreatureHealth(std::shared_ptr creature, uint8_t healthPercent) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPartyCreatureHealth(creature, healthPercent);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "598b35dfcd0ce73d", + "equalIndicator/v1": "072c98d28dc4bf571af1aa0bd0b020ea880013f875093135c6cadd75b2543683" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2419, + "startColumn": 2, + "charOffset": 64769, + "charLength": 31, + "snippet": { + "text": "// player:addFamiliar(lookType)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2417, + "startColumn": 1, + "charOffset": 64707, + "charLength": 178, + "snippet": { + "text": "\r\nint PlayerFunctions::luaPlayerAddFamiliar(lua_State* L) {\r\n\t// player:addFamiliar(lookType)\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (player) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2741f6a7a7d47447", + "equalIndicator/v1": "073c858d29882621f023b5cb0d862a7e031102260a3182c53f299aa79bc50e23" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'", + "markdown": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 228, + "startColumn": 11, + "charOffset": 7041, + "charLength": 4, + "snippet": { + "text": "Item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 226, + "startColumn": 1, + "charOffset": 6982, + "charLength": 99, + "snippet": { + "text": "\tvirtual std::shared_ptr clone() const;\r\n\r\n\tvirtual ~Item() = default;\r\n\r\n\t// non-assignable\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fb4db60a48ccf4cd", + "equalIndicator/v1": "0749f465c408e854065ad8e1d599b8a236d7b88b1be675c80e0f8c31c3e2ccf0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'long double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'long double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5995, + "startColumn": 71, + "charOffset": 176107, + "charLength": 11, + "snippet": { + "text": "nextReqMana" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5993, + "startColumn": 1, + "charOffset": 176006, + "charLength": 210, + "snippet": { + "text": "\r\n\t\toldSkillValue = magLevel;\r\n\t\toldPercentToNextLevel = static_cast(manaSpent * 100) / nextReqMana;\r\n\r\n\t\tg_events().eventPlayerOnGainSkillTries(static_self_cast(), SKILL_MAGLEVEL, tries);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1b5373c7c59290bb", + "equalIndicator/v1": "0750f06a273e8bc4b10c62fd3f7554a746d2b1befefdda08b3747f2d1b9d11ef" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 669, + "startColumn": 72, + "charOffset": 18279, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 667, + "startColumn": 1, + "charOffset": 18203, + "charLength": 173, + "snippet": { + "text": "}\r\n\r\nvoid ConditionAttributes::updatePercentBuffs(std::shared_ptr creature) {\r\n\tfor (int32_t i = BUFF_FIRST; i <= BUFF_LAST; ++i) {\r\n\t\tif (buffsPercent[i] == 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "851b1112a7d2f171", + "equalIndicator/v1": "07c21d88685e187fe8120b6b7c738fa38d78f95f6b95afadb810b2df4c24837d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9129, + "startColumn": 46, + "charOffset": 319098, + "charLength": 10, + "snippet": { + "text": "totalPrice" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9127, + "startColumn": 1, + "charOffset": 318985, + "charLength": 230, + "snippet": { + "text": "\r\n\t\tplayer->setBankBalance(player->getBankBalance() + totalPrice);\r\n\t\tg_metrics().addCounter(\"balance_increase\", totalPrice, { { \"player\", player->getName() }, { \"context\", \"market_sale\" } });\r\n\r\n\t\tif (it.id == ITEM_STORE_COIN) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "056c5308e6614045", + "equalIndicator/v1": "07e165b7eb5f845b4bad3f842883de2d53f31703ffcfc58e890f00d5c0b804d6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4243, + "startColumn": 107, + "charOffset": 127988, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4241, + "startColumn": 1, + "charOffset": 127844, + "charLength": 242, + "snippet": { + "text": "\t\t\tcheckLootContainers(container);\r\n\r\n\t\t\tif (container->isRemoved() || !Position::areInRange<1, 1, 0>(getPosition(), container->getPosition())) {\r\n\t\t\t\tautoCloseContainers(container);\r\n\t\t\t} else if (container->getTopParent() == getPlayer()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c7e779ffb1cb6f54", + "equalIndicator/v1": "07e283abb932206ed9ef9a3884a55159dd5aa0eb06b4969fec9fa92b62bbddbb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 420, + "startColumn": 2, + "charOffset": 15144, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 418, + "startColumn": 1, + "charOffset": 15137, + "charLength": 46, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3e635c284111b6a8", + "equalIndicator/v1": "07e58e32a1c7e112ec3bdb9d1c651b621ae8176cce47494bcf48d643e248fee4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5571, + "startColumn": 17, + "charOffset": 165216, + "charLength": 17, + "snippet": { + "text": "getReflectPercent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5569, + "startColumn": 1, + "charOffset": 165195, + "charLength": 195, + "snippet": { + "text": "}\r\n\r\nint32_t Player::getReflectPercent(CombatType_t combat, bool useCharges) const {\r\n\tint32_t result = reflectPercent[combatTypeToIndex(combat)];\r\n\tfor (const auto &item : getEquippedItems()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "da04b22833ce20ac", + "equalIndicator/v1": "07fa49c1f5c2a0780d0f7c99aa847f8984385d67a66a7921a5aab77581dfffc8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1266, + "startColumn": 67, + "charOffset": 38882, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1264, + "startColumn": 1, + "charOffset": 38811, + "charLength": 166, + "snippet": { + "text": "}\r\n\r\nvoid Creature::onAttackedCreatureKilled(std::shared_ptr target) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (target != getCreature()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ec1e2bf11bfb7dc4", + "equalIndicator/v1": "0807724d2d2f0305c3c57a8efeffcadc9ef64cd912f3e73f5b36f4f3a18f77a7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 953, + "startColumn": 46, + "charOffset": 36402, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 951, + "startColumn": 1, + "charOffset": 36302, + "charLength": 164, + "snippet": { + "text": "\tgetScriptInterface()->pushFunction(getScriptId());\r\n\r\n\tLuaScriptInterface::pushUserdata(L, player);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4d3603f67e1a7519", + "equalIndicator/v1": "080821f3ea35efafcb90d48eb60eb8d27c738299ac62c5b843a02fdbfcd8fde6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 361, + "startColumn": 4, + "charOffset": 11945, + "charLength": 88, + "snippet": { + "text": "case COMBAT_EARTHDAMAGE:\r\n\t\t\t\tdefaultMap[2] -= static_cast(elementEntry.second)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 359, + "startColumn": 1, + "charOffset": 11865, + "charLength": 212, + "snippet": { + "text": "\t\t\t\tdefaultMap[1] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_EARTHDAMAGE:\r\n\t\t\t\tdefaultMap[2] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_ENERGYDAMAGE:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8b1a976cd675bbd5", + "equalIndicator/v1": "086094af625c027cc201956132ca11d8fc4b84ed4a80f3fa8b5c6170442b7db7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1450, + "startColumn": 75, + "charOffset": 42486, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1448, + "startColumn": 1, + "charOffset": 42407, + "charLength": 163, + "snippet": { + "text": "}\r\n\r\nvoid Player::onApplyImbuement(Imbuement* imbuement, std::shared_ptr item, uint8_t slot, bool protectionCharm) {\r\n\tif (!imbuement || !item) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2015631eb94159b5", + "equalIndicator/v1": "086344ca59176339eb59d7539168694b0d44062b3faad3cd604f87618aa5cff9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6420, + "startColumn": 74, + "charOffset": 202823, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6418, + "startColumn": 1, + "charOffset": 202745, + "charLength": 180, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendPartyCreatureShowStatus(std::shared_ptr target, bool showStatus) {\r\n\tuint32_t cid = target->getID();\r\n\tif (!knownCreatureSet.contains(cid)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c4f268dfd1190c63", + "equalIndicator/v1": "0868448f3ec99464ce58af247c0f16de31fbebad708b1d3b061ab3654e49663d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1763, + "startColumn": 2, + "charOffset": 61475, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1761, + "startColumn": 1, + "charOffset": 61468, + "charLength": 47, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface->resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3c3aa44548f42d7d", + "equalIndicator/v1": "088de07babefd850fa90173a2fe2ce7e9b8f280234438b1de70d67e91b8ebaca" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Ilist', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Ilist', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/arraylist.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 39, + "startColumn": 40, + "charOffset": 1094, + "charLength": 6, + "snippet": { + "text": "_Ilist" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 37, + "startColumn": 1, + "charOffset": 1048, + "charLength": 95, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tvoid assign(std::initializer_list _Ilist) {\r\n\t\t\tbackContainer.assign(_Ilist);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bd3cafddfcf745fc", + "equalIndicator/v1": "08e5bd95e89dd02893ce96af8d2676fcbec4f596cdb7589dad03e2899ff015b5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1635, + "startColumn": 7, + "charOffset": 57272, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1633, + "startColumn": 1, + "charOffset": 57128, + "charLength": 367, + "snippet": { + "text": "void TileCallback::onTileCombat(std::shared_ptr creature, std::shared_ptr tile) const {\r\n\t// onTileCombat(creature, pos)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[TileCallback::onTileCombat - Creature {} type {} on tile x: {} y: {} z: {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "62871b09f3ebfa9c", + "equalIndicator/v1": "09460b9d35ad96adb78c056aa359f5e752935cfdd439365c613aed8f66327cf0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The value returned by this function should not be disregarded; neglecting it may lead to errors", + "markdown": "The value returned by this function should not be disregarded; neglecting it may lead to errors" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 84, + "startColumn": 3, + "charOffset": 2556, + "charLength": 6, + "snippet": { + "text": "socket" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 82, + "startColumn": 1, + "charOffset": 2526, + "charLength": 247, + "snippet": { + "text": "\r\n\t\tstd::error_code error;\r\n\t\tsocket.shutdown(asio::ip::tcp::socket::shutdown_both, error);\r\n\t\tif (error && error != asio::error::not_connected) {\r\n\t\t\tg_logger().error(\"[Connection::closeSocket] - Failed to shutdown socket: {}\", error.message());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "79f105fffed4660a", + "equalIndicator/v1": "0954ad40d06ba04b0a29362d5d09a683b1e2834fdb0ee7d04c2eedf0087ac8ad" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1056, + "startColumn": 6, + "charOffset": 38069, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1054, + "startColumn": 1, + "charOffset": 38033, + "charLength": 173, + "snippet": { + "text": "\tlua_pushnumber(L, rawExp);\r\n\r\n\tif (scriptInterface.protectedCall(L, 4, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b4bb8ceafe503766", + "equalIndicator/v1": "09682e4e976e7defb3537fd552faa4da62993182de8e3be80b2e2fe564e4db16" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 644, + "startColumn": 76, + "charOffset": 20860, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 642, + "startColumn": 1, + "charOffset": 20780, + "charLength": 180, + "snippet": { + "text": "}\r\n\r\nCombatDamage Combat::applyImbuementElementalDamage(std::shared_ptr attackerPlayer, std::shared_ptr item, CombatDamage damage) {\r\n\tif (!item) {\r\n\t\treturn damage;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e8494bd102a7bf15", + "equalIndicator/v1": "097968014b5a54eed184a625122a0e87f722840b94fb821afe9c989f014176a4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 555, + "startColumn": 9, + "charOffset": 17961, + "charLength": 13, + "snippet": { + "text": "elementDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 553, + "startColumn": 1, + "charOffset": 17897, + "charLength": 84, + "snippet": { + "text": "\r\nint16_t WeaponMelee::getElementDamageValue() const {\r\n\treturn elementDamage;\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5c8cc08005e6a389", + "equalIndicator/v1": "09cced22fc1823d1304908fad120e02c09c761f85c8a79bc090cdf28f834b628" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getCharmPoints' can be made const", + "markdown": "Method 'getCharmPoints' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1937, + "startColumn": 11, + "charOffset": 57253, + "charLength": 14, + "snippet": { + "text": "getCharmPoints" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1935, + "startColumn": 1, + "charOffset": 57206, + "charLength": 93, + "snippet": { + "text": "\t\titemPriceMap[itemId] = price;\r\n\t}\r\n\tuint32_t getCharmPoints() {\r\n\t\treturn charmPoints;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6ae25befbb098402", + "equalIndicator/v1": "09e77b2911ff3840134fbb8ed766baebcb382c680383b78edc6d57ca63514943" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 832, + "startColumn": 2, + "charOffset": 31832, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 830, + "startColumn": 1, + "charOffset": 31825, + "charLength": 52, + "snippet": { + "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d28dec2cdb324626", + "equalIndicator/v1": "09f01ce3f2b8933100951f63cdce3ef5a9cddbaa2ed97634e42c76de9f7c9cef" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 288, + "startColumn": 64, + "charOffset": 10193, + "charLength": 7, + "snippet": { + "text": "percent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 286, + "startColumn": 1, + "charOffset": 10041, + "charLength": 279, + "snippet": { + "text": "\t\t\t\t\t\tuint32_t percent = std::min(100, pugi::cast(attr.value()));\r\n\r\n\t\t\t\t\t\timbuement.absorbPercent[combatTypeToIndex(combatType)] = percent;\r\n\t\t\t\t\t} else if (strcasecmp(effecttype.c_str(), \"speed\") == 0) {\r\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"value\"))) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "52d28152b378f983", + "equalIndicator/v1": "0a124a464cb135f89a4d862583e2deb4b1325a276e316ada2f48d2d30c91b42a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getRequiredLevel' can be made const", + "markdown": "Method 'getRequiredLevel' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 220, + "startColumn": 11, + "charOffset": 7159, + "charLength": 16, + "snippet": { + "text": "getRequiredLevel" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 218, + "startColumn": 1, + "charOffset": 7132, + "charLength": 72, + "snippet": { + "text": "\t\tslot = s;\r\n\t}\r\n\tuint32_t getRequiredLevel() {\r\n\t\treturn reqLevel;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a873fc30c21cbaed", + "equalIndicator/v1": "0a4bc7604f8a06fc04d886d8dac4d74398f272151e119d494171f7120d27af3d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2576, + "startColumn": 44, + "charOffset": 76964, + "charLength": 14, + "snippet": { + "text": "nextLevelCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2574, + "startColumn": 1, + "charOffset": 76915, + "charLength": 116, + "snippet": { + "text": "\t}\r\n\r\n\tdouble_t result = round(((count * 100.) / nextLevelCount) * 100.) / 100.;\r\n\tif (result > 100) {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3d3b6b21c26ddf7a", + "equalIndicator/v1": "0a7f1522a8644c003b8ef39dad44df733f0e9b70f20ed5b7ff73a2813b30e3f0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1168, + "startColumn": 7, + "charOffset": 44429, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1166, + "startColumn": 1, + "charOffset": 44304, + "charLength": 278, + "snippet": { + "text": "\r\nbool EventCallback::zoneBeforeCreatureLeave(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneBeforeCreatureLeave - \"\r\n\t\t \"Zone {} Creature {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c8ea6676a4f89d52", + "equalIndicator/v1": "0a84645430e7d6e77141794be5fe90173e7ecd3c30282bda61d3eaf55bc9ad2d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: text", + "markdown": "Constructor does not initialize these fields: text" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 22, + "startColumn": 8, + "charOffset": 569, + "charLength": 9, + "snippet": { + "text": "BasicItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 543, + "charLength": 89, + "snippet": { + "text": "\r\n#pragma pack(1)\r\nstruct BasicItem {\r\n\tstd::string text;\r\n\t// size_t description { 0 };\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "79d31b2df980bcc7", + "equalIndicator/v1": "0a969a7631d2c70d583fe0d2b252a2c6242e56ed4ed946aa2f8b23b7fe0db406" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 751, + "startColumn": 53, + "charOffset": 24677, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 749, + "startColumn": 1, + "charOffset": 24620, + "charLength": 180, + "snippet": { + "text": "}\r\n\r\nuint32_t Spell::getManaCost(std::shared_ptr player) const {\r\n\tWheelSpellGrade_t spellGrade = player->wheel()->getSpellUpgrade(getName());\r\n\tuint32_t manaRedution = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dd1a6915dd614028", + "equalIndicator/v1": "0aa8565d32f49a75d949fe8d264a57292d28d5a74c02f7f4febc2747635ea169" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 437, + "startColumn": 59, + "charOffset": 13087, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 435, + "startColumn": 1, + "charOffset": 13024, + "charLength": 221, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::StepInField(std::shared_ptr creature, std::shared_ptr item, const Position &) {\r\n\tif (creature == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::StepInField] - Creature is nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7fce00f72210a3e2", + "equalIndicator/v1": "0aaef74e5734f0dca60fdb1345b190442d8ba43ea9d8fba55f4a9f069cdb4374" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3132, + "startColumn": 2, + "charOffset": 96031, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3130, + "startColumn": 1, + "charOffset": 95920, + "charLength": 227, + "snippet": { + "text": "void ProtocolGame::parseMarketAcceptOffer(NetworkMessage &msg) {\r\n\tuint32_t timestamp = msg.get();\r\n\tuint16_t counter = msg.get();\r\n\tuint16_t amount = msg.get();\r\n\tif (amount > 0 && counter > 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "00594876d401ec76", + "equalIndicator/v1": "0aaf62ed3b4d898322754c00a99fc959af2a5413dc1b7cb5928c04ae3adeea9e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 961, + "startColumn": 7, + "charOffset": 34630, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 959, + "startColumn": 1, + "charOffset": 34618, + "charLength": 154, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnTradeRequest - \"\r\n\t\t \"Player {} target {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5f1fe7ce1e25b319", + "equalIndicator/v1": "0ab4cbc2a4b8ce7444e225d12fc18ee9a7019358d592b87f67bff0733983ce91" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 226, + "startColumn": 10, + "charOffset": 6438, + "charLength": 7, + "snippet": { + "text": "maxBeds" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 224, + "startColumn": 1, + "charOffset": 6396, + "charLength": 57, + "snippet": { + "text": "\r\n\tint32_t getMaxBeds() const {\r\n\t\treturn maxBeds;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f8d9b1d2d3b27bd1", + "equalIndicator/v1": "0ac3c84f6c168997f85a0c3968c37fe6e4119c3cc207b8e3d1d504470a59f7d8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 321, + "startColumn": 8, + "charOffset": 7987, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 319, + "startColumn": 1, + "charOffset": 7889, + "charLength": 214, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetCapacity(lua_State* L) {\r\n\t// itemType:getCapacity()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->maxItems);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c9148f75a60de6b9", + "equalIndicator/v1": "0acb0db6585dd2b5f2dcc19b801c4a238dc66c03ab7825f7fdfddc937af621d4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2128, + "startColumn": 2, + "charOffset": 65386, + "charLength": 15, + "snippet": { + "text": "HighscoreType_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2126, + "startColumn": 1, + "charOffset": 65379, + "charLength": 154, + "snippet": { + "text": "\t}\r\n\r\n\tHighscoreType_t type = static_cast(msg.getByte());\r\n\tuint8_t category = msg.getByte();\r\n\tuint32_t vocation = msg.get();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a2b9f3e86e896e88", + "equalIndicator/v1": "0ae459f987fc84989e7fad9ab8e5ac75c8466e4ad19a80daec04bbd5ccad1c67" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1205, + "startColumn": 29, + "charOffset": 35480, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1203, + "startColumn": 1, + "charOffset": 35349, + "charLength": 151, + "snippet": { + "text": "\tvoid sendCreatureIcon(std::shared_ptr creature) {\r\n\t\tif (client && !client->oldProtocol) {\r\n\t\t\tclient->sendCreatureIcon(creature);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0099d96430b2168e", + "equalIndicator/v1": "0b1813f2db8c84333de5287c12e8b3a9b753e75f033a98fda7c630caacaba5d6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'initBoolValue' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'initBoolValue' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 22, + "startColumn": 52, + "charOffset": 812, + "charLength": 10, + "snippet": { + "text": "const bool" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 589, + "charLength": 295, + "snippet": { + "text": "\tCustomAttribute(const std::string &initStringKey, const std::string &initStringValue);\r\n\tCustomAttribute(const std::string &initStringKey, const double initDoubleValue);\r\n\tCustomAttribute(const std::string &initStringKey, const bool initBoolValue);\r\n\r\n\tconst std::string &getStringKey() const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aa87e150ff0c0731", + "equalIndicator/v1": "0b37b47d4f3f9be212b766e5e66c8766e9a65683070be0781e4949b9ff3731c6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'mType' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'mType' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 274, + "startColumn": 112, + "charOffset": 8790, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 272, + "startColumn": 1, + "charOffset": 8674, + "charLength": 246, + "snippet": { + "text": "}\r\n\r\nvoid SpawnMonster::scheduleSpawn(uint32_t spawnMonsterId, spawnBlock_t &sb, const std::shared_ptr mType, uint16_t interval, bool startup /*= false*/) {\r\n\tif (interval <= 0) {\r\n\t\tspawnMonster(spawnMonsterId, sb, mType, startup);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "934945c6a3a7c265", + "equalIndicator/v1": "0b38cbdabe599194ee31e04f4cb78cd7220a0845977a0b8d614811aa2b2b6b70" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7726, + "startColumn": 37, + "charOffset": 270238, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7724, + "startColumn": 1, + "charOffset": 270195, + "charLength": 193, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tauto manaLoss = std::min(target->getMana(), -manaChange);\r\n\t\tBlockType_t blockType = target->blockHit(attacker, COMBAT_MANADRAIN, manaLoss);\r\n\t\tif (blockType != BLOCK_NONE) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "990cc4809476c65e", + "equalIndicator/v1": "0b3f45de831b3797b8f1973e92e6a9a808d06f4978975d85f400a4022f17c88e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'isPremium' can be made const", + "markdown": "Method 'isPremium' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 97, + "startColumn": 7, + "charOffset": 2494, + "charLength": 9, + "snippet": { + "text": "isPremium" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 95, + "startColumn": 1, + "charOffset": 2482, + "charLength": 49, + "snippet": { + "text": "\t}\r\n\r\n\tbool isPremium() {\r\n\t\treturn premium;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e5eae05015f86ece", + "equalIndicator/v1": "0b6582080d2295196e1b9ac337ad41ad98a9a7a9a25d41c13bd0c6b306fb1bd6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 242, + "startColumn": 8, + "charOffset": 6009, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 240, + "startColumn": 1, + "charOffset": 5919, + "charLength": 198, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetName(lua_State* L) {\r\n\t// itemType:getName()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushString(L, itemType->name);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75e2ee8c1bf2c493", + "equalIndicator/v1": "0b6c95013135a2ff74b136bc4cdc49d1baa149659e6563798b9577c3b26538cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 670, + "startColumn": 61, + "charOffset": 21370, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 668, + "startColumn": 1, + "charOffset": 21305, + "charLength": 248, + "snippet": { + "text": "}\r\n\r\nvoid Spell::applyCooldownConditions(std::shared_ptr player) const {\r\n\tWheelSpellGrade_t spellGrade = player->wheel()->getSpellUpgrade(getName());\r\n\tbool isUpgraded = getWheelOfDestinyUpgraded() && static_cast(spellGrade) > 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7ed1dac496045d96", + "equalIndicator/v1": "0b98c22b49c93456978dc1278186d399931b355974e156a9369da58180499a2e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 202, + "startColumn": 80, + "charOffset": 5668, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 200, + "startColumn": 1, + "charOffset": 5584, + "charLength": 128, + "snippet": { + "text": "}\r\n\r\nbool House::kickPlayer(std::shared_ptr player, std::shared_ptr target) {\r\n\tif (!target) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "80a718ba540240fc", + "equalIndicator/v1": "0bb94f7e97fcffb357cf1ea3a1a4165635693c419cff8dd2f371fb1af48af44f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 902, + "startColumn": 52, + "charOffset": 29271, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 900, + "startColumn": 1, + "charOffset": 29215, + "charLength": 127, + "snippet": { + "text": "}\r\n\r\nvoid Creature::drainMana(std::shared_ptr attacker, int32_t manaLoss) {\r\n\tonAttacked();\r\n\tchangeMana(-manaLoss);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "477499c93ecc2d51", + "equalIndicator/v1": "0bcef6c1eb6a13fcce508d31fbefc96b6d6d0b2ecf82dc88f36e895b5ec0edfa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1291, + "startColumn": 55, + "charOffset": 42847, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1289, + "startColumn": 1, + "charOffset": 42788, + "charLength": 305, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatHealth(std::shared_ptr caster, const Position &position, const std::unique_ptr &area, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tapplyExtensions(caster, nullptr, damage, params);\r\n\tconst auto origin = caster ? caster->getPosition() : Position();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bdf62cbfe2911424", + "equalIndicator/v1": "0be179621848755f2de485a89a55d84e521c513bd7a2cded9c27490cfe5d0458" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 958, + "startColumn": 27, + "charOffset": 30747, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 956, + "startColumn": 1, + "charOffset": 30715, + "charLength": 129, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\r\n\tenv->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6e25960ca0312694", + "equalIndicator/v1": "0c03eb26a70d6b7fea2f866fbd0a66ce110f00cbb0d88c656dc4f57b6d30115b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use '= default' to define a trivial destructor", + "markdown": "Use '= default' to define a trivial destructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/creaturecallback.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 3, + "charOffset": 662, + "charLength": 16, + "snippet": { + "text": "CreatureCallback" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 486, + "charLength": 248, + "snippet": { + "text": "\tCreatureCallback(LuaScriptInterface* scriptInterface, std::shared_ptr targetCreature) :\r\n\t\tscriptInterface(scriptInterface), m_targetCreature(targetCreature) {};\r\n\t~CreatureCallback() { }\r\n\r\n\tbool startScriptInterface(int32_t scriptId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a0163640bc7684f4", + "equalIndicator/v1": "0c17e6b8eb5dd14fdfe11c882da5659ddc9d9de57b1b869133c681ba996f7f69" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 792, + "startColumn": 57, + "charOffset": 25774, + "charLength": 11, + "snippet": { + "text": "attackSkill" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 790, + "startColumn": 1, + "charOffset": 25659, + "charLength": 176, + "snippet": { + "text": "\r\n\tint32_t minValue = std::round(player->getLevel() / 5);\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue) / 2;\r\n\r\n\tif (target) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "113ea4f52e25822c", + "equalIndicator/v1": "0c76009ca120775e5773ec14ea73a215a392963e78bec811159019cfb5420b2c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 853, + "startColumn": 17, + "charOffset": 25475, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 851, + "startColumn": 1, + "charOffset": 25454, + "charLength": 231, + "snippet": { + "text": "}\r\n\r\nvoid Container::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tstd::shared_ptr topParent = getTopParent();\r\n\tif (topParent->getCreature()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bf5a9dedb4e861e5", + "equalIndicator/v1": "0c8df03f11773a7f170cf6d0636190ead4eac2ce80fda9ce030a3cbb68a8c5f3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 740, + "startColumn": 27, + "charOffset": 23123, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 738, + "startColumn": 1, + "charOffset": 23091, + "charLength": 129, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\r\n\tenv->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a39dee61e517bbc9", + "equalIndicator/v1": "0c972b1f975c846ae34a24d3d9c71d18c43bd4f4ecbcb757ac6329416f2993ad" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1298, + "startColumn": 23, + "charOffset": 43349, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1296, + "startColumn": 1, + "charOffset": 43178, + "charLength": 246, + "snippet": { + "text": "\r\nvoid Combat::doCombatMana(std::shared_ptr caster, std::shared_ptr target, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tdoCombatMana(caster, target, caster ? caster->getPosition() : Position(), damage, params);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1f21b7b3709c816c", + "equalIndicator/v1": "0c9ba9f1fc8c6653cfb1e0d58d1df30ce81d8181db2fa081343b5b9320dedd03" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getLockerItemsAndCountById' can be made const", + "markdown": "Method 'getLockerItemsAndCountById' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7016, + "startColumn": 65, + "charOffset": 207407, + "charLength": 26, + "snippet": { + "text": "getLockerItemsAndCountById" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7014, + "startColumn": 1, + "charOffset": 207338, + "charLength": 305, + "snippet": { + "text": "}\r\n\r\nstd::pair>, uint16_t> Player::getLockerItemsAndCountById(const std::shared_ptr &depotLocker, uint8_t tier, uint16_t itemId) {\r\n\tstd::vector> lockerItems;\r\n\tauto [itemVector, itemMap] = requestLockerItems(depotLocker, false, tier);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0b53e62203e503f1", + "equalIndicator/v1": "0cc2ba6090f2321688016ad11e234b99cc0f575fe894ec7429fff3f25a32bdcf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 393, + "startColumn": 8, + "charOffset": 9789, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 391, + "startColumn": 1, + "charOffset": 9693, + "charLength": 211, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetDefense(lua_State* L) {\r\n\t// itemType:getDefense()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->defense);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "491791f0f961f478", + "equalIndicator/v1": "0cd296c964b98891c7d06bbbcc9cb1916dd4cb0e7a9ff687acc6613ac7885197" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly", + "markdown": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2379, + "startColumn": 61, + "charOffset": 90428, + "charLength": 12, + "snippet": { + "text": "__FUNCTION__" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2377, + "startColumn": 1, + "charOffset": 90284, + "charLength": 187, + "snippet": { + "text": "\t\tauto autoContainer = Item::CreateItem(autoContainerId);\r\n\t\tif (!autoContainer) {\r\n\t\t\tg_logger().error(\"[{}] Failed to create auto container\", __FUNCTION__);\r\n\t\t\treturn toCylinder;\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "673525a785ee75b1", + "equalIndicator/v1": "0cd77114bf16ea63df97c39f55bc47c602f3998758021c6d28763eb0a46276bb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'door' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'door' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 405, + "startColumn": 43, + "charOffset": 11850, + "charLength": 4, + "snippet": { + "text": "door" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 403, + "startColumn": 1, + "charOffset": 11803, + "charLength": 128, + "snippet": { + "text": "}\r\n\r\nvoid House::addDoor(std::shared_ptr door) {\r\n\tdoorList.push_back(door);\r\n\tdoor->setHouse(static_self_cast());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3252cbc4676141cd", + "equalIndicator/v1": "0d275a7a4cb904fd5b4b3ed2bb82f89862d893905603dc136da7da70506e553c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'guild' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'guild' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioguild.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 36, + "startColumn": 54, + "charOffset": 1366, + "charLength": 5, + "snippet": { + "text": "guild" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 34, + "startColumn": 1, + "charOffset": 1308, + "charLength": 94, + "snippet": { + "text": "}\r\n\r\nvoid IOGuild::saveGuild(const std::shared_ptr guild) {\r\n\tif (!guild) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "66b08e2e4d664535", + "equalIndicator/v1": "0d35fc20a6dc1db927591a91cf6d10cc63a7084f78f6ea518a16fdd786c8e960" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use nullptr", + "markdown": "Use nullptr" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 399, + "startColumn": 61, + "charOffset": 12120, + "charLength": 4, + "snippet": { + "text": "NULL" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 397, + "startColumn": 1, + "charOffset": 12039, + "charLength": 198, + "snippet": { + "text": "\t\treturn false;\r\n\t}\r\n\tauto isContainerAndHasSomethingInside = (getContainer() != NULL) && (getContainer()->getItemList().size() > 0);\r\n\treturn (isStowable() || isContainerAndHasSomethingInside);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c6790fb62f6eb56e", + "equalIndicator/v1": "0d36666e79b6e08850eb1b237f15f1c03fb06d511da8a7b16a4f6efab264b43f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 501, + "startColumn": 33, + "charOffset": 14387, + "charLength": 9, + "snippet": { + "text": "spectator" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 499, + "startColumn": 1, + "charOffset": 14319, + "charLength": 239, + "snippet": { + "text": "\t// send to client\r\n\tsize_t i = 0;\r\n\tfor (std::shared_ptr spectator : spectators) {\r\n\t\tif (std::shared_ptr tmpPlayer = spectator->getPlayer()) {\r\n\t\t\ttmpPlayer->sendRemoveTileThing(cylinderMapPos, oldStackPosVector[i++]);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1cb413ff4b6f3a5d", + "equalIndicator/v1": "0d60f30d25703e7f4e5ce47a5149d332a3bdcd97784b8f1fd09919ea76b60d2e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 424, + "startColumn": 85, + "charOffset": 15278, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 422, + "startColumn": 1, + "charOffset": 15182, + "charLength": 194, + "snippet": { + "text": "\r\n// Party\r\nbool Events::eventPartyOnJoin(std::shared_ptr party, std::shared_ptr player) {\r\n\t// Party:onJoin(player) or Party.onJoin(self, player)\r\n\tif (info.partyOnJoin == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e63a2ba4874f48a8", + "equalIndicator/v1": "0d702d55a575747be4afafc8cd12e2752fb2f89a58b28517b75c1ae14bb14fda" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 18, + "startColumn": 22, + "charOffset": 606, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 16, + "startColumn": 1, + "charOffset": 552, + "charLength": 247, + "snippet": { + "text": "#include \"map/spectators.hpp\"\r\n\r\nReturnValue Mailbox::queryAdd(int32_t, const std::shared_ptr &thing, uint32_t, uint32_t, std::shared_ptr) {\r\n\tstd::shared_ptr item = thing->getItem();\r\n\tif (item && Mailbox::canSend(item)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "96225abee62a7a35", + "equalIndicator/v1": "0d8a0fbb8b71c45ec992414c411a49297e21561f9db9c4e359171e9bdb03b5af" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2645, + "startColumn": 47, + "charOffset": 99712, + "charLength": 8, + "snippet": { + "text": "cylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2643, + "startColumn": 1, + "charOffset": 99661, + "charLength": 195, + "snippet": { + "text": "}\r\n\r\nvoid Game::addMoney(std::shared_ptr cylinder, uint64_t money, uint32_t flags /*= 0*/) {\r\n\tif (cylinder == nullptr) {\r\n\t\tg_logger().error(\"[{}] cylinder is nullptr\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1e938265e7859d1a", + "equalIndicator/v1": "0d99d672b74230b5e9ca9766aae537c9374fd998b746206bb0a705fcb0542bf3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1974, + "startColumn": 2, + "charOffset": 60483, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1972, + "startColumn": 1, + "charOffset": 60422, + "charLength": 159, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseRemoveVip(NetworkMessage &msg) {\r\n\tuint32_t guid = msg.get();\r\n\tg_game().playerRequestRemoveVip(player->getID(), guid);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "11f027a087cef3f5", + "equalIndicator/v1": "0d9f422cd0bdfda969381a822ce786ed41571e5c5abf60ede0621c67479e1a69" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1257, + "startColumn": 55, + "charOffset": 41453, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1255, + "startColumn": 1, + "charOffset": 41394, + "charLength": 344, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatHealth(std::shared_ptr caster, std::shared_ptr target, const Position &origin, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\r\n\tif ((caster && target)\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6938b1dacdf0e0ab", + "equalIndicator/v1": "0dc8175d1d31997b0d6c304583cfb5b4384c78bc494835b0b4c635fda2cc197a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 446, + "startColumn": 15, + "charOffset": 12729, + "charLength": 18, + "snippet": { + "text": "onAttackedCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 444, + "startColumn": 1, + "charOffset": 12576, + "charLength": 328, + "snippet": { + "text": "\tvoid onTickCondition(ConditionType_t type, bool &bRemove);\r\n\tvirtual void onCombatRemoveCondition(std::shared_ptr condition);\r\n\tvirtual void onAttackedCreature(std::shared_ptr) { }\r\n\tvirtual void onAttacked();\r\n\tvirtual void onAttackedCreatureDrainHealth(std::shared_ptr target, int32_t points);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2909a10601ae0fa9", + "equalIndicator/v1": "0dd154510c6cb741380df6ab7e9ac118617c12efded28197c89ce3f76c1f37bb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 548, + "startColumn": 2, + "charOffset": 14591, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 546, + "startColumn": 1, + "charOffset": 14496, + "charLength": 235, + "snippet": { + "text": "\tdouble amount = getNumber(L, 4);\r\n\tuint16_t subType = getNumber(L, 5, 1);\r\n\tuint16_t actionId = getNumber(L, 6, 0);\r\n\tbool ignoreCap = getBoolean(L, 7, false);\r\n\tbool inBackpacks = getBoolean(L, 8, false);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "db9da1af80666057", + "equalIndicator/v1": "0dfc7a66c308a20a10ed2b768b61f0bd0e8627684abfa27a1f0b934053462dbc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 146, + "startColumn": 2, + "charOffset": 5063, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 144, + "startColumn": 1, + "charOffset": 5056, + "charLength": 72, + "snippet": { + "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n\treturn returnValue;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ab11e86e2a7eede2", + "equalIndicator/v1": "0e6c674d27b097a9748117d80f63047bde799980b20aed4f1e22432efaf754b7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 321, + "startColumn": 2, + "charOffset": 11929, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 319, + "startColumn": 1, + "charOffset": 11922, + "charLength": 52, + "snippet": { + "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f87715c6cc3a1f8d", + "equalIndicator/v1": "0e75527bd55a0df678cb494132be89c73f2209483699d33febf8d24fb4af4603" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 630, + "startColumn": 16, + "charOffset": 16948, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 628, + "startColumn": 1, + "charOffset": 16914, + "charLength": 128, + "snippet": { + "text": "\t\t\tcontinue;\r\n\t\t}\r\n\t\tsetAbsorb(i, std::round((100 - creature->getAbsorbPercent(indexToCombatType(i))) * value / 100.f));\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "249547746ac118e0", + "equalIndicator/v1": "0e7e00e1b2e03259bd496af8edd4b7da941fe35413f27f7e9dcdf2772c89267e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 479, + "startColumn": 21, + "charOffset": 11272, + "charLength": 14, + "snippet": { + "text": "creatureVector" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 477, + "startColumn": 1, + "charOffset": 11246, + "charLength": 73, + "snippet": { + "text": "\t}\r\n\r\n\tlua_createtable(L, creatureVector->size(), 0);\r\n\r\n\tint index = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "55382831522e71a4", + "equalIndicator/v1": "0e7e494983ea12eed51c3578b8ce41790ff597b6e2bcef5485aa2eb8c772eebd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 285, + "startColumn": 41, + "charOffset": 10590, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 283, + "startColumn": 1, + "charOffset": 10544, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "50dd218cbc8d9cf1", + "equalIndicator/v1": "0e84443c4d240465e7887e009d1c638a48bb08f8fca0830ad42894008f52259a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1531, + "startColumn": 12, + "charOffset": 43807, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1529, + "startColumn": 1, + "charOffset": 43791, + "charLength": 209, + "snippet": { + "text": "}\r\n\r\nvoid Tile::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tauto spectators = Spectators().find(getPosition(), true);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d6442d4db6bdaf17", + "equalIndicator/v1": "0e8dc867581e9fb7833cf55068f2fb3b77ddb2d13a91f3557e830522ac2d565e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 73, + "startColumn": 7, + "charOffset": 2387, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 71, + "startColumn": 1, + "charOffset": 2241, + "charLength": 308, + "snippet": { + "text": "\r\nReturnValue EventCallback::creatureOnAreaCombat(std::shared_ptr creature, std::shared_ptr tile, bool aggressive) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnAreaCombat - \"\r\n\t\t \"Creature {} on tile position {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ffa1b1c114f07897", + "equalIndicator/v1": "0ea2a432bde10ec0f17245026f15ba3df4f01221a5d119e7194ed91d7dc790ef" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1910, + "startColumn": 67, + "charOffset": 55164, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1908, + "startColumn": 1, + "charOffset": 55093, + "charLength": 150, + "snippet": { + "text": "}\r\n\r\nstd::string Item::parseImbuementDescription(std::shared_ptr item) {\r\n\tstd::ostringstream s;\r\n\tif (item && item->getImbuementSlot() >= 1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "46c2dc1579318a12", + "equalIndicator/v1": "0ec9082c837b92ef94d35bb3d33b8357a44beabda0ed83f06dc4132de7b6bc3c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6865, + "startColumn": 15, + "charOffset": 215068, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6863, + "startColumn": 1, + "charOffset": 215007, + "charLength": 99, + "snippet": { + "text": "\tmsg.addByte(cid);\r\n\tmsg.add(slot);\r\n\tAddItem(msg, item);\r\n\twriteToOutputBuffer(msg);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e3af63bcdd716b5d", + "equalIndicator/v1": "0f2f5c7333cd5b0968c5b4f98f0306aba5b0529fee12ce74b95582e0d27b4bc3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 612, + "startColumn": 40, + "charOffset": 18563, + "charLength": 10, + "snippet": { + "text": "resultList" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 610, + "startColumn": 1, + "charOffset": 18458, + "charLength": 167, + "snippet": { + "text": "\t\t\tif (!resultList.empty()) {\r\n\t\t\t\tauto it = resultList.begin();\r\n\t\t\t\tstd::advance(it, uniform_random(0, resultList.size() - 1));\r\n\t\t\t\treturn selectTarget(*it);\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "13820499c8017c55", + "equalIndicator/v1": "0f3d47117b912efd01448a9f085d5afd33251ecd5bb4fcf45070b3e8ec099cae" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 242, + "startColumn": 32, + "charOffset": 6889, + "charLength": 7, + "snippet": { + "text": "bedItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 240, + "startColumn": 1, + "charOffset": 6839, + "charLength": 140, + "snippet": { + "text": "\r\n\tint index = 0;\r\n\tfor (std::shared_ptr bedItem : beds) {\r\n\t\tpushUserdata(L, bedItem);\r\n\t\tsetItemMetatable(L, -1, bedItem);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f1d8a51783378faf", + "equalIndicator/v1": "0f697e3cddaf4d0a7389875b768d3129f6008895f5e6a0cd078c3018f2ceb6fb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1329, + "startColumn": 53, + "charOffset": 44738, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1327, + "startColumn": 1, + "charOffset": 44681, + "charLength": 303, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatMana(std::shared_ptr caster, const Position &position, const std::unique_ptr &area, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tapplyExtensions(caster, nullptr, damage, params);\r\n\tconst auto origin = caster ? caster->getPosition() : Position();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9309a671f5bbe613", + "equalIndicator/v1": "0f6eed27d3240ef31b72010db345c1f0950b50b83f67f3f8145898b036457bfd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 966, + "startColumn": 7, + "charOffset": 36837, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 964, + "startColumn": 1, + "charOffset": 36695, + "charLength": 266, + "snippet": { + "text": "\r\nbool EventCallback::playerOnRotateItem(std::shared_ptr player, std::shared_ptr item, const Position &position) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[{}] Call stack overflow\", __FUNCTION__);\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a40499dea31e72d3", + "equalIndicator/v1": "0f88d9f4621fd5304fff8ac6f9fcad4bb29cf85af99adf8df1ee970fe7dd2dc1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7968, + "startColumn": 69, + "charOffset": 250476, + "charLength": 6, + "snippet": { + "text": "corpse" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7966, + "startColumn": 1, + "charOffset": 250403, + "charLength": 171, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendKillTrackerUpdate(std::shared_ptr corpse, const std::string &name, const Outfit_t creatureOutfit) {\r\n\tif (oldProtocol) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c7e500db557bf79b", + "equalIndicator/v1": "0f93c585d775b2f8e5315900e0e6962c1b62e88fcf6b810f2c1dc1ae4080ff65" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 102, + "startColumn": 59, + "charOffset": 3467, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 100, + "startColumn": 1, + "charOffset": 3403, + "charLength": 147, + "snippet": { + "text": "\t}\r\n\r\n\tbool playerCanUseItemOnHouseTile(std::shared_ptr player, std::shared_ptr item) {\r\n\t\tif (!player || !item) {\r\n\t\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "73f9471c3a9efdd4", + "equalIndicator/v1": "0ff137a7fd5d9711f14353f87b0741a722ef95b0ecf2f319a4f7684a542c5480" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 786, + "startColumn": 56, + "charOffset": 25544, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 784, + "startColumn": 1, + "charOffset": 25484, + "charLength": 210, + "snippet": { + "text": "}\r\n\r\nvoid Combat::CombatDispelFunc(std::shared_ptr, std::shared_ptr target, const CombatParams ¶ms, CombatDamage*) {\r\n\tif (target) {\r\n\t\ttarget->removeCombatCondition(params.dispelType);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "35081e79b2a0d47b", + "equalIndicator/v1": "0fffe54367d15494c0bf91485736743522fe0444f69cb5947d1fcd7442c11bc9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 44, + "startColumn": 16, + "charOffset": 1122, + "charLength": 16, + "snippet": { + "text": "internalAddThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 42, + "startColumn": 1, + "charOffset": 1102, + "charLength": 81, + "snippet": { + "text": "}\r\n\r\nvoid Cylinder::internalAddThing(uint32_t, std::shared_ptr) {\r\n\t//\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9b5b5c08bec6f5c5", + "equalIndicator/v1": "101cfc334f1eca8b10164e058ed29336efc49013711c7228e6a2fbf7f245ad81" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1374, + "startColumn": 61, + "charOffset": 41145, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1372, + "startColumn": 1, + "charOffset": 41080, + "charLength": 158, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::GetTileDescription(std::shared_ptr tile, NetworkMessage &msg) {\r\n\tif (oldProtocol) {\r\n\t\tmsg.add(0x00); // Env effects\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb5edd2108ae9083", + "equalIndicator/v1": "103c4d0fd6727d7c673347423cfa3c36ebeb0ea7a4c50e15a6b41b7caa6915b3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'compareItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'compareItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 242, + "startColumn": 41, + "charOffset": 8114, + "charLength": 11, + "snippet": { + "text": "compareItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 240, + "startColumn": 1, + "charOffset": 8069, + "charLength": 105, + "snippet": { + "text": "}\r\n\r\nbool Item::equals(std::shared_ptr compareItem) const {\r\n\tif (!compareItem) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c8346e0f12156595", + "equalIndicator/v1": "103e01350dcda241138a9084ce69857cf4d38a446d4ff5a24db65a2bc0df7823" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'getRewardsFromContainer' is within a recursive call chain", + "markdown": "Function 'getRewardsFromContainer' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1329, + "startColumn": 44, + "charOffset": 39149, + "charLength": 23, + "snippet": { + "text": "getRewardsFromContainer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1327, + "startColumn": 1, + "charOffset": 39101, + "charLength": 193, + "snippet": { + "text": "}\r\n\r\nstd::vector> Player::getRewardsFromContainer(std::shared_ptr container) const {\r\n\tstd::vector> rewardItemsVector;\r\n\tif (container) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f42be0fc33d2e2ee", + "equalIndicator/v1": "105fd426da3c36297678936842109ad92dcea5e3ad1589b6ea6165731f701a20" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7550, + "startColumn": 64, + "charOffset": 263094, + "charLength": 56, + "snippet": { + "text": "charm->chance + attackerPlayer->getCharmChanceModifier()" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7548, + "startColumn": 1, + "charOffset": 262928, + "charLength": 429, + "snippet": { + "text": "\t activeCharm != CHARM_NONE) {\r\n\t\tconst auto charm = g_iobestiary().getBestiaryCharm(activeCharm);\r\n\t\tint8_t chance = charm->id == CHARM_CRIPPLE ? charm->chance : charm->chance + attackerPlayer->getCharmChanceModifier();\r\n\t\tg_logger().debug(\"charm chance: {}, base: {}, bonus: {}\", chance, charm->chance, attackerPlayer->getCharmChanceModifier());\r\n\t\tif (charm->type == CHARM_OFFENSIVE && (chance >= normal_random(0, 100))) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cac5caffc2d03451", + "equalIndicator/v1": "10b84d1cae216d65a261a2d19a6f3c2d2f937b78b6501da11a613c51ff919c4f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 298, + "startColumn": 93, + "charOffset": 7706, + "charLength": 5, + "snippet": { + "text": "ticks" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 296, + "startColumn": 1, + "charOffset": 7608, + "charLength": 132, + "snippet": { + "text": "\t}\r\n\r\n\treturn createCondition(static_cast(id), static_cast(type), ticks, 0, buff != 0, subId);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "42bccebb473cab30", + "equalIndicator/v1": "10bec48557ea88722a3fefbb734178cce2b35b38832c1839013dc30f18a5d990" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 348, + "startColumn": 18, + "charOffset": 9962, + "charLength": 21, + "snippet": { + "text": "getElementDamageValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 346, + "startColumn": 1, + "charOffset": 9912, + "charLength": 151, + "snippet": { + "text": "\t\treturn params.combatType;\r\n\t}\r\n\tvirtual int16_t getElementDamageValue() const override;\r\n\tvoid setMinChange(int32_t change) {\r\n\t\tminChange = change;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "54111c5c0eeda6de", + "equalIndicator/v1": "110050b93a8d3710fb5f151d50a1441623f1d41445e4ec13b2866b11383d1fb9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 10015, + "startColumn": 8, + "charOffset": 348893, + "charLength": 25, + "snippet": { + "text": "auto [monsterId, monster]" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10013, + "startColumn": 1, + "charOffset": 348740, + "charLength": 272, + "snippet": { + "text": "\t\t// If the forgeable monsters haven't been created\r\n\t\t// Then we'll create them so they don't return in the next if (forgeableMonsters.empty())\r\n\t\tfor (auto [monsterId, monster] : monsters) {\r\n\t\t\tauto monsterTile = monster->getTile();\r\n\t\t\tif (!monster || !monsterTile) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "924506ed2704c1df", + "equalIndicator/v1": "110ad18245f3651a199e6384b8d12d04ea405aa0d6a306382075b21ba753b5a7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 767, + "startColumn": 65, + "charOffset": 29217, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 765, + "startColumn": 1, + "charOffset": 29148, + "charLength": 180, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerStorage(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d1b7ca5264817701", + "equalIndicator/v1": "1135e902e21ab46e30a70f9b31d5fdf7aa33493de52a8f45953bdb9dd5dae30d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 783, + "startColumn": 41, + "charOffset": 30094, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 781, + "startColumn": 1, + "charOffset": 30048, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e239a5fc547feff1", + "equalIndicator/v1": "1158ebadb62572aab46707b1af298e15bd82e05798184fb79e2b640e91dadeb7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 391, + "startColumn": 41, + "charOffset": 14697, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 389, + "startColumn": 1, + "charOffset": 14651, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "887ada9be39af280", + "equalIndicator/v1": "116697cb6f4f128a886ddd93dad0c675138d67e7d67d9d81cbc5d48416efe483" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'newOwner' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'newOwner' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 514, + "startColumn": 94, + "charOffset": 15319, + "charLength": 8, + "snippet": { + "text": "newOwner" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 512, + "startColumn": 1, + "charOffset": 15221, + "charLength": 157, + "snippet": { + "text": "}\r\n\r\nbool House::executeTransfer(std::shared_ptr item, std::shared_ptr newOwner) {\r\n\tif (transferItem != item) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "44e2e600b43e9f95", + "equalIndicator/v1": "11713c70cccfb4d148ac7c9cc12027358a7ec86e176ecb6eb8b23ef92c7e0b21" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'onGainExperience' is within a recursive call chain", + "markdown": "Function 'onGainExperience' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1289, + "startColumn": 16, + "charOffset": 39635, + "charLength": 16, + "snippet": { + "text": "onGainExperience" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1287, + "startColumn": 1, + "charOffset": 39615, + "charLength": 172, + "snippet": { + "text": "}\r\n\r\nvoid Creature::onGainExperience(uint64_t gainExp, std::shared_ptr target) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tauto master = getMaster();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75e323914019e42c", + "equalIndicator/v1": "118e3a24fa79d17ae23b08e65d61b4ce6b25e6ebc1b2fd161d457aff27459498" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float'", + "markdown": "Narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 605, + "startColumn": 59, + "charOffset": 16319, + "charLength": 28, + "snippet": { + "text": "(skillsPercent[skill] - 100)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 603, + "startColumn": 1, + "charOffset": 16201, + "charLength": 165, + "snippet": { + "text": "\r\n\t\tint32_t unmodifiedSkill = player->getBaseSkill(skill);\r\n\t\tskills[skill] = static_cast(unmodifiedSkill * ((skillsPercent[skill] - 100) / 100.f));\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "17bdb40224b0f798", + "equalIndicator/v1": "11a0c529ba3bb1f966183b0bed334a939c04fbd0c3e699f49679b1906ccb2296" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use std::make_unique instead", + "markdown": "Use std::make_unique instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 159, + "startColumn": 13, + "charOffset": 4362, + "charLength": 5, + "snippet": { + "text": "reset" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 157, + "startColumn": 1, + "charOffset": 4139, + "charLength": 368, + "snippet": { + "text": "\t\t\tacceptor.reset(new asio::ip::tcp::acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::address(asio::ip::address_v4::from_string(g_configManager().getString(IP, __FUNCTION__))), serverPort)));\r\n\t\t} else {\r\n\t\t\tacceptor.reset(new asio::ip::tcp::acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::address(asio::ip::address_v4(INADDR_ANY)), serverPort)));\r\n\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d1b644eb69e423e7", + "equalIndicator/v1": "1200409a003768d41a85db9779990b66199eb801a4fcdf96bec3a6df64ff280e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 526, + "startColumn": 8, + "charOffset": 13017, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 524, + "startColumn": 1, + "charOffset": 12921, + "charLength": 211, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetDecayId(lua_State* L) {\r\n\t// itemType:getDecayId()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->decayTo);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3595d2751d68a764", + "equalIndicator/v1": "1228eabedd5d8c4608e98d1f42d77579833fd5eabedd612d634bb721209459f5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'mType' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'mType' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 34, + "startColumn": 53, + "charOffset": 1118, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 32, + "startColumn": 1, + "charOffset": 1061, + "charLength": 142, + "snippet": { + "text": "}\r\n\r\nMonster::Monster(const std::shared_ptr mType) :\r\n\tCreature(),\r\n\tnameDescription(asLowerCaseString(mType->nameDescription)),\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "58d70a9bb55d946b", + "equalIndicator/v1": "122fdb7ff6089e8e94f81ac4d68c9feae912b0c50e7fc76392b43c65e63aeddf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 808, + "startColumn": 20, + "charOffset": 20102, + "charLength": 18, + "snippet": { + "text": "luaItemSetDuration" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 806, + "startColumn": 1, + "charOffset": 20078, + "charLength": 244, + "snippet": { + "text": "}\r\n\r\nint ItemFunctions::luaItemSetDuration(lua_State* L) {\r\n\t// item:setDuration(minDuration, maxDuration = 0, decayTo = 0, showDuration = true)\r\n\t// Example: item:setDuration(10000, 20000, 2129, false) = random duration from range 10000/20000\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "358f1e0127ad7783", + "equalIndicator/v1": "125f89eb1ab2cddd1d3131955295c9aa7e39713ead40d3d0914e963f2b0c9319" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 792, + "startColumn": 89, + "charOffset": 25792, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 790, + "startColumn": 1, + "charOffset": 25699, + "charLength": 255, + "snippet": { + "text": "}\r\n\r\nvoid Combat::CombatNullFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage*) {\r\n\tCombatConditionFunc(caster, target, params, nullptr);\r\n\tCombatDispelFunc(caster, target, params, nullptr);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0ec1d9d7a30d4bbd", + "equalIndicator/v1": "12743b06c0cb50ac35327b86485d4346abfa4f84265e85f4f082423d0a66f59d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 61, + "startColumn": 61, + "charOffset": 1693, + "charLength": 5, + "snippet": { + "text": "thing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 59, + "startColumn": 1, + "charOffset": 1628, + "charLength": 125, + "snippet": { + "text": "}\r\n\r\nuint32_t ScriptEnvironment::addThing(std::shared_ptr thing) {\r\n\tif (!thing || thing->isRemoved()) {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d82af4b0f510cdbe", + "equalIndicator/v1": "1286bfea5d455c186adc20984cc1763eba49ffb338b75ac9d6b5cc0681638c77" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1005, + "startColumn": 12, + "charOffset": 27961, + "charLength": 4, + "snippet": { + "text": "zone" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1003, + "startColumn": 1, + "charOffset": 27876, + "charLength": 145, + "snippet": { + "text": "\tlua_createtable(L, static_cast(zones.size()), 0);\r\n\tint index = 0;\r\n\tfor (auto zone : zones) {\r\n\t\tindex++;\r\n\t\tpushUserdata(L, zone);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4462430f479cbac8", + "equalIndicator/v1": "129326ca885278422dab62fb9717409de20f67676de6b0c21632b917cf2fd70f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'creature' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'creature' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1085, + "startColumn": 62, + "charOffset": 31682, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1083, + "startColumn": 1, + "charOffset": 31612, + "charLength": 255, + "snippet": { + "text": "\t\t}\r\n\t}\r\n\tvoid sendUpdateTileCreature(const std::shared_ptr creature) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendUpdateTileCreature(creature->getPosition(), creature->getTile()->getClientIndexOfCreature(static_self_cast(), creature), creature);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71b309b996bfd431", + "equalIndicator/v1": "12a033ec8869d1fae589a735a22d37977442ae7423de67a96eba40fa0f13e772" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2037, + "startColumn": 96, + "charOffset": 60382, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2035, + "startColumn": 1, + "charOffset": 60282, + "charLength": 172, + "snippet": { + "text": "}\r\n\r\nvoid Player::onRemoveContainerItem(std::shared_ptr container, std::shared_ptr item) {\r\n\tif (tradeState != TRADE_TRANSFER) {\r\n\t\tcheckTradeState(item);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8167981ddf4657f1", + "equalIndicator/v1": "12da16983d01e7acbdc5215890db8314dd8148d3d215bed3dc3ba84ba762fce7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5617, + "startColumn": 63, + "charOffset": 166601, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5615, + "startColumn": 1, + "charOffset": 166534, + "charLength": 117, + "snippet": { + "text": "}\r\n\r\nPartyShields_t Player::getPartyShield(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\treturn SHIELD_NONE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "131b46d7180b1dc8", + "equalIndicator/v1": "130a68b981fe8e1cacd893bd7a772efe62cdfbda5698a8e8d42bdb93d9385886" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1367, + "startColumn": 31, + "charOffset": 41081, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1365, + "startColumn": 1, + "charOffset": 40964, + "charLength": 137, + "snippet": { + "text": "\tvoid sendCreatureHealth(std::shared_ptr creature) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureHealth(creature);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "90efd39277f0c3ff", + "equalIndicator/v1": "131236725241ea8f5787ead29996e9ed6732696ec5101f276f8b4fcdd047ab63" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 723, + "startColumn": 67, + "charOffset": 27951, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 721, + "startColumn": 1, + "charOffset": 27880, + "charLength": 182, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerBosstiary(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6e2a249c34e53c05", + "equalIndicator/v1": "131537fc39cd553f0755d02c7854d97ff1eea94c376a9bd3636f8134f66cdd31" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 142, + "startColumn": 14, + "charOffset": 4031, + "charLength": 13, + "snippet": { + "text": "queryMaxCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 140, + "startColumn": 1, + "charOffset": 3820, + "charLength": 668, + "snippet": { + "text": "\t// cylinder implementations\r\n\tvirtual ReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override final;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6d7f459cad2705eb", + "equalIndicator/v1": "132f39e960a159fa3447700cf9818e8aca59aaf0f00b16e91dabb2840dd20551" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 29, + "startColumn": 14, + "charOffset": 830, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 27, + "startColumn": 1, + "charOffset": 785, + "charLength": 486, + "snippet": { + "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e90294d1ed7a4fd2", + "equalIndicator/v1": "133e0aec4dd5158973d4bd3c1a5a3b5a10486c9b1676251fc03a1bf6e87641de" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 121, + "startColumn": 41, + "charOffset": 4237, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 119, + "startColumn": 1, + "charOffset": 4191, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0db080d49074b3ef", + "equalIndicator/v1": "13747aa3d8cf8ff42f29a5d841dd049d849735fbe81f4af7bcd745c59d26c1bf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 900, + "startColumn": 96, + "charOffset": 28744, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 898, + "startColumn": 1, + "charOffset": 28644, + "charLength": 218, + "snippet": { + "text": "}\r\n\r\nbool InstantSpell::canThrowSpell(std::shared_ptr creature, std::shared_ptr target) const {\r\n\tconst Position &fromPos = creature->getPosition();\r\n\tconst Position &toPos = target->getPosition();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "12de0b1fc2839d64", + "equalIndicator/v1": "13784989bfa5dc27993122fa88847d51df890a4f66729a6884ca926a968d636e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'hmenu' declared with a const-qualified typedef; results in the type being 'HMENU__ *const' instead of 'const HMENU__ *'", + "markdown": "'hmenu' declared with a const-qualified typedef; results in the type being 'HMENU__ \\*const' instead of 'const HMENU__ \\*'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 229, + "startColumn": 14, + "charOffset": 7847, + "charLength": 5, + "snippet": { + "text": "hmenu" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 227, + "startColumn": 1, + "charOffset": 7775, + "charLength": 162, + "snippet": { + "text": "#ifdef OS_WINDOWS\r\n\tconst HWND hwnd = GetConsoleWindow();\r\n\tconst HMENU hmenu = GetSystemMenu(hwnd, FALSE);\r\n\tEnableMenuItem(hmenu, SC_CLOSE, MF_GRAYED);\r\n#endif\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "202ff16d38a98230", + "equalIndicator/v1": "137e1649e71e784b37af3ff0d6e434a0784a2043bb10dfd2a2936469cb978762" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/metrics/metrics.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 187, + "startColumn": 2, + "charOffset": 6878, + "charLength": 20, + "snippet": { + "text": "DEFINE_LATENCY_CLASS" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 185, + "startColumn": 1, + "charOffset": 6870, + "charLength": 162, + "snippet": { + "text": "\t\t}\r\n\r\n\tDEFINE_LATENCY_CLASS(method, \"method\", \"method\");\r\n\tDEFINE_LATENCY_CLASS(lua, \"lua\", \"scope\");\r\n\tDEFINE_LATENCY_CLASS(query, \"query\", \"truncated_query\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8ecbc58b89dcbd85", + "equalIndicator/v1": "137e52dde1846afc2a7429ce1f69c92bfc1a2959ca2107845e83696fa4ce9585" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1136, + "startColumn": 65, + "charOffset": 31658, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1134, + "startColumn": 1, + "charOffset": 31542, + "charLength": 228, + "snippet": { + "text": "\r\nstd::vector>\r\nItem::getDescriptions(const ItemType &it, std::shared_ptr item /*= nullptr*/) {\r\n\tstd::ostringstream ss;\r\n\tstd::vector> descriptions;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c4e2fc6694d20204", + "equalIndicator/v1": "138573f34414dd5743566051f9c08590317efe38ccddaf162c6c3e8b56fe3559" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 85, + "startColumn": 12, + "charOffset": 2788, + "charLength": 9, + "snippet": { + "text": "healthMax" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 83, + "startColumn": 1, + "charOffset": 2666, + "charLength": 282, + "snippet": { + "text": "\t\tmonster->skull = mType->info.skull;\r\n\t\tmonster->health = mType->info.health * mType->getHealthMultiplier();\r\n\t\tmonster->healthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\t\tmonster->baseSpeed = mType->getBaseSpeed();\r\n\t\tmonster->internalLight = mType->info.light;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5b763c8c50de29ef", + "equalIndicator/v1": "139436863c9bdaf03057510af2966c517bcb8e2a4031a09687dd791ee1fca9a1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 769, + "startColumn": 53, + "charOffset": 24324, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 767, + "startColumn": 1, + "charOffset": 24267, + "charLength": 141, + "snippet": { + "text": "}\r\n\r\nvoid Party::addPlayerSupply(std::shared_ptr player, std::shared_ptr item) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ccc674bd46d3883d", + "equalIndicator/v1": "13bc8ed1c4309b7a08661815252ea441c1dcaed22b4f184ed642c8539a683f09" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 884, + "startColumn": 21, + "charOffset": 28142, + "charLength": 15, + "snippet": { + "text": "getWeaponDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 882, + "startColumn": 1, + "charOffset": 28117, + "charLength": 313, + "snippet": { + "text": "}\r\n\r\nint32_t WeaponWand::getWeaponDamage(std::shared_ptr player, std::shared_ptr, std::shared_ptr, bool maxDamage /* = false*/) const {\r\n\tif (!g_configManager().getBoolean(TOGGLE_CHAIN_SYSTEM, __FUNCTION__)) {\r\n\t\t// Returns maximum damage or a random value between minChange and maxChange\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "de96d150e611567c", + "equalIndicator/v1": "13dcdbe150406cfe2a2030340383c57f3efc4f13e7cba50832805492baed7abd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 467, + "startColumn": 27, + "charOffset": 16670, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 465, + "startColumn": 1, + "charOffset": 16638, + "charLength": 123, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.partyOnLeave, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "25da1ac2f1d1054d", + "equalIndicator/v1": "13f67782077dc9ddce73a32e88719699c68cc267bbc2a9e7f4fe03ee53234877" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2700, + "startColumn": 14, + "charOffset": 79830, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2698, + "startColumn": 1, + "charOffset": 79510, + "charLength": 614, + "snippet": { + "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ffb8e3eb0904ae69", + "equalIndicator/v1": "13f69e45d6fafc8276df04531e184b903bf9edffc46d34c920e29b8795a2da86" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Move constructors should be marked noexcept", + "markdown": "Move constructors should be marked noexcept" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 113, + "startColumn": 2, + "charOffset": 2888, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 111, + "startColumn": 1, + "charOffset": 2830, + "charLength": 149, + "snippet": { + "text": "\tItemType &operator=(const ItemType &other) = delete;\r\n\r\n\tItemType(ItemType &&other) = default;\r\n\tItemType &operator=(ItemType &&other) = default;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a798465f00799c30", + "equalIndicator/v1": "13fd2870b3a4043fa09529112c4b4cddd7190a9b6dd4ff85eb87b78d3101b3b4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3093, + "startColumn": 101, + "charOffset": 115178, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3091, + "startColumn": 1, + "charOffset": 115073, + "charLength": 265, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::internalCollectManagedItems(std::shared_ptr player, std::shared_ptr item, ObjectCategory_t category /* = OBJECTCATEGORY_DEFAULT*/, bool isLootContainer /* = true*/) {\r\n\tif (!player || !item) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a418343f262f42f6", + "equalIndicator/v1": "140030301d1e7b73b1f9ba322e5981a4de9f2cb048131f010f1aa9f643e9b8c4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 299, + "startColumn": 8, + "charOffset": 7447, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 297, + "startColumn": 1, + "charOffset": 7351, + "charLength": 211, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetCharges(lua_State* L) {\r\n\t// itemType:getCharges()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->charges);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "778360e0c82e8500", + "equalIndicator/v1": "1419f3b29c98ceeb3d4936fd7369622421aebda52f19acbc70d131b6390e7d50" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 592, + "startColumn": 2, + "charOffset": 13848, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 590, + "startColumn": 1, + "charOffset": 13841, + "charLength": 175, + "snippet": { + "text": "\t}\r\n\r\n\tuint32_t subType = getNumber(L, 3, 1);\r\n\r\n\tstd::shared_ptr item = Item::CreateItem(itemId, std::min(subType, Item::items[itemId].stackSize));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bd927b3657703377", + "equalIndicator/v1": "141c5b3ed1ee08f8fca21d79d8552608d54c01dd743e9aa11487d9c3153caf53" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 651, + "startColumn": 18, + "charOffset": 17590, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 649, + "startColumn": 1, + "charOffset": 17554, + "charLength": 147, + "snippet": { + "text": "\t\t\tcontinue;\r\n\t\t}\r\n\t\tsetIncrease(i, std::round((100 - creature->getIncreasePercent(indexToCombatType(i))) * increasePercentValue / 100.f));\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "36bf79a6fc456ac2", + "equalIndicator/v1": "143c91fc3735b192ea0773244690036e9d5080c15824f3b007f10f903d23a0f7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 313, + "startColumn": 71, + "charOffset": 11248, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 311, + "startColumn": 1, + "charOffset": 11173, + "charLength": 109, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::AddItem(NetworkMessage &msg, std::shared_ptr item) {\r\n\tif (!item) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ee86a8f5dbaadfc8", + "equalIndicator/v1": "14569eddfdae31173c45939f8658cd0a33c9a9ee4c1d45a252cfbb140f9e930d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Move constructor initializes class member by calling a copy constructor", + "markdown": "Move constructor initializes class member by calling a copy constructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 34, + "startColumn": 3, + "charOffset": 933, + "charLength": 5, + "snippet": { + "text": "spell" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 32, + "startColumn": 1, + "charOffset": 820, + "charLength": 181, + "snippet": { + "text": "\tspellBlock_t &operator=(const spellBlock_t &other) = delete;\r\n\tspellBlock_t(spellBlock_t &&other) noexcept :\r\n\t\tspell(other.spell),\r\n\t\tchance(other.chance),\r\n\t\tspeed(other.speed),\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9674191d0666b774", + "equalIndicator/v1": "146accb20dea487aa4b6b735ff7716ac51c4c53c1efae77f53fd1a81145fe418" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3862, + "startColumn": 38, + "charOffset": 115730, + "charLength": 14, + "snippet": { + "text": "amountToRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3860, + "startColumn": 1, + "charOffset": 115559, + "charLength": 210, + "snippet": { + "text": "\t\t// If the item quantity is already needed, remove the quantity and stop the loop\r\n\t\tif (item->getItemAmount() >= amountToRemove) {\r\n\t\t\tg_game().internalRemoveItem(item, amountToRemove);\r\n\t\t\treturn true;\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1ef362c45a00a6b8", + "equalIndicator/v1": "146d67e122ebd92a33e97abd49fbe30d5609bef1c9ccabae2b9088accd6c46f1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'itemIds' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'itemIds' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 385, + "startColumn": 82, + "charOffset": 19872, + "charLength": 27, + "snippet": { + "text": "const std::vector" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 383, + "startColumn": 1, + "charOffset": 19619, + "charLength": 344, + "snippet": { + "text": "\tvoid playerOpenManagedContainer(uint32_t playerId, ObjectCategory_t category, bool isLootContainer);\r\n\tvoid playerSetQuickLootFallback(uint32_t playerId, bool fallback);\r\n\tvoid playerQuickLootBlackWhitelist(uint32_t playerId, QuickLootFilter_t filter, const std::vector itemIds);\r\n\r\n\tvoid playerRequestDepotItems(uint32_t playerId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3d69c24edf3a0d7c", + "equalIndicator/v1": "148079d9a96e7bbbfb08dde39d1cf53e971c27ed78ed857529eedbe2cd2936d8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1340, + "startColumn": 92, + "charOffset": 45479, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1338, + "startColumn": 1, + "charOffset": 45383, + "charLength": 357, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatCondition(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms) {\r\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\r\n\tif ((caster == target || canCombat) && params.impactEffect != CONST_ME_NONE) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "18e036021615f85d", + "equalIndicator/v1": "14d039554f2403dc869afbdfa54cd1c2191dde6198d3777b5fbf1491bee0199b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1259, + "startColumn": 27, + "charOffset": 44803, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1257, + "startColumn": 1, + "charOffset": 44771, + "charLength": 134, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnInventoryUpdate, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "615266a73d3f5a03", + "equalIndicator/v1": "14d8d4c75f5516ea2ee9a205773f4ce3e5286d20ccf9ce8651d01a51825bdf14" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2092, + "startColumn": 8, + "charOffset": 57539, + "charLength": 4, + "snippet": { + "text": "mina" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2090, + "startColumn": 1, + "charOffset": 57411, + "charLength": 191, + "snippet": { + "text": "void ConditionSpeed::getFormulaValues(int32_t var, int32_t &min, int32_t &max) const {\r\n\tint32_t difference = var - 40;\r\n\tmin = mina * difference + minb;\r\n\tmax = maxa * difference + maxb;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c78d53a48c87d48c", + "equalIndicator/v1": "14e323249a761eb6aaa946e5bd51740d3e6ca2bf79aed035c53e21034d0db33b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 339, + "startColumn": 75, + "charOffset": 11764, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 337, + "startColumn": 1, + "charOffset": 11685, + "charLength": 157, + "snippet": { + "text": "}\r\n\r\nstd::vector Imbuements::getImbuements(std::shared_ptr player, std::shared_ptr item) {\r\n\tstd::vector imbuements;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1e52c75ab5939d5a", + "equalIndicator/v1": "14f0768f5cee99cbd8d4d3d702719e29558c8a8e9530169014ae056aebe3e892" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Std::move of the const variable 'initDescription' has no effect; remove std::move() or make the variable non-const", + "markdown": "Std::move of the const variable 'initDescription' has no effect; remove std::move() or make the variable non-const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creatures_definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1403, + "startColumn": 15, + "charOffset": 37043, + "charLength": 9, + "snippet": { + "text": "std::move" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1401, + "startColumn": 1, + "charOffset": 36980, + "charLength": 137, + "snippet": { + "text": "\t\tguid(initGuid),\r\n\t\tname(std::move(initName)),\r\n\t\tdescription(std::move(initDescription)),\r\n\t\ticon(initIcon),\r\n\t\tnotify(initNotify) { }\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b0e7db36be9d28f9", + "equalIndicator/v1": "150214f8efcfe819f6388798effbd41cbc1e96298a50243735ff7d05f94918ab" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1176, + "startColumn": 6, + "charOffset": 41952, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1174, + "startColumn": 1, + "charOffset": 41894, + "charLength": 195, + "snippet": { + "text": "\tLuaScriptInterface::pushCombatDamage(L, damage);\r\n\r\n\tif (scriptInterface.protectedCall(L, 8, 4) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "07b98791f23d6669", + "equalIndicator/v1": "153d17cb538e863e66f8acf83877b196eee08a41fe32f81d7e6a7348f42a5c60" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'item' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'item' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 259, + "startColumn": 37, + "charOffset": 10407, + "charLength": 27, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 257, + "startColumn": 1, + "charOffset": 10177, + "charLength": 325, + "snippet": { + "text": "\tbool internalCreatureSay(std::shared_ptr creature, SpeakClasses type, const std::string &text, bool ghostMode, Spectators* spectatorsPtr = nullptr, const Position* pos = nullptr);\r\n\r\n\tObjectCategory_t getObjectCategory(const std::shared_ptr item);\r\n\tObjectCategory_t getObjectCategory(const ItemType &it);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7712cebfcd93a72b", + "equalIndicator/v1": "1551a079ebd0fef2e576f6a085e94591dcb90519768f8c004baf084656cb5135" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'target' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'target' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 503, + "startColumn": 66, + "charOffset": 27181, + "charLength": 31, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 501, + "startColumn": 1, + "charOffset": 27020, + "charLength": 326, + "snippet": { + "text": "\t// Animation help functions\r\n\tvoid addCreatureHealth(const std::shared_ptr target);\r\n\tstatic void addCreatureHealth(const CreatureVector &spectators, const std::shared_ptr target);\r\n\tvoid addPlayerMana(const std::shared_ptr target);\r\n\tvoid addPlayerVocation(const std::shared_ptr target);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d866c7556d8500da", + "equalIndicator/v1": "15a705a5ccd9db5a154c94612aa1fdca810f87cd83e6b1e81423acf794a9e63d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 310, + "startColumn": 8, + "charOffset": 7718, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 308, + "startColumn": 1, + "charOffset": 7614, + "charLength": 223, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetFluidSource(lua_State* L) {\r\n\t// itemType:getFluidSource()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->fluidSource);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1368264523ad3df6", + "equalIndicator/v1": "15b28b34f3a967ab5fab945dc422c9e5250100d7291e41f354933f81c2035747" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getXpBoostTime' can be made const", + "markdown": "Method 'getXpBoostTime' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1862, + "startColumn": 11, + "charOffset": 55268, + "charLength": 14, + "snippet": { + "text": "getXpBoostTime" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1860, + "startColumn": 1, + "charOffset": 55252, + "charLength": 62, + "snippet": { + "text": "\t}\r\n\r\n\tuint16_t getXpBoostTime() {\r\n\t\treturn xpBoostTime;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0a54feedb4c5e5b4", + "equalIndicator/v1": "15fb7dc6bc960b58d9da6ec40a4cbb680831508f8168e54f2a114c9b3fe1085d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 199, + "startColumn": 15, + "charOffset": 8218, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 197, + "startColumn": 1, + "charOffset": 8065, + "charLength": 311, + "snippet": { + "text": "\r\n\tvirtual void postAddNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r\n\tvirtual void postRemoveNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r\n\r\n\tbool isPushable() override {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4dbd0c2ffb896c0a", + "equalIndicator/v1": "16037eb1713e2b0c7d034834212e4b121efa91f089aabcb811dd6ea46924fd97" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 94, + "startColumn": 68, + "charOffset": 2823, + "charLength": 6, + "snippet": { + "text": "action" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 92, + "startColumn": 1, + "charOffset": 2751, + "charLength": 168, + "snippet": { + "text": "}\r\n\r\nbool Actions::registerLuaActionEvent(const std::shared_ptr action) {\r\n\tauto actionIdVector = action->getActionIdsVector();\r\n\tif (actionIdVector.empty()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bdfa1a4fe6f94292", + "equalIndicator/v1": "16152b628580ca27fab95a054400b28e7836dd02e553fb4865868d497696552b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 438, + "startColumn": 20, + "charOffset": 10366, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 436, + "startColumn": 1, + "charOffset": 10341, + "charLength": 63, + "snippet": { + "text": "\t}\r\n\r\n\tlua_pushnumber(L, tile->getItemCount());\r\n\treturn 1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9c9f7bcb9043ec36", + "equalIndicator/v1": "162476875a0f2cc42e82cb75e50ed01135549e621a3d8eddb67ede64dd248f86" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 44, + "startColumn": 8, + "charOffset": 1232, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 42, + "startColumn": 1, + "charOffset": 1144, + "charLength": 201, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsDoor(lua_State* L) {\r\n\t// itemType:isDoor()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isDoor());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "89262b407d4b0f53", + "equalIndicator/v1": "163aeb80e45083f52f94e59e70738ce5cb4f430d857eb5cf4dfdbd90dcbb6e24" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1299, + "startColumn": 9, + "charOffset": 38471, + "charLength": 5, + "snippet": { + "text": "items" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1297, + "startColumn": 1, + "charOffset": 38445, + "charLength": 61, + "snippet": { + "text": "\t\t\t}\r\n\t\t} else {\r\n\t\t\tn += items->getTopItemCount();\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ec13440e777a08ac", + "equalIndicator/v1": "16529d6c5e432f6b3eb57f7c29da690ebfae9041b4aeb4fc1e783229329ee37b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6840, + "startColumn": 36, + "charOffset": 236682, + "charLength": 6, + "snippet": { + "text": "damage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6838, + "startColumn": 1, + "charOffset": 236517, + "charLength": 298, + "snippet": { + "text": "\tfloat pvpDamageMultiplier = targetDamageReceivedMultiplier * attackerDamageDealtMultiplier * levelDifferenceDamageMultiplier;\r\n\r\n\tdamage.primary.value = std::round(damage.primary.value * pvpDamageMultiplier);\r\n\tdamage.secondary.value = std::round(damage.secondary.value * pvpDamageMultiplier);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c0a0fea28f804dc7", + "equalIndicator/v1": "1655a1d94576ddb110ff6e17620721b31506f593113dd02c072c0586fc80f464" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from '::std::_Common_float_type_t' (aka 'double') to 'float'", + "markdown": "Narrowing conversion from '::std::_Common_float_type_t' (aka 'double') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 347, + "startColumn": 10, + "charOffset": 9843, + "charLength": 10, + "snippet": { + "text": "multiplier" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 345, + "startColumn": 1, + "charOffset": 9742, + "charLength": 154, + "snippet": { + "text": "\tfloat getDefenseMultiplier() const {\r\n\t\tfloat multiplier = mType->getDefenseMultiplier();\r\n\t\treturn multiplier * std::pow(1.02f, getForgeStack());\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4ab7d1751ec71ddf", + "equalIndicator/v1": "16578122a38b99b875610d34edd0663f4f3bb823d629efdfc8643b8054c297a4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 113, + "startColumn": 32, + "charOffset": 3424, + "charLength": 32, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 111, + "startColumn": 1, + "charOffset": 3243, + "charLength": 329, + "snippet": { + "text": "\tbool registerLuaActionEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaUniqueEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaPositionEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaEvent(const std::shared_ptr event);\r\n\tvoid clear(bool isFromXML = false);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "03e81efa061fcf54", + "equalIndicator/v1": "167b247c3604431c98c2d38090d54f2c84fdc026c434212336912fc612c07d74" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6380, + "startColumn": 55, + "charOffset": 220327, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6378, + "startColumn": 1, + "charOffset": 220268, + "charLength": 144, + "snippet": { + "text": "}\r\n\r\nvoid Game::setCreatureSpeed(std::shared_ptr creature, int32_t speed) {\r\n\tcreature->setBaseSpeed(static_cast(speed));\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3df242853b837c55", + "equalIndicator/v1": "16b2c291f0cead58649948201123af703744045fea3fe9014a1b46902d64cc6e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'returnValue' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'returnValue' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 257, + "startColumn": 22, + "charOffset": 9487, + "charLength": 17, + "snippet": { + "text": "const ReturnValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 255, + "startColumn": 1, + "charOffset": 9416, + "charLength": 175, + "snippet": { + "text": "\tvoid sendForgingData();\r\n\tvoid sendOpenForge();\r\n\tvoid sendForgeError(const ReturnValue returnValue);\r\n\tvoid closeForgeWindow();\r\n\tvoid parseForgeEnter(NetworkMessage &msg);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "69d73e110a7280ec", + "equalIndicator/v1": "16d196811271c04bbb0c271ed4e7a9770b877d7d2f8312a9544128c239e0971a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant call to 'c_str'", + "markdown": "Redundant call to 'c_str'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 283, + "startColumn": 22, + "charOffset": 8082, + "charLength": 8, + "snippet": { + "text": "password" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 281, + "startColumn": 1, + "charOffset": 7992, + "charLength": 146, + "snippet": { + "text": "\r\nbool Account::authenticatePassword(const std::string &password) {\r\n\tif (Argon2 {}.argon(password.c_str(), getPassword())) {\r\n\t\treturn true;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c207dcb6bc537774", + "equalIndicator/v1": "16d994a9345f7deaf60256622b6ac7f80a10c07bae39f3948e41b20bdb5ceb5b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5592, + "startColumn": 17, + "charOffset": 165850, + "charLength": 14, + "snippet": { + "text": "getReflectFlat" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5590, + "startColumn": 1, + "charOffset": 165829, + "charLength": 189, + "snippet": { + "text": "}\r\n\r\nint32_t Player::getReflectFlat(CombatType_t combat, bool useCharges) const {\r\n\tint32_t result = reflectFlat[combatTypeToIndex(combat)];\r\n\tfor (const auto &item : getEquippedItems()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "109ebed26f58c37a", + "equalIndicator/v1": "16e3b69b1870299428f7f05dcc3135750955fb94f3f84b6c81d0b120a21fe150" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 137, + "startColumn": 11, + "charOffset": 3813, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 135, + "startColumn": 1, + "charOffset": 3766, + "charLength": 69, + "snippet": { + "text": "\t\t\treturn \"onRecvbyte\";\r\n\t\tdefault:\r\n\t\t\treturn std::string();\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "10a004c155f36b47", + "equalIndicator/v1": "17173f9a9f4c2cdc703495319ab6e87692d7a62607613b790fce6001e7bee766" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Std::move of the const variable 'initName' has no effect; remove std::move() or make the variable non-const", + "markdown": "Std::move of the const variable 'initName' has no effect; remove std::move() or make the variable non-const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creatures_definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1402, + "startColumn": 8, + "charOffset": 37006, + "charLength": 9, + "snippet": { + "text": "std::move" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1400, + "startColumn": 1, + "charOffset": 36847, + "charLength": 244, + "snippet": { + "text": "\tVIPEntry(uint32_t initGuid, const std::string &initName, const std::string &initDescription, uint32_t initIcon, bool initNotify) :\r\n\t\tguid(initGuid),\r\n\t\tname(std::move(initName)),\r\n\t\tdescription(std::move(initDescription)),\r\n\t\ticon(initIcon),\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3719ed87512de548", + "equalIndicator/v1": "172372ec666f9911ff0476c348a272a2038ca18b48bc01ef21f986b1769f49b2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 160, + "startColumn": 3, + "charOffset": 4656, + "charLength": 49, + "snippet": { + "text": "condition->setFormulaVars(mina, minb, maxa, maxb)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 158, + "startColumn": 1, + "charOffset": 4516, + "charLength": 227, + "snippet": { + "text": "\tstd::shared_ptr condition = getUserdataShared(L, 1)->dynamic_self_cast();\r\n\tif (condition) {\r\n\t\tcondition->setFormulaVars(mina, minb, maxa, maxb);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "74209be36f304ca9", + "equalIndicator/v1": "172749740d97c2b7a11976e7e733c6465cf5371e3cef3199cdfceb4f45a732b4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 661, + "startColumn": 15, + "charOffset": 21640, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 659, + "startColumn": 1, + "charOffset": 21600, + "charLength": 101, + "snippet": { + "text": "\t\t\t\tcase 1:\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tchance = std::min(skill, 74) + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a40f7ae37625a585", + "equalIndicator/v1": "172b6a9eaf6ecaaa49ce0a65156f13f6fee98bd89b69c77300c8add909c5cfa9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2440, + "startColumn": 17, + "charOffset": 72637, + "charLength": 8, + "snippet": { + "text": "vocation" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2438, + "startColumn": 1, + "charOffset": 72565, + "charLength": 172, + "snippet": { + "text": "\t\t\tcapacity += noneVocation->getCapGain();\r\n\t\t} else {\r\n\t\t\thealthMax += vocation->getHPGain();\r\n\t\t\thealth += vocation->getHPGain();\r\n\t\t\tmanaMax += vocation->getManaGain();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f185d3b04ec210c4", + "equalIndicator/v1": "172e020845e8aab6ea46e1aa3c8121b66702e6ca5d84411d6990da03546b7c4d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1064, + "startColumn": 98, + "charOffset": 30946, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1062, + "startColumn": 1, + "charOffset": 30821, + "charLength": 236, + "snippet": { + "text": "\t// tile\r\n\t// send methods\r\n\tvoid sendAddTileItem(std::shared_ptr itemTile, const Position &pos, std::shared_ptr item) {\r\n\t\tif (client) {\r\n\t\t\tint32_t stackpos = itemTile->getStackposOfItem(static_self_cast(), item);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fd8503b1c8cd044d", + "equalIndicator/v1": "1731632336120dcf8133b89f1f0ef0bf37be4e126661bc5aeacf8a4d1c766d7b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Where', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Where', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/vectorset.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 67, + "startColumn": 56, + "charOffset": 1746, + "charLength": 6, + "snippet": { + "text": "_Where" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 65, + "startColumn": 1, + "charOffset": 1684, + "charLength": 153, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tconstexpr auto insert(std::vector::const_iterator _Where, const T &_Val) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\treturn container.insert(_Where, _Val);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "77e512ac653b2480", + "equalIndicator/v1": "173772b4925c35187428ef44ca02f6e3d37674fe9802e18329ac15f7b9834563" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4424, + "startColumn": 60, + "charOffset": 159216, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4422, + "startColumn": 1, + "charOffset": 159152, + "charLength": 174, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Game::wrapItem(std::shared_ptr item, std::shared_ptr house) {\r\n\tuint16_t hiddenCharges = 0;\r\n\tuint16_t amount = item->getItemCount();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "88a8c1e7841224e8", + "equalIndicator/v1": "177b0ddb2aeed4d06fe228840a0f28ab1a70d20b0bd069748a9d9460f629ff70" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 296, + "startColumn": 4, + "charOffset": 7596, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 294, + "startColumn": 1, + "charOffset": 7575, + "charLength": 194, + "snippet": { + "text": "\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (auto it = creatures->rbegin(), end = creatures->rend(); it != end; ++it) {\r\n\t\t\t\tif (!(*it)->isInvisible()) {\r\n\t\t\t\t\tstd::shared_ptr player = (*it)->getPlayer();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fa81428f32f9537e", + "equalIndicator/v1": "1781fc8766fd48b5986d6ffd3c9b8a3ed82fb6d01f092492dede7f0b5a5674ed" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1364, + "startColumn": 55, + "charOffset": 46593, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1362, + "startColumn": 1, + "charOffset": 46534, + "charLength": 312, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatDispel(std::shared_ptr caster, const Position &position, const std::unique_ptr &area, const CombatParams ¶ms) {\r\n\tconst auto origin = caster ? caster->getPosition() : Position();\r\n\tCombatFunc(caster, origin, position, area, params, CombatDispelFunc, nullptr);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ae8ee9f227f6f07a", + "equalIndicator/v1": "1799a09932d19c0938dcecaaeae1a8efd3ce6288760cb3ea7377aee692bdb3c1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6604, + "startColumn": 120, + "charOffset": 194173, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6602, + "startColumn": 1, + "charOffset": 193930, + "charLength": 349, + "snippet": { + "text": "\t\t\tif (!g_configManager().getBoolean(TASK_HUNTING_ENABLED, __FUNCTION__)) {\r\n\t\t\t\tslot->state = PreyTaskDataState_Inactive;\r\n\t\t\t} else if (slot->id == PreySlot_Three && !g_configManager().getBoolean(TASK_HUNTING_FREE_THIRD_SLOT, __FUNCTION__)) {\r\n\t\t\t\tslot->state = PreyTaskDataState_Locked;\r\n\t\t\t} else if (slot->id == PreySlot_Two && !isPremium()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8285f6e57fe0aebd", + "equalIndicator/v1": "17aaa5de91782f47c187515ad250c35605733af868f616246ece314d358a02fd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 261, + "startColumn": 114, + "charOffset": 8588, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 259, + "startColumn": 1, + "charOffset": 8470, + "charLength": 179, + "snippet": { + "text": "}\r\n\r\nvoid Weapon::internalUseWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr tile) const {\r\n\tif (isLoadedCallback()) {\r\n\t\tLuaVariant var;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "db653183438ba301", + "equalIndicator/v1": "17e485deca5bcaaa3daa5499b07bb24999eedd28bd223dc7756a7ac03c1a79a0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 438, + "startColumn": 7, + "charOffset": 16490, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 436, + "startColumn": 1, + "charOffset": 16361, + "charLength": 279, + "snippet": { + "text": "\r\nbool EventCallback::playerOnLookInShop(std::shared_ptr player, const ItemType* itemType, uint8_t count) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLookInShop - \"\r\n\t\t \"Player {} itemType {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b3d0d48e39a06e96", + "equalIndicator/v1": "17ec75e7df4c1bfafd10e9d51a4e972cba95aebd0cc937459a51f00dc1b2fbe7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3041, + "startColumn": 56, + "charOffset": 113085, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3039, + "startColumn": 1, + "charOffset": 113025, + "charLength": 269, + "snippet": { + "text": "}\r\n\r\nbool Game::handleFallbackLogic(std::shared_ptr player, std::shared_ptr &lootContainer, ContainerIterator &containerIterator, const bool &fallbackConsumed) {\r\n\tif (fallbackConsumed || !player->quickLootFallbackToMainContainer) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2eb3f52d249e258c", + "equalIndicator/v1": "17f05e8cb36c3289dd8898292469c031d3fc171261672454b63c7648d8b17a3f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 167, + "startColumn": 20, + "charOffset": 5314, + "charLength": 17, + "snippet": { + "text": "luaGameGetPlayers" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 165, + "startColumn": 1, + "charOffset": 5290, + "charLength": 135, + "snippet": { + "text": "}\r\n\r\nint GameFunctions::luaGameGetPlayers(lua_State* L) {\r\n\t// Game.getPlayers()\r\n\tlua_createtable(L, g_game().getPlayersOnline(), 0);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "91c617c26caf3a7e", + "equalIndicator/v1": "181a51b8f870799b9d20e7428cd002fafd55b9ebd0da50685adcde7ae16505ce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'weak_service' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'weak_service' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 143, + "startColumn": 59, + "charOffset": 3842, + "charLength": 12, + "snippet": { + "text": "weak_service" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 141, + "startColumn": 1, + "charOffset": 3779, + "charLength": 162, + "snippet": { + "text": "}\r\n\r\nvoid ServicePort::openAcceptor(std::weak_ptr weak_service, uint16_t port) {\r\n\tif (auto service = weak_service.lock()) {\r\n\t\tservice->open(port);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5d57f2cbe2e4a14a", + "equalIndicator/v1": "18256162ce3d3694ad8677df7a8a69edf1f3d9ecb6bb10a8f000d6523770fae3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1544, + "startColumn": 45, + "charOffset": 46183, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1542, + "startColumn": 1, + "charOffset": 46017, + "charLength": 187, + "snippet": { + "text": "\tvoid sendTradeItemRequest(const std::string &traderName, std::shared_ptr item, bool ack) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendTradeItemRequest(traderName, item, ack);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "15ec5ebff57da5fb", + "equalIndicator/v1": "189799b4544b8d2e9963616e6cda51d47aee0d1e5e7f930c20b804bb9944bcfb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 165, + "startColumn": 66, + "charOffset": 4816, + "charLength": 11, + "snippet": { + "text": "variantName" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 163, + "startColumn": 1, + "charOffset": 4670, + "charLength": 186, + "snippet": { + "text": "\tMonsterType() = default;\r\n\texplicit MonsterType(const std::string &initName) :\r\n\t\tname(initName), typeName(initName), nameDescription(initName), variantName(\"\") {};\r\n\r\n\t// non-copyable\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8af845b66e164e78", + "equalIndicator/v1": "189de310621a7c971f007ae6b0e567ecbc914fb390d5e4b2b2dba7c723906e26" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'podium' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'podium' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1598, + "startColumn": 29, + "charOffset": 47594, + "charLength": 6, + "snippet": { + "text": "podium" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1596, + "startColumn": 1, + "charOffset": 47432, + "charLength": 208, + "snippet": { + "text": "\tvoid sendPodiumWindow(std::shared_ptr podium, const Position &position, uint16_t itemId, uint8_t stackpos) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPodiumWindow(podium, position, itemId, stackpos);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a923fca25636ac9d", + "equalIndicator/v1": "18ba5f62cb6d1deb5a126b85a21f88203728c582cb47852f37234e050730426e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1520, + "startColumn": 68, + "charOffset": 53149, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1518, + "startColumn": 1, + "charOffset": 53016, + "charLength": 207, + "snippet": { + "text": "//**********************************************************//\r\n\r\nuint32_t ValueCallback::getMagicLevelSkill(std::shared_ptr player, const CombatDamage &damage) const {\r\n\tif (!player) {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "605b6510760c01c1", + "equalIndicator/v1": "18daf9fa5be439f7edd6964e9140a6790a4eb2e0c3ac18707457f1b73bc7ad74" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 209, + "startColumn": 19, + "charOffset": 6043, + "charLength": 16, + "snippet": { + "text": "mysql_num_fields" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 207, + "startColumn": 1, + "charOffset": 6007, + "charLength": 122, + "snippet": { + "text": "\thandle = res;\r\n\r\n\tint num_fields = mysql_num_fields(handle);\r\n\r\n\tconst MYSQL_FIELD* fields = mysql_fetch_fields(handle);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8b73e8a41769c1f0", + "equalIndicator/v1": "18f4378ff7f8efb411ded4d7ce19363a0c0be874e46be7bf66014e90bfc2706f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5317, + "startColumn": 46, + "charOffset": 157074, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5315, + "startColumn": 1, + "charOffset": 157024, + "charLength": 110, + "snippet": { + "text": "}\r\n\r\nbool Player::isInWar(std::shared_ptr player) const {\r\n\tif (!player || !guild) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "492790525f0c626d", + "equalIndicator/v1": "190eee4f7827851362d80ae2a8e714bdce908e2782f325ba77e32e9b52510082" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'time_t' (aka 'long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'time_t' (aka 'long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 606, + "startColumn": 2, + "charOffset": 16700, + "charLength": 27, + "snippet": { + "text": "// player:getFreeCapacity()" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 604, + "startColumn": 1, + "charOffset": 16634, + "charLength": 178, + "snippet": { + "text": "\r\nint PlayerFunctions::luaPlayerGetFreeCapacity(lua_State* L) {\r\n\t// player:getFreeCapacity()\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (player) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7fb92bdf7efc5472", + "equalIndicator/v1": "192c866bc9b2b224a510a5eb23937abba1ecb4286061d9b21ab223b59ff611d2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1890, + "startColumn": 50, + "charOffset": 55943, + "charLength": 3, + "snippet": { + "text": "npc" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1888, + "startColumn": 1, + "charOffset": 55889, + "charLength": 140, + "snippet": { + "text": "}\r\n\r\nbool Player::openShopWindow(std::shared_ptr npc, const std::vector &shopItems) {\r\n\tBenchmark brenchmark;\r\n\tif (!npc) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "73ac26877e43a0f5", + "equalIndicator/v1": "194a5eeae53591ecd1ce6a50309579af0d0b43a212117eac469cf06c171b64ff" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 31, + "startColumn": 26, + "charOffset": 1088, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 29, + "startColumn": 1, + "charOffset": 1058, + "charLength": 174, + "snippet": { + "text": "}\r\n\r\nReturnValue TrashHolder::queryRemove(const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr /*= nullptr*/) {\r\n\treturn RETURNVALUE_NOTPOSSIBLE;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5466f40106e4fe84", + "equalIndicator/v1": "194cfc17ea22ee01bbd9c672a66bc1fb898fa4ec165db9c3c400e131680d9895" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8322, + "startColumn": 66, + "charOffset": 288176, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8320, + "startColumn": 1, + "charOffset": 288106, + "charLength": 269, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerCyclopediaCharacterInfo(std::shared_ptr player, uint32_t characterID, CyclopediaCharacterInfoType_t characterInfoType, uint16_t entriesPerPage, uint16_t page) {\r\n\tuint32_t playerGUID = player->getGUID();\r\n\tif (characterID != playerGUID) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "09b73c79007e8cc8", + "equalIndicator/v1": "1967e47e0cb21c8376cfad34774d269716518e6538e3aa633d752120232a03f1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 771, + "startColumn": 11, + "charOffset": 22441, + "charLength": 17, + "snippet": { + "text": "getBaseMagicLevel" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 769, + "startColumn": 1, + "charOffset": 22385, + "charLength": 103, + "snippet": { + "text": "\t\t\treturn manaMax;\r\n\t\tcase STAT_MAGICPOINTS:\r\n\t\t\treturn getBaseMagicLevel();\r\n\t\tdefault:\r\n\t\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "163feca789bf0b17", + "equalIndicator/v1": "19a7cd5ef99fcbf0e822a4bb7a9476e92bd1abee1941c8f0370ccf8f9f982a80" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2934, + "startColumn": 4, + "charOffset": 89723, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2932, + "startColumn": 1, + "charOffset": 89560, + "charLength": 294, + "snippet": { + "text": "\t\tstd::map mtype_list = g_game().getBestiaryList();\r\n\t\tfor (uint16_t monsterCount = 1; monsterCount <= monsterAmount; monsterCount++) {\r\n\t\t\tuint16_t raceid = msg.get();\r\n\t\t\tif (player->getBestiaryKillCount(raceid) > 0) {\r\n\t\t\t\tauto it = mtype_list.find(raceid);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a6da45cdde2eb648", + "equalIndicator/v1": "19f88238dc7f75aad8b6d30aed73bc0c6330a82a4dea9f89584b58be59b43e91" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'sendPlayerPartyIcons' can be made const", + "markdown": "Method 'sendPlayerPartyIcons' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5692, + "startColumn": 14, + "charOffset": 168178, + "charLength": 20, + "snippet": { + "text": "sendPlayerPartyIcons" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5690, + "startColumn": 1, + "charOffset": 168160, + "charLength": 142, + "snippet": { + "text": "}\r\n\r\nvoid Player::sendPlayerPartyIcons(std::shared_ptr player) {\r\n\tsendPartyCreatureShield(player);\r\n\tsendPartyCreatureSkull(player);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "191a7c0f239ab51d", + "equalIndicator/v1": "1a06b07fd46582643073108931ac9736ceee4d54356cbea67f5275d1b359a672" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 495, + "startColumn": 64, + "charOffset": 14744, + "charLength": 9, + "snippet": { + "text": "moveEvent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 493, + "startColumn": 1, + "charOffset": 14676, + "charLength": 263, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::EquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool isCheck) {\r\n\tif (player == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75947f05b7d5e8e9", + "equalIndicator/v1": "1a1dcaf4cd5aab886359739c4662790744b32cfdf829882eec38dc9b488c7d02" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1929, + "startColumn": 61, + "charOffset": 52365, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1927, + "startColumn": 1, + "charOffset": 52300, + "charLength": 208, + "snippet": { + "text": "}\r\n\r\nbool ConditionFeared::getFleePath(std::shared_ptr creature, const Position &pos, std::vector &dirList) {\r\n\tconst std::vector walkSize { 15, 9, 3, 1 };\r\n\tbool found = false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dd36db282bb27f8e", + "equalIndicator/v1": "1a59b1198bc482e95568aced48b67431b4efcfc6f12b89cbac448ddca942e4d2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 201, + "startColumn": 54, + "charOffset": 6643, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 199, + "startColumn": 1, + "charOffset": 6585, + "charLength": 173, + "snippet": { + "text": "}\r\n\r\nbool IOLoginData::savePlayer(std::shared_ptr player) {\r\n\tbool success = DBTransaction::executeWithinTransaction([player]() {\r\n\t\treturn savePlayerGuard(player);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "86af1a5763446da6", + "equalIndicator/v1": "1aa11b1e9fd1f515906c3c8ea6c5ccb0b75c9b7b6d26582e8bd293e7722fdb87" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 763, + "startColumn": 38, + "charOffset": 27435, + "charLength": 10, + "snippet": { + "text": "toCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 761, + "startColumn": 1, + "charOffset": 27343, + "charLength": 149, + "snippet": { + "text": "\r\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\r\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\r\n\r\n\treturn scriptInterface.callFunction(7);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "80fa9e9c5e9fbd63", + "equalIndicator/v1": "1aae59fb50e1b1efe4d60d22c579027e7825a62315d9abe76c886c1d76098c4d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1879, + "startColumn": 51, + "charOffset": 55713, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1877, + "startColumn": 1, + "charOffset": 55633, + "charLength": 128, + "snippet": { + "text": "\tvoid updateUIExhausted();\r\n\r\n\tbool isQuickLootListedItem(std::shared_ptr item) const {\r\n\t\tif (!item) {\r\n\t\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fb8b853c4bd9191c", + "equalIndicator/v1": "1ab17639e668a7af0347e8497b12a763b859af797e17128b31bf5c8a2fce102b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 732, + "startColumn": 60, + "charOffset": 26057, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 730, + "startColumn": 1, + "charOffset": 25993, + "charLength": 445, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnMoveItem(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) {\r\n\t// Player:onMoveItem(item, count, fromPosition, toPosition) or Player.onMoveItem(self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)\r\n\tif (info.playerOnMoveItem == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4766689b6a7a3fc0", + "equalIndicator/v1": "1b10b760543fe38432aaf171524634902f2231ac0c2c76211dee28f844dea0cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 157, + "startColumn": 173, + "charOffset": 4743, + "charLength": 14, + "snippet": { + "text": "damageModifier" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 155, + "startColumn": 1, + "charOffset": 4545, + "charLength": 314, + "snippet": { + "text": "\r\n\t// Calculating damage\r\n\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(level, playerSkill, totalAttack, attackFactor, true) * player->getVocation()->meleeDamageMultiplier * damageModifier / 100);\r\n\tint32_t minDamage = level / 5;\r\n\tint32_t realDamage = normal_random(minDamage, maxDamage);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b955993d7d02c3f4", + "equalIndicator/v1": "1b1b9e64741006f59e8cdb6bdf53a38b6a9349154a9b4c7013cca0c23c9092dc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 989, + "startColumn": 31, + "charOffset": 29518, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 987, + "startColumn": 1, + "charOffset": 29396, + "charLength": 195, + "snippet": { + "text": "\t\t\t\tif (targetChangeTicks >= mType->info.changeTargetSpeed) {\r\n\t\t\t\t\ttargetChangeTicks = 0;\r\n\t\t\t\t\tm_targetChangeCooldown = mType->info.changeTargetSpeed;\r\n\r\n\t\t\t\t\tif (challengeFocusDuration > 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e10599f2e47045c5", + "equalIndicator/v1": "1b2cccc60c84ad7ecfc2a4f216c7e7da9c3fe422a3843e4279fecca67afae1e0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 11, + "charOffset": 1290, + "charLength": 7, + "snippet": { + "text": "npcType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1160, + "charLength": 256, + "snippet": { + "text": "\tcurrentOutfit = npcType->info.outfit;\r\n\tfloat multiplier = g_configManager().getFloat(RATE_NPC_HEALTH, __FUNCTION__);\r\n\thealth = npcType->info.health * multiplier;\r\n\thealthMax = npcType->info.healthMax * multiplier;\r\n\tbaseSpeed = npcType->info.baseSpeed;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "04a577fa6a03204a", + "equalIndicator/v1": "1b30773692ecf29b8f2bdbec36f1655959955e4a8c93661115a262a15c157d17" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 408, + "startColumn": 65, + "charOffset": 15301, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 406, + "startColumn": 1, + "charOffset": 15232, + "charLength": 280, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnLookInTrade(std::shared_ptr player, std::shared_ptr partner, std::shared_ptr item, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLookInTrade - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a2f68bfd0b9f168a", + "equalIndicator/v1": "1b50c8d1e7dbebd1ae63e5550e4b1871dc3866950153a7c81d14114bc39fdda0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1274, + "startColumn": 53, + "charOffset": 37859, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1272, + "startColumn": 1, + "charOffset": 37802, + "charLength": 174, + "snippet": { + "text": "}\r\n\r\nvoid Tile::removeCreature(std::shared_ptr creature) {\r\n\tg_game().map.getMapSector(tilePos.x, tilePos.y)->removeCreature(creature);\r\n\tremoveThing(creature, 0);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e9fc92a381f3dddb", + "equalIndicator/v1": "1b6784819cd828f52550c03dc3671f6ce7d5651361ca7dc5e79b617f123de8f9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 680, + "startColumn": 27, + "charOffset": 21856, + "charLength": 8, + "snippet": { + "text": "cooldown" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 678, + "startColumn": 1, + "charOffset": 21806, + "charLength": 167, + "snippet": { + "text": "\r\n\tif (cooldown > 0) {\r\n\t\tint32_t spellCooldown = cooldown;\r\n\t\tif (isUpgraded) {\r\n\t\t\tspellCooldown -= getWheelOfDestinyBoost(WheelSpellBoost_t::COOLDOWN, spellGrade);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d94f924fb2a19189", + "equalIndicator/v1": "1b80669537b81eadfd69db063ae8393357509511c0cb45371252059e72011b52" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 703, + "startColumn": 2, + "charOffset": 19319, + "charLength": 13, + "snippet": { + "text": "ConditionId_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 701, + "startColumn": 1, + "charOffset": 19248, + "charLength": 306, + "snippet": { + "text": "\r\n\tConditionType_t conditionType = getNumber(L, 2);\r\n\tConditionId_t conditionId = getNumber(L, 3, CONDITIONID_COMBAT);\r\n\tuint32_t subId = getNumber(L, 4, 0);\r\n\tconst std::shared_ptr condition = creature->getCondition(conditionType, conditionId, subId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4eb80efbd9fb919a", + "equalIndicator/v1": "1b9d775f8774d8769c39a19dcde1a9b1fc38f69f664c6aaa3ff14e1c97b803a2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4282, + "startColumn": 55, + "charOffset": 129109, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4280, + "startColumn": 1, + "charOffset": 129001, + "charLength": 177, + "snippet": { + "text": "\r\n// i will keep this function so it can be reviewed\r\nbool Player::updateSaleShopList(std::shared_ptr item) {\r\n\tuint16_t itemId = item->getID();\r\n\tif (!itemId || !item) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6175ee7bca0d2037", + "equalIndicator/v1": "1bc8027cd60f90c87228fed3c99fcc35d794cb38b767e9c8af7356bfcc39f91b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Annotate this function with 'override' or (rarely) 'final'", + "markdown": "Annotate this function with 'override' or (rarely) 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocollogin.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 30, + "startColumn": 7, + "charOffset": 859, + "charLength": 18, + "snippet": { + "text": "onRecvFirstMessage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 28, + "startColumn": 1, + "charOffset": 818, + "charLength": 94, + "snippet": { + "text": "\t\tProtocol(loginConnection) { }\r\n\r\n\tvoid onRecvFirstMessage(NetworkMessage &msg);\r\n\r\nprivate:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b4117c1c3efef1ee", + "equalIndicator/v1": "1c02f13ffb525bb6bba727fd8d6011a42cf646b334f6e42b9b531c8a32200d96" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 779, + "startColumn": 28, + "charOffset": 23275, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 777, + "startColumn": 1, + "charOffset": 23241, + "charLength": 131, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\t\tenv->setScriptId(mType->info.thinkEvent, scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2babb7ee4f231ac9", + "equalIndicator/v1": "1c35a6bc79d8e17e50641a6a4858825f6fb131c921340c743b25f616f50b7737" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 556, + "startColumn": 17, + "charOffset": 26018, + "charLength": 18, + "snippet": { + "text": "parseAbsorbPercent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 554, + "startColumn": 1, + "charOffset": 25997, + "charLength": 214, + "snippet": { + "text": "}\r\n\r\nvoid ItemParse::parseAbsorbPercent(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\r\n\tstd::string stringValue = tmpStrValue;\r\n\tif (stringValue == \"absorbpercentall\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7ef3e9b624cf4344", + "equalIndicator/v1": "1c369f5fbbdab38070f6b3a16e5c7e069d9994efc30381613fb350dc5dc4433c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Result of integer division used in a floating point context; possible loss of precision", + "markdown": "Result of integer division used in a floating point context; possible loss of precision" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 74, + "startColumn": 96, + "charOffset": 2103, + "charLength": 5, + "snippet": { + "text": "level" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 72, + "startColumn": 1, + "charOffset": 1860, + "charLength": 377, + "snippet": { + "text": "int32_t Weapons::getMaxWeaponDamage(uint32_t level, int32_t attackSkill, int32_t attackValue, float attackFactor, bool isMelee) {\r\n\tif (isMelee) {\r\n\t\treturn static_cast(std::round((0.085 * attackFactor * attackValue * attackSkill) + (level / 5)));\r\n\t} else {\r\n\t\treturn static_cast(std::round((0.09 * attackFactor * attackValue * attackSkill) + (level / 5)));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "43918a4e62d920c5", + "equalIndicator/v1": "1c5e4b5a31cb70992d19cd3805f70b9c8a9c2c929c0b9e2ab217475cd1dd3f57" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 941, + "startColumn": 27, + "charOffset": 34002, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 939, + "startColumn": 1, + "charOffset": 33970, + "charLength": 123, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnTurn, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "83d6dde5afc00cfd", + "equalIndicator/v1": "1c6a90477552d7e9356791990cd0401e7321840f58dfb9a3adb3dfbbaf923036" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'connectionWeak' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'connectionWeak' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 395, + "startColumn": 51, + "charOffset": 13913, + "charLength": 14, + "snippet": { + "text": "connectionWeak" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 393, + "startColumn": 1, + "charOffset": 13858, + "charLength": 163, + "snippet": { + "text": "}\r\n\r\nvoid Connection::handleTimeout(ConnectionWeak_ptr connectionWeak, const std::error_code &error) {\r\n\tif (error == asio::error::operation_aborted) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6cc2baf21efd6696", + "equalIndicator/v1": "1c6fe60f12f707b9624ab439da6abedc1b74700b834f25a836821a6910013209" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7367, + "startColumn": 94, + "charOffset": 256472, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7365, + "startColumn": 1, + "charOffset": 256374, + "charLength": 142, + "snippet": { + "text": "}\r\n\r\nvoid Game::updatePlayerPartyHuntAnalyzer(const CombatDamage &damage, std::shared_ptr player) const {\r\n\tif (!player) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fc3fc446b562a951", + "equalIndicator/v1": "1c70365efa2dc75d0276ada3df63388a584e5d42b41d026466af309010a77151" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 251, + "startColumn": 62, + "charOffset": 7932, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 249, + "startColumn": 1, + "charOffset": 7866, + "charLength": 241, + "snippet": { + "text": "}\r\n\r\nReturnValue Actions::internalUseItem(std::shared_ptr player, const Position &pos, uint8_t index, std::shared_ptr item, bool isHotkey) {\r\n\tif (std::shared_ptr door = item->getDoor()) {\r\n\t\tif (!door->canUse(player)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2ad431aa828aab93", + "equalIndicator/v1": "1c7b5a1ba11d4063f956b3547d6f11cffc7c127a33edebd02244f963ac6a54ec" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3057, + "startColumn": 175, + "charOffset": 113759, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3055, + "startColumn": 1, + "charOffset": 113580, + "charLength": 252, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::processMoveOrAddItemToLootContainer(std::shared_ptr item, std::shared_ptr lootContainer, uint32_t &remainderCount, std::shared_ptr player) {\r\n\tstd::shared_ptr moveItem = nullptr;\r\n\tReturnValue ret;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e7df6ec813583d8c", + "equalIndicator/v1": "1c7fa93209099249a6b651f0362a1c757c32fe2563dab30cceb530bbfff551b3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1128, + "startColumn": 47, + "charOffset": 33821, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1126, + "startColumn": 1, + "charOffset": 33770, + "charLength": 210, + "snippet": { + "text": "}\r\n\r\nvoid Monster::pushItems(std::shared_ptr tile, const Direction &nextDirection) {\r\n\t// We can not use iterators here since we can push the item to another tile\r\n\t// which will invalidate the iterator.\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a807b8e346867682", + "equalIndicator/v1": "1ca0c174bfa9516f66be5b458fb7609d1d6cf7eb97e1ba8402dabb215de6201f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2861, + "startColumn": 93, + "charOffset": 106964, + "charLength": 6, + "snippet": { + "text": "corpse" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2859, + "startColumn": 1, + "charOffset": 106867, + "charLength": 172, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerQuickLootCorpse(std::shared_ptr player, std::shared_ptr corpse, const Position &position) {\r\n\tif (!player || !corpse) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a2f17a2bc5f1f5c4", + "equalIndicator/v1": "1cb11e3e2be7c634e56842c9f60c3921e0b52431dc4d152d520e601850d1d516" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 804, + "startColumn": 7, + "charOffset": 25654, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 802, + "startColumn": 1, + "charOffset": 25565, + "charLength": 251, + "snippet": { + "text": "\t// onAddItem(moveitem, tileitem, pos)\r\n\t// onRemoveItem(moveitem, tileitem, pos)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[MoveEvent::executeAddRemItem - \"\r\n\t\t \"Item {} item on tile x: {} y: {} z: {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b54dca5677cf22db", + "equalIndicator/v1": "1cc3d12f47296b366d4647e2fa7012b1ce33f7e55f5e031ea4ff11530c694af8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'isMarketMenuAvailable' can be made const", + "markdown": "Method 'isMarketMenuAvailable' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 579, + "startColumn": 7, + "charOffset": 15840, + "charLength": 21, + "snippet": { + "text": "isMarketMenuAvailable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 577, + "startColumn": 1, + "charOffset": 15807, + "charLength": 85, + "snippet": { + "text": "\t\treturn supplyStash;\r\n\t}\r\n\tbool isMarketMenuAvailable() {\r\n\t\treturn marketMenu;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1022d29540ada967", + "equalIndicator/v1": "1cd6f24177faf7abf852f8656135c3a77141e49ad329780e556c7cf42692f0a6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4441, + "startColumn": 44, + "charOffset": 133696, + "charLength": 17, + "snippet": { + "text": "getLostExperience" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4439, + "startColumn": 1, + "charOffset": 133390, + "charLength": 372, + "snippet": { + "text": "\t\tauto attackerPlayer = attacker->getPlayer();\r\n\t\tif (attackerPlayer && attackerPlayer.get() != this && skillLoss && std::abs(static_cast(attackerPlayer->getLevel() - level)) <= g_configManager().getNumber(EXP_FROM_PLAYERS_LEVEL_RANGE, __FUNCTION__)) {\r\n\t\t\treturn std::max(0, std::floor(getLostExperience() * getDamageRatio(attacker) * 0.75));\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f97ab1b1f76709f6", + "equalIndicator/v1": "1cddd0390501b32da1478576d45c3b9e4f1ba3ff572202c6c870c0529026f5f1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 915, + "startColumn": 13, + "charOffset": 29761, + "charLength": 26, + "snippet": { + "text": "(damage * getMitigation())" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 913, + "startColumn": 1, + "charOffset": 29578, + "charLength": 349, + "snippet": { + "text": "\tif (combatType != COMBAT_MANADRAIN && combatType != COMBAT_LIFEDRAIN && combatType != COMBAT_AGONYDAMAGE) { // Increase mitigate damage\r\n\t\tauto originalDamage = damage;\r\n\t\tdamage -= (damage * getMitigation()) / 100.;\r\n\t\tg_logger().trace(\"[mitigation] creature: {}, original damage: {}, mitigation damage: {}\", getName(), originalDamage, damage);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2b5727131d73bf06", + "equalIndicator/v1": "1ceaddaafcca2a0a9e236277dfcd143d22d10a3584c1ede907603f9a165eced7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 607, + "startColumn": 68, + "charOffset": 21554, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 605, + "startColumn": 1, + "charOffset": 21482, + "charLength": 311, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnLookInBattleList(std::shared_ptr player, std::shared_ptr creature, int32_t lookDistance) {\r\n\t// Player:onLookInBattleList(creature, position, distance) or Player.onLookInBattleList(self, creature, position, distance)\r\n\tif (info.playerOnLookInBattleList == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5a0cfb382596b26b", + "equalIndicator/v1": "1d173f239485adb5e7847ac10174b7a245cf12aa95f7bd87c1987b92b22f12ea" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 16, + "startColumn": 2, + "charOffset": 435, + "charLength": 3, + "snippet": { + "text": "RSA" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 14, + "startColumn": 1, + "charOffset": 412, + "charLength": 56, + "snippet": { + "text": "class RSA {\r\npublic:\r\n\tRSA(Logger &logger);\r\n\t~RSA();\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e77ea38ed92155ec", + "equalIndicator/v1": "1d180653ce03f2e45ffaf880688778f7452f3ea970f8a3784c840ae84cd3e831" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6865, + "startColumn": 85, + "charOffset": 237871, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6863, + "startColumn": 1, + "charOffset": 237749, + "charLength": 260, + "snippet": { + "text": "\r\n// Wheel of destiny combat helpers\r\nvoid Game::applyWheelOfDestinyHealing(CombatDamage &damage, std::shared_ptr attackerPlayer, std::shared_ptr target) {\r\n\tdamage.primary.value += (damage.primary.value * damage.healingMultiplier) / 100.;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "31af5a89ba7eba9f", + "equalIndicator/v1": "1d22736dc1c150267f465fd3ed3b938a36ec0bf44674e3c2180df77df9b2d265" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2818, + "startColumn": 43, + "charOffset": 84125, + "charLength": 6, + "snippet": { + "text": "skills" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2816, + "startColumn": 1, + "charOffset": 84075, + "charLength": 204, + "snippet": { + "text": "\t\t\t}\r\n\r\n\t\t\tskills[i].tries = std::max(0, skills[i].tries - lostSkillTries);\r\n\t\t\tskills[i].percent = Player::getPercentLevel(skills[i].tries, vocation->getReqSkillTries(i, skills[i].level));\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a0989bf301592a00", + "equalIndicator/v1": "1d57cfc13847c2a0a1c4613c7ad2ef65fd27a4c2861386cf527e2cb282f6d694" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'partner' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'partner' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 426, + "startColumn": 46, + "charOffset": 16104, + "charLength": 7, + "snippet": { + "text": "partner" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 424, + "startColumn": 1, + "charOffset": 16004, + "charLength": 165, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r\n\tLuaScriptInterface::pushUserdata(L, partner);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7d2ea91ab23ade66", + "equalIndicator/v1": "1d74ea8c4b6ecf6a45bdd485c763010a6b5346ea9136f56c865b607caf967b73" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 257, + "startColumn": 28, + "charOffset": 6893, + "charLength": 9, + "snippet": { + "text": "sleptTime" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 255, + "startColumn": 1, + "charOffset": 6860, + "charLength": 118, + "snippet": { + "text": "\t}\r\n\r\n\tconst int32_t soulRegen = sleptTime / (60 * 15); // RATE_SOUL_REGEN_SPEED?\r\n\tplayer->changeSoul(soulRegen);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e51fba050f98d96a", + "equalIndicator/v1": "1d8d811affebe79d315683c82ba30ed08cf77c0982c84fab809644a89786ecf3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7403, + "startColumn": 53, + "charOffset": 257811, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7401, + "startColumn": 1, + "charOffset": 257633, + "charLength": 320, + "snippet": { + "text": "void Game::sendMessages(\r\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\r\n\tconst Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetPlayer,\r\n\tTextMessage &message, const CreatureVector &spectators, int32_t realDamage\r\n) const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "99f8a7d019707827", + "equalIndicator/v1": "1d9b75312423c8303ea99bd92dddcbd2a2827bd8b0a4b9c90ef2f104e60d9597" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 891, + "startColumn": 12, + "charOffset": 23708, + "charLength": 8, + "snippet": { + "text": "uint64_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 889, + "startColumn": 1, + "charOffset": 23691, + "charLength": 191, + "snippet": { + "text": "\t}\r\n\r\n\tif (const uint64_t writtenDate = getAttribute(ItemAttribute_t::DATE)) {\r\n\t\tpropWriteStream.write(ATTR_WRITTENDATE);\r\n\t\tpropWriteStream.write(writtenDate);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5ad2881659567fb2", + "equalIndicator/v1": "1dd05075695e6632209873011cc6ef452ba2b99b4cec2dbe41eb853f196276cf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 68, + "startColumn": 45, + "charOffset": 1949, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 66, + "startColumn": 1, + "charOffset": 1900, + "charLength": 200, + "snippet": { + "text": "}\r\n\r\nvoid Decay::stopDecay(std::shared_ptr item) {\r\n\tif (item->hasAttribute(ItemAttribute_t::DECAYSTATE)) {\r\n\t\tauto timestamp = item->getAttribute(ItemAttribute_t::DURATION_TIMESTAMP);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "79d2a9d6def445ce", + "equalIndicator/v1": "1dd6fad53e782d869a3e1a9f399e109c33102c541fa01dd89453109abb288ff4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 523, + "startColumn": 41, + "charOffset": 17439, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 521, + "startColumn": 1, + "charOffset": 17393, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0206377db9847d8b", + "equalIndicator/v1": "1de5431e50dc1be97e7a3b63271601ecbb3ec3a055cbc12eb0b7c7063fa3e748" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8441, + "startColumn": 4, + "charOffset": 267128, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8439, + "startColumn": 1, + "charOffset": 267046, + "charLength": 195, + "snippet": { + "text": "\t\tcase SUPPLY_STASH_ACTION_STOW_ITEM: {\r\n\t\t\tPosition pos = msg.getPosition();\r\n\t\t\tuint16_t itemId = msg.get();\r\n\t\t\tuint8_t stackpos = msg.getByte();\r\n\t\t\tuint32_t count = msg.getByte();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2681e71e970e3283", + "equalIndicator/v1": "1e0660c72ccd1a9665231be154ecfb540113ae39c294aae5f005694f9320ab0f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 292, + "startColumn": 54, + "charOffset": 9023, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 290, + "startColumn": 1, + "charOffset": 8965, + "charLength": 274, + "snippet": { + "text": "}\r\n\r\nvoid IOPrey::parsePreyAction(std::shared_ptr player, PreySlot_t slotId, PreyAction_t action, PreyOption_t option, int8_t index, uint16_t raceId) const {\r\n\tconst auto &slot = player->getPreySlotById(slotId);\r\n\tif (!slot || slot->state == PreyDataState_Locked) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "58f2a89703c4ae1b", + "equalIndicator/v1": "1e0ff4234047f8775c810ad2389af1833373f4103de1fe110f8140a3d26ad239" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 894, + "startColumn": 2, + "charOffset": 34114, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 892, + "startColumn": 1, + "charOffset": 34107, + "charLength": 52, + "snippet": { + "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1b7cf44d7a2e11bb", + "equalIndicator/v1": "1e10da9bba18aab541f6cdceb02d85b86610b896f42f6a725e49bf84dd18e139" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 679, + "startColumn": 66, + "charOffset": 26026, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 677, + "startColumn": 1, + "charOffset": 25956, + "charLength": 259, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeRequest - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3bc718617017d678", + "equalIndicator/v1": "1e46f0ea60a4ea3b7522f71a37514df6f966518476419d46f33f467bdeb62dfb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/rewardchest.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 44, + "startColumn": 19, + "charOffset": 1509, + "charLength": 10, + "snippet": { + "text": "removeItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 42, + "startColumn": 1, + "charOffset": 1392, + "charLength": 229, + "snippet": { + "text": "\r\n// Second argument is disabled by default because not need to send to client in the RewardChest\r\nvoid RewardChest::removeItem(std::shared_ptr thing, bool /* sendToClient = false*/) {\r\n\tif (thing == nullptr) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cefb919cba906aff", + "equalIndicator/v1": "1e4f6cc3c8bc0960aad2dbf2a77304be619320096d6e4424040930090fb3d204" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 144, + "startColumn": 83, + "charOffset": 3990, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 142, + "startColumn": 1, + "charOffset": 3903, + "charLength": 215, + "snippet": { + "text": "}\r\n\r\nCombatDamage Weapon::getCombatDamage(CombatDamage combat, std::shared_ptr player, std::shared_ptr item, int32_t damageModifier) const {\r\n\t// Local variables\r\n\tuint32_t level = player->getLevel();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "550e43e667693636", + "equalIndicator/v1": "1e5778a99782dc9b62f0a7239dfbe83eec50fe324d7b10394a2aa1849bcbb74a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 453, + "startColumn": 86, + "charOffset": 16242, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 451, + "startColumn": 1, + "charOffset": 16152, + "charLength": 191, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPartyOnLeave(std::shared_ptr party, std::shared_ptr player) {\r\n\t// Party:onLeave(player) or Party.onLeave(self, player)\r\n\tif (info.partyOnLeave == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9646a78219d77687", + "equalIndicator/v1": "1e6408feac98be86c6b2f954944fdb065821d17f5bf418b90d37bab5e35b4e98" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 941, + "startColumn": 99, + "charOffset": 35924, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 939, + "startColumn": 1, + "charOffset": 35821, + "charLength": 257, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnInventoryUpdate(std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool equip) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[{}] Call stack overflow\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0027f87575a3ea23", + "equalIndicator/v1": "1e656dd164eb639ea6a55c7c8f43393e3945a67dcd126c78dea38fda38788e5e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1116, + "startColumn": 46, + "charOffset": 33240, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1114, + "startColumn": 1, + "charOffset": 33190, + "charLength": 214, + "snippet": { + "text": "}\r\n\r\nbool Monster::pushItem(std::shared_ptr item, const Direction &nextDirection) {\r\n\tconst Position ¢erPos = item->getPosition();\r\n\tfor (const auto &[x, y] : getPushItemLocationOptions(nextDirection)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "58dd7ffa9a869d3b", + "equalIndicator/v1": "1e65bf04b887e6ffaf1f1d58e64bcfaab1df98f009385933b68f0231ac17b3fb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Return type 'const std::string' (aka 'const basic_string, allocator>') is 'const'-qualified at the top level, which may reduce code readability without improving const correctness", + "markdown": "Return type 'const std::string' (aka 'const basic_string, allocator\\>') is 'const'-qualified at the top level, which may reduce code readability without improving const correctness" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 568, + "startColumn": 2, + "charOffset": 16696, + "charLength": 17, + "snippet": { + "text": "const std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 566, + "startColumn": 1, + "charOffset": 16665, + "charLength": 176, + "snippet": { + "text": "\t\treturn items[id].name;\r\n\t}\r\n\tconst std::string getPluralName() const {\r\n\t\tif (hasAttribute(ItemAttribute_t::PLURALNAME)) {\r\n\t\t\treturn getString(ItemAttribute_t::PLURALNAME);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a2df6ef06b8638dc", + "equalIndicator/v1": "1e67bccceb0b2811290358300e3bd968397e8531b362fffe1095b7933d511a6c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 382, + "startColumn": 8, + "charOffset": 9527, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 380, + "startColumn": 1, + "charOffset": 9433, + "charLength": 208, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetAttack(lua_State* L) {\r\n\t// itemType:getAttack()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->attack);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "090868364f4603f6", + "equalIndicator/v1": "1e74fb18a3b628da1790be2b4e8cc5c3ee6ffbeba0e82feb5b8df01186c1a347" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8016, + "startColumn": 57, + "charOffset": 279189, + "charLength": 4, + "snippet": { + "text": "name" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8014, + "startColumn": 1, + "charOffset": 279128, + "charLength": 142, + "snippet": { + "text": "}\r\n\r\nvoid Game::addBestiaryList(uint16_t raceid, std::string name) {\r\n\tauto it = BestiaryList.find(raceid);\r\n\tif (it != BestiaryList.end()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d4fd2af5365f7fec", + "equalIndicator/v1": "1e85a2cbcb9f543f48cae53e99a16ed9f5aeaa6dcf7c6ee21c6051aa8ba1b35a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 476, + "startColumn": 8, + "charOffset": 11793, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 474, + "startColumn": 1, + "charOffset": 11685, + "charLength": 202, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetElementDamage(lua_State* L) {\r\n\t// itemType:getElementDamage()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (!itemType) {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "93f1788e10bfb799", + "equalIndicator/v1": "1ebfedf25cfcbe3812e9c0eec22f8e0971059679711bb56cfde4dd5506396664" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1301, + "startColumn": 87, + "charOffset": 43511, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1299, + "startColumn": 1, + "charOffset": 43420, + "charLength": 342, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatMana(std::shared_ptr caster, std::shared_ptr target, const Position &origin, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\r\n\tif ((caster && target)\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "31c1234727212a5d", + "equalIndicator/v1": "1ec094c70c0e27583498180560d2347d47aa8a207e9ab8fb80a006f255334d67" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The value returned by this function should not be disregarded; neglecting it may lead to errors", + "markdown": "The value returned by this function should not be disregarded; neglecting it may lead to errors" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 179, + "startColumn": 3, + "charOffset": 5011, + "charLength": 8, + "snippet": { + "text": "acceptor" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 177, + "startColumn": 1, + "charOffset": 4942, + "charLength": 100, + "snippet": { + "text": "\tif (acceptor && acceptor->is_open()) {\r\n\t\tstd::error_code error;\r\n\t\tacceptor->close(error);\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cea2648f2496047c", + "equalIndicator/v1": "1ec845615940da735088d83d305f0524c012c62f07a073d1cff49ac8c02201a2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 166, + "startColumn": 57, + "charOffset": 4539, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 164, + "startColumn": 1, + "charOffset": 4478, + "charLength": 184, + "snippet": { + "text": "}\r\n\r\nbool Party::passPartyLeadership(std::shared_ptr player) {\r\n\tauto leader = getLeader();\r\n\tif (!leader || !player || leader == player || player->getParty().get() != this) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "16ed13e9252572e2", + "equalIndicator/v1": "1edb1f9365a20edc7db408edca604659d7506d7d11ebf253bc792c762d638b8a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 594, + "startColumn": 44, + "charOffset": 30539, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 592, + "startColumn": 1, + "charOffset": 30468, + "charLength": 114, + "snippet": { + "text": "\t\treturn tilesToClean;\r\n\t}\r\n\tvoid addTileToClean(std::shared_ptr tile) {\r\n\t\ttilesToClean.emplace(tile);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e898fcfec18110e0", + "equalIndicator/v1": "1eede7fc13c30831582ef91ed31f34a883962cc075fbaa0df4f112a8d974b3f3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6321, + "startColumn": 65, + "charOffset": 200254, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6319, + "startColumn": 1, + "charOffset": 200185, + "charLength": 128, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureHealth(std::shared_ptr creature) {\r\n\tif (creature->isHealthHidden()) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d39e6eae897a079d", + "equalIndicator/v1": "1ef5628c57bb9fb55117b17f158e0090e16c6aecbe53d449372579057cccf50a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 777, + "startColumn": 64, + "charOffset": 23628, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 775, + "startColumn": 1, + "charOffset": 23501, + "charLength": 240, + "snippet": { + "text": "\r\n\tif (item->isStackable() && count != item->getItemCount()) {\r\n\t\tuint8_t newCount = static_cast(std::max(0, item->getItemCount() - count));\r\n\t\tconst int32_t oldWeight = item->getWeight();\r\n\t\titem->setItemCount(newCount);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c8ec3bab67f81ff7", + "equalIndicator/v1": "1effc41db45eaea9d0165a22384313394a17a254bae18bc5e55ba4a3a14714fd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'speaker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'speaker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 336, + "startColumn": 96, + "charOffset": 12058, + "charLength": 7, + "snippet": { + "text": "speaker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 334, + "startColumn": 1, + "charOffset": 11958, + "charLength": 234, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventCreatureOnHear(std::shared_ptr creature, std::shared_ptr speaker, const std::string &words, SpeakClasses type) {\r\n\t// Creature:onHear(speaker, words, type)\r\n\tif (info.creatureOnHear == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a79f71c336bf4a80", + "equalIndicator/v1": "1f03c345c934cfe1ba9a9d5cbd02883485457c2cbd6383fa1f702649919c31de" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 197, + "startColumn": 2, + "charOffset": 4826, + "charLength": 7, + "snippet": { + "text": "int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 195, + "startColumn": 1, + "charOffset": 4816, + "charLength": 146, + "snippet": { + "text": "\t\t}\r\n\t}\r\n\tint32_t subType = getNumber(L, 3, -1);\r\n\r\n\tstd::shared_ptr item = g_game().findItemOfType(tile, itemId, false, subType);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "97461fd3bc33a0a9", + "equalIndicator/v1": "1f0703296025c17f43bb4cb1add0086833e0ba20e051a6be81630ec1f62a8b95" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1796, + "startColumn": 54, + "charOffset": 48467, + "charLength": 1, + "snippet": { + "text": "i" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1794, + "startColumn": 1, + "charOffset": 48389, + "charLength": 170, + "snippet": { + "text": "\t\t\tlist.push_back(i);\r\n\r\n\t\t\tx1 = std::fabs(1.0 - ((static_cast(sum)) + i) / med);\r\n\t\t\tx2 = std::fabs(1.0 - (static_cast(sum) / med));\r\n\t\t} while (x1 < x2);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5b0cc70f221c9dbf", + "equalIndicator/v1": "1f16ccea41454bf8a6ed0aff39b7cc5aa73f8f1542af128def9d39415cf200f4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 117, + "startColumn": 15, + "charOffset": 4894, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 115, + "startColumn": 1, + "charOffset": 4807, + "charLength": 239, + "snippet": { + "text": "\t * \\param link holds the relation the object has to the cylinder\r\n\t */\r\n\tvirtual void postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) = 0;\r\n\r\n\t/**\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "09ba5ed3808bfd81", + "equalIndicator/v1": "1f280d24641261b27219774dbdb01199a9223b8fea02fc8b3be4bd4cb24f12d4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 89, + "startColumn": 33, + "charOffset": 2330, + "charLength": 30, + "snippet": { + "text": "getUserdataShared(L, 1)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 87, + "startColumn": 1, + "charOffset": 2218, + "charLength": 179, + "snippet": { + "text": "int PartyFunctions::luaPartyGetMembers(lua_State* L) {\r\n\t// party:getMembers()\r\n\tstd::shared_ptr party = getUserdataShared(L, 1);\r\n\tif (!party) {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e40f6cef8672dab4", + "equalIndicator/v1": "1f40df8b71a02a14f7c7b6da576dde24b3a986c1e8b757b0ff84aa49ef2877f5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 81, + "startColumn": 10, + "charOffset": 2200, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 79, + "startColumn": 1, + "charOffset": 2147, + "charLength": 105, + "snippet": { + "text": "\t}\r\n\tint32_t getDefense() const override {\r\n\t\treturn mType->info.defense * getDefenseMultiplier();\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "52b0beb11cdd0aad", + "equalIndicator/v1": "1f5a4c0dccc8c2b5c6188331cb058e322d624e87b718a91219c42749bc19b92f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1245, + "startColumn": 27, + "charOffset": 36604, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1243, + "startColumn": 1, + "charOffset": 36501, + "charLength": 123, + "snippet": { + "text": "\tvoid reloadCreature(std::shared_ptr creature) {\r\n\t\tif (client) {\r\n\t\t\tclient->reloadCreature(creature);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e06f8495c6f7e248", + "equalIndicator/v1": "1f96c8aeef18944e0d5cec61f06b14b64ec076e4c35deb70dfc19f16ef4bf808" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 569, + "startColumn": 57, + "charOffset": 18007, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 567, + "startColumn": 1, + "charOffset": 17946, + "charLength": 236, + "snippet": { + "text": "}\r\n\r\nvoid Combat::CombatHealthFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\r\n\tif (!data) {\r\n\t\tg_logger().error(\"[{}]: CombatDamage is nullptr\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c4640a6cd35c6754", + "equalIndicator/v1": "1f9b4b43e83acc304516dc0f8836b4f91cce9fa56e0ea5d54083e6aef6a50520" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1932, + "startColumn": 18, + "charOffset": 55723, + "charLength": 13, + "snippet": { + "text": "imbuementInfo" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1930, + "startColumn": 1, + "charOffset": 55698, + "charLength": 206, + "snippet": { + "text": "\t\t\t}\r\n\r\n\t\t\tint minutes = imbuementInfo.duration / 60;\r\n\t\t\tint hours = minutes / 60;\r\n\t\t\ts << fmt::format(\"{} {} {:02}:{:02}h\", baseImbuement->name, imbuementInfo.imbuement->getName(), hours, minutes % 60);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6838f7bce1d88bc8", + "equalIndicator/v1": "1fb211d7f5d7746448c1a12b9314ab030e94e0444e9c6016a7261961ad414bc5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 761, + "startColumn": 20, + "charOffset": 29350, + "charLength": 3, + "snippet": { + "text": "exp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 759, + "startColumn": 1, + "charOffset": 29325, + "charLength": 62, + "snippet": { + "text": "\t}\r\n\r\n\tlua_pushnumber(L, exp);\r\n\tlua_pushnumber(L, rawExp);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "85ce9d0d5187628a", + "equalIndicator/v1": "1fbb44eda8eefbddc3ce7daa22f8003d656eb2cf7a8a09c6c3a05ce7eff7fc70" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1372, + "startColumn": 36, + "charOffset": 41229, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1370, + "startColumn": 1, + "charOffset": 41102, + "charLength": 147, + "snippet": { + "text": "\tvoid sendPartyCreatureUpdate(std::shared_ptr creature) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPartyCreatureUpdate(creature);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "895d4618783b245f", + "equalIndicator/v1": "1fbf085f13111597e2b733f2d8f43902b0143b0d18bdb78e627a6c498cb950f4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'house' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'house' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1435, + "startColumn": 14, + "charOffset": 42136, + "charLength": 5, + "snippet": { + "text": "house" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1433, + "startColumn": 1, + "charOffset": 42021, + "charLength": 148, + "snippet": { + "text": "void Player::setEditHouse(std::shared_ptr house, uint32_t listId /*= 0*/) {\r\n\twindowTextId++;\r\n\teditHouse = house;\r\n\teditListId = listId;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "168a5c6ff27da5a7", + "equalIndicator/v1": "1fc634ac6e46022a112759b0750829e11634ad8794e2ec983a84c1ab26988deb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 631, + "startColumn": 63, + "charOffset": 24203, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 629, + "startColumn": 1, + "charOffset": 24136, + "charLength": 265, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnReportBug(std::shared_ptr player, const std::string &message, const Position &position, uint8_t category) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnReportBug - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "278524400d4b3e09", + "equalIndicator/v1": "1fd342c145f7d223dc29bbdff7b0916f19fa6d663d63797f587c6f818f6c1711" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Replace loop by 'std::ranges::all_of()'", + "markdown": "Replace loop by 'std::ranges::all_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 275, + "startColumn": 2, + "charOffset": 7636, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 273, + "startColumn": 1, + "charOffset": 7614, + "charLength": 141, + "snippet": { + "text": "\t\treturn false;\r\n\t}\r\n\tfor (const std::shared_ptr &tile : houseTiles) {\r\n\t\tif (!transferToDepot(player, tile)) {\r\n\t\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "11224c8c98bdb6f8", + "equalIndicator/v1": "1fd7e843691d5d536d9a1185e37e90ec3f857ef85bed53930e7bd5ba7b3e6b02" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1254, + "startColumn": 7, + "charOffset": 44658, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1252, + "startColumn": 1, + "charOffset": 44646, + "charLength": 124, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[{}] Call stack overflow\", __FUNCTION__);\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9643c11e0ff57d1a", + "equalIndicator/v1": "201d06afa316c2f6e1d7cbbc6b0eb61e2b18e0d3834d1212baab685c14b6038b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1922, + "startColumn": 20, + "charOffset": 66050, + "charLength": 1, + "snippet": { + "text": "x" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1920, + "startColumn": 1, + "charOffset": 65933, + "charLength": 165, + "snippet": { + "text": "\t\t\tfor (uint32_t y = 0; y < rows; ++y) {\r\n\t\t\t\t// calculate new coordinates using rotation center\r\n\t\t\t\tint32_t newX = x - centerX;\r\n\t\t\t\tint32_t newY = y - centerY;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "46b319ef78489c82", + "equalIndicator/v1": "201e5a7b07df9ff089184d45cd19a4cecb8f49b6f87b844cf4713381f469260d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8798, + "startColumn": 60, + "charOffset": 306886, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8796, + "startColumn": 1, + "charOffset": 306809, + "charLength": 247, + "snippet": { + "text": "} // namespace\r\n\r\nbool checkCanInitCreateMarketOffer(std::shared_ptr player, uint8_t type, const ItemType &it, uint16_t amount, uint64_t price, std::ostringstream &offerStatus) {\r\n\tif (!player) {\r\n\t\tofferStatus << \"Failed to load player\";\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1b724201006f48f6", + "equalIndicator/v1": "20236783fe64ca87e0274f92851e1d6fe1beb02418286f62a1910f5201bab647" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 437, + "startColumn": 64, + "charOffset": 16426, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 435, + "startColumn": 1, + "charOffset": 16358, + "charLength": 236, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnLookInShop(std::shared_ptr player, const ItemType* itemType, uint8_t count) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLookInShop - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "974fc8d1e9f865be", + "equalIndicator/v1": "2024e4e5795ace18036b83fa44bb811d6cf57186cf007759c206a107f3569d9e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1283, + "startColumn": 7, + "charOffset": 45631, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1281, + "startColumn": 1, + "charOffset": 45619, + "charLength": 146, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventOnStorageUpdate - \"\r\n\t\t \"Player {} key {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "859d8a6a6ea28c71", + "equalIndicator/v1": "20300fb1cfb4225bcec563a15686ebfd25dec261aff2d89027cc4d73cd6d14cc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1816, + "startColumn": 3, + "charOffset": 54887, + "charLength": 16, + "snippet": { + "text": "ObjectCategory_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1814, + "startColumn": 1, + "charOffset": 54783, + "charLength": 266, + "snippet": { + "text": "\t\tg_game().playerClearManagedContainer(player->getID(), category, true);\r\n\t} else if (action == 2) {\r\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\r\n\t\tg_game().playerOpenManagedContainer(player->getID(), category, true);\r\n\t} else if (action == 3) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e17f9ff27382085f", + "equalIndicator/v1": "204f9e94b7ca01d09cf89bf11d4b92bee2b62f4c5adc9693270d1ae7ad2e8fe9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 18, + "charOffset": 1423, + "charLength": 12, + "snippet": { + "text": "ValueWrapper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1269, + "charLength": 396, + "snippet": { + "text": "\texplicit(false) ValueWrapper(int value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(double value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const phmap::flat_hash_map &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const std::initializer_list> &init_list, uint64_t timestamp = 0);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3063d4564dc4dc71", + "equalIndicator/v1": "205dd1b4e22d3efc5e106926290a4be82cdf440e8308bbf1f585f574c3f8a3a2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 161, + "startColumn": 10, + "charOffset": 4425, + "charLength": 13, + "snippet": { + "text": "getThrowRange" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 159, + "startColumn": 1, + "charOffset": 4410, + "charLength": 71, + "snippet": { + "text": "\t}\r\n\r\n\tint32_t getThrowRange() const override final {\r\n\t\treturn 1;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a109ae3f5884f137", + "equalIndicator/v1": "2064a6f2e7f2ea974605912e846c087f3c69ae9a6212545589a5ed2c627c65d6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'long long' to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'long long' to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 51, + "startColumn": 43, + "charOffset": 1417, + "charLength": 8, + "snippet": { + "text": "duration" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 49, + "startColumn": 1, + "charOffset": 1304, + "charLength": 189, + "snippet": { + "text": "\t\tif (decayMap.empty()) {\r\n\t\t\teventId = g_dispatcher().scheduleEvent(\r\n\t\t\t\tstd::max(SCHEDULER_MINTICKS, duration), [this] { checkDecay(); }, \"Decay::checkDecay\"\r\n\t\t\t);\r\n\t\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dc0a301b449d03d5", + "equalIndicator/v1": "20894c70490ccfeb0945614dce1477c72a0cfd7f970806136783330852d4bfe5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 997, + "startColumn": 41, + "charOffset": 37958, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 995, + "startColumn": 1, + "charOffset": 37912, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "18bbcbc020736b99", + "equalIndicator/v1": "20968bcfa8c784e7b241a51cb1fd5a967376cae02c89ce6f93ea21458ed94c61" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1061, + "startColumn": 7, + "charOffset": 31969, + "charLength": 10, + "snippet": { + "text": "const auto" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1059, + "startColumn": 1, + "charOffset": 31887, + "charLength": 208, + "snippet": { + "text": "\tint index = 0;\r\n\tlua_createtable(L, monsterType->info.summons.size(), 0);\r\n\tfor (const auto &summonBlock : monsterType->info.summons) {\r\n\t\tlua_createtable(L, 0, 3);\r\n\t\tsetField(L, \"name\", summonBlock.name);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "946edb1c89e85609", + "equalIndicator/v1": "20e5e930196462484b14182465ba2d1b2d9b12c9b5a68aabc1a9aeece291b6cc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float'", + "markdown": "Narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 567, + "startColumn": 61, + "charOffset": 15283, + "charLength": 23, + "snippet": { + "text": "(statsPercent[i] - 100)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 565, + "startColumn": 1, + "charOffset": 15192, + "charLength": 140, + "snippet": { + "text": "\r\n\t\t\tcase STAT_MAXMANAPOINTS:\r\n\t\t\t\tstats[i] = static_cast(player->getMaxMana() * ((statsPercent[i] - 100) / 100.f));\r\n\t\t\t\tbreak;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "33cf6a50d7d49bb1", + "equalIndicator/v1": "2101e128ab860764df539abf22aac77789bebf0f3afbb3fad2b0fc9ab6a9c762" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2178, + "startColumn": 27, + "charOffset": 73789, + "charLength": 10, + "snippet": { + "text": "multiplier" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2176, + "startColumn": 1, + "charOffset": 73677, + "charLength": 169, + "snippet": { + "text": "\tif (chance != 0 && uniform_random(1, 10000) <= chance) {\r\n\t\tdamage.critical = true;\r\n\t\tdamage.primary.value *= multiplier;\r\n\t\tdamage.secondary.value *= multiplier;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "db23db335550efc7", + "equalIndicator/v1": "211eae7c7c9839aa31d1eca298b9e5926865e271473b9abdfe1b6547ee029b1b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 272, + "startColumn": 29, + "charOffset": 7580, + "charLength": 4, + "snippet": { + "text": "door" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 270, + "startColumn": 1, + "charOffset": 7533, + "charLength": 129, + "snippet": { + "text": "\r\n\tint index = 0;\r\n\tfor (std::shared_ptr door : doors) {\r\n\t\tpushUserdata(L, door);\r\n\t\tsetItemMetatable(L, -1, door);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ef2d773e35123cbf", + "equalIndicator/v1": "21328967236e9df90a9e2b6de34afa01c05a0966f06b2248c050b2de7b9f0bf8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use nullptr", + "markdown": "Use nullptr" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 146, + "startColumn": 2, + "charOffset": 6295, + "charLength": 1477, + "snippet": { + "text": "auto _mm_sse2_min_epi32 = [](const __m128i a, const __m128i b) {\r\n\t\t__m128i mask = _mm_cmpgt_epi32(a, b);\r\n\t\treturn _mm_or_si128(_mm_and_si128(mask, b), _mm_andnot_si128(mask, a));\r\n\t};\r\n\r\n\tauto _mm_sse2_blendv_epi8 = [](const __m128i a, const __m128i b, __m128i mask) {\r\n\t\tmask = _mm_cmplt_epi8(mask, _mm_setzero_si128());\r\n\t\treturn _mm_or_si128(_mm_andnot_si128(mask, a), _mm_and_si128(mask, b));\r\n\t};\r\n\r\n\tconst __m128i increment = _mm_set1_epi32(4);\r\n\t__m128i indices = _mm_setr_epi32(0, 1, 2, 3);\r\n\t__m128i minindices = indices;\r\n\t__m128i minvalues = _mm_load_si128(reinterpret_cast(calculatedNodes));\r\n\tfor (int32_t pos = 4; pos < curNode; pos += 4) {\r\n\t\tconst __m128i values = _mm_load_si128(reinterpret_cast(&calculatedNodes[pos]));\r\n\t\tindices = _mm_add_epi32(indices, increment);\r\n\t\tminindices = _mm_sse2_blendv_epi8(minindices, indices, _mm_cmplt_epi32(values, minvalues));\r\n\t\tminvalues = _mm_sse2_min_epi32(values, minvalues);\r\n\t}\r\n\r\n\t__m128i res = _mm_sse2_min_epi32(minvalues, _mm_shuffle_epi32(minvalues, _MM_SHUFFLE(2, 3, 0, 1))); // Calculate horizontal minimum\r\n\tres = _mm_sse2_min_epi32(res, _mm_shuffle_epi32(res, _MM_SHUFFLE(0, 1, 2, 3))); // Calculate horizontal minimum\r\n\r\n\talignas(16) int32_t indices_array[4];\r\n\t_mm_store_si128(reinterpret_cast<__m128i*>(indices_array), minindices);\r\n\r\n\tint32_t best_node = indices_array[(_mm_ctz(_mm_movemask_epi8(_mm_cmpeq_epi32(minvalues, res))) >> 2)];\r\n\treturn (openNodes[best_node] " + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 144, + "startColumn": 1, + "charOffset": 6209, + "charLength": 1660, + "snippet": { + "text": "\treturn (openNodes[best_node] ? &nodes[best_node] : NULL);\r\n#elif defined(__SSE2__)\r\n\tauto _mm_sse2_min_epi32 = [](const __m128i a, const __m128i b) {\r\n\t\t__m128i mask = _mm_cmpgt_epi32(a, b);\r\n\t\treturn _mm_or_si128(_mm_and_si128(mask, b), _mm_andnot_si128(mask, a));\r\n\t};\r\n\r\n\tauto _mm_sse2_blendv_epi8 = [](const __m128i a, const __m128i b, __m128i mask) {\r\n\t\tmask = _mm_cmplt_epi8(mask, _mm_setzero_si128());\r\n\t\treturn _mm_or_si128(_mm_andnot_si128(mask, a), _mm_and_si128(mask, b));\r\n\t};\r\n\r\n\tconst __m128i increment = _mm_set1_epi32(4);\r\n\t__m128i indices = _mm_setr_epi32(0, 1, 2, 3);\r\n\t__m128i minindices = indices;\r\n\t__m128i minvalues = _mm_load_si128(reinterpret_cast(calculatedNodes));\r\n\tfor (int32_t pos = 4; pos < curNode; pos += 4) {\r\n\t\tconst __m128i values = _mm_load_si128(reinterpret_cast(&calculatedNodes[pos]));\r\n\t\tindices = _mm_add_epi32(indices, increment);\r\n\t\tminindices = _mm_sse2_blendv_epi8(minindices, indices, _mm_cmplt_epi32(values, minvalues));\r\n\t\tminvalues = _mm_sse2_min_epi32(values, minvalues);\r\n\t}\r\n\r\n\t__m128i res = _mm_sse2_min_epi32(minvalues, _mm_shuffle_epi32(minvalues, _MM_SHUFFLE(2, 3, 0, 1))); // Calculate horizontal minimum\r\n\tres = _mm_sse2_min_epi32(res, _mm_shuffle_epi32(res, _MM_SHUFFLE(0, 1, 2, 3))); // Calculate horizontal minimum\r\n\r\n\talignas(16) int32_t indices_array[4];\r\n\t_mm_store_si128(reinterpret_cast<__m128i*>(indices_array), minindices);\r\n\r\n\tint32_t best_node = indices_array[(_mm_ctz(_mm_movemask_epi8(_mm_cmpeq_epi32(minvalues, res))) >> 2)];\r\n\treturn (openNodes[best_node] ? &nodes[best_node] : NULL);\r\n#else\r\n\tint32_t best_node_f = std::numeric_limits::max();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "540101bb70293102", + "equalIndicator/v1": "2134cd5ad292ad008267bdc88ab1cf227cb9ad8349f4fa6c6b8d038153f3c4cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'addCondition' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'addCondition' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 336, + "startColumn": 66, + "charOffset": 8490, + "charLength": 12, + "snippet": { + "text": "addCondition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 334, + "startColumn": 1, + "charOffset": 8420, + "charLength": 153, + "snippet": { + "text": "}\r\n\r\nbool Condition::updateCondition(const std::shared_ptr addCondition) {\r\n\tif (conditionType != addCondition->getType()) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5472484c16977e7a", + "equalIndicator/v1": "215663a97be371a223947c3470f23bbe7f5f696b629e1a56b1d996634371314d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'lootContainer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'lootContainer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3057, + "startColumn": 110, + "charOffset": 113694, + "charLength": 13, + "snippet": { + "text": "lootContainer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3055, + "startColumn": 1, + "charOffset": 113580, + "charLength": 252, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::processMoveOrAddItemToLootContainer(std::shared_ptr item, std::shared_ptr lootContainer, uint32_t &remainderCount, std::shared_ptr player) {\r\n\tstd::shared_ptr moveItem = nullptr;\r\n\tReturnValue ret;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "48a753099094aa82", + "equalIndicator/v1": "216a60ea714df0c02a6295caed6ee26b6104862bdfd45e4db1e34b5a75cda71e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2092, + "startColumn": 15, + "charOffset": 57546, + "charLength": 10, + "snippet": { + "text": "difference" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2090, + "startColumn": 1, + "charOffset": 57411, + "charLength": 191, + "snippet": { + "text": "void ConditionSpeed::getFormulaValues(int32_t var, int32_t &min, int32_t &max) const {\r\n\tint32_t difference = var - 40;\r\n\tmin = mina * difference + minb;\r\n\tmax = maxa * difference + maxb;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2ab3db427aa8a53c", + "equalIndicator/v1": "217dade50c5c146fc42522e54078c4da7e5d2078b16810f1f0f15081790c5fdd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use nullptr", + "markdown": "Use nullptr" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 134, + "startColumn": 31, + "charOffset": 4090, + "charLength": 4, + "snippet": { + "text": "NULL" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 132, + "startColumn": 1, + "charOffset": 3994, + "charLength": 214, + "snippet": { + "text": "\tStashContainerList toReturnList;\r\n\tfor (auto item : itemlist) {\r\n\t\tif (item->getContainer() != NULL) {\r\n\t\t\tauto subContainer = item->getContainer()->getStowableItems();\r\n\t\t\tfor (auto subContItem : subContainer) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fabe43de897f76d4", + "equalIndicator/v1": "21ad8c6a5828ce583f6790532320bc0ab7e3383f69a4ca4b6d1406294ad25a57" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 886, + "startColumn": 63, + "charOffset": 25906, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 884, + "startColumn": 1, + "charOffset": 25839, + "charLength": 186, + "snippet": { + "text": "}\r\n\r\nint GameFunctions::luaGameGetPublicAchievements(lua_State* L) {\r\n\t// Game.getPublicAchievements()\r\n\tconst std::vector &achievements = g_game().getPublicAchievements();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dd9fc8374449850f", + "equalIndicator/v1": "21c2981f041f5fb0a80e0cb230c0393c9a97b1aa5f2fd6b114a7c47076a8fa45" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int64_t' (aka 'long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 775, + "startColumn": 51, + "charOffset": 21183, + "charLength": 13, + "snippet": { + "text": "getDepotChest" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 773, + "startColumn": 1, + "charOffset": 21040, + "charLength": 235, + "snippet": { + "text": "\tuint32_t depotId = getNumber(L, 2);\r\n\tbool autoCreate = getBoolean(L, 3, false);\r\n\tstd::shared_ptr depotChest = player->getDepotChest(depotId, autoCreate);\r\n\tif (depotChest) {\r\n\t\tplayer->setLastDepotId(depotId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b688cacd931d9bff", + "equalIndicator/v1": "21deeb6922fc3ecc381efb4287039f56ddd7451ba5c5f6cede0a3f81905fb1e5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 715, + "startColumn": 41, + "charOffset": 27603, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 713, + "startColumn": 1, + "charOffset": 27557, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "955a3734320e3650", + "equalIndicator/v1": "21e0a53ebfc7a04fcd73c30cc5bf30e0d78eb93bcbbd9ee13185407583641ad2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'event' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'event' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 57, + "startColumn": 49, + "charOffset": 1451, + "charLength": 5, + "snippet": { + "text": "event" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 55, + "startColumn": 1, + "charOffset": 1398, + "charLength": 140, + "snippet": { + "text": "}\r\n\r\nbool Weapons::registerLuaEvent(WeaponShared_ptr event, bool fromXML /*= false*/) {\r\n\tweapons[event->getID()] = event;\r\n\tif (fromXML) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e610cfc65efa8026", + "equalIndicator/v1": "21e0cb405ad316ca88fe6f96629fe4345966ff58964e1b4876573481f0ab8ff5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/reward.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 26, + "startColumn": 7, + "charOffset": 942, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 24, + "startColumn": 1, + "charOffset": 784, + "charLength": 321, + "snippet": { + "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r\n\r\n\t// overrides\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3e55ae830fb9184b", + "equalIndicator/v1": "21f0993d6d38a89b28321415df28b752b70d97c2b778580122d8bf3912752c79" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 199, + "startColumn": 15, + "charOffset": 8218, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 197, + "startColumn": 1, + "charOffset": 8065, + "charLength": 311, + "snippet": { + "text": "\r\n\tvirtual void postAddNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r\n\tvirtual void postRemoveNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r\n\r\n\tbool isPushable() override {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4dbd0c2ffb896c0a", + "equalIndicator/v1": "21fbaf56fc39f2f9634b58c68b8b060692c70bb5e0560a9a23d0f8628f652765" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 211, + "startColumn": 6, + "charOffset": 7662, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 209, + "startColumn": 1, + "charOffset": 7606, + "charLength": 193, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, position);\r\n\r\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fc53fdf462e931ff", + "equalIndicator/v1": "2200040b7ce19f202070bf4e8a13526236207e041b589e8440ac653e22539005" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 52, + "startColumn": 24, + "charOffset": 1442, + "charLength": 5, + "snippet": { + "text": "clone" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 50, + "startColumn": 1, + "charOffset": 1365, + "charLength": 170, + "snippet": { + "text": "\tContainer &operator=(const Container &) = delete;\r\n\r\n\tstd::shared_ptr clone() const override final;\r\n\r\n\tstd::shared_ptr getContainer() override final {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7cf20ab33482a2ee", + "equalIndicator/v1": "2211afbfbc45e82208b9022eab5ddc5a30c3da91e8bc690a558855918b245573" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 564, + "startColumn": 55, + "charOffset": 15687, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 562, + "startColumn": 1, + "charOffset": 15628, + "charLength": 203, + "snippet": { + "text": "}\r\n\r\nvoid Party::updatePlayerTicks(std::shared_ptr player, uint32_t points) {\r\n\tif (points != 0 && !player->hasFlag(PlayerFlags_t::NotGainInFight)) {\r\n\t\tticksMap[player->getID()] = OTSYS_TIME();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c48ec2bb7da0ba66", + "equalIndicator/v1": "221671541403cb8a4ea321207380acf29a2ab921192dc3f4f424a17aad7bd0ee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 711, + "startColumn": 121, + "charOffset": 23513, + "charLength": 27, + "snippet": { + "text": "spellSecondaryGroupCooldown" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 709, + "startColumn": 1, + "charOffset": 23346, + "charLength": 280, + "snippet": { + "text": "\t\t}\r\n\t\tif (spellSecondaryGroupCooldown > 0) {\r\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLGROUPCOOLDOWN, spellSecondaryGroupCooldown / rateCooldown, 0, false, secondaryGroup);\r\n\t\t\tplayer->addCondition(condition);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e4ffd29b9b8e6ebd", + "equalIndicator/v1": "2229f73d1bd8febe7313b33659b2731e1a2ffd2bb31440aa134499273c8a2aba" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getUsedRunesBit' can be made const", + "markdown": "Method 'getUsedRunesBit' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1952, + "startColumn": 10, + "charOffset": 57573, + "charLength": 15, + "snippet": { + "text": "getUsedRunesBit" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1950, + "startColumn": 1, + "charOffset": 57537, + "charLength": 84, + "snippet": { + "text": "\t\tUsedRunesBit = bit;\r\n\t}\r\n\tint32_t getUsedRunesBit() {\r\n\t\treturn UsedRunesBit;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb89105af9f8fd0f", + "equalIndicator/v1": "222a2afd0b9003fc2eac5db6d9f2ac73828bc4d54796f6ab18374d088b235324" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'speaker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'speaker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6146, + "startColumn": 63, + "charOffset": 195419, + "charLength": 7, + "snippet": { + "text": "speaker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6144, + "startColumn": 1, + "charOffset": 195352, + "charLength": 165, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendPrivateMessage(std::shared_ptr speaker, SpeakClasses type, const std::string &text) {\r\n\tNetworkMessage msg;\r\n\tmsg.addByte(0xAA);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8d782654d5a33e7d", + "equalIndicator/v1": "224bba02c7ceb66a841d14830f31f95ed2601e1af498c3600ec5aa7262a809dd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6422, + "startColumn": 68, + "charOffset": 221764, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6420, + "startColumn": 1, + "charOffset": 221692, + "charLength": 210, + "snippet": { + "text": "}\r\n\r\nvoid Game::internalCreatureChangeVisible(std::shared_ptr creature, bool visible) {\r\n\t// Send to clients\r\n\tfor (const auto &spectator : Spectators().find(creature->getPosition(), true)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a524aa84e334c7d7", + "equalIndicator/v1": "228f28283e5ddc29fc9c7360e43af88014480327e4d94e7da487201bff24f79c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1832, + "startColumn": 3, + "charOffset": 55847, + "charLength": 16, + "snippet": { + "text": "ObjectCategory_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1830, + "startColumn": 1, + "charOffset": 55742, + "charLength": 244, + "snippet": { + "text": "\t\tg_game().playerClearManagedContainer(player->getID(), category, false);\r\n\t} else if (action == 6) {\r\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\r\n\t\tg_game().playerOpenManagedContainer(player->getID(), category, false);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8fb6392313449172", + "equalIndicator/v1": "22936bb82e932e93682d7476af9c0d6b92b272a389f9b8542b0becf1240e8452" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 292, + "startColumn": 15, + "charOffset": 7576, + "charLength": 12, + "snippet": { + "text": "std::toupper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 290, + "startColumn": 1, + "charOffset": 7524, + "charLength": 112, + "snippet": { + "text": "\t\t} else {\r\n\t\t\tif (capitalizeNext) {\r\n\t\t\t\tresult += std::toupper(ch);\r\n\t\t\t\tcapitalizeNext = false;\r\n\t\t\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f8be9f5e9cb67076", + "equalIndicator/v1": "229f1110388577dd4e513dab08df7e69c02e1ac9e8a294a45b460a9d03045aee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2195, + "startColumn": 27, + "charOffset": 74477, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2193, + "startColumn": 1, + "charOffset": 74422, + "charLength": 152, + "snippet": { + "text": "\t\t}\r\n\t} else if (monster) {\r\n\t\tdamage.primary.value *= monster->getAttackMultiplier();\r\n\t\tdamage.secondary.value *= monster->getAttackMultiplier();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e8de382fdb78a809", + "equalIndicator/v1": "22a33d10aa1b5fd80475cc0847a404b504776be95d46db953c5edaadf43b4359" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 915, + "startColumn": 14, + "charOffset": 29762, + "charLength": 6, + "snippet": { + "text": "damage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 913, + "startColumn": 1, + "charOffset": 29578, + "charLength": 349, + "snippet": { + "text": "\tif (combatType != COMBAT_MANADRAIN && combatType != COMBAT_LIFEDRAIN && combatType != COMBAT_AGONYDAMAGE) { // Increase mitigate damage\r\n\t\tauto originalDamage = damage;\r\n\t\tdamage -= (damage * getMitigation()) / 100.;\r\n\t\tg_logger().trace(\"[mitigation] creature: {}, original damage: {}, mitigation damage: {}\", getName(), originalDamage, damage);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6bb08f7d5575c2f4", + "equalIndicator/v1": "22ae28dfee57028087efbb38361d1f79c9db43de8e92ffe266f91f71a0c471a1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1624, + "startColumn": 24, + "charOffset": 57254, + "charLength": 8, + "snippet": { + "text": "m_player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1622, + "startColumn": 1, + "charOffset": 57177, + "charLength": 162, + "snippet": { + "text": "\r\n\tif (m_player.getMana() > m_player.getMaxMana()) {\r\n\t\tint32_t difference = m_player.getMana() - m_player.getMaxMana();\r\n\t\tm_player.changeMana(-difference);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "37406bedeec7afb4", + "equalIndicator/v1": "22e8a610f505efd15d7826c99594ae4e382887f722f40f4284beca071aae477a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1012, + "startColumn": 7, + "charOffset": 38537, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1010, + "startColumn": 1, + "charOffset": 38365, + "charLength": 319, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnStorageUpdate(std::shared_ptr player, const uint32_t key, const int32_t value, int32_t oldValue, uint64_t currentTime) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::eventOnStorageUpdate - \"\r\n\t\t \"Player {} key {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6679ab75c83fc257", + "equalIndicator/v1": "22f2dd1e17efcdb1c0ca6734693af4140ccd85d4d4a9830b8f3f94ae72237e89" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'itemList' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'itemList' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 190, + "startColumn": 37, + "charOffset": 4590, + "charLength": 8, + "snippet": { + "text": "itemList" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 188, + "startColumn": 1, + "charOffset": 4549, + "charLength": 105, + "snippet": { + "text": "}\r\n\r\nuint16_t getStashSize(StashItemList itemList) {\r\n\tuint16_t size = 0;\r\n\tfor (auto item : itemList) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f759aa8df3b02d62", + "equalIndicator/v1": "22f8c620516dd64ad38514e0fb7f1ab58a4ce07cd00d7bc43b2b708eafe07246" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 155, + "startColumn": 56, + "charOffset": 4191, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 153, + "startColumn": 1, + "charOffset": 4131, + "charLength": 176, + "snippet": { + "text": "}\r\n\r\nvoid Module::executeOnRecvbyte(std::shared_ptr player, NetworkMessage &msg) {\r\n\t// onRecvbyte(player, msg, recvbyte)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71e00f59d611787f", + "equalIndicator/v1": "230186f0ab54795bd2a0d8c0b9e6305cc66a3519abf808e0b513d0b9122d07e8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 445, + "startColumn": 100, + "charOffset": 20014, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 443, + "startColumn": 1, + "charOffset": 19910, + "charLength": 203, + "snippet": { + "text": "}\r\n\r\nvoid ItemParse::parseInvisible(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\r\n\tstd::string stringValue = tmpStrValue;\r\n\tif (stringValue == \"invisible\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a414cc48be1fecf8", + "equalIndicator/v1": "2305093f72173ffd3dc1893b149c7c4182256670b4c04b245717a7ea7fa88584" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1956, + "startColumn": 2, + "charOffset": 59847, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1954, + "startColumn": 1, + "charOffset": 59749, + "charLength": 216, + "snippet": { + "text": "void ProtocolGame::parseRequestTrade(NetworkMessage &msg) {\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tuint32_t playerId = msg.get();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1431eb0563e7bb52", + "equalIndicator/v1": "23067e2dffc883ea9073def66f176aff7096ced04a43a3f064f07f4ae04b83f0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1611, + "startColumn": 28, + "charOffset": 56563, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1609, + "startColumn": 1, + "charOffset": 56383, + "charLength": 312, + "snippet": { + "text": "\t\tif (shouldCalculateSecondaryDamage) {\r\n\t\t\tdouble factor = (double)elementAttack / (double)attackValue; // attack value here is phys dmg + element dmg\r\n\t\t\tint32_t elementDamage = std::round(defaultDmg * factor);\r\n\t\t\tint32_t physDmg = std::round(defaultDmg * (1.0 - factor));\r\n\t\t\tdamage.primary.value = physDmg;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0445f2315deec401", + "equalIndicator/v1": "23178e33dcac1572735f6e053234d781934c6f0af0954f6dfbbbdc21eb2d7784" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first.", + "markdown": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1168, + "startColumn": 28, + "charOffset": 32700, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1166, + "startColumn": 1, + "charOffset": 32644, + "charLength": 126, + "snippet": { + "text": "\t\t\t\tseparator = true;\r\n\t\t\t}\r\n\t\t\tif (int32_t hitChance = item->getHitChance();\r\n\t\t\t hitChance != 0) {\r\n\t\t\t\tif (separator) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1acd24922d0f0f77", + "equalIndicator/v1": "234ac8d7e50168f33811f372f53fb826089e9128a3a416603c6355312f5fffca" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 126, + "startColumn": 47, + "charOffset": 3859, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 124, + "startColumn": 1, + "charOffset": 3808, + "charLength": 122, + "snippet": { + "text": "}\r\n\r\nvoid Container::addItem(std::shared_ptr item) {\r\n\titemlist.push_back(item);\r\n\titem->setParent(getContainer());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bdbc8ae5bd1588b0", + "equalIndicator/v1": "235f1d9c6af8bff20ea45596375e442482855f6a029cd5306e3f6162d88fc2d6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 107, + "startColumn": 54, + "charOffset": 3995, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 105, + "startColumn": 1, + "charOffset": 3937, + "charLength": 218, + "snippet": { + "text": "}\r\n\r\nbool IOLoginData::loadPlayer(std::shared_ptr player, DBResult_ptr result, bool disableIrrelevantInfo /* = false*/) {\r\n\tif (!result || !player) {\r\n\t\tstd::string nullptrType = !result ? \"Result\" : \"Player\";\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7ba688eff9fb1f77", + "equalIndicator/v1": "2373d610a72db123570bf96151160b9e2e81a9c207630bd28e9283c225e19b92" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'newTile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'newTile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 212, + "startColumn": 76, + "charOffset": 6265, + "charLength": 7, + "snippet": { + "text": "newTile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 210, + "startColumn": 1, + "charOffset": 6185, + "charLength": 220, + "snippet": { + "text": "}\r\n\r\nvoid Map::setTile(uint16_t x, uint16_t y, uint8_t z, std::shared_ptr newTile) {\r\n\tif (z >= MAP_MAX_LAYERS) {\r\n\t\tg_logger().error(\"Attempt to set tile on invalid coordinate: {}\", Position(x, y, z).toString());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d38a3a32ff5d8813", + "equalIndicator/v1": "238676e5b6f3350230b00adfd8ad77d63db1fe78f4956558f8e95d07325c0b14" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 913, + "startColumn": 48, + "charOffset": 29514, + "charLength": 3, + "snippet": { + "text": "max" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 911, + "startColumn": 1, + "charOffset": 29361, + "charLength": 164, + "snippet": { + "text": "\r\n\t// Returns the calculated maximum damage or a random value between the calculated minimum and maximum\r\n\treturn maxDamage ? -max : -normal_random(min, max);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "605ea9fe5336ff94", + "equalIndicator/v1": "238f882f0fad14dc6ae8ee4f5b75000a2d6048b768b091ce59ef052945d406a8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 493, + "startColumn": 8, + "charOffset": 12180, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 491, + "startColumn": 1, + "charOffset": 12066, + "charLength": 238, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetTransformEquipId(lua_State* L) {\r\n\t// itemType:getTransformEquipId()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->transformEquipTo);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f5c5f78303e32fb3", + "equalIndicator/v1": "239bb715ad6f589bc0a24922b4d10182a6dfad73d20f4e1074a317be013460f8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1226, + "startColumn": 7, + "charOffset": 43684, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1224, + "startColumn": 1, + "charOffset": 43672, + "charLength": 159, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnRequestQuestLine - \"\r\n\t\t \"Player {} questId {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9977737ed7e96f02", + "equalIndicator/v1": "239e3fe259219964955420266423dbfb2ed0f9450f23bcded8c04eb528a33e45" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'MoveEvent' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'MoveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 616, + "startColumn": 66, + "charOffset": 18724, + "charLength": 9, + "snippet": { + "text": "MoveEvent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 614, + "startColumn": 1, + "charOffset": 18654, + "charLength": 257, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::DeEquipItem(const std::shared_ptr MoveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool) {\r\n\tif (player == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "936d0ececd2f6589", + "equalIndicator/v1": "23e3e5424886ff230c06fac28e0c480aa393a438a3bef0a58aad87ac7fdb14e5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/loot_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 126, + "startColumn": 30, + "charOffset": 3450, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 124, + "startColumn": 1, + "charOffset": 3356, + "charLength": 157, + "snippet": { + "text": "\tconst auto loot = getUserdataShared(L, 1);\r\n\tif (loot) {\r\n\t\tloot->lootBlock.actionId = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1b60ed4e14e5adc5", + "equalIndicator/v1": "23fc7955b9b8a7a026a457ec089deccaa82f1022d8c8c80c62fcec70616ccc0c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1018, + "startColumn": 57, + "charOffset": 29359, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1016, + "startColumn": 1, + "charOffset": 29298, + "charLength": 112, + "snippet": { + "text": "}\r\n\r\nbool Player::canWalkthroughEx(std::shared_ptr creature) {\r\n\tif (group->access) {\r\n\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d1eea023bde11ae8", + "equalIndicator/v1": "240e5a20305bd60aaa7d7051da61e90a52a34b2df23e91fdd5bdc3570368bd93" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6922, + "startColumn": 31, + "charOffset": 240423, + "charLength": 38, + "snippet": { + "text": "(damage.secondary.value * damageBonus)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6920, + "startColumn": 1, + "charOffset": 240291, + "charLength": 190, + "snippet": { + "text": "\t\t\tif (damageBonus != 0) {\r\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\r\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2c6f9c80210e166e", + "equalIndicator/v1": "24200ca09b96267eb2c770f602ed90fa09f0800574062505b0dde3856bcc097e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The 'empty' method should be used to check for emptiness instead of 'size'", + "markdown": "The 'empty' method should be used to check for emptiness instead of 'size'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4081, + "startColumn": 7, + "charOffset": 123090, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4079, + "startColumn": 1, + "charOffset": 123039, + "charLength": 104, + "snippet": { + "text": "\r\n\tfor (const auto &item : equippedItems) {\r\n\t\tif (item->getAugments().size() < 1) {\r\n\t\t\tcontinue;\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a589b29c99a6ea68", + "equalIndicator/v1": "24233416e6602bddc3a7fec87e6587faea025efffcef170954d70e406c1800e7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6368, + "startColumn": 50, + "charOffset": 219907, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6366, + "startColumn": 1, + "charOffset": 219853, + "charLength": 188, + "snippet": { + "text": "}\r\n\r\nvoid Game::changeSpeed(std::shared_ptr creature, int32_t varSpeedDelta) {\r\n\tint32_t varSpeed = creature->getSpeed() - creature->getBaseSpeed();\r\n\tvarSpeed += varSpeedDelta;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "354123cb78a670b2", + "equalIndicator/v1": "242975d053f3b668e644ad2f48f10aa801a55a5803a20b95a00829dcccef9f42" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1335, + "startColumn": 58, + "charOffset": 45126, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1333, + "startColumn": 1, + "charOffset": 45064, + "charLength": 318, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatCondition(std::shared_ptr caster, const Position &position, const std::unique_ptr &area, const CombatParams ¶ms) {\r\n\tconst auto origin = caster ? caster->getPosition() : Position();\r\n\tCombatFunc(caster, origin, position, area, params, CombatConditionFunc, nullptr);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f243e01e915cb331", + "equalIndicator/v1": "2454d8260fc6e004177656075ae0124217e1c48db68b6ddbfaafa7e02b397dd5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/talkaction.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 82, + "startColumn": 53, + "charOffset": 2657, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 80, + "startColumn": 1, + "charOffset": 2600, + "charLength": 234, + "snippet": { + "text": "}\r\n\r\nbool TalkAction::executeSay(std::shared_ptr player, const std::string &words, const std::string ¶m, SpeakClasses type) const {\r\n\t// onSay(player, words, param, type)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8ca51c0b4039e613", + "equalIndicator/v1": "24850be0c669693693043581db8eec2b986769a85bf6e9b07659ee4f7ba5c691" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2361, + "startColumn": 68, + "charOffset": 81659, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2359, + "startColumn": 1, + "charOffset": 81587, + "charLength": 210, + "snippet": { + "text": "}\r\n\r\nint32_t PlayerWheel::checkDrainBodyLeech(std::shared_ptr target, skills_t skill) const {\r\n\tif (!target || !target->getMonster() || target->getWheelOfDestinyDrainBodyDebuff() == 0) {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "20455e009c267243", + "equalIndicator/v1": "24b554167b5c85e22fca8ca06cc27fa96d97c7373b6b76832b3d79bbe29b84c5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 185, + "startColumn": 22, + "charOffset": 7381, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 183, + "startColumn": 1, + "charOffset": 7321, + "charLength": 211, + "snippet": { + "text": "\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r\n\tvirtual ReturnValue queryRemove(const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr = nullptr) override {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb3d35a3e2819ca9", + "equalIndicator/v1": "24d97f34fb7182650accb84f04ed678178687d2c60de72da9c17ea5c0d7bbfb1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 577, + "startColumn": 51, + "charOffset": 17399, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 575, + "startColumn": 1, + "charOffset": 17303, + "charLength": 134, + "snippet": { + "text": "\r\n\t\t\tif (it.abilities->getManaGain() != 0) {\r\n\t\t\t\tcondition->setParam(CONDITION_PARAM_MANAGAIN, it.abilities->getManaGain());\r\n\t\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "19f7c73163de45cc", + "equalIndicator/v1": "24f3a78e10d53812cde521ca7950b71afbcaa2dc69f6b448f647f58224ace0cb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 10568, + "startColumn": 52, + "charOffset": 367048, + "charLength": 4, + "snippet": { + "text": "name" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10566, + "startColumn": 1, + "charOffset": 366992, + "charLength": 155, + "snippet": { + "text": "}\r\n\r\nAchievement Game::getAchievementByName(std::string name) {\r\n\tauto it = m_achievementsNameToId.find(name);\r\n\tif (it != m_achievementsNameToId.end()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7739729486773163", + "equalIndicator/v1": "24fb44631de37e67b8c6bee144ab47db834065c86f3c1641a1ab79ee001fa1cc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 165, + "startColumn": 7, + "charOffset": 5597, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 163, + "startColumn": 1, + "charOffset": 5436, + "charLength": 382, + "snippet": { + "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r\n\tvoid internalAddThing(std::shared_ptr thing) override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a221f73ab5d82f1f", + "equalIndicator/v1": "253e070c0a5894c31d772f8f6e0f6bcf50fe714bb6c17527859bbdde7d297e85" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float'", + "markdown": "Narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 416, + "startColumn": 29, + "charOffset": 10556, + "charLength": 7, + "snippet": { + "text": "(b - a)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 414, + "startColumn": 1, + "charOffset": 10473, + "charLength": 98, + "snippet": { + "text": "\r\n\tauto &&[a, b] = std::minmax(minNumber, maxNumber);\r\n\treturn a + std::lround(v * (b - a));\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e1dfe65673a5579e", + "equalIndicator/v1": "2540dff56f256e3cec8c765631d9c14b6c634c8d21b3971efefeebf7d6dc732b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 281, + "startColumn": 6, + "charOffset": 10110, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 279, + "startColumn": 1, + "charOffset": 10076, + "charLength": 202, + "snippet": { + "text": "\r\n\tReturnValue returnValue;\r\n\tif (scriptInterface.protectedCall(L, 3, 1) != 0) {\r\n\t\treturnValue = RETURNVALUE_NOTPOSSIBLE;\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c1b17867d38f4552", + "equalIndicator/v1": "2557263c4a65bd7777fdf7eac4af77a55bee5216d81e3fc8c41c789d5bc824e6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 438, + "startColumn": 51, + "charOffset": 11803, + "charLength": 7, + "snippet": { + "text": "oldItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 436, + "startColumn": 1, + "charOffset": 11748, + "charLength": 396, + "snippet": { + "text": "}\r\n\r\nvoid Tile::onUpdateTileItem(std::shared_ptr oldItem, const ItemType &oldType, std::shared_ptr newItem, const ItemType &newType) {\r\n\tif ((newItem->hasProperty(CONST_PROP_MOVABLE) || newItem->getContainer()) || (newItem->isWrapable() && newItem->hasProperty(CONST_PROP_MOVABLE) && !oldItem->hasProperty(CONST_PROP_BLOCKPATH))) {\r\n\t\tauto it = g_game().browseFields.find(getTile());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "da501f91bd8bff64", + "equalIndicator/v1": "256072035a23cb41f8122059c3adc707a1854588d184d56e98a5a8dc7b7324af" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6253, + "startColumn": 58, + "charOffset": 216125, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6251, + "startColumn": 1, + "charOffset": 216063, + "charLength": 251, + "snippet": { + "text": "}\r\n\r\nbool Game::internalCreatureSay(std::shared_ptr creature, SpeakClasses type, const std::string &text, bool ghostMode, Spectators* spectatorsPtr /* = nullptr*/, const Position* pos /* = nullptr*/) {\r\n\tif (text.empty()) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f2a2a786f6ec48d1", + "equalIndicator/v1": "256652c687a8e23d72fc7371e976ab250d49dd59262ec89a5b13e9263de069e3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Result of integer division used in a floating point context; possible loss of precision", + "markdown": "Result of integer division used in a floating point context; possible loss of precision" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 421, + "startColumn": 3, + "charOffset": 13904, + "charLength": 6, + "snippet": { + "text": "return" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 419, + "startColumn": 1, + "charOffset": 13853, + "charLength": 110, + "snippet": { + "text": "\t\treturn 4;\r\n\t} else if (chanceInPercent < 1) {\r\n\t\treturn 3;\r\n\t} else if (chanceInPercent < 5) {\r\n\t\treturn 2;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e23f62820cc50220", + "equalIndicator/v1": "25670d8221f53bc214cd895a952fb66208989f9c69506b8e09656145e6c384ad" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 313, + "startColumn": 94, + "charOffset": 9415, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 311, + "startColumn": 1, + "charOffset": 9317, + "charLength": 166, + "snippet": { + "text": "}\r\n\r\nvoid LuaFunctionsLoader::setItemMetatable(lua_State* L, int32_t index, std::shared_ptr item) {\r\n\tif (validateDispatcherContext(__FUNCTION__)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ea847b0d07ea53b2", + "equalIndicator/v1": "257a4b69140f365d6f705a1738f172345236296d35e7d93426cb37e3ef630a42" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 645, + "startColumn": 53, + "charOffset": 20382, + "charLength": 6, + "snippet": { + "text": "damage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 643, + "startColumn": 1, + "charOffset": 20180, + "charLength": 357, + "snippet": { + "text": "\t\t\t\t\tconst float augmentPercent = augment->value / 100.0;\r\n\t\t\t\t\tdamage.primary.value += static_cast(damage.primary.value * augmentPercent);\r\n\t\t\t\t\tdamage.secondary.value += static_cast(damage.secondary.value * augmentPercent);\r\n\t\t\t\t} else if (augment->type != Augment_t::Cooldown) {\r\n\t\t\t\t\tconst int32_t augmentValue = augment->value * 100;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6620b1d1f96b3a3f", + "equalIndicator/v1": "258f35c82eab6e5cb8d9f9819a54795fb374908ba4608a9e4d8feb8ba37c8ac6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 90, + "startColumn": 59, + "charOffset": 2596, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 88, + "startColumn": 1, + "charOffset": 2533, + "charLength": 177, + "snippet": { + "text": "}\r\n\r\nvoid WaitingList::addPlayerToList(std::shared_ptr player) {\r\n\tauto it = info->playerReferences.find(player->getGUID());\r\n\tif (it != info->playerReferences.end()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4f66d4a912ba6587", + "equalIndicator/v1": "2597aca85ca7060d201aee39351aa6c2bbd2fce35d648b4c60ab3ff70ea79e62" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/reward.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 49, + "startColumn": 1, + "charOffset": 1364, + "charLength": 4, + "snippet": { + "text": "void" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 47, + "startColumn": 1, + "charOffset": 1359, + "charLength": 228, + "snippet": { + "text": "}\r\n\r\nvoid Reward::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tstd::shared_ptr localParent = getParent();\r\n\tif (localParent != nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c968a18a98141463", + "equalIndicator/v1": "259ae1c4d8ecaabdea1f72fe615e05f612bab3dc3dff2a5116ce675f564fbf7f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::_Vector_iterator>>::value_type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::_Vector_iterator\\>\\>::value_type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 105, + "startColumn": 32, + "charOffset": 3140, + "charLength": 8, + "snippet": { + "text": "uniqueId" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 103, + "startColumn": 1, + "charOffset": 3059, + "charLength": 150, + "snippet": { + "text": "\r\n\tfor (const auto &uniqueId : uniqueIdVector) {\r\n\t\tif (registerEvent(moveEvent, uniqueId, uniqueIdMap)) {\r\n\t\t\ttmpVector.emplace_back(uniqueId);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75bdb316db2747da", + "equalIndicator/v1": "25b3332b17eed292cf325168ea9d5749e009ac5dfd714310e585834f68370b9b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'destination' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'destination' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 83, + "startColumn": 51, + "charOffset": 1949, + "charLength": 11, + "snippet": { + "text": "destination" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 81, + "startColumn": 1, + "charOffset": 1893, + "charLength": 175, + "snippet": { + "text": "};\r\n\r\nbool Bank::transferTo(const std::shared_ptr destination, uint64_t amount) {\r\n\tif (!destination) {\r\n\t\tg_logger().error(\"Bank::transferTo: destination is nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "79457339d77c6bf6", + "equalIndicator/v1": "25dd8d4b18a875834b11c0cfafe064e2c299201c9f7f790cdaeb6f5fdd168509" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1084, + "startColumn": 83, + "charOffset": 35438, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1082, + "startColumn": 1, + "charOffset": 35351, + "charLength": 230, + "snippet": { + "text": "}\r\n\r\nbool Combat::doCombat(std::shared_ptr caster, std::shared_ptr target, const Position &origin, int affected /* = 1 */) const {\r\n\t// target combat callback function\r\n\tif (params.combatType != COMBAT_NONE) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f34a7f68ba4d508c", + "equalIndicator/v1": "262d82a7e60dab8ea2c94c1e0f7a9f8afef6b4d33d0d79815b754c7331ef677f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 207, + "startColumn": 23, + "charOffset": 6466, + "charLength": 8, + "snippet": { + "text": "interval" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 205, + "startColumn": 1, + "charOffset": 6320, + "charLength": 163, + "snippet": { + "text": "\tif (callback.startScriptInterface(npcType->info.thinkEvent)) {\r\n\t\tcallback.pushSpecificCreature(static_self_cast());\r\n\t\tcallback.pushNumber(interval);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e9385139f202934b", + "equalIndicator/v1": "262f2a819635cb6393c90f3f60a4beb0ae683d36333f0e3d8877f91a664c3f52" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'name' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'name' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 325, + "startColumn": 19, + "charOffset": 12128, + "charLength": 17, + "snippet": { + "text": "const std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 323, + "startColumn": 1, + "charOffset": 12002, + "charLength": 270, + "snippet": { + "text": "\tbool getInstant(WheelInstant_t type) const;\r\n\tbool getHealingLinkUpgrade(const std::string &spell) const;\r\n\tuint8_t getStage(const std::string name) const;\r\n\tuint8_t getStage(WheelStage_t type) const;\r\n\tWheelSpellGrade_t getSpellUpgrade(const std::string &name) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8a0486c2ed307a3b", + "equalIndicator/v1": "269750ad278e3d2a0115778f562784362e1e068969b211fe8273830cb6b10a79" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 707, + "startColumn": 7, + "charOffset": 27247, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 705, + "startColumn": 1, + "charOffset": 27064, + "charLength": 332, + "snippet": { + "text": "\r\nbool EventCallback::playerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeAccept - \"\r\n\t\t \"Player {} target {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a2aa26a20e1d2cb3", + "equalIndicator/v1": "26f394706871d6be6fefa59aaa1c21e4faa1806258838736b661d51238e59ccb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8473, + "startColumn": 17, + "charOffset": 295048, + "charLength": 12, + "snippet": { + "text": "loyaltyTitle" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8471, + "startColumn": 1, + "charOffset": 294878, + "charLength": 507, + "snippet": { + "text": "\t\t\t\tconst auto &voc = g_vocations().getVocation(result->getNumber(\"vocation\"));\r\n\t\t\t\tuint8_t characterVocation = voc ? voc->getClientId() : 0;\r\n\t\t\t\tstd::string loyaltyTitle = \"\"; // todo get loyalty title from player\r\n\t\t\t\tcharacters.emplace_back(std::move(result->getString(\"name\")), result->getNumber(\"points\"), result->getNumber(\"id\"), result->getNumber(\"rank\"), result->getNumber(\"level\"), characterVocation, loyaltyTitle);\r\n\t\t\t} while (result->next());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a6a0028b1ec49817", + "equalIndicator/v1": "272c5b0c8be3d8ebf75706582bacbbaa690899ed0ae8318d98285261e1b67e53" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 690, + "startColumn": 54, + "charOffset": 21399, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 688, + "startColumn": 1, + "charOffset": 21341, + "charLength": 135, + "snippet": { + "text": "}\r\n\r\nvoid Party::updatePlayerMana(std::shared_ptr player, uint8_t manaPercent) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fe8f2323704027b5", + "equalIndicator/v1": "273a6f2995ed7cfc4b56cea28e3d88829acdb48ade79facd62f0ae53ee8f064e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2087, + "startColumn": 22, + "charOffset": 80417, + "charLength": 1, + "snippet": { + "text": "m" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2085, + "startColumn": 1, + "charOffset": 80389, + "charLength": 88, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tint32_t newCount = m - n;\r\n\t\tif (newCount > 0) {\r\n\t\t\tmoveItem = item->clone();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5d5b10a8b57f800f", + "equalIndicator/v1": "27440b3dd627f18779d6c438ba414896e7161268b7fed28129aa18ea638343c4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7506, + "startColumn": 28, + "charOffset": 261421, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7504, + "startColumn": 1, + "charOffset": 261356, + "charLength": 191, + "snippet": { + "text": "\r\nvoid Game::buildMessageAsAttacker(\r\n\tstd::shared_ptr target, const CombatDamage &damage, TextMessage &message,\r\n\tstd::stringstream &ss, const std::string &damageString\r\n) const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "27be09c19c82b87d", + "equalIndicator/v1": "274679c47f7facd87a0e33a465b63c7e33d433d39fb47db5bda916a46d478bd8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 501, + "startColumn": 54, + "charOffset": 15541, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 499, + "startColumn": 1, + "charOffset": 15435, + "charLength": 187, + "snippet": { + "text": "\tvirtual void onFollowCreatureDisappear(bool) { }\r\n\r\n\tvirtual void onCreatureSay(std::shared_ptr, SpeakClasses, const std::string &) { }\r\n\r\n\tvirtual void onPlacedCreature() { }\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2cadd361b605b56f", + "equalIndicator/v1": "275cd2af332eb154af4551ca1cf9c52d2da58045556c3396260c854d279daf48" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6726, + "startColumn": 91, + "charOffset": 198268, + "charLength": 8, + "snippet": { + "text": "duration" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6724, + "startColumn": 1, + "charOffset": 197924, + "charLength": 472, + "snippet": { + "text": "\tif (getZoneType() != ZONE_PROTECTION && checkLastAggressiveActionWithin(2000) && ((OTSYS_TIME() / 1000) % 2) == 0 && chance > 0 && randomChance < chance) {\r\n\t\tint64_t duration = g_configManager().getNumber(TRANSCENDANCE_AVATAR_DURATION, __FUNCTION__);\r\n\t\tauto outfitCondition = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_OUTFIT, duration, 0)->static_self_cast();\r\n\t\tOutfit_t outfit;\r\n\t\toutfit.lookType = getVocation()->getAvatarLookType();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3ef56c3b965ba8f3", + "equalIndicator/v1": "27621f6b8a0d0194e29ace5e4242806a7f87edb5c7aa10f07d85fc9dbabc3a69" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7522, + "startColumn": 28, + "charOffset": 261948, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7520, + "startColumn": 1, + "charOffset": 261894, + "charLength": 179, + "snippet": { + "text": "\r\nvoid Game::sendEffects(\r\n\tstd::shared_ptr target, const CombatDamage &damage, const Position &targetPos, TextMessage &message,\r\n\tconst CreatureVector &spectators\r\n) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1e6ef13b30d1254b", + "equalIndicator/v1": "2776cd7803683a194b2eeae119f347befa2302603c50f09029c52bb8d01d8dec" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 454, + "startColumn": 26, + "charOffset": 24101, + "charLength": 31, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 452, + "startColumn": 1, + "charOffset": 23926, + "charLength": 345, + "snippet": { + "text": "\tvoid internalCreatureChangeVisible(std::shared_ptr creature, bool visible);\r\n\tvoid changeLight(const std::shared_ptr creature);\r\n\tvoid updateCreatureIcon(const std::shared_ptr creature);\r\n\tvoid reloadCreature(const std::shared_ptr creature);\r\n\tvoid updateCreatureSkull(std::shared_ptr player);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d2483b4ecaf91f85", + "equalIndicator/v1": "27b3555e99e6252baada8c12a8e20a5b3e2283f685e38fdb45440f08fd425beb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 126, + "startColumn": 4, + "charOffset": 4150, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 124, + "startColumn": 1, + "charOffset": 4139, + "charLength": 157, + "snippet": { + "text": "\t\t\t}\r\n\r\n\t\t\tuint16_t category = pugi::cast(categorybase.value());\r\n\t\t\tauto category_p = getCategoryByID(category);\r\n\t\t\tif (category_p == nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eb0c613821ef2386", + "equalIndicator/v1": "27b38204122a2ce960f619e69d0f6a8233db8461a0584816f028e9b1aad45b04" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6883, + "startColumn": 28, + "charOffset": 238609, + "charLength": 91, + "snippet": { + "text": "(damage.primary.value * attackerPlayer->wheel()->checkBlessingGroveHealingByTarget(target))" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6881, + "startColumn": 1, + "charOffset": 238509, + "charLength": 209, + "snippet": { + "text": "\r\n\t\tif (attackerPlayer->wheel()->getInstant(\"Blessing of the Grove\")) {\r\n\t\t\tdamage.primary.value += (damage.primary.value * attackerPlayer->wheel()->checkBlessingGroveHealingByTarget(target)) / 100.;\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d4e7bb8d5e8d067d", + "equalIndicator/v1": "27b3c20259f7ee66db237fdaaf5546ab901fd40afdfe488b3fbacc95b6716f2d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1323, + "startColumn": 27, + "charOffset": 46942, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1321, + "startColumn": 1, + "charOffset": 46910, + "charLength": 128, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.monsterOnDropLoot, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "41e283729587845a", + "equalIndicator/v1": "27d3e25a045ca3c2538be6def47832030a7817182a6c1b31ddfdfb9419ab738d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: type", + "markdown": "Constructor does not initialize these fields: type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 19, + "startColumn": 7, + "charOffset": 564, + "charLength": 5, + "snippet": { + "text": "Charm" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 17, + "startColumn": 1, + "charOffset": 543, + "charLength": 59, + "snippet": { + "text": "class Game;\r\n\r\nclass Charm {\r\npublic:\r\n\tCharm() = default;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "12c3d66f9473ce1d", + "equalIndicator/v1": "27edb2249eefdeae6f4288c082b0d2039e74162f06e932da4e0b4c8f80006a0d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first.", + "markdown": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 735, + "startColumn": 12, + "charOffset": 23778, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 733, + "startColumn": 1, + "charOffset": 23751, + "charLength": 47, + "snippet": { + "text": "\t\t}\r\n\t} else {\r\n\t\tchance = it.hitChance;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "423ec0b3c8eb3c6d", + "equalIndicator/v1": "2823338925935ff8dbdfc0df47df06e399ff8fe4b20904a1b82af7d57ddd8831" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 192, + "startColumn": 15, + "charOffset": 7715, + "charLength": 8, + "snippet": { + "text": "addThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 190, + "startColumn": 1, + "charOffset": 7695, + "charLength": 220, + "snippet": { + "text": "\t}\r\n\r\n\tvirtual void addThing(std::shared_ptr) override { }\r\n\tvirtual void addThing(int32_t, std::shared_ptr) override { }\r\n\tvirtual void updateThing(std::shared_ptr, uint16_t, uint32_t) override { }\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "56ca6e6ff50602af", + "equalIndicator/v1": "2828fe5e99fc8c2f21a3c2ce1fc54e4728430970035254025a1da3ec68baf8eb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper_proto.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 110, + "startColumn": 9, + "charOffset": 3793, + "charLength": 12, + "snippet": { + "text": "ValueWrapper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 108, + "startColumn": 1, + "charOffset": 3770, + "charLength": 58, + "snippet": { + "text": "\t\t\tbreak;\r\n\t}\r\n\treturn ValueWrapper(data, timestamp);\r\n}\r\n" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8f9fc373df583e72", + "equalIndicator/v1": "283bf45a2fdcbd350dc43d1f0477af4f02567459e44e30041814eafa5bf6a266" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 206, + "startColumn": 43, + "charOffset": 6565, + "charLength": 9, + "snippet": { + "text": "lua_State" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 204, + "startColumn": 1, + "charOffset": 6518, + "charLength": 142, + "snippet": { + "text": "}\r\n\r\nint GameFunctions::luaGameGetMonsterCount(lua_State* L) {\r\n\t// Game.getMonsterCount()\r\n\tlua_pushnumber(L, g_game().getMonstersOnline());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0e8d47f46675542b", + "equalIndicator/v1": "285e9a2c5cec1e5e4c162fad37e9302232c6102e2c8addde32b79a4daeea8721" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 299, + "startColumn": 6, + "charOffset": 10252, + "charLength": 80, + "snippet": { + "text": "// We will only return the MonsterType if it match the exact name of the monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 297, + "startColumn": 1, + "charOffset": 10174, + "charLength": 241, + "snippet": { + "text": "\tif (auto it = monsters.find(lowerCaseName);\r\n\t it != monsters.end()\r\n\t // We will only return the MonsterType if it match the exact name of the monster\r\n\t && it->first.find(lowerCaseName) != it->first.npos) {\r\n\t\treturn it->second;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a016dae5ac3f77c1", + "equalIndicator/v1": "286209001eca15b4dc4b5cf21386fbf04b6dae3bc8e295c3e7544e8764c1b842" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8998, + "startColumn": 15, + "charOffset": 314566, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8996, + "startColumn": 1, + "charOffset": 314504, + "charLength": 106, + "snippet": { + "text": "\t\t\tint32_t subType;\r\n\t\t\tif (it.charges != 0) {\r\n\t\t\t\tsubType = it.charges;\r\n\t\t\t} else {\r\n\t\t\t\tsubType = -1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "624e044ee240cb18", + "equalIndicator/v1": "286225f936f4ce73d25aaf4df1b383b7343e29db102fee6b9e7eff659bb374b6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'unsigned long long'", + "markdown": "Narrowing conversion from 'float' to 'unsigned long long'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 190, + "startColumn": 3, + "charOffset": 5444, + "charLength": 6, + "snippet": { + "text": "return" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 188, + "startColumn": 1, + "charOffset": 5435, + "charLength": 28, + "snippet": { + "text": "\t\t}\r\n\r\n\t\treturn list;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "12db9b05e8de7764", + "equalIndicator/v1": "286502dd89459eea88574cd29a7ca2b1f5a92c35ccdba2764e5f7cb7e1414e0b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'newParty' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'newParty' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5697, + "startColumn": 56, + "charOffset": 168363, + "charLength": 8, + "snippet": { + "text": "newParty" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5695, + "startColumn": 1, + "charOffset": 168303, + "charLength": 190, + "snippet": { + "text": "}\r\n\r\nbool Player::addPartyInvitation(std::shared_ptr newParty) {\r\n\tauto it = std::find(invitePartyList.begin(), invitePartyList.end(), newParty);\r\n\tif (it != invitePartyList.end()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "02f08b537ef3aa81", + "equalIndicator/v1": "287e59bd86896e48c17d647839ea5ecacd020cb9a104057a312fc9897af0c648" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Qualified name 'Item::readAttr' refers to a member overridden in subclass; did you mean 'Container'?", + "markdown": "Qualified name 'Item::readAttr' refers to a member overridden in subclass; did you mean 'Container'?" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotlocker.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 24, + "startColumn": 9, + "charOffset": 788, + "charLength": 14, + "snippet": { + "text": "Item::readAttr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 22, + "startColumn": 1, + "charOffset": 746, + "charLength": 81, + "snippet": { + "text": "\t\treturn ATTR_READ_CONTINUE;\r\n\t}\r\n\treturn Item::readAttr(attr, propStream);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bf9e89c796e03a71", + "equalIndicator/v1": "28e17c27594ddc9233a9527e5596de1d91348b374d65df0b21137c00f8a0dc55" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 741, + "startColumn": 51, + "charOffset": 23357, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 739, + "startColumn": 1, + "charOffset": 23302, + "charLength": 139, + "snippet": { + "text": "}\r\n\r\nvoid Party::addPlayerLoot(std::shared_ptr player, std::shared_ptr item) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bd3c2210d715b3f2", + "equalIndicator/v1": "28f272517721f59482201afa0b0a64b6b38cca96f0f6c48408e96013bdc69840" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Replace loop by 'std::ranges::any_of()'", + "markdown": "Replace loop by 'std::ranges::any_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1160, + "startColumn": 2, + "charOffset": 35027, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1158, + "startColumn": 1, + "charOffset": 34954, + "charLength": 228, + "snippet": { + "text": "\tstd::shuffle(dirList.begin(), dirList.end(), getRandomGenerator());\r\n\r\n\tfor (Direction dir : dirList) {\r\n\t\tconst Position &tryPos = Spells::getCasterPosition(creature, dir);\r\n\t\tconst auto toTile = g_game().map.getTile(tryPos);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "67e5f16ea5930ca1", + "equalIndicator/v1": "28fb25ef35e6b6f2b5268199bd99ba15bae5b3bc008d57dde3a4c764d7dbd93a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 565, + "startColumn": 3, + "charOffset": 13246, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 563, + "startColumn": 1, + "charOffset": 13180, + "charLength": 182, + "snippet": { + "text": "\tstd::shared_ptr thing = getThing(L, 2);\r\n\tif (thing) {\r\n\t\tuint32_t flags = getNumber(L, 3, 0);\r\n\t\tlua_pushnumber(L, tile->queryAdd(0, thing, 1, flags));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "52183bd3d39ac243", + "equalIndicator/v1": "291bc8165c06d7da7589f67c8cfb00aff077dd55fb426efe742aeaf056a5ad60" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'sep' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'sep' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/talkaction.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 51, + "startColumn": 15, + "charOffset": 1311, + "charLength": 3, + "snippet": { + "text": "sep" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 49, + "startColumn": 1, + "charOffset": 1254, + "charLength": 68, + "snippet": { + "text": "\t}\r\n\tvoid setSeparator(std::string sep) {\r\n\t\tseparator = sep;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71e085cd43da236a", + "equalIndicator/v1": "29259d16cc263d3aba99401a30f860e13a74bd623ab6184e2f2569d8fe848fd5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 10269, + "startColumn": 54, + "charOffset": 357047, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10267, + "startColumn": 1, + "charOffset": 356989, + "charLength": 179, + "snippet": { + "text": "}\r\n\r\nbool Game::addItemStoreInbox(std::shared_ptr player, uint32_t itemId) {\r\n\tstd::shared_ptr decoKit = Item::CreateItem(ITEM_DECORATION_KIT, 1);\r\n\tif (!decoKit) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "832e62204c238652", + "equalIndicator/v1": "29511d753d8ebd2d695830341f64c6a4402f2dce56e524b9c6b9eff5a37781c5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float'", + "markdown": "Narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 140, + "startColumn": 75, + "charOffset": 4407, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 138, + "startColumn": 1, + "charOffset": 4285, + "charLength": 145, + "snippet": { + "text": "\tif (it.hasSubType()) {\r\n\t\tif (it.stackable) {\r\n\t\t\titemCount = static_cast(std::ceil(static_cast(count) / it.stackSize));\r\n\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ed09e21d8ba953c2", + "equalIndicator/v1": "29654af01d2b0301004bc979e9eeadfb1ded3726f8b1edf129af25d6ace53a6e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1208, + "startColumn": 27, + "charOffset": 43117, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1206, + "startColumn": 1, + "charOffset": 43085, + "charLength": 134, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnRequestQuestLog, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "330357aac5eb3ceb", + "equalIndicator/v1": "29a090c25814c2f07bae2ed59fc1ad746c5caa97e033ca5494d478ce30a95d41" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1372, + "startColumn": 3, + "charOffset": 39974, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1370, + "startColumn": 1, + "charOffset": 39912, + "charLength": 173, + "snippet": { + "text": "\r\n\tif (const CreatureVector* creatures = getCreatures()) {\r\n\t\tfor (auto it = creatures->rbegin(); it != creatures->rend(); ++it) {\r\n\t\t\tif (*it == creature) {\r\n\t\t\t\treturn n;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "973dfd0537f61d0b", + "equalIndicator/v1": "29a9e0edfac93f09626bb87ef3883524cf924f58afa3c0fc7c48e59afec13719" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 66, + "startColumn": 8, + "charOffset": 1773, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 64, + "startColumn": 1, + "charOffset": 1665, + "charLength": 231, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsFluidContainer(lua_State* L) {\r\n\t// itemType:isFluidContainer()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isFluidContainer());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d122d1fda38fbb34", + "equalIndicator/v1": "29d7939266029e5555040c32ea29b0af35178d73ae5301f682eea9d08c49b3b1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 897, + "startColumn": 19, + "charOffset": 27084, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 895, + "startColumn": 1, + "charOffset": 27002, + "charLength": 107, + "snippet": { + "text": "\titem->setParent(getContainer());\r\n\titemlist.push_front(item);\r\n\tupdateItemWeight(item->getWeight());\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eddd52c2bdd4c52e", + "equalIndicator/v1": "29fcd513f23e8c9a076324e31921a2fc6972f803d7d1943c20cd481973091b98" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6429, + "startColumn": 50, + "charOffset": 222034, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6427, + "startColumn": 1, + "charOffset": 221980, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nvoid Game::changeLight(std::shared_ptr creature) {\r\n\t// Send to clients\r\n\tfor (const auto &spectator : Spectators().find(creature->getPosition(), true)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3d17603c0a08bece", + "equalIndicator/v1": "29fdf714f2317ede41072a4d404ac711d70c5ba6a49d887da2b47db4a5ed81a2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 268, + "startColumn": 45, + "charOffset": 9934, + "charLength": 5, + "snippet": { + "text": "party" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 266, + "startColumn": 1, + "charOffset": 9835, + "charLength": 161, + "snippet": { + "text": "\tgetScriptInterface()->pushFunction(getScriptId());\r\n\r\n\tLuaScriptInterface::pushUserdata(L, party);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Party\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b0bb047a13c69f8b", + "equalIndicator/v1": "2a733927013da26a991ecfee4bf605279892344db29a2d8fe64050d1a2874d1c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 170, + "startColumn": 60, + "charOffset": 4040, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 168, + "startColumn": 1, + "charOffset": 3976, + "charLength": 131, + "snippet": { + "text": "}\r\n\r\nbool Condition::executeCondition(std::shared_ptr creature, int32_t interval) {\r\n\tif (ticks == -1) {\r\n\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3a5b7a4682bc0533", + "equalIndicator/v1": "2a7b904d6cf46b78835bf38f9ab07495b38e7d8d1dc69fd751139a079628a714" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6945, + "startColumn": 57, + "charOffset": 241364, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6943, + "startColumn": 1, + "charOffset": 241303, + "charLength": 231, + "snippet": { + "text": "}\r\n\r\nbool Game::combatChangeHealth(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage, bool isEvent /*= false*/) {\r\n\tusing namespace std;\r\n\tconst Position &targetPos = target->getPosition();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3fcdd55d15be53fa", + "equalIndicator/v1": "2aafa068ceb73f6bd60dad7a1b7584454d3202e391e887b7be3f10145070435d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 182, + "startColumn": 22, + "charOffset": 7222, + "charLength": 13, + "snippet": { + "text": "queryMaxCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 180, + "startColumn": 1, + "charOffset": 7162, + "charLength": 197, + "snippet": { + "text": "\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r\n\tvirtual ReturnValue queryMaxCount(int32_t, const std::shared_ptr &, uint32_t, uint32_t &, uint32_t) override {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cd24754635429e96", + "equalIndicator/v1": "2ae250fc4fe1ead707d65201528e7dd094a231fcfe3f5dddf3cf12670bcffbc8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 440, + "startColumn": 9, + "charOffset": 12213, + "charLength": 26, + "snippet": { + "text": "(defenseSkill / 4. + 2.23)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 438, + "startColumn": 1, + "charOffset": 12199, + "charLength": 120, + "snippet": { + "text": "\t}\r\n\r\n\treturn (defenseSkill / 4. + 2.23) * defenseValue * 0.15 * getDefenseFactor() * vocation->defenseMultiplier;\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ef05246437d4b792", + "equalIndicator/v1": "2ae78c6634ca30b0faacdc2170f8957e78aa8bd96f98c5f5e44b1e6da0655258" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3010, + "startColumn": 29, + "charOffset": 80369, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3008, + "startColumn": 1, + "charOffset": 80289, + "charLength": 181, + "snippet": { + "text": "\r\n\tstd::shared_ptr tile = player->getTile();\r\n\tconst Position &position = player->getPosition();\r\n\r\n\tfor (const auto &spectator : Spectators().find(position, true)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "022ca6acc643a135", + "equalIndicator/v1": "2b1d293178e22dd7b85859a21e6b8aecc1dfe6560eb39fdad3b8239df9ba553e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Return type 'const Outfit_t' is 'const'-qualified at the top level, which may reduce code readability without improving const correctness", + "markdown": "Return type 'const Outfit_t' is 'const'-qualified at the top level, which may reduce code readability without improving const correctness" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 275, + "startColumn": 2, + "charOffset": 6794, + "charLength": 14, + "snippet": { + "text": "const Outfit_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 273, + "startColumn": 1, + "charOffset": 6769, + "charLength": 96, + "snippet": { + "text": "\tvoid iconChanged();\r\n\r\n\tconst Outfit_t getCurrentOutfit() const {\r\n\t\treturn currentOutfit;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ab321d1afefe6f40", + "equalIndicator/v1": "2b356d37e9800c50965d644d4792ad2518db1005293087754e869253ff010528" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 394, + "startColumn": 61, + "charOffset": 13858, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 392, + "startColumn": 1, + "charOffset": 13793, + "charLength": 275, + "snippet": { + "text": "}\r\n\r\nvoid IOPrey::parseTaskHuntingAction(std::shared_ptr player, PreySlot_t slotId, PreyTaskAction_t action, bool upgrade, uint16_t raceId) const {\r\n\tconst auto &slot = player->getTaskHuntingSlotById(slotId);\r\n\tif (!slot || slot->state == PreyTaskDataState_Locked) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b5c94e940c876d1a", + "equalIndicator/v1": "2b3b0c2e248e2e310daddf22ff4c4255fd6857dbfb4750a23d1d62de97b462fb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 955, + "startColumn": 126, + "charOffset": 34511, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 953, + "startColumn": 1, + "charOffset": 34381, + "charLength": 220, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) {\r\n\t// Player:onTradeRequest(target, item)\r\n\tif (info.playerOnTradeRequest == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ec25cdbf7bc3a3f7", + "equalIndicator/v1": "2b4971f48cc273d5bc04cc2ce31e6420715e4725958c794739ccbf9b8bba56d7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1912, + "startColumn": 2, + "charOffset": 58137, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1910, + "startColumn": 1, + "charOffset": 58079, + "charLength": 216, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseFollow(NetworkMessage &msg) {\r\n\tuint32_t creatureId = msg.get();\r\n\t// msg.get(); creatureId (same as above)\r\n\tg_game().playerFollowCreature(player->getID(), creatureId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bfb342996dd95560", + "equalIndicator/v1": "2b4d6e76ede29447092f36768a6c519b3d98961ed545b8b27962cd396c610525" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 61, + "startColumn": 31, + "charOffset": 1597, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 59, + "startColumn": 1, + "charOffset": 1548, + "charLength": 139, + "snippet": { + "text": "\r\n\tint index = 0;\r\n\tfor (std::shared_ptr player : members) {\r\n\t\tpushUserdata(L, player);\r\n\t\tsetMetatable(L, -1, \"Player\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "632ec081d46e80eb", + "equalIndicator/v1": "2b623f5e4b0b14e7ec9b3f336a2e8e37f37c8c162555ce8d8af213cb544d614b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 233, + "startColumn": 2, + "charOffset": 6463, + "charLength": 7, + "snippet": { + "text": "int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 231, + "startColumn": 1, + "charOffset": 6456, + "charLength": 134, + "snippet": { + "text": "\t}\r\n\r\n\tint32_t subType = getNumber(L, 3, -1);\r\n\tlua_pushnumber(L, container->getItemTypeCount(itemId, subType));\r\n\treturn 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bfd2ae08fec24839", + "equalIndicator/v1": "2b94a9427c08a5526126de39d726205b3681c6bf09df255f53f03c2671cc5a21" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2389, + "startColumn": 57, + "charOffset": 70628, + "charLength": 6, + "snippet": { + "text": "rawExp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2387, + "startColumn": 1, + "charOffset": 70494, + "charLength": 227, + "snippet": { + "text": "\t\tg_metrics().addCounter(\"player_experience_actual\", exp, attrs);\r\n\t} else {\r\n\t\tg_metrics().addCounter(\"player_experience_bonus_raw\", rawExp, attrs);\r\n\t\tg_metrics().addCounter(\"player_experience_bonus_actual\", exp, attrs);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "828e82e63b8894f0", + "equalIndicator/v1": "2b9afbb2c267e03ae569cee2d7d3ae91fe54824fc95f00ec58ec425ed0279474" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2314, + "startColumn": 14, + "charOffset": 66592, + "charLength": 4, + "snippet": { + "text": "text" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2312, + "startColumn": 1, + "charOffset": 66403, + "charLength": 226, + "snippet": { + "text": "\r\nstd::string Item::getDescription(const ItemType &it, int32_t lookDistance, std::shared_ptr item /*= nullptr*/, int32_t subType /*= -1*/, bool addArticle /*= true*/) {\r\n\tstd::string text = \"\";\r\n\r\n\tstd::ostringstream s;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "18f82c9fd9504e92", + "equalIndicator/v1": "2bbc100a6b884d11b3401146b319b8fecd13249a2760b4f10a56b949854683cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Passing result of std::move() as a const reference argument; no move will actually happen", + "markdown": "Passing result of std::move() as a const reference argument; no move will actually happen" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3791, + "startColumn": 34, + "charOffset": 113566, + "charLength": 9, + "snippet": { + "text": "std::move" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3789, + "startColumn": 1, + "charOffset": 113482, + "charLength": 169, + "snippet": { + "text": "\t\t\tcount += itemCount;\r\n\t\t\tif (count >= amount) {\r\n\t\t\t\tg_game().internalRemoveItems(std::move(itemList), amount, Item::items[itemId].stackable);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cf885bd080a84ce0", + "equalIndicator/v1": "2be895c2aa8829cc2e974caedea756921b7fc767ebf866aa5118e290ec8f75ea" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/ban.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 61, + "startColumn": 2, + "charOffset": 1803, + "charLength": 7, + "snippet": { + "text": "int64_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 59, + "startColumn": 1, + "charOffset": 1796, + "charLength": 170, + "snippet": { + "text": "\t}\r\n\r\n\tint64_t expiresAt = result->getNumber(\"expires_at\");\r\n\tif (expiresAt != 0 && time(nullptr) > expiresAt) {\r\n\t\t// Move the ban to history if it has expired\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "211a56ceaae55117", + "equalIndicator/v1": "2beb90151916aaaef4f8e80352a1fd9bb9cadaf6cddc42e208b20946f2855577" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1719, + "startColumn": 2, + "charOffset": 51519, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1717, + "startColumn": 1, + "charOffset": 51426, + "charLength": 201, + "snippet": { + "text": "void ProtocolGame::parseUseItem(NetworkMessage &msg) {\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tuint8_t index = msg.getByte();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ec8db8e2a4b29217", + "equalIndicator/v1": "2bed0b78780cb9638c3d88b02c4497187758a979c3b1acb60c1ef0e248df94d5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1220, + "startColumn": 31, + "charOffset": 35923, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1218, + "startColumn": 1, + "charOffset": 35812, + "charLength": 131, + "snippet": { + "text": "\tvoid sendCreatureShield(std::shared_ptr creature) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureShield(creature);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3191de1f2a11a81e", + "equalIndicator/v1": "2c00eab67dd8e4df372c66576bb9991b6a9398b46bd2c548ab1b192e1cbf6170" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 144, + "startColumn": 28, + "charOffset": 4352, + "charLength": 16, + "snippet": { + "text": "queryDestination" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 142, + "startColumn": 1, + "charOffset": 4018, + "charLength": 534, + "snippet": { + "text": "\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override final;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override final;\r\n\r\n\tvoid addThing(std::shared_ptr thing) override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5bb15842f42256d5", + "equalIndicator/v1": "2c1697e99e300c551398cefd27141df74335c8f09d56efe235c9330c23b07cf3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 877, + "startColumn": 27, + "charOffset": 31843, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 875, + "startColumn": 1, + "charOffset": 31811, + "charLength": 138, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnReportRuleViolation, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b082a7a5d65e9d83", + "equalIndicator/v1": "2c46a4ed5c9b064c0f7ebf016810809186cf107c35058f1ac12bfd3d7430e953" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'actor' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'actor' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6474, + "startColumn": 148, + "charOffset": 223503, + "charLength": 5, + "snippet": { + "text": "actor" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6472, + "startColumn": 1, + "charOffset": 223351, + "charLength": 287, + "snippet": { + "text": "}\r\n\r\nvoid Game::sendDoubleSoundEffect(const Position &pos, SoundEffect_t mainSoundEffect, SoundEffect_t secondarySoundEffect, std::shared_ptr actor /* = nullptr*/) {\r\n\tif (secondarySoundEffect == SoundEffect_t::SILENCE) {\r\n\t\tsendSingleSoundEffect(pos, mainSoundEffect, actor);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4f085532007af75b", + "equalIndicator/v1": "2c4c53d5593f933f481b9a5a34dde9e8958fdcdea5d90a4f8b41c5abfc84e03d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 887, + "startColumn": 21, + "charOffset": 24708, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 885, + "startColumn": 1, + "charOffset": 24682, + "charLength": 77, + "snippet": { + "text": "\t}\r\n\r\n\tlua_createtable(L, creature->getSummonCount(), 0);\r\n\r\n\tint index = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8f2b8ab940ab02b9", + "equalIndicator/v1": "2c4d3eeb9dd7c947f0eced1229a3234191661c019f291d89fb6a9b842d4f1edb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/position.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 94, + "startColumn": 10, + "charOffset": 3121, + "charLength": 8, + "snippet": { + "text": "Position" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 92, + "startColumn": 1, + "charOffset": 3061, + "charLength": 106, + "snippet": { + "text": "\r\n\tPosition operator-(const Position &p1) const {\r\n\t\treturn Position(x - p1.x, y - p1.y, z - p1.z);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "03763ca0d07c7af6", + "equalIndicator/v1": "2c5c5dd78d6ede7657a99f3a9e6fe9aefb17921a5915985f2e8f81e2ef82a067" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5692, + "startColumn": 59, + "charOffset": 168223, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5690, + "startColumn": 1, + "charOffset": 168160, + "charLength": 142, + "snippet": { + "text": "}\r\n\r\nvoid Player::sendPlayerPartyIcons(std::shared_ptr player) {\r\n\tsendPartyCreatureShield(player);\r\n\tsendPartyCreatureSkull(player);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a2042ea58fee600a", + "equalIndicator/v1": "2c8fd558e70a369bf88c8224eb7e868f20e6815390221e1776a10002a6ab0d26" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 229, + "startColumn": 10, + "charOffset": 6576, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 227, + "startColumn": 1, + "charOffset": 6527, + "charLength": 107, + "snippet": { + "text": "\t}\r\n\tif (row[it->second] == nullptr) {\r\n\t\treturn std::string();\r\n\t}\r\n\treturn std::string(row[it->second]);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fd67b1352325e7fd", + "equalIndicator/v1": "2ca54248d6283e17fa3fc74e807393f06e63b65618278c1aa06398c4c398604d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 247, + "startColumn": 89, + "charOffset": 7522, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 245, + "startColumn": 1, + "charOffset": 7429, + "charLength": 210, + "snippet": { + "text": "}\r\n\r\nReturnValue Combat::canDoCombat(std::shared_ptr caster, std::shared_ptr tile, bool aggressive) {\r\n\tif (tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) {\r\n\t\treturn RETURNVALUE_NOTENOUGHROOM;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e868eec7783a1aed", + "equalIndicator/v1": "2ce797960eecb5af127db0bcd2ba61518da0c05950907ff0a7ecf3cc537658ff" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 210, + "startColumn": 68, + "charOffset": 5766, + "charLength": 6, + "snippet": { + "text": "action" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 208, + "startColumn": 1, + "charOffset": 5693, + "charLength": 135, + "snippet": { + "text": "\t}\r\n\r\n\tvoid setActionId(uint16_t actionId, const std::shared_ptr action) {\r\n\t\tactionItemMap.try_emplace(actionId, action);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bbf870f4a86531f3", + "equalIndicator/v1": "2d138927d381728b57d290403e3d45581289df49fd10891c1550bc881ea5cb5e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 209, + "startColumn": 17, + "charOffset": 5151, + "charLength": 3, + "snippet": { + "text": "key" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 207, + "startColumn": 1, + "charOffset": 5063, + "charLength": 102, + "snippet": { + "text": "\tfor (uint8_t i = 0; i < key.length(); ++i) {\r\n\t\tiKeyPad[i] ^= key[i];\r\n\t\toKeyPad[i] ^= key[i];\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "72fe595218e5ba87", + "equalIndicator/v1": "2d3ad2afda1681d95d7319c4083b9693503436937e1ab3d4c10585c0984f3eef" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead", + "markdown": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 663, + "startColumn": 57, + "charOffset": 17768, + "charLength": 9, + "snippet": { + "text": "std::atoi" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 661, + "startColumn": 1, + "charOffset": 17635, + "charLength": 180, + "snippet": { + "text": "\t\t\t\tremoveAttribute(ItemAttribute_t::SPECIAL);\r\n\t\t\t\t// Add custom attribute\r\n\t\t\t\tsetCustomAttribute(\"Hireling\", static_cast(std::atoi(special.c_str())));\r\n\t\t\t}\r\n\t\t\tbreak;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "21d736268e0f4d35", + "equalIndicator/v1": "2d3da65c6274e299b31c836bfe2d3102bbda3a2430f0f8d98af65c97711a4402" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1730, + "startColumn": 2, + "charOffset": 51928, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1728, + "startColumn": 1, + "charOffset": 51849, + "charLength": 267, + "snippet": { + "text": "\tuint8_t fromStackPos = msg.getByte();\r\n\tPosition toPos = msg.getPosition();\r\n\tuint16_t toItemId = msg.get();\r\n\tuint8_t toStackPos = msg.getByte();\r\n\tg_game().playerUseItemEx(player->getID(), fromPos, fromStackPos, fromItemId, toPos, toStackPos, toItemId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8e50088f57a192ca", + "equalIndicator/v1": "2d42ea1713ef5be27464019c7e55dc4daff42a5a40633cf23f1e51c3fe76ca99" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6198, + "startColumn": 53, + "charOffset": 214298, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6196, + "startColumn": 1, + "charOffset": 214241, + "charLength": 188, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerSpeakToNpc(std::shared_ptr player, const std::string &text) {\r\n\tif (player == nullptr) {\r\n\t\tg_logger().error(\"[Game::playerSpeakToNpc] - Player is nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "772e7fda692f8a42", + "equalIndicator/v1": "2d57b004b73d59359af05a67e1a350b4e8af7cf378822b0f92985811a409c21b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 360, + "startColumn": 8, + "charOffset": 8992, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 358, + "startColumn": 1, + "charOffset": 8892, + "charLength": 217, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetHitChance(lua_State* L) {\r\n\t// itemType:getHitChance()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->hitChance);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e08f5fbbc3363ec7", + "equalIndicator/v1": "2d5b6bab69b826b864ea3f93fbed14767f86c29f5f3f424a852be00a83d51ada" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'AddItem' can be made const", + "markdown": "Method 'AddItem' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 254, + "startColumn": 20, + "charOffset": 10097, + "charLength": 7, + "snippet": { + "text": "AddItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 252, + "startColumn": 1, + "charOffset": 10073, + "charLength": 139, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::AddItem(NetworkMessage &msg, uint16_t id, uint8_t count, uint8_t tier) {\r\n\tconst ItemType &it = Item::items[id];\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8e695e19ae023d34", + "equalIndicator/v1": "2d5ee958a923f0a7d8f4f7b3fed0612085ab140460ac2016d991a7ed7f9d28a1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6858, + "startColumn": 20, + "charOffset": 237669, + "charLength": 15, + "snippet": { + "text": "levelDifference" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6856, + "startColumn": 1, + "charOffset": 237516, + "charLength": 205, + "snippet": { + "text": "\t} else {\r\n\t\tfloat rateDamageReductionByLevel = g_configManager().getFloat(PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, __FUNCTION__) / 100;\r\n\t\tlevelDiffRate -= levelDifference * rateDamageReductionByLevel;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cdbec88089ec0c9b", + "equalIndicator/v1": "2d92b4c91da3253c5fb509063c67597a0a2001e86e42a0429ad55a03f77eac7e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'mount' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'mount' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5949, + "startColumn": 52, + "charOffset": 174927, + "charLength": 5, + "snippet": { + "text": "mount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5947, + "startColumn": 1, + "charOffset": 174871, + "charLength": 113, + "snippet": { + "text": "}\r\n\r\nbool Player::hasMount(const std::shared_ptr mount) const {\r\n\tif (isAccessPlayer()) {\r\n\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9e6c7d576338c5d6", + "equalIndicator/v1": "2e032cad7b12d043a5e551390c78e3c2e71e162f5329df507237c656910c515c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1054, + "startColumn": 20, + "charOffset": 38052, + "charLength": 6, + "snippet": { + "text": "rawExp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1052, + "startColumn": 1, + "charOffset": 38005, + "charLength": 111, + "snippet": { + "text": "\r\n\tlua_pushnumber(L, exp);\r\n\tlua_pushnumber(L, rawExp);\r\n\r\n\tif (scriptInterface.protectedCall(L, 4, 1) != 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0ff246aac40d4230", + "equalIndicator/v1": "2e1957ec451a846848693088d92c066f78b90a08fffc68fdb1e2ed1d63040b11" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use nullptr", + "markdown": "Use nullptr" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 507, + "startColumn": 20, + "charOffset": 29451, + "charLength": 1, + "snippet": { + "text": "0" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 505, + "startColumn": 1, + "charOffset": 29402, + "charLength": 117, + "snippet": { + "text": "\tserviceManager = manager;\r\n\r\n\ttime_t now = time(0);\r\n\tconst tm* tms = localtime(&now);\r\n\tint minutes = tms->tm_min;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "22ac3d33f0b80737", + "equalIndicator/v1": "2e32303df4cdf2f2a5dfc5f68e0b4acca7831d08e1a87698686800ac9c889fe3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6657, + "startColumn": 27, + "charOffset": 231422, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6655, + "startColumn": 1, + "charOffset": 231347, + "charLength": 127, + "snippet": { + "text": "\r\n\tif (damage.primary.type == COMBAT_HEALING) {\r\n\t\tdamage.primary.value *= target->getBuff(BUFF_HEALINGRECEIVED) / 100.;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2af49459099c0b72", + "equalIndicator/v1": "2e37f9ad1be84700b15b1a4fec14d21e49d1024e221888b587cf6eb2ff6e21bd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8375, + "startColumn": 61, + "charOffset": 265510, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8373, + "startColumn": 1, + "charOffset": 265445, + "charLength": 128, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::reloadCreature(std::shared_ptr creature) {\r\n\tif (!creature || !canSee(creature)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f41507ada27c09f7", + "equalIndicator/v1": "2e6c057a20d1c1a2a5c8d8789e96c48d8150ebd85f2e41ee3a996cdd9ec02ba6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 306, + "startColumn": 95, + "charOffset": 9640, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 304, + "startColumn": 1, + "charOffset": 9541, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nReturnValue Combat::canDoCombat(std::shared_ptr attacker, std::shared_ptr target, bool aggressive) {\r\n\tif (!aggressive) {\r\n\t\treturn RETURNVALUE_NOERROR;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fc8fe02ed675195e", + "equalIndicator/v1": "2e8a7f9289e7319106ca3a3a40bac451bb23f364efd776a2e8e399120cac8c64" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6495, + "startColumn": 75, + "charOffset": 224156, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6493, + "startColumn": 1, + "charOffset": 224077, + "charLength": 273, + "snippet": { + "text": "}\r\n\r\nbool Game::combatBlockHit(CombatDamage &damage, std::shared_ptr attacker, std::shared_ptr target, bool checkDefense, bool checkArmor, bool field) {\r\n\tif (damage.primary.type == COMBAT_NONE && damage.secondary.type == COMBAT_NONE) {\r\n\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0d63c89ed2938f8b", + "equalIndicator/v1": "2e925c7e0f27158782e85052748f801e706f2f2766474a2ceed7161f61cfabe3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3122, + "startColumn": 2, + "charOffset": 95750, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3120, + "startColumn": 1, + "charOffset": 95639, + "charLength": 246, + "snippet": { + "text": "void ProtocolGame::parseMarketCancelOffer(NetworkMessage &msg) {\r\n\tuint32_t timestamp = msg.get();\r\n\tuint16_t counter = msg.get();\r\n\tif (counter > 0) {\r\n\t\tg_game().playerCancelMarketOffer(player->getID(), timestamp, counter);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e2d70091d85e53d2", + "equalIndicator/v1": "2e931276f40852678f626787baffbc846540164d31e49ac85c5add6540a9f9bf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'addThing' is within a recursive call chain", + "markdown": "Function 'addThing' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 990, + "startColumn": 12, + "charOffset": 30152, + "charLength": 8, + "snippet": { + "text": "addThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 988, + "startColumn": 1, + "charOffset": 30136, + "charLength": 121, + "snippet": { + "text": "}\r\n\r\nvoid Tile::addThing(int32_t, std::shared_ptr thing) {\r\n\tif (!thing) {\r\n\t\treturn /*RETURNVALUE_NOTPOSSIBLE*/;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d129fe84b1479bff", + "equalIndicator/v1": "2ea8a7d6e6dae367104247ab058474426776c9299d0530272607dcc0820ccb63" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 233, + "startColumn": 7, + "charOffset": 8038, + "charLength": 7, + "snippet": { + "text": "int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 231, + "startColumn": 1, + "charOffset": 8005, + "charLength": 120, + "snippet": { + "text": "\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tint32_t bonus = pugi::cast(attr.value());\r\n\r\n\t\t\t\t\t\tif (usenormalskill == 1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cf95055e230e71ae", + "equalIndicator/v1": "2ebc53711dfad69663de2d08c10e6e3e0698c24f64fab52f7da7d81fb82404d0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1076, + "startColumn": 49, + "charOffset": 35092, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1074, + "startColumn": 1, + "charOffset": 35039, + "charLength": 214, + "snippet": { + "text": "}\r\n\r\nbool Combat::doCombat(std::shared_ptr caster, std::shared_ptr target) const {\r\n\tif (caster != nullptr && params.chainCallback) {\r\n\t\treturn doCombatChain(caster, target, params.aggressive);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b85e299a3a7e55fe", + "equalIndicator/v1": "2ecefdb7147dae97bfdc1f8c3c4cfe8df73bf222de4ad492e8f3acdf052eed2f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6818, + "startColumn": 74, + "charOffset": 213927, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6816, + "startColumn": 1, + "charOffset": 213849, + "charLength": 122, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendInventoryItem(Slots_t slot, std::shared_ptr item) {\r\n\tNetworkMessage msg;\r\n\tif (item) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9b91b0c732974d57", + "equalIndicator/v1": "2edaefbcc9e6ddc7cba29725ebf02f93e834c608e8a8d02c7985b01d54d99d86" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 189, + "startColumn": 73, + "charOffset": 5939, + "charLength": 5, + "snippet": { + "text": "thing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 187, + "startColumn": 1, + "charOffset": 5862, + "charLength": 146, + "snippet": { + "text": "}\r\n\r\nvoid LuaFunctionsLoader::pushThing(lua_State* L, std::shared_ptr thing) {\r\n\tif (validateDispatcherContext(__FUNCTION__)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0ba6b0f511997369", + "equalIndicator/v1": "2efe32d327d1fd95b2227da095dc9a2298cf8c68f3fabb8734351233671e0b87" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'applyWheelOfDestinyHealing' is within a recursive call chain", + "markdown": "Function 'applyWheelOfDestinyHealing' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6865, + "startColumn": 12, + "charOffset": 237798, + "charLength": 26, + "snippet": { + "text": "applyWheelOfDestinyHealing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6863, + "startColumn": 1, + "charOffset": 237749, + "charLength": 260, + "snippet": { + "text": "\r\n// Wheel of destiny combat helpers\r\nvoid Game::applyWheelOfDestinyHealing(CombatDamage &damage, std::shared_ptr attackerPlayer, std::shared_ptr target) {\r\n\tdamage.primary.value += (damage.primary.value * damage.healingMultiplier) / 100.;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9c0cacec1fc9315f", + "equalIndicator/v1": "2f39b3d878f0849cbfb538dedf4c2b0c8549dbff4564885ba4e346d782e54498" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 836, + "startColumn": 7, + "charOffset": 26818, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 834, + "startColumn": 1, + "charOffset": 26749, + "charLength": 231, + "snippet": { + "text": "\t// onaddItem(moveitem, pos)\r\n\t// onRemoveItem(moveitem, pos)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[MoveEvent::executeAddRemItem - \"\r\n\t\t \"Item {} item on tile x: {} y: {} z: {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b0d94b27f4f59ccd", + "equalIndicator/v1": "2f470433602c07e3c980ed84af5bb68cadd1f071295984e60a6bea473483fa22" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 198, + "startColumn": 15, + "charOffset": 8081, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 196, + "startColumn": 1, + "charOffset": 7991, + "charLength": 354, + "snippet": { + "text": "\tvirtual void removeThing(std::shared_ptr, uint32_t) override { }\r\n\r\n\tvirtual void postAddNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r\n\tvirtual void postRemoveNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3f042b2848f49453", + "equalIndicator/v1": "2f53376349e4d9a7f598f1fec9cd1468927dce7b60ba39ee92f2c24b034b7fa3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1064, + "startColumn": 7, + "charOffset": 34815, + "charLength": 6, + "snippet": { + "text": "combat" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1062, + "startColumn": 1, + "charOffset": 34704, + "charLength": 264, + "snippet": { + "text": "\t\t\t\tdelay, [combat, caster, nextTarget, from, affected]() {\r\n\t\t\t\t\tif (combat && caster && nextTarget) {\r\n\t\t\t\t\t\tcombat->doChainEffect(from, nextTarget->getPosition(), combat->params.chainEffect);\r\n\t\t\t\t\t\tcombat->doCombat(caster, nextTarget, from, affected);\r\n\t\t\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5569c4415683c5d3", + "equalIndicator/v1": "2f548a058a49b9235268514499166a7b9e321e597ec7f0a699d18eae50189a0a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7593, + "startColumn": 108, + "charOffset": 265091, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7591, + "startColumn": 1, + "charOffset": 264941, + "charLength": 282, + "snippet": { + "text": "// Life leech\r\nvoid Game::applyLifeLeech(\r\n\tstd::shared_ptr attackerPlayer, std::shared_ptr targetMonster, std::shared_ptr target, const CombatDamage &damage, const int32_t &realDamage\r\n) const {\r\n\t// Wheel of destiny bonus - life leech chance and amount\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dcd28aa9a2940b30", + "equalIndicator/v1": "2f5e399cb46ba22039651da731b117ce7709f7eb46a94c41737652c73cee5d7c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6443, + "startColumn": 53, + "charOffset": 222521, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6441, + "startColumn": 1, + "charOffset": 222464, + "charLength": 151, + "snippet": { + "text": "}\r\n\r\nvoid Game::reloadCreature(std::shared_ptr creature) {\r\n\tif (!creature) {\r\n\t\tg_logger().error(\"[{}] Creature is nullptr\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "af6a4be9083ca96b", + "equalIndicator/v1": "2f6249e710dba9779c8f2ae8a47085bc9487abbe8c52d27740a976431a81db08" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 657, + "startColumn": 7, + "charOffset": 25223, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 655, + "startColumn": 1, + "charOffset": 25120, + "charLength": 235, + "snippet": { + "text": "\r\nbool EventCallback::playerOnTurn(std::shared_ptr player, Direction direction) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTurn - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "db189e5ec7fe2327", + "equalIndicator/v1": "2f7b62c387f8da7e3ac3b22e48a9daa0ed0df5a74221a55a20b0bb3e3c4a8676" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1595, + "startColumn": 62, + "charOffset": 47623, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1593, + "startColumn": 1, + "charOffset": 47546, + "charLength": 146, + "snippet": { + "text": "\r\n// container\r\nvoid Player::sendAddContainerItem(std::shared_ptr container, std::shared_ptr item) {\r\n\tif (!client) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2fdfd5a39d16e619", + "equalIndicator/v1": "2fc5e8446ecf34c2b640a6cd7df1c83491b60d8c6d942192e0cc29ea248da8bc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 825, + "startColumn": 6, + "charOffset": 31604, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 823, + "startColumn": 1, + "charOffset": 31569, + "charLength": 178, + "snippet": { + "text": "\tlua_pushnumber(L, tries);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 3, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9f5537fa2db83cb7", + "equalIndicator/v1": "2fc76c02f912e34755c366bdd4121e03bdf9e2ba0c8d9d78006fce03796d6a8b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 214, + "startColumn": 30, + "charOffset": 8485, + "charLength": 10, + "snippet": { + "text": "std::clamp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 212, + "startColumn": 1, + "charOffset": 8415, + "charLength": 356, + "snippet": { + "text": "\r\n\t\t\tif (damageModifiers[i] != 10000) {\r\n\t\t\t\tint16_t clientModifier = std::clamp(10000 - static_cast(damageModifiers[i]), -10000, 10000);\r\n\t\t\t\tg_logger().debug(\"[{}] CombatType: {}, Damage Modifier: {}, Resulting Client Modifier: {}\", __FUNCTION__, i, damageModifiers[i], clientModifier);\r\n\t\t\t\tmsg.addByte(getCipbiaElement(indexToCombatType(i)));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e81023683120b932", + "equalIndicator/v1": "2fdf7f90d19eda166889d66d4e93d5b9f39af8420e1e39d33de6fb762c343bf5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')", + "markdown": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 80, + "startColumn": 10, + "charOffset": 2025, + "charLength": 13, + "snippet": { + "text": "gainSoulTicks" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 78, + "startColumn": 1, + "charOffset": 1976, + "charLength": 136, + "snippet": { + "text": "\r\n\tuint32_t getSoulGainTicks() const {\r\n\t\treturn gainSoulTicks / g_configManager().getFloat(RATE_SOUL_REGEN_SPEED, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c2973b7a30d23123", + "equalIndicator/v1": "2fe9ee0621493647d12b6a2e722ca148d715dd299a8ec55cb66d1ed40ac6a156" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'res' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'res' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 158, + "startColumn": 32, + "charOffset": 4076, + "charLength": 3, + "snippet": { + "text": "res" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 156, + "startColumn": 1, + "charOffset": 3984, + "charLength": 123, + "snippet": { + "text": "\r\nuint32_t ScriptEnvironment::addResult(DBResult_ptr res) {\r\n\ttempResults[++lastResultId] = res;\r\n\treturn lastResultId;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2eabe3e91e2da9ba", + "equalIndicator/v1": "2ff07dd55e995707c1427b1d3d294363576a1008981ca7a2d110545cce9a2390" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Replace loop by 'std::ranges::all_of()'", + "markdown": "Replace loop by 'std::ranges::all_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 87, + "startColumn": 9, + "charOffset": 2571, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 85, + "startColumn": 1, + "charOffset": 2522, + "charLength": 190, + "snippet": { + "text": "\tuint32_t oldLevel,\r\n\tuint32_t newLevel\r\n) const {\r\n\tfor ([[maybe_unused]] const auto &[eventName, eventPtr] : creatureEvents) {\r\n\t\tif (eventPtr->getEventType() == CREATURE_EVENT_ADVANCE) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "664cdfec7161b7a2", + "equalIndicator/v1": "2ff240d2bb3b03de896a9da7b6f2ab0db96e7343d1fd3afb4f3555a8b9c61e03" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 59, + "startColumn": 38, + "charOffset": 1830, + "charLength": 3, + "snippet": { + "text": "get" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 57, + "startColumn": 1, + "charOffset": 1788, + "charLength": 175, + "snippet": { + "text": "}\r\n\r\nstd::optional KVStore::get(const std::string &key, bool forceLoad /*= false */) {\r\n\tlogger.trace(\"KVStore::get({})\", key);\r\n\tstd::scoped_lock lock(mutex_);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d5a07b3014bc6552", + "equalIndicator/v1": "300417850627a4b2ee35ab1e7c5d3441392d7a021891b8a8476f07ebae4fa92a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2150, + "startColumn": 2, + "charOffset": 66176, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2148, + "startColumn": 1, + "charOffset": 66104, + "charLength": 188, + "snippet": { + "text": "\tuint8_t action = msg.getByte();\r\n\tbool upgrade = msg.getByte() != 0;\r\n\tuint16_t raceId = msg.get();\r\n\r\n\tif (!g_configManager().getBoolean(TASK_HUNTING_ENABLED, __FUNCTION__)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d0b210d8c8cac3cf", + "equalIndicator/v1": "301cda11835a62b612086d28d8168eadecb4fc0304f8ca69b3389ddb17f208b5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6356, + "startColumn": 70, + "charOffset": 201199, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6354, + "startColumn": 1, + "charOffset": 201125, + "charLength": 159, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendPartyCreatureShield(std::shared_ptr target) {\r\n\tuint32_t cid = target->getID();\r\n\tif (!knownCreatureSet.contains(cid)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c891f070824fd4db", + "equalIndicator/v1": "304cd7db72902e303cb9de14be024863811a3441ff35c1a3b74771013465fdf6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 835, + "startColumn": 94, + "charOffset": 31971, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 833, + "startColumn": 1, + "charOffset": 31873, + "charLength": 271, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnCombat - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ff03a288e4cc2cd2", + "equalIndicator/v1": "30502476078e4750a6446c0239e647cb7358fcdbf7d2a907386ebc86b53955cf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'targetItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'targetItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 706, + "startColumn": 155, + "charOffset": 27220, + "charLength": 10, + "snippet": { + "text": "targetItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 704, + "startColumn": 1, + "charOffset": 27061, + "charLength": 291, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeAccept - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a3cba6cb942bdfb9", + "equalIndicator/v1": "305174c396f63d39b1af2da9cf2902c709bcc3d7517f294cc343fc720f369944" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 55, + "startColumn": 7, + "charOffset": 2275, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 53, + "startColumn": 1, + "charOffset": 2114, + "charLength": 322, + "snippet": { + "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r\nprivate:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f752a861f91f4a21", + "equalIndicator/v1": "3052f9b9806658bfc5d15dc75bd4ab3aefc93ed83fba54f98df6501da470be00" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 667, + "startColumn": 50, + "charOffset": 20407, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 665, + "startColumn": 1, + "charOffset": 20353, + "charLength": 218, + "snippet": { + "text": "}\r\n\r\nbool Monster::isTarget(std::shared_ptr creature) {\r\n\tif (creature->isRemoved() || !creature->isAttackable() || creature->getZoneType() == ZONE_PROTECTION || !canSeeCreature(creature)) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d6f7b4c9201976bf", + "equalIndicator/v1": "3081a89ff127dc624e2b90032ea4c5d0f21ed9056906e262f4b167c8ea43cab8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 194, + "startColumn": 46, + "charOffset": 5081, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 192, + "startColumn": 1, + "charOffset": 5031, + "charLength": 97, + "snippet": { + "text": "}\r\n\r\nvoid BedItem::wakeUp(std::shared_ptr player) {\r\n\tif (house == nullptr) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5b72f648cbbdda44", + "equalIndicator/v1": "309c6fd7c701ff033d35caf5d818024adc20bd464848934a4fdc44b88515ed83" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6152, + "startColumn": 47, + "charOffset": 212608, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6150, + "startColumn": 1, + "charOffset": 212557, + "charLength": 215, + "snippet": { + "text": "}\r\n\r\nbool Game::playerYell(std::shared_ptr player, const std::string &text) {\r\n\tif (player->getLevel() == 1) {\r\n\t\tplayer->sendTextMessage(MESSAGE_FAILURE, \"You may not yell as long as you are on level 1.\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "04b8fcf0ceb61577", + "equalIndicator/v1": "30cb2355afe21229af975f53e6785415f37c080e9d94f360482ee6d2b70460ab" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3960, + "startColumn": 82, + "charOffset": 119080, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3958, + "startColumn": 1, + "charOffset": 118943, + "charLength": 268, + "snippet": { + "text": "\r\nvoid Player::updateDamageReductionFromItemImbuement(\r\n\tstd::array &combatReductionArray, std::shared_ptr item, uint16_t combatTypeIndex\r\n) const {\r\n\tfor (uint8_t imbueSlotId = 0; imbueSlotId < item->getImbuementSlot(); imbueSlotId++) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b8b6edbb4a3de549", + "equalIndicator/v1": "30d2b220b63a6b6392ffaa17bcdf9656d73e1676c4d0ab270169c739d9238d2c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1210, + "startColumn": 31, + "charOffset": 35618, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1208, + "startColumn": 1, + "charOffset": 35501, + "charLength": 137, + "snippet": { + "text": "\tvoid sendUpdateCreature(std::shared_ptr creature) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendUpdateCreature(creature);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4fc51aa6596a1abe", + "equalIndicator/v1": "311812e0db12ad733fb988f3bfd5f8a40796cc85bec56ea7dbeb4f3d7822f83c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'vipGroupsId' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'vipGroupsId' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5853, + "startColumn": 55, + "charOffset": 204838, + "charLength": 11, + "snippet": { + "text": "vipGroupsId" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5851, + "startColumn": 1, + "charOffset": 204778, + "charLength": 79, + "snippet": { + "text": "\t}\r\n\r\n\tplayer->vip()->edit(guid, description, icon, notify, vipGroupsId);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "37b337e8dbc755a9", + "equalIndicator/v1": "311c272847441e5002a67cd60d45c054feb67f4d76e15d85de2cfa23a14c826b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')", + "markdown": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1261, + "startColumn": 10, + "charOffset": 34947, + "charLength": 9, + "snippet": { + "text": "manaTicks" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1259, + "startColumn": 1, + "charOffset": 34899, + "charLength": 129, + "snippet": { + "text": "\r\n\tif (player != nullptr && isBuff) {\r\n\t\treturn manaTicks / g_configManager().getFloat(RATE_SPELL_COOLDOWN, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6957928e76c4b50e", + "equalIndicator/v1": "31235fc7258b507d53909cc6635a17f28bc95c2cab1fbf4bc056ede392e6c97b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'monster' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'monster' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 476, + "startColumn": 86, + "charOffset": 25159, + "charLength": 30, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 474, + "startColumn": 1, + "charOffset": 25045, + "charLength": 346, + "snippet": { + "text": "\r\n\t// Hazard combat helpers\r\n\tvoid handleHazardSystemAttack(CombatDamage &damage, std::shared_ptr player, const std::shared_ptr monster, bool isPlayerAttacker);\r\n\tvoid notifySpectators(const CreatureVector &spectators, const Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetMonster);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c6110e8c33daea2d", + "equalIndicator/v1": "3123c948c13447f6b405c472ab242a7e2c87d3cfb298160225df97f8652c651f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 939, + "startColumn": 15, + "charOffset": 30537, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 937, + "startColumn": 1, + "charOffset": 30447, + "charLength": 137, + "snippet": { + "text": "\t\t\tvalue = attacker->getIncreasePercent(combatType);\r\n\t\t\tif (value != 0) {\r\n\t\t\t\tdamage += std::round(damage * value / 100.f);\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b953564791a9c1ee", + "equalIndicator/v1": "312800ab77171ebe7869cb3225437abc982b0085b0e75dfa6b36dab63df51880" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1237, + "startColumn": 54, + "charOffset": 49709, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1235, + "startColumn": 1, + "charOffset": 49651, + "charLength": 234, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerInspectItem(std::shared_ptr player, const Position &pos) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tstd::shared_ptr thing = internalGetThing(player, pos, 0, 0, STACKPOS_TOPDOWN_ITEM);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "29ef35c12c7408fa", + "equalIndicator/v1": "312a9fc7a8ce9665e2b0d2d2181e73a00e09ccaf9c56737f6c8b1d43febdb271" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1931, + "startColumn": 2, + "charOffset": 58838, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1929, + "startColumn": 1, + "charOffset": 58776, + "charLength": 187, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseLookInShop(NetworkMessage &msg) {\r\n\tuint16_t id = msg.get();\r\n\tuint8_t count = msg.getByte();\r\n\tg_game().playerLookInShop(player->getID(), id, count);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "09732926dbf93a9e", + "equalIndicator/v1": "314b5de421e25d99077460cb031f9d5c0978589d475d67bad7bc44b4a281b42d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 494, + "startColumn": 26, + "charOffset": 23837, + "charLength": 19, + "snippet": { + "text": "MITIGATION_INCREASE" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 492, + "startColumn": 1, + "charOffset": 23635, + "charLength": 348, + "snippet": { + "text": "// SLOT_GREEN_BOTTOM_150 = 7\r\nvoid IOWheel::slotGreenBottom150(const std::shared_ptr &player, uint16_t points, uint8_t, PlayerWheelMethodsBonusData &bonusData) const {\r\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\r\n\taddVesselResonance(player, bonusData, WheelSlots_t::SLOT_GREEN_BOTTOM_150, WheelGemAffinity_t::Green, points);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb1b4ae82d717291", + "equalIndicator/v1": "3154430b0d5f54e74324fa02be2ae985740a98ee3c103ebd7dd3ebf7dc0b11d8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8437, + "startColumn": 2, + "charOffset": 266941, + "charLength": 22, + "snippet": { + "text": "Supply_Stash_Actions_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8435, + "startColumn": 1, + "charOffset": 266934, + "charLength": 152, + "snippet": { + "text": "\t}\r\n\r\n\tSupply_Stash_Actions_t action = static_cast(msg.getByte());\r\n\tswitch (action) {\r\n\t\tcase SUPPLY_STASH_ACTION_STOW_ITEM: {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3e7ec31ed0a518fc", + "equalIndicator/v1": "31687076a9eacc19f3bb47dcb0afdb874ff668b32e5b9f972c8f368e2817da92" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1822, + "startColumn": 3, + "charOffset": 55204, + "charLength": 16, + "snippet": { + "text": "ObjectCategory_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1820, + "startColumn": 1, + "charOffset": 55098, + "charLength": 246, + "snippet": { + "text": "\t\tg_game().playerSetQuickLootFallback(player->getID(), useMainAsFallback);\r\n\t} else if (action == 4) {\r\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\r\n\t\tPosition pos = msg.getPosition();\r\n\t\tuint16_t itemId = msg.get();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "021293f302eb722b", + "equalIndicator/v1": "31760ab5a475739fad72c999f0c08d1a19f810c032c0c7e16de20fecf2336bc0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 591, + "startColumn": 54, + "charOffset": 16418, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 589, + "startColumn": 1, + "charOffset": 16360, + "charLength": 235, + "snippet": { + "text": "}\r\n\r\nvoid Party::showPlayerStatus(std::shared_ptr player, std::shared_ptr member, bool showStatus) {\r\n\tplayer->sendPartyCreatureShowStatus(member, showStatus);\r\n\tmember->sendPartyCreatureShowStatus(player, showStatus);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "90b1bd8eed413a5c", + "equalIndicator/v1": "3194b78d350311b9a145c7bcbc26f82b723433db8163aa47a423b9b8524d8081" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Replace loop by 'std::ranges::any_of()'", + "markdown": "Replace loop by 'std::ranges::any_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1118, + "startColumn": 2, + "charOffset": 33333, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1116, + "startColumn": 1, + "charOffset": 33195, + "charLength": 338, + "snippet": { + "text": "bool Monster::pushItem(std::shared_ptr item, const Direction &nextDirection) {\r\n\tconst Position ¢erPos = item->getPosition();\r\n\tfor (const auto &[x, y] : getPushItemLocationOptions(nextDirection)) {\r\n\t\tPosition tryPos(centerPos.x + x, centerPos.y + y, centerPos.z);\r\n\t\tstd::shared_ptr tile = g_game().map.getTile(tryPos);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "820c9416d1dc2248", + "equalIndicator/v1": "31c163e80e1ab2da9fe55a3b0de2478edbb06b0d6ef03a6ad3e45af9c6c4848c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 39, + "startColumn": 18, + "charOffset": 1286, + "charLength": 12, + "snippet": { + "text": "ValueWrapper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 37, + "startColumn": 1, + "charOffset": 1119, + "charLength": 404, + "snippet": { + "text": "\texplicit(false) ValueWrapper(const std::string &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(bool value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(int value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(double value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const phmap::flat_hash_map &value, uint64_t timestamp = 0);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "74765a567eb1bd8b", + "equalIndicator/v1": "31d43d031db8373da14bf89146e3a043d6197f34251d175a88ab7d3b1d88c512" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 680, + "startColumn": 7, + "charOffset": 26109, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 678, + "startColumn": 1, + "charOffset": 25959, + "charLength": 300, + "snippet": { + "text": "\r\nbool EventCallback::playerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeRequest - \"\r\n\t\t \"Player {} target {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ca4f857380f7fb5f", + "equalIndicator/v1": "31da07c970451e978392e9ba7e823c8aacf2c8ccd26089c4218673b0f9571fce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 63, + "startColumn": 33, + "charOffset": 1632, + "charLength": 7, + "snippet": { + "text": "int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 61, + "startColumn": 1, + "charOffset": 1595, + "charLength": 307, + "snippet": { + "text": "}\r\n\r\nReturnValue HouseTile::queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t tileFlags, std::shared_ptr actor /* = nullptr*/) {\r\n\tif (std::shared_ptr creature = thing->getCreature()) {\r\n\t\tif (std::shared_ptr player = creature->getPlayer()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71f6ecc849f6cd2f", + "equalIndicator/v1": "31ec5ddda46cc4a16bec6dbeb51baa6b78419a2e46b9d23103a4d1007824c5ed" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 987, + "startColumn": 125, + "charOffset": 35671, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 985, + "startColumn": 1, + "charOffset": 35542, + "charLength": 263, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) {\r\n\t// Player:onTradeAccept(target, item, targetItem)\r\n\tif (info.playerOnTradeAccept == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "db4c9e750b9890c3", + "equalIndicator/v1": "31fd5dd3f033a24beb89f0e298adcdf221e9e0f37f7dacab770187dfb7fb36de" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'newGuildRank' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'newGuildRank' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 290, + "startColumn": 15, + "charOffset": 7581, + "charLength": 12, + "snippet": { + "text": "newGuildRank" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 288, + "startColumn": 1, + "charOffset": 7513, + "charLength": 88, + "snippet": { + "text": "\t}\r\n\tvoid setGuildRank(GuildRank_ptr newGuildRank) {\r\n\t\tguildRank = newGuildRank;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "29a32bc0ffce72d5", + "equalIndicator/v1": "32346594c9d54f5c50828926511626e9f09c5cdeb1b7b21aa60899ec2a28fd94" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 221, + "startColumn": 68, + "charOffset": 7945, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 219, + "startColumn": 1, + "charOffset": 7863, + "charLength": 239, + "snippet": { + "text": "\r\n// Creature\r\nbool Events::eventCreatureOnChangeOutfit(std::shared_ptr creature, const Outfit_t &outfit) {\r\n\t// Creature:onChangeOutfit(outfit) or Creature.onChangeOutfit(self, outfit)\r\n\tif (info.creatureOnChangeOutfit == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3469800bab0b7baf", + "equalIndicator/v1": "3247bb10c43d5f009a4027a019736068ef446ab0bc74fe1070a58a2fe127c8b6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6756, + "startColumn": 63, + "charOffset": 211311, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6754, + "startColumn": 1, + "charOffset": 211244, + "charLength": 240, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendMoveCreature(std::shared_ptr creature, const Position &newPos, int32_t newStackPos, const Position &oldPos, int32_t oldStackPos, bool teleport) {\r\n\tif (creature == player) {\r\n\t\tif (oldStackPos >= 10) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0164160561c9f723", + "equalIndicator/v1": "3247d181d77bb69930129dda55d8c2b0f7a3a4525dce9a0eee1881d54fe38e80" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1330, + "startColumn": 64, + "charOffset": 39113, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1328, + "startColumn": 1, + "charOffset": 39045, + "charLength": 149, + "snippet": { + "text": "}\r\n\r\nint32_t Tile::getClientIndexOfCreature(std::shared_ptr player, std::shared_ptr creature) const {\r\n\tint32_t n;\r\n\tif (ground) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d06f66173341cf46", + "equalIndicator/v1": "324b715c54fe5ed7e5b8697a052220f9c27a80c1a9529e5d5d6601d5d0db0a85" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 126, + "startColumn": 10, + "charOffset": 3170, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 124, + "startColumn": 1, + "charOffset": 3136, + "charLength": 55, + "snippet": { + "text": "\r\n\tif (input.empty()) {\r\n\t\treturn std::string();\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9772480ddae4dacf", + "equalIndicator/v1": "3251a7a4e040a485a20506c2a89272bd6b4f483140402a4cdaba70096e0b8ab3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'bool'", + "markdown": "Narrowing conversion from 'double' to 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 995, + "startColumn": 53, + "charOffset": 31982, + "charLength": 18, + "snippet": { + "text": "weaponSkillFormula" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 993, + "startColumn": 1, + "charOffset": 31767, + "charLength": 364, + "snippet": { + "text": "\tauto setCommonValues = [this, weapon](double formula, SoundEffect_t impactSound, uint32_t effect) {\r\n\t\tdouble weaponSkillFormula = weapon->getChainSkillValue();\r\n\t\tsetPlayerCombatValues(COMBAT_FORMULA_SKILL, 0, 0, weaponSkillFormula ? weaponSkillFormula : formula, 0);\r\n\t\tsetParam(COMBAT_PARAM_IMPACTSOUND, impactSound);\r\n\t\tsetParam(COMBAT_PARAM_EFFECT, effect);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6bf99b359aa471d2", + "equalIndicator/v1": "3257f45504233b5112b8ae4f9f09073f15343598d926bd04414fb24c5f56dcce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::list>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::list\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 239, + "startColumn": 21, + "charOffset": 6821, + "charLength": 4, + "snippet": { + "text": "beds" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 237, + "startColumn": 1, + "charOffset": 6761, + "charLength": 96, + "snippet": { + "text": "\r\n\tconst auto beds = house->getBeds();\r\n\tlua_createtable(L, beds.size(), 0);\r\n\r\n\tint index = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b15ce0769c4c17d3", + "equalIndicator/v1": "3280f69d3be9eb540842fa77c9f32f4c47e25a91a3d1bc019a0c52e640c3ba74" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 548, + "startColumn": 8, + "charOffset": 13555, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 546, + "startColumn": 1, + "charOffset": 13463, + "charLength": 186, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetSpeed(lua_State* L) {\r\n\t// itemType:getSpeed()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (!itemType) {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "069f2b597d127c77", + "equalIndicator/v1": "32b0f62c9fbeaf1b832248a6bb44a6535cb3140029ec72d3a327663809906119" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 987, + "startColumn": 95, + "charOffset": 35641, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 985, + "startColumn": 1, + "charOffset": 35542, + "charLength": 263, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) {\r\n\t// Player:onTradeAccept(target, item, targetItem)\r\n\tif (info.playerOnTradeAccept == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7ebb2d216a435051", + "equalIndicator/v1": "32b1e194b6a673832e53683cb2461c88ad854c35b99889322165580c0eb08818" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 469, + "startColumn": 82, + "charOffset": 13273, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 467, + "startColumn": 1, + "charOffset": 13187, + "charLength": 142, + "snippet": { + "text": "}\r\n\r\nSharedExpStatus_t Party::getMemberSharedExperienceStatus(std::shared_ptr player) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "70c67220a8769ea4", + "equalIndicator/v1": "32c2b135fdd040b3af0da8d79b393e2fcb90e2e46dea526a3ac08a625d9fb0bd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Nested namespaces can be concatenated", + "markdown": "Nested namespaces can be concatenated" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper_proto.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 24, + "startColumn": 1, + "charOffset": 806, + "charLength": 9, + "snippet": { + "text": "namespace" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 22, + "startColumn": 1, + "charOffset": 761, + "charLength": 105, + "snippet": { + "text": "\r\n// Forward declaration for protobuf class\r\nnamespace Canary {\r\n\tnamespace protobuf {\r\n\t\tnamespace kv {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "79bc887732bbb4cb", + "equalIndicator/v1": "32ea8bfc3a6f879faf32699387c018c62ca6d68ac488ca36d6902769476c70e4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 861, + "startColumn": 14, + "charOffset": 43168, + "charLength": 15, + "snippet": { + "text": "boostedCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 859, + "startColumn": 1, + "charOffset": 43105, + "charLength": 136, + "snippet": { + "text": "\r\n\tstd::map BestiaryList;\r\n\tstd::string boostedCreature = \"\";\r\n\r\n\tstd::vector> CharmList;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e2e035837b41ce6b", + "equalIndicator/v1": "333dea48e5fe1b77ec3bab3825591d1490fb89eb61ebfd1045a11077c0db2aae" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 255, + "startColumn": 81, + "charOffset": 6430, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 253, + "startColumn": 1, + "charOffset": 6345, + "charLength": 180, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Tile::getTopVisibleCreature(std::shared_ptr creature) const {\r\n\tif (const CreatureVector* creatures = getCreatures()) {\r\n\t\tif (creature) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a2b9cea5d64c632c", + "equalIndicator/v1": "333df90e78553a1ad9ccd92983c301bbc797efc5a690adf02f840ff2131242e6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Move constructors should be marked noexcept", + "markdown": "Move constructors should be marked noexcept" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creatures_definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1488, + "startColumn": 2, + "charOffset": 38813, + "charLength": 13, + "snippet": { + "text": "MarketOfferEx" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1486, + "startColumn": 1, + "charOffset": 38759, + "charLength": 139, + "snippet": { + "text": "struct MarketOfferEx {\r\n\tMarketOfferEx() = default;\r\n\tMarketOfferEx(MarketOfferEx &&other) :\r\n\t\tid(other.id),\r\n\t\tplayerId(other.playerId),\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "437d8f799c581c99", + "equalIndicator/v1": "3347aeee74873507122d18b471000357c7e3d75ebf12bcb5e39ffedadde3fd03" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1840, + "startColumn": 67, + "charOffset": 71693, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1838, + "startColumn": 1, + "charOffset": 71622, + "charLength": 279, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::shared_ptr fromCylinder, std::shared_ptr toCylinder, std::shared_ptr item, Position toPos) {\r\n\tif (!player || !toCylinder || !item) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7e48ab433b64c7ca", + "equalIndicator/v1": "336212db702fd0c7b8ec60048d49a9cafd72286bd68fa2ba14385c5cb8f4a27f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 696, + "startColumn": 37, + "charOffset": 22733, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 694, + "startColumn": 1, + "charOffset": 22671, + "charLength": 128, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.55f);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f644cf5b2a9212a1", + "equalIndicator/v1": "33639e238b9d620ad88cab2f3bf8de2ca75bb3eaed998754d21c81cfe02a30a5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'isEnemyFaction' is within a recursive call chain", + "markdown": "Function 'isEnemyFaction' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 92, + "startColumn": 7, + "charOffset": 2433, + "charLength": 14, + "snippet": { + "text": "isEnemyFaction" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 90, + "startColumn": 1, + "charOffset": 2421, + "charLength": 125, + "snippet": { + "text": "\t}\r\n\r\n\tbool isEnemyFaction(Faction_t faction) const {\r\n\t\tauto master = getMaster();\r\n\t\tif (master && master->getMonster()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3d2dd8e3b8afa0dc", + "equalIndicator/v1": "336d4e2e59e1cc15e2b5c1f00a08c5f8aadd906e53b65a73703f229e5adb3b94" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: m_type", + "markdown": "Constructor does not initialize these fields: m_type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 17, + "startColumn": 8, + "charOffset": 472, + "charLength": 5, + "snippet": { + "text": "Badge" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 15, + "startColumn": 1, + "charOffset": 452, + "charLength": 76, + "snippet": { + "text": "class KV;\r\n\r\nstruct Badge {\r\n\tuint8_t m_id = 0;\r\n\tCyclopediaBadge_t m_type;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "56793c6859226e17", + "equalIndicator/v1": "338ccdca6661610d57c09fb5d416f778975273315eeb7c02513b1ad0ee116a2c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 395, + "startColumn": 10, + "charOffset": 11804, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 393, + "startColumn": 1, + "charOffset": 11716, + "charLength": 141, + "snippet": { + "text": "\tconst char* c_str = lua_tolstring(L, arg, &len);\r\n\tif (!c_str || len == 0) {\r\n\t\treturn std::string();\r\n\t}\r\n\treturn std::string(c_str, len);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f7cfb885810e181b", + "equalIndicator/v1": "339fdc1c8a0fb80c40e37586fbb608a9daf845b03a3b222572233b40a0bc289d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1727, + "startColumn": 2, + "charOffset": 51805, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1725, + "startColumn": 1, + "charOffset": 51706, + "charLength": 220, + "snippet": { + "text": "void ProtocolGame::parseUseItemEx(NetworkMessage &msg) {\r\n\tPosition fromPos = msg.getPosition();\r\n\tuint16_t fromItemId = msg.get();\r\n\tuint8_t fromStackPos = msg.getByte();\r\n\tPosition toPos = msg.getPosition();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "04a31cb80f797921", + "equalIndicator/v1": "33d7d9eb6632781bfdc7fb1480ca4cd377ea2a1bd1b970e00a860624fe979c06" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 927, + "startColumn": 56, + "charOffset": 33547, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 925, + "startColumn": 1, + "charOffset": 33487, + "charLength": 188, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnTurn(std::shared_ptr player, Direction direction) {\r\n\t// Player:onTurn(direction) or Player.onTurn(self, direction)\r\n\tif (info.playerOnTurn == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "28f2e2bfc127754d", + "equalIndicator/v1": "33f103fd1667b405707a8ce99f9db65e7ba4ea11f93bd3e4889018bab52d9230" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 228, + "startColumn": 10, + "charOffset": 7055, + "charLength": 13, + "snippet": { + "text": "getThingIndex" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 226, + "startColumn": 1, + "charOffset": 6985, + "charLength": 229, + "snippet": { + "text": "\tvoid removeCreature(std::shared_ptr creature);\r\n\r\n\tint32_t getThingIndex(std::shared_ptr thing) const override final;\r\n\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f3786b5533425cb3", + "equalIndicator/v1": "33f9445728184cbb03d6b0f55489f4f6b7f6781325b8859946e82d938b5ccd45" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 23, + "startColumn": 48, + "charOffset": 731, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 21, + "startColumn": 1, + "charOffset": 664, + "charLength": 148, + "snippet": { + "text": "\tid(houseId) { }\r\n\r\nvoid House::addTile(std::shared_ptr tile) {\r\n\ttile->setFlag(TILESTATE_PROTECTIONZONE);\r\n\thouseTiles.push_back(tile);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "679e4e6a68112830", + "equalIndicator/v1": "3400c749f282fd6e6b42bc5f53d7ccdff10d8ef7dc5dfa167c26eca56d64c590" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 80, + "startColumn": 48, + "charOffset": 3344, + "charLength": 34, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 78, + "startColumn": 1, + "charOffset": 3148, + "charLength": 397, + "snippet": { + "text": "\r\n\tstd::map getBestiaryKillCountByMonsterIDs(std::shared_ptr player, std::map mtype_list) const;\r\n\tstd::map getMonsterElements(const std::shared_ptr mtype) const;\r\n\tstd::map findRaceByName(const std::string &race, bool Onlystring = true, BestiaryType_t raceNumber = BESTY_RACE_NONE) const;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dd42228bbf0202f5", + "equalIndicator/v1": "341610e2017c89c17378240dde67d717756c186e75e6cce237399851b87cd403" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 229, + "startColumn": 87, + "charOffset": 8406, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 227, + "startColumn": 1, + "charOffset": 8308, + "charLength": 218, + "snippet": { + "text": "\r\n// Party\r\nbool EventCallback::partyOnJoin(std::shared_ptr party, std::shared_ptr player) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::partyOnJoin - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "64f7e9b4638453e5", + "equalIndicator/v1": "342621b5c4755cdb6264325078324d67009d3c4f56f3822a13141637bb4edb83" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 171, + "startColumn": 22, + "charOffset": 4937, + "charLength": 6, + "snippet": { + "text": "g_game" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 169, + "startColumn": 1, + "charOffset": 4879, + "charLength": 138, + "snippet": { + "text": "\r\nbool GameReload::reloadGroups() {\r\n\tconst bool result = g_game().groups.reload();\r\n\tlogReloadStatus(\"Groups\", result);\r\n\treturn result;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "88879e9f07e50f1f", + "equalIndicator/v1": "34333e774c2700193a20d6d6c2c02b3b2e95f1227df159711c5a2923f31cd4b5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6476, + "startColumn": 45, + "charOffset": 189543, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6474, + "startColumn": 1, + "charOffset": 189494, + "charLength": 188, + "snippet": { + "text": "}\r\n\r\nvoid Player::stowItem(std::shared_ptr item, uint32_t count, bool allItems) {\r\n\tif (!item || !item->isItemStorable()) {\r\n\t\tsendCancelMessage(\"This item cannot be stowed here.\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "78e504ca90a14b40", + "equalIndicator/v1": "3435f97aaca96ad099586446b19e39389be239be04f8d0ad11a16459e6e3647b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 540, + "startColumn": 53, + "charOffset": 15524, + "charLength": 5, + "snippet": { + "text": "spawn" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 538, + "startColumn": 1, + "charOffset": 15378, + "charLength": 282, + "snippet": { + "text": "bool AreaSpawnEvent::executeEvent() {\r\n\tfor (const MonsterSpawn &spawn : spawnMonsterList) {\r\n\t\tuint32_t amount = uniform_random(spawn.minAmount, spawn.maxAmount);\r\n\t\tfor (uint32_t i = 0; i < amount; ++i) {\r\n\t\t\tstd::shared_ptr monster = Monster::createMonster(spawn.name);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ff697a50f18da69a", + "equalIndicator/v1": "3445244a2035f89609bbc8df7c2aae211027026f56885f04fd192ea909326e01" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'guild' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'guild' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/save_manager.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 117, + "startColumn": 52, + "charOffset": 3388, + "charLength": 5, + "snippet": { + "text": "guild" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 115, + "startColumn": 1, + "charOffset": 3332, + "charLength": 145, + "snippet": { + "text": "}\r\n\r\nvoid SaveManager::saveGuild(std::shared_ptr guild) {\r\n\tif (!guild) {\r\n\t\tlogger.debug(\"Failed to save guild because guild is null.\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "283f071688eefa3d", + "equalIndicator/v1": "3446449593d6eced0dfdc32b0c642785c1a2ff959312df491b983742d942d417" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')", + "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2563, + "startColumn": 18, + "charOffset": 76602, + "charLength": 23, + "snippet": { + "text": "Player::getPercentLevel" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2561, + "startColumn": 1, + "charOffset": 76487, + "charLength": 228, + "snippet": { + "text": "\tuint64_t nextLevelExp = Player::getExpForLevel(level + 1);\r\n\tif (nextLevelExp > currLevelExp) {\r\n\t\tlevelPercent = Player::getPercentLevel(experience - currLevelExp, nextLevelExp - currLevelExp);\r\n\t} else {\r\n\t\tlevelPercent = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b87b97a0b12a9f38", + "equalIndicator/v1": "3457f0073e50f1f4d2f6935da2ece35adc7181bb1c9b2488966ce918c9f7f2c9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/db_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 105, + "startColumn": 20, + "charOffset": 3234, + "charLength": 21, + "snippet": { + "text": "Database::getInstance" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 103, + "startColumn": 1, + "charOffset": 3155, + "charLength": 138, + "snippet": { + "text": "\r\nint DBFunctions::luaDatabaseLastInsertId(lua_State* L) {\r\n\tlua_pushnumber(L, Database::getInstance().getLastInsertId());\r\n\treturn 1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b5483de1941090e0", + "equalIndicator/v1": "345ea1923d4817c1b8b8d1e01c4c7c1f5dccdeeb435de346631ec20844c7f877" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: channelId", + "markdown": "Constructor does not initialize these fields: channelId" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 8, + "charOffset": 1119, + "charLength": 11, + "snippet": { + "text": "TextMessage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1053, + "charLength": 170, + "snippet": { + "text": "using ProtocolGame_ptr = std::shared_ptr;\r\n\r\nstruct TextMessage {\r\n\tTextMessage() = default;\r\n\tTextMessage(MessageClasses initType, std::string initText) :\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bee6439c34f217d2", + "equalIndicator/v1": "34adc6639b56bf21f0834ae9ae8d97441aa791906bf58696294c842b2f134f2d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'tile' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'tile' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/mapsector.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 28, + "startColumn": 51, + "charOffset": 815, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 26, + "startColumn": 1, + "charOffset": 694, + "charLength": 133, + "snippet": { + "text": "\r\n\tvoid setTile(uint16_t x, uint16_t y, std::shared_ptr tile) {\r\n\t\ttiles[x & SECTOR_MASK][y & SECTOR_MASK].first = tile;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "190ce71137cefd8c", + "equalIndicator/v1": "34bcc5c796444d580e26cf5c289eb4123b28bafce7ae643b750aa1bd02e81a36" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 713, + "startColumn": 15, + "charOffset": 23142, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 711, + "startColumn": 1, + "charOffset": 23102, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 30) * 3.20f) + 4;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "90199f3689687000", + "equalIndicator/v1": "34c204d50aff85ba512ed394567193fa88821cf89579c19f1d8604523cd84be7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 977, + "startColumn": 53, + "charOffset": 26621, + "charLength": 6, + "snippet": { + "text": "Player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 975, + "startColumn": 1, + "charOffset": 26455, + "charLength": 217, + "snippet": { + "text": "int PlayerFunctions::luaPlayerAddMana(lua_State* L) {\r\n\t// player:addMana(manaChange[, animationOnLoss = false])\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (!player) {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6e5dc581b400a29c", + "equalIndicator/v1": "34c4d6327624e86631ed876734f4dc7630b12774bbfe3e9cd0dce64e8539d607" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 25, + "charOffset": 1655, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 1625, + "charLength": 174, + "snippet": { + "text": "\t}\r\n\r\n\tint32_t levelFormula = player->getLevel() * 2 + (player->getMagicLevel() + player->getSpecializedMagicLevel(damage.primary.type, true)) * 3;\r\n\treturn levelFormula;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "64edc00beb5bbcb3", + "equalIndicator/v1": "34f80b96588968b2a20c9663938c6bcc1c39edf169d237ebb415716a95b968d3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1739, + "startColumn": 2, + "charOffset": 52308, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1737, + "startColumn": 1, + "charOffset": 52226, + "charLength": 222, + "snippet": { + "text": "\tuint16_t itemId = msg.get();\r\n\tuint8_t fromStackPos = msg.getByte();\r\n\tuint32_t creatureId = msg.get();\r\n\tg_game().playerUseWithCreature(player->getID(), fromPos, fromStackPos, creatureId, itemId);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9576b3a2eca84d2c", + "equalIndicator/v1": "35110e79c8aa0b70132b0a603179093960be103347ce37bcd1681bbdb3d28efa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 899, + "startColumn": 14, + "charOffset": 24878, + "charLength": 8, + "snippet": { + "text": "blockHit" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 897, + "startColumn": 1, + "charOffset": 24841, + "charLength": 288, + "snippet": { + "text": "\t\treturn pzLocked;\r\n\t}\r\n\tBlockType_t blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense = false, bool checkArmor = false, bool field = false) override;\r\n\tvoid doAttacking(uint32_t interval) override;\r\n\tbool hasExtraSwing() override {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ffd5630ad3571c37", + "equalIndicator/v1": "3528adb2862ca4fc640069213bdc11de9ac7402b8629022730cc5854236d1bb4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 515, + "startColumn": 8, + "charOffset": 12752, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 513, + "startColumn": 1, + "charOffset": 12652, + "charLength": 217, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetDestroyId(lua_State* L) {\r\n\t// itemType:getDestroyId()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->destroyTo);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b3e9e3f932cf41ae", + "equalIndicator/v1": "352a1a86c6fdcaf0fc6434c3f362206ad458260fb0ce587528de06e533b710b1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 131, + "startColumn": 11, + "charOffset": 3651, + "charLength": 9, + "snippet": { + "text": "getWeight" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 129, + "startColumn": 1, + "charOffset": 3575, + "charLength": 140, + "snippet": { + "text": "\tuint32_t getContainerHoldingCount();\r\n\tuint16_t getFreeSlots();\r\n\tuint32_t getWeight() const override final;\r\n\r\n\tbool isUnlocked() const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1e71562d59253294", + "equalIndicator/v1": "357412fc130d9f11294b07aaffaa8453442f888d83ad255a67b2d83f44a258e1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 137, + "startColumn": 30, + "charOffset": 4488, + "charLength": 3, + "snippet": { + "text": "get" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 135, + "startColumn": 1, + "charOffset": 4453, + "charLength": 151, + "snippet": { + "text": "\t}\r\n\r\n\tstd::optional get(const std::string &key, bool forceLoad = false) override {\r\n\t\treturn rootKV_.get(buildKey(key), forceLoad);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "423fc3eed3f8cff4", + "equalIndicator/v1": "35a179ebb883584c51ff0d4cc80807e970d98a8f7a2f60d56226f901a435ed32" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 665, + "startColumn": 79, + "charOffset": 18090, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 663, + "startColumn": 1, + "charOffset": 18007, + "charLength": 198, + "snippet": { + "text": "}\r\n\r\nvoid ConditionAttributes::updateCharmChanceModifier(std::shared_ptr creature) const {\r\n\tcreature->setCharmChanceModifier(creature->getCharmChanceModifier() + charmChanceModifier);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2fcca19c7d2fb684", + "equalIndicator/v1": "35a9e225f81b56f1e9b4a7d36d13eed78543649b42aac16dc3b8f1b70bec3df5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1382, + "startColumn": 35, + "charOffset": 41523, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1380, + "startColumn": 1, + "charOffset": 41398, + "charLength": 145, + "snippet": { + "text": "\tvoid sendPartyCreatureSkull(std::shared_ptr creature) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPartyCreatureSkull(creature);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9a0a96b4437f1e27", + "equalIndicator/v1": "35ba105d31f2d0917384017ddab0dcce35742e4acacb9b3bda728a3722b774d4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1554, + "startColumn": 2, + "charOffset": 46049, + "charLength": 7, + "snippet": { + "text": "uint8_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1552, + "startColumn": 1, + "charOffset": 45974, + "charLength": 170, + "snippet": { + "text": "void capitalizeWords(std::string &source) {\r\n\ttoLowerCaseString(source);\r\n\tuint8_t size = (uint8_t)source.size();\r\n\tfor (uint8_t i = 0; i < size; i++) {\r\n\t\tif (i == 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7e8f56c7c4cf8a8a", + "equalIndicator/v1": "35d4782c7c26e448d846f3bcacb8654ee278274374f600ead916c71a76bbad94" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 688, + "startColumn": 41, + "charOffset": 26466, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 686, + "startColumn": 1, + "charOffset": 26420, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "06502f70e80f318a", + "equalIndicator/v1": "35e008969ba230a3a03e237fc00ac430ec807488306529a818b16364ea0824bf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 670, + "startColumn": 15, + "charOffset": 21930, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 668, + "startColumn": 1, + "charOffset": 21890, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.25f) + 3;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0ce13fcbe5a7bb13", + "equalIndicator/v1": "35e3f78dc176a190ceb718ccad73352a4bb9e6acb72fe94f7ccf1a067252e6de" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3952, + "startColumn": 127, + "charOffset": 118657, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3950, + "startColumn": 1, + "charOffset": 118526, + "charLength": 323, + "snippet": { + "text": "}\r\n\r\nvoid Player::calculateDamageReductionFromItem(std::array &combatReductionArray, std::shared_ptr item) const {\r\n\tfor (uint16_t combatTypeIndex = 0; combatTypeIndex < COMBAT_COUNT; combatTypeIndex++) {\r\n\t\tupdateDamageReductionFromItemImbuement(combatReductionArray, item, combatTypeIndex);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "309aa41fba2e12eb", + "equalIndicator/v1": "35e9c3e75799e731929eb30fa81aef18732bc2f4c45b782ca4099c89266882a1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::_Vector_iterator>>::value_type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::_Vector_iterator\\>\\>::value_type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 86, + "startColumn": 32, + "charOffset": 2625, + "charLength": 8, + "snippet": { + "text": "actionId" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 84, + "startColumn": 1, + "charOffset": 2544, + "charLength": 150, + "snippet": { + "text": "\r\n\tfor (const auto &actionId : actionIdVector) {\r\n\t\tif (registerEvent(moveEvent, actionId, actionIdMap)) {\r\n\t\t\ttmpVector.emplace_back(actionId);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "03c4acfe0d4d3c33", + "equalIndicator/v1": "35f22517cca2ed2820d10e01e947e1c5242efecdfd800958322f051e89a161e4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 123, + "startColumn": 16, + "charOffset": 3993, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 121, + "startColumn": 1, + "charOffset": 3973, + "charLength": 223, + "snippet": { + "text": "}\r\n\r\nvoid Teleport::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tgetParent()->postRemoveNotification(thing, newParent, index, LINK_PARENT);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a90da50f72ca0869", + "equalIndicator/v1": "35f31ab26324c00ff2196474bee16157efcc6cdeb385f008b8d54795a1712939" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 214, + "startColumn": 79, + "charOffset": 6584, + "charLength": 8, + "snippet": { + "text": "cylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 212, + "startColumn": 1, + "charOffset": 6501, + "charLength": 155, + "snippet": { + "text": "}\r\n\r\nvoid LuaFunctionsLoader::pushCylinder(lua_State* L, std::shared_ptr cylinder) {\r\n\tif (validateDispatcherContext(__FUNCTION__)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "571f1a3125aac472", + "equalIndicator/v1": "35f6777515ae43cc6c2cd72d4b2bc9f0e7475e7cdb249acc6d7328cec5a5cbe0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 25, + "startColumn": 14, + "charOffset": 938, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 23, + "startColumn": 1, + "charOffset": 765, + "charLength": 380, + "snippet": { + "text": "\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override;\r\n\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\r\n\tvoid addThing(int32_t index, std::shared_ptr thing) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "42d6e9975c892a69", + "equalIndicator/v1": "3615a1ad3c9ebeeb239dbea18230d7d99ebcf5db4fbce4554d4bc61dbb3cc2b9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/bank_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 38, + "startColumn": 21, + "charOffset": 992, + "charLength": 4, + "snippet": { + "text": "bank" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 36, + "startColumn": 1, + "charOffset": 940, + "charLength": 87, + "snippet": { + "text": "\t}\r\n\tif (lua_gettop(L) == 1) {\r\n\t\tlua_pushnumber(L, bank->balance());\r\n\t\treturn 1;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "99b5b2acf921dc93", + "equalIndicator/v1": "361651e90b6ac1a70da3425881816a2aee78a8e408651dc47583ab97853f0f3b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1644, + "startColumn": 3, + "charOffset": 57786, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1642, + "startColumn": 1, + "charOffset": 57668, + "charLength": 168, + "snippet": { + "text": "\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r\n\t\treturn;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6c12262419bf2628", + "equalIndicator/v1": "3620504309b833070cd29a41d13632587b0cfc4a921cfd34dcdea029797fd841" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 341, + "startColumn": 10, + "charOffset": 9576, + "charLength": 15, + "snippet": { + "text": "getWeaponDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 339, + "startColumn": 1, + "charOffset": 9512, + "charLength": 346, + "snippet": { + "text": "\tvoid configureWeapon(const ItemType &it) override;\r\n\r\n\tint32_t getWeaponDamage(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, bool maxDamage = false) const override;\r\n\tint32_t getElementDamage(std::shared_ptr, std::shared_ptr, std::shared_ptr) const override {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2637e9e745472959", + "equalIndicator/v1": "3625a1062d62aa4aabcef90351863ca69510c66d83335889c9432cc41fc01c22" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8030, + "startColumn": 91, + "charOffset": 252239, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8028, + "startColumn": 1, + "charOffset": 252144, + "charLength": 148, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendUpdateInputAnalyzer(CombatType_t type, int32_t amount, std::string target) {\r\n\tif (!player || oldProtocol) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb023ad7871b4621", + "equalIndicator/v1": "3626789c8a418503d4bb322cd5b9fdccbbc539880ddfbee8442315af4105be56" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1797, + "startColumn": 52, + "charOffset": 48530, + "charLength": 3, + "snippet": { + "text": "med" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1795, + "startColumn": 1, + "charOffset": 48412, + "charLength": 151, + "snippet": { + "text": "\r\n\t\t\tx1 = std::fabs(1.0 - ((static_cast(sum)) + i) / med);\r\n\t\t\tx2 = std::fabs(1.0 - (static_cast(sum) / med));\r\n\t\t} while (x1 < x2);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "047060ceaafdd96e", + "equalIndicator/v1": "3639759d33ce8b063914006e5a81250052b726da95f1fab647ce579b2a011b97" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4216, + "startColumn": 14, + "charOffset": 126934, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4214, + "startColumn": 1, + "charOffset": 126916, + "charLength": 222, + "snippet": { + "text": "}\r\n\r\nvoid Player::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link /*= LINK_OWNER*/) {\r\n\tif (link == LINK_OWNER) {\r\n\t\t// calling movement scripts\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fd537e5c281dc735", + "equalIndicator/v1": "363b9f168586ef737bbf321bb0ea599acc31d9f3f2dbe317d305528b52ea7fcc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'", + "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3478, + "startColumn": 20, + "charOffset": 106844, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3476, + "startColumn": 1, + "charOffset": 106722, + "charLength": 233, + "snippet": { + "text": "\tmsg.add(player->getBaseMagicLevel());\r\n\tmsg.add(player->getLoyaltyMagicLevel());\r\n\tmsg.add(player->getMagicLevelPercent() * 100);\r\n\r\n\tfor (uint8_t i = SKILL_FIRST; i < SKILL_CRITICAL_HIT_CHANCE; ++i) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71c3cd35df808aa3", + "equalIndicator/v1": "3640d42fe3a9b7918803bdd0cf1b11da01e58f64213826433859c7d088ee0bd0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'long long' to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'long long' to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/result_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 22, + "startColumn": 20, + "charOffset": 719, + "charLength": 3, + "snippet": { + "text": "res" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 656, + "charLength": 107, + "snippet": { + "text": "\r\n\tconst std::string &s = getString(L, 2);\r\n\tlua_pushnumber(L, res->getNumber(s));\r\n\treturn 1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fa137ed0ed214d3a", + "equalIndicator/v1": "3673208f8622326839ea5f42db075dfe7ad00d9401ab084cb89ce36187129911" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 423, + "startColumn": 147, + "charOffset": 13873, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 421, + "startColumn": 1, + "charOffset": 13722, + "charLength": 328, + "snippet": { + "text": "}\r\n\r\nbool Actions::useItemEx(std::shared_ptr player, const Position &fromPos, const Position &toPos, uint8_t toStackPos, std::shared_ptr item, bool isHotkey, std::shared_ptr creature /* = nullptr*/) {\r\n\tconst ItemType &it = Item::items[item->getID()];\r\n\tif (it.isRune() || it.type == ITEM_TYPE_POTION) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4a1d35a4ed83b8bc", + "equalIndicator/v1": "36a267d0821b8e6f47e7dd0c2be661a01fd7042f7a1474a4298bf773870e48b7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 285, + "startColumn": 52, + "charOffset": 8777, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 283, + "startColumn": 1, + "charOffset": 8721, + "charLength": 188, + "snippet": { + "text": "}\r\n\r\nbool Combat::isInPvpZone(std::shared_ptr attacker, std::shared_ptr target) {\r\n\treturn attacker->getZoneType() == ZONE_PVP && target->getZoneType() == ZONE_PVP;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e63d2485726347d8", + "equalIndicator/v1": "36c8d72af91522912ff234aae3b61019978f4b9fd06dac5502af58328420f448" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1159, + "startColumn": 31, + "charOffset": 34133, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1157, + "startColumn": 1, + "charOffset": 34001, + "charLength": 159, + "snippet": { + "text": "\tvoid sendCreatureSquare(std::shared_ptr creature, SquareColor_t color) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureSquare(creature, color);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "669eeabc107f6fe5", + "equalIndicator/v1": "36e42bd0cecaaf282441ea9b8ff73d7a4f6103252ad7cafa160ce6cae9b1fb6b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1039, + "startColumn": 7, + "charOffset": 39507, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1037, + "startColumn": 1, + "charOffset": 39373, + "charLength": 279, + "snippet": { + "text": "// Monster\r\nvoid EventCallback::monsterOnDropLoot(std::shared_ptr monster, std::shared_ptr corpse) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::monsterOnDropLoot - \"\r\n\t\t \"Monster corpse {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d5487655ce8737c6", + "equalIndicator/v1": "36f8be059bbf2d81ca9ecc096454079b75b59ff3d689027c19e09c964fd142cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1164, + "startColumn": 31, + "charOffset": 34302, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1162, + "startColumn": 1, + "charOffset": 34161, + "charLength": 169, + "snippet": { + "text": "\tvoid sendCreatureChangeOutfit(std::shared_ptr creature, const Outfit_t &outfit) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureOutfit(creature, outfit);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3aea5ab01483e8e6", + "equalIndicator/v1": "36fe908b0096a325ea26e51b50b3f16baafa1b7bc830ef29ab4ba98ac0d6601f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'targetPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'targetPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7403, + "startColumn": 93, + "charOffset": 257851, + "charLength": 12, + "snippet": { + "text": "targetPlayer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7401, + "startColumn": 1, + "charOffset": 257633, + "charLength": 320, + "snippet": { + "text": "void Game::sendMessages(\r\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\r\n\tconst Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetPlayer,\r\n\tTextMessage &message, const CreatureVector &spectators, int32_t realDamage\r\n) const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7ccf5e476e6b69b9", + "equalIndicator/v1": "370751d1f9cd9bc7be5927ddd92680762b465600f0156b082091c2a97ff929d4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2931, + "startColumn": 3, + "charOffset": 89513, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2929, + "startColumn": 1, + "charOffset": 89488, + "charLength": 231, + "snippet": { + "text": "\r\n\tif (search == 1) {\r\n\t\tuint16_t monsterAmount = msg.get();\r\n\t\tstd::map mtype_list = g_game().getBestiaryList();\r\n\t\tfor (uint16_t monsterCount = 1; monsterCount <= monsterAmount; monsterCount++) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "995776f7828a344c", + "equalIndicator/v1": "3712e733047bd44c6ad055342faf0ea58d05d66d87aefd82a9f732783fd16b72" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 144, + "startColumn": 113, + "charOffset": 4020, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 142, + "startColumn": 1, + "charOffset": 3903, + "charLength": 215, + "snippet": { + "text": "}\r\n\r\nCombatDamage Weapon::getCombatDamage(CombatDamage combat, std::shared_ptr player, std::shared_ptr item, int32_t damageModifier) const {\r\n\t// Local variables\r\n\tuint32_t level = player->getLevel();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "52c4efeb88949720", + "equalIndicator/v1": "371b27cb6aa5cd7d9907ca2b13098862cb80bc779266f6a3113bd7ca5fe1e8f9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'removeCreature' is within a recursive call chain", + "markdown": "Function 'removeCreature' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1147, + "startColumn": 12, + "charOffset": 46888, + "charLength": 14, + "snippet": { + "text": "removeCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1145, + "startColumn": 1, + "charOffset": 46872, + "charLength": 192, + "snippet": { + "text": "}\r\n\r\nbool Game::removeCreature(std::shared_ptr creature, bool isLogout /* = true*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!creature || creature->isRemoved()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d7f83589b5b35c1c", + "equalIndicator/v1": "3727d2800c900da9643a4b35ce0f2a113dfb510ad01b8a3cf285152c57fb4c84" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 151, + "startColumn": 7, + "charOffset": 5297, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 149, + "startColumn": 1, + "charOffset": 5129, + "charLength": 315, + "snippet": { + "text": "\r\nvoid EventCallback::creatureOnHear(std::shared_ptr creature, std::shared_ptr speaker, const std::string &words, SpeakClasses type) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnHear - \"\r\n\t\t \"Creature {} speaker {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9b793f2ed47c1ac5", + "equalIndicator/v1": "3799afb4b20c1369039d5a3342ad248c52370239fdca9750db7bd2ecd867078d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2696, + "startColumn": 2, + "charOffset": 83035, + "charLength": 21, + "snippet": { + "text": "PartyAnalyzerAction_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2694, + "startColumn": 1, + "charOffset": 83028, + "charLength": 161, + "snippet": { + "text": "\t}\r\n\r\n\tPartyAnalyzerAction_t action = static_cast(msg.getByte());\r\n\tif (action == PARTYANALYZERACTION_RESET) {\r\n\t\tparty->resetAnalyzer();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f4ee5d4382e267a9", + "equalIndicator/v1": "379bbdf7bbd4f39d1c6a02659cb171638436012fe003f9bad3afdd2b9c1bcd95" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6896, + "startColumn": 29, + "charOffset": 239199, + "charLength": 52, + "snippet": { + "text": "(damage.secondary.value * (damage.damageMultiplier))" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6894, + "startColumn": 1, + "charOffset": 239048, + "charLength": 218, + "snippet": { + "text": "\tif (damage.damageMultiplier > 0) {\r\n\t\tdamage.primary.value += (damage.primary.value * (damage.damageMultiplier)) / 100.;\r\n\t\tdamage.secondary.value += (damage.secondary.value * (damage.damageMultiplier)) / 100.;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4e423c53f236d486", + "equalIndicator/v1": "37cc5ded1b22413a0333bf5e915ccd31be0a292adf0566695101583e12998f75" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 293, + "startColumn": 111, + "charOffset": 10555, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 291, + "startColumn": 1, + "charOffset": 10440, + "charLength": 246, + "snippet": { + "text": "}\r\n\r\nReturnValue Events::eventCreatureOnTargetCombat(std::shared_ptr creature, std::shared_ptr target) {\r\n\t// Creature:onTargetCombat(target) or Creature.onTargetCombat(self, target)\r\n\tif (info.creatureOnTargetCombat == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cc7d691849bdf6b4", + "equalIndicator/v1": "37dae1963685ec92b03400e8718890150225c076b5e22319dfbecc0d1e0fde79" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 122, + "startColumn": 46, + "charOffset": 3136, + "charLength": 6, + "snippet": { + "text": "amount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 120, + "startColumn": 1, + "charOffset": 3062, + "charLength": 169, + "snippet": { + "text": "\r\n\tif (destinationPlayer) {\r\n\t\tg_metrics().addCounter(\"balance_increase\", amount, { { \"player\", destinationPlayer->getName() }, { \"context\", \"bank_transfer\" } });\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d654df2567e8da37", + "equalIndicator/v1": "37e49ad5fecd1798f5ad91ad836e74d99845d622a8eb4c9d25b11439d3a484fb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::list>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'std::list\\>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 283, + "startColumn": 21, + "charOffset": 7880, + "charLength": 5, + "snippet": { + "text": "house" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 281, + "startColumn": 1, + "charOffset": 7774, + "charLength": 163, + "snippet": { + "text": "\t// house:getDoorCount()\r\n\tif (const auto &house = getUserdataShared(L, 1)) {\r\n\t\tlua_pushnumber(L, house->getDoors().size());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9e0a4456a45a65ec", + "equalIndicator/v1": "380d7ca63d6cf2c743ff936b8ed3dab762c8fc51099ef661f3607c54d8973a88" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/inbox/inbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 15, + "charOffset": 1240, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 1106, + "charLength": 202, + "snippet": { + "text": "\tif (item->getTopParent().get() != this) { // MY\r\n\t\tif (std::shared_ptr container = item->getContainer()) {\r\n\t\t\taddCount = container->getItemHoldingCount() + 1;\r\n\t\t} else {\r\n\t\t\taddCount = 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5904e1e691f3fc3f", + "equalIndicator/v1": "38464be0b86bd901df599160d4862b553e966d0efeafe3eabc8fe898c5073848" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 381, + "startColumn": 27, + "charOffset": 13781, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 379, + "startColumn": 1, + "charOffset": 13749, + "charLength": 132, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.creatureOnDrainHealth, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "567fa7de4ee34f71", + "equalIndicator/v1": "388836dd34947a7674d913667866a9150d577792ef55d06972463ab1ac4a9a3f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float_t' (aka 'float')", + "markdown": "Narrowing conversion from 'int' to 'float_t' (aka 'float')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 318, + "startColumn": 2, + "charOffset": 9417, + "charLength": 2, + "snippet": { + "text": "if" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 316, + "startColumn": 1, + "charOffset": 9370, + "charLength": 151, + "snippet": { + "text": "\r\n\tconst ItemType &it = Item::items[itemId];\r\n\tif (it.hasSubType()) {\r\n\t\tif (it.stackable) {\r\n\t\t\titemCount = std::ceil(count / (float_t)it.stackSize);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "42f5f57135d796c9", + "equalIndicator/v1": "389334791cd9eb4ced6368a30f136684da887027849909172e42f0a5b389cb0c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3417, + "startColumn": 59, + "charOffset": 125998, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3415, + "startColumn": 1, + "charOffset": 125935, + "charLength": 176, + "snippet": { + "text": "}\r\n\r\nbool Game::playerBroadcastMessage(std::shared_ptr player, const std::string &text) const {\r\n\tif (!player->hasFlag(PlayerFlags_t::CanBroadcast)) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4252e90f51ae8de2", + "equalIndicator/v1": "38b130d656003e825ea89019f8fbf7465d9fcc74cfd41254e79ad38f979b564c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 437, + "startColumn": 23, + "charOffset": 15251, + "charLength": 9, + "snippet": { + "text": "totalCost" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 435, + "startColumn": 1, + "charOffset": 15157, + "charLength": 112, + "snippet": { + "text": "\t\tcallback.pushBoolean(ignore);\r\n\t\tcallback.pushString(itemType.name);\r\n\t\tcallback.pushNumber(totalCost);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75453edc1fc43fc9", + "equalIndicator/v1": "38c1e99b6a26d4739007ed001f1c9fbbca61e84ff1ed038005913745428898d8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 228, + "startColumn": 3, + "charOffset": 5759, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 226, + "startColumn": 1, + "charOffset": 5702, + "charLength": 185, + "snippet": { + "text": "\r\n\tif (const TileItemVector* items = getItemList()) {\r\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\r\n\t\t\tif ((*it)->getBed()) {\r\n\t\t\t\treturn (*it)->getBed();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6c1640281eff2afe", + "equalIndicator/v1": "38d60c6d04d55d625cd85962292e8f75fa0669876d6850707b310cd54864011f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 711, + "startColumn": 121, + "charOffset": 23513, + "charLength": 27, + "snippet": { + "text": "spellSecondaryGroupCooldown" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 709, + "startColumn": 1, + "charOffset": 23346, + "charLength": 280, + "snippet": { + "text": "\t\t}\r\n\t\tif (spellSecondaryGroupCooldown > 0) {\r\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLGROUPCOOLDOWN, spellSecondaryGroupCooldown / rateCooldown, 0, false, secondaryGroup);\r\n\t\t\tplayer->addCondition(condition);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e4ffd29b9b8e6ebd", + "equalIndicator/v1": "3907af3482ae78ed2afb56031f4183a00209d0b8c669999c20e19303e98d6c14" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 486, + "startColumn": 68, + "charOffset": 19375, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 484, + "startColumn": 1, + "charOffset": 19303, + "charLength": 183, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerDepotItems(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6fe96ce7af5cb171", + "equalIndicator/v1": "390ccd42403ee1e7659e3cd2b057ab419ddaeea2717c1633d503a12b408853fe" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 638, + "startColumn": 63, + "charOffset": 22713, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 636, + "startColumn": 1, + "charOffset": 22646, + "charLength": 306, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnLookInTrade(std::shared_ptr player, std::shared_ptr partner, std::shared_ptr item, int32_t lookDistance) {\r\n\t// Player:onLookInTrade(partner, item, distance) or Player.onLookInTrade(self, partner, item, distance)\r\n\tif (info.playerOnLookInTrade == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "89ff57bf68e8b7f3", + "equalIndicator/v1": "3916ba15bb027820ff5bdc357b38c5a3114155bcdcaf59c3ad2c62a0b4c8eaac" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 185, + "startColumn": 22, + "charOffset": 7381, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 183, + "startColumn": 1, + "charOffset": 7321, + "charLength": 211, + "snippet": { + "text": "\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r\n\tvirtual ReturnValue queryRemove(const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr = nullptr) override {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb3d35a3e2819ca9", + "equalIndicator/v1": "39215b3c99a56913b595d9373ffdf9a1649da7b0dcbd33ba4997c1cb7f712314" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 734, + "startColumn": 19, + "charOffset": 22450, + "charLength": 10, + "snippet": { + "text": "-oldWeight" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 732, + "startColumn": 1, + "charOffset": 22382, + "charLength": 130, + "snippet": { + "text": "\titem->setID(itemId);\r\n\titem->setSubType(count);\r\n\tupdateItemWeight(-oldWeight + item->getWeight());\r\n\r\n\t// send change to client\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9974e2e5b5fdeae0", + "equalIndicator/v1": "3945c287217f0d7f105f8422d9ee846a5506188d6aeffcc73877ea850d05b992" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2515, + "startColumn": 70, + "charOffset": 95908, + "charLength": 8, + "snippet": { + "text": "cylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2513, + "startColumn": 1, + "charOffset": 95834, + "charLength": 245, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Game::findItemOfType(std::shared_ptr cylinder, uint16_t itemId, bool depthSearch /*= true*/, int32_t subType /*= -1*/) const {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (cylinder == nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9b809aa061b7735e", + "equalIndicator/v1": "3945cb96beb3543c98d6bb45c1b9bfc6fe742e236f0683bdd68f3ed3727071cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 574, + "startColumn": 3, + "charOffset": 27034, + "charLength": 73, + "snippet": { + "text": "abilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 572, + "startColumn": 1, + "charOffset": 26917, + "charLength": 342, + "snippet": { + "text": "\t\tint16_t value = pugi::cast(valueAttribute.value());\r\n\t\tAbilities &abilities = itemType.getAbilities();\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2a763f157f99ea92", + "equalIndicator/v1": "39692f3424f0c6e5a909f977fa4af870d76185be29f7333a7c2f1d594698d409" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 464, + "startColumn": 58, + "charOffset": 15947, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 462, + "startColumn": 1, + "charOffset": 15885, + "charLength": 149, + "snippet": { + "text": "}\r\n\r\nvoid Npc::onPlayerCloseChannel(std::shared_ptr creature) {\r\n\tstd::shared_ptr player = creature->getPlayer();\r\n\tif (!player) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fcd49e320a697a14", + "equalIndicator/v1": "3970bd4f27ba02c8978b3b0ac6dc6c4b8bb23c560d2c015548c7358b0c7bfd22" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2283, + "startColumn": 26, + "charOffset": 79602, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2281, + "startColumn": 1, + "charOffset": 79484, + "charLength": 276, + "snippet": { + "text": "\tint32_t healingBonus = 0;\r\n\tuint8_t stage = getStage(WheelStage_t::BLESSING_OF_THE_GROVE);\r\n\tint32_t healthPercent = std::round((static_cast(target->getHealth()) * 100) / static_cast(target->getMaxHealth()));\r\n\tif (healthPercent <= 30) {\r\n\t\tif (stage >= 3) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fe019caed52a5dd5", + "equalIndicator/v1": "39c274ed6c5eef32eb031a2306408de897da4126a0c2c9bfa87a549fcec74439" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 774, + "startColumn": 52, + "charOffset": 25167, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 772, + "startColumn": 1, + "charOffset": 25053, + "charLength": 232, + "snippet": { + "text": "\t\t\tauto conditionCopy = condition->clone();\r\n\t\t\tif (caster) {\r\n\t\t\t\tconditionCopy->setParam(CONDITION_PARAM_OWNER, caster->getID());\r\n\t\t\t\tconditionCopy->setPositionParam(CONDITION_PARAM_CASTER_POSITION, caster->getPosition());\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d748b1f90d9019ae", + "equalIndicator/v1": "39e056391954c198f671da5e592e593c66b3ad233e079ec7bc924ee8d8c95eee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 72, + "startColumn": 31, + "charOffset": 2806, + "charLength": 28, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 70, + "startColumn": 1, + "charOffset": 2687, + "charLength": 260, + "snippet": { + "text": "\tint32_t bitToggle(int32_t input, const std::shared_ptr charm, bool on) const;\r\n\r\n\tbool hasCharmUnlockedRuneBit(const std::shared_ptr charm, int32_t input) const;\r\n\r\n\tstd::list getCharmUsedRuneBitAll(std::shared_ptr player);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e4ce3bc1e8932837", + "equalIndicator/v1": "39f596abc408242c3354662c03b9da610a0b2cc3f70b2b8910500aa96dd40be8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use '= default' to define a trivial destructor", + "markdown": "Use '= default' to define a trivial destructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 107, + "startColumn": 11, + "charOffset": 2622, + "charLength": 4, + "snippet": { + "text": "Tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 105, + "startColumn": 1, + "charOffset": 2544, + "charLength": 109, + "snippet": { + "text": "\tTile(uint16_t x, uint16_t y, uint8_t z) :\r\n\t\ttilePos(x, y, z) { }\r\n\tvirtual ~Tile() {};\r\n\r\n\t// non-copyable\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1703faaf0983e531", + "equalIndicator/v1": "3a0dbff7671ca0b8a062e65d7c3a16edfaa5042bf7d5795696bc8a4d21d59197" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 66, + "startColumn": 15, + "charOffset": 1967, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 64, + "startColumn": 1, + "charOffset": 1948, + "charLength": 216, + "snippet": { + "text": "}\r\n\r\nvoid Mailbox::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tgetParent()->postAddNotification(thing, oldParent, index, LINK_PARENT);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fc331311e39a5dc6", + "equalIndicator/v1": "3a2500e778bd126468a28fc512a1cdbd41c3908450f5beb17fce1d3ad8a3a90a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 495, + "startColumn": 99, + "charOffset": 14779, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 493, + "startColumn": 1, + "charOffset": 14676, + "charLength": 263, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::EquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool isCheck) {\r\n\tif (player == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e00063da595c6b31", + "equalIndicator/v1": "3a755c28a62405d7d5cb6a1e17e95eda0bcd0c74140896e58846fd096c592ff1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 124, + "startColumn": 10, + "charOffset": 3561, + "charLength": 6, + "snippet": { + "text": "health" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 122, + "startColumn": 1, + "charOffset": 3520, + "charLength": 83, + "snippet": { + "text": "\r\n\tint32_t getHealth() const {\r\n\t\treturn health;\r\n\t}\r\n\tvoid setHealth(int32_t h) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b75267324fdc7c58", + "equalIndicator/v1": "3aa48705bd621f0faea460cb1bee843b98a1d3c1e137ba7b87f90f79af2a7f4c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 466, + "startColumn": 17, + "charOffset": 12301, + "charLength": 9, + "snippet": { + "text": "shopBlock" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 464, + "startColumn": 1, + "charOffset": 12173, + "charLength": 237, + "snippet": { + "text": "\tauto playerGUID = getNumber(L, 2, 0);\r\n\tconst auto &shopItems = npc->getShopItemVector(playerGUID);\r\n\tfor (ShopBlock shopBlock : shopItems) {\r\n\t\tsetField(L, \"id\", shopBlock.itemId);\r\n\t\tsetField(L, \"name\", shopBlock.itemName);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "92f12847ce43e177", + "equalIndicator/v1": "3ac5c98a2210217d41564ef4d8eccc1365d0b4867577ee8badaad9290f28ab29" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with new to avoid duplicating the type name", + "markdown": "Use auto when initializing with new to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 216, + "startColumn": 4, + "charOffset": 7097, + "charLength": 18, + "snippet": { + "text": "ItemClassification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 214, + "startColumn": 1, + "charOffset": 7054, + "charLength": 191, + "snippet": { + "text": "\t\t\treturn *it;\r\n\t\t} else if (create) {\r\n\t\t\tItemClassification* itemClassification = new ItemClassification(id);\r\n\t\t\taddItemsClassification(itemClassification);\r\n\t\t\treturn itemClassification;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "588e318879a8ef69", + "equalIndicator/v1": "3ac7597e93de4c93f9e130d1a7a01ad14c63bea0040e40787de86b2a7bf6796d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 10331, + "startColumn": 60, + "charOffset": 359055, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10329, + "startColumn": 1, + "charOffset": 358991, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nvoid Game::removePlayerUniqueLogin(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().error(\"Attempted to remove null player from unique player names list.\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5844c775e972047f", + "equalIndicator/v1": "3adce66d3cea6a804294df8310f289e2a067a2b38d6721591be2d8c1af15db3d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 627, + "startColumn": 26, + "charOffset": 29475, + "charLength": 19, + "snippet": { + "text": "MITIGATION_INCREASE" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 625, + "startColumn": 1, + "charOffset": 29277, + "charLength": 346, + "snippet": { + "text": "// SLOT_RED_50 = 16\r\nvoid IOWheel::slotRed50(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\r\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\r\n\tif (isKnight(vocationCipId)) {\r\n\t\taddSpell(player, bonusData, WheelSlots_t::SLOT_RED_50, points, \"Fierce Berserk\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "33a9112f080fbf1d", + "equalIndicator/v1": "3af5239363679d74997899cb22d46e3be8edbd16845b894369237892983692e3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 917, + "startColumn": 29, + "charOffset": 27612, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 915, + "startColumn": 1, + "charOffset": 27517, + "charLength": 249, + "snippet": { + "text": "\tuint16_t counter = std::max(0, capacity() - size());\r\n\r\n\tfor (std::shared_ptr item : itemlist) {\r\n\t\tif (std::shared_ptr container = item->getContainer()) {\r\n\t\t\tcounter += std::max(0, container->getFreeSlots());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "837ea3b357a04b33", + "equalIndicator/v1": "3af68a056af047e19440df2e71cf24880c9cc9b86ca820c6311fb9a5b5e0a726" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2786, + "startColumn": 44, + "charOffset": 82933, + "charLength": 10, + "snippet": { + "text": "experience" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2784, + "startColumn": 1, + "charOffset": 82871, + "charLength": 311, + "snippet": { + "text": "\r\n\t\t// Level loss\r\n\t\tuint64_t expLoss = static_cast(experience * deathLossPercent);\r\n\t\tg_events().eventPlayerOnLoseExperience(static_self_cast(), expLoss);\r\n\t\tg_callbacks().executeCallback(EventCallback_t::playerOnLoseExperience, &EventCallback::playerOnLoseExperience, getPlayer(), expLoss);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6f1c9bccf117cf1a", + "equalIndicator/v1": "3b197a37a9226d03c9c8719033d919b7d9f6010d621d49f5b1fd217fa15e486c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5718, + "startColumn": 63, + "charOffset": 168940, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5716, + "startColumn": 1, + "charOffset": 168873, + "charLength": 128, + "snippet": { + "text": "}\r\n\r\nGuildEmblems_t Player::getGuildEmblem(std::shared_ptr player) const {\r\n\tif (!player) {\r\n\t\treturn GUILDEMBLEM_NONE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "26587da9c5fa57e7", + "equalIndicator/v1": "3b268b21c874079c3273123e8f3834d9f3c0fdeeee1c00e9ae7bf2bb0cff5d43" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1274, + "startColumn": 69, + "charOffset": 39174, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1272, + "startColumn": 1, + "charOffset": 39101, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nbool Creature::deprecatedOnKilledCreature(std::shared_ptr target, bool lastHit) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tauto master = getMaster();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8581ef0c68924efa", + "equalIndicator/v1": "3b38f29a2335c8f2c706241c235af5d64624fe4614dd865776583bfce0a61ae4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1065, + "startColumn": 50, + "charOffset": 34949, + "charLength": 8, + "snippet": { + "text": "affected" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1063, + "startColumn": 1, + "charOffset": 34765, + "charLength": 211, + "snippet": { + "text": "\t\t\t\t\tif (combat && caster && nextTarget) {\r\n\t\t\t\t\t\tcombat->doChainEffect(from, nextTarget->getPosition(), combat->params.chainEffect);\r\n\t\t\t\t\t\tcombat->doCombat(caster, nextTarget, from, affected);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eac454a00fd58203", + "equalIndicator/v1": "3b4f68ef70345b2f37d71981a02cbdd66f448a2e2726e1d076c0e5cf5d2fca07" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 989, + "startColumn": 26, + "charOffset": 26930, + "charLength": 10, + "snippet": { + "text": "manaChange" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 987, + "startColumn": 1, + "charOffset": 26870, + "charLength": 159, + "snippet": { + "text": "\t} else {\r\n\t\tCombatDamage damage;\r\n\t\tdamage.primary.value = manaChange;\r\n\t\tdamage.origin = ORIGIN_NONE;\r\n\t\tg_game().combatChangeMana(nullptr, player, damage);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dae2fe36e4a8393a", + "equalIndicator/v1": "3b51a04c39f72be6aed8bcc9b8536b2bb8bbeea5e8fab979d279234077409d75" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 495, + "startColumn": 129, + "charOffset": 14809, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 493, + "startColumn": 1, + "charOffset": 14676, + "charLength": 263, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::EquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool isCheck) {\r\n\tif (player == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f55dcf8b98a5e739", + "equalIndicator/v1": "3b656ce6e1324f45532c1b0a248308f1d8239a4e8c0790a7ed9d1543f770fc8f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 231, + "startColumn": 51, + "charOffset": 6970, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 229, + "startColumn": 1, + "charOffset": 6915, + "charLength": 241, + "snippet": { + "text": "}\r\n\r\nvoid Npc::onPlayerBuyItem(std::shared_ptr player, uint16_t itemId, uint8_t subType, uint16_t amount, bool ignore, bool inBackpacks) {\r\n\tif (player == nullptr) {\r\n\t\tg_logger().error(\"[Npc::onPlayerBuyItem] - Player is nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "afb90c4faf46c160", + "equalIndicator/v1": "3b6dcbddbb22797200651351630f93cd7b54bc88349a4cd014d3f4c8b9c88e35" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 294, + "startColumn": 67, + "charOffset": 8598, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 292, + "startColumn": 1, + "charOffset": 8526, + "charLength": 133, + "snippet": { + "text": "\t}\r\n\r\n\tstatic std::string parseAugmentDescription(std::shared_ptr item, bool inspect = false) {\r\n\t\tif (!item) {\r\n\t\t\treturn \"\";\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e50a4786a147ef5b", + "equalIndicator/v1": "3b8ca3ee9aae0cee1a9b060056661177887c6eba5688966ed15d42042a22cbd0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 655, + "startColumn": 69, + "charOffset": 17772, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 653, + "startColumn": 1, + "charOffset": 17699, + "charLength": 185, + "snippet": { + "text": "}\r\n\r\nvoid ConditionAttributes::updateIncreases(std::shared_ptr creature) const {\r\n\tfor (uint8_t i = 0; i < COMBAT_COUNT; i++) {\r\n\t\tauto increaseValue = getIncreaseByIndex(i);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9ad39b94463e0e55", + "equalIndicator/v1": "3b8d7f02c4398a39f0d2ad241031b059b0441a937af7a4e36d7b5da2590297ad" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 360, + "startColumn": 62, + "charOffset": 10261, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 358, + "startColumn": 1, + "charOffset": 10195, + "charLength": 190, + "snippet": { + "text": "}\r\n\r\nbool CombatSpell::executeCastSpell(std::shared_ptr creature, const LuaVariant &var) const {\r\n\t// onCastSpell(creature, var)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c1f02907cb10da30", + "equalIndicator/v1": "3b946eebddc657bf7c7ee5140e3cd4cf3759275dbedbfab5fbbd81d485f268e6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6908, + "startColumn": 31, + "charOffset": 239766, + "charLength": 38, + "snippet": { + "text": "(damage.secondary.value * damageBonus)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6906, + "startColumn": 1, + "charOffset": 239634, + "charLength": 190, + "snippet": { + "text": "\t\t\tif (damageBonus != 0) {\r\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\r\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cf3fc91446068c8a", + "equalIndicator/v1": "3bac1831738bd2efd90bd314d07d4dd65d9b8de900c7b305f1173815786a55d3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/shop_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 120, + "startColumn": 36, + "charOffset": 3401, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 118, + "startColumn": 1, + "charOffset": 3275, + "charLength": 189, + "snippet": { + "text": "\t// shop:setStorageKey(storage)\r\n\tif (const auto &shop = getUserdataShared(L, 1)) {\r\n\t\tshop->shopBlock.itemStorageKey = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eb2f60b31e1cf1a2", + "equalIndicator/v1": "3bc94a5b84c26b3422e1afcf2d9a5056720368addd0d1d6dfab893c1962419f0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 574, + "startColumn": 3, + "charOffset": 27034, + "charLength": 9, + "snippet": { + "text": "abilities" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 572, + "startColumn": 1, + "charOffset": 26917, + "charLength": 342, + "snippet": { + "text": "\t\tint16_t value = pugi::cast(valueAttribute.value());\r\n\t\tAbilities &abilities = itemType.getAbilities();\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2a49346af508d3a9", + "equalIndicator/v1": "3bf3858dcd6a8b1573607a7554bed717868056d3968df8c7b23ab4bfd73f22fd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 592, + "startColumn": 13, + "charOffset": 28611, + "charLength": 11, + "snippet": { + "text": "stringValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 590, + "startColumn": 1, + "charOffset": 28419, + "charLength": 417, + "snippet": { + "text": "\t} else if (stringValue == \"absorbpercentdeath\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentlifedrain\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_LIFEDRAIN)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentmanadrain\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7106fcd6f00ff50f", + "equalIndicator/v1": "3bf428823e437bca7cb39f97c7196d81bfce2e81da4d127a79e102900474b173" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/position.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 60, + "startColumn": 10, + "charOffset": 2171, + "charLength": 8, + "snippet": { + "text": "std::abs" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 58, + "startColumn": 1, + "charOffset": 2086, + "charLength": 208, + "snippet": { + "text": "\t}\r\n\tstatic int16_t getDistanceZ(const Position &p1, const Position &p2) {\r\n\t\treturn std::abs(Position::getOffsetZ(p1, p2));\r\n\t}\r\n\tstatic int32_t getDiagonalDistance(const Position &p1, const Position &p2) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "64ba9e376746bb51", + "equalIndicator/v1": "3c16a41f1f2a99dac4d2f24f4ab3b76ddfe062cb7aeacd64842a431fcfcdf7f2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable has narrower type 'uint8_t' than iteration's upper bound 'std::vector::size_type'", + "markdown": "Loop variable has narrower type 'uint8_t' than iteration's upper bound 'std::vector::size_type'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 912, + "startColumn": 22, + "charOffset": 31636, + "charLength": 1, + "snippet": { + "text": "i" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 910, + "startColumn": 1, + "charOffset": 31515, + "charLength": 190, + "snippet": { + "text": "uint8_t PlayerWheel::getGemIndex(const std::string &uuid) const {\r\n\tauto gems = getRevealedGems();\r\n\tfor (uint8_t i = 0; i < gems.size(); ++i) {\r\n\t\tif (gems[i].uuid == uuid) {\r\n\t\t\treturn i;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8a8ad58db5c594fe", + "equalIndicator/v1": "3c4329a9b5e1c3574ccae47568837f34eaac13743aea5d2c76ec87e24493de8f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2144, + "startColumn": 54, + "charOffset": 63056, + "charLength": 4, + "snippet": { + "text": "task" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2142, + "startColumn": 1, + "charOffset": 62998, + "charLength": 174, + "snippet": { + "text": "}\r\n\r\nvoid Player::setNextActionTask(std::shared_ptr task, bool resetIdleTime /*= true */) {\r\n\tif (actionTaskEvent != 0) {\r\n\t\tg_dispatcher().stopEvent(actionTaskEvent);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1e4e96456bd3c282", + "equalIndicator/v1": "3c504971573c35a17bc7557dd24d3dfe0ecb901b07712540bdd662e1097f87bb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6549, + "startColumn": 28, + "charOffset": 226041, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6547, + "startColumn": 1, + "charOffset": 225973, + "charLength": 189, + "snippet": { + "text": "\t\t\t\tdamageIncreaseMessage = true;\r\n\t\t\t}\r\n\t\t\tdamage.primary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\r\n\t\t}\r\n\t\tdamage.primary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5bd51413a044fb0b", + "equalIndicator/v1": "3c5c4119e875f5e0d1e2ae45cc4a7f5e1583ec0e5f475679b91d7bd043f7f8c6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9847, + "startColumn": 30, + "charOffset": 344213, + "charLength": 6, + "snippet": { + "text": "amount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9845, + "startColumn": 1, + "charOffset": 344085, + "charLength": 162, + "snippet": { + "text": "\t\tfor (const std::shared_ptr &item : itemVector) {\r\n\t\t\tif (item->getItemCount() > amount) {\r\n\t\t\t\tinternalRemoveItem(item, amount);\r\n\t\t\t\tbreak;\r\n\t\t\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2fd1a63ead55dcfc", + "equalIndicator/v1": "3c7dd4abf17a464884c39ac74276f3101a58ab02b6813d1987dd0e480b893322" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 847, + "startColumn": 24, + "charOffset": 24180, + "charLength": 1, + "snippet": { + "text": "7" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 845, + "startColumn": 1, + "charOffset": 24102, + "charLength": 188, + "snippet": { + "text": "\t\t} else {\r\n\t\t\tif (house->getPayRentWarnings() < 7) {\r\n\t\t\t\tint32_t daysLeft = 7 - house->getPayRentWarnings();\r\n\r\n\t\t\t\tstd::shared_ptr letter = Item::CreateItem(ITEM_LETTER_STAMPED);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e234b31c2303b1a8", + "equalIndicator/v1": "3c95bc7f99e55a170c7ff444f1530dd7f59ef004b6175362cd34cede60f5e251" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 881, + "startColumn": 41, + "charOffset": 28684, + "charLength": 10, + "snippet": { + "text": "getMaxMana" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 879, + "startColumn": 1, + "charOffset": 28571, + "charLength": 197, + "snippet": { + "text": "void Creature::changeMana(int32_t manaChange) {\r\n\tif (manaChange > 0) {\r\n\t\tmana += std::min(manaChange, getMaxMana() - mana);\r\n\t} else {\r\n\t\tmana = std::max(0, mana + manaChange);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75d3222aa2432c06", + "equalIndicator/v1": "3ca165a9967cc059dfbdfc74500908f39fe1310ce39f18298fe028d3778a2626" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/loot_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 234, + "startColumn": 31, + "charOffset": 5948, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 232, + "startColumn": 1, + "charOffset": 5853, + "charLength": 158, + "snippet": { + "text": "\tconst auto loot = getUserdataShared(L, 1);\r\n\tif (loot) {\r\n\t\tloot->lootBlock.hitChance = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f1a7314ffc484f38", + "equalIndicator/v1": "3cae86459cfe72e115680fd1478475bfa231e0d30da7e548b37e86e1e5ae5b7c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 798, + "startColumn": 38, + "charOffset": 28878, + "charLength": 12, + "snippet": { + "text": "fromCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 796, + "startColumn": 1, + "charOffset": 28788, + "charLength": 158, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, toPosition);\r\n\r\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\r\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7487257be3518b82", + "equalIndicator/v1": "3cca1cac21a45552ed86ff710fc93cda447d6c5a16eaea21cb8166ce451cb6df" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1329, + "startColumn": 95, + "charOffset": 39200, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1327, + "startColumn": 1, + "charOffset": 39101, + "charLength": 193, + "snippet": { + "text": "}\r\n\r\nstd::vector> Player::getRewardsFromContainer(std::shared_ptr container) const {\r\n\tstd::vector> rewardItemsVector;\r\n\tif (container) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "675cb78c1591e28b", + "equalIndicator/v1": "3cda93a6176f9ea8c5536a40039ef6bee980a69a4a45604b33328fef5e027246" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 365, + "startColumn": 48, + "charOffset": 9563, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 363, + "startColumn": 1, + "charOffset": 9511, + "charLength": 310, + "snippet": { + "text": "}\r\n\r\nvoid Tile::onAddTileItem(std::shared_ptr item) {\r\n\tif ((item->hasProperty(CONST_PROP_MOVABLE) || item->getContainer()) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) {\r\n\t\tauto it = g_game().browseFields.find(static_self_cast());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "374205e66337ef2e", + "equalIndicator/v1": "3ce7c003b2596c7eb8d20de2eb5869486e41e7c38a153da0ac42be0047108b17" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 514, + "startColumn": 49, + "charOffset": 16904, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 512, + "startColumn": 1, + "charOffset": 16851, + "charLength": 315, + "snippet": { + "text": "}\r\n\r\nbool Action::executeUse(std::shared_ptr player, std::shared_ptr item, const Position &fromPosition, std::shared_ptr target, const Position &toPosition, bool isHotkey) {\r\n\t// onUse(player, item, fromPosition, target, toPosition, isHotkey)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f91ade895e1c56a7", + "equalIndicator/v1": "3cec7ec8aee9a2c3a342369200a904346b0e1fc62df30c3dee3a36cd87e4a211" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 142, + "startColumn": 25, + "charOffset": 4573, + "charLength": 4, + "snippet": { + "text": "rune" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 140, + "startColumn": 1, + "charOffset": 4508, + "charLength": 168, + "snippet": { + "text": "\t\t\t\tiType.name = rune->getName();\r\n\t\t\t}\r\n\t\t\tiType.runeMagLevel = rune->getMagicLevel();\r\n\t\t\tiType.runeLevel = rune->getLevel();\r\n\t\t\tiType.charges = rune->getCharges();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e101facb128e28d7", + "equalIndicator/v1": "3d07227d3fda1feb6a4b071843d916627012c1386d47a1a5f149f91c2814e759" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 201, + "startColumn": 27, + "charOffset": 7318, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 199, + "startColumn": 1, + "charOffset": 7286, + "charLength": 121, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.npcOnSpawn, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a65b7a884ce835a0", + "equalIndicator/v1": "3d12d7553663327b03310fd9674ffe0b6cd081f2db56972828280e83776ca740" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/reward.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 21, + "startColumn": 21, + "charOffset": 590, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 19, + "startColumn": 1, + "charOffset": 565, + "charLength": 200, + "snippet": { + "text": "}\r\n\r\nReturnValue Reward::queryAdd(int32_t, const std::shared_ptr &thing, uint32_t, uint32_t, std::shared_ptr actor /* = nullptr*/) {\r\n\tif (actor) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d5230716367a8d8b", + "equalIndicator/v1": "3d27dbf34411c047da24de5a1dc86c646277c70852b7df1aafa952c8920a6113" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3105, + "startColumn": 48, + "charOffset": 93217, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3103, + "startColumn": 1, + "charOffset": 93165, + "charLength": 149, + "snippet": { + "text": "}\r\n\r\nbool Player::hasCapacity(std::shared_ptr item, uint32_t count) const {\r\n\tif (hasFlag(PlayerFlags_t::CannotPickupItem)) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fd5338683ba881e4", + "equalIndicator/v1": "3d50ce3c66cb5893f7245793c46272ea8f4ebb4979b7058a27c1058cc65c73cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 407, + "startColumn": 27, + "charOffset": 12433, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 405, + "startColumn": 1, + "charOffset": 12311, + "charLength": 176, + "snippet": { + "text": "\tif (it.isFluidContainer() || it.isSplash()) {\r\n\t\tsetAttribute(ItemAttribute_t::FLUIDTYPE, n);\r\n\t} else if (it.stackable) {\r\n\t\tsetItemCount(n);\r\n\t} else if (it.charges != 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7af9e671944377cd", + "equalIndicator/v1": "3d5260a101e34606f0ac26d3075b51e814e592d714fedf839d047404e0ffee27" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 375, + "startColumn": 63, + "charOffset": 14949, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 373, + "startColumn": 1, + "charOffset": 14882, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerKills(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d59e156357ecfe17", + "equalIndicator/v1": "3d7773c65c5ffd1d09f1194291e2f3b5f3bcafb78e13fc3ec33dbfd57026d4ad" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3121, + "startColumn": 21, + "charOffset": 93659, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3119, + "startColumn": 1, + "charOffset": 93634, + "charLength": 221, + "snippet": { + "text": "}\r\n\r\nReturnValue Player::queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr) {\r\n\tstd::shared_ptr item = thing->getItem();\r\n\tif (item == nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5482d7758a703331", + "equalIndicator/v1": "3d832514ea962c6f9f9f7c5cf4ba5cf663bf0aa16af9592dc0218c290dfdbfc3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 583, + "startColumn": 67, + "charOffset": 22272, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 581, + "startColumn": 1, + "charOffset": 22201, + "charLength": 182, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerPreyClass(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c8c4401dd7d37f10", + "equalIndicator/v1": "3d98cf804f88958f544dbfb33fa01c283d51cb2867ce1647eb8fbc5ac5317f66" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9793, + "startColumn": 43, + "charOffset": 342799, + "charLength": 3, + "snippet": { + "text": "npc" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9791, + "startColumn": 1, + "charOffset": 342752, + "charLength": 85, + "snippet": { + "text": "}\r\n\r\nvoid Game::removeNpc(std::shared_ptr npc) {\r\n\tnpcs.erase(npc->getID());\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "962f0acda8125d89", + "equalIndicator/v1": "3da605df30fef5e4c462969297c59f1d04fce2baa19e450b80e94cca58e0dac6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 112, + "startColumn": 35, + "charOffset": 3537, + "charLength": 10, + "snippet": { + "text": "loadPrefix" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 110, + "startColumn": 1, + "charOffset": 3355, + "charLength": 242, + "snippet": { + "text": "\tvirtual std::optional load(const std::string &key) = 0;\r\n\tvirtual bool save(const std::string &key, const ValueWrapper &value) = 0;\r\n\tvirtual std::vector loadPrefix(const std::string &prefix = \"\") = 0;\r\n\r\nprivate:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e60946919aa430a3", + "equalIndicator/v1": "3db2caf55e99c570d779ce717068fec36efcfb40b87d0210d19babbe424a7be8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3693, + "startColumn": 18, + "charOffset": 110682, + "charLength": 16, + "snippet": { + "text": "getItemTypeCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3691, + "startColumn": 1, + "charOffset": 110660, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nuint32_t Player::getItemTypeCount(uint16_t itemId, int32_t subType /*= -1*/) const {\r\n\tuint32_t count = 0;\r\n\tfor (int32_t i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; i++) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75a9c725c4b138cb", + "equalIndicator/v1": "3db9418b5ad7a8a5cf7fc0c25a0016bbe8fdc5a1bfa0aceac22d76dbf6bb6092" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified variable 'realPath' is copy-constructed from a const reference; consider making it a const reference", + "markdown": "The const qualified variable 'realPath' is copy-constructed from a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/scripts.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 75, + "startColumn": 14, + "charOffset": 2730, + "charLength": 8, + "snippet": { + "text": "realPath" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 73, + "startColumn": 1, + "charOffset": 2588, + "charLength": 279, + "snippet": { + "text": "\tfor (const auto &entry : std::filesystem::recursive_directory_iterator(dir)) {\r\n\t\t// Get the filename of the entry as a string\r\n\t\tconst auto realPath = entry.path();\r\n\t\tstd::string fileFolder = realPath.parent_path().filename().string();\r\n\t\t// Script folder, example: \"actions\"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "44ee16e04b2590b5", + "equalIndicator/v1": "3dc4e1ea590f2a6d35a6ac4a20292dc1dd71b9ef1e7f9a097f16e2988b5ef33c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6891, + "startColumn": 80, + "charOffset": 215752, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6889, + "startColumn": 1, + "charOffset": 215668, + "charLength": 167, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendTextWindow(uint32_t windowTextId, std::shared_ptr item, uint16_t maxlen, bool canWrite) {\r\n\tNetworkMessage msg;\r\n\tmsg.addByte(0x96);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ac20ca7ff9214142", + "equalIndicator/v1": "3dde9da93d96fd95dd20b4b776096f0b5b1a256a0189ddc5171285a0019afa52" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1393, + "startColumn": 55, + "charOffset": 55116, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1391, + "startColumn": 1, + "charOffset": 55057, + "charLength": 264, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerMoveCreature(std::shared_ptr player, std::shared_ptr movingCreature, const Position &movingCreatureOrigPos, std::shared_ptr toTile) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!player->canDoAction()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e35bd27937a2adf1", + "equalIndicator/v1": "3e0db3bbed9334b1289df8cff97cf25aa819097999c2748d0053cfe171a13f86" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 40, + "startColumn": 7, + "charOffset": 1713, + "charLength": 11, + "snippet": { + "text": "removeThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 38, + "startColumn": 1, + "charOffset": 1629, + "charLength": 307, + "snippet": { + "text": "\tvoid replaceThing(uint32_t index, std::shared_ptr thing) override;\r\n\r\n\tvoid removeThing(std::shared_ptr thing, uint32_t count) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "19a8662b1580dd01", + "equalIndicator/v1": "3e1e9386a170630c7d9bef3e9d098f65917e31731afcef7b7681581d08180b7d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2531, + "startColumn": 35, + "charOffset": 75545, + "charLength": 7, + "snippet": { + "text": "manaMax" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2529, + "startColumn": 1, + "charOffset": 75361, + "charLength": 312, + "snippet": { + "text": "\t\t\tconst auto &noneVocation = g_vocations().getVocation(VOCATION_NONE);\r\n\t\t\thealthMax = std::max(0, healthMax - noneVocation->getHPGain());\r\n\t\t\tmanaMax = std::max(0, manaMax - noneVocation->getManaGain());\r\n\t\t\tcapacity = std::max(0, capacity - noneVocation->getCapGain());\r\n\t\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2a6fb4fa13bd0ce9", + "equalIndicator/v1": "3e3b6da74ec4266f67afe2916231097a1fc63295d3c1dd57f08e5d2379d955a3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'combatChangeHealth' is within a recursive call chain", + "markdown": "Function 'combatChangeHealth' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6945, + "startColumn": 12, + "charOffset": 241319, + "charLength": 18, + "snippet": { + "text": "combatChangeHealth" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6943, + "startColumn": 1, + "charOffset": 241303, + "charLength": 231, + "snippet": { + "text": "}\r\n\r\nbool Game::combatChangeHealth(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage, bool isEvent /*= false*/) {\r\n\tusing namespace std;\r\n\tconst Position &targetPos = target->getPosition();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "21020065985204f5", + "equalIndicator/v1": "3e494e2b885d1c51049b7700af051723853a0d63b801f4fd80503e19aaeb8777" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2834, + "startColumn": 36, + "charOffset": 84686, + "charLength": 7, + "snippet": { + "text": "manaMax" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2832, + "startColumn": 1, + "charOffset": 84563, + "charLength": 238, + "snippet": { + "text": "\t\t\t\t--level;\r\n\t\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\r\n\t\t\t\tmanaMax = std::max(0, manaMax - vocation->getManaGain());\r\n\t\t\t\tcapacity = std::max(0, capacity - vocation->getCapGain());\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "73120a62e350c272", + "equalIndicator/v1": "3e58bff6aadca36033eeb65ffe81e916268dc70623f8e1ae07d8c45c4d2ab84d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')", + "markdown": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5770, + "startColumn": 27, + "charOffset": 170386, + "charLength": 8, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5768, + "startColumn": 1, + "charOffset": 170199, + "charLength": 301, + "snippet": { + "text": "\t\tuint8_t dayProgress = std::min(std::round(dayKills / dayMax * 100), 100.0);\r\n\t\tuint8_t weekProgress = std::min(std::round(weekKills / weekMax * 100), 100.0);\r\n\t\tuint8_t monthProgress = std::min(std::round(monthKills / monthMax * 100), 100.0);\r\n\t\tuint8_t skullDuration = 0;\r\n\t\tif (skullTicks != 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e215d414c99678f7", + "equalIndicator/v1": "3e5ca81c469e0002561f48ff4c9e43134f8740fcce22e33d524ba27aa1c20984" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'newCombat' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'newCombat' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 263, + "startColumn": 56, + "charOffset": 7748, + "charLength": 9, + "snippet": { + "text": "newCombat" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 261, + "startColumn": 1, + "charOffset": 7688, + "charLength": 183, + "snippet": { + "text": "}\r\n\r\nCombatSpell::CombatSpell(const std::shared_ptr newCombat, bool newNeedTarget, bool newNeedDirection) :\r\n\tScript(&g_spells().getScriptInterface()),\r\n\tm_combat(newCombat),\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "59ceea0a3c73da9f", + "equalIndicator/v1": "3e5fd6f52006ea3e2dcc84c09deb749e9defc2d6628f8e3d9f8b6b6451040e7e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 798, + "startColumn": 26, + "charOffset": 36761, + "charLength": 19, + "snippet": { + "text": "MITIGATION_INCREASE" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 796, + "startColumn": 1, + "charOffset": 36558, + "charLength": 370, + "snippet": { + "text": "// SLOT_PURPLE_BOTTOM_75 = 28\r\nvoid IOWheel::slotPurpleBottom75(const std::shared_ptr &player, uint16_t points, uint8_t, PlayerWheelMethodsBonusData &bonusData) const {\r\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\r\n\tif (isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_PURPLE_BOTTOM_75)) {\r\n\t\tbonusData.leech.manaLeech += MANA_LEECH_INCREASE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d3bddff9da377e2e", + "equalIndicator/v1": "3e67b670078e2ba9cfc86d87df4e829ee91c238176268306ce59d2a56b77690b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1309, + "startColumn": 98, + "charOffset": 46533, + "charLength": 6, + "snippet": { + "text": "corpse" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1307, + "startColumn": 1, + "charOffset": 46422, + "charLength": 191, + "snippet": { + "text": "\r\n// Monster\r\nvoid Events::eventMonsterOnDropLoot(std::shared_ptr monster, std::shared_ptr corpse) {\r\n\t// Monster:onDropLoot(corpse)\r\n\tif (info.monsterOnDropLoot == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c120e7a01fc2c600", + "equalIndicator/v1": "3e6bbd867d1728143a732bf5a41fe329184a05ff88f21c5a3aae67146a47e2b4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 457, + "startColumn": 59, + "charOffset": 13604, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 455, + "startColumn": 1, + "charOffset": 13541, + "charLength": 123, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::StepOutField(std::shared_ptr, std::shared_ptr, const Position &) {\r\n\treturn 1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c7bb62315d7556db", + "equalIndicator/v1": "3e6be90b03d97a6d07ffa89e2a7eee0f41a2d1e69b2a489e1d74eafe1cb9ecaa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::_Tree, std::less, std::allocator>>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::_Tree, std::less, std::allocator\\>\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 253, + "startColumn": 13, + "charOffset": 7764, + "charLength": 6, + "snippet": { + "text": "houses" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 251, + "startColumn": 1, + "charOffset": 7677, + "charLength": 171, + "snippet": { + "text": "int GameFunctions::luaGameGetHouses(lua_State* L) {\r\n\t// Game.getHouses()\r\n\tconst auto houses = g_game().map.houses.getHouses();\r\n\tlua_createtable(L, houses.size(), 0);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f58e43111add61be", + "equalIndicator/v1": "3e78cb3d824455714c8f81fa7e5efbfefcbc32c3bcae302f0b6e418e586b5f7b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 124, + "startColumn": 2, + "charOffset": 3848, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 122, + "startColumn": 1, + "charOffset": 3788, + "charLength": 168, + "snippet": { + "text": "\tuint32_t precachedControlSum[32][2];\r\n\tuint32_t sum = 0;\r\n\tfor (int32_t i = 0; i < 32; ++i) {\r\n\t\tprecachedControlSum[i][0] = (sum + newKey[sum & 3]);\r\n\t\tsum -= delta;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6c145cc0fa9774b6", + "equalIndicator/v1": "3e7937e5c01a4373bc44b08592088486819b70f2b7de722ec5427efaf7215f50" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 334, + "startColumn": 8, + "charOffset": 8311, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 332, + "startColumn": 1, + "charOffset": 8253, + "charLength": 152, + "snippet": { + "text": "\tuint16_t count = getNumber(L, 2, 1);\r\n\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (!itemType) {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "51d46fcc64f36852", + "equalIndicator/v1": "3ecc99b05245099b5695e05ae1474a2a20789eb74dadc0f154186a106bc2ce53" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6804, + "startColumn": 155, + "charOffset": 235276, + "charLength": 13, + "snippet": { + "text": "targetMonster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6802, + "startColumn": 1, + "charOffset": 235117, + "charLength": 251, + "snippet": { + "text": "}\r\n\r\nvoid Game::notifySpectators(const CreatureVector &spectators, const Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetMonster) {\r\n\tif (!spectators.empty()) {\r\n\t\tfor (const auto &spectator : spectators) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ce7513af86f431f1", + "equalIndicator/v1": "3ed787311e5d57495d7ed0a416941a6573c0bacd77cdd86940364bd212f845a6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 633, + "startColumn": 2, + "charOffset": 14831, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 631, + "startColumn": 1, + "charOffset": 14824, + "charLength": 172, + "snippet": { + "text": "\t}\r\n\r\n\tuint32_t flags = getNumber(L, 3, 0);\r\n\tReturnValue ret = g_game().internalAddItem(tile, item, INDEX_WHEREEVER, flags);\r\n\tif (ret == RETURNVALUE_NOERROR) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2bbdb05890a87831", + "equalIndicator/v1": "3ef2adf0b0a26e8ff2015b907ff724799cdce03b2062ed4e9167f10d18a21dcc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 708, + "startColumn": 4, + "charOffset": 33826, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 706, + "startColumn": 1, + "charOffset": 33708, + "charLength": 228, + "snippet": { + "text": "\t\t\tstd::list damageList;\r\n\t\t\tConditionDamage::generateDamageList(combatDamage, combatStart, damageList);\r\n\t\t\tfor (int32_t damageValue : damageList) {\r\n\t\t\t\tconditionDamage->addDamage(1, combatTicks, -damageValue);\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "97b95824ef9cde7e", + "equalIndicator/v1": "3f2321a10d85447d76965686c4a3a0b52af659c267b73ce39cada8a739ce2c37" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'task' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'task' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2129, + "startColumn": 13, + "charOffset": 62733, + "charLength": 4, + "snippet": { + "text": "task" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2127, + "startColumn": 1, + "charOffset": 62715, + "charLength": 29, + "snippet": { + "text": "\t}\r\n\r\n\twalkTask = task;\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "33e1ae84f6921747", + "equalIndicator/v1": "3f2cd65364f16b8ed464681f0793be60addc8bd2dd6858ba061f2aed76b3555f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3974, + "startColumn": 82, + "charOffset": 119744, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3972, + "startColumn": 1, + "charOffset": 119609, + "charLength": 192, + "snippet": { + "text": "\r\nvoid Player::updateDamageReductionFromItemAbility(\r\n\tstd::array &combatReductionArray, std::shared_ptr item, uint16_t combatTypeIndex\r\n) const {\r\n\tif (!item) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "731f6a608ed9da93", + "equalIndicator/v1": "3f32dd418254e98f8173de2f758f1c37b72604f2f38884334cf1dd4f788479b8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 810, + "startColumn": 7, + "charOffset": 29173, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 808, + "startColumn": 1, + "charOffset": 29161, + "charLength": 142, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnChangeZone - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4cd3a35469ccb9be", + "equalIndicator/v1": "3f42e3daa1a9b19edd15c185cb71aa29fc8611ac6c8f3a5d648ebc3586975677" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4899, + "startColumn": 55, + "charOffset": 175156, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4897, + "startColumn": 1, + "charOffset": 175097, + "charLength": 332, + "snippet": { + "text": "}\r\n\r\nbool Game::internalStartTrade(std::shared_ptr player, std::shared_ptr tradePartner, std::shared_ptr tradeItem) {\r\n\tif (player->tradeState != TRADE_NONE && !(player->tradeState == TRADE_ACKNOWLEDGE && player->tradePartner == tradePartner)) {\r\n\t\tplayer->sendCancelMessage(RETURNVALUE_YOUAREALREADYTRADING);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4690968e3f9bb6e7", + "equalIndicator/v1": "3fad4846d8a7fac9e44b6f19417a22261db70258d087eab9d85263ef2b08a9eb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'itemDict' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'itemDict' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3716, + "startColumn": 48, + "charOffset": 111340, + "charLength": 8, + "snippet": { + "text": "itemDict" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3714, + "startColumn": 1, + "charOffset": 111288, + "charLength": 154, + "snippet": { + "text": "}\r\n\r\nvoid Player::stashContainer(StashContainerList itemDict) {\r\n\tStashItemList stashItemDict; // ItemID - Count\r\n\tfor (const auto &it_dict : itemDict) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "52a94ed60b283225", + "equalIndicator/v1": "3fd54b7d899c273041ec1ad0dee1c1c904312470e4691ca3556525f9947c8acc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 27, + "startColumn": 57, + "charOffset": 1000, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 25, + "startColumn": 1, + "charOffset": 895, + "charLength": 220, + "snippet": { + "text": "#include \"lua/callbacks/events_callbacks.hpp\"\r\n\r\nint32_t Combat::getLevelFormula(std::shared_ptr player, const std::shared_ptr wheelSpell, const CombatDamage &damage) const {\r\n\tif (!player) {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2c833d3cbf4778cb", + "equalIndicator/v1": "4036e47e24b77737ede628033db84e6b9855e3ff3bd1fdef9c14dd3821d9a610" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5335, + "startColumn": 40, + "charOffset": 157558, + "charLength": 20, + "snippet": { + "text": "getLoyaltyMagicLevel" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5333, + "startColumn": 1, + "charOffset": 157475, + "charLength": 243, + "snippet": { + "text": "\r\nuint32_t Player::getMagicLevel() const {\r\n\tuint32_t magic = std::max(0, getLoyaltyMagicLevel() + varStats[STAT_MAGICPOINTS]);\r\n\t// Wheel of destiny magic bonus\r\n\tmagic += m_wheelPlayer->getStat(WheelStat_t::MAGIC); // Regular bonus\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "003f9d639a0decfc", + "equalIndicator/v1": "4043e3b6034f016ce8e4121499e134ed0f62097e32d67cc6f9168addad0a199a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getCallback' can be made const", + "markdown": "Method 'getCallback' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 543, + "startColumn": 19, + "charOffset": 17407, + "charLength": 11, + "snippet": { + "text": "getCallback" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 541, + "startColumn": 1, + "charOffset": 17384, + "charLength": 115, + "snippet": { + "text": "}\r\n\r\nCallBack* Combat::getCallback(CallBackParam_t key) {\r\n\tswitch (key) {\r\n\t\tcase CALLBACK_PARAM_LEVELMAGICVALUE:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "53b0dd1e2831790e", + "equalIndicator/v1": "4054bc07a1314e2efbd18d2a1812e4b5acda9a5a33cc4db9592de8fb7b10d8a8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1032, + "startColumn": 31, + "charOffset": 29889, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1030, + "startColumn": 1, + "charOffset": 29772, + "charLength": 137, + "snippet": { + "text": "\tvoid sendCreatureEmblem(std::shared_ptr creature) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureEmblem(creature);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b55b32df9bc012cb", + "equalIndicator/v1": "405e23c03519193774a09f71a24ccddf6f1355d0c6662011c492f1abe2dbc9f3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 703, + "startColumn": 93, + "charOffset": 25107, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 701, + "startColumn": 1, + "charOffset": 25010, + "charLength": 166, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnRemoveCount(std::shared_ptr player, std::shared_ptr item) {\r\n\t// Player:onMove()\r\n\tif (info.playerOnRemoveCount == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a56f9f269be8f1b0", + "equalIndicator/v1": "407bdcbb702a7ec9fec90bc6b12c9b6258d81a713de1509218666f9256818557" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 569, + "startColumn": 91, + "charOffset": 18041, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 567, + "startColumn": 1, + "charOffset": 17946, + "charLength": 236, + "snippet": { + "text": "}\r\n\r\nvoid Combat::CombatHealthFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\r\n\tif (!data) {\r\n\t\tg_logger().error(\"[{}]: CombatDamage is nullptr\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3260be18472be01c", + "equalIndicator/v1": "408f0ba41e0426fc07540bfc8b4f75eb98c041b76590dcf63b0cf5fd2499f24f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1766, + "startColumn": 103, + "charOffset": 61618, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1764, + "startColumn": 1, + "charOffset": 61511, + "charLength": 206, + "snippet": { + "text": "}\r\n\r\nbool ChainPickerCallback::onChainCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\t// onChainCombat(creature, target)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9f287db82dfa8c61", + "equalIndicator/v1": "40b3b22320b4e530d820aa31dfd4db2130f79b553d0a0959c673327f7bd9a369" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "String concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead", + "markdown": "String concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 45, + "startColumn": 33, + "charOffset": 1501, + "charLength": 44, + "snippet": { + "text": "coreFolder + \"/events/scripts/\" + scriptName" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 43, + "startColumn": 1, + "charOffset": 1332, + "charLength": 375, + "snippet": { + "text": "\t\t\tconst std::string &scriptName = lowercase + \".lua\";\r\n\t\t\tauto coreFolder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__);\r\n\t\t\tif (scriptInterface.loadFile(coreFolder + \"/events/scripts/\" + scriptName, scriptName) != 0) {\r\n\t\t\t\tg_logger().warn(\"{} - Can not load script: {}.lua\", __FUNCTION__, lowercase);\r\n\t\t\t\tg_logger().warn(scriptInterface.getLastLuaError());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1b7589741483e540", + "equalIndicator/v1": "40c00c840292cf8fa3ef4c22b54cf6afaeed2caff89357049763964c9be86d6a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 292, + "startColumn": 8, + "charOffset": 9502, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 290, + "startColumn": 1, + "charOffset": 9374, + "charLength": 300, + "snippet": { + "text": "\t\t// onCreatureSay(self, creature, type, message)\r\n\t\tLuaScriptInterface* scriptInterface = mType->info.scriptInterface;\r\n\t\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\t\tg_logger().error(\"Monster {} creature {}] Call stack overflow. Too many lua \"\r\n\t\t\t \"script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ae8e4675eec743e0", + "equalIndicator/v1": "40c958637579a5261c35a35957d3f405d2c1fe520416a0833832d8eb5df9fb15" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3054, + "startColumn": 2, + "charOffset": 93109, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3052, + "startColumn": 1, + "charOffset": 93044, + "charLength": 168, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseInviteToParty(NetworkMessage &msg) {\r\n\tuint32_t targetId = msg.get();\r\n\tg_game().playerInviteToParty(player->getID(), targetId);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "89fc36f1e45c5dbe", + "equalIndicator/v1": "40e08aa56a38f247ec8c53667696f03c209d65b88a7e249ab8e0743e7aed5c9b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 911, + "startColumn": 27, + "charOffset": 33004, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 909, + "startColumn": 1, + "charOffset": 32972, + "charLength": 128, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnReportBug, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1cc7c37fe4dc7557", + "equalIndicator/v1": "4102e4a1fdae5840d81598edec124e535278f1961cb2cbbd43e7f6938a786242" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 823, + "startColumn": 15, + "charOffset": 25069, + "charLength": 5, + "snippet": { + "text": "death" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 821, + "startColumn": 1, + "charOffset": 24959, + "charLength": 448, + "snippet": { + "text": "\t}\r\n\tvirtual void getPathSearchParams(const std::shared_ptr &, FindPathParams &fpp);\r\n\tvirtual void death(std::shared_ptr) { }\r\n\tvirtual bool dropCorpse(std::shared_ptr lastHitCreature, std::shared_ptr mostDamageCreature, bool lastHitUnjustified, bool mostDamageUnjustified);\r\n\tvirtual std::shared_ptr getCorpse(std::shared_ptr lastHitCreature, std::shared_ptr mostDamageCreature);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fc81072fa820e771", + "equalIndicator/v1": "410eb464be9bb1a6f9a866472379798f411fa19c039f656a521ff5786919d608" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 33, + "startColumn": 8, + "charOffset": 979, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 31, + "startColumn": 1, + "charOffset": 887, + "charLength": 205, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsCorpse(lua_State* L) {\r\n\t// itemType:isCorpse()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isCorpse);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5df427df7e52a811", + "equalIndicator/v1": "4114c37858b2cf720e0471936cac06c6efc4ebc5d2954941a69a6677dd756817" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 231, + "startColumn": 8, + "charOffset": 5757, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 229, + "startColumn": 1, + "charOffset": 5671, + "charLength": 196, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetId(lua_State* L) {\r\n\t// itemType:getId()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->id);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2a7e7ca37500f80b", + "equalIndicator/v1": "411de6a2e960975f68cea156ade5cf18d36c2f09e0efc73d3f483e19c5644592" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'short' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'short' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 268, + "startColumn": 56, + "charOffset": 9391, + "charLength": 7, + "snippet": { + "text": "percent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 266, + "startColumn": 1, + "charOffset": 9292, + "charLength": 232, + "snippet": { + "text": "\r\n\t\t\t\t\t\timbuement.combatType = combatType;\r\n\t\t\t\t\t\timbuement.elementDamage = std::min(100, percent);\r\n\t\t\t\t\t} else if (strcasecmp(effecttype.c_str(), \"reduction\") == 0) {\r\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"combat\"))) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d3d8f11b9af397ff", + "equalIndicator/v1": "4132fbee87f429e884eeaa632cdcad5b21510fb45e29775ae1a3310ee69c9bf6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 500, + "startColumn": 41, + "charOffset": 19002, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 498, + "startColumn": 1, + "charOffset": 18956, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1ec04c02d2a60a6c", + "equalIndicator/v1": "4152eeb54663a8a7de1a6239d5151cc44c23db711c1e226e2baa0d22eac4aa5a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Nested namespaces can be concatenated", + "markdown": "Nested namespaces can be concatenated" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 30, + "startColumn": 1, + "charOffset": 1044, + "charLength": 9, + "snippet": { + "text": "namespace" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 28, + "startColumn": 1, + "charOffset": 999, + "charLength": 114, + "snippet": { + "text": "\r\n// Forward declaration for protobuf class\r\nnamespace Canary {\r\n\tnamespace protobuf {\r\n\t\tnamespace appearances {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "12072fad1c06efbb", + "equalIndicator/v1": "415396496f51d42ee5fc4085fea72c4a6eb3283d3be4c318874b1b152b3dc6b4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 63, + "startColumn": 62, + "charOffset": 2402, + "charLength": 28, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 61, + "startColumn": 1, + "charOffset": 2117, + "charLength": 376, + "snippet": { + "text": "\tvoid sendBuyCharmRune(std::shared_ptr player, charmRune_t runeID, uint8_t action, uint16_t raceid);\r\n\tvoid setCharmRuneCreature(std::shared_ptr player, const std::shared_ptr charm, uint16_t raceid);\r\n\tvoid resetCharmRuneCreature(std::shared_ptr player, const std::shared_ptr charm);\r\n\r\n\tint8_t calculateDifficult(uint32_t chance) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e3f92236c89219fa", + "equalIndicator/v1": "4153bfa9cbe6a8c6b720e723ffec33b10017c90727f5c5d91d178807e59c2597" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9321, + "startColumn": 62, + "charOffset": 325814, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9319, + "startColumn": 1, + "charOffset": 325748, + "charLength": 104, + "snippet": { + "text": "}\r\n\r\nvoid Game::sendOfflineTrainingDialog(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "02feb816b624359c", + "equalIndicator/v1": "415905b5aa8aabf34369661760c5960505f034e301775c99816eacc9ba0f10bd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 504, + "startColumn": 8, + "charOffset": 12474, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 502, + "startColumn": 1, + "charOffset": 12356, + "charLength": 244, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetTransformDeEquipId(lua_State* L) {\r\n\t// itemType:getTransformDeEquipId()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->transformDeEquipTo);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "41a8839d2f167460", + "equalIndicator/v1": "4164d9c4beb553abce49f526a2fef57efb441ed147c5496673deb404bf063c0c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2416, + "startColumn": 3, + "charOffset": 75208, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2414, + "startColumn": 1, + "charOffset": 75168, + "charLength": 191, + "snippet": { + "text": "\r\n\t\tnewmsg.addByte(elements.size());\r\n\t\tfor (auto it = std::begin(elements), end = std::end(elements); it != end; it++) {\r\n\t\t\tnewmsg.addByte(it->first);\r\n\t\t\tnewmsg.add(it->second);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "451d46bb2e28b957", + "equalIndicator/v1": "417cfbdeb1c0db6baf06c3b8728a699284bdf088ef5a23025ff20737f779e87a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 332, + "startColumn": 2, + "charOffset": 11901, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 330, + "startColumn": 1, + "charOffset": 11894, + "charLength": 66, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n\treturn returnValue;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1d010418e41f56a1", + "equalIndicator/v1": "419338101ca383260e69b79c6fdf9a9457f6146e9ba56a0fb54bbf5673e74687" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3121, + "startColumn": 2, + "charOffset": 95706, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3119, + "startColumn": 1, + "charOffset": 95637, + "charLength": 174, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseMarketCancelOffer(NetworkMessage &msg) {\r\n\tuint32_t timestamp = msg.get();\r\n\tuint16_t counter = msg.get();\r\n\tif (counter > 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d91fc8a5cba5fc02", + "equalIndicator/v1": "41aba64e0618d172dbac64bbab0d600859583747246f9376eec0b59865b28390" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1834, + "startColumn": 59, + "charOffset": 49447, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1832, + "startColumn": 1, + "charOffset": 49384, + "charLength": 184, + "snippet": { + "text": "}\r\n\r\nbool ConditionFeared::canWalkTo(std::shared_ptr creature, Position pos, Direction moveDirection) const {\r\n\tpos = getNextPosition(moveDirection, pos);\r\n\tif (!creature) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ae363c3bdb949aee", + "equalIndicator/v1": "41b1fc0002f286a5edc6468c67028dc589d0e4f7bab3bdece8f761cfbb52135d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 125, + "startColumn": 70, + "charOffset": 3787, + "charLength": 6, + "snippet": { + "text": "action" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 123, + "startColumn": 1, + "charOffset": 3713, + "charLength": 170, + "snippet": { + "text": "}\r\n\r\nbool Actions::registerLuaPositionEvent(const std::shared_ptr action) {\r\n\tauto positionVector = action->getPositionsVector();\r\n\tif (positionVector.empty()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a8cb9a0f78254949", + "equalIndicator/v1": "41cd61a3eb266e1c12a7e4c63fc32db4cffd8642cc3bcc6b596a919ee75b4c94" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 886, + "startColumn": 58, + "charOffset": 28718, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 884, + "startColumn": 1, + "charOffset": 28656, + "charLength": 270, + "snippet": { + "text": "}\r\n\r\nvoid Combat::postCombatEffects(std::shared_ptr caster, const Position &origin, const Position &pos, const CombatParams ¶ms) {\r\n\tif (caster && params.distanceEffect != CONST_ANI_NONE) {\r\n\t\taddDistanceEffect(caster, origin, pos, params.distanceEffect);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "92e6518c7220aaeb", + "equalIndicator/v1": "41dbe6a1b9662ae51bc37c61c62fc0d009fa4c27376a7baed7c3d1b72d310a57" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 611, + "startColumn": 41, + "charOffset": 23541, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 609, + "startColumn": 1, + "charOffset": 23495, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "26ff33a21f5f67a1", + "equalIndicator/v1": "41ea107453be376b9e84ba3849ab9848742ac2748f67d82c5eae50716de08b4e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3131, + "startColumn": 67, + "charOffset": 116609, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3129, + "startColumn": 1, + "charOffset": 116538, + "charLength": 231, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::collectRewardChestItems(std::shared_ptr player, uint32_t maxMoveItems /* = 0*/) {\r\n\t// Check if have item on player reward chest\r\n\tstd::shared_ptr rewardChest = player->getRewardChest();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "df688f2841f53b56", + "equalIndicator/v1": "41ebbcaaae524e92d03cadd4d1af88af098b73d05dbe189b82563012e222597c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 193, + "startColumn": 15, + "charOffset": 7776, + "charLength": 8, + "snippet": { + "text": "addThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 191, + "startColumn": 1, + "charOffset": 7699, + "charLength": 291, + "snippet": { + "text": "\r\n\tvirtual void addThing(std::shared_ptr) override { }\r\n\tvirtual void addThing(int32_t, std::shared_ptr) override { }\r\n\tvirtual void updateThing(std::shared_ptr, uint16_t, uint32_t) override { }\r\n\tvirtual void replaceThing(uint32_t, std::shared_ptr) override { }\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f2b0c6d60c7371fd", + "equalIndicator/v1": "41ee6f43316def89e81044f0662a25c46c768c8d56a28b37f8af668ebb462288" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7537, + "startColumn": 79, + "charOffset": 235741, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7535, + "startColumn": 1, + "charOffset": 235625, + "charLength": 273, + "snippet": { + "text": "\r\n////////////// Add common messages\r\nvoid ProtocolGame::AddCreature(NetworkMessage &msg, std::shared_ptr creature, bool known, uint32_t remove) {\r\n\tCreatureType_t creatureType = creature->getType();\r\n\tstd::shared_ptr otherPlayer = creature->getPlayer();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "21fcd8037bbfe189", + "equalIndicator/v1": "41fb895486b1d3dbf3973aa5f934c2c5b762107deae62fad9f2179fc75bcacf2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 317, + "startColumn": 10, + "charOffset": 8704, + "charLength": 15, + "snippet": { + "text": "getWeaponDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 315, + "startColumn": 1, + "charOffset": 8566, + "charLength": 474, + "snippet": { + "text": "\tbool useWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target) const override;\r\n\r\n\tint32_t getWeaponDamage(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, bool maxDamage = false) const override;\r\n\tint32_t getElementDamage(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) const override;\r\n\tCombatType_t getElementType() const override {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "58bbb0d6936792dd", + "equalIndicator/v1": "420e12b415f12a0126d0676b01a88ef5b8c176d8aa9005424f0944cf6d824fe3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'healer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'healer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 887, + "startColumn": 53, + "charOffset": 28830, + "charLength": 6, + "snippet": { + "text": "healer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 885, + "startColumn": 1, + "charOffset": 28773, + "charLength": 131, + "snippet": { + "text": "}\r\n\r\nvoid Creature::gainHealth(std::shared_ptr healer, int32_t healthGain) {\r\n\tchangeHealth(healthGain);\r\n\tif (healer) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c35e9de55c2247e2", + "equalIndicator/v1": "42361825b63ab5eb2dca2358075b216cf5016698e2fb16556d8d797248a01b0c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'target' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'target' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 504, + "startColumn": 21, + "charOffset": 27243, + "charLength": 29, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 502, + "startColumn": 1, + "charOffset": 27050, + "charLength": 357, + "snippet": { + "text": "\tvoid addCreatureHealth(const std::shared_ptr target);\r\n\tstatic void addCreatureHealth(const CreatureVector &spectators, const std::shared_ptr target);\r\n\tvoid addPlayerMana(const std::shared_ptr target);\r\n\tvoid addPlayerVocation(const std::shared_ptr target);\r\n\tvoid addMagicEffect(const Position &pos, uint16_t effect);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cd31d6e8cb9a20bb", + "equalIndicator/v1": "42637a6867dbf156da62122918614138e371185ed173d81150d74523f1985246" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 565, + "startColumn": 42, + "charOffset": 18417, + "charLength": 27, + "snippet": { + "text": "Weapons::getMaxWeaponDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 563, + "startColumn": 1, + "charOffset": 18335, + "charLength": 246, + "snippet": { + "text": "\tuint32_t level = player->getLevel();\r\n\r\n\tint32_t maxValue = static_cast(Weapons::getMaxWeaponDamage(level, attackSkill, attackValue, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\r\n\r\n\tint32_t minValue = level / 5;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6c0549890e26ba7a", + "equalIndicator/v1": "429fa8a22dafc18570152b360771ef4c31a818109e0d68c74722f8e1b18dcb19" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6845, + "startColumn": 28, + "charOffset": 236961, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6843, + "startColumn": 1, + "charOffset": 236816, + "charLength": 300, + "snippet": { + "text": "\r\nfloat Game::pvpLevelDifferenceDamageMultiplier(std::shared_ptr attacker, std::shared_ptr target) {\r\n\tint32_t levelDifference = target->getLevel() - attacker->getLevel();\r\n\tlevelDifference = std::abs(levelDifference);\r\n\tbool isLowerLevel = target->getLevel() < attacker->getLevel();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c78b85bd9e210482", + "equalIndicator/v1": "42aaf985ab8b010e14fb8261a4b6d30a35d88b46ee60dfc64cc32441cae24ced" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 619, + "startColumn": 8, + "charOffset": 15278, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 617, + "startColumn": 1, + "charOffset": 15168, + "charLength": 228, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetVocationString(lua_State* L) {\r\n\t// itemType:getVocationString()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushString(L, itemType->vocationString);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3fc6e2d996512d3f", + "equalIndicator/v1": "42be6b8620389977e361d669dc48fdef150c126709a55d3c961673944bfae9b7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creatures_definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1638, + "startColumn": 14, + "charOffset": 41941, + "charLength": 8, + "snippet": { + "text": "itemName" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1636, + "startColumn": 1, + "charOffset": 41876, + "charLength": 377, + "snippet": { + "text": "\tstd::vector childShop;\r\n\tShopBlock() :\r\n\t\titemId(0), itemName(\"\"), itemSubType(0), itemBuyPrice(0), itemSellPrice(0), itemStorageKey(0), itemStorageValue(0) { }\r\n\r\n\texplicit ShopBlock(uint16_t newItemId, std::string newName = \"\", int32_t newSubType = 0, uint32_t newBuyPrice = 0, uint32_t newSellPrice = 0, int32_t newStorageKey = 0, int32_t newStorageValue = 0) :\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5f2462a8d727e077", + "equalIndicator/v1": "42efff8effbf0fd5e2563bd86a354f99170884c1f615f3a3d6b079941a223a67" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 66, + "startColumn": 24, + "charOffset": 2517, + "charLength": 34, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 64, + "startColumn": 1, + "charOffset": 2440, + "charLength": 244, + "snippet": { + "text": "\r\n\tint8_t calculateDifficult(uint32_t chance) const;\r\n\tuint8_t getKillStatus(const std::shared_ptr mtype, uint32_t killAmount) const;\r\n\r\n\tuint16_t getBestiaryRaceUnlocked(std::shared_ptr player, BestiaryType_t race) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3ab9731a6e00d528", + "equalIndicator/v1": "432cdc95eab390b5c0b7bb3a7f5017ed5b87b5b722cc4fef9da996c285ddaa24" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 72, + "startColumn": 107, + "charOffset": 2349, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 70, + "startColumn": 1, + "charOffset": 2238, + "charLength": 255, + "snippet": { + "text": "}\r\n\r\nReturnValue EventCallback::creatureOnAreaCombat(std::shared_ptr creature, std::shared_ptr tile, bool aggressive) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnAreaCombat - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "979d833fe4afdac2", + "equalIndicator/v1": "43480bd7592e5de77a10b907263f09bee7e75d2f7521d3f7f433272201d470aa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'newTile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'newTile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 290, + "startColumn": 54, + "charOffset": 7630, + "charLength": 7, + "snippet": { + "text": "newTile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 288, + "startColumn": 1, + "charOffset": 7572, + "charLength": 226, + "snippet": { + "text": "}\r\n\r\nvoid Creature::updateTileCache(std::shared_ptr newTile, int32_t dx, int32_t dy) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (std::abs(dx) <= maxWalkCacheWidth && std::abs(dy) <= maxWalkCacheHeight) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6bd4309d0f4e826c", + "equalIndicator/v1": "43676b58d28b3add37b6da1201165646c888cdd44c9cdc3ee0d21334e7450f85" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'long long' to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'long long' to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 57, + "startColumn": 44, + "charOffset": 1669, + "charLength": 8, + "snippet": { + "text": "duration" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 55, + "startColumn": 1, + "charOffset": 1541, + "charLength": 199, + "snippet": { + "text": "\t\t\t\tg_dispatcher().stopEvent(eventId);\r\n\t\t\t\teventId = g_dispatcher().scheduleEvent(\r\n\t\t\t\t\tstd::max(SCHEDULER_MINTICKS, duration), [this] { checkDecay(); }, \"Decay::checkDecay\"\r\n\t\t\t\t);\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3396627604aab0ba", + "equalIndicator/v1": "436abb4bcfc3ad1addf86fc43604271766bf1ac90002bcac6264ad98cb60b6a9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 141, + "startColumn": 22, + "charOffset": 3871, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 139, + "startColumn": 1, + "charOffset": 3818, + "charLength": 506, + "snippet": { + "text": "\r\n\t// cylinder implementations\r\n\tvirtual ReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e9421f4031cf4086", + "equalIndicator/v1": "436c4328e8b08711c76be4e4f582c5168730a8e25c465066b405bb4e710ed32a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 357, + "startColumn": 94, + "charOffset": 17098, + "charLength": 14, + "snippet": { + "text": "const uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 355, + "startColumn": 1, + "charOffset": 16837, + "charLength": 565, + "snippet": { + "text": "\tvoid playerUpdateContainer(uint32_t playerId, uint8_t cid);\r\n\tvoid playerRotateItem(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerConfigureShowOffSocket(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerSetShowOffSocket(uint32_t playerId, Outfit_t &outfit, const Position &pos, uint8_t stackPos, const uint16_t itemId, uint8_t podiumVisible, uint8_t direction);\r\n\tvoid playerWrapableItem(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1a985db0c292fc35", + "equalIndicator/v1": "4393e0d836561ea9da58a28446c1261a37bc7bed4c0a0b08fa5218f0f44547e9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'uint32_t' (aka 'unsigned int')", + "markdown": "Narrowing conversion from 'double' to 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 584, + "startColumn": 92, + "charOffset": 15863, + "charLength": 6, + "snippet": { + "text": "amount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 582, + "startColumn": 1, + "charOffset": 15766, + "charLength": 199, + "snippet": { + "text": "\t}\r\n\r\n\tconst auto &[_, itemsPurchased, backpacksPurchased] = g_game().createItem(player, itemId, amount, subType, actionId, ignoreCap, inBackpacks ? ITEM_SHOPPING_BAG : 0);\r\n\r\n\tstd::stringstream ss;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3e6714af543c8e45", + "equalIndicator/v1": "43a289bbe691521d2d30bf975ba643ec4eeed03e145e92e3213b3a6900627380" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_CRT_SECURE_NO_WARNINGS', which is a reserved identifier", + "markdown": "Declaration uses identifier '_CRT_SECURE_NO_WARNINGS', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 16, + "startColumn": 1, + "charOffset": 459, + "charLength": 7, + "snippet": { + "text": "#ifndef" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 14, + "startColumn": 1, + "charOffset": 449, + "charLength": 84, + "snippet": { + "text": "#endif\r\n\r\n#ifndef _CRT_SECURE_NO_WARNINGS\r\n\t#define _CRT_SECURE_NO_WARNINGS\r\n#endif\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5d24aa2ac5f37a99", + "equalIndicator/v1": "43c9a3854388f18b674bce795a41388d2e8b8407ef766e1dd0a1c73376436223" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 231, + "startColumn": 11, + "charOffset": 7225, + "charLength": 16, + "snippet": { + "text": "getItemTypeCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 229, + "startColumn": 1, + "charOffset": 7122, + "charLength": 253, + "snippet": { + "text": "\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::shared_ptr getThing(size_t index) const override final;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "47db0f95390397f0", + "equalIndicator/v1": "43e850e2fa3a946f16c6a31e827431a82ef4193f92607da927b2a862c61753f2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 31, + "startColumn": 14, + "charOffset": 1137, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 29, + "startColumn": 1, + "charOffset": 817, + "charLength": 614, + "snippet": { + "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b445af53ef44374a", + "equalIndicator/v1": "441e91f6200e76e4174b00def76802cb403da502051e9d501ac6e13e077ae080" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 499, + "startColumn": 62, + "charOffset": 16334, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 497, + "startColumn": 1, + "charOffset": 16247, + "charLength": 187, + "snippet": { + "text": "\tScript(interface) { }\r\n\r\nReturnValue Action::canExecuteAction(std::shared_ptr player, const Position &toPos) {\r\n\tif (!allowFarUse) {\r\n\t\treturn g_actions().canUse(player, toPos);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5fdfa36f24f1f4b9", + "equalIndicator/v1": "44359924c116f61018806f96828a58620a0f257ffb06f134d82c4fdbc4f224eb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 836, + "startColumn": 7, + "charOffset": 32044, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 834, + "startColumn": 1, + "charOffset": 31876, + "charLength": 312, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnCombat - \"\r\n\t\t \"Player {} target {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e7d94030d548a872", + "equalIndicator/v1": "4437b4a20c69dbff4d9e84b99aadd1ba920a3f65ff7020ca660f477e33e453fa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 687, + "startColumn": 37, + "charOffset": 22447, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 685, + "startColumn": 1, + "charOffset": 22385, + "charLength": 132, + "snippet": { + "text": "\t\t\t\tcase 1:\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 74) * 1.20f) + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "44672b5486bfad55", + "equalIndicator/v1": "443dd37a22687766b6da269c64b04b1259c6c6e8861d261bd39eca4987c634ea" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1161, + "startColumn": 10, + "charOffset": 34684, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1159, + "startColumn": 1, + "charOffset": 34668, + "charLength": 64, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tpos -= static_cast(creatures->size());\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d21dfdb26fe80310", + "equalIndicator/v1": "4440f844bb8e6fe66873302d480e1b6dcd092877a45c3d4598544bcc1cfc7db1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'toCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'toCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1947, + "startColumn": 64, + "charOffset": 56256, + "charLength": 10, + "snippet": { + "text": "toCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1945, + "startColumn": 1, + "charOffset": 56188, + "charLength": 153, + "snippet": { + "text": "}\r\n\r\nSoundEffect_t Item::getMovementSound(std::shared_ptr toCylinder) const {\r\n\tif (!toCylinder) {\r\n\t\treturn SoundEffect_t::ITEM_MOVE_DEFAULT;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f3eae41610451ce8", + "equalIndicator/v1": "4457da6638fb64c5282ad0c91bd4d9d5aaa519bfd6f8a9a9c7061a8f9ac131d0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float'", + "markdown": "Narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 600, + "startColumn": 123, + "charOffset": 18243, + "charLength": 37, + "snippet": { + "text": "(it.abilities->statsPercent[s] - 100)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 598, + "startColumn": 1, + "charOffset": 18078, + "charLength": 226, + "snippet": { + "text": "\r\n\t\t\tif (it.abilities->statsPercent[s]) {\r\n\t\t\t\tplayer->setVarStats(static_cast(s), static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a445419c6b0189f9", + "equalIndicator/v1": "4489cf3fd0d4add8cb6b8eb1ee1f36b3da384891a95561db9f1dd56ab28ad589" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 700, + "startColumn": 15, + "charOffset": 22827, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 698, + "startColumn": 1, + "charOffset": 22787, + "charLength": 98, + "snippet": { + "text": "\t\t\t\tcase 6:\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tchance = std::min(skill, 90);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3388d19863e5d42e", + "equalIndicator/v1": "4490773aa7ecdaf175b77da502ed861c89570c0cb632dad57f854ba5d43560ab" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 818, + "startColumn": 21, + "charOffset": 24515, + "charLength": 16, + "snippet": { + "text": "getItemTypeCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 816, + "startColumn": 1, + "charOffset": 24490, + "charLength": 164, + "snippet": { + "text": "}\r\n\r\nuint32_t Container::getItemTypeCount(uint16_t itemId, int32_t subType /* = -1*/) const {\r\n\tuint32_t count = 0;\r\n\tfor (std::shared_ptr item : itemlist) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "080d670491961f0f", + "equalIndicator/v1": "449668c9864f056268ad54837b6b7f7fca7cc2c188545d47cf215e906fd1b3e7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'mount' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'mount' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 182, + "startColumn": 16, + "charOffset": 4742, + "charLength": 28, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 180, + "startColumn": 1, + "charOffset": 4655, + "charLength": 194, + "snippet": { + "text": "\tbool tameMount(uint8_t mountId);\r\n\tbool untameMount(uint8_t mountId);\r\n\tbool hasMount(const std::shared_ptr mount) const;\r\n\tbool hasAnyMount() const;\r\n\tuint8_t getRandomMountId() const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75ec49ae81059e3a", + "equalIndicator/v1": "449bcbc5e24267be4455ffe09952c7e757cb647169a58bc864a017051199e0e2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 573, + "startColumn": 54, + "charOffset": 17263, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 571, + "startColumn": 1, + "charOffset": 17161, + "charLength": 143, + "snippet": { + "text": "\r\n\t\t\tif (it.abilities->getHealthTicks() != 0) {\r\n\t\t\t\tcondition->setParam(CONDITION_PARAM_HEALTHTICKS, it.abilities->getHealthTicks());\r\n\t\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7a6072e070f73f08", + "equalIndicator/v1": "44c7870fd23b363eaffb676e301cc9f1841a49908ecc72f4ecaa316fd2b846ae" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Where', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Where', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/vectorset.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 78, + "startColumn": 56, + "charOffset": 2102, + "charLength": 6, + "snippet": { + "text": "_Where" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 76, + "startColumn": 1, + "charOffset": 2003, + "charLength": 211, + "snippet": { + "text": "\r\n\t\ttemplate \r\n\t\tconstexpr auto insert(std::vector::const_iterator _Where, _Iter _First, _Iter _Last) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\treturn container.insert(_Where, _First, _Last);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "53908a457391f2a0", + "equalIndicator/v1": "450793c89621a3e4ef939ab39a3c6d7595dc3465e27c233af565786c8b5775fb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2861, + "startColumn": 58, + "charOffset": 106929, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2859, + "startColumn": 1, + "charOffset": 106867, + "charLength": 172, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerQuickLootCorpse(std::shared_ptr player, std::shared_ptr corpse, const Position &position) {\r\n\tif (!player || !corpse) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b97593bc3f32ad80", + "equalIndicator/v1": "452ae2f90e81497c01c79d6758cacd5d17176ecfbb559008d8a6b96846214ee7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1047, + "startColumn": 41, + "charOffset": 39834, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1045, + "startColumn": 1, + "charOffset": 39788, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7bceb677072db636", + "equalIndicator/v1": "454eecb03b94cca7f9f738385c0c6c6fbf9ce87321cf40c231f7cbda9d332446" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'signed char' is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'signed char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 121, + "startColumn": 54, + "charOffset": 4505, + "charLength": 9, + "snippet": { + "text": "centerPos" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 119, + "startColumn": 1, + "charOffset": 4309, + "charLength": 332, + "snippet": { + "text": "\t\tif (centerPos.z > MAP_INIT_SURFACE_LAYER) {\r\n\t\t\tminRangeZ = static_cast(std::max(centerPos.z - MAP_LAYER_VIEW_LIMIT, 0u));\r\n\t\t\tmaxRangeZ = static_cast(std::min(centerPos.z + MAP_LAYER_VIEW_LIMIT, MAP_MAX_LAYERS - 1));\r\n\t\t} else if (centerPos.z == MAP_INIT_SURFACE_LAYER - 1) {\r\n\t\t\tminRangeZ = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b8858c44924da010", + "equalIndicator/v1": "455ff528b9b1410e9ae0c073b296ecbd57577c71c5eae0e7802ff44db3f95ef5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 664, + "startColumn": 37, + "charOffset": 21738, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 662, + "startColumn": 1, + "charOffset": 21676, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 2.40f) + 8;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "29f715d8e4b8779e", + "equalIndicator/v1": "456ca079d5a97757559f1660f245a86756f047afa73f52df29edc996e1dce2b3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 485, + "startColumn": 39, + "charOffset": 12872, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 483, + "startColumn": 1, + "charOffset": 12828, + "charLength": 135, + "snippet": { + "text": "\t}\r\n\r\n\tcreature->health = std::min(getNumber(L, 2), creature->healthMax);\r\n\tg_game().addCreatureHealth(creature);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0a8ccd1ce86ee3dc", + "equalIndicator/v1": "457b7dcc5d68436dfa54c2927b49d26701c7b2171e1599df645bdf8cae1f9766" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 358, + "startColumn": 4, + "charOffset": 11840, + "charLength": 87, + "snippet": { + "text": "case COMBAT_FIREDAMAGE:\r\n\t\t\t\tdefaultMap[1] -= static_cast(elementEntry.second)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 356, + "startColumn": 1, + "charOffset": 11760, + "charLength": 210, + "snippet": { + "text": "\t\t\t\tdefaultMap[0] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_FIREDAMAGE:\r\n\t\t\t\tdefaultMap[1] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_EARTHDAMAGE:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e4c6412cb31603d7", + "equalIndicator/v1": "459d52cc55a9334cb1e0ca814b9973534adb7bebbfd6f762b2f614e41ee6bafc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 187, + "startColumn": 55, + "charOffset": 5836, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 185, + "startColumn": 1, + "charOffset": 5777, + "charLength": 114, + "snippet": { + "text": "}\r\n\r\nbool Combat::isPlayerCombat(std::shared_ptr target) {\r\n\tif (target->getPlayer()) {\r\n\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "69c3b3d76c7b8c93", + "equalIndicator/v1": "45b5f5190debcddab005d909bddcbb25d7ad06ab7296b2afb92b4ce6296c41ba" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1971, + "startColumn": 2, + "charOffset": 52732, + "charLength": 77, + "snippet": { + "text": "// player:removeItem(itemId, count[, subType = -1[, ignoreEquipped = false]])" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1969, + "startColumn": 1, + "charOffset": 52671, + "charLength": 224, + "snippet": { + "text": "\r\nint PlayerFunctions::luaPlayerRemoveItem(lua_State* L) {\r\n\t// player:removeItem(itemId, count[, subType = -1[, ignoreEquipped = false]])\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (!player) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1f5c6819c978f847", + "equalIndicator/v1": "45d1093a75245f2ab0dd47e288a217fc96989bbd057afb8f9ce78b7cff23f369" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 612, + "startColumn": 18, + "charOffset": 18549, + "charLength": 17, + "snippet": { + "text": "getReflectPercent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 610, + "startColumn": 1, + "charOffset": 18456, + "charLength": 176, + "snippet": { + "text": "\t * @return The reflection percentage for the specified combat type.\r\n\t */\r\n\tvirtual int32_t getReflectPercent(CombatType_t combatType, bool useCharges = false) const;\r\n\r\n\t/**\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d0ecdcd288286679", + "equalIndicator/v1": "4602240ebc929f7e361e79c0fef3b2896c0a0a66ea9dbdb491e94acc3538593f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 621, + "startColumn": 18, + "charOffset": 18915, + "charLength": 14, + "snippet": { + "text": "getReflectFlat" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 619, + "startColumn": 1, + "charOffset": 18822, + "charLength": 173, + "snippet": { + "text": "\t * @return The flat reflection value for the specified combat type.\r\n\t */\r\n\tvirtual int32_t getReflectFlat(CombatType_t combatType, bool useCharges = false) const;\r\n\r\n\t/**\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fa991b138dab685e", + "equalIndicator/v1": "4621b8aa39a5b98544030da491abbbca3b6d962627ecbac8fac7f171b2991a7d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2803, + "startColumn": 4, + "charOffset": 83670, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2801, + "startColumn": 1, + "charOffset": 83627, + "charLength": 213, + "snippet": { + "text": "\t\t\tsumSkillTries += skills[i].tries;\r\n\r\n\t\t\tuint32_t lostSkillTries = static_cast(sumSkillTries * deathLossPercent);\r\n\t\t\twhile (lostSkillTries > skills[i].tries) {\r\n\t\t\t\tlostSkillTries -= skills[i].tries;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fa9686173b1a16da", + "equalIndicator/v1": "4665265f54082c34352a4ed98494ad5ce964632cf8f41044721b30157e55a780" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7687, + "startColumn": 39, + "charOffset": 240631, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7685, + "startColumn": 1, + "charOffset": 240482, + "charLength": 311, + "snippet": { + "text": "\t\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\r\n\t} else {\r\n\t\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\r\n\t\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6f2fb5066820d019", + "equalIndicator/v1": "468cf10316dec0005590ddacad2bc6d9956396575297241e15caf857318120b2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 444, + "startColumn": 45, + "charOffset": 15937, + "charLength": 5, + "snippet": { + "text": "party" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 442, + "startColumn": 1, + "charOffset": 15841, + "charLength": 158, + "snippet": { + "text": "\tscriptInterface.pushFunction(info.partyOnJoin);\r\n\r\n\tLuaScriptInterface::pushUserdata(L, party);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Party\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7fb147236cf49068", + "equalIndicator/v1": "46ab75fe8f73611bead815a417ce6dd4a1465d6b3ff6a67b68fa85b26b6404db" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'key' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'key' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 523, + "startColumn": 26, + "charOffset": 14180, + "charLength": 14, + "snippet": { + "text": "const uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 521, + "startColumn": 1, + "charOffset": 14060, + "charLength": 220, + "snippet": { + "text": "\r\n\tvoid addStorageValue(const uint32_t key, const int32_t value, const bool isLogin = false);\r\n\tint32_t getStorageValue(const uint32_t key) const;\r\n\r\n\tint32_t getStorageValueByName(const std::string &storageName) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0b59e87c166727c9", + "equalIndicator/v1": "46bf5a4d18ecd77c0441bb181370a15fff2ff2376c6fad04bed4ca091d36c305" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7678, + "startColumn": 28, + "charOffset": 268655, + "charLength": 14, + "snippet": { + "text": "realManaChange" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7676, + "startColumn": 1, + "charOffset": 268569, + "charLength": 152, + "snippet": { + "text": "\t\t\tTextMessage message;\r\n\t\t\tmessage.position = targetPos;\r\n\t\t\tmessage.primary.value = realManaChange;\r\n\t\t\tmessage.primary.color = TEXTCOLOR_MAYABLUE;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ee7881d860713151", + "equalIndicator/v1": "46e903cecb48f4d1546421b4cc4d429825d446756baf6ef7e07d75b01f387f34" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'podium' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'podium' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8933, + "startColumn": 66, + "charOffset": 283945, + "charLength": 6, + "snippet": { + "text": "podium" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8931, + "startColumn": 1, + "charOffset": 283875, + "charLength": 232, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendMonsterPodiumWindow(std::shared_ptr podium, const Position &position, uint16_t itemId, uint8_t stackPos) {\r\n\tif (!podium || oldProtocol) {\r\n\t\tg_logger().error(\"[{}] item is nullptr\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c9292f5cbfd59421", + "equalIndicator/v1": "47087be17f857ab98eeb12c2ec8061b74bd54223f0543220cdd973573e07f49b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 679, + "startColumn": 43, + "charOffset": 19254, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 677, + "startColumn": 1, + "charOffset": 19207, + "charLength": 95, + "snippet": { + "text": "}\r\n\r\nbool Door::canUse(std::shared_ptr player) const {\r\n\tif (!house) {\r\n\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e083c334d1ba45d5", + "equalIndicator/v1": "471d98744487a30ffe4cca3e5757c31d987e170324153d72737fcb7e9aff427b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::basic_string::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::basic_string::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1918, + "startColumn": 12, + "charOffset": 56472, + "charLength": 15, + "snippet": { + "text": "formattedNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1916, + "startColumn": 1, + "charOffset": 56360, + "charLength": 199, + "snippet": { + "text": "std::string formatNumber(uint64_t number) {\r\n\tstd::string formattedNumber = std::to_string(number);\r\n\tint pos = formattedNumber.length() - 3;\r\n\twhile (pos > 0) {\r\n\t\tformattedNumber.insert(pos, \",\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "92fd1185f5809789", + "equalIndicator/v1": "4725bf0d26f5daae1587ed0e28558d074a8e37d35b274d68e82385dc8286b31d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'partner' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'partner' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 661, + "startColumn": 46, + "charOffset": 23637, + "charLength": 7, + "snippet": { + "text": "partner" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 659, + "startColumn": 1, + "charOffset": 23537, + "charLength": 165, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r\n\tLuaScriptInterface::pushUserdata(L, partner);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b5dae28effd2dc25", + "equalIndicator/v1": "4730eece65509557ddb346ab101d41b226a3ba8a5603e57c7e70d145e054a6b5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Passing result of std::move() as a const reference argument; no move will actually happen", + "markdown": "Passing result of std::move() as a const reference argument; no move will actually happen" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3810, + "startColumn": 36, + "charOffset": 114359, + "charLength": 9, + "snippet": { + "text": "std::move" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3808, + "startColumn": 1, + "charOffset": 114242, + "charLength": 186, + "snippet": { + "text": "\t\t\t\t\t// It will remove items and stop the iteration\r\n\t\t\t\t\tif (count >= amount) {\r\n\t\t\t\t\t\tg_game().internalRemoveItems(std::move(itemList), amount, stackable);\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a783b249b88f5dd8", + "equalIndicator/v1": "4734b390e6be40d01a7ded04b6f78e4aa1f59db5bebe5d7abbfedd3764521d49" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 341, + "startColumn": 20, + "charOffset": 8535, + "charLength": 6, + "snippet": { + "text": "weight" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 339, + "startColumn": 1, + "charOffset": 8423, + "charLength": 136, + "snippet": { + "text": "\r\n\tuint64_t weight = static_cast(itemType->weight) * std::max(1, count);\r\n\tlua_pushnumber(L, weight);\r\n\treturn 1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ea4826604f52bcd9", + "equalIndicator/v1": "47996c63a1304d6c53459065f6a4077dc2858c56bba0f6196ac7906d650d74ef" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 84, + "startColumn": 59, + "charOffset": 2376, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 82, + "startColumn": 1, + "charOffset": 2313, + "charLength": 239, + "snippet": { + "text": "}\r\n\r\nint32_t Weapon::playerWeaponCheck(std::shared_ptr player, std::shared_ptr target, uint8_t shootRange) const {\r\n\tconst Position &playerPos = player->getPosition();\r\n\tconst Position &targetPos = target->getPosition();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9c3b3b734819be78", + "equalIndicator/v1": "47b507ef65ea6c04a7c8b2d8d97ad9b954d4eed0e728673de9e5dafc67efb8fe" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 111, + "startColumn": 30, + "charOffset": 3272, + "charLength": 32, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 109, + "startColumn": 1, + "charOffset": 3168, + "charLength": 301, + "snippet": { + "text": "\r\n\tbool registerLuaItemEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaActionEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaUniqueEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaPositionEvent(const std::shared_ptr moveEvent);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3a50235118eb91f8", + "equalIndicator/v1": "47e63104efc7b938bd47e7fad54f60f65dca13723f7906b52d48fb1046fb295f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 885, + "startColumn": 60, + "charOffset": 30773, + "charLength": 16, + "snippet": { + "text": "supremeModifiers" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 883, + "startColumn": 1, + "charOffset": 30634, + "charLength": 235, + "snippet": { + "text": "\t}\r\n\tif (quality >= WheelGemQuality_t::Greater && !supremeModifiers.empty()) {\r\n\t\tgem.supremeModifier = supremeModifiers[uniform_random(0, supremeModifiers.size() - 1)];\r\n\t}\r\n\tg_logger().debug(\"[{}] {}\", __FUNCTION__, gem.toString());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "285c21a29e06f330", + "equalIndicator/v1": "47f4c48a46f4cd28e427bd2fca85f988b3f8914f5482bcad054a6707045c0d13" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 195, + "startColumn": 9, + "charOffset": 7031, + "charLength": 21, + "snippet": { + "text": "itemType.charges != 0" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 193, + "startColumn": 1, + "charOffset": 6988, + "charLength": 116, + "snippet": { + "text": "\t\t\t} else {\r\n\t\t\t\tint32_t subType;\r\n\t\t\t\tif (itemType.charges != 0) {\r\n\t\t\t\t\tsubType = itemType.charges;\r\n\t\t\t\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e98e913c95a257a3", + "equalIndicator/v1": "47ff9b31e31666c1c76a86dbe1b024d18697515d9af017e15fed9e68032265f2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1040, + "startColumn": 11, + "charOffset": 30048, + "charLength": 7, + "snippet": { + "text": "toupper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1038, + "startColumn": 1, + "charOffset": 30032, + "charLength": 109, + "snippet": { + "text": "\t}\r\n\r\n\tstr[0] = toupper(str.front());\r\n\tfor (size_t i = 1; i < strLength; ++i) {\r\n\t\tif (str[i - 1] == ' ') {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a6b628729f307220", + "equalIndicator/v1": "480d43ca2485ffaa99ed2a53d82087e8a2a1ddefec72634730947ae8bc105ec1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 406, + "startColumn": 57, + "charOffset": 12695, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 404, + "startColumn": 1, + "charOffset": 12634, + "charLength": 154, + "snippet": { + "text": "}\r\n\r\nvoid Monster::onCreatureFound(std::shared_ptr creature, bool pushFront /* = false*/) {\r\n\tif (isFriend(creature)) {\r\n\t\taddFriend(creature);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "528da43e8e39f4e1", + "equalIndicator/v1": "480f32d4904063486d6b87272501a73c06ebbf78079ee50fbb57d99bca76c639" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 224, + "startColumn": 2, + "charOffset": 6894, + "charLength": 4, + "snippet": { + "text": "Item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 222, + "startColumn": 1, + "charOffset": 6864, + "charLength": 164, + "snippet": { + "text": "\r\n\t// Constructor for items\r\n\tItem(const uint16_t type, uint16_t count = 0);\r\n\tItem(const std::shared_ptr &i);\r\n\tvirtual std::shared_ptr clone() const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d380e2341e6afe3e", + "equalIndicator/v1": "481ac36109201eb36148453b76cfd50703f91dd41e30c5daad7abd1b399691b5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')", + "markdown": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 72, + "startColumn": 10, + "charOffset": 1835, + "charLength": 16, + "snippet": { + "text": "gainHealthAmount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 70, + "startColumn": 1, + "charOffset": 1783, + "charLength": 138, + "snippet": { + "text": "\r\n\tuint32_t getHealthGainAmount() const {\r\n\t\treturn gainHealthAmount * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9deeba4c3fb7cac8", + "equalIndicator/v1": "48398e8ec55a0287f1f9d3421bb4782301f599f9d770d82664cffdeae9c69fec" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'rune' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'rune' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 141, + "startColumn": 68, + "charOffset": 4588, + "charLength": 4, + "snippet": { + "text": "rune" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 139, + "startColumn": 1, + "charOffset": 4516, + "charLength": 134, + "snippet": { + "text": "}\r\n\r\nbool Spells::registerRuneLuaEvent(const std::shared_ptr rune) {\r\n\tif (rune) {\r\n\t\tuint16_t id = rune->getRuneItemId();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4517340156710613", + "equalIndicator/v1": "483e864cfd40182cba6e920b07e55ff6a34e1510f52de8177e097e55bbcd23d6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1247, + "startColumn": 74, + "charOffset": 34515, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1245, + "startColumn": 1, + "charOffset": 34437, + "charLength": 156, + "snippet": { + "text": "}\r\n\r\nuint32_t ConditionRegeneration::getHealthTicks(std::shared_ptr creature) const {\r\n\tstd::shared_ptr player = creature->getPlayer();\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d242c1342727c60a", + "equalIndicator/v1": "4847acc64ccfa72b9582ccecc975a842bd2cf93935c2bfbde2e8e9ff89f04e96" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 79, + "startColumn": 34, + "charOffset": 2465, + "charLength": 11, + "snippet": { + "text": "getCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 77, + "startColumn": 1, + "charOffset": 2388, + "charLength": 158, + "snippet": { + "text": "\t\treturn static_self_cast();\r\n\t}\r\n\tstd::shared_ptr getCreature() const override final {\r\n\t\treturn static_self_cast();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "44db797ca05f6ae0", + "equalIndicator/v1": "484995cc799170a193db7d43900575b505a8a87b5ce9a26c23baafd4c53367c7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 777, + "startColumn": 67, + "charOffset": 22564, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 775, + "startColumn": 1, + "charOffset": 22493, + "charLength": 114, + "snippet": { + "text": "}\r\n\r\nvoid Player::addContainer(uint8_t cid, std::shared_ptr container) {\r\n\tif (cid > 0xF) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1ef29293e27aa744", + "equalIndicator/v1": "4850516b5acd210da8d29052302b0cec4c8e2c33c9ce8f7840f3e895edc3bd72" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 831, + "startColumn": 98, + "charOffset": 29954, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 829, + "startColumn": 1, + "charOffset": 29852, + "charLength": 343, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnMoveCreature(std::shared_ptr player, std::shared_ptr creature, const Position &fromPosition, const Position &toPosition) {\r\n\t// Player:onMoveCreature(creature, fromPosition, toPosition) or Player.onMoveCreature(self, creature, fromPosition, toPosition)\r\n\tif (info.playerOnMoveCreature == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "00d4d67c8a39f642", + "equalIndicator/v1": "48505bdffa3077e8fab95257323fdc7a1b52ffc3c4f120b54e44d4e0c22bf80f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/metrics/metrics.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 190, + "startColumn": 2, + "charOffset": 7034, + "charLength": 20, + "snippet": { + "text": "DEFINE_LATENCY_CLASS" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 188, + "startColumn": 1, + "charOffset": 6929, + "charLength": 198, + "snippet": { + "text": "\tDEFINE_LATENCY_CLASS(lua, \"lua\", \"scope\");\r\n\tDEFINE_LATENCY_CLASS(query, \"query\", \"truncated_query\");\r\n\tDEFINE_LATENCY_CLASS(task, \"task\", \"task\");\r\n\tDEFINE_LATENCY_CLASS(lock, \"lock\", \"scope\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bb2e875fbb41b2ac", + "equalIndicator/v1": "485ac41b4f226a9a795057a59941ce6607dd919f79ec46a451316f665c02cf9d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1194, + "startColumn": 67, + "charOffset": 42704, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1192, + "startColumn": 1, + "charOffset": 42633, + "charLength": 157, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnRequestQuestLog(std::shared_ptr player) {\r\n\t// Player:onRequestQuestLog()\r\n\tif (info.playerOnRequestQuestLog == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "33dd2262321335c6", + "equalIndicator/v1": "48696ed7904bc59637d5e6a718f186e86e1fc1ae6ff41727cd3854ec525159c2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'id' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'id' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 179, + "startColumn": 31, + "charOffset": 6255, + "charLength": 14, + "snippet": { + "text": "const uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 177, + "startColumn": 1, + "charOffset": 6145, + "charLength": 144, + "snippet": { + "text": "\tbool isAnyKindOfRewardContainer();\r\n\tbool isBrowseFieldAndHoldsRewardChest();\r\n\tbool isInsideContainerWithId(const uint16_t id);\r\n\r\nprotected:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f81f15638a611ffd", + "equalIndicator/v1": "4882fdf1a6c2708f8dc3f33cf690444697642db22e4b62cca84896fd72478f45" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'target' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'target' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 505, + "startColumn": 25, + "charOffset": 27307, + "charLength": 29, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 503, + "startColumn": 1, + "charOffset": 27116, + "charLength": 412, + "snippet": { + "text": "\tstatic void addCreatureHealth(const CreatureVector &spectators, const std::shared_ptr target);\r\n\tvoid addPlayerMana(const std::shared_ptr target);\r\n\tvoid addPlayerVocation(const std::shared_ptr target);\r\n\tvoid addMagicEffect(const Position &pos, uint16_t effect);\r\n\tstatic void addMagicEffect(const std::vector> &players, const Position &pos, uint16_t effect);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7a3d2956513a9679", + "equalIndicator/v1": "48b001bc76935e9f4d2e8b0d96e02e20f4460e5a7aa921ea606539cbf7af8026" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'setAttackedCreature' is within a recursive call chain", + "markdown": "Function 'setAttackedCreature' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1010, + "startColumn": 16, + "charOffset": 32219, + "charLength": 19, + "snippet": { + "text": "setAttackedCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1008, + "startColumn": 1, + "charOffset": 32199, + "charLength": 128, + "snippet": { + "text": "}\r\n\r\nbool Creature::setAttackedCreature(std::shared_ptr creature) {\r\n\tif (creature) {\r\n\t\tauto monster = getMonster();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "58a2fd7bc0f1a265", + "equalIndicator/v1": "48c291c3caae9a88ec0d92473afb9f82f0f54cc5e1d4d8f0a8b94fe7182febf0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'isImmuneCleanse' can be made const", + "markdown": "Method 'isImmuneCleanse' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1965, + "startColumn": 7, + "charOffset": 57922, + "charLength": 15, + "snippet": { + "text": "isImmuneCleanse" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1963, + "startColumn": 1, + "charOffset": 57861, + "charLength": 195, + "snippet": { + "text": "\t\tcleanseCondition.second = OTSYS_TIME() + 10000;\r\n\t}\r\n\tbool isImmuneCleanse(ConditionType_t conditiontype) {\r\n\t\tuint64_t timenow = OTSYS_TIME();\r\n\t\tif ((cleanseCondition.first == conditiontype)\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "84a747f9251097af", + "equalIndicator/v1": "48c55d351d54c7323e43d24fd0eac8566af62d3512683f4997d8f350890b1e75" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'isSupplyStashMenuAvailable' can be made const", + "markdown": "Method 'isSupplyStashMenuAvailable' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 576, + "startColumn": 7, + "charOffset": 15775, + "charLength": 26, + "snippet": { + "text": "isSupplyStashMenuAvailable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 574, + "startColumn": 1, + "charOffset": 15742, + "charLength": 91, + "snippet": { + "text": "\t\treturn depotSearch;\r\n\t}\r\n\tbool isSupplyStashMenuAvailable() {\r\n\t\treturn supplyStash;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "24ba172ec9fd958f", + "equalIndicator/v1": "48f187989f1024502011b56d1bd336dd4a1c0e29db82c921da4ada263d5d6281" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Move constructor should not be declared explicit", + "markdown": "Move constructor should not be declared explicit" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/di/shared.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 31, + "startColumn": 14, + "charOffset": 716, + "charLength": 5, + "snippet": { + "text": "scope" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 29, + "startColumn": 1, + "charOffset": 607, + "charLength": 260, + "snippet": { + "text": "#if !defined(BOOST_DI_NOT_THREAD_SAFE)\r\n\t\t\t\t//<>\r\n\t\t\t\texplicit scope(scope &&other) noexcept :\r\n\t\t\t\t\tscope(std::move(other), std::scoped_lock(other.mutex_)) { }\r\n\t\t\t\t//<>\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "92fbd106d7e2ab92", + "equalIndicator/v1": "490c055d11038d933f7c8673fbe1efe1cc28ed34fd512db89f5b9a9d6c643e40" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'getFreeSlots' is within a recursive call chain", + "markdown": "Function 'getFreeSlots' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 914, + "startColumn": 21, + "charOffset": 27499, + "charLength": 12, + "snippet": { + "text": "getFreeSlots" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 912, + "startColumn": 1, + "charOffset": 27474, + "charLength": 109, + "snippet": { + "text": "}\r\n\r\nuint16_t Container::getFreeSlots() {\r\n\tuint16_t counter = std::max(0, capacity() - size());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ab0fdc1e1cc0b6de", + "equalIndicator/v1": "49143e70fc6c7a18f535863404ca7c9e087052556f5e9b2d37f75b7d11bee868" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/loot_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 186, + "startColumn": 29, + "charOffset": 4805, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 184, + "startColumn": 1, + "charOffset": 4712, + "charLength": 156, + "snippet": { + "text": "\tconst auto loot = getUserdataShared(L, 1);\r\n\tif (loot) {\r\n\t\tloot->lootBlock.defense = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b40b7489af5cb3c1", + "equalIndicator/v1": "491ef4965dabfac3a4be69a2f4fc636d2b2e15d41cae655da15ed94634b3c018" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 597, + "startColumn": 47, + "charOffset": 30629, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 595, + "startColumn": 1, + "charOffset": 30548, + "charLength": 122, + "snippet": { + "text": "\t\ttilesToClean.emplace(tile);\r\n\t}\r\n\tvoid removeTileToClean(std::shared_ptr tile) {\r\n\t\ttilesToClean.erase(tile);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dc4af76d170dcb7e", + "equalIndicator/v1": "4924d215daa57b92c5f9cfd5fb55f84615f9457163f6e1fbc1cafd36cb44298d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3533, + "startColumn": 63, + "charOffset": 106804, + "charLength": 1, + "snippet": { + "text": "n" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3531, + "startColumn": 1, + "charOffset": 106734, + "charLength": 176, + "snippet": { + "text": "\t\t\t}\r\n\r\n\t\t\tif (n < tmpContainer->capacity() && tmpContainer->queryAdd(n, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) {\r\n\t\t\t\tindex = n;\r\n\t\t\t\t*destItem = nullptr;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2a5428162904bae6", + "equalIndicator/v1": "49255c88f1535c86447c89de69167a4fd18c4804ef17ad0548d1a36aa121c57c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 686, + "startColumn": 27, + "charOffset": 24501, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 684, + "startColumn": 1, + "charOffset": 24469, + "charLength": 129, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnLookInShop, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b3fbc660df3292e6", + "equalIndicator/v1": "493782a75e247da2e77411c3196305039dce6d85979f0673b943f3cedaf8967e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'time_t' (aka 'long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'time_t' (aka 'long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 254, + "startColumn": 18, + "charOffset": 6730, + "charLength": 6, + "snippet": { + "text": "Player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 252, + "startColumn": 1, + "charOffset": 6616, + "charLength": 231, + "snippet": { + "text": "int PlayerFunctions::luaPlayerGetLastLoginSaved(lua_State* L) {\r\n\t// player:getLastLoginSaved()\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (player) {\r\n\t\tlua_pushnumber(L, player->getLastLoginSaved());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b2a6a4083c645be4", + "equalIndicator/v1": "495d4db35d0e372191c011e9e0ebcdf23b1169ed5ec5e5e0821695542591af09" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 644, + "startColumn": 7, + "charOffset": 22976, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 642, + "startColumn": 1, + "charOffset": 22964, + "charLength": 143, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnLookInTrade - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "309057b50eba770a", + "equalIndicator/v1": "498326d03137e02bbb360c15b16c5cf62b320671fc4b74945ef6807cb0617131" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 239, + "startColumn": 3, + "charOffset": 7213, + "charLength": 14, + "snippet": { + "text": "lua_pushnumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 237, + "startColumn": 1, + "charOffset": 7123, + "charLength": 172, + "snippet": { + "text": "\tstd::shared_ptr monster = getUserdataShared(L, 1);\r\n\tif (monster) {\r\n\t\tlua_pushnumber(L, monster->getFriendList().size());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6850574d9de02153", + "equalIndicator/v1": "4991e8535cc250ddb9f3bbe3e87af2e74a160e35c110e1b561d949dc96c7f981" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 394, + "startColumn": 35, + "charOffset": 11580, + "charLength": 4, + "snippet": { + "text": "info" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 392, + "startColumn": 1, + "charOffset": 11496, + "charLength": 176, + "snippet": { + "text": "\tif (monsterType) {\r\n\t\tif (lua_gettop(L) == 1) {\r\n\t\t\tlua_pushnumber(L, monsterType->info.experience);\r\n\t\t} else {\r\n\t\t\tmonsterType->info.experience = getNumber(L, 2);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e1b105f0cfaa3bb9", + "equalIndicator/v1": "499281be825ce11c24d3305f4ab9b35b51f7d4ec2599febf4214428e18366d71" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 529, + "startColumn": 6, + "charOffset": 18811, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 527, + "startColumn": 1, + "charOffset": 18778, + "charLength": 170, + "snippet": { + "text": "\tlua_pushnumber(L, exp);\r\n\r\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "770850c9bc6d1082", + "equalIndicator/v1": "49a38967541e273ea77f5ba7bb2dc001c41a01a1ee0c9a88d7b8f9f2c9be83e8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 525, + "startColumn": 19, + "charOffset": 15602, + "charLength": 8, + "snippet": { + "text": "newOwner" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 523, + "startColumn": 1, + "charOffset": 15577, + "charLength": 99, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tsetNewOwnerGuid(newOwner->getGUID(), false);\r\n\t} else {\r\n\t\tsetOwner(newOwner->getGUID());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4ddd21e9d6c225b4", + "equalIndicator/v1": "49c039e4780bf4bbab854610ebc79a36dcc92ef6ebc33288ff61b02b4f4db5f5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/reward.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 25, + "startColumn": 7, + "charOffset": 792, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 23, + "startColumn": 1, + "charOffset": 627, + "charLength": 463, + "snippet": { + "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) final;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a1e157cdd4f5b88d", + "equalIndicator/v1": "49c97260dc413ad534c927160e636bf161e57c4f0c18f27b5c24073aea418cf3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2078, + "startColumn": 89, + "charOffset": 61435, + "charLength": 7, + "snippet": { + "text": "newItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2076, + "startColumn": 1, + "charOffset": 61331, + "charLength": 178, + "snippet": { + "text": "\r\n// inventory\r\nvoid Player::onUpdateInventoryItem(std::shared_ptr oldItem, std::shared_ptr newItem) {\r\n\tif (oldItem != newItem) {\r\n\t\tonRemoveInventoryItem(oldItem);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "031025a87b712db7", + "equalIndicator/v1": "49cba00fa1986afc76c89ee949d99fdc8460ee7e5c771c49430c612cb5ec3a74" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1822, + "startColumn": 19, + "charOffset": 54616, + "charLength": 14, + "snippet": { + "text": "getReflectFlat" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1820, + "startColumn": 1, + "charOffset": 54593, + "charLength": 166, + "snippet": { + "text": "}\r\n\r\nint32_t Creature::getReflectFlat(CombatType_t combatType, bool useCharges /* = false*/) const {\r\n\ttry {\r\n\t\treturn reflectFlat.at(combatTypeToIndex(combatType));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a31de34f5143f2a1", + "equalIndicator/v1": "49e9afe9df0263c327a54f8d7e059fd4c2c59ee5cc01a76b61895961f02aa245" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1484, + "startColumn": 66, + "charOffset": 58953, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1482, + "startColumn": 1, + "charOffset": 58883, + "charLength": 181, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::internalMoveCreature(std::shared_ptr creature, Direction direction, uint32_t flags /*= 0*/) {\r\n\tif (!creature) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "487a77d928bd4661", + "equalIndicator/v1": "49f471c46d5edcd063737b7377035fb889cca172e122842ede7f73d76da7f3ec" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1397, + "startColumn": 40, + "charOffset": 42050, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1395, + "startColumn": 1, + "charOffset": 41898, + "charLength": 184, + "snippet": { + "text": "\tvoid sendPartyCreatureShowStatus(std::shared_ptr creature, bool showStatus) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPartyCreatureShowStatus(creature, showStatus);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8df3c79bd4411c2c", + "equalIndicator/v1": "4a1674dab55cabca458c3f2dc70671f959e5b8fbd9b191391cd79685dceb5e39" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 156, + "startColumn": 29, + "charOffset": 4385, + "charLength": 8, + "snippet": { + "text": "getPrice" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 154, + "startColumn": 1, + "charOffset": 4302, + "charLength": 216, + "snippet": { + "text": "\r\n\tss << \" It is \" << getSize() << \" square meters.\";\r\n\tconst int32_t housePrice = getPrice();\r\n\tif (housePrice != -1) {\r\n\t\tif (g_configManager().getBoolean(HOUSE_PURSHASED_SHOW_PRICE, __FUNCTION__) || owner == 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2c188db107029f53", + "equalIndicator/v1": "4a3556fac4032a14efe69ff6410b61f55be2787fde96cc04550cac934a766bd8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 772, + "startColumn": 32, + "charOffset": 20813, + "charLength": 11, + "snippet": { + "text": "getCapacity" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 770, + "startColumn": 1, + "charOffset": 20721, + "charLength": 135, + "snippet": { + "text": "\t\t\treturn std::numeric_limits::max();\r\n\t\t} else {\r\n\t\t\treturn std::max(0, getCapacity() - inventoryWeight);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "68e70339d9ce10d4", + "equalIndicator/v1": "4a36e38a3c4cebf8c2bf2886f998dc5a0a4566e5e55fe4ce6af34fd8d07d5749" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6234, + "startColumn": 59, + "charOffset": 215645, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6232, + "startColumn": 1, + "charOffset": 215582, + "charLength": 148, + "snippet": { + "text": "}\r\n\r\nbool Game::internalCreatureTurn(std::shared_ptr creature, Direction dir) {\r\n\tif (creature->getDirection() == dir) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2581be5538cef3e2", + "equalIndicator/v1": "4a7b67e5aaed247d4ba329bef803ecd53ec3278a227915ff24e1cbae590aeea9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 526, + "startColumn": 61, + "charOffset": 14341, + "charLength": 13, + "snippet": { + "text": "const int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 524, + "startColumn": 1, + "charOffset": 14208, + "charLength": 220, + "snippet": { + "text": "\r\n\tint32_t getStorageValueByName(const std::string &storageName) const;\r\n\tvoid addStorageValueByName(const std::string &storageName, const int32_t value, const bool isLogin = false);\r\n\r\n\tstd::shared_ptr kv() const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "054d96a8409cc701", + "equalIndicator/v1": "4a88c76b734f16e639411de4c8a1848a2978b755c5812e0d746da3350d794499" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2047, + "startColumn": 3, + "charOffset": 62761, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2045, + "startColumn": 1, + "charOffset": 62624, + "charLength": 334, + "snippet": { + "text": "\t\tg_game().playerInspectItem(player, pos);\r\n\t} else if (inspectionType == INSPECT_NPCTRADE || inspectionType == INSPECT_CYCLOPEDIA) {\r\n\t\tuint16_t itemId = msg.get();\r\n\t\tuint16_t itemCount = msg.getByte();\r\n\t\tg_game().playerInspectItem(player, itemId, static_cast(itemCount), (inspectionType == INSPECT_CYCLOPEDIA));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ca14c8217f3e508e", + "equalIndicator/v1": "4a9d2a2df4e8284882da5ddb5477d630cf8a7035958c1d1bf41a2cbfb59ae637" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1549, + "startColumn": 27, + "charOffset": 54469, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1547, + "startColumn": 1, + "charOffset": 54437, + "charLength": 159, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "44852728f660e9ad", + "equalIndicator/v1": "4ab0b6bab44ca3f53c9a7be50ae722b799391ffc2fc38f67bc97b4a63475a6a3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 235, + "startColumn": 7, + "charOffset": 7541, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 233, + "startColumn": 1, + "charOffset": 7374, + "charLength": 388, + "snippet": { + "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r\n\r\n\tvoid internalAddThing(std::shared_ptr thing) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "697eef31aa7df9db", + "equalIndicator/v1": "4ac21b76b7152b52e0f5dcc6154037ffed41f964cd8b6ea493c6606d64084fa5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'updateTile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'updateTile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1072, + "startColumn": 48, + "charOffset": 31197, + "charLength": 10, + "snippet": { + "text": "updateTile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1070, + "startColumn": 1, + "charOffset": 31141, + "charLength": 224, + "snippet": { + "text": "\t\t}\r\n\t}\r\n\tvoid sendUpdateTileItem(std::shared_ptr updateTile, const Position &pos, std::shared_ptr item) {\r\n\t\tif (client) {\r\n\t\t\tint32_t stackpos = updateTile->getStackposOfItem(static_self_cast(), item);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5a3d1bf7bbfec3f5", + "equalIndicator/v1": "4acea45cdbd395d4b7886606d65386d2b266f788b1f1dd63d9a4fc40f6795701" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Val', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Val', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/vectorset.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 72, + "startColumn": 68, + "charOffset": 1912, + "charLength": 4, + "snippet": { + "text": "_Val" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 70, + "startColumn": 1, + "charOffset": 1838, + "charLength": 159, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tconstexpr auto insert(std::vector::const_iterator _Where, T &&_Val) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\treturn container.insert(_Where, std::move(_Val));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "677f6d12e0124f8d", + "equalIndicator/v1": "4aefd58fef4ae6fbd02cad3c34d6152c24b7c5aff89cc65a60d475c220540aa8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotchest.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 5, + "charOffset": 1301, + "charLength": 8, + "snippet": { + "text": "addCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1181, + "charLength": 201, + "snippet": { + "text": "\t\tif (item->getTopParent().get() != this) {\r\n\t\t\tif (std::shared_ptr container = item->getContainer()) {\r\n\t\t\t\taddCount = container->getItemHoldingCount() + 1;\r\n\t\t\t} else {\r\n\t\t\t\taddCount = 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a5629c801ec8425d", + "equalIndicator/v1": "4af60f92efa4112564e0a7759f0a55a15f4e5b9751a8f5ebfcb7ed3d6fb67a17" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 22, + "startColumn": 65, + "charOffset": 713, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 615, + "charLength": 146, + "snippet": { + "text": "Weapons::~Weapons() = default;\r\n\r\nconst WeaponShared_ptr Weapons::getWeapon(std::shared_ptr item) const {\r\n\tif (!item) {\r\n\t\treturn nullptr;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a3f07a0233d6da00", + "equalIndicator/v1": "4af7dfa84913933630ffa9563b62f35da99390a5e973b9088b8c0c3284dfb8fe" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 585, + "startColumn": 59, + "charOffset": 18880, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 583, + "startColumn": 1, + "charOffset": 18817, + "charLength": 173, + "snippet": { + "text": "}\r\n\r\nvoid Npc::removePlayerInteraction(std::shared_ptr player) {\r\n\tif (playerInteractions.contains(player->getID())) {\r\n\t\tplayerInteractions.erase(player->getID());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "456233d07cb8b33c", + "equalIndicator/v1": "4b67be18d9354ee74d662fca808ac36b391779ea79ebe571c1c6cdca8d79eb71" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 522, + "startColumn": 43, + "charOffset": 14104, + "charLength": 13, + "snippet": { + "text": "const int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 520, + "startColumn": 1, + "charOffset": 14014, + "charLength": 195, + "snippet": { + "text": "\tbool canOpenCorpse(uint32_t ownerId) const;\r\n\r\n\tvoid addStorageValue(const uint32_t key, const int32_t value, const bool isLogin = false);\r\n\tint32_t getStorageValue(const uint32_t key) const;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8b99d537436bf41e", + "equalIndicator/v1": "4b6d69ae0117ad430b215fbd323839c4392151f1276937aa613496b51f9eb759" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 253, + "startColumn": 88, + "charOffset": 9326, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 251, + "startColumn": 1, + "charOffset": 9234, + "charLength": 213, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::partyOnLeave(std::shared_ptr party, std::shared_ptr player) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::partyOnLeave - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f4b6177e49cd6db8", + "equalIndicator/v1": "4b6f887d619dd83dab7298f54ff6935dc831eff776172fde019505a4ac2d3659" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1944, + "startColumn": 151, + "charOffset": 75849, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1942, + "startColumn": 1, + "charOffset": 75694, + "charLength": 444, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::internalMoveItem(std::shared_ptr fromCylinder, std::shared_ptr toCylinder, int32_t index, std::shared_ptr item, uint32_t count, std::shared_ptr* movedItem, uint32_t flags /*= 0*/, std::shared_ptr actor /*=nullptr*/, std::shared_ptr tradeItem /* = nullptr*/, bool checkTile /* = true*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (fromCylinder == nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6b0d4ac5794df445", + "equalIndicator/v1": "4b8f1e64a06edfaac0485e0b8da6b73ce7352e8fd5b3bef939a0cb655d06c763" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 72, + "startColumn": 75, + "charOffset": 2317, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 70, + "startColumn": 1, + "charOffset": 2238, + "charLength": 255, + "snippet": { + "text": "}\r\n\r\nReturnValue EventCallback::creatureOnAreaCombat(std::shared_ptr creature, std::shared_ptr tile, bool aggressive) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnAreaCombat - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d9c8e968b105a7e9", + "equalIndicator/v1": "4b90f23889712061fa16a634af0e5406e70d9f76da322c057632c0b3ddb5033a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Replace loop by 'std::ranges::any_of()'", + "markdown": "Replace loop by 'std::ranges::any_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5158, + "startColumn": 2, + "charOffset": 152227, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5156, + "startColumn": 1, + "charOffset": 152160, + "charLength": 302, + "snippet": { + "text": "\r\nbool Player::hasKilled(std::shared_ptr player) const {\r\n\tfor (const auto &kill : unjustifiedKills) {\r\n\t\tif (kill.target == player->getGUID() && (time(nullptr) - kill.time) < g_configManager().getNumber(ORANGE_SKULL_DURATION, __FUNCTION__) * 24 * 60 * 60 && kill.unavenged) {\r\n\t\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5dcce8e8ad9ce384", + "equalIndicator/v1": "4bb441924062d4c12402e29b36a30903fd66c57cec9b2b7cb59b87ae89528f14" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Val', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Val', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/arraylist.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 97, + "startColumn": 23, + "charOffset": 2202, + "charLength": 4, + "snippet": { + "text": "_Val" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 95, + "startColumn": 1, + "charOffset": 2173, + "charLength": 107, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tvoid push_front(T &&_Val) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\tfrontContainer.push_back(std::move(_Val));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c6d01226d1ecd32a", + "equalIndicator/v1": "4bd93aaf65d4feebfd11fbfd1be633aaea63c718fefc7ede9c7ca3a153778ad8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'vocName' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'vocName' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 165, + "startColumn": 35, + "charOffset": 4238, + "charLength": 7, + "snippet": { + "text": "vocName" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 163, + "startColumn": 1, + "charOffset": 4198, + "charLength": 140, + "snippet": { + "text": "\t}\r\n\r\n\tvoid addVocWeaponMap(std::string vocName) {\r\n\t\tint32_t vocationId = g_vocations().getVocationId(vocName);\r\n\t\tif (vocationId != -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3cefefb4587a8dfd", + "equalIndicator/v1": "4be0b679a15da5a2acab9d883029e647ebd566625001754a146866e7fadef006" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 172, + "startColumn": 2, + "charOffset": 5606, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 170, + "startColumn": 1, + "charOffset": 5599, + "charLength": 122, + "snippet": { + "text": "\t}\r\n\r\n\tuint16_t innerLength = msg.get();\r\n\tif (std::cmp_greater(innerLength, msgLength - 2)) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eb81a5f907dd2dff", + "equalIndicator/v1": "4bead31fdd6a31d116421ac1a191b8672b7007180c5a85ad44cda11a98379274" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1143, + "startColumn": 99, + "charOffset": 43421, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1141, + "startColumn": 1, + "charOffset": 43318, + "charLength": 237, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::zoneBeforeCreatureEnter(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneBeforeCreatureEnter - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0751c91e2737c77c", + "equalIndicator/v1": "4bfcbacdd796bd9d3aec9a7637646e8d722d100376a0c70a7e94e632e7e77c33" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #5 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #5 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 339, + "startColumn": 157, + "charOffset": 9231, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 337, + "startColumn": 1, + "charOffset": 9070, + "charLength": 223, + "snippet": { + "text": "}\r\n\r\nvoid Creature::onUpdateTileItem(std::shared_ptr updateTile, const Position &pos, std::shared_ptr, const ItemType &oldType, std::shared_ptr, const ItemType &newType) {\r\n\tif (!isMapLoaded) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "812ae60a824901bf", + "equalIndicator/v1": "4c2289b6dcc5588e1fceb19180964760f88167d11d562bd87d5e934b89e2eed5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 733, + "startColumn": 60, + "charOffset": 23553, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 731, + "startColumn": 1, + "charOffset": 23489, + "charLength": 272, + "snippet": { + "text": "}\r\n\r\nvoid Combat::CombatConditionFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\r\n\tif (params.origin == ORIGIN_MELEE && data && data->primary.value == 0 && data->secondary.value == 0) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ef652b8659ed04cf", + "equalIndicator/v1": "4c33e4ff282627692523f00f9680a7f653c3a5f7f46e3e7f56d156995756d978" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5685, + "startColumn": 50, + "charOffset": 168062, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5683, + "startColumn": 1, + "charOffset": 168008, + "charLength": 114, + "snippet": { + "text": "}\r\n\r\nbool Player::isGuildMate(std::shared_ptr player) const {\r\n\tif (!player || !guild) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "abbe2fc26f75e1d2", + "equalIndicator/v1": "4c42fce3eb1c8112e07cc3ec4f0eb70ba40f397c5a5c49d09517150281007b50" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?", + "markdown": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2496, + "startColumn": 7, + "charOffset": 69698, + "charLength": 25, + "snippet": { + "text": "Condition::startCondition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2494, + "startColumn": 1, + "charOffset": 69602, + "charLength": 156, + "snippet": { + "text": "\r\nbool ConditionSpellGroupCooldown::startCondition(std::shared_ptr creature) {\r\n\tif (!Condition::startCondition(creature)) {\r\n\t\treturn false;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "657723440c8607e4", + "equalIndicator/v1": "4c51226dfe1b01268c5513d8f9b42e627d4b736592e8aa0f88f410cc4406b8b9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 225, + "startColumn": 2, + "charOffset": 6943, + "charLength": 4, + "snippet": { + "text": "Item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 223, + "startColumn": 1, + "charOffset": 6866, + "charLength": 164, + "snippet": { + "text": "\t// Constructor for items\r\n\tItem(const uint16_t type, uint16_t count = 0);\r\n\tItem(const std::shared_ptr &i);\r\n\tvirtual std::shared_ptr clone() const;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0268ccc5edda4196", + "equalIndicator/v1": "4c53538cc364e81449d9814b0b92982c40f146f0ff02cffe10aeb19c3d489c6a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 167, + "startColumn": 50, + "charOffset": 5884, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 165, + "startColumn": 1, + "charOffset": 5809, + "charLength": 195, + "snippet": { + "text": "\r\n\ttemplate \r\n\tT getCustomAttributeValue(std::shared_ptr item, const std::string &attributeName) {\r\n\t\tstatic_assert(std::is_integral::value, \"T must be an integral type\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "912d5ca23755b3b3", + "equalIndicator/v1": "4c5a7529c79faf765a4d7a9af7fcdcb08732548f760c31a068bd76d59b2716db" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2386, + "startColumn": 51, + "charOffset": 70477, + "charLength": 6, + "snippet": { + "text": "rawExp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2384, + "startColumn": 1, + "charOffset": 70261, + "charLength": 310, + "snippet": { + "text": "\tstd::map attrs({ { \"player\", getName() }, { \"level\", std::to_string(getLevel()) }, { \"rate\", std::to_string(rate) } });\r\n\tif (sendText) {\r\n\t\tg_metrics().addCounter(\"player_experience_raw\", rawExp, attrs);\r\n\t\tg_metrics().addCounter(\"player_experience_actual\", exp, attrs);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7a03374d95622f57", + "equalIndicator/v1": "4c6c260287f442056188f4580d510eb5c866906d8a395bcfc7fd966eb6d266d6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8456, + "startColumn": 4, + "charOffset": 267684, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8454, + "startColumn": 1, + "charOffset": 267601, + "charLength": 238, + "snippet": { + "text": "\t\tcase SUPPLY_STASH_ACTION_STOW_STACK: {\r\n\t\t\tPosition pos = msg.getPosition();\r\n\t\t\tuint16_t itemId = msg.get();\r\n\t\t\tuint8_t stackpos = msg.getByte();\r\n\t\t\tg_game().playerStowItem(player->getID(), pos, itemId, stackpos, 0, true);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "661e4e504254432b", + "equalIndicator/v1": "4c7be62b9c1a54dc3e05b93cf3b4d7f388b3771379a88c2ed27eb6ad90240ca3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'uint64_t' (aka 'unsigned long long')", + "markdown": "Narrowing conversion from 'double' to 'uint64_t' (aka 'unsigned long long')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2397, + "startColumn": 10, + "charOffset": 70993, + "charLength": 112, + "snippet": { + "text": "(exp * (1.75 * getHazardSystemPoints() * g_configManager().getFloat(HAZARD_EXP_BONUS_MULTIPLIER, __FUNCTION__)))" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2395, + "startColumn": 1, + "charOffset": 70856, + "charLength": 264, + "snippet": { + "text": "\tbool handleHazardExperience = monster && monster->getHazard() && getHazardSystemPoints() > 0;\r\n\tif (handleHazardExperience) {\r\n\t\texp += (exp * (1.75 * getHazardSystemPoints() * g_configManager().getFloat(HAZARD_EXP_BONUS_MULTIPLIER, __FUNCTION__))) / 100.;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b2b0ceeb68e11860", + "equalIndicator/v1": "4c92dc3fee214c07474324436d8bb1f8075e46c2400a731e532c6d00ba6ed6f0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1088, + "startColumn": 39, + "charOffset": 32269, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1086, + "startColumn": 1, + "charOffset": 32109, + "charLength": 260, + "snippet": { + "text": "\r\n\t\tif (!mType->info.voiceVector.empty() && (mType->info.yellChance >= static_cast(uniform_random(1, 100)))) {\r\n\t\t\tuint32_t index = uniform_random(0, mType->info.voiceVector.size() - 1);\r\n\t\t\tconst voiceBlock_t &vb = mType->info.voiceVector[index];\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cf8540c2cd142643", + "equalIndicator/v1": "4c9daffffc2aeed1822c82013e6d3854d391e8416b0c4b41f3e001832d3f8442" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'monsterType' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'monsterType' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 169, + "startColumn": 111, + "charOffset": 5551, + "charLength": 11, + "snippet": { + "text": "monsterType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 167, + "startColumn": 1, + "charOffset": 5436, + "charLength": 225, + "snippet": { + "text": "}\r\n\r\nbool SpawnMonster::spawnMonster(uint32_t spawnMonsterId, spawnBlock_t &sb, const std::shared_ptr monsterType, bool startup /*= false*/) {\r\n\tif (spawnedMonsterMap.contains(spawnMonsterId)) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f5ab66acaed4771a", + "equalIndicator/v1": "4cb6ab4ef661f625e183b75903d069fb25fba5fe71598fcba865f9f290ba9bea" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1191, + "startColumn": 2, + "charOffset": 42598, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1189, + "startColumn": 1, + "charOffset": 42591, + "charLength": 46, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "74d135433be5eb42", + "equalIndicator/v1": "4cbed029e4aaf39de2ace61a5e4210fbfc820d034ebfe23054f568ba833ab115" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1111, + "startColumn": 2, + "charOffset": 42274, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1109, + "startColumn": 1, + "charOffset": 42267, + "charLength": 52, + "snippet": { + "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c166beb5edf7f0dc", + "equalIndicator/v1": "4cc04f000d626af03eaf9ca07f8fdff8caeb610ccc4d8cbf402370753b402786" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6370, + "startColumn": 69, + "charOffset": 201568, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6368, + "startColumn": 1, + "charOffset": 201495, + "charLength": 145, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendPartyCreatureSkull(std::shared_ptr target) {\r\n\tif (g_game().getWorldType() != WORLD_TYPE_PVP) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "83035903335c0385", + "equalIndicator/v1": "4ce3c895b5af789d3f1d4edeb6769a9300f420051319bbe64a7ad06ec1fd3322" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 869, + "startColumn": 54, + "charOffset": 39484, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 867, + "startColumn": 1, + "charOffset": 39426, + "charLength": 126, + "snippet": { + "text": "}\r\n\r\nvoid Game::internalGetPosition(std::shared_ptr item, Position &pos, uint8_t &stackpos) {\r\n\tpos.x = 0;\r\n\tpos.y = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "83df64020b72a146", + "equalIndicator/v1": "4cf19ba10297fb0c7d401397903c85abbe69b4cc3ad646809f1e0c6a74f4fcee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 374, + "startColumn": 31, + "charOffset": 12849, + "charLength": 8, + "snippet": { + "text": "listItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 372, + "startColumn": 1, + "charOffset": 12683, + "charLength": 327, + "snippet": { + "text": "\t\tif (container && containerType == 0 && item->isQuiver() && player->getThing(CONST_SLOT_RIGHT) == item) {\r\n\t\t\tuint16_t ammoTotal = 0;\r\n\t\t\tfor (std::shared_ptr listItem : container->getItemList()) {\r\n\t\t\t\tif (player->getLevel() >= Item::items[listItem->getID()].minReqLevel) {\r\n\t\t\t\t\tammoTotal += listItem->getItemCount();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d4bbc4a716e8cb28", + "equalIndicator/v1": "4cf7310725648ed61114fbd05e354243a72d4c8b741960518a3a6164a2e610d6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'npc' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'npc' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1496, + "startColumn": 21, + "charOffset": 44643, + "charLength": 3, + "snippet": { + "text": "npc" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1494, + "startColumn": 1, + "charOffset": 44556, + "charLength": 102, + "snippet": { + "text": "\tvoid sendShop(std::shared_ptr npc) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendShop(npc);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dfde05029836be22", + "equalIndicator/v1": "4cff83ca4fadf19a25b50ae6ae92e65fb5c03801abe0f3ba5261c213d2ca81e2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 429, + "startColumn": 77, + "charOffset": 12699, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 427, + "startColumn": 1, + "charOffset": 12618, + "charLength": 172, + "snippet": { + "text": "}\r\n\r\nvoid Container::onRemoveContainerItem(uint32_t index, std::shared_ptr item) {\r\n\tauto spectators = Spectators().find(getPosition(), false, 2, 2, 2, 2);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d5c034fca05b8e3f", + "equalIndicator/v1": "4d687b25b3b632b12eb6a938a080aa6fdcb69ffc77aeae14fa52baba8b8267bf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1250, + "startColumn": 13, + "charOffset": 56449, + "charLength": 14, + "snippet": { + "text": "vocationString" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1248, + "startColumn": 1, + "charOffset": 56350, + "charLength": 250, + "snippet": { + "text": "\t\tif (weapon->getWieldInfo() != 0) {\r\n\t\t\titemType.wieldInfo = weapon->getWieldInfo();\r\n\t\t\titemType.vocationString = weapon->getVocationString();\r\n\t\t\titemType.minReqLevel = weapon->getReqLevel();\r\n\t\t\titemType.minReqMagicLevel = weapon->getReqMagLv();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8e7ef42c35d189f4", + "equalIndicator/v1": "4daa76feceb45f8b934f680092ce316ae40632612cb875acd21291e9843fdb08" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 639, + "startColumn": 22, + "charOffset": 19412, + "charLength": 8, + "snippet": { + "text": "blockHit" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 637, + "startColumn": 1, + "charOffset": 19386, + "charLength": 307, + "snippet": { + "text": "}\r\n\r\nBlockType_t Monster::blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense /* = false*/, bool checkArmor /* = false*/, bool /* field = false */) {\r\n\tBlockType_t blockType = Creature::blockHit(attacker, combatType, damage, checkDefense, checkArmor);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "12214a189d50f3ef", + "equalIndicator/v1": "4dae9ed06858543268c85d0ba034724b1287d3aed94411fc113fb61d40a970e1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/loot_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 210, + "startColumn": 27, + "charOffset": 5374, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 208, + "startColumn": 1, + "charOffset": 5283, + "charLength": 154, + "snippet": { + "text": "\tconst auto loot = getUserdataShared(L, 1);\r\n\tif (loot) {\r\n\t\tloot->lootBlock.armor = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d1687e71fc339c5e", + "equalIndicator/v1": "4dc3670353cf585287e0d3832ac3451bd757a4e442eef674400fb8a079b184db" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6104, + "startColumn": 60, + "charOffset": 194152, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6102, + "startColumn": 1, + "charOffset": 194088, + "charLength": 183, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendToChannel(std::shared_ptr creature, SpeakClasses type, const std::string &text, uint16_t channelId) {\r\n\tNetworkMessage msg;\r\n\tmsg.addByte(0xAA);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "39d14f5c04473234", + "equalIndicator/v1": "4df0b7e87a858e3e6f23b298540a0c942b1ff1df8a902871f935cb2a0f4a3bdd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 605, + "startColumn": 17, + "charOffset": 29532, + "charLength": 17, + "snippet": { + "text": "parseSupressDrunk" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 603, + "startColumn": 1, + "charOffset": 29511, + "charLength": 204, + "snippet": { + "text": "}\r\n\r\nvoid ItemParse::parseSupressDrunk(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\r\n\tstd::string stringValue = tmpStrValue;\r\n\tif (valueAttribute.as_bool()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8a2933fbf40a4844", + "equalIndicator/v1": "4df34adb3fe2a38dc244416d0df664b0178807cf7e55c8ba66fd12bd01ca9ba5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 67, + "startColumn": 53, + "charOffset": 2042, + "charLength": 5, + "snippet": { + "text": "range" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 65, + "startColumn": 1, + "charOffset": 1969, + "charLength": 86, + "snippet": { + "text": "\t\treturn false;\r\n\t}\r\n\treturn Creature::canSee(getPosition(), pos, range, range);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "84535aebc230ac3e", + "equalIndicator/v1": "4e1c394abe327cdc211bf2874d5f534fe6f8a21c15d96d043930ae8390e76993" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 248, + "startColumn": 73, + "charOffset": 8921, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 246, + "startColumn": 1, + "charOffset": 8844, + "charLength": 269, + "snippet": { + "text": "}\r\n\r\nReturnValue Events::eventCreatureOnAreaCombat(std::shared_ptr creature, std::shared_ptr tile, bool aggressive) {\r\n\t// Creature:onAreaCombat(tile, aggressive) or Creature.onAreaCombat(self, tile, aggressive)\r\n\tif (info.creatureOnAreaCombat == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a1090194e43d3e82", + "equalIndicator/v1": "4e338ae870575c1ac55cacfb58c25a623a43dd34455ba007ea8be4f01c1b2009" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 254, + "startColumn": 22, + "charOffset": 6791, + "charLength": 5, + "snippet": { + "text": "regen" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 252, + "startColumn": 1, + "charOffset": 6667, + "charLength": 198, + "snippet": { + "text": "\r\n\t\tplayer->changeHealth(regen * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__), false);\r\n\t\tplayer->changeMana(regen * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__));\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c8b5093a106586b1", + "equalIndicator/v1": "4e37a3c9ea7f0458e63f84176fd723811dc8d8d4e6c0f8ec711bed8f621e46a3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 231, + "startColumn": 11, + "charOffset": 7225, + "charLength": 16, + "snippet": { + "text": "getItemTypeCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 229, + "startColumn": 1, + "charOffset": 7122, + "charLength": 253, + "snippet": { + "text": "\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::shared_ptr getThing(size_t index) const override final;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "47db0f95390397f0", + "equalIndicator/v1": "4e51aae1ffd0ad60e072d02c5508117abfde2a6345feac070302bef1c53a33c3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 391, + "startColumn": 47, + "charOffset": 12558, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 389, + "startColumn": 1, + "charOffset": 12507, + "charLength": 243, + "snippet": { + "text": "}\r\n\r\nbool Actions::useItem(std::shared_ptr player, const Position &pos, uint8_t index, std::shared_ptr item, bool isHotkey) {\r\n\tconst ItemType &it = Item::items[item->getID()];\r\n\tif (it.isRune() || it.type == ITEM_TYPE_POTION) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9d53f8940e1144a5", + "equalIndicator/v1": "4e5b5437035b257b1f23a75ab31515cbbdb7194995c4bd15ed974d7347163e0e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 687, + "startColumn": 15, + "charOffset": 22425, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 685, + "startColumn": 1, + "charOffset": 22385, + "charLength": 132, + "snippet": { + "text": "\t\t\t\tcase 1:\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 74) * 1.20f) + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "492a8fac155073b9", + "equalIndicator/v1": "4e5e43df04594341b9417bf52e68888434c327dea10e7c857ad816aa260462a9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The 'empty' method should be used to check for emptiness instead of 'size'", + "markdown": "The 'empty' method should be used to check for emptiness instead of 'size'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1824, + "startColumn": 16, + "charOffset": 51361, + "charLength": 5, + "snippet": { + "text": "items" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1822, + "startColumn": 1, + "charOffset": 51248, + "charLength": 157, + "snippet": { + "text": "std::shared_ptr Tile::getDoorItem() const {\r\n\tconst TileItemVector* items = getItemList();\r\n\tif (!items || items->size() == 0) {\r\n\t\treturn ground;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8ad8134904d38221", + "equalIndicator/v1": "4e688ec29158d992079ead9b9ae6717255aedc76b30322ac4ad8b81615f5f8f7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3219, + "startColumn": 67, + "charOffset": 96930, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3217, + "startColumn": 1, + "charOffset": 96764, + "charLength": 271, + "snippet": { + "text": "\t\t\t\tif (leftItem->getSlotPosition() & SLOTP_TWO_HAND) {\r\n\t\t\t\t\tret = RETURNVALUE_DROPTWOHANDEDITEM;\r\n\t\t\t\t} else if (item == leftItem && count == item->getItemCount()) {\r\n\t\t\t\t\tret = RETURNVALUE_NOERROR;\r\n\t\t\t\t} else if (leftType == WEAPON_SHIELD && type == WEAPON_SHIELD) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a602eba61fe110fd", + "equalIndicator/v1": "4e7046b27bf2babf4be050ebb9fa225f3ed0b47d2b9a68327f5fe5a23adc9c54" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 150, + "startColumn": 7, + "charOffset": 4686, + "charLength": 11, + "snippet": { + "text": "updateThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 148, + "startColumn": 1, + "charOffset": 4630, + "charLength": 231, + "snippet": { + "text": "\tvoid addItemBack(std::shared_ptr item);\r\n\r\n\tvoid updateThing(std::shared_ptr thing, uint16_t itemId, uint32_t count) override final;\r\n\tvoid replaceThing(uint32_t index, std::shared_ptr thing) override final;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "268c320350f4752b", + "equalIndicator/v1": "4e744810293ca65f1f5a501d265f9448491c6d20da6960f12f888b33c309d31f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getScheduledSaleUpdate' can be made const", + "markdown": "Method 'getScheduledSaleUpdate' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1794, + "startColumn": 7, + "charOffset": 53614, + "charLength": 22, + "snippet": { + "text": "getScheduledSaleUpdate" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1792, + "startColumn": 1, + "charOffset": 53602, + "charLength": 74, + "snippet": { + "text": "\t}\r\n\r\n\tbool getScheduledSaleUpdate() {\r\n\t\treturn scheduledSaleUpdate;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0b8be354cef530dc", + "equalIndicator/v1": "4e810159255ac1032cef228dbc32b8350d4f3b42174640c0ff2254baa9b397cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1037, + "startColumn": 27, + "charOffset": 37514, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1035, + "startColumn": 1, + "charOffset": 37482, + "charLength": 133, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnGainExperience, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9927af386cbd390b", + "equalIndicator/v1": "4ea3fed105b61d2a8ca1032c1cb81298538793f40f543117d31b38b1f7575fca" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 736, + "startColumn": 68, + "charOffset": 28388, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 734, + "startColumn": 1, + "charOffset": 28316, + "charLength": 269, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnGainExperience(std::shared_ptr player, std::shared_ptr target, uint64_t &exp, uint64_t rawExp) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnGainExperience - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d7b64a89d16f98bc", + "equalIndicator/v1": "4ecd121d06032cd158727a4b59db294bdebb0fa215b039a263a6140e94e608e7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 518, + "startColumn": 27, + "charOffset": 18458, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 516, + "startColumn": 1, + "charOffset": 18426, + "charLength": 133, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.partyOnShareExperience, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "482c1ebadf5617e2", + "equalIndicator/v1": "4ed50c6404d8c742867b37afac89f5eda33580801572aa2689f7b7d3a1848fc2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 286, + "startColumn": 10, + "charOffset": 10124, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 284, + "startColumn": 1, + "charOffset": 10025, + "charLength": 154, + "snippet": { + "text": "\tDBResult_ptr result = Database::getInstance().storeQuery(query.str());\r\n\tif (!result) {\r\n\t\treturn std::string();\r\n\t}\r\n\treturn result->getString(\"name\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b9b1e67cfb788b3f", + "equalIndicator/v1": "4ed679199b700a4989f382b14a4b78319f2a41975c5b561f2fa53b4261313308" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 495, + "startColumn": 27, + "charOffset": 17632, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 493, + "startColumn": 1, + "charOffset": 17600, + "charLength": 125, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.partyOnDisband, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f46f413e2ced4508", + "equalIndicator/v1": "4ef2fee8b215b72198e14c938a35c35bb50bf6e0c61c2e3a7e759140984dc105" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Escaped string literal can be written as a raw string literal", + "markdown": "Escaped string literal can be written as a raw string literal" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 128, + "startColumn": 14, + "charOffset": 4037, + "charLength": 15, + "snippet": { + "text": "\"\\\"title\\\": \\\"\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 126, + "startColumn": 1, + "charOffset": 3974, + "charLength": 185, + "snippet": { + "text": "\tif (embed) {\r\n\t\tpayload << \"{ \\\"embeds\\\": [{ \";\r\n\t\tpayload << \"\\\"title\\\": \\\"\" << title << \"\\\", \";\r\n\t\tif (!message.empty()) {\r\n\t\t\tpayload << \"\\\"description\\\": \\\"\" << message << \"\\\", \";\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4732b9576c16492f", + "equalIndicator/v1": "4effe9193fcacd5228e55a1dda3ed782228918b1dc18fadbc52e6e0a82ecd1d3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 939, + "startColumn": 26, + "charOffset": 30548, + "charLength": 6, + "snippet": { + "text": "damage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 937, + "startColumn": 1, + "charOffset": 30447, + "charLength": 137, + "snippet": { + "text": "\t\t\tvalue = attacker->getIncreasePercent(combatType);\r\n\t\t\tif (value != 0) {\r\n\t\t\t\tdamage += std::round(damage * value / 100.f);\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "07ef22c4dd91676d", + "equalIndicator/v1": "4f0af09ce1ccbf580e37e54a26801df5fc58c4ac4a48a37bdd3f9124ce3f35fc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1817, + "startColumn": 22, + "charOffset": 52089, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1815, + "startColumn": 1, + "charOffset": 52041, + "charLength": 101, + "snippet": { + "text": "\r\n\t\tif (it.showCharges) {\r\n\t\t\tint32_t charges = it.charges;\r\n\t\t\tif (charges != 0) {\r\n\t\t\t\tss.str(\"\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a2d1f8027eb2aa82", + "equalIndicator/v1": "4f2a4c235b070516330dda7ea35a801b94fb7701e1ab75919c049168d3ac3fe5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'deprecatedOnKilledCreature' is within a recursive call chain", + "markdown": "Function 'deprecatedOnKilledCreature' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1274, + "startColumn": 16, + "charOffset": 39121, + "charLength": 26, + "snippet": { + "text": "deprecatedOnKilledCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1272, + "startColumn": 1, + "charOffset": 39101, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nbool Creature::deprecatedOnKilledCreature(std::shared_ptr target, bool lastHit) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tauto master = getMaster();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "15bafa3c754a4db6", + "equalIndicator/v1": "4f4d0fe47a6ed34d87a9758f2fe537300d717a73fc0ed78338d293e00a1ade45" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1542, + "startColumn": 7, + "charOffset": 54160, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1540, + "startColumn": 1, + "charOffset": 54004, + "charLength": 358, + "snippet": { + "text": "void ValueCallback::getMinMaxValues(std::shared_ptr player, CombatDamage &damage, bool useCharges) const {\r\n\t// onGetPlayerMinMaxValues(...)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[ValueCallback::getMinMaxValues - Player {} formula {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "11f9fd00fe08c4bc", + "equalIndicator/v1": "4f650122717af54ef6027b7869074a71ae12718cc415520d98a0245645d611ce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3147, + "startColumn": 10, + "charOffset": 87295, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3145, + "startColumn": 1, + "charOffset": 87232, + "charLength": 121, + "snippet": { + "text": "\tuint32_t weight = getWeight();\r\n\tif (weight == 0) {\r\n\t\treturn std::string();\r\n\t}\r\n\treturn getWeightDescription(weight);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6c7d1ec2ba93d055", + "equalIndicator/v1": "4f76c8cc3711c2390ad52f50faf935b1376489295c9762aa565d484592193218" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1526, + "startColumn": 53, + "charOffset": 45337, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1524, + "startColumn": 1, + "charOffset": 45280, + "charLength": 105, + "snippet": { + "text": "}\r\n\r\nvoid Player::onClearImbuement(std::shared_ptr item, uint8_t slot) {\r\n\tif (!item) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "318e9b0b3c6c98ca", + "equalIndicator/v1": "4f8d40b166bb4025fb96f15adb960d79ba95bf15bb92366c742b90200503cc02" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Ilist', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Ilist', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/arraylist.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 30, + "startColumn": 47, + "charOffset": 885, + "charLength": 6, + "snippet": { + "text": "_Ilist" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 28, + "startColumn": 1, + "charOffset": 832, + "charLength": 102, + "snippet": { + "text": "\t\t}\r\n\r\n\t\texplicit arraylist(std::initializer_list _Ilist) {\r\n\t\t\tbackContainer.assign(_Ilist);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0523d512b4d9c0c6", + "equalIndicator/v1": "4f92ff48f8703c70fc4321073ba76b535828763192f3ec4115fbb25089ac2930" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6833, + "startColumn": 73, + "charOffset": 236194, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6831, + "startColumn": 1, + "charOffset": 236083, + "charLength": 329, + "snippet": { + "text": "\r\n// Custom PvP System combat helpers\r\nvoid Game::applyPvPDamage(CombatDamage &damage, std::shared_ptr attacker, std::shared_ptr target) {\r\n\tfloat targetDamageReceivedMultiplier = target->vocation->pvpDamageReceivedMultiplier;\r\n\tfloat attackerDamageDealtMultiplier = attacker->vocation->pvpDamageDealtMultiplier;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d999aa6c7fd15529", + "equalIndicator/v1": "50416f2bebd49c61b243141fdb5bd4685697922dc9c602766174bd986e7c2fff" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2139, + "startColumn": 90, + "charOffset": 72236, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2137, + "startColumn": 1, + "charOffset": 72142, + "charLength": 284, + "snippet": { + "text": "}\r\n\r\nvoid Combat::applyExtensions(std::shared_ptr caster, std::shared_ptr target, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (damage.extension || !caster || damage.primary.type == COMBAT_HEALING) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "43d0b556ceeac45f", + "equalIndicator/v1": "5047b64f94bae6401ea97e07989f8333b73c12a7c044afdbcbfe5c8dfe1d4288" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3081, + "startColumn": 80, + "charOffset": 85675, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3079, + "startColumn": 1, + "charOffset": 85591, + "charLength": 207, + "snippet": { + "text": "}\r\n\r\nstd::string Item::getNameDescription(const ItemType &it, std::shared_ptr item /*= nullptr*/, int32_t subType /*= -1*/, bool addArticle /*= true*/) {\r\n\tif (item) {\r\n\t\tsubType = item->getSubType();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "889791cd2d262e89", + "equalIndicator/v1": "50514af916a4b489e2d4082bfacf157d68f225d994c22b66538f21e5bd86de8b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Val', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Val', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/vectorsort.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 76, + "startColumn": 22, + "charOffset": 1587, + "charLength": 4, + "snippet": { + "text": "_Val" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 74, + "startColumn": 1, + "charOffset": 1559, + "charLength": 101, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tvoid push_back(T &&_Val) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\tcontainer.push_back(std::move(_Val));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4942f860e6f66cc4", + "equalIndicator/v1": "509fc01897468c2865a507ab239fe8cdef9d4e1da5ffb6ff1105977d98dedc30" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'internalAddItem' is within a recursive call chain", + "markdown": "Function 'internalAddItem' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2197, + "startColumn": 19, + "charOffset": 83853, + "charLength": 15, + "snippet": { + "text": "internalAddItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2195, + "startColumn": 1, + "charOffset": 83830, + "charLength": 326, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::internalAddItem(std::shared_ptr toCylinder, std::shared_ptr item, int32_t index /*= INDEX_WHEREEVER*/, uint32_t flags /* = 0*/, bool test /* = false*/) {\r\n\tuint32_t remainderCount = 0;\r\n\treturn internalAddItem(std::move(toCylinder), std::move(item), index, flags, test, remainderCount);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d17a14efbe99549b", + "equalIndicator/v1": "50b82e39225a85724fd2596cc0901a442ed9fdfb6ebf8e0253b8b28bc9b3484a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'callback' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'callback' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasetasks.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 34, + "startColumn": 93, + "charOffset": 1217, + "charLength": 8, + "snippet": { + "text": "callback" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 32, + "startColumn": 1, + "charOffset": 1120, + "charLength": 223, + "snippet": { + "text": "}\r\n\r\nvoid DatabaseTasks::store(const std::string &query, std::function callback /* nullptr */) {\r\n\tthreadPool.detach_task([this, query, callback]() {\r\n\t\tDBResult_ptr result = db.storeQuery(query);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d306a889f2890c3c", + "equalIndicator/v1": "50f5740a7892830d6f60f65725c36c2d55b022bcfaa045277891d7053a785c9d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'initInt64Value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'initInt64Value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 19, + "startColumn": 52, + "charOffset": 557, + "charLength": 13, + "snippet": { + "text": "const int64_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 17, + "startColumn": 1, + "charOffset": 482, + "charLength": 278, + "snippet": { + "text": "\t~CustomAttribute();\r\n\r\n\tCustomAttribute(const std::string &initStringKey, const int64_t initInt64Value);\r\n\tCustomAttribute(const std::string &initStringKey, const std::string &initStringValue);\r\n\tCustomAttribute(const std::string &initStringKey, const double initDoubleValue);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e669c39ac22c0761", + "equalIndicator/v1": "511e4ba79d2efa63a467753a37b5352b0c0391653656b84e31fac05e8a474bd2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 289, + "startColumn": 2, + "charOffset": 10383, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 287, + "startColumn": 1, + "charOffset": 10376, + "charLength": 66, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n\treturn returnValue;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5a1b748e1ce809d7", + "equalIndicator/v1": "51439a97d9b81bc45dab70e9109da53657d1994050d1d20307d7d499de0160ab" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 419, + "startColumn": 21, + "charOffset": 9953, + "charLength": 10, + "snippet": { + "text": "itemVector" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 417, + "startColumn": 1, + "charOffset": 9927, + "charLength": 69, + "snippet": { + "text": "\t}\r\n\r\n\tlua_createtable(L, itemVector->size(), 0);\r\n\r\n\tint index = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8be67a2ccb6df4b8", + "equalIndicator/v1": "51456e2ece5ca668ed8e2e9968899ea2aadd4e986f8df26fe7e37d70809faf20" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 111, + "startColumn": 18, + "charOffset": 3268, + "charLength": 17, + "snippet": { + "text": "getReflectPercent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 109, + "startColumn": 1, + "charOffset": 3246, + "charLength": 218, + "snippet": { + "text": "}\r\n\r\nint32_t Monster::getReflectPercent(CombatType_t reflectType, bool useCharges) const {\r\n\tint32_t result = Creature::getReflectPercent(reflectType, useCharges);\r\n\tauto it = mType->info.reflectMap.find(reflectType);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5f8f6c7176d86c04", + "equalIndicator/v1": "516484b78d9707de50b0e6f00bada7af80ecf0d7cbd29c8def3f72c2b8c579c6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::list>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::list\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 269, + "startColumn": 21, + "charOffset": 7514, + "charLength": 5, + "snippet": { + "text": "doors" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 267, + "startColumn": 1, + "charOffset": 7452, + "charLength": 99, + "snippet": { + "text": "\r\n\tconst auto doors = house->getDoors();\r\n\tlua_createtable(L, doors.size(), 0);\r\n\r\n\tint index = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "349de30d1bc65bb0", + "equalIndicator/v1": "518a7d0cea247e168d26cf71d21587e1a21484f8883cb7c0de3207ea80948a72" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 253, + "startColumn": 11, + "charOffset": 6425, + "charLength": 12, + "snippet": { + "text": "CreatureIcon" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 251, + "startColumn": 1, + "charOffset": 6313, + "charLength": 166, + "snippet": { + "text": "\tvirtual CreatureIcon getIcon(const std::string &key) const {\r\n\t\tif (!creatureIcons.contains(key)) {\r\n\t\t\treturn CreatureIcon();\r\n\t\t}\r\n\t\treturn creatureIcons.at(key);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2cbb720e22bd0c11", + "equalIndicator/v1": "518b8ef75d72da7a346a1b01e13341ecc209d53eb56e9213edf9d693d2c0e6a4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 397, + "startColumn": 9, + "charOffset": 11832, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 395, + "startColumn": 1, + "charOffset": 11795, + "charLength": 67, + "snippet": { + "text": "\t\treturn std::string();\r\n\t}\r\n\treturn std::string(c_str, len);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "05cc1b5cec28d1a4", + "equalIndicator/v1": "518f4cfbc4644795b0b872eb99e1f399355b12c26abd6e5047f219dc8a870856" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 778, + "startColumn": 62, + "charOffset": 25431, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 776, + "startColumn": 1, + "charOffset": 25365, + "charLength": 148, + "snippet": { + "text": "}\r\n\r\nbool InstantSpell::playerCastInstant(std::shared_ptr player, std::string ¶m) {\r\n\tif (!playerSpellCheck(player)) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "23675ad72f52ff89", + "equalIndicator/v1": "519a6afadd10cbb08c3c196ce4fc0f3abb03fff77f5756f0026c9cee2eeb9287" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 282, + "startColumn": 84, + "charOffset": 7181, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 280, + "startColumn": 1, + "charOffset": 7093, + "charLength": 183, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Tile::getBottomVisibleCreature(std::shared_ptr creature) const {\r\n\tif (const CreatureVector* creatures = getCreatures()) {\r\n\t\tif (creature) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "094ae64eb9d32b99", + "equalIndicator/v1": "519eb666007e1f94bb2f7735732d1ae91afab90253c423bfc56af3b4d958067e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2076, + "startColumn": 15, + "charOffset": 61763, + "charLength": 12, + "snippet": { + "text": "changeHealth" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2074, + "startColumn": 1, + "charOffset": 61744, + "charLength": 289, + "snippet": { + "text": "}\r\n\r\nvoid Monster::changeHealth(int32_t healthChange, bool sendHealthChange /* = true*/) {\r\n\tif (mType && !mType->info.soundVector.empty() && mType->info.soundChance >= static_cast(uniform_random(1, 100))) {\r\n\t\tauto index = uniform_random(0, mType->info.soundVector.size() - 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0e6367beb65e674f", + "equalIndicator/v1": "51a7af034d367e205dc96e32bd5a67b3a503a6a4bd8527ddcee385bad70781ad" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2705, + "startColumn": 4, + "charOffset": 83468, + "charLength": 8, + "snippet": { + "text": "uint64_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2703, + "startColumn": 1, + "charOffset": 83380, + "charLength": 178, + "snippet": { + "text": "\t\tfor (uint16_t i = 1; i <= size; i++) {\r\n\t\t\tuint16_t itemId = msg.get();\r\n\t\t\tuint64_t price = msg.get();\r\n\t\t\tplayer->setItemCustomPrice(itemId, price);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1e4ef03ce83d13c1", + "equalIndicator/v1": "51b280787dccdc7c5e337e54ede306a0dec58edc46ad5dd96258ae4440544cdd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotchest.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 66, + "startColumn": 18, + "charOffset": 2103, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 64, + "startColumn": 1, + "charOffset": 2081, + "charLength": 232, + "snippet": { + "text": "}\r\n\r\nvoid DepotChest::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tstd::shared_ptr localParent = getParent();\r\n\tif (localParent != nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bf40502f22404c40", + "equalIndicator/v1": "51c78c642d94932a469e1092e3cb34935d02f0ca9c70dc631ade0f705adf7f5d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7684, + "startColumn": 39, + "charOffset": 240423, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7682, + "startColumn": 1, + "charOffset": 240361, + "charLength": 231, + "snippet": { + "text": "\r\n\tif (!oldProtocol) {\r\n\t\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\r\n\t\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fafa93fc5faccd06", + "equalIndicator/v1": "51f0b348240c6df35f45f22654026c99f07fbb7065396dddb7c08667828baf80" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 300, + "startColumn": 112, + "charOffset": 12460, + "charLength": 14, + "snippet": { + "text": "const uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 298, + "startColumn": 1, + "charOffset": 12259, + "charLength": 414, + "snippet": { + "text": "\r\n\tvoid playerBosstiarySlot(uint32_t playerId, uint8_t slotId, uint32_t selectedBossId);\r\n\tvoid playerSetMonsterPodium(uint32_t playerId, uint32_t monsterRaceId, const Position &pos, uint8_t stackPos, const uint16_t itemId, uint8_t direction, const std::pair &podiumAndMonsterVisible);\r\n\tvoid playerRotatePodium(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b85fb9cfb7e95df2", + "equalIndicator/v1": "51f2f9efd5e2f91170cc5283135ca6e1927c4c3ebf9af818f285d78b4a38f6ea" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 580, + "startColumn": 13, + "charOffset": 27497, + "charLength": 11, + "snippet": { + "text": "stringValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 578, + "startColumn": 1, + "charOffset": 27334, + "charLength": 383, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += value;\r\n\t} else if (stringValue == \"absorbpercentenergy\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentfire\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0edc503b5836fc77", + "equalIndicator/v1": "51fa1cd8681d1e8dc2f3ee394b86cf4a622430055e7b48e829fc8a45819c747d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 572, + "startColumn": 19, + "charOffset": 16330, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 570, + "startColumn": 1, + "charOffset": 16307, + "charLength": 212, + "snippet": { + "text": "}\r\n\r\nReturnValue Tile::queryAdd(int32_t, const std::shared_ptr &thing, uint32_t, uint32_t tileFlags, std::shared_ptr) {\r\n\tif (hasBitSet(FLAG_NOLIMIT, tileFlags)) {\r\n\t\treturn RETURNVALUE_NOERROR;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3a37531338c6d2aa", + "equalIndicator/v1": "52059bfa2e48c0889b21cd81688e01349eafe92ee790876d360aed938268d947" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3106, + "startColumn": 2, + "charOffset": 95142, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3104, + "startColumn": 1, + "charOffset": 95043, + "charLength": 233, + "snippet": { + "text": "void ProtocolGame::parseMarketCreateOffer(NetworkMessage &msg) {\r\n\tuint8_t type = msg.getByte();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t itemTier = 0;\r\n\tif (!oldProtocol && Item::items[itemId].upgradeClassification > 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2dbbc7f565961df9", + "equalIndicator/v1": "523fd05b6716f04ec0a4a21dba316fcac381d046e051415de39a736ad0abf89b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 186, + "startColumn": 64, + "charOffset": 5159, + "charLength": 6, + "snippet": { + "text": "action" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 184, + "startColumn": 1, + "charOffset": 5090, + "charLength": 126, + "snippet": { + "text": "\t}\r\n\r\n\tvoid setItemId(uint16_t itemId, const std::shared_ptr action) {\r\n\t\tuseItemMap.try_emplace(itemId, action);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4b699050e92062f0", + "equalIndicator/v1": "5250e9560a22e5afe2c77ab96cef3a757f9cf550ffe29be7bec67ca11051e7be" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3071, + "startColumn": 60, + "charOffset": 114230, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3069, + "startColumn": 1, + "charOffset": 114166, + "charLength": 275, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::processLootItems(std::shared_ptr player, std::shared_ptr lootContainer, std::shared_ptr item, bool &fallbackConsumed) {\r\n\tstd::shared_ptr lastSubContainer = nullptr;\r\n\tuint32_t remainderCount = item->getItemCount();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f2f029635c371580", + "equalIndicator/v1": "5260db933403767cef60889c1ccc2658971fbd9d34d5410e7c4f643912d37696" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 263, + "startColumn": 29, + "charOffset": 7416, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 261, + "startColumn": 1, + "charOffset": 7369, + "charLength": 101, + "snippet": { + "text": "\r\n\tint index = 0;\r\n\tfor (std::shared_ptr item : items) {\r\n\t\tindex++;\r\n\t\tpushUserdata(L, item);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "410185cc97fa24b9", + "equalIndicator/v1": "52afcef95609999700cf08f8159b6e42cbf3d585b137e6adcb4455e184dc0dc4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: recvbyte, delay", + "markdown": "Constructor does not initialize these fields: recvbyte, delay" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 96, + "startColumn": 9, + "charOffset": 2688, + "charLength": 6, + "snippet": { + "text": "Module" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 94, + "startColumn": 1, + "charOffset": 2675, + "charLength": 117, + "snippet": { + "text": "}\r\n\r\nModule::Module(LuaScriptInterface* interface) :\r\n\tEvent(interface), type(MODULE_TYPE_NONE), loaded(false) { }\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9c67a51fac0118e3", + "equalIndicator/v1": "52d6c8d8190b36517eddf546dd41cfe0f06c2d56bf278ad6231d6031e7ba0216" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1143, + "startColumn": 67, + "charOffset": 43389, + "charLength": 4, + "snippet": { + "text": "zone" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1141, + "startColumn": 1, + "charOffset": 43318, + "charLength": 237, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::zoneBeforeCreatureEnter(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneBeforeCreatureEnter - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d9160335c2be92ae", + "equalIndicator/v1": "53085fcda9b242d4d77049130e5aa332698aa3cc1cd29d99cb3ea8a562775e96" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'creature' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'creature' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6526, + "startColumn": 115, + "charOffset": 205511, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6524, + "startColumn": 1, + "charOffset": 205392, + "charLength": 164, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendUpdateTileCreature(const Position &pos, uint32_t stackpos, const std::shared_ptr creature) {\r\n\tif (!canSee(pos)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "168a043a8138ab30", + "equalIndicator/v1": "531a3e9cfdb8af63b8fb6fd8c43b17d8821728cf803f55044b55ee2843206c32" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'spellName' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'spellName' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 258, + "startColumn": 30, + "charOffset": 6301, + "charLength": 9, + "snippet": { + "text": "spellName" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 256, + "startColumn": 1, + "charOffset": 6169, + "charLength": 306, + "snippet": { + "text": "\tstd::string getFormattedAugmentDescription(const std::shared_ptr &augmentInfo) const;\r\n\r\n\tvoid addAugment(std::string spellName, Augment_t augmentType, int32_t value) {\r\n\t\tauto augmentInfo = std::make_shared(spellName, augmentType, value);\r\n\t\taugments.emplace_back(augmentInfo);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7b333420827668ac", + "equalIndicator/v1": "531b492696827af3fab809b507d92905fea8e0ee9f8c4de9645a5612cb4e7aa3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 802, + "startColumn": 55, + "charOffset": 25981, + "charLength": 8, + "snippet": { + "text": "maxValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 800, + "startColumn": 1, + "charOffset": 25921, + "charLength": 123, + "snippet": { + "text": "\t}\r\n\r\n\treturn -normal_random(minValue, static_cast(maxValue * player->getVocation()->distDamageMultiplier));\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "39cd3afef408fe2f", + "equalIndicator/v1": "532a5733625e51fbf59203cf34039e2f2d9bbdb02c365eabef37234ca3f2b772" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'getValueWrapper' is within a recursive call chain", + "markdown": "Function 'getValueWrapper' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/kv_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 121, + "startColumn": 42, + "charOffset": 3042, + "charLength": 15, + "snippet": { + "text": "getValueWrapper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 119, + "startColumn": 1, + "charOffset": 2996, + "charLength": 147, + "snippet": { + "text": "}\r\n\r\nstd::optional KVFunctions::getValueWrapper(lua_State* L) {\r\n\tif (isBoolean(L, -1)) {\r\n\t\treturn ValueWrapper(getBoolean(L, -1));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4dc16dd0f7de1163", + "equalIndicator/v1": "5338e7fb008fad768e69bbbb60bac8a6ccd165524012abf4ecf098b56293469b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 112, + "startColumn": 77, + "charOffset": 3797, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 110, + "startColumn": 1, + "charOffset": 3716, + "charLength": 248, + "snippet": { + "text": "}\r\n\r\nReturnValue EventCallback::creatureOnTargetCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnTargetCombat - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "226f91c4035c14af", + "equalIndicator/v1": "5363e4e16c200ecd4d0244f959ef52cae3a21d8727f2effdf6c8b6314b1415b1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 797, + "startColumn": 92, + "charOffset": 26051, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 795, + "startColumn": 1, + "charOffset": 25955, + "charLength": 226, + "snippet": { + "text": "}\r\n\r\nvoid Combat::combatTileEffects(const CreatureVector &spectators, std::shared_ptr caster, std::shared_ptr tile, const CombatParams ¶ms) {\r\n\tif (params.itemId != 0) {\r\n\t\tuint16_t itemId = params.itemId;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "80eb49a841109e1f", + "equalIndicator/v1": "537436ce3e8306a4514fd9c30529c69d4868542c8cd0ad461d1ee744e606d016" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4681, + "startColumn": 7, + "charOffset": 147659, + "charLength": 31, + "snippet": { + "text": "auto [category, containersPair]" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4679, + "startColumn": 1, + "charOffset": 147533, + "charLength": 325, + "snippet": { + "text": "\r\n\tstd::map, std::shared_ptr>> managedContainersMap;\r\n\tfor (auto [category, containersPair] : player->m_managedContainers) {\r\n\t\tif (containersPair.first && !containersPair.first->isRemoved()) {\r\n\t\t\tmanagedContainersMap[category].first = containersPair.first;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9350fec88460b306", + "equalIndicator/v1": "5375c10c6452aba335d2c670daf256e709c03404322c741c5da724e80ce71533" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 153, + "startColumn": 7, + "charOffset": 4868, + "charLength": 11, + "snippet": { + "text": "removeThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 151, + "startColumn": 1, + "charOffset": 4778, + "charLength": 242, + "snippet": { + "text": "\tvoid replaceThing(uint32_t index, std::shared_ptr thing) override final;\r\n\r\n\tvoid removeThing(std::shared_ptr thing, uint32_t count) override final;\r\n\r\n\tint32_t getThingIndex(std::shared_ptr thing) const override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb507c7c98cb7ad0", + "equalIndicator/v1": "53b2e7e1a635f96e4652ce1dae69ab99c293b11c7177e1d2c27f2cbac66e5e17" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1405, + "startColumn": 9, + "charOffset": 40710, + "charLength": 5, + "snippet": { + "text": "items" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1403, + "startColumn": 1, + "charOffset": 40684, + "charLength": 87, + "snippet": { + "text": "\t\t\t}\r\n\t\t} else {\r\n\t\t\tn += items->getTopItemCount();\r\n\t\t\tif (n >= 10) {\r\n\t\t\t\treturn -1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "32da73a669fc7de4", + "equalIndicator/v1": "53b5e8a8021c2080ed6203e24d0aa19f599a3f0cd6e785f96f83a3442cbe2f69" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 804, + "startColumn": 68, + "charOffset": 30797, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 802, + "startColumn": 1, + "charOffset": 30725, + "charLength": 236, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnGainSkillTries(std::shared_ptr player, skills_t skill, uint64_t &tries) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnGainSkillTries - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a1d78094c0ec14ef", + "equalIndicator/v1": "53be4937e6877ea490758cf77ece1b0da7fa9360590483fe4f132f5d885092bc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::_Hash, std::equal_to>, std::allocator>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::_Hash, std::equal_to\\>, std::allocator\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 727, + "startColumn": 2, + "charOffset": 20624, + "charLength": 305, + "snippet": { + "text": "/**\r\n\t * @brief Retrieve dummy IDs categorized by type.\r\n\t * @details This function provides a table containing two sub-tables: one for free dummies and one for house (or premium) dummies.\r\n\r\n\t* @note usage on lua:\r\n\t local dummies = Game.getDummies()\r\n\t local rate = dummies[1] -- Retrieve dummy ra" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 725, + "startColumn": 1, + "charOffset": 20567, + "charLength": 372, + "snippet": { + "text": "\r\nint GameFunctions::luaGameGetDummies(lua_State* L) {\r\n\t/**\r\n\t * @brief Retrieve dummy IDs categorized by type.\r\n\t * @details This function provides a table containing two sub-tables: one for free dummies and one for house (or premium) dummies.\r\n\r\n\t* @note usage on lua:\r\n\t local dummies = Game.getDummies()\r\n\t local rate = dummies[1] -- Retrieve dummy rate\r\n\t*/\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d85ef15921df9568", + "equalIndicator/v1": "53e27a36a84e7168545ebff4b3a072c3f96793c957ee5c1ec2b76b6612b82187" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6310, + "startColumn": 52, + "charOffset": 184934, + "charLength": 8, + "snippet": { + "text": "vocation" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6308, + "startColumn": 1, + "charOffset": 184779, + "charLength": 350, + "snippet": { + "text": "\tif (condition) {\r\n\t\tcondition->setParam(CONDITION_PARAM_HEALTHGAIN, vocation->getHealthGainAmount());\r\n\t\tcondition->setParam(CONDITION_PARAM_HEALTHTICKS, vocation->getHealthGainTicks());\r\n\t\tcondition->setParam(CONDITION_PARAM_MANAGAIN, vocation->getManaGainAmount());\r\n\t\tcondition->setParam(CONDITION_PARAM_MANATICKS, vocation->getManaGainTicks());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4e95bbc0e54345b1", + "equalIndicator/v1": "53e576d45160dac125bd2ef64a9c10e69e4daf02f4221d7ae66273ea7097944e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')", + "markdown": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5769, + "startColumn": 26, + "charOffset": 170303, + "charLength": 8, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5767, + "startColumn": 1, + "charOffset": 170197, + "charLength": 277, + "snippet": { + "text": "\r\n\t\tuint8_t dayProgress = std::min(std::round(dayKills / dayMax * 100), 100.0);\r\n\t\tuint8_t weekProgress = std::min(std::round(weekKills / weekMax * 100), 100.0);\r\n\t\tuint8_t monthProgress = std::min(std::round(monthKills / monthMax * 100), 100.0);\r\n\t\tuint8_t skullDuration = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2f07e5522fc8876e", + "equalIndicator/v1": "53e9379a639e77ff5ad6eb79905b733147f1216c807dd92b062265512ff8502c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creatures_definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1408, + "startColumn": 14, + "charOffset": 37154, + "charLength": 4, + "snippet": { + "text": "name" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1406, + "startColumn": 1, + "charOffset": 37118, + "charLength": 100, + "snippet": { + "text": "\r\n\tuint32_t guid = 0;\r\n\tstd::string name = \"\";\r\n\tstd::string description = \"\";\r\n\tuint32_t icon = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ed7efdc343cdd82e", + "equalIndicator/v1": "540635abc7eeceae82ffa275c5c190ca74b0e399cba7025b938024580158b8c3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?", + "markdown": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 532, + "startColumn": 7, + "charOffset": 14300, + "charLength": 25, + "snippet": { + "text": "Condition::startCondition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 530, + "startColumn": 1, + "charOffset": 14212, + "charLength": 148, + "snippet": { + "text": "\r\nbool ConditionAttributes::startCondition(std::shared_ptr creature) {\r\n\tif (!Condition::startCondition(creature)) {\r\n\t\treturn false;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a4bc6d65bd2bc8a6", + "equalIndicator/v1": "541c1d99c106f095d05dbdc49752abec8397f3a11e718f5e0b132bb08b2b50dc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3462, + "startColumn": 19, + "charOffset": 104561, + "charLength": 9, + "snippet": { + "text": "slotIndex" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3460, + "startColumn": 1, + "charOffset": 104449, + "charLength": 314, + "snippet": { + "text": "\t\t\t\tif (autoStack && isStackable) {\r\n\t\t\t\t\t// try find an already existing item to stack with\r\n\t\t\t\t\tif (queryAdd(slotIndex, item, item->getItemCount(), 0) == RETURNVALUE_NOERROR) {\r\n\t\t\t\t\t\tif (inventoryItem->equals(item) && inventoryItem->getItemCount() < inventoryItem->getStackSize()) {\r\n\t\t\t\t\t\t\tindex = slotIndex;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "72b173e663f67c78", + "equalIndicator/v1": "543197101bfb90befa262afc3cce15ca13af9b04f6a26fd3ae27a90f855b5cf6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 404, + "startColumn": 8, + "charOffset": 10062, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 402, + "startColumn": 1, + "charOffset": 9956, + "charLength": 226, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetExtraDefense(lua_State* L) {\r\n\t// itemType:getExtraDefense()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->extraDefense);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5c5c75ecbb56a256", + "equalIndicator/v1": "54973398887b0ca0a5e0455ba728591993148b3ab84adca0a6bee939e1898d3c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1642, + "startColumn": 27, + "charOffset": 57694, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1640, + "startColumn": 1, + "charOffset": 57662, + "charLength": 159, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb71ba682e06db8d", + "equalIndicator/v1": "54a475664a98d9f680c04d01cf0e1f79dd98ff447fad887fe4888d3d789d5673" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv_sql.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 33, + "charOffset": 1362, + "charLength": 10, + "snippet": { + "text": "loadPrefix" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 1325, + "charLength": 177, + "snippet": { + "text": "}\r\n\r\nstd::vector KVSQL::loadPrefix(const std::string &prefix /* = \"\"*/) {\r\n\tstd::vector keys;\r\n\tstd::string keySearch = db.escapeString(prefix + \"%\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cd489c5b555e73c8", + "equalIndicator/v1": "54a93d5c59afcd09e5ffb57150e69dc275c39f26b0492083bf49323b1ca168d6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/talkaction.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 91, + "startColumn": 41, + "charOffset": 3164, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 89, + "startColumn": 1, + "charOffset": 3118, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "325535fa0e914331", + "equalIndicator/v1": "54c5ff8b876bbfcce4b5961e08778f83530eeab5e0c5bbac76d3635817cc468d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3482, + "startColumn": 3, + "charOffset": 107032, + "charLength": 8, + "snippet": { + "text": "skills_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3480, + "startColumn": 1, + "charOffset": 106886, + "charLength": 300, + "snippet": { + "text": "\tfor (uint8_t i = SKILL_FIRST; i < SKILL_CRITICAL_HIT_CHANCE; ++i) {\r\n\t\tstatic const uint8_t HardcodedSkillIds[] = { 11, 9, 8, 10, 7, 6, 13 };\r\n\t\tskills_t skill = static_cast(i);\r\n\t\tif (!oldProtocol && (skill == SKILL_LIFE_LEECH_CHANCE || skill == SKILL_MANA_LEECH_CHANCE)) {\r\n\t\t\tcontinue;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ccb0dc438f1e2c8f", + "equalIndicator/v1": "54edbf9e5657184d62ba4baaa6764e8c5588735c8c4da5e340a22b4b4442dbbb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 340, + "startColumn": 18, + "charOffset": 9679, + "charLength": 27, + "snippet": { + "text": "(1.35 + (stacks - 1) * 0.1)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 338, + "startColumn": 1, + "charOffset": 9558, + "charLength": 177, + "snippet": { + "text": "\t\tfloat multiplier = mType->getAttackMultiplier();\r\n\t\tif (auto stacks = getForgeStack(); stacks > 0) {\r\n\t\t\tmultiplier *= (1.35 + (stacks - 1) * 0.1);\r\n\t\t}\r\n\t\treturn multiplier;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1cad02c475b1a1fc", + "equalIndicator/v1": "54ef398c51ff91d10f715bf92b777a72a667efcf230148f7c712dc132d400c6e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1134, + "startColumn": 6, + "charOffset": 43108, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1132, + "startColumn": 1, + "charOffset": 43052, + "charLength": 199, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, position);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d4999975948997d5", + "equalIndicator/v1": "55320d463e47741b2c86eb346612b6cf12091f0c85d05da419864fd82f668b5d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 894, + "startColumn": 54, + "charOffset": 29048, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 892, + "startColumn": 1, + "charOffset": 28990, + "charLength": 120, + "snippet": { + "text": "}\r\n\r\nvoid Creature::drainHealth(std::shared_ptr attacker, int32_t damage) {\r\n\tchangeHealth(-damage, false);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "14b6b546173a7432", + "equalIndicator/v1": "554933b970d2957314462353a627730b7519b7a6e103b133f8d670a8316aaf59" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 28, + "startColumn": 15, + "charOffset": 1160, + "charLength": 16, + "snippet": { + "text": "internalAddThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 26, + "startColumn": 1, + "charOffset": 1073, + "charLength": 209, + "snippet": { + "text": "\r\n\tvoid addThing(int32_t index, std::shared_ptr thing) override;\r\n\tvoid virtual internalAddThing(uint32_t index, std::shared_ptr thing) override;\r\n\r\n\tstd::shared_ptr getHouse() override {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "de5bee2f6cc2ad95", + "equalIndicator/v1": "5570fca0a10ebef57a79685786c276d4ba941671152b62106fb50501f1cd76a6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')", + "markdown": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 60, + "startColumn": 10, + "charOffset": 1425, + "charLength": 13, + "snippet": { + "text": "gainManaTicks" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 58, + "startColumn": 1, + "charOffset": 1376, + "charLength": 136, + "snippet": { + "text": "\r\n\tuint32_t getManaGainTicks() const {\r\n\t\treturn gainManaTicks / g_configManager().getFloat(RATE_MANA_REGEN_SPEED, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bd457d6b81d46a1e", + "equalIndicator/v1": "557d88b0becd74c9dfab33900f4fd4d7ceb40a18a6b3951f3696d036373f3f55" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 95, + "startColumn": 34, + "charOffset": 2902, + "charLength": 4, + "snippet": { + "text": "keys" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 93, + "startColumn": 1, + "charOffset": 2796, + "charLength": 158, + "snippet": { + "text": "\r\n\tstd::shared_ptr scoped(const std::string &scope) override final;\r\n\tstd::unordered_set keys(const std::string &prefix = \"\");\r\n\r\nprotected:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dab161a9d384b6b8", + "equalIndicator/v1": "5598a6a5d26d9c8bb6b813a13ddbc5dcb2d28df972a810417b9ff1601d4d1d7b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1152, + "startColumn": 54, + "charOffset": 34820, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1150, + "startColumn": 1, + "charOffset": 34762, + "charLength": 132, + "snippet": { + "text": "}\r\n\r\nbool Monster::pushCreature(std::shared_ptr creature) {\r\n\tstatic std::vector dirList {\r\n\t\tDIRECTION_NORTH,\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b313edb24c2eea56", + "equalIndicator/v1": "55999daf8e7dcf4f162952a9706fae1f82fd68105fae003a97b8d65dcac3929a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 192, + "startColumn": 58, + "charOffset": 5995, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 190, + "startColumn": 1, + "charOffset": 5933, + "charLength": 195, + "snippet": { + "text": "}\r\n\r\nReturnValue Actions::canUseFar(std::shared_ptr creature, const Position &toPos, bool checkLineOfSight, bool checkFloor) {\r\n\tif (toPos.x == 0xFFFF) {\r\n\t\treturn RETURNVALUE_NOERROR;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7e6ebbe611a044e2", + "equalIndicator/v1": "55a482b2629c57d850918c96670d79743a9e101f2914fee77634237554cb4183" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1143, + "startColumn": 7, + "charOffset": 40944, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1141, + "startColumn": 1, + "charOffset": 40932, + "charLength": 148, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnCombat - \"\r\n\t\t \"Player {} target {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "613e576970800c8f", + "equalIndicator/v1": "55aceabd7dfd0710bf8f8c56ba7156b8e8bd76ffc49705f51f1f771aa6c57bf5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9000, + "startColumn": 2, + "charOffset": 286766, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8998, + "startColumn": 1, + "charOffset": 286671, + "charLength": 207, + "snippet": { + "text": "\tuint16_t monsterRaceId = (uint16_t)msg.get();\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tuint8_t direction = msg.getByte();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "814b7dd84e447201", + "equalIndicator/v1": "55ebe99b509259ab3662d4326174a134cecb1f3029586e5b7e34b4435f0cd3ed" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/metrics/metrics.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 189, + "startColumn": 2, + "charOffset": 6975, + "charLength": 20, + "snippet": { + "text": "DEFINE_LATENCY_CLASS" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 187, + "startColumn": 1, + "charOffset": 6877, + "charLength": 248, + "snippet": { + "text": "\tDEFINE_LATENCY_CLASS(method, \"method\", \"method\");\r\n\tDEFINE_LATENCY_CLASS(lua, \"lua\", \"scope\");\r\n\tDEFINE_LATENCY_CLASS(query, \"query\", \"truncated_query\");\r\n\tDEFINE_LATENCY_CLASS(task, \"task\", \"task\");\r\n\tDEFINE_LATENCY_CLASS(lock, \"lock\", \"scope\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dbadd63ce48721b3", + "equalIndicator/v1": "55f98898fbe27f5b25dfff541acc352247b8798bc95c86de1a1c7ddb716070fb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 47, + "startColumn": 22, + "charOffset": 1804, + "charLength": 28, + "snippet": { + "text": "CONDITION_PARAM_TICKINTERVAL" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 45, + "startColumn": 1, + "charOffset": 1452, + "charLength": 517, + "snippet": { + "text": "std::shared_ptr Monsters::getDamageCondition(ConditionType_t conditionType, int32_t maxDamage, int32_t minDamage, int32_t startDamage, uint32_t tickInterval) {\r\n\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_COMBAT, conditionType, 0, 0)->static_self_cast();\r\n\tcondition->setParam(CONDITION_PARAM_TICKINTERVAL, tickInterval);\r\n\tcondition->setParam(CONDITION_PARAM_MINVALUE, minDamage);\r\n\tcondition->setParam(CONDITION_PARAM_MAXVALUE, maxDamage);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "936a24a58ce103aa", + "equalIndicator/v1": "5611b7d3b378dbcc361d90bee58d611557a6fbe0852a99c2e7748bce68ca5e96" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')", + "markdown": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1251, + "startColumn": 10, + "charOffset": 34640, + "charLength": 11, + "snippet": { + "text": "healthTicks" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1249, + "startColumn": 1, + "charOffset": 34592, + "charLength": 131, + "snippet": { + "text": "\r\n\tif (player != nullptr && isBuff) {\r\n\t\treturn healthTicks / g_configManager().getFloat(RATE_SPELL_COOLDOWN, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2b408c742833826c", + "equalIndicator/v1": "561ea8a815ce356ed40848fa7311ca1bb41eba7fef122786b5b78492062b2f2a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 158, + "startColumn": 37, + "charOffset": 5170, + "charLength": 11, + "snippet": { + "text": "frame_group" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 156, + "startColumn": 1, + "charOffset": 5023, + "charLength": 229, + "snippet": { + "text": "\t\tif (supportAnimation) {\r\n\t\t\tfor (uint32_t frame_it = 0; frame_it < object.frame_group_size(); ++frame_it) {\r\n\t\t\t\tFrameGroup objectFrame = object.frame_group(frame_it);\r\n\t\t\t\tif (!objectFrame.has_sprite_info()) {\r\n\t\t\t\t\tcontinue;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "88916cc66624a9b7", + "equalIndicator/v1": "5643a93a8e5dce82d6c317ef0073223c89dd47df14725819000fcb5399d55f37" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'speaker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'speaker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 150, + "startColumn": 98, + "charOffset": 5228, + "charLength": 7, + "snippet": { + "text": "speaker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 148, + "startColumn": 1, + "charOffset": 5126, + "charLength": 271, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::creatureOnHear(std::shared_ptr creature, std::shared_ptr speaker, const std::string &words, SpeakClasses type) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnHear - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "df9058f0f00f3374", + "equalIndicator/v1": "564bcdf435d6b744a8cceb4c28581f2776c30c195df763ea68fd0b554b23af63" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1144, + "startColumn": 7, + "charOffset": 43446, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1142, + "startColumn": 1, + "charOffset": 43321, + "charLength": 278, + "snippet": { + "text": "\r\nbool EventCallback::zoneBeforeCreatureEnter(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneBeforeCreatureEnter - \"\r\n\t\t \"Zone {} Creature {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fbd518e4cdfd9c10", + "equalIndicator/v1": "565a19e9385c4d6c74c35c9fc58b9a681c174eadecbcd0dec10479c90b945544" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 137, + "startColumn": 45, + "charOffset": 3626, + "charLength": 6, + "snippet": { + "text": "amount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 135, + "startColumn": 1, + "charOffset": 3541, + "charLength": 181, + "snippet": { + "text": "\t}\r\n\tg_game().addMoney(player, amount);\r\n\tg_metrics().addCounter(\"balance_decrease\", amount, { { \"player\", player->getName() }, { \"context\", \"bank_withdraw\" } });\r\n\treturn true;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "08a8d2537de1f897", + "equalIndicator/v1": "56677defd85f105f911ab8789ad7001c30b3643f6a122a8d7d89bbd252f8f73d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant return statement at the end of a function with a void return type", + "markdown": "Redundant return statement at the end of a function with a void return type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1589, + "startColumn": 2, + "charOffset": 47193, + "charLength": 6, + "snippet": { + "text": "return" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1587, + "startColumn": 1, + "charOffset": 47174, + "charLength": 32, + "snippet": { + "text": "\t\tgetchar();\r\n\t}\r\n\treturn;\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "02147ae4f255b6f8", + "equalIndicator/v1": "56913809ea79e4f32e6a3fb901e02f28f2c3c412354e672c25e2f511ac3403df" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1101, + "startColumn": 49, + "charOffset": 35993, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1099, + "startColumn": 1, + "charOffset": 35940, + "charLength": 206, + "snippet": { + "text": "}\r\n\r\nbool Combat::doCombat(std::shared_ptr caster, const Position &position) const {\r\n\tif (caster != nullptr && params.chainCallback) {\r\n\t\treturn doCombatChain(caster, caster, params.aggressive);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "60d4b23fe045f368", + "equalIndicator/v1": "5696bd70339aec1c6118178c5bb045d47e97ac9ad91e5338988ffb16329c8d45" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 685, + "startColumn": 20, + "charOffset": 20518, + "charLength": 22, + "snippet": { + "text": "std::hash" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 683, + "startColumn": 1, + "charOffset": 20460, + "charLength": 132, + "snippet": { + "text": "\r\n\t// className.metatable['h'] = hash\r\n\tlua_pushnumber(L, std::hash()(className));\r\n\tlua_rawseti(L, metatable, 'h');\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e996bae86c5767ca", + "equalIndicator/v1": "56a8c344e6d8a2705ed01f433e01b6b4932d4bcec4ebb97dcfd040b97c884fc0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 322, + "startColumn": 18, + "charOffset": 9085, + "charLength": 21, + "snippet": { + "text": "getElementDamageValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 320, + "startColumn": 1, + "charOffset": 9041, + "charLength": 96, + "snippet": { + "text": "\t\treturn elementType;\r\n\t}\r\n\tvirtual int16_t getElementDamageValue() const override;\r\n\r\nprivate:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "514097b64ee535c0", + "equalIndicator/v1": "56b5b82f07383ddc3e5fca59062d3c2b4d14a246f8db1ffb01eec67a059a4909" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1493, + "startColumn": 51, + "charOffset": 45615, + "charLength": 8, + "snippet": { + "text": "interval" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1491, + "startColumn": 1, + "charOffset": 45496, + "charLength": 183, + "snippet": { + "text": "\twhile (it != end) {\r\n\t\tstd::shared_ptr condition = *it;\r\n\t\tif (!condition->executeCondition(getCreature(), interval)) {\r\n\t\t\tConditionType_t type = condition->getType();\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f2312085b46d24fa", + "equalIndicator/v1": "570fcdafea3868399476e3804c20300340d5484506e08cf69d90f2ce01b1a969" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: m_value", + "markdown": "Constructor does not initialize these fields: m_value" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 214, + "startColumn": 11, + "charOffset": 6500, + "charLength": 29, + "snippet": { + "text": "GemModifierRevelationStrategy" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 212, + "startColumn": 1, + "charOffset": 6413, + "charLength": 260, + "snippet": { + "text": "class GemModifierRevelationStrategy : public GemModifierStrategy {\r\npublic:\r\n\texplicit GemModifierRevelationStrategy(PlayerWheel &wheel, WheelGemAffinity_t affinity, [[maybe_unused]] uint16_t value) :\r\n\t\tGemModifierStrategy(wheel),\r\n\t\tm_affinity(affinity) { }\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4aaa2e9c9cefa346", + "equalIndicator/v1": "5711f49998254f7fc9a210231eaec0bc0eb459befaa3d80734be5755448e262e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 365, + "startColumn": 108, + "charOffset": 10537, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 363, + "startColumn": 1, + "charOffset": 10425, + "charLength": 284, + "snippet": { + "text": "}\r\n\r\nvoid House::handleWrapableItem(ItemList &moveItemList, std::shared_ptr item, std::shared_ptr player, std::shared_ptr houseTile) const {\r\n\tif (item->isWrapContainer()) {\r\n\t\tg_logger().debug(\"[{}] found wrapable item '{}'\", __FUNCTION__, item->getName());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "651b35710a81e8e7", + "equalIndicator/v1": "57173845b53dda9263e63191b77e0bf2bb87d7a78e2a3234b28538dd102ab7e4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5671, + "startColumn": 49, + "charOffset": 167680, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5669, + "startColumn": 1, + "charOffset": 167627, + "charLength": 153, + "snippet": { + "text": "}\r\n\r\nbool Player::isInviting(std::shared_ptr player) const {\r\n\tif (!player || !m_party || m_party->getLeader().get() != this) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb42d3a26dbcdf81", + "equalIndicator/v1": "571f5c4a8c5303cc5b23d0230e7d36d8b64bab1aa366c5647237369695d13778" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 78, + "startColumn": 10, + "charOffset": 2102, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 76, + "startColumn": 1, + "charOffset": 2015, + "charLength": 175, + "snippet": { + "text": "\tfloat getMitigation() const override;\r\n\tint32_t getArmor() const override {\r\n\t\treturn mType->info.armor * getDefenseMultiplier();\r\n\t}\r\n\tint32_t getDefense() const override {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d732cdb3edbd9727", + "equalIndicator/v1": "5740824de7556c13a34fc5c3e286323eeeaed76c155556469e5cb17586ecc727" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Switch has 2 consecutive identical branches", + "markdown": "Switch has 2 consecutive identical branches" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 216, + "startColumn": 3, + "charOffset": 6417, + "charLength": 4, + "snippet": { + "text": "case" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 214, + "startColumn": 1, + "charOffset": 6372, + "charLength": 183, + "snippet": { + "text": "\t\t\tfieldCheck = \"player_guid\";\r\n\t\t\tbreak;\r\n\t\tcase HighscoreCategories_t::DROME:\r\n\t\t\t// todo check if player is in the top 5 for the previous rota of the Tibiadrome.\r\n\t\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eea903d72771759c", + "equalIndicator/v1": "57437ff658eda71e4b1bbffc59077154dbed007b399c8bb241a31e23774f4639" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1137, + "startColumn": 58, + "charOffset": 40696, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1135, + "startColumn": 1, + "charOffset": 40634, + "charLength": 286, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) {\r\n\t// Player:onCombat(target, item, primaryDamage, primaryType, secondaryDamage, secondaryType)\r\n\tif (info.playerOnCombat == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7454487884653b87", + "equalIndicator/v1": "575394b2725e8c939b922ced031b154370e9abcaf27cc5da116e0f5e1938912f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 125, + "startColumn": 11, + "charOffset": 3575, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 123, + "startColumn": 1, + "charOffset": 3477, + "charLength": 153, + "snippet": { + "text": "\tpugi::xml_attribute delayAttribute = node.attribute(\"delay\");\r\n\tif (delayAttribute) {\r\n\t\tdelay = static_cast(delayAttribute.as_uint());\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "072d56a36ce282c4", + "equalIndicator/v1": "575886a6491325f225f60cdf768f0aeafa4a551300d981c83bb7ac52067503ae" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1395, + "startColumn": 73, + "charOffset": 48105, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1393, + "startColumn": 1, + "charOffset": 48028, + "charLength": 240, + "snippet": { + "text": "}\r\n\r\n[[maybe_unused]] void Combat::doCombatDefault(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms) {\r\n\tdoCombatDefault(caster, target, caster ? caster->getPosition() : Position(), params);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2a74db57fff783ae", + "equalIndicator/v1": "57610519b71aba1db7595a1477281040ee7e7ffc19195f39f6a9db2527a16faa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 235, + "startColumn": 24, + "charOffset": 7207, + "charLength": 7, + "snippet": { + "text": "getItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 233, + "startColumn": 1, + "charOffset": 7126, + "charLength": 148, + "snippet": { + "text": "\tbool equals(std::shared_ptr compareItem) const;\r\n\r\n\tstd::shared_ptr getItem() override final {\r\n\t\treturn static_self_cast();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d3a18068347b6a14", + "equalIndicator/v1": "57870e8ea6bf629439aba78fc98b2a5c69e45043b85c2e9aff8d4a481318511b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The 'empty' method should be used to check for emptiness instead of 'size'", + "markdown": "The 'empty' method should be used to check for emptiness instead of 'size'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 399, + "startColumn": 71, + "charOffset": 12130, + "charLength": 12, + "snippet": { + "text": "getContainer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 397, + "startColumn": 1, + "charOffset": 12039, + "charLength": 198, + "snippet": { + "text": "\t\treturn false;\r\n\t}\r\n\tauto isContainerAndHasSomethingInside = (getContainer() != NULL) && (getContainer()->getItemList().size() > 0);\r\n\treturn (isStowable() || isContainerAndHasSomethingInside);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dee2e5f40397a5d3", + "equalIndicator/v1": "57e565168521cd3d7fa404a469f2c8ad2e44bbc005c2d3e25786a2ed6ddd84de" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 362, + "startColumn": 7, + "charOffset": 10341, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 360, + "startColumn": 1, + "charOffset": 10200, + "charLength": 338, + "snippet": { + "text": "bool CombatSpell::executeCastSpell(std::shared_ptr creature, const LuaVariant &var) const {\r\n\t// onCastSpell(creature, var)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[CombatSpell::executeCastSpell - Creature {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "664f7ad596ed7c60", + "equalIndicator/v1": "58273ac349554715587350030eecb784d75f78177939d1710ebcae660ae382bb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'func' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'func' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1122, + "startColumn": 188, + "charOffset": 36851, + "charLength": 4, + "snippet": { + "text": "func" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1120, + "startColumn": 1, + "charOffset": 36659, + "charLength": 269, + "snippet": { + "text": "}\r\n\r\nvoid Combat::CombatFunc(std::shared_ptr caster, const Position &origin, const Position &pos, const std::unique_ptr &area, const CombatParams ¶ms, CombatFunction func, CombatDamage* data) {\r\n\tstd::vector> tileList;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4e59325ffe0a74aa", + "equalIndicator/v1": "5851dfff41eee90a4db498d585a08e3528a2642d90ab2c5ececf9ea0e3651395" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 536, + "startColumn": 35, + "charOffset": 17903, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 534, + "startColumn": 1, + "charOffset": 17814, + "charLength": 151, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, fromPosition);\r\n\r\n\tLuaScriptInterface::pushThing(L, target);\r\n\tLuaScriptInterface::pushPosition(L, toPosition);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eae5e0510b5e542d", + "equalIndicator/v1": "5874c2339379030cddc83b57873f4eec275d2bdb16d6fe570d7b60b61fb00795" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1234, + "startColumn": 27, + "charOffset": 44008, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1232, + "startColumn": 1, + "charOffset": 43976, + "charLength": 135, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnRequestQuestLine, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "faeee4f742cf88b5", + "equalIndicator/v1": "5877f0f54fda61ef4933b9a5dce8914604d9224b75058eba712bd93cd4f13a8f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6068, + "startColumn": 62, + "charOffset": 193164, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6066, + "startColumn": 1, + "charOffset": 193098, + "charLength": 201, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureSay(std::shared_ptr creature, SpeakClasses type, const std::string &text, const Position* pos /* = nullptr*/) {\r\n\tNetworkMessage msg;\r\n\tmsg.addByte(0xAA);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e8d81fea1dca1606", + "equalIndicator/v1": "587a83f56de5740728a35499f73d2461e115c1ff89f32a3126e9506dfefa17d9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6172, + "startColumn": 50, + "charOffset": 213291, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6170, + "startColumn": 1, + "charOffset": 213237, + "charLength": 220, + "snippet": { + "text": "}\r\n\r\nbool Game::playerSpeakTo(std::shared_ptr player, SpeakClasses type, const std::string &receiver, const std::string &text) {\r\n\tstd::shared_ptr toPlayer = getPlayerByName(receiver);\r\n\tif (!toPlayer) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9bbf6fd17f7a0bfd", + "equalIndicator/v1": "588008e7bf993a2a3eb0020a461cad24cecd9cf71baf7910f382dd8ad12b797e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 791, + "startColumn": 21, + "charOffset": 25681, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 789, + "startColumn": 1, + "charOffset": 25609, + "charLength": 210, + "snippet": { + "text": "\tfloat attackFactor = player->getAttackFactor();\r\n\r\n\tint32_t minValue = std::round(player->getLevel() / 5);\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue) / 2;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5e7f382fbf862dcd", + "equalIndicator/v1": "58849d8ba7db424274230e7acb0b6294442f5699ff7041b6226de7449d6406c2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1680, + "startColumn": 11, + "charOffset": 50057, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1678, + "startColumn": 1, + "charOffset": 50005, + "charLength": 74, + "snippet": { + "text": "\t\t\treturn \"Unassigned Loot\";\r\n\t\tdefault:\r\n\t\t\treturn std::string();\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ba05d67982d0e881", + "equalIndicator/v1": "58a1d162d5c8e450289693ec26fba4813920331aad9c4f13b521460694402d0f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 119, + "startColumn": 16, + "charOffset": 3778, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 117, + "startColumn": 1, + "charOffset": 3758, + "charLength": 217, + "snippet": { + "text": "}\r\n\r\nvoid Teleport::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tgetParent()->postAddNotification(thing, oldParent, index, LINK_PARENT);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "293fa8b33a70ea2b", + "equalIndicator/v1": "58b23a79185a1cbd832ebe9f9b74c4fa85b8145e3e6f356299a9b6c8b1dc1fc4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 508, + "startColumn": 33, + "charOffset": 14621, + "charLength": 9, + "snippet": { + "text": "spectator" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 506, + "startColumn": 1, + "charOffset": 14568, + "charLength": 170, + "snippet": { + "text": "\r\n\t// event methods\r\n\tfor (std::shared_ptr spectator : spectators) {\r\n\t\tspectator->onRemoveTileItem(static_self_cast(), cylinderMapPos, iType, item);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8f297ffabbf1ad4e", + "equalIndicator/v1": "58c39645124c40c0e31b15a8f53283898f7409a6f092d5b6a107c1b5a2f907f6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7560, + "startColumn": 108, + "charOffset": 263613, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7558, + "startColumn": 1, + "charOffset": 263463, + "charLength": 282, + "snippet": { + "text": "// Mana leech\r\nvoid Game::applyManaLeech(\r\n\tstd::shared_ptr attackerPlayer, std::shared_ptr targetMonster, std::shared_ptr target, const CombatDamage &damage, const int32_t &realDamage\r\n) const {\r\n\t// Wheel of destiny bonus - mana leech chance and amount\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f0b4ec0bacdd28b2", + "equalIndicator/v1": "58d0f88862a13e514ef7bb22be1e7ff9cb2aae02203deb311f5d022db37d2929" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 578, + "startColumn": 13, + "charOffset": 27346, + "charLength": 13, + "snippet": { + "text": "absorbPercent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 576, + "startColumn": 1, + "charOffset": 27184, + "charLength": 353, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += value;\r\n\t} else if (stringValue == \"absorbpercentenergy\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e32b35e7149bd992", + "equalIndicator/v1": "58e43a38813433557541236850e2da3af1d322c9de176ac720bb6dd0362760a1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 139, + "startColumn": 8, + "charOffset": 4176, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 137, + "startColumn": 1, + "charOffset": 4060, + "charLength": 317, + "snippet": { + "text": "\t\t// onCreatureAppear(self, creature)\r\n\t\tLuaScriptInterface* scriptInterface = mType->info.scriptInterface;\r\n\t\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\t\tg_logger().error(\"[Monster::onCreatureAppear - Monster {} creature {}] \"\r\n\t\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dea42bd8677ba618", + "equalIndicator/v1": "592a71f2a0eb4f0d461a99b7d81848bb63556c6f0aedf6573c5e9998cdb6a449" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 571, + "startColumn": 37, + "charOffset": 15396, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 569, + "startColumn": 1, + "charOffset": 15331, + "charLength": 145, + "snippet": { + "text": "\r\n\t\t\tcase STAT_MAGICPOINTS:\r\n\t\t\t\tstats[i] = static_cast(player->getBaseMagicLevel() * ((statsPercent[i] - 100) / 100.f));\r\n\t\t\t\tbreak;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e1aae118837cbcae", + "equalIndicator/v1": "594416bc6c234c82536838ea012f18ffa917ff0e2e584dcd640c199c77b8f4b4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 16, + "startColumn": 19, + "charOffset": 560, + "charLength": 13, + "snippet": { + "text": "getThingIndex" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 14, + "startColumn": 1, + "charOffset": 434, + "charLength": 188, + "snippet": { + "text": "std::shared_ptr VirtualCylinder::virtualCylinder = std::make_shared();\r\n\r\nint32_t Cylinder::getThingIndex(std::shared_ptr) const {\r\n\treturn -1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "37eaf2cdb9dc01c7", + "equalIndicator/v1": "594702255ccd12ab75a15cf5915b38eadf337bfa26d185aade5f6fc537e860ea" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7934, + "startColumn": 90, + "charOffset": 240490, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7932, + "startColumn": 1, + "charOffset": 240396, + "charLength": 190, + "snippet": { + "text": "}\r\n\r\nvoid Player::parseAttackDealtHazardSystem(CombatDamage &damage, std::shared_ptr monster) {\r\n\tif (!g_configManager().getBoolean(TOGGLE_HAZARDSYSTEM, __FUNCTION__)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6d3e208cb5390997", + "equalIndicator/v1": "595732069b8bff64c98a77c18918939737419fd6f0a68a5bade7de7f3d4f2d7b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::_Tree, std::allocator>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::_Tree, std::allocator\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 912, + "startColumn": 58, + "charOffset": 27826, + "charLength": 1, + "snippet": { + "text": "0" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 910, + "startColumn": 1, + "charOffset": 27763, + "charLength": 176, + "snippet": { + "text": "\t}\r\n\r\n\tlua_createtable(L, monsterType->info.elementMap.size(), 0);\r\n\tfor (const auto &elementEntry : monsterType->info.elementMap) {\r\n\t\tlua_pushnumber(L, elementEntry.second);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4f0f26a3dc0746b6", + "equalIndicator/v1": "595789c0b1edcc3d098e26724c80dadb876431252a4744abef65d13530da012c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 567, + "startColumn": 21, + "charOffset": 18570, + "charLength": 5, + "snippet": { + "text": "level" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 565, + "startColumn": 1, + "charOffset": 18376, + "charLength": 226, + "snippet": { + "text": "\tint32_t maxValue = static_cast(Weapons::getMaxWeaponDamage(level, attackSkill, attackValue, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\r\n\r\n\tint32_t minValue = level / 5;\r\n\r\n\tif (maxDamage) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "772670a2f71ce689", + "equalIndicator/v1": "5994bcd6f732215c991cd055c7ecf88c00e3c5dc73c05f2928d9a9b255c20e9a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 146, + "startColumn": 28, + "charOffset": 4478, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 144, + "startColumn": 1, + "charOffset": 4444, + "charLength": 140, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\t\tenv->setScriptId(mType->info.creatureAppearEvent, scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "82471a51e97f7925", + "equalIndicator/v1": "59b7690a3da973dfd4683a67853f671618d909c4681bbb42cc99033eb5526337" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'long double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'long double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6092, + "startColumn": 82, + "charOffset": 179338, + "charLength": 12, + "snippet": { + "text": "nextReqTries" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6090, + "startColumn": 1, + "charOffset": 179142, + "charLength": 242, + "snippet": { + "text": "\t\tif (nextReqTries > currReqTries) {\r\n\t\t\tnewPercent = Player::getPercentLevel(skills[skill].tries, nextReqTries);\r\n\t\t\tnewPercentToNextLevel = static_cast(skills[skill].tries * 100) / nextReqTries;\r\n\t\t} else {\r\n\t\t\tnewPercent = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "432c951bcce0a220", + "equalIndicator/v1": "59bebfed42b33bb8219efadb8a0b82750d6f61fed909726d2cc641bf05300a77" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6840, + "startColumn": 25, + "charOffset": 236671, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6838, + "startColumn": 1, + "charOffset": 236517, + "charLength": 298, + "snippet": { + "text": "\tfloat pvpDamageMultiplier = targetDamageReceivedMultiplier * attackerDamageDealtMultiplier * levelDifferenceDamageMultiplier;\r\n\r\n\tdamage.primary.value = std::round(damage.primary.value * pvpDamageMultiplier);\r\n\tdamage.secondary.value = std::round(damage.secondary.value * pvpDamageMultiplier);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dada756f615dfc61", + "equalIndicator/v1": "59f511fa5ea3ce8267189511ae134150541fc0e70f35710fc9afeac071c9f32c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'target' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'target' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 502, + "startColumn": 25, + "charOffset": 27074, + "charLength": 31, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 500, + "startColumn": 1, + "charOffset": 27018, + "charLength": 264, + "snippet": { + "text": "\r\n\t// Animation help functions\r\n\tvoid addCreatureHealth(const std::shared_ptr target);\r\n\tstatic void addCreatureHealth(const CreatureVector &spectators, const std::shared_ptr target);\r\n\tvoid addPlayerMana(const std::shared_ptr target);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3ecef3bfbc1dd613", + "equalIndicator/v1": "59f84e60b28e4c03fab378791ceb8c1bce026696d6bcc408539e8d00c07bf0c5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1215, + "startColumn": 98, + "charOffset": 46358, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1213, + "startColumn": 1, + "charOffset": 46256, + "charLength": 235, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::zoneAfterCreatureLeave(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneAfterCreatureLeave - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "429012f7050e8a83", + "equalIndicator/v1": "5a115056e795994f4c17db6ccce51143798fc687342d839f03ed1946b7e24bc3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 348, + "startColumn": 115, + "charOffset": 12975, + "charLength": 5, + "snippet": { + "text": "thing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 346, + "startColumn": 1, + "charOffset": 12856, + "charLength": 279, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnLook(std::shared_ptr player, const Position &position, std::shared_ptr thing, uint8_t stackpos, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLook - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3826eeab5e60d7e7", + "equalIndicator/v1": "5a587c48a5f422b9ce3dfbcffbb74d3e66c499a4516d0118ebba40500bd218ed" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1872, + "startColumn": 21, + "charOffset": 64774, + "charLength": 5, + "snippet": { + "text": "input" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1870, + "startColumn": 1, + "charOffset": 64680, + "charLength": 173, + "snippet": { + "text": "\t\tfor (uint32_t y = 0; y < input->getRows(); ++y) {\r\n\t\t\tuint32_t rx = 0;\r\n\t\t\tfor (int32_t x = input->getCols(); --x >= 0;) {\r\n\t\t\t\t(*output)[y][rx++] = (*input)[y][x];\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "68a5702f2abce001", + "equalIndicator/v1": "5a63943b3d42294bb4e86d509c6fcfa68a9dee3611ad2cc833f80f5b1784449f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 64, + "startColumn": 55, + "charOffset": 1726, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 62, + "startColumn": 1, + "charOffset": 1667, + "charLength": 196, + "snippet": { + "text": "}\r\n\r\nbool WaitingList::clientLogin(std::shared_ptr player) {\r\n\tif (player->hasFlag(PlayerFlags_t::CanAlwaysLogin) || player->getAccountType() >= ACCOUNT_TYPE_GAMEMASTER) {\r\n\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cea3c5d390bd8b98", + "equalIndicator/v1": "5a6e48e9c53db30d935d8a9e0a52e5b446334c44601ad1096fda688fb4bc1872" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 254, + "startColumn": 22, + "charOffset": 6791, + "charLength": 5, + "snippet": { + "text": "regen" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 252, + "startColumn": 1, + "charOffset": 6667, + "charLength": 198, + "snippet": { + "text": "\r\n\t\tplayer->changeHealth(regen * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__), false);\r\n\t\tplayer->changeMana(regen * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__));\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c8b5093a106586b1", + "equalIndicator/v1": "5a7541f2f12e80adc4ce3607d1e40af523bf815c15570dd7f2641b4d05ba3820" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'", + "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7729, + "startColumn": 21, + "charOffset": 242479, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7727, + "startColumn": 1, + "charOffset": 242354, + "charLength": 226, + "snippet": { + "text": "\t\tmsg.add(player->getBaseMagicLevel());\r\n\t\tmsg.add(player->getLoyaltyMagicLevel());\r\n\t\tmsg.add(player->getMagicLevelPercent() * 100);\r\n\r\n\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; ++i) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e890f52b1d38acf8", + "equalIndicator/v1": "5af111dd317419de203086cafbf6d0d096b63acab19ab49bd0a6b6dea000883f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Result of integer division used in a floating point context; possible loss of precision", + "markdown": "Result of integer division used in a floating point context; possible loss of precision" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 219, + "startColumn": 32, + "charOffset": 7522, + "charLength": 4, + "snippet": { + "text": "37.5" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 217, + "startColumn": 1, + "charOffset": 7402, + "charLength": 241, + "snippet": { + "text": "\t\treturn static_cast(25 + bossPoints / 10);\r\n\t} else if (bossPoints < 1250) {\r\n\t\treturn static_cast(37.5 + bossPoints / 20);\r\n\t}\r\n\treturn static_cast(100 + 0.5 * (sqrt(8 * ((bossPoints - 1250) / 5) + 81) - 9));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "be343788d799a679", + "equalIndicator/v1": "5afaa106138b05462db332f6b03e75890922365d8129f02649cbea47c6eb5365" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2698, + "startColumn": 14, + "charOffset": 79523, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2696, + "startColumn": 1, + "charOffset": 79478, + "charLength": 486, + "snippet": { + "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "24ae7a52010df60a", + "equalIndicator/v1": "5b1c4743ccea194eaf4f1c8eb2298ebdb2e81cb6f47984030599c341083675ad" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 869, + "startColumn": 7, + "charOffset": 31536, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 867, + "startColumn": 1, + "charOffset": 31524, + "charLength": 151, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnReportRuleViolation - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1c333825a8695bc9", + "equalIndicator/v1": "5b2b1701bce81ca8a3b8c66a6df8656733816f4ac8a01db002fa8d41d10b02f4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'key' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'key' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 522, + "startColumn": 23, + "charOffset": 14084, + "charLength": 14, + "snippet": { + "text": "const uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 520, + "startColumn": 1, + "charOffset": 14014, + "charLength": 195, + "snippet": { + "text": "\tbool canOpenCorpse(uint32_t ownerId) const;\r\n\r\n\tvoid addStorageValue(const uint32_t key, const int32_t value, const bool isLogin = false);\r\n\tint32_t getStorageValue(const uint32_t key) const;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ee2f3ef789a87b58", + "equalIndicator/v1": "5b493a4b6aec0be3ed23fd54adaf2b5cd6072ac0633bee94304ac681f8334716" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1682, + "startColumn": 4, + "charOffset": 50027, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1680, + "startColumn": 1, + "charOffset": 49953, + "charLength": 198, + "snippet": { + "text": "\t\t} else if (outfitType == 2) {\r\n\t\t\tPosition pos = msg.getPosition();\r\n\t\t\tuint16_t itemId = msg.get();\r\n\t\t\tuint8_t stackpos = msg.getByte();\r\n\t\t\tnewOutfit.lookMount = msg.get();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7822a32cab326cf5", + "equalIndicator/v1": "5b863b853241c0a20e409909c59387f7d080d132f4d241c78c7c359d1f906ba3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 527, + "startColumn": 20, + "charOffset": 18797, + "charLength": 3, + "snippet": { + "text": "exp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 525, + "startColumn": 1, + "charOffset": 18724, + "charLength": 134, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Party\");\r\n\r\n\tlua_pushnumber(L, exp);\r\n\r\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "74a3da5abd9c3b4c", + "equalIndicator/v1": "5b955e1bd8c4b8e0316ca4bd2696dad809e2e4fa5ca46c136a5065ce395f5032" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1812, + "startColumn": 2, + "charOffset": 62947, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1810, + "startColumn": 1, + "charOffset": 62940, + "charLength": 62, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface->resetScriptEnv();\r\n\treturn result;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e35bd094a0a863fe", + "equalIndicator/v1": "5bd1216cd4e208d74b70a422fbd623b7ff62712d33bd6b30c93a2b4cd335db83" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 547, + "startColumn": 38, + "charOffset": 20879, + "charLength": 12, + "snippet": { + "text": "fromCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 545, + "startColumn": 1, + "charOffset": 20789, + "charLength": 158, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, toPosition);\r\n\r\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\r\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "16c28aa006699056", + "equalIndicator/v1": "5bd5e5aa12334d6dc0183ac45e54626f94e7d07b456d23f33771de9dda2910f3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/creaturecallback.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 30, + "startColumn": 46, + "charOffset": 945, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 28, + "startColumn": 1, + "charOffset": 894, + "charLength": 136, + "snippet": { + "text": "\t}\r\n\r\n\tvoid pushCreature(std::shared_ptr creature) {\r\n\t\tparams++;\r\n\t\tLuaScriptInterface::pushUserdata(L, creature);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0c41c6a38285247c", + "equalIndicator/v1": "5c052f251f8927b54d2cb3eba70f93bde3aef09977ae8919cb9a5be08de42c3f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 244, + "startColumn": 7, + "charOffset": 7933, + "charLength": 9, + "snippet": { + "text": "isRemoved" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 242, + "startColumn": 1, + "charOffset": 7921, + "charLength": 62, + "snippet": { + "text": "\t}\r\n\r\n\tbool isRemoved() override final {\r\n\t\treturn false;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a85896805723b772", + "equalIndicator/v1": "5c0a7ff9db4bce8bfee22eee9c1917317cbe11c10e0d13566681e8d728a657dd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 370, + "startColumn": 4, + "charOffset": 12262, + "charLength": 87, + "snippet": { + "text": "case COMBAT_HOLYDAMAGE:\r\n\t\t\t\tdefaultMap[5] -= static_cast(elementEntry.second)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 368, + "startColumn": 1, + "charOffset": 12182, + "charLength": 210, + "snippet": { + "text": "\t\t\t\tdefaultMap[4] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_HOLYDAMAGE:\r\n\t\t\t\tdefaultMap[5] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_DEATHDAMAGE:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0ca4a693ca0980a7", + "equalIndicator/v1": "5c42d954d23af57e61b28c5920024c9d9d36d52ceca7d140c32ca9dcff9027ba" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1141, + "startColumn": 25, + "charOffset": 34251, + "charLength": 15, + "snippet": { + "text": "getTopItemCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1139, + "startColumn": 1, + "charOffset": 34156, + "charLength": 182, + "snippet": { + "text": "\tTileItemVector* items = getItemList();\r\n\tif (items && !isInserted) {\r\n\t\tint32_t topItemSize = getTopItemCount();\r\n\t\tif (pos < topItemSize) {\r\n\t\t\tauto it = items->getBeginTopItem();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1566578a79253a99", + "equalIndicator/v1": "5c51ce46063d0b7bde800c839641d99ecbf776493f4be44abc2ea88ddcee2c22" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/shop_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 131, + "startColumn": 38, + "charOffset": 3692, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 129, + "startColumn": 1, + "charOffset": 3564, + "charLength": 191, + "snippet": { + "text": "\t// shop:setStorageValue(value)\r\n\tif (const auto &shop = getUserdataShared(L, 1)) {\r\n\t\tshop->shopBlock.itemStorageValue = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "595d853127aace99", + "equalIndicator/v1": "5c60f930b6ca15338ddcbd3589b878ad58f95de7a3fcf2e195fb5eecf8fe73bc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 158, + "startColumn": 22, + "charOffset": 4788, + "charLength": 5, + "snippet": { + "text": "level" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 156, + "startColumn": 1, + "charOffset": 4547, + "charLength": 314, + "snippet": { + "text": "\t// Calculating damage\r\n\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(level, playerSkill, totalAttack, attackFactor, true) * player->getVocation()->meleeDamageMultiplier * damageModifier / 100);\r\n\tint32_t minDamage = level / 5;\r\n\tint32_t realDamage = normal_random(minDamage, maxDamage);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a2e6013d4ac299e1", + "equalIndicator/v1": "5c6d326ca21362d19151482061c55c7ba5715e604d9f4f6d7441ea0b281fe48b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')", + "markdown": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5775, + "startColumn": 94, + "charOffset": 170676, + "charLength": 8, + "snippet": { + "text": "std::max" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5773, + "startColumn": 1, + "charOffset": 170501, + "charLength": 287, + "snippet": { + "text": "\t\t\tskullDuration = std::floor(skullTicks / (24 * 60 * 60 * 1000));\r\n\t\t}\r\n\t\tclient->sendUnjustifiedPoints(dayProgress, std::max(dayMax - dayKills, 0.0), weekProgress, std::max(weekMax - weekKills, 0.0), monthProgress, std::max(monthMax - monthKills, 0.0), skullDuration);\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "be91f90417619370", + "equalIndicator/v1": "5c78d6702e9ebe658f318053dfae306be382a0bfa999e87cea96a8f124ab01d9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use nullptr", + "markdown": "Use nullptr" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 93, + "startColumn": 21, + "charOffset": 2979, + "charLength": 1, + "snippet": { + "text": "0" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 91, + "startColumn": 1, + "charOffset": 2860, + "charLength": 258, + "snippet": { + "text": "\tstd::shared_ptr player = g_game().getPlayerByName(receiver, true);\r\n\tstd::string writer;\r\n\ttime_t date = time(0);\r\n\tstd::string text;\r\n\tif (item && item->getID() == ITEM_LETTER && !item->getAttribute(ItemAttribute_t::WRITER).empty()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "461c06188411a029", + "equalIndicator/v1": "5c938b2db48b413823d401cb4225b6228b8f96829a801f0870aa3f2e4ad8bed6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2139, + "startColumn": 56, + "charOffset": 72202, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2137, + "startColumn": 1, + "charOffset": 72142, + "charLength": 284, + "snippet": { + "text": "}\r\n\r\nvoid Combat::applyExtensions(std::shared_ptr caster, std::shared_ptr target, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (damage.extension || !caster || damage.primary.type == COMBAT_HEALING) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "acbf12c15dd7cb88", + "equalIndicator/v1": "5ca1238a5ab32c8c000b7f6381cfed664773e5545c91174b8911f9cc0157a02e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 158, + "startColumn": 11, + "charOffset": 5124, + "charLength": 16, + "snippet": { + "text": "getItemTypeCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 156, + "startColumn": 1, + "charOffset": 5021, + "charLength": 365, + "snippet": { + "text": "\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::map &getAllItemTypeCount(std::map &countMap) const override final;\r\n\tstd::shared_ptr getThing(size_t index) const override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "24cc1db14c66aae3", + "equalIndicator/v1": "5cc1ff9a34acb68ffee90660fcc604eaab0a46f14c0941316621b54a5161b5c3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 159, + "startColumn": 41, + "charOffset": 5648, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 157, + "startColumn": 1, + "charOffset": 5602, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b61a4784d7600a59", + "equalIndicator/v1": "5cda7a9d7979e3b1f3143283d94c9b184c42fd1df821ccf2a11a97deb0c17f31" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 84, + "startColumn": 93, + "charOffset": 2410, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 82, + "startColumn": 1, + "charOffset": 2313, + "charLength": 239, + "snippet": { + "text": "}\r\n\r\nint32_t Weapon::playerWeaponCheck(std::shared_ptr player, std::shared_ptr target, uint8_t shootRange) const {\r\n\tconst Position &playerPos = player->getPosition();\r\n\tconst Position &targetPos = target->getPosition();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "714559f52c93104e", + "equalIndicator/v1": "5ce7560c77b00e66f9186a47240ec66d233c1f1adec9850b1ad57766f28bf061" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 430, + "startColumn": 7, + "charOffset": 15405, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 428, + "startColumn": 1, + "charOffset": 15393, + "charLength": 135, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPartyOnJoin - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5f41033028c623a8", + "equalIndicator/v1": "5cf3fce5a3c1c3a817443bcfb8ce5eaa37ec7340613566c7d0668b5cb96964c5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 275, + "startColumn": 51, + "charOffset": 9116, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 273, + "startColumn": 1, + "charOffset": 9061, + "charLength": 209, + "snippet": { + "text": "}\r\n\r\nvoid Weapon::onUsedWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr destTile) const {\r\n\tif (!player->hasFlag(PlayerFlags_t::NotGainSkill)) {\r\n\t\tskills_t skillType;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a9ec957c5b694ad0", + "equalIndicator/v1": "5cf65364ff8514c60a8d01b5e480695d1b3fae76cf4f4fa62e17f4ebe43ff950" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 528, + "startColumn": 58, + "charOffset": 15831, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 526, + "startColumn": 1, + "charOffset": 15769, + "charLength": 147, + "snippet": { + "text": "}\r\n\r\nbool Spell::playerRuneSpellCheck(std::shared_ptr player, const Position &toPos) {\r\n\tif (!playerSpellCheck(player)) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a6fde91b62db1564", + "equalIndicator/v1": "5d313416b78f1d16c17d0397ec6cbc261040fffe083a7f0f3b51241d734072e8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'npc' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'npc' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 207, + "startColumn": 43, + "charOffset": 7549, + "charLength": 3, + "snippet": { + "text": "npc" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 205, + "startColumn": 1, + "charOffset": 7456, + "charLength": 198, + "snippet": { + "text": "\tscriptInterface.pushFunction(info.npcOnSpawn);\r\n\r\n\tLuaScriptInterface::pushUserdata(L, npc);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Npc\");\r\n\tLuaScriptInterface::pushPosition(L, position);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "87131fdb43d8a598", + "equalIndicator/v1": "5d4629b67c2ac890b1f2567415e1a5dd0823d5e027dc4975f560c88607806ad9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 7, + "charOffset": 1814, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 1731, + "charLength": 389, + "snippet": { + "text": "\tvoid removeThing(std::shared_ptr thing, uint32_t count) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n};\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "01e2500a2a4419da", + "equalIndicator/v1": "5d64718d3d308cae387fca582e8ff33de395c23867faeb4e6ffede8fe7e45158" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 164, + "startColumn": 3, + "charOffset": 5315, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 162, + "startColumn": 1, + "charOffset": 5228, + "charLength": 302, + "snippet": { + "text": "\t\tstd::array vData = {};\r\n\t\tmemcpy(vData.data(), buffer + readPos, 8);\r\n\t\tfor (int32_t i = 0; i < 32; ++i) {\r\n\t\t\tvData[1] -= ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][0];\r\n\t\t\tvData[0] -= ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][1];\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3cc5033a483ebe94", + "equalIndicator/v1": "5db637c497f3a565509ec8b17a84de29413e8d864f0650026bcf8deadb7db22d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2130, + "startColumn": 2, + "charOffset": 65492, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2128, + "startColumn": 1, + "charOffset": 65385, + "charLength": 218, + "snippet": { + "text": "\tHighscoreType_t type = static_cast(msg.getByte());\r\n\tuint8_t category = msg.getByte();\r\n\tuint32_t vocation = msg.get();\r\n\tuint16_t page = 1;\r\n\tconst std::string worldName = msg.getString();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0bbe46ded7c3b69e", + "equalIndicator/v1": "5dc09ce09ec2a7dd630ff4ae9636caec23ab9bcba6deaa889dc344876fe2cb04" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3262, + "startColumn": 68, + "charOffset": 98583, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3260, + "startColumn": 1, + "charOffset": 98415, + "charLength": 274, + "snippet": { + "text": "\t\t\t\tif (rightItem->getSlotPosition() & SLOTP_TWO_HAND) {\r\n\t\t\t\t\tret = RETURNVALUE_DROPTWOHANDEDITEM;\r\n\t\t\t\t} else if (item == rightItem && count == item->getItemCount()) {\r\n\t\t\t\t\tret = RETURNVALUE_NOERROR;\r\n\t\t\t\t} else if (rightType == WEAPON_SHIELD && type == WEAPON_SHIELD) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fc6101b8053de2ae", + "equalIndicator/v1": "5dd76a9f2c0f68c2ed54c4fb96043a054e20bc72dc5c91ad14767bb7be812711" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 558, + "startColumn": 21, + "charOffset": 26189, + "charLength": 18, + "snippet": { + "text": "\"absorbpercentall\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 556, + "startColumn": 1, + "charOffset": 26002, + "charLength": 324, + "snippet": { + "text": "void ItemParse::parseAbsorbPercent(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\r\n\tstd::string stringValue = tmpStrValue;\r\n\tif (stringValue == \"absorbpercentall\") {\r\n\t\tint16_t value = pugi::cast(valueAttribute.value());\r\n\t\tAbilities &abilities = itemType.getAbilities();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "25b4e7f59c509397", + "equalIndicator/v1": "5dea9402bfce0478cca11e0fa06c8176492402a6fe12deea564b310f139e20c8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 348, + "startColumn": 10, + "charOffset": 11473, + "charLength": 6, + "snippet": { + "text": "health" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 346, + "startColumn": 1, + "charOffset": 11372, + "charLength": 115, + "snippet": { + "text": "int32_t Weapon::getHealthCost(std::shared_ptr player) const {\r\n\tif (health != 0) {\r\n\t\treturn health;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "66a5502140160188", + "equalIndicator/v1": "5e271821c5cbada739c1a1f3f4ec9f31b3b6fbf0367a7e25160239237b4f32e3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2333, + "startColumn": 26, + "charOffset": 80962, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2331, + "startColumn": 1, + "charOffset": 80848, + "charLength": 272, + "snippet": { + "text": "\tint32_t damageBonus = 0;\r\n\tuint8_t stage = getStage(WheelStage_t::EXECUTIONERS_THROW);\r\n\tint32_t healthPercent = std::round((static_cast(target->getHealth()) * 100) / static_cast(target->getMaxHealth()));\r\n\tif (healthPercent <= 30) {\r\n\t\tif (stage >= 3) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "00a35cc4c78e6eaa", + "equalIndicator/v1": "5e33e0522d72bd08fbc66407c0fb17ebb84cd13b00c7900bc016c0103094e1d7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 363, + "startColumn": 59, + "charOffset": 12462, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 361, + "startColumn": 1, + "charOffset": 12399, + "charLength": 155, + "snippet": { + "text": "}\r\n\r\nvoid SpawnMonster::removeMonster(std::shared_ptr monster) {\r\n\tuint32_t spawnMonsterId = 0;\r\n\tfor (const auto &[id, m] : spawnedMonsterMap) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "85aa61d5e2592161", + "equalIndicator/v1": "5e4868fd5fef5f377f87c78d31c2dc6b0c3ca2b6b478d845e191bb5ac6ce519c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/rewardchest.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 29, + "startColumn": 19, + "charOffset": 836, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 27, + "startColumn": 1, + "charOffset": 813, + "charLength": 204, + "snippet": { + "text": "}\r\n\r\nvoid RewardChest::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tauto parentLocked = m_parent.lock();\r\n\tif (parentLocked) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2e48c612f0b775fc", + "equalIndicator/v1": "5e716f4e38df88babeedee396b16ea1433fac8367121fde8a5d984422e1ce999" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tradePartner' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tradePartner' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4899, + "startColumn": 87, + "charOffset": 175188, + "charLength": 12, + "snippet": { + "text": "tradePartner" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4897, + "startColumn": 1, + "charOffset": 175097, + "charLength": 332, + "snippet": { + "text": "}\r\n\r\nbool Game::internalStartTrade(std::shared_ptr player, std::shared_ptr tradePartner, std::shared_ptr tradeItem) {\r\n\tif (player->tradeState != TRADE_NONE && !(player->tradeState == TRADE_ACKNOWLEDGE && player->tradePartner == tradePartner)) {\r\n\t\tplayer->sendCancelMessage(RETURNVALUE_YOUAREALREADYTRADING);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "01ceb3071fb2756e", + "equalIndicator/v1": "5e881fc856c76a51f8def15f9949b43d9e7ff1294460c45bdc417a871c3c23b2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 676, + "startColumn": 15, + "charOffset": 22144, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 674, + "startColumn": 1, + "charOffset": 22104, + "charLength": 134, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 104) * 0.70f) + 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6fa18c5ab6b9767b", + "equalIndicator/v1": "5e8ad01bb254b49d4eac340fb102d00ac32583d6611de4d43613d9531e14130f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly", + "markdown": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 103, + "startColumn": 60, + "charOffset": 3494, + "charLength": 12, + "snippet": { + "text": "__FUNCTION__" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 101, + "startColumn": 1, + "charOffset": 3350, + "charLength": 265, + "snippet": { + "text": "\t\t\t\tg_game().start(&serviceManager);\r\n\t\t\t\tg_game().setGameState(GAME_STATE_NORMAL);\r\n\t\t\t\tif (g_configManager().getBoolean(TOGGLE_MAINTAIN_MODE, __FUNCTION__)) {\r\n\t\t\t\t\tg_game().setGameState(GAME_STATE_CLOSED);\r\n\t\t\t\t\tg_logger().warn(\"Initialized in maintain mode!\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5974bec543f47942", + "equalIndicator/v1": "5e8b07f12ef5ccd8716ab1fc1bf49a79db091538dfddd759d9287b48d2b977d1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 14, + "charOffset": 1401, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 1297, + "charLength": 271, + "snippet": { + "text": "\tskull = mType->info.skull;\r\n\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();\r\n\tbaseSpeed = mType->getBaseSpeed();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1a000597b7acfff3", + "equalIndicator/v1": "5ea5ed13adfb6430f83d0fe2a6851ce53270f017dc9615305986aa0b5798e770" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Std::move of the const variable 'name' has no effect; remove std::move() or make the variable non-const", + "markdown": "Std::move of the const variable 'name' has no effect; remove std::move() or make the variable non-const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 24, + "startColumn": 16, + "charOffset": 711, + "charLength": 9, + "snippet": { + "text": "std::move" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 22, + "startColumn": 1, + "charOffset": 603, + "charLength": 180, + "snippet": { + "text": "\tVIPGroup() = default;\r\n\tVIPGroup(uint8_t id, const std::string &name, bool customizable) :\r\n\t\tid(id), name(std::move(name)), customizable(customizable) { }\r\n};\r\nclass PlayerVIP {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "82e6b203885f7edc", + "equalIndicator/v1": "5eafc660cf0da056db5d9e91a5941fe6f5a78a854402fe62eacb91b06990b0f6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Prefer a lambda to std::bind", + "markdown": "Prefer a lambda to std::bind" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 119, + "startColumn": 10, + "charOffset": 5112, + "charLength": 9, + "snippet": { + "text": "std::bind" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 117, + "startColumn": 1, + "charOffset": 4996, + "charLength": 243, + "snippet": { + "text": "\ttemplate \r\n\tauto bindMapFunction(Object object, Function function) {\r\n\t\treturn std::bind(function, object, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "075589323943450d", + "equalIndicator/v1": "5ec30f00bfc14cf6c36dae207e35a2eb4101e0205392b4587e4564ab2a0ce6b9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 154, + "startColumn": 62, + "charOffset": 4663, + "charLength": 6, + "snippet": { + "text": "action" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 152, + "startColumn": 1, + "charOffset": 4597, + "charLength": 252, + "snippet": { + "text": "}\r\n\r\nbool Actions::registerLuaEvent(const std::shared_ptr action) {\r\n\t// Call all register lua events\r\n\tif (registerLuaItemEvent(action) || registerLuaUniqueEvent(action) || registerLuaActionEvent(action) || registerLuaPositionEvent(action)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5e08bd123bd5ad60", + "equalIndicator/v1": "5edd3768b06a64a21012b33890f9aff3a0194ff1f4fc88a48115cf8b4f51ef32" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1214, + "startColumn": 26, + "charOffset": 33839, + "charLength": 8, + "snippet": { + "text": "manaGain" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1212, + "startColumn": 1, + "charOffset": 33726, + "charLength": 135, + "snippet": { + "text": "\t\t\t\tcreature->changeMana(manaGain * 2); // Double regen from daily reward\r\n\t\t\t} else {\r\n\t\t\t\tcreature->changeMana(manaGain);\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c75b3b7ba023df7c", + "equalIndicator/v1": "5ee132f93395ec86c09c21085e6346ff964d4775dd1d3e2802de290529a46be2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 353, + "startColumn": 2, + "charOffset": 11636, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 351, + "startColumn": 1, + "charOffset": 11607, + "charLength": 152, + "snippet": { + "text": "\t\tdefaultMap[i] = 100;\r\n\t}\r\n\tfor (const auto &elementEntry : mtype->info.elementMap) {\r\n\t\tswitch (elementEntry.first) {\r\n\t\t\tcase COMBAT_PHYSICALDAMAGE:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "884b5fd8d98f62c2", + "equalIndicator/v1": "5ee6929428dfe6f598af707156a590976005eb4252f2b42975554d10127de848" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6551, + "startColumn": 27, + "charOffset": 226117, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6549, + "startColumn": 1, + "charOffset": 226014, + "charLength": 276, + "snippet": { + "text": "\t\t\tdamage.primary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\r\n\t\t}\r\n\t\tdamage.primary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\r\n\r\n\t\tprimaryBlockType = target->blockHit(attacker, damage.primary.type, damage.primary.value, checkDefense, checkArmor, field);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "411c88700f8dc530", + "equalIndicator/v1": "5f139cfb3400b3110ad4e8fe13befb8ed002004c74755e6929ad66bdb3bb9d32" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 768, + "startColumn": 91, + "charOffset": 27588, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 766, + "startColumn": 1, + "charOffset": 27493, + "charLength": 449, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnItemMoved(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) {\r\n\t// Player:onItemMoved(item, count, fromPosition, toPosition) or Player.onItemMoved(self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)\r\n\tif (info.playerOnItemMoved == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "033bf62988316347", + "equalIndicator/v1": "5f171d62e3dbd69d821ae2d1fd78cea95fe87e7a510103d4b09ebe8a97bfc3cf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 10301, + "startColumn": 57, + "charOffset": 358021, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10299, + "startColumn": 1, + "charOffset": 357960, + "charLength": 169, + "snippet": { + "text": "}\r\n\r\nvoid Game::addPlayerUniqueLogin(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().error(\"Attempted to add null player to unique player names list\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aa1e9b0c4c33d8b1", + "equalIndicator/v1": "5f48af9c42c39bce29aef073e50beb8a751fab0f3f3b745da4d895ab5e2fc801" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Annotate this function with 'override' or (rarely) 'final'", + "markdown": "Annotate this function with 'override' or (rarely) 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 95, + "startColumn": 34, + "charOffset": 2902, + "charLength": 4, + "snippet": { + "text": "keys" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 93, + "startColumn": 1, + "charOffset": 2796, + "charLength": 158, + "snippet": { + "text": "\r\n\tstd::shared_ptr scoped(const std::string &scope) override final;\r\n\tstd::unordered_set keys(const std::string &prefix = \"\");\r\n\r\nprotected:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dab161a9d384b6b8", + "equalIndicator/v1": "5f59051439d0f8672cfa2050bf5ad45083c84ba11bea42437e8daec47933c17d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1737, + "startColumn": 2, + "charOffset": 52227, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1735, + "startColumn": 1, + "charOffset": 52122, + "charLength": 229, + "snippet": { + "text": "void ProtocolGame::parseUseWithCreature(NetworkMessage &msg) {\r\n\tPosition fromPos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t fromStackPos = msg.getByte();\r\n\tuint32_t creatureId = msg.get();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8df6d111baae344d", + "equalIndicator/v1": "5f602e9541fefbda96a5132e4bebc79b11056ee560f65ce191c626d65db0728a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3229, + "startColumn": 64, + "charOffset": 99044, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3227, + "startColumn": 1, + "charOffset": 98976, + "charLength": 118, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureLight(std::shared_ptr creature) {\r\n\tif (!canSee(creature)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "67a887fa15511b0d", + "equalIndicator/v1": "5f7c197508078ac1bbc9152324a5441cba87ab64eeef1c5f408e0ed5fc1b3165" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 977, + "startColumn": 46, + "charOffset": 37274, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 975, + "startColumn": 1, + "charOffset": 37174, + "charLength": 164, + "snippet": { + "text": "\tgetScriptInterface()->pushFunction(getScriptId());\r\n\r\n\tLuaScriptInterface::pushUserdata(L, player);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "23767fcf4ca26818", + "equalIndicator/v1": "5f7f621e276d0d645feea8fbc7b99c110f4d83ea77d37b699d2cc67cac752bcc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'operator bool' must be marked explicit to avoid unintentional implicit conversions", + "markdown": "'operator bool' must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 104, + "startColumn": 27, + "charOffset": 3141, + "charLength": 4, + "snippet": { + "text": "bool" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 102, + "startColumn": 1, + "charOffset": 3109, + "charLength": 81, + "snippet": { + "text": "\t}\r\n\r\n\texplicit(false) operator bool() const {\r\n\t\treturn get();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0b685ed19ba323f3", + "equalIndicator/v1": "5f8aeec9169d9500d8c48cc8508719cec0b2bb310174ba6a2e9cef88d8f9e52b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotchest.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 24, + "startColumn": 14, + "charOffset": 676, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 22, + "startColumn": 1, + "charOffset": 631, + "charLength": 346, + "snippet": { + "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f4a56ce7b5153fe3", + "equalIndicator/v1": "5f8d6d63a65ff2ff1e325da4a3fdd25d2e710600319c3779425c9e668baf9200" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 855, + "startColumn": 68, + "charOffset": 27889, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 853, + "startColumn": 1, + "charOffset": 27817, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Creature::getCorpse(std::shared_ptr, std::shared_ptr) {\r\n\tif (getLookCorpse() != 0) {\r\n\t\treturn Item::CreateItem(getLookCorpse());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a7b9c0fe0b77850c", + "equalIndicator/v1": "5fa868c14c210b2dff6e13eedd618ef9dbd5f2eba4edbaab4e86ca1da00af50b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1703, + "startColumn": 2, + "charOffset": 50959, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1701, + "startColumn": 1, + "charOffset": 50863, + "charLength": 274, + "snippet": { + "text": "void ProtocolGame::parseApplyImbuement(NetworkMessage &msg) {\r\n\tuint8_t slot = msg.getByte();\r\n\tuint32_t imbuementId = msg.get();\r\n\tbool protectionCharm = msg.getByte() != 0x00;\r\n\tg_game().playerApplyImbuement(player->getID(), imbuementId, slot, protectionCharm);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5001c13c992f75d2", + "equalIndicator/v1": "5fcbb1f50494c625d7f3401c3021e3711b7fb9d5685fbac777250c46da8dc6ce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 445, + "startColumn": 53, + "charOffset": 15378, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 443, + "startColumn": 1, + "charOffset": 15321, + "charLength": 129, + "snippet": { + "text": "}\r\n\r\nvoid Npc::onPlayerCheckItem(std::shared_ptr player, uint16_t itemId, uint8_t subType) {\r\n\tif (!player) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e634b5104a6f9936", + "equalIndicator/v1": "5fd04a5170c6834d027f664afd76bb531c7e636a7f9eebe954a4cc8f329662ee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getRequiredMagLevel' can be made const", + "markdown": "Method 'getRequiredMagLevel' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 226, + "startColumn": 11, + "charOffset": 7282, + "charLength": 19, + "snippet": { + "text": "getRequiredMagLevel" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 224, + "startColumn": 1, + "charOffset": 7247, + "charLength": 86, + "snippet": { + "text": "\t\treqLevel = level;\r\n\t}\r\n\tuint32_t getRequiredMagLevel() {\r\n\t\treturn reqMagLevel;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8bc739743ff40182", + "equalIndicator/v1": "5fdaf9bb6d1ed5223dd438ea7c17006d46e705549fd8c1cb284b064a507ebf05" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3059, + "startColumn": 2, + "charOffset": 93274, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3057, + "startColumn": 1, + "charOffset": 93213, + "charLength": 160, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseJoinParty(NetworkMessage &msg) {\r\n\tuint32_t targetId = msg.get();\r\n\tg_game().playerJoinParty(player->getID(), targetId);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7fff02fa252615cc", + "equalIndicator/v1": "60068b6900671db7f82033ab58a3f7c0b1b6bec38ae9e4a438eea8292b26edb2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 596, + "startColumn": 3, + "charOffset": 16463, + "charLength": 22, + "snippet": { + "text": "pushBoolean(L, false);" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 594, + "startColumn": 1, + "charOffset": 16376, + "charLength": 185, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (!player) {\r\n\t\tpushBoolean(L, false);\r\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\r\n\t\treturn 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ad99aff36d5850c5", + "equalIndicator/v1": "601312e4b8aa0b9eb4ab285db759ad778721d2a2ad6afac119617ffe7cb14ee0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'", + "markdown": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 25, + "startColumn": 11, + "charOffset": 884, + "charLength": 9, + "snippet": { + "text": "Condition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 23, + "startColumn": 1, + "charOffset": 706, + "charLength": 270, + "snippet": { + "text": "\t\tendTime(initTicks == -1 ? std::numeric_limits::max() : 0),\r\n\t\tsubId(initSubId), ticks(initTicks), conditionType(initType), id(initId), isBuff(initBuff) { }\r\n\tvirtual ~Condition() = default;\r\n\r\n\tvirtual bool startCondition(std::shared_ptr creature);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "feb21b329c228042", + "equalIndicator/v1": "60459eb08506edff7836e9fab512709685a454b1fab03e54922c6d4955870257" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 466, + "startColumn": 57, + "charOffset": 14277, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 464, + "startColumn": 1, + "charOffset": 14216, + "charLength": 124, + "snippet": { + "text": "}\r\n\r\nvoid Monster::onCreatureLeave(std::shared_ptr creature) {\r\n\t// update friendList\r\n\tif (isFriend(creature)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fa029a7b7eaf2a41", + "equalIndicator/v1": "604d1e4275f64810e30056ace2cec2fc60a9ef5e7fe761e012013b2c84e12965" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'destination' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'destination' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 153, + "startColumn": 48, + "charOffset": 4066, + "charLength": 11, + "snippet": { + "text": "destination" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 151, + "startColumn": 1, + "charOffset": 4014, + "charLength": 123, + "snippet": { + "text": "}\r\n\r\nbool Bank::deposit(const std::shared_ptr destination, uint64_t amount) {\r\n\tif (!destination) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b7e62e6ffbe62d44", + "equalIndicator/v1": "6088d5f3dffb7f0a151bf70d36c6e0ae076f29f4832af373ba8abc7830e6ef94" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6683, + "startColumn": 81, + "charOffset": 232142, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6681, + "startColumn": 1, + "charOffset": 232057, + "charLength": 190, + "snippet": { + "text": "}\r\n\r\nvoid Game::combatGetTypeInfo(CombatType_t combatType, std::shared_ptr target, TextColor_t &color, uint16_t &effect) {\r\n\tswitch (combatType) {\r\n\t\tcase COMBAT_PHYSICALDAMAGE: {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e458f051e837b85c", + "equalIndicator/v1": "608f62f14405fa2e55252ee82f4d888e33e4fcdde3e4521f9c8828b948974c14" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 425, + "startColumn": 14, + "charOffset": 11447, + "charLength": 8, + "snippet": { + "text": "tileItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 423, + "startColumn": 1, + "charOffset": 11399, + "charLength": 189, + "snippet": { + "text": "\r\n\t\t\t// Clear any existing carpet\r\n\t\t\tfor (auto tileItem : *tile->getItemList()) {\r\n\t\t\t\tif (tileItem && tileItem->isCarpet()) {\r\n\t\t\t\t\ttile->removeThing(tileItem, tileItem->getItemCount());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c22fc65a9ca6c549", + "equalIndicator/v1": "60a626baa27ba3b5650a1f40bdb4b664aa7b4b0be7092cd615809be8e6c36494" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2441, + "startColumn": 14, + "charOffset": 72674, + "charLength": 8, + "snippet": { + "text": "vocation" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2439, + "startColumn": 1, + "charOffset": 72609, + "charLength": 165, + "snippet": { + "text": "\t\t} else {\r\n\t\t\thealthMax += vocation->getHPGain();\r\n\t\t\thealth += vocation->getHPGain();\r\n\t\t\tmanaMax += vocation->getManaGain();\r\n\t\t\tmana += vocation->getManaGain();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71f53e333ac376f2", + "equalIndicator/v1": "60b8394a865085491098a3b42ddee4e37c77d559cdedf7ab286c54bab407b7b9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 30, + "startColumn": 66, + "charOffset": 930, + "charLength": 6, + "snippet": { + "text": "action" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 28, + "startColumn": 1, + "charOffset": 860, + "charLength": 160, + "snippet": { + "text": "}\r\n\r\nbool Actions::registerLuaItemEvent(const std::shared_ptr action) {\r\n\tauto itemIdVector = action->getItemIdsVector();\r\n\tif (itemIdVector.empty()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a7ecf1a8adf3f4e5", + "equalIndicator/v1": "60bdc476dc489cbec0b73e040cfa2d033665d5c502f181e30e1d056bf9678c8c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 104, + "startColumn": 20, + "charOffset": 3876, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 102, + "startColumn": 1, + "charOffset": 3750, + "charLength": 191, + "snippet": { + "text": "\tstd::ostringstream query;\r\n\tquery << \"SELECT * FROM `players` WHERE `name` = \" << db.escapeString(name);\r\n\treturn loadPlayer(player, db.storeQuery(query.str()), disableIrrelevantInfo);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cd189b7ceae309ef", + "equalIndicator/v1": "60ddb91c95014c54593fb33ddff7d55894c4c884c587592e8ccd7f75efae5f72" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1191, + "startColumn": 98, + "charOffset": 45386, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1189, + "startColumn": 1, + "charOffset": 45284, + "charLength": 235, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::zoneAfterCreatureEnter(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneAfterCreatureEnter - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5d800900ddc8e40d", + "equalIndicator/v1": "60f201a0227e516171e50331df680f5d893db99e74f58b5eda4b1bb2139bd64e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 686, + "startColumn": 55, + "charOffset": 22249, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 684, + "startColumn": 1, + "charOffset": 22190, + "charLength": 234, + "snippet": { + "text": "}\r\n\r\nvoid Combat::CombatManaFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\r\n\tif (!data) {\r\n\t\tg_logger().error(\"[{}]: CombatDamage is nullptr\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5c3f23a9100f0f51", + "equalIndicator/v1": "610476bbd76f8ace6b70073f8398d5d82980b7dead60a0105b931b274ea64f1b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant call to 'data'", + "markdown": "Redundant call to 'data'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1273, + "startColumn": 5, + "charOffset": 57484, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1271, + "startColumn": 1, + "charOffset": 57330, + "charLength": 320, + "snippet": { + "text": "\t\t\t\tg_logger().trace(\"Registering moveevent for item id '{}', name '{}'\", itemType.id, itemType.name);\r\n\t\t\t\tMoveEvent_t eventType = MOVE_EVENT_NONE;\r\n\t\t\t\tfor (auto subAttributeNode : attributeNode.children()) {\r\n\t\t\t\t\tpugi::xml_attribute subKeyAttribute = subAttributeNode.attribute(\"key\");\r\n\t\t\t\t\tif (!subKeyAttribute) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6031dbbfe20f504f", + "equalIndicator/v1": "610da8d1b4729f5e1512fcc63363b4051c5f4839b2f67daf52c99ebc11d4e532" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 426, + "startColumn": 8, + "charOffset": 10607, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 424, + "startColumn": 1, + "charOffset": 10515, + "charLength": 205, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetArmor(lua_State* L) {\r\n\t// itemType:getArmor()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->armor);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75ccd23fa082cc15", + "equalIndicator/v1": "611a8f8f5b05f4d719539d09b751e222671044fb0d41ee3f627ef8a3156aa1b8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7732, + "startColumn": 4, + "charOffset": 242584, + "charLength": 8, + "snippet": { + "text": "skills_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7730, + "startColumn": 1, + "charOffset": 242519, + "charLength": 270, + "snippet": { + "text": "\r\n\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; ++i) {\r\n\t\t\tskills_t skill = static_cast(i);\r\n\t\t\tmsg.add(std::min(player->getSkillLevel(skill), std::numeric_limits::max()));\r\n\t\t\tmsg.add(player->getBaseSkill(skill));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "325919b45a3144f9", + "equalIndicator/v1": "611cb9fe224446f3edb7bbf2028b25fe25432202e97c56eedf46f666c5ad36eb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 797, + "startColumn": 122, + "charOffset": 26081, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 795, + "startColumn": 1, + "charOffset": 25955, + "charLength": 226, + "snippet": { + "text": "}\r\n\r\nvoid Combat::combatTileEffects(const CreatureVector &spectators, std::shared_ptr caster, std::shared_ptr tile, const CombatParams ¶ms) {\r\n\tif (params.itemId != 0) {\r\n\t\tuint16_t itemId = params.itemId;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fd3cb6d56e4bfc6f", + "equalIndicator/v1": "612ef6bc060a45c757486553e64fdc7323bb069b289b5ad7d11bcbf65c68b0d8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6499, + "startColumn": 15, + "charOffset": 204824, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6497, + "startColumn": 1, + "charOffset": 204739, + "charLength": 123, + "snippet": { + "text": "\tmsg.addPosition(pos);\r\n\tmsg.addByte(static_cast(stackpos));\r\n\tAddItem(msg, item);\r\n\twriteToOutputBuffer(msg);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3595a8c0925ec4cc", + "equalIndicator/v1": "614b8cfbee3c6c2fda954411cfda4e6c68bda03cfa4b8bdc8f5e253a38d397b7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float'", + "markdown": "Narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 49, + "startColumn": 75, + "charOffset": 1945, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 47, + "startColumn": 1, + "charOffset": 1816, + "charLength": 176, + "snippet": { + "text": "\t} else if (it.hasSubType()) {\r\n\t\tif (it.stackable) {\r\n\t\t\titemCount = static_cast(std::ceil(static_cast(count) / it.stackSize));\r\n\t\t} else {\r\n\t\t\titemCount = 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c4a9f33062e5885a", + "equalIndicator/v1": "61b3427b41826f249481ff29d8900852d6b6f59c1764a02b4611bd0c86c483d4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::list>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'std::list\\>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 355, + "startColumn": 21, + "charOffset": 9497, + "charLength": 5, + "snippet": { + "text": "house" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 353, + "startColumn": 1, + "charOffset": 9391, + "charLength": 163, + "snippet": { + "text": "\t// house:getTileCount()\r\n\tif (const auto &house = getUserdataShared(L, 1)) {\r\n\t\tlua_pushnumber(L, house->getTiles().size());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fc88169d29319524", + "equalIndicator/v1": "61b9c9e6f61dcfb58e60061047ce811acfddc96b14a0f4cb288d177402f1f428" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6841, + "startColumn": 27, + "charOffset": 236754, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6839, + "startColumn": 1, + "charOffset": 236645, + "charLength": 172, + "snippet": { + "text": "\r\n\tdamage.primary.value = std::round(damage.primary.value * pvpDamageMultiplier);\r\n\tdamage.secondary.value = std::round(damage.secondary.value * pvpDamageMultiplier);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "20fb2ba04a2faf95", + "equalIndicator/v1": "61e0598f04ab91cec4f4053e32fa3b58c1f4e7251cb1d9983af68a8d942cdcac" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 134, + "startColumn": 48, + "charOffset": 3613, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 132, + "startColumn": 1, + "charOffset": 3561, + "charLength": 244, + "snippet": { + "text": "}\r\n\r\nbool Weapon::useWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target) const {\r\n\tint32_t damageModifier = playerWeaponCheck(player, target, item->getShootRange());\r\n\tif (damageModifier == 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ef427fa975c108f0", + "equalIndicator/v1": "61e3d4aed705f58716c7aa373299e44e0d92460030660afad28a6302a49b0cbf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8058, + "startColumn": 57, + "charOffset": 280512, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8056, + "startColumn": 1, + "charOffset": 280451, + "charLength": 103, + "snippet": { + "text": "}\r\n\r\nvoid Game::updateCreatureType(std::shared_ptr creature) {\r\n\tif (!creature) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "47469ec5f293645f", + "equalIndicator/v1": "61faf6b8a9da4f2535fe93a6f904e4589292bff66f10e4d5b59517dc9e5b0238" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 187, + "startColumn": 35, + "charOffset": 5884, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 185, + "startColumn": 1, + "charOffset": 5765, + "charLength": 167, + "snippet": { + "text": "\tconst std::shared_ptr action = getAction(item);\r\n\tif (action != nullptr) {\r\n\t\treturn action->canExecuteAction(player, pos);\r\n\t}\r\n\treturn RETURNVALUE_NOERROR;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "06a87daa8f3a43f3", + "equalIndicator/v1": "6208c2e630ac4fdd24fa68ce42bfdb27c752a357c42247f4f5925035d65db60d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'event' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'event' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 114, + "startColumn": 24, + "charOffset": 3493, + "charLength": 32, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 112, + "startColumn": 1, + "charOffset": 3318, + "charLength": 256, + "snippet": { + "text": "\tbool registerLuaUniqueEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaPositionEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaEvent(const std::shared_ptr event);\r\n\tvoid clear(bool isFromXML = false);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "34c46a800c87b9d2", + "equalIndicator/v1": "621acc01d547ae20e20dfe8189c369e9a4788b2f2bc67d12d39139e2e0452336" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'onAddTileItem' is within a recursive call chain", + "markdown": "Function 'onAddTileItem' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 365, + "startColumn": 12, + "charOffset": 9527, + "charLength": 13, + "snippet": { + "text": "onAddTileItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 363, + "startColumn": 1, + "charOffset": 9511, + "charLength": 310, + "snippet": { + "text": "}\r\n\r\nvoid Tile::onAddTileItem(std::shared_ptr item) {\r\n\tif ((item->hasProperty(CONST_PROP_MOVABLE) || item->getContainer()) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) {\r\n\t\tauto it = g_game().browseFields.find(static_self_cast());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ea8a20c2903808e7", + "equalIndicator/v1": "622af232721de89a3d242e85c76f631713327eeac9be8fa4c943bc4a6d60f204" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7125, + "startColumn": 28, + "charOffset": 247949, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7123, + "startColumn": 1, + "charOffset": 247825, + "charLength": 247, + "snippet": { + "text": "\t\t}\r\n\t\tif (damage.origin != ORIGIN_NONE && attacker && damage.primary.type != COMBAT_HEALING) {\r\n\t\t\tdamage.primary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\r\n\t\t\tdamage.secondary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a39caca97332c725", + "equalIndicator/v1": "622b825394b72d1559cb74921c8f028358733c8d9bc24581c1a1043f8dc491a4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 210, + "startColumn": 14, + "charOffset": 5852, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 208, + "startColumn": 1, + "charOffset": 5807, + "charLength": 496, + "snippet": { + "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t tileFlags, std::shared_ptr actor = nullptr) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d7091fa8cbab5ce1", + "equalIndicator/v1": "623d49786c914b39e5b7f66eeba76b02fe8651c12b49cc3d53870203b1078f07" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1742, + "startColumn": 7, + "charOffset": 52078, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1740, + "startColumn": 1, + "charOffset": 51917, + "charLength": 349, + "snippet": { + "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r\n\tvoid setNextAction(int64_t time) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "535afdc80427174f", + "equalIndicator/v1": "62429fd451a9008ab5d0ca959d18bf3790b7ef12ed356848e0fea50e5baeb121" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')", + "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6091, + "startColumn": 17, + "charOffset": 179196, + "charLength": 23, + "snippet": { + "text": "Player::getPercentLevel" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6089, + "startColumn": 1, + "charOffset": 179119, + "charLength": 245, + "snippet": { + "text": "\t\tuint8_t newPercent;\r\n\t\tif (nextReqTries > currReqTries) {\r\n\t\t\tnewPercent = Player::getPercentLevel(skills[skill].tries, nextReqTries);\r\n\t\t\tnewPercentToNextLevel = static_cast(skills[skill].tries * 100) / nextReqTries;\r\n\t\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ed87edbb6b75c7d5", + "equalIndicator/v1": "624bc5b04cd6748b63e6c08538831f7e8a4c3499adf15e40f57726b226f2c388" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 150, + "startColumn": 65, + "charOffset": 4379, + "charLength": 9, + "snippet": { + "text": "moveEvent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 148, + "startColumn": 1, + "charOffset": 4310, + "charLength": 214, + "snippet": { + "text": "}\r\n\r\nbool MoveEvents::registerEvent(const std::shared_ptr moveEvent, int32_t id, std::map &moveListMap) const {\r\n\tauto it = moveListMap.find(id);\r\n\tif (it == moveListMap.end()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "910bb614443cd8d2", + "equalIndicator/v1": "6292fbe56f9cac23e46f5e4129943514c668b0f5dba1557f8d705ae9fa0aef47" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 702, + "startColumn": 19, + "charOffset": 21598, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 700, + "startColumn": 1, + "charOffset": 21516, + "charLength": 131, + "snippet": { + "text": "\titem->setParent(getContainer());\r\n\titemlist.push_front(item);\r\n\tupdateItemWeight(item->getWeight());\r\n\r\n\t// send change to client\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e6cab6e1702e0d28", + "equalIndicator/v1": "62aa4df65b73c79f1c3ba926fffc9bfb6a169254d06fea2423a11f8d32456f1c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 965, + "startColumn": 94, + "charOffset": 36790, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 963, + "startColumn": 1, + "charOffset": 36692, + "charLength": 252, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnRotateItem(std::shared_ptr player, std::shared_ptr item, const Position &position) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[{}] Call stack overflow\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0c444fd3ba049e45", + "equalIndicator/v1": "62bbbf3ec854ca29acc341e41f6423ee2d6008c05afdb2a4e2cb9bb36fba0da6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 846, + "startColumn": 30, + "charOffset": 25364, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 844, + "startColumn": 1, + "charOffset": 25319, + "charLength": 105, + "snippet": { + "text": "\t\t}\r\n\t} else {\r\n\t\tfor (std::shared_ptr item : itemlist) {\r\n\t\t\tcontainerItems.push_back(item);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ea13ec6c8ae984f9", + "equalIndicator/v1": "62dec7587f0d7e881ebde29d6bf1e89ea7124cba43d88088096ea062d472e030" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 143, + "startColumn": 14, + "charOffset": 4184, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 141, + "startColumn": 1, + "charOffset": 3850, + "charLength": 640, + "snippet": { + "text": "\tvirtual ReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override final;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override final;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d297ee665198d08d", + "equalIndicator/v1": "62ed387182897e375f5f9aa111470cdfc7fbb87fc62fe2d5924453d6cb8ec006" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8462, + "startColumn": 4, + "charOffset": 267899, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8460, + "startColumn": 1, + "charOffset": 267851, + "charLength": 167, + "snippet": { + "text": "\t\t}\r\n\t\tcase SUPPLY_STASH_ACTION_WITHDRAW: {\r\n\t\t\tuint16_t itemId = msg.get();\r\n\t\t\tuint32_t count = msg.get();\r\n\t\t\tuint8_t stackpos = msg.getByte();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e2e09b7ec1283ff2", + "equalIndicator/v1": "62f7869cd566fbff5e2ca68c03d7bfe47d82ec00f4667ebba78ab3db59ed8ba7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 551, + "startColumn": 55, + "charOffset": 17834, + "charLength": 8, + "snippet": { + "text": "maxValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 549, + "startColumn": 1, + "charOffset": 17746, + "charLength": 152, + "snippet": { + "text": "\tint32_t minValue = level / 5;\r\n\r\n\treturn -normal_random(minValue, static_cast(maxValue * player->getVocation()->meleeDamageMultiplier));\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fac32dccdaabf21c", + "equalIndicator/v1": "63029716a1fb140c66f275f27824adf64bf152bd2ea4568b7c57f763e67de66e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 221, + "startColumn": 7, + "charOffset": 6726, + "charLength": 11, + "snippet": { + "text": "updateThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 219, + "startColumn": 1, + "charOffset": 6659, + "charLength": 242, + "snippet": { + "text": "\r\n\tvoid updateTileFlags(const std::shared_ptr &item);\r\n\tvoid updateThing(std::shared_ptr thing, uint16_t itemId, uint32_t count) override final;\r\n\tvoid replaceThing(uint32_t index, std::shared_ptr thing) override final;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b659817adde89131", + "equalIndicator/v1": "630ad154285abad3222c3277f555d5246984a7854fec17c14f0424d15c611a4a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 81, + "startColumn": 10, + "charOffset": 2200, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 79, + "startColumn": 1, + "charOffset": 2147, + "charLength": 105, + "snippet": { + "text": "\t}\r\n\tint32_t getDefense() const override {\r\n\t\treturn mType->info.defense * getDefenseMultiplier();\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "52b0beb11cdd0aad", + "equalIndicator/v1": "631b9a502f7b1c403caf2dc41cade05cf66b0a22e5d9d58d851e9a9f97098694" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 830, + "startColumn": 85, + "charOffset": 26985, + "charLength": 8, + "snippet": { + "text": "minValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 828, + "startColumn": 1, + "charOffset": 26854, + "charLength": 182, + "snippet": { + "text": "\r\n\tint32_t minValue = player->getLevel() / 5;\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue);\r\n\tif (maxDamage) {\r\n\t\treturn -maxValue;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a194a6dd2f028421", + "equalIndicator/v1": "631dec9062f3393a5dead2bac5eccd4dfacc8a330d1b8e6d77211dac8d329659" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Valty', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Valty', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/arraylist.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 116, + "startColumn": 22, + "charOffset": 2641, + "charLength": 6, + "snippet": { + "text": "_Valty" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 114, + "startColumn": 1, + "charOffset": 2613, + "charLength": 152, + "snippet": { + "text": "\t\t}\r\n\r\n\t\ttemplate \r\n\t\tdecltype(auto) emplace_back(_Valty &&... v) {\r\n\t\t\treturn backContainer.emplace_back(std::forward<_Valty>(v)...);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ba4475f82c3106d8", + "equalIndicator/v1": "632721c790022f51a6804fea9980dbc7458cf009269f264ab7520b7b15689aa1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1355, + "startColumn": 61, + "charOffset": 39655, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1353, + "startColumn": 1, + "charOffset": 39590, + "charLength": 146, + "snippet": { + "text": "}\r\n\r\nint32_t Tile::getStackposOfCreature(std::shared_ptr player, std::shared_ptr creature) const {\r\n\tint32_t n;\r\n\tif (ground) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "65d5122b6bf93382", + "equalIndicator/v1": "6340062f557471a488f3af3080a9a447dc57237d0d2ff911c94183198993770a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2835, + "startColumn": 37, + "charOffset": 84759, + "charLength": 8, + "snippet": { + "text": "capacity" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2833, + "startColumn": 1, + "charOffset": 84577, + "charLength": 226, + "snippet": { + "text": "\t\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\r\n\t\t\t\tmanaMax = std::max(0, manaMax - vocation->getManaGain());\r\n\t\t\t\tcapacity = std::max(0, capacity - vocation->getCapGain());\r\n\t\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f91c7820ec66ebed", + "equalIndicator/v1": "634b7a9c1e45df1abed231ce3209075f3f84568a95fa313c5e310f43502a02a8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'condition' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'condition' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1376, + "startColumn": 62, + "charOffset": 42127, + "charLength": 9, + "snippet": { + "text": "condition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1374, + "startColumn": 1, + "charOffset": 42061, + "charLength": 241, + "snippet": { + "text": "}\r\n\r\nbool Creature::addCombatCondition(std::shared_ptr condition, bool attackerPlayer /* = false*/) {\r\n\t// Caution: condition variable could be deleted after the call to addCondition\r\n\tConditionType_t type = condition->getType();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "953a9ead5d6ee794", + "equalIndicator/v1": "634cee16db8f44dd8f425675bba15ed670692ed3765fa68400d897555a203ede" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8448, + "startColumn": 2, + "charOffset": 293680, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8446, + "startColumn": 1, + "charOffset": 293673, + "charLength": 150, + "snippet": { + "text": "\t}\r\n\r\n\tuint16_t page = result->getNumber(\"page\");\r\n\tuint32_t pages = result->getNumber(\"entries\");\r\n\tpages += entriesPerPage - 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d0a12723abc4eea6", + "equalIndicator/v1": "635698beed4e30de8207ce933df15d9f083cfbe47dadc0ad5fc4a64738fc9a0c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 197, + "startColumn": 86, + "charOffset": 6153, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 195, + "startColumn": 1, + "charOffset": 6063, + "charLength": 260, + "snippet": { + "text": "}\r\n\r\nvoid Weapon::internalUseWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target, int32_t damageModifier, int32_t cleavePercent) const {\r\n\tif (player) {\r\n\t\tif (params.soundCastEffect == SoundEffect_t::SILENCE) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "96f2a1c447b2bdc5", + "equalIndicator/v1": "636e273ea57282296ab6941d6c4ee9d7d6720b29dbabec9d41eee1b543cef324" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5036, + "startColumn": 83, + "charOffset": 180143, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5034, + "startColumn": 1, + "charOffset": 180056, + "charLength": 156, + "snippet": { + "text": "}\r\n\r\nstd::string Game::getTradeErrorDescription(ReturnValue ret, std::shared_ptr item) {\r\n\tif (item) {\r\n\t\tif (ret == RETURNVALUE_NOTENOUGHCAPACITY) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4014b93a847d469c", + "equalIndicator/v1": "638a31c0770687f49b561f40e8fd9a43ba16878a90ea1f3303b7ccd1610cf878" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'long double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'long double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6051, + "startColumn": 81, + "charOffset": 177865, + "charLength": 12, + "snippet": { + "text": "nextReqTries" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6049, + "startColumn": 1, + "charOffset": 177743, + "charLength": 223, + "snippet": { + "text": "\r\n\t\toldSkillValue = skills[skill].level;\r\n\t\toldPercentToNextLevel = static_cast(skills[skill].tries * 100) / nextReqTries;\r\n\r\n\t\tg_events().eventPlayerOnGainSkillTries(static_self_cast(), skill, tries);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9ac98c1a43b05dd9", + "equalIndicator/v1": "63a7601f50270f1069f28b45e10be3d28b6996d95fd1d2d60a7e85b7bfd0cedd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv_sql.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 28, + "startColumn": 27, + "charOffset": 706, + "charLength": 10, + "snippet": { + "text": "loadPrefix" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 26, + "startColumn": 1, + "charOffset": 668, + "charLength": 233, + "snippet": { + "text": "\r\nprivate:\r\n\tstd::vector loadPrefix(const std::string &prefix = \"\") override;\r\n\tstd::optional load(const std::string &key) override;\r\n\tbool save(const std::string &key, const ValueWrapper &value) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "63c02b254b223793", + "equalIndicator/v1": "63a77515dc61b816a831b97ea9789c0ec4d94ef70b3a3fc94b6ce98acba8037f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'defaultItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'defaultItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5376, + "startColumn": 125, + "charOffset": 189760, + "charLength": 11, + "snippet": { + "text": "defaultItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5374, + "startColumn": 1, + "charOffset": 189631, + "charLength": 257, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerQuickLoot(uint32_t playerId, const Position &pos, uint16_t itemId, uint8_t stackPos, std::shared_ptr defaultItem, bool lootAllCorpses, bool autoLoot) {\r\n\tstd::shared_ptr player = getPlayerByID(playerId);\r\n\tif (!player) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1e14bd3f53d43126", + "equalIndicator/v1": "63ac6dc00346bbd1260324e3bf2c42c9a2e0afef425329a8dfc3b5feaf688a04" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 348, + "startColumn": 58, + "charOffset": 12918, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 346, + "startColumn": 1, + "charOffset": 12856, + "charLength": 279, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnLook(std::shared_ptr player, const Position &position, std::shared_ptr thing, uint8_t stackpos, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLook - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "df90fd8a8817f9b1", + "equalIndicator/v1": "63b429dcebc96cf5ab8ba0cdb9578640a999b1524b164365131bf6687f4c61b0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 863, + "startColumn": 71, + "charOffset": 31227, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 861, + "startColumn": 1, + "charOffset": 31152, + "charLength": 360, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnReportRuleViolation(std::shared_ptr player, const std::string &targetName, uint8_t reportType, uint8_t reportReason, const std::string &comment, const std::string &translation) {\r\n\t// Player:onReportRuleViolation(targetName, reportType, reportReason, comment, translation)\r\n\tif (info.playerOnReportRuleViolation == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6f49373812ed9a5a", + "equalIndicator/v1": "63bc921056c5eb70bb908ef2e74ba599893471756dd853b4fd4d0e5e75f25cc9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 607, + "startColumn": 102, + "charOffset": 21588, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 605, + "startColumn": 1, + "charOffset": 21482, + "charLength": 311, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnLookInBattleList(std::shared_ptr player, std::shared_ptr creature, int32_t lookDistance) {\r\n\t// Player:onLookInBattleList(creature, position, distance) or Player.onLookInBattleList(self, creature, position, distance)\r\n\tif (info.playerOnLookInBattleList == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cfaac4102178c4a6", + "equalIndicator/v1": "640379f76bc7c70ad0d7babcec3142fe3af52be4696cbd911f6ebb00546b8bd1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 262, + "startColumn": 41, + "charOffset": 9669, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 260, + "startColumn": 1, + "charOffset": 9623, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bcfbecc6b7be737d", + "equalIndicator/v1": "6412ad68f225eeeb65d19ff1064952f5b4f3b932abd680a679896bb42ed43dc3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 418, + "startColumn": 26, + "charOffset": 20801, + "charLength": 19, + "snippet": { + "text": "MITIGATION_INCREASE" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 416, + "startColumn": 1, + "charOffset": 20605, + "charLength": 360, + "snippet": { + "text": "// SLOT_GREEN_TOP_150 = 2\r\nvoid IOWheel::slotGreenTop150(const std::shared_ptr &player, uint16_t points, uint8_t, PlayerWheelMethodsBonusData &bonusData) const {\r\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\r\n\tif (isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_GREEN_TOP_150)) {\r\n\t\tbonusData.leech.manaLeech += MANA_LEECH_INCREASE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "db4711d221b7a25c", + "equalIndicator/v1": "641a2be599e43ab6afb58055cf8b99d6273e56cd95919c4c5ca066ed05c2ac38" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1224, + "startColumn": 41, + "charOffset": 46736, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1222, + "startColumn": 1, + "charOffset": 46690, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8155f20ac47ab8ab", + "equalIndicator/v1": "641b3f74f619081fb6065185177e2b9b0feafacb29186e2b44ea70c8b5f979f1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1043, + "startColumn": 13, + "charOffset": 30154, + "charLength": 7, + "snippet": { + "text": "toupper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1041, + "startColumn": 1, + "charOffset": 30071, + "charLength": 109, + "snippet": { + "text": "\tfor (size_t i = 1; i < strLength; ++i) {\r\n\t\tif (str[i - 1] == ' ') {\r\n\t\t\tstr[i] = toupper(str[i]);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cc3d1f21b277b469", + "equalIndicator/v1": "641d59d127219122c3c9e9c0cab5648bdbdd08f7d4da1838f7057a866f47dc82" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8634, + "startColumn": 58, + "charOffset": 272023, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8632, + "startColumn": 1, + "charOffset": 271961, + "charLength": 237, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::getForgeInfoMap(std::shared_ptr item, std::map> &itemsMap) const {\r\n\tstd::map itemInfo;\r\n\titemInfo.insert({ item->getTier(), item->getItemCount() });\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "31710a20a4e7a1ab", + "equalIndicator/v1": "643aecfc6c29a9c3eeecb558a8c73f4f774a80f638658d6103277bf6f3f62548" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1095, + "startColumn": 41, + "charOffset": 41717, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1093, + "startColumn": 1, + "charOffset": 41671, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "79634c1f7ff01a18", + "equalIndicator/v1": "646aafba4294be74bd726ae64a1f6e0ea6c2673fc6605f560d7f9fa8ec509186" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 69, + "startColumn": 18, + "charOffset": 2147, + "charLength": 15, + "snippet": { + "text": "getWeaponDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 67, + "startColumn": 1, + "charOffset": 2002, + "charLength": 481, + "snippet": { + "text": "\tvirtual bool useWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target) const;\r\n\r\n\tvirtual int32_t getWeaponDamage(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, bool maxDamage = false) const = 0;\r\n\tvirtual int32_t getElementDamage(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) const = 0;\r\n\tvirtual CombatType_t getElementType() const = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2b5b395dfae61030", + "equalIndicator/v1": "647e396c46e9d6433d4a950ebdbedbbbf62ab3e18771a379b5d8cb2d87f2de36" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 217, + "startColumn": 2, + "charOffset": 7825, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 215, + "startColumn": 1, + "charOffset": 7818, + "charLength": 46, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3db4d7113755102a", + "equalIndicator/v1": "64877a00dc3c6e69a4022c43f9336304ab6445bb0885eedd10c005161d30ba1c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 640, + "startColumn": 56, + "charOffset": 19017, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 638, + "startColumn": 1, + "charOffset": 18957, + "charLength": 164, + "snippet": { + "text": "}\r\n\r\nvoid Party::updatePlayerStatus(std::shared_ptr player, const Position &oldPos, const Position &newPos) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "89a226754cb536a6", + "equalIndicator/v1": "648bb0606e6c5b152f11026d20587a3aed710791fcda0bf7db0dd8f4114cc750" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'servicePort' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'servicePort' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 18, + "startColumn": 103, + "charOffset": 733, + "charLength": 11, + "snippet": { + "text": "servicePort" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 16, + "startColumn": 1, + "charOffset": 599, + "charLength": 259, + "snippet": { + "text": "#include \"server/server.hpp\"\r\n\r\nConnection_ptr ConnectionManager::createConnection(asio::io_service &io_service, ConstServicePort_ptr servicePort) {\r\n\tauto connection = std::make_shared(io_service, servicePort);\r\n\tconnections.emplace(connection);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3dcb45d225b106eb", + "equalIndicator/v1": "64c561221c50a5e5a9e758b571ec0e1aad6fb547e7c596b951018596c2aef0cc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 690, + "startColumn": 37, + "charOffset": 22554, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 688, + "startColumn": 1, + "charOffset": 22492, + "charLength": 128, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 3.20f);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "20a0253bfc049d25", + "equalIndicator/v1": "650723f1896c3bd988ef5000e233edfe9e5f2de84d31ed9d6991a45174485150" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 670, + "startColumn": 30, + "charOffset": 20817, + "charLength": 8, + "snippet": { + "text": "listItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 668, + "startColumn": 1, + "charOffset": 20724, + "charLength": 252, + "snippet": { + "text": "\t\t// try find a suitable item to stack with\r\n\t\tuint32_t n = 0;\r\n\t\tfor (std::shared_ptr listItem : itemlist) {\r\n\t\t\tif (listItem != item && listItem->equals(item) && listItem->getItemCount() < listItem->getStackSize()) {\r\n\t\t\t\t*destItem = listItem;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "87e4f469fe66407a", + "equalIndicator/v1": "651c30b4158b9cc4767f4a92def64fb9ed52b3844c9ac618e9a8b4839da1f025" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1180, + "startColumn": 58, + "charOffset": 36590, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1178, + "startColumn": 1, + "charOffset": 36528, + "charLength": 134, + "snippet": { + "text": "}\r\n\r\nvoid Creature::addDamagePoints(std::shared_ptr attacker, int32_t damagePoints) {\r\n\tif (damagePoints <= 0) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6d6dcb5025c0b443", + "equalIndicator/v1": "654f1fba3818dcf294b00b85c71496d56b9eb7d1dd727af0cdb42b5035c2df77" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1595, + "startColumn": 4, + "charOffset": 56012, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1593, + "startColumn": 1, + "charOffset": 55914, + "charLength": 150, + "snippet": { + "text": "\t\tdefault: {\r\n\t\t\tg_logger().warn(\"[ValueCallback::getMinMaxValues] - Unknown callback type\");\r\n\t\t\tscriptInterface->resetScriptEnv();\r\n\t\t\treturn;\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7a90e0cbf1313375", + "equalIndicator/v1": "65583fa8d877989935ab599c46b7ef736037aadc5c1136a609e7239f70a7e09e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1436, + "startColumn": 108, + "charOffset": 49795, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1434, + "startColumn": 1, + "charOffset": 49683, + "charLength": 364, + "snippet": { + "text": "}\r\n\r\nstd::vector>> Combat::pickChainTargets(std::shared_ptr caster, const CombatParams ¶ms, uint8_t chainDistance, uint8_t maxTargets, bool backtracking, bool aggressive, std::shared_ptr initialTarget /* = nullptr */) {\r\n\tBenchmark bm_pickChain;\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "26ef6611793c5dc0", + "equalIndicator/v1": "655fd1e8cb8c57934ec4dca511169f61a82570b800eb158105068b59da568ab4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 831, + "startColumn": 64, + "charOffset": 29920, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 829, + "startColumn": 1, + "charOffset": 29852, + "charLength": 343, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnMoveCreature(std::shared_ptr player, std::shared_ptr creature, const Position &fromPosition, const Position &toPosition) {\r\n\t// Player:onMoveCreature(creature, fromPosition, toPosition) or Player.onMoveCreature(self, creature, fromPosition, toPosition)\r\n\tif (info.playerOnMoveCreature == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f7ac8c15bd4f0ba1", + "equalIndicator/v1": "656dfb8d2e52ebab0f8be36ca86b345311fc956d613ec884526e02940a01fc18" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 898, + "startColumn": 7, + "charOffset": 34251, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 896, + "startColumn": 1, + "charOffset": 34158, + "charLength": 236, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnRequestQuestLog(std::shared_ptr player) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnRequestQuestLog - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "416d834b10a5d8cd", + "equalIndicator/v1": "6580e06fb7eadb58265b59093e894d92d1fd64f02de9551ba6190ae47a2fc892" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 900, + "startColumn": 60, + "charOffset": 28708, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 898, + "startColumn": 1, + "charOffset": 28644, + "charLength": 218, + "snippet": { + "text": "}\r\n\r\nbool InstantSpell::canThrowSpell(std::shared_ptr creature, std::shared_ptr target) const {\r\n\tconst Position &fromPos = creature->getPosition();\r\n\tconst Position &toPos = target->getPosition();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "91323b81309b408a", + "equalIndicator/v1": "65948bd2a12eb8049c81bda13f552c9ba67d0f6802677258a050a1d8adeb7cb3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2803, + "startColumn": 52, + "charOffset": 83718, + "charLength": 13, + "snippet": { + "text": "sumSkillTries" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2801, + "startColumn": 1, + "charOffset": 83627, + "charLength": 213, + "snippet": { + "text": "\t\t\tsumSkillTries += skills[i].tries;\r\n\r\n\t\t\tuint32_t lostSkillTries = static_cast(sumSkillTries * deathLossPercent);\r\n\t\t\twhile (lostSkillTries > skills[i].tries) {\r\n\t\t\t\tlostSkillTries -= skills[i].tries;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "78bf13c541a18414", + "equalIndicator/v1": "6595d5d7c9d7aa599f8c2393eec153566d9834145556b7fdf76d19a9ee28cbcc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 574, + "startColumn": 7, + "charOffset": 20359, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 572, + "startColumn": 1, + "charOffset": 20347, + "charLength": 136, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnLook - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "002fae6ecf4d4b3a", + "equalIndicator/v1": "65c12f5458ddfc18831170cd2da5b26ebf0251848cd0354e79d52da5ed8a3524" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2768, + "startColumn": 36, + "charOffset": 82433, + "charLength": 7, + "snippet": { + "text": "sumMana" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2766, + "startColumn": 1, + "charOffset": 82391, + "charLength": 123, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tlostMana = static_cast(sumMana * deathLossPercent);\r\n\r\n\t\twhile (lostMana > manaSpent && magLevel > 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d31b9752f02157c9", + "equalIndicator/v1": "65c1b13ef53fefea8fbb709b6b80d8fa1c01c11ca1632955b18264977960a3a4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7194, + "startColumn": 38, + "charOffset": 250896, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7192, + "startColumn": 1, + "charOffset": 250829, + "charLength": 116, + "snippet": { + "text": "\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tmanaDamage = std::min(target->getMana(), healthChange);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0f7b1ae873ca4897", + "equalIndicator/v1": "65daedd4a68627965ee066b12a29ea54b31a0e8af90bfbd93e11cced22d1f250" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: interface, scriptId, callbackId, timerEvent", + "markdown": "Constructor does not initialize these fields: interface, scriptId, callbackId, timerEvent" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 16, + "startColumn": 20, + "charOffset": 533, + "charLength": 17, + "snippet": { + "text": "ScriptEnvironment" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 14, + "startColumn": 1, + "charOffset": 465, + "charLength": 107, + "snippet": { + "text": "#include \"lua/scripts/script_environment.hpp\"\r\n\r\nScriptEnvironment::ScriptEnvironment() {\r\n\tresetEnv();\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d70a5e2a42a7a676", + "equalIndicator/v1": "65f22c13ce19e53954976b6ce5e42cb05305711cd33fa20b00c03b8d32b3f433" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 53, + "startColumn": 53, + "charOffset": 1291, + "charLength": 21, + "snippet": { + "text": "(OTSYS_TIME() / 1000)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 51, + "startColumn": 1, + "charOffset": 1233, + "charLength": 197, + "snippet": { + "text": "\t}\r\n\r\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\r\n\tgetUnlockedKV()->set(title.m_maleName, toSaveTimeStamp);\r\n\tm_titlesUnlocked.emplace_back(title, toSaveTimeStamp);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b848fa3b9f7136e0", + "equalIndicator/v1": "65f4a18db19320b20eb998beab291c5145c35ba07a878d6126f9017a7a7a208c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 29, + "startColumn": 2, + "charOffset": 794, + "charLength": 11, + "snippet": { + "text": "ReturnValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 27, + "startColumn": 1, + "charOffset": 761, + "charLength": 486, + "snippet": { + "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "87fa69effe8b7bd5", + "equalIndicator/v1": "6601a5c4c9f84b65d37e7dbdcb16cf5e33fdbf74b3835d484c95984a6d95823f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1094, + "startColumn": 60, + "charOffset": 34489, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1092, + "startColumn": 1, + "charOffset": 34425, + "charLength": 213, + "snippet": { + "text": "}\r\n\r\nbool RuneSpell::executeCastSpell(std::shared_ptr creature, const LuaVariant &var, bool isHotkey) const {\r\n\t// onCastSpell(creature, var, isHotkey)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0d375d7287cba553", + "equalIndicator/v1": "66365ad498bec1bbecc314765ebd05b94b7b7565ba49f4ce3cf9941bdf893343" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 84, + "startColumn": 9, + "charOffset": 2562, + "charLength": 12, + "snippet": { + "text": "stepDuration" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 82, + "startColumn": 1, + "charOffset": 2548, + "charLength": 51, + "snippet": { + "text": "\t}\r\n\r\n\treturn stepDuration - (ct - lastStep);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ce298b98d54a4425", + "equalIndicator/v1": "666d940cd5d4c7b33e7096c1185045f25c2b0e4929c2d9818d3c9e66266c8296" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Dynamic exception specification 'throw()' is deprecated; consider using 'noexcept' instead", + "markdown": "Dynamic exception specification 'throw()' is deprecated; consider using 'noexcept' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 286, + "startColumn": 35, + "charOffset": 8351, + "charLength": 5, + "snippet": { + "text": "throw" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 284, + "startColumn": 1, + "charOffset": 8291, + "charLength": 101, + "snippet": { + "text": "\t\tmessage(message) { }\r\n\r\n\tvirtual const char* what() const throw() {\r\n\t\treturn message.c_str();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "02b30fc68c4154c4", + "equalIndicator/v1": "667d4f4ded97a0aad016d196430d7a0686766179222e1fbb36ed74402676bcea" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 644, + "startColumn": 51, + "charOffset": 20289, + "charLength": 6, + "snippet": { + "text": "damage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 642, + "startColumn": 1, + "charOffset": 20034, + "charLength": 446, + "snippet": { + "text": "\t\t\t\tif (augment->type == Augment_t::IncreasedDamage || augment->type == Augment_t::PowerfulImpact || augment->type == Augment_t::StrongImpact) {\r\n\t\t\t\t\tconst float augmentPercent = augment->value / 100.0;\r\n\t\t\t\t\tdamage.primary.value += static_cast(damage.primary.value * augmentPercent);\r\n\t\t\t\t\tdamage.secondary.value += static_cast(damage.secondary.value * augmentPercent);\r\n\t\t\t\t} else if (augment->type != Augment_t::Cooldown) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7ecbae8c12ea19b6", + "equalIndicator/v1": "6693b48028ebf3d6562a8a1e689d2a04c3649037e2861cad34d07e25cd4a0b2f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 363, + "startColumn": 59, + "charOffset": 9902, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 361, + "startColumn": 1, + "charOffset": 9839, + "charLength": 176, + "snippet": { + "text": "}\r\n\r\nvoid Creature::onCreatureAppear(std::shared_ptr creature, bool isLogin) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (creature == getCreature()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1649ee3236181acc", + "equalIndicator/v1": "669b69e4cc15d9ff1291caf27accc637f467ccec75f87389cfa4eb5ef3604b2e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8890, + "startColumn": 2, + "charOffset": 282436, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8888, + "startColumn": 1, + "charOffset": 282395, + "charLength": 167, + "snippet": { + "text": "\r\n\tuint8_t slotBossId = msg.getByte();\r\n\tuint32_t selectedBossId = msg.get();\r\n\r\n\tg_game().playerBosstiarySlot(player->getID(), slotBossId, selectedBossId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "53141a25f61aef86", + "equalIndicator/v1": "66a1e004d0bd3fcd745e91bfdf88b48f2193c7cbf44bad2bb1899d15701e22fa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1829, + "startColumn": 3, + "charOffset": 55680, + "charLength": 16, + "snippet": { + "text": "ObjectCategory_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1827, + "startColumn": 1, + "charOffset": 55554, + "charLength": 290, + "snippet": { + "text": "\t\tg_game().playerSetManagedContainer(player->getID(), category, pos, itemId, stackpos, false);\r\n\t} else if (action == 5) {\r\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\r\n\t\tg_game().playerClearManagedContainer(player->getID(), category, false);\r\n\t} else if (action == 6) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "809cc00c0f82676c", + "equalIndicator/v1": "66a3ad74559624492e98f0fce6e9896e73baab03c6ae6b7b1a941eb6828834fd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 988, + "startColumn": 58, + "charOffset": 37606, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 986, + "startColumn": 1, + "charOffset": 37544, + "charLength": 198, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnWalk(std::shared_ptr player, Direction &dir) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::eventOnWalk - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c4c7570beb1d2958", + "equalIndicator/v1": "66a85bf96dd4ee12c460afa462b43a9fa89c60c0c1b1cfc947a7703348bb49ca" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 807, + "startColumn": 54, + "charOffset": 25630, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 805, + "startColumn": 1, + "charOffset": 25572, + "charLength": 181, + "snippet": { + "text": "}\r\n\r\nvoid Party::addPlayerHealing(std::shared_ptr player, uint64_t amount) {\r\n\tauto playerAnalyzer = getPlayerPartyAnalyzerStruct(player->getID());\r\n\tif (!playerAnalyzer) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "91faf3aff5a06afb", + "equalIndicator/v1": "67020d22b9a8bd8e0d373aa0d2b1ae02a684b41ee045b9d8a5333b2ce24a43e9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1925, + "startColumn": 2, + "charOffset": 58622, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1923, + "startColumn": 1, + "charOffset": 58527, + "charLength": 245, + "snippet": { + "text": "void ProtocolGame::parseHouseWindow(NetworkMessage &msg) {\r\n\tuint8_t doorId = msg.getByte();\r\n\tuint32_t id = msg.get();\r\n\tconst std::string text = msg.getString();\r\n\tg_game().playerUpdateHouseWindow(player->getID(), doorId, id, text);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b40af9ed34351ac8", + "equalIndicator/v1": "670a050dace1c2bc7376b516650e8e1a812698b755400c87e1ac44c5eea65115" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 415, + "startColumn": 8, + "charOffset": 10342, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 413, + "startColumn": 1, + "charOffset": 10234, + "charLength": 229, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetImbuementSlot(lua_State* L) {\r\n\t// itemType:getImbuementSlot()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->imbuementSlot);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c7a861edf10c82f1", + "equalIndicator/v1": "672586d7d1c2dc6a54947d655a02c9871c47dcfb7214d6ddd3f33fb0663ac932" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3596, + "startColumn": 39, + "charOffset": 111681, + "charLength": 27, + "snippet": { + "text": "Weapons::getMaxWeaponDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3594, + "startColumn": 1, + "charOffset": 111387, + "charLength": 498, + "snippet": { + "text": "\t\t\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\r\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\r\n\t\t\t\tmaxDamage += static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, it.abilities->elementDamage, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\r\n\t\t\t}\r\n\t\t\tmsg.add(maxDamage >> 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a07fb0f75824f258", + "equalIndicator/v1": "6737ac69ab0d8f16277e3569e659587fd6fee1d6d7295fab819c12683e8d65e6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2078, + "startColumn": 58, + "charOffset": 61404, + "charLength": 7, + "snippet": { + "text": "oldItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2076, + "startColumn": 1, + "charOffset": 61331, + "charLength": 178, + "snippet": { + "text": "\r\n// inventory\r\nvoid Player::onUpdateInventoryItem(std::shared_ptr oldItem, std::shared_ptr newItem) {\r\n\tif (oldItem != newItem) {\r\n\t\tonRemoveInventoryItem(oldItem);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "67b82e07c327275d", + "equalIndicator/v1": "673ee4c39ecb8cd6adfb9163f3d76840d52d3d203bfddaf45cbb26da38492462" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5157, + "startColumn": 48, + "charOffset": 152209, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5155, + "startColumn": 1, + "charOffset": 152157, + "charLength": 288, + "snippet": { + "text": "}\r\n\r\nbool Player::hasKilled(std::shared_ptr player) const {\r\n\tfor (const auto &kill : unjustifiedKills) {\r\n\t\tif (kill.target == player->getGUID() && (time(nullptr) - kill.time) < g_configManager().getNumber(ORANGE_SKULL_DURATION, __FUNCTION__) * 24 * 60 * 60 && kill.unavenged) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "27044835c5d59e70", + "equalIndicator/v1": "674dc0633cb27665e7a5c6a5c8c924f9fab5151efbcec201aa9b5cc6d0d155df" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7550, + "startColumn": 48, + "charOffset": 263078, + "charLength": 5, + "snippet": { + "text": "charm" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7548, + "startColumn": 1, + "charOffset": 262928, + "charLength": 429, + "snippet": { + "text": "\t activeCharm != CHARM_NONE) {\r\n\t\tconst auto charm = g_iobestiary().getBestiaryCharm(activeCharm);\r\n\t\tint8_t chance = charm->id == CHARM_CRIPPLE ? charm->chance : charm->chance + attackerPlayer->getCharmChanceModifier();\r\n\t\tg_logger().debug(\"charm chance: {}, base: {}, bonus: {}\", chance, charm->chance, attackerPlayer->getCharmChanceModifier());\r\n\t\tif (charm->type == CHARM_OFFENSIVE && (chance >= normal_random(0, 100))) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5b49e82189b507ab", + "equalIndicator/v1": "6752377aa8df2f997ee0b20e4a4ba2685b8509363d92e6b04e05e5788b7ff0ff" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'targetCreature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'targetCreature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/creaturecallback.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 18, + "startColumn": 82, + "charOffset": 567, + "charLength": 14, + "snippet": { + "text": "targetCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 16, + "startColumn": 1, + "charOffset": 451, + "charLength": 234, + "snippet": { + "text": "class CreatureCallback {\r\npublic:\r\n\tCreatureCallback(LuaScriptInterface* scriptInterface, std::shared_ptr targetCreature) :\r\n\t\tscriptInterface(scriptInterface), m_targetCreature(targetCreature) {};\r\n\t~CreatureCallback() { }\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "19d76f601efbe9cd", + "equalIndicator/v1": "6771aa2bd92c731e5211fd09c3ba9264457e81e3ea9b94e73eb4d77abfa35a44" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1651, + "startColumn": 65, + "charOffset": 49079, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1649, + "startColumn": 1, + "charOffset": 49010, + "charLength": 125, + "snippet": { + "text": "}\r\n\r\nvoid Player::sendRemoveContainerItem(std::shared_ptr container, uint16_t slot) {\r\n\tif (!client) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "659b73e8c0f81708", + "equalIndicator/v1": "6785a33ef3f15faa3c0461077ba09d35dd757802f345f2ccf623d0a5b854f430" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')", + "markdown": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5768, + "startColumn": 25, + "charOffset": 170223, + "charLength": 8, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5766, + "startColumn": 1, + "charOffset": 170095, + "charLength": 349, + "snippet": { + "text": "\t\tauto monthMax = ((isRed ? 2 : 1) * g_configManager().getNumber(MONTH_KILLS_TO_RED, __FUNCTION__));\r\n\r\n\t\tuint8_t dayProgress = std::min(std::round(dayKills / dayMax * 100), 100.0);\r\n\t\tuint8_t weekProgress = std::min(std::round(weekKills / weekMax * 100), 100.0);\r\n\t\tuint8_t monthProgress = std::min(std::round(monthKills / monthMax * 100), 100.0);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2111a6aca4a12ab5", + "equalIndicator/v1": "67a40339c1f714d4964f6e2b1b1eba64c1393db1fee1b39926a3dce178b0cab0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 942, + "startColumn": 7, + "charOffset": 35971, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 940, + "startColumn": 1, + "charOffset": 35824, + "charLength": 265, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnInventoryUpdate(std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool equip) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[{}] Call stack overflow\", __FUNCTION__);\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e9a5c0487ae8f27d", + "equalIndicator/v1": "67a43df932e0a580c99f9ed3bd0195b314d4b22165b42a8a404cec9b58c54f7b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 830, + "startColumn": 71, + "charOffset": 26971, + "charLength": 11, + "snippet": { + "text": "attackValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 828, + "startColumn": 1, + "charOffset": 26854, + "charLength": 182, + "snippet": { + "text": "\r\n\tint32_t minValue = player->getLevel() / 5;\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue);\r\n\tif (maxDamage) {\r\n\t\treturn -maxValue;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "32a289197bb1e990", + "equalIndicator/v1": "67d60e723ebc24ba0d9b7f1ff8097d7b1ca122e746de7528899a5feaccce7959" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9789, + "startColumn": 40, + "charOffset": 342716, + "charLength": 3, + "snippet": { + "text": "npc" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9787, + "startColumn": 1, + "charOffset": 342672, + "charLength": 82, + "snippet": { + "text": "}\r\n\r\nvoid Game::addNpc(std::shared_ptr npc) {\r\n\tnpcs[npc->getID()] = npc;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7b9d4712ecee4314", + "equalIndicator/v1": "6804e87afd32eb85ea4e1ff6ebc565e9d863ecd172da83d1399b1ff543cb8e55" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Std::move of the const variable 'initName' has no effect; remove std::move() or make the variable non-const", + "markdown": "Std::move of the const variable 'initName' has no effect; remove std::move() or make the variable non-const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creatures_definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1417, + "startColumn": 8, + "charOffset": 37380, + "charLength": 9, + "snippet": { + "text": "std::move" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1415, + "startColumn": 1, + "charOffset": 37272, + "charLength": 170, + "snippet": { + "text": "\tVIPGroupEntry(uint8_t initId, const std::string &initName, bool initCustomizable) :\r\n\t\tid(initId),\r\n\t\tname(std::move(initName)),\r\n\t\tcustomizable(initCustomizable) { }\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b855f114bf65c4f5", + "equalIndicator/v1": "68274ca7542aef287c0b68228931708b77d17782f0d146167ceed10ed18963a4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1906, + "startColumn": 2, + "charOffset": 57912, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1904, + "startColumn": 1, + "charOffset": 57854, + "charLength": 221, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseAttack(NetworkMessage &msg) {\r\n\tuint32_t creatureId = msg.get();\r\n\t// msg.get(); creatureId (same as above)\r\n\tg_game().playerSetAttackedCreature(player->getID(), creatureId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b3c713caa7fc9898", + "equalIndicator/v1": "6849494cc12d1619f868aeb8aeadab61b138971f75f38034e5451801b88ea7a6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 913, + "startColumn": 21, + "charOffset": 29487, + "charLength": 4, + "snippet": { + "text": "-max" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 911, + "startColumn": 1, + "charOffset": 29361, + "charLength": 164, + "snippet": { + "text": "\r\n\t// Returns the calculated maximum damage or a random value between the calculated minimum and maximum\r\n\treturn maxDamage ? -max : -normal_random(min, max);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "416d1f3db1e4e6dc", + "equalIndicator/v1": "685de3de7e532ad321f2ed884f8acf66f0c631fef270b3fc1b5d7adf75f5fdbb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 365, + "startColumn": 14, + "charOffset": 9013, + "charLength": 12, + "snippet": { + "text": "std::tolower" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 363, + "startColumn": 1, + "charOffset": 8956, + "charLength": 84, + "snippet": { + "text": "\t\t\tresult += std::toupper(ch);\r\n\t\t} else {\r\n\t\t\tresult += std::tolower(ch);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f630beebab9279ba", + "equalIndicator/v1": "685f05250e8a0ec62b5408064ef67e7287dd5c2fe07952497e3ec7f8d72f1639" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 584, + "startColumn": 13, + "charOffset": 27857, + "charLength": 11, + "snippet": { + "text": "stringValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 582, + "startColumn": 1, + "charOffset": 27667, + "charLength": 447, + "snippet": { + "text": "\t} else if (stringValue == \"absorbpercentfire\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentpoison\" || stringValue == \"absorbpercentearth\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentice\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "32579405c551ff00", + "equalIndicator/v1": "686a696b7020f4cf49ea5dc6f2a61864521ad03e02ad84670261f485a5099993" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::_Tree, std::less>, std::allocator>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::_Tree, std::less\\>, std::allocator\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 249, + "startColumn": 21, + "charOffset": 6819, + "charLength": 7, + "snippet": { + "text": "npcType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 247, + "startColumn": 1, + "charOffset": 6780, + "charLength": 173, + "snippet": { + "text": "\r\n\tint index = 0;\r\n\tlua_createtable(L, npcType->info.scripts.size(), 0);\r\n\tfor (const std::string &creatureEvent : npcType->info.scripts) {\r\n\t\tpushString(L, creatureEvent);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2ef13d320de496f5", + "equalIndicator/v1": "686ce62ed411323a46423da0c8075ce1e440cb40eae33c6a01dd16e1d14ad40a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 652, + "startColumn": 16, + "charOffset": 33331, + "charLength": 21, + "snippet": { + "text": "IOMarket::getInstance" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 650, + "startColumn": 1, + "charOffset": 33268, + "charLength": 268, + "snippet": { + "text": "\r\n\t// Update active buy offers (market_offers)\r\n\tauto offers = IOMarket::getInstance().getActiveOffers(MARKETACTION_BUY);\r\n\tfor (const auto &offer : offers) {\r\n\t\titemsPriceMap[offer.itemId][offer.tier] = std::max(itemsPriceMap[offer.itemId][offer.tier], offer.price);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "de19aebc6cb6da7e", + "equalIndicator/v1": "68737bbf9aaaf6f58be2d7c6d955835e67f58fb199cbcca8416e9b6cda574b3d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'name' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'name' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 333, + "startColumn": 18, + "charOffset": 12575, + "charLength": 17, + "snippet": { + "text": "const std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 331, + "startColumn": 1, + "charOffset": 12415, + "charLength": 235, + "snippet": { + "text": "\tint32_t getMajorStatConditional(const std::string &instant, WheelMajor_t major) const;\r\n\tint64_t getOnThinkTimer(WheelOnThink_t type) const;\r\n\tbool getInstant(const std::string name) const;\r\n\tdouble getMitigationMultiplier() const;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "65617b9f4f96396e", + "equalIndicator/v1": "687e351269df419d095b9cc16c50c13804e3156751b58292e9cd546c415d42bb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1840, + "startColumn": 175, + "charOffset": 71801, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1838, + "startColumn": 1, + "charOffset": 71622, + "charLength": 279, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::shared_ptr fromCylinder, std::shared_ptr toCylinder, std::shared_ptr item, Position toPos) {\r\n\tif (!player || !toCylinder || !item) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "547286440128a85d", + "equalIndicator/v1": "688b63281d228b85a33d943c3664e017e89ec73f8cdfe45566abcd00df546f36" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 217, + "startColumn": 14, + "charOffset": 6277, + "charLength": 10, + "snippet": { + "text": "scriptName" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 215, + "startColumn": 1, + "charOffset": 6237, + "charLength": 83, + "snippet": { + "text": "\r\n\tstd::string name = \"\";\r\n\tstd::string scriptName = \"\";\r\n\r\n\tuint8_t chance = 100;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3f1bbb5f580fb3ca", + "equalIndicator/v1": "688bc72c9079e47f5ced55ca29933fcf02a968063b70662a29f694bc85b719e0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 177, + "startColumn": 8, + "charOffset": 5448, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 175, + "startColumn": 1, + "charOffset": 5329, + "charLength": 323, + "snippet": { + "text": "\t\t// onCreatureDisappear(self, creature)\r\n\t\tLuaScriptInterface* scriptInterface = mType->info.scriptInterface;\r\n\t\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\t\tg_logger().error(\"[Monster::onCreatureDisappear - Monster {} creature {}] \"\r\n\t\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1db6e44ae9db1f5a", + "equalIndicator/v1": "689cca6b8ac9f9be863d609c1ad26cafc33480c8fe97bdb182d81ddda8903f6c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 54, + "startColumn": 29, + "charOffset": 1503, + "charLength": 12, + "snippet": { + "text": "getContainer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 52, + "startColumn": 1, + "charOffset": 1419, + "charLength": 161, + "snippet": { + "text": "\tstd::shared_ptr clone() const override final;\r\n\r\n\tstd::shared_ptr getContainer() override final {\r\n\t\treturn static_self_cast();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9fe8a8887d9047f4", + "equalIndicator/v1": "68c17c15c5e7a01c8c7c7c7c9b3a6bd127f905ef2071755bcb05178db02bbc4f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1340, + "startColumn": 58, + "charOffset": 45445, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1338, + "startColumn": 1, + "charOffset": 45383, + "charLength": 357, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatCondition(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms) {\r\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\r\n\tif ((caster == target || canCombat) && params.impactEffect != CONST_ME_NONE) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4e8edb5521f9c1e9", + "equalIndicator/v1": "68f0c8bb3894a46a55c3c16ebee92f9230b644d1e5e1c5009e04409a06ede10e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int_fast32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int_fast32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1766, + "startColumn": 34, + "charOffset": 53004, + "charLength": 2, + "snippet": { + "text": "dx" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1764, + "startColumn": 1, + "charOffset": 52941, + "charLength": 91, + "snippet": { + "text": "\tfloat tan;\r\n\tif (dx != 0) {\r\n\t\ttan = static_cast(dy) / dx;\r\n\t} else {\r\n\t\ttan = 10;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "81ec756a34002e96", + "equalIndicator/v1": "68f369fdd297d6b6666d1d53864e4caa10df2741b2c45b02d01b2c60ab9a6267" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float'", + "markdown": "Narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 651, + "startColumn": 29, + "charOffset": 17601, + "charLength": 58, + "snippet": { + "text": "(100 - creature->getIncreasePercent(indexToCombatType(i)))" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 649, + "startColumn": 1, + "charOffset": 17554, + "charLength": 147, + "snippet": { + "text": "\t\t\tcontinue;\r\n\t\t}\r\n\t\tsetIncrease(i, std::round((100 - creature->getIncreasePercent(indexToCombatType(i))) * increasePercentValue / 100.f));\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "50f97e4349d69bdd", + "equalIndicator/v1": "68f9d51082f3a456b40512a48fc723631dd27c07a3502e22ee5d9ac435fac101" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4569, + "startColumn": 74, + "charOffset": 144151, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4567, + "startColumn": 1, + "charOffset": 144073, + "charLength": 156, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendContainer(uint8_t cid, std::shared_ptr container, bool hasParent, uint16_t firstIndex) {\r\n\tif (!player) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7198e2a605d37833", + "equalIndicator/v1": "692074324d8abdbab88d75f1d27d4b05393dcf1c47867794f2d227b9fcbeb162" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 437, + "startColumn": 8, + "charOffset": 10874, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 435, + "startColumn": 1, + "charOffset": 10772, + "charLength": 220, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetWeaponType(lua_State* L) {\r\n\t// itemType:getWeaponType()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->weaponType);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e1de2bfca2abde49", + "equalIndicator/v1": "6928b961893bb95d01a28db6ed1bad89b28ae8250f90d9e3404de7d8a7569d6e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 94, + "startColumn": 30, + "charOffset": 2996, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 92, + "startColumn": 1, + "charOffset": 2927, + "charLength": 159, + "snippet": { + "text": "\r\n\t\t// Loop through items in container\r\n\t\tfor (std::shared_ptr item : container->getItemList()) {\r\n\t\t\tif (!item) {\r\n\t\t\t\tcontinue; // Check for null item\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f02b7a9138fdd5ba", + "equalIndicator/v1": "6929c2d9a2eb66e66afaaccd15e6cd6318a54b9fe07c9e99c47c860dc111d4f8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1491, + "startColumn": 26, + "charOffset": 44512, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1489, + "startColumn": 1, + "charOffset": 44341, + "charLength": 214, + "snippet": { + "text": "\tvoid sendToChannel(std::shared_ptr creature, SpeakClasses type, const std::string &text, uint16_t channelId) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendToChannel(creature, type, text, channelId);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b56bff71c58f3555", + "equalIndicator/v1": "6945e6a0b70611030a98bda77f8b1e48058830b50cacebda69cfd8e10affbbc2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1853, + "startColumn": 66, + "charOffset": 50096, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1851, + "startColumn": 1, + "charOffset": 50026, + "charLength": 134, + "snippet": { + "text": "}\r\n\r\nbool ConditionFeared::getFleeDirection(std::shared_ptr creature) {\r\n\tPosition creaturePos = creature->getPosition();\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d2207832b488e3bb", + "equalIndicator/v1": "6962b0a69e86c517f91fc9278c6f0c0a5dae87c62af89f4b57e6aa1689f9d86b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1551, + "startColumn": 3, + "charOffset": 54561, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1549, + "startColumn": 1, + "charOffset": 54443, + "charLength": 168, + "snippet": { + "text": "\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r\n\t\treturn;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a21bc347e3d74978", + "equalIndicator/v1": "6976d824bbca0b842dc4424c4014352d261682fc9847ad79cb85bde78395de84" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'toCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'toCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1840, + "startColumn": 141, + "charOffset": 71767, + "charLength": 10, + "snippet": { + "text": "toCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1838, + "startColumn": 1, + "charOffset": 71622, + "charLength": 279, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::shared_ptr fromCylinder, std::shared_ptr toCylinder, std::shared_ptr item, Position toPos) {\r\n\tif (!player || !toCylinder || !item) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6c2723b40251449e", + "equalIndicator/v1": "69790d4c772068de8050992ae29246618833b58cf1147038d25a04723c3187c5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 918, + "startColumn": 70, + "charOffset": 35026, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 916, + "startColumn": 1, + "charOffset": 34952, + "charLength": 225, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnRequestQuestLine(std::shared_ptr player, uint16_t questId) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnRequestQuestLine - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "59eeb1d6d3d938c6", + "equalIndicator/v1": "69a01a01c7e005adbf2ff1e6d6c5e4b244b6acfd5a1058e30dccd10ead8ffc42" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1768, + "startColumn": 7, + "charOffset": 61678, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1766, + "startColumn": 1, + "charOffset": 61516, + "charLength": 360, + "snippet": { + "text": "bool ChainPickerCallback::onChainCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\t// onChainCombat(creature, target)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[ChainPickerCallback::onTargetCombat - Creature {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3307ceaf20c99f0a", + "equalIndicator/v1": "69a9b24c764118ff4bc7e30673d2195ff021b224d84490504c9eb7eaed11ea4a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 347, + "startColumn": 8, + "charOffset": 8662, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 345, + "startColumn": 1, + "charOffset": 8562, + "charLength": 194, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetStackSize(lua_State* L) {\r\n\t// itemType:getStackSize()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (!itemType) {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a43741fed6b71dfb", + "equalIndicator/v1": "69ae1cc5368add68948f84e14f38d4fc6646601ff606c4fb0a7c76fdd1a7227b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 805, + "startColumn": 7, + "charOffset": 30853, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 803, + "startColumn": 1, + "charOffset": 30728, + "charLength": 276, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnGainSkillTries(std::shared_ptr player, skills_t skill, uint64_t &tries) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnGainSkillTries - \"\r\n\t\t \"Player {} skill {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "141df54c99b543a6", + "equalIndicator/v1": "69ae84d3a56aea27d92e5b32e0bf22e91efc5c97fceb8109d76ec66d756cd690" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'getStowableItems' is within a recursive call chain", + "markdown": "Function 'getStowableItems' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 131, + "startColumn": 31, + "charOffset": 3966, + "charLength": 16, + "snippet": { + "text": "getStowableItems" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 129, + "startColumn": 1, + "charOffset": 3931, + "charLength": 128, + "snippet": { + "text": "}\r\n\r\nStashContainerList Container::getStowableItems() const {\r\n\tStashContainerList toReturnList;\r\n\tfor (auto item : itemlist) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c518b54e3eb2e0f3", + "equalIndicator/v1": "69b9f179a366d1f0bcf57c0b9d81ab10bac14780dda8f2dfccf15efb516c980a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 32, + "startColumn": 9, + "charOffset": 967, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 30, + "startColumn": 1, + "charOffset": 834, + "charLength": 165, + "snippet": { + "text": "\tchar* v = reinterpret_cast(buffer) + info.position; // does not break strict aliasing\r\n\tinfo.position += stringLen;\r\n\treturn std::string(v, stringLen);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f19d493e64e03dc5", + "equalIndicator/v1": "69c910c7b2cfd1e1aa019a84fa537913fceb5d56bfb4acc48692323cdcc4978c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/rewardchest.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 23, + "startColumn": 14, + "charOffset": 684, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 21, + "startColumn": 1, + "charOffset": 639, + "charLength": 340, + "snippet": { + "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) final;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7c4c83195fae80b8", + "equalIndicator/v1": "69cab1acc60f7b7482c91a1a201d8892054ff480398ae11fc72db7d782198ba1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 88, + "startColumn": 10, + "charOffset": 2227, + "charLength": 11, + "snippet": { + "text": "attackSpeed" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 86, + "startColumn": 1, + "charOffset": 2180, + "charLength": 128, + "snippet": { + "text": "\r\n\tuint32_t getAttackSpeed() const {\r\n\t\treturn attackSpeed / g_configManager().getFloat(RATE_ATTACK_SPEED, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bc53ff9fbd662b97", + "equalIndicator/v1": "69d49e28f5a3b33414c6033d58b84ca469eba0bd9b4d471698e5cd10b61e09b3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2305, + "startColumn": 71, + "charOffset": 80180, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2303, + "startColumn": 1, + "charOffset": 80105, + "charLength": 155, + "snippet": { + "text": "}\r\n\r\nint32_t PlayerWheel::checkTwinBurstByTarget(std::shared_ptr target) const {\r\n\tif (!target || target == m_player.getPlayer()) {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "41ee9cd98d460784", + "equalIndicator/v1": "69d6730852b7db4d5c9d4b0530cb3828d2ae7b6adeee51e364983a9a5945173b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 256, + "startColumn": 25, + "charOffset": 7182, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 254, + "startColumn": 1, + "charOffset": 7078, + "charLength": 197, + "snippet": { + "text": "\t\tweapon->setMinChange(getNumber(L, 2));\r\n\t\tif (lua_gettop(L) > 2) {\r\n\t\t\tweapon->setMaxChange(getNumber(L, 3));\r\n\t\t} else {\r\n\t\t\tweapon->setMaxChange(getNumber(L, 2));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e9e00e5314e7946d", + "equalIndicator/v1": "6a404488771aabd9d75ba57beace3058b828e3fb197c0dd0473ed8fc1a3c0567" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4693, + "startColumn": 7, + "charOffset": 148111, + "charLength": 31, + "snippet": { + "text": "auto [category, containersPair]" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4691, + "startColumn": 1, + "charOffset": 148059, + "charLength": 167, + "snippet": { + "text": "\tmsg.skipBytes(1);\r\n\tuint8_t containers = 0;\r\n\tfor (auto [category, containersPair] : managedContainersMap) {\r\n\t\tif (!isValidObjectCategory(category)) {\r\n\t\t\tcontinue;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3071f8188a318bb1", + "equalIndicator/v1": "6ae1938f595111810ae4da3501d720ba5e78f2a541593cb21e39794d4283f6f5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 227, + "startColumn": 7, + "charOffset": 8131, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 225, + "startColumn": 1, + "charOffset": 8119, + "charLength": 209, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventCreatureOnChangeOutfit - Creature {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4ba606b46c6e1ccf", + "equalIndicator/v1": "6b4075f9b472c46b92c59140cee36da5dd2b767aa0ffd8cf4b6f0f0da4aa9fcf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1261, + "startColumn": 10, + "charOffset": 34947, + "charLength": 9, + "snippet": { + "text": "manaTicks" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1259, + "startColumn": 1, + "charOffset": 34899, + "charLength": 129, + "snippet": { + "text": "\r\n\tif (player != nullptr && isBuff) {\r\n\t\treturn manaTicks / g_configManager().getFloat(RATE_SPELL_COOLDOWN, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6957928e76c4b50e", + "equalIndicator/v1": "6b4686e5f80c6e6ba52af5ecf9e8a89886ccdc48156a1dde4a67698787e1eade" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 737, + "startColumn": 7, + "charOffset": 28477, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 735, + "startColumn": 1, + "charOffset": 28319, + "charLength": 310, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnGainExperience(std::shared_ptr player, std::shared_ptr target, uint64_t &exp, uint64_t rawExp) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnGainExperience - \"\r\n\t\t \"Player {} target {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a92553c2411f7cb4", + "equalIndicator/v1": "6b4a52b4049ec54d6d5a546a74b34bf7842192edfe648cadc244cb001f193350" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '__METHOD_NAME__', which is a reserved identifier", + "markdown": "Declaration uses identifier '__METHOD_NAME__', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/pch.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 182, + "startColumn": 2, + "charOffset": 4173, + "charLength": 55, + "snippet": { + "text": "#define __METHOD_NAME__ methodName(__PRETTY_FUNCTION__)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 180, + "startColumn": 1, + "charOffset": 4125, + "charLength": 179, + "snippet": { + "text": "\r\n#if defined(__GNUC__) || defined(__clang__)\r\n\t#define __METHOD_NAME__ methodName(__PRETTY_FUNCTION__)\r\n#elif defined(_MSC_VER)\r\n\t#define __METHOD_NAME__ methodName(__FUNCSIG__)\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "64abb4eaa9ce2fc6", + "equalIndicator/v1": "6b4e4e719a0b3abb3cdcea040c927e3aa1ef538195412e18ac1e5ec0fa7e8398" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8588, + "startColumn": 2, + "charOffset": 270879, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8586, + "startColumn": 1, + "charOffset": 270872, + "charLength": 125, + "snippet": { + "text": "\t}\r\n\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t itemTier = 0;\r\n\tif (Item::items[itemId].upgradeClassification > 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2c058415ea678f06", + "equalIndicator/v1": "6b8a269e4dc8448f80561b9658d179a554a66961111933454f61d6dd21e3e510" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 572, + "startColumn": 39, + "charOffset": 26955, + "charLength": 14, + "snippet": { + "text": "valueAttribute" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 570, + "startColumn": 1, + "charOffset": 26791, + "charLength": 317, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;\r\n\t} else if (stringValue == \"absorbpercentmagic\") {\r\n\t\tint16_t value = pugi::cast(valueAttribute.value());\r\n\t\tAbilities &abilities = itemType.getAbilities();\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0ce35f913ba1f5d4", + "equalIndicator/v1": "6bbe965b27756e1325bb11b422bd8c99d3b932454659cd449cac0d7f78243b67" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 124, + "startColumn": 10, + "charOffset": 3110, + "charLength": 13, + "snippet": { + "text": "getThrowRange" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 122, + "startColumn": 1, + "charOffset": 3095, + "charLength": 71, + "snippet": { + "text": "\t}\r\n\r\n\tint32_t getThrowRange() const override final {\r\n\t\treturn 0;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "19a7c6c82231d09f", + "equalIndicator/v1": "6bd60f1808304a6ca301a0aa4bdb730e38df797bd7ff5041c3c41ed1a5c0379a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 161, + "startColumn": 2, + "charOffset": 4470, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 159, + "startColumn": 1, + "charOffset": 4406, + "charLength": 190, + "snippet": { + "text": "\r\n\tint32_t index = getNumber(L, 4, INDEX_WHEREEVER);\r\n\tuint32_t flags = getNumber(L, 5, 0);\r\n\r\n\tReturnValue ret = g_game().internalAddItem(container, item, index, flags);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "60af0811eb33776b", + "equalIndicator/v1": "6be871e358296586bbb248ed632b5f32d4aa8aa046265faa49b8abc2f94d9ad6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1909, + "startColumn": 50, + "charOffset": 56655, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1907, + "startColumn": 1, + "charOffset": 56505, + "charLength": 168, + "snippet": { + "text": "\tvoid updateInputAnalyzer(CombatType_t type, int32_t amount, std::string target) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendUpdateInputAnalyzer(type, amount, target);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4dec9ecc9ead50ae", + "equalIndicator/v1": "6bf1b42a80da0eeaf35428220b8b7f3356d60e5140f92520f580546472b3f941" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Valty', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Valty', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/vectorset.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 51, + "startColumn": 22, + "charOffset": 1278, + "charLength": 6, + "snippet": { + "text": "_Valty" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 49, + "startColumn": 1, + "charOffset": 1250, + "charLength": 93, + "snippet": { + "text": "\t\t}\r\n\r\n\t\ttemplate \r\n\t\tauto emplace(_Valty &&... v) {\r\n\t\t\tneedUpdate = true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b9814ab7a2c6b926", + "equalIndicator/v1": "6bf2bfaf629be5685ba52beacdf05efcb7d5ff29b4e6da2bf0b4baee42cd2b5c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 583, + "startColumn": 3, + "charOffset": 27720, + "charLength": 8, + "snippet": { + "text": "itemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 581, + "startColumn": 1, + "charOffset": 27538, + "charLength": 526, + "snippet": { + "text": "\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentfire\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentpoison\" || stringValue == \"absorbpercentearth\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += pugi::cast(valueAttribute.value());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "231b7a59d83f7f8a", + "equalIndicator/v1": "6c04a25c59642bfd565deeac35f2715a42eff77d283f945b1dfe3614cfc4b2d8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 77, + "startColumn": 65, + "charOffset": 3104, + "charLength": 34, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 75, + "startColumn": 1, + "charOffset": 2948, + "charLength": 348, + "snippet": { + "text": "\tstd::vector getBestiaryFinished(const std::shared_ptr &player) const;\r\n\r\n\tcharmRune_t getCharmFromTarget(std::shared_ptr player, const std::shared_ptr mtype);\r\n\r\n\tstd::map getBestiaryKillCountByMonsterIDs(std::shared_ptr player, std::map mtype_list) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "190dc287d0c8f1da", + "equalIndicator/v1": "6c06a08fc8b43684cf655e06a251f1d5d9122801335de79273b19c6c0e3323e7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1010, + "startColumn": 62, + "charOffset": 32265, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1008, + "startColumn": 1, + "charOffset": 32199, + "charLength": 128, + "snippet": { + "text": "}\r\n\r\nbool Creature::setAttackedCreature(std::shared_ptr creature) {\r\n\tif (creature) {\r\n\t\tauto monster = getMonster();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b76dc599eafcfd4e", + "equalIndicator/v1": "6c0bbe307f505ca87946d7d670d77bb5e8eac9842eb7651b52a58a2655ecc4ea" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 121, + "startColumn": 21, + "charOffset": 3729, + "charLength": 32, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 119, + "startColumn": 1, + "charOffset": 3647, + "charLength": 435, + "snippet": { + "text": "\tvoid clearPosMap(std::map &map);\r\n\r\n\tbool registerEvent(const std::shared_ptr moveEvent, int32_t id, std::map &moveListMap) const;\r\n\tbool registerEvent(const std::shared_ptr moveEvent, const Position &position, std::map &moveListMap) const;\r\n\tstd::shared_ptr getEvent(const std::shared_ptr &tile, MoveEvent_t eventType);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bc5ab8901161bdf8", + "equalIndicator/v1": "6c11518f6edd2d4d2f1b9e316c3c88c2ba77bba52b5aa94a82a89109f84f855a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 459, + "startColumn": 7, + "charOffset": 16372, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 457, + "startColumn": 1, + "charOffset": 16360, + "charLength": 136, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPartyOnLeave - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7f6de6624d243893", + "equalIndicator/v1": "6c1705793dd3cb14307d7e8ddba531ad5a7d52de59b15c1c3f3482a9da63818d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4424, + "startColumn": 89, + "charOffset": 159245, + "charLength": 5, + "snippet": { + "text": "house" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4422, + "startColumn": 1, + "charOffset": 159152, + "charLength": 174, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Game::wrapItem(std::shared_ptr item, std::shared_ptr house) {\r\n\tuint16_t hiddenCharges = 0;\r\n\tuint16_t amount = item->getItemCount();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ac9a14f846d1853b", + "equalIndicator/v1": "6c23319fe33ae356166d05fd50a191dd6746afbdd158dca2c882ff9eecc6ca98" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3256, + "startColumn": 63, + "charOffset": 99793, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3254, + "startColumn": 1, + "charOffset": 99726, + "charLength": 135, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureIcon(std::shared_ptr creature) {\r\n\tif (!creature || !player || oldProtocol) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "896d7f40911ba863", + "equalIndicator/v1": "6c3a1a0af5b686d3ecd5ae2764d0b95c2ab203bd0f385ba12979a7357212f966" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8163, + "startColumn": 84, + "charOffset": 258189, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8161, + "startColumn": 1, + "charOffset": 258101, + "charLength": 187, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::MoveDownCreature(NetworkMessage &msg, std::shared_ptr creature, const Position &newPos, const Position &oldPos) {\r\n\tif (creature != player) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eb337d3f332861da", + "equalIndicator/v1": "6c6253c2eb2de8d639a2d2940afba89b9e142a5d5bf4aa0cd58e5f99366db796" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6108, + "startColumn": 51, + "charOffset": 211133, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6106, + "startColumn": 1, + "charOffset": 211078, + "charLength": 158, + "snippet": { + "text": "}\r\n\r\nbool Game::playerSaySpell(std::shared_ptr player, SpeakClasses type, const std::string &text) {\r\n\tif (player->walkExhausted()) {\r\n\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9ac3ff3903f3987a", + "equalIndicator/v1": "6cac23fcf63c11072b9b08a95b2f2f40730b7dcf0cdd6d8676b36511e45c7a90" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 147, + "startColumn": 50, + "charOffset": 4529, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 145, + "startColumn": 1, + "charOffset": 4475, + "charLength": 167, + "snippet": { + "text": "}\r\n\r\nvoid Npc::onPlayerAppear(std::shared_ptr player) {\r\n\tif (player->hasFlag(PlayerFlags_t::IgnoredByNpcs) || playerSpectators.contains(player)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8425648025948950", + "equalIndicator/v1": "6caedfc6434b93d20c8c29a97aba96ef32ea37bb05f82de3852f89649b779d5f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 927, + "startColumn": 41, + "charOffset": 35413, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 925, + "startColumn": 1, + "charOffset": 35367, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1ce647d932d46d4a", + "equalIndicator/v1": "6cc6aac323b8c87cc1fbd51ffb38de8058904daf0dc0a5049f1c9359f4a660b1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 919, + "startColumn": 7, + "charOffset": 35067, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 917, + "startColumn": 1, + "charOffset": 34955, + "charLength": 267, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnRequestQuestLine(std::shared_ptr player, uint16_t questId) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnRequestQuestLine - \"\r\n\t\t \"Player {} questId {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e18f24993e120630", + "equalIndicator/v1": "6ce15e2708401d22124a7eaa5e9585224aa133b8cdef43b40bf609408a85c299" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1766, + "startColumn": 32, + "charOffset": 47238, + "charLength": 26, + "snippet": { + "text": "LUA_ERROR_PLAYER_NOT_FOUND" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1764, + "startColumn": 1, + "charOffset": 47122, + "charLength": 185, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (!player) {\r\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\r\n\t\tpushBoolean(L, false);\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "78223711a98f8f73", + "equalIndicator/v1": "6ce4f7f03a90d2bdc694a47027c9e50507c565f7fedcfba31d07c698ebb08a8f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 43, + "startColumn": 7, + "charOffset": 1967, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 41, + "startColumn": 1, + "charOffset": 1806, + "charLength": 315, + "snippet": { + "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n};\r\n" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "051903942b2f6ed6", + "equalIndicator/v1": "6ce5fc3467c48dbc5101a711216dc9470e6216cb26fa89b0dddfd64699fcee85" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioguild.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 71, + "startColumn": 3, + "charOffset": 2401, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 69, + "startColumn": 1, + "charOffset": 2390, + "charLength": 134, + "snippet": { + "text": "\r\n\tdo {\r\n\t\tuint32_t guild1 = result->getNumber(\"guild1\");\r\n\t\tif (guildId != guild1) {\r\n\t\t\tguildWarVector.push_back(guild1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7980a7cf5f007b07", + "equalIndicator/v1": "6cf481b298a928c5b401525db55a03593576a74057f76df4aa6a2fc5588ca812" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 244, + "startColumn": 30, + "charOffset": 7421, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 242, + "startColumn": 1, + "charOffset": 7255, + "charLength": 266, + "snippet": { + "text": "bool PlayerTitle::checkBestiary(const std::string &name, uint16_t race, bool isBoss /* = false*/, uint32_t amount) {\r\n\tif (race == 0) {\r\n\t\tif (name == \"Executioner\") {\r\n\t\t\t// todo check if player has unlocked all bestiary\r\n\t\t} else if (name == \"Boss Executioner\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "97bd5d9def354cba", + "equalIndicator/v1": "6d0a284204da0662c79079f594c0753f96b18aa27e327435da0d1abd35c9c08d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 172, + "startColumn": 15, + "charOffset": 5986, + "charLength": 10, + "snippet": { + "text": "removeItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 170, + "startColumn": 1, + "charOffset": 5938, + "charLength": 171, + "snippet": { + "text": "\tvoid stopDecaying() override;\r\n\r\n\tvirtual void removeItem(std::shared_ptr thing, bool sendUpdateToClient = false);\r\n\r\n\tuint32_t getOwnerId() const override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7e1f97b3415cb78e", + "equalIndicator/v1": "6d13658d5b790e00a8898393965bb3857b7f7a43e93d85635950482f23471479" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 356, + "startColumn": 82, + "charOffset": 16980, + "charLength": 14, + "snippet": { + "text": "const uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 354, + "startColumn": 1, + "charOffset": 16775, + "charLength": 519, + "snippet": { + "text": "\tvoid playerMoveUpContainer(uint32_t playerId, uint8_t cid);\r\n\tvoid playerUpdateContainer(uint32_t playerId, uint8_t cid);\r\n\tvoid playerRotateItem(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerConfigureShowOffSocket(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerSetShowOffSocket(uint32_t playerId, Outfit_t &outfit, const Position &pos, uint8_t stackPos, const uint16_t itemId, uint8_t podiumVisible, uint8_t direction);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ff46fb4d148be6cc", + "equalIndicator/v1": "6d5d627ff21ed8b27aee82ead133fa9153cab8e27bfe65001c708de57c71fb62" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 153, + "startColumn": 28, + "charOffset": 4131, + "charLength": 29, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 151, + "startColumn": 1, + "charOffset": 3978, + "charLength": 330, + "snippet": { + "text": "\tReturnValue canUseFar(std::shared_ptr creature, const Position &toPos, bool checkLineOfSight, bool checkFloor);\r\n\r\n\tbool registerLuaItemEvent(const std::shared_ptr action);\r\n\tbool registerLuaUniqueEvent(const std::shared_ptr action);\r\n\tbool registerLuaActionEvent(const std::shared_ptr action);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6997594f772272b4", + "equalIndicator/v1": "6d75e364eb9303810016c16557e225b01a963904e4d491db3b398359bd163aaa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2051, + "startColumn": 58, + "charOffset": 60749, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2049, + "startColumn": 1, + "charOffset": 60687, + "charLength": 103, + "snippet": { + "text": "}\r\n\r\nvoid Player::onCloseContainer(std::shared_ptr container) {\r\n\tif (!client) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7922279f35faed7f", + "equalIndicator/v1": "6d8a07cfabfa28133fba2c67cd0f01eb06459e77d83a14b9dd9019a4317857ee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 186, + "startColumn": 41, + "charOffset": 6885, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 184, + "startColumn": 1, + "charOffset": 6839, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e635aee8f50dfbd7", + "equalIndicator/v1": "6d946befef12d0bf59d09c80c5c75b066e986b1e839092e9493c8bc55a49609a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::basic_string::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::basic_string::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2047, + "startColumn": 29, + "charOffset": 54771, + "charLength": 8, + "snippet": { + "text": "uint64_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2045, + "startColumn": 1, + "charOffset": 54659, + "charLength": 213, + "snippet": { + "text": "int PlayerFunctions::luaPlayerAddMoney(lua_State* L) {\r\n\t// player:addMoney(money)\r\n\tuint64_t money = getNumber(L, 2);\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (player) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d4b1458d998289fe", + "equalIndicator/v1": "6daa92bd36dd6d55a742cafcd920b141cd59f179fb6d47a1c00a81e8ae7d85e4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 197, + "startColumn": 56, + "charOffset": 6123, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 195, + "startColumn": 1, + "charOffset": 6063, + "charLength": 260, + "snippet": { + "text": "}\r\n\r\nvoid Weapon::internalUseWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target, int32_t damageModifier, int32_t cleavePercent) const {\r\n\tif (player) {\r\n\t\tif (params.soundCastEffect == SoundEffect_t::SILENCE) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5dffedf23a54884d", + "equalIndicator/v1": "6dd564378eeedf601c8e76509e1380ff9d390de5398ce2ca814a2ec0ff5fd70f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 897, + "startColumn": 61, + "charOffset": 32499, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 895, + "startColumn": 1, + "charOffset": 32434, + "charLength": 238, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnReportBug(std::shared_ptr player, const std::string &message, const Position &position, uint8_t category) {\r\n\t// Player:onReportBug(message, position, category)\r\n\tif (info.playerOnReportBug == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5e6dda52eea85ea0", + "equalIndicator/v1": "6ddab777e2468b22f09db05184613b92c8af061817422ecfb140db041e51899e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 351, + "startColumn": 9, + "charOffset": 12158, + "charLength": 29, + "snippet": { + "text": "auto [category, containerMap]" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 349, + "startColumn": 1, + "charOffset": 12092, + "charLength": 190, + "snippet": { + "text": "\t\t\tuint32_t lootFlags = 0;\r\n\t\t\tuint32_t obtainFlags = 0;\r\n\t\t\tfor (auto [category, containerMap] : player->m_managedContainers) {\r\n\t\t\t\tif (!isValidObjectCategory(category)) {\r\n\t\t\t\t\tcontinue;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2d8ecbd7f17095d6", + "equalIndicator/v1": "6e22aac5a75620a4a25e2713d1eaee327e914a70c15e31d1eac6109302d77563" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/network/webhook_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 27, + "startColumn": 43, + "charOffset": 1062, + "charLength": 5, + "snippet": { + "text": "color" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 25, + "startColumn": 1, + "charOffset": 969, + "charLength": 128, + "snippet": { + "text": "\t\tg_webhook().sendMessage(title, url);\r\n\t} else {\r\n\t\tg_webhook().sendMessage(title, message, color, url);\r\n\t}\r\n\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a33f36df74f919e0", + "equalIndicator/v1": "6e2797e2689f79205342c6f92b94c09663650b942035ff22e8194fdb7131f13a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1176, + "startColumn": 41, + "charOffset": 44789, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1174, + "startColumn": 1, + "charOffset": 44743, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2cb0f2146d68d814", + "equalIndicator/v1": "6e3040c89580658c4a861199464f0fb10c74a95b82e10c61b66f0214b4918eb0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'removeThing' is within a recursive call chain", + "markdown": "Function 'removeThing' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1189, + "startColumn": 12, + "charOffset": 35368, + "charLength": 11, + "snippet": { + "text": "removeThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1187, + "startColumn": 1, + "charOffset": 35352, + "charLength": 155, + "snippet": { + "text": "}\r\n\r\nvoid Tile::removeThing(std::shared_ptr thing, uint32_t count) {\r\n\tstd::shared_ptr creature = thing->getCreature();\r\n\tif (creature) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d565d81ef00f0e69", + "equalIndicator/v1": "6e35eea883cfad0866aec121c384b188ae42a172177a5625f427ba77271da0dc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 196, + "startColumn": 15, + "charOffset": 8005, + "charLength": 11, + "snippet": { + "text": "removeThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 194, + "startColumn": 1, + "charOffset": 7832, + "charLength": 371, + "snippet": { + "text": "\tvirtual void updateThing(std::shared_ptr, uint16_t, uint32_t) override { }\r\n\tvirtual void replaceThing(uint32_t, std::shared_ptr) override { }\r\n\tvirtual void removeThing(std::shared_ptr, uint32_t) override { }\r\n\r\n\tvirtual void postAddNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a27b359ece1bb1ad", + "equalIndicator/v1": "6e3e206993a464859324ce46fc4fc4a81726e670cfbbc493f89423d358981481" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 672, + "startColumn": 28, + "charOffset": 21766, + "charLength": 6, + "snippet": { + "text": "damage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 670, + "startColumn": 1, + "charOffset": 21673, + "charLength": 205, + "snippet": { + "text": "\r\n\t\tdamage.secondary.type = imbuementInfo.imbuement->combatType;\r\n\t\tdamage.secondary.value = damage.primary.value * (damagePercent);\r\n\t\tdamage.primary.value = damage.primary.value * (1 - damagePercent);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "700f72283a214988", + "equalIndicator/v1": "6e6dea4507863cd34b42e05d10fe516dab42618e7a9e4aa92c2ab2bbcc85c3aa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1735, + "startColumn": 3, + "charOffset": 60653, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1733, + "startColumn": 1, + "charOffset": 60535, + "charLength": 168, + "snippet": { + "text": "\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r\n\t\treturn;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f78b85f66a6c4198", + "equalIndicator/v1": "6eda787ab81b8a54b4f90a82a935c561c4676ff963f5ab4c0d547b0ec4b058fc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6945, + "startColumn": 93, + "charOffset": 241400, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6943, + "startColumn": 1, + "charOffset": 241303, + "charLength": 231, + "snippet": { + "text": "}\r\n\r\nbool Game::combatChangeHealth(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage, bool isEvent /*= false*/) {\r\n\tusing namespace std;\r\n\tconst Position &targetPos = target->getPosition();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "be92f382057cecf8", + "equalIndicator/v1": "6f0a0f2414499558949fdeae96e7df566ec414868f7e5484a2f0f63ea7d9c05f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The 'empty' method should be used to check for emptiness instead of 'size'", + "markdown": "The 'empty' method should be used to check for emptiness instead of 'size'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1811, + "startColumn": 16, + "charOffset": 51088, + "charLength": 5, + "snippet": { + "text": "items" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1809, + "startColumn": 1, + "charOffset": 50963, + "charLength": 169, + "snippet": { + "text": "std::shared_ptr Tile::getUseItem(int32_t index) const {\r\n\tconst TileItemVector* items = getItemList();\r\n\tif (!items || items->size() == 0) {\r\n\t\treturn ground;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0a52ee166527afd7", + "equalIndicator/v1": "6f178155111934f5223f1e6ead213e78af64a036b01ad60d608a93eeca2329fa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 408, + "startColumn": 6, + "charOffset": 14567, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 406, + "startColumn": 1, + "charOffset": 14523, + "charLength": 181, + "snippet": { + "text": "\tlua_pushnumber(L, colorSecondary);\r\n\r\n\tif (scriptInterface.protectedCall(L, 8, 6) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c6d4430cb3e3e201", + "equalIndicator/v1": "6f48a7e66608a04d857f86f6b8cc75514b8eec222bbcd54aa794474f322d8677" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2020, + "startColumn": 2, + "charOffset": 61833, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2018, + "startColumn": 1, + "charOffset": 61737, + "charLength": 217, + "snippet": { + "text": "void ProtocolGame::parseRotateItem(NetworkMessage &msg) {\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tconst auto &itemType = Item::items[itemId];\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "167cfbe03712b05a", + "equalIndicator/v1": "6fa4d9657cbb33966f6d0c22cb3a3ecafb93b39b05c6c93c0ab3512c908b5950" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 23, + "charOffset": 1463, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 1436, + "charLength": 168, + "snippet": { + "text": "}\r\n\r\nReturnValue Teleport::queryRemove(const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr /*= nullptr */) {\r\n\treturn RETURNVALUE_NOERROR;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b3ce75e13a049d37", + "equalIndicator/v1": "6fada6a8b11ac963c89e02c13639ac826627dda083909e2553c470f2fb247924" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 186, + "startColumn": 2, + "charOffset": 4756, + "charLength": 12, + "snippet": { + "text": "SpeakClasses" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 184, + "startColumn": 1, + "charOffset": 4713, + "charLength": 219, + "snippet": { + "text": "\tbool ghost = getBoolean(L, 4, false);\r\n\r\n\tSpeakClasses type = getNumber(L, 3, TALKTYPE_PRIVATE_NP);\r\n\tconst std::string &text = getString(L, 2);\r\n\tstd::shared_ptr npc = getUserdataShared(L, 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c1eca87de86f8b1a", + "equalIndicator/v1": "6fcef2573de4130df221e57fe8499b5788622ddeaf5284654077833587f5c02d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1150, + "startColumn": 25, + "charOffset": 37535, + "charLength": 4, + "snippet": { + "text": "maxY" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1148, + "startColumn": 1, + "charOffset": 37456, + "charLength": 129, + "snippet": { + "text": "\r\n\tconst int32_t rangeX = maxX + MAP_MAX_VIEW_PORT_X;\r\n\tconst int32_t rangeY = maxY + MAP_MAX_VIEW_PORT_Y;\r\n\r\n\tint affected = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f105274975075af8", + "equalIndicator/v1": "6ff075c9e4c51cb70eecd6776e0b029ae65e9b956cdff7d7a4f723847fbae4dc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 628, + "startColumn": 37, + "charOffset": 19449, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 626, + "startColumn": 1, + "charOffset": 19407, + "charLength": 96, + "snippet": { + "text": "\t}\r\n\r\n\tif (index == 255 /*add wherever*/) {\r\n\t\tindex = INDEX_WHEREEVER;\r\n\t\t*destItem = nullptr;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "51a468e572b6d5ee", + "equalIndicator/v1": "7004a7dfa03cde67081793f19c39d74f5ec0d6c187de5dd7e508e9a701aa0f7b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1137, + "startColumn": 122, + "charOffset": 40760, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1135, + "startColumn": 1, + "charOffset": 40634, + "charLength": 286, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) {\r\n\t// Player:onCombat(target, item, primaryDamage, primaryType, secondaryDamage, secondaryType)\r\n\tif (info.playerOnCombat == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cd48e25f6cb7eef2", + "equalIndicator/v1": "7016129827f426a3207534a953ad4d8e14e679ba3b1b9e7d4ea98e523c12960e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2195, + "startColumn": 11, + "charOffset": 65753, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2193, + "startColumn": 1, + "charOffset": 65664, + "charLength": 210, + "snippet": { + "text": "\tmonsterForgeClassification = ForgeClassifications_t::FORGE_NORMAL_MONSTER;\r\n\r\n\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "86b6c62b6e2b560d", + "equalIndicator/v1": "7018eb3a32b1e2ae4784e8b41d6f2d0ad2fbe997be2500fd5d687837d5b4b50e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use emplace_back instead of push_back", + "markdown": "Use emplace_back instead of push_back" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 141, + "startColumn": 17, + "charOffset": 4475, + "charLength": 9, + "snippet": { + "text": "push_back" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 139, + "startColumn": 1, + "charOffset": 4413, + "charLength": 177, + "snippet": { + "text": "\t\t\t}\r\n\t\t} else if (item->isItemStorable()) {\r\n\t\t\ttoReturnList.push_back(std::pair, uint32_t>(item, static_cast(item->getItemCount())));\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4d56c6ea3a083e29", + "equalIndicator/v1": "7026086dc9dc809c6d82e498a00364fe7638d52edbaf1d3728711c350989fd21" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 248, + "startColumn": 105, + "charOffset": 8953, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 246, + "startColumn": 1, + "charOffset": 8844, + "charLength": 269, + "snippet": { + "text": "}\r\n\r\nReturnValue Events::eventCreatureOnAreaCombat(std::shared_ptr creature, std::shared_ptr tile, bool aggressive) {\r\n\t// Creature:onAreaCombat(tile, aggressive) or Creature.onAreaCombat(self, tile, aggressive)\r\n\tif (info.creatureOnAreaCombat == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b87aab409c694e52", + "equalIndicator/v1": "70376750c8cee8b2b365f36287576697485bd39d64e00ea8a7deb970eb914949" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1664, + "startColumn": 63, + "charOffset": 58338, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1662, + "startColumn": 1, + "charOffset": 58210, + "charLength": 264, + "snippet": { + "text": "//**********************************************************//\r\n\r\nvoid TargetCallback::onTargetCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\t// onTargetCombat(creature, target)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "de1e56f631b2b3da", + "equalIndicator/v1": "703e75e2f078acb3e9febbab2c3669f5454aca76e43b740996b8ad909a8a29a3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/ban.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 95, + "startColumn": 2, + "charOffset": 3108, + "charLength": 7, + "snippet": { + "text": "int64_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 93, + "startColumn": 1, + "charOffset": 3101, + "charLength": 151, + "snippet": { + "text": "\t}\r\n\r\n\tint64_t expiresAt = result->getNumber(\"expires_at\");\r\n\tif (expiresAt != 0 && time(nullptr) > expiresAt) {\r\n\t\tquery.str(std::string());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "401c7a8e8c5889d4", + "equalIndicator/v1": "703e912605f2ff730f3beef5081aea8d130d1e73e9f8c75d9ca6c9c9c687ec3b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 23, + "startColumn": 28, + "charOffset": 671, + "charLength": 11, + "snippet": { + "text": "getCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 21, + "startColumn": 1, + "charOffset": 638, + "charLength": 93, + "snippet": { + "text": "\t}\r\n\r\n\tstd::shared_ptr getCylinder() override final {\r\n\t\treturn getTeleport();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "76fda9ea69e14ef6", + "equalIndicator/v1": "705a76816bf1a9760442fb935d29c5d923bc803be7ef8b21f41630897855a514" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 417, + "startColumn": 41, + "charOffset": 15728, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 415, + "startColumn": 1, + "charOffset": 15682, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0540a223792e0a65", + "equalIndicator/v1": "708798bd501657d986878a4d8b5fbd68b4d71a9f78a8b3be70a945cad6774785" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1399, + "startColumn": 56, + "charOffset": 48326, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1397, + "startColumn": 1, + "charOffset": 48266, + "charLength": 364, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatDefault(std::shared_ptr caster, std::shared_ptr target, const Position &origin, const CombatParams ¶ms) {\r\n\tif (!params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR)) {\r\n\t\tauto spectators = Spectators().find(target->getPosition(), true);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8fbed7471dff97f1", + "equalIndicator/v1": "70ad54f196b2c41f6c66eccfa0e4edb864f48f190fbc10b3de75df86a076cbf1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 549, + "startColumn": 21, + "charOffset": 17766, + "charLength": 5, + "snippet": { + "text": "level" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 547, + "startColumn": 1, + "charOffset": 17641, + "charLength": 252, + "snippet": { + "text": "\r\n\tint32_t maxValue = Weapons::getMaxWeaponDamage(level, attackSkill, attackValue, attackFactor, true);\r\n\tint32_t minValue = level / 5;\r\n\r\n\treturn -normal_random(minValue, static_cast(maxValue * player->getVocation()->meleeDamageMultiplier));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5a55b080306a9c74", + "equalIndicator/v1": "70f36a7ebd05c0b567f904ab5623cc98ade15bdb79e710c9514cf2215470f361" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6576, + "startColumn": 112, + "charOffset": 193148, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6574, + "startColumn": 1, + "charOffset": 192925, + "charLength": 325, + "snippet": { + "text": "\t\t\tif (!g_configManager().getBoolean(PREY_ENABLED, __FUNCTION__)) {\r\n\t\t\t\tslot->state = PreyDataState_Inactive;\r\n\t\t\t} else if (slot->id == PreySlot_Three && !g_configManager().getBoolean(PREY_FREE_THIRD_SLOT, __FUNCTION__)) {\r\n\t\t\t\tslot->state = PreyDataState_Locked;\r\n\t\t\t} else if (slot->id == PreySlot_Two && !isPremium()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ff62ac3b5160763f", + "equalIndicator/v1": "710c7c4033c77938d5a95629af517e8c60ff6b9d6dbb51d281b5b11482b2b814" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 706, + "startColumn": 127, + "charOffset": 27192, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 704, + "startColumn": 1, + "charOffset": 27061, + "charLength": 291, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeAccept - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b81489c069dbfda8", + "equalIndicator/v1": "7114a54f9eb2ef9d0dadd5cb02993e73c382fab9acae182583a6198277764b50" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/talkaction.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 28, + "startColumn": 53, + "charOffset": 897, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 26, + "startColumn": 1, + "charOffset": 840, + "charLength": 333, + "snippet": { + "text": "}\r\n\r\nbool TalkActions::checkWord(std::shared_ptr player, SpeakClasses type, const std::string &words, const std::string_view &word, const TalkAction_ptr &talkActionPtr) const {\r\n\tauto spacePos = std::ranges::find_if(words.begin(), words.end(), ::isspace);\r\n\tstd::string firstWord = words.substr(0, spacePos - words.begin());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "54b14981f6a0b58b", + "equalIndicator/v1": "7116bb25fd6b0089314a2cad4cd2ebcf217414870b6fbcf7e2affaa81c7e5f61" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotlocker.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 38, + "startColumn": 19, + "charOffset": 1297, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 36, + "startColumn": 1, + "charOffset": 1274, + "charLength": 207, + "snippet": { + "text": "}\r\n\r\nvoid DepotLocker::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tauto parentLocked = m_parent.lock();\r\n\tif (parentLocked) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "79ee7193c3582fe4", + "equalIndicator/v1": "712d187c11a9f7d96764410fa3a831a8ea9ef6db5d529a217602a6692f0ce200" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Valty', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Valty', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/vectorsort.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 109, + "startColumn": 22, + "charOffset": 2569, + "charLength": 6, + "snippet": { + "text": "_Valty" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 107, + "startColumn": 1, + "charOffset": 2541, + "charLength": 108, + "snippet": { + "text": "\t\t}\r\n\r\n\t\ttemplate \r\n\t\tdecltype(auto) emplace_back(_Valty &&... v) {\r\n\t\t\tneedUpdate = true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c3d06573d38b5019", + "equalIndicator/v1": "713fd57eb0194a0bce8643899f66bfb94616a686809b0b35aadd78bf26afe6ec" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7688, + "startColumn": 39, + "charOffset": 240729, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7686, + "startColumn": 1, + "charOffset": 240582, + "charLength": 331, + "snippet": { + "text": "\t} else {\r\n\t\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\r\n\t\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\r\n\r\n\t\tmsg.addByte(static_cast(std::min(player->getMagicLevel(), std::numeric_limits::max())));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6e72a0637477257e", + "equalIndicator/v1": "714d041705ef86ee86abfb909fd0139efcd9354dc439fc6c1bfe6f0810a15931" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '__targetPos', which is a reserved identifier", + "markdown": "Declaration uses identifier '__targetPos', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 642, + "startColumn": 86, + "charOffset": 18802, + "charLength": 11, + "snippet": { + "text": "__targetPos" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 640, + "startColumn": 1, + "charOffset": 18712, + "charLength": 347, + "snippet": { + "text": "}\r\n\r\nbool Map::getPathMatching(const std::shared_ptr &creature, const Position &__targetPos, std::vector &dirList, const FrozenPathingConditionCall &pathCondition, const FindPathParams &fpp) {\r\n\tstatic int_fast32_t allNeighbors[8][2] = {\r\n\t\t{ -1, 0 }, { 0, 1 }, { 1, 0 }, { 0, -1 }, { -1, -1 }, { 1, -1 }, { 1, 1 }, { -1, 1 }\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "669ecd881d70d184", + "equalIndicator/v1": "714d3ee9959abf2c1abd0ea4c9d2b0c0acccc6829d57b8639ad3891bb23cf2dc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1101, + "startColumn": 66, + "charOffset": 39503, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1099, + "startColumn": 1, + "charOffset": 39433, + "charLength": 199, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnGainSkillTries(std::shared_ptr player, skills_t skill, uint64_t &tries) {\r\n\t// Player:onGainSkillTries(skill, tries)\r\n\tif (info.playerOnGainSkillTries == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "462986abc2487a4c", + "equalIndicator/v1": "7179bf87fd13d21ddad16123eb156b5c7b62384374a08dc6ea4d7090e026afef" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 373, + "startColumn": 7, + "charOffset": 13443, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 371, + "startColumn": 1, + "charOffset": 13431, + "charLength": 159, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventCreatureOnDrainHealth - \"\r\n\t\t \"Creature {} attacker {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "809dd163d23b7e00", + "equalIndicator/v1": "71be8907808a078d4e014cd4eb8d1c2e20cad475a8e4ee8d9a4418dfcba97b30" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 567, + "startColumn": 37, + "charOffset": 15259, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 565, + "startColumn": 1, + "charOffset": 15192, + "charLength": 140, + "snippet": { + "text": "\r\n\t\t\tcase STAT_MAXMANAPOINTS:\r\n\t\t\t\tstats[i] = static_cast(player->getMaxMana() * ((statsPercent[i] - 100) / 100.f));\r\n\t\t\t\tbreak;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "05476630e87a7af9", + "equalIndicator/v1": "71bfffc6686ce4e3775d5382b507212c1d3eca6ad9909c38a8be70352b5289e9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 32, + "startColumn": 38, + "charOffset": 1114, + "charLength": 3, + "snippet": { + "text": "get" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 30, + "startColumn": 1, + "charOffset": 1000, + "charLength": 200, + "snippet": { + "text": "\tvirtual void set(const std::string &key, const ValueWrapper &value) = 0;\r\n\r\n\tvirtual std::optional get(const std::string &key, bool forceLoad = false) = 0;\r\n\r\n\tvirtual bool saveAll() {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cc364cd5a2406ac1", + "equalIndicator/v1": "71d5973dde843d3799a5c6dd86601cd97ff3f6d99fedd3d113d2f03aef602f2c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 55, + "startColumn": 8, + "charOffset": 1495, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 53, + "startColumn": 1, + "charOffset": 1397, + "charLength": 216, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsContainer(lua_State* L) {\r\n\t// itemType:isContainer()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isContainer());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8daac3d4c6a97522", + "equalIndicator/v1": "71d6523c6e57816c55bcfa1b33f215c4f167ea5dfd9d717c2e183bb778e09882" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4860, + "startColumn": 26, + "charOffset": 145370, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4858, + "startColumn": 1, + "charOffset": 145252, + "charLength": 132, + "snippet": { + "text": "\r\nvoid Player::onGainSharedExperience(uint64_t gainExp, std::shared_ptr target) {\r\n\tgainExperience(gainExp, target);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "237c1ed5d7202b52", + "equalIndicator/v1": "71f21225f8ade28965b13a61450960ffa48566325e0f01caa4bac1cb8364c6ff" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 33, + "startColumn": 22, + "charOffset": 1201, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 31, + "startColumn": 1, + "charOffset": 1125, + "charLength": 225, + "snippet": { + "text": "\t * \\returns ReturnValue holds the return value\r\n\t */\r\n\tvirtual ReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) = 0;\r\n\r\n\t/**\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ac911400b207d83f", + "equalIndicator/v1": "71fdd484817aac290e2afc01cf583b03677f12110baee71445a371409b769102" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 162, + "startColumn": 27, + "charOffset": 4457, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 160, + "startColumn": 1, + "charOffset": 4425, + "charLength": 114, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tenv->setScriptId(scriptId, scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "600b46b72817fda1", + "equalIndicator/v1": "7225d5e3bb0f54f11a5c0a0da72d5b8056376c41acf0f9cb5802fafdea057b95" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5522, + "startColumn": 2, + "charOffset": 175196, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5520, + "startColumn": 1, + "charOffset": 175096, + "charLength": 219, + "snippet": { + "text": "\tauto actionType = static_cast(msg.getByte());\r\n\tbool convergence = msg.getByte();\r\n\tuint16_t firstItem = msg.get();\r\n\tuint8_t tier = msg.getByte();\r\n\tuint16_t secondItem = msg.get();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2af5bebc427abeea", + "equalIndicator/v1": "7245ddf7b226e6b74b49aab592a0dc3b71e9b019627c39ecd067f373e69c124f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 710, + "startColumn": 37, + "charOffset": 23057, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 708, + "startColumn": 1, + "charOffset": 22995, + "charLength": 132, + "snippet": { + "text": "\t\t\t\tcase 1:\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 73) * 1.35f) + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8d28701c70050d28", + "equalIndicator/v1": "7257cddded56ba0467d7abc2f3e887e58a2237dcdfa8e73a754fbee813fbfb55" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 346, + "startColumn": 64, + "charOffset": 14151, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 344, + "startColumn": 1, + "charOffset": 14083, + "charLength": 179, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerSpells(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "239e0122e113a743", + "equalIndicator/v1": "729992148ff9031f826ed65ee669072f5bfb138002b3793ad655208a2ee9778c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 666, + "startColumn": 35, + "charOffset": 18143, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 664, + "startColumn": 1, + "charOffset": 18010, + "charLength": 197, + "snippet": { + "text": "\r\nvoid ConditionAttributes::updateCharmChanceModifier(std::shared_ptr creature) const {\r\n\tcreature->setCharmChanceModifier(creature->getCharmChanceModifier() + charmChanceModifier);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a62e6c44628b7327", + "equalIndicator/v1": "72b0ed4f03692a8dbdc601219114ed1e3da2b768e43361045ec4b3db42198609" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1032, + "startColumn": 20, + "charOffset": 39306, + "charLength": 11, + "snippet": { + "text": "currentTime" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1030, + "startColumn": 1, + "charOffset": 39228, + "charLength": 139, + "snippet": { + "text": "\tlua_pushnumber(L, value);\r\n\tlua_pushnumber(L, oldValue);\r\n\tlua_pushnumber(L, currentTime);\r\n\r\n\tgetScriptInterface()->callVoidFunction(5);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4db0937a1ad96722", + "equalIndicator/v1": "72b34e4556da8a76d58139d29cf969a2396b415206cada264a6a0b0b82e0fa4c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6338, + "startColumn": 70, + "charOffset": 200753, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6336, + "startColumn": 1, + "charOffset": 200679, + "charLength": 127, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendPartyCreatureUpdate(std::shared_ptr target) {\r\n\tif (!player || oldProtocol) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b6f4660366d5e6c4", + "equalIndicator/v1": "72d97cb6a223fdd4183fbb79f9dda7b6d5786c6cb31a1925aa8a69809aa27985" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 325, + "startColumn": 10, + "charOffset": 10239, + "charLength": 13, + "snippet": { + "text": "getThrowRange" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 323, + "startColumn": 1, + "charOffset": 10203, + "charLength": 116, + "snippet": { + "text": "\t\treturn isMovable();\r\n\t}\r\n\tint32_t getThrowRange() const override final {\r\n\t\treturn (isPickupable() ? 15 : 2);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "903b3969bc0a3010", + "equalIndicator/v1": "72dba6502675a8c24bebcef7443ddf23684115c4adfe240ee4ff2e179e67fec7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 716, + "startColumn": 34, + "charOffset": 19659, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 714, + "startColumn": 1, + "charOffset": 19619, + "charLength": 120, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tplayer->setCharmChanceModifier(player->getCharmChanceModifier() - charmChanceModifier);\r\n\r\n\t\tif (needUpdate) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "214d2ea233296672", + "equalIndicator/v1": "732a4550ded4efeb9a9ffb4d6fc8aae9d5a12aac4c082c89592ae0f5cf154393" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/reward.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 23, + "startColumn": 14, + "charOffset": 640, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 21, + "startColumn": 1, + "charOffset": 595, + "charLength": 340, + "snippet": { + "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) final;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1204032b25f3ff1f", + "equalIndicator/v1": "7355183510799eca3afbaef45f6b40a1379825dbf9cd78feb4dba70f8a8c5bae" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6888, + "startColumn": 93, + "charOffset": 238816, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6886, + "startColumn": 1, + "charOffset": 238719, + "charLength": 311, + "snippet": { + "text": "}\r\n\r\nvoid Game::applyWheelOfDestinyEffectsToDamage(CombatDamage &damage, std::shared_ptr attackerPlayer, std::shared_ptr target) const {\r\n\t// If damage is 0, it means the target is immune to the damage type, or that we missed.\r\n\tif (damage.primary.value == 0 && damage.secondary.value == 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c30439361bfcfbb6", + "equalIndicator/v1": "735b95520975e78e4a34aff4cef28da7fb76ed6e60304af596187f91d5c4170c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 165, + "startColumn": 8, + "charOffset": 4201, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 163, + "startColumn": 1, + "charOffset": 4101, + "charLength": 219, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsMagicField(lua_State* L) {\r\n\t// itemType:isMagicField()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isMagicField());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4f64063d2e9a580a", + "equalIndicator/v1": "73644ea38f376f9ed7de2f8c0041f76c55ba772b12360caa1109f34c6ccb4172" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'isExerciseTraining' can be made const", + "markdown": "Method 'isExerciseTraining' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 582, + "startColumn": 7, + "charOffset": 15899, + "charLength": 18, + "snippet": { + "text": "isExerciseTraining" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 580, + "startColumn": 1, + "charOffset": 15867, + "charLength": 87, + "snippet": { + "text": "\t\treturn marketMenu;\r\n\t}\r\n\tbool isExerciseTraining() {\r\n\t\treturn exerciseTraining;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e311187d72738773", + "equalIndicator/v1": "7388f98af811a42d2bf6bc90d4974c2aa89395b1a82d276785c7f09b01749d0e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 790, + "startColumn": 2, + "charOffset": 27370, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 788, + "startColumn": 1, + "charOffset": 27338, + "charLength": 204, + "snippet": { + "text": "\r\n\t// OTCv8 version detection\r\n\tuint16_t otcV8StringLength = msg.get();\r\n\tif (otcV8StringLength == 5 && msg.getString(5) == \"OTCv8\") {\r\n\t\totclientV8 = msg.get(); // 253, 260, 261, ...\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e70004ebcc900477", + "equalIndicator/v1": "73a9eebbdfaf700f110a41d503531381ebff61f7dc05138839bf4bf9c0f575d0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 211, + "startColumn": 14, + "charOffset": 6012, + "charLength": 13, + "snippet": { + "text": "queryMaxCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 209, + "startColumn": 1, + "charOffset": 5809, + "charLength": 652, + "snippet": { + "text": "\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t tileFlags, std::shared_ptr actor = nullptr) override;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e6579f2d6bb6640f", + "equalIndicator/v1": "73b7f7ebba03289c182b951e6f4cade3185e003551b870e36b8ad3bbc17fffd2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1511, + "startColumn": 59, + "charOffset": 52512, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1509, + "startColumn": 1, + "charOffset": 52449, + "charLength": 412, + "snippet": { + "text": "}\r\n\r\nbool Combat::isValidChainTarget(std::shared_ptr caster, std::shared_ptr currentTarget, std::shared_ptr potentialTarget, const CombatParams ¶ms, bool aggressive) {\r\n\tbool canCombat = canDoCombat(caster, potentialTarget, aggressive) == RETURNVALUE_NOERROR;\r\n\tbool pick = params.chainPickerCallback ? params.chainPickerCallback->onChainCombat(caster, potentialTarget) : true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5087b22f137dbd0a", + "equalIndicator/v1": "73b82148efa285e559090731b3b729d71a58cf7656ecd56eac48f5f001ce9ea4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3461, + "startColumn": 38, + "charOffset": 105956, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3459, + "startColumn": 1, + "charOffset": 105720, + "charLength": 382, + "snippet": { + "text": "\tmsg.add(std::min(player->getMaxHealth(), std::numeric_limits::max()));\r\n\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\r\n\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\r\n\tmsg.addByte(player->getSoul());\r\n\tmsg.add(player->getStaminaMinutes());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "56d59e992c3fa8e0", + "equalIndicator/v1": "73c63e35896940d6cad5a202d66acd016ec3e68ecce8d249ed320224fe429c2f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3464, + "startColumn": 16, + "charOffset": 104752, + "charLength": 9, + "snippet": { + "text": "slotIndex" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3462, + "startColumn": 1, + "charOffset": 104543, + "charLength": 283, + "snippet": { + "text": "\t\t\t\t\tif (queryAdd(slotIndex, item, item->getItemCount(), 0) == RETURNVALUE_NOERROR) {\r\n\t\t\t\t\t\tif (inventoryItem->equals(item) && inventoryItem->getItemCount() < inventoryItem->getStackSize()) {\r\n\t\t\t\t\t\t\tindex = slotIndex;\r\n\t\t\t\t\t\t\t*destItem = inventoryItem;\r\n\t\t\t\t\t\t\treturn getPlayer();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5c9f50cedd6d5158", + "equalIndicator/v1": "73c694520d3d1002e98732fe21f5141b5c0a9282e96f774495efd95bc32441ce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 94, + "startColumn": 22, + "charOffset": 2819, + "charLength": 6, + "snippet": { + "text": "scoped" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 92, + "startColumn": 1, + "charOffset": 2792, + "charLength": 150, + "snippet": { + "text": "\t}\r\n\r\n\tstd::shared_ptr scoped(const std::string &scope) override final;\r\n\tstd::unordered_set keys(const std::string &prefix = \"\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "560bba5f65be1163", + "equalIndicator/v1": "73d488ae61621626e19632daa4e809b208e3cf96ed4cf834a915922bcb61f82f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 70, + "startColumn": 15, + "charOffset": 2181, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 68, + "startColumn": 1, + "charOffset": 2162, + "charLength": 222, + "snippet": { + "text": "}\r\n\r\nvoid Mailbox::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tgetParent()->postRemoveNotification(thing, newParent, index, LINK_PARENT);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9743ef89e722fa17", + "equalIndicator/v1": "73dd23d31333bf723aacaae729b34eaa32517a4336937311180dc584c1d762a3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'items' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'items' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8282, + "startColumn": 91, + "charOffset": 262610, + "charLength": 5, + "snippet": { + "text": "items" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8280, + "startColumn": 1, + "charOffset": 262515, + "charLength": 136, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendInventoryImbuements(const std::map> items) {\r\n\tif (oldProtocol) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "82b3ef1bfbe2ff70", + "equalIndicator/v1": "7408912e1a7017404f0e48812b366e1a3e9638dc5e5e4b8ef87bcaadaa8e00f5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 197, + "startColumn": 118, + "charOffset": 6185, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 195, + "startColumn": 1, + "charOffset": 6063, + "charLength": 260, + "snippet": { + "text": "}\r\n\r\nvoid Weapon::internalUseWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target, int32_t damageModifier, int32_t cleavePercent) const {\r\n\tif (player) {\r\n\t\tif (params.soundCastEffect == SoundEffect_t::SILENCE) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f6125818ed6a8591", + "equalIndicator/v1": "740a92b0d45c44e645c538336cb17ab052a4965626a94c5cc075653d7d165805" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 632, + "startColumn": 7, + "charOffset": 24298, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 630, + "startColumn": 1, + "charOffset": 24139, + "charLength": 296, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnReportBug(std::shared_ptr player, const std::string &message, const Position &position, uint8_t category) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnReportBug - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6464e7f299dda47c", + "equalIndicator/v1": "744459995a39df1f50f71853f281db8a3e9f28967bcc193838d0a75dcce0c3ab" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 829, + "startColumn": 21, + "charOffset": 26876, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 827, + "startColumn": 1, + "charOffset": 26804, + "charLength": 211, + "snippet": { + "text": "\tfloat attackFactor = player->getAttackFactor();\r\n\r\n\tint32_t minValue = player->getLevel() / 5;\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue);\r\n\tif (maxDamage) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0cd6c2dc75852bec", + "equalIndicator/v1": "74526d3526d82d1d0246f246ba5bac189c334a4ff4c359719c129779fe01dc59" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2179, + "startColumn": 29, + "charOffset": 73830, + "charLength": 10, + "snippet": { + "text": "multiplier" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2177, + "startColumn": 1, + "charOffset": 73736, + "charLength": 112, + "snippet": { + "text": "\t\tdamage.critical = true;\r\n\t\tdamage.primary.value *= multiplier;\r\n\t\tdamage.secondary.value *= multiplier;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "849c84fe189f3653", + "equalIndicator/v1": "7460148f9dbedb5b5ff5e191e74716142093cea27d11351735115f9b25b623fb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6883, + "startColumn": 111, + "charOffset": 238692, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6881, + "startColumn": 1, + "charOffset": 238509, + "charLength": 209, + "snippet": { + "text": "\r\n\t\tif (attackerPlayer->wheel()->getInstant(\"Blessing of the Grove\")) {\r\n\t\t\tdamage.primary.value += (damage.primary.value * attackerPlayer->wheel()->checkBlessingGroveHealingByTarget(target)) / 100.;\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5b45fa585f5c0385", + "equalIndicator/v1": "74b1f2371b51d9b515e242150e796ca823d1bfae89a5b7502ca9fe2aed548b46" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 652, + "startColumn": 27, + "charOffset": 23275, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 650, + "startColumn": 1, + "charOffset": 23243, + "charLength": 130, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnLookInTrade, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ecf2be5bde3d2090", + "equalIndicator/v1": "74c29eab0ba8407a01efdc27f17ed945aaded7dec04ab0f5f40fe19e79dc3eb0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'owner' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'owner' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 840, + "startColumn": 15, + "charOffset": 23146, + "charLength": 5, + "snippet": { + "text": "owner" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 838, + "startColumn": 1, + "charOffset": 23062, + "charLength": 97, + "snippet": { + "text": "\t// shop functions\r\n\tvoid setShopOwner(std::shared_ptr owner) {\r\n\t\tshopOwner = owner;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dd8f34a08278f682", + "equalIndicator/v1": "74ef1ad7a7288380c4aab9c5c78e933ec26d29a1ddc5d0d36ffc598c9994db5a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1927, + "startColumn": 5, + "charOffset": 66202, + "charLength": 7, + "snippet": { + "text": "int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1925, + "startColumn": 1, + "charOffset": 66099, + "charLength": 235, + "snippet": { + "text": "\t\t\t\t// perform rotation\r\n\t\t\t\tint32_t rotatedX = static_cast(round(newX * a + newY * b));\r\n\t\t\t\tint32_t rotatedY = static_cast(round(newX * c + newY * d));\r\n\r\n\t\t\t\t// write in the output matrix using rotated coordinates\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ea9e5f9758fceb5e", + "equalIndicator/v1": "74fc2b88888b4f4bcb5511abbf6d27e6d1da1e9ba6ee55566c02f81e6197b67c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1170, + "startColumn": 51, + "charOffset": 35409, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1168, + "startColumn": 1, + "charOffset": 35354, + "charLength": 184, + "snippet": { + "text": "}\r\n\r\nvoid Monster::pushCreatures(std::shared_ptr tile) {\r\n\t// We can not use iterators here since we can push a creature to another tile\r\n\t// which will invalidate the iterator.\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "22374351fc58021b", + "equalIndicator/v1": "7518ec82be8f805953bfeb907f7a4792b6dfeec659774fdb40d414e8194598db" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'createMonsterTypeLootLuaTable' is within a recursive call chain", + "markdown": "Function 'createMonsterTypeLootLuaTable' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 28, + "charOffset": 722, + "charLength": 29, + "snippet": { + "text": "createMonsterTypeLootLuaTable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 657, + "charLength": 195, + "snippet": { + "text": "#include \"lua/scripts/scripts.hpp\"\r\n\r\nvoid MonsterTypeFunctions::createMonsterTypeLootLuaTable(lua_State* L, const std::vector &lootList) {\r\n\tlua_createtable(L, lootList.size(), 0);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "32666d572d11c39d", + "equalIndicator/v1": "752c4fd834a28bdea151064cdaec39d05824baa462486cc5686510d53c63f4ac" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 424, + "startColumn": 15, + "charOffset": 11673, + "charLength": 12, + "snippet": { + "text": "changeHealth" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 422, + "startColumn": 1, + "charOffset": 11653, + "charLength": 135, + "snippet": { + "text": "\t}\r\n\r\n\tvirtual void changeHealth(int32_t healthChange, bool sendHealthChange = true);\r\n\tvirtual void changeMana(int32_t manaChange);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "431d4d0aeb775aa3", + "equalIndicator/v1": "753610255e85adb2e1f62229b61b890d35cb083e4f72c202f51401db82c616b3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 459, + "startColumn": 33, + "charOffset": 24426, + "charLength": 31, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 457, + "startColumn": 1, + "charOffset": 24272, + "charLength": 235, + "snippet": { + "text": "\tvoid updatePlayerShield(std::shared_ptr player);\r\n\tvoid updateCreatureType(std::shared_ptr creature);\r\n\tvoid updateCreatureWalkthrough(const std::shared_ptr creature);\r\n\r\n\tGameState_t getGameState() const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f8817d12d783282f", + "equalIndicator/v1": "7550749eeafcd57557bfce8e40279687a53ea2831b5dc2e6c6980b19c18fcfd2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'setAttackedCreature' is within a recursive call chain", + "markdown": "Function 'setAttackedCreature' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4343, + "startColumn": 14, + "charOffset": 130765, + "charLength": 19, + "snippet": { + "text": "setAttackedCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4341, + "startColumn": 1, + "charOffset": 130747, + "charLength": 149, + "snippet": { + "text": "}\r\n\r\nbool Player::setAttackedCreature(std::shared_ptr creature) {\r\n\tif (!Creature::setAttackedCreature(creature)) {\r\n\t\tsendCancelTarget();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5359e2d43e30d5fa", + "equalIndicator/v1": "75526824f4c2866a3371fe2e145d2e6453ef1c46f7f927549e9698c0e28058b9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 792, + "startColumn": 55, + "charOffset": 25758, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 790, + "startColumn": 1, + "charOffset": 25699, + "charLength": 255, + "snippet": { + "text": "}\r\n\r\nvoid Combat::CombatNullFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage*) {\r\n\tCombatConditionFunc(caster, target, params, nullptr);\r\n\tCombatDispelFunc(caster, target, params, nullptr);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f1b36dec3127f461", + "equalIndicator/v1": "75565dba64d93d8336b5b74899b401d37e70dc31dff4dd72c7016afd85473daf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'uint16_t' (aka 'unsigned short')", + "markdown": "Narrowing conversion from 'double' to 'uint16_t' (aka 'unsigned short')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4063, + "startColumn": 29, + "charOffset": 145882, + "charLength": 10, + "snippet": { + "text": "std::floor" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4061, + "startColumn": 1, + "charOffset": 145778, + "charLength": 268, + "snippet": { + "text": "\r\n\tif (parentContainer->hasPagination() && parentContainer->hasParent()) {\r\n\t\tuint16_t indexContainer = std::floor(parentContainer->getThingIndex(container) / parentContainer->capacity()) * parentContainer->capacity();\r\n\t\tplayer->addContainer(cid, parentContainer);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8fdbd129cc63b242", + "equalIndicator/v1": "756d2bf483d692bb5ec101c532fc39ad5c47329c3934fa089e62f36ce970afbb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 575, + "startColumn": 100, + "charOffset": 21928, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 573, + "startColumn": 1, + "charOffset": 21824, + "charLength": 293, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnMoveCreature(std::shared_ptr player, std::shared_ptr creature, const Position &fromPosition, const Position &toPosition) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnMoveCreature - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8d35408a14b16b58", + "equalIndicator/v1": "757f91d8f9f2f1e04a9b05ee6c8d4d94389488a4e0ddde67d1de516cf5ff89f5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 571, + "startColumn": 13, + "charOffset": 26877, + "charLength": 11, + "snippet": { + "text": "stringValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 569, + "startColumn": 1, + "charOffset": 26715, + "charLength": 316, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;\r\n\t} else if (stringValue == \"absorbpercentmagic\") {\r\n\t\tint16_t value = pugi::cast(valueAttribute.value());\r\n\t\tAbilities &abilities = itemType.getAbilities();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5ad5ce5374731cd3", + "equalIndicator/v1": "75ab118da2d74b9bfbef4c3b434096ce0147a65b79f0390305d707b9ebe6c556" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1122, + "startColumn": 29, + "charOffset": 32999, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1120, + "startColumn": 1, + "charOffset": 32787, + "charLength": 284, + "snippet": { + "text": "\tvoid sendCreatureMove(std::shared_ptr creature, const Position &newPos, int32_t newStackPos, const Position &oldPos, int32_t oldStackPos, bool teleport) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendMoveCreature(creature, newPos, newStackPos, oldPos, oldStackPos, teleport);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "020800a2b707255d", + "equalIndicator/v1": "75e1c945f1dae83bbe82f63f768dee3df8bda9dd5f747f6e9a60a6831c5cbd15" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1356, + "startColumn": 56, + "charOffset": 39965, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1354, + "startColumn": 1, + "charOffset": 39905, + "charLength": 161, + "snippet": { + "text": "}\r\n\r\nvoid Player::updateSupplyTracker(std::shared_ptr item) {\r\n\tconst auto &iType = Item::items.getItemType(item->getID());\r\n\tauto value = iType.buyPrice;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "872361a2e512affe", + "equalIndicator/v1": "75e355dfa2be40740219fb44e892b10fd61755588133c14a144e2dc057ad7b28" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 224, + "startColumn": 7, + "charOffset": 6908, + "charLength": 11, + "snippet": { + "text": "removeThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 222, + "startColumn": 1, + "charOffset": 6818, + "charLength": 225, + "snippet": { + "text": "\tvoid replaceThing(uint32_t index, std::shared_ptr thing) override final;\r\n\r\n\tvoid removeThing(std::shared_ptr thing, uint32_t count) override final;\r\n\r\n\tvoid removeCreature(std::shared_ptr creature);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c2f0152fe9cde81c", + "equalIndicator/v1": "760a8a2ab4689a40d416950b3cba50cbd6cc0284866c36d5a1bdedbf2de26e5f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2009, + "startColumn": 72, + "charOffset": 57763, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2007, + "startColumn": 1, + "charOffset": 57687, + "charLength": 161, + "snippet": { + "text": "}\r\n\r\nstd::string Item::parseClassificationDescription(std::shared_ptr item) {\r\n\tstd::ostringstream string;\r\n\tif (item && item->getClassification() >= 1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4cf78cc094481858", + "equalIndicator/v1": "761491e5dbf9401595988963422fd6a9e86a01438bc46d7c9f3eba3fba98e0bc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int64_t' (aka 'long long') is implementation-defined", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int64_t' (aka 'long long') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2483, + "startColumn": 24, + "charOffset": 73890, + "charLength": 6, + "snippet": { + "text": "rawExp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2481, + "startColumn": 1, + "charOffset": 73848, + "charLength": 61, + "snippet": { + "text": "\t}\r\n\tsendStats();\r\n\tsendExperienceTracker(rawExp, exp);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "142df757317fd326", + "equalIndicator/v1": "761518cbdf14978579626712d5637da3f09b96b3539085e068a430ed8259c14c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 283, + "startColumn": 88, + "charOffset": 7872, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 281, + "startColumn": 1, + "charOffset": 7780, + "charLength": 155, + "snippet": { + "text": "}\r\n\r\nbool House::transferToDepot(std::shared_ptr player, std::shared_ptr tile) const {\r\n\tif (townId == 0 || !player) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a109aefd5b04b8d6", + "equalIndicator/v1": "76571e287ce1bcada74dfc5461f9f18d0865ea0ab58e3682ee3a7f303e046a77" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'title' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'title' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2349, + "startColumn": 18, + "charOffset": 67478, + "charLength": 5, + "snippet": { + "text": "title" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2347, + "startColumn": 1, + "charOffset": 67413, + "charLength": 116, + "snippet": { + "text": "\t}\r\n\tvoid setLoyaltyTitle(std::string title) {\r\n\t\tloyaltyTitle = title;\r\n\t}\r\n\tstd::string getLoyaltyTitle() const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e00590efce3f8795", + "equalIndicator/v1": "765b70fa248c51149e8d8f2d9fafe2f23070acbd2f0cba8df0d4b237e774364f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1889, + "startColumn": 27, + "charOffset": 65267, + "charLength": 23, + "snippet": { + "text": "(output->getCols() / 2)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1887, + "startColumn": 1, + "charOffset": 65215, + "charLength": 155, + "snippet": { + "text": "\t} else {\r\n\t\t// rotation\r\n\t\tint32_t rotateCenterX = (output->getCols() / 2) - 1;\r\n\t\tint32_t rotateCenterY = (output->getRows() / 2) - 1;\r\n\t\tint32_t angle;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "382e9642e7041a70", + "equalIndicator/v1": "7666914ea9987d48b509c5c739287ad33f40658eacdd6aff3e001a2b66879476" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 717, + "startColumn": 27, + "charOffset": 25528, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 715, + "startColumn": 1, + "charOffset": 25496, + "charLength": 130, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnRemoveCount, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bd13bfdf8e15bcd6", + "equalIndicator/v1": "767a2ebde0c91fdbb324407e6795a9b340ee7fc42a3bbebadadd6a836f07ed1d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'spellName' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'spellName' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 431, + "startColumn": 86, + "charOffset": 13227, + "charLength": 9, + "snippet": { + "text": "spellName" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 429, + "startColumn": 1, + "charOffset": 13108, + "charLength": 262, + "snippet": { + "text": "\t\treturn items[id].augments;\r\n\t}\r\n\tstd::vector> getAugmentsBySpellNameAndType(std::string spellName, Augment_t augmentType) const {\r\n\t\tstd::vector> augments;\r\n\t\tfor (auto &augment : items[id].augments) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "40d3b6f1d2983e2d", + "equalIndicator/v1": "7687283d427a66f7abab9e63c1a0ba9511a18e4348320105213d57c4347bbaf5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 38, + "startColumn": 2, + "charOffset": 1537, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 36, + "startColumn": 1, + "charOffset": 1443, + "charLength": 189, + "snippet": { + "text": "\tint32_t count = getNumber(L, 3, 1);\r\n\tbool canDropOnMap = getBoolean(L, 4, true);\r\n\tuint16_t subType = getNumber(L, 5, 1);\r\n\r\n\tconst ItemType &it = Item::items[itemId];\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ac1ec55f93d9b1cd", + "equalIndicator/v1": "76e3bf69de73d47d18271a2f1a8ed63c031b844e27acfbfb5872831b08ab3d3a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 112, + "startColumn": 113, + "charOffset": 3833, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 110, + "startColumn": 1, + "charOffset": 3716, + "charLength": 248, + "snippet": { + "text": "}\r\n\r\nReturnValue EventCallback::creatureOnTargetCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnTargetCombat - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5e13a85daa1a9dee", + "equalIndicator/v1": "771cffe10c7d13cda7495373c77ac9148a6004746bff5c120c1589becac8f92c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly", + "markdown": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2390, + "startColumn": 58, + "charOffset": 90934, + "charLength": 12, + "snippet": { + "text": "__FUNCTION__" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2388, + "startColumn": 1, + "charOffset": 90805, + "charLength": 172, + "snippet": { + "text": "\t\tauto container = autoContainer->getContainer();\r\n\t\tif (!container) {\r\n\t\t\tg_logger().error(\"[{}] Failed to get auto container\", __FUNCTION__);\r\n\t\t\treturn toCylinder;\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ee671f31876f6339", + "equalIndicator/v1": "773a8ade7d07426eb814fb376aa9c7ed6277f7cf03c5a9d375e7252fb49c845b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 782, + "startColumn": 2, + "charOffset": 27151, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 780, + "startColumn": 1, + "charOffset": 27144, + "charLength": 161, + "snippet": { + "text": "\t}\r\n\r\n\tuint32_t timeStamp = msg.get();\r\n\tuint8_t randNumber = msg.getByte();\r\n\tif (challengeTimestamp != timeStamp || challengeRandom != randNumber) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d21666f5c71b6f58", + "equalIndicator/v1": "77460e5c686ba2d6052013ab939be18a5e0f3f93d8f724ca8995a78944bba167" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 106, + "startColumn": 2, + "charOffset": 2731, + "charLength": 25, + "snippet": { + "text": "// party:getMemberCount()" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 104, + "startColumn": 1, + "charOffset": 2668, + "charLength": 169, + "snippet": { + "text": "\r\nint PartyFunctions::luaPartyGetMemberCount(lua_State* L) {\r\n\t// party:getMemberCount()\r\n\tstd::shared_ptr party = getUserdataShared(L, 1);\r\n\tif (party) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "64142423970bf366", + "equalIndicator/v1": "776f5fbc4b6f24d7074f6a3a87c7816362f527b034256b168d8703519922f3f1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7483, + "startColumn": 28, + "charOffset": 260599, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7481, + "startColumn": 1, + "charOffset": 260536, + "charLength": 260, + "snippet": { + "text": "\r\nvoid Game::buildMessageAsTarget(\r\n\tstd::shared_ptr attacker, const CombatDamage &damage, std::shared_ptr attackerPlayer,\r\n\tstd::shared_ptr targetPlayer, TextMessage &message, std::stringstream &ss,\r\n\tconst std::string &damageString\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e9c7fffccaf5c40f", + "equalIndicator/v1": "777136d5a8576105222098c2b1bb3b9c3dd7c3c4f7db7ff83051ad729ae762b0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 523, + "startColumn": 7, + "charOffset": 19927, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 521, + "startColumn": 1, + "charOffset": 19660, + "charLength": 412, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnItemMoved(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnItemMoved - \"\r\n\t\t \"Player {} item {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1c4ee200ef1bb122", + "equalIndicator/v1": "777f074b5fc8b85d1bbfe61d47de4dd80723b91cd6681c4ef694e5ae044ea286" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 989, + "startColumn": 7, + "charOffset": 37645, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 987, + "startColumn": 1, + "charOffset": 37547, + "charLength": 229, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnWalk(std::shared_ptr player, Direction &dir) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::eventOnWalk - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c051b7c4c0860485", + "equalIndicator/v1": "778a6a5ad07fa5fcbdf8499503f3368c4a37012993f3ed2ec3722016d6a37d0d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7875, + "startColumn": 89, + "charOffset": 238115, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7873, + "startColumn": 1, + "charOffset": 238022, + "charLength": 158, + "snippet": { + "text": "}\r\n\r\nvoid Player::parseAttackRecvHazardSystem(CombatDamage &damage, std::shared_ptr monster) {\r\n\tif (!monster || !monster->getHazard()) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "28b39efad2fc68bf", + "equalIndicator/v1": "778dc885ab2143a648ea718c09e78563b22d0a16a65554cb51385188f47f18f8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 326, + "startColumn": 41, + "charOffset": 8561, + "charLength": 34, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 324, + "startColumn": 1, + "charOffset": 8515, + "charLength": 254, + "snippet": { + "text": "\t}\r\n\r\n\tvoid addMonsterToCyclopediaTrackerList(const std::shared_ptr mtype, bool isBoss, bool reloadClient = false);\r\n\r\n\tvoid removeMonsterFromCyclopediaTrackerList(std::shared_ptr mtype, bool isBoss, bool reloadClient = false);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "961f8deb4ea3d20d", + "equalIndicator/v1": "77a446aaffbdb325082657fd5f5ca7b27c0f2a92b4f5aef6d2cc8c977391f02c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 736, + "startColumn": 102, + "charOffset": 28422, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 734, + "startColumn": 1, + "charOffset": 28316, + "charLength": 269, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnGainExperience(std::shared_ptr player, std::shared_ptr target, uint64_t &exp, uint64_t rawExp) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnGainExperience - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c5bca4738ddbdcb6", + "equalIndicator/v1": "77b37671aa515b558820981225164b45a9268a3abaa84795a253561aa547a7ff" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2196, + "startColumn": 29, + "charOffset": 74538, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2194, + "startColumn": 1, + "charOffset": 74427, + "charLength": 150, + "snippet": { + "text": "\t} else if (monster) {\r\n\t\tdamage.primary.value *= monster->getAttackMultiplier();\r\n\t\tdamage.secondary.value *= monster->getAttackMultiplier();\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "902909e7f3414fa6", + "equalIndicator/v1": "77b84680fa6f1b34f7a80872670b92d5caec02bf9dcd1fc018b0945eb01bfbba" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 602, + "startColumn": 73, + "charOffset": 23056, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 600, + "startColumn": 1, + "charOffset": 22979, + "charLength": 346, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnReportRuleViolation(std::shared_ptr player, const std::string &targetName, uint8_t reportType, uint8_t reportReason, const std::string &comment, const std::string &translation) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnReportRuleViolation - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e794697d00e53f54", + "equalIndicator/v1": "77c4ed346c3d9b9ca3766ffbda4bc67218c81559ef17de02d2b02e84cbbf2d4e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 368, + "startColumn": 5, + "charOffset": 12186, + "charLength": 10, + "snippet": { + "text": "defaultMap" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 366, + "startColumn": 1, + "charOffset": 12143, + "charLength": 143, + "snippet": { + "text": "\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_ICEDAMAGE:\r\n\t\t\t\tdefaultMap[4] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_HOLYDAMAGE:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a59e3866bbbf83f0", + "equalIndicator/v1": "77c678475b26cbf25e4061a0b19e5148a6c0d7b9ad36ee4eac0e401dca1773f9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 230, + "startColumn": 9, + "charOffset": 7177, + "charLength": 12, + "snippet": { + "text": "getLastIndex" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 228, + "startColumn": 1, + "charOffset": 7046, + "charLength": 327, + "snippet": { + "text": "\tint32_t getThingIndex(std::shared_ptr thing) const override final;\r\n\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::shared_ptr getThing(size_t index) const override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "91fb173dc4dae49a", + "equalIndicator/v1": "77d102ae3ef904243af6f901c28475462a8f3a85e9f6e5fc2adfffd6ae4cba02" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 617, + "startColumn": 16, + "charOffset": 17869, + "charLength": 8, + "snippet": { + "text": "duration" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 615, + "startColumn": 1, + "charOffset": 17785, + "charLength": 104, + "snippet": { + "text": "\t\tuint32_t duration = getDefaultDuration();\r\n\t\tif (duration != 0) {\r\n\t\t\tsetDuration(duration);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3f306ac9f8b2adcb", + "equalIndicator/v1": "77db55f7be6edba0e641af629e3bdd14fb301f3125457b3b3ff980f7cab5bbaf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'itemTile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'itemTile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1064, + "startColumn": 45, + "charOffset": 30893, + "charLength": 8, + "snippet": { + "text": "itemTile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1062, + "startColumn": 1, + "charOffset": 30821, + "charLength": 236, + "snippet": { + "text": "\t// tile\r\n\t// send methods\r\n\tvoid sendAddTileItem(std::shared_ptr itemTile, const Position &pos, std::shared_ptr item) {\r\n\t\tif (client) {\r\n\t\t\tint32_t stackpos = itemTile->getStackposOfItem(static_self_cast(), item);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "554e101ac407552b", + "equalIndicator/v1": "77f82fd1eb9da7899e861a50787515605af7a1b5bda1c114c2e0c91c2d75b015" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1091, + "startColumn": 6, + "charOffset": 39178, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1089, + "startColumn": 1, + "charOffset": 39145, + "charLength": 170, + "snippet": { + "text": "\tlua_pushnumber(L, exp);\r\n\r\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e892e6abfb9a8aa4", + "equalIndicator/v1": "781db4edd8cbafbe6da3284953da8e66426db8e278d98dfd4e53d275504469de" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 709, + "startColumn": 94, + "charOffset": 21511, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 707, + "startColumn": 1, + "charOffset": 21413, + "charLength": 232, + "snippet": { + "text": "}\r\n\r\nbool MoveEvent::executeStep(const std::shared_ptr &creature, std::shared_ptr item, const Position &pos) const {\r\n\t// onStepIn(creature, item, pos, fromPosition)\r\n\t// onStepOut(creature, item, pos, fromPosition)\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7d1b51db5025150d", + "equalIndicator/v1": "78210d47bb7298d1841a51e413ffffd8a0ea9caf74aee02688294ab6425029ba" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 10552, + "startColumn": 57, + "charOffset": 366508, + "charLength": 4, + "snippet": { + "text": "name" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10550, + "startColumn": 1, + "charOffset": 366447, + "charLength": 206, + "snippet": { + "text": "}\r\n\r\nvoid Game::registerAchievement(uint16_t id, std::string name, std::string description, bool secret, uint8_t grade, uint8_t points) {\r\n\tm_achievements[id] = Achievement();\r\n\tm_achievements[id].id = id;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5cba62407b40f4f6", + "equalIndicator/v1": "7856502dcc656e8a19a677120ecb30536750599cfd27a40802c1a2bc6488ec48" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 725, + "startColumn": 15, + "charOffset": 23570, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 723, + "startColumn": 1, + "charOffset": 23530, + "charLength": 133, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 1.10f) + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e5283521d9e060b2", + "equalIndicator/v1": "7858cc26fd2ce0ea3e99a48ae7b1dda4ba4c9fb574618896516a03f898a927bc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 114, + "startColumn": 76, + "charOffset": 3371, + "charLength": 9, + "snippet": { + "text": "moveEvent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 112, + "startColumn": 1, + "charOffset": 3291, + "charLength": 182, + "snippet": { + "text": "}\r\n\r\nbool MoveEvents::registerLuaPositionEvent(const std::shared_ptr moveEvent) {\r\n\tauto positionVector = moveEvent->getPositionsVector();\r\n\tif (positionVector.empty()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fba97e7f70d3b552", + "equalIndicator/v1": "7903e99891a63d72a07611e8774212238ea85cb3d58f85ce88ae9dd3f8cb3662" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 494, + "startColumn": 39, + "charOffset": 16807, + "charLength": 7, + "snippet": { + "text": "npcType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 492, + "startColumn": 1, + "charOffset": 16643, + "charLength": 268, + "snippet": { + "text": "\r\n\t\tif (!npcType->info.voiceVector.empty() && (npcType->info.yellChance >= static_cast(uniform_random(1, 100)))) {\r\n\t\t\tuint32_t index = uniform_random(0, npcType->info.voiceVector.size() - 1);\r\n\t\t\tconst voiceBlock_t &vb = npcType->info.voiceVector[index];\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "42d401bce3ec9147", + "equalIndicator/v1": "7908f7f70402b8a0a82b02f534f8fb78f1f6f87d96fe44cbb777dcfff64a6b6d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8998, + "startColumn": 2, + "charOffset": 286672, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8996, + "startColumn": 1, + "charOffset": 286577, + "charLength": 228, + "snippet": { + "text": "\r\n\t// For some reason the cip sends uint32_t, but we use uint16_t, so let's just ignore that\r\n\tuint16_t monsterRaceId = (uint16_t)msg.get();\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a22acab0afd0e913", + "equalIndicator/v1": "7991f0aa1844ae8ad425648b992ec44e6fde0e8eb6e1991d602d2a2f8b96b2d3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1149, + "startColumn": 25, + "charOffset": 37482, + "charLength": 4, + "snippet": { + "text": "maxX" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1147, + "startColumn": 1, + "charOffset": 37452, + "charLength": 113, + "snippet": { + "text": "\t}\r\n\r\n\tconst int32_t rangeX = maxX + MAP_MAX_VIEW_PORT_X;\r\n\tconst int32_t rangeY = maxY + MAP_MAX_VIEW_PORT_Y;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ae3b04f874a338a6", + "equalIndicator/v1": "799b0a6122a1603ec1736497b8e17d8c570adff139d17567e4bd14c0d42d6cd4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 115, + "startColumn": 81, + "charOffset": 6897, + "charLength": 13, + "snippet": { + "text": "const int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 113, + "startColumn": 1, + "charOffset": 6658, + "charLength": 576, + "snippet": { + "text": "\tvoid playerOnRequestQuestLog(std::shared_ptr player) const;\r\n\tvoid playerOnRequestQuestLine(std::shared_ptr player, uint16_t questId) const;\r\n\tvoid playerOnStorageUpdate(std::shared_ptr player, const uint32_t key, const int32_t value, int32_t oldValue, uint64_t currentTime) const;\r\n\tvoid playerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) const;\r\n\tvoid playerOnInventoryUpdate(std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool equip) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "228b20c348991950", + "equalIndicator/v1": "79a7fe9dee4c45c787040bb952590691691592e2f470ed0403b114abc80c1930" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1861, + "startColumn": 2, + "charOffset": 56615, + "charLength": 12, + "snippet": { + "text": "SpeakClasses" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1859, + "startColumn": 1, + "charOffset": 56590, + "charLength": 134, + "snippet": { + "text": "\tuint16_t channelId;\r\n\r\n\tSpeakClasses type = static_cast(msg.getByte());\r\n\tswitch (type) {\r\n\t\tcase TALKTYPE_PRIVATE_TO:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f7155714b1a680fc", + "equalIndicator/v1": "79a85a095244f807479fdbebc34a1213ae413a50372719c85b6caf0dd383eecf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'items' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'items' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 470, + "startColumn": 31, + "charOffset": 20485, + "charLength": 46, + "snippet": { + "text": "const std::map>" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 468, + "startColumn": 1, + "charOffset": 20399, + "charLength": 163, + "snippet": { + "text": "\r\n\tvoid parseInventoryImbuements(NetworkMessage &msg);\r\n\tvoid sendInventoryImbuements(const std::map> items);\r\n\r\n\t// reloadCreature\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ae9b9a8d7bc41c71", + "equalIndicator/v1": "79d3f4f2426cdc027903099a9de19a79e76bb080062d5691c1493e1a9f8d6cb9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 76, + "startColumn": 74, + "charOffset": 2339, + "charLength": 9, + "snippet": { + "text": "moveEvent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 74, + "startColumn": 1, + "charOffset": 2261, + "charLength": 180, + "snippet": { + "text": "}\r\n\r\nbool MoveEvents::registerLuaActionEvent(const std::shared_ptr moveEvent) {\r\n\tauto actionIdVector = moveEvent->getActionIdsVector();\r\n\tif (actionIdVector.empty()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a86530fe94d9558b", + "equalIndicator/v1": "79d76c8d0ff2f3915526aa054f000378d9b58afa993374144c94f395d99907b8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3312, + "startColumn": 65, + "charOffset": 101104, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3310, + "startColumn": 1, + "charOffset": 101035, + "charLength": 147, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureEmblem(std::shared_ptr creature) {\r\n\tif (!creature || !canSee(creature) || oldProtocol) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "217625cdb3d484a7", + "equalIndicator/v1": "79db706621cf34fc48a5399a550fca75042c3b4c3a46f435d34b1b3657100624" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7126, + "startColumn": 30, + "charOffset": 248023, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7124, + "startColumn": 1, + "charOffset": 247830, + "charLength": 332, + "snippet": { + "text": "\t\tif (damage.origin != ORIGIN_NONE && attacker && damage.primary.type != COMBAT_HEALING) {\r\n\t\t\tdamage.primary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\r\n\t\t\tdamage.secondary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\r\n\t\t}\r\n\t\tif (damage.origin != ORIGIN_NONE && target && damage.primary.type != COMBAT_HEALING) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9d6debab5635e8bf", + "equalIndicator/v1": "79e6ad3c06d709d95cc37926edb130fab24b7de5ef64f383d91449505fdd6efe" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3476, + "startColumn": 24, + "charOffset": 105145, + "charLength": 9, + "snippet": { + "text": "slotIndex" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3474, + "startColumn": 1, + "charOffset": 105073, + "charLength": 208, + "snippet": { + "text": "\t\t\t\t\tcontainers.push_back(subContainer);\r\n\t\t\t\t}\r\n\t\t\t} else if (queryAdd(slotIndex, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) { // empty slot\r\n\t\t\t\tindex = slotIndex;\r\n\t\t\t\t*destItem = nullptr;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "67b6a422856f430a", + "equalIndicator/v1": "7a2e89b82c67ad5c7ad1141f0d055509365bbe0a1ca2d66589b577b3c78b2f73" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 599, + "startColumn": 3, + "charOffset": 16102, + "charLength": 8, + "snippet": { + "text": "skills_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 597, + "startColumn": 1, + "charOffset": 15963, + "charLength": 232, + "snippet": { + "text": "void ConditionAttributes::updatePercentSkills(std::shared_ptr player) {\r\n\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\r\n\t\tskills_t skill = static_cast(i);\r\n\t\tif (skillsPercent[skill] == 0) {\r\n\t\t\tcontinue;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fbbcf0b9699211aa", + "equalIndicator/v1": "7a343c672eeacb8323b98d5368efe70659401017e3ba1c07fa928b1a0800e17a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9950, + "startColumn": 57, + "charOffset": 346979, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9948, + "startColumn": 1, + "charOffset": 346918, + "charLength": 103, + "snippet": { + "text": "}\r\n\r\nvoid Game::sendUpdateCreature(std::shared_ptr creature) {\r\n\tif (!creature) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8066c7ff5df2c2bb", + "equalIndicator/v1": "7a3506d94c898aa08dffcd9d0f136f33ec5fbe8e3bb26e355e604a40fdfb1e63" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 673, + "startColumn": 26, + "charOffset": 21832, + "charLength": 6, + "snippet": { + "text": "damage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 671, + "startColumn": 1, + "charOffset": 21675, + "charLength": 276, + "snippet": { + "text": "\t\tdamage.secondary.type = imbuementInfo.imbuement->combatType;\r\n\t\tdamage.secondary.value = damage.primary.value * (damagePercent);\r\n\t\tdamage.primary.value = damage.primary.value * (1 - damagePercent);\r\n\r\n\t\tif (imbuementInfo.imbuement->soundEffect != SoundEffect_t::SILENCE) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e106233adea1337b", + "equalIndicator/v1": "7a3aefd11bf4d6a4387f910068c640848649104e71a1cd4e6159bc3331a3a722" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 446, + "startColumn": 34, + "charOffset": 16675, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 444, + "startColumn": 1, + "charOffset": 16589, + "charLength": 221, + "snippet": { + "text": "\t\t\tplayer->sendMessageDialog(ss.str());\r\n\t\t\treturn;\r\n\t\t} else if (!slot->canSelect()) {\r\n\t\t\tplayer->sendMessageDialog(\"There was an error while processing your action. Please try reopening the task window.\");\r\n\t\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4ce8143159c1d63d", + "equalIndicator/v1": "7a601279f5bb6238b5c3bf8d0c1f4f10ec67eaa5c3dcfe3abae93b085c0970e5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 716, + "startColumn": 37, + "charOffset": 23271, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 714, + "startColumn": 1, + "charOffset": 23209, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 48) * 2.05f) + 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75a9c8e8c06ecf2e", + "equalIndicator/v1": "7a7198bc24c678e77ae3052e6f9ce3dfef6827bdb8adce97b2fd5d256f77929d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 732, + "startColumn": 90, + "charOffset": 26087, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 730, + "startColumn": 1, + "charOffset": 25993, + "charLength": 445, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnMoveItem(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) {\r\n\t// Player:onMoveItem(item, count, fromPosition, toPosition) or Player.onMoveItem(self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)\r\n\tif (info.playerOnMoveItem == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8b490f21e77ad421", + "equalIndicator/v1": "7a863cbf027d32e9ef3e9ba6bf537b8c8db75aaf40ae91f47cb25b1de5d2a5c7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'stringToIgnore' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'stringToIgnore' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1564, + "startColumn": 75, + "charOffset": 46380, + "charLength": 14, + "snippet": { + "text": "stringToIgnore" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1562, + "startColumn": 1, + "charOffset": 46301, + "charLength": 177, + "snippet": { + "text": "}\r\n\r\nvoid capitalizeWordsIgnoringString(std::string &source, const std::string stringToIgnore) {\r\n\ttoLowerCaseString(source);\r\n\tauto size = static_cast(source.size());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8b96143702df8253", + "equalIndicator/v1": "7ac92e9640263fddbb11534f0bd14c78f2a601b9f75d0d02e200f0b0fc4464c1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'context' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'context' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 100, + "startColumn": 105, + "charOffset": 3169, + "charLength": 7, + "snippet": { + "text": "context" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 98, + "startColumn": 1, + "charOffset": 3060, + "charLength": 197, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Player::createPlayerTask(uint32_t delay, std::function f, std::string context) {\r\n\treturn std::make_shared(std::move(f), std::move(context), delay);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0c82a63fbe3eefce", + "equalIndicator/v1": "7afdf0234aa81e242634f1923fed239be37f0787bdde3d4b980f0955583fe948" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 149, + "startColumn": 7, + "charOffset": 4502, + "charLength": 12, + "snippet": { + "text": "changeHealth" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 147, + "startColumn": 1, + "charOffset": 4413, + "charLength": 317, + "snippet": { + "text": "\r\n\tvoid drainHealth(std::shared_ptr attacker, int32_t damage) override;\r\n\tvoid changeHealth(int32_t healthChange, bool sendHealthChange = true) override;\r\n\tbool getNextStep(Direction &direction, uint32_t &flags) override;\r\n\tvoid onFollowCreatureComplete(const std::shared_ptr &creature) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "54709a2bfa767dba", + "equalIndicator/v1": "7b02e0288994cb3c0ec1ab933c49db5b178ab63c4e19c73215184c950c4b3ed9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 80, + "startColumn": 10, + "charOffset": 2025, + "charLength": 13, + "snippet": { + "text": "gainSoulTicks" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 78, + "startColumn": 1, + "charOffset": 1976, + "charLength": 136, + "snippet": { + "text": "\r\n\tuint32_t getSoulGainTicks() const {\r\n\t\treturn gainSoulTicks / g_configManager().getFloat(RATE_SOUL_REGEN_SPEED, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c2973b7a30d23123", + "equalIndicator/v1": "7b05155aa4d9f56d5219612874a1bb49440c149d9c0680d629747e2bd1c6b940" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 27, + "startColumn": 67, + "charOffset": 895, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 25, + "startColumn": 1, + "charOffset": 797, + "charLength": 248, + "snippet": { + "text": "Spells::~Spells() = default;\r\n\r\nTalkActionResult_t Spells::playerSaySpell(std::shared_ptr player, std::string &words) {\r\n\tauto maxOnline = g_configManager().getNumber(MAX_PLAYERS_PER_ACCOUNT, __FUNCTION__);\r\n\tauto tile = player->getTile();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6adbc29876f193a4", + "equalIndicator/v1": "7b326173ef0f2ff56c65b050cee435a9caf9f40f4b876814df8f1808c64e1c03" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'mtype' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'mtype' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6655, + "startColumn": 81, + "charOffset": 195466, + "charLength": 5, + "snippet": { + "text": "mtype" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6653, + "startColumn": 1, + "charOffset": 195381, + "charLength": 133, + "snippet": { + "text": "}\r\n\r\nbool Player::isCreatureUnlockedOnTaskHunting(const std::shared_ptr mtype) const {\r\n\tif (!mtype) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "14f81e6d482a5079", + "equalIndicator/v1": "7b497a347d78e99e767c0fa8e3e27127df9504c82dfa01e7be6c3b5666a5c0d1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotlocker.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 38, + "startColumn": 7, + "charOffset": 1186, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 36, + "startColumn": 1, + "charOffset": 1018, + "charLength": 472, + "snippet": { + "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "648811d3568fe8bc", + "equalIndicator/v1": "7b6985eebd85486a5c7ccf54857fc682e5d7b19ebf98a5e1978bbd454d8fb110" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 157, + "startColumn": 7, + "charOffset": 4268, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 155, + "startColumn": 1, + "charOffset": 4136, + "charLength": 288, + "snippet": { + "text": "void Module::executeOnRecvbyte(std::shared_ptr player, NetworkMessage &msg) {\r\n\t// onRecvbyte(player, msg, recvbyte)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"Call stack overflow. Too many lua script calls being nested {}\", player->getName());\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "748158d5f9cfbd83", + "equalIndicator/v1": "7b7515f8063c1a7b3a6d45e50f32c0ecc274b307036f6013e033a986a9c1b356" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/talkaction.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 64, + "startColumn": 85, + "charOffset": 2057, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 62, + "startColumn": 1, + "charOffset": 1968, + "charLength": 276, + "snippet": { + "text": "}\r\n\r\nTalkActionResult_t TalkActions::checkPlayerCanSayTalkAction(std::shared_ptr player, SpeakClasses type, const std::string &words) const {\r\n\tfor (const auto &[talkactionWords, talkActionPtr] : talkActions) {\r\n\t\tif (talkactionWords.find(',') != std::string::npos) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a7cc87d4c81eb120", + "equalIndicator/v1": "7b814f4941ed6d5d8d8ad101b06dbe845ad990644045de5424297059881411d9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 883, + "startColumn": 31, + "charOffset": 28748, + "charLength": 4, + "snippet": { + "text": "mana" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 881, + "startColumn": 1, + "charOffset": 28644, + "charLength": 131, + "snippet": { + "text": "\t\tmana += std::min(manaChange, getMaxMana() - mana);\r\n\t} else {\r\n\t\tmana = std::max(0, mana + manaChange);\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "04da05ebcb5427ed", + "equalIndicator/v1": "7b928278c17257e2b89b2ddd743c9c69da826e688255e68f5b190d7af8ac4699" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1340, + "startColumn": 8, + "charOffset": 39301, + "charLength": 5, + "snippet": { + "text": "items" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1338, + "startColumn": 1, + "charOffset": 39232, + "charLength": 101, + "snippet": { + "text": "\tconst TileItemVector* items = getItemList();\r\n\tif (items) {\r\n\t\tn += items->getTopItemCount();\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "45149716e850cb2e", + "equalIndicator/v1": "7bae93ae6836cf89a698001e18f381d452cb6565c208dc17f2e67ed14d81d29c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 566, + "startColumn": 18, + "charOffset": 17053, + "charLength": 11, + "snippet": { + "text": "getPosition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 564, + "startColumn": 1, + "charOffset": 17030, + "charLength": 78, + "snippet": { + "text": "\t}\r\n\r\n\tconst Position &getPosition() override final {\r\n\t\treturn position;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4494932e5a312baa", + "equalIndicator/v1": "7bb7bfe20a8d55c54ea36817c54e5b714aa179024cc3b3d291a8bf5e11d1dc10" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 60, + "startColumn": 10, + "charOffset": 1425, + "charLength": 13, + "snippet": { + "text": "gainManaTicks" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 58, + "startColumn": 1, + "charOffset": 1376, + "charLength": 136, + "snippet": { + "text": "\r\n\tuint32_t getManaGainTicks() const {\r\n\t\treturn gainManaTicks / g_configManager().getFloat(RATE_MANA_REGEN_SPEED, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bd457d6b81d46a1e", + "equalIndicator/v1": "7bc0067e7a6b926a3aa43b9b7690cb0c3e21e973d043afcf44779824c398ad73" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The variable 'oldSplash' is copy-constructed from a const reference but is only used as const reference; consider making it a const reference", + "markdown": "The variable 'oldSplash' is copy-constructed from a const reference but is only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1035, + "startColumn": 28, + "charOffset": 31609, + "charLength": 9, + "snippet": { + "text": "oldSplash" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1033, + "startColumn": 1, + "charOffset": 31429, + "charLength": 271, + "snippet": { + "text": "\t\t\t\t// remove old splash if exists\r\n\t\t\t\tfor (ItemVector::const_iterator it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\r\n\t\t\t\t\tstd::shared_ptr oldSplash = *it;\r\n\t\t\t\t\tif (!Item::items[oldSplash->getID()].isSplash()) {\r\n\t\t\t\t\t\tcontinue;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4d88dc4c67a9d2d9", + "equalIndicator/v1": "7be68d2d7a6352f9587a8e62555e03f38af5d029b635c5b0770b521fe63f3873" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6620, + "startColumn": 29, + "charOffset": 229508, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6618, + "startColumn": 1, + "charOffset": 229401, + "charLength": 274, + "snippet": { + "text": "\t\t\tdamage.secondary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\r\n\t\t}\r\n\t\tdamage.secondary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\r\n\r\n\t\tsecondaryBlockType = target->blockHit(attacker, damage.secondary.type, damage.secondary.value, false, false, field);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b310c0540268ecbf", + "equalIndicator/v1": "7bf8ae23aca31f9414141be0ed46bd078bcaf0198746a3a484b67b929aa62577" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 409, + "startColumn": 7, + "charOffset": 15407, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 407, + "startColumn": 1, + "charOffset": 15235, + "charLength": 311, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnLookInTrade(std::shared_ptr player, std::shared_ptr partner, std::shared_ptr item, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLookInTrade - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "be241a5f0bcf24f1", + "equalIndicator/v1": "7c0932f4eab7d364ff2acd7013c43b2364a4bf51a72ab389f673424a3f77ca5f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'", + "markdown": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 286, + "startColumn": 22, + "charOffset": 8338, + "charLength": 4, + "snippet": { + "text": "what" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 284, + "startColumn": 1, + "charOffset": 8291, + "charLength": 101, + "snippet": { + "text": "\t\tmessage(message) { }\r\n\r\n\tvirtual const char* what() const throw() {\r\n\t\treturn message.c_str();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6ec47a17c1f36474", + "equalIndicator/v1": "7c17e6306473abffc497e4ecc247b8b8d8b71154ca44a37a866aa99b5948a864" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 676, + "startColumn": 37, + "charOffset": 22166, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 674, + "startColumn": 1, + "charOffset": 22104, + "charLength": 134, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 104) * 0.70f) + 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c3b65c649392b52c", + "equalIndicator/v1": "7c17f6f9b6a420d78ba4ce4db9c659dc391da58553bd1c975a798f5fdf1cdb01" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creatureOutfit' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'creatureOutfit' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 423, + "startColumn": 89, + "charOffset": 18364, + "charLength": 14, + "snippet": { + "text": "const Outfit_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 421, + "startColumn": 1, + "charOffset": 18259, + "charLength": 264, + "snippet": { + "text": "\r\n\t// analyzers\r\n\tvoid sendKillTrackerUpdate(std::shared_ptr corpse, const std::string &name, const Outfit_t creatureOutfit);\r\n\tvoid sendUpdateSupplyTracker(std::shared_ptr item);\r\n\tvoid sendUpdateImpactTracker(CombatType_t type, int32_t amount);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "953b377f136bc415", + "equalIndicator/v1": "7c2bef3ac18f489312fe6d8b608fb84f3553c2a58018805e48b1c97a0cbb84b2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2666, + "startColumn": 16, + "charOffset": 79196, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2664, + "startColumn": 1, + "charOffset": 79074, + "charLength": 258, + "snippet": { + "text": "\t\t\t\tauto charges = item->getAttribute(ItemAttribute_t::CHARGES);\r\n\t\t\t\tif (absorbPercent != 0) {\r\n\t\t\t\t\tdamage -= std::round(damage * (absorbPercent / 100.));\r\n\t\t\t\t\tif (charges != 0) {\r\n\t\t\t\t\t\tg_game().transformItem(item, item->getID(), charges - 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ff45634785e36062", + "equalIndicator/v1": "7c41e08cbdfc817aae05482cf312a72f3595dfd0dd3d3a2690eb4cd2c9e89575" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Replace loop by 'std::ranges::all_of()'", + "markdown": "Replace loop by 'std::ranges::all_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 71, + "startColumn": 2, + "charOffset": 2190, + "charLength": 37, + "snippet": { + "text": "// fire global event if is registered" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 69, + "startColumn": 1, + "charOffset": 2112, + "charLength": 219, + "snippet": { + "text": "\r\nbool CreatureEvents::playerLogout(std::shared_ptr player) const {\r\n\t// fire global event if is registered\r\n\tfor (const auto &it : creatureEvents) {\r\n\t\tif (it.second->getEventType() == CREATURE_EVENT_LOGOUT) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f4c1f0a448a8541e", + "equalIndicator/v1": "7c4f3d0d75750de27382caa2f756280132bc1c121de6ebf5808ac5b98df67df7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double_t' (aka 'double') to 'uint32_t' (aka 'unsigned int')", + "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 720, + "startColumn": 16, + "charOffset": 21364, + "charLength": 23, + "snippet": { + "text": "Player::getPercentLevel" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 718, + "startColumn": 1, + "charOffset": 21289, + "charLength": 165, + "snippet": { + "text": "\tuint32_t newPercent;\r\n\tif (nextReqTries > currReqTries) {\r\n\t\tnewPercent = Player::getPercentLevel(skills[skill].tries, nextReqTries);\r\n\t} else {\r\n\t\tnewPercent = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71b1ccbc32f9111a", + "equalIndicator/v1": "7c6d617cc3c2e065f95149eade573cc402e7786339cd7eeca5ef6a6ed19f663c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: mapSectors", + "markdown": "Constructor does not initialize these fields: mapSectors" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 82, + "startColumn": 7, + "charOffset": 1742, + "charLength": 8, + "snippet": { + "text": "MapCache" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 80, + "startColumn": 1, + "charOffset": 1718, + "charLength": 77, + "snippet": { + "text": "#pragma pack()\r\n\r\nclass MapCache {\r\npublic:\r\n\tvirtual ~MapCache() = default;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "da47c3683b2746a1", + "equalIndicator/v1": "7c85466ca4fb8c6db30783818d4d82680778134061e3522b0d77a6081fc0c401" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3370, + "startColumn": 65, + "charOffset": 102684, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3368, + "startColumn": 1, + "charOffset": 102615, + "charLength": 140, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureSquare(std::shared_ptr creature, SquareColor_t color) {\r\n\tif (!canSee(creature)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bcc53ae39e756fed", + "equalIndicator/v1": "7ccccb9b221f94a10522b081ceaaf1664635c32952463a98807b50ab93819e7f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'spellName' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'spellName' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 441, + "startColumn": 79, + "charOffset": 13626, + "charLength": 9, + "snippet": { + "text": "spellName" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 439, + "startColumn": 1, + "charOffset": 13524, + "charLength": 222, + "snippet": { + "text": "\t\treturn augments;\r\n\t}\r\n\tstd::vector> getAugmentsBySpellName(std::string spellName) const {\r\n\t\tstd::vector> augments;\r\n\t\tfor (auto &augment : items[id].augments) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ae1103e01586fdbc", + "equalIndicator/v1": "7cd500aa66f2ee1eb859ccfc55899c32377af60d85bda76e90867fdf840a8efc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1066, + "startColumn": 66, + "charOffset": 38394, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1064, + "startColumn": 1, + "charOffset": 38324, + "charLength": 172, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnLoseExperience(std::shared_ptr player, uint64_t &exp) {\r\n\t// Player:onLoseExperience(exp)\r\n\tif (info.playerOnLoseExperience == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aa0a3962052f85d2", + "equalIndicator/v1": "7ce246bda1dd52c8f3f83416014e7d1d8b4ca8518bb4c26d75e5546b1718cd82" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'initialTarget' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'initialTarget' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1436, + "startColumn": 249, + "charOffset": 49936, + "charLength": 13, + "snippet": { + "text": "initialTarget" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1434, + "startColumn": 1, + "charOffset": 49683, + "charLength": 364, + "snippet": { + "text": "}\r\n\r\nstd::vector>> Combat::pickChainTargets(std::shared_ptr caster, const CombatParams ¶ms, uint8_t chainDistance, uint8_t maxTargets, bool backtracking, bool aggressive, std::shared_ptr initialTarget /* = nullptr */) {\r\n\tBenchmark bm_pickChain;\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c55f1fc5996fe74c", + "equalIndicator/v1": "7ce580b65a73fbc26c073c2943e7f895f1b702231790899f918d09499ca4e9a8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 487, + "startColumn": 62, + "charOffset": 18389, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 485, + "startColumn": 1, + "charOffset": 18323, + "charLength": 332, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnMoveItem(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPos, const Position &toPos, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) const {\r\n\tif (!getScriptInterface()) {\r\n\t\tg_logger().error(\"script interface nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "de5601ad12b47871", + "equalIndicator/v1": "7cf8142cfa585fba8b681427fc1a4e720995ea9f36e3ce1ac7d8afc38c459c7a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2714, + "startColumn": 11, + "charOffset": 80659, + "charLength": 16, + "snippet": { + "text": "getItemTypeCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2712, + "startColumn": 1, + "charOffset": 80568, + "charLength": 294, + "snippet": { + "text": "\tsize_t getFirstIndex() const override;\r\n\tsize_t getLastIndex() const override;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override;\r\n\tvoid stashContainer(StashContainerList itemDict);\r\n\tItemsTierCountList getInventoryItemsId(bool ignoreStoreInbox = false) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f0d79a03525bbe8e", + "equalIndicator/v1": "7cfd84dee6354e8a02760dc7b5afaff3f48a449fc62f3148bc0e89726925de48" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'combatChangeMana' is within a recursive call chain", + "markdown": "Function 'combatChangeMana' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7627, + "startColumn": 12, + "charOffset": 266751, + "charLength": 16, + "snippet": { + "text": "combatChangeMana" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7625, + "startColumn": 1, + "charOffset": 266735, + "charLength": 247, + "snippet": { + "text": "}\r\n\r\nbool Game::combatChangeMana(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage) {\r\n\tconst Position &targetPos = target->getPosition();\r\n\tauto manaChange = damage.primary.value + damage.secondary.value;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1a323fec81421fa2", + "equalIndicator/v1": "7d15de7297896ec81cf71d99366d08996902ee317882a9a36a373fd3ff91341d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 198, + "startColumn": 15, + "charOffset": 8081, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 196, + "startColumn": 1, + "charOffset": 7991, + "charLength": 354, + "snippet": { + "text": "\tvirtual void removeThing(std::shared_ptr, uint32_t) override { }\r\n\r\n\tvirtual void postAddNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r\n\tvirtual void postRemoveNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3f042b2848f49453", + "equalIndicator/v1": "7d1ab237bcbbcf36b0e4124f28c022d1cbb5151d7780d1198b9e40eca9955842" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6312, + "startColumn": 50, + "charOffset": 185098, + "charLength": 8, + "snippet": { + "text": "vocation" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6310, + "startColumn": 1, + "charOffset": 184883, + "charLength": 253, + "snippet": { + "text": "\t\tcondition->setParam(CONDITION_PARAM_HEALTHTICKS, vocation->getHealthGainTicks());\r\n\t\tcondition->setParam(CONDITION_PARAM_MANAGAIN, vocation->getManaGainAmount());\r\n\t\tcondition->setParam(CONDITION_PARAM_MANATICKS, vocation->getManaGainTicks());\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f1f6cbce35525ff2", + "equalIndicator/v1": "7d2d8368f5d9d838062a432aa15fd7cbfc5d0d0a3325332f189b4638fa0a8c26" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'charm' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'charm' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 607, + "startColumn": 49, + "charOffset": 30971, + "charLength": 5, + "snippet": { + "text": "charm" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 605, + "startColumn": 1, + "charOffset": 30810, + "charLength": 231, + "snippet": { + "text": "\tvoid playerInspectItem(std::shared_ptr player, uint16_t itemId, uint8_t itemCount, bool cyclopedia);\r\n\r\n\tvoid addCharmRune(const std::shared_ptr charm) {\r\n\t\tCharmList.push_back(charm);\r\n\t\tCharmList.shrink_to_fit();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "052136e094384ca7", + "equalIndicator/v1": "7d726fe7d3dd8a289e0b98e65f80992946cf31d9e57576892d344fd7a9ccf5f7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1152, + "startColumn": 41, + "charOffset": 43806, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1150, + "startColumn": 1, + "charOffset": 43760, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2a190bf0636d763f", + "equalIndicator/v1": "7d952e229e5085088e86654234ad1d77e0f6d1b826d117177a357e60aaf31ecc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3204, + "startColumn": 65, + "charOffset": 98397, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3202, + "startColumn": 1, + "charOffset": 98328, + "charLength": 143, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureOutfit(std::shared_ptr creature, const Outfit_t &outfit) {\r\n\tif (!canSee(creature)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "59968cca44bb43bb", + "equalIndicator/v1": "7da7d3007c6ffe94be277b43dd800c0ec1a4636fa5037dbd20fc37235bd22969" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Val', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Val', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/arraylist.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 112, + "startColumn": 22, + "charOffset": 2558, + "charLength": 4, + "snippet": { + "text": "_Val" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 110, + "startColumn": 1, + "charOffset": 2530, + "charLength": 87, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tvoid push_back(T &&_Val) {\r\n\t\t\tbackContainer.push_back(std::move(_Val));\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "610c3cfb270dda32", + "equalIndicator/v1": "7db39134499f7b891870a457ed188c8c0859e4c508d38eb25a0aeca560b7182f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1561, + "startColumn": 56, + "charOffset": 46737, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1559, + "startColumn": 1, + "charOffset": 46677, + "charLength": 105, + "snippet": { + "text": "}\r\n\r\nvoid Player::openImbuementWindow(std::shared_ptr item) {\r\n\tif (!client || !item) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b1381b3de6b089a6", + "equalIndicator/v1": "7dc42d74ed83527165685b75cf1ee6da301c75d621deb9393da09e4c265c380d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 667, + "startColumn": 37, + "charOffset": 21845, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 665, + "startColumn": 1, + "charOffset": 21783, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 45) * 1.55f) + 6;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c8f263725b2c3111", + "equalIndicator/v1": "7dd12342d460ea4281c268e8fdefd18bd413aa933fa497686e2c3b9408931d21" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 306, + "startColumn": 59, + "charOffset": 9604, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 304, + "startColumn": 1, + "charOffset": 9541, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nReturnValue Combat::canDoCombat(std::shared_ptr attacker, std::shared_ptr target, bool aggressive) {\r\n\tif (!aggressive) {\r\n\t\treturn RETURNVALUE_NOERROR;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aa68f39a8ee83b08", + "equalIndicator/v1": "7de9b89fd7258424b178ad0359cde967ccfa0ce80169d4b2a5169732eb1857c5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 212, + "startColumn": 26, + "charOffset": 5939, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 210, + "startColumn": 1, + "charOffset": 5908, + "charLength": 142, + "snippet": { + "text": "\t}\r\n\r\n\tif (getHouseAccessLevel(player) < getHouseAccessLevel(target) || target->hasFlag(PlayerFlags_t::CanEditHouses)) {\r\n\t\treturn false;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "07f83b827d619720", + "equalIndicator/v1": "7def474c75d3a2125f4683b966c7b5626bd676f3f2d527947e812c3dd068745f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3413, + "startColumn": 21, + "charOffset": 102991, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3411, + "startColumn": 1, + "charOffset": 102966, + "charLength": 210, + "snippet": { + "text": "}\r\n\r\nReturnValue Player::queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr /*= nullptr*/) {\r\n\tint32_t index = getThingIndex(thing);\r\n\tif (index == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "623a3d6d838119ec", + "equalIndicator/v1": "7df5413f5033a8a486eb424d42d919752c56721f0f8d4bd2b458b261db93daee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 955, + "startColumn": 96, + "charOffset": 34481, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 953, + "startColumn": 1, + "charOffset": 34381, + "charLength": 220, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) {\r\n\t// Player:onTradeRequest(target, item)\r\n\tif (info.playerOnTradeRequest == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "19bf49a6e25e0626", + "equalIndicator/v1": "7e0d0e68c591b13a3b89dca05bf6ee1ff7e350a0efee5ecb5cbb2e9f1a116e0d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 903, + "startColumn": 7, + "charOffset": 32701, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 901, + "startColumn": 1, + "charOffset": 32689, + "charLength": 141, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnReportBug - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b8977965bd8f272a", + "equalIndicator/v1": "7e115e50518cf9b1e1da3e90090ce4c16ff382f77f4a656de7cce42652a39fae" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8189, + "startColumn": 56, + "charOffset": 284606, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8187, + "startColumn": 1, + "charOffset": 284546, + "charLength": 98, + "snippet": { + "text": "}\r\n\r\nvoid Game::updatePlayerHelpers(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "27dbcabc74774955", + "equalIndicator/v1": "7e1958aa5df88cb8c140aeb4d2f03e8064b4878e51ae9f57016d860f481ed2c2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 122, + "startColumn": 30, + "charOffset": 4197, + "charLength": 13, + "snippet": { + "text": "containerItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 120, + "startColumn": 1, + "charOffset": 4086, + "charLength": 257, + "snippet": { + "text": "\tstd::shared_ptr container = item->getContainer();\r\n\tif (container) {\r\n\t\tfor (std::shared_ptr containerItem : container->getItemList()) {\r\n\t\t\tif (containerItem->getID() == ITEM_LABEL && getReceiver(containerItem, name)) {\r\n\t\t\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5fa1b55644d1604b", + "equalIndicator/v1": "7e34fc852b23eb37776562b44bfdbdf357ab1a0e8339a0ec2d276aee3c20d761" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 563, + "startColumn": 37, + "charOffset": 15118, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 561, + "startColumn": 1, + "charOffset": 15038, + "charLength": 155, + "snippet": { + "text": "\t\tswitch (i) {\r\n\t\t\tcase STAT_MAXHITPOINTS:\r\n\t\t\t\tstats[i] = static_cast(player->getMaxHealth() * ((statsPercent[i] - 100) / 100.f));\r\n\t\t\t\tbreak;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7224b20bc0491b6d", + "equalIndicator/v1": "7e659ed8c4564c9259032a02de113081864ed97937001e1f2f57cd8c07fa9c8d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 575, + "startColumn": 37, + "charOffset": 15537, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 573, + "startColumn": 1, + "charOffset": 15475, + "charLength": 131, + "snippet": { + "text": "\r\n\t\t\tcase STAT_CAPACITY:\r\n\t\t\t\tstats[i] = static_cast(player->getCapacity() * (statsPercent[i] / 100.f));\r\n\t\t\t\tbreak;\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7cc89bfc17834eb1", + "equalIndicator/v1": "7e777c97107f9f4ddc245b90a664e88e6b5d6e9a5559c082d75eff4d8b5455f9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 264, + "startColumn": 8, + "charOffset": 6538, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 262, + "startColumn": 1, + "charOffset": 6442, + "charLength": 207, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetArticle(lua_State* L) {\r\n\t// itemType:getArticle()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushString(L, itemType->article);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a21322c13c5b0fde", + "equalIndicator/v1": "7e7aa1fb13123273d3d35917eff78c2ff7a2299c37d8d67b259f08114a4c8748" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'float'", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 185, + "startColumn": 67, + "charOffset": 5267, + "charLength": 10, + "snippet": { + "text": "threadPool" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 183, + "startColumn": 1, + "charOffset": 5151, + "charLength": 283, + "snippet": { + "text": "\t\tlist.reserve(threadPool.get_thread_count());\r\n\r\n\t\tconst auto size_per_block = std::ceil(size / static_cast(threadPool.get_thread_count()));\r\n\t\tfor (uint_fast64_t i = 0; i < size; i += size_per_block) {\r\n\t\t\tlist.emplace_back(i, std::min(size, i + size_per_block));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "66fbb7cd84b6609a", + "equalIndicator/v1": "7ea865ae181f8a9c7b704abfdf90c63a33b4156695e817afc1ee898bd6dcdce9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 848, + "startColumn": 19, + "charOffset": 26164, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 846, + "startColumn": 1, + "charOffset": 26141, + "charLength": 213, + "snippet": { + "text": "}\r\n\r\nReturnValue Tile::queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t tileFlags, std::shared_ptr /*= nullptr */) {\r\n\tint32_t index = getThingIndex(thing);\r\n\tif (index == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d419e29d98947a4d", + "equalIndicator/v1": "7ebae88656307fbf79fa49b1a7a3d37dcf25718a893ee6cee529ac4092d4c99c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 665, + "startColumn": 41, + "charOffset": 25543, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 663, + "startColumn": 1, + "charOffset": 25497, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e15fca064f4070e8", + "equalIndicator/v1": "7f173a70e9c86f626e52e745443ce70458fceb96c5d8c0e11c17fc5f03f17113" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1120, + "startColumn": 52, + "charOffset": 46062, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1118, + "startColumn": 1, + "charOffset": 46006, + "charLength": 263, + "snippet": { + "text": "}\r\n\r\nbool Game::placeCreature(std::shared_ptr creature, const Position &pos, bool extendedPos /*=false*/, bool forced /*= false*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!internalPlaceCreature(creature, pos, extendedPos, forced)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5b61af4ab190d055", + "equalIndicator/v1": "7f521a7c476a143d34d798b47c2e1fe0399af2b77f51931da042120bfeaf073b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'items' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'items' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2527, + "startColumn": 78, + "charOffset": 73325, + "charLength": 5, + "snippet": { + "text": "items" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2525, + "startColumn": 1, + "charOffset": 73242, + "charLength": 159, + "snippet": { + "text": "\t}\r\n\r\n\tvoid sendInventoryImbuements(const std::map> items) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendInventoryImbuements(items);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "56bfd54b40e9d487", + "equalIndicator/v1": "7f686ddef0bfb03fdb6b3dcbcf6409ef871b10dce74916ad1a8e3aff406b9fcb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2532, + "startColumn": 36, + "charOffset": 75621, + "charLength": 8, + "snippet": { + "text": "capacity" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2530, + "startColumn": 1, + "charOffset": 75434, + "charLength": 312, + "snippet": { + "text": "\t\t\thealthMax = std::max(0, healthMax - noneVocation->getHPGain());\r\n\t\t\tmanaMax = std::max(0, manaMax - noneVocation->getManaGain());\r\n\t\t\tcapacity = std::max(0, capacity - noneVocation->getCapGain());\r\n\t\t} else {\r\n\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d5dfc1f568804c8d", + "equalIndicator/v1": "7f8a5e270b2efbffb4b3c960d6ca5467af602d8e977f2200bf1ac7a30a1f1837" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 719, + "startColumn": 16, + "charOffset": 34169, + "charLength": 10, + "snippet": { + "text": "combatType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 717, + "startColumn": 1, + "charOffset": 33974, + "charLength": 286, + "snippet": { + "text": "void ItemParse::parseField(const std::string &tmpStrValue, pugi::xml_node attributeNode, pugi::xml_attribute valueAttribute, ItemType &itemType) {\r\n\tif (tmpStrValue == \"field\") {\r\n\t\tCombatType_t combatType = COMBAT_NONE;\r\n\t\tstd::shared_ptr conditionDamage = nullptr;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0baff317600b1beb", + "equalIndicator/v1": "7fa81a995d8e71939e8d5627c37d9d51112ef9c50f2553f02f75f698860a4811" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 78, + "startColumn": 29, + "charOffset": 2695, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 76, + "startColumn": 1, + "charOffset": 2528, + "charLength": 224, + "snippet": { + "text": "std::shared_ptr Container::clone() const {\r\n\tstd::shared_ptr clone = std::static_pointer_cast(Item::clone());\r\n\tfor (std::shared_ptr item : itemlist) {\r\n\t\tclone->addItem(item->clone());\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aed0abbffcaebb80", + "equalIndicator/v1": "7fd05d16b0bf8edd43a7dc966648998f0406ecf1bcf939984b7dd45752992cc3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'long double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'long double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6031, + "startColumn": 72, + "charOffset": 177283, + "charLength": 11, + "snippet": { + "text": "nextReqMana" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6029, + "startColumn": 1, + "charOffset": 177110, + "charLength": 218, + "snippet": { + "text": "\t\tif (nextReqMana > currReqMana) {\r\n\t\t\tnewPercent = Player::getPercentLevel(manaSpent, nextReqMana);\r\n\t\t\tnewPercentToNextLevel = static_cast(manaSpent * 100) / nextReqMana;\r\n\t\t} else {\r\n\t\t\tnewPercent = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "feab87d4eeaf701b", + "equalIndicator/v1": "7fd791ec0dca3eef1f3677b60e5c83afdf24449e87bc416e92cd39fcb65ead24" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3143, + "startColumn": 35, + "charOffset": 110561, + "charLength": 5, + "snippet": { + "text": "skill" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3141, + "startColumn": 1, + "charOffset": 110521, + "charLength": 281, + "snippet": { + "text": "\t}\r\n\r\n\tfloat mitigation = std::ceil(((((skill * m_player.vocation->mitigationFactor) + (shieldFactor * (float)defenseValue)) / 100.0f) * fightFactor * distanceFactor) * 100.0f) / 100.0f;\r\n\tmitigation += (mitigation * (float)getMitigationMultiplier()) / 100.f;\r\n\treturn mitigation;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ef315b88092006ff", + "equalIndicator/v1": "7fdb3814cb896892fc7d39b91e858d065ad879fd775fbd76bf6278d146ba1cf4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1415, + "startColumn": 49, + "charOffset": 41623, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1413, + "startColumn": 1, + "charOffset": 41570, + "charLength": 114, + "snippet": { + "text": "}\r\n\r\nvoid Player::setWriteItem(std::shared_ptr item, uint16_t maxWriteLength /*= 0*/) {\r\n\twindowTextId++;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "36d9ad3c561c3d75", + "equalIndicator/v1": "7fdb85882d981f8334353739064f5b560b0d84aa3912c8b934029809dc05b7b0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'canFollowMaster' can be made const", + "markdown": "Method 'canFollowMaster' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1112, + "startColumn": 16, + "charOffset": 34882, + "charLength": 15, + "snippet": { + "text": "canFollowMaster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1110, + "startColumn": 1, + "charOffset": 34862, + "charLength": 86, + "snippet": { + "text": "}\r\n\r\nbool Creature::canFollowMaster() {\r\n\tauto master = getMaster();\r\n\tif (!master) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "348ea50ad869364d", + "equalIndicator/v1": "7fe742821577182a37bfc055cc3345f22482042c10c7948614cafcba715a8aee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'newGuild' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'newGuild' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6277, + "startColumn": 52, + "charOffset": 184204, + "charLength": 8, + "snippet": { + "text": "newGuild" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6275, + "startColumn": 1, + "charOffset": 184148, + "charLength": 106, + "snippet": { + "text": "}\r\n\r\nvoid Player::setGuild(const std::shared_ptr newGuild) {\r\n\tif (newGuild == guild) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "31ac441d2a073ae0", + "equalIndicator/v1": "7ff236245274926d4e7ff4a62020640275bea80281d16345d0c35148f46b0346" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 520, + "startColumn": 13, + "charOffset": 15031, + "charLength": 7, + "snippet": { + "text": "toCheck" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 518, + "startColumn": 1, + "charOffset": 14996, + "charLength": 106, + "snippet": { + "text": "\r\n\t\tbool ret = false;\r\n\t\tfor (auto toCheck : *items) {\r\n\t\t\tif (toCheck->isCleanable()) {\r\n\t\t\t\tret = true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a34ea0fd1d05ac3b", + "equalIndicator/v1": "7ff443f579b9e53757aa9e1d44cc58235b0a48a76d3500456050aca520e425b6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 151, + "startColumn": 63, + "charOffset": 4735, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 149, + "startColumn": 1, + "charOffset": 4668, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerFirst(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "59846e03779f5c14", + "equalIndicator/v1": "7ff61540c8025ad97e4a75d3dafda81d8d03555c80edb02a3693b1348444323a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'newMaster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'newMaster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1320, + "startColumn": 52, + "charOffset": 40572, + "charLength": 9, + "snippet": { + "text": "newMaster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1318, + "startColumn": 1, + "charOffset": 40516, + "charLength": 209, + "snippet": { + "text": "}\r\n\r\nbool Creature::setMaster(std::shared_ptr newMaster, bool reloadCreature /* = false*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\t// Persists if this creature has ever been a summon\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "714336dcfa2ebef5", + "equalIndicator/v1": "80111d7b39a5150c78339526422428fdf841afc1648ac684163bcaa56e15e812" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 139, + "startColumn": 63, + "charOffset": 4662, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 137, + "startColumn": 1, + "charOffset": 4594, + "charLength": 204, + "snippet": { + "text": "\t}\r\n\r\n\tbool playerCanUseItemWithOnHouseTile(std::shared_ptr player, std::shared_ptr item, const Position &toPos, int toStackPos, int toItemId) {\r\n\t\tif (!player || !item) {\r\n\t\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c6c2e4f818600cad", + "equalIndicator/v1": "802cf30c68c306ca053a51bda7619f2ac5e810e4d214a74c2f669e5145e15b1b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 531, + "startColumn": 41, + "charOffset": 20271, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 529, + "startColumn": 1, + "charOffset": 20225, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "da47117c1debc51b", + "equalIndicator/v1": "809949f7d3bccb85c8ce757c88c4fdf78a3661a2ca677b2e253d6bf68effd1f0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 43, + "startColumn": 14, + "charOffset": 1445, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 41, + "startColumn": 1, + "charOffset": 1125, + "charLength": 614, + "snippet": { + "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1b8f9b4c15da1abc", + "equalIndicator/v1": "80b2a9427d317045565e28d112943a7305c23b9032668d99f1a5a129f6f4dda9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 358, + "startColumn": 106, + "charOffset": 17228, + "charLength": 14, + "snippet": { + "text": "const uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 356, + "startColumn": 1, + "charOffset": 16899, + "charLength": 594, + "snippet": { + "text": "\tvoid playerRotateItem(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerConfigureShowOffSocket(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerSetShowOffSocket(uint32_t playerId, Outfit_t &outfit, const Position &pos, uint8_t stackPos, const uint16_t itemId, uint8_t podiumVisible, uint8_t direction);\r\n\tvoid playerWrapableItem(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerWriteItem(uint32_t playerId, uint32_t windowTextId, const std::string &text);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "11d270c84c19d271", + "equalIndicator/v1": "80d140c13e3159c1bbf5f16b3d2b0954b9a53b4cc17da19821068f260205a028" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'msg' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'msg' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 51, + "startColumn": 30, + "charOffset": 1487, + "charLength": 3, + "snippet": { + "text": "msg" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 49, + "startColumn": 1, + "charOffset": 1452, + "charLength": 122, + "snippet": { + "text": "\t}\r\n\r\n\tvoid send(OutputMessage_ptr msg) const {\r\n\t\tif (auto connection = getConnection();\r\n\t\t connection != nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "be99042248814e19", + "equalIndicator/v1": "80dcf03a5c5c52f23305417db99ce428fb7aebbbdd2c950b993b3fd5d5e170cb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 255, + "startColumn": 14, + "charOffset": 6638, + "charLength": 14, + "snippet": { + "text": "vocationString" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 253, + "startColumn": 1, + "charOffset": 6559, + "charLength": 221, + "snippet": { + "text": "\tbool wieldUnproperly = false;\r\n\tbool m_isDisabledChain = false;\r\n\tstd::string vocationString = \"\";\r\n\r\n\tvoid onUsedWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr destTile) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c6acba5fb110e4f5", + "equalIndicator/v1": "80eaf4ed8618affdc23151454afa9a157bb256c8f6c000d59aead7f77eb36bc3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7402, + "startColumn": 28, + "charOffset": 257686, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7400, + "startColumn": 1, + "charOffset": 257631, + "charLength": 311, + "snippet": { + "text": "\r\nvoid Game::sendMessages(\r\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\r\n\tconst Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetPlayer,\r\n\tTextMessage &message, const CreatureVector &spectators, int32_t realDamage\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9b12ee8a2a48c9b7", + "equalIndicator/v1": "80ff2db85e0893d5d0818ca2ba4e4d6c5b7b2b36b349508a8b0449ebc36377ae" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 31, + "startColumn": 22, + "charOffset": 1108, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 29, + "startColumn": 1, + "charOffset": 1082, + "charLength": 171, + "snippet": { + "text": "}\r\n\r\nReturnValue Mailbox::queryRemove(const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr /*= nullptr */) {\r\n\treturn RETURNVALUE_NOTPOSSIBLE;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "866a095aa6e97cf8", + "equalIndicator/v1": "8123233efc6ed3c37374c3da4460ff03ceef0d32e6178fdff42f095fdbc506aa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 678, + "startColumn": 7, + "charOffset": 24158, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 676, + "startColumn": 1, + "charOffset": 24146, + "charLength": 154, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnLookInShop - \"\r\n\t\t \"Player {} itemType {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb3a257bdc6ecde5", + "equalIndicator/v1": "81240401f0e6c2634eed13714554a3199931768a7312cd974d7912e2e576e897" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 609, + "startColumn": 64, + "charOffset": 16432, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 607, + "startColumn": 1, + "charOffset": 16364, + "charLength": 113, + "snippet": { + "text": "}\r\n\r\nvoid ConditionAttributes::updateSkills(std::shared_ptr player) {\r\n\tbool needUpdateSkills = false;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "143759e3d7125d4e", + "equalIndicator/v1": "813355645ae9554c1a77dde72c402cc039dcb5f13b300e07004d0a92129ec853" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1248, + "startColumn": 97, + "charOffset": 44507, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1246, + "startColumn": 1, + "charOffset": 44406, + "charLength": 228, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnInventoryUpdate(std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool equip) {\r\n\t// Player:onInventoryUpdate(item, slot, equip)\r\n\tif (info.playerOnInventoryUpdate == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "48ed36bb640a9637", + "equalIndicator/v1": "815722908dcdeac1a44b34ad31c96a15b89c952d7dd045eba04fb7e277b27012" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 569, + "startColumn": 53, + "charOffset": 17122, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 567, + "startColumn": 1, + "charOffset": 17022, + "charLength": 140, + "snippet": { + "text": "\r\n\t\t\tif (it.abilities->getHealthGain() != 0) {\r\n\t\t\t\tcondition->setParam(CONDITION_PARAM_HEALTHGAIN, it.abilities->getHealthGain());\r\n\t\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "29f9fdae2bbda93e", + "equalIndicator/v1": "815bab9a368ddede35aca29bcb2e538a2c4537ef7212b6b0613e98d8c1db11a3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1071, + "startColumn": 41, + "charOffset": 40794, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1069, + "startColumn": 1, + "charOffset": 40748, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "248d02cd87a3f5e6", + "equalIndicator/v1": "81770f69559da9777dc7c6a6a90e572811e63a688b7203ae67c1b43d3cc87de9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 603, + "startColumn": 7, + "charOffset": 23212, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 601, + "startColumn": 1, + "charOffset": 22982, + "charLength": 377, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnReportRuleViolation(std::shared_ptr player, const std::string &targetName, uint8_t reportType, uint8_t reportReason, const std::string &comment, const std::string &translation) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnReportRuleViolation - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dbd1e4fa7ce9bf0a", + "equalIndicator/v1": "81964ef979200fbc4fa8940a9c274f3ec55b23907bd2d4a9f8d803888de6643b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 38, + "startColumn": 18, + "charOffset": 1218, + "charLength": 12, + "snippet": { + "text": "ValueWrapper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 36, + "startColumn": 1, + "charOffset": 1036, + "charLength": 369, + "snippet": { + "text": "\texplicit(false) ValueWrapper(const ValueVariant &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const std::string &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(bool value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(int value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(double value, uint64_t timestamp = 0);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c37009ce43adce02", + "equalIndicator/v1": "81a69b9347869a81170c51ed509122ecc3e501f6333222e64b2d676d99aaaf3e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 213, + "startColumn": 6, + "charOffset": 7681, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 211, + "startColumn": 1, + "charOffset": 7637, + "charLength": 187, + "snippet": { + "text": "\tlua_pushnumber(L, colorSecondary);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 8, 6) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7885d9bb6a560f1c", + "equalIndicator/v1": "81ed899311ac1c6508fcebe738b2b8f6d6a4170e978b82e1973e2147919d9bd0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Switch has 2 consecutive identical branches", + "markdown": "Switch has 2 consecutive identical branches" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 187, + "startColumn": 3, + "charOffset": 6799, + "charLength": 4, + "snippet": { + "text": "case" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 185, + "startColumn": 1, + "charOffset": 6732, + "charLength": 157, + "snippet": { + "text": "\t\tcase COMBAT_MANADRAIN:\r\n\t\t\treturn CIPBIA_ELEMENTAL_MANADRAIN;\r\n\t\tcase COMBAT_AGONYDAMAGE:\r\n\t\t\treturn CIPBIA_ELEMENTAL_AGONY;\r\n\t\tcase COMBAT_NEUTRALDAMAGE:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb5de1520b195047", + "equalIndicator/v1": "81fb2c50a23e7c92ecb2283d39b235f82ab76ab18d9dec6ae45a3b6213348034" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?", + "markdown": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2465, + "startColumn": 7, + "charOffset": 68890, + "charLength": 25, + "snippet": { + "text": "Condition::startCondition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2463, + "startColumn": 1, + "charOffset": 68799, + "charLength": 151, + "snippet": { + "text": "\r\nbool ConditionSpellCooldown::startCondition(std::shared_ptr creature) {\r\n\tif (!Condition::startCondition(creature)) {\r\n\t\treturn false;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "061448583c72b8bf", + "equalIndicator/v1": "8213505e894001718a053fbce4df889b3fa5bfdbfe147b2a90ae2fb2f2094bdc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: category", + "markdown": "Constructor does not initialize these fields: category" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creatures_definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1362, + "startColumn": 8, + "charOffset": 35684, + "charLength": 12, + "snippet": { + "text": "CreatureIcon" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1360, + "startColumn": 1, + "charOffset": 35671, + "charLength": 58, + "snippet": { + "text": "};\r\n\r\nstruct CreatureIcon {\r\n\tCreatureIcon() = default;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eede2ccf0ab4c9c0", + "equalIndicator/v1": "8230457ec29670c8bb5122e36c50652d21fc222187344e148f5e225519280fb9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 54, + "startColumn": 7, + "charOffset": 2122, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 52, + "startColumn": 1, + "charOffset": 2039, + "charLength": 387, + "snippet": { + "text": "\tvoid removeThing(std::shared_ptr thing, uint32_t count) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ea01fb01d8562800", + "equalIndicator/v1": "823332fcdbf3be3bbfb6da2f2ed5d64570f52a17eba4c955b1f17d34b2e0c127" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 158, + "startColumn": 12, + "charOffset": 4195, + "charLength": 7, + "snippet": { + "text": "uint8_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 156, + "startColumn": 1, + "charOffset": 4084, + "charLength": 244, + "snippet": { + "text": "// Merge only async thread events with main dispatch events\r\nvoid Dispatcher::mergeAsyncEvents() {\r\n\tconstexpr uint8_t start = static_cast(TaskGroup::GenericParallel);\r\n\tconstexpr uint8_t end = static_cast(TaskGroup::Last);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4329df7f9ea01aa0", + "equalIndicator/v1": "825c960ce11bc1801e71635bbfc968a4339df613c15941b6ba0ea6a50786752e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6914, + "startColumn": 29, + "charOffset": 240023, + "charLength": 36, + "snippet": { + "text": "(damage.primary.value * damageBonus)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6912, + "startColumn": 1, + "charOffset": 239884, + "charLength": 268, + "snippet": { + "text": "\t\t\tint32_t damageBonus = attackerPlayer->wheel()->checkExecutionersThrow(target);\r\n\t\t\tif (damageBonus != 0) {\r\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\r\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "66a1f2b2fd18f2cb", + "equalIndicator/v1": "8273ade1b8fd115145076bd80318b197d1372cc6beedc346997fcf583f6a87fb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/events_callbacks.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 12, + "charOffset": 1363, + "charLength": 8, + "snippet": { + "text": "callback" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1179, + "charLength": 265, + "snippet": { + "text": "std::vector> EventsCallbacks::getCallbacksByType(EventCallback_t type) const {\r\n\tstd::vector> eventCallbacks;\r\n\tfor (auto callback : getCallbacks()) {\r\n\t\tif (callback->getType() != type) {\r\n\t\t\tcontinue;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4a8a70c1681e8a9b", + "equalIndicator/v1": "828f8e4b34c22669f505280b7fc33d53d5d92d0a044c31688dee5ac5e14e027a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'float'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1047, + "startColumn": 145, + "charOffset": 30503, + "charLength": 13, + "snippet": { + "text": "(end - start)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1045, + "startColumn": 1, + "charOffset": 30326, + "charLength": 223, + "snippet": { + "text": "\r\n\tuint64_t end = OTSYS_TIME();\r\n\tg_logger().info(\"CLEAN: Removed {} item{} from {} tile{} in {} seconds\", count, (count != 1 ? \"s\" : \"\"), qntTiles, (qntTiles != 1 ? \"s\" : \"\"), (end - start) / (1000.f));\r\n\treturn count;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "62aa7d09a1b66d55", + "equalIndicator/v1": "82a6a3bd7f9ef71d5a8ec63b87e90bfaf318db44183ddff04feefa3884fd0c69" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: type", + "markdown": "Constructor does not initialize these fields: type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 53, + "startColumn": 7, + "charOffset": 1481, + "charLength": 14, + "snippet": { + "text": "TargetCallback" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 51, + "startColumn": 1, + "charOffset": 1469, + "charLength": 161, + "snippet": { + "text": "};\r\n\r\nclass TargetCallback final : public CallBack {\r\npublic:\r\n\tvoid onTargetCombat(std::shared_ptr creature, std::shared_ptr target) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5523d4a454555970", + "equalIndicator/v1": "82bf27ed558062b50234254f71eb84bfc3d5e5030e5341650c63683102963123" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 82, + "startColumn": 46, + "charOffset": 2315, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 80, + "startColumn": 1, + "charOffset": 2265, + "charLength": 152, + "snippet": { + "text": "}\r\n\r\nbool BedItem::canUse(std::shared_ptr player) {\r\n\tif ((player == nullptr) || (house == nullptr) || !player->isPremium()) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "485a3681112c8b2e", + "equalIndicator/v1": "82cfde0bcbdc716e6efa04686d99d0513804f605d61bfddb3dc02e2687d42317" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'", + "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7736, + "startColumn": 22, + "charOffset": 242866, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7734, + "startColumn": 1, + "charOffset": 242738, + "charLength": 176, + "snippet": { + "text": "\t\t\tmsg.add(player->getBaseSkill(skill));\r\n\t\t\tmsg.add(player->getLoyaltySkill(skill));\r\n\t\t\tmsg.add(player->getSkillPercent(skill) * 100);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ab42adf619831db0", + "equalIndicator/v1": "82e00db84037d20e42b1b7f7fb6707e1f2fedc2ec8223454424f9e2b4c504adc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 638, + "startColumn": 126, + "charOffset": 22776, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 636, + "startColumn": 1, + "charOffset": 22646, + "charLength": 306, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnLookInTrade(std::shared_ptr player, std::shared_ptr partner, std::shared_ptr item, int32_t lookDistance) {\r\n\t// Player:onLookInTrade(partner, item, distance) or Player.onLookInTrade(self, partner, item, distance)\r\n\tif (info.playerOnLookInTrade == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e9729f44ae017822", + "equalIndicator/v1": "8320df8500aef70238228eded681fa9987b198cc00a3722bfaee5e9ac7102968" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 575, + "startColumn": 66, + "charOffset": 21894, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 573, + "startColumn": 1, + "charOffset": 21824, + "charLength": 293, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnMoveCreature(std::shared_ptr player, std::shared_ptr creature, const Position &fromPosition, const Position &toPosition) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnMoveCreature - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0bdc976aa8a83eae", + "equalIndicator/v1": "832c608098ea0255c7abc3b7164c76a478ef37658a589bc0e1a4f9c0f918b8ee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1200, + "startColumn": 7, + "charOffset": 42814, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1198, + "startColumn": 1, + "charOffset": 42802, + "charLength": 147, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnRequestQuestLog - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "43759119ee5b0ead", + "equalIndicator/v1": "833842659f6d6c17fb3af038c7a7a2e1fd3f775786a614b01aa21a0d3108f90c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 141, + "startColumn": 22, + "charOffset": 3871, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 139, + "startColumn": 1, + "charOffset": 3818, + "charLength": 506, + "snippet": { + "text": "\r\n\t// cylinder implementations\r\n\tvirtual ReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e9421f4031cf4086", + "equalIndicator/v1": "834a8588687b46040c8ea4c119ee0c42ab4e1084a367e29f75591cc71280d6ca" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 498, + "startColumn": 20, + "charOffset": 11721, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 496, + "startColumn": 1, + "charOffset": 11696, + "charLength": 67, + "snippet": { + "text": "\t}\r\n\r\n\tlua_pushnumber(L, tile->getCreatureCount());\r\n\treturn 1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0917524b8e113c67", + "equalIndicator/v1": "835fed54a7e971aad6cde3f69d0717146aae78a3918a1e5da705fc7bb76a8c78" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3574, + "startColumn": 45, + "charOffset": 110314, + "charLength": 27, + "snippet": { + "text": "Weapons::getMaxWeaponDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3572, + "startColumn": 1, + "charOffset": 110153, + "charLength": 604, + "snippet": { + "text": "\t\t\tint32_t attackSkill = player->getSkillLevel(SKILL_DISTANCE);\r\n\t\t\tfloat attackFactor = player->getAttackFactor();\r\n\t\t\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor, true) * player->getVocation()->distDamageMultiplier);\r\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\r\n\t\t\t\tmaxDamage += static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue - weapon->getAttack() + it.abilities->elementDamage, attackFactor, true) * player->getVocation()->distDamageMultiplier);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5a60e15866fc382d", + "equalIndicator/v1": "8364b096eb3eb3528bfcea3b16038f765ee1b6c217b088d083f5f65857eb415f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6866, + "startColumn": 26, + "charOffset": 237949, + "charLength": 49, + "snippet": { + "text": "(damage.primary.value * damage.healingMultiplier)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6864, + "startColumn": 1, + "charOffset": 237751, + "charLength": 282, + "snippet": { + "text": "// Wheel of destiny combat helpers\r\nvoid Game::applyWheelOfDestinyHealing(CombatDamage &damage, std::shared_ptr attackerPlayer, std::shared_ptr target) {\r\n\tdamage.primary.value += (damage.primary.value * damage.healingMultiplier) / 100.;\r\n\r\n\tif (attackerPlayer) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "94fbf54d5f6ec097", + "equalIndicator/v1": "8367dcfd8141373da8e051755da25a53179c777923ed8309c8e00c32ad77c843" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 719, + "startColumn": 26, + "charOffset": 33476, + "charLength": 19, + "snippet": { + "text": "MITIGATION_INCREASE" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 717, + "startColumn": 1, + "charOffset": 33265, + "charLength": 369, + "snippet": { + "text": "// SLOT_PURPLE_TOP_75 = 23\r\nvoid IOWheel::slotPurpleTop75(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\r\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\r\n\tauto pointsInSlot = isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_PURPLE_TOP_75);\r\n\tif (isKnight(vocationCipId)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8a6e7be58d521cd3", + "equalIndicator/v1": "8375a2e38fe685e52b8b0c0b3554762509f4efb283344b83a8b54abd3df87462" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8968, + "startColumn": 46, + "charOffset": 313495, + "charLength": 5, + "snippet": { + "text": "offer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8966, + "startColumn": 1, + "charOffset": 313328, + "charLength": 369, + "snippet": { + "text": "\tif (offer.type == MARKETACTION_BUY) {\r\n\t\tplayer->setBankBalance(player->getBankBalance() + offer.price * offer.amount);\r\n\t\tg_metrics().addCounter(\"balance_decrease\", offer.price * offer.amount, { { \"player\", player->getName() }, { \"context\", \"market_purchase\" } });\r\n\t\t// Send market window again for update stats\r\n\t\tplayer->sendMarketEnter(player->getLastDepotId());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b8f274a553b2d95e", + "equalIndicator/v1": "83a2f6f66884beeb6065f28b1ed5f3d3751dac13872218e93b5660ebcb9524b7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 132, + "startColumn": 8, + "charOffset": 3369, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 130, + "startColumn": 1, + "charOffset": 3273, + "charLength": 213, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsWritable(lua_State* L) {\r\n\t// itemType:isWritable()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->canWriteText);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fecbfee0a7344972", + "equalIndicator/v1": "83b6083a60415fcb315fecf453596e92afb772f2c60601f46b6dc06c22871433" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getForgeItemFromId' can be made const", + "markdown": "Method 'getForgeItemFromId' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4142, + "startColumn": 31, + "charOffset": 124790, + "charLength": 18, + "snippet": { + "text": "getForgeItemFromId" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4140, + "startColumn": 1, + "charOffset": 124755, + "charLength": 168, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Player::getForgeItemFromId(uint16_t itemId, uint8_t tier) {\r\n\tfor (auto item : getAllInventoryItems(true)) {\r\n\t\tif (item->hasImbuements()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f10a7c788cb2f725", + "equalIndicator/v1": "83c7898f903cf5ddb28345d322a78c74af1fe05c4b35ab4e67f77aa328cd66e3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 897, + "startColumn": 69, + "charOffset": 34228, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 895, + "startColumn": 1, + "charOffset": 34155, + "charLength": 205, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnRequestQuestLog(std::shared_ptr player) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnRequestQuestLog - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d60cae31049fa3be", + "equalIndicator/v1": "83cd4d677e1bdc61787c1b9b70c91dce7cf7eff5c4feacb0cf5885bf6770f746" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2787, + "startColumn": 3, + "charOffset": 85256, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2785, + "startColumn": 1, + "charOffset": 85210, + "charLength": 177, + "snippet": { + "text": "\t\tplayer->sendTeamFinderList();\r\n\t} else {\r\n\t\tuint32_t leaderID = msg.get();\r\n\t\tstd::shared_ptr leader = g_game().getPlayerByGUID(leaderID);\r\n\t\tif (!leader) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "571c3eb07fc3bc95", + "equalIndicator/v1": "83da22252258ca33488a665ca7df51a295b12a0fed9dd2f9c4eac58e014bc390" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 732, + "startColumn": 13, + "charOffset": 23736, + "charLength": 12, + "snippet": { + "text": "maxHitChance" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 730, + "startColumn": 1, + "charOffset": 23706, + "charLength": 60, + "snippet": { + "text": "\t\t\t}\r\n\t\t} else {\r\n\t\t\tchance = maxHitChance;\r\n\t\t}\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1b30f1afa43c9cba", + "equalIndicator/v1": "83e67846b7fc0ae6764972a3190bcb1d6bd70ebbc596cb92456b6ef82a95e145" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 945, + "startColumn": 23, + "charOffset": 30616, + "charLength": 8, + "snippet": { + "text": "blockHit" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 943, + "startColumn": 1, + "charOffset": 30589, + "charLength": 247, + "snippet": { + "text": "}\r\n\r\nBlockType_t Creature::blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense /* = false */, bool checkArmor /* = false */, bool /* field = false */) {\r\n\tBlockType_t blockType = BLOCK_NONE;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "280b03377f315c8a", + "equalIndicator/v1": "841d7b4a47b17ebb571f2d63b0d440a2d8a63a4ff994d271fd39f806b76dafe0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1369, + "startColumn": 55, + "charOffset": 46906, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1367, + "startColumn": 1, + "charOffset": 46847, + "charLength": 298, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatDispel(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms) {\r\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\r\n\tif ((caster && target)\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3f43a94fcc471f43", + "equalIndicator/v1": "8430d27dbeb524e928545475dd30cdd62a4403ee4787a619dd7ac6a4dd937ad7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 769, + "startColumn": 11, + "charOffset": 22395, + "charLength": 7, + "snippet": { + "text": "manaMax" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 767, + "startColumn": 1, + "charOffset": 22335, + "charLength": 127, + "snippet": { + "text": "\t\t\treturn healthMax;\r\n\t\tcase STAT_MAXMANAPOINTS:\r\n\t\t\treturn manaMax;\r\n\t\tcase STAT_MAGICPOINTS:\r\n\t\t\treturn getBaseMagicLevel();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e43530ae45a004ac", + "equalIndicator/v1": "84582db627bd4324bb7196e04e179996dae1dfe9bb42c048ff18e86e4fcd1c8a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 293, + "startColumn": 75, + "charOffset": 10519, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 291, + "startColumn": 1, + "charOffset": 10440, + "charLength": 246, + "snippet": { + "text": "}\r\n\r\nReturnValue Events::eventCreatureOnTargetCombat(std::shared_ptr creature, std::shared_ptr target) {\r\n\t// Creature:onTargetCombat(target) or Creature.onTargetCombat(self, target)\r\n\tif (info.creatureOnTargetCombat == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8542ef0daec09de0", + "equalIndicator/v1": "846ab527628f1f0788ef9ee1d87967badb91b085856ba16a484b8340a3ac5c7b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1076, + "startColumn": 83, + "charOffset": 35126, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1074, + "startColumn": 1, + "charOffset": 35039, + "charLength": 214, + "snippet": { + "text": "}\r\n\r\nbool Combat::doCombat(std::shared_ptr caster, std::shared_ptr target) const {\r\n\tif (caster != nullptr && params.chainCallback) {\r\n\t\treturn doCombatChain(caster, target, params.aggressive);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9b0478bb40a9ba8c", + "equalIndicator/v1": "848b4a84f4453dd07e3ace653986eb66b5587dd37f4f7e7af73ed1225d233ac4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 670, + "startColumn": 2, + "charOffset": 18228, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 668, + "startColumn": 1, + "charOffset": 18077, + "charLength": 306, + "snippet": { + "text": "\tConditionType_t conditionType = getNumber(L, 2);\r\n\tConditionId_t conditionId = getNumber(L, 3, CONDITIONID_COMBAT);\r\n\tuint32_t subId = getNumber(L, 4, 0);\r\n\r\n\tconst std::shared_ptr condition = creature->getCondition(conditionType, conditionId, subId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1f83e388b04628ed", + "equalIndicator/v1": "848f1eb27fe15ffcc3858f6aff8749d7a6bb90c1b626e170a70246ad3fff1ab7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 719, + "startColumn": 15, + "charOffset": 23356, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 717, + "startColumn": 1, + "charOffset": 23316, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 65) * 1.50f) + 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3d0708affa6aa96d", + "equalIndicator/v1": "84a014af1aa77cdf8971b86783b6cb58756445fa2f395e78bf008e131bca829a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3142, + "startColumn": 2, + "charOffset": 96331, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3140, + "startColumn": 1, + "charOffset": 96262, + "charLength": 172, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseModalWindowAnswer(NetworkMessage &msg) {\r\n\tuint32_t id = msg.get();\r\n\tuint8_t button = msg.getByte();\r\n\tuint8_t choice = msg.getByte();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ec2847515bd92797", + "equalIndicator/v1": "84b34c61ecf4ece2929f454b2143ed8dfbd17fc637ca041da6fc4adcb3b62142" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead", + "markdown": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 35, + "charOffset": 722, + "charLength": 9, + "snippet": { + "text": "std::atoi" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 613, + "charLength": 317, + "snippet": { + "text": "\r\nuint8_t IOMarket::getTierFromDatabaseTable(const std::string &string) {\r\n\tauto tier = static_cast(std::atoi(string.c_str()));\r\n\tif (tier > g_configManager().getNumber(FORGE_MAX_ITEM_TIER, __FUNCTION__)) {\r\n\t\tg_logger().error(\"{} - Failed to get number value {} for tier table result\", __FUNCTION__, tier);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ca93225499e1390a", + "equalIndicator/v1": "84b6ebd4c7a9dca6d62216448ae51d6f02e704dcd8d98ab8bc5c91bc4b16df51" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')", + "markdown": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5775, + "startColumn": 46, + "charOffset": 170628, + "charLength": 8, + "snippet": { + "text": "std::max" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5773, + "startColumn": 1, + "charOffset": 170501, + "charLength": 287, + "snippet": { + "text": "\t\t\tskullDuration = std::floor(skullTicks / (24 * 60 * 60 * 1000));\r\n\t\t}\r\n\t\tclient->sendUnjustifiedPoints(dayProgress, std::max(dayMax - dayKills, 0.0), weekProgress, std::max(weekMax - weekKills, 0.0), monthProgress, std::max(monthMax - monthKills, 0.0), skullDuration);\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "df07f981822657bf", + "equalIndicator/v1": "84b7aae92bdadc5fe89ee106f2f5c66669aeba97c5b56970dcc33ea17ee3670b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6895, + "startColumn": 27, + "charOffset": 239111, + "charLength": 50, + "snippet": { + "text": "(damage.primary.value * (damage.damageMultiplier))" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6893, + "startColumn": 1, + "charOffset": 239046, + "charLength": 218, + "snippet": { + "text": "\r\n\tif (damage.damageMultiplier > 0) {\r\n\t\tdamage.primary.value += (damage.primary.value * (damage.damageMultiplier)) / 100.;\r\n\t\tdamage.secondary.value += (damage.secondary.value * (damage.damageMultiplier)) / 100.;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cafe6d66966b4d3a", + "equalIndicator/v1": "84c863489bdfa19e8472483c88b204c35a0a339ea34152a828cb9149569499d5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 187, + "startColumn": 8, + "charOffset": 4737, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 185, + "startColumn": 1, + "charOffset": 4637, + "charLength": 219, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsPickupable(lua_State* L) {\r\n\t// itemType:isPickupable()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isPickupable());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ff70e9478cf884d6", + "equalIndicator/v1": "84ca960e8ead10ea90d5993a83ae1bf31528729765d683da7846b6cf5c1d08c3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 117, + "startColumn": 24, + "charOffset": 3961, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 115, + "startColumn": 1, + "charOffset": 3933, + "charLength": 222, + "snippet": { + "text": "}\r\n\r\nReturnValue HouseTile::queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor /*= nullptr*/) {\r\n\tstd::shared_ptr item = thing->getItem();\r\n\tif (!item) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fdd3cd057c041b2c", + "equalIndicator/v1": "84ce4b8b6ac1aab1c6194680981053d2c786939499522f6fb969421f212fde6b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'inbox' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'inbox' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotlocker.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 45, + "startColumn": 54, + "charOffset": 1623, + "charLength": 5, + "snippet": { + "text": "inbox" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 43, + "startColumn": 1, + "charOffset": 1565, + "charLength": 163, + "snippet": { + "text": "}\r\n\r\nvoid DepotLocker::removeInbox(std::shared_ptr inbox) {\r\n\tauto cit = std::find(itemlist.begin(), itemlist.end(), inbox);\r\n\tif (cit == itemlist.end()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e2afd0277c5af2e9", + "equalIndicator/v1": "84d68e88d976137349fbe50e84bf8533482d406a6161cfb395b0eb2e55a34f65" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 336, + "startColumn": 60, + "charOffset": 12022, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 334, + "startColumn": 1, + "charOffset": 11958, + "charLength": 234, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventCreatureOnHear(std::shared_ptr creature, std::shared_ptr speaker, const std::string &words, SpeakClasses type) {\r\n\t// Creature:onHear(speaker, words, type)\r\n\tif (info.creatureOnHear == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1fbc564e15a9f5ae", + "equalIndicator/v1": "852e17aea5fa9fe81b482949c618434af414628f405122244e463f507a1826fc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 449, + "startColumn": 76, + "charOffset": 12522, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 447, + "startColumn": 1, + "charOffset": 12442, + "charLength": 151, + "snippet": { + "text": "}\r\n\r\nvoid Party::shareExperience(uint64_t experience, std::shared_ptr target /* = nullptr*/) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1a403ea4a6eb0db7", + "equalIndicator/v1": "85350433829775e600b3e727f467bd89bf02830fccb032127262b41da965951c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7627, + "startColumn": 55, + "charOffset": 266794, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7625, + "startColumn": 1, + "charOffset": 266735, + "charLength": 247, + "snippet": { + "text": "}\r\n\r\nbool Game::combatChangeMana(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage) {\r\n\tconst Position &targetPos = target->getPosition();\r\n\tauto manaChange = damage.primary.value + damage.secondary.value;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9a0750d5a85873ae", + "equalIndicator/v1": "854305211bb25dc7a1f64e52b547380ec2c2f9574a2c5a730d590158ca2186af" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1437, + "startColumn": 41, + "charOffset": 50982, + "charLength": 17, + "snippet": { + "text": "m_playerBonusData" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1435, + "startColumn": 1, + "charOffset": 50929, + "charLength": 180, + "snippet": { + "text": "\r\n\t// Leech\r\n\tsetPlayerCombatStats(COMBAT_LIFEDRAIN, m_playerBonusData.leech.lifeLeech * 100);\r\n\tsetPlayerCombatStats(COMBAT_MANADRAIN, m_playerBonusData.leech.manaLeech * 100);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b5af103ceb33f1ff", + "equalIndicator/v1": "8543153d2d49b8de25032443c4a8ef308d1cef14c69b532940401d4ecd72831e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2322, + "startColumn": 2, + "charOffset": 72298, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2320, + "startColumn": 1, + "charOffset": 72291, + "charLength": 120, + "snippet": { + "text": "\t}\r\n\r\n\tuint16_t raceId = msg.get();\r\n\tstd::string Class = \"\";\r\n\tstd::shared_ptr mtype = nullptr;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1c748247b567b6a9", + "equalIndicator/v1": "854c61a3600dcd0f9866dae47247cbdd22ff8461bd1d721fd23d0a00d9dd4cb9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 225, + "startColumn": 78, + "charOffset": 6686, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 223, + "startColumn": 1, + "charOffset": 6604, + "charLength": 213, + "snippet": { + "text": "}\r\n\r\nbool Map::placeCreature(const Position ¢erPos, std::shared_ptr creature, bool extendedPos /* = false*/, bool forceLogin /* = false*/) {\r\n\tauto monster = creature->getMonster();\r\n\tif (monster) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "21b802bfed659689", + "equalIndicator/v1": "8554e880223b4d694a57eb6172f39c679e000077ae95aa838a362dd445fcbacb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1251, + "startColumn": 10, + "charOffset": 34640, + "charLength": 11, + "snippet": { + "text": "healthTicks" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1249, + "startColumn": 1, + "charOffset": 34592, + "charLength": 131, + "snippet": { + "text": "\r\n\tif (player != nullptr && isBuff) {\r\n\t\treturn healthTicks / g_configManager().getFloat(RATE_SPELL_COOLDOWN, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2b408c742833826c", + "equalIndicator/v1": "85596cde6332d81057a877e94a616f11348ca6471363b68028b19f9ac8408b20" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotchest.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 59, + "startColumn": 18, + "charOffset": 1794, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 57, + "startColumn": 1, + "charOffset": 1772, + "charLength": 229, + "snippet": { + "text": "}\r\n\r\nvoid DepotChest::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tstd::shared_ptr localParent = getParent();\r\n\tif (localParent != nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "064ea766fa05ed36", + "equalIndicator/v1": "8565c2a58e4b81fc3cb28f6916f364daf2071d95c6a59fc39016e4a72ec004df" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'owner' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'owner' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1038, + "startColumn": 46, + "charOffset": 29047, + "charLength": 5, + "snippet": { + "text": "owner" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1036, + "startColumn": 1, + "charOffset": 28997, + "charLength": 98, + "snippet": { + "text": "}\r\n\r\nbool Item::isOwner(std::shared_ptr owner) const {\r\n\tif (!owner) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3fef2afd3d9494eb", + "equalIndicator/v1": "858c617afef66b22e7bba2d50119fb7affb55f0fa96f9b203b59a16a223aa0fc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'actor' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'actor' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6454, + "startColumn": 104, + "charOffset": 222883, + "charLength": 5, + "snippet": { + "text": "actor" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6452, + "startColumn": 1, + "charOffset": 222775, + "charLength": 186, + "snippet": { + "text": "}\r\n\r\nvoid Game::sendSingleSoundEffect(const Position &pos, SoundEffect_t soundId, std::shared_ptr actor /* = nullptr*/) {\r\n\tif (soundId == SoundEffect_t::SILENCE) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2511f6a683abf69d", + "equalIndicator/v1": "8598f51d1ee090219989f5b5073b37ccf0a51e2d02e8771ceddd7e02dee13a00" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1813, + "startColumn": 3, + "charOffset": 54721, + "charLength": 16, + "snippet": { + "text": "ObjectCategory_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1811, + "startColumn": 1, + "charOffset": 54596, + "charLength": 288, + "snippet": { + "text": "\t\tg_game().playerSetManagedContainer(player->getID(), category, pos, itemId, stackpos, true);\r\n\t} else if (action == 1) {\r\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\r\n\t\tg_game().playerClearManagedContainer(player->getID(), category, true);\r\n\t} else if (action == 2) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fc8423c5c82b5b1c", + "equalIndicator/v1": "85a216b5000a95fc99067bdb986f1f1de5b2dc5d79f98c66f53df10ca8f1721e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1022, + "startColumn": 66, + "charOffset": 36931, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1020, + "startColumn": 1, + "charOffset": 36861, + "charLength": 255, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnGainExperience(std::shared_ptr player, std::shared_ptr target, uint64_t &exp, uint64_t rawExp) {\r\n\t// Player:onGainExperience(target, exp, rawExp)\r\n\t// rawExp gives the original exp which is not multiplied\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "55a29f7d7d8699c4", + "equalIndicator/v1": "86061a7c75d8fd4e701736e34e46b7dcf40646789445ded1927198c30a1b9adc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1923, + "startColumn": 20, + "charOffset": 66083, + "charLength": 1, + "snippet": { + "text": "y" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1921, + "startColumn": 1, + "charOffset": 65975, + "charLength": 148, + "snippet": { + "text": "\t\t\t\t// calculate new coordinates using rotation center\r\n\t\t\t\tint32_t newX = x - centerX;\r\n\t\t\t\tint32_t newY = y - centerY;\r\n\r\n\t\t\t\t// perform rotation\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d495f0885005ea90", + "equalIndicator/v1": "8616dca46b3c33e55145620b9dcdfdd9255cd12a6b46ab43b14cf6b15517689f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3093, + "startColumn": 71, + "charOffset": 115148, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3091, + "startColumn": 1, + "charOffset": 115073, + "charLength": 265, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::internalCollectManagedItems(std::shared_ptr player, std::shared_ptr item, ObjectCategory_t category /* = OBJECTCATEGORY_DEFAULT*/, bool isLootContainer /* = true*/) {\r\n\tif (!player || !item) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "59a1a2c31b9828cf", + "equalIndicator/v1": "861e4027dd9f59663a3a2967ccbfc2355bb4981fb4493746603cd2977fe39ee0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'row' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'row' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 175, + "startColumn": 14, + "charOffset": 5335, + "charLength": 22, + "snippet": { + "text": "const std::string_view" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 173, + "startColumn": 1, + "charOffset": 5226, + "charLength": 196, + "snippet": { + "text": "\texplicit DBInsert(std::string query);\r\n\tvoid upsert(const std::vector &columns);\r\n\tbool addRow(const std::string_view row);\r\n\tbool addRow(std::ostringstream &row);\r\n\tbool execute();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "67f42a6f4e01d0cd", + "equalIndicator/v1": "862b845df39bd9ae4c20c41f050497b6da4277accca66a9d4f6cf4f3e405946e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1265, + "startColumn": 46, + "charOffset": 45063, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1263, + "startColumn": 1, + "charOffset": 44954, + "charLength": 173, + "snippet": { + "text": "\tscriptInterface.pushFunction(info.playerOnInventoryUpdate);\r\n\r\n\tLuaScriptInterface::pushUserdata(L, player);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c67e425b43731f62", + "equalIndicator/v1": "862f0911d16f4144dcc3b6f5f8d82705a7b6ea641c226bad72fcbcd432ce966f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1490, + "startColumn": 12, + "charOffset": 42449, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1488, + "startColumn": 1, + "charOffset": 42433, + "charLength": 323, + "snippet": { + "text": "}\r\n\r\nvoid Tile::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link /*= LINK_OWNER*/) {\r\n\tfor (const auto &spectator : Spectators().find(getPosition(), true)) {\r\n\t\tspectator->getPlayer()->postAddNotification(thing, oldParent, index, LINK_NEAR);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8960385ece3c2a76", + "equalIndicator/v1": "8661739e8a2b25a3e2eb8706fece418755aac4cd085009930843504fcb183598" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1399, + "startColumn": 90, + "charOffset": 48360, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1397, + "startColumn": 1, + "charOffset": 48266, + "charLength": 364, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatDefault(std::shared_ptr caster, std::shared_ptr target, const Position &origin, const CombatParams ¶ms) {\r\n\tif (!params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR)) {\r\n\t\tauto spectators = Spectators().find(target->getPosition(), true);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "adf951155788fc04", + "equalIndicator/v1": "8663201d0d8094b4d60557a8b95b1085e5c6c880f704dceca4f04b5edaa697ea" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 371, + "startColumn": 8, + "charOffset": 9263, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 369, + "startColumn": 1, + "charOffset": 9161, + "charLength": 220, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetShootRange(lua_State* L) {\r\n\t// itemType:getShootRange()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->shootRange);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2b2d8bffddaa6f59", + "equalIndicator/v1": "8680d094caf7a2f2a2c28bf59abe417e2b76470d7fb874db58c5d5058e3ec463" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 143, + "startColumn": 8, + "charOffset": 3634, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 141, + "startColumn": 1, + "charOffset": 3538, + "charLength": 240, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsBlocking(lua_State* L) {\r\n\t// itemType:isBlocking()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->blockProjectile || itemType->blockSolid);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71358653253885cc", + "equalIndicator/v1": "8684f207488a45ba9922f35c4b5eacb8ccddb4e22b9507ca83bd0e8cd463e4e0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1063, + "startColumn": 7, + "charOffset": 40465, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1061, + "startColumn": 1, + "charOffset": 40339, + "charLength": 273, + "snippet": { + "text": "\r\nvoid EventCallback::monsterPostDropLoot(std::shared_ptr monster, std::shared_ptr corpse) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::monsterPostDropLoot - \"\r\n\t\t \"Monster corpse {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "187d2a470ede4312", + "equalIndicator/v1": "86932966f11e826bee42adbcd88e86c9b5f100bd1400e84e2625aa9dbbbba33b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 154, + "startColumn": 8, + "charOffset": 3930, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 152, + "startColumn": 1, + "charOffset": 3830, + "charLength": 219, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsGroundTile(lua_State* L) {\r\n\t// itemType:isGroundTile()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isGroundTile());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aebc9d7af3139121", + "equalIndicator/v1": "86b82848c5f1dce4227ab35fabae9852c7783a87f1403f953750c6d6ea8c7ae6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1439, + "startColumn": 53, + "charOffset": 42224, + "charLength": 5, + "snippet": { + "text": "house" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1437, + "startColumn": 1, + "charOffset": 42167, + "charLength": 117, + "snippet": { + "text": "}\r\n\r\nvoid Player::sendHouseWindow(std::shared_ptr house, uint32_t listId) const {\r\n\tif (!client) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2c2e6ef1dd8ac3e4", + "equalIndicator/v1": "86bb2e72817cff2555c83f26e8389cb3597889be8bc47b583a9a24abc6039384" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1001, + "startColumn": 27, + "charOffset": 36168, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 999, + "startColumn": 1, + "charOffset": 36136, + "charLength": 130, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnTradeAccept, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6c22602cb9629f51", + "equalIndicator/v1": "86e4208ba121cdd7c451875e69a545983887c2e95f5a20e0a3481cf327701441" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1377, + "startColumn": 36, + "charOffset": 41377, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1375, + "startColumn": 1, + "charOffset": 41250, + "charLength": 147, + "snippet": { + "text": "\tvoid sendPartyCreatureShield(std::shared_ptr creature) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPartyCreatureShield(creature);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "799e0db7a2587352", + "equalIndicator/v1": "86e5e05b7cecdecc1dd17349d961842b3d3f01ddcbb801be1d6aa7475230f490" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 57, + "startColumn": 57, + "charOffset": 1921, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 55, + "startColumn": 1, + "charOffset": 1860, + "charLength": 154, + "snippet": { + "text": "}\r\n\r\nbool Creature::canSeeCreature(std::shared_ptr creature) const {\r\n\tif (!canSeeInvisibility() && creature->isInvisible()) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a8a859ad9494a8a9", + "equalIndicator/v1": "86ee2f5225fbf77570ff02d855ccd4e2461512bb20f3c29e6ffdb6ca58778bd4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 132, + "startColumn": 45, + "charOffset": 3472, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 130, + "startColumn": 1, + "charOffset": 3423, + "charLength": 117, + "snippet": { + "text": "}\r\n\r\nbool Bank::withdraw(std::shared_ptr player, uint64_t amount) {\r\n\tif (!debit(amount)) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7402dc9fb7918b64", + "equalIndicator/v1": "8709688dc071e487a9d8a3f1b1eb2000871458cb5ccaa1cf3a7b0af03c53abbd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8399, + "startColumn": 54, + "charOffset": 266060, + "charLength": 8, + "snippet": { + "text": "stackpos" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8397, + "startColumn": 1, + "charOffset": 265955, + "charLength": 129, + "snippet": { + "text": "\t\tAddCreature(msg, creature, false, 0);\r\n\t} else {\r\n\t\tsendAddCreature(creature, creature->getPosition(), stackpos, false);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b464a438f4f53d00", + "equalIndicator/v1": "8730b1f2424a1aea971b38e68b62d0b1cea7edec7efa8ff79535bc0c8e75ca49" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 553, + "startColumn": 31, + "charOffset": 16859, + "charLength": 13, + "snippet": { + "text": "containerItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 551, + "startColumn": 1, + "charOffset": 16717, + "charLength": 392, + "snippet": { + "text": "\t\t\t// Iterate through every item and check how much free stackable slots there is.\r\n\t\t\tuint32_t slotIndex = 0;\r\n\t\t\tfor (std::shared_ptr containerItem : itemlist) {\r\n\t\t\t\tif (containerItem != item && containerItem->equals(item) && containerItem->getItemCount() < containerItem->getStackSize()) {\r\n\t\t\t\t\tuint32_t remainder = (containerItem->getStackSize() - containerItem->getItemCount());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f7d94c231d1a199b", + "equalIndicator/v1": "873e7817a68524c80dc0cb9efd596a71ea7c8dfe19b73d6ed05b472461b822ed" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 569, + "startColumn": 46, + "charOffset": 17243, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 567, + "startColumn": 1, + "charOffset": 17101, + "charLength": 267, + "snippet": { + "text": "\r\n\tconst std::shared_ptr topVisibleCreature = tile->getBottomVisibleCreature(player);\r\n\tif (blockingCreature && topVisibleCreature) {\r\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTENOUGHROOM);\r\n\t\tg_game().addMagicEffect(player->getPosition(), CONST_ME_POFF);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "49bd168b9e03dbf8", + "equalIndicator/v1": "8751243ba9a903317dc585d6ecee97339419e465c3bd137ce78e32195ab32d9c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 673, + "startColumn": 37, + "charOffset": 22059, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 671, + "startColumn": 1, + "charOffset": 21997, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 0.80f) + 3;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3bf811f539ad3fea", + "equalIndicator/v1": "8767bbdf6cc342dba4e6ff23b0850ae5f6892e7b6933947873cb49f4d1ecb7e2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 307, + "startColumn": 27, + "charOffset": 11089, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 305, + "startColumn": 1, + "charOffset": 11057, + "charLength": 133, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.creatureOnTargetCombat, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4f85a99f74433c79", + "equalIndicator/v1": "87911739799c3f89563f079aba3dbd5f5ba45c943360b440a11e313810ff5ef9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 587, + "startColumn": 8, + "charOffset": 14460, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 585, + "startColumn": 1, + "charOffset": 14354, + "charLength": 227, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetShowDuration(lua_State* L) {\r\n\t// itemType:getShowDuration()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushboolean(L, itemType->showDuration);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dc8b4ab40f49e3f3", + "equalIndicator/v1": "879adf284f4861432524119ec0b9c1308198258856685d2d7362dc94e1f21c36" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 63, + "startColumn": 56, + "charOffset": 1824, + "charLength": 34, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 61, + "startColumn": 1, + "charOffset": 1685, + "charLength": 325, + "snippet": { + "text": "\tstd::shared_ptr getMonsterTypeByBossRaceId(uint16_t raceId) const;\r\n\r\n\tvoid addBosstiaryKill(std::shared_ptr player, const std::shared_ptr mtype, uint32_t amount = 1) const;\r\n\tuint16_t calculateLootBonus(uint32_t bossPoints) const;\r\n\tuint32_t calculateBossPoints(uint16_t lootBonus) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d9f5a8cfc02b2091", + "equalIndicator/v1": "87b70f98badc4ed392a77249b965b8798916568489bc5854451b1d3ae185ee0e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'inPushEvent' can be made const", + "markdown": "Method 'inPushEvent' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1798, + "startColumn": 7, + "charOffset": 53685, + "charLength": 11, + "snippet": { + "text": "inPushEvent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1796, + "startColumn": 1, + "charOffset": 53673, + "charLength": 59, + "snippet": { + "text": "\t}\r\n\r\n\tbool inPushEvent() {\r\n\t\treturn inEventMovePush;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0451d3092a713cc8", + "equalIndicator/v1": "87c27bd74ccff016c27c70af5b6379c161835b6f264e99e5fd2f96cb6db89272" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 139, + "startColumn": 93, + "charOffset": 4692, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 137, + "startColumn": 1, + "charOffset": 4594, + "charLength": 204, + "snippet": { + "text": "\t}\r\n\r\n\tbool playerCanUseItemWithOnHouseTile(std::shared_ptr player, std::shared_ptr item, const Position &toPos, int toStackPos, int toItemId) {\r\n\t\tif (!player || !item) {\r\n\t\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c392fc259cca1f85", + "equalIndicator/v1": "8814603e6d35227ffd3d835ee5c8160e816a25eaeba9738c9e94b04de81e3e7d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 84, + "startColumn": 12, + "charOffset": 2716, + "charLength": 6, + "snippet": { + "text": "health" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 82, + "startColumn": 1, + "charOffset": 2618, + "charLength": 283, + "snippet": { + "text": "\t\tmonster->currentOutfit = mType->info.outfit;\r\n\t\tmonster->skull = mType->info.skull;\r\n\t\tmonster->health = mType->info.health * mType->getHealthMultiplier();\r\n\t\tmonster->healthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\t\tmonster->baseSpeed = mType->getBaseSpeed();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "940ced98c6b70e5e", + "equalIndicator/v1": "88361cff7089b37dc67945ac4d50e08a748e6b96fccbf741cbb6e7c5ea4c3637" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 945, + "startColumn": 58, + "charOffset": 30651, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 943, + "startColumn": 1, + "charOffset": 30589, + "charLength": 247, + "snippet": { + "text": "}\r\n\r\nBlockType_t Creature::blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense /* = false */, bool checkArmor /* = false */, bool /* field = false */) {\r\n\tBlockType_t blockType = BLOCK_NONE;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c1ced9f34fdf228a", + "equalIndicator/v1": "883d24ac3a051f968b2e0c6a65929cbcbba085421f9552a9a4ad2e0a4f10bf33" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 709, + "startColumn": 58, + "charOffset": 22282, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 707, + "startColumn": 1, + "charOffset": 22220, + "charLength": 118, + "snippet": { + "text": "}\r\n\r\nvoid Party::updatePlayerVocation(std::shared_ptr player) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "295ddff3915a8959", + "equalIndicator/v1": "886e44f7ec8284f1c4d4f26c6ab0cfbb7dda44c7ff0c40b28daec6c47d4ef071" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 656, + "startColumn": 58, + "charOffset": 25179, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 654, + "startColumn": 1, + "charOffset": 25117, + "charLength": 204, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnTurn(std::shared_ptr player, Direction direction) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTurn - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a2d9008381336e89", + "equalIndicator/v1": "8872686b9fccb2950c8328ee66cf51f65deef1653ecdcfc40fc118237a47e105" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 324, + "startColumn": 6, + "charOffset": 11628, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 322, + "startColumn": 1, + "charOffset": 11594, + "charLength": 202, + "snippet": { + "text": "\r\n\tReturnValue returnValue;\r\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\r\n\t\treturnValue = RETURNVALUE_NOTPOSSIBLE;\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "820b95af2577b69a", + "equalIndicator/v1": "88b0add17400ecbe80a1d991ca3090e8e77c684cec95fb9bf9803462ed8378f4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 567, + "startColumn": 70, + "charOffset": 26632, + "charLength": 5, + "snippet": { + "text": "value" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 565, + "startColumn": 1, + "charOffset": 26448, + "charLength": 342, + "snippet": { + "text": "\t\tint16_t value = pugi::cast(valueAttribute.value());\r\n\t\tAbilities &abilities = itemType.getAbilities();\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "80b63859ec1f29bc", + "equalIndicator/v1": "88bb684683efe56ba3639e8032dd6d84f2f0c63e14e93dddb9115a86188db5d5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 769, + "startColumn": 83, + "charOffset": 24354, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 767, + "startColumn": 1, + "charOffset": 24267, + "charLength": 141, + "snippet": { + "text": "}\r\n\r\nvoid Party::addPlayerSupply(std::shared_ptr player, std::shared_ptr item) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "18742166120611af", + "equalIndicator/v1": "88be11cf2d0822b574b509f9263241a80af189a0755bc80b3ca770587fb53eae" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 624, + "startColumn": 74, + "charOffset": 16789, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 622, + "startColumn": 1, + "charOffset": 16711, + "charLength": 181, + "snippet": { + "text": "}\r\n\r\nvoid ConditionAttributes::updatePercentAbsorbs(std::shared_ptr creature) {\r\n\tfor (uint8_t i = 0; i < COMBAT_COUNT; i++) {\r\n\t\tauto value = getAbsorbPercentByIndex(i);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cf5784d068d5538d", + "equalIndicator/v1": "88c82eb5aad123d25cfbbac379a3a7d42c82d727b058007fb8b3e22e160a7358" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 709, + "startColumn": 2, + "charOffset": 24608, + "charLength": 17, + "snippet": { + "text": "OperatingSystem_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 707, + "startColumn": 1, + "charOffset": 24601, + "charLength": 151, + "snippet": { + "text": "\t}\r\n\r\n\tOperatingSystem_t operatingSystem = static_cast(msg.get());\r\n\tversion = msg.get(); // Protocol version\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4f1817a2341da0b1", + "equalIndicator/v1": "88c88b850c0be2036185d55714b11b82e66772887e4dd991cd65c1147ae8e1ee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 262, + "startColumn": 27, + "charOffset": 9537, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 260, + "startColumn": 1, + "charOffset": 9505, + "charLength": 131, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.creatureOnAreaCombat, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cdfcd1169b91af28", + "equalIndicator/v1": "8959a1d5e606c05c1ebb2b65db5cbb8c5f16626fd7b7b7351563cc4869ca7928" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'parent' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'parent' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 361, + "startColumn": 172, + "charOffset": 12500, + "charLength": 6, + "snippet": { + "text": "parent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 359, + "startColumn": 1, + "charOffset": 12324, + "charLength": 228, + "snippet": { + "text": "}\r\n\r\nvoid Npc::onPlayerSellItem(std::shared_ptr player, uint16_t itemId, uint8_t subType, uint16_t amount, bool ignore, uint64_t &totalPrice, std::shared_ptr parent /*= nullptr*/) {\r\n\tif (!player) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "090b15b07586d240", + "equalIndicator/v1": "897187955548493187f47844cce9d1779c7023c909b8e0f7efb6a6cf80ebcbe4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'b' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'b' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 455, + "startColumn": 13, + "charOffset": 12379, + "charLength": 1, + "snippet": { + "text": "b" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 453, + "startColumn": 1, + "charOffset": 12315, + "charLength": 73, + "snippet": { + "text": "\t}\r\n\tvoid setBedItem(std::shared_ptr b) {\r\n\t\tbedItem = b;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a66e971be3c5330b", + "equalIndicator/v1": "89a78210a224ad95072b595ba0e778e24c1eecec9fc8150547d6a59a835b9176" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7593, + "startColumn": 26, + "charOffset": 265009, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7591, + "startColumn": 1, + "charOffset": 264941, + "charLength": 282, + "snippet": { + "text": "// Life leech\r\nvoid Game::applyLifeLeech(\r\n\tstd::shared_ptr attackerPlayer, std::shared_ptr targetMonster, std::shared_ptr target, const CombatDamage &damage, const int32_t &realDamage\r\n) const {\r\n\t// Wheel of destiny bonus - life leech chance and amount\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "08627cd07b1b80b7", + "equalIndicator/v1": "89b09e57a1c8660f90ac26d284957880e7d6e6e7f3291c7dfc6d21406bdc2587" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1301, + "startColumn": 53, + "charOffset": 43477, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1299, + "startColumn": 1, + "charOffset": 43420, + "charLength": 342, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatMana(std::shared_ptr caster, std::shared_ptr target, const Position &origin, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\r\n\tif ((caster && target)\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f9022d2b1b3b5914", + "equalIndicator/v1": "89c8ea41c6b82c55a9532b22618ccb4b6d3d9b4c132f0ea05215dca92defe8fe" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first.", + "markdown": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1581, + "startColumn": 28, + "charOffset": 45264, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1579, + "startColumn": 1, + "charOffset": 45208, + "charLength": 118, + "snippet": { + "text": "\t\t\t\tseparator = true;\r\n\t\t\t}\r\n\t\t\tif (int32_t hitChance = it.hitChance;\r\n\t\t\t hitChance != 0) {\r\n\t\t\t\tif (separator) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bd7f64cc212ff18e", + "equalIndicator/v1": "89d174f966c891e21ac84750d6b1336362827333a231a17f592ee3c17e40a8bd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/attribute.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 141, + "startColumn": 50, + "charOffset": 4262, + "charLength": 13, + "snippet": { + "text": "const int64_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 139, + "startColumn": 1, + "charOffset": 4126, + "charLength": 306, + "snippet": { + "text": "\tconst CustomAttribute* getCustomAttribute(const std::string &attributeName) const;\r\n\r\n\tvoid setCustomAttribute(const std::string &key, const int64_t value);\r\n\tvoid setCustomAttribute(const std::string &key, const std::string &value);\r\n\tvoid setCustomAttribute(const std::string &key, const double value);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "06a6a51fbd222548", + "equalIndicator/v1": "89d43eeab3cd0ede108b4e4f5391a787748b0c2b4cfb8567be701795e808b1a1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 951, + "startColumn": 7, + "charOffset": 30436, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 949, + "startColumn": 1, + "charOffset": 30294, + "charLength": 349, + "snippet": { + "text": "bool InstantSpell::executeCastSpell(std::shared_ptr creature, const LuaVariant &var) const {\r\n\t// onCastSpell(creature, var)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[InstantSpell::executeCastSpell - Creature {} words {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7b5ecc604cf063aa", + "equalIndicator/v1": "89d60bf5e812e1ab20205104a0b848da4af0677b1878081162305c78483579ca" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: id", + "markdown": "Constructor does not initialize these fields: id" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items_classification.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 7, + "charOffset": 616, + "charLength": 18, + "snippet": { + "text": "ItemClassification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 552, + "charLength": 128, + "snippet": { + "text": "\r\n// Classification class for forging system and market.\r\nclass ItemClassification {\r\npublic:\r\n\tItemClassification() = default;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "12b3c3865fbef238", + "equalIndicator/v1": "89e71f043d4ce335e7cef542e2dfd5f24988ecc6af74ebf6187f261d1a969028" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 449, + "startColumn": 67, + "charOffset": 12971, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 447, + "startColumn": 1, + "charOffset": 12780, + "charLength": 279, + "snippet": { + "text": "\tvirtual void onAttacked();\r\n\tvirtual void onAttackedCreatureDrainHealth(std::shared_ptr target, int32_t points);\r\n\tvirtual void onTargetCreatureGainHealth(std::shared_ptr, int32_t) { }\r\n\tvoid onAttackedCreatureKilled(std::shared_ptr target);\r\n\t/**\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "45cfa072eeb2c6e3", + "equalIndicator/v1": "89f00e2260216e8d9fee94a4d12001bd2d35a6e5518b0aad80795a01b4869b73" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7129, + "startColumn": 28, + "charOffset": 248190, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7127, + "startColumn": 1, + "charOffset": 248068, + "charLength": 247, + "snippet": { + "text": "\t\t}\r\n\t\tif (damage.origin != ORIGIN_NONE && target && damage.primary.type != COMBAT_HEALING) {\r\n\t\t\tdamage.primary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\r\n\t\t\tdamage.secondary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2485e5a4ca9b3df3", + "equalIndicator/v1": "89fa48c0ed96530fdeb6d274a117363c8a0e5113e69c66274c2f0a4025ba39c6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 278, + "startColumn": 7, + "charOffset": 10240, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 276, + "startColumn": 1, + "charOffset": 10158, + "charLength": 283, + "snippet": { + "text": "\r\nbool EventCallback::partyOnDisband(std::shared_ptr party) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::partyOnDisband - Party leader {}] Call stack \"\r\n\t\t \"overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fb9069b4678cfd0e", + "equalIndicator/v1": "8a06e7077b5936f7ca521f1d2ac759e4d809bc0fd4a5e1515267abd901c019fd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 607, + "startColumn": 6, + "charOffset": 29687, + "charLength": 24, + "snippet": { + "text": "valueAttribute.as_bool()" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 605, + "startColumn": 1, + "charOffset": 29516, + "charLength": 291, + "snippet": { + "text": "void ItemParse::parseSupressDrunk(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\r\n\tstd::string stringValue = tmpStrValue;\r\n\tif (valueAttribute.as_bool()) {\r\n\t\tConditionType_t conditionType = CONDITION_NONE;\r\n\t\tif (stringValue == \"suppressdrunk\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a1dadec3cf85ca81", + "equalIndicator/v1": "8a18ef2e09a6a54022df51e857ac41d819f439e02189957e07bca969157bf3b4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 689, + "startColumn": 116, + "charOffset": 22555, + "charLength": 13, + "snippet": { + "text": "spellCooldown" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 687, + "startColumn": 1, + "charOffset": 22366, + "charLength": 283, + "snippet": { + "text": "\t\tspellCooldown -= augmentCooldownReduction;\r\n\t\tif (spellCooldown > 0) {\r\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLCOOLDOWN, spellCooldown / rateCooldown, 0, false, m_spellId);\r\n\t\t\tplayer->addCondition(condition);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6a1e4cfe0408be5e", + "equalIndicator/v1": "8a3ba5c477a29b3f9cca7ef20ca232022f3c2faf38abe7a1446a6e21f49c90f2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 935, + "startColumn": 17, + "charOffset": 28005, + "charLength": 10, + "snippet": { + "text": "removeItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 933, + "startColumn": 1, + "charOffset": 27984, + "charLength": 139, + "snippet": { + "text": "}\r\n\r\nvoid Container::removeItem(std::shared_ptr thing, bool sendUpdateToClient /* = false*/) {\r\n\tif (thing == nullptr) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "386a5296317fd094", + "equalIndicator/v1": "8a414d76abcafd2431bb84aa919483cf603cdd1e17533b12c7ec21d593a11bd2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 225, + "startColumn": 2, + "charOffset": 8264, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 223, + "startColumn": 1, + "charOffset": 8257, + "charLength": 52, + "snippet": { + "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e286cd0bf7b7f2fd", + "equalIndicator/v1": "8a794715c827a66fa56a6fd4d9da8f122271daa8fddf76e3489b4a00e623b377" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4449, + "startColumn": 45, + "charOffset": 160140, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4447, + "startColumn": 1, + "charOffset": 160091, + "charLength": 248, + "snippet": { + "text": "}\r\n\r\nvoid Game::unwrapItem(std::shared_ptr item, uint16_t unWrapId, std::shared_ptr house, std::shared_ptr player) {\r\n\tif (item->hasOwner() && !item->isOwner(player)) {\r\n\t\tplayer->sendCancelMessage(RETURNVALUE_ITEMISNOTYOURS);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0624b6a876fc4230", + "equalIndicator/v1": "8a99076b710598091468348377352fe362db24f08ef689a6ffe965ceebda60b7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1165, + "startColumn": 26, + "charOffset": 34788, + "charLength": 16, + "snippet": { + "text": "getDownItemCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1163, + "startColumn": 1, + "charOffset": 34731, + "charLength": 153, + "snippet": { + "text": "\r\n\tif (items && !isInserted) {\r\n\t\tint32_t downItemSize = getDownItemCount();\r\n\t\tif (pos < downItemSize) {\r\n\t\t\tauto it = items->getBeginDownItem() + pos;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1b739cfd9b088bfa", + "equalIndicator/v1": "8ab23a61f11ad784811bf06eb64c1f334a8c5cb47dddf5f82246214f40cffb4f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_mm_ctz', which is reserved in the global namespace", + "markdown": "Declaration uses identifier '_mm_ctz', which is reserved in the global namespace" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/simd.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 59, + "startColumn": 28, + "charOffset": 1497, + "charLength": 7, + "snippet": { + "text": "_mm_ctz" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 57, + "startColumn": 1, + "charOffset": 1431, + "charLength": 149, + "snippet": { + "text": "#ifdef _MSC_VER\r\n\t#include \r\n__forceinline unsigned int _mm_ctz(unsigned int value) {\r\n\tunsigned long i = 0;\r\n\t_BitScanForward(&i, value);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "54fe5b9685e5094b", + "equalIndicator/v1": "8ad017a320447521f779651fa53440e6728a6f3562f310926b4d212a85a854df" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 332, + "startColumn": 2, + "charOffset": 8254, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 330, + "startColumn": 1, + "charOffset": 8155, + "charLength": 212, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetWeight(lua_State* L) {\r\n\t// itemType:getWeight([count = 1])\r\n\tuint16_t count = getNumber(L, 2, 1);\r\n\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ccc6094024e32bf0", + "equalIndicator/v1": "8adb6734d6d8a4d578f063b866574612e7cba9b18a12c6524d30ae69867db77c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 634, + "startColumn": 51, + "charOffset": 18313, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 632, + "startColumn": 1, + "charOffset": 18258, + "charLength": 110, + "snippet": { + "text": "}\r\n\r\nbool AccessList::isInList(std::shared_ptr player) const {\r\n\tif (allowEveryone) {\r\n\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a1b04ac2c76ad178", + "equalIndicator/v1": "8ae3fb49039cc1265d15a806a03808d362fb5f7b9a2f1f80c81068a1b0645897" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 835, + "startColumn": 124, + "charOffset": 32001, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 833, + "startColumn": 1, + "charOffset": 31873, + "charLength": 271, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnCombat - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "109a1e3727fa260a", + "equalIndicator/v1": "8af87cea9adbb1e9dbdce4a0cf5af8c273b1b0d56560fba491b032b3431e2d44" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 516, + "startColumn": 7, + "charOffset": 17122, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 514, + "startColumn": 1, + "charOffset": 16856, + "charLength": 462, + "snippet": { + "text": "bool Action::executeUse(std::shared_ptr player, std::shared_ptr item, const Position &fromPosition, std::shared_ptr target, const Position &toPosition, bool isHotkey) {\r\n\t// onUse(player, item, fromPosition, target, toPosition, isHotkey)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Action::executeUse - Player {}, on item {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "14fc298e46fe8cad", + "equalIndicator/v1": "8b285363d1537fa789a653de9a3291d03dc7c50329d9f8cad37af65fc7ab5016" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'targetItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'targetItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 987, + "startColumn": 153, + "charOffset": 35699, + "charLength": 10, + "snippet": { + "text": "targetItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 985, + "startColumn": 1, + "charOffset": 35542, + "charLength": 263, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) {\r\n\t// Player:onTradeAccept(target, item, targetItem)\r\n\tif (info.playerOnTradeAccept == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2600da812c0153c4", + "equalIndicator/v1": "8b37a6e03c94962520b1ddeab86e19715dbc279a7bf6f143c91a07559f86557d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2483, + "startColumn": 65, + "charOffset": 94645, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2481, + "startColumn": 1, + "charOffset": 94576, + "charLength": 258, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::internalPlayerAddItem(std::shared_ptr player, std::shared_ptr item, bool dropOnMap /*= true*/, Slots_t slot /*= CONST_SLOT_WHEREEVER*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tuint32_t remainderCount = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5461e94fb106dc0d", + "equalIndicator/v1": "8b4e57283fd4800bbce20ce9ffef5ff365bde928dd4300e76d3d0c15f89c4635" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 667, + "startColumn": 52, + "charOffset": 21035, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 665, + "startColumn": 1, + "charOffset": 20979, + "charLength": 156, + "snippet": { + "text": "}\r\n\r\nvoid Npc::handlePlayerMove(std::shared_ptr player, const Position &newPos) {\r\n\tif (!canInteract(newPos)) {\r\n\t\tremovePlayerInteraction(player);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2237ace7f6e1bb42", + "equalIndicator/v1": "8b5672dc4e2e4706277928d05da86609ee896b5a11eb4e349d97161ccd9bced7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'refreshCyclopediaMonsterTracker' can be made const", + "markdown": "Method 'refreshCyclopediaMonsterTracker' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 336, + "startColumn": 7, + "charOffset": 8903, + "charLength": 31, + "snippet": { + "text": "refreshCyclopediaMonsterTracker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 334, + "startColumn": 1, + "charOffset": 8891, + "charLength": 155, + "snippet": { + "text": "\t}\r\n\r\n\tvoid refreshCyclopediaMonsterTracker(bool isBoss = false) {\r\n\t\trefreshCyclopediaMonsterTracker(getCyclopediaMonsterTrackerSet(isBoss), isBoss);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ed99e0ebf271a612", + "equalIndicator/v1": "8b697986a1cfb6c10cff6851d5f7b4ac2a2ff75dbbce0fda9b0eec15349003af" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 187, + "startColumn": 11, + "charOffset": 5178, + "charLength": 14, + "snippet": { + "text": "GlobalEventMap" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 185, + "startColumn": 1, + "charOffset": 5151, + "charLength": 52, + "snippet": { + "text": "\t\t}\r\n\t\tdefault:\r\n\t\t\treturn GlobalEventMap();\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8abe9fcc360caf54", + "equalIndicator/v1": "8bdd4f4ecfd2ec3f20f39b1785a7d916849e01f362ee25c118c32a41ef8161de" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2871, + "startColumn": 27, + "charOffset": 87679, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2869, + "startColumn": 1, + "charOffset": 87647, + "charLength": 144, + "snippet": { + "text": "\t}\r\n\r\n\tint32_t removeRuneCost = player->getLevel() * 100;\r\n\tif (player->hasCharmExpansion()) {\r\n\t\tremoveRuneCost = (removeRuneCost * 75) / 100;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "586b8fcc2cae76e3", + "equalIndicator/v1": "8c1ca67b0dc390523b945841e44b55fb17f6902e9039f898ccbb63e79716e81e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')", + "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6030, + "startColumn": 17, + "charOffset": 177162, + "charLength": 23, + "snippet": { + "text": "Player::getPercentLevel" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6028, + "startColumn": 1, + "charOffset": 177087, + "charLength": 221, + "snippet": { + "text": "\t\tuint8_t newPercent;\r\n\t\tif (nextReqMana > currReqMana) {\r\n\t\t\tnewPercent = Player::getPercentLevel(manaSpent, nextReqMana);\r\n\t\t\tnewPercentToNextLevel = static_cast(manaSpent * 100) / nextReqMana;\r\n\t\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "182596c3b6d116b3", + "equalIndicator/v1": "8c623245ad7b16a96ea03b291bd47ca26e5cce36a1e8411fa89ba57358fe44e3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3350, + "startColumn": 63, + "charOffset": 102079, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3348, + "startColumn": 1, + "charOffset": 102012, + "charLength": 144, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureType(std::shared_ptr creature, uint8_t creatureType) {\r\n\tNetworkMessage msg;\r\n\tmsg.addByte(0x95);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "632393fb22613035", + "equalIndicator/v1": "8cb2e7b197000abc1f65c6c143724ec7b1fec6cb1b45c5213a96b8f78dd1c53f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 231, + "startColumn": 51, + "charOffset": 5927, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 229, + "startColumn": 1, + "charOffset": 5865, + "charLength": 140, + "snippet": { + "text": "\r\nprivate:\r\n\tvirtual bool getSkillType(std::shared_ptr, std::shared_ptr, skills_t &, uint32_t &) const {\r\n\t\treturn false;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "17b5c911d220d30d", + "equalIndicator/v1": "8cd6f4909ace2bacd691a9544427ae8282970a027bda118d5b481a606c6fb384" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/combat_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 92, + "startColumn": 2, + "charOffset": 2715, + "charLength": 6, + "snippet": { + "text": "Combat" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 90, + "startColumn": 1, + "charOffset": 2601, + "charLength": 232, + "snippet": { + "text": "\t// combat:addCondition(condition)\r\n\tstd::shared_ptr condition = getUserdataShared(L, 2);\r\n\tCombat* combat = getUserdata(L, 1);\r\n\tif (combat && condition) {\r\n\t\tcombat->addCondition(condition->clone());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "39344829f001fc17", + "equalIndicator/v1": "8ce96e993ca0de5ff5a0aa7cfb999995779a07f091fdbf1f6063c16e86e7b627" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2093, + "startColumn": 8, + "charOffset": 57573, + "charLength": 4, + "snippet": { + "text": "maxa" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2091, + "startColumn": 1, + "charOffset": 57499, + "charLength": 105, + "snippet": { + "text": "\tint32_t difference = var - 40;\r\n\tmin = mina * difference + minb;\r\n\tmax = maxa * difference + maxb;\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e49d30a9fdb9d1df", + "equalIndicator/v1": "8d06a74681527401dc7cbcbd9651dd61c9f088ea337dcb63ffd918f25929e230" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1101, + "startColumn": 47, + "charOffset": 41984, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1099, + "startColumn": 1, + "charOffset": 41883, + "charLength": 214, + "snippet": { + "text": "\tgetScriptInterface()->pushFunction(getScriptId());\r\n\r\n\tLuaScriptInterface::pushUserdata(L, monster);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Monster\");\r\n\tLuaScriptInterface::pushPosition(L, position);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "94ce2cd72c5531bf", + "equalIndicator/v1": "8d219f423510bc9b9318db81186bf0711e69fcdb62e47beaebbfc268445f9f52" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 209, + "startColumn": 3, + "charOffset": 5348, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 207, + "startColumn": 1, + "charOffset": 5291, + "charLength": 193, + "snippet": { + "text": "\r\n\tif (const TileItemVector* items = getItemList()) {\r\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\r\n\t\t\tif ((*it)->getMailbox()) {\r\n\t\t\t\treturn (*it)->getMailbox();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7e43edf79a32b8da", + "equalIndicator/v1": "8d43baaa573d5b38ffc3ecf64c7fc0fd2c7097b2e800b1f3f9d493ffef0c393f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1556, + "startColumn": 15, + "charOffset": 46142, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1554, + "startColumn": 1, + "charOffset": 46048, + "charLength": 201, + "snippet": { + "text": "\tuint8_t size = (uint8_t)source.size();\r\n\tfor (uint8_t i = 0; i < size; i++) {\r\n\t\tif (i == 0) {\r\n\t\t\tsource[i] = (char)toupper(source[i]);\r\n\t\t} else if (source[i - 1] == ' ' || source[i - 1] == '\\'') {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "926c21839dd37917", + "equalIndicator/v1": "8d5d2dbe8c3ab80792bc77ec5665fe4fc246b54216d15e222cd19aa1c98b21dd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 156, + "startColumn": 2, + "charOffset": 5015, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 154, + "startColumn": 1, + "charOffset": 4946, + "charLength": 185, + "snippet": { + "text": "\tuint32_t precachedControlSum[32][2];\r\n\tuint32_t sum = 0xC6EF3720;\r\n\tfor (int32_t i = 0; i < 32; ++i) {\r\n\t\tprecachedControlSum[i][0] = (sum + newKey[(sum >> 11) & 3]);\r\n\t\tsum += delta;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e7fd1721712b68e3", + "equalIndicator/v1": "8d86d5017a6c1594a7f183e19f64096b22d4a835cf5562d7bff593a9917a7254" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'guild' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'guild' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 284, + "startColumn": 16, + "charOffset": 7399, + "charLength": 28, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 282, + "startColumn": 1, + "charOffset": 7363, + "charLength": 128, + "snippet": { + "text": "\t\treturn guild;\r\n\t}\r\n\tvoid setGuild(const std::shared_ptr guild);\r\n\r\n\t[[nodiscard]] GuildRank_ptr getGuildRank() const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "21122ba2caa01c4e", + "equalIndicator/v1": "8d8cac0d9e8084b74bb191570f295df441ce48db0640cf6d3b127f241efa6aa3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 605, + "startColumn": 40, + "charOffset": 16300, + "charLength": 15, + "snippet": { + "text": "unmodifiedSkill" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 603, + "startColumn": 1, + "charOffset": 16201, + "charLength": 165, + "snippet": { + "text": "\r\n\t\tint32_t unmodifiedSkill = player->getBaseSkill(skill);\r\n\t\tskills[skill] = static_cast(unmodifiedSkill * ((skillsPercent[skill] - 100) / 100.f));\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1d7de08585d47594", + "equalIndicator/v1": "8da3f22651bb96ee3c31b335baab1c929970d7162a638154ce93e4454f5aa540" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/inbox/inbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 55, + "startColumn": 13, + "charOffset": 1472, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 53, + "startColumn": 1, + "charOffset": 1455, + "charLength": 224, + "snippet": { + "text": "}\r\n\r\nvoid Inbox::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tstd::shared_ptr localParent = getParent();\r\n\tif (localParent != nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d603a9b2d7972016", + "equalIndicator/v1": "8db62f93983b018c4994235c25b4d2d361f7a10cb66026ca64649539f13e1be1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 150, + "startColumn": 62, + "charOffset": 5192, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 148, + "startColumn": 1, + "charOffset": 5126, + "charLength": 271, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::creatureOnHear(std::shared_ptr creature, std::shared_ptr speaker, const std::string &words, SpeakClasses type) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnHear - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "545c122a0b4001e5", + "equalIndicator/v1": "8dc4a86c778d92355a93d1f187694ac1ad95fd814b763929bad93df84b63db10" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'guild' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'guild' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioguild.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 18, + "startColumn": 24, + "charOffset": 568, + "charLength": 28, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 16, + "startColumn": 1, + "charOffset": 475, + "charLength": 267, + "snippet": { + "text": "public:\r\n\tstatic std::shared_ptr loadGuild(uint32_t guildId);\r\n\tstatic void saveGuild(const std::shared_ptr guild);\r\n\tstatic uint32_t getGuildIdByName(const std::string &name);\r\n\tstatic void getWarList(uint32_t guildId, GuildWarVector &guildWarVector);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6d0e60f0fd6dd2f2", + "equalIndicator/v1": "8dcbbf3d2cff4fca324e827fb147983a59bc2104e476f93e94feb4ec837fd649" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 83, + "startColumn": 27, + "charOffset": 2319, + "charLength": 11, + "snippet": { + "text": "endPosition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 81, + "startColumn": 1, + "charOffset": 2151, + "charLength": 197, + "snippet": { + "text": "\tPositionIterator end() const {\r\n\t\tPosition endPosition(from.x, from.y, to.z + 1); // z is incremented so it's past the last valid position.\r\n\t\treturn PositionIterator(endPosition, *this);\r\n\t}\r\n};\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d1bda70d41f85d75", + "equalIndicator/v1": "8e13ea32fb669634255b758fea8fe76bc9e87c289d976d0c2d2eafec3ddba746" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 159, + "startColumn": 32, + "charOffset": 5234, + "charLength": 19, + "snippet": { + "text": "getAllItemTypeCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 157, + "startColumn": 1, + "charOffset": 5068, + "charLength": 320, + "snippet": { + "text": "\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::map &getAllItemTypeCount(std::map &countMap) const override final;\r\n\tstd::shared_ptr getThing(size_t index) const override final;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "86d131f589ae152a", + "equalIndicator/v1": "8e1ee2ff8b80b8face41b4a65b377ca1e3bcab905bda690333ac66ef802c2ec8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1063, + "startColumn": 2, + "charOffset": 38289, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1061, + "startColumn": 1, + "charOffset": 38282, + "charLength": 46, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5ab14065346bcf47", + "equalIndicator/v1": "8e360c60962adf027f57009980297d80a162c7689ee10355f9a9650b84564500" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 706, + "startColumn": 41, + "charOffset": 23184, + "charLength": 22, + "snippet": { + "text": "secondaryGroupCooldown" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 704, + "startColumn": 1, + "charOffset": 23106, + "charLength": 239, + "snippet": { + "text": "\r\n\tif (secondaryGroupCooldown > 0) {\r\n\t\tint32_t spellSecondaryGroupCooldown = secondaryGroupCooldown;\r\n\t\tif (isUpgraded) {\r\n\t\t\tspellSecondaryGroupCooldown -= getWheelOfDestinyBoost(WheelSpellBoost_t::SECONDARY_GROUP_COOLDOWN, spellGrade);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4f839058a80c3029", + "equalIndicator/v1": "8e3b8e0f6fcad15ecf4c44e4354a3dfc86fe63ebd96cc41a67795e3a89681bef" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/thing.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 39, + "startColumn": 15, + "charOffset": 951, + "charLength": 9, + "snippet": { + "text": "setParent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 37, + "startColumn": 1, + "charOffset": 931, + "charLength": 67, + "snippet": { + "text": "\t}\r\n\r\n\tvirtual void setParent(std::weak_ptr) {\r\n\t\t//\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a15ba06bd308de9e", + "equalIndicator/v1": "8e55dba0fb7d547c79f62b43f0705f464e2bc27f6f01adecad0cf2c152710616" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Replace loop by 'std::ranges::any_of()'", + "markdown": "Replace loop by 'std::ranges::any_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5801, + "startColumn": 2, + "charOffset": 171361, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5799, + "startColumn": 1, + "charOffset": 171273, + "charLength": 166, + "snippet": { + "text": "bool Player::hasAnyMount() const {\r\n\tconst auto mounts = g_game().mounts.getMounts();\r\n\tfor (const auto &mount : mounts) {\r\n\t\tif (hasMount(mount)) {\r\n\t\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b920ae25591d11e7", + "equalIndicator/v1": "8e5730a362f1c8e80b3bca8a0a70cb2b08d3d27756926ed7dc9307953ecda171" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3133, + "startColumn": 2, + "charOffset": 96073, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3131, + "startColumn": 1, + "charOffset": 95986, + "charLength": 243, + "snippet": { + "text": "\tuint32_t timestamp = msg.get();\r\n\tuint16_t counter = msg.get();\r\n\tuint16_t amount = msg.get();\r\n\tif (amount > 0 && counter > 0) {\r\n\t\tg_game().playerAcceptMarketOffer(player->getID(), timestamp, counter, amount);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ed8972f1bc955a6e", + "equalIndicator/v1": "8e62d86f5908afb7e100f7ab9830d2a1c274f8898bd139fa77e31419db564622" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2093, + "startColumn": 15, + "charOffset": 57580, + "charLength": 10, + "snippet": { + "text": "difference" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2091, + "startColumn": 1, + "charOffset": 57499, + "charLength": 105, + "snippet": { + "text": "\tint32_t difference = var - 40;\r\n\tmin = mina * difference + minb;\r\n\tmax = maxa * difference + maxb;\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ee0431c15dd8c41b", + "equalIndicator/v1": "8e6c30ab9d2fdd6d2a892723c57194af6fdae24c21a482fd4534dcef1ab383a5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1844, + "startColumn": 2, + "charOffset": 56170, + "charLength": 17, + "snippet": { + "text": "QuickLootFilter_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1842, + "startColumn": 1, + "charOffset": 56163, + "charLength": 107, + "snippet": { + "text": "\t}\r\n\r\n\tQuickLootFilter_t filter = (QuickLootFilter_t)msg.getByte();\r\n\tstd::vector listedItems;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1246fea2ea0b2233", + "equalIndicator/v1": "8e780ea0e8134ac7250a6b0c62ab16ec9864dc918d2c17a6e2cde20b5a97760d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::list::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::list::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 174, + "startColumn": 16, + "charOffset": 4398, + "charLength": 14, + "snippet": { + "text": "timerEventDesc" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 172, + "startColumn": 1, + "charOffset": 4306, + "charLength": 211, + "snippet": { + "text": "\t\tenv->setTimerEvent();\r\n\t\tenv->setScriptId(timerEventDesc.scriptId, this);\r\n\t\tcallFunction(timerEventDesc.parameters.size());\r\n\t} else {\r\n\t\tg_logger().error(\"[LuaEnvironment::executeTimerEvent - Lua file {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d817546e002f0a73", + "equalIndicator/v1": "8e915ef620b6d3faa40ecdf1bded0d11b79b279b15a2561a04e0574fc77b7dbc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 62, + "startColumn": 28, + "charOffset": 1730, + "charLength": 11, + "snippet": { + "text": "getCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 60, + "startColumn": 1, + "charOffset": 1697, + "charLength": 94, + "snippet": { + "text": "\t}\r\n\r\n\tstd::shared_ptr getCylinder() override final {\r\n\t\treturn getContainer();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d0ab6634b470f9e7", + "equalIndicator/v1": "8e9714cc31f24c4be554d1a29143f00ad77852e15bc356ece4f22650e3baa11a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 131, + "startColumn": 24, + "charOffset": 3250, + "charLength": 7, + "snippet": { + "text": "getTile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 129, + "startColumn": 1, + "charOffset": 3221, + "charLength": 96, + "snippet": { + "text": "\t}\r\n\r\n\tstd::shared_ptr getTile() override final {\r\n\t\treturn static_self_cast();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "73fb796652142a78", + "equalIndicator/v1": "8eb1b13a6d93ae20d4d0b066a3145ad0b3fd374d09cd221a38b7600a8a4df252" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'leader' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'leader' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 62, + "charOffset": 689, + "charLength": 6, + "snippet": { + "text": "leader" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 579, + "charLength": 190, + "snippet": { + "text": "#include \"lua/callbacks/events_callbacks.hpp\"\r\n\r\nstd::shared_ptr Party::create(std::shared_ptr leader) {\r\n\tauto party = std::make_shared();\r\n\tparty->m_leader = leader;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7b1d3108fe8b8e46", + "equalIndicator/v1": "8eb620bf818a938e1b531a12cf2c6a30383f8bdbd3c943f06464d7aa310d6f91" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1121, + "startColumn": 60, + "charOffset": 35178, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1119, + "startColumn": 1, + "charOffset": 35114, + "charLength": 146, + "snippet": { + "text": "}\r\n\r\nbool Creature::setFollowCreature(std::shared_ptr creature) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (creature) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ce4cd84c8c6f776e", + "equalIndicator/v1": "8eb8c735e734fdf4b925b5067f56a1f21008cb039f7ba3e57e8bacc6e6c47ab7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 170, + "startColumn": 53, + "charOffset": 5277, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 168, + "startColumn": 1, + "charOffset": 5220, + "charLength": 167, + "snippet": { + "text": "}\r\n\r\nReturnValue Actions::canUse(std::shared_ptr player, const Position &pos) {\r\n\tif (pos.x != 0xFFFF) {\r\n\t\tconst Position &playerPos = player->getPosition();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "59ef8b3287eb12f3", + "equalIndicator/v1": "8ebbc9d7480a0768c18fc2b19c2f9391552c85d819b4f396fcc321090e770168" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1673, + "startColumn": 3, + "charOffset": 58731, + "charLength": 18, + "snippet": { + "text": "WheelGemAffinity_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1671, + "startColumn": 1, + "charOffset": 58722, + "charLength": 239, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tWheelGemAffinity_t affinity = static_cast(i);\r\n\t\tstd::string affinityName(magic_enum::enum_name(affinity));\r\n\t\tg_logger().debug(\" Affinity: {} count: {}\", affinityName, bonusData.unlockedVesselResonances[i]);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9c88bff365e95652", + "equalIndicator/v1": "8ebf6c4234cfefd5df5f9b846c94ea3045aa06bf56532d1e1e911d3c265780a6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/kv_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 99, + "startColumn": 14, + "charOffset": 2592, + "charLength": 6, + "snippet": { + "text": "prefix" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 97, + "startColumn": 1, + "charOffset": 2480, + "charLength": 152, + "snippet": { + "text": "\t// KV.keys([prefix = \"\"]) | scopedKV:keys([prefix = \"\"])\r\n\tstd::unordered_set keys;\r\n\tstd::string prefix = \"\";\r\n\r\n\tif (isString(L, -1)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f29d962c5f938dad", + "equalIndicator/v1": "8ecb1604a2d3dd788d1ea397f75929648a236c29af24b1b278539f16e660200f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 446, + "startColumn": 41, + "charOffset": 16855, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 444, + "startColumn": 1, + "charOffset": 16809, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7ddd45bc9b2202d4", + "equalIndicator/v1": "8eee1c066d17835e6bc53e0bad380edc18dd383ba22dd629dcdfd91a861992c7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Macro replacement list should be enclosed in parentheses", + "markdown": "Macro replacement list should be enclosed in parentheses" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/pch.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 118, + "startColumn": 9, + "charOffset": 2744, + "charLength": 20, + "snippet": { + "text": "MAGIC_ENUM_RANGE_MIN" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 116, + "startColumn": 1, + "charOffset": 2668, + "charLength": 163, + "snippet": { + "text": " * @note Sets the upper limit of the enum value range to 500.\r\n */\r\n#define MAGIC_ENUM_RANGE_MIN -500\r\n#define MAGIC_ENUM_RANGE_MAX 500\r\n#include \r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6bcf9a8eb308eca1", + "equalIndicator/v1": "8f02a675860af19e24502f63773a271a6788d8acf488658affa2a60df165d0cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2702, + "startColumn": 3, + "charOffset": 83342, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2700, + "startColumn": 1, + "charOffset": 83246, + "charLength": 218, + "snippet": { + "text": "\t\tparty->switchAnalyzerPriceType();\r\n\t} else if (action == PARTYANALYZERACTION_PRICEVALUE) {\r\n\t\tuint16_t size = msg.get();\r\n\t\tfor (uint16_t i = 1; i <= size; i++) {\r\n\t\t\tuint16_t itemId = msg.get();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dca87a24fe0b3e8b", + "equalIndicator/v1": "8f0fe3620179358483372c99e9bf41a4991c0e60b2149ddb7eac129633d88749" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Pass by value and use std::move", + "markdown": "Pass by value and use std::move" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 18, + "startColumn": 28, + "charOffset": 605, + "charLength": 18, + "snippet": { + "text": "const ValueVariant" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 16, + "startColumn": 1, + "charOffset": 514, + "charLength": 218, + "snippet": { + "text": "\ttimestamp_(timestamp == 0 ? getTimeMsNow() : timestamp) { }\r\n\r\nValueWrapper::ValueWrapper(const ValueVariant &value, uint64_t timestamp) :\r\n\tdata_(value), timestamp_(timestamp == 0 ? getTimeMsNow() : timestamp) { }\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8045ddeb4eaf8a8f", + "equalIndicator/v1": "8f24ed47809a6923fbb666a8a7f8a55e712a31f9741a72419b2e3851ce8f937c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 108, + "startColumn": 2, + "charOffset": 3653, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 106, + "startColumn": 1, + "charOffset": 3646, + "charLength": 72, + "snippet": { + "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n\treturn returnValue;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "030baf17c006a25a", + "equalIndicator/v1": "8f524e9e7dc24b580d6627938ca553204a6d2130244d9e561188f50b5ddd0039" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 640, + "startColumn": 41, + "charOffset": 24617, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 638, + "startColumn": 1, + "charOffset": 24571, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e0e44e9a775454e8", + "equalIndicator/v1": "8f566a5b8c4d3d64b7364605959996f7f0f1c186d4366da0797f4dfe1ad0f3de" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Pass by value and use std::move", + "markdown": "Pass by value and use std::move" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 34, + "charOffset": 655, + "charLength": 17, + "snippet": { + "text": "const std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 592, + "charLength": 174, + "snippet": { + "text": "\r\n// Constructor for int64_t\r\nCustomAttribute::CustomAttribute(const std::string &initStringKey, const int64_t initInt64) :\r\n\tstringKey(initStringKey), value(initInt64) {\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a8ee49a322813449", + "equalIndicator/v1": "8f67d48af21d8624b365fb5cac88d4c279201b03a33b8e9db9a902c5a8ef13f8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 878, + "startColumn": 67, + "charOffset": 30425, + "charLength": 25, + "snippet": { + "text": "wheelGemBasicSlot1Allowed" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 876, + "startColumn": 1, + "charOffset": 30262, + "charLength": 258, + "snippet": { + "text": "\tgem.affinity = static_cast(uniform_random(0, 3));\r\n\tgem.quality = quality;\r\n\tgem.basicModifier1 = wheelGemBasicSlot1Allowed[uniform_random(0, wheelGemBasicSlot1Allowed.size() - 1)];\r\n\tgem.basicModifier2 = {};\r\n\tgem.supremeModifier = {};\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c5af1f7030ab964d", + "equalIndicator/v1": "8f81c9aec3b222701dc797956f00d6f9e8528c388422867b85be8f5f1bbe0d8c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 571, + "startColumn": 55, + "charOffset": 15924, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 569, + "startColumn": 1, + "charOffset": 15865, + "charLength": 143, + "snippet": { + "text": "}\r\n\r\nvoid Party::clearPlayerPoints(std::shared_ptr player) {\r\n\tauto it = ticksMap.find(player->getID());\r\n\tif (it != ticksMap.end()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6624ac3a34d65797", + "equalIndicator/v1": "8f8fb410e7bf1d42784c550de7ece19f9bec9c3951040d8ab9a6cc74537a4a6b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 823, + "startColumn": 20, + "charOffset": 31588, + "charLength": 5, + "snippet": { + "text": "tries" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 821, + "startColumn": 1, + "charOffset": 31539, + "charLength": 118, + "snippet": { + "text": "\r\n\tlua_pushnumber(L, skill);\r\n\tlua_pushnumber(L, tries);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 3, 1) != 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c74fc1d08c411ab9", + "equalIndicator/v1": "8f919b72f47ae209c01be7cb90dfe193a655f075d1ca2e0b7f949eaf591e27ca" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'container' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'container' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3073, + "startColumn": 35, + "charOffset": 93347, + "charLength": 32, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3071, + "startColumn": 1, + "charOffset": 93282, + "charLength": 156, + "snippet": { + "text": "\r\n\tvoid removeEmptyRewards();\r\n\tbool hasOtherRewardContainerOpen(const std::shared_ptr container) const;\r\n\r\n\tvoid checkAndShowBlessingMessage();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6490c7c3cef78dbc", + "equalIndicator/v1": "8fc3c398ebe209793002cffcf3344309c2199615ce3bd62705796bdb97dc044c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: buffer", + "markdown": "Constructor does not initialize these fields: buffer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 21, + "startColumn": 7, + "charOffset": 537, + "charLength": 14, + "snippet": { + "text": "NetworkMessage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 19, + "startColumn": 1, + "charOffset": 517, + "charLength": 76, + "snippet": { + "text": "class RSA;\r\n\r\nclass NetworkMessage {\r\npublic:\r\n\tusing MsgSize_t = uint16_t;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c1529d280ac9f798", + "equalIndicator/v1": "8fdd79691d8e2f5286ca8bdefcdaad7fc3ef515ed395b1ae3013ecf1032b9d80" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 38, + "startColumn": 3, + "charOffset": 1138, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 36, + "startColumn": 1, + "charOffset": 1129, + "charLength": 205, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tuint16_t id = pugi::cast(attr.value());\r\n\r\n\t\tauto res = vocationsMap.emplace(std::piecewise_construct, std::forward_as_tuple(id), std::forward_as_tuple(std::make_shared(id)));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "59a56592b1549c48", + "equalIndicator/v1": "900141ff0d86969ea0cd2b73e07f494918c86a46120b7ec6c4aee0a8f24dcbad" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 812, + "startColumn": 27, + "charOffset": 26024, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 810, + "startColumn": 1, + "charOffset": 25992, + "charLength": 129, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\r\n\tenv->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b32344e5b1f322a2", + "equalIndicator/v1": "900764377eff7c0ab272b8d534bd0dd47ce8ffaae030ddf1c28a3051aa759bc1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'vocName' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'vocName' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 181, + "startColumn": 34, + "charOffset": 6228, + "charLength": 7, + "snippet": { + "text": "vocName" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 179, + "startColumn": 1, + "charOffset": 6168, + "charLength": 164, + "snippet": { + "text": "\t\treturn vocEquipMap;\r\n\t}\r\n\tvoid addVocEquipMap(std::string vocName) {\r\n\t\tuint16_t vocationId = g_vocations().getVocationId(vocName);\r\n\t\tif (vocationId != 65535) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f889e787dee30fc0", + "equalIndicator/v1": "900a8ba5ca6e721c8cf7c0b934f6def1c1a0256182165b2b69f123f10233af67" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 443, + "startColumn": 24, + "charOffset": 13112, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 441, + "startColumn": 1, + "charOffset": 13084, + "charLength": 261, + "snippet": { + "text": "}\r\n\r\nReturnValue Container::queryAdd(int32_t addIndex, const std::shared_ptr &addThing, uint32_t addCount, uint32_t flags, std::shared_ptr actor /* = nullptr*/) {\r\n\tbool childIsOwner = hasBitSet(FLAG_CHILDISOWNER, flags);\r\n\tif (childIsOwner) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "05d23f7603ede807", + "equalIndicator/v1": "909134cb414150fd128201d2c261eb1ee26534269dc04da63efe4fec34be225e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 597, + "startColumn": 71, + "charOffset": 16033, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 595, + "startColumn": 1, + "charOffset": 15958, + "charLength": 187, + "snippet": { + "text": "}\r\n\r\nvoid ConditionAttributes::updatePercentSkills(std::shared_ptr player) {\r\n\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\r\n\t\tskills_t skill = static_cast(i);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "22914ccc28c41e2c", + "equalIndicator/v1": "90f143b6335374e7cbc9950c511091b59d761096b99262c1d421ec50bd0619af" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 771, + "startColumn": 2, + "charOffset": 29619, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 769, + "startColumn": 1, + "charOffset": 29612, + "charLength": 52, + "snippet": { + "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "feb110afcf068ab3", + "equalIndicator/v1": "91033633d2a16f72263e93a00e48fdf560b74d8100ba8f34cffff53b652f2682" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 382, + "startColumn": 104, + "charOffset": 14324, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 380, + "startColumn": 1, + "charOffset": 14216, + "charLength": 265, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnLookInBattleList(std::shared_ptr player, std::shared_ptr creature, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLookInBattleList - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1d3241f400d86c34", + "equalIndicator/v1": "9127f462b1d25ff145c9aaffb59bc5d20fc722281ad84c9762784b58ea53ddbc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 729, + "startColumn": 2, + "charOffset": 20156, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 727, + "startColumn": 1, + "charOffset": 20085, + "charLength": 194, + "snippet": { + "text": "\r\n\tConditionType_t conditionType = getNumber(L, 2);\r\n\tuint32_t subId = getNumber(L, 3, 0);\r\n\tpushBoolean(L, creature->hasCondition(conditionType, subId));\r\n\treturn 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e8877753d063bccf", + "equalIndicator/v1": "9138b7da2182691ce30dfc31d8b7c25a6a265bf0913e87bec097ec3411bc619f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 464, + "startColumn": 53, + "charOffset": 13710, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 462, + "startColumn": 1, + "charOffset": 13567, + "charLength": 266, + "snippet": { + "text": "\tvirtual void onAttackedCreatureBlockHit(BlockType_t) { }\r\n\tvirtual void onBlockHit() { }\r\n\tvirtual void onTakeDamage(std::shared_ptr, int32_t) { }\r\n\tvirtual void onChangeZone(ZoneType_t zone);\r\n\tvirtual void onAttackedCreatureChangeZone(ZoneType_t zone);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ecbf65fda3ade29e", + "equalIndicator/v1": "913d2619f918f670617c9ef13e2bea9e16c8b0901c3a30bbecf515d17ca5b004" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1759, + "startColumn": 57, + "charOffset": 52743, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1757, + "startColumn": 1, + "charOffset": 52682, + "charLength": 193, + "snippet": { + "text": "}\r\n\r\nvoid Creature::turnToCreature(std::shared_ptr creature) {\r\n\tconst Position &creaturePos = creature->getPosition();\r\n\tconst auto dx = Position::getOffsetX(position, creaturePos);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ec75666469939256", + "equalIndicator/v1": "916e5d71c03a8f6d6991c201d746e3263d53feba4f34c9afd6ec513823f51268" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6647, + "startColumn": 38, + "charOffset": 231017, + "charLength": 9, + "snippet": { + "text": "std::ceil" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6645, + "startColumn": 1, + "charOffset": 230904, + "charLength": 353, + "snippet": { + "text": "\t\t\t\t} else {\r\n\t\t\t\t\tdamageReflected.secondary.type = damage.secondary.type;\r\n\t\t\t\t\tdamageReflected.primary.value = std::ceil(damage.secondary.value * secondaryReflectPercent / 100.) + std::max(-static_cast(std::ceil(attacker->getMaxHealth() * 0.01)), std::max(damage.secondary.value, -(static_cast(secondaryReflectFlat))));\r\n\t\t\t\t}\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ffaad8e52eed9477", + "equalIndicator/v1": "917b39f76df221082b4d40f6fdceb9c8ad2ec3ba5f8d4853363f9520eba92963" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7402, + "startColumn": 64, + "charOffset": 257722, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7400, + "startColumn": 1, + "charOffset": 257631, + "charLength": 311, + "snippet": { + "text": "\r\nvoid Game::sendMessages(\r\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\r\n\tconst Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetPlayer,\r\n\tTextMessage &message, const CreatureVector &spectators, int32_t realDamage\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "03c5a25df884f396", + "equalIndicator/v1": "91830235f9e19a726e4730c2bbaa6e4c06bbd40df60c6c76842c3efaba9039ef" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 594, + "startColumn": 13, + "charOffset": 28793, + "charLength": 11, + "snippet": { + "text": "stringValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 592, + "startColumn": 1, + "charOffset": 28599, + "charLength": 415, + "snippet": { + "text": "\t} else if (stringValue == \"absorbpercentlifedrain\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_LIFEDRAIN)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentmanadrain\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_MANADRAIN)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentdrown\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eaba432d3e045cf7", + "equalIndicator/v1": "919b981a7945d444058c3b9c4e7ab4859d41b9c9e39051f17012895cdf803b08" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 703, + "startColumn": 63, + "charOffset": 25077, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 701, + "startColumn": 1, + "charOffset": 25010, + "charLength": 166, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnRemoveCount(std::shared_ptr player, std::shared_ptr item) {\r\n\t// Player:onMove()\r\n\tif (info.playerOnRemoveCount == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dd6742a3fbca66b4", + "equalIndicator/v1": "91f58d1cffbadaf97ed877dc15e652cf63c273100bc2c2db839a3a3beb8f117e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 59, + "startColumn": 24, + "charOffset": 1847, + "charLength": 28, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 57, + "startColumn": 1, + "charOffset": 1611, + "charLength": 615, + "snippet": { + "text": "\tstd::shared_ptr getBestiaryCharm(charmRune_t activeCharm, bool force = false) const;\r\n\tvoid addBestiaryKill(std::shared_ptr player, const std::shared_ptr mtype, uint32_t amount = 1);\r\n\tbool parseCharmCombat(const std::shared_ptr charm, std::shared_ptr player, std::shared_ptr target, int32_t realDamage, bool dueToPotion = false, bool checkArmor = false);\r\n\tvoid addCharmPoints(std::shared_ptr player, uint16_t amount, bool negative = false);\r\n\tvoid sendBuyCharmRune(std::shared_ptr player, charmRune_t runeID, uint8_t action, uint16_t raceid);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "24dfdbf745085383", + "equalIndicator/v1": "91fc4a7777ce836bbbe09ae654dae5435272c459499d0ca553cd269c9dce91a0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1646, + "startColumn": 58, + "charOffset": 44545, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1644, + "startColumn": 1, + "charOffset": 44483, + "charLength": 283, + "snippet": { + "text": "}\r\n\r\nbool ConditionDamage::doDamage(std::shared_ptr creature, int32_t healthChange) {\r\n\tauto attacker = g_game().getPlayerByGUID(owner) ? g_game().getPlayerByGUID(owner)->getCreature() : g_game().getCreatureByID(owner);\r\n\tbool isPlayer = attacker && attacker->getPlayer();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "de46a04fb8d36e4c", + "equalIndicator/v1": "921ec8b33c278c9f26234d07623db081cb18b5d211441f6aba58b4278a00cf82" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'mtype' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'mtype' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 506, + "startColumn": 83, + "charOffset": 13913, + "charLength": 5, + "snippet": { + "text": "mtype" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 504, + "startColumn": 1, + "charOffset": 13826, + "charLength": 170, + "snippet": { + "text": "}\r\n\r\nvoid Player::addMonsterToCyclopediaTrackerList(const std::shared_ptr mtype, bool isBoss, bool reloadClient /* = false */) {\r\n\tif (!client) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eb500a60bb5e4eab", + "equalIndicator/v1": "92237836154d4ab003ed14d10074c45e641c51fd73f33c2dcc12f07a524d3848" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'needPremium' can be made const", + "markdown": "Method 'needPremium' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 232, + "startColumn": 7, + "charOffset": 7413, + "charLength": 11, + "snippet": { + "text": "needPremium" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 230, + "startColumn": 1, + "charOffset": 7379, + "charLength": 73, + "snippet": { + "text": "\t\treqMagLevel = level;\r\n\t}\r\n\tbool needPremium() {\r\n\t\treturn premium;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b5596a4fcd3606d2", + "equalIndicator/v1": "92367e4c269959085b9a638022d02547d65fa0873f6ba8148b48204c6d986ffe" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 689, + "startColumn": 116, + "charOffset": 22555, + "charLength": 13, + "snippet": { + "text": "spellCooldown" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 687, + "startColumn": 1, + "charOffset": 22366, + "charLength": 283, + "snippet": { + "text": "\t\tspellCooldown -= augmentCooldownReduction;\r\n\t\tif (spellCooldown > 0) {\r\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLCOOLDOWN, spellCooldown / rateCooldown, 0, false, m_spellId);\r\n\t\t\tplayer->addCondition(condition);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6a1e4cfe0408be5e", + "equalIndicator/v1": "924dd968530ebf791e4f5e4be280539c121aad2a5d1eb08a85b769019794c6e0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 553, + "startColumn": 64, + "charOffset": 21061, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 551, + "startColumn": 1, + "charOffset": 20993, + "charLength": 212, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnChangeZone(std::shared_ptr player, ZoneType_t zone) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnChangeZone - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "92828f9ab346cb02", + "equalIndicator/v1": "9258b25d2eee35f9ea25312e82728728a5cf27d8770050d52c72516bdd51b44a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 234, + "startColumn": 7, + "charOffset": 7382, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 232, + "startColumn": 1, + "charOffset": 7304, + "charLength": 394, + "snippet": { + "text": "\tstd::shared_ptr getThing(size_t index) const override final;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b32275e5108f38fd", + "equalIndicator/v1": "926082c013176027968ef2144f404d4ac6757b8396f0a06960daab0eafab3dc4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3490, + "startColumn": 33, + "charOffset": 105677, + "charLength": 12, + "snippet": { + "text": "tmpContainer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3488, + "startColumn": 1, + "charOffset": 105561, + "charLength": 280, + "snippet": { + "text": "\t\t\t\tuint32_t n = tmpContainer->capacity() - tmpContainer->size();\r\n\t\t\t\twhile (n) {\r\n\t\t\t\t\tif (tmpContainer->queryAdd(tmpContainer->capacity() - n, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) {\r\n\t\t\t\t\t\tindex = tmpContainer->capacity() - n;\r\n\t\t\t\t\t\t*destItem = nullptr;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3ba2fab826d731e4", + "equalIndicator/v1": "9263e1289e0b08ead9f5b95e367e2407727e66ad7b9599efd1bcf6f84100b216" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 818, + "startColumn": 50, + "charOffset": 24869, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 816, + "startColumn": 1, + "charOffset": 24803, + "charLength": 155, + "snippet": { + "text": "\t\treturn 0;\r\n\t}\r\n\tvirtual void dropLoot(std::shared_ptr, std::shared_ptr) { }\r\n\tvirtual uint16_t getLookCorpse() const {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fc57e532ce804d53", + "equalIndicator/v1": "926d9f034cbe53d56c652076c7c959bf8c6a203c1b89dfd88ae33e0039a70b83" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 28, + "startColumn": 20, + "charOffset": 761, + "charLength": 16, + "snippet": { + "text": "getItemTypeCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 26, + "startColumn": 1, + "charOffset": 737, + "charLength": 83, + "snippet": { + "text": "}\r\n\r\nuint32_t Cylinder::getItemTypeCount(uint16_t, int32_t) const {\r\n\treturn 0;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2e6c01acfddd966a", + "equalIndicator/v1": "9293cb9521a2738cbc2f2a5d837b67e668da71cea0a1ce3feb384d8b739fe968" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 132, + "startColumn": 3, + "charOffset": 4148, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 130, + "startColumn": 1, + "charOffset": 4061, + "charLength": 302, + "snippet": { + "text": "\t\tstd::array vData = {};\r\n\t\tmemcpy(vData.data(), buffer + readPos, 8);\r\n\t\tfor (int32_t i = 0; i < 32; ++i) {\r\n\t\t\tvData[0] += ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][0];\r\n\t\t\tvData[1] += ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][1];\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cc21e677a29cdcfa", + "equalIndicator/v1": "92949d6fa5f9c2eb8d4501fb0940c497fcd575c59b3835973efb1873e330eabf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7383, + "startColumn": 64, + "charOffset": 256879, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7381, + "startColumn": 1, + "charOffset": 256773, + "charLength": 326, + "snippet": { + "text": "\r\nvoid Game::sendDamageMessageAndEffects(\r\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\r\n\tconst Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetPlayer,\r\n\tTextMessage &message, const CreatureVector &spectators, int32_t realDamage\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c4bf15d5a9bceb46", + "equalIndicator/v1": "92abb408c8ccdace748a9e4357ffe273ada9a9c9c1d77ba803f2e04fa3b778a4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 442, + "startColumn": 8, + "charOffset": 26914, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 440, + "startColumn": 1, + "charOffset": 26901, + "charLength": 119, + "snippet": { + "text": "\t}\r\n\r\n\tconst uint16_t oldRace = result->getNumber(\"raceid\");\r\n\tconst auto monsterlist = getBestiaryList();\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f95c376393f05702", + "equalIndicator/v1": "92d567b563d08e101519f0f84278c0d13a368451a76e175e59774644622a004f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 775, + "startColumn": 7, + "charOffset": 29770, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 773, + "startColumn": 1, + "charOffset": 29663, + "charLength": 249, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnLoseExperience(std::shared_ptr player, uint64_t &exp) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLoseExperience - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "92c3769ed29e4050", + "equalIndicator/v1": "92e458bc78aac3031d8d320b311ab9cb8ccb40f2e6d1f35cf07823763f904b71" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1588, + "startColumn": 2, + "charOffset": 47036, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1586, + "startColumn": 1, + "charOffset": 46972, + "charLength": 168, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseCloseChannel(NetworkMessage &msg) {\r\n\tuint16_t channelId = msg.get();\r\n\tg_game().playerCloseChannel(player->getID(), channelId);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bd64884ce73be21f", + "equalIndicator/v1": "934222cd040177142c8a492e0111c9a46f10377b45c027d181b61c6d28d219a2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 792, + "startColumn": 71, + "charOffset": 25788, + "charLength": 11, + "snippet": { + "text": "attackValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 790, + "startColumn": 1, + "charOffset": 25659, + "charLength": 176, + "snippet": { + "text": "\r\n\tint32_t minValue = std::round(player->getLevel() / 5);\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue) / 2;\r\n\r\n\tif (target) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9b25504c683c80f0", + "equalIndicator/v1": "93493f32ee9c0ffc6d90f7919349baee734d457f041f38ea16e88e408f88651d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 251, + "startColumn": 28, + "charOffset": 8119, + "charLength": 32, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 249, + "startColumn": 1, + "charOffset": 7974, + "charLength": 443, + "snippet": { + "text": "\tstatic uint32_t RemoveItemField(std::shared_ptr item, std::shared_ptr tileItem, const Position &pos);\r\n\r\n\tstatic uint32_t EquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool boolean);\r\n\tstatic uint32_t DeEquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool boolean);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "16f8a57ac3de8ae7", + "equalIndicator/v1": "939b9a8ccb5e4cf3da13135fb4b45c68ce5618b17b119578ebc18a547ff00651" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 176, + "startColumn": 8, + "charOffset": 4468, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 174, + "startColumn": 1, + "charOffset": 4372, + "charLength": 213, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsMultiUse(lua_State* L) {\r\n\t// itemType:isMultiUse()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isMultiUse());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "db280b0f92fae188", + "equalIndicator/v1": "93c6570b8dad04de594ef6581779478874bca50d62c4e31de23017423d7800ed" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1396, + "startColumn": 26, + "charOffset": 48203, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1394, + "startColumn": 1, + "charOffset": 48031, + "charLength": 239, + "snippet": { + "text": "\r\n[[maybe_unused]] void Combat::doCombatDefault(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms) {\r\n\tdoCombatDefault(caster, target, caster ? caster->getPosition() : Position(), params);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "07d2c994699f9860", + "equalIndicator/v1": "94081fc938e01c76fe70a9c3ec055ee78533f222bae31f4d43ec591d903282a5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'getManagedContainer' is within a recursive call chain", + "markdown": "Function 'getManagedContainer' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1107, + "startColumn": 36, + "charOffset": 32292, + "charLength": 19, + "snippet": { + "text": "getManagedContainer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1105, + "startColumn": 1, + "charOffset": 32252, + "charLength": 215, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Player::getManagedContainer(ObjectCategory_t category, bool isLootContainer) const {\r\n\tif (category != OBJECTCATEGORY_DEFAULT && !isPremium()) {\r\n\t\tcategory = OBJECTCATEGORY_DEFAULT;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8fe59e9c7c4e6294", + "equalIndicator/v1": "940ae7e35f92f34fa542bb21299aa4014b6331f1699d70375347a23e4bc4a884" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 74, + "startColumn": 10, + "charOffset": 1842, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 72, + "startColumn": 1, + "charOffset": 1752, + "charLength": 111, + "snippet": { + "text": "std::string ServicePort::get_protocol_names() const {\r\n\tif (services.empty()) {\r\n\t\treturn std::string();\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d6653c4f91f26cc7", + "equalIndicator/v1": "9413de63a9d534530594905ca6273a56370b7f35e25279864a14e1748f368f6a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 969, + "startColumn": 27, + "charOffset": 34965, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 967, + "startColumn": 1, + "charOffset": 34933, + "charLength": 131, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnTradeRequest, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8b3203f9f05e1ebe", + "equalIndicator/v1": "941a0443fb55508ba806a2637d6eab8da090af430e8120f26018f1f48b126756" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 558, + "startColumn": 22, + "charOffset": 18003, + "charLength": 15, + "snippet": { + "text": "getWeaponDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 556, + "startColumn": 1, + "charOffset": 17977, + "charLength": 242, + "snippet": { + "text": "}\r\n\r\nint32_t WeaponMelee::getWeaponDamage(std::shared_ptr player, std::shared_ptr, std::shared_ptr item, bool maxDamage /*= false*/) const {\r\n\tusing namespace std;\r\n\tint32_t attackSkill = player->getWeaponSkill(item);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3ab04ba569f5b5e1", + "equalIndicator/v1": "942778b553435d3b88f5002097809b41de64b5c331d85bec7142cb53af635f62" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 799, + "startColumn": 38, + "charOffset": 28931, + "charLength": 10, + "snippet": { + "text": "toCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 797, + "startColumn": 1, + "charOffset": 28839, + "charLength": 146, + "snippet": { + "text": "\r\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\r\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\r\n\r\n\tscriptInterface.callVoidFunction(7);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "180ea1929fdcaf24", + "equalIndicator/v1": "943bf9cc7f7a9fc916d893349d9706d222ce7c2bdf2b00ab81ae70c709709a85" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 54, + "startColumn": 22, + "charOffset": 2301, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 52, + "startColumn": 1, + "charOffset": 2225, + "charLength": 207, + "snippet": { + "text": "\t * \\returns ReturnValue holds the return value\r\n\t */\r\n\tvirtual ReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr = nullptr) = 0;\r\n\r\n\t/**\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bd24c38664047aed", + "equalIndicator/v1": "945061710e3e765357a80260f884df86cf9c15bcd15533620a593c08f4e595af" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 185, + "startColumn": 51, + "charOffset": 5815, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 183, + "startColumn": 1, + "charOffset": 5651, + "charLength": 247, + "snippet": { + "text": "\r\nReturnValue Actions::canUse(std::shared_ptr player, const Position &pos, std::shared_ptr item) {\r\n\tconst std::shared_ptr action = getAction(item);\r\n\tif (action != nullptr) {\r\n\t\treturn action->canExecuteAction(player, pos);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7977580e99a73d01", + "equalIndicator/v1": "9461fe1758245e8d2c92660da3ee6d5d998ec8d463a0366cde49a4cb5f633543" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Local copy 'oldLeader' of the variable 'leader' is never modified; consider avoiding the copy", + "markdown": "Local copy 'oldLeader' of the variable 'leader' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 182, + "startColumn": 7, + "charOffset": 5040, + "charLength": 9, + "snippet": { + "text": "oldLeader" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 180, + "startColumn": 1, + "charOffset": 4965, + "charLength": 118, + "snippet": { + "text": "\tbroadcastPartyMessage(MESSAGE_PARTY_MANAGEMENT, ss.str(), true);\r\n\r\n\tauto oldLeader = leader;\r\n\tm_leader = player;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1f403c7e882a53ea", + "equalIndicator/v1": "949e9a084e25120de4d5732647ae5e15cb1eb91b313220c2a8cd6a7f23d56b3b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 168, + "startColumn": 7, + "charOffset": 5825, + "charLength": 16, + "snippet": { + "text": "internalAddThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 166, + "startColumn": 1, + "charOffset": 5747, + "charLength": 222, + "snippet": { + "text": "\r\n\tvoid internalAddThing(std::shared_ptr thing) override final;\r\n\tvoid internalAddThing(uint32_t index, std::shared_ptr thing) override final;\r\n\tvoid startDecaying() override;\r\n\tvoid stopDecaying() override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7d510c9fa4f78756", + "equalIndicator/v1": "94b0b8e1d624fb670debd595cc9245398161e479d846629add93156b0f166cd2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1733, + "startColumn": 27, + "charOffset": 60561, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1731, + "startColumn": 1, + "charOffset": 60529, + "charLength": 159, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d2cd6f32a1f2731b", + "equalIndicator/v1": "94dc6a760add1337934c64f4a2922870d87c4374b762bd9c199d00fc5b86ac74" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'itemIds' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'itemIds' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5651, + "startColumn": 115, + "charOffset": 198860, + "charLength": 7, + "snippet": { + "text": "itemIds" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5649, + "startColumn": 1, + "charOffset": 198741, + "charLength": 207, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerQuickLootBlackWhitelist(uint32_t playerId, QuickLootFilter_t filter, const std::vector itemIds) {\r\n\tstd::shared_ptr player = getPlayerByID(playerId);\r\n\tif (!player) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b5ad26ed98b17e34", + "equalIndicator/v1": "94ddf55c6243bea5f40aa0fef292309d2f0941c31f6886769ee6afd322af7b86" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 751, + "startColumn": 26, + "charOffset": 22074, + "charLength": 10, + "snippet": { + "text": "getMaxMana" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 749, + "startColumn": 1, + "charOffset": 21983, + "charLength": 188, + "snippet": { + "text": "\t\tcase STAT_MAXMANAPOINTS: {\r\n\t\t\tif (getMana() > getMaxMana()) {\r\n\t\t\t\tCreature::changeMana(getMaxMana() - getMana());\r\n\t\t\t} else {\r\n\t\t\t\tg_game().addPlayerMana(static_self_cast());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ef4c6806f496d71a", + "equalIndicator/v1": "9542d7042bb02d59717d875bd324c01f7d725424a4bff737b8ce30dfbea7ea00" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 869, + "startColumn": 26, + "charOffset": 39954, + "charLength": 19, + "snippet": { + "text": "MITIGATION_INCREASE" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 867, + "startColumn": 1, + "charOffset": 39739, + "charLength": 379, + "snippet": { + "text": "// SLOT_BLUE_BOTTOM_100 = 33\r\nvoid IOWheel::slotBlueBottom100(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\r\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\r\n\tbool onSlot = isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_BLUE_BOTTOM_100);\r\n\tif (isKnight(vocationCipId) && onSlot) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aa29d8935493a3c3", + "equalIndicator/v1": "954f5167fdfeaf2fd23347d943913389b24c14c3774bb8f1f08bc170133210bf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 62, + "startColumn": 2, + "charOffset": 1650, + "charLength": 15, + "snippet": { + "text": "lua_createtable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 60, + "startColumn": 1, + "charOffset": 1603, + "charLength": 147, + "snippet": { + "text": "\tconst auto items = imbuement->getItems();\r\n\r\n\tlua_createtable(L, items.size(), 0);\r\n\tfor (const auto &itm : items) {\r\n\t\tlua_createtable(L, 0, 2);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3f5d144db73569a7", + "equalIndicator/v1": "9553f9c9a60c7d91ac2c9910b1dc73263da2167ec874eb884b522a469f87b2a3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'unserializeItemNode' is within a recursive call chain", + "markdown": "Function 'unserializeItemNode' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 253, + "startColumn": 69, + "charOffset": 7222, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 251, + "startColumn": 1, + "charOffset": 7149, + "charLength": 155, + "snippet": { + "text": "}\r\n\r\nbool BasicItem::unserializeItemNode(FileStream &stream, uint16_t x, uint16_t y, uint8_t z) {\r\n\tif (stream.isProp(OTB::Node::END)) {\r\n\t\tstream.back();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ce0c335d089eef18", + "equalIndicator/v1": "9570c9eb8523b354c0b0936d191535972e1610f1f6872eef835a2307aa08f1ba" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 353, + "startColumn": 2, + "charOffset": 8777, + "charLength": 8, + "snippet": { + "text": "uint64_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 351, + "startColumn": 1, + "charOffset": 8770, + "charLength": 116, + "snippet": { + "text": "\t}\r\n\r\n\tuint64_t stackSize = static_cast(itemType->stackSize);\r\n\tlua_pushnumber(L, stackSize);\r\n\treturn 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f0cf870d47bcd30c", + "equalIndicator/v1": "959a0ca0af95d4d886ed38ad2769b1d9645690edfa99492a217b78c334fa5896" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 174, + "startColumn": 12, + "charOffset": 4772, + "charLength": 7, + "snippet": { + "text": "uint8_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 172, + "startColumn": 1, + "charOffset": 4677, + "charLength": 194, + "snippet": { + "text": "// Merge thread events with main dispatch events\r\nvoid Dispatcher::mergeEvents() {\r\n\tconstexpr uint8_t serial = static_cast(TaskGroup::Serial);\r\n\r\n\tfor (const auto &thread : threads) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "087f5338b4477f5a", + "equalIndicator/v1": "959c6cbe6537f6eb6196a82aa7625f6b4b4f160a570534dc3f3b8c25f998d314" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 251, + "startColumn": 128, + "charOffset": 7998, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 249, + "startColumn": 1, + "charOffset": 7866, + "charLength": 241, + "snippet": { + "text": "}\r\n\r\nReturnValue Actions::internalUseItem(std::shared_ptr player, const Position &pos, uint8_t index, std::shared_ptr item, bool isHotkey) {\r\n\tif (std::shared_ptr door = item->getDoor()) {\r\n\t\tif (!door->canUse(player)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4555aba0e22aa188", + "equalIndicator/v1": "95c478333cbe42aac7bf65896e73ff144e9b4ced6d1588f86c4cf5a55c88207e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 978, + "startColumn": 2, + "charOffset": 26638, + "charLength": 2, + "snippet": { + "text": "if" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 976, + "startColumn": 1, + "charOffset": 26510, + "charLength": 175, + "snippet": { + "text": "\t// player:addMana(manaChange[, animationOnLoss = false])\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (!player) {\r\n\t\tlua_pushnil(L);\r\n\t\treturn 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0f492ff82a909f9a", + "equalIndicator/v1": "95caee0d3802cc0169a3831532a78f847a50a1f34822e54539b02c234d013bec" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 91, + "startColumn": 21, + "charOffset": 2401, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 89, + "startColumn": 1, + "charOffset": 2305, + "charLength": 150, + "snippet": { + "text": "\tstd::shared_ptr tile = getUserdataShared(L, 1);\r\n\tif (tile) {\r\n\t\tlua_pushnumber(L, tile->getThingCount());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "84d7d5502966ecea", + "equalIndicator/v1": "95ed201206b421c50581b6aeef385ea6a8b30e85ca48b858dfaa4d49fb73c111" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 971, + "startColumn": 41, + "charOffset": 37008, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 969, + "startColumn": 1, + "charOffset": 36962, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "566684bc302e0510", + "equalIndicator/v1": "95ee614eaf1b5183d60c6c7b095e21c59cb72b1ea8673df98b304983f7c1ed27" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 172, + "startColumn": 71, + "charOffset": 5046, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 170, + "startColumn": 1, + "charOffset": 4971, + "charLength": 131, + "snippet": { + "text": "}\r\n\r\nAccessHouseLevel_t House::getHouseAccessLevel(std::shared_ptr player) const {\r\n\tif (!player) {\r\n\t\treturn HOUSE_OWNER;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2f747badab691748", + "equalIndicator/v1": "9602c3e15dd8146e8f454669b91c6b176d418135e34a98aabab2edc7e638a2dc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1796, + "startColumn": 59, + "charOffset": 48472, + "charLength": 3, + "snippet": { + "text": "med" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1794, + "startColumn": 1, + "charOffset": 48389, + "charLength": 170, + "snippet": { + "text": "\t\t\tlist.push_back(i);\r\n\r\n\t\t\tx1 = std::fabs(1.0 - ((static_cast(sum)) + i) / med);\r\n\t\t\tx2 = std::fabs(1.0 - (static_cast(sum) / med));\r\n\t\t} while (x1 < x2);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5a7dfa03b3acdeef", + "equalIndicator/v1": "960b8e495d424487f6c438bea78eede74baf7c3da1de0e9b1920e2631e988937" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 514, + "startColumn": 64, + "charOffset": 15289, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 512, + "startColumn": 1, + "charOffset": 15221, + "charLength": 157, + "snippet": { + "text": "}\r\n\r\nbool House::executeTransfer(std::shared_ptr item, std::shared_ptr newOwner) {\r\n\tif (transferItem != item) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8c8b63e9f84524bb", + "equalIndicator/v1": "96257d7e4da6dd8b8f438e511282b533ee4946426c237532de65a98305c26871" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 269, + "startColumn": 65, + "charOffset": 7982, + "charLength": 9, + "snippet": { + "text": "moveEvent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 267, + "startColumn": 1, + "charOffset": 7913, + "charLength": 235, + "snippet": { + "text": "}\r\n\r\nbool MoveEvents::registerEvent(const std::shared_ptr moveEvent, const Position &position, std::map &moveListMap) const {\r\n\tauto it = moveListMap.find(position);\r\n\tif (it == moveListMap.end()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "11d52a6117aa7296", + "equalIndicator/v1": "9633b8aeb34a7c948129fd59f1c14e4923b6b970323c2f6fdb0832907438df74" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from '::std::_Common_float_type_t' (aka 'double') to 'unsigned long long'", + "markdown": "Narrowing conversion from '::std::_Common_float_type_t' (aka 'double') to 'unsigned long long'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 286, + "startColumn": 42, + "charOffset": 9335, + "charLength": 4, + "snippet": { + "text": "1600" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 284, + "startColumn": 1, + "charOffset": 9288, + "charLength": 176, + "snippet": { + "text": "\t}\r\n\r\n\tuint64_t reqMana = std::floor(1600 * std::pow(manaMultiplier, static_cast(magLevel) - 1));\r\n\tcacheMana[magLevel] = reqMana;\r\n\treturn reqMana;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4a18234718c67264", + "equalIndicator/v1": "963d7cc2763e53b751c33be06f5ad27ed018d843a993fc4178dfa38623e7f945" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/loot_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 198, + "startColumn": 34, + "charOffset": 5101, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 196, + "startColumn": 1, + "charOffset": 5003, + "charLength": 161, + "snippet": { + "text": "\tconst auto loot = getUserdataShared(L, 1);\r\n\tif (loot) {\r\n\t\tloot->lootBlock.extraDefense = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4af0ec27ad603057", + "equalIndicator/v1": "964a5c18480e428334b9f6b8ebfae6e7ba715f08e5fda467dae05854cb7cfdfe" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 368, + "startColumn": 27, + "charOffset": 12095, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 366, + "startColumn": 1, + "charOffset": 12063, + "charLength": 129, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\r\n\tenv->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5b09f07f125c15af", + "equalIndicator/v1": "96527fc22547959f4c928b293e23f43a20ff89192392e34cb8d2309e65014697" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1033, + "startColumn": 54, + "charOffset": 33663, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1031, + "startColumn": 1, + "charOffset": 33605, + "charLength": 208, + "snippet": { + "text": "}\r\n\r\nbool Combat::doCombatChain(std::shared_ptr caster, std::shared_ptr target, bool aggressive) const {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!params.chainCallback) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dbeffa71fdca1bff", + "equalIndicator/v1": "966cc5d455cbd7d1901334580db78a5b105474125dfa68cff51c2911b459edeb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1486, + "startColumn": 41, + "charOffset": 44306, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1484, + "startColumn": 1, + "charOffset": 44159, + "charLength": 181, + "snippet": { + "text": "\tvoid sendTextWindow(std::shared_ptr item, uint16_t maxlen, bool canWrite) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendTextWindow(windowTextId, item, maxlen, canWrite);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bb8677eca9529f10", + "equalIndicator/v1": "96864fe7f27cbea4dbf9d4f3845bc77cc63d71629feaf336076fcd6889aad79b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 222, + "startColumn": 7, + "charOffset": 6824, + "charLength": 12, + "snippet": { + "text": "replaceThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 220, + "startColumn": 1, + "charOffset": 6661, + "charLength": 321, + "snippet": { + "text": "\tvoid updateTileFlags(const std::shared_ptr &item);\r\n\tvoid updateThing(std::shared_ptr thing, uint16_t itemId, uint32_t count) override final;\r\n\tvoid replaceThing(uint32_t index, std::shared_ptr thing) override final;\r\n\r\n\tvoid removeThing(std::shared_ptr thing, uint32_t count) override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "90facd474638b5aa", + "equalIndicator/v1": "9688ab73216d679aa6c93c98b50f4d59ca20c313821f12af98bab57a2c35d7b9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 110, + "startColumn": 8, + "charOffset": 2819, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 108, + "startColumn": 1, + "charOffset": 2723, + "charLength": 234, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsStowable(lua_State* L) {\r\n\t// itemType:isStowable()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->stackable && itemType->wareId > 0);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bb3e4cf31884f7b4", + "equalIndicator/v1": "9694d3a4105b9ed651a62999d34ce558d24ffa1f476069da20d2cced3f864b36" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2323, + "startColumn": 14, + "charOffset": 72351, + "charLength": 5, + "snippet": { + "text": "Class" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2321, + "startColumn": 1, + "charOffset": 72295, + "charLength": 191, + "snippet": { + "text": "\r\n\tuint16_t raceId = msg.get();\r\n\tstd::string Class = \"\";\r\n\tstd::shared_ptr mtype = nullptr;\r\n\tstd::map mtype_list = g_game().getBestiaryList();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "423c5ba391435eae", + "equalIndicator/v1": "96a7dda31075f7170d0df1ffd1f623d721372386dc39c65a6f7695bc749f965c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2024, + "startColumn": 18, + "charOffset": 59980, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2022, + "startColumn": 1, + "charOffset": 59886, + "charLength": 106, + "snippet": { + "text": "// container\r\nvoid Player::onAddContainerItem(std::shared_ptr item) {\r\n\tcheckTradeState(item);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1636cee3136e72c3", + "equalIndicator/v1": "96b1187c775fa8613ecf412aa7c26afa993d99e152e087694869030882c6aa4a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/save_manager.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 109, + "startColumn": 54, + "charOffset": 3215, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 107, + "startColumn": 1, + "charOffset": 3157, + "charLength": 123, + "snippet": { + "text": "}\r\n\r\nbool SaveManager::savePlayer(std::shared_ptr player) {\r\n\tif (player->isOnline()) {\r\n\t\tschedulePlayer(player);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4f0eb3618b3f837c", + "equalIndicator/v1": "96b8c126ce2a617ce934cefe0618beba51e844fb4f438923df49dc29fafb4891" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'isLogin' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'isLogin' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 526, + "startColumn": 82, + "charOffset": 14362, + "charLength": 10, + "snippet": { + "text": "const bool" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 524, + "startColumn": 1, + "charOffset": 14208, + "charLength": 220, + "snippet": { + "text": "\r\n\tint32_t getStorageValueByName(const std::string &storageName) const;\r\n\tvoid addStorageValueByName(const std::string &storageName, const int32_t value, const bool isLogin = false);\r\n\r\n\tstd::shared_ptr kv() const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6e33a01ff8e24b80", + "equalIndicator/v1": "96bc84641b83061fe8c4d64b15420363bfec025cfff27a59eb7f5bb51d68c9b8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7744, + "startColumn": 3, + "charOffset": 243097, + "charLength": 8, + "snippet": { + "text": "skills_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7742, + "startColumn": 1, + "charOffset": 243076, + "charLength": 224, + "snippet": { + "text": "\t\t\tcontinue;\r\n\t\t}\r\n\t\tskills_t skill = static_cast(i);\r\n\t\tmsg.add(std::min(player->getSkillLevel(skill), std::numeric_limits::max()));\r\n\t\tmsg.add(player->getBaseSkill(skill));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c7882b728e897d1f", + "equalIndicator/v1": "96d39129a6a22de84a64d483efd186f61c921e17f1974ead315310bcb06ebc5e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 213, + "startColumn": 59, + "charOffset": 6944, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 211, + "startColumn": 1, + "charOffset": 6881, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nbool IOLoginData::savePlayerGuard(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tthrow DatabaseException(\"Player nullptr in function: \" + std::string(__FUNCTION__));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "585694ee4e4aa4c7", + "equalIndicator/v1": "96d44a0b17dee055f00bc78f29d4cb04482aa4dfa1179308a21fabaf31d9d8bf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1624, + "startColumn": 50, + "charOffset": 48427, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1622, + "startColumn": 1, + "charOffset": 48252, + "charLength": 203, + "snippet": { + "text": "\tvoid sendItemInspection(uint16_t itemId, uint8_t itemCount, std::shared_ptr item, bool cyclopedia) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendItemInspection(itemId, itemCount, item, cyclopedia);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "faf0ba727db860b7", + "equalIndicator/v1": "96de3f98d8f7f5df4c0033d4368e96d819bacc61490f702037853b2ac51bf009" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 75, + "startColumn": 9, + "charOffset": 2203, + "charLength": 8, + "snippet": { + "text": "Position" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 73, + "startColumn": 1, + "charOffset": 2126, + "charLength": 94, + "snippet": { + "text": "\t\treturn creature->getPlayer()->getTown()->getTemplePosition();\r\n\t}\r\n\treturn Position();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d66cb4b63e54ec70", + "equalIndicator/v1": "96f0b521e92d1a4e60395203565ee9eef6648c783c95356b4c21ea0c9d5e9358" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1783, + "startColumn": 2, + "charOffset": 53759, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1781, + "startColumn": 1, + "charOffset": 53691, + "charLength": 178, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseLookInBattleList(NetworkMessage &msg) {\r\n\tuint32_t creatureId = msg.get();\r\n\tg_game().playerLookInBattleList(player->getID(), creatureId);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d9107bb39de43316", + "equalIndicator/v1": "971ca52f26824b1cbf8a7fa76fa88c6f3b351ef1d59cbf7b12a66d89e817dca1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2729, + "startColumn": 4, + "charOffset": 83954, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2727, + "startColumn": 1, + "charOffset": 83933, + "charLength": 154, + "snippet": { + "text": "\t\t}\r\n\t\tcase 2: {\r\n\t\t\tuint32_t memberID = msg.get();\r\n\t\t\tstd::shared_ptr member = g_game().getPlayerByGUID(memberID);\r\n\t\t\tif (!member) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e7cccaba716c09ee", + "equalIndicator/v1": "9743201492370d2de1e33e26a23019b30908b66533ead493557423d90b912296" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'targetPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'targetPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7451, + "startColumn": 26, + "charOffset": 259608, + "charLength": 12, + "snippet": { + "text": "targetPlayer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7449, + "startColumn": 1, + "charOffset": 259446, + "charLength": 297, + "snippet": { + "text": "void Game::buildMessageAsSpectator(\r\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\r\n\tstd::shared_ptr targetPlayer, TextMessage &message, std::stringstream &ss,\r\n\tconst std::string &damageString, std::string &spectatorMessage\r\n) const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "74b5798a21666c97", + "equalIndicator/v1": "975dc2f9d95e2ddf51db380f751cd59e8210d4967f12c7c862131748c9508e47" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3288, + "startColumn": 70, + "charOffset": 100508, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3286, + "startColumn": 1, + "charOffset": 100434, + "charLength": 142, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureWalkthrough(std::shared_ptr creature, bool walkthrough) {\r\n\tif (!canSee(creature)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ad7370d48f640a39", + "equalIndicator/v1": "975e912b340a3fdf9cf8c7e3f80a6f5eff374c6e6e87690c0f94341f8f7baef8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'getReceiver' is within a recursive call chain", + "markdown": "Function 'getReceiver' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 119, + "startColumn": 15, + "charOffset": 4018, + "charLength": 11, + "snippet": { + "text": "getReceiver" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 117, + "startColumn": 1, + "charOffset": 3999, + "charLength": 168, + "snippet": { + "text": "}\r\n\r\nbool Mailbox::getReceiver(std::shared_ptr item, std::string &name) const {\r\n\tstd::shared_ptr container = item->getContainer();\r\n\tif (container) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "387e1ddb03e96bba", + "equalIndicator/v1": "976887b2c07cad1ac549c02bac34e5abfe5d90be3a8932218f421d4c988eae32" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 58, + "startColumn": 4, + "charOffset": 1870, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 56, + "startColumn": 1, + "charOffset": 1817, + "charLength": 247, + "snippet": { + "text": "\t\t// Another ServerInfo protocol\r\n\t\tcase 0x01: {\r\n\t\t\tuint16_t requestedInfo = msg.get(); // only a Byte is necessary, though we could add new info here\r\n\t\t\tstd::string characterName;\r\n\t\t\tif (requestedInfo & REQUEST_PLAYER_STATUS_INFO) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aeee02219cbdfecc", + "equalIndicator/v1": "976dd4dad03f9b3b867606f6725e776e5182e7e0df665f04621ae8a1fe842c27" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 554, + "startColumn": 7, + "charOffset": 21101, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 552, + "startColumn": 1, + "charOffset": 20996, + "charLength": 243, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnChangeZone(std::shared_ptr player, ZoneType_t zone) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnChangeZone - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "19d6bbafef7ec7b9", + "equalIndicator/v1": "978e78e7df0b487dc403b5fdc7b68ea1f30164753ff4d17491f95e25cc3c252d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'instant' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'instant' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 117, + "startColumn": 74, + "charOffset": 3714, + "charLength": 7, + "snippet": { + "text": "instant" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 115, + "startColumn": 1, + "charOffset": 3636, + "charLength": 177, + "snippet": { + "text": "}\r\n\r\nbool Spells::registerInstantLuaEvent(const std::shared_ptr instant) {\r\n\tif (instant) {\r\n\t\t// If the spell not have the \"spell:words()\" return a error message\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "588049dc50d28306", + "equalIndicator/v1": "97a4b7494737ce3c73825da4b2878197d644e9f3482ee24195f11dc457c764e6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'sscanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead", + "markdown": "'sscanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 43, + "startColumn": 3, + "charOffset": 1638, + "charLength": 6, + "snippet": { + "text": "sscanf" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 41, + "startColumn": 1, + "charOffset": 1509, + "charLength": 360, + "snippet": { + "text": "\t\tint16_t endDay;\r\n\t\tsscanf(eventNode.attribute(\"startdate\").as_string(), \"%hd/%hd/%hd\", &startMonth, &startDay, &startYear);\r\n\t\tsscanf(eventNode.attribute(\"enddate\").as_string(), \"%hd/%hd/%hd\", &endMonth, &endDay, &endYear);\r\n\t\tint startDays = ((startYear * 365) + (startMonth * 30) + startDay);\r\n\t\tint endDays = ((endYear * 365) + (endMonth * 30) + endDay);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7e0ada696dcfd259", + "equalIndicator/v1": "97cb5b6ccbb1f55ada79b26a67b62c50573ee09dac6e322dcad1951b78587044" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'message' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'message' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 249, + "startColumn": 27, + "charOffset": 9309, + "charLength": 17, + "snippet": { + "text": "const std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 247, + "startColumn": 1, + "charOffset": 9225, + "charLength": 145, + "snippet": { + "text": "\r\n\tvoid openImbuementWindow(std::shared_ptr item);\r\n\tvoid sendImbuementResult(const std::string message);\r\n\tvoid closeImbuementWindow();\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "24beabd82db05fd1", + "equalIndicator/v1": "981024ddf97b0da2eca468b0d9c58a47d98196a5643dd90398e7c01cfe6233d6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7171, + "startColumn": 43, + "charOffset": 250045, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7169, + "startColumn": 1, + "charOffset": 249899, + "charLength": 257, + "snippet": { + "text": "\r\n\t\tif (target->hasCondition(CONDITION_MANASHIELD) && damage.primary.type != COMBAT_UNDEFINEDDAMAGE) {\r\n\t\t\tint32_t manaDamage = std::min(target->getMana(), healthChange);\r\n\t\t\tuint32_t manaShield = target->getManaShield();\r\n\t\t\tif (manaShield > 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "419d2d631d4e3cf1", + "equalIndicator/v1": "9825929ad3e2e687e667cce89ad2443f4f16a7abf0affc77c5eec858161022ef" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 328, + "startColumn": 102, + "charOffset": 9835, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 326, + "startColumn": 1, + "charOffset": 9729, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nvoid LuaFunctionsLoader::setCreatureMetatable(lua_State* L, int32_t index, std::shared_ptr creature) {\r\n\tif (validateDispatcherContext(__FUNCTION__)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "16136a196037cab6", + "equalIndicator/v1": "982a9a9593443ac7b5917fe25464571b4d8261d7433d2b90781d8d8f4e913f4e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 102, + "startColumn": 89, + "charOffset": 3497, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 100, + "startColumn": 1, + "charOffset": 3403, + "charLength": 147, + "snippet": { + "text": "\t}\r\n\r\n\tbool playerCanUseItemOnHouseTile(std::shared_ptr player, std::shared_ptr item) {\r\n\t\tif (!player || !item) {\r\n\t\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6e9329886e69be45", + "equalIndicator/v1": "982dd4a086a61750f3be11ae7c7f9078d6b316a581555ccbdbb22ebf02fc49ec" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 562, + "startColumn": 41, + "charOffset": 21421, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 560, + "startColumn": 1, + "charOffset": 21375, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "95a1aee27e8d7e32", + "equalIndicator/v1": "98542ffdd9492390c237c90c75fcca0922edebc8cc26842a2ba9ffe0ffd5c4c4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Switch has 3 consecutive identical branches", + "markdown": "Switch has 3 consecutive identical branches" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4405, + "startColumn": 4, + "charOffset": 139387, + "charLength": 4, + "snippet": { + "text": "case" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4403, + "startColumn": 1, + "charOffset": 139366, + "charLength": 100, + "snippet": { + "text": "\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase MESSAGE_BOOSTED_CREATURE: {\r\n\t\t\t\tinternalType = MESSAGE_LOOT;\r\n\t\t\t\tbreak;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cdee605150133b93", + "equalIndicator/v1": "98590e3d2db5b196aa7fcc8d557945e9381bf6ff77be530355e57ef27569b184" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1567, + "startColumn": 25, + "charOffset": 46164, + "charLength": 5, + "snippet": { + "text": "myPos" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1565, + "startColumn": 1, + "charOffset": 46050, + "charLength": 402, + "snippet": { + "text": "\r\n\t// negative offset means that the action taken place is on a lower floor than ourself\r\n\tconst int8_t offsetz = myPos.getZ() - z;\r\n\treturn (x >= myPos.getX() - MAP_MAX_CLIENT_VIEW_PORT_X + offsetz) && (x <= myPos.getX() + (MAP_MAX_CLIENT_VIEW_PORT_X + 1) + offsetz) && (y >= myPos.getY() - MAP_MAX_CLIENT_VIEW_PORT_Y + offsetz) && (y <= myPos.getY() + (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) + offsetz);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3fddda0e5cd00b7d", + "equalIndicator/v1": "987bd80e975642c11c0528a414502408cd9ea86e8df92d22acf2d5f6e9dbca21" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Return type 'const std::shared_ptr' (aka 'const shared_ptr, allocator>>') is 'const'-qualified at the top level, which may reduce code readability without improving const correctness", + "markdown": "Return type 'const std::shared_ptr' (aka 'const shared_ptr, allocator\\>\\>') is 'const'-qualified at the top level, which may reduce code readability without improving const correctness" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/attribute.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 119, + "startColumn": 2, + "charOffset": 3508, + "charLength": 34, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 117, + "startColumn": 1, + "charOffset": 3501, + "charLength": 190, + "snippet": { + "text": "\t}\r\n\r\n\tconst std::shared_ptr getString() const {\r\n\t\tif (std::holds_alternative>(value)) {\r\n\t\t\treturn std::get>(value);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "162657424ddc51ad", + "equalIndicator/v1": "989766816e9ac0a9d25752fc19d1a24b60eace5e3a44d46658fbbc41a74ec43d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2833, + "startColumn": 38, + "charOffset": 84614, + "charLength": 9, + "snippet": { + "text": "healthMax" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2831, + "startColumn": 1, + "charOffset": 84493, + "charLength": 302, + "snippet": { + "text": "\t\t\twhile (level > 1 && experience < Player::getExpForLevel(level)) {\r\n\t\t\t\t--level;\r\n\t\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\r\n\t\t\t\tmanaMax = std::max(0, manaMax - vocation->getManaGain());\r\n\t\t\t\tcapacity = std::max(0, capacity - vocation->getCapGain());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c4a8ded26d1f3ebf", + "equalIndicator/v1": "98c63205eace5c1b502d5be7fc16d4fb6fa863d21601768f396c574b28ab855c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 314, + "startColumn": 6, + "charOffset": 11703, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 312, + "startColumn": 1, + "charOffset": 11670, + "charLength": 176, + "snippet": { + "text": "\tlua_pushnumber(L, exp);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b2ef5744429ff2ab", + "equalIndicator/v1": "98d11d22fce499dc088200978871e9575d961d662f7ac3e58797c695320dd253" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 511, + "startColumn": 35, + "charOffset": 16794, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 509, + "startColumn": 1, + "charOffset": 16730, + "charLength": 125, + "snippet": { + "text": "\t\treturn targetCreature;\r\n\t}\r\n\treturn g_game().internalGetThing(player, toPosition, toStackPos, 0, STACKPOS_USETARGET);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cf08c40c4bf0fc8a", + "equalIndicator/v1": "98de186dd967c37b0a5b3d48e2d28c55ad953385db1e0787f098f19e97d07587" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'newHouseName' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'newHouseName' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 129, + "startColumn": 21, + "charOffset": 3653, + "charLength": 12, + "snippet": { + "text": "newHouseName" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 127, + "startColumn": 1, + "charOffset": 3588, + "charLength": 122, + "snippet": { + "text": "\r\n\tvoid setName(std::string newHouseName) {\r\n\t\tthis->houseName = newHouseName;\r\n\t}\r\n\tconst std::string &getName() const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ebe02faa2698c791", + "equalIndicator/v1": "99020cc772d31bd384c6f78c69fafbd5e843834ffa41784c9068ec0ddb195abe" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6401, + "startColumn": 67, + "charOffset": 221140, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6399, + "startColumn": 1, + "charOffset": 221069, + "charLength": 185, + "snippet": { + "text": "}\r\n\r\nvoid Game::internalCreatureChangeOutfit(std::shared_ptr creature, const Outfit_t &outfit) {\r\n\tif (!g_events().eventCreatureOnChangeOutfit(creature, outfit)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3d3be5317e546823", + "equalIndicator/v1": "994caf7d06bdf90e94126af3c0d99cc1980bbc6846bb40fe7f0265601ce4852b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 68, + "startColumn": 10, + "charOffset": 1693, + "charLength": 15, + "snippet": { + "text": "gainHealthTicks" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 66, + "startColumn": 1, + "charOffset": 1642, + "charLength": 142, + "snippet": { + "text": "\r\n\tuint32_t getHealthGainTicks() const {\r\n\t\treturn gainHealthTicks / g_configManager().getFloat(RATE_HEALTH_REGEN_SPEED, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c601fed17e1b9925", + "equalIndicator/v1": "995bd35051f280fc4d4a20a091909165b6a4a7ed1f566b871f89e6748f9a7136" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1664, + "startColumn": 99, + "charOffset": 58374, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1662, + "startColumn": 1, + "charOffset": 58210, + "charLength": 264, + "snippet": { + "text": "//**********************************************************//\r\n\r\nvoid TargetCallback::onTargetCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\t// onTargetCombat(creature, target)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2dd94d8c3859f24b", + "equalIndicator/v1": "996993538a3e6907be09a610f0c50945e54871994f7736d3f4967125d1071ee2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Pass by value and use std::move", + "markdown": "Pass by value and use std::move" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 28, + "startColumn": 34, + "charOffset": 1016, + "charLength": 17, + "snippet": { + "text": "const std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 26, + "startColumn": 1, + "charOffset": 953, + "charLength": 185, + "snippet": { + "text": "}\r\n// Constructor for double\r\nCustomAttribute::CustomAttribute(const std::string &initStringKey, const double initDoubleValue) :\r\n\tstringKey(initStringKey), value(initDoubleValue) {\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "52995c5068bc32b7", + "equalIndicator/v1": "9973092ddd2646093147d3cb83c5cd048ba9bd6e0889b4da82b9f160de2bb356" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 136, + "startColumn": 14, + "charOffset": 4178, + "charLength": 11, + "snippet": { + "text": "subContItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 134, + "startColumn": 1, + "charOffset": 4060, + "charLength": 352, + "snippet": { + "text": "\t\tif (item->getContainer() != NULL) {\r\n\t\t\tauto subContainer = item->getContainer()->getStowableItems();\r\n\t\t\tfor (auto subContItem : subContainer) {\r\n\t\t\t\tstd::shared_ptr containerItem = subContItem.first;\r\n\t\t\t\ttoReturnList.push_back(std::pair, uint32_t>(containerItem, static_cast(containerItem->getItemCount())));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b6c14ac3d46f2305", + "equalIndicator/v1": "99ad4dc7d51e3bc0663052daf532d83a0ebefc7363b417f82624f90db34f1293" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creatures_definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1421, + "startColumn": 14, + "charOffset": 37474, + "charLength": 4, + "snippet": { + "text": "name" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1419, + "startColumn": 1, + "charOffset": 37441, + "charLength": 77, + "snippet": { + "text": "\r\n\tuint8_t id = 0;\r\n\tstd::string name = \"\";\r\n\tbool customizable = false;\r\n};\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ccb856fae27826ee", + "equalIndicator/v1": "99b04662c5ec6f1c6280d8cf6941b7d0b9b80023dff2cd921aa7e0164d019251" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1062, + "startColumn": 102, + "charOffset": 40442, + "charLength": 6, + "snippet": { + "text": "corpse" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1060, + "startColumn": 1, + "charOffset": 40336, + "charLength": 234, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::monsterPostDropLoot(std::shared_ptr monster, std::shared_ptr corpse) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::monsterPostDropLoot - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ce78250f07315edc", + "equalIndicator/v1": "99d0ac7a7b4dfbf664bc2c12d92847da482477b1283f957dc54652459b8f735f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 493, + "startColumn": 7, + "charOffset": 18685, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 491, + "startColumn": 1, + "charOffset": 18673, + "charLength": 208, + "snippet": { + "text": "\t}\r\n\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Action::executeUse - Player {}, on item {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2f9bebe28fefb0ef", + "equalIndicator/v1": "99d4642b10a3547896c3513f31768512312f4ec468119fde2fbc273d3543cc8c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')", + "markdown": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 64, + "startColumn": 10, + "charOffset": 1561, + "charLength": 14, + "snippet": { + "text": "gainManaAmount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 62, + "startColumn": 1, + "charOffset": 1511, + "charLength": 132, + "snippet": { + "text": "\r\n\tuint32_t getManaGainAmount() const {\r\n\t\treturn gainManaAmount * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2211595e285600f2", + "equalIndicator/v1": "9a043555cfce9b51d7d0a583036dd394debd2eb445159cbf472e6eba1914aae2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 156, + "startColumn": 9, + "charOffset": 5029, + "charLength": 13, + "snippet": { + "text": "getFirstIndex" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 154, + "startColumn": 1, + "charOffset": 4943, + "charLength": 259, + "snippet": { + "text": "\r\n\tint32_t getThingIndex(std::shared_ptr thing) const override final;\r\n\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eeae3cb15d76afd0", + "equalIndicator/v1": "9a0f3fd89117c2edeb28cf656153d7e97dba67df44e49afb8f35cd1cf6f70a1b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6512, + "startColumn": 15, + "charOffset": 205141, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6510, + "startColumn": 1, + "charOffset": 205056, + "charLength": 123, + "snippet": { + "text": "\tmsg.addPosition(pos);\r\n\tmsg.addByte(static_cast(stackpos));\r\n\tAddItem(msg, item);\r\n\twriteToOutputBuffer(msg);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8057e3925303a658", + "equalIndicator/v1": "9a146fc22ae55700fd12205e0edef0ce18b0fe2caef05320b472661c9c84b634" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'internalAddItem' is within a recursive call chain", + "markdown": "Function 'internalAddItem' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2202, + "startColumn": 19, + "charOffset": 84180, + "charLength": 15, + "snippet": { + "text": "internalAddItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2200, + "startColumn": 1, + "charOffset": 84157, + "charLength": 258, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::internalAddItem(std::shared_ptr toCylinder, std::shared_ptr item, int32_t index, uint32_t flags, bool test, uint32_t &remainderCount) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (toCylinder == nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "66430a7f71d75ba0", + "equalIndicator/v1": "9a4906666fb48610c39f4e6ca0abff3ef6cf2fdd496c07372b290924a5956ce7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 22, + "startColumn": 46, + "charOffset": 648, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 598, + "charLength": 84, + "snippet": { + "text": "}\r\n\r\nvoid Decay::startDecay(std::shared_ptr item) {\r\n\tif (!item) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "871af2692b29bdbc", + "equalIndicator/v1": "9a511f61a9e53afa1770bee52172abd0992de84f41934e7921cd86f4f2b01a13" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'find' called with a string literal consisting of a single character; consider using the more effective overload accepting a character", + "markdown": "'find' called with a string literal consisting of a single character; consider using the more effective overload accepting a character" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 613, + "startColumn": 34, + "charOffset": 16777, + "charLength": 3, + "snippet": { + "text": "\";\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 611, + "startColumn": 1, + "charOffset": 16592, + "charLength": 364, + "snippet": { + "text": "\t\t\tint parameters = lua_gettop(L) - 1; // - 1 because self is a parameter aswell, which we want to skip ofc\r\n\t\t\tfor (int i = 0; i < parameters; ++i) {\r\n\t\t\t\tif (getString(L, 2 + i).find(\";\") != std::string::npos) {\r\n\t\t\t\t\tstd::vector vocList = explodeString(getString(L, 2 + i), \";\");\r\n\t\t\t\t\tint32_t vocationId = g_vocations().getVocationId(vocList[0]);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ef5ecd0ca84eb437", + "equalIndicator/v1": "9a57ddfc10c31a73b108656fe1b3c092f6783e6e96cd61d9419ad6e34a4353b8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2675, + "startColumn": 3, + "charOffset": 71872, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2673, + "startColumn": 1, + "charOffset": 71794, + "charLength": 153, + "snippet": { + "text": "\r\n\tif (player->getAccount()->save() != enumToValue(AccountErrors_t::Ok)) {\r\n\t\treportErrorFunc(\"failed to save account\");\r\n\t\tlua_pushnil(L);\r\n\t\treturn 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c84f224eda3468bc", + "equalIndicator/v1": "9a828778e2cc422f118070bd2bee2f3c06b1eeaa8e4f379b03e13dc7de26fe9f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7995, + "startColumn": 66, + "charOffset": 251437, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7993, + "startColumn": 1, + "charOffset": 251367, + "charLength": 130, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendUpdateSupplyTracker(std::shared_ptr item) {\r\n\tif (oldProtocol || !player || !item) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2c34b64b1c47cec4", + "equalIndicator/v1": "9a96cb0b04e7bd71490817f82acb201987d4ff9b6b1bc59db21185596b16cc1a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 155, + "startColumn": 30, + "charOffset": 4269, + "charLength": 29, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 153, + "startColumn": 1, + "charOffset": 4104, + "charLength": 338, + "snippet": { + "text": "\tbool registerLuaItemEvent(const std::shared_ptr action);\r\n\tbool registerLuaUniqueEvent(const std::shared_ptr action);\r\n\tbool registerLuaActionEvent(const std::shared_ptr action);\r\n\tbool registerLuaPositionEvent(const std::shared_ptr action);\r\n\tbool registerLuaEvent(const std::shared_ptr action);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5d5bf23f656e97dd", + "equalIndicator/v1": "9ab761770db41e6db95f47f9abc934969198e25c03cc681ef68ef84d18da403d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The 'empty' method should be used to check for emptiness instead of 'size'", + "markdown": "The 'empty' method should be used to check for emptiness instead of 'size'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 616, + "startColumn": 10, + "charOffset": 16966, + "charLength": 7, + "snippet": { + "text": "vocList" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 614, + "startColumn": 1, + "charOffset": 16807, + "charLength": 260, + "snippet": { + "text": "\t\t\t\t\tstd::vector vocList = explodeString(getString(L, 2 + i), \";\");\r\n\t\t\t\t\tint32_t vocationId = g_vocations().getVocationId(vocList[0]);\r\n\t\t\t\t\tif (vocList.size() > 0) {\r\n\t\t\t\t\t\tif (vocList[1] == \"true\") {\r\n\t\t\t\t\t\t\tspell->addVocMap(vocationId, true);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "95af475d9ee0a916", + "equalIndicator/v1": "9aca61106ab21a87cbefc7dff4adf0f1ffee7a1c11d354a333e2249e96532d63" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Uninitialized record type: 'combatReductionArray'", + "markdown": "Uninitialized record type: 'combatReductionArray'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3930, + "startColumn": 2, + "charOffset": 117764, + "charLength": 34, + "snippet": { + "text": "std::array" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3928, + "startColumn": 1, + "charOffset": 117683, + "charLength": 236, + "snippet": { + "text": "\r\nstd::array Player::getFinalDamageReduction() const {\r\n\tstd::array combatReductionArray;\r\n\tcombatReductionArray.fill(0);\r\n\tcalculateDamageReductionFromEquipedItems(combatReductionArray);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a43ed23614926d94", + "equalIndicator/v1": "9ad9aaf33641d6e18700a650fe45358b4607d00755e4eb36973753b0b831e05b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6438, + "startColumn": 68, + "charOffset": 203252, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6436, + "startColumn": 1, + "charOffset": 203180, + "charLength": 110, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendPartyPlayerVocation(std::shared_ptr target) {\r\n\tif (!target) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e4bee5f95889999b", + "equalIndicator/v1": "9af2186c49889445c599cc44050c7cf421561c9ff600afdec64aaa8fc3bbebac" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Pass by value and use std::move", + "markdown": "Pass by value and use std::move" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 32, + "startColumn": 34, + "charOffset": 1200, + "charLength": 17, + "snippet": { + "text": "const std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 30, + "startColumn": 1, + "charOffset": 1136, + "charLength": 180, + "snippet": { + "text": "}\r\n// Constructor for boolean\r\nCustomAttribute::CustomAttribute(const std::string &initStringKey, const bool initBoolValue) :\r\n\tstringKey(initStringKey), value(initBoolValue) {\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "94299a3cac4cc8f6", + "equalIndicator/v1": "9b003ddbe527619c3375f630c3af697967f1ac400fb70fce1886f302f7db11ee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'currentTarget' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'currentTarget' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1511, + "startColumn": 93, + "charOffset": 52546, + "charLength": 13, + "snippet": { + "text": "currentTarget" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1509, + "startColumn": 1, + "charOffset": 52449, + "charLength": 412, + "snippet": { + "text": "}\r\n\r\nbool Combat::isValidChainTarget(std::shared_ptr caster, std::shared_ptr currentTarget, std::shared_ptr potentialTarget, const CombatParams ¶ms, bool aggressive) {\r\n\tbool canCombat = canDoCombat(caster, potentialTarget, aggressive) == RETURNVALUE_NOERROR;\r\n\tbool pick = params.chainPickerCallback ? params.chainPickerCallback->onChainCombat(caster, potentialTarget) : true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "450ea90db1ec7d99", + "equalIndicator/v1": "9b07af81d665a667271ba7654df3c0405fe208ca0bc8ac63dc513a71db5bf8b1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 238, + "startColumn": 76, + "charOffset": 6729, + "charLength": 12, + "snippet": { + "text": "newRaidEvent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 236, + "startColumn": 1, + "charOffset": 6629, + "charLength": 286, + "snippet": { + "text": "\r\n\t\tif (newRaidEvent) {\r\n\t\t\tuint32_t ticks = static_cast(std::max(RAID_MINTICKS, newRaidEvent->getDelay() - raidEvent->getDelay()));\r\n\t\t\tnextEventEvent = g_dispatcher().scheduleEvent(\r\n\t\t\t\tticks, [this, newRaidEvent] { executeRaidEvent(newRaidEvent); }, __FUNCTION__\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a8a685cada368fdf", + "equalIndicator/v1": "9b08ea49d0cc8fc12fad195a67fab4748b2d961182563958f7582f8dc5967d3f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 167, + "startColumn": 7, + "charOffset": 5755, + "charLength": 16, + "snippet": { + "text": "internalAddThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 165, + "startColumn": 1, + "charOffset": 5591, + "charLength": 346, + "snippet": { + "text": "\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r\n\tvoid internalAddThing(std::shared_ptr thing) override final;\r\n\tvoid internalAddThing(uint32_t index, std::shared_ptr thing) override final;\r\n\tvoid startDecaying() override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "acfa47385c65b183", + "equalIndicator/v1": "9b0c88060e584f9aa20dc3597dbb81c4a9e9df761551522178a2fcafbc44d7ad" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1140, + "startColumn": 2, + "charOffset": 43277, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1138, + "startColumn": 1, + "charOffset": 43270, + "charLength": 52, + "snippet": { + "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4ad66bf29fe1646a", + "equalIndicator/v1": "9b112796c5648a10ac6ba63545bc27bea730c202f24b02842c756617c9ec3917" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 231, + "startColumn": 74, + "charOffset": 5950, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 229, + "startColumn": 1, + "charOffset": 5865, + "charLength": 140, + "snippet": { + "text": "\r\nprivate:\r\n\tvirtual bool getSkillType(std::shared_ptr, std::shared_ptr, skills_t &, uint32_t &) const {\r\n\t\treturn false;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9e070a195533e776", + "equalIndicator/v1": "9b3620972fc60605c2b8bc93e73af2a9702150c3cf761f752753c5f8f086e587" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 190, + "startColumn": 3, + "charOffset": 4917, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 188, + "startColumn": 1, + "charOffset": 4860, + "charLength": 201, + "snippet": { + "text": "\r\n\tif (const TileItemVector* items = getItemList()) {\r\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\r\n\t\t\tif ((*it)->getTrashHolder()) {\r\n\t\t\t\treturn (*it)->getTrashHolder();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "55bc51d440458823", + "equalIndicator/v1": "9b3fd57a5e6a4c60180c2863313e3bbe1ef8563abe49551ffd4efa73a6f23573" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Potential uncovered code path; add a default label", + "markdown": "Potential uncovered code path; add a default label" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2366, + "startColumn": 3, + "charOffset": 73739, + "charLength": 6, + "snippet": { + "text": "switch" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2364, + "startColumn": 1, + "charOffset": 73704, + "charLength": 99, + "snippet": { + "text": "\t\tbool shouldAddItem = false;\r\n\r\n\t\tswitch (currentLevel) {\r\n\t\t\tcase 1:\r\n\t\t\t\tshouldAddItem = false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "74d42efe426e6d51", + "equalIndicator/v1": "9b41bb97a80e9a193099c83980606928ce92647d9e9b8b0d8d81133b73370284" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'potentialTarget' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'potentialTarget' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1511, + "startColumn": 134, + "charOffset": 52587, + "charLength": 15, + "snippet": { + "text": "potentialTarget" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1509, + "startColumn": 1, + "charOffset": 52449, + "charLength": 412, + "snippet": { + "text": "}\r\n\r\nbool Combat::isValidChainTarget(std::shared_ptr caster, std::shared_ptr currentTarget, std::shared_ptr potentialTarget, const CombatParams ¶ms, bool aggressive) {\r\n\tbool canCombat = canDoCombat(caster, potentialTarget, aggressive) == RETURNVALUE_NOERROR;\r\n\tbool pick = params.chainPickerCallback ? params.chainPickerCallback->onChainCombat(caster, potentialTarget) : true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b97c9ad52871d30f", + "equalIndicator/v1": "9b4d0fd3c5276bdd91fa15e96f04370084e2eb22b7e4d96c08332f07de97e29e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1540, + "startColumn": 61, + "charOffset": 54064, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1538, + "startColumn": 1, + "charOffset": 53999, + "charLength": 200, + "snippet": { + "text": "}\r\n\r\nvoid ValueCallback::getMinMaxValues(std::shared_ptr player, CombatDamage &damage, bool useCharges) const {\r\n\t// onGetPlayerMinMaxValues(...)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e7134f456c8dc499", + "equalIndicator/v1": "9b56d31cad337b7d6d8e623c1230bef1da3838a25b568d5988233cbb3f80fee3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 77, + "startColumn": 8, + "charOffset": 2042, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 75, + "startColumn": 1, + "charOffset": 1948, + "charLength": 206, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsMovable(lua_State* L) {\r\n\t// itemType:isMovable()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->movable);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "488f8ef1dee325ed", + "equalIndicator/v1": "9b778624b5d33a38088a90cb5fbf58e0fcc536fb1f7304f2b97da3f9f2e68819" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1257, + "startColumn": 72, + "charOffset": 34822, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1255, + "startColumn": 1, + "charOffset": 34746, + "charLength": 154, + "snippet": { + "text": "}\r\n\r\nuint32_t ConditionRegeneration::getManaTicks(std::shared_ptr creature) const {\r\n\tstd::shared_ptr player = creature->getPlayer();\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "269d2678f1639218", + "equalIndicator/v1": "9bb43fb9ac4f3044beff8505de976aa6907daf9ab4cd37faa6d26a9265630b41" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Return type 'const Outfit_t' is 'const'-qualified at the top level, which may reduce code readability without improving const correctness", + "markdown": "Return type 'const Outfit_t' is 'const'-qualified at the top level, which may reduce code readability without improving const correctness" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 281, + "startColumn": 2, + "charOffset": 6941, + "charLength": 14, + "snippet": { + "text": "const Outfit_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 279, + "startColumn": 1, + "charOffset": 6909, + "charLength": 103, + "snippet": { + "text": "\t\tcurrentOutfit = outfit;\r\n\t}\r\n\tconst Outfit_t getDefaultOutfit() const {\r\n\t\treturn defaultOutfit;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aca6d32514942180", + "equalIndicator/v1": "9be936d2f4e0ef94829b2ea5059cd7107dda75445fa6e058482ab88da00fb5d4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::list>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::list\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 58, + "startColumn": 21, + "charOffset": 1527, + "charLength": 7, + "snippet": { + "text": "members" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 56, + "startColumn": 1, + "charOffset": 1455, + "charLength": 111, + "snippet": { + "text": "\r\n\tconst auto members = guild->getMembersOnline();\r\n\tlua_createtable(L, members.size(), 0);\r\n\r\n\tint index = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c81142678a65f0e6", + "equalIndicator/v1": "9bf2267415e07a13467a131d08a7fb565d71bc27c24beb6b4fc863833ec83e98" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 681, + "startColumn": 4, + "charOffset": 18732, + "charLength": 4, + "snippet": { + "text": "else" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 679, + "startColumn": 1, + "charOffset": 18659, + "charLength": 110, + "snippet": { + "text": "\t\tpushUserdata(L, reward);\r\n\t\tsetItemMetatable(L, -1, reward);\r\n\t} else {\r\n\t\tpushBoolean(L, false);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f092d1e48cc1c884", + "equalIndicator/v1": "9c3677bc949ebb22f97bf1d671a3d51224208aeadf679005e52bc98b80ff5094" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 616, + "startColumn": 131, + "charOffset": 18789, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 614, + "startColumn": 1, + "charOffset": 18654, + "charLength": 257, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::DeEquipItem(const std::shared_ptr MoveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool) {\r\n\tif (player == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8ecd626ad1fcf6a5", + "equalIndicator/v1": "9c471621c1435e29d44345bb84294302d92d4b792fc5671164a98a94976fe738" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 311, + "startColumn": 14, + "charOffset": 9694, + "charLength": 14, + "snippet": { + "text": "getDescription" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 309, + "startColumn": 1, + "charOffset": 9579, + "charLength": 248, + "snippet": { + "text": "\tstatic std::string getWeightDescription(const ItemType &it, uint32_t weight, uint32_t count = 1);\r\n\r\n\tstd::string getDescription(int32_t lookDistance) override final;\r\n\tstd::string getNameDescription();\r\n\tstd::string getWeightDescription() const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f9f30454e7c94b04", + "equalIndicator/v1": "9c5b3d72ddf6f74a0c2d84ce6d3bec6ca5377bcf23cb07c8dd6e6fafd86eba15" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Replace loop by 'std::ranges::all_of()'", + "markdown": "Replace loop by 'std::ranges::all_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 59, + "startColumn": 2, + "charOffset": 1873, + "charLength": 37, + "snippet": { + "text": "// fire global event if is registered" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 57, + "startColumn": 1, + "charOffset": 1796, + "charLength": 217, + "snippet": { + "text": "\r\nbool CreatureEvents::playerLogin(std::shared_ptr player) const {\r\n\t// fire global event if is registered\r\n\tfor (const auto &it : creatureEvents) {\r\n\t\tif (it.second->getEventType() == CREATURE_EVENT_LOGIN) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "55ff26bb68dabc45", + "equalIndicator/v1": "9c726a101bb7708dd12c81175cc00d7030dacb0accfbebc104c0f820444141a0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 551, + "startColumn": 13, + "charOffset": 25814, + "charLength": 11, + "snippet": { + "text": "stringValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 549, + "startColumn": 1, + "charOffset": 25614, + "charLength": 382, + "snippet": { + "text": "\t} else if (stringValue == \"fieldabsorbpercentfire\") {\r\n\t\titemType.getAbilities().fieldAbsorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"fieldabsorbpercentpoison\") {\r\n\t\titemType.getAbilities().fieldAbsorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "15812fe7e855b9d9", + "equalIndicator/v1": "9c8c397a0c1f4fad56afd6fd5b19716ae9b3b4c2c9c46cb7e8d31c330105bdd4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 148, + "startColumn": 62, + "charOffset": 3820, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 146, + "startColumn": 1, + "charOffset": 3754, + "charLength": 181, + "snippet": { + "text": "}\r\n\r\nvoid ScriptEnvironment::removeTempItem(std::shared_ptr item) {\r\n\tfor (auto it = tempItems.begin(), end = tempItems.end(); it != end; ++it) {\r\n\t\tif (it->second == item) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d344fd9ec0b3711a", + "equalIndicator/v1": "9ca9acee81f110752ca6f7ef5756926a5711443aa4bc3d18aefa3870bd12a774" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 705, + "startColumn": 65, + "charOffset": 22916, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 703, + "startColumn": 1, + "charOffset": 22847, + "charLength": 128, + "snippet": { + "text": "}\r\n\r\nbool Combat::checkFearConditionAffected(std::shared_ptr player) {\r\n\tif (player->isImmuneFear()) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c1f73b12f9c33593", + "equalIndicator/v1": "9cc3f131136d91f45755cc62672ffcdf3967c5eb62ace381968a55e390e40083" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1369, + "startColumn": 89, + "charOffset": 46940, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1367, + "startColumn": 1, + "charOffset": 46847, + "charLength": 298, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatDispel(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms) {\r\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\r\n\tif ((caster && target)\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "50a0e0ea30f3b3a9", + "equalIndicator/v1": "9cc6d7ca2e701f662ea84dc51ec477f0e44e684988bbcaed358ff5d126750b61" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 862, + "startColumn": 16, + "charOffset": 28038, + "charLength": 12, + "snippet": { + "text": "changeHealth" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 860, + "startColumn": 1, + "charOffset": 28018, + "charLength": 124, + "snippet": { + "text": "}\r\n\r\nvoid Creature::changeHealth(int32_t healthChange, bool sendHealthChange /* = true*/) {\r\n\tint32_t oldHealth = health;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a0f5545e05301d7b", + "equalIndicator/v1": "9ccffd4077e0935f8f98207452f33612b56929b5ce0cee1cb0701deabb779fcb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 67, + "startColumn": 46, + "charOffset": 2035, + "charLength": 5, + "snippet": { + "text": "range" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 65, + "startColumn": 1, + "charOffset": 1969, + "charLength": 86, + "snippet": { + "text": "\t\treturn false;\r\n\t}\r\n\treturn Creature::canSee(getPosition(), pos, range, range);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1e2620b523bb424b", + "equalIndicator/v1": "9d3bfe1d69fcb101e7fbfe3a0683c846608fa5e7e328c3be54f7577d61471690" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 722, + "startColumn": 37, + "charOffset": 23485, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 720, + "startColumn": 1, + "charOffset": 23423, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 87) * 1.20f) - 4;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bb5fd591fbc95f89", + "equalIndicator/v1": "9d5d69567b89187afa669d0a1e89fa800af90a9e1acfa2f8f588f6f735bd623f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1860, + "startColumn": 26, + "charOffset": 54684, + "charLength": 12, + "snippet": { + "text": "std::tolower" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1858, + "startColumn": 1, + "charOffset": 54653, + "charLength": 276, + "snippet": { + "text": "\t}\r\n\r\n\tconst char &character = std::tolower(modifiedValue.front());\r\n\tauto article = character == 'a' || character == 'e' || character == 'i' || character == 'o' || character == 'u' ? \"an\" : \"a\";\r\n\treturn fmt::format(\"{}{} {}.\", withSpace ? \" \" : \"\", article, modifiedValue);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3edbc5f6996818c1", + "equalIndicator/v1": "9d5e5b460f29244fbf1e00363d9556faa4ec7bc7dd5a0b9b8871c8a1f2faf937" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1392, + "startColumn": 32, + "charOffset": 41866, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1390, + "startColumn": 1, + "charOffset": 41730, + "charLength": 167, + "snippet": { + "text": "\tvoid sendPartyPlayerMana(std::shared_ptr player, uint8_t manaPercent) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPartyPlayerMana(player, manaPercent);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "19c583a076c8a95d", + "equalIndicator/v1": "9d6b64206d413dfa93d25fcdaa25edc29f0a64d66e50d8c2bbd5fec648a47563" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 645, + "startColumn": 76, + "charOffset": 17400, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 643, + "startColumn": 1, + "charOffset": 17320, + "charLength": 197, + "snippet": { + "text": "}\r\n\r\nvoid ConditionAttributes::updatePercentIncreases(std::shared_ptr creature) {\r\n\tfor (uint8_t i = 0; i < COMBAT_COUNT; i++) {\r\n\t\tauto increasePercentValue = getIncreasePercentById(i);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2e49f37f96b73e1e", + "equalIndicator/v1": "9db0d1d71260c34f2510a695c25ef2db95a7244e2377947b008d67dbe3028130" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3117, + "startColumn": 47, + "charOffset": 116134, + "charLength": 5, + "snippet": { + "text": "money" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3115, + "startColumn": 1, + "charOffset": 116020, + "charLength": 219, + "snippet": { + "text": "\t\t\t}\r\n\t\t\tplayer->setBankBalance(player->getBankBalance() + money);\r\n\t\t\tg_metrics().addCounter(\"balance_increase\", money, { { \"player\", player->getName() }, { \"context\", \"loot\" } });\r\n\t\t\treturn RETURNVALUE_NOERROR;\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b26246bb272a67e0", + "equalIndicator/v1": "9dc0e047b4f9e77e1032f08350f5d795249564b9792702bf8e07eb71c6813f7b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 581, + "startColumn": 63, + "charOffset": 15678, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 579, + "startColumn": 1, + "charOffset": 15611, + "charLength": 106, + "snippet": { + "text": "}\r\n\r\nvoid ConditionAttributes::updateStats(std::shared_ptr player) {\r\n\tbool needUpdate = false;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "859a2fd4747960a3", + "equalIndicator/v1": "9dc84619f0d87f0898795ee579a3abc27ce0b35f1ecef40da5309f04850b9b62" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1405, + "startColumn": 3, + "charOffset": 41849, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1403, + "startColumn": 1, + "charOffset": 41799, + "charLength": 210, + "snippet": { + "text": "\tif (creatures) {\r\n\t\tbool playerAdded = false;\r\n\t\tfor (auto it = creatures->rbegin(); it != creatures->rend(); ++it) {\r\n\t\t\tstd::shared_ptr creature = *it;\r\n\t\t\tif (!player->canSeeCreature(creature)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "23ec1024c534fea4", + "equalIndicator/v1": "9de8d2d6d98ebd41d31a9eb480ca3f6e2ce90a3e05aaabcd0c83b51678b6b516" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1305, + "startColumn": 8, + "charOffset": 44960, + "charLength": 19, + "snippet": { + "text": "auto [townid, town]" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1303, + "startColumn": 1, + "charOffset": 44811, + "charLength": 309, + "snippet": { + "text": "\t// Check if is in the temple range (we assume the temple is within the range of 10 sqms)\r\n\tif (m_player.getZoneType() == ZONE_PROTECTION) {\r\n\t\tfor (auto [townid, town] : g_game().map.towns.getTowns()) {\r\n\t\t\tif (Position::areInRange<1, 10>(town->getTemplePosition(), m_player.getPosition())) {\r\n\t\t\t\treturn 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "40dbc7e9328c7a12", + "equalIndicator/v1": "9def61a375008c43524dabc91c8f55c3f0c99a7bcd794f5c9d2e4b68c2a293f2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1037, + "startColumn": 30, + "charOffset": 30025, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1035, + "startColumn": 1, + "charOffset": 29910, + "charLength": 135, + "snippet": { + "text": "\tvoid sendCreatureSkull(std::shared_ptr creature) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureSkull(creature);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cef42669a91863bc", + "equalIndicator/v1": "9e1ab49d5fb61d3fb4c11366d997ae5f4f113cf6ff09916f2595c8c0db264a29" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7593, + "startColumn": 67, + "charOffset": 265050, + "charLength": 13, + "snippet": { + "text": "targetMonster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7591, + "startColumn": 1, + "charOffset": 264941, + "charLength": 282, + "snippet": { + "text": "// Life leech\r\nvoid Game::applyLifeLeech(\r\n\tstd::shared_ptr attackerPlayer, std::shared_ptr targetMonster, std::shared_ptr target, const CombatDamage &damage, const int32_t &realDamage\r\n) const {\r\n\t// Wheel of destiny bonus - life leech chance and amount\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9dc0e6a8f612aa5d", + "equalIndicator/v1": "9e4506b3fad52add9a96ccbbbe5a67c2b98d5c2f73456f7b19c8430d55198418" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1215, + "startColumn": 66, + "charOffset": 46326, + "charLength": 4, + "snippet": { + "text": "zone" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1213, + "startColumn": 1, + "charOffset": 46256, + "charLength": 235, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::zoneAfterCreatureLeave(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneAfterCreatureLeave - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb7096e65b4f88d7", + "equalIndicator/v1": "9e497669d29412226a054d992bdf292e5eb2d1314319bcaa2651281f7cce0213" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2042, + "startColumn": 59, + "charOffset": 59023, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2040, + "startColumn": 1, + "charOffset": 58960, + "charLength": 100, + "snippet": { + "text": "}\r\n\r\nstd::string Item::parseShowDuration(std::shared_ptr item) {\r\n\tif (!item) {\r\n\t\treturn {};\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "29adf78fd3176426", + "equalIndicator/v1": "9e4a4a2f2299168e19dea11285b5debe67bb63e9cd07100c4c6d96e3e7358c3d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 774, + "startColumn": 68, + "charOffset": 29732, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 772, + "startColumn": 1, + "charOffset": 29660, + "charLength": 218, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnLoseExperience(std::shared_ptr player, uint64_t &exp) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLoseExperience - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8948d856fc39a42e", + "equalIndicator/v1": "9e5153ea144899392645b311a6dfbcf0b1573bf5b25aeb946c0024eeb7a912ae" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2027, + "startColumn": 127, + "charOffset": 60119, + "charLength": 7, + "snippet": { + "text": "newItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2025, + "startColumn": 1, + "charOffset": 59988, + "charLength": 216, + "snippet": { + "text": "}\r\n\r\nvoid Player::onUpdateContainerItem(std::shared_ptr container, std::shared_ptr oldItem, std::shared_ptr newItem) {\r\n\tif (oldItem != newItem) {\r\n\t\tonRemoveContainerItem(container, oldItem);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "30e40ab411cb8896", + "equalIndicator/v1": "9e5284d7d8adcdf2653cdef501d2b2f900d19001482a2848728a28b6f8763e05" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'depotLocker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'depotLocker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6967, + "startColumn": 57, + "charOffset": 205819, + "charLength": 11, + "snippet": { + "text": "depotLocker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6965, + "startColumn": 1, + "charOffset": 205665, + "charLength": 317, + "snippet": { + "text": "\r\nstd::pair>, std::map>>\r\nPlayer::requestLockerItems(std::shared_ptr depotLocker, bool sendToClient /*= false*/, uint8_t tier /*= 0*/) const {\r\n\tif (!depotLocker) {\r\n\t\tg_logger().error(\"{} - Depot locker is nullptr\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "73d8289a0ebb4b54", + "equalIndicator/v1": "9e89c6d94dfe0685e604d14e3e63812d1adadd4591e0f1f9c1c5594f79b120d2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3740, + "startColumn": 56, + "charOffset": 112147, + "charLength": 13, + "snippet": { + "text": "stashIterator" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3738, + "startColumn": 1, + "charOffset": 111987, + "charLength": 304, + "snippet": { + "text": "\tfor (const auto &stashIterator : itemDict) {\r\n\t\tuint16_t iteratorCID = (stashIterator.first)->getID();\r\n\t\tif (g_game().internalRemoveItem(stashIterator.first, stashIterator.second) == RETURNVALUE_NOERROR) {\r\n\t\t\taddItemOnStash(iteratorCID, stashIterator.second);\r\n\t\t\ttotalStowed += stashIterator.second;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75f998a1c51b6f93", + "equalIndicator/v1": "9e93c792aac3e4e6b456ed1c4f24b83968c5fafe7370a54f5a875246b36ca9c0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 74, + "startColumn": 46, + "charOffset": 2432, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 72, + "startColumn": 1, + "charOffset": 2382, + "charLength": 126, + "snippet": { + "text": "}\r\n\r\nbool Mailbox::sendItem(std::shared_ptr item) const {\r\n\tstd::string receiver;\r\n\tif (!getReceiver(item, receiver)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a1ebcc4aba1adce7", + "equalIndicator/v1": "9ea05d30f959c7c207c24534c253db4fcec5b7cfa3a10ba7a938b4bd5518fa41" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 853, + "startColumn": 58, + "charOffset": 24612, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 851, + "startColumn": 1, + "charOffset": 24550, + "charLength": 166, + "snippet": { + "text": "}\r\n\r\nint8_t Player::getContainerID(std::shared_ptr container) const {\r\n\tfor (const auto &it : openContainers) {\r\n\t\tif (it.second.container == container) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1762e7559b857a5d", + "equalIndicator/v1": "9ec11a3e78ee86ad29cc95fe376489cfd5407539bf4e355137caf04626bc4fb0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 536, + "startColumn": 2, + "charOffset": 19031, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 534, + "startColumn": 1, + "charOffset": 19024, + "charLength": 46, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6f228a0a531d9308", + "equalIndicator/v1": "9ec9694dbfe8ae262e070435198b5376bb1be542f94b2bc5d1f256e8492a5b00" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 162, + "startColumn": 25, + "charOffset": 4916, + "charLength": 10, + "snippet": { + "text": "realDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 160, + "startColumn": 1, + "charOffset": 4860, + "charLength": 180, + "snippet": { + "text": "\r\n\t// Setting damage to combat\r\n\tcombat.primary.value = realDamage * weaponAttackProportion;\r\n\tcombat.secondary.value = realDamage * (1 - weaponAttackProportion);\r\n\treturn combat;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "609a43040a83bbf1", + "equalIndicator/v1": "9ecc37efaa1a82ebd28b51611c178e881e3931f1ace9993851ba4086f8abf02f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/rewardchest.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 32, + "startColumn": 7, + "charOffset": 1197, + "charLength": 10, + "snippet": { + "text": "removeItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 30, + "startColumn": 1, + "charOffset": 1185, + "charLength": 95, + "snippet": { + "text": "\t}\r\n\r\n\tvoid removeItem(std::shared_ptr thing, bool sendToClient = false) override;\r\n};\r\n" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e467a0440896f230", + "equalIndicator/v1": "9ecd8a11164e0002d3466158aeb71d7493b2e9d83b92a166d34d5e63e0e650cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'container' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'container' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1257, + "startColumn": 31, + "charOffset": 37189, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1255, + "startColumn": 1, + "charOffset": 37031, + "charLength": 202, + "snippet": { + "text": "\tvoid sendContainer(uint8_t cid, std::shared_ptr container, bool hasParent, uint16_t firstIndex) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendContainer(cid, container, hasParent, firstIndex);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "02aceec4cca6e04a", + "equalIndicator/v1": "9eea83d94287f6a04d54d062107639183bfebb3c7fb03834534f2394011bb9bc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 421, + "startColumn": 57, + "charOffset": 11712, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 419, + "startColumn": 1, + "charOffset": 11651, + "charLength": 187, + "snippet": { + "text": "}\r\n\r\nbool Party::setSharedExperience(std::shared_ptr player, bool newSharedExpActive, bool silent /*= false*/) {\r\n\tauto leader = getLeader();\r\n\tif (!player || leader != player) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "82a2e32eb772f9a0", + "equalIndicator/v1": "9f615cc2380f558bd166f2f14116050d6cb05a549f80263436f2b41742307133" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 242, + "startColumn": 21, + "charOffset": 6892, + "charLength": 9, + "snippet": { + "text": "creatures" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 240, + "startColumn": 1, + "charOffset": 6751, + "charLength": 282, + "snippet": { + "text": "\tfor (const std::shared_ptr &tile : houseTiles) {\r\n\t\tif (CreatureVector* creatures = tile->getCreatures()) {\r\n\t\t\tfor (int32_t i = creatures->size(); --i >= 0;) {\r\n\t\t\t\tstd::shared_ptr player = (*creatures)[i]->getPlayer();\r\n\t\t\t\tif (player && !isInvited(player)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c8ea7d01a6acc4dc", + "equalIndicator/v1": "9f7ca9ad6ceff14e09fe3aec71889bf4d29e9394e6a6c044f7fadb4beb33ff20" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1386, + "startColumn": 24, + "charOffset": 38579, + "charLength": 8, + "snippet": { + "text": "soulGain" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1384, + "startColumn": 1, + "charOffset": 38486, + "charLength": 115, + "snippet": { + "text": "\t\t\tif (internalSoulTicks >= soulTicks) {\r\n\t\t\t\tinternalSoulTicks = 0;\r\n\t\t\t\tplayer->changeSoul(soulGain);\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bc7c5cc5e81d1430", + "equalIndicator/v1": "9f9298ee6be1bab3dc61683f4380f2de60e101c11ac68f69d4bd38f574cdd5a5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 261, + "startColumn": 56, + "charOffset": 7036, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 259, + "startColumn": 1, + "charOffset": 6976, + "charLength": 144, + "snippet": { + "text": "}\r\n\r\nvoid BedItem::updateAppearance(std::shared_ptr player) {\r\n\tconst ItemType &it = Item::items[id];\r\n\tif (it.type == ITEM_TYPE_BED) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3e2d47a4fa53d9f9", + "equalIndicator/v1": "9faf1a56e0062519a8d40470f096e8594c6531414188fb4637bc52d07eca8b07" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 76, + "startColumn": 20, + "charOffset": 1953, + "charLength": 5, + "snippet": { + "text": "guild" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 74, + "startColumn": 1, + "charOffset": 1917, + "charLength": 77, + "snippet": { + "text": "\t\treturn 1;\r\n\t}\r\n\tlua_pushnumber(L, guild->getBankBalance());\r\n\treturn 1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5138dd3a6f600284", + "equalIndicator/v1": "9fb5b3028b521bca5fde579d81f55f058e21c1fc078a0d4561b1c34289583dfd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'message' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'message' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7876, + "startColumn": 58, + "charOffset": 247671, + "charLength": 7, + "snippet": { + "text": "message" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7874, + "startColumn": 1, + "charOffset": 247609, + "charLength": 116, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendImbuementResult(const std::string message) {\r\n\tNetworkMessage msg;\r\n\tmsg.addByte(0xED);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "52bf1083e09c7bf1", + "equalIndicator/v1": "9fb8e03d96da0afbff94a4ffaf18d646b56a7a8b9c7d453e18122d5dbefa0043" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 302, + "startColumn": 2, + "charOffset": 7234, + "charLength": 7, + "snippet": { + "text": "int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 300, + "startColumn": 1, + "charOffset": 7227, + "charLength": 76, + "snippet": { + "text": "\t}\r\n\r\n\tint32_t subType = getNumber(L, 3, -1);\r\n\r\n\tuint16_t itemId;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e87acde0f79a7020", + "equalIndicator/v1": "9fc5ddc3860d87728f591561815a151f3fd876b93c851752eb443b8a91bd270a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 275, + "startColumn": 81, + "charOffset": 9146, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 273, + "startColumn": 1, + "charOffset": 9061, + "charLength": 209, + "snippet": { + "text": "}\r\n\r\nvoid Weapon::onUsedWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr destTile) const {\r\n\tif (!player->hasFlag(PlayerFlags_t::NotGainSkill)) {\r\n\t\tskills_t skillType;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dcd97edf99d1065b", + "equalIndicator/v1": "9ffcc64490ee1ddcabd303cb6df7c1c7581db6604df96e1f617daca75ede9237" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'checkImbuements' can be made const", + "markdown": "Method 'checkImbuements' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7907, + "startColumn": 12, + "charOffset": 276573, + "charLength": 15, + "snippet": { + "text": "checkImbuements" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7905, + "startColumn": 1, + "charOffset": 276557, + "charLength": 119, + "snippet": { + "text": "}\r\n\r\nvoid Game::checkImbuements() {\r\n\tfor (const auto &[mapPlayerId, mapPlayer] : getPlayers()) {\r\n\t\tif (!mapPlayer) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "667d084c5c4261fb", + "equalIndicator/v1": "a0143a86fe39f223409d999d6e165e52d57d6a7b56e592280377e4ace65c1570" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 157, + "startColumn": 43, + "charOffset": 4613, + "charLength": 27, + "snippet": { + "text": "Weapons::getMaxWeaponDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 155, + "startColumn": 1, + "charOffset": 4545, + "charLength": 314, + "snippet": { + "text": "\r\n\t// Calculating damage\r\n\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(level, playerSkill, totalAttack, attackFactor, true) * player->getVocation()->meleeDamageMultiplier * damageModifier / 100);\r\n\tint32_t minDamage = level / 5;\r\n\tint32_t realDamage = normal_random(minDamage, maxDamage);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71261164c37bac35", + "equalIndicator/v1": "a02d3015366bb9a80f29bab3bbdedb6a55861724006b9bf3226d38fb670535cf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 21, + "startColumn": 14, + "charOffset": 616, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 19, + "startColumn": 1, + "charOffset": 571, + "charLength": 351, + "snippet": { + "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e48a714e9089befc", + "equalIndicator/v1": "a03badd690152495f4405547978d4a0c3c83fc4101ba22c3d6f9e7378cc7403b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5276, + "startColumn": 89, + "charOffset": 156093, + "charLength": 10, + "snippet": { + "text": "experience" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5274, + "startColumn": 1, + "charOffset": 155932, + "charLength": 204, + "snippet": { + "text": "\tif (level >= 24) {\r\n\t\tdouble tmpLevel = level + (levelPercent / 100.);\r\n\t\tlossPercent = ((tmpLevel + 50) * 50 * ((tmpLevel * tmpLevel) - (5 * tmpLevel) + 8)) / experience;\r\n\t} else {\r\n\t\tlossPercent = 5;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "50ea7e3202378cb2", + "equalIndicator/v1": "a0588a17196f0dc9affcbb59e3293155f38e34e5b94e02b4c09527c1c8cdae0b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6436, + "startColumn": 57, + "charOffset": 222280, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6434, + "startColumn": 1, + "charOffset": 222219, + "charLength": 185, + "snippet": { + "text": "}\r\n\r\nvoid Game::updateCreatureIcon(std::shared_ptr creature) {\r\n\t// Send to clients\r\n\tfor (const auto &spectator : Spectators().find(creature->getPosition(), true)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7450b3734c2da82b", + "equalIndicator/v1": "a066b885068dcbdbc1ff45cee192bb976a30cb365f3bedd506c45b22843c0576" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1177, + "startColumn": 58, + "charOffset": 36505, + "charLength": 17, + "snippet": { + "text": "getLostExperience" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1175, + "startColumn": 1, + "charOffset": 36362, + "charLength": 170, + "snippet": { + "text": "\r\nuint64_t Creature::getGainedExperience(std::shared_ptr attacker) const {\r\n\treturn std::floor(getDamageRatio(std::move(attacker)) * getLostExperience());\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "88be1e29e35b061a", + "equalIndicator/v1": "a0a452993f44801a28736a2a96f3be68dc6a6e29bb2c33e735f98e237e1dd5c6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 140, + "startColumn": 45, + "charOffset": 4620, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 138, + "startColumn": 1, + "charOffset": 4571, + "charLength": 154, + "snippet": { + "text": "}\r\n\r\nbool Mailbox::canSend(std::shared_ptr item) {\r\n\treturn !item->hasOwner() && (item->getID() == ITEM_PARCEL || item->getID() == ITEM_LETTER);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "726d2b8244e1f885", + "equalIndicator/v1": "a0cc8103a7fd2032a800a2a5cb70f8be84413b5de9e13f8fce87ebc6e3e8354e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 290, + "startColumn": 4, + "charOffset": 7427, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 288, + "startColumn": 1, + "charOffset": 7416, + "charLength": 151, + "snippet": { + "text": "\t\t\t}\r\n\r\n\t\t\tfor (auto it = creatures->rbegin(), end = creatures->rend(); it != end; ++it) {\r\n\t\t\t\tif (creature->canSeeCreature(*it)) {\r\n\t\t\t\t\treturn *it;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8c6b8bbb08aba993", + "equalIndicator/v1": "a0d13d2832d160b95739cef75e8bb51dac8dc7649507f40b76f986830ce08acf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: imbuement", + "markdown": "Constructor does not initialize these fields: imbuement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items_definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 623, + "startColumn": 8, + "charOffset": 15628, + "charLength": 13, + "snippet": { + "text": "ImbuementInfo" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 621, + "startColumn": 1, + "charOffset": 15615, + "charLength": 78, + "snippet": { + "text": "};\r\n\r\nstruct ImbuementInfo {\r\n\tImbuement* imbuement;\r\n\tuint32_t duration = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b3d904eb36bf850d", + "equalIndicator/v1": "a0f694aa096915172697ed90ea87f2ac5e1d433db041e1ef7441df53363a2b29" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 679, + "startColumn": 128, + "charOffset": 26088, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 677, + "startColumn": 1, + "charOffset": 25956, + "charLength": 259, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeRequest - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6c29d322826aafdc", + "equalIndicator/v1": "a1017bc01f42191c1259305a8032ca678b84bbd6ae20f9ec4a72f98b9429274e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'toCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'toCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1836, + "startColumn": 76, + "charOffset": 71472, + "charLength": 10, + "snippet": { + "text": "toCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1834, + "startColumn": 1, + "charOffset": 71392, + "charLength": 232, + "snippet": { + "text": "}\r\n\r\nbool Game::isTryingToStow(const Position &toPos, std::shared_ptr toCylinder) const {\r\n\treturn toCylinder->getContainer() && toCylinder->getItem()->getID() == ITEM_LOCKER && toPos.getZ() == ITEM_SUPPLY_STASH_INDEX;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "102bd249dee20cc4", + "equalIndicator/v1": "a104a4f73e2fbc52a918d92bdc8af4a87fc47d8067da22d33531f64ed8c0dde6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 555, + "startColumn": 70, + "charOffset": 14921, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 553, + "startColumn": 1, + "charOffset": 14847, + "charLength": 169, + "snippet": { + "text": "}\r\n\r\nvoid ConditionAttributes::updatePercentStats(std::shared_ptr player) {\r\n\tfor (int32_t i = STAT_FIRST; i <= STAT_LAST; ++i) {\r\n\t\tif (statsPercent[i] == 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f15bbef5c338e342", + "equalIndicator/v1": "a108101febd64f3b7decd49facc5783b439f339b771e20bb70cfd443c07f5df9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6388, + "startColumn": 70, + "charOffset": 201993, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6386, + "startColumn": 1, + "charOffset": 201919, + "charLength": 182, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendPartyCreatureHealth(std::shared_ptr target, uint8_t healthPercent) {\r\n\tuint32_t cid = target->getID();\r\n\tif (!knownCreatureSet.contains(cid)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ea80a75d33f4565e", + "equalIndicator/v1": "a145768b1150bf9cc353a8f77836fb4a9869e9e096ee04def257148a683fb3b6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 668, + "startColumn": 90, + "charOffset": 20420, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 666, + "startColumn": 1, + "charOffset": 20326, + "charLength": 173, + "snippet": { + "text": "}\r\n\r\nvoid Party::updatePlayerHealth(std::shared_ptr player, std::shared_ptr target, uint8_t healthPercent) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2b826ec9cff8c95a", + "equalIndicator/v1": "a14f1385c93b28951dae307e56a7a494e0a46f6951a341ac5f50d5ad4425de0f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float'", + "markdown": "Narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 660, + "startColumn": 124, + "charOffset": 20186, + "charLength": 37, + "snippet": { + "text": "(it.abilities->statsPercent[s] - 100)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 658, + "startColumn": 1, + "charOffset": 19967, + "charLength": 280, + "snippet": { + "text": "\t\tfor (int32_t s = STAT_FIRST; s <= STAT_LAST; ++s) {\r\n\t\t\tif (it.abilities->statsPercent[s]) {\r\n\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f0c1966cf657b581", + "equalIndicator/v1": "a15444486b2cd5773b3a378b7cc6eb74257489fff5e1e15492b88c23df1c30a1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1765, + "startColumn": 2, + "charOffset": 53176, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1763, + "startColumn": 1, + "charOffset": 53081, + "charLength": 212, + "snippet": { + "text": "void ProtocolGame::parseThrow(NetworkMessage &msg) {\r\n\tPosition fromPos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t fromStackpos = msg.getByte();\r\n\tPosition toPos = msg.getPosition();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9bfc3af36e05af67", + "equalIndicator/v1": "a15fb8dd9b9f87fc5287e58e2bae489abd40a1ec20159db24878dabecd76d01c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: sleepStart, sleeperGUID", + "markdown": "Constructor does not initialize these fields: sleepStart, sleeperGUID" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 18, + "startColumn": 10, + "charOffset": 583, + "charLength": 7, + "snippet": { + "text": "BedItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 16, + "startColumn": 1, + "charOffset": 527, + "charLength": 119, + "snippet": { + "text": "#include \"game/scheduling/save_manager.hpp\"\r\n\r\nBedItem::BedItem(uint16_t id) :\r\n\tItem(id) {\r\n\tinternalRemoveSleeper();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fe9cdfacdcec47d8", + "equalIndicator/v1": "a162ea2e1c0a20c3d963618dd7cb069181470865b2d0cdafc83acbe2aad25b1e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint_fast64_t' (aka 'unsigned long long') to 'float'", + "markdown": "Narrowing conversion from 'uint_fast64_t' (aka 'unsigned long long') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 190, + "startColumn": 3, + "charOffset": 5444, + "charLength": 6, + "snippet": { + "text": "return" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 188, + "startColumn": 1, + "charOffset": 5435, + "charLength": 28, + "snippet": { + "text": "\t\t}\r\n\r\n\t\treturn list;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "12db9b05e8de7764", + "equalIndicator/v1": "a16ba724fb79c1df9b36df1b7bca53468e7c3dc3570df375bc105e9f546c4562" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1072, + "startColumn": 103, + "charOffset": 31252, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1070, + "startColumn": 1, + "charOffset": 31141, + "charLength": 224, + "snippet": { + "text": "\t\t}\r\n\t}\r\n\tvoid sendUpdateTileItem(std::shared_ptr updateTile, const Position &pos, std::shared_ptr item) {\r\n\t\tif (client) {\r\n\t\t\tint32_t stackpos = updateTile->getStackposOfItem(static_self_cast(), item);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0b5c12c6c0830279", + "equalIndicator/v1": "a1865a4e75142f97b9d16b280ff9892f2a418fc1be2259b9616bb1a78ce72f2f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'id' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'id' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 126, + "startColumn": 27, + "charOffset": 3518, + "charLength": 14, + "snippet": { + "text": "const uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 124, + "startColumn": 1, + "charOffset": 3382, + "charLength": 192, + "snippet": { + "text": "\tstd::shared_ptr getItemByIndex(size_t index) const;\r\n\tbool isHoldingItem(std::shared_ptr item);\r\n\tbool isHoldingItemWithId(const uint16_t id);\r\n\r\n\tuint32_t getItemHoldingCount();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4d6abb2aefd1adb4", + "equalIndicator/v1": "a18853908af1947befb58cbd7bcf4a8967864140ac9af2a673664e769ed7b1bb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 540, + "startColumn": 36, + "charOffset": 15507, + "charLength": 5, + "snippet": { + "text": "spawn" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 538, + "startColumn": 1, + "charOffset": 15378, + "charLength": 282, + "snippet": { + "text": "bool AreaSpawnEvent::executeEvent() {\r\n\tfor (const MonsterSpawn &spawn : spawnMonsterList) {\r\n\t\tuint32_t amount = uniform_random(spawn.minAmount, spawn.maxAmount);\r\n\t\tfor (uint32_t i = 0; i < amount; ++i) {\r\n\t\t\tstd::shared_ptr monster = Monster::createMonster(spawn.name);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "26b096fc8994e794", + "equalIndicator/v1": "a18a16f3dc1ffdf026bbe25d83f90504df7f0712319c2c099b8b6745affeed54" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2220, + "startColumn": 14, + "charOffset": 64964, + "charLength": 8, + "snippet": { + "text": "interval" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2218, + "startColumn": 1, + "charOffset": 64818, + "charLength": 384, + "snippet": { + "text": "\tauto playerTile = getTile();\r\n\tconst bool vipStaysOnline = isVip() && g_configManager().getBoolean(VIP_STAY_ONLINE, __FUNCTION__);\r\n\tidleTime += interval;\r\n\tif (playerTile && !playerTile->hasFlag(TILESTATE_NOLOGOUT) && !isAccessPlayer() && !isExerciseTraining() && !vipStaysOnline) {\r\n\t\tconst int32_t kickAfterMinutes = g_configManager().getNumber(KICK_AFTER_MINUTES, __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e4fb0c909a91af1c", + "equalIndicator/v1": "a19901e65fe01693aa7e257382155e71ddc191f01c05b69bcfb18783303f9030" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int64_t' (aka 'long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 831, + "startColumn": 20, + "charOffset": 25010, + "charLength": 10, + "snippet": { + "text": "OTSYS_TIME" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 829, + "startColumn": 1, + "charOffset": 24921, + "charLength": 119, + "snippet": { + "text": "int GlobalFunctions::luaSystemTime(lua_State* L) {\r\n\t// systemTime()\r\n\tlua_pushnumber(L, OTSYS_TIME());\r\n\treturn 1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5f72128591e9594b", + "equalIndicator/v1": "a1f430d45fc982182260d252c362e3acf83c7e7f139bbe44aacfcd12e7f9895f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 194, + "startColumn": 15, + "charOffset": 7846, + "charLength": 11, + "snippet": { + "text": "updateThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 192, + "startColumn": 1, + "charOffset": 7701, + "charLength": 363, + "snippet": { + "text": "\tvirtual void addThing(std::shared_ptr) override { }\r\n\tvirtual void addThing(int32_t, std::shared_ptr) override { }\r\n\tvirtual void updateThing(std::shared_ptr, uint16_t, uint32_t) override { }\r\n\tvirtual void replaceThing(uint32_t, std::shared_ptr) override { }\r\n\tvirtual void removeThing(std::shared_ptr, uint32_t) override { }\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bc70c89286f75c78", + "equalIndicator/v1": "a21ab1b1c50e28b4956498c0ef5530c5eea20ae700ea7fffb2fa7ce6211085db" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1096, + "startColumn": 7, + "charOffset": 34594, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1094, + "startColumn": 1, + "charOffset": 34430, + "charLength": 369, + "snippet": { + "text": "bool RuneSpell::executeCastSpell(std::shared_ptr creature, const LuaVariant &var, bool isHotkey) const {\r\n\t// onCastSpell(creature, var, isHotkey)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[RuneSpell::executeCastSpell - Creature {} runeId {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a5af786247be3f2f", + "equalIndicator/v1": "a21c334df7bb6ebe4b4b19809d603cb958ab9b4e167ab461be0fcae8e3bd3eb5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 145, + "startColumn": 36, + "charOffset": 4497, + "charLength": 5, + "snippet": { + "text": "count" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 143, + "startColumn": 1, + "charOffset": 4431, + "charLength": 80, + "snippet": { + "text": "\t\tsubType = count;\r\n\t} else {\r\n\t\titemCount = std::max(1, count);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0df475e5c28e500e", + "equalIndicator/v1": "a21e60d986b181623d2273df640fecaaead1a3ab65cfd6ec9dbb27b55e4d4804" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Pass by value and use std::move", + "markdown": "Pass by value and use std::move" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 24, + "startColumn": 34, + "charOffset": 827, + "charLength": 17, + "snippet": { + "text": "const std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 22, + "startColumn": 1, + "charOffset": 764, + "charLength": 191, + "snippet": { + "text": "}\r\n// Constructor for string\r\nCustomAttribute::CustomAttribute(const std::string &initStringKey, const std::string &initStringValue) :\r\n\tstringKey(initStringKey), value(initStringValue) {\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "38d6a43246526051", + "equalIndicator/v1": "a242cf3b3550a54ce778725c9d2f051c6686745b449c193b4ddc433ff68744a9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 302, + "startColumn": 38, + "charOffset": 8533, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 300, + "startColumn": 1, + "charOffset": 8419, + "charLength": 199, + "snippet": { + "text": "\t\tif (tmpStrValue == \"warning\") {\r\n\t\t\tmessageType = MESSAGE_GAME_HIGHLIGHT;\r\n\t\t} else if (tmpStrValue == \"event\") {\r\n\t\t\tmessageType = MESSAGE_EVENT_ADVANCE;\r\n\t\t} else if (tmpStrValue == \"default\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ab2427f88401fb90", + "equalIndicator/v1": "a2525fe5ca77767f08e987f06ced15973a9b6326c8476dd6867f6ecdd7a1f9dc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2507, + "startColumn": 27, + "charOffset": 74643, + "charLength": 7, + "snippet": { + "text": "lostExp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2505, + "startColumn": 1, + "charOffset": 74530, + "charLength": 193, + "snippet": { + "text": "\t\tTextMessage message(MESSAGE_EXPERIENCE, expString);\r\n\t\tmessage.position = position;\r\n\t\tmessage.primary.value = lostExp;\r\n\t\tmessage.primary.color = TEXTCOLOR_RED;\r\n\t\tsendTextMessage(message);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7f2566d85a3bb8fa", + "equalIndicator/v1": "a26562dad18de6f13d7f311ddf02b4ea63d660194832989247406c2306afb394" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'uint_fast64_t' (aka 'unsigned long long')", + "markdown": "Narrowing conversion from 'float' to 'uint_fast64_t' (aka 'unsigned long long')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 187, + "startColumn": 9, + "charOffset": 5371, + "charLength": 12, + "snippet": { + "text": "emplace_back" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 185, + "startColumn": 1, + "charOffset": 5201, + "charLength": 240, + "snippet": { + "text": "\t\tconst auto size_per_block = std::ceil(size / static_cast(threadPool.get_thread_count()));\r\n\t\tfor (uint_fast64_t i = 0; i < size; i += size_per_block) {\r\n\t\t\tlist.emplace_back(i, std::min(size, i + size_per_block));\r\n\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71b1ca9113f6e840", + "equalIndicator/v1": "a275b494b45500a379aaa570d88ccc272ef2af4ed83a865003a8f7f8fa2e2bab" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 433, + "startColumn": 11, + "charOffset": 13004, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 431, + "startColumn": 1, + "charOffset": 12937, + "charLength": 89, + "snippet": { + "text": "\t\t\t\tgetScriptInterface()->getLoadingScriptName()\r\n\t\t\t);\r\n\t\t\treturn std::string();\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8a00af57ab4b1e17", + "equalIndicator/v1": "a2ca6d653bba5ecb220524a5344f584827397ff0e79615edb1468988fcb248d9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 491, + "startColumn": 58, + "charOffset": 14618, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 489, + "startColumn": 1, + "charOffset": 14556, + "charLength": 122, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::RemoveItemField(std::shared_ptr, std::shared_ptr, const Position &) {\r\n\treturn 1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f9d8ab916315a78a", + "equalIndicator/v1": "a2f6dd8fd583af1f443a00a0b80b7af4f7166c979b2ca5e68fe9a3e587b74fe1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 232, + "startColumn": 25, + "charOffset": 7328, + "charLength": 8, + "snippet": { + "text": "getThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 230, + "startColumn": 1, + "charOffset": 7169, + "charLength": 365, + "snippet": { + "text": "\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::shared_ptr getThing(size_t index) const override final;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3bf363a4dc830a8a", + "equalIndicator/v1": "a321e45242f40ed0410728e4f82b259701d40374638ca5096a3b65461b795971" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 219, + "startColumn": 58, + "charOffset": 6720, + "charLength": 14, + "snippet": { + "text": "const uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 217, + "startColumn": 1, + "charOffset": 6482, + "charLength": 381, + "snippet": { + "text": "\t// Factory member to create item of right type based on type\r\n\tstatic std::shared_ptr CreateItem(const uint16_t type, uint16_t count = 0, Position* itemPosition = nullptr);\r\n\tstatic std::shared_ptr CreateItemAsContainer(const uint16_t type, uint16_t size);\r\n\tstatic std::shared_ptr CreateItem(uint16_t itemId, Position &itemPosition);\r\n\tstatic Items items;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0b0be11666168435", + "equalIndicator/v1": "a32ca9f9f22bb50731ed18f8007aab77bf0ebe40a18255828275427eb6fe4702" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 133, + "startColumn": 12, + "charOffset": 4040, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 131, + "startColumn": 1, + "charOffset": 3936, + "charLength": 228, + "snippet": { + "text": "StashContainerList Container::getStowableItems() const {\r\n\tStashContainerList toReturnList;\r\n\tfor (auto item : itemlist) {\r\n\t\tif (item->getContainer() != NULL) {\r\n\t\t\tauto subContainer = item->getContainer()->getStowableItems();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "59e6b07fe75e7047", + "equalIndicator/v1": "a339f875a3bc8cbfbcab4fcf473859ebdea2b15ec1506c1d4ff6749361410ce4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/loot_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 222, + "startColumn": 32, + "charOffset": 5662, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 220, + "startColumn": 1, + "charOffset": 5566, + "charLength": 159, + "snippet": { + "text": "\tconst auto loot = getUserdataShared(L, 1);\r\n\tif (loot) {\r\n\t\tloot->lootBlock.shootRange = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71ba8dd87dac353c", + "equalIndicator/v1": "a3472a0ff829ba336039ed846046f9557b2eb91e423bc69ca165561d82d444ab" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7853, + "startColumn": 95, + "charOffset": 274716, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7851, + "startColumn": 1, + "charOffset": 274514, + "charLength": 289, + "snippet": { + "text": "void Game::addPlayerMana(std::shared_ptr target) {\r\n\tif (const auto &party = target->getParty()) {\r\n\t\tuint8_t manaPercent = std::ceil((static_cast(target->getMana()) / std::max(target->getMaxMana(), 1)) * 100);\r\n\t\tparty->updatePlayerMana(target, manaPercent);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cc8d25f253c890b2", + "equalIndicator/v1": "a35208a94da33e20a8583eec236494435c8ba1b7ae652bbdfb678f6cc5fe2290" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4674, + "startColumn": 20, + "charOffset": 167186, + "charLength": 67, + "snippet": { + "text": "((freeSlots) - (count < it.stackSize ? 1 : (count / it.stackSize)))" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4672, + "startColumn": 1, + "charOffset": 167161, + "charLength": 152, + "snippet": { + "text": "\t}\r\n\r\n\tint32_t NDSlots = ((freeSlots) - (count < it.stackSize ? 1 : (count / it.stackSize)));\r\n\tuint32_t SlotsWith = count;\r\n\tuint32_t noSlotsWith = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d3e27532c267f3d3", + "equalIndicator/v1": "a39bb8edee1aa7df9c856d76ba20a5385c1d42ee259f6bb10b80e3d978fb8fc1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable has narrower type 'uint8_t' than iteration's upper bound 'std::basic_string::size_type'", + "markdown": "Loop variable has narrower type 'uint8_t' than iteration's upper bound 'std::basic_string::size_type'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 221, + "startColumn": 22, + "charOffset": 5423, + "charLength": 1, + "snippet": { + "text": "i" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 219, + "startColumn": 1, + "charOffset": 5325, + "charLength": 221, + "snippet": { + "text": "\r\n\t// hmac concat outer pad with message, conversion from hex to int needed\r\n\tfor (uint8_t i = 0; i < message.length(); i += 2) {\r\n\t\toKeyPad.push_back(static_cast(std::stol(message.substr(i, 2), nullptr, 16)));\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4d9d089bdd37e526", + "equalIndicator/v1": "a3a5e62cd8b05bf6798c1faa9789eaac65a2ce28eaa094831236b9f0b4153fe9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 605, + "startColumn": 109, + "charOffset": 17572, + "charLength": 6, + "snippet": { + "text": "member" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 603, + "startColumn": 1, + "charOffset": 17160, + "charLength": 602, + "snippet": { + "text": "\t\tplayer->sendPartyCreatureHealth(member, std::ceil((static_cast(member->getHealth()) / std::max(member->getMaxHealth(), 1)) * 100));\r\n\t\tmember->sendPartyCreatureHealth(player, std::ceil((static_cast(player->getHealth()) / std::max(player->getMaxHealth(), 1)) * 100));\r\n\t\tplayer->sendPartyPlayerMana(member, std::ceil((static_cast(member->getMana()) / std::max(member->getMaxMana(), 1)) * 100));\r\n\t\tmember->sendPartyPlayerMana(player, std::ceil((static_cast(player->getMana()) / std::max(player->getMaxMana(), 1)) * 100));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "838065d565d12abc", + "equalIndicator/v1": "a3b1aace525c419c7529f9449fb3fd019854acdf56ce38aa50be023ce5321ec7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 143, + "startColumn": 14, + "charOffset": 4184, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 141, + "startColumn": 1, + "charOffset": 3850, + "charLength": 640, + "snippet": { + "text": "\tvirtual ReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override final;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override final;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d297ee665198d08d", + "equalIndicator/v1": "a3b57895ecf4a5d05992be2881648a76b8218264a23ecef12fa801dcd6154cd8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8034, + "startColumn": 64, + "charOffset": 279680, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8032, + "startColumn": 1, + "charOffset": 279612, + "charLength": 192, + "snippet": { + "text": "}\r\n\r\nvoid Game::updateCreatureWalkthrough(std::shared_ptr creature) {\r\n\t// Send to clients\r\n\tfor (const auto &spectator : Spectators().find(creature->getPosition(), true)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "616a64811503e0e8", + "equalIndicator/v1": "a3cae27c33a61ed10caad0a069fc565b005bb4f0f5f9305b89cba827dc5fb452" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 792, + "startColumn": 20, + "charOffset": 30444, + "charLength": 3, + "snippet": { + "text": "exp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 790, + "startColumn": 1, + "charOffset": 30370, + "charLength": 141, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r\n\tlua_pushnumber(L, exp);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9320533925081067", + "equalIndicator/v1": "a3d7bc7281854de23fda56e87f09a6d68b8fc06dcee87deb943b47c5053a72be" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2628, + "startColumn": 43, + "charOffset": 99282, + "charLength": 5, + "snippet": { + "text": "money" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2626, + "startColumn": 1, + "charOffset": 99130, + "charLength": 294, + "snippet": { + "text": "\t\t} else if (moneyEntry.first > money) {\r\n\t\t\tconst uint32_t worth = moneyEntry.first / item->getItemCount();\r\n\t\t\tconst uint32_t removeCount = std::ceil(money / static_cast(worth));\r\n\t\t\taddMoney(cylinder, (worth * removeCount) - money, flags);\r\n\t\t\tinternalRemoveItem(item, removeCount);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "503dd8d9e23b4a41", + "equalIndicator/v1": "a3dcc00990b959f7acae707565c5fe8f3d328b70a5e26f7c963b45fc9e84ed8b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Replace loop by 'std::ranges::any_of()'", + "markdown": "Replace loop by 'std::ranges::any_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1514, + "startColumn": 2, + "charOffset": 46048, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1512, + "startColumn": 1, + "charOffset": 46011, + "charLength": 167, + "snippet": { + "text": "\r\n\tint64_t timeNow = OTSYS_TIME();\r\n\tfor (const auto &condition : conditions) {\r\n\t\tif (condition->getType() != type || condition->getSubId() != subId) {\r\n\t\t\tcontinue;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "337e9da516558343", + "equalIndicator/v1": "a3e0ac336fb3b4abb6bb4c197e250b36d1df932fb65ffd342b2be1c201a88450" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 844, + "startColumn": 41, + "charOffset": 32389, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 842, + "startColumn": 1, + "charOffset": 32343, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "afeb7e7eb1f9d052", + "equalIndicator/v1": "a3f8b25b77133f7955bb1eadba1cb219b146e1867025ff1cf27ba44340666013" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Escaped string literal can be written as a raw string literal", + "markdown": "Escaped string literal can be written as a raw string literal" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 140, + "startColumn": 14, + "charOffset": 4434, + "charLength": 19, + "snippet": { + "text": "\"{ \\\"content\\\": \\\"\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 138, + "startColumn": 1, + "charOffset": 4387, + "charLength": 124, + "snippet": { + "text": "\t\tpayload << \" }] }\";\r\n\t} else {\r\n\t\tpayload << \"{ \\\"content\\\": \\\"\" << (!message.empty() ? message : title) << \"\\\" }\";\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5d1b7ccc978f0cd2", + "equalIndicator/v1": "a4034e62dbf3ab525a4f38c8bef97d83bb3cb176045d9983289e56beb0ead709" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 64, + "startColumn": 10, + "charOffset": 1561, + "charLength": 14, + "snippet": { + "text": "gainManaAmount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 62, + "startColumn": 1, + "charOffset": 1511, + "charLength": 132, + "snippet": { + "text": "\r\n\tuint32_t getManaGainAmount() const {\r\n\t\treturn gainManaAmount * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2211595e285600f2", + "equalIndicator/v1": "a4059c65f4aafe23b96300ce0188f6ce8668396789fc5e7ac5d83d23c8460ca6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9230, + "startColumn": 15, + "charOffset": 322596, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9228, + "startColumn": 1, + "charOffset": 322534, + "charLength": 106, + "snippet": { + "text": "\t\t\tint32_t subType;\r\n\t\t\tif (it.charges != 0) {\r\n\t\t\t\tsubType = it.charges;\r\n\t\t\t} else {\r\n\t\t\t\tsubType = -1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3036b629f7e281a5", + "equalIndicator/v1": "a41abc111e35e86fff2001ae579e29eae51f8fb952675a7193be81435e32763e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 117, + "startColumn": 80, + "charOffset": 6043, + "charLength": 13, + "snippet": { + "text": "const int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 115, + "startColumn": 1, + "charOffset": 5807, + "charLength": 565, + "snippet": { + "text": "\tvoid eventPlayerOnRequestQuestLog(std::shared_ptr player);\r\n\tvoid eventPlayerOnRequestQuestLine(std::shared_ptr player, uint16_t questId);\r\n\tvoid eventOnStorageUpdate(std::shared_ptr player, const uint32_t key, const int32_t value, int32_t oldValue, uint64_t currentTime);\r\n\tvoid eventPlayerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage);\r\n\tvoid eventPlayerOnInventoryUpdate(std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool equip);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ddff0aefef1b7130", + "equalIndicator/v1": "a424e7f4005553a8bb84d400d3129bf013ae56744cbed7764c3e2b8c59694420" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 187, + "startColumn": 9, + "charOffset": 4520, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 185, + "startColumn": 1, + "charOffset": 4460, + "charLength": 93, + "snippet": { + "text": "\t\thexstring[index + 1] = hexDigits[byte & 15];\r\n\t}\r\n\treturn std::string(hexstring, 40);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "480d71a45c846517", + "equalIndicator/v1": "a425e132efdb8bcea9a6d59b243dffc9917cf234ed8b14f5d70b8d5ac0d50851" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2253, + "startColumn": 2, + "charOffset": 70185, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2251, + "startColumn": 1, + "charOffset": 70146, + "charLength": 195, + "snippet": { + "text": "\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tg_game().playerConfigureShowOffSocket(player->getID(), pos, stackpos, itemId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1938b379c11fea8c", + "equalIndicator/v1": "a43e8cfce356f78ab0547c5c771af635b2dc5f0adc2ca3d6a51c16f2a8621224" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 240, + "startColumn": 18, + "charOffset": 7870, + "charLength": 11, + "snippet": { + "text": "getPosition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 238, + "startColumn": 1, + "charOffset": 7763, + "charLength": 161, + "snippet": { + "text": "\tvoid virtual internalAddThing(uint32_t index, std::shared_ptr thing) override;\r\n\r\n\tconst Position &getPosition() override final {\r\n\t\treturn tilePos;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1fbf0012b7b0f92f", + "equalIndicator/v1": "a444ba39481bf0d90f73dbc9c2e9f8c50bbd344aa6100295ecc54ea49c3a6ca6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 965, + "startColumn": 31, + "charOffset": 28927, + "charLength": 8, + "snippet": { + "text": "interval" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 963, + "startColumn": 1, + "charOffset": 28857, + "charLength": 112, + "snippet": { + "text": "\r\n\t\t\tif (challengeFocusDuration > 0) {\r\n\t\t\t\tchallengeFocusDuration -= interval;\r\n\t\t\t\tcanChangeTarget = false;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8ebc979032ad1290", + "equalIndicator/v1": "a45d312c7969d7fb1cbab831d5e89109462c3e7d8069ce2cc84caa7811a84070" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 796, + "startColumn": 53, + "charOffset": 25248, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 794, + "startColumn": 1, + "charOffset": 25191, + "charLength": 180, + "snippet": { + "text": "}\r\n\r\nvoid Party::addPlayerDamage(std::shared_ptr player, uint64_t amount) {\r\n\tauto playerAnalyzer = getPlayerPartyAnalyzerStruct(player->getID());\r\n\tif (!playerAnalyzer) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "43f6c08bbe221ffd", + "equalIndicator/v1": "a48b67b31cbf511b24100e8bd8320aa61c09d538fb437631a304917fd11b5c03" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 134, + "startColumn": 110, + "charOffset": 3675, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 132, + "startColumn": 1, + "charOffset": 3561, + "charLength": 244, + "snippet": { + "text": "}\r\n\r\nbool Weapon::useWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target) const {\r\n\tint32_t damageModifier = playerWeaponCheck(player, target, item->getShootRange());\r\n\tif (damageModifier == 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2c3abd7a6952e1e5", + "equalIndicator/v1": "a4cfd4797ca078b75e4689822a6aa040015037fc67468a7aa044687931741f19" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 567, + "startColumn": 33, + "charOffset": 16206, + "charLength": 9, + "snippet": { + "text": "spectator" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 565, + "startColumn": 1, + "charOffset": 16151, + "charLength": 155, + "snippet": { + "text": "\r\n\t// send to clients\r\n\tfor (std::shared_ptr spectator : spectators) {\r\n\t\tspectator->getPlayer()->sendUpdateTile(getTile(), cylinderMapPos);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1c9b3134b86150c8", + "equalIndicator/v1": "a4dbb49fab6725ff3473f6cff232aa14fcbfb1c501338ca510a82d398db7b833" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 194, + "startColumn": 2, + "charOffset": 5433, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 192, + "startColumn": 1, + "charOffset": 5369, + "charLength": 224, + "snippet": { + "text": "\r\n\tint32_t index = getNumber(L, 3, INDEX_WHEREEVER);\r\n\tuint32_t flags = getNumber(L, 4, 0);\r\n\tReturnValue ret = g_game().internalAddItem(container, item, index, flags);\r\n\tif (ret == RETURNVALUE_NOERROR) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb303a54eb61a762", + "equalIndicator/v1": "a559cf467953e95b18e8eab3ec36e8077f21301a1375ad895893dd2aedba29c2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The value returned by this function should not be disregarded; neglecting it may lead to errors", + "markdown": "The value returned by this function should not be disregarded; neglecting it may lead to errors" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 33, + "startColumn": 5, + "charOffset": 1184, + "charLength": 10, + "snippet": { + "text": "connection" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 31, + "startColumn": 1, + "charOffset": 1142, + "charLength": 259, + "snippet": { + "text": "\t\t\ttry {\r\n\t\t\t\tstd::error_code error;\r\n\t\t\t\tconnection->socket.shutdown(asio::ip::tcp::socket::shutdown_both, error);\r\n\t\t\t\tif (error) {\r\n\t\t\t\t\tg_logger().error(\"[ConnectionManager::closeAll] - Failed to close connection, system error code {}\", error.message());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0e5d6d17ca236115", + "equalIndicator/v1": "a57d97574da661a75f663e59c40e7008f945a3d2194f7d3f37eb0ca22c207bff" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 719, + "startColumn": 37, + "charOffset": 23378, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 717, + "startColumn": 1, + "charOffset": 23316, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 65) * 1.50f) + 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "96e845c31ba9bddf", + "equalIndicator/v1": "a5b7f184fa6ad03c6fa8b9536e8b61ece27c720dfb2fb0fa4e7cde8e99af9189" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Replace loop by 'std::ranges::any_of()'", + "markdown": "Replace loop by 'std::ranges::any_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5309, + "startColumn": 2, + "charOffset": 156847, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5307, + "startColumn": 1, + "charOffset": 156840, + "charLength": 158, + "snippet": { + "text": "\t}\r\n\r\n\tfor (const auto &learnedSpellName : learnedInstantSpellList) {\r\n\t\tif (strcasecmp(learnedSpellName.c_str(), spellName.c_str()) == 0) {\r\n\t\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0bc0ad7376d0ac90", + "equalIndicator/v1": "a5be0bce111adf85798406c4ac934357cbe58ab277e2e2f297ea634decbf96e1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 165, + "startColumn": 46, + "charOffset": 4385, + "charLength": 6, + "snippet": { + "text": "amount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 163, + "startColumn": 1, + "charOffset": 4294, + "charLength": 225, + "snippet": { + "text": "\t}\r\n\tif (bankable->getPlayer() != nullptr) {\r\n\t\tg_metrics().addCounter(\"balance_decrease\", amount, { { \"player\", bankable->getPlayer()->getName() }, { \"context\", \"bank_deposit\" } });\r\n\t}\r\n\treturn destination->credit(amount);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "93af2f887fd4521f", + "equalIndicator/v1": "a5c9e81fc47e21e1572ac6ff210bf832539c8651c3802f54e083a7fc665c6f41" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 438, + "startColumn": 27, + "charOffset": 15702, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 436, + "startColumn": 1, + "charOffset": 15670, + "charLength": 122, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.partyOnJoin, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f11b511a07d50fa8", + "equalIndicator/v1": "a5cc03294e3b74386640ccff4284c510dd21b0cb8e6c47ffb18985fe812e5a81" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/inbox/inbox.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 23, + "startColumn": 14, + "charOffset": 647, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 21, + "startColumn": 1, + "charOffset": 602, + "charLength": 346, + "snippet": { + "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9912eb9df885d344", + "equalIndicator/v1": "a60d41855369274f552bf32a1b0c66e26059a5a012aba34f82a1c1cef272bc47" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float'", + "markdown": "Narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 189, + "startColumn": 125, + "charOffset": 6099, + "charLength": 37, + "snippet": { + "text": "(it.abilities->statsPercent[s] - 100)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 187, + "startColumn": 1, + "charOffset": 5882, + "charLength": 280, + "snippet": { + "text": "\t\t\t\tif (it.abilities && it.abilities->statsPercent[s] != 0) {\r\n\t\t\t\t\tneedUpdateStats = true;\r\n\t\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\r\n\t\t\t\t}\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "827afec8c8323752", + "equalIndicator/v1": "a61f93e6a1f87e594ddf4254472e8d1a8c4e1bb73123ad5b540f428a61e65084" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creatures_definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1409, + "startColumn": 14, + "charOffset": 37179, + "charLength": 11, + "snippet": { + "text": "description" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1407, + "startColumn": 1, + "charOffset": 37120, + "charLength": 121, + "snippet": { + "text": "\tuint32_t guid = 0;\r\n\tstd::string name = \"\";\r\n\tstd::string description = \"\";\r\n\tuint32_t icon = 0;\r\n\tbool notify = false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "15777295a647aacf", + "equalIndicator/v1": "a625c2eddc18383b62820c534138a55dc744695478b2204f68c4043998448a63" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 738, + "startColumn": 51, + "charOffset": 24305, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 736, + "startColumn": 1, + "charOffset": 24250, + "charLength": 160, + "snippet": { + "text": "}\r\n\r\nvoid Spell::postCastSpell(std::shared_ptr player, uint32_t manaCost, uint32_t soulCost) {\r\n\tif (manaCost > 0) {\r\n\t\tplayer->addManaSpent(manaCost);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b4ee5e0912087370", + "equalIndicator/v1": "a6337e0562142959afc618b896218f40ef685954401f556c7cb18a3ec4eaec7e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'toTile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'toTile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1393, + "startColumn": 166, + "charOffset": 55227, + "charLength": 6, + "snippet": { + "text": "toTile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1391, + "startColumn": 1, + "charOffset": 55057, + "charLength": 264, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerMoveCreature(std::shared_ptr player, std::shared_ptr movingCreature, const Position &movingCreatureOrigPos, std::shared_ptr toTile) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!player->canDoAction()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0079c6d12bfd5f70", + "equalIndicator/v1": "a638daf5a2ab9d0f5399ed63994ffbf99b62adf71a837231690e5fff68d3bf33" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 364, + "startColumn": 4, + "charOffset": 12051, + "charLength": 89, + "snippet": { + "text": "case COMBAT_ENERGYDAMAGE:\r\n\t\t\t\tdefaultMap[3] -= static_cast(elementEntry.second)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 362, + "startColumn": 1, + "charOffset": 11971, + "charLength": 210, + "snippet": { + "text": "\t\t\t\tdefaultMap[2] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_ENERGYDAMAGE:\r\n\t\t\t\tdefaultMap[3] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_ICEDAMAGE:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "437022d7eb876dea", + "equalIndicator/v1": "a674399fc9e4965242e53ce49d5feeefaaed413ecd48388b31184fe33bce31db" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2085, + "startColumn": 72, + "charOffset": 60390, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2083, + "startColumn": 1, + "charOffset": 60314, + "charLength": 195, + "snippet": { + "text": "}\r\n\r\nstd::string Item::parseShowAttributesDescription(std::shared_ptr item, const uint16_t itemId) {\r\n\tstd::ostringstream itemDescription;\r\n\tconst ItemType &itemType = Item::items[itemId];\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "25538780df1f5a2b", + "equalIndicator/v1": "a6d51169c844392b226cb3c534c933fa7b1607bea01247df215823fb7fd73c27" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'achievementsUnlocked' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'achievementsUnlocked' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3707, + "startColumn": 128, + "charOffset": 115434, + "charLength": 20, + "snippet": { + "text": "achievementsUnlocked" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3705, + "startColumn": 1, + "charOffset": 115302, + "charLength": 199, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendCyclopediaCharacterAchievements(uint16_t secretsUnlocked, std::vector> achievementsUnlocked) {\r\n\tif (!player || oldProtocol) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a0ed85899f7f7fc3", + "equalIndicator/v1": "a6e953a61e25d24f707cc46935556a36dc85c5b8d8ddc6f2f2d276c595287af1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1029, + "startColumn": 7, + "charOffset": 37183, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1027, + "startColumn": 1, + "charOffset": 37171, + "charLength": 156, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnGainExperience - \"\r\n\t\t \"Player {} target {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aa8c809f0d03856f", + "equalIndicator/v1": "a6fb2939ea543c2cb1a2bc762ba13d2ea5cc9957cb4535c520e92554e4dffe42" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'callback' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'callback' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasetasks.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 25, + "startColumn": 95, + "charOffset": 847, + "charLength": 8, + "snippet": { + "text": "callback" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 23, + "startColumn": 1, + "charOffset": 748, + "charLength": 220, + "snippet": { + "text": "}\r\n\r\nvoid DatabaseTasks::execute(const std::string &query, std::function callback /* nullptr */) {\r\n\tthreadPool.detach_task([this, query, callback]() {\r\n\t\tbool success = db.executeQuery(query);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e5ba48941dc49e63", + "equalIndicator/v1": "a70881b71fd4ff5a57a09eef935337af23bee1b34d6da4e4d58d3a15bb8c498d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 808, + "startColumn": 20, + "charOffset": 20102, + "charLength": 18, + "snippet": { + "text": "luaItemSetDuration" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 806, + "startColumn": 1, + "charOffset": 20078, + "charLength": 244, + "snippet": { + "text": "}\r\n\r\nint ItemFunctions::luaItemSetDuration(lua_State* L) {\r\n\t// item:setDuration(minDuration, maxDuration = 0, decayTo = 0, showDuration = true)\r\n\t// Example: item:setDuration(10000, 20000, 2129, false) = random duration from range 10000/20000\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "358f1e0127ad7783", + "equalIndicator/v1": "a7263c046ac51a1912b73efcd74ee4c888d01a169595107b0bc3016fe8e433e0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 143, + "startColumn": 13, + "charOffset": 4443, + "charLength": 5, + "snippet": { + "text": "count" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 141, + "startColumn": 1, + "charOffset": 4424, + "charLength": 81, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tsubType = count;\r\n\t} else {\r\n\t\titemCount = std::max(1, count);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "199d8d38274ed6b4", + "equalIndicator/v1": "a76656794173fd958939c2c7217413d66498ca6c4c2b93a8a89d11cb3dcb193b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'hash' is within a recursive call chain", + "markdown": "Function 'hash' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 234, + "startColumn": 32, + "charOffset": 6788, + "charLength": 3, + "snippet": { + "text": "arr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 232, + "startColumn": 1, + "charOffset": 6714, + "charLength": 198, + "snippet": { + "text": "\r\nvoid BasicItem::hash(size_t &h) const {\r\n\tconst std::array arr = { id, charges, actionId, uniqueId, destX, destY, destZ, doorOrDepotId };\r\n\tfor (const auto v : arr) {\r\n\t\tif (v > 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "10709ed55c043ae9", + "equalIndicator/v1": "a7931042341be761edd3f03fd3e5adde4011be548fcc5d4361378a57f194548d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1726, + "startColumn": 7, + "charOffset": 60283, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1724, + "startColumn": 1, + "charOffset": 60110, + "charLength": 365, + "snippet": { + "text": "void ChainCallback::onChainCombat(std::shared_ptr creature, uint8_t &maxTargets, uint8_t &chainDistance, bool &backtracking) {\r\n\t// onChainCombat(creature)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[ChainCallback::onTargetCombat - Creature {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f33c5708c5200682", + "equalIndicator/v1": "a796d244ce296e0639d75d6edc916180791ea6b52fb65e7130a9a498764d2560" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: quickLootFilter", + "markdown": "Constructor does not initialize these fields: quickLootFilter" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 47, + "startColumn": 9, + "charOffset": 1786, + "charLength": 6, + "snippet": { + "text": "Player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 45, + "startColumn": 1, + "charOffset": 1740, + "charLength": 115, + "snippet": { + "text": "MuteCountMap Player::muteCountMap;\r\n\r\nPlayer::Player(ProtocolGame_ptr p) :\r\n\tCreature(),\r\n\tlastPing(OTSYS_TIME()),\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "515a9dbb26d92357", + "equalIndicator/v1": "a79b11b1e97c42938dfa03c6a7347258a774229abfaf84136da9164fee2109ce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2173, + "startColumn": 60, + "charOffset": 63783, + "charLength": 4, + "snippet": { + "text": "task" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2171, + "startColumn": 1, + "charOffset": 63719, + "charLength": 160, + "snippet": { + "text": "}\r\n\r\nvoid Player::setNextPotionActionTask(std::shared_ptr task) {\r\n\tif (actionPotionTaskEvent != 0) {\r\n\t\tg_dispatcher().stopEvent(actionPotionTaskEvent);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4ed9692277d81fbe", + "equalIndicator/v1": "a7a3c596a0ab6d51d20fac750f22b88d712e26c853b132293333189e4ef2f8c5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1105, + "startColumn": 6, + "charOffset": 42105, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1103, + "startColumn": 1, + "charOffset": 42049, + "charLength": 199, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, position);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fff805f32807f16a", + "equalIndicator/v1": "a7d95a0deec1d47237a3cdd3fa49f68ec94a8b78e29a4ef7818cfc911eed2fe5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 397, + "startColumn": 62, + "charOffset": 10990, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 395, + "startColumn": 1, + "charOffset": 10924, + "charLength": 188, + "snippet": { + "text": "}\r\n\r\nvoid Creature::onCreatureDisappear(std::shared_ptr creature, bool isLogout) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (getAttackedCreature() == creature) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c2a4b99074d2be79", + "equalIndicator/v1": "a87e257a1b986cd1a396c26b0c97b1a611a88b190680c2a4a78c7be98629f358" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1103, + "startColumn": 27, + "charOffset": 34908, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1101, + "startColumn": 1, + "charOffset": 34876, + "charLength": 129, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\r\n\tenv->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "549a61344d2d0bc7", + "equalIndicator/v1": "a8830e8a2f9b781085d567e822a0e0d98991db946fd908eb791ed301501f3ccb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1125, + "startColumn": 20, + "charOffset": 40361, + "charLength": 5, + "snippet": { + "text": "tries" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1123, + "startColumn": 1, + "charOffset": 40312, + "charLength": 112, + "snippet": { + "text": "\r\n\tlua_pushnumber(L, skill);\r\n\tlua_pushnumber(L, tries);\r\n\r\n\tif (scriptInterface.protectedCall(L, 3, 1) != 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "244371c7372706b8", + "equalIndicator/v1": "a893537de4d70b1e1a58a0d94150371ff4464dfa59857e54c891c575e717b452" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 177, + "startColumn": 69, + "charOffset": 6302, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 175, + "startColumn": 1, + "charOffset": 6229, + "charLength": 403, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::creatureOnDrainHealth(std::shared_ptr creature, std::shared_ptr attacker, CombatType_t &typePrimary, int32_t &damagePrimary, CombatType_t &typeSecondary, int32_t &damageSecondary, TextColor_t &colorPrimary, TextColor_t &colorSecondary) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnDrainHealth - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "90dc15e258a9bdab", + "equalIndicator/v1": "a8aa71c403585fb0020ad0c5f0b007e4875614a892b81a0e640041d1ee350f3b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 801, + "startColumn": 2, + "charOffset": 30684, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 799, + "startColumn": 1, + "charOffset": 30677, + "charLength": 52, + "snippet": { + "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5b4718ce325c85ed", + "equalIndicator/v1": "a8bc8a7ea31a18bedbd033a84edbf1bd579549a47c60b88b391cf36c5ca1882c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1633, + "startColumn": 91, + "charOffset": 57218, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1631, + "startColumn": 1, + "charOffset": 57062, + "charLength": 249, + "snippet": { + "text": "//**********************************************************//\r\n\r\nvoid TileCallback::onTileCombat(std::shared_ptr creature, std::shared_ptr tile) const {\r\n\t// onTileCombat(creature, pos)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ae4a4ca8fd03e6d0", + "equalIndicator/v1": "a8d7ddd180c458e0ddd98b0f7ce257b73d792aa4536bdd77549e6f9d74a1db76" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 667, + "startColumn": 15, + "charOffset": 21823, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 665, + "startColumn": 1, + "charOffset": 21783, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 45) * 1.55f) + 6;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b8d184daa674c817", + "equalIndicator/v1": "a8f2432972dc2423ebb96329ea2422c7abb6041aca094ae4361d77a27f3fe417" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 762, + "startColumn": 38, + "charOffset": 27382, + "charLength": 12, + "snippet": { + "text": "fromCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 760, + "startColumn": 1, + "charOffset": 27292, + "charLength": 158, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, toPosition);\r\n\r\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\r\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8bcab81f4aef3634", + "equalIndicator/v1": "a9144add867f9066a884bd7bbec1624b0d4ca1c510c79eb5ee6733b2d6229fb3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 433, + "startColumn": 8, + "charOffset": 26694, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 431, + "startColumn": 1, + "charOffset": 26681, + "charLength": 125, + "snippet": { + "text": "\t}\r\n\r\n\tconst uint16_t date = result->getNumber(\"date\");\r\n\tconst time_t now = time(0);\r\n\ttm* ltm = localtime(&now);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4cd90784aa8e9691", + "equalIndicator/v1": "a9328183c9e3ef8820dcb6bfcb6ac7d29cb1cc00ec742c3f303813e15481334a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3007, + "startColumn": 44, + "charOffset": 90910, + "charLength": 10, + "snippet": { + "text": "experience" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3005, + "startColumn": 1, + "charOffset": 90786, + "charLength": 166, + "snippet": { + "text": "\tdouble getLostPercent() const;\r\n\tuint64_t getLostExperience() const override {\r\n\t\treturn skillLoss ? static_cast(experience * getLostPercent()) : 0;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "03c3eef343e0ef42", + "equalIndicator/v1": "a9366af11b3325a7b469261b2de33f4ea0adb0d2d2e70461502ad9bf90e8451c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 804, + "startColumn": 62, + "charOffset": 29052, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 802, + "startColumn": 1, + "charOffset": 28986, + "charLength": 163, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnChangeZone(std::shared_ptr player, ZoneType_t zone) {\r\n\t// Player:onChangeZone(zone)\r\n\tif (info.playerOnChangeZone == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6405b6fef7c5f798", + "equalIndicator/v1": "a96f347413210ec2ef864f53f8e70f57711ffd17841ab7c4f0f6a68ee903e01d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 381, + "startColumn": 59, + "charOffset": 10374, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 379, + "startColumn": 1, + "charOffset": 10311, + "charLength": 172, + "snippet": { + "text": "}\r\n\r\nvoid Creature::onRemoveCreature(std::shared_ptr creature, bool) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tonCreatureDisappear(creature, true);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ca3cfb6409b3fe14", + "equalIndicator/v1": "a972ddfa07d0440e378d3d9f058b4146d37e4d7102512f5d9f60130ea56166ca" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 53, + "startColumn": 41, + "charOffset": 1279, + "charLength": 9, + "snippet": { + "text": "timestamp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 51, + "startColumn": 1, + "charOffset": 1233, + "charLength": 197, + "snippet": { + "text": "\t}\r\n\r\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\r\n\tgetUnlockedKV()->set(title.m_maleName, toSaveTimeStamp);\r\n\tm_titlesUnlocked.emplace_back(title, toSaveTimeStamp);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7c9ae79046d9c288", + "equalIndicator/v1": "a98908235a7c8a6ce9b9b8ad8761475dcf1e0c806097e19264a6d9254939806e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 209, + "startColumn": 8, + "charOffset": 5250, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 207, + "startColumn": 1, + "charOffset": 5158, + "charLength": 207, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsQuiver(lua_State* L) {\r\n\t// itemType:isQuiver()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isQuiver());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3f17400ca71a1d5d", + "equalIndicator/v1": "a98b99b66ca08699f5d15863efc5a29ec572358df79be2081d9fb11e0c4fca2e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 898, + "startColumn": 58, + "charOffset": 29294, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 896, + "startColumn": 1, + "charOffset": 29232, + "charLength": 195, + "snippet": { + "text": "}\r\n\r\nvoid Combat::addDistanceEffect(std::shared_ptr caster, const Position &fromPos, const Position &toPos, uint16_t effect) {\r\n\tif (effect == CONST_ANI_WEAPONTYPE) {\r\n\t\tif (!caster) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "98c383fb2a877c18", + "equalIndicator/v1": "a9bb7924c6bfb894baaeb973b5d77196698853b86e1e4279f2fe326f49fbfa7a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1385, + "startColumn": 57, + "charOffset": 40267, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1383, + "startColumn": 1, + "charOffset": 40206, + "charLength": 138, + "snippet": { + "text": "}\r\n\r\nint32_t Tile::getStackposOfItem(std::shared_ptr player, std::shared_ptr item) const {\r\n\tint32_t n = 0;\r\n\tif (ground) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "922f48baee6a0cf1", + "equalIndicator/v1": "aa17ebbcac8b0ba4bba5f1763e13cfaa945c02fec7b3055e486d706ecd6b2b0f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8449, + "startColumn": 4, + "charOffset": 267428, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8447, + "startColumn": 1, + "charOffset": 267341, + "charLength": 243, + "snippet": { + "text": "\t\tcase SUPPLY_STASH_ACTION_STOW_CONTAINER: {\r\n\t\t\tPosition pos = msg.getPosition();\r\n\t\t\tuint16_t itemId = msg.get();\r\n\t\t\tuint8_t stackpos = msg.getByte();\r\n\t\t\tg_game().playerStowItem(player->getID(), pos, itemId, stackpos, 0, false);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0546c8d1ccafcdd0", + "equalIndicator/v1": "aa1c7aa11b9bd574d6da47bf44b3ce9bf2021507d3d1d2558c1f71ce552c250a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2441, + "startColumn": 2, + "charOffset": 75947, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2439, + "startColumn": 1, + "charOffset": 75871, + "charLength": 207, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseCyclopediaMonsterTracker(NetworkMessage &msg) {\r\n\tuint16_t monsterRaceId = msg.get();\r\n\t// Bosstiary tracker: 0 = disabled, 1 = enabled\r\n\t// Bestiary tracker: 1 = enabled\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "afcaaf1309b7b968", + "equalIndicator/v1": "aa3f6392e0faeabf375d4eca6459ca414762e36885fef89c514cc71548541c9e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3071, + "startColumn": 132, + "charOffset": 114302, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3069, + "startColumn": 1, + "charOffset": 114166, + "charLength": 275, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::processLootItems(std::shared_ptr player, std::shared_ptr lootContainer, std::shared_ptr item, bool &fallbackConsumed) {\r\n\tstd::shared_ptr lastSubContainer = nullptr;\r\n\tuint32_t remainderCount = item->getItemCount();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3d8a541a53bce4fc", + "equalIndicator/v1": "aa414e097cf92c8ac12961f253ecd4fcbbd4a45fbad68a62a9a64c70558a8cb4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 184, + "startColumn": 28, + "charOffset": 5753, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 182, + "startColumn": 1, + "charOffset": 5719, + "charLength": 143, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\t\tenv->setScriptId(mType->info.creatureDisappearEvent, scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f31db5d2cfae964b", + "equalIndicator/v1": "aa51f9992a5b00de24ac58ef5d35c6d0c0d2cac6e71e234f9161105276461832" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 235, + "startColumn": 56, + "charOffset": 6012, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 233, + "startColumn": 1, + "charOffset": 5952, + "charLength": 135, + "snippet": { + "text": "}\r\n\r\nvoid BedItem::regeneratePlayer(std::shared_ptr player) const {\r\n\tconst uint32_t sleptTime = time(nullptr) - sleepStart;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "76eee41497b4daa4", + "equalIndicator/v1": "aa72f6cd96dc019e3c472d9b827a0a48793511bd93d1659c0ed8a64232005f2e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 577, + "startColumn": 17, + "charOffset": 15612, + "charLength": 9, + "snippet": { + "text": "shopBlock" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 575, + "startColumn": 1, + "charOffset": 15497, + "charLength": 252, + "snippet": { + "text": "\tuint64_t pricePerUnit = 0;\r\n\tconst auto &shopVector = npc->getShopItemVector(player->getGUID());\r\n\tfor (ShopBlock shopBlock : shopVector) {\r\n\t\tif (itemId == shopBlock.itemId && shopBlock.itemBuyPrice != 0) {\r\n\t\t\tpricePerUnit = shopBlock.itemBuyPrice;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "13cdc2567a9b2933", + "equalIndicator/v1": "aa7a751c2dea6b105f3797bcd32760d36d3f56c0d90dc852674f180cb362e5be" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 154, + "startColumn": 30, + "charOffset": 4200, + "charLength": 29, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 152, + "startColumn": 1, + "charOffset": 4102, + "charLength": 277, + "snippet": { + "text": "\r\n\tbool registerLuaItemEvent(const std::shared_ptr action);\r\n\tbool registerLuaUniqueEvent(const std::shared_ptr action);\r\n\tbool registerLuaActionEvent(const std::shared_ptr action);\r\n\tbool registerLuaPositionEvent(const std::shared_ptr action);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fc60aa923c843561", + "equalIndicator/v1": "aab95ef15b799f39dfc3e040091d67fa5a2d55dc14267ab17fa566775ba021e0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 188, + "startColumn": 36, + "charOffset": 7568, + "charLength": 16, + "snippet": { + "text": "queryDestination" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 186, + "startColumn": 1, + "charOffset": 7494, + "charLength": 204, + "snippet": { + "text": "\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r\n\tvirtual std::shared_ptr queryDestination(int32_t &, const std::shared_ptr &, std::shared_ptr*, uint32_t &) override {\r\n\t\treturn nullptr;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a1f3f114bc87c5ed", + "equalIndicator/v1": "aad15c8debf55f29af635a3281ddd456d648583ac9d011d76e2c4d2f4f48703e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 357, + "startColumn": 41, + "charOffset": 13351, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 355, + "startColumn": 1, + "charOffset": 13305, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "49360c3bc0eacd3f", + "equalIndicator/v1": "aad3282eba08e3a58e8a3383aa33d727feca46653f1b27baad2539f19adaced9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'std::map::mapped_type' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'std::map::mapped_type' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 10117, + "startColumn": 44, + "charOffset": 352258, + "charLength": 12, + "snippet": { + "text": "g_dispatcher" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10115, + "startColumn": 1, + "charOffset": 352169, + "charLength": 166, + "snippet": { + "text": "\t\t\t\"Game::updateFiendishMonsterStatus\"\r\n\t\t);\r\n\t\tforgeMonsterEventIds[monster->getID()] = g_dispatcher().scheduleEvent(schedulerTask);\r\n\t\treturn monster->getID();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "18f119f361eb093e", + "equalIndicator/v1": "ab02622823466b155f645e36f07c3d5dbe3ca4d8789d30c663790700b88c8a5b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 947, + "startColumn": 41, + "charOffset": 36136, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 945, + "startColumn": 1, + "charOffset": 36090, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "911249341845a145", + "equalIndicator/v1": "ab0cbbf01fbe8f4891f6ab0065a9ffc1d66805d33e3216162d8c274e83c44f47" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3069, + "startColumn": 2, + "charOffset": 93626, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3067, + "startColumn": 1, + "charOffset": 93555, + "charLength": 180, + "snippet": { + "text": "\r\nvoid ProtocolGame::parsePassPartyLeadership(NetworkMessage &msg) {\r\n\tuint32_t targetId = msg.get();\r\n\tg_game().playerPassPartyLeadership(player->getID(), targetId);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0e7a02189d9bd48f", + "equalIndicator/v1": "ab10f7b3ae6b3b7e1ecf73ecfc374cd13911a9977be8bb49363c247a0d51a9b5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 10253, + "startColumn": 58, + "charOffset": 356465, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10251, + "startColumn": 1, + "charOffset": 356403, + "charLength": 258, + "snippet": { + "text": "}\r\n\r\nbool Game::addInfluencedMonster(std::shared_ptr monster) {\r\n\tif (monster && monster->canBeForgeMonster()) {\r\n\t\tif (auto maxInfluencedMonsters = static_cast(g_configManager().getNumber(FORGE_INFLUENCED_CREATURES_LIMIT, __FUNCTION__));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2d3a4f6ab170dcbd", + "equalIndicator/v1": "ab35388e9c479514d4a41483fe304fe35ad902d802c589366a5340ed444ddf02" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 382, + "startColumn": 70, + "charOffset": 14290, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 380, + "startColumn": 1, + "charOffset": 14216, + "charLength": 265, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnLookInBattleList(std::shared_ptr player, std::shared_ptr creature, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLookInBattleList - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "946b1eb4cf706239", + "equalIndicator/v1": "ab43534a07499daba6e0f39caee34b73af21b36b0d95a8260bbc11bb5a812f07" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 218, + "startColumn": 20, + "charOffset": 6849, + "charLength": 18, + "snippet": { + "text": "luaGameGetNpcCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 216, + "startColumn": 1, + "charOffset": 6825, + "charLength": 130, + "snippet": { + "text": "}\r\n\r\nint GameFunctions::luaGameGetNpcCount(lua_State* L) {\r\n\t// Game.getNpcCount()\r\n\tlua_pushnumber(L, g_game().getNpcsOnline());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dfdbf945c13f8e0d", + "equalIndicator/v1": "ab78c3103b57a45048132aaa77dc54229e7c0e8e344cd9e5006dc30861099d8f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 95, + "startColumn": 21, + "charOffset": 2721, + "charLength": 8, + "snippet": { + "text": "vocation" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 93, + "startColumn": 1, + "charOffset": 2598, + "charLength": 205, + "snippet": { + "text": "\t\tskills_t skillType = getNumber(L, 2);\r\n\t\tuint16_t skillLevel = getNumber(L, 3);\r\n\t\tlua_pushnumber(L, vocation->getReqSkillTries(skillType, skillLevel));\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "63151c3bc961d530", + "equalIndicator/v1": "ab7b56837c90afd075bfd2befce20e9f920dd9076075ffc0a7c0cc720ca123c8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float_t' (aka 'float')", + "markdown": "Narrowing conversion from 'int' to 'float_t' (aka 'float')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1771, + "startColumn": 18, + "charOffset": 47331, + "charLength": 120, + "snippet": { + "text": "\"The function 'player:getStorageValueByName' is deprecated and will be removed in future versions, please use KV system\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1769, + "startColumn": 1, + "charOffset": 47308, + "charLength": 235, + "snippet": { + "text": "\t}\r\n\r\n\tg_logger().warn(\"The function 'player:getStorageValueByName' is deprecated and will be removed in future versions, please use KV system\");\r\n\tauto name = getString(L, 2);\r\n\tlua_pushnumber(L, player->getStorageValueByName(name));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "34bceeff11c7a733", + "equalIndicator/v1": "ab812d87c367dba992ffae0c3f55dbb941a0a4b5455bf53d44797db6b7c314d5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7560, + "startColumn": 67, + "charOffset": 263572, + "charLength": 13, + "snippet": { + "text": "targetMonster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7558, + "startColumn": 1, + "charOffset": 263463, + "charLength": 282, + "snippet": { + "text": "// Mana leech\r\nvoid Game::applyManaLeech(\r\n\tstd::shared_ptr attackerPlayer, std::shared_ptr targetMonster, std::shared_ptr target, const CombatDamage &damage, const int32_t &realDamage\r\n) const {\r\n\t// Wheel of destiny bonus - mana leech chance and amount\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a7aa35458db14db9", + "equalIndicator/v1": "ab940d4ce44ac96f9a3c2165e5a84cadccfedb1fc4c020ee468d6ce1b3017f40" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')", + "markdown": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5775, + "startColumn": 145, + "charOffset": 170727, + "charLength": 8, + "snippet": { + "text": "std::max" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5773, + "startColumn": 1, + "charOffset": 170501, + "charLength": 287, + "snippet": { + "text": "\t\t\tskullDuration = std::floor(skullTicks / (24 * 60 * 60 * 1000));\r\n\t\t}\r\n\t\tclient->sendUnjustifiedPoints(dayProgress, std::max(dayMax - dayKills, 0.0), weekProgress, std::max(weekMax - weekKills, 0.0), monthProgress, std::max(monthMax - monthKills, 0.0), skullDuration);\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "926953c1438a5841", + "equalIndicator/v1": "abb036aeaeb753abfe591e1a373724c5f83b5bd36693596b80370d10e8f30d07" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 242, + "startColumn": 62, + "charOffset": 6344, + "charLength": 9, + "snippet": { + "text": "sleptTime" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 240, + "startColumn": 1, + "charOffset": 6226, + "charLength": 294, + "snippet": { + "text": "\t\tuint32_t regen;\r\n\t\tif (condition->getTicks() != -1) {\r\n\t\t\tregen = std::min((condition->getTicks() / 1000), sleptTime) / 30; // RATE_HEALTH_REGEN_SPEED and RATE_MANA_REGEN_SPEED?\r\n\t\t\tconst int32_t newRegenTicks = condition->getTicks() - (regen * 30000);\r\n\t\t\tif (newRegenTicks <= 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8c71f91a77c2e450", + "equalIndicator/v1": "abc302140104303d44b042f3181996c98c0b5fba637c4e89d389e490e8b81344" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead", + "markdown": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 252, + "startColumn": 37, + "charOffset": 7185, + "charLength": 9, + "snippet": { + "text": "std::atoi" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 250, + "startColumn": 1, + "charOffset": 7048, + "charLength": 354, + "snippet": { + "text": "\r\nuint8_t DBResult::getU8FromString(const std::string &string, const std::string &function) const {\r\n\tauto result = static_cast(std::atoi(string.c_str()));\r\n\tif (result > std::numeric_limits::max()) {\r\n\t\tg_logger().error(\"[{}] Failed to get number value {} for tier table result, on function call: {}\", __FUNCTION__, result, function);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2dc54152bed3529a", + "equalIndicator/v1": "abc7a4e83be0a8c18118ffe498be334639acec174126fb99f311f664cc66ced6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2413, + "startColumn": 27, + "charOffset": 71670, + "charLength": 3, + "snippet": { + "text": "exp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2411, + "startColumn": 1, + "charOffset": 71495, + "charLength": 257, + "snippet": { + "text": "\t\tTextMessage message(MESSAGE_EXPERIENCE, \"You gained \" + expString + (handleHazardExperience ? \" (Hazard)\" : \"\"));\r\n\t\tmessage.position = position;\r\n\t\tmessage.primary.value = exp;\r\n\t\tmessage.primary.color = TEXTCOLOR_WHITE_EXP;\r\n\t\tsendTextMessage(message);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aee1dd0b7be18a77", + "equalIndicator/v1": "abcae7d49cb56e96516db186077f088d6399ef97d8ba0211fa9b499a24dfbcdc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7178, + "startColumn": 19, + "charOffset": 250323, + "charLength": 10, + "snippet": { + "text": "manaShield" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7176, + "startColumn": 1, + "charOffset": 250247, + "charLength": 163, + "snippet": { + "text": "\t\t\t\t\tmanaShield = manaShield - manaDamage;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmanaDamage = manaShield;\r\n\t\t\t\t\ttarget->removeCondition(CONDITION_MANASHIELD);\r\n\t\t\t\t\tmanaShield = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "02de79757004ac33", + "equalIndicator/v1": "abe6a15f756a65a7ea41978848560f45397ea4ea927279e267f327dad6dd72ee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 283, + "startColumn": 2, + "charOffset": 8325, + "charLength": 15, + "snippet": { + "text": "lua_createtable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 281, + "startColumn": 1, + "charOffset": 8270, + "charLength": 116, + "snippet": { + "text": "\r\n\tconst auto targetList = monster->getTargetList();\r\n\tlua_createtable(L, targetList.size(), 0);\r\n\r\n\tint index = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f12074e33f389e78", + "equalIndicator/v1": "abf80abf3137534983acabf833411db81e94bb0cf75c90870d1da51c9de2f2df" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 288, + "startColumn": 8, + "charOffset": 7179, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 286, + "startColumn": 1, + "charOffset": 7073, + "charLength": 226, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetSlotPosition(lua_State* L) {\r\n\t// itemType:getSlotPosition()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->slotPosition);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "764f4c4a59a9acf0", + "equalIndicator/v1": "ac0483f74d62ef4f3f0a762cac7d5bed2fd5151c9cc979193731c851f02529f4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 253, + "startColumn": 8, + "charOffset": 6271, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 251, + "startColumn": 1, + "charOffset": 6169, + "charLength": 221, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetPluralName(lua_State* L) {\r\n\t// itemType:getPluralName()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushString(L, itemType->getPluralName());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d4eb82102fd29c5a", + "equalIndicator/v1": "acda0da238a00557135bca615ca7d9653bcd51a776b36af6e47775380c421267" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1127, + "startColumn": 6, + "charOffset": 40377, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1125, + "startColumn": 1, + "charOffset": 40342, + "charLength": 172, + "snippet": { + "text": "\tlua_pushnumber(L, tries);\r\n\r\n\tif (scriptInterface.protectedCall(L, 3, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d3ca2479e3c733fe", + "equalIndicator/v1": "ace64ca0c54b349e005d10c54cf297f3b2bf62a8c93e290daafb75070705100f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5195, + "startColumn": 57, + "charOffset": 153196, + "charLength": 8, + "snippet": { + "text": "attacked" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5193, + "startColumn": 1, + "charOffset": 153135, + "charLength": 213, + "snippet": { + "text": "}\r\n\r\nvoid Player::addUnjustifiedDead(std::shared_ptr attacked) {\r\n\tif (hasFlag(PlayerFlags_t::NotGainInFight) || attacked == getPlayer() || g_game().getWorldType() == WORLD_TYPE_PVP_ENFORCED) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3c65e82d56b161f3", + "equalIndicator/v1": "acfa33fa58efb4bdff44e9efa96c1078453bd327cea6a18b2bd6842849e44b7a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1149, + "startColumn": 27, + "charOffset": 33796, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1147, + "startColumn": 1, + "charOffset": 33689, + "charLength": 127, + "snippet": { + "text": "\tvoid sendCreatureReload(std::shared_ptr creature) {\r\n\t\tif (client) {\r\n\t\t\tclient->reloadCreature(creature);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d66588bfb8e36e99", + "equalIndicator/v1": "acfc958dd3db482761acb0847865497be93456bda94fa78e6c928c8de942ced7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 134, + "startColumn": 21, + "charOffset": 3419, + "charLength": 23, + "snippet": { + "text": "luaPartyGetInviteeCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 132, + "startColumn": 1, + "charOffset": 3394, + "charLength": 159, + "snippet": { + "text": "}\r\n\r\nint PartyFunctions::luaPartyGetInviteeCount(lua_State* L) {\r\n\t// party:getInviteeCount()\r\n\tstd::shared_ptr party = getUserdataShared(L, 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dd28c6607a686cd3", + "equalIndicator/v1": "ad12e1e9e72f67c9684aa4ec36c1946d26e0bc3b3e6e569577ad273b7086f293" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'guild' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'guild' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9828, + "startColumn": 50, + "charOffset": 343683, + "charLength": 5, + "snippet": { + "text": "guild" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9826, + "startColumn": 1, + "charOffset": 343629, + "charLength": 90, + "snippet": { + "text": "}\r\n\r\nvoid Game::addGuild(const std::shared_ptr guild) {\r\n\tif (!guild) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b90e623d5abb5df4", + "equalIndicator/v1": "ad35356c0ccacc312a619e6b5139512681e3cb5820b360034ced3de9099430bf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1673, + "startColumn": 27, + "charOffset": 58714, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1671, + "startColumn": 1, + "charOffset": 58682, + "charLength": 159, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "747a946a292800ad", + "equalIndicator/v1": "ad4423d6d22176e63f0ac86ee3672f1ff63fe70b3438a5dca0a8914ad9302ffd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 211, + "startColumn": 54, + "charOffset": 7514, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 209, + "startColumn": 1, + "charOffset": 7357, + "charLength": 212, + "snippet": { + "text": "\t\tif (spell->conditionType == CONDITION_NONE) {\r\n\t\t\tg_logger().error(\"[Monsters::deserializeSpell] - \"\r\n\t\t\t \"{} condition is not set for: {}\",\r\n\t\t\t description, spell->name);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "94d640697421825d", + "equalIndicator/v1": "ad47cc66070521fecafc2a78297a0e1ac1ff02cbeac849a24b8ed644d4c54262" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1022, + "startColumn": 100, + "charOffset": 36965, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1020, + "startColumn": 1, + "charOffset": 36861, + "charLength": 255, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnGainExperience(std::shared_ptr player, std::shared_ptr target, uint64_t &exp, uint64_t rawExp) {\r\n\t// Player:onGainExperience(target, exp, rawExp)\r\n\t// rawExp gives the original exp which is not multiplied\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "34ca943a1588cb4e", + "equalIndicator/v1": "ad4ae00acf3f6d4d1747a0ff12948fad43912f12cf4447a1d00bd1ec1d59a720" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 224, + "startColumn": 2, + "charOffset": 6788, + "charLength": 15, + "snippet": { + "text": "lua_createtable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 222, + "startColumn": 1, + "charOffset": 6732, + "charLength": 117, + "snippet": { + "text": "\r\n\tconst auto &friendList = monster->getFriendList();\r\n\tlua_createtable(L, friendList.size(), 0);\r\n\r\n\tint index = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "33d3cc4c8a95809d", + "equalIndicator/v1": "adb60b1c13c6584baaa8bb8a41dd1c92ac884d06c6d1441b11cc25a0ea203e03" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 160, + "startColumn": 14, + "charOffset": 4667, + "charLength": 14, + "snippet": { + "text": "setFormulaVars" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 158, + "startColumn": 1, + "charOffset": 4516, + "charLength": 227, + "snippet": { + "text": "\tstd::shared_ptr condition = getUserdataShared(L, 1)->dynamic_self_cast();\r\n\tif (condition) {\r\n\t\tcondition->setFormulaVars(mina, minb, maxa, maxb);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8d9721d3c018689a", + "equalIndicator/v1": "adb90a58f25a5ea406637a6ad6452606d3d63121640c07d8dfcce54429c5db23" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '__FUNCTION__', which is a reserved identifier", + "markdown": "Declaration uses identifier '__FUNCTION__', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 12, + "startColumn": 1, + "charOffset": 395, + "charLength": 7, + "snippet": { + "text": "#ifndef" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10, + "startColumn": 1, + "charOffset": 379, + "charLength": 77, + "snippet": { + "text": "#pragma once\r\n\r\n#ifndef __FUNCTION__\r\n\t#define __FUNCTION__ __func__\r\n#endif\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e86d7e09b3820f86", + "equalIndicator/v1": "addbfb555556c9afa2c729a621e28e4ed8a9306f31d8bbdeb95f7883cf8d7d4d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2027, + "startColumn": 96, + "charOffset": 60088, + "charLength": 7, + "snippet": { + "text": "oldItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2025, + "startColumn": 1, + "charOffset": 59988, + "charLength": 216, + "snippet": { + "text": "}\r\n\r\nvoid Player::onUpdateContainerItem(std::shared_ptr container, std::shared_ptr oldItem, std::shared_ptr newItem) {\r\n\tif (oldItem != newItem) {\r\n\t\tonRemoveContainerItem(container, oldItem);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "49143d009bd30042", + "equalIndicator/v1": "ade267027c0f84167203e444cc4b53680da806422a1f9d6807219df047f05e18" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6001, + "startColumn": 94, + "charOffset": 191303, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5999, + "startColumn": 1, + "charOffset": 191205, + "charLength": 140, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendTradeItemRequest(const std::string &traderName, std::shared_ptr item, bool ack) {\r\n\tNetworkMessage msg;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e33ead68a6592f87", + "equalIndicator/v1": "ae186bca3b86fb0e07e3971d2760ddac6ec43640b44380ee4bff19504c2fc0fe" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 487, + "startColumn": 92, + "charOffset": 18419, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 485, + "startColumn": 1, + "charOffset": 18323, + "charLength": 332, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnMoveItem(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPos, const Position &toPos, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) const {\r\n\tif (!getScriptInterface()) {\r\n\t\tg_logger().error(\"script interface nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b6710043c5619627", + "equalIndicator/v1": "ae44223faf04ea3b24c576889572c0dd0bb1aef2a5b60e86b5ac656e194220d5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9775, + "startColumn": 46, + "charOffset": 342205, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9773, + "startColumn": 1, + "charOffset": 342155, + "charLength": 182, + "snippet": { + "text": "}\r\n\r\nvoid Game::addPlayer(std::shared_ptr player) {\r\n\tconst std::string &lowercase_name = asLowerCaseString(player->getName());\r\n\tmappedPlayerNames[lowercase_name] = player;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9dfe4c880beecf38", + "equalIndicator/v1": "ae4a5d156503c737faee0ca94512220e1d611da395d1d9ab85894ee9614a1777" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'operator flat_hash_map' must be marked explicit to avoid unintentional implicit conversions", + "markdown": "'operator flat_hash_map' must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 120, + "startColumn": 27, + "charOffset": 3452, + "charLength": 7, + "snippet": { + "text": "MapType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 118, + "startColumn": 1, + "charOffset": 3420, + "charLength": 80, + "snippet": { + "text": "\t}\r\n\r\n\texplicit(false) operator MapType() const {\r\n\t\treturn get();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f05dcf31b04503a3", + "equalIndicator/v1": "ae5417f71f8c594826694982dafc80ed6d8ac3b5dc97303d95f2b9297dc84c2e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/creaturecallback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 53, + "startColumn": 74, + "charOffset": 1697, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 51, + "startColumn": 1, + "charOffset": 1619, + "charLength": 123, + "snippet": { + "text": "}\r\n\r\nstd::string CreatureCallback::getCreatureClass(std::shared_ptr creature) {\r\n\tif (!creature) {\r\n\t\treturn \"\";\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "00c75da12f303c81", + "equalIndicator/v1": "ae6923ad229eb3b6d7e49a2b43723bb075beb87545af41b82ba40209c30ed19b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 575, + "startColumn": 62, + "charOffset": 15562, + "charLength": 12, + "snippet": { + "text": "statsPercent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 573, + "startColumn": 1, + "charOffset": 15475, + "charLength": 131, + "snippet": { + "text": "\r\n\t\t\tcase STAT_CAPACITY:\r\n\t\t\t\tstats[i] = static_cast(player->getCapacity() * (statsPercent[i] / 100.f));\r\n\t\t\t\tbreak;\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bfebbd47248881ba", + "equalIndicator/v1": "ae7028ae42f56dad00bb5dfc2d2f057f9343069cec58f527dde031946f65f668" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 14, + "charOffset": 1401, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 1297, + "charLength": 271, + "snippet": { + "text": "\tskull = mType->info.skull;\r\n\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();\r\n\tbaseSpeed = mType->getBaseSpeed();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1a000597b7acfff3", + "equalIndicator/v1": "ae7efc2e6bbef7bc541483a280918f41df15f6a259be44716baa0f4268eeb460" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotlocker.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 27, + "startColumn": 26, + "charOffset": 853, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 25, + "startColumn": 1, + "charOffset": 823, + "charLength": 168, + "snippet": { + "text": "}\r\n\r\nReturnValue DepotLocker::queryAdd(int32_t, const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr) {\r\n\treturn RETURNVALUE_NOTENOUGHROOM;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a1c781bbb681c105", + "equalIndicator/v1": "ae841e0098df173388d7c306af07d6d499ddd7c661d744155d00879480657db7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 690, + "startColumn": 15, + "charOffset": 22532, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 688, + "startColumn": 1, + "charOffset": 22492, + "charLength": 128, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 3.20f);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "127ed4119858a877", + "equalIndicator/v1": "ae96f96c331d8d8ffcf0adb77b677e285c56945e7de595be257ae943851a4011" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 634, + "startColumn": 67, + "charOffset": 17111, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 632, + "startColumn": 1, + "charOffset": 17040, + "charLength": 173, + "snippet": { + "text": "}\r\n\r\nvoid ConditionAttributes::updateAbsorbs(std::shared_ptr creature) const {\r\n\tfor (uint8_t i = 0; i < COMBAT_COUNT; i++) {\r\n\t\tauto value = getAbsorbByIndex(i);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c618cc67aa92d566", + "equalIndicator/v1": "ae9ca6131ab6750c1117492305cb5e7c75a8435f92ecc0422c9d696bee2397c1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 600, + "startColumn": 71, + "charOffset": 18191, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 598, + "startColumn": 1, + "charOffset": 18078, + "charLength": 226, + "snippet": { + "text": "\r\n\t\t\tif (it.abilities->statsPercent[s]) {\r\n\t\t\t\tplayer->setVarStats(static_cast(s), static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "56fafca9a30312c5", + "equalIndicator/v1": "aeca1b3f50a6d8867612f4cc8b3100a0abbd7a8bbff8a912a9b5c69c1407a2e5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2435, + "startColumn": 14, + "charOffset": 72452, + "charLength": 12, + "snippet": { + "text": "noneVocation" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2433, + "startColumn": 1, + "charOffset": 72322, + "charLength": 242, + "snippet": { + "text": "\t\t\tconst auto &noneVocation = g_vocations().getVocation(VOCATION_NONE);\r\n\t\t\thealthMax += noneVocation->getHPGain();\r\n\t\t\thealth += noneVocation->getHPGain();\r\n\t\t\tmanaMax += noneVocation->getManaGain();\r\n\t\t\tmana += noneVocation->getManaGain();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "10a4b670c485d7fa", + "equalIndicator/v1": "aecdfc181d309c46d00a7ae8f396ed722552558c5856ddb1d2cfd6ee73042ede" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1107, + "startColumn": 7, + "charOffset": 39656, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1105, + "startColumn": 1, + "charOffset": 39644, + "charLength": 155, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnGainSkillTries - \"\r\n\t\t \"Player {} skill {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3a782457e6b25212", + "equalIndicator/v1": "aed0c0120cef6cc723700fe00225db224dd6f6696437b3ce0d81e239fc47d5c2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3000, + "startColumn": 2, + "charOffset": 91569, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2998, + "startColumn": 1, + "charOffset": 91512, + "charLength": 149, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseGreet(NetworkMessage &msg) {\r\n\tuint32_t npcId = msg.get();\r\n\tg_game().playerNpcGreet(player->getID(), npcId);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a3fa32ea22a56bb0", + "equalIndicator/v1": "aed92ffafd46668b80c21d513ee3ec47c0b708772cf2c31022db6194cbb4dac4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 369, + "startColumn": 27, + "charOffset": 10630, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 367, + "startColumn": 1, + "charOffset": 10598, + "charLength": 129, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\r\n\tenv->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "77b5755aa994f4b8", + "equalIndicator/v1": "aeea0e7a6f2124d85f4505f78bfa06572a53b42d6ed7cd5a488fca757c3b7e97" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/metrics/metrics.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 191, + "startColumn": 2, + "charOffset": 7080, + "charLength": 20, + "snippet": { + "text": "DEFINE_LATENCY_CLASS" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 189, + "startColumn": 1, + "charOffset": 6974, + "charLength": 201, + "snippet": { + "text": "\tDEFINE_LATENCY_CLASS(query, \"query\", \"truncated_query\");\r\n\tDEFINE_LATENCY_CLASS(task, \"task\", \"task\");\r\n\tDEFINE_LATENCY_CLASS(lock, \"lock\", \"scope\");\r\n\r\n\tconst std::vector latencyNames {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3e38cf7d936efdab", + "equalIndicator/v1": "af0b2266b278dd6a688fd3fd47bd1c056b23191518afd959a8e3d57d04a4a25d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/thread/thread_pool.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 29, + "startColumn": 32, + "charOffset": 956, + "charLength": 16, + "snippet": { + "text": "getNumberOfCores" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 27, + "startColumn": 1, + "charOffset": 881, + "charLength": 155, + "snippet": { + "text": "\r\nThreadPool::ThreadPool(Logger &logger) :\r\n\tBS::thread_pool(std::max(getNumberOfCores(), DEFAULT_NUMBER_OF_THREADS)), logger(logger) {\r\n\tstart();\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "94206e61ce82d4c9", + "equalIndicator/v1": "af0c780a3197eaf23d011f8d98342a5804c8c60e32dbac3454b14d609472007a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 46, + "startColumn": 100, + "charOffset": 1901, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 44, + "startColumn": 1, + "charOffset": 1797, + "charLength": 176, + "snippet": { + "text": "}\r\n\r\nCombatDamage Combat::getCombatDamage(std::shared_ptr creature, std::shared_ptr target) const {\r\n\tCombatDamage damage;\r\n\tdamage.origin = params.origin;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c7a08d9db327c815", + "equalIndicator/v1": "af14612ea3b148bee2ab5a710df5fdc30317fd44875fff9b01b5a9bfc119ce5b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Pass by value and use std::move", + "markdown": "Pass by value and use std::move" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 124, + "startColumn": 44, + "charOffset": 3932, + "charLength": 17, + "snippet": { + "text": "const std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 122, + "startColumn": 1, + "charOffset": 3844, + "charLength": 175, + "snippet": { + "text": "class ScopedKV final : public KV {\r\npublic:\r\n\tScopedKV(Logger &logger, KVStore &rootKV, const std::string &prefix) :\r\n\t\tlogger(logger), rootKV_(rootKV), prefix_(prefix) { }\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "da817ae96b4d7d51", + "equalIndicator/v1": "af558eb809eb41389247d1bf6221f7fcd141ba1dd42fd29db6a3206ce52ce5bb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')", + "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2478, + "startColumn": 18, + "charOffset": 73734, + "charLength": 23, + "snippet": { + "text": "Player::getPercentLevel" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2476, + "startColumn": 1, + "charOffset": 73678, + "charLength": 169, + "snippet": { + "text": "\r\n\tif (nextLevelExp > currLevelExp) {\r\n\t\tlevelPercent = Player::getPercentLevel(experience - currLevelExp, nextLevelExp - currLevelExp);\r\n\t} else {\r\n\t\tlevelPercent = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3b98ab978600f729", + "equalIndicator/v1": "af71416114686ae14371af8830dd75d2e72998e21b5fe4d4302397d3fce6ce5e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 147, + "startColumn": 2, + "charOffset": 4080, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 145, + "startColumn": 1, + "charOffset": 4073, + "charLength": 120, + "snippet": { + "text": "\t}\r\n\r\n\tuint32_t count = getNumber(L, 3, 1);\r\n\tconst ItemType &it = Item::items[itemId];\r\n\tif (it.stackable) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b1a71f9e053b8060", + "equalIndicator/v1": "af719cf489615ea2989250557ead04c129692cf1f8672c7fbc8dabfe64673132" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5383, + "startColumn": 30, + "charOffset": 159190, + "charLength": 7, + "snippet": { + "text": "manaMax" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5381, + "startColumn": 1, + "charOffset": 159120, + "charLength": 160, + "snippet": { + "text": "\r\nuint32_t Player::getMaxMana() const {\r\n\treturn std::max(0, manaMax + varStats[STAT_MAXMANAPOINTS] + m_wheelPlayer->getStat(WheelStat_t::MANA));\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fe96767726a5db0a", + "equalIndicator/v1": "af7572f5bfb65b16577c116b9e2208272bd98b2da38a708bdd8a30f2f26fbc90" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1918, + "startColumn": 2, + "charOffset": 58361, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1916, + "startColumn": 1, + "charOffset": 58299, + "charLength": 222, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseTextWindow(NetworkMessage &msg) {\r\n\tuint32_t windowTextId = msg.get();\r\n\tconst std::string newText = msg.getString();\r\n\tg_game().playerWriteItem(player->getID(), windowTextId, newText);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3ac7d68a070d784c", + "equalIndicator/v1": "af8c182fa11295e5eef267c145c27c2ad7e8b2e02b1e6cb286314977d8d8e886" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 143, + "charOffset": 1926, + "charLength": 8, + "snippet": { + "text": "override" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 1707, + "charLength": 387, + "snippet": { + "text": "\tvoid removeThing(std::shared_ptr thing, uint32_t count) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "954923152d17ed1e", + "equalIndicator/v1": "af8cb0a7735b0445a523da1e2502244345f79f0e638363d3b67cb05324f44892" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?", + "markdown": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1101, + "startColumn": 7, + "charOffset": 29646, + "charLength": 25, + "snippet": { + "text": "Condition::startCondition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1099, + "startColumn": 1, + "charOffset": 29556, + "charLength": 150, + "snippet": { + "text": "\r\nbool ConditionRegeneration::startCondition(std::shared_ptr creature) {\r\n\tif (!Condition::startCondition(creature)) {\r\n\t\treturn false;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a8aa6e9d445c6c4c", + "equalIndicator/v1": "afa40049cb255c20bec923e7f20f8aabc6730903501bce97be5f9d3e4776f548" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 459, + "startColumn": 8, + "charOffset": 11414, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 457, + "startColumn": 1, + "charOffset": 11310, + "charLength": 198, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetElementType(lua_State* L) {\r\n\t// itemType:getElementType()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (!itemType) {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fee76af27f7ec76b", + "equalIndicator/v1": "afacc9071ef82f20ccd39634b33296084168a7f4e6e7016cf19a9c7a5ee0545b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3000, + "startColumn": 79, + "charOffset": 111474, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2998, + "startColumn": 1, + "charOffset": 111391, + "charLength": 334, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Game::findManagedContainer(std::shared_ptr player, bool &fallbackConsumed, ObjectCategory_t category, bool isLootContainer) {\r\n\tauto lootContainer = player->getManagedContainer(category, isLootContainer);\r\n\tif (!lootContainer && player->quickLootFallbackToMainContainer && !fallbackConsumed) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3ef7a6037553e6b4", + "equalIndicator/v1": "afb493aeaec1844e1b1b718da00b3f960f8a8993ede3f31593052363ec5e43c6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'c' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'c' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1530, + "startColumn": 53, + "charOffset": 45220, + "charLength": 1, + "snippet": { + "text": "c" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1528, + "startColumn": 1, + "charOffset": 45163, + "charLength": 126, + "snippet": { + "text": "}\r\n\r\nbool ProtocolGame::canSee(std::shared_ptr c) const {\r\n\tif (!c || !player || c->isRemoved()) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6c1df0c4fa2b1571", + "equalIndicator/v1": "afc7e90126be418558b1219884caf1e2519227b91cdef3a076772e9b242cf76d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 358, + "startColumn": 55, + "charOffset": 11651, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 356, + "startColumn": 1, + "charOffset": 11592, + "charLength": 179, + "snippet": { + "text": "}\r\n\r\nbool Weapon::executeUseWeapon(std::shared_ptr player, const LuaVariant &var) const {\r\n\t// onUseWeapon(player, var)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aa18fee78b149f21", + "equalIndicator/v1": "afcd1c5484c14c204205db4ca5fef0ae8170a0f177b798d3967d8016ccd95c47" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 294, + "startColumn": 18, + "charOffset": 7987, + "charLength": 21, + "snippet": { + "text": "getElementDamageValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 292, + "startColumn": 1, + "charOffset": 7943, + "charLength": 96, + "snippet": { + "text": "\t\treturn elementType;\r\n\t}\r\n\tvirtual int16_t getElementDamageValue() const override;\r\n\r\nprivate:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "18354faf39f8cbb4", + "equalIndicator/v1": "afe051aa93dd63bb7d38dcf35b3572e58052daed0462e2d46d2bc5218f480028" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 159, + "startColumn": 12, + "charOffset": 4273, + "charLength": 7, + "snippet": { + "text": "uint8_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 157, + "startColumn": 1, + "charOffset": 4145, + "charLength": 222, + "snippet": { + "text": "void Dispatcher::mergeAsyncEvents() {\r\n\tconstexpr uint8_t start = static_cast(TaskGroup::GenericParallel);\r\n\tconstexpr uint8_t end = static_cast(TaskGroup::Last);\r\n\r\n\tfor (const auto &thread : threads) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e38bb690bc0a6448", + "equalIndicator/v1": "afe526d061a73be86760d781dd3b3642a86507e8f22cddadbb4409ef2b532b6d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 289, + "startColumn": 10, + "charOffset": 7606, + "charLength": 15, + "snippet": { + "text": "getWeaponDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 287, + "startColumn": 1, + "charOffset": 7468, + "charLength": 474, + "snippet": { + "text": "\tbool useWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target) const override;\r\n\r\n\tint32_t getWeaponDamage(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, bool maxDamage = false) const override;\r\n\tint32_t getElementDamage(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) const override;\r\n\tCombatType_t getElementType() const override {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "951e5b5c7faa7498", + "equalIndicator/v1": "b00468f6816e973a6e8759f0a2e2df4e27f3a57c4b06f5c0efcef8cd0e904a64" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'lastHitCreature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'lastHitCreature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4882, + "startColumn": 56, + "charOffset": 145883, + "charLength": 15, + "snippet": { + "text": "lastHitCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4880, + "startColumn": 1, + "charOffset": 145823, + "charLength": 122, + "snippet": { + "text": "}\r\n\r\nbool Player::lastHitIsPlayer(std::shared_ptr lastHitCreature) {\r\n\tif (!lastHitCreature) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b860ed1eb896cb1d", + "equalIndicator/v1": "b02cba2a0322550a497a73cad09a705ee6de531343326ec261f9f959d43d1160" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1077, + "startColumn": 47, + "charOffset": 41061, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1075, + "startColumn": 1, + "charOffset": 40960, + "charLength": 167, + "snippet": { + "text": "\tgetScriptInterface()->pushFunction(getScriptId());\r\n\r\n\tLuaScriptInterface::pushUserdata(L, monster);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Monster\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9c3d3f74e6815148", + "equalIndicator/v1": "b0495d6f018824dfce61d42734404cb7e894ff5b012b788e282b34f083e9357d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 576, + "startColumn": 7, + "charOffset": 22011, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 574, + "startColumn": 1, + "charOffset": 21827, + "charLength": 336, + "snippet": { + "text": "\r\nbool EventCallback::playerOnMoveCreature(std::shared_ptr player, std::shared_ptr creature, const Position &fromPosition, const Position &toPosition) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnMoveCreature - \"\r\n\t\t \"Player {} creature {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a69c546e8dbd9e92", + "equalIndicator/v1": "b04d5db42b428fbbfb068af35621b81b69bd6b5d83bacd7be94826c51646a4fb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 418, + "startColumn": 47, + "charOffset": 14450, + "charLength": 9, + "snippet": { + "text": "totalCost" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 416, + "startColumn": 1, + "charOffset": 14355, + "charLength": 263, + "snippet": { + "text": "\t\t\t\tg_game().addMoney(player, totalCost);\r\n\t\t\t}\r\n\t\t\tg_metrics().addCounter(\"balance_increase\", totalCost, { { \"player\", player->getName() }, { \"context\", \"npc_sale\" } });\r\n\t\t} else {\r\n\t\t\tstd::shared_ptr newItem = Item::CreateItem(getCurrency(), totalCost);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8d4bb227491c47f7", + "equalIndicator/v1": "b04e8999924fc4c1ef11c6ae62d89dfdf64c5fc7577c0c835dee8dd6aa62880d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3477, + "startColumn": 13, + "charOffset": 105244, + "charLength": 9, + "snippet": { + "text": "slotIndex" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3475, + "startColumn": 1, + "charOffset": 105115, + "charLength": 191, + "snippet": { + "text": "\t\t\t\t}\r\n\t\t\t} else if (queryAdd(slotIndex, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) { // empty slot\r\n\t\t\t\tindex = slotIndex;\r\n\t\t\t\t*destItem = nullptr;\r\n\t\t\t\treturn getPlayer();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e4adf84e5ae229f4", + "equalIndicator/v1": "b0503d137c2b186eb1b8275b204f8234535cf37d173cdf2a5c8fe3b9bd22e5ce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'actor' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'actor' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1944, + "startColumn": 257, + "charOffset": 75955, + "charLength": 5, + "snippet": { + "text": "actor" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1942, + "startColumn": 1, + "charOffset": 75694, + "charLength": 444, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::internalMoveItem(std::shared_ptr fromCylinder, std::shared_ptr toCylinder, int32_t index, std::shared_ptr item, uint32_t count, std::shared_ptr* movedItem, uint32_t flags /*= 0*/, std::shared_ptr actor /*=nullptr*/, std::shared_ptr tradeItem /* = nullptr*/, bool checkTile /* = true*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (fromCylinder == nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3a71eb2003383527", + "equalIndicator/v1": "b06985432618a591286f3c66c8ac829d732a9004b27f318556e6febfc6336c70" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1134, + "startColumn": 2, + "charOffset": 40599, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1132, + "startColumn": 1, + "charOffset": 40592, + "charLength": 46, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a278d7224541af57", + "equalIndicator/v1": "b09789129abb6852a79308d7b8628cd00ae4bc8345a49b30a0ede46b91ab1e51" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 295, + "startColumn": 15, + "charOffset": 7651, + "charLength": 12, + "snippet": { + "text": "std::tolower" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 293, + "startColumn": 1, + "charOffset": 7595, + "charLength": 85, + "snippet": { + "text": "\t\t\t\tcapitalizeNext = false;\r\n\t\t\t} else {\r\n\t\t\t\tresult += std::tolower(ch);\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cbbb4b52890c1509", + "equalIndicator/v1": "b09a7d26ff935fbdf6b161533c39a4dfafdf96522bdc49400518e883eda0112d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_classification_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 32, + "startColumn": 2, + "charOffset": 1142, + "charLength": 18, + "snippet": { + "text": "ItemClassification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 30, + "startColumn": 1, + "charOffset": 956, + "charLength": 326, + "snippet": { + "text": "int ItemClassificationFunctions::luaItemClassificationAddTier(lua_State* L) {\r\n\t// itemClassification:addTier(id, core, regularPrice, convergenceFusionPrice, convergenceTransferPrice)\r\n\tItemClassification* itemClassification = getUserdata(L, 1);\r\n\tif (itemClassification) {\r\n\t\titemClassification->addTier(\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c85794ae5e1ad7c0", + "equalIndicator/v1": "b0c33fb1280b1952d26a32e19284e80b154d16816ffdcd8b3d070a0518207f30" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 299, + "startColumn": 7, + "charOffset": 10730, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 297, + "startColumn": 1, + "charOffset": 10718, + "charLength": 158, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventCreatureOnTargetCombat - \"\r\n\t\t \"Creature {} target {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4a3f6f0b9eb32b5c", + "equalIndicator/v1": "b10ec3bf40c6bcfd0cad6b133632ba8998ced1db02380d75f263e95ed1cd65dc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 488, + "startColumn": 7, + "charOffset": 17304, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 486, + "startColumn": 1, + "charOffset": 17292, + "charLength": 205, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPartyOnDisband - Party leader {}] Call stack \"\r\n\t\t \"overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1bd2eeb6e752673f", + "equalIndicator/v1": "b13d081deab60a133e72bf25fbb59c511b51beb378ae9576a1682d016dfc51ec" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1027, + "startColumn": 8, + "charOffset": 29866, + "charLength": 7, + "snippet": { + "text": "toupper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1025, + "startColumn": 1, + "charOffset": 29816, + "charLength": 78, + "snippet": { + "text": "\tfor (char &i : str) {\r\n\t\tif (i != ' ') {\r\n\t\t\ti = toupper(i);\r\n\t\t\tbreak;\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e87f06c34ea2ff73", + "equalIndicator/v1": "b148204d73b8be38263daed7ecec1488b0a49e70e05d055e09241730f991f3cc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 47, + "startColumn": 2, + "charOffset": 1193, + "charLength": 13, + "snippet": { + "text": "getUnlockedKV" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 45, + "startColumn": 1, + "charOffset": 1114, + "charLength": 225, + "snippet": { + "text": "\r\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\r\n\tgetUnlockedKV()->set(badge.m_name, toSaveTimeStamp);\r\n\tm_badgesUnlocked.emplace_back(badge, toSaveTimeStamp);\r\n\tm_badgesUnlocked.shrink_to_fit();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2078c43a2b1c4faa", + "equalIndicator/v1": "b183c2841005edbe1ef7a58092949ced768a4fb1afba2b6df1ee50f722e36b35" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3576, + "startColumn": 39, + "charOffset": 110563, + "charLength": 27, + "snippet": { + "text": "Weapons::getMaxWeaponDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3574, + "startColumn": 1, + "charOffset": 110270, + "charLength": 532, + "snippet": { + "text": "\t\t\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor, true) * player->getVocation()->distDamageMultiplier);\r\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\r\n\t\t\t\tmaxDamage += static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue - weapon->getAttack() + it.abilities->elementDamage, attackFactor, true) * player->getVocation()->distDamageMultiplier);\r\n\t\t\t}\r\n\t\t\tmsg.add(maxDamage >> 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "622e75b601e9bc56", + "equalIndicator/v1": "b1886cd82ee8f119bf1ca23ff1509df6a994ad1e81c1454d26b85d62e654a51e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1011, + "startColumn": 67, + "charOffset": 38433, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1009, + "startColumn": 1, + "charOffset": 38362, + "charLength": 281, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnStorageUpdate(std::shared_ptr player, const uint32_t key, const int32_t value, int32_t oldValue, uint64_t currentTime) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::eventOnStorageUpdate - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7a8e0347998360f9", + "equalIndicator/v1": "b190e22d4d4a87502706bfbf0aa284a01ede8bc67157ed6085de835fffeea304" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 247, + "startColumn": 59, + "charOffset": 7492, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 245, + "startColumn": 1, + "charOffset": 7429, + "charLength": 210, + "snippet": { + "text": "}\r\n\r\nReturnValue Combat::canDoCombat(std::shared_ptr caster, std::shared_ptr tile, bool aggressive) {\r\n\tif (tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) {\r\n\t\treturn RETURNVALUE_NOTENOUGHROOM;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eaa02a07e638a511", + "equalIndicator/v1": "b1d8b9271e14ca350a0cff77f4e2734cb0ec08d08bb240a2cb88a3f18af49245" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'podium' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'podium' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7155, + "startColumn": 59, + "charOffset": 224037, + "charLength": 6, + "snippet": { + "text": "podium" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7153, + "startColumn": 1, + "charOffset": 223974, + "charLength": 225, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendPodiumWindow(std::shared_ptr podium, const Position &position, uint16_t itemId, uint8_t stackpos) {\r\n\tif (!podium || oldProtocol) {\r\n\t\tg_logger().error(\"[{}] item is nullptr\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f293ab0ffd3c5cd4", + "equalIndicator/v1": "b1fdfe37b250ee28527a9fec3ff11428f24ee7cb3e59b1e8ebec3d2e17367828" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when declaring iterators", + "markdown": "Use auto when declaring iterators" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 214, + "startColumn": 3, + "charOffset": 6081, + "charLength": 42, + "snippet": { + "text": "std::map::iterator" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 212, + "startColumn": 1, + "charOffset": 6022, + "charLength": 307, + "snippet": { + "text": "\r\n\tif (item->hasAttribute(ItemAttribute_t::ACTIONID)) {\r\n\t\tstd::map::iterator it = actionIdMap.find(item->getAttribute(ItemAttribute_t::ACTIONID));\r\n\t\tif (it != actionIdMap.end()) {\r\n\t\t\tstd::list> moveEventList = it->second.moveEvent[eventType];\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a10513ccd1719d93", + "equalIndicator/v1": "b21f2d62f433aa3929cb4d1d0a954d57b0c762e83adf3bdd1c4ce0781f5da83a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1089, + "startColumn": 20, + "charOffset": 39164, + "charLength": 3, + "snippet": { + "text": "exp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1087, + "startColumn": 1, + "charOffset": 39090, + "charLength": 135, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r\n\tlua_pushnumber(L, exp);\r\n\r\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5da4af7447beee92", + "equalIndicator/v1": "b2405a0fe157e1841f71932fe9b6bd7988e6a78af0187e4e398b570381ee4b7b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2196, + "startColumn": 14, + "charOffset": 65818, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2194, + "startColumn": 1, + "charOffset": 65741, + "charLength": 156, + "snippet": { + "text": "\r\n\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\r\n\tremoveIcon(\"forge\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "67ade26b2aa4b6a4", + "equalIndicator/v1": "b25e244e6c8cc21c04ad10c9f2f34ed73947f2d683e8cad4f98d280f13d0cefa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'initDoubleValue' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'initDoubleValue' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 21, + "startColumn": 52, + "charOffset": 729, + "charLength": 12, + "snippet": { + "text": "const double" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 19, + "startColumn": 1, + "charOffset": 506, + "charLength": 335, + "snippet": { + "text": "\tCustomAttribute(const std::string &initStringKey, const int64_t initInt64Value);\r\n\tCustomAttribute(const std::string &initStringKey, const std::string &initStringValue);\r\n\tCustomAttribute(const std::string &initStringKey, const double initDoubleValue);\r\n\tCustomAttribute(const std::string &initStringKey, const bool initBoolValue);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b71746026567b5f1", + "equalIndicator/v1": "b294b22d6c88b21ece400e26394e055cee580a76e9f58891cd1a9b50f038c81a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 285, + "startColumn": 88, + "charOffset": 8813, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 283, + "startColumn": 1, + "charOffset": 8721, + "charLength": 188, + "snippet": { + "text": "}\r\n\r\nbool Combat::isInPvpZone(std::shared_ptr attacker, std::shared_ptr target) {\r\n\treturn attacker->getZoneType() == ZONE_PVP && target->getZoneType() == ZONE_PVP;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c931ce83ed72e3a0", + "equalIndicator/v1": "b29568ac747c938549aa0b9f13e4cbca2b08e361b2d7acc4a84d73df6afb4d20" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: n, d", + "markdown": "Constructor does not initialize these fields: n, d" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 15, + "startColumn": 6, + "charOffset": 470, + "charLength": 3, + "snippet": { + "text": "RSA" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 13, + "startColumn": 1, + "charOffset": 434, + "charLength": 92, + "snippet": { + "text": "#include \"security/rsa.hpp\"\r\n\r\nRSA::RSA(Logger &logger) :\r\n\tlogger(logger) {\r\n\tmpz_init(n);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8722b532ea120822", + "equalIndicator/v1": "b2c26d3b2468eb678865433fbab82fbe33b7058982dffe6f10d048bbc002a3cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/rewardchest.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 36, + "startColumn": 19, + "charOffset": 1121, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 34, + "startColumn": 1, + "charOffset": 1098, + "charLength": 207, + "snippet": { + "text": "}\r\n\r\nvoid RewardChest::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tauto parentLocked = m_parent.lock();\r\n\tif (parentLocked) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0d0a17b1fba6910e", + "equalIndicator/v1": "b2c52c7ad096e2523b3e70d5e0c81e87b4991692bb330a02f1d4e04995ccdb53" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 193, + "startColumn": 7, + "charOffset": 7032, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 191, + "startColumn": 1, + "charOffset": 7020, + "charLength": 112, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"{} - \"\r\n\t\t \"Position {}\"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "645ec026d2a7b36d", + "equalIndicator/v1": "b2c55e372e11133f91b85b0c744e94d9c84158f91386cc76683a3e4677909eff" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 198, + "startColumn": 8, + "charOffset": 4994, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 196, + "startColumn": 1, + "charOffset": 4908, + "charLength": 198, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsKey(lua_State* L) {\r\n\t// itemType:isKey()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isKey());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "754369d188779ed3", + "equalIndicator/v1": "b2e00dbbd5474a3fdca363e39e584c3840f750a175b4ae7539f10f76fae601bb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 18, + "startColumn": 14, + "charOffset": 512, + "charLength": 4, + "snippet": { + "text": "name" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 16, + "startColumn": 1, + "charOffset": 462, + "charLength": 138, + "snippet": { + "text": "struct VIPGroup {\r\n\tuint8_t id = 0;\r\n\tstd::string name = \"\";\r\n\tbool customizable = false;\r\n\tphmap::flat_hash_set vipGroupGuids;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "78f269a0ac75bb7e", + "equalIndicator/v1": "b31987475bb72c85bd720122ea7fa9267d2d1f882934c573b6257735a2c416ba" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7244, + "startColumn": 48, + "charOffset": 216504, + "charLength": 4, + "snippet": { + "text": "cost" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7242, + "startColumn": 1, + "charOffset": 216436, + "charLength": 165, + "snippet": { + "text": "\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tg_metrics().addCounter(\"balance_decrease\", cost, { { \"player\", getName() }, { \"context\", \"forge_fuse\" } });\r\n\t\t\t\thistory.cost = cost;\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "db77c7b9bce4b718", + "equalIndicator/v1": "b330ed0530a69ec58482b2d3ff70b9463eb74fa5f11673039e809a794b96c40a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 764, + "startColumn": 6, + "charOffset": 29393, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 762, + "startColumn": 1, + "charOffset": 29357, + "charLength": 179, + "snippet": { + "text": "\tlua_pushnumber(L, rawExp);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 4, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "44da2ba15a4f4bb8", + "equalIndicator/v1": "b33736d86b67eb897ce07a8e3881f633612138797e35d39513ab31906715e04d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2444, + "startColumn": 53, + "charOffset": 65495, + "charLength": 6, + "snippet": { + "text": "Player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2442, + "startColumn": 1, + "charOffset": 65350, + "charLength": 226, + "snippet": { + "text": "int PlayerFunctions::luaPlayerHasFamiliar(lua_State* L) {\r\n\t// player:hasFamiliar(lookType)\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (player) {\r\n\t\tuint16_t lookType = getNumber(L, 2);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b527efc5c6fabecb", + "equalIndicator/v1": "b346ccd03c74a58840190d472188907e705ddc85ac668866a1ddb2571a01f3a5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 809, + "startColumn": 4, + "charOffset": 22029, + "charLength": 4, + "snippet": { + "text": "else" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 807, + "startColumn": 1, + "charOffset": 21963, + "charLength": 96, + "snippet": { + "text": "\tif (player) {\r\n\t\tlua_pushnumber(L, player->getSkullTicks());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "544c6f1b75eb68e7", + "equalIndicator/v1": "b34eee0356b1bdee2e63461f0eb24d424c7a5ef56a0bfd90b1cceb1da21709ef" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 298, + "startColumn": 7, + "charOffset": 11074, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 296, + "startColumn": 1, + "charOffset": 10969, + "charLength": 326, + "snippet": { + "text": "\r\nvoid EventCallback::partyOnShareExperience(std::shared_ptr party, uint64_t &exp) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"Party leader {}. Call stack overflow. Too many lua script calls being nested.\", party->getLeader() ? party->getLeader()->getName() : \"unknown\");\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4aeb66b366a092a5", + "equalIndicator/v1": "b35a5da8f474e3312e46c71be1e0900bbfd0df39d60166b71efc423c14635a1a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'callback' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'callback' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/events_callbacks.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 52, + "startColumn": 19, + "charOffset": 1539, + "charLength": 36, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 50, + "startColumn": 1, + "charOffset": 1450, + "charLength": 145, + "snippet": { + "text": "\t * @param callback Pointer to the EventCallback object to add.\r\n\t */\r\n\tvoid addCallback(const std::shared_ptr callback);\r\n\r\n\t/**\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3e8688d59c812630", + "equalIndicator/v1": "b364a213dede21b7d791051da4d8b979e0ec0ce0fa707586138355ebff2b4de0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 271, + "startColumn": 53, + "charOffset": 7565, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 269, + "startColumn": 1, + "charOffset": 7508, + "charLength": 122, + "snippet": { + "text": "}\r\n\r\nbool House::transferToDepot(std::shared_ptr player) const {\r\n\tif (townId == 0 || !player) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a6878e0b54ddb495", + "equalIndicator/v1": "b371442d6ebc74774b823254408173134afc9952b0819ea195a9a9e89a98914e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 679, + "startColumn": 98, + "charOffset": 26058, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 677, + "startColumn": 1, + "charOffset": 25956, + "charLength": 259, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::playerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeRequest - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cda02686c0457c10", + "equalIndicator/v1": "b3d4ded7be497a384199e4b6a47f621a29f21d38823086945ed6e1cf49ba4ec1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6402, + "startColumn": 64, + "charOffset": 202374, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6400, + "startColumn": 1, + "charOffset": 202306, + "charLength": 174, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendPartyPlayerMana(std::shared_ptr target, uint8_t manaPercent) {\r\n\tuint32_t cid = target->getID();\r\n\tif (!knownCreatureSet.contains(cid)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1a567c763be66043", + "equalIndicator/v1": "b3dc1a004d686251ab23d99bad7beb629d75bd81e2978d2429dd849fd860d279" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'newParty' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'newParty' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 376, + "startColumn": 13, + "charOffset": 9922, + "charLength": 8, + "snippet": { + "text": "newParty" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 374, + "startColumn": 1, + "charOffset": 9857, + "charLength": 123, + "snippet": { + "text": "\r\n\tvoid setParty(std::shared_ptr newParty) {\r\n\t\tm_party = newParty;\r\n\t}\r\n\tstd::shared_ptr getParty() const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ce6b198a6d1bfb35", + "equalIndicator/v1": "b3df7ecf4f7fdd057548030d46a35941a2e6142bc319a3f76577571e96aca697" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2630, + "startColumn": 29, + "charOffset": 99410, + "charLength": 11, + "snippet": { + "text": "removeCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2628, + "startColumn": 1, + "charOffset": 99240, + "charLength": 213, + "snippet": { + "text": "\t\t\tconst uint32_t removeCount = std::ceil(money / static_cast(worth));\r\n\t\t\taddMoney(cylinder, (worth * removeCount) - money, flags);\r\n\t\t\tinternalRemoveItem(item, removeCount);\r\n\t\t\treturn true;\r\n\t\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6bf63b913db1ea79", + "equalIndicator/v1": "b3e3498267d7e8905ddc46f8c4874dc01ca62192e9aea1c5eef5d86434d55a24" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 949, + "startColumn": 63, + "charOffset": 30356, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 947, + "startColumn": 1, + "charOffset": 30289, + "charLength": 191, + "snippet": { + "text": "}\r\n\r\nbool InstantSpell::executeCastSpell(std::shared_ptr creature, const LuaVariant &var) const {\r\n\t// onCastSpell(creature, var)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2f36700443a4e20d", + "equalIndicator/v1": "b44a08071ca197738f9cd1c9a00f5025f0532f69377ffc6fce16e07a3894de84" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 544, + "startColumn": 7, + "charOffset": 16461, + "charLength": 9, + "snippet": { + "text": "setParent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 542, + "startColumn": 1, + "charOffset": 16449, + "charLength": 149, + "snippet": { + "text": "\t}\r\n\r\n\tvoid setParent(std::weak_ptr cylinder) override final {\r\n\t\tconst auto oldGroundSpeed = walk.groundSpeed;\r\n\t\twalk.groundSpeed = 150;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dbd86e22990e7390", + "equalIndicator/v1": "b4693e63e115377efc33ff4a343b69163411ab3aa4492c1c70e97b1dd239df23" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'", + "markdown": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 107, + "startColumn": 11, + "charOffset": 2622, + "charLength": 4, + "snippet": { + "text": "Tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 105, + "startColumn": 1, + "charOffset": 2544, + "charLength": 109, + "snippet": { + "text": "\tTile(uint16_t x, uint16_t y, uint8_t z) :\r\n\t\ttilePos(x, y, z) { }\r\n\tvirtual ~Tile() {};\r\n\r\n\t// non-copyable\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1703faaf0983e531", + "equalIndicator/v1": "b4700d4013d2093460e52c918cdfd19c57c3dd2e124e192d1f24510fac5d9ba9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 745, + "startColumn": 14, + "charOffset": 25828, + "charLength": 8, + "snippet": { + "text": "password" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 743, + "startColumn": 1, + "charOffset": 25725, + "charLength": 151, + "snippet": { + "text": "\tstd::string sessionKey = msg.getString();\r\n\tstd::string accountDescriptor = sessionKey;\r\n\tstd::string password = \"\";\r\n\r\n\tif (authType != \"session\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bc44bc011fe50475", + "equalIndicator/v1": "b4b0b680968915e50ab2ed17a668259758321a787a5a48d52d04657f5402a4b1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 153, + "startColumn": 45, + "charOffset": 4061, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 151, + "startColumn": 1, + "charOffset": 4012, + "charLength": 102, + "snippet": { + "text": "}\r\n\r\nbool BedItem::sleep(std::shared_ptr player) {\r\n\tif (house == nullptr) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4e018670f1cff9f7", + "equalIndicator/v1": "b4ce5efc294e799aa6247d6eb0b3f9d97a93036abba197a1037d1f65f70f7b6f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 739, + "startColumn": 3, + "charOffset": 20506, + "charLength": 7, + "snippet": { + "text": "int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 737, + "startColumn": 1, + "charOffset": 20497, + "charLength": 129, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tint32_t houseId = pugi::cast(houseIdAttribute.value());\r\n\r\n\t\tstd::shared_ptr house = getHouse(houseId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bb5e89db5e42ded5", + "equalIndicator/v1": "b4ed3c79778f2593accc9e56598493d58fb4e1ba816f5fe2f3071f80ba34652b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 154, + "startColumn": 22, + "charOffset": 4902, + "charLength": 6, + "snippet": { + "text": "scoped" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 152, + "startColumn": 1, + "charOffset": 4875, + "charLength": 207, + "snippet": { + "text": "\t}\r\n\r\n\tstd::shared_ptr scoped(const std::string &scope) override final {\r\n\t\tlogger.trace(\"ScopedKV::scoped({})\", buildKey(scope));\r\n\t\treturn std::make_shared(logger, rootKV_, buildKey(scope));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "281280c7441739bc", + "equalIndicator/v1": "b5016e1b5112050b7c77119417db8cb18dac95777bae6bcc9ff1ebe4f9e428b5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1125, + "startColumn": 50, + "charOffset": 33121, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1123, + "startColumn": 1, + "charOffset": 33063, + "charLength": 102, + "snippet": { + "text": "\t\t}\r\n\t}\r\n\tvoid sendCreatureTurn(std::shared_ptr creature) {\r\n\t\tif (!creature) {\r\n\t\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "06d34e024d30f2c4", + "equalIndicator/v1": "b50ea0961e4bb7bbe72f259fbf938c5f9dd130f69689ee52693e06cf5747952e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2387, + "startColumn": 54, + "charOffset": 70547, + "charLength": 3, + "snippet": { + "text": "exp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2385, + "startColumn": 1, + "charOffset": 70409, + "charLength": 235, + "snippet": { + "text": "\tif (sendText) {\r\n\t\tg_metrics().addCounter(\"player_experience_raw\", rawExp, attrs);\r\n\t\tg_metrics().addCounter(\"player_experience_actual\", exp, attrs);\r\n\t} else {\r\n\t\tg_metrics().addCounter(\"player_experience_bonus_raw\", rawExp, attrs);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f113ca6765d8e625", + "equalIndicator/v1": "b5357044e9478cb1b04a21bd465f434f451a4c79e27715046cdefeb603804da6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 47, + "startColumn": 2, + "charOffset": 1193, + "charLength": 15, + "snippet": { + "text": "getUnlockedKV()" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 45, + "startColumn": 1, + "charOffset": 1114, + "charLength": 225, + "snippet": { + "text": "\r\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\r\n\tgetUnlockedKV()->set(badge.m_name, toSaveTimeStamp);\r\n\tm_badgesUnlocked.emplace_back(badge, toSaveTimeStamp);\r\n\tm_badgesUnlocked.shrink_to_fit();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bed7edc8216e86a0", + "equalIndicator/v1": "b559afe32148dd9c48f64e15e5da1ee184b5c0644a27bf1b4b808030a3847612" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 63, + "startColumn": 68, + "charOffset": 1861, + "charLength": 6, + "snippet": { + "text": "action" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 61, + "startColumn": 1, + "charOffset": 1789, + "charLength": 168, + "snippet": { + "text": "}\r\n\r\nbool Actions::registerLuaUniqueEvent(const std::shared_ptr action) {\r\n\tauto uniqueIdVector = action->getUniqueIdsVector();\r\n\tif (uniqueIdVector.empty()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "86d52fc9569c886d", + "equalIndicator/v1": "b57b7a91b176b3350292e37dd7f71e3bfea0fe7851a184314252bcdc259561e6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 865, + "startColumn": 2, + "charOffset": 39340, + "charLength": 7, + "snippet": { + "text": "Slots_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 863, + "startColumn": 1, + "charOffset": 39322, + "charLength": 106, + "snippet": { + "text": "\r\n\t// inventory\r\n\tSlots_t slot = static_cast(pos.y);\r\n\treturn player->getInventoryItem(slot);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8f0597c1c71b3687", + "equalIndicator/v1": "b5859a26a781f473044c777ebec9115d4d023690331534d1845a38b9eec33e98" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1389, + "startColumn": 45, + "charOffset": 42089, + "charLength": 7, + "snippet": { + "text": "dirList" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1387, + "startColumn": 1, + "charOffset": 41948, + "charLength": 183, + "snippet": { + "text": "\tif (!dirList.empty()) {\r\n\t\tstd::shuffle(dirList.begin(), dirList.end(), getRandomGenerator());\r\n\t\tmoveDirection = dirList[uniform_random(0, dirList.size() - 1)];\r\n\t\treturn true;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f99b78e11de31cd6", + "equalIndicator/v1": "b5a26a7a8b9985554cf4423b0d6482f557b2c154b80385e2ee00554dccff4d28" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1640, + "startColumn": 2, + "charOffset": 43994, + "charLength": 22, + "snippet": { + "text": "// player:getStamina()" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1638, + "startColumn": 1, + "charOffset": 43933, + "charLength": 168, + "snippet": { + "text": "\r\nint PlayerFunctions::luaPlayerGetStamina(lua_State* L) {\r\n\t// player:getStamina()\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (player) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "039bb507859a2f06", + "equalIndicator/v1": "b5a6d6970bbfeb5588339c8ba7f6007928fa622bc1df82baf2da758d30240ca8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 575, + "startColumn": 7, + "charOffset": 16045, + "charLength": 16, + "snippet": { + "text": "auto [key, item]" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 573, + "startColumn": 1, + "charOffset": 15980, + "charLength": 161, + "snippet": { + "text": "\r\n\t// Iterate through all items in the player's inventory\r\n\tfor (auto [key, item] : getAllSlotItems()) {\r\n\t\t// Iterate through all imbuement slots on the item\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b1166bc1624bd983", + "equalIndicator/v1": "b5f26713fa2d5174035bba9af016e17be943d5ca3f0491e4cd75110db3328caf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'", + "markdown": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 82, + "startColumn": 34, + "charOffset": 2580, + "charLength": 9, + "snippet": { + "text": "getPlayer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 80, + "startColumn": 1, + "charOffset": 2503, + "charLength": 114, + "snippet": { + "text": "\t\treturn static_self_cast();\r\n\t}\r\n\tvirtual std::shared_ptr getPlayer() {\r\n\t\treturn nullptr;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8588d363733ec888", + "equalIndicator/v1": "b6017b53c4cfeba16f754d7dcc840198c9e2a8e404694a938b16bb32f79a3041" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 257, + "startColumn": 2, + "charOffset": 8563, + "charLength": 8, + "snippet": { + "text": "uint64_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 255, + "startColumn": 1, + "charOffset": 8556, + "charLength": 203, + "snippet": { + "text": "\t}\r\n\r\n\tuint64_t tries = static_cast(skillBase[skill] * std::pow(static_cast(skillMultipliers[skill]), level - (minSkillLevel + 1)));\r\n\tcacheSkill[skill][level] = tries;\r\n\treturn tries;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "28f9cb3437b6af8d", + "equalIndicator/v1": "b606824b4adc4a89f4faab875c4e29891e9e2a8e2dba7ceab8d129796272f9d0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 973, + "startColumn": 52, + "charOffset": 31227, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 971, + "startColumn": 1, + "charOffset": 31171, + "charLength": 146, + "snippet": { + "text": "}\r\n\r\nbool InstantSpell::canCast(std::shared_ptr player) const {\r\n\tif (player->hasFlag(PlayerFlags_t::CannotUseSpells)) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "288c42e65d5d7454", + "equalIndicator/v1": "b62932d872a6c259ab44a03e02c33623c3b9b8bf9862305516cf2756597d9bce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'targetPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'targetPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7484, + "startColumn": 26, + "charOffset": 260703, + "charLength": 12, + "snippet": { + "text": "targetPlayer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7482, + "startColumn": 1, + "charOffset": 260538, + "charLength": 269, + "snippet": { + "text": "void Game::buildMessageAsTarget(\r\n\tstd::shared_ptr attacker, const CombatDamage &damage, std::shared_ptr attackerPlayer,\r\n\tstd::shared_ptr targetPlayer, TextMessage &message, std::stringstream &ss,\r\n\tconst std::string &damageString\r\n) const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b8c7596627fbb9f1", + "equalIndicator/v1": "b65a9b6fa5fd92a5e867297fe7dea7c8e93204a6499bb3fdd21eb9117149b69f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/position.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 90, + "startColumn": 10, + "charOffset": 3016, + "charLength": 8, + "snippet": { + "text": "Position" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 88, + "startColumn": 1, + "charOffset": 2956, + "charLength": 106, + "snippet": { + "text": "\r\n\tPosition operator+(const Position &p1) const {\r\n\t\treturn Position(x + p1.x, y + p1.y, z + p1.z);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2cc7421a0279e259", + "equalIndicator/v1": "b67b2cd4d40ee721dbbd0f72933af673e760aea088826b618fcfeff011fe47d6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'houseTile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'houseTile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 365, + "startColumn": 143, + "charOffset": 10572, + "charLength": 9, + "snippet": { + "text": "houseTile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 363, + "startColumn": 1, + "charOffset": 10425, + "charLength": 284, + "snippet": { + "text": "}\r\n\r\nvoid House::handleWrapableItem(ItemList &moveItemList, std::shared_ptr item, std::shared_ptr player, std::shared_ptr houseTile) const {\r\n\tif (item->isWrapContainer()) {\r\n\t\tg_logger().debug(\"[{}] found wrapable item '{}'\", __FUNCTION__, item->getName());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5a2e601e36159e53", + "equalIndicator/v1": "b67fc1ea9b4cc3c24440b82814f64e494a3360f026aa4ba262451dde39fe67f7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2115, + "startColumn": 27, + "charOffset": 63096, + "charLength": 8, + "snippet": { + "text": "duration" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2113, + "startColumn": 1, + "charOffset": 62992, + "charLength": 145, + "snippet": { + "text": "\r\n\tbool shouldUpdate = mType->info.targetDistance > distance ? true : false;\r\n\tchallengeMeleeDuration = duration;\r\n\ttargetDistance = distance;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "907c2ce45f2829a1", + "equalIndicator/v1": "b68291aefde02fa6b163ffd646f5dff09dbb181a2de3b9aeb4c094c1671b455e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 159, + "startColumn": 34, + "charOffset": 5122, + "charLength": 4, + "snippet": { + "text": "keys" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 157, + "startColumn": 1, + "charOffset": 5083, + "charLength": 133, + "snippet": { + "text": "\t}\r\n\r\n\tstd::unordered_set keys(const std::string &prefix = \"\") override {\r\n\t\treturn rootKV_.keys(buildKey(prefix));\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f9deadab3c9202f5", + "equalIndicator/v1": "b6a1cf1050c693a5ea2e963321f4d25ab1e8edc018ff645c922f7f78f1417fd2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1847, + "startColumn": 2, + "charOffset": 56272, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1845, + "startColumn": 1, + "charOffset": 56232, + "charLength": 108, + "snippet": { + "text": "\tstd::vector listedItems;\r\n\r\n\tuint16_t size = msg.get();\r\n\tlistedItems.reserve(size);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "667fe3c859ee1c23", + "equalIndicator/v1": "b6b367ad90f850b4ed29fba6b00630f7d40ffee884ec27c5a74a07a00a6a5be6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 256, + "startColumn": 2, + "charOffset": 9099, + "charLength": 13, + "snippet": { + "text": "MarketOfferEx" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 254, + "startColumn": 1, + "charOffset": 9013, + "charLength": 213, + "snippet": { + "text": "\r\nMarketOfferEx IOMarket::getOfferByCounter(uint32_t timestamp, uint16_t counter) {\r\n\tMarketOfferEx offer;\r\n\r\n\tconst int32_t created = timestamp - g_configManager().getNumber(MARKET_OFFER_DURATION, __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6bdb2daab0a56f5b", + "equalIndicator/v1": "b6e99d45ed26f00e63e501b55955fb27f1e07b6f670f1885447ebd4d5038ca19" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1151, + "startColumn": 27, + "charOffset": 41267, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1149, + "startColumn": 1, + "charOffset": 41235, + "charLength": 125, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnCombat, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "829451f9cd122ed4", + "equalIndicator/v1": "b6f2aced6bd292c4708f59c5a7ef4c23889b1b76ff36204f3e804e8158c76f3b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use std::make_unique instead", + "markdown": "Use std::make_unique instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 157, + "startColumn": 13, + "charOffset": 4151, + "charLength": 5, + "snippet": { + "text": "reset" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 155, + "startColumn": 1, + "charOffset": 4052, + "charLength": 448, + "snippet": { + "text": "\ttry {\r\n\t\tif (g_configManager().getBoolean(BIND_ONLY_GLOBAL_ADDRESS, __FUNCTION__)) {\r\n\t\t\tacceptor.reset(new asio::ip::tcp::acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::address(asio::ip::address_v4::from_string(g_configManager().getString(IP, __FUNCTION__))), serverPort)));\r\n\t\t} else {\r\n\t\t\tacceptor.reset(new asio::ip::tcp::acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::address(asio::ip::address_v4(INADDR_ANY)), serverPort)));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "256cc78d5ea2cfb2", + "equalIndicator/v1": "b6f63f1976c50d0b0d0256fe293079c7f3aa163bb43c18b278ba8db70878e329" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: nodesTable, calculatedNodes", + "markdown": "Constructor does not initialize these fields: nodesTable, calculatedNodes" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 16, + "startColumn": 13, + "charOffset": 525, + "charLength": 10, + "snippet": { + "text": "AStarNodes" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 14, + "startColumn": 1, + "charOffset": 471, + "charLength": 163, + "snippet": { + "text": "#include \"creatures/combat/combat.hpp\"\r\n\r\nAStarNodes::AStarNodes(uint32_t x, uint32_t y, int_fast32_t extraCost) :\r\n\topenNodes(), nodes() {\r\n#if defined(__AVX2__)\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "05e77cfde4fd3aa7", + "equalIndicator/v1": "b74fc40db36f6b92710d390fb5669cc4919b15797515a6dc980ead5c4325f7ed" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 301, + "startColumn": 84, + "charOffset": 12647, + "charLength": 14, + "snippet": { + "text": "const uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 299, + "startColumn": 1, + "charOffset": 12261, + "charLength": 492, + "snippet": { + "text": "\tvoid playerBosstiarySlot(uint32_t playerId, uint8_t slotId, uint32_t selectedBossId);\r\n\tvoid playerSetMonsterPodium(uint32_t playerId, uint32_t monsterRaceId, const Position &pos, uint8_t stackPos, const uint16_t itemId, uint8_t direction, const std::pair &podiumAndMonsterVisible);\r\n\tvoid playerRotatePodium(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\r\n\tvoid playerRequestInventoryImbuements(uint32_t playerId, bool isTrackerOpen);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "090b9bfbaff156e4", + "equalIndicator/v1": "b74fe1203a57df8d558356bac1bcdbb48dd5c6b8b324a5da8d11e3947139c30c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::_Tree, std::less>, std::allocator>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::_Tree, std::less\\>, std::allocator\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 995, + "startColumn": 2, + "charOffset": 30134, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 993, + "startColumn": 1, + "charOffset": 30057, + "charLength": 211, + "snippet": { + "text": "\tint index = 0;\r\n\tlua_createtable(L, monsterType->info.scripts.size(), 0);\r\n\tfor (const std::string &creatureEvent : monsterType->info.scripts) {\r\n\t\tpushString(L, creatureEvent);\r\n\t\tlua_rawseti(L, -2, ++index);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "49ef07c9dbe31692", + "equalIndicator/v1": "b7558bcfd2e068059f3eaae778c5dd9f1fa0162b415bc57ad490a78038bb7d42" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1724, + "startColumn": 61, + "charOffset": 60170, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1722, + "startColumn": 1, + "charOffset": 60103, + "charLength": 219, + "snippet": { + "text": "\t}\r\n}\r\nvoid ChainCallback::onChainCombat(std::shared_ptr creature, uint8_t &maxTargets, uint8_t &chainDistance, bool &backtracking) {\r\n\t// onChainCombat(creature)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "99c306a83af5764e", + "equalIndicator/v1": "b786b1ce9f45ed9c997a6e2815a31e777c488725d72d1a9f28f103896f1173a6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'result' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'result' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8435, + "startColumn": 49, + "charOffset": 293354, + "charLength": 6, + "snippet": { + "text": "result" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8433, + "startColumn": 1, + "charOffset": 293301, + "charLength": 229, + "snippet": { + "text": "}\r\n\r\nvoid Game::processHighscoreResults(DBResult_ptr result, uint32_t playerID, uint8_t category, uint32_t vocation, uint8_t entriesPerPage) {\r\n\tstd::shared_ptr player = g_game().getPlayerByID(playerID);\r\n\tif (!player) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aae1e2c0123de377", + "equalIndicator/v1": "b7b018b313dfcf97529c88fe592a0e2d4ee67a6f1a57bea17bfbe389e0d45d9e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6915, + "startColumn": 31, + "charOffset": 240099, + "charLength": 38, + "snippet": { + "text": "(damage.secondary.value * damageBonus)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6913, + "startColumn": 1, + "charOffset": 239967, + "charLength": 190, + "snippet": { + "text": "\t\t\tif (damageBonus != 0) {\r\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\r\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2eca040cc8389a90", + "equalIndicator/v1": "b7d0972c7e41fb86caf010c1624429bb644d0c1012d67696fc71034148809883" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'guild' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'guild' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 565, + "startColumn": 16, + "charOffset": 29537, + "charLength": 28, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 563, + "startColumn": 1, + "charOffset": 29342, + "charLength": 272, + "snippet": { + "text": "\tstd::shared_ptr getGuild(uint32_t id, bool allowOffline = false) const;\r\n\tstd::shared_ptr getGuildByName(const std::string &name, bool allowOffline = false) const;\r\n\tvoid addGuild(const std::shared_ptr guild);\r\n\tvoid removeGuild(uint32_t guildId);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1405918100b1863d", + "equalIndicator/v1": "b8172ebdfb1c0f414da73e48a1ceb3bd40422b18c36891dacd6385b755a57fac" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'name' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'name' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 205, + "startColumn": 16, + "charOffset": 4775, + "charLength": 4, + "snippet": { + "text": "name" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 203, + "startColumn": 1, + "charOffset": 4715, + "charLength": 72, + "snippet": { + "text": "\t}\r\n\tvoid setScriptName(std::string name) {\r\n\t\tscriptName = name;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "26797eddd083ecbe", + "equalIndicator/v1": "b85d61a72690d0a6a38ae19415e95139a866dc09b512a7c1e1daa9e87ccc8d47" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int64_t' (aka 'long long') is implementation-defined", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int64_t' (aka 'long long') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2483, + "startColumn": 32, + "charOffset": 73898, + "charLength": 3, + "snippet": { + "text": "exp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2481, + "startColumn": 1, + "charOffset": 73848, + "charLength": 61, + "snippet": { + "text": "\t}\r\n\tsendStats();\r\n\tsendExperienceTracker(rawExp, exp);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "56d4e80384a3fb3c", + "equalIndicator/v1": "b8614a966843ce9095cc9ee829e0598895fbcc0a6fbbd997f9a36a9988a8568f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'door' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'door' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 411, + "startColumn": 46, + "charOffset": 12009, + "charLength": 4, + "snippet": { + "text": "door" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 409, + "startColumn": 1, + "charOffset": 11959, + "charLength": 151, + "snippet": { + "text": "}\r\n\r\nvoid House::removeDoor(std::shared_ptr door) {\r\n\tauto it = std::find(doorList.begin(), doorList.end(), door);\r\n\tif (it != doorList.end()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b919e7577a6fb48c", + "equalIndicator/v1": "b86e38d5653908903629ca164203020be750228eabaff06fdb54cc6ee40d7b74" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1344, + "startColumn": 3, + "charOffset": 39394, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1342, + "startColumn": 1, + "charOffset": 39332, + "charLength": 173, + "snippet": { + "text": "\r\n\tif (const CreatureVector* creatures = getCreatures()) {\r\n\t\tfor (auto it = creatures->rbegin(); it != creatures->rend(); ++it) {\r\n\t\t\tif (*it == creature) {\r\n\t\t\t\treturn n;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "33782713e833e59f", + "equalIndicator/v1": "b87baf031bd0cc2513e9836635bdbcc05773ae7425ba157f0229ec926a841191" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float'", + "markdown": "Narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 630, + "startColumn": 27, + "charOffset": 16959, + "charLength": 56, + "snippet": { + "text": "(100 - creature->getAbsorbPercent(indexToCombatType(i)))" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 628, + "startColumn": 1, + "charOffset": 16914, + "charLength": 128, + "snippet": { + "text": "\t\t\tcontinue;\r\n\t\t}\r\n\t\tsetAbsorb(i, std::round((100 - creature->getAbsorbPercent(indexToCombatType(i))) * value / 100.f));\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "136b3592728a2493", + "equalIndicator/v1": "b8ac133beb52d3a6b91b7410593caa849cc6b500df2783047bd7d10cf748b777" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3491, + "startColumn": 15, + "charOffset": 105783, + "charLength": 12, + "snippet": { + "text": "tmpContainer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3489, + "startColumn": 1, + "charOffset": 105628, + "charLength": 241, + "snippet": { + "text": "\t\t\t\twhile (n) {\r\n\t\t\t\t\tif (tmpContainer->queryAdd(tmpContainer->capacity() - n, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) {\r\n\t\t\t\t\t\tindex = tmpContainer->capacity() - n;\r\n\t\t\t\t\t\t*destItem = nullptr;\r\n\t\t\t\t\t\treturn tmpContainer;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4b14cbcc02825520", + "equalIndicator/v1": "b8b69af396730b5f04a90381d7668d473b50ed2aab4118de59fc3a27ec6b42eb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 40, + "startColumn": 16, + "charOffset": 1053, + "charLength": 16, + "snippet": { + "text": "internalAddThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 38, + "startColumn": 1, + "charOffset": 1033, + "charLength": 71, + "snippet": { + "text": "}\r\n\r\nvoid Cylinder::internalAddThing(std::shared_ptr) {\r\n\t//\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f5870b2214122e7e", + "equalIndicator/v1": "b8ce5609a4d56f1ea544b7190848cfc80256bb47edbabe84c95c7621669c8bdd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 590, + "startColumn": 13, + "charOffset": 28431, + "charLength": 11, + "snippet": { + "text": "stringValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 588, + "startColumn": 1, + "charOffset": 28241, + "charLength": 413, + "snippet": { + "text": "\t} else if (stringValue == \"absorbpercentholy\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentdeath\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentlifedrain\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cdedfbebc46519d6", + "equalIndicator/v1": "b92fde3b733b3a940c6bff93f4fc9438e8c53408d1b9edd34b60988ba3192d21" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 355, + "startColumn": 9, + "charOffset": 11543, + "charLength": 40, + "snippet": { + "text": "(player->getMaxHealth() * healthPercent)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 353, + "startColumn": 1, + "charOffset": 11529, + "charLength": 67, + "snippet": { + "text": "\t}\r\n\r\n\treturn (player->getMaxHealth() * healthPercent) / 100;\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b0abbdedf36c042e", + "equalIndicator/v1": "b94131d9dee1d2988a656feb6ffc8a6624e83c0a2523285acde1a19f74cdc9dd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 58, + "startColumn": 35, + "charOffset": 1617, + "charLength": 12, + "snippet": { + "text": "getContainer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 56, + "startColumn": 1, + "charOffset": 1577, + "charLength": 123, + "snippet": { + "text": "\t}\r\n\r\n\tstd::shared_ptr getContainer() const override final {\r\n\t\treturn static_self_cast();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1b57bed8c87f043e", + "equalIndicator/v1": "b941683b25e869c07b2a856f6bb772b997f4ed36adc39f83948a2fbc949aadad" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 173, + "startColumn": 47, + "charOffset": 6504, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 171, + "startColumn": 1, + "charOffset": 6403, + "charLength": 214, + "snippet": { + "text": "\tscriptInterface.pushFunction(info.monsterOnSpawn);\r\n\r\n\tLuaScriptInterface::pushUserdata(L, monster);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Monster\");\r\n\tLuaScriptInterface::pushPosition(L, position);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7d2bcec969a60dcf", + "equalIndicator/v1": "b952d02d2339bc17be7bfb0bc47b8b1a5eef2b9b58a1a8fbfa0c032cc3b06648" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 397, + "startColumn": 70, + "charOffset": 17132, + "charLength": 31, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 395, + "startColumn": 1, + "charOffset": 16900, + "charLength": 349, + "snippet": { + "text": "\tvoid sendUpdateTileItem(const Position &pos, uint32_t stackpos, std::shared_ptr item);\r\n\tvoid sendRemoveTileThing(const Position &pos, uint32_t stackpos);\r\n\tvoid sendUpdateTileCreature(const Position &pos, uint32_t stackpos, const std::shared_ptr creature);\r\n\tvoid sendUpdateTile(std::shared_ptr tile, const Position &pos);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bd570a2792e1442b", + "equalIndicator/v1": "b975affac7d829f71a2ef53c8af4a45bd9c40860ca5a675db68caf3c7b90dbf3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 381, + "startColumn": 55, + "charOffset": 12564, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 379, + "startColumn": 1, + "charOffset": 12505, + "charLength": 127, + "snippet": { + "text": "}\r\n\r\nvoid Weapon::decrementItemCount(std::shared_ptr item) {\r\n\tuint16_t count = item->getItemCount();\r\n\tif (count > 1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cc5162903f5dc3bb", + "equalIndicator/v1": "b979f32720469306d33e3292b251ba11b5582c482f4c7706aa2eb7ae4d1fb4c8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'exclude' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'exclude' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 60, + "startColumn": 46, + "charOffset": 2128, + "charLength": 7, + "snippet": { + "text": "exclude" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 58, + "startColumn": 1, + "charOffset": 2078, + "charLength": 167, + "snippet": { + "text": "}\r\n\r\nbool Tile::hasProperty(std::shared_ptr exclude, ItemProperty prop) const {\r\n\tif (!exclude) {\r\n\t\tg_logger().error(\"[{}]: exclude is nullptr\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "80269993f729f9aa", + "equalIndicator/v1": "b97a812ec4e53d3dcf3564a1eb3b51160417ff880c7b64368053b948d984078f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 473, + "startColumn": 45, + "charOffset": 16907, + "charLength": 5, + "snippet": { + "text": "party" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 471, + "startColumn": 1, + "charOffset": 16810, + "charLength": 159, + "snippet": { + "text": "\tscriptInterface.pushFunction(info.partyOnLeave);\r\n\r\n\tLuaScriptInterface::pushUserdata(L, party);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Party\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4ea6b43a2d976d71", + "equalIndicator/v1": "b98777237896234e8a09b8b6bb87a4f2edf17591b0411b48d54f4998679edc61" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'owner' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'owner' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1030, + "startColumn": 47, + "charOffset": 28857, + "charLength": 5, + "snippet": { + "text": "owner" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1028, + "startColumn": 1, + "charOffset": 28806, + "charLength": 121, + "snippet": { + "text": "}\r\n\r\nvoid Item::setOwner(std::shared_ptr owner) {\r\n\tauto ownerId = owner->getID();\r\n\tif (owner->getPlayer()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "79e397becc2f6712", + "equalIndicator/v1": "b9acb47438f81a9c3435f9eccfe5f4affb246b0deb8ef50495966a4aec822125" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 303, + "startColumn": 80, + "charOffset": 9030, + "charLength": 14, + "snippet": { + "text": "const uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 301, + "startColumn": 1, + "charOffset": 8810, + "charLength": 327, + "snippet": { + "text": "\tstatic std::string parseShowDurationSpeed(int32_t speed, bool &begin);\r\n\tstatic std::string parseShowDuration(std::shared_ptr item);\r\n\tstatic std::string parseShowAttributesDescription(std::shared_ptr item, const uint16_t itemId);\r\n\tstatic std::string parseClassificationDescription(std::shared_ptr item);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9bb6503f8845321f", + "equalIndicator/v1": "b9b6605603fa23fdcf4fa038511fd8529eca4b4c9a54c05528df522bee62a862" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/creaturecallback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 38, + "startColumn": 71, + "charOffset": 1131, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 36, + "startColumn": 1, + "charOffset": 1056, + "charLength": 192, + "snippet": { + "text": "}\r\n\r\nvoid CreatureCallback::pushSpecificCreature(std::shared_ptr creature) {\r\n\tif (std::shared_ptr npc = creature->getNpc()) {\r\n\t\tLuaScriptInterface::pushUserdata(L, npc);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7505d9d72ef24c4a", + "equalIndicator/v1": "b9d3a7627af97c5fd6e3f72346e3dd407f03ed5bc567b8341cf9049d047f938a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 218, + "startColumn": 8, + "charOffset": 6952, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 216, + "startColumn": 1, + "charOffset": 6812, + "charLength": 339, + "snippet": { + "text": "\t\t// onCreatureMove(self, creature, oldPosition, newPosition)\r\n\t\tLuaScriptInterface* scriptInterface = mType->info.scriptInterface;\r\n\t\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\t\tg_logger().error(\"[Monster::onCreatureMove - Monster {} creature {}] \"\r\n\t\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eab79466dd035d3e", + "equalIndicator/v1": "ba288255bb788647ac97b0bcc9c8ce327bde5f3adab4af5a0006a6fe1864ff97" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 730, + "startColumn": 71, + "charOffset": 35925, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 728, + "startColumn": 1, + "charOffset": 35850, + "charLength": 234, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Game::internalGetThing(std::shared_ptr player, const Position &pos, int32_t index, uint32_t itemId, StackPosType_t type) {\r\n\tif (pos.x != 0xFFFF) {\r\n\t\tstd::shared_ptr tile = map.getTile(pos);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "90530e80b87e2982", + "equalIndicator/v1": "ba298a4f506fda05fa9f16b824316ea9667beac22435cb15ed3ea522100191ed" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1405, + "startColumn": 35, + "charOffset": 49101, + "charLength": 17, + "snippet": { + "text": "m_playerBonusData" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1403, + "startColumn": 1, + "charOffset": 48933, + "charLength": 335, + "snippet": { + "text": "\taddStat(WheelStat_t::MANA, m_playerBonusData.stats.mana);\r\n\taddStat(WheelStat_t::CAPACITY, m_playerBonusData.stats.capacity * 100);\r\n\taddStat(WheelStat_t::MITIGATION, m_playerBonusData.mitigation * 100);\r\n\taddStat(WheelStat_t::DAMAGE, m_playerBonusData.stats.damage);\r\n\taddStat(WheelStat_t::HEALING, m_playerBonusData.stats.healing);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a129cf8012047e07", + "equalIndicator/v1": "ba2b4026ba8031943d673bbe5d8e213925073a462ac50ade23fd7b363e710476" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1303, + "startColumn": 20, + "charOffset": 46363, + "charLength": 11, + "snippet": { + "text": "currentTime" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1301, + "startColumn": 1, + "charOffset": 46285, + "charLength": 133, + "snippet": { + "text": "\tlua_pushnumber(L, value);\r\n\tlua_pushnumber(L, oldValue);\r\n\tlua_pushnumber(L, currentTime);\r\n\r\n\tscriptInterface.callVoidFunction(5);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "879cdac0387c621c", + "equalIndicator/v1": "ba304b27deea222a8cab37119f1ccb5ddfa38d4145449f60a672b704bdda2da0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 28, + "startColumn": 2, + "charOffset": 836, + "charLength": 6, + "snippet": { + "text": "size_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 26, + "startColumn": 1, + "charOffset": 813, + "charLength": 128, + "snippet": { + "text": "\tstd::string line;\r\n\r\n\tsize_t offset = static_cast(result.offset);\r\n\tsize_t lineOffsetPosition = 0;\r\n\tsize_t index = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c28dfbff83e9eca4", + "equalIndicator/v1": "ba3a4cfa8fcb1dc62091138dc69216c98b413502ea6c040dbe0ea64aecd33cce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3277, + "startColumn": 64, + "charOffset": 121419, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3275, + "startColumn": 1, + "charOffset": 121351, + "charLength": 308, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr searchForItem(std::shared_ptr container, uint16_t itemId, bool hasTier /* = false*/, uint8_t tier /* = 0*/) {\r\n\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\r\n\t\tif ((*it)->getID() == itemId && (!hasTier || (*it)->getTier() == tier)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bca041fbbd216611", + "equalIndicator/v1": "ba4c07e477f7fddb2e14224555e833d96d74684c31a352deb61954eae9a0a40b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 289, + "startColumn": 84, + "charOffset": 8995, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 287, + "startColumn": 1, + "charOffset": 8907, + "charLength": 276, + "snippet": { + "text": "}\r\n\r\nbool Combat::isProtected(std::shared_ptr attacker, std::shared_ptr target) {\r\n\tuint32_t protectionLevel = g_configManager().getNumber(PROTECTION_LEVEL, __FUNCTION__);\r\n\tif (target->getLevel() < protectionLevel || attacker->getLevel() < protectionLevel) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a8e39ac610231395", + "equalIndicator/v1": "ba52c76dfc358e2c719425821c7b8921163437d162c1633a5a6d0e6d6b4bff0e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3655, + "startColumn": 65, + "charOffset": 109869, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3653, + "startColumn": 1, + "charOffset": 109761, + "charLength": 176, + "snippet": { + "text": "\t\t\tinventory[index] = nullptr;\r\n\t\t} else {\r\n\t\t\tuint8_t newCount = static_cast(std::max(0, item->getItemCount() - count));\r\n\t\t\titem->setItemCount(newCount);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9439f873341587a7", + "equalIndicator/v1": "ba792a986d4256f6c7b7092558fc24b17e4008e983ab0e2921d8dce7f76760c6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/inbox/inbox.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 26, + "startColumn": 7, + "charOffset": 955, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 24, + "startColumn": 1, + "charOffset": 794, + "charLength": 346, + "snippet": { + "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r\n\tbool isInbox() const override {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "85ad79c6b878e037", + "equalIndicator/v1": "ba949f6d4d7fba0f9f5a527254f77f279d5f5610422d3adca675905e047df15b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1115, + "startColumn": 27, + "charOffset": 39991, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1113, + "startColumn": 1, + "charOffset": 39959, + "charLength": 133, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnGainSkillTries, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "37761705e03b1d24", + "equalIndicator/v1": "baad084a5181d6e603c861aa56f7853d95d05cc1e83ef35c048acdbf45f697e8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6543, + "startColumn": 57, + "charOffset": 205922, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6541, + "startColumn": 1, + "charOffset": 205861, + "charLength": 123, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendUpdateTile(std::shared_ptr tile, const Position &pos) {\r\n\tif (!canSee(pos)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "370438f7b26532e4", + "equalIndicator/v1": "babcc6116ada04d09c5891af43faae92efd1554b2793296ed2ef1e9e3d05935b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 78, + "startColumn": 21, + "charOffset": 2186, + "charLength": 9, + "snippet": { + "text": "creatures" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 76, + "startColumn": 1, + "charOffset": 2061, + "charLength": 250, + "snippet": { + "text": "\tfor (const auto &tile : houseTiles) {\r\n\t\tif (const CreatureVector* creatures = tile->getCreatures()) {\r\n\t\t\tfor (int32_t i = creatures->size(); --i >= 0;) {\r\n\t\t\t\tconst auto creature = (*creatures)[i];\r\n\t\t\t\tkickPlayer(nullptr, creature->getPlayer());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fba61608409f7651", + "equalIndicator/v1": "bac56c4810c0ff9be41a538a9f2498f27e2efd8999ee16ed9ea3761c87f1e289" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4841, + "startColumn": 16, + "charOffset": 144717, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4839, + "startColumn": 1, + "charOffset": 144696, + "charLength": 50, + "snippet": { + "text": "\t}\r\n\r\n\taddExperience(target, gainExp, true);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9a856dd95af61b8a", + "equalIndicator/v1": "bac94d54c87d1c8db42700b813082a826830f7836f1273ca484dc1bf4f18a006" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'container' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'container' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2029, + "startColumn": 25, + "charOffset": 60183, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2027, + "startColumn": 1, + "charOffset": 59993, + "charLength": 217, + "snippet": { + "text": "void Player::onUpdateContainerItem(std::shared_ptr container, std::shared_ptr oldItem, std::shared_ptr newItem) {\r\n\tif (oldItem != newItem) {\r\n\t\tonRemoveContainerItem(container, oldItem);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fc00a8d8f036f272", + "equalIndicator/v1": "bb071858e0b1bba92cbd54ef8707b53f1221ed3dfbb8a34889a1193252f99d3a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1126, + "startColumn": 61, + "charOffset": 32951, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1124, + "startColumn": 1, + "charOffset": 32886, + "charLength": 109, + "snippet": { + "text": "}\r\n\r\nvoid Player::checkLootContainers(std::shared_ptr container) {\r\n\tif (!container) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "67a11ff8bfebdf4d", + "equalIndicator/v1": "bb252e4c1720cd3163db8bd2c9ace9f37c8f9a4205adb19697048ab85a7dfb24" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 360, + "startColumn": 7, + "charOffset": 11727, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 358, + "startColumn": 1, + "charOffset": 11597, + "charLength": 322, + "snippet": { + "text": "bool Weapon::executeUseWeapon(std::shared_ptr player, const LuaVariant &var) const {\r\n\t// onUseWeapon(player, var)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tstd::string playerName = player ? player->getName() : \"Player nullptr\";\r\n\t\tg_logger().error(\"[Weapon::executeUseWeapon - Player {} weaponId {}]\"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f5e64fd2ead17942", + "equalIndicator/v1": "bb4a30c083d788dca157b436b27d835284453d4493e414d39159d8bd56f4dc6f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2032, + "startColumn": 2, + "charOffset": 62242, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2030, + "startColumn": 1, + "charOffset": 62144, + "charLength": 244, + "snippet": { + "text": "void ProtocolGame::parseWrapableItem(NetworkMessage &msg) {\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tg_game().playerWrapableItem(player->getID(), pos, stackpos, itemId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8eb05c3a05d8775d", + "equalIndicator/v1": "bb505c042e9468713625242ff06bdce356181676d4dcb04fdc61879c7aa663b0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Replace loop by 'std::ranges::any_of()'", + "markdown": "Replace loop by 'std::ranges::any_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/attribute.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 161, + "startColumn": 3, + "charOffset": 5118, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 159, + "startColumn": 1, + "charOffset": 5064, + "charLength": 158, + "snippet": { + "text": "\r\n\tbool hasAttribute(ItemAttribute_t type) const {\r\n\t\tfor (const auto &attr : attributeVector) {\r\n\t\t\tif (attr.getAttributeType() == type) {\r\n\t\t\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4589fb673eb863f7", + "equalIndicator/v1": "bb5e5944ee413f788e3fec2fff4320c19f99c305baa95117d9655cfc1832cf98" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'playerPtr' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'playerPtr' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/save_manager.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 53, + "startColumn": 56, + "charOffset": 1400, + "charLength": 9, + "snippet": { + "text": "playerPtr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 51, + "startColumn": 1, + "charOffset": 1340, + "charLength": 136, + "snippet": { + "text": "}\r\n\r\nvoid SaveManager::schedulePlayer(std::weak_ptr playerPtr) {\r\n\tauto playerToSave = playerPtr.lock();\r\n\tif (!playerToSave) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1d657e4012c148f8", + "equalIndicator/v1": "bb651f09f9f9fef9721d0fa9907c5cccdc8a65ab1c360cc2cc55fa0fb39d058a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 254, + "startColumn": 24, + "charOffset": 7101, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 252, + "startColumn": 1, + "charOffset": 7002, + "charLength": 208, + "snippet": { + "text": "\tconst auto &weapon = getUserdataShared(L, 1);\r\n\tif (weapon) {\r\n\t\tweapon->setMinChange(getNumber(L, 2));\r\n\t\tif (lua_gettop(L) > 2) {\r\n\t\t\tweapon->setMaxChange(getNumber(L, 3));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "97179b35de9ae7ce", + "equalIndicator/v1": "bbcfef467714423b0d34639514112b143d502d33d5583d4af454d7f632061ac9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 46, + "startColumn": 64, + "charOffset": 1865, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 44, + "startColumn": 1, + "charOffset": 1797, + "charLength": 176, + "snippet": { + "text": "}\r\n\r\nCombatDamage Combat::getCombatDamage(std::shared_ptr creature, std::shared_ptr target) const {\r\n\tCombatDamage damage;\r\n\tdamage.origin = params.origin;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "766aa76056900bb9", + "equalIndicator/v1": "bbe4ed4b7fc336f9c08b28b23ead159832a038f3e2e84845edb4dd4db9a70ada" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: delay", + "markdown": "Constructor does not initialize these fields: delay" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 141, + "startColumn": 7, + "charOffset": 3345, + "charLength": 9, + "snippet": { + "text": "RaidEvent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 139, + "startColumn": 1, + "charOffset": 3333, + "charLength": 67, + "snippet": { + "text": "};\r\n\r\nclass RaidEvent {\r\npublic:\r\n\tvirtual ~RaidEvent() = default;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9a3dfdd73fd6ad1d", + "equalIndicator/v1": "bbef9aa54de097416dd3be632d896524b6b6462e40b5e2452b8954a2dc1445f9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 277, + "startColumn": 59, + "charOffset": 10218, + "charLength": 5, + "snippet": { + "text": "party" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 275, + "startColumn": 1, + "charOffset": 10155, + "charLength": 213, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::partyOnDisband(std::shared_ptr party) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::partyOnDisband - Party leader {}] Call stack \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "291567f21a0aedf4", + "equalIndicator/v1": "bc084c804b340f653187055083b0ef90318032ac8b27ced3a2cd6342096f69e2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 178, + "startColumn": 7, + "charOffset": 6525, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 176, + "startColumn": 1, + "charOffset": 6232, + "charLength": 448, + "snippet": { + "text": "\r\nvoid EventCallback::creatureOnDrainHealth(std::shared_ptr creature, std::shared_ptr attacker, CombatType_t &typePrimary, int32_t &damagePrimary, CombatType_t &typeSecondary, int32_t &damageSecondary, TextColor_t &colorPrimary, TextColor_t &colorSecondary) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnDrainHealth - \"\r\n\t\t \"Creature {} attacker {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bb75a1b24d849a1a", + "equalIndicator/v1": "bc11f6e783428234efaad76aaf30825e7aeb5c9ae02c31d023afef7066ff4d05" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 295, + "startColumn": 25, + "charOffset": 10460, + "charLength": 20, + "snippet": { + "text": "pugi::cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 293, + "startColumn": 1, + "charOffset": 10425, + "charLength": 192, + "snippet": { + "text": "\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\timbuement.speed = pugi::cast(attr.value());\r\n\t\t\t\t\t} else if (strcasecmp(effecttype.c_str(), \"capacity\") == 0) {\r\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"value\"))) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "31cf4026ee2cd779", + "equalIndicator/v1": "bc16b7f137d3fed68cc680e64491feddc1ce761431b9df70edaba9d5165ddffb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getIsLootTrackeable' can be made const", + "markdown": "Method 'getIsLootTrackeable' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 268, + "startColumn": 7, + "charOffset": 8014, + "charLength": 19, + "snippet": { + "text": "getIsLootTrackeable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 266, + "startColumn": 1, + "charOffset": 8002, + "charLength": 68, + "snippet": { + "text": "\t}\r\n\r\n\tbool getIsLootTrackeable() {\r\n\t\treturn isLootTrackeable;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "42259d07ec94020b", + "equalIndicator/v1": "bc2730bad868ff1d9474f49d042ac20c1d7997395c1e8f65903307f9c6342567" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int64_t' (aka 'long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 873, + "startColumn": 24, + "charOffset": 24377, + "charLength": 11, + "snippet": { + "text": "damageEntry" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 871, + "startColumn": 1, + "charOffset": 24274, + "charLength": 176, + "snippet": { + "text": "\t\tlua_createtable(L, 0, 2);\r\n\t\tsetField(L, \"total\", damageEntry.second.total);\r\n\t\tsetField(L, \"ticks\", damageEntry.second.ticks);\r\n\t\tlua_rawseti(L, -2, damageEntry.first);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bbe18e66c7a0e76d", + "equalIndicator/v1": "bc393a7e9dff1756ddd2f32352dbcb0fdf58a7010c3ae95578eced756455da42" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 334, + "startColumn": 41, + "charOffset": 12426, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 332, + "startColumn": 1, + "charOffset": 12380, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "65ecab3dc4af74b0", + "equalIndicator/v1": "bc6826e8b09e4876999f164eddf67da7d273875ed0b7d47fae9923d5b73e465a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7190, + "startColumn": 46, + "charOffset": 214099, + "charLength": 4, + "snippet": { + "text": "cost" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7188, + "startColumn": 1, + "charOffset": 214037, + "charLength": 174, + "snippet": { + "text": "\t\t\treturn;\r\n\t\t}\r\n\t\tg_metrics().addCounter(\"balance_decrease\", cost, { { \"player\", getName() }, { \"context\", \"forge_convergence_fuse\" } });\r\n\t\thistory.cost = cost;\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "640ed643f5e8bc43", + "equalIndicator/v1": "bca84f4b18cd91bbc322da2cdf79d8f8c3fb8aa2a667b1ba4df5d9bba1382b7c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 376, + "startColumn": 2, + "charOffset": 12411, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 374, + "startColumn": 1, + "charOffset": 12302, + "charLength": 202, + "snippet": { + "text": "\tLuaScriptInterface::pushUserdata(L, player);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\tgetScriptInterface()->pushVariant(L, var);\r\n\r\n\treturn getScriptInterface()->callFunction(2);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "79df5129bbb86b32", + "equalIndicator/v1": "bcb2274f84d4af1120dd9b35765e9eba6b79b84b0615e50d0e32ce0ef18b0519" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6794, + "startColumn": 83, + "charOffset": 234825, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6792, + "startColumn": 1, + "charOffset": 234715, + "charLength": 263, + "snippet": { + "text": "\r\n// Hazard combat helpers\r\nvoid Game::handleHazardSystemAttack(CombatDamage &damage, std::shared_ptr player, std::shared_ptr monster, bool isPlayerAttacker) {\r\n\tif (damage.primary.value != 0 && monster->getHazard()) {\r\n\t\tif (isPlayerAttacker) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8ab29dc5a3c84856", + "equalIndicator/v1": "bcc43c187a72c87bf16a1377306c5d9bf997a06b5996e03507129fa7acff12d7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 731, + "startColumn": 28, + "charOffset": 22362, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 729, + "startColumn": 1, + "charOffset": 22329, + "charLength": 102, + "snippet": { + "text": "\t}\r\n\r\n\tconst int32_t oldWeight = item->getWeight();\r\n\titem->setID(itemId);\r\n\titem->setSubType(count);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "731b12dea705c446", + "equalIndicator/v1": "bcdb3343ac3f1b7918dc042732e6ae0f6573c9debca06fe401970a9d6dc0489c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'newRunning' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'newRunning' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 59, + "startColumn": 46, + "charOffset": 1529, + "charLength": 10, + "snippet": { + "text": "newRunning" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 57, + "startColumn": 1, + "charOffset": 1461, + "charLength": 111, + "snippet": { + "text": "\t\treturn running;\r\n\t}\r\n\tvoid setRunning(const std::shared_ptr newRunning) {\r\n\t\trunning = newRunning;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71ae3c07e32d7224", + "equalIndicator/v1": "bcfbd815b53b74dfa4a516c4fb36aaf7212534b50816b2480957daec0cd58f1b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 62, + "startColumn": 60, + "charOffset": 2286, + "charLength": 28, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 60, + "startColumn": 1, + "charOffset": 2022, + "charLength": 419, + "snippet": { + "text": "\tvoid addCharmPoints(std::shared_ptr player, uint16_t amount, bool negative = false);\r\n\tvoid sendBuyCharmRune(std::shared_ptr player, charmRune_t runeID, uint8_t action, uint16_t raceid);\r\n\tvoid setCharmRuneCreature(std::shared_ptr player, const std::shared_ptr charm, uint16_t raceid);\r\n\tvoid resetCharmRuneCreature(std::shared_ptr player, const std::shared_ptr charm);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8f6b90841129e655", + "equalIndicator/v1": "bcfcd9cdbc41068fc81d1318873fe6bae653cbec77350fdb9752e1991b7bb543" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 50, + "startColumn": 70, + "charOffset": 1440, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 48, + "startColumn": 1, + "charOffset": 1340, + "charLength": 270, + "snippet": { + "text": "// Lua functions\r\n// Creature\r\nbool EventCallback::creatureOnChangeOutfit(std::shared_ptr creature, const Outfit_t &outfit) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnChangeOutfit - Creature {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5ab4e2cd9f89f02c", + "equalIndicator/v1": "bd05ad01dfa4a31cd9aa2b04aafdb5ac1799dcd40acc728c974165263d4342f5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2103, + "startColumn": 52, + "charOffset": 62049, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2101, + "startColumn": 1, + "charOffset": 61993, + "charLength": 127, + "snippet": { + "text": "}\r\n\r\nvoid Player::checkTradeState(std::shared_ptr item) {\r\n\tif (!tradeItem || tradeState == TRADE_TRANSFER) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5e72d5d5f2a21572", + "equalIndicator/v1": "bd10227f54bd7788dd20380a5a062cae69e0011f3a45bf368d1363d9be95f936" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The value returned by this function should not be disregarded; neglecting it may lead to errors", + "markdown": "The value returned by this function should not be disregarded; neglecting it may lead to errors" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 89, + "startColumn": 3, + "charOffset": 2783, + "charLength": 6, + "snippet": { + "text": "socket" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 87, + "startColumn": 1, + "charOffset": 2774, + "charLength": 182, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tsocket.close(error);\r\n\t\tif (error && error != asio::error::not_connected) {\r\n\t\t\tg_logger().error(\"[Connection::closeSocket] - Failed to close socket: {}\", error.message());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c77558111e0ee32b", + "equalIndicator/v1": "bd2402ffe0be7d68f18db3cdc8cbde15426b3e57ac83d604fd48e920e8d4ae03" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 700, + "startColumn": 121, + "charOffset": 23006, + "charLength": 18, + "snippet": { + "text": "spellGroupCooldown" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 698, + "startColumn": 1, + "charOffset": 22848, + "charLength": 253, + "snippet": { + "text": "\t\t}\r\n\t\tif (spellGroupCooldown > 0) {\r\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLGROUPCOOLDOWN, spellGroupCooldown / rateCooldown, 0, false, group);\r\n\t\t\tplayer->addCondition(condition);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "db98d9708b78c328", + "equalIndicator/v1": "bd2eaed58218b7e08f8ccc41aef31b8112a4dcdabb1d21d880a1e649a4263a2f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1291, + "startColumn": 88, + "charOffset": 51888, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1289, + "startColumn": 1, + "charOffset": 51695, + "charLength": 212, + "snippet": { + "text": "\t\t// Registering missile effects\r\n\t\tfor (uint32_t it = 0; it < m_appearancesPtr->missile_size(); it++) {\r\n\t\t\tregisteredDistanceEffects.push_back(static_cast(m_appearancesPtr->missile(it).id()));\r\n\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f98a92ea6016ba04", + "equalIndicator/v1": "bd3fd899fcecf49096758d7d4118c393b589081b4d15f7b29b4b3ae426217c4d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 226, + "startColumn": 10, + "charOffset": 6511, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 224, + "startColumn": 1, + "charOffset": 6403, + "charLength": 163, + "snippet": { + "text": "\tif (it == listNames.end()) {\r\n\t\tg_logger().error(\"Column '{}' does not exist in result set\", s);\r\n\t\treturn std::string();\r\n\t}\r\n\tif (row[it->second] == nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d72cc4df4e599270", + "equalIndicator/v1": "bd8bba250da04dbe1217a548f3294ee39f7805f0c2416cdafb58f6aa4fa62c92" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 855, + "startColumn": 33, + "charOffset": 27854, + "charLength": 9, + "snippet": { + "text": "getCorpse" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 853, + "startColumn": 1, + "charOffset": 27817, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Creature::getCorpse(std::shared_ptr, std::shared_ptr) {\r\n\tif (getLookCorpse() != 0) {\r\n\t\treturn Item::CreateItem(getLookCorpse());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6fe35fd8940d204f", + "equalIndicator/v1": "bd8f7371a766c282242bdf9e83e3f7ac78e1c56d85d367220440faf8e7234472" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/global_event_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 140, + "startColumn": 3, + "charOffset": 4466, + "charLength": 6, + "snippet": { + "text": "time_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 138, + "startColumn": 1, + "charOffset": 4435, + "charLength": 208, + "snippet": { + "text": "\t\ttimeinfo->tm_sec = sec;\r\n\r\n\t\ttime_t difference = static_cast(difftime(mktime(timeinfo), current_time));\r\n\t\t// If the difference is negative, add 86400 seconds (1 day) to it\r\n\t\tif (difference < 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5630eb6fbdb25cc9", + "equalIndicator/v1": "bd9c8e61930f9d69bea21d6dedaeb3dbb237e37acb7cf6ed715f12ccc108bab1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 134, + "startColumn": 78, + "charOffset": 3643, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 132, + "startColumn": 1, + "charOffset": 3561, + "charLength": 244, + "snippet": { + "text": "}\r\n\r\nbool Weapon::useWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target) const {\r\n\tint32_t damageModifier = playerWeaponCheck(player, target, item->getShootRange());\r\n\tif (damageModifier == 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "62072f087909cec2", + "equalIndicator/v1": "bdaee783d294ef6f0ec6f4c97b0a1b1ebb6d633bff62a5a35a14658aa8f6924e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 299, + "startColumn": 28, + "charOffset": 9775, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 297, + "startColumn": 1, + "charOffset": 9741, + "charLength": 137, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\t\tenv->setScriptId(mType->info.creatureSayEvent, scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "041ad22d877d2823", + "equalIndicator/v1": "bdd22e94df0116b96b03ea5519eefcf2f77cfa8a4a177e7e2777f1a3bb8063c0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 141, + "startColumn": 26, + "charOffset": 3847, + "charLength": 4, + "snippet": { + "text": "guid" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 139, + "startColumn": 1, + "charOffset": 3771, + "charLength": 126, + "snippet": { + "text": "\r\n\t\tuint32_t guid = getNumber(L, 2, 0);\r\n\t\thouse->setNewOwnerGuid(guid, false);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7483ec093dc30cfa", + "equalIndicator/v1": "bdd5821fa610d704c83b53d927b7e5f8eb2104b542d1978d953c1b4567defa80" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 78, + "startColumn": 27, + "charOffset": 2130, + "charLength": 4, + "snippet": { + "text": "from" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 76, + "startColumn": 1, + "charOffset": 2067, + "charLength": 83, + "snippet": { + "text": "\r\n\tPositionIterator begin() const {\r\n\t\treturn PositionIterator(from, *this);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ef52dd19a3c31415", + "equalIndicator/v1": "bdebbd97fdfcba7dcde7bb1afd81d49ef6cd65b80766cc9e668be27467566f45" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3534, + "startColumn": 13, + "charOffset": 106881, + "charLength": 1, + "snippet": { + "text": "n" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3532, + "startColumn": 1, + "charOffset": 106740, + "charLength": 196, + "snippet": { + "text": "\r\n\t\t\tif (n < tmpContainer->capacity() && tmpContainer->queryAdd(n, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) {\r\n\t\t\t\tindex = n;\r\n\t\t\t\t*destItem = nullptr;\r\n\t\t\t\treturn tmpContainer;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d91d3c9dfd13ce78", + "equalIndicator/v1": "be14f40f934ceac4c0bb2ce01a2b8663cfea7a7af4b88f44b39aa77a1381a518" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'name' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'name' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2799, + "startColumn": 49, + "charOffset": 98337, + "charLength": 4, + "snippet": { + "text": "name" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2797, + "startColumn": 1, + "charOffset": 98284, + "charLength": 170, + "snippet": { + "text": "}\r\n\r\nuint8_t PlayerWheel::getStage(const std::string name) const {\r\n\tif (name == \"Battle Instinct\") {\r\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::BATTLE_INSTINCT);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c6dedc4d4558de18", + "equalIndicator/v1": "be30e6bdc128a471bc4b969b10bb64db18f3db3a88bc4929729037a9badfe83d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 588, + "startColumn": 13, + "charOffset": 28253, + "charLength": 34, + "snippet": { + "text": "stringValue == \"absorbpercentholy\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 586, + "startColumn": 1, + "charOffset": 28065, + "charLength": 405, + "snippet": { + "text": "\t} else if (stringValue == \"absorbpercentice\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentholy\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentdeath\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fae2faa002b1fb49", + "equalIndicator/v1": "be4c36d804a5b22a38d34c26caf743b36a361575dde6851a60349de4dfb76067" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'updateCreatureSkull' can be made const", + "markdown": "Method 'updateCreatureSkull' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8042, + "startColumn": 12, + "charOffset": 279964, + "charLength": 19, + "snippet": { + "text": "updateCreatureSkull" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8040, + "startColumn": 1, + "charOffset": 279948, + "charLength": 127, + "snippet": { + "text": "}\r\n\r\nvoid Game::updateCreatureSkull(std::shared_ptr creature) {\r\n\tif (getWorldType() != WORLD_TYPE_PVP) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ae812b726ee28e1c", + "equalIndicator/v1": "be4f45a527090727b34dc9be0988fbabbb31b1d85f24eb781fb66a264d188447" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 460, + "startColumn": 50, + "charOffset": 27419, + "charLength": 10, + "snippet": { + "text": "m_monsters" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 458, + "startColumn": 1, + "charOffset": 27338, + "charLength": 115, + "snippet": { + "text": "\r\n\t\tif (!m_monsters.empty()) {\r\n\t\t\tselectedMonster = m_monsters[normal_random(0, m_monsters.size() - 1)];\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "df13332ff1a99aae", + "equalIndicator/v1": "be539084d4fb6b78e2d54739d7946368f400a9deb290c1cdc886a85e53cbc1e9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 164, + "startColumn": 7, + "charOffset": 5444, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 162, + "startColumn": 1, + "charOffset": 5389, + "charLength": 359, + "snippet": { + "text": "\tItemVector getItems(bool recursive = false);\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "01d0e5771c0c8bc1", + "equalIndicator/v1": "be5a3574a33c9ba392b4cff5e8a12b496410af17d8c0dddc4a02f73491e808d9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 461, + "startColumn": 56, + "charOffset": 13722, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 459, + "startColumn": 1, + "charOffset": 13662, + "charLength": 202, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::AddItemField(std::shared_ptr item, std::shared_ptr, const Position &) {\r\n\tif (item == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::AddItemField] - Item is nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5c991ee0bf0842f7", + "equalIndicator/v1": "be69cd1186857d0ac7f1881855d3add9291da4c37b993e992e7c37c55d701bc0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 10489, + "startColumn": 70, + "charOffset": 364092, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10487, + "startColumn": 1, + "charOffset": 364018, + "charLength": 289, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::beforeCreatureZoneChange(std::shared_ptr creature, const std::unordered_set> &fromZones, const std::unordered_set> &toZones, bool force /* = false*/) const {\r\n\tif (!creature) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2e1737f50efd8f79", + "equalIndicator/v1": "be6d3e46264f219efefe50349248698778b6e580679b96f601440a8655b826aa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4635, + "startColumn": 26, + "charOffset": 138397, + "charLength": 5, + "snippet": { + "text": "delay" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4633, + "startColumn": 1, + "charOffset": 138299, + "charLength": 247, + "snippet": { + "text": "\t\tif (!canDoAction()) {\r\n\t\t\tconst uint32_t delay = getNextActionTime();\r\n\t\t\tconst int32_t ticks = delay - (delay % EVENT_CREATURE_THINK_INTERVAL);\r\n\t\t\tif (ticks < 0 || condition->getType() == CONDITION_PARALYZE) {\r\n\t\t\t\tremoveCondition(condition);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f881ee6792f10113", + "equalIndicator/v1": "be737705062d9a4a4a2b1bfdbdcac6848376c0a70d71a57391013769c5db71fa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 58, + "startColumn": 55, + "charOffset": 1759, + "charLength": 34, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 56, + "startColumn": 1, + "charOffset": 1609, + "charLength": 507, + "snippet": { + "text": "\r\n\tstd::shared_ptr getBestiaryCharm(charmRune_t activeCharm, bool force = false) const;\r\n\tvoid addBestiaryKill(std::shared_ptr player, const std::shared_ptr mtype, uint32_t amount = 1);\r\n\tbool parseCharmCombat(const std::shared_ptr charm, std::shared_ptr player, std::shared_ptr target, int32_t realDamage, bool dueToPotion = false, bool checkArmor = false);\r\n\tvoid addCharmPoints(std::shared_ptr player, uint16_t amount, bool negative = false);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f222bc876d6afbed", + "equalIndicator/v1": "be8242a6c8fb466aa913b2ab8c2d1d1624d7d085f38ef8ebb7ff16b64eb3e0b4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 653, + "startColumn": 16, + "charOffset": 17972, + "charLength": 3, + "snippet": { + "text": "sep" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 651, + "startColumn": 1, + "charOffset": 17931, + "charLength": 109, + "snippet": { + "text": "\t\t\treturn 2;\r\n\t\t} else {\r\n\t\t\tstd::string sep = \"\";\r\n\t\t\tif (lua_gettop(L) == 3) {\r\n\t\t\t\tsep = getString(L, 3);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "80e0896426a41b26", + "equalIndicator/v1": "be90da537749777144ffe8fc4033ece6dcfe6c32436f563cce78ec262b67d067" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 616, + "startColumn": 101, + "charOffset": 18759, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 614, + "startColumn": 1, + "charOffset": 18654, + "charLength": 257, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::DeEquipItem(const std::shared_ptr MoveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool) {\r\n\tif (player == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9e9a87486651f830", + "equalIndicator/v1": "be965cc8f3f7eb048a00be69fb768d30c557b6623c77e1bca36df1126349f68f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 307, + "startColumn": 27, + "charOffset": 9967, + "charLength": 5, + "snippet": { + "text": "depot" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 305, + "startColumn": 1, + "charOffset": 9845, + "charLength": 187, + "snippet": { + "text": "\t\t\tmyDepotLocker->setParent(depot->getParent()->getTile());\r\n\t\t\topenContainer = myDepotLocker;\r\n\t\t\tplayer->setLastDepotId(depot->getDepotId());\r\n\t\t} else {\r\n\t\t\topenContainer = container;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2680360d0fc8ee1f", + "equalIndicator/v1": "beb9fbf6e757f4ca09f991076af94938a2e3ef1e5dd8018e6678a13bec5ad424" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1705, + "startColumn": 22, + "charOffset": 48722, + "charLength": 7, + "snippet": { + "text": "toupper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1703, + "startColumn": 1, + "charOffset": 48547, + "charLength": 278, + "snippet": { + "text": "\t\t\t\t\tss << std::showpos << it.abilities->specializedMagicLevel[i] << std::noshowpos;\r\n\t\t\t\t\tstd::string combatName = getCombatName(indexToCombatType(i));\r\n\t\t\t\t\tcombatName[0] = toupper(combatName[0]);\r\n\t\t\t\t\tdescriptions.emplace_back(combatName + \" Magic Level\", ss.str());\r\n\t\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3d8be761dec40a07", + "equalIndicator/v1": "bec39f7346b9b2114647397062955ee0b63fe841959ac54ab48d48dce58ce49d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly", + "markdown": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2384, + "startColumn": 59, + "charOffset": 90754, + "charLength": 12, + "snippet": { + "text": "__FUNCTION__" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2382, + "startColumn": 1, + "charOffset": 90472, + "charLength": 327, + "snippet": { + "text": "\t\tif (internalAddItem(toCylinder, autoContainer, CONST_SLOT_WHEREEVER, flags) != RETURNVALUE_NOERROR) {\r\n\t\t\tif (internalAddItem(toCylinder->getTile(), autoContainer, INDEX_WHEREEVER, FLAG_NOLIMIT) != RETURNVALUE_NOERROR) {\r\n\t\t\t\tg_logger().error(\"[{}] Failed to add auto container\", __FUNCTION__);\r\n\t\t\t\treturn toCylinder;\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5a95fab3a2a33932", + "equalIndicator/v1": "bef118456a8305364ae47f51b83895ee2a4fe718ebecce4ef81fdd41f3a018bc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 570, + "startColumn": 24, + "charOffset": 17134, + "charLength": 7, + "snippet": { + "text": "getTile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 568, + "startColumn": 1, + "charOffset": 17105, + "charLength": 85, + "snippet": { + "text": "\t}\r\n\r\n\tstd::shared_ptr getTile() override final {\r\n\t\treturn m_tile.lock();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cbf84c411f56a50a", + "equalIndicator/v1": "bf00b83e7cb370ebe54aac4cc5d83337466404dbee0fc5ae0c08d23d229c8e29" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 137, + "startColumn": 10, + "charOffset": 3646, + "charLength": 17, + "snippet": { + "text": "getReflectPercent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 135, + "startColumn": 1, + "charOffset": 3631, + "charLength": 167, + "snippet": { + "text": "\t}\r\n\r\n\tint32_t getReflectPercent(CombatType_t combatType, bool useCharges = false) const override;\r\n\tuint32_t getHealingCombatValue(CombatType_t healingType) const;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "026b5c7157d91110", + "equalIndicator/v1": "bf16ae4106bc87d856e2566af0a6b63fc0ce1590a642db11717ec2051ffd5d1c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1286, + "startColumn": 84, + "charOffset": 51675, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1284, + "startColumn": 1, + "charOffset": 51486, + "charLength": 208, + "snippet": { + "text": "\t\t// Registering distance effects\r\n\t\tfor (uint32_t it = 0; it < m_appearancesPtr->effect_size(); it++) {\r\n\t\t\tregisteredMagicEffects.push_back(static_cast(m_appearancesPtr->effect(it).id()));\r\n\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5c38b79d11c5a02e", + "equalIndicator/v1": "bf29059df928b88b12cd67b858bd5dc001d68078c0be818fbe8579230d8c0427" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1167, + "startColumn": 67, + "charOffset": 44372, + "charLength": 4, + "snippet": { + "text": "zone" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1165, + "startColumn": 1, + "charOffset": 44301, + "charLength": 237, + "snippet": { + "text": "}\r\n\r\nbool EventCallback::zoneBeforeCreatureLeave(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneBeforeCreatureLeave - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1d779dea83573cc3", + "equalIndicator/v1": "bf5b629864ee6abe35d03635de658b3ed200645750bc8a54323485691a96863c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 522, + "startColumn": 93, + "charOffset": 19754, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 520, + "startColumn": 1, + "charOffset": 19657, + "charLength": 373, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnItemMoved(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnItemMoved - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "62195ff1d3227024", + "equalIndicator/v1": "bf7d31c2b62f6772fe916bcf88e44c6e6b59f8e7e35df36e7b822e8bb6567fb5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'key' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'key' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 115, + "startColumn": 61, + "charOffset": 6877, + "charLength": 14, + "snippet": { + "text": "const uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 113, + "startColumn": 1, + "charOffset": 6658, + "charLength": 576, + "snippet": { + "text": "\tvoid playerOnRequestQuestLog(std::shared_ptr player) const;\r\n\tvoid playerOnRequestQuestLine(std::shared_ptr player, uint16_t questId) const;\r\n\tvoid playerOnStorageUpdate(std::shared_ptr player, const uint32_t key, const int32_t value, int32_t oldValue, uint64_t currentTime) const;\r\n\tvoid playerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) const;\r\n\tvoid playerOnInventoryUpdate(std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool equip) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a3c0f3466064dab3", + "equalIndicator/v1": "bf7f465f0fec0a0ee331b0108de5229ec94c7d8ed6cf129343cc3d85eee347c9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 340, + "startColumn": 55, + "charOffset": 8872, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 338, + "startColumn": 1, + "charOffset": 8729, + "charLength": 186, + "snippet": { + "text": "\r\nstd::shared_ptr Tile::getTopVisibleThing(std::shared_ptr creature) {\r\n\tstd::shared_ptr thing = getTopVisibleCreature(creature);\r\n\tif (thing) {\r\n\t\treturn thing;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bccbb90beb83bace", + "equalIndicator/v1": "bfaf411758a9773bc74e96ec056f666a8bd3ae6cc136362ce744861b1dd357c1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 163, + "startColumn": 27, + "charOffset": 4980, + "charLength": 10, + "snippet": { + "text": "realDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 161, + "startColumn": 1, + "charOffset": 4862, + "charLength": 181, + "snippet": { + "text": "\t// Setting damage to combat\r\n\tcombat.primary.value = realDamage * weaponAttackProportion;\r\n\tcombat.secondary.value = realDamage * (1 - weaponAttackProportion);\r\n\treturn combat;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aaf73d6cdb65019f", + "equalIndicator/v1": "bfbd8a26a049b162cb0e3e1b0b4ad79e52b0cccfc9c8f070d85b32d390e5f225" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 689, + "startColumn": 70, + "charOffset": 26840, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 687, + "startColumn": 1, + "charOffset": 26766, + "charLength": 185, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerForgeHistory(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b08abd3f5db35360", + "equalIndicator/v1": "c010f37984b8fe5dc15ddaa68f0108973d96354297ce2c8337191e0560594a64" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1777, + "startColumn": 2, + "charOffset": 53547, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1775, + "startColumn": 1, + "charOffset": 53455, + "charLength": 232, + "snippet": { + "text": "void ProtocolGame::parseLookAt(NetworkMessage &msg) {\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tg_game().playerLookAt(player->getID(), itemId, pos, stackpos);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0963cb2aca137149", + "equalIndicator/v1": "c020e7c57be903917ebf8870e39b246d70b9feffd5290521ec3dac7cf134968e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1369, + "startColumn": 2, + "charOffset": 40897, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1367, + "startColumn": 1, + "charOffset": 40890, + "charLength": 189, + "snippet": { + "text": "\t}\r\n\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t tier = msg.get();\r\n\tg_game().playerEquipItem(player->getID(), itemId, Item::items[itemId].upgradeClassification > 0, tier);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "73aab12543c7917f", + "equalIndicator/v1": "c024ef514e26cb328a6e028c284c4f97b09e540199c0d469310ab3688b08d654" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Kty', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Kty', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/hash.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4, + "startColumn": 18, + "charOffset": 53, + "charLength": 4, + "snippet": { + "text": "_Kty" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2, + "startColumn": 1, + "charOffset": 14, + "charLength": 81, + "snippet": { + "text": "\r\nnamespace stdext {\r\n\ttemplate \r\n\tusing hash = phmap::Hash<_Kty>;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3af3641d28bc93b3", + "equalIndicator/v1": "c02aaf6f19c59d865729f3741ee48bcfb0dd49998be40d5c13a281d5baa1c8c6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 37, + "startColumn": 18, + "charOffset": 1136, + "charLength": 12, + "snippet": { + "text": "ValueWrapper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 35, + "startColumn": 1, + "charOffset": 987, + "charLength": 348, + "snippet": { + "text": "\texplicit ValueWrapper(uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const ValueVariant &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const std::string &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(bool value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(int value, uint64_t timestamp = 0);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "02f3f1918bd1d065", + "equalIndicator/v1": "c039cf6b84fc24e1a495f08b4b4acd78da21c5623da739e9369082ae716afc73" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1385, + "startColumn": 87, + "charOffset": 40297, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1383, + "startColumn": 1, + "charOffset": 40206, + "charLength": 138, + "snippet": { + "text": "}\r\n\r\nint32_t Tile::getStackposOfItem(std::shared_ptr player, std::shared_ptr item) const {\r\n\tint32_t n = 0;\r\n\tif (ground) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f5963609377c9a87", + "equalIndicator/v1": "c04ac5335438ad5ac53bb60420b72b2bd8513a9842cfe2b38192a105d841d945" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Where', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Where', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/vectorset.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 72, + "startColumn": 56, + "charOffset": 1900, + "charLength": 6, + "snippet": { + "text": "_Where" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 70, + "startColumn": 1, + "charOffset": 1838, + "charLength": 159, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tconstexpr auto insert(std::vector::const_iterator _Where, T &&_Val) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\treturn container.insert(_Where, std::move(_Val));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bebc90960f5c4810", + "equalIndicator/v1": "c07ca9a6b5b37ac0bb1b30552973635a689c3b98521be5ac88e51152cb20ec60" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 14, + "charOffset": 1339, + "charLength": 7, + "snippet": { + "text": "npcType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 1200, + "charLength": 255, + "snippet": { + "text": "\tfloat multiplier = g_configManager().getFloat(RATE_NPC_HEALTH, __FUNCTION__);\r\n\thealth = npcType->info.health * multiplier;\r\n\thealthMax = npcType->info.healthMax * multiplier;\r\n\tbaseSpeed = npcType->info.baseSpeed;\r\n\tinternalLight = npcType->info.light;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8cbf6660ee1c096e", + "equalIndicator/v1": "c089a5e683d9628194b2138d1a78164b2ed26b6d75c9ff1f1945fdfaabe6ce53" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 527, + "startColumn": 2, + "charOffset": 14800, + "charLength": 26, + "snippet": { + "text": "// Game.getBestiaryCharm()" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 525, + "startColumn": 1, + "charOffset": 14737, + "charLength": 177, + "snippet": { + "text": "\r\nint GameFunctions::luaGameGetBestiaryCharm(lua_State* L) {\r\n\t// Game.getBestiaryCharm()\r\n\tconst auto c_list = g_game().getCharmList();\r\n\tlua_createtable(L, c_list.size(), 0);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "69f7f1220986ce8e", + "equalIndicator/v1": "c09ca4086976e13a31204e6fd87d707a93e833fd32b603193bfd33f2fad4d2b9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/talkaction.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 84, + "startColumn": 7, + "charOffset": 2790, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 82, + "startColumn": 1, + "charOffset": 2605, + "charLength": 397, + "snippet": { + "text": "bool TalkAction::executeSay(std::shared_ptr player, const std::string &words, const std::string ¶m, SpeakClasses type) const {\r\n\t// onSay(player, words, param, type)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[TalkAction::executeSay - Player {} words {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested. Script name {}\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "62085dd929bd2a96", + "equalIndicator/v1": "c09ef862b48497c212c8144acca12f272285f5583931bd91253d92bc46388e50" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 278, + "startColumn": 58, + "charOffset": 7723, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 276, + "startColumn": 1, + "charOffset": 7661, + "charLength": 142, + "snippet": { + "text": "}\r\n\r\nvoid BedItem::internalSetSleeper(std::shared_ptr player) {\r\n\tstd::string desc_str = player->getName() + \" is sleeping there.\";\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8131ecb0f1d40ad9", + "equalIndicator/v1": "c0b025a37399902d8b7fed395b53a01e9a78a5c0782bccc6e20ce562c81a6e31" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 34, + "startColumn": 21, + "charOffset": 1057, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 32, + "startColumn": 1, + "charOffset": 941, + "charLength": 166, + "snippet": { + "text": "\tstd::shared_ptr container = getUserdataShared(L, 1);\r\n\tif (container) {\r\n\t\tlua_pushnumber(L, container->size());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1baf3f104f4ccf05", + "equalIndicator/v1": "c0ce619dc1d13e78da05a8d030ea65f7164b8fc954e3a86e6b829befdd3ccb28" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6874, + "startColumn": 15, + "charOffset": 215315, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6872, + "startColumn": 1, + "charOffset": 215254, + "charLength": 99, + "snippet": { + "text": "\tmsg.addByte(cid);\r\n\tmsg.add(slot);\r\n\tAddItem(msg, item);\r\n\twriteToOutputBuffer(msg);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "da1cece9b4882d55", + "equalIndicator/v1": "c10668394c9adc5f7a39537c505acc6cc5e3604ee1b870c58aee90a2079dab69" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4734, + "startColumn": 50, + "charOffset": 149248, + "charLength": 3, + "snippet": { + "text": "npc" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4732, + "startColumn": 1, + "charOffset": 149194, + "charLength": 107, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendShop(std::shared_ptr npc) {\r\n\tBenchmark brenchmark;\r\n\tNetworkMessage msg;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "071f0576baac9a5d", + "equalIndicator/v1": "c114037d2653b12ddedbbad5749ac8898317780747c45bfae3506133098b6c9f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 11, + "charOffset": 1290, + "charLength": 7, + "snippet": { + "text": "npcType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1160, + "charLength": 256, + "snippet": { + "text": "\tcurrentOutfit = npcType->info.outfit;\r\n\tfloat multiplier = g_configManager().getFloat(RATE_NPC_HEALTH, __FUNCTION__);\r\n\thealth = npcType->info.health * multiplier;\r\n\thealthMax = npcType->info.healthMax * multiplier;\r\n\tbaseSpeed = npcType->info.baseSpeed;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "04a577fa6a03204a", + "equalIndicator/v1": "c1141ea43445804bfc4b8955f151eb147dddd5b1d46214f329c102c3970c7b98" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 126, + "startColumn": 46, + "charOffset": 3308, + "charLength": 6, + "snippet": { + "text": "amount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 124, + "startColumn": 1, + "charOffset": 3230, + "charLength": 177, + "snippet": { + "text": "\r\n\tif (bankable->getPlayer()) {\r\n\t\tg_metrics().addCounter(\"balance_decrease\", amount, { { \"player\", bankable->getPlayer()->getName() }, { \"context\", \"bank_transfer\" } });\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9412f3c28392d277", + "equalIndicator/v1": "c12c88c5b0caef11b8d302a0723ea9ad7a339fe244555ecb57620410a4d97357" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 76, + "startColumn": 28, + "charOffset": 2356, + "charLength": 11, + "snippet": { + "text": "getCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 74, + "startColumn": 1, + "charOffset": 2277, + "charLength": 154, + "snippet": { + "text": "\tCreature &operator=(const Creature &) = delete;\r\n\r\n\tstd::shared_ptr getCreature() override final {\r\n\t\treturn static_self_cast();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "47ab6d62b9ba94b4", + "equalIndicator/v1": "c13b3547ea03278ae82819e7e99bc1d66ef0d4dc84a8f0810cef7bb07e468514" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2063, + "startColumn": 57, + "charOffset": 60994, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2061, + "startColumn": 1, + "charOffset": 60933, + "charLength": 116, + "snippet": { + "text": "}\r\n\r\nvoid Player::onSendContainer(std::shared_ptr container) {\r\n\tif (!client || !container) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2fbd2b6c5d09cac8", + "equalIndicator/v1": "c154ef108933580003acc4bda100deef709db91262d86977722df7842c59b3aa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3300, + "startColumn": 65, + "charOffset": 100805, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3298, + "startColumn": 1, + "charOffset": 100736, + "charLength": 119, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureShield(std::shared_ptr creature) {\r\n\tif (!canSee(creature)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bdbc6af35ea53b19", + "equalIndicator/v1": "c1657cc6d68743b28bfa8ab1bd2c044a0d637232f49a39c63481c9fc3d33219c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'speaker' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'speaker' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1154, + "startColumn": 31, + "charOffset": 33969, + "charLength": 7, + "snippet": { + "text": "speaker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1152, + "startColumn": 1, + "charOffset": 33817, + "charLength": 183, + "snippet": { + "text": "\tvoid sendPrivateMessage(std::shared_ptr speaker, SpeakClasses type, const std::string &text) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPrivateMessage(speaker, type, text);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eda073cf7a7f3ddf", + "equalIndicator/v1": "c17ed58fe2d32e27685a8ad0372801af1711f22b23f879267ab268726c1152dd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 660, + "startColumn": 72, + "charOffset": 20134, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 658, + "startColumn": 1, + "charOffset": 19967, + "charLength": 280, + "snippet": { + "text": "\t\tfor (int32_t s = STAT_FIRST; s <= STAT_LAST; ++s) {\r\n\t\t\tif (it.abilities->statsPercent[s]) {\r\n\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "437d1c44cf32c8d2", + "equalIndicator/v1": "c1cb3458da8e491f37e8c5baab2375c643ae8df474c874fdeeffe62fc7c51b98" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 159, + "startColumn": 7, + "charOffset": 5975, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 157, + "startColumn": 1, + "charOffset": 5963, + "charLength": 112, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"{} - \"\r\n\t\t \"Position {}\"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a4004dbbd452b4c0", + "equalIndicator/v1": "c1db9c28bc65f861f0cea13ec4df719920968b9b18ac9e2d1266c133238b42c1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5183, + "startColumn": 53, + "charOffset": 152962, + "charLength": 8, + "snippet": { + "text": "attacked" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5181, + "startColumn": 1, + "charOffset": 152905, + "charLength": 126, + "snippet": { + "text": "}\r\n\r\nvoid Player::removeAttacked(std::shared_ptr attacked) {\r\n\tif (!attacked || attacked == getPlayer()) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1f3808705648fd71", + "equalIndicator/v1": "c1e10c74acc8771804f74f6135999553d6201490c4611ac551286d1864bd550a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 86, + "startColumn": 30, + "charOffset": 2632, + "charLength": 3, + "snippet": { + "text": "get" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 84, + "startColumn": 1, + "charOffset": 2529, + "charLength": 193, + "snippet": { + "text": "\tvoid set(const std::string &key, const ValueWrapper &value) override;\r\n\r\n\tstd::optional get(const std::string &key, bool forceLoad = false) override;\r\n\r\n\tvoid flush() override {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "03969a1f6b525eb0", + "equalIndicator/v1": "c24b89b3fb884c75fb09af0ffe82c94b83f61cc54a1804ab9de5e762949086df" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1793, + "startColumn": 2, + "charOffset": 54005, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1791, + "startColumn": 1, + "charOffset": 53966, + "charLength": 153, + "snippet": { + "text": "\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tbool lootAllCorpses = msg.getByte();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f9ff848363e88fba", + "equalIndicator/v1": "c29aac759a32ef6e82d1c9835a70bc18b24b40bba8b76ec33b58bd33f4bd2ebb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 147, + "startColumn": 7, + "charOffset": 4559, + "charLength": 8, + "snippet": { + "text": "addThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 145, + "startColumn": 1, + "charOffset": 4489, + "charLength": 190, + "snippet": { + "text": "\r\n\tvoid addThing(std::shared_ptr thing) override final;\r\n\tvoid addThing(int32_t index, std::shared_ptr thing) override final;\r\n\tvoid addItemBack(std::shared_ptr item);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0d008b07ce96b602", + "equalIndicator/v1": "c29b0b3c5eb15097ec7de3f90e0e5d0a7975cba65c6f881082ef0b7072346100" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1407, + "startColumn": 31, + "charOffset": 42338, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1405, + "startColumn": 1, + "charOffset": 42225, + "charLength": 131, + "snippet": { + "text": "\tvoid sendPlayerVocation(std::shared_ptr player) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPlayerVocation(player);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b2e4a415531f5dc9", + "equalIndicator/v1": "c29cb9efb0272ef95b58ff8361003ad39e467e83e2cf01e0e928a5fb4b85429a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/metrics/metrics.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 188, + "startColumn": 2, + "charOffset": 6930, + "charLength": 20, + "snippet": { + "text": "DEFINE_LATENCY_CLASS" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 186, + "startColumn": 1, + "charOffset": 6875, + "charLength": 203, + "snippet": { + "text": "\r\n\tDEFINE_LATENCY_CLASS(method, \"method\", \"method\");\r\n\tDEFINE_LATENCY_CLASS(lua, \"lua\", \"scope\");\r\n\tDEFINE_LATENCY_CLASS(query, \"query\", \"truncated_query\");\r\n\tDEFINE_LATENCY_CLASS(task, \"task\", \"task\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9fe21a55d5ea3fd2", + "equalIndicator/v1": "c2a01748caa609b8947c249b238fa2762b7cfdeded904abcbe996b982763fb6d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 522, + "startColumn": 63, + "charOffset": 19724, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 520, + "startColumn": 1, + "charOffset": 19657, + "charLength": 373, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnItemMoved(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnItemMoved - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "95d86829b916ff45", + "equalIndicator/v1": "c2c37d727d7d2b62a7068cd07f1bf3743d38d27ace304484abaf5b4a816a3c86" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 741, + "startColumn": 81, + "charOffset": 23387, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 739, + "startColumn": 1, + "charOffset": 23302, + "charLength": 139, + "snippet": { + "text": "}\r\n\r\nvoid Party::addPlayerLoot(std::shared_ptr player, std::shared_ptr item) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f7b5746f14c38fc1", + "equalIndicator/v1": "c3066f8d65a99d3fc71d5c618f6bb511e55d7631a69e0dfe8ae163139374fc0a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 554, + "startColumn": 14, + "charOffset": 15857, + "charLength": 8, + "snippet": { + "text": "tileItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 552, + "startColumn": 1, + "charOffset": 15836, + "charLength": 176, + "snippet": { + "text": "\t\t\t}\r\n\r\n\t\t\tfor (auto tileItem : *tile->getItemList()) {\r\n\t\t\t\tif (tileItem && tileItem->getID() == item->getID()) {\r\n\t\t\t\t\ttile->removeThing(tileItem, tileItem->getItemCount());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "242c823482c0a50b", + "equalIndicator/v1": "c31b02b15d7a074d70561fc1744aa2b8a6b814f7a07131d0d1cbba27e3c7782f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 585, + "startColumn": 103, + "charOffset": 28039, + "charLength": 14, + "snippet": { + "text": "valueAttribute" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 583, + "startColumn": 1, + "charOffset": 27718, + "charLength": 522, + "snippet": { + "text": "\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentpoison\" || stringValue == \"absorbpercentearth\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentice\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += pugi::cast(valueAttribute.value());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b0b7bd718cd354e9", + "equalIndicator/v1": "c34a061f00d1d8fdd116e00a22f97c6a95b38f7fe03fcf318ffc9fa708c3e2b5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 373, + "startColumn": 4, + "charOffset": 12367, + "charLength": 88, + "snippet": { + "text": "case COMBAT_DEATHDAMAGE:\r\n\t\t\t\tdefaultMap[6] -= static_cast(elementEntry.second)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 371, + "startColumn": 1, + "charOffset": 12287, + "charLength": 207, + "snippet": { + "text": "\t\t\t\tdefaultMap[5] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_DEATHDAMAGE:\r\n\t\t\t\tdefaultMap[6] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_HEALING:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5734cc58448cf5f8", + "equalIndicator/v1": "c3656cff8ff21d88f120404e6fb5536c04fa4e3bbd69e35605176af95ab3daf3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 154, + "startColumn": 6, + "charOffset": 5077, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 152, + "startColumn": 1, + "charOffset": 5047, + "charLength": 114, + "snippet": { + "text": "\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tuint16_t sourceId = pugi::cast(attr.value());\r\n\r\n\t\t\t\t\tuint16_t count = 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9fbd7962898970f3", + "equalIndicator/v1": "c36fb7b781603139df6bffc2f9948864102000a496adaf965a34293acb79b54e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1315, + "startColumn": 7, + "charOffset": 46637, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1313, + "startColumn": 1, + "charOffset": 46625, + "charLength": 149, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventMonsterOnDropLoot - \"\r\n\t\t \"Monster corpse {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d5df04e310733545", + "equalIndicator/v1": "c38da5b6799100f1308d72b43951dae871cfd9559be7d6a520db079b6f03f28f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5517, + "startColumn": 57, + "charOffset": 194247, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5515, + "startColumn": 1, + "charOffset": 194186, + "charLength": 212, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerLootAllCorpses(std::shared_ptr player, const Position &pos, bool lootAllCorpses) {\r\n\tif (lootAllCorpses) {\r\n\t\tstd::shared_ptr tile = g_game().map.getTile(pos.x, pos.y, pos.z);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71a466e3f759c985", + "equalIndicator/v1": "c39b169925ec84a1990b5dbf87bc001f615f1e6fed383a4e426d6f879c824395" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6309, + "startColumn": 51, + "charOffset": 184848, + "charLength": 8, + "snippet": { + "text": "vocation" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6307, + "startColumn": 1, + "charOffset": 184679, + "charLength": 369, + "snippet": { + "text": "\tstd::shared_ptr condition = getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT);\r\n\tif (condition) {\r\n\t\tcondition->setParam(CONDITION_PARAM_HEALTHGAIN, vocation->getHealthGainAmount());\r\n\t\tcondition->setParam(CONDITION_PARAM_HEALTHTICKS, vocation->getHealthGainTicks());\r\n\t\tcondition->setParam(CONDITION_PARAM_MANAGAIN, vocation->getManaGainAmount());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ef5d5617a169e6ef", + "equalIndicator/v1": "c3b910edc023bc86e0cd73239bd64bde13ba78ecd84438cddd267eb2da892cdf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 782, + "startColumn": 27, + "charOffset": 28288, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 780, + "startColumn": 1, + "charOffset": 28256, + "charLength": 128, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnItemMoved, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5584d755862c201e", + "equalIndicator/v1": "c3cd3b597d954be51092a366504bae11dc26a5261755aa7fa4bffa3b9b9d8c54" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'lastItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'lastItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6878, + "startColumn": 94, + "charOffset": 215449, + "charLength": 8, + "snippet": { + "text": "lastItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6876, + "startColumn": 1, + "charOffset": 215351, + "charLength": 153, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendRemoveContainerItem(uint8_t cid, uint16_t slot, std::shared_ptr lastItem) {\r\n\tNetworkMessage msg;\r\n\tmsg.addByte(0x72);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "39aa4814cf76582b", + "equalIndicator/v1": "c40b43c7012ede4df3a8ef21bbed15149eb59596e1eae2f31131622ed7394db1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'condition' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'condition' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1447, + "startColumn": 59, + "charOffset": 44152, + "charLength": 9, + "snippet": { + "text": "condition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1445, + "startColumn": 1, + "charOffset": 44089, + "charLength": 180, + "snippet": { + "text": "}\r\n\r\nvoid Creature::removeCondition(std::shared_ptr condition) {\r\n\tauto it = std::find(conditions.begin(), conditions.end(), condition);\r\n\tif (it == conditions.end()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5bfc567e765c329c", + "equalIndicator/v1": "c4242648b5d13705d0185276600224350ad66325fdbde21110efbf300f4c16e9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 112, + "startColumn": 30, + "charOffset": 3347, + "charLength": 32, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 110, + "startColumn": 1, + "charOffset": 3170, + "charLength": 364, + "snippet": { + "text": "\tbool registerLuaItemEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaActionEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaUniqueEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaPositionEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaEvent(const std::shared_ptr event);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1b12238c6227a6ce", + "equalIndicator/v1": "c43f79316cffa44c896902425e91ffa824c3bc350e1432bae9ecc08520e7fe4d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 189, + "startColumn": 73, + "charOffset": 6047, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 187, + "startColumn": 1, + "charOffset": 5882, + "charLength": 280, + "snippet": { + "text": "\t\t\t\tif (it.abilities && it.abilities->statsPercent[s] != 0) {\r\n\t\t\t\t\tneedUpdateStats = true;\r\n\t\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\r\n\t\t\t\t}\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d082d9a41bdb6667", + "equalIndicator/v1": "c44ad9f66a938fcbf2b1a0812e9ce767fc97a9594212e28a0cf960ef6b3be72e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/attribute.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 144, + "startColumn": 50, + "charOffset": 4482, + "charLength": 10, + "snippet": { + "text": "const bool" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 142, + "startColumn": 1, + "charOffset": 4285, + "charLength": 309, + "snippet": { + "text": "\tvoid setCustomAttribute(const std::string &key, const std::string &value);\r\n\tvoid setCustomAttribute(const std::string &key, const double value);\r\n\tvoid setCustomAttribute(const std::string &key, const bool value);\r\n\r\n\tvoid addCustomAttribute(const std::string &key, const CustomAttribute &customAttribute);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ffb4d30ab4859b7a", + "equalIndicator/v1": "c45136c2c783d055b31379c46c4ad140bb99e71ff01f9dedb5d2acc3e20fc4c2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 408, + "startColumn": 128, + "charOffset": 15364, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 406, + "startColumn": 1, + "charOffset": 15232, + "charLength": 280, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnLookInTrade(std::shared_ptr player, std::shared_ptr partner, std::shared_ptr item, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLookInTrade - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b5430fdca4406a6e", + "equalIndicator/v1": "c456eb9ea7effd58e2ad0d36f9763b9782108ff047cd6c4732f49efc9751f000" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 738, + "startColumn": 7, + "charOffset": 26467, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 736, + "startColumn": 1, + "charOffset": 26455, + "charLength": 148, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnMoveItem - \"\r\n\t\t \"Player {} item {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e53967257884b96e", + "equalIndicator/v1": "c47a969c49f50aa7bfd58fbbe718116413a0756af03a4eb2228efb2a57a491ad" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/inbox/inbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 62, + "startColumn": 13, + "charOffset": 1776, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 60, + "startColumn": 1, + "charOffset": 1759, + "charLength": 227, + "snippet": { + "text": "}\r\n\r\nvoid Inbox::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tstd::shared_ptr localParent = getParent();\r\n\tif (localParent != nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c6a2cf5fd516bafd", + "equalIndicator/v1": "c49b4ab63284acd01a9de1f656841f5829ecd659380d4b2eff93580f2f654189" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3170, + "startColumn": 2, + "charOffset": 97331, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3168, + "startColumn": 1, + "charOffset": 97227, + "charLength": 262, + "snippet": { + "text": "void ProtocolGame::parseSeekInContainer(NetworkMessage &msg) {\r\n\tuint8_t containerId = msg.getByte();\r\n\tuint16_t index = msg.get();\r\n\tauto primaryType = msg.getByte();\r\n\tg_game().playerSeekInContainer(player->getID(), containerId, index, primaryType);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "82e4c66730c1127f", + "equalIndicator/v1": "c49b4eb797e034063b26f37ab680050a71b14715c503312736b11512faf27c5b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')", + "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2348, + "startColumn": 23, + "charOffset": 69278, + "charLength": 15, + "snippet": { + "text": "magLevelPercent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2346, + "startColumn": 1, + "charOffset": 69231, + "charLength": 169, + "snippet": { + "text": "\tmanaSpent += amount;\r\n\r\n\tuint8_t oldPercent = magLevelPercent;\r\n\tif (nextReqMana > currReqMana) {\r\n\t\tmagLevelPercent = Player::getPercentLevel(manaSpent, nextReqMana);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "221e0f48c1c62109", + "equalIndicator/v1": "c4c472b0fc7247c862bee667f17d7240c3755157a796d1688fb5a93de219cd47" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 669, + "startColumn": 25, + "charOffset": 21624, + "charLength": 13, + "snippet": { + "text": "imbuementInfo" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 667, + "startColumn": 1, + "charOffset": 21593, + "charLength": 145, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tfloat damagePercent = imbuementInfo.imbuement->elementDamage / 100.0;\r\n\r\n\t\tdamage.secondary.type = imbuementInfo.imbuement->combatType;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6fd9933bfc57e814", + "equalIndicator/v1": "c4e5c09e93ade4fe25e0e3b3b06ae066e18a0a47d59b98f95b95f899c68a02bf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 342, + "startColumn": 7, + "charOffset": 12216, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 340, + "startColumn": 1, + "charOffset": 12204, + "charLength": 151, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventCreatureOnHear - \"\r\n\t\t \"Creature {} speaker {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "df430db853e3405a", + "equalIndicator/v1": "c50a562ce854877de50169c8d9241725633cd5ef8456b94929eb1633b00da053" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 420, + "startColumn": 44, + "charOffset": 14073, + "charLength": 11, + "snippet": { + "text": "totalWeight" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 418, + "startColumn": 1, + "charOffset": 14000, + "charLength": 254, + "snippet": { + "text": "\t\ttotalWeight += weight;\r\n\t}\r\n\tuint32_t randomWeight = uniform_random(0, totalWeight - 1);\r\n\t// order monsters by weight DESC\r\n\tstd::vector, uint32_t>> orderedMonsterTypes(monsterTypes.begin(), monsterTypes.end());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8d39539351d51b0a", + "equalIndicator/v1": "c51cb20090ae289c2650bca69bd66eafffaade0e3792effed82bb53d36f4998a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'acc' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'acc' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1076, + "startColumn": 89, + "charOffset": 44817, + "charLength": 3, + "snippet": { + "text": "acc" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1074, + "startColumn": 1, + "charOffset": 44724, + "charLength": 243, + "snippet": { + "text": "}\r\n\r\nstd::vector> Game::getPlayersByAccount(std::shared_ptr acc, bool allowOffline /* = false */) {\r\n\tauto [accountPlayers, error] = acc->getAccountPlayers();\r\n\tif (error != enumToValue(AccountErrors_t::Ok)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cbb4e0d0f2fd2890", + "equalIndicator/v1": "c528686be44f51c2cd9faa1f003e684b558fba2901679f3675c276d4d261dedf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 673, + "startColumn": 13, + "charOffset": 20989, + "charLength": 1, + "snippet": { + "text": "n" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 671, + "startColumn": 1, + "charOffset": 20841, + "charLength": 185, + "snippet": { + "text": "\t\t\tif (listItem != item && listItem->equals(item) && listItem->getItemCount() < listItem->getStackSize()) {\r\n\t\t\t\t*destItem = listItem;\r\n\t\t\t\tindex = n;\r\n\t\t\t\treturn getContainer();\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8d257f92716a83d2", + "equalIndicator/v1": "c52b45e075bf83914916f9b28b2f77c170eaa0b3dc1459e18a782919d2ebf8f0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 218, + "startColumn": 2, + "charOffset": 8998, + "charLength": 1271, + "snippet": { + "text": "const __m128i key = _mm_set1_epi32(xy);\r\n\r\n\tint32_t pos = 0;\r\n\tint32_t curRound = curNode - 16;\r\n\tfor (; pos <= curRound; pos += 16) {\r\n\t\t__m128i v[4];\r\n\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);\r\n\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);\r\n\t\tv[2] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 8])), key);\r\n\t\tv[3] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 12])), key);\r\n\t\tconst uint32_t mask = _mm_movemask_epi8(_mm_packs_epi16(_mm_packs_epi32(v[0], v[1]), _mm_packs_epi32(v[2], v[3])));\r\n\t\tif (mask != 0) {\r\n\t\t\treturn &nodes[pos + _mm_ctz(mask)];\r\n\t\t}\r\n\t}\r\n\tcurRound = curNode - 8;\r\n\tif (pos <= curRound) {\r\n\t\t__m128i v[2];\r\n\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);\r\n\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);\r\n\t\tconst uint32_t mask = _mm_movemask_epi8(_mm_packs_epi32(v[0], v[1]));\r\n\t\tif (mask != 0) {\r\n\t\t\treturn &nodes[pos + (_mm_ctz(mask) >> 1)];\r\n\t\t}\r\n\t\tpos += 8;\r\n\t}\r\n\tfor (; pos < curNode; ++pos) {\r\n\t\tif (nodesTable[pos] == xy) {\r\n\t\t\treturn &nodes[p" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 216, + "startColumn": 1, + "charOffset": 8943, + "charLength": 1340, + "snippet": { + "text": "\tuint32_t xy = (x << 16) | y;\r\n#if defined(__SSE2__)\r\n\tconst __m128i key = _mm_set1_epi32(xy);\r\n\r\n\tint32_t pos = 0;\r\n\tint32_t curRound = curNode - 16;\r\n\tfor (; pos <= curRound; pos += 16) {\r\n\t\t__m128i v[4];\r\n\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);\r\n\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);\r\n\t\tv[2] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 8])), key);\r\n\t\tv[3] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 12])), key);\r\n\t\tconst uint32_t mask = _mm_movemask_epi8(_mm_packs_epi16(_mm_packs_epi32(v[0], v[1]), _mm_packs_epi32(v[2], v[3])));\r\n\t\tif (mask != 0) {\r\n\t\t\treturn &nodes[pos + _mm_ctz(mask)];\r\n\t\t}\r\n\t}\r\n\tcurRound = curNode - 8;\r\n\tif (pos <= curRound) {\r\n\t\t__m128i v[2];\r\n\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);\r\n\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);\r\n\t\tconst uint32_t mask = _mm_movemask_epi8(_mm_packs_epi32(v[0], v[1]));\r\n\t\tif (mask != 0) {\r\n\t\t\treturn &nodes[pos + (_mm_ctz(mask) >> 1)];\r\n\t\t}\r\n\t\tpos += 8;\r\n\t}\r\n\tfor (; pos < curNode; ++pos) {\r\n\t\tif (nodesTable[pos] == xy) {\r\n\t\t\treturn &nodes[pos];\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2569dd1f870b8550", + "equalIndicator/v1": "c52cda06c5a8c3733e7e3915e3536e11da244a38394fd7a78aa7f899d042d4ff" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 845, + "startColumn": 27, + "charOffset": 30563, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 843, + "startColumn": 1, + "charOffset": 30531, + "charLength": 131, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnMoveCreature, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b2ac02eb64c4b1b3", + "equalIndicator/v1": "c5446e061b157c2dacbd577c37217df180c236aeea08a2dbdacf803ceedd8354" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 157, + "startColumn": 9, + "charOffset": 5076, + "charLength": 12, + "snippet": { + "text": "getLastIndex" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 155, + "startColumn": 1, + "charOffset": 4945, + "charLength": 371, + "snippet": { + "text": "\tint32_t getThingIndex(std::shared_ptr thing) const override final;\r\n\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::map &getAllItemTypeCount(std::map &countMap) const override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "95dd1c6854b0cfc9", + "equalIndicator/v1": "c544f6796049eea4c57088e68a8d0a1b709a0af2d5865dfdd7cb25b6e84f5d0e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1355, + "startColumn": 95, + "charOffset": 39689, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1353, + "startColumn": 1, + "charOffset": 39590, + "charLength": 146, + "snippet": { + "text": "}\r\n\r\nint32_t Tile::getStackposOfCreature(std::shared_ptr player, std::shared_ptr creature) const {\r\n\tint32_t n;\r\n\tif (ground) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c279195c2c2b1d8b", + "equalIndicator/v1": "c54a45b62a52f1656f4260bbdf99bb2e955bde3f7dc1649832a73b62f7c7a7a9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 174, + "startColumn": 11, + "charOffset": 6074, + "charLength": 10, + "snippet": { + "text": "getOwnerId" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 172, + "startColumn": 1, + "charOffset": 5972, + "charLength": 172, + "snippet": { + "text": "\tvirtual void removeItem(std::shared_ptr thing, bool sendUpdateToClient = false);\r\n\r\n\tuint32_t getOwnerId() const override final;\r\n\r\n\tbool isAnyKindOfRewardChest();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c9ad7219df6b5f34", + "equalIndicator/v1": "c56697eb89cd1c2a74a0d2f0c180e07fa698a0770b7099ec72883b34cc790ac7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1330, + "startColumn": 98, + "charOffset": 39147, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1328, + "startColumn": 1, + "charOffset": 39045, + "charLength": 149, + "snippet": { + "text": "}\r\n\r\nint32_t Tile::getClientIndexOfCreature(std::shared_ptr player, std::shared_ptr creature) const {\r\n\tint32_t n;\r\n\tif (ground) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f6aae94d1160f9f5", + "equalIndicator/v1": "c5753511ce143392588f957af49d9d3308067c98f217f249966d194a41298fdc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned long long' to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'unsigned long long' to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/network/network_message_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 60, + "startColumn": 21, + "charOffset": 1826, + "charLength": 7, + "snippet": { + "text": "message" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 58, + "startColumn": 1, + "charOffset": 1724, + "charLength": 159, + "snippet": { + "text": "\tconst auto &message = getUserdataShared(L, 1);\r\n\tif (message) {\r\n\t\tlua_pushnumber(L, message->get());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d7e538b021992147", + "equalIndicator/v1": "c5b008c65fc0c51e807436105002509ce165766efa69b53e2cc05edd13cd6bc5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 44, + "startColumn": 4, + "charOffset": 1172, + "charLength": 9, + "snippet": { + "text": "interface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 42, + "startColumn": 1, + "charOffset": 1110, + "charLength": 133, + "snippet": { + "text": "\t\t// nested callbacks are not allowed\r\n\t\tif (interface) {\r\n\t\t\tinterface->reportErrorFunc(\"Nested callbacks!\");\r\n\t\t}\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8a69b51faf72a437", + "equalIndicator/v1": "c5b085bc62aa61c4cebdf388a1306a9261bd152d152733ddc85cffe1389c48e8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 673, + "startColumn": 15, + "charOffset": 22037, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 671, + "startColumn": 1, + "charOffset": 21997, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 0.80f) + 3;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "76df6092bb5abdf8", + "equalIndicator/v1": "c5b4c63b47509a54d65e54c6fe2bc50cc5592aaadfd3b8a9931bd7178d8f33b5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Annotate this function with 'override' or (rarely) 'final'", + "markdown": "Annotate this function with 'override' or (rarely) 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 126, + "startColumn": 3, + "charOffset": 3334, + "charLength": 6, + "snippet": { + "text": "Player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 124, + "startColumn": 1, + "charOffset": 3291, + "charLength": 73, + "snippet": { + "text": "\r\n\texplicit Player(ProtocolGame_ptr p);\r\n\t~Player();\r\n\r\n\t// non-copyable\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e5cc0ef2b54b51b5", + "equalIndicator/v1": "c5c8d296eca93224ab6736e08968a2c3faa18529b34f3d243528b56d63de29ab" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 238, + "startColumn": 15, + "charOffset": 7777, + "charLength": 16, + "snippet": { + "text": "internalAddThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 236, + "startColumn": 1, + "charOffset": 7697, + "charLength": 204, + "snippet": { + "text": "\r\n\tvoid internalAddThing(std::shared_ptr thing) override;\r\n\tvoid virtual internalAddThing(uint32_t index, std::shared_ptr thing) override;\r\n\r\n\tconst Position &getPosition() override final {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "59fda8d8486aa759", + "equalIndicator/v1": "c5cad44afbd5a0c38ab95993abfae8ca135120e2b503298e9d089c0883c50554" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1811, + "startColumn": 68, + "charOffset": 48879, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1809, + "startColumn": 1, + "charOffset": 48807, + "charLength": 163, + "snippet": { + "text": "}\r\n\r\nbool ConditionFeared::getRandomDirection(std::shared_ptr creature, Position pos) {\r\n\tstatic std::vector directions {\r\n\t\tDIRECTION_NORTH,\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e4622e03576065fd", + "equalIndicator/v1": "c5cf73d707f68a3e3a0887e91d3681970e80077e21a9816a727246edd7ded4bd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1122, + "startColumn": 51, + "charOffset": 36714, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1120, + "startColumn": 1, + "charOffset": 36659, + "charLength": 269, + "snippet": { + "text": "}\r\n\r\nvoid Combat::CombatFunc(std::shared_ptr caster, const Position &origin, const Position &pos, const std::unique_ptr &area, const CombatParams ¶ms, CombatFunction func, CombatDamage* data) {\r\n\tstd::vector> tileList;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c89a05eb5c859d55", + "equalIndicator/v1": "c61643ef5611f631f37fa5b593fc97077dc0f08f44074eb7f771de5ae8177a07" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::_Tree, std::shared_ptr, std::less>, std::allocator, std::shared_ptr>>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::_Tree, std::shared_ptr, std::less\\>, std::allocator, std::shared_ptr\\>\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 224, + "startColumn": 57, + "charOffset": 7029, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 222, + "startColumn": 1, + "charOffset": 6968, + "charLength": 134, + "snippet": { + "text": "}\r\n\r\nint GameFunctions::luaGameGetMonsterTypes(lua_State* L) {\r\n\t// Game.getMonsterTypes()\r\n\tconst auto type = g_monsters().monsters;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f51483a865158482", + "equalIndicator/v1": "c622f8b5bb64f14f4b9bcad5fd38b458f6206531e1b84cddd1e8249222fa8298" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 762, + "startColumn": 20, + "charOffset": 29376, + "charLength": 6, + "snippet": { + "text": "rawExp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 760, + "startColumn": 1, + "charOffset": 29329, + "charLength": 117, + "snippet": { + "text": "\r\n\tlua_pushnumber(L, exp);\r\n\tlua_pushnumber(L, rawExp);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 4, 1) != 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "05604dab05f94c34", + "equalIndicator/v1": "c636be510befa2112bf26e390fc80cdccd574d04a0c58f71ea04da7f680eedb2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1438, + "startColumn": 41, + "charOffset": 51065, + "charLength": 17, + "snippet": { + "text": "m_playerBonusData" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1436, + "startColumn": 1, + "charOffset": 50931, + "charLength": 191, + "snippet": { + "text": "\t// Leech\r\n\tsetPlayerCombatStats(COMBAT_LIFEDRAIN, m_playerBonusData.leech.lifeLeech * 100);\r\n\tsetPlayerCombatStats(COMBAT_MANADRAIN, m_playerBonusData.leech.manaLeech * 100);\r\n\r\n\t// Instant\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ceb82c988fc16068", + "equalIndicator/v1": "c66efbbeb4874b943afe2d66b101e1a237618eb8ac8d0ec9d7c8b19473dd1ca8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 727, + "startColumn": 7, + "charOffset": 22521, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 725, + "startColumn": 1, + "charOffset": 22509, + "charLength": 166, + "snippet": { + "text": "\t}\r\n\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tif (item != nullptr) {\r\n\t\t\tg_logger().error(\"[MoveEvent::executeStep - Creature {} item {}, position {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0caf87f2eff1d176", + "equalIndicator/v1": "c67d366eebdaf1f5bcc0e06c4476abc6781d19a18fb169fb7c1f521541187398" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: type", + "markdown": "Constructor does not initialize these fields: type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 45, + "startColumn": 7, + "charOffset": 1293, + "charLength": 12, + "snippet": { + "text": "TileCallback" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 43, + "startColumn": 1, + "charOffset": 1281, + "charLength": 151, + "snippet": { + "text": "};\r\n\r\nclass TileCallback final : public CallBack {\r\npublic:\r\n\tvoid onTileCombat(std::shared_ptr creature, std::shared_ptr tile) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "33e2f02baf2d43be", + "equalIndicator/v1": "c681bccd36523227faa7d865883c6ff5c13df24a83cf0b2696e678e6c8391ec6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'fromCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'fromCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1840, + "startColumn": 101, + "charOffset": 71727, + "charLength": 12, + "snippet": { + "text": "fromCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1838, + "startColumn": 1, + "charOffset": 71622, + "charLength": 279, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::shared_ptr fromCylinder, std::shared_ptr toCylinder, std::shared_ptr item, Position toPos) {\r\n\tif (!player || !toCylinder || !item) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6f48521851f5764e", + "equalIndicator/v1": "c689838cd09db5c407ccc11d8d683d767579be4e89a5ee7647cf9773fd3d450e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 167, + "startColumn": 46, + "charOffset": 5091, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 165, + "startColumn": 1, + "charOffset": 5041, + "charLength": 194, + "snippet": { + "text": "}\r\n\r\nbool Weapon::useFist(std::shared_ptr player, std::shared_ptr target) {\r\n\tif (!Position::areInRange<1, 1>(player->getPosition(), target->getPosition())) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4d5ccd204a7b62cc", + "equalIndicator/v1": "c690ba6c46480e214e4d5cd1689b3c7f4296a14b0d5f46e1612e7f1e7036c352" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 695, + "startColumn": 32, + "charOffset": 22714, + "charLength": 13, + "snippet": { + "text": "groupCooldown" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 693, + "startColumn": 1, + "charOffset": 22654, + "charLength": 193, + "snippet": { + "text": "\r\n\tif (groupCooldown > 0) {\r\n\t\tint32_t spellGroupCooldown = groupCooldown;\r\n\t\tif (isUpgraded) {\r\n\t\t\tspellGroupCooldown -= getWheelOfDestinyBoost(WheelSpellBoost_t::GROUP_COOLDOWN, spellGrade);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1e35cc6c80c0afcc", + "equalIndicator/v1": "c6c5aa5973961541f53c648a8c0702317ded2357ef1d20bfeb17c7a7648c38df" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 709, + "startColumn": 7, + "charOffset": 25205, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 707, + "startColumn": 1, + "charOffset": 25193, + "charLength": 144, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnMove - \"\r\n\t\t \"Player {} item {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f16469b190dbc16d", + "equalIndicator/v1": "c6d4289d59536fa7cebc67910952d087a29235beb1a977338c8d064a8afd1572" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1628, + "startColumn": 2, + "charOffset": 57021, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1626, + "startColumn": 1, + "charOffset": 57014, + "charLength": 47, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface->resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c01e49200c472193", + "equalIndicator/v1": "c7041a26e75f99842f99c46ec476a3d78cefaed58292f4a6b34669f3b191f036" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 21, + "startColumn": 21, + "charOffset": 829, + "charLength": 8, + "snippet": { + "text": "lootList" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 19, + "startColumn": 1, + "charOffset": 693, + "charLength": 176, + "snippet": { + "text": "\r\nvoid MonsterTypeFunctions::createMonsterTypeLootLuaTable(lua_State* L, const std::vector &lootList) {\r\n\tlua_createtable(L, lootList.size(), 0);\r\n\r\n\tint index = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2180dd10f2cb0815", + "equalIndicator/v1": "c7060fd2a9d4f9d84ecd1eebdd4dc12c6d4ccd3ff322ad2d7223bbc7bb765e46" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'uint16_t' (aka 'unsigned short')", + "markdown": "Narrowing conversion from 'double' to 'uint16_t' (aka 'unsigned short')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 177, + "startColumn": 27, + "charOffset": 7133, + "charLength": 64, + "snippet": { + "text": "(std::floor(100. - itemType.abilities->absorbPercent[i]) / 100.)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 175, + "startColumn": 1, + "charOffset": 7055, + "charLength": 152, + "snippet": { + "text": "\r\n\t\t\tfor (uint16_t i = 0; i < COMBAT_COUNT; ++i) {\r\n\t\t\t\tdamageModifiers[i] *= (std::floor(100. - itemType.abilities->absorbPercent[i]) / 100.);\r\n\t\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f4832481af521118", + "equalIndicator/v1": "c7150dbf34dabaaa6c4307794f10555fc29e70ba86a9d28aa65997ef7f642956" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1157, + "startColumn": 59, + "charOffset": 35985, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1155, + "startColumn": 1, + "charOffset": 35922, + "charLength": 140, + "snippet": { + "text": "}\r\n\r\ndouble Creature::getDamageRatio(std::shared_ptr attacker) const {\r\n\tuint32_t totalDamage = 0;\r\n\tuint32_t attackerDamage = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75ee2c0bedc22d4d", + "equalIndicator/v1": "c72b19527a45d6329084b249eb0e2c1df51e7e680388da089dfdd32b307d9a7e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 194, + "startColumn": 35, + "charOffset": 5955, + "charLength": 7, + "snippet": { + "text": "npcType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 192, + "startColumn": 1, + "charOffset": 5794, + "charLength": 325, + "snippet": { + "text": "\r\n\t\tif (!npcType->info.soundVector.empty() && (npcType->info.soundChance >= static_cast(uniform_random(1, 100)))) {\r\n\t\t\tauto index = uniform_random(0, npcType->info.soundVector.size() - 1);\r\n\t\t\tg_game().sendSingleSoundEffect(static_self_cast()->getPosition(), npcType->info.soundVector[index], getNpc());\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d6d47c4df238210a", + "equalIndicator/v1": "c734043385011a3681916f2e59994b1f5e8fb5220abdf8bdb7b9c97fa3e6e172" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2820, + "startColumn": 2, + "charOffset": 86185, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2818, + "startColumn": 1, + "charOffset": 86086, + "charLength": 208, + "snippet": { + "text": "\tcharmRune_t runeID = static_cast(msg.getByte());\r\n\tuint8_t action = msg.getByte();\r\n\tuint16_t raceid = msg.get();\r\n\tg_iobestiary().sendBuyCharmRune(player, runeID, action, raceid);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eda7271e53576830", + "equalIndicator/v1": "c7423f69c53112458ab8c4acab235ec815bd2c2038a830c4096a083235083308" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 50, + "startColumn": 72, + "charOffset": 1532, + "charLength": 9, + "snippet": { + "text": "moveEvent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 48, + "startColumn": 1, + "charOffset": 1456, + "charLength": 172, + "snippet": { + "text": "}\r\n\r\nbool MoveEvents::registerLuaItemEvent(const std::shared_ptr moveEvent) {\r\n\tauto itemIdVector = moveEvent->getItemIdsVector();\r\n\tif (itemIdVector.empty()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "31515f3bc266444d", + "equalIndicator/v1": "c74adb46bbecf343c07fae2c69aa09d9368b881cb562061b0d0eb1c7ada01dfe" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'condition' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'condition' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 322, + "startColumn": 53, + "charOffset": 10709, + "charLength": 9, + "snippet": { + "text": "condition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 320, + "startColumn": 1, + "charOffset": 10626, + "charLength": 149, + "snippet": { + "text": "\t\treturn area != nullptr;\r\n\t}\r\n\tvoid addCondition(const std::shared_ptr condition) {\r\n\t\tparams.conditionList.emplace_back(condition);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f31f7f5af9e0b868", + "equalIndicator/v1": "c74c59d7e2e3603e15c26529bbea0ee5c5219e48a16519822111cc9171a3a514" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Escaped string literal can be written as a raw string literal", + "markdown": "Escaped string literal can be written as a raw string literal" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 130, + "startColumn": 15, + "charOffset": 4115, + "charLength": 21, + "snippet": { + "text": "\"\\\"description\\\": \\\"\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 128, + "startColumn": 1, + "charOffset": 4024, + "charLength": 214, + "snippet": { + "text": "\t\tpayload << \"\\\"title\\\": \\\"\" << title << \"\\\", \";\r\n\t\tif (!message.empty()) {\r\n\t\t\tpayload << \"\\\"description\\\": \\\"\" << message << \"\\\", \";\r\n\t\t}\r\n\t\tif (g_configManager().getBoolean(DISCORD_SEND_FOOTER, __FUNCTION__)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a04986faf44daca0", + "equalIndicator/v1": "c7dfed97573832fbeb4e5acbfdba4f3febbdf1f26c888f4df5868ab5c9a8cb0e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 555, + "startColumn": 63, + "charOffset": 21427, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 553, + "startColumn": 1, + "charOffset": 21360, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerInbox(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eb52c5fefc6ff7c9", + "equalIndicator/v1": "c7eb2991aa51aad8283b5d5eb2b53072f546d4eddc7750a49ba37b9d7ed5df2d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6132, + "startColumn": 50, + "charOffset": 211804, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6130, + "startColumn": 1, + "charOffset": 211750, + "charLength": 280, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerWhisper(std::shared_ptr player, const std::string &text) {\r\n\tauto spectators = Spectators().find(player->getPosition(), false, MAP_MAX_CLIENT_VIEW_PORT_X, MAP_MAX_CLIENT_VIEW_PORT_X, MAP_MAX_CLIENT_VIEW_PORT_Y, MAP_MAX_CLIENT_VIEW_PORT_Y);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "16707216cd193c8a", + "equalIndicator/v1": "c7fa12677e8aa5aad50a501a528bd9c61cd99d00e06804aa04cdbca51f70b930" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 137, + "startColumn": 48, + "charOffset": 3694, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 135, + "startColumn": 1, + "charOffset": 3642, + "charLength": 118, + "snippet": { + "text": "}\r\n\r\nbool BedItem::trySleep(std::shared_ptr player) {\r\n\tif (!house || player->isRemoved()) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8d13adac225c8da5", + "equalIndicator/v1": "c817b69075ffe9293d81490e2c00041058e59af8ef48693015b13448e25f711c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'nextBedItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'nextBedItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 120, + "startColumn": 54, + "charOffset": 3173, + "charLength": 11, + "snippet": { + "text": "nextBedItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 118, + "startColumn": 1, + "charOffset": 3115, + "charLength": 115, + "snippet": { + "text": "}\r\n\r\nbool BedItem::isBedComplete(std::shared_ptr nextBedItem) {\r\n\tconst ItemType &it = Item::items[id];\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e474df5cab30c691", + "equalIndicator/v1": "c820a9831ff96ff4c814fe5b25283678eec5682c1b0d7abbe78246c878171cc3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2786, + "startColumn": 3, + "charOffset": 82892, + "charLength": 8, + "snippet": { + "text": "uint64_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2784, + "startColumn": 1, + "charOffset": 82871, + "charLength": 311, + "snippet": { + "text": "\r\n\t\t// Level loss\r\n\t\tuint64_t expLoss = static_cast(experience * deathLossPercent);\r\n\t\tg_events().eventPlayerOnLoseExperience(static_self_cast(), expLoss);\r\n\t\tg_callbacks().executeCallback(EventCallback_t::playerOnLoseExperience, &EventCallback::playerOnLoseExperience, getPlayer(), expLoss);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "729b71945485428f", + "equalIndicator/v1": "c82632a935a69a1f90047b5b2143ea8dfa20e511d9785fc14e0248debfcfa192" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'podium' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'podium' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2517, + "startColumn": 36, + "charOffset": 73072, + "charLength": 6, + "snippet": { + "text": "podium" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2515, + "startColumn": 1, + "charOffset": 72890, + "charLength": 228, + "snippet": { + "text": "\tvoid sendMonsterPodiumWindow(std::shared_ptr podium, const Position &position, uint16_t itemId, uint8_t stackpos) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendMonsterPodiumWindow(podium, position, itemId, stackpos);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bbd1fae3b8dca35f", + "equalIndicator/v1": "c8334dd5010068e15c804981b424037eccbb1bb02a21811e4729b6b66eb47e4c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead", + "markdown": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 262, + "startColumn": 36, + "charOffset": 7579, + "charLength": 9, + "snippet": { + "text": "std::atoi" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 260, + "startColumn": 1, + "charOffset": 7442, + "charLength": 353, + "snippet": { + "text": "\r\nint8_t DBResult::getInt8FromString(const std::string &string, const std::string &function) const {\r\n\tauto result = static_cast(std::atoi(string.c_str()));\r\n\tif (result > std::numeric_limits::max()) {\r\n\t\tg_logger().error(\"[{}] Failed to get number value {} for tier table result, on function call: {}\", __FUNCTION__, result, function);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "91e07de85fa66505", + "equalIndicator/v1": "c842267f9db77c8462b617a91c77e5dd04efd9b606352aa64de1a93ae84045f8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 245, + "startColumn": 14, + "charOffset": 6903, + "charLength": 13, + "snippet": { + "text": "outfitMonster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 243, + "startColumn": 1, + "charOffset": 6864, + "charLength": 88, + "snippet": { + "text": "\r\n\tOutfit_t outfit = {};\r\n\tstd::string outfitMonster = \"\";\r\n\tuint16_t outfitItem = 0;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "609266acbf2abd50", + "equalIndicator/v1": "c8452effc6d3a52e84715f5b167e4dbb4b8eafeafc78709962134b007a88eebc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'event' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'event' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 87, + "startColumn": 24, + "charOffset": 3324, + "charLength": 36, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 85, + "startColumn": 1, + "charOffset": 3200, + "charLength": 215, + "snippet": { + "text": "\tstd::shared_ptr getEventByName(const std::string &name, bool forceLoaded = true);\r\n\r\n\tbool registerLuaEvent(const std::shared_ptr event);\r\n\tvoid removeInvalidEvents();\r\n\tvoid clear();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c5736a0a2fef186c", + "equalIndicator/v1": "c8a2afe364d6733c71f5943cca3de39ac42b212f8c7ee9a296ce2edde4e78619" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 258, + "startColumn": 25, + "charOffset": 7247, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 256, + "startColumn": 1, + "charOffset": 7158, + "charLength": 147, + "snippet": { + "text": "\t\t\tweapon->setMaxChange(getNumber(L, 3));\r\n\t\t} else {\r\n\t\t\tweapon->setMaxChange(getNumber(L, 2));\r\n\t\t}\r\n\t\tpushBoolean(L, true);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7279865bb942fa18", + "equalIndicator/v1": "c8c83d3ecf891febc5faac0541dac775f3ff41495220a434174739dfce63086f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 116, + "startColumn": 21, + "charOffset": 2956, + "charLength": 19, + "snippet": { + "text": "luaPartyGetInvitees" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 114, + "startColumn": 1, + "charOffset": 2931, + "charLength": 151, + "snippet": { + "text": "}\r\n\r\nint PartyFunctions::luaPartyGetInvitees(lua_State* L) {\r\n\t// party:getInvitees()\r\n\tstd::shared_ptr party = getUserdataShared(L, 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a1c6e6110662a6e4", + "equalIndicator/v1": "c8d7b1417d417a430bf230cebf890dfd75a6e22fdef520ffbf1edded597a804c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1169, + "startColumn": 67, + "charOffset": 34207, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1167, + "startColumn": 1, + "charOffset": 34136, + "charLength": 115, + "snippet": { + "text": "}\r\n\r\nvoid Player::setMainBackpackUnassigned(std::shared_ptr container) {\r\n\tif (!container) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9031f9cd5ab672dc", + "equalIndicator/v1": "c8dd75f46cf1aaa6e9ec77d6fbce09951d8da08d2f19b0c0d21aa27db59d8bd4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'updateTile' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'updateTile' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1092, + "startColumn": 27, + "charOffset": 31999, + "charLength": 10, + "snippet": { + "text": "updateTile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1090, + "startColumn": 1, + "charOffset": 31877, + "charLength": 149, + "snippet": { + "text": "\tvoid sendUpdateTile(std::shared_ptr updateTile, const Position &pos) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendUpdateTile(updateTile, pos);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6d1373dc3e620c82", + "equalIndicator/v1": "c8e5fbabfc23700805c908a65157a1f5d0f2ba88c0b78a5088764cae18383e69" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1284, + "startColumn": 36, + "charOffset": 38045, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1282, + "startColumn": 1, + "charOffset": 37924, + "charLength": 137, + "snippet": { + "text": "\tvoid sendInventoryItem(Slots_t slot, std::shared_ptr item) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendInventoryItem(slot, item);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9846affbd9b3dae5", + "equalIndicator/v1": "c921d5e0a527525e2cce217d615ef0ae9149cdb852c06ac74e19a5d5c2538a50" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 383, + "startColumn": 7, + "charOffset": 14371, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 381, + "startColumn": 1, + "charOffset": 14219, + "charLength": 296, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnLookInBattleList(std::shared_ptr player, std::shared_ptr creature, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLookInBattleList - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f185586b5e2d73a2", + "equalIndicator/v1": "c9357842f32fa40234089a0072fafa1cce312be136ad92704854c343cd0afee9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 231, + "startColumn": 9, + "charOffset": 6604, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 229, + "startColumn": 1, + "charOffset": 6567, + "charLength": 72, + "snippet": { + "text": "\t\treturn std::string();\r\n\t}\r\n\treturn std::string(row[it->second]);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8a6873eed3ffff5e", + "equalIndicator/v1": "c95134353dccc39fef735ba1ee965bc1e57ad0f7a200d99122bf7a3a4107667b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 15, + "startColumn": 26, + "charOffset": 488, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 13, + "startColumn": 1, + "charOffset": 435, + "charLength": 237, + "snippet": { + "text": "#include \"game/game.hpp\"\r\n\r\nReturnValue TrashHolder::queryAdd(int32_t, const std::shared_ptr &thing, uint32_t, uint32_t, std::shared_ptr actor) {\r\n\tstd::shared_ptr item = thing->getItem();\r\n\tif (item == nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a7613bbc0f6a04d7", + "equalIndicator/v1": "c9515e696a6a3c1efca2fcf8a904af1695576eeeabe323cc64a87969f9f5ed81" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'isLogin' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'isLogin' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 522, + "startColumn": 64, + "charOffset": 14125, + "charLength": 10, + "snippet": { + "text": "const bool" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 520, + "startColumn": 1, + "charOffset": 14014, + "charLength": 195, + "snippet": { + "text": "\tbool canOpenCorpse(uint32_t ownerId) const;\r\n\r\n\tvoid addStorageValue(const uint32_t key, const int32_t value, const bool isLogin = false);\r\n\tint32_t getStorageValue(const uint32_t key) const;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f706fb9b653d6c94", + "equalIndicator/v1": "c9555d14255db2c576ecc849f03ed7d353f49ce1a5f17badcabdac65bb9f5402" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2534, + "startColumn": 37, + "charOffset": 75710, + "charLength": 9, + "snippet": { + "text": "healthMax" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2532, + "startColumn": 1, + "charOffset": 75586, + "charLength": 303, + "snippet": { + "text": "\t\t\tcapacity = std::max(0, capacity - noneVocation->getCapGain());\r\n\t\t} else {\r\n\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\r\n\t\t\tmanaMax = std::max(0, manaMax - vocation->getManaGain());\r\n\t\t\tcapacity = std::max(0, capacity - vocation->getCapGain());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "747f50c225e5ce15", + "equalIndicator/v1": "c972394a8afdcc5ee4c1b4e906b5540c12f09a7f062134bef94067dc507acd18" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4449, + "startColumn": 93, + "charOffset": 160188, + "charLength": 5, + "snippet": { + "text": "house" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4447, + "startColumn": 1, + "charOffset": 160091, + "charLength": 248, + "snippet": { + "text": "}\r\n\r\nvoid Game::unwrapItem(std::shared_ptr item, uint16_t unWrapId, std::shared_ptr house, std::shared_ptr player) {\r\n\tif (item->hasOwner() && !item->isOwner(player)) {\r\n\t\tplayer->sendCancelMessage(RETURNVALUE_ITEMISNOTYOURS);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6e9c105fb4b84549", + "equalIndicator/v1": "c9847fae1b0027f477f60c8ae09ed94f357f0ea70953843a27e1ef5f3acddbf7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable has narrower type 'uint8_t' than iteration's upper bound 'std::array::size_type'", + "markdown": "Loop variable has narrower type 'uint8_t' than iteration's upper bound 'std::array::size_type'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1208, + "startColumn": 22, + "charOffset": 42461, + "charLength": 1, + "snippet": { + "text": "i" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1206, + "startColumn": 1, + "charOffset": 42376, + "charLength": 167, + "snippet": { + "text": "\tPropWriteStream stream;\r\n\tconst auto wheelSlots = getSlots();\r\n\tfor (uint8_t i = 1; i < wheelSlots.size(); ++i) {\r\n\t\tauto value = wheelSlots[i];\r\n\t\tif (value == 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3557dbeec76d87f1", + "equalIndicator/v1": "c99b9004ced40230570e267ce07498af64b6b6e944a46d8cf9bec5116c0aa045" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/loot_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 174, + "startColumn": 28, + "charOffset": 4524, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 172, + "startColumn": 1, + "charOffset": 4432, + "charLength": 155, + "snippet": { + "text": "\tconst auto loot = getUserdataShared(L, 1);\r\n\tif (loot) {\r\n\t\tloot->lootBlock.attack = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b87995649bc6744c", + "equalIndicator/v1": "c99ce84797e15508b4012c7d14ff3cfb9c8da3ee6709f90565d69c1e88bc4929" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'achievementsUnlocked' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'achievementsUnlocked' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6184, + "startColumn": 64, + "charOffset": 181749, + "charLength": 20, + "snippet": { + "text": "achievementsUnlocked" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6182, + "startColumn": 1, + "charOffset": 181524, + "charLength": 255, + "snippet": { + "text": "void Player::sendCyclopediaCharacterAchievements(uint16_t secretsUnlocked, std::vector> achievementsUnlocked) {\r\n\tif (client) {\r\n\t\tclient->sendCyclopediaCharacterAchievements(secretsUnlocked, achievementsUnlocked);\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "95a0e4abb4b75193", + "equalIndicator/v1": "c9ae76cc9c5dad4bb1c2a692bce961203a6ff60ceb7c7f91ea820dc1a71b13b4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1365, + "startColumn": 8, + "charOffset": 39843, + "charLength": 5, + "snippet": { + "text": "items" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1363, + "startColumn": 1, + "charOffset": 39774, + "charLength": 128, + "snippet": { + "text": "\tconst TileItemVector* items = getItemList();\r\n\tif (items) {\r\n\t\tn += items->getTopItemCount();\r\n\t\tif (n >= 10) {\r\n\t\t\treturn -1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5123391bd292e89d", + "equalIndicator/v1": "c9c8ba9f855aab4ec6e424106018a6d6575ffe00fcfec6076e0e6f8190234ad8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2313, + "startColumn": 98, + "charOffset": 66502, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2311, + "startColumn": 1, + "charOffset": 66400, + "charLength": 205, + "snippet": { + "text": "}\r\n\r\nstd::string Item::getDescription(const ItemType &it, int32_t lookDistance, std::shared_ptr item /*= nullptr*/, int32_t subType /*= -1*/, bool addArticle /*= true*/) {\r\n\tstd::string text = \"\";\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c813a5fd011ccea3", + "equalIndicator/v1": "c9fd785164eb9c9fba19fdf832400ca1c5d5856e6c756069a62a02ba7fbe772a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 128, + "startColumn": 60, + "charOffset": 3822, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 126, + "startColumn": 1, + "charOffset": 3742, + "charLength": 128, + "snippet": { + "text": "\t\treturn skull;\r\n\t}\r\n\tvirtual Skulls_t getSkullClient(std::shared_ptr creature) {\r\n\t\treturn creature->getSkull();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "250226c04c46c758", + "equalIndicator/v1": "ca074188d2b75119bea6d6c7870ad7497ac27bc1815bdf20a0b99bcad8670488" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1777, + "startColumn": 3, + "charOffset": 62059, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1775, + "startColumn": 1, + "charOffset": 61941, + "charLength": 173, + "snippet": { + "text": "\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r\n\t\treturn true;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "65e613a8a3fd601a", + "equalIndicator/v1": "ca110eab22a95fc71739226c9d49a1af1f46c309bc1accd3db1bfc15b5453caf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 276, + "startColumn": 45, + "charOffset": 8492, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 274, + "startColumn": 1, + "charOffset": 8372, + "charLength": 261, + "snippet": { + "text": "\t\tauto rank = m_player.getGuildRank();\r\n\t\treturn rank && rank->level == 3;\r\n\t} else if (name == \"Proconsul of Iksupan\") {\r\n\t\t// Win Ancient Aucar Outfits complete so fight with Atab and be teleported to the arena.\r\n\t} else if (name == \"Admirer of the Crown\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9e76e7833bed8968", + "equalIndicator/v1": "ca11e4b2dae080c970fb9882c4caddc65a91912b46349da41e0eeb6655e0c41d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Val', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Val', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/vectorset.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 67, + "startColumn": 73, + "charOffset": 1763, + "charLength": 4, + "snippet": { + "text": "_Val" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 65, + "startColumn": 1, + "charOffset": 1684, + "charLength": 153, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tconstexpr auto insert(std::vector::const_iterator _Where, const T &_Val) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\treturn container.insert(_Where, _Val);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "50f6fd67650c2236", + "equalIndicator/v1": "ca207b9faea9f705c48840b6ed85f7b9d1e8bd0ed1b3760cb5efbc0e7cc30022" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 43, + "startColumn": 18, + "charOffset": 1473, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 41, + "startColumn": 1, + "charOffset": 1326, + "charLength": 279, + "snippet": { + "text": "\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();\r\n\tbaseSpeed = mType->getBaseSpeed();\r\n\tinternalLight = mType->info.light;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "273034a42204e834", + "equalIndicator/v1": "ca50da4890eaa18f3b64111017ae865a871234dd1db1958bd2f7bfd219b8c69e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1277, + "startColumn": 59, + "charOffset": 45410, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1275, + "startColumn": 1, + "charOffset": 45347, + "charLength": 260, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventOnStorageUpdate(std::shared_ptr player, const uint32_t key, const int32_t value, int32_t oldValue, uint64_t currentTime) {\r\n\t// Player::onStorageUpdate(key, value, oldValue, currentTime)\r\n\tif (info.playerOnStorageUpdate == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8650b30bc399e3d0", + "equalIndicator/v1": "ca5ab84eb94be14305cf349475e88aa01139b973071e7235ad874d9b875d8a36" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2276, + "startColumn": 82, + "charOffset": 79397, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2274, + "startColumn": 1, + "charOffset": 79311, + "charLength": 166, + "snippet": { + "text": "}\r\n\r\nint32_t PlayerWheel::checkBlessingGroveHealingByTarget(std::shared_ptr target) const {\r\n\tif (!target || target == m_player.getPlayer()) {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3a5b8757e7142743", + "equalIndicator/v1": "ca62c6548650960ee53ba7d5affc7489f4c48e377f4a8b16ff0eba6e1103152f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 143, + "startColumn": 22, + "charOffset": 4618, + "charLength": 4, + "snippet": { + "text": "rune" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 141, + "startColumn": 1, + "charOffset": 4543, + "charLength": 138, + "snippet": { + "text": "\t\t\t}\r\n\t\t\tiType.runeMagLevel = rune->getMagicLevel();\r\n\t\t\tiType.runeLevel = rune->getLevel();\r\n\t\t\tiType.charges = rune->getCharges();\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5cfd173c0fb33469", + "equalIndicator/v1": "ca987078b08902fbc281d7c9833b4bf4c18f7035404483b93b6996bd992227f8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8524, + "startColumn": 53, + "charOffset": 297460, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8522, + "startColumn": 1, + "charOffset": 297403, + "charLength": 261, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerHighscores(std::shared_ptr player, HighscoreType_t type, uint8_t category, uint32_t vocation, const std::string &, uint16_t page, uint8_t entriesPerPage) {\r\n\tif (player->hasAsyncOngoingTask(PlayerAsyncTask_Highscore)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1731b6b36c69228b", + "equalIndicator/v1": "caa7fbb6329ebdb2a331e9b3a569cbd25da9687f18164b6f8e56697b71fece0d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'initConnection' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'initConnection' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 250, + "startColumn": 11, + "charOffset": 10026, + "charLength": 14, + "snippet": { + "text": "initConnection" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 248, + "startColumn": 1, + "charOffset": 9953, + "charLength": 122, + "snippet": { + "text": "\r\nProtocolGame::ProtocolGame(Connection_ptr initConnection) :\r\n\tProtocol(initConnection) {\r\n\tversion = CLIENT_VERSION;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e084b284fe6ec853", + "equalIndicator/v1": "cac05fb1d4310b2b8f59808e13d570067f19878532101e345b07c27293652174" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 283, + "startColumn": 53, + "charOffset": 7837, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 281, + "startColumn": 1, + "charOffset": 7780, + "charLength": 155, + "snippet": { + "text": "}\r\n\r\nbool House::transferToDepot(std::shared_ptr player, std::shared_ptr tile) const {\r\n\tif (townId == 0 || !player) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e6679dc0cdb654d5", + "equalIndicator/v1": "cad2965dd9e5de2823c357494e9772fc1ea655c90dbf19e481c2e50ca818ac36" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'createNpcTypeShopLuaTable' is within a recursive call chain", + "markdown": "Function 'createNpcTypeShopLuaTable' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 17, + "startColumn": 24, + "charOffset": 587, + "charLength": 25, + "snippet": { + "text": "createNpcTypeShopLuaTable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 15, + "startColumn": 1, + "charOffset": 536, + "charLength": 181, + "snippet": { + "text": "#include \"game/game.hpp\"\r\n\r\nvoid NpcTypeFunctions::createNpcTypeShopLuaTable(lua_State* L, const std::vector &shopVector) {\r\n\tlua_createtable(L, shopVector.size(), 0);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cba8fb68cc526fd5", + "equalIndicator/v1": "caddf65b53df686d2c3a887cd52de1024dfeacc7d0de857f7302662aa42e9e6e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'long long' is implementation-defined", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'long long' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2498, + "startColumn": 36, + "charOffset": 74349, + "charLength": 10, + "snippet": { + "text": "experience" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2496, + "startColumn": 1, + "charOffset": 74279, + "charLength": 109, + "snippet": { + "text": "\r\n\tuint64_t lostExp = experience;\r\n\texperience = std::max(0, experience - exp);\r\n\r\n\tif (sendText) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "462ceff742f5a27d", + "equalIndicator/v1": "cb10675c69787ac7ab1c26bca00884a1bcc443de54eb618cc421348dfef491da" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 344, + "startColumn": 14, + "charOffset": 8579, + "charLength": 12, + "snippet": { + "text": "std::tolower" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 342, + "startColumn": 1, + "charOffset": 8520, + "charLength": 143, + "snippet": { + "text": "\t\tif (std::isupper(ch)) {\r\n\t\t\tresult += '-';\r\n\t\t\tresult += std::tolower(ch);\r\n\t\t} else if (std::isspace(ch) || ch == '_') {\r\n\t\t\tresult += '-';\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "022c391b13fe1d66", + "equalIndicator/v1": "cb30ee381d1cd172e420163c165e46e347a74ca84ba191f8d6a35faa5297d740" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 158, + "startColumn": 53, + "charOffset": 6439, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 156, + "startColumn": 1, + "charOffset": 6295, + "charLength": 353, + "snippet": { + "text": "\t * @param[in] player The pointer to the player whose equipped items are considered.\r\n\t */\r\n\tvoid calculateAbsorbValues(std::shared_ptr player, NetworkMessage &msg, uint8_t &combats) {\r\n\t\talignas(16) uint16_t damageModifiers[COMBAT_COUNT] = { 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000 };\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "357e28b6052a6a57", + "equalIndicator/v1": "cb318a9b613a478e8ff19b60de11b063f6f2ec0a912f01cbadf9d514d9522b73" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 868, + "startColumn": 63, + "charOffset": 25258, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 866, + "startColumn": 1, + "charOffset": 25191, + "charLength": 186, + "snippet": { + "text": "}\r\n\r\nint GameFunctions::luaGameGetSecretAchievements(lua_State* L) {\r\n\t// Game.getSecretAchievements()\r\n\tconst std::vector &achievements = g_game().getSecretAchievements();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b1431330ea6fc05b", + "equalIndicator/v1": "cb4bce2f723e80e9d9731c55cf0355d38711efb68d43b25a0da2bd0b447fcdce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 238, + "startColumn": 41, + "charOffset": 8748, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 236, + "startColumn": 1, + "charOffset": 8702, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ad0d02a752f8a18e", + "equalIndicator/v1": "cb4e5718fee91369ab78258b51792acf9d66e2349c5dfb4498ef0c7ac0d50563" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 463, + "startColumn": 95, + "charOffset": 17485, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 461, + "startColumn": 1, + "charOffset": 17386, + "charLength": 218, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnRemoveCount(std::shared_ptr player, std::shared_ptr item) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnMove - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a41037a0e08be717", + "equalIndicator/v1": "cb7e8742b3d48f2b05575ecc09b3550d98aa5e3290e31736281044d0e5e95b42" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'destTile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'destTile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 275, + "startColumn": 109, + "charOffset": 9174, + "charLength": 8, + "snippet": { + "text": "destTile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 273, + "startColumn": 1, + "charOffset": 9061, + "charLength": 209, + "snippet": { + "text": "}\r\n\r\nvoid Weapon::onUsedWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr destTile) const {\r\n\tif (!player->hasFlag(PlayerFlags_t::NotGainSkill)) {\r\n\t\tskills_t skillType;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9708f525b6758435", + "equalIndicator/v1": "cb81817531851e51e5aeb09ba8d15dfa34ad06cd7d7dc5a52fe258c7dc6a25ef" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: m_cost, t_cost, parallelism", + "markdown": "Constructor does not initialize these fields: m_cost, t_cost, parallelism" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 21, + "startColumn": 9, + "charOffset": 720, + "charLength": 6, + "snippet": { + "text": "Argon2" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 19, + "startColumn": 1, + "charOffset": 600, + "charLength": 155, + "snippet": { + "text": "const std::string Argon2::base64_chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\r\n\r\nArgon2::Argon2() {\r\n\tupdateConstants();\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ab38ea0476f52601", + "equalIndicator/v1": "cbc434f065bccde457a2129c3348d5620b892f689bde2b61eba383e788293ff8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1666, + "startColumn": 7, + "charOffset": 58435, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1664, + "startColumn": 1, + "charOffset": 58276, + "charLength": 352, + "snippet": { + "text": "void TargetCallback::onTargetCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\t// onTargetCombat(creature, target)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[TargetCallback::onTargetCombat - Creature {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "29418000251213f1", + "equalIndicator/v1": "cbccec5d6fb9072e098683529048f00e1faed34b5725a82e84ff049c58abbcf6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6855, + "startColumn": 20, + "charOffset": 237473, + "charLength": 15, + "snippet": { + "text": "levelDifference" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6853, + "startColumn": 1, + "charOffset": 237317, + "charLength": 332, + "snippet": { + "text": "\tif (isLowerLevel) {\r\n\t\tfloat rateDamageTakenByLevel = g_configManager().getFloat(PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, __FUNCTION__) / 100;\r\n\t\tlevelDiffRate += levelDifference * rateDamageTakenByLevel;\r\n\t} else {\r\n\t\tfloat rateDamageReductionByLevel = g_configManager().getFloat(PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, __FUNCTION__) / 100;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6717ce3e867a529e", + "equalIndicator/v1": "cc84a9c5d97d854086f8c56c5c338fa800785988906da75abdae6d9f4124a387" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'newName' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'newName' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 56, + "startColumn": 25, + "charOffset": 1844, + "charLength": 22, + "snippet": { + "text": "const std::string_view" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 54, + "startColumn": 1, + "charOffset": 1753, + "charLength": 132, + "snippet": { + "text": "\t * @param newName The new name to set for the script type.\r\n\t */\r\n\tvoid setScriptTypeName(const std::string_view newName);\r\n\r\n\t/**\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fa2da6a0ca66b431", + "equalIndicator/v1": "cc8748f702f66b23c596ef4f33008b3e695968992f9b6f31e7de8e78b5224c12" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'", + "markdown": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 70, + "startColumn": 11, + "charOffset": 2205, + "charLength": 8, + "snippet": { + "text": "Creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 68, + "startColumn": 1, + "charOffset": 2148, + "charLength": 89, + "snippet": { + "text": "\tstatic constexpr double speedC = -4795.01;\r\n\r\n\tvirtual ~Creature();\r\n\r\n\t// non-copyable\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "24f8154fa42f563b", + "equalIndicator/v1": "cc98a78eaa7a0a0f2f7adfd4e5b49dca39ab74f92ec7a07f2156b85ffa9f3ef1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 303, + "startColumn": 41, + "charOffset": 11342, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 301, + "startColumn": 1, + "charOffset": 11296, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0c67deeffda2b377", + "equalIndicator/v1": "ccdd28e6a58182f8eb084705128a21c80e3b7e21515d7404bab148888ec2597f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 806, + "startColumn": 9, + "charOffset": 26110, + "charLength": 13, + "snippet": { + "text": "elementDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 804, + "startColumn": 1, + "charOffset": 26043, + "charLength": 87, + "snippet": { + "text": "\r\nint16_t WeaponDistance::getElementDamageValue() const {\r\n\treturn elementDamage;\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1fbec82dfdaf6103", + "equalIndicator/v1": "cce70086cdc860c21d952b82cc35e1b6401948f5d8ad6010008d7d62de74c8f8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float'", + "markdown": "Narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 676, + "startColumn": 49, + "charOffset": 18492, + "charLength": 23, + "snippet": { + "text": "(buffsPercent[i] - 100)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 674, + "startColumn": 1, + "charOffset": 18396, + "charLength": 138, + "snippet": { + "text": "\r\n\t\tint32_t actualBuff = creature->getBuff(i);\r\n\t\tbuffs[i] = static_cast(actualBuff * ((buffsPercent[i] - 100) / 100.f));\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "29d8c7184b47cf50", + "equalIndicator/v1": "cd0fa11194916da83fe4567b5acdecfbd2d9d4397f0cb9b6fe410b5feea3984e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 568, + "startColumn": 113, + "charOffset": 20157, + "charLength": 5, + "snippet": { + "text": "thing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 566, + "startColumn": 1, + "charOffset": 20040, + "charLength": 295, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnLook(std::shared_ptr player, const Position &position, std::shared_ptr thing, uint8_t stackpos, int32_t lookDistance) {\r\n\t// Player:onLook(thing, position, distance) or Player.onLook(self, thing, position, distance)\r\n\tif (info.playerOnLook == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4fbfe9e54d44881d", + "equalIndicator/v1": "cd116ebbcfd4f801ce676b14569285c863c618cedec005e40a67edc67beff89f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 521, + "startColumn": 63, + "charOffset": 20363, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 519, + "startColumn": 1, + "charOffset": 20296, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::saveRewardItems(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dc3a121be3ed2bcd", + "equalIndicator/v1": "cd1258ebb7b6eac4f1c7d3e337b4dae87536e40b71c4d5ecd1d89f557f680cdb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'loginConnection' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'loginConnection' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocollogin.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 28, + "startColumn": 12, + "charOffset": 829, + "charLength": 15, + "snippet": { + "text": "loginConnection" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 26, + "startColumn": 1, + "charOffset": 757, + "charLength": 143, + "snippet": { + "text": "\r\n\texplicit ProtocolLogin(Connection_ptr loginConnection) :\r\n\t\tProtocol(loginConnection) { }\r\n\r\n\tvoid onRecvFirstMessage(NetworkMessage &msg);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "40ecea0fc4dc4b0e", + "equalIndicator/v1": "cd210aa6250fa864508986c59b03152212ded6cb6b762df580ad45eea49d31d0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 491, + "startColumn": 81, + "charOffset": 14641, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 489, + "startColumn": 1, + "charOffset": 14556, + "charLength": 122, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::RemoveItemField(std::shared_ptr, std::shared_ptr, const Position &) {\r\n\treturn 1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8e6c3e38e1491bea", + "equalIndicator/v1": "cd316636e782810c1530a35113782fb04153685e849e3772b11794cb082a78c5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use nullptr", + "markdown": "Use nullptr" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 434, + "startColumn": 26, + "charOffset": 26773, + "charLength": 1, + "snippet": { + "text": "0" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 432, + "startColumn": 1, + "charOffset": 26685, + "charLength": 123, + "snippet": { + "text": "\r\n\tconst uint16_t date = result->getNumber(\"date\");\r\n\tconst time_t now = time(0);\r\n\ttm* ltm = localtime(&now);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "66a16b429530b713", + "equalIndicator/v1": "cd447b5c8ce52ddff59d20264441f01174c11a83f79778cda1de137e36f51909" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1946, + "startColumn": 2, + "charOffset": 59434, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1944, + "startColumn": 1, + "charOffset": 59366, + "charLength": 252, + "snippet": { + "text": "\r\nvoid ProtocolGame::parsePlayerSellOnShop(NetworkMessage &msg) {\r\n\tuint16_t id = msg.get();\r\n\tuint8_t count = std::max(msg.getByte(), (uint8_t)1);\r\n\tuint16_t amount = oldProtocol ? static_cast(msg.getByte()) : msg.get();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "464b58620b20e032", + "equalIndicator/v1": "cd53731fa086ec81da51e49d81507b20ab76f43dc637ff470636047e8591855a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'operator basic_string' must be marked explicit to avoid unintentional implicit conversions", + "markdown": "'operator basic_string' must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 100, + "startColumn": 27, + "charOffset": 3057, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 98, + "startColumn": 1, + "charOffset": 2979, + "charLength": 133, + "snippet": { + "text": "\tbool operator==(const ValueWrapper &rhs) const;\r\n\r\n\texplicit(false) operator std::string() const {\r\n\t\treturn get();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3e54bef897fda93f", + "equalIndicator/v1": "cd5dab4050dd2b733a0cde76cef51d473515fa15bebd6bfe0f973f7dc82a0a54" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1627, + "startColumn": 113, + "charOffset": 48566, + "charLength": 7, + "snippet": { + "text": "newItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1625, + "startColumn": 1, + "charOffset": 48449, + "charLength": 156, + "snippet": { + "text": "}\r\n\r\nvoid Player::sendUpdateContainerItem(std::shared_ptr container, uint16_t slot, std::shared_ptr newItem) {\r\n\tif (!client) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d84394e96e6bcbe3", + "equalIndicator/v1": "cd6c5f63533d687c8d718e91c1e4209dad71a815ba39441c383c1fb4d8975529" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1076, + "startColumn": 11, + "charOffset": 30777, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1074, + "startColumn": 1, + "charOffset": 30733, + "charLength": 66, + "snippet": { + "text": "\t\t\treturn \"missile\";\r\n\t\tdefault:\r\n\t\t\treturn std::string();\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "011de28de5249aa4", + "equalIndicator/v1": "cd83f140d0ca63cdf30ba00606733c42f2269703cd6cf128ed5b0811edbb2de9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotlocker.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 36, + "startColumn": 14, + "charOffset": 1031, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 34, + "startColumn": 1, + "charOffset": 986, + "charLength": 346, + "snippet": { + "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "260495c4e4c32ed4", + "equalIndicator/v1": "cd96db046997770a83140e33937b8a57b7c40785539670fd504672818ea10e91" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'initConnection' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'initConnection' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 17, + "startColumn": 35, + "charOffset": 596, + "charLength": 14, + "snippet": { + "text": "initConnection" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 15, + "startColumn": 1, + "charOffset": 487, + "charLength": 166, + "snippet": { + "text": "class Protocol : public std::enable_shared_from_this {\r\npublic:\r\n\texplicit Protocol(Connection_ptr initConnection) :\r\n\t\tconnectionPtr(initConnection) { }\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5f0307fcbb6bfa23", + "equalIndicator/v1": "cda65f82b68fb39377c7511e739a538b285c39756d811a3130944ab8b10d3eca" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 83, + "startColumn": 65, + "charOffset": 2493, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 81, + "startColumn": 1, + "charOffset": 2424, + "charLength": 79, + "snippet": { + "text": "}\r\n\r\nvoid TrashHolder::removeThing(std::shared_ptr, uint32_t) {\r\n\t//\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b361df66f0f50796", + "equalIndicator/v1": "cda9d43532d75af35fd886317ef80c592184ce1f270a41096da6794f79bf467f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Annotate this function with 'override' or (rarely) 'final'", + "markdown": "Annotate this function with 'override' or (rarely) 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 3, + "charOffset": 1036, + "charLength": 9, + "snippet": { + "text": "Container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 907, + "charLength": 203, + "snippet": { + "text": "\texplicit Container(uint16_t type);\r\n\tContainer(uint16_t type, uint16_t size, bool unlocked = true, bool pagination = false);\r\n\t~Container();\r\n\r\n\tstatic std::shared_ptr create(uint16_t type);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8b4092e451abcb4f", + "equalIndicator/v1": "cdb75fd06462757255dabe7e9fa81910fbba2160e24a4de2bd32f3936dd57b72" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 350, + "startColumn": 27, + "charOffset": 12545, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 348, + "startColumn": 1, + "charOffset": 12513, + "charLength": 125, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.creatureOnHear, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "19b2f1c2afc3d4b1", + "equalIndicator/v1": "cdbae4ff22bf44d3e811851fe449b5d50603b201c36146bae3fad8cb2b1896c8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 345, + "startColumn": 22, + "charOffset": 9211, + "charLength": 8, + "snippet": { + "text": "blockHit" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 343, + "startColumn": 1, + "charOffset": 9082, + "charLength": 414, + "snippet": { + "text": "\t */\r\n\tvoid mitigateDamage(const CombatType_t &combatType, BlockType_t &blockType, int32_t &damage) const;\r\n\tvirtual BlockType_t blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense = false, bool checkArmor = false, bool field = false);\r\n\r\n\tvoid applyAbsorbDamageModifications(std::shared_ptr attacker, int32_t &damage, CombatType_t combatType) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "407c33bb4201c9a4", + "equalIndicator/v1": "cddc89111b649f28c190c4d83e23b9a8c61a6501a7650ead479c20a0ce6f1707" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 88, + "startColumn": 2, + "charOffset": 2646, + "charLength": 71, + "snippet": { + "text": "getParent()->postAddNotification(thing, oldParent, index, LINK_PARENT);" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 86, + "startColumn": 1, + "charOffset": 2504, + "charLength": 219, + "snippet": { + "text": "\r\nvoid TrashHolder::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tgetParent()->postAddNotification(thing, oldParent, index, LINK_PARENT);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "afe8c8e837bd84ec", + "equalIndicator/v1": "cde2789d9ab8835c4c90b79d523f083eaac243ddb55787db2c2f06373a71a98d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9801, + "startColumn": 51, + "charOffset": 342994, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9799, + "startColumn": 1, + "charOffset": 342939, + "charLength": 105, + "snippet": { + "text": "}\r\n\r\nvoid Game::removeMonster(std::shared_ptr monster) {\r\n\tmonsters.erase(monster->getID());\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f2aa64df1c6d21d4", + "equalIndicator/v1": "ce0107342cb8e14e33e61c0b542e0a6773834d436e0f0a2cd692c9fe6181c858" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2563, + "startColumn": 50, + "charOffset": 97273, + "charLength": 8, + "snippet": { + "text": "cylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2561, + "startColumn": 1, + "charOffset": 97219, + "charLength": 227, + "snippet": { + "text": "}\r\n\r\nbool Game::removeMoney(std::shared_ptr cylinder, uint64_t money, uint32_t flags /*= 0*/, bool useBalance /*= false*/) {\r\n\tif (cylinder == nullptr) {\r\n\t\tg_logger().error(\"[{}] cylinder is nullptr\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ab9866911fe0bee0", + "equalIndicator/v1": "ce1a379e9a34a18476017126697c433440577da8eb41b88d83f14364355add16" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getIconID' can be made const", + "markdown": "Method 'getIconID' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 119, + "startColumn": 11, + "charOffset": 2877, + "charLength": 9, + "snippet": { + "text": "getIconID" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 117, + "startColumn": 1, + "charOffset": 2861, + "charLength": 65, + "snippet": { + "text": "\t}\r\n\r\n\tuint16_t getIconID() {\r\n\t\treturn icon + (baseid - 1);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4afe8098bb769b20", + "equalIndicator/v1": "ce2f5fc2a9a29cd4abf32713b8c16e86d782373b0529506bf5380f8dc68f1bf8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 568, + "startColumn": 56, + "charOffset": 20100, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 566, + "startColumn": 1, + "charOffset": 20040, + "charLength": 295, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnLook(std::shared_ptr player, const Position &position, std::shared_ptr thing, uint8_t stackpos, int32_t lookDistance) {\r\n\t// Player:onLook(thing, position, distance) or Player.onLook(self, thing, position, distance)\r\n\tif (info.playerOnLook == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7c7c33ca185ca10f", + "equalIndicator/v1": "ce3ee7261e4e9e74acbe7709a444a09019231b9d56f18dae6494c9c24b3a4e8e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1192, + "startColumn": 7, + "charOffset": 45411, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1190, + "startColumn": 1, + "charOffset": 45287, + "charLength": 276, + "snippet": { + "text": "\r\nvoid EventCallback::zoneAfterCreatureEnter(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneAfterCreatureEnter - \"\r\n\t\t \"Zone {} Creature {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0e8b8097dc0ab271", + "equalIndicator/v1": "ce41ca9a1ac229581d3fc65b39eb6997eae088ad5b5417b77c9bb41abadfacd6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 88, + "startColumn": 8, + "charOffset": 2294, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 86, + "startColumn": 1, + "charOffset": 2206, + "charLength": 201, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsRune(lua_State* L) {\r\n\t// itemType:isRune()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isRune());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "49cbd00229e399c1", + "equalIndicator/v1": "ce66311a576f1dcbcabee6129d52058b4530d7b909870981e5116e49d4ccc400" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 643, + "startColumn": 35, + "charOffset": 20214, + "charLength": 7, + "snippet": { + "text": "augment" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 641, + "startColumn": 1, + "charOffset": 20027, + "charLength": 397, + "snippet": { + "text": "\t\t\t\t}\r\n\t\t\t\tif (augment->type == Augment_t::IncreasedDamage || augment->type == Augment_t::PowerfulImpact || augment->type == Augment_t::StrongImpact) {\r\n\t\t\t\t\tconst float augmentPercent = augment->value / 100.0;\r\n\t\t\t\t\tdamage.primary.value += static_cast(damage.primary.value * augmentPercent);\r\n\t\t\t\t\tdamage.secondary.value += static_cast(damage.secondary.value * augmentPercent);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "80531f06673a7e96", + "equalIndicator/v1": "ceb90e6d76a624c52b430274ab0630dcd426c384aef970a07906811348192e91" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 384, + "startColumn": 54, + "charOffset": 11112, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 382, + "startColumn": 1, + "charOffset": 11054, + "charLength": 148, + "snippet": { + "text": "}\r\n\r\nbool Spell::playerSpellCheck(std::shared_ptr player) const {\r\n\tif (player->hasFlag(PlayerFlags_t::CannotUseSpells)) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "97486e04c7f6707b", + "equalIndicator/v1": "cec42e6cf344058e52aaec36f4fd416fde2b03119b88d9e8f0956b9249769e39" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1225, + "startColumn": 29, + "charOffset": 36073, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1223, + "startColumn": 1, + "charOffset": 35944, + "charLength": 163, + "snippet": { + "text": "\tvoid sendCreatureType(std::shared_ptr creature, uint8_t creatureType) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureType(creature, creatureType);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4716779d817b5a0a", + "equalIndicator/v1": "ceee5971c9533b27053d94af8988f92e113c161819f674c9edb451eba87a2601" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 191, + "startColumn": 20, + "charOffset": 5746, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 189, + "startColumn": 1, + "charOffset": 5707, + "charLength": 78, + "snippet": { + "text": "\r\n\t\taddItem(item);\r\n\t\tupdateItemWeight(item->getWeight());\r\n\t}\r\n\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c1aebafdaa87ee23", + "equalIndicator/v1": "cef1f8190e96f94fa516d8aae3d4535783342bc8119a5eaa0f54db8380a86773" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'reloadAll' is within a recursive call chain", + "markdown": "Function 'reloadAll' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 85, + "startColumn": 18, + "charOffset": 2681, + "charLength": 9, + "snippet": { + "text": "reloadAll" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 83, + "startColumn": 1, + "charOffset": 2589, + "charLength": 202, + "snippet": { + "text": " * Changing this to public may cause some unexpected behavior or bug\r\n */\r\nbool GameReload::reloadAll() {\r\n\tstd::vector reloadResults;\r\n\treloadResults.reserve(magic_enum::enum_count());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a5d791785ca1c016", + "equalIndicator/v1": "cf12453c25f68eb3f0f1b652461963c53ea058613bdbbb127f3685ac691ee40d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 508, + "startColumn": 31, + "charOffset": 20079, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 506, + "startColumn": 1, + "charOffset": 19984, + "charLength": 177, + "snippet": { + "text": "\r\n\t\tfor (const auto &[pid, depotChest] : player->depotChests) {\r\n\t\t\tfor (std::shared_ptr item : depotChest->getItemList()) {\r\n\t\t\t\tdepotList.emplace_back(pid, item);\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e71b1fdc797587b0", + "equalIndicator/v1": "cf2c30c15a542e42284b302d869d79e52c7d8b5c37f62c7849b7a63089ae44a3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1137, + "startColumn": 92, + "charOffset": 40730, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1135, + "startColumn": 1, + "charOffset": 40634, + "charLength": 286, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) {\r\n\t// Player:onCombat(target, item, primaryDamage, primaryType, secondaryDamage, secondaryType)\r\n\tif (info.playerOnCombat == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "990f8b9fcbfc1fed", + "equalIndicator/v1": "cf4d8bcf72c65a683d4ed3c9b239a2cec00fe8c7b9d102633cef8acc4dc0c4d6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 43, + "startColumn": 18, + "charOffset": 1473, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 41, + "startColumn": 1, + "charOffset": 1326, + "charLength": 279, + "snippet": { + "text": "\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();\r\n\tbaseSpeed = mType->getBaseSpeed();\r\n\tinternalLight = mType->info.light;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "273034a42204e834", + "equalIndicator/v1": "cf52bf143b34ea3e085776bd14850d3bf5331f4fa5a545f4e8e870717ece2539" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7858, + "startColumn": 54, + "charOffset": 274862, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7856, + "startColumn": 1, + "charOffset": 274804, + "charLength": 156, + "snippet": { + "text": "}\r\n\r\nvoid Game::addPlayerVocation(std::shared_ptr target) {\r\n\tif (const auto &party = target->getParty()) {\r\n\t\tparty->updatePlayerVocation(target);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "859389ce836c2c57", + "equalIndicator/v1": "cf54a63b817c4226b48ac9fb114684b79d8cf7dfcff4c964c55aedfcde8d59a3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 421, + "startColumn": 3, + "charOffset": 13904, + "charLength": 6, + "snippet": { + "text": "return" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 419, + "startColumn": 1, + "charOffset": 13853, + "charLength": 110, + "snippet": { + "text": "\t\treturn 4;\r\n\t} else if (chanceInPercent < 1) {\r\n\t\treturn 3;\r\n\t} else if (chanceInPercent < 5) {\r\n\t\treturn 2;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e23f62820cc50220", + "equalIndicator/v1": "cf58ac7c782c13bd06657941cf161ae2b142698bc4d62ecc5e81d2253ff90e8a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 670, + "startColumn": 37, + "charOffset": 21952, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 668, + "startColumn": 1, + "charOffset": 21890, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.25f) + 3;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1e3e202c5d5f2105", + "equalIndicator/v1": "cf8af8e2d026635c4ccc450f835a716e15d27591b27ad9d5d6c21b16fced788f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6804, + "startColumn": 114, + "charOffset": 235235, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6802, + "startColumn": 1, + "charOffset": 235117, + "charLength": 251, + "snippet": { + "text": "}\r\n\r\nvoid Game::notifySpectators(const CreatureVector &spectators, const Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetMonster) {\r\n\tif (!spectators.empty()) {\r\n\t\tfor (const auto &spectator : spectators) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "82d0892864069cc6", + "equalIndicator/v1": "cf9ce2c44820666bde6874faa738b120e156da5c231d9a94bdf15995134c0a50" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 253, + "startColumn": 24, + "charOffset": 6692, + "charLength": 5, + "snippet": { + "text": "regen" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 251, + "startColumn": 1, + "charOffset": 6662, + "charLength": 201, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tplayer->changeHealth(regen * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__), false);\r\n\t\tplayer->changeMana(regen * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__));\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "886591dc0bec17cd", + "equalIndicator/v1": "cf9e9ed4e19a8da6a20b12bae224540abc06f07be35fbdb9cd1d07b11c9bfefb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 545, + "startColumn": 40, + "charOffset": 16604, + "charLength": 8, + "snippet": { + "text": "capacity" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 543, + "startColumn": 1, + "charOffset": 16559, + "charLength": 101, + "snippet": { + "text": "\t}\r\n\r\n\tint32_t freeSlots = std::max(capacity() - size(), 0);\r\n\r\n\tif (item->isStackable()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d1f9e13e4672f0fb", + "equalIndicator/v1": "cfccc5207c1b6ac5a8524e8e53342c3932106095d0dd15b76d941aa7c110518f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first.", + "markdown": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 679, + "startColumn": 15, + "charOffset": 22253, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 677, + "startColumn": 1, + "charOffset": 22212, + "charLength": 74, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tchance = it.hitChance;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d9512e3ea8d0367b", + "equalIndicator/v1": "cfcef4de1668c9d2ec141a6d93277f73daf4e76ba5c844e3c51d73232a1a4213" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::_Tree, std::less, std::allocator>>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::_Tree, std::less, std::allocator\\>\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 239, + "startColumn": 2, + "charOffset": 7406, + "charLength": 10, + "snippet": { + "text": "const auto" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 237, + "startColumn": 1, + "charOffset": 7332, + "charLength": 165, + "snippet": { + "text": "int GameFunctions::luaGameGetTowns(lua_State* L) {\r\n\t// Game.getTowns()\r\n\tconst auto towns = g_game().map.towns.getTowns();\r\n\tlua_createtable(L, towns.size(), 0);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7ff71daffcbce398", + "equalIndicator/v1": "cfe72cc1be801e3ecf891a0433d2fb41c3a6d0a8e5f5b3d9d92f01fa8bcd2031" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3083, + "startColumn": 61, + "charOffset": 92619, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3081, + "startColumn": 1, + "charOffset": 92512, + "charLength": 197, + "snippet": { + "text": "\r\n// close container and its child containers\r\nvoid Player::autoCloseContainers(std::shared_ptr container) {\r\n\tstd::vector closeList;\r\n\tfor (const auto &it : openContainers) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4970b8598459fde4", + "equalIndicator/v1": "cff086b035890e26b2c53903a181d973f7db1f7fc7d8b939d0a53e2e4e3ec81e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 222, + "startColumn": 20, + "charOffset": 6441, + "charLength": 6, + "snippet": { + "text": "uptime" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 220, + "startColumn": 1, + "charOffset": 6329, + "charLength": 136, + "snippet": { + "text": "\t// getWorldUpTime()\r\n\tuint64_t uptime = (OTSYS_TIME(true) - ProtocolStatus::start) / 1000;\r\n\tlua_pushnumber(L, uptime);\r\n\treturn 1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5151ec61110c1a5c", + "equalIndicator/v1": "d01dfe708011c6fc9821feef0851187a861f09bec12c54693420b4ae37e5aea1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 113, + "startColumn": 7, + "charOffset": 3856, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 111, + "startColumn": 1, + "charOffset": 3719, + "charLength": 291, + "snippet": { + "text": "\r\nReturnValue EventCallback::creatureOnTargetCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnTargetCombat - \"\r\n\t\t \"Creature {} target {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5c5cef372182c58d", + "equalIndicator/v1": "d0ac9dbd0c85103096ef86e7e2dbded592fce9cee137e45f13f3c73218c8f5e9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 513, + "startColumn": 7, + "charOffset": 18210, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 511, + "startColumn": 1, + "charOffset": 18198, + "charLength": 227, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"Party leader {}. Call stack overflow. Too many lua script calls being nested.\", party->getLeader() ? party->getLeader()->getName() : \"unknown\");\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f029d91262371d61", + "equalIndicator/v1": "d0f968e0907bb768c8ba9c9135a9775402d24c1bace287596527cdc722f98cf8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6844, + "startColumn": 106, + "charOffset": 236923, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6842, + "startColumn": 1, + "charOffset": 236813, + "charLength": 238, + "snippet": { + "text": "}\r\n\r\nfloat Game::pvpLevelDifferenceDamageMultiplier(std::shared_ptr attacker, std::shared_ptr target) {\r\n\tint32_t levelDifference = target->getLevel() - attacker->getLevel();\r\n\tlevelDifference = std::abs(levelDifference);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bb6a8bf8ff62ca22", + "equalIndicator/v1": "d0ff4014b5e06f1b6e49f479c634f9dc2aa8f305788861a0df1fa9f9aea6a495" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 208, + "startColumn": 17, + "charOffset": 5126, + "charLength": 3, + "snippet": { + "text": "key" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 206, + "startColumn": 1, + "charOffset": 5011, + "charLength": 152, + "snippet": { + "text": "\tstd::string iKeyPad(64, 0x36), oKeyPad(64, 0x5C);\r\n\tfor (uint8_t i = 0; i < key.length(); ++i) {\r\n\t\tiKeyPad[i] ^= key[i];\r\n\t\toKeyPad[i] ^= key[i];\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "608ee0c0c3afe73d", + "equalIndicator/v1": "d10b1888ad6e849af70949f6f52ff5b2cf06615f88c0974985733a7c4ea5a63f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 774, + "startColumn": 7, + "charOffset": 27966, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 772, + "startColumn": 1, + "charOffset": 27954, + "charLength": 149, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnItemMoved - \"\r\n\t\t \"Player {} item {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c758912590acc6e1", + "equalIndicator/v1": "d12d92816a0b9416834fb6405d9cbb7958221e171f8fe35c4c0c4625d5d96c0c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9200, + "startColumn": 46, + "charOffset": 321497, + "charLength": 10, + "snippet": { + "text": "totalPrice" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9198, + "startColumn": 1, + "charOffset": 321399, + "charLength": 219, + "snippet": { + "text": "\t\t\tg_game().removeMoney(player, remainsPrice);\r\n\t\t}\r\n\t\tg_metrics().addCounter(\"balance_decrease\", totalPrice, { { \"player\", player->getName() }, { \"context\", \"market_purchase\" } });\r\n\r\n\t\tif (it.id == ITEM_STORE_COIN) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ae93b9732efa83d5", + "equalIndicator/v1": "d13158035ed0a0cc67d2fc14a6db44fc1a1d8eb49e22a9b9cc8ba88592648109" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 60, + "startColumn": 3, + "charOffset": 2001, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 58, + "startColumn": 1, + "charOffset": 1898, + "charLength": 230, + "snippet": { + "text": "bool Protocol::onRecvMessage(NetworkMessage &msg) {\r\n\tif (checksumMethod != CHECKSUM_METHOD_NONE) {\r\n\t\tuint32_t recvChecksum = msg.get();\r\n\t\tif (checksumMethod == CHECKSUM_METHOD_SEQUENCE) {\r\n\t\t\tif (recvChecksum == 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fbdcc1bc61e41aed", + "equalIndicator/v1": "d16d09c895c4f681845d1cbf3995f6c418b359d611116e581d05e5f4457e922d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 157, + "startColumn": 24, + "charOffset": 4403, + "charLength": 29, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 155, + "startColumn": 1, + "charOffset": 4240, + "charLength": 248, + "snippet": { + "text": "\tbool registerLuaActionEvent(const std::shared_ptr action);\r\n\tbool registerLuaPositionEvent(const std::shared_ptr action);\r\n\tbool registerLuaEvent(const std::shared_ptr action);\r\n\t// Clear maps for reloading\r\n\tvoid clear();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2d32dd0fa207c1a9", + "equalIndicator/v1": "d175e908d66ab4a92eaae37162098bc7fe227caad7d67d2d3f8d993b6291e298" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6928, + "startColumn": 81, + "charOffset": 240571, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6926, + "startColumn": 1, + "charOffset": 240486, + "charLength": 149, + "snippet": { + "text": "}\r\n\r\nint32_t Game::applyHealthChange(CombatDamage &damage, std::shared_ptr target) const {\r\n\tint32_t targetHealth = target->getHealth();\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "50268917af52f5cd", + "equalIndicator/v1": "d17fa58ae5cc939c77b55519205412235fdc2b155d31a2f2653b09f777065247" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'newHouse' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'newHouse' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 89, + "startColumn": 18, + "charOffset": 2468, + "charLength": 8, + "snippet": { + "text": "newHouse" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 87, + "startColumn": 1, + "charOffset": 2385, + "charLength": 181, + "snippet": { + "text": "\r\n\texplicit HouseTransferItem(std::shared_ptr newHouse) :\r\n\t\tItem(0), house(newHouse) { }\r\n\r\n\tvoid onTradeEvent(TradeEvents_t event, std::shared_ptr owner) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e8981aad2f6765bf", + "equalIndicator/v1": "d18596c3c3e1475ac2489b2b208b253359bd3ff1e8dd70c80057055f6c3b787d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 328, + "startColumn": 14, + "charOffset": 8275, + "charLength": 12, + "snippet": { + "text": "std::tolower" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 326, + "startColumn": 1, + "charOffset": 8216, + "charLength": 143, + "snippet": { + "text": "\t\tif (std::isupper(ch)) {\r\n\t\t\tresult += '_';\r\n\t\t\tresult += std::tolower(ch);\r\n\t\t} else if (std::isspace(ch) || ch == '-') {\r\n\t\t\tresult += '_';\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "14a8b88d22bf521a", + "equalIndicator/v1": "d19a55c045d556022c892e3a398d3ab003fd7dd0dbfe03ba54ab00b9db3c3386" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'movingCreature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'movingCreature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1393, + "startColumn": 89, + "charOffset": 55150, + "charLength": 14, + "snippet": { + "text": "movingCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1391, + "startColumn": 1, + "charOffset": 55057, + "charLength": 264, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerMoveCreature(std::shared_ptr player, std::shared_ptr movingCreature, const Position &movingCreatureOrigPos, std::shared_ptr toTile) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!player->canDoAction()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a305f9cfdd7cd379", + "equalIndicator/v1": "d1ab6e8a0e993b6106acac19b1dd5864c900bb5d7cd92887e6632352de703c2d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 24, + "startColumn": 28, + "charOffset": 721, + "charLength": 11, + "snippet": { + "text": "getCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 22, + "startColumn": 1, + "charOffset": 688, + "charLength": 96, + "snippet": { + "text": "\t}\r\n\r\n\tstd::shared_ptr getCylinder() override final {\r\n\t\treturn getTrashHolder();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1caf3420f12edf46", + "equalIndicator/v1": "d23dadd0fde8cf83b99ed19b272b9166d925f4b37ed6dd3e0e985e9484bb8c54" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7451, + "startColumn": 45, + "charOffset": 225068, + "charLength": 4, + "snippet": { + "text": "cost" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7449, + "startColumn": 1, + "charOffset": 224997, + "charLength": 250, + "snippet": { + "text": "\t}\r\n\thistory.cost = cost;\r\n\tg_metrics().addCounter(\"balance_decrease\", cost, { { \"player\", getName() }, { \"context\", \"forge_transfer\" } });\r\n\r\n\treturnValue = g_game().internalAddItem(static_self_cast(), exaltationContainer, INDEX_WHEREEVER);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "660a94fa7930e16f", + "equalIndicator/v1": "d24684db571ec8a94447ecdf06edc793d8348ee759cb5054750d6f6f1ac1fc0a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 772, + "startColumn": 8, + "charOffset": 23036, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 770, + "startColumn": 1, + "charOffset": 22929, + "charLength": 266, + "snippet": { + "text": "\t\t// onThink(self, interval)\r\n\t\tLuaScriptInterface* scriptInterface = mType->info.scriptInterface;\r\n\t\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\t\tg_logger().error(\"Monster {} Call stack overflow. Too many lua script calls \"\r\n\t\t\t \"being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "457e16007ecdb09d", + "equalIndicator/v1": "d28f9f7124c0086375661ad4827ee15d131bb20f95bb59f636ad0c1ec01b029f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3594, + "startColumn": 45, + "charOffset": 111431, + "charLength": 27, + "snippet": { + "text": "Weapons::getMaxWeaponDamage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3592, + "startColumn": 1, + "charOffset": 111277, + "charLength": 563, + "snippet": { + "text": "\t\t\tint32_t attackSkill = player->getWeaponSkill(weapon);\r\n\t\t\tfloat attackFactor = player->getAttackFactor();\r\n\t\t\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\r\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\r\n\t\t\t\tmaxDamage += static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, it.abilities->elementDamage, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "09aa2e32e0166553", + "equalIndicator/v1": "d290af30aa686b1cfb5b21e1995f1432e1d8d1ee40e49e0fcce81bfeec7ba886" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8449, + "startColumn": 2, + "charOffset": 293735, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8447, + "startColumn": 1, + "charOffset": 293677, + "charLength": 173, + "snippet": { + "text": "\r\n\tuint16_t page = result->getNumber(\"page\");\r\n\tuint32_t pages = result->getNumber(\"entries\");\r\n\tpages += entriesPerPage - 1;\r\n\tpages /= entriesPerPage;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "29761348984c3231", + "equalIndicator/v1": "d297d2851fee87130ea66bf842abb38fc2ae1ba31a66dcf9899d59da972a46f9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 133, + "startColumn": 68, + "charOffset": 3881, + "charLength": 9, + "snippet": { + "text": "moveEvent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 131, + "startColumn": 1, + "charOffset": 3809, + "charLength": 154, + "snippet": { + "text": "}\r\n\r\nbool MoveEvents::registerLuaEvent(const std::shared_ptr moveEvent) {\r\n\t// Check if event is correct\r\n\tif (registerLuaItemEvent(moveEvent)\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "040d26612fd53830", + "equalIndicator/v1": "d29ce73ac73b0b1de9b2571de32bd601bf532a06393befb0bc197c7a3ec9765b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2078, + "startColumn": 34, + "charOffset": 61996, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2076, + "startColumn": 1, + "charOffset": 61749, + "charLength": 413, + "snippet": { + "text": "void Monster::changeHealth(int32_t healthChange, bool sendHealthChange /* = true*/) {\r\n\tif (mType && !mType->info.soundVector.empty() && mType->info.soundChance >= static_cast(uniform_random(1, 100))) {\r\n\t\tauto index = uniform_random(0, mType->info.soundVector.size() - 1);\r\n\t\tg_game().sendSingleSoundEffect(static_self_cast()->getPosition(), mType->info.soundVector[index], getMonster());\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9c12e9c41aec37ec", + "equalIndicator/v1": "d2a5d18a2845b5709465adb85b532049ace7f1e80fd77b8c5d4d2516ca3675bf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3057, + "startColumn": 77, + "charOffset": 113661, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3055, + "startColumn": 1, + "charOffset": 113580, + "charLength": 252, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::processMoveOrAddItemToLootContainer(std::shared_ptr item, std::shared_ptr lootContainer, uint32_t &remainderCount, std::shared_ptr player) {\r\n\tstd::shared_ptr moveItem = nullptr;\r\n\tReturnValue ret;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "84ad88c29c7c161e", + "equalIndicator/v1": "d2e1cdf2c15778af3993e8e4d3e87c9943304136ea305eca25b9eb18985c93cb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 85, + "startColumn": 12, + "charOffset": 2788, + "charLength": 9, + "snippet": { + "text": "healthMax" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 83, + "startColumn": 1, + "charOffset": 2666, + "charLength": 282, + "snippet": { + "text": "\t\tmonster->skull = mType->info.skull;\r\n\t\tmonster->health = mType->info.health * mType->getHealthMultiplier();\r\n\t\tmonster->healthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\t\tmonster->baseSpeed = mType->getBaseSpeed();\r\n\t\tmonster->internalLight = mType->info.light;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5b763c8c50de29ef", + "equalIndicator/v1": "d2fe495491f1f1a3b856dd707098196091a14cbfa400824f12a2d7ea23b85a61" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7851, + "startColumn": 50, + "charOffset": 274563, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7849, + "startColumn": 1, + "charOffset": 274509, + "charLength": 241, + "snippet": { + "text": "}\r\n\r\nvoid Game::addPlayerMana(std::shared_ptr target) {\r\n\tif (const auto &party = target->getParty()) {\r\n\t\tuint8_t manaPercent = std::ceil((static_cast(target->getMana()) / std::max(target->getMaxMana(), 1)) * 100);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cc6693e77a0c71bb", + "equalIndicator/v1": "d349fa74e41b89c7ee10e35a673da16f5dd865a95efebb42b6f806a8ba28782e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly", + "markdown": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 63, + "startColumn": 132, + "charOffset": 1906, + "charLength": 12, + "snippet": { + "text": "__FUNCTION__" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 61, + "startColumn": 1, + "charOffset": 1751, + "charLength": 260, + "snippet": { + "text": "\t\t\t\tloadConfigLua();\r\n\r\n\t\t\t\tlogger.info(\"Server protocol: {}.{}{}\", CLIENT_VERSION_UPPER, CLIENT_VERSION_LOWER, g_configManager().getBoolean(OLD_PROTOCOL, __FUNCTION__) ? \" and 10x allowed!\" : \"\");\r\n#ifdef FEATURE_METRICS\r\n\t\t\t\tmetrics::Options metricsOptions;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c1f91383e925332a", + "equalIndicator/v1": "d3ab372d8cabd67603deec407ada2ef4ce6d0edde62f42081b9cabf2025f57cc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'operator double' must be marked explicit to avoid unintentional implicit conversions", + "markdown": "'operator double' must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 112, + "startColumn": 27, + "charOffset": 3292, + "charLength": 6, + "snippet": { + "text": "double" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 110, + "startColumn": 1, + "charOffset": 3260, + "charLength": 82, + "snippet": { + "text": "\t}\r\n\r\n\texplicit(false) operator double() const {\r\n\t\treturn get();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c6e2b9905f607f85", + "equalIndicator/v1": "d3b6b2a64dd5a7988c697d2f9f28a1320e151fa3210fb0b8c7f5b20d725363fb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1212, + "startColumn": 26, + "charOffset": 33751, + "charLength": 8, + "snippet": { + "text": "manaGain" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1210, + "startColumn": 1, + "charOffset": 33591, + "charLength": 259, + "snippet": { + "text": "\t\t\tinternalManaTicks = 0;\r\n\t\t\tif (creature->getZoneType() == ZONE_PROTECTION && dailyStreak >= DAILY_REWARD_DOUBLE_MP_REGENERATION) {\r\n\t\t\t\tcreature->changeMana(manaGain * 2); // Double regen from daily reward\r\n\t\t\t} else {\r\n\t\t\t\tcreature->changeMana(manaGain);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4340e88809cd595c", + "equalIndicator/v1": "d3c99d9278aa72e6a2c0cd61003d441f6eb4f6946f86a78c900ed54e61864d27" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float'", + "markdown": "Narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 571, + "startColumn": 68, + "charOffset": 15427, + "charLength": 23, + "snippet": { + "text": "(statsPercent[i] - 100)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 569, + "startColumn": 1, + "charOffset": 15331, + "charLength": 145, + "snippet": { + "text": "\r\n\t\t\tcase STAT_MAGICPOINTS:\r\n\t\t\t\tstats[i] = static_cast(player->getBaseMagicLevel() * ((statsPercent[i] - 100) / 100.f));\r\n\t\t\t\tbreak;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2369069044a3fa97", + "equalIndicator/v1": "d3d04794cadc15678f6cdec9db9dc376dd61b44905bf3971c6b70e8da1bd2392" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 368, + "startColumn": 67, + "charOffset": 13167, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 366, + "startColumn": 1, + "charOffset": 13096, + "charLength": 334, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventCreatureOnDrainHealth(std::shared_ptr creature, std::shared_ptr attacker, CombatType_t &typePrimary, int32_t &damagePrimary, CombatType_t &typeSecondary, int32_t &damageSecondary, TextColor_t &colorPrimary, TextColor_t &colorSecondary) {\r\n\tif (info.creatureOnDrainHealth == -1) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "35744ac34fa299fe", + "equalIndicator/v1": "d3e479d6aa50d2aa29ed477e843f1fdc27e4a2f253b8166a9a0f6d652d2827a0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 368, + "startColumn": 30, + "charOffset": 10446, + "charLength": 5, + "snippet": { + "text": "armor" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 366, + "startColumn": 1, + "charOffset": 10408, + "charLength": 79, + "snippet": { + "text": "\t\t}\r\n\t}\r\n\treturn static_cast(armor * vocation->armorMultiplier);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eb6a3e6d5f61a320", + "equalIndicator/v1": "d3f0dc2b3585185ad5b1bcf763d8d7c43b2c325d4ebfff727bd5b7257ff2a0e4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 598, + "startColumn": 13, + "charOffset": 29155, + "charLength": 11, + "snippet": { + "text": "stringValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 596, + "startColumn": 1, + "charOffset": 28963, + "charLength": 419, + "snippet": { + "text": "\t} else if (stringValue == \"absorbpercentdrown\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_DROWNDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentphysical\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercenthealing\") {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "764f42d2b4ebc1d7", + "equalIndicator/v1": "d4608860d9099049148f2b4eb0425cdb08dfc2abe29bb0b203025bd5cf3c04c0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getRecvbyte' can be made const", + "markdown": "Method 'getRecvbyte' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 10, + "charOffset": 1090, + "charLength": 11, + "snippet": { + "text": "getRecvbyte" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1074, + "charLength": 56, + "snippet": { + "text": "\t//\r\n\r\n\tuint8_t getRecvbyte() {\r\n\t\treturn recvbyte;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3f23a2a4621f0710", + "equalIndicator/v1": "d46b4b9c31b617a4eb07502c7858416cfd1d164443d094aee45f6458945bca11" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 51, + "startColumn": 7, + "charOffset": 1489, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 49, + "startColumn": 1, + "charOffset": 1358, + "charLength": 336, + "snippet": { + "text": "// Creature\r\nbool EventCallback::creatureOnChangeOutfit(std::shared_ptr creature, const Outfit_t &outfit) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnChangeOutfit - Creature {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e41969123b8205ac", + "equalIndicator/v1": "d46d2d7b63b6c7c6e0d266309fc0c04242a78ea3b4e3460c65dddfcd2f6ef19f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 177, + "startColumn": 6, + "charOffset": 6625, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 175, + "startColumn": 1, + "charOffset": 6569, + "charLength": 193, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, position);\r\n\r\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ea09aba65d510c28", + "equalIndicator/v1": "d481f122609313b73eba7201202b39b9802740ff0b083d9d8aa22ed43363d147" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7948, + "startColumn": 84, + "charOffset": 249927, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7946, + "startColumn": 1, + "charOffset": 249839, + "charLength": 156, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::AddCreatureLight(NetworkMessage &msg, std::shared_ptr creature) {\r\n\tLightInfo lightInfo = creature->getCreatureLight();\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bcaa199d6d9b2ff7", + "equalIndicator/v1": "d4918f31744119c3372614ccbf9081f24ac11159b611e5f59a83781b386420fa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'bankable' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'bankable' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 19, + "startColumn": 44, + "charOffset": 646, + "charLength": 8, + "snippet": { + "text": "bankable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 17, + "startColumn": 1, + "charOffset": 565, + "charLength": 121, + "snippet": { + "text": "#include \"lib/metrics/metrics.hpp\"\r\n\r\nBank::Bank(const std::shared_ptr bankable) :\r\n\tm_bankable(bankable) {\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "af1488c1c02f02f8", + "equalIndicator/v1": "d49ec58c32a307be010f0a30fad68aa4bf73648f9e12ec831302814a1a5f56f6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/di/runtime_provider.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 124, + "startColumn": 21, + "charOffset": 3508, + "charLength": 8, + "snippet": { + "text": "injector" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 122, + "startColumn": 1, + "charOffset": 3463, + "charLength": 117, + "snippet": { + "text": "\r\n\t\t\ttemplate \r\n\t\t\t/*non explicit*/ injector(const T &bindings) :\r\n\t\t\t\tinjector() {\r\n\t\t\t\tinstall(bindings);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "337353b0b082036a", + "equalIndicator/v1": "d4c6dc9688192f0a5f79c33d22427ef3984bd3a7bfe9bcf490e0fce26994db46" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 582, + "startColumn": 27, + "charOffset": 20651, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 580, + "startColumn": 1, + "charOffset": 20619, + "charLength": 123, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnLook, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "39c90811686981f1", + "equalIndicator/v1": "d4cc2d477e01fb6ca958b02439dae43b8981a87e7a9d839c7fb00b493fa6c70b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Switch has 2 consecutive identical branches", + "markdown": "Switch has 2 consecutive identical branches" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 462, + "startColumn": 3, + "charOffset": 12823, + "charLength": 4, + "snippet": { + "text": "case" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 460, + "startColumn": 1, + "charOffset": 12719, + "charLength": 157, + "snippet": { + "text": "\t\tcase FIGHTMODE_BALANCED:\r\n\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.75f : 1.0f;\r\n\t\tcase FIGHTMODE_DEFENSE:\r\n\t\t\treturn 1.0f;\r\n\t\tdefault:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0a64c2dfa0c0907b", + "equalIndicator/v1": "d4e849e80b9c53686e588a81f08829c01b7710d7f45448825bbfa44df351cf25" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 307, + "startColumn": 2, + "charOffset": 8027, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 305, + "startColumn": 1, + "charOffset": 7909, + "charLength": 183, + "snippet": { + "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\r\n\tstd::shared_ptr creature = getCreature(L, 2);\r\n\tuint32_t topicId = getNumber(L, 3, 0);\r\n\r\n\tif (!npc) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f65ba4ff4636d4fd", + "equalIndicator/v1": "d4eca4310d6a5837c34432a6ac284d7a0086b2fe7f1838ae7cc736b7aabe2398" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 672, + "startColumn": 28, + "charOffset": 21766, + "charLength": 6, + "snippet": { + "text": "damage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 670, + "startColumn": 1, + "charOffset": 21673, + "charLength": 205, + "snippet": { + "text": "\r\n\t\tdamage.secondary.type = imbuementInfo.imbuement->combatType;\r\n\t\tdamage.secondary.value = damage.primary.value * (damagePercent);\r\n\t\tdamage.primary.value = damage.primary.value * (1 - damagePercent);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "700f72283a214988", + "equalIndicator/v1": "d516502307fd679b4a59ce3127123a67f9f393f9641284f42473ad62eb4e2de5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'party' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'party' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 356, + "startColumn": 34, + "charOffset": 15267, + "charLength": 28, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 354, + "startColumn": 1, + "charOffset": 15111, + "charLength": 283, + "snippet": { + "text": "\tvoid sendTradeItemRequest(const std::string &traderName, std::shared_ptr item, bool ack);\r\n\tvoid sendCloseTrade();\r\n\tvoid updatePartyTrackerAnalyzer(const std::shared_ptr party);\r\n\r\n\tvoid sendTextWindow(uint32_t windowTextId, uint32_t itemId, const std::string &text);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6801263d3d20e5ff", + "equalIndicator/v1": "d52139143a5e5caf4b3442392f79ef30f318a9874a014221c34232606ea4e8ef" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 146, + "startColumn": 7, + "charOffset": 4497, + "charLength": 8, + "snippet": { + "text": "addThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 144, + "startColumn": 1, + "charOffset": 4325, + "charLength": 352, + "snippet": { + "text": "\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override final;\r\n\r\n\tvoid addThing(std::shared_ptr thing) override final;\r\n\tvoid addThing(int32_t index, std::shared_ptr thing) override final;\r\n\tvoid addItemBack(std::shared_ptr item);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "147f4be394a20f8b", + "equalIndicator/v1": "d5346eacc7630dcf170a9e3f8567c6e5f24b353780147eccb1cf158da2df94cb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 203, + "startColumn": 14, + "charOffset": 5439, + "charLength": 14, + "snippet": { + "text": "getDescription" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 201, + "startColumn": 1, + "charOffset": 5388, + "charLength": 216, + "snippet": { + "text": "\tbool hasHeight(uint32_t n) const;\r\n\r\n\tstd::string getDescription(int32_t lookDistance) override final;\r\n\r\n\tint32_t getClientIndexOfCreature(std::shared_ptr player, std::shared_ptr creature) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ed102d3b942b4c79", + "equalIndicator/v1": "d5428e20ce42e319968cb3ac91ed459c16ed3d691031584215fc3358c8b2793e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 312, + "startColumn": 15, + "charOffset": 7971, + "charLength": 12, + "snippet": { + "text": "std::toupper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 310, + "startColumn": 1, + "charOffset": 7919, + "charLength": 112, + "snippet": { + "text": "\t\t} else {\r\n\t\t\tif (capitalizeNext) {\r\n\t\t\t\tresult += std::toupper(ch);\r\n\t\t\t\tcapitalizeNext = false;\r\n\t\t\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ba01be090d311590", + "equalIndicator/v1": "d564553e306b7ab39c94b0c7aaf4477465ab828fdf95536e7a941c749be1fbdf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 75, + "startColumn": 73, + "charOffset": 2879, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 73, + "startColumn": 1, + "charOffset": 2801, + "charLength": 345, + "snippet": { + "text": "\t}\r\n\r\n\tvoid addOutfitAndMountBytes(NetworkMessage &msg, std::shared_ptr item, const CustomAttribute* attribute, const std::string &head, const std::string &body, const std::string &legs, const std::string &feet, bool addAddon = false, bool addByte = false) {\r\n\t\tauto look = attribute->getAttribute();\r\n\t\tmsg.add(look);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "47b58038252b7085", + "equalIndicator/v1": "d567d244bb2f6d58fb192dd08c01d1fe92f242dfe1976ca44b4daa5c804029f6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/network/webhook_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 2, + "charOffset": 795, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 714, + "charLength": 188, + "snippet": { + "text": "\tstd::string title = getString(L, 1);\r\n\tstd::string message = getString(L, 2);\r\n\tuint32_t color = getNumber(L, 3, 0);\r\n\tstd::string url = getString(L, -1);\r\n\tif (url == title) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4539113fff4fd03e", + "equalIndicator/v1": "d56d0c48e622972f006c9231c991657fd8d10ab1e20607039ed743cc12ad040b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 517, + "startColumn": 38, + "charOffset": 19593, + "charLength": 10, + "snippet": { + "text": "toCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 515, + "startColumn": 1, + "charOffset": 19501, + "charLength": 155, + "snippet": { + "text": "\r\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\r\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\r\n\r\n\treturn getScriptInterface()->callFunction(7);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0684e317875bd302", + "equalIndicator/v1": "d577d6f28a431edc0723c38463160105500a426b7058c64b15741f26cfcb8391" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1262, + "startColumn": 72, + "charOffset": 38719, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1260, + "startColumn": 1, + "charOffset": 38643, + "charLength": 170, + "snippet": { + "text": "}\r\n\r\nvoid Creature::onAttackedCreatureDrainHealth(std::shared_ptr target, int32_t points) {\r\n\ttarget->addDamagePoints(static_self_cast(), points);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "93ef5c610a3d74ea", + "equalIndicator/v1": "d57d7ef842bf8faace37aaf96ecb0e21e5df9867a53ca9fa41dda5f4cf1b76b8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 361, + "startColumn": 52, + "charOffset": 12380, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 359, + "startColumn": 1, + "charOffset": 12324, + "charLength": 228, + "snippet": { + "text": "}\r\n\r\nvoid Npc::onPlayerSellItem(std::shared_ptr player, uint16_t itemId, uint8_t subType, uint16_t amount, bool ignore, uint64_t &totalPrice, std::shared_ptr parent /*= nullptr*/) {\r\n\tif (!player) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "23efbbc66c8c32c4", + "equalIndicator/v1": "d58bfb5531d07db3f432d20253525f3401efeb92d83c9d27c927c6464f0244a0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 717, + "startColumn": 51, + "charOffset": 23686, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 715, + "startColumn": 1, + "charOffset": 23631, + "charLength": 207, + "snippet": { + "text": "}\r\n\r\nvoid Spell::postCastSpell(std::shared_ptr player, bool finishedCast /*= true*/, bool payCost /*= true*/) const {\r\n\tif (finishedCast) {\r\n\t\tif (!player->hasFlag(PlayerFlags_t::HasNoExhaustion)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9fd5f028298370de", + "equalIndicator/v1": "d5bbc434afb6d40d34b6f76debe235a43b1a139ff78e9149c911025bd974dd50" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1926, + "startColumn": 5, + "charOffset": 66128, + "charLength": 7, + "snippet": { + "text": "int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1924, + "startColumn": 1, + "charOffset": 66097, + "charLength": 176, + "snippet": { + "text": "\r\n\t\t\t\t// perform rotation\r\n\t\t\t\tint32_t rotatedX = static_cast(round(newX * a + newY * b));\r\n\t\t\t\tint32_t rotatedY = static_cast(round(newX * c + newY * d));\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cf32d1db9299ff6b", + "equalIndicator/v1": "d5c0d01b60491fae267f80a0f28ef9fb44d543302a131e32b40c2301269bbaaf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7450, + "startColumn": 64, + "charOffset": 259546, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7448, + "startColumn": 1, + "charOffset": 259444, + "charLength": 288, + "snippet": { + "text": "\r\nvoid Game::buildMessageAsSpectator(\r\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\r\n\tstd::shared_ptr targetPlayer, TextMessage &message, std::stringstream &ss,\r\n\tconst std::string &damageString, std::string &spectatorMessage\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c1481dc9f389015d", + "equalIndicator/v1": "d5c9a473d7d0d8159ea755d5465e4981ae1121310140899c7462cef388445d83" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 792, + "startColumn": 85, + "charOffset": 25802, + "charLength": 8, + "snippet": { + "text": "minValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 790, + "startColumn": 1, + "charOffset": 25659, + "charLength": 176, + "snippet": { + "text": "\r\n\tint32_t minValue = std::round(player->getLevel() / 5);\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue) / 2;\r\n\r\n\tif (target) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2998cc461ad4e54e", + "equalIndicator/v1": "d5cd95bf64b2758e32f2932081dbe0eaab79a4032e3d375f4cc4cdf5633c2f37" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6841, + "startColumn": 38, + "charOffset": 236765, + "charLength": 6, + "snippet": { + "text": "damage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6839, + "startColumn": 1, + "charOffset": 236645, + "charLength": 172, + "snippet": { + "text": "\r\n\tdamage.primary.value = std::round(damage.primary.value * pvpDamageMultiplier);\r\n\tdamage.secondary.value = std::round(damage.secondary.value * pvpDamageMultiplier);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4994fa0a89946d48", + "equalIndicator/v1": "d5ce6ed15d182b1689832d95b0bcd2bb4977497ba451dad04839db7fdeed06e2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2195, + "startColumn": 11, + "charOffset": 65753, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2193, + "startColumn": 1, + "charOffset": 65664, + "charLength": 210, + "snippet": { + "text": "\tmonsterForgeClassification = ForgeClassifications_t::FORGE_NORMAL_MONSTER;\r\n\r\n\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "86b6c62b6e2b560d", + "equalIndicator/v1": "d5e854d4d4988d26bac2feabfb09c73d04695371ae8023cc2cb0cc5b2f190029" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 475, + "startColumn": 60, + "charOffset": 15658, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 473, + "startColumn": 1, + "charOffset": 15594, + "charLength": 145, + "snippet": { + "text": "}\r\n\r\nvoid Actions::showUseHotkeyMessage(std::shared_ptr player, std::shared_ptr item, uint32_t count) {\r\n\tstd::ostringstream ss;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "48d62e61fa98db69", + "equalIndicator/v1": "d603b75eae0cda8ea6cc19d2d10482a198561f631213a8bc823f134ca02a9ba4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'createItem' is within a recursive call chain", + "markdown": "Function 'createItem' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 77, + "startColumn": 33, + "charOffset": 2521, + "charLength": 10, + "snippet": { + "text": "createItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 75, + "startColumn": 1, + "charOffset": 2484, + "charLength": 186, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr MapCache::createItem(const std::shared_ptr &BasicItem, Position position) {\r\n\tauto item = Item::CreateItem(BasicItem->id, position);\r\n\tif (!item) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "657ff0f3aa391727", + "equalIndicator/v1": "d62124be4ba6e4eb4dd91c3f4bab8a2e08a7976b790dea4ecc49d4f0d94cc88f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 179, + "startColumn": 22, + "charOffset": 7043, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 177, + "startColumn": 1, + "charOffset": 6961, + "charLength": 239, + "snippet": { + "text": "\tstatic std::shared_ptr virtualCylinder;\r\n\r\n\tvirtual ReturnValue queryAdd(int32_t, const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr = nullptr) override {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "05ca809f11aa95c3", + "equalIndicator/v1": "d6355914ab8886482f190f8517fe7912afc0643cabc8a1f2fcc2a6d26cd71858" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 105, + "startColumn": 51, + "charOffset": 3702, + "charLength": 9, + "snippet": { + "text": "minRangeX" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 103, + "startColumn": 1, + "charOffset": 3547, + "charLength": 206, + "snippet": { + "text": "\t\tspectators.find(position, multifloor, minRangeX, maxRangeX, minRangeY, maxRangeY);\r\n\t} else {\r\n\t\tspectators.find(position, multifloor, minRangeX, maxRangeX, minRangeY, maxRangeY);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9b906220deee162b", + "equalIndicator/v1": "d669e55f7d6248892612aa99ec5edd96ad9080ad24275d3ceabc2c70a6245cc1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 536, + "startColumn": 52, + "charOffset": 14933, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 534, + "startColumn": 1, + "charOffset": 14877, + "charLength": 140, + "snippet": { + "text": "}\r\n\r\nbool Party::isPlayerActive(std::shared_ptr player) {\r\n\tauto it = ticksMap.find(player->getID());\r\n\tif (it == ticksMap.end()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1f49093b471a75be", + "equalIndicator/v1": "d67444c5d1a0d33c70de4abf72b909a720d5250deca882ae518309e6b5b74046" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getWieldInfo' can be made const", + "markdown": "Method 'getWieldInfo' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 238, + "startColumn": 11, + "charOffset": 7515, + "charLength": 12, + "snippet": { + "text": "getWieldInfo" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 236, + "startColumn": 1, + "charOffset": 7485, + "charLength": 72, + "snippet": { + "text": "\t\tpremium = b;\r\n\t}\r\n\tuint32_t getWieldInfo() {\r\n\t\treturn wieldInfo;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "45fe1b20a69dd2f6", + "equalIndicator/v1": "d6b8fb4a628e9910bf01bfc34fb61bca26f2d46f27916b9ca1353702309d1c1e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 78, + "startColumn": 7, + "charOffset": 1966, + "charLength": 5, + "snippet": { + "text": "clear" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 76, + "startColumn": 1, + "charOffset": 1824, + "charLength": 221, + "snippet": { + "text": "\tEvent_ptr getEvent(const std::string &nodeName) override;\r\n\tbool registerEvent(Event_ptr event, const pugi::xml_node &node) override;\r\n\tvoid clear(bool) override final;\r\n\r\n\ttypedef std::map ModulesList;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "298b28568834ecba", + "equalIndicator/v1": "d6d7a2fd98f43cfa7faba6ac3a31076471f78207f053b3884f71a50bcc68d828" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tradeItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tradeItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1944, + "startColumn": 299, + "charOffset": 75997, + "charLength": 9, + "snippet": { + "text": "tradeItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1942, + "startColumn": 1, + "charOffset": 75694, + "charLength": 444, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::internalMoveItem(std::shared_ptr fromCylinder, std::shared_ptr toCylinder, int32_t index, std::shared_ptr item, uint32_t count, std::shared_ptr* movedItem, uint32_t flags /*= 0*/, std::shared_ptr actor /*=nullptr*/, std::shared_ptr tradeItem /* = nullptr*/, bool checkTile /* = true*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (fromCylinder == nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7137dc9529856530", + "equalIndicator/v1": "d6e4c3e03dc3b8906cb63ae26f634f1a0d9155b9254843510b385f50e5f0e50b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 608, + "startColumn": 8, + "charOffset": 14999, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 606, + "startColumn": 1, + "charOffset": 14903, + "charLength": 213, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeHasSubType(lua_State* L) {\r\n\t// itemType:hasSubType()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->hasSubType());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8aa6635055568cd2", + "equalIndicator/v1": "d714b332e286575ff04368bd17361ae0f2aa2c120a690958f77efede65b8e92b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 401, + "startColumn": 58, + "charOffset": 11749, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 399, + "startColumn": 1, + "charOffset": 11687, + "charLength": 153, + "snippet": { + "text": "}\r\n\r\nvoid Container::onAddContainerItem(std::shared_ptr item) {\r\n\tauto spectators = Spectators().find(getPosition(), false, 2, 2, 2, 2);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "268c2eae96b2313a", + "equalIndicator/v1": "d732f1328e1529685d365a9dac6627c17f7620e6c58bc1f668a1d9783dc483a5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1180, + "startColumn": 28, + "charOffset": 32507, + "charLength": 10, + "snippet": { + "text": "healthGain" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1178, + "startColumn": 1, + "charOffset": 32388, + "charLength": 199, + "snippet": { + "text": "\t\t\t\tcreature->changeHealth(healthGain * 2); // Double regen from daily reward\r\n\t\t\t} else {\r\n\t\t\t\tcreature->changeHealth(healthGain);\r\n\t\t\t}\r\n\t\t\trealHealthGain = creature->getHealth() - realHealthGain;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8a3f45bcdfcebb15", + "equalIndicator/v1": "d73ffb68a117077f5b4236a074f1f4a6f9082b6c2bf52916dd265cdd69c8c397" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2927, + "startColumn": 14, + "charOffset": 89442, + "charLength": 4, + "snippet": { + "text": "text" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2925, + "startColumn": 1, + "charOffset": 89359, + "charLength": 130, + "snippet": { + "text": "\tstd::ostringstream ss;\r\n\tstd::map race = {};\r\n\tstd::string text = \"\";\r\n\tuint8_t search = msg.getByte();\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f6559bcaafa73e32", + "equalIndicator/v1": "d7539fc9fcd41a40d4b129df663417a2bca91bd6a6e3e4ca2b18ba53fda085ef" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 343, + "startColumn": 77, + "charOffset": 10996, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 341, + "startColumn": 1, + "charOffset": 10849, + "charLength": 382, + "snippet": { + "text": "\t\t\t\t// nopvp-zone\r\n\t\t\t\tauto attackerTile = attackerPlayer->getTile();\r\n\t\t\t\tif (targetPlayerTile && targetPlayerTile->hasFlag(TILESTATE_NOPVPZONE)) {\r\n\t\t\t\t\treturn RETURNVALUE_ACTIONNOTPERMITTEDINANOPVPZONE;\r\n\t\t\t\t} else if (attackerTile && attackerTile->hasFlag(TILESTATE_NOPVPZONE) && targetPlayerTile && !targetPlayerTile->hasFlag(TILESTATE_NOPVPZONE | TILESTATE_PROTECTIONZONE)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b76b6d4a51e79608", + "equalIndicator/v1": "d786b4adda357359ea43eff9844a38115c6756cc4b03a73248b09c5f50914c6b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 547, + "startColumn": 2, + "charOffset": 14540, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 545, + "startColumn": 1, + "charOffset": 14449, + "charLength": 236, + "snippet": { + "text": "\tuint16_t itemId = getNumber(L, 3);\r\n\tdouble amount = getNumber(L, 4);\r\n\tuint16_t subType = getNumber(L, 5, 1);\r\n\tuint16_t actionId = getNumber(L, 6, 0);\r\n\tbool ignoreCap = getBoolean(L, 7, false);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "20785f8294676b95", + "equalIndicator/v1": "d7a3688876716fb1e979d5996f3ed0f32a64ea39c5da7a80947ac31bd5b147c7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7130, + "startColumn": 30, + "charOffset": 248265, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7128, + "startColumn": 1, + "charOffset": 248073, + "charLength": 312, + "snippet": { + "text": "\t\tif (damage.origin != ORIGIN_NONE && target && damage.primary.type != COMBAT_HEALING) {\r\n\t\t\tdamage.primary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\r\n\t\t\tdamage.secondary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\r\n\t\t}\r\n\t\tauto healthChange = damage.primary.value + damage.secondary.value;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5d85db4496b94175", + "equalIndicator/v1": "d7c67966e159a70909c437aed4aa2946779c426b05c1aae9cd8c519a621cb2dc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8607, + "startColumn": 65, + "charOffset": 271443, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8605, + "startColumn": 1, + "charOffset": 271374, + "charLength": 137, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendUpdateCreature(std::shared_ptr creature) {\r\n\tif (oldProtocol || !creature || !player) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d37969ba902b340e", + "equalIndicator/v1": "d7cd340a3b99b3f36fe4ab1269cd7f0732599701a05be1d6e4513d671fbbacd9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1144, + "startColumn": 28, + "charOffset": 33651, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1142, + "startColumn": 1, + "charOffset": 33471, + "charLength": 217, + "snippet": { + "text": "\tvoid sendCreatureSay(std::shared_ptr creature, SpeakClasses type, const std::string &text, const Position* pos = nullptr) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureSay(creature, type, text, pos);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4c4e115e088fdd8c", + "equalIndicator/v1": "d7cfe0be11fbddb83543e3fd6bff00a128364c5dcb694296d17451222acc336d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 869, + "startColumn": 6, + "charOffset": 33098, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 867, + "startColumn": 1, + "charOffset": 33040, + "charLength": 201, + "snippet": { + "text": "\tLuaScriptInterface::pushCombatDamage(L, damage);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 8, 4) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "50f5b92d49c9727b", + "equalIndicator/v1": "d7e5d05cbf68b853cb20ca2c69a7d0229991bbf8f06e29cc3e0140d821e5956b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 712, + "startColumn": 19, + "charOffset": 21854, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 710, + "startColumn": 1, + "charOffset": 21760, + "charLength": 143, + "snippet": { + "text": "void Container::addItemBack(std::shared_ptr item) {\r\n\taddItem(item);\r\n\tupdateItemWeight(item->getWeight());\r\n\r\n\t// send change to client\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ed228824368dd43a", + "equalIndicator/v1": "d7f6201e788d77ac4a3969d8d2c48ec7f6f1420953545726584b8da5e4cacc03" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 70, + "startColumn": 30, + "charOffset": 2460, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 68, + "startColumn": 1, + "charOffset": 2424, + "charLength": 94, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tfor (std::shared_ptr item : itemlist) {\r\n\t\t\titem->setParent(getParent());\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c776b20815bb3328", + "equalIndicator/v1": "d7f8abca9fe8062c88fc770228f5a3b5926035472ec7c3332a6075a427ebf10e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'onRemoveTileItem' is within a recursive call chain", + "markdown": "Function 'onRemoveTileItem' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 480, + "startColumn": 12, + "charOffset": 13563, + "charLength": 16, + "snippet": { + "text": "onRemoveTileItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 478, + "startColumn": 1, + "charOffset": 13547, + "charLength": 379, + "snippet": { + "text": "}\r\n\r\nvoid Tile::onRemoveTileItem(const CreatureVector &spectators, const std::vector &oldStackPosVector, std::shared_ptr item) {\r\n\tif ((item->hasProperty(CONST_PROP_MOVABLE) || item->getContainer()) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) {\r\n\t\tauto it = g_game().browseFields.find(getTile());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e34b97f5f8e34209", + "equalIndicator/v1": "d8320bd1343a084400314ac5e5c86a16cf96e09b0c7cd2286715d8c21b326016" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 892, + "startColumn": 7, + "charOffset": 24648, + "charLength": 12, + "snippet": { + "text": "changeHealth" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 890, + "startColumn": 1, + "charOffset": 24564, + "charLength": 246, + "snippet": { + "text": "\tvoid stowItem(std::shared_ptr item, uint32_t count, bool allItems);\r\n\r\n\tvoid changeHealth(int32_t healthChange, bool sendHealthChange = true) override;\r\n\tvoid changeMana(int32_t manaChange) override;\r\n\tvoid changeSoul(int32_t soulChange);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f5e2291f33a28514", + "equalIndicator/v1": "d8324b78ad07ede17684793012b1564fbb7d6f2729958570527c889129d8e932" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8574, + "startColumn": 2, + "charOffset": 270537, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8572, + "startColumn": 1, + "charOffset": 270530, + "charLength": 125, + "snippet": { + "text": "\t}\r\n\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t itemTier = 0;\r\n\tif (Item::items[itemId].upgradeClassification > 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5ec79cd01680f466", + "equalIndicator/v1": "d834c992c0478711fa0d87f55f8eb5229a37bb91ec0d283871ffae92518d43b4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Last', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Last', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/vectorset.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 78, + "startColumn": 84, + "charOffset": 2130, + "charLength": 5, + "snippet": { + "text": "_Last" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 76, + "startColumn": 1, + "charOffset": 2003, + "charLength": 211, + "snippet": { + "text": "\r\n\t\ttemplate \r\n\t\tconstexpr auto insert(std::vector::const_iterator _Where, _Iter _First, _Iter _Last) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\treturn container.insert(_Where, _First, _Last);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b2804e91d9b12033", + "equalIndicator/v1": "d850e7ab03a13eedbd37db4d76c67fda6b895c3db787e15294f84b9e74fb18f4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1675, + "startColumn": 3, + "charOffset": 58806, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1673, + "startColumn": 1, + "charOffset": 58688, + "charLength": 168, + "snippet": { + "text": "\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r\n\t\treturn;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "500554d73e16e1f4", + "equalIndicator/v1": "d858e631f0163b77c1f8c431284c34d04ad304c32c9560b7d028c933881cb6a1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/inbox/inbox.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 25, + "startColumn": 7, + "charOffset": 802, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 23, + "startColumn": 1, + "charOffset": 634, + "charLength": 472, + "snippet": { + "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e09c4ce7cb1682e7", + "equalIndicator/v1": "d87c41ee5dd693b94a7764ca74f51b3fbac3941a9b392e5523b6ebf540b51411" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 79, + "startColumn": 42, + "charOffset": 2375, + "charLength": 4, + "snippet": { + "text": "keys" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 77, + "startColumn": 1, + "charOffset": 2329, + "charLength": 162, + "snippet": { + "text": "}\r\n\r\nstd::unordered_set KVStore::keys(const std::string &prefix /*= \"\"*/) {\r\n\tstd::scoped_lock lock(mutex_);\r\n\tstd::unordered_set keys;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "28be17e8cbb7ffaf", + "equalIndicator/v1": "d87e45a63c0980cd6824b14f0992be6d0af41c0dfb0b2b6545b9b1f26dc16d7d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1980, + "startColumn": 2, + "charOffset": 60677, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1978, + "startColumn": 1, + "charOffset": 60584, + "charLength": 270, + "snippet": { + "text": "void ProtocolGame::parseEditVip(NetworkMessage &msg) {\r\n\tstd::vector vipGroupsId;\r\n\tuint32_t guid = msg.get();\r\n\tconst std::string description = msg.getString();\r\n\tuint32_t icon = std::min(10, msg.get()); // 10 is max icon in 9.63\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f9c7214e0a0b9291", + "equalIndicator/v1": "d89114cbebd48bb1959d9f5bc85e784b0110fdb80a488bf26c02d6c27ac55a44" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Switch has 2 consecutive identical branches", + "markdown": "Switch has 2 consecutive identical branches" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4381, + "startColumn": 4, + "charOffset": 138875, + "charLength": 4, + "snippet": { + "text": "case" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4379, + "startColumn": 1, + "charOffset": 138854, + "charLength": 98, + "snippet": { + "text": "\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase MESSAGE_TUTORIAL_HINT: {\r\n\t\t\t\tinternalType = MESSAGE_LOGIN;\r\n\t\t\t\tbreak;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0a8fe9e7a9b0c63d", + "equalIndicator/v1": "d8a6531efe1068c6e1d920fc72ff9d28afc33b4d3b99219c8273773d06556b2b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 230, + "startColumn": 7, + "charOffset": 8429, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 228, + "startColumn": 1, + "charOffset": 8310, + "charLength": 250, + "snippet": { + "text": "// Party\r\nbool EventCallback::partyOnJoin(std::shared_ptr party, std::shared_ptr player) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::partyOnJoin - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75ad0e0f6e58a0a3", + "equalIndicator/v1": "d8dd3654ee57238ab7907751df8d2cdfe02321b338dc6446000555ac5db51862" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 212, + "startColumn": 14, + "charOffset": 6165, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 210, + "startColumn": 1, + "charOffset": 5839, + "charLength": 624, + "snippet": { + "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t tileFlags, std::shared_ptr actor = nullptr) override;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5ecd70e9f8ce3822", + "equalIndicator/v1": "d8e780fc55b34ae64aa6578662fefa9c1c45f38901c43929617102f26ebb17dd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Replace loop by 'std::ranges::any_of()'", + "markdown": "Replace loop by 'std::ranges::any_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5060, + "startColumn": 2, + "charOffset": 150028, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5058, + "startColumn": 1, + "charOffset": 150021, + "charLength": 124, + "snippet": { + "text": "\t}\r\n\r\n\tfor (const FamiliarEntry &familiarEntry : familiars) {\r\n\t\tif (familiarEntry.lookType == lookType) {\r\n\t\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8d6a694c6f684d16", + "equalIndicator/v1": "d8e7a4deb2027650070232e960193c98e52d0d7ab87c3da43f9f26f04d8517f8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 250, + "startColumn": 4, + "charOffset": 8944, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 248, + "startColumn": 1, + "charOffset": 8933, + "charLength": 147, + "snippet": { + "text": "\t\t\t}\r\n\r\n\t\t\tuint32_t recvChecksum = msg.get();\r\n\t\t\tif (recvChecksum != checksum) {\r\n\t\t\t\t// it might not have been the checksum, step back\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d4d7fc2e6f75fc08", + "equalIndicator/v1": "d90819b2dae26efc160a4064f2f0b3dec3c3e93303b98a349de050b0ef6a4813" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 768, + "startColumn": 61, + "charOffset": 27558, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 766, + "startColumn": 1, + "charOffset": 27493, + "charLength": 449, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnItemMoved(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) {\r\n\t// Player:onItemMoved(item, count, fromPosition, toPosition) or Player.onItemMoved(self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)\r\n\tif (info.playerOnItemMoved == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "25039de2b89798ad", + "equalIndicator/v1": "d919d559c1958677a840392360346cce99582880d0fdcb89964aea7e2675707b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2326, + "startColumn": 71, + "charOffset": 80761, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2324, + "startColumn": 1, + "charOffset": 80686, + "charLength": 155, + "snippet": { + "text": "}\r\n\r\nint32_t PlayerWheel::checkExecutionersThrow(std::shared_ptr target) const {\r\n\tif (!target || target == m_player.getPlayer()) {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1ae7da2160c38ea8", + "equalIndicator/v1": "d92682ba31d75812bde4676bb6f47fdb05ede3dee4ef667f809b2df0067b34ea" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 710, + "startColumn": 51, + "charOffset": 21810, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 708, + "startColumn": 1, + "charOffset": 21755, + "charLength": 119, + "snippet": { + "text": "}\r\n\r\nvoid Container::addItemBack(std::shared_ptr item) {\r\n\taddItem(item);\r\n\tupdateItemWeight(item->getWeight());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "33a110409f1e1234", + "equalIndicator/v1": "d932f03ec1c82c8b5b1ae33b95bb2f6d471828ac2adc5d864ed23c7bc34d730f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1296, + "startColumn": 81, + "charOffset": 52085, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1294, + "startColumn": 1, + "charOffset": 51908, + "charLength": 198, + "snippet": { + "text": "\t\t// Registering outfits\r\n\t\tfor (uint32_t it = 0; it < m_appearancesPtr->outfit_size(); it++) {\r\n\t\t\tregisteredLookTypes.push_back(static_cast(m_appearancesPtr->outfit(it).id()));\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c3e33ca9dc9f6f04", + "equalIndicator/v1": "d94a12c5062c12a5000fc2450bae2b30aeec6c9df4d583e63e5a444fb1bd7f69" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'key' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'key' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 117, + "startColumn": 60, + "charOffset": 6023, + "charLength": 14, + "snippet": { + "text": "const uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 115, + "startColumn": 1, + "charOffset": 5807, + "charLength": 565, + "snippet": { + "text": "\tvoid eventPlayerOnRequestQuestLog(std::shared_ptr player);\r\n\tvoid eventPlayerOnRequestQuestLine(std::shared_ptr player, uint16_t questId);\r\n\tvoid eventOnStorageUpdate(std::shared_ptr player, const uint32_t key, const int32_t value, int32_t oldValue, uint64_t currentTime);\r\n\tvoid eventPlayerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage);\r\n\tvoid eventPlayerOnInventoryUpdate(std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool equip);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "03cde0f23103c208", + "equalIndicator/v1": "d95c7f06dcc5e6dcff00ba6c8c14a82cb227b0f03ff5246945f1b5d30860aaa3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 27, + "startColumn": 10, + "charOffset": 812, + "charLength": 11, + "snippet": { + "text": "std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 25, + "startColumn": 1, + "charOffset": 772, + "charLength": 61, + "snippet": { + "text": "\r\n\tif (!canRead(stringLen)) {\r\n\t\treturn std::string();\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bc8a43412c84a312", + "equalIndicator/v1": "d95fa3e827053fb22017d083f6c9f3d544cc53396c8d346b338a39191b71d0fa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 142, + "startColumn": 33, + "charOffset": 3433, + "charLength": 8, + "snippet": { + "text": "subgroup" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 140, + "startColumn": 1, + "charOffset": 3340, + "charLength": 162, + "snippet": { + "text": "\tuint32_t storage = 0;\r\n\tuint16_t id, baseid, category = 0;\r\n\tstd::string name, description, subgroup = \"\";\r\n\r\n\tstd::vector> items;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "afa69c06ebb4bc58", + "equalIndicator/v1": "d9727160403e89e18826bc0ffe27c428652f10cee0de5e2bb6792791dda37522" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2284, + "startColumn": 15, + "charOffset": 71331, + "charLength": 9, + "snippet": { + "text": "BestClass" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2282, + "startColumn": 1, + "charOffset": 71176, + "charLength": 234, + "snippet": { + "text": "\tstd::map mtype_list = g_game().getBestiaryList();\r\n\tfor (uint8_t i = BESTY_RACE_FIRST; i <= BESTY_RACE_LAST; i++) {\r\n\t\tstd::string BestClass = \"\";\r\n\t\tuint16_t count = 0;\r\n\t\tfor (const auto &rit : mtype_list) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "904287fdda2fda12", + "equalIndicator/v1": "d9d75b826bf923589f0f14b21cf7d3db38fa36a309a74de72b2242904692e89c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 317, + "startColumn": 63, + "charOffset": 13348, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 315, + "startColumn": 1, + "charOffset": 13281, + "charLength": 178, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerStash(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2381d6fd49c9476b", + "equalIndicator/v1": "d9eda1b3d7122c4c131dc926c7f5438af1bd43a05f103e77d8ff3dfa5b6b7644" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'time_t' (aka 'long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'time_t' (aka 'long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 242, + "startColumn": 6, + "charOffset": 6471, + "charLength": 7, + "snippet": { + "text": "!player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 240, + "startColumn": 1, + "charOffset": 6371, + "charLength": 174, + "snippet": { + "text": "\t// player:getAccountId()\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (!player || player->getAccountId() == 0) {\r\n\t\tlua_pushnil(L);\r\n\t\treturn 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "69231420356bc88c", + "equalIndicator/v1": "d9f9265a5bdf8e558dece20e1ae9f17103bd3536c1eb2de44f21c13481233881" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Potential uncovered code path; add a default label", + "markdown": "Potential uncovered code path; add a default label" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 561, + "startColumn": 3, + "charOffset": 15040, + "charLength": 6, + "snippet": { + "text": "switch" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 559, + "startColumn": 1, + "charOffset": 15031, + "charLength": 148, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tswitch (i) {\r\n\t\t\tcase STAT_MAXHITPOINTS:\r\n\t\t\t\tstats[i] = static_cast(player->getMaxHealth() * ((statsPercent[i] - 100) / 100.f));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8b2860a4c5960afc", + "equalIndicator/v1": "da0e82f4de9d14aaa36ec5af058cca98bab61782b41cabeb773b0989795229e7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1020, + "startColumn": 41, + "charOffset": 38871, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1018, + "startColumn": 1, + "charOffset": 38825, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "57e5b4f4faf6755b", + "equalIndicator/v1": "da1ae489a1ce451b2c2c3788c69983ad7aaa39029740640460f2013786acef45" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 733, + "startColumn": 94, + "charOffset": 23587, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 731, + "startColumn": 1, + "charOffset": 23489, + "charLength": 272, + "snippet": { + "text": "}\r\n\r\nvoid Combat::CombatConditionFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\r\n\tif (params.origin == ORIGIN_MELEE && data && data->primary.value == 0 && data->secondary.value == 0) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b77cfe4de4a1cc47", + "equalIndicator/v1": "da1fb12ee6db1bb9e9799bb544d7874c2de7ea35d9bdc99d6333f2f568d03823" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 31, + "startColumn": 2, + "charOffset": 1101, + "charLength": 11, + "snippet": { + "text": "ReturnValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 29, + "startColumn": 1, + "charOffset": 793, + "charLength": 614, + "snippet": { + "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9f3c9a0ecc5dfaba", + "equalIndicator/v1": "da45a183576d0cc1cb71c9b520278b6492fd296e8123907c7aeaa7b47508a2cb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1890, + "startColumn": 27, + "charOffset": 65323, + "charLength": 23, + "snippet": { + "text": "(output->getRows() / 2)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1888, + "startColumn": 1, + "charOffset": 65226, + "charLength": 146, + "snippet": { + "text": "\t\t// rotation\r\n\t\tint32_t rotateCenterX = (output->getCols() / 2) - 1;\r\n\t\tint32_t rotateCenterY = (output->getRows() / 2) - 1;\r\n\t\tint32_t angle;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6f935d296d234774", + "equalIndicator/v1": "da4bfb96cdcf303795736521154dd6963a1f2f4e279fa816b2de9e7de521649e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 68, + "startColumn": 58, + "charOffset": 1879, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 66, + "startColumn": 1, + "charOffset": 1817, + "charLength": 140, + "snippet": { + "text": "}\r\n\r\nbool House::tryTransferOwnership(std::shared_ptr player, bool serverStartup) {\r\n\tbool transferSuccess = false;\r\n\tif (player) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "383a8219a78e2dfa", + "equalIndicator/v1": "da4e9ee4ceb8b66245d03f831f2a2812b0e90d7165d8a84c1e1eb78a04db218f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3131, + "startColumn": 2, + "charOffset": 95987, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3129, + "startColumn": 1, + "charOffset": 95918, + "charLength": 194, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseMarketAcceptOffer(NetworkMessage &msg) {\r\n\tuint32_t timestamp = msg.get();\r\n\tuint16_t counter = msg.get();\r\n\tuint16_t amount = msg.get();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "77517ad6e4125ec6", + "equalIndicator/v1": "da587644f4bf7f5130d94ce1d35e8ad4ab535730205ccfb275bc4867ab30e90b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2434, + "startColumn": 17, + "charOffset": 72411, + "charLength": 12, + "snippet": { + "text": "noneVocation" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2432, + "startColumn": 1, + "charOffset": 72263, + "charLength": 260, + "snippet": { + "text": "\t\tif (vocation->getId() != VOCATION_NONE && level <= 8) {\r\n\t\t\tconst auto &noneVocation = g_vocations().getVocation(VOCATION_NONE);\r\n\t\t\thealthMax += noneVocation->getHPGain();\r\n\t\t\thealth += noneVocation->getHPGain();\r\n\t\t\tmanaMax += noneVocation->getManaGain();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9e2bdc7e1ae62c38", + "equalIndicator/v1": "da6681724456ca438fe7bae839669b54abec277cd269a8dd2722c7af4fe5e600" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2272, + "startColumn": 20, + "charOffset": 79244, + "charLength": 26, + "snippet": { + "text": "getGiftOfLifeTotalCooldown" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2270, + "startColumn": 1, + "charOffset": 79205, + "charLength": 108, + "snippet": { + "text": "\r\n\t// Set cooldown\r\n\tsetGiftOfCooldown(getGiftOfLifeTotalCooldown(), false);\r\n\tsendGiftOfLifeCooldown();\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a0568b6168b24572", + "equalIndicator/v1": "da6962216051706146829df8eb527fb9518e1835d9f4c06f27038736e17df239" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1583, + "startColumn": 2, + "charOffset": 46868, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1581, + "startColumn": 1, + "charOffset": 46805, + "charLength": 166, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseOpenChannel(NetworkMessage &msg) {\r\n\tuint16_t channelId = msg.get();\r\n\tg_game().playerOpenChannel(player->getID(), channelId);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "84f919059d6ac2ec", + "equalIndicator/v1": "da7b77dba1c44ffab66c354c9a9f475e409e8508eeaaf5f362584a8995b707d8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 229, + "startColumn": 9, + "charOffset": 7130, + "charLength": 13, + "snippet": { + "text": "getFirstIndex" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 227, + "startColumn": 1, + "charOffset": 7044, + "charLength": 259, + "snippet": { + "text": "\r\n\tint32_t getThingIndex(std::shared_ptr thing) const override final;\r\n\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a33288df1153e768", + "equalIndicator/v1": "da85036eb2d54925d71b943a556a7ca92b62f712b60b7a7aa22a5f49d5c29693" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 48, + "startColumn": 68, + "charOffset": 1670, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 46, + "startColumn": 1, + "charOffset": 1598, + "charLength": 215, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Container::create(std::shared_ptr tile) {\r\n\tauto container = std::make_shared(ITEM_BROWSEFIELD, 30, false, true);\r\n\tTileItemVector* itemVector = tile->getItemList();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c301bb550100a68d", + "equalIndicator/v1": "da91051234d9d57445b0cfe5d0bd05e341ab0471008ede444769d58aa3d385cb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Replace loop by 'std::ranges::any_of()'", + "markdown": "Replace loop by 'std::ranges::any_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1824, + "startColumn": 2, + "charOffset": 49216, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1822, + "startColumn": 1, + "charOffset": 49129, + "charLength": 210, + "snippet": { + "text": "\r\n\tstd::ranges::shuffle(directions.begin(), directions.end(), getRandomGenerator());\r\n\tfor (Direction dir : directions) {\r\n\t\tif (canWalkTo(creature, pos, dir)) {\r\n\t\t\tthis->fleeIndx = static_cast(dir);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d82849ac568da6f2", + "equalIndicator/v1": "daa295bcf3d27456dd372386c3b73858603d25cebfb83c55e736e219930d4158" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 334, + "startColumn": 54, + "charOffset": 11211, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 332, + "startColumn": 1, + "charOffset": 11153, + "charLength": 109, + "snippet": { + "text": "}\r\n\r\nuint32_t Weapon::getManaCost(std::shared_ptr player) const {\r\n\tif (mana != 0) {\r\n\t\treturn mana;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ee655d74588d1c8a", + "equalIndicator/v1": "dabd20eb9aaeae25c1a3959c5ff3fcb0b62f123a7e89b7659d0169ceb085ca38" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 151, + "startColumn": 7, + "charOffset": 4784, + "charLength": 12, + "snippet": { + "text": "replaceThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 149, + "startColumn": 1, + "charOffset": 4678, + "charLength": 264, + "snippet": { + "text": "\r\n\tvoid updateThing(std::shared_ptr thing, uint16_t itemId, uint32_t count) override final;\r\n\tvoid replaceThing(uint32_t index, std::shared_ptr thing) override final;\r\n\r\n\tvoid removeThing(std::shared_ptr thing, uint32_t count) override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8113ab9b05f3f34a", + "equalIndicator/v1": "dadfec16f572456de55be8bef65bf982215fed38d1ed75f2ae5c55c50604d81e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 696, + "startColumn": 15, + "charOffset": 22711, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 694, + "startColumn": 1, + "charOffset": 22671, + "charLength": 128, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.55f);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c46797479c1c2125", + "equalIndicator/v1": "db09e8b8b09d08c4549ca3985081034875c146fa2641316d120f9bf8966b64dd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 243, + "startColumn": 34, + "charOffset": 6449, + "charLength": 9, + "snippet": { + "text": "condition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 241, + "startColumn": 1, + "charOffset": 6245, + "charLength": 316, + "snippet": { + "text": "\t\tif (condition->getTicks() != -1) {\r\n\t\t\tregen = std::min((condition->getTicks() / 1000), sleptTime) / 30; // RATE_HEALTH_REGEN_SPEED and RATE_MANA_REGEN_SPEED?\r\n\t\t\tconst int32_t newRegenTicks = condition->getTicks() - (regen * 30000);\r\n\t\t\tif (newRegenTicks <= 0) {\r\n\t\t\t\tplayer->removeCondition(condition);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9f5f892e92d19d8a", + "equalIndicator/v1": "db1df8f79282b371e7d9ab742fef68fe63b864fa966176f1a670f987e8446852" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when declaring iterators", + "markdown": "Use auto when declaring iterators" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4628, + "startColumn": 8, + "charOffset": 145976, + "charLength": 25, + "snippet": { + "text": "ItemDeque::const_iterator" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4626, + "startColumn": 1, + "charOffset": 145948, + "charLength": 186, + "snippet": { + "text": "\r\n\t\tuint32_t i = 0;\r\n\t\tfor (ItemDeque::const_iterator it = itemList.begin() + firstIndex, end = itemList.end(); i < maxItemsToSend && it != end; ++it, ++i) {\r\n\t\t\tAddItem(msg, *it);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "92a13542b342545a", + "equalIndicator/v1": "db2121309bc1a5e80c993044f53d47dbcf414a7b14aa1fb4ee06e22a84ea67bf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::_Tree, std::allocator>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::_Tree, std::allocator\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 869, + "startColumn": 21, + "charOffset": 24192, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 867, + "startColumn": 1, + "charOffset": 24166, + "charLength": 136, + "snippet": { + "text": "\t}\r\n\r\n\tlua_createtable(L, creature->damageMap.size(), 0);\r\n\tfor (auto damageEntry : creature->damageMap) {\r\n\t\tlua_createtable(L, 0, 2);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "00aebadd91b5b7b8", + "equalIndicator/v1": "db2bcc21b4a214046e039dda85f808aac88b3ac7abae637ac173e26348cc67e4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7542, + "startColumn": 27, + "charOffset": 262595, + "charLength": 13, + "snippet": { + "text": "targetMonster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7540, + "startColumn": 1, + "charOffset": 262539, + "charLength": 225, + "snippet": { + "text": "\r\nvoid Game::applyCharmRune(\r\n\tstd::shared_ptr targetMonster, std::shared_ptr attackerPlayer, std::shared_ptr target, const int32_t &realDamage\r\n) const {\r\n\tif (!targetMonster || !attackerPlayer) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "63a848f1da10cee5", + "equalIndicator/v1": "db32ab8741bdb430f4cf28fba3d231f150297bad0206a59d60aded1bbb8d03c6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 582, + "startColumn": 24, + "charOffset": 17849, + "charLength": 11, + "snippet": { + "text": "queryRemove" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 580, + "startColumn": 1, + "charOffset": 17821, + "charLength": 220, + "snippet": { + "text": "}\r\n\r\nReturnValue Container::queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor /*= nullptr */) {\r\n\tint32_t index = getThingIndex(thing);\r\n\tif (index == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "18572333494fcb0e", + "equalIndicator/v1": "db4a7395deadf3108ffb0544a96849422a633e3eec087283ad6e77042278e540" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 565, + "startColumn": 8, + "charOffset": 13920, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 563, + "startColumn": 1, + "charOffset": 13820, + "charLength": 213, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetBaseSpeed(lua_State* L) {\r\n\t// itemType:getBaseSpeed()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->speed);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71995b38240f29a7", + "equalIndicator/v1": "db5e5f39360dd4e540d5e0e88eff73595e773a214b4547e0a24efd9d4a431e40" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4895, + "startColumn": 14, + "charOffset": 146158, + "charLength": 12, + "snippet": { + "text": "changeHealth" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4893, + "startColumn": 1, + "charOffset": 146140, + "charLength": 163, + "snippet": { + "text": "}\r\n\r\nvoid Player::changeHealth(int32_t healthChange, bool sendHealthChange /* = true*/) {\r\n\tCreature::changeHealth(healthChange, sendHealthChange);\r\n\tsendStats();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d27052b92133f051", + "equalIndicator/v1": "db61e285a055967c1efa18472fd9762465e6b176013fc693b8006741e4562314" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/creaturecallback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 27, + "startColumn": 2, + "charOffset": 872, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 25, + "startColumn": 1, + "charOffset": 865, + "charLength": 88, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface\r\n\t\t->getScriptEnv()\r\n\t\t->setScriptId(scriptId, scriptInterface);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2e98a48ca173804c", + "equalIndicator/v1": "dbbc64eab6da6bbe35c9a45b21314bdf5511f399eeb2508c8f923460191acc14" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'mtype' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'mtype' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 526, + "startColumn": 82, + "charOffset": 14496, + "charLength": 5, + "snippet": { + "text": "mtype" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 524, + "startColumn": 1, + "charOffset": 14410, + "charLength": 169, + "snippet": { + "text": "}\r\n\r\nvoid Player::removeMonsterFromCyclopediaTrackerList(std::shared_ptr mtype, bool isBoss, bool reloadClient /* = false */) {\r\n\tif (!client) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cf50d49c01b73465", + "equalIndicator/v1": "dbccb7ee7d73f60f1b0ce43695815cafd7da2b2a26fd932195d5bf259b16a89e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int64_t' (aka 'long long') is implementation-defined", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int64_t' (aka 'long long') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 70, + "startColumn": 20, + "charOffset": 2241, + "charLength": 23, + "snippet": { + "text": "OTSYS_TIME() - lastStep" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 68, + "startColumn": 1, + "charOffset": 2170, + "charLength": 139, + "snippet": { + "text": "\r\nint64_t Creature::getTimeSinceLastMove() const {\r\n\treturn lastStep ? OTSYS_TIME() - lastStep : std::numeric_limits::max();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "283ed81767fa7a13", + "equalIndicator/v1": "dc3c222d90cd688f42f2806044f3f0fe221f4a7022e75fc7ca5f8692790e2a36" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::_Vector_iterator>>::value_type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::_Vector_iterator\\>\\>::value_type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 67, + "startColumn": 32, + "charOffset": 2120, + "charLength": 6, + "snippet": { + "text": "itemId" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 65, + "startColumn": 1, + "charOffset": 2028, + "charLength": 155, + "snippet": { + "text": "\t\t\tit.vocationString = moveEvent->getVocationString();\r\n\t\t}\r\n\t\tif (registerEvent(moveEvent, itemId, itemIdMap)) {\r\n\t\t\ttmpVector.emplace_back(itemId);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "95d691f60fdbeb7e", + "equalIndicator/v1": "dc5d80eda3e84d2eda07db8759fb409e0b45c02a92c0b1770a69fe05936e2449" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_First', which is a reserved identifier", + "markdown": "Declaration uses identifier '_First', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/vectorset.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 78, + "startColumn": 70, + "charOffset": 2116, + "charLength": 6, + "snippet": { + "text": "_First" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 76, + "startColumn": 1, + "charOffset": 2003, + "charLength": 211, + "snippet": { + "text": "\r\n\t\ttemplate \r\n\t\tconstexpr auto insert(std::vector::const_iterator _Where, _Iter _First, _Iter _Last) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\treturn container.insert(_Where, _First, _Last);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ab28227d2beed1ae", + "equalIndicator/v1": "dc60c72735e9da8b84c499bd4f6d9cd48f95f6243d596fde06f68f8f2ec465c6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1074, + "startColumn": 29, + "charOffset": 29172, + "charLength": 6, + "snippet": { + "text": "skills" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1072, + "startColumn": 1, + "charOffset": 29033, + "charLength": 195, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (player && skillType <= SKILL_LAST) {\r\n\t\tlua_pushnumber(L, player->skills[skillType].level);\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f0ec4e71076ca522", + "equalIndicator/v1": "dc63625451f43eea95686f853227cd3cf964db3385ca1337340195d4234a08a1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 600, + "startColumn": 2, + "charOffset": 14071, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 598, + "startColumn": 1, + "charOffset": 14064, + "charLength": 138, + "snippet": { + "text": "\t}\r\n\r\n\tuint32_t flags = getNumber(L, 4, 0);\r\n\r\n\tReturnValue ret = g_game().internalAddItem(tile, item, INDEX_WHEREEVER, flags);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "46ce24373ceb28f9", + "equalIndicator/v1": "dc66df5f8afefd10a295505d6b3e63487045e3efe0b3e1019c54062a26449ad5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 84, + "startColumn": 12, + "charOffset": 2716, + "charLength": 6, + "snippet": { + "text": "health" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 82, + "startColumn": 1, + "charOffset": 2618, + "charLength": 283, + "snippet": { + "text": "\t\tmonster->currentOutfit = mType->info.outfit;\r\n\t\tmonster->skull = mType->info.skull;\r\n\t\tmonster->health = mType->info.health * mType->getHealthMultiplier();\r\n\t\tmonster->healthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\t\tmonster->baseSpeed = mType->getBaseSpeed();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "940ced98c6b70e5e", + "equalIndicator/v1": "dc8149b6893d88ec707fea0ee62360ebed0e04c1e09bd534cd0e0503d6684cd9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 36, + "startColumn": 2, + "charOffset": 1444, + "charLength": 7, + "snippet": { + "text": "int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 34, + "startColumn": 1, + "charOffset": 1394, + "charLength": 192, + "snippet": { + "text": "\r\n\tuint16_t itemId = getNumber(L, 2);\r\n\tint32_t count = getNumber(L, 3, 1);\r\n\tbool canDropOnMap = getBoolean(L, 4, true);\r\n\tuint16_t subType = getNumber(L, 5, 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e948f993c3da7c7b", + "equalIndicator/v1": "dc9908e4ec71d001949f301f582a00b28f8f8c7b4a3c01a6d5c9a4733ad5458f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 453, + "startColumn": 19, + "charOffset": 24032, + "charLength": 31, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 451, + "startColumn": 1, + "charOffset": 23830, + "charLength": 379, + "snippet": { + "text": "\tvoid internalCreatureChangeOutfit(std::shared_ptr creature, const Outfit_t &oufit);\r\n\tvoid internalCreatureChangeVisible(std::shared_ptr creature, bool visible);\r\n\tvoid changeLight(const std::shared_ptr creature);\r\n\tvoid updateCreatureIcon(const std::shared_ptr creature);\r\n\tvoid reloadCreature(const std::shared_ptr creature);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c2bf3b292a091245", + "equalIndicator/v1": "dcd4d9bc0dfc1ee7697c8a75f65bf07e39ceee0db86ce4df752b635e8502dd6c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Local copy 'castItem' of the variable 'item' is never modified; consider avoiding the copy", + "markdown": "Local copy 'castItem' of the variable 'item' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1415, + "startColumn": 16, + "charOffset": 40141, + "charLength": 8, + "snippet": { + "text": "castItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1413, + "startColumn": 1, + "charOffset": 40052, + "charLength": 144, + "snippet": { + "text": "\t\t\t\tslotName = fmt::format(\"Imbuement Slot {}\", i + 1);\r\n\t\t\t\tss.str(\"\");\r\n\t\t\t\tconst auto castItem = item;\r\n\t\t\t\tif (!castItem) {\r\n\t\t\t\t\tcontinue;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "65cccc289cf3638b", + "equalIndicator/v1": "dce3eab3e59ea6df7764b0f6e40e60ba2baa2f0d2fde8ae1ab92b0ac68659f1c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2390, + "startColumn": 60, + "charOffset": 70704, + "charLength": 3, + "snippet": { + "text": "exp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2388, + "startColumn": 1, + "charOffset": 70561, + "charLength": 162, + "snippet": { + "text": "\t} else {\r\n\t\tg_metrics().addCounter(\"player_experience_bonus_raw\", rawExp, attrs);\r\n\t\tg_metrics().addCounter(\"player_experience_bonus_actual\", exp, attrs);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bafab6fb1e91dd81", + "equalIndicator/v1": "dd03608f91e9a8b3452604442c1200afad67ae7448ba4a72391b0439b4f0b35e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 801, + "startColumn": 29, + "charOffset": 24270, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 799, + "startColumn": 1, + "charOffset": 24149, + "charLength": 182, + "snippet": { + "text": "int32_t Container::getThingIndex(std::shared_ptr thing) const {\r\n\tint32_t index = 0;\r\n\tfor (std::shared_ptr item : itemlist) {\r\n\t\tif (item == thing) {\r\n\t\t\treturn index;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "46f564d4375eec7c", + "equalIndicator/v1": "dd8408799d0a50c1b4aa52898501d666ee7cd278055e8fe499cfe47fac29855b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2240, + "startColumn": 67, + "charOffset": 78256, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2238, + "startColumn": 1, + "charOffset": 78185, + "charLength": 151, + "snippet": { + "text": "}\r\n\r\nint32_t PlayerWheel::checkDivineGrenade(std::shared_ptr target) const {\r\n\tif (!target || target == m_player.getPlayer()) {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4b94c2c9ff3fc10e", + "equalIndicator/v1": "dd94dc115f0646342f77ac00218a82bcc7c2f705c8e39863e96dbc3ad1bb47af" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 223, + "startColumn": 28, + "charOffset": 6728, + "charLength": 6, + "snippet": { + "text": "g_game" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 221, + "startColumn": 1, + "charOffset": 6671, + "charLength": 211, + "snippet": { + "text": "\t\t\treturn false;\r\n\t\tdefault:\r\n\t\t\tstd::string skillName = g_game().getSkillNameById(skill);\r\n\t\t\tquery = fmt::format(\r\n\t\t\t\t\"SELECT * FROM `players` WHERE `group_id` < {} AND `{}` > 10 ORDER BY `{}` DESC LIMIT 1\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3fe0c820777f214d", + "equalIndicator/v1": "ddb209b3dc679862b392dae8dae0695304938a90b3bd177f2807d01372911982" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 78, + "startColumn": 10, + "charOffset": 2102, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 76, + "startColumn": 1, + "charOffset": 2015, + "charLength": 175, + "snippet": { + "text": "\tfloat getMitigation() const override;\r\n\tint32_t getArmor() const override {\r\n\t\treturn mType->info.armor * getDefenseMultiplier();\r\n\t}\r\n\tint32_t getDefense() const override {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d732cdb3edbd9727", + "equalIndicator/v1": "ddca8b34a53409ac3a078e8a220bd90ab92c03dd1668bae7bc2cfafb1a69ec15" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 929, + "startColumn": 14, + "charOffset": 30278, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 927, + "startColumn": 1, + "charOffset": 30195, + "charLength": 162, + "snippet": { + "text": "\t\tint32_t value = getAbsorbPercent(combatType);\r\n\t\tif (value != 0) {\r\n\t\t\tdamage -= std::round(damage * value / 100.f);\r\n\t\t}\r\n\t\tvalue = getAbsorbFlat(combatType);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7fd24b1a5fd39b14", + "equalIndicator/v1": "ddd5a7cc4610e6b976a3afffea77fea7db8ffe1a0fa024cf1f1f538eee85e117" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 152, + "startColumn": 3, + "charOffset": 4029, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 150, + "startColumn": 1, + "charOffset": 3972, + "charLength": 195, + "snippet": { + "text": "\r\n\tif (const TileItemVector* items = getItemList()) {\r\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\r\n\t\t\tif ((*it)->getTeleport()) {\r\n\t\t\t\treturn (*it)->getTeleport();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a6d9b8600fe82ad2", + "equalIndicator/v1": "ddf32f78177d968ff3d516f8936fd71a1dea852a9fc8dddf3fc46db6e1bbcf45" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 913, + "startColumn": 43, + "charOffset": 29509, + "charLength": 3, + "snippet": { + "text": "min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 911, + "startColumn": 1, + "charOffset": 29361, + "charLength": 164, + "snippet": { + "text": "\r\n\t// Returns the calculated maximum damage or a random value between the calculated minimum and maximum\r\n\treturn maxDamage ? -max : -normal_random(min, max);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3e73cfe68939bf75", + "equalIndicator/v1": "de15eeb76c8761954578d533b68856d805dbca5fac143d7999b579da887747d4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 155, + "startColumn": 10, + "charOffset": 4954, + "charLength": 13, + "snippet": { + "text": "getThingIndex" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 153, + "startColumn": 1, + "charOffset": 4862, + "charLength": 251, + "snippet": { + "text": "\tvoid removeThing(std::shared_ptr thing, uint32_t count) override final;\r\n\r\n\tint32_t getThingIndex(std::shared_ptr thing) const override final;\r\n\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "df5fcab1dd2e86f7", + "equalIndicator/v1": "de1c8f4fe48beb6b41a3df70caae378a62fbc44a9ddbdf2a68bad8026f22595a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 195, + "startColumn": 15, + "charOffset": 7930, + "charLength": 12, + "snippet": { + "text": "replaceThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 193, + "startColumn": 1, + "charOffset": 7762, + "charLength": 304, + "snippet": { + "text": "\tvirtual void addThing(int32_t, std::shared_ptr) override { }\r\n\tvirtual void updateThing(std::shared_ptr, uint16_t, uint32_t) override { }\r\n\tvirtual void replaceThing(uint32_t, std::shared_ptr) override { }\r\n\tvirtual void removeThing(std::shared_ptr, uint32_t) override { }\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b5d9fd9fd7664e2e", + "equalIndicator/v1": "de300035a89da36bf943669982ad984ee039274e71287fce4082ff013c4a459a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 423, + "startColumn": 194, + "charOffset": 13920, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 421, + "startColumn": 1, + "charOffset": 13722, + "charLength": 328, + "snippet": { + "text": "}\r\n\r\nbool Actions::useItemEx(std::shared_ptr player, const Position &fromPos, const Position &toPos, uint8_t toStackPos, std::shared_ptr item, bool isHotkey, std::shared_ptr creature /* = nullptr*/) {\r\n\tconst ItemType &it = Item::items[item->getID()];\r\n\tif (it.isRune() || it.type == ITEM_TYPE_POTION) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "081618dc86e2c064", + "equalIndicator/v1": "de33a367014e20cfb72d92acb9ebbdc69086852cd770fec92e6c5668f2babf05" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 325, + "startColumn": 65, + "charOffset": 12050, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 323, + "startColumn": 1, + "charOffset": 11973, + "charLength": 231, + "snippet": { + "text": "\r\n// Player\r\nbool EventCallback::playerOnBrowseField(std::shared_ptr player, const Position &position) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnBrowseField - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "73da8225ff3dfbc2", + "equalIndicator/v1": "de6a828b364e86bd9aee66e76720e5857115690f788cdd8717dec2939c2be7ce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int'", + "markdown": "Narrowing conversion from 'float' to 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4910, + "startColumn": 29, + "charOffset": 146620, + "charLength": 10, + "snippet": { + "text": "soulChange" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4908, + "startColumn": 1, + "charOffset": 146521, + "charLength": 265, + "snippet": { + "text": "void Player::changeSoul(int32_t soulChange) {\r\n\tif (soulChange > 0) {\r\n\t\tsoul += std::min(soulChange * g_configManager().getFloat(RATE_SOUL_REGEN, __FUNCTION__), vocation->getSoulMax() - soul);\r\n\t} else {\r\n\t\tsoul = std::max(0, soul + soulChange);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "62231767ac5348d7", + "equalIndicator/v1": "de83f43925dc967c252e2ff2b69bf209c326a8bbc170246883c166db7472456c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2483, + "startColumn": 95, + "charOffset": 94675, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2481, + "startColumn": 1, + "charOffset": 94576, + "charLength": 258, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::internalPlayerAddItem(std::shared_ptr player, std::shared_ptr item, bool dropOnMap /*= true*/, Slots_t slot /*= CONST_SLOT_WHEREEVER*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tuint32_t remainderCount = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b74be174858f16fe", + "equalIndicator/v1": "de842552529750cfe1f801241fccd0b7498a02836b31146b702b46f044ee56bf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2281, + "startColumn": 108, + "charOffset": 67197, + "charLength": 8, + "snippet": { + "text": "muteTime" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2279, + "startColumn": 1, + "charOffset": 66999, + "charLength": 250, + "snippet": { + "text": "\t\t\tuint32_t muteTime = 5 * muteCount * muteCount;\r\n\t\t\tmuteCountMap[guid] = muteCount + 1;\r\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_MUTED, muteTime * 1000, 0);\r\n\t\t\taddCondition(condition);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3d9fdacd4f3de672", + "equalIndicator/v1": "deb6107c839745d20c31033c9bf9fdc9f6af955c8f75b3c3a588a98508ac0b12" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1124, + "startColumn": 41, + "charOffset": 42732, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1122, + "startColumn": 1, + "charOffset": 42686, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f953ddbc714a9add", + "equalIndicator/v1": "dee799f85dccef76df64529cef302ec3a39716fecfd3c7604334d774f644830a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 99, + "startColumn": 8, + "charOffset": 2557, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 97, + "startColumn": 1, + "charOffset": 2459, + "charLength": 212, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsStackable(lua_State* L) {\r\n\t// itemType:isStackable()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->stackable);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b3064fd06d5b0c82", + "equalIndicator/v1": "deeb944841cc02cc0f8bc532f25672eb21b11bc6caae5b586488c445d515a76e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/achievement/player_achievement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 36, + "startColumn": 53, + "charOffset": 1118, + "charLength": 21, + "snippet": { + "text": "(OTSYS_TIME() / 1000)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 34, + "startColumn": 1, + "charOffset": 1031, + "charLength": 241, + "snippet": { + "text": "\r\n\taddPoints(achievement.points);\r\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\r\n\tgetUnlockedKV()->set(achievement.name, toSaveTimeStamp);\r\n\tm_achievementsUnlocked.emplace_back(achievement.id, toSaveTimeStamp);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0cf0875934c0cece", + "equalIndicator/v1": "defe494e427b1af553a9f7f528b8648e65d6da104341c5d9fcc500d5ca4e3d6b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 189, + "startColumn": 17, + "charOffset": 5301, + "charLength": 9, + "snippet": { + "text": "m_account" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 187, + "startColumn": 1, + "charOffset": 5132, + "charLength": 253, + "snippet": { + "text": "void Account::addPremiumDays(const int32_t &days) {\r\n\tauto timeLeft = std::max(0, static_cast((m_account.premiumLastDay - getTimeNow()) % 86400));\r\n\tsetPremiumDays(m_account.premiumRemainingDays + days);\r\n\tm_account.premiumDaysPurchased += days;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bb0d7bfcdd11f9d5", + "equalIndicator/v1": "df4ce53ff28c43d14ea348e64a2a7b5882758ef1e9fa8c6b45f79039954de7f7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 120, + "startColumn": 74, + "charOffset": 5224, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 118, + "startColumn": 1, + "charOffset": 5055, + "charLength": 260, + "snippet": { + "text": "\t * @param player Pointer to the player for whom the imbuement damage should be handled.\r\n\t */\r\n\tvoid handleImbuementDamage(NetworkMessage &msg, std::shared_ptr player) {\r\n\t\tbool imbueDmg = false;\r\n\t\tstd::shared_ptr weapon = player->getWeapon();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5c8034dc5b52e7f9", + "equalIndicator/v1": "df5f3cea64c23b2df489832f3effb528d15d4371b52b469b1a77b05d19063fa5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8463, + "startColumn": 4, + "charOffset": 267942, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8461, + "startColumn": 1, + "charOffset": 267856, + "charLength": 238, + "snippet": { + "text": "\t\tcase SUPPLY_STASH_ACTION_WITHDRAW: {\r\n\t\t\tuint16_t itemId = msg.get();\r\n\t\t\tuint32_t count = msg.get();\r\n\t\t\tuint8_t stackpos = msg.getByte();\r\n\t\t\tg_game().playerStashWithdraw(player->getID(), itemId, count, stackpos);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2875b0cf0b8ee485", + "equalIndicator/v1": "df5fd52fe2ae230ad596eac6dc657fbbb5b9d24f608bf76812aeb89d5b528aaf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1135, + "startColumn": 26, + "charOffset": 34168, + "charLength": 4, + "snippet": { + "text": "tile" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1133, + "startColumn": 1, + "charOffset": 34087, + "charLength": 191, + "snippet": { + "text": "\t\tuint32_t moveCount = 0;\r\n\t\tuint32_t removeCount = 0;\r\n\t\tint32_t downItemSize = tile->getDownItemCount();\r\n\t\tfor (int32_t i = downItemSize; --i >= 0;) {\r\n\t\t\tconst auto &item = items->at(i);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "887b2f783f504967", + "equalIndicator/v1": "df660a6ab3db2080b0ad21af4260e256ba0bedb379f1b0bf53d5c28c01613f3c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 830, + "startColumn": 21, + "charOffset": 26921, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 828, + "startColumn": 1, + "charOffset": 26854, + "charLength": 182, + "snippet": { + "text": "\r\n\tint32_t minValue = player->getLevel() / 5;\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue);\r\n\tif (maxDamage) {\r\n\t\treturn -maxValue;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f02f18f8a3b9e60f", + "equalIndicator/v1": "df6659994e6e9674c520b7983a58a1d361dce624b9197d5ce93f48bbde524bb1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'setFollowCreature' is within a recursive call chain", + "markdown": "Function 'setFollowCreature' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4330, + "startColumn": 14, + "charOffset": 130454, + "charLength": 17, + "snippet": { + "text": "setFollowCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4328, + "startColumn": 1, + "charOffset": 130436, + "charLength": 153, + "snippet": { + "text": "}\r\n\r\nbool Player::setFollowCreature(std::shared_ptr creature) {\r\n\tif (!Creature::setFollowCreature(creature)) {\r\n\t\tsetFollowCreature(nullptr);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cb87b1e277590c43", + "equalIndicator/v1": "df68a34b796c984c77ddcae51907a1617221fea12903f896bb0cca63833c769d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 359, + "startColumn": 84, + "charOffset": 17378, + "charLength": 14, + "snippet": { + "text": "const uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 357, + "startColumn": 1, + "charOffset": 17005, + "charLength": 554, + "snippet": { + "text": "\tvoid playerConfigureShowOffSocket(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerSetShowOffSocket(uint32_t playerId, Outfit_t &outfit, const Position &pos, uint8_t stackPos, const uint16_t itemId, uint8_t podiumVisible, uint8_t direction);\r\n\tvoid playerWrapableItem(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerWriteItem(uint32_t playerId, uint32_t windowTextId, const std::string &text);\r\n\tvoid playerBrowseField(uint32_t playerId, const Position &pos);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4a2044982ac64ebd", + "equalIndicator/v1": "df690514d559144459cf8bcbbce2163db288add89170937aa85a28cf1650bce0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'unsigned int'", + "markdown": "Narrowing conversion from 'double' to 'unsigned int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 65, + "startColumn": 16, + "charOffset": 2101, + "charLength": 53, + "snippet": { + "text": "(value * std::pow(static_cast(10), precision))" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 63, + "startColumn": 1, + "charOffset": 1988, + "charLength": 212, + "snippet": { + "text": "void NetworkMessage::addDouble(double value, uint8_t precision /* = 2*/) {\r\n\taddByte(precision);\r\n\tadd((value * std::pow(static_cast(10), precision)) + std::numeric_limits::max());\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3115fb7b019f0d58", + "equalIndicator/v1": "df74a49724e7b1b99fad3aff627d790eafb0fdcbf0b5096a8289990386d42c79" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5678, + "startColumn": 48, + "charOffset": 167880, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5676, + "startColumn": 1, + "charOffset": 167828, + "charLength": 138, + "snippet": { + "text": "}\r\n\r\nbool Player::isPartner(std::shared_ptr player) const {\r\n\tif (!player || !m_party || player.get() == this) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "90610bc1b44379b6", + "equalIndicator/v1": "df8136683b8f1a75e83f12bcab17f1dbccff5c91eb44ba4c2742af3b908bea9f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 818, + "startColumn": 27, + "charOffset": 29471, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 816, + "startColumn": 1, + "charOffset": 29439, + "charLength": 129, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnChangeZone, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "557cb4bc50a1d79f", + "equalIndicator/v1": "df965d56a4c4e390fc10b29fc6986ae17d3b582c77846da227ac240965b7b34d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7826, + "startColumn": 56, + "charOffset": 273543, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7824, + "startColumn": 1, + "charOffset": 273483, + "charLength": 194, + "snippet": { + "text": "}\r\n\r\nvoid Game::addCreatureHealth(std::shared_ptr target) {\r\n\tauto spectators = Spectators().find(target->getPosition(), true);\r\n\taddCreatureHealth(spectators.data(), target);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "77e133fcedcc8d6f", + "equalIndicator/v1": "dfafbfdaed00a620886fd9b16ca7f0648f0bd7405025bde4d40cf6769f5c84eb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 874, + "startColumn": 22, + "charOffset": 24426, + "charLength": 11, + "snippet": { + "text": "damageEntry" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 872, + "startColumn": 1, + "charOffset": 24303, + "charLength": 159, + "snippet": { + "text": "\t\tsetField(L, \"total\", damageEntry.second.total);\r\n\t\tsetField(L, \"ticks\", damageEntry.second.ticks);\r\n\t\tlua_rawseti(L, -2, damageEntry.first);\r\n\t}\r\n\treturn 1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "be030f983f8ddb24", + "equalIndicator/v1": "dff2fdd346c0722a8b75c8e19b61ff4813040fa67f22b8e9b6736cbe1a392269" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1807, + "startColumn": 3, + "charOffset": 54418, + "charLength": 16, + "snippet": { + "text": "ObjectCategory_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1805, + "startColumn": 1, + "charOffset": 54361, + "charLength": 197, + "snippet": { + "text": "\tuint8_t action = msg.getByte();\r\n\tif (action == 0) {\r\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\r\n\t\tPosition pos = msg.getPosition();\r\n\t\tuint16_t itemId = msg.get();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "60221a0174ca8e5c", + "equalIndicator/v1": "e0040f367f4631b2b49aef25b738240d3eaf1a7bdac28918b07a4130898b78a3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 238, + "startColumn": 30, + "charOffset": 7304, + "charLength": 7, + "snippet": { + "text": "getItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 236, + "startColumn": 1, + "charOffset": 7235, + "charLength": 142, + "snippet": { + "text": "\t\treturn static_self_cast();\r\n\t}\r\n\tstd::shared_ptr getItem() const override final {\r\n\t\treturn static_self_cast();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "523c561293b70b9f", + "equalIndicator/v1": "e0168f7bccd1be9c76a84b3a565c9991f52d495417008f7dc7317b87cee2000b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5167, + "startColumn": 50, + "charOffset": 152544, + "charLength": 8, + "snippet": { + "text": "attacked" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5165, + "startColumn": 1, + "charOffset": 152490, + "charLength": 150, + "snippet": { + "text": "}\r\n\r\nbool Player::hasAttacked(std::shared_ptr attacked) const {\r\n\tif (hasFlag(PlayerFlags_t::NotGainInFight) || !attacked) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e0e90e812cd4889a", + "equalIndicator/v1": "e03d898450160b7d5e1842d5bd9b944bb5484d51f3abe2663b2bead1b46f80c2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 913, + "startColumn": 28, + "charOffset": 29494, + "charLength": 24, + "snippet": { + "text": "-normal_random(min, max)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 911, + "startColumn": 1, + "charOffset": 29361, + "charLength": 164, + "snippet": { + "text": "\r\n\t// Returns the calculated maximum damage or a random value between the calculated minimum and maximum\r\n\treturn maxDamage ? -max : -normal_random(min, max);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "be189bfe5c3e6860", + "equalIndicator/v1": "e054894de001dbc656e53118d057ee6a640eea57bea120ff2f82ebf4b3ced3db" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 600, + "startColumn": 13, + "charOffset": 29341, + "charLength": 11, + "snippet": { + "text": "stringValue" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 598, + "startColumn": 1, + "charOffset": 29143, + "charLength": 367, + "snippet": { + "text": "\t} else if (stringValue == \"absorbpercentphysical\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercenthealing\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_HEALING)] += pugi::cast(valueAttribute.value());\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "82e7a1040fd0e9d8", + "equalIndicator/v1": "e05c738438cc1e39737b28acd18166d4e7c4144c852af632874d5f4101912392" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 438, + "startColumn": 107, + "charOffset": 11859, + "charLength": 7, + "snippet": { + "text": "newItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 436, + "startColumn": 1, + "charOffset": 11748, + "charLength": 396, + "snippet": { + "text": "}\r\n\r\nvoid Tile::onUpdateTileItem(std::shared_ptr oldItem, const ItemType &oldType, std::shared_ptr newItem, const ItemType &newType) {\r\n\tif ((newItem->hasProperty(CONST_PROP_MOVABLE) || newItem->getContainer()) || (newItem->isWrapable() && newItem->hasProperty(CONST_PROP_MOVABLE) && !oldItem->hasProperty(CONST_PROP_BLOCKPATH))) {\r\n\t\tauto it = g_game().browseFields.find(getTile());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "62b0c41e8d17a4aa", + "equalIndicator/v1": "e08270b54180eadec70e46e168bb4141cdc7940d3ec457bf752cb7312688c032" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 617, + "startColumn": 56, + "charOffset": 18065, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 615, + "startColumn": 1, + "charOffset": 18005, + "charLength": 116, + "snippet": { + "text": "}\r\n\r\nvoid Party::updatePlayerStatus(std::shared_ptr player) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a454e50588c84941", + "equalIndicator/v1": "e09cd03b0454912ccb9b4daf5a09a481d2c3709573c99bf9e794e3fa55af44c9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 127, + "startColumn": 7, + "charOffset": 3173, + "charLength": 10, + "snippet": { + "text": "isPushable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 125, + "startColumn": 1, + "charOffset": 3150, + "charLength": 74, + "snippet": { + "text": "\t\treturn 0;\r\n\t}\r\n\tbool isPushable() override final {\r\n\t\treturn false;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c7dd50b66432735d", + "equalIndicator/v1": "e0c7708b6aa30e0cfef1e9fb521bd974969ae958ec4e9f5167dd1979ebe0afb0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3095, + "startColumn": 3, + "charOffset": 94766, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3093, + "startColumn": 1, + "charOffset": 94676, + "charLength": 221, + "snippet": { + "text": "\t\tg_game().playerBrowseMarketOwnHistory(player->getID());\r\n\t} else if (!oldProtocol) {\r\n\t\tuint16_t itemId = msg.get();\r\n\t\tuint8_t tier = msg.get();\r\n\t\tplayer->sendMarketEnter(player->getLastDepotId());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1da6567d68fa1f0f", + "equalIndicator/v1": "e0c8e3d253de104c6dae76bc6cbb8ba61cbc29897a6eda26402885daeb74594d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1766, + "startColumn": 67, + "charOffset": 61582, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1764, + "startColumn": 1, + "charOffset": 61511, + "charLength": 206, + "snippet": { + "text": "}\r\n\r\nbool ChainPickerCallback::onChainCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\t// onChainCombat(creature, target)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "051065488f0fb0c5", + "equalIndicator/v1": "e0d85dbbd12d7167eafbd3f9fe90f59dca7d34257ae554ea02782d4002ac7300" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3096, + "startColumn": 3, + "charOffset": 94808, + "charLength": 7, + "snippet": { + "text": "uint8_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3094, + "startColumn": 1, + "charOffset": 94735, + "charLength": 225, + "snippet": { + "text": "\t} else if (!oldProtocol) {\r\n\t\tuint16_t itemId = msg.get();\r\n\t\tuint8_t tier = msg.get();\r\n\t\tplayer->sendMarketEnter(player->getLastDepotId());\r\n\t\tg_game().playerBrowseMarket(player->getID(), itemId, tier);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ef7de789c8ae999b", + "equalIndicator/v1": "e0f295919f98977c31b3d1a6974317e4baa339a24f9e3ace8192606a630ea486" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1627, + "startColumn": 65, + "charOffset": 48518, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1625, + "startColumn": 1, + "charOffset": 48449, + "charLength": 156, + "snippet": { + "text": "}\r\n\r\nvoid Player::sendUpdateContainerItem(std::shared_ptr container, uint16_t slot, std::shared_ptr newItem) {\r\n\tif (!client) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "58410848146135af", + "equalIndicator/v1": "e0f627132a8ef43be0dd021b5c15592ddc88b581865cb0f7c42e51c85709fa0f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1612, + "startColumn": 22, + "charOffset": 56618, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1610, + "startColumn": 1, + "charOffset": 56424, + "charLength": 315, + "snippet": { + "text": "\t\t\tdouble factor = (double)elementAttack / (double)attackValue; // attack value here is phys dmg + element dmg\r\n\t\t\tint32_t elementDamage = std::round(defaultDmg * factor);\r\n\t\t\tint32_t physDmg = std::round(defaultDmg * (1.0 - factor));\r\n\t\t\tdamage.primary.value = physDmg;\r\n\t\t\tdamage.secondary.value = elementDamage;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "98903326b81028fe", + "equalIndicator/v1": "e10627227bc49c81139e7b100dbc98266492de5af797f870c219206040ae5c67" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')", + "markdown": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 68, + "startColumn": 10, + "charOffset": 1693, + "charLength": 15, + "snippet": { + "text": "gainHealthTicks" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 66, + "startColumn": 1, + "charOffset": 1642, + "charLength": 142, + "snippet": { + "text": "\r\n\tuint32_t getHealthGainTicks() const {\r\n\t\treturn gainHealthTicks / g_configManager().getFloat(RATE_HEALTH_REGEN_SPEED, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c601fed17e1b9925", + "equalIndicator/v1": "e10fdfb492c1dc47c155f54476b10f0bf16496205c2f34cedb9f015660a90596" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 160, + "startColumn": 2, + "charOffset": 4409, + "charLength": 7, + "snippet": { + "text": "int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 158, + "startColumn": 1, + "charOffset": 4402, + "charLength": 117, + "snippet": { + "text": "\t}\r\n\r\n\tint32_t index = getNumber(L, 4, INDEX_WHEREEVER);\r\n\tuint32_t flags = getNumber(L, 5, 0);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2433f91ef6a705db", + "equalIndicator/v1": "e117575b4eea790f164b121736a1011832c9538efa05e3dea69d08d420528aa1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1775, + "startColumn": 27, + "charOffset": 61967, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1773, + "startColumn": 1, + "charOffset": 61935, + "charLength": 159, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "937417e4ae84ec3e", + "equalIndicator/v1": "e11f5f524d92f2f4861b3fd2a3c9d9552285c4e063a70e3128c654c3909342f0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 297, + "startColumn": 23, + "charOffset": 10442, + "charLength": 9, + "snippet": { + "text": "totalCost" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 295, + "startColumn": 1, + "charOffset": 10349, + "charLength": 111, + "snippet": { + "text": "\t\tcallback.pushBoolean(ignore);\r\n\t\tcallback.pushBoolean(inBackpacks);\r\n\t\tcallback.pushNumber(totalCost);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1bb92ffa5c129d02", + "equalIndicator/v1": "e12af17179c60386f794ae6257b5f579713fb580397403aa39c54794d72501bb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_WIN32_WINNT', which is a reserved identifier", + "markdown": "Declaration uses identifier '_WIN32_WINNT', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 52, + "startColumn": 2, + "charOffset": 1694, + "charLength": 7, + "snippet": { + "text": "#ifndef" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 50, + "startColumn": 1, + "charOffset": 1659, + "charLength": 111, + "snippet": { + "text": "\t#define strncasecmp _strnicmp\r\n\r\n\t#ifndef _WIN32_WINNT\r\n\t\t// 0x0602: Windows 7\r\n\t\t#define _WIN32_WINNT 0x0602\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1622cfcd200858a8", + "equalIndicator/v1": "e14a6ec59e233f33df53b9c1013c3832c4836cdc900c9321df9457c235608d0c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2536, + "startColumn": 36, + "charOffset": 75853, + "charLength": 8, + "snippet": { + "text": "capacity" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2534, + "startColumn": 1, + "charOffset": 75674, + "charLength": 269, + "snippet": { + "text": "\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\r\n\t\t\tmanaMax = std::max(0, manaMax - vocation->getManaGain());\r\n\t\t\tcapacity = std::max(0, capacity - vocation->getCapGain());\r\n\t\t}\r\n\t\tcurrLevelExp = Player::getExpForLevel(level);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "899e8243466226b1", + "equalIndicator/v1": "e17b128affcf018f3483268e8c67c1620612b2bfd9721587e9edf40f285915e6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::list::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::list::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5164, + "startColumn": 93, + "charOffset": 162566, + "charLength": 3, + "snippet": { + "text": "810" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5162, + "startColumn": 1, + "charOffset": 162413, + "charLength": 303, + "snippet": { + "text": "\tuint32_t i = 0;\r\n\tstd::map counterMap;\r\n\tuint32_t buyOffersToSend = std::min(buyOffers.size(), 810 + std::max(0, 810 - sellOffers.size()));\r\n\tuint32_t sellOffersToSend = std::min(sellOffers.size(), 810 + std::max(0, 810 - buyOffers.size()));\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "71f215890b023059", + "equalIndicator/v1": "e1a71dfeb13bc90f2302d3d50cd29f30753db60dbf570dcccebdad9becf8143a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Result of integer division used in a floating point context; possible loss of precision", + "markdown": "Result of integer division used in a floating point context; possible loss of precision" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2187, + "startColumn": 28, + "charOffset": 74114, + "charLength": 14, + "snippet": { + "text": "uniform_random" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2185, + "startColumn": 1, + "charOffset": 73963, + "charLength": 266, + "snippet": { + "text": "\t\t playerWeapon != nullptr && playerWeapon->getTier() > 0) {\r\n\t\t\tdouble_t fatalChance = playerWeapon->getFatalChance();\r\n\t\t\tdouble_t randomChance = uniform_random(0, 10000) / 100;\r\n\t\t\tif (fatalChance > 0 && randomChance < fatalChance) {\r\n\t\t\t\tdamage.fatal = true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2af6ee8d99a76827", + "equalIndicator/v1": "e1cf2bd8f29aafaed0565bea610999cdc4990c63ef9827a23b10783774febd75" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 10422, + "startColumn": 88, + "charOffset": 362192, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10420, + "startColumn": 1, + "charOffset": 362100, + "charLength": 258, + "snippet": { + "text": "}\r\n\r\nbool Game::tryRetrieveStashItems(std::shared_ptr player, std::shared_ptr item) {\r\n\tObjectCategory_t category = getObjectCategory(item);\r\n\treturn internalCollectManagedItems(std::move(player), item, category, false) == RETURNVALUE_NOERROR;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "37d6d72e2e05d912", + "equalIndicator/v1": "e1d59d2ef8b489603a34c73182132ab150f7d324ee26c8ada5e85bc3f838172c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1370, + "startColumn": 2, + "charOffset": 40938, + "charLength": 7, + "snippet": { + "text": "uint8_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1368, + "startColumn": 1, + "charOffset": 40894, + "charLength": 188, + "snippet": { + "text": "\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t tier = msg.get();\r\n\tg_game().playerEquipItem(player->getID(), itemId, Item::items[itemId].upgradeClassification > 0, tier);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "06367183e490a3b2", + "equalIndicator/v1": "e1d8e05c31634284728176bf177203155fc5fa6312b698f2bdb0e61dd100de1b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1805, + "startColumn": 19, + "charOffset": 53966, + "charLength": 17, + "snippet": { + "text": "getReflectPercent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1803, + "startColumn": 1, + "charOffset": 53943, + "charLength": 171, + "snippet": { + "text": "}\r\n\r\nint32_t Creature::getReflectPercent(CombatType_t combatType, bool useCharges /*= false*/) const {\r\n\ttry {\r\n\t\treturn reflectPercent.at(combatTypeToIndex(combatType));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3a7b906cd85e8d43", + "equalIndicator/v1": "e1eea4e776f500c73b4cebf1313a54adcdffa9c40d7c09ba6f448a3ef188b6ed" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_SECURE_SCL', which is a reserved identifier", + "markdown": "Declaration uses identifier '_SECURE_SCL', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 35, + "startColumn": 12, + "charOffset": 857, + "charLength": 11, + "snippet": { + "text": "_SECURE_SCL" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 33, + "startColumn": 1, + "charOffset": 811, + "charLength": 107, + "snippet": { + "text": "\t#ifdef _MSC_VER\r\n\t\t#ifdef NDEBUG\r\n\t\t\t#define _SECURE_SCL 0\r\n\t\t\t#define HAS_ITERATOR_DEBUGGING 0\r\n\t\t#endif\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c9f91aed9cf278db", + "equalIndicator/v1": "e20da032e950b6cee85c8ec9d821c1bf79822aab633b7e12635fdadbd6d662a2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 107, + "startColumn": 7, + "charOffset": 2725, + "charLength": 12, + "snippet": { + "text": "uint_fast8_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 105, + "startColumn": 1, + "charOffset": 2655, + "charLength": 248, + "snippet": { + "text": "\r\nvoid Dispatcher::executeEvents(const TaskGroup startGroup) {\r\n\tfor (uint_fast8_t groupId = static_cast(startGroup); groupId < static_cast(TaskGroup::Last); ++groupId) {\r\n\t\tauto &tasks = m_tasks[groupId];\r\n\t\tif (tasks.empty()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8ba5383c3c4f6556", + "equalIndicator/v1": "e2695e90c9fa6de341bf6287efcaaf712e44a2fba79ceeb70a1b8f86baed9d85" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 244, + "startColumn": 45, + "charOffset": 9013, + "charLength": 5, + "snippet": { + "text": "party" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 242, + "startColumn": 1, + "charOffset": 8914, + "charLength": 161, + "snippet": { + "text": "\tgetScriptInterface()->pushFunction(getScriptId());\r\n\r\n\tLuaScriptInterface::pushUserdata(L, party);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Party\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b7289bb1e4c119d9", + "equalIndicator/v1": "e26fa325e877eb39ace9852b05c3422046baa8bb0dd001cb15d46fff34b419e8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1147, + "startColumn": 53, + "charOffset": 46929, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1145, + "startColumn": 1, + "charOffset": 46872, + "charLength": 192, + "snippet": { + "text": "}\r\n\r\nbool Game::removeCreature(std::shared_ptr creature, bool isLogout /* = true*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!creature || creature->isRemoved()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f04c8ccf06d29181", + "equalIndicator/v1": "e299d0718b582e3aa0941f59ed8072ebaf80b02ed70bd994039159f8dfd44f03" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')", + "markdown": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 88, + "startColumn": 10, + "charOffset": 2227, + "charLength": 11, + "snippet": { + "text": "attackSpeed" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 86, + "startColumn": 1, + "charOffset": 2180, + "charLength": 128, + "snippet": { + "text": "\r\n\tuint32_t getAttackSpeed() const {\r\n\t\treturn attackSpeed / g_configManager().getFloat(RATE_ATTACK_SPEED, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bc53ff9fbd662b97", + "equalIndicator/v1": "e2a0de878dc7ce1a94bed7fad679d17eaf312cede657001a6276cfa5cc39e7ba" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 463, + "startColumn": 65, + "charOffset": 17455, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 461, + "startColumn": 1, + "charOffset": 17386, + "charLength": 218, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::playerOnRemoveCount(std::shared_ptr player, std::shared_ptr item) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnMove - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "835d7b50afdde077", + "equalIndicator/v1": "e2a1a3a655cd745a631b9ee1a696702a3697daab072e2b4e213cafe992ed839b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotlocker.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 39, + "startColumn": 7, + "charOffset": 1339, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 37, + "startColumn": 1, + "charOffset": 1178, + "charLength": 348, + "snippet": { + "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r\n\tbool canRemove() const override {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6d01b7d1d46d4201", + "equalIndicator/v1": "e2d55d3f325661b0843e7210f59be7b5b6e6e8fdf409c305afef5acbaaeac771" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 144, + "startColumn": 59, + "charOffset": 3712, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 142, + "startColumn": 1, + "charOffset": 3649, + "charLength": 107, + "snippet": { + "text": "}\r\n\r\nvoid ScriptEnvironment::addTempItem(std::shared_ptr item) {\r\n\ttempItems.emplace(this, item);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2c5e4c833785813c", + "equalIndicator/v1": "e2dc0a90e02f761b863d952276e509ca47e931226f101472d5d8c21078a69cab" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 354, + "startColumn": 20, + "charOffset": 8862, + "charLength": 9, + "snippet": { + "text": "stackSize" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 352, + "startColumn": 1, + "charOffset": 8774, + "charLength": 115, + "snippet": { + "text": "\r\n\tuint64_t stackSize = static_cast(itemType->stackSize);\r\n\tlua_pushnumber(L, stackSize);\r\n\treturn 1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c3cd2d7db8963c4c", + "equalIndicator/v1": "e2fd85ac86541ae97bf2a500b3a2aa2a6abcbee4023e6db98d098fcfb3396ff5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1055, + "startColumn": 12, + "charOffset": 30303, + "charLength": 7, + "snippet": { + "text": "tolower" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1053, + "startColumn": 1, + "charOffset": 30286, + "charLength": 88, + "snippet": { + "text": "\t}\r\n\r\n\tchar ch = tolower(str.front());\r\n\treturn ch != 'f' && ch != 'n' && ch != '0';\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0e3393ccd19a354a", + "equalIndicator/v1": "e314fc671b8566cedb157f0293b81a586a5fff03a6bc1bcabfeb5bb6ffe2ca85" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'hwnd' declared with a const-qualified typedef; results in the type being 'HWND__ *const' instead of 'const HWND__ *'", + "markdown": "'hwnd' declared with a const-qualified typedef; results in the type being 'HWND__ \\*const' instead of 'const HWND__ \\*'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 228, + "startColumn": 13, + "charOffset": 7806, + "charLength": 4, + "snippet": { + "text": "hwnd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 226, + "startColumn": 1, + "charOffset": 7728, + "charLength": 201, + "snippet": { + "text": "void CanaryServer::toggleForceCloseButton() {\r\n#ifdef OS_WINDOWS\r\n\tconst HWND hwnd = GetConsoleWindow();\r\n\tconst HMENU hmenu = GetSystemMenu(hwnd, FALSE);\r\n\tEnableMenuItem(hmenu, SC_CLOSE, MF_GRAYED);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "92620f7d7ad17802", + "equalIndicator/v1": "e32c96e1298c759c9b52355cef044486a5ebe378046bb707f4b8fee420cd90d8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'fromProto' is within a recursive call chain", + "markdown": "Function 'fromProto' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper_proto.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 78, + "startColumn": 33, + "charOffset": 2681, + "charLength": 9, + "snippet": { + "text": "fromProto" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 76, + "startColumn": 1, + "charOffset": 2644, + "charLength": 181, + "snippet": { + "text": "}\r\n\r\nValueWrapper ProtoSerializable::fromProto(const Canary::protobuf::kv::ValueWrapper &protoValue, uint64_t timestamp) {\r\n\tValueVariant data;\r\n\tswitch (protoValue.value_case()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b0eccdf4f7bf4094", + "equalIndicator/v1": "e34012941ea5bec08309a00f01688bf255d500100bdc56f4eb51833f1f657879" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 993, + "startColumn": 7, + "charOffset": 35834, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 991, + "startColumn": 1, + "charOffset": 35822, + "charLength": 153, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnTradeAccept - \"\r\n\t\t \"Player {} target {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "09c1014765ced971", + "equalIndicator/v1": "e34ee90e452e5dcda165a4ed63369dac5768eb679fabf306f5bd4e98125283ad" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 946, + "startColumn": 2, + "charOffset": 28802, + "charLength": 59, + "snippet": { + "text": "lua_createtable(L, monsterType->info.voiceVector.size(), 0)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 944, + "startColumn": 1, + "charOffset": 28782, + "charLength": 175, + "snippet": { + "text": "\r\n\tint index = 0;\r\n\tlua_createtable(L, monsterType->info.voiceVector.size(), 0);\r\n\tfor (const auto &voiceBlock : monsterType->info.voiceVector) {\r\n\t\tlua_createtable(L, 0, 2);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "62a80c7a8b6526c8", + "equalIndicator/v1": "e359a14b6d18b0768a2134ea25960ed1544f197df1c2b929c4fd61e56f5c199c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 322, + "startColumn": 7, + "charOffset": 10172, + "charLength": 10, + "snippet": { + "text": "isPushable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 320, + "startColumn": 1, + "charOffset": 10094, + "charLength": 135, + "snippet": { + "text": "\tvirtual void serializeAttr(PropWriteStream &propWriteStream) const;\r\n\r\n\tbool isPushable() override final {\r\n\t\treturn isMovable();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "123b21db7669c97b", + "equalIndicator/v1": "e36b2c910b9cc1de1c8afd60407666b9ba55d0b554401f35919497ff24a2b21f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9782, + "startColumn": 49, + "charOffset": 342468, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9780, + "startColumn": 1, + "charOffset": 342415, + "charLength": 182, + "snippet": { + "text": "}\r\n\r\nvoid Game::removePlayer(std::shared_ptr player) {\r\n\tconst std::string &lowercase_name = asLowerCaseString(player->getName());\r\n\tmappedPlayerNames.erase(lowercase_name);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1cffaf8a50352c7d", + "equalIndicator/v1": "e36e1cea3e530d99c45f15693aa4ab0d51b55535e93b1c13a0c78faf34b96bb1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1302, + "startColumn": 22, + "charOffset": 36596, + "charLength": 7, + "snippet": { + "text": "toupper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1300, + "startColumn": 1, + "charOffset": 36421, + "charLength": 278, + "snippet": { + "text": "\t\t\t\t\tss << std::showpos << it.abilities->specializedMagicLevel[i] << std::noshowpos;\r\n\t\t\t\t\tstd::string combatName = getCombatName(indexToCombatType(i));\r\n\t\t\t\t\tcombatName[0] = toupper(combatName[0]);\r\n\t\t\t\t\tdescriptions.emplace_back(combatName + \" Magic Level\", ss.str());\r\n\t\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5938b5245335c311", + "equalIndicator/v1": "e37724ade5c94afb7bd5ca713441aab0aa57342cd704bfabb93bab7d9b9b05f8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The variable 'item' is copy-constructed from a const reference but is only used as const reference; consider making it a const reference", + "markdown": "The variable 'item' is copy-constructed from a const reference but is only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 323, + "startColumn": 7, + "charOffset": 9581, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 321, + "startColumn": 1, + "charOffset": 9569, + "charLength": 106, + "snippet": { + "text": "\t}\r\n\r\n\tauto item = filteredItems[index];\r\n\r\n\tauto it = std::find(itemlist.begin(), itemlist.end(), item);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0b62891b22958842", + "equalIndicator/v1": "e3afb1940246b798ef9628a8f627147ea2bcd15e0e2b218547ed0aacc4dd112f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 437, + "startColumn": 91, + "charOffset": 13119, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 435, + "startColumn": 1, + "charOffset": 13024, + "charLength": 221, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::StepInField(std::shared_ptr creature, std::shared_ptr item, const Position &) {\r\n\tif (creature == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::StepInField] - Creature is nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fd3c7b3ddce02440", + "equalIndicator/v1": "e3b3ac28d4e0e38ec42698ecb6eeeef0f78f6ab44589a1011b425340a4c06a71" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 167, + "startColumn": 27, + "charOffset": 6261, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 165, + "startColumn": 1, + "charOffset": 6229, + "charLength": 125, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.monsterOnSpawn, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a337aea61fab8c6f", + "equalIndicator/v1": "e401d2c4c1fed85b6166188c179a40556ce8b38e0361912863e0f7aec1f70272" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'operator int' must be marked explicit to avoid unintentional implicit conversions", + "markdown": "'operator int' must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 108, + "startColumn": 27, + "charOffset": 3219, + "charLength": 3, + "snippet": { + "text": "int" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 106, + "startColumn": 1, + "charOffset": 3187, + "charLength": 76, + "snippet": { + "text": "\t}\r\n\r\n\texplicit(false) operator int() const {\r\n\t\treturn get();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7a4edd0d5bd8c7be", + "equalIndicator/v1": "e404897ce6014414b8c4bb257bb7b586ccef4077b601787fa23b5d9b1f7c404c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1051, + "startColumn": 114, + "charOffset": 30499, + "charLength": 9, + "snippet": { + "text": "container" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1049, + "startColumn": 1, + "charOffset": 30381, + "charLength": 352, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr Player::refreshManagedContainer(ObjectCategory_t category, std::shared_ptr container, bool isLootContainer, bool loading /* = false*/) {\r\n\tstd::shared_ptr previousContainer = nullptr;\r\n\tauto toSetAttribute = isLootContainer ? ItemAttribute_t::QUICKLOOTCONTAINER : ItemAttribute_t::OBTAINCONTAINER;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "990b7b0c9d845e20", + "equalIndicator/v1": "e404bae48fae92613a9784afa2f85fbaeb848c1b1910ae20388d7728a20f73ba" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when declaring iterators", + "markdown": "Use auto when declaring iterators" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 71, + "startColumn": 2, + "charOffset": 1957, + "charLength": 21, + "snippet": { + "text": "ModulesList::iterator" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 69, + "startColumn": 1, + "charOffset": 1885, + "charLength": 204, + "snippet": { + "text": "\r\nModule* Modules::getEventByRecvbyte(uint8_t recvbyte, bool force) {\r\n\tModulesList::iterator it = recvbyteList.find(recvbyte);\r\n\tif (it != recvbyteList.end()) {\r\n\t\tif (!force || it->second.isLoaded()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d24728e765a97d0f", + "equalIndicator/v1": "e404d89ce20f5acb6e56d7a0212174cd863314b48539f7799112ffc34708eda6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 770, + "startColumn": 26, + "charOffset": 35482, + "charLength": 19, + "snippet": { + "text": "MITIGATION_INCREASE" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 768, + "startColumn": 1, + "charOffset": 35267, + "charLength": 378, + "snippet": { + "text": "// SLOT_BLUE_MIDDLE_100 = 26\r\nvoid IOWheel::slotBlueMiddle100(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\r\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\r\n\tif (isKnight(vocationCipId)) {\r\n\t\taddSpell(player, bonusData, WheelSlots_t::SLOT_BLUE_MIDDLE_100, points, \"Chivalrous Challenge\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5f7c3441927807d4", + "equalIndicator/v1": "e4213df1cb6d8018bcb85d411e17a58241842cc2224119ddd78a98963814ef5e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 110, + "startColumn": 28, + "charOffset": 3197, + "charLength": 32, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 108, + "startColumn": 1, + "charOffset": 3071, + "charLength": 321, + "snippet": { + "text": "\tstd::shared_ptr getEvent(const std::shared_ptr &item, MoveEvent_t eventType);\r\n\r\n\tbool registerLuaItemEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaActionEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaUniqueEvent(const std::shared_ptr moveEvent);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "61cf037f48722fa0", + "equalIndicator/v1": "e44029dfc0c569b4560a7f044ad353967c84400e5b017b75dfa05050c15df1a2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1080, + "startColumn": 27, + "charOffset": 38822, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1078, + "startColumn": 1, + "charOffset": 38790, + "charLength": 133, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnLoseExperience, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a1d1a5defa1a3d73", + "equalIndicator/v1": "e44be812b943453d8bebe2778fa5b71f6f7f139fe06c958cd2c6487c6a353acf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Pass by value and use std::move", + "markdown": "Pass by value and use std::move" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 88, + "startColumn": 29, + "charOffset": 2415, + "charLength": 22, + "snippet": { + "text": "std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 86, + "startColumn": 1, + "charOffset": 2286, + "charLength": 198, + "snippet": { + "text": "\tstatic std::shared_ptr createHouseTransferItem(std::shared_ptr house);\r\n\r\n\texplicit HouseTransferItem(std::shared_ptr newHouse) :\r\n\t\tItem(0), house(newHouse) { }\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d1aaa68693c301e0", + "equalIndicator/v1": "e4594ffced5c8ab0d262ba5eaeaf64a45c33e9883029b8b6e8c4eab01974ae47" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 701, + "startColumn": 100, + "charOffset": 21245, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 699, + "startColumn": 1, + "charOffset": 21141, + "charLength": 211, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::fireStepEvent(const std::shared_ptr &creature, std::shared_ptr item, const Position &pos) const {\r\n\tif (isLoadedCallback()) {\r\n\t\treturn executeStep(creature, item, pos);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "022e5d26dc184835", + "equalIndicator/v1": "e46c6823fdebd5b064123fb9548bb0d74f68675b9db699ea9adae869b8d72f64" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 780, + "startColumn": 20, + "charOffset": 23761, + "charLength": 10, + "snippet": { + "text": "-oldWeight" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 778, + "startColumn": 1, + "charOffset": 23661, + "charLength": 163, + "snippet": { + "text": "\t\tconst int32_t oldWeight = item->getWeight();\r\n\t\titem->setItemCount(newCount);\r\n\t\tupdateItemWeight(-oldWeight + item->getWeight());\r\n\r\n\t\t// send change to client\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5cd27242d1efff9f", + "equalIndicator/v1": "e4735d534314f91d77575206e84e639b9374a4a7137bcee4ce10d6a0c14d28dd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotlocker.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 31, + "startColumn": 19, + "charOffset": 1012, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 29, + "startColumn": 1, + "charOffset": 989, + "charLength": 204, + "snippet": { + "text": "}\r\n\r\nvoid DepotLocker::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tauto parentLocked = m_parent.lock();\r\n\tif (parentLocked) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "99294fbd93c6d491", + "equalIndicator/v1": "e479a761b1a0d0b1fa05c64501754d0803267bfd2546805922e0ceaa2deb9808" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'wheelSpell' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'wheelSpell' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 27, + "startColumn": 94, + "charOffset": 1037, + "charLength": 10, + "snippet": { + "text": "wheelSpell" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 25, + "startColumn": 1, + "charOffset": 895, + "charLength": 220, + "snippet": { + "text": "#include \"lua/callbacks/events_callbacks.hpp\"\r\n\r\nint32_t Combat::getLevelFormula(std::shared_ptr player, const std::shared_ptr wheelSpell, const CombatDamage &damage) const {\r\n\tif (!player) {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3c0bc71555e31c0b", + "equalIndicator/v1": "e480f7e1b08bf99a7ef0f96838991baa5d68b89a57b7f54cb3dab2849e15869b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 97, + "startColumn": 20, + "charOffset": 3507, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 95, + "startColumn": 1, + "charOffset": 3402, + "charLength": 170, + "snippet": { + "text": "\tstd::ostringstream query;\r\n\tquery << \"SELECT * FROM `players` WHERE `id` = \" << id;\r\n\treturn loadPlayer(player, db.storeQuery(query.str()), disableIrrelevantInfo);\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bcbb668dab7bc4c0", + "equalIndicator/v1": "e4a82558c3ae8fb83edbb5589e2e8ebf5b50fa66d22b9a6ae31a2849aa18737c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 81, + "startColumn": 41, + "charOffset": 2789, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 79, + "startColumn": 1, + "charOffset": 2743, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "831accab21375d01", + "equalIndicator/v1": "e4d1c2d299d600631c3acf4ec1a92dde9dc2f3b13b4c973ed11e4841b55dd50e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2640, + "startColumn": 21, + "charOffset": 78212, + "charLength": 8, + "snippet": { + "text": "blockHit" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2638, + "startColumn": 1, + "charOffset": 78187, + "charLength": 328, + "snippet": { + "text": "}\r\n\r\nBlockType_t Player::blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense /* = false*/, bool checkArmor /* = false*/, bool field /* = false*/) {\r\n\tBlockType_t blockType = Creature::blockHit(attacker, combatType, damage, checkDefense, checkArmor, field);\r\n\tif (attacker) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "46107df59e96d8a4", + "equalIndicator/v1": "e50347e87e9ec6f47ce02e1455558de9ea0f70e945eaa47b0b54de1a3d5e581d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getUnlockedRunesBit' can be made const", + "markdown": "Method 'getUnlockedRunesBit' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1958, + "startColumn": 10, + "charOffset": 57704, + "charLength": 19, + "snippet": { + "text": "getUnlockedRunesBit" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1956, + "startColumn": 1, + "charOffset": 57664, + "charLength": 96, + "snippet": { + "text": "\t\tUnlockedRunesBit = bit;\r\n\t}\r\n\tint32_t getUnlockedRunesBit() {\r\n\t\treturn UnlockedRunesBit;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f5ef080c5e579feb", + "equalIndicator/v1": "e512b77a2068cb6a4194e932e9a8f65857ae1ca223f76975ed144a2cebce2b2c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1362, + "startColumn": 28, + "charOffset": 40933, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1360, + "startColumn": 1, + "charOffset": 40803, + "charLength": 160, + "snippet": { + "text": "\tvoid sendChangeSpeed(std::shared_ptr creature, uint16_t newSpeed) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendChangeSpeed(creature, newSpeed);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "47e722ecc620e026", + "equalIndicator/v1": "e5259af6ef785317f40b46903f13701bb2667cfd6aac0f7eb1fc22d8aee0db91" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2530, + "startColumn": 37, + "charOffset": 75470, + "charLength": 9, + "snippet": { + "text": "healthMax" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2528, + "startColumn": 1, + "charOffset": 75302, + "charLength": 359, + "snippet": { + "text": "\t\tif (vocation->getId() != VOCATION_NONE && level <= 8) {\r\n\t\t\tconst auto &noneVocation = g_vocations().getVocation(VOCATION_NONE);\r\n\t\t\thealthMax = std::max(0, healthMax - noneVocation->getHPGain());\r\n\t\t\tmanaMax = std::max(0, manaMax - noneVocation->getManaGain());\r\n\t\t\tcapacity = std::max(0, capacity - noneVocation->getCapGain());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4ac7d80b1211f0f4", + "equalIndicator/v1": "e549b35447f338624848941b07a7232ae68ee4eb5fef96af059a8b750b4458d9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 606, + "startColumn": 109, + "charOffset": 17716, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 604, + "startColumn": 1, + "charOffset": 17312, + "charLength": 503, + "snippet": { + "text": "\t\tmember->sendPartyCreatureHealth(player, std::ceil((static_cast(player->getHealth()) / std::max(player->getMaxHealth(), 1)) * 100));\r\n\t\tplayer->sendPartyPlayerMana(member, std::ceil((static_cast(member->getMana()) / std::max(member->getMaxMana(), 1)) * 100));\r\n\t\tmember->sendPartyPlayerMana(player, std::ceil((static_cast(player->getMana()) / std::max(player->getMaxMana(), 1)) * 100));\r\n\t} else {\r\n\t\tfor (const auto &summon : player->getSummons()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "98cdb8ded16d5ba8", + "equalIndicator/v1": "e58bc7d7db464fcda82c62782e84b4c3b73797f50d7d3d6a6a62c4966d155d37" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 40, + "startColumn": 18, + "charOffset": 1353, + "charLength": 12, + "snippet": { + "text": "ValueWrapper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 38, + "startColumn": 1, + "charOffset": 1201, + "charLength": 462, + "snippet": { + "text": "\texplicit(false) ValueWrapper(bool value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(int value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(double value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const phmap::flat_hash_map &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const std::initializer_list> &init_list, uint64_t timestamp = 0);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4546bd76d05fbb98", + "equalIndicator/v1": "e5927ecda707d957591f42ab1dd04a8f973a21736f71750d819cd772eab08ccc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'npc' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'npc' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1130, + "startColumn": 43, + "charOffset": 42995, + "charLength": 3, + "snippet": { + "text": "npc" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1128, + "startColumn": 1, + "charOffset": 42898, + "charLength": 202, + "snippet": { + "text": "\tgetScriptInterface()->pushFunction(getScriptId());\r\n\r\n\tLuaScriptInterface::pushUserdata(L, npc);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Npc\");\r\n\tLuaScriptInterface::pushPosition(L, position);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "631029885e313dbb", + "equalIndicator/v1": "e59e46f496a2afafda22982f206f7682e35f9880821e6b3ec418c8fe19bad8dc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 840, + "startColumn": 2, + "charOffset": 23371, + "charLength": 12, + "snippet": { + "text": "SpeakClasses" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 838, + "startColumn": 1, + "charOffset": 23328, + "charLength": 235, + "snippet": { + "text": "\tbool ghost = getBoolean(L, 4, false);\r\n\r\n\tSpeakClasses type = getNumber(L, 3, TALKTYPE_MONSTER_SAY);\r\n\tconst std::string &text = getString(L, 2);\r\n\tstd::shared_ptr creature = getUserdataShared(L, 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1c52ff89ee9d7805", + "equalIndicator/v1": "e5ad9b8fe8872e3ecfb8659f4191c4e96b2e78d469780ccd67ffd5e65bee49e0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 579, + "startColumn": 13, + "charOffset": 27421, + "charLength": 13, + "snippet": { + "text": "absorbPercent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 577, + "startColumn": 1, + "charOffset": 27260, + "charLength": 406, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += value;\r\n\t} else if (stringValue == \"absorbpercentenergy\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b7babbdd57eab56f", + "equalIndicator/v1": "e5bcc3b8f59aa00d8d103663dd5ee4f7a00bb53f803232c60d23c650514247f7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1167, + "startColumn": 59, + "charOffset": 34389, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1165, + "startColumn": 1, + "charOffset": 34322, + "charLength": 136, + "snippet": { + "text": "\t\t}\r\n\t}\r\n\tvoid sendCreatureChangeVisible(std::shared_ptr creature, bool visible) {\r\n\t\tif (!client || !creature) {\r\n\t\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0fd7a82aed2ed982", + "equalIndicator/v1": "e5c84840f8e52c9595b78798108b4d2a9f2023174e2a5f8c2f196c67d7ef79b4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 753, + "startColumn": 22, + "charOffset": 20498, + "charLength": 24, + "snippet": { + "text": "luaPlayerGetStashCounter" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 751, + "startColumn": 1, + "charOffset": 20472, + "charLength": 163, + "snippet": { + "text": "}\r\n\r\nint PlayerFunctions::luaPlayerGetStashCounter(lua_State* L) {\r\n\t// player:getStashCount()\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4734564b8868009f", + "equalIndicator/v1": "e5d16336ec9619d1354ca6858202a5118bb4c56d68e78f280aab9f6599c36dee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 249, + "startColumn": 55, + "charOffset": 7059, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 247, + "startColumn": 1, + "charOffset": 6968, + "charLength": 151, + "snippet": { + "text": "\r\n// Prey/Task hunting global class\r\nvoid IOPrey::checkPlayerPreys(std::shared_ptr player, uint8_t amount) const {\r\n\tif (!player) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2bdae2a2b4ee083d", + "equalIndicator/v1": "e5dd9a5dbb5ecab954b8931a24b2376a2fc17b68a4827b643c81c4508510708f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2236, + "startColumn": 25, + "charOffset": 65770, + "charLength": 8, + "snippet": { + "text": "interval" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2234, + "startColumn": 1, + "charOffset": 65740, + "charLength": 128, + "snippet": { + "text": "\t}\r\n\r\n\taddOfflineTrainingTime(interval);\r\n\tif (lastStatsTrainingTime != getOfflineTrainingTime() / 60 / 1000) {\r\n\t\tsendStats();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d3571f9c0ddaf0d4", + "equalIndicator/v1": "e5e1ffc17df65fc3d662fbe72be541a056b997b7480f64b98e89c5f07b90489d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 725, + "startColumn": 37, + "charOffset": 23592, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 723, + "startColumn": 1, + "charOffset": 23530, + "charLength": 133, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 1.10f) + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "087494f2cbe97d5f", + "equalIndicator/v1": "e60e81809f3fd506031ac77482c2fe5f13e0cc6909dcac0b6ec2d7792023de29" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 160, + "startColumn": 25, + "charOffset": 5341, + "charLength": 8, + "snippet": { + "text": "getThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 158, + "startColumn": 1, + "charOffset": 5114, + "charLength": 321, + "snippet": { + "text": "\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::map &getAllItemTypeCount(std::map &countMap) const override final;\r\n\tstd::shared_ptr getThing(size_t index) const override final;\r\n\r\n\tItemVector getItems(bool recursive = false);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "705d4b268343892d", + "equalIndicator/v1": "e650c9d45f96dc1db2222527fab3e901d3ecdc80198fdc66bc8d474e777f3f8b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2675, + "startColumn": 17, + "charOffset": 79528, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2673, + "startColumn": 1, + "charOffset": 79368, + "charLength": 303, + "snippet": { + "text": "\t\t\t\t\tconst int16_t &fieldAbsorbPercent = it.abilities->fieldAbsorbPercent[combatTypeToIndex(combatType)];\r\n\t\t\t\t\tif (fieldAbsorbPercent != 0) {\r\n\t\t\t\t\t\tdamage -= std::round(damage * (fieldAbsorbPercent / 100.));\r\n\t\t\t\t\t\tif (charges != 0) {\r\n\t\t\t\t\t\t\tg_game().transformItem(item, item->getID(), charges - 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "61e3c68f72489b0e", + "equalIndicator/v1": "e658c9f020e14e7d779d60ea28f954729c6da50ed9a738f1acc702c7753777f2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use emplace_back instead of push_back", + "markdown": "Use emplace_back instead of push_back" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6464, + "startColumn": 12, + "charOffset": 189168, + "charLength": 9, + "snippet": { + "text": "push_back" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6462, + "startColumn": 1, + "charOffset": 188987, + "charLength": 278, + "snippet": { + "text": "void sendStowItems(const std::shared_ptr &item, const std::shared_ptr &stowItem, StashContainerList &itemDict) {\r\n\tif (stowItem->getID() == item->getID()) {\r\n\t\titemDict.push_back(std::pair, uint32_t>(stowItem, stowItem->getItemCount()));\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7f2d2b32d994a4bc", + "equalIndicator/v1": "e65d8ad4d4ba28d171b45b704f3a033fcd36d510ed5221c90c76b31c4d6926da" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 722, + "startColumn": 15, + "charOffset": 23463, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 720, + "startColumn": 1, + "charOffset": 23423, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 87) * 1.20f) - 4;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7adc5c11bc8c9178", + "equalIndicator/v1": "e6778dae0b3b9c22ce25e9b2bcf14ce49cd90f1ffb55f65dd7eacc722f4d3d6a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6181, + "startColumn": 62, + "charOffset": 196442, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6179, + "startColumn": 1, + "charOffset": 196376, + "charLength": 137, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendChangeSpeed(std::shared_ptr creature, uint16_t speed) {\r\n\tNetworkMessage msg;\r\n\tmsg.addByte(0x8F);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "88d76933cd3d6ce4", + "equalIndicator/v1": "e68fa702bc1e5d637c644ca487e9a073e8aa1c9a12190c22c591000801c09be6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2246, + "startColumn": 19, + "charOffset": 85869, + "charLength": 1, + "snippet": { + "text": "m" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2244, + "startColumn": 1, + "charOffset": 85768, + "charLength": 169, + "snippet": { + "text": "\t\ttoCylinder->updateThing(toItem, toItem->getID(), toItem->getItemCount() + n);\r\n\r\n\t\tint32_t count = m - n;\r\n\t\tif (count > 0) {\r\n\t\t\tif (item->getItemCount() != count) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "985312d2ba4f37e5", + "equalIndicator/v1": "e6be114f6e262a58c3757d196102017215853786d30dbb2b8ed1a2d218f92ad9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'member' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'member' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 591, + "startColumn": 86, + "charOffset": 16450, + "charLength": 6, + "snippet": { + "text": "member" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 589, + "startColumn": 1, + "charOffset": 16360, + "charLength": 235, + "snippet": { + "text": "}\r\n\r\nvoid Party::showPlayerStatus(std::shared_ptr player, std::shared_ptr member, bool showStatus) {\r\n\tplayer->sendPartyCreatureShowStatus(member, showStatus);\r\n\tmember->sendPartyCreatureShowStatus(player, showStatus);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75d51c1f0a57d2e4", + "equalIndicator/v1": "e6d0fddcc9e924580a77c1add2446a726f3af458f7e3830e0913c64d587fae92" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 929, + "startColumn": 25, + "charOffset": 30289, + "charLength": 6, + "snippet": { + "text": "damage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 927, + "startColumn": 1, + "charOffset": 30195, + "charLength": 162, + "snippet": { + "text": "\t\tint32_t value = getAbsorbPercent(combatType);\r\n\t\tif (value != 0) {\r\n\t\t\tdamage -= std::round(damage * value / 100.f);\r\n\t\t}\r\n\t\tvalue = getAbsorbFlat(combatType);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "587f071a61e10ee6", + "equalIndicator/v1": "e6f62cb753ba69d907586486eb7ce962fa27a5589cd926ec8d7ea184052f9b60" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'registerWheelSpellTable' is within a recursive call chain", + "markdown": "Function 'registerWheelSpellTable' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 53, + "startColumn": 7, + "charOffset": 2151, + "charLength": 23, + "snippet": { + "text": "registerWheelSpellTable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 51, + "startColumn": 1, + "charOffset": 2115, + "charLength": 239, + "snippet": { + "text": "\t */\r\n\ttemplate \r\n\tvoid registerWheelSpellTable(const T &spellData, const std::string &name, WheelSpellGrade_t gradeType) {\r\n\t\tif (name == \"Any_Focus_Mage_Spell\") {\r\n\t\t\tfor (const std::string &focusSpellName : m_focusSpells) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "59f58a383226b809", + "equalIndicator/v1": "e73ecdb50f6532e2d2b769df5c838ed1136960435344fb5fe7c7b6b746703298" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 171, + "startColumn": 3, + "charOffset": 4468, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 169, + "startColumn": 1, + "charOffset": 4411, + "charLength": 199, + "snippet": { + "text": "\r\n\tif (const TileItemVector* items = getItemList()) {\r\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\r\n\t\t\tif ((*it)->getMagicField()) {\r\n\t\t\t\treturn (*it)->getMagicField();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fddde8ed3284647b", + "equalIndicator/v1": "e74007ccac1695b8fb378d7e82f456f0204e66176df2bf3ccfc2aaec451db456" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 844, + "startColumn": 27, + "charOffset": 27188, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 842, + "startColumn": 1, + "charOffset": 27156, + "charLength": 129, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\r\n\tenv->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7df1f1d5a6c9f04f", + "equalIndicator/v1": "e74904d766bb504a85a2a135bcc7a76660feb921bc967648e680ef7721f6d619" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 10184, + "startColumn": 7, + "charOffset": 354405, + "charLength": 25, + "snippet": { + "text": "auto [monsterId, monster]" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10182, + "startColumn": 1, + "charOffset": 354330, + "charLength": 180, + "snippet": { + "text": "void Game::updateForgeableMonsters() {\r\n\tforgeableMonsters.clear();\r\n\tfor (auto [monsterId, monster] : monsters) {\r\n\t\tauto monsterTile = monster->getTile();\r\n\t\tif (!monsterTile) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "81bdae38b5526989", + "equalIndicator/v1": "e7592ee1cae62ea2f1111636ae3495f0c298d37ee353682fea21c842409663b1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Initializer-list constructor should not be declared explicit", + "markdown": "Initializer-list constructor should not be declared explicit" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/arraylist.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 30, + "startColumn": 12, + "charOffset": 850, + "charLength": 9, + "snippet": { + "text": "arraylist" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 28, + "startColumn": 1, + "charOffset": 832, + "charLength": 102, + "snippet": { + "text": "\t\t}\r\n\r\n\t\texplicit arraylist(std::initializer_list _Ilist) {\r\n\t\t\tbackContainer.assign(_Ilist);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bb06eaf1874f6fbf", + "equalIndicator/v1": "e787685f6f4014b0897a1aa1429f516024e26a7067548aff1a8c86ca5adac934" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1610, + "startColumn": 19, + "charOffset": 47933, + "charLength": 3, + "snippet": { + "text": "str" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1608, + "startColumn": 1, + "charOffset": 47909, + "charLength": 98, + "snippet": { + "text": "\t}\r\n\r\n\tfor (std::string str : toks) {\r\n\t\tif (str.length() < 2) {\r\n\t\t\treturn INVALID_TOKEN_LENGTH;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ccd24c604704ff28", + "equalIndicator/v1": "e79319300de51772fdf2fb362ebf683944f5a1af0e53ec977c04ac165b357ce9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 177, + "startColumn": 105, + "charOffset": 6338, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 175, + "startColumn": 1, + "charOffset": 6229, + "charLength": 403, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::creatureOnDrainHealth(std::shared_ptr creature, std::shared_ptr attacker, CombatType_t &typePrimary, int32_t &damagePrimary, CombatType_t &typeSecondary, int32_t &damageSecondary, TextColor_t &colorPrimary, TextColor_t &colorSecondary) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnDrainHealth - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0805ceaf739a5254", + "equalIndicator/v1": "e7954e7b9e024b39400bffb705f1298ca029da0fa52b55f87762ec165b6dea3a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1200, + "startColumn": 30, + "charOffset": 35328, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1198, + "startColumn": 1, + "charOffset": 35219, + "charLength": 129, + "snippet": { + "text": "\tvoid sendCreatureLight(std::shared_ptr creature) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureLight(creature);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fb573f8211bb8fbb", + "equalIndicator/v1": "e7ae4493ae6ab9d1d79f01be2034d1987fe6d3c35f8ea54d0baa1103f6a98397" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 794, + "startColumn": 6, + "charOffset": 30458, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 792, + "startColumn": 1, + "charOffset": 30425, + "charLength": 176, + "snippet": { + "text": "\tlua_pushnumber(L, exp);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5f5a7b101b81252b", + "equalIndicator/v1": "e7b6624599358d4b19426d7efd43bcccf7222bcb3c7ba640ba54b6fe1089be94" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint8_t' (aka 'unsigned char') to signed type 'int8_t' (aka 'signed char') is implementation-defined", + "markdown": "Narrowing conversion from 'uint8_t' (aka 'unsigned char') to signed type 'int8_t' (aka 'signed char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3025, + "startColumn": 11, + "charOffset": 92324, + "charLength": 3, + "snippet": { + "text": "msg" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3023, + "startColumn": 1, + "charOffset": 92222, + "charLength": 210, + "snippet": { + "text": "\tuint16_t raceId = 0;\r\n\tif (action == static_cast(PreyAction_MonsterSelection)) {\r\n\t\tindex = msg.getByte();\r\n\t} else if (action == static_cast(PreyAction_Option)) {\r\n\t\toption = msg.getByte();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e2d9ae2151453f6c", + "equalIndicator/v1": "e7bada78a4eee82534c8678776b28c50ce55d99feb3c29dd8a207d9fbd90311a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 829, + "startColumn": 29, + "charOffset": 24898, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 827, + "startColumn": 1, + "charOffset": 24758, + "charLength": 215, + "snippet": { + "text": "\r\nstd::map &Container::getAllItemTypeCount(std::map &countMap) const {\r\n\tfor (std::shared_ptr item : itemlist) {\r\n\t\tcountMap[item->getID()] += item->getItemCount();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c56dcd084ce50fd2", + "equalIndicator/v1": "e7fb45d61016a812d48ecdc64866ab2d3fd864a14203d7b4b94fd7a2e5f53c6b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 676, + "startColumn": 35, + "charOffset": 18478, + "charLength": 10, + "snippet": { + "text": "actualBuff" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 674, + "startColumn": 1, + "charOffset": 18396, + "charLength": 138, + "snippet": { + "text": "\r\n\t\tint32_t actualBuff = creature->getBuff(i);\r\n\t\tbuffs[i] = static_cast(actualBuff * ((buffsPercent[i] - 100) / 100.f));\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d699e038b9161ce4", + "equalIndicator/v1": "e849924e9bd14bd4d8532c1c75b3d1a64d6d91551527c14570a04fed91c4065c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 121, + "startColumn": 8, + "charOffset": 3105, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 119, + "startColumn": 1, + "charOffset": 3009, + "charLength": 212, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsReadable(lua_State* L) {\r\n\t// itemType:isReadable()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->canReadText);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b61ca221b50939c7", + "equalIndicator/v1": "e84d880ea8947e6f07902d825dbe23fdaf0a4652763c804ba0f9568f8d1960ce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'npc' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'npc' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 65, + "startColumn": 12, + "charOffset": 1813, + "charLength": 3, + "snippet": { + "text": "npc" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 63, + "startColumn": 1, + "charOffset": 1758, + "charLength": 104, + "snippet": { + "text": "\r\n\tvoid setNpc(std::shared_ptr npc) {\r\n\t\tcurNpc = npc;\r\n\t}\r\n\tstd::shared_ptr getNpc() const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f09f687787dc908e", + "equalIndicator/v1": "e859e297d96aee967dce70c52de188019669b868dfaf1b77409ced376feacf01" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 199, + "startColumn": 97, + "charOffset": 6101, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 197, + "startColumn": 1, + "charOffset": 6000, + "charLength": 186, + "snippet": { + "text": "}\r\n\r\nReturnValue Combat::canTargetCreature(std::shared_ptr player, std::shared_ptr target) {\r\n\tif (player == target) {\r\n\t\treturn RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "84952e39927f50ec", + "equalIndicator/v1": "e88ba4881271c3cce217f618f2809b70307ddd639b8e7bfaec9dade648d9e271" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6833, + "startColumn": 107, + "charOffset": 236228, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6831, + "startColumn": 1, + "charOffset": 236083, + "charLength": 329, + "snippet": { + "text": "\r\n// Custom PvP System combat helpers\r\nvoid Game::applyPvPDamage(CombatDamage &damage, std::shared_ptr attacker, std::shared_ptr target) {\r\n\tfloat targetDamageReceivedMultiplier = target->vocation->pvpDamageReceivedMultiplier;\r\n\tfloat attackerDamageDealtMultiplier = attacker->vocation->pvpDamageDealtMultiplier;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6f761bb1681bebea", + "equalIndicator/v1": "e8a467cf76b6c8e5bd18c419170ee54b33807ed1337a872a99ed8042ddfc4c0f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1312, + "startColumn": 27, + "charOffset": 40395, + "charLength": 7, + "snippet": { + "text": "gainExp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1310, + "startColumn": 1, + "charOffset": 40289, + "charLength": 163, + "snippet": { + "text": "\t\tmessage.position = position;\r\n\t\tmessage.primary.color = TEXTCOLOR_WHITE_EXP;\r\n\t\tmessage.primary.value = gainExp;\r\n\r\n\t\tfor (const auto &spectator : spectators) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "da9467c9f563d3c0", + "equalIndicator/v1": "e8aa13e7fe1ed3651f8d42d1334d2f634a51bcfdb8a3e3ba03fa89cd317d99b1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/rewardchest.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 26, + "startColumn": 7, + "charOffset": 986, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 24, + "startColumn": 1, + "charOffset": 828, + "charLength": 339, + "snippet": { + "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r\n\r\n\tbool canRemove() const final {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8bb3f4d0e156949b", + "equalIndicator/v1": "e8ae86585802f47587535d8b9f2fcb86c337d5b4b8cf4079481abda5760b6fc2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 235, + "startColumn": 7, + "charOffset": 7541, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 233, + "startColumn": 1, + "charOffset": 7374, + "charLength": 388, + "snippet": { + "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r\n\r\n\tvoid internalAddThing(std::shared_ptr thing) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "697eef31aa7df9db", + "equalIndicator/v1": "e8ced94548a8af43e9c679205b7ef4e6d6fca34d14f5dfc7277eebb312b3fb02" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2162, + "startColumn": 58, + "charOffset": 63513, + "charLength": 4, + "snippet": { + "text": "task" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2160, + "startColumn": 1, + "charOffset": 63451, + "charLength": 154, + "snippet": { + "text": "}\r\n\r\nvoid Player::setNextActionPushTask(std::shared_ptr task) {\r\n\tif (actionTaskEventPush != 0) {\r\n\t\tg_dispatcher().stopEvent(actionTaskEventPush);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0c6afde2e1ec2358", + "equalIndicator/v1": "e8d395bcf0fe0747bdabb7ea49537a1a25919a1f85c3f79d049a554cce843f25" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 254, + "startColumn": 7, + "charOffset": 9157, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 252, + "startColumn": 1, + "charOffset": 9145, + "charLength": 166, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventCreatureOnAreaCombat - \"\r\n\t\t \"Creature {} on tile position {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "31370b4af68088f5", + "equalIndicator/v1": "e8f92a0fdfb254834c441d991d68d13f579b393cad0788c2ce66663abf8edbb3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7685, + "startColumn": 39, + "charOffset": 240520, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7683, + "startColumn": 1, + "charOffset": 240363, + "charLength": 327, + "snippet": { + "text": "\tif (!oldProtocol) {\r\n\t\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\r\n\t\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\r\n\t} else {\r\n\t\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8111618cabb0a616", + "equalIndicator/v1": "e9058446e04b0ce3b3cac2e665a54d3a3f47a960d5a90e2f6b1e28fea3f28467" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 540, + "startColumn": 63, + "charOffset": 19144, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 538, + "startColumn": 1, + "charOffset": 19069, + "charLength": 227, + "snippet": { + "text": "\r\n// Player\r\nbool Events::eventPlayerOnBrowseField(std::shared_ptr player, const Position &position) {\r\n\t// Player:onBrowseField(position) or Player.onBrowseField(self, position)\r\n\tif (info.playerOnBrowseField == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0349298568cf7400", + "equalIndicator/v1": "e90ec8c71a32cd8a178e42b8f4a57d9229221d14c6c878515b80e351c378d078" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4406, + "startColumn": 35, + "charOffset": 132398, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4404, + "startColumn": 1, + "charOffset": 132345, + "charLength": 190, + "snippet": { + "text": "\r\n\t\tif (weapon) {\r\n\t\t\tif (!weapon->interruptSwing()) {\r\n\t\t\t\tresult = weapon->useWeapon(static_self_cast(), tool, attackedCreature);\r\n\t\t\t} else if (!classicSpeed && !canDoAction()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cae82827d730b556", + "equalIndicator/v1": "e96d085f35e21f371c0ab579c754d91e56902d649fd137d44e0ce40fdf14dbd1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 241, + "startColumn": 2, + "charOffset": 6310, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 239, + "startColumn": 1, + "charOffset": 6192, + "charLength": 183, + "snippet": { + "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\r\n\tstd::shared_ptr creature = getCreature(L, 2);\r\n\tuint16_t topicId = getNumber(L, 3, 0);\r\n\r\n\tif (!npc) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6a069b0e28cb99d9", + "equalIndicator/v1": "e9d66fb3cdff3ce9ef85167603ab24bff5b1cc1250eefc05906b20529637c76e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float_t' (aka 'float')", + "markdown": "Narrowing conversion from 'unsigned int' to 'float_t' (aka 'float')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 193, + "startColumn": 16, + "charOffset": 4670, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 191, + "startColumn": 1, + "charOffset": 4603, + "charLength": 145, + "snippet": { + "text": "\tuint16_t size = 0;\r\n\tfor (auto item : itemList) {\r\n\t\tsize += ceil(item.second / (float_t)Item::items[item.first].stackSize);\r\n\t}\r\n\treturn size;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4d1fc7159247346c", + "equalIndicator/v1": "e9d9ed784283a7a3dc76d0c1af07478eab6fc5be6f1a5a223ca06a344d22d88b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1251, + "startColumn": 4, + "charOffset": 56499, + "charLength": 8, + "snippet": { + "text": "itemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1249, + "startColumn": 1, + "charOffset": 56388, + "charLength": 217, + "snippet": { + "text": "\t\t\titemType.wieldInfo = weapon->getWieldInfo();\r\n\t\t\titemType.vocationString = weapon->getVocationString();\r\n\t\t\titemType.minReqLevel = weapon->getReqLevel();\r\n\t\t\titemType.minReqMagicLevel = weapon->getReqMagLv();\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3d32b67d9f745704", + "equalIndicator/v1": "e9ef52f454c78daefb5cd83c8bcc657058f2a5cbae047643a6b9800b7788f5ae" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/save_manager.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 86, + "startColumn": 56, + "charOffset": 2521, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 84, + "startColumn": 1, + "charOffset": 2461, + "charLength": 153, + "snippet": { + "text": "}\r\n\r\nbool SaveManager::doSavePlayer(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tlogger.debug(\"Failed to save player because player is null.\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ac060da41f850f21", + "equalIndicator/v1": "ea0e70fca7a775cbb0386445e7e93b4ab298b02013e7b2e13686c47d286c7d97" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 516, + "startColumn": 38, + "charOffset": 19540, + "charLength": 12, + "snippet": { + "text": "fromCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 514, + "startColumn": 1, + "charOffset": 19455, + "charLength": 153, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, toPos);\r\n\r\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\r\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "70b4c043e91f9cd4", + "equalIndicator/v1": "ea526a15149ab987e09f8a5ccf12ee8400228cbd98cb2379a88a77c900ff2636" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'nick' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'nick' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 299, + "startColumn": 15, + "charOffset": 7799, + "charLength": 4, + "snippet": { + "text": "nick" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 297, + "startColumn": 1, + "charOffset": 7741, + "charLength": 70, + "snippet": { + "text": "\t}\r\n\tvoid setGuildNick(std::string nick) {\r\n\t\tguildNick = nick;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "324b26ed7d4636a3", + "equalIndicator/v1": "ea87a466a1e4fa4a3daa9eef6034fe835ff0ba4a7f7a84696cfd2e98c9292f08" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 18, + "startColumn": 21, + "charOffset": 692, + "charLength": 10, + "snippet": { + "text": "shopVector" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 16, + "startColumn": 1, + "charOffset": 562, + "charLength": 172, + "snippet": { + "text": "\r\nvoid NpcTypeFunctions::createNpcTypeShopLuaTable(lua_State* L, const std::vector &shopVector) {\r\n\tlua_createtable(L, shopVector.size(), 0);\r\n\r\n\tint index = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "61d32b6a8fbc4a3c", + "equalIndicator/v1": "eab0867192389838c1bc688e78716405cb2d9cf13d217604de0d258235f87b2b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 540, + "startColumn": 28, + "charOffset": 16398, + "charLength": 9, + "snippet": { + "text": "getParent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 538, + "startColumn": 1, + "charOffset": 16312, + "charLength": 140, + "snippet": { + "text": "\tbool unregisterCreatureEvent(const std::string &name);\r\n\r\n\tstd::shared_ptr getParent() override final {\r\n\t\treturn getTile();\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "79063744f923f86e", + "equalIndicator/v1": "eab2587d7321ceb0795952b9475f602a2ee9970ba2a5abaa5621e49eb6fe4ff4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3079, + "startColumn": 2, + "charOffset": 94003, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3077, + "startColumn": 1, + "charOffset": 93942, + "charLength": 162, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseQuestLine(NetworkMessage &msg) {\r\n\tuint16_t questId = msg.get();\r\n\tg_game().playerShowQuestLine(player->getID(), questId);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "24c02f61526b791c", + "equalIndicator/v1": "eab3fc214b1f22945d7ba1690ac5d83d21ff95d2135c46a5b82e830109f77a3f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'sscanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead", + "markdown": "'sscanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 3, + "charOffset": 1530, + "charLength": 6, + "snippet": { + "text": "sscanf" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 1488, + "charLength": 318, + "snippet": { + "text": "\t\tint16_t endMonth;\r\n\t\tint16_t endDay;\r\n\t\tsscanf(eventNode.attribute(\"startdate\").as_string(), \"%hd/%hd/%hd\", &startMonth, &startDay, &startYear);\r\n\t\tsscanf(eventNode.attribute(\"enddate\").as_string(), \"%hd/%hd/%hd\", &endMonth, &endDay, &endYear);\r\n\t\tint startDays = ((startYear * 365) + (startMonth * 30) + startDay);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b908b7240d797549", + "equalIndicator/v1": "eac7d1e8d91ba20c2c5152a581c2d00c4fbb9807929c319ca7fa06c8fbedbce1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1707, + "startColumn": 2, + "charOffset": 59600, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1705, + "startColumn": 1, + "charOffset": 59593, + "charLength": 47, + "snippet": { + "text": "\t}\r\n\r\n\tscriptInterface->resetScriptEnv();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3ffd9c3db2cf5a4f", + "equalIndicator/v1": "eacb409dccd8db01257c8eb1662cf50e06e972ca0ee9697005329680451eb13e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use emplace_back instead of push_back", + "markdown": "Use emplace_back instead of push_back" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 589, + "startColumn": 13, + "charOffset": 18417, + "charLength": 9, + "snippet": { + "text": "push_back" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 587, + "startColumn": 1, + "charOffset": 18291, + "charLength": 185, + "snippet": { + "text": "\t\t\tLuaData_t type = getNumber(L, -1);\r\n\t\t\tif (type != LuaData_t::Unknown && type <= LuaData_t::Npc) {\r\n\t\t\t\tindexes.push_back({ i, type });\r\n\t\t\t}\r\n\t\t\tlua_pop(globalState, 2);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9f7c4b1423c33a25", + "equalIndicator/v1": "ead804fcb54aaaa4e645b49f073c6d3d3918f213782cf5d398613acbf57aeb21" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 301, + "startColumn": 17, + "charOffset": 7757, + "charLength": 14, + "snippet": { + "text": "startCondition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 299, + "startColumn": 1, + "charOffset": 7736, + "charLength": 119, + "snippet": { + "text": "}\r\n\r\nbool Condition::startCondition(std::shared_ptr) {\r\n\tif (ticks > 0) {\r\n\t\tendTime = ticks + OTSYS_TIME();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "56206bce903f040c", + "equalIndicator/v1": "eade5552d4fa9df46b2b4c44f52830abdbf899f9e01c5924696affd922155696" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 193, + "startColumn": 2, + "charOffset": 5372, + "charLength": 7, + "snippet": { + "text": "int32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 191, + "startColumn": 1, + "charOffset": 5365, + "charLength": 192, + "snippet": { + "text": "\t}\r\n\r\n\tint32_t index = getNumber(L, 3, INDEX_WHEREEVER);\r\n\tuint32_t flags = getNumber(L, 4, 0);\r\n\tReturnValue ret = g_game().internalAddItem(container, item, index, flags);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "27569699b2234573", + "equalIndicator/v1": "eae63c416f0c33ed646e41879fd3ebd58dcf1930da315bd53779e34af80cfdcd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 974, + "startColumn": 31, + "charOffset": 29127, + "charLength": 8, + "snippet": { + "text": "interval" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 972, + "startColumn": 1, + "charOffset": 29057, + "charLength": 122, + "snippet": { + "text": "\r\n\t\t\tif (m_targetChangeCooldown > 0) {\r\n\t\t\t\tm_targetChangeCooldown -= interval;\r\n\r\n\t\t\t\tif (m_targetChangeCooldown <= 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c3b844240615f728", + "equalIndicator/v1": "eb03549e794d30ab612f75f7a5068fddb55ebc50b7d761b75c145bca4280de63" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7560, + "startColumn": 26, + "charOffset": 263531, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7558, + "startColumn": 1, + "charOffset": 263463, + "charLength": 282, + "snippet": { + "text": "// Mana leech\r\nvoid Game::applyManaLeech(\r\n\tstd::shared_ptr attackerPlayer, std::shared_ptr targetMonster, std::shared_ptr target, const CombatDamage &damage, const int32_t &realDamage\r\n) const {\r\n\t// Wheel of destiny bonus - mana leech chance and amount\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6b54e1fc1fa8acc2", + "equalIndicator/v1": "eb08632965d769a4344b4f89464db67cdb3ca419ed28c6e7a0226254b0038c19" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 80, + "startColumn": 48, + "charOffset": 2413, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 78, + "startColumn": 1, + "charOffset": 2361, + "charLength": 96, + "snippet": { + "text": "}\r\n\r\nbool Party::leaveParty(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f0d2570db5bb8522", + "equalIndicator/v1": "eb0cf57b4a2ec706820b7d7c426c938039da1f7383a4f749072f917cd7b17d1b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 716, + "startColumn": 15, + "charOffset": 23249, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 714, + "startColumn": 1, + "charOffset": 23209, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 48) * 2.05f) + 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "82ecc6eed30070fc", + "equalIndicator/v1": "eb16cca0935b6b21c7e90ce2d2433d5275049c25053e99872dde27d521717071" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 837, + "startColumn": 7, + "charOffset": 30224, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 835, + "startColumn": 1, + "charOffset": 30212, + "charLength": 156, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnMoveCreature - \"\r\n\t\t \"Player {} creature {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9a65781743f725ba", + "equalIndicator/v1": "eb2c33c1d66054b295a9119a71897797de5406392f9489b8437e29248580bb3b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 482, + "startColumn": 57, + "charOffset": 17183, + "charLength": 5, + "snippet": { + "text": "party" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 480, + "startColumn": 1, + "charOffset": 17122, + "charLength": 153, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPartyOnDisband(std::shared_ptr party) {\r\n\t// Party:onDisband() or Party.onDisband(self)\r\n\tif (info.partyOnDisband == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c9cc8a5f285bdd31", + "equalIndicator/v1": "eb5090b1411693450090981cfe1d0436019e5c99f623db1631f540a05aa13663" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1412, + "startColumn": 16, + "charOffset": 41563, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1410, + "startColumn": 1, + "charOffset": 41487, + "charLength": 87, + "snippet": { + "text": "\r\nvoid Player::setImbuingItem(std::shared_ptr item) {\r\n\timbuingItem = item;\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c2c0e5f672bc96f4", + "equalIndicator/v1": "eba16c7b04e76d38a35f75acf176bbcfbb8bfa7314ed36938b2e575d2317f90c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'rewardId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'rewardId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 798, + "startColumn": 36, + "charOffset": 21579, + "charLength": 14, + "snippet": { + "text": "const uint64_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 796, + "startColumn": 1, + "charOffset": 21504, + "charLength": 224, + "snippet": { + "text": "\tvoid removeConditionSuppressions();\r\n\r\n\tstd::shared_ptr getReward(const uint64_t rewardId, const bool autoCreate);\r\n\tvoid removeReward(uint64_t rewardId);\r\n\tvoid getRewardList(std::vector &rewards) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "49f2e966947566be", + "equalIndicator/v1": "ebafdfea646b9e9a4c4b5739c097b197c4a5a6e1bad0308676ea7d617e203e55" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 461, + "startColumn": 83, + "charOffset": 13749, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 459, + "startColumn": 1, + "charOffset": 13662, + "charLength": 202, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::AddItemField(std::shared_ptr item, std::shared_ptr, const Position &) {\r\n\tif (item == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::AddItemField] - Item is nullptr\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b3b664717cade792", + "equalIndicator/v1": "ebb50ce8c743d140b11f533c8e53a41a3ee76293c5fd71688b2745de2ce31001" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 119, + "startColumn": 49, + "charOffset": 4052, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 117, + "startColumn": 1, + "charOffset": 3999, + "charLength": 168, + "snippet": { + "text": "}\r\n\r\nbool Mailbox::getReceiver(std::shared_ptr item, std::string &name) const {\r\n\tstd::shared_ptr container = item->getContainer();\r\n\tif (container) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "70e59878ecd936c6", + "equalIndicator/v1": "ebd42f3ee77a4718ab701feb6dac800d0e9fcd0e720abc6b73be678574188a0c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 600, + "startColumn": 52, + "charOffset": 17451, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 598, + "startColumn": 1, + "charOffset": 17394, + "charLength": 172, + "snippet": { + "text": "\t}\r\n\r\n\tstatic uint32_t countByType(std::shared_ptr item, int32_t subType) {\r\n\t\tif (subType == -1 || subType == item->getSubType()) {\r\n\t\t\treturn item->getItemCount();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "74599e21ad898141", + "equalIndicator/v1": "ebe667ab41d77bd45e13f5a00074f98a036631516cbf9d85b9721cc4283943cb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6311, + "startColumn": 49, + "charOffset": 185016, + "charLength": 8, + "snippet": { + "text": "vocation" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6309, + "startColumn": 1, + "charOffset": 184798, + "charLength": 335, + "snippet": { + "text": "\t\tcondition->setParam(CONDITION_PARAM_HEALTHGAIN, vocation->getHealthGainAmount());\r\n\t\tcondition->setParam(CONDITION_PARAM_HEALTHTICKS, vocation->getHealthGainTicks());\r\n\t\tcondition->setParam(CONDITION_PARAM_MANAGAIN, vocation->getManaGainAmount());\r\n\t\tcondition->setParam(CONDITION_PARAM_MANATICKS, vocation->getManaGainTicks());\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "395796f78db9caab", + "equalIndicator/v1": "ebf3473cc768d0de31f18a99947eb8c8543c2cedd141e70c3274583572e1fada" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1741, + "startColumn": 7, + "charOffset": 51925, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1739, + "startColumn": 1, + "charOffset": 51873, + "charLength": 356, + "snippet": { + "text": "\tvoid onThink(uint32_t interval) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ebf2f2597e594acd", + "equalIndicator/v1": "ec09ac782114f763c4893e98ee1a890ccf65e5659ae6d05a890b5094c252b0b1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 581, + "startColumn": 52, + "charOffset": 17534, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 579, + "startColumn": 1, + "charOffset": 17436, + "charLength": 137, + "snippet": { + "text": "\r\n\t\t\tif (it.abilities->getManaTicks() != 0) {\r\n\t\t\t\tcondition->setParam(CONDITION_PARAM_MANATICKS, it.abilities->getManaTicks());\r\n\t\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "51112c13fd75f8c0", + "equalIndicator/v1": "ec1c10919d1de58f728982d18962e28e064ccafeced3470b960eb56c763c24f5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 448, + "startColumn": 8, + "charOffset": 11142, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 446, + "startColumn": 1, + "charOffset": 11044, + "charLength": 214, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetAmmoType(lua_State* L) {\r\n\t// itemType:getAmmoType()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->ammoType);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1cc2d052ca5332db", + "equalIndicator/v1": "ec32e983379b526ecbcfa3d159c07cbdf4e04b0c7e23b187247f2795ce157284" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 710, + "startColumn": 15, + "charOffset": 23035, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 708, + "startColumn": 1, + "charOffset": 22995, + "charLength": 132, + "snippet": { + "text": "\t\t\t\tcase 1:\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 73) * 1.35f) + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "aaf6264be038a212", + "equalIndicator/v1": "ec6366c0637a57777aba95d3c8be63454ac04d416e5f2feb9a6cd220f413ba54" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 581, + "startColumn": 27, + "charOffset": 27564, + "charLength": 13, + "snippet": { + "text": "absorbPercent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 579, + "startColumn": 1, + "charOffset": 27409, + "charLength": 435, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += value;\r\n\t} else if (stringValue == \"absorbpercentenergy\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentfire\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "01de480c2c4b154f", + "equalIndicator/v1": "ec65b2e13b8eb4c667c7ddaf4e3ad1322de4ee670097ca005d13d7c5df3a0653" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 693, + "startColumn": 15, + "charOffset": 22635, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 691, + "startColumn": 1, + "charOffset": 22595, + "charLength": 101, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tchance = std::min(skill, 45) * 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e78dcccb0189324b", + "equalIndicator/v1": "ec6c3c3e6609b07c78edfbddc93895da563807dd1259df176bc58864e50fba15" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'newGroup' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'newGroup' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 535, + "startColumn": 11, + "charOffset": 14605, + "charLength": 8, + "snippet": { + "text": "newGroup" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 533, + "startColumn": 1, + "charOffset": 14542, + "charLength": 121, + "snippet": { + "text": "\r\n\tvoid setGroup(std::shared_ptr newGroup) {\r\n\t\tgroup = newGroup;\r\n\t}\r\n\tstd::shared_ptr getGroup() const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ffd1621a2943d7b5", + "equalIndicator/v1": "ec7c9cba6f6008373ce095f401b580f3de99d9ccee54994c5d0053ff3ab94384" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 359, + "startColumn": 53, + "charOffset": 10361, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 357, + "startColumn": 1, + "charOffset": 10304, + "charLength": 159, + "snippet": { + "text": "}\r\n\r\nbool Container::isHoldingItem(std::shared_ptr item) {\r\n\tfor (ContainerIterator it = iterator(); it.hasNext(); it.advance()) {\r\n\t\tif (*it == item) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3a53aae330e890e2", + "equalIndicator/v1": "ec883ca982af98156587974bb8d3b665948f0a38c01a61e745e21049b5a269a6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 830, + "startColumn": 57, + "charOffset": 26957, + "charLength": 11, + "snippet": { + "text": "attackSkill" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 828, + "startColumn": 1, + "charOffset": 26854, + "charLength": 182, + "snippet": { + "text": "\r\n\tint32_t minValue = player->getLevel() / 5;\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue);\r\n\tif (maxDamage) {\r\n\t\treturn -maxValue;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "57149693a593a67b", + "equalIndicator/v1": "eca9dc8bbf21abbf2d899cb9013f2bc62722d28d350b4d67f30e44fd3f0a5b82" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6461, + "startColumn": 63, + "charOffset": 203711, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6459, + "startColumn": 1, + "charOffset": 203644, + "charLength": 131, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendPlayerVocation(std::shared_ptr target) {\r\n\tif (!player || !target || oldProtocol) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "29291ba7c4978e80", + "equalIndicator/v1": "ecc808091c90c787b894d4130c4925e15c41f2689051078c8d624a973b4928f3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 212, + "startColumn": 20, + "charOffset": 6697, + "charLength": 21, + "snippet": { + "text": "luaGameGetPlayerCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 210, + "startColumn": 1, + "charOffset": 6673, + "charLength": 139, + "snippet": { + "text": "}\r\n\r\nint GameFunctions::luaGameGetPlayerCount(lua_State* L) {\r\n\t// Game.getPlayerCount()\r\n\tlua_pushnumber(L, g_game().getPlayersOnline());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "88339eeea3b8cfd2", + "equalIndicator/v1": "eccb77372d1415a68422fe4a2b9ef49c9b956942d88ed6047cc371c7d9575480" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 320, + "startColumn": 54, + "charOffset": 9394, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 318, + "startColumn": 1, + "charOffset": 9336, + "charLength": 124, + "snippet": { + "text": "}\r\n\r\nint32_t Player::getWeaponSkill(std::shared_ptr item) const {\r\n\tif (!item) {\r\n\t\treturn getSkillLevel(SKILL_FIST);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "650a174783e0e6e8", + "equalIndicator/v1": "ecf6d3f5232963177e932db81a47363dab56377102e29c5b39ad7b1cf11cad83" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 122, + "startColumn": 21, + "charOffset": 3860, + "charLength": 32, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 120, + "startColumn": 1, + "charOffset": 3707, + "charLength": 377, + "snippet": { + "text": "\r\n\tbool registerEvent(const std::shared_ptr moveEvent, int32_t id, std::map &moveListMap) const;\r\n\tbool registerEvent(const std::shared_ptr moveEvent, const Position &position, std::map &moveListMap) const;\r\n\tstd::shared_ptr getEvent(const std::shared_ptr &tile, MoveEvent_t eventType);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6a6587e657833927", + "equalIndicator/v1": "ed0761012445034b4ab7b4e8b6cc864699a435c5104506a7361e766adbfe3b55" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4449, + "startColumn": 124, + "charOffset": 160219, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4447, + "startColumn": 1, + "charOffset": 160091, + "charLength": 248, + "snippet": { + "text": "}\r\n\r\nvoid Game::unwrapItem(std::shared_ptr item, uint16_t unWrapId, std::shared_ptr house, std::shared_ptr player) {\r\n\tif (item->hasOwner() && !item->isOwner(player)) {\r\n\t\tplayer->sendCancelMessage(RETURNVALUE_ITEMISNOTYOURS);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2f93a8439a4aca5e", + "equalIndicator/v1": "ed0a60e3bea0fe0b4c33633a4105748a7e42765a6d5f4b38ef195c8bdbecb4f3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 349, + "startColumn": 7, + "charOffset": 13037, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 347, + "startColumn": 1, + "charOffset": 12859, + "charLength": 310, + "snippet": { + "text": "\r\nvoid EventCallback::playerOnLook(std::shared_ptr player, const Position &position, std::shared_ptr thing, uint8_t stackpos, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLook - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f4db5e5883498e6b", + "equalIndicator/v1": "ed1a53159f9ea05b64afdef7c44383eff7a5f0210b1b5df1c96c8501e61bd942" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Iter', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Iter', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/vectorset.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 77, + "startColumn": 35, + "charOffset": 2039, + "charLength": 5, + "snippet": { + "text": "_Iter" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 75, + "startColumn": 1, + "charOffset": 1998, + "charLength": 164, + "snippet": { + "text": "\t\t}\r\n\r\n\t\ttemplate \r\n\t\tconstexpr auto insert(std::vector::const_iterator _Where, _Iter _First, _Iter _Last) {\r\n\t\t\tneedUpdate = true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5e9a76d70d9d50ec", + "equalIndicator/v1": "ed25b49314ca36d4a4308bedd58aaf401aa8dbc70db821af811e68ac8019fed3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8119, + "startColumn": 82, + "charOffset": 255741, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8117, + "startColumn": 1, + "charOffset": 255655, + "charLength": 185, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::MoveUpCreature(NetworkMessage &msg, std::shared_ptr creature, const Position &newPos, const Position &oldPos) {\r\n\tif (creature != player) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "47df83ef147ad791", + "equalIndicator/v1": "ed3058b7df75663459e49587e7e2519ab60d3be3ee800c548eb96a17ea0ccb08" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'message' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'message' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1586, + "startColumn": 45, + "charOffset": 47252, + "charLength": 7, + "snippet": { + "text": "message" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1584, + "startColumn": 1, + "charOffset": 47085, + "charLength": 237, + "snippet": { + "text": "\tvoid onClearImbuement(std::shared_ptr item, uint8_t slot);\r\n\tvoid openImbuementWindow(std::shared_ptr item);\r\n\tvoid sendImbuementResult(const std::string message) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendImbuementResult(message);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "99083de4f492d607", + "equalIndicator/v1": "ed53aa3140a065d63c1f95426d3cd51f79f2b69d37e4f8ba162afdf42b3baba9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 755, + "startColumn": 19, + "charOffset": 22984, + "charLength": 48, + "snippet": { + "text": "-static_cast(replacedItem->getWeight())" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 753, + "startColumn": 1, + "charOffset": 22905, + "charLength": 179, + "snippet": { + "text": "\titemlist[index] = item;\r\n\titem->setParent(getContainer());\r\n\tupdateItemWeight(-static_cast(replacedItem->getWeight()) + item->getWeight());\r\n\r\n\t// send change to client\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b74d1642e688b356", + "equalIndicator/v1": "ed83a4a018e06f89fa74f4efa9eaf2d1bf29e845452c164fe6caf6aa71779043" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3064, + "startColumn": 2, + "charOffset": 93443, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3062, + "startColumn": 1, + "charOffset": 93374, + "charLength": 180, + "snippet": { + "text": "\r\nvoid ProtocolGame::parseRevokePartyInvite(NetworkMessage &msg) {\r\n\tuint32_t targetId = msg.get();\r\n\tg_game().playerRevokePartyInvitation(player->getID(), targetId);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "785849dc6622cbdb", + "equalIndicator/v1": "ed8506c863afd8a3f5d2acb832485046a3d5a922667ea11ad21cd15d013c28d1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 11, + "charOffset": 1336, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1259, + "charLength": 272, + "snippet": { + "text": "\tcurrentOutfit = mType->info.outfit;\r\n\tskull = mType->info.skull;\r\n\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c80fa09f90f8ae34", + "equalIndicator/v1": "edfd23abf47f8e76aa7ba7fc3aa8d79617af7f6606d295bf5260643fa83ac4f7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 326, + "startColumn": 7, + "charOffset": 12099, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 324, + "startColumn": 1, + "charOffset": 11975, + "charLength": 263, + "snippet": { + "text": "// Player\r\nbool EventCallback::playerOnBrowseField(std::shared_ptr player, const Position &position) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnBrowseField - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a323ec5ee9f279e8", + "equalIndicator/v1": "edfed2ab7f78587543029da491c974652f9cc2f2da30e1e287ee6c8c0e75a255" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7542, + "startColumn": 66, + "charOffset": 262634, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7540, + "startColumn": 1, + "charOffset": 262539, + "charLength": 225, + "snippet": { + "text": "\r\nvoid Game::applyCharmRune(\r\n\tstd::shared_ptr targetMonster, std::shared_ptr attackerPlayer, std::shared_ptr target, const int32_t &realDamage\r\n) const {\r\n\tif (!targetMonster || !attackerPlayer) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6493cf596980ff30", + "equalIndicator/v1": "ee08b67dd0490aecbf97b87ccd4db42c5d080bec786706f242d3fa5a1eb42e02" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2242, + "startColumn": 39, + "charOffset": 64358, + "charLength": 34, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2240, + "startColumn": 1, + "charOffset": 64263, + "charLength": 219, + "snippet": { + "text": "\t// Task hunting system\r\n\tvoid initializeTaskHunting();\r\n\tbool isCreatureUnlockedOnTaskHunting(const std::shared_ptr mtype) const;\r\n\r\n\tbool setTaskHuntingSlotClass(std::unique_ptr &slot) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b5b796ad0453aa1b", + "equalIndicator/v1": "ee1c7be6c281f4984074602bcf700db74837a7c3a012de554d82af299aba9fd6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first.", + "markdown": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 703, + "startColumn": 15, + "charOffset": 22900, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 701, + "startColumn": 1, + "charOffset": 22859, + "charLength": 74, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tchance = it.hitChance;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6828352bf2e97cf0", + "equalIndicator/v1": "ee29fcc6106e3c396e8eef04b6fc447c4fe01f1c865a098df7a5ae02f00cc88f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int64_t' (aka 'long long') is implementation-defined", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int64_t' (aka 'long long') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/ban.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 34, + "startColumn": 21, + "charOffset": 1034, + "charLength": 11, + "snippet": { + "text": "currentTime" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 32, + "startColumn": 1, + "charOffset": 1008, + "charLength": 134, + "snippet": { + "text": "\t}\r\n\r\n\tint64_t timeDiff = currentTime - connectBlock.lastAttempt;\r\n\tconnectBlock.lastAttempt = currentTime;\r\n\tif (timeDiff <= 5000) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "20ab6e96065def51", + "equalIndicator/v1": "ee2c00dcff5feae2af27ea5db91a8a7d894c079d863badbf94f28e341f003ee2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6618, + "startColumn": 30, + "charOffset": 229430, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6616, + "startColumn": 1, + "charOffset": 229360, + "charLength": 193, + "snippet": { + "text": "\t\t\t\tdamageIncreaseMessage = true;\r\n\t\t\t}\r\n\t\t\tdamage.secondary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\r\n\t\t}\r\n\t\tdamage.secondary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "59d4dd1abb589d99", + "equalIndicator/v1": "ee4a7710e5f92816b671b9415eb5cb567dcb3a9929bc2c46d389498ac3e7cc93" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 613, + "startColumn": 7, + "charOffset": 21817, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 611, + "startColumn": 1, + "charOffset": 21805, + "charLength": 148, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnLookInBattleList - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6f58d0c4bcaaa43e", + "equalIndicator/v1": "ee4ef6f4d087f10efc6b04c11ad11e68ec6d8130e18164f4b5265f7ab858e09c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?", + "markdown": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2233, + "startColumn": 7, + "charOffset": 61445, + "charLength": 25, + "snippet": { + "text": "Condition::startCondition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2231, + "startColumn": 1, + "charOffset": 61358, + "charLength": 147, + "snippet": { + "text": "\r\nbool ConditionInvisible::startCondition(std::shared_ptr creature) {\r\n\tif (!Condition::startCondition(creature)) {\r\n\t\treturn false;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9f202d907bab44dd", + "equalIndicator/v1": "ee68b41a252821e18820e5f2704a23fdc5a1107889fb11d74282a12df979e41c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 138, + "startColumn": 6, + "charOffset": 4784, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 136, + "startColumn": 1, + "charOffset": 4750, + "charLength": 208, + "snippet": { + "text": "\r\n\tReturnValue returnValue;\r\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\r\n\t\treturnValue = RETURNVALUE_NOTPOSSIBLE;\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dd25bce6fb2d8121", + "equalIndicator/v1": "ee86c94051fe3b4223f3588e56e4bd51c92637e983d15ab1a56b0e82edf73984" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 700, + "startColumn": 121, + "charOffset": 23006, + "charLength": 18, + "snippet": { + "text": "spellGroupCooldown" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 698, + "startColumn": 1, + "charOffset": 22848, + "charLength": 253, + "snippet": { + "text": "\t\t}\r\n\t\tif (spellGroupCooldown > 0) {\r\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLGROUPCOOLDOWN, spellGroupCooldown / rateCooldown, 0, false, group);\r\n\t\t\tplayer->addCondition(condition);\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "db98d9708b78c328", + "equalIndicator/v1": "ee88a6628a17b37f802bc68bd9274b1d2a0084014d4e255afda4c49cbe390d07" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use emplace_back instead of push_back", + "markdown": "Use emplace_back instead of push_back" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 138, + "startColumn": 18, + "charOffset": 4288, + "charLength": 9, + "snippet": { + "text": "push_back" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 136, + "startColumn": 1, + "charOffset": 4165, + "charLength": 293, + "snippet": { + "text": "\t\t\tfor (auto subContItem : subContainer) {\r\n\t\t\t\tstd::shared_ptr containerItem = subContItem.first;\r\n\t\t\t\ttoReturnList.push_back(std::pair, uint32_t>(containerItem, static_cast(containerItem->getItemCount())));\r\n\t\t\t}\r\n\t\t} else if (item->isItemStorable()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f7540cd2f07e198c", + "equalIndicator/v1": "ee94b484986d4d9e7403b7f5ef62254beb531187364aa58cf6937302573bf4b6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 363, + "startColumn": 14, + "charOffset": 8969, + "charLength": 12, + "snippet": { + "text": "std::toupper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 361, + "startColumn": 1, + "charOffset": 8930, + "charLength": 101, + "snippet": { + "text": "\t\t\t\tresult += ' ';\r\n\t\t\t}\r\n\t\t\tresult += std::toupper(ch);\r\n\t\t} else {\r\n\t\t\tresult += std::tolower(ch);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c7c4bee5bb823759", + "equalIndicator/v1": "eed27725f30837d856ceb1dde81d5155ccc4a7c2c5bd1d6d93e4dfd29fb9dd74" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 333, + "startColumn": 10, + "charOffset": 10959, + "charLength": 16, + "snippet": { + "text": "(fee * 75) / 100" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 331, + "startColumn": 1, + "charOffset": 10869, + "charLength": 115, + "snippet": { + "text": "\t\tint32_t fee = player->getLevel() * 100;\r\n\t\tif (player->hasCharmExpansion()) {\r\n\t\t\tfee = (fee * 75) / 100;\r\n\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8cc8b244afd1aeac", + "equalIndicator/v1": "eed55b8322f7a4796d5a9e03f21605740f83f40b3a365ad8b41d00eca4b643fa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 275, + "startColumn": 30, + "charOffset": 7816, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 273, + "startColumn": 1, + "charOffset": 7719, + "charLength": 213, + "snippet": { + "text": "\tItemDeque storeInboxFilteredList;\r\n\tif (isStoreInboxFiltered()) {\r\n\t\tfor (std::shared_ptr item : getItemList()) {\r\n\t\t\tauto itemId = item->getID();\r\n\t\t\tauto attribute = item->getCustomAttribute(\"unWrapId\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8de587fe8961a0bd", + "equalIndicator/v1": "eef49e896e43114f9016dd32d21f27523fe7792d3873e6e41c2b7b5f4a505ed1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'float'", + "markdown": "Narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 160, + "startColumn": 33, + "charOffset": 4686, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 158, + "startColumn": 1, + "charOffset": 4516, + "charLength": 227, + "snippet": { + "text": "\tstd::shared_ptr condition = getUserdataShared(L, 1)->dynamic_self_cast();\r\n\tif (condition) {\r\n\t\tcondition->setFormulaVars(mina, minb, maxa, maxb);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f996c0d2ae93ab81", + "equalIndicator/v1": "ef2e45a6c80e817e53677e904cc8e7afc31329e0fd0090ec470f1bdb76d21363" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2196, + "startColumn": 14, + "charOffset": 65818, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2194, + "startColumn": 1, + "charOffset": 65741, + "charLength": 156, + "snippet": { + "text": "\r\n\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\r\n\tremoveIcon(\"forge\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "67ade26b2aa4b6a4", + "equalIndicator/v1": "ef408170792058d481482ab8352d36c4c765c7b3c0725ad90ff0b7469b49ef95" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'instant' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'instant' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 61, + "startColumn": 84, + "charOffset": 1975, + "charLength": 7, + "snippet": { + "text": "instant" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 59, + "startColumn": 1, + "charOffset": 1821, + "charLength": 209, + "snippet": { + "text": "\t[[nodiscard]] bool hasInstantSpell(const std::string &word) const;\r\n\r\n\tvoid setInstantSpell(const std::string &word, const std::shared_ptr instant) {\r\n\t\tinstants.try_emplace(word, instant);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5289e10489c7d7f4", + "equalIndicator/v1": "ef50b36e95a73dee987f3afda0acb86894369f67bbaf1d133762200b0aa76573" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 426, + "startColumn": 36, + "charOffset": 12509, + "charLength": 4, + "snippet": { + "text": "info" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 424, + "startColumn": 1, + "charOffset": 12424, + "charLength": 137, + "snippet": { + "text": "\tif (monsterType) {\r\n\t\tif (lua_gettop(L) == 1) {\r\n\t\t\tlua_createtable(L, monsterType->info.enemyFactions.size(), 0);\r\n\t\t\tint index = 0;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7624c119a5710d7a", + "equalIndicator/v1": "ef52564861f6d1905da70c665227c9364103574525ef0e2cd5880c0f34ffd013" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 786, + "startColumn": 84, + "charOffset": 25572, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 784, + "startColumn": 1, + "charOffset": 25484, + "charLength": 210, + "snippet": { + "text": "}\r\n\r\nvoid Combat::CombatDispelFunc(std::shared_ptr, std::shared_ptr target, const CombatParams ¶ms, CombatDamage*) {\r\n\tif (target) {\r\n\t\ttarget->removeCombatCondition(params.dispelType);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9bf9f21492a54484", + "equalIndicator/v1": "ef8a9f6aab28f9434b61bf25abb22bf63c9255b53271481a9e22413cd641079d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 664, + "startColumn": 15, + "charOffset": 21716, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 662, + "startColumn": 1, + "charOffset": 21676, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 2.40f) + 8;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "acd68f015a76a060", + "equalIndicator/v1": "efc57ee074aa4a8e5b7d32ed69f82b28dc073267786a9e5a148e308bb35d95a8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 158, + "startColumn": 11, + "charOffset": 5124, + "charLength": 16, + "snippet": { + "text": "getItemTypeCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 156, + "startColumn": 1, + "charOffset": 5021, + "charLength": 365, + "snippet": { + "text": "\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::map &getAllItemTypeCount(std::map &countMap) const override final;\r\n\tstd::shared_ptr getThing(size_t index) const override final;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "24cc1db14c66aae3", + "equalIndicator/v1": "efd1f012d1dd57e4fba285ed93373c31f1bb94555e43f368c7048fe7dc4073bd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 225, + "startColumn": 28, + "charOffset": 7252, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 223, + "startColumn": 1, + "charOffset": 7218, + "charLength": 138, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\t\tenv->setScriptId(mType->info.creatureMoveEvent, scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "42e91edc9cbede7c", + "equalIndicator/v1": "f00887c58037fb71b2099a195ab46521e6ba6e9d80af7a892b32af9307feb364" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 140, + "startColumn": 3, + "charOffset": 3775, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 138, + "startColumn": 1, + "charOffset": 3766, + "charLength": 120, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tuint32_t guid = getNumber(L, 2, 0);\r\n\t\thouse->setNewOwnerGuid(guid, false);\r\n\t\tpushBoolean(L, true);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a8a06fd74583b0ef", + "equalIndicator/v1": "f02834b5acdb5648b922beca1df71f62d55c00b8dd62cbba6bb39a02c8c024f2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6844, + "startColumn": 72, + "charOffset": 236889, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6842, + "startColumn": 1, + "charOffset": 236813, + "charLength": 238, + "snippet": { + "text": "}\r\n\r\nfloat Game::pvpLevelDifferenceDamageMultiplier(std::shared_ptr attacker, std::shared_ptr target) {\r\n\tint32_t levelDifference = target->getLevel() - attacker->getLevel();\r\n\tlevelDifference = std::abs(levelDifference);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1a06c90490aa67f4", + "equalIndicator/v1": "f02acac470f5463d0994a3e866b5d9b5362c14ac3053100ec760b3e488891a2f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1633, + "startColumn": 59, + "charOffset": 57186, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1631, + "startColumn": 1, + "charOffset": 57062, + "charLength": 249, + "snippet": { + "text": "//**********************************************************//\r\n\r\nvoid TileCallback::onTileCombat(std::shared_ptr creature, std::shared_ptr tile) const {\r\n\t// onTileCombat(creature, pos)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6011d80201b150ec", + "equalIndicator/v1": "f0405ef2ac7e2906b2d699b56ea4777840fb87a4e1ffbf38e3279641e751b8d8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 818, + "startColumn": 15, + "charOffset": 24834, + "charLength": 8, + "snippet": { + "text": "dropLoot" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 816, + "startColumn": 1, + "charOffset": 24803, + "charLength": 155, + "snippet": { + "text": "\t\treturn 0;\r\n\t}\r\n\tvirtual void dropLoot(std::shared_ptr, std::shared_ptr) { }\r\n\tvirtual uint16_t getLookCorpse() const {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "420d0b755a3a9a82", + "equalIndicator/v1": "f0469f6b50eb05d1149e1c57d3efbf8b5531d31a4f56094d4deb8a8bbb750cc1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 127, + "startColumn": 32, + "charOffset": 4085, + "charLength": 16, + "snippet": { + "text": "m_appearancesPtr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 125, + "startColumn": 1, + "charOffset": 3891, + "charLength": 314, + "snippet": { + "text": "\tbool supportAnimation = g_configManager().getBoolean(OLD_PROTOCOL, __FUNCTION__);\r\n\tfor (uint32_t it = 0; it < g_game().m_appearancesPtr->object_size(); ++it) {\r\n\t\tAppearance object = g_game().m_appearancesPtr->object(it);\r\n\r\n\t\t// This scenario should never happen but on custom assets this can break the loader.\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5fcf700ea14b8938", + "equalIndicator/v1": "f04b1961a588a4267a3ea17294fbe99d91cec274bc65c0632d514dc0819f8bd8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1809, + "startColumn": 3, + "charOffset": 54519, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1807, + "startColumn": 1, + "charOffset": 54416, + "charLength": 274, + "snippet": { + "text": "\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\r\n\t\tPosition pos = msg.getPosition();\r\n\t\tuint16_t itemId = msg.get();\r\n\t\tuint8_t stackpos = msg.getByte();\r\n\t\tg_game().playerSetManagedContainer(player->getID(), category, pos, itemId, stackpos, true);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f217a8c72447b590", + "equalIndicator/v1": "f06b73f82ef9c31663ec98d69dc2016cdef5e0b73b2cf29375b5604adbcaebf4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to 'float'", + "markdown": "Narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 563, + "startColumn": 63, + "charOffset": 15144, + "charLength": 23, + "snippet": { + "text": "(statsPercent[i] - 100)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 561, + "startColumn": 1, + "charOffset": 15038, + "charLength": 155, + "snippet": { + "text": "\t\tswitch (i) {\r\n\t\t\tcase STAT_MAXHITPOINTS:\r\n\t\t\t\tstats[i] = static_cast(player->getMaxHealth() * ((statsPercent[i] - 100) / 100.f));\r\n\t\t\t\tbreak;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6bf92b9fab714b5f", + "equalIndicator/v1": "f07a28f4f3b8a70b9af89ae8d621106aca58f0fdac4ccb7b00d3a6b53404c192" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 811, + "startColumn": 53, + "charOffset": 24731, + "charLength": 4, + "snippet": { + "text": "size" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 809, + "startColumn": 1, + "charOffset": 24673, + "charLength": 89, + "snippet": { + "text": "\t}\r\n\r\n\tlua_createtable(L, monsterType->info.defenseSpells.size(), 0);\r\n\r\n\tint index = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7ae7f85d631d0cb9", + "equalIndicator/v1": "f0820593b4cdfac8c2af90232722e836c1ac6478a97a04ba92bce83c4c2078f3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 548, + "startColumn": 38, + "charOffset": 20932, + "charLength": 10, + "snippet": { + "text": "toCylinder" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 546, + "startColumn": 1, + "charOffset": 20840, + "charLength": 152, + "snippet": { + "text": "\r\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\r\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\r\n\r\n\tgetScriptInterface()->callVoidFunction(7);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75e7750937f18639", + "equalIndicator/v1": "f088164b8c00a017d336df424201a8d4a4d4eadec0afb0b33a0eb8c8531c08c4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/inbox/inbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 20, + "charOffset": 624, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 600, + "charLength": 160, + "snippet": { + "text": "}\r\n\r\nReturnValue Inbox::queryAdd(int32_t, const std::shared_ptr &thing, uint32_t, uint32_t flags, std::shared_ptr) {\r\n\tint32_t addCount = 0;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4cf1808c3c9c713e", + "equalIndicator/v1": "f09b7575dfdff18fad7588c23a6884960ad8948dec9dce798bf86971ef50680a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 380, + "startColumn": 75, + "charOffset": 11229, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 378, + "startColumn": 1, + "charOffset": 11150, + "charLength": 227, + "snippet": { + "text": "}\r\n\r\nvoid House::handleContainer(ItemList &moveItemList, std::shared_ptr item) const {\r\n\tif (const auto container = item->getContainer()) {\r\n\t\tfor (const std::shared_ptr &containerItem : container->getItemList()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "65f9bf505589631a", + "equalIndicator/v1": "f0abf57a25d35daef24e8408494bc628cfd5448c0c9825f6f0dea281f12ad6db" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 254, + "startColumn": 7, + "charOffset": 9349, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 252, + "startColumn": 1, + "charOffset": 9237, + "charLength": 244, + "snippet": { + "text": "\r\nbool EventCallback::partyOnLeave(std::shared_ptr party, std::shared_ptr player) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::partyOnLeave - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d31039a2cf7285bc", + "equalIndicator/v1": "f0b09c35af1c3bfbbaa430eaae9a08259b68b15e6575a44e7b0eb91e1223247d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'remParty' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'remParty' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5707, + "startColumn": 59, + "charOffset": 168637, + "charLength": 8, + "snippet": { + "text": "remParty" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5705, + "startColumn": 1, + "charOffset": 168574, + "charLength": 119, + "snippet": { + "text": "}\r\n\r\nvoid Player::removePartyInvitation(std::shared_ptr remParty) {\r\n\tstd::erase(invitePartyList, remParty);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "244ce201da13adcd", + "equalIndicator/v1": "f0be8d29d7b3fe65a20f0fa79d789d37b620f39554167a372641660e218a7d90" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2289, + "startColumn": 60, + "charOffset": 87212, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2287, + "startColumn": 1, + "charOffset": 87148, + "charLength": 244, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::internalRemoveItem(std::shared_ptr item, int32_t count /*= -1*/, bool test /*= false*/, uint32_t flags /*= 0*/, bool force /*= false*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (item == nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "979e01d1b771cdd7", + "equalIndicator/v1": "f0c6e31457bd45c8bb34a85a8697914caa6031a28bd202deaccf663f36753071" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1253, + "startColumn": 55, + "charOffset": 41193, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1251, + "startColumn": 1, + "charOffset": 41134, + "charLength": 262, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatHealth(std::shared_ptr caster, std::shared_ptr target, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tdoCombatHealth(caster, std::move(target), caster ? caster->getPosition() : Position(), damage, params);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8390b9c73a57d475", + "equalIndicator/v1": "f0d03bce090d48fe3a536034bdde0fb9d09641b321e13b4106904cd8fa5976b2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_USE_MATH_DEFINES', which is a reserved identifier", + "markdown": "Declaration uses identifier '_USE_MATH_DEFINES', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 1, + "charOffset": 536, + "charLength": 7, + "snippet": { + "text": "#ifndef" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 526, + "charLength": 72, + "snippet": { + "text": "#endif\r\n\r\n#ifndef _USE_MATH_DEFINES\r\n\t#define _USE_MATH_DEFINES\r\n#endif\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ddd5394a7e2768d1", + "equalIndicator/v1": "f0fd42892d702d66cde8fb1eff5fa57b3ae40899c45d30cf79c1be8f78e7e892" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 155, + "startColumn": 53, + "charOffset": 4756, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 153, + "startColumn": 1, + "charOffset": 4699, + "charLength": 195, + "snippet": { + "text": "}\r\n\r\nvoid Npc::onPlayerDisappear(std::shared_ptr player) {\r\n\tremovePlayerInteraction(player);\r\n\tif (!player->hasFlag(PlayerFlags_t::IgnoredByNpcs) && playerSpectators.contains(player)) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "930816ad954da373", + "equalIndicator/v1": "f12ac0fe7598a44716f9660998cdb151a53363ad9d820090707a66c35f1b76ee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned char' to signed type 'int8_t' (aka 'signed char') is implementation-defined", + "markdown": "Narrowing conversion from 'unsigned char' to signed type 'int8_t' (aka 'signed char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 856, + "startColumn": 11, + "charOffset": 24727, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 854, + "startColumn": 1, + "charOffset": 24632, + "charLength": 114, + "snippet": { + "text": "\tfor (const auto &it : openContainers) {\r\n\t\tif (it.second.container == container) {\r\n\t\t\treturn it.first;\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b164a4771e8add04", + "equalIndicator/v1": "f12faea87150d1d181d975683d3485578cd6e96b7fd430b2670865f6614bf79a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'lastHitCreature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'lastHitCreature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 758, + "startColumn": 53, + "charOffset": 24141, + "charLength": 15, + "snippet": { + "text": "lastHitCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 756, + "startColumn": 1, + "charOffset": 24084, + "charLength": 262, + "snippet": { + "text": "}\r\n\r\nbool Creature::dropCorpse(std::shared_ptr lastHitCreature, std::shared_ptr mostDamageCreature, bool lastHitUnjustified, bool mostDamageUnjustified) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!lootDrop && getMonster()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8a1fce36f7ac620a", + "equalIndicator/v1": "f13bcac6b3ea8f177b269bbd96260471075be7bf3526da416f6bba618605038d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'init' is within a recursive call chain", + "markdown": "Function 'init' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 25, + "startColumn": 18, + "charOffset": 819, + "charLength": 4, + "snippet": { + "text": "init" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 23, + "startColumn": 1, + "charOffset": 762, + "charLength": 146, + "snippet": { + "text": "GameReload::~GameReload() = default;\r\n\r\nbool GameReload::init(Reload_t reloadTypes) {\r\n\tswitch (reloadTypes) {\r\n\t\tcase Reload_t::RELOAD_TYPE_ALL:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "43e31015226c323c", + "equalIndicator/v1": "f1459ce47df02ce79a96980a4a4f60ebe2455c4b219b785dcbd99fd5e2600f1e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8917, + "startColumn": 46, + "charOffset": 311367, + "charLength": 10, + "snippet": { + "text": "totalPrice" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8915, + "startColumn": 1, + "charOffset": 311266, + "charLength": 188, + "snippet": { + "text": "\r\n\t\tg_game().removeMoney(player, totalPrice, 0, true);\r\n\t\tg_metrics().addCounter(\"balance_decrease\", totalPrice, { { \"player\", player->getName() }, { \"context\", \"market_offer\" } });\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "923d6cf84a0abba8", + "equalIndicator/v1": "f14e51754bb1cb087aa08aa51a071c56db6242ee97694dbe9fb3ffc00d0901dd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1254, + "startColumn": 54, + "charOffset": 50270, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1252, + "startColumn": 1, + "charOffset": 50212, + "charLength": 243, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerInspectItem(std::shared_ptr player, uint16_t itemId, uint8_t itemCount, bool cyclopedia) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tplayer->sendItemInspection(itemId, itemCount, nullptr, cyclopedia);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cdd5795d29992405", + "equalIndicator/v1": "f15de941dc7e62e50519aa171b0d7db5e4ccc2d4b262d21f4c14a9e890a5b045" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1840, + "startColumn": 42, + "charOffset": 51629, + "charLength": 4, + "snippet": { + "text": "zone" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1838, + "startColumn": 1, + "charOffset": 51583, + "charLength": 114, + "snippet": { + "text": "}\r\n\r\nvoid Tile::addZone(std::shared_ptr zone) {\r\n\tzones.emplace(zone);\r\n\tconst auto &items = getItemList();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b83fc4e009d9ddf3", + "equalIndicator/v1": "f171b5b4aa8b65f20bcb93a69cb914f1e3a39ca9ec0cf1980380ba3561654ad9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 224, + "startColumn": 7, + "charOffset": 6899, + "charLength": 14, + "snippet": { + "text": "const uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 222, + "startColumn": 1, + "charOffset": 6864, + "charLength": 164, + "snippet": { + "text": "\r\n\t// Constructor for items\r\n\tItem(const uint16_t type, uint16_t count = 0);\r\n\tItem(const std::shared_ptr &i);\r\n\tvirtual std::shared_ptr clone() const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "08e51e6fb4e3d701", + "equalIndicator/v1": "f17b02139346f92b899cb1d52c0875868c1525e4809a812e7db19ac7cc4af527" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Pass by value and use std::move", + "markdown": "Pass by value and use std::move" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 283, + "startColumn": 29, + "charOffset": 8260, + "charLength": 17, + "snippet": { + "text": "const std::string" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 281, + "startColumn": 1, + "charOffset": 8172, + "charLength": 144, + "snippet": { + "text": "class DatabaseException : public std::exception {\r\npublic:\r\n\texplicit DatabaseException(const std::string &message) :\r\n\t\tmessage(message) { }\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "724b60ed3f78ba40", + "equalIndicator/v1": "f17d0780c578fc091da190939026a88104e3ede6d03815d3597bf8b7dae49fb5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 127, + "startColumn": 6, + "charOffset": 3928, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 125, + "startColumn": 1, + "charOffset": 3823, + "charLength": 312, + "snippet": { + "text": "\t\t\t\tpugi::xml_attribute skillIdAttribute = childNode.attribute(\"id\");\r\n\t\t\t\tif (skillIdAttribute) {\r\n\t\t\t\t\tuint16_t skill_id = pugi::cast(skillIdAttribute.value());\r\n\t\t\t\t\tif (skill_id <= SKILL_LAST) {\r\n\t\t\t\t\t\tvoc->skillMultipliers[skill_id] = pugi::cast(childNode.attribute(\"multiplier\").value());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "45c9e7d74b79dff3", + "equalIndicator/v1": "f1976c7fa4c3ff06f927180030dea5974ba009ae31688b05d2dcfc25855bf66b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 198, + "startColumn": 68, + "charOffset": 5460, + "charLength": 6, + "snippet": { + "text": "action" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 196, + "startColumn": 1, + "charOffset": 5387, + "charLength": 135, + "snippet": { + "text": "\t}\r\n\r\n\tvoid setUniqueId(uint16_t uniqueId, const std::shared_ptr action) {\r\n\t\tuniqueItemMap.try_emplace(uniqueId, action);\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1dff7dca5b213b41", + "equalIndicator/v1": "f1c890f049b8c97cc9008a7eba4419f60308eadcd6e34c48bd1b83c77048068d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 745, + "startColumn": 41, + "charOffset": 28830, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 743, + "startColumn": 1, + "charOffset": 28784, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "201384ab0031809a", + "equalIndicator/v1": "f1cdf2b5cc73762ec3b54145b32ecee03c80588b2dcdd17a449bdc7948d89eff" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6888, + "startColumn": 135, + "charOffset": 238858, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6886, + "startColumn": 1, + "charOffset": 238719, + "charLength": 311, + "snippet": { + "text": "}\r\n\r\nvoid Game::applyWheelOfDestinyEffectsToDamage(CombatDamage &damage, std::shared_ptr attackerPlayer, std::shared_ptr target) const {\r\n\t// If damage is 0, it means the target is immune to the damage type, or that we missed.\r\n\tif (damage.primary.value == 0 && damage.secondary.value == 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0df9487155fa4a42", + "equalIndicator/v1": "f1f006c1b8ae37f0634f337ddff32dd4249983c298ef682b3c843d4634d312e4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1402, + "startColumn": 36, + "charOffset": 42206, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1400, + "startColumn": 1, + "charOffset": 42083, + "charLength": 141, + "snippet": { + "text": "\tvoid sendPartyPlayerVocation(std::shared_ptr player) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPartyPlayerVocation(player);\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3129d5be1a660bcd", + "equalIndicator/v1": "f1fb1e93ee91f5e354f214861007465d1e77bade4c1ed7ff35f3f57519396789" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2202, + "startColumn": 95, + "charOffset": 84256, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2200, + "startColumn": 1, + "charOffset": 84157, + "charLength": 258, + "snippet": { + "text": "}\r\n\r\nReturnValue Game::internalAddItem(std::shared_ptr toCylinder, std::shared_ptr item, int32_t index, uint32_t flags, bool test, uint32_t &remainderCount) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (toCylinder == nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "946bf3c9c7da257e", + "equalIndicator/v1": "f1fd7c630528a4fe712bdd90c4bd697e05113eeb8994dd0763ccf9e73c74f7db" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1442, + "startColumn": 16, + "charOffset": 41382, + "charLength": 16, + "snippet": { + "text": "getItemTypeCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1440, + "startColumn": 1, + "charOffset": 41362, + "charLength": 155, + "snippet": { + "text": "}\r\n\r\nuint32_t Tile::getItemTypeCount(uint16_t itemId, int32_t subType /*= -1*/) const {\r\n\tuint32_t count = 0;\r\n\tif (ground && ground->getID() == itemId) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b19379d699107a41", + "equalIndicator/v1": "f200f381aa91a2a936ff8f43c27889496c819d0283d5d560157cb7bfbb6ca84f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9153, + "startColumn": 15, + "charOffset": 320016, + "charLength": 2, + "snippet": { + "text": "it" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9151, + "startColumn": 1, + "charOffset": 319954, + "charLength": 106, + "snippet": { + "text": "\t\t\tint32_t subType;\r\n\t\t\tif (it.charges != 0) {\r\n\t\t\t\tsubType = it.charges;\r\n\t\t\t} else {\r\n\t\t\t\tsubType = -1;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "777bd726d8699cdf", + "equalIndicator/v1": "f26dbc3089ae0aed8aedd0016c41139b61afd0229ef11bcc3f373be54bd259bd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 346, + "startColumn": 55, + "charOffset": 11426, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 344, + "startColumn": 1, + "charOffset": 11367, + "charLength": 114, + "snippet": { + "text": "}\r\n\r\nint32_t Weapon::getHealthCost(std::shared_ptr player) const {\r\n\tif (health != 0) {\r\n\t\treturn health;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4f2c931c77aaa675", + "equalIndicator/v1": "f27293daf371e562628e97524b81202f4b9ed6b7c69ea1e3be6bcc3b036cb227" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 199, + "startColumn": 19, + "charOffset": 6403, + "charLength": 31, + "snippet": { + "text": "\"Level must be greater than 0.\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 197, + "startColumn": 1, + "charOffset": 6313, + "charLength": 188, + "snippet": { + "text": "\tconst uint32_t level = getNumber(L, 1);\r\n\tif (level == 0) {\r\n\t\treportErrorFunc(\"Level must be greater than 0.\");\r\n\t} else {\r\n\t\tlua_pushnumber(L, Player::getExpForLevel(level));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e4d9da58fea31d47", + "equalIndicator/v1": "f28f41ce6b48e55bad73c63288a0b22fe2fb86f9794a38fddef144563e43b7f6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1191, + "startColumn": 66, + "charOffset": 45354, + "charLength": 4, + "snippet": { + "text": "zone" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1189, + "startColumn": 1, + "charOffset": 45284, + "charLength": 235, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::zoneAfterCreatureEnter(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneAfterCreatureEnter - \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "68847b58b0846063", + "equalIndicator/v1": "f2a781d4189ab77712ea0af2c09feb99a925d37eb60dd5374d2ce73f84b91898" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8042, + "startColumn": 58, + "charOffset": 280010, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8040, + "startColumn": 1, + "charOffset": 279948, + "charLength": 127, + "snippet": { + "text": "}\r\n\r\nvoid Game::updateCreatureSkull(std::shared_ptr creature) {\r\n\tif (getWorldType() != WORLD_TYPE_PVP) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7fd801487d9710a7", + "equalIndicator/v1": "f2aabce89bc455227b31210b6b6d250e749ac1927476ede0c4227831e94154ba" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 746, + "startColumn": 27, + "charOffset": 26794, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 744, + "startColumn": 1, + "charOffset": 26762, + "charLength": 127, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnMoveItem, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6d899e01c14b78b9", + "equalIndicator/v1": "f2b65759c545d01a25407c53270c0010f1789472064f2838fd417bfea607668b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructor does not initialize these fields: id, playerId, timestamp, price, amount, counter, itemId, type, tier", + "markdown": "Constructor does not initialize these fields: id, playerId, timestamp, price, amount, counter, itemId, type, tier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creatures_definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1486, + "startColumn": 8, + "charOffset": 38766, + "charLength": 13, + "snippet": { + "text": "MarketOfferEx" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1484, + "startColumn": 1, + "charOffset": 38753, + "charLength": 99, + "snippet": { + "text": "};\r\n\r\nstruct MarketOfferEx {\r\n\tMarketOfferEx() = default;\r\n\tMarketOfferEx(MarketOfferEx &&other) :\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "536eb6e322b30f22", + "equalIndicator/v1": "f2baa722464c60ac6e47542391365d859e64e5dd355b455968b0a971a463af2e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 970, + "startColumn": 55, + "charOffset": 27776, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 968, + "startColumn": 1, + "charOffset": 27717, + "charLength": 139, + "snippet": { + "text": "}\r\n\r\nbool Player::canWalkthrough(std::shared_ptr creature) {\r\n\tif (group->access || creature->isInGhostMode()) {\r\n\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "61fb06bab718e83c", + "equalIndicator/v1": "f2c47f346113b4751285eb51d34632b19dbd51b1b1ddcad0c66e852514afcf45" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 576, + "startColumn": 8, + "charOffset": 14185, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 574, + "startColumn": 1, + "charOffset": 14085, + "charLength": 217, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetDecayTime(lua_State* L) {\r\n\t// itemType:getDecayTime()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->decayTime);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "81dbc6f47dc761ad", + "equalIndicator/v1": "f2e6639f9c3cc2e63f5a1114e491dfba52a072ad359aa7e8cd430accd7702add" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 546, + "startColumn": 7, + "charOffset": 19325, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 544, + "startColumn": 1, + "charOffset": 19313, + "charLength": 143, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnBrowseField - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2a66791caaa22780", + "equalIndicator/v1": "f302408fdee23a1ae23c7fd62b7a42dba776f555e0cd2290df4a3b3eb13dbffb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8052, + "startColumn": 55, + "charOffset": 280292, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8050, + "startColumn": 1, + "charOffset": 280233, + "charLength": 213, + "snippet": { + "text": "}\r\n\r\nvoid Game::updatePlayerShield(std::shared_ptr player) {\r\n\tfor (const auto &spectator : Spectators().find(player->getPosition(), true)) {\r\n\t\tspectator->getPlayer()->sendCreatureShield(player);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9ef1ba599b8accef", + "equalIndicator/v1": "f309ea07b13443db1385596d7685bc9562c93ad91e8bff348d7acd82d359bcaf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 637, + "startColumn": 74, + "charOffset": 24587, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 635, + "startColumn": 1, + "charOffset": 24509, + "charLength": 189, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerTaskHuntingClass(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "65545ecc19e10d66", + "equalIndicator/v1": "f313b88dfa672c1b3628e8549792cca8dd81a2dcca8720cd77270cc33643c522" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 151, + "startColumn": 53, + "charOffset": 4400, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 149, + "startColumn": 1, + "charOffset": 4343, + "charLength": 265, + "snippet": { + "text": "}\r\n\r\nvoid Decay::internalDecayItem(std::shared_ptr item) {\r\n\tconst ItemType &it = Item::items[item->getID()];\r\n\t// Remove the item and halt the decay process if a player triggers a bug where the item's decay ID matches its equip or de-equip transformation ID\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "edd6d3607f7b1ff9", + "equalIndicator/v1": "f31d8c3383a7c073e28245e0a5e4e43e1025b6b7e602058afaddbc2c86a8ac6b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9915, + "startColumn": 3, + "charOffset": 345863, + "charLength": 11, + "snippet": { + "text": "ShootType_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9913, + "startColumn": 1, + "charOffset": 345746, + "charLength": 213, + "snippet": { + "text": "bool Game::hasDistanceEffect(uint16_t effectId) {\r\n\tfor (uint16_t i = CONST_ANI_NONE; i <= CONST_ANI_LAST; i++) {\r\n\t\tShootType_t effect = static_cast(i);\r\n\t\tif (effect == effectId) {\r\n\t\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "490f5f1213b636d4", + "equalIndicator/v1": "f32b4a24d0e9bd12741ff4195ce34c57f9bcfe90c8cd9b801c51eba03a654c29" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first.", + "markdown": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1194, + "startColumn": 23, + "charOffset": 33591, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1192, + "startColumn": 1, + "charOffset": 33562, + "charLength": 147, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tint32_t hitChance = item->getHitChance();\r\n\t\tif (hitChance != 0) {\r\n\t\t\tdescriptions.emplace_back(\"HitChance\", std::to_string(hitChance));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2ee32cf20a2f74e9", + "equalIndicator/v1": "f32e945e22bacba3bd777d107682a1bd1228630a191a3b45874633abec11a4fc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8313, + "startColumn": 61, + "charOffset": 287884, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8311, + "startColumn": 1, + "charOffset": 287819, + "charLength": 174, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerFriendSystemAction(std::shared_ptr player, uint8_t type, uint8_t titleId) {\r\n\tif (type == 0x0E) {\r\n\t\tplayer->title()->setCurrentTitle(titleId);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4845aafddea175c9", + "equalIndicator/v1": "f34664aa2a39142fa2f00aa6c33c7f4aa985414776a39231c9d3e3e59a3f5949" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 297, + "startColumn": 67, + "charOffset": 11037, + "charLength": 5, + "snippet": { + "text": "party" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 295, + "startColumn": 1, + "charOffset": 10966, + "charLength": 318, + "snippet": { + "text": "}\r\n\r\nvoid EventCallback::partyOnShareExperience(std::shared_ptr party, uint64_t &exp) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"Party leader {}. Call stack overflow. Too many lua script calls being nested.\", party->getLeader() ? party->getLeader()->getName() : \"unknown\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8b9753c3bae1841d", + "equalIndicator/v1": "f38e0b0d0727aeac5b5596757379a14fd3274fc4cf1074d9d1d1341c3261bbac" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 668, + "startColumn": 56, + "charOffset": 20386, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 666, + "startColumn": 1, + "charOffset": 20326, + "charLength": 173, + "snippet": { + "text": "}\r\n\r\nvoid Party::updatePlayerHealth(std::shared_ptr player, std::shared_ptr target, uint8_t healthPercent) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6070edce5204c405", + "equalIndicator/v1": "f3aebdad8aaf72d6cd22a7bf76f2d7ef8bb849cd6dd2df5d138cb425e1290ab5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'bed' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'bed' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 418, + "startColumn": 45, + "charOffset": 12187, + "charLength": 3, + "snippet": { + "text": "bed" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 416, + "startColumn": 1, + "charOffset": 12138, + "charLength": 127, + "snippet": { + "text": "}\r\n\r\nvoid House::addBed(std::shared_ptr bed) {\r\n\tbedsList.push_back(bed);\r\n\tbed->setHouse(static_self_cast());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4579701cdeb6a7b7", + "equalIndicator/v1": "f3b4b331bd6789e0065e0a3512040093fa4956f9d10ecab3ed72c0a550ce50e5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1220, + "startColumn": 68, + "charOffset": 43553, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1218, + "startColumn": 1, + "charOffset": 43481, + "charLength": 179, + "snippet": { + "text": "}\r\n\r\nvoid Events::eventPlayerOnRequestQuestLine(std::shared_ptr player, uint16_t questId) {\r\n\t// Player::onRequestQuestLine()\r\n\tif (info.playerOnRequestQuestLine == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "47eff2ea31a10787", + "equalIndicator/v1": "f3b7e9312700b92bf3dda1ce995f4a1722c28cdf4623f8e3bb8f9dde3d9167bc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 339, + "startColumn": 105, + "charOffset": 11794, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 337, + "startColumn": 1, + "charOffset": 11685, + "charLength": 157, + "snippet": { + "text": "}\r\n\r\nstd::vector Imbuements::getImbuements(std::shared_ptr player, std::shared_ptr item) {\r\n\tstd::vector imbuements;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ca5a23bedc59ecca", + "equalIndicator/v1": "f3c272e1a53cb0f7b8e0bdf4f09583854a2bc1218c0ef742ecf348e1c70c93e9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 760, + "startColumn": 39, + "charOffset": 23092, + "charLength": 12, + "snippet": { + "text": "attackSpells" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 758, + "startColumn": 1, + "charOffset": 23048, + "charLength": 88, + "snippet": { + "text": "\t}\r\n\r\n\tlua_createtable(L, monsterType->info.attackSpells.size(), 0);\r\n\r\n\tint index = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2ec9649287ba9c4e", + "equalIndicator/v1": "f3cff170b98fd09e0eb87f5e0a040f447b2a723ac10998260e3dfad7277caa66" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1087, + "startColumn": 7, + "charOffset": 41411, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1085, + "startColumn": 1, + "charOffset": 41299, + "charLength": 218, + "snippet": { + "text": "\r\nvoid EventCallback::monsterOnSpawn(std::shared_ptr monster, const Position &position) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"{} - \"\r\n\t\t \"Position {}\"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ef2d24dacb368f44", + "equalIndicator/v1": "f3f40aac36e98fc77fe931b7cbd76a93fa96918ae180d837d75007ead88b3093" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 107, + "startColumn": 21, + "charOffset": 3108, + "charLength": 8, + "snippet": { + "text": "vocation" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 105, + "startColumn": 1, + "charOffset": 3018, + "charLength": 155, + "snippet": { + "text": "\tif (vocation) {\r\n\t\tuint32_t magicLevel = getNumber(L, 2);\r\n\t\tlua_pushnumber(L, vocation->getReqMana(magicLevel));\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fbdffb09b0f05c57", + "equalIndicator/v1": "f40083326310e9d0a95fde2936312186d0b20094133dde3af31339b43b5fc23b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5524, + "startColumn": 2, + "charOffset": 175272, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5522, + "startColumn": 1, + "charOffset": 175195, + "charLength": 192, + "snippet": { + "text": "\tuint16_t firstItem = msg.get();\r\n\tuint8_t tier = msg.getByte();\r\n\tuint16_t secondItem = msg.get();\r\n\tbool usedCore = msg.getByte();\r\n\tbool reduceTierLoss = msg.getByte();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f3b7d34660303085", + "equalIndicator/v1": "f4105c25a21d6180d4fc682a0a8831d070bd89d852c04ce9d5fc6560ec633412" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7483, + "startColumn": 90, + "charOffset": 260661, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7481, + "startColumn": 1, + "charOffset": 260536, + "charLength": 260, + "snippet": { + "text": "\r\nvoid Game::buildMessageAsTarget(\r\n\tstd::shared_ptr attacker, const CombatDamage &damage, std::shared_ptr attackerPlayer,\r\n\tstd::shared_ptr targetPlayer, TextMessage &message, std::stringstream &ss,\r\n\tconst std::string &damageString\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "60191d6a45d46637", + "equalIndicator/v1": "f4340a13aee6f4d600dae7739c351a75c3ae536484b89715519474fe6b547bf9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The 'empty' method should be used to check for emptiness instead of comparing to an empty object", + "markdown": "The 'empty' method should be used to check for emptiness instead of comparing to an empty object" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 103, + "startColumn": 62, + "charOffset": 3639, + "charLength": 6, + "snippet": { + "text": "writer" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 101, + "startColumn": 1, + "charOffset": 3344, + "charLength": 429, + "snippet": { + "text": "\t\tif (g_game().internalMoveItem(item->getParent(), player->getInbox(), INDEX_WHEREEVER, item, item->getItemCount(), nullptr, FLAG_NOLIMIT) == RETURNVALUE_NOERROR) {\r\n\t\t\tauto newItem = g_game().transformItem(item, item->getID() + 1);\r\n\t\t\tif (newItem && newItem->getID() == ITEM_LETTER_STAMPED && writer != \"\") {\r\n\t\t\t\tnewItem->setAttribute(ItemAttribute_t::WRITER, writer);\r\n\t\t\t\tnewItem->setAttribute(ItemAttribute_t::DATE, date);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "90040e2a70419239", + "equalIndicator/v1": "f43ba1a39ed5f3efde1a900786fb68d428402d008e9cfeb55d026a5add1371c8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/achievement/player_achievement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 36, + "startColumn": 41, + "charOffset": 1106, + "charLength": 9, + "snippet": { + "text": "timestamp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 34, + "startColumn": 1, + "charOffset": 1031, + "charLength": 241, + "snippet": { + "text": "\r\n\taddPoints(achievement.points);\r\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\r\n\tgetUnlockedKV()->set(achievement.name, toSaveTimeStamp);\r\n\tm_achievementsUnlocked.emplace_back(achievement.id, toSaveTimeStamp);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ca0abdff34ea7cef", + "equalIndicator/v1": "f44867ec4ecab683db937e97a613252b6a7eaffcf364b11fa53a829ccb9bb3dd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::list, unsigned char>>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'std::list, unsigned char\\>\\>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/modal_window_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 102, + "startColumn": 21, + "charOffset": 2845, + "charLength": 6, + "snippet": { + "text": "window" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 100, + "startColumn": 1, + "charOffset": 2748, + "charLength": 152, + "snippet": { + "text": "\tconst auto &window = getUserdataShared(L, 1);\r\n\tif (window) {\r\n\t\tlua_pushnumber(L, window->choices.size());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3f59fe5db515fe22", + "equalIndicator/v1": "f44d19591c353821e43533617007cfeea235c0070be5128a40521086a7beeb20" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Redundant string initialization", + "markdown": "Redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 216, + "startColumn": 14, + "charOffset": 6252, + "charLength": 4, + "snippet": { + "text": "name" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 214, + "startColumn": 1, + "charOffset": 6179, + "charLength": 117, + "snippet": { + "text": "\tMonsterSpell &operator=(const MonsterSpell &) = delete;\r\n\r\n\tstd::string name = \"\";\r\n\tstd::string scriptName = \"\";\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4dc7ea26595785f9", + "equalIndicator/v1": "f485f947679f22ee3906d1d508134b6adaa4da7e9e705e87e6329393e39c6aa7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/reward.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 1, + "charOffset": 1059, + "charLength": 4, + "snippet": { + "text": "void" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 1054, + "charLength": 225, + "snippet": { + "text": "}\r\n\r\nvoid Reward::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tstd::shared_ptr localParent = getParent();\r\n\tif (localParent != nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9d93d33f662db925", + "equalIndicator/v1": "f4a956f1e68cce80578b5b138f73ece105b244f2801a33f9a2d7892d936a6a51" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'mostDamageCreature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'mostDamageCreature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 758, + "startColumn": 96, + "charOffset": 24184, + "charLength": 18, + "snippet": { + "text": "mostDamageCreature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 756, + "startColumn": 1, + "charOffset": 24084, + "charLength": 262, + "snippet": { + "text": "}\r\n\r\nbool Creature::dropCorpse(std::shared_ptr lastHitCreature, std::shared_ptr mostDamageCreature, bool lastHitUnjustified, bool mostDamageUnjustified) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!lootDrop && getMonster()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "95740ab037b7890f", + "equalIndicator/v1": "f4b14b7e7b90a07ac8a76c127c7f95ef603233ed434f39c904a29873cc44b7b3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 472, + "startColumn": 41, + "charOffset": 17845, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 470, + "startColumn": 1, + "charOffset": 17799, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3feb1ddf5de9b417", + "equalIndicator/v1": "f4ce2dc6c8a1cd91b5461ccdc8218b21b457d697210a70892ef4787100c75559" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 906, + "startColumn": 41, + "charOffset": 34576, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 904, + "startColumn": 1, + "charOffset": 34530, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "740c014e321f4171", + "equalIndicator/v1": "f4cee5247232bdd99e4790a06adf0bd441cd736ad7b5990fdc3f5ad1420fb6d5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 14, + "charOffset": 1339, + "charLength": 7, + "snippet": { + "text": "npcType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 1200, + "charLength": 255, + "snippet": { + "text": "\tfloat multiplier = g_configManager().getFloat(RATE_NPC_HEALTH, __FUNCTION__);\r\n\thealth = npcType->info.health * multiplier;\r\n\thealthMax = npcType->info.healthMax * multiplier;\r\n\tbaseSpeed = npcType->info.baseSpeed;\r\n\tinternalLight = npcType->info.light;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8cbf6660ee1c096e", + "equalIndicator/v1": "f4f5154c22ae7caaf9251ddae15bfe2ca34dac0d83de1d6736d5724a9b1e1dcf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1291, + "startColumn": 27, + "charOffset": 45938, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1289, + "startColumn": 1, + "charOffset": 45906, + "charLength": 132, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnStorageUpdate, &scriptInterface);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ff0811de6a9b3fd4", + "equalIndicator/v1": "f51d3ad18429dae8021db28c28be69c197526b4c228d497bc7503522d951856d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 8907, + "startColumn": 46, + "charOffset": 310964, + "charLength": 3, + "snippet": { + "text": "fee" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 8905, + "startColumn": 1, + "charOffset": 310870, + "charLength": 218, + "snippet": { + "text": "\r\n\t\tg_game().removeMoney(player, fee, 0, true);\r\n\t\tg_metrics().addCounter(\"balance_decrease\", fee, { { \"player\", player->getName() }, { \"context\", \"market_fee\" } });\r\n\t} else {\r\n\t\tuint64_t totalPrice = price * amount;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "42e089830249f727", + "equalIndicator/v1": "f5454abddfe3cd8ef6ae126b50169ea8670859be916253414258e7e492a13b0b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1178, + "startColumn": 28, + "charOffset": 32415, + "charLength": 10, + "snippet": { + "text": "healthGain" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1176, + "startColumn": 1, + "charOffset": 32228, + "charLength": 292, + "snippet": { + "text": "\t\t\tint32_t realHealthGain = creature->getHealth();\r\n\t\t\tif (creature->getZoneType() == ZONE_PROTECTION && dailyStreak >= DAILY_REWARD_DOUBLE_HP_REGENERATION) {\r\n\t\t\t\tcreature->changeHealth(healthGain * 2); // Double regen from daily reward\r\n\t\t\t} else {\r\n\t\t\t\tcreature->changeHealth(healthGain);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6f31a89eb09f2393", + "equalIndicator/v1": "f5482c5d4f8f5a2fbe25e14b913ace1f7e7bb6747dc9a9706a5fc5366d5138d9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6052, + "startColumn": 63, + "charOffset": 192687, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6050, + "startColumn": 1, + "charOffset": 192620, + "charLength": 136, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureTurn(std::shared_ptr creature, uint32_t stackPos) {\r\n\tif (!canSee(creature)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bded1c26c17c6471", + "equalIndicator/v1": "f5507ba4add50f816319a90d5ec8d2b6039954d8d27830a26786e8e4887bcf17" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 431, + "startColumn": 58, + "charOffset": 12083, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 429, + "startColumn": 1, + "charOffset": 11944, + "charLength": 207, + "snippet": { + "text": "\tvirtual void drainMana(std::shared_ptr attacker, int32_t manaLoss);\r\n\r\n\tvirtual bool challengeCreature(std::shared_ptr, [[maybe_unused]] int targetChangeCooldown) {\r\n\t\treturn false;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5f476a2eb63b093b", + "equalIndicator/v1": "f5729e0f6efa94051079e25c6ea1db5fea1956d3a0c5b1985e456d7b1df22c8b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3522, + "startColumn": 3, + "charOffset": 108396, + "charLength": 8, + "snippet": { + "text": "skills_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3520, + "startColumn": 1, + "charOffset": 108375, + "charLength": 198, + "snippet": { + "text": "\t\t\tcontinue;\r\n\t\t}\r\n\t\tskills_t skill = static_cast(i);\r\n\t\tmsg.add(std::min(player->getSkillLevel(skill), std::numeric_limits::max()));\r\n\t\tmsg.add(0);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7798bf5d6ad4cf1e", + "equalIndicator/v1": "f580c5989a4141824612dd3748f076d4290dbed4db05388322079230187269a5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 171, + "startColumn": 13, + "charOffset": 4965, + "charLength": 8, + "snippet": { + "text": "findItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 169, + "startColumn": 1, + "charOffset": 4881, + "charLength": 196, + "snippet": { + "text": "\t\t\tfor (auto &findItem : *items) {\r\n\t\t\t\tif (findItem->getID() == id) {\r\n\t\t\t\t\titem = findItem;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else if (iType.m_transformOnUse && findItem->getID() == iType.m_transformOnUse) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "415125fe4730093c", + "equalIndicator/v1": "f5966fac55aee20777c2fdb8f1448a2a964c07146f3d0a52c54108a6c5b715dc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 218, + "startColumn": 42, + "charOffset": 6586, + "charLength": 14, + "snippet": { + "text": "const uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 216, + "startColumn": 1, + "charOffset": 6473, + "charLength": 368, + "snippet": { + "text": "public:\r\n\t// Factory member to create item of right type based on type\r\n\tstatic std::shared_ptr CreateItem(const uint16_t type, uint16_t count = 0, Position* itemPosition = nullptr);\r\n\tstatic std::shared_ptr CreateItemAsContainer(const uint16_t type, uint16_t size);\r\n\tstatic std::shared_ptr CreateItem(uint16_t itemId, Position &itemPosition);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e3557ec330cf23ed", + "equalIndicator/v1": "f59c74572efbbd67ca69e5f493825dac5b0831447d85da65c4b41c1b63755757" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 514, + "startColumn": 79, + "charOffset": 16934, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 512, + "startColumn": 1, + "charOffset": 16851, + "charLength": 315, + "snippet": { + "text": "}\r\n\r\nbool Action::executeUse(std::shared_ptr player, std::shared_ptr item, const Position &fromPosition, std::shared_ptr target, const Position &toPosition, bool isHotkey) {\r\n\t// onUse(player, item, fromPosition, target, toPosition, isHotkey)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "61ea2480a3b18b30", + "equalIndicator/v1": "f5a21cac8c59ce933247677673e91b14d4834ebc860464e7d388489c4f34bc56" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'addThing' is within a recursive call chain", + "markdown": "Function 'addThing' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 986, + "startColumn": 12, + "charOffset": 30072, + "charLength": 8, + "snippet": { + "text": "addThing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 984, + "startColumn": 1, + "charOffset": 30056, + "charLength": 82, + "snippet": { + "text": "}\r\n\r\nvoid Tile::addThing(std::shared_ptr thing) {\r\n\taddThing(0, thing);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "74b8347852972220", + "equalIndicator/v1": "f5a72fe48493e6a1cd435feb88c34e864b33a932fcd0f9977baf1c4f67b7226d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 415, + "startColumn": 77, + "charOffset": 12185, + "charLength": 7, + "snippet": { + "text": "oldItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 413, + "startColumn": 1, + "charOffset": 12104, + "charLength": 206, + "snippet": { + "text": "}\r\n\r\nvoid Container::onUpdateContainerItem(uint32_t index, std::shared_ptr oldItem, std::shared_ptr newItem) {\r\n\tauto spectators = Spectators().find(getPosition(), false, 2, 2, 2, 2);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2bfcd9bdbaa7e8c0", + "equalIndicator/v1": "f5b58b79d3b2de20be21556b91f36229cc9da9673410f461ca87585131857322" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 669, + "startColumn": 2, + "charOffset": 18146, + "charLength": 13, + "snippet": { + "text": "ConditionId_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 667, + "startColumn": 1, + "charOffset": 18075, + "charLength": 202, + "snippet": { + "text": "\r\n\tConditionType_t conditionType = getNumber(L, 2);\r\n\tConditionId_t conditionId = getNumber(L, 3, CONDITIONID_COMBAT);\r\n\tuint32_t subId = getNumber(L, 4, 0);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7249219986ed6cca", + "equalIndicator/v1": "f5bd21b20204444b6c20d1c6b070844382c0f7f04db6c6a084518eaf4c61070a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/shop_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 87, + "startColumn": 33, + "charOffset": 2552, + "charLength": 19, + "snippet": { + "text": "getNumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 85, + "startColumn": 1, + "charOffset": 2436, + "charLength": 179, + "snippet": { + "text": "\t// shop:setCount(count)\r\n\tif (const auto &shop = getUserdataShared(L, 1)) {\r\n\t\tshop->shopBlock.itemSubType = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9c425d922ec49bd6", + "equalIndicator/v1": "f5ded62bc6bfdaa539e921b407953c061babd75ac378b11414bc8d478b8c899c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 253, + "startColumn": 24, + "charOffset": 6692, + "charLength": 5, + "snippet": { + "text": "regen" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 251, + "startColumn": 1, + "charOffset": 6662, + "charLength": 201, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tplayer->changeHealth(regen * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__), false);\r\n\t\tplayer->changeMana(regen * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__));\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "886591dc0bec17cd", + "equalIndicator/v1": "f5ff62aec2c721c62d5f7c5866c243beda61abf909640b5cc900ba5e342b2885" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 220, + "startColumn": 8, + "charOffset": 5507, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 218, + "startColumn": 1, + "charOffset": 5417, + "charLength": 202, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetType(lua_State* L) {\r\n\t// itemType:getType()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->type);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a6c9bf0ef1e56d97", + "equalIndicator/v1": "f604458f363a760ac670c207865ff06110b60b9395bb55fc73f92d0449c9bb83" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9905, + "startColumn": 3, + "charOffset": 345605, + "charLength": 18, + "snippet": { + "text": "MagicEffectClasses" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9903, + "startColumn": 1, + "charOffset": 345499, + "charLength": 216, + "snippet": { + "text": "bool Game::hasEffect(uint16_t effectId) {\r\n\tfor (uint16_t i = CONST_ME_NONE; i < CONST_ME_LAST; i++) {\r\n\t\tMagicEffectClasses effect = static_cast(i);\r\n\t\tif (effect == effectId) {\r\n\t\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e304252b2e409ff2", + "equalIndicator/v1": "f607fda45b7ae048ae1e38d585490e2e75fa897500535165b7f23956b1bb1c38" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1329, + "startColumn": 47, + "charOffset": 47191, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1327, + "startColumn": 1, + "charOffset": 47087, + "charLength": 170, + "snippet": { + "text": "\tscriptInterface.pushFunction(info.monsterOnDropLoot);\r\n\r\n\tLuaScriptInterface::pushUserdata(L, monster);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Monster\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "53817cd306a8960a", + "equalIndicator/v1": "f60cd8373208072b24e88faf453a423c7ab70ada8889f1b71799e0641d87a6d3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use range-based for loop instead", + "markdown": "Use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 24, + "startColumn": 4, + "charOffset": 778, + "charLength": 3, + "snippet": { + "text": "for" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 22, + "startColumn": 1, + "charOffset": 725, + "charLength": 198, + "snippet": { + "text": "\t\t\tMoveEventList &moveEventList = pair.second;\r\n\r\n\t\t\tfor (int moveEventType = 0; moveEventType < MOVE_EVENT_LAST; ++moveEventType) {\r\n\t\t\t\tauto &eventList = moveEventList.moveEvent[moveEventType];\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "163811abdf7878f8", + "equalIndicator/v1": "f60d1c38823c30f03c88c1c6e8d7731281204ba202172619bf4ebc9bb4ea0c1c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 421, + "startColumn": 10, + "charOffset": 11297, + "charLength": 14, + "snippet": { + "text": "getReflectFlat" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 419, + "startColumn": 1, + "charOffset": 11196, + "charLength": 245, + "snippet": { + "text": "\tint32_t getReflectPercent(CombatType_t combat, bool useCharges = false) const override;\r\n\r\n\tint32_t getReflectFlat(CombatType_t combat, bool useCharges = false) const override;\r\n\r\n\tPartyShields_t getPartyShield(std::shared_ptr player);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2e9ab2fa797e801b", + "equalIndicator/v1": "f61639b2f989966d35a5d78a088336cea8228a044f77f3b519bc8b53ddcfbac4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/creaturecallback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 17, + "startColumn": 7, + "charOffset": 546, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 15, + "startColumn": 1, + "charOffset": 534, + "charLength": 122, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\tauto targetCreature = m_targetCreature.lock();\r\n\t\tg_logger().error(\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "074c5352083cee12", + "equalIndicator/v1": "f61c4b26db3cf925f48f28b7d037f58afcd0222b47ff02bd449f3a52cc4db595" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'", + "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3490, + "startColumn": 21, + "charOffset": 107464, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3488, + "startColumn": 1, + "charOffset": 107339, + "charLength": 170, + "snippet": { + "text": "\t\tmsg.add(player->getBaseSkill(skill));\r\n\t\tmsg.add(player->getLoyaltySkill(skill));\r\n\t\tmsg.add(player->getSkillPercent(skill) * 100);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3104c6c4c658f648", + "equalIndicator/v1": "f634628a25dffefe37064671a3369a23314f21df6b7e4527a5aa8b1a2f97408e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6907, + "startColumn": 29, + "charOffset": 239690, + "charLength": 36, + "snippet": { + "text": "(damage.primary.value * damageBonus)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6905, + "startColumn": 1, + "charOffset": 239551, + "charLength": 268, + "snippet": { + "text": "\t\t\tint32_t damageBonus = attackerPlayer->wheel()->checkTwinBurstByTarget(target);\r\n\t\t\tif (damageBonus != 0) {\r\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\r\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8b75fa52c95401c3", + "equalIndicator/v1": "f64abb795c7f78062fa5e20618b3aa1eede64c36ea8ba785b1112493dd5dedee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1106, + "startColumn": 52, + "charOffset": 32483, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1104, + "startColumn": 1, + "charOffset": 32423, + "charLength": 139, + "snippet": { + "text": "\t\t}\r\n\t}\r\n\tvoid sendCreatureAppear(std::shared_ptr creature, const Position &pos, bool isLogin) {\r\n\t\tif (!creature) {\r\n\t\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f17e32c6e6ed6df9", + "equalIndicator/v1": "f64ac47058e1e00c751b7ec195861e92b5421c93ecff559a0c9361afedd6157c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int64_t' (aka 'long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 89, + "startColumn": 3, + "charOffset": 2697, + "charLength": 14, + "snippet": { + "text": "lua_pushnumber" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 87, + "startColumn": 1, + "charOffset": 2599, + "charLength": 172, + "snippet": { + "text": "\tstd::shared_ptr condition = getUserdataShared(L, 1);\r\n\tif (condition) {\r\n\t\tlua_pushnumber(L, condition->getEndTime());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6f6ead4a14a75b0b", + "equalIndicator/v1": "f667fe2ba01a92160a3287605683482b451b9e68850cb53bb047f01c8ea16667" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Result of integer division used in a floating point context; possible loss of precision", + "markdown": "Result of integer division used in a floating point context; possible loss of precision" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 76, + "startColumn": 95, + "charOffset": 2223, + "charLength": 5, + "snippet": { + "text": "level" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 74, + "startColumn": 1, + "charOffset": 2008, + "charLength": 236, + "snippet": { + "text": "\t\treturn static_cast(std::round((0.085 * attackFactor * attackValue * attackSkill) + (level / 5)));\r\n\t} else {\r\n\t\treturn static_cast(std::round((0.09 * attackFactor * attackValue * attackSkill) + (level / 5)));\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "66b30b8d9c58778e", + "equalIndicator/v1": "f6734e7a1cc49e0874710014b3ed90ed8e0b41d9eabd1fe8cf78e498b850e4ae" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::list, unsigned char>>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'std::list, unsigned char\\>\\>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/modal_window_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 91, + "startColumn": 21, + "charOffset": 2565, + "charLength": 6, + "snippet": { + "text": "window" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 89, + "startColumn": 1, + "charOffset": 2468, + "charLength": 152, + "snippet": { + "text": "\tconst auto &window = getUserdataShared(L, 1);\r\n\tif (window) {\r\n\t\tlua_pushnumber(L, window->buttons.size());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "29055e996be48b63", + "equalIndicator/v1": "f67fa33b6bc2d49157f9ac48f5722732d08840d67af1c409458157dbbf7bb4ec" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2131, + "startColumn": 52, + "charOffset": 72072, + "charLength": 7, + "snippet": { + "text": "ownerId" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2129, + "startColumn": 1, + "charOffset": 71917, + "charLength": 176, + "snippet": { + "text": "\r\n\t\t\tif (!harmfulField || (OTSYS_TIME() - createTime <= 5000) || creature->hasBeenAttacked(ownerId)) {\r\n\t\t\t\tconditionCopy->setParam(CONDITION_PARAM_OWNER, ownerId);\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f23d59c5dfaf007e", + "equalIndicator/v1": "f68c1f6a01df5e81e6a578abfb4bef6749228663152ab4e239a7da7d515517ad" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1881, + "startColumn": 21, + "charOffset": 65063, + "charLength": 5, + "snippet": { + "text": "input" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1879, + "startColumn": 1, + "charOffset": 64969, + "charLength": 173, + "snippet": { + "text": "\t\tfor (uint32_t x = 0; x < input->getCols(); ++x) {\r\n\t\t\tuint32_t ry = 0;\r\n\t\t\tfor (int32_t y = input->getRows(); --y >= 0;) {\r\n\t\t\t\t(*output)[ry++][x] = (*input)[y][x];\r\n\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "111cfb3dabd90a79", + "equalIndicator/v1": "f690c96e8d7dbfd35e3674534d8e82addd720b874f93349a2dece90e66833c85" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4163, + "startColumn": 14, + "charOffset": 125251, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4161, + "startColumn": 1, + "charOffset": 125233, + "charLength": 219, + "snippet": { + "text": "}\r\n\r\nvoid Player::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link /*= LINK_OWNER*/) {\r\n\tif (link == LINK_OWNER) {\r\n\t\t// calling movement scripts\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "80fcebe24b92df8e", + "equalIndicator/v1": "f6b8cc9c4a23f89a30605f5a3259a4991dda30446e476d5e4ef5ddc2293e96d0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 423, + "startColumn": 49, + "charOffset": 13775, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 421, + "startColumn": 1, + "charOffset": 13722, + "charLength": 328, + "snippet": { + "text": "}\r\n\r\nbool Actions::useItemEx(std::shared_ptr player, const Position &fromPos, const Position &toPos, uint8_t toStackPos, std::shared_ptr item, bool isHotkey, std::shared_ptr creature /* = nullptr*/) {\r\n\tconst ItemType &it = Item::items[item->getID()];\r\n\tif (it.isRune() || it.type == ITEM_TYPE_POTION) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "429978fddb95a719", + "equalIndicator/v1": "f6bd764d973805431460e0ac4c91c85c5d0cd8fa47ef1086f228acd43bd722be" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7317, + "startColumn": 47, + "charOffset": 219631, + "charLength": 4, + "snippet": { + "text": "cost" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7315, + "startColumn": 1, + "charOffset": 219566, + "charLength": 157, + "snippet": { + "text": "\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tg_metrics().addCounter(\"balance_decrease\", cost, { { \"player\", getName() }, { \"context\", \"forge_fuse\" } });\r\n\r\n\t\t\thistory.cost = cost;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "65534a57a203f4bc", + "equalIndicator/v1": "f6be9fd9d7a7eaf7002816c1c6ed4486ec9b9bc0e34dc2b65445d699fa3b6794" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2063, + "startColumn": 97, + "charOffset": 63327, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2061, + "startColumn": 1, + "charOffset": 63226, + "charLength": 158, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendItemInspection(uint16_t itemId, uint8_t itemCount, std::shared_ptr item, bool cyclopedia) {\r\n\tif (oldProtocol) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a19bdae768966884", + "equalIndicator/v1": "f6c8e4b308cea5191d5dbf7ccf801682b8381e50e3e4004a3c759d3ec2d51773" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 285, + "startColumn": 14, + "charOffset": 8151, + "charLength": 8, + "snippet": { + "text": "blockHit" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 283, + "startColumn": 1, + "charOffset": 8110, + "charLength": 245, + "snippet": { + "text": "\tvoid clearFriendList();\r\n\r\n\tBlockType_t blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense = false, bool checkArmor = false, bool field = false) override;\r\n\r\n\tstatic uint32_t monsterAutoID;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "989ec2abb37c6189", + "equalIndicator/v1": "f6d46477db46eba7a64f7bf897ac16de16aa49e2cc177215898e775852cfc89d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Switch has 2 consecutive identical branches", + "markdown": "Switch has 2 consecutive identical branches" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 699, + "startColumn": 3, + "charOffset": 18491, + "charLength": 4, + "snippet": { + "text": "case" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 697, + "startColumn": 1, + "charOffset": 18471, + "charLength": 105, + "snippet": { + "text": "\r\n\t\t// Bed class\r\n\t\tcase ATTR_SLEEPERGUID: {\r\n\t\t\tif (!propStream.skip(4)) {\r\n\t\t\t\treturn ATTR_READ_ERROR;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8746ae38830d2110", + "equalIndicator/v1": "f6db9bb7100ae87f7074fc95a9f41e7716346de9ecfbbd71e94665f88a9815b4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 329, + "startColumn": 2, + "charOffset": 8616, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 327, + "startColumn": 1, + "charOffset": 8508, + "charLength": 171, + "snippet": { + "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\r\n\tconst Position &position = getPosition(L, 2);\r\n\tuint32_t range = getNumber(L, 3, 4);\r\n\r\n\tif (!npc) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fe9b06ce06b8d186", + "equalIndicator/v1": "f6ed7f8cda02bb52126daf6aee73e7456def3f7bf6d5ce06d2a96f428efe6149" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 289, + "startColumn": 50, + "charOffset": 8961, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 287, + "startColumn": 1, + "charOffset": 8907, + "charLength": 276, + "snippet": { + "text": "}\r\n\r\nbool Combat::isProtected(std::shared_ptr attacker, std::shared_ptr target) {\r\n\tuint32_t protectionLevel = g_configManager().getNumber(PROTECTION_LEVEL, __FUNCTION__);\r\n\tif (target->getLevel() < protectionLevel || attacker->getLevel() < protectionLevel) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c172b90f5f1c2fb9", + "equalIndicator/v1": "f6f011a5d2737dadc15ca9661a5c377a14cf45f8afe71151aaa27e9d886cd212" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7450, + "startColumn": 28, + "charOffset": 259510, + "charLength": 8, + "snippet": { + "text": "attacker" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7448, + "startColumn": 1, + "charOffset": 259444, + "charLength": 288, + "snippet": { + "text": "\r\nvoid Game::buildMessageAsSpectator(\r\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\r\n\tstd::shared_ptr targetPlayer, TextMessage &message, std::stringstream &ss,\r\n\tconst std::string &damageString, std::string &spectatorMessage\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8d98b88a4cbdcf33", + "equalIndicator/v1": "f701bf361355453cbc6bd5a52bc3c296b7f6b569600770e62297fa9c1b92e637" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 778, + "startColumn": 29, + "charOffset": 23689, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 776, + "startColumn": 1, + "charOffset": 23503, + "charLength": 291, + "snippet": { + "text": "\tif (item->isStackable() && count != item->getItemCount()) {\r\n\t\tuint8_t newCount = static_cast(std::max(0, item->getItemCount() - count));\r\n\t\tconst int32_t oldWeight = item->getWeight();\r\n\t\titem->setItemCount(newCount);\r\n\t\tupdateItemWeight(-oldWeight + item->getWeight());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a0854365e336b7b6", + "equalIndicator/v1": "f714f921f44081d26fefc4faf9397b0804138cbfa57bfa93490bb9191fff4e48" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1958, + "startColumn": 2, + "charOffset": 59924, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1956, + "startColumn": 1, + "charOffset": 59846, + "charLength": 203, + "snippet": { + "text": "\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tuint32_t playerId = msg.get();\r\n\tg_game().playerRequestTrade(player->getID(), pos, stackpos, playerId, itemId);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "267a46e6c3ef8c63", + "equalIndicator/v1": "f7160a12be770d196732dd4733d27f39adecd8e5be5a2f81f3dcb5de3889f197" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 156, + "startColumn": 32, + "charOffset": 4340, + "charLength": 29, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 154, + "startColumn": 1, + "charOffset": 4171, + "charLength": 301, + "snippet": { + "text": "\tbool registerLuaUniqueEvent(const std::shared_ptr action);\r\n\tbool registerLuaActionEvent(const std::shared_ptr action);\r\n\tbool registerLuaPositionEvent(const std::shared_ptr action);\r\n\tbool registerLuaEvent(const std::shared_ptr action);\r\n\t// Clear maps for reloading\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "51130631ddf68101", + "equalIndicator/v1": "f71ccde461f32d760f403269586870c3ae39e572d393cc5be524483eef8f53bd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 40, + "startColumn": 42, + "charOffset": 1334, + "charLength": 4, + "snippet": { + "text": "keys" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 38, + "startColumn": 1, + "charOffset": 1223, + "charLength": 194, + "snippet": { + "text": "\tvirtual std::shared_ptr scoped(const std::string &scope) = 0;\r\n\r\n\tvirtual std::unordered_set keys(const std::string &prefix = \"\") = 0;\r\n\r\n\tvoid remove(const std::string &key);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f5ff5866a02c1589", + "equalIndicator/v1": "f723ba63b3afce84ff85def5565160dc412395dfbadefd991c9f830644694816" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 252, + "startColumn": 30, + "charOffset": 8282, + "charLength": 32, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 250, + "startColumn": 1, + "charOffset": 8090, + "charLength": 364, + "snippet": { + "text": "\r\n\tstatic uint32_t EquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool boolean);\r\n\tstatic uint32_t DeEquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool boolean);\r\n\r\n\tvoid setFromXML(bool newFromXML) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "079599d3461d5aa6", + "equalIndicator/v1": "f7566a953ba63e3bafec6093bf3d710e58936cdc870db41648048ede414b7427" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1116, + "startColumn": 7, + "charOffset": 42426, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1114, + "startColumn": 1, + "charOffset": 42320, + "charLength": 212, + "snippet": { + "text": "// Npc\r\nvoid EventCallback::npcOnSpawn(std::shared_ptr npc, const Position &position) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"{} - \"\r\n\t\t \"Position {}\"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c877c58a599bcb70", + "equalIndicator/v1": "f7a32f19d1f2cc5357a395136110c5e11bccb7d864c57f87d05d916fac8012de" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'destination' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'destination' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 141, + "startColumn": 48, + "charOffset": 3772, + "charLength": 11, + "snippet": { + "text": "destination" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 139, + "startColumn": 1, + "charOffset": 3720, + "charLength": 119, + "snippet": { + "text": "}\r\n\r\nbool Bank::deposit(const std::shared_ptr destination) {\r\n\tauto bankable = getBankable();\r\n\tif (!bankable) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e978aaab3bfe5d1d", + "equalIndicator/v1": "f7aa950171aaa7b18d9cd69f524bf1d1299e2ff2705a291c1128f9759ffd85e5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Either cast from 'uint32_t' (aka 'unsigned int') to 'uint64_t' (aka 'unsigned long long') is ineffective, or there is loss of precision before the conversion", + "markdown": "Either cast from 'uint32_t' (aka 'unsigned int') to 'uint64_t' (aka 'unsigned long long') is ineffective, or there is loss of precision before the conversion" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 408, + "startColumn": 19, + "charOffset": 13871, + "charLength": 11, + "snippet": { + "text": "static_cast" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 406, + "startColumn": 1, + "charOffset": 13810, + "charLength": 329, + "snippet": { + "text": "\r\n\tauto totalRemoved = amount - toRemove;\r\n\tauto totalCost = static_cast(sellPrice * totalRemoved);\r\n\tg_logger().debug(\"[Npc::onPlayerSellItem] - Removing items from player {} amount {} of items with id {} on shop for npc {}\", player->getName(), toRemove, itemId, getName());\r\n\tif (totalRemoved > 0 && totalCost > 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "82210e66cf401e95", + "equalIndicator/v1": "f7cb503d77a4947509a4c969f6958aa82d124f9dbade64352a879ff2618175cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 312, + "startColumn": 20, + "charOffset": 11689, + "charLength": 3, + "snippet": { + "text": "exp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 310, + "startColumn": 1, + "charOffset": 11616, + "charLength": 140, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Party\");\r\n\r\n\tlua_pushnumber(L, exp);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "121a22d03ea39955", + "equalIndicator/v1": "f806b4cf3b9258eee22bdcc97e1a821521b6f26802e7515fd84f6b31f93b4c7a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 377, + "startColumn": 5, + "charOffset": 12499, + "charLength": 10, + "snippet": { + "text": "defaultMap" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 375, + "startColumn": 1, + "charOffset": 12458, + "charLength": 126, + "snippet": { + "text": "\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_HEALING:\r\n\t\t\t\tdefaultMap[7] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "11218b6ae94021d7", + "equalIndicator/v1": "f80e1d1b3bada975bb95793b658b7551a186083e18ec44cee1fceb0bf605d552" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 404, + "startColumn": 72, + "charOffset": 15783, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 402, + "startColumn": 1, + "charOffset": 15707, + "charLength": 187, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerBestiarySystem(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ce79a3f40ffd38a9", + "equalIndicator/v1": "f82eac19d72af237dc713805b2fe21e1346499656f7a3a8b48d9444375375159" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'connection' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'connection' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 95, + "startColumn": 43, + "charOffset": 2467, + "charLength": 10, + "snippet": { + "text": "connection" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 93, + "startColumn": 1, + "charOffset": 2420, + "charLength": 134, + "snippet": { + "text": "}\r\n\r\nvoid ServicePort::onAccept(Connection_ptr connection, const std::error_code &error) {\r\n\tif (!error) {\r\n\t\tif (services.empty()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "77f7fd7d50c6421c", + "equalIndicator/v1": "f82f9cf20d00f2f4bb320a7b7d5741608644c833b163047bccced983c9f7f6b2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::_Tree, std::allocator>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'std::_Tree, std::allocator\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 904, + "startColumn": 57, + "charOffset": 26548, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 902, + "startColumn": 1, + "charOffset": 26487, + "charLength": 175, + "snippet": { + "text": "}\r\n\r\nint GameFunctions::luaGameGetAchievements(lua_State* L) {\r\n\t// Game.getAchievements()\r\n\tconst std::map &achievements = g_game().getAchievements();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7668e2423d3f8a48", + "equalIndicator/v1": "f836cc29cbcf5d8252c1600e147d14b7581a3c34d341be9bc74726a2b62bb7bb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'condition' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'condition' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1353, + "startColumn": 56, + "charOffset": 41454, + "charLength": 9, + "snippet": { + "text": "condition" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1351, + "startColumn": 1, + "charOffset": 41394, + "charLength": 189, + "snippet": { + "text": "}\r\n\r\nbool Creature::addCondition(std::shared_ptr condition, bool attackerPlayer /* = false*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (condition == nullptr) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fd9e77d469124781", + "equalIndicator/v1": "f845ed7c7668c35f50e814b30026b049b2ebe5e12cc411939a42c2d8279d6f9f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3153, + "startColumn": 231, + "charOffset": 95021, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3151, + "startColumn": 1, + "charOffset": 94750, + "charLength": 359, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\r\n\t} else {\r\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\r\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\r\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fa705348a9b4c20b", + "equalIndicator/v1": "f870f7207342126e974574cd9622625f597c0275e3a549c5d5d5affd9e15f45e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 673, + "startColumn": 26, + "charOffset": 21832, + "charLength": 6, + "snippet": { + "text": "damage" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 671, + "startColumn": 1, + "charOffset": 21675, + "charLength": 276, + "snippet": { + "text": "\t\tdamage.secondary.type = imbuementInfo.imbuement->combatType;\r\n\t\tdamage.secondary.value = damage.primary.value * (damagePercent);\r\n\t\tdamage.primary.value = damage.primary.value * (1 - damagePercent);\r\n\r\n\t\tif (imbuementInfo.imbuement->soundEffect != SoundEffect_t::SILENCE) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e106233adea1337b", + "equalIndicator/v1": "f87311de167ac4fba7ca0f8fdc490add710111e3bc6815b62e7f6d527109f9a8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 686, + "startColumn": 89, + "charOffset": 22283, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 684, + "startColumn": 1, + "charOffset": 22190, + "charLength": 234, + "snippet": { + "text": "}\r\n\r\nvoid Combat::CombatManaFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\r\n\tif (!data) {\r\n\t\tg_logger().error(\"[{}]: CombatDamage is nullptr\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "83b76a0d3119aba7", + "equalIndicator/v1": "f8825a847015e55637d56619b8c00de157232b6455b0034baa6b16903390f384" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", + "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2312, + "startColumn": 26, + "charOffset": 80373, + "charLength": 10, + "snippet": { + "text": "std::round" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2310, + "startColumn": 1, + "charOffset": 80267, + "charLength": 263, + "snippet": { + "text": "\tint32_t damageBonus = 0;\r\n\tuint8_t stage = getStage(WheelStage_t::TWIN_BURST);\r\n\tint32_t healthPercent = std::round((static_cast(target->getHealth()) * 100) / static_cast(target->getMaxHealth()));\r\n\tif (healthPercent > 60) {\r\n\t\tif (stage >= 3) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "39541f2a17d206e9", + "equalIndicator/v1": "f8829ad454c9d5206a63f43b1f86a528acc9484fed3739f549287ea07c04a604" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'bed' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'bed' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 423, + "startColumn": 48, + "charOffset": 12318, + "charLength": 3, + "snippet": { + "text": "bed" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 421, + "startColumn": 1, + "charOffset": 12266, + "charLength": 109, + "snippet": { + "text": "}\r\n\r\nvoid House::removeBed(std::shared_ptr bed) {\r\n\tbed->setHouse(nullptr);\r\n\tbedsList.remove(bed);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a10eff04ab860be5", + "equalIndicator/v1": "f8ac0c6eec729dca276239bfec16459c1cf5a6334600790685105bbda1e2a06d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3334, + "startColumn": 64, + "charOffset": 101727, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3332, + "startColumn": 1, + "charOffset": 101659, + "charLength": 142, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureSkull(std::shared_ptr creature) {\r\n\tif (g_game().getWorldType() != WORLD_TYPE_PVP) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9f04fd5c5c1f2074", + "equalIndicator/v1": "f8bd669d5379675d00a0efe42343f6a709bc47a285af59f8ae4772023cff4abf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 365, + "startColumn": 78, + "charOffset": 10507, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 363, + "startColumn": 1, + "charOffset": 10425, + "charLength": 284, + "snippet": { + "text": "}\r\n\r\nvoid House::handleWrapableItem(ItemList &moveItemList, std::shared_ptr item, std::shared_ptr player, std::shared_ptr houseTile) const {\r\n\tif (item->isWrapContainer()) {\r\n\t\tg_logger().debug(\"[{}] found wrapable item '{}'\", __FUNCTION__, item->getName());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "58f1103db3ef5fda", + "equalIndicator/v1": "f8c4ed2b6977b461faf10f9a23ac66d60dc7151441e03ad8fd840046b44201f6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1312, + "startColumn": 9, + "charOffset": 38727, + "charLength": 9, + "snippet": { + "text": "creatures" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1310, + "startColumn": 1, + "charOffset": 38701, + "charLength": 54, + "snippet": { + "text": "\t\t\t}\r\n\t\t} else {\r\n\t\t\tn += creatures->size();\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "91a9dacffe85202a", + "equalIndicator/v1": "f8cb34adc57375caa4782c2938e21c7c0ebd860be0eeb66fb8e3173a7d842352" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 14, + "charOffset": 1138, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1093, + "charLength": 486, + "snippet": { + "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "615ac66cc2c2c17a", + "equalIndicator/v1": "f8d27c0ff4abd829895b93c273f91f80ca94dd90724c5ba1b06796a16ecf829f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1072, + "startColumn": 7, + "charOffset": 38520, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1070, + "startColumn": 1, + "charOffset": 38508, + "charLength": 146, + "snippet": { + "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnLoseExperience - \"\r\n\t\t \"Player {}] \"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b630deeff2ae07ae", + "equalIndicator/v1": "f8d8b0aaad7e81c7e343ad2ca7c32454de774995a0306bec1f5c52a7c3828857" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 193, + "startColumn": 46, + "charOffset": 5186, + "charLength": 9, + "snippet": { + "text": "lua_State" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 191, + "startColumn": 1, + "charOffset": 5136, + "charLength": 163, + "snippet": { + "text": "}\r\n\r\nint PlayerFunctions::luaPlayeraddCharmPoints(lua_State* L) {\r\n\t// player:addCharmPoints()\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "806cf2be93c9fcf1", + "equalIndicator/v1": "f8f82bbd0f4ab744a0dbce7b3492059fa37952eb0f440c2be091014318ba0320" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable is copied but only used as const reference; consider making it a const reference", + "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 820, + "startColumn": 29, + "charOffset": 24635, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 818, + "startColumn": 1, + "charOffset": 24495, + "charLength": 234, + "snippet": { + "text": "uint32_t Container::getItemTypeCount(uint16_t itemId, int32_t subType /* = -1*/) const {\r\n\tuint32_t count = 0;\r\n\tfor (std::shared_ptr item : itemlist) {\r\n\t\tif (item->getID() == itemId) {\r\n\t\t\tcount += countByType(item, subType);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9f416abf71ddf75d", + "equalIndicator/v1": "f912cb459254cf9f048f184e18ae5d6081d0571d974cdfbf9665cbf95eb04d33" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 326, + "startColumn": 15, + "charOffset": 10266, + "charLength": 11, + "snippet": { + "text": "newDuration" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 324, + "startColumn": 1, + "charOffset": 10127, + "charLength": 160, + "snippet": { + "text": "\tif (newDuration > 0 && (!prevIt.stopTime || !hasAttribute(ItemAttribute_t::DURATION))) {\r\n\t\tsetDecaying(DECAYING_PENDING);\r\n\t\tsetDuration(newDuration);\r\n\t}\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3baa8f8d795c8755", + "equalIndicator/v1": "f91bd30f51923902852f8093b9b0bb3b0cc9f0a0d860cd98905c47193e6c4ac1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/rewardchest.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 21, + "startColumn": 26, + "charOffset": 606, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 19, + "startColumn": 1, + "charOffset": 576, + "charLength": 200, + "snippet": { + "text": "}\r\n\r\nReturnValue RewardChest::queryAdd(int32_t, const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr actor /* = nullptr*/) {\r\n\tif (actor) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "46747c0e53836096", + "equalIndicator/v1": "f9448637a9e36efa51ff5bd64e085174f022d224a4575b5071b8aa3877f7e374" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 715, + "startColumn": 19, + "charOffset": 21505, + "charLength": 18, + "snippet": { + "text": "CONDITION_BLEEDING" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 713, + "startColumn": 1, + "charOffset": 21405, + "charLength": 194, + "snippet": { + "text": "\tConditionType_t conditionType = CONDITION_NONE;\r\n\tif (immunity == \"physical\") {\r\n\t\tconditionType = CONDITION_BLEEDING;\r\n\t} else if (immunity == \"energy\") {\r\n\t\tconditionType = CONDITION_ENERGY;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1ea6b0c5a138c88d", + "equalIndicator/v1": "f950cc463fc00e42de40c0962bef5e6f0f7d737fa04c1cf8244bf97dab53e41b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", + "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 67, + "startColumn": 10, + "charOffset": 2004, + "charLength": 8, + "snippet": { + "text": "Position" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 65, + "startColumn": 1, + "charOffset": 1846, + "charLength": 215, + "snippet": { + "text": "Position Zone::getRemoveDestination(const std::shared_ptr &creature /* = nullptr */) const {\r\n\tif (!creature || !creature->getPlayer()) {\r\n\t\treturn Position();\r\n\t}\r\n\tif (removeDestination != Position()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cbefed57fb0ede36", + "equalIndicator/v1": "f9875bfa6bcf8f36b194b03f893cd5af9fad5daf51e4283e870c0b115a0323f6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 771, + "startColumn": 7, + "charOffset": 24353, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 769, + "startColumn": 1, + "charOffset": 24261, + "charLength": 289, + "snippet": { + "text": "\t// onEquip(player, item, slot, isCheck)\r\n\t// onDeEquip(player, item, slot, isCheck)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[MoveEvent::executeEquip - Player {} item {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0c0f495d7d9b5bf3", + "equalIndicator/v1": "f9ab86c266543c57e58d84c631d76e9f2e88a5fc0bf7419d69201839a7477b0a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 556, + "startColumn": 19, + "charOffset": 17128, + "charLength": 9, + "snippet": { + "text": "slotIndex" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 554, + "startColumn": 1, + "charOffset": 16888, + "charLength": 334, + "snippet": { + "text": "\t\t\t\tif (containerItem != item && containerItem->equals(item) && containerItem->getItemCount() < containerItem->getStackSize()) {\r\n\t\t\t\t\tuint32_t remainder = (containerItem->getStackSize() - containerItem->getItemCount());\r\n\t\t\t\t\tif (queryAdd(slotIndex++, item, remainder, flags) == RETURNVALUE_NOERROR) {\r\n\t\t\t\t\t\tn += remainder;\r\n\t\t\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "78350605d26183aa", + "equalIndicator/v1": "f9b9d9e0ca7772dcc41beb260bf19612142411a7ba19ca5f74e1bbb0e252bbe2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4910, + "startColumn": 29, + "charOffset": 146620, + "charLength": 10, + "snippet": { + "text": "soulChange" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4908, + "startColumn": 1, + "charOffset": 146521, + "charLength": 265, + "snippet": { + "text": "void Player::changeSoul(int32_t soulChange) {\r\n\tif (soulChange > 0) {\r\n\t\tsoul += std::min(soulChange * g_configManager().getFloat(RATE_SOUL_REGEN, __FUNCTION__), vocation->getSoulMax() - soul);\r\n\t} else {\r\n\t\tsoul = std::max(0, soul + soulChange);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "62231767ac5348d7", + "equalIndicator/v1": "f9fbe356a8ef25a69a844b84cdd03f3b679c8e17674d99e7cf25d1da5e2333ba" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", + "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 581, + "startColumn": 104, + "charOffset": 27641, + "charLength": 14, + "snippet": { + "text": "valueAttribute" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 579, + "startColumn": 1, + "charOffset": 27409, + "charLength": 435, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += value;\r\n\t} else if (stringValue == \"absorbpercentenergy\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentfire\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a1ffe3ae11ba0388", + "equalIndicator/v1": "fa0433b6494a084c7b0c8f2a51f423e7f5cc1daa57271247fc1c948e168f34a8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3174, + "startColumn": 64, + "charOffset": 118278, + "charLength": 4, + "snippet": { + "text": "item" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3172, + "startColumn": 1, + "charOffset": 118210, + "charLength": 145, + "snippet": { + "text": "}\r\n\r\nObjectCategory_t Game::getObjectCategory(std::shared_ptr item) {\r\n\tObjectCategory_t category = OBJECTCATEGORY_DEFAULT;\r\n\tif (!item) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1cf3a0f37473ee1a", + "equalIndicator/v1": "fa0b34eaa96ae6f3fb6ce2f4b06c0d1227773da34ce76dd102f6da867ea245c5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #4 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #4 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 351, + "startColumn": 16, + "charOffset": 9513, + "charLength": 16, + "snippet": { + "text": "onRemoveTileItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 349, + "startColumn": 1, + "charOffset": 9493, + "charLength": 173, + "snippet": { + "text": "}\r\n\r\nvoid Creature::onRemoveTileItem(std::shared_ptr updateTile, const Position &pos, const ItemType &iType, std::shared_ptr) {\r\n\tif (!isMapLoaded) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "25996123a270dfbc", + "equalIndicator/v1": "fa0c9dfcd753696cf576fa616272d6ee3a9a6280d6ae2f342aa18d72ebc14272" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2132, + "startColumn": 52, + "charOffset": 62796, + "charLength": 4, + "snippet": { + "text": "task" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2130, + "startColumn": 1, + "charOffset": 62740, + "charLength": 136, + "snippet": { + "text": "}\r\n\r\nvoid Player::setNextWalkTask(std::shared_ptr task) {\r\n\tif (nextStepEvent != 0) {\r\n\t\tg_dispatcher().stopEvent(nextStepEvent);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c124241a66ac389e", + "equalIndicator/v1": "fa18b6d3d2e0e072cc58cd11704ac845beb2b88b5142e9804511f8fdc6dd0095" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #3 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #3 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 339, + "startColumn": 109, + "charOffset": 9183, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 337, + "startColumn": 1, + "charOffset": 9070, + "charLength": 223, + "snippet": { + "text": "}\r\n\r\nvoid Creature::onUpdateTileItem(std::shared_ptr updateTile, const Position &pos, std::shared_ptr, const ItemType &oldType, std::shared_ptr, const ItemType &newType) {\r\n\tif (!isMapLoaded) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1d584352e3b1f46f", + "equalIndicator/v1": "fa1a7790bbf5ed1bd261ea17a5e747d416e9be118accb68415df2d9e331ef722" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 167, + "startColumn": 80, + "charOffset": 5125, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 165, + "startColumn": 1, + "charOffset": 5041, + "charLength": 194, + "snippet": { + "text": "}\r\n\r\nbool Weapon::useFist(std::shared_ptr player, std::shared_ptr target) {\r\n\tif (!Position::areInRange<1, 1>(player->getPosition(), target->getPosition())) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b8b8ed2b29b82aac", + "equalIndicator/v1": "fa1e4c0f255772dd08f8bc3907b4a08a4c392ff5c9c313b4b89db0755cca4a19" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Std::move of the variable 'newTargetPos' of the trivially-copyable type 'Position' has no effect; remove std::move()", + "markdown": "Std::move of the variable 'newTargetPos' of the trivially-copyable type 'Position' has no effect; remove std::move()" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 43, + "startColumn": 13, + "charOffset": 1432, + "charLength": 9, + "snippet": { + "text": "std::move" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 41, + "startColumn": 1, + "charOffset": 1348, + "charLength": 242, + "snippet": { + "text": "public:\r\n\texplicit FrozenPathingConditionCall(Position newTargetPos) :\r\n\t\ttargetPos(std::move(newTargetPos)) { }\r\n\r\n\tbool operator()(const Position &startPos, const Position &testPos, const FindPathParams &fpp, int32_t &bestMatchDist) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b46ce5c0085f19c1", + "equalIndicator/v1": "fa2dc86c0aa412fe2560544493ce4b64c544c963d55d75c7d0f8e3aa91cd1cdd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'time_t' (aka 'long long') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'time_t' (aka 'long long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1740, + "startColumn": 36, + "charOffset": 51827, + "charLength": 4, + "snippet": { + "text": "time" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1738, + "startColumn": 1, + "charOffset": 51656, + "charLength": 250, + "snippet": { + "text": "\t\tif (getLastLogout() != 0) {\r\n\t\t\t// Not counting more than 21 days to prevent overflow when multiplying with 1000 (for milliseconds).\r\n\t\t\tofflineTime = std::min(time(nullptr) - getLastLogout(), 86400 * 21);\r\n\t\t} else {\r\n\t\t\tofflineTime = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "37ace78b5bd56f9a", + "equalIndicator/v1": "fa5bccdb8798a8adb52624090521b962f3ed3e0e861d1d596e28e562ce49f466" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'virtual' is redundant since the function is already declared 'override'", + "markdown": "'virtual' is redundant since the function is already declared 'override'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 179, + "startColumn": 22, + "charOffset": 7043, + "charLength": 8, + "snippet": { + "text": "queryAdd" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 177, + "startColumn": 1, + "charOffset": 6961, + "charLength": 239, + "snippet": { + "text": "\tstatic std::shared_ptr virtualCylinder;\r\n\r\n\tvirtual ReturnValue queryAdd(int32_t, const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr = nullptr) override {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "05ca809f11aa95c3", + "equalIndicator/v1": "fa6e8800c011bb9bacaca55729712e63fb6c25f378e62b06afe3996129e979f2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1091, + "startColumn": 60, + "charOffset": 45264, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1089, + "startColumn": 1, + "charOffset": 45200, + "charLength": 242, + "snippet": { + "text": "}\r\n\r\nbool Game::internalPlaceCreature(std::shared_ptr creature, const Position &pos, bool extendedPos /*=false*/, bool forced /*= false*/, bool creatureCheck /*= false*/) {\r\n\tif (creature->getParent() != nullptr) {\r\n\t\treturn false;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a2e70ee0e4ec949f", + "equalIndicator/v1": "fa7848e9828adbff2e6a5ea5bfd0d73933942b85ec3a904fd292272793c4d91a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1297, + "startColumn": 53, + "charOffset": 43232, + "charLength": 6, + "snippet": { + "text": "caster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1295, + "startColumn": 1, + "charOffset": 43175, + "charLength": 247, + "snippet": { + "text": "}\r\n\r\nvoid Combat::doCombatMana(std::shared_ptr caster, std::shared_ptr target, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tdoCombatMana(caster, target, caster ? caster->getPosition() : Position(), damage, params);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6bc0af5c5d3b3d9a", + "equalIndicator/v1": "fa7cf22e465d1d45821f1157d4c5e2db9181ad842c3cf1ad2ede4c65991799dc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'party' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'party' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7908, + "startColumn": 76, + "charOffset": 248562, + "charLength": 5, + "snippet": { + "text": "party" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7906, + "startColumn": 1, + "charOffset": 248482, + "charLength": 165, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::updatePartyTrackerAnalyzer(const std::shared_ptr party) {\r\n\tif (oldProtocol || !player || !party || !party->getLeader()) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "171bd686e93db3ac", + "equalIndicator/v1": "fa7d13d811aee71cb50a03e246497881c17581529e042d06c2a72f29af34bd1d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 150, + "startColumn": 19, + "charOffset": 6030, + "charLength": 16, + "snippet": { + "text": "getItemTypeCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 148, + "startColumn": 1, + "charOffset": 5949, + "charLength": 152, + "snippet": { + "text": "\t * \\returns the amount of items of the asked item type\r\n\t */\r\n\tvirtual uint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const;\r\n\r\n\t/**\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d78af08df7f4f220", + "equalIndicator/v1": "fa8875fd16565f49b28cfea164394050e6a1beffe8cec959ed577964fb340d94" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Do not use 'compare' to test equality of strings; use the string equality operator instead", + "markdown": "Do not use 'compare' to test equality of strings; use the string equality operator instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2315, + "startColumn": 48, + "charOffset": 64378, + "charLength": 15, + "snippet": { + "text": "conditionOutfit" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2313, + "startColumn": 1, + "charOffset": 64217, + "charLength": 330, + "snippet": { + "text": "\r\n\t\tconst std::shared_ptr &conditionOutfit = addCondition->static_self_cast();\r\n\t\tif (!conditionOutfit->monsterName.empty() && conditionOutfit->monsterName.compare(monsterName) != 0) {\r\n\t\t\tconst auto monsterType = g_monsters().getMonsterType(conditionOutfit->monsterName);\r\n\t\t\tif (monsterType) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "802af88dbf594e3c", + "equalIndicator/v1": "faa32a73a27247902a99a6d409eb0ba8bf281dd8f0bd6ea5c8149ae36e358da8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/attribute.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 143, + "startColumn": 50, + "charOffset": 4411, + "charLength": 12, + "snippet": { + "text": "const double" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 141, + "startColumn": 1, + "charOffset": 4213, + "charLength": 290, + "snippet": { + "text": "\tvoid setCustomAttribute(const std::string &key, const int64_t value);\r\n\tvoid setCustomAttribute(const std::string &key, const std::string &value);\r\n\tvoid setCustomAttribute(const std::string &key, const double value);\r\n\tvoid setCustomAttribute(const std::string &key, const bool value);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0b1e91c84ac15b06", + "equalIndicator/v1": "fab45b19c9584886816991191311b0163247b1698714821aa0e5f31b08e50000" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2704, + "startColumn": 4, + "charOffset": 83425, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2702, + "startColumn": 1, + "charOffset": 83340, + "charLength": 213, + "snippet": { + "text": "\t\tuint16_t size = msg.get();\r\n\t\tfor (uint16_t i = 1; i <= size; i++) {\r\n\t\t\tuint16_t itemId = msg.get();\r\n\t\t\tuint64_t price = msg.get();\r\n\t\t\tplayer->setItemCustomPrice(itemId, price);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f5ece12efcac857b", + "equalIndicator/v1": "fad39377d6b89a507e3eb87fe2891da5bb70371d020c1d0a3d846dd1493ddc64" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 479, + "startColumn": 102, + "charOffset": 13737, + "charLength": 5, + "snippet": { + "text": "house" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 477, + "startColumn": 1, + "charOffset": 13631, + "charLength": 252, + "snippet": { + "text": "}\r\n\r\nstd::shared_ptr HouseTransferItem::createHouseTransferItem(std::shared_ptr house) {\r\n\tstd::shared_ptr transferItem = std::make_shared(house);\r\n\ttransferItem->setID(ITEM_DOCUMENT_RO);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a216eb5e49bafb69", + "equalIndicator/v1": "fafbfbc78302e9946702e21f1140f88399336a5f79399e04b619c9ad9b042ce8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 935, + "startColumn": 51, + "charOffset": 28039, + "charLength": 5, + "snippet": { + "text": "thing" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 933, + "startColumn": 1, + "charOffset": 27984, + "charLength": 139, + "snippet": { + "text": "}\r\n\r\nvoid Container::removeItem(std::shared_ptr thing, bool sendUpdateToClient /* = false*/) {\r\n\tif (thing == nullptr) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e8b63a247adc9178", + "equalIndicator/v1": "fb0326b71a595c7319638cb975eab4c042a21cfb8a4193c2a9e4904a7becd983" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3239, + "startColumn": 83, + "charOffset": 99273, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3237, + "startColumn": 1, + "charOffset": 99186, + "charLength": 155, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::addCreatureIcon(NetworkMessage &msg, std::shared_ptr creature) {\r\n\tif (!creature || !player || oldProtocol) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "661bb71cb1195a8b", + "equalIndicator/v1": "fb0e3ebfd1759f2e598b87055ef306d3acdb6ad02117ebec8ff72bbe2cd2f5cd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Declaration uses identifier '_Ilist', which is a reserved identifier", + "markdown": "Declaration uses identifier '_Ilist', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/arraylist.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 34, + "startColumn": 49, + "charOffset": 985, + "charLength": 6, + "snippet": { + "text": "_Ilist" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 32, + "startColumn": 1, + "charOffset": 930, + "charLength": 117, + "snippet": { + "text": "\t\t}\r\n\r\n\t\tarraylist &operator=(std::initializer_list _Ilist) {\r\n\t\t\tbackContainer.assign(_Ilist);\r\n\t\t\treturn *this;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c14295f041c52e26", + "equalIndicator/v1": "fb1281d5c0891308d2d203e206c3fc593ba817c81196734d5e787350a9df7428" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 704, + "startColumn": 2, + "charOffset": 19401, + "charLength": 8, + "snippet": { + "text": "uint32_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 702, + "startColumn": 1, + "charOffset": 19250, + "charLength": 323, + "snippet": { + "text": "\tConditionType_t conditionType = getNumber(L, 2);\r\n\tConditionId_t conditionId = getNumber(L, 3, CONDITIONID_COMBAT);\r\n\tuint32_t subId = getNumber(L, 4, 0);\r\n\tconst std::shared_ptr condition = creature->getCondition(conditionType, conditionId, subId);\r\n\tif (condition) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7cbd9d2377eced67", + "equalIndicator/v1": "fb23e46f1b344f36bd378f578463a0f3f9249b3654329a907b78aa79c4154f19" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9255, + "startColumn": 46, + "charOffset": 323299, + "charLength": 10, + "snippet": { + "text": "totalPrice" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9253, + "startColumn": 1, + "charOffset": 323174, + "charLength": 313, + "snippet": { + "text": "\r\n\t\tsellerPlayer->setBankBalance(sellerPlayer->getBankBalance() + totalPrice);\r\n\t\tg_metrics().addCounter(\"balance_increase\", totalPrice, { { \"player\", sellerPlayer->getName() }, { \"context\", \"market_sale\" } });\r\n\t\tif (it.id == ITEM_STORE_COIN) {\r\n\t\t\tconst auto &tranferable = enumToValue(CoinType::Transferable);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d0e000cdf44c24b9", + "equalIndicator/v1": "fb3b1caddbff1327843ed81b48984db958bc92bd89080d2c9766ce4aed7a4a8e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2576, + "startColumn": 28, + "charOffset": 76948, + "charLength": 5, + "snippet": { + "text": "count" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2574, + "startColumn": 1, + "charOffset": 76915, + "charLength": 116, + "snippet": { + "text": "\t}\r\n\r\n\tdouble_t result = round(((count * 100.) / nextLevelCount) * 100.) / 100.;\r\n\tif (result > 100) {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4c2b6f32ca004161", + "equalIndicator/v1": "fb8710e1397a54cb3f9f04fd174414a0aceb097cfc2556407da71b5e0b8b973e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'hasImbuementType' can be made const", + "markdown": "Method 'hasImbuementType' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 694, + "startColumn": 7, + "charOffset": 19972, + "charLength": 16, + "snippet": { + "text": "hasImbuementType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 692, + "startColumn": 1, + "charOffset": 19916, + "charLength": 237, + "snippet": { + "text": "\t\treturn setImbuement(slot, imbuementId, 0);\r\n\t}\r\n\tbool hasImbuementType(ImbuementTypes_t imbuementType, uint16_t imbuementTier) {\r\n\t\tauto it = items[id].imbuementTypes.find(imbuementType);\r\n\t\tif (it != items[id].imbuementTypes.end()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "703f55fe09c41955", + "equalIndicator/v1": "fb9036614ab1a2a60b17020e47567e5aa4aa75389a71d11a1eeba685ddb5bb27" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double' to 'uint16_t' (aka 'unsigned short')", + "markdown": "Narrowing conversion from 'double' to 'uint16_t' (aka 'unsigned short')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 201, + "startColumn": 34, + "charOffset": 8046, + "charLength": 50, + "snippet": { + "text": "(std::floor(100. - imbuementAbsorbPercent) / 100.)" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 199, + "startColumn": 1, + "charOffset": 7816, + "charLength": 297, + "snippet": { + "text": "\t\t\t\t\t\tg_logger().debug(\"[cyclopedia damage reduction] imbued item {}, reduced {} percent, for element {}\", item->getName(), imbuementAbsorbPercent, combatTypeToName(indexToCombatType(combat)));\r\n\r\n\t\t\t\t\t\tdamageModifiers[combat] *= (std::floor(100. - imbuementAbsorbPercent) / 100.);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2acebe8fc7a6b7c7", + "equalIndicator/v1": "fb95cd9089e0713102ca8e6eb4e32f2d223c10182c7b901dc4fdacf615da25fb" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2365, + "startColumn": 54, + "charOffset": 69634, + "charLength": 6, + "snippet": { + "text": "target" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2363, + "startColumn": 1, + "charOffset": 69576, + "charLength": 228, + "snippet": { + "text": "}\r\n\r\nvoid Player::addExperience(std::shared_ptr target, uint64_t exp, bool sendText /* = false*/) {\r\n\tuint64_t currLevelExp = Player::getExpForLevel(level);\r\n\tuint64_t nextLevelExp = Player::getExpForLevel(level + 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "556b260a6ccd9364", + "equalIndicator/v1": "fba4d0d3fa7775c272f1a64361b454f3b67e49d55184f86748065e2d78419e0b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead", + "markdown": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 10082, + "startColumn": 32, + "charOffset": 350963, + "charLength": 9, + "snippet": { + "text": "std::atoi" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 10080, + "startColumn": 1, + "charOffset": 350791, + "charLength": 319, + "snippet": { + "text": "\t// Get interval time to fiendish\r\n\tstd::string saveIntervalType = g_configManager().getString(FORGE_FIENDISH_INTERVAL_TYPE, __FUNCTION__);\r\n\tauto saveIntervalConfigTime = std::atoi(g_configManager().getString(FORGE_FIENDISH_INTERVAL_TIME, __FUNCTION__).c_str());\r\n\tint intervalTime = 0;\r\n\ttime_t timeToChangeFiendish;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c92c2c24856a6bc7", + "equalIndicator/v1": "fbb732660ae23471da5da0999580e57e20b04704859a9edcf89dee15e3fc8091" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The const qualified parameter 'callback' is copied for each invocation; consider making it a reference", + "markdown": "The const qualified parameter 'callback' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/events_callbacks.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 31, + "startColumn": 72, + "charOffset": 1014, + "charLength": 8, + "snippet": { + "text": "callback" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 29, + "startColumn": 1, + "charOffset": 938, + "charLength": 126, + "snippet": { + "text": "}\r\n\r\nvoid EventsCallbacks::addCallback(const std::shared_ptr callback) {\r\n\tm_callbacks.push_back(callback);\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "72b7911f68ae2d21", + "equalIndicator/v1": "fbe3d1fa65988ebf65fdcf696776a08fe8655b088b67906e360c56473b62f9f0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/creaturecallback.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 27, + "startColumn": 54, + "charOffset": 884, + "charLength": 6, + "snippet": { + "text": "params" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 25, + "startColumn": 1, + "charOffset": 802, + "charLength": 97, + "snippet": { + "text": "\r\n\tbool persistLuaState() {\r\n\t\treturn params > 0 && scriptInterface->callFunction(params);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "62ea56e7b107ac6e", + "equalIndicator/v1": "fbe610fc5f8f50b225f3c28fd99b6365ef6254bf7786aa7414011ae776b94c6e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 796, + "startColumn": 29, + "charOffset": 23768, + "charLength": 8, + "snippet": { + "text": "interval" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 794, + "startColumn": 1, + "charOffset": 23701, + "charLength": 147, + "snippet": { + "text": "\r\n\tif (challengeMeleeDuration != 0) {\r\n\t\tchallengeMeleeDuration -= interval;\r\n\t\tif (challengeMeleeDuration <= 0) {\r\n\t\t\tchallengeMeleeDuration = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fe8aa7d004c7498a", + "equalIndicator/v1": "fbef7e0e0704cc74b3d46e2284d1155c59b9879c38da0c72dbaeb957ec0f672b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 987, + "startColumn": 63, + "charOffset": 35609, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 985, + "startColumn": 1, + "charOffset": 35542, + "charLength": 263, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) {\r\n\t// Player:onTradeAccept(target, item, targetItem)\r\n\tif (info.playerOnTradeAccept == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ec9728a0206466c7", + "equalIndicator/v1": "fc0a3b51ed9a35555647ef0ecf7b7cad83303a19a8c564154fb89c2d0ea97540" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'creatureEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'creatureEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 43, + "startColumn": 17, + "charOffset": 1077, + "charLength": 36, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 41, + "startColumn": 1, + "charOffset": 1038, + "charLength": 109, + "snippet": { + "text": "\r\n\tvoid clearEvent();\r\n\tvoid copyEvent(const std::shared_ptr creatureEvent);\r\n\r\n\t// scripting\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "11cf9cc01962d0c0", + "equalIndicator/v1": "fc0bd8ee395ea2d1f9fd0a06946d0c5cf5d0745df716a08ac9350a60a2191fa4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1053, + "startColumn": 47, + "charOffset": 40101, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1051, + "startColumn": 1, + "charOffset": 40000, + "charLength": 167, + "snippet": { + "text": "\tgetScriptInterface()->pushFunction(getScriptId());\r\n\r\n\tLuaScriptInterface::pushUserdata(L, monster);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Monster\");\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "947caad6c801224e", + "equalIndicator/v1": "fc2282e09a6d82fd7dd2132e3c16b3756160dbe16d746fc4197e585e1489db61" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3151, + "startColumn": 58, + "charOffset": 111049, + "charLength": 25, + "snippet": { + "text": "wheelGemBasicSlot2Allowed" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3149, + "startColumn": 1, + "charOffset": 110910, + "charLength": 202, + "snippet": { + "text": "\tWheelGemBasicModifier_t modifier = modifier1;\r\n\twhile (modifier == modifier1) {\r\n\t\tmodifier = wheelGemBasicSlot2Allowed[uniform_random(0, wheelGemBasicSlot2Allowed.size() - 1)];\r\n\t}\r\n\treturn modifier;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ce9928d408514f17", + "equalIndicator/v1": "fc359bc154afcba151aec0b9d0cfa4b156b1cf410dcdbf31256840d75d8e5d93" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1824, + "startColumn": 3, + "charOffset": 55305, + "charLength": 8, + "snippet": { + "text": "uint16_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1822, + "startColumn": 1, + "charOffset": 55202, + "charLength": 351, + "snippet": { + "text": "\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\r\n\t\tPosition pos = msg.getPosition();\r\n\t\tuint16_t itemId = msg.get();\r\n\t\tuint8_t stackpos = msg.getByte();\r\n\t\tg_logger().debug(\"[{}] action {}, category {}, pos {}, itemId {}, stackPos {}\", __FUNCTION__, action, static_cast(category), pos.toString(), itemId, stackpos);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a0be7b5be0329ae1", + "equalIndicator/v1": "fc3e8db31f7bcc67eecf2623fa1a66700fe06948d05185b6b428df3ed2876e59" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 672, + "startColumn": 62, + "charOffset": 23951, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 670, + "startColumn": 1, + "charOffset": 23885, + "charLength": 244, + "snippet": { + "text": "}\r\n\r\nbool Events::eventPlayerOnLookInShop(std::shared_ptr player, const ItemType* itemType, uint8_t count) {\r\n\t// Player:onLookInShop(itemType, count) or Player.onLookInShop(self, itemType, count)\r\n\tif (info.playerOnLookInShop == -1) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "20e92fc51a412f30", + "equalIndicator/v1": "fc5f9917617062fce4263a08d216a152adf1ac1a39d596304641f69ef4782248" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')", + "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2847, + "startColumn": 20, + "charOffset": 85194, + "charLength": 23, + "snippet": { + "text": "Player::getPercentLevel" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2845, + "startColumn": 1, + "charOffset": 85073, + "charLength": 238, + "snippet": { + "text": "\t\t\tuint64_t nextLevelExp = Player::getExpForLevel(level + 1);\r\n\t\t\tif (nextLevelExp > currLevelExp) {\r\n\t\t\t\tlevelPercent = Player::getPercentLevel(experience - currLevelExp, nextLevelExp - currLevelExp);\r\n\t\t\t} else {\r\n\t\t\t\tlevelPercent = 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b3e8a6a9f94c0eb8", + "equalIndicator/v1": "fc64c6315ecbbf2cff96f7ead645438e1ae1a57ffadeddb8b289e4bd5ba3bd0f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Loop variable has narrower type 'uint8_t' than iteration's upper bound 'std::basic_string::size_type'", + "markdown": "Loop variable has narrower type 'uint8_t' than iteration's upper bound 'std::basic_string::size_type'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 207, + "startColumn": 22, + "charOffset": 5084, + "charLength": 1, + "snippet": { + "text": "i" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 205, + "startColumn": 1, + "charOffset": 4982, + "charLength": 177, + "snippet": { + "text": "\t// hmac key pad generation\r\n\tstd::string iKeyPad(64, 0x36), oKeyPad(64, 0x5C);\r\n\tfor (uint8_t i = 0; i < key.length(); ++i) {\r\n\t\tiKeyPad[i] ^= key[i];\r\n\t\toKeyPad[i] ^= key[i];\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "82fe6bceb042ed5a", + "equalIndicator/v1": "fc8008ac8b028b2fc823d3d095aefa5b7d9d8f840a7cbc87b81933200e7675b0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 109, + "startColumn": 15, + "charOffset": 4469, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 107, + "startColumn": 1, + "charOffset": 4382, + "charLength": 236, + "snippet": { + "text": "\t * \\param link holds the relation the object has to the cylinder\r\n\t */\r\n\tvirtual void postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) = 0;\r\n\r\n\t/**\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "861a6b09a3337af5", + "equalIndicator/v1": "fc8ea8160699819801e2f102fc5c8d9be11d88eccecc6c1c8bef6ad285eded45" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 633, + "startColumn": 58, + "charOffset": 19661, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 631, + "startColumn": 1, + "charOffset": 19599, + "charLength": 210, + "snippet": { + "text": "}\r\n\r\nvoid Spell::getCombatDataAugment(std::shared_ptr player, CombatDamage &damage) {\r\n\tif (!(damage.instantSpellName).empty()) {\r\n\t\tconst auto equippedAugmentItems = player->getEquippedAugmentItems();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "17cc2e9585e3253f", + "equalIndicator/v1": "fc953feb3b1046cc6acd69cfc280639a935bc495038c7cbf1bc2e587553debe4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 680, + "startColumn": 65, + "charOffset": 18601, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 678, + "startColumn": 1, + "charOffset": 18532, + "charLength": 162, + "snippet": { + "text": "}\r\n\r\nvoid ConditionAttributes::updateBuffs(std::shared_ptr creature) {\r\n\tbool needUpdate = false;\r\n\tfor (int32_t i = BUFF_FIRST; i <= BUFF_LAST; ++i) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d2c960aa981d3ccf", + "equalIndicator/v1": "fce2a562ed6897565bd8f04304a77c804f378a7caaa7106b763a201a7c8a89db" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'hasCharmExpansion' can be made const", + "markdown": "Method 'hasCharmExpansion' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1943, + "startColumn": 7, + "charOffset": 57376, + "charLength": 17, + "snippet": { + "text": "hasCharmExpansion" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1941, + "startColumn": 1, + "charOffset": 57341, + "charLength": 87, + "snippet": { + "text": "\t\tcharmPoints = points;\r\n\t}\r\n\tbool hasCharmExpansion() {\r\n\t\treturn charmExpansion;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6b148f9f78734ac2", + "equalIndicator/v1": "fcf38c3a9345b2005bdea4503d502b9c14489c28d15b4aeda83fe90968219e28" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions", + "markdown": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 36, + "startColumn": 18, + "charOffset": 1053, + "charLength": 12, + "snippet": { + "text": "ValueWrapper" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 34, + "startColumn": 1, + "charOffset": 978, + "charLength": 290, + "snippet": { + "text": "public:\r\n\texplicit ValueWrapper(uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const ValueVariant &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const std::string &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(bool value, uint64_t timestamp = 0);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9382eb905ad3f89d", + "equalIndicator/v1": "fd077f1a11ef56513a984fefc8a96685cd05a215fa10530640cf16051ad4865e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 584, + "startColumn": 41, + "charOffset": 22372, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 582, + "startColumn": 1, + "charOffset": 22326, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dffcd8168b9b4295", + "equalIndicator/v1": "fd12e632dd37d2019a7cfd5fa00f066513b46cd60e362d7f11e15e9d088d3f8b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 778, + "startColumn": 27, + "charOffset": 24657, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 776, + "startColumn": 1, + "charOffset": 24625, + "charLength": 129, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\r\n\tenv->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "529714da03de7e7e", + "equalIndicator/v1": "fd19da8910a2e6b0dd7ee6298c202564b268978f6792632fffe20ce7eb6aa518" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6601, + "startColumn": 62, + "charOffset": 207050, + "charLength": 8, + "snippet": { + "text": "creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6599, + "startColumn": 1, + "charOffset": 206984, + "charLength": 164, + "snippet": { + "text": "}\r\n\r\nvoid ProtocolGame::sendAddCreature(std::shared_ptr creature, const Position &pos, int32_t stackpos, bool isLogin) {\r\n\tif (!canSee(pos)) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "00220d92c46bd70b", + "equalIndicator/v1": "fd300cba6f2b62cbab287a1745092a3a6a038905382199c04a164ab841353a7d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 7720, + "startColumn": 4, + "charOffset": 241990, + "charLength": 8, + "snippet": { + "text": "skills_t" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 7718, + "startColumn": 1, + "charOffset": 241906, + "charLength": 289, + "snippet": { + "text": "\tif (oldProtocol) {\r\n\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; ++i) {\r\n\t\t\tskills_t skill = static_cast(i);\r\n\t\t\tmsg.add(std::min(player->getSkillLevel(skill), std::numeric_limits::max()));\r\n\t\t\tmsg.add(player->getBaseSkill(skill));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ac47d1411270c5ca", + "equalIndicator/v1": "fd37b3fa4fa81aacf53140ed2e644c4b97e87f5a074ca443850b7aa972d8d316" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Method 'getDelay' can be made const", + "markdown": "Method 'getDelay' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 45, + "startColumn": 10, + "charOffset": 1142, + "charLength": 8, + "snippet": { + "text": "getDelay" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 43, + "startColumn": 1, + "charOffset": 1127, + "charLength": 49, + "snippet": { + "text": "\t}\r\n\r\n\tint16_t getDelay() {\r\n\t\treturn delay;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8660219ff38c66da", + "equalIndicator/v1": "fd43a0fb7ef158e563ea6e0c0b0684e0ba37e7f5ef77b2029e3f533a97b94f4b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Use auto when initializing with a template cast to avoid duplicating the type name", + "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 537, + "startColumn": 8, + "charOffset": 13292, + "charLength": 8, + "snippet": { + "text": "ItemType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 535, + "startColumn": 1, + "charOffset": 13184, + "charLength": 227, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetRequiredLevel(lua_State* L) {\r\n\t// itemType:getRequiredLevel()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->minReqLevel);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "73a88f36eaa5749a", + "equalIndicator/v1": "fd5be17e15a348c689218470b94055aa2d767a12bdbaaadebdfff7dead8b0583" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Default arguments on virtual or override methods are prohibited", + "markdown": "Default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/rewardchest.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 25, + "startColumn": 7, + "charOffset": 836, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 23, + "startColumn": 1, + "charOffset": 671, + "charLength": 463, + "snippet": { + "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) final;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4dad444e688dfca5", + "equalIndicator/v1": "fda419b1bd949da687893d4a93b52a4bfb61d5a5ba622369e974ce750513d94c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Std::move of the variable 'pos' of the trivially-copyable type 'Position' has no effect; remove std::move()", + "markdown": "Std::move of the variable 'pos' of the trivially-copyable type 'Position' has no effect; remove std::move()" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 35, + "startColumn": 13, + "charOffset": 1012, + "charLength": 9, + "snippet": { + "text": "std::move" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 33, + "startColumn": 1, + "charOffset": 962, + "charLength": 72, + "snippet": { + "text": "\t}\r\n\tvoid setDestPos(Position pos) {\r\n\t\tdestPos = std::move(pos);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "46a790406cd33f10", + "equalIndicator/v1": "fdb5738557b13cad17ea980527df2e3526622aa9c31e8c51a54c131602e2b265" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 454, + "startColumn": 62, + "charOffset": 18228, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 452, + "startColumn": 1, + "charOffset": 18162, + "charLength": 177, + "snippet": { + "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerItem(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3b24c185b123f9d5", + "equalIndicator/v1": "fdb74f39ca1bd439054ce03b5e5f8a4506e94a99571efc7648352baccf0ccf59" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Repeated branch body in conditional chain", + "markdown": "Repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 44, + "startColumn": 22, + "charOffset": 1712, + "charLength": 1, + "snippet": { + "text": "{" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 42, + "startColumn": 1, + "charOffset": 1654, + "charLength": 161, + "snippet": { + "text": "\r\n\tauto parameters = lua_gettop(L);\r\n\tif (parameters > 4) {\r\n\t\t// subtype already supplied, count then is the amount\r\n\t\titemCount = std::max(1, count);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fb74a5e5ad2976b8", + "equalIndicator/v1": "fdc28a526325a933c9628527f843bd320034b831720b7ec3bdb2db8fe79c7daf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 100, + "startColumn": 6, + "charOffset": 3374, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 98, + "startColumn": 1, + "charOffset": 3340, + "charLength": 208, + "snippet": { + "text": "\r\n\tReturnValue returnValue;\r\n\tif (getScriptInterface()->protectedCall(L, 3, 1) != 0) {\r\n\t\treturnValue = RETURNVALUE_NOTPOSSIBLE;\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "741bb00463bcd403", + "equalIndicator/v1": "fe27a6a0a3c9ba1f110b2077ce11bdf1b50a2422b6d43870151cf47a80cd78fd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 9797, + "startColumn": 48, + "charOffset": 342887, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 9795, + "startColumn": 1, + "charOffset": 342835, + "charLength": 106, + "snippet": { + "text": "}\r\n\r\nvoid Game::addMonster(std::shared_ptr monster) {\r\n\tmonsters[monster->getID()] = monster;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6e248f82c476ac4a", + "equalIndicator/v1": "fe3bfa9c32de317f0db8012664f1d85e398f8a6396655a9787689f1c13e0bff6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 116, + "startColumn": 64, + "charOffset": 3753, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 114, + "startColumn": 1, + "charOffset": 3685, + "charLength": 182, + "snippet": { + "text": "}\r\n\r\nstd::size_t WaitingList::getClientSlot(std::shared_ptr player) {\r\n\tauto it = info->playerReferences.find(player->getGUID());\r\n\tif (it == info->playerReferences.end()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "241fd88ae86a17e8", + "equalIndicator/v1": "fe476c50f60c6bb98b001eb6ebda951125fe9bfb1d1a1651d42cc436cdd7c2a0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 5175, + "startColumn": 50, + "charOffset": 152748, + "charLength": 8, + "snippet": { + "text": "attacked" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 5173, + "startColumn": 1, + "charOffset": 152694, + "charLength": 165, + "snippet": { + "text": "}\r\n\r\nvoid Player::addAttacked(std::shared_ptr attacked) {\r\n\tif (hasFlag(PlayerFlags_t::NotGainInFight) || !attacked || attacked == getPlayer()) {\r\n\t\treturn;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "932d1293fdb2b7d9", + "equalIndicator/v1": "fe48d706fe3e97b83b6059bbbcb65629e7ab14162aebbe9bb4655e0a4c1ba3b3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 167, + "startColumn": 7, + "charOffset": 4554, + "charLength": 9, + "snippet": { + "text": "isRemoved" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 165, + "startColumn": 1, + "charOffset": 4513, + "charLength": 103, + "snippet": { + "text": "\t\treturn getWalkDelay() <= 0;\r\n\t}\r\n\tbool isRemoved() override final {\r\n\t\treturn isInternalRemoved;\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1a6f61aef85803b6", + "equalIndicator/v1": "fe4d8938cc401c31ca18ebb268772a8d464641878596228f287657859636b543" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "'override' is redundant since the function is already declared 'final'", + "markdown": "'override' is redundant since the function is already declared 'final'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 234, + "startColumn": 7, + "charOffset": 7382, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 232, + "startColumn": 1, + "charOffset": 7304, + "charLength": 394, + "snippet": { + "text": "\tstd::shared_ptr getThing(size_t index) const override final;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b32275e5108f38fd", + "equalIndicator/v1": "fe55bc9b756bf2f8e1dc27003a55689835287fa3a1cdb6e09e412bb5f1318247" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2397, + "startColumn": 11, + "charOffset": 70994, + "charLength": 3, + "snippet": { + "text": "exp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2395, + "startColumn": 1, + "charOffset": 70856, + "charLength": 264, + "snippet": { + "text": "\tbool handleHazardExperience = monster && monster->getHazard() && getHazardSystemPoints() > 0;\r\n\tif (handleHazardExperience) {\r\n\t\texp += (exp * (1.75 * getHazardSystemPoints() * g_configManager().getFloat(HAZARD_EXP_BONUS_MULTIPLIER, __FUNCTION__))) / 100.;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ef3f836cd3a8fb34", + "equalIndicator/v1": "fe5e812e5ce499ba35395abe67fdbfebc73f24d81ff95ad2d85fb7b24fd3f23b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'corpse' is passed by value and only copied once; consider moving it to avoid unnecessary copies", + "markdown": "Parameter 'corpse' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1890, + "startColumn": 34, + "charOffset": 56096, + "charLength": 6, + "snippet": { + "text": "corpse" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1888, + "startColumn": 1, + "charOffset": 55916, + "charLength": 239, + "snippet": { + "text": "\tbool updateKillTracker(std::shared_ptr corpse, const std::string &playerName, const Outfit_t creatureOutfit) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendKillTrackerUpdate(corpse, playerName, creatureOutfit);\r\n\t\t\treturn true;\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "522d45789685e98b", + "equalIndicator/v1": "fe7060497841a72a203189e97d1b263512f8781e43b15772aed983aebe958a87" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Static member accessed through instance", + "markdown": "Static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 813, + "startColumn": 41, + "charOffset": 31210, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 811, + "startColumn": 1, + "charOffset": 31164, + "charLength": 157, + "snippet": { + "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7568f60ed8bd87a1", + "equalIndicator/v1": "fe91dcad3464def3b5a75d473661627bddbd1111b01df44ebcf549983cd290e5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 488, + "startColumn": 61, + "charOffset": 14532, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 486, + "startColumn": 1, + "charOffset": 14467, + "charLength": 147, + "snippet": { + "text": "}\r\n\r\nbool Spell::playerInstantSpellCheck(std::shared_ptr player, const Position &toPos) const {\r\n\tif (toPos.x == 0xFFFF) {\r\n\t\treturn true;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "be410f4c19a92b7a", + "equalIndicator/v1": "fe98d3d92e5abc49399d5ab1f07814b22956aee110078f066c9c4502d8194616" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to 'float'", + "markdown": "Narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 713, + "startColumn": 37, + "charOffset": 23164, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 711, + "startColumn": 1, + "charOffset": 23102, + "charLength": 132, + "snippet": { + "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 30) * 3.20f) + 4;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2c2bf1f80cc81659", + "equalIndicator/v1": "fea6d385988ca4b84d7b6b51dffd2453733667253756a87f948d9b00cd51b3d6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'autoCreate' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'autoCreate' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 798, + "startColumn": 61, + "charOffset": 21604, + "charLength": 10, + "snippet": { + "text": "const bool" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 796, + "startColumn": 1, + "charOffset": 21504, + "charLength": 224, + "snippet": { + "text": "\tvoid removeConditionSuppressions();\r\n\r\n\tstd::shared_ptr getReward(const uint64_t rewardId, const bool autoCreate);\r\n\tvoid removeReward(uint64_t rewardId);\r\n\tvoid getRewardList(std::vector &rewards) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e8c6886d807d86f6", + "equalIndicator/v1": "feb09cf7314b855e5ebb6394571eb9898d2100162520341feec992e153b6bf5a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Return type 'const WeaponShared_ptr' (aka 'const shared_ptr') is 'const'-qualified at the top level, which may reduce code readability without improving const correctness", + "markdown": "Return type 'const WeaponShared_ptr' (aka 'const shared_ptr') is 'const'-qualified at the top level, which may reduce code readability without improving const correctness" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 22, + "startColumn": 1, + "charOffset": 649, + "charLength": 22, + "snippet": { + "text": "const WeaponShared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 615, + "charLength": 146, + "snippet": { + "text": "Weapons::~Weapons() = default;\r\n\r\nconst WeaponShared_ptr Weapons::getWeapon(std::shared_ptr item) const {\r\n\tif (!item) {\r\n\t\treturn nullptr;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1004a1f3daa0b5a1", + "equalIndicator/v1": "fec0a8a88c9cb77bcb282c4bcdae1193e49c84e210080e25dd568057fd0c4ecc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1606, + "startColumn": 51, + "charOffset": 63139, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1604, + "startColumn": 1, + "charOffset": 63084, + "charLength": 314, + "snippet": { + "text": "}\r\n\r\nvoid Game::playerMoveItem(std::shared_ptr player, const Position &fromPos, uint16_t itemId, uint8_t fromStackPos, const Position &toPos, uint8_t count, std::shared_ptr item, std::shared_ptr toCylinder) {\r\n\tif (!player->canDoAction()) {\r\n\t\tuint32_t delay = player->getNextActionTime();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ab1cfe111026f07e", + "equalIndicator/v1": "fec598d40f8c19405d71273579612c081656291cee983e88515c5c905b66a32c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'tradeItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'tradeItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 4899, + "startColumn": 123, + "charOffset": 175224, + "charLength": 9, + "snippet": { + "text": "tradeItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 4897, + "startColumn": 1, + "charOffset": 175097, + "charLength": 332, + "snippet": { + "text": "}\r\n\r\nbool Game::internalStartTrade(std::shared_ptr player, std::shared_ptr tradePartner, std::shared_ptr tradeItem) {\r\n\tif (player->tradeState != TRADE_NONE && !(player->tradeState == TRADE_ACKNOWLEDGE && player->tradePartner == tradePartner)) {\r\n\t\tplayer->sendCancelMessage(RETURNVALUE_YOUAREALREADYTRADING);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c149dc01ba37f0f5", + "equalIndicator/v1": "fec9a9d1f9115a7ed968063d1d58b3ea83ba111884cddd7c01b29092dd83d99c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 89, + "startColumn": 44, + "charOffset": 3007, + "charLength": 10, + "snippet": { + "text": "itemInsede" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 87, + "startColumn": 1, + "charOffset": 2849, + "charLength": 195, + "snippet": { + "text": "\t\t\tif (auto itemInsede = createItem(BasicItemInside, position)) {\r\n\t\t\t\titem->getContainer()->addItem(itemInsede);\r\n\t\t\t\titem->getContainer()->updateItemWeight(itemInsede->getWeight());\r\n\t\t\t}\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3ccb34cbf0b62f40", + "equalIndicator/v1": "fece863dacce43aec9d18f05d8b03b5148d63ae4449055df84330397156dff8d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6794, + "startColumn": 116, + "charOffset": 234858, + "charLength": 7, + "snippet": { + "text": "monster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 6792, + "startColumn": 1, + "charOffset": 234715, + "charLength": 263, + "snippet": { + "text": "\r\n// Hazard combat helpers\r\nvoid Game::handleHazardSystemAttack(CombatDamage &damage, std::shared_ptr player, std::shared_ptr monster, bool isPlayerAttacker) {\r\n\tif (damage.primary.value != 0 && monster->getHazard()) {\r\n\t\tif (isPlayerAttacker) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1af761f9197748a5", + "equalIndicator/v1": "fed05e1afb1af7a0f9ad4ef7915b454b004e1a83941960cc8c34dd8cacd885df" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 633, + "startColumn": 15, + "charOffset": 18150, + "charLength": 12, + "snippet": { + "text": "onTradeEvent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 631, + "startColumn": 1, + "charOffset": 18104, + "charLength": 137, + "snippet": { + "text": "\t}\r\n\tvirtual void onRemoved();\r\n\tvirtual void onTradeEvent(TradeEvents_t, std::shared_ptr) { }\r\n\r\n\tvirtual void startDecaying();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "75fcce6de7279f6e", + "equalIndicator/v1": "fefe60e79ba4e9525fe356f402a7b738d8e2ca3ab541c43d7059bb3690a4a7ba" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined", + "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 243, + "startColumn": 18, + "charOffset": 8437, + "charLength": 18, + "snippet": { + "text": "std::min" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 241, + "startColumn": 1, + "charOffset": 8336, + "charLength": 175, + "snippet": { + "text": "\t\t\t\t\t\t\tint32_t chance = 100;\r\n\t\t\t\t\t\t\tif ((attr = childNode.attribute(\"chance\"))) {\r\n\t\t\t\t\t\t\t\tchance = std::min(10000, pugi::cast(attr.value()));\r\n\t\t\t\t\t\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7d8ef3c9b42d3482", + "equalIndicator/v1": "ff040bcf69b318d773a3e26a40416549a2d5014984b3994dca6484e4806bd1c7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", + "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1053, + "startColumn": 20, + "charOffset": 38026, + "charLength": 3, + "snippet": { + "text": "exp" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1051, + "startColumn": 1, + "charOffset": 38001, + "charLength": 62, + "snippet": { + "text": "\t}\r\n\r\n\tlua_pushnumber(L, exp);\r\n\tlua_pushnumber(L, rawExp);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d45c94c9adf0b833", + "equalIndicator/v1": "ff06e0cdd891f8127babec48dce001da7c6b65e358307bd5e3952335722bfb8b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 457, + "startColumn": 82, + "charOffset": 13627, + "charLength": 1, + "snippet": { + "text": "," + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 455, + "startColumn": 1, + "charOffset": 13541, + "charLength": 123, + "snippet": { + "text": "}\r\n\r\nuint32_t MoveEvent::StepOutField(std::shared_ptr, std::shared_ptr, const Position &) {\r\n\treturn 1;\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "286bce640bf055b5", + "equalIndicator/v1": "ff22f5307d2b5e1136eb2663b3bedd074d7fd633db5eed242eb38ceff67e1f19" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 415, + "startColumn": 108, + "charOffset": 12216, + "charLength": 7, + "snippet": { + "text": "newItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 413, + "startColumn": 1, + "charOffset": 12104, + "charLength": 206, + "snippet": { + "text": "}\r\n\r\nvoid Container::onUpdateContainerItem(uint32_t index, std::shared_ptr oldItem, std::shared_ptr newItem) {\r\n\tauto spectators = Spectators().find(getPosition(), false, 2, 2, 2, 2);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2a55aa736a0d3cc5", + "equalIndicator/v1": "ff329532afb04900f6b765d6438748dc7429e07f7ed5229c48ca732f34a51d5c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", + "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 11, + "charOffset": 1336, + "charLength": 5, + "snippet": { + "text": "mType" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1259, + "charLength": 272, + "snippet": { + "text": "\tcurrentOutfit = mType->info.outfit;\r\n\tskull = mType->info.skull;\r\n\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c80fa09f90f8ae34", + "equalIndicator/v1": "ff5d494ae04ebaf0e608f9f445e121c12b6095b1992581215aabea6b7114fced" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 657, + "startColumn": 79, + "charOffset": 20911, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 655, + "startColumn": 1, + "charOffset": 20827, + "charLength": 225, + "snippet": { + "text": "};\r\n\r\nint32_t Spell::calculateAugmentSpellCooldownReduction(std::shared_ptr player) const {\r\n\tint32_t spellCooldown = 0;\r\n\tconst auto equippedAugmentItems = player->getEquippedAugmentItemsByType(Augment_t::Cooldown);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "20fe4806a352bb35", + "equalIndicator/v1": "ff6c27fe18f91684a88390c7e3538791a9412c18f921261b6670e557461e29da" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", + "markdown": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 70, + "startColumn": 35, + "charOffset": 2721, + "charLength": 28, + "snippet": { + "text": "const std::shared_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 68, + "startColumn": 1, + "charOffset": 2590, + "charLength": 274, + "snippet": { + "text": "\tuint16_t getBestiaryRaceUnlocked(std::shared_ptr player, BestiaryType_t race) const;\r\n\r\n\tint32_t bitToggle(int32_t input, const std::shared_ptr charm, bool on) const;\r\n\r\n\tbool hasCharmUnlockedRuneBit(const std::shared_ptr charm, int32_t input) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "46c8362f05118d87", + "equalIndicator/v1": "ff78756d43f00c5e5d6b4a4a05f6f593b435c50f567b95313c2b7449450c96c6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", + "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 72, + "startColumn": 10, + "charOffset": 1835, + "charLength": 16, + "snippet": { + "text": "gainHealthAmount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 70, + "startColumn": 1, + "charOffset": 1783, + "charLength": 138, + "snippet": { + "text": "\r\n\tuint32_t getHealthGainAmount() const {\r\n\t\treturn gainHealthAmount * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__);\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9deeba4c3fb7cac8", + "equalIndicator/v1": "ff7e77045d22c9781f5051e6825e1f6827c20bfdcbf493a8d68b460ddde41bc9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "ClangTidy", + "kind": "fail", + "level": "warning", + "message": { + "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", + "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 261, + "startColumn": 56, + "charOffset": 8530, + "charLength": 6, + "snippet": { + "text": "player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 259, + "startColumn": 1, + "charOffset": 8470, + "charLength": 179, + "snippet": { + "text": "}\r\n\r\nvoid Weapon::internalUseWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr tile) const {\r\n\tif (isLoadedCallback()) {\r\n\t\tLuaVariant var;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0638a64f903bd842", + "equalIndicator/v1": "ffc4bcffea854c25a62945778882259f7253fe86dc566bac22dd3403e1b76637" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'addConditionSuppression' is not implemented", + "markdown": "Function 'addConditionSuppression' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 3011, + "startColumn": 2, + "charOffset": 91040, + "charLength": 113, + "snippet": { + "text": "void addConditionSuppression(const std::array &addConditions);" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 3009, + "startColumn": 1, + "charOffset": 90951, + "charLength": 248, + "snippet": { + "text": "\r\n\tbool isSuppress(ConditionType_t conditionType, bool attackerPlayer) const override;\r\n\tvoid addConditionSuppression(const std::array &addConditions);\r\n\r\n\tuint16_t getLookCorpse() const override;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4f270df86e978570", + "equalIndicator/v1": "10f8f7e223f98cb78c4118e8e06f9f06faa6dfde20554d49cfd11b67ec654df7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'luaPlayerSendForgeError' is not implemented", + "markdown": "Function 'luaPlayerSendForgeError' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 667, + "startColumn": 2, + "charOffset": 36769, + "charLength": 49, + "snippet": { + "text": "static int luaPlayerSendForgeError(lua_State* L);" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 665, + "startColumn": 1, + "charOffset": 36673, + "charLength": 199, + "snippet": { + "text": "\tstatic int luaPlayerOpenForge(lua_State* L);\r\n\tstatic int luaPlayerCloseForge(lua_State* L);\r\n\tstatic int luaPlayerSendForgeError(lua_State* L);\r\n\r\n\tstatic int luaPlayerAddForgeDusts(lua_State* L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d4fb45eb461032fa", + "equalIndicator/v1": "357f489d16c39045b8ca2bcebca5fb0f236f36b1a2d45f5fa6fdd8e088f07b52" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'playerMoveThingFromDepotSearch' is not implemented", + "markdown": "Function 'playerMoveThingFromDepotSearch' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 392, + "startColumn": 2, + "charOffset": 20304, + "charLength": 185, + "snippet": { + "text": "void playerMoveThingFromDepotSearch(std::shared_ptr player, uint16_t itemId, uint8_t tier, uint8_t count, const Position &fromPos, const Position &toPos, bool allItems = false);" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 390, + "startColumn": 1, + "charOffset": 20108, + "charLength": 456, + "snippet": { + "text": "\tvoid playerRequestDepotSearchRetrieve(uint32_t playerId, uint16_t itemId, uint8_t tier, uint8_t type);\r\n\tvoid playerRequestOpenContainerFromDepotSearch(uint32_t playerId, const Position &pos);\r\n\tvoid playerMoveThingFromDepotSearch(std::shared_ptr player, uint16_t itemId, uint8_t tier, uint8_t count, const Position &fromPos, const Position &toPos, bool allItems = false);\r\n\r\n\tvoid playerRequestAddVip(uint32_t playerId, const std::string &name);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "48f0d3f3330da0db", + "equalIndicator/v1": "358f1745921c077cc1bb743de705a15026c999a89764a146d3c7e8f1e948de5d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'sendInventory' is not implemented", + "markdown": "Function 'sendInventory' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 508, + "startColumn": 2, + "charOffset": 21481, + "charLength": 21, + "snippet": { + "text": "void sendInventory();" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 506, + "startColumn": 1, + "charOffset": 21456, + "charLength": 119, + "snippet": { + "text": "\tbool isOTC = false;\r\n\r\n\tvoid sendInventory();\r\n\tvoid sendOpenStash();\r\n\tvoid parseStashWithdraw(NetworkMessage &msg);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "caa417ac6332b127", + "equalIndicator/v1": "3b7c355dc7ab8fba5e720bc3b86a93cb4d34e5818edec03d32e030cd02f19c29" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'addMagicEffect' is not implemented", + "markdown": "Function 'addMagicEffect' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 507, + "startColumn": 2, + "charOffset": 27409, + "charLength": 118, + "snippet": { + "text": "static void addMagicEffect(const std::vector> &players, const Position &pos, uint16_t effect);" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 505, + "startColumn": 1, + "charOffset": 27283, + "charLength": 411, + "snippet": { + "text": "\tvoid addPlayerVocation(const std::shared_ptr target);\r\n\tvoid addMagicEffect(const Position &pos, uint16_t effect);\r\n\tstatic void addMagicEffect(const std::vector> &players, const Position &pos, uint16_t effect);\r\n\tstatic void addMagicEffect(const CreatureVector &spectators, const Position &pos, uint16_t effect);\r\n\tvoid removeMagicEffect(const Position &pos, uint16_t effect);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "eec02da3543a8e48", + "equalIndicator/v1": "416603f82a0c34322e450928b424b11c1aa2197f735d3a685ea12e1ec31c5941" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'luaPlayerIsSupplyStashAvailable' is not implemented", + "markdown": "Function 'luaPlayerIsSupplyStashAvailable' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 521, + "startColumn": 2, + "charOffset": 30932, + "charLength": 57, + "snippet": { + "text": "static int luaPlayerIsSupplyStashAvailable(lua_State* L);" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 519, + "startColumn": 1, + "charOffset": 30883, + "charLength": 207, + "snippet": { + "text": "\tstatic int luaPlayerSetGroup(lua_State* L);\r\n\r\n\tstatic int luaPlayerIsSupplyStashAvailable(lua_State* L);\r\n\tstatic int luaPlayerGetStashCounter(lua_State* L);\r\n\tstatic int luaPlayerOpenStash(lua_State* L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "02e4bae876dbac77", + "equalIndicator/v1": "4355dd44111d32cfb5d68969979fed72ffcc81fc3bc958ee3cc18b33f4ffe74f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'luaNpcTypeRespawnType' is not implemented", + "markdown": "Function 'luaNpcTypeRespawnType' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 80, + "startColumn": 2, + "charOffset": 4466, + "charLength": 47, + "snippet": { + "text": "static int luaNpcTypeRespawnType(lua_State* L);" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 78, + "startColumn": 1, + "charOffset": 4413, + "charLength": 150, + "snippet": { + "text": "\tstatic int luaNpcTypeFloorChange(lua_State* L);\r\n\r\n\tstatic int luaNpcTypeRespawnType(lua_State* L);\r\n\tstatic int luaNpcTypeCanSpawn(lua_State* L);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d1036850887c3d0d", + "equalIndicator/v1": "44536b63bc47318cfcf7f6a0452c49370237668d105ab602b98848f18b072655" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'clearPosMap' is not implemented", + "markdown": "Function 'clearPosMap' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 119, + "startColumn": 2, + "charOffset": 3648, + "charLength": 57, + "snippet": { + "text": "void clearPosMap(std::map &map);" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 117, + "startColumn": 1, + "charOffset": 3575, + "charLength": 264, + "snippet": { + "text": "private:\r\n\tvoid clearMap(std::map &map) const;\r\n\tvoid clearPosMap(std::map &map);\r\n\r\n\tbool registerEvent(const std::shared_ptr moveEvent, int32_t id, std::map &moveListMap) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "3d52f68ab778dc9a", + "equalIndicator/v1": "44de03239e685456188e66c85ee675188513687c4cea2a6cb4141da4def26605" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'sendForgeFusionItem' is not implemented", + "markdown": "Function 'sendForgeFusionItem' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 261, + "startColumn": 2, + "charOffset": 9646, + "charLength": 137, + "snippet": { + "text": "void sendForgeFusionItem(\r\n\t\tuint16_t itemId,\r\n\t\tuint8_t tier,\r\n\t\tbool success,\r\n\t\tuint8_t bonus,\r\n\t\tuint8_t coreCount,\r\n\t\tbool convergen" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 259, + "startColumn": 1, + "charOffset": 9547, + "charLength": 440, + "snippet": { + "text": "\tvoid parseForgeEnter(NetworkMessage &msg);\r\n\tvoid parseForgeBrowseHistory(NetworkMessage &msg);\r\n\tvoid sendForgeFusionItem(\r\n\t\tuint16_t itemId,\r\n\t\tuint8_t tier,\r\n\t\tbool success,\r\n\t\tuint8_t bonus,\r\n\t\tuint8_t coreCount,\r\n\t\tbool convergence\r\n\t);\r\n\tvoid sendForgeResult(ForgeAction_t actionType, uint16_t leftItemId, uint8_t leftTier, uint16_t rightItemId, uint8_t rightTier, bool success, uint8_t bonus, uint8_t coreCount, bool convergence);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d88c05a32b95fa39", + "equalIndicator/v1": "48878d7611ff7d7926ccdf826c1b9232eaf4c3973981a052260461624eddc25a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'luaMonsterTypeRespawnType' is not implemented", + "markdown": "Function 'luaMonsterTypeRespawnType' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 163, + "startColumn": 2, + "charOffset": 11274, + "charLength": 51, + "snippet": { + "text": "static int luaMonsterTypeRespawnType(lua_State* L);" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 161, + "startColumn": 1, + "charOffset": 11167, + "charLength": 212, + "snippet": { + "text": "\tstatic int luaMonsterTypeFamiliar(lua_State* L);\r\n\tstatic int luaMonsterTypeIsRewardBoss(lua_State* L);\r\n\tstatic int luaMonsterTypeRespawnType(lua_State* L);\r\n\tstatic int luaMonsterTypeCanSpawn(lua_State* L);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "92ac68337533431c", + "equalIndicator/v1": "58dc31b5f6aa2202d0efc7829865016a5e019f6b1d398d113c2322ff6f2ca2b5" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'getNPCSkips' is not implemented", + "markdown": "Function 'getNPCSkips' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 969, + "startColumn": 2, + "charOffset": 26960, + "charLength": 46, + "snippet": { + "text": "std::unordered_set getNPCSkips();" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 967, + "startColumn": 1, + "charOffset": 26953, + "charLength": 128, + "snippet": { + "text": "\t}\r\n\r\n\tstd::unordered_set getNPCSkips();\r\n\r\n\tstd::shared_ptr getWeapon(Slots_t slot, bool ignoreAmmo) const;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "27552b78c1c9cfff", + "equalIndicator/v1": "657e4cbc0fb8704441faaa6181df8d30e0030ec6f0a967f25979539d818fbaf4" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'luaDeleteLoot' is not implemented", + "markdown": "Function 'luaDeleteLoot' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/loot_functions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 2, + "charOffset": 2075, + "charLength": 39, + "snippet": { + "text": "static int luaDeleteLoot(lua_State* L);" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 2022, + "charLength": 183, + "snippet": { + "text": "private:\r\n\tstatic int luaCreateLoot(lua_State* L);\r\n\tstatic int luaDeleteLoot(lua_State* L);\r\n\tstatic int luaLootSetId(lua_State* L);\r\n\tstatic int luaLootSetIdFromName(lua_State* L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2c30a4894e433ab6", + "equalIndicator/v1": "8e300459d85e9c651011963a2e128ff87f0c0faabf29df7462ea5710d09066c7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'parseObjectInfo' is not implemented", + "markdown": "Function 'parseObjectInfo' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 165, + "startColumn": 2, + "charOffset": 5800, + "charLength": 42, + "snippet": { + "text": "void parseObjectInfo(NetworkMessage &msg);" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 163, + "startColumn": 1, + "charOffset": 5682, + "charLength": 206, + "snippet": { + "text": "\tvoid parseBestiarysendMonsterData(NetworkMessage &msg);\r\n\tvoid parseCyclopediaMonsterTracker(NetworkMessage &msg);\r\n\tvoid parseObjectInfo(NetworkMessage &msg);\r\n\r\n\tvoid parseTeleport(NetworkMessage &msg);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f0dd45fbec8894d8", + "equalIndicator/v1": "90a56cfecb506b2e4de288ad597df2b3f2448a42ed1cfef1744b9dd32051e02b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'getMitigationMultiplier' is not implemented", + "markdown": "Function 'getMitigationMultiplier' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 987, + "startColumn": 2, + "charOffset": 27803, + "charLength": 39, + "snippet": { + "text": "double getMitigationMultiplier() const;" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 985, + "startColumn": 1, + "charOffset": 27719, + "charLength": 171, + "snippet": { + "text": "\tfloat getDefenseFactor() const override;\r\n\tfloat getMitigation() const override;\r\n\tdouble getMitigationMultiplier() const;\r\n\r\n\tvoid addInFightTicks(bool pzlock = false);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5c021cb3b99f7570", + "equalIndicator/v1": "acd87e6b0915b1f4d1a2bd8983e8779161717dbac4e638968e7b7849d7604fd2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'try_create' is not implemented", + "markdown": "Function 'try_create' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/di/shared.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 5, + "charOffset": 1126, + "charLength": 183, + "snippet": { + "text": "template \r\n\t\t\t\tstatic auto try_create(const TProvider &provider)\r\n\t\t\t\t\t-> decltype(wrappers::shared { std::shared_ptr { provider.get() } }" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1029, + "charLength": 294, + "snippet": { + "text": "\t\t\t\tusing is_referable = typename wrappers::shared::template is_referable;\r\n\r\n\t\t\t\ttemplate \r\n\t\t\t\tstatic auto try_create(const TProvider &provider)\r\n\t\t\t\t\t-> decltype(wrappers::shared { std::shared_ptr { provider.get() } });\r\n\r\n\t\t\t\t/**\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "863c152667a4ea57", + "equalIndicator/v1": "cf0d8beff5544e3551db2be07291db8f3408d09cc327c4b9c4cde8e6ce66990f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "NotImplementedFunctions", + "kind": "fail", + "level": "warning", + "message": { + "text": "Function 'clearMap' is not implemented", + "markdown": "Function 'clearMap' is not implemented" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 118, + "startColumn": 2, + "charOffset": 3586, + "charLength": 59, + "snippet": { + "text": "void clearMap(std::map &map) const;" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 116, + "startColumn": 1, + "charOffset": 3573, + "charLength": 135, + "snippet": { + "text": "\r\nprivate:\r\n\tvoid clearMap(std::map &map) const;\r\n\tvoid clearPosMap(std::map &map);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "89fc0c03c0e88841", + "equalIndicator/v1": "d083d734640d5f69f399a26918046a629111e88158ab61f30e31a55d48ba3961" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 27, + "startColumn": 17, + "charOffset": 960, + "charLength": 15, + "snippet": { + "text": "getLevelFormula" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 25, + "startColumn": 1, + "charOffset": 895, + "charLength": 220, + "snippet": { + "text": "#include \"lua/callbacks/events_callbacks.hpp\"\r\n\r\nint32_t Combat::getLevelFormula(std::shared_ptr player, const std::shared_ptr wheelSpell, const CombatDamage &damage) const {\r\n\tif (!player) {\r\n\t\treturn 0;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ab761d93c2e78b04", + "equalIndicator/v1": "0abbba1fb8aea2f8138832ce31a046712f1078d0da3ca63164669b8f6f05dd27" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Index may have a value of '5' which is out of bounds", + "markdown": "Index may have a value of '5' which is out of bounds" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 238, + "startColumn": 8, + "charOffset": 8217, + "charLength": 24, + "snippet": { + "text": "imbuement.stats[skillId]" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 236, + "startColumn": 1, + "charOffset": 8126, + "charLength": 209, + "snippet": { + "text": "\t\t\t\t\t\t\timbuement.skills[skillId] = bonus;\r\n\t\t\t\t\t\t} else if (usenormalskill == 2) {\r\n\t\t\t\t\t\t\timbuement.stats[skillId] = bonus;\r\n\t\t\t\t\t\t} else if (usenormalskill == 3) {\r\n\t\t\t\t\t\t\timbuement.skills[skillId] = bonus;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "22535eccbe923376", + "equalIndicator/v1": "14e003fc980e3e8e84a9d39bb0d4ed66ca49d24ac521c6fd187e0dfc951b7eb3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unreachable code", + "markdown": "Unreachable code" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 40, + "startColumn": 28, + "charOffset": 1246, + "charLength": 5, + "snippet": { + "text": "child" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 38, + "startColumn": 1, + "charOffset": 1198, + "charLength": 165, + "snippet": { + "text": "\tsetLoaded(true);\r\n\r\n\tfor (auto spawnNode : doc.child(\"npcs\").children()) {\r\n\t\tPosition centerPos(\r\n\t\t\tpugi::cast(spawnNode.attribute(\"centerx\").value()),\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "277e83c71b5c6b79", + "equalIndicator/v1": "1b9d6ec2818f4e7f49c4183c3d0ba09eb56dc7764a63aa5158ebd07bfaf180ae" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Local variable 'measure' is only assigned but never accessed", + "markdown": "Local variable 'measure' is only assigned but never accessed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 136, + "startColumn": 25, + "charOffset": 4111, + "charLength": 7, + "snippet": { + "text": "measure" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 134, + "startColumn": 1, + "charOffset": 4063, + "charLength": 167, + "snippet": { + "text": "\tmeasureLock.stop();\r\n\r\n\tmetrics::query_latency measure(query.substr(0, 50));\r\n\tbool success = retryQuery(query, 10);\r\n\tmysql_free_result(mysql_store_result(handle));\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ba9d5d56c569c73c", + "equalIndicator/v1": "1cba6483aad051220b82c1adda6cc42dee160af1fbcfcced1bc1df5752faa1d6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unreachable code", + "markdown": "Unreachable code" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 172, + "startColumn": 13, + "charOffset": 5457, + "charLength": 4, + "snippet": { + "text": "auto" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 170, + "startColumn": 1, + "charOffset": 5426, + "charLength": 158, + "snippet": { + "text": "\r\n\tint index = 0;\r\n\tfor (const auto &playerEntry : g_game().getPlayers()) {\r\n\t\tpushUserdata(L, playerEntry.second);\r\n\t\tsetMetatable(L, -1, \"Player\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "78638c4c37fe593a", + "equalIndicator/v1": "2492c632200cc8e2b59ff8e32affd5b49b945fde162b3a8ce06c625fe1fba0f7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unreachable code", + "markdown": "Unreachable code" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 62, + "startColumn": 25, + "charOffset": 2022, + "charLength": 9, + "snippet": { + "text": "spawnNode" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 60, + "startColumn": 1, + "charOffset": 1896, + "charLength": 272, + "snippet": { + "text": "\t\tconst auto &spawnNpc = spawnNpcList.emplace_back(std::make_shared(centerPos, radius));\r\n\r\n\t\tfor (auto childNode : spawnNode.children()) {\r\n\t\t\tif (strcasecmp(childNode.name(), \"npc\") == 0) {\r\n\t\t\t\tpugi::xml_attribute nameAttribute = childNode.attribute(\"name\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4abe65d6fae1fde0", + "equalIndicator/v1": "2641b1dccb85062c785181760fb9135f2e643eb3c15ae34b53b1077732c1cc06" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 43, + "startColumn": 7, + "charOffset": 1634, + "charLength": 5, + "snippet": { + "text": "House" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 41, + "startColumn": 1, + "charOffset": 1577, + "charLength": 102, + "snippet": { + "text": "#include \"creatures/players/vip/player_vip.hpp\"\r\n\r\nclass House;\r\nclass NetworkMessage;\r\nclass Weapon;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "751895ef872011ef", + "equalIndicator/v1": "274f53d859bafa12f3e24c804c5bcb1cc120693e7f08b78f3464da47efb7218b" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 18, + "startColumn": 17, + "charOffset": 614, + "charLength": 9, + "snippet": { + "text": "initParse" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 16, + "startColumn": 1, + "charOffset": 556, + "charLength": 297, + "snippet": { + "text": "#include \"creatures/combat/combat.hpp\"\r\n\r\nvoid ItemParse::initParse(const std::string &tmpStrValue, pugi::xml_node attributeNode, pugi::xml_attribute valueAttribute, ItemType &itemType) {\r\n\t// Parse all item attributes\r\n\tItemParse::parseType(tmpStrValue, attributeNode, valueAttribute, itemType);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "30e522e0c10f11d9", + "equalIndicator/v1": "2d451231da035cd3b875bc29386b11f5a0f769b27cd940186483527ab4ac43b2" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unreachable code", + "markdown": "Unreachable code" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 281, + "startColumn": 30, + "charOffset": 8669, + "charLength": 5, + "snippet": { + "text": "child" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 279, + "startColumn": 1, + "charOffset": 8634, + "charLength": 222, + "snippet": { + "text": "\t}\r\n\r\n\tfor (auto channelNode : doc.child(\"channels\").children()) {\r\n\t\tuint16_t channelId = pugi::cast(channelNode.attribute(\"id\").value());\r\n\t\tstd::string channelName = channelNode.attribute(\"name\").as_string();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c6078671ae825078", + "equalIndicator/v1": "30c58a02e50e29f55fad5e1a53ec7d6776bdf2a3c75bf01d49d580c612079fd8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 65, + "startColumn": 16, + "charOffset": 3721, + "charLength": 4, + "snippet": { + "text": "init" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 63, + "startColumn": 1, + "charOffset": 3694, + "charLength": 93, + "snippet": { + "text": "\tvoid(0)\r\n\r\nvoid LuaEnums::init(lua_State* L) {\r\n\tinitOthersEnums(L);\r\n\tinitAccountEnums(L);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "87c609a13bef03aa", + "equalIndicator/v1": "36e6bab31a1fd98d9da0dafd8aec27e30197972b55d0580e5435bb37c9621814" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 82, + "startColumn": 7, + "charOffset": 3960, + "charLength": 14, + "snippet": { + "text": "checkSpellArea" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 80, + "startColumn": 1, + "charOffset": 3909, + "charLength": 252, + "snippet": { + "text": "namespace {\r\n\ttemplate \r\n\tbool checkSpellArea(const std::array &spellsTable, const std::string &spellName, uint8_t stage) {\r\n\t\tfor (const auto &spellTable : spellsTable) {\r\n\t\t\tauto size = std::ssize(spellTable.grade);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c4cc770d4bac92c8", + "equalIndicator/v1": "3ef605dd0b4d4a710e51495f862aa5fb547368adac6fac223d6916211d70f4e7" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 30, + "startColumn": 29, + "charOffset": 978, + "charLength": 10, + "snippet": { + "text": "CreateItem" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 28, + "startColumn": 1, + "charOffset": 928, + "charLength": 327, + "snippet": { + "text": "Items Item::items;\r\n\r\nstd::shared_ptr Item::CreateItem(const uint16_t type, uint16_t count /*= 0*/, Position* itemPosition /*= nullptr*/) {\r\n\t// A map which contains items that, when on creating, should be transformed to the default type.\r\n\tstatic const phmap::flat_hash_map ItemTransformationMap = {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "6cf0f2812c973015", + "equalIndicator/v1": "3f7a3e31ebd9dd1d8b0d7313dac567977fecf3fb71583d2eade29a0cdbcd6c88" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 60, + "startColumn": 7, + "charOffset": 2173, + "charLength": 15, + "snippet": { + "text": "sendBlockEffect" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 58, + "startColumn": 1, + "charOffset": 2139, + "charLength": 253, + "snippet": { + "text": "\r\nnamespace InternalGame {\r\n\tvoid sendBlockEffect(BlockType_t blockType, CombatType_t combatType, const Position &targetPos, std::shared_ptr source) {\r\n\t\tif (blockType == BLOCK_DEFENSE) {\r\n\t\t\tg_game().addMagicEffect(targetPos, CONST_ME_POFF);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b6665bfaf19f3236", + "equalIndicator/v1": "4337642edb3e13f026e4d6d54409f2ee9f7bbbe7811428fb15b7642a273978bb" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unreachable code", + "markdown": "Unreachable code" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/appearance/outfit/outfit.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 37, + "startColumn": 29, + "charOffset": 1066, + "charLength": 5, + "snippet": { + "text": "child" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 35, + "startColumn": 1, + "charOffset": 1032, + "charLength": 164, + "snippet": { + "text": "\t}\r\n\r\n\tfor (auto outfitNode : doc.child(\"outfits\").children()) {\r\n\t\tpugi::xml_attribute attr;\r\n\t\tif ((attr = outfitNode.attribute(\"enabled\")) && !attr.as_bool()) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c420aed2bdd7037c", + "equalIndicator/v1": "4b5483c5d8013268dd675549a391b1b4ed98d939d09bdfe5dfd5d9a95152c948" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Condition is always true", + "markdown": "Condition is always true" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 214, + "startColumn": 43, + "charOffset": 5302, + "charLength": 25, + "snippet": { + "text": "weaponType != WEAPON_NONE" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 212, + "startColumn": 1, + "charOffset": 5230, + "charLength": 130, + "snippet": { + "text": "\t}\r\n\tbool isRanged() const {\r\n\t\treturn weaponType == WEAPON_DISTANCE && weaponType != WEAPON_NONE;\r\n\t}\r\n\tbool isMissile() const {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ec98fee2a5d2a695", + "equalIndicator/v1": "4ff9bf773f7fad947f28bdf308733da82ccbef1d7a69459501d28d25d0caee98" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 28, + "charOffset": 722, + "charLength": 29, + "snippet": { + "text": "createMonsterTypeLootLuaTable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 657, + "charLength": 195, + "snippet": { + "text": "#include \"lua/scripts/scripts.hpp\"\r\n\r\nvoid MonsterTypeFunctions::createMonsterTypeLootLuaTable(lua_State* L, const std::vector &lootList) {\r\n\tlua_createtable(L, lootList.size(), 0);\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5dc36c4bd579b824", + "equalIndicator/v1": "58a37db3fb1bca56ff8bd43145383a6088d5be0700acb1ca33c8eba7e8c8aef9" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Local variable 'measure' is only assigned but never accessed", + "markdown": "Local variable 'measure' is only assigned but never accessed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 268, + "startColumn": 23, + "charOffset": 7047, + "charLength": 7, + "snippet": { + "text": "measure" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 266, + "startColumn": 1, + "charOffset": 6970, + "charLength": 163, + "snippet": { + "text": "\r\nbool LuaScriptInterface::callFunction(int params) {\r\n\tmetrics::lua_latency measure(getMetricsScope());\r\n\tbool result = false;\r\n\tint size = lua_gettop(luaState);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e25f279e4b471b45", + "equalIndicator/v1": "5bd66c68e2f58cbd6e21c4a3313f6e178a50d2245c96d9b67f97da3085aec0ea" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Local variable 'success' is only assigned but never accessed", + "markdown": "Local variable 'success' is only assigned but never accessed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasetasks.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 27, + "startColumn": 8, + "charOffset": 934, + "charLength": 7, + "snippet": { + "text": "success" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 25, + "startColumn": 1, + "charOffset": 753, + "charLength": 355, + "snippet": { + "text": "void DatabaseTasks::execute(const std::string &query, std::function callback /* nullptr */) {\r\n\tthreadPool.detach_task([this, query, callback]() {\r\n\t\tbool success = db.executeQuery(query);\r\n\t\tif (callback != nullptr) {\r\n\t\t\tg_dispatcher().addEvent([callback, success]() { callback(nullptr, success); }, \"DatabaseTasks::execute\");\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "121f3bf500b8fec3", + "equalIndicator/v1": "5eed351711de2c00c083377be60608ee9faa7f0968d2d949de262e04ace1ea24" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 26, + "startColumn": 35, + "charOffset": 881, + "charLength": 13, + "snippet": { + "text": "createMonster" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 24, + "startColumn": 1, + "charOffset": 798, + "charLength": 196, + "snippet": { + "text": "uint32_t Monster::monsterAutoID = 0x50000001;\r\n\r\nstd::shared_ptr Monster::createMonster(const std::string &name) {\r\n\tconst auto mType = g_monsters().getMonsterType(name);\r\n\tif (!mType) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e6bf098d1beae520", + "equalIndicator/v1": "6001040e49b1ba6bb201336db6a57ffc1060d5e39462077e768b870691d99335" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Condition is always true", + "markdown": "Condition is always true" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 217, + "startColumn": 42, + "charOffset": 5402, + "charLength": 25, + "snippet": { + "text": "weaponType != WEAPON_NONE" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 215, + "startColumn": 1, + "charOffset": 5330, + "charLength": 105, + "snippet": { + "text": "\t}\r\n\tbool isMissile() const {\r\n\t\treturn weaponType == WEAPON_MISSILE && weaponType != WEAPON_NONE;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bfe13f3e86c7b4f2", + "equalIndicator/v1": "6b64f3f2f4879ec077567cff0a78b5e99cd9ec30e14ab8e89dda785dc0481a88" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 56, + "startColumn": 11, + "charOffset": 2347, + "charLength": 25, + "snippet": { + "text": "getIterationIncreaseCount" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 54, + "startColumn": 1, + "charOffset": 2300, + "charLength": 182, + "snippet": { + "text": "namespace {\r\n\ttemplate \r\n\tuint16_t getIterationIncreaseCount(T &map) {\r\n\t\tuint16_t totalIterationCount = 0;\r\n\t\tfor ([[maybe_unused]] const auto &[first, second] : map) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e2215423f0cb7935", + "equalIndicator/v1": "6c3b81de00c889d4e6e06528c89b0e05d5799e3df440503d9838d136bb6e636a" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Local variable is only assigned but never accessed", + "markdown": "Local variable is only assigned but never accessed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 329, + "startColumn": 5, + "charOffset": 8930, + "charLength": 20, + "snippet": { + "text": "// if (!str.empty())" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 327, + "startColumn": 1, + "charOffset": 8862, + "charLength": 122, + "snippet": { + "text": "\t\t\tcase ATTR_DESC: {\r\n\t\t\t\tconst auto str = stream.getString();\r\n\t\t\t\t// if (!str.empty())\r\n\t\t\t\t//\ttext = str;\r\n\t\t\t} break;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "af6d3b16a52aff71", + "equalIndicator/v1": "75e740ffe92e5307dd4e95efb1618c9de5feecd91cfcecbd8f6944bae8914304" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 47, + "startColumn": 9, + "charOffset": 1786, + "charLength": 6, + "snippet": { + "text": "Player" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 45, + "startColumn": 1, + "charOffset": 1740, + "charLength": 115, + "snippet": { + "text": "MuteCountMap Player::muteCountMap;\r\n\r\nPlayer::Player(ProtocolGame_ptr p) :\r\n\tCreature(),\r\n\tlastPing(OTSYS_TIME()),\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "e10d02c0e55e9976", + "equalIndicator/v1": "769448563f42af1dbca688526ba6cd8dd7e32a044add200481922820ccaf3752" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 22, + "startColumn": 33, + "charOffset": 681, + "charLength": 9, + "snippet": { + "text": "getWeapon" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 615, + "charLength": 146, + "snippet": { + "text": "Weapons::~Weapons() = default;\r\n\r\nconst WeaponShared_ptr Weapons::getWeapon(std::shared_ptr item) const {\r\n\tif (!item) {\r\n\t\treturn nullptr;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "76daf66dde4f80c2", + "equalIndicator/v1": "797d0a5095f18b684878e2ea79ef62e3f223dc1785daa3ceb06ecd766b50c5a5" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 22, + "startColumn": 31, + "charOffset": 666, + "charLength": 11, + "snippet": { + "text": "getInstance" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 626, + "charLength": 93, + "snippet": { + "text": "#endif\r\n\r\nConfigManager &ConfigManager::getInstance() {\r\n\treturn inject();\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "65b7b8044261fc29", + "equalIndicator/v1": "8ccea17d2e28870a92153e5ec0123cf0f95c354e15414660a0965142c3dc501c" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 53, + "startColumn": 7, + "charOffset": 2151, + "charLength": 23, + "snippet": { + "text": "registerWheelSpellTable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 51, + "startColumn": 1, + "charOffset": 2115, + "charLength": 239, + "snippet": { + "text": "\t */\r\n\ttemplate \r\n\tvoid registerWheelSpellTable(const T &spellData, const std::string &name, WheelSpellGrade_t gradeType) {\r\n\t\tif (name == \"Any_Focus_Mage_Spell\") {\r\n\t\t\tfor (const std::string &focusSpellName : m_focusSpells) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "464987a0a65381a7", + "equalIndicator/v1": "9014067abe6006abe1722748acef0b1591bca6c4a2480703cdc444714feffa82" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 16, + "startColumn": 6, + "charOffset": 484, + "charLength": 13, + "snippet": { + "text": "printXMLError" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 14, + "startColumn": 1, + "charOffset": 449, + "charLength": 235, + "snippet": { + "text": "#include \"utils/tools.hpp\"\r\n\r\nvoid printXMLError(const std::string &where, const std::string &fileName, const pugi::xml_parse_result &result) {\r\n\tg_logger().error(\"[{}] Failed to load {}: {}\", where, fileName, result.description());\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1ea7b986a4d7c520", + "equalIndicator/v1": "9506e05bc39d8ba502425a035bf44e597c8bbb57af8a5d8284bd176954fee2dd" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 34, + "startColumn": 22, + "charOffset": 1284, + "charLength": 22, + "snippet": { + "text": "luaPlayerSendInventory" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 32, + "startColumn": 1, + "charOffset": 1225, + "charLength": 194, + "snippet": { + "text": "#include \"enums/account_coins.hpp\"\r\n\r\nint PlayerFunctions::luaPlayerSendInventory(lua_State* L) {\r\n\t// player:sendInventory()\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f4a64902032e3c2b", + "equalIndicator/v1": "97780d4c5b9c9c43b7e45d456ea5fffcf29da5afb43d47dddb76d6552f7591fe" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 22, + "startColumn": 17, + "charOffset": 619, + "charLength": 8, + "snippet": { + "text": "setParam" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 596, + "charLength": 125, + "snippet": { + "text": " */\r\n\r\nbool Condition::setParam(ConditionParam_t param, int32_t value) {\r\n\tswitch (param) {\r\n\t\tcase CONDITION_PARAM_TICKS: {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1815774cc2eb9d7c", + "equalIndicator/v1": "a23d30f799cf29bc073484a8981eadaf01fbf587d0c5a56e593ee8126112a2c1" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 8, + "charOffset": 637, + "charLength": 5, + "snippet": { + "text": "House" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 592, + "charLength": 91, + "snippet": { + "text": "#include \"lib/metrics/metrics.hpp\"\r\n\r\nHouse::House(uint32_t houseId) :\r\n\tid(houseId) { }\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "79db7a1923a323c5", + "equalIndicator/v1": "b112e4c28cea6d39ac6b92cadbf22bb9df22e8ab82cd2b1e4b0b7a64a971b6ed" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 27, + "startColumn": 28, + "charOffset": 856, + "charLength": 14, + "snippet": { + "text": "playerSaySpell" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 25, + "startColumn": 1, + "charOffset": 797, + "charLength": 248, + "snippet": { + "text": "Spells::~Spells() = default;\r\n\r\nTalkActionResult_t Spells::playerSaySpell(std::shared_ptr player, std::string &words) {\r\n\tauto maxOnline = g_configManager().getNumber(MAX_PLAYERS_PER_ACCOUNT, __FUNCTION__);\r\n\tauto tile = player->getTile();\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5c4a73d4b8c53b57", + "equalIndicator/v1": "b878397f6916ab8db1bcaac04d4441bb5e4547a79fabe7dbaccfaf5e83154e25" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 29, + "startColumn": 12, + "charOffset": 1018, + "charLength": 11, + "snippet": { + "text": "hasProperty" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 27, + "startColumn": 1, + "charOffset": 935, + "charLength": 171, + "snippet": { + "text": "const std::shared_ptr &Tile::nullptr_tile = real_nullptr_tile;\r\n\r\nbool Tile::hasProperty(ItemProperty prop) const {\r\n\tswitch (prop) {\r\n\t\tcase CONST_PROP_BLOCKSOLID:\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4aa05e2de6559114", + "equalIndicator/v1": "ba281f3c00b67bdc9839a0ea3ac2f28b5f7884a02b18d1d6dd87d40f4d1d79d3" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 21, + "startColumn": 7, + "charOffset": 670, + "charLength": 8, + "snippet": { + "text": "Creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 19, + "startColumn": 1, + "charOffset": 632, + "charLength": 81, + "snippet": { + "text": "#include \"io/fileloader.hpp\"\r\n\r\nclass Creature;\r\nclass Player;\r\nclass Container;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "9ce9dc6427c00d28", + "equalIndicator/v1": "c4ee3a22da3ac3586f08e41b93caa44df4e61bde56e9068a2c98e658bb56caa9" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Local variable 'measure' is only assigned but never accessed", + "markdown": "Local variable 'measure' is only assigned but never accessed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 154, + "startColumn": 25, + "charOffset": 4603, + "charLength": 7, + "snippet": { + "text": "measure" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 152, + "startColumn": 1, + "charOffset": 4555, + "charLength": 134, + "snippet": { + "text": "\tmeasureLock.stop();\r\n\r\n\tmetrics::query_latency measure(query.substr(0, 50));\r\nretry:\r\n\tif (mysql_query(handle, query.data()) != 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "be4fd8ace12f2f8c", + "equalIndicator/v1": "cdc783d5e576fc6cc513df4cf5bd1aaf5b17b4649f0dfa9733ef2215a3186305" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "The address of the local variable 'it' may escape the function", + "markdown": "The address of the local variable 'it' may escape the function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 620, + "startColumn": 3, + "charOffset": 23198, + "charLength": 11, + "snippet": { + "text": "return *it;" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 618, + "startColumn": 1, + "charOffset": 23162, + "charLength": 54, + "snippet": { + "text": "\r\n\tif (it != taskOption.end()) {\r\n\t\treturn *it;\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d87721e4362a2fdf", + "equalIndicator/v1": "d445e824245ff897e398d54274d84039c5705644a1d2dcdbdc9440cf7ca42267" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Local variable 'measure' is only assigned but never accessed", + "markdown": "Local variable 'measure' is only assigned but never accessed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 287, + "startColumn": 23, + "charOffset": 7620, + "charLength": 7, + "snippet": { + "text": "measure" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 285, + "startColumn": 1, + "charOffset": 7539, + "charLength": 193, + "snippet": { + "text": "\r\nvoid LuaScriptInterface::callVoidFunction(int params) {\r\n\tmetrics::lua_latency measure(getMetricsScope());\r\n\tint size = lua_gettop(luaState);\r\n\tif (protectedCall(luaState, params, 0) != 0) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ce00ededcaac50a4", + "equalIndicator/v1": "d528fd5e71b2753006d5e4aacd7078b4ee81878469f28d676ec006ffcc2c923f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unreachable code", + "markdown": "Unreachable code" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 209, + "startColumn": 14, + "charOffset": 5864, + "charLength": 10, + "snippet": { + "text": "clearZones" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 207, + "startColumn": 1, + "charOffset": 5842, + "charLength": 116, + "snippet": { + "text": "\t\t}\r\n\t}\r\n\tstatic void clearZones();\r\n\r\n\tstatic bool loadFromXML(const std::string &fileName, uint16_t shiftID = 0);\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a096ad8ff05c1410", + "equalIndicator/v1": "e2fae79eec162188968f3f393881b783f0ec0980a42009be7669d68263ba9bee" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 23, + "startColumn": 11, + "charOffset": 702, + "charLength": 4, + "snippet": { + "text": "load" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 21, + "startColumn": 1, + "charOffset": 659, + "charLength": 132, + "snippet": { + "text": "#include \"map/spectators.hpp\"\r\n\r\nvoid Map::load(const std::string &identifier, const Position &pos) {\r\n\ttry {\r\n\t\tpath = identifier;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7c9a678a600abc52", + "equalIndicator/v1": "e3aa1417e9b5720082c906581a4101cedf72ca58634e5b0df2c5cb301714a263" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unreachable code", + "markdown": "Unreachable code" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 166, + "startColumn": 2, + "charOffset": 5077, + "charLength": 140, + "snippet": { + "text": "g_logger().debug(\"[{}] missing or incorrect script: {}\", __FUNCTION__, action->getScriptInterface()->getLoadingScriptName());\r\n\treturn false" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 164, + "startColumn": 1, + "charOffset": 5055, + "charLength": 169, + "snippet": { + "text": "\t\treturn false;\r\n\t}\r\n\tg_logger().debug(\"[{}] missing or incorrect script: {}\", __FUNCTION__, action->getScriptInterface()->getLoadingScriptName());\r\n\treturn false;\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f64b601cfc5fa081", + "equalIndicator/v1": "f07556ec12ee794ea1ac1e12e3c2f9fd4cac130d42b234b6414cab4c13d02f31" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unreachable code", + "markdown": "Unreachable code" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 3, + "charOffset": 1318, + "charLength": 10, + "snippet": { + "text": "return {};" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1304, + "charLength": 31, + "snippet": { + "text": "\t\t\t);\r\n\t\t}\r\n\t\treturn {};\r\n\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c43bf1dfc06febde", + "equalIndicator/v1": "f5e66ca4a7d1e7dc04b75eecea40ac2fe9793842ec71f94b419e348133ac3941" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "note", + "message": { + "text": "The file is too complex to perform the data-flow analysis", + "markdown": "The file is too complex to perform the data-flow analysis" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 21, + "startColumn": 11, + "charOffset": 688, + "charLength": 8, + "snippet": { + "text": "Creature" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 19, + "startColumn": 1, + "charOffset": 640, + "charLength": 82, + "snippet": { + "text": "#include \"lib/metrics/metrics.hpp\"\r\n\r\nCreature::Creature() {\r\n\tonIdleStatus();\r\n}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8927424b7a19c8b5", + "equalIndicator/v1": "fa3423b22348d0ef0581b6769c29a2d831c931702e15d7f3a8556106e0ff2427" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCDFA", + "kind": "fail", + "level": "warning", + "message": { + "text": "Local variable 'measure' is only assigned but never accessed", + "markdown": "Local variable 'measure' is only assigned but never accessed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 241, + "startColumn": 26, + "charOffset": 6325, + "charLength": 7, + "snippet": { + "text": "measure" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 239, + "startColumn": 1, + "charOffset": 6245, + "charLength": 148, + "snippet": { + "text": "\r\nstd::string LuaScriptInterface::getMetricsScope() {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tint32_t scriptId;\r\n\tint32_t callbackId;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "761ce4891d7fcf1a", + "equalIndicator/v1": "ffbba6ed3d53658d7d0d4a0a1a154a4d29a3e2460d42ef182036c53b953f58d2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedIncludeDirective", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unused \"#include \"lua/scripts/scripts.hpp\"\"", + "markdown": "Unused \"#include \"lua/scripts/scripts.hpp\"\"" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/global_event_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 15, + "startColumn": 1, + "charOffset": 526, + "charLength": 34, + "snippet": { + "text": "#include \"lua/scripts/scripts.hpp\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 13, + "startColumn": 1, + "charOffset": 461, + "charLength": 130, + "snippet": { + "text": "#include \"game/game.hpp\"\r\n#include \"lua/global/globalevent.hpp\"\r\n#include \"lua/scripts/scripts.hpp\"\r\n#include \"utils/tools.hpp\"\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "da75861ef4afa179", + "equalIndicator/v1": "24be6c828aa95d9f567d39b5c277e340d454127b7e27d2a71cefa23271eb152f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedIncludeDirective", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unused \"#include \"utils/definitions.hpp\"\"", + "markdown": "Unused \"#include \"utils/definitions.hpp\"\"" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 16, + "startColumn": 1, + "charOffset": 518, + "charLength": 32, + "snippet": { + "text": "#include \"utils/definitions.hpp\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 14, + "startColumn": 1, + "charOffset": 435, + "charLength": 175, + "snippet": { + "text": "#include \"account/account_repository_db.hpp\"\r\n#include \"config/configmanager.hpp\"\r\n#include \"utils/definitions.hpp\"\r\n#include \"security/argon.hpp\"\r\n#include \"utils/tools.hpp\"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7c79a1d71b9af08c", + "equalIndicator/v1": "2b088538da68694f59ae093b47427041b099cf1af4fdc42c49bf869d8fe81d25" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedIncludeDirective", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unused \"#include \"items/item.hpp\"\"", + "markdown": "Unused \"#include \"items/item.hpp\"\"" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/teleport_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 13, + "startColumn": 1, + "charOffset": 440, + "charLength": 25, + "snippet": { + "text": "#include \"items/item.hpp\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 11, + "startColumn": 1, + "charOffset": 399, + "charLength": 122, + "snippet": { + "text": "\r\n#include \"game/movement/teleport.hpp\"\r\n#include \"items/item.hpp\"\r\n#include \"lua/functions/map/teleport_functions.hpp\"\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "11af23bb01d66a4d", + "equalIndicator/v1": "6a712870aafd9b7285ba27d9817ed115e05c2796c248a19fc25908cac8ebe191" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedIncludeDirective", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unused \"#include \"config/configmanager.hpp\"\"", + "markdown": "Unused \"#include \"config/configmanager.hpp\"\"" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 17, + "startColumn": 1, + "charOffset": 594, + "charLength": 35, + "snippet": { + "text": "#include \"config/configmanager.hpp\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 15, + "startColumn": 1, + "charOffset": 504, + "charLength": 190, + "snippet": { + "text": "#include \"creatures/players/wheel/wheel_definitions.hpp\"\r\n#include \"io/io_bosstiary.hpp\"\r\n#include \"config/configmanager.hpp\"\r\n#include \"creatures/creature.hpp\"\r\n#include \"declarations.hpp\"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2725270849793c78", + "equalIndicator/v1": "a1455cccd8f4c444a611ce72404f83815ce7297e6777d7f4ad1877c76da1ea1e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedIncludeDirective", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unused \"#include \"creatures/players/cyclopedia/player_title.hpp\"\"", + "markdown": "Unused \"#include \"creatures/players/cyclopedia/player_title.hpp\"\"" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 32, + "startColumn": 1, + "charOffset": 1259, + "charLength": 56, + "snippet": { + "text": "#include \"creatures/players/cyclopedia/player_title.hpp\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 30, + "startColumn": 1, + "charOffset": 1138, + "charLength": 284, + "snippet": { + "text": "#include \"creatures/players/cyclopedia/player_badge.hpp\"\r\n#include \"creatures/players/cyclopedia/player_cyclopedia.hpp\"\r\n#include \"creatures/players/cyclopedia/player_title.hpp\"\r\n#include \"creatures/players/grouping/familiars.hpp\"\r\n#include \"server/network/protocol/protocolgame.hpp\"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8e0f044ad2fe46c1", + "equalIndicator/v1": "b566d92129891052ca756d355f6b3dac415d4c0430e5d668bc5aa7e6b017e62a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedIncludeDirective", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unused \"#include \"creatures/players/wheel/wheel_gems.hpp\"\"", + "markdown": "Unused \"#include \"creatures/players/wheel/wheel_gems.hpp\"\"" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 14, + "startColumn": 1, + "charOffset": 453, + "charLength": 49, + "snippet": { + "text": "#include \"creatures/players/wheel/wheel_gems.hpp\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 12, + "startColumn": 1, + "charOffset": 401, + "charLength": 192, + "snippet": { + "text": "#include \"lua/functions/core/game/lua_enums.hpp\"\r\n\r\n#include \"creatures/players/wheel/wheel_gems.hpp\"\r\n#include \"creatures/players/wheel/wheel_definitions.hpp\"\r\n#include \"io/io_bosstiary.hpp\"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "30c587723d22f75d", + "equalIndicator/v1": "b58a32a360fd8831d026948c4671d10477fdc26f1d8b6e28e2629082ad4b790a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedIncludeDirective", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unused \"#include \"lua/scripts/scripts.hpp\"\"", + "markdown": "Unused \"#include \"lua/scripts/scripts.hpp\"\"" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 17, + "startColumn": 1, + "charOffset": 553, + "charLength": 34, + "snippet": { + "text": "#include \"lua/scripts/scripts.hpp\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 15, + "startColumn": 1, + "charOffset": 482, + "charLength": 136, + "snippet": { + "text": "#include \"items/item.hpp\"\r\n#include \"lua/scripts/lua_environment.hpp\"\r\n#include \"lua/scripts/scripts.hpp\"\r\n#include \"utils/tools.hpp\"\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fa1263d0ee3552be", + "equalIndicator/v1": "c7bb0459a57ff0f20f08917a64e929fd9d52962f9bc9654bd659ad444c267369" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedIncludeDirective", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unused \"#include \"utils/tools.hpp\"\"", + "markdown": "Unused \"#include \"utils/tools.hpp\"\"" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 18, + "startColumn": 1, + "charOffset": 567, + "charLength": 26, + "snippet": { + "text": "#include \"utils/tools.hpp\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 16, + "startColumn": 1, + "charOffset": 525, + "charLength": 105, + "snippet": { + "text": "#include \"creatures/combat/spells.hpp\"\r\n\r\n#include \"utils/tools.hpp\"\r\n\r\n#define MITIGATION_INCREASE 0.03\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4c81ed0ddee9fcc3", + "equalIndicator/v1": "dbd7fd96c420f47e1b5bb6c4a04186bd34d303a2d48040b6b1f798c0ff3e911b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedIncludeDirective", + "kind": "fail", + "level": "warning", + "message": { + "text": "Unused \"#include \"config/configmanager.hpp\"\"", + "markdown": "Unused \"#include \"config/configmanager.hpp\"\"" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 15, + "startColumn": 1, + "charOffset": 481, + "charLength": 35, + "snippet": { + "text": "#include \"config/configmanager.hpp\"" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 13, + "startColumn": 1, + "charOffset": 433, + "charLength": 149, + "snippet": { + "text": "\r\n#include \"account/account_repository_db.hpp\"\r\n#include \"config/configmanager.hpp\"\r\n#include \"utils/definitions.hpp\"\r\n#include \"security/argon.hpp\"\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "02ca4c2ec7cafe96", + "equalIndicator/v1": "e3f992a58b4da2184f96f9b51afa7f78647548a068c584d878ce7274d4f116b2" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedMacro", + "kind": "fail", + "level": "warning", + "message": { + "text": "Macro 'appendCommandListener' is never used", + "markdown": "Macro 'appendCommandListener' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/command.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 30, + "startColumn": 1, + "charOffset": 971, + "charLength": 98, + "snippet": { + "text": "#define appendCommandListener(type, block) dispatcher.appendListener(type, commandCallback(block))" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 28, + "startColumn": 1, + "charOffset": 905, + "charLength": 166, + "snippet": { + "text": "}\r\n#define commandCallback(block) [this](const ICommand &) block\r\n#define appendCommandListener(type, block) dispatcher.appendListener(type, commandCallback(block))\r\n" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7a7a714d4b454c25", + "equalIndicator/v1": "21b83173a48b82a7d7a1837b5f6a7711032118205f16884cb93cb7c20defb127" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedMacro", + "kind": "fail", + "level": "warning", + "message": { + "text": "Macro '_SECURE_SCL' is never used", + "markdown": "Macro '_SECURE_SCL' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 35, + "startColumn": 4, + "charOffset": 849, + "charLength": 21, + "snippet": { + "text": "#define _SECURE_SCL 0" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 33, + "startColumn": 1, + "charOffset": 811, + "charLength": 107, + "snippet": { + "text": "\t#ifdef _MSC_VER\r\n\t\t#ifdef NDEBUG\r\n\t\t\t#define _SECURE_SCL 0\r\n\t\t\t#define HAS_ITERATOR_DEBUGGING 0\r\n\t\t#endif\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "611d7273d28e559c", + "equalIndicator/v1": "5345ca9a0f6f881d6bb1eaff3500b20420ccfff0b8a81ffd9b3d7964a29217ce" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedMacro", + "kind": "fail", + "level": "warning", + "message": { + "text": "Macro 'MAGIC_ENUM_RANGE_MIN' is never used", + "markdown": "Macro 'MAGIC_ENUM_RANGE_MIN' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/pch.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 118, + "startColumn": 1, + "charOffset": 2736, + "charLength": 33, + "snippet": { + "text": "#define MAGIC_ENUM_RANGE_MIN -500" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 116, + "startColumn": 1, + "charOffset": 2668, + "charLength": 163, + "snippet": { + "text": " * @note Sets the upper limit of the enum value range to 500.\r\n */\r\n#define MAGIC_ENUM_RANGE_MIN -500\r\n#define MAGIC_ENUM_RANGE_MAX 500\r\n#include \r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cfff89558b3b19e7", + "equalIndicator/v1": "7e4f6b2282556ecff7d26da257ea6d717fd8da2ccbe94ed88883c0464bfe044a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedMacro", + "kind": "fail", + "level": "warning", + "message": { + "text": "Macro 'HAS_ITERATOR_DEBUGGING' is never used", + "markdown": "Macro 'HAS_ITERATOR_DEBUGGING' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 36, + "startColumn": 4, + "charOffset": 875, + "charLength": 32, + "snippet": { + "text": "#define HAS_ITERATOR_DEBUGGING 0" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 34, + "startColumn": 1, + "charOffset": 829, + "charLength": 91, + "snippet": { + "text": "\t\t#ifdef NDEBUG\r\n\t\t\t#define _SECURE_SCL 0\r\n\t\t\t#define HAS_ITERATOR_DEBUGGING 0\r\n\t\t#endif\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2f6fce06519d868e", + "equalIndicator/v1": "adaa110430c5f456ba74ceb59eb260e591724d9b76e2f19bdd8bac28705ab194" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedMacro", + "kind": "fail", + "level": "warning", + "message": { + "text": "Macro 'appendEventListener' is never used", + "markdown": "Macro 'appendEventListener' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/event.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 26, + "startColumn": 1, + "charOffset": 893, + "charLength": 94, + "snippet": { + "text": "#define appendEventListener(type, block) dispatcher.appendListener(type, eventCallback(block))" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 24, + "startColumn": 1, + "charOffset": 831, + "charLength": 158, + "snippet": { + "text": "}\r\n#define eventCallback(block) [this](const IEvent &) block\r\n#define appendEventListener(type, block) dispatcher.appendListener(type, eventCallback(block))\r\n" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "06b76f470bd83308", + "equalIndicator/v1": "c5483970e45b12cd151f4b1d5bcc927f2fba5f24f51b411ef3f0879d06cc2a05" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedMacro", + "kind": "fail", + "level": "warning", + "message": { + "text": "Macro 'MAGIC_ENUM_RANGE_MAX' is never used", + "markdown": "Macro 'MAGIC_ENUM_RANGE_MAX' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/pch.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 119, + "startColumn": 1, + "charOffset": 2771, + "charLength": 32, + "snippet": { + "text": "#define MAGIC_ENUM_RANGE_MAX 500" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 117, + "startColumn": 1, + "charOffset": 2731, + "charLength": 102, + "snippet": { + "text": " */\r\n#define MAGIC_ENUM_RANGE_MIN -500\r\n#define MAGIC_ENUM_RANGE_MAX 500\r\n#include \r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bd4b4e130baa774f", + "equalIndicator/v1": "ccae340d317b71e8fa776082f2905b4aa00c3e5ded6b7a026ea5a2617d7722a6" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Struct 'scope_traits' is never used", + "markdown": "Struct 'scope_traits' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/di/shared.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 96, + "startColumn": 10, + "charOffset": 2728, + "charLength": 12, + "snippet": { + "text": "scope_traits" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 94, + "startColumn": 1, + "charOffset": 2695, + "charLength": 92, + "snippet": { + "text": "\r\n\t\ttemplate \r\n\t\tstruct scope_traits {\r\n\t\t\tusing type = detail::shared;\r\n\t\t};\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "61177577eed530a1", + "equalIndicator/v1": "0caf549c16b88527d984ac3cae1a7ab083b59713330156009d5c8508e42dba5f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Class 'CombatInfo' is never used", + "markdown": "Class 'CombatInfo' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 42, + "startColumn": 7, + "charOffset": 1292, + "charLength": 10, + "snippet": { + "text": "CombatInfo" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 40, + "startColumn": 1, + "charOffset": 1258, + "charLength": 75, + "snippet": { + "text": "class Monster;\r\nclass Npc;\r\nclass CombatInfo;\r\nclass Charm;\r\nclass IOPrey;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "de706612a2bfcf77", + "equalIndicator/v1": "23df6d5536469b368bf15e1060ca4f1cea206d8fe0d0d29e269b495642443906" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Struct 'scope_traits>' is never used", + "markdown": "Struct 'scope_traits\\>' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/di/shared.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 106, + "startColumn": 10, + "charOffset": 2929, + "charLength": 12, + "snippet": { + "text": "scope_traits" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 104, + "startColumn": 1, + "charOffset": 2896, + "charLength": 109, + "snippet": { + "text": "\r\n\t\ttemplate \r\n\t\tstruct scope_traits> {\r\n\t\t\tusing type = detail::shared;\r\n\t\t};\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0e61e841259c5bcd", + "equalIndicator/v1": "4bb0bc88be44f05b13877f3a2bdc26f840abb450e4ebc1777adcec0dd2f31d86" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Struct 'scope_traits>' is never used", + "markdown": "Struct 'scope_traits\\>' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/di/shared.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 101, + "startColumn": 10, + "charOffset": 2821, + "charLength": 12, + "snippet": { + "text": "scope_traits" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 99, + "startColumn": 1, + "charOffset": 2788, + "charLength": 107, + "snippet": { + "text": "\r\n\t\ttemplate \r\n\t\tstruct scope_traits> {\r\n\t\t\tusing type = detail::shared;\r\n\t\t};\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "94c9e48f4f87b830", + "equalIndicator/v1": "5adda4aa18e429bd8d87430956c4d8c5bfb2cd91b7ea7c2aa0bd6cdc37897a0b" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Class 'Houses' is never used", + "markdown": "Class 'Houses' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 277, + "startColumn": 7, + "charOffset": 7760, + "charLength": 6, + "snippet": { + "text": "Houses" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 275, + "startColumn": 1, + "charOffset": 7690, + "charLength": 110, + "snippet": { + "text": "using HouseMap = std::map>;\r\n\r\nclass Houses {\r\npublic:\r\n\tHouses() = default;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "26e52e927fe04760", + "equalIndicator/v1": "5b21f42288939d95605be46f37489a91ec75388c5a0c7d801a9bb22966e353a3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Class 'Bed' is never used", + "markdown": "Class 'Bed' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 49, + "startColumn": 7, + "charOffset": 1734, + "charLength": 3, + "snippet": { + "text": "Bed" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 47, + "startColumn": 1, + "charOffset": 1701, + "charLength": 70, + "snippet": { + "text": "class Party;\r\nclass Task;\r\nclass Bed;\r\nclass Guild;\r\nclass Imbuement;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "1b5cf388f12ee889", + "equalIndicator/v1": "74080b19664227faff2e0a38fa434da1be2d89f6faf2cb523b8407d0f78e2e13" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Class 'PlayerLock' is never used", + "markdown": "Class 'PlayerLock' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 2661, + "startColumn": 15, + "charOffset": 77896, + "charLength": 10, + "snippet": { + "text": "PlayerLock" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 2659, + "startColumn": 1, + "charOffset": 77870, + "charLength": 60, + "snippet": { + "text": "\r\nprivate:\r\n\tfriend class PlayerLock;\r\n\tstd::mutex mutex;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5bbd8c1732b9798e", + "equalIndicator/v1": "7728f76ea477eec4df40b20ff0861b5e81da3224ce6ab4c3ae67dc5f263a1948" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Struct 'scope_traits>' is never used", + "markdown": "Struct 'scope_traits\\>' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/di/shared.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 111, + "startColumn": 10, + "charOffset": 3039, + "charLength": 12, + "snippet": { + "text": "scope_traits" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 109, + "startColumn": 1, + "charOffset": 3006, + "charLength": 105, + "snippet": { + "text": "\r\n\t\ttemplate \r\n\t\tstruct scope_traits> {\r\n\t\t\tusing type = detail::shared;\r\n\t\t};\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d75840260ed9197c", + "equalIndicator/v1": "8a3ce7ee13cf34ae506ad76b6be71f53b6b4cb3527efbddb9a43acd54d4ab32c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Class 'Quest' is never used", + "markdown": "Class 'Quest' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 28, + "startColumn": 7, + "charOffset": 881, + "charLength": 5, + "snippet": { + "text": "Quest" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 26, + "startColumn": 1, + "charOffset": 843, + "charLength": 83, + "snippet": { + "text": "class Tile;\r\nclass Connection;\r\nclass Quest;\r\nclass ProtocolGame;\r\nclass PreySlot;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "bba88118484685b6", + "equalIndicator/v1": "8bf2fdac4a5c2d35944ca3ff59b7b3c0a13530ec8aea8a605f77d2f180d5f2c9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Class 'arraylist' is never used", + "markdown": "Class 'arraylist' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/arraylist.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 22, + "startColumn": 8, + "charOffset": 711, + "charLength": 9, + "snippet": { + "text": "arraylist" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 660, + "charLength": 99, + "snippet": { + "text": "namespace stdext {\r\n\ttemplate \r\n\tclass arraylist {\r\n\tpublic:\r\n\t\tarraylist() = default;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c444c58e732639c6", + "equalIndicator/v1": "abdadaa4d87f78ae998783506fe9f058b25d326fc34e7aabc6ddf8f3f5e607b3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Struct 'scope_traits' is never used", + "markdown": "Struct 'scope_traits' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/di/shared.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 91, + "startColumn": 10, + "charOffset": 2612, + "charLength": 12, + "snippet": { + "text": "scope_traits" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 89, + "startColumn": 1, + "charOffset": 2571, + "charLength": 123, + "snippet": { + "text": "\tpublic:\r\n\t\ttemplate \r\n\t\tstruct scope_traits {\r\n\t\t\tusing type = typename di::config::scope_traits::type;\r\n\t\t};\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "69ffbae48aded6d9", + "equalIndicator/v1": "b92639f88e78831592750f1f353610aab33e4ea6eab5554e7673ac7b1f8037ff" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Class 'vector_sort' is never used", + "markdown": "Class 'vector_sort' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/vectorsort.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 8, + "charOffset": 564, + "charLength": 11, + "snippet": { + "text": "vector_sort" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 513, + "charLength": 106, + "snippet": { + "text": "namespace stdext {\r\n\ttemplate \r\n\tclass vector_sort {\r\n\tpublic:\r\n\t\tbool contains(const T &v) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4fdd5249401d1cd6", + "equalIndicator/v1": "c3489ab16ac890bec249e021df3ccc706f51da688ee9f7e83b4b33315382ae6e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Struct 'is_creatable' is never used", + "markdown": "Struct 'is_creatable' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/di/runtime_provider.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 11, + "charOffset": 1083, + "charLength": 12, + "snippet": { + "text": "is_creatable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1047, + "charLength": 99, + "snippet": { + "text": "\r\n\t\t\ttemplate \r\n\t\t\tstruct is_creatable {\r\n\t\t\t\tstatic constexpr auto value = true;\r\n\t\t\t};\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "64b1ff696522edf0", + "equalIndicator/v1": "c84535d5e7554aa968b1dc8cd5a40d8c4dbd3640e57e4f6c23852c8433abb9f7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Class 'scope' is never used", + "markdown": "Class 'scope' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/di/shared.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 25, + "startColumn": 10, + "charOffset": 551, + "charLength": 5, + "snippet": { + "text": "scope" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 23, + "startColumn": 1, + "charOffset": 501, + "charLength": 103, + "snippet": { + "text": "\t\tpublic:\r\n\t\t\ttemplate \r\n\t\t\tclass scope {\r\n\t\t\tpublic:\r\n\t\t\t\tscope() noexcept = default;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0c3bd96613d297a5", + "equalIndicator/v1": "ca2750d5ec1b5678a0764bb7ccbbc21d3c8e98e0663228fea31ca58c6e27cfb8" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Struct 'ProtocolFamiliars' is never used", + "markdown": "Struct 'ProtocolFamiliars' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creatures_definitions.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 1535, + "startColumn": 8, + "charOffset": 39869, + "charLength": 17, + "snippet": { + "text": "ProtocolFamiliars" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 1533, + "startColumn": 1, + "charOffset": 39856, + "charLength": 153, + "snippet": { + "text": "*/\r\n\r\nstruct ProtocolFamiliars {\r\n\tProtocolFamiliars(const std::string &initName, uint16_t initLookType) :\r\n\t\tname(initName), lookType(initLookType) { }\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "cf9d5b50cabdb602", + "equalIndicator/v1": "e9eeeea261f64448b4b0fde5c2e465bfe5556b14f253f4a2701800662d6af7b1" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Struct 'formatter, char>>' is never used", + "markdown": "Struct 'formatter, char\\>\\>' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/pch.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 87, + "startColumn": 13, + "charOffset": 1852, + "charLength": 9, + "snippet": { + "text": "formatter" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 85, + "startColumn": 1, + "charOffset": 1782, + "charLength": 244, + "snippet": { + "text": "// FMT Custom Formatter for Enums\r\ntemplate \r\nstruct fmt::formatter, char>> : formatter> {\r\n\ttemplate \r\n\tauto format(E e, FormatContext &ctx) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "f36a85dd204e79ad", + "equalIndicator/v1": "f94b8e56d9bd7b09ba1470a4ffe31644f1a69fe3374491dbcb3f393e9ef4b25e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedStruct", + "kind": "fail", + "level": "warning", + "message": { + "text": "Class 'Towns' is never used", + "markdown": "Class 'Towns' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/town.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 44, + "startColumn": 7, + "charOffset": 987, + "charLength": 5, + "snippet": { + "text": "Towns" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 42, + "startColumn": 1, + "charOffset": 919, + "charLength": 106, + "snippet": { + "text": "using TownMap = std::map>;\r\n\r\nclass Towns {\r\npublic:\r\n\tTowns() = default;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "d9c313bdbb61a823", + "equalIndicator/v1": "fc0ddcb169b459328c65c39ff8fbd606dd1111d09ba8677505beba3565d6676e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTemplateParameter", + "kind": "fail", + "level": "warning", + "message": { + "text": "Type parameter 'TProvider' is never used", + "markdown": "Type parameter 'TProvider' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/di/shared.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 41, + "startColumn": 35, + "charOffset": 1156, + "charLength": 9, + "snippet": { + "text": "TProvider" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 39, + "startColumn": 1, + "charOffset": 1029, + "charLength": 283, + "snippet": { + "text": "\t\t\t\tusing is_referable = typename wrappers::shared::template is_referable;\r\n\r\n\t\t\t\ttemplate \r\n\t\t\t\tstatic auto try_create(const TProvider &provider)\r\n\t\t\t\t\t-> decltype(wrappers::shared { std::shared_ptr { provider.get() } });\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2c03226c541cf0c7", + "equalIndicator/v1": "57642bf391d59b3bab14e1d61094c138299b06cc2f587222d4b9e1a66a287597" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'EventRemover' is never used", + "markdown": "Using 'EventRemover' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/event.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 7, + "charOffset": 721, + "charLength": 12, + "snippet": { + "text": "EventRemover" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 607, + "charLength": 197, + "snippet": { + "text": "using EventListeners = MessageListeners;\r\nusing EventDispatcher = MessageDispatcher;\r\nusing EventRemover = MessageRemover;\r\n\r\ninline IEvent event(EventType type) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "0272a3125e6ec04d", + "equalIndicator/v1": "0fc924ccaca3e8aea20c2bb811c6e3b215b5c00b92aea9471e2493e1854e71dd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'EventDispatcher' is never used", + "markdown": "Using 'EventDispatcher' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/event.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 19, + "startColumn": 7, + "charOffset": 666, + "charLength": 15, + "snippet": { + "text": "EventDispatcher" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 17, + "startColumn": 1, + "charOffset": 555, + "charLength": 210, + "snippet": { + "text": "using EventListener = IMessageListener;\r\nusing EventListeners = MessageListeners;\r\nusing EventDispatcher = MessageDispatcher;\r\nusing EventRemover = MessageRemover;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "17c23a1502fa25cc", + "equalIndicator/v1": "109d5714d62fc5e6416bec478dcfa9876d03a19c88843b3c973ce2782c3c58fa" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'EventListener' is never used", + "markdown": "Using 'EventListener' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/event.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 17, + "startColumn": 7, + "charOffset": 561, + "charLength": 13, + "snippet": { + "text": "EventListener" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 15, + "startColumn": 1, + "charOffset": 459, + "charLength": 255, + "snippet": { + "text": "using EventHandler = MessageHandler;\r\nusing EventPolicy = MessagePolicy;\r\nusing EventListener = IMessageListener;\r\nusing EventListeners = MessageListeners;\r\nusing EventDispatcher = MessageDispatcher;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4fd5e869c89e14ad", + "equalIndicator/v1": "169e40a4de5066634f7e35d994fc2b25c015e5e2d6981d26a00c435735decbaf" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'NameMap' is never used", + "markdown": "Using 'NameMap' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 387, + "startColumn": 8, + "charOffset": 9915, + "charLength": 7, + "snippet": { + "text": "NameMap" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 385, + "startColumn": 1, + "charOffset": 9884, + "charLength": 140, + "snippet": { + "text": "class Items {\r\npublic:\r\n\tusing NameMap = std::unordered_multimap;\r\n\tusing InventoryVector = std::vector;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ba486f9dafd02a70", + "equalIndicator/v1": "345ea36b6946287fbbb2e9e80436ed190744c129e474133785c564513b214147" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'EventPolicy' is never used", + "markdown": "Using 'EventPolicy' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/event.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 16, + "startColumn": 7, + "charOffset": 514, + "charLength": 11, + "snippet": { + "text": "EventPolicy" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 14, + "startColumn": 1, + "charOffset": 423, + "charLength": 236, + "snippet": { + "text": "using IEvent = Message;\r\nusing EventHandler = MessageHandler;\r\nusing EventPolicy = MessagePolicy;\r\nusing EventListener = IMessageListener;\r\nusing EventListeners = MessageListeners;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "384a7db9201797fa", + "equalIndicator/v1": "469af02a1ec0144162966ea1c932f250121b233dbfa508c591fb0ec07f57459e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'is_referable' is never used", + "markdown": "Using 'is_referable' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/di/shared.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 39, + "startColumn": 11, + "charOffset": 1039, + "charLength": 12, + "snippet": { + "text": "is_referable" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 37, + "startColumn": 1, + "charOffset": 995, + "charLength": 172, + "snippet": { + "text": "\r\n\t\t\t\ttemplate \r\n\t\t\t\tusing is_referable = typename wrappers::shared::template is_referable;\r\n\r\n\t\t\t\ttemplate \r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "05ca36c90a091ea8", + "equalIndicator/v1": "4bc03c675e90ffb884964cd18484ab513f3c29b21b949bc16f8ecaaf39341537" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'RuneSpellFunction' is never used", + "markdown": "Using 'RuneSpellFunction' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 78, + "startColumn": 7, + "charOffset": 2407, + "charLength": 17, + "snippet": { + "text": "RuneSpellFunction" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 76, + "startColumn": 1, + "charOffset": 2351, + "charLength": 213, + "snippet": { + "text": "constexpr auto g_spells = Spells::getInstance;\r\n\r\nusing RuneSpellFunction = std::function spell, std::shared_ptr player, const Position &posTo)>;\r\n\r\nclass BaseSpell {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "51297eb8ecbc45e9", + "equalIndicator/v1": "616312916fb518c9d658219d1d0a93994c3d2273e936ecf6518330d659c05602" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'WeaponUnique_ptr' is never used", + "markdown": "Using 'WeaponUnique_ptr' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 26, + "startColumn": 7, + "charOffset": 752, + "charLength": 16, + "snippet": { + "text": "WeaponUnique_ptr" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 24, + "startColumn": 1, + "charOffset": 724, + "charLength": 125, + "snippet": { + "text": "struct LuaVariant;\r\n\r\nusing WeaponUnique_ptr = std::unique_ptr;\r\nusing WeaponShared_ptr = std::shared_ptr;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fb8dda5ab4eccf10", + "equalIndicator/v1": "61d2fee0a364ab6eacaf3ccd6e9d54aea6bba7af3e3d9bc588d97990967b5a1d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'CommandListener' is never used", + "markdown": "Using 'CommandListener' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/command.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 21, + "startColumn": 7, + "charOffset": 611, + "charLength": 15, + "snippet": { + "text": "CommandListener" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 19, + "startColumn": 1, + "charOffset": 501, + "charLength": 275, + "snippet": { + "text": "using CommandHandler = MessageHandler;\r\nusing CommandPolicy = MessagePolicy;\r\nusing CommandListener = IMessageListener;\r\nusing CommandListeners = MessageListeners;\r\nusing CommandDispatcher = MessageDispatcher;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "427eedea6c7eacf9", + "equalIndicator/v1": "84089ba1506cbc6e8190ed6d0bb1be1510010e5a626b809de4c3b4ffcbf1f95a" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'StorageMap' is never used", + "markdown": "Using 'StorageMap' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 77, + "startColumn": 8, + "charOffset": 2112, + "charLength": 10, + "snippet": { + "text": "StorageMap" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 75, + "startColumn": 1, + "charOffset": 2093, + "charLength": 119, + "snippet": { + "text": "\r\nprivate:\r\n\tusing StorageMap = std::map;\r\n\tusing DBResultMap = std::map;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c13da41c2e472ecb", + "equalIndicator/v1": "8e5ce11f1915034338017cf4eb0948761e21e5b5059849168a364a4267f19eb9" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'CommandListeners' is never used", + "markdown": "Using 'CommandListeners' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/command.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 22, + "startColumn": 7, + "charOffset": 667, + "charLength": 16, + "snippet": { + "text": "CommandListeners" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 554, + "charLength": 275, + "snippet": { + "text": "using CommandPolicy = MessagePolicy;\r\nusing CommandListener = IMessageListener;\r\nusing CommandListeners = MessageListeners;\r\nusing CommandDispatcher = MessageDispatcher;\r\nusing CommandRemover = MessageRemover;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "fdef2abe14fb9b4e", + "equalIndicator/v1": "901ac8e56b5cab19d1abfb24b5a56f2cf6e887f0120603085c0a9adb35de8b7d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'CommandHandler' is never used", + "markdown": "Using 'CommandHandler' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/command.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 19, + "startColumn": 7, + "charOffset": 507, + "charLength": 14, + "snippet": { + "text": "CommandHandler" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 17, + "startColumn": 1, + "charOffset": 459, + "charLength": 201, + "snippet": { + "text": "\r\nusing ICommand = Message;\r\nusing CommandHandler = MessageHandler;\r\nusing CommandPolicy = MessagePolicy;\r\nusing CommandListener = IMessageListener;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "186366deb536037c", + "equalIndicator/v1": "9dde7576662b5d2770758cb5e7c38c0239948c200ada1dd1a9ed4a72027222dd" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'CommandRemover' is never used", + "markdown": "Using 'CommandRemover' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/command.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 24, + "startColumn": 7, + "charOffset": 783, + "charLength": 14, + "snippet": { + "text": "CommandRemover" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 22, + "startColumn": 1, + "charOffset": 661, + "charLength": 215, + "snippet": { + "text": "using CommandListeners = MessageListeners;\r\nusing CommandDispatcher = MessageDispatcher;\r\nusing CommandRemover = MessageRemover;\r\n\r\ninline ICommand command(CommandType type) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "672875cf37b0e339", + "equalIndicator/v1": "9fc6fb5458a05d66dac45bd1bb1373a74796f760b499db28d7d4003b19ea99b7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'VocEquipMap' is never used", + "markdown": "Using 'VocEquipMap' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 24, + "startColumn": 7, + "charOffset": 724, + "charLength": 11, + "snippet": { + "text": "VocEquipMap" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 22, + "startColumn": 1, + "charOffset": 712, + "charLength": 97, + "snippet": { + "text": "};\r\n\r\nusing VocEquipMap = std::map;\r\n\r\nclass MoveEvents final : public Scripts {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8491542fb0032e11", + "equalIndicator/v1": "ae2a5f6e28b74452001ebbd91253e082b128be8658e082d47c7434025e4591a3" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'ItemBlockList' is never used", + "markdown": "Using 'ItemBlockList' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 16, + "startColumn": 7, + "charOffset": 510, + "charLength": 13, + "snippet": { + "text": "ItemBlockList" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 14, + "startColumn": 1, + "charOffset": 468, + "charLength": 135, + "snippet": { + "text": "#include \"database/database.hpp\"\r\n\r\nusing ItemBlockList = std::list>>;\r\n\r\nclass IOLoginData {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "77cde0ef28f9cc43", + "equalIndicator/v1": "af9ed124bfd454f0ede2dbb764b4492048209edfd3f2f8465ca524fccb0e1b08" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'scope_traits' is never used", + "markdown": "Using 'scope_traits' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/di/runtime_provider.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 71, + "startColumn": 9, + "charOffset": 2034, + "charLength": 12, + "snippet": { + "text": "scope_traits" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 69, + "startColumn": 1, + "charOffset": 1994, + "charLength": 130, + "snippet": { + "text": "\tpublic:\r\n\t\ttemplate \r\n\t\tusing scope_traits = typename TScopeTraits::template scope_traits;\r\n\r\n\t\tauto provider(...) {\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "42961bb2c38e7787", + "equalIndicator/v1": "ba87516efaf76f3074659a053f7b40d14bc175ac0a6ed1789fbd38eb56d1725f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'CommandPolicy' is never used", + "markdown": "Using 'CommandPolicy' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/command.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 20, + "startColumn": 7, + "charOffset": 560, + "charLength": 13, + "snippet": { + "text": "CommandPolicy" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 461, + "charLength": 256, + "snippet": { + "text": "using ICommand = Message;\r\nusing CommandHandler = MessageHandler;\r\nusing CommandPolicy = MessagePolicy;\r\nusing CommandListener = IMessageListener;\r\nusing CommandListeners = MessageListeners;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a76ad8c286b22089", + "equalIndicator/v1": "c3a1efd9919c45ab8757c0e65bdac17b45e0c3ee78d409410308d0995eada011" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'EventListeners' is never used", + "markdown": "Using 'EventListeners' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/event.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 18, + "startColumn": 7, + "charOffset": 613, + "charLength": 14, + "snippet": { + "text": "EventListeners" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 16, + "startColumn": 1, + "charOffset": 508, + "charLength": 255, + "snippet": { + "text": "using EventPolicy = MessagePolicy;\r\nusing EventListener = IMessageListener;\r\nusing EventListeners = MessageListeners;\r\nusing EventDispatcher = MessageDispatcher;\r\nusing EventRemover = MessageRemover;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "dbbc6a144211c4a2", + "equalIndicator/v1": "d88b96d3ffd0aa4c1bbcb1b0d92ed8955a4f9b898cf1ec446d842fa4a6092bf7" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'EventHandler' is never used", + "markdown": "Using 'EventHandler' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/event.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 15, + "startColumn": 7, + "charOffset": 465, + "charLength": 12, + "snippet": { + "text": "EventHandler" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 13, + "startColumn": 1, + "charOffset": 421, + "charLength": 185, + "snippet": { + "text": "\r\nusing IEvent = Message;\r\nusing EventHandler = MessageHandler;\r\nusing EventPolicy = MessagePolicy;\r\nusing EventListener = IMessageListener;\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "da960281f5977bdd", + "equalIndicator/v1": "e403a4acae22708c8b1e9124d54705aec4ac6d7c9b50f1c281ebce4a81106423" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "OCUnusedTypeAlias", + "kind": "fail", + "level": "warning", + "message": { + "text": "Using 'CommandDispatcher' is never used", + "markdown": "Using 'CommandDispatcher' is never used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/messaging/command.hpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 23, + "startColumn": 7, + "charOffset": 724, + "charLength": 17, + "snippet": { + "text": "CommandDispatcher" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 21, + "startColumn": 1, + "charOffset": 605, + "charLength": 226, + "snippet": { + "text": "using CommandListener = IMessageListener;\r\nusing CommandListeners = MessageListeners;\r\nusing CommandDispatcher = MessageDispatcher;\r\nusing CommandRemover = MessageRemover;\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "67d81a6bff225b67", + "equalIndicator/v1": "ef4bf17bdb137916cec7ea41972ad639a08938634591b6ab1a3c6d13574ad7d0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "VirtualCallInCtorOrDtor", + "kind": "fail", + "level": "warning", + "message": { + "text": "Do not invoke virtual member functions from destructor", + "markdown": "Do not invoke virtual member functions from destructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 66, + "startColumn": 22, + "charOffset": 2340, + "charLength": 9, + "snippet": { + "text": "getParent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 64, + "startColumn": 1, + "charOffset": 2255, + "charLength": 173, + "snippet": { + "text": "Container::~Container() {\r\n\tif (getID() == ITEM_BROWSEFIELD) {\r\n\t\tif (getParent() && getParent()->getTile()) {\r\n\t\t\tg_game().browseFields.erase(getParent()->getTile());\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "05e1b7c9bd62db1a", + "equalIndicator/v1": "119f1cdad6dc5e1e024a4637f5bd4bde2c64d37028fedc4f5f2992ec18968ea0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "VirtualCallInCtorOrDtor", + "kind": "fail", + "level": "warning", + "message": { + "text": "Do not invoke virtual member functions from constructor", + "markdown": "Do not invoke virtual member functions from constructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 22, + "startColumn": 2, + "charOffset": 703, + "charLength": 12, + "snippet": { + "text": "onIdleStatus" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 676, + "charLength": 48, + "snippet": { + "text": "\r\nCreature::Creature() {\r\n\tonIdleStatus();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7450f53cc604b72c", + "equalIndicator/v1": "461aeab752528abaeae55ce5113567e4e501afb325f42d037a68e48894ee2e2c" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "VirtualCallInCtorOrDtor", + "kind": "fail", + "level": "warning", + "message": { + "text": "Do not invoke virtual member functions from destructor", + "markdown": "Do not invoke virtual member functions from destructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 30, + "startColumn": 2, + "charOffset": 921, + "charLength": 10, + "snippet": { + "text": "closeState" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 28, + "startColumn": 1, + "charOffset": 879, + "charLength": 61, + "snippet": { + "text": "\r\n\tLuaEnvironment::shuttingDown = true;\r\n\tcloseState();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "724ed90fdf87c817", + "equalIndicator/v1": "7d4a0f856edcbe1ab60b0d383d5670e83af95291ff16b992d65eb2446c928e2e" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "VirtualCallInCtorOrDtor", + "kind": "fail", + "level": "warning", + "message": { + "text": "Do not invoke virtual member functions from destructor", + "markdown": "Do not invoke virtual member functions from destructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 28, + "startColumn": 2, + "charOffset": 1000, + "charLength": 10, + "snippet": { + "text": "closeState" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 26, + "startColumn": 1, + "charOffset": 952, + "charLength": 67, + "snippet": { + "text": "\r\nLuaScriptInterface::~LuaScriptInterface() {\r\n\tcloseState();\r\n}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "8f8aa0b2ebcc949a", + "equalIndicator/v1": "8ce6c2a51e45e768d68e2a84348a7c90dce237197b8765ff641e0e698bf7c03d" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "VirtualCallInCtorOrDtor", + "kind": "fail", + "level": "warning", + "message": { + "text": "Do not invoke virtual member functions from destructor", + "markdown": "Do not invoke virtual member functions from destructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 67, + "startColumn": 32, + "charOffset": 2398, + "charLength": 9, + "snippet": { + "text": "getParent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 65, + "startColumn": 1, + "charOffset": 2282, + "charLength": 148, + "snippet": { + "text": "\tif (getID() == ITEM_BROWSEFIELD) {\r\n\t\tif (getParent() && getParent()->getTile()) {\r\n\t\t\tg_game().browseFields.erase(getParent()->getTile());\r\n\t\t}\r\n\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "5bcbc336298ce3cf", + "equalIndicator/v1": "b72f751e1a834d2cda1e4e29aef74fcd3d86cf56266613bfdefe632b83a8c8d0" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "VirtualCallInCtorOrDtor", + "kind": "fail", + "level": "warning", + "message": { + "text": "Do not invoke virtual member functions from destructor", + "markdown": "Do not invoke virtual member functions from destructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 66, + "startColumn": 7, + "charOffset": 2325, + "charLength": 9, + "snippet": { + "text": "getParent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 64, + "startColumn": 1, + "charOffset": 2255, + "charLength": 173, + "snippet": { + "text": "Container::~Container() {\r\n\tif (getID() == ITEM_BROWSEFIELD) {\r\n\t\tif (getParent() && getParent()->getTile()) {\r\n\t\t\tg_game().browseFields.erase(getParent()->getTile());\r\n\t\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7a88e498355d72af", + "equalIndicator/v1": "b91584fc575ef933c62679406d356a292078d026e430c74710a782242aa00293" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + }, + { + "ruleId": "VirtualCallInCtorOrDtor", + "kind": "fail", + "level": "warning", + "message": { + "text": "Do not invoke virtual member functions from destructor", + "markdown": "Do not invoke virtual member functions from destructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 71, + "startColumn": 20, + "charOffset": 2499, + "charLength": 9, + "snippet": { + "text": "getParent" + }, + "sourceLanguage": "ObjectiveC" + }, + "contextRegion": { + "startLine": 69, + "startColumn": 1, + "charOffset": 2429, + "charLength": 93, + "snippet": { + "text": "\r\n\t\tfor (std::shared_ptr item : itemlist) {\r\n\t\t\titem->setParent(getParent());\r\n\t\t}\r\n\t}\r" + }, + "sourceLanguage": "ObjectiveC" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "canary-opentibia", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "11de239a7cacaabb", + "equalIndicator/v1": "d007daab3480f59d07a0936eb0c71e50d35c6bcdbdffc5b01c6acae765223adc" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "ObjectiveC" + ] + } + } + ], + "automationDetails": { + "id": "canary/qodana/2024-08-04", + "guid": "7be05d40-d865-411d-aa6b-241c32279c4e", + "properties": { + "jobUrl": "" + } + }, + "newlineSequences": [ + "\r\n", + "\n" + ], + "properties": { + "configProfile": "recommended", + "deviceId": "131123170079767-8100-48ff-b489-333788c6b484", + "qodanaNewResultSummary": { + "high": 2881, + "moderate": 23, + "total": 2904 + } + } + } + ], + "properties": { + "runTimestamp": "1722822687214" + } +} \ No newline at end of file diff --git a/qodana.yml b/qodana.yml index e921c4027a6..fa65fa2ef55 100644 --- a/qodana.yml +++ b/qodana.yml @@ -12,3 +12,84 @@ bootstrap: | mkdir -p build cd build cmake -DCMAKE_TOOLCHAIN_FILE=~/vcpkg/scripts/buildsystems/vcpkg.cmake .. --preset linux-debug || true +profile: + name: qodana.recommended +include: + - name: CheckDependencyLicenses + - name: ClangTidy + - name: ForLoopReplaceableByWhileJS + - name: IfStatementWithIdenticalBranchesJS + - name: IfStatementWithTooManyBranchesJS + - name: ConditionalExpressionWithIdenticalBranchesJS + - name: ConstantConditionalExpressionJS + - name: DuplicateConditionJS + - name: LoopStatementThatDoesntLoopJS + - name: JSObjectNullOrUndefined + - name: PointlessBooleanExpressionJS + - name: TrivialIfJS + - name: TrivialConditionalJS + - name: TailRecursionJS + - name: UnnecessaryContinueJS + - name: UnnecessaryReturnJS + - name: UnnecessaryLabelJS + - name: UnnecessaryLabelOnBreakStatementJS + - name: UnnecessaryLabelOnContinueStatementJS + - name: UnreachableCodeJS + - name: SuspiciousTypeOfGuard + - name: ArrayIndexOutOfBounds + - name: ConstantConditionsOC + - name: ConstantFunctionResult + - name: ConstantParameter + - name: OCDFA + - name: DanglingPointer + - name: EndlessLoop + - name: InfiniteRecursion + - name: OCGlobalDFAInspection + - name: LocalValueEscapesScope + - name: LoopDoesntUseConditionVariable + - name: MemoryLeak + - name: NotInitializedField + - name: NullDereference + - name: UnreachableCallsOfFunction + - name: UnreachableCode + - name: UnusedLocalVariable + - name: UnusedParameter + - name: UnusedValue + - name: DtsDuplicateElement + - name: DtsBits + - name: DtsContainer + - name: DtsStatementOrder + - name: HidingNonVirtualFunction + - name: NotImplementedFunctions + - name: CMakeDeprecatedCommands + - name: JSDeprecatedSymbols + - name: EmptyDirectory + - name: JSAccessibilityCheck + - name: VirtualCallInCtorOrDtor + - name: DivideByZeroJS + - name: InfiniteLoopJS + - name: InfiniteRecursionJS + - name: QodanaSanity + - name: DefaultNotLastCaseInSwitchJS + - name: JSMissingSwitchBranches + - name: JSMissingSwitchDefault + - name: JSRedundantSwitchStatement + - name: JSDuplicateCaseLabel + - name: FallThroughInSwitchStatementJS + - name: NestedSwitchStatementJS + - name: OCUnusedClass + - name: OCUnusedConcept + - name: OCUnusedGlobalDeclaration + - name: OCUnusedIncludeDirective + - name: OCUnusedInstanceVariable + - name: OCUnusedMacro + - name: OCUnusedMethod + - name: OCUnusedProperty + - name: OCUnusedStruct + - name: OCUnusedTemplateParameter + - name: OCUnusedTypeAlias + - name: JSUnusedAssignment + - name: JSUnusedGlobalSymbols + - name: JSUnusedLocalSymbols + - name: ThisExpressionReferencesGlobalObjectJS + - name: JSConstantReassignment From cc5d383f5900ccbe4d7fde694cf8fc938f9f6aa0 Mon Sep 17 00:00:00 2001 From: Kizuno18 <110933270+Kizuno18@users.noreply.github.com> Date: Tue, 6 Aug 2024 22:05:49 -0300 Subject: [PATCH 05/24] fix: dockerfile (#2797) This fixes an issue in the Dockerfile where the extraction of the vcpkg commit ID from vcpkg.json was including extra characters, causing the git checkout command to fail. --- docker/Dockerfile.dev | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docker/Dockerfile.dev b/docker/Dockerfile.dev index 4cd63334d5e..e04fd469064 100644 --- a/docker/Dockerfile.dev +++ b/docker/Dockerfile.dev @@ -11,12 +11,13 @@ RUN --mount=type=cache,target=/var/cache/apt \ WORKDIR /opt COPY vcpkg.json /opt -RUN vcpkgCommitId=$(grep '.builtin-baseline' vcpkg.json | awk -F: '{print $2}' | tr -d '," ') \ - && echo "vcpkg commit ID: $vcpkgCommitId" \ - && git clone https://github.com/Microsoft/vcpkg.git \ - && cd vcpkg \ - && git checkout "$vcpkgCommitId" \ - && ./bootstrap-vcpkg.sh +RUN vcpkgCommitId=$(grep '.builtin-baseline' vcpkg.json | awk -F: '{print $2}' | tr -d '," ' | tr -d '\r\n') \ + && echo "vcpkg commit ID: '$vcpkgCommitId'" \ + && git clone https://github.com/microsoft/vcpkg.git \ + && cd vcpkg \ + && git fetch origin \ + && git checkout "$vcpkgCommitId" \ + && ./bootstrap-vcpkg.sh WORKDIR /opt/vcpkg COPY vcpkg.json /opt/vcpkg/ From f1f5131312786f04e4812351aec9ace6ab0281c3 Mon Sep 17 00:00:00 2001 From: Felipe Paluco <87909998+FelipePaluco@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:15:20 -0300 Subject: [PATCH 06/24] fix: magic wall being created on invisible creatures (#2792) This fixes an issue where players could cast Magic Wall and Wild Growth runes on tiles occupied by invisible creatures. These spells should be blocked by any creature, regardless of visibility. --- data/scripts/runes/magic_wall.lua | 8 ++++++-- data/scripts/runes/wild_growth.lua | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/data/scripts/runes/magic_wall.lua b/data/scripts/runes/magic_wall.lua index 9ccfbb2a833..b411fddd3a1 100644 --- a/data/scripts/runes/magic_wall.lua +++ b/data/scripts/runes/magic_wall.lua @@ -1,11 +1,15 @@ -function onCreateMagicWall(creature, tile) +function onCreateMagicWall(creature, position) + local tile = Tile(position) + if tile and tile:getTopCreature() and not tile:getTopCreature():isPlayer() then + return false + end local magicWall if Game.getWorldType() == WORLD_TYPE_NO_PVP then magicWall = ITEM_MAGICWALL_SAFE else magicWall = ITEM_MAGICWALL end - local item = Game.createItem(magicWall, 1, tile) + local item = Game.createItem(magicWall, 1, position) item:setDuration(16, 24) end diff --git a/data/scripts/runes/wild_growth.lua b/data/scripts/runes/wild_growth.lua index 71d2d4a662b..08feb66aa0a 100644 --- a/data/scripts/runes/wild_growth.lua +++ b/data/scripts/runes/wild_growth.lua @@ -1,11 +1,15 @@ -function onCreateWildGrowth(creature, tile) +function onCreateWildGrowth(creature, position) + local tile = Tile(position) + if tile and tile:getTopCreature() and not tile:getTopCreature():isPlayer() then + return false + end local wildGrowth if Game.getWorldType() == WORLD_TYPE_NO_PVP then wildGrowth = ITEM_WILDGROWTH_SAFE else wildGrowth = ITEM_WILDGROWTH end - local item = Game.createItem(wildGrowth, 1, tile) + local item = Game.createItem(wildGrowth, 1, position) item:setDuration(30, 60) end From d66e788f0231fca05e6d0179a5aed22ddde16874 Mon Sep 17 00:00:00 2001 From: Matico <53279812+Maticoz@users.noreply.github.com> Date: Thu, 8 Aug 2024 21:44:17 +0200 Subject: [PATCH 07/24] fix: reroll monsters grid prey slot on prey expired (#2781) --- src/io/ioprey.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/io/ioprey.cpp b/src/io/ioprey.cpp index 6b2816355ff..e55ad73ae89 100644 --- a/src/io/ioprey.cpp +++ b/src/io/ioprey.cpp @@ -276,6 +276,7 @@ void IOPrey::checkPlayerPreys(std::shared_ptr player, uint8_t amount) co player->sendTextMessage(MESSAGE_STATUS, "You don't have enought prey cards to lock monster and bonus when the slot expire."); } else { + slot->reloadMonsterGrid(player->getPreyBlackList(), player->getLevel()); player->sendTextMessage(MESSAGE_STATUS, "Your prey bonus has expired."); } From f75de3d024706a939f4577982eb5ab7af1d25ec0 Mon Sep 17 00:00:00 2001 From: Karin Date: Thu, 8 Aug 2024 16:45:24 -0300 Subject: [PATCH 08/24] improve: missing content refill cobra flask (#2795) Refill cobra flask from cobra corpses --- data/scripts/actions/items/cobra_flask.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/data/scripts/actions/items/cobra_flask.lua b/data/scripts/actions/items/cobra_flask.lua index ddeecf8ec4f..095a8c39a96 100644 --- a/data/scripts/actions/items/cobra_flask.lua +++ b/data/scripts/actions/items/cobra_flask.lua @@ -28,3 +28,15 @@ end cobraFlask:id(31296) cobraFlask:register() + +local cobraFlask = Action() + +function cobraFlask.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if table.contains({ 4188, 4189, 4190 }, target:getId()) then + item:transform(31296) + end + return true +end + +cobraFlask:id(31297) +cobraFlask:register() From 9583a186f79becfa0898a212968e0ed8e025a601 Mon Sep 17 00:00:00 2001 From: Matico <53279812+Maticoz@users.noreply.github.com> Date: Thu, 8 Aug 2024 22:13:20 +0200 Subject: [PATCH 09/24] fix: shield puff effect (#2786) --- src/creatures/creature.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/creatures/creature.cpp b/src/creatures/creature.cpp index 94795669561..6c15f6cf1fe 100644 --- a/src/creatures/creature.cpp +++ b/src/creatures/creature.cpp @@ -998,7 +998,9 @@ BlockType_t Creature::blockHit(std::shared_ptr attacker, CombatType_t attacker->onAttackedCreatureBlockHit(blockType); } - mitigateDamage(combatType, blockType, damage); + if (damage != 0) { + mitigateDamage(combatType, blockType, damage); + } if (damage != 0) { onTakeDamage(attacker, damage); From 8521d69386233d26633fd17edcfeacbdc4f4de2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Renato=20Foot=20Guimar=C3=A3es=20Costallat?= Date: Thu, 8 Aug 2024 21:52:26 -0300 Subject: [PATCH 10/24] fix: qodana not scanning any file (#2796) Fix Qodana action, that besides runs okay, it was not checking any files, so it was never finding any problem. This change rollback to use the docker image directly in place of using the qodana-action, also it enables several checks that we are going to monitor and disable the ones that are not really useful. For now we are leaving the fail threshold as zero, so it will never refuse a PR. --- .github/workflows/analysis-qodana.yml | 43 +- CMakeLists.txt | 1 + cmake/modules/BaseConfig.cmake | 44 +- qodana.yml | 700 +++++++++++++++++++++++--- 4 files changed, 706 insertions(+), 82 deletions(-) diff --git a/.github/workflows/analysis-qodana.yml b/.github/workflows/analysis-qodana.yml index f89bc828e6e..7e40d9ec1ee 100644 --- a/.github/workflows/analysis-qodana.yml +++ b/.github/workflows/analysis-qodana.yml @@ -1,5 +1,6 @@ --- name: Analysis - Qodana + on: workflow_dispatch: pull_request: @@ -20,9 +21,41 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 - - name: 'Qodana Scan' - uses: JetBrains/qodana-action@v2024.1 + - name: Install Linux Dependencies + run: > + sudo apt-get update && sudo apt-get install ccache + linux-headers-$(uname -r) + - name: CCache + uses: hendrikmuhs/ccache-action@main + with: + max-size: "1G" + key: ccache-qodana + + - name: Restore artifacts and install vcpkg + id: vcpkg-step + run: | + vcpkgCommitId=$(grep '.builtin-baseline' vcpkg.json | awk -F: '{print $2}' | tr -d '," ') + echo "vcpkg commit ID: $vcpkgCommitId" + echo "VCPKG_GIT_COMMIT_ID=$vcpkgCommitId" >> $GITHUB_ENV + - name: Get vcpkg commit id from vcpkg.json + uses: lukka/run-vcpkg@main with: - args: --compile-commands,./build/linux-debug/compile_commands.json,--baseline,./qodana.sarif.json - env: - QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} + vcpkgGitURL: "https://github.com/microsoft/vcpkg.git" + vcpkgGitCommitId: ${{ env.VCPKG_GIT_COMMIT_ID }} + + - name: Get latest CMake and ninja + uses: lukka/get-cmake@main + + - name: Run CMake + uses: lukka/run-cmake@main + with: + configurePreset: linux-debug + + - name: Qodana Scan + run: | + docker run \ + -v $(pwd):/data/project/ \ + -v $(pwd):$(pwd) \ + -e QODANA_TOKEN="${{ secrets.QODANA_TOKEN }}" \ + jetbrains/qodana-clang:2024.1-eap \ + --compile-commands ./build/linux-debug/compile_commands.json diff --git a/CMakeLists.txt b/CMakeLists.txt index 90c355fed54..d5853366d80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,7 @@ set(VCPKG_BUILD_TYPE "release") set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + # ***************************************************************************** # Project canary # ***************************************************************************** diff --git a/cmake/modules/BaseConfig.cmake b/cmake/modules/BaseConfig.cmake index a1980d0f604..f61ee9e809c 100644 --- a/cmake/modules/BaseConfig.cmake +++ b/cmake/modules/BaseConfig.cmake @@ -74,6 +74,29 @@ option(BUILD_STATIC_LIBRARY "Build using static libraries" OFF) option(SPEED_UP_BUILD_UNITY "Compile using build unity for speed up build" ON) option(USE_PRECOMPILED_HEADER "Compile using precompiled header" ON) +# === TOGGLE_BIN_FOLDER === +if(TOGGLE_BIN_FOLDER) + log_option_enabled("TOGGLE_BIN_FOLDER") +else() + log_option_disabled("TOGGLE_BIN_FOLDER") +endif(TOGGLE_BIN_FOLDER) + +# === TOGGLE_BIN_FOLDER === +if(OPTIONS_ENABLE_OPENMP) + log_option_enabled("OPTIONS_ENABLE_OPENMP") +else() + log_option_disabled("OPTIONS_ENABLE_OPENMP") +endif(OPTIONS_ENABLE_OPENMP) + +# === DEBUG LOG === +# cmake -DDEBUG_LOG=ON .. +if(DEBUG_LOG) + add_definitions(-DDEBUG_LOG=ON) + log_option_enabled("DEBUG LOG") +else() + log_option_disabled("DEBUG LOG") +endif(DEBUG_LOG) + # === ASAN === if(ASAN_ENABLED) log_option_enabled("asan") @@ -87,7 +110,7 @@ else() log_option_disabled("asan") endif() -# Build static libs +# === BUILD_STATIC_LIBRARY === if(BUILD_STATIC_LIBRARY) log_option_enabled("STATIC_LIBRARY") @@ -102,14 +125,19 @@ else() log_option_disabled("STATIC_LIBRARY") endif() -# === DEBUG LOG === -# cmake -DDEBUG_LOG=ON .. -if(DEBUG_LOG) - add_definitions(-DDEBUG_LOG=ON) - log_option_enabled("DEBUG LOG") +# === SPEED_UP_BUILD_UNITY === +if(SPEED_UP_BUILD_UNITY) + log_option_enabled("SPEED_UP_BUILD_UNITY") else() - log_option_disabled("DEBUG LOG") -endif(DEBUG_LOG) + log_option_disabled("SPEED_UP_BUILD_UNITY") +endif(SPEED_UP_BUILD_UNITY) + +# === USE_PRECOMPILED_HEADER === +if(USE_PRECOMPILED_HEADER) + log_option_enabled("USE_PRECOMPILED_HEADER") +else() + log_option_disabled("USE_PRECOMPILED_HEADER") +endif(USE_PRECOMPILED_HEADER) # ***************************************************************************** # Compiler Options diff --git a/qodana.yml b/qodana.yml index fa65fa2ef55..f8ba4ca7b76 100644 --- a/qodana.yml +++ b/qodana.yml @@ -1,45 +1,29 @@ ---- version: "1.0" -bootstrap: | - sudo apt-get update - sudo apt-get install -y cmake git unzip build-essential ca-certificates curl zip unzip tar pkg-config ninja-build autoconf automake libtool python3 - cd ~ - git clone https://github.com/Microsoft/vcpkg.git - cd vcpkg - ./bootstrap-vcpkg.sh - cd /data/project - rm -rf build - mkdir -p build - cd build - cmake -DCMAKE_TOOLCHAIN_FILE=~/vcpkg/scripts/buildsystems/vcpkg.cmake .. --preset linux-debug || true + profile: name: qodana.recommended + +inspections: + + include: - - name: CheckDependencyLicenses + # inspections - name: ClangTidy - - name: ForLoopReplaceableByWhileJS - - name: IfStatementWithIdenticalBranchesJS - - name: IfStatementWithTooManyBranchesJS - - name: ConditionalExpressionWithIdenticalBranchesJS - - name: ConstantConditionalExpressionJS - - name: DuplicateConditionJS - - name: LoopStatementThatDoesntLoopJS - - name: JSObjectNullOrUndefined - - name: PointlessBooleanExpressionJS - - name: TrivialIfJS - - name: TrivialConditionalJS - - name: TailRecursionJS - - name: UnnecessaryContinueJS - - name: UnnecessaryReturnJS - - name: UnnecessaryLabelJS - - name: UnnecessaryLabelOnBreakStatementJS - - name: UnnecessaryLabelOnContinueStatementJS - - name: UnreachableCodeJS - - name: SuspiciousTypeOfGuard + - name: Clazy + - name: Misra + - name: OCUnusedConcept + - name: OCUnusedGlobalDeclaration + - name: OCUnusedIncludeDirective + - name: OCUnusedMacro + - name: OCUnusedStruct + - name: OCUnusedTemplateParameter + - name: OCUnusedTypeAlias + - name: CMakeDeprecatedCommands + - name: CMakeMismatchedCommandArguments - name: ArrayIndexOutOfBounds - - name: ConstantConditionsOC - name: ConstantFunctionResult - name: ConstantParameter + - name: ConstantConditionsOC - name: OCDFA - name: DanglingPointer - name: EndlessLoop @@ -55,41 +39,619 @@ include: - name: UnusedLocalVariable - name: UnusedParameter - name: UnusedValue - - name: DtsDuplicateElement - - name: DtsBits - - name: DtsContainer - - name: DtsStatementOrder - name: HidingNonVirtualFunction - name: NotImplementedFunctions - - name: CMakeDeprecatedCommands - - name: JSDeprecatedSymbols - - name: EmptyDirectory - - name: JSAccessibilityCheck + - name: ArgumentSelectionDefects + - name: ClangdErrorsAndWarnings + - name: EmptyDeclOrStmt + - name: OCInconsistentNaming + - name: PreprocessorComment + - name: Simplify + - name: UnconstrainedVariableType - name: VirtualCallInCtorOrDtor - - name: DivideByZeroJS - - name: InfiniteLoopJS - - name: InfiniteRecursionJS - - name: QodanaSanity - - name: DefaultNotLastCaseInSwitchJS - - name: JSMissingSwitchBranches - - name: JSMissingSwitchDefault - - name: JSRedundantSwitchStatement - - name: JSDuplicateCaseLabel - - name: FallThroughInSwitchStatementJS - - name: NestedSwitchStatementJS - - name: OCUnusedClass - - name: OCUnusedConcept - - name: OCUnusedGlobalDeclaration - - name: OCUnusedIncludeDirective - - name: OCUnusedInstanceVariable - - name: OCUnusedMacro - - name: OCUnusedMethod - - name: OCUnusedProperty - - name: OCUnusedStruct - - name: OCUnusedTemplateParameter - - name: OCUnusedTypeAlias - - name: JSUnusedAssignment - - name: JSUnusedGlobalSymbols - - name: JSUnusedLocalSymbols - - name: ThisExpressionReferencesGlobalObjectJS - - name: JSConstantReassignment + # - name: ComposeMissingKeys + # - name: ComposeUnknownKeys + # - name: ComposeUnknownValues + # - name: ComposeUnquotedPorts + # - name: DockerJsonFormStringLiterals + # - name: DockerFileAddOrCopyPaths + # - name: DockerFileAssignments + # - name: DockerFileRunCommandMissingContinuation + # - name: DockerFileArgumentCount + # - name: MarkdownIncorrectTableFormatting + # - name: MarkdownIncorrectlyNumberedListItem + # - name: MarkdownLinkDestinationWithSpaces + # - name: MarkdownOutdatedTableOfContents + # - name: MarkdownNoTableBorders + # - name: MarkdownUnresolvedFileReference + # - name: MarkdownUnresolvedHeaderReference + # - name: MarkdownUnresolvedLinkLabel + + # checks + - name: abseil-duration-addition + - name: abseil-duration-comparison + - name: abseil-duration-conversion-cast + - name: abseil-duration-division + - name: abseil-duration-factory-float + - name: abseil-duration-factory-scale + - name: abseil-duration-subtraction + - name: abseil-duration-unnecessary-conversion + - name: abseil-faster-strsplit-delimiter + - name: abseil-no-internal-dependencies + - name: abseil-no-namespace + - name: abseil-redundant-strcat-calls + - name: abseil-str-cat-append + - name: abseil-string-find-startswith + - name: abseil-string-find-str-contains + - name: abseil-time-comparison + - name: abseil-time-subtraction + - name: abseil-upgrade-duration-conversions + - name: altera-id-dependent-backward-branch + # - name: altera-kernel-name-restriction + # - name: altera-single-work-item-barrier + - name: altera-struct-pack-align + - name: altera-unroll-loops + - name: android-cloexec-accept + - name: android-cloexec-accept4 + - name: android-cloexec-creat + - name: android-cloexec-dup + - name: android-cloexec-epoll-create + - name: android-cloexec-epoll-create1 + - name: android-cloexec-fopen + - name: android-cloexec-inotify-init + - name: android-cloexec-inotify-init1 + - name: android-cloexec-memfd-create + - name: android-cloexec-open + - name: android-cloexec-pipe + - name: android-cloexec-pipe2 + - name: android-cloexec-socket + - name: android-comparison-in-temp-failure-retry + - name: boost-use-to-string + - name: bugprone-argument-comment + - name: bugprone-assert-side-effect + - name: bugprone-assignment-in-if-condition + - name: bugprone-bad-signal-to-kill-thread + - name: bugprone-bool-pointer-implicit-conversion + - name: bugprone-branch-clone + - name: bugprone-casting-through-void + - name: bugprone-chained-comparison + - name: bugprone-compare-pointer-to-member-virtual-function + - name: bugprone-copy-constructor-init + - name: bugprone-dangling-handle + - name: bugprone-dynamic-static-initializers + - name: bugprone-easily-swappable-parameters + - name: bugprone-empty-catch + - name: bugprone-exception-escape + - name: bugprone-fold-init-type + - name: bugprone-forward-declaration-namespace + - name: bugprone-forwarding-reference-overload + - name: bugprone-implicit-widening-of-multiplication-result + - name: bugprone-inaccurate-erase + - name: bugprone-inc-dec-in-conditions + - name: bugprone-incorrect-enable-if + - name: bugprone-incorrect-roundings + - name: bugprone-infinite-loop + - name: bugprone-integer-division + - name: bugprone-lambda-function-name + - name: bugprone-macro-parentheses + - name: bugprone-macro-repeated-side-effects + - name: bugprone-misplaced-operator-in-strlen-in-alloc + - name: bugprone-misplaced-pointer-arithmetic-in-alloc + - name: bugprone-misplaced-widening-cast + - name: bugprone-move-forwarding-reference + - name: bugprone-multi-level-implicit-pointer-conversion + - name: bugprone-multiple-new-in-one-expression + - name: bugprone-multiple-statement-macro + - name: bugprone-narrowing-conversions + - name: bugprone-no-escape + - name: bugprone-non-zero-enum-to-bool-conversion + - name: bugprone-not-null-terminated-result + - name: bugprone-optional-value-conversion + - name: bugprone-parent-virtual-call + - name: bugprone-posix-return + - name: bugprone-redundant-branch-condition + - name: bugprone-reserved-identifier + - name: bugprone-shared-ptr-array-mismatch + - name: bugprone-signal-handler + - name: bugprone-signed-char-misuse + - name: bugprone-sizeof-container + - name: bugprone-sizeof-expression + - name: bugprone-spuriously-wake-up-functions + - name: bugprone-standalone-empty + - name: bugprone-string-constructor + - name: bugprone-string-integer-assignment + - name: bugprone-string-literal-with-embedded-nul + - name: bugprone-stringview-nullptr + - name: bugprone-suspicious-enum-usage + - name: bugprone-suspicious-include + - name: bugprone-suspicious-memory-comparison + - name: bugprone-suspicious-memset-usage + - name: bugprone-suspicious-missing-comma + - name: bugprone-suspicious-realloc-usage + - name: bugprone-suspicious-semicolon + - name: bugprone-suspicious-string-compare + - name: bugprone-swapped-arguments + - name: bugprone-switch-missing-default-case + - name: bugprone-terminating-continue + - name: bugprone-throw-keyword-missing + - name: bugprone-too-small-loop-variable + - name: bugprone-unchecked-optional-access + - name: bugprone-undefined-memory-manipulation + - name: bugprone-undelegated-constructor + - name: bugprone-unhandled-exception-at-new + - name: bugprone-unhandled-self-assignment + - name: bugprone-unique-ptr-array-mismatch + - name: bugprone-unsafe-functions + - name: bugprone-unused-local-non-trivial-variable + - name: bugprone-unused-raii + - name: bugprone-unused-return-value + - name: bugprone-use-after-move + - name: bugprone-virtual-near-miss + - name: cert-con36-c + - name: cert-con54-cpp + - name: cert-dcl03-c + - name: cert-dcl16-c + - name: cert-dcl37-c + - name: cert-dcl50-cpp + - name: cert-dcl51-cpp + - name: cert-dcl54-cpp + - name: cert-dcl58-cpp + - name: cert-dcl59-cpp + - name: cert-env33-c + - name: cert-err09-cpp + - name: cert-err33-c + - name: cert-err34-c + - name: cert-err52-cpp + - name: cert-err58-cpp + - name: cert-err60-cpp + - name: cert-err61-cpp + - name: cert-exp42-c + - name: cert-fio38-c + - name: cert-flp30-c + - name: cert-flp37-c + - name: cert-mem57-cpp + - name: cert-msc24-c + - name: cert-msc30-c + - name: cert-msc32-c + - name: cert-msc33-c + - name: cert-msc50-cpp + - name: cert-msc51-cpp + - name: cert-msc54-cpp + - name: cert-oop11-cpp + - name: cert-oop54-cpp + - name: cert-oop57-cpp + - name: cert-oop58-cpp + - name: cert-pos44-c + - name: cert-pos47-c + - name: cert-sig30-c + - name: cert-str34-c + - name: clion-argument-selection-defects + - name: clion-empty-decl-or-stmt + - name: clion-misra-c2012-10-1 + - name: clion-misra-c2012-10-2 + - name: clion-misra-c2012-10-5 + - name: clion-misra-c2012-11-1 + - name: clion-misra-c2012-11-2 + - name: clion-misra-c2012-11-3 + - name: clion-misra-c2012-11-4 + - name: clion-misra-c2012-11-5 + - name: clion-misra-c2012-11-6 + - name: clion-misra-c2012-11-7 + - name: clion-misra-c2012-11-8 + - name: clion-misra-c2012-11-9 + - name: clion-misra-c2012-12-2 + - name: clion-misra-c2012-12-3 + - name: clion-misra-c2012-12-5 + - name: clion-misra-c2012-13-1 + - name: clion-misra-c2012-13-3 + - name: clion-misra-c2012-13-4 + - name: clion-misra-c2012-13-5 + - name: clion-misra-c2012-13-6 + - name: clion-misra-c2012-14-4 + - name: clion-misra-c2012-15-1 + - name: clion-misra-c2012-15-2 + - name: clion-misra-c2012-15-5 + - name: clion-misra-c2012-15-6 + - name: clion-misra-c2012-15-7 + - name: clion-misra-c2012-16-3 + - name: clion-misra-c2012-16-4 + - name: clion-misra-c2012-16-5 + - name: clion-misra-c2012-16-6 + - name: clion-misra-c2012-16-7 + - name: clion-misra-c2012-17-3 + - name: clion-misra-c2012-17-5 + - name: clion-misra-c2012-17-6 + - name: clion-misra-c2012-17-7 + - name: clion-misra-c2012-17-8 + - name: clion-misra-c2012-18-4 + - name: clion-misra-c2012-18-5 + - name: clion-misra-c2012-18-7 + - name: clion-misra-c2012-18-8 + - name: clion-misra-c2012-19-2 + - name: clion-misra-c2012-21-10 + - name: clion-misra-c2012-21-3 + - name: clion-misra-c2012-21-7 + - name: clion-misra-c2012-21-8 + - name: clion-misra-c2012-21-9 + - name: clion-misra-c2012-22-5 + - name: clion-misra-c2012-4-12 + - name: clion-misra-c2012-4-3 + - name: clion-misra-c2012-6-1 + - name: clion-misra-c2012-6-2 + - name: clion-misra-c2012-7-1 + - name: clion-misra-c2012-7-2 + - name: clion-misra-c2012-7-3 + - name: clion-misra-c2012-7-4 + - name: clion-misra-c2012-8-1 + - name: clion-misra-c2012-8-10 + - name: clion-misra-c2012-8-11 + - name: clion-misra-c2012-8-12 + - name: clion-misra-c2012-8-14 + - name: clion-misra-c2012-8-2 + - name: clion-misra-c2012-8-8 + - name: clion-misra-c2012-9-3 + - name: clion-misra-c2012-9-5 + - name: clion-misra-cpp2008-0-1-7 + - name: clion-misra-cpp2008-10-1-1 + - name: clion-misra-cpp2008-10-3-2 + - name: clion-misra-cpp2008-11-0-1 + - name: clion-misra-cpp2008-12-1-3 + - name: clion-misra-cpp2008-12-8-2 + - name: clion-misra-cpp2008-14-5-2 + - name: clion-misra-cpp2008-15-0-2 + - name: clion-misra-cpp2008-15-1-2 + - name: clion-misra-cpp2008-15-1-3 + - name: clion-misra-cpp2008-15-3-5 + - name: clion-misra-cpp2008-15-5-1 + - name: clion-misra-cpp2008-18-0-2 + - name: clion-misra-cpp2008-18-0-3 + - name: clion-misra-cpp2008-18-0-4 + - name: clion-misra-cpp2008-18-2-1 + - name: clion-misra-cpp2008-18-4-1 + - name: clion-misra-cpp2008-2-13-1 + - name: clion-misra-cpp2008-2-13-2 + - name: clion-misra-cpp2008-2-13-3 + - name: clion-misra-cpp2008-2-13-4 + - name: clion-misra-cpp2008-3-1-2 + - name: clion-misra-cpp2008-3-1-3 + - name: clion-misra-cpp2008-3-3-2 + - name: clion-misra-cpp2008-4-10-2 + - name: clion-misra-cpp2008-4-5-1 + - name: clion-misra-cpp2008-4-5-2 + - name: clion-misra-cpp2008-5-0-11 + - name: clion-misra-cpp2008-5-0-12 + - name: clion-misra-cpp2008-5-0-13 + - name: clion-misra-cpp2008-5-0-14 + - name: clion-misra-cpp2008-5-0-19 + - name: clion-misra-cpp2008-5-0-4 + - name: clion-misra-cpp2008-5-0-5 + - name: clion-misra-cpp2008-5-0-6 + - name: clion-misra-cpp2008-5-14-1 + - name: clion-misra-cpp2008-5-18-1 + - name: clion-misra-cpp2008-5-2-10 + - name: clion-misra-cpp2008-5-2-11 + - name: clion-misra-cpp2008-5-2-12 + - name: clion-misra-cpp2008-5-2-2 + - name: clion-misra-cpp2008-5-2-4 + - name: clion-misra-cpp2008-5-2-5 + - name: clion-misra-cpp2008-5-2-6 + - name: clion-misra-cpp2008-5-2-8 + - name: clion-misra-cpp2008-5-2-9 + - name: clion-misra-cpp2008-5-3-1 + - name: clion-misra-cpp2008-5-3-2 + - name: clion-misra-cpp2008-5-3-3 + - name: clion-misra-cpp2008-5-3-4 + - name: clion-misra-cpp2008-5-8-1 + - name: clion-misra-cpp2008-6-2-1 + - name: clion-misra-cpp2008-6-3-1 + - name: clion-misra-cpp2008-6-4-1 + - name: clion-misra-cpp2008-6-4-2 + - name: clion-misra-cpp2008-6-4-4 + - name: clion-misra-cpp2008-6-4-5 + - name: clion-misra-cpp2008-6-4-6 + - name: clion-misra-cpp2008-6-4-7 + - name: clion-misra-cpp2008-6-4-8 + - name: clion-misra-cpp2008-6-5-1 + - name: clion-misra-cpp2008-6-5-2 + - name: clion-misra-cpp2008-6-5-3 + - name: clion-misra-cpp2008-6-5-4 + - name: clion-misra-cpp2008-6-6-2 + - name: clion-misra-cpp2008-6-6-4 + # - name: clion-misra-cpp2008-6-6-5 + # - name: clion-misra-cpp2008-7-3-1 + - name: clion-misra-cpp2008-7-3-4 + - name: clion-misra-cpp2008-7-4-3 + - name: clion-misra-cpp2008-8-0-1 + - name: clion-misra-cpp2008-8-4-1 + - name: clion-misra-cpp2008-8-4-4 + - name: clion-misra-cpp2008-8-5-3 + - name: clion-misra-cpp2008-9-5-1 + - name: clion-misra-cpp2008-9-6-2 + - name: clion-misra-cpp2008-9-6-4 + - name: clion-preprocessor-comment-check + # - name: clion-replace-enable-if + - name: clion-simplify + - name: clion-unconstrained-variable-type + - name: clion-virtual-call-in-ctor-or-dtor + - name: concurrency-mt-unsafe + - name: concurrency-thread-canceltype-asynchronous + - name: cppcoreguidelines-avoid-c-arrays + - name: cppcoreguidelines-avoid-capturing-lambda-coroutines + - name: cppcoreguidelines-avoid-const-or-ref-data-members + - name: cppcoreguidelines-avoid-do-while + - name: cppcoreguidelines-avoid-goto + # - name: cppcoreguidelines-avoid-magic-numbers + - name: cppcoreguidelines-avoid-non-const-global-variables + - name: cppcoreguidelines-avoid-reference-coroutine-parameters + - name: cppcoreguidelines-c-copy-assignment-signature + - name: cppcoreguidelines-explicit-virtual-functions + - name: cppcoreguidelines-init-variables + - name: cppcoreguidelines-interfaces-global-init + - name: cppcoreguidelines-macro-to-enum + - name: cppcoreguidelines-macro-usage + - name: cppcoreguidelines-misleading-capture-default-by-value + - name: cppcoreguidelines-missing-std-forward + - name: cppcoreguidelines-narrowing-conversions + - name: cppcoreguidelines-no-malloc + - name: cppcoreguidelines-no-suspend-with-lock + - name: cppcoreguidelines-noexcept-destructor + - name: cppcoreguidelines-noexcept-move-operations + - name: cppcoreguidelines-noexcept-swap + - name: cppcoreguidelines-non-private-member-variables-in-classes + - name: cppcoreguidelines-owning-memory + - name: cppcoreguidelines-prefer-member-initializer + - name: cppcoreguidelines-pro-bounds-array-to-pointer-decay + - name: cppcoreguidelines-pro-bounds-constant-array-index + - name: cppcoreguidelines-pro-bounds-pointer-arithmetic + - name: cppcoreguidelines-pro-type-const-cast + - name: cppcoreguidelines-pro-type-cstyle-cast + - name: cppcoreguidelines-pro-type-member-init + - name: cppcoreguidelines-pro-type-reinterpret-cast + - name: cppcoreguidelines-pro-type-static-cast-downcast + - name: cppcoreguidelines-pro-type-union-access + - name: cppcoreguidelines-pro-type-vararg + - name: cppcoreguidelines-rvalue-reference-param-not-moved + - name: cppcoreguidelines-slicing + - name: cppcoreguidelines-special-member-functions + - name: cppcoreguidelines-use-default-member-init + - name: cppcoreguidelines-virtual-class-destructor + - name: darwin-avoid-spinlock + - name: darwin-dispatch-once-nonstatic + # - name: fuchsia-default-arguments-calls + - name: fuchsia-default-arguments-declarations + - name: fuchsia-header-anon-namespaces + - name: fuchsia-multiple-inheritance + - name: fuchsia-overloaded-operator + - name: fuchsia-statically-constructed-objects + - name: fuchsia-trailing-return + - name: fuchsia-virtual-inheritance + - name: google-build-explicit-make-pair + - name: google-build-namespaces + - name: google-build-using-namespace + - name: google-default-arguments + - name: google-explicit-constructor + - name: google-global-names-in-headers + - name: google-objc-avoid-nsobject-new + - name: google-objc-avoid-throwing-exception + - name: google-objc-function-naming + - name: google-objc-global-variable-declaration + - name: google-readability-avoid-underscore-in-googletest-name + - name: google-readability-braces-around-statements + - name: google-readability-casting + - name: google-readability-function-size + - name: google-readability-namespace-comments + - name: google-readability-todo + - name: google-runtime-int + - name: google-runtime-operator + - name: google-upgrade-googletest-case + - name: hicpp-avoid-c-arrays + - name: hicpp-avoid-goto + - name: hicpp-braces-around-statements + - name: hicpp-deprecated-headers + - name: hicpp-exception-baseclass + - name: hicpp-explicit-conversions + - name: hicpp-function-size + - name: hicpp-ignored-remove-result + - name: hicpp-invalid-access-moved + - name: hicpp-member-init + - name: hicpp-move-const-arg + - name: hicpp-multiway-paths-covered + - name: hicpp-named-parameter + - name: hicpp-new-delete-operators + - name: hicpp-no-array-decay + - name: hicpp-no-assembler + - name: hicpp-no-malloc + - name: hicpp-noexcept-move + - name: hicpp-signed-bitwise + - name: hicpp-special-member-functions + - name: hicpp-static-assert + - name: hicpp-undelegated-constructor + - name: hicpp-uppercase-literal-suffix + - name: hicpp-use-auto + - name: hicpp-use-emplace + - name: hicpp-use-equals-default + - name: hicpp-use-equals-delete + - name: hicpp-use-noexcept + - name: hicpp-use-nullptr + - name: hicpp-use-override + - name: hicpp-vararg + # - name: linuxkernel-must-check-errs + - name: llvm-else-after-return + - name: llvm-header-guard + # - name: llvm-include-order + - name: llvm-namespace-comment + - name: llvm-prefer-isa-or-dyn-cast-in-conditionals + - name: llvm-prefer-register-over-unsigned + - name: llvm-qualified-auto + - name: llvm-twine-local + # - name: llvmlibc-callee-namespace + # - name: llvmlibc-implementation-in-namespace + - name: llvmlibc-inline-function-decl + - name: llvmlibc-restrict-system-libc-headers + - name: misc-confusable-identifiers + - name: misc-const-correctness + - name: misc-coroutine-hostile-raii + - name: misc-definitions-in-headers + - name: misc-header-include-cycle + # - name: misc-include-cleaner + - name: misc-misleading-bidirectional + - name: misc-misleading-identifier + - name: misc-misplaced-const + - name: misc-new-delete-overloads + - name: misc-no-recursion + - name: misc-non-copyable-objects + - name: misc-non-private-member-variables-in-classes + - name: misc-redundant-expression + - name: misc-static-assert + - name: misc-throw-by-value-catch-by-reference + - name: misc-unconventional-assign-operator + - name: misc-uniqueptr-reset-release + - name: misc-unused-alias-decls + - name: misc-unused-parameters + - name: misc-unused-using-decls + - name: misc-use-anonymous-namespace + - name: modernize-avoid-bind + - name: modernize-avoid-c-arrays + - name: modernize-concat-nested-namespaces + - name: modernize-deprecated-headers + - name: modernize-deprecated-ios-base-aliases + - name: modernize-loop-convert + - name: modernize-macro-to-enum + - name: modernize-make-shared + - name: modernize-make-unique + - name: modernize-pass-by-value + - name: modernize-raw-string-literal + - name: modernize-redundant-void-arg + - name: modernize-replace-auto-ptr + - name: modernize-replace-disallow-copy-and-assign-macro + - name: modernize-replace-random-shuffle + - name: modernize-return-braced-init-list + - name: modernize-shrink-to-fit + - name: modernize-type-traits + - name: modernize-unary-static-assert + - name: modernize-use-auto + - name: modernize-use-bool-literals + - name: modernize-use-constraints + - name: modernize-use-default-member-init + - name: modernize-use-emplace + - name: modernize-use-equals-default + - name: modernize-use-equals-delete + - name: modernize-use-nodiscard + - name: modernize-use-noexcept + - name: modernize-use-nullptr + - name: modernize-use-override + - name: modernize-use-starts-ends-with + - name: modernize-use-std-numbers + - name: modernize-use-std-print + # - name: modernize-use-trailing-return-type + - name: modernize-use-transparent-functors + - name: modernize-use-uncaught-exceptions + - name: modernize-use-using + - name: mpi-buffer-deref + - name: mpi-type-mismatch + - name: objc-assert-equals + - name: objc-avoid-nserror-init + - name: objc-dealloc-in-category + - name: objc-forbidden-subclassing + - name: objc-missing-hash + - name: objc-nsdate-formatter + - name: objc-nsinvocation-argument-lifetime + - name: objc-property-declaration + - name: objc-super-self + - name: openmp-exception-escape + - name: openmp-use-default-none + - name: performance-avoid-endl + - name: performance-enum-size + - name: performance-faster-string-find + - name: performance-for-range-copy + - name: performance-implicit-conversion-in-loop + - name: performance-inefficient-algorithm + - name: performance-inefficient-string-concatenation + - name: performance-inefficient-vector-operation + - name: performance-move-const-arg + - name: performance-move-constructor-init + - name: performance-no-automatic-move + - name: performance-no-int-to-ptr + - name: performance-noexcept-destructor + - name: performance-noexcept-move-constructor + - name: performance-noexcept-swap + - name: performance-trivially-destructible + - name: performance-type-promotion-in-math-fn + - name: performance-unnecessary-copy-initialization + - name: performance-unnecessary-value-param + - name: portability-restrict-system-includes + - name: portability-simd-intrinsics + - name: portability-std-allocator-const + - name: readability-avoid-const-params-in-decls + - name: readability-avoid-nested-conditional-operator + - name: readability-avoid-return-with-void-value + - name: readability-avoid-unconditional-preprocessor-if + - name: readability-braces-around-statements + - name: readability-const-return-type + - name: readability-container-contains + - name: readability-container-data-pointer + - name: readability-container-size-empty + - name: readability-convert-member-functions-to-static + - name: readability-delete-null-pointer + - name: readability-duplicate-include + - name: readability-else-after-return + - name: readability-function-cognitive-complexity + - name: readability-function-size + # - name: readability-identifier-length + - name: readability-identifier-naming + - name: readability-implicit-bool-conversion + - name: readability-inconsistent-declaration-parameter-name + - name: readability-isolate-declaration + - name: readability-magic-numbers + - name: readability-make-member-function-const + - name: readability-misleading-indentation + - name: readability-misplaced-array-index + - name: readability-named-parameter + - name: readability-non-const-parameter + - name: readability-operators-representation + - name: readability-qualified-auto + - name: readability-redundant-access-specifiers + - name: readability-redundant-casting + - name: readability-redundant-control-flow + - name: readability-redundant-declaration + - name: readability-redundant-function-ptr-dereference + - name: readability-redundant-inline-specifier + - name: readability-redundant-member-init + - name: readability-redundant-preprocessor + - name: readability-redundant-smartptr-get + - name: readability-redundant-string-cstr + - name: readability-redundant-string-init + - name: readability-reference-to-constructed-temporary + - name: readability-simplify-boolean-expr + - name: readability-simplify-subscript-expr + - name: readability-static-accessed-through-instance + - name: readability-static-definition-in-anonymous-namespace + - name: readability-string-compare + - name: readability-suspicious-call-argument + - name: readability-uniqueptr-delete-release + - name: readability-uppercase-literal-suffix + - name: readability-use-anyofallof + - name: readability-use-std-min-max + - name: zircon-temporary-objects + +exclude: + - name: All + patterns: + - "**/build/**" + - "**/build" + - "**/vcpkg/**" + - "**/vcpkg" + - "**/vcpkg_installed/**" + - "**/vcpkg_installed" + + - name: clion-misra-cpp2008-5-0-4 + patterns: + - "**/lua_enums.cpp" + + - name: clion-misra-cpp2008-5-2-4 + patterns: + - "**/lua_enums.cpp" + + - name: misc-const-correctness + patterns: + - "**/lua_enums.cpp" From 7766a1dabb74442121cdd2c18ca4661bace65dd2 Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Thu, 8 Aug 2024 23:26:39 -0300 Subject: [PATCH 11/24] feat: support to protocol 13.40 (#2802) NOTE: just the bytes, no features. Client to test: https://github.com/dudantas/tibia-client/releases/tag/13.34.93b0a1 --------- Co-authored-by: Marcos <66353315+marcosvf132@users.noreply.github.com> --- src/core.hpp | 2 +- src/creatures/players/wheel/player_wheel.cpp | 28 ++++---- src/creatures/players/wheel/player_wheel.hpp | 12 ++-- src/server/network/protocol/protocolgame.cpp | 74 ++++++++++++++++---- 4 files changed, 81 insertions(+), 35 deletions(-) diff --git a/src/core.hpp b/src/core.hpp index ad64df77646..6352118840f 100644 --- a/src/core.hpp +++ b/src/core.hpp @@ -15,7 +15,7 @@ static constexpr auto AUTHENTICATOR_PERIOD = 30U; // SERVER_MAJOR_VERSION is the actual full version of the server, including minor and patch numbers. // This is intended for internal use to identify the exact state of the server (release) software. static constexpr auto SERVER_RELEASE_VERSION = "3.1.2"; -static constexpr auto CLIENT_VERSION = 1332; +static constexpr auto CLIENT_VERSION = 1340; #define CLIENT_VERSION_UPPER (CLIENT_VERSION / 100) #define CLIENT_VERSION_LOWER (CLIENT_VERSION % 100) diff --git a/src/creatures/players/wheel/player_wheel.cpp b/src/creatures/players/wheel/player_wheel.cpp index 2a3e1366430..eff54689f94 100644 --- a/src/creatures/players/wheel/player_wheel.cpp +++ b/src/creatures/players/wheel/player_wheel.cpp @@ -889,7 +889,7 @@ void PlayerWheel::revealGem(WheelGemQuality_t quality) { sendOpenWheelWindow(m_player.getID()); } -PlayerWheelGem PlayerWheel::getGem(uint8_t index) const { +PlayerWheelGem PlayerWheel::getGem(uint16_t index) const { auto gems = getRevealedGems(); if (gems.size() <= index) { g_logger().error("[{}] Player {} trying to get gem with index {} but has only {} gems", __FUNCTION__, m_player.getName(), index, gems.size()); @@ -907,9 +907,9 @@ PlayerWheelGem PlayerWheel::getGem(const std::string &uuid) const { return gem; } -uint8_t PlayerWheel::getGemIndex(const std::string &uuid) const { +uint16_t PlayerWheel::getGemIndex(const std::string &uuid) const { auto gems = getRevealedGems(); - for (uint8_t i = 0; i < gems.size(); ++i) { + for (uint16_t i = 0; i < gems.size(); ++i) { if (gems[i].uuid == uuid) { return i; } @@ -918,7 +918,7 @@ uint8_t PlayerWheel::getGemIndex(const std::string &uuid) const { return 0xFF; } -void PlayerWheel::destroyGem(uint8_t index) { +void PlayerWheel::destroyGem(uint16_t index) { auto gem = getGem(index); if (gem.locked) { g_logger().error("[{}] Player {} trying to destroy locked gem with index {}", __FUNCTION__, m_player.getName(), index); @@ -928,7 +928,7 @@ void PlayerWheel::destroyGem(uint8_t index) { sendOpenWheelWindow(m_player.getID()); } -void PlayerWheel::switchGemDomain(uint8_t index) { +void PlayerWheel::switchGemDomain(uint16_t index) { auto gem = getGem(index); if (gem.locked) { g_logger().error("[{}] Player {} trying to destroy locked gem with index {}", __FUNCTION__, m_player.getName(), index); @@ -946,14 +946,14 @@ void PlayerWheel::switchGemDomain(uint8_t index) { sendOpenWheelWindow(m_player.getID()); } -void PlayerWheel::toggleGemLock(uint8_t index) { +void PlayerWheel::toggleGemLock(uint16_t index) { auto gem = getGem(index); gem.locked = !gem.locked; gem.save(gemsKV()); sendOpenWheelWindow(m_player.getID()); } -void PlayerWheel::setActiveGem(WheelGemAffinity_t affinity, uint8_t index) { +void PlayerWheel::setActiveGem(WheelGemAffinity_t affinity, uint16_t index) { auto gem = getGem(index); if (gem.uuid.empty()) { g_logger().error("[{}] Failed to load gem with index {}", __FUNCTION__, index); @@ -979,19 +979,15 @@ void PlayerWheel::addGems(NetworkMessage &msg) const { for (const auto &gem : activeGems) { auto index = getGemIndex(gem.uuid); g_logger().debug("[{}] Adding active gem: {} with index {}", __FUNCTION__, gem.toString(), index); - msg.addByte(getGemIndex(gem.uuid)); + msg.add(getGemIndex(gem.uuid)); } auto revealedGems = getRevealedGems(); - if (revealedGems.size() > 225) { - g_logger().error("[{}] Player {} has more than 225 gems unlocked", __FUNCTION__, m_player.getName()); - revealedGems.resize(225); - } - msg.addByte(revealedGems.size()); - int index = 0; + msg.add(revealedGems.size()); + uint16_t index = 0; for (const auto &gem : revealedGems) { g_logger().debug("[{}] Adding revealed gem: {}", __FUNCTION__, gem.toString()); - msg.addByte(index++); + msg.add(index++); msg.addByte(gem.locked); msg.addByte(static_cast(gem.affinity)); msg.addByte(static_cast(gem.quality)); @@ -1161,7 +1157,7 @@ void PlayerWheel::saveSlotPointsOnPressSaveButton(NetworkMessage &msg) { removeActiveGem(affinity); continue; } - uint8_t gemIndex = msg.getByte(); + uint16_t gemIndex = msg.get(); setActiveGem(affinity, gemIndex); } diff --git a/src/creatures/players/wheel/player_wheel.hpp b/src/creatures/players/wheel/player_wheel.hpp index 14f922e9597..e94f605930c 100644 --- a/src/creatures/players/wheel/player_wheel.hpp +++ b/src/creatures/players/wheel/player_wheel.hpp @@ -386,14 +386,14 @@ class PlayerWheel { * @return The calculated mitigation value. */ float calculateMitigation() const; - PlayerWheelGem getGem(uint8_t index) const; + PlayerWheelGem getGem(uint16_t index) const; PlayerWheelGem getGem(const std::string &uuid) const; - uint8_t getGemIndex(const std::string &uuid) const; + uint16_t getGemIndex(const std::string &uuid) const; void revealGem(WheelGemQuality_t quality); - void destroyGem(uint8_t index); - void switchGemDomain(uint8_t index); - void toggleGemLock(uint8_t index); - void setActiveGem(WheelGemAffinity_t affinity, uint8_t index); + void destroyGem(uint16_t index); + void switchGemDomain(uint16_t index); + void toggleGemLock(uint16_t index); + void setActiveGem(WheelGemAffinity_t affinity, uint16_t index); void removeActiveGem(WheelGemAffinity_t affinity); void addRevelationBonus(WheelGemAffinity_t affinity, uint16_t points) { m_bonusRevelationPoints[static_cast(affinity)] += points; diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index 133f0335ff1..6df5d758ad2 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -708,6 +708,7 @@ void ProtocolGame::onRecvFirstMessage(NetworkMessage &msg) { OperatingSystem_t operatingSystem = static_cast(msg.get()); version = msg.get(); // Protocol version + g_logger().trace("Protocol version: {}", version); // Old protocol support oldProtocol = g_configManager().getBoolean(OLD_PROTOCOL, __FUNCTION__) && version <= 1100; @@ -721,10 +722,21 @@ void ProtocolGame::onRecvFirstMessage(NetworkMessage &msg) { clientVersion = static_cast(msg.get()); if (!oldProtocol) { - msg.getString(); // Client version (String) + auto clientVersionString = msg.getString(); // Client version (String) + g_logger().trace("Client version: {}", clientVersionString); + if (version >= 1334) { + auto assetHashIdentifier = msg.getString(); // Assets hash identifier + g_logger().trace("Client asset hash identifier: {}", assetHashIdentifier); + } + } + + if (version < 1334) { + auto datRevision = msg.get(); // Dat revision + g_logger().trace("Dat revision: {}", datRevision); } - msg.skipBytes(3); // U16 dat revision, U8 game preview state + auto gamePreviewState = msg.getByte(); // U8 game preview state + g_logger().trace("Game preview state: {}", gamePreviewState); if (!Protocol::RSA_decrypt(msg)) { g_logger().warn("[ProtocolGame::onRecvFirstMessage] - RSA Decrypt Failed"); @@ -736,7 +748,8 @@ void ProtocolGame::onRecvFirstMessage(NetworkMessage &msg) { enableXTEAEncryption(); setXTEAKey(key.data()); - msg.skipBytes(1); // gamemaster flag + auto isGameMaster = static_cast(msg.getByte()); // gamemaster flag + g_logger().trace("Is Game Master: {}", isGameMaster); std::string authType = g_configManager().getString(AUTH_TYPE, __FUNCTION__); std::ostringstream ss; @@ -1668,8 +1681,11 @@ void ProtocolGame::parseSetOutfit(NetworkMessage &msg) { newOutfit.lookMountBody = std::min(132, msg.getByte()); newOutfit.lookMountLegs = std::min(132, msg.getByte()); newOutfit.lookMountFeet = std::min(132, msg.getByte()); + bool isMounted = msg.getByte(); newOutfit.lookFamiliarsType = msg.get(); + g_logger().debug("Bool isMounted: {}", isMounted); } + uint8_t isMountRandomized = msg.getByte(); g_game().playerChangeOutfit(player->getID(), newOutfit, isMountRandomized); } else if (outfitType == 1) { @@ -1789,11 +1805,23 @@ void ProtocolGame::parseQuickLoot(NetworkMessage &msg) { return; } - Position pos = msg.getPosition(); - uint16_t itemId = msg.get(); - uint8_t stackpos = msg.getByte(); - bool lootAllCorpses = msg.getByte(); - bool autoLoot = msg.getByte(); + uint8_t variant = msg.getByte(); + const Position pos = msg.getPosition(); + uint16_t itemId = 0; + uint8_t stackpos = 0; + bool lootAllCorpses = true; + bool autoLoot = true; + + if (variant == 2) { + // Loot player nearby (13.40) + } else { + itemId = msg.get(); + stackpos = msg.getByte(); + lootAllCorpses = variant == 1; + autoLoot = false; + } + g_logger().debug("[{}] variant {}, pos {}, itemId {}, stackPos {}", __FUNCTION__, variant, pos.toString(), itemId, stackpos); + g_game().playerQuickLoot(player->getID(), pos, itemId, stackpos, nullptr, lootAllCorpses, autoLoot); } @@ -2348,6 +2376,10 @@ void ProtocolGame::parseBestiarysendMonsterData(NetworkMessage &msg) { newmsg.addString(Class, "ProtocolGame::parseBestiarysendMonsterData - Class"); newmsg.addByte(currentLevel); + + newmsg.add(0); // Animus Mastery Bonus + newmsg.add(0); // Animus Mastery Points + newmsg.add(killCounter); newmsg.add(mtype->info.bestiaryFirstUnlock); @@ -2980,7 +3012,12 @@ void ProtocolGame::parseBestiarysendCreatures(NetworkMessage &msg) { } else { newmsg.addByte(0); } + + newmsg.add(0); // Creature Animous Bonus } + + newmsg.add(0); // Animus Mastery Points + writeToOutputBuffer(newmsg); } @@ -4665,6 +4702,19 @@ void ProtocolGame::sendContainer(uint8_t cid, std::shared_ptr contain msg.addByte(0x00); } + // New container menu options + if (container->isMovable()) { // Pickupable/Moveable (?) + msg.addByte(1); + } else { + msg.addByte(0); + } + + if (container->getHoldingPlayer()) { // Player holding the item (?) + msg.addByte(1); + } else { + msg.addByte(0); + } + writeToOutputBuffer(msg); } @@ -4861,9 +4911,9 @@ void ProtocolGame::sendSaleItemList(const std::vector &shopVector, co msg.add(player->getMoney() + player->getBankBalance()); } - uint8_t itemsToSend = 0; + uint16_t itemsToSend = 0; auto msgPosition = msg.getBufferPosition(); - msg.skipBytes(1); + msg.skipBytes(2); for (const ShopBlock &shopBlock : shopVector) { if (shopBlock.itemSellPrice == 0) { @@ -4878,14 +4928,14 @@ void ProtocolGame::sendSaleItemList(const std::vector &shopVector, co } else { msg.add(std::min(it->second, std::numeric_limits::max())); } - if (++itemsToSend >= 0xFF) { + if (++itemsToSend >= 0xFFFF) { break; } } } msg.setBufferPosition(msgPosition); - msg.addByte(itemsToSend); + msg.add(itemsToSend); writeToOutputBuffer(msg); } From 2df3d444e3e00f21452436bcfa1da49a3f292e7d Mon Sep 17 00:00:00 2001 From: Luan Luciano Date: Fri, 9 Aug 2024 11:24:25 -0300 Subject: [PATCH 12/24] improve: remove unnecessary condition in cyclopedia (#2764) Remove unnecessary condition in Cyclopedia Character General Stats --- src/server/network/protocol/protocolgame.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index 6df5d758ad2..30a47b16418 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -3516,10 +3516,7 @@ void ProtocolGame::sendCyclopediaCharacterGeneralStats() { for (uint8_t i = SKILL_FIRST; i < SKILL_CRITICAL_HIT_CHANCE; ++i) { static const uint8_t HardcodedSkillIds[] = { 11, 9, 8, 10, 7, 6, 13 }; - skills_t skill = static_cast(i); - if (!oldProtocol && (skill == SKILL_LIFE_LEECH_CHANCE || skill == SKILL_MANA_LEECH_CHANCE)) { - continue; - } + const auto skill = static_cast(i); msg.addByte(HardcodedSkillIds[i]); msg.add(std::min(player->getSkillLevel(skill), std::numeric_limits::max())); msg.add(player->getBaseSkill(skill)); @@ -3553,7 +3550,7 @@ void ProtocolGame::sendCyclopediaCharacterCombatStats() { msg.addByte(CYCLOPEDIA_CHARACTERINFO_COMBATSTATS); msg.addByte(0x00); for (uint8_t i = SKILL_CRITICAL_HIT_CHANCE; i <= SKILL_LAST; ++i) { - if (!oldProtocol && (i == SKILL_LIFE_LEECH_CHANCE || i == SKILL_MANA_LEECH_CHANCE)) { + if (i == SKILL_LIFE_LEECH_CHANCE || i == SKILL_MANA_LEECH_CHANCE) { continue; } skills_t skill = static_cast(i); @@ -3579,7 +3576,7 @@ void ProtocolGame::sendCyclopediaCharacterCombatStats() { msg.add(static_cast(player->getReflectFlat(COMBAT_PHYSICALDAMAGE))); uint8_t haveBlesses = 0; - uint8_t blessings = 8; + const uint8_t blessings = 8; for (uint8_t i = 1; i < blessings; ++i) { if (player->hasBlessing(i)) { ++haveBlesses; From 1d6b6d191766ba90568789f3c0a39de6d957a86d Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Fri, 9 Aug 2024 12:11:36 -0300 Subject: [PATCH 13/24] fix: remove bit set from icons enum and use std::bitset (#2782) This update modifies how we manage player icons in the ProtocolGame class by transitioning from using a traditional enum to enum class. The prior method involved a static enum bitset which was directly converted to a uint32_t for protocol communication. This approach was inflexible as it required compile-time knowledge of the bitset's size, limiting our ability to dynamically handle an expanding set of player icons. By adopting enum class, we gain stronger type safety and better namespace isolation, enhancing code clarity and reducing potential errors due to implicit type conversions. We've replaced the static bitset with a std::unordered_set for storing icons, granting dynamic management capabilities without a fixed-size constraint. At runtime, this set is converted into a std::bitset and subsequently into a uint32_t when transmitting to the protocol. This refactoring not only simplifies maintenance but also scales more effectively with additions to the icon set, as demonstrated by the inclusion of new icons such as 'bakragore'. To facilitate testing and interaction with this new system, a corresponding talk action /testicon has been implemented. These changes prepare our codebase for future enhancements and ensure that icon management remains robust and adaptable as new requirements emerge. --- .github/workflows/build-ubuntu.yml | 8 +- .../talkactions/god/icons_functions.lua | 109 ++++++++++++++++++ src/creatures/combat/condition.cpp | 87 +++++++++----- src/creatures/combat/condition.hpp | 25 ++-- src/creatures/creatures_definitions.hpp | 2 + src/creatures/players/player.cpp | 69 +++++++---- src/creatures/players/player.hpp | 10 +- src/enums/player_icons.hpp | 61 ++++++++++ src/lua/functions/core/game/lua_enums.cpp | 34 +----- .../creatures/combat/condition_functions.cpp | 18 ++- .../creatures/player/player_functions.cpp | 17 ++- .../creatures/player/player_functions.hpp | 3 + src/lua/global/globalevent.cpp | 7 +- src/server/network/protocol/protocolgame.cpp | 23 +++- src/server/network/protocol/protocolgame.hpp | 3 +- src/utils/utils_definitions.hpp | 31 ----- 16 files changed, 362 insertions(+), 145 deletions(-) create mode 100644 data/scripts/talkactions/god/icons_functions.lua create mode 100644 src/enums/player_icons.hpp diff --git a/.github/workflows/build-ubuntu.yml b/.github/workflows/build-ubuntu.yml index 2b369e34875..5109e613d99 100644 --- a/.github/workflows/build-ubuntu.yml +++ b/.github/workflows/build-ubuntu.yml @@ -95,10 +95,10 @@ jobs: path: | ${{ github.workspace }}/build/${{ matrix.buildtype }}/bin/ - - name: Run Unit Tests - run: | - cd ${{ github.workspace }}/build/${{ matrix.buildtype }}/tests/unit - ctest --verbose +# - name: Run Unit Tests +# run: | +# cd ${{ github.workspace }}/build/${{ matrix.buildtype }}/tests/unit +# ctest --verbose # - name: Run Integration Tests # run: | diff --git a/data/scripts/talkactions/god/icons_functions.lua b/data/scripts/talkactions/god/icons_functions.lua new file mode 100644 index 00000000000..9f1ee85c0f3 --- /dev/null +++ b/data/scripts/talkactions/god/icons_functions.lua @@ -0,0 +1,109 @@ +local function convertIconsToBitValue(iconList) + local bitObj = NewBit(0) + for icon in string.gmatch(iconList, "%d+") do + icon = tonumber(icon) + if icon then + local flag = bit.lshift(1, icon - 1) + bitObj:updateFlag(flag) + end + end + return bitObj:getNumber() +end + +function Player:sendNormalIcons(icons) + local msg = NetworkMessage() + msg:addByte(0xA2) + msg:addU32(icons) + msg:addByte(0) + msg:sendToPlayer(self) +end + +function Player:sendIconBakragore(specialIcon) + local msg = NetworkMessage() + msg:addByte(0xA3) + msg:addU32(specialIcon) + msg:addByte(0) + msg:sendToPlayer(self) +end + +--[[ + +Usage (normal icons): +/testicon 1 +/testicon 2 +/testicon 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 + +Usage (special icons): +/testicon special, 1 +/testicon special, 2 +]] + +local testIcons = TalkAction("/testicon") + +function testIcons.onSay(player, words, param) + if param == "" then + player:sendCancelMessage("Icon required.") + logger.error("[testIcons.onSay] - Icon number's required") + return true + end + + local split = param:split(",") + local firstParam = split[1]:trim():lower() + + if firstParam == "special" and tonumber(split[2]) then + local specialIcon = tonumber(split[2]) + player:sendIconBakragore(specialIcon) + else + local icons = convertIconsToBitValue(param) + player:sendNormalIcons(icons) + end + + return true +end + +testIcons:separator(" ") +testIcons:setDescription("[Usage]: /testicon {icon1}, {icon2}, {icon3}, ... [Usage2]: /testicon special, {icon}") +testIcons:groupType("god") +testIcons:register() + +local condition = Condition(CONDITION_BAKRAGORE, CONDITIONID_DEFAULT, 0, true) + +local bakragoreIcon = TalkAction("/bakragoreicon") + +function bakragoreIcon.onSay(player, words, param) + if param == "" then + player:sendCancelMessage("Icon number required.") + logger.error("[addBakragoreIcon.onSay] - Icon number's required") + return true + end + + if param == "remove" then + for i = 1, 10 do + if player:hasCondition(CONDITION_BAKRAGORE, i) then + player:removeCondition(CONDITION_BAKRAGORE, i) + end + end + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Removed all Bakragore icons.") + return true + end + + local numParam = tonumber(param) + if numParam then + if player:hasCondition(CONDITION_BAKRAGORE, numParam) then + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You already have the Bakragore icon.") + return true + end + + condition:setParameter(CONDITION_PARAM_SUBID, numParam) + condition:setParameter(CONDITION_PARAM_TICKS, -1) + player:addCondition(condition) + + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Added Bakragore icon with ID: " .. numParam) + end + + return true +end + +bakragoreIcon:separator(" ") +bakragoreIcon:groupType("god") +bakragoreIcon:register() diff --git a/src/creatures/combat/condition.cpp b/src/creatures/combat/condition.cpp index 34db29dcd4a..c06d9a792d5 100644 --- a/src/creatures/combat/condition.cpp +++ b/src/creatures/combat/condition.cpp @@ -131,6 +131,16 @@ bool Condition::unserializeProp(ConditionAttr_t attr, PropStream &propStream) { return true; } + case CONDITIONATTR_PERSISTENT: { + bool value = false; + if (!propStream.read(value)) { + return false; + } + + m_isPersistent = value; + return true; + } + case CONDITIONATTR_END: return true; @@ -160,6 +170,9 @@ void Condition::serialize(PropWriteStream &propWriteStream) { propWriteStream.write(CONDITIONATTR_ADDSOUND); propWriteStream.write(static_cast(addSound)); + + propWriteStream.write(CONDITIONATTR_PERSISTENT); + propWriteStream.write(m_isPersistent); } void Condition::setTicks(int32_t newTicks) { @@ -185,7 +198,7 @@ bool Condition::executeCondition(std::shared_ptr creature, int32_t int return true; } -std::shared_ptr Condition::createCondition(ConditionId_t id, ConditionType_t type, int32_t ticks, int32_t param /* = 0*/, bool buff /* = false*/, uint32_t subId /* = 0*/) { +std::shared_ptr Condition::createCondition(ConditionId_t id, ConditionType_t type, int32_t ticks, int32_t param /* = 0*/, bool buff /* = false*/, uint32_t subId /* = 0*/, bool isPersistent /* = false*/) { switch (type) { case CONDITION_POISON: case CONDITION_FIRE: @@ -242,6 +255,8 @@ std::shared_ptr Condition::createCondition(ConditionId_t id, Conditio case CONDITION_YELLTICKS: case CONDITION_PACIFIED: return std::make_shared(id, type, ticks, buff, subId); + case CONDITION_BAKRAGORE: + return std::make_shared(id, type, ticks, buff, subId, isPersistent); default: return nullptr; @@ -306,6 +321,10 @@ bool Condition::startCondition(std::shared_ptr) { } bool Condition::isPersistent() const { + if (m_isPersistent) { + g_logger().debug("Condition {} is persistent", conditionType); + return true; + } if (ticks == -1) { return false; } @@ -318,6 +337,10 @@ bool Condition::isPersistent() const { } bool Condition::isRemovableOnDeath() const { + if (m_isPersistent) { + return false; + } + if (ticks == -1) { return false; } @@ -329,8 +352,13 @@ bool Condition::isRemovableOnDeath() const { return true; } -uint32_t Condition::getIcons() const { - return isBuff ? ICON_PARTY_BUFF : 0; +std::unordered_set Condition::getIcons() const { + std::unordered_set icons; + if (isBuff) { + icons.insert(PlayerIcon::PartyBuff); + } + + return icons; } bool Condition::updateCondition(const std::shared_ptr addCondition) { @@ -375,20 +403,20 @@ void ConditionGeneric::addCondition(std::shared_ptr creature, const st } } -uint32_t ConditionGeneric::getIcons() const { - uint32_t icons = Condition::getIcons(); +std::unordered_set ConditionGeneric::getIcons() const { + auto icons = Condition::getIcons(); switch (conditionType) { case CONDITION_INFIGHT: - icons |= ICON_SWORDS; + icons.insert(PlayerIcon::Swords); break; case CONDITION_DRUNK: - icons |= ICON_DRUNK; + icons.insert(PlayerIcon::Drunk); break; case CONDITION_ROOTED: - icons |= ICON_ROOTED; + icons.insert(PlayerIcon::Rooted); break; default: @@ -1332,12 +1360,12 @@ bool ConditionManaShield::setParam(ConditionParam_t param, int32_t value) { } } -uint32_t ConditionManaShield::getIcons() const { - uint32_t icons = Condition::getIcons(); +std::unordered_set ConditionManaShield::getIcons() const { + auto icons = Condition::getIcons(); if (manaShield != 0) { - icons |= ICON_NEWMANASHIELD; + icons.insert(PlayerIcon::NewManaShield); } else { - icons |= ICON_MANASHIELD; + icons.insert(PlayerIcon::ManaShield); } return icons; } @@ -1739,39 +1767,39 @@ int32_t ConditionDamage::getTotalDamage() const { return std::abs(result); } -uint32_t ConditionDamage::getIcons() const { - uint32_t icons = Condition::getIcons(); +std::unordered_set ConditionDamage::getIcons() const { + auto icons = Condition::getIcons(); switch (conditionType) { case CONDITION_FIRE: - icons |= ICON_BURN; + icons.insert(PlayerIcon::Burn); break; case CONDITION_ENERGY: - icons |= ICON_ENERGY; + icons.insert(PlayerIcon::Energy); break; case CONDITION_DROWN: - icons |= ICON_DROWNING; + icons.insert(PlayerIcon::Drowning); break; case CONDITION_POISON: - icons |= ICON_POISON; + icons.insert(PlayerIcon::Poison); break; case CONDITION_FREEZING: - icons |= ICON_FREEZING; + icons.insert(PlayerIcon::Freezing); break; case CONDITION_DAZZLED: - icons |= ICON_DAZZLED; + icons.insert(PlayerIcon::Dazzled); break; case CONDITION_CURSED: - icons |= ICON_CURSED; + icons.insert(PlayerIcon::Cursed); break; case CONDITION_BLEEDING: - icons |= ICON_BLEEDING; + icons.insert(PlayerIcon::Bleeding); break; default: @@ -2068,11 +2096,10 @@ void ConditionFeared::addCondition(std::shared_ptr, const std::shared_ } } -uint32_t ConditionFeared::getIcons() const { - uint32_t icons = Condition::getIcons(); - - icons |= ICON_FEARED; +std::unordered_set ConditionFeared::getIcons() const { + auto icons = Condition::getIcons(); + icons.insert(PlayerIcon::Feared); return icons; } @@ -2208,15 +2235,15 @@ void ConditionSpeed::addCondition(std::shared_ptr creature, const std: } } -uint32_t ConditionSpeed::getIcons() const { - uint32_t icons = Condition::getIcons(); +std::unordered_set ConditionSpeed::getIcons() const { + auto icons = Condition::getIcons(); switch (conditionType) { case CONDITION_HASTE: - icons |= ICON_HASTE; + icons.insert(PlayerIcon::Haste); break; case CONDITION_PARALYZE: - icons |= ICON_PARALYZE; + icons.insert(PlayerIcon::Paralyze); break; default: diff --git a/src/creatures/combat/condition.hpp b/src/creatures/combat/condition.hpp index 2b28029bcef..ea59943e5c7 100644 --- a/src/creatures/combat/condition.hpp +++ b/src/creatures/combat/condition.hpp @@ -11,6 +11,8 @@ #include "declarations.hpp" +#include "enums/player_icons.hpp" + class Creature; class Player; class PropStream; @@ -19,16 +21,16 @@ class PropWriteStream; class Condition : public SharedObject { public: Condition() = default; - Condition(ConditionId_t initId, ConditionType_t initType, int32_t initTicks, bool initBuff = false, uint32_t initSubId = 0) : + Condition(ConditionId_t initId, ConditionType_t initType, int32_t initTicks, bool initBuff = false, uint32_t initSubId = 0, bool isPersistent = false) : endTime(initTicks == -1 ? std::numeric_limits::max() : 0), - subId(initSubId), ticks(initTicks), conditionType(initType), id(initId), isBuff(initBuff) { } + subId(initSubId), ticks(initTicks), conditionType(initType), id(initId), isBuff(initBuff), m_isPersistent(isPersistent) { } virtual ~Condition() = default; virtual bool startCondition(std::shared_ptr creature); virtual bool executeCondition(std::shared_ptr creature, int32_t interval); virtual void endCondition(std::shared_ptr creature) = 0; virtual void addCondition(std::shared_ptr creature, std::shared_ptr condition) = 0; - virtual uint32_t getIcons() const; + virtual std::unordered_set getIcons() const; ConditionId_t getId() const { return id; } @@ -49,7 +51,7 @@ class Condition : public SharedObject { } void setTicks(int32_t newTicks); - static std::shared_ptr createCondition(ConditionId_t id, ConditionType_t type, int32_t ticks, int32_t param = 0, bool buff = false, uint32_t subId = 0); + static std::shared_ptr createCondition(ConditionId_t id, ConditionType_t type, int32_t ticks, int32_t param = 0, bool buff = false, uint32_t subId = 0, bool isPersistent = false); static std::shared_ptr createCondition(PropStream &propStream); virtual bool setParam(ConditionParam_t param, int32_t value); @@ -71,6 +73,7 @@ class Condition : public SharedObject { ConditionType_t conditionType {}; ConditionId_t id {}; bool isBuff {}; + bool m_isPersistent {}; virtual bool updateCondition(std::shared_ptr addCondition); @@ -84,14 +87,14 @@ class Condition : public SharedObject { class ConditionGeneric : public Condition { public: - ConditionGeneric(ConditionId_t initId, ConditionType_t initType, int32_t initTicks, bool initBuff = false, uint32_t initSubId = 0) : - Condition(initId, initType, initTicks, initBuff, initSubId) { } + ConditionGeneric(ConditionId_t initId, ConditionType_t initType, int32_t initTicks, bool initBuff = false, uint32_t initSubId = 0, bool isPersistent = false) : + Condition(initId, initType, initTicks, initBuff, initSubId, isPersistent) { } bool startCondition(std::shared_ptr creature) override; bool executeCondition(std::shared_ptr creature, int32_t interval) override; void endCondition(std::shared_ptr creature) override; void addCondition(std::shared_ptr creature, std::shared_ptr condition) override; - uint32_t getIcons() const override; + std::unordered_set getIcons() const override; std::shared_ptr clone() const override { return std::make_shared(*this); @@ -206,7 +209,7 @@ class ConditionManaShield final : public Condition { bool startCondition(std::shared_ptr creature) override; void endCondition(std::shared_ptr creature) override; void addCondition(std::shared_ptr creature, std::shared_ptr addCondition) override; - uint32_t getIcons() const override; + std::unordered_set getIcons() const override; bool setParam(ConditionParam_t param, int32_t value) override; @@ -271,7 +274,7 @@ class ConditionDamage final : public Condition { bool executeCondition(std::shared_ptr creature, int32_t interval) override; void endCondition(std::shared_ptr creature) override; void addCondition(std::shared_ptr creature, std::shared_ptr condition) override; - uint32_t getIcons() const override; + std::unordered_set getIcons() const override; std::shared_ptr clone() const override { return std::make_shared(*this); @@ -322,7 +325,7 @@ class ConditionFeared final : public Condition { bool executeCondition(std::shared_ptr creature, int32_t interval) override; void endCondition(std::shared_ptr creature) override; void addCondition(std::shared_ptr creature, std::shared_ptr condition) override; - uint32_t getIcons() const override; + std::unordered_set getIcons() const override; std::shared_ptr clone() const override { return std::make_shared(*this); @@ -361,7 +364,7 @@ class ConditionSpeed final : public Condition { bool executeCondition(std::shared_ptr creature, int32_t interval) override; void endCondition(std::shared_ptr creature) override; void addCondition(std::shared_ptr creature, std::shared_ptr condition) override; - uint32_t getIcons() const override; + std::unordered_set getIcons() const override; std::shared_ptr clone() const override { return std::make_shared(*this); diff --git a/src/creatures/creatures_definitions.hpp b/src/creatures/creatures_definitions.hpp index 74ec6c5f2c8..410349a67fb 100644 --- a/src/creatures/creatures_definitions.hpp +++ b/src/creatures/creatures_definitions.hpp @@ -71,6 +71,7 @@ enum ConditionAttr_t { CONDITIONATTR_ABSORBS, CONDITIONATTR_INCREASES, CONDITIONATTR_CHARM_CHANCE_MODIFIER, + CONDITIONATTR_PERSISTENT, // reserved for serialization CONDITIONATTR_END = 254, @@ -117,6 +118,7 @@ enum ConditionType_t : uint8_t { CONDITION_GOSHNAR3 = 36, CONDITION_GOSHNAR4 = 37, CONDITION_GOSHNAR5 = 38, + CONDITION_BAKRAGORE = 39, // Need the last ever CONDITION_COUNT = 39 diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index c2d8c7a8c70..430e2ef4abe 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -466,41 +466,36 @@ float Player::getDefenseFactor() const { } } -uint32_t Player::getClientIcons() { - uint32_t icons = 0; +std::unordered_set Player::getClientIcons() { + std::unordered_set icons; + for (const auto &condition : conditions) { if (!isSuppress(condition->getType(), false)) { - icons |= condition->getIcons(); + auto conditionIcons = condition->getIcons(); + icons.insert(conditionIcons.begin(), conditionIcons.end()); + if (icons.size() == 9) { + return icons; + } } } - if (pzLocked) { - icons |= ICON_REDSWORDS; + if (pzLocked && icons.size() < 9) { + icons.insert(PlayerIcon::RedSwords); } auto tile = getTile(); if (tile && tile->hasFlag(TILESTATE_PROTECTIONZONE)) { - icons |= ICON_PIGEON; + if (icons.size() < 9) { + icons.insert(PlayerIcon::Pigeon); + } client->sendRestingStatus(1); - // Don't show ICON_SWORDS if player is in protection zone. - if (hasBitSet(ICON_SWORDS, icons)) { - icons &= ~ICON_SWORDS; - } + icons.erase(PlayerIcon::Swords); } else { client->sendRestingStatus(0); } - // Game client debugs with 10 or more icons - // so let's prevent that from happening. - std::bitset<32> icon_bitset(static_cast(icons)); - for (size_t pos = 0, bits_set = icon_bitset.count(); bits_set >= 10; ++pos) { - if (icon_bitset[pos]) { - icon_bitset.reset(pos); - --bits_set; - } - } - return icon_bitset.to_ulong(); + return icons; } void Player::addMonsterToCyclopediaTrackerList(const std::shared_ptr mtype, bool isBoss, bool reloadClient /* = false */) { @@ -6179,6 +6174,40 @@ void Player::sendClosePrivate(uint16_t channelId) { } } +void Player::sendIcons() { + if (!client) { + return; + } + + // Iterates over the Bakragore icons to check if the player has any + IconBakragore iconBakragore = IconBakragore::None; + for (auto icon : magic_enum::enum_values()) { + if (icon == IconBakragore::None) { + continue; + } + + const auto &condition = getCondition(CONDITION_BAKRAGORE, CONDITIONID_DEFAULT, magic_enum::enum_integer(icon)); + if (condition) { + g_logger().debug("[{}] found active condition Bakragore with subId {}", __FUNCTION__, magic_enum::enum_integer(icon)); + iconBakragore = icon; + } + } + + // Remove the last icon so that Bakragore's is added + auto iconSet = getClientIcons(); + if (iconSet.size() >= 9 && iconBakragore != IconBakragore::None) { + iconSet.erase(std::prev(iconSet.end())); + } + + client->sendIcons(iconSet, iconBakragore); +} + +void Player::sendIconBakragore(const IconBakragore icon) { + if (client) { + client->sendIconBakragore(icon); + } +} + void Player::sendCyclopediaCharacterAchievements(uint16_t secretsUnlocked, std::vector> achievementsUnlocked) { if (client) { client->sendCyclopediaCharacterAchievements(secretsUnlocked, achievementsUnlocked); diff --git a/src/creatures/players/player.hpp b/src/creatures/players/player.hpp index bfaad14cf76..83515b2e004 100644 --- a/src/creatures/players/player.hpp +++ b/src/creatures/players/player.hpp @@ -35,6 +35,7 @@ #include "game/bank/bank.hpp" #include "enums/object_category.hpp" #include "enums/player_cyclopedia.hpp" +#include "enums/player_icons.hpp" #include "creatures/players/cyclopedia/player_badge.hpp" #include "creatures/players/cyclopedia/player_cyclopedia.hpp" #include "creatures/players/cyclopedia/player_title.hpp" @@ -313,7 +314,7 @@ class Player final : public Creature, public Cylinder, public Bankable { return inbox; } - uint32_t getClientIcons(); + std::unordered_set getClientIcons(); const GuildWarVector &getGuildWarVector() const { return guildWarVector; @@ -1419,11 +1420,8 @@ class Player final : public Creature, public Cylinder, public Bankable { } } void sendClosePrivate(uint16_t channelId); - void sendIcons() { - if (client) { - client->sendIcons(getClientIcons()); - } - } + void sendIcons(); + void sendIconBakragore(const IconBakragore icon); void sendClientCheck() const { if (client) { client->sendClientCheck(); diff --git a/src/enums/player_icons.hpp b/src/enums/player_icons.hpp new file mode 100644 index 00000000000..c289144bd7b --- /dev/null +++ b/src/enums/player_icons.hpp @@ -0,0 +1,61 @@ +/** + * Canary - A free and open-source MMORPG server emulator + * Copyright (©) 2019-2024 OpenTibiaBR + * Repository: https://github.com/opentibiabr/canary + * License: https://github.com/opentibiabr/canary/blob/main/LICENSE + * Contributors: https://github.com/opentibiabr/canary/graphs/contributors + * Website: https://docs.opentibiabr.com/ + */ + +#pragma once + +#ifndef USE_PRECOMPILED_HEADERS + #include +#endif + +enum class PlayerIcon : uint8_t { + Poison = 0, + Burn = 1, + Energy = 2, + Drunk = 3, + ManaShield = 4, + Paralyze = 5, + Haste = 6, + Swords = 7, + Drowning = 8, + Freezing = 9, + Dazzled = 10, + Cursed = 11, + PartyBuff = 12, + RedSwords = 13, + Pigeon = 14, + Bleeding = 15, + LesserHex = 16, + IntenseHex = 17, + GreaterHex = 18, + Rooted = 19, + Feared = 20, + Goshnar1 = 21, + Goshnar2 = 22, + Goshnar3 = 23, + Goshnar4 = 24, + Goshnar5 = 25, + NewManaShield = 26, + Agony = 27, + + // Must always be the last + Count +}; + +enum class IconBakragore : uint8_t { + None = 0, + Taint1 = 1, + Taint2 = 2, + Taint3 = 3, + Taint4 = 4, + Taint5 = 5, + Taint6 = 6, + Taint7 = 7, + Taint8 = 8, + Taint9 = 9, +}; diff --git a/src/lua/functions/core/game/lua_enums.cpp b/src/lua/functions/core/game/lua_enums.cpp index d0be72158d6..bfaa07dcc73 100644 --- a/src/lua/functions/core/game/lua_enums.cpp +++ b/src/lua/functions/core/game/lua_enums.cpp @@ -330,37 +330,9 @@ void LuaEnums::initFactionEnums(lua_State* L) { } void LuaEnums::initConditionEnums(lua_State* L) { - registerEnum(L, CONDITION_NONE); - registerEnum(L, CONDITION_POISON); - registerEnum(L, CONDITION_FIRE); - registerEnum(L, CONDITION_ENERGY); - registerEnum(L, CONDITION_BLEEDING); - registerEnum(L, CONDITION_HASTE); - registerEnum(L, CONDITION_PARALYZE); - registerEnum(L, CONDITION_OUTFIT); - registerEnum(L, CONDITION_INVISIBLE); - registerEnum(L, CONDITION_LIGHT); - registerEnum(L, CONDITION_MANASHIELD); - registerEnum(L, CONDITION_INFIGHT); - registerEnum(L, CONDITION_DRUNK); - registerEnum(L, CONDITION_EXHAUST); - registerEnum(L, CONDITION_REGENERATION); - registerEnum(L, CONDITION_SOUL); - registerEnum(L, CONDITION_DROWN); - registerEnum(L, CONDITION_MUTED); - registerEnum(L, CONDITION_CHANNELMUTEDTICKS); - registerEnum(L, CONDITION_YELLTICKS); - registerEnum(L, CONDITION_ATTRIBUTES); - registerEnum(L, CONDITION_FREEZING); - registerEnum(L, CONDITION_DAZZLED); - registerEnum(L, CONDITION_CURSED); - registerEnum(L, CONDITION_EXHAUST_COMBAT); - registerEnum(L, CONDITION_EXHAUST_HEAL); - registerEnum(L, CONDITION_PACIFIED); - registerEnum(L, CONDITION_SPELLCOOLDOWN); - registerEnum(L, CONDITION_SPELLGROUPCOOLDOWN); - registerEnum(L, CONDITION_ROOTED); - registerEnum(L, CONDITION_FEARED); + for (auto value : magic_enum::enum_values()) { + registerMagicEnum(L, value); + } } void LuaEnums::initConditionIdEnums(lua_State* L) { diff --git a/src/lua/functions/creatures/combat/condition_functions.cpp b/src/lua/functions/creatures/combat/condition_functions.cpp index 7bc2535bdf4..27f21867f76 100644 --- a/src/lua/functions/creatures/combat/condition_functions.cpp +++ b/src/lua/functions/creatures/combat/condition_functions.cpp @@ -14,12 +14,18 @@ #include "lua/functions/creatures/combat/condition_functions.hpp" int ConditionFunctions::luaConditionCreate(lua_State* L) { - // Condition(conditionType[, conditionId = CONDITIONID_COMBAT[, subid = 0]]) + // Condition(conditionType, conditionId = CONDITIONID_COMBAT, subid = 0, isPersistent = false) ConditionType_t conditionType = getNumber(L, 2); + if (conditionType == CONDITION_NONE) { + reportErrorFunc("Invalid condition type"); + return 1; + } + ConditionId_t conditionId = getNumber(L, 3, CONDITIONID_COMBAT); uint32_t subId = getNumber(L, 4, 0); + bool isPersistent = getBoolean(L, 5, false); - std::shared_ptr condition = Condition::createCondition(conditionId, conditionType, 0, 0, false, subId); + std::shared_ptr condition = Condition::createCondition(conditionId, conditionType, 0, 0, false, subId, isPersistent); if (condition) { pushUserdata(L, condition); setMetatable(L, -1, "Condition"); @@ -75,7 +81,13 @@ int ConditionFunctions::luaConditionGetIcons(lua_State* L) { // condition:getIcons() std::shared_ptr condition = getUserdataShared(L, 1); if (condition) { - lua_pushnumber(L, condition->getIcons()); + auto icons = condition->getIcons(); + lua_newtable(L); // Creates a new table on the Lua stack + int index = 1; + for (const auto &icon : icons) { + lua_pushstring(L, magic_enum::enum_name(icon).data()); // Converts the enum to a string + lua_rawseti(L, -2, index++); // Inserts into the Lua table array + } } else { lua_pushnil(L); } diff --git a/src/lua/functions/creatures/player/player_functions.cpp b/src/lua/functions/creatures/player/player_functions.cpp index 609ecbe95e0..9ccbc95c6bb 100644 --- a/src/lua/functions/creatures/player/player_functions.cpp +++ b/src/lua/functions/creatures/player/player_functions.cpp @@ -9,6 +9,8 @@ #include "pch.hpp" +#include "lua/functions/creatures/player/player_functions.hpp" + #include "creatures/combat/spells.hpp" #include "creatures/creature.hpp" #include "creatures/interactions/chat.hpp" @@ -22,7 +24,6 @@ #include "io/iologindata.hpp" #include "io/ioprey.hpp" #include "items/item.hpp" -#include "lua/functions/creatures/player/player_functions.hpp" #include "game/scheduling/save_manager.hpp" #include "game/scheduling/dispatcher.hpp" #include "map/spectators.hpp" @@ -4393,3 +4394,17 @@ int PlayerFunctions::luaPlayerTakeScreenshot(lua_State* L) { pushBoolean(L, true); return 1; } + +int PlayerFunctions::luaPlayerSendIconBakragore(lua_State* L) { + // player:sendIconBakragore() + const auto &player = getUserdataShared(L, 1); + if (!player) { + lua_pushnil(L); + return 1; + } + + auto iconType = getNumber(L, 2); + player->sendIconBakragore(iconType); + pushBoolean(L, true); + return 1; +} diff --git a/src/lua/functions/creatures/player/player_functions.hpp b/src/lua/functions/creatures/player/player_functions.hpp index 3912753a1ca..000c5f755c0 100644 --- a/src/lua/functions/creatures/player/player_functions.hpp +++ b/src/lua/functions/creatures/player/player_functions.hpp @@ -377,6 +377,8 @@ class PlayerFunctions final : LuaScriptInterface { registerMethod(L, "Player", "takeScreenshot", PlayerFunctions::luaPlayerTakeScreenshot); + registerMethod(L, "Player", "sendIconBakragore", PlayerFunctions::luaPlayerSendIconBakragore); + GroupFunctions::init(L); GuildFunctions::init(L); MountFunctions::init(L); @@ -740,6 +742,7 @@ class PlayerFunctions final : LuaScriptInterface { static int luaPlayerCreateTransactionSummary(lua_State* L); static int luaPlayerTakeScreenshot(lua_State* L); + static int luaPlayerSendIconBakragore(lua_State* L); friend class CreatureFunctions; }; diff --git a/src/lua/global/globalevent.cpp b/src/lua/global/globalevent.cpp index 32fa1a01ab1..a9d589a1f76 100644 --- a/src/lua/global/globalevent.cpp +++ b/src/lua/global/globalevent.cpp @@ -119,9 +119,7 @@ void GlobalEvents::think() { int64_t now = OTSYS_TIME(); int64_t nextScheduledTime = std::numeric_limits::max(); - for (auto &it : thinkMap) { - const auto globalEvent = it.second; - + for (const auto &[globalEventName, globalEvent] : thinkMap) { int64_t nextExecutionTime = globalEvent->getNextExecution() - now; if (nextExecutionTime > 0) { if (nextExecutionTime < nextScheduledTime) { @@ -155,8 +153,7 @@ void GlobalEvents::think() { } void GlobalEvents::execute(GlobalEvent_t type) const { - for (const auto &it : serverMap) { - const auto globalEvent = it.second; + for (const auto &[globalEventName, globalEvent] : serverMap) { if (globalEvent->getEventType() == type) { globalEvent->executeEvent(); } diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index 30a47b16418..ea16779dabf 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -4575,15 +4575,34 @@ void ProtocolGame::sendChannelMessage(const std::string &author, const std::stri writeToOutputBuffer(msg); } -void ProtocolGame::sendIcons(uint32_t icons) { +void ProtocolGame::sendIcons(const std::unordered_set &iconSet, const IconBakragore iconBakragore) { NetworkMessage msg; msg.addByte(0xA2); + + std::bitset(PlayerIcon::Count)> iconsBitSet; + for (const auto &icon : iconSet) { + iconsBitSet.set(enumToValue(icon)); + } + + uint32_t icons = iconsBitSet.to_ulong(); + if (oldProtocol) { + // Send as uint16_t in old protocol msg.add(static_cast(icons)); } else { + // Send as uint32_t in new protocol msg.add(icons); - msg.addByte(0x00); // 13.20 icon counter + msg.addByte(enumToValue(iconBakragore)); // Icons Bakragore } + + writeToOutputBuffer(msg); +} + +void ProtocolGame::sendIconBakragore(const IconBakragore icon) { + NetworkMessage msg; + msg.addByte(0xA2); + msg.add(0); // Send empty normal icons + msg.addByte(enumToValue(icon)); writeToOutputBuffer(msg); } diff --git a/src/server/network/protocol/protocolgame.hpp b/src/server/network/protocol/protocolgame.hpp index f6b7be93cb2..2a5fde6c6c4 100644 --- a/src/server/network/protocol/protocolgame.hpp +++ b/src/server/network/protocol/protocolgame.hpp @@ -242,7 +242,8 @@ class ProtocolGame final : public Protocol { void sendExperienceTracker(int64_t rawExp, int64_t finalExp); void sendToChannel(std::shared_ptr creature, SpeakClasses type, const std::string &text, uint16_t channelId); void sendPrivateMessage(std::shared_ptr speaker, SpeakClasses type, const std::string &text); - void sendIcons(uint32_t icons); + void sendIcons(const std::unordered_set &iconSet, const IconBakragore iconBakragore); + void sendIconBakragore(const IconBakragore icon); void sendFYIBox(const std::string &message); void openImbuementWindow(std::shared_ptr item); diff --git a/src/utils/utils_definitions.hpp b/src/utils/utils_definitions.hpp index be50fd35b9d..abf690522d5 100644 --- a/src/utils/utils_definitions.hpp +++ b/src/utils/utils_definitions.hpp @@ -9,37 +9,6 @@ #pragma once -// Enums -enum Icons_t { - ICON_POISON = 1 << 0, - ICON_BURN = 1 << 1, - ICON_ENERGY = 1 << 2, - ICON_DRUNK = 1 << 3, - ICON_MANASHIELD = 1 << 4, - ICON_PARALYZE = 1 << 5, - ICON_HASTE = 1 << 6, - ICON_SWORDS = 1 << 7, - ICON_DROWNING = 1 << 8, - ICON_FREEZING = 1 << 9, - ICON_DAZZLED = 1 << 10, - ICON_CURSED = 1 << 11, - ICON_PARTY_BUFF = 1 << 12, - ICON_REDSWORDS = 1 << 13, - ICON_PIGEON = 1 << 14, - ICON_BLEEDING = 1 << 15, - ICON_LESSERHEX = 1 << 16, - ICON_INTENSEHEX = 1 << 17, - ICON_GREATERHEX = 1 << 18, - ICON_ROOTED = 1 << 19, - ICON_FEARED = 1 << 20, - ICON_GOSHNAR1 = 1 << 21, - ICON_GOSHNAR2 = 1 << 22, - ICON_GOSHNAR3 = 1 << 23, - ICON_GOSHNAR4 = 1 << 24, - ICON_GOSHNAR5 = 1 << 25, - ICON_NEWMANASHIELD = 1 << 26, -}; - enum WieldInfo_t { WIELDINFO_NONE = 0, WIELDINFO_LEVEL = 1 << 0, From 193939c4903bcbec1cf0d6e808422693f2e79278 Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Fri, 9 Aug 2024 13:59:34 -0300 Subject: [PATCH 14/24] improve: change hardcoded blessings to magic enum (#2804) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Removed an unnecessary map in the game, moved to magic enum (extracts directly from the enum name) • Removed the amount of hardcoded bless for the enum count Resolves #2745 Close #2787 --- .../players/cyclopedia/player_cyclopedia.cpp | 9 +++-- src/creatures/players/player.cpp | 38 ++++++++----------- src/enums/player_blessings.hpp | 25 ++++++++++++ src/game/game.cpp | 16 +------- src/game/game.hpp | 2 - src/game/game_definitions.hpp | 11 ------ src/server/network/protocol/protocolgame.cpp | 25 ++++++------ 7 files changed, 61 insertions(+), 65 deletions(-) create mode 100644 src/enums/player_blessings.hpp diff --git a/src/creatures/players/cyclopedia/player_cyclopedia.cpp b/src/creatures/players/cyclopedia/player_cyclopedia.cpp index abbc920d322..eb7e05d2338 100644 --- a/src/creatures/players/cyclopedia/player_cyclopedia.cpp +++ b/src/creatures/players/cyclopedia/player_cyclopedia.cpp @@ -9,12 +9,15 @@ #include "pch.hpp" +#include "player_cyclopedia.hpp" + #include "database/databasetasks.hpp" #include "creatures/players/player.hpp" -#include "player_cyclopedia.hpp" #include "game/game.hpp" #include "kv/kv.hpp" +#include "enums/player_blessings.hpp" + PlayerCyclopedia::PlayerCyclopedia(Player &player) : m_player(player) { } @@ -139,8 +142,8 @@ void PlayerCyclopedia::updateStoreSummary(uint8_t type, uint16_t amount, const s insertValue(type, amount, id); break; case Summary_t::ALL_BLESSINGS: - for (int i = 1; i < 8; ++i) { - insertValue(static_cast(Summary_t::BLESSINGS), amount, fmt::format("{}", i)); + for (auto blessIt : magic_enum::enum_values()) { + insertValue(static_cast(Summary_t::BLESSINGS), amount, fmt::format("{}", blessIt)); } break; default: diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index 430e2ef4abe..45f5808d633 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -41,6 +41,7 @@ #include "enums/account_errors.hpp" #include "enums/account_type.hpp" #include "enums/account_group_type.hpp" +#include "enums/player_blessings.hpp" MuteCountMap Player::muteCountMap; @@ -6649,33 +6650,24 @@ void Player::initializeTaskHunting() { } std::string Player::getBlessingsName() const { - uint8_t count = 0; - std::for_each(blessings.begin(), blessings.end(), [&count](uint8_t amount) { - if (amount != 0) { - count++; + std::vector blessingNames; + for (auto bless : magic_enum::enum_values()) { + if (hasBlessing(enumToValue(bless))) { + std::string name = toStartCaseWithSpace(magic_enum::enum_name(bless).data()); + blessingNames.emplace_back(name); } - }); + } - auto BlessingNames = g_game().getBlessingNames(); std::ostringstream os; - for (uint8_t i = 1; i <= 8; i++) { - if (hasBlessing(i)) { - if (auto blessName = BlessingNames.find(static_cast(i)); - blessName != BlessingNames.end()) { - os << (*blessName).second; - } else { - continue; - } - - --count; - if (count > 1) { - os << ", "; - } else if (count == 1) { - os << " and "; - } else { - os << "."; - } + if (!blessingNames.empty()) { + // Join all elements but the last with ", " and add the last one with " and " + for (size_t i = 0; i < blessingNames.size() - 1; ++i) { + os << blessingNames[i] << ", "; + } + if (blessingNames.size() > 1) { + os << "and "; } + os << blessingNames.back() << "."; } return os.str(); diff --git a/src/enums/player_blessings.hpp b/src/enums/player_blessings.hpp new file mode 100644 index 00000000000..086f04a6442 --- /dev/null +++ b/src/enums/player_blessings.hpp @@ -0,0 +1,25 @@ +/** + * Canary - A free and open-source MMORPG server emulator + * Copyright (©) 2019-2024 OpenTibiaBR + * Repository: https://github.com/opentibiabr/canary + * License: https://github.com/opentibiabr/canary/blob/main/LICENSE + * Contributors: https://github.com/opentibiabr/canary/graphs/contributors + * Website: https://docs.opentibiabr.com/ + */ + +#pragma once + +#ifndef USE_PRECOMPILED_HEADERS + #include +#endif + +enum class Blessings : uint8_t { + TwistOfFate = 1, + TheWisdomOfSolitude = 2, + TheSparkOfThePhoenix = 3, + TheFireOfTheSuns = 4, + TheSpiritualShielding = 5, + TheEmbraceOfTibia = 6, + BloodOfTheMountain = 7, + HearthOfTheMountain = 8 +}; diff --git a/src/game/game.cpp b/src/game/game.cpp index 6e7660ecbb5..d5c9544a8f9 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -53,6 +53,7 @@ #include "enums/account_group_type.hpp" #include "enums/account_errors.hpp" #include "enums/account_coins.hpp" +#include "enums/player_blessings.hpp" #include @@ -364,17 +365,6 @@ Game::Game() { HighscoreCategory("Magic Level", static_cast(HighscoreCategories_t::MAGIC_LEVEL)) }; - m_blessingNames = { - { static_cast(TWIST_OF_FATE), "Twist of Fate" }, - { static_cast(WISDOM_OF_SOLITUDE), "The Wisdom of Solitude" }, - { static_cast(SPARK_OF_THE_PHOENIX), "The Spark of the Phoenix" }, - { static_cast(FIRE_OF_THE_SUNS), "The Fire of the Suns" }, - { static_cast(SPIRITUAL_SHIELDING), "The Spiritual Shielding" }, - { static_cast(EMBRACE_OF_TIBIA), "The Embrace of Tibia" }, - { static_cast(BLOOD_OF_THE_MOUNTAIN), "Blood of the Mountain" }, - { static_cast(HEARTH_OF_THE_MOUNTAIN), "Heart of the Mountain" }, - }; - m_summaryCategories = { { static_cast(Summary_t::HOUSE_ITEMS), "house-items" }, { static_cast(Summary_t::BOOSTS), "xp-boosts" }, @@ -10668,10 +10658,6 @@ const std::string &Game::getSummaryKeyByType(uint8_t type) { return m_summaryCategories[type]; } -const std::map &Game::getBlessingNames() { - return m_blessingNames; -} - const std::unordered_map &Game::getHirelingSkills() { return m_hirelingSkills; } diff --git a/src/game/game.hpp b/src/game/game.hpp index 181f6528f69..e04dbb26cff 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -748,8 +748,6 @@ class Game { std::vector m_highscoreCategories; std::unordered_map m_highscoreCategoriesNames; - std::map m_blessingNames; - std::unordered_map m_summaryCategories; std::unordered_map m_hirelingSkills; std::unordered_map m_hirelingOutfits; diff --git a/src/game/game_definitions.hpp b/src/game/game_definitions.hpp index 8b165bc725d..a6ce6e7eaa8 100644 --- a/src/game/game_definitions.hpp +++ b/src/game/game_definitions.hpp @@ -102,17 +102,6 @@ enum class HighscoreCategories_t : uint8_t { BOSS_POINTS = 14, }; -enum Blessings_t : uint8_t { - TWIST_OF_FATE = 1, - WISDOM_OF_SOLITUDE = 2, - SPARK_OF_THE_PHOENIX = 3, - FIRE_OF_THE_SUNS = 4, - SPIRITUAL_SHIELDING = 5, - EMBRACE_OF_TIBIA = 6, - BLOOD_OF_THE_MOUNTAIN = 7, - HEARTH_OF_THE_MOUNTAIN = 8, -}; - enum HighscoreType_t : uint8_t { HIGHSCORE_GETENTRIES = 0, HIGHSCORE_OURRANK = 1 diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index ea16779dabf..ca6f1f77961 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -41,6 +41,7 @@ #include "enums/account_type.hpp" #include "enums/account_group_type.hpp" #include "enums/account_coins.hpp" +#include "enums/player_blessings.hpp" #include "creatures/players/highscore_category.hpp" @@ -3576,15 +3577,14 @@ void ProtocolGame::sendCyclopediaCharacterCombatStats() { msg.add(static_cast(player->getReflectFlat(COMBAT_PHYSICALDAMAGE))); uint8_t haveBlesses = 0; - const uint8_t blessings = 8; - for (uint8_t i = 1; i < blessings; ++i) { - if (player->hasBlessing(i)) { + for (auto bless : magic_enum::enum_values()) { + if (player->hasBlessing(enumToValue(bless))) { ++haveBlesses; } } msg.addByte(haveBlesses); - msg.addByte(blessings); + msg.addByte(magic_enum::enum_count()); std::shared_ptr weapon = player->getWeapon(); if (weapon) { @@ -3997,13 +3997,16 @@ void ProtocolGame::sendCyclopediaCharacterStoreSummary() { auto cyclopediaSummary = player->cyclopedia()->getSummary(); - // getBlessingsObtained - auto blessingNames = g_game().getBlessingNames(); - msg.addByte(static_cast(blessingNames.size())); - for (const auto &bless : blessingNames) { - msg.addString(bless.second, "ProtocolGame::sendCyclopediaCharacterStoreSummary - blessing.name"); - uint8_t blessingIndex = bless.first - 1; - msg.addByte((blessingIndex < player->blessings.size()) ? static_cast(player->blessings[blessingIndex]) : 0); + msg.addByte(static_cast(magic_enum::enum_count())); + for (auto bless : magic_enum::enum_values()) { + std::string name = toStartCaseWithSpace(magic_enum::enum_name(bless).data()); + msg.addString(name, "ProtocolGame::sendCyclopediaCharacterStoreSummary - blessing.name"); + auto blessValue = enumToValue(bless); + if (player->hasBlessing(blessValue)) { + msg.addByte(static_cast(player->blessings[blessValue - 1])); + } else { + msg.addByte(0x00); + } } uint8_t preySlotsUnlocked = 0; From 6eb42385f0e7732570a281468c54873af5ee2a86 Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Sun, 11 Aug 2024 00:27:04 -0300 Subject: [PATCH 15/24] fix: add new wheel window bytes (#2811) Resolves #2807 --- src/creatures/players/wheel/player_wheel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/creatures/players/wheel/player_wheel.cpp b/src/creatures/players/wheel/player_wheel.cpp index eff54689f94..b78f136312b 100644 --- a/src/creatures/players/wheel/player_wheel.cpp +++ b/src/creatures/players/wheel/player_wheel.cpp @@ -999,6 +999,9 @@ void PlayerWheel::addGems(NetworkMessage &msg) const { msg.addByte(static_cast(gem.supremeModifier)); } } + + msg.addByte(0); // Lesser gems + msg.addByte(0); // Greater gems } void PlayerWheel::sendOpenWheelWindow(NetworkMessage &msg, uint32_t ownerId) const { From 3a7897dea4c5d854732ddef5f4f3e80c3dbb0ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Renato=20Foot=20Guimar=C3=A3es=20Costallat?= Date: Mon, 12 Aug 2024 18:07:08 -0300 Subject: [PATCH 16/24] fix: segfault on unit test (#2808) Fix segfault running unit test when building with linux-debug preset. --------- Co-authored-by: GitHub Actions --- .github/workflows/build-ubuntu.yml | 8 ++++---- src/security/argon.cpp | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-ubuntu.yml b/.github/workflows/build-ubuntu.yml index 5109e613d99..2b369e34875 100644 --- a/.github/workflows/build-ubuntu.yml +++ b/.github/workflows/build-ubuntu.yml @@ -95,10 +95,10 @@ jobs: path: | ${{ github.workspace }}/build/${{ matrix.buildtype }}/bin/ -# - name: Run Unit Tests -# run: | -# cd ${{ github.workspace }}/build/${{ matrix.buildtype }}/tests/unit -# ctest --verbose + - name: Run Unit Tests + run: | + cd ${{ github.workspace }}/build/${{ matrix.buildtype }}/tests/unit + ctest --verbose # - name: Run Integration Tests # run: | diff --git a/src/security/argon.cpp b/src/security/argon.cpp index 02079e70ca0..fe11ab0724a 100644 --- a/src/security/argon.cpp +++ b/src/security/argon.cpp @@ -15,9 +15,6 @@ #include -const std::regex Argon2::re("\\$([A-Za-z0-9+/]+)\\$([A-Za-z0-9+/]+)"); -const std::string Argon2::base64_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - Argon2::Argon2() { updateConstants(); } @@ -44,6 +41,8 @@ uint32_t Argon2::parseBitShift(const std::string &bitShiftStr) const { } bool Argon2::verifyPassword(const std::string &password, const std::string &phash) const { + + const std::regex re("\\$([A-Za-z0-9+/]+)\\$([A-Za-z0-9+/]+)"); std::smatch match; if (!std::regex_search(phash, match, re)) { g_logger().debug("No argon2 hash found in string"); @@ -65,6 +64,7 @@ bool Argon2::verifyPassword(const std::string &password, const std::string &phas } std::vector Argon2::base64_decode(const std::string &input) const { + const std::string base64_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; std::vector ret; int i = 0; uint32_t val = 0; From 4bf23d5a4f6654a4f4268bc5f6b241fb297edc33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Renato=20Foot=20Guimar=C3=A3es=20Costallat?= Date: Wed, 14 Aug 2024 23:46:30 -0300 Subject: [PATCH 17/24] add: lua format workflow (#2815) Add Lua Format Workflow to run when lua format fails --- .github/workflows/lua-format-workflow.yml | 39 +++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/lua-format-workflow.yml diff --git a/.github/workflows/lua-format-workflow.yml b/.github/workflows/lua-format-workflow.yml new file mode 100644 index 00000000000..8a9de8f7127 --- /dev/null +++ b/.github/workflows/lua-format-workflow.yml @@ -0,0 +1,39 @@ +--- +on: + workflow_run: + workflows: ["Lua-format"] + types: [completed] + +jobs: + on-failure: + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'failure' }} + steps: + - name: Set up Git + if: ${{ github.ref != 'refs/heads/main' }} + run: | + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git config --global user.name "GitHub Actions" + - name: Actions checkout + if: ${{ github.ref != 'refs/heads/main' }} + uses: actions/checkout@v3 + with: + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.head.ref }} + token: ${{ secrets.GITHUB_TOKEN }} + + - uses: JohnnyMorganz/stylua-action@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + version: latest + args: . + + - name: Run add and commit + if: ${{ github.ref != 'refs/heads/main' }} + uses: EndBug/add-and-commit@v9 + with: + author_name: GitHub Actions + author_email: github-actions[bot]@users.noreply.github.com + message: "Lua code format - (Stylua)" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 5d0160ea85735bf4654cacba5c814531c7439281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Renato=20Foot=20Guimar=C3=A3es=20Costallat?= Date: Wed, 14 Aug 2024 23:52:30 -0300 Subject: [PATCH 18/24] Add lua format workflow (#2816) Small fix to run on PR from main --- .github/workflows/lua-format-workflow.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/lua-format-workflow.yml b/.github/workflows/lua-format-workflow.yml index 8a9de8f7127..b206a7020c8 100644 --- a/.github/workflows/lua-format-workflow.yml +++ b/.github/workflows/lua-format-workflow.yml @@ -10,12 +10,10 @@ jobs: if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'failure' }} steps: - name: Set up Git - if: ${{ github.ref != 'refs/heads/main' }} run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "GitHub Actions" - name: Actions checkout - if: ${{ github.ref != 'refs/heads/main' }} uses: actions/checkout@v3 with: repository: ${{ github.event.pull_request.head.repo.full_name }} @@ -29,7 +27,6 @@ jobs: args: . - name: Run add and commit - if: ${{ github.ref != 'refs/heads/main' }} uses: EndBug/add-and-commit@v9 with: author_name: GitHub Actions From 3710aa2ae379dc191013549e52f7fab0a89de8c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Renato=20Foot=20Guimar=C3=A3es=20Costallat?= Date: Thu, 15 Aug 2024 00:01:58 -0300 Subject: [PATCH 19/24] Add lua format workflow (#2817) One more small fix to checkout the PR --- .github/workflows/lua-format-workflow.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lua-format-workflow.yml b/.github/workflows/lua-format-workflow.yml index b206a7020c8..c0d9913e44f 100644 --- a/.github/workflows/lua-format-workflow.yml +++ b/.github/workflows/lua-format-workflow.yml @@ -1,4 +1,6 @@ --- +name: Lua-format-workflow + on: workflow_run: workflows: ["Lua-format"] @@ -16,7 +18,6 @@ jobs: - name: Actions checkout uses: actions/checkout@v3 with: - repository: ${{ github.event.pull_request.head.repo.full_name }} ref: ${{ github.event.pull_request.head.ref }} token: ${{ secrets.GITHUB_TOKEN }} From 0675c55272785ef7b9ed945697e847ffb819843f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Renato=20Foot=20Guimar=C3=A3es=20Costallat?= Date: Thu, 15 Aug 2024 00:10:40 -0300 Subject: [PATCH 20/24] Add lua format workflow (#2818) Small fix to see if now it gets the changes from the PR --- .github/workflows/lua-format-workflow.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lua-format-workflow.yml b/.github/workflows/lua-format-workflow.yml index c0d9913e44f..54fdbf3130e 100644 --- a/.github/workflows/lua-format-workflow.yml +++ b/.github/workflows/lua-format-workflow.yml @@ -18,7 +18,8 @@ jobs: - name: Actions checkout uses: actions/checkout@v3 with: - ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.workflow_run.head_repository }} + ref: ${{ github.event.workflow_run.head_sha }} token: ${{ secrets.GITHUB_TOKEN }} - uses: JohnnyMorganz/stylua-action@v3 From 289f5947c0840abddbe9fe2aae42c39866f2739e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Renato=20Foot=20Guimar=C3=A3es=20Costallat?= Date: Thu, 15 Aug 2024 00:35:52 -0300 Subject: [PATCH 21/24] Remove lua format workflow (#2820) Remove the workflow as it did not work as expected. --- .github/workflows/lua-format-workflow.yml | 38 ----------------------- 1 file changed, 38 deletions(-) delete mode 100644 .github/workflows/lua-format-workflow.yml diff --git a/.github/workflows/lua-format-workflow.yml b/.github/workflows/lua-format-workflow.yml deleted file mode 100644 index 54fdbf3130e..00000000000 --- a/.github/workflows/lua-format-workflow.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Lua-format-workflow - -on: - workflow_run: - workflows: ["Lua-format"] - types: [completed] - -jobs: - on-failure: - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'failure' }} - steps: - - name: Set up Git - run: | - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git config --global user.name "GitHub Actions" - - name: Actions checkout - uses: actions/checkout@v3 - with: - repository: ${{ github.event.workflow_run.head_repository }} - ref: ${{ github.event.workflow_run.head_sha }} - token: ${{ secrets.GITHUB_TOKEN }} - - - uses: JohnnyMorganz/stylua-action@v3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - version: latest - args: . - - - name: Run add and commit - uses: EndBug/add-and-commit@v9 - with: - author_name: GitHub Actions - author_email: github-actions[bot]@users.noreply.github.com - message: "Lua code format - (Stylua)" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From e7b6e1f78319ee5c28b54da0b53637cfffb05d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Renato=20Foot=20Guimar=C3=A3es=20Costallat?= Date: Thu, 15 Aug 2024 14:05:57 -0300 Subject: [PATCH 22/24] imp: use qodana GHA (#2812) Make Qodana works on the right way now, using the Qodana Action, now it will only show the new errors and also will comment on the PR with the new errors that it finds. --- .github/workflows/analysis-qodana.yml | 77 +- CMakePresets.json | 1 + qodana-base.sarif.json | 860634 +++++++++++++++++++++++ qodana.sarif.json | 184891 ----- qodana.yml | 18 +- 5 files changed, 860694 insertions(+), 184927 deletions(-) create mode 100644 qodana-base.sarif.json delete mode 100644 qodana.sarif.json diff --git a/.github/workflows/analysis-qodana.yml b/.github/workflows/analysis-qodana.yml index 7e40d9ec1ee..a137111df3f 100644 --- a/.github/workflows/analysis-qodana.yml +++ b/.github/workflows/analysis-qodana.yml @@ -21,41 +21,48 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 - - name: Install Linux Dependencies - run: > - sudo apt-get update && sudo apt-get install ccache - linux-headers-$(uname -r) - - name: CCache - uses: hendrikmuhs/ccache-action@main - with: - max-size: "1G" - key: ccache-qodana - - - name: Restore artifacts and install vcpkg - id: vcpkg-step - run: | - vcpkgCommitId=$(grep '.builtin-baseline' vcpkg.json | awk -F: '{print $2}' | tr -d '," ') - echo "vcpkg commit ID: $vcpkgCommitId" - echo "VCPKG_GIT_COMMIT_ID=$vcpkgCommitId" >> $GITHUB_ENV - - name: Get vcpkg commit id from vcpkg.json - uses: lukka/run-vcpkg@main - with: - vcpkgGitURL: "https://github.com/microsoft/vcpkg.git" - vcpkgGitCommitId: ${{ env.VCPKG_GIT_COMMIT_ID }} + # - name: Install Linux Dependencies + # run: > + # sudo apt-get update && sudo apt-get install ccache + # linux-headers-$(uname -r) + # - name: CCache + # uses: hendrikmuhs/ccache-action@main + # with: + # max-size: "1G" + # key: ccache-qodana + + # - name: Restore artifacts and install vcpkg + # id: vcpkg-step + # run: | + # vcpkgCommitId=$(grep '.builtin-baseline' vcpkg.json | awk -F: '{print $2}' | tr -d '," ') + # echo "vcpkg commit ID: $vcpkgCommitId" + # echo "VCPKG_GIT_COMMIT_ID=$vcpkgCommitId" >> $GITHUB_ENV + # - name: Get vcpkg commit id from vcpkg.json + # uses: lukka/run-vcpkg@main + # with: + # vcpkgGitURL: "https://github.com/microsoft/vcpkg.git" + # vcpkgGitCommitId: ${{ env.VCPKG_GIT_COMMIT_ID }} + + # - name: Get latest CMake and ninja + # uses: lukka/get-cmake@main + + # - name: Run CMake + # uses: lukka/run-cmake@main + # with: + # configurePreset: linux-debug - - name: Get latest CMake and ninja - uses: lukka/get-cmake@main + # - name: Qodana Scan + # run: | + # docker run \ + # -v $(pwd):/data/project/ \ + # -v $(pwd):$(pwd) \ + # -e QODANA_TOKEN="${{ secrets.QODANA_TOKEN }}" \ + # jetbrains/qodana-clang:2024.1-eap \ + # --compile-commands ./build/linux-debug/compile_commands.json - - name: Run CMake - uses: lukka/run-cmake@main + - name: 'Qodana Scan' + uses: JetBrains/qodana-action@v2024.1 with: - configurePreset: linux-debug - - - name: Qodana Scan - run: | - docker run \ - -v $(pwd):/data/project/ \ - -v $(pwd):$(pwd) \ - -e QODANA_TOKEN="${{ secrets.QODANA_TOKEN }}" \ - jetbrains/qodana-clang:2024.1-eap \ - --compile-commands ./build/linux-debug/compile_commands.json + args: --compile-commands,./build/linux-debug/compile_commands.json,--baseline,qodana-base.sarif.json + env: + QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} diff --git a/CMakePresets.json b/CMakePresets.json index e548742e157..0bd22012bed 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -83,6 +83,7 @@ "description": "Build Debug Mode", "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_EXPORT_COMPILE_COMMANDS": "ON", "DEBUG_LOG": "ON", "SPEED_UP_BUILD_UNITY": "OFF" } diff --git a/qodana-base.sarif.json b/qodana-base.sarif.json new file mode 100644 index 00000000000..c81fa7f59ab --- /dev/null +++ b/qodana-base.sarif.json @@ -0,0 +1,860634 @@ +{ + "$schema": "https://raw.githubusercontent.com/schemastore/schemastore/master/src/schemas/json/sarif-2.1.0-rtm.5.json", + "version": "2.1.0", + "runs": [ + { + "tool": { + "driver": { + "name": "QDCL", + "fullName": "Qodana for C/C++", + "version": "2024.1.2140.46", + "rules": [ + { + "id": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "name": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "shortDescription": { + "text": "pro-bounds-pointer-arithmetic" + }, + "fullDescription": { + "text": "pro-bounds-pointer-arithmetic" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.security.ReturnPtrRange", + "name": "clang-analyzer-alpha.security.ReturnPtrRange", + "shortDescription": { + "text": "ReturnPtrRange" + }, + "fullDescription": { + "text": "ReturnPtrRange" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.security", + "index": 2, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-16-7", + "name": "clion-misra-c2012-16-7", + "shortDescription": { + "text": "misra-c2012-16-7" + }, + "fullDescription": { + "text": "misra-c2012-16-7" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-12-2", + "name": "clion-misra-c2012-12-2", + "shortDescription": { + "text": "misra-c2012-12-2" + }, + "fullDescription": { + "text": "misra-c2012-12-2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.core.C11Lock", + "name": "clang-analyzer-alpha.core.C11Lock", + "shortDescription": { + "text": "C11Lock" + }, + "fullDescription": { + "text": "C11Lock" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.core", + "index": 4, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "google-readability-namespace-comments", + "name": "google-readability-namespace-comments", + "shortDescription": { + "text": "readability-namespace-comments" + }, + "fullDescription": { + "text": "readability-namespace-comments" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "google", + "index": 5, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-noexcept-move-operations", + "name": "cppcoreguidelines-noexcept-move-operations", + "shortDescription": { + "text": "noexcept-move-operations" + }, + "fullDescription": { + "text": "noexcept-move-operations" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-15-3-5", + "name": "clion-misra-cpp2008-15-3-5", + "shortDescription": { + "text": "misra-cpp2008-15-3-5" + }, + "fullDescription": { + "text": "misra-cpp2008-15-3-5" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "llvmlibc-restrict-system-libc-headers", + "name": "llvmlibc-restrict-system-libc-headers", + "shortDescription": { + "text": "restrict-system-libc-headers" + }, + "fullDescription": { + "text": "restrict-system-libc-headers" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "llvmlibc", + "index": 6, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.cplusplus.IteratorRange", + "name": "clang-analyzer-alpha.cplusplus.IteratorRange", + "shortDescription": { + "text": "IteratorRange" + }, + "fullDescription": { + "text": "IteratorRange" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.cplusplus", + "index": 7, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "performance-no-automatic-move", + "name": "performance-no-automatic-move", + "shortDescription": { + "text": "no-automatic-move" + }, + "fullDescription": { + "text": "no-automatic-move" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "performance", + "index": 8, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-use-equals-default", + "name": "modernize-use-equals-default", + "shortDescription": { + "text": "use-equals-default" + }, + "fullDescription": { + "text": "use-equals-default" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-redundant-declaration", + "name": "readability-redundant-declaration", + "shortDescription": { + "text": "redundant-declaration" + }, + "fullDescription": { + "text": "redundant-declaration" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-5-0-14", + "name": "clion-misra-cpp2008-5-0-14", + "shortDescription": { + "text": "misra-cpp2008-5-0-14" + }, + "fullDescription": { + "text": "misra-cpp2008-5-0-14" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "fuchsia-header-anon-namespaces", + "name": "fuchsia-header-anon-namespaces", + "shortDescription": { + "text": "header-anon-namespaces" + }, + "fullDescription": { + "text": "header-anon-namespaces" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "fuchsia", + "index": 11, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-security.insecureAPI.gets", + "name": "clang-analyzer-security.insecureAPI.gets", + "shortDescription": { + "text": "gets" + }, + "fullDescription": { + "text": "gets" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "security.insecureAPI", + "index": 12, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-virtual-call-in-ctor-or-dtor", + "name": "clion-virtual-call-in-ctor-or-dtor", + "shortDescription": { + "text": "virtual-call-in-ctor-or-dtor" + }, + "fullDescription": { + "text": "virtual-call-in-ctor-or-dtor" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-noexcept-move", + "name": "hicpp-noexcept-move", + "shortDescription": { + "text": "noexcept-move" + }, + "fullDescription": { + "text": "noexcept-move" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-msc54-cpp", + "name": "cert-msc54-cpp", + "shortDescription": { + "text": "msc54-cpp" + }, + "fullDescription": { + "text": "msc54-cpp" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.cocoa.SelfInit", + "name": "clang-analyzer-osx.cocoa.SelfInit", + "shortDescription": { + "text": "SelfInit" + }, + "fullDescription": { + "text": "SelfInit" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx.cocoa", + "index": 15, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "llvm-header-guard", + "name": "llvm-header-guard", + "shortDescription": { + "text": "header-guard" + }, + "fullDescription": { + "text": "header-guard" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "llvm", + "index": 16, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "performance-trivially-destructible", + "name": "performance-trivially-destructible", + "shortDescription": { + "text": "trivially-destructible" + }, + "fullDescription": { + "text": "trivially-destructible" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "performance", + "index": 8, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-inconsistent-declaration-parameter-name", + "name": "readability-inconsistent-declaration-parameter-name", + "shortDescription": { + "text": "inconsistent-declaration-parameter-name" + }, + "fullDescription": { + "text": "inconsistent-declaration-parameter-name" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-security.insecureAPI.strcpy", + "name": "clang-analyzer-security.insecureAPI.strcpy", + "shortDescription": { + "text": "strcpy" + }, + "fullDescription": { + "text": "strcpy" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "security.insecureAPI", + "index": 12, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-dcl59-cpp", + "name": "cert-dcl59-cpp", + "shortDescription": { + "text": "dcl59-cpp" + }, + "fullDescription": { + "text": "dcl59-cpp" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "performance-inefficient-string-concatenation", + "name": "performance-inefficient-string-concatenation", + "shortDescription": { + "text": "inefficient-string-concatenation" + }, + "fullDescription": { + "text": "inefficient-string-concatenation" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "performance", + "index": 8, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-pos47-c", + "name": "cert-pos47-c", + "shortDescription": { + "text": "pos47-c" + }, + "fullDescription": { + "text": "pos47-c" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-10-2", + "name": "clion-misra-c2012-10-2", + "shortDescription": { + "text": "misra-c2012-10-2" + }, + "fullDescription": { + "text": "misra-c2012-10-2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.osx.cocoa.localizability.PluralMisuseChecker", + "name": "clang-analyzer-alpha.osx.cocoa.localizability.PluralMisuseChecker", + "shortDescription": { + "text": "PluralMisuseChecker" + }, + "fullDescription": { + "text": "PluralMisuseChecker" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.osx.cocoa.localizability", + "index": 17, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-uppercase-literal-suffix", + "name": "hicpp-uppercase-literal-suffix", + "shortDescription": { + "text": "uppercase-literal-suffix" + }, + "fullDescription": { + "text": "uppercase-literal-suffix" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-7-3-4", + "name": "clion-misra-cpp2008-7-3-4", + "shortDescription": { + "text": "misra-cpp2008-7-3-4" + }, + "fullDescription": { + "text": "misra-cpp2008-7-3-4" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-make-shared", + "name": "modernize-make-shared", + "shortDescription": { + "text": "make-shared" + }, + "fullDescription": { + "text": "make-shared" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "zircon-temporary-objects", + "name": "zircon-temporary-objects", + "shortDescription": { + "text": "temporary-objects" + }, + "fullDescription": { + "text": "temporary-objects" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "zircon", + "index": 18, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "boost-use-to-string", + "name": "boost-use-to-string", + "shortDescription": { + "text": "use-to-string" + }, + "fullDescription": { + "text": "use-to-string" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "boost", + "index": 19, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-exp42-c", + "name": "cert-exp42-c", + "shortDescription": { + "text": "exp42-c" + }, + "fullDescription": { + "text": "exp42-c" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "abseil-string-find-startswith", + "name": "abseil-string-find-startswith", + "shortDescription": { + "text": "string-find-startswith" + }, + "fullDescription": { + "text": "string-find-startswith" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "abseil", + "index": 20, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-11-5", + "name": "clion-misra-c2012-11-5", + "shortDescription": { + "text": "misra-c2012-11-5" + }, + "fullDescription": { + "text": "misra-c2012-11-5" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-11-7", + "name": "clion-misra-c2012-11-7", + "shortDescription": { + "text": "misra-c2012-11-7" + }, + "fullDescription": { + "text": "misra-c2012-11-7" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-avoid-reference-coroutine-parameters", + "name": "cppcoreguidelines-avoid-reference-coroutine-parameters", + "shortDescription": { + "text": "avoid-reference-coroutine-parameters" + }, + "fullDescription": { + "text": "avoid-reference-coroutine-parameters" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "google-objc-avoid-nsobject-new", + "name": "google-objc-avoid-nsobject-new", + "shortDescription": { + "text": "objc-avoid-nsobject-new" + }, + "fullDescription": { + "text": "objc-avoid-nsobject-new" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "google", + "index": 5, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.unix.SimpleStream", + "name": "clang-analyzer-alpha.unix.SimpleStream", + "shortDescription": { + "text": "SimpleStream" + }, + "fullDescription": { + "text": "SimpleStream" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.unix", + "index": 21, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "google-objc-global-variable-declaration", + "name": "google-objc-global-variable-declaration", + "shortDescription": { + "text": "objc-global-variable-declaration" + }, + "fullDescription": { + "text": "objc-global-variable-declaration" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "google", + "index": 5, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.cplusplus.InvalidatedIterator", + "name": "clang-analyzer-alpha.cplusplus.InvalidatedIterator", + "shortDescription": { + "text": "InvalidatedIterator" + }, + "fullDescription": { + "text": "InvalidatedIterator" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.cplusplus", + "index": 7, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-2-13-2", + "name": "clion-misra-cpp2008-2-13-2", + "shortDescription": { + "text": "misra-cpp2008-2-13-2" + }, + "fullDescription": { + "text": "misra-cpp2008-2-13-2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.osx.cocoa.InstanceVariableInvalidation", + "name": "clang-analyzer-alpha.osx.cocoa.InstanceVariableInvalidation", + "shortDescription": { + "text": "InstanceVariableInvalidation" + }, + "fullDescription": { + "text": "InstanceVariableInvalidation" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.osx.cocoa", + "index": 22, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "fuchsia-statically-constructed-objects", + "name": "fuchsia-statically-constructed-objects", + "shortDescription": { + "text": "statically-constructed-objects" + }, + "fullDescription": { + "text": "statically-constructed-objects" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "fuchsia", + "index": 11, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-suspicious-realloc-usage", + "name": "bugprone-suspicious-realloc-usage", + "shortDescription": { + "text": "suspicious-realloc-usage" + }, + "fullDescription": { + "text": "suspicious-realloc-usage" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-move-const-arg", + "name": "hicpp-move-const-arg", + "shortDescription": { + "text": "move-const-arg" + }, + "fullDescription": { + "text": "move-const-arg" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.ObjCProperty", + "name": "clang-analyzer-osx.ObjCProperty", + "shortDescription": { + "text": "ObjCProperty" + }, + "fullDescription": { + "text": "ObjCProperty" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx", + "index": 24, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-8-0-1", + "name": "clion-misra-cpp2008-8-0-1", + "shortDescription": { + "text": "misra-cpp2008-8-0-1" + }, + "fullDescription": { + "text": "misra-cpp2008-8-0-1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-dcl16-c", + "name": "cert-dcl16-c", + "shortDescription": { + "text": "dcl16-c" + }, + "fullDescription": { + "text": "dcl16-c" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.OSObjectRetainCount", + "name": "clang-analyzer-osx.OSObjectRetainCount", + "shortDescription": { + "text": "OSObjectRetainCount" + }, + "fullDescription": { + "text": "OSObjectRetainCount" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx", + "index": 24, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-optin.mpi.MPI-Checker", + "name": "clang-analyzer-optin.mpi.MPI-Checker", + "shortDescription": { + "text": "MPI-Checker" + }, + "fullDescription": { + "text": "MPI-Checker" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "optin.mpi", + "index": 25, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "performance-inefficient-vector-operation", + "name": "performance-inefficient-vector-operation", + "shortDescription": { + "text": "inefficient-vector-operation" + }, + "fullDescription": { + "text": "inefficient-vector-operation" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "performance", + "index": 8, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-7-3-1", + "name": "clion-misra-cpp2008-7-3-1", + "shortDescription": { + "text": "misra-cpp2008-7-3-1" + }, + "fullDescription": { + "text": "misra-cpp2008-7-3-1" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "llvm-else-after-return", + "name": "llvm-else-after-return", + "shortDescription": { + "text": "else-after-return" + }, + "fullDescription": { + "text": "else-after-return" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "llvm", + "index": 16, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-unix.StdCLibraryFunctions", + "name": "clang-analyzer-unix.StdCLibraryFunctions", + "shortDescription": { + "text": "StdCLibraryFunctions" + }, + "fullDescription": { + "text": "StdCLibraryFunctions" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "unix", + "index": 26, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "llvmlibc-inline-function-decl", + "name": "llvmlibc-inline-function-decl", + "shortDescription": { + "text": "inline-function-decl" + }, + "fullDescription": { + "text": "inline-function-decl" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "llvmlibc", + "index": 6, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "misc-uniqueptr-reset-release", + "name": "misc-uniqueptr-reset-release", + "shortDescription": { + "text": "uniqueptr-reset-release" + }, + "fullDescription": { + "text": "uniqueptr-reset-release" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "misc", + "index": 27, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-6-4-4", + "name": "clion-misra-cpp2008-6-4-4", + "shortDescription": { + "text": "misra-cpp2008-6-4-4" + }, + "fullDescription": { + "text": "misra-cpp2008-6-4-4" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-5-8-1", + "name": "clion-misra-cpp2008-5-8-1", + "shortDescription": { + "text": "misra-cpp2008-5-8-1" + }, + "fullDescription": { + "text": "misra-cpp2008-5-8-1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "android-cloexec-socket", + "name": "android-cloexec-socket", + "shortDescription": { + "text": "cloexec-socket" + }, + "fullDescription": { + "text": "cloexec-socket" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "android", + "index": 28, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-deprecated-headers", + "name": "modernize-deprecated-headers", + "shortDescription": { + "text": "deprecated-headers" + }, + "fullDescription": { + "text": "deprecated-headers" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-use-bool-literals", + "name": "modernize-use-bool-literals", + "shortDescription": { + "text": "use-bool-literals" + }, + "fullDescription": { + "text": "use-bool-literals" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-misplaced-array-index", + "name": "readability-misplaced-array-index", + "shortDescription": { + "text": "misplaced-array-index" + }, + "fullDescription": { + "text": "misplaced-array-index" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-21-9", + "name": "clion-misra-c2012-21-9", + "shortDescription": { + "text": "misra-c2012-21-9" + }, + "fullDescription": { + "text": "misra-c2012-21-9" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-8-4-1", + "name": "clion-misra-cpp2008-8-4-1", + "shortDescription": { + "text": "misra-cpp2008-8-4-1" + }, + "fullDescription": { + "text": "misra-cpp2008-8-4-1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-optional-value-conversion", + "name": "bugprone-optional-value-conversion", + "shortDescription": { + "text": "optional-value-conversion" + }, + "fullDescription": { + "text": "optional-value-conversion" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-con36-c", + "name": "cert-con36-c", + "shortDescription": { + "text": "con36-c" + }, + "fullDescription": { + "text": "con36-c" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.coreFoundation.CFError", + "name": "clang-analyzer-osx.coreFoundation.CFError", + "shortDescription": { + "text": "CFError" + }, + "fullDescription": { + "text": "CFError" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx.coreFoundation", + "index": 29, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-cplusplus.Move", + "name": "clang-analyzer-cplusplus.Move", + "shortDescription": { + "text": "Move" + }, + "fullDescription": { + "text": "Move" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cplusplus", + "index": 30, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-unix.cstring.BadSizeArg", + "name": "clang-analyzer-unix.cstring.BadSizeArg", + "shortDescription": { + "text": "BadSizeArg" + }, + "fullDescription": { + "text": "BadSizeArg" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "unix.cstring", + "index": 31, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "android-cloexec-pipe", + "name": "android-cloexec-pipe", + "shortDescription": { + "text": "cloexec-pipe" + }, + "fullDescription": { + "text": "cloexec-pipe" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "android", + "index": 28, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-bool-pointer-implicit-conversion", + "name": "bugprone-bool-pointer-implicit-conversion", + "shortDescription": { + "text": "bool-pointer-implicit-conversion" + }, + "fullDescription": { + "text": "bool-pointer-implicit-conversion" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-18-8", + "name": "clion-misra-c2012-18-8", + "shortDescription": { + "text": "misra-c2012-18-8" + }, + "fullDescription": { + "text": "misra-c2012-18-8" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-apiModeling.llvm.CastValue", + "name": "clang-analyzer-apiModeling.llvm.CastValue", + "shortDescription": { + "text": "CastValue" + }, + "fullDescription": { + "text": "CastValue" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "apiModeling.llvm", + "index": 32, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "altera-id-dependent-backward-branch", + "name": "altera-id-dependent-backward-branch", + "shortDescription": { + "text": "id-dependent-backward-branch" + }, + "fullDescription": { + "text": "id-dependent-backward-branch" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "altera", + "index": 33, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-deprecated-ios-base-aliases", + "name": "modernize-deprecated-ios-base-aliases", + "shortDescription": { + "text": "deprecated-ios-base-aliases" + }, + "fullDescription": { + "text": "deprecated-ios-base-aliases" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-18-5", + "name": "clion-misra-c2012-18-5", + "shortDescription": { + "text": "misra-c2012-18-5" + }, + "fullDescription": { + "text": "misra-c2012-18-5" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-throw-keyword-missing", + "name": "bugprone-throw-keyword-missing", + "shortDescription": { + "text": "throw-keyword-missing" + }, + "fullDescription": { + "text": "throw-keyword-missing" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-use-using", + "name": "modernize-use-using", + "shortDescription": { + "text": "use-using" + }, + "fullDescription": { + "text": "use-using" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "android-cloexec-epoll-create1", + "name": "android-cloexec-epoll-create1", + "shortDescription": { + "text": "cloexec-epoll-create1" + }, + "fullDescription": { + "text": "cloexec-epoll-create1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "android", + "index": 28, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-avoid-bind", + "name": "modernize-avoid-bind", + "shortDescription": { + "text": "avoid-bind" + }, + "fullDescription": { + "text": "avoid-bind" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "google-runtime-operator", + "name": "google-runtime-operator", + "shortDescription": { + "text": "runtime-operator" + }, + "fullDescription": { + "text": "runtime-operator" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "google", + "index": 5, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "misc-header-include-cycle", + "name": "misc-header-include-cycle", + "shortDescription": { + "text": "header-include-cycle" + }, + "fullDescription": { + "text": "header-include-cycle" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "misc", + "index": 27, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-use-equals-default", + "name": "hicpp-use-equals-default", + "shortDescription": { + "text": "use-equals-default" + }, + "fullDescription": { + "text": "use-equals-default" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.core.FixedAddr", + "name": "clang-analyzer-alpha.core.FixedAddr", + "shortDescription": { + "text": "FixedAddr" + }, + "fullDescription": { + "text": "FixedAddr" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.core", + "index": 4, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-redundant-smartptr-get", + "name": "readability-redundant-smartptr-get", + "shortDescription": { + "text": "redundant-smartptr-get" + }, + "fullDescription": { + "text": "redundant-smartptr-get" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-err52-cpp", + "name": "cert-err52-cpp", + "shortDescription": { + "text": "err52-cpp" + }, + "fullDescription": { + "text": "err52-cpp" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-12-8-2", + "name": "clion-misra-cpp2008-12-8-2", + "shortDescription": { + "text": "misra-cpp2008-12-8-2" + }, + "fullDescription": { + "text": "misra-cpp2008-12-8-2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-move-forwarding-reference", + "name": "bugprone-move-forwarding-reference", + "shortDescription": { + "text": "move-forwarding-reference" + }, + "fullDescription": { + "text": "move-forwarding-reference" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "google-readability-braces-around-statements", + "name": "google-readability-braces-around-statements", + "shortDescription": { + "text": "readability-braces-around-statements" + }, + "fullDescription": { + "text": "readability-braces-around-statements" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "google", + "index": 5, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-redundant-string-cstr", + "name": "readability-redundant-string-cstr", + "shortDescription": { + "text": "redundant-string-cstr" + }, + "fullDescription": { + "text": "redundant-string-cstr" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-string-constructor", + "name": "bugprone-string-constructor", + "shortDescription": { + "text": "string-constructor" + }, + "fullDescription": { + "text": "string-constructor" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-17-7", + "name": "clion-misra-c2012-17-7", + "shortDescription": { + "text": "misra-c2012-17-7" + }, + "fullDescription": { + "text": "misra-c2012-17-7" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "altera-struct-pack-align", + "name": "altera-struct-pack-align", + "shortDescription": { + "text": "struct-pack-align" + }, + "fullDescription": { + "text": "struct-pack-align" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "altera", + "index": 33, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-5-0-5", + "name": "clion-misra-cpp2008-5-0-5", + "shortDescription": { + "text": "misra-cpp2008-5-0-5" + }, + "fullDescription": { + "text": "misra-cpp2008-5-0-5" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "google-explicit-constructor", + "name": "google-explicit-constructor", + "shortDescription": { + "text": "explicit-constructor" + }, + "fullDescription": { + "text": "explicit-constructor" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "google", + "index": 5, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-use-equals-delete", + "name": "hicpp-use-equals-delete", + "shortDescription": { + "text": "use-equals-delete" + }, + "fullDescription": { + "text": "use-equals-delete" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-reserved-identifier", + "name": "bugprone-reserved-identifier", + "shortDescription": { + "text": "reserved-identifier" + }, + "fullDescription": { + "text": "reserved-identifier" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-signal-handler", + "name": "bugprone-signal-handler", + "shortDescription": { + "text": "signal-handler" + }, + "fullDescription": { + "text": "signal-handler" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-pos44-c", + "name": "cert-pos44-c", + "shortDescription": { + "text": "pos44-c" + }, + "fullDescription": { + "text": "pos44-c" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-sig30-c", + "name": "cert-sig30-c", + "shortDescription": { + "text": "sig30-c" + }, + "fullDescription": { + "text": "sig30-c" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-misleading-capture-default-by-value", + "name": "cppcoreguidelines-misleading-capture-default-by-value", + "shortDescription": { + "text": "misleading-capture-default-by-value" + }, + "fullDescription": { + "text": "misleading-capture-default-by-value" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "abseil-string-find-str-contains", + "name": "abseil-string-find-str-contains", + "shortDescription": { + "text": "string-find-str-contains" + }, + "fullDescription": { + "text": "string-find-str-contains" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "abseil", + "index": 20, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-avoid-goto", + "name": "hicpp-avoid-goto", + "shortDescription": { + "text": "avoid-goto" + }, + "fullDescription": { + "text": "avoid-goto" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-narrowing-conversions", + "name": "cppcoreguidelines-narrowing-conversions", + "shortDescription": { + "text": "narrowing-conversions" + }, + "fullDescription": { + "text": "narrowing-conversions" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-6-2-1", + "name": "clion-misra-cpp2008-6-2-1", + "shortDescription": { + "text": "misra-cpp2008-6-2-1" + }, + "fullDescription": { + "text": "misra-cpp2008-6-2-1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-3-1-3", + "name": "clion-misra-cpp2008-3-1-3", + "shortDescription": { + "text": "misra-cpp2008-3-1-3" + }, + "fullDescription": { + "text": "misra-cpp2008-3-1-3" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-use-override", + "name": "hicpp-use-override", + "shortDescription": { + "text": "use-override" + }, + "fullDescription": { + "text": "use-override" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-noexcept-swap", + "name": "cppcoreguidelines-noexcept-swap", + "shortDescription": { + "text": "noexcept-swap" + }, + "fullDescription": { + "text": "noexcept-swap" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.cplusplus.ContainerModeling", + "name": "clang-analyzer-alpha.cplusplus.ContainerModeling", + "shortDescription": { + "text": "ContainerModeling" + }, + "fullDescription": { + "text": "ContainerModeling" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.cplusplus", + "index": 7, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-fuchsia.HandleChecker", + "name": "clang-analyzer-fuchsia.HandleChecker", + "shortDescription": { + "text": "HandleChecker" + }, + "fullDescription": { + "text": "HandleChecker" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "fuchsia", + "index": 11, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-7-3", + "name": "clion-misra-c2012-7-3", + "shortDescription": { + "text": "misra-c2012-7-3" + }, + "fullDescription": { + "text": "misra-c2012-7-3" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-redundant-casting", + "name": "readability-redundant-casting", + "shortDescription": { + "text": "redundant-casting" + }, + "fullDescription": { + "text": "redundant-casting" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-18-0-2", + "name": "clion-misra-cpp2008-18-0-2", + "shortDescription": { + "text": "misra-cpp2008-18-0-2" + }, + "fullDescription": { + "text": "misra-cpp2008-18-0-2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-assert-side-effect", + "name": "bugprone-assert-side-effect", + "shortDescription": { + "text": "assert-side-effect" + }, + "fullDescription": { + "text": "assert-side-effect" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-8-12", + "name": "clion-misra-c2012-8-12", + "shortDescription": { + "text": "misra-c2012-8-12" + }, + "fullDescription": { + "text": "misra-c2012-8-12" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "llvmlibc-implementation-in-namespace", + "name": "llvmlibc-implementation-in-namespace", + "shortDescription": { + "text": "implementation-in-namespace" + }, + "fullDescription": { + "text": "implementation-in-namespace" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "llvmlibc", + "index": 6, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "misc-unused-alias-decls", + "name": "misc-unused-alias-decls", + "shortDescription": { + "text": "unused-alias-decls" + }, + "fullDescription": { + "text": "unused-alias-decls" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "misc", + "index": 27, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "mpi-type-mismatch", + "name": "mpi-type-mismatch", + "shortDescription": { + "text": "type-mismatch" + }, + "fullDescription": { + "text": "type-mismatch" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "mpi", + "index": 34, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "abseil-upgrade-duration-conversions", + "name": "abseil-upgrade-duration-conversions", + "shortDescription": { + "text": "upgrade-duration-conversions" + }, + "fullDescription": { + "text": "upgrade-duration-conversions" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "abseil", + "index": 20, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-signed-char-misuse", + "name": "bugprone-signed-char-misuse", + "shortDescription": { + "text": "signed-char-misuse" + }, + "fullDescription": { + "text": "signed-char-misuse" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-redundant-preprocessor", + "name": "readability-redundant-preprocessor", + "shortDescription": { + "text": "redundant-preprocessor" + }, + "fullDescription": { + "text": "redundant-preprocessor" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-unsafe-functions", + "name": "bugprone-unsafe-functions", + "shortDescription": { + "text": "unsafe-functions" + }, + "fullDescription": { + "text": "unsafe-functions" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-use-default-member-init", + "name": "cppcoreguidelines-use-default-member-init", + "shortDescription": { + "text": "use-default-member-init" + }, + "fullDescription": { + "text": "use-default-member-init" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-21-7", + "name": "clion-misra-c2012-21-7", + "shortDescription": { + "text": "misra-c2012-21-7" + }, + "fullDescription": { + "text": "misra-c2012-21-7" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "android-comparison-in-temp-failure-retry", + "name": "android-comparison-in-temp-failure-retry", + "shortDescription": { + "text": "comparison-in-temp-failure-retry" + }, + "fullDescription": { + "text": "comparison-in-temp-failure-retry" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "android", + "index": 28, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-use-std-print", + "name": "modernize-use-std-print", + "shortDescription": { + "text": "use-std-print" + }, + "fullDescription": { + "text": "use-std-print" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-core.uninitialized.NewArraySize", + "name": "clang-analyzer-core.uninitialized.NewArraySize", + "shortDescription": { + "text": "NewArraySize" + }, + "fullDescription": { + "text": "NewArraySize" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "core.uninitialized", + "index": 35, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "android-cloexec-accept4", + "name": "android-cloexec-accept4", + "shortDescription": { + "text": "cloexec-accept4" + }, + "fullDescription": { + "text": "cloexec-accept4" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "android", + "index": 28, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-concat-nested-namespaces", + "name": "modernize-concat-nested-namespaces", + "shortDescription": { + "text": "concat-nested-namespaces" + }, + "fullDescription": { + "text": "concat-nested-namespaces" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-6-5-2", + "name": "clion-misra-cpp2008-6-5-2", + "shortDescription": { + "text": "misra-cpp2008-6-5-2" + }, + "fullDescription": { + "text": "misra-cpp2008-6-5-2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-9-6-4", + "name": "clion-misra-cpp2008-9-6-4", + "shortDescription": { + "text": "misra-cpp2008-9-6-4" + }, + "fullDescription": { + "text": "misra-cpp2008-9-6-4" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-core.builtin.NoReturnFunctions", + "name": "clang-analyzer-core.builtin.NoReturnFunctions", + "shortDescription": { + "text": "NoReturnFunctions" + }, + "fullDescription": { + "text": "NoReturnFunctions" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "core.builtin", + "index": 36, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-use-override", + "name": "modernize-use-override", + "shortDescription": { + "text": "use-override" + }, + "fullDescription": { + "text": "use-override" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-interfaces-global-init", + "name": "cppcoreguidelines-interfaces-global-init", + "shortDescription": { + "text": "interfaces-global-init" + }, + "fullDescription": { + "text": "interfaces-global-init" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-identifier-naming", + "name": "readability-identifier-naming", + "shortDescription": { + "text": "identifier-naming" + }, + "fullDescription": { + "text": "identifier-naming" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-too-small-loop-variable", + "name": "bugprone-too-small-loop-variable", + "shortDescription": { + "text": "too-small-loop-variable" + }, + "fullDescription": { + "text": "too-small-loop-variable" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-cplusplus.PlacementNew", + "name": "clang-analyzer-cplusplus.PlacementNew", + "shortDescription": { + "text": "PlacementNew" + }, + "fullDescription": { + "text": "PlacementNew" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cplusplus", + "index": 30, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-unused-return-value", + "name": "bugprone-unused-return-value", + "shortDescription": { + "text": "unused-return-value" + }, + "fullDescription": { + "text": "unused-return-value" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-5-2-2", + "name": "clion-misra-cpp2008-5-2-2", + "shortDescription": { + "text": "misra-cpp2008-5-2-2" + }, + "fullDescription": { + "text": "misra-cpp2008-5-2-2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-core.uninitialized.UndefReturn", + "name": "clang-analyzer-core.uninitialized.UndefReturn", + "shortDescription": { + "text": "UndefReturn" + }, + "fullDescription": { + "text": "UndefReturn" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "core.uninitialized", + "index": 35, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "android-cloexec-epoll-create", + "name": "android-cloexec-epoll-create", + "shortDescription": { + "text": "cloexec-epoll-create" + }, + "fullDescription": { + "text": "cloexec-epoll-create" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "android", + "index": 28, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-signed-bitwise", + "name": "hicpp-signed-bitwise", + "shortDescription": { + "text": "signed-bitwise" + }, + "fullDescription": { + "text": "signed-bitwise" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "altera-single-work-item-barrier", + "name": "altera-single-work-item-barrier", + "shortDescription": { + "text": "single-work-item-barrier" + }, + "fullDescription": { + "text": "single-work-item-barrier" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "altera", + "index": 33, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-core.NullDereference", + "name": "clang-analyzer-core.NullDereference", + "shortDescription": { + "text": "NullDereference" + }, + "fullDescription": { + "text": "NullDereference" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "core", + "index": 37, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-inc-dec-in-conditions", + "name": "bugprone-inc-dec-in-conditions", + "shortDescription": { + "text": "inc-dec-in-conditions" + }, + "fullDescription": { + "text": "inc-dec-in-conditions" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-valist.CopyToSelf", + "name": "clang-analyzer-valist.CopyToSelf", + "shortDescription": { + "text": "CopyToSelf" + }, + "fullDescription": { + "text": "CopyToSelf" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "valist", + "index": 38, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-core.StackAddrEscapeBase", + "name": "clang-analyzer-core.StackAddrEscapeBase", + "shortDescription": { + "text": "StackAddrEscapeBase" + }, + "fullDescription": { + "text": "StackAddrEscapeBase" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "core", + "index": 37, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-13-1", + "name": "clion-misra-c2012-13-1", + "shortDescription": { + "text": "misra-c2012-13-1" + }, + "fullDescription": { + "text": "misra-c2012-13-1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-6-3-1", + "name": "clion-misra-cpp2008-6-3-1", + "shortDescription": { + "text": "misra-cpp2008-6-3-1" + }, + "fullDescription": { + "text": "misra-cpp2008-6-3-1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-core.DivideZero", + "name": "clang-analyzer-core.DivideZero", + "shortDescription": { + "text": "DivideZero" + }, + "fullDescription": { + "text": "DivideZero" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "core", + "index": 37, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-5-3-1", + "name": "clion-misra-cpp2008-5-3-1", + "shortDescription": { + "text": "misra-cpp2008-5-3-1" + }, + "fullDescription": { + "text": "misra-cpp2008-5-3-1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "misc-static-assert", + "name": "misc-static-assert", + "shortDescription": { + "text": "static-assert" + }, + "fullDescription": { + "text": "static-assert" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "misc", + "index": 27, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-dcl58-cpp", + "name": "cert-dcl58-cpp", + "shortDescription": { + "text": "dcl58-cpp" + }, + "fullDescription": { + "text": "dcl58-cpp" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-redundant-void-arg", + "name": "modernize-redundant-void-arg", + "shortDescription": { + "text": "redundant-void-arg" + }, + "fullDescription": { + "text": "redundant-void-arg" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-9-6-2", + "name": "clion-misra-cpp2008-9-6-2", + "shortDescription": { + "text": "misra-cpp2008-9-6-2" + }, + "fullDescription": { + "text": "misra-cpp2008-9-6-2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "abseil-duration-factory-float", + "name": "abseil-duration-factory-float", + "shortDescription": { + "text": "duration-factory-float" + }, + "fullDescription": { + "text": "duration-factory-float" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "abseil", + "index": 20, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-use-nullptr", + "name": "hicpp-use-nullptr", + "shortDescription": { + "text": "use-nullptr" + }, + "fullDescription": { + "text": "use-nullptr" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-string-compare", + "name": "readability-string-compare", + "shortDescription": { + "text": "string-compare" + }, + "fullDescription": { + "text": "string-compare" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-shared-ptr-array-mismatch", + "name": "bugprone-shared-ptr-array-mismatch", + "shortDescription": { + "text": "shared-ptr-array-mismatch" + }, + "fullDescription": { + "text": "shared-ptr-array-mismatch" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-unique-ptr-array-mismatch", + "name": "bugprone-unique-ptr-array-mismatch", + "shortDescription": { + "text": "unique-ptr-array-mismatch" + }, + "fullDescription": { + "text": "unique-ptr-array-mismatch" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-webkit.UncountedLambdaCapturesChecker", + "name": "clang-analyzer-webkit.UncountedLambdaCapturesChecker", + "shortDescription": { + "text": "UncountedLambdaCapturesChecker" + }, + "fullDescription": { + "text": "UncountedLambdaCapturesChecker" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "webkit", + "index": 39, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "misc-non-copyable-objects", + "name": "misc-non-copyable-objects", + "shortDescription": { + "text": "non-copyable-objects" + }, + "fullDescription": { + "text": "non-copyable-objects" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "misc", + "index": 27, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "objc-nsdate-formatter", + "name": "objc-nsdate-formatter", + "shortDescription": { + "text": "nsdate-formatter" + }, + "fullDescription": { + "text": "nsdate-formatter" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "objc", + "index": 40, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-core.CallAndMessageModeling", + "name": "clang-analyzer-core.CallAndMessageModeling", + "shortDescription": { + "text": "CallAndMessageModeling" + }, + "fullDescription": { + "text": "CallAndMessageModeling" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "core", + "index": 37, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.API", + "name": "clang-analyzer-osx.API", + "shortDescription": { + "text": "API" + }, + "fullDescription": { + "text": "API" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx", + "index": 24, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-multiple-new-in-one-expression", + "name": "bugprone-multiple-new-in-one-expression", + "shortDescription": { + "text": "multiple-new-in-one-expression" + }, + "fullDescription": { + "text": "multiple-new-in-one-expression" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-17-6", + "name": "clion-misra-c2012-17-6", + "shortDescription": { + "text": "misra-c2012-17-6" + }, + "fullDescription": { + "text": "misra-c2012-17-6" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-preprocessor-comment-check", + "name": "clion-preprocessor-comment-check", + "shortDescription": { + "text": "preprocessor-comment-check" + }, + "fullDescription": { + "text": "preprocessor-comment-check" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "misc-non-private-member-variables-in-classes", + "name": "misc-non-private-member-variables-in-classes", + "shortDescription": { + "text": "non-private-member-variables-in-classes" + }, + "fullDescription": { + "text": "non-private-member-variables-in-classes" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "misc", + "index": 27, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "android-cloexec-dup", + "name": "android-cloexec-dup", + "shortDescription": { + "text": "cloexec-dup" + }, + "fullDescription": { + "text": "cloexec-dup" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "android", + "index": 28, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-avoid-unconditional-preprocessor-if", + "name": "readability-avoid-unconditional-preprocessor-if", + "shortDescription": { + "text": "avoid-unconditional-preprocessor-if" + }, + "fullDescription": { + "text": "avoid-unconditional-preprocessor-if" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "performance-move-constructor-init", + "name": "performance-move-constructor-init", + "shortDescription": { + "text": "move-constructor-init" + }, + "fullDescription": { + "text": "move-constructor-init" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "performance", + "index": 8, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-pro-type-cstyle-cast", + "name": "cppcoreguidelines-pro-type-cstyle-cast", + "shortDescription": { + "text": "pro-type-cstyle-cast" + }, + "fullDescription": { + "text": "pro-type-cstyle-cast" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-17-3", + "name": "clion-misra-c2012-17-3", + "shortDescription": { + "text": "misra-c2012-17-3" + }, + "fullDescription": { + "text": "misra-c2012-17-3" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.security.MallocOverflow", + "name": "clang-analyzer-alpha.security.MallocOverflow", + "shortDescription": { + "text": "MallocOverflow" + }, + "fullDescription": { + "text": "MallocOverflow" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.security", + "index": 2, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-simplify", + "name": "clion-simplify", + "shortDescription": { + "text": "simplify" + }, + "fullDescription": { + "text": "simplify" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "fuchsia-overloaded-operator", + "name": "fuchsia-overloaded-operator", + "shortDescription": { + "text": "overloaded-operator" + }, + "fullDescription": { + "text": "overloaded-operator" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "fuchsia", + "index": 11, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-container-contains", + "name": "readability-container-contains", + "shortDescription": { + "text": "container-contains" + }, + "fullDescription": { + "text": "container-contains" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-empty-catch", + "name": "bugprone-empty-catch", + "shortDescription": { + "text": "empty-catch" + }, + "fullDescription": { + "text": "empty-catch" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-redundant-control-flow", + "name": "readability-redundant-control-flow", + "shortDescription": { + "text": "redundant-control-flow" + }, + "fullDescription": { + "text": "redundant-control-flow" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-8-11", + "name": "clion-misra-c2012-8-11", + "shortDescription": { + "text": "misra-c2012-8-11" + }, + "fullDescription": { + "text": "misra-c2012-8-11" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-static-definition-in-anonymous-namespace", + "name": "readability-static-definition-in-anonymous-namespace", + "shortDescription": { + "text": "static-definition-in-anonymous-namespace" + }, + "fullDescription": { + "text": "static-definition-in-anonymous-namespace" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-braces-around-statements", + "name": "readability-braces-around-statements", + "shortDescription": { + "text": "braces-around-statements" + }, + "fullDescription": { + "text": "braces-around-statements" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-undefined-memory-manipulation", + "name": "bugprone-undefined-memory-manipulation", + "shortDescription": { + "text": "undefined-memory-manipulation" + }, + "fullDescription": { + "text": "undefined-memory-manipulation" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-infinite-loop", + "name": "bugprone-infinite-loop", + "shortDescription": { + "text": "infinite-loop" + }, + "fullDescription": { + "text": "infinite-loop" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-10-3-2", + "name": "clion-misra-cpp2008-10-3-2", + "shortDescription": { + "text": "misra-cpp2008-10-3-2" + }, + "fullDescription": { + "text": "misra-cpp2008-10-3-2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "android-cloexec-memfd-create", + "name": "android-cloexec-memfd-create", + "shortDescription": { + "text": "cloexec-memfd-create" + }, + "fullDescription": { + "text": "cloexec-memfd-create" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "android", + "index": 28, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-string-literal-with-embedded-nul", + "name": "bugprone-string-literal-with-embedded-nul", + "shortDescription": { + "text": "string-literal-with-embedded-nul" + }, + "fullDescription": { + "text": "string-literal-with-embedded-nul" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.llvm.Conventions", + "name": "clang-analyzer-alpha.llvm.Conventions", + "shortDescription": { + "text": "Conventions" + }, + "fullDescription": { + "text": "Conventions" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.llvm", + "index": 41, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "google-readability-avoid-underscore-in-googletest-name", + "name": "google-readability-avoid-underscore-in-googletest-name", + "shortDescription": { + "text": "readability-avoid-underscore-in-googletest-name" + }, + "fullDescription": { + "text": "readability-avoid-underscore-in-googletest-name" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "google", + "index": 5, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.cocoa.RetainCountBase", + "name": "clang-analyzer-osx.cocoa.RetainCountBase", + "shortDescription": { + "text": "RetainCountBase" + }, + "fullDescription": { + "text": "RetainCountBase" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx.cocoa", + "index": 15, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-11-9", + "name": "clion-misra-c2012-11-9", + "shortDescription": { + "text": "misra-c2012-11-9" + }, + "fullDescription": { + "text": "misra-c2012-11-9" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-cplusplus.SmartPtrModeling", + "name": "clang-analyzer-cplusplus.SmartPtrModeling", + "shortDescription": { + "text": "SmartPtrModeling" + }, + "fullDescription": { + "text": "SmartPtrModeling" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cplusplus", + "index": 30, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-non-zero-enum-to-bool-conversion", + "name": "bugprone-non-zero-enum-to-bool-conversion", + "shortDescription": { + "text": "non-zero-enum-to-bool-conversion" + }, + "fullDescription": { + "text": "non-zero-enum-to-bool-conversion" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.security.ArrayBoundV2", + "name": "clang-analyzer-alpha.security.ArrayBoundV2", + "shortDescription": { + "text": "ArrayBoundV2" + }, + "fullDescription": { + "text": "ArrayBoundV2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.security", + "index": 2, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-nullability.NullableReturnedFromNonnull", + "name": "clang-analyzer-nullability.NullableReturnedFromNonnull", + "shortDescription": { + "text": "NullableReturnedFromNonnull" + }, + "fullDescription": { + "text": "NullableReturnedFromNonnull" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "nullability", + "index": 42, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-8-2", + "name": "clion-misra-c2012-8-2", + "shortDescription": { + "text": "misra-c2012-8-2" + }, + "fullDescription": { + "text": "misra-c2012-8-2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-con54-cpp", + "name": "cert-con54-cpp", + "shortDescription": { + "text": "con54-cpp" + }, + "fullDescription": { + "text": "con54-cpp" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-pro-type-vararg", + "name": "cppcoreguidelines-pro-type-vararg", + "shortDescription": { + "text": "pro-type-vararg" + }, + "fullDescription": { + "text": "pro-type-vararg" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-5-0-4", + "name": "clion-misra-cpp2008-5-0-4", + "shortDescription": { + "text": "misra-cpp2008-5-0-4" + }, + "fullDescription": { + "text": "misra-cpp2008-5-0-4" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-11-2", + "name": "clion-misra-c2012-11-2", + "shortDescription": { + "text": "misra-c2012-11-2" + }, + "fullDescription": { + "text": "misra-c2012-11-2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-spuriously-wake-up-functions", + "name": "bugprone-spuriously-wake-up-functions", + "shortDescription": { + "text": "spuriously-wake-up-functions" + }, + "fullDescription": { + "text": "spuriously-wake-up-functions" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-15-5-1", + "name": "clion-misra-cpp2008-15-5-1", + "shortDescription": { + "text": "misra-cpp2008-15-5-1" + }, + "fullDescription": { + "text": "misra-cpp2008-15-5-1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "performance-type-promotion-in-math-fn", + "name": "performance-type-promotion-in-math-fn", + "shortDescription": { + "text": "type-promotion-in-math-fn" + }, + "fullDescription": { + "text": "type-promotion-in-math-fn" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "performance", + "index": 8, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-identifier-length", + "name": "readability-identifier-length", + "shortDescription": { + "text": "identifier-length" + }, + "fullDescription": { + "text": "identifier-length" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-core.uninitialized.CapturedBlockVariable", + "name": "clang-analyzer-core.uninitialized.CapturedBlockVariable", + "shortDescription": { + "text": "CapturedBlockVariable" + }, + "fullDescription": { + "text": "CapturedBlockVariable" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "core.uninitialized", + "index": 35, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-pro-type-union-access", + "name": "cppcoreguidelines-pro-type-union-access", + "shortDescription": { + "text": "pro-type-union-access" + }, + "fullDescription": { + "text": "pro-type-union-access" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "fuchsia-default-arguments-calls", + "name": "fuchsia-default-arguments-calls", + "shortDescription": { + "text": "default-arguments-calls" + }, + "fullDescription": { + "text": "default-arguments-calls" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "fuchsia", + "index": 11, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-core.DynamicTypePropagation", + "name": "clang-analyzer-core.DynamicTypePropagation", + "shortDescription": { + "text": "DynamicTypePropagation" + }, + "fullDescription": { + "text": "DynamicTypePropagation" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "core", + "index": 37, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "google-runtime-int", + "name": "google-runtime-int", + "shortDescription": { + "text": "runtime-int" + }, + "fullDescription": { + "text": "runtime-int" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "google", + "index": 5, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "concurrency-thread-canceltype-asynchronous", + "name": "concurrency-thread-canceltype-asynchronous", + "shortDescription": { + "text": "thread-canceltype-asynchronous" + }, + "fullDescription": { + "text": "thread-canceltype-asynchronous" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "concurrency", + "index": 43, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-unix.API", + "name": "clang-analyzer-unix.API", + "shortDescription": { + "text": "API" + }, + "fullDescription": { + "text": "API" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "unix", + "index": 26, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-cplusplus.StringChecker", + "name": "clang-analyzer-cplusplus.StringChecker", + "shortDescription": { + "text": "StringChecker" + }, + "fullDescription": { + "text": "StringChecker" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cplusplus", + "index": 30, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-noexcept-destructor", + "name": "cppcoreguidelines-noexcept-destructor", + "shortDescription": { + "text": "noexcept-destructor" + }, + "fullDescription": { + "text": "noexcept-destructor" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-11-8", + "name": "clion-misra-c2012-11-8", + "shortDescription": { + "text": "misra-c2012-11-8" + }, + "fullDescription": { + "text": "misra-c2012-11-8" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-15-0-2", + "name": "clion-misra-cpp2008-15-0-2", + "shortDescription": { + "text": "misra-cpp2008-15-0-2" + }, + "fullDescription": { + "text": "misra-cpp2008-15-0-2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "darwin-dispatch-once-nonstatic", + "name": "darwin-dispatch-once-nonstatic", + "shortDescription": { + "text": "dispatch-once-nonstatic" + }, + "fullDescription": { + "text": "dispatch-once-nonstatic" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "darwin", + "index": 44, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-exception-escape", + "name": "bugprone-exception-escape", + "shortDescription": { + "text": "exception-escape" + }, + "fullDescription": { + "text": "exception-escape" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "abseil-cleanup-ctad", + "name": "abseil-cleanup-ctad", + "shortDescription": { + "text": "cleanup-ctad" + }, + "fullDescription": { + "text": "cleanup-ctad" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "abseil", + "index": 20, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.cocoa.VariadicMethodTypes", + "name": "clang-analyzer-osx.cocoa.VariadicMethodTypes", + "shortDescription": { + "text": "VariadicMethodTypes" + }, + "fullDescription": { + "text": "VariadicMethodTypes" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx.cocoa", + "index": 15, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-deadcode.DeadStores", + "name": "clang-analyzer-deadcode.DeadStores", + "shortDescription": { + "text": "DeadStores" + }, + "fullDescription": { + "text": "DeadStores" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "deadcode", + "index": 45, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-dcl50-cpp", + "name": "cert-dcl50-cpp", + "shortDescription": { + "text": "dcl50-cpp" + }, + "fullDescription": { + "text": "dcl50-cpp" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-5-2-5", + "name": "clion-misra-cpp2008-5-2-5", + "shortDescription": { + "text": "misra-cpp2008-5-2-5" + }, + "fullDescription": { + "text": "misra-cpp2008-5-2-5" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-17-5", + "name": "clion-misra-c2012-17-5", + "shortDescription": { + "text": "misra-c2012-17-5" + }, + "fullDescription": { + "text": "misra-c2012-17-5" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "misc-unused-using-decls", + "name": "misc-unused-using-decls", + "shortDescription": { + "text": "unused-using-decls" + }, + "fullDescription": { + "text": "unused-using-decls" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "misc", + "index": 27, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-avoid-goto", + "name": "cppcoreguidelines-avoid-goto", + "shortDescription": { + "text": "avoid-goto" + }, + "fullDescription": { + "text": "avoid-goto" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-missing-std-forward", + "name": "cppcoreguidelines-missing-std-forward", + "shortDescription": { + "text": "missing-std-forward" + }, + "fullDescription": { + "text": "missing-std-forward" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-fio38-c", + "name": "cert-fio38-c", + "shortDescription": { + "text": "fio38-c" + }, + "fullDescription": { + "text": "fio38-c" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.cocoa.NonNilReturnValue", + "name": "clang-analyzer-osx.cocoa.NonNilReturnValue", + "shortDescription": { + "text": "NonNilReturnValue" + }, + "fullDescription": { + "text": "NonNilReturnValue" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx.cocoa", + "index": 15, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-use-nodiscard", + "name": "modernize-use-nodiscard", + "shortDescription": { + "text": "use-nodiscard" + }, + "fullDescription": { + "text": "use-nodiscard" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-misleading-indentation", + "name": "readability-misleading-indentation", + "shortDescription": { + "text": "misleading-indentation" + }, + "fullDescription": { + "text": "misleading-indentation" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.webkit.UncountedCallArgsChecker", + "name": "clang-analyzer-alpha.webkit.UncountedCallArgsChecker", + "shortDescription": { + "text": "UncountedCallArgsChecker" + }, + "fullDescription": { + "text": "UncountedCallArgsChecker" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.webkit", + "index": 46, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-str34-c", + "name": "cert-str34-c", + "shortDescription": { + "text": "str34-c" + }, + "fullDescription": { + "text": "str34-c" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.cocoa.MissingSuperCall", + "name": "clang-analyzer-osx.cocoa.MissingSuperCall", + "shortDescription": { + "text": "MissingSuperCall" + }, + "fullDescription": { + "text": "MissingSuperCall" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx.cocoa", + "index": 15, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-dangling-handle", + "name": "bugprone-dangling-handle", + "shortDescription": { + "text": "dangling-handle" + }, + "fullDescription": { + "text": "dangling-handle" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-6-4-1", + "name": "clion-misra-cpp2008-6-4-1", + "shortDescription": { + "text": "misra-cpp2008-6-4-1" + }, + "fullDescription": { + "text": "misra-cpp2008-6-4-1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-optin.performance.GCDAntipattern", + "name": "clang-analyzer-optin.performance.GCDAntipattern", + "shortDescription": { + "text": "GCDAntipattern" + }, + "fullDescription": { + "text": "GCDAntipattern" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "optin.performance", + "index": 47, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-12-1-3", + "name": "clion-misra-cpp2008-12-1-3", + "shortDescription": { + "text": "misra-cpp2008-12-1-3" + }, + "fullDescription": { + "text": "misra-cpp2008-12-1-3" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-prefer-member-initializer", + "name": "cppcoreguidelines-prefer-member-initializer", + "shortDescription": { + "text": "prefer-member-initializer" + }, + "fullDescription": { + "text": "prefer-member-initializer" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "google-build-namespaces", + "name": "google-build-namespaces", + "shortDescription": { + "text": "build-namespaces" + }, + "fullDescription": { + "text": "build-namespaces" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "google", + "index": 5, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-pro-type-static-cast-downcast", + "name": "cppcoreguidelines-pro-type-static-cast-downcast", + "shortDescription": { + "text": "pro-type-static-cast-downcast" + }, + "fullDescription": { + "text": "pro-type-static-cast-downcast" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-18-4-1", + "name": "clion-misra-cpp2008-18-4-1", + "shortDescription": { + "text": "misra-cpp2008-18-4-1" + }, + "fullDescription": { + "text": "misra-cpp2008-18-4-1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-use-noexcept", + "name": "hicpp-use-noexcept", + "shortDescription": { + "text": "use-noexcept" + }, + "fullDescription": { + "text": "use-noexcept" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.SecKeychainAPI", + "name": "clang-analyzer-osx.SecKeychainAPI", + "shortDescription": { + "text": "SecKeychainAPI" + }, + "fullDescription": { + "text": "SecKeychainAPI" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx", + "index": 24, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.cocoa.NSAutoreleasePool", + "name": "clang-analyzer-osx.cocoa.NSAutoreleasePool", + "shortDescription": { + "text": "NSAutoreleasePool" + }, + "fullDescription": { + "text": "NSAutoreleasePool" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx.cocoa", + "index": 15, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-21-3", + "name": "clion-misra-c2012-21-3", + "shortDescription": { + "text": "misra-c2012-21-3" + }, + "fullDescription": { + "text": "misra-c2012-21-3" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-suspicious-memory-comparison", + "name": "bugprone-suspicious-memory-comparison", + "shortDescription": { + "text": "suspicious-memory-comparison" + }, + "fullDescription": { + "text": "suspicious-memory-comparison" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-valist.Uninitialized", + "name": "clang-analyzer-valist.Uninitialized", + "shortDescription": { + "text": "Uninitialized" + }, + "fullDescription": { + "text": "Uninitialized" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "valist", + "index": 38, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-use-nullptr", + "name": "modernize-use-nullptr", + "shortDescription": { + "text": "use-nullptr" + }, + "fullDescription": { + "text": "use-nullptr" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-owning-memory", + "name": "cppcoreguidelines-owning-memory", + "shortDescription": { + "text": "owning-memory" + }, + "fullDescription": { + "text": "owning-memory" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-8-4-4", + "name": "clion-misra-cpp2008-8-4-4", + "shortDescription": { + "text": "misra-cpp2008-8-4-4" + }, + "fullDescription": { + "text": "misra-cpp2008-8-4-4" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-15-6", + "name": "clion-misra-c2012-15-6", + "shortDescription": { + "text": "misra-c2012-15-6" + }, + "fullDescription": { + "text": "misra-c2012-15-6" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-unix.cstring.CStringModeling", + "name": "clang-analyzer-unix.cstring.CStringModeling", + "shortDescription": { + "text": "CStringModeling" + }, + "fullDescription": { + "text": "CStringModeling" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "unix.cstring", + "index": 31, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-shrink-to-fit", + "name": "modernize-shrink-to-fit", + "shortDescription": { + "text": "shrink-to-fit" + }, + "fullDescription": { + "text": "shrink-to-fit" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "performance-unnecessary-value-param", + "name": "performance-unnecessary-value-param", + "shortDescription": { + "text": "unnecessary-value-param" + }, + "fullDescription": { + "text": "unnecessary-value-param" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "performance", + "index": 8, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-5-0-12", + "name": "clion-misra-cpp2008-5-0-12", + "shortDescription": { + "text": "misra-cpp2008-5-0-12" + }, + "fullDescription": { + "text": "misra-cpp2008-5-0-12" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-static-assert", + "name": "hicpp-static-assert", + "shortDescription": { + "text": "static-assert" + }, + "fullDescription": { + "text": "static-assert" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-use-emplace", + "name": "modernize-use-emplace", + "shortDescription": { + "text": "use-emplace" + }, + "fullDescription": { + "text": "use-emplace" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "google-objc-avoid-throwing-exception", + "name": "google-objc-avoid-throwing-exception", + "shortDescription": { + "text": "objc-avoid-throwing-exception" + }, + "fullDescription": { + "text": "objc-avoid-throwing-exception" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "google", + "index": 5, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "misc-const-correctness", + "name": "misc-const-correctness", + "shortDescription": { + "text": "const-correctness" + }, + "fullDescription": { + "text": "const-correctness" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "misc", + "index": 27, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-nullability.NullableDereferenced", + "name": "clang-analyzer-nullability.NullableDereferenced", + "shortDescription": { + "text": "NullableDereferenced" + }, + "fullDescription": { + "text": "NullableDereferenced" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "nullability", + "index": 42, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "objc-forbidden-subclassing", + "name": "objc-forbidden-subclassing", + "shortDescription": { + "text": "forbidden-subclassing" + }, + "fullDescription": { + "text": "forbidden-subclassing" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "objc", + "index": 40, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-swapped-arguments", + "name": "bugprone-swapped-arguments", + "shortDescription": { + "text": "swapped-arguments" + }, + "fullDescription": { + "text": "swapped-arguments" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "objc-nsinvocation-argument-lifetime", + "name": "objc-nsinvocation-argument-lifetime", + "shortDescription": { + "text": "nsinvocation-argument-lifetime" + }, + "fullDescription": { + "text": "nsinvocation-argument-lifetime" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "objc", + "index": 40, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "llvm-include-order", + "name": "llvm-include-order", + "shortDescription": { + "text": "include-order" + }, + "fullDescription": { + "text": "include-order" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "llvm", + "index": 16, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-compare-pointer-to-member-virtual-function", + "name": "bugprone-compare-pointer-to-member-virtual-function", + "shortDescription": { + "text": "compare-pointer-to-member-virtual-function" + }, + "fullDescription": { + "text": "compare-pointer-to-member-virtual-function" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-optin.core.EnumCastOutOfRange", + "name": "clang-analyzer-optin.core.EnumCastOutOfRange", + "shortDescription": { + "text": "EnumCastOutOfRange" + }, + "fullDescription": { + "text": "EnumCastOutOfRange" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "optin.core", + "index": 48, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-core.uninitialized.ArraySubscript", + "name": "clang-analyzer-core.uninitialized.ArraySubscript", + "shortDescription": { + "text": "ArraySubscript" + }, + "fullDescription": { + "text": "ArraySubscript" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "core.uninitialized", + "index": 35, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "portability-std-allocator-const", + "name": "portability-std-allocator-const", + "shortDescription": { + "text": "std-allocator-const" + }, + "fullDescription": { + "text": "std-allocator-const" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "portability", + "index": 49, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.cocoa.AutoreleaseWrite", + "name": "clang-analyzer-osx.cocoa.AutoreleaseWrite", + "shortDescription": { + "text": "AutoreleaseWrite" + }, + "fullDescription": { + "text": "AutoreleaseWrite" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx.cocoa", + "index": 15, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "android-cloexec-inotify-init", + "name": "android-cloexec-inotify-init", + "shortDescription": { + "text": "cloexec-inotify-init" + }, + "fullDescription": { + "text": "cloexec-inotify-init" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "android", + "index": 28, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-no-malloc", + "name": "hicpp-no-malloc", + "shortDescription": { + "text": "no-malloc" + }, + "fullDescription": { + "text": "no-malloc" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-no-assembler", + "name": "hicpp-no-assembler", + "shortDescription": { + "text": "no-assembler" + }, + "fullDescription": { + "text": "no-assembler" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-container-data-pointer", + "name": "readability-container-data-pointer", + "shortDescription": { + "text": "container-data-pointer" + }, + "fullDescription": { + "text": "container-data-pointer" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-4-12", + "name": "clion-misra-c2012-4-12", + "shortDescription": { + "text": "misra-c2012-4-12" + }, + "fullDescription": { + "text": "misra-c2012-4-12" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "performance-move-const-arg", + "name": "performance-move-const-arg", + "shortDescription": { + "text": "move-const-arg" + }, + "fullDescription": { + "text": "move-const-arg" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "performance", + "index": 8, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.webkit.UncountedLocalVarsChecker", + "name": "clang-analyzer-alpha.webkit.UncountedLocalVarsChecker", + "shortDescription": { + "text": "UncountedLocalVarsChecker" + }, + "fullDescription": { + "text": "UncountedLocalVarsChecker" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.webkit", + "index": 46, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "performance-implicit-conversion-in-loop", + "name": "performance-implicit-conversion-in-loop", + "shortDescription": { + "text": "implicit-conversion-in-loop" + }, + "fullDescription": { + "text": "implicit-conversion-in-loop" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "performance", + "index": 8, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-string-integer-assignment", + "name": "bugprone-string-integer-assignment", + "shortDescription": { + "text": "string-integer-assignment" + }, + "fullDescription": { + "text": "string-integer-assignment" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-10-5", + "name": "clion-misra-c2012-10-5", + "shortDescription": { + "text": "misra-c2012-10-5" + }, + "fullDescription": { + "text": "misra-c2012-10-5" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-copy-constructor-init", + "name": "bugprone-copy-constructor-init", + "shortDescription": { + "text": "copy-constructor-init" + }, + "fullDescription": { + "text": "copy-constructor-init" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-security.FloatLoopCounter", + "name": "clang-analyzer-security.FloatLoopCounter", + "shortDescription": { + "text": "FloatLoopCounter" + }, + "fullDescription": { + "text": "FloatLoopCounter" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "security", + "index": 50, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.cocoa.IncompatibleMethodTypes", + "name": "clang-analyzer-osx.cocoa.IncompatibleMethodTypes", + "shortDescription": { + "text": "IncompatibleMethodTypes" + }, + "fullDescription": { + "text": "IncompatibleMethodTypes" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx.cocoa", + "index": 15, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-6-6-4", + "name": "clion-misra-cpp2008-6-6-4", + "shortDescription": { + "text": "misra-cpp2008-6-6-4" + }, + "fullDescription": { + "text": "misra-cpp2008-6-6-4" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-easily-swappable-parameters", + "name": "bugprone-easily-swappable-parameters", + "shortDescription": { + "text": "easily-swappable-parameters" + }, + "fullDescription": { + "text": "easily-swappable-parameters" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "llvm-prefer-isa-or-dyn-cast-in-conditionals", + "name": "llvm-prefer-isa-or-dyn-cast-in-conditionals", + "shortDescription": { + "text": "prefer-isa-or-dyn-cast-in-conditionals" + }, + "fullDescription": { + "text": "prefer-isa-or-dyn-cast-in-conditionals" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "llvm", + "index": 16, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-integer-division", + "name": "bugprone-integer-division", + "shortDescription": { + "text": "integer-division" + }, + "fullDescription": { + "text": "integer-division" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-core.uninitialized.Assign", + "name": "clang-analyzer-core.uninitialized.Assign", + "shortDescription": { + "text": "Assign" + }, + "fullDescription": { + "text": "Assign" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "core.uninitialized", + "index": 35, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-use-constraints", + "name": "modernize-use-constraints", + "shortDescription": { + "text": "use-constraints" + }, + "fullDescription": { + "text": "use-constraints" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "abseil-time-subtraction", + "name": "abseil-time-subtraction", + "shortDescription": { + "text": "time-subtraction" + }, + "fullDescription": { + "text": "time-subtraction" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "abseil", + "index": 20, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-suspicious-enum-usage", + "name": "bugprone-suspicious-enum-usage", + "shortDescription": { + "text": "suspicious-enum-usage" + }, + "fullDescription": { + "text": "suspicious-enum-usage" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-redundant-string-init", + "name": "readability-redundant-string-init", + "shortDescription": { + "text": "redundant-string-init" + }, + "fullDescription": { + "text": "redundant-string-init" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-13-3", + "name": "clion-misra-c2012-13-3", + "shortDescription": { + "text": "misra-c2012-13-3" + }, + "fullDescription": { + "text": "misra-c2012-13-3" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-unchecked-optional-access", + "name": "bugprone-unchecked-optional-access", + "shortDescription": { + "text": "unchecked-optional-access" + }, + "fullDescription": { + "text": "unchecked-optional-access" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-isolate-declaration", + "name": "readability-isolate-declaration", + "shortDescription": { + "text": "isolate-declaration" + }, + "fullDescription": { + "text": "isolate-declaration" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.core.TestAfterDivZero", + "name": "clang-analyzer-alpha.core.TestAfterDivZero", + "shortDescription": { + "text": "TestAfterDivZero" + }, + "fullDescription": { + "text": "TestAfterDivZero" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.core", + "index": 4, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "abseil-duration-conversion-cast", + "name": "abseil-duration-conversion-cast", + "shortDescription": { + "text": "duration-conversion-cast" + }, + "fullDescription": { + "text": "duration-conversion-cast" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "abseil", + "index": 20, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-16-5", + "name": "clion-misra-c2012-16-5", + "shortDescription": { + "text": "misra-c2012-16-5" + }, + "fullDescription": { + "text": "misra-c2012-16-5" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-unused-local-non-trivial-variable", + "name": "bugprone-unused-local-non-trivial-variable", + "shortDescription": { + "text": "unused-local-non-trivial-variable" + }, + "fullDescription": { + "text": "unused-local-non-trivial-variable" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-apiModeling.google.GTest", + "name": "clang-analyzer-apiModeling.google.GTest", + "shortDescription": { + "text": "GTest" + }, + "fullDescription": { + "text": "GTest" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "apiModeling.google", + "index": 51, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-pro-type-const-cast", + "name": "cppcoreguidelines-pro-type-const-cast", + "shortDescription": { + "text": "pro-type-const-cast" + }, + "fullDescription": { + "text": "pro-type-const-cast" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.core.StackAddressAsyncEscape", + "name": "clang-analyzer-alpha.core.StackAddressAsyncEscape", + "shortDescription": { + "text": "StackAddressAsyncEscape" + }, + "fullDescription": { + "text": "StackAddressAsyncEscape" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.core", + "index": 4, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "misc-unconventional-assign-operator", + "name": "misc-unconventional-assign-operator", + "shortDescription": { + "text": "unconventional-assign-operator" + }, + "fullDescription": { + "text": "unconventional-assign-operator" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "misc", + "index": 27, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-no-escape", + "name": "bugprone-no-escape", + "shortDescription": { + "text": "no-escape" + }, + "fullDescription": { + "text": "no-escape" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-avoid-const-or-ref-data-members", + "name": "cppcoreguidelines-avoid-const-or-ref-data-members", + "shortDescription": { + "text": "avoid-const-or-ref-data-members" + }, + "fullDescription": { + "text": "avoid-const-or-ref-data-members" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "performance-enum-size", + "name": "performance-enum-size", + "shortDescription": { + "text": "enum-size" + }, + "fullDescription": { + "text": "enum-size" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "performance", + "index": 8, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-convert-member-functions-to-static", + "name": "readability-convert-member-functions-to-static", + "shortDescription": { + "text": "convert-member-functions-to-static" + }, + "fullDescription": { + "text": "convert-member-functions-to-static" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-redundant-function-ptr-dereference", + "name": "readability-redundant-function-ptr-dereference", + "shortDescription": { + "text": "redundant-function-ptr-dereference" + }, + "fullDescription": { + "text": "redundant-function-ptr-dereference" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-security.cert.env.InvalidPtr", + "name": "clang-analyzer-security.cert.env.InvalidPtr", + "shortDescription": { + "text": "InvalidPtr" + }, + "fullDescription": { + "text": "InvalidPtr" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "security.cert.env", + "index": 52, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-6-4-2", + "name": "clion-misra-cpp2008-6-4-2", + "shortDescription": { + "text": "misra-cpp2008-6-4-2" + }, + "fullDescription": { + "text": "misra-cpp2008-6-4-2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-posix-return", + "name": "bugprone-posix-return", + "shortDescription": { + "text": "posix-return" + }, + "fullDescription": { + "text": "posix-return" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-ignored-remove-result", + "name": "hicpp-ignored-remove-result", + "shortDescription": { + "text": "ignored-remove-result" + }, + "fullDescription": { + "text": "ignored-remove-result" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-15-7", + "name": "clion-misra-c2012-15-7", + "shortDescription": { + "text": "misra-c2012-15-7" + }, + "fullDescription": { + "text": "misra-c2012-15-7" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.NumberObjectConversion", + "name": "clang-analyzer-osx.NumberObjectConversion", + "shortDescription": { + "text": "NumberObjectConversion" + }, + "fullDescription": { + "text": "NumberObjectConversion" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx", + "index": 24, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.coreFoundation.CFRetainRelease", + "name": "clang-analyzer-osx.coreFoundation.CFRetainRelease", + "shortDescription": { + "text": "CFRetainRelease" + }, + "fullDescription": { + "text": "CFRetainRelease" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx.coreFoundation", + "index": 29, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-pro-type-member-init", + "name": "cppcoreguidelines-pro-type-member-init", + "shortDescription": { + "text": "pro-type-member-init" + }, + "fullDescription": { + "text": "pro-type-member-init" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-use-std-numbers", + "name": "modernize-use-std-numbers", + "shortDescription": { + "text": "use-std-numbers" + }, + "fullDescription": { + "text": "use-std-numbers" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "abseil-time-comparison", + "name": "abseil-time-comparison", + "shortDescription": { + "text": "time-comparison" + }, + "fullDescription": { + "text": "time-comparison" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "abseil", + "index": 20, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-mem57-cpp", + "name": "cert-mem57-cpp", + "shortDescription": { + "text": "mem57-cpp" + }, + "fullDescription": { + "text": "mem57-cpp" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-10-1-1", + "name": "clion-misra-cpp2008-10-1-1", + "shortDescription": { + "text": "misra-cpp2008-10-1-1" + }, + "fullDescription": { + "text": "misra-cpp2008-10-1-1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-6-4-7", + "name": "clion-misra-cpp2008-6-4-7", + "shortDescription": { + "text": "misra-cpp2008-6-4-7" + }, + "fullDescription": { + "text": "misra-cpp2008-6-4-7" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-explicit-conversions", + "name": "hicpp-explicit-conversions", + "shortDescription": { + "text": "explicit-conversions" + }, + "fullDescription": { + "text": "explicit-conversions" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-implicit-widening-of-multiplication-result", + "name": "bugprone-implicit-widening-of-multiplication-result", + "shortDescription": { + "text": "implicit-widening-of-multiplication-result" + }, + "fullDescription": { + "text": "implicit-widening-of-multiplication-result" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-unary-static-assert", + "name": "modernize-unary-static-assert", + "shortDescription": { + "text": "unary-static-assert" + }, + "fullDescription": { + "text": "unary-static-assert" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.clone.CloneChecker", + "name": "clang-analyzer-alpha.clone.CloneChecker", + "shortDescription": { + "text": "CloneChecker" + }, + "fullDescription": { + "text": "CloneChecker" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.clone", + "index": 53, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-14-5-2", + "name": "clion-misra-cpp2008-14-5-2", + "shortDescription": { + "text": "misra-cpp2008-14-5-2" + }, + "fullDescription": { + "text": "misra-cpp2008-14-5-2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "abseil-faster-strsplit-delimiter", + "name": "abseil-faster-strsplit-delimiter", + "shortDescription": { + "text": "faster-strsplit-delimiter" + }, + "fullDescription": { + "text": "faster-strsplit-delimiter" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "abseil", + "index": 20, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.nondeterminism.PointerIteration", + "name": "clang-analyzer-alpha.nondeterminism.PointerIteration", + "shortDescription": { + "text": "PointerIteration" + }, + "fullDescription": { + "text": "PointerIteration" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.nondeterminism", + "index": 54, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "performance-for-range-copy", + "name": "performance-for-range-copy", + "shortDescription": { + "text": "for-range-copy" + }, + "fullDescription": { + "text": "for-range-copy" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "performance", + "index": 8, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-use-equals-delete", + "name": "modernize-use-equals-delete", + "shortDescription": { + "text": "use-equals-delete" + }, + "fullDescription": { + "text": "use-equals-delete" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "performance-noexcept-move-constructor", + "name": "performance-noexcept-move-constructor", + "shortDescription": { + "text": "noexcept-move-constructor" + }, + "fullDescription": { + "text": "noexcept-move-constructor" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "performance", + "index": 8, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-dcl51-cpp", + "name": "cert-dcl51-cpp", + "shortDescription": { + "text": "dcl51-cpp" + }, + "fullDescription": { + "text": "dcl51-cpp" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-delete-null-pointer", + "name": "readability-delete-null-pointer", + "shortDescription": { + "text": "delete-null-pointer" + }, + "fullDescription": { + "text": "delete-null-pointer" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "mpi-buffer-deref", + "name": "mpi-buffer-deref", + "shortDescription": { + "text": "buffer-deref" + }, + "fullDescription": { + "text": "buffer-deref" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "mpi", + "index": 34, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-named-parameter", + "name": "readability-named-parameter", + "shortDescription": { + "text": "named-parameter" + }, + "fullDescription": { + "text": "named-parameter" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-simplify-subscript-expr", + "name": "readability-simplify-subscript-expr", + "shortDescription": { + "text": "simplify-subscript-expr" + }, + "fullDescription": { + "text": "simplify-subscript-expr" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-cplusplus.SelfAssignment", + "name": "clang-analyzer-cplusplus.SelfAssignment", + "shortDescription": { + "text": "SelfAssignment" + }, + "fullDescription": { + "text": "SelfAssignment" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cplusplus", + "index": 30, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-suspicious-string-compare", + "name": "bugprone-suspicious-string-compare", + "shortDescription": { + "text": "suspicious-string-compare" + }, + "fullDescription": { + "text": "suspicious-string-compare" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-optin.osx.cocoa.localizability.EmptyLocalizationContextChecker", + "name": "clang-analyzer-optin.osx.cocoa.localizability.EmptyLocalizationContextChecker", + "shortDescription": { + "text": "EmptyLocalizationContextChecker" + }, + "fullDescription": { + "text": "EmptyLocalizationContextChecker" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "optin.osx.cocoa.localizability", + "index": 55, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-err33-c", + "name": "cert-err33-c", + "shortDescription": { + "text": "err33-c" + }, + "fullDescription": { + "text": "err33-c" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-reference-to-constructed-temporary", + "name": "readability-reference-to-constructed-temporary", + "shortDescription": { + "text": "reference-to-constructed-temporary" + }, + "fullDescription": { + "text": "reference-to-constructed-temporary" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "abseil-duration-factory-scale", + "name": "abseil-duration-factory-scale", + "shortDescription": { + "text": "duration-factory-scale" + }, + "fullDescription": { + "text": "duration-factory-scale" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "abseil", + "index": 20, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-security.insecureAPI.bcmp", + "name": "clang-analyzer-security.insecureAPI.bcmp", + "shortDescription": { + "text": "bcmp" + }, + "fullDescription": { + "text": "bcmp" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "security.insecureAPI", + "index": 12, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-16-3", + "name": "clion-misra-c2012-16-3", + "shortDescription": { + "text": "misra-c2012-16-3" + }, + "fullDescription": { + "text": "misra-c2012-16-3" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-misplaced-widening-cast", + "name": "bugprone-misplaced-widening-cast", + "shortDescription": { + "text": "misplaced-widening-cast" + }, + "fullDescription": { + "text": "misplaced-widening-cast" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-dynamic-static-initializers", + "name": "bugprone-dynamic-static-initializers", + "shortDescription": { + "text": "dynamic-static-initializers" + }, + "fullDescription": { + "text": "dynamic-static-initializers" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-17-8", + "name": "clion-misra-c2012-17-8", + "shortDescription": { + "text": "misra-c2012-17-8" + }, + "fullDescription": { + "text": "misra-c2012-17-8" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "altera-kernel-name-restriction", + "name": "altera-kernel-name-restriction", + "shortDescription": { + "text": "kernel-name-restriction" + }, + "fullDescription": { + "text": "kernel-name-restriction" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "altera", + "index": 33, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-unix.MallocSizeof", + "name": "clang-analyzer-unix.MallocSizeof", + "shortDescription": { + "text": "MallocSizeof" + }, + "fullDescription": { + "text": "MallocSizeof" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "unix", + "index": 26, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-oop11-cpp", + "name": "cert-oop11-cpp", + "shortDescription": { + "text": "oop11-cpp" + }, + "fullDescription": { + "text": "oop11-cpp" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-nullability.NullReturnedFromNonnull", + "name": "clang-analyzer-nullability.NullReturnedFromNonnull", + "shortDescription": { + "text": "NullReturnedFromNonnull" + }, + "fullDescription": { + "text": "NullReturnedFromNonnull" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "nullability", + "index": 42, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-unhandled-exception-at-new", + "name": "bugprone-unhandled-exception-at-new", + "shortDescription": { + "text": "unhandled-exception-at-new" + }, + "fullDescription": { + "text": "unhandled-exception-at-new" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-6-5-1", + "name": "clion-misra-cpp2008-6-5-1", + "shortDescription": { + "text": "misra-cpp2008-6-5-1" + }, + "fullDescription": { + "text": "misra-cpp2008-6-5-1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-use-std-min-max", + "name": "readability-use-std-min-max", + "shortDescription": { + "text": "use-std-min-max" + }, + "fullDescription": { + "text": "use-std-min-max" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-raw-string-literal", + "name": "modernize-raw-string-literal", + "shortDescription": { + "text": "raw-string-literal" + }, + "fullDescription": { + "text": "raw-string-literal" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-inaccurate-erase", + "name": "bugprone-inaccurate-erase", + "shortDescription": { + "text": "inaccurate-erase" + }, + "fullDescription": { + "text": "inaccurate-erase" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "misc-misleading-identifier", + "name": "misc-misleading-identifier", + "shortDescription": { + "text": "misleading-identifier" + }, + "fullDescription": { + "text": "misleading-identifier" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "misc", + "index": 27, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-11-1", + "name": "clion-misra-c2012-11-1", + "shortDescription": { + "text": "misra-c2012-11-1" + }, + "fullDescription": { + "text": "misra-c2012-11-1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-optin.portability.UnixAPI", + "name": "clang-analyzer-optin.portability.UnixAPI", + "shortDescription": { + "text": "UnixAPI" + }, + "fullDescription": { + "text": "UnixAPI" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "optin.portability", + "index": 56, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "misc-unused-parameters", + "name": "misc-unused-parameters", + "shortDescription": { + "text": "unused-parameters" + }, + "fullDescription": { + "text": "unused-parameters" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "misc", + "index": 27, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-15-1-2", + "name": "clion-misra-cpp2008-15-1-2", + "shortDescription": { + "text": "misra-cpp2008-15-1-2" + }, + "fullDescription": { + "text": "misra-cpp2008-15-1-2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.NSOrCFErrorDerefChecker", + "name": "clang-analyzer-osx.NSOrCFErrorDerefChecker", + "shortDescription": { + "text": "NSOrCFErrorDerefChecker" + }, + "fullDescription": { + "text": "NSOrCFErrorDerefChecker" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx", + "index": 24, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-replace-auto-ptr", + "name": "modernize-replace-auto-ptr", + "shortDescription": { + "text": "replace-auto-ptr" + }, + "fullDescription": { + "text": "replace-auto-ptr" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-pro-type-reinterpret-cast", + "name": "cppcoreguidelines-pro-type-reinterpret-cast", + "shortDescription": { + "text": "pro-type-reinterpret-cast" + }, + "fullDescription": { + "text": "pro-type-reinterpret-cast" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-16-4", + "name": "clion-misra-c2012-16-4", + "shortDescription": { + "text": "misra-c2012-16-4" + }, + "fullDescription": { + "text": "misra-c2012-16-4" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-virtual-class-destructor", + "name": "cppcoreguidelines-virtual-class-destructor", + "shortDescription": { + "text": "virtual-class-destructor" + }, + "fullDescription": { + "text": "virtual-class-destructor" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-core.NonNullParamChecker", + "name": "clang-analyzer-core.NonNullParamChecker", + "shortDescription": { + "text": "NonNullParamChecker" + }, + "fullDescription": { + "text": "NonNullParamChecker" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "core", + "index": 37, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "openmp-exception-escape", + "name": "openmp-exception-escape", + "shortDescription": { + "text": "exception-escape" + }, + "fullDescription": { + "text": "exception-escape" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "openmp", + "index": 57, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-vararg", + "name": "hicpp-vararg", + "shortDescription": { + "text": "vararg" + }, + "fullDescription": { + "text": "vararg" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.unix.cstring.UninitializedRead", + "name": "clang-analyzer-alpha.unix.cstring.UninitializedRead", + "shortDescription": { + "text": "UninitializedRead" + }, + "fullDescription": { + "text": "UninitializedRead" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.unix.cstring", + "index": 58, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-8-5-3", + "name": "clion-misra-cpp2008-8-5-3", + "shortDescription": { + "text": "misra-cpp2008-8-5-3" + }, + "fullDescription": { + "text": "misra-cpp2008-8-5-3" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-oop57-cpp", + "name": "cert-oop57-cpp", + "shortDescription": { + "text": "oop57-cpp" + }, + "fullDescription": { + "text": "oop57-cpp" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-21-8", + "name": "clion-misra-c2012-21-8", + "shortDescription": { + "text": "misra-c2012-21-8" + }, + "fullDescription": { + "text": "misra-c2012-21-8" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-8-8", + "name": "clion-misra-c2012-8-8", + "shortDescription": { + "text": "misra-c2012-8-8" + }, + "fullDescription": { + "text": "misra-c2012-8-8" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-nullability.NullPassedToNonnull", + "name": "clang-analyzer-nullability.NullPassedToNonnull", + "shortDescription": { + "text": "NullPassedToNonnull" + }, + "fullDescription": { + "text": "NullPassedToNonnull" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "nullability", + "index": 42, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "android-cloexec-pipe2", + "name": "android-cloexec-pipe2", + "shortDescription": { + "text": "cloexec-pipe2" + }, + "fullDescription": { + "text": "cloexec-pipe2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "android", + "index": 28, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-avoid-c-arrays", + "name": "hicpp-avoid-c-arrays", + "shortDescription": { + "text": "avoid-c-arrays" + }, + "fullDescription": { + "text": "avoid-c-arrays" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "abseil-duration-division", + "name": "abseil-duration-division", + "shortDescription": { + "text": "duration-division" + }, + "fullDescription": { + "text": "duration-division" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "abseil", + "index": 20, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-deprecated-headers", + "name": "hicpp-deprecated-headers", + "shortDescription": { + "text": "deprecated-headers" + }, + "fullDescription": { + "text": "deprecated-headers" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-5-2-6", + "name": "clion-misra-cpp2008-5-2-6", + "shortDescription": { + "text": "misra-cpp2008-5-2-6" + }, + "fullDescription": { + "text": "misra-cpp2008-5-2-6" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-2-13-3", + "name": "clion-misra-cpp2008-2-13-3", + "shortDescription": { + "text": "misra-cpp2008-2-13-3" + }, + "fullDescription": { + "text": "misra-cpp2008-2-13-3" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "google-global-names-in-headers", + "name": "google-global-names-in-headers", + "shortDescription": { + "text": "global-names-in-headers" + }, + "fullDescription": { + "text": "global-names-in-headers" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "google", + "index": 5, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-replace-random-shuffle", + "name": "modernize-replace-random-shuffle", + "shortDescription": { + "text": "replace-random-shuffle" + }, + "fullDescription": { + "text": "replace-random-shuffle" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-redundant-access-specifiers", + "name": "readability-redundant-access-specifiers", + "shortDescription": { + "text": "redundant-access-specifiers" + }, + "fullDescription": { + "text": "redundant-access-specifiers" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.cplusplus.STLAlgorithmModeling", + "name": "clang-analyzer-alpha.cplusplus.STLAlgorithmModeling", + "shortDescription": { + "text": "STLAlgorithmModeling" + }, + "fullDescription": { + "text": "STLAlgorithmModeling" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.cplusplus", + "index": 7, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.unix.Chroot", + "name": "clang-analyzer-alpha.unix.Chroot", + "shortDescription": { + "text": "Chroot" + }, + "fullDescription": { + "text": "Chroot" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.unix", + "index": 21, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-security.insecureAPI.mkstemp", + "name": "clang-analyzer-security.insecureAPI.mkstemp", + "shortDescription": { + "text": "mkstemp" + }, + "fullDescription": { + "text": "mkstemp" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "security.insecureAPI", + "index": 12, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-msc30-c", + "name": "cert-msc30-c", + "shortDescription": { + "text": "msc30-c" + }, + "fullDescription": { + "text": "msc30-c" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-sizeof-container", + "name": "bugprone-sizeof-container", + "shortDescription": { + "text": "sizeof-container" + }, + "fullDescription": { + "text": "sizeof-container" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "google-upgrade-googletest-case", + "name": "google-upgrade-googletest-case", + "shortDescription": { + "text": "upgrade-googletest-case" + }, + "fullDescription": { + "text": "upgrade-googletest-case" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "google", + "index": 5, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-const-return-type", + "name": "readability-const-return-type", + "shortDescription": { + "text": "const-return-type" + }, + "fullDescription": { + "text": "const-return-type" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-pass-by-value", + "name": "modernize-pass-by-value", + "shortDescription": { + "text": "pass-by-value" + }, + "fullDescription": { + "text": "pass-by-value" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "abseil-no-namespace", + "name": "abseil-no-namespace", + "shortDescription": { + "text": "no-namespace" + }, + "fullDescription": { + "text": "no-namespace" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "abseil", + "index": 20, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-cplusplus.NewDelete", + "name": "clang-analyzer-cplusplus.NewDelete", + "shortDescription": { + "text": "NewDelete" + }, + "fullDescription": { + "text": "NewDelete" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cplusplus", + "index": 30, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "google-objc-function-naming", + "name": "google-objc-function-naming", + "shortDescription": { + "text": "objc-function-naming" + }, + "fullDescription": { + "text": "objc-function-naming" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "google", + "index": 5, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-oop58-cpp", + "name": "cert-oop58-cpp", + "shortDescription": { + "text": "oop58-cpp" + }, + "fullDescription": { + "text": "oop58-cpp" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-8-10", + "name": "clion-misra-c2012-8-10", + "shortDescription": { + "text": "misra-c2012-8-10" + }, + "fullDescription": { + "text": "misra-c2012-8-10" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.cocoa.NSError", + "name": "clang-analyzer-osx.cocoa.NSError", + "shortDescription": { + "text": "NSError" + }, + "fullDescription": { + "text": "NSError" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx.cocoa", + "index": 15, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-c-copy-assignment-signature", + "name": "cppcoreguidelines-c-copy-assignment-signature", + "shortDescription": { + "text": "c-copy-assignment-signature" + }, + "fullDescription": { + "text": "c-copy-assignment-signature" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-oop54-cpp", + "name": "cert-oop54-cpp", + "shortDescription": { + "text": "oop54-cpp" + }, + "fullDescription": { + "text": "oop54-cpp" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-3-3-2", + "name": "clion-misra-cpp2008-3-3-2", + "shortDescription": { + "text": "misra-cpp2008-3-3-2" + }, + "fullDescription": { + "text": "misra-cpp2008-3-3-2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "misc-redundant-expression", + "name": "misc-redundant-expression", + "shortDescription": { + "text": "redundant-expression" + }, + "fullDescription": { + "text": "redundant-expression" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "misc", + "index": 27, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "performance-noexcept-swap", + "name": "performance-noexcept-swap", + "shortDescription": { + "text": "noexcept-swap" + }, + "fullDescription": { + "text": "noexcept-swap" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "performance", + "index": 8, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "abseil-no-internal-dependencies", + "name": "abseil-no-internal-dependencies", + "shortDescription": { + "text": "no-internal-dependencies" + }, + "fullDescription": { + "text": "no-internal-dependencies" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "abseil", + "index": 20, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-avoid-const-params-in-decls", + "name": "readability-avoid-const-params-in-decls", + "shortDescription": { + "text": "avoid-const-params-in-decls" + }, + "fullDescription": { + "text": "avoid-const-params-in-decls" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-security.insecureAPI.SecuritySyntaxChecker", + "name": "clang-analyzer-security.insecureAPI.SecuritySyntaxChecker", + "shortDescription": { + "text": "SecuritySyntaxChecker" + }, + "fullDescription": { + "text": "SecuritySyntaxChecker" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "security.insecureAPI", + "index": 12, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "objc-super-self", + "name": "objc-super-self", + "shortDescription": { + "text": "super-self" + }, + "fullDescription": { + "text": "super-self" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "objc", + "index": 40, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "abseil-redundant-strcat-calls", + "name": "abseil-redundant-strcat-calls", + "shortDescription": { + "text": "redundant-strcat-calls" + }, + "fullDescription": { + "text": "redundant-strcat-calls" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "abseil", + "index": 20, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "android-cloexec-accept", + "name": "android-cloexec-accept", + "shortDescription": { + "text": "cloexec-accept" + }, + "fullDescription": { + "text": "cloexec-accept" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "android", + "index": 28, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-chained-comparison", + "name": "bugprone-chained-comparison", + "shortDescription": { + "text": "chained-comparison" + }, + "fullDescription": { + "text": "chained-comparison" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.cocoa.ClassRelease", + "name": "clang-analyzer-osx.cocoa.ClassRelease", + "shortDescription": { + "text": "ClassRelease" + }, + "fullDescription": { + "text": "ClassRelease" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx.cocoa", + "index": 15, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-optin.osx.cocoa.localizability.NonLocalizedStringChecker", + "name": "clang-analyzer-optin.osx.cocoa.localizability.NonLocalizedStringChecker", + "shortDescription": { + "text": "NonLocalizedStringChecker" + }, + "fullDescription": { + "text": "NonLocalizedStringChecker" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "optin.osx.cocoa.localizability", + "index": 55, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.coreFoundation.containers.PointerSizedValues", + "name": "clang-analyzer-osx.coreFoundation.containers.PointerSizedValues", + "shortDescription": { + "text": "PointerSizedValues" + }, + "fullDescription": { + "text": "PointerSizedValues" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx.coreFoundation.containers", + "index": 59, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-member-init", + "name": "hicpp-member-init", + "shortDescription": { + "text": "member-init" + }, + "fullDescription": { + "text": "member-init" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-flp30-c", + "name": "cert-flp30-c", + "shortDescription": { + "text": "flp30-c" + }, + "fullDescription": { + "text": "flp30-c" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-core.uninitialized.Branch", + "name": "clang-analyzer-core.uninitialized.Branch", + "shortDescription": { + "text": "Branch" + }, + "fullDescription": { + "text": "Branch" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "core.uninitialized", + "index": 35, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "fuchsia-trailing-return", + "name": "fuchsia-trailing-return", + "shortDescription": { + "text": "trailing-return" + }, + "fullDescription": { + "text": "trailing-return" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "fuchsia", + "index": 11, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.security.ArrayBound", + "name": "clang-analyzer-alpha.security.ArrayBound", + "shortDescription": { + "text": "ArrayBound" + }, + "fullDescription": { + "text": "ArrayBound" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.security", + "index": 2, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-10-1", + "name": "clion-misra-c2012-10-1", + "shortDescription": { + "text": "misra-c2012-10-1" + }, + "fullDescription": { + "text": "misra-c2012-10-1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-9-5-1", + "name": "clion-misra-cpp2008-9-5-1", + "shortDescription": { + "text": "misra-cpp2008-9-5-1" + }, + "fullDescription": { + "text": "misra-cpp2008-9-5-1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-cplusplus.VirtualCallModeling", + "name": "clang-analyzer-cplusplus.VirtualCallModeling", + "shortDescription": { + "text": "VirtualCallModeling" + }, + "fullDescription": { + "text": "VirtualCallModeling" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cplusplus", + "index": 30, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-18-0-3", + "name": "clion-misra-cpp2008-18-0-3", + "shortDescription": { + "text": "misra-cpp2008-18-0-3" + }, + "fullDescription": { + "text": "misra-cpp2008-18-0-3" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.coreFoundation.containers.OutOfBounds", + "name": "clang-analyzer-osx.coreFoundation.containers.OutOfBounds", + "shortDescription": { + "text": "OutOfBounds" + }, + "fullDescription": { + "text": "OutOfBounds" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx.coreFoundation.containers", + "index": 59, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "name": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "shortDescription": { + "text": "pro-bounds-array-to-pointer-decay" + }, + "fullDescription": { + "text": "pro-bounds-array-to-pointer-decay" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "misc-no-recursion", + "name": "misc-no-recursion", + "shortDescription": { + "text": "no-recursion" + }, + "fullDescription": { + "text": "no-recursion" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "misc", + "index": 27, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-apiModeling.llvm.ReturnValue", + "name": "clang-analyzer-apiModeling.llvm.ReturnValue", + "shortDescription": { + "text": "ReturnValue" + }, + "fullDescription": { + "text": "ReturnValue" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "apiModeling.llvm", + "index": 32, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-incorrect-enable-if", + "name": "bugprone-incorrect-enable-if", + "shortDescription": { + "text": "incorrect-enable-if" + }, + "fullDescription": { + "text": "incorrect-enable-if" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-switch-missing-default-case", + "name": "bugprone-switch-missing-default-case", + "shortDescription": { + "text": "switch-missing-default-case" + }, + "fullDescription": { + "text": "switch-missing-default-case" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-5-0-11", + "name": "clion-misra-cpp2008-5-0-11", + "shortDescription": { + "text": "misra-cpp2008-5-0-11" + }, + "fullDescription": { + "text": "misra-cpp2008-5-0-11" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-redundant-inline-specifier", + "name": "readability-redundant-inline-specifier", + "shortDescription": { + "text": "redundant-inline-specifier" + }, + "fullDescription": { + "text": "redundant-inline-specifier" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-8-1", + "name": "clion-misra-c2012-8-1", + "shortDescription": { + "text": "misra-c2012-8-1" + }, + "fullDescription": { + "text": "misra-c2012-8-1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-6-2", + "name": "clion-misra-c2012-6-2", + "shortDescription": { + "text": "misra-c2012-6-2" + }, + "fullDescription": { + "text": "misra-c2012-6-2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-non-private-member-variables-in-classes", + "name": "cppcoreguidelines-non-private-member-variables-in-classes", + "shortDescription": { + "text": "non-private-member-variables-in-classes" + }, + "fullDescription": { + "text": "non-private-member-variables-in-classes" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-15-1", + "name": "clion-misra-c2012-15-1", + "shortDescription": { + "text": "misra-c2012-15-1" + }, + "fullDescription": { + "text": "misra-c2012-15-1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "abseil-duration-comparison", + "name": "abseil-duration-comparison", + "shortDescription": { + "text": "duration-comparison" + }, + "fullDescription": { + "text": "duration-comparison" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "abseil", + "index": 20, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-avoid-do-while", + "name": "cppcoreguidelines-avoid-do-while", + "shortDescription": { + "text": "avoid-do-while" + }, + "fullDescription": { + "text": "avoid-do-while" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-use-uncaught-exceptions", + "name": "modernize-use-uncaught-exceptions", + "shortDescription": { + "text": "use-uncaught-exceptions" + }, + "fullDescription": { + "text": "use-uncaught-exceptions" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-suspicious-memset-usage", + "name": "bugprone-suspicious-memset-usage", + "shortDescription": { + "text": "suspicious-memset-usage" + }, + "fullDescription": { + "text": "suspicious-memset-usage" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-dcl37-c", + "name": "cert-dcl37-c", + "shortDescription": { + "text": "dcl37-c" + }, + "fullDescription": { + "text": "dcl37-c" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-unix.DynamicMemoryModeling", + "name": "clang-analyzer-unix.DynamicMemoryModeling", + "shortDescription": { + "text": "DynamicMemoryModeling" + }, + "fullDescription": { + "text": "DynamicMemoryModeling" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "unix", + "index": 26, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-msc24-c", + "name": "cert-msc24-c", + "shortDescription": { + "text": "msc24-c" + }, + "fullDescription": { + "text": "msc24-c" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-13-6", + "name": "clion-misra-c2012-13-6", + "shortDescription": { + "text": "misra-c2012-13-6" + }, + "fullDescription": { + "text": "misra-c2012-13-6" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-redundant-branch-condition", + "name": "bugprone-redundant-branch-condition", + "shortDescription": { + "text": "redundant-branch-condition" + }, + "fullDescription": { + "text": "redundant-branch-condition" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.cplusplus.ArrayDelete", + "name": "clang-analyzer-alpha.cplusplus.ArrayDelete", + "shortDescription": { + "text": "ArrayDelete" + }, + "fullDescription": { + "text": "ArrayDelete" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.cplusplus", + "index": 7, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-casting-through-void", + "name": "bugprone-casting-through-void", + "shortDescription": { + "text": "casting-through-void" + }, + "fullDescription": { + "text": "casting-through-void" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-err60-cpp", + "name": "cert-err60-cpp", + "shortDescription": { + "text": "err60-cpp" + }, + "fullDescription": { + "text": "err60-cpp" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.deadcode.UnreachableCode", + "name": "clang-analyzer-alpha.deadcode.UnreachableCode", + "shortDescription": { + "text": "UnreachableCode" + }, + "fullDescription": { + "text": "UnreachableCode" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.deadcode", + "index": 60, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-core.NonnilStringConstants", + "name": "clang-analyzer-core.NonnilStringConstants", + "shortDescription": { + "text": "NonnilStringConstants" + }, + "fullDescription": { + "text": "NonnilStringConstants" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "core", + "index": 37, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-macro-usage", + "name": "cppcoreguidelines-macro-usage", + "shortDescription": { + "text": "macro-usage" + }, + "fullDescription": { + "text": "macro-usage" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-undelegated-constructor", + "name": "hicpp-undelegated-constructor", + "shortDescription": { + "text": "undelegated-constructor" + }, + "fullDescription": { + "text": "undelegated-constructor" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-core.BitwiseShift", + "name": "clang-analyzer-core.BitwiseShift", + "shortDescription": { + "text": "BitwiseShift" + }, + "fullDescription": { + "text": "BitwiseShift" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "core", + "index": 37, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "misc-new-delete-overloads", + "name": "misc-new-delete-overloads", + "shortDescription": { + "text": "new-delete-overloads" + }, + "fullDescription": { + "text": "new-delete-overloads" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "misc", + "index": 27, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-12-5", + "name": "clion-misra-c2012-12-5", + "shortDescription": { + "text": "misra-c2012-12-5" + }, + "fullDescription": { + "text": "misra-c2012-12-5" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-13-4", + "name": "clion-misra-c2012-13-4", + "shortDescription": { + "text": "misra-c2012-13-4" + }, + "fullDescription": { + "text": "misra-c2012-13-4" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-4-5-2", + "name": "clion-misra-cpp2008-4-5-2", + "shortDescription": { + "text": "misra-cpp2008-4-5-2" + }, + "fullDescription": { + "text": "misra-cpp2008-4-5-2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-webkit.NoUncountedMemberChecker", + "name": "clang-analyzer-webkit.NoUncountedMemberChecker", + "shortDescription": { + "text": "NoUncountedMemberChecker" + }, + "fullDescription": { + "text": "NoUncountedMemberChecker" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "webkit", + "index": 39, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "openmp-use-default-none", + "name": "openmp-use-default-none", + "shortDescription": { + "text": "use-default-none" + }, + "fullDescription": { + "text": "use-default-none" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "openmp", + "index": 57, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-6-6-5", + "name": "clion-misra-cpp2008-6-6-5", + "shortDescription": { + "text": "misra-cpp2008-6-6-5" + }, + "fullDescription": { + "text": "misra-cpp2008-6-6-5" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-forwarding-reference-overload", + "name": "bugprone-forwarding-reference-overload", + "shortDescription": { + "text": "forwarding-reference-overload" + }, + "fullDescription": { + "text": "forwarding-reference-overload" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-incorrect-roundings", + "name": "bugprone-incorrect-roundings", + "shortDescription": { + "text": "incorrect-roundings" + }, + "fullDescription": { + "text": "incorrect-roundings" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-duplicate-include", + "name": "readability-duplicate-include", + "shortDescription": { + "text": "duplicate-include" + }, + "fullDescription": { + "text": "duplicate-include" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-15-5", + "name": "clion-misra-c2012-15-5", + "shortDescription": { + "text": "misra-c2012-15-5" + }, + "fullDescription": { + "text": "misra-c2012-15-5" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "misc-use-anonymous-namespace", + "name": "misc-use-anonymous-namespace", + "shortDescription": { + "text": "use-anonymous-namespace" + }, + "fullDescription": { + "text": "use-anonymous-namespace" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "misc", + "index": 27, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-use-transparent-functors", + "name": "modernize-use-transparent-functors", + "shortDescription": { + "text": "use-transparent-functors" + }, + "fullDescription": { + "text": "use-transparent-functors" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-misplaced-pointer-arithmetic-in-alloc", + "name": "bugprone-misplaced-pointer-arithmetic-in-alloc", + "shortDescription": { + "text": "misplaced-pointer-arithmetic-in-alloc" + }, + "fullDescription": { + "text": "misplaced-pointer-arithmetic-in-alloc" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.osx.cocoa.DirectIvarAssignment", + "name": "clang-analyzer-alpha.osx.cocoa.DirectIvarAssignment", + "shortDescription": { + "text": "DirectIvarAssignment" + }, + "fullDescription": { + "text": "DirectIvarAssignment" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.osx.cocoa", + "index": 22, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-err09-cpp", + "name": "cert-err09-cpp", + "shortDescription": { + "text": "err09-cpp" + }, + "fullDescription": { + "text": "err09-cpp" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-macro-repeated-side-effects", + "name": "bugprone-macro-repeated-side-effects", + "shortDescription": { + "text": "macro-repeated-side-effects" + }, + "fullDescription": { + "text": "macro-repeated-side-effects" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-4-10-2", + "name": "clion-misra-cpp2008-4-10-2", + "shortDescription": { + "text": "misra-cpp2008-4-10-2" + }, + "fullDescription": { + "text": "misra-cpp2008-4-10-2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-flp37-c", + "name": "cert-flp37-c", + "shortDescription": { + "text": "flp37-c" + }, + "fullDescription": { + "text": "flp37-c" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-webkit.RefCntblBaseVirtualDtor", + "name": "clang-analyzer-webkit.RefCntblBaseVirtualDtor", + "shortDescription": { + "text": "RefCntblBaseVirtualDtor" + }, + "fullDescription": { + "text": "RefCntblBaseVirtualDtor" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "webkit", + "index": 39, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-5-0-13", + "name": "clion-misra-cpp2008-5-0-13", + "shortDescription": { + "text": "misra-cpp2008-5-0-13" + }, + "fullDescription": { + "text": "misra-cpp2008-5-0-13" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-core.builtin.BuiltinFunctions", + "name": "clang-analyzer-core.builtin.BuiltinFunctions", + "shortDescription": { + "text": "BuiltinFunctions" + }, + "fullDescription": { + "text": "BuiltinFunctions" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "core.builtin", + "index": 36, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.cocoa.ObjCGenerics", + "name": "clang-analyzer-osx.cocoa.ObjCGenerics", + "shortDescription": { + "text": "ObjCGenerics" + }, + "fullDescription": { + "text": "ObjCGenerics" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx.cocoa", + "index": 15, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "portability-simd-intrinsics", + "name": "portability-simd-intrinsics", + "shortDescription": { + "text": "simd-intrinsics" + }, + "fullDescription": { + "text": "simd-intrinsics" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "portability", + "index": 49, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-msc51-cpp", + "name": "cert-msc51-cpp", + "shortDescription": { + "text": "msc51-cpp" + }, + "fullDescription": { + "text": "msc51-cpp" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-avoid-non-const-global-variables", + "name": "cppcoreguidelines-avoid-non-const-global-variables", + "shortDescription": { + "text": "avoid-non-const-global-variables" + }, + "fullDescription": { + "text": "avoid-non-const-global-variables" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-5-0-19", + "name": "clion-misra-cpp2008-5-0-19", + "shortDescription": { + "text": "misra-cpp2008-5-0-19" + }, + "fullDescription": { + "text": "misra-cpp2008-5-0-19" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-5-2-12", + "name": "clion-misra-cpp2008-5-2-12", + "shortDescription": { + "text": "misra-cpp2008-5-2-12" + }, + "fullDescription": { + "text": "misra-cpp2008-5-2-12" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "google-build-explicit-make-pair", + "name": "google-build-explicit-make-pair", + "shortDescription": { + "text": "build-explicit-make-pair" + }, + "fullDescription": { + "text": "build-explicit-make-pair" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "google", + "index": 5, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "abseil-duration-addition", + "name": "abseil-duration-addition", + "shortDescription": { + "text": "duration-addition" + }, + "fullDescription": { + "text": "duration-addition" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "abseil", + "index": 20, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-optin.osx.OSObjectCStyleCast", + "name": "clang-analyzer-optin.osx.OSObjectCStyleCast", + "shortDescription": { + "text": "OSObjectCStyleCast" + }, + "fullDescription": { + "text": "OSObjectCStyleCast" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "optin.osx", + "index": 61, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "google-build-using-namespace", + "name": "google-build-using-namespace", + "shortDescription": { + "text": "build-using-namespace" + }, + "fullDescription": { + "text": "build-using-namespace" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "google", + "index": 5, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "google-readability-todo", + "name": "google-readability-todo", + "shortDescription": { + "text": "readability-todo" + }, + "fullDescription": { + "text": "readability-todo" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "google", + "index": 5, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-replace-disallow-copy-and-assign-macro", + "name": "modernize-replace-disallow-copy-and-assign-macro", + "shortDescription": { + "text": "replace-disallow-copy-and-assign-macro" + }, + "fullDescription": { + "text": "replace-disallow-copy-and-assign-macro" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-else-after-return", + "name": "readability-else-after-return", + "shortDescription": { + "text": "else-after-return" + }, + "fullDescription": { + "text": "else-after-return" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-function-size", + "name": "readability-function-size", + "shortDescription": { + "text": "function-size" + }, + "fullDescription": { + "text": "function-size" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-stringview-nullptr", + "name": "bugprone-stringview-nullptr", + "shortDescription": { + "text": "stringview-nullptr" + }, + "fullDescription": { + "text": "stringview-nullptr" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-msc32-c", + "name": "cert-msc32-c", + "shortDescription": { + "text": "msc32-c" + }, + "fullDescription": { + "text": "msc32-c" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-err34-c", + "name": "cert-err34-c", + "shortDescription": { + "text": "err34-c" + }, + "fullDescription": { + "text": "err34-c" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-unix.Errno", + "name": "clang-analyzer-unix.Errno", + "shortDescription": { + "text": "Errno" + }, + "fullDescription": { + "text": "Errno" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "unix", + "index": 26, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-11-3", + "name": "clion-misra-c2012-11-3", + "shortDescription": { + "text": "misra-c2012-11-3" + }, + "fullDescription": { + "text": "misra-c2012-11-3" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-avoid-magic-numbers", + "name": "cppcoreguidelines-avoid-magic-numbers", + "shortDescription": { + "text": "avoid-magic-numbers" + }, + "fullDescription": { + "text": "avoid-magic-numbers" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-unhandled-self-assignment", + "name": "bugprone-unhandled-self-assignment", + "shortDescription": { + "text": "unhandled-self-assignment" + }, + "fullDescription": { + "text": "unhandled-self-assignment" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-simplify-boolean-expr", + "name": "readability-simplify-boolean-expr", + "shortDescription": { + "text": "simplify-boolean-expr" + }, + "fullDescription": { + "text": "simplify-boolean-expr" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "android-cloexec-open", + "name": "android-cloexec-open", + "shortDescription": { + "text": "cloexec-open" + }, + "fullDescription": { + "text": "cloexec-open" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "android", + "index": 28, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.osx.cocoa.IvarInvalidationModeling", + "name": "clang-analyzer-alpha.osx.cocoa.IvarInvalidationModeling", + "shortDescription": { + "text": "IvarInvalidationModeling" + }, + "fullDescription": { + "text": "IvarInvalidationModeling" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.osx.cocoa", + "index": 22, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-forward-declaration-namespace", + "name": "bugprone-forward-declaration-namespace", + "shortDescription": { + "text": "forward-declaration-namespace" + }, + "fullDescription": { + "text": "forward-declaration-namespace" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "abseil-duration-subtraction", + "name": "abseil-duration-subtraction", + "shortDescription": { + "text": "duration-subtraction" + }, + "fullDescription": { + "text": "duration-subtraction" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "abseil", + "index": 20, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-no-malloc", + "name": "cppcoreguidelines-no-malloc", + "shortDescription": { + "text": "no-malloc" + }, + "fullDescription": { + "text": "no-malloc" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-core.StackAddressEscape", + "name": "clang-analyzer-core.StackAddressEscape", + "shortDescription": { + "text": "StackAddressEscape" + }, + "fullDescription": { + "text": "StackAddressEscape" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "core", + "index": 37, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.core.PthreadLockBase", + "name": "clang-analyzer-alpha.core.PthreadLockBase", + "shortDescription": { + "text": "PthreadLockBase" + }, + "fullDescription": { + "text": "PthreadLockBase" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.core", + "index": 4, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-return-braced-init-list", + "name": "modernize-return-braced-init-list", + "shortDescription": { + "text": "return-braced-init-list" + }, + "fullDescription": { + "text": "return-braced-init-list" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.cocoa.UnusedIvars", + "name": "clang-analyzer-osx.cocoa.UnusedIvars", + "shortDescription": { + "text": "UnusedIvars" + }, + "fullDescription": { + "text": "UnusedIvars" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx.cocoa", + "index": 15, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-multi-level-implicit-pointer-conversion", + "name": "bugprone-multi-level-implicit-pointer-conversion", + "shortDescription": { + "text": "multi-level-implicit-pointer-conversion" + }, + "fullDescription": { + "text": "multi-level-implicit-pointer-conversion" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-cplusplus.InnerPointer", + "name": "clang-analyzer-cplusplus.InnerPointer", + "shortDescription": { + "text": "InnerPointer" + }, + "fullDescription": { + "text": "InnerPointer" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cplusplus", + "index": 30, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-security.insecureAPI.vfork", + "name": "clang-analyzer-security.insecureAPI.vfork", + "shortDescription": { + "text": "vfork" + }, + "fullDescription": { + "text": "vfork" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "security.insecureAPI", + "index": 12, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.cplusplus.MismatchedIterator", + "name": "clang-analyzer-alpha.cplusplus.MismatchedIterator", + "shortDescription": { + "text": "MismatchedIterator" + }, + "fullDescription": { + "text": "MismatchedIterator" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.cplusplus", + "index": 7, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-15-1-3", + "name": "clion-misra-cpp2008-15-1-3", + "shortDescription": { + "text": "misra-cpp2008-15-1-3" + }, + "fullDescription": { + "text": "misra-cpp2008-15-1-3" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-macro-to-enum", + "name": "cppcoreguidelines-macro-to-enum", + "shortDescription": { + "text": "macro-to-enum" + }, + "fullDescription": { + "text": "macro-to-enum" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "llvm-twine-local", + "name": "llvm-twine-local", + "shortDescription": { + "text": "twine-local" + }, + "fullDescription": { + "text": "twine-local" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "llvm", + "index": 16, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-macro-parentheses", + "name": "bugprone-macro-parentheses", + "shortDescription": { + "text": "macro-parentheses" + }, + "fullDescription": { + "text": "macro-parentheses" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.coreFoundation.CFNumber", + "name": "clang-analyzer-osx.coreFoundation.CFNumber", + "shortDescription": { + "text": "CFNumber" + }, + "fullDescription": { + "text": "CFNumber" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx.coreFoundation", + "index": 29, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "altera-unroll-loops", + "name": "altera-unroll-loops", + "shortDescription": { + "text": "unroll-loops" + }, + "fullDescription": { + "text": "unroll-loops" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "altera", + "index": 33, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "fuchsia-virtual-inheritance", + "name": "fuchsia-virtual-inheritance", + "shortDescription": { + "text": "virtual-inheritance" + }, + "fullDescription": { + "text": "virtual-inheritance" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "fuchsia", + "index": 11, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "performance-noexcept-destructor", + "name": "performance-noexcept-destructor", + "shortDescription": { + "text": "noexcept-destructor" + }, + "fullDescription": { + "text": "noexcept-destructor" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "performance", + "index": 8, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-21-10", + "name": "clion-misra-c2012-21-10", + "shortDescription": { + "text": "misra-c2012-21-10" + }, + "fullDescription": { + "text": "misra-c2012-21-10" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-8-14", + "name": "clion-misra-c2012-8-14", + "shortDescription": { + "text": "misra-c2012-8-14" + }, + "fullDescription": { + "text": "misra-c2012-8-14" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-not-null-terminated-result", + "name": "bugprone-not-null-terminated-result", + "shortDescription": { + "text": "not-null-terminated-result" + }, + "fullDescription": { + "text": "not-null-terminated-result" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.cplusplus.SmartPtr", + "name": "clang-analyzer-alpha.cplusplus.SmartPtr", + "shortDescription": { + "text": "SmartPtr" + }, + "fullDescription": { + "text": "SmartPtr" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.cplusplus", + "index": 7, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-security.insecureAPI.UncheckedReturn", + "name": "clang-analyzer-security.insecureAPI.UncheckedReturn", + "shortDescription": { + "text": "UncheckedReturn" + }, + "fullDescription": { + "text": "UncheckedReturn" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "security.insecureAPI", + "index": 12, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "llvmlibc-callee-namespace", + "name": "llvmlibc-callee-namespace", + "shortDescription": { + "text": "callee-namespace" + }, + "fullDescription": { + "text": "callee-namespace" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "llvmlibc", + "index": 6, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "objc-avoid-nserror-init", + "name": "objc-avoid-nserror-init", + "shortDescription": { + "text": "avoid-nserror-init" + }, + "fullDescription": { + "text": "avoid-nserror-init" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "objc", + "index": 40, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.core.BoolAssignment", + "name": "clang-analyzer-alpha.core.BoolAssignment", + "shortDescription": { + "text": "BoolAssignment" + }, + "fullDescription": { + "text": "BoolAssignment" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.core", + "index": 4, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.core.PointerSub", + "name": "clang-analyzer-alpha.core.PointerSub", + "shortDescription": { + "text": "PointerSub" + }, + "fullDescription": { + "text": "PointerSub" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.core", + "index": 4, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "fuchsia-default-arguments-declarations", + "name": "fuchsia-default-arguments-declarations", + "shortDescription": { + "text": "default-arguments-declarations" + }, + "fullDescription": { + "text": "default-arguments-declarations" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "fuchsia", + "index": 11, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-suspicious-semicolon", + "name": "bugprone-suspicious-semicolon", + "shortDescription": { + "text": "suspicious-semicolon" + }, + "fullDescription": { + "text": "suspicious-semicolon" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-13-5", + "name": "clion-misra-c2012-13-5", + "shortDescription": { + "text": "misra-c2012-13-5" + }, + "fullDescription": { + "text": "misra-c2012-13-5" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-branch-clone", + "name": "bugprone-branch-clone", + "shortDescription": { + "text": "branch-clone" + }, + "fullDescription": { + "text": "branch-clone" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-fold-init-type", + "name": "bugprone-fold-init-type", + "shortDescription": { + "text": "fold-init-type" + }, + "fullDescription": { + "text": "fold-init-type" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-dcl03-c", + "name": "cert-dcl03-c", + "shortDescription": { + "text": "dcl03-c" + }, + "fullDescription": { + "text": "dcl03-c" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-nullability.NullabilityBase", + "name": "clang-analyzer-nullability.NullabilityBase", + "shortDescription": { + "text": "NullabilityBase" + }, + "fullDescription": { + "text": "NullabilityBase" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "nullability", + "index": 42, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-macro-to-enum", + "name": "modernize-macro-to-enum", + "shortDescription": { + "text": "macro-to-enum" + }, + "fullDescription": { + "text": "macro-to-enum" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-2-13-4", + "name": "clion-misra-cpp2008-2-13-4", + "shortDescription": { + "text": "misra-cpp2008-2-13-4" + }, + "fullDescription": { + "text": "misra-cpp2008-2-13-4" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.unix.BlockInCriticalSection", + "name": "clang-analyzer-alpha.unix.BlockInCriticalSection", + "shortDescription": { + "text": "BlockInCriticalSection" + }, + "fullDescription": { + "text": "BlockInCriticalSection" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.unix", + "index": 21, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-init-variables", + "name": "cppcoreguidelines-init-variables", + "shortDescription": { + "text": "init-variables" + }, + "fullDescription": { + "text": "init-variables" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "performance-no-int-to-ptr", + "name": "performance-no-int-to-ptr", + "shortDescription": { + "text": "no-int-to-ptr" + }, + "fullDescription": { + "text": "no-int-to-ptr" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "performance", + "index": 8, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-argument-selection-defects", + "name": "clion-argument-selection-defects", + "shortDescription": { + "text": "argument-selection-defects" + }, + "fullDescription": { + "text": "argument-selection-defects" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-assignment-in-if-condition", + "name": "bugprone-assignment-in-if-condition", + "shortDescription": { + "text": "assignment-in-if-condition" + }, + "fullDescription": { + "text": "assignment-in-if-condition" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-undelegated-constructor", + "name": "bugprone-undelegated-constructor", + "shortDescription": { + "text": "undelegated-constructor" + }, + "fullDescription": { + "text": "undelegated-constructor" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-terminating-continue", + "name": "bugprone-terminating-continue", + "shortDescription": { + "text": "terminating-continue" + }, + "fullDescription": { + "text": "terminating-continue" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.core.CastSize", + "name": "clang-analyzer-alpha.core.CastSize", + "shortDescription": { + "text": "CastSize" + }, + "fullDescription": { + "text": "CastSize" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.core", + "index": 4, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.unix.cstring.NotNullTerminated", + "name": "clang-analyzer-alpha.unix.cstring.NotNullTerminated", + "shortDescription": { + "text": "NotNullTerminated" + }, + "fullDescription": { + "text": "NotNullTerminated" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.unix.cstring", + "index": 58, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-7-2", + "name": "clion-misra-c2012-7-2", + "shortDescription": { + "text": "misra-c2012-7-2" + }, + "fullDescription": { + "text": "misra-c2012-7-2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-security.insecureAPI.rand", + "name": "clang-analyzer-security.insecureAPI.rand", + "shortDescription": { + "text": "rand" + }, + "fullDescription": { + "text": "rand" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "security.insecureAPI", + "index": 12, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "android-cloexec-inotify-init1", + "name": "android-cloexec-inotify-init1", + "shortDescription": { + "text": "cloexec-inotify-init1" + }, + "fullDescription": { + "text": "cloexec-inotify-init1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "android", + "index": 28, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-misplaced-operator-in-strlen-in-alloc", + "name": "bugprone-misplaced-operator-in-strlen-in-alloc", + "shortDescription": { + "text": "misplaced-operator-in-strlen-in-alloc" + }, + "fullDescription": { + "text": "misplaced-operator-in-strlen-in-alloc" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-6-4-6", + "name": "clion-misra-cpp2008-6-4-6", + "shortDescription": { + "text": "misra-cpp2008-6-4-6" + }, + "fullDescription": { + "text": "misra-cpp2008-6-4-6" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "misc-misleading-bidirectional", + "name": "misc-misleading-bidirectional", + "shortDescription": { + "text": "misleading-bidirectional" + }, + "fullDescription": { + "text": "misleading-bidirectional" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "misc", + "index": 27, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-6-1", + "name": "clion-misra-c2012-6-1", + "shortDescription": { + "text": "misra-c2012-6-1" + }, + "fullDescription": { + "text": "misra-c2012-6-1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-5-2-10", + "name": "clion-misra-cpp2008-5-2-10", + "shortDescription": { + "text": "misra-cpp2008-5-2-10" + }, + "fullDescription": { + "text": "misra-cpp2008-5-2-10" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.cocoa.AtSync", + "name": "clang-analyzer-osx.cocoa.AtSync", + "shortDescription": { + "text": "AtSync" + }, + "fullDescription": { + "text": "AtSync" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx.cocoa", + "index": 15, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "performance-unnecessary-copy-initialization", + "name": "performance-unnecessary-copy-initialization", + "shortDescription": { + "text": "unnecessary-copy-initialization" + }, + "fullDescription": { + "text": "unnecessary-copy-initialization" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "performance", + "index": 8, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.core.PointerArithm", + "name": "clang-analyzer-alpha.core.PointerArithm", + "shortDescription": { + "text": "PointerArithm" + }, + "fullDescription": { + "text": "PointerArithm" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.core", + "index": 4, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "performance-faster-string-find", + "name": "performance-faster-string-find", + "shortDescription": { + "text": "faster-string-find" + }, + "fullDescription": { + "text": "faster-string-find" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "performance", + "index": 8, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-3-1-2", + "name": "clion-misra-cpp2008-3-1-2", + "shortDescription": { + "text": "misra-cpp2008-3-1-2" + }, + "fullDescription": { + "text": "misra-cpp2008-3-1-2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-rvalue-reference-param-not-moved", + "name": "cppcoreguidelines-rvalue-reference-param-not-moved", + "shortDescription": { + "text": "rvalue-reference-param-not-moved" + }, + "fullDescription": { + "text": "rvalue-reference-param-not-moved" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-sizeof-expression", + "name": "bugprone-sizeof-expression", + "shortDescription": { + "text": "sizeof-expression" + }, + "fullDescription": { + "text": "sizeof-expression" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-9-3", + "name": "clion-misra-c2012-9-3", + "shortDescription": { + "text": "misra-c2012-9-3" + }, + "fullDescription": { + "text": "misra-c2012-9-3" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.cplusplus.DeleteWithNonVirtualDtor", + "name": "clang-analyzer-alpha.cplusplus.DeleteWithNonVirtualDtor", + "shortDescription": { + "text": "DeleteWithNonVirtualDtor" + }, + "fullDescription": { + "text": "DeleteWithNonVirtualDtor" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.cplusplus", + "index": 7, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-9-5", + "name": "clion-misra-c2012-9-5", + "shortDescription": { + "text": "misra-c2012-9-5" + }, + "fullDescription": { + "text": "misra-c2012-9-5" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-5-2-11", + "name": "clion-misra-cpp2008-5-2-11", + "shortDescription": { + "text": "misra-cpp2008-5-2-11" + }, + "fullDescription": { + "text": "misra-cpp2008-5-2-11" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-5-3-3", + "name": "clion-misra-cpp2008-5-3-3", + "shortDescription": { + "text": "misra-cpp2008-5-3-3" + }, + "fullDescription": { + "text": "misra-cpp2008-5-3-3" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-use-after-move", + "name": "bugprone-use-after-move", + "shortDescription": { + "text": "use-after-move" + }, + "fullDescription": { + "text": "use-after-move" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-nullability.NullablePassedToNonnull", + "name": "clang-analyzer-nullability.NullablePassedToNonnull", + "shortDescription": { + "text": "NullablePassedToNonnull" + }, + "fullDescription": { + "text": "NullablePassedToNonnull" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "nullability", + "index": 42, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-cplusplus.NewDeleteLeaks", + "name": "clang-analyzer-cplusplus.NewDeleteLeaks", + "shortDescription": { + "text": "NewDeleteLeaks" + }, + "fullDescription": { + "text": "NewDeleteLeaks" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cplusplus", + "index": 30, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-unix.cstring.NullArg", + "name": "clang-analyzer-unix.cstring.NullArg", + "shortDescription": { + "text": "NullArg" + }, + "fullDescription": { + "text": "NullArg" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "unix.cstring", + "index": 31, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.cocoa.Loops", + "name": "clang-analyzer-osx.cocoa.Loops", + "shortDescription": { + "text": "Loops" + }, + "fullDescription": { + "text": "Loops" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx.cocoa", + "index": 15, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-16-6", + "name": "clion-misra-c2012-16-6", + "shortDescription": { + "text": "misra-c2012-16-6" + }, + "fullDescription": { + "text": "misra-c2012-16-6" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-12-3", + "name": "clion-misra-c2012-12-3", + "shortDescription": { + "text": "misra-c2012-12-3" + }, + "fullDescription": { + "text": "misra-c2012-12-3" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-2-13-1", + "name": "clion-misra-cpp2008-2-13-1", + "shortDescription": { + "text": "misra-cpp2008-2-13-1" + }, + "fullDescription": { + "text": "misra-cpp2008-2-13-1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "misc-definitions-in-headers", + "name": "misc-definitions-in-headers", + "shortDescription": { + "text": "definitions-in-headers" + }, + "fullDescription": { + "text": "definitions-in-headers" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "misc", + "index": 27, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling", + "name": "clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling", + "shortDescription": { + "text": "DeprecatedOrUnsafeBufferHandling" + }, + "fullDescription": { + "text": "DeprecatedOrUnsafeBufferHandling" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "security.insecureAPI", + "index": 12, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-11-4", + "name": "clion-misra-c2012-11-4", + "shortDescription": { + "text": "misra-c2012-11-4" + }, + "fullDescription": { + "text": "misra-c2012-11-4" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "abseil-str-cat-append", + "name": "abseil-str-cat-append", + "shortDescription": { + "text": "str-cat-append" + }, + "fullDescription": { + "text": "str-cat-append" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "abseil", + "index": 20, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-security.insecureAPI.bzero", + "name": "clang-analyzer-security.insecureAPI.bzero", + "shortDescription": { + "text": "bzero" + }, + "fullDescription": { + "text": "bzero" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "security.insecureAPI", + "index": 12, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "portability-restrict-system-includes", + "name": "portability-restrict-system-includes", + "shortDescription": { + "text": "restrict-system-includes" + }, + "fullDescription": { + "text": "restrict-system-includes" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "portability", + "index": 49, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-6-4-8", + "name": "clion-misra-cpp2008-6-4-8", + "shortDescription": { + "text": "misra-cpp2008-6-4-8" + }, + "fullDescription": { + "text": "misra-cpp2008-6-4-8" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-6-4-5", + "name": "clion-misra-cpp2008-6-4-5", + "shortDescription": { + "text": "misra-cpp2008-6-4-5" + }, + "fullDescription": { + "text": "misra-cpp2008-6-4-5" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.unix.cstring.OutOfBounds", + "name": "clang-analyzer-alpha.unix.cstring.OutOfBounds", + "shortDescription": { + "text": "OutOfBounds" + }, + "fullDescription": { + "text": "OutOfBounds" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.unix.cstring", + "index": 58, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-non-const-parameter", + "name": "readability-non-const-parameter", + "shortDescription": { + "text": "non-const-parameter" + }, + "fullDescription": { + "text": "non-const-parameter" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-multiple-statement-macro", + "name": "bugprone-multiple-statement-macro", + "shortDescription": { + "text": "multiple-statement-macro" + }, + "fullDescription": { + "text": "multiple-statement-macro" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-make-member-function-const", + "name": "readability-make-member-function-const", + "shortDescription": { + "text": "make-member-function-const" + }, + "fullDescription": { + "text": "make-member-function-const" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-4-3", + "name": "clion-misra-c2012-4-3", + "shortDescription": { + "text": "misra-c2012-4-3" + }, + "fullDescription": { + "text": "misra-c2012-4-3" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-special-member-functions", + "name": "cppcoreguidelines-special-member-functions", + "shortDescription": { + "text": "special-member-functions" + }, + "fullDescription": { + "text": "special-member-functions" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "llvm-namespace-comment", + "name": "llvm-namespace-comment", + "shortDescription": { + "text": "namespace-comment" + }, + "fullDescription": { + "text": "namespace-comment" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "llvm", + "index": 16, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "performance-inefficient-algorithm", + "name": "performance-inefficient-algorithm", + "shortDescription": { + "text": "inefficient-algorithm" + }, + "fullDescription": { + "text": "inefficient-algorithm" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "performance", + "index": 8, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-5-14-1", + "name": "clion-misra-cpp2008-5-14-1", + "shortDescription": { + "text": "misra-cpp2008-5-14-1" + }, + "fullDescription": { + "text": "misra-cpp2008-5-14-1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-type-traits", + "name": "modernize-type-traits", + "shortDescription": { + "text": "type-traits" + }, + "fullDescription": { + "text": "type-traits" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-container-size-empty", + "name": "readability-container-size-empty", + "shortDescription": { + "text": "container-size-empty" + }, + "fullDescription": { + "text": "container-size-empty" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-18-2-1", + "name": "clion-misra-cpp2008-18-2-1", + "shortDescription": { + "text": "misra-cpp2008-18-2-1" + }, + "fullDescription": { + "text": "misra-cpp2008-18-2-1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-braces-around-statements", + "name": "hicpp-braces-around-statements", + "shortDescription": { + "text": "braces-around-statements" + }, + "fullDescription": { + "text": "braces-around-statements" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-implicit-bool-conversion", + "name": "readability-implicit-bool-conversion", + "shortDescription": { + "text": "implicit-bool-conversion" + }, + "fullDescription": { + "text": "implicit-bool-conversion" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-unused-raii", + "name": "bugprone-unused-raii", + "shortDescription": { + "text": "unused-raii" + }, + "fullDescription": { + "text": "unused-raii" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-operators-representation", + "name": "readability-operators-representation", + "shortDescription": { + "text": "operators-representation" + }, + "fullDescription": { + "text": "operators-representation" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.unix.Stream", + "name": "clang-analyzer-alpha.unix.Stream", + "shortDescription": { + "text": "Stream" + }, + "fullDescription": { + "text": "Stream" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.unix", + "index": 21, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-18-0-4", + "name": "clion-misra-cpp2008-18-0-4", + "shortDescription": { + "text": "misra-cpp2008-18-0-4" + }, + "fullDescription": { + "text": "misra-cpp2008-18-0-4" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-standalone-empty", + "name": "bugprone-standalone-empty", + "shortDescription": { + "text": "standalone-empty" + }, + "fullDescription": { + "text": "standalone-empty" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-use-emplace", + "name": "hicpp-use-emplace", + "shortDescription": { + "text": "use-emplace" + }, + "fullDescription": { + "text": "use-emplace" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-virtual-near-miss", + "name": "bugprone-virtual-near-miss", + "shortDescription": { + "text": "virtual-near-miss" + }, + "fullDescription": { + "text": "virtual-near-miss" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-function-size", + "name": "hicpp-function-size", + "shortDescription": { + "text": "function-size" + }, + "fullDescription": { + "text": "function-size" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-security.insecureAPI.getpw", + "name": "clang-analyzer-security.insecureAPI.getpw", + "shortDescription": { + "text": "getpw" + }, + "fullDescription": { + "text": "getpw" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "security.insecureAPI", + "index": 12, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "android-cloexec-fopen", + "name": "android-cloexec-fopen", + "shortDescription": { + "text": "cloexec-fopen" + }, + "fullDescription": { + "text": "cloexec-fopen" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "android", + "index": 28, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.core.StdVariant", + "name": "clang-analyzer-alpha.core.StdVariant", + "shortDescription": { + "text": "StdVariant" + }, + "fullDescription": { + "text": "StdVariant" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.core", + "index": 4, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-static-accessed-through-instance", + "name": "readability-static-accessed-through-instance", + "shortDescription": { + "text": "static-accessed-through-instance" + }, + "fullDescription": { + "text": "static-accessed-through-instance" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "android-cloexec-creat", + "name": "android-cloexec-creat", + "shortDescription": { + "text": "cloexec-creat" + }, + "fullDescription": { + "text": "cloexec-creat" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "android", + "index": 28, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.security.cert.pos.34c", + "name": "clang-analyzer-alpha.security.cert.pos.34c", + "shortDescription": { + "text": "34c" + }, + "fullDescription": { + "text": "34c" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.security.cert.pos", + "index": 62, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.cplusplus.IteratorModeling", + "name": "clang-analyzer-alpha.cplusplus.IteratorModeling", + "shortDescription": { + "text": "IteratorModeling" + }, + "fullDescription": { + "text": "IteratorModeling" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.cplusplus", + "index": 7, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-security.insecureAPI.mktemp", + "name": "clang-analyzer-security.insecureAPI.mktemp", + "shortDescription": { + "text": "mktemp" + }, + "fullDescription": { + "text": "mktemp" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "security.insecureAPI", + "index": 12, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.osx.cocoa.MissingInvalidationMethod", + "name": "clang-analyzer-alpha.osx.cocoa.MissingInvalidationMethod", + "shortDescription": { + "text": "MissingInvalidationMethod" + }, + "fullDescription": { + "text": "MissingInvalidationMethod" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.osx.cocoa", + "index": 22, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.cocoa.NilArg", + "name": "clang-analyzer-osx.cocoa.NilArg", + "shortDescription": { + "text": "NilArg" + }, + "fullDescription": { + "text": "NilArg" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx.cocoa", + "index": 15, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-msc33-c", + "name": "cert-msc33-c", + "shortDescription": { + "text": "msc33-c" + }, + "fullDescription": { + "text": "msc33-c" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-5-3-4", + "name": "clion-misra-cpp2008-5-3-4", + "shortDescription": { + "text": "misra-cpp2008-5-3-4" + }, + "fullDescription": { + "text": "misra-cpp2008-5-3-4" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "misc-coroutine-hostile-raii", + "name": "misc-coroutine-hostile-raii", + "shortDescription": { + "text": "coroutine-hostile-raii" + }, + "fullDescription": { + "text": "coroutine-hostile-raii" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "misc", + "index": 27, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-use-starts-ends-with", + "name": "modernize-use-starts-ends-with", + "shortDescription": { + "text": "use-starts-ends-with" + }, + "fullDescription": { + "text": "use-starts-ends-with" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-magic-numbers", + "name": "readability-magic-numbers", + "shortDescription": { + "text": "magic-numbers" + }, + "fullDescription": { + "text": "magic-numbers" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-redundant-member-init", + "name": "readability-redundant-member-init", + "shortDescription": { + "text": "redundant-member-init" + }, + "fullDescription": { + "text": "redundant-member-init" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-use-auto", + "name": "hicpp-use-auto", + "shortDescription": { + "text": "use-auto" + }, + "fullDescription": { + "text": "use-auto" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-special-member-functions", + "name": "hicpp-special-member-functions", + "shortDescription": { + "text": "special-member-functions" + }, + "fullDescription": { + "text": "special-member-functions" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-5-18-1", + "name": "clion-misra-cpp2008-5-18-1", + "shortDescription": { + "text": "misra-cpp2008-5-18-1" + }, + "fullDescription": { + "text": "misra-cpp2008-5-18-1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-replace-enable-if", + "name": "clion-replace-enable-if", + "shortDescription": { + "text": "replace-enable-if" + }, + "fullDescription": { + "text": "replace-enable-if" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-use-noexcept", + "name": "modernize-use-noexcept", + "shortDescription": { + "text": "use-noexcept" + }, + "fullDescription": { + "text": "use-noexcept" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-explicit-virtual-functions", + "name": "cppcoreguidelines-explicit-virtual-functions", + "shortDescription": { + "text": "explicit-virtual-functions" + }, + "fullDescription": { + "text": "explicit-virtual-functions" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-named-parameter", + "name": "hicpp-named-parameter", + "shortDescription": { + "text": "named-parameter" + }, + "fullDescription": { + "text": "named-parameter" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-optin.cplusplus.VirtualCall", + "name": "clang-analyzer-optin.cplusplus.VirtualCall", + "shortDescription": { + "text": "VirtualCall" + }, + "fullDescription": { + "text": "VirtualCall" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "optin.cplusplus", + "index": 63, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.unix.cstring.BufferOverlap", + "name": "clang-analyzer-alpha.unix.cstring.BufferOverlap", + "shortDescription": { + "text": "BufferOverlap" + }, + "fullDescription": { + "text": "BufferOverlap" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.unix.cstring", + "index": 58, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-apiModeling.TrustNonnull", + "name": "clang-analyzer-apiModeling.TrustNonnull", + "shortDescription": { + "text": "TrustNonnull" + }, + "fullDescription": { + "text": "TrustNonnull" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "apiModeling", + "index": 64, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-22-5", + "name": "clion-misra-c2012-22-5", + "shortDescription": { + "text": "misra-c2012-22-5" + }, + "fullDescription": { + "text": "misra-c2012-22-5" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-apiModeling.TrustReturnsNonnull", + "name": "clang-analyzer-apiModeling.TrustReturnsNonnull", + "shortDescription": { + "text": "TrustReturnsNonnull" + }, + "fullDescription": { + "text": "TrustReturnsNonnull" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "apiModeling", + "index": 64, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-avoid-c-arrays", + "name": "cppcoreguidelines-avoid-c-arrays", + "shortDescription": { + "text": "avoid-c-arrays" + }, + "fullDescription": { + "text": "avoid-c-arrays" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-suspicious-include", + "name": "bugprone-suspicious-include", + "shortDescription": { + "text": "suspicious-include" + }, + "fullDescription": { + "text": "suspicious-include" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-make-unique", + "name": "modernize-make-unique", + "shortDescription": { + "text": "make-unique" + }, + "fullDescription": { + "text": "make-unique" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-4-5-1", + "name": "clion-misra-cpp2008-4-5-1", + "shortDescription": { + "text": "misra-cpp2008-4-5-1" + }, + "fullDescription": { + "text": "misra-cpp2008-4-5-1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-18-4", + "name": "clion-misra-c2012-18-4", + "shortDescription": { + "text": "misra-c2012-18-4" + }, + "fullDescription": { + "text": "misra-c2012-18-4" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-new-delete-operators", + "name": "hicpp-new-delete-operators", + "shortDescription": { + "text": "new-delete-operators" + }, + "fullDescription": { + "text": "new-delete-operators" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-valist.ValistBase", + "name": "clang-analyzer-valist.ValistBase", + "shortDescription": { + "text": "ValistBase" + }, + "fullDescription": { + "text": "ValistBase" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "valist", + "index": 38, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-19-2", + "name": "clion-misra-c2012-19-2", + "shortDescription": { + "text": "misra-c2012-19-2" + }, + "fullDescription": { + "text": "misra-c2012-19-2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-uppercase-literal-suffix", + "name": "readability-uppercase-literal-suffix", + "shortDescription": { + "text": "uppercase-literal-suffix" + }, + "fullDescription": { + "text": "uppercase-literal-suffix" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.core.CastToStruct", + "name": "clang-analyzer-alpha.core.CastToStruct", + "shortDescription": { + "text": "CastToStruct" + }, + "fullDescription": { + "text": "CastToStruct" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.core", + "index": 4, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "objc-missing-hash", + "name": "objc-missing-hash", + "shortDescription": { + "text": "missing-hash" + }, + "fullDescription": { + "text": "missing-hash" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "objc", + "index": 40, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "objc-property-declaration", + "name": "objc-property-declaration", + "shortDescription": { + "text": "property-declaration" + }, + "fullDescription": { + "text": "property-declaration" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "objc", + "index": 40, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-loop-convert", + "name": "modernize-loop-convert", + "shortDescription": { + "text": "loop-convert" + }, + "fullDescription": { + "text": "loop-convert" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.core.Conversion", + "name": "clang-analyzer-alpha.core.Conversion", + "shortDescription": { + "text": "Conversion" + }, + "fullDescription": { + "text": "Conversion" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.core", + "index": 4, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-6-5-3", + "name": "clion-misra-cpp2008-6-5-3", + "shortDescription": { + "text": "misra-cpp2008-6-5-3" + }, + "fullDescription": { + "text": "misra-cpp2008-6-5-3" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-valist.Unterminated", + "name": "clang-analyzer-valist.Unterminated", + "shortDescription": { + "text": "Unterminated" + }, + "fullDescription": { + "text": "Unterminated" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "valist", + "index": 38, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "google-readability-casting", + "name": "google-readability-casting", + "shortDescription": { + "text": "readability-casting" + }, + "fullDescription": { + "text": "readability-casting" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "google", + "index": 5, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-suspicious-call-argument", + "name": "readability-suspicious-call-argument", + "shortDescription": { + "text": "suspicious-call-argument" + }, + "fullDescription": { + "text": "suspicious-call-argument" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "google-default-arguments", + "name": "google-default-arguments", + "shortDescription": { + "text": "default-arguments" + }, + "fullDescription": { + "text": "default-arguments" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "google", + "index": 5, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-uniqueptr-delete-release", + "name": "readability-uniqueptr-delete-release", + "shortDescription": { + "text": "uniqueptr-delete-release" + }, + "fullDescription": { + "text": "uniqueptr-delete-release" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "performance-avoid-endl", + "name": "performance-avoid-endl", + "shortDescription": { + "text": "avoid-endl" + }, + "fullDescription": { + "text": "avoid-endl" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "performance", + "index": 8, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-5-0-6", + "name": "clion-misra-cpp2008-5-0-6", + "shortDescription": { + "text": "misra-cpp2008-5-0-6" + }, + "fullDescription": { + "text": "misra-cpp2008-5-0-6" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-use-trailing-return-type", + "name": "modernize-use-trailing-return-type", + "shortDescription": { + "text": "use-trailing-return-type" + }, + "fullDescription": { + "text": "use-trailing-return-type" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.security.MmapWriteExec", + "name": "clang-analyzer-alpha.security.MmapWriteExec", + "shortDescription": { + "text": "MmapWriteExec" + }, + "fullDescription": { + "text": "MmapWriteExec" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.security", + "index": 2, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-core.UndefinedBinaryOperatorResult", + "name": "clang-analyzer-core.UndefinedBinaryOperatorResult", + "shortDescription": { + "text": "UndefinedBinaryOperatorResult" + }, + "fullDescription": { + "text": "UndefinedBinaryOperatorResult" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "core", + "index": 37, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.nondeterminism.PointerSorting", + "name": "clang-analyzer-alpha.nondeterminism.PointerSorting", + "shortDescription": { + "text": "PointerSorting" + }, + "fullDescription": { + "text": "PointerSorting" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.nondeterminism", + "index": 54, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.cocoa.RetainCount", + "name": "clang-analyzer-osx.cocoa.RetainCount", + "shortDescription": { + "text": "RetainCount" + }, + "fullDescription": { + "text": "RetainCount" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx.cocoa", + "index": 15, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "linuxkernel-must-check-errs", + "name": "linuxkernel-must-check-errs", + "shortDescription": { + "text": "must-check-errs" + }, + "fullDescription": { + "text": "must-check-errs" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "linuxkernel", + "index": 65, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-apiModeling.Errno", + "name": "clang-analyzer-apiModeling.Errno", + "shortDescription": { + "text": "Errno" + }, + "fullDescription": { + "text": "Errno" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "apiModeling", + "index": 64, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-11-6", + "name": "clion-misra-c2012-11-6", + "shortDescription": { + "text": "misra-c2012-11-6" + }, + "fullDescription": { + "text": "misra-c2012-11-6" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-invalid-access-moved", + "name": "hicpp-invalid-access-moved", + "shortDescription": { + "text": "invalid-access-moved" + }, + "fullDescription": { + "text": "invalid-access-moved" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-5-2-4", + "name": "clion-misra-cpp2008-5-2-4", + "shortDescription": { + "text": "misra-cpp2008-5-2-4" + }, + "fullDescription": { + "text": "misra-cpp2008-5-2-4" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-7-4", + "name": "clion-misra-c2012-7-4", + "shortDescription": { + "text": "misra-c2012-7-4" + }, + "fullDescription": { + "text": "misra-c2012-7-4" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-0-1-7", + "name": "clion-misra-cpp2008-0-1-7", + "shortDescription": { + "text": "misra-cpp2008-0-1-7" + }, + "fullDescription": { + "text": "misra-cpp2008-0-1-7" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "misc-include-cleaner", + "name": "misc-include-cleaner", + "shortDescription": { + "text": "include-cleaner" + }, + "fullDescription": { + "text": "include-cleaner" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "misc", + "index": 27, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "concurrency-mt-unsafe", + "name": "concurrency-mt-unsafe", + "shortDescription": { + "text": "mt-unsafe" + }, + "fullDescription": { + "text": "mt-unsafe" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "concurrency", + "index": 43, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-argument-comment", + "name": "bugprone-argument-comment", + "shortDescription": { + "text": "argument-comment" + }, + "fullDescription": { + "text": "argument-comment" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.core.IdenticalExpr", + "name": "clang-analyzer-alpha.core.IdenticalExpr", + "shortDescription": { + "text": "IdenticalExpr" + }, + "fullDescription": { + "text": "IdenticalExpr" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.core", + "index": 4, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-avoid-nested-conditional-operator", + "name": "readability-avoid-nested-conditional-operator", + "shortDescription": { + "text": "avoid-nested-conditional-operator" + }, + "fullDescription": { + "text": "avoid-nested-conditional-operator" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-slicing", + "name": "cppcoreguidelines-slicing", + "shortDescription": { + "text": "slicing" + }, + "fullDescription": { + "text": "slicing" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.core.DynamicTypeChecker", + "name": "clang-analyzer-alpha.core.DynamicTypeChecker", + "shortDescription": { + "text": "DynamicTypeChecker" + }, + "fullDescription": { + "text": "DynamicTypeChecker" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.core", + "index": 4, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.unix.PthreadLock", + "name": "clang-analyzer-alpha.unix.PthreadLock", + "shortDescription": { + "text": "PthreadLock" + }, + "fullDescription": { + "text": "PthreadLock" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.unix", + "index": 21, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-dcl54-cpp", + "name": "cert-dcl54-cpp", + "shortDescription": { + "text": "dcl54-cpp" + }, + "fullDescription": { + "text": "dcl54-cpp" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-cplusplus.PureVirtualCall", + "name": "clang-analyzer-cplusplus.PureVirtualCall", + "shortDescription": { + "text": "PureVirtualCall" + }, + "fullDescription": { + "text": "PureVirtualCall" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cplusplus", + "index": 30, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "darwin-avoid-spinlock", + "name": "darwin-avoid-spinlock", + "shortDescription": { + "text": "avoid-spinlock" + }, + "fullDescription": { + "text": "avoid-spinlock" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "darwin", + "index": 44, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-unix.Malloc", + "name": "clang-analyzer-unix.Malloc", + "shortDescription": { + "text": "Malloc" + }, + "fullDescription": { + "text": "Malloc" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "unix", + "index": 26, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-avoid-capturing-lambda-coroutines", + "name": "cppcoreguidelines-avoid-capturing-lambda-coroutines", + "shortDescription": { + "text": "avoid-capturing-lambda-coroutines" + }, + "fullDescription": { + "text": "avoid-capturing-lambda-coroutines" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "objc-dealloc-in-category", + "name": "objc-dealloc-in-category", + "shortDescription": { + "text": "dealloc-in-category" + }, + "fullDescription": { + "text": "dealloc-in-category" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "objc", + "index": 40, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-11-0-1", + "name": "clion-misra-cpp2008-11-0-1", + "shortDescription": { + "text": "misra-cpp2008-11-0-1" + }, + "fullDescription": { + "text": "misra-cpp2008-11-0-1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-15-2", + "name": "clion-misra-c2012-15-2", + "shortDescription": { + "text": "misra-c2012-15-2" + }, + "fullDescription": { + "text": "misra-c2012-15-2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-env33-c", + "name": "cert-env33-c", + "shortDescription": { + "text": "env33-c" + }, + "fullDescription": { + "text": "env33-c" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-msc50-cpp", + "name": "cert-msc50-cpp", + "shortDescription": { + "text": "msc50-cpp" + }, + "fullDescription": { + "text": "msc50-cpp" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-narrowing-conversions", + "name": "bugprone-narrowing-conversions", + "shortDescription": { + "text": "narrowing-conversions" + }, + "fullDescription": { + "text": "narrowing-conversions" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "google-readability-function-size", + "name": "google-readability-function-size", + "shortDescription": { + "text": "readability-function-size" + }, + "fullDescription": { + "text": "readability-function-size" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "google", + "index": 5, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-security.insecureAPI.decodeValueOfObjCType", + "name": "clang-analyzer-security.insecureAPI.decodeValueOfObjCType", + "shortDescription": { + "text": "decodeValueOfObjCType" + }, + "fullDescription": { + "text": "decodeValueOfObjCType" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "security.insecureAPI", + "index": 12, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-18-7", + "name": "clion-misra-c2012-18-7", + "shortDescription": { + "text": "misra-c2012-18-7" + }, + "fullDescription": { + "text": "misra-c2012-18-7" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-7-1", + "name": "clion-misra-c2012-7-1", + "shortDescription": { + "text": "misra-c2012-7-1" + }, + "fullDescription": { + "text": "misra-c2012-7-1" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-lambda-function-name", + "name": "bugprone-lambda-function-name", + "shortDescription": { + "text": "lambda-function-name" + }, + "fullDescription": { + "text": "lambda-function-name" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-optin.cplusplus.UninitializedObject", + "name": "clang-analyzer-optin.cplusplus.UninitializedObject", + "shortDescription": { + "text": "UninitializedObject" + }, + "fullDescription": { + "text": "UninitializedObject" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "optin.cplusplus", + "index": 63, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-use-anyofallof", + "name": "readability-use-anyofallof", + "shortDescription": { + "text": "use-anyofallof" + }, + "fullDescription": { + "text": "use-anyofallof" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-use-default-member-init", + "name": "modernize-use-default-member-init", + "shortDescription": { + "text": "use-default-member-init" + }, + "fullDescription": { + "text": "use-default-member-init" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-function-cognitive-complexity", + "name": "readability-function-cognitive-complexity", + "shortDescription": { + "text": "function-cognitive-complexity" + }, + "fullDescription": { + "text": "function-cognitive-complexity" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-avoid-c-arrays", + "name": "modernize-avoid-c-arrays", + "shortDescription": { + "text": "avoid-c-arrays" + }, + "fullDescription": { + "text": "avoid-c-arrays" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-qualified-auto", + "name": "readability-qualified-auto", + "shortDescription": { + "text": "qualified-auto" + }, + "fullDescription": { + "text": "qualified-auto" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "misc-misplaced-const", + "name": "misc-misplaced-const", + "shortDescription": { + "text": "misplaced-const" + }, + "fullDescription": { + "text": "misplaced-const" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "misc", + "index": 27, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-parent-virtual-call", + "name": "bugprone-parent-virtual-call", + "shortDescription": { + "text": "parent-virtual-call" + }, + "fullDescription": { + "text": "parent-virtual-call" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "fuchsia-multiple-inheritance", + "name": "fuchsia-multiple-inheritance", + "shortDescription": { + "text": "multiple-inheritance" + }, + "fullDescription": { + "text": "multiple-inheritance" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "fuchsia", + "index": 11, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-5-2-9", + "name": "clion-misra-cpp2008-5-2-9", + "shortDescription": { + "text": "misra-cpp2008-5-2-9" + }, + "fullDescription": { + "text": "misra-cpp2008-5-2-9" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-7-4-3", + "name": "clion-misra-cpp2008-7-4-3", + "shortDescription": { + "text": "misra-cpp2008-7-4-3" + }, + "fullDescription": { + "text": "misra-cpp2008-7-4-3" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability-avoid-return-with-void-value", + "name": "readability-avoid-return-with-void-value", + "shortDescription": { + "text": "avoid-return-with-void-value" + }, + "fullDescription": { + "text": "avoid-return-with-void-value" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "readability", + "index": 10, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.MIG", + "name": "clang-analyzer-osx.MIG", + "shortDescription": { + "text": "MIG" + }, + "fullDescription": { + "text": "MIG" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx", + "index": 24, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-optin.performance.Padding", + "name": "clang-analyzer-optin.performance.Padding", + "shortDescription": { + "text": "Padding" + }, + "fullDescription": { + "text": "Padding" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "optin.performance", + "index": 47, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-suspicious-missing-comma", + "name": "bugprone-suspicious-missing-comma", + "shortDescription": { + "text": "suspicious-missing-comma" + }, + "fullDescription": { + "text": "suspicious-missing-comma" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-no-array-decay", + "name": "hicpp-no-array-decay", + "shortDescription": { + "text": "no-array-decay" + }, + "fullDescription": { + "text": "no-array-decay" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-5-2-8", + "name": "clion-misra-cpp2008-5-2-8", + "shortDescription": { + "text": "misra-cpp2008-5-2-8" + }, + "fullDescription": { + "text": "misra-cpp2008-5-2-8" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-unix.Vfork", + "name": "clang-analyzer-unix.Vfork", + "shortDescription": { + "text": "Vfork" + }, + "fullDescription": { + "text": "Vfork" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "unix", + "index": 26, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-5-3-2", + "name": "clion-misra-cpp2008-5-3-2", + "shortDescription": { + "text": "misra-cpp2008-5-3-2" + }, + "fullDescription": { + "text": "misra-cpp2008-5-3-2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "llvm-prefer-register-over-unsigned", + "name": "llvm-prefer-register-over-unsigned", + "shortDescription": { + "text": "prefer-register-over-unsigned" + }, + "fullDescription": { + "text": "prefer-register-over-unsigned" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "llvm", + "index": 16, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "objc-assert-equals", + "name": "objc-assert-equals", + "shortDescription": { + "text": "assert-equals" + }, + "fullDescription": { + "text": "assert-equals" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "objc", + "index": 40, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.core.SizeofPtr", + "name": "clang-analyzer-alpha.core.SizeofPtr", + "shortDescription": { + "text": "SizeofPtr" + }, + "fullDescription": { + "text": "SizeofPtr" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.core", + "index": 4, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.cocoa.Dealloc", + "name": "clang-analyzer-osx.cocoa.Dealloc", + "shortDescription": { + "text": "Dealloc" + }, + "fullDescription": { + "text": "Dealloc" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx.cocoa", + "index": 15, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-6-6-2", + "name": "clion-misra-cpp2008-6-6-2", + "shortDescription": { + "text": "misra-cpp2008-6-6-2" + }, + "fullDescription": { + "text": "misra-cpp2008-6-6-2" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-exception-baseclass", + "name": "hicpp-exception-baseclass", + "shortDescription": { + "text": "exception-baseclass" + }, + "fullDescription": { + "text": "exception-baseclass" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp-multiway-paths-covered", + "name": "hicpp-multiway-paths-covered", + "shortDescription": { + "text": "multiway-paths-covered" + }, + "fullDescription": { + "text": "multiway-paths-covered" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "hicpp", + "index": 13, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-cpp2008-6-5-4", + "name": "clion-misra-cpp2008-6-5-4", + "shortDescription": { + "text": "misra-cpp2008-6-5-4" + }, + "fullDescription": { + "text": "misra-cpp2008-6-5-4" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "misc-confusable-identifiers", + "name": "misc-confusable-identifiers", + "shortDescription": { + "text": "confusable-identifiers" + }, + "fullDescription": { + "text": "confusable-identifiers" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "misc", + "index": 27, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.fuchsia.Lock", + "name": "clang-analyzer-alpha.fuchsia.Lock", + "shortDescription": { + "text": "Lock" + }, + "fullDescription": { + "text": "Lock" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.fuchsia", + "index": 66, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-security.insecureAPI.bcopy", + "name": "clang-analyzer-security.insecureAPI.bcopy", + "shortDescription": { + "text": "bcopy" + }, + "fullDescription": { + "text": "bcopy" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "security.insecureAPI", + "index": 12, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-misra-c2012-14-4", + "name": "clion-misra-c2012-14-4", + "shortDescription": { + "text": "misra-c2012-14-4" + }, + "fullDescription": { + "text": "misra-c2012-14-4" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "abseil-duration-unnecessary-conversion", + "name": "abseil-duration-unnecessary-conversion", + "shortDescription": { + "text": "duration-unnecessary-conversion" + }, + "fullDescription": { + "text": "duration-unnecessary-conversion" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "abseil", + "index": 20, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-unconstrained-variable-type", + "name": "clion-unconstrained-variable-type", + "shortDescription": { + "text": "unconstrained-variable-type" + }, + "fullDescription": { + "text": "unconstrained-variable-type" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-unix.MismatchedDeallocator", + "name": "clang-analyzer-unix.MismatchedDeallocator", + "shortDescription": { + "text": "MismatchedDeallocator" + }, + "fullDescription": { + "text": "MismatchedDeallocator" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "unix", + "index": 26, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-no-suspend-with-lock", + "name": "cppcoreguidelines-no-suspend-with-lock", + "shortDescription": { + "text": "no-suspend-with-lock" + }, + "fullDescription": { + "text": "no-suspend-with-lock" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone-bad-signal-to-kill-thread", + "name": "bugprone-bad-signal-to-kill-thread", + "shortDescription": { + "text": "bad-signal-to-kill-thread" + }, + "fullDescription": { + "text": "bad-signal-to-kill-thread" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "bugprone", + "index": 23, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-core.VLASize", + "name": "clang-analyzer-core.VLASize", + "shortDescription": { + "text": "VLASize" + }, + "fullDescription": { + "text": "VLASize" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "core", + "index": 37, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cppcoreguidelines-pro-bounds-constant-array-index", + "name": "cppcoreguidelines-pro-bounds-constant-array-index", + "shortDescription": { + "text": "pro-bounds-constant-array-index" + }, + "fullDescription": { + "text": "pro-bounds-constant-array-index" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "index": 1, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "llvm-qualified-auto", + "name": "llvm-qualified-auto", + "shortDescription": { + "text": "qualified-auto" + }, + "fullDescription": { + "text": "qualified-auto" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "llvm", + "index": 16, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion-empty-decl-or-stmt", + "name": "clion-empty-decl-or-stmt", + "shortDescription": { + "text": "empty-decl-or-stmt" + }, + "fullDescription": { + "text": "empty-decl-or-stmt" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "clion", + "index": 3, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.cocoa.RunLoopAutoreleaseLeak", + "name": "clang-analyzer-osx.cocoa.RunLoopAutoreleaseLeak", + "shortDescription": { + "text": "RunLoopAutoreleaseLeak" + }, + "fullDescription": { + "text": "RunLoopAutoreleaseLeak" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx.cocoa", + "index": 15, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize-use-auto", + "name": "modernize-use-auto", + "shortDescription": { + "text": "use-auto" + }, + "fullDescription": { + "text": "use-auto" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "modernize", + "index": 9, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-core.CallAndMessage", + "name": "clang-analyzer-core.CallAndMessage", + "shortDescription": { + "text": "CallAndMessage" + }, + "fullDescription": { + "text": "CallAndMessage" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "core", + "index": 37, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-err58-cpp", + "name": "cert-err58-cpp", + "shortDescription": { + "text": "err58-cpp" + }, + "fullDescription": { + "text": "err58-cpp" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-alpha.security.taint.TaintPropagation", + "name": "clang-analyzer-alpha.security.taint.TaintPropagation", + "shortDescription": { + "text": "TaintPropagation" + }, + "fullDescription": { + "text": "TaintPropagation" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "alpha.security.taint", + "index": 67, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clang-analyzer-osx.cocoa.SuperDealloc", + "name": "clang-analyzer-osx.cocoa.SuperDealloc", + "shortDescription": { + "text": "SuperDealloc" + }, + "fullDescription": { + "text": "SuperDealloc" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "osx.cocoa", + "index": 15, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert-err61-cpp", + "name": "cert-err61-cpp", + "shortDescription": { + "text": "err61-cpp" + }, + "fullDescription": { + "text": "err61-cpp" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "cert", + "index": 14, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "misc-throw-by-value-catch-by-reference", + "name": "misc-throw-by-value-catch-by-reference", + "shortDescription": { + "text": "throw-by-value-catch-by-reference" + }, + "fullDescription": { + "text": "throw-by-value-catch-by-reference" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning" + }, + "relationships": [ + { + "target": { + "id": "misc", + "index": 27, + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "taxa": [ + { + "id": "C++", + "name": "C++" + }, + { + "id": "cppcoreguidelines", + "name": "cppcoreguidelines", + "relationships": [ + { + "target": { + "id": "cppcoreguidelines", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "alpha.security", + "name": "alpha.security", + "relationships": [ + { + "target": { + "id": "alpha.security", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "clion", + "name": "clion", + "relationships": [ + { + "target": { + "id": "clion", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "alpha.core", + "name": "alpha.core", + "relationships": [ + { + "target": { + "id": "alpha.core", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "google", + "name": "google", + "relationships": [ + { + "target": { + "id": "google", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "llvmlibc", + "name": "llvmlibc", + "relationships": [ + { + "target": { + "id": "llvmlibc", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "alpha.cplusplus", + "name": "alpha.cplusplus", + "relationships": [ + { + "target": { + "id": "alpha.cplusplus", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "performance", + "name": "performance", + "relationships": [ + { + "target": { + "id": "performance", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "modernize", + "name": "modernize", + "relationships": [ + { + "target": { + "id": "modernize", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "readability", + "name": "readability", + "relationships": [ + { + "target": { + "id": "readability", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "fuchsia", + "name": "fuchsia", + "relationships": [ + { + "target": { + "id": "fuchsia", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "security.insecureAPI", + "name": "security.insecureAPI", + "relationships": [ + { + "target": { + "id": "security.insecureAPI", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "hicpp", + "name": "hicpp", + "relationships": [ + { + "target": { + "id": "hicpp", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cert", + "name": "cert", + "relationships": [ + { + "target": { + "id": "cert", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "osx.cocoa", + "name": "osx.cocoa", + "relationships": [ + { + "target": { + "id": "osx.cocoa", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "llvm", + "name": "llvm", + "relationships": [ + { + "target": { + "id": "llvm", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "alpha.osx.cocoa.localizability", + "name": "alpha.osx.cocoa.localizability", + "relationships": [ + { + "target": { + "id": "alpha.osx.cocoa.localizability", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "zircon", + "name": "zircon", + "relationships": [ + { + "target": { + "id": "zircon", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "boost", + "name": "boost", + "relationships": [ + { + "target": { + "id": "boost", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "abseil", + "name": "abseil", + "relationships": [ + { + "target": { + "id": "abseil", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "alpha.unix", + "name": "alpha.unix", + "relationships": [ + { + "target": { + "id": "alpha.unix", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "alpha.osx.cocoa", + "name": "alpha.osx.cocoa", + "relationships": [ + { + "target": { + "id": "alpha.osx.cocoa", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "bugprone", + "name": "bugprone", + "relationships": [ + { + "target": { + "id": "bugprone", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "osx", + "name": "osx", + "relationships": [ + { + "target": { + "id": "osx", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "optin.mpi", + "name": "optin.mpi", + "relationships": [ + { + "target": { + "id": "optin.mpi", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "unix", + "name": "unix", + "relationships": [ + { + "target": { + "id": "unix", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "misc", + "name": "misc", + "relationships": [ + { + "target": { + "id": "misc", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "android", + "name": "android", + "relationships": [ + { + "target": { + "id": "android", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "osx.coreFoundation", + "name": "osx.coreFoundation", + "relationships": [ + { + "target": { + "id": "osx.coreFoundation", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "cplusplus", + "name": "cplusplus", + "relationships": [ + { + "target": { + "id": "cplusplus", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "unix.cstring", + "name": "unix.cstring", + "relationships": [ + { + "target": { + "id": "unix.cstring", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "apiModeling.llvm", + "name": "apiModeling.llvm", + "relationships": [ + { + "target": { + "id": "apiModeling.llvm", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "altera", + "name": "altera", + "relationships": [ + { + "target": { + "id": "altera", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "mpi", + "name": "mpi", + "relationships": [ + { + "target": { + "id": "mpi", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "core.uninitialized", + "name": "core.uninitialized", + "relationships": [ + { + "target": { + "id": "core.uninitialized", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "core.builtin", + "name": "core.builtin", + "relationships": [ + { + "target": { + "id": "core.builtin", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "core", + "name": "core", + "relationships": [ + { + "target": { + "id": "core", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "valist", + "name": "valist", + "relationships": [ + { + "target": { + "id": "valist", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "webkit", + "name": "webkit", + "relationships": [ + { + "target": { + "id": "webkit", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "objc", + "name": "objc", + "relationships": [ + { + "target": { + "id": "objc", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "alpha.llvm", + "name": "alpha.llvm", + "relationships": [ + { + "target": { + "id": "alpha.llvm", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "nullability", + "name": "nullability", + "relationships": [ + { + "target": { + "id": "nullability", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "concurrency", + "name": "concurrency", + "relationships": [ + { + "target": { + "id": "concurrency", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "darwin", + "name": "darwin", + "relationships": [ + { + "target": { + "id": "darwin", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "deadcode", + "name": "deadcode", + "relationships": [ + { + "target": { + "id": "deadcode", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "alpha.webkit", + "name": "alpha.webkit", + "relationships": [ + { + "target": { + "id": "alpha.webkit", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "optin.performance", + "name": "optin.performance", + "relationships": [ + { + "target": { + "id": "optin.performance", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "optin.core", + "name": "optin.core", + "relationships": [ + { + "target": { + "id": "optin.core", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "portability", + "name": "portability", + "relationships": [ + { + "target": { + "id": "portability", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "security", + "name": "security", + "relationships": [ + { + "target": { + "id": "security", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "apiModeling.google", + "name": "apiModeling.google", + "relationships": [ + { + "target": { + "id": "apiModeling.google", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "security.cert.env", + "name": "security.cert.env", + "relationships": [ + { + "target": { + "id": "security.cert.env", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "alpha.clone", + "name": "alpha.clone", + "relationships": [ + { + "target": { + "id": "alpha.clone", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "alpha.nondeterminism", + "name": "alpha.nondeterminism", + "relationships": [ + { + "target": { + "id": "alpha.nondeterminism", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "optin.osx.cocoa.localizability", + "name": "optin.osx.cocoa.localizability", + "relationships": [ + { + "target": { + "id": "optin.osx.cocoa.localizability", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "optin.portability", + "name": "optin.portability", + "relationships": [ + { + "target": { + "id": "optin.portability", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "openmp", + "name": "openmp", + "relationships": [ + { + "target": { + "id": "openmp", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "alpha.unix.cstring", + "name": "alpha.unix.cstring", + "relationships": [ + { + "target": { + "id": "alpha.unix.cstring", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "osx.coreFoundation.containers", + "name": "osx.coreFoundation.containers", + "relationships": [ + { + "target": { + "id": "osx.coreFoundation.containers", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "alpha.deadcode", + "name": "alpha.deadcode", + "relationships": [ + { + "target": { + "id": "alpha.deadcode", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "optin.osx", + "name": "optin.osx", + "relationships": [ + { + "target": { + "id": "optin.osx", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "alpha.security.cert.pos", + "name": "alpha.security.cert.pos", + "relationships": [ + { + "target": { + "id": "alpha.security.cert.pos", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "optin.cplusplus", + "name": "optin.cplusplus", + "relationships": [ + { + "target": { + "id": "optin.cplusplus", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "apiModeling", + "name": "apiModeling", + "relationships": [ + { + "target": { + "id": "apiModeling", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "linuxkernel", + "name": "linuxkernel", + "relationships": [ + { + "target": { + "id": "linuxkernel", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "alpha.fuchsia", + "name": "alpha.fuchsia", + "relationships": [ + { + "target": { + "id": "alpha.fuchsia", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "alpha.security.taint", + "name": "alpha.security.taint", + "relationships": [ + { + "target": { + "id": "alpha.security.taint", + "toolComponent": { + "name": "clang-tidy" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + } + }, + "invocations": [ + { + "exitCode": 0, + "executionSuccessful": true + } + ], + "language": "en-US", + "versionControlProvenance": [ + { + "repositoryUri": "https://github.com/opentibiabr/canary.git", + "revisionId": "11f02b957bfbb8c40f406a7976c280d8996742db", + "branch": "imp-try-to-use-qodana-action", + "properties": { + "repoUrl": "https://github.com/opentibiabr/canary.git", + "lastAuthorName": "Renato Foot Guimarães Costallat", + "vcsType": "Git", + "lastAuthorEmail": "costallat@hotmail.com" + } + } + ], + "artifacts": [ + { + "location": { + "uri": "src/account/account.cpp" + }, + "length": 8257, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/creature.cpp" + }, + "length": 55346, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/creature.hpp" + }, + "length": 25344, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "length": 25051, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "length": 89300, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/npcs/npc.hpp" + }, + "length": 6306, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/players/grouping/party.hpp" + }, + "length": 4945, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/players/imbuements/imbuements.hpp" + }, + "length": 3363, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/core/game/modal_window_functions.cpp" + }, + "length": 5807, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "length": 7962, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/core/libs/db_functions.cpp" + }, + "length": 3323, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/core/libs/result_functions.cpp" + }, + "length": 1752, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/core/libs/logger_functions.cpp" + }, + "length": 3134, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/core/libs/metrics_functions.cpp" + }, + "length": 1262, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/core/libs/kv_functions.cpp" + }, + "length": 5447, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "length": 17273, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/core/network/network_message_functions.cpp" + }, + "length": 7785, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/core/network/webhook_functions.cpp" + }, + "length": 1084, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/creatures/combat/combat_functions.cpp" + }, + "length": 5450, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "length": 6957, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "length": 31438, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/creatures/combat/variant_functions.cpp" + }, + "length": 1983, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "length": 29768, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/creatures/monster/charm_functions.cpp" + }, + "length": 4805, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/creatures/monster/loot_functions.cpp" + }, + "length": 6541, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "length": 18260, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "length": 64543, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/monsters/monster.hpp" + }, + "length": 14276, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/creatures/monster/monster_spell_functions.cpp" + }, + "length": 8480, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "length": 48768, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "length": 18847, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "length": 15062, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/creatures/npc/shop_functions.cpp" + }, + "length": 3924, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/creatures/player/group_functions.cpp" + }, + "length": 2719, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp" + }, + "length": 4027, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/creatures/player/mount_functions.cpp" + }, + "length": 1954, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/players/player.hpp" + }, + "length": 90559, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp" + }, + "length": 6342, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "length": 113639, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "length": 11052, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp" + }, + "length": 7675, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/events/action_functions.cpp" + }, + "length": 6146, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/events/event_callback_functions.cpp" + }, + "length": 3290, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/events/events_scheduler_functions.cpp" + }, + "length": 1463, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/events/global_event_functions.cpp" + }, + "length": 5091, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/events/move_event_functions.cpp" + }, + "length": 8526, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/events/talk_action_functions.cpp" + }, + "length": 5848, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "length": 7870, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "length": 3834, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "length": 14316, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/monsters/spawns/spawn_monster.hpp" + }, + "length": 3413, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/items/item_classification_functions.cpp" + }, + "length": 1471, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "length": 24622, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "length": 14821, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/items/weapon_functions.cpp" + }, + "length": 16634, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "length": 11291, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/map/position_functions.cpp" + }, + "length": 8631, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "length": 15688, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/map/town_functions.cpp" + }, + "length": 1555, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/global/baseevents.cpp" + }, + "length": 4622, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "length": 20564, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/global/globalevent.cpp" + }, + "length": 7726, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/modules/modules.cpp" + }, + "length": 4805, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/modules/modules.hpp" + }, + "length": 2085, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "length": 5025, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/scripts/luascript.cpp" + }, + "length": 7678, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "length": 4297, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/scripts/scripts.cpp" + }, + "length": 5018, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/scripts/scripts.hpp" + }, + "length": 3178, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/map/house/house.cpp" + }, + "length": 24868, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/map/house/house.hpp" + }, + "length": 8257, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/map/house/housetile.cpp" + }, + "length": 4486, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "length": 11210, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/map/utils/mapsector.cpp" + }, + "length": 1324, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/npcs/npcs.cpp" + }, + "length": 3983, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/map/map.cpp" + }, + "length": 29502, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/map/mapcache.cpp" + }, + "length": 8723, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/map/mapcache.hpp" + }, + "length": 2980, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/map/spectators.cpp" + }, + "length": 7788, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/security/argon.cpp" + }, + "length": 3173, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/security/rsa.cpp" + }, + "length": 8644, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "build/linux-debug/vcpkg_installed/x64-linux/include/asio/impl/read.hpp" + }, + "length": 37275, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/server/network/connection/connection.cpp" + }, + "length": 13960, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/server/network/message/networkmessage.cpp" + }, + "length": 3068, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/server/network/message/outputmessage.cpp" + }, + "length": 1626, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "length": 7165, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "length": 284527, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/server/network/protocol/protocolgame.hpp" + }, + "length": 21832, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "length": 8133, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/server/network/protocol/protocollogin.cpp" + }, + "length": 5669, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "length": 9961, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/server/network/webhook/webhook.cpp" + }, + "length": 5158, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/server/server.cpp" + }, + "length": 5092, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/server/signals.cpp" + }, + "length": 3777, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/utils/pugicast.cpp" + }, + "length": 522, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/utils/tools.cpp" + }, + "length": 55473, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/utils/tools.hpp" + }, + "length": 7989, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/utils/wildcardtree.cpp" + }, + "length": 2760, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/canary_server.cpp" + }, + "length": 13735, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/players/grouping/familiars.cpp" + }, + "length": 2656, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/players/grouping/groups.cpp" + }, + "length": 3879, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/players/grouping/guild.cpp" + }, + "length": 1662, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "length": 26136, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "length": 12537, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/players/management/ban.cpp" + }, + "length": 3658, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/players/management/waitlist.cpp" + }, + "length": 4023, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/players/storages/storages.cpp" + }, + "length": 2272, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/players/player.cpp" + }, + "length": 240060, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/players/achievement/player_achievement.cpp" + }, + "length": 4412, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp" + }, + "length": 4375, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/players/cyclopedia/player_cyclopedia.cpp" + }, + "length": 8088, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/account/account_repository_db.cpp" + }, + "length": 6313, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/account/account_repository_db.hpp" + }, + "length": 1433, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp" + }, + "length": 10411, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "length": 107897, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "length": 32024, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "length": 10077, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "length": 6889, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/database/database.cpp" + }, + "length": 10006, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/database/databasemanager.cpp" + }, + "length": 4625, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/database/databasetasks.cpp" + }, + "length": 1451, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/game/functions/game_reload.cpp" + }, + "length": 6499, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/game/game.cpp" + }, + "length": 358305, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/game/game.hpp" + }, + "length": 47358, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/config/configmanager.cpp" + }, + "length": 27351, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/game/bank/bank.cpp" + }, + "length": 4356, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/game/movement/position.cpp" + }, + "length": 1576, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/game/movement/teleport.cpp" + }, + "length": 4073, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "length": 5495, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "length": 7081, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/game/scheduling/task.cpp" + }, + "length": 1842, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/game/scheduling/save_manager.cpp" + }, + "length": 4210, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/game/zones/zone.cpp" + }, + "length": 7035, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/io/fileloader.cpp" + }, + "length": 3078, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/io/filestream.cpp" + }, + "length": 2932, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/appearance/mounts/mounts.cpp" + }, + "length": 2729, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/io/io_wheel.cpp" + }, + "length": 41440, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/io/iobestiary.cpp" + }, + "length": 13606, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/io/io_bosstiary.cpp" + }, + "length": 9899, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/io/ioguild.cpp" + }, + "length": 2565, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/io/iologindata.cpp" + }, + "length": 16295, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/io/iologindata.hpp" + }, + "length": 2653, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "length": 37110, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "length": 29183, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/io/iomap.cpp" + }, + "length": 8673, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/io/iomapserialize.cpp" + }, + "length": 11436, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/io/iomarket.cpp" + }, + "length": 13565, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/appearance/outfit/outfit.cpp" + }, + "length": 3219, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/io/ioprey.cpp" + }, + "length": 22707, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/items/bed.cpp" + }, + "length": 7797, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/items/containers/container.cpp" + }, + "length": 28291, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/items/containers/container.hpp" + }, + "length": 6833, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/items/containers/depot/depotchest.cpp" + }, + "length": 2541, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/items/containers/depot/depotlocker.cpp" + }, + "length": 1720, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/items/containers/inbox/inbox.cpp" + }, + "length": 2171, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "length": 4585, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/items/containers/rewards/reward.cpp" + }, + "length": 1696, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/items/containers/rewards/rewardchest.cpp" + }, + "length": 1831, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/items/cylinder.cpp" + }, + "length": 1179, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/combat/combat.cpp" + }, + "length": 72381, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/combat/combat.hpp" + }, + "length": 15867, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/items/decay/decay.cpp" + }, + "length": 6512, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/items/item.cpp" + }, + "length": 88109, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/items/item.hpp" + }, + "length": 22715, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/items/items.cpp" + }, + "length": 12908, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/items/functions/item/attribute.cpp" + }, + "length": 4087, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/items/functions/item/custom_attribute.cpp" + }, + "length": 4313, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "length": 58085, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/items/functions/item/item_parse.hpp" + }, + "length": 19343, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/items/thing.cpp" + }, + "length": 617, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": {}, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/items/tile.cpp" + }, + "length": 50627, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/items/trashholder.cpp" + }, + "length": 2854, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/items/weapons/weapons.cpp" + }, + "length": 28677, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/combat/condition.cpp" + }, + "length": 68420, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lib/logging/log_with_spd_log.cpp" + }, + "length": 1220, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lib/thread/thread_pool.cpp" + }, + "length": 1204, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/kv/value_wrapper.cpp" + }, + "length": 2325, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/kv/value_wrapper_proto.cpp" + }, + "length": 3718, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/kv/kv.cpp" + }, + "length": 2904, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/kv/kv_sql.cpp" + }, + "length": 2961, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/callbacks/creaturecallback.cpp" + }, + "length": 1859, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/callbacks/event_callback.cpp" + }, + "length": 45995, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/callbacks/events_callbacks.cpp" + }, + "length": 1533, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/creatures/combat/spells.cpp" + }, + "length": 34268, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/creature/actions.cpp" + }, + "length": 17525, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/creature/creatureevent.cpp" + }, + "length": 17900, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/creature/events.cpp" + }, + "length": 46088, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/creature/movement.cpp" + }, + "length": 26681, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/creature/movement.hpp" + }, + "length": 9380, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/creature/raids.cpp" + }, + "length": 17173, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/creature/talkaction.cpp" + }, + "length": 3720, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "length": 23534, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/core/game/config_functions.cpp" + }, + "length": 2562, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "length": 26267, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + }, + { + "location": { + "uri": "src/lua/functions/core/game/bank_functions.cpp" + }, + "length": 4397, + "roles": [ + "resultFile" + ], + "mimeType": "text/plain" + } + ], + "results": [ + { + "ruleId": "readability-suspicious-call-argument", + "ruleIndex": 732, + "kind": "fail", + "level": "warning", + "message": { + "text": "2nd argument 'transactionType' (passed to 'type') looks like it might be swapped with the 4th, 'type' (passed to 'coinType')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account.cpp" + }, + "region": { + "startLine": 156, + "startColumn": 29, + "charOffset": 4222, + "charLength": 24, + "snippet": { + "text": "registerCoinsTransaction" + } + }, + "contextRegion": { + "startLine": 154, + "startColumn": 29, + "charOffset": 4190, + "charLength": 24, + "snippet": { + "text": "\t}\n\n\tif (!g_accountRepository().registerCoinsTransaction(m_account.id, transactionType, amount, type, detail)) {\n\t\tg_logger().error(\n\t\t\t\"Failed to register transaction: 'account:[{}], transaction \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e89da9e924267358fdf44308482d6c1d059912cbf9ddf9ec71292220ec715461" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-empty-decl-or-stmt", + "ruleIndex": 331, + "kind": "fail", + "level": "warning", + "message": { + "text": "Empty declaration" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 2, + "charOffset": 4587, + "charLength": 1, + "snippet": { + "text": ";" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 2, + "charOffset": 4516, + "charLength": 1, + "snippet": { + "text": "[[nodiscard]] uint32_t Account::getID() const {\n\treturn m_account.id;\n};\n\nstd::string Account::getDescriptor() const {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc2362f998a53f18121f676a228fb487d56a9d2e5a599761fca21319b1e7b67e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "86400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account.cpp" + }, + "region": { + "startLine": 188, + "startColumn": 91, + "charOffset": 5089, + "charLength": 5, + "snippet": { + "text": "86400" + } + }, + "contextRegion": { + "startLine": 186, + "startColumn": 91, + "charOffset": 4946, + "charLength": 5, + "snippet": { + "text": "\nvoid Account::addPremiumDays(const int32_t &days) {\n\tauto timeLeft = std::max(0, static_cast((m_account.premiumLastDay - getTimeNow()) % 86400));\n\tsetPremiumDays(m_account.premiumRemainingDays + days);\n\tm_account.premiumDaysPurchased += days;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7adb225f2d123c91a68a856dc7a7076f34a739bed6b246afc1cd733cba9346c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account.cpp" + }, + "region": { + "startLine": 189, + "startColumn": 17, + "charOffset": 5114, + "charLength": 9, + "snippet": { + "text": "m_account" + } + }, + "contextRegion": { + "startLine": 187, + "startColumn": 17, + "charOffset": 4947, + "charLength": 9, + "snippet": { + "text": "void Account::addPremiumDays(const int32_t &days) {\n\tauto timeLeft = std::max(0, static_cast((m_account.premiumLastDay - getTimeNow()) % 86400));\n\tsetPremiumDays(m_account.premiumRemainingDays + days);\n\tm_account.premiumDaysPurchased += days;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b94093764d6501aadc1ab0164bb2e307568e1c4e051564653d7f1f4add9c10b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'std::time_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account.cpp" + }, + "region": { + "startLine": 199, + "startColumn": 45, + "charOffset": 5399, + "charLength": 4, + "snippet": { + "text": "days" + } + }, + "contextRegion": { + "startLine": 197, + "startColumn": 45, + "charOffset": 5263, + "charLength": 4, + "snippet": { + "text": "void Account::setPremiumDays(const int32_t &days) {\n\tm_account.premiumRemainingDays = days;\n\tm_account.premiumLastDay = getTimeNow() + (days * 86400);\n\n\tif (days <= 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45b4c02600bbe388d3d2f62a49193de160b6f1ca703ae5c94f00563861bab7f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "86400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account.cpp" + }, + "region": { + "startLine": 199, + "startColumn": 52, + "charOffset": 5406, + "charLength": 5, + "snippet": { + "text": "86400" + } + }, + "contextRegion": { + "startLine": 197, + "startColumn": 52, + "charOffset": 5263, + "charLength": 5, + "snippet": { + "text": "void Account::setPremiumDays(const int32_t &days) {\n\tm_account.premiumRemainingDays = days;\n\tm_account.premiumLastDay = getTimeNow() + (days * 86400);\n\n\tif (days <= 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae3ac5151a5cd637928ec41f2d3aa2f29ae1d8c36f33a8a04262f59529056105" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "86400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account.cpp" + }, + "region": { + "startLine": 208, + "startColumn": 117, + "charOffset": 5691, + "charLength": 5, + "snippet": { + "text": "86400" + } + }, + "contextRegion": { + "startLine": 206, + "startColumn": 117, + "charOffset": 5508, + "charLength": 5, + "snippet": { + "text": "\n[[nodiscard]] uint32_t Account::getPremiumRemainingDays() const {\n\treturn m_account.premiumLastDay > getTimeNow() ? static_cast((m_account.premiumLastDay - getTimeNow()) / 86400) : 0;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d28f5c328d8d22262320c6e7b53ba2d4dd053bda2de27ca0357b991478a4e0c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "86400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account.cpp" + }, + "region": { + "startLine": 230, + "startColumn": 65, + "charOffset": 6290, + "charLength": 5, + "snippet": { + "text": "86400" + } + }, + "contextRegion": { + "startLine": 228, + "startColumn": 65, + "charOffset": 6189, + "charLength": 5, + "snippet": { + "text": "\ttime_t currentTime = getTimeNow();\n\n\tauto daysLeft = static_cast((lastDay - currentTime) / 86400);\n\tauto timeLeft = static_cast((lastDay - currentTime) % 86400);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a96f4cbced141cb7eae28993e7ca1f9c3ef6f7e5cf40a0de7e2f610f0895c336" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "86400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account.cpp" + }, + "region": { + "startLine": 231, + "startColumn": 65, + "charOffset": 6362, + "charLength": 5, + "snippet": { + "text": "86400" + } + }, + "contextRegion": { + "startLine": 229, + "startColumn": 65, + "charOffset": 6225, + "charLength": 5, + "snippet": { + "text": "\n\tauto daysLeft = static_cast((lastDay - currentTime) / 86400);\n\tauto timeLeft = static_cast((lastDay - currentTime) % 86400);\n\n\tm_account.premiumRemainingDays = daysLeft > 0 ? daysLeft : 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a020ce447e8971baa963bc71d7fb0f476d83e83b94d3c27e4be03d41ce03840" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-redundant-string-cstr", + "ruleIndex": 724, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant call to 'c_str'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account.cpp" + }, + "region": { + "startLine": 283, + "startColumn": 22, + "charOffset": 7801, + "charLength": 8, + "snippet": { + "text": "password" + } + }, + "contextRegion": { + "startLine": 281, + "startColumn": 22, + "charOffset": 7713, + "charLength": 8, + "snippet": { + "text": "\nbool Account::authenticatePassword(const std::string &password) {\n\tif (Argon2 {}.argon(password.c_str(), getPassword())) {\n\t\treturn true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2dec8e44496983a5e1c4222d639f93bf598823dd620c87818cd8802998993e89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "86400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account.cpp" + }, + "region": { + "startLine": 296, + "startColumn": 83, + "charOffset": 8151, + "charLength": 5, + "snippet": { + "text": "86400" + } + }, + "contextRegion": { + "startLine": 294, + "startColumn": 83, + "charOffset": 8020, + "charLength": 5, + "snippet": { + "text": "\nuint32_t Account::getAccountAgeInDays() const {\n\treturn static_cast(std::ceil((getTimeNow() - m_account.creationTime) / 86400));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1291b7b209c4ac14200e667f643a69e7942c60d7ef862cbd6a56459e5f8ad77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-virtual-call-in-ctor-or-dtor", + "ruleIndex": 477, + "kind": "fail", + "level": "warning", + "message": { + "text": "Do not invoke virtual member functions from constructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 22, + "startColumn": 2, + "charOffset": 683, + "charLength": 12, + "snippet": { + "text": "onIdleStatus" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 2, + "charOffset": 658, + "charLength": 12, + "snippet": { + "text": "\nCreature::Creature() {\n\tonIdleStatus();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a4650c722be0539d7a24880143d63166f5da09417016fa7f6f70966cbf03ee9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 2, + "charOffset": 727, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 2, + "charOffset": 701, + "charLength": 3, + "snippet": { + "text": "\nCreature::~Creature() {\n\tfor (const auto &summon : m_summons) {\n\t\tsummon->setAttackedCreature(nullptr);\n\t\tsummon->removeMaster();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3111e406b969ed91ae14f3491538a365754e43c896cb3a774468ec43305f7429" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 11, + "charOffset": 776, + "charLength": 19, + "snippet": { + "text": "setAttackedCreature" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 11, + "charOffset": 702, + "charLength": 19, + "snippet": { + "text": "Creature::~Creature() {\n\tfor (const auto &summon : m_summons) {\n\t\tsummon->setAttackedCreature(nullptr);\n\t\tsummon->removeMaster();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd529977a6c0a543f79506f3c44705bb986867778d2b6cf01c935b4232f1191f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 34, + "charOffset": 979, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 34, + "charOffset": 837, + "charLength": 15, + "snippet": { + "text": "\nbool Creature::canSee(const Position &myPos, const Position &pos, int32_t viewRangeX, int32_t viewRangeY) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (myPos.z <= MAP_INIT_SURFACE_LAYER) {\n\t\t// we are on ground level or above (7 -> 0)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b271c05d6d08a30f10b86dbb7a44e039a1b337aecec6bf83231425fc5202b804" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 2, + "charOffset": 998, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 2, + "charOffset": 838, + "charLength": 2, + "snippet": { + "text": "bool Creature::canSee(const Position &myPos, const Position &pos, int32_t viewRangeX, int32_t viewRangeY) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (myPos.z <= MAP_INIT_SURFACE_LAYER) {\n\t\t// we are on ground level or above (7 -> 0)\n\t\t// view is from 7 -> 0" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "300783aba87c740a3fdb7c041b685ab2e367623b775518ba5b59984a8898bf2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 57, + "startColumn": 57, + "charOffset": 1866, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 55, + "startColumn": 57, + "charOffset": 1807, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Creature::canSeeCreature(std::shared_ptr creature) const {\n\tif (!canSeeInvisibility() && creature->isInvisible()) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da3197bc8d93b0861f5322fc351c51369d019418b407d92cb180259d6b0199ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in conditional return statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 10, + "charOffset": 1950, + "charLength": 5, + "snippet": { + "text": "false" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 10, + "charOffset": 1810, + "charLength": 5, + "snippet": { + "text": "bool Creature::canSeeCreature(std::shared_ptr creature) const {\n\tif (!canSeeInvisibility() && creature->isInvisible()) {\n\t\treturn false;\n\t}\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fa986fe6fb8983295dee381e7dcc5ee106de4669fa94dd6e692705cf6ea6cc3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 9, + "charOffset": 2162, + "charLength": 8, + "snippet": { + "text": "lastStep" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 9, + "charOffset": 2104, + "charLength": 8, + "snippet": { + "text": "\nint64_t Creature::getTimeSinceLastMove() const {\n\treturn lastStep ? OTSYS_TIME() - lastStep : std::numeric_limits::max();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd30c2a386def55b21b60b2897d95b2331cc032f3aa11a8768a064faa412f36a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint64_t' (aka 'unsigned long') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 9, + "charOffset": 2162, + "charLength": 8, + "snippet": { + "text": "lastStep" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 9, + "charOffset": 2104, + "charLength": 8, + "snippet": { + "text": "\nint64_t Creature::getTimeSinceLastMove() const {\n\treturn lastStep ? OTSYS_TIME() - lastStep : std::numeric_limits::max();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1bf536204a5d71b352b12acd4853865beaa9b2d23188c4832e8ac9f5298f87a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to signed type 'int64_t' (aka 'long') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 33, + "charOffset": 2186, + "charLength": 1, + "snippet": { + "text": "-" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 33, + "charOffset": 2104, + "charLength": 1, + "snippet": { + "text": "\nint64_t Creature::getTimeSinceLastMove() const {\n\treturn lastStep ? OTSYS_TIME() - lastStep : std::numeric_limits::max();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "683c9808b71c5c1e972ad9a9b11d57cd07dfc3509bd70eadea91b44b1d046d33" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 84, + "startColumn": 9, + "charOffset": 2480, + "charLength": 12, + "snippet": { + "text": "stepDuration" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 9, + "charOffset": 2468, + "charLength": 12, + "snippet": { + "text": "\t}\n\n\treturn stepDuration - (ct - lastStep);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d89b6f0838f90f1e159a26133df54cb6a14b66e828ca44986c8148c398dbbc6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 84, + "startColumn": 9, + "charOffset": 2480, + "charLength": 12, + "snippet": { + "text": "stepDuration" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 9, + "charOffset": 2468, + "charLength": 12, + "snippet": { + "text": "\t}\n\n\treturn stepDuration - (ct - lastStep);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1925c4f820c11c9ca20efa98ab8a986a1ed46b316d89ccfe189e819cf356b89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 93, + "startColumn": 34, + "charOffset": 2731, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 91, + "startColumn": 34, + "charOffset": 2653, + "charLength": 15, + "snippet": { + "text": "\nvoid Creature::onThink(uint32_t interval) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (!isMapLoaded && useCacheMap()) {\n\t\tisMapLoaded = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05c467d181f1de2af3f5a8112680223dd2e577be830f14aade2ec888a55d2cc3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 20, + "charOffset": 3277, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 20, + "charOffset": 3232, + "charLength": 4, + "snippet": { + "text": "\n\tblockTicks += interval;\n\tif (blockTicks >= 1000) {\n\t\tblockCount = std::min(blockCount + 1, 2);\n\t\tblockTicks = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6079c744ea8dea16d752b054def3a632b7278a897a5aee22af623c141f1547f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 118, + "startColumn": 51, + "charOffset": 3465, + "charLength": 4, + "snippet": { + "text": "2000" + } + }, + "contextRegion": { + "startLine": 116, + "startColumn": 51, + "charOffset": 3361, + "charLength": 4, + "snippet": { + "text": "\tif (followCreature) {\n\t\twalkUpdateTicks += interval;\n\t\tif (forceUpdateFollowPath || walkUpdateTicks >= 2000) {\n\t\t\twalkUpdateTicks = 0;\n\t\t\tforceUpdateFollowPath = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d53dabe99039605a49192598717f0dd4f17ed84f9b426e46be24a7229e1130f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 128, + "startColumn": 3, + "charOffset": 3724, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 126, + "startColumn": 3, + "charOffset": 3616, + "charLength": 3, + "snippet": { + "text": "\t\t// scripting event - onThink\n\t\tconst auto &thinkEvents = self->getCreatureEvents(CREATURE_EVENT_THINK);\n\t\tfor (const auto &creatureEventPtr : thinkEvents) {\n\t\t\tcreatureEventPtr->executeOnThink(self->static_self_cast(), interval);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa97fee4a5810f384b30482ba63514fa7079d5328c38915cc039ac8ae9a9f95d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 129, + "startColumn": 22, + "charOffset": 3796, + "charLength": 14, + "snippet": { + "text": "executeOnThink" + } + }, + "contextRegion": { + "startLine": 127, + "startColumn": 22, + "charOffset": 3647, + "charLength": 14, + "snippet": { + "text": "\t\tconst auto &thinkEvents = self->getCreatureEvents(CREATURE_EVENT_THINK);\n\t\tfor (const auto &creatureEventPtr : thinkEvents) {\n\t\t\tcreatureEventPtr->executeOnThink(self->static_self_cast(), interval);\n\t\t}\n\t};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e92b7858a258529e94df15caa92390bcecdbd3c0c082f0c3eddf57aa9da52da0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 144, + "startColumn": 6, + "charOffset": 4083, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 142, + "startColumn": 6, + "charOffset": 3982, + "charLength": 1, + "snippet": { + "text": "void Creature::onAttacking(uint32_t interval) {\n\tauto attackedCreature = getAttackedCreature();\n\tif (!attackedCreature) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8aadc96cb336fc75281394375728ab73439d23d075cb766aa98947591741cc42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 164, + "startColumn": 34, + "charOffset": 4457, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 162, + "startColumn": 34, + "charOffset": 4389, + "charLength": 15, + "snippet": { + "text": "\nvoid Creature::onCreatureWalk() {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (getWalkDelay() <= 0) {\n\t\tDirection dir;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37363a7ca570e04f4280adbf059e3ae8150f7efcd342d0b58e8e9e4d9e877614" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'dir' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 166, + "startColumn": 13, + "charOffset": 4515, + "charLength": 3, + "snippet": { + "text": "dir" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 13, + "charOffset": 4424, + "charLength": 3, + "snippet": { + "text": "\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (getWalkDelay() <= 0) {\n\t\tDirection dir;\n\t\tuint32_t flags = FLAG_IGNOREFIELDDAMAGE;\n\t\tif (getNextStep(dir, flags)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "715bee333730e8c804305776b722c4a34d4bcca119e7aa81f7a30a3086d5045a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 201, + "startColumn": 34, + "charOffset": 5264, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 34, + "charOffset": 5153, + "charLength": 2, + "snippet": { + "text": "void Creature::onWalk(Direction &dir) {\n\tif (hasCondition(CONDITION_DRUNK)) {\n\t\tuint32_t r = uniform_random(0, 60);\n\t\tif (r <= DIRECTION_DIAGONAL_MASK) {\n\t\t\tif (r < DIRECTION_DIAGONAL_MASK) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34bf29d9b6e42bc2303e64b6838e3d85bc368e4c332fb438a1f9a6de49db14b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 206, + "startColumn": 13, + "charOffset": 5399, + "charLength": 19, + "snippet": { + "text": "internalCreatureSay" + } + }, + "contextRegion": { + "startLine": 204, + "startColumn": 13, + "charOffset": 5345, + "charLength": 19, + "snippet": { + "text": "\t\t\t\tdir = static_cast(r);\n\t\t\t}\n\t\t\tg_game().internalCreatureSay(static_self_cast(), TALKTYPE_MONSTER_SAY, \"Hicks!\", false);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "745261e0648128df3e2a59ddc33a21e61ff05e205eaa675f1be76cd3089178ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 211, + "startColumn": 54, + "charOffset": 5552, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 209, + "startColumn": 54, + "charOffset": 5496, + "charLength": 1, + "snippet": { + "text": "}\n\nbool Creature::getNextStep(Direction &dir, uint32_t &) {\n\tif (listWalkDir.empty()) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93c2a650522aceae37099860c960716c7004fcfacf549d33977338f6a3f45fad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 260, + "startColumn": 21, + "charOffset": 6521, + "charLength": 12, + "snippet": { + "text": "g_dispatcher" + } + }, + "contextRegion": { + "startLine": 258, + "startColumn": 21, + "charOffset": 6496, + "charLength": 12, + "snippet": { + "text": "\t\t}\n\n\t\tself->eventWalk = g_dispatcher().scheduleEvent(\n\t\t\tstatic_cast(ticks),\n\t\t\t[creatureId = self->getID()] { g_game().checkCreatureWalk(creatureId); }, \"Game::checkCreatureWalk\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b03ecff4824cd950e65f095962588fd2a934946b059267e7b7405f931dac1dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 275, + "startColumn": 34, + "charOffset": 6885, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 273, + "startColumn": 34, + "charOffset": 6817, + "charLength": 15, + "snippet": { + "text": "\nvoid Creature::updateMapCache() {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tstd::shared_ptr newTile;\n\tconst Position &myPos = getPosition();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac61fc270d0196085ce956a61b1be2d8c164a573df20a5febcf5835232a298b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'y' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 280, + "startColumn": 40, + "charOffset": 7045, + "charLength": 1, + "snippet": { + "text": "y" + } + }, + "contextRegion": { + "startLine": 278, + "startColumn": 40, + "charOffset": 6975, + "charLength": 1, + "snippet": { + "text": "\tPosition pos(0, 0, myPos.z);\n\n\tfor (int32_t y = -maxWalkCacheHeight; y <= maxWalkCacheHeight; ++y) {\n\t\tfor (int32_t x = -maxWalkCacheWidth; x <= maxWalkCacheWidth; ++x) {\n\t\t\tpos.x = myPos.getX() + x;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6a0961bf4783f16dcd9ff13d8ce7ddeea4e37f8163333a51e3082d44415cd25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 281, + "startColumn": 3, + "charOffset": 7079, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 279, + "startColumn": 3, + "charOffset": 7005, + "charLength": 3, + "snippet": { + "text": "\n\tfor (int32_t y = -maxWalkCacheHeight; y <= maxWalkCacheHeight; ++y) {\n\t\tfor (int32_t x = -maxWalkCacheWidth; x <= maxWalkCacheWidth; ++x) {\n\t\t\tpos.x = myPos.getX() + x;\n\t\t\tpos.y = myPos.getY() + y;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "768b9643f46e8d721a9b4eb8acd84fb5dde90f9a9b02e5df5c75d10ac35c6f2d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'x' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 281, + "startColumn": 40, + "charOffset": 7116, + "charLength": 1, + "snippet": { + "text": "x" + } + }, + "contextRegion": { + "startLine": 279, + "startColumn": 40, + "charOffset": 7005, + "charLength": 1, + "snippet": { + "text": "\n\tfor (int32_t y = -maxWalkCacheHeight; y <= maxWalkCacheHeight; ++y) {\n\t\tfor (int32_t x = -maxWalkCacheWidth; x <= maxWalkCacheWidth; ++x) {\n\t\t\tpos.x = myPos.getX() + x;\n\t\t\tpos.y = myPos.getY() + y;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5238ec65ffc4526dc68c024fb6b28b4be249f685f93db57dc93f3430ebd25b27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 282, + "startColumn": 12, + "charOffset": 7158, + "charLength": 5, + "snippet": { + "text": "myPos" + } + }, + "contextRegion": { + "startLine": 280, + "startColumn": 12, + "charOffset": 7006, + "charLength": 5, + "snippet": { + "text": "\tfor (int32_t y = -maxWalkCacheHeight; y <= maxWalkCacheHeight; ++y) {\n\t\tfor (int32_t x = -maxWalkCacheWidth; x <= maxWalkCacheWidth; ++x) {\n\t\t\tpos.x = myPos.getX() + x;\n\t\t\tpos.y = myPos.getY() + y;\n\t\t\tnewTile = g_game().map.getTile(pos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d517c724fee237930a5a745974d2815d1ceffb73aab4427ddaa12271e3249b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 283, + "startColumn": 12, + "charOffset": 7187, + "charLength": 5, + "snippet": { + "text": "myPos" + } + }, + "contextRegion": { + "startLine": 281, + "startColumn": 12, + "charOffset": 7077, + "charLength": 5, + "snippet": { + "text": "\t\tfor (int32_t x = -maxWalkCacheWidth; x <= maxWalkCacheWidth; ++x) {\n\t\t\tpos.x = myPos.getX() + x;\n\t\t\tpos.y = myPos.getY() + y;\n\t\t\tnewTile = g_game().map.getTile(pos);\n\t\t\tupdateTileCache(newTile, pos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f08a0178249fd360f46d3ff80e5cd95932d5755f999cc90b4db1de25a8a7352f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'newTile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 290, + "startColumn": 54, + "charOffset": 7342, + "charLength": 7, + "snippet": { + "text": "newTile" + } + }, + "contextRegion": { + "startLine": 288, + "startColumn": 54, + "charOffset": 7286, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid Creature::updateTileCache(std::shared_ptr newTile, int32_t dx, int32_t dy) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (std::abs(dx) <= maxWalkCacheWidth && std::abs(dy) <= maxWalkCacheHeight) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "720b6d74e0a342388660db60632ad5d3cae06896345d196f20e0c75712e3f8a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 291, + "startColumn": 34, + "charOffset": 7410, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 289, + "startColumn": 34, + "charOffset": 7288, + "charLength": 15, + "snippet": { + "text": "\nvoid Creature::updateTileCache(std::shared_ptr newTile, int32_t dx, int32_t dy) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (std::abs(dx) <= maxWalkCacheWidth && std::abs(dy) <= maxWalkCacheHeight) {\n\t\tlocalMapCache[maxWalkCacheHeight + dy][maxWalkCacheWidth + dx] = newTile && newTile->queryAdd(0, getCreature(), 1, FLAG_PATHFINDING | FLAG_IGNOREFIELDDAMAGE) == RETURNVALUE_NOERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "507b4774d98f07081f18f110813224912f43cc539ee4988e420e72061036409a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 293, + "startColumn": 3, + "charOffset": 7510, + "charLength": 13, + "snippet": { + "text": "localMapCache" + } + }, + "contextRegion": { + "startLine": 291, + "startColumn": 3, + "charOffset": 7377, + "charLength": 13, + "snippet": { + "text": "\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (std::abs(dx) <= maxWalkCacheWidth && std::abs(dy) <= maxWalkCacheHeight) {\n\t\tlocalMapCache[maxWalkCacheHeight + dy][maxWalkCacheWidth + dx] = newTile && newTile->queryAdd(0, getCreature(), 1, FLAG_PATHFINDING | FLAG_IGNOREFIELDDAMAGE) == RETURNVALUE_NOERROR;\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ebf04b6eb53578c199928a804b0d88e0dc0877da094e468a55ecb56c0953f4e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 293, + "startColumn": 135, + "charOffset": 7642, + "charLength": 1, + "snippet": { + "text": "|" + } + }, + "contextRegion": { + "startLine": 291, + "startColumn": 135, + "charOffset": 7377, + "charLength": 1, + "snippet": { + "text": "\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (std::abs(dx) <= maxWalkCacheWidth && std::abs(dy) <= maxWalkCacheHeight) {\n\t\tlocalMapCache[maxWalkCacheHeight + dy][maxWalkCacheWidth + dx] = newTile && newTile->queryAdd(0, getCreature(), 1, FLAG_PATHFINDING | FLAG_IGNOREFIELDDAMAGE) == RETURNVALUE_NOERROR;\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6668b1af69d373d7532a49869159c898f725d4c85da46ae3a9733bad05d2560" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int_fast32_t' (aka 'long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 300, + "startColumn": 16, + "charOffset": 7862, + "charLength": 8, + "snippet": { + "text": "Position" + } + }, + "contextRegion": { + "startLine": 298, + "startColumn": 16, + "charOffset": 7782, + "charLength": 8, + "snippet": { + "text": "\tconst Position &myPos = getPosition();\n\tif (pos.z == myPos.z) {\n\t\tint32_t dx = Position::getOffsetX(pos, myPos);\n\t\tint32_t dy = Position::getOffsetY(pos, myPos);\n\t\tupdateTileCache(std::move(upTile), dx, dy);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0107bb494ca5a53e4119b6d105bda8164a337109831c9983cb6b3d33b94a98c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 300, + "startColumn": 16, + "charOffset": 7862, + "charLength": 8, + "snippet": { + "text": "Position" + } + }, + "contextRegion": { + "startLine": 298, + "startColumn": 16, + "charOffset": 7782, + "charLength": 8, + "snippet": { + "text": "\tconst Position &myPos = getPosition();\n\tif (pos.z == myPos.z) {\n\t\tint32_t dx = Position::getOffsetX(pos, myPos);\n\t\tint32_t dy = Position::getOffsetY(pos, myPos);\n\t\tupdateTileCache(std::move(upTile), dx, dy);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc17ff40cfc2d6c3ea13a469847d7f185beb765a478e06157b20057fa05019d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int_fast32_t' (aka 'long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 301, + "startColumn": 16, + "charOffset": 7911, + "charLength": 8, + "snippet": { + "text": "Position" + } + }, + "contextRegion": { + "startLine": 299, + "startColumn": 16, + "charOffset": 7822, + "charLength": 8, + "snippet": { + "text": "\tif (pos.z == myPos.z) {\n\t\tint32_t dx = Position::getOffsetX(pos, myPos);\n\t\tint32_t dy = Position::getOffsetY(pos, myPos);\n\t\tupdateTileCache(std::move(upTile), dx, dy);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fbdd626c51d58404208a9c6658f0a0663d2ec65c9e55b3ed9deaf460aea985b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 301, + "startColumn": 16, + "charOffset": 7911, + "charLength": 8, + "snippet": { + "text": "Position" + } + }, + "contextRegion": { + "startLine": 299, + "startColumn": 16, + "charOffset": 7822, + "charLength": 8, + "snippet": { + "text": "\tif (pos.z == myPos.z) {\n\t\tint32_t dx = Position::getOffsetX(pos, myPos);\n\t\tint32_t dy = Position::getOffsetY(pos, myPos);\n\t\tupdateTileCache(std::move(upTile), dx, dy);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2197fdb1e9cc9277893b1686495037bb61d28dbb1ef118dc61d59f6070922c51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 307, + "startColumn": 34, + "charOffset": 8084, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 305, + "startColumn": 34, + "charOffset": 7996, + "charLength": 15, + "snippet": { + "text": "\nint32_t Creature::getWalkCache(const Position &pos) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (!useCacheMap()) {\n\t\treturn 2;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "480eb1f411a1c80255d4373046be0e77cbb98e14931ccd304b29b871f4095731" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int_fast32_t' (aka 'long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 321, + "startColumn": 15, + "charOffset": 8273, + "charLength": 8, + "snippet": { + "text": "Position" + } + }, + "contextRegion": { + "startLine": 319, + "startColumn": 15, + "charOffset": 8255, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tint32_t dx = Position::getOffsetX(pos, myPos);\n\tif (std::abs(dx) <= maxWalkCacheWidth) {\n\t\tint32_t dy = Position::getOffsetY(pos, myPos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c390494ff611e8bbc75376c7693f9f8f56f4f70753b440aeb1150f39ec0a716" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 321, + "startColumn": 15, + "charOffset": 8273, + "charLength": 8, + "snippet": { + "text": "Position" + } + }, + "contextRegion": { + "startLine": 319, + "startColumn": 15, + "charOffset": 8255, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tint32_t dx = Position::getOffsetX(pos, myPos);\n\tif (std::abs(dx) <= maxWalkCacheWidth) {\n\t\tint32_t dy = Position::getOffsetY(pos, myPos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45d4aec35d75823382276e769d9a6730b9ccd734675538f1ba18d101d5232c1e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int_fast32_t' (aka 'long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 323, + "startColumn": 16, + "charOffset": 8364, + "charLength": 8, + "snippet": { + "text": "Position" + } + }, + "contextRegion": { + "startLine": 321, + "startColumn": 16, + "charOffset": 8259, + "charLength": 8, + "snippet": { + "text": "\tint32_t dx = Position::getOffsetX(pos, myPos);\n\tif (std::abs(dx) <= maxWalkCacheWidth) {\n\t\tint32_t dy = Position::getOffsetY(pos, myPos);\n\t\tif (std::abs(dy) <= maxWalkCacheHeight) {\n\t\t\treturn localMapCache[maxWalkCacheHeight + dy][maxWalkCacheWidth + dx];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4559668f0775dcbdf885d06addda0818dba8d6e67387526b282a2c2827718185" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 323, + "startColumn": 16, + "charOffset": 8364, + "charLength": 8, + "snippet": { + "text": "Position" + } + }, + "contextRegion": { + "startLine": 321, + "startColumn": 16, + "charOffset": 8259, + "charLength": 8, + "snippet": { + "text": "\tint32_t dx = Position::getOffsetX(pos, myPos);\n\tif (std::abs(dx) <= maxWalkCacheWidth) {\n\t\tint32_t dy = Position::getOffsetY(pos, myPos);\n\t\tif (std::abs(dy) <= maxWalkCacheHeight) {\n\t\t\treturn localMapCache[maxWalkCacheHeight + dy][maxWalkCacheWidth + dx];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73247def0b750d1ccb08af22f3a0778afbec663f4f2a73cf6a6b866353f716a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 325, + "startColumn": 11, + "charOffset": 8452, + "charLength": 13, + "snippet": { + "text": "localMapCache" + } + }, + "contextRegion": { + "startLine": 323, + "startColumn": 11, + "charOffset": 8349, + "charLength": 13, + "snippet": { + "text": "\t\tint32_t dy = Position::getOffsetY(pos, myPos);\n\t\tif (std::abs(dy) <= maxWalkCacheHeight) {\n\t\t\treturn localMapCache[maxWalkCacheHeight + dy][maxWalkCacheWidth + dx];\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c2799207d037a5446c8a48da607d39b144bd035d1da13714ac04b1a767152cff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 325, + "startColumn": 11, + "charOffset": 8452, + "charLength": 13, + "snippet": { + "text": "localMapCache" + } + }, + "contextRegion": { + "startLine": 323, + "startColumn": 11, + "charOffset": 8349, + "charLength": 13, + "snippet": { + "text": "\t\tint32_t dy = Position::getOffsetY(pos, myPos);\n\t\tif (std::abs(dy) <= maxWalkCacheHeight) {\n\t\t\treturn localMapCache[maxWalkCacheHeight + dy][maxWalkCacheWidth + dx];\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5a2de490b82149fd3fe4a1ed0e7e828a1352e5bb0dc52892dd4894894d7aab9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 339, + "startColumn": 109, + "charOffset": 8846, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 337, + "startColumn": 109, + "charOffset": 8735, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Creature::onUpdateTileItem(std::shared_ptr updateTile, const Position &pos, std::shared_ptr, const ItemType &oldType, std::shared_ptr, const ItemType &newType) {\n\tif (!isMapLoaded) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3ec2e39061f7d6d0a1718481e0d141017cdabd32c55a30aa3ad201f040674ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter #3 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 339, + "startColumn": 109, + "charOffset": 8846, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 337, + "startColumn": 109, + "charOffset": 8735, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Creature::onUpdateTileItem(std::shared_ptr updateTile, const Position &pos, std::shared_ptr, const ItemType &oldType, std::shared_ptr, const ItemType &newType) {\n\tif (!isMapLoaded) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d08e88c12d00d77344718bbb7d85663ecfa0db382a3adb9ece36aacb3d31a3e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter #5 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 339, + "startColumn": 157, + "charOffset": 8894, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 337, + "startColumn": 157, + "charOffset": 8735, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Creature::onUpdateTileItem(std::shared_ptr updateTile, const Position &pos, std::shared_ptr, const ItemType &oldType, std::shared_ptr, const ItemType &newType) {\n\tif (!isMapLoaded) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d175cc02f0f8a497506b206d81ac87ff37912734b6ae6bc3ad45852494478718" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 351, + "startColumn": 132, + "charOffset": 9280, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 349, + "startColumn": 132, + "charOffset": 9146, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Creature::onRemoveTileItem(std::shared_ptr updateTile, const Position &pos, const ItemType &iType, std::shared_ptr) {\n\tif (!isMapLoaded) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c03b95404e56466096f9a8f2b9dca31f84bf596f45980af4820b493e7598157f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter #4 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 351, + "startColumn": 132, + "charOffset": 9280, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 349, + "startColumn": 132, + "charOffset": 9146, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Creature::onRemoveTileItem(std::shared_ptr updateTile, const Position &pos, const ItemType &iType, std::shared_ptr) {\n\tif (!isMapLoaded) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49b1c26f5fea4b893437f75bc3bf426cd14eeb08b27b448276478c5010ef23f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 363, + "startColumn": 59, + "charOffset": 9541, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 361, + "startColumn": 59, + "charOffset": 9480, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Creature::onCreatureAppear(std::shared_ptr creature, bool isLogin) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (creature == getCreature()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53d7ea4e1cff2bb14bdbd468becf74686798486358d059514d608a63a9720cd6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 364, + "startColumn": 34, + "charOffset": 9600, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 362, + "startColumn": 34, + "charOffset": 9482, + "charLength": 15, + "snippet": { + "text": "\nvoid Creature::onCreatureAppear(std::shared_ptr creature, bool isLogin) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (creature == getCreature()) {\n\t\tif (useCacheMap()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad4abc4477ac3f07f7e03571e328f50b67641875e409c50f65f50d5bf53e873f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 365, + "startColumn": 2, + "charOffset": 9619, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 363, + "startColumn": 2, + "charOffset": 9483, + "charLength": 2, + "snippet": { + "text": "void Creature::onCreatureAppear(std::shared_ptr creature, bool isLogin) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (creature == getCreature()) {\n\t\tif (useCacheMap()) {\n\t\t\tisMapLoaded = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da4cd646f437e2ea953a409a588b6199317848a4cd8dbb4398c5d4431a495e6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 381, + "startColumn": 59, + "charOffset": 9995, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 379, + "startColumn": 59, + "charOffset": 9934, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Creature::onRemoveCreature(std::shared_ptr creature, bool) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tonCreatureDisappear(creature, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41e711dca5dafb10c4e0f46f36d354604acff8873201ab5f3fa93b61400d45da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 381, + "startColumn": 73, + "charOffset": 10009, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 379, + "startColumn": 73, + "charOffset": 9934, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Creature::onRemoveCreature(std::shared_ptr creature, bool) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tonCreatureDisappear(creature, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbdd758986abee7cfc2dd61a7d4980323b8dced3c212818e3bc9d2aa17ed6161" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 382, + "startColumn": 34, + "charOffset": 10046, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 380, + "startColumn": 34, + "charOffset": 9936, + "charLength": 15, + "snippet": { + "text": "\nvoid Creature::onRemoveCreature(std::shared_ptr creature, bool) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tonCreatureDisappear(creature, true);\n\tif (creature != getCreature() && isMapLoaded) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d37a5dc11054ce6b161b9ca8f24ee207ae310187444e366539d7f9f47b35d58e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 392, + "startColumn": 12, + "charOffset": 10457, + "charLength": 19, + "snippet": { + "text": "setAttackedCreature" + } + }, + "contextRegion": { + "startLine": 390, + "startColumn": 12, + "charOffset": 10279, + "charLength": 19, + "snippet": { + "text": "\t// Update player from monster target list (avoid memory usage after clean)\n\tif (auto monster = getMonster(); monster && monster->getAttackedCreature() == creature) {\n\t\tmonster->setAttackedCreature(creature);\n\t\tmonster->setFollowCreature(creature);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "499ad061a9485274a429b92fbc410617f18522d4d2f626087935d6965e2360cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 393, + "startColumn": 12, + "charOffset": 10499, + "charLength": 17, + "snippet": { + "text": "setFollowCreature" + } + }, + "contextRegion": { + "startLine": 391, + "startColumn": 12, + "charOffset": 10355, + "charLength": 17, + "snippet": { + "text": "\tif (auto monster = getMonster(); monster && monster->getAttackedCreature() == creature) {\n\t\tmonster->setAttackedCreature(creature);\n\t\tmonster->setFollowCreature(creature);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d54e870fa3b19a664bb305aab54781c55ad7ece086f9ae01fcdab2f05458d4dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 397, + "startColumn": 62, + "charOffset": 10595, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 395, + "startColumn": 62, + "charOffset": 10531, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Creature::onCreatureDisappear(std::shared_ptr creature, bool isLogout) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (getAttackedCreature() == creature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ddf5573b44d7d2487d4a66f0f26b6921962aa1dc50b62cb22fe05a8c77c598c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 398, + "startColumn": 34, + "charOffset": 10655, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 396, + "startColumn": 34, + "charOffset": 10533, + "charLength": 15, + "snippet": { + "text": "\nvoid Creature::onCreatureDisappear(std::shared_ptr creature, bool isLogout) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (getAttackedCreature() == creature) {\n\t\tsetAttackedCreature(nullptr);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "983d67169df4307373e82d0dae791239c6a4a26cbab1a33c19876094c25dcba3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 400, + "startColumn": 3, + "charOffset": 10717, + "charLength": 19, + "snippet": { + "text": "setAttackedCreature" + } + }, + "contextRegion": { + "startLine": 398, + "startColumn": 3, + "charOffset": 10622, + "charLength": 19, + "snippet": { + "text": "\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (getAttackedCreature() == creature) {\n\t\tsetAttackedCreature(nullptr);\n\t\tonAttackedCreatureDisappear(isLogout);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86d80bcf7b554a3cd550f34796e02b295de550814fedc515493de9ab6cd394e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 405, + "startColumn": 3, + "charOffset": 10834, + "charLength": 17, + "snippet": { + "text": "setFollowCreature" + } + }, + "contextRegion": { + "startLine": 403, + "startColumn": 3, + "charOffset": 10791, + "charLength": 17, + "snippet": { + "text": "\n\tif (getFollowCreature() == creature) {\n\t\tsetFollowCreature(nullptr);\n\t\tonFollowCreatureDisappear(isLogout);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d905fd221c1045c1fbb0a9afb2deb9db17ff26eb4b38d303e9304f636f29aaa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 411, + "startColumn": 34, + "charOffset": 10987, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 409, + "startColumn": 34, + "charOffset": 10906, + "charLength": 15, + "snippet": { + "text": "\nvoid Creature::onChangeZone(ZoneType_t zone) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tauto attackedCreature = getAttackedCreature();\n\tif (attackedCreature && zone == ZONE_PROTECTION) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26e874f631f747c0d4331f837cd06d968e9c3e70a006346b4d4333ab44aa82ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 419, + "startColumn": 34, + "charOffset": 11255, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 417, + "startColumn": 34, + "charOffset": 11158, + "charLength": 15, + "snippet": { + "text": "\nvoid Creature::onAttackedCreatureChangeZone(ZoneType_t zone) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (zone == ZONE_PROTECTION) {\n\t\tauto attackedCreature = getAttackedCreature();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa689295a07bc0a2168106a4b2ff0d03d17160641db6526c7f1bd5d97a7588ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'checkSummonMove' has cognitive complexity of 37 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 428, + "startColumn": 16, + "charOffset": 11454, + "charLength": 15, + "snippet": { + "text": "checkSummonMove" + } + }, + "contextRegion": { + "startLine": 426, + "startColumn": 16, + "charOffset": 11436, + "charLength": 15, + "snippet": { + "text": "}\n\nvoid Creature::checkSummonMove(const Position &newPos, bool teleportSummon) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (hasSummons()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aba78f38c018a2e3f79c250a729ee4faac7b047e05a2ae57749b456cae0d1eb7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 429, + "startColumn": 34, + "charOffset": 11550, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 427, + "startColumn": 34, + "charOffset": 11438, + "charLength": 15, + "snippet": { + "text": "\nvoid Creature::checkSummonMove(const Position &newPos, bool teleportSummon) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (hasSummons()) {\n\t\tstd::vector> despawnMonsterList;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8fe8c7725e969d9cf9c4365ba41f200aed369b4eb33de7dadeb544ac9202777" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 432, + "startColumn": 3, + "charOffset": 11652, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 430, + "startColumn": 3, + "charOffset": 11568, + "charLength": 3, + "snippet": { + "text": "\tif (hasSummons()) {\n\t\tstd::vector> despawnMonsterList;\n\t\tfor (const auto &summon : getSummons()) {\n\t\t\tconst auto &pos = summon->getPosition();\n\t\t\tconst auto &monster = summon->getMonster();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "773ffacb590c3f055143c52b7641499c8af076f1f28f4b499b537d2d3562c8fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Expression can be simplified" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 436, + "startColumn": 78, + "charOffset": 11895, + "charLength": 1, + "snippet": { + "text": ":" + } + }, + "contextRegion": { + "startLine": 434, + "startColumn": 78, + "charOffset": 11738, + "charLength": 1, + "snippet": { + "text": "\t\t\tconst auto &monster = summon->getMonster();\n\t\t\tconst auto &tile = getTile();\n\t\t\tbool protectionZoneCheck = tile ? tile->hasFlag(TILESTATE_PROTECTIONZONE) : false;\n\t\t\t// Check if any of our summons is out of range (+/- 0 floors or 15 tiles away)\n\t\t\tbool checkSummonDist = Position::getDistanceZ(newPos, pos) > 0 || (std::max(Position::getDistanceX(newPos, pos), Position::getDistanceY(newPos, pos)) > 15);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae416fd3847478b381c722418ab351db023f28274b48f1ae74ed59780296248c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "15 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 438, + "startColumn": 165, + "charOffset": 12150, + "charLength": 2, + "snippet": { + "text": "15" + } + }, + "contextRegion": { + "startLine": 436, + "startColumn": 165, + "charOffset": 11818, + "charLength": 2, + "snippet": { + "text": "\t\t\tbool protectionZoneCheck = tile ? tile->hasFlag(TILESTATE_PROTECTIONZONE) : false;\n\t\t\t// Check if any of our summons is out of range (+/- 0 floors or 15 tiles away)\n\t\t\tbool checkSummonDist = Position::getDistanceZ(newPos, pos) > 0 || (std::max(Position::getDistanceX(newPos, pos), Position::getDistanceY(newPos, pos)) > 15);\n\t\t\t// Check if any of our summons is out of range (+/- 2 floors or 30 tiles away)\n\t\t\tbool checkRemoveDist = Position::getDistanceZ(newPos, pos) > 2 || (std::max(Position::getDistanceX(newPos, pos), Position::getDistanceY(newPos, pos)) > 30);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d648c37f4af978c26d312ffe6c546c49b31e980c6966acf3a4ef3424ec75af0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 440, + "startColumn": 165, + "charOffset": 12401, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 438, + "startColumn": 165, + "charOffset": 11986, + "charLength": 2, + "snippet": { + "text": "\t\t\tbool checkSummonDist = Position::getDistanceZ(newPos, pos) > 0 || (std::max(Position::getDistanceX(newPos, pos), Position::getDistanceY(newPos, pos)) > 15);\n\t\t\t// Check if any of our summons is out of range (+/- 2 floors or 30 tiles away)\n\t\t\tbool checkRemoveDist = Position::getDistanceZ(newPos, pos) > 2 || (std::max(Position::getDistanceX(newPos, pos), Position::getDistanceY(newPos, pos)) > 30);\n\n\t\t\tif ((monster && monster->isFamiliar() && checkSummonDist) || (teleportSummon && !protectionZoneCheck && checkSummonDist)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ab1496336f70f17e1fc80c2aeb9678020b67f6b0c50586533e0aaf81aa4b893" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 444, + "startColumn": 9, + "charOffset": 12596, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 442, + "startColumn": 9, + "charOffset": 12407, + "charLength": 1, + "snippet": { + "text": "\t\t\tif ((monster && monster->isFamiliar() && checkSummonDist) || (teleportSummon && !protectionZoneCheck && checkSummonDist)) {\n\t\t\t\tconst auto &creatureMaster = summon->getMaster();\n\t\t\t\tif (!creatureMaster) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0d2735c0aaf7a8ebeaf65c84da0f66128a70c3fae02f492c7613c40a1630994" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 452, + "startColumn": 16, + "charOffset": 12917, + "charLength": 16, + "snippet": { + "text": "internalTeleport" + } + }, + "contextRegion": { + "startLine": 450, + "startColumn": 16, + "charOffset": 12751, + "charLength": 16, + "snippet": { + "text": "\t\t\t\t\t\tg_logger().warn(\"[{}] cannot teleport summon, position has teleport. {}\", __FUNCTION__, creatureMaster->getPosition().toString());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tg_game().internalTeleport(summon, creatureMaster->getPosition(), true);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6472d5f0243f7c827358a854afa9f1314fcbc407bc1bea7b48e5a119b36b6ea3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 463, + "startColumn": 3, + "charOffset": 13174, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 461, + "startColumn": 3, + "charOffset": 13167, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfor (const auto &despawnCreature : despawnMonsterList) {\n\t\t\tif (!despawnMonsterList.empty()) {\n\t\t\t\tg_game().removeCreature(despawnCreature, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aacaa74e34a4cdb07d5061082f960e01782460cd3e6f6a8068dea46ab07d9ae5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 465, + "startColumn": 14, + "charOffset": 13282, + "charLength": 14, + "snippet": { + "text": "removeCreature" + } + }, + "contextRegion": { + "startLine": 463, + "startColumn": 14, + "charOffset": 13172, + "charLength": 14, + "snippet": { + "text": "\t\tfor (const auto &despawnCreature : despawnMonsterList) {\n\t\t\tif (!despawnMonsterList.empty()) {\n\t\t\t\tg_game().removeCreature(despawnCreature, true);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6000c4caf0b5105f202ffd4f9225ef34a114a74f179b5dd1a442dff87a90a238" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'onCreatureMove' has cognitive complexity of 129 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 471, + "startColumn": 16, + "charOffset": 13351, + "charLength": 14, + "snippet": { + "text": "onCreatureMove" + } + }, + "contextRegion": { + "startLine": 469, + "startColumn": 16, + "charOffset": 13333, + "charLength": 14, + "snippet": { + "text": "}\n\nvoid Creature::onCreatureMove(const std::shared_ptr &creature, const std::shared_ptr &newTile, const Position &newPos, const std::shared_ptr &oldTile, const Position &oldPos, bool teleport) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (creature == getCreature()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc72b67eb186dccabf9a1286cc8f666b178a64933144eeaef76b32ee5c9074cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 472, + "startColumn": 34, + "charOffset": 13583, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 470, + "startColumn": 34, + "charOffset": 13335, + "charLength": 15, + "snippet": { + "text": "\nvoid Creature::onCreatureMove(const std::shared_ptr &creature, const std::shared_ptr &newTile, const Position &newPos, const std::shared_ptr &oldTile, const Position &oldPos, bool teleport) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (creature == getCreature()) {\n\t\tlastStep = OTSYS_TIME();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa193f3bf61a5a276b83927d127a2c86fb0b0cc3c50689d0eedfbe05ddb51b16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 478, + "startColumn": 4, + "charOffset": 13705, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 476, + "startColumn": 4, + "charOffset": 13682, + "charLength": 2, + "snippet": { + "text": "\n\t\tif (!teleport) {\n\t\t\tif (oldPos.z != newPos.z) {\n\t\t\t\tlastStepCost = WALK_FLOOR_CHANGE_EXTRA_COST;\n\t\t\t} else if (Position::getDistanceX(newPos, oldPos) >= 1 && Position::getDistanceY(newPos, oldPos) >= 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fa668f71401fcebffea09fe6eeaeb5ccf3684ee94b6f61343b4985c2dcff2f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 510, + "startColumn": 5, + "charOffset": 14600, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 508, + "startColumn": 5, + "charOffset": 14552, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tconst Position &myPos = getPosition();\n\n\t\t\t\tif (oldPos.y > newPos.y) { // north\n\t\t\t\t\t// shift y south\n\t\t\t\t\tfor (int32_t y = mapWalkHeight - 1; --y >= 0;) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbd1233131fd92d33f8f1eacc96635eaa075c70a45ccfe463b2702bf01b222a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 512, + "startColumn": 6, + "charOffset": 14663, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 510, + "startColumn": 6, + "charOffset": 14596, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tif (oldPos.y > newPos.y) { // north\n\t\t\t\t\t// shift y south\n\t\t\t\t\tfor (int32_t y = mapWalkHeight - 1; --y >= 0;) {\n\t\t\t\t\t\tmemcpy(localMapCache[y + 1], localMapCache[y], sizeof(localMapCache[y]));\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e59e35c5bd024628b81bba66fa97e65ba6e6b4a86ee67d08ccf0324e95e77ae3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 512, + "startColumn": 6, + "charOffset": 14663, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 510, + "startColumn": 6, + "charOffset": 14596, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tif (oldPos.y > newPos.y) { // north\n\t\t\t\t\t// shift y south\n\t\t\t\t\tfor (int32_t y = mapWalkHeight - 1; --y >= 0;) {\n\t\t\t\t\t\tmemcpy(localMapCache[y + 1], localMapCache[y], sizeof(localMapCache[y]));\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afaca88f77ca095d4f2d86f6712cdae8d3b6b2ec756f26a95c7505d129ea901a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'y' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 512, + "startColumn": 42, + "charOffset": 14699, + "charLength": 2, + "snippet": { + "text": "--" + } + }, + "contextRegion": { + "startLine": 510, + "startColumn": 42, + "charOffset": 14596, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tif (oldPos.y > newPos.y) { // north\n\t\t\t\t\t// shift y south\n\t\t\t\t\tfor (int32_t y = mapWalkHeight - 1; --y >= 0;) {\n\t\t\t\t\t\tmemcpy(localMapCache[y + 1], localMapCache[y], sizeof(localMapCache[y]));\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "917ac114f9277144ace914ac6886ace616417471aec07a09b6ed4bb18772ab86" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 513, + "startColumn": 7, + "charOffset": 14718, + "charLength": 6, + "snippet": { + "text": "memcpy" + } + }, + "contextRegion": { + "startLine": 511, + "startColumn": 7, + "charOffset": 14636, + "charLength": 6, + "snippet": { + "text": "\t\t\t\t\t// shift y south\n\t\t\t\t\tfor (int32_t y = mapWalkHeight - 1; --y >= 0;) {\n\t\t\t\t\t\tmemcpy(localMapCache[y + 1], localMapCache[y], sizeof(localMapCache[y]));\n\t\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aadfcfa07f219e5eaa566bd0ad3622b1c7ce36dd2a040a9b777451949971cb20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 513, + "startColumn": 14, + "charOffset": 14725, + "charLength": 13, + "snippet": { + "text": "localMapCache" + } + }, + "contextRegion": { + "startLine": 511, + "startColumn": 14, + "charOffset": 14636, + "charLength": 13, + "snippet": { + "text": "\t\t\t\t\t// shift y south\n\t\t\t\t\tfor (int32_t y = mapWalkHeight - 1; --y >= 0;) {\n\t\t\t\t\t\tmemcpy(localMapCache[y + 1], localMapCache[y], sizeof(localMapCache[y]));\n\t\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "892c73b6170c82414a7e3ca4d54b35ce0e40e87d1529109a61dde1ccee103b9a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 513, + "startColumn": 14, + "charOffset": 14725, + "charLength": 13, + "snippet": { + "text": "localMapCache" + } + }, + "contextRegion": { + "startLine": 511, + "startColumn": 14, + "charOffset": 14636, + "charLength": 13, + "snippet": { + "text": "\t\t\t\t\t// shift y south\n\t\t\t\t\tfor (int32_t y = mapWalkHeight - 1; --y >= 0;) {\n\t\t\t\t\t\tmemcpy(localMapCache[y + 1], localMapCache[y], sizeof(localMapCache[y]));\n\t\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "996e88e2da2f1899602ba81f65d2b3e1f4398b11bd2ded61b84359fcb0cf4548" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 513, + "startColumn": 14, + "charOffset": 14725, + "charLength": 13, + "snippet": { + "text": "localMapCache" + } + }, + "contextRegion": { + "startLine": 511, + "startColumn": 14, + "charOffset": 14636, + "charLength": 13, + "snippet": { + "text": "\t\t\t\t\t// shift y south\n\t\t\t\t\tfor (int32_t y = mapWalkHeight - 1; --y >= 0;) {\n\t\t\t\t\t\tmemcpy(localMapCache[y + 1], localMapCache[y], sizeof(localMapCache[y]));\n\t\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1178ae87b7ec29c5ea53d6b11ca5efb33914c49242b9e9675025c01caa607777" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 513, + "startColumn": 36, + "charOffset": 14747, + "charLength": 13, + "snippet": { + "text": "localMapCache" + } + }, + "contextRegion": { + "startLine": 511, + "startColumn": 36, + "charOffset": 14636, + "charLength": 13, + "snippet": { + "text": "\t\t\t\t\t// shift y south\n\t\t\t\t\tfor (int32_t y = mapWalkHeight - 1; --y >= 0;) {\n\t\t\t\t\t\tmemcpy(localMapCache[y + 1], localMapCache[y], sizeof(localMapCache[y]));\n\t\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0414eb44c8bbeae83b89ff39a96c74e90def645fdb499abe145a0fbed990e28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 513, + "startColumn": 36, + "charOffset": 14747, + "charLength": 13, + "snippet": { + "text": "localMapCache" + } + }, + "contextRegion": { + "startLine": 511, + "startColumn": 36, + "charOffset": 14636, + "charLength": 13, + "snippet": { + "text": "\t\t\t\t\t// shift y south\n\t\t\t\t\tfor (int32_t y = mapWalkHeight - 1; --y >= 0;) {\n\t\t\t\t\t\tmemcpy(localMapCache[y + 1], localMapCache[y], sizeof(localMapCache[y]));\n\t\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65987a64ca02a2f3e8834dbfe58264db161294454221b54d6f06b1038cf7b71e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 513, + "startColumn": 36, + "charOffset": 14747, + "charLength": 13, + "snippet": { + "text": "localMapCache" + } + }, + "contextRegion": { + "startLine": 511, + "startColumn": 36, + "charOffset": 14636, + "charLength": 13, + "snippet": { + "text": "\t\t\t\t\t// shift y south\n\t\t\t\t\tfor (int32_t y = mapWalkHeight - 1; --y >= 0;) {\n\t\t\t\t\t\tmemcpy(localMapCache[y + 1], localMapCache[y], sizeof(localMapCache[y]));\n\t\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d302837b29fe97f1ac963ace7017767cecd0b1bdeb800bcb2b6cdd44a3bf915" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 513, + "startColumn": 61, + "charOffset": 14772, + "charLength": 13, + "snippet": { + "text": "localMapCache" + } + }, + "contextRegion": { + "startLine": 511, + "startColumn": 61, + "charOffset": 14636, + "charLength": 13, + "snippet": { + "text": "\t\t\t\t\t// shift y south\n\t\t\t\t\tfor (int32_t y = mapWalkHeight - 1; --y >= 0;) {\n\t\t\t\t\t\tmemcpy(localMapCache[y + 1], localMapCache[y], sizeof(localMapCache[y]));\n\t\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "426633c884e6784d805e412f834e2710fb76450f71c4627d5cf7f73746eceff8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 517, + "startColumn": 6, + "charOffset": 14822, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 515, + "startColumn": 6, + "charOffset": 14799, + "charLength": 3, + "snippet": { + "text": "\n\t\t\t\t\t// update 0\n\t\t\t\t\tfor (int32_t x = -maxWalkCacheWidth; x <= maxWalkCacheWidth; ++x) {\n\t\t\t\t\t\tconst auto &cacheTile = g_game().map.getTile(static_cast(myPos.getX() + x), static_cast(myPos.getY() - maxWalkCacheHeight), myPos.z);\n\t\t\t\t\t\tupdateTileCache(cacheTile, x, -maxWalkCacheHeight);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9712a46e3bf47cce60feb53bba2e50a893e1907ef93c379f97a1365f59ada26c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'x' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 517, + "startColumn": 43, + "charOffset": 14859, + "charLength": 1, + "snippet": { + "text": "x" + } + }, + "contextRegion": { + "startLine": 515, + "startColumn": 43, + "charOffset": 14799, + "charLength": 1, + "snippet": { + "text": "\n\t\t\t\t\t// update 0\n\t\t\t\t\tfor (int32_t x = -maxWalkCacheWidth; x <= maxWalkCacheWidth; ++x) {\n\t\t\t\t\t\tconst auto &cacheTile = g_game().map.getTile(static_cast(myPos.getX() + x), static_cast(myPos.getY() - maxWalkCacheHeight), myPos.z);\n\t\t\t\t\t\tupdateTileCache(cacheTile, x, -maxWalkCacheHeight);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36b8c648d87993050b5ac6e42a2910972833e8926a6725dcf378e6771dceef58" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 523, + "startColumn": 6, + "charOffset": 15189, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 521, + "startColumn": 6, + "charOffset": 15115, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t} else if (oldPos.y < newPos.y) { // south\n\t\t\t\t\t// shift y north\n\t\t\t\t\tfor (int32_t y = 0; y <= mapWalkHeight - 2; ++y) {\n\t\t\t\t\t\tmemcpy(localMapCache[y], localMapCache[y + 1], sizeof(localMapCache[y]));\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5bb07e236de84243b1a13862250835b6385a7e0f2c92d11ddf6dd217828cce85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 524, + "startColumn": 7, + "charOffset": 15246, + "charLength": 6, + "snippet": { + "text": "memcpy" + } + }, + "contextRegion": { + "startLine": 522, + "startColumn": 7, + "charOffset": 15162, + "charLength": 6, + "snippet": { + "text": "\t\t\t\t\t// shift y north\n\t\t\t\t\tfor (int32_t y = 0; y <= mapWalkHeight - 2; ++y) {\n\t\t\t\t\t\tmemcpy(localMapCache[y], localMapCache[y + 1], sizeof(localMapCache[y]));\n\t\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26d30bf8197479fae580abc807cda9f5d26d7b4d4dba6cf506cb1bc8db0d1014" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 524, + "startColumn": 14, + "charOffset": 15253, + "charLength": 13, + "snippet": { + "text": "localMapCache" + } + }, + "contextRegion": { + "startLine": 522, + "startColumn": 14, + "charOffset": 15162, + "charLength": 13, + "snippet": { + "text": "\t\t\t\t\t// shift y north\n\t\t\t\t\tfor (int32_t y = 0; y <= mapWalkHeight - 2; ++y) {\n\t\t\t\t\t\tmemcpy(localMapCache[y], localMapCache[y + 1], sizeof(localMapCache[y]));\n\t\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d5348d5d8fc1368ee4f839d8d923f684fc719a9472dba84fe250b7efe21cd06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 524, + "startColumn": 14, + "charOffset": 15253, + "charLength": 13, + "snippet": { + "text": "localMapCache" + } + }, + "contextRegion": { + "startLine": 522, + "startColumn": 14, + "charOffset": 15162, + "charLength": 13, + "snippet": { + "text": "\t\t\t\t\t// shift y north\n\t\t\t\t\tfor (int32_t y = 0; y <= mapWalkHeight - 2; ++y) {\n\t\t\t\t\t\tmemcpy(localMapCache[y], localMapCache[y + 1], sizeof(localMapCache[y]));\n\t\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08f9eb0ed1bd7313382727ec58ab39a9a3c73d46ad66e5e81bdbcced410d5998" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 524, + "startColumn": 14, + "charOffset": 15253, + "charLength": 13, + "snippet": { + "text": "localMapCache" + } + }, + "contextRegion": { + "startLine": 522, + "startColumn": 14, + "charOffset": 15162, + "charLength": 13, + "snippet": { + "text": "\t\t\t\t\t// shift y north\n\t\t\t\t\tfor (int32_t y = 0; y <= mapWalkHeight - 2; ++y) {\n\t\t\t\t\t\tmemcpy(localMapCache[y], localMapCache[y + 1], sizeof(localMapCache[y]));\n\t\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0cced422f85c029db1534a552fc0b87b6f1458a1f45a9a7f835a452d3dec25ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 524, + "startColumn": 32, + "charOffset": 15271, + "charLength": 13, + "snippet": { + "text": "localMapCache" + } + }, + "contextRegion": { + "startLine": 522, + "startColumn": 32, + "charOffset": 15162, + "charLength": 13, + "snippet": { + "text": "\t\t\t\t\t// shift y north\n\t\t\t\t\tfor (int32_t y = 0; y <= mapWalkHeight - 2; ++y) {\n\t\t\t\t\t\tmemcpy(localMapCache[y], localMapCache[y + 1], sizeof(localMapCache[y]));\n\t\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10a88d8e4e0918200e843c1b42ae813b0152f94e2f9a8e3a56f8e58e1a30d60c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 524, + "startColumn": 32, + "charOffset": 15271, + "charLength": 13, + "snippet": { + "text": "localMapCache" + } + }, + "contextRegion": { + "startLine": 522, + "startColumn": 32, + "charOffset": 15162, + "charLength": 13, + "snippet": { + "text": "\t\t\t\t\t// shift y north\n\t\t\t\t\tfor (int32_t y = 0; y <= mapWalkHeight - 2; ++y) {\n\t\t\t\t\t\tmemcpy(localMapCache[y], localMapCache[y + 1], sizeof(localMapCache[y]));\n\t\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8bb5e28dde12a8e734a13524d02fc641a557ff88d50c339b9129dde73b55ce90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 524, + "startColumn": 32, + "charOffset": 15271, + "charLength": 13, + "snippet": { + "text": "localMapCache" + } + }, + "contextRegion": { + "startLine": 522, + "startColumn": 32, + "charOffset": 15162, + "charLength": 13, + "snippet": { + "text": "\t\t\t\t\t// shift y north\n\t\t\t\t\tfor (int32_t y = 0; y <= mapWalkHeight - 2; ++y) {\n\t\t\t\t\t\tmemcpy(localMapCache[y], localMapCache[y + 1], sizeof(localMapCache[y]));\n\t\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec42ee9a056fcfd7c63b07697394b144094a0297070dd4cc1d4454c26307af5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 524, + "startColumn": 61, + "charOffset": 15300, + "charLength": 13, + "snippet": { + "text": "localMapCache" + } + }, + "contextRegion": { + "startLine": 522, + "startColumn": 61, + "charOffset": 15162, + "charLength": 13, + "snippet": { + "text": "\t\t\t\t\t// shift y north\n\t\t\t\t\tfor (int32_t y = 0; y <= mapWalkHeight - 2; ++y) {\n\t\t\t\t\t\tmemcpy(localMapCache[y], localMapCache[y + 1], sizeof(localMapCache[y]));\n\t\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b48b9891542808a7204db3085d11de3050a75e5d2b737860113fe4a0e914fffb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 528, + "startColumn": 6, + "charOffset": 15366, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 526, + "startColumn": 6, + "charOffset": 15327, + "charLength": 3, + "snippet": { + "text": "\n\t\t\t\t\t// update mapWalkHeight - 1\n\t\t\t\t\tfor (int32_t x = -maxWalkCacheWidth; x <= maxWalkCacheWidth; ++x) {\n\t\t\t\t\t\tconst auto &cacheTile = g_game().map.getTile(static_cast(myPos.getX() + x), static_cast(myPos.getY() + maxWalkCacheHeight), myPos.z);\n\t\t\t\t\t\tupdateTileCache(cacheTile, x, maxWalkCacheHeight);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21d2e0f5fc301c8ceaff3fb09818ef297e5e174f8903db2504a7b0a059958a2d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'x' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 528, + "startColumn": 43, + "charOffset": 15403, + "charLength": 1, + "snippet": { + "text": "x" + } + }, + "contextRegion": { + "startLine": 526, + "startColumn": 43, + "charOffset": 15327, + "charLength": 1, + "snippet": { + "text": "\n\t\t\t\t\t// update mapWalkHeight - 1\n\t\t\t\t\tfor (int32_t x = -maxWalkCacheWidth; x <= maxWalkCacheWidth; ++x) {\n\t\t\t\t\t\tconst auto &cacheTile = g_game().map.getTile(static_cast(myPos.getX() + x), static_cast(myPos.getY() + maxWalkCacheHeight), myPos.z);\n\t\t\t\t\t\tupdateTileCache(cacheTile, x, maxWalkCacheHeight);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35d20e57bd6ec30e29f673c39210361f12e5c2b6abfb565ebf0620d97a9f5f10" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 534, + "startColumn": 5, + "charOffset": 15669, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 532, + "startColumn": 5, + "charOffset": 15658, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (oldPos.x < newPos.x) { // east\n\t\t\t\t\t// shift y west\n\t\t\t\t\tint32_t starty = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3562e805093d7cc619a64d1df5738af49cb27868d7d5d9c213ca5c5944ed5a72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 540, + "startColumn": 6, + "charOffset": 15853, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 538, + "startColumn": 6, + "charOffset": 15789, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tint32_t dy = Position::getDistanceY(oldPos, newPos);\n\n\t\t\t\t\tif (dy < 0) {\n\t\t\t\t\t\tendy += dy;\n\t\t\t\t\t} else if (dy > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80baef5198bd1d45c1f3d8c87420146023806629a08d3a114b308f0888944aa6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'y' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 546, + "startColumn": 31, + "charOffset": 15968, + "charLength": 1, + "snippet": { + "text": "y" + } + }, + "contextRegion": { + "startLine": 544, + "startColumn": 31, + "charOffset": 15930, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\t}\n\n\t\t\t\t\tfor (int32_t y = starty; y <= endy; ++y) {\n\t\t\t\t\t\tfor (int32_t x = 0; x <= mapWalkWidth - 2; ++x) {\n\t\t\t\t\t\t\tlocalMapCache[y][x] = localMapCache[y][x + 1];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f03f09c55bccfd7ca5750a1e9dd151ab876cd29d756422d088c67bf5e2d3b66" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 547, + "startColumn": 7, + "charOffset": 15992, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 545, + "startColumn": 7, + "charOffset": 15937, + "charLength": 3, + "snippet": { + "text": "\n\t\t\t\t\tfor (int32_t y = starty; y <= endy; ++y) {\n\t\t\t\t\t\tfor (int32_t x = 0; x <= mapWalkWidth - 2; ++x) {\n\t\t\t\t\t\t\tlocalMapCache[y][x] = localMapCache[y][x + 1];\n\t\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7fe995cec90bef9152ebfe92dd2ac6f989a9eff010a2110cff58fd41af2fd29" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 548, + "startColumn": 8, + "charOffset": 16049, + "charLength": 13, + "snippet": { + "text": "localMapCache" + } + }, + "contextRegion": { + "startLine": 546, + "startColumn": 8, + "charOffset": 15938, + "charLength": 13, + "snippet": { + "text": "\t\t\t\t\tfor (int32_t y = starty; y <= endy; ++y) {\n\t\t\t\t\t\tfor (int32_t x = 0; x <= mapWalkWidth - 2; ++x) {\n\t\t\t\t\t\t\tlocalMapCache[y][x] = localMapCache[y][x + 1];\n\t\t\t\t\t\t}\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c2f207b00f877a1882662e06026baed1a5cbc09d49373bba307ee818d55cf40" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 548, + "startColumn": 30, + "charOffset": 16071, + "charLength": 13, + "snippet": { + "text": "localMapCache" + } + }, + "contextRegion": { + "startLine": 546, + "startColumn": 30, + "charOffset": 15938, + "charLength": 13, + "snippet": { + "text": "\t\t\t\t\tfor (int32_t y = starty; y <= endy; ++y) {\n\t\t\t\t\t\tfor (int32_t x = 0; x <= mapWalkWidth - 2; ++x) {\n\t\t\t\t\t\t\tlocalMapCache[y][x] = localMapCache[y][x + 1];\n\t\t\t\t\t\t}\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db1c80bccb085730c35c201ce458f5c60fdc8fdcb2634aea69240ccb30514522" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 553, + "startColumn": 6, + "charOffset": 16149, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 551, + "startColumn": 6, + "charOffset": 16111, + "charLength": 3, + "snippet": { + "text": "\n\t\t\t\t\t// update mapWalkWidth - 1\n\t\t\t\t\tfor (int32_t y = -maxWalkCacheHeight; y <= maxWalkCacheHeight; ++y) {\n\t\t\t\t\t\tconst auto &cacheTile = g_game().map.getTile(myPos.x + maxWalkCacheWidth, static_cast(myPos.y + y), myPos.z);\n\t\t\t\t\t\tupdateTileCache(cacheTile, maxWalkCacheWidth, y);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c6d7129d51fd866ef40f218f0dd805a1469191adec4a2cc4c29a456e31db379" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'y' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 553, + "startColumn": 44, + "charOffset": 16187, + "charLength": 1, + "snippet": { + "text": "y" + } + }, + "contextRegion": { + "startLine": 551, + "startColumn": 44, + "charOffset": 16111, + "charLength": 1, + "snippet": { + "text": "\n\t\t\t\t\t// update mapWalkWidth - 1\n\t\t\t\t\tfor (int32_t y = -maxWalkCacheHeight; y <= maxWalkCacheHeight; ++y) {\n\t\t\t\t\t\tconst auto &cacheTile = g_game().map.getTile(myPos.x + maxWalkCacheWidth, static_cast(myPos.y + y), myPos.z);\n\t\t\t\t\t\tupdateTileCache(cacheTile, maxWalkCacheWidth, y);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e859203a8613a64c068c9667ca0eb55246a2cb2f0d569e8d2fdc1697d4ce8d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 554, + "startColumn": 52, + "charOffset": 16270, + "charLength": 5, + "snippet": { + "text": "myPos" + } + }, + "contextRegion": { + "startLine": 552, + "startColumn": 52, + "charOffset": 16112, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\t// update mapWalkWidth - 1\n\t\t\t\t\tfor (int32_t y = -maxWalkCacheHeight; y <= maxWalkCacheHeight; ++y) {\n\t\t\t\t\t\tconst auto &cacheTile = g_game().map.getTile(myPos.x + maxWalkCacheWidth, static_cast(myPos.y + y), myPos.z);\n\t\t\t\t\t\tupdateTileCache(cacheTile, maxWalkCacheWidth, y);\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab012ff67d4518cb5939b1b681c22cc239c3ed91f405cbcb8bba977798bcf5bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 563, + "startColumn": 6, + "charOffset": 16603, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 561, + "startColumn": 6, + "charOffset": 16539, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tint32_t dy = Position::getDistanceY(oldPos, newPos);\n\n\t\t\t\t\tif (dy < 0) {\n\t\t\t\t\t\tendy += dy;\n\t\t\t\t\t} else if (dy > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47979dcb041a4df81d2566a32d28e77a310e852f3a6a627c2613e22c8a51222a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'y' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 569, + "startColumn": 31, + "charOffset": 16718, + "charLength": 1, + "snippet": { + "text": "y" + } + }, + "contextRegion": { + "startLine": 567, + "startColumn": 31, + "charOffset": 16680, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\t}\n\n\t\t\t\t\tfor (int32_t y = starty; y <= endy; ++y) {\n\t\t\t\t\t\tfor (int32_t x = mapWalkWidth - 1; --x >= 0;) {\n\t\t\t\t\t\t\tlocalMapCache[y][x + 1] = localMapCache[y][x];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39d9998094f7c621c23d34d376f34c19d10bfe851c4c3bd1c86c11de3236bf5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 570, + "startColumn": 7, + "charOffset": 16742, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 568, + "startColumn": 7, + "charOffset": 16687, + "charLength": 3, + "snippet": { + "text": "\n\t\t\t\t\tfor (int32_t y = starty; y <= endy; ++y) {\n\t\t\t\t\t\tfor (int32_t x = mapWalkWidth - 1; --x >= 0;) {\n\t\t\t\t\t\t\tlocalMapCache[y][x + 1] = localMapCache[y][x];\n\t\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc2835941e47bcb9058f9e8723044cba18d1a32c5c9e14f98cc650759cd825bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 570, + "startColumn": 7, + "charOffset": 16742, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 568, + "startColumn": 7, + "charOffset": 16687, + "charLength": 3, + "snippet": { + "text": "\n\t\t\t\t\tfor (int32_t y = starty; y <= endy; ++y) {\n\t\t\t\t\t\tfor (int32_t x = mapWalkWidth - 1; --x >= 0;) {\n\t\t\t\t\t\t\tlocalMapCache[y][x + 1] = localMapCache[y][x];\n\t\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fceea10d9cc5d5ed51f7008f185c382c87f2ffd7f2f31ad3aaba36b47bedc3e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'x' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 570, + "startColumn": 42, + "charOffset": 16777, + "charLength": 2, + "snippet": { + "text": "--" + } + }, + "contextRegion": { + "startLine": 568, + "startColumn": 42, + "charOffset": 16687, + "charLength": 2, + "snippet": { + "text": "\n\t\t\t\t\tfor (int32_t y = starty; y <= endy; ++y) {\n\t\t\t\t\t\tfor (int32_t x = mapWalkWidth - 1; --x >= 0;) {\n\t\t\t\t\t\t\tlocalMapCache[y][x + 1] = localMapCache[y][x];\n\t\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc9f5bc830020eedb71bf5c871e967d5013c077d905183d001e2361d688b665f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 571, + "startColumn": 8, + "charOffset": 16797, + "charLength": 13, + "snippet": { + "text": "localMapCache" + } + }, + "contextRegion": { + "startLine": 569, + "startColumn": 8, + "charOffset": 16688, + "charLength": 13, + "snippet": { + "text": "\t\t\t\t\tfor (int32_t y = starty; y <= endy; ++y) {\n\t\t\t\t\t\tfor (int32_t x = mapWalkWidth - 1; --x >= 0;) {\n\t\t\t\t\t\t\tlocalMapCache[y][x + 1] = localMapCache[y][x];\n\t\t\t\t\t\t}\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca54e5cbe131ab8ff7a79797135598626cd63503dcf3610597c93febff3c9ccb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 571, + "startColumn": 34, + "charOffset": 16823, + "charLength": 13, + "snippet": { + "text": "localMapCache" + } + }, + "contextRegion": { + "startLine": 569, + "startColumn": 34, + "charOffset": 16688, + "charLength": 13, + "snippet": { + "text": "\t\t\t\t\tfor (int32_t y = starty; y <= endy; ++y) {\n\t\t\t\t\t\tfor (int32_t x = mapWalkWidth - 1; --x >= 0;) {\n\t\t\t\t\t\t\tlocalMapCache[y][x + 1] = localMapCache[y][x];\n\t\t\t\t\t\t}\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3982a031d69a965c47f8b8c56456b655eb0a117b771cfb9238706254aed5713" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 576, + "startColumn": 6, + "charOffset": 16882, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 574, + "startColumn": 6, + "charOffset": 16859, + "charLength": 3, + "snippet": { + "text": "\n\t\t\t\t\t// update 0\n\t\t\t\t\tfor (int32_t y = -maxWalkCacheHeight; y <= maxWalkCacheHeight; ++y) {\n\t\t\t\t\t\tstd::shared_ptr cacheTile = g_game().map.getTile(myPos.x - maxWalkCacheWidth, static_cast(myPos.y + y), myPos.z);\n\t\t\t\t\t\tupdateTileCache(cacheTile, -maxWalkCacheWidth, y);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5be6c7786379da647c47ca69109e3a26b7b9cfd6cc0f54165d873eb3c5259bad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'y' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 576, + "startColumn": 44, + "charOffset": 16920, + "charLength": 1, + "snippet": { + "text": "y" + } + }, + "contextRegion": { + "startLine": 574, + "startColumn": 44, + "charOffset": 16859, + "charLength": 1, + "snippet": { + "text": "\n\t\t\t\t\t// update 0\n\t\t\t\t\tfor (int32_t y = -maxWalkCacheHeight; y <= maxWalkCacheHeight; ++y) {\n\t\t\t\t\t\tstd::shared_ptr cacheTile = g_game().map.getTile(myPos.x - maxWalkCacheWidth, static_cast(myPos.y + y), myPos.z);\n\t\t\t\t\t\tupdateTileCache(cacheTile, -maxWalkCacheWidth, y);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1a09f339f7cc65b773dd17a3000eed7434269b4bf2d6f31b6f2805ac0fc6a84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 577, + "startColumn": 62, + "charOffset": 17013, + "charLength": 5, + "snippet": { + "text": "myPos" + } + }, + "contextRegion": { + "startLine": 575, + "startColumn": 62, + "charOffset": 16860, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\t// update 0\n\t\t\t\t\tfor (int32_t y = -maxWalkCacheHeight; y <= maxWalkCacheHeight; ++y) {\n\t\t\t\t\t\tstd::shared_ptr cacheTile = g_game().map.getTile(myPos.x - maxWalkCacheWidth, static_cast(myPos.y + y), myPos.z);\n\t\t\t\t\t\tupdateTileCache(cacheTile, -maxWalkCacheWidth, y);\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3faaf7a6aa95e025179dd0e3656fc9bfde474e71730a24fd94ea84a29679d477" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'onDeath' has cognitive complexity of 74 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 628, + "startColumn": 16, + "charOffset": 18527, + "charLength": 7, + "snippet": { + "text": "onDeath" + } + }, + "contextRegion": { + "startLine": 626, + "startColumn": 16, + "charOffset": 18509, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid Creature::onDeath() {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tbool lastHitUnjustified = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd38af05981aeb36419772a7a06bb19362a788f6cd227abfaf1f03b937638b11" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 629, + "startColumn": 34, + "charOffset": 18572, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 627, + "startColumn": 34, + "charOffset": 18511, + "charLength": 15, + "snippet": { + "text": "\nvoid Creature::onDeath() {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tbool lastHitUnjustified = false;\n\tbool mostDamageUnjustified = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5717e60e0cc9bf7956281cda01c7b7aa5fa46484f73fffd240c4978c4c99e2f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 638, + "startColumn": 20, + "charOffset": 18951, + "charLength": 26, + "snippet": { + "text": "deprecatedOnKilledCreature" + } + }, + "contextRegion": { + "startLine": 636, + "startColumn": 20, + "charOffset": 18846, + "charLength": 26, + "snippet": { + "text": "\t\t * @deprecated -- This is here to trigger the deprecated onKill events in lua\n\t\t */\n\t\tlastHitCreature->deprecatedOnKilledCreature(getCreature(), true);\n\t\tlastHitUnjustified = lastHitCreature->onKilledPlayer(getPlayer(), true);\n\t\tlastHitCreatureMaster = lastHitCreature->getMaster();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46b47ed797ea6296c3ae780bf9926994ac2fd14cbc03523ab844a1df15bc0d4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 667, + "startColumn": 14, + "charOffset": 20118, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 665, + "startColumn": 14, + "charOffset": 20058, + "charLength": 6, + "snippet": { + "text": "\n\t\t\t\t\tauto party = attackerPlayer->getParty();\n\t\t\t\t\tkillers.insert(attackerPlayer);\n\t\t\t\t\tif (party && party->getLeader() && party->isSharedExperienceActive() && party->isSharedExperienceEnabled()) {\n\t\t\t\t\t\tattacker = party->getLeader();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "869ede0cf40340d83c41e8397e4433b8f7f9c7b0b9be49ef735cbf34b4a3b4f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 670, + "startColumn": 15, + "charOffset": 20308, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 668, + "startColumn": 15, + "charOffset": 20142, + "charLength": 6, + "snippet": { + "text": "\t\t\t\t\tif (party && party->getLeader() && party->isSharedExperienceActive() && party->isSharedExperienceEnabled()) {\n\t\t\t\t\t\tattacker = party->getLeader();\n\t\t\t\t\t\tkillers.insert(party->getLeader());\n\t\t\t\t\t\tmostDamageCreature = attacker;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "335e99d2eef212108111b3194283915d2250c865285fd673325537fd09e831ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 673, + "startColumn": 7, + "charOffset": 20380, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 671, + "startColumn": 7, + "charOffset": 20336, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\t\tmostDamageCreature = attacker;\n\n\t\t\t\t\t\tfor (const auto &partyMember : party->getMembers()) {\n\t\t\t\t\t\t\tkillers.insert(partyMember);\n\t\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0bd0c70ebfd3936caac92cedfce68d145dfb20eceaeebd2909b2752a398ddb69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 674, + "startColumn": 16, + "charOffset": 20449, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 672, + "startColumn": 16, + "charOffset": 20373, + "charLength": 6, + "snippet": { + "text": "\n\t\t\t\t\t\tfor (const auto &partyMember : party->getMembers()) {\n\t\t\t\t\t\t\tkillers.insert(partyMember);\n\t\t\t\t\t\t}\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0a167c567f98d0557e548a777e96dc0aed1955e95acf22d2e156a99379bfc8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 689, + "startColumn": 2, + "charOffset": 20683, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 687, + "startColumn": 2, + "charOffset": 20678, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &it : experienceMap) {\n\t\tit.first->onGainExperience(it.second, getCreature());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b49ccbb0ff734f17d5e26b983a39ecdd2dddc2d5c3cdc434031661ecc9909249" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 694, + "startColumn": 2, + "charOffset": 20915, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 692, + "startColumn": 2, + "charOffset": 20781, + "charLength": 3, + "snippet": { + "text": "\n\tmostDamageCreature = mostDamageCreature && mostDamageCreature->getMaster() ? mostDamageCreature->getMaster() : mostDamageCreature;\n\tfor (const auto &killer : killers) {\n\t\tif (auto monster = getMonster()) {\n\t\t\tkiller->onKilledMonster(monster);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "baa5371c8b487a6e70b11e110178927283722a70784fdac00dfb58a5413cff0f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 695, + "startColumn": 3, + "charOffset": 20954, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 693, + "startColumn": 3, + "charOffset": 20782, + "charLength": 2, + "snippet": { + "text": "\tmostDamageCreature = mostDamageCreature && mostDamageCreature->getMaster() ? mostDamageCreature->getMaster() : mostDamageCreature;\n\tfor (const auto &killer : killers) {\n\t\tif (auto monster = getMonster()) {\n\t\t\tkiller->onKilledMonster(monster);\n\t\t} else if (auto player = getPlayer(); player && mostDamageCreature != killer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "863c1b177fa1e617a4f1c0700e99651e8f60aee6f8def88001827ce003f2c88a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 696, + "startColumn": 12, + "charOffset": 21000, + "charLength": 15, + "snippet": { + "text": "onKilledMonster" + } + }, + "contextRegion": { + "startLine": 694, + "startColumn": 12, + "charOffset": 20914, + "charLength": 15, + "snippet": { + "text": "\tfor (const auto &killer : killers) {\n\t\tif (auto monster = getMonster()) {\n\t\t\tkiller->onKilledMonster(monster);\n\t\t} else if (auto player = getPlayer(); player && mostDamageCreature != killer) {\n\t\t\tkiller->onKilledPlayer(player, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd529977a6c0a543f79506f3c44705bb986867778d2b6cf01c935b4232f1191f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 698, + "startColumn": 12, + "charOffset": 21119, + "charLength": 14, + "snippet": { + "text": "onKilledPlayer" + } + }, + "contextRegion": { + "startLine": 696, + "startColumn": 12, + "charOffset": 20989, + "charLength": 14, + "snippet": { + "text": "\t\t\tkiller->onKilledMonster(monster);\n\t\t} else if (auto player = getPlayer(); player && mostDamageCreature != killer) {\n\t\t\tkiller->onKilledPlayer(player, false);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3a95caff8054d1854a902980c7cd8e6425c858773c38b6572f15364359df19d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 716, + "startColumn": 4, + "charOffset": 21945, + "charLength": 1, + "snippet": { + "text": "1" + } + }, + "contextRegion": { + "startLine": 714, + "startColumn": 4, + "charOffset": 21897, + "charLength": 1, + "snippet": { + "text": "\t\tg_metrics().addCounter(\n\t\t\t\"player_death\",\n\t\t\t1,\n\t\t\t{\n\t\t\t\t{ \"name\", getNameDescription() }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "178d7218237c8052068edee6ffa1da4cd7bd8784c93f37ebd87a8e344b613142" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 724, + "startColumn": 49, + "charOffset": 22449, + "charLength": 21, + "snippet": { + "text": "mostDamageUnjustified" + } + }, + "contextRegion": { + "startLine": 722, + "startColumn": 49, + "charOffset": 22230, + "charLength": 21, + "snippet": { + "text": "\t\t\t\t{ \"most_damage_dealt\", std::to_string(mostDamage) },\n\t\t\t\t{ \"most_damage_creature_master\", mostDamageCreatureMaster ? mostDamageCreatureMaster->getName() : \"(none)\" },\n\t\t\t\t{ \"most_damage_unjustified\", std::to_string(mostDamageUnjustified) },\n\t\t\t\t{ \"last_hit_unjustified\", std::to_string(lastHitUnjustified) },\n\t\t\t\t{ \"by_player\", std::to_string(killedByPlayer) }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36186d51d10d047346a33c59f47efa7c4c4d6959da1e8513371543c9ffbff96f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 725, + "startColumn": 46, + "charOffset": 22520, + "charLength": 18, + "snippet": { + "text": "lastHitUnjustified" + } + }, + "contextRegion": { + "startLine": 723, + "startColumn": 46, + "charOffset": 22287, + "charLength": 18, + "snippet": { + "text": "\t\t\t\t{ \"most_damage_creature_master\", mostDamageCreatureMaster ? mostDamageCreatureMaster->getName() : \"(none)\" },\n\t\t\t\t{ \"most_damage_unjustified\", std::to_string(mostDamageUnjustified) },\n\t\t\t\t{ \"last_hit_unjustified\", std::to_string(lastHitUnjustified) },\n\t\t\t\t{ \"by_player\", std::to_string(killedByPlayer) },\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6312182e2294a55fc857c1683d2c0cd9e8cdb33011b9182a53b30121575bcde7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 726, + "startColumn": 35, + "charOffset": 22577, + "charLength": 14, + "snippet": { + "text": "killedByPlayer" + } + }, + "contextRegion": { + "startLine": 724, + "startColumn": 35, + "charOffset": 22401, + "charLength": 14, + "snippet": { + "text": "\t\t\t\t{ \"most_damage_unjustified\", std::to_string(mostDamageUnjustified) },\n\t\t\t\t{ \"last_hit_unjustified\", std::to_string(lastHitUnjustified) },\n\t\t\t\t{ \"by_player\", std::to_string(killedByPlayer) },\n\t\t\t}\n\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe550615e40fba617c30767c24d8b8f1da10274bc85d33cde97c1acae9b002a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 736, + "startColumn": 4, + "charOffset": 22846, + "charLength": 1, + "snippet": { + "text": "1" + } + }, + "contextRegion": { + "startLine": 734, + "startColumn": 4, + "charOffset": 22797, + "charLength": 1, + "snippet": { + "text": "\t\tg_metrics().addCounter(\n\t\t\t\"monster_death\",\n\t\t\t1,\n\t\t\t{\n\t\t\t\t{ \"name\", getName() }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd038d54a85fb5c04f28080a896e7f7b5ea0bee2ed5cf5088997ebd261656823" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 740, + "startColumn": 35, + "charOffset": 22945, + "charLength": 9, + "snippet": { + "text": "getMaster" + } + }, + "contextRegion": { + "startLine": 738, + "startColumn": 35, + "charOffset": 22854, + "charLength": 9, + "snippet": { + "text": "\t\t\t\t{ \"name\", getName() },\n\t\t\t\t{ \"killer\", killerName },\n\t\t\t\t{ \"is_summon\", std::to_string(getMaster() ? true : false) },\n\t\t\t\t{ \"by_player\", std::to_string(killedByPlayer) },\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "584a1cc893c153fdaab927975faaf6a847ab84416038cb458c3431313fc953cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in ternary expression result" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 740, + "startColumn": 49, + "charOffset": 22959, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 738, + "startColumn": 49, + "charOffset": 22854, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t{ \"name\", getName() },\n\t\t\t\t{ \"killer\", killerName },\n\t\t\t\t{ \"is_summon\", std::to_string(getMaster() ? true : false) },\n\t\t\t\t{ \"by_player\", std::to_string(killedByPlayer) },\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98ad07989795d94896ad4f2e92ea73836fa51606c7725658055a4dae6ce54dcb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Expression can be simplified" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 740, + "startColumn": 54, + "charOffset": 22964, + "charLength": 1, + "snippet": { + "text": ":" + } + }, + "contextRegion": { + "startLine": 738, + "startColumn": 54, + "charOffset": 22854, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t{ \"name\", getName() },\n\t\t\t\t{ \"killer\", killerName },\n\t\t\t\t{ \"is_summon\", std::to_string(getMaster() ? true : false) },\n\t\t\t\t{ \"by_player\", std::to_string(killedByPlayer) },\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87778fda899aab2335a2e8a2a05f29271fc7f34ed3decaa37377f6e77210c557" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 741, + "startColumn": 35, + "charOffset": 23010, + "charLength": 14, + "snippet": { + "text": "killedByPlayer" + } + }, + "contextRegion": { + "startLine": 739, + "startColumn": 35, + "charOffset": 22881, + "charLength": 14, + "snippet": { + "text": "\t\t\t\t{ \"killer\", killerName },\n\t\t\t\t{ \"is_summon\", std::to_string(getMaster() ? true : false) },\n\t\t\t\t{ \"by_player\", std::to_string(killedByPlayer) },\n\t\t\t}\n\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9bef8cb91c1ab8e7d23948f88f94fda353d895eaf0c758231241164724649b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 749, + "startColumn": 23, + "charOffset": 23205, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 747, + "startColumn": 23, + "charOffset": 23157, + "charLength": 1, + "snippet": { + "text": "\tdeath(lastHitCreature);\n\n\tif (droppedCorpse && !getPlayer()) {\n\t\tg_game().removeCreature(static_self_cast(), false);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed46ca9c9fcb0f9544abae63ae3c3aeca0ae1f3a96720258b61317b893e179b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 750, + "startColumn": 12, + "charOffset": 23232, + "charLength": 14, + "snippet": { + "text": "removeCreature" + } + }, + "contextRegion": { + "startLine": 748, + "startColumn": 12, + "charOffset": 23182, + "charLength": 14, + "snippet": { + "text": "\n\tif (droppedCorpse && !getPlayer()) {\n\t\tg_game().removeCreature(static_self_cast(), false);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aac3b88daf1166fce22ec85dcd33f3cea1fcd16aabb4482a7100945aaf0c7806" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'dropCorpse' has cognitive complexity of 45 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 758, + "startColumn": 16, + "charOffset": 23348, + "charLength": 10, + "snippet": { + "text": "dropCorpse" + } + }, + "contextRegion": { + "startLine": 756, + "startColumn": 16, + "charOffset": 23330, + "charLength": 10, + "snippet": { + "text": "}\n\nbool Creature::dropCorpse(std::shared_ptr lastHitCreature, std::shared_ptr mostDamageCreature, bool lastHitUnjustified, bool mostDamageUnjustified) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (!lootDrop && getMonster()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05a1f8ab27a01a12eb6c15b3a5607db59769f38fb1382beb405ed912428d30c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'lastHitCreature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 758, + "startColumn": 53, + "charOffset": 23385, + "charLength": 15, + "snippet": { + "text": "lastHitCreature" + } + }, + "contextRegion": { + "startLine": 756, + "startColumn": 53, + "charOffset": 23330, + "charLength": 15, + "snippet": { + "text": "}\n\nbool Creature::dropCorpse(std::shared_ptr lastHitCreature, std::shared_ptr mostDamageCreature, bool lastHitUnjustified, bool mostDamageUnjustified) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (!lootDrop && getMonster()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07873e07987c70da7a9185edb5e749440e7a63020a3b6e47ab3704b67443ef70" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'mostDamageCreature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 758, + "startColumn": 96, + "charOffset": 23428, + "charLength": 18, + "snippet": { + "text": "mostDamageCreature" + } + }, + "contextRegion": { + "startLine": 756, + "startColumn": 96, + "charOffset": 23330, + "charLength": 18, + "snippet": { + "text": "}\n\nbool Creature::dropCorpse(std::shared_ptr lastHitCreature, std::shared_ptr mostDamageCreature, bool lastHitUnjustified, bool mostDamageUnjustified) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (!lootDrop && getMonster()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "561937a44c9681cdd0d4015bdbd9206d461997220e9168d09ac17a03629e5e0a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 759, + "startColumn": 34, + "charOffset": 23536, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 757, + "startColumn": 34, + "charOffset": 23332, + "charLength": 15, + "snippet": { + "text": "\nbool Creature::dropCorpse(std::shared_ptr lastHitCreature, std::shared_ptr mostDamageCreature, bool lastHitUnjustified, bool mostDamageUnjustified) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (!lootDrop && getMonster()) {\n\t\tif (getMaster()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9e8b51d4f8b493abaf00a8226daf6c53a7c7620a4a1e4ca74215449cf814248" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 764, + "startColumn": 4, + "charOffset": 23725, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 762, + "startColumn": 4, + "charOffset": 23609, + "charLength": 3, + "snippet": { + "text": "\t\t\t// Scripting event onDeath\n\t\t\tconst CreatureEventList &deathEvents = getCreatureEvents(CREATURE_EVENT_DEATH);\n\t\t\tfor (const auto &deathEventPtr : deathEvents) {\n\t\t\t\tdeathEventPtr->executeOnDeath(static_self_cast(), nullptr, lastHitCreature, mostDamageCreature, lastHitUnjustified, mostDamageUnjustified);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e63bcc0b4f355ea8e73642c1c0276b91686a793b4ed508bdaf64b44326f76bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 765, + "startColumn": 20, + "charOffset": 23792, + "charLength": 14, + "snippet": { + "text": "executeOnDeath" + } + }, + "contextRegion": { + "startLine": 763, + "startColumn": 20, + "charOffset": 23639, + "charLength": 14, + "snippet": { + "text": "\t\t\tconst CreatureEventList &deathEvents = getCreatureEvents(CREATURE_EVENT_DEATH);\n\t\t\tfor (const auto &deathEventPtr : deathEvents) {\n\t\t\t\tdeathEventPtr->executeOnDeath(static_self_cast(), nullptr, lastHitCreature, mostDamageCreature, lastHitUnjustified, mostDamageUnjustified);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39171adf7b7c06f078bbf90a11c0b9470b7f14d98b67e17c58e1e8a0dafdcc91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 792, + "startColumn": 13, + "charOffset": 24462, + "charLength": 15, + "snippet": { + "text": "internalAddItem" + } + }, + "contextRegion": { + "startLine": 790, + "startColumn": 13, + "charOffset": 24384, + "charLength": 15, + "snippet": { + "text": "\t\tstd::shared_ptr tile = getTile();\n\t\tif (tile && splash) {\n\t\t\tg_game().internalAddItem(tile, splash, INDEX_WHEREEVER, FLAG_NOLIMIT);\n\t\t\tsplash->startDecaying();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26d30bf8197479fae580abc807cda9f5d26d7b4d4dba6cf506cb1bc8db0d1014" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 798, + "startColumn": 13, + "charOffset": 24674, + "charLength": 15, + "snippet": { + "text": "internalAddItem" + } + }, + "contextRegion": { + "startLine": 796, + "startColumn": 13, + "charOffset": 24557, + "charLength": 15, + "snippet": { + "text": "\t\tstd::shared_ptr corpse = getCorpse(lastHitCreature, mostDamageCreature);\n\t\tif (tile && corpse) {\n\t\t\tg_game().internalAddItem(tile, corpse, INDEX_WHEREEVER, FLAG_NOLIMIT);\n\t\t\tdropLoot(corpse->getContainer(), lastHitCreature);\n\t\t\tcorpse->startDecaying();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67e343c10d2241855dd72e88c75f89534a7ebc9ff59d7da752b4fbbbfa7a438f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 808, + "startColumn": 58, + "charOffset": 25323, + "charLength": 4, + "snippet": { + "text": "1200" + } + }, + "contextRegion": { + "startLine": 806, + "startColumn": 58, + "charOffset": 25182, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tif (monster && !monster->isRewardBoss()) {\n\t\t\t\t\tstd::ostringstream lootMessage;\n\t\t\t\t\tauto collorMessage = player->getProtocolVersion() > 1200 && player->getOperatingSystem() < CLIENTOS_OTCLIENT_LINUX;\n\t\t\t\t\tlootMessage << \"Loot of \" << getNameDescription() << \": \" << corpseContainer->getContentDescription(collorMessage) << \".\";\n\t\t\t\t\tauto suffix = corpseContainer->getAttribute(ItemAttribute_t::LOOTMESSAGE_SUFFIX);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ddc0caf70ddea7ce270c92ab9902c653d9eaaf01d2bc4b9f087590406e38101" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 837, + "startColumn": 3, + "charOffset": 26442, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 835, + "startColumn": 3, + "charOffset": 26410, + "charLength": 3, + "snippet": { + "text": "\n\t\t// Scripting event onDeath\n\t\tfor (const auto &deathEventPtr : getCreatureEvents(CREATURE_EVENT_DEATH)) {\n\t\t\tif (deathEventPtr) {\n\t\t\t\tdeathEventPtr->executeOnDeath(static_self_cast(), corpse, lastHitCreature, mostDamageCreature, lastHitUnjustified, mostDamageUnjustified);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f63648d51921c7eaa19ab6e9da9c902ec50542d395a974fdee445e6fed897f46" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 839, + "startColumn": 20, + "charOffset": 26561, + "charLength": 14, + "snippet": { + "text": "executeOnDeath" + } + }, + "contextRegion": { + "startLine": 837, + "startColumn": 20, + "charOffset": 26440, + "charLength": 14, + "snippet": { + "text": "\t\tfor (const auto &deathEventPtr : getCreatureEvents(CREATURE_EVENT_DEATH)) {\n\t\t\tif (deathEventPtr) {\n\t\t\t\tdeathEventPtr->executeOnDeath(static_self_cast(), corpse, lastHitCreature, mostDamageCreature, lastHitUnjustified, mostDamageUnjustified);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "640f2a2587e3ce7af28778917468621760c2240863e82f3444fef0f752330675" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 855, + "startColumn": 68, + "charOffset": 27036, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 853, + "startColumn": 68, + "charOffset": 26966, + "charLength": 1, + "snippet": { + "text": "}\n\nstd::shared_ptr Creature::getCorpse(std::shared_ptr, std::shared_ptr) {\n\tif (getLookCorpse() != 0) {\n\t\treturn Item::CreateItem(getLookCorpse());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f9eba54585b395e24afd72ea5a8655ac57bc4e4ec63716763b159449e8e4a7d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 855, + "startColumn": 68, + "charOffset": 27036, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 853, + "startColumn": 68, + "charOffset": 26966, + "charLength": 1, + "snippet": { + "text": "}\n\nstd::shared_ptr Creature::getCorpse(std::shared_ptr, std::shared_ptr) {\n\tif (getLookCorpse() != 0) {\n\t\treturn Item::CreateItem(getLookCorpse());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff21a2765edd3dbe32cc4c3085b69436e4d6952efe71a2232c3d47727e5d05dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 855, + "startColumn": 95, + "charOffset": 27063, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 853, + "startColumn": 95, + "charOffset": 26966, + "charLength": 1, + "snippet": { + "text": "}\n\nstd::shared_ptr Creature::getCorpse(std::shared_ptr, std::shared_ptr) {\n\tif (getLookCorpse() != 0) {\n\t\treturn Item::CreateItem(getLookCorpse());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9059bb879d88328d4b38061019a1714c88c25796cf9192c2dc2404901dda3f53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 862, + "startColumn": 16, + "charOffset": 27178, + "charLength": 12, + "snippet": { + "text": "changeHealth" + } + }, + "contextRegion": { + "startLine": 860, + "startColumn": 16, + "charOffset": 27160, + "charLength": 12, + "snippet": { + "text": "}\n\nvoid Creature::changeHealth(int32_t healthChange, bool sendHealthChange /* = true*/) {\n\tint32_t oldHealth = health;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da52e3eb827b8fc95b699bc64883112bd81060846bbd2727422cc13fbeee2369" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 881, + "startColumn": 41, + "charOffset": 27805, + "charLength": 10, + "snippet": { + "text": "getMaxMana" + } + }, + "contextRegion": { + "startLine": 879, + "startColumn": 41, + "charOffset": 27694, + "charLength": 10, + "snippet": { + "text": "void Creature::changeMana(int32_t manaChange) {\n\tif (manaChange > 0) {\n\t\tmana += std::min(manaChange, getMaxMana() - mana);\n\t} else {\n\t\tmana = std::max(0, mana + manaChange);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "996c910cc770e7f346fe247deb32938b55db8e3825b9ca3a499ae486ef1678b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 883, + "startColumn": 31, + "charOffset": 27867, + "charLength": 4, + "snippet": { + "text": "mana" + } + }, + "contextRegion": { + "startLine": 881, + "startColumn": 31, + "charOffset": 27765, + "charLength": 4, + "snippet": { + "text": "\t\tmana += std::min(manaChange, getMaxMana() - mana);\n\t} else {\n\t\tmana = std::max(0, mana + manaChange);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4d1e4bc68ff7798765c0fcaf65528a519e980aed370876dec7b4a9d04b1364e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'healer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 887, + "startColumn": 53, + "charOffset": 27945, + "charLength": 6, + "snippet": { + "text": "healer" + } + }, + "contextRegion": { + "startLine": 885, + "startColumn": 53, + "charOffset": 27890, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Creature::gainHealth(std::shared_ptr healer, int32_t healthGain) {\n\tchangeHealth(healthGain);\n\tif (healer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34bb18fec70b1f875944c23debaf01804d58703b849858530ba2f84783625293" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 894, + "startColumn": 54, + "charOffset": 28156, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 892, + "startColumn": 54, + "charOffset": 28100, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Creature::drainHealth(std::shared_ptr attacker, int32_t damage) {\n\tchangeHealth(-damage, false);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5cfcfad3a88218106242ed27e6b79b67fb4b561c1ac1178b6f9045d2cdc63a40" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 902, + "startColumn": 52, + "charOffset": 28371, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 900, + "startColumn": 52, + "charOffset": 28317, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Creature::drainMana(std::shared_ptr attacker, int32_t manaLoss) {\n\tonAttacked();\n\tchangeMana(-manaLoss);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36815550569ccea9222d23595a253ef1e8c50e0922de8e8a9bfbb7eec90726c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 915, + "startColumn": 13, + "charOffset": 28848, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 913, + "startColumn": 13, + "charOffset": 28667, + "charLength": 1, + "snippet": { + "text": "\tif (combatType != COMBAT_MANADRAIN && combatType != COMBAT_LIFEDRAIN && combatType != COMBAT_AGONYDAMAGE) { // Increase mitigate damage\n\t\tauto originalDamage = damage;\n\t\tdamage -= (damage * getMitigation()) / 100.;\n\t\tg_logger().trace(\"[mitigation] creature: {}, original damage: {}, mitigation damage: {}\", getName(), originalDamage, damage);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aeb935e104a0151b213a5014fd1451b408c6d7d6f06d3ede2c1d632d1912ec64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 915, + "startColumn": 14, + "charOffset": 28849, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 913, + "startColumn": 14, + "charOffset": 28667, + "charLength": 6, + "snippet": { + "text": "\tif (combatType != COMBAT_MANADRAIN && combatType != COMBAT_LIFEDRAIN && combatType != COMBAT_AGONYDAMAGE) { // Increase mitigate damage\n\t\tauto originalDamage = damage;\n\t\tdamage -= (damage * getMitigation()) / 100.;\n\t\tg_logger().trace(\"[mitigation] creature: {}, original damage: {}, mitigation damage: {}\", getName(), originalDamage, damage);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2a104c3c52df0cd56ec236677571fe3ff8f6c2073aef326eb9ca5c0667beb2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 915, + "startColumn": 14, + "charOffset": 28849, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 913, + "startColumn": 14, + "charOffset": 28667, + "charLength": 6, + "snippet": { + "text": "\tif (combatType != COMBAT_MANADRAIN && combatType != COMBAT_LIFEDRAIN && combatType != COMBAT_AGONYDAMAGE) { // Increase mitigate damage\n\t\tauto originalDamage = damage;\n\t\tdamage -= (damage * getMitigation()) / 100.;\n\t\tg_logger().trace(\"[mitigation] creature: {}, original damage: {}, mitigation damage: {}\", getName(), originalDamage, damage);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90d0b9bd9ca8a54442a87056fd04fc1e345ce8e9df59f06259cf61cc2a36827f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 925, + "startColumn": 73, + "charOffset": 29158, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 923, + "startColumn": 73, + "charOffset": 29083, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Creature::applyAbsorbDamageModifications(std::shared_ptr attacker, int32_t &damage, CombatType_t combatType) const {\n\tif (combatType != COMBAT_HEALING && damage != 0) {\n\t\tint32_t value = getAbsorbPercent(combatType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "176a70e613336863125e49155904f5da4eb1edc67d879f4c09438710ab758a99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 929, + "startColumn": 14, + "charOffset": 29351, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 927, + "startColumn": 14, + "charOffset": 29270, + "charLength": 3, + "snippet": { + "text": "\t\tint32_t value = getAbsorbPercent(combatType);\n\t\tif (value != 0) {\n\t\t\tdamage -= std::round(damage * value / 100.f);\n\t\t}\n\t\tvalue = getAbsorbFlat(combatType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2cf85f0a4dda51b523fcf7ca6aa0cffbebca5ea49ea43fb42afd593dec8c698c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 929, + "startColumn": 25, + "charOffset": 29362, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 927, + "startColumn": 25, + "charOffset": 29270, + "charLength": 6, + "snippet": { + "text": "\t\tint32_t value = getAbsorbPercent(combatType);\n\t\tif (value != 0) {\n\t\t\tdamage -= std::round(damage * value / 100.f);\n\t\t}\n\t\tvalue = getAbsorbFlat(combatType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ef7333a6c6af620b8430f78b8eb7814aec1f19377a1642a31df0ebae1b18b9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 929, + "startColumn": 25, + "charOffset": 29362, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 927, + "startColumn": 25, + "charOffset": 29270, + "charLength": 6, + "snippet": { + "text": "\t\tint32_t value = getAbsorbPercent(combatType);\n\t\tif (value != 0) {\n\t\t\tdamage -= std::round(damage * value / 100.f);\n\t\t}\n\t\tvalue = getAbsorbFlat(combatType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc642130e17184dd3ac9f2f20d76984a00d00eb06eeb314228a2df91a0e61c00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 929, + "startColumn": 42, + "charOffset": 29379, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 927, + "startColumn": 42, + "charOffset": 29270, + "charLength": 5, + "snippet": { + "text": "\t\tint32_t value = getAbsorbPercent(combatType);\n\t\tif (value != 0) {\n\t\t\tdamage -= std::round(damage * value / 100.f);\n\t\t}\n\t\tvalue = getAbsorbFlat(combatType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8fd14567d743e408f85e8317c4d72e6d8b6340e41e0622514cffd1bc064a9634" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 929, + "startColumn": 42, + "charOffset": 29379, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 927, + "startColumn": 42, + "charOffset": 29270, + "charLength": 5, + "snippet": { + "text": "\t\tint32_t value = getAbsorbPercent(combatType);\n\t\tif (value != 0) {\n\t\t\tdamage -= std::round(damage * value / 100.f);\n\t\t}\n\t\tvalue = getAbsorbFlat(combatType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd9e733811200ea8414c457a622eac06f27c390158dc6320b592d14cc52aeece" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 939, + "startColumn": 15, + "charOffset": 29600, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 937, + "startColumn": 15, + "charOffset": 29512, + "charLength": 3, + "snippet": { + "text": "\t\t\tvalue = attacker->getIncreasePercent(combatType);\n\t\t\tif (value != 0) {\n\t\t\t\tdamage += std::round(damage * value / 100.f);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "717bc5e3bc401ec89e1a6506cc2f3fe4a4836560dd4da9630a8f2ebd74f667f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 939, + "startColumn": 26, + "charOffset": 29611, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 937, + "startColumn": 26, + "charOffset": 29512, + "charLength": 6, + "snippet": { + "text": "\t\t\tvalue = attacker->getIncreasePercent(combatType);\n\t\t\tif (value != 0) {\n\t\t\t\tdamage += std::round(damage * value / 100.f);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7a3565916d734620b50fb2c94f245bfbd098733390bc8e68135bad0ae077ca8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 939, + "startColumn": 26, + "charOffset": 29611, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 937, + "startColumn": 26, + "charOffset": 29512, + "charLength": 6, + "snippet": { + "text": "\t\t\tvalue = attacker->getIncreasePercent(combatType);\n\t\t\tif (value != 0) {\n\t\t\t\tdamage += std::round(damage * value / 100.f);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a846a28cf9529735630aa6ac7ea9522cb41d860e53099028b1d84119ee0cf08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 939, + "startColumn": 43, + "charOffset": 29628, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 937, + "startColumn": 43, + "charOffset": 29512, + "charLength": 5, + "snippet": { + "text": "\t\t\tvalue = attacker->getIncreasePercent(combatType);\n\t\t\tif (value != 0) {\n\t\t\t\tdamage += std::round(damage * value / 100.f);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "611cd3c90aec448079752b0432ab93c67662da9e9ae3b694d62cfbe1e9c3e54e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 939, + "startColumn": 43, + "charOffset": 29628, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 937, + "startColumn": 43, + "charOffset": 29512, + "charLength": 5, + "snippet": { + "text": "\t\t\tvalue = attacker->getIncreasePercent(combatType);\n\t\t\tif (value != 0) {\n\t\t\t\tdamage += std::round(damage * value / 100.f);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e3439d7710389a74b5f4e55ce89b3ca04cf0bbd5b50ffd88ef28429c1bdeb07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 945, + "startColumn": 23, + "charOffset": 29673, + "charLength": 8, + "snippet": { + "text": "blockHit" + } + }, + "contextRegion": { + "startLine": 943, + "startColumn": 23, + "charOffset": 29648, + "charLength": 8, + "snippet": { + "text": "}\n\nBlockType_t Creature::blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense /* = false */, bool checkArmor /* = false */, bool /* field = false */) {\n\tBlockType_t blockType = BLOCK_NONE;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ecf86d8bc4735c91b61814cd1ad6e17d1a6d91d9c5c549944f6f4b5826f9b14e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'blockHit' has cognitive complexity of 28 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 945, + "startColumn": 23, + "charOffset": 29673, + "charLength": 8, + "snippet": { + "text": "blockHit" + } + }, + "contextRegion": { + "startLine": 943, + "startColumn": 23, + "charOffset": 29648, + "charLength": 8, + "snippet": { + "text": "}\n\nBlockType_t Creature::blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense /* = false */, bool checkArmor /* = false */, bool /* field = false */) {\n\tBlockType_t blockType = BLOCK_NONE;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb8950abd88ea92a51c91450259c9e8299c5288e80b42b9dfa95bd1e9f9bf931" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 945, + "startColumn": 58, + "charOffset": 29708, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 943, + "startColumn": 58, + "charOffset": 29648, + "charLength": 8, + "snippet": { + "text": "}\n\nBlockType_t Creature::blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense /* = false */, bool checkArmor /* = false */, bool /* field = false */) {\n\tBlockType_t blockType = BLOCK_NONE;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db57d22a3b4c420864d22c707c373a652ba8798e4af944ab0d56a18bc13cce2a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 956, + "startColumn": 2, + "charOffset": 30134, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 954, + "startColumn": 2, + "charOffset": 30129, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (isImmune(combatType)) {\n\t\tdamage = 0;\n\t\tblockType = BLOCK_IMMUNITY;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a82a5a1b86b2e248fd4657045766484a49eac5eda74d5199a6a74bcb1dde56a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 979, + "startColumn": 4, + "charOffset": 30640, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 977, + "startColumn": 4, + "charOffset": 30586, + "charLength": 2, + "snippet": { + "text": "\t\tif (checkArmor) {\n\t\t\tint32_t armor = getArmor();\n\t\t\tif (armor > 3) {\n\t\t\t\tdamage -= uniform_random(armor / 2, armor - (armor % 2 + 1));\n\t\t\t} else if (armor > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9da11dbb7e5ab204cea245202d7b4ee1b94e8cf447a9ae492a7e944cfce1c4b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'setAttackedCreature' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1012, + "startColumn": 16, + "charOffset": 31235, + "charLength": 19, + "snippet": { + "text": "setAttackedCreature" + } + }, + "contextRegion": { + "startLine": 1010, + "startColumn": 16, + "charOffset": 31217, + "charLength": 19, + "snippet": { + "text": "}\n\nbool Creature::setAttackedCreature(std::shared_ptr creature) {\n\tif (creature) {\n\t\tauto monster = getMonster();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf482d71d9e6ef97509608b956b8640950ba01c353f80c2f06025d8d6c249de6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1012, + "startColumn": 62, + "charOffset": 31281, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1010, + "startColumn": 62, + "charOffset": 31217, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Creature::setAttackedCreature(std::shared_ptr creature) {\n\tif (creature) {\n\t\tauto monster = getMonster();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "652cc9e586528124252c356b16faac5d4948daa6ee76adb27e142f3ebcc8d6af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1033, + "startColumn": 2, + "charOffset": 31793, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1031, + "startColumn": 2, + "charOffset": 31788, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &summon : m_summons) {\n\t\tsummon->setAttackedCreature(creature);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45ebcab279bdb71d55989dec4dca24bea52b52699377e168153383e46d420cc4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1034, + "startColumn": 11, + "charOffset": 31842, + "charLength": 19, + "snippet": { + "text": "setAttackedCreature" + } + }, + "contextRegion": { + "startLine": 1032, + "startColumn": 11, + "charOffset": 31791, + "charLength": 19, + "snippet": { + "text": "\n\tfor (const auto &summon : m_summons) {\n\t\tsummon->setAttackedCreature(creature);\n\t}\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67e343c10d2241855dd72e88c75f89534a7ebc9ff59d7da752b4fbbbfa7a438f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1039, + "startColumn": 69, + "charOffset": 31961, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 1037, + "startColumn": 69, + "charOffset": 31890, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Creature::getPathSearchParams(const std::shared_ptr &, FindPathParams &fpp) {\n\tfpp.fullPathSearch = !hasFollowPath;\n\tfpp.clearSight = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c9329c13b9fe08a8430ce8fdc60e4126cc4b0218ffae1e66da78a4e3911f033" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "12 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1042, + "startColumn": 22, + "charOffset": 32069, + "charLength": 2, + "snippet": { + "text": "12" + } + }, + "contextRegion": { + "startLine": 1040, + "startColumn": 22, + "charOffset": 31986, + "charLength": 2, + "snippet": { + "text": "\tfpp.fullPathSearch = !hasFollowPath;\n\tfpp.clearSight = true;\n\tfpp.maxSearchDist = 12;\n\tfpp.minTargetDist = 1;\n\tfpp.maxTargetDist = 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d819052bafa4975e492d3173aa67be5f339bff3f6e97bee90002e14160bcd5d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1048, + "startColumn": 34, + "charOffset": 32235, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1046, + "startColumn": 34, + "charOffset": 32123, + "charLength": 15, + "snippet": { + "text": "\nvoid Creature::goToFollowCreature_async(std::function &&onComplete) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (pathfinderRunning.load()) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26e874f631f747c0d4331f837cd06d968e9c3e70a006346b4d4333ab44aa82ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1055, + "startColumn": 7, + "charOffset": 32390, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1053, + "startColumn": 7, + "charOffset": 32300, + "charLength": 1, + "snippet": { + "text": "\tpathfinderRunning.store(true);\n\tg_dispatcher().asyncEvent([self = getCreature()] {\n\t\tif (!self || self->isRemoved()) {\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ca919d603bf240229f9bb95a6db26268f6a5e5353b63e65f53d0f2e0fb94b97" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1069, + "startColumn": 34, + "charOffset": 32668, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1067, + "startColumn": 34, + "charOffset": 32596, + "charLength": 15, + "snippet": { + "text": "\nvoid Creature::goToFollowCreature() {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tconst auto &followCreature = getFollowCreature();\n\tif (!followCreature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c1cb3afa471ba4e019f108f27a569e545dc6c2491ae2fd0ad4509a480ebc039" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1071, + "startColumn": 6, + "charOffset": 32742, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1069, + "startColumn": 6, + "charOffset": 32635, + "charLength": 1, + "snippet": { + "text": "\tmetrics::method_latency measure(__METHOD_NAME__);\n\tconst auto &followCreature = getFollowCreature();\n\tif (!followCreature) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d10a28fc394850f0d2ccd9df16dc8aaf5e66103e6b0cd6e720ef5cff2e61d8ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "128 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1084, + "startColumn": 18, + "charOffset": 32997, + "charLength": 3, + "snippet": { + "text": "128" + } + }, + "contextRegion": { + "startLine": 1082, + "startColumn": 18, + "charOffset": 32917, + "charLength": 3, + "snippet": { + "text": "\tbool executeOnFollow = true;\n\tstd::vector listDir;\n\tlistDir.reserve(128);\n\n\tFindPathParams fpp;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a8e465d144faa4572c20c5e4d8e8afaaa6b6d9840db85af15910dcd402f496a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1089, + "startColumn": 17, + "charOffset": 33085, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1087, + "startColumn": 17, + "charOffset": 33025, + "charLength": 1, + "snippet": { + "text": "\tgetPathSearchParams(followCreature, fpp);\n\n\tif (monster && !monster->getMaster() && (monster->isFleeing() || fpp.maxTargetDist > 1)) {\n\t\tDirection dir = DIRECTION_NONE;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10d49550b225a31a647aac4c2b351bcb6b6aaf3ad9fe5a17bfc3f7d59eb3ef99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1092, + "startColumn": 3, + "charOffset": 33198, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1090, + "startColumn": 3, + "charOffset": 33161, + "charLength": 2, + "snippet": { + "text": "\t\tDirection dir = DIRECTION_NONE;\n\n\t\tif (monster->isFleeing()) {\n\t\t\tmonster->getDistanceStep(followCreature->getPosition(), dir, true);\n\t\t} else if (!monster->getDistanceStep(followCreature->getPosition(), dir)) { // maxTargetDist > 1" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4cbcfe43599cccf48484df9c2b2d224e6c822b93b067bd111b35c92832dfbe94" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1093, + "startColumn": 13, + "charOffset": 33238, + "charLength": 15, + "snippet": { + "text": "getDistanceStep" + } + }, + "contextRegion": { + "startLine": 1091, + "startColumn": 13, + "charOffset": 33195, + "charLength": 15, + "snippet": { + "text": "\n\t\tif (monster->isFleeing()) {\n\t\t\tmonster->getDistanceStep(followCreature->getPosition(), dir, true);\n\t\t} else if (!monster->getDistanceStep(followCreature->getPosition(), dir)) { // maxTargetDist > 1\n\t\t\t// if we can't get anything then let the A* calculate" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8165ebee54fb61e9c5959afd51a3992f9d630e0ee7578e77c3749cd0964ed15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-make-member-function-const", + "ruleIndex": 708, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'canFollowMaster' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1114, + "startColumn": 16, + "charOffset": 33796, + "charLength": 15, + "snippet": { + "text": "canFollowMaster" + } + }, + "contextRegion": { + "startLine": 1112, + "startColumn": 16, + "charOffset": 33778, + "charLength": 15, + "snippet": { + "text": "}\n\nbool Creature::canFollowMaster() {\n\tauto master = getMaster();\n\tif (!master) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c175c6ecf6b336f84a39aaf6e99a2e080143fc1dc4883509d2ba199881eb223a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1116, + "startColumn": 6, + "charOffset": 33849, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1114, + "startColumn": 6, + "charOffset": 33781, + "charLength": 1, + "snippet": { + "text": "bool Creature::canFollowMaster() {\n\tauto master = getMaster();\n\tif (!master) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed9da45965a45be7b59759b0061f7e25d307f4acf6731b10992071a523b778d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1123, + "startColumn": 60, + "charOffset": 34083, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1121, + "startColumn": 60, + "charOffset": 34021, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Creature::setFollowCreature(std::shared_ptr creature) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (creature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d78a8f0490d9066e1141c2121c04c31b4c8e0db39dce71fc82f1fcce73780819" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1124, + "startColumn": 34, + "charOffset": 34128, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1122, + "startColumn": 34, + "charOffset": 34023, + "charLength": 15, + "snippet": { + "text": "\nbool Creature::setFollowCreature(std::shared_ptr creature) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (creature) {\n\t\tif (getFollowCreature() == creature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4452df6b05228853d8a7a32a6d3a6fba2cc66bde6637ca8aa159d3ab7587984" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1159, + "startColumn": 59, + "charOffset": 34854, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 1157, + "startColumn": 59, + "charOffset": 34793, + "charLength": 8, + "snippet": { + "text": "}\n\ndouble Creature::getDamageRatio(std::shared_ptr attacker) const {\n\tuint32_t totalDamage = 0;\n\tuint32_t attackerDamage = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e37ba8f1009af2bc4ba341405ef6e381b3fe2b2ac1359865c6392b663d69495" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1163, + "startColumn": 2, + "charOffset": 34931, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1161, + "startColumn": 2, + "charOffset": 34899, + "charLength": 3, + "snippet": { + "text": "\tuint32_t attackerDamage = 0;\n\n\tfor (const auto &it : damageMap) {\n\t\tconst CountBlock_t &cb = it.second;\n\t\ttotalDamage += cb.total;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b8b858b7f84de86a7c2b464084aa235b20b4ad33399ecf2ea1447068b7de96e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1172, + "startColumn": 10, + "charOffset": 35143, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 1170, + "startColumn": 10, + "charOffset": 35108, + "charLength": 1, + "snippet": { + "text": "\n\tif (totalDamage == 0) {\n\t\treturn 0;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "796e37c1ace8f68f3086d116d222d8d4d60368b4a8e3e476af50cfad8b3ef39e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1175, + "startColumn": 48, + "charOffset": 35197, + "charLength": 11, + "snippet": { + "text": "totalDamage" + } + }, + "contextRegion": { + "startLine": 1173, + "startColumn": 48, + "charOffset": 35146, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\treturn (static_cast(attackerDamage) / totalDamage);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d66b689cc9c0d81306489ecc32c153d9c97178562306f912d1859a8ae1e829c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1179, + "startColumn": 9, + "charOffset": 35305, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1177, + "startColumn": 9, + "charOffset": 35213, + "charLength": 3, + "snippet": { + "text": "\nuint64_t Creature::getGainedExperience(std::shared_ptr attacker) const {\n\treturn std::floor(getDamageRatio(std::move(attacker)) * getLostExperience());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e49471c1b07874410a1489dd606a6c38637f39e38b2f5bd0bd7c8cda8b52873" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1179, + "startColumn": 58, + "charOffset": 35354, + "charLength": 17, + "snippet": { + "text": "getLostExperience" + } + }, + "contextRegion": { + "startLine": 1177, + "startColumn": 58, + "charOffset": 35213, + "charLength": 17, + "snippet": { + "text": "\nuint64_t Creature::getGainedExperience(std::shared_ptr attacker) const {\n\treturn std::floor(getDamageRatio(std::move(attacker)) * getLostExperience());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "760160bad1250a5457c526fce748172ebf5e099cc7baf9bdb202cec245fda5fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1182, + "startColumn": 58, + "charOffset": 35436, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 1180, + "startColumn": 58, + "charOffset": 35376, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Creature::addDamagePoints(std::shared_ptr attacker, int32_t damagePoints) {\n\tif (damagePoints <= 0) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9cd37fb91fbe2d7b6d165787ffa483b68248ece601a03717d7de8c5284ecf06a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1204, + "startColumn": 2, + "charOffset": 35899, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1202, + "startColumn": 2, + "charOffset": 35843, + "charLength": 2, + "snippet": { + "text": "\nvoid Creature::onAddCondition(ConditionType_t type) {\n\tif (type == CONDITION_PARALYZE && hasCondition(CONDITION_HASTE)) {\n\t\tremoveCondition(CONDITION_HASTE);\n\t} else if (type == CONDITION_HASTE && hasCondition(CONDITION_PARALYZE)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5750203e342512a726e88728a9bea2095e7525122d2a665dbdd9e2a2aa76eacc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1211, + "startColumn": 52, + "charOffset": 36173, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 1209, + "startColumn": 52, + "charOffset": 36119, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Creature::onAddCombatCondition(ConditionType_t) {\n\t//\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b046f62a6eb16f7b224411071b3466869ee8f80bc0151fb977e115fcb017873a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1215, + "startColumn": 46, + "charOffset": 36229, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 1213, + "startColumn": 46, + "charOffset": 36181, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Creature::onEndCondition(ConditionType_t) {\n\t//\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a1ad23bb7f154cae746d2eb83462e2a629c50c60cbef3316f54155572c3b92c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1222, + "startColumn": 6, + "charOffset": 36415, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1220, + "startColumn": 6, + "charOffset": 36310, + "charLength": 1, + "snippet": { + "text": "\tauto tile = getTile();\n\tstd::shared_ptr field = tile ? tile->getFieldItem() : nullptr;\n\tif (!field) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ba3852084be7bd0568b2b6234f2fcffea1512011a9cf3c3c8e1cc6ef29c6a5c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1264, + "startColumn": 72, + "charOffset": 37483, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 1262, + "startColumn": 72, + "charOffset": 37409, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Creature::onAttackedCreatureDrainHealth(std::shared_ptr target, int32_t points) {\n\ttarget->addDamagePoints(static_self_cast(), points);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9711212b1c30a9b8a4b30248a90e695ead4cde997c39563cb6a6bdc69f4f866" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1268, + "startColumn": 67, + "charOffset": 37642, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 1266, + "startColumn": 67, + "charOffset": 37573, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Creature::onAttackedCreatureKilled(std::shared_ptr target) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (target != getCreature()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0bd38e34e6b04dec3dad2c56bb43a93aa23be8e83317fc8e6f5618a76a4491c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1269, + "startColumn": 34, + "charOffset": 37685, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1267, + "startColumn": 34, + "charOffset": 37575, + "charLength": 15, + "snippet": { + "text": "\nvoid Creature::onAttackedCreatureKilled(std::shared_ptr target) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (target != getCreature()) {\n\t\tuint64_t gainExp = target->getGainedExperience(static_self_cast());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28e4ae9b4266b7ef3137f315c9abe4e1038007dc8d5a9d6a8546050794dcd06e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'deprecatedOnKilledCreature' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1276, + "startColumn": 16, + "charOffset": 37873, + "charLength": 26, + "snippet": { + "text": "deprecatedOnKilledCreature" + } + }, + "contextRegion": { + "startLine": 1274, + "startColumn": 16, + "charOffset": 37855, + "charLength": 26, + "snippet": { + "text": "}\n\nbool Creature::deprecatedOnKilledCreature(std::shared_ptr target, bool lastHit) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tauto master = getMaster();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37cb0fab62a81ac50163d2cfdafccc99f566a8fcb4e74f60608b2493e934e3e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1276, + "startColumn": 69, + "charOffset": 37926, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 1274, + "startColumn": 69, + "charOffset": 37855, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Creature::deprecatedOnKilledCreature(std::shared_ptr target, bool lastHit) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tauto master = getMaster();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96e67a412f498c2dbdecc1d6a380232224092c7412a9cfb409e32fe71874fbbd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1277, + "startColumn": 34, + "charOffset": 37983, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1275, + "startColumn": 34, + "charOffset": 37857, + "charLength": 15, + "snippet": { + "text": "\nbool Creature::deprecatedOnKilledCreature(std::shared_ptr target, bool lastHit) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tauto master = getMaster();\n\tif (master) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59e37c0d0888aa3cae0eda2d07308095eb837e4ffd2743d1a6e298301598fb6c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1280, + "startColumn": 11, + "charOffset": 38054, + "charLength": 26, + "snippet": { + "text": "deprecatedOnKilledCreature" + } + }, + "contextRegion": { + "startLine": 1278, + "startColumn": 11, + "charOffset": 38001, + "charLength": 26, + "snippet": { + "text": "\tauto master = getMaster();\n\tif (master) {\n\t\tmaster->deprecatedOnKilledCreature(target, lastHit);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a833fb0338c6cf4059f0d1a5a92ffc53b9672d83d23cb3f54a84dd4b06cc7cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1285, + "startColumn": 2, + "charOffset": 38212, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1283, + "startColumn": 2, + "charOffset": 38103, + "charLength": 3, + "snippet": { + "text": "\t// scripting event - onKill\n\tconst CreatureEventList &killEvents = getCreatureEvents(CREATURE_EVENT_KILL);\n\tfor (const auto &killEventPtr : killEvents) {\n\t\tkillEventPtr->executeOnKill(static_self_cast(), target, lastHit);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb6caae0aa5e4419e879d87c8da3b31ed6a51297bdbe1e49cf599752ffde6db8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'onGainExperience' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1291, + "startColumn": 16, + "charOffset": 38372, + "charLength": 16, + "snippet": { + "text": "onGainExperience" + } + }, + "contextRegion": { + "startLine": 1289, + "startColumn": 16, + "charOffset": 38354, + "charLength": 16, + "snippet": { + "text": "}\n\nvoid Creature::onGainExperience(uint64_t gainExp, std::shared_ptr target) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tauto master = getMaster();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2b593dd9332a74d8bf489790e4566537624a9a4161217762f98eb2ac30ce745" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1292, + "startColumn": 34, + "charOffset": 38476, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1290, + "startColumn": 34, + "charOffset": 38356, + "charLength": 15, + "snippet": { + "text": "\nvoid Creature::onGainExperience(uint64_t gainExp, std::shared_ptr target) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tauto master = getMaster();\n\tif (gainExp == 0 || !master) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a487e0149c17019d2e4d019d64c51de892b1c4078ae9156de435c7053e437f38" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1294, + "startColumn": 22, + "charOffset": 38543, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1292, + "startColumn": 22, + "charOffset": 38443, + "charLength": 1, + "snippet": { + "text": "\tmetrics::method_latency measure(__METHOD_NAME__);\n\tauto master = getMaster();\n\tif (gainExp == 0 || !master) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ba9a80009598134b68d7c1c64ff86de3a6db1bd3516523ea6a608411c8f59b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1314, + "startColumn": 27, + "charOffset": 39109, + "charLength": 7, + "snippet": { + "text": "gainExp" + } + }, + "contextRegion": { + "startLine": 1312, + "startColumn": 27, + "charOffset": 39005, + "charLength": 7, + "snippet": { + "text": "\t\tmessage.position = position;\n\t\tmessage.primary.color = TEXTCOLOR_WHITE_EXP;\n\t\tmessage.primary.value = gainExp;\n\n\t\tfor (const auto &spectator : spectators) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8065206442fa3f4c51f616f2f1f37dc47c2f60a3af0753b46e0861248003ff4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1314, + "startColumn": 27, + "charOffset": 39109, + "charLength": 7, + "snippet": { + "text": "gainExp" + } + }, + "contextRegion": { + "startLine": 1312, + "startColumn": 27, + "charOffset": 39005, + "charLength": 7, + "snippet": { + "text": "\t\tmessage.position = position;\n\t\tmessage.primary.color = TEXTCOLOR_WHITE_EXP;\n\t\tmessage.primary.value = gainExp;\n\n\t\tfor (const auto &spectator : spectators) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "764ccdbbc9c2bfdcd02300e56e1a5b60266fda4e6e6e214d73bcbdd939951c3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1316, + "startColumn": 3, + "charOffset": 39121, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1314, + "startColumn": 3, + "charOffset": 39083, + "charLength": 3, + "snippet": { + "text": "\t\tmessage.primary.value = gainExp;\n\n\t\tfor (const auto &spectator : spectators) {\n\t\t\tspectator->getPlayer()->sendTextMessage(message);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c010cc695df0fc384c1b0617fbe4cd4477af6e6803a659b5f0598b94b586ef77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'newMaster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1322, + "startColumn": 52, + "charOffset": 39278, + "charLength": 9, + "snippet": { + "text": "newMaster" + } + }, + "contextRegion": { + "startLine": 1320, + "startColumn": 52, + "charOffset": 39224, + "charLength": 9, + "snippet": { + "text": "}\n\nbool Creature::setMaster(std::shared_ptr newMaster, bool reloadCreature /* = false*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\t// Persists if this creature has ever been a summon" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "378bea666ee5b8c0d281c487695b075a300b2102cf48af4c5959d40f92f66e5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1323, + "startColumn": 34, + "charOffset": 39358, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1321, + "startColumn": 34, + "charOffset": 39226, + "charLength": 15, + "snippet": { + "text": "\nbool Creature::setMaster(std::shared_ptr newMaster, bool reloadCreature /* = false*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\t// Persists if this creature has ever been a summon\n\tthis->summoned = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed9928ad0108479ad4fc0f8a43a06d6ed8c176d3731dd68eab95730dcaf84ae0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1328, + "startColumn": 6, + "charOffset": 39490, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1326, + "startColumn": 6, + "charOffset": 39453, + "charLength": 1, + "snippet": { + "text": "\tauto oldMaster = getMaster();\n\n\tif (!newMaster && !oldMaster) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f0f606d07f8a95bd1dc1717c4903229404d4bb7c80dcc7e97b196e795c2d984" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1328, + "startColumn": 20, + "charOffset": 39504, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1326, + "startColumn": 20, + "charOffset": 39453, + "charLength": 1, + "snippet": { + "text": "\tauto oldMaster = getMaster();\n\n\tif (!newMaster && !oldMaster) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c4dcee3a075fb0dd1040df0031427730a33952ce1e89ed542a14e77c7f30719" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1335, + "startColumn": 3, + "charOffset": 39689, + "charLength": 17, + "snippet": { + "text": "setFollowCreature" + } + }, + "contextRegion": { + "startLine": 1333, + "startColumn": 3, + "charOffset": 39573, + "charLength": 17, + "snippet": { + "text": "\t// Reloading summon icon/knownCreature and reset informations (follow/dropLoot/skillLoss)\n\tif (reloadCreature) {\n\t\tsetFollowCreature(nullptr);\n\t\tsetDropLoot(false);\n\t\tsetSkillLoss(false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a82482d07191ea112ad88f12c120d4ccc04b3b96f166eb98e5ef7b23b0c52d06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1341, + "startColumn": 24, + "charOffset": 39839, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1339, + "startColumn": 24, + "charOffset": 39795, + "charLength": 12, + "snippet": { + "text": "\t}\n\tif (newMaster) {\n\t\tnewMaster->m_summons.emplace_back(self);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0cca8b821926bba09d2269306f707ba8a961b1fa4a11bec40d9214a99682bf81" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1349, + "startColumn": 25, + "charOffset": 40037, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 1347, + "startColumn": 25, + "charOffset": 39905, + "charLength": 5, + "snippet": { + "text": "\t\tconst auto &it = std::ranges::find(oldMaster->m_summons, self);\n\t\tif (it != oldMaster->m_summons.end()) {\n\t\t\toldMaster->m_summons.erase(it);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03796ec3a6ac367bce852bb62766699a3a7fbabafe3784c01d61e2b7b84fc2d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'condition' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1355, + "startColumn": 56, + "charOffset": 40127, + "charLength": 9, + "snippet": { + "text": "condition" + } + }, + "contextRegion": { + "startLine": 1353, + "startColumn": 56, + "charOffset": 40069, + "charLength": 9, + "snippet": { + "text": "}\n\nbool Creature::addCondition(std::shared_ptr condition, bool attackerPlayer /* = false*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (condition == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8c8224694e1ed92df1c24d918d4ac855e9a75a05e390690e630dcebc3fc6055" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1356, + "startColumn": 34, + "charOffset": 40207, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1354, + "startColumn": 34, + "charOffset": 40071, + "charLength": 15, + "snippet": { + "text": "\nbool Creature::addCondition(std::shared_ptr condition, bool attackerPlayer /* = false*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (condition == nullptr) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa193f3bf61a5a276b83927d127a2c86fb0b0cc3c50689d0eedfbe05ddb51b16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'condition' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1378, + "startColumn": 62, + "charOffset": 40777, + "charLength": 9, + "snippet": { + "text": "condition" + } + }, + "contextRegion": { + "startLine": 1376, + "startColumn": 62, + "charOffset": 40713, + "charLength": 9, + "snippet": { + "text": "}\n\nbool Creature::addCombatCondition(std::shared_ptr condition, bool attackerPlayer /* = false*/) {\n\t// Caution: condition variable could be deleted after the call to addCondition\n\tConditionType_t type = condition->getType();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d9c158d9c2698841cb34621b780a5e6dac91e5ecb5081d887032c40802cf8d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1391, + "startColumn": 34, + "charOffset": 41154, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1389, + "startColumn": 34, + "charOffset": 41065, + "charLength": 15, + "snippet": { + "text": "\nvoid Creature::removeCondition(ConditionType_t type) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tauto it = conditions.begin(), end = conditions.end();\n\twhile (it != end) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b06f30fe0d4a6424ac8233bfa9baf512f5c9b2e8b8fabc612a30ab518f3267c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1392, + "startColumn": 2, + "charOffset": 41173, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1390, + "startColumn": 2, + "charOffset": 41066, + "charLength": 4, + "snippet": { + "text": "void Creature::removeCondition(ConditionType_t type) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tauto it = conditions.begin(), end = conditions.end();\n\twhile (it != end) {\n\t\tstd::shared_ptr condition = *it;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e97962c07b832d54b461e635ace0a87ec1b00bc3711528b2c9b7a4ed3fc9e7a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1392, + "startColumn": 2, + "charOffset": 41173, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1390, + "startColumn": 2, + "charOffset": 41066, + "charLength": 4, + "snippet": { + "text": "void Creature::removeCondition(ConditionType_t type) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tauto it = conditions.begin(), end = conditions.end();\n\twhile (it != end) {\n\t\tstd::shared_ptr condition = *it;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "072b118990ed77fd23d6930d97ec4cc1be59a5e45040034b85cfdd4791a2b277" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1393, + "startColumn": 2, + "charOffset": 41228, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 1391, + "startColumn": 2, + "charOffset": 41121, + "charLength": 5, + "snippet": { + "text": "\tmetrics::method_latency measure(__METHOD_NAME__);\n\tauto it = conditions.begin(), end = conditions.end();\n\twhile (it != end) {\n\t\tstd::shared_ptr condition = *it;\n\t\tif (condition->getType() != type) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "deafde52546fb2dc26082c7cf6d2d6e205b027969c8f7b40b03e6a052e771578" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1393, + "startColumn": 9, + "charOffset": 41235, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1391, + "startColumn": 9, + "charOffset": 41121, + "charLength": 2, + "snippet": { + "text": "\tmetrics::method_latency measure(__METHOD_NAME__);\n\tauto it = conditions.begin(), end = conditions.end();\n\twhile (it != end) {\n\t\tstd::shared_ptr condition = *it;\n\t\tif (condition->getType() != type) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62702f3a70c723afc816cafe17ab90039524d9d88c27b64ec403c5ea78163a12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1409, + "startColumn": 34, + "charOffset": 41611, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1407, + "startColumn": 34, + "charOffset": 41461, + "charLength": 15, + "snippet": { + "text": "\nvoid Creature::removeCondition(ConditionType_t conditionType, ConditionId_t conditionId, bool force /* = false*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tauto it = conditions.begin(), end = conditions.end();\n\twhile (it != end) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0207e809258f4e4f61a11fd8a845d51dcf77bf61224eac0827e2fd4defd523b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1410, + "startColumn": 2, + "charOffset": 41630, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1408, + "startColumn": 2, + "charOffset": 41462, + "charLength": 4, + "snippet": { + "text": "void Creature::removeCondition(ConditionType_t conditionType, ConditionId_t conditionId, bool force /* = false*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tauto it = conditions.begin(), end = conditions.end();\n\twhile (it != end) {\n\t\tstd::shared_ptr condition = *it;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db0f472737f267eb867f59bb06e061004d920cd32559a561befd61d08846855d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1410, + "startColumn": 2, + "charOffset": 41630, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1408, + "startColumn": 2, + "charOffset": 41462, + "charLength": 4, + "snippet": { + "text": "void Creature::removeCondition(ConditionType_t conditionType, ConditionId_t conditionId, bool force /* = false*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tauto it = conditions.begin(), end = conditions.end();\n\twhile (it != end) {\n\t\tstd::shared_ptr condition = *it;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8e8f6e7f6457e34d94f1d5d462cb40eedaab0e6a38a3cfc6e1181558bb33ca1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1411, + "startColumn": 2, + "charOffset": 41685, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 1409, + "startColumn": 2, + "charOffset": 41578, + "charLength": 5, + "snippet": { + "text": "\tmetrics::method_latency measure(__METHOD_NAME__);\n\tauto it = conditions.begin(), end = conditions.end();\n\twhile (it != end) {\n\t\tstd::shared_ptr condition = *it;\n\t\tif (condition->getType() != conditionType || condition->getId() != conditionId) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e334693414f0c5f2a1b2626fdc3baf84a4018420375ff4940347491b1963653" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1411, + "startColumn": 9, + "charOffset": 41692, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1409, + "startColumn": 9, + "charOffset": 41578, + "charLength": 2, + "snippet": { + "text": "\tmetrics::method_latency measure(__METHOD_NAME__);\n\tauto it = conditions.begin(), end = conditions.end();\n\twhile (it != end) {\n\t\tstd::shared_ptr condition = *it;\n\t\tif (condition->getType() != conditionType || condition->getId() != conditionId) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "346260add25e9a97a21b0eac88759d9cfcce8191297e789b17f0144693532dd0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1421, + "startColumn": 20, + "charOffset": 41999, + "charLength": 13, + "snippet": { + "text": "scheduleEvent" + } + }, + "contextRegion": { + "startLine": 1419, + "startColumn": 20, + "charOffset": 41917, + "charLength": 13, + "snippet": { + "text": "\t\t\tint32_t walkDelay = getWalkDelay();\n\t\t\tif (walkDelay > 0) {\n\t\t\t\tg_dispatcher().scheduleEvent(\n\t\t\t\t\twalkDelay, [creatureId = getID(), conditionType, conditionId] { g_game().forceRemoveCondition(creatureId, conditionType, conditionId); }, \"Game::forceRemoveCondition\"\n\t\t\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02869816c2d67a79102dafc57496c3251fb5fd287e7615f2f2f26df75bbf42db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1438, + "startColumn": 2, + "charOffset": 42448, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1436, + "startColumn": 2, + "charOffset": 42327, + "charLength": 3, + "snippet": { + "text": "void Creature::removeCombatCondition(ConditionType_t type) {\n\tstd::vector> removeConditions;\n\tfor (const auto &condition : conditions) {\n\t\tif (condition->getType() == type) {\n\t\t\tremoveConditions.push_back(condition);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cacfa57890869f4bf005471e500d5ff969809eb4f46e6ffe2106783dbedb649c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1444, + "startColumn": 2, + "charOffset": 42580, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1442, + "startColumn": 2, + "charOffset": 42575, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &condition : removeConditions) {\n\t\tonCombatRemoveCondition(condition);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb9a2fa0c07b042f301226939a09887e58ca1a3783c19e55a8b00c115e01272e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'condition' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1449, + "startColumn": 59, + "charOffset": 42731, + "charLength": 9, + "snippet": { + "text": "condition" + } + }, + "contextRegion": { + "startLine": 1447, + "startColumn": 59, + "charOffset": 42670, + "charLength": 9, + "snippet": { + "text": "}\n\nvoid Creature::removeCondition(std::shared_ptr condition) {\n\tauto it = std::find(conditions.begin(), conditions.end(), condition);\n\tif (it == conditions.end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7751094857a8f82498a047bc4b7c1f1d22a55ee01b8a0dc41fe4e9d042742e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1455, + "startColumn": 13, + "charOffset": 42872, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 1453, + "startColumn": 13, + "charOffset": 42856, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tconditions.erase(it);\n\n\tcondition->endCondition(getCreature());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "842e2555c8262cd02f755439421f885310d3c21493efe259d04bb325a5b42a9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1462, + "startColumn": 2, + "charOffset": 43048, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1460, + "startColumn": 2, + "charOffset": 42966, + "charLength": 3, + "snippet": { + "text": "\nstd::shared_ptr Creature::getCondition(ConditionType_t type) const {\n\tfor (const auto &condition : conditions) {\n\t\tif (condition->getType() == type) {\n\t\t\treturn condition;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24a1c0178f5a64e5d1326bf524a0a19d5cfe82161eb27c752b5111c156374e1f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1471, + "startColumn": 34, + "charOffset": 43342, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1469, + "startColumn": 34, + "charOffset": 43176, + "charLength": 15, + "snippet": { + "text": "\nstd::shared_ptr Creature::getCondition(ConditionType_t type, ConditionId_t conditionId, uint32_t subId /* = 0*/) const {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tfor (const auto &condition : conditions) {\n\t\tif (condition->getType() == type && condition->getId() == conditionId && condition->getSubId() == subId) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cfb819ef0541f73964a009cc1ff16f8ac7b408cdaedd63b275be1cb6fad40ddb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1472, + "startColumn": 2, + "charOffset": 43361, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1470, + "startColumn": 2, + "charOffset": 43177, + "charLength": 3, + "snippet": { + "text": "std::shared_ptr Creature::getCondition(ConditionType_t type, ConditionId_t conditionId, uint32_t subId /* = 0*/) const {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tfor (const auto &condition : conditions) {\n\t\tif (condition->getType() == type && condition->getId() == conditionId && condition->getSubId() == subId) {\n\t\t\treturn condition;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1271bcbd83f6c173b8db8533c8bd258b99346226b9f8c822e636cbfb9cddba78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1482, + "startColumn": 2, + "charOffset": 43718, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1480, + "startColumn": 2, + "charOffset": 43561, + "charLength": 3, + "snippet": { + "text": "std::vector> Creature::getConditionsByType(ConditionType_t type) const {\n\tstd::vector> conditionsVec;\n\tfor (const auto &condition : conditions) {\n\t\tif (condition->getType() == type) {\n\t\t\tconditionsVec.push_back(condition);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05edcab824eae645cdae02d0d94ed92216e80a96b12d6a869b7928dfacf70ef1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1491, + "startColumn": 34, + "charOffset": 43958, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1489, + "startColumn": 34, + "charOffset": 43870, + "charLength": 15, + "snippet": { + "text": "\nvoid Creature::executeConditions(uint32_t interval) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tauto it = conditions.begin(), end = conditions.end();\n\twhile (it != end) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8182972031025946e3dab4822aa6f16ece1cbe59a72166fa65575801d933b2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1492, + "startColumn": 2, + "charOffset": 43977, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1490, + "startColumn": 2, + "charOffset": 43871, + "charLength": 4, + "snippet": { + "text": "void Creature::executeConditions(uint32_t interval) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tauto it = conditions.begin(), end = conditions.end();\n\twhile (it != end) {\n\t\tstd::shared_ptr condition = *it;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7611e86514ef55c50446705992bc949012adec9eacc30f6c7ab0ca4f386ddeeb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1492, + "startColumn": 2, + "charOffset": 43977, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1490, + "startColumn": 2, + "charOffset": 43871, + "charLength": 4, + "snippet": { + "text": "void Creature::executeConditions(uint32_t interval) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tauto it = conditions.begin(), end = conditions.end();\n\twhile (it != end) {\n\t\tstd::shared_ptr condition = *it;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5bc16261308565505afb688cad33a0b3f7ff2dbb797bc74ba74110e6349d0672" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1493, + "startColumn": 2, + "charOffset": 44032, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 1491, + "startColumn": 2, + "charOffset": 43925, + "charLength": 5, + "snippet": { + "text": "\tmetrics::method_latency measure(__METHOD_NAME__);\n\tauto it = conditions.begin(), end = conditions.end();\n\twhile (it != end) {\n\t\tstd::shared_ptr condition = *it;\n\t\tif (!condition->executeCondition(getCreature(), interval)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c49acb6729afc37fe96ab3b791135a4c29a2e876b687412a46d972c0ad9f846" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1493, + "startColumn": 9, + "charOffset": 44039, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1491, + "startColumn": 9, + "charOffset": 43925, + "charLength": 2, + "snippet": { + "text": "\tmetrics::method_latency measure(__METHOD_NAME__);\n\tauto it = conditions.begin(), end = conditions.end();\n\twhile (it != end) {\n\t\tstd::shared_ptr condition = *it;\n\t\tif (!condition->executeCondition(getCreature(), interval)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17fcd49e6383cc3f4d67fea20dfb9a78c0f376c6fb263f77b5d1462a41b843d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1495, + "startColumn": 51, + "charOffset": 44148, + "charLength": 8, + "snippet": { + "text": "interval" + } + }, + "contextRegion": { + "startLine": 1493, + "startColumn": 51, + "charOffset": 44031, + "charLength": 8, + "snippet": { + "text": "\twhile (it != end) {\n\t\tstd::shared_ptr condition = *it;\n\t\tif (!condition->executeCondition(getCreature(), interval)) {\n\t\t\tConditionType_t type = condition->getType();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c62d3c452c68651905e745e9bccbd2d573c2014016f271c4a5d61687552ef16b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1510, + "startColumn": 34, + "charOffset": 44456, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1508, + "startColumn": 34, + "charOffset": 44339, + "charLength": 15, + "snippet": { + "text": "\nbool Creature::hasCondition(ConditionType_t type, uint32_t subId /* = 0*/) const {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (isSuppress(type, false)) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "761c1d921c636cebac35614b37ffe3a025fcd25a49b283408b4c209f44a1c977" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1516, + "startColumn": 2, + "charOffset": 44560, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1514, + "startColumn": 2, + "charOffset": 44525, + "charLength": 3, + "snippet": { + "text": "\n\tint64_t timeNow = OTSYS_TIME();\n\tfor (const auto &condition : conditions) {\n\t\tif (condition->getType() != type || condition->getSubId() != subId) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0b366d859904cd1dbd958a735dee4ff6c2dd2091d78d28f0a7d2e1faef20ad8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-anyofallof", + "ruleIndex": 735, + "kind": "fail", + "level": "warning", + "message": { + "text": "replace loop by 'std::ranges::any_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1516, + "startColumn": 2, + "charOffset": 44560, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1514, + "startColumn": 2, + "charOffset": 44525, + "charLength": 3, + "snippet": { + "text": "\n\tint64_t timeNow = OTSYS_TIME();\n\tfor (const auto &condition : conditions) {\n\t\tif (condition->getType() != type || condition->getSubId() != subId) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3af182156db8ed8486975051dd1f3f6c5928ecb22466237ea46b1b7e17e6de5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1534, + "startColumn": 30, + "charOffset": 44953, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 1532, + "startColumn": 30, + "charOffset": 44896, + "charLength": 4, + "snippet": { + "text": "\n\tif (walk.needRecache()) {\n\t\tauto duration = std::floor(1000 * walk.groundSpeed / walk.calculatedStepSpeed);\n\t\twalk.duration = static_cast(std::ceil(duration / SERVER_BEAT) * SERVER_BEAT);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4da14b41c235a61038415bf28613dd6c448fc480b5adf0f336e947ec1bac600e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1535, + "startColumn": 62, + "charOffset": 45067, + "charLength": 11, + "snippet": { + "text": "SERVER_BEAT" + } + }, + "contextRegion": { + "startLine": 1533, + "startColumn": 62, + "charOffset": 44897, + "charLength": 11, + "snippet": { + "text": "\tif (walk.needRecache()) {\n\t\tauto duration = std::floor(1000 * walk.groundSpeed / walk.calculatedStepSpeed);\n\t\twalk.duration = static_cast(std::ceil(duration / SERVER_BEAT) * SERVER_BEAT);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc6e21c70f048592170f853468e1395eb56624bfe5af53a6d59557c8bd374622" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1535, + "startColumn": 77, + "charOffset": 45082, + "charLength": 11, + "snippet": { + "text": "SERVER_BEAT" + } + }, + "contextRegion": { + "startLine": 1533, + "startColumn": 77, + "charOffset": 44897, + "charLength": 11, + "snippet": { + "text": "\tif (walk.needRecache()) {\n\t\tauto duration = std::floor(1000 * walk.groundSpeed / walk.calculatedStepSpeed);\n\t\twalk.duration = static_cast(std::ceil(duration / SERVER_BEAT) * SERVER_BEAT);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "729f61211f5a3f8044e1e2e8167d4d64701522ef8ef4ccb1b85fa20864aa7527" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1539, + "startColumn": 2, + "charOffset": 45133, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1537, + "startColumn": 2, + "charOffset": 45099, + "charLength": 2, + "snippet": { + "text": "\n\tauto duration = walk.duration;\n\tif ((dir & DIRECTION_DIAGONAL_MASK) != 0) {\n\t\tduration *= WALK_DIAGONAL_EXTRA_COST;\n\t} else if (const auto &monster = getMonster()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6538d0e669ea830477ccabd16e8fe9a07f9cf593a328b1ee1f3521e1a569187" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1539, + "startColumn": 11, + "charOffset": 45142, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1537, + "startColumn": 11, + "charOffset": 45099, + "charLength": 1, + "snippet": { + "text": "\n\tauto duration = walk.duration;\n\tif ((dir & DIRECTION_DIAGONAL_MASK) != 0) {\n\t\tduration *= WALK_DIAGONAL_EXTRA_COST;\n\t} else if (const auto &monster = getMonster()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56f23ce8bf68f4fe4e54d981c701855cdf51fc699827251bdbfd7afb43234833" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1542, + "startColumn": 61, + "charOffset": 45327, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1540, + "startColumn": 61, + "charOffset": 45177, + "charLength": 1, + "snippet": { + "text": "\t\tduration *= WALK_DIAGONAL_EXTRA_COST;\n\t} else if (const auto &monster = getMonster()) {\n\t\tif (monster->isTargetNearby() && !monster->isFleeing() && !monster->getMaster()) {\n\t\t\tduration *= WALK_TARGET_NEARBY_EXTRA_COST;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a41cce71feaf1c64ce46959ebc823b404f9ddba40b525eaceee3c89ec0a6dca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1573, + "startColumn": 2, + "charOffset": 45977, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1571, + "startColumn": 2, + "charOffset": 45948, + "charLength": 2, + "snippet": { + "text": "\tvarSpeed = varSpeedDelta;\n\n\tif (getSpeed() <= 0) {\n\t\tstopEventWalk();\n\t\tcancelNextWalk = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13aa14edb846c23f435851ee17164b464f5012e20168d0861cf0f3ca03d94170" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1593, + "startColumn": 6, + "charOffset": 46434, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1591, + "startColumn": 6, + "charOffset": 46304, + "charLength": 1, + "snippet": { + "text": "bool Creature::registerCreatureEvent(const std::string &name) {\n\tconst auto event = g_creatureEvents().getEventByName(name);\n\tif (!event) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5de7e4388f904fd71dec7b930d8c6e30a207d6c84942f6fabe857989665ce7ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1599, + "startColumn": 3, + "charOffset": 46550, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1597, + "startColumn": 3, + "charOffset": 46464, + "charLength": 3, + "snippet": { + "text": "\tCreatureEventType_t type = event->getEventType();\n\tif (hasEventRegistered(type)) {\n\t\tfor (const auto &creatureEventPtr : eventsList) {\n\t\t\tif (creatureEventPtr == event) {\n\t\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c780338667229cb1b12d67824f0a516e271f4a76ea4307d9a59cdc7b409eed7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1605, + "startColumn": 52, + "charOffset": 46724, + "charLength": 2, + "snippet": { + "text": "<<" + } + }, + "contextRegion": { + "startLine": 1603, + "startColumn": 52, + "charOffset": 46659, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\tscriptEventsBitField |= static_cast(1) << type;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab0b2e71ef03d93b8cab8e756a7917735208406c6aee322e0772e7661a9692c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1614, + "startColumn": 6, + "charOffset": 46916, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1612, + "startColumn": 6, + "charOffset": 46784, + "charLength": 1, + "snippet": { + "text": "bool Creature::unregisterCreatureEvent(const std::string &name) {\n\tconst auto event = g_creatureEvents().getEventByName(name);\n\tif (!event) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5ffa48ea1c5acc767a1524b19820ba3741c14d492a48b516a542dd61d8581b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1625, + "startColumn": 2, + "charOffset": 47080, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1623, + "startColumn": 2, + "charOffset": 47051, + "charLength": 4, + "snippet": { + "text": "\tbool resetTypeBit = true;\n\n\tauto it = eventsList.begin(), end = eventsList.end();\n\twhile (it != end) {\n\t\tconst auto curEvent = *it;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c2ca6082eeb0098a0f58a807bcd8a0c3a772c6c7304cf8d7e28497aee6bed8b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1625, + "startColumn": 2, + "charOffset": 47080, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1623, + "startColumn": 2, + "charOffset": 47051, + "charLength": 4, + "snippet": { + "text": "\tbool resetTypeBit = true;\n\n\tauto it = eventsList.begin(), end = eventsList.end();\n\twhile (it != end) {\n\t\tconst auto curEvent = *it;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "095d1ac9a510c7b3b77f87aba81ef63c97c2da0d97bc16e450933d35d0bef6bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1626, + "startColumn": 2, + "charOffset": 47135, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 1624, + "startColumn": 2, + "charOffset": 47078, + "charLength": 5, + "snippet": { + "text": "\n\tauto it = eventsList.begin(), end = eventsList.end();\n\twhile (it != end) {\n\t\tconst auto curEvent = *it;\n\t\tif (curEvent == event) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "baaf464468108c2e78081bf942f035e6984aa47b68060ef226b8eea5da61b6c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1626, + "startColumn": 9, + "charOffset": 47142, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1624, + "startColumn": 9, + "charOffset": 47078, + "charLength": 2, + "snippet": { + "text": "\n\tauto it = eventsList.begin(), end = eventsList.end();\n\twhile (it != end) {\n\t\tconst auto curEvent = *it;\n\t\tif (curEvent == event) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80eeebde747d2bd5babb1685703e8518815dafb010b6d40833ace79c92838de7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1640, + "startColumn": 54, + "charOffset": 47416, + "charLength": 2, + "snippet": { + "text": "<<" + } + }, + "contextRegion": { + "startLine": 1638, + "startColumn": 54, + "charOffset": 47341, + "charLength": 2, + "snippet": { + "text": "\n\tif (resetTypeBit) {\n\t\tscriptEventsBitField &= ~(static_cast(1) << type);\n\t}\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42a9b42d1edc09198000900ca06bf1598bed3d88775c4d08cc79d715f17d01c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1652, + "startColumn": 2, + "charOffset": 47616, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1650, + "startColumn": 2, + "charOffset": 47611, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &creatureEventPtr : eventsList) {\n\t\tif (creatureEventPtr->getEventType() == type) {\n\t\t\ttmpEventList.push_back(creatureEventPtr);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c49acb6729afc37fe96ab3b791135a4c29a2e876b687412a46d972c0ad9f846" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'isInRange' has cognitive complexity of 26 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1661, + "startColumn": 34, + "charOffset": 47827, + "charLength": 9, + "snippet": { + "text": "isInRange" + } + }, + "contextRegion": { + "startLine": 1659, + "startColumn": 34, + "charOffset": 47791, + "charLength": 9, + "snippet": { + "text": "}\n\nbool FrozenPathingConditionCall::isInRange(const Position &startPos, const Position &testPos, const FindPathParams &fpp) const {\n\tif (fpp.fullPathSearch) {\n\t\tif (testPos.x > targetPos.x + fpp.maxTargetDist) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2558a59bfad964916de3e49b630e08fec5b2252818f01ee415a1b45b689c2f87" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'isInRange' of similar type ('const Position &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1661, + "startColumn": 44, + "charOffset": 47837, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 1659, + "startColumn": 44, + "charOffset": 47791, + "charLength": 5, + "snippet": { + "text": "}\n\nbool FrozenPathingConditionCall::isInRange(const Position &startPos, const Position &testPos, const FindPathParams &fpp) const {\n\tif (fpp.fullPathSearch) {\n\t\tif (testPos.x > targetPos.x + fpp.maxTargetDist) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da4e8b90d971b4a5980d0aec82492c20a6e87d42496c040c29d805c0dfd750f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-overloaded-operator", + "ruleIndex": 526, + "kind": "fail", + "level": "warning", + "message": { + "text": "overloading 'operator()' is disallowed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1705, + "startColumn": 1, + "charOffset": 48869, + "charLength": 4, + "snippet": { + "text": "bool" + } + }, + "contextRegion": { + "startLine": 1703, + "startColumn": 1, + "charOffset": 48853, + "charLength": 4, + "snippet": { + "text": "\treturn true;\n}\nbool FrozenPathingConditionCall::operator()(const Position &startPos, const Position &testPos, const FindPathParams &fpp, int32_t &bestMatchDist) const {\n\tif (!isInRange(startPos, testPos, fpp)) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "314dfef3afba5d08cd59ec59f24ef6d96cf3cf8016534be1f41da330cc3b6218" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1715, + "startColumn": 2, + "charOffset": 49309, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1713, + "startColumn": 2, + "charOffset": 49180, + "charLength": 2, + "snippet": { + "text": "\n\tint32_t testDist = std::max(Position::getDistanceX(targetPos, testPos), Position::getDistanceY(targetPos, testPos));\n\tif (fpp.maxTargetDist == 1) {\n\t\tif (testDist < fpp.minTargetDist || testDist > fpp.maxTargetDist) {\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a8d32ef1b6c223db881e244b4eb0ef0c91e3ad5bd86f4b6d698ec275bbadf1f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in conditional return statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1717, + "startColumn": 11, + "charOffset": 49419, + "charLength": 5, + "snippet": { + "text": "false" + } + }, + "contextRegion": { + "startLine": 1715, + "startColumn": 11, + "charOffset": 49308, + "charLength": 5, + "snippet": { + "text": "\tif (fpp.maxTargetDist == 1) {\n\t\tif (testDist < fpp.minTargetDist || testDist > fpp.maxTargetDist) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da76335e9d46c8c2317fb6890299201dffde4cfd63a5c00096a2e09b51ba6216" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1720, + "startColumn": 4, + "charOffset": 49448, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1718, + "startColumn": 4, + "charOffset": 49426, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t\treturn true;\n\t} else if (testDist <= fpp.maxTargetDist) {\n\t\tif (testDist < fpp.minTargetDist) {\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a528a3080ed282848f7a6f43fdf174f834e985d42440d3690e0160d7a1e8822b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1724, + "startColumn": 3, + "charOffset": 49551, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1722, + "startColumn": 3, + "charOffset": 49528, + "charLength": 2, + "snippet": { + "text": "\t\t\treturn false;\n\t\t}\n\t\tif (testDist == fpp.maxTargetDist) {\n\t\t\tbestMatchDist = 0;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b9703cb4a799935013680719e13e1bc501be8892301ef98f352f4dd3693dc0e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1727, + "startColumn": 5, + "charOffset": 49630, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1725, + "startColumn": 5, + "charOffset": 49588, + "charLength": 4, + "snippet": { + "text": "\t\t\tbestMatchDist = 0;\n\t\t\treturn true;\n\t\t} else if (testDist > bestMatchDist) {\n\t\t\t// not quite what we want, but the best so far\n\t\t\tbestMatchDist = testDist;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0484af73930c72ede8d187dd4ea5848a4748f299898f3e75ff0f6780bb69460" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1744, + "startColumn": 34, + "charOffset": 50172, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1742, + "startColumn": 34, + "charOffset": 50024, + "charLength": 15, + "snippet": { + "text": "\nbool Creature::getPathTo(const Position &targetPos, std::vector &dirList, const FindPathParams &fpp) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (fpp.maxSearchDist != 0 || fpp.keepDistance) {\n\t\treturn g_game().map.getPathMatchingCond(getCreature(), targetPos, dirList, FrozenPathingConditionCall(targetPos), fpp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e810f18821aa929f67fad9d59794e7980f343ebee7f43798698261833545f63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'getPathTo' of similar type ('int32_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1751, + "startColumn": 86, + "charOffset": 50571, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 1749, + "startColumn": 86, + "charOffset": 50483, + "charLength": 7, + "snippet": { + "text": "}\n\nbool Creature::getPathTo(const Position &targetPos, std::vector &dirList, int32_t minTargetDist, int32_t maxTargetDist, bool fullPathSearch /*= true*/, bool clearSight /*= true*/, int32_t maxSearchDist /*= 7*/) {\n\tFindPathParams fpp;\n\tfpp.fullPathSearch = fullPathSearch;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d0b1b5a130dd7e277c447003a303a0f408f51852cbe7a6377bb16de0c2c8907" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1761, + "startColumn": 57, + "charOffset": 51010, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1759, + "startColumn": 57, + "charOffset": 50951, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Creature::turnToCreature(std::shared_ptr creature) {\n\tconst Position &creaturePos = creature->getPosition();\n\tconst auto dx = Position::getOffsetX(position, creaturePos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "175743546e5956d41da3160f36278d3567d2d18692a5ec9c26671bd24a6e4418" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'tan' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1766, + "startColumn": 8, + "charOffset": 51210, + "charLength": 3, + "snippet": { + "text": "tan" + } + }, + "contextRegion": { + "startLine": 1764, + "startColumn": 8, + "charOffset": 51140, + "charLength": 3, + "snippet": { + "text": "\tconst auto dy = Position::getOffsetY(position, creaturePos);\n\n\tfloat tan;\n\tif (dx != 0) {\n\t\ttan = static_cast(dy) / dx;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4798de01faed045e934e5643762d1a9961817cacd8ce492c79e7380f5d7ded19" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int_fast32_t' (aka 'long') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1768, + "startColumn": 34, + "charOffset": 51264, + "charLength": 2, + "snippet": { + "text": "dx" + } + }, + "contextRegion": { + "startLine": 1766, + "startColumn": 34, + "charOffset": 51203, + "charLength": 2, + "snippet": { + "text": "\tfloat tan;\n\tif (dx != 0) {\n\t\ttan = static_cast(dy) / dx;\n\t} else {\n\t\ttan = 10;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "118ec53f19cce4d4a5fc223b0ad31fa7686d21b399b310b8359dd77650c8c06a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1768, + "startColumn": 34, + "charOffset": 51264, + "charLength": 2, + "snippet": { + "text": "dx" + } + }, + "contextRegion": { + "startLine": 1766, + "startColumn": 34, + "charOffset": 51203, + "charLength": 2, + "snippet": { + "text": "\tfloat tan;\n\tif (dx != 0) {\n\t\ttan = static_cast(dy) / dx;\n\t} else {\n\t\ttan = 10;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ef13c81b2404eb7518c96a861319d68a39181e56c34c15e884aa6295763a4b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1770, + "startColumn": 9, + "charOffset": 51286, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 1768, + "startColumn": 9, + "charOffset": 51231, + "charLength": 2, + "snippet": { + "text": "\t\ttan = static_cast(dy) / dx;\n\t} else {\n\t\ttan = 10;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a5498d54fdbbf5ed7cebe5292be1cd31d61c1048a34228927f6b5cbe55a9a753" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1770, + "startColumn": 9, + "charOffset": 51286, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 1768, + "startColumn": 9, + "charOffset": 51231, + "charLength": 2, + "snippet": { + "text": "\t\ttan = static_cast(dy) / dx;\n\t} else {\n\t\ttan = 10;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39865a457ac6b420ddfe5a2166cc87e518429adaa392006bd3184be991371c5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'dir' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1773, + "startColumn": 12, + "charOffset": 51305, + "charLength": 3, + "snippet": { + "text": "dir" + } + }, + "contextRegion": { + "startLine": 1771, + "startColumn": 12, + "charOffset": 51290, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tDirection dir;\n\tif (std::abs(tan) < 1) {\n\t\tif (dx > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66c7bc3d55e84f77eeeefdcc079b919c98e9392db6e6e44cbeba1a212fd7a8af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1774, + "startColumn": 22, + "charOffset": 51331, + "charLength": 1, + "snippet": { + "text": "1" + } + }, + "contextRegion": { + "startLine": 1772, + "startColumn": 22, + "charOffset": 51293, + "charLength": 1, + "snippet": { + "text": "\n\tDirection dir;\n\tif (std::abs(tan) < 1) {\n\t\tif (dx > 0) {\n\t\t\tdir = DIRECTION_WEST;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c3d05eb1d4f60a842c6cfcede0ae0aa30e1f02865fcb06b2c3981cd39352eef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1787, + "startColumn": 11, + "charOffset": 51523, + "charLength": 20, + "snippet": { + "text": "internalCreatureTurn" + } + }, + "contextRegion": { + "startLine": 1785, + "startColumn": 11, + "charOffset": 51506, + "charLength": 20, + "snippet": { + "text": "\t\t}\n\t}\n\tg_game().internalCreatureTurn(static_self_cast(), dir);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36125d830533ac5d8e1702eac02bb6e62496c75420117cd640808ecc5f1b965c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1795, + "startColumn": 139, + "charOffset": 51854, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 1793, + "startColumn": 139, + "charOffset": 51651, + "charLength": 2, + "snippet": { + "text": "\t}\n\tconst Position &masterPosition = getMaster()->getPosition();\n\treturn std::max(Position::getDistanceX(getPosition(), masterPosition), Position::getDistanceY(getPosition(), masterPosition)) > 30;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4eabd4f0d9c14f0e668752cf0083e27da148b4b81bea511845ad78e013681605" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1800, + "startColumn": 12, + "charOffset": 51952, + "charLength": 16, + "snippet": { + "text": "internalTeleport" + } + }, + "contextRegion": { + "startLine": 1798, + "startColumn": 12, + "charOffset": 51861, + "charLength": 16, + "snippet": { + "text": "void Creature::handleLostSummon(bool teleportSummons) {\n\tif (teleportSummons) {\n\t\tg_game().internalTeleport(static_self_cast(), getMaster()->getPosition(), true);\n\t} else {\n\t\tg_game().removeCreature(static_self_cast(), true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39171adf7b7c06f078bbf90a11c0b9470b7f14d98b67e17c58e1e8a0dafdcc91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1802, + "startColumn": 12, + "charOffset": 52055, + "charLength": 14, + "snippet": { + "text": "removeCreature" + } + }, + "contextRegion": { + "startLine": 1800, + "startColumn": 12, + "charOffset": 51941, + "charLength": 14, + "snippet": { + "text": "\t\tg_game().internalTeleport(static_self_cast(), getMaster()->getPosition(), true);\n\t} else {\n\t\tg_game().removeCreature(static_self_cast(), true);\n\t}\n\tg_game().addMagicEffect(getPosition(), CONST_ME_POFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31e7c6038cc635d9d4a1157feac8ab980978b62b60af441ab9b7109f555d72f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1807, + "startColumn": 19, + "charOffset": 52187, + "charLength": 17, + "snippet": { + "text": "getReflectPercent" + } + }, + "contextRegion": { + "startLine": 1805, + "startColumn": 19, + "charOffset": 52166, + "charLength": 17, + "snippet": { + "text": "}\n\nint32_t Creature::getReflectPercent(CombatType_t combatType, bool useCharges /*= false*/) const {\n\ttry {\n\t\treturn reflectPercent.at(combatTypeToIndex(combatType));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "607faa29087f6dc40047517a50dc34a14be229247de9f3078e8e87b7104aed33" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-unused-parameters", + "ruleIndex": 612, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'useCharges' is unused" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1807, + "startColumn": 67, + "charOffset": 52235, + "charLength": 10, + "snippet": { + "text": "useCharges" + } + }, + "contextRegion": { + "startLine": 1805, + "startColumn": 67, + "charOffset": 52166, + "charLength": 10, + "snippet": { + "text": "}\n\nint32_t Creature::getReflectPercent(CombatType_t combatType, bool useCharges /*= false*/) const {\n\ttry {\n\t\treturn reflectPercent.at(combatTypeToIndex(combatType));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c572cc4b6ebf3ce261d46e482da44541853dd64eb562e2340aad739cae86747" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1824, + "startColumn": 19, + "charOffset": 52820, + "charLength": 14, + "snippet": { + "text": "getReflectFlat" + } + }, + "contextRegion": { + "startLine": 1822, + "startColumn": 19, + "charOffset": 52799, + "charLength": 14, + "snippet": { + "text": "}\n\nint32_t Creature::getReflectFlat(CombatType_t combatType, bool useCharges /* = false*/) const {\n\ttry {\n\t\treturn reflectFlat.at(combatTypeToIndex(combatType));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23fecbe99a47c1f61f50f2b0d1a653113e7f8aab5046682118b219afbcf823d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-unused-parameters", + "ruleIndex": 612, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'useCharges' is unused" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1824, + "startColumn": 64, + "charOffset": 52865, + "charLength": 10, + "snippet": { + "text": "useCharges" + } + }, + "contextRegion": { + "startLine": 1822, + "startColumn": 64, + "charOffset": 52799, + "charLength": 10, + "snippet": { + "text": "}\n\nint32_t Creature::getReflectFlat(CombatType_t combatType, bool useCharges /* = false*/) const {\n\ttry {\n\t\treturn reflectFlat.at(combatTypeToIndex(combatType));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4a29cc34d11c543e213034eb74b91657e60b6727aae98f6c124177009c1982c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1901, + "startColumn": 6, + "charOffset": 55173, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1899, + "startColumn": 6, + "charOffset": 55113, + "charLength": 1, + "snippet": { + "text": "void Creature::iconChanged() {\n\tauto tile = getTile();\n\tif (!tile) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0660862dc53d99184269157749f6cac309db99aa864859ad41d9aa3f78047bf2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.cpp" + }, + "region": { + "startLine": 1905, + "startColumn": 2, + "charOffset": 55197, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1903, + "startColumn": 2, + "charOffset": 55192, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &spectator : Spectators().find(tile->getPosition(), true)) {\n\t\tspectator->getPlayer()->sendCreatureIcon(getCreature());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00b29b9c9d63dab6bbddf1adee9279b0f692a4cc53eea1d98f042129ff22ea0a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Creature::gainHealth' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/creature.hpp", + "index": 1 + }, + "region": { + "startLine": 427, + "startColumn": 7, + "charOffset": 11370, + "charLength": 10, + "snippet": { + "text": "gainHealth" + } + }, + "contextRegion": { + "startLine": 425, + "startColumn": 7, + "charOffset": 11317, + "charLength": 10, + "snippet": { + "text": "\tvirtual void changeMana(int32_t manaChange);\n\n\tvoid gainHealth(std::shared_ptr attacker, int32_t healthGain);\n\tvirtual void drainHealth(std::shared_ptr attacker, int32_t damage);\n\tvirtual void drainMana(std::shared_ptr attacker, int32_t manaLoss);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1185b76bf7bef132f88f3ec2acff10bbb19c4310f5ea56af3be6100d57cf0989" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-virtual-inheritance", + "ruleIndex": 529, + "kind": "fail", + "level": "warning", + "message": { + "text": "direct virtual inheritance is disallowed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 24, + "startColumn": 1, + "charOffset": 883, + "charLength": 5, + "snippet": { + "text": "class" + } + }, + "contextRegion": { + "startLine": 22, + "startColumn": 1, + "charOffset": 834, + "charLength": 5, + "snippet": { + "text": "#include \"lua/global/lua_timer_event_descr.hpp\"\n\nclass Creature;\nint GlobalFunctions::luaDoPlayerAddItem(lua_State* L) {\n\t// doPlayerAddItem(cid, itemid, count/subtype, canDropOnMap)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "534ea57cb71de60f23b1075cc8bebf7c51d60b0fd668c6f535e4e99c14afc51f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-10-1-1", + "ruleIndex": 397, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 10-1-1: Classes should not be derived from virtual bases" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 24, + "startColumn": 7, + "charOffset": 889, + "charLength": 8, + "snippet": { + "text": "Creature" + } + }, + "contextRegion": { + "startLine": 22, + "startColumn": 7, + "charOffset": 834, + "charLength": 8, + "snippet": { + "text": "#include \"lua/global/lua_timer_event_descr.hpp\"\n\nclass Creature;\nint GlobalFunctions::luaDoPlayerAddItem(lua_State* L) {\n\t// doPlayerAddItem(cid, itemid, count/subtype, canDropOnMap)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2bce8a27d94ae6b8a4a51088c78866dfec397529f14b3a47a3a057039f63055f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 29, + "startColumn": 6, + "charOffset": 1250, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 27, + "startColumn": 6, + "charOffset": 1063, + "charLength": 1, + "snippet": { + "text": "\t// doPlayerAddItem(cid, itemid, count, canDropOnMap, subtype)\n\tstd::shared_ptr player = getPlayer(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "285002140438255cad3352f2ee0d36a080ef6e6d62a3bcee86eacc0d25ddf591" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 30, + "startColumn": 3, + "charOffset": 1263, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 28, + "startColumn": 3, + "charOffset": 1194, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getPlayer(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "91b5848a61cbe4c756b8320021f113a09bdf5817f2a206822bcf6c7482556f47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 36, + "startColumn": 2, + "charOffset": 1410, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 2, + "charOffset": 1362, + "charLength": 7, + "snippet": { + "text": "\n\tuint16_t itemId = getNumber(L, 2);\n\tint32_t count = getNumber(L, 3, 1);\n\tbool canDropOnMap = getBoolean(L, 4, true);\n\tuint16_t subType = getNumber(L, 5, 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a27f6e607eefe1864f8d3178d86982c928bc33b138545e2bf49b7edadb8f85b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 2, + "charOffset": 1501, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 2, + "charOffset": 1409, + "charLength": 8, + "snippet": { + "text": "\tint32_t count = getNumber(L, 3, 1);\n\tbool canDropOnMap = getBoolean(L, 4, true);\n\tuint16_t subType = getNumber(L, 5, 1);\n\n\tconst ItemType &it = Item::items[itemId];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7317d2ea67ae96d09249159a665d0d9e978cb797a1098fb19c692e763a1465e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 44, + "charOffset": 1543, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 44, + "charOffset": 1409, + "charLength": 1, + "snippet": { + "text": "\tint32_t count = getNumber(L, 3, 1);\n\tbool canDropOnMap = getBoolean(L, 4, true);\n\tuint16_t subType = getNumber(L, 5, 1);\n\n\tconst ItemType &it = Item::items[itemId];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56470f2b10e91309e4c112c139796f23542ce9858bf625bfb84d411f5e4f09fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'itemCount' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 10, + "charOffset": 1603, + "charLength": 9, + "snippet": { + "text": "itemCount" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 10, + "charOffset": 1550, + "charLength": 9, + "snippet": { + "text": "\n\tconst ItemType &it = Item::items[itemId];\n\tint32_t itemCount;\n\n\tauto parameters = lua_gettop(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03d6d2efdd9640ccb8a2f9de05bc670ce828dd2be0ef529d5f237a1631b55e10" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 44, + "startColumn": 22, + "charOffset": 1670, + "charLength": 1, + "snippet": { + "text": "{" + } + }, + "contextRegion": { + "startLine": 42, + "startColumn": 22, + "charOffset": 1614, + "charLength": 1, + "snippet": { + "text": "\n\tauto parameters = lua_gettop(L);\n\tif (parameters > 4) {\n\t\t// subtype already supplied, count then is the amount\n\t\titemCount = std::max(1, count);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bec050f609f4990da4ea4d5284dbaae24e228c31dae445d666c90e2c013f7ab4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 49, + "startColumn": 75, + "charOffset": 1898, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 47, + "startColumn": 75, + "charOffset": 1771, + "charLength": 2, + "snippet": { + "text": "\t} else if (it.hasSubType()) {\n\t\tif (it.stackable) {\n\t\t\titemCount = static_cast(std::ceil(static_cast(count) / it.stackSize));\n\t\t} else {\n\t\t\titemCount = 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14d6d52ca99d8c9c74bfd47098a21b0a308dfa07c9234dcafe4949b3cda88c1d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 49, + "startColumn": 75, + "charOffset": 1898, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 47, + "startColumn": 75, + "charOffset": 1771, + "charLength": 2, + "snippet": { + "text": "\t} else if (it.hasSubType()) {\n\t\tif (it.stackable) {\n\t\t\titemCount = static_cast(std::ceil(static_cast(count) / it.stackSize));\n\t\t} else {\n\t\t\titemCount = 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03e6bd1119abf88bed7d8d548a3405a0da78d38409d0f9a7761917a4fe8088db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 53, + "startColumn": 13, + "charOffset": 1959, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 13, + "charOffset": 1925, + "charLength": 5, + "snippet": { + "text": "\t\t\titemCount = 1;\n\t\t}\n\t\tsubType = count;\n\t} else {\n\t\titemCount = std::max(1, count);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3966be542fe81a2dff8aba2adcf845182418cfaa18337e6496e3bb4a31b6d2d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 58, + "startColumn": 2, + "charOffset": 2024, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 56, + "startColumn": 2, + "charOffset": 2019, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\twhile (itemCount > 0) {\n\t\tuint16_t stackCount = subType;\n\t\tif (it.stackable && stackCount > it.stackSize) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33b626d1ccb58993de8ce1f9eee3f3d87b83d3b098fd048507f52f0e921e36a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'itemCount' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 58, + "startColumn": 9, + "charOffset": 2031, + "charLength": 9, + "snippet": { + "text": "itemCount" + } + }, + "contextRegion": { + "startLine": 56, + "startColumn": 9, + "charOffset": 2019, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\twhile (itemCount > 0) {\n\t\tuint16_t stackCount = subType;\n\t\tif (it.stackable && stackCount > it.stackSize) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e19bcc55538fe7e8099a6dc08431189c07fea6d74ef64b7b2a657690894c38e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 65, + "startColumn": 7, + "charOffset": 2245, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 7, + "charOffset": 2166, + "charLength": 1, + "snippet": { + "text": "\n\t\tstd::shared_ptr newItem = Item::CreateItem(itemId, stackCount);\n\t\tif (!newItem) {\n\t\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4729727657e261c3ddca3ac06a9657cf1963fb23b5223d489e112dac3f7b098" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 4, + "charOffset": 2260, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 4, + "charOffset": 2167, + "charLength": 15, + "snippet": { + "text": "\t\tstd::shared_ptr newItem = Item::CreateItem(itemId, stackCount);\n\t\tif (!newItem) {\n\t\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\t\tpushBoolean(L, false);\n\t\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f74f8e5608ca257b8f60e014ce9de5f2ce9b064fd5a2356cb51e02d1c5a77570" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 84, + "startColumn": 23, + "charOffset": 2710, + "charLength": 3, + "snippet": { + "text": "uid" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 23, + "charOffset": 2603, + "charLength": 3, + "snippet": { + "text": "\t\t\tif (newItem->getParent()) {\n\t\t\t\tuint32_t uid = getScriptEnv()->addThing(newItem);\n\t\t\t\tlua_pushnumber(L, uid);\n\t\t\t\treturn 1;\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2085495548ed0a891fd41b37e3149f9e9c305d9c04825c6d67c4aa34e9039fdf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 86, + "startColumn": 6, + "charOffset": 2735, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 6, + "charOffset": 2688, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tlua_pushnumber(L, uid);\n\t\t\t\treturn 1;\n\t\t\t} else {\n\t\t\t\t// stackable item stacked with existing object, newItem will be released\n\t\t\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc446e08ee7a34f36163b0272fd0212dfb6d81820bc3d44525171e94b91985dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 125, + "startColumn": 6, + "charOffset": 3845, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 123, + "startColumn": 6, + "charOffset": 3729, + "charLength": 1, + "snippet": { + "text": "\tScriptEnvironment* env = getScriptEnv();\n\tstd::shared_ptr container = env->getContainerByUID(uid);\n\tif (!container) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CONTAINER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb6b90b0610930a2ea91925c31349ba1d46efbeffb7eb7605d94217c51333092" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 126, + "startColumn": 3, + "charOffset": 3861, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 124, + "startColumn": 3, + "charOffset": 3771, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr container = env->getContainerByUID(uid);\n\tif (!container) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CONTAINER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db2395f0c3c9438dac74fcc38220d634763fbbdeedf134dbffa6d4cc91948b87" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 136, + "startColumn": 2, + "charOffset": 4101, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 2, + "charOffset": 4054, + "charLength": 8, + "snippet": { + "text": "\tint32_t itemCount = 1;\n\tint32_t subType = 1;\n\tuint32_t count = getNumber(L, 3, 1);\n\n\tif (it.hasSubType()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff46d452b87d5682f49ef80cdd127b61a81642035c9bf9fd499f6ade5d62513e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 140, + "startColumn": 75, + "charOffset": 4269, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 138, + "startColumn": 75, + "charOffset": 4149, + "charLength": 2, + "snippet": { + "text": "\tif (it.hasSubType()) {\n\t\tif (it.stackable) {\n\t\t\titemCount = static_cast(std::ceil(static_cast(count) / it.stackSize));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95ea6af663388050d9205331409574243147f566323352af88509d37a8ce91d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 140, + "startColumn": 75, + "charOffset": 4269, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 138, + "startColumn": 75, + "charOffset": 4149, + "charLength": 2, + "snippet": { + "text": "\tif (it.hasSubType()) {\n\t\tif (it.stackable) {\n\t\t\titemCount = static_cast(std::ceil(static_cast(count) / it.stackSize));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b4fd2717866678f2789faaea14921ab7c9958b0641b5607d8fd855c6f3991060" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 143, + "startColumn": 13, + "charOffset": 4302, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 141, + "startColumn": 13, + "charOffset": 4285, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\n\t\tsubType = count;\n\t} else {\n\t\titemCount = std::max(1, count);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e537cd25d5eae4258e0776f4164619485852ce65d6ed6c2252b35a8b2df5c751" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 145, + "startColumn": 36, + "charOffset": 4354, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 143, + "startColumn": 36, + "charOffset": 4290, + "charLength": 5, + "snippet": { + "text": "\t\tsubType = count;\n\t} else {\n\t\titemCount = std::max(1, count);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63e1ab6315b371ed73fb559bad096af010badc5d95ace661da2d1c7da5693b6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 148, + "startColumn": 2, + "charOffset": 4367, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 146, + "startColumn": 2, + "charOffset": 4362, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\twhile (itemCount > 0) {\n\t\tint32_t stackCount = std::min(it.stackSize, subType);\n\t\tstd::shared_ptr newItem = Item::CreateItem(itemId, stackCount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ad0764130898a05fed79aef5afaa0f83b81d18829b23182e8e740526cbab729" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'itemCount' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 148, + "startColumn": 9, + "charOffset": 4374, + "charLength": 9, + "snippet": { + "text": "itemCount" + } + }, + "contextRegion": { + "startLine": 146, + "startColumn": 9, + "charOffset": 4362, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\twhile (itemCount > 0) {\n\t\tint32_t stackCount = std::min(it.stackSize, subType);\n\t\tstd::shared_ptr newItem = Item::CreateItem(itemId, stackCount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b14d0321c54eaa38ce26f399f976120a3aad03a11a9e27bb436334599ba72aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 150, + "startColumn": 60, + "charOffset": 4515, + "charLength": 10, + "snippet": { + "text": "stackCount" + } + }, + "contextRegion": { + "startLine": 148, + "startColumn": 60, + "charOffset": 4366, + "charLength": 10, + "snippet": { + "text": "\twhile (itemCount > 0) {\n\t\tint32_t stackCount = std::min(it.stackSize, subType);\n\t\tstd::shared_ptr newItem = Item::CreateItem(itemId, stackCount);\n\t\tif (!newItem) {\n\t\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5b0d2cb8231bef838c1948ec796463b639bcd1b90a564c0cb016c2b005e4701" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 151, + "startColumn": 7, + "charOffset": 4534, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 149, + "startColumn": 7, + "charOffset": 4391, + "charLength": 1, + "snippet": { + "text": "\t\tint32_t stackCount = std::min(it.stackSize, subType);\n\t\tstd::shared_ptr newItem = Item::CreateItem(itemId, stackCount);\n\t\tif (!newItem) {\n\t\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0c876273aea099c96fd2a429d377ab8c14d97adc540ed3c8d47dd237fa7243c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 152, + "startColumn": 4, + "charOffset": 4549, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 4, + "charOffset": 4456, + "charLength": 15, + "snippet": { + "text": "\t\tstd::shared_ptr newItem = Item::CreateItem(itemId, stackCount);\n\t\tif (!newItem) {\n\t\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\t\tpushBoolean(L, false);\n\t\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c124c2456140eee5c1f132ca466cc4b67af5d8002169619e8b1886b4d2177469" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 169, + "startColumn": 23, + "charOffset": 4928, + "charLength": 3, + "snippet": { + "text": "env" + } + }, + "contextRegion": { + "startLine": 167, + "startColumn": 23, + "charOffset": 4849, + "charLength": 3, + "snippet": { + "text": "\t\tif (--itemCount == 0) {\n\t\t\tif (newItem->getParent()) {\n\t\t\t\tlua_pushnumber(L, env->addThing(newItem));\n\t\t\t} else {\n\t\t\t\t// stackable item stacked with existing object, newItem will be released" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "707ec03447495efd709a554b37526cb0680d8c69178cea405ee617879e4e7d69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 187, + "startColumn": 6, + "charOffset": 5334, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 185, + "startColumn": 6, + "charOffset": 5248, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr container = getScriptEnv()->getContainerByUID(uid);\n\tif (!container) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CONTAINER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b4e76cdb48304e81f45f6ecd0b3102557819a1e90ca34784729a9090efa019e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 188, + "startColumn": 3, + "charOffset": 5350, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 186, + "startColumn": 3, + "charOffset": 5249, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr container = getScriptEnv()->getContainerByUID(uid);\n\tif (!container) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CONTAINER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "395096c64893f7d0a8879bbb4b22d12d3778eff7ce5649eff98ff3efb1a9a670" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 194, + "startColumn": 6, + "charOffset": 5531, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 192, + "startColumn": 6, + "charOffset": 5452, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr depotLocker = container->getDepotLocker();\n\tif (!depotLocker) {\n\t\treportErrorFunc(\"Depot not found\");\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c0bd1e3445aa39eb6ef924d9c582836047f9f1f1080697af74dd40efce0e33d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 195, + "startColumn": 3, + "charOffset": 5549, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 193, + "startColumn": 3, + "charOffset": 5453, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr depotLocker = container->getDepotLocker();\n\tif (!depotLocker) {\n\t\treportErrorFunc(\"Depot not found\");\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d635260355ccb4f7baaacb71f3a9d0ec1cd9a282c5c6d7aa575a535e43428a70" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 200, + "startColumn": 20, + "charOffset": 5645, + "charLength": 11, + "snippet": { + "text": "depotLocker" + } + }, + "contextRegion": { + "startLine": 198, + "startColumn": 20, + "charOffset": 5622, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, depotLocker->getDepotId());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa5f0c1ce7b0784cf2caf428312fcf5e3f93c291725e7fb083fe5babd4430e37" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 207, + "startColumn": 20, + "charOffset": 5820, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 205, + "startColumn": 20, + "charOffset": 5740, + "charLength": 4, + "snippet": { + "text": "\t// getWorldTime()\n\tuint32_t time = g_game().getLightHour();\n\tlua_pushnumber(L, time);\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "560a0ee6de57aef3365711b54395b4b779c2558cd0984796079eb8b0cc466333" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 214, + "startColumn": 20, + "charOffset": 5987, + "charLength": 9, + "snippet": { + "text": "lightInfo" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 20, + "charOffset": 5895, + "charLength": 9, + "snippet": { + "text": "\t// getWorldLight()\n\tLightInfo lightInfo = g_game().getWorldLightInfo();\n\tlua_pushnumber(L, lightInfo.level);\n\tlua_pushnumber(L, lightInfo.color);\n\treturn 2;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72be80607f59a343739546abbea0c60d0b46564e1bcf0b41d6a77fc4c95c67c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 215, + "startColumn": 20, + "charOffset": 6024, + "charLength": 9, + "snippet": { + "text": "lightInfo" + } + }, + "contextRegion": { + "startLine": 213, + "startColumn": 20, + "charOffset": 5915, + "charLength": 9, + "snippet": { + "text": "\tLightInfo lightInfo = g_game().getWorldLightInfo();\n\tlua_pushnumber(L, lightInfo.level);\n\tlua_pushnumber(L, lightInfo.color);\n\treturn 2;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c1401be41e914f6087e382ab17aa7818635e4a1c44628286f6eab502c7d43f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 221, + "startColumn": 65, + "charOffset": 6196, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 219, + "startColumn": 65, + "charOffset": 6056, + "charLength": 4, + "snippet": { + "text": "int GlobalFunctions::luaGetWorldUpTime(lua_State* L) {\n\t// getWorldUpTime()\n\tuint64_t uptime = (OTSYS_TIME(true) - ProtocolStatus::start) / 1000;\n\tlua_pushnumber(L, uptime);\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8cc32311a24889a621a44278e79aebfd05a526ccd33663b482e28d5d31964c0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 222, + "startColumn": 20, + "charOffset": 6221, + "charLength": 6, + "snippet": { + "text": "uptime" + } + }, + "contextRegion": { + "startLine": 220, + "startColumn": 20, + "charOffset": 6111, + "charLength": 6, + "snippet": { + "text": "\t// getWorldUpTime()\n\tuint64_t uptime = (OTSYS_TIME(true) - ProtocolStatus::start) / 1000;\n\tlua_pushnumber(L, uptime);\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a5afa86e5086c6dafe123984aa8ce4996b3970482f488eb2a7f873bc2ddba7b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 222, + "startColumn": 20, + "charOffset": 6221, + "charLength": 6, + "snippet": { + "text": "uptime" + } + }, + "contextRegion": { + "startLine": 220, + "startColumn": 20, + "charOffset": 6111, + "charLength": 6, + "snippet": { + "text": "\t// getWorldUpTime()\n\tuint64_t uptime = (OTSYS_TIME(true) - ProtocolStatus::start) / 1000;\n\tlua_pushnumber(L, uptime);\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "726eca306acf00aae56c21cb1bcaca32483f3f6cf68144c4e339e61e52528bdf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 230, + "startColumn": 3, + "charOffset": 6445, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 228, + "startColumn": 3, + "charOffset": 6354, + "charLength": 15, + "snippet": { + "text": "\tScriptEnvironment* env = getScriptEnv();\n\tif (env->getScriptId() != EVENT_ID_LOADING) {\n\t\treportErrorFunc(\"This function can only be used while loading the script.\");\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "490fec2c1a5fdd0230f85e79cedac3376caad856f9a6a9d3571419da71d524b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'rowsExtArea' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 240, + "startColumn": 12, + "charOffset": 6777, + "charLength": 11, + "snippet": { + "text": "rowsExtArea" + } + }, + "contextRegion": { + "startLine": 238, + "startColumn": 12, + "charOffset": 6709, + "charLength": 11, + "snippet": { + "text": "\tint parameters = lua_gettop(L);\n\tif (parameters >= 2) {\n\t\tuint32_t rowsExtArea;\n\t\tstd::list listExtArea;\n\t\tif (!isTable(L, 2) || !getArea(L, listExtArea, rowsExtArea)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4df5119533460817707585c04bc9151fe3c318460496019ecde792861d13ecb8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 243, + "startColumn": 4, + "charOffset": 6893, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 4, + "charOffset": 6790, + "charLength": 15, + "snippet": { + "text": "\t\tstd::list listExtArea;\n\t\tif (!isTable(L, 2) || !getArea(L, listExtArea, rowsExtArea)) {\n\t\t\treportErrorFunc(\"Invalid extended area table.\");\n\t\t\tpushBoolean(L, false);\n\t\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ba2beb280c658253821c41ebe65cd4d7574d022db06744a94c54253e8e2aecf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 253, + "startColumn": 3, + "charOffset": 7152, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 251, + "startColumn": 3, + "charOffset": 7061, + "charLength": 15, + "snippet": { + "text": "\tstd::list listArea;\n\tif (!isTable(L, 1) || !getArea(L, listArea, rowsArea)) {\n\t\treportErrorFunc(\"Invalid area table.\");\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d461e0f42625cad0b7018b4d9fbc4e03252a89b435b0a81db007c9d126e1e18" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 259, + "startColumn": 20, + "charOffset": 7290, + "charLength": 6, + "snippet": { + "text": "areaId" + } + }, + "contextRegion": { + "startLine": 257, + "startColumn": 20, + "charOffset": 7232, + "charLength": 6, + "snippet": { + "text": "\n\tarea->setupArea(listArea, rowsArea);\n\tlua_pushnumber(L, areaId);\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b665bdbfdf6b509d64376d4f1d69eea3b284b22838a0f0e61e72617b9a1773d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 266, + "startColumn": 6, + "charOffset": 7522, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 264, + "startColumn": 6, + "charOffset": 7372, + "charLength": 1, + "snippet": { + "text": "\t// doAreaCombatHealth(cid, type, pos, area, min, max, effect[, origin = ORIGIN_SPELL])\n\tstd::shared_ptr creature = getCreature(L, 1);\n\tif (!creature && (!isNumber(L, 1) || getNumber(L, 1) != 0)) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1b37e1dc222c2a5faec0bcadb6507ef3f360f918921ec863bf6d7802b932469" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 267, + "startColumn": 3, + "charOffset": 7592, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 265, + "startColumn": 3, + "charOffset": 7460, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr creature = getCreature(L, 1);\n\tif (!creature && (!isNumber(L, 1) || getNumber(L, 1) != 0)) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06c584116840aeb8e547bfb65c50fd46a8acb40d83ea8c674f4bcecc3b7220b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 279, + "startColumn": 48, + "charOffset": 7994, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 277, + "startColumn": 48, + "charOffset": 7890, + "charLength": 1, + "snippet": { + "text": "\t\tCombatParams params;\n\t\tparams.combatType = combatType;\n\t\tparams.impactEffect = getNumber(L, 7);\n\n\t\tCombatDamage damage;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2111bf5fdb73ef58a8f205e9322fa136b170f38e5ba2b4bddb844cb7b252deaa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 282, + "startColumn": 46, + "charOffset": 8067, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 280, + "startColumn": 46, + "charOffset": 7998, + "charLength": 1, + "snippet": { + "text": "\n\t\tCombatDamage damage;\n\t\tdamage.origin = getNumber(L, 8, ORIGIN_SPELL);\n\t\tdamage.primary.type = combatType;\n\t\tdamage.primary.value = normal_random(getNumber(L, 6), getNumber(L, 5));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9199b173cd86824e61142f319df77a1b9873ef3b9930769893136d3040ceaaa4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 284, + "startColumn": 62, + "charOffset": 8182, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 282, + "startColumn": 62, + "charOffset": 8022, + "charLength": 1, + "snippet": { + "text": "\t\tdamage.origin = getNumber(L, 8, ORIGIN_SPELL);\n\t\tdamage.primary.type = combatType;\n\t\tdamage.primary.value = normal_random(getNumber(L, 6), getNumber(L, 5));\n\n\t\tdamage.instantSpellName = getString(L, 9);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4634d4fe0b5642b3c566c8308f9cdedf93ccb0fcdfb747d7994cc6d1ddbace9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 284, + "startColumn": 88, + "charOffset": 8208, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 282, + "startColumn": 88, + "charOffset": 8022, + "charLength": 1, + "snippet": { + "text": "\t\tdamage.origin = getNumber(L, 8, ORIGIN_SPELL);\n\t\tdamage.primary.type = combatType;\n\t\tdamage.primary.value = normal_random(getNumber(L, 6), getNumber(L, 5));\n\n\t\tdamage.instantSpellName = getString(L, 9);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "884c33ebf419bce5dbe24d23999bdef0b754f8da192009779eb36d0ce1f7d7aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 286, + "startColumn": 42, + "charOffset": 8255, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 284, + "startColumn": 42, + "charOffset": 8121, + "charLength": 1, + "snippet": { + "text": "\t\tdamage.primary.value = normal_random(getNumber(L, 6), getNumber(L, 5));\n\n\t\tdamage.instantSpellName = getString(L, 9);\n\t\tdamage.runeSpellName = getString(L, 10);\n\t\tif (creature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e61fbf699d4caf51005ba2b7783b1df44e51894811b6e11785ab738123228d64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 287, + "startColumn": 39, + "charOffset": 8297, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 285, + "startColumn": 39, + "charOffset": 8213, + "charLength": 2, + "snippet": { + "text": "\n\t\tdamage.instantSpellName = getString(L, 9);\n\t\tdamage.runeSpellName = getString(L, 10);\n\t\tif (creature) {\n\t\t\tif (auto player = creature->getPlayer()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bdf668781f54fa261faee20d1493b55fd10c34f3c2fe0d704b8ffa539f0e984" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 290, + "startColumn": 22, + "charOffset": 8387, + "charLength": 18, + "snippet": { + "text": "getCombatDataSpell" + } + }, + "contextRegion": { + "startLine": 288, + "startColumn": 22, + "charOffset": 8302, + "charLength": 18, + "snippet": { + "text": "\t\tif (creature) {\n\t\t\tif (auto player = creature->getPlayer()) {\n\t\t\t\tplayer->wheel()->getCombatDataSpell(damage);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d41a02dca2ab54509921d1aa1e2ae944828dae59731d23a817ddce0f7e5c823" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 297, + "startColumn": 3, + "charOffset": 8538, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 295, + "startColumn": 3, + "charOffset": 8502, + "charLength": 15, + "snippet": { + "text": "\t\tpushBoolean(L, true);\n\t} else {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_AREA_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6da150b3270fae46c13bde5ef5150f22d17474efa5d3fd4d97b1632ff663b0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 306, + "startColumn": 6, + "charOffset": 8847, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 304, + "startColumn": 6, + "charOffset": 8698, + "charLength": 1, + "snippet": { + "text": "\t// doTargetCombatHealth(cid, target, type, min, max, effect[, origin = ORIGIN_SPELL])\n\tstd::shared_ptr creature = getCreature(L, 1);\n\tif (!creature && (!isNumber(L, 1) || getNumber(L, 1) != 0)) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "154f27b297d984554544393c023589a62994365409d09b4d74d0a54103d133f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 307, + "startColumn": 3, + "charOffset": 8917, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 305, + "startColumn": 3, + "charOffset": 8785, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr creature = getCreature(L, 1);\n\tif (!creature && (!isNumber(L, 1) || getNumber(L, 1) != 0)) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "360c18a7795c09608fa53a1ed78350c1e1bd4328273e5ac36d30d863eb1549e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 313, + "startColumn": 6, + "charOffset": 9079, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 311, + "startColumn": 6, + "charOffset": 9018, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr target = getCreature(L, 2);\n\tif (!target) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d445f83fdd2c846aa5c6e738461db5a094ef4d0578eab8a6fc491c4574ab79c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 314, + "startColumn": 3, + "charOffset": 9092, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 312, + "startColumn": 3, + "charOffset": 9019, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr target = getCreature(L, 2);\n\tif (!target) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b6aa8d1eebfd10045b93a1b822e5140310509747faaf170990cf91ef8b4e970" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 323, + "startColumn": 47, + "charOffset": 9354, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 321, + "startColumn": 47, + "charOffset": 9253, + "charLength": 1, + "snippet": { + "text": "\tCombatParams params;\n\tparams.combatType = combatType;\n\tparams.impactEffect = getNumber(L, 6);\n\n\tCombatDamage damage;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e41d412051ebf8f848e12312b9e439d3d0858ca367a3772229aaa6505d5d27f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 326, + "startColumn": 45, + "charOffset": 9425, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 324, + "startColumn": 45, + "charOffset": 9358, + "charLength": 1, + "snippet": { + "text": "\n\tCombatDamage damage;\n\tdamage.origin = getNumber(L, 7, ORIGIN_SPELL);\n\tdamage.primary.type = combatType;\n\tdamage.primary.value = normal_random(getNumber(L, 4), getNumber(L, 5));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d32013341af344ef22ac478d58e652b9fd26a037f1889e843f11c6f2c743d9a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 328, + "startColumn": 87, + "charOffset": 9564, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 326, + "startColumn": 87, + "charOffset": 9381, + "charLength": 1, + "snippet": { + "text": "\tdamage.origin = getNumber(L, 7, ORIGIN_SPELL);\n\tdamage.primary.type = combatType;\n\tdamage.primary.value = normal_random(getNumber(L, 4), getNumber(L, 5));\n\n\tdamage.instantSpellName = getString(L, 9);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8d19e1f9ced8893d6995f8dffbf1e29da7375972a7ea3aa6ce735904f8384e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 330, + "startColumn": 41, + "charOffset": 9610, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 328, + "startColumn": 41, + "charOffset": 9478, + "charLength": 1, + "snippet": { + "text": "\tdamage.primary.value = normal_random(getNumber(L, 4), getNumber(L, 5));\n\n\tdamage.instantSpellName = getString(L, 9);\n\tdamage.runeSpellName = getString(L, 10);\n\tif (creature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6af808691c88a9db9bc44ce980466910e79da11144fd19d97f6297c48cd41ec7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 331, + "startColumn": 38, + "charOffset": 9651, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 329, + "startColumn": 38, + "charOffset": 9569, + "charLength": 2, + "snippet": { + "text": "\n\tdamage.instantSpellName = getString(L, 9);\n\tdamage.runeSpellName = getString(L, 10);\n\tif (creature) {\n\t\tif (auto player = creature->getPlayer()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3fa1c26bcb9516f89722e8512d747ec136d8d9cea1ba5e23e28240aecf46e2d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 334, + "startColumn": 21, + "charOffset": 9738, + "charLength": 18, + "snippet": { + "text": "getCombatDataSpell" + } + }, + "contextRegion": { + "startLine": 332, + "startColumn": 21, + "charOffset": 9656, + "charLength": 18, + "snippet": { + "text": "\tif (creature) {\n\t\tif (auto player = creature->getPlayer()) {\n\t\t\tplayer->wheel()->getCombatDataSpell(damage);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6b4dc2bbd75f3d97e7c2824abe7691ccc92a61464cd956549a1c3e158bf47da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 351, + "startColumn": 6, + "charOffset": 10271, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 349, + "startColumn": 6, + "charOffset": 10129, + "charLength": 1, + "snippet": { + "text": "\t// doAreaCombatMana(cid, pos, area, min, max, effect[, origin = ORIGIN_SPELL])\n\tstd::shared_ptr creature = getCreature(L, 1);\n\tif (!creature && (!isNumber(L, 1) || getNumber(L, 1) != 0)) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35b9d3dad1d3d547172ec85ce8fd523ed3ee4f709828bfeaaeac8950eb40f994" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 352, + "startColumn": 3, + "charOffset": 10341, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 350, + "startColumn": 3, + "charOffset": 10209, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr creature = getCreature(L, 1);\n\tif (!creature && (!isNumber(L, 1) || getNumber(L, 1) != 0)) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae079e3a6481ab6fb4ad594ac2b05451c5696752a2238f826caea39dbaf49c53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 361, + "startColumn": 48, + "charOffset": 10649, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 359, + "startColumn": 48, + "charOffset": 10551, + "charLength": 1, + "snippet": { + "text": "\tif (area || areaId == 0) {\n\t\tCombatParams params;\n\t\tparams.impactEffect = getNumber(L, 6);\n\n\t\tCombatDamage damage;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff1c038a99d214a49dd3bdae5cdc39f9d77523c9d6e952c559d3dd8f882b6dc3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 364, + "startColumn": 46, + "charOffset": 10722, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 362, + "startColumn": 46, + "charOffset": 10653, + "charLength": 1, + "snippet": { + "text": "\n\t\tCombatDamage damage;\n\t\tdamage.origin = getNumber(L, 7, ORIGIN_SPELL);\n\t\tdamage.primary.type = COMBAT_MANADRAIN;\n\t\tdamage.primary.value = normal_random(getNumber(L, 4), getNumber(L, 5));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a34ffcb3a10374ed8736bc1e0f818a3dec451bc214c069c61e1225fba3e07b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 366, + "startColumn": 88, + "charOffset": 10869, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 364, + "startColumn": 88, + "charOffset": 10677, + "charLength": 1, + "snippet": { + "text": "\t\tdamage.origin = getNumber(L, 7, ORIGIN_SPELL);\n\t\tdamage.primary.type = COMBAT_MANADRAIN;\n\t\tdamage.primary.value = normal_random(getNumber(L, 4), getNumber(L, 5));\n\n\t\tdamage.instantSpellName = getString(L, 8);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a83b4ccfbdcc80ef2873fcc59e598f80c7ac6b95331e15c0cb67515376d6d798" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 368, + "startColumn": 42, + "charOffset": 10916, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 366, + "startColumn": 42, + "charOffset": 10782, + "charLength": 1, + "snippet": { + "text": "\t\tdamage.primary.value = normal_random(getNumber(L, 4), getNumber(L, 5));\n\n\t\tdamage.instantSpellName = getString(L, 8);\n\t\tdamage.runeSpellName = getString(L, 9);\n\t\tif (creature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf5e8ff3421b4e18e64c7e30ff4cb11d6b40b4a25a2b909601c71fa7c508a46f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 369, + "startColumn": 39, + "charOffset": 10958, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 367, + "startColumn": 39, + "charOffset": 10874, + "charLength": 1, + "snippet": { + "text": "\n\t\tdamage.instantSpellName = getString(L, 8);\n\t\tdamage.runeSpellName = getString(L, 9);\n\t\tif (creature) {\n\t\t\tif (auto player = creature->getPlayer()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fc11b8d78bb282089c9c2eeae047105b30c90cbdd307f016ac8b4cd23e62289" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 372, + "startColumn": 22, + "charOffset": 11047, + "charLength": 18, + "snippet": { + "text": "getCombatDataSpell" + } + }, + "contextRegion": { + "startLine": 370, + "startColumn": 22, + "charOffset": 10962, + "charLength": 18, + "snippet": { + "text": "\t\tif (creature) {\n\t\t\tif (auto player = creature->getPlayer()) {\n\t\t\t\tplayer->wheel()->getCombatDataSpell(damage);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb5e191714e6229b848f35b5278afe2fb2a1b2d3889893083a3e2c23e4f4434d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 380, + "startColumn": 3, + "charOffset": 11218, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 378, + "startColumn": 3, + "charOffset": 11182, + "charLength": 15, + "snippet": { + "text": "\t\tpushBoolean(L, true);\n\t} else {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_AREA_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "947017a5e895dc90e6ddc6cf6e73fae22ed7b99e1e90768beddfe63f0767bcf7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 389, + "startColumn": 6, + "charOffset": 11516, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 387, + "startColumn": 6, + "charOffset": 11376, + "charLength": 1, + "snippet": { + "text": "\t// doTargetCombatMana(cid, target, min, max, effect[, origin = ORIGIN_SPELL)\n\tstd::shared_ptr creature = getCreature(L, 1);\n\tif (!creature && (!isNumber(L, 1) || getNumber(L, 1) != 0)) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f86411cf3dc3d1e78b4ff57760956940da226ce262322e180ebc1131d82edac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 390, + "startColumn": 3, + "charOffset": 11586, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 388, + "startColumn": 3, + "charOffset": 11454, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr creature = getCreature(L, 1);\n\tif (!creature && (!isNumber(L, 1) || getNumber(L, 1) != 0)) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "045c23e486deeaefbe503559e988fef7126df553a6b3733649d66d808f561cf5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 396, + "startColumn": 6, + "charOffset": 11748, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 394, + "startColumn": 6, + "charOffset": 11687, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr target = getCreature(L, 2);\n\tif (!target) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a160b76862733fbdc61d22699e71537f01d2bbbf911ceae7853d5febbbf453dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 397, + "startColumn": 3, + "charOffset": 11761, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 395, + "startColumn": 3, + "charOffset": 11688, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr target = getCreature(L, 2);\n\tif (!target) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a93fe7c568edfc1a246d57ca98ca2471fc33f7e6b97479e93bb6f8040d46feee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 406, + "startColumn": 47, + "charOffset": 12055, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 404, + "startColumn": 47, + "charOffset": 11926, + "charLength": 1, + "snippet": { + "text": "\tauto maxval = getNumber(L, 4);\n\tparams.aggressive = minval + maxval < 0;\n\tparams.impactEffect = getNumber(L, 5);\n\n\tCombatDamage damage;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8314cba35fc65fa26ef659969c9a27bd8e6c836bf635756148b6e0e3083d467" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 409, + "startColumn": 45, + "charOffset": 12126, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 407, + "startColumn": 45, + "charOffset": 12059, + "charLength": 1, + "snippet": { + "text": "\n\tCombatDamage damage;\n\tdamage.origin = getNumber(L, 6, ORIGIN_SPELL);\n\tdamage.primary.type = COMBAT_MANADRAIN;\n\tdamage.primary.value = normal_random(minval, maxval);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89eb109b33d16897631c15cd27d09171ccd199b2b0ab1301f61518477b0931e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 413, + "startColumn": 41, + "charOffset": 12281, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 411, + "startColumn": 41, + "charOffset": 12185, + "charLength": 1, + "snippet": { + "text": "\tdamage.primary.value = normal_random(minval, maxval);\n\n\tdamage.instantSpellName = getString(L, 7);\n\tdamage.runeSpellName = getString(L, 8);\n\tif (creature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5de577d13eafab0a2af9b659927cce30dc258d85b73579b1af419c914062ca84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 414, + "startColumn": 38, + "charOffset": 12322, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 412, + "startColumn": 38, + "charOffset": 12240, + "charLength": 1, + "snippet": { + "text": "\n\tdamage.instantSpellName = getString(L, 7);\n\tdamage.runeSpellName = getString(L, 8);\n\tif (creature) {\n\t\tif (auto player = creature->getPlayer()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41da26545ee65e7076d4d62f6dee6a6c0b3cee51a4a9a478d04011d57c1702f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 417, + "startColumn": 21, + "charOffset": 12408, + "charLength": 18, + "snippet": { + "text": "getCombatDataSpell" + } + }, + "contextRegion": { + "startLine": 415, + "startColumn": 21, + "charOffset": 12326, + "charLength": 18, + "snippet": { + "text": "\tif (creature) {\n\t\tif (auto player = creature->getPlayer()) {\n\t\t\tplayer->wheel()->getCombatDataSpell(damage);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0c33788d323b3d734dd018f0a401726784ae988fa11b7fcafbc43e9d2919fe6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 429, + "startColumn": 6, + "charOffset": 12723, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 427, + "startColumn": 6, + "charOffset": 12600, + "charLength": 1, + "snippet": { + "text": "\t// doAreaCombatCondition(cid, pos, area, condition, effect)\n\tstd::shared_ptr creature = getCreature(L, 1);\n\tif (!creature && (!isNumber(L, 1) || getNumber(L, 1) != 0)) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a454de28dd0051ffd0e8bc2776afd810927521704fd2b70b93880054e85143f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 430, + "startColumn": 3, + "charOffset": 12793, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 428, + "startColumn": 3, + "charOffset": 12661, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr creature = getCreature(L, 1);\n\tif (!creature && (!isNumber(L, 1) || getNumber(L, 1) != 0)) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "425b9dab6518d4bf34ce247e9c3ab8fa67c9940e4acc2a8f1ddddc1e84fc9087" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 436, + "startColumn": 6, + "charOffset": 12982, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 434, + "startColumn": 6, + "charOffset": 12894, + "charLength": 1, + "snippet": { + "text": "\n\tconst std::shared_ptr condition = getUserdataShared(L, 4);\n\tif (!condition) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CONDITION_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0c876273aea099c96fd2a429d377ab8c14d97adc540ed3c8d47dd237fa7243c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 437, + "startColumn": 3, + "charOffset": 12998, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 435, + "startColumn": 3, + "charOffset": 12895, + "charLength": 15, + "snippet": { + "text": "\tconst std::shared_ptr condition = getUserdataShared(L, 4);\n\tif (!condition) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CONDITION_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6fa855b0d98abd641b4923065fe7470bde9b6af0e50edce3a2e4bccc8abed039" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 446, + "startColumn": 48, + "charOffset": 13307, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 444, + "startColumn": 48, + "charOffset": 13209, + "charLength": 1, + "snippet": { + "text": "\tif (area || areaId == 0) {\n\t\tCombatParams params;\n\t\tparams.impactEffect = getNumber(L, 5);\n\t\tparams.conditionList.emplace_back(condition);\n\t\tCombat::doCombatCondition(creature, getPosition(L, 2), area, params);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "003194bf3854b138e7ad9bae3de05106ff7e6e278fb301265ea8010a5c9d46af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 447, + "startColumn": 24, + "charOffset": 13334, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 445, + "startColumn": 24, + "charOffset": 13237, + "charLength": 12, + "snippet": { + "text": "\t\tCombatParams params;\n\t\tparams.impactEffect = getNumber(L, 5);\n\t\tparams.conditionList.emplace_back(condition);\n\t\tCombat::doCombatCondition(creature, getPosition(L, 2), area, params);\n\t\tpushBoolean(L, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "445214ef8ae726bc5194381c74dcd5a124bb5a66eb4772a8b479f2117313448b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 451, + "startColumn": 3, + "charOffset": 13467, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 449, + "startColumn": 3, + "charOffset": 13431, + "charLength": 15, + "snippet": { + "text": "\t\tpushBoolean(L, true);\n\t} else {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_AREA_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49402b0b3d09cb48049c683e177098d1b25faa61f8999f39911461cea4e2fa9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 460, + "startColumn": 6, + "charOffset": 13752, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 458, + "startColumn": 6, + "charOffset": 13630, + "charLength": 1, + "snippet": { + "text": "\t// doTargetCombatCondition(cid, target, condition, effect)\n\tstd::shared_ptr creature = getCreature(L, 1);\n\tif (!creature && (!isNumber(L, 1) || getNumber(L, 1) != 0)) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca714c498e0006f779b90ec7dddcc2a149c97e10d96588523b9b1b528ae33a21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 461, + "startColumn": 3, + "charOffset": 13822, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 459, + "startColumn": 3, + "charOffset": 13690, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr creature = getCreature(L, 1);\n\tif (!creature && (!isNumber(L, 1) || getNumber(L, 1) != 0)) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2313143530ce1274d537434ee143603009a96ad94aee6843104d943cea500c7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 467, + "startColumn": 6, + "charOffset": 13984, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 465, + "startColumn": 6, + "charOffset": 13923, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr target = getCreature(L, 2);\n\tif (!target) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06ac9d884d64b2d229ec6c20ccb188a67fc227230dc35fc0fd889d01a7d18902" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 468, + "startColumn": 3, + "charOffset": 13997, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 466, + "startColumn": 3, + "charOffset": 13924, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr target = getCreature(L, 2);\n\tif (!target) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d635260355ccb4f7baaacb71f3a9d0ec1cd9a282c5c6d7aa575a535e43428a70" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 474, + "startColumn": 6, + "charOffset": 14186, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 472, + "startColumn": 6, + "charOffset": 14098, + "charLength": 1, + "snippet": { + "text": "\n\tconst std::shared_ptr condition = getUserdataShared(L, 3);\n\tif (!condition) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CONDITION_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b76cb07c33a0e846df778dab24da852971ca5e51f57cd8c26478a4288f2d1b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 475, + "startColumn": 3, + "charOffset": 14202, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 473, + "startColumn": 3, + "charOffset": 14099, + "charLength": 15, + "snippet": { + "text": "\tconst std::shared_ptr condition = getUserdataShared(L, 3);\n\tif (!condition) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CONDITION_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0ee16f5244f804fe263dd75306af33a259a3f138cae86daef620779be3d26b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 482, + "startColumn": 23, + "charOffset": 14399, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 480, + "startColumn": 23, + "charOffset": 14305, + "charLength": 12, + "snippet": { + "text": "\tCombatParams params;\n\tparams.impactEffect = getNumber(L, 4);\n\tparams.conditionList.emplace_back(condition->clone());\n\tCombat::doCombatCondition(creature, target, params);\n\tpushBoolean(L, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dcc0e567e5aab31297e4934e1beeb863eb6944f7d583f015acd1a0fc0ed3d288" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 491, + "startColumn": 6, + "charOffset": 14698, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 489, + "startColumn": 6, + "charOffset": 14583, + "charLength": 1, + "snippet": { + "text": "\t// doAreaCombatDispel(cid, pos, area, type, effect)\n\tstd::shared_ptr creature = getCreature(L, 1);\n\tif (!creature && (!isNumber(L, 1) || getNumber(L, 1) != 0)) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b76cb07c33a0e846df778dab24da852971ca5e51f57cd8c26478a4288f2d1b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 492, + "startColumn": 3, + "charOffset": 14768, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 490, + "startColumn": 3, + "charOffset": 14636, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr creature = getCreature(L, 1);\n\tif (!creature && (!isNumber(L, 1) || getNumber(L, 1) != 0)) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e802dc1850938de2afef960e8b6273e4ad13d34c8e0e83a7e1ffdbca9e7ae338" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 501, + "startColumn": 48, + "charOffset": 15076, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 499, + "startColumn": 48, + "charOffset": 14978, + "charLength": 1, + "snippet": { + "text": "\tif (area || areaId == 0) {\n\t\tCombatParams params;\n\t\tparams.impactEffect = getNumber(L, 5);\n\t\tparams.dispelType = getNumber(L, 4);\n\t\tCombat::doCombatDispel(creature, getPosition(L, 2), area, params);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76d6e3513e57723a6c700c9864a8bafda53034cf104f302ad00ea7719c04b35f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 507, + "startColumn": 3, + "charOffset": 15242, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 505, + "startColumn": 3, + "charOffset": 15206, + "charLength": 15, + "snippet": { + "text": "\t\tpushBoolean(L, true);\n\t} else {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_AREA_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc68ca437ee441b2b5aef33281c1d678eb8aa16c83380887d3e4ac37c2d6dd89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 516, + "startColumn": 6, + "charOffset": 15516, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 514, + "startColumn": 6, + "charOffset": 15402, + "charLength": 1, + "snippet": { + "text": "\t// doTargetCombatDispel(cid, target, type, effect)\n\tstd::shared_ptr creature = getCreature(L, 1);\n\tif (!creature && (!isNumber(L, 1) || getNumber(L, 1) != 0)) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e475fbc63429bbac5d7ff403903a929620561792acc2a99ea782ba718b9dd13d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 517, + "startColumn": 3, + "charOffset": 15586, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 515, + "startColumn": 3, + "charOffset": 15454, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr creature = getCreature(L, 1);\n\tif (!creature && (!isNumber(L, 1) || getNumber(L, 1) != 0)) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b788923a5d28ab8dc8118cf169db72f239a75374ed000a9bd3e264794384c88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 523, + "startColumn": 6, + "charOffset": 15748, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 521, + "startColumn": 6, + "charOffset": 15687, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr target = getCreature(L, 2);\n\tif (!target) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2486f35a17dae63bfc3479a4efe463ffe3eccc70f4937f1f33a20163281535bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 524, + "startColumn": 3, + "charOffset": 15761, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 522, + "startColumn": 3, + "charOffset": 15688, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr target = getCreature(L, 2);\n\tif (!target) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f30673788e33b8b996cc0ac288ec4c051fa041fbab9767615a7df643644b82b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 540, + "startColumn": 6, + "charOffset": 16259, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 538, + "startColumn": 6, + "charOffset": 16138, + "charLength": 1, + "snippet": { + "text": "\t// doChallengeCreature(cid, target, targetChangeCooldown)\n\tstd::shared_ptr creature = getCreature(L, 1);\n\tif (!creature) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "549856c47ffd047be76913387472a4976bdb98e6274bccdf0c1313e49d05dbf9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 541, + "startColumn": 3, + "charOffset": 16274, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 539, + "startColumn": 3, + "charOffset": 16197, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr creature = getCreature(L, 1);\n\tif (!creature) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8952b14bc8b5023a1222a725ecf3c452a00b95cc27509336a67e34eb73b8e88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 547, + "startColumn": 6, + "charOffset": 16436, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 545, + "startColumn": 6, + "charOffset": 16375, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr target = getCreature(L, 2);\n\tif (!target) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5434a1ec90eacc76854be57885f33c0c9ab4e275ac4bc398bbe540d129e0647a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 548, + "startColumn": 3, + "charOffset": 16449, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 546, + "startColumn": 3, + "charOffset": 16376, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr target = getCreature(L, 2);\n\tif (!target) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6fad717508c4f96dd0677beda9c949e156b48fb5978c049255a23a1a71d7af34" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 553, + "startColumn": 54, + "charOffset": 16604, + "charLength": 4, + "snippet": { + "text": "6000" + } + }, + "contextRegion": { + "startLine": 551, + "startColumn": 54, + "charOffset": 16547, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tint targetChangeCooldown = getNumber(L, 3, 6000);\n\t// This function must be defined to take and handle the targetChangeCooldown.\n\ttarget->challengeCreature(creature, targetChangeCooldown);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "181df4f50ff4ad1c3e1027546120fd3ca1dcbcef76feb599a83a55e4b1fdf301" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 555, + "startColumn": 10, + "charOffset": 16699, + "charLength": 17, + "snippet": { + "text": "challengeCreature" + } + }, + "contextRegion": { + "startLine": 553, + "startColumn": 10, + "charOffset": 16551, + "charLength": 17, + "snippet": { + "text": "\tint targetChangeCooldown = getNumber(L, 3, 6000);\n\t// This function must be defined to take and handle the targetChangeCooldown.\n\ttarget->challengeCreature(creature, targetChangeCooldown);\n\n\tpushBoolean(L, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec4532ff077c81be4b9f7e9ede63963b15264d496cd070bc77ec8df3e602bf71" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'luaAddEvent' has cognitive complexity of 52 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 561, + "startColumn": 22, + "charOffset": 16809, + "charLength": 11, + "snippet": { + "text": "luaAddEvent" + } + }, + "contextRegion": { + "startLine": 559, + "startColumn": 22, + "charOffset": 16785, + "charLength": 11, + "snippet": { + "text": "}\n\nint GlobalFunctions::luaAddEvent(lua_State* L) {\n\t// addEvent(callback, delay, ...)\n\tlua_State* globalState = g_luaEnvironment().getLuaState();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7db0965e71a1a8381c6694243be72bc1f5463626f095b76b244fc15892860330" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 564, + "startColumn": 2, + "charOffset": 16933, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 562, + "startColumn": 2, + "charOffset": 16837, + "charLength": 2, + "snippet": { + "text": "\t// addEvent(callback, delay, ...)\n\tlua_State* globalState = g_luaEnvironment().getLuaState();\n\tif (!globalState) {\n\t\treportErrorFunc(\"No valid script interface!\");\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00d83103920fabe2ebc990f5ff0b6d2fc8b74baaf7f73d805bb678603cf19279" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 564, + "startColumn": 6, + "charOffset": 16937, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 562, + "startColumn": 6, + "charOffset": 16837, + "charLength": 1, + "snippet": { + "text": "\t// addEvent(callback, delay, ...)\n\tlua_State* globalState = g_luaEnvironment().getLuaState();\n\tif (!globalState) {\n\t\treportErrorFunc(\"No valid script interface!\");\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59c9d508be32592e1c66ef015441b727c08e794ad399d0ff485736671a935211" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'lua_State *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 564, + "startColumn": 7, + "charOffset": 16938, + "charLength": 11, + "snippet": { + "text": "globalState" + } + }, + "contextRegion": { + "startLine": 562, + "startColumn": 7, + "charOffset": 16837, + "charLength": 11, + "snippet": { + "text": "\t// addEvent(callback, delay, ...)\n\tlua_State* globalState = g_luaEnvironment().getLuaState();\n\tif (!globalState) {\n\t\treportErrorFunc(\"No valid script interface!\");\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "764fdc7c9ea419ea04eff312fecec19d0e9af5436b8a7b06c8d77e31a1229b61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 565, + "startColumn": 3, + "charOffset": 16955, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 563, + "startColumn": 3, + "charOffset": 16872, + "charLength": 15, + "snippet": { + "text": "\tlua_State* globalState = g_luaEnvironment().getLuaState();\n\tif (!globalState) {\n\t\treportErrorFunc(\"No valid script interface!\");\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2eeef241c55ade9fd21594cd8f34386493b7f270ba713dc3468468d50f236f10" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 568, + "startColumn": 4, + "charOffset": 17042, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 566, + "startColumn": 4, + "charOffset": 17002, + "charLength": 4, + "snippet": { + "text": "\t\tpushBoolean(L, false);\n\t\treturn 1;\n\t} else if (globalState != L) {\n\t\tlua_xmove(L, globalState, lua_gettop(L));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66a6c4bbc53b797076fa786b0480467c1f7ef3704932da174ad84fe11de5bfb0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 574, + "startColumn": 3, + "charOffset": 17270, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 572, + "startColumn": 3, + "charOffset": 17119, + "charLength": 15, + "snippet": { + "text": "\tint parameters = lua_gettop(globalState);\n\tif (!isFunction(globalState, -parameters)) { // -parameters means the first parameter from left to right\n\t\treportErrorFunc(\"callback parameter should be a function.\");\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b2244e1e20f319554da078ab9888fcfb1afe4ee57c6c1faa917fb8b6fd1740b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 581, + "startColumn": 3, + "charOffset": 17570, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 579, + "startColumn": 3, + "charOffset": 17372, + "charLength": 3, + "snippet": { + "text": "\tif (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS, __FUNCTION__) || g_configManager().getBoolean(CONVERT_UNSAFE_SCRIPTS, __FUNCTION__)) {\n\t\tstd::vector> indexes;\n\t\tfor (int i = 3; i <= parameters; ++i) {\n\t\t\tif (lua_getmetatable(globalState, i) == 0) {\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9382c5053285fbbf503353c4d2e18515cd03f690587604bd8a35a92c96bd6ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'parameters' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 581, + "startColumn": 19, + "charOffset": 17586, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 579, + "startColumn": 19, + "charOffset": 17372, + "charLength": 1, + "snippet": { + "text": "\tif (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS, __FUNCTION__) || g_configManager().getBoolean(CONVERT_UNSAFE_SCRIPTS, __FUNCTION__)) {\n\t\tstd::vector> indexes;\n\t\tfor (int i = 3; i <= parameters; ++i) {\n\t\t\tif (lua_getmetatable(globalState, i) == 0) {\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6183e6e7cb49d3c3b2fb974b76d1c3735c760ce94a9501e92e3193e8ba2059b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-emplace", + "ruleIndex": 573, + "kind": "fail", + "level": "warning", + "message": { + "text": "use emplace_back instead of push_back" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 589, + "startColumn": 13, + "charOffset": 17830, + "charLength": 9, + "snippet": { + "text": "push_back" + } + }, + "contextRegion": { + "startLine": 587, + "startColumn": 13, + "charOffset": 17706, + "charLength": 9, + "snippet": { + "text": "\t\t\tLuaData_t type = getNumber(L, -1);\n\t\t\tif (type != LuaData_t::Unknown && type <= LuaData_t::Npc) {\n\t\t\t\tindexes.push_back({ i, type });\n\t\t\t}\n\t\t\tlua_pop(globalState, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7ee84b0f40c000d20e58e4bc2ab53492f61689126035dc03c36504b32d76713" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 603, + "startColumn": 5, + "charOffset": 18131, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 601, + "startColumn": 5, + "charOffset": 18120, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tfor (const auto &entry : indexes) {\n\t\t\t\t\tif (entry == indexes.front()) {\n\t\t\t\t\t\twarningString += ' ';" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e1d7f017e9654aa4121ead75303717f6e528b8bf8b050f00ad4e725f3125c64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 621, + "startColumn": 5, + "charOffset": 18557, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 619, + "startColumn": 5, + "charOffset": 18546, + "charLength": 15, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\treportErrorFunc(warningString);\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a97ec76bf175575909918d2aba70a22cfce885561a30289883d04460264321cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 625, + "startColumn": 5, + "charOffset": 18676, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 623, + "startColumn": 5, + "charOffset": 18594, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tif (g_configManager().getBoolean(CONVERT_UNSAFE_SCRIPTS, __FUNCTION__)) {\n\t\t\t\tfor (const auto &entry : indexes) {\n\t\t\t\t\tswitch (entry.second) {\n\t\t\t\t\t\tcase LuaData_t::Item:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b76f320a184cc4b4b8b67052e6ac205c350824b1132a1f5d1665e7be77fb6a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 628, + "startColumn": 7, + "charOffset": 18775, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 626, + "startColumn": 7, + "charOffset": 18712, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\tswitch (entry.second) {\n\t\t\t\t\t\tcase LuaData_t::Item:\n\t\t\t\t\t\tcase LuaData_t::Container:\n\t\t\t\t\t\tcase LuaData_t::Teleport: {\n\t\t\t\t\t\t\tlua_getglobal(globalState, \"Item\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9cd87c019f56c38d05d2ee8ad6fa7d5d43f6b68c6655b232da7aba7e7d4c831c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 629, + "startColumn": 7, + "charOffset": 18808, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 627, + "startColumn": 7, + "charOffset": 18741, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\t\tcase LuaData_t::Item:\n\t\t\t\t\t\tcase LuaData_t::Container:\n\t\t\t\t\t\tcase LuaData_t::Teleport: {\n\t\t\t\t\t\t\tlua_getglobal(globalState, \"Item\");\n\t\t\t\t\t\t\tlua_getfield(globalState, -1, \"getUniqueId\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "801a652378593cb3bd1d78d0dfc105db7daa35e8d15ab866d08fb4c0c01cefa1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 635, + "startColumn": 7, + "charOffset": 18990, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 633, + "startColumn": 7, + "charOffset": 18946, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\t\t}\n\t\t\t\t\t\tcase LuaData_t::Player:\n\t\t\t\t\t\tcase LuaData_t::Monster:\n\t\t\t\t\t\tcase LuaData_t::Npc: {\n\t\t\t\t\t\t\tlua_getglobal(globalState, \"Creature\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f41a049cb05143fa6615c9fc858f1acaa415eaab6b18bcec75bb746e6014a2ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 636, + "startColumn": 7, + "charOffset": 19021, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 634, + "startColumn": 7, + "charOffset": 18954, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\t\tcase LuaData_t::Player:\n\t\t\t\t\t\tcase LuaData_t::Monster:\n\t\t\t\t\t\tcase LuaData_t::Npc: {\n\t\t\t\t\t\t\tlua_getglobal(globalState, \"Creature\");\n\t\t\t\t\t\t\tlua_getfield(globalState, -1, \"getId\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0dad6e1f43707f1a1323fc5d1cceba9b10d53f0568f6e6fc61988ab640134e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 654, + "startColumn": 2, + "charOffset": 19405, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 652, + "startColumn": 2, + "charOffset": 19373, + "charLength": 3, + "snippet": { + "text": "\n\tLuaTimerEventDesc eventDesc;\n\tfor (int i = 0; i < parameters - 2; ++i) { // -2 because addEvent needs at least two parameters\n\t\teventDesc.parameters.push_back(luaL_ref(globalState, LUA_REGISTRYINDEX));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6cd221ae253e89ef0b8ef579f338ebbbecede6c4807cf91705dd56686809cbd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'parameters' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 654, + "startColumn": 18, + "charOffset": 19421, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 652, + "startColumn": 18, + "charOffset": 19373, + "charLength": 1, + "snippet": { + "text": "\n\tLuaTimerEventDesc eventDesc;\n\tfor (int i = 0; i < parameters - 2; ++i) { // -2 because addEvent needs at least two parameters\n\t\teventDesc.parameters.push_back(luaL_ref(globalState, LUA_REGISTRYINDEX));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6937a6451c5d75fd5c599aa343d415cb3249b9968488bb6840e6e55e4644ceed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 658, + "startColumn": 38, + "charOffset": 19618, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 656, + "startColumn": 38, + "charOffset": 19577, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tuint32_t delay = std::max(100, getNumber(globalState, 2));\n\tlua_pop(globalState, 1);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "536646b47ec767fbbe6b54beedb7157db70737896fbb8cee20a750f1acc404a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 666, + "startColumn": 22, + "charOffset": 19976, + "charLength": 12, + "snippet": { + "text": "g_dispatcher" + } + }, + "contextRegion": { + "startLine": 664, + "startColumn": 22, + "charOffset": 19891, + "charLength": 12, + "snippet": { + "text": "\n\tauto &lastTimerEventId = g_luaEnvironment().lastEventTimerId;\n\teventDesc.eventId = g_dispatcher().scheduleEvent(\n\t\tdelay,\n\t\t[lastTimerEventId] { g_luaEnvironment().executeTimerEvent(lastTimerEventId); }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1261945b2c447e15a6fe219d05072c96af6c1ed7ecad5773919badda862fee24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 672, + "startColumn": 33, + "charOffset": 20172, + "charLength": 7, + "snippet": { + "text": "emplace" + } + }, + "contextRegion": { + "startLine": 670, + "startColumn": 33, + "charOffset": 20135, + "charLength": 7, + "snippet": { + "text": "\t);\n\n\tg_luaEnvironment().timerEvents.emplace(lastTimerEventId, std::move(eventDesc));\n\tlua_pushnumber(L, lastTimerEventId++);\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "256d6a42031453880ee933a59b686a25ee7b9dcfb50f6c2b7e8047d77e151d6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 673, + "startColumn": 20, + "charOffset": 20240, + "charLength": 16, + "snippet": { + "text": "lastTimerEventId" + } + }, + "contextRegion": { + "startLine": 671, + "startColumn": 20, + "charOffset": 20139, + "charLength": 16, + "snippet": { + "text": "\n\tg_luaEnvironment().timerEvents.emplace(lastTimerEventId, std::move(eventDesc));\n\tlua_pushnumber(L, lastTimerEventId++);\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "273130299eb4f8225a4c4493ec6ebd9324c6d494431389838a83358b2378423d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 680, + "startColumn": 6, + "charOffset": 20413, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 678, + "startColumn": 6, + "charOffset": 20325, + "charLength": 1, + "snippet": { + "text": "\t// stopEvent(eventid)\n\tlua_State* globalState = g_luaEnvironment().getLuaState();\n\tif (!globalState) {\n\t\treportErrorFunc(\"No valid script interface!\");\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "624c27fbbfba78d5cdc795865db8dbe2cd66401e3f0d387c189b36f88aa24449" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'lua_State *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 680, + "startColumn": 7, + "charOffset": 20414, + "charLength": 11, + "snippet": { + "text": "globalState" + } + }, + "contextRegion": { + "startLine": 678, + "startColumn": 7, + "charOffset": 20325, + "charLength": 11, + "snippet": { + "text": "\t// stopEvent(eventid)\n\tlua_State* globalState = g_luaEnvironment().getLuaState();\n\tif (!globalState) {\n\t\treportErrorFunc(\"No valid script interface!\");\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51cbf456057beb9d89b47b9961608ef454c905463db579b018b821924ab0196b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 681, + "startColumn": 3, + "charOffset": 20431, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 679, + "startColumn": 3, + "charOffset": 20348, + "charLength": 15, + "snippet": { + "text": "\tlua_State* globalState = g_luaEnvironment().getLuaState();\n\tif (!globalState) {\n\t\treportErrorFunc(\"No valid script interface!\");\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c87c7eb48958f8399785300a095d3cc71ac5884e60145f42334eb23d53edaf7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 696, + "startColumn": 14, + "charOffset": 20803, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 694, + "startColumn": 14, + "charOffset": 20730, + "charLength": 5, + "snippet": { + "text": "\n\tLuaTimerEventDesc timerEventDesc = std::move(it->second);\n\ttimerEvents.erase(it);\n\n\tg_dispatcher().stopEvent(timerEventDesc.eventId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ddd43e44f3daabc8fbb42811cc65d034ccc0c4690ab4408b24b48a56f3ef943d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 701, + "startColumn": 2, + "charOffset": 20938, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 699, + "startColumn": 2, + "charOffset": 20866, + "charLength": 3, + "snippet": { + "text": "\tluaL_unref(globalState, LUA_REGISTRYINDEX, timerEventDesc.function);\n\n\tfor (auto parameter : timerEventDesc.parameters) {\n\t\tluaL_unref(globalState, LUA_REGISTRYINDEX, parameter);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d823a327920cc1ff72238bf7f7f78ced5fc5de2e9f024e528851ca50afd1c57" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 717, + "startColumn": 20, + "charOffset": 21301, + "charLength": 6, + "snippet": { + "text": "g_game" + } + }, + "contextRegion": { + "startLine": 715, + "startColumn": 20, + "charOffset": 21232, + "charLength": 6, + "snippet": { + "text": "\nint GlobalFunctions::luaCleanMap(lua_State* L) {\n\tlua_pushnumber(L, g_game().map.clean());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "91ae1eac0a33221ee32fa55f0a6b61c5555f1772f6c278b4ce00b5688975ae28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 723, + "startColumn": 2, + "charOffset": 21411, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 721, + "startColumn": 2, + "charOffset": 21338, + "charLength": 15, + "snippet": { + "text": "int GlobalFunctions::luaDebugPrint(lua_State* L) {\n\t// debugPrint(text)\n\treportErrorFunc(getString(L, -1));\n\treturn 0;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee7318e688bc9b9c7ddb1df566f09360f853bc8c34cae4f6194b1edbc1770065" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 730, + "startColumn": 6, + "charOffset": 21577, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 728, + "startColumn": 6, + "charOffset": 21508, + "charLength": 1, + "snippet": { + "text": "\t// isInWar(cid, target)\n\tconst auto &player = getPlayer(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(fmt::format(\"{} - Player\", getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND)));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0cab2ff5c884189f74b8745e26cda5da776b01d2268aa1a31c13914f9b568218" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 731, + "startColumn": 3, + "charOffset": 21590, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 729, + "startColumn": 3, + "charOffset": 21533, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getPlayer(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(fmt::format(\"{} - Player\", getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND)));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff4f462e0f788b9b9f678886541693f7ab36c69d5a7798c326867b3927df3471" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 737, + "startColumn": 6, + "charOffset": 21768, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 735, + "startColumn": 6, + "charOffset": 21717, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto &targetPlayer = getPlayer(L, 2);\n\tif (!targetPlayer) {\n\t\treportErrorFunc(fmt::format(\"{} - TargetPlayer\", getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND)));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6b55bd5199e3924d4f04a5e96fb9f0b713a461f2dcb8d011b8ce5962c5bfbfe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 738, + "startColumn": 3, + "charOffset": 21787, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 736, + "startColumn": 3, + "charOffset": 21718, + "charLength": 15, + "snippet": { + "text": "\tconst auto &targetPlayer = getPlayer(L, 2);\n\tif (!targetPlayer) {\n\t\treportErrorFunc(fmt::format(\"{} - TargetPlayer\", getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND)));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0bb97d2e178d687baa6d081fa7e73c6761cf53d48938157c904f1701c31e51ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 764, + "startColumn": 6, + "charOffset": 22508, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 762, + "startColumn": 6, + "charOffset": 22395, + "charLength": 1, + "snippet": { + "text": "\tuint16_t channelId = getNumber(L, 1);\n\tconst auto &channel = g_chat().getChannelById(channelId);\n\tif (!channel) {\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb71eba5845229de77639c1aaac6939038a07bf31ca3f0a5a5a1d5ed4aa68454" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 780, + "startColumn": 6, + "charOffset": 22956, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 778, + "startColumn": 6, + "charOffset": 22842, + "charLength": 1, + "snippet": { + "text": "\tuint32_t guildId = getNumber(L, 1);\n\tconst auto &channel = g_chat().getGuildChannelById(guildId);\n\tif (!channel) {\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b562f2a14aff500e450a427f0ddfbe538c55d2cc94128a5abd091ca2ffc48d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 794, + "startColumn": 2, + "charOffset": 23248, + "charLength": 16, + "snippet": { + "text": "lua_getmetatable" + } + }, + "contextRegion": { + "startLine": 792, + "startColumn": 2, + "charOffset": 23174, + "charLength": 16, + "snippet": { + "text": "int GlobalFunctions::luaIsType(lua_State* L) {\n\t// isType(derived, base)\n\tlua_getmetatable(L, -2);\n\tlua_getmetatable(L, -2);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d027295ee602d81a602a99d9e4a2b653df5b930547a585490a73d340571aeb5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 795, + "startColumn": 2, + "charOffset": 23274, + "charLength": 16, + "snippet": { + "text": "lua_getmetatable" + } + }, + "contextRegion": { + "startLine": 793, + "startColumn": 2, + "charOffset": 23221, + "charLength": 16, + "snippet": { + "text": "\t// isType(derived, base)\n\tlua_getmetatable(L, -2);\n\tlua_getmetatable(L, -2);\n\n\tlua_rawgeti(L, -2, 'p');" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6293bf1837e50ad9087de5a4f66559eb0cf6886ee0c84bfce09d62486acfc5f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 805, + "startColumn": 2, + "charOffset": 23534, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 803, + "startColumn": 2, + "charOffset": 23451, + "charLength": 3, + "snippet": { + "text": "\tlua_rawgeti(L, -3, 'p');\n\tuint_fast8_t parentsA = getNumber(L, 1);\n\tfor (uint_fast8_t i = parentsA; i < parentsB; ++i) {\n\t\tlua_getfield(L, -3, \"__index\");\n\t\tlua_replace(L, -4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2aa741e96461c4327287f56aa78a1e374515c7fa746bdc73bb67587c104aff06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'i' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 805, + "startColumn": 34, + "charOffset": 23566, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 803, + "startColumn": 34, + "charOffset": 23451, + "charLength": 1, + "snippet": { + "text": "\tlua_rawgeti(L, -3, 'p');\n\tuint_fast8_t parentsA = getNumber(L, 1);\n\tfor (uint_fast8_t i = parentsA; i < parentsB; ++i) {\n\t\tlua_getfield(L, -3, \"__index\");\n\t\tlua_replace(L, -4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aea9a2a049d6dc60e5eda42bb05db75310b5d929f358a2f0da7db9fd34f602a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int64_t' (aka 'long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 831, + "startColumn": 20, + "charOffset": 24181, + "charLength": 10, + "snippet": { + "text": "OTSYS_TIME" + } + }, + "contextRegion": { + "startLine": 829, + "startColumn": 20, + "charOffset": 24094, + "charLength": 10, + "snippet": { + "text": "int GlobalFunctions::luaSystemTime(lua_State* L) {\n\t// systemTime()\n\tlua_pushnumber(L, OTSYS_TIME());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7f203b5ee7e65b79b127c14a93bfdaa04345ccc2914ed2bdd380034133131e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 831, + "startColumn": 20, + "charOffset": 24181, + "charLength": 10, + "snippet": { + "text": "OTSYS_TIME" + } + }, + "contextRegion": { + "startLine": 829, + "startColumn": 20, + "charOffset": 24094, + "charLength": 10, + "snippet": { + "text": "int GlobalFunctions::luaSystemTime(lua_State* L) {\n\t// systemTime()\n\tlua_pushnumber(L, OTSYS_TIME());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7202459384857820ad8daa0a47862325365c37fc394ded6cf7b8b86d5de6c29" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 838, + "startColumn": 46, + "charOffset": 24399, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 836, + "startColumn": 46, + "charOffset": 24276, + "charLength": 4, + "snippet": { + "text": "\t// getFormattedTimeRemaining(time)\n\ttime_t time = getNumber(L, 1);\n\tlua_pushstring(L, getFormattedTimeRemaining(time).c_str());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17df262dcc718819ba8493f392e089009b27294aab731759f4240d30fd9f5431" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 845, + "startColumn": 14, + "charOffset": 24570, + "charLength": 8, + "snippet": { + "text": "__func__" + } + }, + "contextRegion": { + "startLine": 843, + "startColumn": 14, + "charOffset": 24481, + "charLength": 8, + "snippet": { + "text": "\t// reportError(errorDescription)\n\tauto errorDescription = getString(L, 1);\n\treportError(__func__, errorDescription, true);\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51d3158262c12d0e77ecf01e289e15ac7ee1d41a267f7d515567f332d095d5eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 851, + "startColumn": 2, + "charOffset": 24726, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 849, + "startColumn": 2, + "charOffset": 24619, + "charLength": 3, + "snippet": { + "text": "bool GlobalFunctions::getArea(lua_State* L, std::list &list, uint32_t &rows) {\n\tlua_pushnil(L);\n\tfor (rows = 0; lua_next(L, -2) != 0; ++rows) {\n\t\tif (!isTable(L, -1)) {\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "544faaa78d42d3be342ee17855dbe4562475396caff67c45fce7b894e27b8df0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/global_functions.cpp" + }, + "region": { + "startLine": 857, + "startColumn": 3, + "charOffset": 24840, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 855, + "startColumn": 3, + "charOffset": 24819, + "charLength": 5, + "snippet": { + "text": "\n\t\tlua_pushnil(L);\n\t\twhile (lua_next(L, -2) != 0) {\n\t\t\tif (!isNumber(L, -1)) {\n\t\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a35717c9dc3d2446d68c71aeebc8a471bb2dd8cabf3c0390195867517d57b35b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-macro-usage", + "ruleIndex": 493, + "kind": "fail", + "level": "warning", + "message": { + "text": "function-like macro 'registerMagicEnum' used; consider a 'constexpr' template function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 24, + "startColumn": 9, + "charOffset": 802, + "charLength": 17, + "snippet": { + "text": "registerMagicEnum" + } + }, + "contextRegion": { + "startLine": 22, + "startColumn": 9, + "charOffset": 753, + "charLength": 17, + "snippet": { + "text": "#include \"enums/account_group_type.hpp\"\n\n#define registerMagicEnum(luaState, enumClassType) \\\n\t{ \\\n\t\tauto number = magic_enum::enum_integer(enumClassType); \\" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa68028cefe17b0812e6aee7b0e24ccc7dafbd72dd579678419d7f045fcc0261" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-macro-usage", + "ruleIndex": 493, + "kind": "fail", + "level": "warning", + "message": { + "text": "function-like macro 'registerMagicEnumNamespace' used; consider a 'constexpr' template function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 32, + "startColumn": 9, + "charOffset": 1190, + "charLength": 26, + "snippet": { + "text": "registerMagicEnumNamespace" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 9, + "charOffset": 1172, + "charLength": 26, + "snippet": { + "text": "\tvoid(0)\n\n#define registerMagicEnumNamespace(luaState, luaNamespace, enumClassType) \\\n\t{ \\\n\t\tauto number = magic_enum::enum_integer(enumClassType); \\" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8de9b7ae52e74e8e97ec0956cd11ad18d5e6ac71ec036ac575f33fa39b0dbea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-macro-usage", + "ruleIndex": 493, + "kind": "fail", + "level": "warning", + "message": { + "text": "function-like macro 'registerEnum' used; consider a 'constexpr' template function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 40, + "startColumn": 9, + "charOffset": 1746, + "charLength": 12, + "snippet": { + "text": "registerEnum" + } + }, + "contextRegion": { + "startLine": 38, + "startColumn": 9, + "charOffset": 1728, + "charLength": 12, + "snippet": { + "text": "\tvoid(0)\n\n#define registerEnum(L, value) \\\n\t{ \\\n\t\tstd::string enumName = #value; \\" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34850459f831fee48d2629809cdd509d285467487a9006f7705fbcadc0c937cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-macro-usage", + "ruleIndex": 493, + "kind": "fail", + "level": "warning", + "message": { + "text": "function-like macro 'registerEnumNamespace' used; consider a 'constexpr' template function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 57, + "startColumn": 9, + "charOffset": 2849, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 55, + "startColumn": 9, + "charOffset": 2762, + "charLength": 21, + "snippet": { + "text": "is \"SILENCE\", the registered full name will be \"SOUND_EFFECT_TYPE_SILENCE\".\n*/\n#define registerEnumNamespace(L, luaNamespace, enumValue) \\\n\t{ \\\n\t\tstd::string enumName = #enumValue; \\" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb4e1c8d79f5867a0c09912b843225683cbecf1d5ee8ab15011ad811ae97736d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 295, + "startColumn": 2, + "charOffset": 10492, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 293, + "startColumn": 2, + "charOffset": 10438, + "charLength": 3, + "snippet": { + "text": "\nvoid LuaEnums::initCombatParamEnums(lua_State* L) {\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnum(L, value);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a0da873d8aa16bffaf44fdd9a1e46fbf76b670a1a456c755a3a8f3c4aae4940" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 296, + "startColumn": 3, + "charOffset": 10556, + "charLength": 17, + "snippet": { + "text": "registerMagicEnum" + } + }, + "contextRegion": { + "startLine": 294, + "startColumn": 3, + "charOffset": 10439, + "charLength": 17, + "snippet": { + "text": "void LuaEnums::initCombatParamEnums(lua_State* L) {\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnum(L, value);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ee9b103578f9bd72a7fffdd993678cff1022497576f28b6f4f34d2594c219ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 333, + "startColumn": 2, + "charOffset": 11647, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 331, + "startColumn": 2, + "charOffset": 11595, + "charLength": 3, + "snippet": { + "text": "\nvoid LuaEnums::initConditionEnums(lua_State* L) {\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnum(L, value);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89df684bc9199de211f95ba5240562ada33aec9a135f65ba259c20d7d8987b04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 334, + "startColumn": 3, + "charOffset": 11713, + "charLength": 17, + "snippet": { + "text": "registerMagicEnum" + } + }, + "contextRegion": { + "startLine": 332, + "startColumn": 3, + "charOffset": 11596, + "charLength": 17, + "snippet": { + "text": "void LuaEnums::initConditionEnums(lua_State* L) {\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnum(L, value);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e676d591298ef27e2dff2b9b91bf47e0d723241611c95a0e089132e74e41f295" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 433, + "startColumn": 2, + "charOffset": 16305, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 431, + "startColumn": 2, + "charOffset": 16198, + "charLength": 3, + "snippet": { + "text": "void LuaEnums::initAttributeConditionSubIdEnums(lua_State* L) {\n\tstd::string luaNamespace = \"AttrSubId_\";\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnumNamespace(L, luaNamespace, value);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "448fcf39d397a845f125d308221376d5670b8ff7ab877d14f8cad8bc2298af3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 434, + "startColumn": 3, + "charOffset": 16367, + "charLength": 26, + "snippet": { + "text": "registerMagicEnumNamespace" + } + }, + "contextRegion": { + "startLine": 432, + "startColumn": 3, + "charOffset": 16262, + "charLength": 26, + "snippet": { + "text": "\tstd::string luaNamespace = \"AttrSubId_\";\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnumNamespace(L, luaNamespace, value);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eaf1d238147fe89dd24bbc95f6d077ea7da7b81bb20422eb818d5b9bdff7d67b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 440, + "startColumn": 2, + "charOffset": 16520, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 438, + "startColumn": 2, + "charOffset": 16425, + "charLength": 21, + "snippet": { + "text": "void LuaEnums::initConcoctionsEnum(lua_State* L) {\n\tstd::string luaNamespace = \"Concoction_\";\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::KooldownAid);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::StaminaExtension);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::StrikeEnhancement);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45a074fc1d774d9b4e23f612b2be88317bf261758926c33b210ba967e490d1cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 441, + "startColumn": 2, + "charOffset": 16588, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 439, + "startColumn": 2, + "charOffset": 16476, + "charLength": 21, + "snippet": { + "text": "\tstd::string luaNamespace = \"Concoction_\";\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::KooldownAid);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::StaminaExtension);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::StrikeEnhancement);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::CharmUpgrade);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10443931e1cc3324ee0d61862c42bde5a3ba72f564f0318092c1f277260e6d04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 442, + "startColumn": 2, + "charOffset": 16661, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 440, + "startColumn": 2, + "charOffset": 16519, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, luaNamespace, Concoction_t::KooldownAid);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::StaminaExtension);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::StrikeEnhancement);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::CharmUpgrade);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::WealthDuplex);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02578e53e320d964e0431fc7f82eba0a0025e868bb91d96d201a4167689ab3c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 443, + "startColumn": 2, + "charOffset": 16735, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 441, + "startColumn": 2, + "charOffset": 16587, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, luaNamespace, Concoction_t::StaminaExtension);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::StrikeEnhancement);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::CharmUpgrade);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::WealthDuplex);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::BestiaryBetterment);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b20250b394580b56e9b874b0cb3051ed5461f0be4d85b72371cb50bdc24ec8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 444, + "startColumn": 2, + "charOffset": 16804, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 442, + "startColumn": 2, + "charOffset": 16660, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, luaNamespace, Concoction_t::StrikeEnhancement);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::CharmUpgrade);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::WealthDuplex);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::BestiaryBetterment);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::FireResilience);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a3a21eb6b6be7ff3cb7c4b6b676beb2ed364015fda85a9ab01e444769032bff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 445, + "startColumn": 2, + "charOffset": 16873, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 443, + "startColumn": 2, + "charOffset": 16734, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, luaNamespace, Concoction_t::CharmUpgrade);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::WealthDuplex);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::BestiaryBetterment);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::FireResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::IceResilience);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2cc5c3d5fd3717b38d803310105370332b4c71214ec484f1bf95ff36084e7df5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 446, + "startColumn": 2, + "charOffset": 16948, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 444, + "startColumn": 2, + "charOffset": 16803, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, luaNamespace, Concoction_t::WealthDuplex);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::BestiaryBetterment);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::FireResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::IceResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::EarthResilience);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d733530d8504b8a4ac6ffa1d32d1f2feb4fafc8d2770957bd353b0ef02bacfb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 447, + "startColumn": 2, + "charOffset": 17019, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 445, + "startColumn": 2, + "charOffset": 16872, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, luaNamespace, Concoction_t::BestiaryBetterment);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::FireResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::IceResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::EarthResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::EnergyResilience);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2fba90e1ccf7c550a07855c374c8ed35fb0184aeeb71c581f4fcc11982d844f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 448, + "startColumn": 2, + "charOffset": 17089, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 446, + "startColumn": 2, + "charOffset": 16947, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, luaNamespace, Concoction_t::FireResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::IceResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::EarthResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::EnergyResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::HolyResilience);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e676d591298ef27e2dff2b9b91bf47e0d723241611c95a0e089132e74e41f295" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 449, + "startColumn": 2, + "charOffset": 17161, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 447, + "startColumn": 2, + "charOffset": 17018, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, luaNamespace, Concoction_t::IceResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::EarthResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::EnergyResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::HolyResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::DeathResilience);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71b87c1bc6f08177f44a7507f4d1dc20794e21e29d95d90e8af6cd6936bab278" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 450, + "startColumn": 2, + "charOffset": 17234, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 448, + "startColumn": 2, + "charOffset": 17088, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, luaNamespace, Concoction_t::EarthResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::EnergyResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::HolyResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::DeathResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::PhysicalResilience);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e24a4fe079c271a3d51fe07845f43501ead40824f7a65471866acd018d18e47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 451, + "startColumn": 2, + "charOffset": 17305, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 449, + "startColumn": 2, + "charOffset": 17160, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, luaNamespace, Concoction_t::EnergyResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::HolyResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::DeathResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::PhysicalResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::FireAmplification);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2787300baacf53e9ff1c822057c7ad72b42cf7530cd54b5363314da80e6cab4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 452, + "startColumn": 2, + "charOffset": 17377, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 450, + "startColumn": 2, + "charOffset": 17233, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, luaNamespace, Concoction_t::HolyResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::DeathResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::PhysicalResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::FireAmplification);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::IceAmplification);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3b0108e7ca7e07836c3e2d03aeae531c74b4ef31e63f2427c9595e5c495cd03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 453, + "startColumn": 2, + "charOffset": 17452, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 451, + "startColumn": 2, + "charOffset": 17304, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, luaNamespace, Concoction_t::DeathResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::PhysicalResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::FireAmplification);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::IceAmplification);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::EarthAmplification);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5478c2a80e3ba49c771cfd9e8d807011485f5f6f947210d89a9c4f0acfa598e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 454, + "startColumn": 2, + "charOffset": 17526, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 452, + "startColumn": 2, + "charOffset": 17376, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, luaNamespace, Concoction_t::PhysicalResilience);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::FireAmplification);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::IceAmplification);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::EarthAmplification);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::EnergyAmplification);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f881492a8fdd1b2bb73392e11ee7e628005fa3c8f02e7874b0023c12839b9539" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 455, + "startColumn": 2, + "charOffset": 17599, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 453, + "startColumn": 2, + "charOffset": 17451, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, luaNamespace, Concoction_t::FireAmplification);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::IceAmplification);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::EarthAmplification);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::EnergyAmplification);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::HolyAmplification);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cfe07c11f5ba008c8612706f0387b9013a966cd4dbbb211b50d998681162c3a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 456, + "startColumn": 2, + "charOffset": 17674, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 454, + "startColumn": 2, + "charOffset": 17525, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, luaNamespace, Concoction_t::IceAmplification);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::EarthAmplification);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::EnergyAmplification);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::HolyAmplification);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::DeathAmplification);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6bfcc8c4b5507688c671d8e4cd74f5df919dbcb40d63566eaa43c4dfc109734f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 457, + "startColumn": 2, + "charOffset": 17750, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 455, + "startColumn": 2, + "charOffset": 17598, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, luaNamespace, Concoction_t::EarthAmplification);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::EnergyAmplification);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::HolyAmplification);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::DeathAmplification);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::PhysicalAmplification);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f0f6f59192e4e3512a908a969948fa43daa0e08d7938f67d0ff901830f0eabf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 458, + "startColumn": 2, + "charOffset": 17824, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 456, + "startColumn": 2, + "charOffset": 17673, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, luaNamespace, Concoction_t::EnergyAmplification);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::HolyAmplification);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::DeathAmplification);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::PhysicalAmplification);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c01e2b4d5e1bb757d8535e8534251da24b1763d472fcdb0bd7f9403bdeea092" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 459, + "startColumn": 2, + "charOffset": 17899, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 457, + "startColumn": 2, + "charOffset": 17749, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, luaNamespace, Concoction_t::HolyAmplification);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::DeathAmplification);\n\tregisterEnumNamespace(L, luaNamespace, Concoction_t::PhysicalAmplification);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e000f8ef69850ca329c5968f3685d4f497137237682fb2e1f1cc226e2602927a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 790, + "startColumn": 2, + "charOffset": 30379, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 788, + "startColumn": 2, + "charOffset": 30323, + "charLength": 3, + "snippet": { + "text": "\nvoid LuaEnums::initItemAttributeEnums(lua_State* L) {\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tauto number = magic_enum::enum_integer(value);\n\t\t// Creation of the \"ITEM_ATTRIBUTE_\" namespace for lua scripts" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "889f2718a9c8e3d9de5e5c90b976396e83fd9ef8a6f10195f726b23452bd9ac8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 839, + "startColumn": 2, + "charOffset": 32107, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 837, + "startColumn": 2, + "charOffset": 32059, + "charLength": 3, + "snippet": { + "text": "\nvoid LuaEnums::initFluidEnums(lua_State* L) {\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnum(L, value);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2b709fa3eca2907d37253f47a870d3effdc88ea26c7764da0cd483b0de27637" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 840, + "startColumn": 3, + "charOffset": 32166, + "charLength": 17, + "snippet": { + "text": "registerMagicEnum" + } + }, + "contextRegion": { + "startLine": 838, + "startColumn": 3, + "charOffset": 32060, + "charLength": 17, + "snippet": { + "text": "void LuaEnums::initFluidEnums(lua_State* L) {\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnum(L, value);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb00badf143373071fbf5240013a1e6e6b17bdb48f193e2b49eaa10c739aab02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 911, + "startColumn": 2, + "charOffset": 34369, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 909, + "startColumn": 2, + "charOffset": 34316, + "charLength": 3, + "snippet": { + "text": "\nvoid LuaEnums::initPlayerFlagEnums(lua_State* L) {\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnum(L, value);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a1197316dc922a73cca8943d96df3b70c1f206c9e353bae012e23df27f1090d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 912, + "startColumn": 3, + "charOffset": 34433, + "charLength": 17, + "snippet": { + "text": "registerMagicEnum" + } + }, + "contextRegion": { + "startLine": 910, + "startColumn": 3, + "charOffset": 34317, + "charLength": 17, + "snippet": { + "text": "void LuaEnums::initPlayerFlagEnums(lua_State* L) {\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnum(L, value);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c77f6a4b7a1539a93675b59a25c1941e00b17e39a0c64b7d59d69eafb7e6e42d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 918, + "startColumn": 2, + "charOffset": 34575, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 916, + "startColumn": 2, + "charOffset": 34468, + "charLength": 3, + "snippet": { + "text": "void LuaEnums::initCreatureIconEnums(lua_State* L) {\n\tstd::string luaNamespace = \"CreatureIconCategory_\";\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnumNamespace(L, luaNamespace, value);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8775adb23af9079d83996f5d668f1cdb4aec4eaa6cbb81e8b9eec177ec95a66f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 919, + "startColumn": 3, + "charOffset": 34648, + "charLength": 26, + "snippet": { + "text": "registerMagicEnumNamespace" + } + }, + "contextRegion": { + "startLine": 917, + "startColumn": 3, + "charOffset": 34521, + "charLength": 26, + "snippet": { + "text": "\tstd::string luaNamespace = \"CreatureIconCategory_\";\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnumNamespace(L, luaNamespace, value);\n\t}\n\tluaNamespace = \"CreatureIconModifications_\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11d755c2940692b4dbbdfff5f2c9265b21d2dbf70657c820526a94d19f613f07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 922, + "startColumn": 2, + "charOffset": 34750, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 920, + "startColumn": 2, + "charOffset": 34700, + "charLength": 3, + "snippet": { + "text": "\t}\n\tluaNamespace = \"CreatureIconModifications_\";\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnumNamespace(L, luaNamespace, value);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13238eda6124a85dbbca450835f8cdf6d089c52bfbf2a7c9eba41c761bb90d73" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 923, + "startColumn": 3, + "charOffset": 34828, + "charLength": 26, + "snippet": { + "text": "registerMagicEnumNamespace" + } + }, + "contextRegion": { + "startLine": 921, + "startColumn": 3, + "charOffset": 34703, + "charLength": 26, + "snippet": { + "text": "\tluaNamespace = \"CreatureIconModifications_\";\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnumNamespace(L, luaNamespace, value);\n\t}\n\tluaNamespace = \"CreatureIconQuests_\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "405ef1e721841b81d7fe4f7a6b3f92e2d75703d1cf9530abda12a8e085c1060c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 926, + "startColumn": 2, + "charOffset": 34923, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 924, + "startColumn": 2, + "charOffset": 34880, + "charLength": 3, + "snippet": { + "text": "\t}\n\tluaNamespace = \"CreatureIconQuests_\";\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnumNamespace(L, luaNamespace, value);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2b709fa3eca2907d37253f47a870d3effdc88ea26c7764da0cd483b0de27637" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 927, + "startColumn": 3, + "charOffset": 34994, + "charLength": 26, + "snippet": { + "text": "registerMagicEnumNamespace" + } + }, + "contextRegion": { + "startLine": 925, + "startColumn": 3, + "charOffset": 34883, + "charLength": 26, + "snippet": { + "text": "\tluaNamespace = \"CreatureIconQuests_\";\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnumNamespace(L, luaNamespace, value);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11ca9a8e9839fe96d3c912485f76dc9e247a5e974934ae0255fd37013fcd2df2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1201, + "startColumn": 2, + "charOffset": 46085, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1199, + "startColumn": 2, + "charOffset": 46023, + "charLength": 3, + "snippet": { + "text": "// Reload\nvoid LuaEnums::initReloadTypeEnums(lua_State* L) {\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnum(L, value);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac254a08dc9453b6ab3009ad9e78372aa06a8fea66e148c6ec97b5821dbce301" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1202, + "startColumn": 3, + "charOffset": 46144, + "charLength": 17, + "snippet": { + "text": "registerMagicEnum" + } + }, + "contextRegion": { + "startLine": 1200, + "startColumn": 3, + "charOffset": 46033, + "charLength": 17, + "snippet": { + "text": "void LuaEnums::initReloadTypeEnums(lua_State* L) {\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnum(L, value);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44a590670f76b670265a1621654492fea2102f7b42ede5af6367910e6c3c21c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1227, + "startColumn": 2, + "charOffset": 46873, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1225, + "startColumn": 2, + "charOffset": 46825, + "charLength": 3, + "snippet": { + "text": "\nvoid LuaEnums::initForgeEnums(lua_State* L) {\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnum(L, value);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eff46cfa226e7497e3c8e78ec17343b90a43cda9602cda12eff5c68bcd01b9da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1228, + "startColumn": 3, + "charOffset": 46946, + "charLength": 17, + "snippet": { + "text": "registerMagicEnum" + } + }, + "contextRegion": { + "startLine": 1226, + "startColumn": 3, + "charOffset": 46826, + "charLength": 17, + "snippet": { + "text": "void LuaEnums::initForgeEnums(lua_State* L) {\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnum(L, value);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b4afda5d2644e9ab528b6c0d6572bf9c13f73bc6d796341257e540878ec732d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1241, + "startColumn": 2, + "charOffset": 47263, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1239, + "startColumn": 2, + "charOffset": 47211, + "charLength": 3, + "snippet": { + "text": "\nvoid LuaEnums::initBosstiaryEnums(lua_State* L) {\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnum(L, value);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90c04020841b9e82329fc317eac75bfe388f24b8617b41ccc493bbc3699bc7f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1242, + "startColumn": 3, + "charOffset": 47331, + "charLength": 17, + "snippet": { + "text": "registerMagicEnum" + } + }, + "contextRegion": { + "startLine": 1240, + "startColumn": 3, + "charOffset": 47212, + "charLength": 17, + "snippet": { + "text": "void LuaEnums::initBosstiaryEnums(lua_State* L) {\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnum(L, value);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3074d853655557139f55ecb7931bca7fb0d7d6d9639d5200624d8ac57341716" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-function-size", + "ruleIndex": 543, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'initSoundEnums' exceeds recommended size/complexity thresholds" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1247, + "startColumn": 16, + "charOffset": 47432, + "charLength": 14, + "snippet": { + "text": "initSoundEnums" + } + }, + "contextRegion": { + "startLine": 1245, + "startColumn": 16, + "charOffset": 47365, + "charLength": 14, + "snippet": { + "text": "\n// \"SOUND_EFFECT_TYPE_\" is the sound lua namespace\nvoid LuaEnums::initSoundEnums(lua_State* L) {\n\tstd::string soundNamespace = \"SOUND_EFFECT_TYPE_\";\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SILENCE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "542978940816cdbe1cced4104471a0113d69336582f13c5cd38d0dea381bee4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1249, + "startColumn": 2, + "charOffset": 47516, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1247, + "startColumn": 2, + "charOffset": 47417, + "charLength": 21, + "snippet": { + "text": "void LuaEnums::initSoundEnums(lua_State* L) {\n\tstd::string soundNamespace = \"SOUND_EFFECT_TYPE_\";\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SILENCE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_CLOSE_ATK_FIST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_CLOSE_ATK_FIST);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82b3be4b8ecad47538d4176469bf62d3427e9aa2174d6049dcfaaae4b1149f04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1250, + "startColumn": 2, + "charOffset": 47583, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1248, + "startColumn": 2, + "charOffset": 47463, + "charLength": 21, + "snippet": { + "text": "\tstd::string soundNamespace = \"SOUND_EFFECT_TYPE_\";\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SILENCE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_CLOSE_ATK_FIST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_CLOSE_ATK_FIST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MELEE_ATK_SWORD);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e9ea143e03a0835f27d2451680617364ed9789426f917956bdf7a8adfa7f819" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1251, + "startColumn": 2, + "charOffset": 47663, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1249, + "startColumn": 2, + "charOffset": 47515, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SILENCE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_CLOSE_ATK_FIST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_CLOSE_ATK_FIST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MELEE_ATK_SWORD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MELEE_ATK_CLUB);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "127baea8e44641913aa0b3a660720aca96aaf569718be6896931b801457c45cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1252, + "startColumn": 2, + "charOffset": 47745, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1250, + "startColumn": 2, + "charOffset": 47582, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_CLOSE_ATK_FIST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_CLOSE_ATK_FIST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MELEE_ATK_SWORD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MELEE_ATK_CLUB);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MELEE_ATK_AXE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c77f6a4b7a1539a93675b59a25c1941e00b17e39a0c64b7d59d69eafb7e6e42d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1253, + "startColumn": 2, + "charOffset": 47820, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1251, + "startColumn": 2, + "charOffset": 47662, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_CLOSE_ATK_FIST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MELEE_ATK_SWORD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MELEE_ATK_CLUB);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MELEE_ATK_AXE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_BOW);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10443931e1cc3324ee0d61862c42bde5a3ba72f564f0318092c1f277260e6d04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1254, + "startColumn": 2, + "charOffset": 47894, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1252, + "startColumn": 2, + "charOffset": 47744, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MELEE_ATK_SWORD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MELEE_ATK_CLUB);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MELEE_ATK_AXE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_BOW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_CROSSBOW);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "273bf5ee4c51110215e23a068a73651a1eddbca26a811fe6840f470a745db970" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1255, + "startColumn": 2, + "charOffset": 47967, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1253, + "startColumn": 2, + "charOffset": 47819, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MELEE_ATK_CLUB);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MELEE_ATK_AXE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_BOW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_CROSSBOW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_THROW);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b20250b394580b56e9b874b0cb3051ed5461f0be4d85b72371cb50bdc24ec8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1256, + "startColumn": 2, + "charOffset": 48039, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1254, + "startColumn": 2, + "charOffset": 47893, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MELEE_ATK_AXE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_BOW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_CROSSBOW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_THROW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAGICAL_RANGE_ATK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b83757f749732f048d913a6b6b56aeb9fb54f50d2f0ce22da478a90d48215d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1257, + "startColumn": 2, + "charOffset": 48116, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1255, + "startColumn": 2, + "charOffset": 47966, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_BOW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_CROSSBOW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_THROW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAGICAL_RANGE_ATK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_OR_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72be4cc66d82eaaa67083feadda159adbbe045743c1fd9754b36d071b8a92b83" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1258, + "startColumn": 2, + "charOffset": 48190, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1256, + "startColumn": 2, + "charOffset": 48038, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_CROSSBOW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_THROW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAGICAL_RANGE_ATK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_OR_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::OTHER);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e036c6912cd87735d1fb44f19014a3e1a1ab92b1b3c9794d8bbdd9f252eeb831" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1259, + "startColumn": 2, + "charOffset": 48267, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1257, + "startColumn": 2, + "charOffset": 48115, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_THROW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAGICAL_RANGE_ATK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_OR_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::OTHER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::PHYSICAL_RANGE_MISS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "103244f91beb11addcdee9e04b1c87a4dc54a47ccea13266a220ef2c1d5315bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1260, + "startColumn": 2, + "charOffset": 48340, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1258, + "startColumn": 2, + "charOffset": 48189, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAGICAL_RANGE_ATK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_OR_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::OTHER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::PHYSICAL_RANGE_MISS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_BOW_SHOT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f1882b9c685a97c79ed607f49f8b7752f2e0d4b20940f9fd3d1e4ae78605111" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1261, + "startColumn": 2, + "charOffset": 48405, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1259, + "startColumn": 2, + "charOffset": 48266, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_OR_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::OTHER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::PHYSICAL_RANGE_MISS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_BOW_SHOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_CROSSBOW_SHOT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02578e53e320d964e0431fc7f82eba0a0025e868bb91d96d201a4167689ab3c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1262, + "startColumn": 2, + "charOffset": 48484, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1260, + "startColumn": 2, + "charOffset": 48339, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::OTHER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::PHYSICAL_RANGE_MISS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_BOW_SHOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_CROSSBOW_SHOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_THROW_SHOT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6b2647238a3e4a1bd5bde1d2267d604646e0e02fa3ae23be2b5cb6c2c10d9e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1263, + "startColumn": 2, + "charOffset": 48561, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1261, + "startColumn": 2, + "charOffset": 48404, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::PHYSICAL_RANGE_MISS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_BOW_SHOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_CROSSBOW_SHOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_THROW_SHOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_ROD_SHOT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9ff58d6c1294ad11d359e4d1502afa8e95f9535205989b1d035260d7d3f5de1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1264, + "startColumn": 2, + "charOffset": 48643, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1262, + "startColumn": 2, + "charOffset": 48483, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_BOW_SHOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_CROSSBOW_SHOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_THROW_SHOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_ROD_SHOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_WAND_SHOT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f00275df631a9b6dd247a2ce8b1e8a0dca51ec605e377bfe6c058507a1d5559d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1265, + "startColumn": 2, + "charOffset": 48722, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1263, + "startColumn": 2, + "charOffset": 48560, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_CROSSBOW_SHOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_THROW_SHOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_ROD_SHOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_WAND_SHOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::BURST_ARROW_EFFECT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e24a4fe079c271a3d51fe07845f43501ead40824f7a65471866acd018d18e47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1266, + "startColumn": 2, + "charOffset": 48799, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1264, + "startColumn": 2, + "charOffset": 48642, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_THROW_SHOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_ROD_SHOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_WAND_SHOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::BURST_ARROW_EFFECT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIAMOND_ARROW_EFFECT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a029d0656613562d4c75959fc6d6dbd7e253b789ffaf09bd448e1d0232d2fbeb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1267, + "startColumn": 2, + "charOffset": 48877, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1265, + "startColumn": 2, + "charOffset": 48721, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_ROD_SHOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_WAND_SHOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::BURST_ARROW_EFFECT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIAMOND_ARROW_EFFECT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::NO_DAMAGE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80c45f800d6339f50a5b8ed5143dad379c2b52e1505b696c80fd277d4a36267d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1268, + "startColumn": 2, + "charOffset": 48955, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1266, + "startColumn": 2, + "charOffset": 48798, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIST_ATK_WAND_SHOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::BURST_ARROW_EFFECT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIAMOND_ARROW_EFFECT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::NO_DAMAGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_FIST);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1de7290d224e411f54a4bcf9616fb5f4673fac69856fe0df31524ad6ec72f5ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1269, + "startColumn": 2, + "charOffset": 49035, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1267, + "startColumn": 2, + "charOffset": 48876, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::BURST_ARROW_EFFECT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIAMOND_ARROW_EFFECT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::NO_DAMAGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_FIST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_CLAW);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "103244f91beb11addcdee9e04b1c87a4dc54a47ccea13266a220ef2c1d5315bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1270, + "startColumn": 2, + "charOffset": 49104, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1268, + "startColumn": 2, + "charOffset": 48954, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DIAMOND_ARROW_EFFECT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::NO_DAMAGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_FIST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_CLAW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_BITE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a05e01177b9aec0a38fae74c85d21eaccd206c2263fe0dd71aa9d06d86ef77e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1271, + "startColumn": 2, + "charOffset": 49186, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1269, + "startColumn": 2, + "charOffset": 49034, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::NO_DAMAGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_FIST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_CLAW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_BITE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_RIP);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77df16e30bf5b8427e3ca824b93866f0ea5e73c3f01895fdca8d235723b6c83b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1272, + "startColumn": 2, + "charOffset": 49268, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1270, + "startColumn": 2, + "charOffset": 49103, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_FIST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_CLAW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_BITE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_RIP);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_ACID);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75e64bbe0d0b1c02834019bd758d680edf7328c01d519221a9bfeb63c4ca3ed0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1273, + "startColumn": 2, + "charOffset": 49350, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1271, + "startColumn": 2, + "charOffset": 49185, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_CLAW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_BITE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_RIP);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_ACID);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_MAGIC);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dcc394b6e42aa6b47b3db9790dc9732da9b2d1a4403abd589a39022f1544e8cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1274, + "startColumn": 2, + "charOffset": 49431, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1272, + "startColumn": 2, + "charOffset": 49267, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_BITE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_RIP);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_ACID);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_MAGIC);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_ETHEREAL);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d5a64b7fce74dcff6d6768975e9835e1a056d145384deb3df1fe9b7a4fb31de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1275, + "startColumn": 2, + "charOffset": 49513, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1273, + "startColumn": 2, + "charOffset": 49349, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_RIP);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_ACID);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_MAGIC);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_ETHEREAL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_CONSTRUCT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3403a159c76d3c9c3261f579441b74ffeedcd513bb73177337446f1ef5d132d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1276, + "startColumn": 2, + "charOffset": 49596, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1274, + "startColumn": 2, + "charOffset": 49430, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_ACID);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_MAGIC);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_ETHEREAL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_CONSTRUCT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHT_HEALING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb1f38ed64d64702238d1343b1497c7b3527d5360afe6079888b122a78ae2a4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1277, + "startColumn": 2, + "charOffset": 49682, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1275, + "startColumn": 2, + "charOffset": 49512, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_MAGIC);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_ETHEREAL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_CONSTRUCT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHT_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INTENSE_HEALING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c52c847b47224029edc3e19896fac3b31fc407a2eda5b2df3cb201b6186ee24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1278, + "startColumn": 2, + "charOffset": 49769, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1276, + "startColumn": 2, + "charOffset": 49595, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_ETHEREAL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_CONSTRUCT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHT_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INTENSE_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_HEALING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3403a159c76d3c9c3261f579441b74ffeedcd513bb73177337446f1ef5d132d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1279, + "startColumn": 2, + "charOffset": 49848, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1277, + "startColumn": 2, + "charOffset": 49681, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_MELEE_ATK_CONSTRUCT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHT_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INTENSE_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INTENSE_HEALING_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19af95c8454cda06126400d5ab5f38aeec27c61bddc6b170c9eff5c19f460df2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1280, + "startColumn": 2, + "charOffset": 49929, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1278, + "startColumn": 2, + "charOffset": 49768, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHT_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INTENSE_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INTENSE_HEALING_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_HEALING_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71b87c1bc6f08177f44a7507f4d1dc20794e21e29d95d90e8af6cd6936bab278" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1281, + "startColumn": 2, + "charOffset": 50011, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1279, + "startColumn": 2, + "charOffset": 49847, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INTENSE_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INTENSE_HEALING_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_HEALING_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HASTE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf56b64b3439c58a56e99fa4d855a5e6bee6805ffb71455853698624ca182b36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1282, + "startColumn": 2, + "charOffset": 50097, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1280, + "startColumn": 2, + "charOffset": 49928, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INTENSE_HEALING_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_HEALING_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HASTE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHT_MAGIC_MISSILE_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9ff58d6c1294ad11d359e4d1502afa8e95f9535205989b1d035260d7d3f5de1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1283, + "startColumn": 2, + "charOffset": 50184, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1281, + "startColumn": 2, + "charOffset": 50010, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INTENSE_HEALING_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_HEALING_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HASTE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHT_MAGIC_MISSILE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HEAVY_MAGIC_MISSILE_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f53cc1ab3cf1e65967a4e2d2be4c19b77f6cfac3853794613d98ffb6ec0eb76f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1284, + "startColumn": 2, + "charOffset": 50255, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1282, + "startColumn": 2, + "charOffset": 50096, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_HEALING_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HASTE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHT_MAGIC_MISSILE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HEAVY_MAGIC_MISSILE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUMMON_CREATURE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c7880094fb4fb781efaa77076b4627f99cd7ad9c2d0e26a79867ff43afeb14c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1285, + "startColumn": 2, + "charOffset": 50345, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1283, + "startColumn": 2, + "charOffset": 50183, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HASTE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHT_MAGIC_MISSILE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HEAVY_MAGIC_MISSILE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUMMON_CREATURE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfd88bbbb5d4cbc7ebc0414dd87a2f089b3c185e35573be4064762ad6cde04a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1286, + "startColumn": 2, + "charOffset": 50435, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1284, + "startColumn": 2, + "charOffset": 50254, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHT_MAGIC_MISSILE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HEAVY_MAGIC_MISSILE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUMMON_CREATURE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_GREAT_LIGHT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f00275df631a9b6dd247a2ce8b1e8a0dca51ec605e377bfe6c058507a1d5559d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1287, + "startColumn": 2, + "charOffset": 50516, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1285, + "startColumn": 2, + "charOffset": 50344, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HEAVY_MAGIC_MISSILE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUMMON_CREATURE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_GREAT_LIGHT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CONVINCE_CREATURE_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af290da3fb906f3ebe9df1e5de947f057744dc149ba2de62a41eb83b464c65d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1288, + "startColumn": 2, + "charOffset": 50587, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1286, + "startColumn": 2, + "charOffset": 50434, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUMMON_CREATURE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_GREAT_LIGHT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CONVINCE_CREATURE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_WAVE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "182da826d0760f2bbf488dca43d3f01c726f1a41ae747ffc89f989ca5ba3b66f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1289, + "startColumn": 2, + "charOffset": 50664, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1287, + "startColumn": 2, + "charOffset": 50515, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_GREAT_LIGHT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CONVINCE_CREATURE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CHAMELEON_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3223a1d3cc62962dbfd19585351d3a0bb6b447d33babc4745ac775ba9d2c15b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1290, + "startColumn": 2, + "charOffset": 50752, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1288, + "startColumn": 2, + "charOffset": 50586, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_GREAT_LIGHT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CONVINCE_CREATURE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CHAMELEON_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIREBALL_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44a590670f76b670265a1621654492fea2102f7b42ede5af6367910e6c3c21c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1291, + "startColumn": 2, + "charOffset": 50829, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1289, + "startColumn": 2, + "charOffset": 50663, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CONVINCE_CREATURE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CHAMELEON_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIREBALL_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_GREAT_FIREBALL_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c22ac3e9edee24b226a950bebfbd13cecd9d01c5e27b23d86b65d8887d814fda" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1292, + "startColumn": 2, + "charOffset": 50909, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1290, + "startColumn": 2, + "charOffset": 50751, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CHAMELEON_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIREBALL_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_GREAT_FIREBALL_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIRE_BOMB_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86b571689b9ba0c4b26ae386962a4748560adae500c4f6917b7595aba9e2fde0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1293, + "startColumn": 2, + "charOffset": 50988, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1291, + "startColumn": 2, + "charOffset": 50828, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CHAMELEON_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIREBALL_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_GREAT_FIREBALL_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIRE_BOMB_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_EXPLOSION_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5478c2a80e3ba49c771cfd9e8d807011485f5f6f947210d89a9c4f0acfa598e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1294, + "startColumn": 2, + "charOffset": 51073, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1292, + "startColumn": 2, + "charOffset": 50908, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIREBALL_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_GREAT_FIREBALL_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIRE_BOMB_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_EXPLOSION_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIRE_WAVE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c77f6a4b7a1539a93675b59a25c1941e00b17e39a0c64b7d59d69eafb7e6e42d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1295, + "startColumn": 2, + "charOffset": 51153, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1293, + "startColumn": 2, + "charOffset": 50987, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_GREAT_FIREBALL_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIRE_BOMB_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_EXPLOSION_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIRE_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIND_PERSON);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "defaaf321eeac0b2b9548c0c8bed015ffe1d4d84e7100b5f998cdce104fc9391" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1296, + "startColumn": 2, + "charOffset": 51233, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1294, + "startColumn": 2, + "charOffset": 51072, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIRE_BOMB_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_EXPLOSION_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIRE_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIND_PERSON);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUDDENDEATH_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "770e59e82dc7d9960ed2ba8fbac17f12aa9344df3877db02cdf4ef6c92709af9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1297, + "startColumn": 2, + "charOffset": 51308, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1295, + "startColumn": 2, + "charOffset": 51152, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_EXPLOSION_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIRE_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIND_PERSON);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUDDENDEATH_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_BEAM);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bca81380ab1ac18cffdbcd72b3b5a086fde6c0bde61ba77b3cc0caf7b121f883" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1298, + "startColumn": 2, + "charOffset": 51385, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1296, + "startColumn": 2, + "charOffset": 51232, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIRE_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIND_PERSON);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUDDENDEATH_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_BEAM);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_GREAT_ENERGY_BEAM);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df6bb5cb2bc675d2a5f884dc34271d1bfb1c5345107a38b0901af9b26fa7cf8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1299, + "startColumn": 2, + "charOffset": 51467, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1297, + "startColumn": 2, + "charOffset": 51307, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIND_PERSON);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUDDENDEATH_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_BEAM);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_GREAT_ENERGY_BEAM);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HELL_SCORE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a987e393c2235abe5a9450d6cb0fc82987c4f3b235d0067c3867cf41d7ba5911" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1300, + "startColumn": 2, + "charOffset": 51544, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1298, + "startColumn": 2, + "charOffset": 51384, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUDDENDEATH_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_BEAM);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_GREAT_ENERGY_BEAM);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HELL_SCORE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIRE_FIELD_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11d755c2940692b4dbbdfff5f2c9265b21d2dbf70657c820526a94d19f613f07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1301, + "startColumn": 2, + "charOffset": 51627, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1299, + "startColumn": 2, + "charOffset": 51466, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_BEAM);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_GREAT_ENERGY_BEAM);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HELL_SCORE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIRE_FIELD_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_POISON_FIELD_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "525bae9eabb62c90c93dba8bc0dcea6fca3edeef83a57d99b2e1cfb01ad60573" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1302, + "startColumn": 2, + "charOffset": 51703, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1300, + "startColumn": 2, + "charOffset": 51543, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_GREAT_ENERGY_BEAM);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HELL_SCORE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIRE_FIELD_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_POISON_FIELD_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_FIELD_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85ccec15d2dc5bde9ca1c92af2c57248b42c9c789eea7da3e947f47a5b31c35f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1303, + "startColumn": 2, + "charOffset": 51784, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1301, + "startColumn": 2, + "charOffset": 51626, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HELL_SCORE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIRE_FIELD_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_POISON_FIELD_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_FIELD_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIRE_WALL_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b03a4b889de2036f3db7a2b344d9d694d8ef3c379de7700e881ba9c8e23c09d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1304, + "startColumn": 2, + "charOffset": 51867, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1302, + "startColumn": 2, + "charOffset": 51702, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIRE_FIELD_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_POISON_FIELD_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_FIELD_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIRE_WALL_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_POISON);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "182da826d0760f2bbf488dca43d3f01c726f1a41ae747ffc89f989ca5ba3b66f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1305, + "startColumn": 2, + "charOffset": 51950, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1303, + "startColumn": 2, + "charOffset": 51783, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_POISON_FIELD_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_FIELD_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIRE_WALL_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_POISON);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DESTROY_FIELD_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de8908c738f5639b5fd512ade799cd26a433f0384c445e780d2921f7f0238ac5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1306, + "startColumn": 2, + "charOffset": 52030, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1304, + "startColumn": 2, + "charOffset": 51866, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_FIELD_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIRE_WALL_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_POISON);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DESTROY_FIELD_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_POISON_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e036c6912cd87735d1fb44f19014a3e1a1ab92b1b3c9794d8bbdd9f252eeb831" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1307, + "startColumn": 2, + "charOffset": 52107, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1305, + "startColumn": 2, + "charOffset": 51949, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIRE_WALL_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_POISON);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DESTROY_FIELD_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_POISON_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_POISON_WALL_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "103244f91beb11addcdee9e04b1c87a4dc54a47ccea13266a220ef2c1d5315bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1308, + "startColumn": 2, + "charOffset": 52191, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1306, + "startColumn": 2, + "charOffset": 52029, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_POISON);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DESTROY_FIELD_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_POISON_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_POISON_WALL_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_WALL_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e9ea143e03a0835f27d2451680617364ed9789426f917956bdf7a8adfa7f819" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1309, + "startColumn": 2, + "charOffset": 52273, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1307, + "startColumn": 2, + "charOffset": 52106, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DESTROY_FIELD_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_POISON_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_POISON_WALL_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_WALL_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SALVATION);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7168cd45b141ee7e09ac817f6c6f9f2bbdc4e3430d7bfbf4d9805709222705d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1310, + "startColumn": 2, + "charOffset": 52355, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1308, + "startColumn": 2, + "charOffset": 52190, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_POISON_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_POISON_WALL_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_WALL_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SALVATION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CREATURE_ILLUSION);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c630014a135be8ef92137c91dc39b24af1d8339f86f925c226d9ddd3882ed7a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1311, + "startColumn": 2, + "charOffset": 52437, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1309, + "startColumn": 2, + "charOffset": 52272, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_POISON_WALL_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_WALL_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SALVATION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CREATURE_ILLUSION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_HASTE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9808965b72d870fee8d58ef3e5ef80c11f6e2f5551afc1659fd0b46d0a861b16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1312, + "startColumn": 2, + "charOffset": 52512, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1310, + "startColumn": 2, + "charOffset": 52354, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_WALL_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SALVATION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CREATURE_ILLUSION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_HASTE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FOOD);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5998ec03422eb40e2828766def59f369deee2ba255bbfc9dbe421e295d9012ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1313, + "startColumn": 2, + "charOffset": 52595, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1311, + "startColumn": 2, + "charOffset": 52436, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SALVATION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CREATURE_ILLUSION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_HASTE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FOOD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_ICE_WAVE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c9d022d5699ab39e34474b48710c92d3947727ff0c3ffca4690b2c7431f4013" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1314, + "startColumn": 2, + "charOffset": 52673, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1312, + "startColumn": 2, + "charOffset": 52511, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CREATURE_ILLUSION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_HASTE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FOOD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_ICE_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MAGIC_SHIELD);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e676d591298ef27e2dff2b9b91bf47e0d723241611c95a0e089132e74e41f295" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1315, + "startColumn": 2, + "charOffset": 52743, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1313, + "startColumn": 2, + "charOffset": 52594, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_HASTE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FOOD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_ICE_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MAGIC_SHIELD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INVISIBLE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "adde5c560639723319a73b7c9bd1e2bfc55535fed8809c38abf1fe4681aa5153" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1316, + "startColumn": 2, + "charOffset": 52824, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1314, + "startColumn": 2, + "charOffset": 52672, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FOOD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_ICE_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MAGIC_SHIELD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INVISIBLE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CONJURE_EXPLOSIVE_ARROW);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11d755c2940692b4dbbdfff5f2c9265b21d2dbf70657c820526a94d19f613f07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1317, + "startColumn": 2, + "charOffset": 52902, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1315, + "startColumn": 2, + "charOffset": 52742, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_ICE_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MAGIC_SHIELD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INVISIBLE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CONJURE_EXPLOSIVE_ARROW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SOUL_FIRE_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb00badf143373071fbf5240013a1e6e6b17bdb48f193e2b49eaa10c739aab02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1318, + "startColumn": 2, + "charOffset": 52977, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1316, + "startColumn": 2, + "charOffset": 52823, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MAGIC_SHIELD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INVISIBLE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CONJURE_EXPLOSIVE_ARROW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SOUL_FIRE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CONJURE_ARROW);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "538d839aa08b52da16d5c402313430d697d2ba0fd15ecb337f21a2d72fb1d4bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1319, + "startColumn": 2, + "charOffset": 53066, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1317, + "startColumn": 2, + "charOffset": 52901, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INVISIBLE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CONJURE_EXPLOSIVE_ARROW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SOUL_FIRE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CONJURE_ARROW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PARALYSE_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5d50b4d425aa32d7989ecc0a680e56fbb831b33e10c84752fae8899d9199153" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1320, + "startColumn": 2, + "charOffset": 53146, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1318, + "startColumn": 2, + "charOffset": 52976, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CONJURE_EXPLOSIVE_ARROW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SOUL_FIRE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CONJURE_ARROW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PARALYSE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_BOMB_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "babf3aa1abe57ee05d883054d3104f8b5947644bca1a36c64fe698f6c82164ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1321, + "startColumn": 2, + "charOffset": 53225, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1319, + "startColumn": 2, + "charOffset": 53065, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SOUL_FIRE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CONJURE_ARROW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PARALYSE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_BOMB_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_WRATH_OF_NATURE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2cc5c3d5fd3717b38d803310105370332b4c71214ec484f1bf95ff36084e7df5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1322, + "startColumn": 2, + "charOffset": 53304, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1320, + "startColumn": 2, + "charOffset": 53145, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CONJURE_ARROW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PARALYSE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_BOMB_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_WRATH_OF_NATURE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_ETHEREAL_SPEAR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a661bb0807386e84e9fa248e6cf69cd5a36eb25ba60d58ac0522621f76c6155" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1323, + "startColumn": 2, + "charOffset": 53386, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1321, + "startColumn": 2, + "charOffset": 53224, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PARALYSE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_BOMB_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_WRATH_OF_NATURE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_ETHEREAL_SPEAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FRONT_SWEEP);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b4e3ec98d054ee7cfa7763aac2e528bf912db9f997e30cc9c121c48df81fbd1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1324, + "startColumn": 2, + "charOffset": 53467, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1322, + "startColumn": 2, + "charOffset": 53303, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_BOMB_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_WRATH_OF_NATURE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_ETHEREAL_SPEAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FRONT_SWEEP);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_BRUTAL_STRIKE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e779707a23fd366af40f8db90da8aa16a77ff83c0b22814383d8e33e9b88e6c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1325, + "startColumn": 2, + "charOffset": 53554, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1323, + "startColumn": 2, + "charOffset": 53385, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_WRATH_OF_NATURE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_ETHEREAL_SPEAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FRONT_SWEEP);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_BRUTAL_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ANNIHILATION);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "91e5135c4569416f25bb5c60be2a3275beffb88d05b031ed8a5cb968b7095d15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1326, + "startColumn": 2, + "charOffset": 53631, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1324, + "startColumn": 2, + "charOffset": 53466, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_ETHEREAL_SPEAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FRONT_SWEEP);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_BRUTAL_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ANNIHILATION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INVITE_GUESTS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6bb769c25fdc64dc28bcb9b40fcdc6a787a2541792d519e012145b6d906ad457" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1327, + "startColumn": 2, + "charOffset": 53710, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1325, + "startColumn": 2, + "charOffset": 53553, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FRONT_SWEEP);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_BRUTAL_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ANNIHILATION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INVITE_GUESTS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INVITE_SUBOWNERS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17c410401a2be8c2b4c0fb619623184a9782b9678de49219905ebb2ccae059a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1328, + "startColumn": 2, + "charOffset": 53788, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1326, + "startColumn": 2, + "charOffset": 53630, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_BRUTAL_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ANNIHILATION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INVITE_GUESTS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INVITE_SUBOWNERS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_KICK_GUEST);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b097497e4dd49928b15e38532fa766849630de8a0f8d6d21a5f42939a904b1b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1329, + "startColumn": 2, + "charOffset": 53867, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1327, + "startColumn": 2, + "charOffset": 53709, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ANNIHILATION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INVITE_GUESTS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INVITE_SUBOWNERS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_KICK_GUEST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_EDIT_DOOR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "146b9c6214ee0def3a1ed14ed9de35ced69c9ac0dc4fbd0cc3dc1605a9f7f0a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1330, + "startColumn": 2, + "charOffset": 53949, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1328, + "startColumn": 2, + "charOffset": 53787, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INVITE_GUESTS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INVITE_SUBOWNERS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_KICK_GUEST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_EDIT_DOOR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_LIGHT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d60279bba07c4295699aa6475787dd89b342d1fe96bb9db667bb71e8da74ea08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1331, + "startColumn": 2, + "charOffset": 54025, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1329, + "startColumn": 2, + "charOffset": 53866, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INVITE_SUBOWNERS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_KICK_GUEST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_EDIT_DOOR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_LIGHT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MAGIC_ROPE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71b87c1bc6f08177f44a7507f4d1dc20794e21e29d95d90e8af6cd6936bab278" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1332, + "startColumn": 2, + "charOffset": 54100, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1330, + "startColumn": 2, + "charOffset": 53948, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_KICK_GUEST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_EDIT_DOOR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_LIGHT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MAGIC_ROPE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STALAGMITE_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af290da3fb906f3ebe9df1e5de947f057744dc149ba2de62a41eb83b464c65d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1333, + "startColumn": 2, + "charOffset": 54180, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1331, + "startColumn": 2, + "charOffset": 54024, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_EDIT_DOOR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_LIGHT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MAGIC_ROPE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STALAGMITE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DISINTEGRATE_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a3a21eb6b6be7ff3cb7c4b6b676beb2ed364015fda85a9ab01e444769032bff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1334, + "startColumn": 2, + "charOffset": 54256, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1332, + "startColumn": 2, + "charOffset": 54099, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_LIGHT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MAGIC_ROPE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STALAGMITE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DISINTEGRATE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_BERSERK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ab64cfbdbee568ff459ec3459e0284dbd2f2490eb8f51528569a8940bcf0c62" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1335, + "startColumn": 2, + "charOffset": 54337, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1333, + "startColumn": 2, + "charOffset": 54179, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MAGIC_ROPE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STALAGMITE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DISINTEGRATE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_BERSERK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LEVITATE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52999ee52ac48f6a0cabd6b8beaaa0aba608a9a94db4f0e9a512f5a164c0d1fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1336, + "startColumn": 2, + "charOffset": 54420, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1334, + "startColumn": 2, + "charOffset": 54255, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STALAGMITE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DISINTEGRATE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_BERSERK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LEVITATE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MASS_HEALING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bff340be5e062bb547ea60b8735744297364423e88a2a30ab34a4697d019732f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1337, + "startColumn": 2, + "charOffset": 54493, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1335, + "startColumn": 2, + "charOffset": 54336, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DISINTEGRATE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_BERSERK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LEVITATE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MASS_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ANIMATE_DEAD_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86b571689b9ba0c4b26ae386962a4748560adae500c4f6917b7595aba9e2fde0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1338, + "startColumn": 2, + "charOffset": 54567, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1336, + "startColumn": 2, + "charOffset": 54419, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_BERSERK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LEVITATE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MASS_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ANIMATE_DEAD_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HEAL_FRIEND);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17c014a8593ce552441fb30d9165b4b8d012e65c930bdd6452b220b7ad93f04a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1339, + "startColumn": 2, + "charOffset": 54645, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1337, + "startColumn": 2, + "charOffset": 54492, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LEVITATE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MASS_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ANIMATE_DEAD_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HEAL_FRIEND);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_UNDEAD_LEGION);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d657820a2ae8a04013f2ce7e5391020d8274331b214535dd1e238730be20655c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1340, + "startColumn": 2, + "charOffset": 54728, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1338, + "startColumn": 2, + "charOffset": 54566, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MASS_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ANIMATE_DEAD_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HEAL_FRIEND);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_UNDEAD_LEGION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MAGIC_WALL_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e75da0e8bc2ccbf119f8fae2c6b74c1f1d148960d5a615306625d35c86c2876d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1341, + "startColumn": 2, + "charOffset": 54805, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1339, + "startColumn": 2, + "charOffset": 54644, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ANIMATE_DEAD_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HEAL_FRIEND);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_UNDEAD_LEGION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MAGIC_WALL_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DEATH_STRIKE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02578e53e320d964e0431fc7f82eba0a0025e868bb91d96d201a4167689ab3c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1342, + "startColumn": 2, + "charOffset": 54884, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1340, + "startColumn": 2, + "charOffset": 54727, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HEAL_FRIEND);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_UNDEAD_LEGION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MAGIC_WALL_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DEATH_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_STRIKE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6b2647238a3e4a1bd5bde1d2267d604646e0e02fa3ae23be2b5cb6c2c10d9e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1343, + "startColumn": 2, + "charOffset": 54965, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1341, + "startColumn": 2, + "charOffset": 54804, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_UNDEAD_LEGION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MAGIC_WALL_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DEATH_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FLAME_STRIKE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62517877043d2cba459c948346f0f5a094b8404226c1fc822575569b833f55fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1344, + "startColumn": 2, + "charOffset": 55043, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1342, + "startColumn": 2, + "charOffset": 54883, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MAGIC_WALL_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DEATH_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FLAME_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CANCEL_INVISIBILITY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f00275df631a9b6dd247a2ce8b1e8a0dca51ec605e377bfe6c058507a1d5559d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1345, + "startColumn": 2, + "charOffset": 55122, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1343, + "startColumn": 2, + "charOffset": 54964, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DEATH_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FLAME_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CANCEL_INVISIBILITY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_POISON_BOMB_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e24a4fe079c271a3d51fe07845f43501ead40824f7a65471866acd018d18e47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1346, + "startColumn": 2, + "charOffset": 55200, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1344, + "startColumn": 2, + "charOffset": 55042, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENERGY_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FLAME_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CANCEL_INVISIBILITY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_POISON_BOMB_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CONJURE_WAND_OF_DARKNESS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c01e2b4d5e1bb757d8535e8534251da24b1763d472fcdb0bd7f9403bdeea092" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1347, + "startColumn": 2, + "charOffset": 55285, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1345, + "startColumn": 2, + "charOffset": 55121, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FLAME_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CANCEL_INVISIBILITY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_POISON_BOMB_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CONJURE_WAND_OF_DARKNESS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CHALLENGE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83defcaf3e79c2d4b0b871b6a285fcc105071d29249156bfca723278f585093f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1348, + "startColumn": 2, + "charOffset": 55367, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1346, + "startColumn": 2, + "charOffset": 55199, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CANCEL_INVISIBILITY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_POISON_BOMB_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CONJURE_WAND_OF_DARKNESS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CHALLENGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_WILD_GROWTH_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb892f2bba7370f355c93cbc774d0c25c4f46421528bdeb2908b96714a7bac24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1349, + "startColumn": 2, + "charOffset": 55457, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1347, + "startColumn": 2, + "charOffset": 55284, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_POISON_BOMB_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CONJURE_WAND_OF_DARKNESS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CHALLENGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_WILD_GROWTH_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIERCE_BERSERK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1461bbbff9d76d438c28eb6ab1970c9a67149f299c9e9c4527871990e40aa48" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1350, + "startColumn": 2, + "charOffset": 55532, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1348, + "startColumn": 2, + "charOffset": 55366, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CONJURE_WAND_OF_DARKNESS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CHALLENGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_WILD_GROWTH_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIERCE_BERSERK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_GROUNDSHAKER);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7bd122fa11a4db281279b199cf58f21006551e22912750c9c9ea9d4edf0ba59e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1351, + "startColumn": 2, + "charOffset": 55614, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1349, + "startColumn": 2, + "charOffset": 55456, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CHALLENGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_WILD_GROWTH_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIERCE_BERSERK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_GROUNDSHAKER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_WHIRLWIND_THROW);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e036c6912cd87735d1fb44f19014a3e1a1ab92b1b3c9794d8bbdd9f252eeb831" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1352, + "startColumn": 2, + "charOffset": 55694, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1350, + "startColumn": 2, + "charOffset": 55531, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_WILD_GROWTH_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIERCE_BERSERK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_GROUNDSHAKER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_WHIRLWIND_THROW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENCHANT_SPEAR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cac07c099fae629927be815937eebad461f77fd15a14fa4275c249856994657c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1353, + "startColumn": 2, + "charOffset": 55772, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1351, + "startColumn": 2, + "charOffset": 55613, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FIERCE_BERSERK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_GROUNDSHAKER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_WHIRLWIND_THROW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENCHANT_SPEAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ETHEREAL_SPEAR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c80da0aea958cbaef6884bbee35caa2d5fbd86928607146692e78db66f96e410" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1354, + "startColumn": 2, + "charOffset": 55853, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1352, + "startColumn": 2, + "charOffset": 55693, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_GROUNDSHAKER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_WHIRLWIND_THROW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENCHANT_SPEAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ETHEREAL_SPEAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ICE_STRIKE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e4cafd07c9e27ebf48696a48ffeba36175ef75fef15db92c63170ce37842533" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1355, + "startColumn": 2, + "charOffset": 55932, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1353, + "startColumn": 2, + "charOffset": 55771, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_WHIRLWIND_THROW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENCHANT_SPEAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ETHEREAL_SPEAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ICE_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_TERRA_STRIKE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46dd273de3c0426927cec7f3937335e05d38442e7ccbd43937f12be972404df8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1356, + "startColumn": 2, + "charOffset": 56012, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1354, + "startColumn": 2, + "charOffset": 55852, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENCHANT_SPEAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ETHEREAL_SPEAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ICE_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_TERRA_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ICICLE_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10443931e1cc3324ee0d61862c42bde5a3ba72f564f0318092c1f277260e6d04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1357, + "startColumn": 2, + "charOffset": 56088, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1355, + "startColumn": 2, + "charOffset": 55931, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ETHEREAL_SPEAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ICE_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_TERRA_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ICICLE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_AVALANCHE_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "416477c5ee077b11c6feff1208f55ee8104a1cfde842645b23ce443240e23082" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1358, + "startColumn": 2, + "charOffset": 56166, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1356, + "startColumn": 2, + "charOffset": 56011, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ICE_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_TERRA_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ICICLE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_AVALANCHE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STONE_SHOWER_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fbc8a6a1df40d1ed4181b79bfac69f1176244eda336d85b14eb4819e3ed04f84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1359, + "startColumn": 2, + "charOffset": 56243, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1357, + "startColumn": 2, + "charOffset": 56087, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_TERRA_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ICICLE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_AVALANCHE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STONE_SHOWER_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_THUNDERSTORM_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0931c77bac4d1a838680712e9ecff5ffe1253794fe74a6c96c4d654c9262eb5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1360, + "startColumn": 2, + "charOffset": 56323, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1358, + "startColumn": 2, + "charOffset": 56165, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ICICLE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_AVALANCHE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STONE_SHOWER_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_THUNDERSTORM_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ETERNAL_WINTER);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f00275df631a9b6dd247a2ce8b1e8a0dca51ec605e377bfe6c058507a1d5559d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1361, + "startColumn": 2, + "charOffset": 56406, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1359, + "startColumn": 2, + "charOffset": 56242, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_AVALANCHE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STONE_SHOWER_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_THUNDERSTORM_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ETERNAL_WINTER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_RAGE_OF_THE_SKIES);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f0f6f59192e4e3512a908a969948fa43daa0e08d7938f67d0ff901830f0eabf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1362, + "startColumn": 2, + "charOffset": 56489, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1360, + "startColumn": 2, + "charOffset": 56322, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STONE_SHOWER_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_THUNDERSTORM_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ETERNAL_WINTER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_RAGE_OF_THE_SKIES);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_TERRA_WAVE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfd88bbbb5d4cbc7ebc0414dd87a2f089b3c185e35573be4064762ad6cde04a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1363, + "startColumn": 2, + "charOffset": 56569, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1361, + "startColumn": 2, + "charOffset": 56405, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_THUNDERSTORM_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ETERNAL_WINTER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_RAGE_OF_THE_SKIES);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_TERRA_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ICE_WAVE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "131d83c4db9cdd7ed152171668bff6d35259568cccda934d5f98af94990f419b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1364, + "startColumn": 2, + "charOffset": 56652, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1362, + "startColumn": 2, + "charOffset": 56488, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ETERNAL_WINTER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_RAGE_OF_THE_SKIES);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_TERRA_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ICE_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DIVINE_MISSILE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79502816433ae9ed008bcd30a9bac5fc9e2e5851ab91583c8126e177d741a62b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1365, + "startColumn": 2, + "charOffset": 56728, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1363, + "startColumn": 2, + "charOffset": 56568, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_RAGE_OF_THE_SKIES);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_TERRA_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ICE_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DIVINE_MISSILE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_WOUND_CLEANSING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a67dbe5337cbbc864542bb45872826ef1b9ad530c4fede95dab5fc635338b41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1366, + "startColumn": 2, + "charOffset": 56802, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1364, + "startColumn": 2, + "charOffset": 56651, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_TERRA_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ICE_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DIVINE_MISSILE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_WOUND_CLEANSING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DIVINE_CALDERA);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "478499b87a203ea9a49ff773ce2b10d0b012499784189bc7b3d2b8d7047d4b5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1367, + "startColumn": 2, + "charOffset": 56882, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1365, + "startColumn": 2, + "charOffset": 56727, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ICE_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DIVINE_MISSILE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_WOUND_CLEANSING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DIVINE_CALDERA);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DIVINE_HEALING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "91e5135c4569416f25bb5c60be2a3275beffb88d05b031ed8a5cb968b7095d15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1368, + "startColumn": 2, + "charOffset": 56963, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1366, + "startColumn": 2, + "charOffset": 56801, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DIVINE_MISSILE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_WOUND_CLEANSING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DIVINE_CALDERA);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DIVINE_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_TRAIN_PARTY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c630014a135be8ef92137c91dc39b24af1d8339f86f925c226d9ddd3882ed7a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1369, + "startColumn": 2, + "charOffset": 57043, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1367, + "startColumn": 2, + "charOffset": 56881, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_WOUND_CLEANSING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DIVINE_CALDERA);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DIVINE_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_TRAIN_PARTY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PROTECT_PARTY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "965ad3ec817a5eafbcc053303df04df7f06a2173976927d310e8d56c93bf720f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1370, + "startColumn": 2, + "charOffset": 57123, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1368, + "startColumn": 2, + "charOffset": 56962, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DIVINE_CALDERA);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DIVINE_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_TRAIN_PARTY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PROTECT_PARTY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HEAL_PARTY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22a28fb48fa55d7ab9b5917bb19f3ee202c9d482269b8c3c484c2bb94d5063c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1371, + "startColumn": 2, + "charOffset": 57200, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1369, + "startColumn": 2, + "charOffset": 57042, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DIVINE_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_TRAIN_PARTY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PROTECT_PARTY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HEAL_PARTY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENCHANT_PARTY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf8ffef72b64570b542e089b63ff6eade420cddfd0b6adf19522a3431ef18331" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1372, + "startColumn": 2, + "charOffset": 57279, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1370, + "startColumn": 2, + "charOffset": 57122, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_TRAIN_PARTY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PROTECT_PARTY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HEAL_PARTY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENCHANT_PARTY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HOLY_MISSILE_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cfe07c11f5ba008c8612706f0387b9013a966cd4dbbb211b50d998681162c3a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1373, + "startColumn": 2, + "charOffset": 57355, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1371, + "startColumn": 2, + "charOffset": 57199, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PROTECT_PARTY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HEAL_PARTY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENCHANT_PARTY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HOLY_MISSILE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CHARGE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a987e393c2235abe5a9450d6cb0fc82987c4f3b235d0067c3867cf41d7ba5911" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1374, + "startColumn": 2, + "charOffset": 57434, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1372, + "startColumn": 2, + "charOffset": 57278, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HEAL_PARTY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENCHANT_PARTY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HOLY_MISSILE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CHARGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PROTECTOR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67870f6e45096048b8bd372f40818c56f3310d2b07d29cf764a96f5b652d9d62" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1375, + "startColumn": 2, + "charOffset": 57517, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1373, + "startColumn": 2, + "charOffset": 57354, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENCHANT_PARTY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HOLY_MISSILE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CHARGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PROTECTOR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_BLOOD_RAGE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39a0d205e38170186802358468e186f819db26254329cc12a35d9c2a1c843353" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1376, + "startColumn": 2, + "charOffset": 57589, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1374, + "startColumn": 2, + "charOffset": 57433, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HOLY_MISSILE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CHARGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PROTECTOR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_BLOOD_RAGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SWIFT_FOOT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83defcaf3e79c2d4b0b871b6a285fcc105071d29249156bfca723278f585093f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1377, + "startColumn": 2, + "charOffset": 57664, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1375, + "startColumn": 2, + "charOffset": 57516, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CHARGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PROTECTOR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_BLOOD_RAGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SWIFT_FOOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SHARPSHOOTER);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44a590670f76b670265a1621654492fea2102f7b42ede5af6367910e6c3c21c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1378, + "startColumn": 2, + "charOffset": 57740, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1376, + "startColumn": 2, + "charOffset": 57588, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PROTECTOR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_BLOOD_RAGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SWIFT_FOOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SHARPSHOOTER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_IGNITE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb47243ef7faa0d93e61a48f81eff1975a6a6d51c1bb91844edd2603c317f697" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1379, + "startColumn": 2, + "charOffset": 57816, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1377, + "startColumn": 2, + "charOffset": 57663, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_BLOOD_RAGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SWIFT_FOOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SHARPSHOOTER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_IGNITE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURSE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59f19eae715c1077bb921e80385fb05579bcc06ce2e7b2a7edf110d1a46882e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1380, + "startColumn": 2, + "charOffset": 57894, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1378, + "startColumn": 2, + "charOffset": 57739, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SWIFT_FOOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SHARPSHOOTER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_IGNITE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURSE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ELECTRIFY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8a2eace05747d15786a3177997f5003d7af943ed95d766f53a63af21026f00e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1381, + "startColumn": 2, + "charOffset": 57966, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1379, + "startColumn": 2, + "charOffset": 57815, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SHARPSHOOTER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_IGNITE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURSE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ELECTRIFY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INFLICT_WOUND);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbd1448b270c68bc7e7549566a4bc2dca0bb7f74d6e19249fac7b7c36590140b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1382, + "startColumn": 2, + "charOffset": 58037, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1380, + "startColumn": 2, + "charOffset": 57893, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_IGNITE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURSE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ELECTRIFY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INFLICT_WOUND);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENVENOM);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62517877043d2cba459c948346f0f5a094b8404226c1fc822575569b833f55fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1383, + "startColumn": 2, + "charOffset": 58112, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1381, + "startColumn": 2, + "charOffset": 57965, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURSE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ELECTRIFY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INFLICT_WOUND);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENVENOM);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HOLY_FLASH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c0e99fba9a5626ccbf199c39715bf09e1ccaea33bff60f2b8ec68070e7b9fa9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1384, + "startColumn": 2, + "charOffset": 58191, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1382, + "startColumn": 2, + "charOffset": 58036, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ELECTRIFY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INFLICT_WOUND);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENVENOM);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HOLY_FLASH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_BLEEDING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c7880094fb4fb781efaa77076b4627f99cd7ad9c2d0e26a79867ff43afeb14c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1385, + "startColumn": 2, + "charOffset": 58264, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1383, + "startColumn": 2, + "charOffset": 58111, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INFLICT_WOUND);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENVENOM);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HOLY_FLASH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_BLEEDING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_BURNING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a67dbe5337cbbc864542bb45872826ef1b9ad530c4fede95dab5fc635338b41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1386, + "startColumn": 2, + "charOffset": 58340, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1384, + "startColumn": 2, + "charOffset": 58190, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ENVENOM);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HOLY_FLASH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_BLEEDING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_BURNING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_ELECTRIFICATION);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "18e6381aba6442a034d1f87783454b61702055282180eda11683f97cf6d69108" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1387, + "startColumn": 2, + "charOffset": 58419, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1385, + "startColumn": 2, + "charOffset": 58263, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_HOLY_FLASH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_BLEEDING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_BURNING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_ELECTRIFICATION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_CURSE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5adfb4213a82e7dd3551e9154586420b4b3805752624d066736d42a551b8c9b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1388, + "startColumn": 2, + "charOffset": 58497, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1386, + "startColumn": 2, + "charOffset": 58339, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_BLEEDING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_BURNING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_ELECTRIFICATION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_CURSE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PHYSICAL_STRIKE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c77f6a4b7a1539a93675b59a25c1941e00b17e39a0c64b7d59d69eafb7e6e42d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1389, + "startColumn": 2, + "charOffset": 58583, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1387, + "startColumn": 2, + "charOffset": 58418, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_BURNING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_ELECTRIFICATION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_CURSE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PHYSICAL_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHTNING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa7000df60f3085d8ef139c09abe9e78dfcdc4a25ba0c35027a7422fc429c1de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1390, + "startColumn": 2, + "charOffset": 58659, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1388, + "startColumn": 2, + "charOffset": 58496, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_ELECTRIFICATION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_CURSE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PHYSICAL_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHTNING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_FLAME_STRIKE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22a28fb48fa55d7ab9b5917bb19f3ee202c9d482269b8c3c484c2bb94d5063c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1391, + "startColumn": 2, + "charOffset": 58740, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1389, + "startColumn": 2, + "charOffset": 58582, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CURE_CURSE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PHYSICAL_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHTNING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_FLAME_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_ENERGY_STRIKE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75e64bbe0d0b1c02834019bd758d680edf7328c01d519221a9bfeb63c4ca3ed0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1392, + "startColumn": 2, + "charOffset": 58815, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1390, + "startColumn": 2, + "charOffset": 58658, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PHYSICAL_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHTNING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_FLAME_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_ENERGY_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_ICE_STRIKE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cfe07c11f5ba008c8612706f0387b9013a966cd4dbbb211b50d998681162c3a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1393, + "startColumn": 2, + "charOffset": 58900, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1391, + "startColumn": 2, + "charOffset": 58739, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHTNING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_FLAME_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_ENERGY_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_ICE_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_TERRA_STRIKE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "168bfe9f7b1d82b0469e57352c39a7cec5cf2e33419c74bc4b9b17c29dfc35f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1394, + "startColumn": 2, + "charOffset": 58986, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1392, + "startColumn": 2, + "charOffset": 58814, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_FLAME_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_ENERGY_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_ICE_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_TERRA_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_FLAME_STRIKE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f7397933c409034905fd1516cc26246b95713199329da8cc09ae235cafa4c1f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1395, + "startColumn": 2, + "charOffset": 59069, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1393, + "startColumn": 2, + "charOffset": 58899, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_ENERGY_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_ICE_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_TERRA_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_FLAME_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_ENERGY_STRIKE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d60279bba07c4295699aa6475787dd89b342d1fe96bb9db667bb71e8da74ea08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1396, + "startColumn": 2, + "charOffset": 59154, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1394, + "startColumn": 2, + "charOffset": 58985, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_ICE_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_TERRA_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_FLAME_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_ENERGY_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_ICE_STRIKE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c52c847b47224029edc3e19896fac3b31fc407a2eda5b2df3cb201b6186ee24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1397, + "startColumn": 2, + "charOffset": 59241, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1395, + "startColumn": 2, + "charOffset": 59068, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_STRONG_TERRA_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_FLAME_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_ENERGY_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_ICE_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_TERRA_STRIKE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3403a159c76d3c9c3261f579441b74ffeedcd513bb73177337446f1ef5d132d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1398, + "startColumn": 2, + "charOffset": 59329, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1396, + "startColumn": 2, + "charOffset": 59153, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_FLAME_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_ENERGY_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_ICE_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_TERRA_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INTENSE_WOUND_CLEANSING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e676d591298ef27e2dff2b9b91bf47e0d723241611c95a0e089132e74e41f295" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1399, + "startColumn": 2, + "charOffset": 59414, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1397, + "startColumn": 2, + "charOffset": 59240, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_ENERGY_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_ICE_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_TERRA_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INTENSE_WOUND_CLEANSING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_RECOVERY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "273bf5ee4c51110215e23a068a73651a1eddbca26a811fe6840f470a745db970" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1400, + "startColumn": 2, + "charOffset": 59501, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1398, + "startColumn": 2, + "charOffset": 59328, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_ICE_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_TERRA_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INTENSE_WOUND_CLEANSING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_RECOVERY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INTENSE_RECOVERY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9594c835221e6f6745e9824d0f6c7d0772279ae50deda4022b3c5bd1376b6b7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1401, + "startColumn": 2, + "charOffset": 59590, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1399, + "startColumn": 2, + "charOffset": 59413, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ULTIMATE_TERRA_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INTENSE_WOUND_CLEANSING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_RECOVERY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INTENSE_RECOVERY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PRACTISE_HEALING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dcc394b6e42aa6b47b3db9790dc9732da9b2d1a4403abd589a39022f1544e8cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1402, + "startColumn": 2, + "charOffset": 59664, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1400, + "startColumn": 2, + "charOffset": 59500, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INTENSE_WOUND_CLEANSING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_RECOVERY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INTENSE_RECOVERY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PRACTISE_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PRACTISE_FIRE_WAVE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81511d344280d810039c455373b472eaa4a438718b3c079d8a813a0f65a946fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1403, + "startColumn": 2, + "charOffset": 59746, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1401, + "startColumn": 2, + "charOffset": 59589, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_RECOVERY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INTENSE_RECOVERY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PRACTISE_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PRACTISE_FIRE_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PRACTISE_MAGIC_MISSILE_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b4afda5d2644e9ab528b6c0d6572bf9c13f73bc6d796341257e540878ec732d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1404, + "startColumn": 2, + "charOffset": 59828, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1402, + "startColumn": 2, + "charOffset": 59663, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_INTENSE_RECOVERY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PRACTISE_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PRACTISE_FIRE_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PRACTISE_MAGIC_MISSILE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_APPRENT_ICES_STRIKE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6636276567ddd9828b2bdeffc2d86002b63515b9399e19f628e6db0712372bbf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1405, + "startColumn": 2, + "charOffset": 59912, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1403, + "startColumn": 2, + "charOffset": 59745, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PRACTISE_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PRACTISE_FIRE_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PRACTISE_MAGIC_MISSILE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_APPRENT_ICES_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MUD_ATTACK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f53cc1ab3cf1e65967a4e2d2be4c19b77f6cfac3853794613d98ffb6ec0eb76f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1406, + "startColumn": 2, + "charOffset": 60005, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1404, + "startColumn": 2, + "charOffset": 59827, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PRACTISE_FIRE_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PRACTISE_MAGIC_MISSILE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_APPRENT_ICES_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MUD_ATTACK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CHILL_OUT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0b7ee2f63b3cb742d503db6f98746e2a2bdce20d88b3275e4bede4535e3566f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1407, + "startColumn": 2, + "charOffset": 60090, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1405, + "startColumn": 2, + "charOffset": 59911, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_PRACTISE_MAGIC_MISSILE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_APPRENT_ICES_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MUD_ATTACK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CHILL_OUT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MAGIC_PATCH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8e0b50787d650b20eaaf7161a029e0bb3d48af95ea95efa669f721f7048c3a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1408, + "startColumn": 2, + "charOffset": 60166, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1406, + "startColumn": 2, + "charOffset": 60004, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_APPRENT_ICES_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MUD_ATTACK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CHILL_OUT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MAGIC_PATCH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_BRUISE_BANE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05e1ac024be5413d0a161388753392618407491fcd9da5079a72a3fda1b7c09e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1409, + "startColumn": 2, + "charOffset": 60241, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1407, + "startColumn": 2, + "charOffset": 60089, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MUD_ATTACK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CHILL_OUT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MAGIC_PATCH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_BRUISE_BANE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ARROW_CALL);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56f9d16832ce58d89d5d68142dc1b43a1d9b11bf67ed95c6ad816d54c18160ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1410, + "startColumn": 2, + "charOffset": 60318, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1408, + "startColumn": 2, + "charOffset": 60165, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CHILL_OUT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MAGIC_PATCH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_BRUISE_BANE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ARROW_CALL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_BUZZ);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d5feac66e489c6044da841c77d59ff5c0df00ae5f085c56247ed494c5396063" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1411, + "startColumn": 2, + "charOffset": 60395, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1409, + "startColumn": 2, + "charOffset": 60240, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_MAGIC_PATCH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_BRUISE_BANE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ARROW_CALL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_BUZZ);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SCORCH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e000f8ef69850ca329c5968f3685d4f497137237682fb2e1f1cc226e2602927a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1412, + "startColumn": 2, + "charOffset": 60471, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1410, + "startColumn": 2, + "charOffset": 60317, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_BRUISE_BANE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ARROW_CALL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_BUZZ);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SCORCH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHTEST_MISSILE_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26c0f399e528a2614d7dc9fdd15018cabf4e65de47d1054491b82a8498f0c5a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1413, + "startColumn": 2, + "charOffset": 60541, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1411, + "startColumn": 2, + "charOffset": 60394, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_ARROW_CALL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_BUZZ);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SCORCH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHTEST_MISSILE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHT_STONE_SHOWER_RUNE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b4edd5a6fefffc222beab8b738f4404a0eaff1521755c6d8fcadc0e847c34cdc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1414, + "startColumn": 2, + "charOffset": 60613, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1412, + "startColumn": 2, + "charOffset": 60470, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_BUZZ);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SCORCH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHTEST_MISSILE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHT_STONE_SHOWER_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUMMON_KNIGHT_FAMILIAR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21abc083bbfa9782385000de93246b089bc8afb09a0edc47f2ac56b409e48131" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1415, + "startColumn": 2, + "charOffset": 60700, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1413, + "startColumn": 2, + "charOffset": 60540, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SCORCH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHTEST_MISSILE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHT_STONE_SHOWER_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUMMON_KNIGHT_FAMILIAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUMMON_PALADIN_FAMILIAR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b097497e4dd49928b15e38532fa766849630de8a0f8d6d21a5f42939a904b1b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1416, + "startColumn": 2, + "charOffset": 60789, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1414, + "startColumn": 2, + "charOffset": 60612, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHTEST_MISSILE_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHT_STONE_SHOWER_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUMMON_KNIGHT_FAMILIAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUMMON_PALADIN_FAMILIAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUMMON_SORCERER_FAMILIAR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d657820a2ae8a04013f2ce7e5391020d8274331b214535dd1e238730be20655c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1417, + "startColumn": 2, + "charOffset": 60877, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1415, + "startColumn": 2, + "charOffset": 60699, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_LIGHT_STONE_SHOWER_RUNE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUMMON_KNIGHT_FAMILIAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUMMON_PALADIN_FAMILIAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUMMON_SORCERER_FAMILIAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUMMON_DRUID_FAMILIAR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "164b52849b322522ce259a4fb7d0d6c7cd39a2d5a300758c0dba034f8b0e0abd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1418, + "startColumn": 2, + "charOffset": 60966, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1416, + "startColumn": 2, + "charOffset": 60788, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUMMON_KNIGHT_FAMILIAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUMMON_PALADIN_FAMILIAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUMMON_SORCERER_FAMILIAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUMMON_DRUID_FAMILIAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CHIVALROUS_CHALLENGE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8a2eace05747d15786a3177997f5003d7af943ed95d766f53a63af21026f00e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1419, + "startColumn": 2, + "charOffset": 61056, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1417, + "startColumn": 2, + "charOffset": 60876, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUMMON_PALADIN_FAMILIAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUMMON_SORCERER_FAMILIAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUMMON_DRUID_FAMILIAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CHIVALROUS_CHALLENGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DIVINE_DAZZLE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "294c3cc5f1bde55fb034cdec03535e34bb2ee82b9ec609998588ecafa993d86c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1420, + "startColumn": 2, + "charOffset": 61143, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1418, + "startColumn": 2, + "charOffset": 60965, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUMMON_SORCERER_FAMILIAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUMMON_DRUID_FAMILIAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CHIVALROUS_CHALLENGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DIVINE_DAZZLE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FAIR_WOUND_CLEANSING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa7000df60f3085d8ef139c09abe9e78dfcdc4a25ba0c35027a7422fc429c1de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1421, + "startColumn": 2, + "charOffset": 61229, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1419, + "startColumn": 2, + "charOffset": 61055, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SUMMON_DRUID_FAMILIAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CHIVALROUS_CHALLENGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DIVINE_DAZZLE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FAIR_WOUND_CLEANSING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_GREAT_FIRE_WAVE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e4cafd07c9e27ebf48696a48ffeba36175ef75fef15db92c63170ce37842533" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1422, + "startColumn": 2, + "charOffset": 61308, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1420, + "startColumn": 2, + "charOffset": 61142, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CHIVALROUS_CHALLENGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DIVINE_DAZZLE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FAIR_WOUND_CLEANSING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_GREAT_FIRE_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_RESTORATION);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46dd273de3c0426927cec7f3937335e05d38442e7ccbd43937f12be972404df8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1423, + "startColumn": 2, + "charOffset": 61394, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1421, + "startColumn": 2, + "charOffset": 61228, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_DIVINE_DAZZLE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FAIR_WOUND_CLEANSING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_GREAT_FIRE_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_RESTORATION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_NATURES_EMBRACE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e342efaeae953e3968c6ecd901b3442b3aded2734475a3e61ebfdac45b7f60cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1424, + "startColumn": 2, + "charOffset": 61475, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1422, + "startColumn": 2, + "charOffset": 61307, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_FAIR_WOUND_CLEANSING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_GREAT_FIRE_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_RESTORATION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_NATURES_EMBRACE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_EXPOSE_WEAKNESS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22a28fb48fa55d7ab9b5917bb19f3ee202c9d482269b8c3c484c2bb94d5063c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1425, + "startColumn": 2, + "charOffset": 61552, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1423, + "startColumn": 2, + "charOffset": 61393, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_GREAT_FIRE_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_RESTORATION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_NATURES_EMBRACE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_EXPOSE_WEAKNESS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SAP_STRENGTH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf8ffef72b64570b542e089b63ff6eade420cddfd0b6adf19522a3431ef18331" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1426, + "startColumn": 2, + "charOffset": 61633, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1424, + "startColumn": 2, + "charOffset": 61474, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_RESTORATION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_NATURES_EMBRACE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_EXPOSE_WEAKNESS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SAP_STRENGTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CANCEL_MAGIC_SHIELD);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e676d591298ef27e2dff2b9b91bf47e0d723241611c95a0e089132e74e41f295" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1427, + "startColumn": 2, + "charOffset": 61714, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1425, + "startColumn": 2, + "charOffset": 61551, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_NATURES_EMBRACE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_EXPOSE_WEAKNESS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SAP_STRENGTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CANCEL_MAGIC_SHIELD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_FIRE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c52c847b47224029edc3e19896fac3b31fc407a2eda5b2df3cb201b6186ee24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1428, + "startColumn": 2, + "charOffset": 61792, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1426, + "startColumn": 2, + "charOffset": 61632, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_EXPOSE_WEAKNESS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SAP_STRENGTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CANCEL_MAGIC_SHIELD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_FIRE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_ENERGY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7c283220d549e0f728e9ab45e80a0a592da793339fa4d467f134a4a5f26ff15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1429, + "startColumn": 2, + "charOffset": 61877, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1427, + "startColumn": 2, + "charOffset": 61713, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_SAP_STRENGTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CANCEL_MAGIC_SHIELD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_FIRE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_ENERGY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_EARTH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62517877043d2cba459c948346f0f5a094b8404226c1fc822575569b833f55fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1430, + "startColumn": 2, + "charOffset": 61969, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1428, + "startColumn": 2, + "charOffset": 61791, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SPELL_CANCEL_MAGIC_SHIELD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_FIRE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_ENERGY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_EARTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_ICE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9cedcaa0610027c744eba0838fbe819744f593d2dee1a19d111c9c0172b07a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1431, + "startColumn": 2, + "charOffset": 62063, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1429, + "startColumn": 2, + "charOffset": 61876, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_FIRE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_ENERGY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_EARTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_ICE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fda1a85000ff93d4952989d5694647fb65bac3262350a6dd51ada913da24347" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1432, + "startColumn": 2, + "charOffset": 62156, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1430, + "startColumn": 2, + "charOffset": 61968, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_ENERGY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_EARTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_ICE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_HOLY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10443931e1cc3324ee0d61862c42bde5a3ba72f564f0318092c1f277260e6d04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1433, + "startColumn": 2, + "charOffset": 62247, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1431, + "startColumn": 2, + "charOffset": 62062, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_EARTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_ICE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_HOLY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_HIT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17c014a8593ce552441fb30d9165b4b8d012e65c930bdd6452b220b7ad93f04a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1434, + "startColumn": 2, + "charOffset": 62340, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1432, + "startColumn": 2, + "charOffset": 62155, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_ICE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_HOLY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_LIFEDRAIN);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79be21c3303c7adb99271b45eeedc5e814acf467b27dd7107c7ee60f6d10453a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1435, + "startColumn": 2, + "charOffset": 62432, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1433, + "startColumn": 2, + "charOffset": 62246, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_HOLY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_LIFEDRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_MANADRAIN);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1762e1379b455aa81b07410fea8c34ec42053b38b28263f1c3a79616a3d6b691" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1436, + "startColumn": 2, + "charOffset": 62523, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1434, + "startColumn": 2, + "charOffset": 62339, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_HOLY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_LIFEDRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_MANADRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_DROWNING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1de7290d224e411f54a4bcf9616fb5f4673fac69856fe0df31524ad6ec72f5ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1437, + "startColumn": 2, + "charOffset": 62620, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1435, + "startColumn": 2, + "charOffset": 62431, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_LIFEDRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_MANADRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_DROWNING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_BLEEDING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82b3be4b8ecad47538d4176469bf62d3427e9aa2174d6049dcfaaae4b1149f04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1438, + "startColumn": 2, + "charOffset": 62717, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1436, + "startColumn": 2, + "charOffset": 62522, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_LIFEDRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_MANADRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_DROWNING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_BLEEDING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_HEALING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31c7f01fcd9538c3391da7f564d2633857f8f775fac084c9f408786496f5bd82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1439, + "startColumn": 2, + "charOffset": 62813, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1437, + "startColumn": 2, + "charOffset": 62619, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_MANADRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_DROWNING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_BLEEDING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_FIRE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e887526b12e41b36a75909435d11220a2285e91f99b5d01402546c0fb8374f23" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1440, + "startColumn": 2, + "charOffset": 62909, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1438, + "startColumn": 2, + "charOffset": 62716, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_DROWNING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_BLEEDING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_FIRE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_ENERGY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d60279bba07c4295699aa6475787dd89b342d1fe96bb9db667bb71e8da74ea08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1441, + "startColumn": 2, + "charOffset": 63004, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1439, + "startColumn": 2, + "charOffset": 62812, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_BLEEDING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_FIRE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_ENERGY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_EARTH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b097497e4dd49928b15e38532fa766849630de8a0f8d6d21a5f42939a904b1b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1442, + "startColumn": 2, + "charOffset": 63093, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1440, + "startColumn": 2, + "charOffset": 62908, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SINGLE_TARGET_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_FIRE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_ENERGY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_EARTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_ICE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d657820a2ae8a04013f2ce7e5391020d8274331b214535dd1e238730be20655c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1443, + "startColumn": 2, + "charOffset": 63184, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1441, + "startColumn": 2, + "charOffset": 63003, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_FIRE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_ENERGY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_EARTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_ICE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a05e01177b9aec0a38fae74c85d21eaccd206c2263fe0dd71aa9d06d86ef77e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1444, + "startColumn": 2, + "charOffset": 63274, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1442, + "startColumn": 2, + "charOffset": 63092, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_ENERGY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_EARTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_ICE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_HOLY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45b797c6a1e8b93f5087e0a0e3229f29a232d765e8a14ec5f7ba37b272a3a25a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1445, + "startColumn": 2, + "charOffset": 63362, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1443, + "startColumn": 2, + "charOffset": 63183, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_EARTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_ICE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_HOLY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_HIT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "266e32415905ba34f69dcc5ca77d8a0153782b47b735eb92e91d299a23f991b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1446, + "startColumn": 2, + "charOffset": 63452, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1444, + "startColumn": 2, + "charOffset": 63273, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_ICE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_HOLY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_LIFEDRAIN);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c80da0aea958cbaef6884bbee35caa2d5fbd86928607146692e78db66f96e410" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1447, + "startColumn": 2, + "charOffset": 63541, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1445, + "startColumn": 2, + "charOffset": 63361, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_HOLY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_LIFEDRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_MANADRAIN);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39a59dbe5ddc16ee212b9a3a4c56927ad1ce8fa8497679075b7c931dbdcf9084" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1448, + "startColumn": 2, + "charOffset": 63629, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1446, + "startColumn": 2, + "charOffset": 63451, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_HOLY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_LIFEDRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_MANADRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_DROWNING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c22ac3e9edee24b226a950bebfbd13cecd9d01c5e27b23d86b65d8887d814fda" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1449, + "startColumn": 2, + "charOffset": 63723, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1447, + "startColumn": 2, + "charOffset": 63540, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_LIFEDRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_MANADRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_DROWNING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_BLEEDING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e000f8ef69850ca329c5968f3685d4f497137237682fb2e1f1cc226e2602927a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1450, + "startColumn": 2, + "charOffset": 63817, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1448, + "startColumn": 2, + "charOffset": 63628, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_LIFEDRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_MANADRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_DROWNING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_BLEEDING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_HEALING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7045881d8168d4715c2682d2695502f9744557559777484935ba2e2cfbde76ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1451, + "startColumn": 2, + "charOffset": 63910, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1449, + "startColumn": 2, + "charOffset": 63722, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_MANADRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_DROWNING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_BLEEDING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_FIRE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb00badf143373071fbf5240013a1e6e6b17bdb48f193e2b49eaa10c739aab02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1452, + "startColumn": 2, + "charOffset": 64003, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1450, + "startColumn": 2, + "charOffset": 63816, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_DROWNING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_BLEEDING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_FIRE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_ENERGY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f00275df631a9b6dd247a2ce8b1e8a0dca51ec605e377bfe6c058507a1d5559d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1453, + "startColumn": 2, + "charOffset": 64095, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1451, + "startColumn": 2, + "charOffset": 63909, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_BLEEDING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_FIRE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_ENERGY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_EARTH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b20250b394580b56e9b874b0cb3051ed5461f0be4d85b72371cb50bdc24ec8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1454, + "startColumn": 2, + "charOffset": 64184, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1452, + "startColumn": 2, + "charOffset": 64002, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SMALL_AREA_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_FIRE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_ENERGY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_EARTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_ICE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19af95c8454cda06126400d5ab5f38aeec27c61bddc6b170c9eff5c19f460df2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1455, + "startColumn": 2, + "charOffset": 64275, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1453, + "startColumn": 2, + "charOffset": 64094, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_FIRE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_ENERGY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_EARTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_ICE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32790bab751198813d3bd26f20cce3d6f13883fc11e3315ffe992e1d85fd60cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1456, + "startColumn": 2, + "charOffset": 64365, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1454, + "startColumn": 2, + "charOffset": 64183, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_ENERGY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_EARTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_ICE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_HOLY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9594c835221e6f6745e9824d0f6c7d0772279ae50deda4022b3c5bd1376b6b7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1457, + "startColumn": 2, + "charOffset": 64453, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1455, + "startColumn": 2, + "charOffset": 64274, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_EARTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_ICE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_HOLY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_HIT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21abc083bbfa9782385000de93246b089bc8afb09a0edc47f2ac56b409e48131" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1458, + "startColumn": 2, + "charOffset": 64543, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1456, + "startColumn": 2, + "charOffset": 64364, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_ICE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_HOLY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_LIFEDRAIN);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2991b54d9b5c4ae4dd3144e6042a60bb364b60997964b950ac8ecc4f4e9ac446" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1459, + "startColumn": 2, + "charOffset": 64632, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1457, + "startColumn": 2, + "charOffset": 64452, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_HOLY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_LIFEDRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_MANADRAIN);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a104afdcdc80b853577ed7469b64de37ef113282b40b90857a797d849bbd7a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1460, + "startColumn": 2, + "charOffset": 64720, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1458, + "startColumn": 2, + "charOffset": 64542, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_HOLY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_LIFEDRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_MANADRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_DROWNING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a05e01177b9aec0a38fae74c85d21eaccd206c2263fe0dd71aa9d06d86ef77e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1461, + "startColumn": 2, + "charOffset": 64814, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1459, + "startColumn": 2, + "charOffset": 64631, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_LIFEDRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_MANADRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_DROWNING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_BLEEDING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43077064cf82902a17a9ebd77f38b4b937288506990d71a65bbb4f69f776b3e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1462, + "startColumn": 2, + "charOffset": 64908, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1460, + "startColumn": 2, + "charOffset": 64719, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_LIFEDRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_MANADRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_DROWNING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_BLEEDING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_HEALING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb47243ef7faa0d93e61a48f81eff1975a6a6d51c1bb91844edd2603c317f697" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1463, + "startColumn": 2, + "charOffset": 65001, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1461, + "startColumn": 2, + "charOffset": 64813, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_MANADRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_DROWNING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_BLEEDING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_FIRE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2cc5c3d5fd3717b38d803310105370332b4c71214ec484f1bf95ff36084e7df5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1464, + "startColumn": 2, + "charOffset": 65094, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1462, + "startColumn": 2, + "charOffset": 64907, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_DROWNING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_BLEEDING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_FIRE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_ENERGY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42d77d57ab08a6b5a2d49afb3f87357c2a56145d307a8e49dadd48c5bdd128a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1465, + "startColumn": 2, + "charOffset": 65186, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1463, + "startColumn": 2, + "charOffset": 65000, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_BLEEDING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_FIRE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_ENERGY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_EARTH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5170135bad3fa8c30b1467dce87b394f58ed7fc60e7b0eb5d19fd7e46a1071f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1466, + "startColumn": 2, + "charOffset": 65269, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1464, + "startColumn": 2, + "charOffset": 65093, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_LARGE_AREA_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_FIRE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_ENERGY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_EARTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_ICE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83defcaf3e79c2d4b0b871b6a285fcc105071d29249156bfca723278f585093f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1467, + "startColumn": 2, + "charOffset": 65354, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1465, + "startColumn": 2, + "charOffset": 65185, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_FIRE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_ENERGY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_EARTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_ICE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5d50b4d425aa32d7989ecc0a680e56fbb831b33e10c84752fae8899d9199153" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1468, + "startColumn": 2, + "charOffset": 65438, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1466, + "startColumn": 2, + "charOffset": 65268, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_ENERGY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_EARTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_ICE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_HOLY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d5feac66e489c6044da841c77d59ff5c0df00ae5f085c56247ed494c5396063" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1469, + "startColumn": 2, + "charOffset": 65520, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1467, + "startColumn": 2, + "charOffset": 65353, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_EARTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_ICE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_HOLY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_HIT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ab64cfbdbee568ff459ec3459e0284dbd2f2490eb8f51528569a8940bcf0c62" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1470, + "startColumn": 2, + "charOffset": 65604, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1468, + "startColumn": 2, + "charOffset": 65437, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_ICE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_HOLY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_LIFEDRAIN);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24426399276b8a5a282477fefd22bd050813557e74dc4ba192ab4259853f08b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1471, + "startColumn": 2, + "charOffset": 65687, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1469, + "startColumn": 2, + "charOffset": 65519, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_HOLY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_LIFEDRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_MANADRAIN);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f51ebdc67ea64013d920e2f36bab4391fb1353b1ea51c797b5aeb2ad8429c07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1472, + "startColumn": 2, + "charOffset": 65769, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1470, + "startColumn": 2, + "charOffset": 65603, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_HOLY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_LIFEDRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_MANADRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_DROWNING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2cc5c3d5fd3717b38d803310105370332b4c71214ec484f1bf95ff36084e7df5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1473, + "startColumn": 2, + "charOffset": 65857, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1471, + "startColumn": 2, + "charOffset": 65686, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_LIFEDRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_MANADRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_DROWNING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_BLEEDING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52999ee52ac48f6a0cabd6b8beaaa0aba608a9a94db4f0e9a512f5a164c0d1fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1474, + "startColumn": 2, + "charOffset": 65945, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1472, + "startColumn": 2, + "charOffset": 65768, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_LIFEDRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_MANADRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_DROWNING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_BLEEDING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_HEALING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2787300baacf53e9ff1c822057c7ad72b42cf7530cd54b5363314da80e6cab4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1475, + "startColumn": 2, + "charOffset": 66032, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1473, + "startColumn": 2, + "charOffset": 65856, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_MANADRAIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_DROWNING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_BLEEDING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_DELETEFIELD);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ab64cfbdbee568ff459ec3459e0284dbd2f2490eb8f51528569a8940bcf0c62" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1476, + "startColumn": 2, + "charOffset": 66119, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1474, + "startColumn": 2, + "charOffset": 65944, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_DROWNING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_BLEEDING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_DELETEFIELD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_CHALLENGE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb892f2bba7370f355c93cbc774d0c25c4f46421528bdeb2908b96714a7bac24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1477, + "startColumn": 2, + "charOffset": 66205, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1475, + "startColumn": 2, + "charOffset": 66031, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_BLEEDING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_DELETEFIELD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_CHALLENGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SPEED);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "920828cd7c2540d77e20bdfc8e877d637a88fda7f62c47dbb85db8d266b31cc6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1478, + "startColumn": 2, + "charOffset": 66290, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1476, + "startColumn": 2, + "charOffset": 66118, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_WAVE_HEALING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_DELETEFIELD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_CHALLENGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SPEED);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_DRUNKEN);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc0c4db058447f4cbf2a1e8e96aa013e721ae652d7fc9a21af1077f6387aeaec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1479, + "startColumn": 2, + "charOffset": 66373, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1477, + "startColumn": 2, + "charOffset": 66204, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_DELETEFIELD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_CHALLENGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SPEED);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_DRUNKEN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_STRENGTH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef2856c0c34a0f34da29db7b250c05401088544f10bb15fdadb8140c0d28fd95" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1480, + "startColumn": 2, + "charOffset": 66452, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1478, + "startColumn": 2, + "charOffset": 66289, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_CHALLENGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SPEED);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_DRUNKEN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_STRENGTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_OUTFIT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bff340be5e062bb547ea60b8735744297364423e88a2a30ab34a4697d019732f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1481, + "startColumn": 2, + "charOffset": 66533, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1479, + "startColumn": 2, + "charOffset": 66372, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SPEED);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_DRUNKEN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_STRENGTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_OUTFIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SUMMON);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "327266c8471367aa6a5a755845e8af77f2bb150edc0052e701b77d3db47acd56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1482, + "startColumn": 2, + "charOffset": 66615, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1480, + "startColumn": 2, + "charOffset": 66451, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_DRUNKEN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_STRENGTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_OUTFIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SUMMON);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_MAGICLEVEL);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26c0f399e528a2614d7dc9fdd15018cabf4e65de47d1054491b82a8498f0c5a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1483, + "startColumn": 2, + "charOffset": 66695, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1481, + "startColumn": 2, + "charOffset": 66532, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_STRENGTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_OUTFIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SUMMON);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_MAGICLEVEL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_TELEPORT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aff798a0edf4b858d4c38be24b139863e33e3e59b8641a1e8af4c761e03b8693" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1484, + "startColumn": 2, + "charOffset": 66775, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1482, + "startColumn": 2, + "charOffset": 66614, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_OUTFIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SUMMON);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_MAGICLEVEL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_TELEPORT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_HEX);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa7000df60f3085d8ef139c09abe9e78dfcdc4a25ba0c35027a7422fc429c1de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1485, + "startColumn": 2, + "charOffset": 66859, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1483, + "startColumn": 2, + "charOffset": 66694, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SUMMON);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_MAGICLEVEL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_TELEPORT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_HEX);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SUPER_DRUNKEN);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a5ff74e32514a8d2f6e31f3a08c6807cc58226531ab27df3b82dbcda1054a757" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1486, + "startColumn": 2, + "charOffset": 66941, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1484, + "startColumn": 2, + "charOffset": 66774, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_MAGICLEVEL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_TELEPORT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_HEX);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SUPER_DRUNKEN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_ROOT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b4edd5a6fefffc222beab8b738f4404a0eaff1521755c6d8fcadc0e847c34cdc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1487, + "startColumn": 2, + "charOffset": 67018, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1485, + "startColumn": 2, + "charOffset": 66858, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_TELEPORT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_HEX);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SUPER_DRUNKEN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_ROOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_FEAR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f60694ffac8460c0a28debb8dcf4c6b8934edb516382fdd100f48b7830d9cd60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1488, + "startColumn": 2, + "charOffset": 67105, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1486, + "startColumn": 2, + "charOffset": 66940, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_HEX);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SUPER_DRUNKEN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_ROOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_FEAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_HIGHRISK_TELEPORT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "770e59e82dc7d9960ed2ba8fbac17f12aa9344df3877db02cdf4ef6c92709af9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1489, + "startColumn": 2, + "charOffset": 67183, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1487, + "startColumn": 2, + "charOffset": 67017, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_SUPER_DRUNKEN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_ROOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_FEAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_HIGHRISK_TELEPORT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_MINION);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fda1a85000ff93d4952989d5694647fb65bac3262350a6dd51ada913da24347" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1490, + "startColumn": 2, + "charOffset": 67261, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1488, + "startColumn": 2, + "charOffset": 67104, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_ROOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_FEAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_HIGHRISK_TELEPORT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_MINION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_AGONY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d60279bba07c4295699aa6475787dd89b342d1fe96bb9db667bb71e8da74ea08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1491, + "startColumn": 2, + "charOffset": 67352, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1489, + "startColumn": 2, + "charOffset": 67182, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_FEAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_HIGHRISK_TELEPORT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_MINION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_AGONY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AMPHIBIC_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "416477c5ee077b11c6feff1208f55ee8104a1cfde842645b23ce443240e23082" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1492, + "startColumn": 2, + "charOffset": 67432, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1490, + "startColumn": 2, + "charOffset": 67260, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_HIGHRISK_TELEPORT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_MINION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_AGONY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AMPHIBIC_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_BEAST_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6f6b1b91d3998d387042b158601ed5e6ff9265a9297f11ab3b71c8ef63bd66d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1493, + "startColumn": 2, + "charOffset": 67511, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1491, + "startColumn": 2, + "charOffset": 67351, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_MINION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_AGONY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AMPHIBIC_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_BEAST_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_CRITTER_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9256a7f24ee1ede94153f683889ccf5634157fa3e3901111c6ab188a53d3aa8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1494, + "startColumn": 2, + "charOffset": 67584, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1492, + "startColumn": 2, + "charOffset": 67431, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_SPELL_AGONY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AMPHIBIC_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_BEAST_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_CRITTER_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_DEEPLING_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c0e99fba9a5626ccbf199c39715bf09e1ccaea33bff60f2b8ec68070e7b9fa9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1495, + "startColumn": 2, + "charOffset": 67662, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1493, + "startColumn": 2, + "charOffset": 67510, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AMPHIBIC_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_BEAST_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_CRITTER_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_DEEPLING_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_QUARA_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0787ec3c7051e7b64abede64c3178c04c946981ff797c6532513a3386a829674" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1496, + "startColumn": 2, + "charOffset": 67742, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1494, + "startColumn": 2, + "charOffset": 67583, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_BEAST_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_CRITTER_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_DEEPLING_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_QUARA_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::BIRD_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d5feac66e489c6044da841c77d59ff5c0df00ae5f085c56247ed494c5396063" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1497, + "startColumn": 2, + "charOffset": 67823, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1495, + "startColumn": 2, + "charOffset": 67661, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_CRITTER_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_DEEPLING_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_QUARA_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::BIRD_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::CONSTRUCT_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eaf1d238147fe89dd24bbc95f6d077ea7da7b81bb20422eb818d5b9bdff7d67b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1498, + "startColumn": 2, + "charOffset": 67901, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1496, + "startColumn": 2, + "charOffset": 67741, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_DEEPLING_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_QUARA_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::BIRD_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::CONSTRUCT_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DEMON_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbcb1f1eb2cb99d2a115195351b7902ff82d9fb2c6357226309d5109a5be488a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1499, + "startColumn": 2, + "charOffset": 67970, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1497, + "startColumn": 2, + "charOffset": 67822, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_QUARA_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::BIRD_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::CONSTRUCT_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DEMON_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DRAGON_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "266e32415905ba34f69dcc5ca77d8a0153782b47b735eb92e91d299a23f991b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1500, + "startColumn": 2, + "charOffset": 68044, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1498, + "startColumn": 2, + "charOffset": 67900, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::BIRD_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::CONSTRUCT_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DEMON_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DRAGON_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_EARTH_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10443931e1cc3324ee0d61862c42bde5a3ba72f564f0318092c1f277260e6d04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1501, + "startColumn": 2, + "charOffset": 68114, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1499, + "startColumn": 2, + "charOffset": 67969, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::CONSTRUCT_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DEMON_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DRAGON_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_EARTH_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_ENERGY_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c52c847b47224029edc3e19896fac3b31fc407a2eda5b2df3cb201b6186ee24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1502, + "startColumn": 2, + "charOffset": 68185, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1500, + "startColumn": 2, + "charOffset": 68043, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DEMON_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DRAGON_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_EARTH_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_ENERGY_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_FIRE_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c09e1f3b62e07bcddc276cf735ca785d1037157cdb8d417ab3d07a8abe24096b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1503, + "startColumn": 2, + "charOffset": 68265, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1501, + "startColumn": 2, + "charOffset": 68113, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DRAGON_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_EARTH_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_ENERGY_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_FIRE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_WATER_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfd88bbbb5d4cbc7ebc0414dd87a2f089b3c185e35573be4064762ad6cde04a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1504, + "startColumn": 2, + "charOffset": 68346, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1502, + "startColumn": 2, + "charOffset": 68184, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_EARTH_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_ENERGY_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_FIRE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_WATER_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_BEAST_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf1d11081f96e756f24a84c25ea3eee86fce6a4677a746896d139e172a5fbbea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1505, + "startColumn": 2, + "charOffset": 68425, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1503, + "startColumn": 2, + "charOffset": 68264, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_ENERGY_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_FIRE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_WATER_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_BEAST_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_ENERGY_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7045881d8168d4715c2682d2695502f9744557559777484935ba2e2cfbde76ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1506, + "startColumn": 2, + "charOffset": 68505, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1504, + "startColumn": 2, + "charOffset": 68345, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_FIRE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_WATER_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_BEAST_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_ENERGY_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_HORROR_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2787300baacf53e9ff1c822057c7ad72b42cf7530cd54b5363314da80e6cab4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1507, + "startColumn": 2, + "charOffset": 68593, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1505, + "startColumn": 2, + "charOffset": 68424, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_WATER_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_BEAST_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_ENERGY_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_HORROR_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::FEY_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "538d839aa08b52da16d5c402313430d697d2ba0fd15ecb337f21a2d72fb1d4bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1508, + "startColumn": 2, + "charOffset": 68682, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1506, + "startColumn": 2, + "charOffset": 68504, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_BEAST_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_ENERGY_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_HORROR_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::FEY_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::GIANT_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5d50b4d425aa32d7989ecc0a680e56fbb831b33e10c84752fae8899d9199153" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1509, + "startColumn": 2, + "charOffset": 68771, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1507, + "startColumn": 2, + "charOffset": 68592, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_ENERGY_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_HORROR_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::FEY_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::GIANT_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_FEMALE_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a7ea62987736d9d37055e49a911b53701f8d53439d951311da278d81efb183f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1510, + "startColumn": 2, + "charOffset": 68839, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1508, + "startColumn": 2, + "charOffset": 68681, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_HORROR_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::FEY_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::GIANT_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_FEMALE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_MALE_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "234330370650ba1590081afdf074d2dd2093623032696fcd934c5b8f3de54141" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1511, + "startColumn": 2, + "charOffset": 68909, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1509, + "startColumn": 2, + "charOffset": 68770, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::FEY_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::GIANT_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_FEMALE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_MALE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMANOID_GOBLIN_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e4cafd07c9e27ebf48696a48ffeba36175ef75fef15db92c63170ce37842533" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1512, + "startColumn": 2, + "charOffset": 68986, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1510, + "startColumn": 2, + "charOffset": 68838, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::GIANT_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_FEMALE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_MALE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMANOID_GOBLIN_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMANOID_ORC_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d44032ce3117d0d3d738c2776f51a1a6672b50b1a426c887ce16b9d0c4905cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1513, + "startColumn": 2, + "charOffset": 69061, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1511, + "startColumn": 2, + "charOffset": 68908, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_FEMALE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_MALE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMANOID_GOBLIN_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMANOID_ORC_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::LYCANTHROPE_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21abc083bbfa9782385000de93246b089bc8afb09a0edc47f2ac56b409e48131" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1514, + "startColumn": 2, + "charOffset": 69141, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1512, + "startColumn": 2, + "charOffset": 68985, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_MALE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMANOID_GOBLIN_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMANOID_ORC_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::LYCANTHROPE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAGICAL_ENERGY_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02578e53e320d964e0431fc7f82eba0a0025e868bb91d96d201a4167689ab3c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1515, + "startColumn": 2, + "charOffset": 69218, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1513, + "startColumn": 2, + "charOffset": 69060, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMANOID_GOBLIN_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMANOID_ORC_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::LYCANTHROPE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAGICAL_ENERGY_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAGICAL_HORROR_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b4afda5d2644e9ab528b6c0d6572bf9c13f73bc6d796341257e540878ec732d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1516, + "startColumn": 2, + "charOffset": 69294, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1514, + "startColumn": 2, + "charOffset": 69140, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMANOID_ORC_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::LYCANTHROPE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAGICAL_ENERGY_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAGICAL_HORROR_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_BEAR_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac9fd7f37382a76801c51d085a56797c7e3dbb45829176ed7b31bb3690433e60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1517, + "startColumn": 2, + "charOffset": 69373, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1515, + "startColumn": 2, + "charOffset": 69217, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::LYCANTHROPE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAGICAL_ENERGY_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAGICAL_HORROR_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_BEAR_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_CRITTER_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31c7f01fcd9538c3391da7f564d2633857f8f775fac084c9f408786496f5bd82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1518, + "startColumn": 2, + "charOffset": 69452, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1516, + "startColumn": 2, + "charOffset": 69293, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAGICAL_ENERGY_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAGICAL_HORROR_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_BEAR_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_CRITTER_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_DOG_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79502816433ae9ed008bcd30a9bac5fc9e2e5851ab91583c8126e177d741a62b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1519, + "startColumn": 2, + "charOffset": 69528, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1517, + "startColumn": 2, + "charOffset": 69372, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAGICAL_HORROR_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_BEAR_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_CRITTER_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_DOG_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_ELEPHANT_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a67dbe5337cbbc864542bb45872826ef1b9ad530c4fede95dab5fc635338b41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1520, + "startColumn": 2, + "charOffset": 69607, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1518, + "startColumn": 2, + "charOffset": 69451, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_BEAR_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_CRITTER_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_DOG_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_ELEPHANT_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_FERAL_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "234330370650ba1590081afdf074d2dd2093623032696fcd934c5b8f3de54141" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1521, + "startColumn": 2, + "charOffset": 69682, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1519, + "startColumn": 2, + "charOffset": 69527, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_CRITTER_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_DOG_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_ELEPHANT_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_FERAL_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_HORSE_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "91e5135c4569416f25bb5c60be2a3275beffb88d05b031ed8a5cb968b7095d15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1522, + "startColumn": 2, + "charOffset": 69762, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1520, + "startColumn": 2, + "charOffset": 69606, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_DOG_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_ELEPHANT_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_FERAL_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_HORSE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_MAMMOTH_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "266e32415905ba34f69dcc5ca77d8a0153782b47b735eb92e91d299a23f991b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1523, + "startColumn": 2, + "charOffset": 69839, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1521, + "startColumn": 2, + "charOffset": 69681, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_ELEPHANT_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_FERAL_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_HORSE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_MAMMOTH_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5911c6d566550de0d40f231f032e7c15c0956310cc17cbd67d934a84264a3e87" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1524, + "startColumn": 2, + "charOffset": 69916, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1522, + "startColumn": 2, + "charOffset": 69761, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_FERAL_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_HORSE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_MAMMOTH_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::PHANTOM_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b097497e4dd49928b15e38532fa766849630de8a0f8d6d21a5f42939a904b1b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1525, + "startColumn": 2, + "charOffset": 69995, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1523, + "startColumn": 2, + "charOffset": 69838, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_HORSE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_MAMMOTH_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::PHANTOM_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::PLANT_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "146b9c6214ee0def3a1ed14ed9de35ced69c9ac0dc4fbd0cc3dc1605a9f7f0a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1526, + "startColumn": 2, + "charOffset": 70067, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1524, + "startColumn": 2, + "charOffset": 69915, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_MAMMOTH_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::PHANTOM_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::PLANT_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::REPTILE_LARGE_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0931c77bac4d1a838680712e9ecff5ffe1253794fe74a6c96c4d654c9262eb5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1527, + "startColumn": 2, + "charOffset": 70139, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1525, + "startColumn": 2, + "charOffset": 69994, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::PHANTOM_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::PLANT_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::REPTILE_LARGE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::REPTILE_SMALL_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f73dbe94c8175c6860d6d430c820f962913dbce691e932c7f6347f8a0e09c66b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1528, + "startColumn": 2, + "charOffset": 70209, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1526, + "startColumn": 2, + "charOffset": 70066, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::PHANTOM_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::PLANT_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::REPTILE_LARGE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::REPTILE_SMALL_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SLIME_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52999ee52ac48f6a0cabd6b8beaaa0aba608a9a94db4f0e9a512f5a164c0d1fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1529, + "startColumn": 2, + "charOffset": 70287, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1527, + "startColumn": 2, + "charOffset": 70138, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::PLANT_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::REPTILE_LARGE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::REPTILE_SMALL_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SLIME_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNDEAD_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a098d9bbc08eb2d6634bf4262765c9f5d762415e460c64d53e2bc743440b316e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1530, + "startColumn": 2, + "charOffset": 70365, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1528, + "startColumn": 2, + "charOffset": 70208, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::REPTILE_LARGE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::REPTILE_SMALL_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SLIME_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNDEAD_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_CRITTER_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86b571689b9ba0c4b26ae386962a4748560adae500c4f6917b7595aba9e2fde0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1531, + "startColumn": 2, + "charOffset": 70435, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1529, + "startColumn": 2, + "charOffset": 70286, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::REPTILE_SMALL_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SLIME_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNDEAD_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_CRITTER_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_INSECT_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22a28fb48fa55d7ab9b5917bb19f3ee202c9d482269b8c3c484c2bb94d5063c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1532, + "startColumn": 2, + "charOffset": 70506, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1530, + "startColumn": 2, + "charOffset": 70364, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SLIME_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNDEAD_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_CRITTER_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_INSECT_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_ROTWORM_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f7397933c409034905fd1516cc26246b95713199329da8cc09ae235cafa4c1f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1533, + "startColumn": 2, + "charOffset": 70585, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1531, + "startColumn": 2, + "charOffset": 70434, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNDEAD_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_CRITTER_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_INSECT_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_ROTWORM_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_SAGE_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df6bb5cb2bc675d2a5f884dc34271d1bfb1c5345107a38b0901af9b26fa7cf8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1534, + "startColumn": 2, + "charOffset": 70663, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1532, + "startColumn": 2, + "charOffset": 70505, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_CRITTER_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_INSECT_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_ROTWORM_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_SAGE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_CRONE_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "adde5c560639723319a73b7c9bd1e2bfc55535fed8809c38abf1fe4681aa5153" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1535, + "startColumn": 2, + "charOffset": 70742, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1533, + "startColumn": 2, + "charOffset": 70584, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_INSECT_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_ROTWORM_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_SAGE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_CRONE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::APE_BARK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f0f6f59192e4e3512a908a969948fa43daa0e08d7938f67d0ff901830f0eabf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1536, + "startColumn": 2, + "charOffset": 70817, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1534, + "startColumn": 2, + "charOffset": 70662, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_ROTWORM_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_SAGE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_CRONE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::APE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AMPHIBIC_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1461bbbff9d76d438c28eb6ab1970c9a67149f299c9e9c4527871990e40aa48" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1537, + "startColumn": 2, + "charOffset": 70893, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1535, + "startColumn": 2, + "charOffset": 70741, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_SAGE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_CRONE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::APE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AMPHIBIC_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_BEAST_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80c45f800d6339f50a5b8ed5143dad379c2b52e1505b696c80fd277d4a36267d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1538, + "startColumn": 2, + "charOffset": 70961, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1536, + "startColumn": 2, + "charOffset": 70816, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_CRONE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::APE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AMPHIBIC_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_BEAST_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_CRITTER_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7168cd45b141ee7e09ac817f6c6f9f2bbdc4e3430d7bfbf4d9805709222705d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1539, + "startColumn": 2, + "charOffset": 71035, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1537, + "startColumn": 2, + "charOffset": 70892, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::APE_BARK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AMPHIBIC_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_BEAST_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_CRITTER_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_DEEPLING_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2fba90e1ccf7c550a07855c374c8ed35fb0184aeeb71c581f4fcc11982d844f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1540, + "startColumn": 2, + "charOffset": 71114, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1538, + "startColumn": 2, + "charOffset": 70960, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AMPHIBIC_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_BEAST_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_CRITTER_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_DEEPLING_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_QUARA_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f60694ffac8460c0a28debb8dcf4c6b8934edb516382fdd100f48b7830d9cd60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1541, + "startColumn": 2, + "charOffset": 71195, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1539, + "startColumn": 2, + "charOffset": 71034, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_BEAST_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_CRITTER_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_DEEPLING_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_QUARA_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::BIRD_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "926c9543849d6a190d149eb7078845a7252cd66335712b76f2521791b49df84d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1542, + "startColumn": 2, + "charOffset": 71277, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1540, + "startColumn": 2, + "charOffset": 71113, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_CRITTER_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_DEEPLING_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_QUARA_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::BIRD_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::CONSTRUCT_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9594c835221e6f6745e9824d0f6c7d0772279ae50deda4022b3c5bd1376b6b7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1543, + "startColumn": 2, + "charOffset": 71356, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1541, + "startColumn": 2, + "charOffset": 71194, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_DEEPLING_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_QUARA_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::BIRD_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::CONSTRUCT_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DEMON_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb1f38ed64d64702238d1343b1497c7b3527d5360afe6079888b122a78ae2a4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1544, + "startColumn": 2, + "charOffset": 71426, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1542, + "startColumn": 2, + "charOffset": 71276, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::AQUATIC_QUARA_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::BIRD_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::CONSTRUCT_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DEMON_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DRAGON_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a71ff5c20d99e59e0beaccaf856550c6bb80c5e378e4db54fed8e898c9c176c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1545, + "startColumn": 2, + "charOffset": 71501, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1543, + "startColumn": 2, + "charOffset": 71355, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::BIRD_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::CONSTRUCT_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DEMON_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DRAGON_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_EARTH_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd4fe967b8a2451124345ef6e1d8c7c7fdcb7bbe5d3a7ddb10cd6397a5ef632d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1546, + "startColumn": 2, + "charOffset": 71572, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1544, + "startColumn": 2, + "charOffset": 71425, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::CONSTRUCT_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DEMON_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DRAGON_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_EARTH_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_ENERGY_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bff340be5e062bb547ea60b8735744297364423e88a2a30ab34a4697d019732f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1547, + "startColumn": 2, + "charOffset": 71644, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1545, + "startColumn": 2, + "charOffset": 71500, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DEMON_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DRAGON_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_EARTH_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_ENERGY_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_FIRE_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c80da0aea958cbaef6884bbee35caa2d5fbd86928607146692e78db66f96e410" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1548, + "startColumn": 2, + "charOffset": 71725, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1546, + "startColumn": 2, + "charOffset": 71571, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::DRAGON_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_EARTH_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_ENERGY_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_FIRE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_WATER_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e4cafd07c9e27ebf48696a48ffeba36175ef75fef15db92c63170ce37842533" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1549, + "startColumn": 2, + "charOffset": 71807, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1547, + "startColumn": 2, + "charOffset": 71643, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_EARTH_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_ENERGY_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_FIRE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_WATER_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_BEAST_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6bb769c25fdc64dc28bcb9b40fcdc6a787a2541792d519e012145b6d906ad457" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1550, + "startColumn": 2, + "charOffset": 71887, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1548, + "startColumn": 2, + "charOffset": 71724, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_ENERGY_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_FIRE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_WATER_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_BEAST_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_ENERGY_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5911c6d566550de0d40f231f032e7c15c0956310cc17cbd67d934a84264a3e87" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1551, + "startColumn": 2, + "charOffset": 71968, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1549, + "startColumn": 2, + "charOffset": 71806, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_FIRE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_WATER_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_BEAST_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_ENERGY_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_HORROR_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5998ec03422eb40e2828766def59f369deee2ba255bbfc9dbe421e295d9012ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1552, + "startColumn": 2, + "charOffset": 72057, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1550, + "startColumn": 2, + "charOffset": 71886, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ELEMENTAL_WATER_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_BEAST_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_ENERGY_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_HORROR_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::FEY_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1fdade37a0d817db4fa6b0597405799cb72367eadba401b5aed5065c29acb28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1553, + "startColumn": 2, + "charOffset": 72147, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1551, + "startColumn": 2, + "charOffset": 71967, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_BEAST_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_ENERGY_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_HORROR_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::FEY_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::GIANT_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "965ad3ec817a5eafbcc053303df04df7f06a2173976927d310e8d56c93bf720f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1554, + "startColumn": 2, + "charOffset": 72237, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1552, + "startColumn": 2, + "charOffset": 72056, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_ENERGY_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_HORROR_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::FEY_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::GIANT_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_FEMALE_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e4cafd07c9e27ebf48696a48ffeba36175ef75fef15db92c63170ce37842533" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1555, + "startColumn": 2, + "charOffset": 72306, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1553, + "startColumn": 2, + "charOffset": 72146, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::EXTRA_DIMENSIONAL_HORROR_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::FEY_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::GIANT_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_FEMALE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_MALE_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54fb84cb094dd239837b931a704729939a172fb5dc3a103baf80602f87090498" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1556, + "startColumn": 2, + "charOffset": 72377, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1554, + "startColumn": 2, + "charOffset": 72236, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::FEY_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::GIANT_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_FEMALE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_MALE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMANOID_GOBLIN_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df6bb5cb2bc675d2a5f884dc34271d1bfb1c5345107a38b0901af9b26fa7cf8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1557, + "startColumn": 2, + "charOffset": 72455, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1555, + "startColumn": 2, + "charOffset": 72305, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::GIANT_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_FEMALE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_MALE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMANOID_GOBLIN_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMANOID_ORC_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "adde5c560639723319a73b7c9bd1e2bfc55535fed8809c38abf1fe4681aa5153" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1558, + "startColumn": 2, + "charOffset": 72531, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1556, + "startColumn": 2, + "charOffset": 72376, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_FEMALE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_MALE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMANOID_GOBLIN_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMANOID_ORC_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::LYCANTHROPE_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc58d7b19614b2e79b520a7c39310e2a3a67a6b5c9980003812f603ba442f2b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1559, + "startColumn": 2, + "charOffset": 72612, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1557, + "startColumn": 2, + "charOffset": 72454, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_MALE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMANOID_GOBLIN_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMANOID_ORC_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::LYCANTHROPE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAGICAL_ENERGY_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a3a21eb6b6be7ff3cb7c4b6b676beb2ed364015fda85a9ab01e444769032bff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1560, + "startColumn": 2, + "charOffset": 72690, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1558, + "startColumn": 2, + "charOffset": 72530, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMANOID_GOBLIN_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMANOID_ORC_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::LYCANTHROPE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAGICAL_ENERGY_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAGICAL_HORROR_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc0c4db058447f4cbf2a1e8e96aa013e721ae652d7fc9a21af1077f6387aeaec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1561, + "startColumn": 2, + "charOffset": 72767, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1559, + "startColumn": 2, + "charOffset": 72611, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMANOID_ORC_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::LYCANTHROPE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAGICAL_ENERGY_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAGICAL_HORROR_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_BEAR_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d740a38e92ee10d53923fc5dcba1bb2df93afc207513f490c82d3d9bf85a3b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1562, + "startColumn": 2, + "charOffset": 72847, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1560, + "startColumn": 2, + "charOffset": 72689, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::LYCANTHROPE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAGICAL_ENERGY_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAGICAL_HORROR_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_BEAR_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_CRITTER_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a098d9bbc08eb2d6634bf4262765c9f5d762415e460c64d53e2bc743440b316e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1563, + "startColumn": 2, + "charOffset": 72927, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1561, + "startColumn": 2, + "charOffset": 72766, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAGICAL_ENERGY_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAGICAL_HORROR_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_BEAR_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_CRITTER_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_DOG_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e9ea143e03a0835f27d2451680617364ed9789426f917956bdf7a8adfa7f819" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1564, + "startColumn": 2, + "charOffset": 73004, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1562, + "startColumn": 2, + "charOffset": 72846, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAGICAL_HORROR_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_BEAR_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_CRITTER_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_DOG_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_ELEPHANT_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5478c2a80e3ba49c771cfd9e8d807011485f5f6f947210d89a9c4f0acfa598e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1565, + "startColumn": 2, + "charOffset": 73084, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1563, + "startColumn": 2, + "charOffset": 72926, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_BEAR_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_CRITTER_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_DOG_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_ELEPHANT_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_FERAL_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46dd273de3c0426927cec7f3937335e05d38442e7ccbd43937f12be972404df8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1566, + "startColumn": 2, + "charOffset": 73160, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1564, + "startColumn": 2, + "charOffset": 73003, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_CRITTER_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_DOG_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_ELEPHANT_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_FERAL_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_HORSE_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e75da0e8bc2ccbf119f8fae2c6b74c1f1d148960d5a615306625d35c86c2876d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1567, + "startColumn": 2, + "charOffset": 73241, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1565, + "startColumn": 2, + "charOffset": 73083, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_DOG_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_ELEPHANT_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_FERAL_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_HORSE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_MAMMOTH_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed9174418b5991e2566edfe99cdb107fc7590740e6b03f9d735e743372fc8fd9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1568, + "startColumn": 2, + "charOffset": 73319, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1566, + "startColumn": 2, + "charOffset": 73159, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_ELEPHANT_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_FERAL_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_HORSE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_MAMMOTH_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d22f093f0551a587395072ba38aa56ec405f43bc2d195d54dd20bfb524e5adf1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1569, + "startColumn": 2, + "charOffset": 73397, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1567, + "startColumn": 2, + "charOffset": 73240, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_FERAL_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_HORSE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_MAMMOTH_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::PHANTOM_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62517877043d2cba459c948346f0f5a094b8404226c1fc822575569b833f55fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1570, + "startColumn": 2, + "charOffset": 73477, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1568, + "startColumn": 2, + "charOffset": 73318, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_HORSE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_MAMMOTH_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::PHANTOM_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::PLANT_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c79c4df95b8168b8681649fd3503ae4d0981edd51b47a12116603f9e2584485" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1571, + "startColumn": 2, + "charOffset": 73550, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1569, + "startColumn": 2, + "charOffset": 73396, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MAMMAL_MAMMOTH_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::PHANTOM_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::PLANT_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::REPTILE_LARGE_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0787ec3c7051e7b64abede64c3178c04c946981ff797c6532513a3386a829674" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1572, + "startColumn": 2, + "charOffset": 73623, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1570, + "startColumn": 2, + "charOffset": 73476, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MONSTER_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::PHANTOM_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::PLANT_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::REPTILE_LARGE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::REPTILE_SMALL_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f51ebdc67ea64013d920e2f36bab4391fb1353b1ea51c797b5aeb2ad8429c07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1573, + "startColumn": 2, + "charOffset": 73694, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1571, + "startColumn": 2, + "charOffset": 73549, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::PHANTOM_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::PLANT_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::REPTILE_LARGE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::REPTILE_SMALL_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SLIME_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ae8a9b2708f4fa1d7f139d920c977701e06151acf265e40a4964d7c690db806" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1574, + "startColumn": 2, + "charOffset": 73773, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1572, + "startColumn": 2, + "charOffset": 73622, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::PLANT_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::REPTILE_LARGE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::REPTILE_SMALL_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SLIME_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNDEAD_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e4cafd07c9e27ebf48696a48ffeba36175ef75fef15db92c63170ce37842533" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1575, + "startColumn": 2, + "charOffset": 73852, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1573, + "startColumn": 2, + "charOffset": 73693, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::REPTILE_LARGE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::REPTILE_SMALL_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SLIME_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNDEAD_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_CRITTER_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46dd273de3c0426927cec7f3937335e05d38442e7ccbd43937f12be972404df8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1576, + "startColumn": 2, + "charOffset": 73923, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1574, + "startColumn": 2, + "charOffset": 73772, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::REPTILE_SMALL_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SLIME_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNDEAD_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_CRITTER_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_INSECT_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b2b1bd14429d83260c7c419720fa8e0dd29e357574301b3a336e6ac981436a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1577, + "startColumn": 2, + "charOffset": 73995, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1575, + "startColumn": 2, + "charOffset": 73851, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::SLIME_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNDEAD_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_CRITTER_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_INSECT_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_ROTWORM_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a987e393c2235abe5a9450d6cb0fc82987c4f3b235d0067c3867cf41d7ba5911" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1578, + "startColumn": 2, + "charOffset": 74075, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1576, + "startColumn": 2, + "charOffset": 73922, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNDEAD_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_CRITTER_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_INSECT_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_ROTWORM_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_SAGE_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf56b64b3439c58a56e99fa4d855a5e6bee6805ffb71455853698624ca182b36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1579, + "startColumn": 2, + "charOffset": 74154, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1577, + "startColumn": 2, + "charOffset": 73994, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_CRITTER_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_INSECT_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_ROTWORM_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_SAGE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_CRONE_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3f0bbc0c1b74d02ac3269dff8f9670709712e21a6bcbd5b967acf364f7cd1ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1580, + "startColumn": 2, + "charOffset": 74234, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1578, + "startColumn": 2, + "charOffset": 74074, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_INSECT_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_ROTWORM_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_SAGE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_CRONE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::APE_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf1d11081f96e756f24a84c25ea3eee86fce6a4677a746896d139e172a5fbbea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1581, + "startColumn": 2, + "charOffset": 74310, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1579, + "startColumn": 2, + "charOffset": 74153, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::VERMIN_ROTWORM_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_SAGE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_CRONE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::APE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42d77d57ab08a6b5a2d49afb3f87357c2a56145d307a8e49dadd48c5bdd128a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1582, + "startColumn": 2, + "charOffset": 74387, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1580, + "startColumn": 2, + "charOffset": 74233, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_SAGE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_CRONE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::APE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b51b5a698c1c5156f59d98c0f65c633a073beee3b2560bb5b7807f808b2572b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1583, + "startColumn": 2, + "charOffset": 74456, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1581, + "startColumn": 2, + "charOffset": 74309, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::HUMAN_CRONE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::APE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59f19eae715c1077bb921e80385fb05579bcc06ce2e7b2a7edf110d1a46882e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1584, + "startColumn": 2, + "charOffset": 74540, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1582, + "startColumn": 2, + "charOffset": 74386, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::APE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_3);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5478c2a80e3ba49c771cfd9e8d807011485f5f6f947210d89a9c4f0acfa598e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1585, + "startColumn": 2, + "charOffset": 74624, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1583, + "startColumn": 2, + "charOffset": 74455, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_3);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_4);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HEAVY_METAL_LOUD);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "294c3cc5f1bde55fb034cdec03535e34bb2ee82b9ec609998588ecafa993d86c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1586, + "startColumn": 2, + "charOffset": 74708, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1584, + "startColumn": 2, + "charOffset": 74539, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_3);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_4);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HEAVY_METAL_LOUD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_INSECTS_BIRDS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f1882b9c685a97c79ed607f49f8b7752f2e0d4b20940f9fd3d1e4ae78605111" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1587, + "startColumn": 2, + "charOffset": 74792, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1585, + "startColumn": 2, + "charOffset": 74623, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_3);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_4);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HEAVY_METAL_LOUD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_INSECTS_BIRDS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19cc2a24799faf38df6f54fb7dba803ac258c56c26db93b8bdf091171181b59e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1588, + "startColumn": 2, + "charOffset": 74875, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1586, + "startColumn": 2, + "charOffset": 74707, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_4);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HEAVY_METAL_LOUD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_INSECTS_BIRDS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_CLOSE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2fba90e1ccf7c550a07855c374c8ed35fb0184aeeb71c581f4fcc11982d844f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1589, + "startColumn": 2, + "charOffset": 74952, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1587, + "startColumn": 2, + "charOffset": 74791, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HEAVY_METAL_LOUD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_INSECTS_BIRDS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_CLOSE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATER_DEPTH_BOAT_SURFACE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e75da0e8bc2ccbf119f8fae2c6b74c1f1d148960d5a615306625d35c86c2876d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1590, + "startColumn": 2, + "charOffset": 75022, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1588, + "startColumn": 2, + "charOffset": 74874, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_INSECTS_BIRDS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_CLOSE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATER_DEPTH_BOAT_SURFACE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_METALIC_SPACE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "010a398c198a0d4b8e45e3e71c67b2a2353e9f65a96c33dcace44ce760a8255d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1591, + "startColumn": 2, + "charOffset": 75096, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1589, + "startColumn": 2, + "charOffset": 74951, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_CLOSE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATER_DEPTH_BOAT_SURFACE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_METALIC_SPACE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FROGS_INSECTS_WOODS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11d755c2940692b4dbbdfff5f2c9265b21d2dbf70657c820526a94d19f613f07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1592, + "startColumn": 2, + "charOffset": 75184, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1590, + "startColumn": 2, + "charOffset": 75021, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_CLOSE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATER_DEPTH_BOAT_SURFACE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_METALIC_SPACE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FROGS_INSECTS_WOODS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATER_DEPTH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14e3689aaaedc90314463a98a468753bea7282302aae6cb7ce0f25540b95f0bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1593, + "startColumn": 2, + "charOffset": 75261, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1591, + "startColumn": 2, + "charOffset": 75095, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATER_DEPTH_BOAT_SURFACE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_METALIC_SPACE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FROGS_INSECTS_WOODS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATER_DEPTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SEA_WAVE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31c7f01fcd9538c3391da7f564d2633857f8f775fac084c9f408786496f5bd82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1594, + "startColumn": 2, + "charOffset": 75344, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1592, + "startColumn": 2, + "charOffset": 75183, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_METALIC_SPACE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FROGS_INSECTS_WOODS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATER_DEPTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SEA_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eeb12a9520f506dd2553519e81cbaa91451d7d682b8a73bf867a2a885ac976ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1595, + "startColumn": 2, + "charOffset": 75419, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1593, + "startColumn": 2, + "charOffset": 75260, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FROGS_INSECTS_WOODS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATER_DEPTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SEA_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "182da826d0760f2bbf488dca43d3f01c726f1a41ae747ffc89f989ca5ba3b66f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1596, + "startColumn": 2, + "charOffset": 75491, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1594, + "startColumn": 2, + "charOffset": 75343, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATER_DEPTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SEA_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_3);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_MONKEYS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3074d853655557139f55ecb7931bca7fb0d7d6d9639d5200624d8ac57341716" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1597, + "startColumn": 2, + "charOffset": 75561, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1595, + "startColumn": 2, + "charOffset": 75418, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SEA_WAVE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_3);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_MONKEYS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_STORM_COMING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf469546130cd789ffcf6261c4d792e6b89a20e5d0007b4b4a94a6f64c21cfde" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1598, + "startColumn": 2, + "charOffset": 75631, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1596, + "startColumn": 2, + "charOffset": 75490, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_3);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_MONKEYS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_STORM_COMING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HITTING_WOOD);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fda1a85000ff93d4952989d5694647fb65bac3262350a6dd51ada913da24347" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1599, + "startColumn": 2, + "charOffset": 75702, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1597, + "startColumn": 2, + "charOffset": 75560, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_3);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_MONKEYS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_STORM_COMING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HITTING_WOOD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOOD_STICK_SMASH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0d4df7c7be10cd4d5990fda7038c5188eb6addc7af7d988b4c085a8e8879abf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1600, + "startColumn": 2, + "charOffset": 75778, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1598, + "startColumn": 2, + "charOffset": 75630, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_MONKEYS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_STORM_COMING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HITTING_WOOD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOOD_STICK_SMASH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_THICK_BLOB_LIQUID_1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a71ff5c20d99e59e0beaccaf856550c6bb80c5e378e4db54fed8e898c9c176c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1601, + "startColumn": 2, + "charOffset": 75857, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1599, + "startColumn": 2, + "charOffset": 75701, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_STORM_COMING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HITTING_WOOD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOOD_STICK_SMASH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_THICK_BLOB_LIQUID_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LITTLE_BIRTS_FLOREST);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56f9d16832ce58d89d5d68142dc1b43a1d9b11bf67ed95c6ad816d54c18160ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1602, + "startColumn": 2, + "charOffset": 75937, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1600, + "startColumn": 2, + "charOffset": 75777, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HITTING_WOOD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOOD_STICK_SMASH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_THICK_BLOB_LIQUID_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LITTLE_BIRTS_FLOREST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_THICK_BLOCK_LIQUID_CLOSE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1461bbbff9d76d438c28eb6ab1970c9a67149f299c9e9c4527871990e40aa48" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1603, + "startColumn": 2, + "charOffset": 76020, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1601, + "startColumn": 2, + "charOffset": 75856, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOOD_STICK_SMASH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_THICK_BLOB_LIQUID_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LITTLE_BIRTS_FLOREST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_THICK_BLOCK_LIQUID_CLOSE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_METAL_CHAINS_MOVING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72be4cc66d82eaaa67083feadda159adbbe045743c1fd9754b36d071b8a92b83" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1604, + "startColumn": 2, + "charOffset": 76104, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1602, + "startColumn": 2, + "charOffset": 75936, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_THICK_BLOB_LIQUID_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LITTLE_BIRTS_FLOREST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_THICK_BLOCK_LIQUID_CLOSE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_METAL_CHAINS_MOVING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CRICKET_1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b03a4b889de2036f3db7a2b344d9d694d8ef3c379de7700e881ba9c8e23c09d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1605, + "startColumn": 2, + "charOffset": 76192, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1603, + "startColumn": 2, + "charOffset": 76019, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LITTLE_BIRTS_FLOREST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_THICK_BLOCK_LIQUID_CLOSE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_METAL_CHAINS_MOVING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CRICKET_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CRICKET_2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c01e2b4d5e1bb757d8535e8534251da24b1763d472fcdb0bd7f9403bdeea092" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1606, + "startColumn": 2, + "charOffset": 76278, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1604, + "startColumn": 2, + "charOffset": 76103, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_THICK_BLOCK_LIQUID_CLOSE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_METAL_CHAINS_MOVING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CRICKET_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CRICKET_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CRICKET_3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34dc91baa0255631c13fc226235e82482f19fcde188e8c267dc2c8b0b104ccdd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1607, + "startColumn": 2, + "charOffset": 76351, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1605, + "startColumn": 2, + "charOffset": 76191, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_METAL_CHAINS_MOVING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CRICKET_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CRICKET_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CRICKET_3);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CICADA_1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d740a38e92ee10d53923fc5dcba1bb2df93afc207513f490c82d3d9bf85a3b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1608, + "startColumn": 2, + "charOffset": 76424, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1606, + "startColumn": 2, + "charOffset": 76277, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CRICKET_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CRICKET_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CRICKET_3);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CICADA_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_STONES_FALLING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45a074fc1d774d9b4e23f612b2be88317bf261758926c33b210ba967e490d1cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1609, + "startColumn": 2, + "charOffset": 76497, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1607, + "startColumn": 2, + "charOffset": 76350, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CRICKET_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CRICKET_3);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CICADA_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_STONES_FALLING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_OPEN_DOOR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "defaaf321eeac0b2b9548c0c8bed015ffe1d4d84e7100b5f998cdce104fc9391" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1610, + "startColumn": 2, + "charOffset": 76569, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1608, + "startColumn": 2, + "charOffset": 76423, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CRICKET_3);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CICADA_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_STONES_FALLING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_OPEN_DOOR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_CLOSE_DOOR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed9174418b5991e2566edfe99cdb107fc7590740e6b03f9d735e743372fc8fd9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1611, + "startColumn": 2, + "charOffset": 76647, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1609, + "startColumn": 2, + "charOffset": 76496, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CICADA_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_STONES_FALLING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_OPEN_DOOR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_CLOSE_DOOR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_OWL);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d22f093f0551a587395072ba38aa56ec405f43bc2d195d54dd20bfb524e5adf1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1612, + "startColumn": 2, + "charOffset": 76723, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1610, + "startColumn": 2, + "charOffset": 76568, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_STONES_FALLING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_OPEN_DOOR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_CLOSE_DOOR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_OWL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_ELETRONIC_DEVICE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0931c77bac4d1a838680712e9ecff5ffe1253794fe74a6c96c4d654c9262eb5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1613, + "startColumn": 2, + "charOffset": 76800, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1611, + "startColumn": 2, + "charOffset": 76646, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_OPEN_DOOR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_CLOSE_DOOR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_OWL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_ELETRONIC_DEVICE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_REPTILE_NOISE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c0e99fba9a5626ccbf199c39715bf09e1ccaea33bff60f2b8ec68070e7b9fa9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1614, + "startColumn": 2, + "charOffset": 76867, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1612, + "startColumn": 2, + "charOffset": 76722, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_CLOSE_DOOR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_OWL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_ELETRONIC_DEVICE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_REPTILE_NOISE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FORGE_METAL_1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33d2c6de6170427f8b9a6396581a0919c1cae827833662c7b84ac475ca278fab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1615, + "startColumn": 2, + "charOffset": 76947, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1613, + "startColumn": 2, + "charOffset": 76799, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_OWL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_ELETRONIC_DEVICE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_REPTILE_NOISE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FORGE_METAL_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FROG);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b51b5a698c1c5156f59d98c0f65c633a073beee3b2560bb5b7807f808b2572b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1616, + "startColumn": 2, + "charOffset": 77024, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1614, + "startColumn": 2, + "charOffset": 76866, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_ELETRONIC_DEVICE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_REPTILE_NOISE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FORGE_METAL_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FROG);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_WOOD_OBJECT_USING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1762e1379b455aa81b07410fea8c34ec42053b38b28263f1c3a79616a3d6b691" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1617, + "startColumn": 2, + "charOffset": 77101, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1615, + "startColumn": 2, + "charOffset": 76946, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_REPTILE_NOISE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FORGE_METAL_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FROG);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_WOOD_OBJECT_USING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_METAL_OBJECT_HIT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e4cafd07c9e27ebf48696a48ffeba36175ef75fef15db92c63170ce37842533" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1618, + "startColumn": 2, + "charOffset": 77169, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1616, + "startColumn": 2, + "charOffset": 77023, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FORGE_METAL_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FROG);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_WOOD_OBJECT_USING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_METAL_OBJECT_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_NAIL_HIT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6061b5e979a08fabacc37b8787df39104700c3cac70c53f9248e8c9851d6c7d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1619, + "startColumn": 2, + "charOffset": 77253, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1617, + "startColumn": 2, + "charOffset": 77100, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FROG);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_WOOD_OBJECT_USING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_METAL_OBJECT_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_NAIL_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_BELL_RING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21abc083bbfa9782385000de93246b089bc8afb09a0edc47f2ac56b409e48131" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1620, + "startColumn": 2, + "charOffset": 77336, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1618, + "startColumn": 2, + "charOffset": 77168, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_WOOD_OBJECT_USING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_METAL_OBJECT_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_NAIL_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_BELL_RING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HOT_METAL_ON_WATER);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "416477c5ee077b11c6feff1208f55ee8104a1cfde842645b23ce443240e23082" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1621, + "startColumn": 2, + "charOffset": 77411, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1619, + "startColumn": 2, + "charOffset": 77252, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_METAL_OBJECT_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_NAIL_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_BELL_RING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HOT_METAL_ON_WATER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATER_SMOKE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e138a05b51efc1fd6af719e196117cbd2b1651d16b32fb16249d8495fa2e6a09" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1622, + "startColumn": 2, + "charOffset": 77484, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1620, + "startColumn": 2, + "charOffset": 77335, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_NAIL_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_BELL_RING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HOT_METAL_ON_WATER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATER_SMOKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOLF_HOWL);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8076ba07843c07a0e609cf60612c72c5974f94797ea76534aa259e4d50d748d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1623, + "startColumn": 2, + "charOffset": 77566, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1621, + "startColumn": 2, + "charOffset": 77410, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_BELL_RING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HOT_METAL_ON_WATER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATER_SMOKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOLF_HOWL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOOD_CRACKLE_CLOSE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3761abdb3ce3f48ebd2fce11fb91479f64d19f94e4d84d2e32654d3b41dce30b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1624, + "startColumn": 2, + "charOffset": 77641, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1622, + "startColumn": 2, + "charOffset": 77483, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HOT_METAL_ON_WATER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATER_SMOKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOLF_HOWL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOOD_CRACKLE_CLOSE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LAUGHT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7045881d8168d4715c2682d2695502f9744557559777484935ba2e2cfbde76ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1625, + "startColumn": 2, + "charOffset": 77714, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1623, + "startColumn": 2, + "charOffset": 77565, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATER_SMOKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOLF_HOWL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOOD_CRACKLE_CLOSE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LAUGHT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_MOVING_LEAF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34b2731f20f0889f1c345b0b917b4025d5bc70d8c09f62db4b4ae71133bba2eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1626, + "startColumn": 2, + "charOffset": 77796, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1624, + "startColumn": 2, + "charOffset": 77640, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOLF_HOWL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOOD_CRACKLE_CLOSE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LAUGHT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_MOVING_LEAF);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_MOVING_FEW_LEAF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "18e6381aba6442a034d1f87783454b61702055282180eda11683f97cf6d69108" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1627, + "startColumn": 2, + "charOffset": 77866, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1625, + "startColumn": 2, + "charOffset": 77713, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOOD_CRACKLE_CLOSE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LAUGHT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_MOVING_LEAF);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_MOVING_FEW_LEAF);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_PORTAL_CAST);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45b797c6a1e8b93f5087e0a0e3229f29a232d765e8a14ec5f7ba37b272a3a25a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1628, + "startColumn": 2, + "charOffset": 77946, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1626, + "startColumn": 2, + "charOffset": 77795, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LAUGHT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_MOVING_LEAF);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_MOVING_FEW_LEAF);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_PORTAL_CAST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_FIRE_MAGIC_CAST);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d44032ce3117d0d3d738c2776f51a1a6672b50b1a426c887ce16b9d0c4905cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1629, + "startColumn": 2, + "charOffset": 78030, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1627, + "startColumn": 2, + "charOffset": 77865, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_MOVING_LEAF);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_MOVING_FEW_LEAF);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_PORTAL_CAST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_FIRE_MAGIC_CAST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_TRAPDOOR_OPEN);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17c410401a2be8c2b4c0fb619623184a9782b9678de49219905ebb2ccae059a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1630, + "startColumn": 2, + "charOffset": 78108, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1628, + "startColumn": 2, + "charOffset": 77945, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_MOVING_FEW_LEAF);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_PORTAL_CAST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_FIRE_MAGIC_CAST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_TRAPDOOR_OPEN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_NAIL_FALLING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b097497e4dd49928b15e38532fa766849630de8a0f8d6d21a5f42939a904b1b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1631, + "startColumn": 2, + "charOffset": 78190, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1629, + "startColumn": 2, + "charOffset": 78029, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_PORTAL_CAST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_FIRE_MAGIC_CAST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_TRAPDOOR_OPEN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_NAIL_FALLING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LIGHT_BLOB_LIQUID);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbd1448b270c68bc7e7549566a4bc2dca0bb7f74d6e19249fac7b7c36590140b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1632, + "startColumn": 2, + "charOffset": 78267, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1630, + "startColumn": 2, + "charOffset": 78107, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_FIRE_MAGIC_CAST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_TRAPDOOR_OPEN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_NAIL_FALLING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LIGHT_BLOB_LIQUID);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LION_ROAR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f07fb3e1601e589da1e0109b21140bdbb81cb8d7bee89faf35c6c24af78549d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1633, + "startColumn": 2, + "charOffset": 78343, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1631, + "startColumn": 2, + "charOffset": 78189, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_TRAPDOOR_OPEN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_NAIL_FALLING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LIGHT_BLOB_LIQUID);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LION_ROAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_MOVING_OBJECT_BUTTON_TRIGGER);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "adde5c560639723319a73b7c9bd1e2bfc55535fed8809c38abf1fe4681aa5153" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1634, + "startColumn": 2, + "charOffset": 78424, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1632, + "startColumn": 2, + "charOffset": 78266, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_NAIL_FALLING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LIGHT_BLOB_LIQUID);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LION_ROAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_MOVING_OBJECT_BUTTON_TRIGGER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SNAKE_1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11d755c2940692b4dbbdfff5f2c9265b21d2dbf70657c820526a94d19f613f07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1635, + "startColumn": 2, + "charOffset": 78497, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1633, + "startColumn": 2, + "charOffset": 78342, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LIGHT_BLOB_LIQUID);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LION_ROAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_MOVING_OBJECT_BUTTON_TRIGGER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SNAKE_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HUMAN_SCREEN_1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1461bbbff9d76d438c28eb6ab1970c9a67149f299c9e9c4527871990e40aa48" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1636, + "startColumn": 2, + "charOffset": 78589, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1634, + "startColumn": 2, + "charOffset": 78423, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LION_ROAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_MOVING_OBJECT_BUTTON_TRIGGER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SNAKE_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HUMAN_SCREEN_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HUMAN_SCREEN_2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31c7f01fcd9538c3391da7f564d2633857f8f775fac084c9f408786496f5bd82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1637, + "startColumn": 2, + "charOffset": 78660, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1635, + "startColumn": 2, + "charOffset": 78496, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_MOVING_OBJECT_BUTTON_TRIGGER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SNAKE_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HUMAN_SCREEN_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HUMAN_SCREEN_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SEAGUL_1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24426399276b8a5a282477fefd22bd050813557e74dc4ba192ab4259853f08b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1638, + "startColumn": 2, + "charOffset": 78738, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1636, + "startColumn": 2, + "charOffset": 78588, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SNAKE_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HUMAN_SCREEN_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HUMAN_SCREEN_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SEAGUL_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FAST_FOOTSTEPS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34b2731f20f0889f1c345b0b917b4025d5bc70d8c09f62db4b4ae71133bba2eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1639, + "startColumn": 2, + "charOffset": 78816, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1637, + "startColumn": 2, + "charOffset": 78659, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HUMAN_SCREEN_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HUMAN_SCREEN_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SEAGUL_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FAST_FOOTSTEPS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SLOW_FOOTSTEPS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1762e1379b455aa81b07410fea8c34ec42053b38b28263f1c3a79616a3d6b691" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1640, + "startColumn": 2, + "charOffset": 78888, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1638, + "startColumn": 2, + "charOffset": 78737, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HUMAN_SCREEN_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SEAGUL_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FAST_FOOTSTEPS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SLOW_FOOTSTEPS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_THICK_BLOB_LIQUID_2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19cc2a24799faf38df6f54fb7dba803ac258c56c26db93b8bdf091171181b59e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1641, + "startColumn": 2, + "charOffset": 78966, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1639, + "startColumn": 2, + "charOffset": 78815, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SEAGUL_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FAST_FOOTSTEPS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SLOW_FOOTSTEPS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_THICK_BLOB_LIQUID_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_MOVING_LEAF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f881492a8fdd1b2bb73392e11ee7e628005fa3c8f02e7874b0023c12839b9539" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1642, + "startColumn": 2, + "charOffset": 79044, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1640, + "startColumn": 2, + "charOffset": 78887, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FAST_FOOTSTEPS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SLOW_FOOTSTEPS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_THICK_BLOB_LIQUID_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_MOVING_LEAF);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOOD_CRACKLE_1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd3596dea59c190758e9bb8138ae495f7087947b79e76ad1f5564dc0340cf89c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1643, + "startColumn": 2, + "charOffset": 79127, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1641, + "startColumn": 2, + "charOffset": 78965, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SLOW_FOOTSTEPS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_THICK_BLOB_LIQUID_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_MOVING_LEAF);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOOD_CRACKLE_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_OBJECT_FALLING_DEPTH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d5a64b7fce74dcff6d6768975e9835e1a056d145384deb3df1fe9b7a4fb31de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1644, + "startColumn": 2, + "charOffset": 79202, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1642, + "startColumn": 2, + "charOffset": 79043, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_THICK_BLOB_LIQUID_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_MOVING_LEAF);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOOD_CRACKLE_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_OBJECT_FALLING_DEPTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_BUTTON_TRIGGER);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b4afda5d2644e9ab528b6c0d6572bf9c13f73bc6d796341257e540878ec732d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1645, + "startColumn": 2, + "charOffset": 79280, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1643, + "startColumn": 2, + "charOffset": 79126, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_MOVING_LEAF);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOOD_CRACKLE_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_OBJECT_FALLING_DEPTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_BUTTON_TRIGGER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HEAVEN_DARK_REVERB);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14e3689aaaedc90314463a98a468753bea7282302aae6cb7ce0f25540b95f0bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1646, + "startColumn": 2, + "charOffset": 79367, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1644, + "startColumn": 2, + "charOffset": 79201, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOOD_CRACKLE_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_OBJECT_FALLING_DEPTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_BUTTON_TRIGGER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HEAVEN_DARK_REVERB);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "adde5c560639723319a73b7c9bd1e2bfc55535fed8809c38abf1fe4681aa5153" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1647, + "startColumn": 2, + "charOffset": 79448, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1645, + "startColumn": 2, + "charOffset": 79279, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_OBJECT_FALLING_DEPTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_BUTTON_TRIGGER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HEAVEN_DARK_REVERB);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_4);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_INSECT_1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11d755c2940692b4dbbdfff5f2c9265b21d2dbf70657c820526a94d19f613f07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1648, + "startColumn": 2, + "charOffset": 79530, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1646, + "startColumn": 2, + "charOffset": 79366, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_BUTTON_TRIGGER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HEAVEN_DARK_REVERB);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_4);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_INSECT_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FLUTE_SONG);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3f0bbc0c1b74d02ac3269dff8f9670709712e21a6bcbd5b967acf364f7cd1ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1649, + "startColumn": 2, + "charOffset": 79600, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1647, + "startColumn": 2, + "charOffset": 79447, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HEAVEN_DARK_REVERB);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_4);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_INSECT_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FLUTE_SONG);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_INSECTS_BIRDS_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ab64cfbdbee568ff459ec3459e0284dbd2f2490eb8f51528569a8940bcf0c62" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1650, + "startColumn": 2, + "charOffset": 79672, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1648, + "startColumn": 2, + "charOffset": 79529, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WIND_4);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_INSECT_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FLUTE_SONG);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_INSECTS_BIRDS_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_INSECT_CREATURE_DEATH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a661bb0807386e84e9fa248e6cf69cd5a36eb25ba60d58ac0522621f76c6155" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1651, + "startColumn": 2, + "charOffset": 79746, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1649, + "startColumn": 2, + "charOffset": 79599, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_INSECT_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FLUTE_SONG);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_INSECTS_BIRDS_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_INSECT_CREATURE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LOW_ROAR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "266e32415905ba34f69dcc5ca77d8a0153782b47b735eb92e91d299a23f991b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1652, + "startColumn": 2, + "charOffset": 79829, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1650, + "startColumn": 2, + "charOffset": 79671, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FLUTE_SONG);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_INSECTS_BIRDS_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_INSECT_CREATURE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LOW_ROAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SINISTER_BURPH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9808965b72d870fee8d58ef3e5ef80c11f6e2f5551afc1659fd0b46d0a861b16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1653, + "startColumn": 2, + "charOffset": 79914, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1651, + "startColumn": 2, + "charOffset": 79745, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_INSECTS_BIRDS_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_INSECT_CREATURE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LOW_ROAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SINISTER_BURPH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_SCREEN);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45b797c6a1e8b93f5087e0a0e3229f29a232d765e8a14ec5f7ba37b272a3a25a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1654, + "startColumn": 2, + "charOffset": 79986, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1652, + "startColumn": 2, + "charOffset": 79828, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_INSECT_CREATURE_DEATH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LOW_ROAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SINISTER_BURPH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_SCREEN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_BIRDS_FLYING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54fb84cb094dd239837b931a704729939a172fb5dc3a103baf80602f87090498" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1655, + "startColumn": 2, + "charOffset": 80064, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1653, + "startColumn": 2, + "charOffset": 79913, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LOW_ROAR);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SINISTER_BURPH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_SCREEN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_BIRDS_FLYING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_VOICES_1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48b16258f642cf8db7455a8d377d22c813ab387f0e2909332c25d58a3bd30535" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1656, + "startColumn": 2, + "charOffset": 80140, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1654, + "startColumn": 2, + "charOffset": 79985, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SINISTER_BURPH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_SCREEN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_BIRDS_FLYING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_VOICES_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_BIRD_CUCO);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "405ef1e721841b81d7fe4f7a6b3f92e2d75703d1cf9530abda12a8e085c1060c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1657, + "startColumn": 2, + "charOffset": 80216, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1655, + "startColumn": 2, + "charOffset": 80063, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_SCREEN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_BIRDS_FLYING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_VOICES_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_BIRD_CUCO);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_RAVINE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11d755c2940692b4dbbdfff5f2c9265b21d2dbf70657c820526a94d19f613f07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1658, + "startColumn": 2, + "charOffset": 80294, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1656, + "startColumn": 2, + "charOffset": 80139, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_BIRDS_FLYING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_VOICES_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_BIRD_CUCO);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_RAVINE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_RAVINE_METALIC);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb00badf143373071fbf5240013a1e6e6b17bdb48f193e2b49eaa10c739aab02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1659, + "startColumn": 2, + "charOffset": 80367, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1657, + "startColumn": 2, + "charOffset": 80215, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_VOICES_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_BIRD_CUCO);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_RAVINE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_RAVINE_METALIC);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_STICKS_LEAF_STEP);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eaf1d238147fe89dd24bbc95f6d077ea7da7b81bb20422eb818d5b9bdff7d67b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1660, + "startColumn": 2, + "charOffset": 80437, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1658, + "startColumn": 2, + "charOffset": 80293, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_BIRD_CUCO);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_RAVINE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_RAVINE_METALIC);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_STICKS_LEAF_STEP);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_DISPEL_MAGIC_1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39a59dbe5ddc16ee212b9a3a4c56927ad1ce8fa8497679075b7c931dbdcf9084" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1661, + "startColumn": 2, + "charOffset": 80515, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1659, + "startColumn": 2, + "charOffset": 80366, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_RAVINE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_RAVINE_METALIC);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_STICKS_LEAF_STEP);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_DISPEL_MAGIC_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_DISPEL_MAGIC_2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c630014a135be8ef92137c91dc39b24af1d8339f86f925c226d9ddd3882ed7a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1662, + "startColumn": 2, + "charOffset": 80595, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1660, + "startColumn": 2, + "charOffset": 80436, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_RAVINE_METALIC);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_STICKS_LEAF_STEP);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_DISPEL_MAGIC_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_DISPEL_MAGIC_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_VOICES_2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "965ad3ec817a5eafbcc053303df04df7f06a2173976927d310e8d56c93bf720f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1663, + "startColumn": 2, + "charOffset": 80676, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1661, + "startColumn": 2, + "charOffset": 80514, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_STICKS_LEAF_STEP);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_DISPEL_MAGIC_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_DISPEL_MAGIC_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_VOICES_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_VOICES_3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b66ea8b0274ccc2262a237a398ff9f4925e955a09c4d7308e516b5496e365560" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1664, + "startColumn": 2, + "charOffset": 80757, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1662, + "startColumn": 2, + "charOffset": 80594, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_DISPEL_MAGIC_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_DISPEL_MAGIC_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_VOICES_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_VOICES_3);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_VOICES_4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d657820a2ae8a04013f2ce7e5391020d8274331b214535dd1e238730be20655c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1665, + "startColumn": 2, + "charOffset": 80835, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1663, + "startColumn": 2, + "charOffset": 80675, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_DISPEL_MAGIC_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_VOICES_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_VOICES_3);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_VOICES_4);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_METAL_OBJECT_FALL);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b2b1bd14429d83260c7c419720fa8e0dd29e357574301b3a336e6ac981436a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1666, + "startColumn": 2, + "charOffset": 80913, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1664, + "startColumn": 2, + "charOffset": 80756, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_VOICES_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_VOICES_3);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_VOICES_4);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_METAL_OBJECT_FALL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HOURSE_STEPS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9cedcaa0610027c744eba0838fbe819744f593d2dee1a19d111c9c0172b07a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1667, + "startColumn": 2, + "charOffset": 80991, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1665, + "startColumn": 2, + "charOffset": 80834, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_VOICES_3);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_VOICES_4);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_METAL_OBJECT_FALL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HOURSE_STEPS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_DRUMES_SINISTER_REVERB);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b20250b394580b56e9b874b0cb3051ed5461f0be4d85b72371cb50bdc24ec8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1668, + "startColumn": 2, + "charOffset": 81075, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1666, + "startColumn": 2, + "charOffset": 80912, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_VOICES_4);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_METAL_OBJECT_FALL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HOURSE_STEPS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_DRUMES_SINISTER_REVERB);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_WOOD_PIECES_FALL);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0931c77bac4d1a838680712e9ecff5ffe1253794fe74a6c96c4d654c9262eb5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1669, + "startColumn": 2, + "charOffset": 81151, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1667, + "startColumn": 2, + "charOffset": 80990, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_METAL_OBJECT_FALL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HOURSE_STEPS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_DRUMES_SINISTER_REVERB);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_WOOD_PIECES_FALL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_KNIFE_CUT_FLESH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2904d6b60ca4d0a6c9f1ec374ee095e139f714921c118434000033bb33b3c78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1670, + "startColumn": 2, + "charOffset": 81237, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1668, + "startColumn": 2, + "charOffset": 81074, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HOURSE_STEPS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_DRUMES_SINISTER_REVERB);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_WOOD_PIECES_FALL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_KNIFE_CUT_FLESH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_VOICES_5);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08998ebc87baccc0269316066e37ab8cffcd1aa27996e4b3024889a3e6660cc0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1671, + "startColumn": 2, + "charOffset": 81320, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1669, + "startColumn": 2, + "charOffset": 81150, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_DRUMES_SINISTER_REVERB);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_WOOD_PIECES_FALL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_KNIFE_CUT_FLESH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_VOICES_5);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CICADA_2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c033f9cd0f4a0af9ff41d2214f9c6a4d58cae0ae85715e2431440b697b3b4421" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1672, + "startColumn": 2, + "charOffset": 81402, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1670, + "startColumn": 2, + "charOffset": 81236, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_WOOD_PIECES_FALL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_KNIFE_CUT_FLESH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_VOICES_5);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CICADA_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FLYES);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf1d11081f96e756f24a84c25ea3eee86fce6a4677a746896d139e172a5fbbea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1673, + "startColumn": 2, + "charOffset": 81480, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1671, + "startColumn": 2, + "charOffset": 81319, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_KNIFE_CUT_FLESH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_VOICES_5);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CICADA_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FLYES);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_NOISE_WATER);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b03a4b889de2036f3db7a2b344d9d694d8ef3c379de7700e881ba9c8e23c09d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1674, + "startColumn": 2, + "charOffset": 81552, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1672, + "startColumn": 2, + "charOffset": 81401, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CROWD_VOICES_5);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CICADA_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FLYES);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_NOISE_WATER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_PIG_SOUND_1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f82cb4f02e4a6e0bc39bafe26a1c54d0393eec31174424c3d543122beb9268c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1675, + "startColumn": 2, + "charOffset": 81621, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1673, + "startColumn": 2, + "charOffset": 81479, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CICADA_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FLYES);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_NOISE_WATER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_PIG_SOUND_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_PIG_SOUND_2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9808965b72d870fee8d58ef3e5ef80c11f6e2f5551afc1659fd0b46d0a861b16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1676, + "startColumn": 2, + "charOffset": 81696, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1674, + "startColumn": 2, + "charOffset": 81551, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FLYES);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_NOISE_WATER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_PIG_SOUND_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_PIG_SOUND_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SHEEP_SOUND_1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5998ec03422eb40e2828766def59f369deee2ba255bbfc9dbe421e295d9012ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1677, + "startColumn": 2, + "charOffset": 81771, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1675, + "startColumn": 2, + "charOffset": 81620, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_NOISE_WATER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_PIG_SOUND_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_PIG_SOUND_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SHEEP_SOUND_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SHEEP_SOUND_2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "146b9c6214ee0def3a1ed14ed9de35ced69c9ac0dc4fbd0cc3dc1605a9f7f0a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1678, + "startColumn": 2, + "charOffset": 81846, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1676, + "startColumn": 2, + "charOffset": 81695, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_PIG_SOUND_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_PIG_SOUND_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SHEEP_SOUND_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SHEEP_SOUND_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FIRE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0d4df7c7be10cd4d5990fda7038c5188eb6addc7af7d988b4c085a8e8879abf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1679, + "startColumn": 2, + "charOffset": 81923, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1677, + "startColumn": 2, + "charOffset": 81770, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_PIG_SOUND_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SHEEP_SOUND_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SHEEP_SOUND_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FIRE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_NOISE_SNOW);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f00275df631a9b6dd247a2ce8b1e8a0dca51ec605e377bfe6c058507a1d5559d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1680, + "startColumn": 2, + "charOffset": 82000, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1678, + "startColumn": 2, + "charOffset": 81845, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SHEEP_SOUND_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SHEEP_SOUND_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FIRE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_NOISE_SNOW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FIRE_PLACE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eeb12a9520f506dd2553519e81cbaa91451d7d682b8a73bf867a2a885ac976ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1681, + "startColumn": 2, + "charOffset": 82068, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1679, + "startColumn": 2, + "charOffset": 81922, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SHEEP_SOUND_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FIRE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_NOISE_SNOW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FIRE_PLACE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATERFALL);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bff340be5e062bb547ea60b8735744297364423e88a2a30ab34a4697d019732f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1682, + "startColumn": 2, + "charOffset": 82142, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1680, + "startColumn": 2, + "charOffset": 81999, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FIRE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_NOISE_SNOW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FIRE_PLACE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATERFALL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATER_SOURCE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ae8a9b2708f4fa1d7f139d920c977701e06151acf265e40a4964d7c690db806" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1683, + "startColumn": 2, + "charOffset": 82216, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1681, + "startColumn": 2, + "charOffset": 82067, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_NOISE_SNOW);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FIRE_PLACE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATERFALL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATER_SOURCE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HAMMER_HITING_NAILS_1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19cc2a24799faf38df6f54fb7dba803ac258c56c26db93b8bdf091171181b59e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1684, + "startColumn": 2, + "charOffset": 82289, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1682, + "startColumn": 2, + "charOffset": 82141, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FIRE_PLACE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATERFALL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATER_SOURCE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HAMMER_HITING_NAILS_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HAMMER_HITING_NAILS_2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6061b5e979a08fabacc37b8787df39104700c3cac70c53f9248e8c9851d6c7d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1685, + "startColumn": 2, + "charOffset": 82365, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1683, + "startColumn": 2, + "charOffset": 82215, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATERFALL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATER_SOURCE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HAMMER_HITING_NAILS_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HAMMER_HITING_NAILS_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_QUICK_STEPS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d60279bba07c4295699aa6475787dd89b342d1fe96bb9db667bb71e8da74ea08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1686, + "startColumn": 2, + "charOffset": 82453, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1684, + "startColumn": 2, + "charOffset": 82288, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATER_SOURCE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HAMMER_HITING_NAILS_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HAMMER_HITING_NAILS_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_QUICK_STEPS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HEAVY_OBJECT_FALL);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02578e53e320d964e0431fc7f82eba0a0025e868bb91d96d201a4167689ab3c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1687, + "startColumn": 2, + "charOffset": 82541, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1685, + "startColumn": 2, + "charOffset": 82364, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HAMMER_HITING_NAILS_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HAMMER_HITING_NAILS_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_QUICK_STEPS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HEAVY_OBJECT_FALL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HITING_FORGE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9594c835221e6f6745e9824d0f6c7d0772279ae50deda4022b3c5bd1376b6b7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1688, + "startColumn": 2, + "charOffset": 82616, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1686, + "startColumn": 2, + "charOffset": 82452, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HAMMER_HITING_NAILS_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_QUICK_STEPS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HEAVY_OBJECT_FALL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HITING_FORGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOOD_CRACKLE_2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19af95c8454cda06126400d5ab5f38aeec27c61bddc6b170c9eff5c19f460df2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1689, + "startColumn": 2, + "charOffset": 82697, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1687, + "startColumn": 2, + "charOffset": 82540, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_QUICK_STEPS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HEAVY_OBJECT_FALL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HITING_FORGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOOD_CRACKLE_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_WOOD_HIT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71b87c1bc6f08177f44a7507f4d1dc20794e21e29d95d90e8af6cd6936bab278" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1690, + "startColumn": 2, + "charOffset": 82776, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1688, + "startColumn": 2, + "charOffset": 82615, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HEAVY_OBJECT_FALL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HITING_FORGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOOD_CRACKLE_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_WOOD_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_BIRDS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11d755c2940692b4dbbdfff5f2c9265b21d2dbf70657c820526a94d19f613f07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1691, + "startColumn": 2, + "charOffset": 82854, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1689, + "startColumn": 2, + "charOffset": 82696, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HITING_FORGE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOOD_CRACKLE_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_WOOD_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_BIRDS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_LITTLE_BIRDS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb00badf143373071fbf5240013a1e6e6b17bdb48f193e2b49eaa10c739aab02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1692, + "startColumn": 2, + "charOffset": 82929, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1690, + "startColumn": 2, + "charOffset": 82775, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOOD_CRACKLE_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_WOOD_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_BIRDS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_LITTLE_BIRDS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_INSECTS_1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "538d839aa08b52da16d5c402313430d697d2ba0fd15ecb337f21a2d72fb1d4bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1693, + "startColumn": 2, + "charOffset": 83004, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1691, + "startColumn": 2, + "charOffset": 82853, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_WOOD_HIT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_BIRDS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_LITTLE_BIRDS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_INSECTS_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_INSECTS_2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ee9b103578f9bd72a7fffdd993678cff1022497576f28b6f4f34d2594c219ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1694, + "startColumn": 2, + "charOffset": 83086, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1692, + "startColumn": 2, + "charOffset": 82928, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_BIRDS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_LITTLE_BIRDS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_INSECTS_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_INSECTS_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_INSECTS_3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cac07c099fae629927be815937eebad461f77fd15a14fa4275c249856994657c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1695, + "startColumn": 2, + "charOffset": 83165, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1693, + "startColumn": 2, + "charOffset": 83003, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_LITTLE_BIRDS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_INSECTS_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_INSECTS_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_INSECTS_3);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_FLUTE_WEST);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86b571689b9ba0c4b26ae386962a4748560adae500c4f6917b7595aba9e2fde0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1696, + "startColumn": 2, + "charOffset": 83244, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1694, + "startColumn": 2, + "charOffset": 83085, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_INSECTS_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_INSECTS_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_INSECTS_3);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_FLUTE_WEST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_CROWS_VOICES);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5478c2a80e3ba49c771cfd9e8d807011485f5f6f947210d89a9c4f0acfa598e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1697, + "startColumn": 2, + "charOffset": 83323, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1695, + "startColumn": 2, + "charOffset": 83164, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_INSECTS_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_INSECTS_3);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_FLUTE_WEST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_CROWS_VOICES);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_WIND_WATER);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2fba90e1ccf7c550a07855c374c8ed35fb0184aeeb71c581f4fcc11982d844f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1698, + "startColumn": 2, + "charOffset": 83403, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1696, + "startColumn": 2, + "charOffset": 83243, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_INSECTS_3);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_FLUTE_WEST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_CROWS_VOICES);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_WIND_WATER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_THICK_BLOCK_DEPTH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9230d0cdf48a4df27a74facb1d03d2c922199bb48cbb0f62ac69b052aab7e9c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1699, + "startColumn": 2, + "charOffset": 83485, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1697, + "startColumn": 2, + "charOffset": 83322, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_FLUTE_WEST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_CROWS_VOICES);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_WIND_WATER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_THICK_BLOCK_DEPTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CAMEL);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "227b85b1d0214431351ecf623b4579053eae3aed5b690f644df1738f841604e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1700, + "startColumn": 2, + "charOffset": 83565, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1698, + "startColumn": 2, + "charOffset": 83402, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_CROWS_VOICES);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_WIND_WATER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_THICK_BLOCK_DEPTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CAMEL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_5);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9594c835221e6f6745e9824d0f6c7d0772279ae50deda4022b3c5bd1376b6b7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1701, + "startColumn": 2, + "charOffset": 83652, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1699, + "startColumn": 2, + "charOffset": 83484, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_WIND_WATER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_THICK_BLOCK_DEPTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CAMEL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_5);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CHICKEN_1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd3596dea59c190758e9bb8138ae495f7087947b79e76ad1f5564dc0340cf89c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1702, + "startColumn": 2, + "charOffset": 83721, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1700, + "startColumn": 2, + "charOffset": 83564, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::MUSIC_CUT_THICK_BLOCK_DEPTH);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CAMEL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_5);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CHICKEN_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CHICKEN_2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71b87c1bc6f08177f44a7507f4d1dc20794e21e29d95d90e8af6cd6936bab278" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1703, + "startColumn": 2, + "charOffset": 83805, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1701, + "startColumn": 2, + "charOffset": 83651, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CAMEL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_5);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CHICKEN_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CHICKEN_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_THRILLER_METALLIC);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e887526b12e41b36a75909435d11220a2285e91f99b5d01402546c0fb8374f23" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1704, + "startColumn": 2, + "charOffset": 83878, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1702, + "startColumn": 2, + "charOffset": 83720, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_5);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CHICKEN_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CHICKEN_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_THRILLER_METALLIC);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_NOTIFICATION);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb00badf143373071fbf5240013a1e6e6b17bdb48f193e2b49eaa10c739aab02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1705, + "startColumn": 2, + "charOffset": 83951, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1703, + "startColumn": 2, + "charOffset": 83804, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CHICKEN_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CHICKEN_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_THRILLER_METALLIC);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_NOTIFICATION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_LEVEL_ACHIEVEMENT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eaf1d238147fe89dd24bbc95f6d077ea7da7b81bb20422eb818d5b9bdff7d67b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1706, + "startColumn": 2, + "charOffset": 84032, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1704, + "startColumn": 2, + "charOffset": 83877, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CHICKEN_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_THRILLER_METALLIC);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_NOTIFICATION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_LEVEL_ACHIEVEMENT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_SCREENSHOT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44a590670f76b670265a1621654492fea2102f7b42ede5af6367910e6c3c21c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1707, + "startColumn": 2, + "charOffset": 84111, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1705, + "startColumn": 2, + "charOffset": 83950, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_THRILLER_METALLIC);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_NOTIFICATION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_LEVEL_ACHIEVEMENT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_SCREENSHOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_CLICK_ON);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a098d9bbc08eb2d6634bf4262765c9f5d762415e460c64d53e2bc743440b316e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1708, + "startColumn": 2, + "charOffset": 84195, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1706, + "startColumn": 2, + "charOffset": 84031, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_NOTIFICATION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_LEVEL_ACHIEVEMENT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_SCREENSHOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_CLICK_ON);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_CLICK_OFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3074d853655557139f55ecb7931bca7fb0d7d6d9639d5200624d8ac57341716" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1709, + "startColumn": 2, + "charOffset": 84272, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1707, + "startColumn": 2, + "charOffset": 84110, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_LEVEL_ACHIEVEMENT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_SCREENSHOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_CLICK_ON);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_CLICK_OFF);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_DRUMS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "377486c7df9ef59b0708e7c535f93319e88430f269fbb191d9f62dff1d5050d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1710, + "startColumn": 2, + "charOffset": 84347, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1708, + "startColumn": 2, + "charOffset": 84194, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_SCREENSHOT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_CLICK_ON);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_CLICK_OFF);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_DRUMS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_XYLOPHONE_SLOW_DRUM);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2fba90e1ccf7c550a07855c374c8ed35fb0184aeeb71c581f4fcc11982d844f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1711, + "startColumn": 2, + "charOffset": 84423, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1709, + "startColumn": 2, + "charOffset": 84271, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_CLICK_ON);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_CLICK_OFF);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_DRUMS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_XYLOPHONE_SLOW_DRUM);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HARP_1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4063297db6cc62f6c4fbe08f3de42965f97e1b13e36282daee47b7e0a94cea19" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1712, + "startColumn": 2, + "charOffset": 84495, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1710, + "startColumn": 2, + "charOffset": 84346, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_CLICK_OFF);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_DRUMS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_XYLOPHONE_SLOW_DRUM);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HARP_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HARP_2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46d0407944c5da90ae36327998dde25047de684b7557555aab6af43245c2c8ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1713, + "startColumn": 2, + "charOffset": 84581, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1711, + "startColumn": 2, + "charOffset": 84422, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_DRUMS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_XYLOPHONE_SLOW_DRUM);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HARP_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HARP_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_MOVING_WOOD);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0b7ee2f63b3cb742d503db6f98746e2a2bdce20d88b3275e4bede4535e3566f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1714, + "startColumn": 2, + "charOffset": 84654, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1712, + "startColumn": 2, + "charOffset": 84494, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_XYLOPHONE_SLOW_DRUM);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HARP_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HARP_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_MOVING_WOOD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_CRATE_BREAK_MAGIC_DUST);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac9fd7f37382a76801c51d085a56797c7e3dbb45829176ed7b31bb3690433e60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1715, + "startColumn": 2, + "charOffset": 84727, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1713, + "startColumn": 2, + "charOffset": 84580, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HARP_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HARP_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_MOVING_WOOD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_CRATE_BREAK_MAGIC_DUST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_BELL_RING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85ccec15d2dc5bde9ca1c92af2c57248b42c9c789eea7da3e947f47a5b31c35f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1716, + "startColumn": 2, + "charOffset": 84805, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1714, + "startColumn": 2, + "charOffset": 84653, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_HARP_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_MOVING_WOOD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_CRATE_BREAK_MAGIC_DUST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_BELL_RING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_SELECT_OBJECT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef2856c0c34a0f34da29db7b250c05401088544f10bb15fdadb8140c0d28fd95" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1717, + "startColumn": 2, + "charOffset": 84894, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1715, + "startColumn": 2, + "charOffset": 84726, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_MOVING_WOOD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_CRATE_BREAK_MAGIC_DUST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_BELL_RING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_SELECT_OBJECT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_BACKPACK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d5feac66e489c6044da841c77d59ff5c0df00ae5f085c56247ed494c5396063" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1718, + "startColumn": 2, + "charOffset": 84970, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1716, + "startColumn": 2, + "charOffset": 84804, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_CRATE_BREAK_MAGIC_DUST);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_BELL_RING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_SELECT_OBJECT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_BACKPACK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_USE_POTION);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51cec2841cc6c369bfcfe5275725f5e9a4365815e266a19a595e424eab28a3c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1719, + "startColumn": 2, + "charOffset": 85050, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1717, + "startColumn": 2, + "charOffset": 84893, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_BELL_RING);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_SELECT_OBJECT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_BACKPACK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_USE_POTION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_NECKLACES);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0edb097e7a7e881f74c43dcb38564b062111b35ce9860065fa8cdaf451545b56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1720, + "startColumn": 2, + "charOffset": 85128, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1718, + "startColumn": 2, + "charOffset": 84969, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_SELECT_OBJECT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_BACKPACK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_USE_POTION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_NECKLACES);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_ARMORS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45a074fc1d774d9b4e23f612b2be88317bf261758926c33b210ba967e490d1cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1721, + "startColumn": 2, + "charOffset": 85203, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1719, + "startColumn": 2, + "charOffset": 85049, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_BACKPACK);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_USE_POTION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_NECKLACES);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_ARMORS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_METALIC);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "965ad3ec817a5eafbcc053303df04df7f06a2173976927d310e8d56c93bf720f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1722, + "startColumn": 2, + "charOffset": 85282, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1720, + "startColumn": 2, + "charOffset": 85127, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_USE_POTION);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_NECKLACES);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_ARMORS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_METALIC);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_DISTANCE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77df16e30bf5b8427e3ca824b93866f0ea5e73c3f01895fdca8d235723b6c83b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1723, + "startColumn": 2, + "charOffset": 85358, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1721, + "startColumn": 2, + "charOffset": 85202, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_NECKLACES);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_ARMORS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_METALIC);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_DISTANCE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_WOOD);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbd1448b270c68bc7e7549566a4bc2dca0bb7f74d6e19249fac7b7c36590140b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1724, + "startColumn": 2, + "charOffset": 85435, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1722, + "startColumn": 2, + "charOffset": 85281, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_ARMORS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_METALIC);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_DISTANCE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_WOOD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_STACKABLE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f07fb3e1601e589da1e0109b21140bdbb81cb8d7bee89faf35c6c24af78549d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1725, + "startColumn": 2, + "charOffset": 85513, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1723, + "startColumn": 2, + "charOffset": 85357, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_METALIC);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_DISTANCE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_WOOD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_STACKABLE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_DEFAULT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71b87c1bc6f08177f44a7507f4d1dc20794e21e29d95d90e8af6cd6936bab278" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1726, + "startColumn": 2, + "charOffset": 85587, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1724, + "startColumn": 2, + "charOffset": 85434, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_DISTANCE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_WOOD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_STACKABLE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_DEFAULT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_LEGS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc58d7b19614b2e79b520a7c39310e2a3a67a6b5c9980003812f603ba442f2b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1727, + "startColumn": 2, + "charOffset": 85666, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1725, + "startColumn": 2, + "charOffset": 85512, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_WOOD);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_STACKABLE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_DEFAULT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_LEGS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_HELMETS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5170135bad3fa8c30b1467dce87b394f58ed7fc60e7b0eb5d19fd7e46a1071f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1728, + "startColumn": 2, + "charOffset": 85743, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1726, + "startColumn": 2, + "charOffset": 85586, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_STACKABLE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_DEFAULT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_LEGS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_HELMETS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_QUIVERS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eaf1d238147fe89dd24bbc95f6d077ea7da7b81bb20422eb818d5b9bdff7d67b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1729, + "startColumn": 2, + "charOffset": 85817, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1727, + "startColumn": 2, + "charOffset": 85665, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_DEFAULT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_LEGS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_HELMETS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_QUIVERS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_RINGS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fcada5505236a4a7a49e47903c77af4054aa74234e630a029704a1dd628287f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1730, + "startColumn": 2, + "charOffset": 85894, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1728, + "startColumn": 2, + "charOffset": 85742, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_LEGS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_HELMETS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_QUIVERS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_RINGS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FROG_OR_LIQUID);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae543645cda793bb528b0facd5437a564300ed6a6ad06d5d0ec3193b9a772e13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1731, + "startColumn": 2, + "charOffset": 85971, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1729, + "startColumn": 2, + "charOffset": 85816, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_HELMETS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_QUIVERS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_RINGS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FROG_OR_LIQUID);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_WOOD_OBJECT_HIT_STORE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "965ad3ec817a5eafbcc053303df04df7f06a2173976927d310e8d56c93bf720f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1732, + "startColumn": 2, + "charOffset": 86046, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1730, + "startColumn": 2, + "charOffset": 85893, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_QUIVERS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_RINGS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FROG_OR_LIQUID);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_WOOD_OBJECT_HIT_STORE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_BOOTS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb3103cd0a0bb96c9b3efded2c22fa72f95da7225eb377a8bc15516bd4761377" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1733, + "startColumn": 2, + "charOffset": 86124, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1731, + "startColumn": 2, + "charOffset": 85970, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_RINGS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FROG_OR_LIQUID);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_WOOD_OBJECT_HIT_STORE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_BOOTS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_SWORD_DRAWN);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bca81380ab1ac18cffdbcd72b3b5a086fde6c0bde61ba77b3cc0caf7b121f883" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1734, + "startColumn": 2, + "charOffset": 86212, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1732, + "startColumn": 2, + "charOffset": 86045, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_FROG_OR_LIQUID);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_WOOD_OBJECT_HIT_STORE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_BOOTS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_SWORD_DRAWN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_EAT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd3596dea59c190758e9bb8138ae495f7087947b79e76ad1f5564dc0340cf89c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1735, + "startColumn": 2, + "charOffset": 86287, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1733, + "startColumn": 2, + "charOffset": 86123, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_WOOD_OBJECT_HIT_STORE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_BOOTS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_SWORD_DRAWN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_EAT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_STORE_BIG_OBJECT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46d0407944c5da90ae36327998dde25047de684b7557555aab6af43245c2c8ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1736, + "startColumn": 2, + "charOffset": 86365, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1734, + "startColumn": 2, + "charOffset": 86211, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ITEM_MOVE_BOOTS);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_SWORD_DRAWN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_EAT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_STORE_BIG_OBJECT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_STORE_WOOD_OBJECT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e887526b12e41b36a75909435d11220a2285e91f99b5d01402546c0fb8374f23" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1737, + "startColumn": 2, + "charOffset": 86435, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1735, + "startColumn": 2, + "charOffset": 86286, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_SWORD_DRAWN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_EAT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_STORE_BIG_OBJECT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_STORE_WOOD_OBJECT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_VIP_LOGOUT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a7ea62987736d9d37055e49a911b53701f8d53439d951311da278d81efb183f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1738, + "startColumn": 2, + "charOffset": 86518, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1736, + "startColumn": 2, + "charOffset": 86364, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_EAT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_STORE_BIG_OBJECT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_STORE_WOOD_OBJECT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_VIP_LOGOUT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_VIP_LOGIN);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34dc91baa0255631c13fc226235e82482f19fcde188e8c267dc2c8b0b104ccdd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1739, + "startColumn": 2, + "charOffset": 86602, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1737, + "startColumn": 2, + "charOffset": 86434, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_STORE_BIG_OBJECT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_STORE_WOOD_OBJECT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_VIP_LOGOUT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_VIP_LOGIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CAT_1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5d50b4d425aa32d7989ecc0a680e56fbb831b33e10c84752fae8899d9199153" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1740, + "startColumn": 2, + "charOffset": 86679, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1738, + "startColumn": 2, + "charOffset": 86517, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_STORE_WOOD_OBJECT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_VIP_LOGOUT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_VIP_LOGIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CAT_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_INSECT_2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f51ebdc67ea64013d920e2f36bab4391fb1353b1ea51c797b5aeb2ad8429c07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1741, + "startColumn": 2, + "charOffset": 86755, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1739, + "startColumn": 2, + "charOffset": 86601, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_VIP_LOGOUT);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_VIP_LOGIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CAT_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_INSECT_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SEAGUL_2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3074d853655557139f55ecb7931bca7fb0d7d6d9639d5200624d8ac57341716" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1742, + "startColumn": 2, + "charOffset": 86824, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1740, + "startColumn": 2, + "charOffset": 86678, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_VIP_LOGIN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CAT_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_INSECT_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SEAGUL_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LIQUID_SPILL);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19cc2a24799faf38df6f54fb7dba803ac258c56c26db93b8bdf091171181b59e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1743, + "startColumn": 2, + "charOffset": 86896, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1741, + "startColumn": 2, + "charOffset": 86754, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CAT_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_INSECT_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SEAGUL_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LIQUID_SPILL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_COW_MOO_1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf8ffef72b64570b542e089b63ff6eade420cddfd0b6adf19522a3431ef18331" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1744, + "startColumn": 2, + "charOffset": 86968, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1742, + "startColumn": 2, + "charOffset": 86823, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_INSECT_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SEAGUL_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LIQUID_SPILL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_COW_MOO_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_COW_MOO_2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19af95c8454cda06126400d5ab5f38aeec27c61bddc6b170c9eff5c19f460df2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1745, + "startColumn": 2, + "charOffset": 87044, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1743, + "startColumn": 2, + "charOffset": 86895, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SEAGUL_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LIQUID_SPILL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_COW_MOO_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_COW_MOO_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CAT_2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16344ad1976e34bd3d1c2539ebfda553fa23a1fc919e210fdf44d25c0dd0ad54" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1746, + "startColumn": 2, + "charOffset": 87117, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1744, + "startColumn": 2, + "charOffset": 86967, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_LIQUID_SPILL);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_COW_MOO_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_COW_MOO_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CAT_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_REAWRD_FEY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd4fe967b8a2451124345ef6e1d8c7c7fdcb7bbe5d3a7ddb10cd6397a5ef632d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1747, + "startColumn": 2, + "charOffset": 87190, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1745, + "startColumn": 2, + "charOffset": 87043, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_COW_MOO_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_COW_MOO_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CAT_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_REAWRD_FEY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_REWARD_GUITAR_1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd5a0abffc6d6c2a61dcc3235c53cd5f877284aa05c17d3dbab175c1618782fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1748, + "startColumn": 2, + "charOffset": 87259, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1746, + "startColumn": 2, + "charOffset": 87116, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_COW_MOO_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CAT_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_REAWRD_FEY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_REWARD_GUITAR_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_REWARD_GUITAR_2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e779707a23fd366af40f8db90da8aa16a77ff83c0b22814383d8e33e9b88e6c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1749, + "startColumn": 2, + "charOffset": 87336, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1747, + "startColumn": 2, + "charOffset": 87189, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_CAT_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_REAWRD_FEY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_REWARD_GUITAR_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_REWARD_GUITAR_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOODS_WATER_SOURCE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19cc2a24799faf38df6f54fb7dba803ac258c56c26db93b8bdf091171181b59e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1750, + "startColumn": 2, + "charOffset": 87418, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1748, + "startColumn": 2, + "charOffset": 87258, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_REAWRD_FEY);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_REWARD_GUITAR_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_REWARD_GUITAR_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOODS_WATER_SOURCE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HYENA);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d44032ce3117d0d3d738c2776f51a1a6672b50b1a426c887ce16b9d0c4905cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1751, + "startColumn": 2, + "charOffset": 87500, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1749, + "startColumn": 2, + "charOffset": 87335, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_REWARD_GUITAR_1);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_REWARD_GUITAR_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOODS_WATER_SOURCE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HYENA);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_6);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10443931e1cc3324ee0d61862c42bde5a3ba72f564f0318092c1f277260e6d04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1752, + "startColumn": 2, + "charOffset": 87582, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1750, + "startColumn": 2, + "charOffset": 87417, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_REWARD_GUITAR_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOODS_WATER_SOURCE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HYENA);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_6);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_COW_MOO_3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb3103cd0a0bb96c9b3efded2c22fa72f95da7225eb377a8bc15516bd4761377" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1753, + "startColumn": 2, + "charOffset": 87651, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1751, + "startColumn": 2, + "charOffset": 87499, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WOODS_WATER_SOURCE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HYENA);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_6);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_COW_MOO_3);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_7);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e138a05b51efc1fd6af719e196117cbd2b1651d16b32fb16249d8495fa2e6a09" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1754, + "startColumn": 2, + "charOffset": 87735, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1752, + "startColumn": 2, + "charOffset": 87581, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_HYENA);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_6);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_COW_MOO_3);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_7);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_METALIC_SPACE_ALIEN);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9256a7f24ee1ede94153f683889ccf5634157fa3e3901111c6ab188a53d3aa8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1755, + "startColumn": 2, + "charOffset": 87808, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1753, + "startColumn": 2, + "charOffset": 87650, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_6);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_COW_MOO_3);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_7);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_METALIC_SPACE_ALIEN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_AIR_STRIKE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c0e99fba9a5626ccbf199c39715bf09e1ccaea33bff60f2b8ec68070e7b9fa9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1756, + "startColumn": 2, + "charOffset": 87892, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1754, + "startColumn": 2, + "charOffset": 87734, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_COW_MOO_3);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_7);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_METALIC_SPACE_ALIEN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_AIR_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATER);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af290da3fb906f3ebe9df1e5de947f057744dc149ba2de62a41eb83b464c65d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1757, + "startColumn": 2, + "charOffset": 87975, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1755, + "startColumn": 2, + "charOffset": 87807, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::UNKNOWN_CREATURE_DEATH_7);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_METALIC_SPACE_ALIEN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_AIR_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SNAKE_2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b83757f749732f048d913a6b6b56aeb9fb54f50d2f0ce22da478a90d48215d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1758, + "startColumn": 2, + "charOffset": 88052, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1756, + "startColumn": 2, + "charOffset": 87891, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_METALIC_SPACE_ALIEN);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_AIR_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SNAKE_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::GOD_SPELL_KILL_ALL_MONSTERS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72be4cc66d82eaaa67083feadda159adbbe045743c1fd9754b36d071b8a92b83" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1759, + "startColumn": 2, + "charOffset": 88121, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1757, + "startColumn": 2, + "charOffset": 87974, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ACTION_AIR_STRIKE);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SNAKE_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::GOD_SPELL_KILL_ALL_MONSTERS);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fcada5505236a4a7a49e47903c77af4054aa74234e630a029704a1dd628287f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1760, + "startColumn": 2, + "charOffset": 88192, + "charLength": 21, + "snippet": { + "text": "registerEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1758, + "startColumn": 2, + "charOffset": 88051, + "charLength": 21, + "snippet": { + "text": "\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_WATER);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::ENV_SNAKE_2);\n\tregisterEnumNamespace(L, soundNamespace, SoundEffect_t::GOD_SPELL_KILL_ALL_MONSTERS);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "294c3cc5f1bde55fb034cdec03535e34bb2ee82b9ec609998588ecafa993d86c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1765, + "startColumn": 2, + "charOffset": 88376, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1763, + "startColumn": 2, + "charOffset": 88281, + "charLength": 3, + "snippet": { + "text": "void LuaEnums::initWheelEnums(lua_State* L) {\n\tstd::string wheelNamespace = \"WHEEL_INSTANT_\";\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnumNamespace(L, wheelNamespace, value);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7b1181591996178ec675263e14681e5f0ef7dac16b923568a84f46ae246a97d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1766, + "startColumn": 3, + "charOffset": 88441, + "charLength": 26, + "snippet": { + "text": "registerMagicEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1764, + "startColumn": 3, + "charOffset": 88327, + "charLength": 26, + "snippet": { + "text": "\tstd::string wheelNamespace = \"WHEEL_INSTANT_\";\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnumNamespace(L, wheelNamespace, value);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1fdade37a0d817db4fa6b0597405799cb72367eadba401b5aed5065c29acb28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1770, + "startColumn": 2, + "charOffset": 88534, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1768, + "startColumn": 2, + "charOffset": 88498, + "charLength": 3, + "snippet": { + "text": "\n\twheelNamespace = \"WHEEL_STAGE_\";\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnumNamespace(L, wheelNamespace, value);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5d101efc800103f51c0f731d2febe894f452b64068ee5c6f23c1c91a7b56cf1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1771, + "startColumn": 3, + "charOffset": 88597, + "charLength": 26, + "snippet": { + "text": "registerMagicEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1769, + "startColumn": 3, + "charOffset": 88499, + "charLength": 26, + "snippet": { + "text": "\twheelNamespace = \"WHEEL_STAGE_\";\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnumNamespace(L, wheelNamespace, value);\n\t}\n\twheelNamespace = \"WHEEL_GRADE_\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02578e53e320d964e0431fc7f82eba0a0025e868bb91d96d201a4167689ab3c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1774, + "startColumn": 2, + "charOffset": 88689, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1772, + "startColumn": 2, + "charOffset": 88651, + "charLength": 3, + "snippet": { + "text": "\t}\n\twheelNamespace = \"WHEEL_GRADE_\";\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnumNamespace(L, wheelNamespace, value);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95d112be878ef8759705ecd6a78875252abdda83afeb25a7e78313beb1f860c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1775, + "startColumn": 3, + "charOffset": 88757, + "charLength": 26, + "snippet": { + "text": "registerMagicEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1773, + "startColumn": 3, + "charOffset": 88654, + "charLength": 26, + "snippet": { + "text": "\twheelNamespace = \"WHEEL_GRADE_\";\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnumNamespace(L, wheelNamespace, value);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62517877043d2cba459c948346f0f5a094b8404226c1fc822575569b833f55fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1779, + "startColumn": 2, + "charOffset": 88857, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1777, + "startColumn": 2, + "charOffset": 88814, + "charLength": 3, + "snippet": { + "text": "\n\twheelNamespace = \"WHEEL_AVATAR_SKILL_\";\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnumNamespace(L, wheelNamespace, value);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eff46cfa226e7497e3c8e78ec17343b90a43cda9602cda12eff5c68bcd01b9da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1780, + "startColumn": 3, + "charOffset": 88926, + "charLength": 26, + "snippet": { + "text": "registerMagicEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1778, + "startColumn": 3, + "charOffset": 88815, + "charLength": 26, + "snippet": { + "text": "\twheelNamespace = \"WHEEL_AVATAR_SKILL_\";\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnumNamespace(L, wheelNamespace, value);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "482533cca3d5b66b22271bef6f41810a94e6ae0a448b01623a0b06241c43c86d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1784, + "startColumn": 2, + "charOffset": 89018, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1782, + "startColumn": 2, + "charOffset": 88983, + "charLength": 3, + "snippet": { + "text": "\n\twheelNamespace = \"WHEEL_STAT_\";\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnumNamespace(L, wheelNamespace, value);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c178b6cc053ac351411b9b21b45c162823e7cd32325d0a1db216ed7552b334e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1785, + "startColumn": 3, + "charOffset": 89080, + "charLength": 26, + "snippet": { + "text": "registerMagicEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1783, + "startColumn": 3, + "charOffset": 88984, + "charLength": 26, + "snippet": { + "text": "\twheelNamespace = \"WHEEL_STAT_\";\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnumNamespace(L, wheelNamespace, value);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5bda0b5365a49be53ebd368f9e57c12ee21d162d619d1207b2d4752d05612fa9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1789, + "startColumn": 2, + "charOffset": 89173, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1787, + "startColumn": 2, + "charOffset": 89137, + "charLength": 3, + "snippet": { + "text": "\n\twheelNamespace = \"WHEEL_BOOST_\";\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnumNamespace(L, wheelNamespace, value);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba55636cc9032edb1aa1c76c3fc1c9eb5b9c8a2f2c5a396e4e74d667f7aee013" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/lua_enums.cpp" + }, + "region": { + "startLine": 1790, + "startColumn": 3, + "charOffset": 89241, + "charLength": 26, + "snippet": { + "text": "registerMagicEnumNamespace" + } + }, + "contextRegion": { + "startLine": 1788, + "startColumn": 3, + "charOffset": 89138, + "charLength": 26, + "snippet": { + "text": "\twheelNamespace = \"WHEEL_BOOST_\";\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tregisterMagicEnumNamespace(L, wheelNamespace, value);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2787300baacf53e9ff1c822057c7ad72b42cf7530cd54b5363314da80e6cab4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.hpp" + }, + "region": { + "startLine": 13, + "startColumn": 10, + "charOffset": 429, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 11, + "startColumn": 10, + "charOffset": 384, + "charLength": 30, + "snippet": { + "text": "\n#include \"creatures/npcs/npcs.hpp\"\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"items/tile.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f69d6cfec9be0f6769310fd1d031cff4d88ef48385f012190be0fe563d15e4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.hpp", + "index": 1 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"creatures/monsters/monsters.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e45483e1912ecf8c717a48f913562d9a9cf501f9947625dad361d43acc28406" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.hpp", + "index": 2 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a2b3a997037594f8bab93e08d9b46935593069da5e9def3fec147ea485ffc36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/modal_window_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 32, + "startColumn": 21, + "charOffset": 1103, + "charLength": 6, + "snippet": { + "text": "window" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 21, + "charOffset": 1008, + "charLength": 6, + "snippet": { + "text": "\tconst auto &window = getUserdataShared(L, 1);\n\tif (window) {\n\t\tlua_pushnumber(L, window->id);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e0bc79f679673bcb8b9a41a86cbc43c8303181179e6a3f45daeda68c85ce162" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/modal_window_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 91, + "startColumn": 21, + "charOffset": 2476, + "charLength": 6, + "snippet": { + "text": "window" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 21, + "charOffset": 2381, + "charLength": 6, + "snippet": { + "text": "\tconst auto &window = getUserdataShared(L, 1);\n\tif (window) {\n\t\tlua_pushnumber(L, window->buttons.size());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16132f835ae2d697d30555b13661a51d033cd62a98a056cae85c07392fcaa5a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/modal_window_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 91, + "startColumn": 21, + "charOffset": 2476, + "charLength": 6, + "snippet": { + "text": "window" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 21, + "charOffset": 2381, + "charLength": 6, + "snippet": { + "text": "\tconst auto &window = getUserdataShared(L, 1);\n\tif (window) {\n\t\tlua_pushnumber(L, window->buttons.size());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78d6241943a0fb72c899b3091efda52d345732c7603a8bdb4a6f53c7f2af1450" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/modal_window_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 102, + "startColumn": 21, + "charOffset": 2745, + "charLength": 6, + "snippet": { + "text": "window" + } + }, + "contextRegion": { + "startLine": 100, + "startColumn": 21, + "charOffset": 2650, + "charLength": 6, + "snippet": { + "text": "\tconst auto &window = getUserdataShared(L, 1);\n\tif (window) {\n\t\tlua_pushnumber(L, window->choices.size());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b55dba7d6a67fa21332b6c109894f098e3245744db60a53ed9d373af5277bab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/modal_window_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 102, + "startColumn": 21, + "charOffset": 2745, + "charLength": 6, + "snippet": { + "text": "window" + } + }, + "contextRegion": { + "startLine": 100, + "startColumn": 21, + "charOffset": 2650, + "charLength": 6, + "snippet": { + "text": "\tconst auto &window = getUserdataShared(L, 1);\n\tif (window) {\n\t\tlua_pushnumber(L, window->choices.size());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "464362e4f8c9ef840c516306428ef01abd8285f1229ccfb3315e37de532fdd20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/modal_window_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 115, + "startColumn": 19, + "charOffset": 3094, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 113, + "startColumn": 19, + "charOffset": 3001, + "charLength": 12, + "snippet": { + "text": "\tconst auto &window = getUserdataShared(L, 1);\n\tif (window) {\n\t\twindow->buttons.emplace_back(text, id);\n\t\tpushBoolean(L, true);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8df81ec81a58054a543b284f6c77077577b06af95dd2bb9490631ba607bed9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/modal_window_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 129, + "startColumn": 19, + "charOffset": 3466, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 127, + "startColumn": 19, + "charOffset": 3373, + "charLength": 12, + "snippet": { + "text": "\tconst auto &window = getUserdataShared(L, 1);\n\tif (window) {\n\t\twindow->choices.emplace_back(text, id);\n\t\tpushBoolean(L, true);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d801c199762009063836d2342df079902c4cb5af04c0824621908b10e7c59ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/modal_window_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 141, + "startColumn": 21, + "charOffset": 3772, + "charLength": 6, + "snippet": { + "text": "window" + } + }, + "contextRegion": { + "startLine": 139, + "startColumn": 21, + "charOffset": 3677, + "charLength": 6, + "snippet": { + "text": "\tconst auto &window = getUserdataShared(L, 1);\n\tif (window) {\n\t\tlua_pushnumber(L, window->defaultEnterButton);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23bd173960adfc2a06a59b68131328a4b0000604927620ab1e536e9d7f04923f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/modal_window_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 164, + "startColumn": 21, + "charOffset": 4388, + "charLength": 6, + "snippet": { + "text": "window" + } + }, + "contextRegion": { + "startLine": 162, + "startColumn": 21, + "charOffset": 4293, + "charLength": 6, + "snippet": { + "text": "\tconst auto &window = getUserdataShared(L, 1);\n\tif (window) {\n\t\tlua_pushnumber(L, window->defaultEscapeButton);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b9ad000cb9bc901a8a848277b9d77a6e100689fee6f3eab1d2b84307049ec0c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/modal_window_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 209, + "startColumn": 6, + "charOffset": 5486, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 207, + "startColumn": 6, + "charOffset": 5405, + "charLength": 1, + "snippet": { + "text": "\t// modalWindow:sendToPlayer(player)\n\tconst auto &player = getPlayer(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "143c225585135fee33ff9f34d6674fc32a1301d28938cc0569238175f8205835" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/modal_window_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 210, + "startColumn": 3, + "charOffset": 5499, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 208, + "startColumn": 3, + "charOffset": 5442, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getPlayer(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4f9b226d30dc377732f971bd4190a7ef3c33db348db8ac4b9e98aa7738027a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 11, + "startColumn": 6, + "charOffset": 271, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9, + "startColumn": 6, + "charOffset": 202, + "charLength": 1, + "snippet": { + "text": "\tauto name = getString(L, 2);\n\tauto zone = Zone::getZone(name);\n\tif (!zone) {\n\t\tzone = Zone::addZone(name);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "716e3a5ff87007fb6255042607f8ea9a85790baeac9f2c00343b0360f2f3c21d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 22, + "startColumn": 6, + "charOffset": 532, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 6, + "charOffset": 437, + "charLength": 1, + "snippet": { + "text": "\tauto zone1 = getUserdataShared(L, 1);\n\tauto zone2 = getUserdataShared(L, 2);\n\tif (!zone1) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c5c36d10360950f527ea26f430104680bc7411f7fb495d29c66a16128ef4432" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 23, + "startColumn": 3, + "charOffset": 544, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 21, + "startColumn": 3, + "charOffset": 482, + "charLength": 15, + "snippet": { + "text": "\tauto zone2 = getUserdataShared(L, 2);\n\tif (!zone1) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "128befca32ced60540786acc6a5c5171168fe4fea8e0fa4af020bf94f803722a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 6, + "charOffset": 646, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 6, + "charOffset": 626, + "charLength": 1, + "snippet": { + "text": "\t\treturn 1;\n\t}\n\tif (!zone2) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c59acee60b28b92f5979ce7ce696866748081fdd59249a7afa58798d3b58f46f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 3, + "charOffset": 658, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 3, + "charOffset": 638, + "charLength": 15, + "snippet": { + "text": "\t}\n\tif (!zone2) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6592b06a6333e2ed35ef0993b8a40f67cb746394eceaa1b4de66724f399ac1ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 40, + "startColumn": 6, + "charOffset": 943, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 38, + "startColumn": 6, + "charOffset": 875, + "charLength": 1, + "snippet": { + "text": "\t// Zone:getName()\n\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "671d698eebae20914ed0516fb40624668f2c15964d98760b87a72483d3d49806" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 3, + "charOffset": 954, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 3, + "charOffset": 894, + "charLength": 15, + "snippet": { + "text": "\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f847a7c84bab2ff7441488d8bf3d14dc807b17bf98e1d5b66cd92bed6787736f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 52, + "startColumn": 6, + "charOffset": 1230, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 50, + "startColumn": 6, + "charOffset": 1148, + "charLength": 1, + "snippet": { + "text": "\t// Zone:addArea(fromPos, toPos)\n\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d424af15614bc00824d06072a1c41ff7b3c57c8b06b17027cfb03f51dea3dcd1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 53, + "startColumn": 3, + "charOffset": 1241, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 3, + "charOffset": 1181, + "charLength": 15, + "snippet": { + "text": "\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "363f1571e6ed435dd799ab9204462f54f71a8be6dc4ae777fa6f87e61a31b97c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 68, + "startColumn": 6, + "charOffset": 1642, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 66, + "startColumn": 6, + "charOffset": 1555, + "charLength": 1, + "snippet": { + "text": "\t// Zone:subtractArea(fromPos, toPos)\n\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f74350804d7a9026ac88355919d56f3ae120dd3ac9fb4236e45adb3add4d210e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 69, + "startColumn": 3, + "charOffset": 1653, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 67, + "startColumn": 3, + "charOffset": 1593, + "charLength": 15, + "snippet": { + "text": "\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f14ed195a9ca9bc06f63e15892dd05a418005bee3f46239ac1e2e9859352d0fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 84, + "startColumn": 6, + "charOffset": 2061, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 6, + "charOffset": 1980, + "charLength": 1, + "snippet": { + "text": "\t// Zone:getRemoveDestination()\n\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ece1c76581da5deee793b42aa6dd33211dd4fb483e2cb2ca9a07ec510d59f201" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 85, + "startColumn": 3, + "charOffset": 2072, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 3, + "charOffset": 2012, + "charLength": 15, + "snippet": { + "text": "\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43c517affca56b297ac935ec5ccc60ec3589eb395f35a91acf056fcb74f1a0bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 95, + "startColumn": 6, + "charOffset": 2353, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 93, + "startColumn": 6, + "charOffset": 2269, + "charLength": 1, + "snippet": { + "text": "\t// Zone:setRemoveDestination(pos)\n\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8c3e388f81d28a54de99e7cec5936484aa351f4f3490ef0b2b921c1f5397f47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 96, + "startColumn": 3, + "charOffset": 2364, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 3, + "charOffset": 2304, + "charLength": 15, + "snippet": { + "text": "\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95ceacd9edbe8d63dd1e07de14c0063f5c7210705b57dac288ae9161a98ea21e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 107, + "startColumn": 6, + "charOffset": 2643, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 105, + "startColumn": 6, + "charOffset": 2570, + "charLength": 1, + "snippet": { + "text": "\t// Zone:getPositions()\n\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eec27da6a91f94773093000370262731e1c89373dd83a2ae0c2785a259b91c58" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 108, + "startColumn": 3, + "charOffset": 2654, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 3, + "charOffset": 2594, + "charLength": 15, + "snippet": { + "text": "\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94a646b6fc6194502aed2a61503b17476af094c1120dbceaded6f99928a5b582" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 116, + "startColumn": 2, + "charOffset": 2869, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 114, + "startColumn": 2, + "charOffset": 2851, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (auto pos : positions) {\n\t\tindex++;\n\t\tpushPosition(L, pos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a5bee0fb127827e7b92d923e67dff120ac66649041e36db73b9f9d0f79357dbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 127, + "startColumn": 6, + "charOffset": 3107, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 125, + "startColumn": 6, + "charOffset": 3034, + "charLength": 1, + "snippet": { + "text": "\t// Zone:getCreatures()\n\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ee59abc9e596d84d2429b1b6ab53023dddf7cd1943212ccc568bf4e0f906351" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 128, + "startColumn": 3, + "charOffset": 3118, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 126, + "startColumn": 3, + "charOffset": 3058, + "charLength": 15, + "snippet": { + "text": "\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b3fb281ed379f51b73f2ed1689f642ff865bb4cfb887d0d6b170fba7814ce2d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 136, + "startColumn": 2, + "charOffset": 3333, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 2, + "charOffset": 3315, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (auto creature : creatures) {\n\t\tindex++;\n\t\tpushUserdata(L, creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e109dd19551adba05e48a249f26f2f25ce2e2444166984081e57344dd6f150ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 136, + "startColumn": 12, + "charOffset": 3343, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 12, + "charOffset": 3315, + "charLength": 8, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (auto creature : creatures) {\n\t\tindex++;\n\t\tpushUserdata(L, creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "266490debd1cd4050fa9a764e306e0b7768fe84b61935b295d33a83d858a5056" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 148, + "startColumn": 6, + "charOffset": 3622, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 146, + "startColumn": 6, + "charOffset": 3551, + "charLength": 1, + "snippet": { + "text": "\t// Zone:getPlayers()\n\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3d0d2473f83009225ed578a0981e44e382f15c532c57656cd755f5ad667555e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 149, + "startColumn": 3, + "charOffset": 3633, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 147, + "startColumn": 3, + "charOffset": 3573, + "charLength": 15, + "snippet": { + "text": "\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd72b63eb96dff09d55ab5922dda3474b6707f3d017fc18a0dd069e32e36f736" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 2, + "charOffset": 3842, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 2, + "charOffset": 3824, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (auto player : players) {\n\t\tindex++;\n\t\tpushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e28f2ae69b626502ab75e190eb0ec36c3a0e77051b244a88f6e98f644293cfe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 12, + "charOffset": 3852, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 12, + "charOffset": 3824, + "charLength": 6, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (auto player : players) {\n\t\tindex++;\n\t\tpushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b9ba974eb8b99b5314aafbd9cead90b2124cf398d74597cb01d81307b4110e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 169, + "startColumn": 6, + "charOffset": 4123, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 167, + "startColumn": 6, + "charOffset": 4051, + "charLength": 1, + "snippet": { + "text": "\t// Zone:getMonsters()\n\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5aa07b3a8f3e6206fa930bfc6ad36c669e0fbcebe35ca8894fde717ce3065c1f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 170, + "startColumn": 3, + "charOffset": 4134, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 168, + "startColumn": 3, + "charOffset": 4074, + "charLength": 15, + "snippet": { + "text": "\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ed3d2843dc689bd4b633f9fdf88b664d75f702c0f0ff470473717d9dc90c1c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 178, + "startColumn": 2, + "charOffset": 4346, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 176, + "startColumn": 2, + "charOffset": 4328, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (auto monster : monsters) {\n\t\tindex++;\n\t\tpushUserdata(L, monster);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5390cc90742eba195bb49a9047869f3ba33b4aa7ad4aa92bc4c7b5ec25a5fef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 178, + "startColumn": 12, + "charOffset": 4356, + "charLength": 7, + "snippet": { + "text": "monster" + } + }, + "contextRegion": { + "startLine": 176, + "startColumn": 12, + "charOffset": 4328, + "charLength": 7, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (auto monster : monsters) {\n\t\tindex++;\n\t\tpushUserdata(L, monster);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf004f965068b67e5aabbdf7a94b8d823eecfaa02eda5f2224e2ec1f0c7c560f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 190, + "startColumn": 6, + "charOffset": 4624, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 188, + "startColumn": 6, + "charOffset": 4556, + "charLength": 1, + "snippet": { + "text": "\t// Zone:getNpcs()\n\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ee43005d802efa6f1c42ad230bbacd04f3de3bca9e12eac9c49574641d78ed3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 191, + "startColumn": 3, + "charOffset": 4635, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 189, + "startColumn": 3, + "charOffset": 4575, + "charLength": 15, + "snippet": { + "text": "\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f13f5218269429209a3a3b37ac0b3cf297f99ae181bbfc9e0a46db4054e16bdb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 199, + "startColumn": 2, + "charOffset": 4835, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 197, + "startColumn": 2, + "charOffset": 4817, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (auto npc : npcs) {\n\t\tindex++;\n\t\tpushUserdata(L, npc);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b4d2bf2a943b59eabfff77d346e6cb040a7f4160ddc2d7cb0f467a903986465" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 199, + "startColumn": 12, + "charOffset": 4845, + "charLength": 3, + "snippet": { + "text": "npc" + } + }, + "contextRegion": { + "startLine": 197, + "startColumn": 12, + "charOffset": 4817, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (auto npc : npcs) {\n\t\tindex++;\n\t\tpushUserdata(L, npc);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5393096cbae21a08b514cc9e720329acccfee3c69e6dd3e3a1bffe23c32bad60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 211, + "startColumn": 6, + "charOffset": 5095, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 209, + "startColumn": 6, + "charOffset": 5026, + "charLength": 1, + "snippet": { + "text": "\t// Zone:getItems()\n\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a77037886cbe7676df5cd38ffdd06adafe29e5cb4ef3cbe2db312598a15ccf3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 212, + "startColumn": 3, + "charOffset": 5106, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 210, + "startColumn": 3, + "charOffset": 5046, + "charLength": 15, + "snippet": { + "text": "\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "644e181abcc30a8f863ac86ff84b57b491e8aab366e38664f7ecb58530968d9a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 220, + "startColumn": 2, + "charOffset": 5309, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 218, + "startColumn": 2, + "charOffset": 5291, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (auto item : items) {\n\t\tindex++;\n\t\tpushUserdata(L, item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2026e264fc7978f35c5f2cb71788b31e1644618b141e4af7d86128a9189e5a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 220, + "startColumn": 12, + "charOffset": 5319, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 218, + "startColumn": 12, + "charOffset": 5291, + "charLength": 4, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (auto item : items) {\n\t\tindex++;\n\t\tpushUserdata(L, item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c738af4f99e441176c3ea14b14bfaf8f7d90bd51c730d44bf9761c4e4941cc56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 232, + "startColumn": 6, + "charOffset": 5584, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 230, + "startColumn": 6, + "charOffset": 5510, + "charLength": 1, + "snippet": { + "text": "\t// Zone:removePlayers()\n\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1556cf4cbc620d08b70f9179bfc57993c28e60172801d92feb7cdfd2c06f1c2a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 233, + "startColumn": 3, + "charOffset": 5595, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 231, + "startColumn": 3, + "charOffset": 5535, + "charLength": 15, + "snippet": { + "text": "\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1833a077f2894c6f4d793c4a887b04c1a1a46e5a57aae14e37566af9e69f2c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 245, + "startColumn": 6, + "charOffset": 5863, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 243, + "startColumn": 6, + "charOffset": 5788, + "charLength": 1, + "snippet": { + "text": "\t// Zone:removeMonsters()\n\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a77037886cbe7676df5cd38ffdd06adafe29e5cb4ef3cbe2db312598a15ccf3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 246, + "startColumn": 3, + "charOffset": 5874, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 244, + "startColumn": 3, + "charOffset": 5814, + "charLength": 15, + "snippet": { + "text": "\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "644e181abcc30a8f863ac86ff84b57b491e8aab366e38664f7ecb58530968d9a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 257, + "startColumn": 6, + "charOffset": 6134, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 255, + "startColumn": 6, + "charOffset": 6063, + "charLength": 1, + "snippet": { + "text": "\t// Zone:removeNpcs()\n\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afebb83a7086a09a06553521c4fcb36b212d9bdd9a264aba28caf526b19b62c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 258, + "startColumn": 3, + "charOffset": 6145, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 256, + "startColumn": 3, + "charOffset": 6085, + "charLength": 15, + "snippet": { + "text": "\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc6103e27f3817f7e5a14c5b454b7414e865ea520fe78ef2d345215b310a8bfe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 269, + "startColumn": 6, + "charOffset": 6422, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 267, + "startColumn": 6, + "charOffset": 6337, + "charLength": 1, + "snippet": { + "text": "\t// Zone:setMonsterVariant(variant)\n\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb32c73179bedfd574b3693a12e5c1c8e336c8c74cb82c935c7f54e1adbe1285" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 270, + "startColumn": 3, + "charOffset": 6433, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 268, + "startColumn": 3, + "charOffset": 6373, + "charLength": 15, + "snippet": { + "text": "\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "545573ab0f94247a52b9be9a9ddaf03e286f94409212cac9a50f1ccf056c16fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 288, + "startColumn": 6, + "charOffset": 6845, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 286, + "startColumn": 6, + "charOffset": 6776, + "charLength": 1, + "snippet": { + "text": "\tauto name = getString(L, 1);\n\tauto zone = Zone::getZone(name);\n\tif (!zone) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10e98409a26b12d4adfcd4d74e03ed397ab1cd0d03b8b147aa6f66c6800fecbd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 301, + "startColumn": 6, + "charOffset": 7121, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 299, + "startColumn": 6, + "charOffset": 7045, + "charLength": 1, + "snippet": { + "text": "\tauto pos = getPosition(L, 1);\n\tauto tile = g_game().map.getTile(pos);\n\tif (!tile) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ece6c01876eccb5aef6075c6dec64e621946e26a0f639953b816c8a21d8bd60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 308, + "startColumn": 2, + "charOffset": 7268, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 306, + "startColumn": 2, + "charOffset": 7179, + "charLength": 3, + "snippet": { + "text": "\tauto zones = tile->getZones();\n\tlua_createtable(L, static_cast(zones.size()), 0);\n\tfor (auto zone : zones) {\n\t\tindex++;\n\t\tpushUserdata(L, zone);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93a0819504218b33a8c7bcab1a73559feba08451819e08788bc9134df525d649" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 308, + "startColumn": 12, + "charOffset": 7278, + "charLength": 4, + "snippet": { + "text": "zone" + } + }, + "contextRegion": { + "startLine": 306, + "startColumn": 12, + "charOffset": 7179, + "charLength": 4, + "snippet": { + "text": "\tauto zones = tile->getZones();\n\tlua_createtable(L, static_cast(zones.size()), 0);\n\tfor (auto zone : zones) {\n\t\tindex++;\n\t\tpushUserdata(L, zone);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22b4594fc498d973d877fdccc9147eed87e3509a1eef99e899e259e7c3e36032" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 322, + "startColumn": 2, + "charOffset": 7585, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 320, + "startColumn": 2, + "charOffset": 7512, + "charLength": 3, + "snippet": { + "text": "\tlua_createtable(L, static_cast(zones.size()), 0);\n\tint index = 0;\n\tfor (auto zone : zones) {\n\t\tindex++;\n\t\tpushUserdata(L, zone);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2eed0fae8096773f537e383f5bd16dbc71a33d0207e0082526494167c09ebc6c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 322, + "startColumn": 12, + "charOffset": 7595, + "charLength": 4, + "snippet": { + "text": "zone" + } + }, + "contextRegion": { + "startLine": 320, + "startColumn": 12, + "charOffset": 7512, + "charLength": 4, + "snippet": { + "text": "\tlua_createtable(L, static_cast(zones.size()), 0);\n\tint index = 0;\n\tfor (auto zone : zones) {\n\t\tindex++;\n\t\tpushUserdata(L, zone);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbedc895afedc6b3323b562193c3c475d0526fb68a1e0b2da019d067b264e188" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 334, + "startColumn": 6, + "charOffset": 7848, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 332, + "startColumn": 6, + "charOffset": 7780, + "charLength": 1, + "snippet": { + "text": "\t// Zone:refresh()\n\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "629f657a8f9cfea376da58a02371724e64bf2126535e9148fccacdae30373182" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/zone_functions.cpp" + }, + "region": { + "startLine": 335, + "startColumn": 3, + "charOffset": 7859, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 333, + "startColumn": 3, + "charOffset": 7799, + "charLength": 15, + "snippet": { + "text": "\tauto zone = getUserdataShared(L, 1);\n\tif (!zone) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ZONE_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6378888cd1d2bd76230fda0f1a293ab8180090583c253a1fa2f3f6b53543bb11" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/db_functions.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 42, + "charOffset": 976, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 42, + "charOffset": 838, + "charLength": 1, + "snippet": { + "text": "\t\tint32_t ref = luaL_ref(L, LUA_REGISTRYINDEX);\n\t\tauto scriptId = getScriptEnv()->getScriptId();\n\t\tcallback = [ref, scriptId](DBResult_ptr, bool success) {\n\t\t\tlua_State* luaState = g_luaEnvironment().getLuaState();\n\t\t\tif (!luaState) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b26946820c197a72529f2c508e2ffb6c07fd4a5921e60ee3ed9f5a055abb1aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/db_functions.cpp" + }, + "region": { + "startLine": 29, + "startColumn": 8, + "charOffset": 1060, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 27, + "startColumn": 8, + "charOffset": 935, + "charLength": 1, + "snippet": { + "text": "\t\tcallback = [ref, scriptId](DBResult_ptr, bool success) {\n\t\t\tlua_State* luaState = g_luaEnvironment().getLuaState();\n\t\t\tif (!luaState) {\n\t\t\t\treturn;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "550dc59292cee5d34febea3d3d41c5124cc57d46931cb8d377a3f38f148d8efe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'lua_State *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/db_functions.cpp" + }, + "region": { + "startLine": 29, + "startColumn": 9, + "charOffset": 1061, + "charLength": 8, + "snippet": { + "text": "luaState" + } + }, + "contextRegion": { + "startLine": 27, + "startColumn": 9, + "charOffset": 935, + "charLength": 8, + "snippet": { + "text": "\t\tcallback = [ref, scriptId](DBResult_ptr, bool success) {\n\t\t\tlua_State* luaState = g_luaEnvironment().getLuaState();\n\t\t\tif (!luaState) {\n\t\t\t\treturn;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce932cb9492cd90329241b68c2bcc442c943f8ff9961d9f50019e5936f4b3c67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto env' can be declared as 'auto *env'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/db_functions.cpp" + }, + "region": { + "startLine": 40, + "startColumn": 4, + "charOffset": 1290, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 38, + "startColumn": 4, + "charOffset": 1202, + "charLength": 4, + "snippet": { + "text": "\t\t\tlua_rawgeti(luaState, LUA_REGISTRYINDEX, ref);\n\t\t\tpushBoolean(luaState, success);\n\t\t\tauto env = getScriptEnv();\n\t\t\tenv->setScriptId(scriptId, &g_luaEnvironment());\n\t\t\tg_luaEnvironment().callFunction(1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75a06ae63c872eb8bb9d2b2daa441e7186f78262735fcf63e3f576529bce9425" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/db_functions.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 23, + "charOffset": 1391, + "charLength": 12, + "snippet": { + "text": "callFunction" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 23, + "charOffset": 1287, + "charLength": 12, + "snippet": { + "text": "\t\t\tauto env = getScriptEnv();\n\t\t\tenv->setScriptId(scriptId, &g_luaEnvironment());\n\t\t\tg_luaEnvironment().callFunction(1);\n\n\t\t\tluaL_unref(luaState, LUA_REGISTRYINDEX, ref);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a28c5f1eeaf94461188777864ea55a4353f9ae010db1c8961de57fc0abe956fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/db_functions.cpp" + }, + "region": { + "startLine": 53, + "startColumn": 21, + "charOffset": 1691, + "charLength": 17, + "snippet": { + "text": "ScriptEnvironment" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 21, + "charOffset": 1536, + "charLength": 17, + "snippet": { + "text": "int DBFunctions::luaDatabaseStoreQuery(lua_State* L) {\n\tif (DBResult_ptr res = Database::getInstance().storeQuery(getString(L, -1))) {\n\t\tlua_pushnumber(L, ScriptEnvironment::addResult(res));\n\t} else {\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "675665e88144450e13ed33745497cc072c71aa02f4cced11e2bba832d159ab8b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'result' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/db_functions.cpp" + }, + "region": { + "startLine": 65, + "startColumn": 43, + "charOffset": 2055, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 43, + "charOffset": 1916, + "charLength": 6, + "snippet": { + "text": "\t\tint32_t ref = luaL_ref(L, LUA_REGISTRYINDEX);\n\t\tauto scriptId = getScriptEnv()->getScriptId();\n\t\tcallback = [ref, scriptId](DBResult_ptr result, bool) {\n\t\t\tlua_State* luaState = g_luaEnvironment().getLuaState();\n\t\t\tif (!luaState) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7891b995e8e94d159e1e826029efcaa115eef071e210129af1a8927712917df7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/db_functions.cpp" + }, + "region": { + "startLine": 67, + "startColumn": 8, + "charOffset": 2137, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 65, + "startColumn": 8, + "charOffset": 2013, + "charLength": 1, + "snippet": { + "text": "\t\tcallback = [ref, scriptId](DBResult_ptr result, bool) {\n\t\t\tlua_State* luaState = g_luaEnvironment().getLuaState();\n\t\t\tif (!luaState) {\n\t\t\t\treturn;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4a9ab14d4897acc85e62938ea6ddf53205b5317b98d4a30960be0944aa98275" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'lua_State *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/db_functions.cpp" + }, + "region": { + "startLine": 67, + "startColumn": 9, + "charOffset": 2138, + "charLength": 8, + "snippet": { + "text": "luaState" + } + }, + "contextRegion": { + "startLine": 65, + "startColumn": 9, + "charOffset": 2013, + "charLength": 8, + "snippet": { + "text": "\t\tcallback = [ref, scriptId](DBResult_ptr result, bool) {\n\t\t\tlua_State* luaState = g_luaEnvironment().getLuaState();\n\t\t\tif (!luaState) {\n\t\t\t\treturn;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a2a326ac3e29a8f41eb8cf5cc7f764086b678be3fb943737ac89e4390192be8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/db_functions.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 30, + "charOffset": 2375, + "charLength": 17, + "snippet": { + "text": "ScriptEnvironment" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 30, + "charOffset": 2279, + "charLength": 17, + "snippet": { + "text": "\t\t\tlua_rawgeti(luaState, LUA_REGISTRYINDEX, ref);\n\t\t\tif (result) {\n\t\t\t\tlua_pushnumber(luaState, ScriptEnvironment::addResult(result));\n\t\t\t} else {\n\t\t\t\tpushBoolean(luaState, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83de7c53c6fee52c25cea41df3c005e0fdd584a67f6ce627465e7c05a938f9da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto env' can be declared as 'auto *env'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/db_functions.cpp" + }, + "region": { + "startLine": 82, + "startColumn": 4, + "charOffset": 2468, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 4, + "charOffset": 2426, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tpushBoolean(luaState, false);\n\t\t\t}\n\t\t\tauto env = getScriptEnv();\n\t\t\tenv->setScriptId(scriptId, &g_luaEnvironment());\n\t\t\tg_luaEnvironment().callFunction(1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4efd845982c71e4878baca3d3bf9f614769b1830d41507d82f0a94a8f748b90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/db_functions.cpp" + }, + "region": { + "startLine": 84, + "startColumn": 23, + "charOffset": 2569, + "charLength": 12, + "snippet": { + "text": "callFunction" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 23, + "charOffset": 2465, + "charLength": 12, + "snippet": { + "text": "\t\t\tauto env = getScriptEnv();\n\t\t\tenv->setScriptId(scriptId, &g_luaEnvironment());\n\t\t\tg_luaEnvironment().callFunction(1);\n\n\t\t\tluaL_unref(luaState, LUA_REGISTRYINDEX, ref);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f11ca89fe27c876e6d29618a8b0d330c63b44aa82489c2172196c235433c523" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/db_functions.cpp" + }, + "region": { + "startLine": 105, + "startColumn": 20, + "charOffset": 3131, + "charLength": 8, + "snippet": { + "text": "Database" + } + }, + "contextRegion": { + "startLine": 103, + "startColumn": 20, + "charOffset": 3054, + "charLength": 8, + "snippet": { + "text": "\nint DBFunctions::luaDatabaseLastInsertId(lua_State* L) {\n\tlua_pushnumber(L, Database::getInstance().getLastInsertId());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc9539ede4836b0cc5f3bb19c9fbd1ba920417b84d9abd869264cca190376a05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/db_functions.cpp" + }, + "region": { + "startLine": 105, + "startColumn": 20, + "charOffset": 3131, + "charLength": 8, + "snippet": { + "text": "Database" + } + }, + "contextRegion": { + "startLine": 103, + "startColumn": 20, + "charOffset": 3054, + "charLength": 8, + "snippet": { + "text": "\nint DBFunctions::luaDatabaseLastInsertId(lua_State* L) {\n\tlua_pushnumber(L, Database::getInstance().getLastInsertId());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "525dee3589ecae4987c00d3d8fd995ea4a12b1cf8e681ace354eb4697223f59a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/result_functions.cpp" + }, + "region": { + "startLine": 16, + "startColumn": 6, + "charOffset": 590, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 14, + "startColumn": 6, + "charOffset": 448, + "charLength": 1, + "snippet": { + "text": "int ResultFunctions::luaResultGetNumber(lua_State* L) {\n\tDBResult_ptr res = ScriptEnvironment::getResultByID(getNumber(L, 1));\n\tif (!res) {\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3237d18866dfd8af227c07fc0fed3cd09b81ef9620bd6aa0c99d2cf2b40fbcf5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'long' to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/result_functions.cpp" + }, + "region": { + "startLine": 22, + "startColumn": 20, + "charOffset": 699, + "charLength": 3, + "snippet": { + "text": "res" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 20, + "charOffset": 638, + "charLength": 3, + "snippet": { + "text": "\n\tconst std::string &s = getString(L, 2);\n\tlua_pushnumber(L, res->getNumber(s));\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a04629bce7bb4075b8da140ca855bbeab5f8c112d6c8aa52439dacb755e7213" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/result_functions.cpp" + }, + "region": { + "startLine": 22, + "startColumn": 20, + "charOffset": 699, + "charLength": 3, + "snippet": { + "text": "res" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 20, + "charOffset": 638, + "charLength": 3, + "snippet": { + "text": "\n\tconst std::string &s = getString(L, 2);\n\tlua_pushnumber(L, res->getNumber(s));\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c2ec412e49e0da7dcbef904828f430a603e4a30b80a73956e9e704eb007acca8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/result_functions.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 6, + "charOffset": 884, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 6, + "charOffset": 742, + "charLength": 1, + "snippet": { + "text": "int ResultFunctions::luaResultGetString(lua_State* L) {\n\tDBResult_ptr res = ScriptEnvironment::getResultByID(getNumber(L, 1));\n\tif (!res) {\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "752de277c5e3374b2fca78b2a7cd27da11021880f7503a510a87b3dc68307dd5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/result_functions.cpp" + }, + "region": { + "startLine": 40, + "startColumn": 6, + "charOffset": 1165, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 38, + "startColumn": 6, + "charOffset": 1023, + "charLength": 1, + "snippet": { + "text": "int ResultFunctions::luaResultGetStream(lua_State* L) {\n\tDBResult_ptr res = ScriptEnvironment::getResultByID(getNumber(L, 1));\n\tif (!res) {\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "224777677f74e4a31e6caca81305769beaa594424c8a3d28e1668ebe9f7dfc46" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-runtime-int", + "ruleIndex": 546, + "kind": "fail", + "level": "warning", + "message": { + "text": "consider replacing 'unsigned long' with 'uint64'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/result_functions.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 2, + "charOffset": 1215, + "charLength": 8, + "snippet": { + "text": "unsigned" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 2, + "charOffset": 1210, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tunsigned long length;\n\tconst char* stream = res->getStream(getString(L, 2), length);\n\tlua_pushlstring(L, stream, length);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c50625836d8e78f3003dcc8ce890b408950b226c6f19c5ac2a6f2d111ff146be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'length' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/result_functions.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 16, + "charOffset": 1229, + "charLength": 6, + "snippet": { + "text": "length" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 16, + "charOffset": 1210, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tunsigned long length;\n\tconst char* stream = res->getStream(getString(L, 2), length);\n\tlua_pushlstring(L, stream, length);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e19e4576ac54f3ed0a2f2b021d2191616d24cc742e0ce368bcb18e6ee52233c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned long' to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/result_functions.cpp" + }, + "region": { + "startLine": 48, + "startColumn": 20, + "charOffset": 1356, + "charLength": 6, + "snippet": { + "text": "length" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 20, + "charOffset": 1237, + "charLength": 6, + "snippet": { + "text": "\tconst char* stream = res->getStream(getString(L, 2), length);\n\tlua_pushlstring(L, stream, length);\n\tlua_pushnumber(L, length);\n\treturn 2;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "442b3126e9c247f240c08159be5c2de08038154721868588d1ae4b2113d1eb09" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/result_functions.cpp" + }, + "region": { + "startLine": 48, + "startColumn": 20, + "charOffset": 1356, + "charLength": 6, + "snippet": { + "text": "length" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 20, + "charOffset": 1237, + "charLength": 6, + "snippet": { + "text": "\tconst char* stream = res->getStream(getString(L, 2), length);\n\tlua_pushlstring(L, stream, length);\n\tlua_pushnumber(L, length);\n\treturn 2;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4dbf859f93c605d847986ff5810763f4ff6437c6afd9e66a8986544298b69738" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/result_functions.cpp" + }, + "region": { + "startLine": 54, + "startColumn": 6, + "charOffset": 1517, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 52, + "startColumn": 6, + "charOffset": 1379, + "charLength": 1, + "snippet": { + "text": "int ResultFunctions::luaResultNext(lua_State* L) {\n\tDBResult_ptr res = ScriptEnvironment::getResultByID(getNumber(L, -1));\n\tif (!res) {\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd9b2b4d363120824816b88f7463b5d04f37e2f747bf35a27b4679de17e68f0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/logger_functions.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 3, + "charOffset": 2131, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 3, + "charOffset": 2071, + "charLength": 15, + "snippet": { + "text": "\t\tg_logger().info(getFormatedLoggerMessage(L));\n\t} else {\n\t\treportErrorFunc(\"First parameter needs to be a string\");\n\t}\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55ea77d48fe5f2a9ba869275f77841f49f39f31f7fbb85f06cfec1e299163575" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/logger_functions.cpp" + }, + "region": { + "startLine": 86, + "startColumn": 3, + "charOffset": 2361, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 3, + "charOffset": 2301, + "charLength": 15, + "snippet": { + "text": "\t\tg_logger().warn(getFormatedLoggerMessage(L));\n\t} else {\n\t\treportErrorFunc(\"First parameter needs to be a string\");\n\t}\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bee36a1fc2d84822ce74dd33b66d321b90265045022ec4e90c7df360a8aa9ee0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/logger_functions.cpp" + }, + "region": { + "startLine": 96, + "startColumn": 3, + "charOffset": 2594, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 3, + "charOffset": 2533, + "charLength": 15, + "snippet": { + "text": "\t\tg_logger().error(getFormatedLoggerMessage(L));\n\t} else {\n\t\treportErrorFunc(\"First parameter needs to be a string\");\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c897c6dfe9e535174abb186677470d44ddd3422b7c4081fd92dcc7f680808bc0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/logger_functions.cpp" + }, + "region": { + "startLine": 107, + "startColumn": 3, + "charOffset": 2828, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 105, + "startColumn": 3, + "charOffset": 2767, + "charLength": 15, + "snippet": { + "text": "\t\tg_logger().debug(getFormatedLoggerMessage(L));\n\t} else {\n\t\treportErrorFunc(\"First parameter needs to be a string\");\n\t}\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bea3844c24fdd89d47b459f1b1be54c0b65a47374432029d0745b5d50305b74f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/logger_functions.cpp" + }, + "region": { + "startLine": 117, + "startColumn": 3, + "charOffset": 3061, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 115, + "startColumn": 3, + "charOffset": 3000, + "charLength": 15, + "snippet": { + "text": "\t\tg_logger().trace(getFormatedLoggerMessage(L));\n\t} else {\n\t\treportErrorFunc(\"First parameter needs to be a string\");\n\t}\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed0ded15d42a04075444ea21e7a17ce268a3d72425b76b875cb68757c36209c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/metrics_functions.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 3, + "charOffset": 1129, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 3, + "charOffset": 1083, + "charLength": 5, + "snippet": { + "text": "\tif (isTable(L, index)) {\n\t\tlua_pushnil(L);\n\t\twhile (lua_next(L, index) != 0) {\n\t\t\tattributes[getString(L, -2)] = getString(L, -1);\n\t\t\tlua_pop(L, 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "164e5c9cd2bb7ec090b29a9ba4011c26cd58f3dba858f8d1c6cd7de7d4d44777" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvmlibc-restrict-system-libc-headers", + "ruleIndex": 592, + "kind": "fail", + "level": "warning", + "message": { + "text": "system include variant not allowed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/kv_functions.cpp" + }, + "region": { + "startLine": 12, + "startColumn": 1, + "charOffset": 391, + "charLength": 1, + "snippet": { + "text": "#" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 1, + "charOffset": 371, + "charLength": 1, + "snippet": { + "text": "#include \"pch.hpp\"\n\n#include \n\n#include \"kv/kv.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f13c8114c54308f3e18ab95aa04cd34fc1a0274b7fc73e856ca0973999392a7f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/kv_functions.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 6, + "charOffset": 1111, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 6, + "charOffset": 1064, + "charLength": 1, + "snippet": { + "text": "\tauto valueWrapper = getValueWrapper(L);\n\n\tif (!valueWrapper) {\n\t\tg_logger().warn(\"[{}] invalid param type\", __FUNCTION__);\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f112087bee1bacf09d5f59b5246e80e1a1a6c60496555852efdb7772eb65dcd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-redundant-string-init", + "ruleIndex": 725, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/kv_functions.cpp" + }, + "region": { + "startLine": 99, + "startColumn": 14, + "charOffset": 2495, + "charLength": 6, + "snippet": { + "text": "prefix" + } + }, + "contextRegion": { + "startLine": 97, + "startColumn": 14, + "charOffset": 2385, + "charLength": 6, + "snippet": { + "text": "\t// KV.keys([prefix = \"\"]) | scopedKV:keys([prefix = \"\"])\n\tstd::unordered_set keys;\n\tstd::string prefix = \"\";\n\n\tif (isString(L, -1)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01f58ddd1a2e03462386d77c6cc9459215f03374950101f578c26aa57517f298" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/kv_functions.cpp" + }, + "region": { + "startLine": 114, + "startColumn": 2, + "charOffset": 2781, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 112, + "startColumn": 2, + "charOffset": 2709, + "charLength": 3, + "snippet": { + "text": "\tint index = 0;\n\tlua_createtable(L, static_cast(keys.size()), 0);\n\tfor (const auto &key : keys) {\n\t\tpushString(L, key);\n\t\tlua_rawseti(L, -2, ++index);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e092f75cfbf7195c874531eb668671a90a916f167f1fea1abf3e016a9727633" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'getValueWrapper' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/kv_functions.cpp" + }, + "region": { + "startLine": 121, + "startColumn": 42, + "charOffset": 2923, + "charLength": 15, + "snippet": { + "text": "getValueWrapper" + } + }, + "contextRegion": { + "startLine": 119, + "startColumn": 42, + "charOffset": 2879, + "charLength": 15, + "snippet": { + "text": "}\n\nstd::optional KVFunctions::getValueWrapper(lua_State* L) {\n\tif (isBoolean(L, -1)) {\n\t\treturn ValueWrapper(getBoolean(L, -1));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63a9a9d533ef615740f246466e628dbc583d890a39fbee865dd9811e15e32b61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/kv_functions.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 3, + "charOffset": 3239, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 3, + "charOffset": 3170, + "charLength": 3, + "snippet": { + "text": "\tif (isTable(L, -1) && lua_objlen(L, -1) > 0) {\n\t\tArrayType array;\n\t\tfor (int i = 1; i <= lua_objlen(L, -1); ++i) {\n\t\t\tlua_rawgeti(L, -1, i);\n\t\t\tauto value = getValueWrapper(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac89b98d32dd189b3edd292ef062a693467b7f594783808602b609061c567400" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/kv_functions.cpp" + }, + "region": { + "startLine": 137, + "startColumn": 8, + "charOffset": 3355, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 135, + "startColumn": 8, + "charOffset": 3286, + "charLength": 1, + "snippet": { + "text": "\t\t\tlua_rawgeti(L, -1, i);\n\t\t\tauto value = getValueWrapper(L);\n\t\t\tif (!value) {\n\t\t\t\tg_logger().warn(\"[{}] invalid param type\", __FUNCTION__);\n\t\t\t\treturn std::nullopt;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "57011ae6c44d2117e4292fbd41f6af0bcbb038be6bd73388f2268e60f8ab9b7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/kv_functions.cpp" + }, + "region": { + "startLine": 150, + "startColumn": 3, + "charOffset": 3606, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 148, + "startColumn": 3, + "charOffset": 3571, + "charLength": 5, + "snippet": { + "text": "\t\tMapType map;\n\t\tlua_pushnil(L);\n\t\twhile (lua_next(L, -2) != 0) {\n\t\t\tauto value = getValueWrapper(L);\n\t\t\tif (!value) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "333b401148738228ff8d883d7f2fb69170f7f8642473f4f7f3bfbf4df0e3e86d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/kv_functions.cpp" + }, + "region": { + "startLine": 152, + "startColumn": 8, + "charOffset": 3680, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 8, + "charOffset": 3604, + "charLength": 1, + "snippet": { + "text": "\t\twhile (lua_next(L, -2) != 0) {\n\t\t\tauto value = getValueWrapper(L);\n\t\t\tif (!value) {\n\t\t\t\tg_logger().warn(\"[{}] invalid param type\", __FUNCTION__);\n\t\t\t\treturn std::nullopt;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ce6d555898cbbff50db3c5aebc1986b0d9a734091f0260bff48e9aa219e0b2b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/kv_functions.cpp" + }, + "region": { + "startLine": 175, + "startColumn": 20, + "charOffset": 4231, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 173, + "startColumn": 20, + "charOffset": 4142, + "charLength": 5, + "snippet": { + "text": "\nvoid KVFunctions::pushIntValue(lua_State* L, const IntType &value) {\n\tlua_pushnumber(L, value);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba8d3b22de2a36327f379b63e2eee5bed5468852294451f2925f5f6e00026a97" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'pushArrayValue' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/kv_functions.cpp" + }, + "region": { + "startLine": 182, + "startColumn": 19, + "charOffset": 4365, + "charLength": 14, + "snippet": { + "text": "pushArrayValue" + } + }, + "contextRegion": { + "startLine": 180, + "startColumn": 19, + "charOffset": 4344, + "charLength": 14, + "snippet": { + "text": "}\n\nvoid KVFunctions::pushArrayValue(lua_State* L, const ArrayType &value) {\n\tlua_newtable(L);\n\tfor (int i = 0; i < value.size(); ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6cbef7b4518f01aeb0803f8183247ba7fa4605bc64f5590a79197b807c2ef65c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/kv_functions.cpp" + }, + "region": { + "startLine": 184, + "startColumn": 2, + "charOffset": 4439, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 182, + "startColumn": 2, + "charOffset": 4347, + "charLength": 3, + "snippet": { + "text": "void KVFunctions::pushArrayValue(lua_State* L, const ArrayType &value) {\n\tlua_newtable(L);\n\tfor (int i = 0; i < value.size(); ++i) {\n\t\tpushValueWrapper(L, value[i]);\n\t\tlua_rawseti(L, -2, i + 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c97ea61efa9a1d9e3a453d6e4f42c94455afec6bc52b864fe9a0c39c18572ce3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'pushMapValue' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/kv_functions.cpp" + }, + "region": { + "startLine": 190, + "startColumn": 19, + "charOffset": 4566, + "charLength": 12, + "snippet": { + "text": "pushMapValue" + } + }, + "contextRegion": { + "startLine": 188, + "startColumn": 19, + "charOffset": 4545, + "charLength": 12, + "snippet": { + "text": "}\n\nvoid KVFunctions::pushMapValue(lua_State* L, const MapType &value) {\n\tlua_newtable(L);\n\tfor (const auto &[key, val] : value) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "088a6e7cbeb3abc0c59e0b7a37a0bc3a0f1599c70349024a1de98941f57eb01f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/kv_functions.cpp" + }, + "region": { + "startLine": 192, + "startColumn": 2, + "charOffset": 4636, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 190, + "startColumn": 2, + "charOffset": 4548, + "charLength": 3, + "snippet": { + "text": "void KVFunctions::pushMapValue(lua_State* L, const MapType &value) {\n\tlua_newtable(L);\n\tfor (const auto &[key, val] : value) {\n\t\tpushValueWrapper(L, *val);\n\t\tlua_setfield(L, -2, key.c_str());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a36008e6a2232b8972f2194fe4aae9ed404d6d1aaa4f4f501051527187166c2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'pushValueWrapper' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/kv_functions.cpp" + }, + "region": { + "startLine": 198, + "startColumn": 19, + "charOffset": 4764, + "charLength": 16, + "snippet": { + "text": "pushValueWrapper" + } + }, + "contextRegion": { + "startLine": 196, + "startColumn": 19, + "charOffset": 4743, + "charLength": 16, + "snippet": { + "text": "}\n\nvoid KVFunctions::pushValueWrapper(lua_State* L, const ValueWrapper &valueWrapper) {\n\tstd::visit(\n\t\t[L](const auto &arg) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe78a40a4a799d3ebdd0312c50b79e8d33f4dd07be95ee8d2e98b8739664007b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'operator(), std::shared_ptr>>' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/kv_functions.cpp" + }, + "region": { + "startLine": 200, + "startColumn": 3, + "charOffset": 4846, + "charLength": 1, + "snippet": { + "text": "[" + } + }, + "contextRegion": { + "startLine": 198, + "startColumn": 3, + "charOffset": 4746, + "charLength": 1, + "snippet": { + "text": "void KVFunctions::pushValueWrapper(lua_State* L, const ValueWrapper &valueWrapper) {\n\tstd::visit(\n\t\t[L](const auto &arg) {\n\t\t\tusing T = std::decay_t;\n\t\t\tif constexpr (std::is_same_v) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15fc7c446cc819d0be3f68809f97c374db648c8d604060c65939574c1784e9a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'operator()>' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/kv_functions.cpp" + }, + "region": { + "startLine": 200, + "startColumn": 3, + "charOffset": 4846, + "charLength": 1, + "snippet": { + "text": "[" + } + }, + "contextRegion": { + "startLine": 198, + "startColumn": 3, + "charOffset": 4746, + "charLength": 1, + "snippet": { + "text": "void KVFunctions::pushValueWrapper(lua_State* L, const ValueWrapper &valueWrapper) {\n\tstd::visit(\n\t\t[L](const auto &arg) {\n\t\t\tusing T = std::decay_t;\n\t\t\tif constexpr (std::is_same_v) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63ee93b822694617a792ada6dba6f66e0947e1354426af11964ee0c32c794855" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/libs/kv_functions.cpp" + }, + "region": { + "startLine": 202, + "startColumn": 4, + "charOffset": 4914, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 200, + "startColumn": 4, + "charOffset": 4844, + "charLength": 2, + "snippet": { + "text": "\t\t[L](const auto &arg) {\n\t\t\tusing T = std::decay_t;\n\t\t\tif constexpr (std::is_same_v) {\n\t\t\t\tpushStringValue(L, arg);\n\t\t\t} else if constexpr (std::is_same_v) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "561a1149e40616c9c42771bbb1d1320fb24952e6ba259f40dbdd8b16aeca0550" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'invitePlayer' of similar type ('const std::shared_ptr &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 39, + "charOffset": 813, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 39, + "charOffset": 772, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid PrivateChatChannel::invitePlayer(const std::shared_ptr &player, const std::shared_ptr &invitePlayer) {\n\tauto result = invites.emplace(invitePlayer->getGUID(), invitePlayer);\n\tif (!result.second) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa5c82a28d6a2f895f5901a1fcef5088e564617265c456e3230c86af7964844b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 2, + "charOffset": 1354, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 2, + "charOffset": 1290, + "charLength": 3, + "snippet": { + "text": "\tplayer->sendTextMessage(MESSAGE_PARTY_MANAGEMENT, ss.str());\n\n\tfor (const auto &it : users) {\n\t\tit.second->sendChannelEvent(id, invitePlayer->getName(), CHANNELEVENT_INVITE);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "336460447b040778450a6a2093de26db01e2b92edde401ce2c22187f2df6d9b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'excludePlayer' of similar type ('const std::shared_ptr &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 47, + "startColumn": 40, + "charOffset": 1511, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 45, + "startColumn": 40, + "charOffset": 1469, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid PrivateChatChannel::excludePlayer(const std::shared_ptr &player, const std::shared_ptr &excludePlayer) {\n\tif (!removeInvite(excludePlayer->getGUID())) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eaac4184ddb1034668b3cd810b7c1350ee1888af9eb0ec20aeacbe1d3b696bc2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 52, + "startColumn": 2, + "charOffset": 1661, + "charLength": 10, + "snippet": { + "text": "removeUser" + } + }, + "contextRegion": { + "startLine": 50, + "startColumn": 2, + "charOffset": 1656, + "charLength": 10, + "snippet": { + "text": "\t}\n\n\tremoveUser(excludePlayer);\n\n\tstd::ostringstream ss;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34d889465869fdd866833f510559578208c85edcb1c5e2b44e55c2fc37d52c53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 60, + "startColumn": 2, + "charOffset": 1874, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 2, + "charOffset": 1834, + "charLength": 3, + "snippet": { + "text": "\texcludePlayer->sendClosePrivate(id);\n\n\tfor (const auto &it : users) {\n\t\tit.second->sendChannelEvent(id, excludePlayer->getName(), CHANNELEVENT_EXCLUDE);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78dff822bb4d7e87bfd88e3548a150e9e649172adc4726a68bba2c623cef0ccd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 2, + "charOffset": 2043, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 2, + "charOffset": 1993, + "charLength": 3, + "snippet": { + "text": "\nvoid PrivateChatChannel::closeChannel() const {\n\tfor (const auto &it : users) {\n\t\tit.second->sendClosePrivate(id);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "392cf1ad47d120fe2b7856b9c1a4ce980199cadab239ff7dcbd296c4caba57cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-todo", + "ruleIndex": 545, + "kind": "fail", + "level": "warning", + "message": { + "text": "missing username/bug in TODO" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 80, + "startColumn": 2, + "charOffset": 2310, + "charLength": 59, + "snippet": { + "text": "// TODO: Move to script when guild channels can be scripted" + } + }, + "contextRegion": { + "startLine": 78, + "startColumn": 2, + "charOffset": 2305, + "charLength": 59, + "snippet": { + "text": "\t}\n\n\t// TODO: Move to script when guild channels can be scripted\n\tif (id == CHANNEL_GUILD) {\n\t\tconst auto guild = player->getGuild();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e55e7f830d48cccbe3a4f3ff1a895d0e1499c8d9ed4adec11b5fb2a4f2928c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 84, + "startColumn": 19, + "charOffset": 2501, + "charLength": 13, + "snippet": { + "text": "scheduleEvent" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 19, + "charOffset": 2398, + "charLength": 13, + "snippet": { + "text": "\t\tconst auto guild = player->getGuild();\n\t\tif (guild && !guild->getMotd().empty()) {\n\t\t\tg_dispatcher().scheduleEvent(\n\t\t\t\t150, [playerId = player->getID()] { g_game().sendGuildMotd(playerId); }, \"Game::sendGuildMotd\"\n\t\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7776fa00508a556b654662d49be08074f45e73e6699706a5e48bc4e51f1d3ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "150 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 85, + "startColumn": 5, + "charOffset": 2520, + "charLength": 3, + "snippet": { + "text": "150" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 5, + "charOffset": 2439, + "charLength": 3, + "snippet": { + "text": "\t\tif (guild && !guild->getMotd().empty()) {\n\t\t\tg_dispatcher().scheduleEvent(\n\t\t\t\t150, [playerId = player->getID()] { g_game().sendGuildMotd(playerId); }, \"Game::sendGuildMotd\"\n\t\t\t);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6b2fe1ed1fbaa62363f37204894f62c4f05ff81e515abac6536464eb0eec7b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 3, + "charOffset": 2654, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 3, + "charOffset": 2628, + "charLength": 3, + "snippet": { + "text": "\n\tif (!publicChannel) {\n\t\tfor (const auto &it : users) {\n\t\t\tit.second->sendChannelEvent(id, player->getName(), CHANNELEVENT_JOIN);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2059c9481f9eeb5055e07cae546de182ae0a55569d3b96d3bee5de387fbf3d4f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 106, + "startColumn": 8, + "charOffset": 2985, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 104, + "startColumn": 8, + "charOffset": 2974, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tusers.erase(iter);\n\n\tif (!publicChannel) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b82b76bb02daad52f8466fab5ae5ceee8b1b4cabd0d8152ee5dd9bc56e342f92" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 109, + "startColumn": 3, + "charOffset": 3024, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 107, + "startColumn": 3, + "charOffset": 2998, + "charLength": 3, + "snippet": { + "text": "\n\tif (!publicChannel) {\n\t\tfor (const auto &it : users) {\n\t\t\tit.second->sendChannelEvent(id, player->getName(), CHANNELEVENT_LEAVE);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01b837dccf0deacf548b0a42fa3073c389bb85a450ab423b227f81432b4d3aa9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 114, + "startColumn": 2, + "charOffset": 3139, + "charLength": 19, + "snippet": { + "text": "executeOnLeaveEvent" + } + }, + "contextRegion": { + "startLine": 112, + "startColumn": 2, + "charOffset": 3134, + "charLength": 19, + "snippet": { + "text": "\t}\n\n\texecuteOnLeaveEvent(player);\n\treturn true;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a37f4d9deccba7f6aa3be19ad6d54242701fce566a18d44f6c502c2f4a7fbaf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 123, + "startColumn": 2, + "charOffset": 3391, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 121, + "startColumn": 2, + "charOffset": 3306, + "charLength": 3, + "snippet": { + "text": "\nvoid ChatChannel::sendToAll(const std::string &message, SpeakClasses type) const {\n\tfor (const auto &it : users) {\n\t\tit.second->sendChannelMessage(\"\", message, type, id);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62473c99679c7ce71e9f46fd2171d0984d671183ebbae3ba2e9644d28df1e1bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 133, + "startColumn": 2, + "charOffset": 3672, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 131, + "startColumn": 2, + "charOffset": 3667, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &it : users) {\n\t\tit.second->sendToChannel(fromPlayer, type, text, id);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f5833ee375fc027cb25b48454a94775fdb1329cb402baee44cb7b68db28db16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-make-member-function-const", + "ruleIndex": 708, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'executeCanJoinEvent' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 139, + "startColumn": 19, + "charOffset": 3797, + "charLength": 19, + "snippet": { + "text": "executeCanJoinEvent" + } + }, + "contextRegion": { + "startLine": 137, + "startColumn": 19, + "charOffset": 3776, + "charLength": 19, + "snippet": { + "text": "}\n\nbool ChatChannel::executeCanJoinEvent(const std::shared_ptr &player) {\n\tif (canJoinEvent == -1) {\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "911fe16462f33176f3b571f97faf43423db33d95112efc17a4ba1cefa7325be7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 146, + "startColumn": 7, + "charOffset": 4000, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 144, + "startColumn": 7, + "charOffset": 3904, + "charLength": 15, + "snippet": { + "text": "\t// canJoin(player)\n\tLuaScriptInterface* scriptInterface = g_chat().getScriptInterface();\n\tif (!scriptInterface->reserveScriptEnv()) {\n\t\tg_logger().error(\"[CanJoinChannelEvent::execute - Player {}, on channel {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92383c6fae1c060cc227f963a9095318264e2004954aeef40475aba6124cb638" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 153, + "startColumn": 27, + "charOffset": 4298, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 151, + "startColumn": 27, + "charOffset": 4268, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\n\tenv->setScriptId(canJoinEvent, scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f14a25d2cb82c101465baafdf63a2161ece74aca20621629413a67560fbda90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 158, + "startColumn": 19, + "charOffset": 4449, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 156, + "startColumn": 19, + "charOffset": 4382, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = scriptInterface->getLuaState();\n\n\tscriptInterface->pushFunction(canJoinEvent);\n\tLuaScriptInterface::pushUserdata(L, player);\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a3b9e02feaaeb9a216b07ea64977c6da7d51aa5c9e4c80530d9719ae499ccdb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-make-member-function-const", + "ruleIndex": 708, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'executeOnJoinEvent' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 165, + "startColumn": 19, + "charOffset": 4639, + "charLength": 18, + "snippet": { + "text": "executeOnJoinEvent" + } + }, + "contextRegion": { + "startLine": 163, + "startColumn": 19, + "charOffset": 4618, + "charLength": 18, + "snippet": { + "text": "}\n\nbool ChatChannel::executeOnJoinEvent(const std::shared_ptr &player) {\n\tif (onJoinEvent == -1) {\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3733e7afe4fcac176729264524793901b2cc08328c1baeafa375422ea5c5065f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 7, + "charOffset": 4839, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 7, + "charOffset": 4744, + "charLength": 15, + "snippet": { + "text": "\t// onJoin(player)\n\tLuaScriptInterface* scriptInterface = g_chat().getScriptInterface();\n\tif (!scriptInterface->reserveScriptEnv()) {\n\t\tg_logger().error(\"[OnJoinChannelEvent::execute - Player {}, on channel {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f4536e5fe65c9554bb59ebc8e0c3b1f9e253d2aee80e80b2981b609fb37458a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 179, + "startColumn": 27, + "charOffset": 5135, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 177, + "startColumn": 27, + "charOffset": 5105, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\n\tenv->setScriptId(onJoinEvent, scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff6a9626c89f374bab5fd82e04a142deb90ca881656de685cfa12baf9942a333" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 184, + "startColumn": 19, + "charOffset": 5285, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 182, + "startColumn": 19, + "charOffset": 5218, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = scriptInterface->getLuaState();\n\n\tscriptInterface->pushFunction(onJoinEvent);\n\tLuaScriptInterface::pushUserdata(L, player);\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d84bbf14e9ff3424ef5ff170389ea8287d26bde30b2a256338f77480bffe4e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-make-member-function-const", + "ruleIndex": 708, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'executeOnLeaveEvent' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 191, + "startColumn": 19, + "charOffset": 5474, + "charLength": 19, + "snippet": { + "text": "executeOnLeaveEvent" + } + }, + "contextRegion": { + "startLine": 189, + "startColumn": 19, + "charOffset": 5453, + "charLength": 19, + "snippet": { + "text": "}\n\nbool ChatChannel::executeOnLeaveEvent(const std::shared_ptr &player) {\n\tif (onLeaveEvent == -1) {\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29a381e2e00932711d703f260820f65d777b5248e089859c5e12820b1f3aa1c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 198, + "startColumn": 7, + "charOffset": 5677, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 196, + "startColumn": 7, + "charOffset": 5581, + "charLength": 15, + "snippet": { + "text": "\t// onLeave(player)\n\tLuaScriptInterface* scriptInterface = g_chat().getScriptInterface();\n\tif (!scriptInterface->reserveScriptEnv()) {\n\t\tg_logger().error(\"[OnLeaveChannelEvent::execute - Player {}, on channel {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8f395c608c237bc18691c55701c2d264f8d4cd97e6962bd220f01a31f1cf0fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 205, + "startColumn": 27, + "charOffset": 5975, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 203, + "startColumn": 27, + "charOffset": 5945, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\n\tenv->setScriptId(onLeaveEvent, scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "112172212de5ea2d3ea0f00f0815f27629b9fd2a44a4b72c9ae812b18797be42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 210, + "startColumn": 19, + "charOffset": 6126, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 208, + "startColumn": 19, + "charOffset": 6059, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = scriptInterface->getLuaState();\n\n\tscriptInterface->pushFunction(onLeaveEvent);\n\tLuaScriptInterface::pushUserdata(L, player);\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "048bc9f5697618086a0c3171fd33ed98e74bbeccac12f4e0800f27ca512899ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-make-member-function-const", + "ruleIndex": 708, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'executeOnSpeakEvent' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 217, + "startColumn": 19, + "charOffset": 6316, + "charLength": 19, + "snippet": { + "text": "executeOnSpeakEvent" + } + }, + "contextRegion": { + "startLine": 215, + "startColumn": 19, + "charOffset": 6295, + "charLength": 19, + "snippet": { + "text": "}\n\nbool ChatChannel::executeOnSpeakEvent(const std::shared_ptr &player, SpeakClasses &type, const std::string &message) {\n\tif (onSpeakEvent == -1) {\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25aca85e50ae01eeca3e03638baf4f91fa0868d3c2f523af0c651ed97a4c7688" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 224, + "startColumn": 7, + "charOffset": 6582, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 222, + "startColumn": 7, + "charOffset": 6471, + "charLength": 15, + "snippet": { + "text": "\t// onSpeak(player, type, message)\n\tLuaScriptInterface* scriptInterface = g_chat().getScriptInterface();\n\tif (!scriptInterface->reserveScriptEnv()) {\n\t\tg_logger().error(\"[OnSpeakChannelEvent::execute - Player {}, type {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8cc1d14f29c7c94b40570ce6c8e53bced8e8c6215c46b182ebf4a3eec2434d55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 231, + "startColumn": 27, + "charOffset": 6886, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 229, + "startColumn": 27, + "charOffset": 6856, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\n\tenv->setScriptId(onSpeakEvent, scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d41b7914890349e179539da75ce7cca43454ed168a4da7783dd381c9d38ba6c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 236, + "startColumn": 19, + "charOffset": 7037, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 234, + "startColumn": 19, + "charOffset": 6970, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = scriptInterface->getLuaState();\n\n\tscriptInterface->pushFunction(onSpeakEvent);\n\tLuaScriptInterface::pushUserdata(L, player);\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34d889465869fdd866833f510559578208c85edcb1c5e2b44e55c2fc37d52c53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 240, + "startColumn": 20, + "charOffset": 7183, + "charLength": 4, + "snippet": { + "text": "type" + } + }, + "contextRegion": { + "startLine": 238, + "startColumn": 20, + "charOffset": 7111, + "charLength": 4, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n\n\tlua_pushnumber(L, type);\n\tLuaScriptInterface::pushString(L, message);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "873229ca6785488b10daf91cbef0426e533f7d8095f15b80c9151ed1f79e55a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 245, + "startColumn": 12, + "charOffset": 7297, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 243, + "startColumn": 12, + "charOffset": 7236, + "charLength": 15, + "snippet": { + "text": "\tbool result = false;\n\tint size0 = lua_gettop(L);\n\tint ret = scriptInterface->protectedCall(L, 3, 1);\n\tif (ret != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ffcef9c77c6eb7e57297a38eefb56e409068b70727cc4fbe949ba7cf590db1f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 246, + "startColumn": 2, + "charOffset": 7339, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 244, + "startColumn": 2, + "charOffset": 7258, + "charLength": 2, + "snippet": { + "text": "\tint size0 = lua_gettop(L);\n\tint ret = scriptInterface->protectedCall(L, 3, 1);\n\tif (ret != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else if (lua_gettop(L) > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1368c01e1c66b11c904b3c161e61e3d8fb6f29277b6079b23ed52e9c516210af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 249, + "startColumn": 3, + "charOffset": 7468, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 247, + "startColumn": 3, + "charOffset": 7355, + "charLength": 2, + "snippet": { + "text": "\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else if (lua_gettop(L) > 0) {\n\t\tif (lua_isboolean(L, -1)) {\n\t\t\tresult = LuaScriptInterface::getBoolean(L, -1);\n\t\t} else if (lua_isnumber(L, -1)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc6457416b043fa848e9faaa7897403e6a03112ec619c474f8c37a05d80ddf1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 251, + "startColumn": 14, + "charOffset": 7560, + "charLength": 12, + "snippet": { + "text": "lua_isnumber" + } + }, + "contextRegion": { + "startLine": 249, + "startColumn": 14, + "charOffset": 7466, + "charLength": 12, + "snippet": { + "text": "\t\tif (lua_isboolean(L, -1)) {\n\t\t\tresult = LuaScriptInterface::getBoolean(L, -1);\n\t\t} else if (lua_isnumber(L, -1)) {\n\t\t\tresult = true;\n\t\t\ttype = LuaScriptInterface::getNumber(L, -1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19b3c0adc0d1b1c2373b87a9ec470528e67438db19ecaf3673eda5393e06e3e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 251, + "startColumn": 14, + "charOffset": 7560, + "charLength": 12, + "snippet": { + "text": "lua_isnumber" + } + }, + "contextRegion": { + "startLine": 249, + "startColumn": 14, + "charOffset": 7466, + "charLength": 12, + "snippet": { + "text": "\t\tif (lua_isboolean(L, -1)) {\n\t\t\tresult = LuaScriptInterface::getBoolean(L, -1);\n\t\t} else if (lua_isnumber(L, -1)) {\n\t\t\tresult = true;\n\t\t\ttype = LuaScriptInterface::getNumber(L, -1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02c42867e654e3d60715c9d0d91af9cf00874b3a30ab86b2a34ccb94cfb5a6ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 261, + "startColumn": 2, + "charOffset": 7796, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 259, + "startColumn": 2, + "charOffset": 7725, + "charLength": 15, + "snippet": { + "text": "\t\tLuaScriptInterface::reportError(nullptr, \"Stack size changed!\");\n\t}\n\tscriptInterface->resetScriptEnv();\n\treturn result;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ea61cf08365e3024f5e47b4f88e9361691f995daacdfb2497da7a251d0bb2a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 268, + "startColumn": 18, + "charOffset": 8013, + "charLength": 9, + "snippet": { + "text": "initState" + } + }, + "contextRegion": { + "startLine": 266, + "startColumn": 18, + "charOffset": 7865, + "charLength": 9, + "snippet": { + "text": "\tscriptInterface(\"Chat Interface\"),\n\tdummyPrivate(std::make_shared(CHANNEL_PRIVATE, \"Private Chat Channel\")) {\n\tscriptInterface.initState();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38a8cc51a03cfaf1e2a9aa6ee90ee6fd86ec779287b85d78c689a3834e442d72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 276, + "startColumn": 6, + "charOffset": 8283, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 274, + "startColumn": 6, + "charOffset": 8152, + "charLength": 1, + "snippet": { + "text": "\tauto folder = coreFolder + \"/chatchannels/chatchannels.xml\";\n\tpugi::xml_parse_result result = doc.load_file(folder.c_str());\n\tif (!result) {\n\t\tprintXMLError(__FUNCTION__, folder, result);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "016a97e99d317602b3f3941f825eeb205ebb59659098cf493e9e9497d5386e71" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 282, + "startColumn": 3, + "charOffset": 8424, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 280, + "startColumn": 3, + "charOffset": 8360, + "charLength": 8, + "snippet": { + "text": "\n\tfor (auto channelNode : doc.child(\"channels\").children()) {\n\t\tuint16_t channelId = pugi::cast(channelNode.attribute(\"id\").value());\n\t\tstd::string channelName = channelNode.attribute(\"name\").as_string();\n\t\tbool isPublic = channelNode.attribute(\"public\").as_bool();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bcd5a00221a938d5ba57b44c0a6ab2fe18ee00ae3c6881c397173e6d3b5e677f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 293, + "startColumn": 8, + "charOffset": 8905, + "charLength": 15, + "snippet": { + "text": "scriptAttribute" + } + }, + "contextRegion": { + "startLine": 291, + "startColumn": 8, + "charOffset": 8865, + "charLength": 15, + "snippet": { + "text": "\t\t\tchannel->name = channelName;\n\n\t\t\tif (scriptAttribute) {\n\t\t\t\tif (scriptInterface.loadFile(coreFolder + \"/chatchannels/scripts/\" + std::string(scriptAttribute.as_string()), scriptAttribute.as_string()) == 0) {\n\t\t\t\t\tchannel->onSpeakEvent = scriptInterface.getEvent(\"onSpeak\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72128cbd14e1db3325e47b3e4eb240896de56c70b2c17311c050f61e602df2c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 293, + "startColumn": 8, + "charOffset": 8905, + "charLength": 15, + "snippet": { + "text": "scriptAttribute" + } + }, + "contextRegion": { + "startLine": 291, + "startColumn": 8, + "charOffset": 8865, + "charLength": 15, + "snippet": { + "text": "\t\t\tchannel->name = channelName;\n\n\t\t\tif (scriptAttribute) {\n\t\t\t\tif (scriptInterface.loadFile(coreFolder + \"/chatchannels/scripts/\" + std::string(scriptAttribute.as_string()), scriptAttribute.as_string()) == 0) {\n\t\t\t\t\tchannel->onSpeakEvent = scriptInterface.getEvent(\"onSpeak\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc7e18f159ea0eec42ad12f6319a14153516c51be450674f7432cbbbebd69e01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 305, + "startColumn": 4, + "charOffset": 9512, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 303, + "startColumn": 4, + "charOffset": 9455, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tUsersMap tempUserMap = std::move(channel->users);\n\t\t\tfor (const auto &pair : tempUserMap) {\n\t\t\t\tchannel->addUser(pair.second);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f3b3d8ab10de0dfdefaefa6bc3efaa34e3783c089273c3498af91c811418d7d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 306, + "startColumn": 14, + "charOffset": 9564, + "charLength": 7, + "snippet": { + "text": "addUser" + } + }, + "contextRegion": { + "startLine": 304, + "startColumn": 14, + "charOffset": 9456, + "charLength": 7, + "snippet": { + "text": "\t\t\tUsersMap tempUserMap = std::move(channel->users);\n\t\t\tfor (const auto &pair : tempUserMap) {\n\t\t\t\tchannel->addUser(pair.second);\n\t\t\t}\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "492fdf372093243c613de96f3c90075d463b426a81da189ccaf06eb420f430fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 314, + "startColumn": 7, + "charOffset": 9731, + "charLength": 15, + "snippet": { + "text": "scriptAttribute" + } + }, + "contextRegion": { + "startLine": 312, + "startColumn": 7, + "charOffset": 9687, + "charLength": 15, + "snippet": { + "text": "\t\tchannel->publicChannel = isPublic;\n\n\t\tif (scriptAttribute) {\n\t\t\tif (scriptInterface.loadFile(coreFolder + \"/chatchannels/scripts/\" + std::string(scriptAttribute.as_string()), scriptAttribute.as_string()) == 0) {\n\t\t\t\tchannel->onSpeakEvent = scriptInterface.getEvent(\"onSpeak\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da8d3df992fd63ecb649fbb377a480b7e8dd3487794cc362dd1f2429fbfa3bb2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 314, + "startColumn": 7, + "charOffset": 9731, + "charLength": 15, + "snippet": { + "text": "scriptAttribute" + } + }, + "contextRegion": { + "startLine": 312, + "startColumn": 7, + "charOffset": 9687, + "charLength": 15, + "snippet": { + "text": "\t\tchannel->publicChannel = isPublic;\n\n\t\tif (scriptAttribute) {\n\t\t\tif (scriptInterface.loadFile(coreFolder + \"/chatchannels/scripts/\" + std::string(scriptAttribute.as_string()), scriptAttribute.as_string()) == 0) {\n\t\t\t\tchannel->onSpeakEvent = scriptInterface.getEvent(\"onSpeak\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65d688573bcc6ad865fbe8603c9dfcba841bffcdd8bb485f08bc6b01b28450fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-emplace", + "ruleIndex": 573, + "kind": "fail", + "level": "warning", + "message": { + "text": "unnecessary temporary object created while calling emplace" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 339, + "startColumn": 38, + "charOffset": 10665, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 337, + "startColumn": 38, + "charOffset": 10559, + "charLength": 3, + "snippet": { + "text": "\t\t\tconst auto guild = player->getGuild();\n\t\t\tif (guild != nullptr) {\n\t\t\t\tauto ret = guildChannels.emplace(std::make_pair(guild->getId(), std::make_shared(channelId, guild->getName())));\n\t\t\t\treturn ret.first->second;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2dd62dbfad7058d3d69726d3722b306d62111553a02c457e047b35424529b810" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-emplace", + "ruleIndex": 573, + "kind": "fail", + "level": "warning", + "message": { + "text": "unnecessary temporary object created while calling emplace" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 348, + "startColumn": 38, + "charOffset": 10932, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 346, + "startColumn": 38, + "charOffset": 10832, + "charLength": 3, + "snippet": { + "text": "\t\t\tauto party = player->getParty();\n\t\t\tif (party != nullptr) {\n\t\t\t\tauto ret = partyChannels.emplace(std::make_pair(party, std::make_shared(channelId, \"Party\")));\n\t\t\t\treturn ret.first->second;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64524f488653503a1806fe37b0022e8a23f124d09fe736a90b4184834a15022b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 361, + "startColumn": 4, + "charOffset": 11277, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 359, + "startColumn": 4, + "charOffset": 11234, + "charLength": 3, + "snippet": { + "text": "\n\t\t\t// find a free private channel slot\n\t\t\tfor (uint16_t i = 100; i < 10000; ++i) {\n\t\t\t\tauto ret = privateChannels.emplace(std::make_pair(i, std::make_shared(i, player->getName() + \"'s Channel\")));\n\t\t\t\tif (ret.second) { // second is a bool that indicates that a new channel has been placed in the map" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40c401f8367efc116a66eaaed75cd1293f8cab52d2df1c2d12536d449d2f67de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-3", + "ruleIndex": 458, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-3: The loop-counter shall not be modified within condition or statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 361, + "startColumn": 4, + "charOffset": 11277, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 359, + "startColumn": 4, + "charOffset": 11234, + "charLength": 3, + "snippet": { + "text": "\n\t\t\t// find a free private channel slot\n\t\t\tfor (uint16_t i = 100; i < 10000; ++i) {\n\t\t\t\tauto ret = privateChannels.emplace(std::make_pair(i, std::make_shared(i, player->getName() + \"'s Channel\")));\n\t\t\t\tif (ret.second) { // second is a bool that indicates that a new channel has been placed in the map" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a11a842644ab64475ae25877d1c1a735922ac1eca0f96f8213983dfd8ee5b424" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 361, + "startColumn": 22, + "charOffset": 11295, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 359, + "startColumn": 22, + "charOffset": 11234, + "charLength": 3, + "snippet": { + "text": "\n\t\t\t// find a free private channel slot\n\t\t\tfor (uint16_t i = 100; i < 10000; ++i) {\n\t\t\t\tauto ret = privateChannels.emplace(std::make_pair(i, std::make_shared(i, player->getName() + \"'s Channel\")));\n\t\t\t\tif (ret.second) { // second is a bool that indicates that a new channel has been placed in the map" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14411247908c4b11eab66b00a6a29e3fa02fc201ed6d4d60332d344976bf8b62" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 361, + "startColumn": 31, + "charOffset": 11304, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 359, + "startColumn": 31, + "charOffset": 11234, + "charLength": 5, + "snippet": { + "text": "\n\t\t\t// find a free private channel slot\n\t\t\tfor (uint16_t i = 100; i < 10000; ++i) {\n\t\t\t\tauto ret = privateChannels.emplace(std::make_pair(i, std::make_shared(i, player->getName() + \"'s Channel\")));\n\t\t\t\tif (ret.second) { // second is a bool that indicates that a new channel has been placed in the map" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0df7619302e229044da1ec655958003ff2026c2c3af479d9a43296ac72eae97a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-emplace", + "ruleIndex": 573, + "kind": "fail", + "level": "warning", + "message": { + "text": "unnecessary temporary object created while calling emplace" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 362, + "startColumn": 40, + "charOffset": 11357, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 360, + "startColumn": 40, + "charOffset": 11235, + "charLength": 3, + "snippet": { + "text": "\t\t\t// find a free private channel slot\n\t\t\tfor (uint16_t i = 100; i < 10000; ++i) {\n\t\t\t\tauto ret = privateChannels.emplace(std::make_pair(i, std::make_shared(i, player->getName() + \"'s Channel\")));\n\t\t\t\tif (ret.second) { // second is a bool that indicates that a new channel has been placed in the map\n\t\t\t\t\tconst auto &newChannel = (*ret.first).second;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ae7132b37ca159b30d7b79c957b14bcb7e1e4eaa9617fafaff5e66dd97e3bee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 391, + "startColumn": 18, + "charOffset": 12097, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 389, + "startColumn": 18, + "charOffset": 12074, + "charLength": 5, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tguildChannels.erase(it);\n\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb1bdccf898c7d55ed13fa8b7d2a4c138e43ea41236476f5882f0908ce779f94" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 406, + "startColumn": 18, + "charOffset": 12351, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 404, + "startColumn": 18, + "charOffset": 12328, + "charLength": 5, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tpartyChannels.erase(it);\n\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a701004bfe713906128bb11b622a9b9497f0352490bf6e362c20c72b4c30e1de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 418, + "startColumn": 20, + "charOffset": 12549, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 416, + "startColumn": 20, + "charOffset": 12498, + "charLength": 5, + "snippet": { + "text": "\t\t\tit->second->closeChannel();\n\n\t\t\tprivateChannels.erase(it);\n\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac5978ede20c4a2ee76cddddbf8b12f5b41df7fe090ebde8af00a113f309b718" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 440, + "startColumn": 3, + "charOffset": 13139, + "charLength": 13, + "snippet": { + "text": "deleteChannel" + } + }, + "contextRegion": { + "startLine": 438, + "startColumn": 3, + "charOffset": 13087, + "charLength": 13, + "snippet": { + "text": "\n\tif (channel->getOwner() == player->getGUID()) {\n\t\tdeleteChannel(player, channelId);\n\t}\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c08d9c25ef3d60c35c558b01a0d404a65a65fd79a118f0c8000c927ba4f45819" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 446, + "startColumn": 2, + "charOffset": 13272, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 444, + "startColumn": 2, + "charOffset": 13192, + "charLength": 3, + "snippet": { + "text": "\nvoid Chat::removeUserFromAllChannels(const std::shared_ptr &player) {\n\tfor (auto &it : normalChannels) {\n\t\tit.second->removeUser(player);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dcdb62cd9f5d449f42657b462c7b8a06dd92aa23a50660dd2bcbb967b1e21937" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 447, + "startColumn": 14, + "charOffset": 13319, + "charLength": 10, + "snippet": { + "text": "removeUser" + } + }, + "contextRegion": { + "startLine": 445, + "startColumn": 14, + "charOffset": 13193, + "charLength": 10, + "snippet": { + "text": "void Chat::removeUserFromAllChannels(const std::shared_ptr &player) {\n\tfor (auto &it : normalChannels) {\n\t\tit.second->removeUser(player);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a589ad7760d654fa0c24162c84800134a6eda22892da5f4f6bb937385d2d51f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 450, + "startColumn": 2, + "charOffset": 13344, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 448, + "startColumn": 2, + "charOffset": 13339, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (auto &it : partyChannels) {\n\t\tit.second->removeUser(player);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a547a06f8f5a881358e9bb4c4ef8c58d05a984cc7ba50052e4acb468ee3daa64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 451, + "startColumn": 14, + "charOffset": 13390, + "charLength": 10, + "snippet": { + "text": "removeUser" + } + }, + "contextRegion": { + "startLine": 449, + "startColumn": 14, + "charOffset": 13342, + "charLength": 10, + "snippet": { + "text": "\n\tfor (auto &it : partyChannels) {\n\t\tit.second->removeUser(player);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c21615b236d2bff5085d5ae98ddfb2077577ed169bcf6b86eb214d286c3b2d6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 454, + "startColumn": 2, + "charOffset": 13415, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 452, + "startColumn": 2, + "charOffset": 13410, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (auto &it : guildChannels) {\n\t\tit.second->removeUser(player);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a20157227023d8e081f6ab02f59d702f6ad4c434d52dd2df961c7d5f7508e2fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 455, + "startColumn": 14, + "charOffset": 13461, + "charLength": 10, + "snippet": { + "text": "removeUser" + } + }, + "contextRegion": { + "startLine": 453, + "startColumn": 14, + "charOffset": 13413, + "charLength": 10, + "snippet": { + "text": "\n\tfor (auto &it : guildChannels) {\n\t\tit.second->removeUser(player);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b522400e4bc6c3cd0973c60cb9039833860972be9004e947ef628337d44a6cf3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 459, + "startColumn": 2, + "charOffset": 13522, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 457, + "startColumn": 2, + "charOffset": 13484, + "charLength": 5, + "snippet": { + "text": "\n\tauto it = privateChannels.begin();\n\twhile (it != privateChannels.end()) {\n\t\tconst auto &channel = it->second;\n\t\tchannel->removeInvite(player->getGUID());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86cacfefa6f57e6be501da070c3e071e4b9672f807ed335e75df50f75d5ca8a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 459, + "startColumn": 9, + "charOffset": 13529, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 457, + "startColumn": 9, + "charOffset": 13484, + "charLength": 2, + "snippet": { + "text": "\n\tauto it = privateChannels.begin();\n\twhile (it != privateChannels.end()) {\n\t\tconst auto &channel = it->second;\n\t\tchannel->removeInvite(player->getGUID());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a36549ff008a54912c43726bff5d20b536bc96dde5280baa3afef06a722bf9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 461, + "startColumn": 12, + "charOffset": 13607, + "charLength": 12, + "snippet": { + "text": "removeInvite" + } + }, + "contextRegion": { + "startLine": 459, + "startColumn": 12, + "charOffset": 13521, + "charLength": 12, + "snippet": { + "text": "\twhile (it != privateChannels.end()) {\n\t\tconst auto &channel = it->second;\n\t\tchannel->removeInvite(player->getGUID());\n\t\tchannel->removeUser(player);\n\t\tif (channel->getOwner() == player->getGUID()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0578cf28af6e3b9c76f513de0d806a55c841b5ee149fd6c9dd93daa21f3def1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 462, + "startColumn": 12, + "charOffset": 13651, + "charLength": 10, + "snippet": { + "text": "removeUser" + } + }, + "contextRegion": { + "startLine": 460, + "startColumn": 12, + "charOffset": 13560, + "charLength": 10, + "snippet": { + "text": "\t\tconst auto &channel = it->second;\n\t\tchannel->removeInvite(player->getGUID());\n\t\tchannel->removeUser(player);\n\t\tif (channel->getOwner() == player->getGUID()) {\n\t\t\tchannel->closeChannel();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c08d9c25ef3d60c35c558b01a0d404a65a65fd79a118f0c8000c927ba4f45819" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 478, + "startColumn": 2, + "charOffset": 14046, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 476, + "startColumn": 2, + "charOffset": 14041, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (channelId == CHANNEL_GUILD) {\n\t\tGuildRank_ptr rank = player->getGuildRank();\n\t\tif (rank && rank->level > 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41ae4ebccc06556ce0a47d35e5f06b7b7ea2300baeba28c4fe19c38e2160dd02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 480, + "startColumn": 3, + "charOffset": 14129, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 478, + "startColumn": 3, + "charOffset": 14045, + "charLength": 2, + "snippet": { + "text": "\tif (channelId == CHANNEL_GUILD) {\n\t\tGuildRank_ptr rank = player->getGuildRank();\n\t\tif (rank && rank->level > 1) {\n\t\t\ttype = TALKTYPE_CHANNEL_O;\n\t\t} else if (type != TALKTYPE_CHANNEL_Y) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "966651d7d14aad774cc729d6c6490719dfd69fe0b724b21492e000e850ca40db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'getChannelList' has cognitive complexity of 28 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 496, + "startColumn": 19, + "charOffset": 14548, + "charLength": 14, + "snippet": { + "text": "getChannelList" + } + }, + "contextRegion": { + "startLine": 494, + "startColumn": 19, + "charOffset": 14527, + "charLength": 14, + "snippet": { + "text": "}\n\nChannelList Chat::getChannelList(const std::shared_ptr &player) {\n\tChannelList list;\n\tif (player->getGuild()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3fcde9c3cd3d23698d7fd3d7197990510e64f77140b1befd0195fa8a342e232e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 499, + "startColumn": 37, + "charOffset": 14686, + "charLength": 13, + "snippet": { + "text": "CHANNEL_GUILD" + } + }, + "contextRegion": { + "startLine": 497, + "startColumn": 37, + "charOffset": 14604, + "charLength": 13, + "snippet": { + "text": "\tChannelList list;\n\tif (player->getGuild()) {\n\t\tauto channel = getChannel(player, CHANNEL_GUILD);\n\t\tif (channel) {\n\t\t\tlist.push_back(channel);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1106bb597f8bfb974c22f4c69282ce7a11d57f50aaafa902749475a7bf6e5ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 503, + "startColumn": 36, + "charOffset": 14793, + "charLength": 13, + "snippet": { + "text": "CHANNEL_GUILD" + } + }, + "contextRegion": { + "startLine": 501, + "startColumn": 36, + "charOffset": 14719, + "charLength": 13, + "snippet": { + "text": "\t\t\tlist.push_back(channel);\n\t\t} else {\n\t\t\tchannel = createChannel(player, CHANNEL_GUILD);\n\t\t\tif (channel) {\n\t\t\t\tlist.push_back(channel);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a4aefd300ec4cd394f96556e9f19e45a721ce817f0a020a1f83530ea89fdc2a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 511, + "startColumn": 37, + "charOffset": 14932, + "charLength": 13, + "snippet": { + "text": "CHANNEL_PARTY" + } + }, + "contextRegion": { + "startLine": 509, + "startColumn": 37, + "charOffset": 14868, + "charLength": 13, + "snippet": { + "text": "\n\tif (player->getParty()) {\n\t\tauto channel = getChannel(player, CHANNEL_PARTY);\n\t\tif (channel) {\n\t\t\tlist.push_back(channel);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38a5bf79c0c35cb47a9be2b07c75a29997fa0f26d6a4a0fe7472641352e1e374" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 515, + "startColumn": 36, + "charOffset": 15039, + "charLength": 13, + "snippet": { + "text": "CHANNEL_PARTY" + } + }, + "contextRegion": { + "startLine": 513, + "startColumn": 36, + "charOffset": 14965, + "charLength": 13, + "snippet": { + "text": "\t\t\tlist.push_back(channel);\n\t\t} else {\n\t\t\tchannel = createChannel(player, CHANNEL_PARTY);\n\t\t\tif (channel) {\n\t\t\t\tlist.push_back(channel);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9ae28a132899194b60ebb961540d59cc247fbee554e8542227918b80e759004" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 522, + "startColumn": 2, + "charOffset": 15116, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 520, + "startColumn": 2, + "charOffset": 15111, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &it : normalChannels) {\n\t\tconst auto &channel = getChannel(player, it.first);\n\t\tif (channel) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "641a711927c1081d92051146333501c1133ee480d95e65b43f4453c4d187ec5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 530, + "startColumn": 2, + "charOffset": 15290, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 528, + "startColumn": 2, + "charOffset": 15262, + "charLength": 3, + "snippet": { + "text": "\n\tbool hasPrivate = false;\n\tfor (auto &it : privateChannels) {\n\t\tif (const auto &channel = it.second) {\n\t\t\tuint32_t guid = player->getGUID();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f57692a18ae8d94bae004dfefc6f4d9e57f76ced18bc9f358aa09e01fcad01f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/interactions/chat.cpp" + }, + "region": { + "startLine": 610, + "startColumn": 2, + "charOffset": 17139, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 608, + "startColumn": 2, + "charOffset": 17036, + "charLength": 3, + "snippet": { + "text": "\nstd::shared_ptr Chat::getPrivateChannel(const std::shared_ptr &player) {\n\tfor (auto &it : privateChannels) {\n\t\tif (it.second->getOwner() == player->getGUID()) {\n\t\t\treturn it.second;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9618743763455b7931a04b4e0bfe7837f693c13ca06d653ae983e885bced9d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.hpp" + }, + "region": { + "startLine": 13, + "startColumn": 10, + "charOffset": 429, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 11, + "startColumn": 10, + "charOffset": 384, + "charLength": 30, + "snippet": { + "text": "\n#include \"creatures/npcs/npcs.hpp\"\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"items/tile.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f69d6cfec9be0f6769310fd1d031cff4d88ef48385f012190be0fe563d15e4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.hpp", + "index": 1 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"creatures/monsters/monsters.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e45483e1912ecf8c717a48f913562d9a9cf501f9947625dad361d43acc28406" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.hpp", + "index": 2 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a2b3a997037594f8bab93e08d9b46935593069da5e9def3fec147ea485ffc36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/network/network_message_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 27, + "startColumn": 21, + "charOffset": 967, + "charLength": 7, + "snippet": { + "text": "message" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 21, + "charOffset": 867, + "charLength": 7, + "snippet": { + "text": "\tconst auto &message = getUserdataShared(L, 1);\n\tif (message) {\n\t\tlua_pushnumber(L, message->getByte());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39f9a3e4b35fe8e742961e45bcd8a34798714d2c60f760d03ff377eaf14c0a47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/network/network_message_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 38, + "startColumn": 21, + "charOffset": 1230, + "charLength": 7, + "snippet": { + "text": "message" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 21, + "charOffset": 1130, + "charLength": 7, + "snippet": { + "text": "\tconst auto &message = getUserdataShared(L, 1);\n\tif (message) {\n\t\tlua_pushnumber(L, message->get());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "993f08868e849d8218b857c023d596ecb963642a4e97d907bcb1b5c8ddf85fe2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/network/network_message_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 49, + "startColumn": 21, + "charOffset": 1499, + "charLength": 7, + "snippet": { + "text": "message" + } + }, + "contextRegion": { + "startLine": 47, + "startColumn": 21, + "charOffset": 1399, + "charLength": 7, + "snippet": { + "text": "\tconst auto &message = getUserdataShared(L, 1);\n\tif (message) {\n\t\tlua_pushnumber(L, message->get());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4fd633713ab96c6d42ec58a4c6ab6edcf4d56cd438959a893ac33552f0aec45f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned long' to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/network/network_message_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 60, + "startColumn": 21, + "charOffset": 1768, + "charLength": 7, + "snippet": { + "text": "message" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 21, + "charOffset": 1668, + "charLength": 7, + "snippet": { + "text": "\tconst auto &message = getUserdataShared(L, 1);\n\tif (message) {\n\t\tlua_pushnumber(L, message->get());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0436653fa19a616a69684129447f154f4ac02432063250e754dd9e0a01672956" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/network/network_message_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 60, + "startColumn": 21, + "charOffset": 1768, + "charLength": 7, + "snippet": { + "text": "message" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 21, + "charOffset": 1668, + "charLength": 7, + "snippet": { + "text": "\tconst auto &message = getUserdataShared(L, 1);\n\tif (message) {\n\t\tlua_pushnumber(L, message->get());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bef5463ac76bbb63cbc03d6341f472bd50927e4e423fc4cb217748bfa29ad340" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/network/network_message_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 236, + "startColumn": 6, + "charOffset": 6250, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 234, + "startColumn": 6, + "charOffset": 6143, + "charLength": 1, + "snippet": { + "text": "\t// networkMessage:addItem(item, player)\n\tstd::shared_ptr item = getUserdataShared(L, 2);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92f79820b9c42d93030065cfb9767290ba6801ca07079b4792bcc3e8d98d268f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/network/network_message_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 237, + "startColumn": 3, + "charOffset": 6261, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 235, + "startColumn": 3, + "charOffset": 6184, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr item = getUserdataShared(L, 2);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00f04b68e8c75745c5fbb8e6f9edcbb3bafe360820632abdd9d25e80aee66f94" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/network/network_message_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 243, + "startColumn": 6, + "charOffset": 6424, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 6, + "charOffset": 6351, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr player = getUserdataShared(L, 3);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fd9b48744881e5b3947aaf43483f472a96c9367f3a3703b8405d386231a83d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/network/network_message_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 244, + "startColumn": 3, + "charOffset": 6437, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 3, + "charOffset": 6352, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 3);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5ade8627265f06bde894747764053909e86f18006ba9acce0620b7904dcf03f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/network/network_message_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 287, + "startColumn": 6, + "charOffset": 7520, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 285, + "startColumn": 6, + "charOffset": 7411, + "charLength": 1, + "snippet": { + "text": "\t// networkMessage:sendToPlayer(player)\n\tconst auto &message = getUserdataShared(L, 1);\n\tif (!message) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c619f5cdeede608cd3205c22801e5f62397254cba7b01a43c64c4cf219cbd14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/network/network_message_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 293, + "startColumn": 6, + "charOffset": 7622, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 291, + "startColumn": 6, + "charOffset": 7565, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr player = getPlayer(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b98dddb8d04e52258d4ddd7e98c37e64278c21af7149532dd1a96a564cce0dca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/network/network_message_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 294, + "startColumn": 3, + "charOffset": 7635, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 292, + "startColumn": 3, + "charOffset": 7566, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getPlayer(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e98b46f0aab4efe41764ba4f5de35b12047e9fe72d5b8900e7e8fa751e3de9c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/network/webhook_functions.cpp" + }, + "region": { + "startLine": 20, + "startColumn": 2, + "charOffset": 777, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 2, + "charOffset": 698, + "charLength": 8, + "snippet": { + "text": "\tstd::string title = getString(L, 1);\n\tstd::string message = getString(L, 2);\n\tuint32_t color = getNumber(L, 3, 0);\n\tstd::string url = getString(L, -1);\n\tif (url == title) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "820b19096e5a663c8085eea8b3d1698d07c042a6c398a6a8784cec485c1746ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/network/webhook_functions.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 43, + "charOffset": 1037, + "charLength": 5, + "snippet": { + "text": "color" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 43, + "charOffset": 946, + "charLength": 5, + "snippet": { + "text": "\t\tg_webhook().sendMessage(title, url);\n\t} else {\n\t\tg_webhook().sendMessage(title, message, color, url);\n\t}\n\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be9c26af4c9fce0951f1b2ebda5a0a5eab75534575872e84c623b852edb2b246" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/combat_functions.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 6, + "charOffset": 970, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 6, + "charOffset": 874, + "charLength": 1, + "snippet": { + "text": "\t// combat:setParameter(key, value)\n\tconst auto &combat = getUserdataShared(L, 1);\n\tif (!combat) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1b260d878717abbc8b51498f9abb2aff5d523881305c3509c885732b9f475df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'value' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/combat_functions.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 11, + "charOffset": 1078, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 11, + "charOffset": 1014, + "charLength": 5, + "snippet": { + "text": "\n\tCombatParam_t key = getNumber(L, 2);\n\tuint32_t value;\n\tif (isBoolean(L, 3)) {\n\t\tvalue = getBoolean(L, 3) ? 1 : 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cae25a6a7f7f1bf16b20370619588bd72d43ad678792dc01b534c2d92856fd53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/combat_functions.cpp" + }, + "region": { + "startLine": 40, + "startColumn": 10, + "charOffset": 1204, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 38, + "startColumn": 10, + "charOffset": 1155, + "charLength": 8, + "snippet": { + "text": "\t\tvalue = getNumber(L, 3);\n\t}\n\tcombat->setParam(key, value);\n\tpushBoolean(L, true);\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4785e5887d539e981fc4267936bd7c080208dc4c35bde351a3cce93ddd7fadf6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/combat_functions.cpp" + }, + "region": { + "startLine": 48, + "startColumn": 6, + "charOffset": 1432, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 6, + "charOffset": 1320, + "charLength": 1, + "snippet": { + "text": "\t// combat:setFormula(type, mina, minb, maxa, maxb)\n\tconst auto &combat = getUserdataShared(L, 1);\n\tif (!combat) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b658a567998c42028d5cec09976e69f1d93040b27ff68a1f78dcdd285117ad95" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/combat_functions.cpp" + }, + "region": { + "startLine": 56, + "startColumn": 37, + "charOffset": 1647, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 54, + "startColumn": 37, + "charOffset": 1531, + "charLength": 1, + "snippet": { + "text": "\tdouble mina = getNumber(L, 3);\n\tdouble minb = getNumber(L, 4);\n\tdouble maxa = getNumber(L, 5);\n\tdouble maxb = getNumber(L, 6);\n\tcombat->setPlayerCombatValues(type, mina, minb, maxa, maxb);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d35b6c7a2496c5868348d8f005532a41068735eeae52555045f923204e680579" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/combat_functions.cpp" + }, + "region": { + "startLine": 57, + "startColumn": 37, + "charOffset": 1687, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 55, + "startColumn": 37, + "charOffset": 1571, + "charLength": 1, + "snippet": { + "text": "\tdouble minb = getNumber(L, 4);\n\tdouble maxa = getNumber(L, 5);\n\tdouble maxb = getNumber(L, 6);\n\tcombat->setPlayerCombatValues(type, mina, minb, maxa, maxb);\n\tpushBoolean(L, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e051708635e858b52bcd0307b4feea077e70323373b7dcfc83df80ebf717af2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/combat_functions.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 3, + "charOffset": 1929, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 3, + "charOffset": 1844, + "charLength": 15, + "snippet": { + "text": "\t// combat:setArea(area)\n\tif (getScriptEnv()->getScriptId() != EVENT_ID_LOADING) {\n\t\treportErrorFunc(\"This function can only be used while loading the script.\");\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f172335285a17d6d8288fae352f575c0a68b3168ffcb6d4539694d4f44e17256" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/combat_functions.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 6, + "charOffset": 2149, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 6, + "charOffset": 2039, + "charLength": 1, + "snippet": { + "text": "\n\tconst std::unique_ptr &area = g_luaEnvironment().getAreaObject(getNumber(L, 2));\n\tif (!area) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_AREA_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "004acb71f27dc5bd2b87107e40eec39dd4101df215c9d902b220caceb2f742c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/combat_functions.cpp" + }, + "region": { + "startLine": 73, + "startColumn": 3, + "charOffset": 2160, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 71, + "startColumn": 3, + "charOffset": 2040, + "charLength": 15, + "snippet": { + "text": "\tconst std::unique_ptr &area = g_luaEnvironment().getAreaObject(getNumber(L, 2));\n\tif (!area) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_AREA_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e1bc9528b3a4bd98b91facfaf3ddc89c00357fe65fb71ec3f5d99dff111b4ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/combat_functions.cpp" + }, + "region": { + "startLine": 92, + "startColumn": 2, + "charOffset": 2625, + "charLength": 6, + "snippet": { + "text": "Combat" + } + }, + "contextRegion": { + "startLine": 90, + "startColumn": 2, + "charOffset": 2513, + "charLength": 6, + "snippet": { + "text": "\t// combat:addCondition(condition)\n\tstd::shared_ptr condition = getUserdataShared(L, 2);\n\tCombat* combat = getUserdata(L, 1);\n\tif (combat && condition) {\n\t\tcombat->addCondition(condition->clone());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f4bde7a6dcd00a1a0ebf9b462fa96cd818e62e84b492ea300854f9bc84b795e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/combat_functions.cpp" + }, + "region": { + "startLine": 93, + "startColumn": 6, + "charOffset": 2674, + "charLength": 6, + "snippet": { + "text": "combat" + } + }, + "contextRegion": { + "startLine": 91, + "startColumn": 6, + "charOffset": 2548, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr condition = getUserdataShared(L, 2);\n\tCombat* combat = getUserdata(L, 1);\n\tif (combat && condition) {\n\t\tcombat->addCondition(condition->clone());\n\t\tpushBoolean(L, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f49348d458d530d2a32388ff6c5901c8777a49fa55f232683f6b745e782cabbf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'Combat *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/combat_functions.cpp" + }, + "region": { + "startLine": 93, + "startColumn": 6, + "charOffset": 2674, + "charLength": 6, + "snippet": { + "text": "combat" + } + }, + "contextRegion": { + "startLine": 91, + "startColumn": 6, + "charOffset": 2548, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr condition = getUserdataShared(L, 2);\n\tCombat* combat = getUserdata(L, 1);\n\tif (combat && condition) {\n\t\tcombat->addCondition(condition->clone());\n\t\tpushBoolean(L, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01c278d0efb8b3894a553ebe66e17a7f6dcb22b72455f76b9e9aa44cf869a4ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/combat_functions.cpp" + }, + "region": { + "startLine": 93, + "startColumn": 13, + "charOffset": 2681, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 91, + "startColumn": 13, + "charOffset": 2548, + "charLength": 2, + "snippet": { + "text": "\tstd::shared_ptr condition = getUserdataShared(L, 2);\n\tCombat* combat = getUserdata(L, 1);\n\tif (combat && condition) {\n\t\tcombat->addCondition(condition->clone());\n\t\tpushBoolean(L, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84dae4cd005ed016bb9414052562cebb994f9e43cc366456fdbc274425cddb10" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/combat_functions.cpp" + }, + "region": { + "startLine": 105, + "startColumn": 6, + "charOffset": 2966, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 103, + "startColumn": 6, + "charOffset": 2868, + "charLength": 1, + "snippet": { + "text": "\t// combat:setCallback(key, function)\n\tconst auto &combat = getUserdataShared(L, 1);\n\tif (!combat) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d651a75a233294a93d9644a089a81377dee091d4c8df71c882c88e3fd46ddab0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/combat_functions.cpp" + }, + "region": { + "startLine": 117, + "startColumn": 6, + "charOffset": 3189, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 115, + "startColumn": 6, + "charOffset": 3135, + "charLength": 1, + "snippet": { + "text": "\n\tCallBack* callback = combat->getCallback(key);\n\tif (!callback) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07fc84a6dd1537832be0ef22adf4f6aca8257cbdf8212230a47e4f639addabe7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'CallBack *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/combat_functions.cpp" + }, + "region": { + "startLine": 117, + "startColumn": 7, + "charOffset": 3190, + "charLength": 8, + "snippet": { + "text": "callback" + } + }, + "contextRegion": { + "startLine": 115, + "startColumn": 7, + "charOffset": 3135, + "charLength": 8, + "snippet": { + "text": "\n\tCallBack* callback = combat->getCallback(key);\n\tif (!callback) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4fa641369ac2f14319aaa545d81038e69dc4d498e864670a27c59df324ca5911" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/combat_functions.cpp" + }, + "region": { + "startLine": 142, + "startColumn": 6, + "charOffset": 3815, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 140, + "startColumn": 6, + "charOffset": 3717, + "charLength": 1, + "snippet": { + "text": "\t// combat:execute(creature, variant)\n\tconst auto &combat = getUserdataShared(L, 1);\n\tif (!combat) {\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84f610f477f004ea0dc7c37735569178f6af83d4524abeba94978d6e18a5df34" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/combat_functions.cpp" + }, + "region": { + "startLine": 164, + "startColumn": 8, + "charOffset": 4431, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 162, + "startColumn": 8, + "charOffset": 4319, + "charLength": 1, + "snippet": { + "text": "\t\tcase VARIANT_NUMBER: {\n\t\t\tstd::shared_ptr target = g_game().getCreatureByID(variant.number);\n\t\t\tif (!target) {\n\t\t\t\tpushBoolean(L, false);\n\t\t\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "350a3b0231c25b71ec8c5b5b15267ea8d8d1201471ffb6f4b588fabddab815ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/combat_functions.cpp" + }, + "region": { + "startLine": 170, + "startColumn": 13, + "charOffset": 4529, + "charLength": 8, + "snippet": { + "text": "doCombat" + } + }, + "contextRegion": { + "startLine": 168, + "startColumn": 13, + "charOffset": 4488, + "charLength": 8, + "snippet": { + "text": "\n\t\t\tif (combat->hasArea()) {\n\t\t\t\tcombat->doCombat(creature, target->getPosition());\n\t\t\t} else {\n\t\t\t\tcombat->doCombat(creature, target);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3bc15c4a71c2a2e59a8b0163ec6e7df5996850de0a7f9b2eb0c1711fd9869f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/combat_functions.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 13, + "charOffset": 4596, + "charLength": 8, + "snippet": { + "text": "doCombat" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 13, + "charOffset": 4517, + "charLength": 8, + "snippet": { + "text": "\t\t\t\tcombat->doCombat(creature, target->getPosition());\n\t\t\t} else {\n\t\t\t\tcombat->doCombat(creature, target);\n\t\t\t}\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ea4262fb8ea8827f83dd9986b41f4504313b05a5f3a8428997038081dacbc63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/combat_functions.cpp" + }, + "region": { + "startLine": 194, + "startColumn": 8, + "charOffset": 5130, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 192, + "startColumn": 8, + "charOffset": 5022, + "charLength": 1, + "snippet": { + "text": "\t\tcase VARIANT_STRING: {\n\t\t\tstd::shared_ptr target = g_game().getPlayerByName(variant.text);\n\t\t\tif (!target) {\n\t\t\t\tpushBoolean(L, false);\n\t\t\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e68d89af709bfc91c1bb086d6ab108a9dfdb4b15de69a94ec5190c871e2ea71" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/combat_functions.cpp" + }, + "region": { + "startLine": 203, + "startColumn": 3, + "charOffset": 5253, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 201, + "startColumn": 3, + "charOffset": 5246, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase VARIANT_NONE: {\n\t\t\treportErrorFunc(getErrorDesc(LUA_ERROR_VARIANT_NOT_FOUND));\n\t\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30e26605bb4c2a3c61311d53b3abe1bb38626d39f36590485dcac9c82258096c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/combat_functions.cpp" + }, + "region": { + "startLine": 204, + "startColumn": 4, + "charOffset": 5277, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 202, + "startColumn": 4, + "charOffset": 5250, + "charLength": 15, + "snippet": { + "text": "\n\t\tcase VARIANT_NONE: {\n\t\t\treportErrorFunc(getErrorDesc(LUA_ERROR_VARIANT_NOT_FOUND));\n\t\t\tpushBoolean(L, false);\n\t\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22dd681b3192f0403ac40a1605f41b3148936a26eab07e152938c58eb8a0d634" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 20, + "startColumn": 3, + "charOffset": 789, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 3, + "charOffset": 680, + "charLength": 15, + "snippet": { + "text": "\tConditionType_t conditionType = getNumber(L, 2);\n\tif (conditionType == CONDITION_NONE) {\n\t\treportErrorFunc(\"Invalid condition type\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc4d822ea279d4f1ae4666267b5f71b0c1c5e41ca5c52c2c8bb09c8f7eb9e248" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 24, + "startColumn": 2, + "charOffset": 849, + "charLength": 13, + "snippet": { + "text": "ConditionId_t" + } + }, + "contextRegion": { + "startLine": 22, + "startColumn": 2, + "charOffset": 844, + "charLength": 13, + "snippet": { + "text": "\t}\n\n\tConditionId_t conditionId = getNumber(L, 3, CONDITIONID_COMBAT);\n\tuint32_t subId = getNumber(L, 4, 0);\n\tbool isPersistent = getBoolean(L, 5, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d9de8f9f5c86d036f363ae84ddf06370ba04e8f791afeb05ced855b747d573d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 25, + "startColumn": 2, + "charOffset": 930, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 2, + "charOffset": 847, + "charLength": 8, + "snippet": { + "text": "\n\tConditionId_t conditionId = getNumber(L, 3, CONDITIONID_COMBAT);\n\tuint32_t subId = getNumber(L, 4, 0);\n\tbool isPersistent = getBoolean(L, 5, false);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d774a0baf26c48ed2caa8c3cfc6f16b5e5fda1a3d2e3da280e12cd9f8212283" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 36, + "charOffset": 1012, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 36, + "charOffset": 848, + "charLength": 1, + "snippet": { + "text": "\tConditionId_t conditionId = getNumber(L, 3, CONDITIONID_COMBAT);\n\tuint32_t subId = getNumber(L, 4, 0);\n\tbool isPersistent = getBoolean(L, 5, false);\n\n\tstd::shared_ptr condition = Condition::createCondition(conditionId, conditionType, 0, 0, false, subId, isPersistent);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7fc486d3926b278f097a970c4a242fdca9c98132e298422d900832ada0c592a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 6, + "charOffset": 1464, + "charLength": 12, + "snippet": { + "text": "conditionPtr" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 6, + "charOffset": 1353, + "charLength": 12, + "snippet": { + "text": "\t// condition:delete()\n\tstd::shared_ptr* conditionPtr = getRawUserDataShared(L, 1);\n\tif (conditionPtr && *conditionPtr) {\n\t\tconditionPtr->reset();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64def07b0c9beb6758e5a80a95cdb545e700ae2744a1fb8f26aeb11dbbfc3b99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'std::shared_ptr *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 6, + "charOffset": 1464, + "charLength": 12, + "snippet": { + "text": "conditionPtr" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 6, + "charOffset": 1353, + "charLength": 12, + "snippet": { + "text": "\t// condition:delete()\n\tstd::shared_ptr* conditionPtr = getRawUserDataShared(L, 1);\n\tif (conditionPtr && *conditionPtr) {\n\t\tconditionPtr->reset();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "768de0f2afe98bc84d827dea822127d203bceb57e1712580b7fd30d61f23d902" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 19, + "charOffset": 1477, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 19, + "charOffset": 1353, + "charLength": 2, + "snippet": { + "text": "\t// condition:delete()\n\tstd::shared_ptr* conditionPtr = getRawUserDataShared(L, 1);\n\tif (conditionPtr && *conditionPtr) {\n\t\tconditionPtr->reset();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ee24d2c3692ffa94f829e6ed4e51b63ffa4fc8f243c67771fba3be7e536fa02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 51, + "startColumn": 21, + "charOffset": 1733, + "charLength": 9, + "snippet": { + "text": "condition" + } + }, + "contextRegion": { + "startLine": 49, + "startColumn": 21, + "charOffset": 1619, + "charLength": 9, + "snippet": { + "text": "\tstd::shared_ptr condition = getUserdataShared(L, 1);\n\tif (condition) {\n\t\tlua_pushnumber(L, condition->getId());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38860c4b14014b08f9b95c060b0e9ee4c2f4cc75d3c68eabfd958996dd1b7a4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 62, + "startColumn": 21, + "charOffset": 1999, + "charLength": 9, + "snippet": { + "text": "condition" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 21, + "charOffset": 1885, + "charLength": 9, + "snippet": { + "text": "\tstd::shared_ptr condition = getUserdataShared(L, 1);\n\tif (condition) {\n\t\tlua_pushnumber(L, condition->getSubId());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4763ec5c03b1ea3026dc332c00023c52a97dada0cbbe48733257a2f10ea0d5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 73, + "startColumn": 21, + "charOffset": 2266, + "charLength": 9, + "snippet": { + "text": "condition" + } + }, + "contextRegion": { + "startLine": 71, + "startColumn": 21, + "charOffset": 2152, + "charLength": 9, + "snippet": { + "text": "\tstd::shared_ptr condition = getUserdataShared(L, 1);\n\tif (condition) {\n\t\tlua_pushnumber(L, condition->getType());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd6eb6c5dcf3e6aebb05274774e11c3e6a9622b38df678b1935a8b4213a3df10" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 3, + "charOffset": 2630, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 3, + "charOffset": 2552, + "charLength": 3, + "snippet": { + "text": "\t\tlua_newtable(L); // Creates a new table on the Lua stack\n\t\tint index = 1;\n\t\tfor (const auto &icon : icons) {\n\t\t\tlua_pushstring(L, magic_enum::enum_name(icon).data()); // Converts the enum to a string\n\t\t\tlua_rawseti(L, -2, index++); // Inserts into the Lua table array" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71a69f2a944fb5dd156de84796f5b2a882fa4069a4b119df5c4ec2b44666b83a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int64_t' (aka 'long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 101, + "startColumn": 21, + "charOffset": 3075, + "charLength": 9, + "snippet": { + "text": "condition" + } + }, + "contextRegion": { + "startLine": 99, + "startColumn": 21, + "charOffset": 2961, + "charLength": 9, + "snippet": { + "text": "\tstd::shared_ptr condition = getUserdataShared(L, 1);\n\tif (condition) {\n\t\tlua_pushnumber(L, condition->getEndTime());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05e8e37bcfd5d7f7aff767431a763b8f5e27c66e7d610e695de132e8e99f8239" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 101, + "startColumn": 21, + "charOffset": 3075, + "charLength": 9, + "snippet": { + "text": "condition" + } + }, + "contextRegion": { + "startLine": 99, + "startColumn": 21, + "charOffset": 2961, + "charLength": 9, + "snippet": { + "text": "\tstd::shared_ptr condition = getUserdataShared(L, 1);\n\tif (condition) {\n\t\tlua_pushnumber(L, condition->getEndTime());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a497812c945755b3b394d075903434f6ae8145a349f730bd19f433633df677a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 124, + "startColumn": 21, + "charOffset": 3651, + "charLength": 9, + "snippet": { + "text": "condition" + } + }, + "contextRegion": { + "startLine": 122, + "startColumn": 21, + "charOffset": 3537, + "charLength": 9, + "snippet": { + "text": "\tstd::shared_ptr condition = getUserdataShared(L, 1);\n\tif (condition) {\n\t\tlua_pushnumber(L, condition->getTicks());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9dc9a4ab9cb62a44aa0a1ff5097a3feb0af89850e191843afd2c729052e06b14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 147, + "startColumn": 6, + "charOffset": 4232, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 145, + "startColumn": 6, + "charOffset": 4112, + "charLength": 1, + "snippet": { + "text": "\t// condition:setParameter(key, value)\n\tstd::shared_ptr condition = getUserdataShared(L, 1);\n\tif (!condition) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ea5e2dde7d9d8940cfd10fe2af1c564da7a377a1d42d7ad4510ba9559d9c3e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'value' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 153, + "startColumn": 10, + "charOffset": 4348, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 151, + "startColumn": 10, + "charOffset": 4279, + "charLength": 5, + "snippet": { + "text": "\n\tConditionParam_t key = getNumber(L, 2);\n\tint32_t value;\n\tif (isBoolean(L, 3)) {\n\t\tvalue = getBoolean(L, 3) ? 1 : 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "862e7f5c01397a959c8c3a71ea04cbc32e39edeb57d4709151f1411773e71e6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 159, + "startColumn": 13, + "charOffset": 4476, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 157, + "startColumn": 13, + "charOffset": 4425, + "charLength": 8, + "snippet": { + "text": "\t\tvalue = getNumber(L, 3);\n\t}\n\tcondition->setParam(key, value);\n\tpushBoolean(L, true);\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e7ed7d525e5666da8d262d38495f0b9e259ce9e63c4bda628f9fc2bbf84b7b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 166, + "startColumn": 37, + "charOffset": 4683, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 37, + "charOffset": 4535, + "charLength": 1, + "snippet": { + "text": "int ConditionFunctions::luaConditionSetFormula(lua_State* L) {\n\t// condition:setFormula(mina, minb, maxa, maxb)\n\tdouble maxb = getNumber(L, 5);\n\tdouble maxa = getNumber(L, 4);\n\tdouble minb = getNumber(L, 3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39600c592e21b4e55f6e3668807911ca63a6d142c4d46986dd735276e75610a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 29, + "charOffset": 4971, + "charLength": 4, + "snippet": { + "text": "mina" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 29, + "charOffset": 4807, + "charLength": 4, + "snippet": { + "text": "\tstd::shared_ptr condition = getUserdataShared(L, 1)->dynamic_self_cast();\n\tif (condition) {\n\t\tcondition->setFormulaVars(mina, minb, maxa, maxb);\n\t\tpushBoolean(L, true);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb49a2076fcd18344a75422a3aa84caec2a18c886650cf2602682b062afd9d98" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 29, + "charOffset": 4971, + "charLength": 4, + "snippet": { + "text": "mina" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 29, + "charOffset": 4807, + "charLength": 4, + "snippet": { + "text": "\tstd::shared_ptr condition = getUserdataShared(L, 1)->dynamic_self_cast();\n\tif (condition) {\n\t\tcondition->setFormulaVars(mina, minb, maxa, maxb);\n\t\tpushBoolean(L, true);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c2700c77126bb797be194306beadb1fb5a39f7e1d2677fdee21b81874d1e179d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 35, + "charOffset": 4977, + "charLength": 4, + "snippet": { + "text": "minb" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 35, + "charOffset": 4807, + "charLength": 4, + "snippet": { + "text": "\tstd::shared_ptr condition = getUserdataShared(L, 1)->dynamic_self_cast();\n\tif (condition) {\n\t\tcondition->setFormulaVars(mina, minb, maxa, maxb);\n\t\tpushBoolean(L, true);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8556b201a66c4a7c73ce50e528fd173032e95fa993f879c583d57f55281eb6ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 35, + "charOffset": 4977, + "charLength": 4, + "snippet": { + "text": "minb" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 35, + "charOffset": 4807, + "charLength": 4, + "snippet": { + "text": "\tstd::shared_ptr condition = getUserdataShared(L, 1)->dynamic_self_cast();\n\tif (condition) {\n\t\tcondition->setFormulaVars(mina, minb, maxa, maxb);\n\t\tpushBoolean(L, true);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5351845fe06c5a95ff0fffbdee92b0373d0211b8a9723562bac18be482aa99fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 41, + "charOffset": 4983, + "charLength": 4, + "snippet": { + "text": "maxa" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 41, + "charOffset": 4807, + "charLength": 4, + "snippet": { + "text": "\tstd::shared_ptr condition = getUserdataShared(L, 1)->dynamic_self_cast();\n\tif (condition) {\n\t\tcondition->setFormulaVars(mina, minb, maxa, maxb);\n\t\tpushBoolean(L, true);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a125e1b14e8236171ebf3288757d0124eb369b2a56969216f00b445e4b4dc2d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 41, + "charOffset": 4983, + "charLength": 4, + "snippet": { + "text": "maxa" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 41, + "charOffset": 4807, + "charLength": 4, + "snippet": { + "text": "\tstd::shared_ptr condition = getUserdataShared(L, 1)->dynamic_self_cast();\n\tif (condition) {\n\t\tcondition->setFormulaVars(mina, minb, maxa, maxb);\n\t\tpushBoolean(L, true);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36226ed3dd7c693e2278e514b9f363a8bfa1b11bcbbc0e3a851326489a3e820d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 47, + "charOffset": 4989, + "charLength": 4, + "snippet": { + "text": "maxb" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 47, + "charOffset": 4807, + "charLength": 4, + "snippet": { + "text": "\tstd::shared_ptr condition = getUserdataShared(L, 1)->dynamic_self_cast();\n\tif (condition) {\n\t\tcondition->setFormulaVars(mina, minb, maxa, maxb);\n\t\tpushBoolean(L, true);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6a73666fdb6d88923fa9bab161e4a21cfae0adc4b71862ef9ccfd0770514d44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 47, + "charOffset": 4989, + "charLength": 4, + "snippet": { + "text": "maxb" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 47, + "charOffset": 4807, + "charLength": 4, + "snippet": { + "text": "\tstd::shared_ptr condition = getUserdataShared(L, 1)->dynamic_self_cast();\n\tif (condition) {\n\t\tcondition->setFormulaVars(mina, minb, maxa, maxb);\n\t\tpushBoolean(L, true);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a368dc23d5d7ff419009b756b371d2c5abb32e2851b0165351af5e4f7b348780" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "14 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 188, + "startColumn": 53, + "charOffset": 5495, + "charLength": 2, + "snippet": { + "text": "14" + } + }, + "contextRegion": { + "startLine": 186, + "startColumn": 53, + "charOffset": 5405, + "charLength": 2, + "snippet": { + "text": "\t\toutfit = getOutfit(L, 2);\n\t} else {\n\t\toutfit.lookFamiliarsType = getNumber(L, 14, outfit.lookFamiliarsType);\n\t\toutfit.lookMountFeet = getNumber(L, 13, outfit.lookMountFeet);\n\t\toutfit.lookMountLegs = getNumber(L, 12, outfit.lookMountLegs);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "18a29fb01ba1c791625a8102e5754c7cf5bc8433ac800c78d35e648517b82e99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "13 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 189, + "startColumn": 48, + "charOffset": 5573, + "charLength": 2, + "snippet": { + "text": "13" + } + }, + "contextRegion": { + "startLine": 187, + "startColumn": 48, + "charOffset": 5433, + "charLength": 2, + "snippet": { + "text": "\t} else {\n\t\toutfit.lookFamiliarsType = getNumber(L, 14, outfit.lookFamiliarsType);\n\t\toutfit.lookMountFeet = getNumber(L, 13, outfit.lookMountFeet);\n\t\toutfit.lookMountLegs = getNumber(L, 12, outfit.lookMountLegs);\n\t\toutfit.lookMountBody = getNumber(L, 11, outfit.lookMountBody);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9dd778db184092d22526aa0bed8803d61b7d720302cbf528e70cdbaa5951f7a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "12 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 190, + "startColumn": 48, + "charOffset": 5647, + "charLength": 2, + "snippet": { + "text": "12" + } + }, + "contextRegion": { + "startLine": 188, + "startColumn": 48, + "charOffset": 5443, + "charLength": 2, + "snippet": { + "text": "\t\toutfit.lookFamiliarsType = getNumber(L, 14, outfit.lookFamiliarsType);\n\t\toutfit.lookMountFeet = getNumber(L, 13, outfit.lookMountFeet);\n\t\toutfit.lookMountLegs = getNumber(L, 12, outfit.lookMountLegs);\n\t\toutfit.lookMountBody = getNumber(L, 11, outfit.lookMountBody);\n\t\toutfit.lookMountHead = getNumber(L, 10, outfit.lookMountHead);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c61d3ef96e820567c7c17d404bddc0080b2687b222ad57aa62e90cdcf936f9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "11 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 191, + "startColumn": 48, + "charOffset": 5721, + "charLength": 2, + "snippet": { + "text": "11" + } + }, + "contextRegion": { + "startLine": 189, + "startColumn": 48, + "charOffset": 5526, + "charLength": 2, + "snippet": { + "text": "\t\toutfit.lookMountFeet = getNumber(L, 13, outfit.lookMountFeet);\n\t\toutfit.lookMountLegs = getNumber(L, 12, outfit.lookMountLegs);\n\t\toutfit.lookMountBody = getNumber(L, 11, outfit.lookMountBody);\n\t\toutfit.lookMountHead = getNumber(L, 10, outfit.lookMountHead);\n\t\toutfit.lookMount = getNumber(L, 9, outfit.lookMount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a60108571d147bece586dd04505970d01ff1d905b58af63bb2f93184aedc1f7f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 192, + "startColumn": 48, + "charOffset": 5795, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 190, + "startColumn": 48, + "charOffset": 5600, + "charLength": 2, + "snippet": { + "text": "\t\toutfit.lookMountLegs = getNumber(L, 12, outfit.lookMountLegs);\n\t\toutfit.lookMountBody = getNumber(L, 11, outfit.lookMountBody);\n\t\toutfit.lookMountHead = getNumber(L, 10, outfit.lookMountHead);\n\t\toutfit.lookMount = getNumber(L, 9, outfit.lookMount);\n\t\toutfit.lookAddons = getNumber(L, 8, outfit.lookAddons);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90c08d6b027bc8cf2e1a6796976e3f2726ca91a69308e26a3b8607606cd4fc19" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 193, + "startColumn": 45, + "charOffset": 5866, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 191, + "startColumn": 45, + "charOffset": 5674, + "charLength": 1, + "snippet": { + "text": "\t\toutfit.lookMountBody = getNumber(L, 11, outfit.lookMountBody);\n\t\toutfit.lookMountHead = getNumber(L, 10, outfit.lookMountHead);\n\t\toutfit.lookMount = getNumber(L, 9, outfit.lookMount);\n\t\toutfit.lookAddons = getNumber(L, 8, outfit.lookAddons);\n\t\toutfit.lookFeet = getNumber(L, 7);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39ba684b8a8e3e02382b27c94215379b9aa276732ebb9d9f9ff634e94bde3502" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 194, + "startColumn": 45, + "charOffset": 5932, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 192, + "startColumn": 45, + "charOffset": 5748, + "charLength": 1, + "snippet": { + "text": "\t\toutfit.lookMountHead = getNumber(L, 10, outfit.lookMountHead);\n\t\toutfit.lookMount = getNumber(L, 9, outfit.lookMount);\n\t\toutfit.lookAddons = getNumber(L, 8, outfit.lookAddons);\n\t\toutfit.lookFeet = getNumber(L, 7);\n\t\toutfit.lookLegs = getNumber(L, 6);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a54b53de8fbaae09038de9f31887cbcebe9e828feb20dacc406e5dad66cf5ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 195, + "startColumn": 43, + "charOffset": 5997, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 193, + "startColumn": 43, + "charOffset": 5822, + "charLength": 1, + "snippet": { + "text": "\t\toutfit.lookMount = getNumber(L, 9, outfit.lookMount);\n\t\toutfit.lookAddons = getNumber(L, 8, outfit.lookAddons);\n\t\toutfit.lookFeet = getNumber(L, 7);\n\t\toutfit.lookLegs = getNumber(L, 6);\n\t\toutfit.lookBody = getNumber(L, 5);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1be45b07718c9322a9ca5468e3541ffe17e05f1cb0718903726fcdf81239558" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 196, + "startColumn": 43, + "charOffset": 6043, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 194, + "startColumn": 43, + "charOffset": 5888, + "charLength": 1, + "snippet": { + "text": "\t\toutfit.lookAddons = getNumber(L, 8, outfit.lookAddons);\n\t\toutfit.lookFeet = getNumber(L, 7);\n\t\toutfit.lookLegs = getNumber(L, 6);\n\t\toutfit.lookBody = getNumber(L, 5);\n\t\toutfit.lookHead = getNumber(L, 4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d9bfc5e8b79565e100ede270214bcba71398fba3e4aa9e13adde6444da10992" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/condition_functions.cpp" + }, + "region": { + "startLine": 197, + "startColumn": 43, + "charOffset": 6089, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 195, + "startColumn": 43, + "charOffset": 5955, + "charLength": 1, + "snippet": { + "text": "\t\toutfit.lookFeet = getNumber(L, 7);\n\t\toutfit.lookLegs = getNumber(L, 6);\n\t\toutfit.lookBody = getNumber(L, 5);\n\t\toutfit.lookHead = getNumber(L, 4);\n\t\toutfit.lookType = getNumber(L, 3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46546251c788667ee6a78baef12fb6ffcfa981f16a43cd4f26e076b900f81cd6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 2, + "charOffset": 946, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 2, + "charOffset": 902, + "charLength": 2, + "snippet": { + "text": "\tSpellType_t spellType = SPELL_UNDEFINED;\n\n\tif (isNumber(L, 2)) {\n\t\tuint16_t id = getNumber(L, 2);\n\t\tstd::shared_ptr rune = g_spells().getRuneSpell(id);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "092e2fb9c81eb5a9c36adcd4c30faaa2b4185ffd65a19a00b9f7063c04f5b531" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 61, + "startColumn": 3, + "charOffset": 1834, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 59, + "startColumn": 3, + "charOffset": 1787, + "charLength": 2, + "snippet": { + "text": "\n\t\tstd::string tmp = asLowerCaseString(arg);\n\t\tif (tmp == \"instant\") {\n\t\t\tspellType = SPELL_INSTANT;\n\t\t} else if (tmp == \"rune\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a585e341a3ea28801cede9cd6805445988769daf8abca856bbb9c70702b35a90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 68, + "startColumn": 2, + "charOffset": 1954, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 66, + "startColumn": 2, + "charOffset": 1949, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (spellType == SPELL_INSTANT) {\n\t\tauto spell = std::make_shared(getScriptEnv()->getScriptInterface());\n\t\tpushUserdata(L, spell);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10866c44c4c2892b160cded34829ee298200528031a67299f9839e247b0ffcf4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 4, + "charOffset": 2189, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 4, + "charOffset": 2138, + "charLength": 4, + "snippet": { + "text": "\t\tspell->spellType = SPELL_INSTANT;\n\t\treturn 1;\n\t} else if (spellType == SPELL_RUNE) {\n\t\tauto runeSpell = std::make_shared(getScriptEnv()->getScriptInterface());\n\t\tpushUserdata(L, runeSpell);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5793d53e359938572aa506ce936daf0dba972539ec9bd76bc6ffda1c42053fe8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 90, + "startColumn": 3, + "charOffset": 2620, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 88, + "startColumn": 3, + "charOffset": 2552, + "charLength": 2, + "snippet": { + "text": "\tconst auto spell = getUserdataShared(L, 1);\n\tif (spell) {\n\t\tif (spell->spellType == SPELL_INSTANT) {\n\t\t\tconst auto spellBase = getUserdataShared(L, 1);\n\t\t\tconst auto instant = std::static_pointer_cast(spellBase);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "858649adfc7fbe06f7895180f6e84f834b1c75b17d642d300ff92ff1bf97c022" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 118, + "startColumn": 6, + "charOffset": 3456, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 116, + "startColumn": 6, + "charOffset": 3378, + "charLength": 1, + "snippet": { + "text": "\t// spell:register()\n\tconst auto spell = getUserdataShared(L, 1);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68cbfe2eb19b049b7707733730dc2c26a20d86b288cdd79a1d3449e6497af26e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 119, + "startColumn": 3, + "charOffset": 3468, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 117, + "startColumn": 3, + "charOffset": 3399, + "charLength": 15, + "snippet": { + "text": "\tconst auto spell = getUserdataShared(L, 1);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af0e1a9659420435493c0583d751ec4c3897271ef6d638bc4b14dee0fb78d72a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 124, + "startColumn": 2, + "charOffset": 3568, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 122, + "startColumn": 2, + "charOffset": 3563, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (spell->spellType == SPELL_INSTANT) {\n\t\tconst auto spellBase = getUserdataShared(L, 1);\n\t\tconst auto instant = std::static_pointer_cast(spellBase);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55d695e98e0112ca2cfe43580dc92341430952ec984d226f98240d29f190de11" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 142, + "startColumn": 25, + "charOffset": 4433, + "charLength": 4, + "snippet": { + "text": "rune" + } + }, + "contextRegion": { + "startLine": 140, + "startColumn": 25, + "charOffset": 4370, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tiType.name = rune->getName();\n\t\t\t}\n\t\t\tiType.runeMagLevel = rune->getMagicLevel();\n\t\t\tiType.runeLevel = rune->getLevel();\n\t\t\tiType.charges = rune->getCharges();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0863a724a084478f99c1285212c3fdd2b8c5a56c05661d6df3a2ca61aa897e13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 143, + "startColumn": 22, + "charOffset": 4477, + "charLength": 4, + "snippet": { + "text": "rune" + } + }, + "contextRegion": { + "startLine": 141, + "startColumn": 22, + "charOffset": 4404, + "charLength": 4, + "snippet": { + "text": "\t\t\t}\n\t\t\tiType.runeMagLevel = rune->getMagicLevel();\n\t\t\tiType.runeLevel = rune->getLevel();\n\t\t\tiType.charges = rune->getCharges();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7ed07de723560b209df9b2e595c90f05b20a539f68a400f14e55cb2ed133948" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 177, + "startColumn": 4, + "charOffset": 5222, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 175, + "startColumn": 4, + "charOffset": 5128, + "charLength": 15, + "snippet": { + "text": "\tif (spell) {\n\t\tif (spell->spellType != SPELL_INSTANT && spell->spellType != SPELL_RUNE) {\n\t\t\treportErrorFunc(\"The method: 'spell:id(id)' is only for use of instant spells and rune spells\");\n\t\t\tpushBoolean(L, false);\n\t\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36dfd31dd8ba4ddb4266f31cadb73445b0994f69ead5936decd40584e35bf964" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 182, + "startColumn": 22, + "charOffset": 5411, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 180, + "startColumn": 22, + "charOffset": 5358, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, spell->getSpellId());\n\t\t} else {\n\t\t\tspell->setSpellId(getNumber(L, 2));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7b8f4f51d41ae1e1698f20f5cc7fe0272fd5794efa33a6388637b6494a84b71" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'luaSpellGroup' has cognitive complexity of 33 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 193, + "startColumn": 21, + "charOffset": 5587, + "charLength": 13, + "snippet": { + "text": "luaSpellGroup" + } + }, + "contextRegion": { + "startLine": 191, + "startColumn": 21, + "charOffset": 5564, + "charLength": 13, + "snippet": { + "text": "}\n\nint SpellFunctions::luaSpellGroup(lua_State* L) {\n\t// spell:group(primaryGroup[, secondaryGroup])\n\tconst auto spell = getUserdataShared(L, 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37f55efe6fa38ec8c77cbdffbfb2be0de5df15e5c428985b0f515dab682dafca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 198, + "startColumn": 22, + "charOffset": 5780, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 196, + "startColumn": 22, + "charOffset": 5717, + "charLength": 5, + "snippet": { + "text": "\tif (spell) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, spell->getGroup());\n\t\t\tlua_pushnumber(L, spell->getSecondaryGroup());\n\t\t\treturn 2;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "214bec0d35476e5fdeff2a55e418d3211643ea8abf06f5e371089cc2edb8cd42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 199, + "startColumn": 22, + "charOffset": 5821, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 197, + "startColumn": 22, + "charOffset": 5731, + "charLength": 5, + "snippet": { + "text": "\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, spell->getGroup());\n\t\t\tlua_pushnumber(L, spell->getSecondaryGroup());\n\t\t\treturn 2;\n\t\t} else if (lua_gettop(L) == 2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4282fdf9887d017c9b5e29fbe781cbd59ebd30a4e59b74ac55fb583829db5a37" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 201, + "startColumn": 5, + "charOffset": 5867, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 5, + "charOffset": 5800, + "charLength": 4, + "snippet": { + "text": "\t\t\tlua_pushnumber(L, spell->getSecondaryGroup());\n\t\t\treturn 2;\n\t\t} else if (lua_gettop(L) == 2) {\n\t\t\tSpellGroup_t group = getNumber(L, 2);\n\t\t\tif (group) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58be9f16615627963451092aacca8bb547256a84d6f7409302c9446ab4d19a21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 203, + "startColumn": 8, + "charOffset": 5960, + "charLength": 5, + "snippet": { + "text": "group" + } + }, + "contextRegion": { + "startLine": 201, + "startColumn": 8, + "charOffset": 5863, + "charLength": 5, + "snippet": { + "text": "\t\t} else if (lua_gettop(L) == 2) {\n\t\t\tSpellGroup_t group = getNumber(L, 2);\n\t\t\tif (group) {\n\t\t\t\tspell->setGroup(group);\n\t\t\t\tpushBoolean(L, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60ae2b173e6b9cc68a93b2d621aae21af1bea6e413b1bee0e50a461b4d685a4b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'SpellGroup_t' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 203, + "startColumn": 8, + "charOffset": 5960, + "charLength": 5, + "snippet": { + "text": "group" + } + }, + "contextRegion": { + "startLine": 201, + "startColumn": 8, + "charOffset": 5863, + "charLength": 5, + "snippet": { + "text": "\t\t} else if (lua_gettop(L) == 2) {\n\t\t\tSpellGroup_t group = getNumber(L, 2);\n\t\t\tif (group) {\n\t\t\t\tspell->setGroup(group);\n\t\t\t\tpushBoolean(L, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25e10bf8a1eb244a36e75295ce9bf6191b526615f79c25cf8f2037f25065bb4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 228, + "startColumn": 8, + "charOffset": 6734, + "charLength": 12, + "snippet": { + "text": "primaryGroup" + } + }, + "contextRegion": { + "startLine": 226, + "startColumn": 8, + "charOffset": 6601, + "charLength": 12, + "snippet": { + "text": "\t\t\tSpellGroup_t primaryGroup = getNumber(L, 2);\n\t\t\tSpellGroup_t secondaryGroup = getNumber(L, 2);\n\t\t\tif (primaryGroup && secondaryGroup) {\n\t\t\t\tspell->setGroup(primaryGroup);\n\t\t\t\tspell->setSecondaryGroup(secondaryGroup);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c92a55bd468e1c4a7b9761b035db1599dde966ea5ade9290dd0b92418fff926" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'SpellGroup_t' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 228, + "startColumn": 8, + "charOffset": 6734, + "charLength": 12, + "snippet": { + "text": "primaryGroup" + } + }, + "contextRegion": { + "startLine": 226, + "startColumn": 8, + "charOffset": 6601, + "charLength": 12, + "snippet": { + "text": "\t\t\tSpellGroup_t primaryGroup = getNumber(L, 2);\n\t\t\tSpellGroup_t secondaryGroup = getNumber(L, 2);\n\t\t\tif (primaryGroup && secondaryGroup) {\n\t\t\t\tspell->setGroup(primaryGroup);\n\t\t\t\tspell->setSecondaryGroup(secondaryGroup);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54b2cf24e89ccdcd660c591dc32ab79935bcfeff5219f7ebfb3f3de615e6f8fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 228, + "startColumn": 21, + "charOffset": 6747, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 226, + "startColumn": 21, + "charOffset": 6601, + "charLength": 2, + "snippet": { + "text": "\t\t\tSpellGroup_t primaryGroup = getNumber(L, 2);\n\t\t\tSpellGroup_t secondaryGroup = getNumber(L, 2);\n\t\t\tif (primaryGroup && secondaryGroup) {\n\t\t\t\tspell->setGroup(primaryGroup);\n\t\t\t\tspell->setSecondaryGroup(secondaryGroup);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7586ae4a3de9febe3dbf265ea779eebc7e4e3c556d9a360d47d1e9dc93a2e6a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 228, + "startColumn": 21, + "charOffset": 6747, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 226, + "startColumn": 21, + "charOffset": 6601, + "charLength": 2, + "snippet": { + "text": "\t\t\tSpellGroup_t primaryGroup = getNumber(L, 2);\n\t\t\tSpellGroup_t secondaryGroup = getNumber(L, 2);\n\t\t\tif (primaryGroup && secondaryGroup) {\n\t\t\t\tspell->setGroup(primaryGroup);\n\t\t\t\tspell->setSecondaryGroup(secondaryGroup);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6c9344ebff34b3b8c3413208a638328c1d3bfb5e984f2421eb1712e1eb18432" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'SpellGroup_t' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 228, + "startColumn": 24, + "charOffset": 6750, + "charLength": 14, + "snippet": { + "text": "secondaryGroup" + } + }, + "contextRegion": { + "startLine": 226, + "startColumn": 24, + "charOffset": 6601, + "charLength": 14, + "snippet": { + "text": "\t\t\tSpellGroup_t primaryGroup = getNumber(L, 2);\n\t\t\tSpellGroup_t secondaryGroup = getNumber(L, 2);\n\t\t\tif (primaryGroup && secondaryGroup) {\n\t\t\t\tspell->setGroup(primaryGroup);\n\t\t\t\tspell->setSecondaryGroup(secondaryGroup);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4c39320fbb9409d6a4c24f19cd98bae6b20951873fdf9606870fc66ab9b2e57" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 273, + "startColumn": 22, + "charOffset": 8168, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 271, + "startColumn": 22, + "charOffset": 8105, + "charLength": 11, + "snippet": { + "text": "\tif (spell) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, static_cast(spell->soundCastEffect));\n\t\t} else {\n\t\t\tspell->soundCastEffect = static_cast(getNumber(L, 2));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "230453ba2ce92993d5b410884c03bc37518aaed663c51ae91c7cac40f5f8f283" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 289, + "startColumn": 22, + "charOffset": 8615, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 287, + "startColumn": 22, + "charOffset": 8552, + "charLength": 11, + "snippet": { + "text": "\tif (spell) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, static_cast(spell->soundImpactEffect));\n\t\t} else {\n\t\t\tspell->soundImpactEffect = static_cast(getNumber(L, 2));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98cf14477326b1adccaa24a117db1e4dd5165bf60a41f687b70b11a29ae9d188" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 305, + "startColumn": 22, + "charOffset": 9032, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 303, + "startColumn": 22, + "charOffset": 8969, + "charLength": 5, + "snippet": { + "text": "\tif (spell) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, spell->getCooldown());\n\t\t} else {\n\t\t\tspell->setCooldown(getNumber(L, 2));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25adb3561838b60a5cdf522caed15847c3f0b58090a5227a2587598d172df6f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 321, + "startColumn": 22, + "charOffset": 9423, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 319, + "startColumn": 22, + "charOffset": 9360, + "charLength": 5, + "snippet": { + "text": "\tif (spell) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, spell->getGroupCooldown());\n\t\t\tlua_pushnumber(L, spell->getSecondaryCooldown());\n\t\t\treturn 2;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aff9444238d596840af7e95643aa36baf618d815c1570e42e28136629f4ad378" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 322, + "startColumn": 22, + "charOffset": 9472, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 320, + "startColumn": 22, + "charOffset": 9374, + "charLength": 5, + "snippet": { + "text": "\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, spell->getGroupCooldown());\n\t\t\tlua_pushnumber(L, spell->getSecondaryCooldown());\n\t\t\treturn 2;\n\t\t} else if (lua_gettop(L) == 2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a17b6547b6cd132b570a4d261af417b6b2b2c6f9ccf6e2eedbecc2baefbe8d5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 324, + "startColumn": 5, + "charOffset": 9521, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 322, + "startColumn": 5, + "charOffset": 9451, + "charLength": 4, + "snippet": { + "text": "\t\t\tlua_pushnumber(L, spell->getSecondaryCooldown());\n\t\t\treturn 2;\n\t\t} else if (lua_gettop(L) == 2) {\n\t\t\tspell->setGroupCooldown(getNumber(L, 2));\n\t\t\tpushBoolean(L, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0a2cd7e7d10852b5ea876722574a8c0b6b557771c3c992f711175a2d17d4c78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 343, + "startColumn": 22, + "charOffset": 10017, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 341, + "startColumn": 22, + "charOffset": 9954, + "charLength": 5, + "snippet": { + "text": "\tif (spell) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, spell->getLevel());\n\t\t} else {\n\t\t\tspell->setLevel(getNumber(L, 2));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e26397b96f5b202f15ca93e54174e44e4cfb2ba7c1e9bc506f1f417ebe8265a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 359, + "startColumn": 22, + "charOffset": 10365, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 357, + "startColumn": 22, + "charOffset": 10302, + "charLength": 5, + "snippet": { + "text": "\tif (spell) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, spell->getMagicLevel());\n\t\t} else {\n\t\t\tspell->setMagicLevel(getNumber(L, 2));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fc30409744c12ccd2a6e3d490262e79bda78a65602982f469cb231bf962385d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 375, + "startColumn": 22, + "charOffset": 10712, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 373, + "startColumn": 22, + "charOffset": 10649, + "charLength": 5, + "snippet": { + "text": "\tif (spell) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, spell->getMana());\n\t\t} else {\n\t\t\tspell->setMana(getNumber(L, 2));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d39eb6ee370c33f701f95d7c13551723697410a083e6b4460b3e3e35ed066bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 391, + "startColumn": 22, + "charOffset": 11064, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 389, + "startColumn": 22, + "charOffset": 11001, + "charLength": 5, + "snippet": { + "text": "\tif (spell) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, spell->getManaPercent());\n\t\t} else {\n\t\t\tspell->setManaPercent(getNumber(L, 2));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16eb03da18bf0f8d9f5cf93ac6d363afe6f7d3713f33d1bdee0b68c19f26a310" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 407, + "startColumn": 22, + "charOffset": 11413, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 405, + "startColumn": 22, + "charOffset": 11350, + "charLength": 5, + "snippet": { + "text": "\tif (spell) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, spell->getSoulCost());\n\t\t} else {\n\t\t\tspell->setSoulCost(getNumber(L, 2));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b25e57d65c4211fd6d518e4a1ec6c99ab1a11f0c8dfaf943d68e74bebd52f458" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 423, + "startColumn": 22, + "charOffset": 11759, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 421, + "startColumn": 22, + "charOffset": 11696, + "charLength": 5, + "snippet": { + "text": "\tif (spell) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, spell->getRange());\n\t\t} else {\n\t\t\tspell->setRange(getNumber(L, 2));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d12de4b7a56686dacd426edc20cfb03e50632f1e708cc96e1a120db6bd6b97fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 536, + "startColumn": 5, + "charOffset": 14265, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 534, + "startColumn": 5, + "charOffset": 14199, + "charLength": 4, + "snippet": { + "text": "\t\t\tpushBoolean(L, spell->getBlockingCreature());\n\t\t\treturn 2;\n\t\t} else {\n\t\t\tspell->setBlockingSolid(getBoolean(L, 2));\n\t\t\tspell->setBlockingCreature(getBoolean(L, 3));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "beb44911639856242e157eea7c3e5dbdf523f12e98435e0fd431a2fcfd059e85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'luaSpellVocation' has cognitive complexity of 28 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 595, + "startColumn": 21, + "charOffset": 15502, + "charLength": 16, + "snippet": { + "text": "luaSpellVocation" + } + }, + "contextRegion": { + "startLine": 593, + "startColumn": 21, + "charOffset": 15479, + "charLength": 16, + "snippet": { + "text": "}\n\nint SpellFunctions::luaSpellVocation(lua_State* L) {\n\t// spell:vocation(vocation)\n\tconst auto spell = getUserdataShared(L, 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83c037af2b048cd180fbbddd72e0bcf1614dcac242d98b3fa40f3e46e0bc2ce7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 602, + "startColumn": 4, + "charOffset": 15706, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 600, + "startColumn": 4, + "charOffset": 15658, + "charLength": 3, + "snippet": { + "text": "\t\t\tlua_createtable(L, 0, 0);\n\t\t\tauto it = 0;\n\t\t\tfor (auto voc : spell->getVocMap()) {\n\t\t\t\t++it;\n\t\t\t\tstd::string s = std::to_string(it);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cac251ce7b0b35e543d42ccc43366b22fa91d09f9de59a1f45435b34f59d9a05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 612, + "startColumn": 4, + "charOffset": 16094, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 610, + "startColumn": 4, + "charOffset": 15972, + "charLength": 3, + "snippet": { + "text": "\t\t} else {\n\t\t\tint parameters = lua_gettop(L) - 1; // - 1 because self is a parameter aswell, which we want to skip ofc\n\t\t\tfor (int i = 0; i < parameters; ++i) {\n\t\t\t\tif (getString(L, 2 + i).find(\";\") != std::string::npos) {\n\t\t\t\t\tstd::vector vocList = explodeString(getString(L, 2 + i), \";\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cdc619e525c5588f977089ce6ec3a46c12232639c8ca0e4dc05709a1671a0423" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'parameters' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 612, + "startColumn": 20, + "charOffset": 16110, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 610, + "startColumn": 20, + "charOffset": 15972, + "charLength": 1, + "snippet": { + "text": "\t\t} else {\n\t\t\tint parameters = lua_gettop(L) - 1; // - 1 because self is a parameter aswell, which we want to skip ofc\n\t\t\tfor (int i = 0; i < parameters; ++i) {\n\t\t\t\tif (getString(L, 2 + i).find(\";\") != std::string::npos) {\n\t\t\t\t\tstd::vector vocList = explodeString(getString(L, 2 + i), \";\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8ad7bc210ad17c14ed8ff6dbfd3c143587c56b92e743344c895e2337e85a3a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-faster-string-find", + "ruleIndex": 667, + "kind": "fail", + "level": "warning", + "message": { + "text": "'find' called with a string literal consisting of a single character; consider using the more effective overload accepting a character" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 613, + "startColumn": 34, + "charOffset": 16166, + "charLength": 3, + "snippet": { + "text": "\";\"" + } + }, + "contextRegion": { + "startLine": 611, + "startColumn": 34, + "charOffset": 15983, + "charLength": 3, + "snippet": { + "text": "\t\t\tint parameters = lua_gettop(L) - 1; // - 1 because self is a parameter aswell, which we want to skip ofc\n\t\t\tfor (int i = 0; i < parameters; ++i) {\n\t\t\t\tif (getString(L, 2 + i).find(\";\") != std::string::npos) {\n\t\t\t\t\tstd::vector vocList = explodeString(getString(L, 2 + i), \";\");\n\t\t\t\t\tint32_t vocationId = g_vocations().getVocationId(vocList[0]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26e0b654ee50e8b815858d1096a52d4d331985f68e5abb59c8d81c9890d6390e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-container-size-empty", + "ruleIndex": 695, + "kind": "fail", + "level": "warning", + "message": { + "text": "the 'empty' method should be used to check for emptiness instead of 'size'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 616, + "startColumn": 10, + "charOffset": 16352, + "charLength": 7, + "snippet": { + "text": "vocList" + } + }, + "contextRegion": { + "startLine": 614, + "startColumn": 10, + "charOffset": 16195, + "charLength": 7, + "snippet": { + "text": "\t\t\t\t\tstd::vector vocList = explodeString(getString(L, 2 + i), \";\");\n\t\t\t\t\tint32_t vocationId = g_vocations().getVocationId(vocList[0]);\n\t\t\t\t\tif (vocList.size() > 0) {\n\t\t\t\t\t\tif (vocList[1] == \"true\") {\n\t\t\t\t\t\t\tspell->addVocMap(vocationId, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99f54305c67e9bdcddc09deb3c17a7e0c48c93b0d0da796b743a788cf5eb06cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 618, + "startColumn": 25, + "charOffset": 16432, + "charLength": 10, + "snippet": { + "text": "vocationId" + } + }, + "contextRegion": { + "startLine": 616, + "startColumn": 25, + "charOffset": 16343, + "charLength": 10, + "snippet": { + "text": "\t\t\t\t\tif (vocList.size() > 0) {\n\t\t\t\t\t\tif (vocList[1] == \"true\") {\n\t\t\t\t\t\t\tspell->addVocMap(vocationId, true);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tspell->addVocMap(vocationId, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b24059e8bbeeef9fcc19e8f84158699a6e9526302738716ab242a9066b9e8535" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 620, + "startColumn": 25, + "charOffset": 16490, + "charLength": 10, + "snippet": { + "text": "vocationId" + } + }, + "contextRegion": { + "startLine": 618, + "startColumn": 25, + "charOffset": 16408, + "charLength": 10, + "snippet": { + "text": "\t\t\t\t\t\t\tspell->addVocMap(vocationId, true);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tspell->addVocMap(vocationId, false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e27fa06f3e3fd0dd72f14bb2ae5d7d1195bab4ad86d060d254b7946829a64306" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 625, + "startColumn": 23, + "charOffset": 16636, + "charLength": 10, + "snippet": { + "text": "vocationId" + } + }, + "contextRegion": { + "startLine": 623, + "startColumn": 23, + "charOffset": 16525, + "charLength": 10, + "snippet": { + "text": "\t\t\t\t} else {\n\t\t\t\t\tint32_t vocationId = g_vocations().getVocationId(getString(L, 2 + i));\n\t\t\t\t\tspell->addVocMap(vocationId, false);\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "326559c910d87d367b9ce7b553c9abd1ddc7852683dcd0e8efa2520acca43c61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 652, + "startColumn": 5, + "charOffset": 17299, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 650, + "startColumn": 5, + "charOffset": 17241, + "charLength": 4, + "snippet": { + "text": "\t\t\tpushString(L, spell->getSeparator());\n\t\t\treturn 2;\n\t\t} else {\n\t\t\tstd::string sep = \"\";\n\t\t\tif (lua_gettop(L) == 3) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "506aafe29fb350ffc5e3fcd8e799f921e27c147f9277a8606bd3ccb40bac2b39" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-redundant-string-init", + "ruleIndex": 725, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 653, + "startColumn": 16, + "charOffset": 17321, + "charLength": 3, + "snippet": { + "text": "sep" + } + }, + "contextRegion": { + "startLine": 651, + "startColumn": 16, + "charOffset": 17282, + "charLength": 3, + "snippet": { + "text": "\t\t\treturn 2;\n\t\t} else {\n\t\t\tstd::string sep = \"\";\n\t\t\tif (lua_gettop(L) == 3) {\n\t\t\t\tsep = getString(L, 3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a1ec035f52184636c13c07ac16836c3da97cf55e417eb5592066cc92cbfe5ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 800, + "startColumn": 22, + "charOffset": 21218, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 798, + "startColumn": 22, + "charOffset": 21168, + "charLength": 5, + "snippet": { + "text": "\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, spell->getRuneItemId());\n\t\t} else {\n\t\t\tspell->setRuneItemId(getNumber(L, 2));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55f110d77f94c8f25741649ea38a59517eba90d7e6720bcd966d0de4546847a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 824, + "startColumn": 22, + "charOffset": 21837, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 822, + "startColumn": 22, + "charOffset": 21787, + "charLength": 5, + "snippet": { + "text": "\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, spell->getCharges());\n\t\t} else {\n\t\t\tspell->setCharges(getNumber(L, 2));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7cbc93a2d28847bc84ae3be2cac9e7083f26cc96e53a06332ba9b936a1f33efb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 912, + "startColumn": 6, + "charOffset": 24062, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 910, + "startColumn": 6, + "charOffset": 23942, + "charLength": 1, + "snippet": { + "text": "\tconst auto spell = getUserdataShared(L, 1);\n\tWheelSpellGrade_t grade = getNumber(L, 2);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf5b3bfe276537132f202b283a9bf0c3c663ae2e5cd40673255f00375444c872" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 913, + "startColumn": 3, + "charOffset": 24074, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 911, + "startColumn": 3, + "charOffset": 23994, + "charLength": 15, + "snippet": { + "text": "\tWheelSpellGrade_t grade = getNumber(L, 2);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "627ba87de0aa6e8900ceb13cc517622ba6c48bf53555af3aa81835c6f063ba14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 919, + "startColumn": 21, + "charOffset": 24220, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 917, + "startColumn": 21, + "charOffset": 24172, + "charLength": 5, + "snippet": { + "text": "\n\tif (lua_gettop(L) == 2) {\n\t\tlua_pushnumber(L, spell->getWheelOfDestinyBoost(WheelSpellBoost_t::MANA, grade));\n\t} else {\n\t\tspell->setWheelOfDestinyBoost(WheelSpellBoost_t::MANA, grade, getNumber(L, 3));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "665c9baec0cb2cb7d16edd76a5a2d99a1b6b7fac434e582acb93948bc80a9ef7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 931, + "startColumn": 6, + "charOffset": 24616, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 929, + "startColumn": 6, + "charOffset": 24524, + "charLength": 1, + "snippet": { + "text": "\t// spell:cooldownWOD(grade, time)\n\tconst auto spell = getUserdataShared(L, 1);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "deed81ea4777ba93af75e872264cd732c609aaff7d3f71e7cb991c39134c167d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 932, + "startColumn": 3, + "charOffset": 24628, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 930, + "startColumn": 3, + "charOffset": 24559, + "charLength": 15, + "snippet": { + "text": "\tconst auto spell = getUserdataShared(L, 1);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95e97b6992d4448f1977cca7bc783e01ee5f6844dd3dbbe26dfdc6b9fe8e99dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 939, + "startColumn": 21, + "charOffset": 24837, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 937, + "startColumn": 21, + "charOffset": 24727, + "charLength": 5, + "snippet": { + "text": "\tWheelSpellGrade_t grade = getNumber(L, 2);\n\tif (lua_gettop(L) == 2) {\n\t\tlua_pushnumber(L, spell->getWheelOfDestinyBoost(WheelSpellBoost_t::COOLDOWN, grade));\n\t} else {\n\t\tspell->setWheelOfDestinyBoost(WheelSpellBoost_t::COOLDOWN, grade, getNumber(L, 3));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99b798ae554398cf2395620427ab8c3239e8c6e1bb881812b7d6969c5a435bbd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 951, + "startColumn": 6, + "charOffset": 25251, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 949, + "startColumn": 6, + "charOffset": 25154, + "charLength": 1, + "snippet": { + "text": "\t// spell:groupCooldownWOD(grade, time)\n\tconst auto spell = getUserdataShared(L, 1);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1fa349bf8e24b693c78f5e0e795745112f973993ad1dea55356a47d554c414f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 952, + "startColumn": 3, + "charOffset": 25263, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 950, + "startColumn": 3, + "charOffset": 25194, + "charLength": 15, + "snippet": { + "text": "\tconst auto spell = getUserdataShared(L, 1);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee26d199def83c2216d25fc425e669a87ff5f9b8e855f6fa550c1cc821097416" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 959, + "startColumn": 21, + "charOffset": 25472, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 957, + "startColumn": 21, + "charOffset": 25362, + "charLength": 5, + "snippet": { + "text": "\tWheelSpellGrade_t grade = getNumber(L, 2);\n\tif (lua_gettop(L) == 2) {\n\t\tlua_pushnumber(L, spell->getWheelOfDestinyBoost(WheelSpellBoost_t::GROUP_COOLDOWN, grade));\n\t} else {\n\t\tspell->setWheelOfDestinyBoost(WheelSpellBoost_t::GROUP_COOLDOWN, grade, getNumber(L, 3));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ef96d72ddecaed87c12b6241aa4500df4ba499e4da307f541e8d0ced01de7d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 971, + "startColumn": 6, + "charOffset": 25916, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 969, + "startColumn": 6, + "charOffset": 25810, + "charLength": 1, + "snippet": { + "text": "\t// spell:secondaryGroupCooldownWOD(grade, time)\n\tconst auto spell = getUserdataShared(L, 1);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74d166674fa744927e89100f0c796260654223317510cbebc0ddb8a30760a4fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 972, + "startColumn": 3, + "charOffset": 25928, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 970, + "startColumn": 3, + "charOffset": 25859, + "charLength": 15, + "snippet": { + "text": "\tconst auto spell = getUserdataShared(L, 1);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb7165fbda332f78d0080835679136637af774d2e63abbb279dc72f65375e179" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 979, + "startColumn": 21, + "charOffset": 26137, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 977, + "startColumn": 21, + "charOffset": 26027, + "charLength": 5, + "snippet": { + "text": "\tWheelSpellGrade_t grade = getNumber(L, 2);\n\tif (lua_gettop(L) == 2) {\n\t\tlua_pushnumber(L, spell->getWheelOfDestinyBoost(WheelSpellBoost_t::SECONDARY_GROUP_COOLDOWN, grade));\n\t} else {\n\t\tspell->setWheelOfDestinyBoost(WheelSpellBoost_t::SECONDARY_GROUP_COOLDOWN, grade, getNumber(L, 3));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af596bec6d91db57316dc181af3f134f044924dfd8b9dc10892f111bb770087f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 991, + "startColumn": 6, + "charOffset": 26592, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 989, + "startColumn": 6, + "charOffset": 26490, + "charLength": 1, + "snippet": { + "text": "\t// spell:increaseManaLeechWOD(grade, value)\n\tconst auto spell = getUserdataShared(L, 1);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f7e0665e6cab682f4059e1785a9ee607e1c4ab5aefc3fcfb4e737002770a813" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 992, + "startColumn": 3, + "charOffset": 26604, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 990, + "startColumn": 3, + "charOffset": 26535, + "charLength": 15, + "snippet": { + "text": "\tconst auto spell = getUserdataShared(L, 1);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd2a92ea0ec3266447938d85a245888dd33c1d37f2137561a093d00a3196de4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 999, + "startColumn": 21, + "charOffset": 26813, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 997, + "startColumn": 21, + "charOffset": 26703, + "charLength": 5, + "snippet": { + "text": "\tWheelSpellGrade_t grade = getNumber(L, 2);\n\tif (lua_gettop(L) == 2) {\n\t\tlua_pushnumber(L, spell->getWheelOfDestinyBoost(WheelSpellBoost_t::MANA_LEECH, grade));\n\t} else {\n\t\tint32_t value = getNumber(L, 3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4282fdf9887d017c9b5e29fbe781cbd59ebd30a4e59b74ac55fb583829db5a37" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 1003, + "startColumn": 79, + "charOffset": 27034, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 1001, + "startColumn": 79, + "charOffset": 26893, + "charLength": 3, + "snippet": { + "text": "\t\tint32_t value = getNumber(L, 3);\n\t\tif (value > 0) {\n\t\t\tspell->setWheelOfDestinyBoost(WheelSpellBoost_t::MANA_LEECH_CHANCE, grade, 100);\n\t\t} else {\n\t\t\tspell->setWheelOfDestinyBoost(WheelSpellBoost_t::MANA_LEECH_CHANCE, grade, 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0765af9da29069b7722efa564c7506f7dfe718b10b084b4736d18070625cff1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 1017, + "startColumn": 6, + "charOffset": 27465, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1015, + "startColumn": 6, + "charOffset": 27363, + "charLength": 1, + "snippet": { + "text": "\t// spell:increaselifeLeechWOD(grade, value)\n\tconst auto spell = getUserdataShared(L, 1);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0f639c227b9afcd0458eb9e17da6dde081325e81c49a9d61f1b946c20507181" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 1018, + "startColumn": 3, + "charOffset": 27477, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1016, + "startColumn": 3, + "charOffset": 27408, + "charLength": 15, + "snippet": { + "text": "\tconst auto spell = getUserdataShared(L, 1);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73e4d340d03be6456bbc04eb09892e0616b38cbd8c19301c436dd8ccd22e658b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 1025, + "startColumn": 21, + "charOffset": 27686, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 1023, + "startColumn": 21, + "charOffset": 27576, + "charLength": 5, + "snippet": { + "text": "\tWheelSpellGrade_t grade = getNumber(L, 2);\n\tif (lua_gettop(L) == 2) {\n\t\tlua_pushnumber(L, spell->getWheelOfDestinyBoost(WheelSpellBoost_t::LIFE_LEECH, grade));\n\t} else {\n\t\tint32_t value = getNumber(L, 3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0effc7d4e502088d9d5e1c71aa63af42b67aeaa06c265bbbc4ea056b7de25600" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 1029, + "startColumn": 79, + "charOffset": 27907, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 1027, + "startColumn": 79, + "charOffset": 27766, + "charLength": 3, + "snippet": { + "text": "\t\tint32_t value = getNumber(L, 3);\n\t\tif (value > 0) {\n\t\t\tspell->setWheelOfDestinyBoost(WheelSpellBoost_t::LIFE_LEECH_CHANCE, grade, 100);\n\t\t} else {\n\t\t\tspell->setWheelOfDestinyBoost(WheelSpellBoost_t::LIFE_LEECH_CHANCE, grade, 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "384d6558f9a1c40ca397afe3098f2e2a9d472d1625faf4f8f8a6278429eae740" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 1043, + "startColumn": 6, + "charOffset": 28332, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1041, + "startColumn": 6, + "charOffset": 28233, + "charLength": 1, + "snippet": { + "text": "\t// spell:increaseDamageWOD(grade, value)\n\tconst auto spell = getUserdataShared(L, 1);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9ef4f0aa5d842c1419034968da7978681ce005c5d58b2e36f27d1038039de6e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 1044, + "startColumn": 3, + "charOffset": 28344, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1042, + "startColumn": 3, + "charOffset": 28275, + "charLength": 15, + "snippet": { + "text": "\tconst auto spell = getUserdataShared(L, 1);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63097034ee456bd0e6227dbb007564288d8218284934ca81b473f3ee0f007c0a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 1051, + "startColumn": 21, + "charOffset": 28553, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 1049, + "startColumn": 21, + "charOffset": 28443, + "charLength": 5, + "snippet": { + "text": "\tWheelSpellGrade_t grade = getNumber(L, 2);\n\tif (lua_gettop(L) == 2) {\n\t\tlua_pushnumber(L, spell->getWheelOfDestinyBoost(WheelSpellBoost_t::DAMAGE, grade));\n\t} else {\n\t\tspell->setWheelOfDestinyBoost(WheelSpellBoost_t::DAMAGE, grade, getNumber(L, 3));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39450fc5350227d7dc727d7b0f909222bdedc88557075897e4667ff0bfb9273c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 1063, + "startColumn": 6, + "charOffset": 28984, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1061, + "startColumn": 6, + "charOffset": 28876, + "charLength": 1, + "snippet": { + "text": "\t// spell:increaseDamageReductionWOD(grade, value)\n\tconst auto spell = getUserdataShared(L, 1);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfd050febaf5d89fe6bcc24062220f3da721a20ec3722bf63c763fdf62a6f667" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 1064, + "startColumn": 3, + "charOffset": 28996, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1062, + "startColumn": 3, + "charOffset": 28927, + "charLength": 15, + "snippet": { + "text": "\tconst auto spell = getUserdataShared(L, 1);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b81464f91e589993a18d7d6c43c81796d44c292aa0f1b4fd0f9052e27f69a3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 1071, + "startColumn": 21, + "charOffset": 29205, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 1069, + "startColumn": 21, + "charOffset": 29095, + "charLength": 5, + "snippet": { + "text": "\tWheelSpellGrade_t grade = getNumber(L, 2);\n\tif (lua_gettop(L) == 2) {\n\t\tlua_pushnumber(L, spell->getWheelOfDestinyBoost(WheelSpellBoost_t::DAMAGE_REDUCTION, grade));\n\t} else {\n\t\tspell->setWheelOfDestinyBoost(WheelSpellBoost_t::DAMAGE_REDUCTION, grade, getNumber(L, 3));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71917ca45c37dfd4aeaa1ce46f1bda5c07f9495d9870e270541263c15ae48a88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 1083, + "startColumn": 6, + "charOffset": 29634, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1081, + "startColumn": 6, + "charOffset": 29537, + "charLength": 1, + "snippet": { + "text": "\t// spell:increaseHealWOD(grade, value)\n\tconst auto spell = getUserdataShared(L, 1);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c334fd5261b6cc91c4060bfe8c6d6ef5098fa28c6c31b7fca05d5efc10b09ab0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 1084, + "startColumn": 3, + "charOffset": 29646, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1082, + "startColumn": 3, + "charOffset": 29577, + "charLength": 15, + "snippet": { + "text": "\tconst auto spell = getUserdataShared(L, 1);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9d0d0441da72991ffee04c57118e52eef8944e14daaed723afeabdcea63f7bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 1091, + "startColumn": 21, + "charOffset": 29855, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 1089, + "startColumn": 21, + "charOffset": 29745, + "charLength": 5, + "snippet": { + "text": "\tWheelSpellGrade_t grade = getNumber(L, 2);\n\tif (lua_gettop(L) == 2) {\n\t\tlua_pushnumber(L, spell->getWheelOfDestinyBoost(WheelSpellBoost_t::HEAL, grade));\n\t} else {\n\t\tspell->setWheelOfDestinyBoost(WheelSpellBoost_t::HEAL, grade, getNumber(L, 3));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af002ec8e832692ac785b0460c8229e513c80c428a4ec551e9aaf106a8cc845c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 1103, + "startColumn": 6, + "charOffset": 30280, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1101, + "startColumn": 6, + "charOffset": 30173, + "charLength": 1, + "snippet": { + "text": "\t// spell:increaseCriticalDamageWOD(grade, value)\n\tconst auto spell = getUserdataShared(L, 1);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00aa09c204843b2b589b39068fed6852dc2382a2e9b275aa087e7148529d66bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 1104, + "startColumn": 3, + "charOffset": 30292, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1102, + "startColumn": 3, + "charOffset": 30223, + "charLength": 15, + "snippet": { + "text": "\tconst auto spell = getUserdataShared(L, 1);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1af0d6d0f33ff2dff4332f03703ad7301d2c12df845b7b988f999107f8c6649a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 1111, + "startColumn": 21, + "charOffset": 30501, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 1109, + "startColumn": 21, + "charOffset": 30391, + "charLength": 5, + "snippet": { + "text": "\tWheelSpellGrade_t grade = getNumber(L, 2);\n\tif (lua_gettop(L) == 2) {\n\t\tlua_pushnumber(L, spell->getWheelOfDestinyBoost(WheelSpellBoost_t::CRITICAL_DAMAGE, grade));\n\t} else {\n\t\tspell->setWheelOfDestinyBoost(WheelSpellBoost_t::CRITICAL_DAMAGE, grade, getNumber(L, 3));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6a27e5846d57101ac77ee60d934c58dd3a23584ac179d24e3573ec0e5f9a17a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 1123, + "startColumn": 6, + "charOffset": 30948, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1121, + "startColumn": 6, + "charOffset": 30841, + "charLength": 1, + "snippet": { + "text": "\t// spell:increaseCriticalChanceWOD(grade, value)\n\tconst auto spell = getUserdataShared(L, 1);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5ace14153ff2f27915d5339973ded3e733af407a32de8021f1711667445b85e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 1124, + "startColumn": 3, + "charOffset": 30960, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1122, + "startColumn": 3, + "charOffset": 30891, + "charLength": 15, + "snippet": { + "text": "\tconst auto spell = getUserdataShared(L, 1);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea1aa5f16a6faa534d725a9822901cfe5fb437ffbace96a18205c26ded9172d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/spell_functions.cpp" + }, + "region": { + "startLine": 1131, + "startColumn": 21, + "charOffset": 31169, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 1129, + "startColumn": 21, + "charOffset": 31059, + "charLength": 5, + "snippet": { + "text": "\tWheelSpellGrade_t grade = getNumber(L, 2);\n\tif (lua_gettop(L) == 2) {\n\t\tlua_pushnumber(L, spell->getWheelOfDestinyBoost(WheelSpellBoost_t::CRITICAL_CHANCE, grade));\n\t} else {\n\t\tspell->setWheelOfDestinyBoost(WheelSpellBoost_t::CRITICAL_CHANCE, grade, getNumber(L, 3));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a40b0a79a034d4a3e0fd9fde5c27428aef161e2edb9fddbca972958bf8065fb0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/variant_functions.cpp" + }, + "region": { + "startLine": 19, + "startColumn": 2, + "charOffset": 652, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 17, + "startColumn": 2, + "charOffset": 579, + "charLength": 2, + "snippet": { + "text": "\t// Variant(number or string or position or thing)\n\tLuaVariant variant;\n\tif (isUserdata(L, 2)) {\n\t\tif (std::shared_ptr thing = getThing(L, 2)) {\n\t\t\tvariant.type = VARIANT_TARGETPOSITION;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2ef94b5c2b9722a062aa6e086061bab45d7d1b84c46537c96dcf0248ec9a870" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/variant_functions.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 21, + "charOffset": 1352, + "charLength": 7, + "snippet": { + "text": "variant" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 21, + "charOffset": 1246, + "charLength": 7, + "snippet": { + "text": "\tconst LuaVariant &variant = getVariant(L, 1);\n\tif (variant.type == VARIANT_NUMBER) {\n\t\tlua_pushnumber(L, variant.number);\n\t} else {\n\t\tlua_pushnumber(L, 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27043b77eb8f2bf7a621ad8f6d3659e7ae4338e9cd0c2e322be4cbc8e3a7245c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/combat/variant_functions.cpp" + }, + "region": { + "startLine": 44, + "startColumn": 21, + "charOffset": 1399, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 42, + "startColumn": 21, + "charOffset": 1332, + "charLength": 1, + "snippet": { + "text": "\t\tlua_pushnumber(L, variant.number);\n\t} else {\n\t\tlua_pushnumber(L, 0);\n\t}\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4fe0304d68f24a4bc0c9ad0f98b5198b3840f45bf5af5bfdea057a1e06971c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 47, + "startColumn": 6, + "charOffset": 1441, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 45, + "startColumn": 6, + "charOffset": 1334, + "charLength": 1, + "snippet": { + "text": "\t// creature:getEvents(type)\n\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64406009bf8d87c1f3780febb78b04f69656cce49826ac4d1c0f3e7e9401f82a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 57, + "startColumn": 2, + "charOffset": 1701, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 55, + "startColumn": 2, + "charOffset": 1683, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (const auto &eventPtr : eventList) {\n\t\tpushString(L, eventPtr->getName());\n\t\tlua_rawseti(L, -2, ++index);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e57358c8510f4dd709f48eedc5dfd5f3b8c134bce77024ade2933102041848a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 154, + "startColumn": 6, + "charOffset": 4314, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 6, + "charOffset": 4211, + "charLength": 1, + "snippet": { + "text": "\t// creature:getParent()\n\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6dbf20bd0c06a9ae7ce49e08656328d8f686671c39b8c8e84a1b2e45fdccce9c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 160, + "startColumn": 6, + "charOffset": 4425, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 6, + "charOffset": 4360, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr parent = creature->getParent();\n\tif (!parent) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e70c77b2c15fba87eb33fdf1a5f34720b08af69e77a5b498c1508cc82a755dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 173, + "startColumn": 21, + "charOffset": 4697, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 171, + "startColumn": 21, + "charOffset": 4587, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (creature) {\n\t\tlua_pushnumber(L, creature->getID());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a2b46e13aa12305f7feda1a7f7e22b6e78a19735d1160f7d6f56ab970add09d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 205, + "startColumn": 6, + "charOffset": 5445, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 203, + "startColumn": 6, + "charOffset": 5342, + "charLength": 1, + "snippet": { + "text": "\t// creature:getTarget()\n\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd7d856b5c9bb9db144f29c149809a3605d215f9cc199736715db2290cc5cd28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 235, + "startColumn": 6, + "charOffset": 6215, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 233, + "startColumn": 6, + "charOffset": 6104, + "charLength": 1, + "snippet": { + "text": "\t// creature:getFollowCreature()\n\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b55dfa4ce5b8b01efccee396d63e719fd7dac3d309a0a92d1ce3002d7cf7775" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 265, + "startColumn": 6, + "charOffset": 7039, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 263, + "startColumn": 6, + "charOffset": 6936, + "charLength": 1, + "snippet": { + "text": "\t// creature:getMaster()\n\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbb18a5402f1643e7fe3a1c99fd2b5d01080b7e6a6e0396ca0d2183577a7e114" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 271, + "startColumn": 6, + "charOffset": 7150, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 269, + "startColumn": 6, + "charOffset": 7085, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr master = creature->getMaster();\n\tif (!master) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dae62cb224ef8b91f4861dea6ba04631711172bd49dfb76cfac028c7954fc61e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 284, + "startColumn": 6, + "charOffset": 7440, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 282, + "startColumn": 6, + "charOffset": 7340, + "charLength": 1, + "snippet": { + "text": "\t// creature:reload()\n\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46e5a1cb85f7b9a0bc22e1750ab36be7ebdaba900e02cd3b78f7bf56a0e2889c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 297, + "startColumn": 6, + "charOffset": 7729, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 295, + "startColumn": 6, + "charOffset": 7620, + "charLength": 1, + "snippet": { + "text": "\t// creature:setMaster(master)\n\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd00e6c7e0d9b786f58d59fddfa0e9f01b430225102849596707d6fdef0d2cf5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 304, + "startColumn": 2, + "charOffset": 7882, + "charLength": 17, + "snippet": { + "text": "CreatureFunctions" + } + }, + "contextRegion": { + "startLine": 302, + "startColumn": 2, + "charOffset": 7776, + "charLength": 17, + "snippet": { + "text": "\tpushBoolean(L, creature->setMaster(getCreature(L, 2), true));\n\t// Reloading creature icon/knownCreature\n\tCreatureFunctions::luaCreatureReload(L);\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96e60a0c7fce719f7050b93c100de8da7a8c86c4f8ae1eaff933be2c7a4c4ef8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 311, + "startColumn": 6, + "charOffset": 8098, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 309, + "startColumn": 6, + "charOffset": 7996, + "charLength": 1, + "snippet": { + "text": "\t// creature:getLight()\n\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d02efd2ba8a0f79f1775b49c703a9d58929b8eb15637bf19c97e91a446a4e229" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 317, + "startColumn": 20, + "charOffset": 8217, + "charLength": 9, + "snippet": { + "text": "lightInfo" + } + }, + "contextRegion": { + "startLine": 315, + "startColumn": 20, + "charOffset": 8144, + "charLength": 9, + "snippet": { + "text": "\n\tLightInfo lightInfo = creature->getCreatureLight();\n\tlua_pushnumber(L, lightInfo.level);\n\tlua_pushnumber(L, lightInfo.color);\n\treturn 2;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30cf1073e1623178c0cbc2bf3033c63c22f15c29ce1ea64c922a5854c8247171" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 318, + "startColumn": 20, + "charOffset": 8254, + "charLength": 9, + "snippet": { + "text": "lightInfo" + } + }, + "contextRegion": { + "startLine": 316, + "startColumn": 20, + "charOffset": 8145, + "charLength": 9, + "snippet": { + "text": "\tLightInfo lightInfo = creature->getCreatureLight();\n\tlua_pushnumber(L, lightInfo.level);\n\tlua_pushnumber(L, lightInfo.color);\n\treturn 2;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "807bd0158fb8af067e67ce2ba2d72268dc4b9b0fa5b5262357a135d72a831ac0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 325, + "startColumn": 6, + "charOffset": 8459, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 323, + "startColumn": 6, + "charOffset": 8345, + "charLength": 1, + "snippet": { + "text": "\t// creature:setLight(color, level)\n\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "602e3a97de7808c7558a909333157cdba92b8a3ae1b0feeb6d86d79183bda793" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 343, + "startColumn": 21, + "charOffset": 8905, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 341, + "startColumn": 21, + "charOffset": 8795, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (creature) {\n\t\tlua_pushnumber(L, creature->getSpeed());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16136b372f3d9451df898b7041534fd38daca78a1bcc1684099ff2732bcd36bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 353, + "startColumn": 6, + "charOffset": 9123, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 351, + "startColumn": 6, + "charOffset": 9032, + "charLength": 1, + "snippet": { + "text": "\t// creature:setSpeed(speed)\n\tstd::shared_ptr creature = getCreature(L, 1);\n\tif (!creature) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5e07b1d68917620ba2519c78cec970aeea730d65211e35c3e815aa81f7de2ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 354, + "startColumn": 3, + "charOffset": 9138, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 352, + "startColumn": 3, + "charOffset": 9061, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr creature = getCreature(L, 1);\n\tif (!creature) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f734db285213aa08675e3d515b76ce581ba6deef4ef1de0a7b746f28fe47d07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 369, + "startColumn": 21, + "charOffset": 9566, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 367, + "startColumn": 21, + "charOffset": 9456, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (creature) {\n\t\tlua_pushnumber(L, creature->getBaseSpeed());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d348de3cf3bb221dc0fc388a00f9a0efb32835de57455a5326e11db884f61134" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 379, + "startColumn": 6, + "charOffset": 9794, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 377, + "startColumn": 6, + "charOffset": 9700, + "charLength": 1, + "snippet": { + "text": "\t// creature:changeSpeed(delta)\n\tstd::shared_ptr creature = getCreature(L, 1);\n\tif (!creature) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33ca86751a61eb0afb55627e4f1a06070a1794f53479eacbff64de119063b290" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 380, + "startColumn": 3, + "charOffset": 9809, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 378, + "startColumn": 3, + "charOffset": 9732, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr creature = getCreature(L, 1);\n\tif (!creature) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6c79e024be4be697f41a4d796566880779f652a8b5767a90eaf2dfff8a74572" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 429, + "startColumn": 6, + "charOffset": 11058, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 427, + "startColumn": 6, + "charOffset": 10957, + "charLength": 1, + "snippet": { + "text": "\t// creature:getTile()\n\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa4773be5cc370a4bf980bb845dc04595d5fc32615aa366d2cb9be3b256ee816" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 448, + "startColumn": 21, + "charOffset": 11477, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 446, + "startColumn": 21, + "charOffset": 11367, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (creature) {\n\t\tlua_pushnumber(L, creature->getDirection());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2c8a80ab6c47765af00aacbd0fd0708c7213c646d2fc623004281ab73b585f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 470, + "startColumn": 21, + "charOffset": 12066, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 468, + "startColumn": 21, + "charOffset": 11956, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (creature) {\n\t\tlua_pushnumber(L, creature->getHealth());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4ec1919922117667f33fb5e8ecdb84fd77a3ecbc65d56cbd8aca244132af92d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 480, + "startColumn": 6, + "charOffset": 12304, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 478, + "startColumn": 6, + "charOffset": 12195, + "charLength": 1, + "snippet": { + "text": "\t// creature:setHealth(health)\n\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46e5a1cb85f7b9a0bc22e1750ab36be7ebdaba900e02cd3b78f7bf56a0e2889c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 485, + "startColumn": 39, + "charOffset": 12389, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 483, + "startColumn": 39, + "charOffset": 12347, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tcreature->health = std::min(getNumber(L, 2), creature->healthMax);\n\tg_game().addCreatureHealth(creature);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f44db6abfd6de6896456dfa99dd94c434e9a74d5bc70fc5c6d5116f9ef4b7326" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 499, + "startColumn": 6, + "charOffset": 12800, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 497, + "startColumn": 6, + "charOffset": 12673, + "charLength": 1, + "snippet": { + "text": "\t// creature:addHealth(healthChange, combatType)\n\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0096797006f827f85c895adf5cde584cd02e4c36d9534b5048b18e8f836802bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 521, + "startColumn": 21, + "charOffset": 13437, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 519, + "startColumn": 21, + "charOffset": 13327, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (creature) {\n\t\tlua_pushnumber(L, creature->getMaxHealth());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20d646d950ef9050fa744725d47a1152113c54f8cbaf1988a4c497667875dd55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 531, + "startColumn": 6, + "charOffset": 13687, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 529, + "startColumn": 6, + "charOffset": 13572, + "charLength": 1, + "snippet": { + "text": "\t// creature:setMaxHealth(maxHealth)\n\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fd77e02cdbaadf82b5192f8b30f839b1ac1f6b8f93a8430ad31e5378edca269" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 536, + "startColumn": 24, + "charOffset": 13757, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 534, + "startColumn": 24, + "charOffset": 13730, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tcreature->healthMax = getNumber(L, 2);\n\tcreature->health = std::min(creature->health, creature->healthMax);\n\tg_game().addCreatureHealth(creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ce821304ffe84b1040f67b3a42315cfeaff272320f578f2bbd154b4032d4301" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 611, + "startColumn": 21, + "charOffset": 15766, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 609, + "startColumn": 21, + "charOffset": 15656, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (creature) {\n\t\tlua_pushnumber(L, creature->getSkull());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "993ebe167c0f459283f08a8c6a456be834ff72df48831b226a06f1c88a86e612" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 663, + "startColumn": 6, + "charOffset": 17364, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 661, + "startColumn": 6, + "charOffset": 17196, + "charLength": 1, + "snippet": { + "text": "\t// creature:getCondition(conditionType[, conditionId = CONDITIONID_COMBAT[, subId = 0]])\n\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e26ae670c3f8cbc0b333a71f6c356eb45a1eac32b2b99600f2211ebb2ceb336" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 669, + "startColumn": 2, + "charOffset": 17479, + "charLength": 13, + "snippet": { + "text": "ConditionId_t" + } + }, + "contextRegion": { + "startLine": 667, + "startColumn": 2, + "charOffset": 17410, + "charLength": 13, + "snippet": { + "text": "\n\tConditionType_t conditionType = getNumber(L, 2);\n\tConditionId_t conditionId = getNumber(L, 3, CONDITIONID_COMBAT);\n\tuint32_t subId = getNumber(L, 4, 0);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe0b47a98f0ce6661a81734e595ec4fe4b7b281084bbd6ace175a5f2a546a775" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 670, + "startColumn": 2, + "charOffset": 17560, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 668, + "startColumn": 2, + "charOffset": 17411, + "charLength": 8, + "snippet": { + "text": "\tConditionType_t conditionType = getNumber(L, 2);\n\tConditionId_t conditionId = getNumber(L, 3, CONDITIONID_COMBAT);\n\tuint32_t subId = getNumber(L, 4, 0);\n\n\tconst std::shared_ptr condition = creature->getCondition(conditionType, conditionId, subId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "91cf0ec48e2bb67f8c32c8794db13b8dc5616b884caa3877dd13d50737699837" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 697, + "startColumn": 6, + "charOffset": 18503, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 695, + "startColumn": 6, + "charOffset": 18315, + "charLength": 1, + "snippet": { + "text": "\t// creature:removeCondition(conditionType[, conditionId = CONDITIONID_COMBAT[, subId = 0[, force = false]]])\n\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b55dfa4ce5b8b01efccee396d63e719fd7dac3d309a0a92d1ce3002d7cf7775" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 703, + "startColumn": 2, + "charOffset": 18618, + "charLength": 13, + "snippet": { + "text": "ConditionId_t" + } + }, + "contextRegion": { + "startLine": 701, + "startColumn": 2, + "charOffset": 18549, + "charLength": 13, + "snippet": { + "text": "\n\tConditionType_t conditionType = getNumber(L, 2);\n\tConditionId_t conditionId = getNumber(L, 3, CONDITIONID_COMBAT);\n\tuint32_t subId = getNumber(L, 4, 0);\n\tconst std::shared_ptr condition = creature->getCondition(conditionType, conditionId, subId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8659e1e24143793a8c6acfd6f8bff49d97872b108a01c582812c1d01db7e218" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 704, + "startColumn": 2, + "charOffset": 18699, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 702, + "startColumn": 2, + "charOffset": 18550, + "charLength": 8, + "snippet": { + "text": "\tConditionType_t conditionType = getNumber(L, 2);\n\tConditionId_t conditionId = getNumber(L, 3, CONDITIONID_COMBAT);\n\tuint32_t subId = getNumber(L, 4, 0);\n\tconst std::shared_ptr condition = creature->getCondition(conditionType, conditionId, subId);\n\tif (condition) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac96d77e8d35ceef06889f7fc3a2649234e52aa7c04a32e2e0e89170164bbaf9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 707, + "startColumn": 30, + "charOffset": 18898, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 705, + "startColumn": 30, + "charOffset": 18746, + "charLength": 1, + "snippet": { + "text": "\tconst std::shared_ptr condition = creature->getCondition(conditionType, conditionId, subId);\n\tif (condition) {\n\t\tbool force = getBoolean(L, 5, false);\n\t\tif (subId == 0) {\n\t\t\tcreature->removeCondition(conditionType, conditionId, force);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45d0e5998125d26c0f0edbbb13ab7a7e831aaf5d3fec5b70a990e8e316b48423" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 723, + "startColumn": 6, + "charOffset": 19314, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 721, + "startColumn": 6, + "charOffset": 19182, + "charLength": 1, + "snippet": { + "text": "\t// creature:hasCondition(conditionType[, subId = 0])\n\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b8a72460fe54b05c6062ecacd58d6b7c5b9f4c30deb866df3ce26af31661f18" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 729, + "startColumn": 2, + "charOffset": 19429, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 727, + "startColumn": 2, + "charOffset": 19360, + "charLength": 8, + "snippet": { + "text": "\n\tConditionType_t conditionType = getNumber(L, 2);\n\tuint32_t subId = getNumber(L, 3, 0);\n\tpushBoolean(L, creature->hasCondition(conditionType, subId));\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "18c07bf49e5fd3726d5c7f385e72afef320a8f86956d62389a8d987fca0f2c70" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 737, + "startColumn": 6, + "charOffset": 19740, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 735, + "startColumn": 6, + "charOffset": 19612, + "charLength": 1, + "snippet": { + "text": "\t// creature:isImmune(condition or conditionType)\n\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9953f8be2a8dc794b2c190805f81847f069123494ffc071ad564b2d1d898966" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 755, + "startColumn": 6, + "charOffset": 20233, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 753, + "startColumn": 6, + "charOffset": 20111, + "charLength": 1, + "snippet": { + "text": "\t// creature:remove([forced = true])\n\tstd::shared_ptr* creaturePtr = getRawUserDataShared(L, 1);\n\tif (!creaturePtr) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ca040c88e68c9d0d0094eaa188de7d432eb951e3c6d51c79812ae986ac9c604" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'std::shared_ptr *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 755, + "startColumn": 7, + "charOffset": 20234, + "charLength": 11, + "snippet": { + "text": "creaturePtr" + } + }, + "contextRegion": { + "startLine": 753, + "startColumn": 7, + "charOffset": 20111, + "charLength": 11, + "snippet": { + "text": "\t// creature:remove([forced = true])\n\tstd::shared_ptr* creaturePtr = getRawUserDataShared(L, 1);\n\tif (!creaturePtr) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b254b31a3dce240f5713dc6d1374fc1d93e18fffb8751415101efa1765465410" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 761, + "startColumn": 6, + "charOffset": 20340, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 759, + "startColumn": 6, + "charOffset": 20282, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr creature = *creaturePtr;\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74a4864f332639f9bc23f99e603131827c202a67b59ee6c5548d8af2d5df9fc9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 774, + "startColumn": 12, + "charOffset": 20610, + "charLength": 14, + "snippet": { + "text": "removeCreature" + } + }, + "contextRegion": { + "startLine": 772, + "startColumn": 12, + "charOffset": 20585, + "charLength": 14, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\tg_game().removeCreature(creature);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb28075af4c193384f297b55070be58926fc03cfb7af21c7a53a4b99e1403cdc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 789, + "startColumn": 3, + "charOffset": 21018, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 787, + "startColumn": 3, + "charOffset": 20915, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (creature == nullptr) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef515a7074ecfaaca085f305133e19163843cc8fa8a2ba3744b2214823de5a02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 803, + "startColumn": 3, + "charOffset": 21525, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 801, + "startColumn": 3, + "charOffset": 21500, + "charLength": 2, + "snippet": { + "text": "\n\tif (!pushMovement) {\n\t\tif (oldPosition.x == position.x) {\n\t\t\tif (oldPosition.y < position.y) {\n\t\t\t\tg_game().internalCreatureTurn(creature, DIRECTION_SOUTH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9ef1d9a7d0dd790cf1e4c59dee0def02fde411e77991214f1b8b232dd5635c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 805, + "startColumn": 14, + "charOffset": 21610, + "charLength": 20, + "snippet": { + "text": "internalCreatureTurn" + } + }, + "contextRegion": { + "startLine": 803, + "startColumn": 14, + "charOffset": 21523, + "charLength": 20, + "snippet": { + "text": "\t\tif (oldPosition.x == position.x) {\n\t\t\tif (oldPosition.y < position.y) {\n\t\t\t\tg_game().internalCreatureTurn(creature, DIRECTION_SOUTH);\n\t\t\t} else {\n\t\t\t\tg_game().internalCreatureTurn(creature, DIRECTION_NORTH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e79500abddf33895a1dbbeeff918bec112a43ee5e0058351d3b2693e5d256a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 807, + "startColumn": 14, + "charOffset": 21684, + "charLength": 20, + "snippet": { + "text": "internalCreatureTurn" + } + }, + "contextRegion": { + "startLine": 805, + "startColumn": 14, + "charOffset": 21597, + "charLength": 20, + "snippet": { + "text": "\t\t\t\tg_game().internalCreatureTurn(creature, DIRECTION_SOUTH);\n\t\t\t} else {\n\t\t\t\tg_game().internalCreatureTurn(creature, DIRECTION_NORTH);\n\t\t\t}\n\t\t} else if (oldPosition.x > position.x) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95ef976db391d859c65edfd99eeef95587bf0752aa4ae9a9e3d34432958a091b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 810, + "startColumn": 13, + "charOffset": 21793, + "charLength": 20, + "snippet": { + "text": "internalCreatureTurn" + } + }, + "contextRegion": { + "startLine": 808, + "startColumn": 13, + "charOffset": 21733, + "charLength": 20, + "snippet": { + "text": "\t\t\t}\n\t\t} else if (oldPosition.x > position.x) {\n\t\t\tg_game().internalCreatureTurn(creature, DIRECTION_WEST);\n\t\t} else if (oldPosition.x < position.x) {\n\t\t\tg_game().internalCreatureTurn(creature, DIRECTION_EAST);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afe0d4682875febe9525142958bba4a4082badb66525278125a7874585571b3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 812, + "startColumn": 13, + "charOffset": 21896, + "charLength": 20, + "snippet": { + "text": "internalCreatureTurn" + } + }, + "contextRegion": { + "startLine": 810, + "startColumn": 13, + "charOffset": 21781, + "charLength": 20, + "snippet": { + "text": "\t\t\tg_game().internalCreatureTurn(creature, DIRECTION_WEST);\n\t\t} else if (oldPosition.x < position.x) {\n\t\t\tg_game().internalCreatureTurn(creature, DIRECTION_EAST);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3367b8e6f23d3302986868a9a358ad00fa7462238957430110c0a207cf0c4d54" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 824, + "startColumn": 20, + "charOffset": 22218, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 822, + "startColumn": 20, + "charOffset": 22178, + "charLength": 1, + "snippet": { + "text": "\n\tPosition position;\n\tif (parameters >= 6) {\n\t\tposition = getPosition(L, 6);\n\t\tif (!position.x || !position.y) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf05c0c144bd2faf500989f3ef7bdb65c00bd1e5917f99b57182d7dd96b7110c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 825, + "startColumn": 29, + "charOffset": 22251, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 823, + "startColumn": 29, + "charOffset": 22179, + "charLength": 1, + "snippet": { + "text": "\tPosition position;\n\tif (parameters >= 6) {\n\t\tposition = getPosition(L, 6);\n\t\tif (!position.x || !position.y) {\n\t\t\treportErrorFunc(\"Invalid position specified.\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94d3eaed936be4d2cd00a5c2984f5e71976c8f923edd0ae676b18562623de14d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 826, + "startColumn": 7, + "charOffset": 22261, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 824, + "startColumn": 7, + "charOffset": 22199, + "charLength": 1, + "snippet": { + "text": "\tif (parameters >= 6) {\n\t\tposition = getPosition(L, 6);\n\t\tif (!position.x || !position.y) {\n\t\t\treportErrorFunc(\"Invalid position specified.\");\n\t\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "797c3bc6a105cde4fbd90c88d6406985357d32baa539d48fbf12bdafb3963e72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint16_t' (aka 'unsigned short') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 826, + "startColumn": 8, + "charOffset": 22262, + "charLength": 8, + "snippet": { + "text": "position" + } + }, + "contextRegion": { + "startLine": 824, + "startColumn": 8, + "charOffset": 22199, + "charLength": 8, + "snippet": { + "text": "\tif (parameters >= 6) {\n\t\tposition = getPosition(L, 6);\n\t\tif (!position.x || !position.y) {\n\t\t\treportErrorFunc(\"Invalid position specified.\");\n\t\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a942ec5b6bdb66127a9151b5c7b85a1ba7ae181f3065687a4bb8963b45614ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 826, + "startColumn": 22, + "charOffset": 22276, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 824, + "startColumn": 22, + "charOffset": 22199, + "charLength": 1, + "snippet": { + "text": "\tif (parameters >= 6) {\n\t\tposition = getPosition(L, 6);\n\t\tif (!position.x || !position.y) {\n\t\t\treportErrorFunc(\"Invalid position specified.\");\n\t\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40e6b2245532b2c9fb83b420f089efb91825ec159e3589762dc8a2db33bb8aaf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint16_t' (aka 'unsigned short') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 826, + "startColumn": 23, + "charOffset": 22277, + "charLength": 8, + "snippet": { + "text": "position" + } + }, + "contextRegion": { + "startLine": 824, + "startColumn": 23, + "charOffset": 22199, + "charLength": 8, + "snippet": { + "text": "\tif (parameters >= 6) {\n\t\tposition = getPosition(L, 6);\n\t\tif (!position.x || !position.y) {\n\t\t\treportErrorFunc(\"Invalid position specified.\");\n\t\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d254e07037baadce98e0ac84036e7ab8133445d8e5bd92cf8b41528dc60c9724" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 827, + "startColumn": 4, + "charOffset": 22294, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 825, + "startColumn": 4, + "charOffset": 22223, + "charLength": 15, + "snippet": { + "text": "\t\tposition = getPosition(L, 6);\n\t\tif (!position.x || !position.y) {\n\t\t\treportErrorFunc(\"Invalid position specified.\");\n\t\t\tpushBoolean(L, false);\n\t\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33bca8646edcd4ce577c477fb9d9a9ff5562823b0a2a7e52da8e0ee599491473" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 834, + "startColumn": 20, + "charOffset": 22453, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 832, + "startColumn": 20, + "charOffset": 22388, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr target = nullptr;\n\tif (parameters >= 5) {\n\t\ttarget = getCreature(L, 5);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88ea1166faad704308ee68b7eb5161481d551b0e06faf4684cc8d84c27e9bdc3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 835, + "startColumn": 27, + "charOffset": 22484, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 833, + "startColumn": 27, + "charOffset": 22389, + "charLength": 1, + "snippet": { + "text": "\tstd::shared_ptr target = nullptr;\n\tif (parameters >= 5) {\n\t\ttarget = getCreature(L, 5);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f64d8ba8f846013c36ba173aceae6f6f2daa90d71ba91712d033dc18e17b168" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 840, + "startColumn": 2, + "charOffset": 22533, + "charLength": 12, + "snippet": { + "text": "SpeakClasses" + } + }, + "contextRegion": { + "startLine": 838, + "startColumn": 2, + "charOffset": 22492, + "charLength": 12, + "snippet": { + "text": "\tbool ghost = getBoolean(L, 4, false);\n\n\tSpeakClasses type = getNumber(L, 3, TALKTYPE_MONSTER_SAY);\n\tconst std::string &text = getString(L, 2);\n\tstd::shared_ptr creature = getUserdataShared(L, 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef2567a50a0cda78e61b7f96064046c404a3481ccfbc69fd05d30df6dff1cfb6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 843, + "startColumn": 6, + "charOffset": 22728, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 841, + "startColumn": 6, + "charOffset": 22606, + "charLength": 1, + "snippet": { + "text": "\tconst std::string &text = getString(L, 2);\n\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24a281c6d664cd0b968057f667330d31d6123c939e29ec32635f07c077f341a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 850, + "startColumn": 14, + "charOffset": 22827, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 848, + "startColumn": 14, + "charOffset": 22775, + "charLength": 6, + "snippet": { + "text": "\tSpectators spectators;\n\tif (target) {\n\t\tspectators.insert(target);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d16f954571077c7bfc676a620b79f4763b31dc698d8fd41cf736ce04884b3864" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 864, + "startColumn": 6, + "charOffset": 23258, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 862, + "startColumn": 6, + "charOffset": 23152, + "charLength": 1, + "snippet": { + "text": "\t// creature:getDamageMap()\n\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6dbf20bd0c06a9ae7ce49e08656328d8f686671c39b8c8e84a1b2e45fdccce9c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 869, + "startColumn": 21, + "charOffset": 23325, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 867, + "startColumn": 21, + "charOffset": 23301, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tlua_createtable(L, creature->damageMap.size(), 0);\n\tfor (auto damageEntry : creature->damageMap) {\n\t\tlua_createtable(L, 0, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb646dc9a5f3f3517695f30a4d7438c04c5b830b13f480228db605d54eccd3b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 869, + "startColumn": 21, + "charOffset": 23325, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 867, + "startColumn": 21, + "charOffset": 23301, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tlua_createtable(L, creature->damageMap.size(), 0);\n\tfor (auto damageEntry : creature->damageMap) {\n\t\tlua_createtable(L, 0, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41cd55660383cb02e69ec0146d365f61ae26377e4fa548a7c625b0cedfe1a876" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 870, + "startColumn": 2, + "charOffset": 23358, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 868, + "startColumn": 2, + "charOffset": 23304, + "charLength": 3, + "snippet": { + "text": "\n\tlua_createtable(L, creature->damageMap.size(), 0);\n\tfor (auto damageEntry : creature->damageMap) {\n\t\tlua_createtable(L, 0, 2);\n\t\tsetField(L, \"total\", damageEntry.second.total);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed9f3a5882d6d72e31f6f0fba6e580ff949de878e111be6859008f4532e7901d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 872, + "startColumn": 24, + "charOffset": 23456, + "charLength": 11, + "snippet": { + "text": "damageEntry" + } + }, + "contextRegion": { + "startLine": 870, + "startColumn": 24, + "charOffset": 23357, + "charLength": 11, + "snippet": { + "text": "\tfor (auto damageEntry : creature->damageMap) {\n\t\tlua_createtable(L, 0, 2);\n\t\tsetField(L, \"total\", damageEntry.second.total);\n\t\tsetField(L, \"ticks\", damageEntry.second.ticks);\n\t\tlua_rawseti(L, -2, damageEntry.first);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44843adbb556a1024018798baf145fcca6a130fb88b3327c9a2a80d9e759abdd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int64_t' (aka 'long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 873, + "startColumn": 24, + "charOffset": 23506, + "charLength": 11, + "snippet": { + "text": "damageEntry" + } + }, + "contextRegion": { + "startLine": 871, + "startColumn": 24, + "charOffset": 23405, + "charLength": 11, + "snippet": { + "text": "\t\tlua_createtable(L, 0, 2);\n\t\tsetField(L, \"total\", damageEntry.second.total);\n\t\tsetField(L, \"ticks\", damageEntry.second.ticks);\n\t\tlua_rawseti(L, -2, damageEntry.first);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0481818a94de0866a8e5526b2c2ef41410363c97959767d249c85a160a15de69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 873, + "startColumn": 24, + "charOffset": 23506, + "charLength": 11, + "snippet": { + "text": "damageEntry" + } + }, + "contextRegion": { + "startLine": 871, + "startColumn": 24, + "charOffset": 23405, + "charLength": 11, + "snippet": { + "text": "\t\tlua_createtable(L, 0, 2);\n\t\tsetField(L, \"total\", damageEntry.second.total);\n\t\tsetField(L, \"ticks\", damageEntry.second.ticks);\n\t\tlua_rawseti(L, -2, damageEntry.first);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d4127f5a5bf281f739eca67b59645488302f7d1bf47191e49ebf442b3a4e7b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 874, + "startColumn": 22, + "charOffset": 23554, + "charLength": 11, + "snippet": { + "text": "damageEntry" + } + }, + "contextRegion": { + "startLine": 872, + "startColumn": 22, + "charOffset": 23433, + "charLength": 11, + "snippet": { + "text": "\t\tsetField(L, \"total\", damageEntry.second.total);\n\t\tsetField(L, \"ticks\", damageEntry.second.ticks);\n\t\tlua_rawseti(L, -2, damageEntry.first);\n\t}\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d04e2c2178c61ebe4608f1b69177e8d7a3c23dbe995c5511318caaaae5917810" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 882, + "startColumn": 6, + "charOffset": 23756, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 880, + "startColumn": 6, + "charOffset": 23652, + "charLength": 1, + "snippet": { + "text": "\t// creature:getSummons()\n\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b884b548968e8dfc6eb616345fdbb4dce722cbce382ac1c5bed40cfe423cbece" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 887, + "startColumn": 21, + "charOffset": 23823, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 885, + "startColumn": 21, + "charOffset": 23799, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tlua_createtable(L, creature->getSummonCount(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2531c755872f3737583b9b0911af51ecb805e6d029086b5ee193770ca0d11e3a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 887, + "startColumn": 21, + "charOffset": 23823, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 885, + "startColumn": 21, + "charOffset": 23799, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tlua_createtable(L, creature->getSummonCount(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7af283a23fde6fbd39438c6adaa56f5c2924fa7effc60bd2becf1e3bba7ed8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 890, + "startColumn": 2, + "charOffset": 23873, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 888, + "startColumn": 2, + "charOffset": 23855, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (const auto &summon : creature->getSummons()) {\n\t\tif (summon) {\n\t\t\tpushUserdata(L, summon);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8da7e0636d68200e70542be62dcbf7e44f76526efe50dfd6ba605140c5eab917" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 927, + "startColumn": 6, + "charOffset": 24964, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 925, + "startColumn": 6, + "charOffset": 24749, + "charLength": 1, + "snippet": { + "text": "\t// creature:getPathTo(pos[, minTargetDist = 0[, maxTargetDist = 1[, fullPathSearch = true[, clearSight = true[, maxSearchDist = 0]]]]])\n\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8f5ea2d9ff2976de11831acc18cf5bd83b08331ca8274c96bd69be301c86f38" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 937, + "startColumn": 37, + "charOffset": 25216, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 935, + "startColumn": 37, + "charOffset": 25080, + "charLength": 1, + "snippet": { + "text": "\tfpp.minTargetDist = getNumber(L, 3, 0);\n\tfpp.maxTargetDist = getNumber(L, 4, 1);\n\tfpp.fullPathSearch = getBoolean(L, 5, fpp.fullPathSearch);\n\tfpp.clearSight = getBoolean(L, 6, fpp.clearSight);\n\tfpp.maxSearchDist = getNumber(L, 7, fpp.maxSearchDist);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff173da771d023c3de1c739210d36eb1fdd5f5a1747c7584d3098eb03dd09278" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 938, + "startColumn": 33, + "charOffset": 25272, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 936, + "startColumn": 33, + "charOffset": 25130, + "charLength": 1, + "snippet": { + "text": "\tfpp.maxTargetDist = getNumber(L, 4, 1);\n\tfpp.fullPathSearch = getBoolean(L, 5, fpp.fullPathSearch);\n\tfpp.clearSight = getBoolean(L, 6, fpp.clearSight);\n\tfpp.maxSearchDist = getNumber(L, 7, fpp.maxSearchDist);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "455a56309ba7aad11a41db0bbed4a60dde41054e4ea34cf9eaee21a7f2dc9b21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 939, + "startColumn": 44, + "charOffset": 25335, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 937, + "startColumn": 44, + "charOffset": 25180, + "charLength": 1, + "snippet": { + "text": "\tfpp.fullPathSearch = getBoolean(L, 5, fpp.fullPathSearch);\n\tfpp.clearSight = getBoolean(L, 6, fpp.clearSight);\n\tfpp.maxSearchDist = getNumber(L, 7, fpp.maxSearchDist);\n\n\tstd::vector dirList;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf2b657c4e7e977addf0524034c190fad94e8db704333b32ebdf96ea8b4e2cea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 946, + "startColumn": 3, + "charOffset": 25483, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 944, + "startColumn": 3, + "charOffset": 25463, + "charLength": 3, + "snippet": { + "text": "\n\t\tint index = 0;\n\t\tfor (Direction dir : dirList) {\n\t\t\tlua_pushnumber(L, dir);\n\t\t\tlua_rawseti(L, -2, ++index);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41d0e41c3c0a0397235ae23cd44fd83f133ed6fa7e077c824659ca98cb7a7d12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 947, + "startColumn": 22, + "charOffset": 25536, + "charLength": 3, + "snippet": { + "text": "dir" + } + }, + "contextRegion": { + "startLine": 945, + "startColumn": 22, + "charOffset": 25464, + "charLength": 3, + "snippet": { + "text": "\t\tint index = 0;\n\t\tfor (Direction dir : dirList) {\n\t\t\tlua_pushnumber(L, dir);\n\t\t\tlua_rawseti(L, -2, ++index);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d87860ea68b59e2c421a2de1fcdc7b348043e6a76afa37f33f158aac44d45e99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 960, + "startColumn": 6, + "charOffset": 25829, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 958, + "startColumn": 6, + "charOffset": 25714, + "charLength": 1, + "snippet": { + "text": "\t// creature:move(tile[, flags = 0])\n\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0591bab8a1d0662e5ccc182c752033b7360e7f45135213f96ff93fb80432f93" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 971, + "startColumn": 21, + "charOffset": 26043, + "charLength": 6, + "snippet": { + "text": "g_game" + } + }, + "contextRegion": { + "startLine": 969, + "startColumn": 21, + "charOffset": 26006, + "charLength": 6, + "snippet": { + "text": "\t\t\treturn 1;\n\t\t}\n\t\tlua_pushnumber(L, g_game().internalMoveCreature(creature, direction, FLAG_NOLIMIT));\n\t} else {\n\t\tstd::shared_ptr tile = getUserdataShared(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8439df876d2b1ca4040ced23a3331185982bcced339db13e91f1036992e4cec4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 974, + "startColumn": 7, + "charOffset": 26188, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 972, + "startColumn": 7, + "charOffset": 26110, + "charLength": 1, + "snippet": { + "text": "\t} else {\n\t\tstd::shared_ptr tile = getUserdataShared(L, 2);\n\t\tif (!tile) {\n\t\t\tlua_pushnil(L);\n\t\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1d69bb7d647b51134d0a2e2d399b9ddfc3bd18a1d7aa55d2a3701c78a6db882" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 978, + "startColumn": 21, + "charOffset": 26253, + "charLength": 6, + "snippet": { + "text": "g_game" + } + }, + "contextRegion": { + "startLine": 976, + "startColumn": 21, + "charOffset": 26216, + "charLength": 6, + "snippet": { + "text": "\t\t\treturn 1;\n\t\t}\n\t\tlua_pushnumber(L, g_game().internalMoveCreature(creature, tile, getNumber(L, 3)));\n\t}\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89b8bf9332ba01123a57818e41720f0078e780289b7385f98add6678ec1d2b7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 987, + "startColumn": 21, + "charOffset": 26544, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 985, + "startColumn": 21, + "charOffset": 26434, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr creature = getUserdataShared(L, 1);\n\tif (creature) {\n\t\tlua_pushnumber(L, creature->getZoneType());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f87fced946f41d2fd18b29d6ec9cf0b7dde03e72dc267ce5100c2bcf027979c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 1005, + "startColumn": 2, + "charOffset": 26948, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1003, + "startColumn": 2, + "charOffset": 26875, + "charLength": 3, + "snippet": { + "text": "\tlua_createtable(L, static_cast(zones.size()), 0);\n\tint index = 0;\n\tfor (auto zone : zones) {\n\t\tindex++;\n\t\tpushUserdata(L, zone);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "406c4c4736534b4f9a0861d0f7a3f4a1a31c643b7dce3b84af3ea5cb53c0d694" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 1005, + "startColumn": 12, + "charOffset": 26958, + "charLength": 4, + "snippet": { + "text": "zone" + } + }, + "contextRegion": { + "startLine": 1003, + "startColumn": 12, + "charOffset": 26875, + "charLength": 4, + "snippet": { + "text": "\tlua_createtable(L, static_cast(zones.size()), 0);\n\tint index = 0;\n\tfor (auto zone : zones) {\n\t\tindex++;\n\t\tpushUserdata(L, zone);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "629b82979e4f0168768b6965f75d84209965428b37227240c3f9e757f6ea60fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 1017, + "startColumn": 6, + "charOffset": 27260, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1015, + "startColumn": 6, + "charOffset": 27151, + "charLength": 1, + "snippet": { + "text": "\t// creature:setIcon(key, category, icon[, number])\n\tauto creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04f93b04bb62a0830cd0f659958035d71fc7ec2f5afaff91d15a6f8cd6d6ed59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 1018, + "startColumn": 3, + "charOffset": 27275, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1016, + "startColumn": 3, + "charOffset": 27203, + "charLength": 15, + "snippet": { + "text": "\tauto creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b2905f43809d278f29e565a8a3c9cd4e3c26853838ad5c48fb35e19490931eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 1024, + "startColumn": 38, + "charOffset": 27506, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 1022, + "startColumn": 38, + "charOffset": 27376, + "charLength": 1, + "snippet": { + "text": "\tconst auto key = getString(L, 2);\n\tauto category = getNumber(L, 3);\n\tauto count = getNumber(L, 5, 0);\n\tCreatureIcon creatureIcon;\n\tif (category == CreatureIconCategory_t::Modifications) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f64559b0fb78b5ba70b16feaf285e3903b5bde3973ae7cf1912d9567edf6ae9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 1027, + "startColumn": 57, + "charOffset": 27655, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 1025, + "startColumn": 57, + "charOffset": 27513, + "charLength": 1, + "snippet": { + "text": "\tCreatureIcon creatureIcon;\n\tif (category == CreatureIconCategory_t::Modifications) {\n\t\tauto icon = getNumber(L, 5);\n\t\tcreatureIcon = CreatureIcon(icon, count);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "542fe7c6a205f574df070eaf75f5c4ac8d23f4f03244f37d5a790044523bea0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 1042, + "startColumn": 6, + "charOffset": 28036, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1040, + "startColumn": 6, + "charOffset": 27949, + "charLength": 1, + "snippet": { + "text": "\t// creature:getIcons()\n\tconst auto creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8f5ea2d9ff2976de11831acc18cf5bd83b08331ca8274c96bd69be301c86f38" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 1043, + "startColumn": 3, + "charOffset": 28051, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1041, + "startColumn": 3, + "charOffset": 27973, + "charLength": 15, + "snippet": { + "text": "\tconst auto creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5dc667ee11d99bbe83ab3c53ccbfc31a78c6122323a629392263b7c568de8af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 1050, + "startColumn": 2, + "charOffset": 28246, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1048, + "startColumn": 2, + "charOffset": 28153, + "charLength": 3, + "snippet": { + "text": "\tauto icons = creature->getIcons();\n\tlua_createtable(L, static_cast(icons.size()), 0);\n\tfor (auto &icon : icons) {\n\t\tlua_createtable(L, 0, 3);\n\t\tsetField(L, \"category\", static_cast(icon.category));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1807c49f420bb0aae70092e33abe44a9265d873c0ec472f3dd3e708c46ffd29b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 1052, + "startColumn": 27, + "charOffset": 28327, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 1050, + "startColumn": 27, + "charOffset": 28245, + "charLength": 11, + "snippet": { + "text": "\tfor (auto &icon : icons) {\n\t\tlua_createtable(L, 0, 3);\n\t\tsetField(L, \"category\", static_cast(icon.category));\n\t\tsetField(L, \"icon\", icon.serialize());\n\t\tsetField(L, \"count\", icon.count);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9909f99c99922ac44a3ab2caadfbef7a4fed3e883e6453aa24035f3b4c2d9313" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 1053, + "startColumn": 23, + "charOffset": 28387, + "charLength": 4, + "snippet": { + "text": "icon" + } + }, + "contextRegion": { + "startLine": 1051, + "startColumn": 23, + "charOffset": 28273, + "charLength": 4, + "snippet": { + "text": "\t\tlua_createtable(L, 0, 3);\n\t\tsetField(L, \"category\", static_cast(icon.category));\n\t\tsetField(L, \"icon\", icon.serialize());\n\t\tsetField(L, \"count\", icon.count);\n\t\tlua_rawseti(L, -2, static_cast(icon.category));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1655ac839bc25bf2dd6e9fe25392b95ed5a1ce2e56a6771834e1b1e844fb02b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 1054, + "startColumn": 24, + "charOffset": 28429, + "charLength": 4, + "snippet": { + "text": "icon" + } + }, + "contextRegion": { + "startLine": 1052, + "startColumn": 24, + "charOffset": 28301, + "charLength": 4, + "snippet": { + "text": "\t\tsetField(L, \"category\", static_cast(icon.category));\n\t\tsetField(L, \"icon\", icon.serialize());\n\t\tsetField(L, \"count\", icon.count);\n\t\tlua_rawseti(L, -2, static_cast(icon.category));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa67c8db706cebc889de2c3c5c8b71ca04bdbec1ae543c954de6ff119b8ba37f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 1063, + "startColumn": 6, + "charOffset": 28661, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1061, + "startColumn": 6, + "charOffset": 28572, + "charLength": 1, + "snippet": { + "text": "\t// creature:getIcon(key)\n\tconst auto creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "797c3bc6a105cde4fbd90c88d6406985357d32baa539d48fbf12bdafb3963e72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 1064, + "startColumn": 3, + "charOffset": 28676, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1062, + "startColumn": 3, + "charOffset": 28598, + "charLength": 15, + "snippet": { + "text": "\tconst auto creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66072924ef16160f8c60d5bebf13fed12d8258cbcd1c9a3eac32f89c5b7bcff1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 1072, + "startColumn": 27, + "charOffset": 28924, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 1070, + "startColumn": 27, + "charOffset": 28849, + "charLength": 11, + "snippet": { + "text": "\tif (icon.isSet()) {\n\t\tlua_createtable(L, 0, 3);\n\t\tsetField(L, \"category\", static_cast(icon.category));\n\t\tsetField(L, \"icon\", icon.serialize());\n\t\tsetField(L, \"count\", icon.count);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e0957578d880a9b03f0f0c6abdc6e45ce15eb3f74f7bb22a4e23e41c8ae93c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 1073, + "startColumn": 23, + "charOffset": 28984, + "charLength": 4, + "snippet": { + "text": "icon" + } + }, + "contextRegion": { + "startLine": 1071, + "startColumn": 23, + "charOffset": 28870, + "charLength": 4, + "snippet": { + "text": "\t\tlua_createtable(L, 0, 3);\n\t\tsetField(L, \"category\", static_cast(icon.category));\n\t\tsetField(L, \"icon\", icon.serialize());\n\t\tsetField(L, \"count\", icon.count);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "340a11db7c2ec6e60afd99c4c04cd4b3494c862a4c451ccc3663ebed72be2941" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 1074, + "startColumn": 24, + "charOffset": 29026, + "charLength": 4, + "snippet": { + "text": "icon" + } + }, + "contextRegion": { + "startLine": 1072, + "startColumn": 24, + "charOffset": 28898, + "charLength": 4, + "snippet": { + "text": "\t\tsetField(L, \"category\", static_cast(icon.category));\n\t\tsetField(L, \"icon\", icon.serialize());\n\t\tsetField(L, \"count\", icon.count);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b1e28a8cc4204226068ad241ebe8b8a7ad0511f6f7d814a029eb62c74c18a1d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 1084, + "startColumn": 6, + "charOffset": 29231, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1082, + "startColumn": 6, + "charOffset": 29145, + "charLength": 1, + "snippet": { + "text": "\t// creature:removeIcon(key)\n\tauto creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "474362503d83ff85d83a5fd291c159776a93f354c43889b5584a2ececeaa30c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 1085, + "startColumn": 3, + "charOffset": 29246, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1083, + "startColumn": 3, + "charOffset": 29174, + "charLength": 15, + "snippet": { + "text": "\tauto creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bde5a06a425bf6530d2ce727547cb2e836f195a918c9e9ab5c1f6f6d77c27b9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 1098, + "startColumn": 6, + "charOffset": 29591, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1096, + "startColumn": 6, + "charOffset": 29508, + "charLength": 1, + "snippet": { + "text": "\t// creature:clearIcons()\n\tauto creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "541fba6d6041f28c95a39777b72496f1ac22b6a76b9d7791d0f01ebe055c83b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/creature_functions.cpp" + }, + "region": { + "startLine": 1099, + "startColumn": 3, + "charOffset": 29606, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1097, + "startColumn": 3, + "charOffset": 29534, + "charLength": 15, + "snippet": { + "text": "\tauto creature = getUserdataShared(L, 1);\n\tif (!creature) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d4dd646badb011f552e537c62fbbc5bd2839543fe35a8b71571f7be1e720f27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/charm_functions.cpp" + }, + "region": { + "startLine": 21, + "startColumn": 3, + "charOffset": 703, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 19, + "startColumn": 3, + "charOffset": 597, + "charLength": 3, + "snippet": { + "text": "\t\tcharmRune_t charmid = getNumber(L, 2);\n\t\tconst auto charmList = g_game().getCharmList();\n\t\tfor (const auto &charm : charmList) {\n\t\t\tif (charm->id == charmid) {\n\t\t\t\tpushUserdata(L, charm);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee2a54ed6fb1febd58c362b1fea1dacbc48727e72acfaa8c6ea9b6ff3819ab6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/charm_functions.cpp" + }, + "region": { + "startLine": 62, + "startColumn": 21, + "charOffset": 1717, + "charLength": 5, + "snippet": { + "text": "charm" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 21, + "charOffset": 1618, + "charLength": 5, + "snippet": { + "text": "\tconst auto charm = getUserdataShared(L, 1);\n\tif (lua_gettop(L) == 1) {\n\t\tlua_pushnumber(L, charm->type);\n\t} else {\n\t\tcharm->type = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30685d6050a6b5c6c4bd4ab691f228937b4a26c329e719b4639dc8a1088b2ebb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/charm_functions.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 21, + "charOffset": 2023, + "charLength": 5, + "snippet": { + "text": "charm" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 21, + "charOffset": 1924, + "charLength": 5, + "snippet": { + "text": "\tconst auto charm = getUserdataShared(L, 1);\n\tif (lua_gettop(L) == 1) {\n\t\tlua_pushnumber(L, charm->points);\n\t} else {\n\t\tcharm->points = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76cad6ae9f2eaadf8ede0b341446539a4483308ee02f73b133bd81b7a0ade695" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/charm_functions.cpp" + }, + "region": { + "startLine": 86, + "startColumn": 21, + "charOffset": 2344, + "charLength": 5, + "snippet": { + "text": "charm" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 21, + "charOffset": 2245, + "charLength": 5, + "snippet": { + "text": "\tconst auto charm = getUserdataShared(L, 1);\n\tif (lua_gettop(L) == 1) {\n\t\tlua_pushnumber(L, charm->dmgtype);\n\t} else {\n\t\tcharm->dmgtype = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2dcb1f00c0b531369e62d73c3fb9c7e68030f3bd338c41749d30324210f6ddb6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/charm_functions.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 21, + "charOffset": 2673, + "charLength": 5, + "snippet": { + "text": "charm" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 21, + "charOffset": 2574, + "charLength": 5, + "snippet": { + "text": "\tconst auto charm = getUserdataShared(L, 1);\n\tif (lua_gettop(L) == 1) {\n\t\tlua_pushnumber(L, charm->percent);\n\t} else {\n\t\tcharm->percent = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf688094631a49149410d711dd9a5730fffb3a7e35df0db71c17579b486a15c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/charm_functions.cpp" + }, + "region": { + "startLine": 110, + "startColumn": 21, + "charOffset": 2986, + "charLength": 5, + "snippet": { + "text": "charm" + } + }, + "contextRegion": { + "startLine": 108, + "startColumn": 21, + "charOffset": 2887, + "charLength": 5, + "snippet": { + "text": "\tconst auto charm = getUserdataShared(L, 1);\n\tif (lua_gettop(L) == 1) {\n\t\tlua_pushnumber(L, charm->chance);\n\t} else {\n\t\tcharm->chance = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2a6b2c44fe98e79dc9b0db492a8dacde8b680e958e457a951896f2b50fdc2b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/charm_functions.cpp" + }, + "region": { + "startLine": 146, + "startColumn": 21, + "charOffset": 3948, + "charLength": 5, + "snippet": { + "text": "charm" + } + }, + "contextRegion": { + "startLine": 144, + "startColumn": 21, + "charOffset": 3849, + "charLength": 5, + "snippet": { + "text": "\tconst auto charm = getUserdataShared(L, 1);\n\tif (lua_gettop(L) == 1) {\n\t\tlua_pushnumber(L, charm->effect);\n\t} else {\n\t\tcharm->effect = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7385f512e11dc7bce8ee8750182f488acd28b262c6dd28e4ef1b1adfc9860eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/loot_functions.cpp" + }, + "region": { + "startLine": 126, + "startColumn": 30, + "charOffset": 3326, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 124, + "startColumn": 30, + "charOffset": 3234, + "charLength": 9, + "snippet": { + "text": "\tconst auto loot = getUserdataShared(L, 1);\n\tif (loot) {\n\t\tloot->lootBlock.actionId = getNumber(L, 2);\n\t\tpushBoolean(L, true);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a993cf096c32c6e1ec692cb0efdd23a1e4d89215c1cc63c12f845396f48d533f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/loot_functions.cpp" + }, + "region": { + "startLine": 174, + "startColumn": 28, + "charOffset": 4352, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 28, + "charOffset": 4262, + "charLength": 9, + "snippet": { + "text": "\tconst auto loot = getUserdataShared(L, 1);\n\tif (loot) {\n\t\tloot->lootBlock.attack = getNumber(L, 2);\n\t\tpushBoolean(L, true);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d43014a8b9f315ecf839dbac819da2b70de9ce339091873f76e12451612d3a27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/loot_functions.cpp" + }, + "region": { + "startLine": 186, + "startColumn": 29, + "charOffset": 4621, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 184, + "startColumn": 29, + "charOffset": 4530, + "charLength": 9, + "snippet": { + "text": "\tconst auto loot = getUserdataShared(L, 1);\n\tif (loot) {\n\t\tloot->lootBlock.defense = getNumber(L, 2);\n\t\tpushBoolean(L, true);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a98871542b1df14b0d1c335852a55e6b13813a5dae1b5da535e945234c5c5074" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/loot_functions.cpp" + }, + "region": { + "startLine": 198, + "startColumn": 34, + "charOffset": 4905, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 196, + "startColumn": 34, + "charOffset": 4809, + "charLength": 9, + "snippet": { + "text": "\tconst auto loot = getUserdataShared(L, 1);\n\tif (loot) {\n\t\tloot->lootBlock.extraDefense = getNumber(L, 2);\n\t\tpushBoolean(L, true);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4131d1b7663dfec62fa42e792e79390c7b787e9d8f8fe17c50383eb9f6d50c9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/loot_functions.cpp" + }, + "region": { + "startLine": 210, + "startColumn": 27, + "charOffset": 5166, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 208, + "startColumn": 27, + "charOffset": 5077, + "charLength": 9, + "snippet": { + "text": "\tconst auto loot = getUserdataShared(L, 1);\n\tif (loot) {\n\t\tloot->lootBlock.armor = getNumber(L, 2);\n\t\tpushBoolean(L, true);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b44c63b4910a4aaa4331d9df1432cfc203de886e8cbd50bd7ce9e865cfd41e65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/loot_functions.cpp" + }, + "region": { + "startLine": 222, + "startColumn": 32, + "charOffset": 5442, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 220, + "startColumn": 32, + "charOffset": 5348, + "charLength": 9, + "snippet": { + "text": "\tconst auto loot = getUserdataShared(L, 1);\n\tif (loot) {\n\t\tloot->lootBlock.shootRange = getNumber(L, 2);\n\t\tpushBoolean(L, true);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05994b8e8b08cdafd4a569844e132e0468776fb4b7befa72951df7180670bb7b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/loot_functions.cpp" + }, + "region": { + "startLine": 234, + "startColumn": 31, + "charOffset": 5716, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 232, + "startColumn": 31, + "charOffset": 5623, + "charLength": 9, + "snippet": { + "text": "\tconst auto loot = getUserdataShared(L, 1);\n\tif (loot) {\n\t\tloot->lootBlock.hitChance = getNumber(L, 2);\n\t\tpushBoolean(L, true);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf4e7c436866a0eba991c24e57cf0bba00d02b3e1a6d7f3f59c6a9cfda8b29d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto childLoot' can be declared as 'auto *const childLoot'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/loot_functions.cpp" + }, + "region": { + "startLine": 262, + "startColumn": 3, + "charOffset": 6302, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 260, + "startColumn": 3, + "charOffset": 6237, + "charLength": 5, + "snippet": { + "text": "\tconst auto loot = getUserdataShared(L, 1);\n\tif (loot) {\n\t\tconst auto childLoot = getUserdata(L, 2);\n\t\tif (childLoot) {\n\t\t\tloot->lootBlock.childLoot.push_back(childLoot->lootBlock);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "037911d2e14d6ee5ff723f5ed841ac8a706b5f0ecfb564543c4e6bc32217502e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/loot_functions.cpp" + }, + "region": { + "startLine": 263, + "startColumn": 7, + "charOffset": 6356, + "charLength": 9, + "snippet": { + "text": "childLoot" + } + }, + "contextRegion": { + "startLine": 261, + "startColumn": 7, + "charOffset": 6287, + "charLength": 9, + "snippet": { + "text": "\tif (loot) {\n\t\tconst auto childLoot = getUserdata(L, 2);\n\t\tif (childLoot) {\n\t\t\tloot->lootBlock.childLoot.push_back(childLoot->lootBlock);\n\t\t\tpushBoolean(L, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80867a2a6a707b46b563bf747c2edc108d46446e395bcd1f73b37e392adb2ec3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'Loot *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/loot_functions.cpp" + }, + "region": { + "startLine": 263, + "startColumn": 7, + "charOffset": 6356, + "charLength": 9, + "snippet": { + "text": "childLoot" + } + }, + "contextRegion": { + "startLine": 261, + "startColumn": 7, + "charOffset": 6287, + "charLength": 9, + "snippet": { + "text": "\tif (loot) {\n\t\tconst auto childLoot = getUserdata(L, 2);\n\t\tif (childLoot) {\n\t\t\tloot->lootBlock.childLoot.push_back(childLoot->lootBlock);\n\t\t\tpushBoolean(L, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "316da3510febc3961e8ba772115b7a331bb7433c95a062dfe1e4b96aa2a51049" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 73, + "startColumn": 3, + "charOffset": 2124, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 71, + "startColumn": 3, + "charOffset": 2064, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t\t// Unregister creature events (current MonsterType)\n\t\tfor (const std::string &scriptName : monster->mType->info.scripts) {\n\t\t\tif (!monster->unregisterCreatureEvent(scriptName)) {\n\t\t\t\tg_logger().warn(\"[Warning - MonsterFunctions::luaMonsterSetType] Unknown event name: {}\", scriptName);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "adef8251364b0c8fc2fa7c360efc6a0272626a5f9b718e26ea0a5f0c6987457b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 84, + "startColumn": 21, + "charOffset": 2643, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 21, + "charOffset": 2538, + "charLength": 5, + "snippet": { + "text": "\t\tmonster->currentOutfit = mType->info.outfit;\n\t\tmonster->skull = mType->info.skull;\n\t\tmonster->health = mType->info.health * mType->getHealthMultiplier();\n\t\tmonster->healthMax = mType->info.healthMax * mType->getHealthMultiplier();\n\t\tmonster->baseSpeed = mType->getBaseSpeed();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efef96af0c451c228e738d7ebc3a47bb0355106d69affd250b9a9a5071f4b142" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 84, + "startColumn": 21, + "charOffset": 2643, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 21, + "charOffset": 2538, + "charLength": 5, + "snippet": { + "text": "\t\tmonster->currentOutfit = mType->info.outfit;\n\t\tmonster->skull = mType->info.skull;\n\t\tmonster->health = mType->info.health * mType->getHealthMultiplier();\n\t\tmonster->healthMax = mType->info.healthMax * mType->getHealthMultiplier();\n\t\tmonster->baseSpeed = mType->getBaseSpeed();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7cc9e73e2bfa665cb48f71f6fa43a46cdd754002fc64c627b8940aa0a0c07051" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 84, + "startColumn": 21, + "charOffset": 2643, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 21, + "charOffset": 2538, + "charLength": 5, + "snippet": { + "text": "\t\tmonster->currentOutfit = mType->info.outfit;\n\t\tmonster->skull = mType->info.skull;\n\t\tmonster->health = mType->info.health * mType->getHealthMultiplier();\n\t\tmonster->healthMax = mType->info.healthMax * mType->getHealthMultiplier();\n\t\tmonster->baseSpeed = mType->getBaseSpeed();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c40ecf5287f80738d575fac921203dfba0374040e46f87e2d4ae756812d6fa0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 85, + "startColumn": 24, + "charOffset": 2717, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 24, + "charOffset": 2585, + "charLength": 5, + "snippet": { + "text": "\t\tmonster->skull = mType->info.skull;\n\t\tmonster->health = mType->info.health * mType->getHealthMultiplier();\n\t\tmonster->healthMax = mType->info.healthMax * mType->getHealthMultiplier();\n\t\tmonster->baseSpeed = mType->getBaseSpeed();\n\t\tmonster->internalLight = mType->info.light;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41163f459b0060f47f1eeca82fc39d34dcd6b9b7bab56b9f127e2f27e38feaf7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 85, + "startColumn": 24, + "charOffset": 2717, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 24, + "charOffset": 2585, + "charLength": 5, + "snippet": { + "text": "\t\tmonster->skull = mType->info.skull;\n\t\tmonster->health = mType->info.health * mType->getHealthMultiplier();\n\t\tmonster->healthMax = mType->info.healthMax * mType->getHealthMultiplier();\n\t\tmonster->baseSpeed = mType->getBaseSpeed();\n\t\tmonster->internalLight = mType->info.light;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80f8949e6ac4383468e7109575931dacbecbf79b67143c85f2900405f4e7467e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 85, + "startColumn": 24, + "charOffset": 2717, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 24, + "charOffset": 2585, + "charLength": 5, + "snippet": { + "text": "\t\tmonster->skull = mType->info.skull;\n\t\tmonster->health = mType->info.health * mType->getHealthMultiplier();\n\t\tmonster->healthMax = mType->info.healthMax * mType->getHealthMultiplier();\n\t\tmonster->baseSpeed = mType->getBaseSpeed();\n\t\tmonster->internalLight = mType->info.light;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a0166b92df4be3d8662f4a853d982c68f98edbd156f95cb9f02691745c795e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 3, + "charOffset": 3021, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 3, + "charOffset": 2915, + "charLength": 3, + "snippet": { + "text": "\t\tmonster->targetDistance = mType->info.targetDistance;\n\t\t// Register creature events (new MonsterType)\n\t\tfor (const std::string &scriptName : mType->info.scripts) {\n\t\t\tif (!monster->registerCreatureEvent(scriptName)) {\n\t\t\t\tg_logger().warn(\"[Warning - MonsterFunctions::luaMonsterSetType] Unknown event name: {}\", scriptName);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "677390beddaa9a1c3d0f89b4fef528273c1e389d1a16856c2a56e0b0db91eef5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 97, + "startColumn": 3, + "charOffset": 3288, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 95, + "startColumn": 3, + "charOffset": 3247, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t\t// Reload creature on spectators\n\t\tfor (const auto &spectator : Spectators().find(monster->getPosition(), true)) {\n\t\t\tspectator->getPlayer()->sendCreatureReload(monster);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f7202aebcc14d7e23c50b067a694b422c24813f8507eb446f9a89a7bfdcaf4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 143, + "startColumn": 6, + "charOffset": 4525, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 141, + "startColumn": 6, + "charOffset": 4424, + "charLength": 1, + "snippet": { + "text": "\t// monster:setIdle(idle)\n\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d29aae553b3b80369271103534937c3aef7d030141a216433aa635ce358540b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 218, + "startColumn": 6, + "charOffset": 6467, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 216, + "startColumn": 6, + "charOffset": 6364, + "charLength": 1, + "snippet": { + "text": "\t// monster:getFriendList()\n\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37281227a189fa44e4481426b0085cbd606ec3433895f07cc7a81b0e3ffb9ed4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 224, + "startColumn": 21, + "charOffset": 6585, + "charLength": 10, + "snippet": { + "text": "friendList" + } + }, + "contextRegion": { + "startLine": 222, + "startColumn": 21, + "charOffset": 6512, + "charLength": 10, + "snippet": { + "text": "\n\tconst auto &friendList = monster->getFriendList();\n\tlua_createtable(L, friendList.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8929745628736beeb7ca5e474e7fb32751b14f25d629bf080f9c3f22559bc725" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 224, + "startColumn": 21, + "charOffset": 6585, + "charLength": 10, + "snippet": { + "text": "friendList" + } + }, + "contextRegion": { + "startLine": 222, + "startColumn": 21, + "charOffset": 6512, + "charLength": 10, + "snippet": { + "text": "\n\tconst auto &friendList = monster->getFriendList();\n\tlua_createtable(L, friendList.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a75d7a45b03d6990068ead73edc7cbac7f64bce2bbf0481d1e146ca1e773986c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 227, + "startColumn": 2, + "charOffset": 6626, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 225, + "startColumn": 2, + "charOffset": 6608, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (const auto &creature : friendList) {\n\t\tpushUserdata(L, creature);\n\t\tsetCreatureMetatable(L, -1, creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e60a619126de146fa7c2b268010dc31c9a162c63bc0392f17ab86ee0b7872469" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 239, + "startColumn": 21, + "charOffset": 6994, + "charLength": 7, + "snippet": { + "text": "monster" + } + }, + "contextRegion": { + "startLine": 237, + "startColumn": 21, + "charOffset": 6888, + "charLength": 7, + "snippet": { + "text": "\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (monster) {\n\t\tlua_pushnumber(L, monster->getFriendList().size());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a461f9304d6e7e754d2326c5e16d07a61fbab88854256a2211017de66b2d1d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 239, + "startColumn": 21, + "charOffset": 6994, + "charLength": 7, + "snippet": { + "text": "monster" + } + }, + "contextRegion": { + "startLine": 237, + "startColumn": 21, + "charOffset": 6888, + "charLength": 7, + "snippet": { + "text": "\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (monster) {\n\t\tlua_pushnumber(L, monster->getFriendList().size());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ae57c58b9ec20d4d96be0e187076c96093e8f4b9f062680a168d124cbfed751" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 249, + "startColumn": 6, + "charOffset": 7259, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 247, + "startColumn": 6, + "charOffset": 7131, + "charLength": 1, + "snippet": { + "text": "\t// monster:addTarget(creature[, pushFront = false])\n\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0788867e2900116b7e03843cf7b7319f4b45a12ba47092c80edab296018323e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 256, + "startColumn": 11, + "charOffset": 7415, + "charLength": 9, + "snippet": { + "text": "addTarget" + } + }, + "contextRegion": { + "startLine": 254, + "startColumn": 11, + "charOffset": 7305, + "charLength": 9, + "snippet": { + "text": "\tstd::shared_ptr creature = getCreature(L, 2);\n\tbool pushFront = getBoolean(L, 3, false);\n\tmonster->addTarget(creature, pushFront);\n\tpushBoolean(L, true);\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0dae9875379336c037b5f7047e1ca09e2aa27a5a3901f098ca564ae125acc3f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 264, + "startColumn": 6, + "charOffset": 7655, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 262, + "startColumn": 6, + "charOffset": 7545, + "charLength": 1, + "snippet": { + "text": "\t// monster:removeTarget(creature)\n\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6efa87056abaf8f707e57dab99182dc72864231ab790592239844a36cdae7efb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 269, + "startColumn": 11, + "charOffset": 7711, + "charLength": 12, + "snippet": { + "text": "removeTarget" + } + }, + "contextRegion": { + "startLine": 267, + "startColumn": 11, + "charOffset": 7697, + "charLength": 12, + "snippet": { + "text": "\t}\n\n\tmonster->removeTarget(getCreature(L, 2));\n\tpushBoolean(L, true);\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e940a3dc2d782fdae3eb22d90ffa6e5acdb004bd607fe0516e41da9ea4869b6c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 277, + "startColumn": 6, + "charOffset": 7946, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 275, + "startColumn": 6, + "charOffset": 7843, + "charLength": 1, + "snippet": { + "text": "\t// monster:getTargetList()\n\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c5b319bec6a67bbb583928274b39734f7f25ae4f408d08cb8a59abe23734ed8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 283, + "startColumn": 21, + "charOffset": 8063, + "charLength": 10, + "snippet": { + "text": "targetList" + } + }, + "contextRegion": { + "startLine": 281, + "startColumn": 21, + "charOffset": 7991, + "charLength": 10, + "snippet": { + "text": "\n\tconst auto targetList = monster->getTargetList();\n\tlua_createtable(L, targetList.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9ed5651d26b4cfde0cfeb92597d1f8b66676eb560c77da3f59c230043509bc7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 283, + "startColumn": 21, + "charOffset": 8063, + "charLength": 10, + "snippet": { + "text": "targetList" + } + }, + "contextRegion": { + "startLine": 281, + "startColumn": 21, + "charOffset": 7991, + "charLength": 10, + "snippet": { + "text": "\n\tconst auto targetList = monster->getTargetList();\n\tlua_createtable(L, targetList.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1424b208b88f16721a9cd0fea10b43f7c0489ad32c7eb681b3f8a1733a28d1a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 286, + "startColumn": 2, + "charOffset": 8104, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 284, + "startColumn": 2, + "charOffset": 8086, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (std::shared_ptr creature : targetList) {\n\t\tpushUserdata(L, creature);\n\t\tsetCreatureMetatable(L, -1, creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca9def76d38c4e35f574e7e843108caf294bd4988c072a0d2102e6c73c24ba72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 286, + "startColumn": 33, + "charOffset": 8135, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 284, + "startColumn": 33, + "charOffset": 8086, + "charLength": 8, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (std::shared_ptr creature : targetList) {\n\t\tpushUserdata(L, creature);\n\t\tsetCreatureMetatable(L, -1, creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75b79a0062bffdec6e28adb4b85ebd0e0fc106e6dbbc9c4537515dcfee5329bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 298, + "startColumn": 21, + "charOffset": 8486, + "charLength": 7, + "snippet": { + "text": "monster" + } + }, + "contextRegion": { + "startLine": 296, + "startColumn": 21, + "charOffset": 8380, + "charLength": 7, + "snippet": { + "text": "\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (monster) {\n\t\tlua_pushnumber(L, monster->getTargetList().size());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "faabdfcce4be895c1348c4ee9e3d2e46081905ba0a50e5578cabcf6c439ce9b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 298, + "startColumn": 21, + "charOffset": 8486, + "charLength": 7, + "snippet": { + "text": "monster" + } + }, + "contextRegion": { + "startLine": 296, + "startColumn": 21, + "charOffset": 8380, + "charLength": 7, + "snippet": { + "text": "\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (monster) {\n\t\tlua_pushnumber(L, monster->getTargetList().size());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e184336ff6a8b63e67d649f87eaeb89c7d1a791e25872b8e7ce7b2ef6a4186ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 309, + "startColumn": 3, + "charOffset": 8785, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 307, + "startColumn": 3, + "charOffset": 8697, + "charLength": 7, + "snippet": { + "text": "\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (monster) {\n\t\tint32_t distance = getNumber(L, 2, 1);\n\t\tuint32_t duration = getNumber(L, 3, 12000);\n\t\tpushBoolean(L, monster->changeTargetDistance(distance, duration));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27c614a7052c7e51d657954c240017a381e1784e27ddbbe637615dcf01d9064e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 310, + "startColumn": 3, + "charOffset": 8835, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 308, + "startColumn": 3, + "charOffset": 8767, + "charLength": 8, + "snippet": { + "text": "\tif (monster) {\n\t\tint32_t distance = getNumber(L, 2, 1);\n\t\tuint32_t duration = getNumber(L, 3, 12000);\n\t\tpushBoolean(L, monster->changeTargetDistance(distance, duration));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "329cd8dbb53561b55dec471b829952089b04577f943a2d6d38454123ae53682c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "12000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 310, + "startColumn": 49, + "charOffset": 8881, + "charLength": 5, + "snippet": { + "text": "12000" + } + }, + "contextRegion": { + "startLine": 308, + "startColumn": 49, + "charOffset": 8767, + "charLength": 5, + "snippet": { + "text": "\tif (monster) {\n\t\tint32_t distance = getNumber(L, 2, 1);\n\t\tuint32_t duration = getNumber(L, 3, 12000);\n\t\tpushBoolean(L, monster->changeTargetDistance(distance, duration));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9849d81b40a4371d51536b3bf028d92307ee9235d1acdaec683acc85ce0db13d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 345, + "startColumn": 3, + "charOffset": 9812, + "charLength": 18, + "snippet": { + "text": "TargetSearchType_t" + } + }, + "contextRegion": { + "startLine": 343, + "startColumn": 3, + "charOffset": 9724, + "charLength": 18, + "snippet": { + "text": "\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (monster) {\n\t\tTargetSearchType_t searchType = getNumber(L, 2, TARGETSEARCH_DEFAULT);\n\t\tpushBoolean(L, monster->searchTarget(searchType));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4faab8c5a614603ecb15a96d88a2119091faf27bdf13fe8caf007fce00458020" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 356, + "startColumn": 6, + "charOffset": 10180, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 354, + "startColumn": 6, + "charOffset": 10066, + "charLength": 1, + "snippet": { + "text": "\t// monster:setSpawnPosition(interval)\n\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "016742139cc03ebe2db68140679c8056294449798612f1aa204cbc9884e7c183" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 366, + "startColumn": 98, + "charOffset": 10474, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 364, + "startColumn": 98, + "charOffset": 10347, + "charLength": 1, + "snippet": { + "text": "\tmonster->setMasterPos(pos);\n\n\tSpawnMonster &spawnMonster = g_game().map.spawnsMonster.getspawnMonsterList().emplace_back(pos, 5);\n\tuint32_t interval = getNumber(L, 2, 90) * 1000 * 100 / std::max((uint32_t)1, (g_configManager().getNumber(RATE_SPAWN, __FUNCTION__) * eventschedule));\n\tspawnMonster.addMonster(monster->mType->typeName, pos, DIRECTION_NORTH, static_cast(interval));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c5e7ea205379c1099d163dde5a64756ac7c38138e9a9039e6f926d60904bf13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "90 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 367, + "startColumn": 48, + "charOffset": 10525, + "charLength": 2, + "snippet": { + "text": "90" + } + }, + "contextRegion": { + "startLine": 365, + "startColumn": 48, + "charOffset": 10376, + "charLength": 2, + "snippet": { + "text": "\n\tSpawnMonster &spawnMonster = g_game().map.spawnsMonster.getspawnMonsterList().emplace_back(pos, 5);\n\tuint32_t interval = getNumber(L, 2, 90) * 1000 * 100 / std::max((uint32_t)1, (g_configManager().getNumber(RATE_SPAWN, __FUNCTION__) * eventschedule));\n\tspawnMonster.addMonster(monster->mType->typeName, pos, DIRECTION_NORTH, static_cast(interval));\n\tspawnMonster.startSpawnMonsterCheck();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a06db7579a180b5680c25d1161aa341f68ada121e0b648b1fd67999a951c4953" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 367, + "startColumn": 54, + "charOffset": 10531, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 365, + "startColumn": 54, + "charOffset": 10376, + "charLength": 4, + "snippet": { + "text": "\n\tSpawnMonster &spawnMonster = g_game().map.spawnsMonster.getspawnMonsterList().emplace_back(pos, 5);\n\tuint32_t interval = getNumber(L, 2, 90) * 1000 * 100 / std::max((uint32_t)1, (g_configManager().getNumber(RATE_SPAWN, __FUNCTION__) * eventschedule));\n\tspawnMonster.addMonster(monster->mType->typeName, pos, DIRECTION_NORTH, static_cast(interval));\n\tspawnMonster.startSpawnMonsterCheck();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f040efb9ac783efbe8bdeebc8d77f75df25d477dcd28f59c7cabb020de20e5f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 367, + "startColumn": 61, + "charOffset": 10538, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 365, + "startColumn": 61, + "charOffset": 10376, + "charLength": 3, + "snippet": { + "text": "\n\tSpawnMonster &spawnMonster = g_game().map.spawnsMonster.getspawnMonsterList().emplace_back(pos, 5);\n\tuint32_t interval = getNumber(L, 2, 90) * 1000 * 100 / std::max((uint32_t)1, (g_configManager().getNumber(RATE_SPAWN, __FUNCTION__) * eventschedule));\n\tspawnMonster.addMonster(monster->mType->typeName, pos, DIRECTION_NORTH, static_cast(interval));\n\tspawnMonster.startSpawnMonsterCheck();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "839e8cf071494545bcb6c5ab67f9e0cb6991abb0d3ac9e63d6c4734aaad017b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 367, + "startColumn": 76, + "charOffset": 10553, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 365, + "startColumn": 76, + "charOffset": 10376, + "charLength": 1, + "snippet": { + "text": "\n\tSpawnMonster &spawnMonster = g_game().map.spawnsMonster.getspawnMonsterList().emplace_back(pos, 5);\n\tuint32_t interval = getNumber(L, 2, 90) * 1000 * 100 / std::max((uint32_t)1, (g_configManager().getNumber(RATE_SPAWN, __FUNCTION__) * eventschedule));\n\tspawnMonster.addMonster(monster->mType->typeName, pos, DIRECTION_NORTH, static_cast(interval));\n\tspawnMonster.startSpawnMonsterCheck();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20a127af5d602db0e35192cbd54bcb64f86379ecdc74305f79fb95343899e0e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 368, + "startColumn": 15, + "charOffset": 10654, + "charLength": 10, + "snippet": { + "text": "addMonster" + } + }, + "contextRegion": { + "startLine": 366, + "startColumn": 15, + "charOffset": 10377, + "charLength": 10, + "snippet": { + "text": "\tSpawnMonster &spawnMonster = g_game().map.spawnsMonster.getspawnMonsterList().emplace_back(pos, 5);\n\tuint32_t interval = getNumber(L, 2, 90) * 1000 * 100 / std::max((uint32_t)1, (g_configManager().getNumber(RATE_SPAWN, __FUNCTION__) * eventschedule));\n\tspawnMonster.addMonster(monster->mType->typeName, pos, DIRECTION_NORTH, static_cast(interval));\n\tspawnMonster.startSpawnMonsterCheck();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b27a4a486e946565d0f71ddd33dfcf3274ae488246543d03f9be96e22c04364" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-redundant-casting", + "ruleIndex": 716, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant explicit casting to the same type 'uint32_t' (aka 'unsigned int') as the sub-expression, remove this casting" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 368, + "startColumn": 74, + "charOffset": 10713, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 366, + "startColumn": 74, + "charOffset": 10377, + "charLength": 11, + "snippet": { + "text": "\tSpawnMonster &spawnMonster = g_game().map.spawnsMonster.getspawnMonsterList().emplace_back(pos, 5);\n\tuint32_t interval = getNumber(L, 2, 90) * 1000 * 100 / std::max((uint32_t)1, (g_configManager().getNumber(RATE_SPAWN, __FUNCTION__) * eventschedule));\n\tspawnMonster.addMonster(monster->mType->typeName, pos, DIRECTION_NORTH, static_cast(interval));\n\tspawnMonster.startSpawnMonsterCheck();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d14ccf08095c1dc6f2773c80b3dbfb36764201305b187216df624b581388dfa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 379, + "startColumn": 6, + "charOffset": 10993, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 377, + "startColumn": 6, + "charOffset": 10917, + "charLength": 1, + "snippet": { + "text": "\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\n\tif (!monster) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4cad4daaad3f7b8a76f33c112624c3f3cbf1ed054c01074f36696f1d36e8a02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 385, + "startColumn": 20, + "charOffset": 11112, + "charLength": 11, + "snippet": { + "text": "respawnType" + } + }, + "contextRegion": { + "startLine": 383, + "startColumn": 20, + "charOffset": 11038, + "charLength": 11, + "snippet": { + "text": "\n\tRespawnType respawnType = monster->getRespawnType();\n\tlua_pushnumber(L, respawnType.period);\n\tpushBoolean(L, respawnType.underground);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55871731859fb4882e7382f0ffe52b9c5d51f3c0ded6768f819e9ae970e10b89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 394, + "startColumn": 6, + "charOffset": 11375, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 392, + "startColumn": 6, + "charOffset": 11262, + "charLength": 1, + "snippet": { + "text": "\t// monster:getTimeToChangeFiendish()\n\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d40419995adc9c4f479ce9bf03abc20507f8a076445f56475da1debae93813b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 395, + "startColumn": 3, + "charOffset": 11389, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 393, + "startColumn": 3, + "charOffset": 11300, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ec5ff44325cdf6cf03c1bf61f50a58738ef9cce4176f305f9f2a4869fbce81d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 408, + "startColumn": 6, + "charOffset": 11825, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 406, + "startColumn": 6, + "charOffset": 11702, + "charLength": 1, + "snippet": { + "text": "\ttime_t endTime = getNumber(L, 2, 1);\n\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f622bff4309ffebbc44cc33c56279a83a65a16618f6409e10942536ee259b3a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 409, + "startColumn": 3, + "charOffset": 11839, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 407, + "startColumn": 3, + "charOffset": 11750, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f535917dda52fad1395fd3d58dcf0ca895eb39e37d6b7ae551298444b198bff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 421, + "startColumn": 6, + "charOffset": 12195, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 419, + "startColumn": 6, + "charOffset": 12076, + "charLength": 1, + "snippet": { + "text": "\t// monster:getMonsterForgeClassification()\n\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f8b825778ca20d11bc8f9c20c4f9d2f19f95f0857769f87b00261056a203efa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 422, + "startColumn": 3, + "charOffset": 12209, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 420, + "startColumn": 3, + "charOffset": 12120, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e21fb3365c9a7bcbd0a23aed4d1f05b830b7abbbf830eac58d33a73aa15c8943" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 436, + "startColumn": 6, + "charOffset": 12741, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 434, + "startColumn": 6, + "charOffset": 12584, + "charLength": 1, + "snippet": { + "text": "\tForgeClassifications_t classification = getNumber(L, 2);\n\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86698d93b051dff0a332b1b2d2c487d33f0cb2ee3b7050c5fc028a4bd727b0b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 437, + "startColumn": 3, + "charOffset": 12755, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 435, + "startColumn": 3, + "charOffset": 12666, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc1ab33d053bb690236095ff7428ef42dbfe4f62c43ec47964c7cffa2c35c839" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 449, + "startColumn": 6, + "charOffset": 13092, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 447, + "startColumn": 6, + "charOffset": 12989, + "charLength": 1, + "snippet": { + "text": "\t// monster:getForgeStack()\n\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26a098c8d8430b7939250e619b2cb0d6bad222278434e0bd45eaf770f1ec3469" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 450, + "startColumn": 3, + "charOffset": 13106, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 448, + "startColumn": 3, + "charOffset": 13017, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a08726d97f632bdbe647cfe76b12ff00ddf3d94fc119d13c149d6b15acbfea63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 455, + "startColumn": 20, + "charOffset": 13226, + "charLength": 7, + "snippet": { + "text": "monster" + } + }, + "contextRegion": { + "startLine": 453, + "startColumn": 20, + "charOffset": 13203, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, monster->getForgeStack());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0eb949ed4c87cc657b91fc9a7413a6e61bb38d452e4877535dd77e4d2d8a69a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 461, + "startColumn": 2, + "charOffset": 13363, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 459, + "startColumn": 2, + "charOffset": 13267, + "charLength": 8, + "snippet": { + "text": "int MonsterFunctions::luaMonsterSetForgeStack(lua_State* L) {\n\t// monster:setForgeStack(stack)\n\tuint16_t stack = getNumber(L, 2, 0);\n\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "030965ea07ea5e0638b6fe0f53dec3b6fa540effbbd42d0d92fa4b9159f079c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 463, + "startColumn": 6, + "charOffset": 13485, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 461, + "startColumn": 6, + "charOffset": 13362, + "charLength": 1, + "snippet": { + "text": "\tuint16_t stack = getNumber(L, 2, 0);\n\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d29aae553b3b80369271103534937c3aef7d030141a216433aa635ce358540b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 464, + "startColumn": 3, + "charOffset": 13499, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 462, + "startColumn": 3, + "charOffset": 13410, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1306537fbe1a5ca06e12067c7a20079a0c4a6beff8a349403c685b074636061b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "15 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 470, + "startColumn": 22, + "charOffset": 13653, + "charLength": 2, + "snippet": { + "text": "15" + } + }, + "contextRegion": { + "startLine": 468, + "startColumn": 22, + "charOffset": 13599, + "charLength": 2, + "snippet": { + "text": "\n\tmonster->setForgeStack(stack);\n\tauto icon = stack < 15\n\t\t? CreatureIconModifications_t::Influenced\n\t\t: CreatureIconModifications_t::Fiendish;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5351d1d1aa8d9c36ac27ec67de1467bf6dc48c4c8d44e28919a35c5341027367" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 473, + "startColumn": 47, + "charOffset": 13789, + "charLength": 4, + "snippet": { + "text": "icon" + } + }, + "contextRegion": { + "startLine": 471, + "startColumn": 47, + "charOffset": 13656, + "charLength": 4, + "snippet": { + "text": "\t\t? CreatureIconModifications_t::Influenced\n\t\t: CreatureIconModifications_t::Fiendish;\n\tmonster->setIcon(\"forge\", CreatureIcon(icon, icon == CreatureIconModifications_t::Influenced ? static_cast(stack) : 0));\n\tg_game().updateCreatureIcon(monster);\n\tg_game().sendUpdateCreature(monster);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "081a9c10d12af96b5c673d639347525b976c76626de2cd52dd6c97a8a7240bff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 482, + "startColumn": 6, + "charOffset": 14145, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 480, + "startColumn": 6, + "charOffset": 14035, + "charLength": 1, + "snippet": { + "text": "\t// monster:configureForgeSystem()\n\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da311bf0f270986bd5f863aba44fa5260e8b857bc339715dabc23796b2ee48f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 483, + "startColumn": 3, + "charOffset": 14159, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 481, + "startColumn": 3, + "charOffset": 14070, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48f403eacbed15136b959ac36f91831777780d52889efe13d78cbfd729a9f2a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 495, + "startColumn": 6, + "charOffset": 14485, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 493, + "startColumn": 6, + "charOffset": 14376, + "charLength": 1, + "snippet": { + "text": "\t// monster:clearFiendishStatus()\n\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "113409c4a30d552062ac4f63683d82db95ce5e9264cdff8b54882e38795fdd0a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 496, + "startColumn": 3, + "charOffset": 14499, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 494, + "startColumn": 3, + "charOffset": 14410, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dab89e7957a4ecb0f97abbbefe284979445053d4e756bf391c8c703283807b5c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 508, + "startColumn": 6, + "charOffset": 14808, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 506, + "startColumn": 6, + "charOffset": 14707, + "charLength": 1, + "snippet": { + "text": "\t// monster:isForgeable()\n\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "527e01be305caa7621a21c99c99c3262144e36b7f8494b604e148faf68f68a77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 509, + "startColumn": 3, + "charOffset": 14822, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 507, + "startColumn": 3, + "charOffset": 14733, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9562a7b3b728a6ab69030760b20f283ff835b315e42fb2a7ff3af1af59ae70b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 521, + "startColumn": 6, + "charOffset": 15123, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 519, + "startColumn": 6, + "charOffset": 15040, + "charLength": 1, + "snippet": { + "text": "\t// monster:getName()\n\tconst auto monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94182cdb7430c6932a2c874005af6a7fee94f982e298bc560dd7a9960de5081f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 522, + "startColumn": 3, + "charOffset": 15137, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 520, + "startColumn": 3, + "charOffset": 15062, + "charLength": 15, + "snippet": { + "text": "\tconst auto monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3dbc5fffa40b3ce6fbf4056ad59e95b89c28c29353bbec86e3f8cf1177cf0fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 534, + "startColumn": 6, + "charOffset": 15444, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 532, + "startColumn": 6, + "charOffset": 15344, + "charLength": 1, + "snippet": { + "text": "\t// monster:setName(name[, nameDescription])\n\tauto monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42de3b196ed73319179b24a6362530e3b322f9fdafc3cd3252daf0cb7d6d9d0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_functions.cpp" + }, + "region": { + "startLine": 535, + "startColumn": 3, + "charOffset": 15458, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 533, + "startColumn": 3, + "charOffset": 15389, + "charLength": 15, + "snippet": { + "text": "\tauto monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1e4a41aee96ad2609323ae91d22203578aded6823eb08dc2d3b5af4e919be4b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 24, + "startColumn": 35, + "charOffset": 810, + "charLength": 10, + "snippet": { + "text": "0x50000001" + } + }, + "contextRegion": { + "startLine": 22, + "startColumn": 35, + "charOffset": 743, + "charLength": 10, + "snippet": { + "text": "int32_t Monster::despawnRadius;\n\nuint32_t Monster::monsterAutoID = 0x50000001;\n\nstd::shared_ptr Monster::createMonster(const std::string &name) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93a23866109e0d3546692ba5b6161a2ac34fcdc5060f7408f43e3da82e976f42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x50000001 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 24, + "startColumn": 35, + "charOffset": 810, + "charLength": 10, + "snippet": { + "text": "0x50000001" + } + }, + "contextRegion": { + "startLine": 22, + "startColumn": 35, + "charOffset": 743, + "charLength": 10, + "snippet": { + "text": "int32_t Monster::despawnRadius;\n\nuint32_t Monster::monsterAutoID = 0x50000001;\n\nstd::shared_ptr Monster::createMonster(const std::string &name) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d7d5c61dd3cc2bf71593291c0b3c76be878e6e203c276d15b6fce2003dec239" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 6, + "charOffset": 958, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 6, + "charOffset": 823, + "charLength": 1, + "snippet": { + "text": "std::shared_ptr Monster::createMonster(const std::string &name) {\n\tconst auto mType = g_monsters().getMonsterType(name);\n\tif (!mType) {\n\t\treturn nullptr;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3f7daf67bcab504337b94d174791fa05f175e6ec71d97960509162fd07c58eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'mType' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 53, + "charOffset": 1086, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 53, + "charOffset": 1031, + "charLength": 5, + "snippet": { + "text": "}\n\nMonster::Monster(const std::shared_ptr mType) :\n\tCreature(),\n\tnameDescription(asLowerCaseString(mType->nameDescription))," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27b1e9c83251a792b9827bcf82527e71bb94f9954ab34323907d5a9ddb703113" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-redundant-member-init", + "ruleIndex": 721, + "kind": "fail", + "level": "warning", + "message": { + "text": "initializer for base class 'Creature' is redundant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 35, + "startColumn": 2, + "charOffset": 1096, + "charLength": 8, + "snippet": { + "text": "Creature" + } + }, + "contextRegion": { + "startLine": 33, + "startColumn": 2, + "charOffset": 1033, + "charLength": 8, + "snippet": { + "text": "\nMonster::Monster(const std::shared_ptr mType) :\n\tCreature(),\n\tnameDescription(asLowerCaseString(mType->nameDescription)),\n\tmType(mType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "473b2cc9c4dcab5520d0303443b8c073f8b144ec9a0724897777e21ee9d9f2b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 11, + "charOffset": 1297, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 11, + "charOffset": 1222, + "charLength": 5, + "snippet": { + "text": "\tcurrentOutfit = mType->info.outfit;\n\tskull = mType->info.skull;\n\thealth = mType->info.health * mType->getHealthMultiplier();\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c85384f76d11a24f985fc04c4ce9bc81144f206e9d4cd6275ca21032e63a7b71" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 11, + "charOffset": 1297, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 11, + "charOffset": 1222, + "charLength": 5, + "snippet": { + "text": "\tcurrentOutfit = mType->info.outfit;\n\tskull = mType->info.skull;\n\thealth = mType->info.health * mType->getHealthMultiplier();\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42fa09786ee985dc2a6a2060c51c04554ee76242fdd9032d6146c057e3ebfac8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 11, + "charOffset": 1297, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 11, + "charOffset": 1222, + "charLength": 5, + "snippet": { + "text": "\tcurrentOutfit = mType->info.outfit;\n\tskull = mType->info.skull;\n\thealth = mType->info.health * mType->getHealthMultiplier();\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "846e33140aa1d4f6536de94bb146819d4ec2a76511133f059e3fe4a95f34af02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 14, + "charOffset": 1361, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 14, + "charOffset": 1259, + "charLength": 5, + "snippet": { + "text": "\tskull = mType->info.skull;\n\thealth = mType->info.health * mType->getHealthMultiplier();\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();\n\tbaseSpeed = mType->getBaseSpeed();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "050a37dfce3f2be5bd8552b8898fae46a92832d66250ff007795299252dc6a6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 14, + "charOffset": 1361, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 14, + "charOffset": 1259, + "charLength": 5, + "snippet": { + "text": "\tskull = mType->info.skull;\n\thealth = mType->info.health * mType->getHealthMultiplier();\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();\n\tbaseSpeed = mType->getBaseSpeed();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eccc895e99cba8a7e05c0786aea0d481e1761b6fd0e211e0420f937e40a2adfa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 14, + "charOffset": 1361, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 14, + "charOffset": 1259, + "charLength": 5, + "snippet": { + "text": "\tskull = mType->info.skull;\n\thealth = mType->info.health * mType->getHealthMultiplier();\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();\n\tbaseSpeed = mType->getBaseSpeed();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00aa88ef715276f0f6dfd2a6aed6490fcc1eff977cbbebb4d8b3a81c72d64519" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-prefer-member-initializer", + "ruleIndex": 504, + "kind": "fail", + "level": "warning", + "message": { + "text": "'runAwayHealth' should be initialized in a member initializer of the constructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 2, + "charOffset": 1416, + "charLength": 13, + "snippet": { + "text": "runAwayHealth" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 2, + "charOffset": 1287, + "charLength": 13, + "snippet": { + "text": "\thealth = mType->info.health * mType->getHealthMultiplier();\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();\n\tbaseSpeed = mType->getBaseSpeed();\n\tinternalLight = mType->info.light;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "407e18ebf6d8e56d319c73ba1e0fd4d98ee507a3e6cedc2e6c2b03ec3f9c8c0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 18, + "charOffset": 1432, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 18, + "charOffset": 1287, + "charLength": 5, + "snippet": { + "text": "\thealth = mType->info.health * mType->getHealthMultiplier();\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();\n\tbaseSpeed = mType->getBaseSpeed();\n\tinternalLight = mType->info.light;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e927431c81dd2f96544a750bc7c832805f96cbf3c8fc34c73225ff84f0f3637" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 18, + "charOffset": 1432, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 18, + "charOffset": 1287, + "charLength": 5, + "snippet": { + "text": "\thealth = mType->info.health * mType->getHealthMultiplier();\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();\n\tbaseSpeed = mType->getBaseSpeed();\n\tinternalLight = mType->info.light;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94581eb5676a734921994e8151a9e599715d16e783671556fe388778a76405d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 18, + "charOffset": 1432, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 18, + "charOffset": 1287, + "charLength": 5, + "snippet": { + "text": "\thealth = mType->info.health * mType->getHealthMultiplier();\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();\n\tbaseSpeed = mType->getBaseSpeed();\n\tinternalLight = mType->info.light;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4e7805567f70286c831871703682e630016c5c897b848d4fca6465c84b4f661" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-prefer-member-initializer", + "ruleIndex": 504, + "kind": "fail", + "level": "warning", + "message": { + "text": "'targetDistance' should be initialized in a member initializer of the constructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 47, + "startColumn": 2, + "charOffset": 1605, + "charLength": 14, + "snippet": { + "text": "targetDistance" + } + }, + "contextRegion": { + "startLine": 45, + "startColumn": 2, + "charOffset": 1526, + "charLength": 14, + "snippet": { + "text": "\tinternalLight = mType->info.light;\n\thiddenHealth = mType->info.hiddenHealth;\n\ttargetDistance = mType->info.targetDistance;\n\n\t// Register creature events" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7369fca863af5ecf9c6a91dc1a6489718f8ce151d2e6af88d2d1235b27467bba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 50, + "startColumn": 2, + "charOffset": 1681, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 48, + "startColumn": 2, + "charOffset": 1650, + "charLength": 3, + "snippet": { + "text": "\n\t// Register creature events\n\tfor (const std::string &scriptName : mType->info.scripts) {\n\t\tif (!registerCreatureEvent(scriptName)) {\n\t\t\tg_logger().warn(\"[Monster::Monster] - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f777f700bf820b81806a0c15c3a56e3763482fd7a15457e9414be07e28287ae6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 84, + "startColumn": 2, + "charOffset": 2495, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 2, + "charOffset": 2352, + "charLength": 3, + "snippet": { + "text": "\t// it is not feasible to send creature update to everyone that has ever met it\n\tauto spectators = Spectators().find(position, true);\n\tfor (const auto &spectator : spectators) {\n\t\tif (const auto &tmpPlayer = spectator->getPlayer()) {\n\t\t\ttmpPlayer->sendUpdateTileCreature(static_self_cast());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f965284e6621710bf260ec566ad81bf755b87d4756611ea0a922dfd5b716e61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 100, + "startColumn": 3, + "charOffset": 2915, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 98, + "startColumn": 3, + "charOffset": 2824, + "charLength": 4, + "snippet": { + "text": "bool Monster::canWalkOnFieldType(CombatType_t combatType) const {\n\tswitch (combatType) {\n\t\tcase COMBAT_ENERGYDAMAGE:\n\t\t\treturn mType->info.canWalkOnEnergy;\n\t\tcase COMBAT_FIREDAMAGE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b8728fcc70debef47356ea526aa146c2eb55a85195ab49d4a4713b3e032a78d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 102, + "startColumn": 3, + "charOffset": 2982, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 100, + "startColumn": 3, + "charOffset": 2913, + "charLength": 4, + "snippet": { + "text": "\t\tcase COMBAT_ENERGYDAMAGE:\n\t\t\treturn mType->info.canWalkOnEnergy;\n\t\tcase COMBAT_FIREDAMAGE:\n\t\t\treturn mType->info.canWalkOnFire;\n\t\tcase COMBAT_EARTHDAMAGE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30237391cb21f5c0cc6cc2e9573ad2155f208a1207b3aba035016d61a58de32a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 104, + "startColumn": 3, + "charOffset": 3045, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 102, + "startColumn": 3, + "charOffset": 2980, + "charLength": 4, + "snippet": { + "text": "\t\tcase COMBAT_FIREDAMAGE:\n\t\t\treturn mType->info.canWalkOnFire;\n\t\tcase COMBAT_EARTHDAMAGE:\n\t\t\treturn mType->info.canWalkOnPoison;\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b335a653890a839f317bc34388b8bc65519b738c7c2dddb58719f868bec3710b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 106, + "startColumn": 3, + "charOffset": 3111, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 104, + "startColumn": 3, + "charOffset": 3043, + "charLength": 7, + "snippet": { + "text": "\t\tcase COMBAT_EARTHDAMAGE:\n\t\t\treturn mType->info.canWalkOnPoison;\n\t\tdefault:\n\t\t\treturn true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "311f937c2e0707295883ceb684ca5593276fa7b0387b7219393fe220ca8d2da2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 18, + "charOffset": 3159, + "charLength": 17, + "snippet": { + "text": "getReflectPercent" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 18, + "charOffset": 3139, + "charLength": 17, + "snippet": { + "text": "}\n\nint32_t Monster::getReflectPercent(CombatType_t reflectType, bool useCharges) const {\n\tint32_t result = Creature::getReflectPercent(reflectType, useCharges);\n\tauto it = mType->info.reflectMap.find(reflectType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2bab6df418d7a889c7ed0284c36b742009894a8daa74fa2c7b711e7c9ba07ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 128, + "startColumn": 47, + "charOffset": 3696, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 126, + "startColumn": 47, + "charOffset": 3647, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Monster::onAttackedCreatureDisappear(bool) {\n\tattackTicks = 0;\n\textraMeleeAttack = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac4a3e5c51914e53e8f2ef94faa799eebc70c3a7a03d8346ba2372c420a6fde5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 139, + "startColumn": 8, + "charOffset": 4039, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 137, + "startColumn": 8, + "charOffset": 3925, + "charLength": 15, + "snippet": { + "text": "\t\t// onCreatureAppear(self, creature)\n\t\tLuaScriptInterface* scriptInterface = mType->info.scriptInterface;\n\t\tif (!scriptInterface->reserveScriptEnv()) {\n\t\t\tg_logger().error(\"[Monster::onCreatureAppear - Monster {} creature {}] \"\n\t\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b52d01b2a64235a455176c6aa7210e651251e62c4b6b3fc741ecae78ed5d97c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 146, + "startColumn": 28, + "charOffset": 4334, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 144, + "startColumn": 28, + "charOffset": 4302, + "charLength": 15, + "snippet": { + "text": "\t\t}\n\n\t\tScriptEnvironment* env = scriptInterface->getScriptEnv();\n\t\tenv->setScriptId(mType->info.creatureAppearEvent, scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6198a2aaf2b2c4431815d04cffbf05bbbc55279f2fa77f52245f244f9db674f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 150, + "startColumn": 20, + "charOffset": 4506, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 148, + "startColumn": 20, + "charOffset": 4437, + "charLength": 12, + "snippet": { + "text": "\n\t\tlua_State* L = scriptInterface->getLuaState();\n\t\tscriptInterface->pushFunction(mType->info.creatureAppearEvent);\n\n\t\tLuaScriptInterface::pushUserdata(L, getMonster());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2fac7370f94d9a4d323bef20340eb649ba68fac83a9a1294f009a271a97e424d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 177, + "startColumn": 8, + "charOffset": 5273, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 175, + "startColumn": 8, + "charOffset": 5156, + "charLength": 15, + "snippet": { + "text": "\t\t// onCreatureDisappear(self, creature)\n\t\tLuaScriptInterface* scriptInterface = mType->info.scriptInterface;\n\t\tif (!scriptInterface->reserveScriptEnv()) {\n\t\t\tg_logger().error(\"[Monster::onCreatureDisappear - Monster {} creature {}] \"\n\t\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "696ef32e8b1e6a85a39b7e3c4552f8743c75ade2a4d11fe754dfa978f05b5fb8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 184, + "startColumn": 28, + "charOffset": 5571, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 182, + "startColumn": 28, + "charOffset": 5539, + "charLength": 15, + "snippet": { + "text": "\t\t}\n\n\t\tScriptEnvironment* env = scriptInterface->getScriptEnv();\n\t\tenv->setScriptId(mType->info.creatureDisappearEvent, scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1fddc01a61809bfe25bb989cb3eb40256889bd6bd7362639e6f6f0f7eed9bc12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 188, + "startColumn": 20, + "charOffset": 5746, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 186, + "startColumn": 20, + "charOffset": 5677, + "charLength": 12, + "snippet": { + "text": "\n\t\tlua_State* L = scriptInterface->getLuaState();\n\t\tscriptInterface->pushFunction(mType->info.creatureDisappearEvent);\n\n\t\tLuaScriptInterface::pushUserdata(L, getMonster());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1bf5f70565c0939b7f6f5256dbc3b2244aff60e8a5ca12289c3f40bbf923188" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 202, + "startColumn": 7, + "charOffset": 6133, + "charLength": 12, + "snippet": { + "text": "spawnMonster" + } + }, + "contextRegion": { + "startLine": 200, + "startColumn": 7, + "charOffset": 6095, + "charLength": 12, + "snippet": { + "text": "\n\tif (creature.get() == this) {\n\t\tif (spawnMonster) {\n\t\t\tspawnMonster->startSpawnMonsterCheck();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "847b176abea940db01256a837c1088cb8f3b542e5ecd842f819138ed23e04aaf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'SpawnMonster *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 202, + "startColumn": 7, + "charOffset": 6133, + "charLength": 12, + "snippet": { + "text": "spawnMonster" + } + }, + "contextRegion": { + "startLine": 200, + "startColumn": 7, + "charOffset": 6095, + "charLength": 12, + "snippet": { + "text": "\n\tif (creature.get() == this) {\n\t\tif (spawnMonster) {\n\t\t\tspawnMonster->startSpawnMonsterCheck();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36634d4e93c77049f9dfaa0dd36a824f2b5627e1347a2cfb451b586f92b3f245" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'onCreatureMove' has cognitive complexity of 36 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 212, + "startColumn": 15, + "charOffset": 6273, + "charLength": 14, + "snippet": { + "text": "onCreatureMove" + } + }, + "contextRegion": { + "startLine": 210, + "startColumn": 15, + "charOffset": 6256, + "charLength": 14, + "snippet": { + "text": "}\n\nvoid Monster::onCreatureMove(const std::shared_ptr &creature, const std::shared_ptr &newTile, const Position &newPos, const std::shared_ptr &oldTile, const Position &oldPos, bool teleport) {\n\tCreature::onCreatureMove(creature, newTile, newPos, oldTile, oldPos, teleport);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43bc20682a8d8542b42a068e9a8386d90ffb6720b5925f55a1bafbf7dde311f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 218, + "startColumn": 8, + "charOffset": 6736, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 216, + "startColumn": 8, + "charOffset": 6598, + "charLength": 15, + "snippet": { + "text": "\t\t// onCreatureMove(self, creature, oldPosition, newPosition)\n\t\tLuaScriptInterface* scriptInterface = mType->info.scriptInterface;\n\t\tif (!scriptInterface->reserveScriptEnv()) {\n\t\t\tg_logger().error(\"[Monster::onCreatureMove - Monster {} creature {}] \"\n\t\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1da7b7346899a1e04d8718ef0aab5c56193c860623ff96dbd059fe81210ef476" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 225, + "startColumn": 28, + "charOffset": 7029, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 223, + "startColumn": 28, + "charOffset": 6997, + "charLength": 15, + "snippet": { + "text": "\t\t}\n\n\t\tScriptEnvironment* env = scriptInterface->getScriptEnv();\n\t\tenv->setScriptId(mType->info.creatureMoveEvent, scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab20ab7502c5450b79e21167fb243b015b140ce2f8bd4061c0a8e9995e8e2b6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 229, + "startColumn": 20, + "charOffset": 7199, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 227, + "startColumn": 20, + "charOffset": 7130, + "charLength": 12, + "snippet": { + "text": "\n\t\tlua_State* L = scriptInterface->getLuaState();\n\t\tscriptInterface->pushFunction(mType->info.creatureMoveEvent);\n\n\t\tLuaScriptInterface::pushUserdata(L, getMonster());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8686b9ccdc6002191c9ca28c5051efdf59a88ee8c2d99ea900a61d8650287801" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 252, + "startColumn": 3, + "charOffset": 7803, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 250, + "startColumn": 3, + "charOffset": 7762, + "charLength": 2, + "snippet": { + "text": "\t\tbool canSeeOldPos = canSee(oldPos);\n\n\t\tif (canSeeNewPos && !canSeeOldPos) {\n\t\t\tonCreatureEnter(creature);\n\t\t} else if (!canSeeNewPos && canSeeOldPos) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7a93d8604bee9d08a4d4a82f3d4011a7fb4ac2f2f5bf7d136c45ef35e4845fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 261, + "startColumn": 4, + "charOffset": 7998, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 259, + "startColumn": 4, + "charOffset": 7973, + "charLength": 2, + "snippet": { + "text": "\n\t\tif (!isSummon()) {\n\t\t\tif (const auto &followCreature = getFollowCreature()) {\n\t\t\t\tconst Position &followPosition = followCreature->getPosition();\n\t\t\t\tconst Position &pos = getPosition();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a03d35b145f1e1efe863373cb9de64ca8f1a62a5e040e25570aadc769e27b3c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 274, + "startColumn": 8, + "charOffset": 8707, + "charLength": 12, + "snippet": { + "text": "selectTarget" + } + }, + "contextRegion": { + "startLine": 272, + "startColumn": 8, + "charOffset": 8570, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t\t\tconst auto &topCreature = nextTile->getTopCreature();\n\t\t\t\t\t\tif (followCreature != topCreature && isOpponent(topCreature)) {\n\t\t\t\t\t\t\tselectTarget(topCreature);\n\t\t\t\t\t\t}\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6ad23d9416258d75689175fa7514fbdc5a6d0bc77b441becadd4956b0eff6f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 280, + "startColumn": 5, + "charOffset": 8845, + "charLength": 12, + "snippet": { + "text": "selectTarget" + } + }, + "contextRegion": { + "startLine": 278, + "startColumn": 5, + "charOffset": 8755, + "charLength": 12, + "snippet": { + "text": "\t\t\t} else if (isOpponent(creature)) {\n\t\t\t\t// we have no target lets try pick this one\n\t\t\t\tselectTarget(creature);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64382fb89c3cfa0bfb21ca0bdf515feeeb6b6a88b0f8e8ebdf4d68c2d35492ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 292, + "startColumn": 8, + "charOffset": 9212, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 290, + "startColumn": 8, + "charOffset": 9086, + "charLength": 15, + "snippet": { + "text": "\t\t// onCreatureSay(self, creature, type, message)\n\t\tLuaScriptInterface* scriptInterface = mType->info.scriptInterface;\n\t\tif (!scriptInterface->reserveScriptEnv()) {\n\t\t\tg_logger().error(\"Monster {} creature {}] Call stack overflow. Too many lua \"\n\t\t\t \"script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5554515852a18d0cef0e0b6664558d7ebdb117debb0dcd4e644755f5383ae13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 299, + "startColumn": 28, + "charOffset": 9478, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 297, + "startColumn": 28, + "charOffset": 9446, + "charLength": 15, + "snippet": { + "text": "\t\t}\n\n\t\tScriptEnvironment* env = scriptInterface->getScriptEnv();\n\t\tenv->setScriptId(mType->info.creatureSayEvent, scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45aa4d94bb5e7159504a32e250944936962843962292a73b86a399c4dd48cf53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 303, + "startColumn": 20, + "charOffset": 9647, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 301, + "startColumn": 20, + "charOffset": 9578, + "charLength": 12, + "snippet": { + "text": "\n\t\tlua_State* L = scriptInterface->getLuaState();\n\t\tscriptInterface->pushFunction(mType->info.creatureSayEvent);\n\n\t\tLuaScriptInterface::pushUserdata(L, getMonster());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2f5910f0b93225b5bfcf298cd6f73cde06138a915456df8dfe3fdceaf50f6b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 311, + "startColumn": 21, + "charOffset": 9950, + "charLength": 4, + "snippet": { + "text": "type" + } + }, + "contextRegion": { + "startLine": 309, + "startColumn": 21, + "charOffset": 9868, + "charLength": 4, + "snippet": { + "text": "\t\tLuaScriptInterface::setCreatureMetatable(L, -1, creature);\n\n\t\tlua_pushnumber(L, type);\n\t\tLuaScriptInterface::pushString(L, text);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60554a88f953941874589b95cf19ab3cea17c2c0b90ead36a9867b11be3a591c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 325, + "startColumn": 13, + "charOffset": 10288, + "charLength": 11, + "snippet": { + "text": "try_emplace" + } + }, + "contextRegion": { + "startLine": 323, + "startColumn": 13, + "charOffset": 10240, + "charLength": 11, + "snippet": { + "text": "\n\tassert(creature != getMonster());\n\tfriendList.try_emplace(creature->getID(), creature);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ff221a06d233fe8a3dadab8b840d3ee0d45ff8269312044f6fb85ec86740940" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 329, + "startColumn": 2, + "charOffset": 10406, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 327, + "startColumn": 2, + "charOffset": 10332, + "charLength": 3, + "snippet": { + "text": "\nvoid Monster::removeFriend(const std::shared_ptr &creature) {\n\tstd::erase_if(friendList, [id = creature->getID()](const auto &it) {\n\t\tconst auto &target = it.second.lock();\n\t\treturn !target || target->getID() == id;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25da841e3070ed5f39471c2f541389c638e91b8144d07a41f20e1af70a39e6f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 331, + "startColumn": 10, + "charOffset": 10525, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 329, + "startColumn": 10, + "charOffset": 10405, + "charLength": 1, + "snippet": { + "text": "\tstd::erase_if(friendList, [id = creature->getID()](const auto &it) {\n\t\tconst auto &target = it.second.lock();\n\t\treturn !target || target->getID() == id;\n\t});\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0fc446f36a89391af1074e6e1121da116bad084e3ec5ad091feb4893e7eacbd3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 349, + "startColumn": 14, + "charOffset": 10961, + "charLength": 13, + "snippet": { + "text": "emplace_front" + } + }, + "contextRegion": { + "startLine": 347, + "startColumn": 14, + "charOffset": 10929, + "charLength": 13, + "snippet": { + "text": "\n\tif (pushFront) {\n\t\ttargetList.emplace_front(creature);\n\t} else {\n\t\ttargetList.emplace_back(creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c81ab3d6911210b0b32bd1906873e47b1569aa14c853a68bc987438658fd2982" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 351, + "startColumn": 14, + "charOffset": 11009, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 349, + "startColumn": 14, + "charOffset": 10948, + "charLength": 12, + "snippet": { + "text": "\t\ttargetList.emplace_front(creature);\n\t} else {\n\t\ttargetList.emplace_back(creature);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b4e58b16cfd485b16bbfb446585593b6f5502adfde36fc6b6188874ee2eb8a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 354, + "startColumn": 6, + "charOffset": 11042, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 352, + "startColumn": 6, + "charOffset": 11033, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!getMaster() && getFaction() != FACTION_DEFAULT && creature->getPlayer()) {\n\t\ttotalPlayersOnScreen++;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7dc915d2a88b747824926984c31d47a09a22771ca1670af8181e21ab28d994b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 362, + "startColumn": 6, + "charOffset": 11242, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 360, + "startColumn": 6, + "charOffset": 11164, + "charLength": 1, + "snippet": { + "text": "\nbool Monster::removeTarget(const std::shared_ptr &creature) {\n\tif (!creature) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c147181474e85f81fb93315ebf0006f216921b2b0034ca4c7018c00e33e4070" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 371, + "startColumn": 6, + "charOffset": 11378, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 369, + "startColumn": 6, + "charOffset": 11369, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!getMaster() && getFaction() != FACTION_DEFAULT && creature->getPlayer()) {\n\t\ttotalPlayersOnScreen--;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a0d4dbc981587a705b7138d475866829e07cd906009ab28eb1a0d6e5459f041" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 375, + "startColumn": 13, + "charOffset": 11496, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 373, + "startColumn": 13, + "charOffset": 11480, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\ttargetList.erase(it);\n\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "151ab1b37ba94cfbe54dd0b6b2bca60e3a73d1fbc611b01362b7048af4b86832" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 381, + "startColumn": 2, + "charOffset": 11561, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 379, + "startColumn": 2, + "charOffset": 11524, + "charLength": 3, + "snippet": { + "text": "\nvoid Monster::updateTargetList() {\n\tstd::erase_if(friendList, [this](const auto &it) {\n\t\tconst auto &target = it.second.lock();\n\t\treturn !target || target->getHealth() <= 0 || !canSee(target->getPosition());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac900c87754eb1cd328fbdb0aa659ea5b78864d793bb4991dc93db0b9fbdf18b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 383, + "startColumn": 10, + "charOffset": 11662, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 381, + "startColumn": 10, + "charOffset": 11560, + "charLength": 1, + "snippet": { + "text": "\tstd::erase_if(friendList, [this](const auto &it) {\n\t\tconst auto &target = it.second.lock();\n\t\treturn !target || target->getHealth() <= 0 || !canSee(target->getPosition());\n\t});\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "295ab392f662102738400a744baf8dd1a7410a6326a4cb766153200800d24999" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 383, + "startColumn": 49, + "charOffset": 11701, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 381, + "startColumn": 49, + "charOffset": 11560, + "charLength": 1, + "snippet": { + "text": "\tstd::erase_if(friendList, [this](const auto &it) {\n\t\tconst auto &target = it.second.lock();\n\t\treturn !target || target->getHealth() <= 0 || !canSee(target->getPosition());\n\t});\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3701ff7a1411d457a1a30520fa738815a1bf0bfa9651ce03c862a7b48fb003f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 386, + "startColumn": 2, + "charOffset": 11740, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 384, + "startColumn": 2, + "charOffset": 11733, + "charLength": 3, + "snippet": { + "text": "\t});\n\n\tstd::erase_if(targetList, [this](const std::weak_ptr &ref) {\n\t\tconst auto &target = ref.lock();\n\t\treturn !target || target->getHealth() <= 0 || !canSee(target->getPosition());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1bf26825f45e7d7b3726ff8018c1d1c4f624027893e3dc59853b5d1aacc96a7b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 388, + "startColumn": 10, + "charOffset": 11855, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 386, + "startColumn": 10, + "charOffset": 11739, + "charLength": 1, + "snippet": { + "text": "\tstd::erase_if(targetList, [this](const std::weak_ptr &ref) {\n\t\tconst auto &target = ref.lock();\n\t\treturn !target || target->getHealth() <= 0 || !canSee(target->getPosition());\n\t});\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "158174e10e7aca17c3e68ee4c9a83aca08dd39bbf5721aa0dcccada74a6186c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 391, + "startColumn": 2, + "charOffset": 11933, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 389, + "startColumn": 2, + "charOffset": 11926, + "charLength": 3, + "snippet": { + "text": "\t});\n\n\tfor (const auto &spectator : Spectators().find(position, true)) {\n\t\tif (spectator.get() != this && canSee(spectator->getPosition())) {\n\t\t\tonCreatureFound(spectator);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1511cad261c8c21c023cad8fded0391dfc00167b15c91bd911062b6b6b635036" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 406, + "startColumn": 57, + "charOffset": 12291, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 404, + "startColumn": 57, + "charOffset": 12232, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Monster::onCreatureFound(std::shared_ptr creature, bool pushFront /* = false*/) {\n\tif (isFriend(creature)) {\n\t\taddFriend(creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52c3e5c68b1678895322db5acd229f9227df15d3a916666870b60dcb008ba452" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 412, + "startColumn": 3, + "charOffset": 12417, + "charLength": 9, + "snippet": { + "text": "addTarget" + } + }, + "contextRegion": { + "startLine": 410, + "startColumn": 3, + "charOffset": 12385, + "charLength": 9, + "snippet": { + "text": "\n\tif (isOpponent(creature)) {\n\t\taddTarget(creature, pushFront);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ede8676f9c96ab39192bb9159752a433ed1a11bff961eb67127e03058ef3ffd7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 427, + "startColumn": 7, + "charOffset": 12818, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 425, + "startColumn": 7, + "charOffset": 12769, + "charLength": 1, + "snippet": { + "text": "\t\tauto tmpPlayer = creature->getPlayer();\n\n\t\tif (!tmpPlayer) {\n\t\t\tconst auto &creatureMaster = creature->getMaster();\n\t\t\tif (creatureMaster && creatureMaster->getPlayer()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c049fc5f0db436800efae31bfed4551da918a3412539f9a3c57aed7f2f270de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 443, + "startColumn": 6, + "charOffset": 13250, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 441, + "startColumn": 6, + "charOffset": 13168, + "charLength": 1, + "snippet": { + "text": "\nbool Monster::isOpponent(const std::shared_ptr &creature) const {\n\tif (!creature) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6734a7445763b75e5762385397cb93912a6f053b59569812ddba943c16105d21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 466, + "startColumn": 57, + "charOffset": 13813, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 464, + "startColumn": 57, + "charOffset": 13754, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Monster::onCreatureLeave(std::shared_ptr creature) {\n\t// update friendList\n\tif (isFriend(creature)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09200b35686e999f4741d95d1052e2b32d41ca50d1a88d69c4cbccbdb04b2473" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 474, + "startColumn": 3, + "charOffset": 13957, + "charLength": 12, + "snippet": { + "text": "removeTarget" + } + }, + "contextRegion": { + "startLine": 472, + "startColumn": 3, + "charOffset": 13904, + "charLength": 12, + "snippet": { + "text": "\t// update targetList\n\tif (isOpponent(creature)) {\n\t\tremoveTarget(creature);\n\t\tif (targetList.empty()) {\n\t\t\tupdateIdleStatus();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "857ed7b0942b4c419834dbab2d38f86100bce67e24a486010a2ed81675aa1f30" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'searchTarget' has cognitive complexity of 86 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 481, + "startColumn": 15, + "charOffset": 14056, + "charLength": 12, + "snippet": { + "text": "searchTarget" + } + }, + "contextRegion": { + "startLine": 479, + "startColumn": 15, + "charOffset": 14039, + "charLength": 12, + "snippet": { + "text": "}\n\nbool Monster::searchTarget(TargetSearchType_t searchType /*= TARGETSEARCH_DEFAULT*/) {\n\tif (searchType == TARGETSEARCH_DEFAULT) {\n\t\tint32_t rnd = uniform_random(1, 100);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ffb78521a5ea3ea162e6729c3d27343e5d65b267035ed4decfd7d4015036b35e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 483, + "startColumn": 35, + "charOffset": 14206, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 481, + "startColumn": 35, + "charOffset": 14042, + "charLength": 3, + "snippet": { + "text": "bool Monster::searchTarget(TargetSearchType_t searchType /*= TARGETSEARCH_DEFAULT*/) {\n\tif (searchType == TARGETSEARCH_DEFAULT) {\n\t\tint32_t rnd = uniform_random(1, 100);\n\n\t\tsearchType = TARGETSEARCH_NEAREST;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83249b6b5b1d002d290ee25256024a562324cdcb81ef94064a3490fae513f638" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 505, + "startColumn": 2, + "charOffset": 14699, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 503, + "startColumn": 2, + "charOffset": 14657, + "charLength": 3, + "snippet": { + "text": "\tconst Position &myPos = getPosition();\n\n\tfor (const auto &cref : targetList) {\n\t\tconst auto &creature = cref.lock();\n\t\tif (creature && isTarget(creature)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ffed963917e0bfff76cff80e20f22858ec6ff243302d169275841fb988f4f2f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 530, + "startColumn": 78, + "charOffset": 15532, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 528, + "startColumn": 78, + "charOffset": 15254, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tconst Position &targetPosition = getTarget->getPosition();\n\t\t\t\t\tint32_t minRange = std::max(Position::getDistanceX(myPos, targetPosition), Position::getDistanceY(myPos, targetPosition));\n\t\t\t\t\tint32_t factionOffset = static_cast(getTarget->getFaction()) * 100;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tconst Position &pos = (*it)->getPosition();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4808edca6cc06b815f38c8ee110e778be98087495306a54c11f0f0d8409aff91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 531, + "startColumn": 6, + "charOffset": 15542, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 529, + "startColumn": 6, + "charOffset": 15318, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tint32_t minRange = std::max(Position::getDistanceX(myPos, targetPosition), Position::getDistanceY(myPos, targetPosition));\n\t\t\t\t\tint32_t factionOffset = static_cast(getTarget->getFaction()) * 100;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tconst Position &pos = (*it)->getPosition();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3de2288e14d0f147bb39cff8a993e8c3ea581056165feea4195c192d87bd3070" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 531, + "startColumn": 6, + "charOffset": 15542, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 529, + "startColumn": 6, + "charOffset": 15318, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tint32_t minRange = std::max(Position::getDistanceX(myPos, targetPosition), Position::getDistanceY(myPos, targetPosition));\n\t\t\t\t\tint32_t factionOffset = static_cast(getTarget->getFaction()) * 100;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tconst Position &pos = (*it)->getPosition();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5cbe3c4e9a9575e49080b1c19d676b65596e8335e06567165c5400d380ef447e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (do loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 539, + "startColumn": 15, + "charOffset": 15837, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 537, + "startColumn": 15, + "charOffset": 15787, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\t\t\tminRange = distance;\n\t\t\t\t\t\t}\n\t\t\t\t\t} while (++it != resultList.end());\n\t\t\t\t}\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a6d11c70a105096939669aa97ac332504511c79d1902c87d4ba8501dc912e11" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 539, + "startColumn": 34, + "charOffset": 15856, + "charLength": 3, + "snippet": { + "text": "end" + } + }, + "contextRegion": { + "startLine": 537, + "startColumn": 34, + "charOffset": 15787, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\t\t\tminRange = distance;\n\t\t\t\t\t\t}\n\t\t\t\t\t} while (++it != resultList.end());\n\t\t\t\t}\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c493e914611b5344ce22da46d3573c22d97bd298f69b87af90a328a399e82131" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 543, + "startColumn": 5, + "charOffset": 15946, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 541, + "startColumn": 5, + "charOffset": 15870, + "charLength": 3, + "snippet": { + "text": "\t\t\t} else {\n\t\t\t\tint32_t minRange = std::numeric_limits::max();\n\t\t\t\tfor (const auto &creature : getTargetList()) {\n\t\t\t\t\tif (!isTarget(creature)) {\n\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac29cc980818aefa6432555e8e0c3a40f75df5b00ed56e10068179107d7c6b7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 549, + "startColumn": 78, + "charOffset": 16178, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 547, + "startColumn": 78, + "charOffset": 16048, + "charLength": 3, + "snippet": { + "text": "\n\t\t\t\t\tconst Position &pos = creature->getPosition();\n\t\t\t\t\tint32_t factionOffset = static_cast(getTarget->getFaction()) * 100;\n\t\t\t\t\tint32_t distance = std::max(Position::getDistanceX(myPos, pos), Position::getDistanceY(myPos, pos)) + factionOffset;\n\t\t\t\t\tif (distance < minRange) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08bfdadab29f24467d0e3bffeead077a41dda88ecba04bf1b895846bcde754df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 569, + "startColumn": 78, + "charOffset": 16751, + "charLength": 6, + "snippet": { + "text": "100000" + } + }, + "contextRegion": { + "startLine": 567, + "startColumn": 78, + "charOffset": 16617, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tgetTarget = *it;\n\t\t\t\tif (++it != resultList.end()) {\n\t\t\t\t\tint32_t factionOffset = static_cast(getTarget->getFaction()) * 100000;\n\t\t\t\t\tint32_t minHp = getTarget->getHealth() + factionOffset;\n\t\t\t\t\tdo {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19bd1f868a8b8ab30ab6bd81860a4ecf0109e8d3f6e9c5d14c218f0a7ad80650" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 571, + "startColumn": 6, + "charOffset": 16825, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 569, + "startColumn": 6, + "charOffset": 16674, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tint32_t factionOffset = static_cast(getTarget->getFaction()) * 100000;\n\t\t\t\t\tint32_t minHp = getTarget->getHealth() + factionOffset;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tauto hp = (*it)->getHealth() + factionOffset;\n\t\t\t\t\t\tfactionOffset = static_cast((*it)->getFaction()) * 100000;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "698824047c1f3354bbae6fbc380a540b12e7f3bbfc198b80777e153cb1586f89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 571, + "startColumn": 6, + "charOffset": 16825, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 569, + "startColumn": 6, + "charOffset": 16674, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tint32_t factionOffset = static_cast(getTarget->getFaction()) * 100000;\n\t\t\t\t\tint32_t minHp = getTarget->getHealth() + factionOffset;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tauto hp = (*it)->getHealth() + factionOffset;\n\t\t\t\t\t\tfactionOffset = static_cast((*it)->getFaction()) * 100000;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb102e1cb73cbc874ffda442bc5d722f17f77d0c81664a8a8745bfe24d3c0de9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 573, + "startColumn": 67, + "charOffset": 16948, + "charLength": 6, + "snippet": { + "text": "100000" + } + }, + "contextRegion": { + "startLine": 571, + "startColumn": 67, + "charOffset": 16820, + "charLength": 6, + "snippet": { + "text": "\t\t\t\t\tdo {\n\t\t\t\t\t\tauto hp = (*it)->getHealth() + factionOffset;\n\t\t\t\t\t\tfactionOffset = static_cast((*it)->getFaction()) * 100000;\n\t\t\t\t\t\tif (hp < minHp) {\n\t\t\t\t\t\t\tgetTarget = *it;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee79a263159b161768817a16d6a9543cf1a1969d9321a0167d2a3405db997207" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (do loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 578, + "startColumn": 15, + "charOffset": 17045, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 576, + "startColumn": 15, + "charOffset": 17004, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\t\t\tminHp = hp;\n\t\t\t\t\t\t}\n\t\t\t\t\t} while (++it != resultList.end());\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81029e00d04ac6f0dcb1060b621d38c5c9a994abe03e55e30e0e9154df3145f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 578, + "startColumn": 34, + "charOffset": 17064, + "charLength": 3, + "snippet": { + "text": "end" + } + }, + "contextRegion": { + "startLine": 576, + "startColumn": 34, + "charOffset": 17004, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\t\t\tminHp = hp;\n\t\t\t\t\t\t}\n\t\t\t\t\t} while (++it != resultList.end());\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50b8f1ee587e204f584853c3b1d284010fecfb5f6f6efb75c5aafc17088c264d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 593, + "startColumn": 6, + "charOffset": 17375, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 591, + "startColumn": 6, + "charOffset": 17305, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tif (++it != resultList.end()) {\n\t\t\t\t\tint32_t mostDamage = 0;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tint32_t factionOffset = static_cast((*it)->getFaction()) * 100000;\n\t\t\t\t\t\tconst auto dmg = damageMap.find((*it)->getID());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02e4c90a411ed4e81808843efe1fa43819d896008592a144c59adc0df770be38" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 593, + "startColumn": 6, + "charOffset": 17375, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 591, + "startColumn": 6, + "charOffset": 17305, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tif (++it != resultList.end()) {\n\t\t\t\t\tint32_t mostDamage = 0;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tint32_t factionOffset = static_cast((*it)->getFaction()) * 100000;\n\t\t\t\t\t\tconst auto dmg = damageMap.find((*it)->getID());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7115ffdb1be32ac8f8d95cbbf2f444ebd2b09451b911aa9ed96b771d4b0cf54a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 594, + "startColumn": 75, + "charOffset": 17454, + "charLength": 6, + "snippet": { + "text": "100000" + } + }, + "contextRegion": { + "startLine": 592, + "startColumn": 75, + "charOffset": 17341, + "charLength": 6, + "snippet": { + "text": "\t\t\t\t\tint32_t mostDamage = 0;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tint32_t factionOffset = static_cast((*it)->getFaction()) * 100000;\n\t\t\t\t\t\tconst auto dmg = damageMap.find((*it)->getID());\n\t\t\t\t\t\tif (dmg != damageMap.end() && dmg->second.total + factionOffset > mostDamage) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0668be9a9a1979a5f64fb4f5a94c0e293ba5e81cf7334243d53c71a4f58c2bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (do loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 600, + "startColumn": 15, + "charOffset": 17688, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 598, + "startColumn": 15, + "charOffset": 17642, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\t\t\tgetTarget = *it;\n\t\t\t\t\t\t}\n\t\t\t\t\t} while (++it != resultList.end());\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4609159d799d7c6458238a149ded29e5ea7c6bb26d81ba2bfb38d4b80d2e7cef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 600, + "startColumn": 34, + "charOffset": 17707, + "charLength": 3, + "snippet": { + "text": "end" + } + }, + "contextRegion": { + "startLine": 598, + "startColumn": 34, + "charOffset": 17642, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\t\t\tgetTarget = *it;\n\t\t\t\t\t\t}\n\t\t\t\t\t} while (++it != resultList.end());\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f0804dd964f0aeb9279029c6466c80be95943cf93002ca5061387eddbf2cf1c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 609, + "startColumn": 3, + "charOffset": 17839, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 607, + "startColumn": 3, + "charOffset": 17805, + "charLength": 7, + "snippet": { + "text": "\t\t}\n\t\tcase TARGETSEARCH_RANDOM:\n\t\tdefault: {\n\t\t\tif (!resultList.empty()) {\n\t\t\t\tauto it = resultList.begin();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed4dc996a501fff41fa803b854ee35a342d816f3c942149210c8771338f6caa6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 612, + "startColumn": 40, + "charOffset": 17953, + "charLength": 10, + "snippet": { + "text": "resultList" + } + }, + "contextRegion": { + "startLine": 610, + "startColumn": 40, + "charOffset": 17850, + "charLength": 10, + "snippet": { + "text": "\t\t\tif (!resultList.empty()) {\n\t\t\t\tauto it = resultList.begin();\n\t\t\t\tstd::advance(it, uniform_random(0, resultList.size() - 1));\n\t\t\t\treturn selectTarget(*it);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78a3cfc7e0f50defb6041e476581bf6b215817e565d249a1dc3ab96c94a5d7f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 612, + "startColumn": 40, + "charOffset": 17953, + "charLength": 10, + "snippet": { + "text": "resultList" + } + }, + "contextRegion": { + "startLine": 610, + "startColumn": 40, + "charOffset": 17850, + "charLength": 10, + "snippet": { + "text": "\t\t\tif (!resultList.empty()) {\n\t\t\t\tauto it = resultList.begin();\n\t\t\t\tstd::advance(it, uniform_random(0, resultList.size() - 1));\n\t\t\t\treturn selectTarget(*it);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "875d98f5973b35fd60c04cf3931a6cabb8694929756cd0eca078c5affa9fc508" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 627, + "startColumn": 3, + "charOffset": 18368, + "charLength": 9, + "snippet": { + "text": "addTarget" + } + }, + "contextRegion": { + "startLine": 625, + "startColumn": 3, + "charOffset": 18217, + "charLength": 9, + "snippet": { + "text": "void Monster::onFollowCreatureComplete(const std::shared_ptr &creature) {\n\tif (removeTarget(creature) && (hasFollowPath || !isSummon())) {\n\t\taddTarget(creature, hasFollowPath);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b182821e2d8b9fee9921d84b5ad7b6445508f3870cf70a57dc4b5f72ea12c1f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 634, + "startColumn": 75, + "charOffset": 18666, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 632, + "startColumn": 75, + "charOffset": 18449, + "charLength": 5, + "snippet": { + "text": "\tfloat mitigation = mType->info.mitigation * getDefenseMultiplier();\n\tif (g_configManager().getBoolean(DISABLE_MONSTER_ARMOR, __FUNCTION__)) {\n\t\tmitigation += std::ceil(static_cast(getDefense() + getArmor()) / 100.f) * getDefenseMultiplier() * 2.f;\n\t}\n\treturn std::min(mitigation, 30.f);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23504a444269c59c4754911cf51c0d68260130f8f071838917d659f7aae96930" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 634, + "startColumn": 75, + "charOffset": 18666, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 632, + "startColumn": 75, + "charOffset": 18449, + "charLength": 5, + "snippet": { + "text": "\tfloat mitigation = mType->info.mitigation * getDefenseMultiplier();\n\tif (g_configManager().getBoolean(DISABLE_MONSTER_ARMOR, __FUNCTION__)) {\n\t\tmitigation += std::ceil(static_cast(getDefense() + getArmor()) / 100.f) * getDefenseMultiplier() * 2.f;\n\t}\n\treturn std::min(mitigation, 30.f);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4aa0a16c593d08e5e6a3a059c44e5e8665fa0a70f998aa45f694ce9c8a610a04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 634, + "startColumn": 109, + "charOffset": 18700, + "charLength": 3, + "snippet": { + "text": "2.f" + } + }, + "contextRegion": { + "startLine": 632, + "startColumn": 109, + "charOffset": 18449, + "charLength": 3, + "snippet": { + "text": "\tfloat mitigation = mType->info.mitigation * getDefenseMultiplier();\n\tif (g_configManager().getBoolean(DISABLE_MONSTER_ARMOR, __FUNCTION__)) {\n\t\tmitigation += std::ceil(static_cast(getDefense() + getArmor()) / 100.f) * getDefenseMultiplier() * 2.f;\n\t}\n\treturn std::min(mitigation, 30.f);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa44b9e42e18e1bc3fa89eed2baafb0dc8be2b8179e00936ada3f85833615891" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 634, + "startColumn": 109, + "charOffset": 18700, + "charLength": 3, + "snippet": { + "text": "2.f" + } + }, + "contextRegion": { + "startLine": 632, + "startColumn": 109, + "charOffset": 18449, + "charLength": 3, + "snippet": { + "text": "\tfloat mitigation = mType->info.mitigation * getDefenseMultiplier();\n\tif (g_configManager().getBoolean(DISABLE_MONSTER_ARMOR, __FUNCTION__)) {\n\t\tmitigation += std::ceil(static_cast(getDefense() + getArmor()) / 100.f) * getDefenseMultiplier() * 2.f;\n\t}\n\treturn std::min(mitigation, 30.f);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cfb50dd749a7157c035b4a61efe73981543fea6890cf9e785f91ab8f4e295c70" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2.f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 634, + "startColumn": 109, + "charOffset": 18700, + "charLength": 3, + "snippet": { + "text": "2.f" + } + }, + "contextRegion": { + "startLine": 632, + "startColumn": 109, + "charOffset": 18449, + "charLength": 3, + "snippet": { + "text": "\tfloat mitigation = mType->info.mitigation * getDefenseMultiplier();\n\tif (g_configManager().getBoolean(DISABLE_MONSTER_ARMOR, __FUNCTION__)) {\n\t\tmitigation += std::ceil(static_cast(getDefense() + getArmor()) / 100.f) * getDefenseMultiplier() * 2.f;\n\t}\n\treturn std::min(mitigation, 30.f);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17410e53479cd1e55332fc371c847f07f3567f115980dad05fa2a2d2426a5a82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 636, + "startColumn": 37, + "charOffset": 18744, + "charLength": 4, + "snippet": { + "text": "30.f" + } + }, + "contextRegion": { + "startLine": 634, + "startColumn": 37, + "charOffset": 18592, + "charLength": 4, + "snippet": { + "text": "\t\tmitigation += std::ceil(static_cast(getDefense() + getArmor()) / 100.f) * getDefenseMultiplier() * 2.f;\n\t}\n\treturn std::min(mitigation, 30.f);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1e9c5fbe136257e21cb87d264044c9eb58638ae7b43abdb3952f4b3a92b5780" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 636, + "startColumn": 37, + "charOffset": 18744, + "charLength": 4, + "snippet": { + "text": "30.f" + } + }, + "contextRegion": { + "startLine": 634, + "startColumn": 37, + "charOffset": 18592, + "charLength": 4, + "snippet": { + "text": "\t\tmitigation += std::ceil(static_cast(getDefense() + getArmor()) / 100.f) * getDefenseMultiplier() * 2.f;\n\t}\n\treturn std::min(mitigation, 30.f);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22c2fd95b965674692e76cb9fdb55b31f1f73c1598407183e75028cbcd6819aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30.f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 636, + "startColumn": 37, + "charOffset": 18744, + "charLength": 4, + "snippet": { + "text": "30.f" + } + }, + "contextRegion": { + "startLine": 634, + "startColumn": 37, + "charOffset": 18592, + "charLength": 4, + "snippet": { + "text": "\t\tmitigation += std::ceil(static_cast(getDefense() + getArmor()) / 100.f) * getDefenseMultiplier() * 2.f;\n\t}\n\treturn std::min(mitigation, 30.f);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "085011595339e066b18979bcb149bb9c77aaced6ae52635286f485e6d681abbb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 639, + "startColumn": 22, + "charOffset": 18775, + "charLength": 8, + "snippet": { + "text": "blockHit" + } + }, + "contextRegion": { + "startLine": 637, + "startColumn": 22, + "charOffset": 18751, + "charLength": 8, + "snippet": { + "text": "}\n\nBlockType_t Monster::blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense /* = false*/, bool checkArmor /* = false*/, bool /* field = false */) {\n\tBlockType_t blockType = Creature::blockHit(attacker, combatType, damage, checkDefense, checkArmor);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2bab6df418d7a889c7ed0284c36b742009894a8daa74fa2c7b711e7c9ba07ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 656, + "startColumn": 45, + "charOffset": 19551, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 654, + "startColumn": 45, + "charOffset": 19481, + "charLength": 6, + "snippet": { + "text": "\n\t\tif (elementMod != 0) {\n\t\t\tdamage = static_cast(std::round(damage * ((100 - elementMod) / 100.)));\n\t\t\tif (damage <= 0) {\n\t\t\t\tdamage = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "621b51d84587e712696e1bf154d2ed97e60ad3b838a4c323b65cee0da7fe82e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 656, + "startColumn": 55, + "charOffset": 19561, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 654, + "startColumn": 55, + "charOffset": 19481, + "charLength": 1, + "snippet": { + "text": "\n\t\tif (elementMod != 0) {\n\t\t\tdamage = static_cast(std::round(damage * ((100 - elementMod) / 100.)));\n\t\t\tif (damage <= 0) {\n\t\t\t\tdamage = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9465c6cf864b9fc44de0325838e5ef6e2ba5415715e9a5616f23a8fb69a9fcba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 656, + "startColumn": 56, + "charOffset": 19562, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 654, + "startColumn": 56, + "charOffset": 19481, + "charLength": 3, + "snippet": { + "text": "\n\t\tif (elementMod != 0) {\n\t\t\tdamage = static_cast(std::round(damage * ((100 - elementMod) / 100.)));\n\t\t\tif (damage <= 0) {\n\t\t\t\tdamage = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a1bfd7e46b41c7c71c2412c53084f940c54f5cc60da3835846184c9cac93a4f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 667, + "startColumn": 50, + "charOffset": 19742, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 665, + "startColumn": 50, + "charOffset": 19690, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Monster::isTarget(std::shared_ptr creature) {\n\tif (creature->isRemoved() || !creature->isAttackable() || creature->getZoneType() == ZONE_PROTECTION || !canSeeCreature(creature)) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50b93e2b204a90ca18a21d4f8401f8568e42b5c9011de08e73928359aed93844" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 728, + "startColumn": 3, + "charOffset": 21118, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 726, + "startColumn": 3, + "charOffset": 21069, + "charLength": 2, + "snippet": { + "text": "\tbool idle = false;\n\tif (conditions.empty()) {\n\t\tif (!isSummon() && targetList.empty()) {\n\t\t\tif (isInSpawnLocation()) {\n\t\t\t\tidle = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b94b5675ab795407fa194a4e0182638029cfe852e662344244ad3c55dd32de27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 745, + "startColumn": 6, + "charOffset": 21575, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 743, + "startColumn": 6, + "charOffset": 21527, + "charLength": 1, + "snippet": { + "text": "\nbool Monster::isInSpawnLocation() const {\n\tif (!spawnMonster) {\n\t\treturn true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2d722c2a5bb42b891955dc07544bd64100e4bd6413c666e61f955ebd0371310" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'SpawnMonster *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 745, + "startColumn": 7, + "charOffset": 21576, + "charLength": 12, + "snippet": { + "text": "spawnMonster" + } + }, + "contextRegion": { + "startLine": 743, + "startColumn": 7, + "charOffset": 21527, + "charLength": 12, + "snippet": { + "text": "\nbool Monster::isInSpawnLocation() const {\n\tif (!spawnMonster) {\n\t\treturn true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52a4fbef078c8c550876a3cb5fe47ddbe812430e8f77b7efb861544083ea5d89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'onThink' has cognitive complexity of 32 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 766, + "startColumn": 15, + "charOffset": 22064, + "charLength": 7, + "snippet": { + "text": "onThink" + } + }, + "contextRegion": { + "startLine": 764, + "startColumn": 15, + "charOffset": 22047, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid Monster::onThink(uint32_t interval) {\n\tCreature::onThink(interval);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c2075dbb416cf07d9b05a5c01c6695a7ff704c9abbdb755269003d25326358b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 772, + "startColumn": 8, + "charOffset": 22266, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 770, + "startColumn": 8, + "charOffset": 22161, + "charLength": 15, + "snippet": { + "text": "\t\t// onThink(self, interval)\n\t\tLuaScriptInterface* scriptInterface = mType->info.scriptInterface;\n\t\tif (!scriptInterface->reserveScriptEnv()) {\n\t\t\tg_logger().error(\"Monster {} Call stack overflow. Too many lua script calls \"\n\t\t\t \"being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8a2e99ea5b0101d34ddd644657623441f0a72f0c9d4bca4e174af047f60e070" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 779, + "startColumn": 28, + "charOffset": 22498, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 777, + "startColumn": 28, + "charOffset": 22466, + "charLength": 15, + "snippet": { + "text": "\t\t}\n\n\t\tScriptEnvironment* env = scriptInterface->getScriptEnv();\n\t\tenv->setScriptId(mType->info.thinkEvent, scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce9ef919c4e99cc5158239813f75176a3331015d8f0716f2304bbc648ca7e8d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 783, + "startColumn": 20, + "charOffset": 22661, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 781, + "startColumn": 20, + "charOffset": 22592, + "charLength": 12, + "snippet": { + "text": "\n\t\tlua_State* L = scriptInterface->getLuaState();\n\t\tscriptInterface->pushFunction(mType->info.thinkEvent);\n\n\t\tLuaScriptInterface::pushUserdata(L, getMonster());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "857ed7b0942b4c419834dbab2d38f86100bce67e24a486010a2ed81675aa1f30" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 788, + "startColumn": 21, + "charOffset": 22837, + "charLength": 8, + "snippet": { + "text": "interval" + } + }, + "contextRegion": { + "startLine": 786, + "startColumn": 21, + "charOffset": 22762, + "charLength": 8, + "snippet": { + "text": "\t\tLuaScriptInterface::setMetatable(L, -1, \"Monster\");\n\n\t\tlua_pushnumber(L, interval);\n\n\t\tif (scriptInterface->callFunction(2)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43b786c75dff94b29d2879f1a0a7f532b8f89d3b0f447372bf26b5e363c0738d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 796, + "startColumn": 29, + "charOffset": 22974, + "charLength": 8, + "snippet": { + "text": "interval" + } + }, + "contextRegion": { + "startLine": 794, + "startColumn": 29, + "charOffset": 22909, + "charLength": 8, + "snippet": { + "text": "\n\tif (challengeMeleeDuration != 0) {\n\t\tchallengeMeleeDuration -= interval;\n\t\tif (challengeMeleeDuration <= 0) {\n\t\t\tchallengeMeleeDuration = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3bbe8c80f5067d90d79f0f4cd913a28c2f669ee1038abe60feeddb9dfabebdf8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 805, + "startColumn": 12, + "charOffset": 23215, + "charLength": 14, + "snippet": { + "text": "removeCreature" + } + }, + "contextRegion": { + "startLine": 803, + "startColumn": 12, + "charOffset": 23168, + "charLength": 14, + "snippet": { + "text": "\n\tif (!mType->canSpawn(position)) {\n\t\tg_game().removeCreature(static_self_cast());\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2f5910f0b93225b5bfcf298cd6f73cde06138a915456df8dfe3fdceaf50f6b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 809, + "startColumn": 12, + "charOffset": 23309, + "charLength": 16, + "snippet": { + "text": "internalTeleport" + } + }, + "contextRegion": { + "startLine": 807, + "startColumn": 12, + "charOffset": 23263, + "charLength": 16, + "snippet": { + "text": "\n\tif (!isInSpawnRange(position)) {\n\t\tg_game().internalTeleport(static_self_cast(), masterPos);\n\t\tsetIdle(true);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0dd69668efabc08fd17d16d978a440ed1099b9cc1e594a8691258d291bbefff5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 824, + "startColumn": 2, + "charOffset": 23574, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 822, + "startColumn": 2, + "charOffset": 23467, + "charLength": 2, + "snippet": { + "text": "\tconst auto &attackedCreature = getAttackedCreature();\n\tconst auto &followCreature = getFollowCreature();\n\tif (isSummon()) {\n\t\tif (attackedCreature.get() == this) {\n\t\t\tsetFollowCreature(nullptr);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a121702e731e790a71b3c955ce91d9d05533d86dcb8db45229b44a9e279ff0fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 825, + "startColumn": 3, + "charOffset": 23594, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 823, + "startColumn": 3, + "charOffset": 23522, + "charLength": 2, + "snippet": { + "text": "\tconst auto &followCreature = getFollowCreature();\n\tif (isSummon()) {\n\t\tif (attackedCreature.get() == this) {\n\t\t\tsetFollowCreature(nullptr);\n\t\t} else if (attackedCreature && followCreature != attackedCreature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "faa628e363ef189e694c1dd285bedaa283cfd77e3c5a8c630f89d26c672f7c4b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 826, + "startColumn": 4, + "charOffset": 23635, + "charLength": 17, + "snippet": { + "text": "setFollowCreature" + } + }, + "contextRegion": { + "startLine": 824, + "startColumn": 4, + "charOffset": 23573, + "charLength": 17, + "snippet": { + "text": "\tif (isSummon()) {\n\t\tif (attackedCreature.get() == this) {\n\t\t\tsetFollowCreature(nullptr);\n\t\t} else if (attackedCreature && followCreature != attackedCreature) {\n\t\t\t// This happens just after a master orders an attack, so lets follow it aswell." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81edf6cf86fb4a7b4847fa7b8dbfb10264deb9067c06e52181e2769c1f1d9cc6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 829, + "startColumn": 4, + "charOffset": 23820, + "charLength": 17, + "snippet": { + "text": "setFollowCreature" + } + }, + "contextRegion": { + "startLine": 827, + "startColumn": 4, + "charOffset": 23663, + "charLength": 17, + "snippet": { + "text": "\t\t} else if (attackedCreature && followCreature != attackedCreature) {\n\t\t\t// This happens just after a master orders an attack, so lets follow it aswell.\n\t\t\tsetFollowCreature(attackedCreature);\n\t\t} else if (getMaster() && getMaster()->getAttackedCreature()) {\n\t\t\t// This happens if the monster is summoned during combat" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c6f62a5af0e17a77a3c2334d10c06ad7948a63d491f3f1d89a45068eab2d1ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 832, + "startColumn": 4, + "charOffset": 23986, + "charLength": 12, + "snippet": { + "text": "selectTarget" + } + }, + "contextRegion": { + "startLine": 830, + "startColumn": 4, + "charOffset": 23857, + "charLength": 12, + "snippet": { + "text": "\t\t} else if (getMaster() && getMaster()->getAttackedCreature()) {\n\t\t\t// This happens if the monster is summoned during combat\n\t\t\tselectTarget(getMaster()->getAttackedCreature());\n\t\t} else if (getMaster() != followCreature) {\n\t\t\t// Our master has not ordered us to attack anything, lets follow him around instead." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f02dc433ab5e9aa9d8c4d3ec5cc3f53385424036eea7bd6cb606d991d594059" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 835, + "startColumn": 4, + "charOffset": 24173, + "charLength": 17, + "snippet": { + "text": "setFollowCreature" + } + }, + "contextRegion": { + "startLine": 833, + "startColumn": 4, + "charOffset": 24036, + "charLength": 17, + "snippet": { + "text": "\t\t} else if (getMaster() != followCreature) {\n\t\t\t// Our master has not ordered us to attack anything, lets follow him around instead.\n\t\t\tsetFollowCreature(getMaster());\n\t\t}\n\t} else if (!targetList.empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b27c093363aac5e7bc0398293d1394bcb90e39d14a23b990e8990dece7949531" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 841, + "startColumn": 7, + "charOffset": 24634, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 839, + "startColumn": 7, + "charOffset": 24392, + "charLength": 1, + "snippet": { + "text": "\t\tconst bool attackedCreatureIsUnattackable = attackedCreature && !canUseAttack(getPosition(), attackedCreature);\n\t\tconst bool attackedCreatureIsUnreachable = targetDistance <= 1 && attackedCreature && followCreature && !hasFollowPath;\n\t\tif (!attackedCreature || attackedCreatureIsDisconnected || attackedCreatureIsUnattackable || attackedCreatureIsUnreachable) {\n\t\t\tif (!followCreature || !hasFollowPath || attackedCreatureIsDisconnected) {\n\t\t\t\tsearchTarget(TARGETSEARCH_NEAREST);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d47f83195f579b6bd53274d88e414d05ebd825abd942fdc8166ecb82333b5be3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 842, + "startColumn": 4, + "charOffset": 24759, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 840, + "startColumn": 4, + "charOffset": 24506, + "charLength": 2, + "snippet": { + "text": "\t\tconst bool attackedCreatureIsUnreachable = targetDistance <= 1 && attackedCreature && followCreature && !hasFollowPath;\n\t\tif (!attackedCreature || attackedCreatureIsDisconnected || attackedCreatureIsUnattackable || attackedCreatureIsUnreachable) {\n\t\t\tif (!followCreature || !hasFollowPath || attackedCreatureIsDisconnected) {\n\t\t\t\tsearchTarget(TARGETSEARCH_NEAREST);\n\t\t\t} else if (attackedCreature && isFleeing() && !canUseAttack(getPosition(), attackedCreature)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cada2b7a35bb8c66ac82e8c2927bc0dc7abf42cdf145f9ef50eb620c92d3e5d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 842, + "startColumn": 8, + "charOffset": 24763, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 840, + "startColumn": 8, + "charOffset": 24506, + "charLength": 1, + "snippet": { + "text": "\t\tconst bool attackedCreatureIsUnreachable = targetDistance <= 1 && attackedCreature && followCreature && !hasFollowPath;\n\t\tif (!attackedCreature || attackedCreatureIsDisconnected || attackedCreatureIsUnattackable || attackedCreatureIsUnreachable) {\n\t\t\tif (!followCreature || !hasFollowPath || attackedCreatureIsDisconnected) {\n\t\t\t\tsearchTarget(TARGETSEARCH_NEAREST);\n\t\t\t} else if (attackedCreature && isFleeing() && !canUseAttack(getPosition(), attackedCreature)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a35f92e56b722f63c7add5fb826b20c84643ff4334cc21ea0e292111b0cd655b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 843, + "startColumn": 5, + "charOffset": 24838, + "charLength": 12, + "snippet": { + "text": "searchTarget" + } + }, + "contextRegion": { + "startLine": 841, + "startColumn": 5, + "charOffset": 24628, + "charLength": 12, + "snippet": { + "text": "\t\tif (!attackedCreature || attackedCreatureIsDisconnected || attackedCreatureIsUnattackable || attackedCreatureIsUnreachable) {\n\t\t\tif (!followCreature || !hasFollowPath || attackedCreatureIsDisconnected) {\n\t\t\t\tsearchTarget(TARGETSEARCH_NEAREST);\n\t\t\t} else if (attackedCreature && isFleeing() && !canUseAttack(getPosition(), attackedCreature)) {\n\t\t\t\tsearchTarget(TARGETSEARCH_DEFAULT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51905c828f79c46bab77bf2dd350fe3ffec554d87d573acc2fd2135f8c972533" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 845, + "startColumn": 5, + "charOffset": 24977, + "charLength": 12, + "snippet": { + "text": "searchTarget" + } + }, + "contextRegion": { + "startLine": 843, + "startColumn": 5, + "charOffset": 24834, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tsearchTarget(TARGETSEARCH_NEAREST);\n\t\t\t} else if (attackedCreature && isFleeing() && !canUseAttack(getPosition(), attackedCreature)) {\n\t\t\t\tsearchTarget(TARGETSEARCH_DEFAULT);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c61514a85b53cde7fe951a0e81d5de636f7727cf29a0c6bd2fd2ba6571108193" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'doAttacking' has cognitive complexity of 30 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 856, + "startColumn": 15, + "charOffset": 25145, + "charLength": 11, + "snippet": { + "text": "doAttacking" + } + }, + "contextRegion": { + "startLine": 854, + "startColumn": 15, + "charOffset": 25128, + "charLength": 11, + "snippet": { + "text": "}\n\nvoid Monster::doAttacking(uint32_t interval) {\n\tauto attackedCreature = getAttackedCreature();\n\tif (!attackedCreature || (isSummon() && attackedCreature.get() == this)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c314fb5e5e8b36bde53005873374be746014673d20fa56a5115c40805dbb661" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 858, + "startColumn": 6, + "charOffset": 25231, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 856, + "startColumn": 6, + "charOffset": 25131, + "charLength": 1, + "snippet": { + "text": "void Monster::doAttacking(uint32_t interval) {\n\tauto attackedCreature = getAttackedCreature();\n\tif (!attackedCreature || (isSummon() && attackedCreature.get() == this)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76194ffe3801cce7fcf4f6a66435eac9b839cd25b49a74a42b9565a7f79cbf65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 869, + "startColumn": 2, + "charOffset": 25506, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 867, + "startColumn": 2, + "charOffset": 25442, + "charLength": 3, + "snippet": { + "text": "\tconst Position &targetPos = attackedCreature->getPosition();\n\n\tfor (const spellBlock_t &spellBlock : mType->info.attackSpells) {\n\t\tbool inRange = false;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "718433b7617a1a02415e3d3062b2d17d7710356ab4bd7cd28da179aed76088a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 877, + "startColumn": 69, + "charOffset": 25841, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 875, + "startColumn": 69, + "charOffset": 25690, + "charLength": 3, + "snippet": { + "text": "\n\t\tif (canUseSpell(myPos, targetPos, spellBlock, interval, inRange, resetTicks)) {\n\t\t\tif (spellBlock.chance >= static_cast(uniform_random(1, 100))) {\n\t\t\t\tif (updateLook) {\n\t\t\t\t\tupdateLookDirection();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc15335a8ad34a7792c5640c2269d76e73eb37a5dd8351609c86bb34a78e2816" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 890, + "startColumn": 23, + "charOffset": 26112, + "charLength": 9, + "snippet": { + "text": "castSpell" + } + }, + "contextRegion": { + "startLine": 888, + "startColumn": 23, + "charOffset": 26083, + "charLength": 9, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tspellBlock.spell->castSpell(getMonster(), attackedCreature);\n\n\t\t\t\tif (spellBlock.isMelee) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3a8c2fa78cda1eea437bbf2d39da5268b1faf2a033a63a0ce224ece7c8198fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 917, + "startColumn": 3, + "charOffset": 26726, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 915, + "startColumn": 3, + "charOffset": 26549, + "charLength": 3, + "snippet": { + "text": "\t\tconst Position &targetPos = target->getPosition();\n\t\tuint32_t distance = std::max(Position::getDistanceX(pos, targetPos), Position::getDistanceY(pos, targetPos));\n\t\tfor (const spellBlock_t &spellBlock : mType->info.attackSpells) {\n\t\t\tif (spellBlock.range != 0 && distance <= spellBlock.range) {\n\t\t\t\treturn g_game().isSightClear(pos, targetPos, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8bde02d367ab4a5e8303881cbfb4f17919a3fc01b072708b5e050aafbab2d299" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'canUseSpell' of similar type ('bool &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 927, + "startColumn": 118, + "charOffset": 27074, + "charLength": 4, + "snippet": { + "text": "bool" + } + }, + "contextRegion": { + "startLine": 925, + "startColumn": 118, + "charOffset": 26954, + "charLength": 4, + "snippet": { + "text": "}\n\nbool Monster::canUseSpell(const Position &pos, const Position &targetPos, const spellBlock_t &sb, uint32_t interval, bool &inRange, bool &resetTicks) {\n\tinRange = true;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16f70fe17ef611242bf869ace4131b17e14312bc6ebbcd85ba39e423b1fb8b95" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 934, + "startColumn": 2, + "charOffset": 27182, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 932, + "startColumn": 2, + "charOffset": 27177, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (extraMeleeAttack) {\n\t\tlastMeleeAttack = OTSYS_TIME();\n\t} else if (sb.isMelee && (OTSYS_TIME() - lastMeleeAttack) < 1500) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2323f01ab53fe3e600846862b2cfea55805a7b2399cde172b5841f2e4e1d5343" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1500 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 936, + "startColumn": 62, + "charOffset": 27301, + "charLength": 4, + "snippet": { + "text": "1500" + } + }, + "contextRegion": { + "startLine": 934, + "startColumn": 62, + "charOffset": 27181, + "charLength": 4, + "snippet": { + "text": "\tif (extraMeleeAttack) {\n\t\tlastMeleeAttack = OTSYS_TIME();\n\t} else if (sb.isMelee && (OTSYS_TIME() - lastMeleeAttack) < 1500) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2180a46f7957594a96d7d6747d9b22071bc927b8196ab8698fcbed849a09c77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'onThinkTarget' has cognitive complexity of 42 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 959, + "startColumn": 15, + "charOffset": 27765, + "charLength": 13, + "snippet": { + "text": "onThinkTarget" + } + }, + "contextRegion": { + "startLine": 957, + "startColumn": 15, + "charOffset": 27748, + "charLength": 13, + "snippet": { + "text": "}\n\nvoid Monster::onThinkTarget(uint32_t interval) {\n\tif (!isSummon()) {\n\t\tif (mType->info.changeTargetSpeed != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2cc7d6e46aa30d748e06e79e054d0e10289ae090f9781cdce922fdab0b2a2c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 965, + "startColumn": 31, + "charOffset": 27964, + "charLength": 8, + "snippet": { + "text": "interval" + } + }, + "contextRegion": { + "startLine": 963, + "startColumn": 31, + "charOffset": 27896, + "charLength": 8, + "snippet": { + "text": "\n\t\t\tif (challengeFocusDuration > 0) {\n\t\t\t\tchallengeFocusDuration -= interval;\n\t\t\t\tcanChangeTarget = false;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49f0756730be2a5b76db9e878ccfcd6b9274c5241ba79ef17f7cb9e02c71a557" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-std-min-max", + "ruleIndex": 736, + "kind": "fail", + "level": "warning", + "message": { + "text": "use `std::max` instead of `<=`" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 968, + "startColumn": 5, + "charOffset": 28008, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 966, + "startColumn": 5, + "charOffset": 27974, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tcanChangeTarget = false;\n\n\t\t\t\tif (challengeFocusDuration <= 0) {\n\t\t\t\t\tchallengeFocusDuration = 0;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb6c201d556b90a5e05504c5e43b739d086777eb570b5ac26a365daa8d8b69e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 974, + "startColumn": 31, + "charOffset": 28155, + "charLength": 8, + "snippet": { + "text": "interval" + } + }, + "contextRegion": { + "startLine": 972, + "startColumn": 31, + "charOffset": 28087, + "charLength": 8, + "snippet": { + "text": "\n\t\t\tif (m_targetChangeCooldown > 0) {\n\t\t\t\tm_targetChangeCooldown -= interval;\n\n\t\t\t\tif (m_targetChangeCooldown <= 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab339090bf4cebe077009bca2140b0ee6ec6a9d2540dcb4942d0d7c19667974c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 989, + "startColumn": 31, + "charOffset": 28531, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 987, + "startColumn": 31, + "charOffset": 28411, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tif (targetChangeTicks >= mType->info.changeTargetSpeed) {\n\t\t\t\t\ttargetChangeTicks = 0;\n\t\t\t\t\tm_targetChangeCooldown = mType->info.changeTargetSpeed;\n\n\t\t\t\t\tif (challengeFocusDuration > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7564311de6b8916e8041da3e31a296fdb71066455ccf88917d76624bec31d29" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-std-min-max", + "ruleIndex": 736, + "kind": "fail", + "level": "warning", + "message": { + "text": "use `std::min` instead of `>`" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 991, + "startColumn": 6, + "charOffset": 28568, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 989, + "startColumn": 6, + "charOffset": 28501, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tm_targetChangeCooldown = mType->info.changeTargetSpeed;\n\n\t\t\t\t\tif (challengeFocusDuration > 0) {\n\t\t\t\t\t\tchallengeFocusDuration = 0;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80bf1e4e3d8181a2ce97b7859233def28f0aa93928a4e9477e33426740dab5d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 995, + "startColumn": 62, + "charOffset": 28705, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 993, + "startColumn": 62, + "charOffset": 28636, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\t}\n\n\t\t\t\t\tif (mType->info.changeTargetChance >= uniform_random(1, 100)) {\n\t\t\t\t\t\tif (mType->info.targetDistance <= 1) {\n\t\t\t\t\t\t\tsearchTarget(TARGETSEARCH_RANDOM);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bba568150009375b7e174a48cb9ba6ca5a34ccec2b534cc9119f3c2de083dc8f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 997, + "startColumn": 8, + "charOffset": 28765, + "charLength": 12, + "snippet": { + "text": "searchTarget" + } + }, + "contextRegion": { + "startLine": 995, + "startColumn": 8, + "charOffset": 28644, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t\tif (mType->info.changeTargetChance >= uniform_random(1, 100)) {\n\t\t\t\t\t\tif (mType->info.targetDistance <= 1) {\n\t\t\t\t\t\t\tsearchTarget(TARGETSEARCH_RANDOM);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsearchTarget(TARGETSEARCH_NEAREST);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ae55d8a24db26b0eb1542bb961b5d115fed8ba664494133b85cd4772093ee76" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 999, + "startColumn": 8, + "charOffset": 28822, + "charLength": 12, + "snippet": { + "text": "searchTarget" + } + }, + "contextRegion": { + "startLine": 997, + "startColumn": 8, + "charOffset": 28758, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t\t\t\tsearchTarget(TARGETSEARCH_RANDOM);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsearchTarget(TARGETSEARCH_NEAREST);\n\t\t\t\t\t\t}\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4a8b39f3eda7f3bf1689e6170816f65868dde4df6794a3e951808c250996b21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'onThinkDefense' has cognitive complexity of 43 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1008, + "startColumn": 15, + "charOffset": 28908, + "charLength": 14, + "snippet": { + "text": "onThinkDefense" + } + }, + "contextRegion": { + "startLine": 1006, + "startColumn": 15, + "charOffset": 28891, + "charLength": 14, + "snippet": { + "text": "}\n\nvoid Monster::onThinkDefense(uint32_t interval) {\n\tbool resetTicks = true;\n\tdefenseTicks += interval;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8fd02a4213bfa2b92075d74ff079a0fdb37e09f4ca609e6248ce0bca4162ac0a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1012, + "startColumn": 2, + "charOffset": 28998, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1010, + "startColumn": 2, + "charOffset": 28969, + "charLength": 3, + "snippet": { + "text": "\tdefenseTicks += interval;\n\n\tfor (const spellBlock_t &spellBlock : mType->info.defenseSpells) {\n\t\tif (spellBlock.speed > defenseTicks) {\n\t\t\tresetTicks = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4281a84d5e777c6c7a051541defe46c85562ba52868fc41769f8363df1c69ba8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1023, + "startColumn": 69, + "charOffset": 29362, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 1021, + "startColumn": 69, + "charOffset": 29289, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tif ((spellBlock.chance >= static_cast(uniform_random(1, 100)))) {\n\t\t\tminCombatValue = spellBlock.minCombatValue;\n\t\t\tmaxCombatValue = spellBlock.maxCombatValue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29c78481490c5b5ee9059492e85058dad63284e96b22463643312cb8b0859857" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1026, + "startColumn": 22, + "charOffset": 29487, + "charLength": 9, + "snippet": { + "text": "castSpell" + } + }, + "contextRegion": { + "startLine": 1024, + "startColumn": 22, + "charOffset": 29372, + "charLength": 9, + "snippet": { + "text": "\t\t\tminCombatValue = spellBlock.minCombatValue;\n\t\t\tmaxCombatValue = spellBlock.maxCombatValue;\n\t\t\tspellBlock.spell->castSpell(getMonster(), getMonster());\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eac8a0c4cb376a16ce4380ace84a75d2becf7c30cdd679ce72027bbafab811eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1047, + "startColumn": 4, + "charOffset": 29994, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1045, + "startColumn": 4, + "charOffset": 29961, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tuint32_t summonCount = 0;\n\t\t\tfor (const auto &summon : m_summons) {\n\t\t\t\tif (summon && summon->getName() == summonBlock.name) {\n\t\t\t\t\t++summonCount;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1139305a8b2cb1ee9329fcc3458b21602ddae5632258f94c2d7a4f2e7b48f1e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1057, + "startColumn": 69, + "charOffset": 30255, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 1055, + "startColumn": 69, + "charOffset": 30181, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (summonBlock.chance < static_cast(uniform_random(1, 100))) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e39188d984eb9155750dc47d4bd46ba3a408fa80207857fa6d066da3103befae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1064, + "startColumn": 14, + "charOffset": 30476, + "charLength": 9, + "snippet": { + "text": "setMaster" + } + }, + "contextRegion": { + "startLine": 1062, + "startColumn": 14, + "charOffset": 30363, + "charLength": 9, + "snippet": { + "text": "\t\t\tif (summon) {\n\t\t\t\tif (g_game().placeCreature(summon, getPosition(), false, summonBlock.force)) {\n\t\t\t\t\tsummon->setMaster(static_self_cast(), true);\n\t\t\t\t\tg_game().addMagicEffect(getPosition(), CONST_ME_MAGIC_BLUE);\n\t\t\t\t\tg_game().addMagicEffect(summon->getPosition(), CONST_ME_TELEPORT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c6f62a5af0e17a77a3c2334d10c06ad7948a63d491f3f1d89a45068eab2d1ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1087, + "startColumn": 110, + "charOffset": 31135, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 1085, + "startColumn": 110, + "charOffset": 31008, + "charLength": 3, + "snippet": { + "text": "\t\tyellTicks = 0;\n\n\t\tif (!mType->info.voiceVector.empty() && (mType->info.yellChance >= static_cast(uniform_random(1, 100)))) {\n\t\t\tuint32_t index = uniform_random(0, mType->info.voiceVector.size() - 1);\n\t\t\tconst voiceBlock_t &vb = mType->info.voiceVector[index];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0c5a43aa62a0e3748fdfe9fb4c4e6d8363bcdcad8227b1a1eb07e2bc92f19a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1088, + "startColumn": 39, + "charOffset": 31183, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 1086, + "startColumn": 39, + "charOffset": 31025, + "charLength": 5, + "snippet": { + "text": "\n\t\tif (!mType->info.voiceVector.empty() && (mType->info.yellChance >= static_cast(uniform_random(1, 100)))) {\n\t\t\tuint32_t index = uniform_random(0, mType->info.voiceVector.size() - 1);\n\t\t\tconst voiceBlock_t &vb = mType->info.voiceVector[index];\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "506e282e0f8bf63ee82ea84aa2b77a16a6e0b5beac6bb979b684e324b958e6f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1088, + "startColumn": 39, + "charOffset": 31183, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 1086, + "startColumn": 39, + "charOffset": 31025, + "charLength": 5, + "snippet": { + "text": "\n\t\tif (!mType->info.voiceVector.empty() && (mType->info.yellChance >= static_cast(uniform_random(1, 100)))) {\n\t\t\tuint32_t index = uniform_random(0, mType->info.voiceVector.size() - 1);\n\t\t\tconst voiceBlock_t &vb = mType->info.voiceVector[index];\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "feb53e68c73c55024a515433f189b854d7a5cc5abaaec7b8700f328851e6a34f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1092, + "startColumn": 14, + "charOffset": 31316, + "charLength": 19, + "snippet": { + "text": "internalCreatureSay" + } + }, + "contextRegion": { + "startLine": 1090, + "startColumn": 14, + "charOffset": 31280, + "charLength": 19, + "snippet": { + "text": "\n\t\t\tif (vb.yellText) {\n\t\t\t\tg_game().internalCreatureSay(static_self_cast(), TALKTYPE_MONSTER_YELL, vb.text, false);\n\t\t\t} else {\n\t\t\t\tg_game().internalCreatureSay(static_self_cast(), TALKTYPE_MONSTER_SAY, vb.text, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ceb18ae1b3cc270b53eb7da170d5878e5bc9aea222ab11ab1e1149f85b7b31e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1094, + "startColumn": 14, + "charOffset": 31430, + "charLength": 19, + "snippet": { + "text": "internalCreatureSay" + } + }, + "contextRegion": { + "startLine": 1092, + "startColumn": 14, + "charOffset": 31303, + "charLength": 19, + "snippet": { + "text": "\t\t\t\tg_game().internalCreatureSay(static_self_cast(), TALKTYPE_MONSTER_YELL, vb.text, false);\n\t\t\t} else {\n\t\t\t\tg_game().internalCreatureSay(static_self_cast(), TALKTYPE_MONSTER_SAY, vb.text, false);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f274bcbe7e2f30d03f3fce60e6794593c06f57707ae8d73569d59983e5a1c989" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1109, + "startColumn": 111, + "charOffset": 31840, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 1107, + "startColumn": 111, + "charOffset": 31711, + "charLength": 3, + "snippet": { + "text": "\t\tsoundTicks = 0;\n\n\t\tif (!mType->info.soundVector.empty() && (mType->info.soundChance >= static_cast(uniform_random(1, 100)))) {\n\t\t\tint64_t index = uniform_random(0, static_cast(mType->info.soundVector.size() - 1));\n\t\t\tg_game().sendSingleSoundEffect(static_self_cast()->getPosition(), mType->info.soundVector[index], getMonster());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc6edb5b3e0f3fee71e4497ea821516f7be5baf4416a28790bffeb31cd116771" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int64_t' (aka 'long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1110, + "startColumn": 38, + "charOffset": 31887, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 1108, + "startColumn": 38, + "charOffset": 31729, + "charLength": 11, + "snippet": { + "text": "\n\t\tif (!mType->info.soundVector.empty() && (mType->info.soundChance >= static_cast(uniform_random(1, 100)))) {\n\t\t\tint64_t index = uniform_random(0, static_cast(mType->info.soundVector.size() - 1));\n\t\t\tg_game().sendSingleSoundEffect(static_self_cast()->getPosition(), mType->info.soundVector[index], getMonster());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c78ae3a376779b5280e0c40175f615b99970857d5ea41cd772619e7c78271cfc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1110, + "startColumn": 38, + "charOffset": 31887, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 1108, + "startColumn": 38, + "charOffset": 31729, + "charLength": 11, + "snippet": { + "text": "\n\t\tif (!mType->info.soundVector.empty() && (mType->info.soundChance >= static_cast(uniform_random(1, 100)))) {\n\t\t\tint64_t index = uniform_random(0, static_cast(mType->info.soundVector.size() - 1));\n\t\t\tg_game().sendSingleSoundEffect(static_self_cast()->getPosition(), mType->info.soundVector[index], getMonster());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "748949a866ea9051c5dd4487eae7d04834e0bcd9de7817958592f90479c0565b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1116, + "startColumn": 46, + "charOffset": 32126, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 1114, + "startColumn": 46, + "charOffset": 32078, + "charLength": 4, + "snippet": { + "text": "}\n\nbool Monster::pushItem(std::shared_ptr item, const Direction &nextDirection) {\n\tconst Position ¢erPos = item->getPosition();\n\tfor (const auto &[x, y] : getPushItemLocationOptions(nextDirection)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d151c9eceaeb90952811e1eea746f8240741981d5fc68a44c04411798e103395" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1118, + "startColumn": 2, + "charOffset": 32217, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1116, + "startColumn": 2, + "charOffset": 32081, + "charLength": 3, + "snippet": { + "text": "bool Monster::pushItem(std::shared_ptr item, const Direction &nextDirection) {\n\tconst Position ¢erPos = item->getPosition();\n\tfor (const auto &[x, y] : getPushItemLocationOptions(nextDirection)) {\n\t\tPosition tryPos(centerPos.x + x, centerPos.y + y, centerPos.z);\n\t\tstd::shared_ptr tile = g_game().map.getTile(tryPos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f289debc9f6b85ab07e0f173470b508283ceb6a3501b5a5edac78f9f091475d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-anyofallof", + "ruleIndex": 735, + "kind": "fail", + "level": "warning", + "message": { + "text": "replace loop by 'std::ranges::any_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1118, + "startColumn": 2, + "charOffset": 32217, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1116, + "startColumn": 2, + "charOffset": 32081, + "charLength": 3, + "snippet": { + "text": "bool Monster::pushItem(std::shared_ptr item, const Direction &nextDirection) {\n\tconst Position ¢erPos = item->getPosition();\n\tfor (const auto &[x, y] : getPushItemLocationOptions(nextDirection)) {\n\t\tPosition tryPos(centerPos.x + x, centerPos.y + y, centerPos.z);\n\t\tstd::shared_ptr tile = g_game().map.getTile(tryPos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b25f30b2bead65a85c0082be372273adbfe7ffd9c74128ad805603ed274ca2c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1128, + "startColumn": 47, + "charOffset": 32695, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 1126, + "startColumn": 47, + "charOffset": 32646, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Monster::pushItems(std::shared_ptr tile, const Direction &nextDirection) {\n\t// We can not use iterators here since we can push the item to another tile\n\t// which will invalidate the iterator." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba657f91fe5e0f79d79a6f0134579de9914bb66c2c26fb0622b3cd57dad440eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto items' can be declared as 'auto *const items'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1132, + "startColumn": 6, + "charOffset": 32914, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 1130, + "startColumn": 6, + "charOffset": 32812, + "charLength": 5, + "snippet": { + "text": "\t// which will invalidate the iterator.\n\t// start from the end to minimize the amount of traffic\n\tif (const auto items = tile->getItemList()) {\n\t\tuint32_t moveCount = 0;\n\t\tuint32_t removeCount = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f64a86c3e96dacb3a749f74a4642dc0ca880bb095c26f7975821bcd312a756b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1135, + "startColumn": 26, + "charOffset": 33035, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 1133, + "startColumn": 26, + "charOffset": 32956, + "charLength": 4, + "snippet": { + "text": "\t\tuint32_t moveCount = 0;\n\t\tuint32_t removeCount = 0;\n\t\tint32_t downItemSize = tile->getDownItemCount();\n\t\tfor (int32_t i = downItemSize; --i >= 0;) {\n\t\t\tconst auto &item = items->at(i);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5987467419101cb4212c202e684cb07f95d991adaaf73a592227326932237fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1136, + "startColumn": 3, + "charOffset": 33063, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1134, + "startColumn": 3, + "charOffset": 32982, + "charLength": 3, + "snippet": { + "text": "\t\tuint32_t removeCount = 0;\n\t\tint32_t downItemSize = tile->getDownItemCount();\n\t\tfor (int32_t i = downItemSize; --i >= 0;) {\n\t\t\tconst auto &item = items->at(i);\n\t\t\tif (item && item->hasProperty(CONST_PROP_MOVABLE) && (item->hasProperty(CONST_PROP_BLOCKPATH) || item->hasProperty(CONST_PROP_BLOCKSOLID)) && item->canBeMoved()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de632dde4b2d35e6154908ede3f40d9714384aca9b92789afbbf11ae22c0d95a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1136, + "startColumn": 3, + "charOffset": 33063, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1134, + "startColumn": 3, + "charOffset": 32982, + "charLength": 3, + "snippet": { + "text": "\t\tuint32_t removeCount = 0;\n\t\tint32_t downItemSize = tile->getDownItemCount();\n\t\tfor (int32_t i = downItemSize; --i >= 0;) {\n\t\t\tconst auto &item = items->at(i);\n\t\t\tif (item && item->hasProperty(CONST_PROP_MOVABLE) && (item->hasProperty(CONST_PROP_BLOCKPATH) || item->hasProperty(CONST_PROP_BLOCKSOLID)) && item->canBeMoved()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75276f190afe314b54c187c8f619524122884fcc2c86b2f9078499ab187534c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'i' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1136, + "startColumn": 34, + "charOffset": 33094, + "charLength": 2, + "snippet": { + "text": "--" + } + }, + "contextRegion": { + "startLine": 1134, + "startColumn": 34, + "charOffset": 32982, + "charLength": 2, + "snippet": { + "text": "\t\tuint32_t removeCount = 0;\n\t\tint32_t downItemSize = tile->getDownItemCount();\n\t\tfor (int32_t i = downItemSize; --i >= 0;) {\n\t\t\tconst auto &item = items->at(i);\n\t\t\tif (item && item->hasProperty(CONST_PROP_MOVABLE) && (item->hasProperty(CONST_PROP_BLOCKPATH) || item->hasProperty(CONST_PROP_BLOCKSOLID)) && item->canBeMoved()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47e356e863dbf608f7a5cb1c37e39776151ba86b872e8241ee9ac6ae4f0c2ccd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1139, + "startColumn": 5, + "charOffset": 33314, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1137, + "startColumn": 5, + "charOffset": 33107, + "charLength": 2, + "snippet": { + "text": "\t\t\tconst auto &item = items->at(i);\n\t\t\tif (item && item->hasProperty(CONST_PROP_MOVABLE) && (item->hasProperty(CONST_PROP_BLOCKPATH) || item->hasProperty(CONST_PROP_BLOCKSOLID)) && item->canBeMoved()) {\n\t\t\t\tif (moveCount < 20 && pushItem(item, nextDirection)) {\n\t\t\t\t\t++moveCount;\n\t\t\t\t} else if (!item->isCorpse() && g_game().internalRemoveItem(item) == RETURNVALUE_NOERROR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62b28c2fb114391595089b01d61d61684843af11302781ac3659ef1cca6be051" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1139, + "startColumn": 21, + "charOffset": 33330, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 1137, + "startColumn": 21, + "charOffset": 33107, + "charLength": 2, + "snippet": { + "text": "\t\t\tconst auto &item = items->at(i);\n\t\t\tif (item && item->hasProperty(CONST_PROP_MOVABLE) && (item->hasProperty(CONST_PROP_BLOCKPATH) || item->hasProperty(CONST_PROP_BLOCKSOLID)) && item->canBeMoved()) {\n\t\t\t\tif (moveCount < 20 && pushItem(item, nextDirection)) {\n\t\t\t\t\t++moveCount;\n\t\t\t\t} else if (!item->isCorpse() && g_game().internalRemoveItem(item) == RETURNVALUE_NOERROR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97be4d04dd12e4ea9e89b4ab958027d6dd3e907618094230e25c6413838a92fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1152, + "startColumn": 54, + "charOffset": 33670, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1150, + "startColumn": 54, + "charOffset": 33614, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Monster::pushCreature(std::shared_ptr creature) {\n\tstatic std::vector dirList {\n\t\tDIRECTION_NORTH," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7cfe51c1739c9078e7087bb5fef897cb99b630977895d6b494d4f85fc87689be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1160, + "startColumn": 2, + "charOffset": 33869, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1158, + "startColumn": 2, + "charOffset": 33798, + "charLength": 3, + "snippet": { + "text": "\tstd::shuffle(dirList.begin(), dirList.end(), getRandomGenerator());\n\n\tfor (Direction dir : dirList) {\n\t\tconst Position &tryPos = Spells::getCasterPosition(creature, dir);\n\t\tconst auto toTile = g_game().map.getTile(tryPos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29b8d7aba7bc25f6c7e1130fa040f1a6572781419a3b1b689590f862ac374402" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-anyofallof", + "ruleIndex": 735, + "kind": "fail", + "level": "warning", + "message": { + "text": "replace loop by 'std::ranges::any_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1160, + "startColumn": 2, + "charOffset": 33869, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1158, + "startColumn": 2, + "charOffset": 33798, + "charLength": 3, + "snippet": { + "text": "\tstd::shuffle(dirList.begin(), dirList.end(), getRandomGenerator());\n\n\tfor (Direction dir : dirList) {\n\t\tconst Position &tryPos = Spells::getCasterPosition(creature, dir);\n\t\tconst auto toTile = g_game().map.getTile(tryPos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa320f8d2f620755ac6f267ed6b784e714d03e14f718ac58883ab91cf41fa38f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1170, + "startColumn": 51, + "charOffset": 34241, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 1168, + "startColumn": 51, + "charOffset": 34188, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Monster::pushCreatures(std::shared_ptr tile) {\n\t// We can not use iterators here since we can push a creature to another tile\n\t// which will invalidate the iterator." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76722c67d476876e847ade4d0946e9994bded02dc20c5ae58ee8bcad7b32161b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1177, + "startColumn": 3, + "charOffset": 34512, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1175, + "startColumn": 3, + "charOffset": 34453, + "charLength": 3, + "snippet": { + "text": "\t\tstd::shared_ptr lastPushedMonster = nullptr;\n\n\t\tfor (size_t i = 0; i < creatures->size();) {\n\t\t\tstd::shared_ptr monster = creatures->at(i)->getMonster();\n\t\t\tif (monster && monster->isPushable()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56994edc42a9f1348d0a4b43fbd03b86ff2566d0700c0782fc47691423fdfac3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1177, + "startColumn": 3, + "charOffset": 34512, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1175, + "startColumn": 3, + "charOffset": 34453, + "charLength": 3, + "snippet": { + "text": "\t\tstd::shared_ptr lastPushedMonster = nullptr;\n\n\t\tfor (size_t i = 0; i < creatures->size();) {\n\t\t\tstd::shared_ptr monster = creatures->at(i)->getMonster();\n\t\t\tif (monster && monster->isPushable()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae500ccf79fff70fc3b0fc64057627c2df6c4f9f7971f792477ef50e915a71d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'creatures' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1177, + "startColumn": 22, + "charOffset": 34531, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1175, + "startColumn": 22, + "charOffset": 34453, + "charLength": 1, + "snippet": { + "text": "\t\tstd::shared_ptr lastPushedMonster = nullptr;\n\n\t\tfor (size_t i = 0; i < creatures->size();) {\n\t\t\tstd::shared_ptr monster = creatures->at(i)->getMonster();\n\t\t\tif (monster && monster->isPushable()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9081111baa9d6b1c3d272f6fb1fa938026c8f57186616a092212683b728dc02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1234, + "startColumn": 32, + "charOffset": 35936, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 1232, + "startColumn": 32, + "charOffset": 35835, + "charLength": 4, + "snippet": { + "text": "\nvoid Monster::doRandomStep(Direction &nextDirection, bool &result) {\n\tif (getTimeSinceLastMove() >= 1000) {\n\t\trandomStepping = true;\n\t\tresult = getRandomStep(getPosition(), nextDirection);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62d0bdfd4eb618d9ad7033b4f9e0c00f2b3eb71b55ce4d3a311bb79489a271fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1243, + "startColumn": 9, + "charOffset": 36193, + "charLength": 2, + "snippet": { + "text": "|=" + } + }, + "contextRegion": { + "startLine": 1241, + "startColumn": 9, + "charOffset": 36115, + "charLength": 2, + "snippet": { + "text": "\tresult = Creature::getNextStep(nextDirection, flags);\n\tif (result) {\n\t\tflags |= FLAG_PATHFINDING;\n\t} else {\n\t\tif (ignoreFieldDamage) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f9a27de35f01bdaba080bec2b84d08b429b76ea0adb072d1f32e86cd11ab44c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1257, + "startColumn": 73, + "charOffset": 36608, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 1255, + "startColumn": 73, + "charOffset": 36501, + "charLength": 1, + "snippet": { + "text": "\n\t\tstd::vector listDir;\n\t\tif (!getPathTo(masterPos, listDir, 0, std::max(0, distance - 5), true, true, distance)) {\n\t\t\tisWalkingBack = false;\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "117121e3e56efe9a9559785238fb42b6b7837faeaca8ee6dcc3c97dc57afda3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1269, + "startColumn": 9, + "charOffset": 36903, + "charLength": 2, + "snippet": { + "text": "|=" + } + }, + "contextRegion": { + "startLine": 1267, + "startColumn": 9, + "charOffset": 36825, + "charLength": 2, + "snippet": { + "text": "\tresult = Creature::getNextStep(nextDirection, flags);\n\tif (result) {\n\t\tflags |= FLAG_PATHFINDING;\n\t} else {\n\t\tif (ignoreFieldDamage) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "323fd2bbdee5cdff92d2b864b4adf01a08556f86ea73f985081e42654e5c091a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1279, + "startColumn": 4, + "charOffset": 37197, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1277, + "startColumn": 4, + "charOffset": 37085, + "charLength": 2, + "snippet": { + "text": "\t\tauto followCreature = getFollowCreature();\n\t\tif (attackedCreature && attackedCreature == followCreature) {\n\t\t\tif (isFleeing()) {\n\t\t\t\tresult = getDanceStep(getPosition(), nextDirection, false, false);\n\t\t\t} else if (mType->info.staticAttackChance < static_cast(uniform_random(1, 100))) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d53ee2e7cf41395309cb1ad802eb7a28c67d3c611bd1dadd4f51236711dde801" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1281, + "startColumn": 88, + "charOffset": 37374, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 1279, + "startColumn": 88, + "charOffset": 37194, + "charLength": 3, + "snippet": { + "text": "\t\t\tif (isFleeing()) {\n\t\t\t\tresult = getDanceStep(getPosition(), nextDirection, false, false);\n\t\t\t} else if (mType->info.staticAttackChance < static_cast(uniform_random(1, 100))) {\n\t\t\t\tresult = getDanceStep(getPosition(), nextDirection);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "502228c1e4b2ff49838b3475753300d800f9a8f7964c4a334be21c8766d88f88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1296, + "startColumn": 2, + "charOffset": 37727, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1294, + "startColumn": 2, + "charOffset": 37656, + "charLength": 3, + "snippet": { + "text": "\tstd::shuffle(dirList.begin(), dirList.end(), getRandomGenerator());\n\n\tfor (Direction dir : dirList) {\n\t\tif (canWalkTo(creaturePos, dir)) {\n\t\t\tmoveDirection = dir;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9cc6460b5ca7834c5ef4f6a99cf2322d806b81ddb628a55b59ab0f778c1e79b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'getDanceStep' has cognitive complexity of 51 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1305, + "startColumn": 15, + "charOffset": 37875, + "charLength": 12, + "snippet": { + "text": "getDanceStep" + } + }, + "contextRegion": { + "startLine": 1303, + "startColumn": 15, + "charOffset": 37858, + "charLength": 12, + "snippet": { + "text": "}\n\nbool Monster::getDanceStep(const Position &creaturePos, Direction &moveDirection, bool keepAttack /*= true*/, bool keepDistance /*= true*/) {\n\tauto attackedCreature = getAttackedCreature();\n\tif (!attackedCreature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd08f93c6579e2ce52831098902a2c2a9fe6386faf8625ee696c5718dcba653c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1307, + "startColumn": 6, + "charOffset": 38056, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1305, + "startColumn": 6, + "charOffset": 37861, + "charLength": 1, + "snippet": { + "text": "bool Monster::getDanceStep(const Position &creaturePos, Direction &moveDirection, bool keepAttack /*= true*/, bool keepDistance /*= true*/) {\n\tauto attackedCreature = getAttackedCreature();\n\tif (!attackedCreature) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0fe30feff6421ed6535daea574c93ef4292325797b952f09b9d88cea3f1db326" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1319, + "startColumn": 45, + "charOffset": 38509, + "charLength": 10, + "snippet": { + "text": "distance_x" + } + }, + "contextRegion": { + "startLine": 1317, + "startColumn": 45, + "charOffset": 38417, + "charLength": 10, + "snippet": { + "text": "\tint_fast32_t distance_y = std::abs(offset_y);\n\n\tuint32_t centerToDist = std::max(distance_x, distance_y);\n\n\t// monsters not at targetDistance shouldn't dancestep" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b40c69436d8123fdd402929a6131d60610cf1af1d5b142d09dbaa59c24733f96" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1319, + "startColumn": 57, + "charOffset": 38521, + "charLength": 10, + "snippet": { + "text": "distance_y" + } + }, + "contextRegion": { + "startLine": 1317, + "startColumn": 57, + "charOffset": 38417, + "charLength": 10, + "snippet": { + "text": "\tint_fast32_t distance_y = std::abs(offset_y);\n\n\tuint32_t centerToDist = std::max(distance_x, distance_y);\n\n\t// monsters not at targetDistance shouldn't dancestep" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f18a3010d78ef819f70f14068a227831c4e5be84138f1eef3b9b949b00820eed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1322, + "startColumn": 21, + "charOffset": 38610, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1320, + "startColumn": 21, + "charOffset": 38534, + "charLength": 1, + "snippet": { + "text": "\n\t// monsters not at targetDistance shouldn't dancestep\n\tif (centerToDist < (uint32_t)targetDistance) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1f90967dde8febc795ac3cb9dc4dd9ecd4da8439775f6f593119e6684784bc9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1328, + "startColumn": 41, + "charOffset": 38770, + "charLength": 10, + "snippet": { + "text": "distance_x" + } + }, + "contextRegion": { + "startLine": 1326, + "startColumn": 41, + "charOffset": 38658, + "charLength": 10, + "snippet": { + "text": "\tstd::vector dirList;\n\tif (!keepDistance || offset_y >= 0) {\n\t\tuint32_t tmpDist = std::max(distance_x, std::abs((creaturePos.getY() - 1) - centerPos.getY()));\n\t\tif (tmpDist == centerToDist && canWalkTo(creaturePos, DIRECTION_NORTH)) {\n\t\t\tbool result = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1a56f20b5122ac9492f4f383ab6b5559dcf367ca3472aecc1a4f5e87b6b8e67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1328, + "startColumn": 53, + "charOffset": 38782, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1326, + "startColumn": 53, + "charOffset": 38658, + "charLength": 3, + "snippet": { + "text": "\tstd::vector dirList;\n\tif (!keepDistance || offset_y >= 0) {\n\t\tuint32_t tmpDist = std::max(distance_x, std::abs((creaturePos.getY() - 1) - centerPos.getY()));\n\t\tif (tmpDist == centerToDist && canWalkTo(creaturePos, DIRECTION_NORTH)) {\n\t\t\tbool result = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "678d460adb73dc0bd13c517702e6bd8735640590b5d762cc5399d614aecd93ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1333, + "startColumn": 71, + "charOffset": 39029, + "charLength": 11, + "snippet": { + "text": "creaturePos" + } + }, + "contextRegion": { + "startLine": 1331, + "startColumn": 71, + "charOffset": 38937, + "charLength": 11, + "snippet": { + "text": "\n\t\t\tif (keepAttack) {\n\t\t\t\tresult = (!canDoAttackNow || canUseAttack(Position(creaturePos.x, creaturePos.y - 1, creaturePos.z), attackedCreature));\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "283e2b6cf79424046c88293fc1454bdb2eca13719cc9195f4e01cf8f031fc2d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1343, + "startColumn": 41, + "charOffset": 39239, + "charLength": 10, + "snippet": { + "text": "distance_x" + } + }, + "contextRegion": { + "startLine": 1341, + "startColumn": 41, + "charOffset": 39159, + "charLength": 10, + "snippet": { + "text": "\n\tif (!keepDistance || offset_y <= 0) {\n\t\tuint32_t tmpDist = std::max(distance_x, std::abs((creaturePos.getY() + 1) - centerPos.getY()));\n\t\tif (tmpDist == centerToDist && canWalkTo(creaturePos, DIRECTION_SOUTH)) {\n\t\t\tbool result = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "863b9a799d5656b02a3f8cb8ec8455677ecb8948ee47d0bafb59535ae65af261" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1343, + "startColumn": 53, + "charOffset": 39251, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1341, + "startColumn": 53, + "charOffset": 39159, + "charLength": 3, + "snippet": { + "text": "\n\tif (!keepDistance || offset_y <= 0) {\n\t\tuint32_t tmpDist = std::max(distance_x, std::abs((creaturePos.getY() + 1) - centerPos.getY()));\n\t\tif (tmpDist == centerToDist && canWalkTo(creaturePos, DIRECTION_SOUTH)) {\n\t\t\tbool result = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6191bfa7b1174e199802a1d44522c891545626137e407eba9eb4d161950aae8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1358, + "startColumn": 41, + "charOffset": 39708, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1356, + "startColumn": 41, + "charOffset": 39628, + "charLength": 3, + "snippet": { + "text": "\n\tif (!keepDistance || offset_x <= 0) {\n\t\tuint32_t tmpDist = std::max(std::abs((creaturePos.getX() + 1) - centerPos.getX()), distance_y);\n\t\tif (tmpDist == centerToDist && canWalkTo(creaturePos, DIRECTION_EAST)) {\n\t\t\tbool result = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd031c7d01ea266668f43dabe2c959fb8583a4c3d96f02b34d631079a64b967c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1358, + "startColumn": 96, + "charOffset": 39763, + "charLength": 10, + "snippet": { + "text": "distance_y" + } + }, + "contextRegion": { + "startLine": 1356, + "startColumn": 96, + "charOffset": 39628, + "charLength": 10, + "snippet": { + "text": "\n\tif (!keepDistance || offset_x <= 0) {\n\t\tuint32_t tmpDist = std::max(std::abs((creaturePos.getX() + 1) - centerPos.getX()), distance_y);\n\t\tif (tmpDist == centerToDist && canWalkTo(creaturePos, DIRECTION_EAST)) {\n\t\t\tbool result = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6191bfa7b1174e199802a1d44522c891545626137e407eba9eb4d161950aae8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1373, + "startColumn": 41, + "charOffset": 40175, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1371, + "startColumn": 41, + "charOffset": 40095, + "charLength": 3, + "snippet": { + "text": "\n\tif (!keepDistance || offset_x >= 0) {\n\t\tuint32_t tmpDist = std::max(std::abs((creaturePos.getX() - 1) - centerPos.getX()), distance_y);\n\t\tif (tmpDist == centerToDist && canWalkTo(creaturePos, DIRECTION_WEST)) {\n\t\t\tbool result = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee444d925fac034343230bddc9dce2dd0ad6f774a19044d3a7048b295683490e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1373, + "startColumn": 96, + "charOffset": 40230, + "charLength": 10, + "snippet": { + "text": "distance_y" + } + }, + "contextRegion": { + "startLine": 1371, + "startColumn": 96, + "charOffset": 40095, + "charLength": 10, + "snippet": { + "text": "\n\tif (!keepDistance || offset_x >= 0) {\n\t\tuint32_t tmpDist = std::max(std::abs((creaturePos.getX() - 1) - centerPos.getX()), distance_y);\n\t\tif (tmpDist == centerToDist && canWalkTo(creaturePos, DIRECTION_WEST)) {\n\t\t\tbool result = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "580c9777b458c222cfd6049655dc4a9d7d02ed160ac8fb51119d72ebfc5ec29f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1378, + "startColumn": 56, + "charOffset": 40418, + "charLength": 11, + "snippet": { + "text": "creaturePos" + } + }, + "contextRegion": { + "startLine": 1376, + "startColumn": 56, + "charOffset": 40341, + "charLength": 11, + "snippet": { + "text": "\n\t\t\tif (keepAttack) {\n\t\t\t\tresult = (!canDoAttackNow || canUseAttack(Position(creaturePos.x - 1, creaturePos.y, creaturePos.z), attackedCreature));\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1759dc6aab0b6e5651a453c7463a805f96c191dcf2088f2ecb369ab1154f9b5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1389, + "startColumn": 45, + "charOffset": 40702, + "charLength": 7, + "snippet": { + "text": "dirList" + } + }, + "contextRegion": { + "startLine": 1387, + "startColumn": 45, + "charOffset": 40563, + "charLength": 7, + "snippet": { + "text": "\tif (!dirList.empty()) {\n\t\tstd::shuffle(dirList.begin(), dirList.end(), getRandomGenerator());\n\t\tmoveDirection = dirList[uniform_random(0, dirList.size() - 1)];\n\t\treturn true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f8ff5b7adc2e9f1068c98ca0da29b05cb7f1565a36f88b0db1b0e69945c5588" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1389, + "startColumn": 45, + "charOffset": 40702, + "charLength": 7, + "snippet": { + "text": "dirList" + } + }, + "contextRegion": { + "startLine": 1387, + "startColumn": 45, + "charOffset": 40563, + "charLength": 7, + "snippet": { + "text": "\tif (!dirList.empty()) {\n\t\tstd::shuffle(dirList.begin(), dirList.end(), getRandomGenerator());\n\t\tmoveDirection = dirList[uniform_random(0, dirList.size() - 1)];\n\t\treturn true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4714a3048c58deff5da53e2203f0b7a327ae987416e61b782bfb7a9d29fb2125" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'getDistanceStep' has cognitive complexity of 372 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1395, + "startColumn": 15, + "charOffset": 40774, + "charLength": 15, + "snippet": { + "text": "getDistanceStep" + } + }, + "contextRegion": { + "startLine": 1393, + "startColumn": 15, + "charOffset": 40757, + "charLength": 15, + "snippet": { + "text": "}\n\nbool Monster::getDistanceStep(const Position &targetPos, Direction &moveDirection, bool flee /* = false */) {\n\tconst Position &creaturePos = getPosition();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef1fe09846445f6fabd066ec9bcb4e1ff43c8818376c6dd582238bba6f78f298" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1401, + "startColumn": 2, + "charOffset": 41053, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1399, + "startColumn": 2, + "charOffset": 40984, + "charLength": 2, + "snippet": { + "text": "\tint_fast32_t dy = Position::getDistanceY(creaturePos, targetPos);\n\n\tif (int32_t distance = std::max(static_cast(dx), static_cast(dy)); !flee && (distance > targetDistance || !g_game().isSightClear(creaturePos, targetPos, true))) {\n\t\treturn false; // let the A* calculate it\n\t} else if (!flee && distance == targetDistance) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20d0489f5324d2ae31b78869d976c5fc801c5231650ff1e9686515f0392ba601" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-else-after-return", + "ruleIndex": 699, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1403, + "startColumn": 4, + "charOffset": 41289, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1401, + "startColumn": 4, + "charOffset": 41052, + "charLength": 4, + "snippet": { + "text": "\tif (int32_t distance = std::max(static_cast(dx), static_cast(dy)); !flee && (distance > targetDistance || !g_game().isSightClear(creaturePos, targetPos, true))) {\n\t\treturn false; // let the A* calculate it\n\t} else if (!flee && distance == targetDistance) {\n\t\treturn true; // we don't really care here, since it's what we wanted to reach (a dancestep will take of dancing in that position)\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2fc72cafdf5d05d783087fec6b2a5fa6012735fb7689d4d0764367eee10eabc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1410, + "startColumn": 2, + "charOffset": 41615, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1408, + "startColumn": 2, + "charOffset": 41543, + "charLength": 2, + "snippet": { + "text": "\tint_fast32_t offsety = Position::getOffsetY(creaturePos, targetPos);\n\n\tif (dx <= 1 && dy <= 1) {\n\t\t// seems like a target is near, it this case we need to slow down our movements (as a monster)\n\t\tif (stepDuration < 2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "599b63237c8aef1c7b6063a24d9e67d7f50d232c7c3f556901439d94c19e73d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1425, + "startColumn": 3, + "charOffset": 42087, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1423, + "startColumn": 3, + "charOffset": 42029, + "charLength": 2, + "snippet": { + "text": "\tif (dx == dy) {\n\t\t// player is diagonal to the monster\n\t\tif (offsetx >= 1 && offsety >= 1) {\n\t\t\t// player is NW\n\t\t\t// escape to SE, S or E [and some extra]" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e98664816967c6357d17a7ea21b2a7b0343b3481037bbe6a45a2f28c535818b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1431, + "startColumn": 4, + "charOffset": 42295, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1429, + "startColumn": 4, + "charOffset": 42239, + "charLength": 2, + "snippet": { + "text": "\t\t\tbool e = canWalkTo(creaturePos, DIRECTION_EAST);\n\n\t\t\tif (s && e) {\n\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_SOUTH : DIRECTION_EAST;\n\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66bd5972a0ef84cb62fe86d913bc3120b866ab542f40936278b19c8afbf3c9bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1434, + "startColumn": 6, + "charOffset": 42404, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1432, + "startColumn": 6, + "charOffset": 42309, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_SOUTH : DIRECTION_EAST;\n\t\t\t\treturn true;\n\t\t\t} else if (s) {\n\t\t\t\tmoveDirection = DIRECTION_SOUTH;\n\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0a104554be9346eb055e3a2c236c80b046ac7097d941988e28f61c2d5e502b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1450, + "startColumn": 5, + "charOffset": 42811, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1448, + "startColumn": 5, + "charOffset": 42791, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tif (flee) {\n\t\t\t\tif (n && w) {\n\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_NORTH : DIRECTION_WEST;\n\t\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dab54516a16f6b42d514ae75899f3ffa53f5f17408c1924dfb6cb4eb38bdff34" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1453, + "startColumn": 7, + "charOffset": 42923, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1451, + "startColumn": 7, + "charOffset": 42825, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_NORTH : DIRECTION_WEST;\n\t\t\t\t\treturn true;\n\t\t\t\t} else if (n) {\n\t\t\t\t\tmoveDirection = DIRECTION_NORTH;\n\t\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d149c588bbb705cf508d345b2d4bb37eb076429bc87088b03441ab222dd9fc8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1464, + "startColumn": 4, + "charOffset": 43108, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1462, + "startColumn": 4, + "charOffset": 43080, + "charLength": 2, + "snippet": { + "text": "\t\t\t/* end of fleeing */\n\n\t\t\tif (w && canWalkTo(creaturePos, DIRECTION_SOUTHWEST)) {\n\t\t\t\tmoveDirection = DIRECTION_WEST;\n\t\t\t} else if (n && canWalkTo(creaturePos, DIRECTION_NORTHEAST)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6bae326f822d9e785e357c296f2d18a865a5fd23fc756f193ec30150f52e0ade" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1471, + "startColumn": 5, + "charOffset": 43329, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1469, + "startColumn": 5, + "charOffset": 43308, + "charLength": 4, + "snippet": { + "text": "\n\t\t\treturn true;\n\t\t} else if (offsetx <= -1 && offsety <= -1) {\n\t\t\t// player is SE\n\t\t\t// escape to NW , W or N [and some extra]" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f9062eec27462919b5f946a0e4dd19681a75e3c4753085193f9a1f811a72459" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1477, + "startColumn": 4, + "charOffset": 43545, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1475, + "startColumn": 4, + "charOffset": 43488, + "charLength": 2, + "snippet": { + "text": "\t\t\tbool n = canWalkTo(creaturePos, DIRECTION_NORTH);\n\n\t\t\tif (w && n) {\n\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_WEST : DIRECTION_NORTH;\n\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "823af03c774ec940fa5de9a3fb430623acfc78ab88c2b6a9dfe449120735824f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1480, + "startColumn": 6, + "charOffset": 43654, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1478, + "startColumn": 6, + "charOffset": 43559, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_WEST : DIRECTION_NORTH;\n\t\t\t\treturn true;\n\t\t\t} else if (w) {\n\t\t\t\tmoveDirection = DIRECTION_WEST;\n\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa8d589a5571f54ba2b11e51a200624051c2b8eec5539d0013334ab1501fe0be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1498, + "startColumn": 5, + "charOffset": 44060, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1496, + "startColumn": 5, + "charOffset": 44040, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tif (flee) {\n\t\t\t\tif (s && e) {\n\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_SOUTH : DIRECTION_EAST;\n\t\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f2245b8bcf5493c418f08bca48aefcb8494cc8bb95c8e33500face093f7e581" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1501, + "startColumn": 7, + "charOffset": 44172, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1499, + "startColumn": 7, + "charOffset": 44074, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_SOUTH : DIRECTION_EAST;\n\t\t\t\t\treturn true;\n\t\t\t\t} else if (s) {\n\t\t\t\t\tmoveDirection = DIRECTION_SOUTH;\n\t\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a60a03e2a0d2e84b451ea8791cccd1fa3da423efb5db11ea882e91a5ea3c9a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1512, + "startColumn": 4, + "charOffset": 44357, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1510, + "startColumn": 4, + "charOffset": 44329, + "charLength": 2, + "snippet": { + "text": "\t\t\t/* end of fleeing */\n\n\t\t\tif (s && canWalkTo(creaturePos, DIRECTION_SOUTHWEST)) {\n\t\t\t\tmoveDirection = DIRECTION_SOUTH;\n\t\t\t} else if (e && canWalkTo(creaturePos, DIRECTION_NORTHEAST)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34598a820d0616d34a5475d5efd9e7943a4f92dca21c6ad031b47b23b6aae94d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1524, + "startColumn": 4, + "charOffset": 44789, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1522, + "startColumn": 4, + "charOffset": 44681, + "charLength": 2, + "snippet": { + "text": "\t\t\tbool n = canWalkTo(creaturePos, DIRECTION_NORTH);\n\t\t\tbool e = canWalkTo(creaturePos, DIRECTION_EAST);\n\t\t\tif (n && e) {\n\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_NORTH : DIRECTION_EAST;\n\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79bff533d9a0e00904519055a1b211e26776fbcdc6392b9dc8b498765cd7ff04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1527, + "startColumn": 6, + "charOffset": 44898, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1525, + "startColumn": 6, + "charOffset": 44803, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_NORTH : DIRECTION_EAST;\n\t\t\t\treturn true;\n\t\t\t} else if (n) {\n\t\t\t\tmoveDirection = DIRECTION_NORTH;\n\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1db9a3ceb6df7ecc39f7b324dd86f28852ff3031835b23b5b3017c8ad9c708f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1545, + "startColumn": 5, + "charOffset": 45304, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1543, + "startColumn": 5, + "charOffset": 45284, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tif (flee) {\n\t\t\t\tif (s && w) {\n\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_SOUTH : DIRECTION_WEST;\n\t\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6c22367a0b9f7ffd85d3b66c5eb155af967a45880a63a806de4ed35e5c03b70" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1548, + "startColumn": 7, + "charOffset": 45416, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1546, + "startColumn": 7, + "charOffset": 45318, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_SOUTH : DIRECTION_WEST;\n\t\t\t\t\treturn true;\n\t\t\t\t} else if (s) {\n\t\t\t\t\tmoveDirection = DIRECTION_SOUTH;\n\t\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5aeae6aad78a595727220741d5ea4fa8f3eb631c633c0f10035998d546939803" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1559, + "startColumn": 4, + "charOffset": 45601, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1557, + "startColumn": 4, + "charOffset": 45573, + "charLength": 2, + "snippet": { + "text": "\t\t\t/* end of fleeing */\n\n\t\t\tif (w && canWalkTo(creaturePos, DIRECTION_NORTHWEST)) {\n\t\t\t\tmoveDirection = DIRECTION_WEST;\n\t\t\t} else if (s && canWalkTo(creaturePos, DIRECTION_SOUTHEAST)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4066db3ee39653cf07f170e5b1963b4f9267aa1ee9f0b8b13e1a3cb3d9b28ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1571, + "startColumn": 4, + "charOffset": 46033, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1569, + "startColumn": 4, + "charOffset": 45925, + "charLength": 2, + "snippet": { + "text": "\t\t\tbool w = canWalkTo(creaturePos, DIRECTION_WEST);\n\t\t\tbool s = canWalkTo(creaturePos, DIRECTION_SOUTH);\n\t\t\tif (w && s) {\n\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_WEST : DIRECTION_SOUTH;\n\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e0be8878a448f01d7c9872195ae5fc9478eb237f1666d13d951861856127050" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1574, + "startColumn": 6, + "charOffset": 46142, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1572, + "startColumn": 6, + "charOffset": 46047, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_WEST : DIRECTION_SOUTH;\n\t\t\t\treturn true;\n\t\t\t} else if (w) {\n\t\t\t\tmoveDirection = DIRECTION_WEST;\n\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5053b166628da8cdfd29add45445962af3d60f8721b2161da797196fcedec98c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1590, + "startColumn": 5, + "charOffset": 46549, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1588, + "startColumn": 5, + "charOffset": 46529, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tif (flee) {\n\t\t\t\tif (n && e) {\n\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_NORTH : DIRECTION_EAST;\n\t\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e5ed497afa380097b5adf5be44105c8d6501a3b86e7a858619f832476aeb59c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1593, + "startColumn": 7, + "charOffset": 46661, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1591, + "startColumn": 7, + "charOffset": 46563, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_NORTH : DIRECTION_EAST;\n\t\t\t\t\treturn true;\n\t\t\t\t} else if (n) {\n\t\t\t\t\tmoveDirection = DIRECTION_NORTH;\n\t\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d514bc09efc1325a3f87bc622b9a1bb13d006b39beeb2bd69e2359c6d6fb013b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1604, + "startColumn": 4, + "charOffset": 46846, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1602, + "startColumn": 4, + "charOffset": 46818, + "charLength": 2, + "snippet": { + "text": "\t\t\t/* end of fleeing */\n\n\t\t\tif (e && canWalkTo(creaturePos, DIRECTION_SOUTHEAST)) {\n\t\t\t\tmoveDirection = DIRECTION_EAST;\n\t\t\t} else if (n && canWalkTo(creaturePos, DIRECTION_NORTHWEST)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6f51d8dcf559359e504533be416d4ace372719dd5a69d83517c19bdcd4d6e85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1627, + "startColumn": 5, + "charOffset": 47739, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1625, + "startColumn": 5, + "charOffset": 47629, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tbool w = canWalkTo(creaturePos, DIRECTION_WEST);\n\t\t\t\tbool e = canWalkTo(creaturePos, DIRECTION_EAST);\n\t\t\t\tif (w && e && offsetx == 0) {\n\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_WEST : DIRECTION_EAST;\n\t\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7a93d8604bee9d08a4d4a82f3d4011a7fb4ac2f2f5bf7d136c45ef35e4845fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1630, + "startColumn": 7, + "charOffset": 47866, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1628, + "startColumn": 7, + "charOffset": 47769, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_WEST : DIRECTION_EAST;\n\t\t\t\t\treturn true;\n\t\t\t\t} else if (w && offsetx <= 0) {\n\t\t\t\t\tmoveDirection = DIRECTION_WEST;\n\t\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "484d70dc217b3a35e57df80b6e63866221801290ba03d1dece943b181b8cff08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1640, + "startColumn": 6, + "charOffset": 48088, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1638, + "startColumn": 6, + "charOffset": 48049, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t/* fleeing */\n\t\t\t\tif (flee) {\n\t\t\t\t\tif (w && e) {\n\t\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_WEST : DIRECTION_EAST;\n\t\t\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "360de1e703cfc1fbb2384df39aca5ecad5ab85501d3af417b307e9479a2141aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1643, + "startColumn": 8, + "charOffset": 48202, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1641, + "startColumn": 8, + "charOffset": 48102, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_WEST : DIRECTION_EAST;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t} else if (w) {\n\t\t\t\t\t\tmoveDirection = DIRECTION_WEST;\n\t\t\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1724ed2833a96185f85ea3e47467ffa328f7ef56171696d90fb13500412bf06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1658, + "startColumn": 6, + "charOffset": 48564, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1656, + "startColumn": 6, + "charOffset": 48509, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tif (sw || se) {\n\t\t\t\t\t// we can move both dirs\n\t\t\t\t\tif (sw && se) {\n\t\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_SOUTHWEST : DIRECTION_SOUTHEAST;\n\t\t\t\t\t} else if (w) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17562c126f47f4a5f5f4c47a870e0fe63d5e56347edcbefa72671f35792eb18e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1691, + "startColumn": 5, + "charOffset": 49405, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1689, + "startColumn": 5, + "charOffset": 49295, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tbool w = canWalkTo(creaturePos, DIRECTION_WEST);\n\t\t\t\tbool e = canWalkTo(creaturePos, DIRECTION_EAST);\n\t\t\t\tif (w && e && offsetx == 0) {\n\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_WEST : DIRECTION_EAST;\n\t\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4901db2e0f780e90a9e7f7bc09cbf846f54ad6fe3335e77d029592d6b6b79d1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1694, + "startColumn": 7, + "charOffset": 49532, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1692, + "startColumn": 7, + "charOffset": 49435, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_WEST : DIRECTION_EAST;\n\t\t\t\t\treturn true;\n\t\t\t\t} else if (w && offsetx <= 0) {\n\t\t\t\t\tmoveDirection = DIRECTION_WEST;\n\t\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "211d9656d3f90c44999cd3c6119310fe28aa5aeba6c07203e9a383e32b205ab1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1704, + "startColumn": 6, + "charOffset": 49754, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1702, + "startColumn": 6, + "charOffset": 49715, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t/* fleeing */\n\t\t\t\tif (flee) {\n\t\t\t\t\tif (w && e) {\n\t\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_WEST : DIRECTION_EAST;\n\t\t\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "367466c2683beddfb623481df2064d9f691e211b66da6c919821fb674e61c2db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1707, + "startColumn": 8, + "charOffset": 49868, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1705, + "startColumn": 8, + "charOffset": 49768, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_WEST : DIRECTION_EAST;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t} else if (w) {\n\t\t\t\t\t\tmoveDirection = DIRECTION_WEST;\n\t\t\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f4dacc750c44a437f5125d1dac849792b23e98198005f25baf11d9a52de1367" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1722, + "startColumn": 6, + "charOffset": 50230, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1720, + "startColumn": 6, + "charOffset": 50175, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tif (nw || ne) {\n\t\t\t\t\t// we can move both dirs\n\t\t\t\t\tif (nw && ne) {\n\t\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_NORTHWEST : DIRECTION_NORTHEAST;\n\t\t\t\t\t} else if (w) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1cfe3f76ddbb87c0bcf6e6ef091fafec2a821c98efde5cbceacc620c2232dbaa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1761, + "startColumn": 5, + "charOffset": 51201, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1759, + "startColumn": 5, + "charOffset": 51089, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tbool n = canWalkTo(creaturePos, DIRECTION_NORTH);\n\t\t\t\tbool s = canWalkTo(creaturePos, DIRECTION_SOUTH);\n\t\t\t\tif (n && s && offsety == 0) {\n\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_NORTH : DIRECTION_SOUTH;\n\t\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77e78f9752d7bf66f4cf920e72c317b5badd19ae398e82a320013e49c398232e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1764, + "startColumn": 7, + "charOffset": 51330, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1762, + "startColumn": 7, + "charOffset": 51231, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_NORTH : DIRECTION_SOUTH;\n\t\t\t\t\treturn true;\n\t\t\t\t} else if (n && offsety <= 0) {\n\t\t\t\t\tmoveDirection = DIRECTION_NORTH;\n\t\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1102752910eeea8d34c6613835e67ceed91ce844b6a259ed468ee77b0326e78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1774, + "startColumn": 6, + "charOffset": 51554, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1772, + "startColumn": 6, + "charOffset": 51515, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t/* fleeing */\n\t\t\t\tif (flee) {\n\t\t\t\t\tif (n && s) {\n\t\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_NORTH : DIRECTION_SOUTH;\n\t\t\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3dd024cb4e5df8e8adbeb9737018564b66414aa9236bf9df74931f6a08c4e4cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1777, + "startColumn": 8, + "charOffset": 51670, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1775, + "startColumn": 8, + "charOffset": 51568, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_NORTH : DIRECTION_SOUTH;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t} else if (n) {\n\t\t\t\t\t\tmoveDirection = DIRECTION_NORTH;\n\t\t\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b60eba404b7549c9cdbf3e0d72d4c15e4627562a819b339599eafa7d049b588" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1791, + "startColumn": 6, + "charOffset": 52004, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1789, + "startColumn": 6, + "charOffset": 51920, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tbool ne = canWalkTo(creaturePos, DIRECTION_NORTHEAST);\n\t\t\t\tif (se || ne) {\n\t\t\t\t\tif (se && ne) {\n\t\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_SOUTHEAST : DIRECTION_NORTHEAST;\n\t\t\t\t\t} else if (s) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20e134348a787cd7937d52465b49effc58dda3f25ec4aebf508a6ef4b3ee2452" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1824, + "startColumn": 5, + "charOffset": 52844, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1822, + "startColumn": 5, + "charOffset": 52732, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tbool n = canWalkTo(creaturePos, DIRECTION_NORTH);\n\t\t\t\tbool s = canWalkTo(creaturePos, DIRECTION_SOUTH);\n\t\t\t\tif (n && s && offsety == 0) {\n\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_NORTH : DIRECTION_SOUTH;\n\t\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f58f5f8edf14167573a7ace06cf4e245d3034b6855c7952f21ba5ab2455aeaf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1827, + "startColumn": 7, + "charOffset": 52973, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1825, + "startColumn": 7, + "charOffset": 52874, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_NORTH : DIRECTION_SOUTH;\n\t\t\t\t\treturn true;\n\t\t\t\t} else if (n && offsety <= 0) {\n\t\t\t\t\tmoveDirection = DIRECTION_NORTH;\n\t\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "734d0f9779d2993106efdf61a25d7e433a86af297fd9aec687b1cbbb20972dcd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1837, + "startColumn": 6, + "charOffset": 53197, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1835, + "startColumn": 6, + "charOffset": 53158, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t/* fleeing */\n\t\t\t\tif (flee) {\n\t\t\t\t\tif (n && s) {\n\t\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_NORTH : DIRECTION_SOUTH;\n\t\t\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b5e70d69a20cc2d72ea887233c7d2b5c11c63e7b1757170534b83d0b877fe57" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1840, + "startColumn": 8, + "charOffset": 53313, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1838, + "startColumn": 8, + "charOffset": 53211, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_NORTH : DIRECTION_SOUTH;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t} else if (n) {\n\t\t\t\t\t\tmoveDirection = DIRECTION_NORTH;\n\t\t\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f9062eec27462919b5f946a0e4dd19681a75e3c4753085193f9a1f811a72459" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1854, + "startColumn": 6, + "charOffset": 53647, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1852, + "startColumn": 6, + "charOffset": 53563, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tbool sw = canWalkTo(creaturePos, DIRECTION_SOUTHWEST);\n\t\t\t\tif (nw || sw) {\n\t\t\t\t\tif (nw && sw) {\n\t\t\t\t\t\tmoveDirection = boolean_random() ? DIRECTION_NORTHWEST : DIRECTION_SOUTHWEST;\n\t\t\t\t\t} else if (n) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "599b63237c8aef1c7b6063a24d9e67d7f50d232c7c3f556901439d94c19e73d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1895, + "startColumn": 123, + "charOffset": 54645, + "charLength": 1, + "snippet": { + "text": "|" + } + }, + "contextRegion": { + "startLine": 1893, + "startColumn": 123, + "charOffset": 54475, + "charLength": 1, + "snippet": { + "text": "\n\t\tconst auto tile = g_game().map.getTile(pos);\n\t\tif (tile && tile->getTopVisibleCreature(getMonster()) == nullptr && tile->queryAdd(0, getMonster(), 1, FLAG_PATHFINDING | FLAG_IGNOREFIELDDAMAGE) == RETURNVALUE_NOERROR) {\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1ee83fab0c61682b25b7f1763ba8543be638efe8c15e5d81500d9e159d276e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1902, + "startColumn": 46, + "charOffset": 54783, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 1900, + "startColumn": 46, + "charOffset": 54735, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Monster::death(std::shared_ptr) {\n\tif (monsterForgeClassification > ForgeClassifications_t::FORGE_NORMAL_MONSTER) {\n\t\tg_game().removeForgeMonster(getID(), monsterForgeClassification, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "909c66ce71c3b4a6e69612172b1dd9ae8d228c142a409184403f7cae77505190" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1904, + "startColumn": 12, + "charOffset": 54880, + "charLength": 18, + "snippet": { + "text": "removeForgeMonster" + } + }, + "contextRegion": { + "startLine": 1902, + "startColumn": 12, + "charOffset": 54738, + "charLength": 18, + "snippet": { + "text": "void Monster::death(std::shared_ptr) {\n\tif (monsterForgeClassification > ForgeClassifications_t::FORGE_NORMAL_MONSTER) {\n\t\tg_game().removeForgeMonster(getID(), monsterForgeClassification, true);\n\t}\n\tsetAttackedCreature(nullptr);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99be123ce3a564cbdfa8328e1a623f85975fc2ead927adaa205df20ab2353072" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1906, + "startColumn": 2, + "charOffset": 54947, + "charLength": 19, + "snippet": { + "text": "setAttackedCreature" + } + }, + "contextRegion": { + "startLine": 1904, + "startColumn": 2, + "charOffset": 54869, + "charLength": 19, + "snippet": { + "text": "\t\tg_game().removeForgeMonster(getID(), monsterForgeClassification, true);\n\t}\n\tsetAttackedCreature(nullptr);\n\n\tfor (const auto &summon : m_summons) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2b0eaec05da6592b3d0e361e479c283767944e19de533309f68916d3e55298a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1908, + "startColumn": 2, + "charOffset": 54979, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1906, + "startColumn": 2, + "charOffset": 54946, + "charLength": 3, + "snippet": { + "text": "\tsetAttackedCreature(nullptr);\n\n\tfor (const auto &summon : m_summons) {\n\t\tif (!summon) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58bd873298b72ba5bb1674c8f3697e87821e10e9aaf58c887bc9fa8988c3bfbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1909, + "startColumn": 7, + "charOffset": 55024, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1907, + "startColumn": 7, + "charOffset": 54977, + "charLength": 1, + "snippet": { + "text": "\n\tfor (const auto &summon : m_summons) {\n\t\tif (!summon) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f35cf2591074b19dc8a53b6cbe3f5e4daeac347519e407632e606e9b37f3204" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1944, + "startColumn": 6, + "charOffset": 56105, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1942, + "startColumn": 6, + "charOffset": 56041, + "charLength": 1, + "snippet": { + "text": "\nbool Monster::isInSpawnRange(const Position &pos) const {\n\tif (!spawnMonster) {\n\t\treturn true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a5016270da78a4ab207ee16b4560d13eda3eb05b96b4514e97326fba64a491e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'SpawnMonster *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1944, + "startColumn": 7, + "charOffset": 56106, + "charLength": 12, + "snippet": { + "text": "spawnMonster" + } + }, + "contextRegion": { + "startLine": 1942, + "startColumn": 7, + "charOffset": 56041, + "charLength": 12, + "snippet": { + "text": "\nbool Monster::isInSpawnRange(const Position &pos) const {\n\tif (!spawnMonster) {\n\t\treturn true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "debcf12e08629ec45ea8fca6da2ee898ce9f6edb6fb1c41c875814fe086351d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'getCombatValues' of similar type ('int32_t &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1967, + "startColumn": 31, + "charOffset": 56481, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 1965, + "startColumn": 31, + "charOffset": 56448, + "charLength": 7, + "snippet": { + "text": "}\n\nbool Monster::getCombatValues(int32_t &min, int32_t &max) {\n\tif (minCombatValue == 0 && maxCombatValue == 0) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8dfc16b67939a5dff934109c47effdb847dacdeff79e637004e7eb6805d4bc60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'updateLookDirection' has cognitive complexity of 34 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1977, + "startColumn": 15, + "charOffset": 56659, + "charLength": 19, + "snippet": { + "text": "updateLookDirection" + } + }, + "contextRegion": { + "startLine": 1975, + "startColumn": 15, + "charOffset": 56642, + "charLength": 19, + "snippet": { + "text": "}\n\nvoid Monster::updateLookDirection() {\n\tDirection newDir = getDirection();\n\tauto attackedCreature = getAttackedCreature();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "754d4eca4865f5bb71b85bd54cd2206ee4bd4d12d0ab44d590850de05e2a423b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1980, + "startColumn": 6, + "charOffset": 56772, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1978, + "startColumn": 6, + "charOffset": 56683, + "charLength": 1, + "snippet": { + "text": "\tDirection newDir = getDirection();\n\tauto attackedCreature = getAttackedCreature();\n\tif (!attackedCreature) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7e1bd53599a7fd8b16667f51b7382687ea9824c5ead4a5bce14dbaa15219dd1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'long' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1989, + "startColumn": 15, + "charOffset": 57076, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1987, + "startColumn": 15, + "charOffset": 56989, + "charLength": 3, + "snippet": { + "text": "\tint_fast32_t offsety = Position::getOffsetY(attackedCreaturePos, pos);\n\n\tint32_t dx = std::abs(offsetx);\n\tint32_t dy = std::abs(offsety);\n\tif (dx > dy) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a6260747f915a89a4482a7f8e9d3ed5d8ebdff59dd62f34dce629991eef8e5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1989, + "startColumn": 15, + "charOffset": 57076, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1987, + "startColumn": 15, + "charOffset": 56989, + "charLength": 3, + "snippet": { + "text": "\tint_fast32_t offsety = Position::getOffsetY(attackedCreaturePos, pos);\n\n\tint32_t dx = std::abs(offsetx);\n\tint32_t dy = std::abs(offsety);\n\tif (dx > dy) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da25630080d76ac3988ffd164195a421cebb4151fced8c1a0ed95ba8df361e05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'long' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1990, + "startColumn": 15, + "charOffset": 57109, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1988, + "startColumn": 15, + "charOffset": 57061, + "charLength": 3, + "snippet": { + "text": "\n\tint32_t dx = std::abs(offsetx);\n\tint32_t dy = std::abs(offsety);\n\tif (dx > dy) {\n\t\t// look EAST/WEST" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b17497f38bd691dd4f68adb6f94766f86c1e8361ae8d64195fc101f791387d93" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 1990, + "startColumn": 15, + "charOffset": 57109, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1988, + "startColumn": 15, + "charOffset": 57061, + "charLength": 3, + "snippet": { + "text": "\n\tint32_t dx = std::abs(offsetx);\n\tint32_t dy = std::abs(offsety);\n\tif (dx > dy) {\n\t\t// look EAST/WEST" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a8033a1c1e1c4747dd421d33d3fc2d0de2097b0a0c36a132d54c490544e07f5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2008, + "startColumn": 4, + "charOffset": 57478, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2006, + "startColumn": 4, + "charOffset": 57405, + "charLength": 2, + "snippet": { + "text": "\t\tDirection dir = getDirection();\n\t\tif (offsetx < 0 && offsety < 0) {\n\t\t\tif (dir == DIRECTION_SOUTH) {\n\t\t\t\tnewDir = DIRECTION_WEST;\n\t\t\t} else if (dir == DIRECTION_EAST) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ea90d9ab0378132dab9fccf03a9885822c71e593bc6674b7539329bf1a4b6bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2014, + "startColumn": 4, + "charOffset": 57657, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2012, + "startColumn": 4, + "charOffset": 57606, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\t\t} else if (offsetx < 0 && offsety > 0) {\n\t\t\tif (dir == DIRECTION_NORTH) {\n\t\t\t\tnewDir = DIRECTION_WEST;\n\t\t\t} else if (dir == DIRECTION_EAST) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82fc475765734c2030291beacb67e4c04660766ae1ab5867ec252504b0d5e185" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2020, + "startColumn": 4, + "charOffset": 57836, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2018, + "startColumn": 4, + "charOffset": 57785, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\t\t} else if (offsetx > 0 && offsety < 0) {\n\t\t\tif (dir == DIRECTION_SOUTH) {\n\t\t\t\tnewDir = DIRECTION_EAST;\n\t\t\t} else if (dir == DIRECTION_WEST) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "713ad990203fb0c6ab6738c66760d299bcadcae16656a08d4ff2418974c03145" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2026, + "startColumn": 4, + "charOffset": 57983, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2024, + "startColumn": 4, + "charOffset": 57964, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\t\t} else {\n\t\t\tif (dir == DIRECTION_NORTH) {\n\t\t\t\tnewDir = DIRECTION_EAST;\n\t\t\t} else if (dir == DIRECTION_WEST) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d048007d33a49d8b30f5529f5edcd30b4642e853e965afca8c6ac43dc9c14483" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2033, + "startColumn": 11, + "charOffset": 58133, + "charLength": 20, + "snippet": { + "text": "internalCreatureTurn" + } + }, + "contextRegion": { + "startLine": 2031, + "startColumn": 11, + "charOffset": 58116, + "charLength": 20, + "snippet": { + "text": "\t\t}\n\t}\n\tg_game().internalCreatureTurn(getMonster(), newDir);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7cb26046ee812c94ff0ad3df56ad7c553147306d0f546c2518e09e029856d516" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2036, + "startColumn": 84, + "charOffset": 58263, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 2034, + "startColumn": 84, + "charOffset": 58177, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Monster::dropLoot(std::shared_ptr corpse, std::shared_ptr) {\n\tif (corpse && lootDrop) {\n\t\t// Only fiendish drops sliver" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35048fcbf5b2fd329656a553f21d2db57b0bc34e888a168d9808c80fa3cdc79e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2076, + "startColumn": 15, + "charOffset": 59689, + "charLength": 12, + "snippet": { + "text": "changeHealth" + } + }, + "contextRegion": { + "startLine": 2074, + "startColumn": 15, + "charOffset": 59672, + "charLength": 12, + "snippet": { + "text": "}\n\nvoid Monster::changeHealth(int32_t healthChange, bool sendHealthChange /* = true*/) {\n\tif (mType && !mType->info.soundVector.empty() && mType->info.soundChance >= static_cast(uniform_random(1, 100))) {\n\t\tauto index = uniform_random(0, mType->info.soundVector.size() - 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0caffdc5218f9f560f58ae7614489f5b3429824d437f3dc4b184970da12e456" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2077, + "startColumn": 118, + "charOffset": 59878, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2075, + "startColumn": 118, + "charOffset": 59674, + "charLength": 3, + "snippet": { + "text": "\nvoid Monster::changeHealth(int32_t healthChange, bool sendHealthChange /* = true*/) {\n\tif (mType && !mType->info.soundVector.empty() && mType->info.soundChance >= static_cast(uniform_random(1, 100))) {\n\t\tauto index = uniform_random(0, mType->info.soundVector.size() - 1);\n\t\tg_game().sendSingleSoundEffect(static_self_cast()->getPosition(), mType->info.soundVector[index], getMonster());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64b07383a8a0981399e5fc4c9d3524e3f70f4740a6123c81bd99d765230596df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2078, + "startColumn": 34, + "charOffset": 59920, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 2076, + "startColumn": 34, + "charOffset": 59675, + "charLength": 5, + "snippet": { + "text": "void Monster::changeHealth(int32_t healthChange, bool sendHealthChange /* = true*/) {\n\tif (mType && !mType->info.soundVector.empty() && mType->info.soundChance >= static_cast(uniform_random(1, 100))) {\n\t\tauto index = uniform_random(0, mType->info.soundVector.size() - 1);\n\t\tg_game().sendSingleSoundEffect(static_self_cast()->getPosition(), mType->info.soundVector[index], getMonster());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24367bf9e4e7ab87021dac04be90138b015a78c2acd044264b030643a5f1caf0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2078, + "startColumn": 34, + "charOffset": 59920, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 2076, + "startColumn": 34, + "charOffset": 59675, + "charLength": 5, + "snippet": { + "text": "void Monster::changeHealth(int32_t healthChange, bool sendHealthChange /* = true*/) {\n\tif (mType && !mType->info.soundVector.empty() && mType->info.soundChance >= static_cast(uniform_random(1, 100))) {\n\t\tauto index = uniform_random(0, mType->info.soundVector.size() - 1);\n\t\tg_game().sendSingleSoundEffect(static_self_cast()->getPosition(), mType->info.soundVector[index], getMonster());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0bc62dbda9c6e0d1e064363f1094405b7d5ef7f4e31c8360d4baf42cf233270d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'changeTargetDistance' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2105, + "startColumn": 36, + "charOffset": 60738, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 2103, + "startColumn": 36, + "charOffset": 60700, + "charLength": 7, + "snippet": { + "text": "}\n\nbool Monster::changeTargetDistance(int32_t distance, uint32_t duration /* = 12000*/) {\n\tif (isSummon()) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea8bc05b714d88d006d43bdd0f876572d3a1bf33f634131bddefbe107d06bcc5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in ternary expression result" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2114, + "startColumn": 62, + "charOffset": 60943, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 2112, + "startColumn": 62, + "charOffset": 60878, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tbool shouldUpdate = mType->info.targetDistance > distance ? true : false;\n\tchallengeMeleeDuration = duration;\n\ttargetDistance = distance;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a270d07d515d2f41dd427152eb1241029aa17d183dbea665bd64b6cbb488e817" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Expression can be simplified" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2114, + "startColumn": 67, + "charOffset": 60948, + "charLength": 1, + "snippet": { + "text": ":" + } + }, + "contextRegion": { + "startLine": 2112, + "startColumn": 67, + "charOffset": 60878, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tbool shouldUpdate = mType->info.targetDistance > distance ? true : false;\n\tchallengeMeleeDuration = duration;\n\ttargetDistance = distance;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04e444bf318bda8a6091c8c4ae92e61f621ea2c2977ff7c919e4aa839cb47f23" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2115, + "startColumn": 27, + "charOffset": 60983, + "charLength": 8, + "snippet": { + "text": "duration" + } + }, + "contextRegion": { + "startLine": 2113, + "startColumn": 27, + "charOffset": 60881, + "charLength": 8, + "snippet": { + "text": "\n\tbool shouldUpdate = mType->info.targetDistance > distance ? true : false;\n\tchallengeMeleeDuration = duration;\n\ttargetDistance = distance;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "594787c15de4ebf36ee21c90b8015f6e72a851d9fc194130707b82271028a246" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2165, + "startColumn": 2, + "charOffset": 62353, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2163, + "startColumn": 2, + "charOffset": 62348, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (monsterForgeClassification == ForgeClassifications_t::FORGE_FIENDISH_MONSTER) {\n\t\tsetForgeStack(15);\n\t\tsetIcon(\"forge\", CreatureIcon(CreatureIconModifications_t::Fiendish, 0 /* don't show stacks on fiends */));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5cee96769d52ef775456e063ca59b64a3462f1e0d8a2f8386ce12d5cbf7ae43" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "15 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2166, + "startColumn": 17, + "charOffset": 62453, + "charLength": 2, + "snippet": { + "text": "15" + } + }, + "contextRegion": { + "startLine": 2164, + "startColumn": 17, + "charOffset": 62351, + "charLength": 2, + "snippet": { + "text": "\n\tif (monsterForgeClassification == ForgeClassifications_t::FORGE_FIENDISH_MONSTER) {\n\t\tsetForgeStack(15);\n\t\tsetIcon(\"forge\", CreatureIcon(CreatureIconModifications_t::Fiendish, 0 /* don't show stacks on fiends */));\n\t\tg_game().updateCreatureIcon(static_self_cast());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a00306f29c16bea1433abfe29f8df761cece511fc5a54e367c3be34fedafe16f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2170, + "startColumn": 55, + "charOffset": 62776, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2168, + "startColumn": 55, + "charOffset": 62568, + "charLength": 1, + "snippet": { + "text": "\t\tg_game().updateCreatureIcon(static_self_cast());\n\t} else if (monsterForgeClassification == ForgeClassifications_t::FORGE_INFLUENCED_MONSTER) {\n\t\tauto stack = static_cast(normal_random(1, 5));\n\t\tsetForgeStack(stack);\n\t\tsetIcon(\"forge\", CreatureIcon(CreatureIconModifications_t::Influenced, stack));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "813935a5efb2e2cff0f94a5e966bfee3001888d499902b8069ab8abfb47309b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2177, + "startColumn": 62, + "charOffset": 63046, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 2175, + "startColumn": 62, + "charOffset": 62950, + "charLength": 1, + "snippet": { + "text": "\n\t// Change health based in stacks\n\tfloat percentToIncrement = static_cast((forgeStack * 6) + 100) / 100.f;\n\tauto newHealth = static_cast(std::ceil(static_cast(healthMax) * percentToIncrement));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8dc8f708df0b1b8e8746b2912545ebf558bd188b03ca4fd5ce626512834361f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2177, + "startColumn": 67, + "charOffset": 63051, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2175, + "startColumn": 67, + "charOffset": 62950, + "charLength": 3, + "snippet": { + "text": "\n\t// Change health based in stacks\n\tfloat percentToIncrement = static_cast((forgeStack * 6) + 100) / 100.f;\n\tauto newHealth = static_cast(std::ceil(static_cast(healthMax) * percentToIncrement));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4340b18d6cd546b64fc5f43b544952e8ebedd249e570afd5c611a1642f3420e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2177, + "startColumn": 74, + "charOffset": 63058, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 2175, + "startColumn": 74, + "charOffset": 62950, + "charLength": 5, + "snippet": { + "text": "\n\t// Change health based in stacks\n\tfloat percentToIncrement = static_cast((forgeStack * 6) + 100) / 100.f;\n\tauto newHealth = static_cast(std::ceil(static_cast(healthMax) * percentToIncrement));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e4b67dfbf18dfe6b85cbd217ae56b6663adae2c7985ce5af501a8ea633b43c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2177, + "startColumn": 74, + "charOffset": 63058, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 2175, + "startColumn": 74, + "charOffset": 62950, + "charLength": 5, + "snippet": { + "text": "\n\t// Change health based in stacks\n\tfloat percentToIncrement = static_cast((forgeStack * 6) + 100) / 100.f;\n\tauto newHealth = static_cast(std::ceil(static_cast(healthMax) * percentToIncrement));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c2669c4873f77fc3047fd94da546f5d0add86b8d4747013431ee74d79705287" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2185, + "startColumn": 2, + "charOffset": 63294, + "charLength": 21, + "snippet": { + "text": "registerCreatureEvent" + } + }, + "contextRegion": { + "startLine": 2183, + "startColumn": 2, + "charOffset": 63215, + "charLength": 21, + "snippet": { + "text": "\t// Event to give Dusts\n\tconst std::string &Eventname = \"ForgeSystemMonster\";\n\tregisterCreatureEvent(Eventname);\n\n\tg_game().sendUpdateCreature(static_self_cast());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5b0693b1d7238cb9f92c85fae70a6acf510f816c7718bff8d3f366a1203c5b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2195, + "startColumn": 11, + "charOffset": 63560, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 2193, + "startColumn": 11, + "charOffset": 63473, + "charLength": 5, + "snippet": { + "text": "\tmonsterForgeClassification = ForgeClassifications_t::FORGE_NORMAL_MONSTER;\n\n\thealth = mType->info.health * mType->getHealthMultiplier();\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d33ada86feb94063e10c775e8dc2615b6d542960d3433dbdac8860d306cdfc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2195, + "startColumn": 11, + "charOffset": 63560, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 2193, + "startColumn": 11, + "charOffset": 63473, + "charLength": 5, + "snippet": { + "text": "\tmonsterForgeClassification = ForgeClassifications_t::FORGE_NORMAL_MONSTER;\n\n\thealth = mType->info.health * mType->getHealthMultiplier();\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ebc30cf293a30e67b5b8c6d42dd3a9d3c5c7b18c469cccb72961b5d17d45f863" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2195, + "startColumn": 11, + "charOffset": 63560, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 2193, + "startColumn": 11, + "charOffset": 63473, + "charLength": 5, + "snippet": { + "text": "\tmonsterForgeClassification = ForgeClassifications_t::FORGE_NORMAL_MONSTER;\n\n\thealth = mType->info.health * mType->getHealthMultiplier();\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84caf39086b524ba84ced4218a2f83e5d25421a153d6aef29a95d978dde628a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2196, + "startColumn": 14, + "charOffset": 63624, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 2194, + "startColumn": 14, + "charOffset": 63549, + "charLength": 5, + "snippet": { + "text": "\n\thealth = mType->info.health * mType->getHealthMultiplier();\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\n\n\tremoveIcon(\"forge\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "336444a3bbc91306d13033a186d45399e79a9cf12a8e0d004a94dc4e6072ffdd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2196, + "startColumn": 14, + "charOffset": 63624, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 2194, + "startColumn": 14, + "charOffset": 63549, + "charLength": 5, + "snippet": { + "text": "\n\thealth = mType->info.health * mType->getHealthMultiplier();\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\n\n\tremoveIcon(\"forge\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48cb4e43ac508154131d0da749bfb3f5ee8237457187caad0ae48773c8df6c94" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.cpp" + }, + "region": { + "startLine": 2196, + "startColumn": 14, + "charOffset": 63624, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 2194, + "startColumn": 14, + "charOffset": 63549, + "charLength": 5, + "snippet": { + "text": "\n\thealth = mType->info.health * mType->getHealthMultiplier();\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\n\n\tremoveIcon(\"forge\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06bac4e6ab3727e2e4d8a7c2ba88d44e38e03fe9a3350ff324cc92142eb123a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Monster::getReflectPercent' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monster.hpp", + "index": 1 + }, + "region": { + "startLine": 137, + "startColumn": 10, + "charOffset": 3511, + "charLength": 17, + "snippet": { + "text": "getReflectPercent" + } + }, + "contextRegion": { + "startLine": 135, + "startColumn": 10, + "charOffset": 3498, + "charLength": 17, + "snippet": { + "text": "\t}\n\n\tint32_t getReflectPercent(CombatType_t combatType, bool useCharges = false) const override;\n\tuint32_t getHealingCombatValue(CombatType_t healingType) const;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d58062c67a67849bce0bf8dada61abddaeb6d2c795a89978c9dc4eb8f493c796" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "254 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_spell_functions.cpp" + }, + "region": { + "startLine": 173, + "startColumn": 24, + "charOffset": 4626, + "charLength": 3, + "snippet": { + "text": "254" + } + }, + "contextRegion": { + "startLine": 171, + "startColumn": 24, + "charOffset": 4540, + "charLength": 3, + "snippet": { + "text": "\tif (spell) {\n\t\tauto conditionType = getNumber(L, 2);\n\t\tif (conditionType == 254) {\n\t\t\tg_logger().error(\"[{}] trying to register condition type none for monster: {}\", __FUNCTION__, spell->name);\n\t\t\treportErrorFunc(fmt::format(\"trying to register condition type none for monster: {}\", spell->name));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9091c511439ac3d5617277e37a85d2b20d4713252db0ef49f2b8a1b3b313c7ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_spell_functions.cpp" + }, + "region": { + "startLine": 175, + "startColumn": 4, + "charOffset": 4747, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 173, + "startColumn": 4, + "charOffset": 4603, + "charLength": 15, + "snippet": { + "text": "\t\tif (conditionType == 254) {\n\t\t\tg_logger().error(\"[{}] trying to register condition type none for monster: {}\", __FUNCTION__, spell->name);\n\t\t\treportErrorFunc(fmt::format(\"trying to register condition type none for monster: {}\", spell->name));\n\t\t\tpushBoolean(L, false);\n\t\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c70e2d138e81ae435da501780cc3fc935afbfb320b0c5a62aea420f8a8a6d7a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'createMonsterTypeLootLuaTable' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 20, + "startColumn": 28, + "charOffset": 704, + "charLength": 29, + "snippet": { + "text": "createMonsterTypeLootLuaTable" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 28, + "charOffset": 641, + "charLength": 29, + "snippet": { + "text": "#include \"lua/scripts/scripts.hpp\"\n\nvoid MonsterTypeFunctions::createMonsterTypeLootLuaTable(lua_State* L, const std::vector &lootList) {\n\tlua_createtable(L, lootList.size(), 0);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c68ab3bdbb79935561121c16ea030170b2ba8783669bab0d3850c1c0e5dd9eed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 21, + "startColumn": 21, + "charOffset": 810, + "charLength": 8, + "snippet": { + "text": "lootList" + } + }, + "contextRegion": { + "startLine": 19, + "startColumn": 21, + "charOffset": 676, + "charLength": 8, + "snippet": { + "text": "\nvoid MonsterTypeFunctions::createMonsterTypeLootLuaTable(lua_State* L, const std::vector &lootList) {\n\tlua_createtable(L, lootList.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3fa97da7492f352c44ddfa6095fbf3d15c3890a8f8552c1064eceda9bf04ecf9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 21, + "startColumn": 21, + "charOffset": 810, + "charLength": 8, + "snippet": { + "text": "lootList" + } + }, + "contextRegion": { + "startLine": 19, + "startColumn": 21, + "charOffset": 676, + "charLength": 8, + "snippet": { + "text": "\nvoid MonsterTypeFunctions::createMonsterTypeLootLuaTable(lua_State* L, const std::vector &lootList) {\n\tlua_createtable(L, lootList.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4fefa87b5b981e03925cfd7028d49792e0349d7f3c0f60656aa1a7ceacad6d4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 24, + "startColumn": 2, + "charOffset": 849, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 22, + "startColumn": 2, + "charOffset": 831, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (const auto &lootBlock : lootList) {\n\t\tlua_createtable(L, 0, 8);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9dd06400feb5c888680e52400f86f154a2546b12b46310fb1b08b2563e4d194a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 25, + "startColumn": 25, + "charOffset": 914, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 25, + "charOffset": 832, + "charLength": 1, + "snippet": { + "text": "\tint index = 0;\n\tfor (const auto &lootBlock : lootList) {\n\t\tlua_createtable(L, 0, 8);\n\n\t\tsetField(L, \"itemId\", lootBlock.id);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0dfd8d1871ee6c1567dc4b5ae686fb059c2d1153eab308c26af3239993be1acd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 25, + "charOffset": 943, + "charLength": 9, + "snippet": { + "text": "lootBlock" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 25, + "charOffset": 890, + "charLength": 9, + "snippet": { + "text": "\t\tlua_createtable(L, 0, 8);\n\n\t\tsetField(L, \"itemId\", lootBlock.id);\n\t\tsetField(L, \"chance\", lootBlock.chance);\n\t\tsetField(L, \"subType\", lootBlock.subType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9a6b5f0d480b5cf21b2947a0c82b79e6f047470863cb2983c3ca161f3d3425f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 25, + "charOffset": 982, + "charLength": 9, + "snippet": { + "text": "lootBlock" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 25, + "charOffset": 918, + "charLength": 9, + "snippet": { + "text": "\n\t\tsetField(L, \"itemId\", lootBlock.id);\n\t\tsetField(L, \"chance\", lootBlock.chance);\n\t\tsetField(L, \"subType\", lootBlock.subType);\n\t\tsetField(L, \"maxCount\", lootBlock.countmax);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30801ddbc7e2490632cfe1624784f4af72788a0d4606d3caa534965b8dd64bc6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 29, + "startColumn": 26, + "charOffset": 1026, + "charLength": 9, + "snippet": { + "text": "lootBlock" + } + }, + "contextRegion": { + "startLine": 27, + "startColumn": 26, + "charOffset": 919, + "charLength": 9, + "snippet": { + "text": "\t\tsetField(L, \"itemId\", lootBlock.id);\n\t\tsetField(L, \"chance\", lootBlock.chance);\n\t\tsetField(L, \"subType\", lootBlock.subType);\n\t\tsetField(L, \"maxCount\", lootBlock.countmax);\n\t\tsetField(L, \"minCount\", lootBlock.countmin);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b67ea3b15c776174a5af226db80eb362c659197f01d2214d537791b91b6dc55c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 30, + "startColumn": 27, + "charOffset": 1072, + "charLength": 9, + "snippet": { + "text": "lootBlock" + } + }, + "contextRegion": { + "startLine": 28, + "startColumn": 27, + "charOffset": 958, + "charLength": 9, + "snippet": { + "text": "\t\tsetField(L, \"chance\", lootBlock.chance);\n\t\tsetField(L, \"subType\", lootBlock.subType);\n\t\tsetField(L, \"maxCount\", lootBlock.countmax);\n\t\tsetField(L, \"minCount\", lootBlock.countmin);\n\t\tsetField(L, \"actionId\", lootBlock.actionId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "695b301144f342d6cf0c0ddd2e6cda13b8c06e7a8e4ffd74f9d8631d7733853a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 31, + "startColumn": 27, + "charOffset": 1119, + "charLength": 9, + "snippet": { + "text": "lootBlock" + } + }, + "contextRegion": { + "startLine": 29, + "startColumn": 27, + "charOffset": 1001, + "charLength": 9, + "snippet": { + "text": "\t\tsetField(L, \"subType\", lootBlock.subType);\n\t\tsetField(L, \"maxCount\", lootBlock.countmax);\n\t\tsetField(L, \"minCount\", lootBlock.countmin);\n\t\tsetField(L, \"actionId\", lootBlock.actionId);\n\t\tsetField(L, \"text\", lootBlock.text);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "829651dc11fc1fb1b4bd9c41fa5188ba707cc532cb6caa4ac8a8c8474b210095" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 32, + "startColumn": 27, + "charOffset": 1166, + "charLength": 9, + "snippet": { + "text": "lootBlock" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 27, + "charOffset": 1046, + "charLength": 9, + "snippet": { + "text": "\t\tsetField(L, \"maxCount\", lootBlock.countmax);\n\t\tsetField(L, \"minCount\", lootBlock.countmin);\n\t\tsetField(L, \"actionId\", lootBlock.actionId);\n\t\tsetField(L, \"text\", lootBlock.text);\n\t\tpushBoolean(L, lootBlock.unique);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e4cd7770d3a0f590b0f9d6ebe50227165b6da2d461d96bddd7a8a27794d11de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 225, + "startColumn": 6, + "charOffset": 6527, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 223, + "startColumn": 6, + "charOffset": 6380, + "charLength": 1, + "snippet": { + "text": "\t// get: monsterType:isForgeCreature() set: monsterType:isForgeCreature(bool)\n\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (!monsterType) {\n\t\tpushBoolean(L, false);\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_TYPE_NOT_FOUND));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02790f6b375f7f48445dbae11f7d71b79d2f8574c9dc80e92f56734e5f01e517" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 227, + "startColumn": 3, + "charOffset": 6570, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 225, + "startColumn": 3, + "charOffset": 6522, + "charLength": 15, + "snippet": { + "text": "\tif (!monsterType) {\n\t\tpushBoolean(L, false);\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_TYPE_NOT_FOUND));\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85e69e55f790df5a5c055c09411d3ec1002d8d0ec8b5416e3bb96117c24c9df0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 291, + "startColumn": 21, + "charOffset": 8397, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 289, + "startColumn": 21, + "charOffset": 8312, + "charLength": 11, + "snippet": { + "text": "\t\t\tmonsterType->info.critChance = getNumber(L, 2);\n\t\t}\n\t\tlua_pushnumber(L, monsterType->info.critChance);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a65a58623f0f9c007febed485ad3348f74e40c72ed0a0a5f8200fa83fe13c12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 334, + "startColumn": 21, + "charOffset": 9516, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 332, + "startColumn": 21, + "charOffset": 9412, + "charLength": 11, + "snippet": { + "text": "\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (monsterType) {\n\t\tlua_pushnumber(L, monsterType->info.lookcorpse);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80286a4a7a08d22757c8beaf2af83c8495faac0a26ba17300a1562b193ff3119" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 346, + "startColumn": 22, + "charOffset": 9850, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 344, + "startColumn": 22, + "charOffset": 9781, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.health);\n\t\t} else {\n\t\t\tmonsterType->info.health = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b4c314c6f3a49c1b3eb56d20d796431f4954e95f089ef49453111f14e5c0ef1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 362, + "startColumn": 22, + "charOffset": 10285, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 360, + "startColumn": 22, + "charOffset": 10216, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.healthMax);\n\t\t} else {\n\t\t\tmonsterType->info.healthMax = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7eee844956717ca38a691006c93d13276b9f72e1b6c5e1eef635e7405d2fc899" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 378, + "startColumn": 22, + "charOffset": 10726, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 376, + "startColumn": 22, + "charOffset": 10657, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.runAwayHealth);\n\t\t} else {\n\t\t\tmonsterType->info.runAwayHealth = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2e667a5c27e49f9ccb429e4e3a122e5f0081c0a050c9a9b74b93891adf4cc1d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 394, + "startColumn": 22, + "charOffset": 11175, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 392, + "startColumn": 22, + "charOffset": 11106, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.experience);\n\t\t} else {\n\t\t\tmonsterType->info.experience = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "130a223817a8297241ce50f463c285e9f4ee71b63e3c5c3c26581ae9467763fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 394, + "startColumn": 22, + "charOffset": 11175, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 392, + "startColumn": 22, + "charOffset": 11106, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.experience);\n\t\t} else {\n\t\t\tmonsterType->info.experience = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ae8c86770d17e19c63dc4a4e5ed0be8efe88ba86c704b4c4d6a134967972169" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 410, + "startColumn": 22, + "charOffset": 11614, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 408, + "startColumn": 22, + "charOffset": 11545, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.faction);\n\t\t} else {\n\t\t\tmonsterType->info.faction = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd3f6837fc788f2b67769b7209c946125fa1be19d3a184615d55e6ea427e73a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 426, + "startColumn": 23, + "charOffset": 12072, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 424, + "startColumn": 23, + "charOffset": 12002, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_createtable(L, monsterType->info.enemyFactions.size(), 0);\n\t\t\tint index = 0;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0b009bf37d46d0c4c89e94e33a7f2c6ba0accb1b725adfb1834bd93dacd2f6e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 426, + "startColumn": 23, + "charOffset": 12072, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 424, + "startColumn": 23, + "charOffset": 12002, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_createtable(L, monsterType->info.enemyFactions.size(), 0);\n\t\t\tint index = 0;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "260c0d00d390f741e49b384edf7c863acedb87653eb2adb43cccdafe0f926ac1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 429, + "startColumn": 4, + "charOffset": 12138, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 427, + "startColumn": 4, + "charOffset": 12116, + "charLength": 3, + "snippet": { + "text": "\t\t\tint index = 0;\n\n\t\t\tfor (const auto &faction : monsterType->info.enemyFactions) {\n\t\t\t\tlua_pushnumber(L, faction);\n\t\t\t\tlua_rawseti(L, -2, ++index);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5473d436338700bc93458bfae4d4a6e68d5d977eadb7d38e588147e4ed5a56a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 430, + "startColumn": 23, + "charOffset": 12222, + "charLength": 7, + "snippet": { + "text": "faction" + } + }, + "contextRegion": { + "startLine": 428, + "startColumn": 23, + "charOffset": 12134, + "charLength": 7, + "snippet": { + "text": "\n\t\t\tfor (const auto &faction : monsterType->info.enemyFactions) {\n\t\t\t\tlua_pushnumber(L, faction);\n\t\t\t\tlua_rawseti(L, -2, ++index);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3fae7c259eb0e38f3a02dba3ac3632aabdb3bb4f8cfad801fdea7269102693d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 449, + "startColumn": 23, + "charOffset": 12751, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 447, + "startColumn": 23, + "charOffset": 12681, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushboolean(L, monsterType->info.targetPreferPlayer);\n\t\t} else {\n\t\t\tmonsterType->info.targetPreferPlayer = getBoolean(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd5adea989d3628aea7f2e835647cd883835764420608334fc83db9ab0c9525e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 465, + "startColumn": 22, + "charOffset": 13227, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 463, + "startColumn": 22, + "charOffset": 13158, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.faction);\n\t\t} else {\n\t\t\tmonsterType->info.targetPreferMaster = getBoolean(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a277c8cfcdfa4526dee5c99cdb6d6d28278d058840f49ad5045a83a931ed627c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 481, + "startColumn": 22, + "charOffset": 13654, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 479, + "startColumn": 22, + "charOffset": 13585, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.raceid);\n\t\t} else {\n\t\t\tmonsterType->info.raceid = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28beb9cf2ba47bad3673634c4219361ba856a2ccff313dd6cd86a9676e158581" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 498, + "startColumn": 22, + "charOffset": 14179, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 496, + "startColumn": 22, + "charOffset": 14110, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.bestiaryToUnlock);\n\t\t} else {\n\t\t\tmonsterType->info.bestiaryToUnlock = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84babbf27eb01445f42902fcb436ba395382a5e98a1732ebd4d19c0df4efce86" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 514, + "startColumn": 22, + "charOffset": 14664, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 512, + "startColumn": 22, + "charOffset": 14595, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.bestiaryFirstUnlock);\n\t\t} else {\n\t\t\tmonsterType->info.bestiaryFirstUnlock = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61c20edc2b979a61c98e112d673b3ebc0873ec473a65adaa9019c169237cf686" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 530, + "startColumn": 22, + "charOffset": 15158, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 528, + "startColumn": 22, + "charOffset": 15089, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.bestiarySecondUnlock);\n\t\t} else {\n\t\t\tmonsterType->info.bestiarySecondUnlock = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c05494227255aca1c3a5f236b1f2cc94afda3d258c30a4c2e3c83838f2cf9833" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 546, + "startColumn": 22, + "charOffset": 15654, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 544, + "startColumn": 22, + "charOffset": 15585, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.bestiaryCharmsPoints);\n\t\t} else {\n\t\t\tmonsterType->info.bestiaryCharmsPoints = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b77cfcb58a7f59fc3d8005c98f49d1c7cedabed43bb344ee35bb60de133ee783" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 562, + "startColumn": 22, + "charOffset": 16129, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 560, + "startColumn": 22, + "charOffset": 16060, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.bestiaryStars);\n\t\t} else {\n\t\t\tmonsterType->info.bestiaryStars = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d01fb760041e4ad7582f25d30f8b563f9a06f1c7f651d76e36eb130743208a17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 578, + "startColumn": 22, + "charOffset": 16604, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 576, + "startColumn": 22, + "charOffset": 16535, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.bestiaryOccurrence);\n\t\t} else {\n\t\t\tmonsterType->info.bestiaryOccurrence = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9ea9e3126727ae504a8ba05c8cf435886f2cac41c6b98b0fbe5386a7e58da47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 626, + "startColumn": 22, + "charOffset": 17988, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 624, + "startColumn": 22, + "charOffset": 17919, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.bestiaryRace);\n\t\t} else {\n\t\t\tBestiaryType_t race = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ac847a5b816be058a1d421fe4e680ea2632af8d7318c312845af631b054c794" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 641, + "startColumn": 6, + "charOffset": 18432, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 639, + "startColumn": 6, + "charOffset": 18279, + "charLength": 1, + "snippet": { + "text": "\t// get: monsterType:combatImmunities() set: monsterType:combatImmunities(immunity)\n\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (!monsterType) {\n\t\tpushBoolean(L, false);\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_TYPE_NOT_FOUND));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b576a20fcfb78ab48177428bd0bbf318192e9953035e57bc705bee56f7814a50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 643, + "startColumn": 3, + "charOffset": 18475, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 641, + "startColumn": 3, + "charOffset": 18427, + "charLength": 15, + "snippet": { + "text": "\tif (!monsterType) {\n\t\tpushBoolean(L, false);\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_TYPE_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36d9eeab5fb287ddf59ec21fc911d0f0fd419888825f26d1756244d9190c9786" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 649, + "startColumn": 3, + "charOffset": 18624, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 647, + "startColumn": 3, + "charOffset": 18556, + "charLength": 3, + "snippet": { + "text": "\tif (lua_gettop(L) == 1) {\n\t\tlua_createtable(L, COMBAT_COUNT, 0);\n\t\tfor (int i = 0; i < COMBAT_COUNT; i++) {\n\t\t\tlua_pushnumber(L, monsterType->info.m_damageImmunities.test(i));\n\t\t\tlua_rawseti(L, -2, i);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37a1e4faf25de1de1358f3757040026b1952b261de8166aab2078f1357d6eeb9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 650, + "startColumn": 22, + "charOffset": 18686, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 648, + "startColumn": 22, + "charOffset": 18583, + "charLength": 11, + "snippet": { + "text": "\t\tlua_createtable(L, COMBAT_COUNT, 0);\n\t\tfor (int i = 0; i < COMBAT_COUNT; i++) {\n\t\t\tlua_pushnumber(L, monsterType->info.m_damageImmunities.test(i));\n\t\t\tlua_rawseti(L, -2, i);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69a622b204c37d95b3f6bbfbce85ffc3168dbbc1d83df65fa32cf9eefb835f3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 650, + "startColumn": 22, + "charOffset": 18686, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 648, + "startColumn": 22, + "charOffset": 18583, + "charLength": 11, + "snippet": { + "text": "\t\tlua_createtable(L, COMBAT_COUNT, 0);\n\t\tfor (int i = 0; i < COMBAT_COUNT; i++) {\n\t\t\tlua_pushnumber(L, monsterType->info.m_damageImmunities.test(i));\n\t\t\tlua_rawseti(L, -2, i);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8cc96f17faef80a0cfa45513edf31cae68d05408a81095699d5adeb78eb8489" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 689, + "startColumn": 39, + "charOffset": 19983, + "charLength": 3, + "snippet": { + "text": "set" + } + }, + "contextRegion": { + "startLine": 687, + "startColumn": 39, + "charOffset": 19941, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tmonsterType->info.m_damageImmunities.set(combatTypeToIndex(combatType), true);\n\tpushBoolean(L, true);\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "135180a96143b11e3c8bfae7dcdb3c9e05c4e724a50779997c22ca845d1a879a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 697, + "startColumn": 6, + "charOffset": 20297, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 695, + "startColumn": 6, + "charOffset": 20138, + "charLength": 1, + "snippet": { + "text": "\t// get: monsterType:conditionImmunities() set: monsterType:conditionImmunities(immunity)\n\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (!monsterType) {\n\t\tpushBoolean(L, false);\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_TYPE_NOT_FOUND));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f002895d396a9fbabf3a6fc935cbec1703119ca66869015668e0a726ff584208" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 699, + "startColumn": 3, + "charOffset": 20340, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 697, + "startColumn": 3, + "charOffset": 20292, + "charLength": 15, + "snippet": { + "text": "\tif (!monsterType) {\n\t\tpushBoolean(L, false);\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_TYPE_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c6abee60c37fd793caec6143833001864fea033b6cefab72138c6d10dfcb9be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 705, + "startColumn": 3, + "charOffset": 20492, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 703, + "startColumn": 3, + "charOffset": 20421, + "charLength": 3, + "snippet": { + "text": "\tif (lua_gettop(L) == 1) {\n\t\tlua_createtable(L, CONDITION_COUNT, 0);\n\t\tfor (int i = 0; i < CONDITION_COUNT; i++) {\n\t\t\tlua_pushnumber(L, monsterType->info.m_conditionImmunities.test(i));\n\t\t\tlua_rawseti(L, -2, i);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04d8b62baa225a5a3e4d742d53b7f6ac0c830d7867e9f581cac5a31fa8d9eb20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 706, + "startColumn": 22, + "charOffset": 20557, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 704, + "startColumn": 22, + "charOffset": 20448, + "charLength": 11, + "snippet": { + "text": "\t\tlua_createtable(L, CONDITION_COUNT, 0);\n\t\tfor (int i = 0; i < CONDITION_COUNT; i++) {\n\t\t\tlua_pushnumber(L, monsterType->info.m_conditionImmunities.test(i));\n\t\t\tlua_rawseti(L, -2, i);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7216140b9e8fc0b04272538325dff029ec6d11ac9aecb28acf19ba2f06f8ca70" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 706, + "startColumn": 22, + "charOffset": 20557, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 704, + "startColumn": 22, + "charOffset": 20448, + "charLength": 11, + "snippet": { + "text": "\t\tlua_createtable(L, CONDITION_COUNT, 0);\n\t\tfor (int i = 0; i < CONDITION_COUNT; i++) {\n\t\t\tlua_pushnumber(L, monsterType->info.m_conditionImmunities.test(i));\n\t\t\tlua_rawseti(L, -2, i);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ddba3171a6fea019eb9fdbb31a6df4e16d2293dbe5dc8f7e31f3dd5cbf8af5e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 714, + "startColumn": 30, + "charOffset": 20772, + "charLength": 1, + "snippet": { + "text": "{" + } + }, + "contextRegion": { + "startLine": 712, + "startColumn": 30, + "charOffset": 20653, + "charLength": 1, + "snippet": { + "text": "\tstd::string immunity = getString(L, 2);\n\tConditionType_t conditionType = CONDITION_NONE;\n\tif (immunity == \"physical\") {\n\t\tconditionType = CONDITION_BLEEDING;\n\t} else if (immunity == \"energy\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a4c458fb5879bb4d10d9f7f9ecb7896c68107dedc20986167ba601182ba4ec1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 755, + "startColumn": 6, + "charOffset": 22246, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 753, + "startColumn": 6, + "charOffset": 22145, + "charLength": 1, + "snippet": { + "text": "\t// monsterType:getAttackList()\n\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (!monsterType) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "689cfe965673a686c4355075b897c4184896cc93a95687a26e2dd8fffbfff1ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 760, + "startColumn": 21, + "charOffset": 22316, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 758, + "startColumn": 21, + "charOffset": 22292, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\tlua_createtable(L, monsterType->info.attackSpells.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46f57a86c3fbe165aaa27a40959ae90f615d2d99aa93a2f95aec831639b73097" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 760, + "startColumn": 21, + "charOffset": 22316, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 758, + "startColumn": 21, + "charOffset": 22292, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\tlua_createtable(L, monsterType->info.attackSpells.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77ce9c8d02e0dc47d94509cfa52d2c2707464ce8ec50ee74853170e7c94caaf2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 763, + "startColumn": 2, + "charOffset": 22377, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 761, + "startColumn": 2, + "charOffset": 22359, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (const auto &spellBlock : monsterType->info.attackSpells) {\n\t\tlua_createtable(L, 0, 8);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c3b02f99786156c08f40e4af25871a6ccec5d2814a727802f942e82d3b1dbae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 764, + "startColumn": 25, + "charOffset": 22465, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 762, + "startColumn": 25, + "charOffset": 22360, + "charLength": 1, + "snippet": { + "text": "\tint index = 0;\n\tfor (const auto &spellBlock : monsterType->info.attackSpells) {\n\t\tlua_createtable(L, 0, 8);\n\n\t\tsetField(L, \"chance\", spellBlock.chance);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ac014ed7c6e7d85ac467e8da37a23a00eb66422d28626494f79b30705dc0054" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 766, + "startColumn": 25, + "charOffset": 22494, + "charLength": 10, + "snippet": { + "text": "spellBlock" + } + }, + "contextRegion": { + "startLine": 764, + "startColumn": 25, + "charOffset": 22441, + "charLength": 10, + "snippet": { + "text": "\t\tlua_createtable(L, 0, 8);\n\n\t\tsetField(L, \"chance\", spellBlock.chance);\n\t\tsetField(L, \"isCombatSpell\", spellBlock.combatSpell ? 1 : 0);\n\t\tsetField(L, \"isMelee\", spellBlock.isMelee ? 1 : 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86a1cc7f8f0854636a33e689311f6f18c8b5b7c6d3a8b7de754890fb4d99ce48" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 767, + "startColumn": 32, + "charOffset": 22545, + "charLength": 10, + "snippet": { + "text": "spellBlock" + } + }, + "contextRegion": { + "startLine": 765, + "startColumn": 32, + "charOffset": 22469, + "charLength": 10, + "snippet": { + "text": "\n\t\tsetField(L, \"chance\", spellBlock.chance);\n\t\tsetField(L, \"isCombatSpell\", spellBlock.combatSpell ? 1 : 0);\n\t\tsetField(L, \"isMelee\", spellBlock.isMelee ? 1 : 0);\n\t\tsetField(L, \"minCombatValue\", spellBlock.minCombatValue);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e4ca9f030e0625259e69690676d5d1861b7cfebd5e7e6e67a63cc8a49317a47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 768, + "startColumn": 26, + "charOffset": 22603, + "charLength": 10, + "snippet": { + "text": "spellBlock" + } + }, + "contextRegion": { + "startLine": 766, + "startColumn": 26, + "charOffset": 22470, + "charLength": 10, + "snippet": { + "text": "\t\tsetField(L, \"chance\", spellBlock.chance);\n\t\tsetField(L, \"isCombatSpell\", spellBlock.combatSpell ? 1 : 0);\n\t\tsetField(L, \"isMelee\", spellBlock.isMelee ? 1 : 0);\n\t\tsetField(L, \"minCombatValue\", spellBlock.minCombatValue);\n\t\tsetField(L, \"maxCombatValue\", spellBlock.maxCombatValue);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1b50f0b63bd250d2015618c522fd48780a54dccad1f7c8f900fe2bcee56b71c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 769, + "startColumn": 33, + "charOffset": 22664, + "charLength": 10, + "snippet": { + "text": "spellBlock" + } + }, + "contextRegion": { + "startLine": 767, + "startColumn": 33, + "charOffset": 22514, + "charLength": 10, + "snippet": { + "text": "\t\tsetField(L, \"isCombatSpell\", spellBlock.combatSpell ? 1 : 0);\n\t\tsetField(L, \"isMelee\", spellBlock.isMelee ? 1 : 0);\n\t\tsetField(L, \"minCombatValue\", spellBlock.minCombatValue);\n\t\tsetField(L, \"maxCombatValue\", spellBlock.maxCombatValue);\n\t\tsetField(L, \"range\", spellBlock.range);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "030d5423c2a2e6fca3a31841a7ce6164936b00076f52273e723adb77b576dc56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 770, + "startColumn": 33, + "charOffset": 22724, + "charLength": 10, + "snippet": { + "text": "spellBlock" + } + }, + "contextRegion": { + "startLine": 768, + "startColumn": 33, + "charOffset": 22578, + "charLength": 10, + "snippet": { + "text": "\t\tsetField(L, \"isMelee\", spellBlock.isMelee ? 1 : 0);\n\t\tsetField(L, \"minCombatValue\", spellBlock.minCombatValue);\n\t\tsetField(L, \"maxCombatValue\", spellBlock.maxCombatValue);\n\t\tsetField(L, \"range\", spellBlock.range);\n\t\tsetField(L, \"speed\", spellBlock.speed);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1957ce0365eaad2c209611be7d185c5cbfadba96da3c6211ea25b4fc5ab44580" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 771, + "startColumn": 24, + "charOffset": 22775, + "charLength": 10, + "snippet": { + "text": "spellBlock" + } + }, + "contextRegion": { + "startLine": 769, + "startColumn": 24, + "charOffset": 22632, + "charLength": 10, + "snippet": { + "text": "\t\tsetField(L, \"minCombatValue\", spellBlock.minCombatValue);\n\t\tsetField(L, \"maxCombatValue\", spellBlock.maxCombatValue);\n\t\tsetField(L, \"range\", spellBlock.range);\n\t\tsetField(L, \"speed\", spellBlock.speed);\n\t\tconst auto combatSpell = std::static_pointer_cast(spellBlock.spell);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cccfba747e09cdc810557365deef10de2e27e84e04c626565cdf3d15bbb43be4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 772, + "startColumn": 24, + "charOffset": 22817, + "charLength": 10, + "snippet": { + "text": "spellBlock" + } + }, + "contextRegion": { + "startLine": 770, + "startColumn": 24, + "charOffset": 22692, + "charLength": 10, + "snippet": { + "text": "\t\tsetField(L, \"maxCombatValue\", spellBlock.maxCombatValue);\n\t\tsetField(L, \"range\", spellBlock.range);\n\t\tsetField(L, \"speed\", spellBlock.speed);\n\t\tconst auto combatSpell = std::static_pointer_cast(spellBlock.spell);\n\t\tpushUserdata(L, combatSpell);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43bb78eb30ba12d564db681eece111954fc3549ed8a47a8baeba1f78575b5dcc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 806, + "startColumn": 6, + "charOffset": 23820, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 804, + "startColumn": 6, + "charOffset": 23718, + "charLength": 1, + "snippet": { + "text": "\t// monsterType:getDefenseList()\n\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (!monsterType) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf0e2c7bb180d745660d526f795dc14cabd70f043b3aa07398f1593a23f0484b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 811, + "startColumn": 21, + "charOffset": 23890, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 809, + "startColumn": 21, + "charOffset": 23866, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\tlua_createtable(L, monsterType->info.defenseSpells.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a4b4243ed2f69249ee2194b7bec02529d61d657c236dbb9382d4203fc428d3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 811, + "startColumn": 21, + "charOffset": 23890, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 809, + "startColumn": 21, + "charOffset": 23866, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\tlua_createtable(L, monsterType->info.defenseSpells.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7257508a95ea125cc73dcc801ae3ff13ab4d4e8cf58d10f6201b776ff5726e68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 814, + "startColumn": 2, + "charOffset": 23952, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 812, + "startColumn": 2, + "charOffset": 23934, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (const auto &spellBlock : monsterType->info.defenseSpells) {\n\t\tlua_createtable(L, 0, 8);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3938cb5a7aafca18ad2eb83462af06472a2d88a8593aa494d2cba7420027524d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 815, + "startColumn": 25, + "charOffset": 24041, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 813, + "startColumn": 25, + "charOffset": 23935, + "charLength": 1, + "snippet": { + "text": "\tint index = 0;\n\tfor (const auto &spellBlock : monsterType->info.defenseSpells) {\n\t\tlua_createtable(L, 0, 8);\n\n\t\tsetField(L, \"chance\", spellBlock.chance);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34867ed08d8ef3a56dd10c871200c505f50b6bf7949d89b010862dbcd3458bb2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 817, + "startColumn": 25, + "charOffset": 24070, + "charLength": 10, + "snippet": { + "text": "spellBlock" + } + }, + "contextRegion": { + "startLine": 815, + "startColumn": 25, + "charOffset": 24017, + "charLength": 10, + "snippet": { + "text": "\t\tlua_createtable(L, 0, 8);\n\n\t\tsetField(L, \"chance\", spellBlock.chance);\n\t\tsetField(L, \"isCombatSpell\", spellBlock.combatSpell ? 1 : 0);\n\t\tsetField(L, \"isMelee\", spellBlock.isMelee ? 1 : 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "995f329a89d3a5cb3f1d9ac734f52bbe268d56d9f72e240adb217e5894381de2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 818, + "startColumn": 32, + "charOffset": 24121, + "charLength": 10, + "snippet": { + "text": "spellBlock" + } + }, + "contextRegion": { + "startLine": 816, + "startColumn": 32, + "charOffset": 24045, + "charLength": 10, + "snippet": { + "text": "\n\t\tsetField(L, \"chance\", spellBlock.chance);\n\t\tsetField(L, \"isCombatSpell\", spellBlock.combatSpell ? 1 : 0);\n\t\tsetField(L, \"isMelee\", spellBlock.isMelee ? 1 : 0);\n\t\tsetField(L, \"minCombatValue\", spellBlock.minCombatValue);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db07ab323cdd7f3cf0f4e1ed53c75b508d3de0f43c807951d6979a4451faf120" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 819, + "startColumn": 26, + "charOffset": 24179, + "charLength": 10, + "snippet": { + "text": "spellBlock" + } + }, + "contextRegion": { + "startLine": 817, + "startColumn": 26, + "charOffset": 24046, + "charLength": 10, + "snippet": { + "text": "\t\tsetField(L, \"chance\", spellBlock.chance);\n\t\tsetField(L, \"isCombatSpell\", spellBlock.combatSpell ? 1 : 0);\n\t\tsetField(L, \"isMelee\", spellBlock.isMelee ? 1 : 0);\n\t\tsetField(L, \"minCombatValue\", spellBlock.minCombatValue);\n\t\tsetField(L, \"maxCombatValue\", spellBlock.maxCombatValue);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11df7fe826a1725e0ca116d3dc526216cbce653b873d8f0ce55a1601b4293985" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 820, + "startColumn": 33, + "charOffset": 24240, + "charLength": 10, + "snippet": { + "text": "spellBlock" + } + }, + "contextRegion": { + "startLine": 818, + "startColumn": 33, + "charOffset": 24090, + "charLength": 10, + "snippet": { + "text": "\t\tsetField(L, \"isCombatSpell\", spellBlock.combatSpell ? 1 : 0);\n\t\tsetField(L, \"isMelee\", spellBlock.isMelee ? 1 : 0);\n\t\tsetField(L, \"minCombatValue\", spellBlock.minCombatValue);\n\t\tsetField(L, \"maxCombatValue\", spellBlock.maxCombatValue);\n\t\tsetField(L, \"range\", spellBlock.range);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28fe925b26d83f9b96f5c58fdcbaf9adaf077753e70df0f867185983e2fba12a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 821, + "startColumn": 33, + "charOffset": 24300, + "charLength": 10, + "snippet": { + "text": "spellBlock" + } + }, + "contextRegion": { + "startLine": 819, + "startColumn": 33, + "charOffset": 24154, + "charLength": 10, + "snippet": { + "text": "\t\tsetField(L, \"isMelee\", spellBlock.isMelee ? 1 : 0);\n\t\tsetField(L, \"minCombatValue\", spellBlock.minCombatValue);\n\t\tsetField(L, \"maxCombatValue\", spellBlock.maxCombatValue);\n\t\tsetField(L, \"range\", spellBlock.range);\n\t\tsetField(L, \"speed\", spellBlock.speed);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1cc8aef68ff14e86fd90e6201548076d988fd58afed155b8b7055c613d9838a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 822, + "startColumn": 24, + "charOffset": 24351, + "charLength": 10, + "snippet": { + "text": "spellBlock" + } + }, + "contextRegion": { + "startLine": 820, + "startColumn": 24, + "charOffset": 24208, + "charLength": 10, + "snippet": { + "text": "\t\tsetField(L, \"minCombatValue\", spellBlock.minCombatValue);\n\t\tsetField(L, \"maxCombatValue\", spellBlock.maxCombatValue);\n\t\tsetField(L, \"range\", spellBlock.range);\n\t\tsetField(L, \"speed\", spellBlock.speed);\n\t\tconst auto combatSpell = std::static_pointer_cast(spellBlock.spell);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "216773d7c094f0ba9b0969f61c528d484ef88bc158518b2eb9c654e864e69178" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 823, + "startColumn": 24, + "charOffset": 24393, + "charLength": 10, + "snippet": { + "text": "spellBlock" + } + }, + "contextRegion": { + "startLine": 821, + "startColumn": 24, + "charOffset": 24268, + "charLength": 10, + "snippet": { + "text": "\t\tsetField(L, \"maxCombatValue\", spellBlock.maxCombatValue);\n\t\tsetField(L, \"range\", spellBlock.range);\n\t\tsetField(L, \"speed\", spellBlock.speed);\n\t\tconst auto combatSpell = std::static_pointer_cast(spellBlock.spell);\n\t\tpushUserdata(L, combatSpell);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90c32307479a23704a4ce22a4e22ab2f1935086422ff66edd872cd8913620739" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 836, + "startColumn": 6, + "charOffset": 24789, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 834, + "startColumn": 6, + "charOffset": 24690, + "charLength": 1, + "snippet": { + "text": "\t// monsterType:getTypeName()\n\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (!monsterType) {\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1375d58e4a300d1be23cde709f651b64f90471c7d07726140e58babb474ad3ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 907, + "startColumn": 6, + "charOffset": 26809, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 905, + "startColumn": 6, + "charOffset": 26707, + "charLength": 1, + "snippet": { + "text": "\t// monsterType:getElementList()\n\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (!monsterType) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37509daaef51b73bd4725d0cdc1ee12bbf99dfc6f6b6ba29f48108c8f05bdd49" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 912, + "startColumn": 21, + "charOffset": 26879, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 910, + "startColumn": 21, + "charOffset": 26855, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\tlua_createtable(L, monsterType->info.elementMap.size(), 0);\n\tfor (const auto &elementEntry : monsterType->info.elementMap) {\n\t\tlua_pushnumber(L, elementEntry.second);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b04e8c06f14f40deb97f49bd09ed532b6ffe72a6512b8255c8e8a91cb5dfa02f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 912, + "startColumn": 21, + "charOffset": 26879, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 910, + "startColumn": 21, + "charOffset": 26855, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\tlua_createtable(L, monsterType->info.elementMap.size(), 0);\n\tfor (const auto &elementEntry : monsterType->info.elementMap) {\n\t\tlua_pushnumber(L, elementEntry.second);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bcfaeab2839dcf4c03162dd46d77b259e9ff9fe3cf0a6625bc839d2e9b9781aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 913, + "startColumn": 2, + "charOffset": 26921, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 911, + "startColumn": 2, + "charOffset": 26858, + "charLength": 3, + "snippet": { + "text": "\n\tlua_createtable(L, monsterType->info.elementMap.size(), 0);\n\tfor (const auto &elementEntry : monsterType->info.elementMap) {\n\t\tlua_pushnumber(L, elementEntry.second);\n\t\tlua_rawseti(L, -2, elementEntry.first);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40dd6feae73affb939f9e69e216cd9217b33f3b03fb7a4d74a475cbdf9782984" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 914, + "startColumn": 21, + "charOffset": 27005, + "charLength": 12, + "snippet": { + "text": "elementEntry" + } + }, + "contextRegion": { + "startLine": 912, + "startColumn": 21, + "charOffset": 26859, + "charLength": 12, + "snippet": { + "text": "\tlua_createtable(L, monsterType->info.elementMap.size(), 0);\n\tfor (const auto &elementEntry : monsterType->info.elementMap) {\n\t\tlua_pushnumber(L, elementEntry.second);\n\t\tlua_rawseti(L, -2, elementEntry.first);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a92ac3cf279a903071bce7ce7e980399fde8d5507f660f7e5aacf7d6c88a1190" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 928, + "startColumn": 34, + "charOffset": 27505, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 926, + "startColumn": 34, + "charOffset": 27348, + "charLength": 1, + "snippet": { + "text": "\t\tmonsterType->info.yellSpeedTicks = getNumber(L, 3);\n\t\tmonsterType->info.yellChance = getNumber(L, 4);\n\t\tvoice.yellText = getBoolean(L, 5);\n\t\tmonsterType->info.voiceVector.push_back(voice);\n\t\tpushBoolean(L, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92a9f641981f8fc5258fd7064cd4854d24733117479e04bd2cd6ac201760da0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 940, + "startColumn": 6, + "charOffset": 27791, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 938, + "startColumn": 6, + "charOffset": 27694, + "charLength": 1, + "snippet": { + "text": "\t// monsterType:getVoices()\n\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (!monsterType) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8b75cb159444096500ad66e789cfe31d4e24952aa8e65ba40619b636d568a1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 946, + "startColumn": 21, + "charOffset": 27877, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 944, + "startColumn": 21, + "charOffset": 27840, + "charLength": 11, + "snippet": { + "text": "\n\tint index = 0;\n\tlua_createtable(L, monsterType->info.voiceVector.size(), 0);\n\tfor (const auto &voiceBlock : monsterType->info.voiceVector) {\n\t\tlua_createtable(L, 0, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97ef9b0f9e7a717a590eef1e438806adb1a2aea2d1ec2ef722ee8fe87a14f2f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 946, + "startColumn": 21, + "charOffset": 27877, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 944, + "startColumn": 21, + "charOffset": 27840, + "charLength": 11, + "snippet": { + "text": "\n\tint index = 0;\n\tlua_createtable(L, monsterType->info.voiceVector.size(), 0);\n\tfor (const auto &voiceBlock : monsterType->info.voiceVector) {\n\t\tlua_createtable(L, 0, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "643fd6b2335018721b93a0d31898ff0b742fd1f99401cecab9656bca16dd945d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 947, + "startColumn": 2, + "charOffset": 27920, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 945, + "startColumn": 2, + "charOffset": 27841, + "charLength": 3, + "snippet": { + "text": "\tint index = 0;\n\tlua_createtable(L, monsterType->info.voiceVector.size(), 0);\n\tfor (const auto &voiceBlock : monsterType->info.voiceVector) {\n\t\tlua_createtable(L, 0, 2);\n\t\tsetField(L, \"text\", voiceBlock.text);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f3db67b466c60713211f881304f9993eb00f40f5eb44fd9ae72aa7b1483d3b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 950, + "startColumn": 27, + "charOffset": 28077, + "charLength": 10, + "snippet": { + "text": "voiceBlock" + } + }, + "contextRegion": { + "startLine": 948, + "startColumn": 27, + "charOffset": 27983, + "charLength": 10, + "snippet": { + "text": "\t\tlua_createtable(L, 0, 2);\n\t\tsetField(L, \"text\", voiceBlock.text);\n\t\tsetField(L, \"yellText\", voiceBlock.yellText);\n\t\tlua_rawseti(L, -2, ++index);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "381d3b1723943f8ec91b34a7d0fb5654a4a9cf46c94a52f64a67efe3f4ff45d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 950, + "startColumn": 27, + "charOffset": 28077, + "charLength": 10, + "snippet": { + "text": "voiceBlock" + } + }, + "contextRegion": { + "startLine": 948, + "startColumn": 27, + "charOffset": 27983, + "charLength": 10, + "snippet": { + "text": "\t\tlua_createtable(L, 0, 2);\n\t\tsetField(L, \"text\", voiceBlock.text);\n\t\tsetField(L, \"yellText\", voiceBlock.yellText);\n\t\tlua_rawseti(L, -2, ++index);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fde005925c3a7f61844b9550dcb29b1e58e804467d906cf485bcec63b05f103b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 959, + "startColumn": 6, + "charOffset": 28306, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 957, + "startColumn": 6, + "charOffset": 28211, + "charLength": 1, + "snippet": { + "text": "\t// monsterType:getLoot()\n\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (!monsterType) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efaecd7410546729e469bdf7c81cf2836288f5664e932a759d8f51dc360891f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 988, + "startColumn": 6, + "charOffset": 29016, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 986, + "startColumn": 6, + "charOffset": 28911, + "charLength": 1, + "snippet": { + "text": "\t// monsterType:getCreatureEvents()\n\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (!monsterType) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22e53c4a9f0bbd26fbb7c504174269df49902321d2ff92203b5d93bd26837639" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 994, + "startColumn": 21, + "charOffset": 29102, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 992, + "startColumn": 21, + "charOffset": 29065, + "charLength": 11, + "snippet": { + "text": "\n\tint index = 0;\n\tlua_createtable(L, monsterType->info.scripts.size(), 0);\n\tfor (const std::string &creatureEvent : monsterType->info.scripts) {\n\t\tpushString(L, creatureEvent);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5409fd70dbdba48207d49f05d5d6f36bd35a059070124a0eec484c2003a2eef3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 994, + "startColumn": 21, + "charOffset": 29102, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 992, + "startColumn": 21, + "charOffset": 29065, + "charLength": 11, + "snippet": { + "text": "\n\tint index = 0;\n\tlua_createtable(L, monsterType->info.scripts.size(), 0);\n\tfor (const std::string &creatureEvent : monsterType->info.scripts) {\n\t\tpushString(L, creatureEvent);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c497110c4db5a46afcbef4e91943573939ad0c1fd444c1ee8b0e08c67cecf3fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 995, + "startColumn": 2, + "charOffset": 29141, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 993, + "startColumn": 2, + "charOffset": 29066, + "charLength": 3, + "snippet": { + "text": "\tint index = 0;\n\tlua_createtable(L, monsterType->info.scripts.size(), 0);\n\tfor (const std::string &creatureEvent : monsterType->info.scripts) {\n\t\tpushString(L, creatureEvent);\n\t\tlua_rawseti(L, -2, ++index);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43d4706c466d1d6e6e0e52bb05b1755ed82647c72882a20c3a925515fec54431" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1007, + "startColumn": 29, + "charOffset": 29544, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 1005, + "startColumn": 29, + "charOffset": 29460, + "charLength": 6, + "snippet": { + "text": "\tif (monsterType) {\n\t\tauto eventName = getString(L, 2);\n\t\tmonsterType->info.scripts.insert(eventName);\n\t\tfor (const auto &[_, monster] : g_game().getMonsters()) {\n\t\t\tif (monster->getMonsterType() == monsterType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3af80230ece445efb44bcc5c51dba80afb5f2a0770d260f142a558f3281ec14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1008, + "startColumn": 3, + "charOffset": 29565, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1006, + "startColumn": 3, + "charOffset": 29480, + "charLength": 3, + "snippet": { + "text": "\t\tauto eventName = getString(L, 2);\n\t\tmonsterType->info.scripts.insert(eventName);\n\t\tfor (const auto &[_, monster] : g_game().getMonsters()) {\n\t\t\tif (monster->getMonsterType() == monsterType) {\n\t\t\t\tmonster->registerCreatureEvent(eventName);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3903849e8c052f36e1facace4f072b759f6ece4fe74e4a9c0403abc57af7ee2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1010, + "startColumn": 14, + "charOffset": 29687, + "charLength": 21, + "snippet": { + "text": "registerCreatureEvent" + } + }, + "contextRegion": { + "startLine": 1008, + "startColumn": 14, + "charOffset": 29563, + "charLength": 21, + "snippet": { + "text": "\t\tfor (const auto &[_, monster] : g_game().getMonsters()) {\n\t\t\tif (monster->getMonsterType() == monsterType) {\n\t\t\t\tmonster->registerCreatureEvent(eventName);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c53f9b9977ab502f09194d17722095243bcb946ec74f6567822fe65f4da740b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1054, + "startColumn": 6, + "charOffset": 30780, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1052, + "startColumn": 6, + "charOffset": 30679, + "charLength": 1, + "snippet": { + "text": "\t// monsterType:getSummonList()\n\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (!monsterType) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87dacdf058d0b491549a5a220fca77730ae339cbaa5780f8805bf64334bee736" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1060, + "startColumn": 21, + "charOffset": 30866, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 1058, + "startColumn": 21, + "charOffset": 30829, + "charLength": 11, + "snippet": { + "text": "\n\tint index = 0;\n\tlua_createtable(L, monsterType->info.summons.size(), 0);\n\tfor (const auto &summonBlock : monsterType->info.summons) {\n\t\tlua_createtable(L, 0, 3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee9e0ba94e1289dbe8b7d24f2bef39e4bdc0502f87084fe09dc42057aa4a0749" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1060, + "startColumn": 21, + "charOffset": 30866, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 1058, + "startColumn": 21, + "charOffset": 30829, + "charLength": 11, + "snippet": { + "text": "\n\tint index = 0;\n\tlua_createtable(L, monsterType->info.summons.size(), 0);\n\tfor (const auto &summonBlock : monsterType->info.summons) {\n\t\tlua_createtable(L, 0, 3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "998b1bcdf6c3ed7d0bd869d45b5bfcff1892181a7ddcbda362983b6497741938" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1061, + "startColumn": 2, + "charOffset": 30905, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1059, + "startColumn": 2, + "charOffset": 30830, + "charLength": 3, + "snippet": { + "text": "\tint index = 0;\n\tlua_createtable(L, monsterType->info.summons.size(), 0);\n\tfor (const auto &summonBlock : monsterType->info.summons) {\n\t\tlua_createtable(L, 0, 3);\n\t\tsetField(L, \"name\", summonBlock.name);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46d2d799f8905b83a03198e988328e93138b9b83e267604d1dc2d5df82da2413" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1064, + "startColumn": 24, + "charOffset": 31057, + "charLength": 11, + "snippet": { + "text": "summonBlock" + } + }, + "contextRegion": { + "startLine": 1062, + "startColumn": 24, + "charOffset": 30965, + "charLength": 11, + "snippet": { + "text": "\t\tlua_createtable(L, 0, 3);\n\t\tsetField(L, \"name\", summonBlock.name);\n\t\tsetField(L, \"speed\", summonBlock.speed);\n\t\tsetField(L, \"chance\", summonBlock.chance);\n\t\tlua_rawseti(L, -2, ++index);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e25a6e02e5f9a411a44160f7961e28137512d70bb405afe47d39ee6f7748d534" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1065, + "startColumn": 25, + "charOffset": 31101, + "charLength": 11, + "snippet": { + "text": "summonBlock" + } + }, + "contextRegion": { + "startLine": 1063, + "startColumn": 25, + "charOffset": 30993, + "charLength": 11, + "snippet": { + "text": "\t\tsetField(L, \"name\", summonBlock.name);\n\t\tsetField(L, \"speed\", summonBlock.speed);\n\t\tsetField(L, \"chance\", summonBlock.chance);\n\t\tlua_rawseti(L, -2, ++index);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a92ac3cf279a903071bce7ce7e980399fde8d5507f660f7e5aacf7d6c88a1190" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1078, + "startColumn": 40, + "charOffset": 31522, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 1076, + "startColumn": 40, + "charOffset": 31407, + "charLength": 1, + "snippet": { + "text": "\t\tsummon.name = getString(L, 2);\n\t\tsummon.speed = getNumber(L, 3);\n\t\tsummon.count = getNumber(L, 5, 1);\n\t\tsummon.chance = getNumber(L, 4);\n\t\tmonsterType->info.summons.push_back(summon);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70776f4f5ef6fb79f7a4fa6b6d5c977ecb0e2118a5de4ba9e35303668ee4daf8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1093, + "startColumn": 22, + "charOffset": 31960, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 1091, + "startColumn": 22, + "charOffset": 31891, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.maxSummons);\n\t\t} else {\n\t\t\tmonsterType->info.maxSummons = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6d1d570e1b83faf4e5be07b9243bcf52abc43125d749b421474468cb6c08a7b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1109, + "startColumn": 22, + "charOffset": 32391, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 1107, + "startColumn": 22, + "charOffset": 32322, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.armor);\n\t\t} else {\n\t\t\tmonsterType->info.armor = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "241e8b767b209e434329a5cf8ac85969b4b765f851957894d82489e3c557b978" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1123, + "startColumn": 6, + "charOffset": 32767, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1121, + "startColumn": 6, + "charOffset": 32624, + "charLength": 1, + "snippet": { + "text": "\t// get: monsterType:mitigation() set: monsterType:mitigation(mitigation)\n\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (!monsterType) {\n\t\tpushBoolean(L, false);\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_TYPE_NOT_FOUND));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5627190922291df922a1fb5ccffb8b737bd95dea66684fc0d62163854b93ed6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1125, + "startColumn": 3, + "charOffset": 32810, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1123, + "startColumn": 3, + "charOffset": 32762, + "charLength": 15, + "snippet": { + "text": "\tif (!monsterType) {\n\t\tpushBoolean(L, false);\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_TYPE_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "729c238d1dd010d8b794cc453effa1c8821485b8df7120495e516dd98aa83eb1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1143, + "startColumn": 22, + "charOffset": 33339, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 1141, + "startColumn": 22, + "charOffset": 33270, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.defense);\n\t\t} else {\n\t\t\tmonsterType->info.defense = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "290014f93b1f7d6db2b04e201ecef0fc4c06e7db1d9705a2051ea4ddff48ebe9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1182, + "startColumn": 22, + "charOffset": 34601, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 1180, + "startColumn": 22, + "charOffset": 34532, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.race);\n\t\t} else {\n\t\t\tif (race == \"venom\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52cd37dbc05e6e6375c6f2ee4518fa7e772a6e472dea95ad4251dd60cf5f696b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1216, + "startColumn": 22, + "charOffset": 35596, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 1214, + "startColumn": 22, + "charOffset": 35527, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.lookcorpse);\n\t\t} else {\n\t\t\tmonsterType->info.lookcorpse = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43de61a3fe4f720ba9bffae79bad2c79c77dba6392e75262d047fd1976325f97" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1219, + "startColumn": 23, + "charOffset": 35721, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 1217, + "startColumn": 23, + "charOffset": 35627, + "charLength": 4, + "snippet": { + "text": "\t\t} else {\n\t\t\tmonsterType->info.lookcorpse = getNumber(L, 2);\n\t\t\tlua_pushboolean(L, true);\n\t\t}\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6731d8ef0760e07a399dc62b62d5787d42beaaeddb8d359e255ab1abdaa3e32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1232, + "startColumn": 22, + "charOffset": 36039, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 1230, + "startColumn": 22, + "charOffset": 35970, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.manaCost);\n\t\t} else {\n\t\t\tmonsterType->info.manaCost = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee64040fb49d8219aefc1740f2b1ed87dcbc6b47d821f9a2fc44358db0f105ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1248, + "startColumn": 22, + "charOffset": 36439, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 1246, + "startColumn": 22, + "charOffset": 36370, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->getBaseSpeed());\n\t\t} else {\n\t\t\tmonsterType->setBaseSpeed(getNumber(L, 2));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "080b21ee00fa01ee43e72a3c410d26fdd1e0baccb96cb5865ffe5d27cf01151a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1261, + "startColumn": 6, + "charOffset": 36807, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1259, + "startColumn": 6, + "charOffset": 36672, + "charLength": 1, + "snippet": { + "text": "\t// get: monsterType:light() set: monsterType:light(color, level)\n\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (!monsterType) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8daadb5a56cb2aee47a5b4b0459517e0bcd4ef08e6d309d6c7c9d41e13e93bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1267, + "startColumn": 21, + "charOffset": 36904, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 1265, + "startColumn": 21, + "charOffset": 36856, + "charLength": 11, + "snippet": { + "text": "\n\tif (lua_gettop(L) == 1) {\n\t\tlua_pushnumber(L, monsterType->info.light.level);\n\t\tlua_pushnumber(L, monsterType->info.light.color);\n\t\treturn 2;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "865c9e75056256f97c62bccfac675eac2f4830356f0131b8a67e2911a1a7b47f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1268, + "startColumn": 21, + "charOffset": 36956, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 1266, + "startColumn": 21, + "charOffset": 36857, + "charLength": 11, + "snippet": { + "text": "\tif (lua_gettop(L) == 1) {\n\t\tlua_pushnumber(L, monsterType->info.light.level);\n\t\tlua_pushnumber(L, monsterType->info.light.color);\n\t\treturn 2;\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45eaab0d814e7129430b8648bc45f26c408ab028446a67283bffb6875877712e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1270, + "startColumn": 4, + "charOffset": 37003, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1268, + "startColumn": 4, + "charOffset": 36936, + "charLength": 4, + "snippet": { + "text": "\t\tlua_pushnumber(L, monsterType->info.light.color);\n\t\treturn 2;\n\t} else {\n\t\tmonsterType->info.light.color = getNumber(L, 2);\n\t\tmonsterType->info.light.level = getNumber(L, 3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f26b528367512e71d5cb92a512df792f871f380bd2f581b9e410e44b7c571727" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1283, + "startColumn": 22, + "charOffset": 37465, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 1281, + "startColumn": 22, + "charOffset": 37396, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.staticAttackChance);\n\t\t} else {\n\t\t\tmonsterType->info.staticAttackChance = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7cb4f816a9fdcefb0883d002855c63b356a87eed8279d0fb09bf285544751c9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1299, + "startColumn": 22, + "charOffset": 37942, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 1297, + "startColumn": 22, + "charOffset": 37873, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.targetDistance);\n\t\t} else {\n\t\t\tmonsterType->info.targetDistance = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c05494227255aca1c3a5f236b1f2cc94afda3d258c30a4c2e3c83838f2cf9833" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1316, + "startColumn": 23, + "charOffset": 38426, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 1314, + "startColumn": 23, + "charOffset": 38347, + "charLength": 11, + "snippet": { + "text": "\t\tif (lua_gettop(L) == 1) {\n\t\t\tif (lua_gettop(L) == 1) {\n\t\t\t\tlua_pushnumber(L, monsterType->info.yellChance);\n\t\t\t} else {\n\t\t\t\tmonsterType->info.yellChance = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "047ade681c3ae536bb1f3df753c2ece788a4c4b928ef093836d320c5e50facff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1336, + "startColumn": 22, + "charOffset": 38988, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 1334, + "startColumn": 22, + "charOffset": 38919, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.yellSpeedTicks);\n\t\t} else {\n\t\t\tmonsterType->info.yellSpeedTicks = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87510d117c9118dfd17f5f786b1dc3f5e749f09b6ad45e19a2873f1ffc74fbe3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1352, + "startColumn": 22, + "charOffset": 39421, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 1350, + "startColumn": 22, + "charOffset": 39352, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.changeTargetChance);\n\t\t} else {\n\t\t\tmonsterType->info.changeTargetChance = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f13214df7b810ee2e53fc59811d430aff23bc7bf645c732c253a111ba3cc51b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1368, + "startColumn": 22, + "charOffset": 39903, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 1366, + "startColumn": 22, + "charOffset": 39834, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.changeTargetSpeed);\n\t\t} else {\n\t\t\tmonsterType->info.changeTargetSpeed = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed7d6762789936745d563374d637f6681e33a7f5c9bcce712f8d182669fbabe5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1432, + "startColumn": 22, + "charOffset": 41731, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 1430, + "startColumn": 22, + "charOffset": 41662, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.strategiesTargetNearest);\n\t\t} else {\n\t\t\tmonsterType->info.strategiesTargetNearest = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d5a8369374bc5e45d77d3f39b453ace7aec711cd35c2131116c79f340ad7c5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1448, + "startColumn": 22, + "charOffset": 42186, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 1446, + "startColumn": 22, + "charOffset": 42117, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.strategiesTargetHealth);\n\t\t} else {\n\t\t\tmonsterType->info.strategiesTargetHealth = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc099bed68199a2860f5086f5267d445e2dd40d0e79f3a4c7154a24508d1650e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1464, + "startColumn": 22, + "charOffset": 42639, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 1462, + "startColumn": 22, + "charOffset": 42570, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.strategiesTargetDamage);\n\t\t} else {\n\t\t\tmonsterType->info.strategiesTargetDamage = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa5d7114e7de5d7da1ee85d9d4742e3c831f9b2715e8a10409d8a4b8dc11898e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1480, + "startColumn": 22, + "charOffset": 43092, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 1478, + "startColumn": 22, + "charOffset": 43023, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.strategiesTargetRandom);\n\t\t} else {\n\t\t\tmonsterType->info.strategiesTargetRandom = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "794025fb991a1f0f25720cb2f0023ad8d286e80a1fd075e9233f7d4f41b1868b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1500, + "startColumn": 22, + "charOffset": 43560, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 1498, + "startColumn": 22, + "charOffset": 43491, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.respawnType.period);\n\t\t} else {\n\t\t\tmonsterType->info.respawnType.period = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "865c9e75056256f97c62bccfac675eac2f4830356f0131b8a67e2911a1a7b47f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1516, + "startColumn": 22, + "charOffset": 44017, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 1514, + "startColumn": 22, + "charOffset": 43948, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.respawnType.underground);\n\t\t} else {\n\t\t\tmonsterType->info.respawnType.underground = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a9814d9466fcbcb1477b953c058e2ad0265a8a049d17dcf6dffa63e2d01bb60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1516, + "startColumn": 22, + "charOffset": 44017, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 1514, + "startColumn": 22, + "charOffset": 43948, + "charLength": 11, + "snippet": { + "text": "\tif (monsterType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, monsterType->info.respawnType.underground);\n\t\t} else {\n\t\t\tmonsterType->info.respawnType.underground = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e42e7546dc3b4f9d6ba3895e3d79c87088f04bd6ba9363d48bf2deebc9dcde4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'typename std::enable_if::value, RespawnPeriod_t>::type' (aka 'RespawnPeriod_t') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1518, + "startColumn": 48, + "charOffset": 44119, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 1516, + "startColumn": 48, + "charOffset": 43996, + "charLength": 9, + "snippet": { + "text": "\t\t\tlua_pushnumber(L, monsterType->info.respawnType.underground);\n\t\t} else {\n\t\t\tmonsterType->info.respawnType.underground = getNumber(L, 2);\n\t\t\tpushBoolean(L, true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c05e1c424c4fb5893ba1c2c24349eafa2f142737b125dcab826b7ef657112f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1531, + "startColumn": 6, + "charOffset": 44478, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1529, + "startColumn": 6, + "charOffset": 44342, + "charLength": 1, + "snippet": { + "text": "\t// get: monsterType:bosstiaryRace() = this return only class name\n\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (!monsterType) {\n\t\tpushBoolean(L, false);\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_TYPE_NOT_FOUND));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df5415c973741544826036ae2adbdad0a8ee29e3fcbd0dc27e17544a94ec9d0f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1533, + "startColumn": 3, + "charOffset": 44521, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1531, + "startColumn": 3, + "charOffset": 44473, + "charLength": 15, + "snippet": { + "text": "\tif (!monsterType) {\n\t\tpushBoolean(L, false);\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_TYPE_NOT_FOUND));\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d78f4757d33a79fb1e3149d48fec7a5037c04ee2fd161c1cae8cc909300b716" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1558, + "startColumn": 6, + "charOffset": 45248, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1556, + "startColumn": 6, + "charOffset": 45145, + "charLength": 1, + "snippet": { + "text": "\t// get: monsterType:bossRaceId()\n\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (!monsterType) {\n\t\tpushBoolean(L, false);\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_TYPE_NOT_FOUND));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d4390ce37bc177c941374e38fa78d2f60d8d235e968778794de3b4b5c136082" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1560, + "startColumn": 3, + "charOffset": 45291, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1558, + "startColumn": 3, + "charOffset": 45243, + "charLength": 15, + "snippet": { + "text": "\tif (!monsterType) {\n\t\tpushBoolean(L, false);\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_TYPE_NOT_FOUND));\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f6b92119dd1d83c0e5982b73d651d87d33dabe8e6dae3eeafba6a6d356948fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1566, + "startColumn": 22, + "charOffset": 45470, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 1564, + "startColumn": 22, + "charOffset": 45372, + "charLength": 1, + "snippet": { + "text": "\tif (lua_gettop(L) == 1) {\n\t\tif (monsterType->info.bosstiaryClass.empty()) {\n\t\t\tlua_pushnumber(L, 0);\n\t\t} else {\n\t\t\tlua_pushnumber(L, static_cast(monsterType->info.bosstiaryRace));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad7dc577d83be63b3e9a5165792b6b6cc4bcb76e9315b2cd947e9b1c1188d680" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1583, + "startColumn": 6, + "charOffset": 45979, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1581, + "startColumn": 6, + "charOffset": 45838, + "charLength": 1, + "snippet": { + "text": "\t// get: monsterType:soundChance() set: monsterType:soundChance(chance)\n\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (!monsterType) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d5ac3acd3a1955be56540cefabe70c9e76663d6cf823419e2a060685280ce31" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1584, + "startColumn": 3, + "charOffset": 45997, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1582, + "startColumn": 3, + "charOffset": 45910, + "charLength": 15, + "snippet": { + "text": "\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (!monsterType) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bba971ddb54c42b3669fc275240aeb3787725d76587b5ce0ba8cae34b64c8cf4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1590, + "startColumn": 21, + "charOffset": 46146, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 1588, + "startColumn": 21, + "charOffset": 46098, + "charLength": 11, + "snippet": { + "text": "\n\tif (lua_gettop(L) == 1) {\n\t\tlua_pushnumber(L, monsterType->info.soundChance);\n\t} else {\n\t\tmonsterType->info.soundChance = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aacc679bcbb99b7069f99839511880666de9b8031a88261c9eabb106391559c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1601, + "startColumn": 6, + "charOffset": 46510, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1599, + "startColumn": 6, + "charOffset": 46362, + "charLength": 1, + "snippet": { + "text": "\t// get: monsterType:soundSpeedTicks() set: monsterType:soundSpeedTicks(ticks)\n\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (!monsterType) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a586b795533c62887496faa0ea3ac5d38f56a321a550d2bfac88aa5b3728b0f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1602, + "startColumn": 3, + "charOffset": 46528, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1600, + "startColumn": 3, + "charOffset": 46441, + "charLength": 15, + "snippet": { + "text": "\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (!monsterType) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d348586c5f1833fed887be9ea8e1d3c298ecb8527be336582ee2421a5a2aae6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1608, + "startColumn": 21, + "charOffset": 46677, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 1606, + "startColumn": 21, + "charOffset": 46629, + "charLength": 11, + "snippet": { + "text": "\n\tif (lua_gettop(L) == 1) {\n\t\tlua_pushnumber(L, monsterType->info.soundSpeedTicks);\n\t} else {\n\t\tmonsterType->info.soundSpeedTicks = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "332792c3491d77718b62b2595c921bc75465db877939a1f33418cba102ee4e47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1619, + "startColumn": 6, + "charOffset": 46997, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1617, + "startColumn": 6, + "charOffset": 46894, + "charLength": 1, + "snippet": { + "text": "\t// monsterType:addSound(soundId)\n\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (!monsterType) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0208d6cf4be9664ff3c2604ea2b434d994264e07c62c8934b1bfc6f81162a959" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1620, + "startColumn": 3, + "charOffset": 47015, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1618, + "startColumn": 3, + "charOffset": 46928, + "charLength": 15, + "snippet": { + "text": "\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (!monsterType) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "859a999dbdcb6be4ac63eb6bbe94de4c6052a44023550174e0295dda6278c461" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1633, + "startColumn": 6, + "charOffset": 47391, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1631, + "startColumn": 6, + "charOffset": 47294, + "charLength": 1, + "snippet": { + "text": "\t// monsterType:getSounds()\n\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (!monsterType) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1684557b82af1ded5ccd3247003bc64a0adfed722e96264008f5baea74e6cd82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1640, + "startColumn": 2, + "charOffset": 47538, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1638, + "startColumn": 2, + "charOffset": 47441, + "charLength": 3, + "snippet": { + "text": "\tint index = 0;\n\tlua_createtable(L, static_cast(monsterType->info.soundVector.size()), 0);\n\tfor (const auto &sound : monsterType->info.soundVector) {\n\t\t++index;\n\t\tlua_createtable(L, 0, 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33c4f48aa83169550dbecdc67a32730f009020af5af76900e10ec15486d52c74" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-5", + "ruleIndex": 438, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-5: A cast shall not remove any const or volatile qualification from the type of a pointer or reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1643, + "startColumn": 21, + "charOffset": 47655, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 1641, + "startColumn": 21, + "charOffset": 47596, + "charLength": 11, + "snippet": { + "text": "\t\t++index;\n\t\tlua_createtable(L, 0, 1);\n\t\tlua_pushnumber(L, static_cast(sound));\n\t\tlua_rawseti(L, -2, index);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05ad1046ea1a23545c202ca33255eed338979fe2ec42ab9f8f4d1c19ad0a5d87" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1652, + "startColumn": 6, + "charOffset": 47939, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1650, + "startColumn": 6, + "charOffset": 47801, + "charLength": 1, + "snippet": { + "text": "\t// get: monsterType:deathSound() set: monsterType:deathSound(sound)\n\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (!monsterType) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5192edaf9cc68c748035875ed987d6fc3b34eb85ca80b828d0710b5d5f0adc5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1653, + "startColumn": 3, + "charOffset": 47957, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1651, + "startColumn": 3, + "charOffset": 47870, + "charLength": 15, + "snippet": { + "text": "\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (!monsterType) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f94a0ef182ee0178f22afec33188b13ddc4ed854f9c15de798721a642c76fff6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1671, + "startColumn": 6, + "charOffset": 48481, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1669, + "startColumn": 6, + "charOffset": 48343, + "charLength": 1, + "snippet": { + "text": "\t// get: monsterType:variant() set: monsterType:variant(variantName)\n\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (!monsterType) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06a2c7bdac0078f428927a6aec24f0ed428f89b48dc6f286eba1ec3285a2d7e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp" + }, + "region": { + "startLine": 1672, + "startColumn": 3, + "charOffset": 48499, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1670, + "startColumn": 3, + "charOffset": 48412, + "charLength": 15, + "snippet": { + "text": "\tconst auto monsterType = getUserdataShared(L, 1);\n\tif (!monsterType) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67f89f68eedda06d8d1a176145b124b15f51d6c689b822802bdb659160508f08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 57, + "startColumn": 6, + "charOffset": 1512, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 55, + "startColumn": 6, + "charOffset": 1423, + "charLength": 1, + "snippet": { + "text": "\t// npc:setMasterPos(pos)\n\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "696b0967ab491cfde25219c9aa85bd02b0ad9a0f96436510a44d784a50e9baca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 58, + "startColumn": 3, + "charOffset": 1522, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 56, + "startColumn": 3, + "charOffset": 1449, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf9b4757d95516891572f57ee96d04aac54623d213c7e84e452f46fadd6103ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 6, + "charOffset": 1860, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 6, + "charOffset": 1775, + "charLength": 1, + "snippet": { + "text": "\t// npc:getCurrency()\n\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7783f86b9d5d9155db875a8de31e3cd0e13c403020d332fc788ef5825702d180" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 73, + "startColumn": 3, + "charOffset": 1870, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 71, + "startColumn": 3, + "charOffset": 1797, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6da1909cda78fa9777fe48919c9e669caddbbf9df075344499371242e7e7310" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 77, + "startColumn": 20, + "charOffset": 1967, + "charLength": 3, + "snippet": { + "text": "npc" + } + }, + "contextRegion": { + "startLine": 75, + "startColumn": 20, + "charOffset": 1944, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, npc->getCurrency());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4483fea5be9e687c7458f1bb7c096273d33fa74f2603abb943066c0329c99924" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 84, + "startColumn": 6, + "charOffset": 2139, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 6, + "charOffset": 2054, + "charLength": 1, + "snippet": { + "text": "\t// npc:getCurrency()\n\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3e9cca2c27ce2ec8fe7b9fdfc3425bbad8f2aeaee199c6c9cff48605372e6e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 85, + "startColumn": 3, + "charOffset": 2149, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 3, + "charOffset": 2076, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b444c3830695d73bdf94ebe27e977d98ef86ba32ec6dfada800ccfa95f2a6fed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 97, + "startColumn": 6, + "charOffset": 2451, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 95, + "startColumn": 6, + "charOffset": 2362, + "charLength": 1, + "snippet": { + "text": "\t// npc:getSpeechBubble()\n\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b865b23c277cc6a5e8203c7b4b270211d9fe13300ed4de5d9efccf099003504" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 3, + "charOffset": 2461, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 3, + "charOffset": 2388, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f1b957795cf955e77691453f4a22b1e273fba4cc8405463d866412e038f944f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 102, + "startColumn": 20, + "charOffset": 2558, + "charLength": 3, + "snippet": { + "text": "npc" + } + }, + "contextRegion": { + "startLine": 100, + "startColumn": 20, + "charOffset": 2535, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, npc->getSpeechBubble());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7a360151bc5381c9ea7ce47867e88d8f6724c53d6ae6dd0709b50481daab33d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 109, + "startColumn": 6, + "charOffset": 2754, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 107, + "startColumn": 6, + "charOffset": 2653, + "charLength": 1, + "snippet": { + "text": "\t// npc:setSpeechBubble(speechBubble)\n\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b32cecb7bce385d9050e71e67aeb8f3daf14f37239a8668af5cee2edd5b915f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 110, + "startColumn": 3, + "charOffset": 2764, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 108, + "startColumn": 3, + "charOffset": 2691, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c84b60cda25c08b28f687f41e54e507e615b69203b4b832688e161ec239ca003" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 121, + "startColumn": 6, + "charOffset": 3034, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 119, + "startColumn": 6, + "charOffset": 2953, + "charLength": 1, + "snippet": { + "text": "\t// npc:getName()\n\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0bd01893fced0bd049dff8e133750548aa1d5b56e38f1c6706707fb3564df91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 122, + "startColumn": 3, + "charOffset": 3044, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 120, + "startColumn": 3, + "charOffset": 2971, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6294eebb57cd0ae581763e907048e82dd490914462e7b2a800461d2577505624" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 135, + "startColumn": 6, + "charOffset": 3357, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 133, + "startColumn": 6, + "charOffset": 3250, + "charLength": 1, + "snippet": { + "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tconst std::string &name = getString(L, 2);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9424b57799dc89c3f72378c0ac1b841d8b26c66809758d1f48988343948e1a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 136, + "startColumn": 3, + "charOffset": 3367, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 3, + "charOffset": 3308, + "charLength": 15, + "snippet": { + "text": "\tconst std::string &name = getString(L, 2);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75b06ba591a2a64b8b42718a54591b09e62cdbb172a0a13239b46df8f0ea68c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 147, + "startColumn": 6, + "charOffset": 3649, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 145, + "startColumn": 6, + "charOffset": 3526, + "charLength": 1, + "snippet": { + "text": "\t// npc:place(position[, extended = false[, force = true]])\n\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "272551151cb261d3824a3350f723a937d62ac4732a5ecf21f0d0865042ba9508" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 148, + "startColumn": 3, + "charOffset": 3659, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 146, + "startColumn": 3, + "charOffset": 3586, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b230e9486c3d83976c44c7acd7a51d1afa06d16bcd6a1069341b2277c2b055a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 170, + "startColumn": 20, + "charOffset": 4257, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 168, + "startColumn": 20, + "charOffset": 4217, + "charLength": 1, + "snippet": { + "text": "\n\tPosition position;\n\tif (parameters >= 6) {\n\t\tposition = getPosition(L, 6);\n\t\tif (!position.x || !position.y) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4dd8e09e6cae82a3233c7aaef94e97896d175443681e39689c03da817f019508" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 171, + "startColumn": 29, + "charOffset": 4290, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 169, + "startColumn": 29, + "charOffset": 4218, + "charLength": 1, + "snippet": { + "text": "\tPosition position;\n\tif (parameters >= 6) {\n\t\tposition = getPosition(L, 6);\n\t\tif (!position.x || !position.y) {\n\t\t\treportErrorFunc(\"Invalid position specified.\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46a24556976be56e48c2072f869c3bc024794987e8809486eb58255f3b0a82a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 7, + "charOffset": 4300, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 7, + "charOffset": 4238, + "charLength": 1, + "snippet": { + "text": "\tif (parameters >= 6) {\n\t\tposition = getPosition(L, 6);\n\t\tif (!position.x || !position.y) {\n\t\t\treportErrorFunc(\"Invalid position specified.\");\n\t\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02b088090cbef90c7987c35fd678071b6adc696c4d05b1bff07448a92e229bdb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint16_t' (aka 'unsigned short') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 8, + "charOffset": 4301, + "charLength": 8, + "snippet": { + "text": "position" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 8, + "charOffset": 4238, + "charLength": 8, + "snippet": { + "text": "\tif (parameters >= 6) {\n\t\tposition = getPosition(L, 6);\n\t\tif (!position.x || !position.y) {\n\t\t\treportErrorFunc(\"Invalid position specified.\");\n\t\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49e71d5ff2050ce2992402fc2bad33a2103b7a14c39c210748c195800239269b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 22, + "charOffset": 4315, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 22, + "charOffset": 4238, + "charLength": 1, + "snippet": { + "text": "\tif (parameters >= 6) {\n\t\tposition = getPosition(L, 6);\n\t\tif (!position.x || !position.y) {\n\t\t\treportErrorFunc(\"Invalid position specified.\");\n\t\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afca0e7d0ef0489007e3edba80f07457202b88c165634cce556adab6c78e52ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint16_t' (aka 'unsigned short') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 23, + "charOffset": 4316, + "charLength": 8, + "snippet": { + "text": "position" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 23, + "charOffset": 4238, + "charLength": 8, + "snippet": { + "text": "\tif (parameters >= 6) {\n\t\tposition = getPosition(L, 6);\n\t\tif (!position.x || !position.y) {\n\t\t\treportErrorFunc(\"Invalid position specified.\");\n\t\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71008f885566c7bc09b09eeaa74cf4e769312bd3e227d2f399e3eb1cbf002f1f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 173, + "startColumn": 4, + "charOffset": 4333, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 171, + "startColumn": 4, + "charOffset": 4262, + "charLength": 15, + "snippet": { + "text": "\t\tposition = getPosition(L, 6);\n\t\tif (!position.x || !position.y) {\n\t\t\treportErrorFunc(\"Invalid position specified.\");\n\t\t\tpushBoolean(L, false);\n\t\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9e9b539c9c5c4c0ee21eec10391762e4655efe563b633e484fce53217dcb5c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 180, + "startColumn": 20, + "charOffset": 4492, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 178, + "startColumn": 20, + "charOffset": 4427, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr target = nullptr;\n\tif (parameters >= 5) {\n\t\ttarget = getCreature(L, 5);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1503fb513a652b54250278de0d8a4c783547cf4bba038a4ca4177aadbbf808f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 181, + "startColumn": 27, + "charOffset": 4523, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 179, + "startColumn": 27, + "charOffset": 4428, + "charLength": 1, + "snippet": { + "text": "\tstd::shared_ptr target = nullptr;\n\tif (parameters >= 5) {\n\t\ttarget = getCreature(L, 5);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56339dc7a6d6d33fccecb85c50c6db15b2edf51e03d4edb2da0bf4ce46451f94" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 186, + "startColumn": 2, + "charOffset": 4572, + "charLength": 12, + "snippet": { + "text": "SpeakClasses" + } + }, + "contextRegion": { + "startLine": 184, + "startColumn": 2, + "charOffset": 4531, + "charLength": 12, + "snippet": { + "text": "\tbool ghost = getBoolean(L, 4, false);\n\n\tSpeakClasses type = getNumber(L, 3, TALKTYPE_PRIVATE_NP);\n\tconst std::string &text = getString(L, 2);\n\tstd::shared_ptr npc = getUserdataShared(L, 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01bec5aef3dcbd2037aac086ef6a102c472d4835971194a13d427bbc96587830" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 189, + "startColumn": 6, + "charOffset": 4751, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 187, + "startColumn": 6, + "charOffset": 4644, + "charLength": 1, + "snippet": { + "text": "\tconst std::string &text = getString(L, 2);\n\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ab8380d12f1519ebd134162579d1e2d32f2214c245acff6e17fad474dd8363f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 196, + "startColumn": 14, + "charOffset": 4845, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 194, + "startColumn": 14, + "charOffset": 4793, + "charLength": 6, + "snippet": { + "text": "\tSpectators spectators;\n\tif (target) {\n\t\tspectators.insert(target);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c27f32eaa35ff92e9032bb10c26eb5eaee84987a5b30dde8ac6f6dfb4aff3205" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 216, + "startColumn": 6, + "charOffset": 5465, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 214, + "startColumn": 6, + "charOffset": 5402, + "charLength": 1, + "snippet": { + "text": "\tstd::shared_ptr creature = getCreature(L, 2);\n\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "511374cc599f5ebf7dff0b7fb6eca1e05d2db236cc4a4f3371920c7ec590e0bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 217, + "startColumn": 3, + "charOffset": 5475, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 215, + "startColumn": 3, + "charOffset": 5459, + "charLength": 15, + "snippet": { + "text": "\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2dd0ccd927666d698742090f4a622b6c0b54a7300fb6c549896eeb4d364a70c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 222, + "startColumn": 6, + "charOffset": 5570, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 220, + "startColumn": 6, + "charOffset": 5561, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!creature) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b32cecb7bce385d9050e71e67aeb8f3daf14f37239a8668af5cee2edd5b915f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 223, + "startColumn": 3, + "charOffset": 5585, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 221, + "startColumn": 3, + "charOffset": 5564, + "charLength": 15, + "snippet": { + "text": "\n\tif (!creature) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01b1ed7389f87f52b41975b673fa2da5c1c8deb5d08d809560d187b9369b2b9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 241, + "startColumn": 2, + "charOffset": 6071, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 239, + "startColumn": 2, + "charOffset": 5955, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tstd::shared_ptr creature = getCreature(L, 2);\n\tuint16_t topicId = getNumber(L, 3, 0);\n\n\tif (!npc) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c56dd0d5640da8fda3f4c419a22afcf10276774e0c1fa02b691f74511e30ebf3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 243, + "startColumn": 6, + "charOffset": 6126, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 6, + "charOffset": 6070, + "charLength": 1, + "snippet": { + "text": "\tuint16_t topicId = getNumber(L, 3, 0);\n\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be23bc432cdc3e8ab19f252aa97a78e44f45e2ea64fff985150e09972d29a99b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 244, + "startColumn": 3, + "charOffset": 6136, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 3, + "charOffset": 6120, + "charLength": 15, + "snippet": { + "text": "\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d5b1d81cb035f970601b22f54f60c016a90de56cef08dbed5699d668fe96c95" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 249, + "startColumn": 6, + "charOffset": 6231, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 247, + "startColumn": 6, + "charOffset": 6222, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!creature) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b42d0476c4be9281e24cbbf2671a64e3851e09a62d7e7c4644057a3627a673c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 250, + "startColumn": 3, + "charOffset": 6246, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 248, + "startColumn": 3, + "charOffset": 6225, + "charLength": 15, + "snippet": { + "text": "\n\tif (!creature) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfd75e7b5454a24eb5026649b87a09114be318fee4465430821ec20f465156a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 265, + "startColumn": 6, + "charOffset": 6653, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 263, + "startColumn": 6, + "charOffset": 6590, + "charLength": 1, + "snippet": { + "text": "\tstd::shared_ptr creature = getCreature(L, 2);\n\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "503dce0cc3698b40cf7191f067f492554c14d50930232a223cb9ff0064f5e944" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 266, + "startColumn": 3, + "charOffset": 6663, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 264, + "startColumn": 3, + "charOffset": 6647, + "charLength": 15, + "snippet": { + "text": "\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df4ab402faaf1c08770867c4b42409a846d117bcf3ce100ef5da84c89363a345" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 271, + "startColumn": 6, + "charOffset": 6758, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 269, + "startColumn": 6, + "charOffset": 6749, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!creature) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "331e3bbaf457bee1646503b85a73135ca15d9c835ce3350d180d1fa4cb13b878" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 272, + "startColumn": 3, + "charOffset": 6773, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 270, + "startColumn": 3, + "charOffset": 6752, + "charLength": 15, + "snippet": { + "text": "\n\tif (!creature) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ff24ff31e1b2f6c7ef1deadc732547bbc14cf4621f5fa7ad83afc282a60714a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 287, + "startColumn": 6, + "charOffset": 7186, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 285, + "startColumn": 6, + "charOffset": 7123, + "charLength": 1, + "snippet": { + "text": "\tstd::shared_ptr creature = getCreature(L, 2);\n\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66012590975101b3223462d689ab5a1daac57113d5fe769056355333bef54819" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 288, + "startColumn": 3, + "charOffset": 7196, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 286, + "startColumn": 3, + "charOffset": 7180, + "charLength": 15, + "snippet": { + "text": "\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "abca589fe47622bb7d7570c58eadd562f30ebb60f55439276e9a1af5ee1af9d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 293, + "startColumn": 6, + "charOffset": 7291, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 291, + "startColumn": 6, + "charOffset": 7282, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!creature) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bbdc3ed6c7bba34c0ec9f5b2bbe3dbce034bf017e0f5bf6021b1d948905b2211" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 294, + "startColumn": 3, + "charOffset": 7306, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 292, + "startColumn": 3, + "charOffset": 7285, + "charLength": 15, + "snippet": { + "text": "\n\tif (!creature) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c19a53e38f6c61a239e06aaa1c7c030fff865b80f2c940b17eb7760d371b358c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 307, + "startColumn": 2, + "charOffset": 7722, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 305, + "startColumn": 2, + "charOffset": 7606, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tstd::shared_ptr creature = getCreature(L, 2);\n\tuint32_t topicId = getNumber(L, 3, 0);\n\n\tif (!npc) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7fea64f07e7221295d80ba5649e023d7097eea06ae9a1c250362ff32ab61223" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 309, + "startColumn": 6, + "charOffset": 7777, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 307, + "startColumn": 6, + "charOffset": 7721, + "charLength": 1, + "snippet": { + "text": "\tuint32_t topicId = getNumber(L, 3, 0);\n\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba2eeddcb27fa6228a49ebbeb526a3482f73cc9b8d46e33398898ac1f0302530" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 310, + "startColumn": 3, + "charOffset": 7787, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 308, + "startColumn": 3, + "charOffset": 7771, + "charLength": 15, + "snippet": { + "text": "\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "178b5f9f77c9752f2a1be4aaafddfd8d897eaef2219b86ab653c101db33b369d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 315, + "startColumn": 6, + "charOffset": 7882, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 313, + "startColumn": 6, + "charOffset": 7873, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!creature) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e7e4ba37f9b9fef62f43ee47b000c0409ec6f319cd639e6c9793c49e258e507" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 316, + "startColumn": 3, + "charOffset": 7897, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 314, + "startColumn": 3, + "charOffset": 7876, + "charLength": 15, + "snippet": { + "text": "\n\tif (!creature) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4efe65192201f8f20eddd787215e4a8f483dba606d09cf3b1f50bb12a780c1f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 321, + "startColumn": 68, + "charOffset": 8059, + "charLength": 7, + "snippet": { + "text": "topicId" + } + }, + "contextRegion": { + "startLine": 319, + "startColumn": 68, + "charOffset": 7988, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tpushBoolean(L, npc->isPlayerInteractingOnTopic(creature->getID(), topicId));\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3400a084dd92114483bb121a0a59eb9165c2e53f4cbfa12979307f53e39a7ab1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 329, + "startColumn": 2, + "charOffset": 8289, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 327, + "startColumn": 2, + "charOffset": 8183, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tconst Position &position = getPosition(L, 2);\n\tuint32_t range = getNumber(L, 3, 4);\n\n\tif (!npc) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "010f5cbf9a1539c3d86bb52b5586857dc755dd4edd41f5133fbd501d53f4f7f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 331, + "startColumn": 6, + "charOffset": 8342, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 329, + "startColumn": 6, + "charOffset": 8288, + "charLength": 1, + "snippet": { + "text": "\tuint32_t range = getNumber(L, 3, 4);\n\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6174579c20b2d96ca5f65448440fd29734db23906f02654ff39751b1e4d18852" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 332, + "startColumn": 3, + "charOffset": 8352, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 330, + "startColumn": 3, + "charOffset": 8336, + "charLength": 15, + "snippet": { + "text": "\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ebb48a26b29043aebea93dbc1ece4a7dbc30b0ab82891aacf548c74f03ff9b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 344, + "startColumn": 6, + "charOffset": 8664, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 342, + "startColumn": 6, + "charOffset": 8570, + "charLength": 1, + "snippet": { + "text": "\t// npc:openShopWindow(player)\n\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df2d779c0576780cb8f43a5afa7a13bf358584ac8233693ea80b3a25835c4341" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 345, + "startColumn": 3, + "charOffset": 8674, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 343, + "startColumn": 3, + "charOffset": 8601, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "076557e7583bebb1316f3945aee5410260b6198c46e48ada0d424f24ef2ebb06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 351, + "startColumn": 6, + "charOffset": 8815, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 349, + "startColumn": 6, + "charOffset": 8770, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto &player = getPlayer(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb9a82fa11176c033c911baf8baf3deb0023628f3be01ccc1da77460fcbae8fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 352, + "startColumn": 3, + "charOffset": 8828, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 350, + "startColumn": 3, + "charOffset": 8771, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getPlayer(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34d671879300d7ccf5d781051f2cf50c44d14d7d992feb4b2c6a8543c76af87e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 364, + "startColumn": 6, + "charOffset": 9145, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 362, + "startColumn": 6, + "charOffset": 9048, + "charLength": 1, + "snippet": { + "text": "\t// npc:openShopWindowTable(player, items)\n\tconst auto &npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ec628069766566fa7a44daefa8152bccd7e07ae7e72daa04e7d8139573a7337" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 365, + "startColumn": 3, + "charOffset": 9155, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 363, + "startColumn": 3, + "charOffset": 9091, + "charLength": 15, + "snippet": { + "text": "\tconst auto &npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b48fa6d2351cd3d2bbd411d8851356d4081937c422c6aec7982cb96cde45a5d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 371, + "startColumn": 6, + "charOffset": 9312, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 369, + "startColumn": 6, + "charOffset": 9251, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto &player = getUserdataShared(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7857914a140fd925a35ef9f37697c48367e37e406795d30c54a7b5d1ef6dc7dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 372, + "startColumn": 3, + "charOffset": 9325, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 370, + "startColumn": 3, + "charOffset": 9252, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getUserdataShared(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc2af7a6ad48d04537440339be18744b2020c2b29ba0631d6f529a6ab8d46f12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 377, + "startColumn": 15, + "charOffset": 9445, + "charLength": 12, + "snippet": { + "text": "__FUNCTION__" + } + }, + "contextRegion": { + "startLine": 375, + "startColumn": 15, + "charOffset": 9399, + "charLength": 12, + "snippet": { + "text": "\n\tif (lua_istable(L, 3) == 0) {\n\t\treportError(__FUNCTION__, \"item list is not a table.\");\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7246fccb114ab0d55b6ed815753de1891cb2b16341346842fda28f2e59ed3381" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 384, + "startColumn": 2, + "charOffset": 9579, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 382, + "startColumn": 2, + "charOffset": 9530, + "charLength": 5, + "snippet": { + "text": "\tstd::vector items;\n\tlua_pushnil(L);\n\twhile (lua_next(L, 3) != 0) {\n\t\tconst auto tableIndex = lua_gettop(L);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "709fe2f49eb279b6b3e46af8655e2d25f8cc9d1735c91c8eda1ebdb95fef4ad2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 402, + "startColumn": 9, + "charOffset": 10280, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 400, + "startColumn": 9, + "charOffset": 10228, + "charLength": 12, + "snippet": { + "text": "\t\t\titemName = Item::items[itemId].name;\n\t\t}\n\t\titems.emplace_back(itemId, itemName, subType, buyPrice, sellPrice, storageKey, storageValue);\n\t\tlua_pop(L, 8);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2bfbeaae73be73243cf7f64d979a971f8ea442631ef69d17e24b18464f034202" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 414, + "startColumn": 6, + "charOffset": 10604, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 412, + "startColumn": 6, + "charOffset": 10528, + "charLength": 1, + "snippet": { + "text": "\t// npc:closeShopWindow(player)\n\tconst auto &player = getPlayer(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "671a5bd48ca364bfffba31d6621783d2c6ee31a741cf3c7cad13d7ea95783439" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 415, + "startColumn": 3, + "charOffset": 10617, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 413, + "startColumn": 3, + "charOffset": 10560, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getPlayer(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8340c129a97866015ca47e8f8b6a75eba5550aefad728156c64361194a3cf5f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 421, + "startColumn": 6, + "charOffset": 10780, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 419, + "startColumn": 6, + "charOffset": 10716, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc07680b17310838dae34d6c864f3bd4b0e9d3b2de65ba6d327ffb2427254da2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 422, + "startColumn": 3, + "charOffset": 10790, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 420, + "startColumn": 3, + "charOffset": 10717, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13659084cc63916042f7ab803846a4ef474312cca99fa2669d0650c909f0da4d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 428, + "startColumn": 11, + "charOffset": 10940, + "charLength": 15, + "snippet": { + "text": "closeShopWindow" + } + }, + "contextRegion": { + "startLine": 426, + "startColumn": 11, + "charOffset": 10891, + "charLength": 15, + "snippet": { + "text": "\n\tif (player->getShopOwner() == npc) {\n\t\tplayer->closeShopWindow();\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65ce769a813d09d76fcede12a45164e154b509afca66982d4b1a28fb8aac9b94" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 438, + "startColumn": 6, + "charOffset": 11135, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 436, + "startColumn": 6, + "charOffset": 11051, + "charLength": 1, + "snippet": { + "text": "\t// npc:isMerchant()\n\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "229cdc766841bc32e34aa5d83668cf4853e32677c7ecf113c3a3a9ddcb2478c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 439, + "startColumn": 3, + "charOffset": 11145, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 437, + "startColumn": 3, + "charOffset": 11072, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "039820735ce9d220f0ebfac372228319cbddc4635a09b1d62d972651a38fdfa9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 458, + "startColumn": 6, + "charOffset": 11599, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 456, + "startColumn": 6, + "charOffset": 11508, + "charLength": 1, + "snippet": { + "text": "\t// npc:getShopItem(itemId)\n\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ede86135daec21f3b6f159d95f9eab943c29ff47db9194fb98dcf895959033ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 459, + "startColumn": 3, + "charOffset": 11609, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 457, + "startColumn": 3, + "charOffset": 11536, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bfaef6fbc56902db4c9a9d635aad63ff6eb6376ad9c961bb5ed91eeee87e989c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 466, + "startColumn": 2, + "charOffset": 11822, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 464, + "startColumn": 2, + "charOffset": 11711, + "charLength": 3, + "snippet": { + "text": "\tauto playerGUID = getNumber(L, 2, 0);\n\tconst auto &shopItems = npc->getShopItemVector(playerGUID);\n\tfor (ShopBlock shopBlock : shopItems) {\n\t\tsetField(L, \"id\", shopBlock.itemId);\n\t\tsetField(L, \"name\", shopBlock.itemName);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9ab95087f07d64ff6e8415780631c08208cb8503ac029bbb625af5865f964e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 466, + "startColumn": 17, + "charOffset": 11837, + "charLength": 9, + "snippet": { + "text": "shopBlock" + } + }, + "contextRegion": { + "startLine": 464, + "startColumn": 17, + "charOffset": 11711, + "charLength": 9, + "snippet": { + "text": "\tauto playerGUID = getNumber(L, 2, 0);\n\tconst auto &shopItems = npc->getShopItemVector(playerGUID);\n\tfor (ShopBlock shopBlock : shopItems) {\n\t\tsetField(L, \"id\", shopBlock.itemId);\n\t\tsetField(L, \"name\", shopBlock.itemName);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44de17b93b9cadaa1f0714f9aa5b1354dd30eaf79f7ce3f57ed91c648100fff1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 467, + "startColumn": 21, + "charOffset": 11882, + "charLength": 9, + "snippet": { + "text": "shopBlock" + } + }, + "contextRegion": { + "startLine": 465, + "startColumn": 21, + "charOffset": 11760, + "charLength": 9, + "snippet": { + "text": "\tconst auto &shopItems = npc->getShopItemVector(playerGUID);\n\tfor (ShopBlock shopBlock : shopItems) {\n\t\tsetField(L, \"id\", shopBlock.itemId);\n\t\tsetField(L, \"name\", shopBlock.itemName);\n\t\tsetField(L, \"subType\", shopBlock.itemSubType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2853be5c1cf5ce077bc860d9b9950fdfa564f43449339dc1f60f3e259273e5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 469, + "startColumn": 26, + "charOffset": 11969, + "charLength": 9, + "snippet": { + "text": "shopBlock" + } + }, + "contextRegion": { + "startLine": 467, + "startColumn": 26, + "charOffset": 11862, + "charLength": 9, + "snippet": { + "text": "\t\tsetField(L, \"id\", shopBlock.itemId);\n\t\tsetField(L, \"name\", shopBlock.itemName);\n\t\tsetField(L, \"subType\", shopBlock.itemSubType);\n\t\tsetField(L, \"buyPrice\", shopBlock.itemBuyPrice);\n\t\tsetField(L, \"sellPrice\", shopBlock.itemSellPrice);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bde217989d462bcb16b637a97ca2a3b5034f03c0f1015433591c5a40919fa1f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 470, + "startColumn": 27, + "charOffset": 12019, + "charLength": 9, + "snippet": { + "text": "shopBlock" + } + }, + "contextRegion": { + "startLine": 468, + "startColumn": 27, + "charOffset": 11901, + "charLength": 9, + "snippet": { + "text": "\t\tsetField(L, \"name\", shopBlock.itemName);\n\t\tsetField(L, \"subType\", shopBlock.itemSubType);\n\t\tsetField(L, \"buyPrice\", shopBlock.itemBuyPrice);\n\t\tsetField(L, \"sellPrice\", shopBlock.itemSellPrice);\n\t\tsetField(L, \"storageKey\", shopBlock.itemStorageKey);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb8052a9fd6011270d4fd50681c86bafc83d867abe6a540f4b38e9179042b154" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 471, + "startColumn": 28, + "charOffset": 12071, + "charLength": 9, + "snippet": { + "text": "shopBlock" + } + }, + "contextRegion": { + "startLine": 469, + "startColumn": 28, + "charOffset": 11944, + "charLength": 9, + "snippet": { + "text": "\t\tsetField(L, \"subType\", shopBlock.itemSubType);\n\t\tsetField(L, \"buyPrice\", shopBlock.itemBuyPrice);\n\t\tsetField(L, \"sellPrice\", shopBlock.itemSellPrice);\n\t\tsetField(L, \"storageKey\", shopBlock.itemStorageKey);\n\t\tsetField(L, \"storageValue\", shopBlock.itemStorageValue);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "484c8d35cf8f3902b83fc4a115ce1a42c7f3a1a3535c298951e77e504339d1d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 472, + "startColumn": 29, + "charOffset": 12125, + "charLength": 9, + "snippet": { + "text": "shopBlock" + } + }, + "contextRegion": { + "startLine": 470, + "startColumn": 29, + "charOffset": 11993, + "charLength": 9, + "snippet": { + "text": "\t\tsetField(L, \"buyPrice\", shopBlock.itemBuyPrice);\n\t\tsetField(L, \"sellPrice\", shopBlock.itemSellPrice);\n\t\tsetField(L, \"storageKey\", shopBlock.itemStorageKey);\n\t\tsetField(L, \"storageValue\", shopBlock.itemStorageValue);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4ca8038a8529fd8b368cfe4cf0b0bbfcb0c7447734155cc1f27eee7067f81cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 473, + "startColumn": 31, + "charOffset": 12182, + "charLength": 9, + "snippet": { + "text": "shopBlock" + } + }, + "contextRegion": { + "startLine": 471, + "startColumn": 31, + "charOffset": 12044, + "charLength": 9, + "snippet": { + "text": "\t\tsetField(L, \"sellPrice\", shopBlock.itemSellPrice);\n\t\tsetField(L, \"storageKey\", shopBlock.itemStorageKey);\n\t\tsetField(L, \"storageValue\", shopBlock.itemStorageValue);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e1343f20e01cbf944b6223010b1cd24c04ac79a35bea6a647dfb088be4db4eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 484, + "startColumn": 12, + "charOffset": 12402, + "charLength": 20, + "snippet": { + "text": "internalMoveCreature" + } + }, + "contextRegion": { + "startLine": 482, + "startColumn": 12, + "charOffset": 12321, + "charLength": 20, + "snippet": { + "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (npc) {\n\t\tg_game().internalMoveCreature(npc, getNumber(L, 2));\n\t}\n\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "772a133e5abefc60d212f05ff26732ac22c597be4a827c22d2e492fd54471af3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 493, + "startColumn": 12, + "charOffset": 12624, + "charLength": 20, + "snippet": { + "text": "internalCreatureTurn" + } + }, + "contextRegion": { + "startLine": 491, + "startColumn": 12, + "charOffset": 12543, + "charLength": 20, + "snippet": { + "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (npc) {\n\t\tg_game().internalCreatureTurn(npc, getNumber(L, 2));\n\t}\n\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea52e363e5d9a527066623f34a5cf08f8b1d04c65a0a3d5e1ef88e11d63cec64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 501, + "startColumn": 6, + "charOffset": 12829, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 499, + "startColumn": 6, + "charOffset": 12743, + "charLength": 1, + "snippet": { + "text": "\t// npc:follow(player)\n\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9424b57799dc89c3f72378c0ac1b841d8b26c66809758d1f48988343948e1a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 507, + "startColumn": 6, + "charOffset": 12922, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 505, + "startColumn": 6, + "charOffset": 12877, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto &player = getPlayer(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db4df0767c99df0d078a25ef066364e7011aec2f61a4b684b296d10262462a41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 508, + "startColumn": 3, + "charOffset": 12935, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 506, + "startColumn": 3, + "charOffset": 12878, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getPlayer(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40b7460a74a293df059d8fb27539f582cd54cbf3d206ed87bc28dfe02a28ee93" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 519, + "startColumn": 6, + "charOffset": 13198, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 517, + "startColumn": 6, + "charOffset": 13119, + "charLength": 1, + "snippet": { + "text": "\t// npc:getId()\n\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c95f9b902440c9b414f6bd14271ff2d51ad59ed98d76fcf5010c858c70fa9902" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 520, + "startColumn": 3, + "charOffset": 13208, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 518, + "startColumn": 3, + "charOffset": 13135, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5622586382e91c392c2493bc611d11f8be4dd4f9167158f3619127cbea0fbbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 525, + "startColumn": 20, + "charOffset": 13317, + "charLength": 3, + "snippet": { + "text": "npc" + } + }, + "contextRegion": { + "startLine": 523, + "startColumn": 20, + "charOffset": 13294, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, npc->getID());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1da85c832b3493686dfdd5d02a2fd1776d2e2272a690b15f61500f8877db89bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'luaNpcSellItem' has cognitive complexity of 58 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 529, + "startColumn": 19, + "charOffset": 13364, + "charLength": 14, + "snippet": { + "text": "luaNpcSellItem" + } + }, + "contextRegion": { + "startLine": 527, + "startColumn": 19, + "charOffset": 13343, + "charLength": 14, + "snippet": { + "text": "}\n\nint NpcFunctions::luaNpcSellItem(lua_State* L) {\n\t// npc:sellItem(player, itemid, amount, subtype, actionid, ignoreCap, inBackpacks)\n\tstd::shared_ptr npc = getUserdataShared(L, 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "adbf0278e7cccb6f57314c0002b509d2bab36ecc89499458bb22fbaf9fbe081c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 532, + "startColumn": 6, + "charOffset": 13642, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 530, + "startColumn": 6, + "charOffset": 13395, + "charLength": 1, + "snippet": { + "text": "\t// npc:sellItem(player, itemid, amount, subtype, actionid, ignoreCap, inBackpacks)\n\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1091f36fe9a8be044ea83fb28528d6c0a7e8fd44d122ab01291c0c0d9740942" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 533, + "startColumn": 3, + "charOffset": 13652, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 531, + "startColumn": 3, + "charOffset": 13579, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "852c8d8ae1abec15c9ed276c6965f474925c1306c11fae04b1d5f9605a1b98fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 539, + "startColumn": 6, + "charOffset": 13793, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 537, + "startColumn": 6, + "charOffset": 13748, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto &player = getPlayer(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f40596a7bd64b71ada6cce8062ef43f7e13f8b69c5900e6526f3514399c41b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 540, + "startColumn": 3, + "charOffset": 13806, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 538, + "startColumn": 3, + "charOffset": 13749, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getPlayer(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "221107ee1f1d259745f1baf4591f76a4c6d21290ad75271a002f29f84fa17200" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 547, + "startColumn": 2, + "charOffset": 13995, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 545, + "startColumn": 2, + "charOffset": 13906, + "charLength": 8, + "snippet": { + "text": "\tuint16_t itemId = getNumber(L, 3);\n\tdouble amount = getNumber(L, 4);\n\tuint16_t subType = getNumber(L, 5, 1);\n\tuint16_t actionId = getNumber(L, 6, 0);\n\tbool ignoreCap = getBoolean(L, 7, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76f510be1affe82409edd2ac20c11359d9eaeda559409aa0472491867955eaea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 547, + "startColumn": 44, + "charOffset": 14037, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 545, + "startColumn": 44, + "charOffset": 13906, + "charLength": 1, + "snippet": { + "text": "\tuint16_t itemId = getNumber(L, 3);\n\tdouble amount = getNumber(L, 4);\n\tuint16_t subType = getNumber(L, 5, 1);\n\tuint16_t actionId = getNumber(L, 6, 0);\n\tbool ignoreCap = getBoolean(L, 7, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ae16cbe16450776f0fd0e6d67fe95c855d45a929ac3ea3caafb4f4572d37287" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 548, + "startColumn": 2, + "charOffset": 14045, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 546, + "startColumn": 2, + "charOffset": 13952, + "charLength": 8, + "snippet": { + "text": "\tdouble amount = getNumber(L, 4);\n\tuint16_t subType = getNumber(L, 5, 1);\n\tuint16_t actionId = getNumber(L, 6, 0);\n\tbool ignoreCap = getBoolean(L, 7, false);\n\tbool inBackpacks = getBoolean(L, 8, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5947c5a2c07a47fdf35df5ea4fb9384ba197e7735b458223d1fffbdbd2abd505" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 548, + "startColumn": 45, + "charOffset": 14088, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 546, + "startColumn": 45, + "charOffset": 13952, + "charLength": 1, + "snippet": { + "text": "\tdouble amount = getNumber(L, 4);\n\tuint16_t subType = getNumber(L, 5, 1);\n\tuint16_t actionId = getNumber(L, 6, 0);\n\tbool ignoreCap = getBoolean(L, 7, false);\n\tbool inBackpacks = getBoolean(L, 8, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4a7e7113f91a0e5b9a4ceb9647b121ea8de5109dcd32fb4482aee20447599d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 549, + "startColumn": 33, + "charOffset": 14127, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 547, + "startColumn": 33, + "charOffset": 13994, + "charLength": 1, + "snippet": { + "text": "\tuint16_t subType = getNumber(L, 5, 1);\n\tuint16_t actionId = getNumber(L, 6, 0);\n\tbool ignoreCap = getBoolean(L, 7, false);\n\tbool inBackpacks = getBoolean(L, 8, false);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12d3532b7a414ed06d30d211ab68b9fa6f5ef60834cf91c7f329330c3eae3717" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 550, + "startColumn": 35, + "charOffset": 14172, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 548, + "startColumn": 35, + "charOffset": 14044, + "charLength": 1, + "snippet": { + "text": "\tuint16_t actionId = getNumber(L, 6, 0);\n\tbool ignoreCap = getBoolean(L, 7, false);\n\tbool inBackpacks = getBoolean(L, 8, false);\n\n\tconst ItemType &it = Item::items[itemId];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17264b122c8f2f45b29365a19bd885865353cecdafee653b234c43c99ac58187" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 558, + "startColumn": 30, + "charOffset": 14316, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 556, + "startColumn": 30, + "charOffset": 14283, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tuint32_t shoppingBagPrice = 20;\n\tdouble shoppingBagSlots = 20;\n\tif (std::shared_ptr tile = ignoreCap ? player->getTile() : nullptr; tile) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55599b0b912a5f57227f16b585bb9ab2a49a81db97b91395494426237acce99d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 559, + "startColumn": 28, + "charOffset": 14347, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 557, + "startColumn": 28, + "charOffset": 14286, + "charLength": 2, + "snippet": { + "text": "\n\tuint32_t shoppingBagPrice = 20;\n\tdouble shoppingBagSlots = 20;\n\tif (std::shared_ptr tile = ignoreCap ? player->getTile() : nullptr; tile) {\n\t\tdouble slotsNedeed = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c02b1af7a78eddd96af8d2049a9e5f1f59d0effeee85c68de4548070ce506ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 559, + "startColumn": 28, + "charOffset": 14347, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 557, + "startColumn": 28, + "charOffset": 14286, + "charLength": 2, + "snippet": { + "text": "\n\tuint32_t shoppingBagPrice = 20;\n\tdouble shoppingBagSlots = 20;\n\tif (std::shared_ptr tile = ignoreCap ? player->getTile() : nullptr; tile) {\n\t\tdouble slotsNedeed = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "136482c0aa62e59074cfdb6857a7a306198b5bb40ae9b1a51a613f4124e3e5a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 561, + "startColumn": 24, + "charOffset": 14457, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 559, + "startColumn": 24, + "charOffset": 14320, + "charLength": 1, + "snippet": { + "text": "\tdouble shoppingBagSlots = 20;\n\tif (std::shared_ptr tile = ignoreCap ? player->getTile() : nullptr; tile) {\n\t\tdouble slotsNedeed = 0;\n\t\tif (it.stackable) {\n\t\t\tslotsNedeed = inBackpacks ? std::ceil(std::ceil(amount / it.stackSize) / shoppingBagSlots) : std::ceil(amount / it.stackSize);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73f59a7008e2a8b7f7f4653333735c5546ffef11942354d43b9ae1eeb085fd79" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 563, + "startColumn": 61, + "charOffset": 14542, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 561, + "startColumn": 61, + "charOffset": 14434, + "charLength": 2, + "snippet": { + "text": "\t\tdouble slotsNedeed = 0;\n\t\tif (it.stackable) {\n\t\t\tslotsNedeed = inBackpacks ? std::ceil(std::ceil(amount / it.stackSize) / shoppingBagSlots) : std::ceil(amount / it.stackSize);\n\t\t} else {\n\t\t\tslotsNedeed = inBackpacks ? std::ceil(amount / shoppingBagSlots) : amount;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2edd7795c193a0b200212c9079bf9d7309fe1b7a91e68e18f730420b0ef4179d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 563, + "startColumn": 116, + "charOffset": 14597, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 561, + "startColumn": 116, + "charOffset": 14434, + "charLength": 2, + "snippet": { + "text": "\t\tdouble slotsNedeed = 0;\n\t\tif (it.stackable) {\n\t\t\tslotsNedeed = inBackpacks ? std::ceil(std::ceil(amount / it.stackSize) / shoppingBagSlots) : std::ceil(amount / it.stackSize);\n\t\t} else {\n\t\t\tslotsNedeed = inBackpacks ? std::ceil(amount / shoppingBagSlots) : amount;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1da85c832b3493686dfdd5d02a2fd1776d2e2272a690b15f61500f8877db89bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 568, + "startColumn": 74, + "charOffset": 14779, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 566, + "startColumn": 74, + "charOffset": 14701, + "charLength": 6, + "snippet": { + "text": "\t\t}\n\n\t\tif ((static_cast(tile->getItemList()->size()) + (slotsNedeed - player->getFreeBackpackSlots())) > 30) {\n\t\t\tpushBoolean(L, false);\n\t\t\tplayer->sendCancelMessage(RETURNVALUE_NOTENOUGHROOM);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae432448848d65cefed1ea41622b4d97868b0f8b2c4ce21d40132313abc7240c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 568, + "startColumn": 109, + "charOffset": 14814, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 566, + "startColumn": 109, + "charOffset": 14701, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif ((static_cast(tile->getItemList()->size()) + (slotsNedeed - player->getFreeBackpackSlots())) > 30) {\n\t\t\tpushBoolean(L, false);\n\t\t\tplayer->sendCancelMessage(RETURNVALUE_NOTENOUGHROOM);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c36abe1658cbbb3598e02dac011a25cd9aa976ba5f262ef778c9c8cb735978a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 568, + "startColumn": 109, + "charOffset": 14814, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 566, + "startColumn": 109, + "charOffset": 14701, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif ((static_cast(tile->getItemList()->size()) + (slotsNedeed - player->getFreeBackpackSlots())) > 30) {\n\t\t\tpushBoolean(L, false);\n\t\t\tplayer->sendCancelMessage(RETURNVALUE_NOTENOUGHROOM);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ef142b4c2242392527677efdeca6575f645fcea7eda34cf649e3f43bbc820ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 577, + "startColumn": 2, + "charOffset": 15022, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 575, + "startColumn": 2, + "charOffset": 14924, + "charLength": 3, + "snippet": { + "text": "\tuint64_t pricePerUnit = 0;\n\tconst auto &shopVector = npc->getShopItemVector(player->getGUID());\n\tfor (ShopBlock shopBlock : shopVector) {\n\t\tif (itemId == shopBlock.itemId && shopBlock.itemBuyPrice != 0) {\n\t\t\tpricePerUnit = shopBlock.itemBuyPrice;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bcd67937f7ca27b2d1d0e6f2b9300d9f832e998ec24032c825c8fc9bd832f40b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 577, + "startColumn": 17, + "charOffset": 15037, + "charLength": 9, + "snippet": { + "text": "shopBlock" + } + }, + "contextRegion": { + "startLine": 575, + "startColumn": 17, + "charOffset": 14924, + "charLength": 9, + "snippet": { + "text": "\tuint64_t pricePerUnit = 0;\n\tconst auto &shopVector = npc->getShopItemVector(player->getGUID());\n\tfor (ShopBlock shopBlock : shopVector) {\n\t\tif (itemId == shopBlock.itemId && shopBlock.itemBuyPrice != 0) {\n\t\t\tpricePerUnit = shopBlock.itemBuyPrice;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69e05910f8ad28a8878a53926dbad286ef383ba5a58d6d6c7fd172e2b278e06f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 584, + "startColumn": 92, + "charOffset": 15281, + "charLength": 6, + "snippet": { + "text": "amount" + } + }, + "contextRegion": { + "startLine": 582, + "startColumn": 92, + "charOffset": 15186, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tconst auto &[_, itemsPurchased, backpacksPurchased] = g_game().createItem(player, itemId, amount, subType, actionId, ignoreCap, inBackpacks ? ITEM_SHOPPING_BAG : 0);\n\n\tstd::stringstream ss;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac2017566aef1ad1de5ec29ba8f2a53bae57f7deda10e7b3015425db5865ebda" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 584, + "startColumn": 92, + "charOffset": 15281, + "charLength": 6, + "snippet": { + "text": "amount" + } + }, + "contextRegion": { + "startLine": 582, + "startColumn": 92, + "charOffset": 15186, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tconst auto &[_, itemsPurchased, backpacksPurchased] = g_game().createItem(player, itemId, amount, subType, actionId, ignoreCap, inBackpacks ? ITEM_SHOPPING_BAG : 0);\n\n\tstd::stringstream ss;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a8d76adfdc7dffcb412dd05fb4bf6600d86b9b1df3b9899c7dc9b1a86b7acf0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'uint64_t' (aka 'unsigned long') of a multiplication performed in type 'unsigned int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 588, + "startColumn": 26, + "charOffset": 15458, + "charLength": 18, + "snippet": { + "text": "backpacksPurchased" + } + }, + "contextRegion": { + "startLine": 586, + "startColumn": 26, + "charOffset": 15358, + "charLength": 18, + "snippet": { + "text": "\tstd::stringstream ss;\n\tuint64_t itemCost = itemsPurchased * pricePerUnit;\n\tuint64_t backpackCost = backpacksPurchased * shoppingBagPrice;\n\tif (npc->getCurrency() == ITEM_GOLD_COIN) {\n\t\tif (!g_game().removeMoney(player, itemCost + backpackCost, 0, true)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae38cf7c05d0eefbb8b0e083a46aee40a76b85b784aaaa41f28a17209d29cbe2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 614, + "startColumn": 109, + "charOffset": 16799, + "charLength": 8, + "snippet": { + "text": "itemCost" + } + }, + "contextRegion": { + "startLine": 612, + "startColumn": 109, + "charOffset": 16677, + "charLength": 8, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\tif (!g_game().removeMoney(player, backpackCost, 0, true) || !player->removeItemOfType(npc->getCurrency(), itemCost, -1, false)) {\n\t\t\tg_logger().error(\"[NpcFunctions::luaNpcSellItem (removeItemOfType)] - Player {} have a problem for buy item {} on shop for npc {}\", player->getName(), itemId, npc->getName());\n\t\t\tg_logger().debug(\"[Information] Player {} buyed item {} on shop for npc {}, at position {}\", player->getName(), itemId, npc->getName(), player->getPosition().toString());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "437aa42e65249019e5e9c0e2f08d3f92b109130b5a25ff6add11065c9573f551" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 650, + "startColumn": 6, + "charOffset": 18168, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 648, + "startColumn": 6, + "charOffset": 18078, + "charLength": 1, + "snippet": { + "text": "\t// npc:getDistanceTo(uid)\n\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b100ce54394f9274ccdd54904e101bd57ea819cf83a8e8b8c78d90e8bb4c38d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 651, + "startColumn": 3, + "charOffset": 18178, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 649, + "startColumn": 3, + "charOffset": 18105, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\n\tif (!npc) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a95d291a1a23abf23ce0ba763bc488e6e11b86e1ee0ad597b1e0b45f3ab1c86e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 658, + "startColumn": 6, + "charOffset": 18418, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 656, + "startColumn": 6, + "charOffset": 18275, + "charLength": 1, + "snippet": { + "text": "\tstd::shared_ptr thing = getScriptEnv()->getThingByUID(getNumber(L, -1));\n\tpushBoolean(L, thing && thing->isPushable());\n\tif (!thing) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_THING_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6d4417150bebdbc7809a1aa4d40e9b4f5618fb77188f869272c7c1333608a69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 659, + "startColumn": 3, + "charOffset": 18430, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 657, + "startColumn": 3, + "charOffset": 18366, + "charLength": 15, + "snippet": { + "text": "\tpushBoolean(L, thing && thing->isPushable());\n\tif (!thing) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_THING_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9e5a76eb1c2d42e646385a3ca26306f40748c1fc1a4ab217bfe5a5d85ba89f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 667, + "startColumn": 21, + "charOffset": 18669, + "charLength": 1, + "snippet": { + "text": "-" + } + }, + "contextRegion": { + "startLine": 665, + "startColumn": 21, + "charOffset": 18572, + "charLength": 1, + "snippet": { + "text": "\tconst Position &npcPos = npc->getPosition();\n\tif (npcPos.z != thingPos.z) {\n\t\tlua_pushnumber(L, -1);\n\t} else {\n\t\tint32_t dist = std::max(Position::getDistanceX(npcPos, thingPos), Position::getDistanceY(npcPos, thingPos));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1231dbf11c62250d332046fc030aacffa4b928e60292e04bab82fd2dd00e2841" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_functions.cpp" + }, + "region": { + "startLine": 670, + "startColumn": 21, + "charOffset": 18824, + "charLength": 4, + "snippet": { + "text": "dist" + } + }, + "contextRegion": { + "startLine": 668, + "startColumn": 21, + "charOffset": 18674, + "charLength": 4, + "snippet": { + "text": "\t} else {\n\t\tint32_t dist = std::max(Position::getDistanceX(npcPos, thingPos), Position::getDistanceY(npcPos, thingPos));\n\t\tlua_pushnumber(L, dist);\n\t}\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f38001a6e2d70e3d350fb58d07600cb4ab16f09f26fadd8393cd17b7325b2061" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'createNpcTypeShopLuaTable' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 17, + "startColumn": 24, + "charOffset": 572, + "charLength": 25, + "snippet": { + "text": "createNpcTypeShopLuaTable" + } + }, + "contextRegion": { + "startLine": 15, + "startColumn": 24, + "charOffset": 523, + "charLength": 25, + "snippet": { + "text": "#include \"game/game.hpp\"\n\nvoid NpcTypeFunctions::createNpcTypeShopLuaTable(lua_State* L, const std::vector &shopVector) {\n\tlua_createtable(L, shopVector.size(), 0);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45070401c5c8eb09681abb413f81073f035455237c2f134017de848b4b5941c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 18, + "startColumn": 21, + "charOffset": 676, + "charLength": 10, + "snippet": { + "text": "shopVector" + } + }, + "contextRegion": { + "startLine": 16, + "startColumn": 21, + "charOffset": 548, + "charLength": 10, + "snippet": { + "text": "\nvoid NpcTypeFunctions::createNpcTypeShopLuaTable(lua_State* L, const std::vector &shopVector) {\n\tlua_createtable(L, shopVector.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1414a14fcd5907259af1f8f9a50296be5d8bf3f75a73260834633904fead5fe9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 18, + "startColumn": 21, + "charOffset": 676, + "charLength": 10, + "snippet": { + "text": "shopVector" + } + }, + "contextRegion": { + "startLine": 16, + "startColumn": 21, + "charOffset": 548, + "charLength": 10, + "snippet": { + "text": "\nvoid NpcTypeFunctions::createNpcTypeShopLuaTable(lua_State* L, const std::vector &shopVector) {\n\tlua_createtable(L, shopVector.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26d84aeff62c556d13b7aa4ce6b2894e7fc2fdc114a08e757123de5a9fef4634" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 21, + "startColumn": 2, + "charOffset": 717, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 19, + "startColumn": 2, + "charOffset": 699, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (const auto &shopBlock : shopVector) {\n\t\tlua_createtable(L, 0, 5);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2bd07b206d86fc161d629520e5bbae6119a75db8b7d1f5e5b05bd79984b10c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 22, + "startColumn": 25, + "charOffset": 784, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 25, + "charOffset": 700, + "charLength": 1, + "snippet": { + "text": "\tint index = 0;\n\tfor (const auto &shopBlock : shopVector) {\n\t\tlua_createtable(L, 0, 5);\n\n\t\tsetField(L, \"itemId\", shopBlock.itemId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f97ada94b13fb2efe927b41a433f0a6be8b2b40a83b3d0fefc4bd11672f6c4d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 24, + "startColumn": 25, + "charOffset": 813, + "charLength": 9, + "snippet": { + "text": "shopBlock" + } + }, + "contextRegion": { + "startLine": 22, + "startColumn": 25, + "charOffset": 760, + "charLength": 9, + "snippet": { + "text": "\t\tlua_createtable(L, 0, 5);\n\n\t\tsetField(L, \"itemId\", shopBlock.itemId);\n\t\tsetField(L, \"itemName\", shopBlock.itemName);\n\t\tsetField(L, \"itemBuyPrice\", shopBlock.itemBuyPrice);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49389aec5c7061db57c37ca0fb49d01230677eab03008900539ec9723cdef224" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 31, + "charOffset": 909, + "charLength": 9, + "snippet": { + "text": "shopBlock" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 31, + "charOffset": 789, + "charLength": 9, + "snippet": { + "text": "\t\tsetField(L, \"itemId\", shopBlock.itemId);\n\t\tsetField(L, \"itemName\", shopBlock.itemName);\n\t\tsetField(L, \"itemBuyPrice\", shopBlock.itemBuyPrice);\n\t\tsetField(L, \"itemSellPrice\", shopBlock.itemSellPrice);\n\t\tsetField(L, \"itemStorageKey\", shopBlock.itemStorageKey);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9085e1e79db72c35b5e07c593c8d5b4245f14cffa46c9f93efd7188047b83c7d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 32, + "charOffset": 965, + "charLength": 9, + "snippet": { + "text": "shopBlock" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 32, + "charOffset": 832, + "charLength": 9, + "snippet": { + "text": "\t\tsetField(L, \"itemName\", shopBlock.itemName);\n\t\tsetField(L, \"itemBuyPrice\", shopBlock.itemBuyPrice);\n\t\tsetField(L, \"itemSellPrice\", shopBlock.itemSellPrice);\n\t\tsetField(L, \"itemStorageKey\", shopBlock.itemStorageKey);\n\t\tsetField(L, \"itemStorageValue\", shopBlock.itemStorageValue);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98da1ed10f3b97892135cdff24a1968c37e170ec9806e1e010e9c96e2269812f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 33, + "charOffset": 1023, + "charLength": 9, + "snippet": { + "text": "shopBlock" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 33, + "charOffset": 879, + "charLength": 9, + "snippet": { + "text": "\t\tsetField(L, \"itemBuyPrice\", shopBlock.itemBuyPrice);\n\t\tsetField(L, \"itemSellPrice\", shopBlock.itemSellPrice);\n\t\tsetField(L, \"itemStorageKey\", shopBlock.itemStorageKey);\n\t\tsetField(L, \"itemStorageValue\", shopBlock.itemStorageValue);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28693c81fcb14e6b380237b28f0860b0e7e8b86f7ce1cdcf5f81d9f6ca7560b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 29, + "startColumn": 35, + "charOffset": 1084, + "charLength": 9, + "snippet": { + "text": "shopBlock" + } + }, + "contextRegion": { + "startLine": 27, + "startColumn": 35, + "charOffset": 934, + "charLength": 9, + "snippet": { + "text": "\t\tsetField(L, \"itemSellPrice\", shopBlock.itemSellPrice);\n\t\tsetField(L, \"itemStorageKey\", shopBlock.itemStorageKey);\n\t\tsetField(L, \"itemStorageValue\", shopBlock.itemStorageValue);\n\n\t\tcreateNpcTypeShopLuaTable(L, shopBlock.childShop);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24801dad23597463318380c8a983c11697a9c0a3f9e41a639f8e942c510340a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 159, + "startColumn": 22, + "charOffset": 4398, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 157, + "startColumn": 22, + "charOffset": 4333, + "charLength": 7, + "snippet": { + "text": "\tif (npcType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, npcType->info.health);\n\t\t} else {\n\t\t\tnpcType->info.health = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1dabd2261fdd2b4308ece27e8aa6c582799e1b539fedd45e9d7a8170c72be331" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 175, + "startColumn": 22, + "charOffset": 4798, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 173, + "startColumn": 22, + "charOffset": 4733, + "charLength": 7, + "snippet": { + "text": "\tif (npcType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, npcType->info.healthMax);\n\t\t} else {\n\t\t\tnpcType->info.healthMax = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60bb4c539707617271eaeab2a460dfd827a1350639496618ef511ee843c65e8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 189, + "startColumn": 6, + "charOffset": 5116, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 187, + "startColumn": 6, + "charOffset": 5024, + "charLength": 1, + "snippet": { + "text": "\t// npcType:addShopItem(shop)\n\tconst auto &npcType = getUserdataShared(L, 1);\n\tif (!npcType) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9978c7be4d773b0a836ebba2e853316c2892786f6abb28cdebd89d7b525b3026" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 212, + "startColumn": 34, + "charOffset": 5723, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 210, + "startColumn": 34, + "charOffset": 5574, + "charLength": 1, + "snippet": { + "text": "\t\tnpcType->info.yellSpeedTicks = getNumber(L, 3);\n\t\tnpcType->info.yellChance = getNumber(L, 4);\n\t\tvoice.yellText = getBoolean(L, 5);\n\t\tnpcType->info.voiceVector.push_back(voice);\n\t\tpushBoolean(L, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67623474923fb71edd0e1234d74c8a759fc00c4c6ea035b13e5039466bfe6a46" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 224, + "startColumn": 6, + "charOffset": 5986, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 222, + "startColumn": 6, + "charOffset": 5900, + "charLength": 1, + "snippet": { + "text": "\t// npcType:getVoices()\n\tconst auto &npcType = getUserdataShared(L, 1);\n\tif (!npcType) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b1d480a041e09f9edaa026488d3a7df24a2d872e292dbe66a7c13beefecc9a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 230, + "startColumn": 21, + "charOffset": 6068, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 228, + "startColumn": 21, + "charOffset": 6031, + "charLength": 7, + "snippet": { + "text": "\n\tint index = 0;\n\tlua_createtable(L, npcType->info.voiceVector.size(), 0);\n\tfor (const auto &voiceBlock : npcType->info.voiceVector) {\n\t\tlua_createtable(L, 0, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2cb713c263cf5b46127047415fd51425fcf8ec5000a9fe2a1802420084e2e0b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 230, + "startColumn": 21, + "charOffset": 6068, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 228, + "startColumn": 21, + "charOffset": 6031, + "charLength": 7, + "snippet": { + "text": "\n\tint index = 0;\n\tlua_createtable(L, npcType->info.voiceVector.size(), 0);\n\tfor (const auto &voiceBlock : npcType->info.voiceVector) {\n\t\tlua_createtable(L, 0, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f07be1cc43eabf9417fab458d0e7ebbc7af42b70ea22a3ddf496be0611a38ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 231, + "startColumn": 2, + "charOffset": 6107, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 229, + "startColumn": 2, + "charOffset": 6032, + "charLength": 3, + "snippet": { + "text": "\tint index = 0;\n\tlua_createtable(L, npcType->info.voiceVector.size(), 0);\n\tfor (const auto &voiceBlock : npcType->info.voiceVector) {\n\t\tlua_createtable(L, 0, 2);\n\t\tsetField(L, \"text\", voiceBlock.text);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b65ba7053f44bcdde9e9c78df388c9f3f8ad96ae187169d1b589d4913a202cfb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 234, + "startColumn": 27, + "charOffset": 6260, + "charLength": 10, + "snippet": { + "text": "voiceBlock" + } + }, + "contextRegion": { + "startLine": 232, + "startColumn": 27, + "charOffset": 6166, + "charLength": 10, + "snippet": { + "text": "\t\tlua_createtable(L, 0, 2);\n\t\tsetField(L, \"text\", voiceBlock.text);\n\t\tsetField(L, \"yellText\", voiceBlock.yellText);\n\t\tlua_rawseti(L, -2, ++index);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bb5605818606fc21d63ffb5b95ecac55fe343e741d56f47ba883519c30cfb81" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 234, + "startColumn": 27, + "charOffset": 6260, + "charLength": 10, + "snippet": { + "text": "voiceBlock" + } + }, + "contextRegion": { + "startLine": 232, + "startColumn": 27, + "charOffset": 6166, + "charLength": 10, + "snippet": { + "text": "\t\tlua_createtable(L, 0, 2);\n\t\tsetField(L, \"text\", voiceBlock.text);\n\t\tsetField(L, \"yellText\", voiceBlock.yellText);\n\t\tlua_rawseti(L, -2, ++index);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3ab5377bd3966870878beb8c586797f99895d72da66f5b093651af38680f1f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 243, + "startColumn": 6, + "charOffset": 6490, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 6, + "charOffset": 6396, + "charLength": 1, + "snippet": { + "text": "\t// npcType:getCreatureEvents()\n\tconst auto &npcType = getUserdataShared(L, 1);\n\tif (!npcType) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "513a0ca6fc24b9f5d769e901b4b24216e03d8028339c7d7de2184297db616aa5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 249, + "startColumn": 21, + "charOffset": 6572, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 247, + "startColumn": 21, + "charOffset": 6535, + "charLength": 7, + "snippet": { + "text": "\n\tint index = 0;\n\tlua_createtable(L, npcType->info.scripts.size(), 0);\n\tfor (const std::string &creatureEvent : npcType->info.scripts) {\n\t\tpushString(L, creatureEvent);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f46c8e5862d8e29d04e51aa9868954a0bf21ddbf912b05099842489a70b4974" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 249, + "startColumn": 21, + "charOffset": 6572, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 247, + "startColumn": 21, + "charOffset": 6535, + "charLength": 7, + "snippet": { + "text": "\n\tint index = 0;\n\tlua_createtable(L, npcType->info.scripts.size(), 0);\n\tfor (const std::string &creatureEvent : npcType->info.scripts) {\n\t\tpushString(L, creatureEvent);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51f0bb88225a3226cc3fa24e45c515c2e25bc47e683ad7a3740b7c151b422dbf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 250, + "startColumn": 2, + "charOffset": 6607, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 248, + "startColumn": 2, + "charOffset": 6536, + "charLength": 3, + "snippet": { + "text": "\tint index = 0;\n\tlua_createtable(L, npcType->info.scripts.size(), 0);\n\tfor (const std::string &creatureEvent : npcType->info.scripts) {\n\t\tpushString(L, creatureEvent);\n\t\tlua_rawseti(L, -2, ++index);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a98d5772ccdd9317ae6c8015001f73f2165a17491fe7fcf79981be798e3e4471" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 261, + "startColumn": 25, + "charOffset": 6943, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 259, + "startColumn": 25, + "charOffset": 6846, + "charLength": 6, + "snippet": { + "text": "\tconst auto &npcType = getUserdataShared(L, 1);\n\tif (npcType) {\n\t\tnpcType->info.scripts.insert(getString(L, 2));\n\t\tpushBoolean(L, true);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f5cd97abab783dd1a82be50c8ca34688922bfcefa5a969bade52c8c991c4f0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 330, + "startColumn": 22, + "charOffset": 8868, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 328, + "startColumn": 22, + "charOffset": 8803, + "charLength": 7, + "snippet": { + "text": "\tif (npcType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, npcType->info.baseSpeed);\n\t\t} else {\n\t\t\tnpcType->info.baseSpeed = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e14338f0dcf9ab85b5d1a6068165827f57d8a6c8febae75a6a37efea7d11b4fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 346, + "startColumn": 22, + "charOffset": 9286, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 344, + "startColumn": 22, + "charOffset": 9221, + "charLength": 7, + "snippet": { + "text": "\tif (npcType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, npcType->info.walkInterval);\n\t\t} else {\n\t\t\tnpcType->info.walkInterval = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4c3b11374ddbe52b2da87db3f011e5839fb47a8369b37630981300b8220ed30" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 349, + "startColumn": 23, + "charOffset": 9407, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 347, + "startColumn": 23, + "charOffset": 9315, + "charLength": 4, + "snippet": { + "text": "\t\t} else {\n\t\t\tnpcType->info.walkInterval = getNumber(L, 2);\n\t\t\tlua_pushboolean(L, true);\n\t\t}\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d35f5e3ff54556a4e0907a36b269abbfec7317cded5561916df6f5804f93f2ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 362, + "startColumn": 22, + "charOffset": 9702, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 360, + "startColumn": 22, + "charOffset": 9637, + "charLength": 7, + "snippet": { + "text": "\tif (npcType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, npcType->info.walkRadius);\n\t\t} else {\n\t\t\tnpcType->info.walkRadius = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a662abd7aba893af34eb1813e91ff2032fdd1077ca492d0ec8683a43aaf2e8d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 365, + "startColumn": 23, + "charOffset": 9818, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 363, + "startColumn": 23, + "charOffset": 9729, + "charLength": 4, + "snippet": { + "text": "\t\t} else {\n\t\t\tnpcType->info.walkRadius = getNumber(L, 2);\n\t\t\tlua_pushboolean(L, true);\n\t\t}\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f36d49ec43b09f11300ade2e99602c621ba3551c5ec77edc9ed797a34f097c10" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 376, + "startColumn": 6, + "charOffset": 10048, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 374, + "startColumn": 6, + "charOffset": 9928, + "charLength": 1, + "snippet": { + "text": "\t// get: npcType:light() set: npcType:light(color, level)\n\tconst auto &npcType = getUserdataShared(L, 1);\n\tif (!npcType) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc62e3d7316b1947c09c38d62cf31b229a5cf852d0f3e30eb3df111464f4b41f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 382, + "startColumn": 21, + "charOffset": 10141, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 380, + "startColumn": 21, + "charOffset": 10093, + "charLength": 7, + "snippet": { + "text": "\n\tif (lua_gettop(L) == 1) {\n\t\tlua_pushnumber(L, npcType->info.light.level);\n\t\tlua_pushnumber(L, npcType->info.light.color);\n\t\treturn 2;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9518fcce367cf25a45dceafd2bb8abab4f33dc3a4a88aa7834f476a2d3d962a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 383, + "startColumn": 21, + "charOffset": 10189, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 381, + "startColumn": 21, + "charOffset": 10094, + "charLength": 7, + "snippet": { + "text": "\tif (lua_gettop(L) == 1) {\n\t\tlua_pushnumber(L, npcType->info.light.level);\n\t\tlua_pushnumber(L, npcType->info.light.color);\n\t\treturn 2;\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a90954e9c2881524b37c7efb132dfdbb69b21c95bd1ea4d251bf6a62ca493b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 385, + "startColumn": 4, + "charOffset": 10232, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 383, + "startColumn": 4, + "charOffset": 10169, + "charLength": 4, + "snippet": { + "text": "\t\tlua_pushnumber(L, npcType->info.light.color);\n\t\treturn 2;\n\t} else {\n\t\tnpcType->info.light.color = getNumber(L, 2);\n\t\tnpcType->info.light.level = getNumber(L, 3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c16b8620309db6511cec5734ee33a54be41aa68912b898af172699444124b9c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 399, + "startColumn": 23, + "charOffset": 10665, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 397, + "startColumn": 23, + "charOffset": 10586, + "charLength": 7, + "snippet": { + "text": "\t\tif (lua_gettop(L) == 1) {\n\t\t\tif (lua_gettop(L) == 1) {\n\t\t\t\tlua_pushnumber(L, npcType->info.yellChance);\n\t\t\t} else {\n\t\t\t\tnpcType->info.yellChance = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22681ee259860cca70501dbc7849d30b941e242d6d8c145b7451aebc2e6c2f78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 419, + "startColumn": 22, + "charOffset": 11188, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 417, + "startColumn": 22, + "charOffset": 11123, + "charLength": 7, + "snippet": { + "text": "\tif (npcType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, npcType->info.yellSpeedTicks);\n\t\t} else {\n\t\t\tnpcType->info.yellSpeedTicks = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "446e18360c7b66b7b8b234f77a054666c07164d703fad5ca626403bcab790b44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 439, + "startColumn": 22, + "charOffset": 11610, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 437, + "startColumn": 22, + "charOffset": 11545, + "charLength": 7, + "snippet": { + "text": "\tif (npcType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, npcType->info.respawnType.period);\n\t\t} else {\n\t\t\tnpcType->info.respawnType.period = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "923f91b3d30a35694eb036ecb95175f7d3d591bd94edc7610ac7d72820aab722" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 455, + "startColumn": 22, + "charOffset": 12036, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 453, + "startColumn": 22, + "charOffset": 11971, + "charLength": 7, + "snippet": { + "text": "\tif (npcType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, npcType->info.respawnType.underground);\n\t\t} else {\n\t\t\tnpcType->info.respawnType.underground = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61f8f7b6f53f0c80269649a751b3bfc3b2b3256915f6fa214d5b9255f327c732" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 455, + "startColumn": 22, + "charOffset": 12036, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 453, + "startColumn": 22, + "charOffset": 11971, + "charLength": 7, + "snippet": { + "text": "\tif (npcType) {\n\t\tif (lua_gettop(L) == 1) {\n\t\t\tlua_pushnumber(L, npcType->info.respawnType.underground);\n\t\t} else {\n\t\t\tnpcType->info.respawnType.underground = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b4633430d5808df6466f8277b04730042bdbbe65e71ac6ab8638f6d1a136aaf8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'typename std::enable_if::value, RespawnPeriod_t>::type' (aka 'RespawnPeriod_t') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 457, + "startColumn": 44, + "charOffset": 12130, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 455, + "startColumn": 44, + "charOffset": 12015, + "charLength": 9, + "snippet": { + "text": "\t\t\tlua_pushnumber(L, npcType->info.respawnType.underground);\n\t\t} else {\n\t\t\tnpcType->info.respawnType.underground = getNumber(L, 2);\n\t\t\tpushBoolean(L, true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f0aef1f99e1da50c717a29dd0ac1b5f3602a145003c7757bf732ac0a7904752" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 470, + "startColumn": 6, + "charOffset": 12442, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 468, + "startColumn": 6, + "charOffset": 12332, + "charLength": 1, + "snippet": { + "text": "\t// set = npcType:speechBubble(newSpeechBubble)\n\tconst auto &npcType = getUserdataShared(L, 1);\n\tif (!npcType) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_TYPE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0213961f829d84f592cea8304dcfd7457275faecb381062cf50b07e8cc9be610" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 471, + "startColumn": 3, + "charOffset": 12456, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 469, + "startColumn": 3, + "charOffset": 12380, + "charLength": 15, + "snippet": { + "text": "\tconst auto &npcType = getUserdataShared(L, 1);\n\tif (!npcType) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_TYPE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d49d90fd9db7cfce81b74b16b2042180bdef9699fcc490bb57c416224a7b644b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 477, + "startColumn": 21, + "charOffset": 12605, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 475, + "startColumn": 21, + "charOffset": 12557, + "charLength": 7, + "snippet": { + "text": "\n\tif (lua_gettop(L) == 1) {\n\t\tlua_pushnumber(L, npcType->info.speechBubble);\n\t} else {\n\t\tnpcType->info.speechBubble = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0091d72ac17745c68a0da30f96e413010f95c9e0e154609e22555b768ec67923" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 489, + "startColumn": 6, + "charOffset": 12930, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 487, + "startColumn": 6, + "charOffset": 12828, + "charLength": 1, + "snippet": { + "text": "\t// set = npcType:currency(newCurrency)\n\tconst auto &npcType = getUserdataShared(L, 1);\n\tif (!npcType) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_TYPE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe017931d85725a9c7514ef1a1d5aa4c8f5e3e345b96ea0e1aa87ce90022b7bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 490, + "startColumn": 3, + "charOffset": 12944, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 488, + "startColumn": 3, + "charOffset": 12868, + "charLength": 15, + "snippet": { + "text": "\tconst auto &npcType = getUserdataShared(L, 1);\n\tif (!npcType) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_TYPE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ea7f30d5de74099356ac2a2f7f9054124cf7214e942adbcfafaaa339c2d9fff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 496, + "startColumn": 21, + "charOffset": 13093, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 494, + "startColumn": 21, + "charOffset": 13045, + "charLength": 7, + "snippet": { + "text": "\n\tif (lua_gettop(L) == 1) {\n\t\tlua_pushnumber(L, npcType->info.currencyId);\n\t} else {\n\t\tnpcType->info.currencyId = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56255bd73d7575b6ad0d1bdfa53e52db8aaf792c863b4229173b299f5a6e9dc6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 507, + "startColumn": 6, + "charOffset": 13413, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 505, + "startColumn": 6, + "charOffset": 13287, + "charLength": 1, + "snippet": { + "text": "\t// get: npcType:soundChance() set: npcType:soundChance(chance)\n\tconst auto &npcType = getUserdataShared(L, 1);\n\tif (!npcType) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_TYPE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ddcc95aeb042554bbcf417ea918475c8c8e0dfdcd209d1c6e8a8540f0936273" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 508, + "startColumn": 3, + "charOffset": 13427, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 506, + "startColumn": 3, + "charOffset": 13351, + "charLength": 15, + "snippet": { + "text": "\tconst auto &npcType = getUserdataShared(L, 1);\n\tif (!npcType) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_TYPE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e6728af0f37e0b7320034425cce08d8bb89ea7df2fdbee8d4ba93fa8bd33913" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 514, + "startColumn": 21, + "charOffset": 13576, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 512, + "startColumn": 21, + "charOffset": 13528, + "charLength": 7, + "snippet": { + "text": "\n\tif (lua_gettop(L) == 1) {\n\t\tlua_pushnumber(L, npcType->info.soundChance);\n\t} else {\n\t\tnpcType->info.soundChance = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6195eecbbfad2cc62ce1fd2cd5fdc7dfe7bf9ef0f05cf2325279dbdd5d3c63f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 525, + "startColumn": 6, + "charOffset": 13909, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 523, + "startColumn": 6, + "charOffset": 13776, + "charLength": 1, + "snippet": { + "text": "\t// get: npcType:soundSpeedTicks() set: npcType:soundSpeedTicks(ticks)\n\tconst auto &npcType = getUserdataShared(L, 1);\n\tif (!npcType) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_TYPE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d10dee134ba5ec705f55f814f400629e90dc5204b7a33fe899291bec54ac1fd1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 526, + "startColumn": 3, + "charOffset": 13923, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 524, + "startColumn": 3, + "charOffset": 13847, + "charLength": 15, + "snippet": { + "text": "\tconst auto &npcType = getUserdataShared(L, 1);\n\tif (!npcType) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_TYPE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8561ea6cf8fa7152149f3bdf0bc4570726594534f728825cada06560146dac9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 532, + "startColumn": 21, + "charOffset": 14072, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 530, + "startColumn": 21, + "charOffset": 14024, + "charLength": 7, + "snippet": { + "text": "\n\tif (lua_gettop(L) == 1) {\n\t\tlua_pushnumber(L, npcType->info.soundSpeedTicks);\n\t} else {\n\t\tnpcType->info.soundSpeedTicks = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cef702c714414a489c42c74a54186f06081d5a486f187d3a076b4495434ead42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 543, + "startColumn": 6, + "charOffset": 14365, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 541, + "startColumn": 6, + "charOffset": 14273, + "charLength": 1, + "snippet": { + "text": "\t// npcType:addSound(soundId)\n\tconst auto &npcType = getUserdataShared(L, 1);\n\tif (!npcType) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_TYPE_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd876b9e1a02256704d3089768e6a2ddbdd8e05da6b8ceebac7ea8de9d2326f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 544, + "startColumn": 3, + "charOffset": 14379, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 542, + "startColumn": 3, + "charOffset": 14303, + "charLength": 15, + "snippet": { + "text": "\tconst auto &npcType = getUserdataShared(L, 1);\n\tif (!npcType) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_NPC_TYPE_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9371f5ef19195079d4c2fb9ebd128742c45f328925980d0fdf46df18c2c4721e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 557, + "startColumn": 6, + "charOffset": 14732, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 555, + "startColumn": 6, + "charOffset": 14646, + "charLength": 1, + "snippet": { + "text": "\t// npcType:getSounds()\n\tconst auto &npcType = getUserdataShared(L, 1);\n\tif (!npcType) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bfe2d878ce5eadb3056a609e6691e6ebf64a79e374a92f2b3cf0c21146297429" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 564, + "startColumn": 2, + "charOffset": 14871, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 562, + "startColumn": 2, + "charOffset": 14778, + "charLength": 3, + "snippet": { + "text": "\tint index = 0;\n\tlua_createtable(L, static_cast(npcType->info.soundVector.size()), 0);\n\tfor (const auto &sound : npcType->info.soundVector) {\n\t\t++index;\n\t\tlua_createtable(L, 0, 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc51ebf76cd0b0e060085134d37a5e251070e51fb6c54fabd30d48d8bb8b4c6e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-5", + "ruleIndex": 438, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-5: A cast shall not remove any const or volatile qualification from the type of a pointer or reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp" + }, + "region": { + "startLine": 567, + "startColumn": 21, + "charOffset": 14984, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 565, + "startColumn": 21, + "charOffset": 14925, + "charLength": 11, + "snippet": { + "text": "\t\t++index;\n\t\tlua_createtable(L, 0, 1);\n\t\tlua_pushnumber(L, static_cast(sound));\n\t\tlua_rawseti(L, -2, index);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e4a2356787e39d3b5118c80e4040994a3ee097a38c5ee6b83f392ba14c3ee3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/shop_functions.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 33, + "charOffset": 2467, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 33, + "charOffset": 2353, + "charLength": 9, + "snippet": { + "text": "\t// shop:setCount(count)\n\tif (const auto &shop = getUserdataShared(L, 1)) {\n\t\tshop->shopBlock.itemSubType = getNumber(L, 2);\n\t\tpushBoolean(L, true);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a38d9f98b05f939fa2f96941e976060ccf10c546d87772697d97b36b16e1fb91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/shop_functions.cpp" + }, + "region": { + "startLine": 120, + "startColumn": 36, + "charOffset": 3283, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 36, + "charOffset": 3159, + "charLength": 9, + "snippet": { + "text": "\t// shop:setStorageKey(storage)\n\tif (const auto &shop = getUserdataShared(L, 1)) {\n\t\tshop->shopBlock.itemStorageKey = getNumber(L, 2);\n\t\tpushBoolean(L, true);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3f6c67e99333866e9c5be043a180e84f1b371f6813ec574c9d8c03da9b54d07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/npc/shop_functions.cpp" + }, + "region": { + "startLine": 131, + "startColumn": 38, + "charOffset": 3563, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 129, + "startColumn": 38, + "charOffset": 3437, + "charLength": 9, + "snippet": { + "text": "\t// shop:setStorageValue(value)\n\tif (const auto &shop = getUserdataShared(L, 1)) {\n\t\tshop->shopBlock.itemStorageValue = getNumber(L, 2);\n\t\tpushBoolean(L, true);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96cea7e902d0dc50a814574376eeb50ad77988bb4f9f4a58d8bef5bbf18ed8ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/group_functions.cpp" + }, + "region": { + "startLine": 20, + "startColumn": 47, + "charOffset": 682, + "charLength": 2, + "snippet": { + "text": "id" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 47, + "charOffset": 593, + "charLength": 2, + "snippet": { + "text": "\tuint32_t id = getNumber(L, 2);\n\n\tconst auto &group = g_game().groups.getGroup(id);\n\tif (group) {\n\t\tpushUserdata(L, group);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1047b6c17e35ea2b7cc54a6c195362241a426c8dd0f014fe873870e16882218" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/group_functions.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 21, + "charOffset": 966, + "charLength": 5, + "snippet": { + "text": "group" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 21, + "charOffset": 879, + "charLength": 5, + "snippet": { + "text": "\tconst auto &group = getUserdataShared(L, 1);\n\tif (group) {\n\t\tlua_pushnumber(L, group->id);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca9e13f48cce1d290b589ced50815fc1a23b58bb91e726f403aa8d469adffefe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/group_functions.cpp" + }, + "region": { + "startLine": 57, + "startColumn": 3, + "charOffset": 1452, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 55, + "startColumn": 3, + "charOffset": 1364, + "charLength": 3, + "snippet": { + "text": "\tif (group) {\n\t\tstd::bitset flags;\n\t\tfor (uint8_t i = 0; i < magic_enum::enum_integer(PlayerFlags_t::FlagLast); ++i) {\n\t\t\tif (group->flags[i]) {\n\t\t\t\tflags.set(i);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d70cbc661b06173f6266add41f70d67b2152a4164191a9ee7ceb2a39567b2ace" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/group_functions.cpp" + }, + "region": { + "startLine": 58, + "startColumn": 8, + "charOffset": 1541, + "charLength": 5, + "snippet": { + "text": "group" + } + }, + "contextRegion": { + "startLine": 56, + "startColumn": 8, + "charOffset": 1378, + "charLength": 5, + "snippet": { + "text": "\t\tstd::bitset flags;\n\t\tfor (uint8_t i = 0; i < magic_enum::enum_integer(PlayerFlags_t::FlagLast); ++i) {\n\t\t\tif (group->flags[i]) {\n\t\t\t\tflags.set(i);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9287693c9f101e69f4dcba33d79c5b70e74c57b7065222490fa773afc111dbf1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/group_functions.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 11, + "charOffset": 1570, + "charLength": 3, + "snippet": { + "text": "set" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 11, + "charOffset": 1450, + "charLength": 3, + "snippet": { + "text": "\t\tfor (uint8_t i = 0; i < magic_enum::enum_integer(PlayerFlags_t::FlagLast); ++i) {\n\t\t\tif (group->flags[i]) {\n\t\t\t\tflags.set(i);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b10c1abae558d7f384f7c08fcc4fa82f2cb8d1e9538e9ab87efd646eeadcdbc8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/group_functions.cpp" + }, + "region": { + "startLine": 84, + "startColumn": 21, + "charOffset": 2094, + "charLength": 5, + "snippet": { + "text": "group" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 21, + "charOffset": 2007, + "charLength": 5, + "snippet": { + "text": "\tconst auto &group = getUserdataShared(L, 1);\n\tif (group) {\n\t\tlua_pushnumber(L, group->maxDepotItems);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7add597f6b97387d6b791752984f8db94d96532b1d682f63a50d9c2a77f51076" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/group_functions.cpp" + }, + "region": { + "startLine": 95, + "startColumn": 21, + "charOffset": 2339, + "charLength": 5, + "snippet": { + "text": "group" + } + }, + "contextRegion": { + "startLine": 93, + "startColumn": 21, + "charOffset": 2252, + "charLength": 5, + "snippet": { + "text": "\tconst auto &group = getUserdataShared(L, 1);\n\tif (group) {\n\t\tlua_pushnumber(L, group->maxVipEntries);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "679c57d5224c2913ce556e83ecd43a3ad3541d20dff3b56f224035212521e608" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/group_functions.cpp" + }, + "region": { + "startLine": 107, + "startColumn": 18, + "charOffset": 2631, + "charLength": 5, + "snippet": { + "text": "group" + } + }, + "contextRegion": { + "startLine": 105, + "startColumn": 18, + "charOffset": 2536, + "charLength": 5, + "snippet": { + "text": "\tif (group) {\n\t\tauto flag = static_cast(getNumber(L, 2));\n\t\tpushBoolean(L, group->flags[Groups::getFlagNumber(flag)]);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "973610342ab5b7c7aa41699296591ce1687e8388c92242245b41adbef858a69b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp" + }, + "region": { + "startLine": 31, + "startColumn": 21, + "charOffset": 923, + "charLength": 5, + "snippet": { + "text": "guild" + } + }, + "contextRegion": { + "startLine": 29, + "startColumn": 21, + "charOffset": 837, + "charLength": 5, + "snippet": { + "text": "\tconst auto guild = getUserdataShared(L, 1);\n\tif (guild) {\n\t\tlua_pushnumber(L, guild->getId());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "485ce1db34592b3ec655353ff9192055cccf5c6ae62ae9fd7ac758613f7f95dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 6, + "charOffset": 1114, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 6, + "charOffset": 1037, + "charLength": 1, + "snippet": { + "text": "\t// guild:getName()\n\tconst auto guild = getUserdataShared(L, 1);\n\tif (!guild) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6da2c93c2ba850d957b20db2cf2ef69b6950f9236a9ad1ee81958c2bf84b859" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp" + }, + "region": { + "startLine": 52, + "startColumn": 6, + "charOffset": 1358, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 50, + "startColumn": 6, + "charOffset": 1266, + "charLength": 1, + "snippet": { + "text": "\t// guild:getMembersOnline()\n\tconst auto guild = getUserdataShared(L, 1);\n\tif (!guild) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2194d1907da515742875f0c6a0f2fffef0f192af7fd9d6fba7da38469cb29ea5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp" + }, + "region": { + "startLine": 58, + "startColumn": 21, + "charOffset": 1471, + "charLength": 7, + "snippet": { + "text": "members" + } + }, + "contextRegion": { + "startLine": 56, + "startColumn": 21, + "charOffset": 1401, + "charLength": 7, + "snippet": { + "text": "\n\tconst auto members = guild->getMembersOnline();\n\tlua_createtable(L, members.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b32727f0f928440b37c853db09c6572feb54758cc1b2e33270b1231897d0dd68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp" + }, + "region": { + "startLine": 58, + "startColumn": 21, + "charOffset": 1471, + "charLength": 7, + "snippet": { + "text": "members" + } + }, + "contextRegion": { + "startLine": 56, + "startColumn": 21, + "charOffset": 1401, + "charLength": 7, + "snippet": { + "text": "\n\tconst auto members = guild->getMembersOnline();\n\tlua_createtable(L, members.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "069218b44e652544054158a7b0dc17a934306550d16830cd1786559565113393" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp" + }, + "region": { + "startLine": 61, + "startColumn": 2, + "charOffset": 1509, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 59, + "startColumn": 2, + "charOffset": 1491, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (std::shared_ptr player : members) {\n\t\tpushUserdata(L, player);\n\t\tsetMetatable(L, -1, \"Player\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7a874635f83843387aae3dab5d316903656d20b594932891368045b7421d38d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp" + }, + "region": { + "startLine": 61, + "startColumn": 31, + "charOffset": 1538, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 59, + "startColumn": 31, + "charOffset": 1491, + "charLength": 6, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (std::shared_ptr player : members) {\n\t\tpushUserdata(L, player);\n\t\tsetMetatable(L, -1, \"Player\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9540b34f78281d9e690ff9f1a544ae0b620209f5643b78200173fe301d44822" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 6, + "charOffset": 1817, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 6, + "charOffset": 1733, + "charLength": 1, + "snippet": { + "text": "\t// guild:getBankBalance()\n\tconst auto guild = getUserdataShared(L, 1);\n\tif (!guild) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69918a42f77a9531ee18f1488885a7e56a9128686dd006622f9d45f7737de778" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 20, + "charOffset": 1879, + "charLength": 5, + "snippet": { + "text": "guild" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 20, + "charOffset": 1845, + "charLength": 5, + "snippet": { + "text": "\t\treturn 1;\n\t}\n\tlua_pushnumber(L, guild->getBankBalance());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a913f20bb8ebb1164119ba7383efec1c3d89d8155c9be88886b6bc79927d9ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 20, + "charOffset": 1879, + "charLength": 5, + "snippet": { + "text": "guild" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 20, + "charOffset": 1845, + "charLength": 5, + "snippet": { + "text": "\t\treturn 1;\n\t}\n\tlua_pushnumber(L, guild->getBankBalance());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3feeb06bf2885bdd4ca88d552825c062abaf197f934e4c0eed4b294c0d5c9c5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp" + }, + "region": { + "startLine": 83, + "startColumn": 6, + "charOffset": 2073, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 81, + "startColumn": 6, + "charOffset": 1978, + "charLength": 1, + "snippet": { + "text": "\t// guild:setBankBalance(bankBalance)\n\tconst auto guild = getUserdataShared(L, 1);\n\tif (!guild) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69918a42f77a9531ee18f1488885a7e56a9128686dd006622f9d45f7737de778" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp" + }, + "region": { + "startLine": 96, + "startColumn": 6, + "charOffset": 2349, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 6, + "charOffset": 2257, + "charLength": 1, + "snippet": { + "text": "\t// guild:addRank(id, name, level)\n\tconst auto guild = getUserdataShared(L, 1);\n\tif (!guild) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2070f342947064ff49a6ddcd7099cb11e16d85d2b8fdab905996a04a9614b488" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 6, + "charOffset": 2731, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 6, + "charOffset": 2648, + "charLength": 1, + "snippet": { + "text": "\t// guild:getRankById(id)\n\tconst auto guild = getUserdataShared(L, 1);\n\tif (!guild) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1fb56078fcd9a659ea46c6a6c425eb2e27fdf8982dff9d2cc7a24cc54219a38" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp" + }, + "region": { + "startLine": 120, + "startColumn": 21, + "charOffset": 2924, + "charLength": 4, + "snippet": { + "text": "rank" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 21, + "charOffset": 2863, + "charLength": 4, + "snippet": { + "text": "\tif (rank) {\n\t\tlua_createtable(L, 0, 3);\n\t\tsetField(L, \"id\", rank->id);\n\t\tsetField(L, \"name\", rank->name);\n\t\tsetField(L, \"level\", rank->level);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89549547b2be107f0f8386542ae0ac48145b094f6c76a21c2e599ba085fe9c4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp" + }, + "region": { + "startLine": 122, + "startColumn": 24, + "charOffset": 2993, + "charLength": 4, + "snippet": { + "text": "rank" + } + }, + "contextRegion": { + "startLine": 120, + "startColumn": 24, + "charOffset": 2904, + "charLength": 4, + "snippet": { + "text": "\t\tsetField(L, \"id\", rank->id);\n\t\tsetField(L, \"name\", rank->name);\n\t\tsetField(L, \"level\", rank->level);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d605b8ed7091982d47e0e60d17ac8f39c653878c68c7a064cfc9a81f6f8ff58" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp" + }, + "region": { + "startLine": 132, + "startColumn": 6, + "charOffset": 3200, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 130, + "startColumn": 6, + "charOffset": 3111, + "charLength": 1, + "snippet": { + "text": "\t// guild:getRankByLevel(level)\n\tconst auto guild = getUserdataShared(L, 1);\n\tif (!guild) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9490569002de0aa07aabdb6a13fa1e362664fa574ac0496aaef658790a33e4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp" + }, + "region": { + "startLine": 141, + "startColumn": 21, + "charOffset": 3400, + "charLength": 4, + "snippet": { + "text": "rank" + } + }, + "contextRegion": { + "startLine": 139, + "startColumn": 21, + "charOffset": 3339, + "charLength": 4, + "snippet": { + "text": "\tif (rank) {\n\t\tlua_createtable(L, 0, 3);\n\t\tsetField(L, \"id\", rank->id);\n\t\tsetField(L, \"name\", rank->name);\n\t\tsetField(L, \"level\", rank->level);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "227ab5a093b11722352990fafa66c7a6b3926a5d9fb126ebdd351e42e1126aeb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp" + }, + "region": { + "startLine": 143, + "startColumn": 24, + "charOffset": 3469, + "charLength": 4, + "snippet": { + "text": "rank" + } + }, + "contextRegion": { + "startLine": 141, + "startColumn": 24, + "charOffset": 3380, + "charLength": 4, + "snippet": { + "text": "\t\tsetField(L, \"id\", rank->id);\n\t\tsetField(L, \"name\", rank->name);\n\t\tsetField(L, \"level\", rank->level);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f94e41e4fac175e738d6503dc0e9fd8c124c64d3e4c90400326cb9d17762240" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp" + }, + "region": { + "startLine": 153, + "startColumn": 6, + "charOffset": 3657, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 151, + "startColumn": 6, + "charOffset": 3580, + "charLength": 1, + "snippet": { + "text": "\t// guild:getMotd()\n\tconst auto guild = getUserdataShared(L, 1);\n\tif (!guild) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "221bd9d60cda16c9722bfe489e187950bfa054e17c0e1dac3f63469e36d11f02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/guild_functions.cpp" + }, + "region": { + "startLine": 164, + "startColumn": 6, + "charOffset": 3881, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 162, + "startColumn": 6, + "charOffset": 3800, + "charLength": 1, + "snippet": { + "text": "\t// guild:setMotd(motd)\n\tconst auto guild = getUserdataShared(L, 1);\n\tif (!guild) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "91b7294740734200ba15fde9c94b864ff7afce52c0288b478e0140c606d542db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/mount_functions.cpp" + }, + "region": { + "startLine": 54, + "startColumn": 21, + "charOffset": 1410, + "charLength": 5, + "snippet": { + "text": "mount" + } + }, + "contextRegion": { + "startLine": 52, + "startColumn": 21, + "charOffset": 1306, + "charLength": 5, + "snippet": { + "text": "\tconst std::shared_ptr mount = getUserdataShared(L, 1);\n\tif (mount) {\n\t\tlua_pushnumber(L, mount->id);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4f9be9101a85ed195a07ff2a1128b40921d9c222b04793ee6bf392f2ae358b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/mount_functions.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 21, + "charOffset": 1652, + "charLength": 5, + "snippet": { + "text": "mount" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 21, + "charOffset": 1548, + "charLength": 5, + "snippet": { + "text": "\tconst std::shared_ptr mount = getUserdataShared(L, 1);\n\tif (mount) {\n\t\tlua_pushnumber(L, mount->clientId);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e485d7377e1ba5ab7a8f420bb8abb602f4f3068db73eaac884c6ff1bb964f356" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/mount_functions.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 21, + "charOffset": 1894, + "charLength": 5, + "snippet": { + "text": "mount" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 21, + "charOffset": 1790, + "charLength": 5, + "snippet": { + "text": "\tconst std::shared_ptr mount = getUserdataShared(L, 1);\n\tif (mount) {\n\t\tlua_pushnumber(L, mount->speed);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ebafb0b9b4a8ae38f96b0127106a5915e1334542f5178f41c4a5f57801893a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'party.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp" + }, + "region": { + "startLine": 28, + "startColumn": 10, + "charOffset": 992, + "charLength": 20, + "snippet": { + "text": "\"grouping/party.hpp\"" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 10, + "charOffset": 883, + "charLength": 20, + "snippet": { + "text": "#include \"creatures/appearance/mounts/mounts.hpp\"\n#include \"creatures/appearance/outfit/outfit.hpp\"\n#include \"grouping/party.hpp\"\n#include \"server/network/protocol/protocolgame.hpp\"\n#include \"items/containers/rewards/reward.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "471f4fffb872ddab4fd2f2f330933708266310ee3f741faac9d93acc5f35f5eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 20, + "startColumn": 6, + "charOffset": 714, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 6, + "charOffset": 622, + "charLength": 1, + "snippet": { + "text": "\t// Party(userdata)\n\tstd::shared_ptr player = getUserdataShared(L, 2);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0654dd1d6bd984a5f66c1b9b3b1ded263a2b3cfc111fdbad86d95bd9633ca5c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 26, + "startColumn": 6, + "charOffset": 816, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 6, + "charOffset": 758, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr party = player->getParty();\n\tif (!party) {\n\t\tparty = Party::create(player);\n\t\tg_game().updatePlayerShield(player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "621daf545830410a5dbd4e5a90c5d638cf01f8570d3d2b7f4b217b6c5ae4a777" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 41, + "startColumn": 6, + "charOffset": 1193, + "charLength": 8, + "snippet": { + "text": "partyPtr" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 6, + "charOffset": 1097, + "charLength": 8, + "snippet": { + "text": "\t// party:disband()\n\tstd::shared_ptr* partyPtr = getRawUserDataShared(L, 1);\n\tif (partyPtr && *partyPtr) {\n\t\tstd::shared_ptr &party = *partyPtr;\n\t\tparty->disband();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe435d626e56e4601108d569a90e8c73a3d31b3208894fd0857f593a6b42f279" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'std::shared_ptr *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 41, + "startColumn": 6, + "charOffset": 1193, + "charLength": 8, + "snippet": { + "text": "partyPtr" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 6, + "charOffset": 1097, + "charLength": 8, + "snippet": { + "text": "\t// party:disband()\n\tstd::shared_ptr* partyPtr = getRawUserDataShared(L, 1);\n\tif (partyPtr && *partyPtr) {\n\t\tstd::shared_ptr &party = *partyPtr;\n\t\tparty->disband();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95552e2f924dfd421ec37da375154d20df6f5f181e3d3212e5bf6400699561bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 41, + "startColumn": 15, + "charOffset": 1202, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 15, + "charOffset": 1097, + "charLength": 2, + "snippet": { + "text": "\t// party:disband()\n\tstd::shared_ptr* partyPtr = getRawUserDataShared(L, 1);\n\tif (partyPtr && *partyPtr) {\n\t\tstd::shared_ptr &party = *partyPtr;\n\t\tparty->disband();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9acf9fc7bf2662385477d4fa348e66eb3076e2836fb869f506e71a259609b27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 55, + "startColumn": 6, + "charOffset": 1516, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 6, + "charOffset": 1425, + "charLength": 1, + "snippet": { + "text": "\t// party:getLeader()\n\tstd::shared_ptr party = getUserdataShared(L, 1);\n\tif (!party) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f65346746388886c4318e3d1fe3c7363106c82a1fab34f55cbd10b1ac273c4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 73, + "startColumn": 6, + "charOffset": 1868, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 71, + "startColumn": 6, + "charOffset": 1796, + "charLength": 1, + "snippet": { + "text": "\t// party:setLeader(player)\n\tconst auto &player = getPlayer(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "505d7a5bb93177689c38254410269e3bf436a8acd5f2065baa9de9bc3e9d00cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 74, + "startColumn": 3, + "charOffset": 1881, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 3, + "charOffset": 1824, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getPlayer(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "855f918ea397c7038b1488220042365aca621eb4fe6f77c864d413a4a9d2e2d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 90, + "startColumn": 6, + "charOffset": 2280, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 88, + "startColumn": 6, + "charOffset": 2188, + "charLength": 1, + "snippet": { + "text": "\t// party:getMembers()\n\tstd::shared_ptr party = getUserdataShared(L, 1);\n\tif (!party) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "429e7145b4f59f91d8ae16cfca4c2d4ff62e67eea775c361fd1923d9745b01f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 96, + "startColumn": 21, + "charOffset": 2360, + "charLength": 5, + "snippet": { + "text": "party" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 21, + "charOffset": 2323, + "charLength": 5, + "snippet": { + "text": "\n\tint index = 0;\n\tlua_createtable(L, party->getMemberCount(), 0);\n\tfor (std::shared_ptr player : party->getMembers()) {\n\t\tpushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e684d397f661fe323867fc399467454aeb4d8fbd03cd0cb0ea77c9a999b1e03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 96, + "startColumn": 21, + "charOffset": 2360, + "charLength": 5, + "snippet": { + "text": "party" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 21, + "charOffset": 2323, + "charLength": 5, + "snippet": { + "text": "\n\tint index = 0;\n\tlua_createtable(L, party->getMemberCount(), 0);\n\tfor (std::shared_ptr player : party->getMembers()) {\n\t\tpushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "228aa0e7fc22673842d5300317d0b3bac4cb364f6f51f1741a9713ae09e125ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 97, + "startColumn": 2, + "charOffset": 2390, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 95, + "startColumn": 2, + "charOffset": 2324, + "charLength": 3, + "snippet": { + "text": "\tint index = 0;\n\tlua_createtable(L, party->getMemberCount(), 0);\n\tfor (std::shared_ptr player : party->getMembers()) {\n\t\tpushUserdata(L, player);\n\t\tsetMetatable(L, -1, \"Player\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b2caf907d1edcac566d1dd0ad57a1006d2fe00576baf28c3dbbcc405921b7e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 97, + "startColumn": 31, + "charOffset": 2419, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 95, + "startColumn": 31, + "charOffset": 2324, + "charLength": 6, + "snippet": { + "text": "\tint index = 0;\n\tlua_createtable(L, party->getMemberCount(), 0);\n\tfor (std::shared_ptr player : party->getMembers()) {\n\t\tpushUserdata(L, player);\n\t\tsetMetatable(L, -1, \"Player\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80a1aaf40e85250cdba4335154cf91d2cf9f3cd87ed92248da332730e65dab52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 109, + "startColumn": 21, + "charOffset": 2751, + "charLength": 5, + "snippet": { + "text": "party" + } + }, + "contextRegion": { + "startLine": 107, + "startColumn": 21, + "charOffset": 2653, + "charLength": 5, + "snippet": { + "text": "\tstd::shared_ptr party = getUserdataShared(L, 1);\n\tif (party) {\n\t\tlua_pushnumber(L, party->getMemberCount());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36dbc23e890496a49dad917c290f56c32401c39b1c4062b87152fa42edb896f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 109, + "startColumn": 21, + "charOffset": 2751, + "charLength": 5, + "snippet": { + "text": "party" + } + }, + "contextRegion": { + "startLine": 107, + "startColumn": 21, + "charOffset": 2653, + "charLength": 5, + "snippet": { + "text": "\tstd::shared_ptr party = getUserdataShared(L, 1);\n\tif (party) {\n\t\tlua_pushnumber(L, party->getMemberCount());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c2be01162205902c02175c546ba0bd5a38a2b235c8194fa2f20ae498b6c4dfa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 120, + "startColumn": 22, + "charOffset": 3001, + "charLength": 5, + "snippet": { + "text": "party" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 22, + "charOffset": 2902, + "charLength": 5, + "snippet": { + "text": "\tstd::shared_ptr party = getUserdataShared(L, 1);\n\tif (party) {\n\t\tlua_createtable(L, party->getInvitationCount(), 0);\n\n\t\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba7f0a9b9729402e38ec8e2e5ad10058a48f95347d4974a2c54d792309a41cd9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 120, + "startColumn": 22, + "charOffset": 3001, + "charLength": 5, + "snippet": { + "text": "party" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 22, + "charOffset": 2902, + "charLength": 5, + "snippet": { + "text": "\tstd::shared_ptr party = getUserdataShared(L, 1);\n\tif (party) {\n\t\tlua_createtable(L, party->getInvitationCount(), 0);\n\n\t\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce9d8ad46fc5dd4ba65107e7754aa7dd9d2251c86306b25c444e3768e27c7160" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 123, + "startColumn": 3, + "charOffset": 3054, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 121, + "startColumn": 3, + "charOffset": 3034, + "charLength": 3, + "snippet": { + "text": "\n\t\tint index = 0;\n\t\tfor (std::shared_ptr player : party->getInvitees()) {\n\t\t\tpushUserdata(L, player);\n\t\t\tsetMetatable(L, -1, \"Player\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8636f2df21e305570c3a0b4f7f0a2a73bc4da5f10a053240eaf12e224cf7960e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 123, + "startColumn": 32, + "charOffset": 3083, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 121, + "startColumn": 32, + "charOffset": 3034, + "charLength": 6, + "snippet": { + "text": "\n\t\tint index = 0;\n\t\tfor (std::shared_ptr player : party->getInvitees()) {\n\t\t\tpushUserdata(L, player);\n\t\t\tsetMetatable(L, -1, \"Player\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cecd71af2f338565cd13fef1d8c64632910626850664294fefe56981df530a53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 138, + "startColumn": 21, + "charOffset": 3453, + "charLength": 5, + "snippet": { + "text": "party" + } + }, + "contextRegion": { + "startLine": 136, + "startColumn": 21, + "charOffset": 3355, + "charLength": 5, + "snippet": { + "text": "\tstd::shared_ptr party = getUserdataShared(L, 1);\n\tif (party) {\n\t\tlua_pushnumber(L, party->getInvitationCount());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60d2f4e347aeae9bc380fd6dc602699d746ff7a9c112134ff14f1985842ce38f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 138, + "startColumn": 21, + "charOffset": 3453, + "charLength": 5, + "snippet": { + "text": "party" + } + }, + "contextRegion": { + "startLine": 136, + "startColumn": 21, + "charOffset": 3355, + "charLength": 5, + "snippet": { + "text": "\tstd::shared_ptr party = getUserdataShared(L, 1);\n\tif (party) {\n\t\tlua_pushnumber(L, party->getInvitationCount());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20904fa303bcf5e2badee5c503ddbd1cc33cfa2c3481c58077e7e4766f04fd96" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 148, + "startColumn": 6, + "charOffset": 3654, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 146, + "startColumn": 6, + "charOffset": 3582, + "charLength": 1, + "snippet": { + "text": "\t// party:addInvite(player)\n\tconst auto &player = getPlayer(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88c709011f5a81f2789545d73b0b5c7574c0c7b615abc9dc8e37358f22e9d19d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 149, + "startColumn": 3, + "charOffset": 3667, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 147, + "startColumn": 3, + "charOffset": 3610, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getPlayer(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dec4d72a3adb14c500874848cad45a002fff98a29a882d24e835bc6f8dfa6df3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 165, + "startColumn": 6, + "charOffset": 4054, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 163, + "startColumn": 6, + "charOffset": 3979, + "charLength": 1, + "snippet": { + "text": "\t// party:removeInvite(player)\n\tconst auto &player = getPlayer(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c65c717ab3eb99cb95c91d72d15f50e77f43db535075048c4ab5695fc9c16cf8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 166, + "startColumn": 3, + "charOffset": 4067, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 3, + "charOffset": 4010, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getPlayer(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "126ff7ff7f9042dbf1f861cac99509d6a862fb92a5b76845da6949cdd6aec6d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 182, + "startColumn": 6, + "charOffset": 4448, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 180, + "startColumn": 6, + "charOffset": 4376, + "charLength": 1, + "snippet": { + "text": "\t// party:addMember(player)\n\tconst auto &player = getPlayer(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a6c8a39c89510c7e48810a674030549ec762a3b631b5f2d44ce69525eecbcf7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 183, + "startColumn": 3, + "charOffset": 4461, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 181, + "startColumn": 3, + "charOffset": 4404, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getPlayer(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac5b17e5670fea839c8b518fa1e35244dab6c993d9604a26e6aea0f7e823dfcc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 199, + "startColumn": 6, + "charOffset": 4845, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 197, + "startColumn": 6, + "charOffset": 4770, + "charLength": 1, + "snippet": { + "text": "\t// party:removeMember(player)\n\tconst auto &player = getPlayer(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c255d2f3c72c3e95ce34aea8c5be560b82ae71c3c2d6ace97296ee2eec2bdc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/party_functions.cpp", + "index": 1 + }, + "region": { + "startLine": 200, + "startColumn": 3, + "charOffset": 4858, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 198, + "startColumn": 3, + "charOffset": 4801, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getPlayer(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b333929da93a6fea6e1b38b7cae5f7fa6276436aa2a5350dcdaa55d3af274e03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 6, + "charOffset": 1391, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 6, + "charOffset": 1292, + "charLength": 1, + "snippet": { + "text": "\t// player:sendInventory()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00a58d9b790e3314736b23fa9ac5067c99756cbc2c555dca1bcd36b8ee0443fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 52, + "startColumn": 6, + "charOffset": 1673, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 50, + "startColumn": 6, + "charOffset": 1563, + "charLength": 1, + "snippet": { + "text": "\t// player:sendLootStats(item, count)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "abf0acc023f95b6e67df019807e599b1b476fc4e1414d49b466ba52dd5bbd2d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 58, + "startColumn": 6, + "charOffset": 1784, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 56, + "startColumn": 6, + "charOffset": 1717, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = getUserdataShared(L, 2);\n\tif (!item) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97d475fdb80f1b5ce269a90830c5865fc9384028480fc07a4979bf14337e11d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 63, + "startColumn": 2, + "charOffset": 1828, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 2, + "charOffset": 1823, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tuint8_t count = getNumber(L, 3, 0);\n\tif (count == 0) {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8f6f7da1cc4791aec4995691140e4313cbb9cd7989bed26c2fb6be6a9b7b543" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 6, + "charOffset": 2176, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 6, + "charOffset": 2067, + "charLength": 1, + "snippet": { + "text": "\t// player:updateSupplyTracker(item)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4604604f5bc5457f590911d8d31091f10b739271e7530b59f56beefbb16cc101" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 84, + "startColumn": 6, + "charOffset": 2287, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 6, + "charOffset": 2220, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = getUserdataShared(L, 2);\n\tif (!item) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b33e9654c8ce1323f9c42a242cf3ad1c3143524abfe217eb56e67a11c993266" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 6, + "charOffset": 2587, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 6, + "charOffset": 2468, + "charLength": 1, + "snippet": { + "text": "\t// player:updateKillTracker(creature, corpse)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbc64e13aa91ec6de7618eb299d68b33eeec67a3e62ea955e3ab54a8822ffbea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 104, + "startColumn": 6, + "charOffset": 2709, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 102, + "startColumn": 6, + "charOffset": 2631, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr monster = getUserdataShared(L, 2);\n\tif (!monster) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ab9f2c4c33bf2c02c8ee9bf5d57f3052f250a9f96f397cc8380e63b781bf8b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 110, + "startColumn": 6, + "charOffset": 2833, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 108, + "startColumn": 6, + "charOffset": 2754, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr corpse = getUserdataShared(L, 3);\n\tif (!corpse) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7df7951e8b1bd6a3d16aa3973838b079ec9c5d7756fb055f688ad18c08743113" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 115, + "startColumn": 10, + "charOffset": 2887, + "charLength": 17, + "snippet": { + "text": "updateKillTracker" + } + }, + "contextRegion": { + "startLine": 113, + "startColumn": 10, + "charOffset": 2874, + "charLength": 17, + "snippet": { + "text": "\t}\n\n\tplayer->updateKillTracker(corpse, monster->getName(), monster->getCurrentOutfit());\n\tpushBoolean(L, true);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8801a2312f4002bce865899fb593815219301591093848b756d7fafe1098b78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 136, + "startColumn": 22, + "charOffset": 3553, + "charLength": 3, + "snippet": { + "text": "ret" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 22, + "charOffset": 3477, + "charLength": 3, + "snippet": { + "text": "\t\tif (ret != RETURNVALUE_NOERROR) {\n\t\t\tlua_pushnil(L);\n\t\t\tlua_pushnumber(L, ret);\n\t\t\treturn 2;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e9fa7e38f118530ed4d73ba65eb41ac45cdb1dfa85d75be9b1212bf1d015d30" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 166, + "startColumn": 3, + "charOffset": 4214, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 3, + "charOffset": 4148, + "charLength": 3, + "snippet": { + "text": "\t\tplayer->setUsedRunesBit(0);\n\t\tplayer->setUnlockedRunesBit(0);\n\t\tfor (int8_t i = CHARM_WOUND; i <= CHARM_LAST; i++) {\n\t\t\tplayer->parseRacebyCharm(static_cast(i), true, 0);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00c15b5caeb8f5b5cc0d472fd07192135ca46b3793054bd5f28e6bd8da57b747" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 12, + "charOffset": 4278, + "charLength": 16, + "snippet": { + "text": "parseRacebyCharm" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 12, + "charOffset": 4178, + "charLength": 16, + "snippet": { + "text": "\t\tplayer->setUnlockedRunesBit(0);\n\t\tfor (int8_t i = CHARM_WOUND; i <= CHARM_LAST; i++) {\n\t\t\tplayer->parseRacebyCharm(static_cast(i), true, 0);\n\t\t}\n\t\tpushBoolean(L, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba790438d841794c894641f987f77345f28995c9418b0e6356716f6f215cfd40" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 180, + "startColumn": 3, + "charOffset": 4590, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 178, + "startColumn": 3, + "charOffset": 4506, + "charLength": 3, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tfor (int8_t i = CHARM_WOUND; i <= CHARM_LAST; i++) {\n\t\t\tconst auto charm = g_iobestiary().getBestiaryCharm(static_cast(i));\n\t\t\tif (charm) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9481000b83eb0e15006ef32fb5e56b976d2fb59554da6730e54587e729ed22a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 202, + "startColumn": 13, + "charOffset": 5284, + "charLength": 1, + "snippet": { + "text": "-" + } + }, + "contextRegion": { + "startLine": 200, + "startColumn": 13, + "charOffset": 5188, + "charLength": 1, + "snippet": { + "text": "\t\t\tg_iobestiary().addCharmPoints(player, static_cast(charms));\n\t\t} else {\n\t\t\tcharms = -charms;\n\t\t\tg_iobestiary().addCharmPoints(player, static_cast(charms), true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f4fbdc64607077fea85ddf6330e0feecd6c3ed66318abc89b6bd6796e1dfe23" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 222, + "startColumn": 21, + "charOffset": 5774, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 220, + "startColumn": 21, + "charOffset": 5672, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getGUID());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a419b1d379b46be3984c4230865e2bc69333b9987cadc1213c31fc610abfd6c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 233, + "startColumn": 21, + "charOffset": 6012, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 231, + "startColumn": 21, + "charOffset": 5910, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getIP());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b54ab5c8779de3ee6337e9aaebe35e0f66c6ede2ca5520a6863b16996b7e851e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 243, + "startColumn": 6, + "charOffset": 6232, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 6, + "charOffset": 6134, + "charLength": 1, + "snippet": { + "text": "\t// player:getAccountId()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || player->getAccountId() == 0) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10cae85ddadb5929e9494ef6b8a36fb6abc10db98d177bad61de93b552b91c82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 248, + "startColumn": 20, + "charOffset": 6327, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 246, + "startColumn": 20, + "charOffset": 6304, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, player->getAccountId());\n\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "114a9ce73d10158028e4a6f98bfd56e04857add7c255aa1cbe3a6a783067114f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'time_t' (aka 'long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 257, + "startColumn": 21, + "charOffset": 6564, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 255, + "startColumn": 21, + "charOffset": 6462, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getLastLoginSaved());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90d42ad16c4a2ea7355bd0bd701a45ef6f740560015112b2446e28a5d63cd8ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 257, + "startColumn": 21, + "charOffset": 6564, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 255, + "startColumn": 21, + "charOffset": 6462, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getLastLoginSaved());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5124a23254e41c9ddeed0387d74d80a830ad2dc8e5f02a08d7ee0ccb7eb91f71" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'time_t' (aka 'long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 268, + "startColumn": 21, + "charOffset": 6828, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 266, + "startColumn": 21, + "charOffset": 6726, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getLastLogout());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85dac6ac1670c4a2e6fa7066e81363c25831d6788c299f90db96a1d3cbaa97c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 268, + "startColumn": 21, + "charOffset": 6828, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 266, + "startColumn": 21, + "charOffset": 6726, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getLastLogout());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f99d5fdf00f8bb2a17af626261834fe56f19baa0b26b71aa0edac76610d0ca56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 279, + "startColumn": 21, + "charOffset": 7090, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 277, + "startColumn": 21, + "charOffset": 6988, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getAccountType());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c6bba21b290092497035230974cbd4f6f32eb704a6504fc8c35c837e89500d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 289, + "startColumn": 6, + "charOffset": 7334, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 287, + "startColumn": 6, + "charOffset": 7223, + "charLength": 1, + "snippet": { + "text": "\t// player:setAccountType(accountType)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || !player->getAccount()) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30b120e86ef73f2c9e938b5000946ce25c191a3b82aa66895f13c71eeee28187" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 289, + "startColumn": 17, + "charOffset": 7345, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 287, + "startColumn": 17, + "charOffset": 7223, + "charLength": 1, + "snippet": { + "text": "\t// player:setAccountType(accountType)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || !player->getAccount()) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67cf0f2184b0b0e5a56abbda8d71fe1a506c425e0cbf9a36c3d5bb37b6495e42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 329, + "startColumn": 3, + "charOffset": 8358, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 327, + "startColumn": 3, + "charOffset": 8263, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player == nullptr) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a1a8f0818a640beb9c355ce930728e3d317e5e3d73a027bd66439213706055c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 335, + "startColumn": 6, + "charOffset": 8508, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 333, + "startColumn": 6, + "charOffset": 8457, + "charLength": 1, + "snippet": { + "text": "\n\tauto raceId = getNumber(L, 2, 0);\n\tif (!g_monsters().getMonsterTypeByRaceId(raceId)) {\n\t\treportErrorFunc(\"Monster race id not exists\");\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15c570a87f39d87f8e4f82d9e7974cf8af9bbed1d0f0e5be16bc25f46a01d370" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 336, + "startColumn": 3, + "charOffset": 8558, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 334, + "startColumn": 3, + "charOffset": 8458, + "charLength": 15, + "snippet": { + "text": "\tauto raceId = getNumber(L, 2, 0);\n\tif (!g_monsters().getMonsterTypeByRaceId(raceId)) {\n\t\treportErrorFunc(\"Monster race id not exists\");\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e21e6336a0b207324207a3f8fc05720d397b7f02305341dacf6b7662860a93f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 341, + "startColumn": 2, + "charOffset": 8647, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 339, + "startColumn": 2, + "charOffset": 8642, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (uint16_t finishedRaceId : g_iobestiary().getBestiaryFinished(player)) {\n\t\tif (raceId == finishedRaceId) {\n\t\t\tpushBoolean(L, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0742565301f4af1cfb357780a419fb4922a77bb123b4dcf0231860251948632" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 413, + "startColumn": 46, + "charOffset": 10778, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 411, + "startColumn": 46, + "charOffset": 10527, + "charLength": 3, + "snippet": { + "text": "\t\tif (const std::unique_ptr &slot = player->getPreyWithMonster(getNumber(L, 2, 0));\n\t\t slot && slot->isOccupied() && slot->bonus == PreyBonus_Experience && slot->bonusTimeLeft > 0) {\n\t\t\tlua_pushnumber(L, static_cast(100 + slot->bonusPercentage));\n\t\t} else {\n\t\t\tlua_pushnumber(L, 100);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c98e5bdf0e1fafd5ff1c69df900128b52139978f9a60d1b9cb446b7884618e84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 415, + "startColumn": 22, + "charOffset": 10841, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 413, + "startColumn": 22, + "charOffset": 10733, + "charLength": 3, + "snippet": { + "text": "\t\t\tlua_pushnumber(L, static_cast(100 + slot->bonusPercentage));\n\t\t} else {\n\t\t\tlua_pushnumber(L, 100);\n\t\t}\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab54d55b8a49a59979973492465abebeb8a6f2320ceeb47932dc2c21ee768ffb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 415, + "startColumn": 22, + "charOffset": 10841, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 413, + "startColumn": 22, + "charOffset": 10733, + "charLength": 3, + "snippet": { + "text": "\t\t\tlua_pushnumber(L, static_cast(100 + slot->bonusPercentage));\n\t\t} else {\n\t\t\tlua_pushnumber(L, 100);\n\t\t}\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82f7d82ad9392354ad1eae7ef4fc24496ac3835afd8f1718b5d9225b9d91cb4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 437, + "startColumn": 3, + "charOffset": 11401, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 435, + "startColumn": 3, + "charOffset": 11306, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player == nullptr) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6cbb5e950dde0a7d9a40b8a860c2cef146223e1e01900fcea0c48db2a5e412f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 463, + "startColumn": 22, + "charOffset": 12345, + "charLength": 4, + "snippet": { + "text": "slot" + } + }, + "contextRegion": { + "startLine": 461, + "startColumn": 22, + "charOffset": 12151, + "charLength": 4, + "snippet": { + "text": "\t\tif (const std::unique_ptr &slot = player->getPreyWithMonster(getNumber(L, 2, 0));\n\t\t slot && slot->isOccupied() && slot->bonus == PreyBonus_Loot) {\n\t\t\tlua_pushnumber(L, slot->bonusPercentage);\n\t\t} else {\n\t\t\tlua_pushnumber(L, 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1574d2249a360fff7696960229414db322f55a1cd9d9173df5af35fd003d30ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 465, + "startColumn": 22, + "charOffset": 12401, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 463, + "startColumn": 22, + "charOffset": 12324, + "charLength": 1, + "snippet": { + "text": "\t\t\tlua_pushnumber(L, slot->bonusPercentage);\n\t\t} else {\n\t\t\tlua_pushnumber(L, 0);\n\t\t}\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79851d05c3c2c2b2efe750141cb0cb144953a2f9e10989da7ec0f08cd4a79417" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 492, + "startColumn": 7, + "charOffset": 13139, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 490, + "startColumn": 7, + "charOffset": 12995, + "charLength": 1, + "snippet": { + "text": "\tif (std::shared_ptr player = getUserdataShared(L, 1);\n\t const auto &slot = player->getPreySlotById(PreySlot_Three)) {\n\t\tif (!slot) {\n\t\t\tlua_pushnil(L);\n\t\t} else if (lua_gettop(L) == 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d94d45379295ae06478dd8f74148838f0882a12b958637b021d98bf7c62c6339" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 560, + "startColumn": 21, + "charOffset": 15010, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 558, + "startColumn": 21, + "charOffset": 14908, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getCapacity());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "696c2537b4f46b9346e83777493476734e465a0b250c5824dada0f058f2e9fe6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 596, + "startColumn": 6, + "charOffset": 15857, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 594, + "startColumn": 6, + "charOffset": 15761, + "charLength": 1, + "snippet": { + "text": "\t// player:isTraining()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tpushBoolean(L, false);\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca6c0957029a89b9ebd3c91267802aa58e778a0255aa483d4693604725e5cd65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 598, + "startColumn": 3, + "charOffset": 15895, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 596, + "startColumn": 3, + "charOffset": 15852, + "charLength": 15, + "snippet": { + "text": "\tif (!player) {\n\t\tpushBoolean(L, false);\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90bfb51a35ab6ac90c8c27d56b76756328c239cfe687100498911614e8081895" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 602, + "startColumn": 20, + "charOffset": 15989, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 600, + "startColumn": 20, + "charOffset": 15966, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, player->isExerciseTraining());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3159617a5880ba3cd93cdea8c6c2091d55759f8984c7635c039f1784ec50b21b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 602, + "startColumn": 20, + "charOffset": 15989, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 600, + "startColumn": 20, + "charOffset": 15966, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, player->isExerciseTraining());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd9a28fc6b2f07892a6782ef8ea00b0d4ac4dfcbd6c6c6e8571317cb27831839" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 610, + "startColumn": 21, + "charOffset": 16227, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 608, + "startColumn": 21, + "charOffset": 16125, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getFreeCapacity());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d6d70bb78e6f4183a23ede7d62926b08c72e9bdae7c84ea8c559cf6eaba046e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 620, + "startColumn": 6, + "charOffset": 16449, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 618, + "startColumn": 6, + "charOffset": 16355, + "charLength": 1, + "snippet": { + "text": "\t// player:getKills()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b85f7e2bef028cdf65bc36decb66c7033ecf96b4d4e28fc89f7245d83b8d26cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 625, + "startColumn": 21, + "charOffset": 16514, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 623, + "startColumn": 21, + "charOffset": 16490, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tlua_createtable(L, player->unjustifiedKills.size(), 0);\n\tint idx = 0;\n\tfor (const auto &kill : player->unjustifiedKills) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5801901e1dcb9afda41222364051630f8bec3a20f441523b7193329a1199be03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 625, + "startColumn": 21, + "charOffset": 16514, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 623, + "startColumn": 21, + "charOffset": 16490, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tlua_createtable(L, player->unjustifiedKills.size(), 0);\n\tint idx = 0;\n\tfor (const auto &kill : player->unjustifiedKills) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b37e3d542aa67111a28a17c3a198b24a115e3ccece7278da5788e1073415b98" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 627, + "startColumn": 2, + "charOffset": 16566, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 625, + "startColumn": 2, + "charOffset": 16494, + "charLength": 3, + "snippet": { + "text": "\tlua_createtable(L, player->unjustifiedKills.size(), 0);\n\tint idx = 0;\n\tfor (const auto &kill : player->unjustifiedKills) {\n\t\tlua_createtable(L, 3, 0);\n\t\tlua_pushnumber(L, kill.target);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa4ef3c33898c44e75788bd27db01b52e47b0b28530446793cc3c67ff490b26b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 629, + "startColumn": 21, + "charOffset": 16666, + "charLength": 4, + "snippet": { + "text": "kill" + } + }, + "contextRegion": { + "startLine": 627, + "startColumn": 21, + "charOffset": 16565, + "charLength": 4, + "snippet": { + "text": "\tfor (const auto &kill : player->unjustifiedKills) {\n\t\tlua_createtable(L, 3, 0);\n\t\tlua_pushnumber(L, kill.target);\n\t\tlua_rawseti(L, -2, 1);\n\t\tlua_pushnumber(L, kill.time);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f32dee19c75a6fd5ec34f78c85e3584e5ca752ca5c9cbef2ed1a5d729c12a02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'time_t' (aka 'long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 631, + "startColumn": 21, + "charOffset": 16725, + "charLength": 4, + "snippet": { + "text": "kill" + } + }, + "contextRegion": { + "startLine": 629, + "startColumn": 21, + "charOffset": 16646, + "charLength": 4, + "snippet": { + "text": "\t\tlua_pushnumber(L, kill.target);\n\t\tlua_rawseti(L, -2, 1);\n\t\tlua_pushnumber(L, kill.time);\n\t\tlua_rawseti(L, -2, 2);\n\t\tpushBoolean(L, kill.unavenged);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2064f2aeeb2b5c4eceb8bb525ab2801ed47a029e55d455b39ef444b5e32c3e40" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 631, + "startColumn": 21, + "charOffset": 16725, + "charLength": 4, + "snippet": { + "text": "kill" + } + }, + "contextRegion": { + "startLine": 629, + "startColumn": 21, + "charOffset": 16646, + "charLength": 4, + "snippet": { + "text": "\t\tlua_pushnumber(L, kill.target);\n\t\tlua_rawseti(L, -2, 1);\n\t\tlua_pushnumber(L, kill.time);\n\t\tlua_rawseti(L, -2, 2);\n\t\tpushBoolean(L, kill.unavenged);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "093810a433081d351a9dbf0e2fd6fb0e2461f91586c5e2095fb895cf7d810739" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 644, + "startColumn": 6, + "charOffset": 17022, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 642, + "startColumn": 6, + "charOffset": 16923, + "charLength": 1, + "snippet": { + "text": "\t// player:setKills(kills)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05528fb2b7ab98fe38cf465bbda37e5e07dd04e6a0e6955a8b848d168c15206a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 653, + "startColumn": 2, + "charOffset": 17150, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 651, + "startColumn": 2, + "charOffset": 17131, + "charLength": 5, + "snippet": { + "text": "\n\tlua_pushnil(L);\n\twhile (lua_next(L, 2) != 0) {\n\t\t// -2 is index, -1 is value\n\t\tluaL_checktype(L, -1, LUA_TTABLE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "048e9433755f8e2419ae4685386bb5edfdb52ea2cb9f8cb2bc478d78d1c06577" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 659, + "startColumn": 12, + "charOffset": 17379, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 657, + "startColumn": 12, + "charOffset": 17287, + "charLength": 12, + "snippet": { + "text": "\t\tlua_rawgeti(L, -2, 2); // push time\n\t\tlua_rawgeti(L, -3, 3); // push unavenged\n\t\tnewKills.emplace_back(luaL_checknumber(L, -3), luaL_checknumber(L, -2), getBoolean(L, -1));\n\t\tlua_pop(L, 4);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6116ab5df27630f22d29cd3dd4e9ddc4793cac947b281e145c4fd5cff71ced2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 672, + "startColumn": 6, + "charOffset": 17784, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 670, + "startColumn": 6, + "charOffset": 17659, + "charLength": 1, + "snippet": { + "text": "\t// player:getReward(rewardId[, autoCreate = false])\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a27e97f38a55e2272b27254e02902108632028aa3177f319155d1064ec403252" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 691, + "startColumn": 6, + "charOffset": 18268, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 689, + "startColumn": 6, + "charOffset": 18162, + "charLength": 1, + "snippet": { + "text": "\t// player:removeReward(rewardId)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efa5a9c5990f9d6a23127c48af9b697deb1d4f16187f5953459401fad6a5bfab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 705, + "startColumn": 6, + "charOffset": 18590, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 703, + "startColumn": 6, + "charOffset": 18491, + "charLength": 1, + "snippet": { + "text": "\t// player:getRewardList()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a29bafbf6e861b9b8a20b9057b4ae9ed29f9741396fc381b89e5142213b267b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 712, + "startColumn": 21, + "charOffset": 18724, + "charLength": 9, + "snippet": { + "text": "rewardVec" + } + }, + "contextRegion": { + "startLine": 710, + "startColumn": 21, + "charOffset": 18635, + "charLength": 9, + "snippet": { + "text": "\tstd::vector rewardVec;\n\tplayer->getRewardList(rewardVec);\n\tlua_createtable(L, rewardVec.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56f23c0210543d2a2b88ba8145277dee8c8260ced3b1975182a6cb07d0650e36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 712, + "startColumn": 21, + "charOffset": 18724, + "charLength": 9, + "snippet": { + "text": "rewardVec" + } + }, + "contextRegion": { + "startLine": 710, + "startColumn": 21, + "charOffset": 18635, + "charLength": 9, + "snippet": { + "text": "\tstd::vector rewardVec;\n\tplayer->getRewardList(rewardVec);\n\tlua_createtable(L, rewardVec.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d83598670191bc5e0cc9b9a8fc9679769a48f5335cc6e7a16f3a3ee9ad79cafb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 715, + "startColumn": 2, + "charOffset": 18764, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 713, + "startColumn": 2, + "charOffset": 18746, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (const auto &rewardId : rewardVec) {\n\t\tlua_pushnumber(L, static_cast(rewardId));\n\t\tlua_rawseti(L, -2, ++index);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5658b819f11004455e030861ada420215b2b91e3b1a54caada7d325b2dcfd8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-5", + "ruleIndex": 438, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-5: A cast shall not remove any const or volatile qualification from the type of a pointer or reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 716, + "startColumn": 21, + "charOffset": 18825, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 714, + "startColumn": 21, + "charOffset": 18747, + "charLength": 11, + "snippet": { + "text": "\tint index = 0;\n\tfor (const auto &rewardId : rewardVec) {\n\t\tlua_pushnumber(L, static_cast(rewardId));\n\t\tlua_rawseti(L, -2, ++index);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e794d9ca059c83c947f6f880d87d64d4b874b2fdac12308d1f130334e93bb805" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 737, + "startColumn": 6, + "charOffset": 19374, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 735, + "startColumn": 6, + "charOffset": 19267, + "charLength": 1, + "snippet": { + "text": "\t// player:getDepotLocker(depotId)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ce8024e695b5864c8984a7c7ce007a18219b80af3be566ff2a9d8e97cc27607" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 759, + "startColumn": 21, + "charOffset": 19980, + "charLength": 9, + "snippet": { + "text": "sizeStash" + } + }, + "contextRegion": { + "startLine": 757, + "startColumn": 21, + "charOffset": 19883, + "charLength": 9, + "snippet": { + "text": "\tif (player) {\n\t\tuint16_t sizeStash = getStashSize(player->getStashItems());\n\t\tlua_pushnumber(L, sizeStash);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "388b0adee2155c55539f9d34f7c1db305bad07d9e3d6d4e4eddb5b1ac246acb7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 769, + "startColumn": 6, + "charOffset": 20225, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 767, + "startColumn": 6, + "charOffset": 20097, + "charLength": 1, + "snippet": { + "text": "\t// player:getDepotChest(depotId[, autoCreate = false])\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d26286ae83b758edf696e4df9eb1c6d3ce22e5f2548f0cedb32646932101761" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 778, + "startColumn": 26, + "charOffset": 20491, + "charLength": 7, + "snippet": { + "text": "depotId" + } + }, + "contextRegion": { + "startLine": 776, + "startColumn": 26, + "charOffset": 20361, + "charLength": 7, + "snippet": { + "text": "\tstd::shared_ptr depotChest = player->getDepotChest(depotId, autoCreate);\n\tif (depotChest) {\n\t\tplayer->setLastDepotId(depotId);\n\t\tpushUserdata(L, depotChest);\n\t\tsetItemMetatable(L, -1, depotChest);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d06fcea84436f87cea6ca3c343fd865af079f703cae0a9f85ca7de3e0ce3fb6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 778, + "startColumn": 26, + "charOffset": 20491, + "charLength": 7, + "snippet": { + "text": "depotId" + } + }, + "contextRegion": { + "startLine": 776, + "startColumn": 26, + "charOffset": 20361, + "charLength": 7, + "snippet": { + "text": "\tstd::shared_ptr depotChest = player->getDepotChest(depotId, autoCreate);\n\tif (depotChest) {\n\t\tplayer->setLastDepotId(depotId);\n\t\tpushUserdata(L, depotChest);\n\t\tsetItemMetatable(L, -1, depotChest);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7eb417f9d979a4c927675c00f42364fbc79c23d7e9691d68b2552667889ee98" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 790, + "startColumn": 6, + "charOffset": 20778, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 788, + "startColumn": 6, + "charOffset": 20684, + "charLength": 1, + "snippet": { + "text": "\t// player:getInbox()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "859532ee9b8f0151248b4005ab7413e7a4ffab665eba30c4b795dd8cc8d97c99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int64_t' (aka 'long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 809, + "startColumn": 21, + "charOffset": 21194, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 807, + "startColumn": 21, + "charOffset": 21092, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getSkullTicks());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "142e1146a47650d5bd614ab3f286353e7e5f74afa3954cbbd61acdcbca14b99e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 809, + "startColumn": 21, + "charOffset": 21194, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 807, + "startColumn": 21, + "charOffset": 21092, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getSkullTicks());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "371dc34f02d2849ce4eff60575a2610747e77e0f08006ef33bd4081c9c65e2e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 832, + "startColumn": 21, + "charOffset": 21754, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 830, + "startColumn": 21, + "charOffset": 21652, + "charLength": 11, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, static_cast(player->getLostPercent() * 100));\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e80d9b0f687f87e2132078c6f0d90874820ec0c913729033bb6eee3f76372d07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 832, + "startColumn": 70, + "charOffset": 21803, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 830, + "startColumn": 70, + "charOffset": 21652, + "charLength": 3, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, static_cast(player->getLostPercent() * 100));\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9eec8b8a48b6ace6b38c0d55c4385c5b7dc1ac335a8f638731a55fde9172ddba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 843, + "startColumn": 21, + "charOffset": 22044, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 841, + "startColumn": 21, + "charOffset": 21942, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getExperience());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bf84092fc7f5d2b33f203908e6c1d5dc2e9cc6141e3a485a402fabde73e8f59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 843, + "startColumn": 21, + "charOffset": 22044, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 841, + "startColumn": 21, + "charOffset": 21942, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getExperience());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "021516f8cc9bbe8ebf98821a217d0cba6a4c70bcf02b0f35f46dba51945cbd03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 882, + "startColumn": 21, + "charOffset": 23126, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 880, + "startColumn": 21, + "charOffset": 23024, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getLevel());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7ca67c23edca8889e8ebe46dce07ef33df769d3d1c75ac37586d1dd6526719e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 893, + "startColumn": 21, + "charOffset": 23417, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 891, + "startColumn": 21, + "charOffset": 23315, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getMagicShieldCapacityFlat(getBoolean(L, 2, false)));\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc4833a6c74879c6c4964bf468720707fdb36d06bc6568a0bba05e462b1be09b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 904, + "startColumn": 21, + "charOffset": 23755, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 902, + "startColumn": 21, + "charOffset": 23653, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getMagicShieldCapacityPercent(getBoolean(L, 2, false)));\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ddd9d4fe04f7fb4e49888f90fddc8718842c313ebea9a763d7ded085548c342" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 914, + "startColumn": 6, + "charOffset": 24045, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 912, + "startColumn": 6, + "charOffset": 23929, + "charLength": 1, + "snippet": { + "text": "\t// player:sendSpellCooldown(spellId, time)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19e1164f020469f2262f37c5ca5782ca8e2a8ebabffa563f9e58abc9130768e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 918, + "startColumn": 20, + "charOffset": 24108, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 916, + "startColumn": 20, + "charOffset": 24074, + "charLength": 9, + "snippet": { + "text": "\t\treturn 1;\n\t}\n\tuint8_t spellId = getNumber(L, 2, 1);\n\tuint32_t time = getNumber(L, 3, 0);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbefb6f9b5ebf2580f90d618abe96685e047c26f7c8b0909a4758cdcc0fab379" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 919, + "startColumn": 2, + "charOffset": 24139, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 917, + "startColumn": 2, + "charOffset": 24086, + "charLength": 8, + "snippet": { + "text": "\t}\n\tuint8_t spellId = getNumber(L, 2, 1);\n\tuint32_t time = getNumber(L, 3, 0);\n\n\tplayer->sendSpellCooldown(spellId, time);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4742d017babd4692792e05482db1a02ce30822792e59645278e7170bc2aff3f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 930, + "startColumn": 6, + "charOffset": 24457, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 928, + "startColumn": 6, + "charOffset": 24336, + "charLength": 1, + "snippet": { + "text": "\t// player:sendSpellGroupCooldown(groupId, time)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "abf0acc023f95b6e67df019807e599b1b476fc4e1414d49b466ba52dd5bbd2d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 934, + "startColumn": 2, + "charOffset": 24502, + "charLength": 12, + "snippet": { + "text": "SpellGroup_t" + } + }, + "contextRegion": { + "startLine": 932, + "startColumn": 2, + "charOffset": 24486, + "charLength": 12, + "snippet": { + "text": "\t\treturn 1;\n\t}\n\tSpellGroup_t groupId = getNumber(L, 2, SPELLGROUP_ATTACK);\n\tuint32_t time = getNumber(L, 3, 0);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f25ac9cded01f41b0c9dd6f8965c808dbbfa08d7a64acc615f51d8ae31c9a68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 935, + "startColumn": 2, + "charOffset": 24576, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 933, + "startColumn": 2, + "charOffset": 24498, + "charLength": 8, + "snippet": { + "text": "\t}\n\tSpellGroup_t groupId = getNumber(L, 2, SPELLGROUP_ATTACK);\n\tuint32_t time = getNumber(L, 3, 0);\n\n\tplayer->sendSpellGroupCooldown(groupId, time);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "719d6b18476a38c8598bc3c8c71322206dd64dcb663ee545d1d0a6baa1c4748f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 947, + "startColumn": 21, + "charOffset": 24898, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 945, + "startColumn": 21, + "charOffset": 24796, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getMagicLevel());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "461398f9c2f29d7578cc392fa1406c861e07be6e7dacebb48100506d1483029d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 958, + "startColumn": 21, + "charOffset": 25166, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 956, + "startColumn": 21, + "charOffset": 25064, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getBaseMagicLevel());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d92a84aea83bd3a27cef813086364965797e817c03aca7a11687d340c7c6927" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 969, + "startColumn": 21, + "charOffset": 25418, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 967, + "startColumn": 21, + "charOffset": 25316, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getMana());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec4e41433e325792e29b9efcfca42365cbbb3867ae6cac8573bef683f98da182" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 979, + "startColumn": 6, + "charOffset": 25667, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 977, + "startColumn": 6, + "charOffset": 25537, + "charLength": 1, + "snippet": { + "text": "\t// player:addMana(manaChange[, animationOnLoss = false])\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29aa2f787298123a9ac4349fc3e6076e17e0bf1747418b3cf07629ac82d6720f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 992, + "startColumn": 12, + "charOffset": 25998, + "charLength": 16, + "snippet": { + "text": "combatChangeMana" + } + }, + "contextRegion": { + "startLine": 990, + "startColumn": 12, + "charOffset": 25919, + "charLength": 16, + "snippet": { + "text": "\t\tdamage.primary.value = manaChange;\n\t\tdamage.origin = ORIGIN_NONE;\n\t\tg_game().combatChangeMana(nullptr, player, damage);\n\t}\n\tpushBoolean(L, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "930adb7ac53799fdb1b8c1c9a3845d00c8da95d0ced6ed9bc8799ed2acfe50dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1002, + "startColumn": 21, + "charOffset": 26264, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1000, + "startColumn": 21, + "charOffset": 26162, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getMaxMana());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc649d2f979cccacee1b79095bb0cd26b127d9160049b8758a93e04e23bc0cb9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1012, + "startColumn": 6, + "charOffset": 26464, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1010, + "startColumn": 6, + "charOffset": 26389, + "charLength": 1, + "snippet": { + "text": "\t// player:setMaxMana(maxMana)\n\tconst auto &player = getPlayer(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ebbd80b804b728cdf332bff24289c18f5238d37238c01ee2d29c821d3fdb453" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1013, + "startColumn": 3, + "charOffset": 26477, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1011, + "startColumn": 3, + "charOffset": 26420, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getPlayer(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9ab0891e18be0dd9d2c0562b78e3af6354e604b42cb0ec75d914e414a695772" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1018, + "startColumn": 35, + "charOffset": 26631, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1016, + "startColumn": 35, + "charOffset": 26551, + "charLength": 6, + "snippet": { + "text": "\n\tplayer->manaMax = getNumber(L, 2);\n\tplayer->mana = std::min(player->mana, player->manaMax);\n\tg_game().addPlayerMana(player);\n\tplayer->sendStats();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1d103c522567a80a01ad82de083a7d1e7e0c7934eca5ee4dc07b1b218951661" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1018, + "startColumn": 49, + "charOffset": 26645, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1016, + "startColumn": 49, + "charOffset": 26551, + "charLength": 6, + "snippet": { + "text": "\n\tplayer->manaMax = getNumber(L, 2);\n\tplayer->mana = std::min(player->mana, player->manaMax);\n\tg_game().addPlayerMana(player);\n\tplayer->sendStats();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf84401e91a0e4c6ddb82002413a6a826fb59bab3323e8ea06490339d8334a9b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1029, + "startColumn": 21, + "charOffset": 26942, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1027, + "startColumn": 21, + "charOffset": 26840, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getSpentMana());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a095f1c60190e6882489dc3d8b4d6d7e33a1ab13bca9c61187f9d3d0fd62942" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1029, + "startColumn": 21, + "charOffset": 26942, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1027, + "startColumn": 21, + "charOffset": 26840, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getSpentMana());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e9160873ba110c87cdf8a24a92f3820eb142de673860a9e01c2cd351bf2ed8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1052, + "startColumn": 21, + "charOffset": 27500, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1050, + "startColumn": 21, + "charOffset": 27398, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->healthMax);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99ef96c140cdf6522fe6f35d42ce8b322daa8746097c11a10a0e623a708de830" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1063, + "startColumn": 21, + "charOffset": 27756, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1061, + "startColumn": 21, + "charOffset": 27654, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->manaMax);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99ef96c140cdf6522fe6f35d42ce8b322daa8746097c11a10a0e623a708de830" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1075, + "startColumn": 21, + "charOffset": 28093, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1073, + "startColumn": 21, + "charOffset": 27964, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player && skillType <= SKILL_LAST) {\n\t\tlua_pushnumber(L, player->skills[skillType].level);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59a0340d40a868cbc3e64b4d5083499254cd988904d365c027f7916e54ab2f8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1075, + "startColumn": 21, + "charOffset": 28093, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1073, + "startColumn": 21, + "charOffset": 27964, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player && skillType <= SKILL_LAST) {\n\t\tlua_pushnumber(L, player->skills[skillType].level);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "831f0efdc356fef0ed109e8d28018d83b471bdf5f2275822bd6b303ef32518bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1087, + "startColumn": 21, + "charOffset": 28464, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1085, + "startColumn": 21, + "charOffset": 28335, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player && skillType <= SKILL_LAST) {\n\t\tlua_pushnumber(L, player->getSkillLevel(skillType));\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5948b9497e420be838b3934b900f83da5017f7cf690cd9b188a0930ef4f3731" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1099, + "startColumn": 21, + "charOffset": 28822, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1097, + "startColumn": 21, + "charOffset": 28693, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player && skillType <= SKILL_LAST) {\n\t\tlua_pushnumber(L, player->skills[skillType].percent);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fff72596eab0ee9caa2364f2f6afbec664d1d686030d98e951cda0877195d93" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1111, + "startColumn": 21, + "charOffset": 29177, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1109, + "startColumn": 21, + "charOffset": 29048, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player && skillType <= SKILL_LAST) {\n\t\tlua_pushnumber(L, player->skills[skillType].tries);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2954f6c77c499378c57b2d958a573d461a405bcb7494a54f393181bbb2305482" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1111, + "startColumn": 21, + "charOffset": 29177, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1109, + "startColumn": 21, + "charOffset": 29048, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player && skillType <= SKILL_LAST) {\n\t\tlua_pushnumber(L, player->skills[skillType].tries);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2fda956370b9cfbd150382e0c488baadddebbb44086f65076886316c219c0f17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1111, + "startColumn": 21, + "charOffset": 29177, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1109, + "startColumn": 21, + "charOffset": 29048, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player && skillType <= SKILL_LAST) {\n\t\tlua_pushnumber(L, player->skills[skillType].tries);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bcdea6f7a78398ee9175be1e4861f67b32237a9f104a298e36fe0ceebda17905" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1161, + "startColumn": 30, + "charOffset": 30655, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 1159, + "startColumn": 30, + "charOffset": 30589, + "charLength": 1, + "snippet": { + "text": "\t\t} else {\n\t\t\tplayer->manaSpent = 0;\n\t\t\tplayer->magLevelPercent = 0;\n\t\t}\n\t\tplayer->sendStats();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3dc5e521905d9aa3b750b725674d115674a551e0a09849a102de1a2cabe9cd72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1178, + "startColumn": 3, + "charOffset": 31070, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1176, + "startColumn": 3, + "charOffset": 30972, + "charLength": 6, + "snippet": { + "text": "\t\tskills_t skillType = getNumber(L, 2);\n\t\tuint16_t level = getNumber(L, 3);\n\t\tplayer->skills[skillType].level = level;\n\t\tif (getNumber(L, 4, 0) > 0) {\n\t\t\tuint64_t tries = getNumber(L, 4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bef071dba436615cc384502670c1788dd1b89f9df3440ef1778abdce4008edb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1182, + "startColumn": 4, + "charOffset": 31288, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1180, + "startColumn": 4, + "charOffset": 31153, + "charLength": 6, + "snippet": { + "text": "\t\t\tuint64_t tries = getNumber(L, 4);\n\t\t\tuint64_t nextReqTries = player->vocation->getReqSkillTries(skillType, level + 1);\n\t\t\tplayer->skills[skillType].tries = tries;\n\t\t\tplayer->skills[skillType].percent = Player::getPercentLevel(tries, nextReqTries);\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6266f60452280c53b7dddfb3fefa26e4ff2df76742891743220a3ac6eb139f7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1183, + "startColumn": 4, + "charOffset": 31332, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1181, + "startColumn": 4, + "charOffset": 31200, + "charLength": 6, + "snippet": { + "text": "\t\t\tuint64_t nextReqTries = player->vocation->getReqSkillTries(skillType, level + 1);\n\t\t\tplayer->skills[skillType].tries = tries;\n\t\t\tplayer->skills[skillType].percent = Player::getPercentLevel(tries, nextReqTries);\n\t\t} else {\n\t\t\tplayer->skills[skillType].tries = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d6297936f546754e9d5fceb3b9cbbee3e0f9c025d88fbe7353d2a8bff0817b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1185, + "startColumn": 4, + "charOffset": 31428, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1183, + "startColumn": 4, + "charOffset": 31329, + "charLength": 6, + "snippet": { + "text": "\t\t\tplayer->skills[skillType].percent = Player::getPercentLevel(tries, nextReqTries);\n\t\t} else {\n\t\t\tplayer->skills[skillType].tries = 0;\n\t\t\tplayer->skills[skillType].percent = 0;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aaa61f48eb4ebc979ed5e1eedc8e72058561c7f01a3fbe4c5afdd28a4eeedba7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1186, + "startColumn": 4, + "charOffset": 31468, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1184, + "startColumn": 4, + "charOffset": 31414, + "charLength": 6, + "snippet": { + "text": "\t\t} else {\n\t\t\tplayer->skills[skillType].tries = 0;\n\t\t\tplayer->skills[skillType].percent = 0;\n\t\t}\n\t\tplayer->sendStats();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5459cea0c0ad44bb0e72891ce6c976991db44037aaef921090ecd08eed2e139c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1186, + "startColumn": 40, + "charOffset": 31504, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 1184, + "startColumn": 40, + "charOffset": 31414, + "charLength": 1, + "snippet": { + "text": "\t\t} else {\n\t\t\tplayer->skills[skillType].tries = 0;\n\t\t\tplayer->skills[skillType].percent = 0;\n\t\t}\n\t\tplayer->sendStats();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c38a2e97bf72124e30120179bfc1b923e8c9b80c26c934ea945a1714c89948e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1215, + "startColumn": 21, + "charOffset": 32200, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1213, + "startColumn": 21, + "charOffset": 32098, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getOfflineTrainingTime());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4457a9c416d9fcfb043f9372daa7e67d651b94c6684c68f464391fb8ba704d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1253, + "startColumn": 21, + "charOffset": 33279, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1251, + "startColumn": 21, + "charOffset": 33177, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getOfflineTrainingSkill());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26788beb108f8f08f4ea088d3a3c0f0f0f79233edfd569900736b19f7773ec15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1290, + "startColumn": 6, + "charOffset": 34199, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1288, + "startColumn": 6, + "charOffset": 34079, + "charLength": 1, + "snippet": { + "text": "\t// player:getItemCount(itemId[, subType = -1])\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5723d2499cba12033d1d62210c9040d0d149a859dd4bab257c5ac1743ae5f80f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'itemId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1295, + "startColumn": 11, + "charOffset": 34254, + "charLength": 6, + "snippet": { + "text": "itemId" + } + }, + "contextRegion": { + "startLine": 1293, + "startColumn": 11, + "charOffset": 34240, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tuint16_t itemId;\n\tif (isNumber(L, 2)) {\n\t\titemId = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd6131afd3adeb07bf4d36a8017908d78b9a07e94c60773c3ef7762c764073ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1306, + "startColumn": 2, + "charOffset": 34452, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 1304, + "startColumn": 2, + "charOffset": 34447, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tint32_t subType = getNumber(L, 3, -1);\n\tlua_pushnumber(L, player->getItemTypeCount(itemId, subType));\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb6627cdae6655c5b9b79981dbd80b69f09a84772c0fb75702b66de19ee69db7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1307, + "startColumn": 20, + "charOffset": 34519, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1305, + "startColumn": 20, + "charOffset": 34450, + "charLength": 6, + "snippet": { + "text": "\n\tint32_t subType = getNumber(L, 3, -1);\n\tlua_pushnumber(L, player->getItemTypeCount(itemId, subType));\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01b4887b84824d1b3863caa33d2796d508d1ccfaeaf5a689e63aeae8e1e41309" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1314, + "startColumn": 6, + "charOffset": 34750, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1312, + "startColumn": 6, + "charOffset": 34641, + "charLength": 1, + "snippet": { + "text": "\t// player:getStashItemCount(itemId)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "287c7822453104180aa9d2ac1e6570311570a1f47ed5d9d41af88b6f9e75c6c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'itemId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1319, + "startColumn": 11, + "charOffset": 34805, + "charLength": 6, + "snippet": { + "text": "itemId" + } + }, + "contextRegion": { + "startLine": 1317, + "startColumn": 11, + "charOffset": 34791, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tuint16_t itemId;\n\tif (isNumber(L, 2)) {\n\t\titemId = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7456960b10ee7b5ae30ad05a9d673fadb1303444541725edfb6308c2a6f190d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1336, + "startColumn": 20, + "charOffset": 35129, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1334, + "startColumn": 20, + "charOffset": 35106, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, player->getStashItemCount(itemType.id));\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1574d2249a360fff7696960229414db322f55a1cd9d9173df5af35fd003d30ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1343, + "startColumn": 6, + "charOffset": 35373, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1341, + "startColumn": 6, + "charOffset": 35242, + "charLength": 1, + "snippet": { + "text": "\t// player:getItemById(itemId, deepSearch[, subType = -1])\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "254ebd62183110d5a1104dceb6c6f3b4dd0f1c21027accb5b0432002e03b97ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'itemId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1348, + "startColumn": 11, + "charOffset": 35428, + "charLength": 6, + "snippet": { + "text": "itemId" + } + }, + "contextRegion": { + "startLine": 1346, + "startColumn": 11, + "charOffset": 35414, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tuint16_t itemId;\n\tif (isNumber(L, 2)) {\n\t\titemId = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "389cd485718ac9bc017c9d47675cf63d990040ca5b9c6e103008d90f4f42fe8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1359, + "startColumn": 2, + "charOffset": 35662, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 1357, + "startColumn": 2, + "charOffset": 35621, + "charLength": 7, + "snippet": { + "text": "\t}\n\tbool deepSearch = getBoolean(L, 3);\n\tint32_t subType = getNumber(L, 4, -1);\n\n\tstd::shared_ptr item = g_game().findItemOfType(player, itemId, deepSearch, subType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "110a3158522dd54f7e96832e882b7aae1056cd82f03470fe770e8586d2a28532" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1386, + "startColumn": 6, + "charOffset": 36399, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1384, + "startColumn": 6, + "charOffset": 36280, + "charLength": 1, + "snippet": { + "text": "\t// player:setVocation(id or name or userdata)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4d0841cb986652236d39a14c4b399b0ecaa02ffca689e81c8b5e9d05cc0fc9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1402, + "startColumn": 6, + "charOffset": 36808, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1400, + "startColumn": 6, + "charOffset": 36799, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!vocation) {\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d187126096734c1b6ed85ab8601e1b722a7cde9b1eb0add8ebe033905620f66" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1407, + "startColumn": 10, + "charOffset": 36871, + "charLength": 11, + "snippet": { + "text": "setVocation" + } + }, + "contextRegion": { + "startLine": 1405, + "startColumn": 10, + "charOffset": 36858, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\tplayer->setVocation(vocation->getId());\n\tplayer->sendSkills();\n\tplayer->sendStats();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "363e55f6869d86acd78db078c778107a9ffc831ce5899116695570f8b4093fa2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1432, + "startColumn": 21, + "charOffset": 37512, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1430, + "startColumn": 21, + "charOffset": 37410, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getSex());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a2cdf36a569b2ac4b8773cfd5a1d96e7169bf2c9b4fa28dc5bd6b904026adfe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1456, + "startColumn": 21, + "charOffset": 38068, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1454, + "startColumn": 21, + "charOffset": 37966, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getPronoun());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7705a51388c046c0a6ac647eecf11166168886f871a5ee801699bbf32594dfa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1491, + "startColumn": 6, + "charOffset": 38889, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1489, + "startColumn": 6, + "charOffset": 38808, + "charLength": 1, + "snippet": { + "text": "\t// player:setTown(town)\n\tconst auto &town = getUserdataShared(L, 2);\n\tif (!town) {\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3f336367eef1fb590457594581c2e20c38c16e49fe2e1234e049c7abd598cc5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1509, + "startColumn": 6, + "charOffset": 39264, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1507, + "startColumn": 6, + "charOffset": 39170, + "charLength": 1, + "snippet": { + "text": "\t// player:getGuild()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ebbd80b804b728cdf332bff24289c18f5238d37238c01ee2d29c821d3fdb453" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1515, + "startColumn": 6, + "charOffset": 39354, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1513, + "startColumn": 6, + "charOffset": 39308, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto guild = player->getGuild();\n\tif (!guild) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc2fbbf0f51e56a39264758d86e79cc477d785f4ac2f975687b3db7daa0f1be8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1528, + "startColumn": 6, + "charOffset": 39629, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1526, + "startColumn": 6, + "charOffset": 39530, + "charLength": 1, + "snippet": { + "text": "\t// player:setGuild(guild)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef28b734dcb2f335df705760f329fa27d6a352f1a2be08f6a49a19dc49d6263e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1544, + "startColumn": 21, + "charOffset": 40001, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1542, + "startColumn": 21, + "charOffset": 39877, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player && player->getGuild()) {\n\t\tlua_pushnumber(L, player->getGuildRank()->level);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7351e6b2895ac64d031bfc34d1e4cb1d9523b7cd4abbcf9bc02020b031cbd9aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1555, + "startColumn": 6, + "charOffset": 40285, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1553, + "startColumn": 6, + "charOffset": 40170, + "charLength": 1, + "snippet": { + "text": "\tuint8_t level = getNumber(L, 2);\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || !player->getGuild()) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "affd33996331d0513d490783dabefd6ab2c077ff9b149b8e0d28653ae78da37d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1555, + "startColumn": 17, + "charOffset": 40296, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1553, + "startColumn": 17, + "charOffset": 40170, + "charLength": 1, + "snippet": { + "text": "\tuint8_t level = getNumber(L, 2);\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || !player->getGuild()) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17a8ae109adfb5327243b8c0eef6e1b12f76567614122118161e2e8c3bffa819" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1561, + "startColumn": 6, + "charOffset": 40423, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1559, + "startColumn": 6, + "charOffset": 40352, + "charLength": 1, + "snippet": { + "text": "\n\tGuildRank_ptr rank = player->getGuild()->getRankByLevel(level);\n\tif (!rank) {\n\t\tpushBoolean(L, false);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd1e2cf53618ee51b72b26127eb2296c49f138288bb642429abd0f550807d676" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1610, + "startColumn": 6, + "charOffset": 41539, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1608, + "startColumn": 6, + "charOffset": 41443, + "charLength": 1, + "snippet": { + "text": "\t// player:setGroup(group)\n\tstd::shared_ptr group = getUserdataShared(L, 2);\n\tif (!group) {\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29aa2f787298123a9ac4349fc3e6076e17e0bf1747418b3cf07629ac82d6720f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1644, + "startColumn": 21, + "charOffset": 42482, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1642, + "startColumn": 21, + "charOffset": 42380, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getStaminaMinutes());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f982089c3935ee110db978a5bf89054c2320008844e54489220e1106d75ba983" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2520 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1656, + "startColumn": 47, + "charOffset": 42820, + "charLength": 4, + "snippet": { + "text": "2520" + } + }, + "contextRegion": { + "startLine": 1654, + "startColumn": 47, + "charOffset": 42692, + "charLength": 4, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tplayer->staminaMinutes = std::min(2520, stamina);\n\t\tplayer->sendStats();\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35bfb00620fc0ba5c6de9c06033dd07b0b0d8d4768d0f276a1eb011225ec3401" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1668, + "startColumn": 21, + "charOffset": 43081, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1666, + "startColumn": 21, + "charOffset": 42979, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getSoul());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a93fd149f2cb44386120d4cb89da09868fb441862ace8ee9037a1e12b37769cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1692, + "startColumn": 21, + "charOffset": 43667, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1690, + "startColumn": 21, + "charOffset": 43545, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player && player->vocation) {\n\t\tlua_pushnumber(L, player->vocation->getSoulMax());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ca2963af3fd0b1b82cf4a0e4bbee3a3d87ce390ba82d21b2f6c7a2d1bca476e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1703, + "startColumn": 21, + "charOffset": 43936, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1701, + "startColumn": 21, + "charOffset": 43834, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getBankBalance());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cecee69d50ae5bccc909325a2dc57133e01ead18ed322f9addc073f29e927f0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1703, + "startColumn": 21, + "charOffset": 43936, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1701, + "startColumn": 21, + "charOffset": 43834, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getBankBalance());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4f47f8fd5e3dace7d09630ca47e7b8ee758b6689e58bd4ef2633da5142a41bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1713, + "startColumn": 6, + "charOffset": 44180, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1711, + "startColumn": 6, + "charOffset": 44069, + "charLength": 1, + "snippet": { + "text": "\t// player:setBankBalance(bankBalance)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db94bf31613b86db21f25dca6204f6554d2b182710bbcad67b8c5c7fb4c7c21d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1726, + "startColumn": 6, + "charOffset": 44467, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1724, + "startColumn": 6, + "charOffset": 44376, + "charLength": 1, + "snippet": { + "text": "\t// player:getStorageValue(key)\n\tconst auto player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4ff20a295a5dbc1d392ba234ba724c0744f89458bbf90fc12c7cf8428fc0a0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1732, + "startColumn": 20, + "charOffset": 44574, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1730, + "startColumn": 20, + "charOffset": 44511, + "charLength": 6, + "snippet": { + "text": "\n\tuint32_t key = getNumber(L, 2);\n\tlua_pushnumber(L, player->getStorageValue(key));\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df25cd6fccb933573099b1638ff4c6080206ea13f346d8801eaf499ee2d9e8cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1744, + "startColumn": 3, + "charOffset": 44989, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1742, + "startColumn": 3, + "charOffset": 44917, + "charLength": 15, + "snippet": { + "text": "\t\tstd::ostringstream ss;\n\t\tss << \"Accessing reserved range: \" << key;\n\t\treportErrorFunc(ss.str());\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78fbb437bd83821ca6c2121525f3d0c7638b87cbe5b474bf5b62098d087f3629" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1750, + "startColumn": 3, + "charOffset": 45076, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1748, + "startColumn": 3, + "charOffset": 45056, + "charLength": 15, + "snippet": { + "text": "\n\tif (key == 0) {\n\t\treportErrorFunc(\"Storage key is nil\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f81f664504f36e897f4d9d4107070f9cc033cfca4087838893f19a9a12d0899" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1766, + "startColumn": 6, + "charOffset": 45433, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1764, + "startColumn": 6, + "charOffset": 45322, + "charLength": 1, + "snippet": { + "text": "\t// player:getStorageValueByName(name)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9875898d93e6c045907907dbe5de659cfbd9603402727257b6a020b8b05c9be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1767, + "startColumn": 3, + "charOffset": 45446, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1765, + "startColumn": 3, + "charOffset": 45361, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8576f16b8f882e587bf96abc70c8b60fd6f7e4c0f3bd939c68231601fbec8d12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1774, + "startColumn": 20, + "charOffset": 45735, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1772, + "startColumn": 20, + "charOffset": 45546, + "charLength": 6, + "snippet": { + "text": "\tg_logger().warn(\"The function 'player:getStorageValueByName' is deprecated and will be removed in future versions, please use KV system\");\n\tauto name = getString(L, 2);\n\tlua_pushnumber(L, player->getStorageValueByName(name));\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad5b1729c01e7f91af2599c58bfa247ca9c53d10451c690723ddf39d4d8e3b0c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1781, + "startColumn": 6, + "charOffset": 45980, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1779, + "startColumn": 6, + "charOffset": 45855, + "charLength": 1, + "snippet": { + "text": "\t// player:setStorageValueByName(storageName, value)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd69fb6cdf7a37ce2fc3411e9588c9493860ee6760493944baf0f95e49d6916b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1782, + "startColumn": 3, + "charOffset": 45993, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1780, + "startColumn": 3, + "charOffset": 45908, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a355b2ef648147d39c467743ce3239e311f653a973ac089cf195daf222e4a244" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'luaPlayerAddItem' has cognitive complexity of 30 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1796, + "startColumn": 22, + "charOffset": 46424, + "charLength": 16, + "snippet": { + "text": "luaPlayerAddItem" + } + }, + "contextRegion": { + "startLine": 1794, + "startColumn": 22, + "charOffset": 46400, + "charLength": 16, + "snippet": { + "text": "}\n\nint PlayerFunctions::luaPlayerAddItem(lua_State* L) {\n\t// player:addItem(itemId, count = 1, canDropOnMap = true, subType = 1, slot = CONST_SLOT_WHEREEVER, tier = 0)\n\tstd::shared_ptr player = getUserdataShared(L, 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95b1ecc07e9636018cdd3e1d62c6f70e90ec06737747cb0eafdb1d8c82b56971" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1799, + "startColumn": 6, + "charOffset": 46640, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1797, + "startColumn": 6, + "charOffset": 46457, + "charLength": 1, + "snippet": { + "text": "\t// player:addItem(itemId, count = 1, canDropOnMap = true, subType = 1, slot = CONST_SLOT_WHEREEVER, tier = 0)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "558c8c78518ed6a980432f43028a8a8230b5c5642b1b61499ea7c65b76b7f392" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'itemId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1804, + "startColumn": 11, + "charOffset": 46702, + "charLength": 6, + "snippet": { + "text": "itemId" + } + }, + "contextRegion": { + "startLine": 1802, + "startColumn": 11, + "charOffset": 46688, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tuint16_t itemId;\n\tif (isNumber(L, 2)) {\n\t\titemId = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0926eac1ef64503e8e8a7449573fd7687867d432957f0c9d92c964fa8386ce25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1815, + "startColumn": 2, + "charOffset": 46900, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 1813, + "startColumn": 2, + "charOffset": 46895, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tint32_t count = getNumber(L, 3, 1);\n\tint32_t subType = getNumber(L, 5, 1);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a66c0becad57913cb8bfc6af52298a1690824691d585dad3eb2d1384922a98d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1816, + "startColumn": 2, + "charOffset": 46946, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 1814, + "startColumn": 2, + "charOffset": 46898, + "charLength": 7, + "snippet": { + "text": "\n\tint32_t count = getNumber(L, 3, 1);\n\tint32_t subType = getNumber(L, 5, 1);\n\n\tconst ItemType &it = Item::items[itemId];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92cd76177976737fff14915758fd8366877a5f35f6c2c15d6d60f9990067beae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1816, + "startColumn": 42, + "charOffset": 46986, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 1814, + "startColumn": 42, + "charOffset": 46898, + "charLength": 1, + "snippet": { + "text": "\n\tint32_t count = getNumber(L, 3, 1);\n\tint32_t subType = getNumber(L, 5, 1);\n\n\tconst ItemType &it = Item::items[itemId];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e15110db9d66d5d4690c972b900d82788284d838df8fb1dbc707bf3b0b30c3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1822, + "startColumn": 23, + "charOffset": 47117, + "charLength": 1, + "snippet": { + "text": "{" + } + }, + "contextRegion": { + "startLine": 1820, + "startColumn": 23, + "charOffset": 47038, + "charLength": 1, + "snippet": { + "text": "\tint32_t itemCount = 1;\n\tint parameters = lua_gettop(L);\n\tif (parameters >= 4) {\n\t\titemCount = std::max(1, count);\n\t} else if (it.hasSubType()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b29e23df0cecf56e5e31c93a6c81f4d93727ea2be3f7cfb7f0d0a2cea886fb37" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1826, + "startColumn": 16, + "charOffset": 47230, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1824, + "startColumn": 16, + "charOffset": 47162, + "charLength": 3, + "snippet": { + "text": "\t} else if (it.hasSubType()) {\n\t\tif (it.stackable) {\n\t\t\titemCount = std::ceil(count / (float_t)it.stackSize);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f463ed6a48ea7d1c12700671a19cd6dcf8f5e5a15a8ddfe01ad8774e726086fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float_t' (aka 'float')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1826, + "startColumn": 26, + "charOffset": 47240, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 1824, + "startColumn": 26, + "charOffset": 47162, + "charLength": 5, + "snippet": { + "text": "\t} else if (it.hasSubType()) {\n\t\tif (it.stackable) {\n\t\t\titemCount = std::ceil(count / (float_t)it.stackSize);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec33159ed7d7157d9450a1885486c5a09aac0edbc7155aee0227c314fa30ef91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1826, + "startColumn": 34, + "charOffset": 47248, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1824, + "startColumn": 34, + "charOffset": 47162, + "charLength": 1, + "snippet": { + "text": "\t} else if (it.hasSubType()) {\n\t\tif (it.stackable) {\n\t\t\titemCount = std::ceil(count / (float_t)it.stackSize);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44683ddb9d0874a2552b6d03dbb94f949051fe0019533b3eb8a56550987b0159" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1835, + "startColumn": 2, + "charOffset": 47386, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1833, + "startColumn": 2, + "charOffset": 47352, + "charLength": 2, + "snippet": { + "text": "\n\tbool hasTable = itemCount > 1;\n\tif (hasTable) {\n\t\tlua_newtable(L);\n\t} else if (itemCount == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6bfa5be6b76de48df5a023fe1fa04e92b925b9c9ff169c4d1df617ceac59cb8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1843, + "startColumn": 2, + "charOffset": 47531, + "charLength": 7, + "snippet": { + "text": "Slots_t" + } + }, + "contextRegion": { + "startLine": 1841, + "startColumn": 2, + "charOffset": 47484, + "charLength": 7, + "snippet": { + "text": "\n\tbool canDropOnMap = getBoolean(L, 4, true);\n\tSlots_t slot = getNumber(L, 6, CONST_SLOT_WHEREEVER);\n\tauto tier = getNumber(L, 7, 0);\n\tfor (int32_t i = 1; i <= itemCount; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a466b75b57812debcc5203845e8f89f8302692c254fd128d95e2a87bbcd5ed1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1843, + "startColumn": 39, + "charOffset": 47568, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 1841, + "startColumn": 39, + "charOffset": 47484, + "charLength": 1, + "snippet": { + "text": "\n\tbool canDropOnMap = getBoolean(L, 4, true);\n\tSlots_t slot = getNumber(L, 6, CONST_SLOT_WHEREEVER);\n\tauto tier = getNumber(L, 7, 0);\n\tfor (int32_t i = 1; i <= itemCount; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa9adfabb47a9cd249f768d8ab25263b064ad20ebd9609bdd4f65c4e368fb0ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1844, + "startColumn": 36, + "charOffset": 47629, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 1842, + "startColumn": 36, + "charOffset": 47485, + "charLength": 1, + "snippet": { + "text": "\tbool canDropOnMap = getBoolean(L, 4, true);\n\tSlots_t slot = getNumber(L, 6, CONST_SLOT_WHEREEVER);\n\tauto tier = getNumber(L, 7, 0);\n\tfor (int32_t i = 1; i <= itemCount; ++i) {\n\t\tint32_t stackCount = subType;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db25637a5e91147421911b558eace748a9735f624c1bc007f76380df26a1c84b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1845, + "startColumn": 2, + "charOffset": 47637, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1843, + "startColumn": 2, + "charOffset": 47530, + "charLength": 3, + "snippet": { + "text": "\tSlots_t slot = getNumber(L, 6, CONST_SLOT_WHEREEVER);\n\tauto tier = getNumber(L, 7, 0);\n\tfor (int32_t i = 1; i <= itemCount; ++i) {\n\t\tint32_t stackCount = subType;\n\t\tif (it.stackable) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a79da0b39a3a3e97df88c6e646a855ae9f2d2f9978dcfcbc84304ece795d59d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'itemCount' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1845, + "startColumn": 22, + "charOffset": 47657, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1843, + "startColumn": 22, + "charOffset": 47530, + "charLength": 1, + "snippet": { + "text": "\tSlots_t slot = getNumber(L, 6, CONST_SLOT_WHEREEVER);\n\tauto tier = getNumber(L, 7, 0);\n\tfor (int32_t i = 1; i <= itemCount; ++i) {\n\t\tint32_t stackCount = subType;\n\t\tif (it.stackable) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e51e349dc16b29f4dfb567374e7dfea29bce08fa1cce50704b44edb9899fd04f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1852, + "startColumn": 57, + "charOffset": 47882, + "charLength": 10, + "snippet": { + "text": "stackCount" + } + }, + "contextRegion": { + "startLine": 1850, + "startColumn": 57, + "charOffset": 47821, + "charLength": 10, + "snippet": { + "text": "\t\t}\n\n\t\tstd::shared_ptr item = Item::CreateItem(itemId, stackCount);\n\t\tif (!item) {\n\t\t\tif (!hasTable) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "046de93843e4407497cd43924964d814c437982531a221e2802e40945f35b86a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1853, + "startColumn": 7, + "charOffset": 47901, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1851, + "startColumn": 7, + "charOffset": 47825, + "charLength": 1, + "snippet": { + "text": "\n\t\tstd::shared_ptr item = Item::CreateItem(itemId, stackCount);\n\t\tif (!item) {\n\t\t\tif (!hasTable) {\n\t\t\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25e88570fa621ca86268b0baee512d7bc22725a1425f050bb8dde1676c818754" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1873, + "startColumn": 22, + "charOffset": 48244, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1871, + "startColumn": 22, + "charOffset": 48204, + "charLength": 1, + "snippet": { + "text": "\n\t\tif (hasTable) {\n\t\t\tlua_pushnumber(L, i);\n\t\t\tpushUserdata(L, item);\n\t\t\tsetItemMetatable(L, -1, item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6fd5220597690bfc6aa53e64901ce5f74f98234940b2d9cadf1e7be72981fa66" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1889, + "startColumn": 6, + "charOffset": 48730, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1887, + "startColumn": 6, + "charOffset": 48583, + "charLength": 1, + "snippet": { + "text": "\t// player:addItemEx(item[, canDropOnMap = true[, slot = CONST_SLOT_WHEREEVER]])\n\tstd::shared_ptr item = getUserdataShared(L, 2);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7508aa73fd2e8ddea7f21ee10f2c5996280cb25f424b38be2759430f3c343851" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1890, + "startColumn": 3, + "charOffset": 48741, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1888, + "startColumn": 3, + "charOffset": 48664, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr item = getUserdataShared(L, 2);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "182276491e318d30963502acbb2131ec162c990d766fa0b2c4aa0d7d0572d061" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1896, + "startColumn": 6, + "charOffset": 48911, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1894, + "startColumn": 6, + "charOffset": 48838, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d95ccb57c42d0b27fd940393d7931fd29db1bb4d3192d0e399682248619f8be9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1902, + "startColumn": 3, + "charOffset": 49020, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1900, + "startColumn": 3, + "charOffset": 48955, + "charLength": 15, + "snippet": { + "text": "\n\tif (item->getParent() != VirtualCylinder::virtualCylinder) {\n\t\treportErrorFunc(\"Item already has a parent\");\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c7eed3a957d5e5cd589b46e7e6842b7babfa0d94f63d20f0336137f9b021b1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'returnValue' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1908, + "startColumn": 14, + "charOffset": 49166, + "charLength": 11, + "snippet": { + "text": "returnValue" + } + }, + "contextRegion": { + "startLine": 1906, + "startColumn": 14, + "charOffset": 49106, + "charLength": 11, + "snippet": { + "text": "\n\tbool canDropOnMap = getBoolean(L, 3, false);\n\tReturnValue returnValue;\n\tif (canDropOnMap) {\n\t\tSlots_t slot = getNumber(L, 4, CONST_SLOT_WHEREEVER);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63de873015997c9fe1e4835295f7240f0fe02342f6dda7ab4f0baf0251ab07e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1910, + "startColumn": 3, + "charOffset": 49202, + "charLength": 7, + "snippet": { + "text": "Slots_t" + } + }, + "contextRegion": { + "startLine": 1908, + "startColumn": 3, + "charOffset": 49153, + "charLength": 7, + "snippet": { + "text": "\tReturnValue returnValue;\n\tif (canDropOnMap) {\n\t\tSlots_t slot = getNumber(L, 4, CONST_SLOT_WHEREEVER);\n\t\treturnValue = g_game().internalPlayerAddItem(player, item, true, slot);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77695bfaa4ffbc3932c747978cb6a647c318505b37cc9e92ee948c5b406a7828" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1913, + "startColumn": 3, + "charOffset": 49351, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 1911, + "startColumn": 3, + "charOffset": 49265, + "charLength": 7, + "snippet": { + "text": "\t\treturnValue = g_game().internalPlayerAddItem(player, item, true, slot);\n\t} else {\n\t\tint32_t index = getNumber(L, 4, INDEX_WHEREEVER);\n\t\tuint32_t flags = getNumber(L, 5, 0);\n\t\treturnValue = g_game().internalAddItem(player, item, index, flags);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6628bf54ffdf4ca1f8f1f33893e6046895396fd06ca1838d9bd886f28f08ac9c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1914, + "startColumn": 3, + "charOffset": 49412, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 1912, + "startColumn": 3, + "charOffset": 49339, + "charLength": 8, + "snippet": { + "text": "\t} else {\n\t\tint32_t index = getNumber(L, 4, INDEX_WHEREEVER);\n\t\tuint32_t flags = getNumber(L, 5, 0);\n\t\treturnValue = g_game().internalAddItem(player, item, index, flags);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a8dcd18fb21474589a5368a1b27e00967d114bfc435e6413f27451940f1c65e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1914, + "startColumn": 43, + "charOffset": 49452, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 1912, + "startColumn": 43, + "charOffset": 49339, + "charLength": 1, + "snippet": { + "text": "\t} else {\n\t\tint32_t index = getNumber(L, 4, INDEX_WHEREEVER);\n\t\tuint32_t flags = getNumber(L, 5, 0);\n\t\treturnValue = g_game().internalAddItem(player, item, index, flags);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2ca56e7a5c3034dc6b5abcf5fdf0e10a3bd4f8643fce5136dbed53c00ca5580" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1921, + "startColumn": 20, + "charOffset": 49641, + "charLength": 11, + "snippet": { + "text": "returnValue" + } + }, + "contextRegion": { + "startLine": 1919, + "startColumn": 20, + "charOffset": 49576, + "charLength": 11, + "snippet": { + "text": "\t\tScriptEnvironment::removeTempItem(item);\n\t}\n\tlua_pushnumber(L, returnValue);\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96facb71bd4d56beaa2b3407c0d584b79ab3f710f53668e400758444a0a8492e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1928, + "startColumn": 6, + "charOffset": 49843, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1926, + "startColumn": 6, + "charOffset": 49728, + "charLength": 1, + "snippet": { + "text": "\t// player:addItemStash(itemId, count = 1)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4ff20a295a5dbc1d392ba234ba724c0744f89458bbf90fc12c7cf8428fc0a0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1944, + "startColumn": 6, + "charOffset": 50228, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1942, + "startColumn": 6, + "charOffset": 50114, + "charLength": 1, + "snippet": { + "text": "\t// player:removeStashItem(itemId, count)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "053414d9247d4fde1d4f6152dcdc9f6fc4c82ae1158d798d8ed4acdcd2bd7d6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'itemId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1949, + "startColumn": 11, + "charOffset": 50283, + "charLength": 6, + "snippet": { + "text": "itemId" + } + }, + "contextRegion": { + "startLine": 1947, + "startColumn": 11, + "charOffset": 50269, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tuint16_t itemId;\n\tif (isNumber(L, 2)) {\n\t\titemId = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "662de29eb789fb9794dc826209d709a865f1f6a8fff515338b74e81fe38b3895" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1974, + "startColumn": 6, + "charOffset": 50914, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1972, + "startColumn": 6, + "charOffset": 50763, + "charLength": 1, + "snippet": { + "text": "\t// player:removeItem(itemId, count[, subType = -1[, ignoreEquipped = false]])\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f43ec5a32aaef4f50a055c196484a3da239531252b741b39588268163bd990a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'itemId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1979, + "startColumn": 11, + "charOffset": 50969, + "charLength": 6, + "snippet": { + "text": "itemId" + } + }, + "contextRegion": { + "startLine": 1977, + "startColumn": 11, + "charOffset": 50955, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tuint16_t itemId;\n\tif (isNumber(L, 2)) {\n\t\titemId = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb1da64682eac81f4917d93aae69a9206e9ebe3182585e9eb89ddb987d1df982" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1991, + "startColumn": 2, + "charOffset": 51212, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 1989, + "startColumn": 2, + "charOffset": 51165, + "charLength": 7, + "snippet": { + "text": "\n\tuint32_t count = getNumber(L, 3);\n\tint32_t subType = getNumber(L, 4, -1);\n\tbool ignoreEquipped = getBoolean(L, 5, false);\n\tpushBoolean(L, player->removeItemOfType(itemId, count, subType, ignoreEquipped));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97183ff3a5c3f9d2fd5ff946e2914151c022f32fc903cace81834d5788c8922b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 1992, + "startColumn": 38, + "charOffset": 51297, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 1990, + "startColumn": 38, + "charOffset": 51166, + "charLength": 1, + "snippet": { + "text": "\tuint32_t count = getNumber(L, 3);\n\tint32_t subType = getNumber(L, 4, -1);\n\tbool ignoreEquipped = getBoolean(L, 5, false);\n\tpushBoolean(L, player->removeItemOfType(itemId, count, subType, ignoreEquipped));\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44188e047868003fa8c96f1b0e1f69b562a46cceb2eefed2d7252f9acd7af3db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2000, + "startColumn": 6, + "charOffset": 51573, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1998, + "startColumn": 6, + "charOffset": 51465, + "charLength": 1, + "snippet": { + "text": "\t// player:sendContainer(container)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "813acce7401d14098cad0595719e0d6244f2bf7561adf874be810e8d0c8fb5ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2006, + "startColumn": 6, + "charOffset": 51699, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2004, + "startColumn": 6, + "charOffset": 51617, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr container = getUserdataShared(L, 2);\n\tif (!container) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb23e5821066aaa7f811cce3a5d606fd554b5346b50ffd38b9c9b78a498bdbc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2019, + "startColumn": 6, + "charOffset": 52115, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2017, + "startColumn": 6, + "charOffset": 52001, + "charLength": 1, + "snippet": { + "text": "\t// player:sendUpdateContainer(container)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "368a5df0927501a0a702cfaeb561bcc52a9f37e9dbb7811094ba5f97d81d5893" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2025, + "startColumn": 6, + "charOffset": 52225, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2023, + "startColumn": 6, + "charOffset": 52159, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto container = getUserdataShared(L, 2);\n\tif (!container) {\n\t\treportErrorFunc(\"Container is nullptr\");\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d26286ae83b758edf696e4df9eb1c6d3ce22e5f2548f0cedb32646932101761" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2026, + "startColumn": 3, + "charOffset": 52241, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 2024, + "startColumn": 3, + "charOffset": 52160, + "charLength": 15, + "snippet": { + "text": "\tconst auto container = getUserdataShared(L, 2);\n\tif (!container) {\n\t\treportErrorFunc(\"Container is nullptr\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1fa77b7a7da296d76e27647d8171c241dc7c47c4c689c0fbbb265c140e66eaf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2039, + "startColumn": 21, + "charOffset": 52551, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 2037, + "startColumn": 21, + "charOffset": 52449, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getMoney());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a56f54452beddd9f1057bc9cb44bffdc7a79c9986574f73ad4a7bd572baa0d81" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2039, + "startColumn": 21, + "charOffset": 52551, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 2037, + "startColumn": 21, + "charOffset": 52449, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getMoney());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0daf6a7b669920a4b6ddf2e2f500a076e7ccaf188ea4f62dca9f29d4aa6d36b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2064, + "startColumn": 3, + "charOffset": 53180, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 2062, + "startColumn": 3, + "charOffset": 53117, + "charLength": 7, + "snippet": { + "text": "\tif (player) {\n\t\tuint64_t money = getNumber(L, 2);\n\t\tint32_t flags = getNumber(L, 3, 0);\n\t\tbool useBank = getBoolean(L, 4, true);\n\t\tpushBoolean(L, g_game().removeMoney(player, money, flags, useBank));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "360d3e50f6183553df2ec78f829a0b52f3c9d9ea7804fc64318332a73d7ed5f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2076, + "startColumn": 6, + "charOffset": 53595, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2074, + "startColumn": 6, + "charOffset": 53443, + "charLength": 1, + "snippet": { + "text": "\t// player:showTextDialog(id or name or userdata[, text[, canWrite[, length]]])\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f3b46a3a923fed48c600cd0863cd63bec918cf026e3a9062db083efc6d8d9c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2081, + "startColumn": 2, + "charOffset": 53641, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 2079, + "startColumn": 2, + "charOffset": 53636, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tint32_t length = getNumber(L, 5, -1);\n\tbool canWrite = getBoolean(L, 4, false);\n\tstd::string text;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10b00b83a82577dbabf49adb2dbeec1ff209c48a89a944d82d8beae9e70ffc6c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2081, + "startColumn": 41, + "charOffset": 53680, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2079, + "startColumn": 41, + "charOffset": 53636, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tint32_t length = getNumber(L, 5, -1);\n\tbool canWrite = getBoolean(L, 4, false);\n\tstd::string text;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "248fc6d3f3dc34b924af20c8b941daf759fa417aab01a04dabe6cb97a32195f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2106, + "startColumn": 6, + "charOffset": 54249, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2104, + "startColumn": 6, + "charOffset": 54240, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3f336367eef1fb590457594581c2e20c38c16e49fe2e1234e049c7abd598cc5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2107, + "startColumn": 3, + "charOffset": 54260, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 2105, + "startColumn": 3, + "charOffset": 54243, + "charLength": 15, + "snippet": { + "text": "\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61f9a9955d852a49beba1ea865c057a3a799305537c2df51323840faf8c7c4b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2118, + "startColumn": 30, + "charOffset": 54533, + "charLength": 4, + "snippet": { + "text": "text" + } + }, + "contextRegion": { + "startLine": 2116, + "startColumn": 30, + "charOffset": 54431, + "charLength": 4, + "snippet": { + "text": "\tif (!text.empty()) {\n\t\titem->setAttribute(ItemAttribute_t::TEXT, text);\n\t\tlength = std::max(text.size(), length);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59973bd3576c18e5d8d4d0227b7c4db56400ef7d1bf75ac3f6227de4a70c3c27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2118, + "startColumn": 30, + "charOffset": 54533, + "charLength": 4, + "snippet": { + "text": "text" + } + }, + "contextRegion": { + "startLine": 2116, + "startColumn": 30, + "charOffset": 54431, + "charLength": 4, + "snippet": { + "text": "\tif (!text.empty()) {\n\t\titem->setAttribute(ItemAttribute_t::TEXT, text);\n\t\tlength = std::max(text.size(), length);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e50b5db8c12a599b0e45a067c09b08247797ed2529ea2a4f0d00afe04868a0e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2122, + "startColumn": 29, + "charOffset": 54613, + "charLength": 6, + "snippet": { + "text": "length" + } + }, + "contextRegion": { + "startLine": 2120, + "startColumn": 29, + "charOffset": 54558, + "charLength": 6, + "snippet": { + "text": "\n\titem->setParent(player);\n\tplayer->setWriteItem(item, length);\n\tplayer->sendTextWindow(item, length, canWrite);\n\tpushBoolean(L, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee74c40050646534f5569bbc17364ede3c5a9d1664e92332f850799a67efb88e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2123, + "startColumn": 31, + "charOffset": 54652, + "charLength": 6, + "snippet": { + "text": "length" + } + }, + "contextRegion": { + "startLine": 2121, + "startColumn": 31, + "charOffset": 54559, + "charLength": 6, + "snippet": { + "text": "\titem->setParent(player);\n\tplayer->setWriteItem(item, length);\n\tplayer->sendTextWindow(item, length, canWrite);\n\tpushBoolean(L, true);\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "124c2f74a196061f078dffedceeacbd0c7430e9308e9f80dace7ac2a918ea7d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2133, + "startColumn": 6, + "charOffset": 55048, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2131, + "startColumn": 6, + "charOffset": 54975, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef9b76ca16a34112068eec126a8df94826ef061fb9166761b68d59e142345f06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2144, + "startColumn": 7, + "charOffset": 55343, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2142, + "startColumn": 7, + "charOffset": 55223, + "charLength": 1, + "snippet": { + "text": "\t\tuint16_t channelId = getNumber(L, 4);\n\t\tconst auto &channel = g_chat().getChannel(player, channelId);\n\t\tif (!channel || !channel->hasUser(player)) {\n\t\t\tpushBoolean(L, false);\n\t\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4d0841cb986652236d39a14c4b399b0ecaa02ffca689e81c8b5e9d05cc0fc9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2150, + "startColumn": 21, + "charOffset": 55490, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 2148, + "startColumn": 21, + "charOffset": 55427, + "charLength": 1, + "snippet": { + "text": "\t\tmessage.channelId = channelId;\n\t} else {\n\t\tif (parameters >= 6) {\n\t\t\tmessage.position = getPosition(L, 4);\n\t\t\tmessage.primary.value = getNumber(L, 5);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa1c356b57f6b4e33c6d412a286179e1dfbc903334f8f3e8379cf1ff0921a6ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2152, + "startColumn": 50, + "charOffset": 55585, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2150, + "startColumn": 50, + "charOffset": 55470, + "charLength": 1, + "snippet": { + "text": "\t\tif (parameters >= 6) {\n\t\t\tmessage.position = getPosition(L, 4);\n\t\t\tmessage.primary.value = getNumber(L, 5);\n\t\t\tmessage.primary.color = getNumber(L, 6);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76b726166816efdd3e6ade712d97a034dfdd6d4025e48f2ac68fcf952745d926" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2153, + "startColumn": 54, + "charOffset": 55642, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 2151, + "startColumn": 54, + "charOffset": 55495, + "charLength": 1, + "snippet": { + "text": "\t\t\tmessage.position = getPosition(L, 4);\n\t\t\tmessage.primary.value = getNumber(L, 5);\n\t\t\tmessage.primary.color = getNumber(L, 6);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d613dbf5b4b0c092ecf88ea3604bd6fab89eb88103448674769a6e3b58d34bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2156, + "startColumn": 21, + "charOffset": 55671, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2154, + "startColumn": 21, + "charOffset": 55646, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif (parameters >= 8) {\n\t\t\tmessage.secondary.value = getNumber(L, 7);\n\t\t\tmessage.secondary.color = getNumber(L, 8);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a96133a44dca9cad3c8e21944385412e809b9a55014d7ff20177d6073eb688a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2157, + "startColumn": 52, + "charOffset": 55727, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 2155, + "startColumn": 52, + "charOffset": 55650, + "charLength": 1, + "snippet": { + "text": "\n\t\tif (parameters >= 8) {\n\t\t\tmessage.secondary.value = getNumber(L, 7);\n\t\t\tmessage.secondary.color = getNumber(L, 8);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e728640e2ecdc4de6135e8cd96ba73512934853f1090916b2cc73960ab4d82fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2158, + "startColumn": 56, + "charOffset": 55786, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2156, + "startColumn": 56, + "charOffset": 55651, + "charLength": 1, + "snippet": { + "text": "\t\tif (parameters >= 8) {\n\t\t\tmessage.secondary.value = getNumber(L, 7);\n\t\t\tmessage.secondary.color = getNumber(L, 8);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78df3fad5f27c0344e0cf6a37d7ba92523aed02b53d13aa1e65297c2ac41efd2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2171, + "startColumn": 6, + "charOffset": 56069, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2169, + "startColumn": 6, + "charOffset": 55936, + "charLength": 1, + "snippet": { + "text": "\t// player:sendChannelMessage(author, text, type, channelId)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc679ae9bd97c1ab7e7074487ab124f961bcccab7c078e6fbe45780164a7c394" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2176, + "startColumn": 46, + "charOffset": 56159, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2174, + "startColumn": 46, + "charOffset": 56110, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tuint16_t channelId = getNumber(L, 5);\n\tSpeakClasses type = getNumber(L, 4);\n\tconst std::string &text = getString(L, 3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f19e8f17a1e5e3942c3089f4e46f17a9a17e7e2744cb22457d70969e212c6621" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2188, + "startColumn": 6, + "charOffset": 56592, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2186, + "startColumn": 6, + "charOffset": 56467, + "charLength": 1, + "snippet": { + "text": "\t// player:sendPrivateMessage(speaker, text[, type])\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9639c617486d8287d631c491c7d8c44fe9bb7cc15f303080204df702670aefe4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2195, + "startColumn": 2, + "charOffset": 56750, + "charLength": 12, + "snippet": { + "text": "SpeakClasses" + } + }, + "contextRegion": { + "startLine": 2193, + "startColumn": 2, + "charOffset": 56637, + "charLength": 12, + "snippet": { + "text": "\tstd::shared_ptr speaker = getUserdataShared(L, 2);\n\tconst std::string &text = getString(L, 3);\n\tSpeakClasses type = getNumber(L, 4, TALKTYPE_PRIVATE_FROM);\n\tplayer->sendPrivateMessage(speaker, type, text);\n\tpushBoolean(L, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5bee7b50408771b991680b976867e3c0e2f40984fed62fc038e28481db653c4b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2204, + "startColumn": 6, + "charOffset": 57094, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2202, + "startColumn": 6, + "charOffset": 56968, + "charLength": 1, + "snippet": { + "text": "\t// player:channelSay(speaker, type, text, channelId)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "739459f81e44826ac7f12f2d34d2ebdf3f195bf159a8825bca43fa26a7ce42e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2212, + "startColumn": 46, + "charOffset": 57336, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2210, + "startColumn": 46, + "charOffset": 57195, + "charLength": 1, + "snippet": { + "text": "\tSpeakClasses type = getNumber(L, 3);\n\tconst std::string &text = getString(L, 4);\n\tuint16_t channelId = getNumber(L, 5);\n\tplayer->sendToChannel(speaker, type, text, channelId);\n\tpushBoolean(L, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75ebdc5073242fb3a96248c5e18c125851c75027ff274efbeb222fd5b5a2a7cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2234, + "startColumn": 6, + "charOffset": 57942, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2232, + "startColumn": 6, + "charOffset": 57841, + "charLength": 1, + "snippet": { + "text": "\t// player:getSlotItem(slot)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f39f1386a0ea1da6fe246e7ffbe06c72bb31be8d664ac07655c4abce96f6ac5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2241, + "startColumn": 6, + "charOffset": 58092, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2239, + "startColumn": 6, + "charOffset": 57987, + "charLength": 1, + "snippet": { + "text": "\tuint32_t slot = getNumber(L, 2);\n\tstd::shared_ptr thing = player->getThing(slot);\n\tif (!thing) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbae9cd9f2024d6998a97cc970fa426f44556184bbc0b3d75cf123669cb1d569" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2259, + "startColumn": 6, + "charOffset": 58455, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2257, + "startColumn": 6, + "charOffset": 58361, + "charLength": 1, + "snippet": { + "text": "\t// player:getParty()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f633b32571360fbebbb6127ea2639e28827451a0bc26ef128d67297d382bd258" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2330, + "startColumn": 3, + "charOffset": 60295, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 2328, + "startColumn": 3, + "charOffset": 60229, + "charLength": 7, + "snippet": { + "text": "\tif (player) {\n\t\tuint16_t lookType = getNumber(L, 2);\n\t\tuint8_t addon = getNumber(L, 3, 0);\n\t\tpushBoolean(L, player->canWear(lookType, addon));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a717d218bb792b2999d1cf73fd81eb23c868352b55e22af1394dd15f500565df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2353, + "startColumn": 6, + "charOffset": 60880, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2351, + "startColumn": 6, + "charOffset": 60766, + "charLength": 1, + "snippet": { + "text": "\t// player:addMount(mountId or mountName)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34159b8c97124a226acf99978caec318f66f8e11dfcb4b054cf3637b95af4f68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'mountId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2358, + "startColumn": 10, + "charOffset": 60934, + "charLength": 7, + "snippet": { + "text": "mountId" + } + }, + "contextRegion": { + "startLine": 2356, + "startColumn": 10, + "charOffset": 60921, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tuint8_t mountId;\n\tif (isNumber(L, 2)) {\n\t\tmountId = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1248faa04c39eecebca78c52721d711afd995acaebf186e29e8ca2c2d3e04b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2363, + "startColumn": 7, + "charOffset": 61108, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2361, + "startColumn": 7, + "charOffset": 61004, + "charLength": 1, + "snippet": { + "text": "\t} else {\n\t\tconst std::shared_ptr mount = g_game().mounts.getMountByName(getString(L, 2));\n\t\tif (!mount) {\n\t\t\tlua_pushnil(L);\n\t\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46018bde833fb9d3673c36b59270940ccb1db498c88a4c3a7373d4918d32fdde" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2376, + "startColumn": 6, + "charOffset": 61414, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2374, + "startColumn": 6, + "charOffset": 61297, + "charLength": 1, + "snippet": { + "text": "\t// player:removeMount(mountId or mountName)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f96cd83857eaf6d3e3744d69094b73c962cb3cdbe4ef9eded2bfe213a4abc624" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'mountId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2381, + "startColumn": 10, + "charOffset": 61468, + "charLength": 7, + "snippet": { + "text": "mountId" + } + }, + "contextRegion": { + "startLine": 2379, + "startColumn": 10, + "charOffset": 61455, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tuint8_t mountId;\n\tif (isNumber(L, 2)) {\n\t\tmountId = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7cec817c9fc0fac4df7d1d4b2e455438e18269e01512d485235ab00ee739d938" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2386, + "startColumn": 7, + "charOffset": 61642, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2384, + "startColumn": 7, + "charOffset": 61538, + "charLength": 1, + "snippet": { + "text": "\t} else {\n\t\tconst std::shared_ptr mount = g_game().mounts.getMountByName(getString(L, 2));\n\t\tif (!mount) {\n\t\t\tlua_pushnil(L);\n\t\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39e7561f75c6be2fb56bedce8f229e1b7ec0b0b3604d3cb5e19a3576e0343318" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2399, + "startColumn": 6, + "charOffset": 61944, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2397, + "startColumn": 6, + "charOffset": 61830, + "charLength": 1, + "snippet": { + "text": "\t// player:hasMount(mountId or mountName)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97d475fdb80f1b5ce269a90830c5865fc9384028480fc07a4979bf14337e11d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2471, + "startColumn": 21, + "charOffset": 63744, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 2469, + "startColumn": 21, + "charOffset": 63642, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->defaultOutfit.lookFamiliarsType);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2a3e3229bad7bcd80c7b829f5e933f66202584254e680519228e2117cca2668" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2482, + "startColumn": 21, + "charOffset": 64046, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 2480, + "startColumn": 21, + "charOffset": 63920, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player && player->getAccount()) {\n\t\tlua_pushnumber(L, player->getAccount()->getPremiumRemainingDays());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bba5da2ba0c0f195292db71714d5e961fecd5476479a9562723969d3bf29ef78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2492, + "startColumn": 6, + "charOffset": 64306, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2490, + "startColumn": 6, + "charOffset": 64202, + "charLength": 1, + "snippet": { + "text": "\t// player:addPremiumDays(days)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || !player->getAccount()) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4591a93e2aad1a08f66c260c4c927d7e903489bb8f11c0bc789777150b0f79b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2492, + "startColumn": 17, + "charOffset": 64317, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2490, + "startColumn": 17, + "charOffset": 64202, + "charLength": 1, + "snippet": { + "text": "\t// player:addPremiumDays(days)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || !player->getAccount()) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b245cef447c6695d434ffe95a11795e917e563d9e8930229a66a70dee7ae5696" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2503, + "startColumn": 38, + "charOffset": 64559, + "charLength": 6, + "snippet": { + "text": "0xFFFE" + } + }, + "contextRegion": { + "startLine": 2501, + "startColumn": 38, + "charOffset": 64518, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tint32_t addDays = std::min(0xFFFE - premiumDays, getNumber(L, 2));\n\tif (addDays <= 0) {\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "292224c5aeab3c014975e186ceb5f4e4b231fbf8c6743b0b744e0674a684af0f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2503, + "startColumn": 38, + "charOffset": 64559, + "charLength": 6, + "snippet": { + "text": "0xFFFE" + } + }, + "contextRegion": { + "startLine": 2501, + "startColumn": 38, + "charOffset": 64518, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tint32_t addDays = std::min(0xFFFE - premiumDays, getNumber(L, 2));\n\tif (addDays <= 0) {\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4098a15ab2374414c66a983e462b42d71a5f6f253ce9801171dc1053c61d0987" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFE is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2503, + "startColumn": 38, + "charOffset": 64559, + "charLength": 6, + "snippet": { + "text": "0xFFFE" + } + }, + "contextRegion": { + "startLine": 2501, + "startColumn": 38, + "charOffset": 64518, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tint32_t addDays = std::min(0xFFFE - premiumDays, getNumber(L, 2));\n\tif (addDays <= 0) {\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1d79a259880cf5cd8663e619e98e444c4b3880f09429294bfdfede815d7329f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2521, + "startColumn": 6, + "charOffset": 64992, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2519, + "startColumn": 6, + "charOffset": 64885, + "charLength": 1, + "snippet": { + "text": "\t// player:removePremiumDays(days)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || !player->getAccount()) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f625a9e8c2b50d633a0dc82bd844c3afd4499925e704400d544fa72894b3cdb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2521, + "startColumn": 17, + "charOffset": 65003, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2519, + "startColumn": 17, + "charOffset": 64885, + "charLength": 1, + "snippet": { + "text": "\t// player:removePremiumDays(days)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || !player->getAccount()) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4998c6641f9c86cbdb63b4e862a2c344014c646baa0e5381935af57f8c360bb9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2532, + "startColumn": 41, + "charOffset": 65248, + "charLength": 6, + "snippet": { + "text": "0xFFFE" + } + }, + "contextRegion": { + "startLine": 2530, + "startColumn": 41, + "charOffset": 65204, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tint32_t removeDays = std::min(0xFFFE - premiumDays, getNumber(L, 2));\n\tif (removeDays <= 0) {\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50325cab4f73f0ff6a0de98848193dd4fa3fbd5425e1b6be9a7386a2678442f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2532, + "startColumn": 41, + "charOffset": 65248, + "charLength": 6, + "snippet": { + "text": "0xFFFE" + } + }, + "contextRegion": { + "startLine": 2530, + "startColumn": 41, + "charOffset": 65204, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tint32_t removeDays = std::min(0xFFFE - premiumDays, getNumber(L, 2));\n\tif (removeDays <= 0) {\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb86e0dc93b772618d777a7649e08a9c14b454ae3ab0c7af9b02efd9506a86cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFE is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2532, + "startColumn": 41, + "charOffset": 65248, + "charLength": 6, + "snippet": { + "text": "0xFFFE" + } + }, + "contextRegion": { + "startLine": 2530, + "startColumn": 41, + "charOffset": 65204, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tint32_t removeDays = std::min(0xFFFE - premiumDays, getNumber(L, 2));\n\tif (removeDays <= 0) {\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b24f13c2b69e73f2c0939a5492b9782b9af0462d0cd26ab58b418ce6e571e89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2550, + "startColumn": 6, + "charOffset": 65676, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2548, + "startColumn": 6, + "charOffset": 65577, + "charLength": 1, + "snippet": { + "text": "\t// player:getTibiaCoins()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || !player->getAccount()) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32e50e7c6c8de3d06999b7c0ea92b1bb5d0a9519bcd9de0af9e22257fe4b508a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2550, + "startColumn": 17, + "charOffset": 65687, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2548, + "startColumn": 17, + "charOffset": 65577, + "charLength": 1, + "snippet": { + "text": "\t// player:getTibiaCoins()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || !player->getAccount()) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5723d2499cba12033d1d62210c9040d0d149a859dd4bab257c5ac1743ae5f80f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2551, + "startColumn": 3, + "charOffset": 65714, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 2549, + "startColumn": 3, + "charOffset": 65604, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || !player->getAccount()) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4b25c65bdea0164aff4b4bf62bde7b7d7a950610e4089d0cd7f0d0ccba2fb2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2559, + "startColumn": 21, + "charOffset": 65966, + "charLength": 5, + "snippet": { + "text": "coins" + } + }, + "contextRegion": { + "startLine": 2557, + "startColumn": 21, + "charOffset": 65894, + "charLength": 5, + "snippet": { + "text": "\n\tif (result == enumToValue(AccountErrors_t::Ok)) {\n\t\tlua_pushnumber(L, coins);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "57fff7a2ca4ef9588f75ae2bcd82e9dbcfac4e9bde51045b7372a77868741466" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2568, + "startColumn": 6, + "charOffset": 66156, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2566, + "startColumn": 6, + "charOffset": 66052, + "charLength": 1, + "snippet": { + "text": "\t// player:addTibiaCoins(coins)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || !player->getAccount()) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6e4ab2e75c31535db7934fa953fae4a545734115ebe2496af3c5b3d92aaed40" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2568, + "startColumn": 17, + "charOffset": 66167, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2566, + "startColumn": 17, + "charOffset": 66052, + "charLength": 1, + "snippet": { + "text": "\t// player:addTibiaCoins(coins)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || !player->getAccount()) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79ea313756176ebc24315c8482c86616a88fd15a7ce02cc1c3cf1522c4eb7b23" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2569, + "startColumn": 3, + "charOffset": 66194, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 2567, + "startColumn": 3, + "charOffset": 66084, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || !player->getAccount()) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65f21d88efd12cd2e63afe1e647878db1fb966f152eb23f82d81834a2838dc9c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2575, + "startColumn": 3, + "charOffset": 66417, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 2573, + "startColumn": 3, + "charOffset": 66286, + "charLength": 15, + "snippet": { + "text": "\n\tif (player->account->addCoins(enumToValue(CoinType::Normal), getNumber(L, 2)) != enumToValue(AccountErrors_t::Ok)) {\n\t\treportErrorFunc(\"Failed to add coins\");\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67eb20f5ca46b8c688f86a6e9d9161aca836b82acd47592f697816b78b82493e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2581, + "startColumn": 3, + "charOffset": 66566, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 2579, + "startColumn": 3, + "charOffset": 66490, + "charLength": 15, + "snippet": { + "text": "\n\tif (player->getAccount()->save() != enumToValue(AccountErrors_t::Ok)) {\n\t\treportErrorFunc(\"Failed to save account\");\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a35f6c5c728ca7eb12567d7fd1d0a02bcf30b09d61d8a8f89a13dd3cbe259f9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2594, + "startColumn": 6, + "charOffset": 66851, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2592, + "startColumn": 6, + "charOffset": 66744, + "charLength": 1, + "snippet": { + "text": "\t// player:removeTibiaCoins(coins)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || !player->getAccount()) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5e1f1e6016b8917527b3b60c9743d8925a401c01f8e16bc929fc5613571c7d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2594, + "startColumn": 17, + "charOffset": 66862, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2592, + "startColumn": 17, + "charOffset": 66744, + "charLength": 1, + "snippet": { + "text": "\t// player:removeTibiaCoins(coins)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || !player->getAccount()) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1237abbd1819ae3154daa65df3f1e6e1fa585506d26c40a3f221273319fa8acf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2595, + "startColumn": 3, + "charOffset": 66889, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 2593, + "startColumn": 3, + "charOffset": 66779, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || !player->getAccount()) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0fd083aafffa153f285b3ffd9be8ee7de3b1a8c44c27734abf84f64ed04f317" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2601, + "startColumn": 3, + "charOffset": 67115, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 2599, + "startColumn": 3, + "charOffset": 66981, + "charLength": 15, + "snippet": { + "text": "\n\tif (player->account->removeCoins(enumToValue(CoinType::Normal), getNumber(L, 2)) != enumToValue(AccountErrors_t::Ok)) {\n\t\treportErrorFunc(\"Failed to remove coins\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a901e2a7ab30b4e97f39f83497b5f39bf94229eb1c910b72c530f431a229ce5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2606, + "startColumn": 3, + "charOffset": 67249, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 2604, + "startColumn": 3, + "charOffset": 67173, + "charLength": 15, + "snippet": { + "text": "\n\tif (player->getAccount()->save() != enumToValue(AccountErrors_t::Ok)) {\n\t\treportErrorFunc(\"Failed to save account\");\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f49198bfffd62f50fda323ae48b10e5c234ca4ab21ebd987fa809ddb5eef2dd5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2619, + "startColumn": 6, + "charOffset": 67537, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2617, + "startColumn": 6, + "charOffset": 67431, + "charLength": 1, + "snippet": { + "text": "\t// player:getTransferableCoins()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || !player->getAccount()) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a2e10c7e1135e02a5b686c1bfca24e1ec6f44cc8a1546c22520c504d393d781" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2619, + "startColumn": 17, + "charOffset": 67548, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2617, + "startColumn": 17, + "charOffset": 67431, + "charLength": 1, + "snippet": { + "text": "\t// player:getTransferableCoins()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || !player->getAccount()) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bbfb8b9cdb7e1d745e83e7539da583f9ae8a8fbcb841e37870cd13e76f1b515b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2620, + "startColumn": 3, + "charOffset": 67575, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 2618, + "startColumn": 3, + "charOffset": 67465, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || !player->getAccount()) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c2ad1b40d4e2b06acfab702971ec67252fed7ac6f5fd8e40df0626991a30f7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2628, + "startColumn": 21, + "charOffset": 67833, + "charLength": 5, + "snippet": { + "text": "coins" + } + }, + "contextRegion": { + "startLine": 2626, + "startColumn": 21, + "charOffset": 67761, + "charLength": 5, + "snippet": { + "text": "\n\tif (result == enumToValue(AccountErrors_t::Ok)) {\n\t\tlua_pushnumber(L, coins);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2fda956370b9cfbd150382e0c488baadddebbb44086f65076886316c219c0f17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2637, + "startColumn": 6, + "charOffset": 68037, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2635, + "startColumn": 6, + "charOffset": 67926, + "charLength": 1, + "snippet": { + "text": "\t// player:addTransferableCoins(coins)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || !player->getAccount()) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54adaa598e8e18454fc37f79b3e3d79bb9cf08963e949da31d65e8390a68896c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2637, + "startColumn": 17, + "charOffset": 68048, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2635, + "startColumn": 17, + "charOffset": 67926, + "charLength": 1, + "snippet": { + "text": "\t// player:addTransferableCoins(coins)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || !player->getAccount()) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34159b8c97124a226acf99978caec318f66f8e11dfcb4b054cf3637b95af4f68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2638, + "startColumn": 3, + "charOffset": 68075, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 2636, + "startColumn": 3, + "charOffset": 67965, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || !player->getAccount()) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "020e766950a26681dd0f93c54002fc4ea511fd9e93a64ba55c11fa3eba7a2690" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2644, + "startColumn": 3, + "charOffset": 68304, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 2642, + "startColumn": 3, + "charOffset": 68167, + "charLength": 15, + "snippet": { + "text": "\n\tif (player->account->addCoins(enumToValue(CoinType::Transferable), getNumber(L, 2)) != enumToValue(AccountErrors_t::Ok)) {\n\t\treportErrorFunc(\"failed to add transferable coins\");\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00d4ce57619cb9a789139cbb177ecb01f6ad19efadf5890084bf7af60e0c33fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2650, + "startColumn": 3, + "charOffset": 68466, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 2648, + "startColumn": 3, + "charOffset": 68390, + "charLength": 15, + "snippet": { + "text": "\n\tif (player->getAccount()->save() != enumToValue(AccountErrors_t::Ok)) {\n\t\treportErrorFunc(\"failed to save account\");\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "684d5db4c818926ef8d9dcaa88ee7e6f3f943097bad907668558d277681064ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2663, + "startColumn": 6, + "charOffset": 68765, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2661, + "startColumn": 6, + "charOffset": 68651, + "charLength": 1, + "snippet": { + "text": "\t// player:removeTransferableCoins(coins)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || !player->getAccount()) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1b0285405d8682918c7d0dbe3d9c371f555987ea5dce3ddc05a482cdac41d44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2663, + "startColumn": 17, + "charOffset": 68776, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2661, + "startColumn": 17, + "charOffset": 68651, + "charLength": 1, + "snippet": { + "text": "\t// player:removeTransferableCoins(coins)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || !player->getAccount()) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6314f02e60c6cf44b750052040ad9f23affe0214874fa2034d62438879399a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2664, + "startColumn": 3, + "charOffset": 68803, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 2662, + "startColumn": 3, + "charOffset": 68693, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player || !player->getAccount()) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e68dca5040a559e4475c7a28ed6fd04f6785046942d35048d122cbada75bd25f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2670, + "startColumn": 3, + "charOffset": 69035, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 2668, + "startColumn": 3, + "charOffset": 68895, + "charLength": 15, + "snippet": { + "text": "\n\tif (player->account->removeCoins(enumToValue(CoinType::Transferable), getNumber(L, 2)) != enumToValue(AccountErrors_t::Ok)) {\n\t\treportErrorFunc(\"failed to remove transferable coins\");\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7c38a29c7a9149c08f397d65e141feb06a00324273ff5e5ca3cdba9e6543013" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2676, + "startColumn": 3, + "charOffset": 69200, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 2674, + "startColumn": 3, + "charOffset": 69124, + "charLength": 15, + "snippet": { + "text": "\n\tif (player->getAccount()->save() != enumToValue(AccountErrors_t::Ok)) {\n\t\treportErrorFunc(\"failed to save account\");\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09320f3bf0d9e572826eec3a005b0be6231d6737115e7d9d51e1780f23e2436b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2701, + "startColumn": 6, + "charOffset": 69791, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2699, + "startColumn": 6, + "charOffset": 69686, + "charLength": 1, + "snippet": { + "text": "\t// player:addBlessing(blessing)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0991c8dd7649458cfda2bcefea52cb34f712ad3a2a9e8e2439a2262e505d064c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2718, + "startColumn": 6, + "charOffset": 70199, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2716, + "startColumn": 6, + "charOffset": 70091, + "charLength": 1, + "snippet": { + "text": "\t// player:removeBlessing(blessing)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c15e1785e0bf3c22a9721cf96504f9c5ec5e7142aca3f3a49a4061dc909d51d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2745, + "startColumn": 21, + "charOffset": 70794, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 2743, + "startColumn": 21, + "charOffset": 70758, + "charLength": 6, + "snippet": { + "text": "\n\tif (player) {\n\t\tlua_pushnumber(L, player->getBlessingCount(index, getBoolean(L, 3, false)));\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f2596daeee06394d2da2b0a4502f2fe0b3898fbde792f549795673b59479952" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2755, + "startColumn": 6, + "charOffset": 71066, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2753, + "startColumn": 6, + "charOffset": 70958, + "charLength": 1, + "snippet": { + "text": "\t// player:canLearnSpell(spellName)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a10b47a7f5b429a27d303bf42d0c42cebfed67fb1439314449afab8dd38f7d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2762, + "startColumn": 6, + "charOffset": 71230, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2760, + "startColumn": 6, + "charOffset": 71111, + "charLength": 1, + "snippet": { + "text": "\tconst std::string &spellName = getString(L, 2);\n\tconst auto spell = g_spells().getInstantSpellByName(spellName);\n\tif (!spell) {\n\t\treportErrorFunc(\"Spell \\\"\" + spellName + \"\\\" not found\");\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55f8e18a67189dbb5ec7f710dfd63753f103ed6f4ea4974975727654ec989ff5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2763, + "startColumn": 3, + "charOffset": 71242, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 2761, + "startColumn": 3, + "charOffset": 71160, + "charLength": 15, + "snippet": { + "text": "\tconst auto spell = g_spells().getInstantSpellByName(spellName);\n\tif (!spell) {\n\t\treportErrorFunc(\"Spell \\\"\" + spellName + \"\\\" not found\");\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bcad67f3fd3b7066ddd1d326bc61bda5a4ff3f6d2930e972a365c4c15ab0b18f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-container-contains", + "ruleIndex": 693, + "kind": "fail", + "level": "warning", + "message": { + "text": "use 'contains' to check for membership" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2774, + "startColumn": 13, + "charOffset": 71491, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 2772, + "startColumn": 13, + "charOffset": 71437, + "charLength": 5, + "snippet": { + "text": "\n\tconst auto vocMap = spell->getVocMap();\n\tif (vocMap.count(player->getVocationId()) == 0) {\n\t\tpushBoolean(L, false);\n\t} else if (player->getLevel() < spell->getLevel()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7c9ba0c86fc7aaaa1ecfdb9630a68c901ece40eb47187d68fd27b7f9213a1fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2774, + "startColumn": 50, + "charOffset": 71528, + "charLength": 1, + "snippet": { + "text": "{" + } + }, + "contextRegion": { + "startLine": 2772, + "startColumn": 50, + "charOffset": 71437, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto vocMap = spell->getVocMap();\n\tif (vocMap.count(player->getVocationId()) == 0) {\n\t\tpushBoolean(L, false);\n\t} else if (player->getLevel() < spell->getLevel()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76e139b8aa007e874ed52984e61f95efdf17e0fd278ebd7949d67287417cdbf6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2840, + "startColumn": 6, + "charOffset": 73283, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2838, + "startColumn": 6, + "charOffset": 73174, + "charLength": 1, + "snippet": { + "text": "\t// player:openImbuementWindow(item)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29aa2f787298123a9ac4349fc3e6076e17e0bf1747418b3cf07629ac82d6720f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2841, + "startColumn": 3, + "charOffset": 73296, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 2839, + "startColumn": 3, + "charOffset": 73211, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09320f3bf0d9e572826eec3a005b0be6231d6737115e7d9d51e1780f23e2436b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2847, + "startColumn": 6, + "charOffset": 73462, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2845, + "startColumn": 6, + "charOffset": 73395, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = getUserdataShared(L, 2);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c41266d89e018897cc520aa91654fdeeac8db0a5abff8841d03d82c9006420b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2848, + "startColumn": 3, + "charOffset": 73473, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 2846, + "startColumn": 3, + "charOffset": 73396, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr item = getUserdataShared(L, 2);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a8f1aef2374995eb953b01fe49b9903114f7e0bba9357075534476450762a7f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2860, + "startColumn": 6, + "charOffset": 73794, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2858, + "startColumn": 6, + "charOffset": 73688, + "charLength": 1, + "snippet": { + "text": "\t// player:closeImbuementWindow()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8947457e2b76791bcbcd4923f66e5ab06ebc3f2f16619a825ab6e74bea675a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2861, + "startColumn": 3, + "charOffset": 73807, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 2859, + "startColumn": 3, + "charOffset": 73722, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21aedaef81bd77f632fd1733dc9f81115ccea174d3e08e923c56d85a82f82ed7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2928, + "startColumn": 26, + "charOffset": 75520, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 2926, + "startColumn": 26, + "charOffset": 75452, + "charLength": 6, + "snippet": { + "text": "\tif (player) {\n\t\tlua_createtable(L, 0, 2);\n\t\tsetField(L, \"version\", player->getProtocolVersion());\n\t\tsetField(L, \"os\", player->getOperatingSystem());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2a3e3229bad7bcd80c7b829f5e933f66202584254e680519228e2117cca2668" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2929, + "startColumn": 21, + "charOffset": 75571, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 2927, + "startColumn": 21, + "charOffset": 75467, + "charLength": 6, + "snippet": { + "text": "\t\tlua_createtable(L, 0, 2);\n\t\tsetField(L, \"version\", player->getProtocolVersion());\n\t\tsetField(L, \"os\", player->getOperatingSystem());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c05c55ad516caea6b55d8d300eeb5b045ca14005a2e93f04b81df856c44214e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2939, + "startColumn": 6, + "charOffset": 75796, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2937, + "startColumn": 6, + "charOffset": 75702, + "charLength": 1, + "snippet": { + "text": "\t// player:getHouse()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c908e20ba916f4af7e5a1a19a699124b92d687e0d36c4fd58a9fd2ab19bf8825" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2957, + "startColumn": 6, + "charOffset": 76221, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2955, + "startColumn": 6, + "charOffset": 76107, + "charLength": 1, + "snippet": { + "text": "\t// player:sendHouseWindow(house, listId)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3cb097749c4f152f85141ad427674ad675ba4452de09828fabb52a3dd962c882" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2963, + "startColumn": 6, + "charOffset": 76324, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2961, + "startColumn": 6, + "charOffset": 76265, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto &house = getUserdataShared(L, 2);\n\tif (!house) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5cb16cfffea6a3e302ccd7b91a02cb3b95e754fb137593dd58e4afb62866e50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2977, + "startColumn": 6, + "charOffset": 76662, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2975, + "startColumn": 6, + "charOffset": 76551, + "charLength": 1, + "snippet": { + "text": "\t// player:setEditHouse(house, listId)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c4d71da8ff620e26cdc3410db8362c070a870d052daec98cd5d4ec0ce88382f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2983, + "startColumn": 6, + "charOffset": 76765, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2981, + "startColumn": 6, + "charOffset": 76706, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto &house = getUserdataShared(L, 2);\n\tif (!house) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6c79e93cc6655baaaf468d9241b5e572e809e563cd9b81e4e4360d0f1db0824" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 2997, + "startColumn": 6, + "charOffset": 77094, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2995, + "startColumn": 6, + "charOffset": 76989, + "charLength": 1, + "snippet": { + "text": "\t// player:setGhostMode(enabled)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e46a5a620a08113f4540f780a7b2171295bbb3cbcd1fd33062c414bf162b1ce9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3013, + "startColumn": 2, + "charOffset": 77387, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3011, + "startColumn": 2, + "charOffset": 77334, + "charLength": 3, + "snippet": { + "text": "\tconst Position &position = player->getPosition();\n\n\tfor (const auto &spectator : Spectators().find(position, true)) {\n\t\tconst auto &tmpPlayer = spectator->getPlayer();\n\t\tif (tmpPlayer != player && !tmpPlayer->isAccessPlayer()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c55508af9853637d3b3f88109b67b4667a75f168e5112fce15aff058ac4d1a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3027, + "startColumn": 3, + "charOffset": 77872, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3025, + "startColumn": 3, + "charOffset": 77837, + "charLength": 3, + "snippet": { + "text": "\n\tif (player->isInGhostMode()) {\n\t\tfor (const auto &it : g_game().getPlayers()) {\n\t\t\tif (!it.second->isAccessPlayer()) {\n\t\t\t\tit.second->vip()->notifyStatusChange(player, VipStatus_t::Offline);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3406d8812b3efb6d865cea5066b5e8075dd15336fa11e60e65a383a84d4eee5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3034, + "startColumn": 3, + "charOffset": 78112, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3032, + "startColumn": 3, + "charOffset": 78039, + "charLength": 3, + "snippet": { + "text": "\t\tIOLoginData::updateOnlineStatus(player->getGUID(), false);\n\t} else {\n\t\tfor (const auto &it : g_game().getPlayers()) {\n\t\t\tif (!it.second->isAccessPlayer()) {\n\t\t\t\tit.second->vip()->notifyStatusChange(player, player->vip()->getStatus());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b248e3f21236a48a77d84847465a778c7d2d015a6cec028658b8f418ddfa5820" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3048, + "startColumn": 6, + "charOffset": 78555, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3046, + "startColumn": 6, + "charOffset": 78446, + "charLength": 1, + "snippet": { + "text": "\t// player:getContainerId(container)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c72f02297f85290fd08d7d3c3409e840a6609faa647f51342c7a6db719cbc8f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3055, + "startColumn": 21, + "charOffset": 78714, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3053, + "startColumn": 21, + "charOffset": 78600, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr container = getUserdataShared(L, 2);\n\tif (container) {\n\t\tlua_pushnumber(L, player->getContainerID(container));\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fbf54096b5db38e4c5d4096930b34a543d2e4f3c0cb2e8755b5c3bc83b119aed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3065, + "startColumn": 6, + "charOffset": 78962, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3063, + "startColumn": 6, + "charOffset": 78858, + "charLength": 1, + "snippet": { + "text": "\t// player:getContainerById(id)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2644d702abc5176343b601c340f118a053dba820e510c9ec7381eb694a852f2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3084, + "startColumn": 21, + "charOffset": 79438, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3082, + "startColumn": 21, + "charOffset": 79336, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getContainerIndex(getNumber(L, 2)));\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d92a84aea83bd3a27cef813086364965797e817c03aca7a11687d340c7c6927" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3094, + "startColumn": 6, + "charOffset": 79702, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3092, + "startColumn": 6, + "charOffset": 79600, + "charLength": 1, + "snippet": { + "text": "\t// player:getInstantSpells()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f39f1386a0ea1da6fe246e7ffbe06c72bb31be8d664ac07655c4abce96f6ac5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3100, + "startColumn": 2, + "charOffset": 79800, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3098, + "startColumn": 2, + "charOffset": 79746, + "charLength": 3, + "snippet": { + "text": "\n\tstd::vector> spells;\n\tfor (auto &[key, spell] : g_spells().getInstantSpells()) {\n\t\tif (spell->canCast(player)) {\n\t\t\tspells.push_back(spell);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c9aed8ba00459e3d3967483bf1efd8b36f0a49ec860a833f9c39b3a9fe622c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &' can be declared as 'const auto &'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3100, + "startColumn": 7, + "charOffset": 79805, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 3098, + "startColumn": 7, + "charOffset": 79746, + "charLength": 4, + "snippet": { + "text": "\n\tstd::vector> spells;\n\tfor (auto &[key, spell] : g_spells().getInstantSpells()) {\n\t\tif (spell->canCast(player)) {\n\t\t\tspells.push_back(spell);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b699b3f80c7b0b1d54585f53381ba22843164a52f915d9c0c86545b56ed2fbae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3106, + "startColumn": 21, + "charOffset": 79947, + "charLength": 6, + "snippet": { + "text": "spells" + } + }, + "contextRegion": { + "startLine": 3104, + "startColumn": 21, + "charOffset": 79923, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tlua_createtable(L, spells.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "704ebf4a7cefb54bd0c7c6339a773d0c5dfd84bdc7d91e8b1a85f69855a7c6a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3106, + "startColumn": 21, + "charOffset": 79947, + "charLength": 6, + "snippet": { + "text": "spells" + } + }, + "contextRegion": { + "startLine": 3104, + "startColumn": 21, + "charOffset": 79923, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tlua_createtable(L, spells.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2dad0670fe22ade16938fe024ec0b73d86b8d6b669d36adb946d75a2223b3273" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3109, + "startColumn": 2, + "charOffset": 79984, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3107, + "startColumn": 2, + "charOffset": 79966, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (auto spell : spells) {\n\t\tpushInstantSpell(L, *spell);\n\t\tlua_rawseti(L, -2, ++index);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7058814e4daa451cc1a4eec7576ab4210f5ff1b44402de8ea48d00eda081b9f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3109, + "startColumn": 12, + "charOffset": 79994, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 3107, + "startColumn": 12, + "charOffset": 79966, + "charLength": 5, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (auto spell : spells) {\n\t\tpushInstantSpell(L, *spell);\n\t\tlua_rawseti(L, -2, ++index);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63b7b6a8ff7dabaf0afb142f8305d5779cdf98d4a17c757ddfed6d3b83a906fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3154, + "startColumn": 21, + "charOffset": 81096, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3152, + "startColumn": 21, + "charOffset": 80994, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->fightMode);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4457a9c416d9fcfb043f9372daa7e67d651b94c6684c68f464391fb8ba704d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3165, + "startColumn": 21, + "charOffset": 81350, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3163, + "startColumn": 21, + "charOffset": 81248, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getBaseXpGain());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c178e5edeb162867644da628a75391d8d60511636a8b78cf6de107dc4fbff429" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3189, + "startColumn": 21, + "charOffset": 81936, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3187, + "startColumn": 21, + "charOffset": 81834, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getVoucherXpBoost());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c38a2e97bf72124e30120179bfc1b923e8c9b80c26c934ea945a1714c89948e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3213, + "startColumn": 21, + "charOffset": 82540, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3211, + "startColumn": 21, + "charOffset": 82438, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getGrindingXpBoost());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99ef96c140cdf6522fe6f35d42ce8b322daa8746097c11a10a0e623a708de830" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3237, + "startColumn": 21, + "charOffset": 83146, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3235, + "startColumn": 21, + "charOffset": 83044, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getXpBoostPercent());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "371dc34f02d2849ce4eff60575a2610747e77e0f08006ef33bd4081c9c65e2e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3261, + "startColumn": 21, + "charOffset": 83755, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3259, + "startColumn": 21, + "charOffset": 83653, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getStaminaXpBoost());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c5a0270c092d41bd8eca17c2938a609e1568979f01fc0a8476af7d17a8402c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3299, + "startColumn": 21, + "charOffset": 84707, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3297, + "startColumn": 21, + "charOffset": 84605, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getXpBoostTime());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2af52583a0727c7c58d7221ba627b40ad4b65c8504b8143754ec176f59473525" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3310, + "startColumn": 21, + "charOffset": 84964, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3308, + "startColumn": 21, + "charOffset": 84862, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player) {\n\t\tlua_pushnumber(L, player->getIdleTime());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec80d1c08c96c3787088beb130fd168a899d4e6f18962f85f221a8838f2d985c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3320, + "startColumn": 6, + "charOffset": 85206, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3318, + "startColumn": 6, + "charOffset": 85100, + "charLength": 1, + "snippet": { + "text": "\t// player:getFreeBackpackSlots()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90b347ac04b802b99959b02ea1eb382f16b8a632b95de983dd681a341a5f94da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3324, + "startColumn": 20, + "charOffset": 85258, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 3322, + "startColumn": 20, + "charOffset": 85235, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, std::max(0, player->getFreeBackpackSlots()));\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60fec963195c227e8836e8c365bf04959386f993a99ebcdc7ffe66d76a0a2dad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3342, + "startColumn": 6, + "charOffset": 85710, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3340, + "startColumn": 6, + "charOffset": 85614, + "charLength": 1, + "snippet": { + "text": "\t// player:openMarket()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab6ab019f28882f33d43d20cffc7c3f872fe991be2e366adcc522445d55217fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3356, + "startColumn": 6, + "charOffset": 86004, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3354, + "startColumn": 6, + "charOffset": 85909, + "charLength": 1, + "snippet": { + "text": "\t// player:openForge()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60a70b000eff095cfdbc09ae91157066ac2676c7c9d2bf40c95d6c9c4e6ce621" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3357, + "startColumn": 3, + "charOffset": 86017, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3355, + "startColumn": 3, + "charOffset": 85932, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a8f1aef2374995eb953b01fe49b9903114f7e0bba9357075534476450762a7f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3370, + "startColumn": 6, + "charOffset": 86333, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3368, + "startColumn": 6, + "charOffset": 86237, + "charLength": 1, + "snippet": { + "text": "\t// player:closeForge()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b245cef447c6695d434ffe95a11795e917e563d9e8930229a66a70dee7ae5696" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3371, + "startColumn": 3, + "charOffset": 86346, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3369, + "startColumn": 3, + "charOffset": 86261, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bcad67f3fd3b7066ddd1d326bc61bda5a4ff3f6d2930e972a365c4c15ab0b18f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3384, + "startColumn": 6, + "charOffset": 86677, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3382, + "startColumn": 6, + "charOffset": 86572, + "charLength": 1, + "snippet": { + "text": "\t// player:addForgeDusts(amount)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ab9f2c4c33bf2c02c8ee9bf5d57f3052f250a9f96f397cc8380e63b781bf8b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3385, + "startColumn": 3, + "charOffset": 86690, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3383, + "startColumn": 3, + "charOffset": 86605, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6def4970f2f0e924b164b5981b653912c7af325288f49dca32475ddaafd57b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3398, + "startColumn": 6, + "charOffset": 87052, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3396, + "startColumn": 6, + "charOffset": 86944, + "charLength": 1, + "snippet": { + "text": "\t// player:removeForgeDusts(amount)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f5ae9081fd42c827d50d949de0ad46f69cb6b56633147022d506d9343bbd478" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3399, + "startColumn": 3, + "charOffset": 87065, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3397, + "startColumn": 3, + "charOffset": 86980, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e3e9bf003e102dfd9bf391630e1fbf52912d1655d6640ae0ba04e0d7461689b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3412, + "startColumn": 6, + "charOffset": 87418, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3410, + "startColumn": 6, + "charOffset": 87319, + "charLength": 1, + "snippet": { + "text": "\t// player:getForgeDusts()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4c6989d0089ae8c4d475a1ea375abdf180672135352dbfd9e53ff3f7e43f452" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3413, + "startColumn": 3, + "charOffset": 87431, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3411, + "startColumn": 3, + "charOffset": 87346, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7287b9a0ebcc5fbdba4700b2eee663ebd31714f918fb78c605dba3da75d7fe87" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3425, + "startColumn": 6, + "charOffset": 87774, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3423, + "startColumn": 6, + "charOffset": 87675, + "charLength": 1, + "snippet": { + "text": "\t// player:setForgeDusts()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c028f9d86c45f69e523488bd544eaff6783951c1873a098be2e3a1a2d4a7c3f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3426, + "startColumn": 3, + "charOffset": 87787, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3424, + "startColumn": 3, + "charOffset": 87702, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "020e766950a26681dd0f93c54002fc4ea511fd9e93a64ba55c11fa3eba7a2690" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3439, + "startColumn": 6, + "charOffset": 88151, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3437, + "startColumn": 6, + "charOffset": 88042, + "charLength": 1, + "snippet": { + "text": "\t// player:addForgeDustLevel(amount)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f633b32571360fbebbb6127ea2639e28827451a0bc26ef128d67297d382bd258" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3440, + "startColumn": 3, + "charOffset": 88164, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3438, + "startColumn": 3, + "charOffset": 88079, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c56f4bde60ecd41dd858099c1969fb7cd5e4c7ba8f41d92635cb5695dca9d40" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3453, + "startColumn": 6, + "charOffset": 88538, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3451, + "startColumn": 6, + "charOffset": 88426, + "charLength": 1, + "snippet": { + "text": "\t// player:removeForgeDustLevel(amount)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e0bce744bfad45d4ccddec2b78e6535be7a5cc0793e695608a795ef814df6bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3454, + "startColumn": 3, + "charOffset": 88551, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3452, + "startColumn": 3, + "charOffset": 88466, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec8e56a8d889880190a6aa730d1800e8c408c4fb40c249079f66e5cb67c5898d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3467, + "startColumn": 6, + "charOffset": 88916, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3465, + "startColumn": 6, + "charOffset": 88813, + "charLength": 1, + "snippet": { + "text": "\t// player:getForgeDustLevel()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ea8ee1d83d47bce66e1ac25f000c18e934c3facd872950fe09b3b9024562c05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3468, + "startColumn": 3, + "charOffset": 88929, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3466, + "startColumn": 3, + "charOffset": 88844, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7ec277392bccd879e0700fe875fd30d18ce5eac29c3cf9cbd3e0429f9f9f064" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3480, + "startColumn": 6, + "charOffset": 89280, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3478, + "startColumn": 6, + "charOffset": 89179, + "charLength": 1, + "snippet": { + "text": "\t// player:getForgeSlivers()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0095dc56a45773c5845981035e61b8c9475f259301c084c4d37f8555c269cf32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3481, + "startColumn": 3, + "charOffset": 89293, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3479, + "startColumn": 3, + "charOffset": 89208, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19b9bb7dec294634fadc834007e37f98d4650bc1f4f5b781d27aed76ae5eb24c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3494, + "startColumn": 6, + "charOffset": 89677, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3492, + "startColumn": 6, + "charOffset": 89578, + "charLength": 1, + "snippet": { + "text": "\t// player:getForgeCores()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c01ce4674682cf73fe5880f035e109d0d11ba82e504bde3be5956d7a720ea51f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3495, + "startColumn": 3, + "charOffset": 89690, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3493, + "startColumn": 3, + "charOffset": 89605, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82c01d805946010eb5e792f8c6ce64075923d2a6c5115d2e501f282168b04a45" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3509, + "startColumn": 3, + "charOffset": 90098, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3507, + "startColumn": 3, + "charOffset": 90003, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player == nullptr) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16ff54f1b8c0db32fbe46bf835db4b14d879c1ef4ef836dcf0158df1f8b09a67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3524, + "startColumn": 3, + "charOffset": 90494, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3522, + "startColumn": 3, + "charOffset": 90399, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (player == nullptr) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c618644e74df62393a0400545224885f2a9b26a77d0d75bee49909d41b593e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3529, + "startColumn": 20, + "charOffset": 90613, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3527, + "startColumn": 20, + "charOffset": 90590, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, player->getFaction());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "957a7168bb0f295ef6d18d2d56ff515cb6993f0e10f60f561c4cf13596cc9309" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3536, + "startColumn": 6, + "charOffset": 90809, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3534, + "startColumn": 6, + "charOffset": 90710, + "charLength": 1, + "snippet": { + "text": "\t// player:isUIExhausted()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ccd3446766621414b6acd3be87cab08c8889fe77c11e0bc07d1454a355b42707" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3537, + "startColumn": 3, + "charOffset": 90822, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3535, + "startColumn": 3, + "charOffset": 90737, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "311424cfbf623f0a2b4f058167d46a9b523cafdec6ef5d80d08e36e4136b2fc4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3550, + "startColumn": 6, + "charOffset": 91213, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3548, + "startColumn": 6, + "charOffset": 91090, + "charLength": 1, + "snippet": { + "text": "\t// player:updateUIExhausted(exhaustionTime = 250)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c01ce4674682cf73fe5880f035e109d0d11ba82e504bde3be5956d7a720ea51f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3551, + "startColumn": 3, + "charOffset": 91226, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3549, + "startColumn": 3, + "charOffset": 91141, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82c01d805946010eb5e792f8c6ce64075923d2a6c5115d2e501f282168b04a45" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3565, + "startColumn": 6, + "charOffset": 91602, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3563, + "startColumn": 6, + "charOffset": 91490, + "charLength": 1, + "snippet": { + "text": "\t// player:sendBosstiaryCooldownTimer()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ae3d1a1b8a9c9174c898a6d2270cd6f451c04608d27f6896e1e740ade033ff6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3566, + "startColumn": 3, + "charOffset": 91615, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3564, + "startColumn": 3, + "charOffset": 91530, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f399fb5ed53f07809854bf0fc8194d1caf44827206adbeb8aefb12904bd0e50b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3587, + "startColumn": 61, + "charOffset": 92220, + "charLength": 6, + "snippet": { + "text": "bossId" + } + }, + "contextRegion": { + "startLine": 3585, + "startColumn": 61, + "charOffset": 92141, + "charLength": 6, + "snippet": { + "text": "\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tauto level = g_ioBosstiary().getBossCurrentLevel(player, bossId);\n\t\t\tlua_pushnumber(L, level);\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80fbc937bd250bee0f0ec2e06f429b32b15c7bb806fcb17b5d7e0720dcdd1c85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3588, + "startColumn": 22, + "charOffset": 92250, + "charLength": 5, + "snippet": { + "text": "level" + } + }, + "contextRegion": { + "startLine": 3586, + "startColumn": 22, + "charOffset": 92155, + "charLength": 5, + "snippet": { + "text": "\t\t\t}\n\t\t\tauto level = g_ioBosstiary().getBossCurrentLevel(player, bossId);\n\t\t\tlua_pushnumber(L, level);\n\t\t} else {\n\t\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c27e2d9889e11449738a33375fbcbd1b3d6a011d601cb6b346b14985b857405" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3610, + "startColumn": 22, + "charOffset": 92815, + "charLength": 12, + "snippet": { + "text": "currentKills" + } + }, + "contextRegion": { + "startLine": 3608, + "startColumn": 22, + "charOffset": 92701, + "charLength": 12, + "snippet": { + "text": "\t\t\t}\n\t\t\tuint32_t currentKills = player->getBestiaryKillCount(static_cast(bossId));\n\t\t\tlua_pushnumber(L, currentKills);\n\t\t} else {\n\t\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16671eb794deebc7cd20e92fb0e368c1d86c1eb5711ec62958c19cd9058a4182" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3640, + "startColumn": 6, + "charOffset": 93533, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3638, + "startColumn": 6, + "charOffset": 93434, + "charLength": 1, + "snippet": { + "text": "\t// player:setBossPoints()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "affd33996331d0513d490783dabefd6ab2c077ff9b149b8e0d28653ae78da37d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3641, + "startColumn": 3, + "charOffset": 93546, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3639, + "startColumn": 3, + "charOffset": 93461, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "808f4c9fc5bc48734017fb6b70ea48baf2bdad5a1290be3231a63f81a1aeb11d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3654, + "startColumn": 6, + "charOffset": 93904, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3652, + "startColumn": 6, + "charOffset": 93801, + "charLength": 1, + "snippet": { + "text": "\t// player:setRemoveBossTime()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34159b8c97124a226acf99978caec318f66f8e11dfcb4b054cf3637b95af4f68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3655, + "startColumn": 3, + "charOffset": 93917, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3653, + "startColumn": 3, + "charOffset": 93832, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b456c040b755130252406146fec473b6da9e68cdf2dd72293cebccf0c866e28b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3668, + "startColumn": 6, + "charOffset": 94276, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3666, + "startColumn": 6, + "charOffset": 94171, + "charLength": 1, + "snippet": { + "text": "\t// player:getSlotBossId(slotId)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f693be4b67a310b78dc8c737cbc472e62e29147fae4d358e47a954800a9f1b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3669, + "startColumn": 3, + "charOffset": 94289, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3667, + "startColumn": 3, + "charOffset": 94204, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "534851c5fe340a32504de23b98f4f6ab67fd1d7e3438cd7ed5f857dda5dc5854" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3683, + "startColumn": 6, + "charOffset": 94709, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3681, + "startColumn": 6, + "charOffset": 94605, + "charLength": 1, + "snippet": { + "text": "\t// player:getBossBonus(slotId)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31c03af98d4d7c17e005096abdd04829e95d4558716d546bde3e14edac308bb2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3684, + "startColumn": 3, + "charOffset": 94722, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3682, + "startColumn": 3, + "charOffset": 94637, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d539375bf8f3ef78dc19c936ee540c31e6792b8753293f62c17b00c5485fa4e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3695, + "startColumn": 63, + "charOffset": 95109, + "charLength": 6, + "snippet": { + "text": "bossId" + } + }, + "contextRegion": { + "startLine": 3693, + "startColumn": 63, + "charOffset": 94967, + "charLength": 6, + "snippet": { + "text": "\tuint16_t currentBonus = g_ioBosstiary().calculateLootBonus(playerBossPoints);\n\n\tauto bossLevel = g_ioBosstiary().getBossCurrentLevel(player, bossId);\n\tuint16_t bonusBoss = currentBonus + (bossLevel == 3 ? 25 : 0);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c931c9117fbf43fee3dac1d474bfccad313b7c7bda39ca7e0f36e3a2c7cfc98f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3696, + "startColumn": 56, + "charOffset": 95173, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 3694, + "startColumn": 56, + "charOffset": 95046, + "charLength": 2, + "snippet": { + "text": "\n\tauto bossLevel = g_ioBosstiary().getBossCurrentLevel(player, bossId);\n\tuint16_t bonusBoss = currentBonus + (bossLevel == 3 ? 25 : 0);\n\n\tlua_pushnumber(L, static_cast(bonusBoss));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9aa85cbb392a875b63d95b2e8d1f245991a9d5aa9585d01f77508ff3b1e4292" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3705, + "startColumn": 6, + "charOffset": 95451, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3703, + "startColumn": 6, + "charOffset": 95321, + "charLength": 1, + "snippet": { + "text": "\t// player:sendSingleSoundEffect(soundId[, actor = true])\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c72f02297f85290fd08d7d3c3409e840a6609faa647f51342c7a6db719cbc8f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3706, + "startColumn": 3, + "charOffset": 95464, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3704, + "startColumn": 3, + "charOffset": 95379, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08ebe139342bf5f15aa7d7b2464f7fe14b2906353edd1a5fde4bf9878dd38fde" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3722, + "startColumn": 6, + "charOffset": 96043, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3720, + "startColumn": 6, + "charOffset": 95891, + "charLength": 1, + "snippet": { + "text": "\t// player:sendDoubleSoundEffect(mainSoundId, secondarySoundId[, actor = true])\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d42f40daca7012f0a7ccfccfaefe87a705e7b1e1d7121fdcb45fea2921b59614" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3723, + "startColumn": 3, + "charOffset": 96056, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3721, + "startColumn": 3, + "charOffset": 95971, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "044a88c9b2d2cae3125cfbd5c1589a5f7e266e1611936123ff30daa8312209b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3740, + "startColumn": 6, + "charOffset": 96703, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3738, + "startColumn": 6, + "charOffset": 96623, + "charLength": 1, + "snippet": { + "text": "\t// player:getName()\n\tconst auto player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b8b6312ad3e9be2a2b09bbd856893fe22610214936a18f76ccf6fa9c233083c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3741, + "startColumn": 3, + "charOffset": 96716, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3739, + "startColumn": 3, + "charOffset": 96644, + "charLength": 15, + "snippet": { + "text": "\tconst auto player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ecec5c42efa4094f1ca153433ef47a262c8f1f63a49f4999d0ba7e2d2501043" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3753, + "startColumn": 6, + "charOffset": 97012, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3751, + "startColumn": 6, + "charOffset": 96922, + "charLength": 1, + "snippet": { + "text": "\t// player:changeName(newName)\n\tconst auto player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60a70b000eff095cfdbc09ae91157066ac2676c7c9d2bf40c95d6c9c4e6ce621" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3754, + "startColumn": 3, + "charOffset": 97025, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3752, + "startColumn": 3, + "charOffset": 96953, + "charLength": 15, + "snippet": { + "text": "\tconst auto player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a8f1aef2374995eb953b01fe49b9903114f7e0bba9357075534476450762a7f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3764, + "startColumn": 18, + "charOffset": 97302, + "charLength": 10, + "snippet": { + "text": "savePlayer" + } + }, + "contextRegion": { + "startLine": 3762, + "startColumn": 18, + "charOffset": 97225, + "charLength": 10, + "snippet": { + "text": "\tauto newName = getString(L, 2);\n\tplayer->setName(newName);\n\tg_saveManager().savePlayer(player);\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7e767f79ece50bf0e7fdef0e836f0baccda8631e56834b98ef3926c004f9046" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3771, + "startColumn": 6, + "charOffset": 97497, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3769, + "startColumn": 6, + "charOffset": 97395, + "charLength": 1, + "snippet": { + "text": "\t// player:hasGroupFlag(flag)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3248ccbeab534f4aa3e365a773c01f43fc89626605d308624d9568d2e9dbe1a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3772, + "startColumn": 3, + "charOffset": 97510, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3770, + "startColumn": 3, + "charOffset": 97425, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73b7df334147a52f7a87fa1a8ed32f7a4d6975e594a0da92cf12553272b3334f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3784, + "startColumn": 6, + "charOffset": 97851, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3782, + "startColumn": 6, + "charOffset": 97749, + "charLength": 1, + "snippet": { + "text": "\t// player:setGroupFlag(flag)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab13a9a11f0f54b25d3ed4849860477431ba72e4b6a3f874a29cd40429f3a6cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3785, + "startColumn": 3, + "charOffset": 97864, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3783, + "startColumn": 3, + "charOffset": 97779, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa20b3708c729d133c9d49bac11049f83ac7cc0d4be99c51b68b431d79336343" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3797, + "startColumn": 6, + "charOffset": 98195, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3795, + "startColumn": 6, + "charOffset": 98090, + "charLength": 1, + "snippet": { + "text": "\t// player:removeGroupFlag(flag)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "368a5df0927501a0a702cfaeb561bcc52a9f37e9dbb7811094ba5f97d81d5893" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3798, + "startColumn": 3, + "charOffset": 98208, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3796, + "startColumn": 3, + "charOffset": 98123, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb7ec2125753cecac15afa416a0356b5a59ad2133d3a9420199c211d4715bdc5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3811, + "startColumn": 6, + "charOffset": 98573, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3809, + "startColumn": 6, + "charOffset": 98460, + "charLength": 1, + "snippet": { + "text": "\t// player:setHazardSystemPoints(amount)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tpushBoolean(L, false);\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81f242a74d50ab995874019c94ff074d81b54d98f93a1f76646edb17f4a3e943" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3813, + "startColumn": 3, + "charOffset": 98611, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3811, + "startColumn": 3, + "charOffset": 98568, + "charLength": 15, + "snippet": { + "text": "\tif (!player) {\n\t\tpushBoolean(L, false);\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3bfd821d73961d3d3d03c26b9b990c13aeafbea720b3eed490b6e4295f897e1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3825, + "startColumn": 6, + "charOffset": 98946, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3823, + "startColumn": 6, + "charOffset": 98852, + "charLength": 1, + "snippet": { + "text": "\t// player:getHazardSystemPoints()\n\tconst auto player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tpushBoolean(L, false);\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a58a03ecd640dd69017dce68bc2210994304a9ee67d607cdc0653c0964c7952" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3827, + "startColumn": 3, + "charOffset": 98984, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 3825, + "startColumn": 3, + "charOffset": 98941, + "charLength": 15, + "snippet": { + "text": "\tif (!player) {\n\t\tpushBoolean(L, false);\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ed6a84c9e138e1245549f358a7c8240a018ab0ea1adb01f3fd75051bb9b3b46" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3831, + "startColumn": 20, + "charOffset": 99078, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3829, + "startColumn": 20, + "charOffset": 99055, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, player->getHazardSystemPoints());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a0e5c1e87ea54d70ad80ce88d17b9a3ae5d5ce512851f47f973ecd9ec8f711e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3838, + "startColumn": 6, + "charOffset": 99295, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3836, + "startColumn": 6, + "charOffset": 99188, + "charLength": 1, + "snippet": { + "text": "\t// player:setLoyaltyBonus(amount)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f65cf4e15eab08200ec9880d680d5bba64d38d7da503d607a52304a5bc4be4d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3851, + "startColumn": 6, + "charOffset": 99593, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3849, + "startColumn": 6, + "charOffset": 99492, + "charLength": 1, + "snippet": { + "text": "\t// player:getLoyaltyBonus()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02cc9d6f8f37f44508ddb8116a6c7c6906dac8b0c4661640a294919b58f38537" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3856, + "startColumn": 20, + "charOffset": 99657, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3854, + "startColumn": 20, + "charOffset": 99634, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, player->getLoyaltyBonus());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a93fd149f2cb44386120d4cb89da09868fb441862ace8ee9037a1e12b37769cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3863, + "startColumn": 6, + "charOffset": 99851, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3861, + "startColumn": 6, + "charOffset": 99762, + "charLength": 1, + "snippet": { + "text": "\t// player:getLoyaltyPoints()\n\tconst auto player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59bdbbcabd5d72d96f59cc5d9b203250572adc9d609f946a4db792d003d7eefa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3868, + "startColumn": 20, + "charOffset": 99915, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3866, + "startColumn": 20, + "charOffset": 99892, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, player->getLoyaltyPoints());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b734d2427f975298d8e1874f8ebe414ed425fabcc3d41b9c4605dca8e0c6866" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3875, + "startColumn": 6, + "charOffset": 100121, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3873, + "startColumn": 6, + "charOffset": 100020, + "charLength": 1, + "snippet": { + "text": "\t// player:getLoyaltyTitle()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79cc2f039d091b8b71489cb10cfc5da4ef88c8e0f2c049b69e249ee6b1bd6944" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3887, + "startColumn": 6, + "charOffset": 100390, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3885, + "startColumn": 6, + "charOffset": 100285, + "charLength": 1, + "snippet": { + "text": "\t// player:setLoyaltyTitle(name)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e46a5a620a08113f4540f780a7b2171295bbb3cbcd1fd33062c414bf162b1ce9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3901, + "startColumn": 6, + "charOffset": 100718, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3899, + "startColumn": 6, + "charOffset": 100604, + "charLength": 1, + "snippet": { + "text": "\t// player:instantSkillWOD(name[, value])\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1580adc2c3ce7374813931cb4af1821c124d1c661d5264155f11aabf993cd4ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3919, + "startColumn": 6, + "charOffset": 101168, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3917, + "startColumn": 6, + "charOffset": 101053, + "charLength": 1, + "snippet": { + "text": "\t// player:upgradeSpellsWOD([name[, add]])\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "558c8c78518ed6a980432f43028a8a8230b5c5642b1b61499ea7c65b76b7f392" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3949, + "startColumn": 6, + "charOffset": 101819, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3947, + "startColumn": 6, + "charOffset": 101702, + "charLength": 1, + "snippet": { + "text": "\t// player:revelationStageWOD([name[, set]])\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e435a732f9e09940217b2b195a6ecbfe49f2e45bbecdf8d5c00e0ea0cf6686cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'typename std::enable_if::value || std::is_floating_point::value, unsigned char>::type' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3965, + "startColumn": 15, + "charOffset": 102122, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 3963, + "startColumn": 15, + "charOffset": 102104, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tbool value = getNumber(L, 3);\n\tplayer->wheel()->setSpellInstant(name, value);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a959b35447c8ee90bd864e7352db1887ca15429ae6fd525252ab799d4991c2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3975, + "startColumn": 6, + "charOffset": 102387, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3973, + "startColumn": 6, + "charOffset": 102291, + "charLength": 1, + "snippet": { + "text": "\t// player:reloadData()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb23e5821066aaa7f811cce3a5d606fd554b5346b50ffd38b9c9b78a498bdbc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 3992, + "startColumn": 6, + "charOffset": 102808, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3990, + "startColumn": 6, + "charOffset": 102686, + "charLength": 1, + "snippet": { + "text": "\t// player:onThinkWheelOfDestiny([force = false])\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7883c04e177f2bd491d6ca63e8298d52cf8f364077b7d5d2f28d3268c838884e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4005, + "startColumn": 6, + "charOffset": 103104, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4003, + "startColumn": 6, + "charOffset": 103000, + "charLength": 1, + "snippet": { + "text": "\t// player:avatarTimer([value])\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0095dc56a45773c5845981035e61b8c9475f259301c084c4d37f8555c269cf32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4011, + "startColumn": 21, + "charOffset": 103196, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 4009, + "startColumn": 21, + "charOffset": 103148, + "charLength": 1, + "snippet": { + "text": "\n\tif (lua_gettop(L) == 1) {\n\t\tlua_pushnumber(L, (lua_Number)player->wheel()->getOnThinkTimer(WheelOnThink_t::AVATAR_SPELL));\n\t} else {\n\t\tplayer->wheel()->setOnThinkTimer(WheelOnThink_t::AVATAR_SPELL, getNumber(L, 2));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efe67494202dc23ddb711fb733a161d790b9d9dc0ab87de7af5fbac140c0dc94" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4022, + "startColumn": 6, + "charOffset": 103612, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4020, + "startColumn": 6, + "charOffset": 103490, + "charLength": 1, + "snippet": { + "text": "\t// player:getWheelSpellAdditionalArea(spellname)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc0e101a9d0e2ec14fabda643f19b5d60f173d01d8002dcc2cddb5f158c9d40e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4023, + "startColumn": 3, + "charOffset": 103625, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 4021, + "startColumn": 3, + "charOffset": 103540, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a5151d9a4058d894e2c28f6e66dafe67ca726b48f10b7b2ede49a40ee6ce95ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4030, + "startColumn": 3, + "charOffset": 103788, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 4028, + "startColumn": 3, + "charOffset": 103725, + "charLength": 15, + "snippet": { + "text": "\tauto spellName = getString(L, 2);\n\tif (spellName.empty()) {\n\t\treportErrorFunc(\"Spell name is empty\");\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b5c15e0eb0730de3070526e5c10afba164799d9dfd5e41390d8fe939ddc9b7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4036, + "startColumn": 6, + "charOffset": 103933, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4034, + "startColumn": 6, + "charOffset": 103868, + "charLength": 1, + "snippet": { + "text": "\n\tauto spell = g_spells().getInstantSpellByName(spellName);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0468f8d09cd16191723dc23bf3f0789899fb761380d410ae126e6ddff407f10d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4037, + "startColumn": 3, + "charOffset": 103945, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 4035, + "startColumn": 3, + "charOffset": 103869, + "charLength": 15, + "snippet": { + "text": "\tauto spell = g_spells().getInstantSpellByName(spellName);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50d45a2bba921a1d095450cf73a7ba63dc80161cd0fefcfb6c01a663ec404cf0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4049, + "startColumn": 6, + "charOffset": 104327, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4047, + "startColumn": 6, + "charOffset": 104203, + "charLength": 1, + "snippet": { + "text": "\t// player:getWheelSpellAdditionalTarget(spellname)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10ddf69e6fcfaa37a5eafaf613b1d26a85e855acfb8e3723b2c0dbffc7ded5b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4050, + "startColumn": 3, + "charOffset": 104340, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 4048, + "startColumn": 3, + "charOffset": 104255, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6aef36744d5c20a10868ba97505b046e73403c010abc78c96407056d03de1f58" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4057, + "startColumn": 3, + "charOffset": 104503, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 4055, + "startColumn": 3, + "charOffset": 104440, + "charLength": 15, + "snippet": { + "text": "\tauto spellName = getString(L, 2);\n\tif (spellName.empty()) {\n\t\treportErrorFunc(\"Spell name is empty\");\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38830ad3c40d77ee1a5fc405abceddd027fcc5de7229960194376e3d00c320bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4063, + "startColumn": 6, + "charOffset": 104648, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4061, + "startColumn": 6, + "charOffset": 104583, + "charLength": 1, + "snippet": { + "text": "\n\tauto spell = g_spells().getInstantSpellByName(spellName);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d187126096734c1b6ed85ab8601e1b722a7cde9b1eb0add8ebe033905620f66" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4064, + "startColumn": 3, + "charOffset": 104660, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 4062, + "startColumn": 3, + "charOffset": 104584, + "charLength": 15, + "snippet": { + "text": "\tauto spell = g_spells().getInstantSpellByName(spellName);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48b037dd340d8771a400766bd1d1d7a938ae2139c93da370e54f6a42b6993c1a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4069, + "startColumn": 20, + "charOffset": 104778, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 4067, + "startColumn": 20, + "charOffset": 104755, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, player->wheel()->getSpellAdditionalTarget(spellName));\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec4e41433e325792e29b9efcfca42365cbbb3867ae6cac8573bef683f98da182" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4076, + "startColumn": 6, + "charOffset": 105051, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4074, + "startColumn": 6, + "charOffset": 104925, + "charLength": 1, + "snippet": { + "text": "\t// player:getWheelSpellAdditionalDuration(spellname)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f3b46a3a923fed48c600cd0863cd63bec918cf026e3a9062db083efc6d8d9c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4077, + "startColumn": 3, + "charOffset": 105064, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 4075, + "startColumn": 3, + "charOffset": 104979, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "069846bbc52bb6358e1946dce35df95f2668604566f1ac621b85ec594348dc91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4084, + "startColumn": 3, + "charOffset": 105227, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 4082, + "startColumn": 3, + "charOffset": 105164, + "charLength": 15, + "snippet": { + "text": "\tauto spellName = getString(L, 2);\n\tif (spellName.empty()) {\n\t\treportErrorFunc(\"Spell name is empty\");\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "643b72d79d836215d3170f44e0b092377f9b7c73fbadc4b951b3c5da17161f25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4090, + "startColumn": 6, + "charOffset": 105372, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4088, + "startColumn": 6, + "charOffset": 105307, + "charLength": 1, + "snippet": { + "text": "\n\tauto spell = g_spells().getInstantSpellByName(spellName);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd69fb6cdf7a37ce2fc3411e9588c9493860ee6760493944baf0f95e49d6916b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4091, + "startColumn": 3, + "charOffset": 105384, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 4089, + "startColumn": 3, + "charOffset": 105308, + "charLength": 15, + "snippet": { + "text": "\tauto spell = g_spells().getInstantSpellByName(spellName);\n\tif (!spell) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_SPELL_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ed6a84c9e138e1245549f358a7c8240a018ab0ea1adb01f3fd75051bb9b3b46" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4096, + "startColumn": 20, + "charOffset": 105502, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 4094, + "startColumn": 20, + "charOffset": 105479, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, player->wheel()->getSpellAdditionalDuration(spellName));\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df25cd6fccb933573099b1638ff4c6080206ea13f346d8801eaf499ee2d9e8cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4103, + "startColumn": 6, + "charOffset": 105754, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4101, + "startColumn": 6, + "charOffset": 105636, + "charLength": 1, + "snippet": { + "text": "\t// player:updateConcoction(itemid, timeLeft)\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15312d7648341565a36397d7c66b1642e1ae836541c05c33830d08f2c5208b09" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4115, + "startColumn": 6, + "charOffset": 106087, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4113, + "startColumn": 6, + "charOffset": 105982, + "charLength": 1, + "snippet": { + "text": "\t// player:clearSpellCooldowns()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b86d7ebbb091f88ef1e7d76e8956f12f4783447dcb7aa84b45e156f37d8f401" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4127, + "startColumn": 6, + "charOffset": 106338, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4125, + "startColumn": 6, + "charOffset": 106247, + "charLength": 1, + "snippet": { + "text": "\t// player:isVip()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9d9c5f8ca60fa5d2351ab244f857180f9c76597797bafd7392508d04d9820d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4128, + "startColumn": 3, + "charOffset": 106351, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 4126, + "startColumn": 3, + "charOffset": 106266, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6d0bf0421b94dbce9275b7d101dc8c36c38777959996703a61b05aa7078355c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4139, + "startColumn": 6, + "charOffset": 106651, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4137, + "startColumn": 6, + "charOffset": 106555, + "charLength": 1, + "snippet": { + "text": "\t// player:getVipDays()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6ffa1483de5b322aa83f063eb5842e2db18b7728af18461959fa0cfdbaf33d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4140, + "startColumn": 3, + "charOffset": 106664, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 4138, + "startColumn": 3, + "charOffset": 106579, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ed6a84c9e138e1245549f358a7c8240a018ab0ea1adb01f3fd75051bb9b3b46" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4145, + "startColumn": 20, + "charOffset": 106783, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 4143, + "startColumn": 20, + "charOffset": 106760, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, player->getPremiumDays());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e2235545fb8a2f7a22099456285895b32506cb7854e30c6f035c40969c91e35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4152, + "startColumn": 6, + "charOffset": 106977, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4150, + "startColumn": 6, + "charOffset": 106881, + "charLength": 1, + "snippet": { + "text": "\t// player:getVipTime()\n\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf3bc92427e6fcff00cc3f80b6d4af61f78365b6a34cd50259ef7eb3d8dd798a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4153, + "startColumn": 3, + "charOffset": 106990, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 4151, + "startColumn": 3, + "charOffset": 106905, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef7e30af8d55018e65ab999029082fe8eb3bda6383270cdc67d05b3ba54feee6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4165, + "startColumn": 6, + "charOffset": 107272, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4163, + "startColumn": 6, + "charOffset": 107203, + "charLength": 1, + "snippet": { + "text": "\t// player:kv()\n\tauto player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef9b76ca16a34112068eec126a8df94826ef061fb9166761b68d59e142345f06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4166, + "startColumn": 3, + "charOffset": 107285, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 4164, + "startColumn": 3, + "charOffset": 107219, + "charLength": 15, + "snippet": { + "text": "\tauto player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "203c58b08f6e98b121ffdc9724552e6a39760dc01f73dd50d75967b2b7cc38d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4179, + "startColumn": 6, + "charOffset": 107610, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4177, + "startColumn": 6, + "charOffset": 107523, + "charLength": 1, + "snippet": { + "text": "\t// player:getStoreInbox()\n\tconst auto &player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7508aa73fd2e8ddea7f21ee10f2c5996280cb25f424b38be2759430f3c343851" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4196, + "startColumn": 6, + "charOffset": 107974, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4194, + "startColumn": 6, + "charOffset": 107876, + "charLength": 1, + "snippet": { + "text": "\t// player:hasAchievement(id or name)\n\tconst auto &player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fcce623d7c3fa884ce4f817e4b22d55ce8ce5045686eb42ea722d1517bde8771" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4197, + "startColumn": 3, + "charOffset": 107987, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 4195, + "startColumn": 3, + "charOffset": 107914, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14a56df6c344ff7cae8632f992040bbcdde3032da6b888d41f1791eafb3760c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4215, + "startColumn": 6, + "charOffset": 108499, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4213, + "startColumn": 6, + "charOffset": 108379, + "charLength": 1, + "snippet": { + "text": "\t// player:addAchievement(id or name[, sendMessage = true])\n\tconst auto &player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c82219ef2623c6cb3c30356281123832d38ee9d34c6ada56a9d710b7b2d5641a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4216, + "startColumn": 3, + "charOffset": 108512, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 4214, + "startColumn": 3, + "charOffset": 108439, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fcf25a373839674ba5f1e50236576c3faff83ed61183004b0571e79e1511cb0c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4235, + "startColumn": 6, + "charOffset": 109083, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4233, + "startColumn": 6, + "charOffset": 108982, + "charLength": 1, + "snippet": { + "text": "\t// player:removeAchievement(id or name)\n\tconst auto &player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbc64e13aa91ec6de7618eb299d68b33eeec67a3e62ea955e3ab54a8822ffbea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4236, + "startColumn": 3, + "charOffset": 109096, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 4234, + "startColumn": 3, + "charOffset": 109023, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19eac26a4c64eaa00e473cd19ca48b3d0b7454e39c6a04874dc7ff640e8f8c1d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4254, + "startColumn": 6, + "charOffset": 109584, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4252, + "startColumn": 6, + "charOffset": 109490, + "charLength": 1, + "snippet": { + "text": "\t// player:getAchievementPoints()\n\tconst auto &player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9639c617486d8287d631c491c7d8c44fe9bb7cc15f303080204df702670aefe4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4255, + "startColumn": 3, + "charOffset": 109597, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 4253, + "startColumn": 3, + "charOffset": 109524, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f69dc550a9e10b1ce5b81426efa839ce186e0314748f70dd32aa397c49f36956" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4259, + "startColumn": 20, + "charOffset": 109691, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 4257, + "startColumn": 20, + "charOffset": 109668, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, player->achiev()->getPoints());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1fbcac5ffe15ae7b9d96f8f7c3d22ed3b99f60e41cce1229e5837915b07e8a13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4266, + "startColumn": 6, + "charOffset": 109904, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4264, + "startColumn": 6, + "charOffset": 109804, + "charLength": 1, + "snippet": { + "text": "\t// player:addAchievementPoints(amount)\n\tconst auto &player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e9f07a357e6af5d12f5c0d51055f4466b78e2e029f6236cbe66d65becec9078" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4267, + "startColumn": 3, + "charOffset": 109917, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 4265, + "startColumn": 3, + "charOffset": 109844, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dabf21a2e89aca7813c2cb69bc0adb6820e07c90d57c063108ed6f8ab7222015" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4282, + "startColumn": 6, + "charOffset": 110305, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4280, + "startColumn": 6, + "charOffset": 110202, + "charLength": 1, + "snippet": { + "text": "\t// player:removeAchievementPoints(amount)\n\tconst auto &player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf3bc92427e6fcff00cc3f80b6d4af61f78365b6a34cd50259ef7eb3d8dd798a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4283, + "startColumn": 3, + "charOffset": 110318, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 4281, + "startColumn": 3, + "charOffset": 110245, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef7e30af8d55018e65ab999029082fe8eb3bda6383270cdc67d05b3ba54feee6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4298, + "startColumn": 6, + "charOffset": 110675, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4296, + "startColumn": 6, + "charOffset": 110591, + "charLength": 1, + "snippet": { + "text": "\t// player:addBadge(id)\n\tconst auto &player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d94d45379295ae06478dd8f74148838f0882a12b958637b021d98bf7c62c6339" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4299, + "startColumn": 3, + "charOffset": 110688, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 4297, + "startColumn": 3, + "charOffset": 110615, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68abae22bbe6ddf94378e358189386f9f556e36388d6af7ca114b29c38eef5b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4303, + "startColumn": 19, + "charOffset": 110781, + "charLength": 3, + "snippet": { + "text": "add" + } + }, + "contextRegion": { + "startLine": 4301, + "startColumn": 19, + "charOffset": 110759, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tplayer->badge()->add(getNumber(L, 2, 0));\n\tpushBoolean(L, true);\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b8fd2e1eb6515fb689969cd5c777dcdf3a9a56e3254b04db43080834cf608cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4311, + "startColumn": 6, + "charOffset": 110991, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4309, + "startColumn": 6, + "charOffset": 110907, + "charLength": 1, + "snippet": { + "text": "\t// player:addTitle(id)\n\tconst auto &player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f488d46642d83ca677b2591d8fe9f1133d3b5b5df9f2fb2c0e5802d8bf8aba6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4312, + "startColumn": 3, + "charOffset": 111004, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 4310, + "startColumn": 3, + "charOffset": 110931, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8504143c306f858239ae2ca64179a990c83748691a22d1993b808b3f730f538a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4316, + "startColumn": 19, + "charOffset": 111097, + "charLength": 6, + "snippet": { + "text": "manage" + } + }, + "contextRegion": { + "startLine": 4314, + "startColumn": 19, + "charOffset": 111075, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tplayer->title()->manage(true, getNumber(L, 2, 0));\n\tpushBoolean(L, true);\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be5ec46933d06202014e4560c51f814acf59b9fb899f01e8b9bfe7d802e36b41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4324, + "startColumn": 6, + "charOffset": 111316, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4322, + "startColumn": 6, + "charOffset": 111233, + "charLength": 1, + "snippet": { + "text": "\t// player:getTitles()\n\tconst auto &player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07896e8a0f3d5b91b491d8f3e6cf6fad39e154e4b968402edd2ede0adb3b1595" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4325, + "startColumn": 3, + "charOffset": 111329, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 4323, + "startColumn": 3, + "charOffset": 111256, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70fba6b5662716208f5a61499d65dae4d06e7ca75ddba992197725f67b3a5605" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4333, + "startColumn": 2, + "charOffset": 111544, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4331, + "startColumn": 2, + "charOffset": 111526, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (const auto &title : playerTitles) {\n\t\tlua_createtable(L, 0, 3);\n\t\tsetField(L, \"id\", title.first.m_id);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c9aed8ba00459e3d3967483bf1efd8b36f0a49ec860a833f9c39b3a9fe622c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4335, + "startColumn": 21, + "charOffset": 111633, + "charLength": 5, + "snippet": { + "text": "title" + } + }, + "contextRegion": { + "startLine": 4333, + "startColumn": 21, + "charOffset": 111543, + "charLength": 5, + "snippet": { + "text": "\tfor (const auto &title : playerTitles) {\n\t\tlua_createtable(L, 0, 3);\n\t\tsetField(L, \"id\", title.first.m_id);\n\t\tsetField(L, \"name\", player->title()->getNameBySex(player->getSex(), title.first.m_maleName, title.first.m_femaleName));\n\t\tsetField(L, \"description\", title.first.m_description);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7c5972c307f374b1b55f94db896e7ef116fca17394b50e8e227c4873640f8db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4346, + "startColumn": 6, + "charOffset": 112032, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4344, + "startColumn": 6, + "charOffset": 111941, + "charLength": 1, + "snippet": { + "text": "\t// player:setCurrentTitle(id)\n\tconst auto &player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d568ef3729dac2bc3877e2622950263e176dda8830988da9c28a53261889b1f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4347, + "startColumn": 3, + "charOffset": 112045, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 4345, + "startColumn": 3, + "charOffset": 111972, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02c181c2c19369a8d753e92fb78857022b003cee407d74d9ef1ae3e61574dc69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4353, + "startColumn": 3, + "charOffset": 112219, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 4351, + "startColumn": 3, + "charOffset": 112120, + "charLength": 15, + "snippet": { + "text": "\tconst auto &title = g_game().getTitleById(getNumber(L, 2, 0));\n\tif (title.m_id == 0) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_VARIANT_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "815bb8635ccd54a0fbf4fc069801b0852e712751d6a1ba8a4ab6af8d2488eae8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4365, + "startColumn": 6, + "charOffset": 112570, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4363, + "startColumn": 6, + "charOffset": 112450, + "charLength": 1, + "snippet": { + "text": "\t// player:createTransactionSummary(type, amount[, id = 0])\n\tconst auto &player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc2fbbf0f51e56a39264758d86e79cc477d785f4ac2f975687b3db7daa0f1be8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4366, + "startColumn": 3, + "charOffset": 112583, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 4364, + "startColumn": 3, + "charOffset": 112510, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5800adc14b3313ddc83a1ca68d8293e7bc2b8f166479892bc8eb17419bdf00cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4372, + "startColumn": 3, + "charOffset": 112720, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 4370, + "startColumn": 3, + "charOffset": 112658, + "charLength": 15, + "snippet": { + "text": "\tauto type = getNumber(L, 2, 0);\n\tif (type == 0) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_VARIANT_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09320f3bf0d9e572826eec3a005b0be6231d6737115e7d9d51e1780f23e2436b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4387, + "startColumn": 6, + "charOffset": 113135, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4385, + "startColumn": 6, + "charOffset": 113033, + "charLength": 1, + "snippet": { + "text": "\t// player:takeScreenshot(screenshotType)\n\tconst auto &player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b33e9654c8ce1323f9c42a242cf3ad1c3143524abfe217eb56e67a11c993266" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/player_functions.cpp" + }, + "region": { + "startLine": 4401, + "startColumn": 6, + "charOffset": 113471, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4399, + "startColumn": 6, + "charOffset": 113380, + "charLength": 1, + "snippet": { + "text": "\t// player:sendIconBakragore()\n\tconst auto &player = getUserdataShared(L, 1);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e14dd12eb31e15c0ed134f9a5263ae88f5b3404765711a7a505ae8931cbfee41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'loadLoot' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 19, + "startColumn": 19, + "charOffset": 594, + "charLength": 8, + "snippet": { + "text": "loadLoot" + } + }, + "contextRegion": { + "startLine": 17, + "startColumn": 19, + "charOffset": 538, + "charLength": 8, + "snippet": { + "text": "#include \"items/weapons/weapons.hpp\"\n\nvoid MonsterType::loadLoot(const std::shared_ptr monsterType, LootBlock lootBlock) {\n\tif (lootBlock.childLoot.empty()) {\n\t\tbool isContainer = Item::items[lootBlock.id].isContainer();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a5c25249711bf41b0508af6057ca72d8fe0607e98079ea2144719283812fd92" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'monsterType' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 19, + "startColumn": 63, + "charOffset": 638, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 17, + "startColumn": 63, + "charOffset": 538, + "charLength": 11, + "snippet": { + "text": "#include \"items/weapons/weapons.hpp\"\n\nvoid MonsterType::loadLoot(const std::shared_ptr monsterType, LootBlock lootBlock) {\n\tif (lootBlock.childLoot.empty()) {\n\t\tbool isContainer = Item::items[lootBlock.id].isContainer();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c22b3366427fc804556e4b35bb578adb3c213c6ad4d8eae262e501c182170f88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 23, + "startColumn": 4, + "charOffset": 796, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 21, + "startColumn": 4, + "charOffset": 710, + "charLength": 3, + "snippet": { + "text": "\t\tbool isContainer = Item::items[lootBlock.id].isContainer();\n\t\tif (isContainer) {\n\t\t\tfor (const LootBlock &child : lootBlock.childLoot) {\n\t\t\t\tlootBlock.childLoot.push_back(child);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c10a7a516d3c2d6a0e593777f502c68e2ce8f9e04ba7b1d61609e8445708ae9b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-make-member-function-const", + "ruleIndex": 708, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'canSpawn' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 19, + "charOffset": 1038, + "charLength": 8, + "snippet": { + "text": "canSpawn" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 19, + "charOffset": 1017, + "charLength": 8, + "snippet": { + "text": "}\n\nbool MonsterType::canSpawn(const Position &pos) {\n\tbool canSpawn = true;\n\tbool isDay = g_game().gameIsDay();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6486583bcbc408071e6fc33adb932131704ce87cdab37a261d87930a9751454" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getDamageCondition' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 44, + "charOffset": 1452, + "charLength": 18, + "snippet": { + "text": "getDamageCondition" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 44, + "charOffset": 1406, + "charLength": 18, + "snippet": { + "text": "}\n\nstd::shared_ptr Monsters::getDamageCondition(ConditionType_t conditionType, int32_t maxDamage, int32_t minDamage, int32_t startDamage, uint32_t tickInterval) {\n\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_COMBAT, conditionType, 0, 0)->static_self_cast();\n\tcondition->setParam(CONDITION_PARAM_TICKINTERVAL, tickInterval);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e441893e0258b032482e6607e23c915fa67ab993172854318941299c22be6b60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 47, + "startColumn": 13, + "charOffset": 1750, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 45, + "startColumn": 13, + "charOffset": 1409, + "charLength": 8, + "snippet": { + "text": "std::shared_ptr Monsters::getDamageCondition(ConditionType_t conditionType, int32_t maxDamage, int32_t minDamage, int32_t startDamage, uint32_t tickInterval) {\n\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_COMBAT, conditionType, 0, 0)->static_self_cast();\n\tcondition->setParam(CONDITION_PARAM_TICKINTERVAL, tickInterval);\n\tcondition->setParam(CONDITION_PARAM_MINVALUE, minDamage);\n\tcondition->setParam(CONDITION_PARAM_MAXVALUE, maxDamage);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "838ebe89eac9ed7118a9c70b91ed4ec5399a71ae2ffd2b583025b27e3b846746" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 47, + "startColumn": 52, + "charOffset": 1789, + "charLength": 12, + "snippet": { + "text": "tickInterval" + } + }, + "contextRegion": { + "startLine": 45, + "startColumn": 52, + "charOffset": 1409, + "charLength": 12, + "snippet": { + "text": "std::shared_ptr Monsters::getDamageCondition(ConditionType_t conditionType, int32_t maxDamage, int32_t minDamage, int32_t startDamage, uint32_t tickInterval) {\n\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_COMBAT, conditionType, 0, 0)->static_self_cast();\n\tcondition->setParam(CONDITION_PARAM_TICKINTERVAL, tickInterval);\n\tcondition->setParam(CONDITION_PARAM_MINVALUE, minDamage);\n\tcondition->setParam(CONDITION_PARAM_MAXVALUE, maxDamage);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3d05dd24a5a65bf11958f530e54d9ea917202595364d82d12c0a10076dc4074" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 48, + "startColumn": 13, + "charOffset": 1816, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 13, + "charOffset": 1586, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_COMBAT, conditionType, 0, 0)->static_self_cast();\n\tcondition->setParam(CONDITION_PARAM_TICKINTERVAL, tickInterval);\n\tcondition->setParam(CONDITION_PARAM_MINVALUE, minDamage);\n\tcondition->setParam(CONDITION_PARAM_MAXVALUE, maxDamage);\n\tcondition->setParam(CONDITION_PARAM_STARTVALUE, startDamage);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bff6c9fb6f6a9a38583299dc6b5c170355896d32356fac84c7ebe6a65dd1726f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 49, + "startColumn": 13, + "charOffset": 1875, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 47, + "startColumn": 13, + "charOffset": 1738, + "charLength": 8, + "snippet": { + "text": "\tcondition->setParam(CONDITION_PARAM_TICKINTERVAL, tickInterval);\n\tcondition->setParam(CONDITION_PARAM_MINVALUE, minDamage);\n\tcondition->setParam(CONDITION_PARAM_MAXVALUE, maxDamage);\n\tcondition->setParam(CONDITION_PARAM_STARTVALUE, startDamage);\n\tcondition->setParam(CONDITION_PARAM_DELAYED, 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7f3562f080e4b5fb76cd3ac90915505d75c456b0bed60ebd4be8702d47054ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 50, + "startColumn": 13, + "charOffset": 1934, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 48, + "startColumn": 13, + "charOffset": 1804, + "charLength": 8, + "snippet": { + "text": "\tcondition->setParam(CONDITION_PARAM_MINVALUE, minDamage);\n\tcondition->setParam(CONDITION_PARAM_MAXVALUE, maxDamage);\n\tcondition->setParam(CONDITION_PARAM_STARTVALUE, startDamage);\n\tcondition->setParam(CONDITION_PARAM_DELAYED, 1);\n\treturn condition;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "270efdf724ca33fc0314d6de0b5aaa1b9437767b4a61fc6e221f546f4a9cbca5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 51, + "startColumn": 13, + "charOffset": 1997, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 49, + "startColumn": 13, + "charOffset": 1863, + "charLength": 8, + "snippet": { + "text": "\tcondition->setParam(CONDITION_PARAM_MAXVALUE, maxDamage);\n\tcondition->setParam(CONDITION_PARAM_STARTVALUE, startDamage);\n\tcondition->setParam(CONDITION_PARAM_DELAYED, 1);\n\treturn condition;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd5921076fa37aee5ca03e73605c179302f0c38a186a2d23e38fec98148d1402" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'deserializeSpell' has cognitive complexity of 62 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 55, + "startColumn": 16, + "charOffset": 2072, + "charLength": 16, + "snippet": { + "text": "deserializeSpell" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 16, + "charOffset": 2054, + "charLength": 16, + "snippet": { + "text": "}\n\nbool Monsters::deserializeSpell(const std::shared_ptr spell, spellBlock_t &sb, const std::string &description) {\n\tif (!spell->scriptName.empty()) {\n\t\tspell->isScripted = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "609e08e1cfd6d85a95e0e90bce9b412c02c77215374d5157db26777713a07034" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'spell' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 55, + "startColumn": 69, + "charOffset": 2125, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 69, + "charOffset": 2054, + "charLength": 5, + "snippet": { + "text": "}\n\nbool Monsters::deserializeSpell(const std::shared_ptr spell, spellBlock_t &sb, const std::string &description) {\n\tif (!spell->scriptName.empty()) {\n\t\tspell->isScripted = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7b9131ddfa3bd9aa2ffdbf9959a031960ac04e93e771e01bfe7ae30e6854ab0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 65, + "startColumn": 23, + "charOffset": 2393, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 23, + "charOffset": 2341, + "charLength": 1, + "snippet": { + "text": "\n\tsb.speed = spell->interval;\n\tsb.chance = std::min((int)spell->chance, 100);\n\tsb.range = std::min((int)spell->range, MAP_MAX_VIEW_PORT_X * 2);\n\tsb.minCombatValue = std::min(spell->minCombatValue, spell->maxCombatValue);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e09a35d8be8dd5a384be5d096f2008cc6a882d610e36c3b51e160aac989a56ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 65, + "startColumn": 43, + "charOffset": 2413, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 43, + "charOffset": 2341, + "charLength": 3, + "snippet": { + "text": "\n\tsb.speed = spell->interval;\n\tsb.chance = std::min((int)spell->chance, 100);\n\tsb.range = std::min((int)spell->range, MAP_MAX_VIEW_PORT_X * 2);\n\tsb.minCombatValue = std::min(spell->minCombatValue, spell->maxCombatValue);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b41d3801deaf21f0ce15b99eae65de24240e61351cc0f86fbb69d3cdb85ce72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 22, + "charOffset": 2440, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 22, + "charOffset": 2342, + "charLength": 1, + "snippet": { + "text": "\tsb.speed = spell->interval;\n\tsb.chance = std::min((int)spell->chance, 100);\n\tsb.range = std::min((int)spell->range, MAP_MAX_VIEW_PORT_X * 2);\n\tsb.minCombatValue = std::min(spell->minCombatValue, spell->maxCombatValue);\n\tsb.maxCombatValue = std::max(spell->minCombatValue, spell->maxCombatValue);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "180920f048c341593f5c2f71a02ba75b453030ea0b9c3d7b1226c5472ffd0add" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 109, + "startColumn": 14, + "charOffset": 3619, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 107, + "startColumn": 14, + "charOffset": 3589, + "charLength": 8, + "snippet": { + "text": "\n\t\tsb.range = 1;\n\t\tcombatPtr->setParam(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE);\n\t\tcombatPtr->setParam(COMBAT_PARAM_BLOCKARMOR, 1);\n\t\tcombatPtr->setParam(COMBAT_PARAM_BLOCKSHIELD, 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "592cfd04eeff7f361ef596df4519ccae471b0bc35180b1543c1cad007f27f7ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 110, + "startColumn": 14, + "charOffset": 3684, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 108, + "startColumn": 14, + "charOffset": 3590, + "charLength": 8, + "snippet": { + "text": "\t\tsb.range = 1;\n\t\tcombatPtr->setParam(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE);\n\t\tcombatPtr->setParam(COMBAT_PARAM_BLOCKARMOR, 1);\n\t\tcombatPtr->setParam(COMBAT_PARAM_BLOCKSHIELD, 1);\n\t\tcombatPtr->setOrigin(ORIGIN_MELEE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d1c1a8f1b3eada07545b506cde0505c492effda7f7d13ddbbdd5303dee4c2ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 14, + "charOffset": 3735, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 14, + "charOffset": 3606, + "charLength": 8, + "snippet": { + "text": "\t\tcombatPtr->setParam(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE);\n\t\tcombatPtr->setParam(COMBAT_PARAM_BLOCKARMOR, 1);\n\t\tcombatPtr->setParam(COMBAT_PARAM_BLOCKSHIELD, 1);\n\t\tcombatPtr->setOrigin(ORIGIN_MELEE);\n\t} else if (spellName == \"combat\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53de7883d74ff23cd434c26889676f1d319031af601d76c9e6f7748db01f1cb8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 114, + "startColumn": 3, + "charOffset": 3851, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 112, + "startColumn": 3, + "charOffset": 3774, + "charLength": 2, + "snippet": { + "text": "\t\tcombatPtr->setOrigin(ORIGIN_MELEE);\n\t} else if (spellName == \"combat\") {\n\t\tif (spell->combatType == COMBAT_PHYSICALDAMAGE) {\n\t\t\tcombatPtr->setParam(COMBAT_PARAM_BLOCKARMOR, 1);\n\t\t\tcombatPtr->setOrigin(ORIGIN_RANGED);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61ba11170fb8549f41ab9b4170511eae78126a1588d88e846020d3641432fe3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 115, + "startColumn": 15, + "charOffset": 3915, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 113, + "startColumn": 15, + "charOffset": 3812, + "charLength": 8, + "snippet": { + "text": "\t} else if (spellName == \"combat\") {\n\t\tif (spell->combatType == COMBAT_PHYSICALDAMAGE) {\n\t\t\tcombatPtr->setParam(COMBAT_PARAM_BLOCKARMOR, 1);\n\t\t\tcombatPtr->setOrigin(ORIGIN_RANGED);\n\t\t} else if (spell->combatType == COMBAT_HEALING) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb5ec8ab660a8948ccb32727899bf9d5fb0f6464d553f5132885e29854036b7b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 118, + "startColumn": 15, + "charOffset": 4059, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 116, + "startColumn": 15, + "charOffset": 3953, + "charLength": 8, + "snippet": { + "text": "\t\t\tcombatPtr->setOrigin(ORIGIN_RANGED);\n\t\t} else if (spell->combatType == COMBAT_HEALING) {\n\t\t\tcombatPtr->setParam(COMBAT_PARAM_AGGRESSIVE, 0);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a22bcffc359eb6c6594dfc0893954d76608fd9652694b26955389e3f729e103" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 121, + "startColumn": 14, + "charOffset": 4115, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 119, + "startColumn": 14, + "charOffset": 4097, + "charLength": 8, + "snippet": { + "text": "\t\t}\n\n\t\tcombatPtr->setParam(COMBAT_PARAM_TYPE, spell->combatType);\n\t} else if (spellName == \"speed\") {\n\t\tint32_t speedChange = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e97305c289178cd65d81304eb2bc2d9bc09ee98d46719bb24e7de1c520870b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 124, + "startColumn": 22, + "charOffset": 4247, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 122, + "startColumn": 22, + "charOffset": 4163, + "charLength": 5, + "snippet": { + "text": "\t} else if (spellName == \"speed\") {\n\t\tint32_t speedChange = 0;\n\t\tint32_t duration = 10000;\n\n\t\tif (spell->duration != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c60711c36d1da5af7e7666fc20d2a82317c180b08fb1ae1db7507d536111a108" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-std-min-max", + "ruleIndex": 736, + "kind": "fail", + "level": "warning", + "message": { + "text": "use `std::max` instead of `<`" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 132, + "startColumn": 4, + "charOffset": 4394, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 130, + "startColumn": 4, + "charOffset": 4321, + "charLength": 2, + "snippet": { + "text": "\t\tif (spell->speedChange != 0) {\n\t\t\tspeedChange = spell->speedChange;\n\t\t\tif (speedChange < -1000) {\n\t\t\t\t// Cant be slower than 100%\n\t\t\t\tspeedChange = -1000;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "751ee4a74dd172056abd282bfdd7edbb0a4d9ad24a54d5f2341dcdc9f03657a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 132, + "startColumn": 23, + "charOffset": 4413, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 130, + "startColumn": 23, + "charOffset": 4321, + "charLength": 4, + "snippet": { + "text": "\t\tif (spell->speedChange != 0) {\n\t\t\tspeedChange = spell->speedChange;\n\t\t\tif (speedChange < -1000) {\n\t\t\t\t// Cant be slower than 100%\n\t\t\t\tspeedChange = -1000;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5826801127f0f0cfe707c6ec53b9d05ff32cefe1076275c2cee53b9f175c972" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 20, + "charOffset": 4472, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 20, + "charOffset": 4391, + "charLength": 4, + "snippet": { + "text": "\t\t\tif (speedChange < -1000) {\n\t\t\t\t// Cant be slower than 100%\n\t\t\t\tspeedChange = -1000;\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7026ce9c64826a520f4dc3bf8358d7dc5ca273f0a5b5a2e056c81fb540df8a20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'conditionType' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 138, + "startColumn": 19, + "charOffset": 4506, + "charLength": 13, + "snippet": { + "text": "conditionType" + } + }, + "contextRegion": { + "startLine": 136, + "startColumn": 19, + "charOffset": 4483, + "charLength": 13, + "snippet": { + "text": "\t\t}\n\n\t\tConditionType_t conditionType;\n\t\tif (speedChange > 0) {\n\t\t\tconditionType = CONDITION_HASTE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "995987d632c8cfba084c9a614454320ebcae2ee41f49ebbef5cc1e681c49966c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 141, + "startColumn": 15, + "charOffset": 4596, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 139, + "startColumn": 15, + "charOffset": 4521, + "charLength": 8, + "snippet": { + "text": "\t\tif (speedChange > 0) {\n\t\t\tconditionType = CONDITION_HASTE;\n\t\t\tcombatPtr->setParam(COMBAT_PARAM_AGGRESSIVE, 0);\n\t\t} else {\n\t\t\tconditionType = CONDITION_PARALYZE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8614a34af340a79543f7b46e8e966e83569e2537048cacefca48fcd5219f09b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 147, + "startColumn": 22, + "charOffset": 4868, + "charLength": 4, + "snippet": { + "text": "1.0f" + } + }, + "contextRegion": { + "startLine": 145, + "startColumn": 22, + "charOffset": 4688, + "charLength": 4, + "snippet": { + "text": "\n\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_COMBAT, conditionType, duration, 0)->static_self_cast();\n\t\tfloat multiplier = 1.0f + static_cast(speedChange) / 1000.0f;\n\t\tcondition->setFormulaVars(multiplier / 2, 40, multiplier, 40);\n\t\tcombatPtr->addCondition(condition);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2bbb874ff618d317d994874161d00d68bab36d57e2081fa7e9e8909f602df23" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 147, + "startColumn": 22, + "charOffset": 4868, + "charLength": 4, + "snippet": { + "text": "1.0f" + } + }, + "contextRegion": { + "startLine": 145, + "startColumn": 22, + "charOffset": 4688, + "charLength": 4, + "snippet": { + "text": "\n\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_COMBAT, conditionType, duration, 0)->static_self_cast();\n\t\tfloat multiplier = 1.0f + static_cast(speedChange) / 1000.0f;\n\t\tcondition->setFormulaVars(multiplier / 2, 40, multiplier, 40);\n\t\tcombatPtr->addCondition(condition);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2945d7c09377fe76d6f3097b85b5ba6ad135083f76e33d529f0b4a81aac4773d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 147, + "startColumn": 63, + "charOffset": 4909, + "charLength": 7, + "snippet": { + "text": "1000.0f" + } + }, + "contextRegion": { + "startLine": 145, + "startColumn": 63, + "charOffset": 4688, + "charLength": 7, + "snippet": { + "text": "\n\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_COMBAT, conditionType, duration, 0)->static_self_cast();\n\t\tfloat multiplier = 1.0f + static_cast(speedChange) / 1000.0f;\n\t\tcondition->setFormulaVars(multiplier / 2, 40, multiplier, 40);\n\t\tcombatPtr->addCondition(condition);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b34192b1566b032b188aba3c50ecce90228ef0ca645a2a5a002859f173002384" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 147, + "startColumn": 63, + "charOffset": 4909, + "charLength": 7, + "snippet": { + "text": "1000.0f" + } + }, + "contextRegion": { + "startLine": 145, + "startColumn": 63, + "charOffset": 4688, + "charLength": 7, + "snippet": { + "text": "\n\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_COMBAT, conditionType, duration, 0)->static_self_cast();\n\t\tfloat multiplier = 1.0f + static_cast(speedChange) / 1000.0f;\n\t\tcondition->setFormulaVars(multiplier / 2, 40, multiplier, 40);\n\t\tcombatPtr->addCondition(condition);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff2032b371f98ea0ed73655152a3fcdf92941d76dd50bb205a5f077d67e677f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000.0f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 147, + "startColumn": 63, + "charOffset": 4909, + "charLength": 7, + "snippet": { + "text": "1000.0f" + } + }, + "contextRegion": { + "startLine": 145, + "startColumn": 63, + "charOffset": 4688, + "charLength": 7, + "snippet": { + "text": "\n\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_COMBAT, conditionType, duration, 0)->static_self_cast();\n\t\tfloat multiplier = 1.0f + static_cast(speedChange) / 1000.0f;\n\t\tcondition->setFormulaVars(multiplier / 2, 40, multiplier, 40);\n\t\tcombatPtr->addCondition(condition);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88cc578ebc00ea980e9bd89969f6d1aa4bb81217e59610bd3d933013c724d841" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 148, + "startColumn": 42, + "charOffset": 4959, + "charLength": 1, + "snippet": { + "text": "2" + } + }, + "contextRegion": { + "startLine": 146, + "startColumn": 42, + "charOffset": 4689, + "charLength": 1, + "snippet": { + "text": "\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_COMBAT, conditionType, duration, 0)->static_self_cast();\n\t\tfloat multiplier = 1.0f + static_cast(speedChange) / 1000.0f;\n\t\tcondition->setFormulaVars(multiplier / 2, 40, multiplier, 40);\n\t\tcombatPtr->addCondition(condition);\n\t} else if (spellName == \"outfit\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc885505e40ac3ea26e9f9be33d23499b4aea80701fbb94ac1d447c4b8cb3666" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 148, + "startColumn": 45, + "charOffset": 4962, + "charLength": 2, + "snippet": { + "text": "40" + } + }, + "contextRegion": { + "startLine": 146, + "startColumn": 45, + "charOffset": 4689, + "charLength": 2, + "snippet": { + "text": "\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_COMBAT, conditionType, duration, 0)->static_self_cast();\n\t\tfloat multiplier = 1.0f + static_cast(speedChange) / 1000.0f;\n\t\tcondition->setFormulaVars(multiplier / 2, 40, multiplier, 40);\n\t\tcombatPtr->addCondition(condition);\n\t} else if (spellName == \"outfit\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "084bee1bb46d11d77c703c3dfe0178f7278733aee238e07826f633bdd77e1199" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 148, + "startColumn": 45, + "charOffset": 4962, + "charLength": 2, + "snippet": { + "text": "40" + } + }, + "contextRegion": { + "startLine": 146, + "startColumn": 45, + "charOffset": 4689, + "charLength": 2, + "snippet": { + "text": "\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_COMBAT, conditionType, duration, 0)->static_self_cast();\n\t\tfloat multiplier = 1.0f + static_cast(speedChange) / 1000.0f;\n\t\tcondition->setFormulaVars(multiplier / 2, 40, multiplier, 40);\n\t\tcombatPtr->addCondition(condition);\n\t} else if (spellName == \"outfit\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe5c517bf93c372463bd8642f4e3e41c64d7c840affd560887ba05ba132319e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 148, + "startColumn": 61, + "charOffset": 4978, + "charLength": 2, + "snippet": { + "text": "40" + } + }, + "contextRegion": { + "startLine": 146, + "startColumn": 61, + "charOffset": 4689, + "charLength": 2, + "snippet": { + "text": "\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_COMBAT, conditionType, duration, 0)->static_self_cast();\n\t\tfloat multiplier = 1.0f + static_cast(speedChange) / 1000.0f;\n\t\tcondition->setFormulaVars(multiplier / 2, 40, multiplier, 40);\n\t\tcombatPtr->addCondition(condition);\n\t} else if (spellName == \"outfit\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d737aa6e4efb9ed2889ed286c56d6cf99dfa69c1f855428d27e36b6ca3577a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 148, + "startColumn": 61, + "charOffset": 4978, + "charLength": 2, + "snippet": { + "text": "40" + } + }, + "contextRegion": { + "startLine": 146, + "startColumn": 61, + "charOffset": 4689, + "charLength": 2, + "snippet": { + "text": "\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_COMBAT, conditionType, duration, 0)->static_self_cast();\n\t\tfloat multiplier = 1.0f + static_cast(speedChange) / 1000.0f;\n\t\tcondition->setFormulaVars(multiplier / 2, 40, multiplier, 40);\n\t\tcombatPtr->addCondition(condition);\n\t} else if (spellName == \"outfit\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2827f85379f0103d9ad5d001af982ebda3574df96641cea889d0ba5102452875" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 151, + "startColumn": 22, + "charOffset": 5079, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 149, + "startColumn": 22, + "charOffset": 4983, + "charLength": 5, + "snippet": { + "text": "\t\tcombatPtr->addCondition(condition);\n\t} else if (spellName == \"outfit\") {\n\t\tint32_t duration = 10000;\n\n\t\tif (spell->duration != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5886a0cdaeb64aced2154e639472cb1ee3c1a016f9747750019f2946a2a965b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 14, + "charOffset": 5759, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 14, + "charOffset": 5741, + "charLength": 8, + "snippet": { + "text": "\t\t}\n\n\t\tcombatPtr->setParam(COMBAT_PARAM_AGGRESSIVE, 0);\n\t\tcombatPtr->addCondition(condition);\n\t} else if (spellName == \"invisible\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14475de7a3a9da73275b3997ddb68ee50d9b456f94e4b260f262c4450e4a5d66" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 175, + "startColumn": 22, + "charOffset": 5896, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 173, + "startColumn": 22, + "charOffset": 5797, + "charLength": 5, + "snippet": { + "text": "\t\tcombatPtr->addCondition(condition);\n\t} else if (spellName == \"invisible\") {\n\t\tint32_t duration = 10000;\n\n\t\tif (spell->duration != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08ecdd8e44496e04e68dd0ca1658720d89aeb8e7be49707d65a820fcd4138f3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 182, + "startColumn": 14, + "charOffset": 6106, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 180, + "startColumn": 14, + "charOffset": 5969, + "charLength": 8, + "snippet": { + "text": "\n\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_INVISIBLE, duration, 0);\n\t\tcombatPtr->setParam(COMBAT_PARAM_AGGRESSIVE, 0);\n\t\tcombatPtr->addCondition(condition);\n\t} else if (spellName == \"drunk\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d689d9d4338f821cfd291bd91c8d289980cd4c407e57033bba962d900252f87" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 185, + "startColumn": 22, + "charOffset": 6239, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 183, + "startColumn": 22, + "charOffset": 6144, + "charLength": 5, + "snippet": { + "text": "\t\tcombatPtr->addCondition(condition);\n\t} else if (spellName == \"drunk\") {\n\t\tint32_t duration = 10000;\n\n\t\tif (spell->duration != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc64e2c5e30a9ef368fa80819aeda32dce7381fa1f185996cf0fa68c25f8bcb5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 194, + "startColumn": 22, + "charOffset": 6558, + "charLength": 4, + "snippet": { + "text": "6000" + } + }, + "contextRegion": { + "startLine": 192, + "startColumn": 22, + "charOffset": 6432, + "charLength": 4, + "snippet": { + "text": "\t\tcombatPtr->addCondition(condition);\n\t} else if (spellName == \"soulwars fear\" || spellName == \"fear\") {\n\t\tint32_t duration = 6000;\n\n\t\tif (spell->duration != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b878b2a45e915184c8d420778238c8222d0bb35f786c588a2a6e693ae10ddb1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 203, + "startColumn": 14, + "charOffset": 6826, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 201, + "startColumn": 14, + "charOffset": 6735, + "charLength": 8, + "snippet": { + "text": "\t\tcombatPtr->addCondition(condition);\n\t} else if (spellName == \"firefield\") {\n\t\tcombatPtr->setParam(COMBAT_PARAM_CREATEITEM, ITEM_FIREFIELD_PVP_FULL);\n\t} else if (spellName == \"poisonfield\") {\n\t\tcombatPtr->setParam(COMBAT_PARAM_CREATEITEM, ITEM_POISONFIELD_PVP);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4b7879a4a2d601a498b71b0bd36682ec17816dea93815d651436a44654beb41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 205, + "startColumn": 14, + "charOffset": 6941, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 203, + "startColumn": 14, + "charOffset": 6813, + "charLength": 8, + "snippet": { + "text": "\t\tcombatPtr->setParam(COMBAT_PARAM_CREATEITEM, ITEM_FIREFIELD_PVP_FULL);\n\t} else if (spellName == \"poisonfield\") {\n\t\tcombatPtr->setParam(COMBAT_PARAM_CREATEITEM, ITEM_POISONFIELD_PVP);\n\t} else if (spellName == \"energyfield\") {\n\t\tcombatPtr->setParam(COMBAT_PARAM_CREATEITEM, ITEM_ENERGYFIELD_PVP);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9d6b7b9b6de9b31e88ceed49ecfed5735cf66194d4fb1223ccdfb09a4769ed6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 207, + "startColumn": 14, + "charOffset": 7053, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 205, + "startColumn": 14, + "charOffset": 6928, + "charLength": 8, + "snippet": { + "text": "\t\tcombatPtr->setParam(COMBAT_PARAM_CREATEITEM, ITEM_POISONFIELD_PVP);\n\t} else if (spellName == \"energyfield\") {\n\t\tcombatPtr->setParam(COMBAT_PARAM_CREATEITEM, ITEM_ENERGYFIELD_PVP);\n\t} else if (spellName == \"condition\") {\n\t\tif (spell->conditionType == CONDITION_NONE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43e80af7fe6ffce6d6a63af3e3ce1225fd96d92d5ea042556550c859207793e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 214, + "startColumn": 38, + "charOffset": 7395, + "charLength": 1, + "snippet": { + "text": "{" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 38, + "charOffset": 7307, + "charLength": 1, + "snippet": { + "text": "\t\t\t description, spell->name);\n\t\t}\n\t} else if (spellName == \"strength\") {\n\t\t//\n\t} else if (spellName == \"effect\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0f42ee4ef58258dc8c6497c8092c14fd1bd825bc5f59455570fcff662974717" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 225, + "startColumn": 14, + "charOffset": 7686, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 223, + "startColumn": 14, + "charOffset": 7633, + "charLength": 8, + "snippet": { + "text": "\n\tif (spell->shoot != CONST_ANI_NONE) {\n\t\tcombatPtr->setParam(COMBAT_PARAM_DISTANCEEFFECT, spell->shoot);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ad33faef3828f51cd81fe56e23e811ccb260c5ab172c043940efe0368453743" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 229, + "startColumn": 14, + "charOffset": 7795, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 227, + "startColumn": 14, + "charOffset": 7742, + "charLength": 8, + "snippet": { + "text": "\n\tif (spell->effect != CONST_ME_NONE) {\n\t\tcombatPtr->setParam(COMBAT_PARAM_EFFECT, spell->effect);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56edd304708ed8519f3488bd60e1dcbb328c972cbc02005a58c8316c3ac88ae5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 237, + "startColumn": 27, + "charOffset": 8185, + "charLength": 4, + "snippet": { + "text": "2000" + } + }, + "contextRegion": { + "startLine": 235, + "startColumn": 27, + "charOffset": 8037, + "charLength": 4, + "snippet": { + "text": "\t\tint32_t maxDamage = std::abs(spell->conditionMaxDamage);\n\t\tint32_t startDamage = std::abs(spell->conditionStartDamage);\n\t\tuint32_t tickInterval = 2000;\n\n\t\tif (spell->tickInterval > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ecb3d1ce59d48bf13e92ccf0b28f52156c45fe3082123af07cf575e68a98494" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 255, + "startColumn": 58, + "charOffset": 8613, + "charLength": 2, + "snippet": { + "text": "sb" + } + }, + "contextRegion": { + "startLine": 253, + "startColumn": 58, + "charOffset": 8552, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tcombatPtr->setPlayerCombatValues(COMBAT_FORMULA_DAMAGE, sb.minCombatValue, 0, sb.maxCombatValue, 0);\n\tcombatSpell = std::make_shared(combatPtr, spell->needTarget, spell->needDirection);\n\t// Sanity check" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9720038eba93643ff062f8890a37393d4f5c52064a817b0d20fa0efe4d0abea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 255, + "startColumn": 77, + "charOffset": 8632, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 253, + "startColumn": 77, + "charOffset": 8552, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tcombatPtr->setPlayerCombatValues(COMBAT_FORMULA_DAMAGE, sb.minCombatValue, 0, sb.maxCombatValue, 0);\n\tcombatSpell = std::make_shared(combatPtr, spell->needTarget, spell->needDirection);\n\t// Sanity check" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45c24944ebd692d001dd1c301fdf0624b7b9ea69e38fabfeb2725248e08fc54a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 255, + "startColumn": 80, + "charOffset": 8635, + "charLength": 2, + "snippet": { + "text": "sb" + } + }, + "contextRegion": { + "startLine": 253, + "startColumn": 80, + "charOffset": 8552, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tcombatPtr->setPlayerCombatValues(COMBAT_FORMULA_DAMAGE, sb.minCombatValue, 0, sb.maxCombatValue, 0);\n\tcombatSpell = std::make_shared(combatPtr, spell->needTarget, spell->needDirection);\n\t// Sanity check" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76b642ead58fe300a3c15481fdeb01957b11c585841e5a7e9e99221a0f5be4ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 255, + "startColumn": 99, + "charOffset": 8654, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 253, + "startColumn": 99, + "charOffset": 8552, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tcombatPtr->setPlayerCombatValues(COMBAT_FORMULA_DAMAGE, sb.minCombatValue, 0, sb.maxCombatValue, 0);\n\tcombatSpell = std::make_shared(combatPtr, spell->needTarget, spell->needDirection);\n\t// Sanity check" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f418406d1ec3b2b9d972a1248e55260021c63578d4c7cc6e6916824e524e592" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 258, + "startColumn": 6, + "charOffset": 8778, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 256, + "startColumn": 6, + "charOffset": 8658, + "charLength": 1, + "snippet": { + "text": "\tcombatSpell = std::make_shared(combatPtr, spell->needTarget, spell->needDirection);\n\t// Sanity check\n\tif (!combatSpell) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2538cec4a68422bae313c7ac772f63e0934025f010a8c9c584c69cbf036f8ab9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 281, + "startColumn": 2, + "charOffset": 9274, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 279, + "startColumn": 2, + "charOffset": 9231, + "charLength": 2, + "snippet": { + "text": "\n\tinfo.scriptInterface = scriptInterface;\n\tif (info.eventType == MONSTERS_EVENT_THINK) {\n\t\tinfo.thinkEvent = id;\n\t} else if (info.eventType == MONSTERS_EVENT_APPEAR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8bdae26889e9108487ccc8262499acb25884109fcaf3f7bd000284afe2862d61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 300, + "startColumn": 42, + "charOffset": 10077, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 298, + "startColumn": 42, + "charOffset": 9924, + "charLength": 2, + "snippet": { + "text": "\t it != monsters.end()\n\t // We will only return the MonsterType if it match the exact name of the monster\n\t && it->first.find(lowerCaseName) != it->first.npos) {\n\t\treturn it->second;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44d1272067a8f5726906df00ff0495dcb2e8b44526c6f31639f94f8eb3e07ed6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getMonsterTypeByRaceId' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 309, + "startColumn": 40, + "charOffset": 10295, + "charLength": 22, + "snippet": { + "text": "getMonsterTypeByRaceId" + } + }, + "contextRegion": { + "startLine": 307, + "startColumn": 40, + "charOffset": 10253, + "charLength": 22, + "snippet": { + "text": "}\n\nstd::shared_ptr Monsters::getMonsterTypeByRaceId(uint16_t raceId, bool isBoss /* = false*/) const {\n\tauto bossType = g_ioBosstiary().getMonsterTypeByBossRaceId(raceId);\n\tif (isBoss && bossType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6631ae6b7d013ece8d30ecc7b833168179d534aa4b40477a75555f40f89cf6fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'mType' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/monsters.cpp" + }, + "region": { + "startLine": 324, + "startColumn": 94, + "charOffset": 10787, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 322, + "startColumn": 94, + "charOffset": 10691, + "charLength": 5, + "snippet": { + "text": "}\n\nbool Monsters::tryAddMonsterType(const std::string &name, const std::shared_ptr mType) {\n\tstd::string lowerName = asLowerCaseString(name);\n\tif (monsters.find(lowerName) != monsters.end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1cf51f08884a42178e7f6dccb2dcb2e7c36e7845c829a34f1d50b4885388436" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'vocationId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp" + }, + "region": { + "startLine": 17, + "startColumn": 11, + "charOffset": 601, + "charLength": 10, + "snippet": { + "text": "vocationId" + } + }, + "contextRegion": { + "startLine": 15, + "startColumn": 11, + "charOffset": 509, + "charLength": 10, + "snippet": { + "text": "int VocationFunctions::luaVocationCreate(lua_State* L) {\n\t// Vocation(id or name)\n\tuint16_t vocationId;\n\tif (isNumber(L, 2)) {\n\t\tvocationId = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ba1d3773f123764e3a21463d38c21d22b4944c860c4bcec96134a35d9ab9236" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 21, + "charOffset": 1153, + "charLength": 8, + "snippet": { + "text": "vocation" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 21, + "charOffset": 1043, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr vocation = getUserdataShared(L, 1);\n\tif (vocation) {\n\t\tlua_pushnumber(L, vocation->getId());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "540795f66b41ffb4e7cc90b0687e96495468d4e33fc63d3f0e53ec912e1007f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp" + }, + "region": { + "startLine": 49, + "startColumn": 21, + "charOffset": 1417, + "charLength": 8, + "snippet": { + "text": "vocation" + } + }, + "contextRegion": { + "startLine": 47, + "startColumn": 21, + "charOffset": 1307, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr vocation = getUserdataShared(L, 1);\n\tif (vocation) {\n\t\tlua_pushnumber(L, vocation->getClientId());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11113266079c1779bf5ae5ded38505daf35e7a488709a834b4eb13d407f67668" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp" + }, + "region": { + "startLine": 60, + "startColumn": 21, + "charOffset": 1683, + "charLength": 8, + "snippet": { + "text": "vocation" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 21, + "charOffset": 1573, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr vocation = getUserdataShared(L, 1);\n\tif (vocation) {\n\t\tlua_pushnumber(L, vocation->getBaseId());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17a50e7230b5aac4e3cd84914018af158bc422150e917c9f47986337424198d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp" + }, + "region": { + "startLine": 95, + "startColumn": 21, + "charOffset": 2628, + "charLength": 8, + "snippet": { + "text": "vocation" + } + }, + "contextRegion": { + "startLine": 93, + "startColumn": 21, + "charOffset": 2507, + "charLength": 8, + "snippet": { + "text": "\t\tskills_t skillType = getNumber(L, 2);\n\t\tuint16_t skillLevel = getNumber(L, 3);\n\t\tlua_pushnumber(L, vocation->getReqSkillTries(skillType, skillLevel));\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1a89efcd6128b23b7a2afb9195b4cd2def0f1e387cea63c845a8706c8b61f7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp" + }, + "region": { + "startLine": 95, + "startColumn": 21, + "charOffset": 2628, + "charLength": 8, + "snippet": { + "text": "vocation" + } + }, + "contextRegion": { + "startLine": 93, + "startColumn": 21, + "charOffset": 2507, + "charLength": 8, + "snippet": { + "text": "\t\tskills_t skillType = getNumber(L, 2);\n\t\tuint16_t skillLevel = getNumber(L, 3);\n\t\tlua_pushnumber(L, vocation->getReqSkillTries(skillType, skillLevel));\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d215cf3fdee3701cba3765ab6057bb2c304b2311fe9d25ca693e126f706dcbf1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp" + }, + "region": { + "startLine": 107, + "startColumn": 21, + "charOffset": 3003, + "charLength": 8, + "snippet": { + "text": "vocation" + } + }, + "contextRegion": { + "startLine": 105, + "startColumn": 21, + "charOffset": 2915, + "charLength": 8, + "snippet": { + "text": "\tif (vocation) {\n\t\tuint32_t magicLevel = getNumber(L, 2);\n\t\tlua_pushnumber(L, vocation->getReqMana(magicLevel));\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "207f8d855ee3df436ce8d9d4e151d7b4aa5426553320eb2f1a6339e91a512f59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp" + }, + "region": { + "startLine": 107, + "startColumn": 21, + "charOffset": 3003, + "charLength": 8, + "snippet": { + "text": "vocation" + } + }, + "contextRegion": { + "startLine": 105, + "startColumn": 21, + "charOffset": 2915, + "charLength": 8, + "snippet": { + "text": "\tif (vocation) {\n\t\tuint32_t magicLevel = getNumber(L, 2);\n\t\tlua_pushnumber(L, vocation->getReqMana(magicLevel));\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f925326182de6376696802613fb04b629d42768572920f674abe8c697e765aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp" + }, + "region": { + "startLine": 118, + "startColumn": 21, + "charOffset": 3290, + "charLength": 8, + "snippet": { + "text": "vocation" + } + }, + "contextRegion": { + "startLine": 116, + "startColumn": 21, + "charOffset": 3180, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr vocation = getUserdataShared(L, 1);\n\tif (vocation) {\n\t\tlua_pushnumber(L, vocation->getCapGain());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5cdf7bead02bea8093aa9df54e870e0034082baff9f0d1e9153611787d4a3187" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp" + }, + "region": { + "startLine": 129, + "startColumn": 21, + "charOffset": 3563, + "charLength": 8, + "snippet": { + "text": "vocation" + } + }, + "contextRegion": { + "startLine": 127, + "startColumn": 21, + "charOffset": 3453, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr vocation = getUserdataShared(L, 1);\n\tif (vocation) {\n\t\tlua_pushnumber(L, vocation->getHPGain());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe78de1356374f6922e23c6c4ea38854b891c111ca177c14ffd364d618c4ae5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp" + }, + "region": { + "startLine": 140, + "startColumn": 21, + "charOffset": 3845, + "charLength": 8, + "snippet": { + "text": "vocation" + } + }, + "contextRegion": { + "startLine": 138, + "startColumn": 21, + "charOffset": 3735, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr vocation = getUserdataShared(L, 1);\n\tif (vocation) {\n\t\tlua_pushnumber(L, vocation->getHealthGainTicks());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66b1fe9aa655403cc468bd930f64c9759b75c9815930dde00cf219c51ee8f225" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp" + }, + "region": { + "startLine": 151, + "startColumn": 21, + "charOffset": 4138, + "charLength": 8, + "snippet": { + "text": "vocation" + } + }, + "contextRegion": { + "startLine": 149, + "startColumn": 21, + "charOffset": 4028, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr vocation = getUserdataShared(L, 1);\n\tif (vocation) {\n\t\tlua_pushnumber(L, vocation->getHealthGainAmount());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b8b01a0aba2741344d4c7523f409ca96a5575fa08461f5112461d7053643355" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp" + }, + "region": { + "startLine": 162, + "startColumn": 21, + "charOffset": 4416, + "charLength": 8, + "snippet": { + "text": "vocation" + } + }, + "contextRegion": { + "startLine": 160, + "startColumn": 21, + "charOffset": 4306, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr vocation = getUserdataShared(L, 1);\n\tif (vocation) {\n\t\tlua_pushnumber(L, vocation->getManaGain());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "205cc2607d650b88b99eb53718f1f38f2f80147c59fc9da6d6706ded51ac1f6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp" + }, + "region": { + "startLine": 173, + "startColumn": 21, + "charOffset": 4696, + "charLength": 8, + "snippet": { + "text": "vocation" + } + }, + "contextRegion": { + "startLine": 171, + "startColumn": 21, + "charOffset": 4586, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr vocation = getUserdataShared(L, 1);\n\tif (vocation) {\n\t\tlua_pushnumber(L, vocation->getManaGainTicks());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ffe640bc151a2bcb02c9e7ea7f8b34416f57178083d15c195ef6c5fcee8aacf3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp" + }, + "region": { + "startLine": 184, + "startColumn": 21, + "charOffset": 4983, + "charLength": 8, + "snippet": { + "text": "vocation" + } + }, + "contextRegion": { + "startLine": 182, + "startColumn": 21, + "charOffset": 4873, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr vocation = getUserdataShared(L, 1);\n\tif (vocation) {\n\t\tlua_pushnumber(L, vocation->getManaGainAmount());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4229e81b4391b20f59ccd7d86c955ffdb6044a0629de9306ad4f35b18f0ca0c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp" + }, + "region": { + "startLine": 195, + "startColumn": 21, + "charOffset": 5257, + "charLength": 8, + "snippet": { + "text": "vocation" + } + }, + "contextRegion": { + "startLine": 193, + "startColumn": 21, + "charOffset": 5147, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr vocation = getUserdataShared(L, 1);\n\tif (vocation) {\n\t\tlua_pushnumber(L, vocation->getSoulMax());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11113266079c1779bf5ae5ded38505daf35e7a488709a834b4eb13d407f67668" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp" + }, + "region": { + "startLine": 206, + "startColumn": 21, + "charOffset": 5536, + "charLength": 8, + "snippet": { + "text": "vocation" + } + }, + "contextRegion": { + "startLine": 204, + "startColumn": 21, + "charOffset": 5426, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr vocation = getUserdataShared(L, 1);\n\tif (vocation) {\n\t\tlua_pushnumber(L, vocation->getSoulGainTicks());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "57ed73f29bfda9ba915ed590a772fd92eea14488b9e15d51002440dac29711c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp" + }, + "region": { + "startLine": 217, + "startColumn": 21, + "charOffset": 5825, + "charLength": 8, + "snippet": { + "text": "vocation" + } + }, + "contextRegion": { + "startLine": 215, + "startColumn": 21, + "charOffset": 5715, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr vocation = getUserdataShared(L, 1);\n\tif (vocation) {\n\t\tlua_pushnumber(L, vocation->getBaseAttackSpeed());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33f6810aa6315f9dcb6c8b96c9c1d0b7e05ff299560b6e14298558d10099935c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp" + }, + "region": { + "startLine": 228, + "startColumn": 21, + "charOffset": 6108, + "charLength": 8, + "snippet": { + "text": "vocation" + } + }, + "contextRegion": { + "startLine": 226, + "startColumn": 21, + "charOffset": 5998, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr vocation = getUserdataShared(L, 1);\n\tif (vocation) {\n\t\tlua_pushnumber(L, vocation->getAttackSpeed());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b841c49b6fc64fb4f07ba9badfd7e295f9b1f3202e8cbc1b4805fdcff317624d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp" + }, + "region": { + "startLine": 239, + "startColumn": 21, + "charOffset": 6383, + "charLength": 8, + "snippet": { + "text": "vocation" + } + }, + "contextRegion": { + "startLine": 237, + "startColumn": 21, + "charOffset": 6273, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr vocation = getUserdataShared(L, 1);\n\tif (vocation) {\n\t\tlua_pushnumber(L, vocation->getBaseSpeed());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "484013840b88e4ccef3fd5276dc736151d1fffe5fee9cd381680bd5ee4cc29c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp" + }, + "region": { + "startLine": 249, + "startColumn": 6, + "charOffset": 6622, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 247, + "startColumn": 6, + "charOffset": 6517, + "charLength": 1, + "snippet": { + "text": "\t// vocation:getDemotion()\n\tstd::shared_ptr vocation = getUserdataShared(L, 1);\n\tif (!vocation) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9422e9fcd11890a2e4d28f7dd38a2c0da64accd003f68e47cc30b4b2bf287b9c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp" + }, + "region": { + "startLine": 254, + "startColumn": 20, + "charOffset": 6688, + "charLength": 8, + "snippet": { + "text": "vocation" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 20, + "charOffset": 6665, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tuint16_t fromId = vocation->getFromVocation();\n\tif (fromId == VOCATION_NONE) {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dcf63717b463ba8cbd65b3b14a952bc8e87e8b2ed28674cb9b2873a0f93ac8b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/creatures/player/vocation_functions.cpp" + }, + "region": { + "startLine": 273, + "startColumn": 6, + "charOffset": 7213, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 271, + "startColumn": 6, + "charOffset": 7107, + "charLength": 1, + "snippet": { + "text": "\t// vocation:getPromotion()\n\tstd::shared_ptr vocation = getUserdataShared(L, 1);\n\tif (!vocation) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3241fa354a33f69b844dae17b9e723094b7bebffb183b7c21d2ebf62e941a6f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/action_functions.cpp" + }, + "region": { + "startLine": 36, + "startColumn": 3, + "charOffset": 1052, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 3, + "charOffset": 1016, + "charLength": 15, + "snippet": { + "text": "\t\tpushBoolean(L, true);\n\t} else {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ACTION_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96ac1121563435357ca2b2356021a0f149eb7468ff2f784d466e513732d24482" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/action_functions.cpp" + }, + "region": { + "startLine": 53, + "startColumn": 3, + "charOffset": 1471, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 3, + "charOffset": 1435, + "charLength": 15, + "snippet": { + "text": "\t\tpushBoolean(L, true);\n\t} else {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ACTION_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b5e141650b5a94bc1b0be4dcf668c3e2b69b92b62b6b0961fb601a10feb2bc7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/action_functions.cpp" + }, + "region": { + "startLine": 65, + "startColumn": 4, + "charOffset": 1847, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 4, + "charOffset": 1713, + "charLength": 3, + "snippet": { + "text": "\t\tint parameters = lua_gettop(L) - 1; // - 1 because self is a parameter aswell, which we want to skip ofc\n\t\tif (parameters > 1) {\n\t\t\tfor (int i = 0; i < parameters; ++i) {\n\t\t\t\taction->setItemIdsVector(getNumber(L, 2 + i));\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05659d014ac332104df569a4e6e13cba77e7384143190831297109a28a5c5dda" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'parameters' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/action_functions.cpp" + }, + "region": { + "startLine": 65, + "startColumn": 20, + "charOffset": 1863, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 20, + "charOffset": 1713, + "charLength": 1, + "snippet": { + "text": "\t\tint parameters = lua_gettop(L) - 1; // - 1 because self is a parameter aswell, which we want to skip ofc\n\t\tif (parameters > 1) {\n\t\t\tfor (int i = 0; i < parameters; ++i) {\n\t\t\t\taction->setItemIdsVector(getNumber(L, 2 + i));\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be6e02a796845baa72d21ba19052541ba00d80936e038352309613980d157a7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/action_functions.cpp" + }, + "region": { + "startLine": 73, + "startColumn": 3, + "charOffset": 2059, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 71, + "startColumn": 3, + "charOffset": 2023, + "charLength": 15, + "snippet": { + "text": "\t\tpushBoolean(L, true);\n\t} else {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ACTION_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c314018e0b5499e2b3e65c7cf134c8438752532e1dd2911224491abafad93c67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/action_functions.cpp" + }, + "region": { + "startLine": 85, + "startColumn": 4, + "charOffset": 2439, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 4, + "charOffset": 2305, + "charLength": 3, + "snippet": { + "text": "\t\tint parameters = lua_gettop(L) - 1; // - 1 because self is a parameter aswell, which we want to skip ofc\n\t\tif (parameters > 1) {\n\t\t\tfor (int i = 0; i < parameters; ++i) {\n\t\t\t\taction->setActionIdsVector(getNumber(L, 2 + i));\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43098fa8f0c8535b9a5ce70df36813d76345f5ee5f1634340a87f4f1da25d489" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'parameters' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/action_functions.cpp" + }, + "region": { + "startLine": 85, + "startColumn": 20, + "charOffset": 2455, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 20, + "charOffset": 2305, + "charLength": 1, + "snippet": { + "text": "\t\tint parameters = lua_gettop(L) - 1; // - 1 because self is a parameter aswell, which we want to skip ofc\n\t\tif (parameters > 1) {\n\t\t\tfor (int i = 0; i < parameters; ++i) {\n\t\t\t\taction->setActionIdsVector(getNumber(L, 2 + i));\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84ab957d2abe0f569a2aaa11e5bae673e738c03d6189de47cafc903424a0312f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/action_functions.cpp" + }, + "region": { + "startLine": 93, + "startColumn": 3, + "charOffset": 2655, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 91, + "startColumn": 3, + "charOffset": 2619, + "charLength": 15, + "snippet": { + "text": "\t\tpushBoolean(L, true);\n\t} else {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ACTION_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4547b6ec1b5dcce6b70dab54c0ea348f02650218975a389296f88d05f322a7a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/action_functions.cpp" + }, + "region": { + "startLine": 105, + "startColumn": 4, + "charOffset": 3035, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 103, + "startColumn": 4, + "charOffset": 2901, + "charLength": 3, + "snippet": { + "text": "\t\tint parameters = lua_gettop(L) - 1; // - 1 because self is a parameter aswell, which we want to skip ofc\n\t\tif (parameters > 1) {\n\t\t\tfor (int i = 0; i < parameters; ++i) {\n\t\t\t\taction->setUniqueIdsVector(getNumber(L, 2 + i));\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8d20dc30cff6dcf4576bd2c2cae249985f1e1e2fe5103b307d661385c1274e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'parameters' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/action_functions.cpp" + }, + "region": { + "startLine": 105, + "startColumn": 20, + "charOffset": 3051, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 103, + "startColumn": 20, + "charOffset": 2901, + "charLength": 1, + "snippet": { + "text": "\t\tint parameters = lua_gettop(L) - 1; // - 1 because self is a parameter aswell, which we want to skip ofc\n\t\tif (parameters > 1) {\n\t\t\tfor (int i = 0; i < parameters; ++i) {\n\t\t\t\taction->setUniqueIdsVector(getNumber(L, 2 + i));\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78d199b3e25e2d41396f72bdf70e217a3b528ed3141e5cf46ecf31f2a9e7abdc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/action_functions.cpp" + }, + "region": { + "startLine": 113, + "startColumn": 3, + "charOffset": 3251, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 111, + "startColumn": 3, + "charOffset": 3215, + "charLength": 15, + "snippet": { + "text": "\t\tpushBoolean(L, true);\n\t} else {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ACTION_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afcec8a584285bd16f13d0ca7ac90192c941b2a9f606a4e2eb241ac944db4216" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/action_functions.cpp" + }, + "region": { + "startLine": 126, + "startColumn": 6, + "charOffset": 3784, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 124, + "startColumn": 6, + "charOffset": 3720, + "charLength": 1, + "snippet": { + "text": "\t */\n\tconst auto action = getUserdataShared(L, 1);\n\tif (!action) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ACTION_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9e293cffbef35921abe0887e6b8e8846b3426a6d71ea693d04c598269a644f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/action_functions.cpp" + }, + "region": { + "startLine": 127, + "startColumn": 3, + "charOffset": 3797, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 125, + "startColumn": 3, + "charOffset": 3725, + "charLength": 15, + "snippet": { + "text": "\tconst auto action = getUserdataShared(L, 1);\n\tif (!action) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ACTION_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68795d5da9b85494f9fe2420a2a75708c2f1477f347960b97b3f4db59e7c7eb0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/action_functions.cpp" + }, + "region": { + "startLine": 137, + "startColumn": 3, + "charOffset": 4160, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 135, + "startColumn": 3, + "charOffset": 4076, + "charLength": 3, + "snippet": { + "text": "\tif (int parameters = lua_gettop(L) - 1;\n\t parameters > 1 && isNumber(L, 2)) {\n\t\tfor (int i = 0; i < parameters; ++i) {\n\t\t\taction->setPositionsVector(getPosition(L, 2 + i));\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "888d042cc822f257a9065619eb958575247d51c7e04e119c332736255f9da914" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'parameters' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/action_functions.cpp" + }, + "region": { + "startLine": 137, + "startColumn": 19, + "charOffset": 4176, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 135, + "startColumn": 19, + "charOffset": 4076, + "charLength": 1, + "snippet": { + "text": "\tif (int parameters = lua_gettop(L) - 1;\n\t parameters > 1 && isNumber(L, 2)) {\n\t\tfor (int i = 0; i < parameters; ++i) {\n\t\t\taction->setPositionsVector(getPosition(L, 2 + i));\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41151b646ee7b1fc1f218163381b2ae842833a5774fccec1390add674f5f6f52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'itemId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/action_functions.cpp" + }, + "region": { + "startLine": 144, + "startColumn": 11, + "charOffset": 4321, + "charLength": 6, + "snippet": { + "text": "itemId" + } + }, + "contextRegion": { + "startLine": 142, + "startColumn": 11, + "charOffset": 4307, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tuint16_t itemId;\n\tbool createItem = false;\n\tif (isNumber(L, 3)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da1882db9148487b6e1a775cfd01dcb93a391684778611b51f835b473d1dfb0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/action_functions.cpp" + }, + "region": { + "startLine": 146, + "startColumn": 2, + "charOffset": 4356, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 144, + "startColumn": 2, + "charOffset": 4311, + "charLength": 2, + "snippet": { + "text": "\tuint16_t itemId;\n\tbool createItem = false;\n\tif (isNumber(L, 3)) {\n\t\titemId = getNumber(L, 3);\n\t\tcreateItem = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e995de4dc729f122e4a005fa719001ba936621b3ea5d6f0b4fd2de4650ae7ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/action_functions.cpp" + }, + "region": { + "startLine": 152, + "startColumn": 4, + "charOffset": 4548, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 4, + "charOffset": 4467, + "charLength": 15, + "snippet": { + "text": "\t\titemId = Item::items.getItemIdByName(getString(L, 3));\n\t\tif (itemId == 0) {\n\t\t\treportErrorFunc(\"Not found item with name: \" + getString(L, 3));\n\t\t\tpushBoolean(L, false);\n\t\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0366242b7b5c035d7fb5e11144db158de4059d69b3c74651158a3098240680b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/action_functions.cpp" + }, + "region": { + "startLine": 162, + "startColumn": 4, + "charOffset": 4746, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 160, + "startColumn": 4, + "charOffset": 4682, + "charLength": 15, + "snippet": { + "text": "\tif (createItem) {\n\t\tif (!Item::items.hasItemType(itemId)) {\n\t\t\treportErrorFunc(\"Not found item with id: \" + itemId);\n\t\t\tpushBoolean(L, false);\n\t\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a13462821448ad51d76d7be32fa2cceaebaa7e2b2f2f228168da77c72eab24ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/action_functions.cpp" + }, + "region": { + "startLine": 162, + "startColumn": 47, + "charOffset": 4789, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 160, + "startColumn": 47, + "charOffset": 4682, + "charLength": 1, + "snippet": { + "text": "\tif (createItem) {\n\t\tif (!Item::items.hasItemType(itemId)) {\n\t\t\treportErrorFunc(\"Not found item with id: \" + itemId);\n\t\t\tpushBoolean(L, false);\n\t\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a591673aa632958a83d4f936ca64bced13bb1bb5b1220e229fbe032f142c047" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Expression can be simplified" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/action_functions.cpp" + }, + "region": { + "startLine": 169, + "startColumn": 24, + "charOffset": 5002, + "charLength": 2, + "snippet": { + "text": "==" + } + }, + "contextRegion": { + "startLine": 167, + "startColumn": 24, + "charOffset": 4844, + "charLength": 2, + "snippet": { + "text": "\t\t// If it is an item that can be removed, then it will be set as non-movable.\n\t\tItemType &itemType = Item::items.getItemType(itemId);\n\t\tif (itemType.movable == true) {\n\t\t\titemType.movable = false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5de33d9a2f30b2d99a50c05e2a7b60298a58d92dedc8bc7789856d01125b6d8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal supplied to boolean operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/action_functions.cpp" + }, + "region": { + "startLine": 169, + "startColumn": 27, + "charOffset": 5005, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 167, + "startColumn": 27, + "charOffset": 4844, + "charLength": 4, + "snippet": { + "text": "\t\t// If it is an item that can be removed, then it will be set as non-movable.\n\t\tItemType &itemType = Item::items.getItemType(itemId);\n\t\tif (itemType.movable == true) {\n\t\t\titemType.movable = false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78057bf708a92cef69c3b82a522b326aa4f1b3c2ca90c9d743ef6a3da221c8b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/action_functions.cpp" + }, + "region": { + "startLine": 187, + "startColumn": 3, + "charOffset": 5372, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 185, + "startColumn": 3, + "charOffset": 5336, + "charLength": 15, + "snippet": { + "text": "\t\tpushBoolean(L, true);\n\t} else {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ACTION_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2970aaf7de99b39872213ce5513d05abe775f14568bd04b1b3ff765482fbc4eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/action_functions.cpp" + }, + "region": { + "startLine": 200, + "startColumn": 3, + "charOffset": 5712, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 198, + "startColumn": 3, + "charOffset": 5676, + "charLength": 15, + "snippet": { + "text": "\t\tpushBoolean(L, true);\n\t} else {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ACTION_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec1781ae95c65070f6ed555f2648e0f35eaae189ed9e44acab680331075308bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/action_functions.cpp" + }, + "region": { + "startLine": 213, + "startColumn": 3, + "charOffset": 6046, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 211, + "startColumn": 3, + "charOffset": 6010, + "charLength": 15, + "snippet": { + "text": "\t\tpushBoolean(L, true);\n\t} else {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ACTION_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5681e04f38f67effe407a2d282f2993c4a980b334938402d899d592c95057eb4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.hpp" + }, + "region": { + "startLine": 13, + "startColumn": 10, + "charOffset": 429, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 11, + "startColumn": 10, + "charOffset": 384, + "charLength": 30, + "snippet": { + "text": "\n#include \"creatures/npcs/npcs.hpp\"\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"items/tile.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f69d6cfec9be0f6769310fd1d031cff4d88ef48385f012190be0fe563d15e4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.hpp", + "index": 1 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"creatures/monsters/monsters.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e45483e1912ecf8c717a48f913562d9a9cf501f9947625dad361d43acc28406" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.hpp", + "index": 2 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a2b3a997037594f8bab93e08d9b46935593069da5e9def3fec147ea485ffc36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/event_callback_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 45, + "startColumn": 6, + "charOffset": 1799, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 6, + "charOffset": 1658, + "charLength": 1, + "snippet": { + "text": "int EventCallbackFunctions::luaEventCallbackType(lua_State* luaState) {\n\tauto callback = getUserdataShared(luaState, 1);\n\tif (!callback) {\n\t\treportErrorFunc(\"EventCallback is nil\");\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37d4e6f2a59e335b9c41d6903604d43a07b667e744d6bc4d44d4ab2f1a519386" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/event_callback_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 46, + "startColumn": 3, + "charOffset": 1814, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 44, + "startColumn": 3, + "charOffset": 1730, + "charLength": 15, + "snippet": { + "text": "\tauto callback = getUserdataShared(luaState, 1);\n\tif (!callback) {\n\t\treportErrorFunc(\"EventCallback is nil\");\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "930db36ca186abec246073597c85786a673ec47d6311509143f57ff45dae6604" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/event_callback_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 53, + "startColumn": 2, + "charOffset": 1985, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 2, + "charOffset": 1912, + "charLength": 3, + "snippet": { + "text": "\tauto lowerTypeName = asLowerCaseString(typeName);\n\tbool found = false;\n\tfor (auto enumValue : magic_enum::enum_values()) {\n\t\tstd::string enumName = std::string(magic_enum::enum_name(enumValue));\n\t\tauto lowerEnumTypeName = asLowerCaseString(enumName);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df6827470bfb4d106978ac54d0ed0e529f330c8ce6329ca4a40d7a0d44ed7293" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/event_callback_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 76, + "startColumn": 6, + "charOffset": 2648, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 6, + "charOffset": 2503, + "charLength": 1, + "snippet": { + "text": "int EventCallbackFunctions::luaEventCallbackRegister(lua_State* luaState) {\n\tauto callback = getUserdataShared(luaState, 1);\n\tif (!callback) {\n\t\treportErrorFunc(\"EventCallback is nil, failed to register script\");\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82ea694728052153544688423dd2008eca82df98ea5de1a9d00614bf479b9da8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/event_callback_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 77, + "startColumn": 3, + "charOffset": 2663, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 75, + "startColumn": 3, + "charOffset": 2579, + "charLength": 15, + "snippet": { + "text": "\tauto callback = getUserdataShared(luaState, 1);\n\tif (!callback) {\n\t\treportErrorFunc(\"EventCallback is nil, failed to register script\");\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "186dfa77977b54d7cc96e145d4a3f5ebf68bec0618849c2e6a84520070a3efff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/event_callback_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 93, + "startColumn": 6, + "charOffset": 3046, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 91, + "startColumn": 6, + "charOffset": 2905, + "charLength": 1, + "snippet": { + "text": "int EventCallbackFunctions::luaEventCallbackLoad(lua_State* luaState) {\n\tauto callback = getUserdataShared(luaState, 1);\n\tif (!callback) {\n\t\treportErrorFunc(\"EventCallback is nil\");\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "098e7b76c39c04e2760e7cd4d3867839a3c5e37344e43ffc35855d90d7515e7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/event_callback_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 94, + "startColumn": 3, + "charOffset": 3061, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 92, + "startColumn": 3, + "charOffset": 2977, + "charLength": 15, + "snippet": { + "text": "\tauto callback = getUserdataShared(luaState, 1);\n\tif (!callback) {\n\t\treportErrorFunc(\"EventCallback is nil\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e2577c9e7271b173ff4aabcb4e6551593d1c173561e37b62286cb4989eb9081" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/event_callback_functions.cpp", + "index": 3 + }, + "region": { + "startLine": 99, + "startColumn": 3, + "charOffset": 3154, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 97, + "startColumn": 3, + "charOffset": 3117, + "charLength": 15, + "snippet": { + "text": "\n\tif (!callback->loadCallback()) {\n\t\treportErrorFunc(\"Cannot load callback\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f78392f15bcdc510ef37c8e6bf4cb7476a251095ef41b731d517a0e0203ffcc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/events_scheduler_functions.cpp" + }, + "region": { + "startLine": 17, + "startColumn": 20, + "charOffset": 634, + "charLength": 17, + "snippet": { + "text": "g_eventsScheduler" + } + }, + "contextRegion": { + "startLine": 15, + "startColumn": 20, + "charOffset": 503, + "charLength": 17, + "snippet": { + "text": "int EventsSchedulerFunctions::luaEventsSchedulergetEventSLoot(lua_State* L) {\n\t// EventsScheduler.getEventSLoot\n\tlua_pushnumber(L, g_eventsScheduler().getLootSchedule());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "967685ae9eaee6a043bea4fa2cabf88ceefbbeb52d446dd097de95f21ae0ed72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/events_scheduler_functions.cpp" + }, + "region": { + "startLine": 23, + "startColumn": 20, + "charOffset": 823, + "charLength": 17, + "snippet": { + "text": "g_eventsScheduler" + } + }, + "contextRegion": { + "startLine": 21, + "startColumn": 20, + "charOffset": 688, + "charLength": 17, + "snippet": { + "text": "int EventsSchedulerFunctions::luaEventsSchedulergetEventSBossLoot(lua_State* L) {\n\t// EventsScheduler.getEventSLoot\n\tlua_pushnumber(L, g_eventsScheduler().getBossLootSchedule());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c46e7bf733ac9d2d19678902f51fd4aea8151a35f4138e00f43fe85809629bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/events_scheduler_functions.cpp" + }, + "region": { + "startLine": 29, + "startColumn": 20, + "charOffset": 1014, + "charLength": 17, + "snippet": { + "text": "g_eventsScheduler" + } + }, + "contextRegion": { + "startLine": 27, + "startColumn": 20, + "charOffset": 881, + "charLength": 17, + "snippet": { + "text": "int EventsSchedulerFunctions::luaEventsSchedulergetEventSSkill(lua_State* L) {\n\t// EventsScheduler.getEventSSkill\n\tlua_pushnumber(L, g_eventsScheduler().getSkillSchedule());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7c849b27d0dd26483075692b1092a8a7ff51c80a0898f1fc2d53530000146c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/events_scheduler_functions.cpp" + }, + "region": { + "startLine": 35, + "startColumn": 20, + "charOffset": 1198, + "charLength": 17, + "snippet": { + "text": "g_eventsScheduler" + } + }, + "contextRegion": { + "startLine": 33, + "startColumn": 20, + "charOffset": 1069, + "charLength": 17, + "snippet": { + "text": "int EventsSchedulerFunctions::luaEventsSchedulergetEventSExp(lua_State* L) {\n\t// EventsScheduler.getEventSExp\n\tlua_pushnumber(L, g_eventsScheduler().getExpSchedule());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fb76dc5529b2d33b8fdb42e66188953146ad4e581e15a6d23b3fa6ad1fdeff1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/events_scheduler_functions.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 20, + "charOffset": 1402, + "charLength": 17, + "snippet": { + "text": "g_eventsScheduler" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 20, + "charOffset": 1251, + "charLength": 17, + "snippet": { + "text": "int EventsSchedulerFunctions::luaEventsSchedulergetSpawnMonsterSchedule(lua_State* L) {\n\t// EventsScheduler.getSpawnMonsterSchedule\n\tlua_pushnumber(L, g_eventsScheduler().getSpawnMonsterSchedule());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "967685ae9eaee6a043bea4fa2cabf88ceefbbeb52d446dd097de95f21ae0ed72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "23 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/global_event_functions.cpp" + }, + "region": { + "startLine": 100, + "startColumn": 26, + "charOffset": 3189, + "charLength": 2, + "snippet": { + "text": "23" + } + }, + "contextRegion": { + "startLine": 98, + "startColumn": 26, + "charOffset": 3130, + "charLength": 2, + "snippet": { + "text": "\n\t\tint32_t hour = params.front();\n\t\tif (hour < 0 || hour > 23) {\n\t\t\tg_logger().error(\"[GlobalEventFunctions::luaGlobalEventTime] - \"\n\t\t\t \"Invalid hour {} for globalevent with name: {}\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ddefc1f5562621814633460327796a813ce8bda4cbbdde00ac06d14f35cc3f03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/global_event_functions.cpp" + }, + "region": { + "startLine": 108, + "startColumn": 28, + "charOffset": 3455, + "charLength": 4, + "snippet": { + "text": "hour" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 28, + "charOffset": 3423, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tglobalevent->setInterval(hour << 16);\n\n\t\tint32_t min = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "090b89bab668fde7b8e9087919dd2fd6206d7c97af52e39ec2d7bcbcba0d28f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/global_event_functions.cpp" + }, + "region": { + "startLine": 108, + "startColumn": 36, + "charOffset": 3463, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 36, + "charOffset": 3423, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tglobalevent->setInterval(hour << 16);\n\n\t\tint32_t min = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "575d9574415b125e4c36125e2ca525b56a3279ebe0f330ee9a726d06f47b54b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "59 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/global_event_functions.cpp" + }, + "region": { + "startLine": 114, + "startColumn": 25, + "charOffset": 3578, + "charLength": 2, + "snippet": { + "text": "59" + } + }, + "contextRegion": { + "startLine": 112, + "startColumn": 25, + "charOffset": 3507, + "charLength": 2, + "snippet": { + "text": "\t\tif (params.size() > 1) {\n\t\t\tmin = params[1];\n\t\t\tif (min < 0 || min > 59) {\n\t\t\t\tg_logger().error(\"[GlobalEventFunctions::luaGlobalEventTime] - \"\n\t\t\t\t \"Invalid minute: {} for globalevent with name: {}\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21da84cb9fb8105c4cbc1a7e2451e1081ba706c379cc09280050856f728ef044" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "59 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/global_event_functions.cpp" + }, + "region": { + "startLine": 124, + "startColumn": 26, + "charOffset": 3900, + "charLength": 2, + "snippet": { + "text": "59" + } + }, + "contextRegion": { + "startLine": 122, + "startColumn": 26, + "charOffset": 3826, + "charLength": 2, + "snippet": { + "text": "\t\t\tif (params.size() > 2) {\n\t\t\t\tsec = params[2];\n\t\t\t\tif (sec < 0 || sec > 59) {\n\t\t\t\t\tg_logger().error(\"[GlobalEventFunctions::luaGlobalEventTime] - \"\n\t\t\t\t\t \"Invalid minute: {} for globalevent with name: {}\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66c650b229d31f7e4e1e5d0ba3b2c7bce3219670a3959857fb794179d30dd143" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/global_event_functions.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 25, + "charOffset": 4187, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 25, + "charOffset": 4158, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\ttime_t current_time = time(nullptr);\n\t\ttm* timeinfo = localtime(¤t_time);\n\t\ttimeinfo->tm_hour = hour;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93883102e4de77455ff794da5551f64330d4ee36292447190d8756b33629dd3a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/global_event_functions.cpp" + }, + "region": { + "startLine": 135, + "startColumn": 18, + "charOffset": 4219, + "charLength": 9, + "snippet": { + "text": "localtime" + } + }, + "contextRegion": { + "startLine": 133, + "startColumn": 18, + "charOffset": 4162, + "charLength": 9, + "snippet": { + "text": "\n\t\ttime_t current_time = time(nullptr);\n\t\ttm* timeinfo = localtime(¤t_time);\n\t\ttimeinfo->tm_hour = hour;\n\t\ttimeinfo->tm_min = min;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "353174fa14207a57ef7ede559e9736855b0326652e9e0af4ab3e10f5f4d0a00e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "concurrency-mt-unsafe", + "ruleIndex": 478, + "kind": "fail", + "level": "warning", + "message": { + "text": "function is not thread safe" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/global_event_functions.cpp" + }, + "region": { + "startLine": 135, + "startColumn": 18, + "charOffset": 4219, + "charLength": 9, + "snippet": { + "text": "localtime" + } + }, + "contextRegion": { + "startLine": 133, + "startColumn": 18, + "charOffset": 4162, + "charLength": 9, + "snippet": { + "text": "\n\t\ttime_t current_time = time(nullptr);\n\t\ttm* timeinfo = localtime(¤t_time);\n\t\ttimeinfo->tm_hour = hour;\n\t\ttimeinfo->tm_min = min;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ebf56134f61506be5c047aae506ad749580c40d9d1bff4cabf48c2306b84e28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/global_event_functions.cpp" + }, + "region": { + "startLine": 140, + "startColumn": 3, + "charOffset": 4328, + "charLength": 6, + "snippet": { + "text": "time_t" + } + }, + "contextRegion": { + "startLine": 138, + "startColumn": 3, + "charOffset": 4299, + "charLength": 6, + "snippet": { + "text": "\t\ttimeinfo->tm_sec = sec;\n\n\t\ttime_t difference = static_cast(difftime(mktime(timeinfo), current_time));\n\t\t// If the difference is negative, add 86400 seconds (1 day) to it\n\t\tif (difference < 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89ca21edc3d71324398a48a9db071a2a7800be9d82777d43c25af9241c33c449" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/global_event_functions.cpp" + }, + "region": { + "startLine": 140, + "startColumn": 43, + "charOffset": 4368, + "charLength": 8, + "snippet": { + "text": "difftime" + } + }, + "contextRegion": { + "startLine": 138, + "startColumn": 43, + "charOffset": 4299, + "charLength": 8, + "snippet": { + "text": "\t\ttimeinfo->tm_sec = sec;\n\n\t\ttime_t difference = static_cast(difftime(mktime(timeinfo), current_time));\n\t\t// If the difference is negative, add 86400 seconds (1 day) to it\n\t\tif (difference < 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e734e149781cdf9863ce7a8c3a3aaa32d7ee456ff53141a80cec33bb4de4543e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/global_event_functions.cpp" + }, + "region": { + "startLine": 140, + "startColumn": 52, + "charOffset": 4377, + "charLength": 6, + "snippet": { + "text": "mktime" + } + }, + "contextRegion": { + "startLine": 138, + "startColumn": 52, + "charOffset": 4299, + "charLength": 6, + "snippet": { + "text": "\t\ttimeinfo->tm_sec = sec;\n\n\t\ttime_t difference = static_cast(difftime(mktime(timeinfo), current_time));\n\t\t// If the difference is negative, add 86400 seconds (1 day) to it\n\t\tif (difference < 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb5d184911ad4944c9c167243f893b0ec0f08171b9285c2b709ef2b0106c4f16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "86400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/global_event_functions.cpp" + }, + "region": { + "startLine": 143, + "startColumn": 18, + "charOffset": 4520, + "charLength": 5, + "snippet": { + "text": "86400" + } + }, + "contextRegion": { + "startLine": 141, + "startColumn": 18, + "charOffset": 4411, + "charLength": 5, + "snippet": { + "text": "\t\t// If the difference is negative, add 86400 seconds (1 day) to it\n\t\tif (difference < 0) {\n\t\t\tdifference += 86400;\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "685acc1c6f69b30efb3df16b8b528d7879a9598f89581fa259b18f8deb4dad98" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/move_event_functions.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 6, + "charOffset": 3084, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 6, + "charOffset": 2994, + "charLength": 1, + "snippet": { + "text": "\t// moveevent:slot(slot)\n\tconst auto moveevent = getUserdataShared(L, 1);\n\tif (!moveevent) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b87c2ce60b7bf9db033e2dfb163276da6d9d7a755f7f90efcecbe5f17433b6f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/move_event_functions.cpp" + }, + "region": { + "startLine": 118, + "startColumn": 35, + "charOffset": 3856, + "charLength": 1, + "snippet": { + "text": "|" + } + }, + "contextRegion": { + "startLine": 116, + "startColumn": 35, + "charOffset": 3728, + "charLength": 1, + "snippet": { + "text": "\t\t\tmoveevent->setSlot(SLOTP_LEFT);\n\t\t} else if (slotName == \"hand\" || slotName == \"shield\") {\n\t\t\tmoveevent->setSlot(SLOTP_RIGHT | SLOTP_LEFT);\n\t\t} else if (slotName == \"legs\") {\n\t\t\tmoveevent->setSlot(SLOTP_LEGS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3e627609802f586008cdb36146706f2d14826af192d70ea573cdf5896685480" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/move_event_functions.cpp" + }, + "region": { + "startLine": 224, + "startColumn": 4, + "charOffset": 6684, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 222, + "startColumn": 4, + "charOffset": 6550, + "charLength": 3, + "snippet": { + "text": "\t\tint parameters = lua_gettop(L) - 1; // - 1 because self is a parameter aswell, which we want to skip ofc\n\t\tif (parameters > 1) {\n\t\t\tfor (int i = 0; i < parameters; ++i) {\n\t\t\t\tmoveevent->setItemId(getNumber(L, 2 + i));\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55dd115e7f5deaf67a7b5e118cdeb8ac9633f328531352485ad428de3d2e5b6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'parameters' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/move_event_functions.cpp" + }, + "region": { + "startLine": 224, + "startColumn": 20, + "charOffset": 6700, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 222, + "startColumn": 20, + "charOffset": 6550, + "charLength": 1, + "snippet": { + "text": "\t\tint parameters = lua_gettop(L) - 1; // - 1 because self is a parameter aswell, which we want to skip ofc\n\t\tif (parameters > 1) {\n\t\t\tfor (int i = 0; i < parameters; ++i) {\n\t\t\t\tmoveevent->setItemId(getNumber(L, 2 + i));\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5327cc0e4a6f4cb207d786b1d8f7f2d446e6ad8371adb334aa78695ae07f5a12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/move_event_functions.cpp" + }, + "region": { + "startLine": 243, + "startColumn": 4, + "charOffset": 7217, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 4, + "charOffset": 7083, + "charLength": 3, + "snippet": { + "text": "\t\tint parameters = lua_gettop(L) - 1; // - 1 because self is a parameter aswell, which we want to skip ofc\n\t\tif (parameters > 1) {\n\t\t\tfor (int i = 0; i < parameters; ++i) {\n\t\t\t\tmoveevent->setActionId(getNumber(L, 2 + i));\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a7ee28b46b257e01d9dd8fbb995e93fc764ebba40da67fc7d77b86a9cf04862" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'parameters' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/move_event_functions.cpp" + }, + "region": { + "startLine": 243, + "startColumn": 20, + "charOffset": 7233, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 20, + "charOffset": 7083, + "charLength": 1, + "snippet": { + "text": "\t\tint parameters = lua_gettop(L) - 1; // - 1 because self is a parameter aswell, which we want to skip ofc\n\t\tif (parameters > 1) {\n\t\t\tfor (int i = 0; i < parameters; ++i) {\n\t\t\t\tmoveevent->setActionId(getNumber(L, 2 + i));\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d4c88892512c5f60fa904273ecf9b7e39201b331837acd475249b5458acbd13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/move_event_functions.cpp" + }, + "region": { + "startLine": 262, + "startColumn": 4, + "charOffset": 7754, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 260, + "startColumn": 4, + "charOffset": 7620, + "charLength": 3, + "snippet": { + "text": "\t\tint parameters = lua_gettop(L) - 1; // - 1 because self is a parameter aswell, which we want to skip ofc\n\t\tif (parameters > 1) {\n\t\t\tfor (int i = 0; i < parameters; ++i) {\n\t\t\t\tmoveevent->setUniqueId(getNumber(L, 2 + i));\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40160d0aab1f6b33b3101438ebe8cf881a820fa1f1188af7811363011dfc3e2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'parameters' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/move_event_functions.cpp" + }, + "region": { + "startLine": 262, + "startColumn": 20, + "charOffset": 7770, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 260, + "startColumn": 20, + "charOffset": 7620, + "charLength": 1, + "snippet": { + "text": "\t\tint parameters = lua_gettop(L) - 1; // - 1 because self is a parameter aswell, which we want to skip ofc\n\t\tif (parameters > 1) {\n\t\t\tfor (int i = 0; i < parameters; ++i) {\n\t\t\t\tmoveevent->setUniqueId(getNumber(L, 2 + i));\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba13198befd540ae354ffda5e1aa306b800f56c6e578bf3a4d813706d9d2e320" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/move_event_functions.cpp" + }, + "region": { + "startLine": 281, + "startColumn": 4, + "charOffset": 8302, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 279, + "startColumn": 4, + "charOffset": 8168, + "charLength": 3, + "snippet": { + "text": "\t\tint parameters = lua_gettop(L) - 1; // - 1 because self is a parameter aswell, which we want to skip ofc\n\t\tif (parameters > 1) {\n\t\t\tfor (int i = 0; i < parameters; ++i) {\n\t\t\t\tmoveevent->setPosition(getPosition(L, 2 + i));\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fcba99569b01b16821421e4dfe8f9c9ea418119027a5d3efbb330801e8878bbf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'parameters' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/move_event_functions.cpp" + }, + "region": { + "startLine": 281, + "startColumn": 20, + "charOffset": 8318, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 279, + "startColumn": 20, + "charOffset": 8168, + "charLength": 1, + "snippet": { + "text": "\t\tint parameters = lua_gettop(L) - 1; // - 1 because self is a parameter aswell, which we want to skip ofc\n\t\tif (parameters > 1) {\n\t\t\tfor (int i = 0; i < parameters; ++i) {\n\t\t\t\tmoveevent->setPosition(getPosition(L, 2 + i));\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7de910442e9f0a6b1d68e0159bc82a213065d9c1a1bd12639e32e283aa72273b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/talk_action_functions.cpp" + }, + "region": { + "startLine": 22, + "startColumn": 2, + "charOffset": 746, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 2, + "charOffset": 649, + "charLength": 3, + "snippet": { + "text": "\t// TalkAction(words) or TalkAction(word1, word2, word3)\n\tstd::vector wordsVector;\n\tfor (int i = 2; i <= lua_gettop(L); i++) {\n\t\twordsVector.push_back(getString(L, i));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "297a6b81f9e2054c25d65f3580182a0105bf838eff79d5531f54441ebf4002c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/talk_action_functions.cpp" + }, + "region": { + "startLine": 36, + "startColumn": 6, + "charOffset": 1238, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 6, + "charOffset": 1137, + "charLength": 1, + "snippet": { + "text": "\t// talkAction:onSay(callback)\n\tauto talkactionSharedPtr = getUserdataShared(L, 1);\n\tif (!talkactionSharedPtr) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_TALK_ACTION_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3dbac6e5741b6820a38911e71d37d0e7c00dd411ad5fda620ff0e172e316f1ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/talk_action_functions.cpp" + }, + "region": { + "startLine": 37, + "startColumn": 3, + "charOffset": 1264, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 35, + "startColumn": 3, + "charOffset": 1168, + "charLength": 15, + "snippet": { + "text": "\tauto talkactionSharedPtr = getUserdataShared(L, 1);\n\tif (!talkactionSharedPtr) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_TALK_ACTION_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87df9d4f18dc2af965234619298316aaadb2e3145e4c322fed2849907097a3fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/talk_action_functions.cpp" + }, + "region": { + "startLine": 53, + "startColumn": 6, + "charOffset": 1681, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 6, + "charOffset": 1555, + "charLength": 1, + "snippet": { + "text": "\t// talkAction:groupType(GroupType = GROUP_TYPE_NORMAL)\n\tauto talkactionSharedPtr = getUserdataShared(L, 1);\n\tif (!talkactionSharedPtr) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_TALK_ACTION_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b2158668060a565e904a5bc1d88c2df92ef54069d700e7fd7788e5e5cc280d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/talk_action_functions.cpp" + }, + "region": { + "startLine": 54, + "startColumn": 3, + "charOffset": 1707, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 52, + "startColumn": 3, + "charOffset": 1611, + "charLength": 15, + "snippet": { + "text": "\tauto talkactionSharedPtr = getUserdataShared(L, 1);\n\tif (!talkactionSharedPtr) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_TALK_ACTION_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6fcf1433514c519aa82b56f1c935c43c7d274652ad25d763dab88d73727498e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'groupType' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/talk_action_functions.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 12, + "charOffset": 1823, + "charLength": 9, + "snippet": { + "text": "groupType" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 12, + "charOffset": 1808, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tGroupType groupType;\n\tint type = lua_type(L, 2);\n\tif (type == LUA_TNUMBER) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0201d663afd0a566c783c0aaf2bc4c137e40a4043985364d10d837c6a42f0492" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/talk_action_functions.cpp" + }, + "region": { + "startLine": 79, + "startColumn": 4, + "charOffset": 2771, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 77, + "startColumn": 4, + "charOffset": 2587, + "charLength": 15, + "snippet": { + "text": "\t\t} else {\n\t\t\tauto string = fmt::format(\"Invalid group type string value {} for group type for script: {}\", strValue, getScriptEnv()->getScriptInterface()->getLoadingScriptName());\n\t\t\treportErrorFunc(string);\n\t\t\tpushBoolean(L, false);\n\t\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb59d9a7dad37bf6b32937a94ed3ba97234248f287503bedb6de38909c587091" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/talk_action_functions.cpp" + }, + "region": { + "startLine": 85, + "startColumn": 3, + "charOffset": 3007, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 3, + "charOffset": 2839, + "charLength": 15, + "snippet": { + "text": "\t} else {\n\t\tauto string = fmt::format(\"Expected number or string value for group type for script: {}\", getScriptEnv()->getScriptInterface()->getLoadingScriptName());\n\t\treportErrorFunc(string);\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "57829c6b751997513739eb353cbb28583c5ee53ed7855a95cf5e2dfebf390c59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/talk_action_functions.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 6, + "charOffset": 3316, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 6, + "charOffset": 3220, + "charLength": 1, + "snippet": { + "text": "\t// talkAction:register()\n\tauto talkactionSharedPtr = getUserdataShared(L, 1);\n\tif (!talkactionSharedPtr) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_TALK_ACTION_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfa3c9f09986e77d3ece8620066d5c6f043024a294714e7bc268d113dfbfa9ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/talk_action_functions.cpp" + }, + "region": { + "startLine": 99, + "startColumn": 3, + "charOffset": 3342, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 97, + "startColumn": 3, + "charOffset": 3246, + "charLength": 15, + "snippet": { + "text": "\tauto talkactionSharedPtr = getUserdataShared(L, 1);\n\tif (!talkactionSharedPtr) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_TALK_ACTION_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "925f61a7b49ced429db10eefc5a4daa94f170e987cbad64a4b5138437f14fb88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/talk_action_functions.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 3, + "charOffset": 3713, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 3, + "charOffset": 3537, + "charLength": 15, + "snippet": { + "text": "\tif (talkactionSharedPtr->getGroupType() == GROUP_TYPE_NONE) {\n\t\tauto string = fmt::format(\"TalkAction with name {} does't have groupType\", talkactionSharedPtr->getWords());\n\t\treportErrorFunc(string);\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a835c1a8080c95f200194c1ac855e5d90f82942476c26a449cb0e3e1c2951bd3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/talk_action_functions.cpp" + }, + "region": { + "startLine": 123, + "startColumn": 6, + "charOffset": 4029, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 121, + "startColumn": 6, + "charOffset": 3929, + "charLength": 1, + "snippet": { + "text": "\t// talkAction:separator(sep)\n\tauto talkactionSharedPtr = getUserdataShared(L, 1);\n\tif (!talkactionSharedPtr) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_TALK_ACTION_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a381622a701d007d27931521790ef9a5e35150912011bf320869c5e9b78f577" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/talk_action_functions.cpp" + }, + "region": { + "startLine": 124, + "startColumn": 3, + "charOffset": 4055, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 122, + "startColumn": 3, + "charOffset": 3959, + "charLength": 15, + "snippet": { + "text": "\tauto talkactionSharedPtr = getUserdataShared(L, 1);\n\tif (!talkactionSharedPtr) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_TALK_ACTION_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eed92f14a0d582bed1cbd9cddff0fd94bba9444d00ede0f1b85aecff087ef430" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/talk_action_functions.cpp" + }, + "region": { + "startLine": 137, + "startColumn": 6, + "charOffset": 4426, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 135, + "startColumn": 6, + "charOffset": 4312, + "charLength": 1, + "snippet": { + "text": "\t// local name = talkAction:getName()\n\tconst auto talkactionSharedPtr = getUserdataShared(L, 1);\n\tif (!talkactionSharedPtr) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_TALK_ACTION_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7f3ab0ba4f48deb6940092fceb2bd49c9fcc6aaa37c9905efaef47cefe02f5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/talk_action_functions.cpp" + }, + "region": { + "startLine": 138, + "startColumn": 3, + "charOffset": 4452, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 136, + "startColumn": 3, + "charOffset": 4350, + "charLength": 15, + "snippet": { + "text": "\tconst auto talkactionSharedPtr = getUserdataShared(L, 1);\n\tif (!talkactionSharedPtr) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_TALK_ACTION_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3b3acdfde795a46119887b8f079de504cd3dac46b48e806e4be23a112c3e6e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/talk_action_functions.cpp" + }, + "region": { + "startLine": 150, + "startColumn": 6, + "charOffset": 4817, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 148, + "startColumn": 6, + "charOffset": 4689, + "charLength": 1, + "snippet": { + "text": "\t// local description = talkAction:getDescription()\n\tconst auto talkactionSharedPtr = getUserdataShared(L, 1);\n\tif (!talkactionSharedPtr) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_TALK_ACTION_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a58a1352299a882a718824cc7f9755a2bbd7e7f959ffebab7ac020bb15bd4f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/talk_action_functions.cpp" + }, + "region": { + "startLine": 151, + "startColumn": 3, + "charOffset": 4843, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 149, + "startColumn": 3, + "charOffset": 4741, + "charLength": 15, + "snippet": { + "text": "\tconst auto talkactionSharedPtr = getUserdataShared(L, 1);\n\tif (!talkactionSharedPtr) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_TALK_ACTION_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81122d0ad516ea2022ebb624c8c451cee32f36983fbd5e7c49b724dd885f85d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/talk_action_functions.cpp" + }, + "region": { + "startLine": 163, + "startColumn": 6, + "charOffset": 5208, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 161, + "startColumn": 6, + "charOffset": 5086, + "charLength": 1, + "snippet": { + "text": "\t// local description = talkAction:setDescription()\n\tauto talkactionSharedPtr = getUserdataShared(L, 1);\n\tif (!talkactionSharedPtr) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_TALK_ACTION_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08a86da1a2900bd3deaea13f4b0103da3a4d0345c532fa349da9fe654dce57c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/talk_action_functions.cpp" + }, + "region": { + "startLine": 164, + "startColumn": 3, + "charOffset": 5234, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 162, + "startColumn": 3, + "charOffset": 5138, + "charLength": 15, + "snippet": { + "text": "\tauto talkactionSharedPtr = getUserdataShared(L, 1);\n\tif (!talkactionSharedPtr) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_TALK_ACTION_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "498c1378880751386e21ccd408d2213f6fb9945f98bb198d80011e1767a01946" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/talk_action_functions.cpp" + }, + "region": { + "startLine": 177, + "startColumn": 6, + "charOffset": 5622, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 175, + "startColumn": 6, + "charOffset": 5498, + "charLength": 1, + "snippet": { + "text": "\t// local groupType = talkAction:getGroupType()\n\tconst auto talkactionSharedPtr = getUserdataShared(L, 1);\n\tif (!talkactionSharedPtr) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_TALK_ACTION_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48e6e352de4b7bfc8ddfb57a6146b8bc7f2d57c2f3749f504dde6f09a405d29c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/events/talk_action_functions.cpp" + }, + "region": { + "startLine": 178, + "startColumn": 3, + "charOffset": 5648, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 176, + "startColumn": 3, + "charOffset": 5546, + "charLength": 15, + "snippet": { + "text": "\tconst auto talkactionSharedPtr = getUserdataShared(L, 1);\n\tif (!talkactionSharedPtr) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_TALK_ACTION_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f0c2403a295513fb50dcc0f3a73ada80378a4752d29207754ef2e4efe44be61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 21, + "charOffset": 1025, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 21, + "charOffset": 911, + "charLength": 9, + "snippet": { + "text": "\tstd::shared_ptr container = getUserdataShared(L, 1);\n\tif (container) {\n\t\tlua_pushnumber(L, container->size());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "518f97c11922cedb6b23aa733ad0aada4d2e19cd0aa7625355802ba746503e6e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 21, + "charOffset": 1025, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 21, + "charOffset": 911, + "charLength": 9, + "snippet": { + "text": "\tstd::shared_ptr container = getUserdataShared(L, 1);\n\tif (container) {\n\t\tlua_pushnumber(L, container->size());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4f5dbc750e97d498b9889d1474920bce0e1597c801ae961f0059bdc997a2c35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 21, + "charOffset": 1287, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 21, + "charOffset": 1188, + "charLength": 9, + "snippet": { + "text": "\tconst auto &container = getUserdataShared(L, 1);\n\tif (container) {\n\t\tlua_pushnumber(L, container->getMaxCapacity());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee085d102cb8aa427ef62facc38cc40810c5ebccc16dfc66b9fef35787b8843b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 56, + "startColumn": 21, + "charOffset": 1568, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 54, + "startColumn": 21, + "charOffset": 1454, + "charLength": 9, + "snippet": { + "text": "\tstd::shared_ptr container = getUserdataShared(L, 1);\n\tif (container) {\n\t\tlua_pushnumber(L, container->capacity());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a51a8f7968d55ebdc2a67826c25754eadf10e12cf73c735a846d6b5cd303193" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 6, + "charOffset": 1833, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 6, + "charOffset": 1703, + "charLength": 1, + "snippet": { + "text": "\t// container:getEmptySlots([recursive = false])\n\tstd::shared_ptr container = getUserdataShared(L, 1);\n\tif (!container) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00391214ec6990fb2a3e12720bc02b0d7ad5d3ae36d6ea3bddfd4d4418609788" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 71, + "startColumn": 19, + "charOffset": 1899, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 69, + "startColumn": 19, + "charOffset": 1877, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tuint32_t slots = container->capacity() - container->size();\n\tbool recursive = getBoolean(L, 2, false);\n\tif (recursive) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1a262615fdf003f56278d063c7d3fadbaee1b43c88a2c0c0408c3960aab3417" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 3, + "charOffset": 2005, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 3, + "charOffset": 1942, + "charLength": 3, + "snippet": { + "text": "\tbool recursive = getBoolean(L, 2, false);\n\tif (recursive) {\n\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\tif (std::shared_ptr tmpContainer = (*it)->getContainer()) {\n\t\t\t\tslots += tmpContainer->capacity() - tmpContainer->size();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7fb5b8ccc32bf97c5cbe3cd866b230b6edbe9f05efe0dc4c829fc78cd6cf3a2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 3, + "charOffset": 2005, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 3, + "charOffset": 1942, + "charLength": 3, + "snippet": { + "text": "\tbool recursive = getBoolean(L, 2, false);\n\tif (recursive) {\n\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\tif (std::shared_ptr tmpContainer = (*it)->getContainer()) {\n\t\t\t\tslots += tmpContainer->capacity() - tmpContainer->size();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f019428351bb03485e7494ce51b2d6f4438c962fe1f1b1e486f8c5d54044792d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 54, + "charOffset": 2056, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 54, + "charOffset": 1942, + "charLength": 2, + "snippet": { + "text": "\tbool recursive = getBoolean(L, 2, false);\n\tif (recursive) {\n\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\tif (std::shared_ptr tmpContainer = (*it)->getContainer()) {\n\t\t\t\tslots += tmpContainer->capacity() - tmpContainer->size();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70ccf4f1e2ef168d7671c0d9df45ab0393d9db62f866c3c5295a4ccbc0fa71ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 80, + "startColumn": 20, + "charOffset": 2253, + "charLength": 5, + "snippet": { + "text": "slots" + } + }, + "contextRegion": { + "startLine": 78, + "startColumn": 20, + "charOffset": 2227, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\t}\n\tlua_pushnumber(L, slots);\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13b87932924f2d853c00a28fa8e7a99fb97b9673525c8739e1457ce97f499758" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 88, + "startColumn": 21, + "charOffset": 2497, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 86, + "startColumn": 21, + "charOffset": 2383, + "charLength": 9, + "snippet": { + "text": "\tstd::shared_ptr container = getUserdataShared(L, 1);\n\tif (container) {\n\t\tlua_pushnumber(L, container->getItemHoldingCount());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6e175717242f13690636ba65e0baebc2a01df31eb01daf1cdb3c5edaa1eb76e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 6, + "charOffset": 2747, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 6, + "charOffset": 2637, + "charLength": 1, + "snippet": { + "text": "\t// container:getItem(index)\n\tstd::shared_ptr container = getUserdataShared(L, 1);\n\tif (!container) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8635d4c506a302a599c45e2d30359aca3143f6f35790add053f613ef1e8dbefe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 129, + "startColumn": 6, + "charOffset": 3596, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 127, + "startColumn": 6, + "charOffset": 3424, + "charLength": 1, + "snippet": { + "text": "\t// container:addItem(itemId[, count/subType = 1[, index = INDEX_WHEREEVER[, flags = 0]]])\n\tstd::shared_ptr container = getUserdataShared(L, 1);\n\tif (!container) {\n\t\tlua_pushnil(L);\n\t\treportErrorFunc(\"Container is nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4119a082d18322a6e03dcfef58f16770009b1d4c20fdb3c87692dd7dd5529bb6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 131, + "startColumn": 3, + "charOffset": 3630, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 129, + "startColumn": 3, + "charOffset": 3591, + "charLength": 15, + "snippet": { + "text": "\tif (!container) {\n\t\tlua_pushnil(L);\n\t\treportErrorFunc(\"Container is nullptr\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6bc4a7bfab78fa299971b633297f3ca5958f8dc8d0df5361105e009b9773da66" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'itemId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 135, + "startColumn": 11, + "charOffset": 3697, + "charLength": 6, + "snippet": { + "text": "itemId" + } + }, + "contextRegion": { + "startLine": 133, + "startColumn": 11, + "charOffset": 3683, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tuint16_t itemId;\n\tif (isNumber(L, 2)) {\n\t\titemId = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee83cc8ccfda2e1f9cabce10f32051dcd7436b3acb0b41a3088da015c18b4812" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 142, + "startColumn": 4, + "charOffset": 3876, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 140, + "startColumn": 4, + "charOffset": 3833, + "charLength": 15, + "snippet": { + "text": "\t\tif (itemId == 0) {\n\t\t\tlua_pushnil(L);\n\t\t\treportErrorFunc(\"Item id is wrong\");\n\t\t\treturn 1;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd36a15161a476c0171b69cba0ed1b43b5c2c8e82c833305899b6864f5a75b88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 147, + "startColumn": 2, + "charOffset": 3935, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 145, + "startColumn": 2, + "charOffset": 3930, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tuint32_t count = getNumber(L, 3, 1);\n\tconst ItemType &it = Item::items[itemId];\n\tif (it.stackable) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "394b6fc91b3457a263132a85ddfd7740133c2483e69e3f5b7d33f1f08eb8c384" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 150, + "startColumn": 30, + "charOffset": 4075, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 148, + "startColumn": 30, + "charOffset": 3982, + "charLength": 5, + "snippet": { + "text": "\tconst ItemType &it = Item::items[itemId];\n\tif (it.stackable) {\n\t\tcount = std::min(count, it.stackSize);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37c7bd9acfea7bf8104a70658b24954046df14861941c26e321d02391d589ac6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 153, + "startColumn": 56, + "charOffset": 4156, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 151, + "startColumn": 56, + "charOffset": 4097, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tstd::shared_ptr item = Item::CreateItem(itemId, count);\n\tif (!item) {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d75a135786671f3aa41be2fe88a0c7e3441be7991e2430574aa6fcc080889446" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 154, + "startColumn": 6, + "charOffset": 4169, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 6, + "charOffset": 4100, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = Item::CreateItem(itemId, count);\n\tif (!item) {\n\t\tlua_pushnil(L);\n\t\treportErrorFunc(\"Item is nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7d5ca888bac100b86fabc3eecc585f6ecf777f562763ed11a8ec997ee9ae7a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 156, + "startColumn": 3, + "charOffset": 4198, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 154, + "startColumn": 3, + "charOffset": 4164, + "charLength": 15, + "snippet": { + "text": "\tif (!item) {\n\t\tlua_pushnil(L);\n\t\treportErrorFunc(\"Item is nullptr\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a63176395d9df207e45ae5cebd7dca20f81c1b41296b50873bb5dbafec32054d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 160, + "startColumn": 2, + "charOffset": 4251, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 2, + "charOffset": 4246, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tint32_t index = getNumber(L, 4, INDEX_WHEREEVER);\n\tuint32_t flags = getNumber(L, 5, 0);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02581f8c8a8967e54a95b28504ebae6e9d3c1321034ff50ec4c949ebb4a14a55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 161, + "startColumn": 2, + "charOffset": 4311, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 159, + "startColumn": 2, + "charOffset": 4249, + "charLength": 8, + "snippet": { + "text": "\n\tint32_t index = getNumber(L, 4, INDEX_WHEREEVER);\n\tuint32_t flags = getNumber(L, 5, 0);\n\n\tReturnValue ret = g_game().internalAddItem(container, item, index, flags);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb3b1345b410d4ffca7128e34aec3a66bae60122723b927c2f837dfa37aee6f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 161, + "startColumn": 42, + "charOffset": 4351, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 159, + "startColumn": 42, + "charOffset": 4249, + "charLength": 1, + "snippet": { + "text": "\n\tint32_t index = getNumber(L, 4, INDEX_WHEREEVER);\n\tuint32_t flags = getNumber(L, 5, 0);\n\n\tReturnValue ret = g_game().internalAddItem(container, item, index, flags);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55df6a5080a1678cf522807fbc49cddeb30e749da0c226a2ee4938ec90c6437b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 168, + "startColumn": 3, + "charOffset": 4546, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 166, + "startColumn": 3, + "charOffset": 4501, + "charLength": 15, + "snippet": { + "text": "\t\tsetItemMetatable(L, -1, item);\n\t} else {\n\t\treportErrorFunc(fmt::format(\"Cannot add item to container, error code: '{}'\", getReturnMessage(ret)));\n\t}\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b587e629b7c57628b36be70b4441b00fc5d116886f976320dba74e715054117" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 176, + "startColumn": 6, + "charOffset": 4864, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 174, + "startColumn": 6, + "charOffset": 4728, + "charLength": 1, + "snippet": { + "text": "\t// container:addItemEx(item[, index = INDEX_WHEREEVER[, flags = 0]])\n\tstd::shared_ptr item = getUserdataShared(L, 2);\n\tif (!item) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2bc62de643fa0f859fd273e418b631640e6af8ff59e5e137aa00b7e266551bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 182, + "startColumn": 6, + "charOffset": 4988, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 180, + "startColumn": 6, + "charOffset": 4906, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr container = getUserdataShared(L, 1);\n\tif (!container) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0b43f0f20c2fa43e0fda199a2cc791a1e0f62a69de7c721c023ce6ab7ac74b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 188, + "startColumn": 3, + "charOffset": 5100, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 186, + "startColumn": 3, + "charOffset": 5035, + "charLength": 15, + "snippet": { + "text": "\n\tif (item->getParent() != VirtualCylinder::virtualCylinder) {\n\t\treportErrorFunc(\"Item already has a parent\");\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49ace06f68b4fc8f5107de57a21af475ad53a7724865c006402756042d5ff7e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 193, + "startColumn": 2, + "charOffset": 5181, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 191, + "startColumn": 2, + "charOffset": 5176, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tint32_t index = getNumber(L, 3, INDEX_WHEREEVER);\n\tuint32_t flags = getNumber(L, 4, 0);\n\tReturnValue ret = g_game().internalAddItem(container, item, index, flags);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b36fe9805d0c7f494b4493dc66cdeb21ee910f37d973a78e32b4197d401b5256" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 194, + "startColumn": 2, + "charOffset": 5241, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 192, + "startColumn": 2, + "charOffset": 5179, + "charLength": 8, + "snippet": { + "text": "\n\tint32_t index = getNumber(L, 3, INDEX_WHEREEVER);\n\tuint32_t flags = getNumber(L, 4, 0);\n\tReturnValue ret = g_game().internalAddItem(container, item, index, flags);\n\tif (ret == RETURNVALUE_NOERROR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "827937ce39363d2967911bf0ea46f9fcc471c3f47a7c62777cba4554eb55599e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 199, + "startColumn": 20, + "charOffset": 5464, + "charLength": 3, + "snippet": { + "text": "ret" + } + }, + "contextRegion": { + "startLine": 197, + "startColumn": 20, + "charOffset": 5399, + "charLength": 3, + "snippet": { + "text": "\t\tScriptEnvironment::removeTempItem(item);\n\t}\n\tlua_pushnumber(L, ret);\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0e78dda7bb26a22ff1abd6d8faa9718a9a6c5b8f21e8f6b7135da9769e44a3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 207, + "startColumn": 21, + "charOffset": 5696, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 205, + "startColumn": 21, + "charOffset": 5582, + "charLength": 9, + "snippet": { + "text": "\tstd::shared_ptr container = getUserdataShared(L, 1);\n\tif (container) {\n\t\tlua_pushnumber(L, container->getCorpseOwner());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f388787c6c6c5d154dcbd0c87b1188e6305b03a04ccbfc6621dde81c19efd3e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 217, + "startColumn": 6, + "charOffset": 5976, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 215, + "startColumn": 6, + "charOffset": 5840, + "charLength": 1, + "snippet": { + "text": "\t// container:getItemCountById(itemId[, subType = -1])\n\tstd::shared_ptr container = getUserdataShared(L, 1);\n\tif (!container) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85f6a293efa31a9f9c88a2793b7dfe25b268e9fa4022eb1f3037a411bd55653a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'itemId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 222, + "startColumn": 11, + "charOffset": 6034, + "charLength": 6, + "snippet": { + "text": "itemId" + } + }, + "contextRegion": { + "startLine": 220, + "startColumn": 11, + "charOffset": 6020, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tuint16_t itemId;\n\tif (isNumber(L, 2)) {\n\t\titemId = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dddd78fdbdc93013a9e7dd3801240e383aafbdc9fc21040742764347a67c8a7d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 233, + "startColumn": 2, + "charOffset": 6232, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 231, + "startColumn": 2, + "charOffset": 6227, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tint32_t subType = getNumber(L, 3, -1);\n\tlua_pushnumber(L, container->getItemTypeCount(itemId, subType));\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78e3e5d2104cefecfe3a1523849319eb53cad2396352e372f851887c12eb41ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 234, + "startColumn": 20, + "charOffset": 6299, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 232, + "startColumn": 20, + "charOffset": 6230, + "charLength": 9, + "snippet": { + "text": "\n\tint32_t subType = getNumber(L, 3, -1);\n\tlua_pushnumber(L, container->getItemTypeCount(itemId, subType));\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "288ada0d0841fcb27fdeee59dfc0295025fafb7f7f656df9f2805db75f342096" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 252, + "startColumn": 6, + "charOffset": 6886, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 250, + "startColumn": 6, + "charOffset": 6761, + "charLength": 1, + "snippet": { + "text": "\t// container:getItems([recursive = false])\n\tstd::shared_ptr container = getUserdataShared(L, 1);\n\tif (!container) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "998482c194fa6b48cab68b159e6d70f77eeb32dc1307313969efc61c2a9b9d14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 263, + "startColumn": 2, + "charOffset": 7128, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 261, + "startColumn": 2, + "charOffset": 7110, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (std::shared_ptr item : items) {\n\t\tindex++;\n\t\tpushUserdata(L, item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b898e5b7a1217ac6fb903010349e527654ac66ffcc06e64cb2a848de3d4a5030" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 263, + "startColumn": 29, + "charOffset": 7155, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 261, + "startColumn": 29, + "charOffset": 7110, + "charLength": 4, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (std::shared_ptr item : items) {\n\t\tindex++;\n\t\tpushUserdata(L, item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16c29383c6826dc06e645bff522b4d54de6159d74b65cb63449547d5788f9811" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/container_functions.cpp" + }, + "region": { + "startLine": 275, + "startColumn": 6, + "charOffset": 7465, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 273, + "startColumn": 6, + "charOffset": 7353, + "charLength": 1, + "snippet": { + "text": "\t// container:registerReward()\n\tstd::shared_ptr container = getUserdataShared(L, 1);\n\tif (!container) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00391214ec6990fb2a3e12720bc02b0d7ad5d3ae36d6ea3bddfd4d4418609788" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 21, + "startColumn": 6, + "charOffset": 739, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 19, + "startColumn": 6, + "charOffset": 667, + "charLength": 9, + "snippet": { + "text": "\tImbuement* imbuement = g_imbuements().getImbuement(imbuementId);\n\n\tif (imbuement) {\n\t\tpushUserdata(L, imbuement);\n\t\tsetMetatable(L, -1, \"Imbuement\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b59eb050c64be1402dfc641e133d8288bf6081483814111235d862b0562848a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'Imbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 21, + "startColumn": 6, + "charOffset": 739, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 19, + "startColumn": 6, + "charOffset": 667, + "charLength": 9, + "snippet": { + "text": "\tImbuement* imbuement = g_imbuements().getImbuement(imbuementId);\n\n\tif (imbuement) {\n\t\tpushUserdata(L, imbuement);\n\t\tsetMetatable(L, -1, \"Imbuement\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d51828d7a03135274293e704b969cbb823ecc17b6af790c3d0238a74e6a432d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 32, + "startColumn": 2, + "charOffset": 959, + "charLength": 9, + "snippet": { + "text": "Imbuement" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 2, + "charOffset": 874, + "charLength": 9, + "snippet": { + "text": "int ImbuementFunctions::luaImbuementGetName(lua_State* L) {\n\t// imbuement:getName()\n\tImbuement* imbuement = getUserdata(L, 1);\n\tif (imbuement) {\n\t\tpushString(L, imbuement->getName());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "304649c7763bf02bd45b7f5261440d30dc8892fabf359c2922b62e5484b068f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 6, + "charOffset": 1017, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 6, + "charOffset": 934, + "charLength": 9, + "snippet": { + "text": "\t// imbuement:getName()\n\tImbuement* imbuement = getUserdata(L, 1);\n\tif (imbuement) {\n\t\tpushString(L, imbuement->getName());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dcd5e0f19cae48cec1e2c03c93443af1512d8be2128e30f34ac841b035085b1d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'Imbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 6, + "charOffset": 1017, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 6, + "charOffset": 934, + "charLength": 9, + "snippet": { + "text": "\t// imbuement:getName()\n\tImbuement* imbuement = getUserdata(L, 1);\n\tif (imbuement) {\n\t\tpushString(L, imbuement->getName());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e855d856a4b8325fc42e44c6e14a669087dc4186f82be48c15414143d837efbb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 2, + "charOffset": 1195, + "charLength": 9, + "snippet": { + "text": "Imbuement" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 2, + "charOffset": 1114, + "charLength": 9, + "snippet": { + "text": "int ImbuementFunctions::luaImbuementGetId(lua_State* L) {\n\t// imbuement:getId()\n\tImbuement* imbuement = getUserdata(L, 1);\n\tif (imbuement) {\n\t\tlua_pushnumber(L, imbuement->getID());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "959773105c74a6a94cc2c6c87f0ece9b6b96cc3b67bedcb7800029f6124623e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 44, + "startColumn": 6, + "charOffset": 1253, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 42, + "startColumn": 6, + "charOffset": 1172, + "charLength": 9, + "snippet": { + "text": "\t// imbuement:getId()\n\tImbuement* imbuement = getUserdata(L, 1);\n\tif (imbuement) {\n\t\tlua_pushnumber(L, imbuement->getID());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea197aabe880a07089b702a90649066f21507ea8011c8dc2a25bc6829fc5b18c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'Imbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 44, + "startColumn": 6, + "charOffset": 1253, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 42, + "startColumn": 6, + "charOffset": 1172, + "charLength": 9, + "snippet": { + "text": "\t// imbuement:getId()\n\tImbuement* imbuement = getUserdata(L, 1);\n\tif (imbuement) {\n\t\tlua_pushnumber(L, imbuement->getID());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6182e4b488c43e2134716bb003a819f607c53db45286d441e226a476a3e6197c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 21, + "charOffset": 1286, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 21, + "charOffset": 1194, + "charLength": 9, + "snippet": { + "text": "\tImbuement* imbuement = getUserdata(L, 1);\n\tif (imbuement) {\n\t\tlua_pushnumber(L, imbuement->getID());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49721aa94ba2f79ff566bd2a83cedd1a07ba6ae45eaba217e4a99685e3c6283a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 54, + "startColumn": 2, + "charOffset": 1439, + "charLength": 9, + "snippet": { + "text": "Imbuement" + } + }, + "contextRegion": { + "startLine": 52, + "startColumn": 2, + "charOffset": 1352, + "charLength": 9, + "snippet": { + "text": "int ImbuementFunctions::luaImbuementGetItems(lua_State* L) {\n\t// imbuement:getItems()\n\tImbuement* imbuement = getUserdata(L, 1);\n\tif (!imbuement) {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a06858ebc582dfd53ac4b316b7088d0c8b63ef33d6c92f44069695d4a0b879d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 55, + "startColumn": 6, + "charOffset": 1497, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 6, + "charOffset": 1413, + "charLength": 1, + "snippet": { + "text": "\t// imbuement:getItems()\n\tImbuement* imbuement = getUserdata(L, 1);\n\tif (!imbuement) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a59e0046170afbe3bcf1c23793d8078fd3bd733d926854c9e43e7360510a715" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'Imbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 55, + "startColumn": 7, + "charOffset": 1498, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 7, + "charOffset": 1413, + "charLength": 9, + "snippet": { + "text": "\t// imbuement:getItems()\n\tImbuement* imbuement = getUserdata(L, 1);\n\tif (!imbuement) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e8919177fc1180e2e23f380d19db1c026a6ecc9bb1cbf2b1a2d72b246e54879" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 62, + "startColumn": 21, + "charOffset": 1609, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 21, + "charOffset": 1545, + "charLength": 5, + "snippet": { + "text": "\tconst auto items = imbuement->getItems();\n\n\tlua_createtable(L, items.size(), 0);\n\tfor (const auto &itm : items) {\n\t\tlua_createtable(L, 0, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd30ff570b3e55139b20d6a6dba72936047a283172d10955b07748a5f138587c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 62, + "startColumn": 21, + "charOffset": 1609, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 21, + "charOffset": 1545, + "charLength": 5, + "snippet": { + "text": "\tconst auto items = imbuement->getItems();\n\n\tlua_createtable(L, items.size(), 0);\n\tfor (const auto &itm : items) {\n\t\tlua_createtable(L, 0, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f8cc77a5cfaf596654141cd99e41dcf217b28f70c3493fd3ed40d1c26642036" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 63, + "startColumn": 2, + "charOffset": 1628, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 2, + "charOffset": 1588, + "charLength": 3, + "snippet": { + "text": "\n\tlua_createtable(L, items.size(), 0);\n\tfor (const auto &itm : items) {\n\t\tlua_createtable(L, 0, 2);\n\t\tsetField(L, \"itemid\", itm.first);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4366a324c540ac4a2824f4796d5d49f2d6626faa5bcca535d8b01c9c7a768177" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 65, + "startColumn": 25, + "charOffset": 1712, + "charLength": 3, + "snippet": { + "text": "itm" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 25, + "charOffset": 1627, + "charLength": 3, + "snippet": { + "text": "\tfor (const auto &itm : items) {\n\t\tlua_createtable(L, 0, 2);\n\t\tsetField(L, \"itemid\", itm.first);\n\t\tsetField(L, \"count\", itm.second);\n\t\tlua_rawseti(L, -2, itm.first);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0fc8ad47c79e4c9676ca98223b4b6846345893ecd68d47cfd884905757977e39" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 24, + "charOffset": 1747, + "charLength": 3, + "snippet": { + "text": "itm" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 24, + "charOffset": 1660, + "charLength": 3, + "snippet": { + "text": "\t\tlua_createtable(L, 0, 2);\n\t\tsetField(L, \"itemid\", itm.first);\n\t\tsetField(L, \"count\", itm.second);\n\t\tlua_rawseti(L, -2, itm.first);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d944eb6bf9a2a919842c8ed01e02a63b1d19101841c19e193650210df30dfdeb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 75, + "startColumn": 2, + "charOffset": 1896, + "charLength": 9, + "snippet": { + "text": "Imbuement" + } + }, + "contextRegion": { + "startLine": 73, + "startColumn": 2, + "charOffset": 1811, + "charLength": 9, + "snippet": { + "text": "int ImbuementFunctions::luaImbuementGetBase(lua_State* L) {\n\t// imbuement:getBase()\n\tImbuement* imbuement = getUserdata(L, 1);\n\tif (!imbuement) {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6e75d7849ce8aef923ac703159d8d8a6048381a72082be0800366cdf7a8b237" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 6, + "charOffset": 1954, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 6, + "charOffset": 1871, + "charLength": 1, + "snippet": { + "text": "\t// imbuement:getBase()\n\tImbuement* imbuement = getUserdata(L, 1);\n\tif (!imbuement) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53ba11cd090109a14a37c740c47cbf662b4ece85a6352299e8533cea212c1799" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'Imbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 7, + "charOffset": 1955, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 7, + "charOffset": 1871, + "charLength": 9, + "snippet": { + "text": "\t// imbuement:getBase()\n\tImbuement* imbuement = getUserdata(L, 1);\n\tif (!imbuement) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c91240e45b4d6f968921711e2a4e91122c0f7090511bec58919e6628bb1b3fee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 82, + "startColumn": 6, + "charOffset": 2097, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 6, + "charOffset": 2001, + "charLength": 1, + "snippet": { + "text": "\n\tconst BaseImbuement* baseImbuement = g_imbuements().getBaseByID(imbuement->getBaseID());\n\tif (!baseImbuement) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a61c6e258dab0e124f158773ea209d4ff821573aab723dabd287aba9faec81c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const BaseImbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 82, + "startColumn": 7, + "charOffset": 2098, + "charLength": 13, + "snippet": { + "text": "baseImbuement" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 7, + "charOffset": 2001, + "charLength": 13, + "snippet": { + "text": "\n\tconst BaseImbuement* baseImbuement = g_imbuements().getBaseByID(imbuement->getBaseID());\n\tif (!baseImbuement) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06f5b57c84bea7559a61d6601f60a76fb68b7f54cfafaf24b7855b0eb7d02871" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 24, + "charOffset": 2172, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 24, + "charOffset": 2145, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tlua_createtable(L, 0, 7);\n\tsetField(L, \"id\", baseImbuement->id);\n\tsetField(L, \"name\", baseImbuement->name);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d07a152a4f16194000128f9ab5882633157c99c242b63411f019fb2e07bbf6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 88, + "startColumn": 20, + "charOffset": 2195, + "charLength": 13, + "snippet": { + "text": "baseImbuement" + } + }, + "contextRegion": { + "startLine": 86, + "startColumn": 20, + "charOffset": 2148, + "charLength": 13, + "snippet": { + "text": "\n\tlua_createtable(L, 0, 7);\n\tsetField(L, \"id\", baseImbuement->id);\n\tsetField(L, \"name\", baseImbuement->name);\n\tsetField(L, \"price\", baseImbuement->price);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "452f11ae76ea4ae16986922df1e988268ae8e2be0de0cb38698de39c49c2e9fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 90, + "startColumn": 23, + "charOffset": 2280, + "charLength": 13, + "snippet": { + "text": "baseImbuement" + } + }, + "contextRegion": { + "startLine": 88, + "startColumn": 23, + "charOffset": 2176, + "charLength": 13, + "snippet": { + "text": "\tsetField(L, \"id\", baseImbuement->id);\n\tsetField(L, \"name\", baseImbuement->name);\n\tsetField(L, \"price\", baseImbuement->price);\n\tsetField(L, \"protection\", baseImbuement->protectionPrice);\n\tsetField(L, \"percent\", baseImbuement->percent);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a64edf269fdca4f501bd8192d314213ba3b7918d1757693ea295b4e089ef5e25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 28, + "charOffset": 2330, + "charLength": 13, + "snippet": { + "text": "baseImbuement" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 28, + "charOffset": 2215, + "charLength": 13, + "snippet": { + "text": "\tsetField(L, \"name\", baseImbuement->name);\n\tsetField(L, \"price\", baseImbuement->price);\n\tsetField(L, \"protection\", baseImbuement->protectionPrice);\n\tsetField(L, \"percent\", baseImbuement->percent);\n\tsetField(L, \"removeCost\", baseImbuement->removeCost);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a3637195a303ce7ae9bca704f20e7dc26ef865eb312659272b04cc153867de9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 92, + "startColumn": 25, + "charOffset": 2387, + "charLength": 13, + "snippet": { + "text": "baseImbuement" + } + }, + "contextRegion": { + "startLine": 90, + "startColumn": 25, + "charOffset": 2258, + "charLength": 13, + "snippet": { + "text": "\tsetField(L, \"price\", baseImbuement->price);\n\tsetField(L, \"protection\", baseImbuement->protectionPrice);\n\tsetField(L, \"percent\", baseImbuement->percent);\n\tsetField(L, \"removeCost\", baseImbuement->removeCost);\n\tsetField(L, \"duration\", baseImbuement->duration);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88abeb9fb1ddf6dbe91a9dc0ec7e2f0e94c30d280251b4db18c6a6dc01875265" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 93, + "startColumn": 28, + "charOffset": 2439, + "charLength": 13, + "snippet": { + "text": "baseImbuement" + } + }, + "contextRegion": { + "startLine": 91, + "startColumn": 28, + "charOffset": 2303, + "charLength": 13, + "snippet": { + "text": "\tsetField(L, \"protection\", baseImbuement->protectionPrice);\n\tsetField(L, \"percent\", baseImbuement->percent);\n\tsetField(L, \"removeCost\", baseImbuement->removeCost);\n\tsetField(L, \"duration\", baseImbuement->duration);\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46ab18f4843bfa1a1a1fa117f203508fada0cf0d3b8508f1fbcb61a5188200fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 94, + "startColumn": 26, + "charOffset": 2492, + "charLength": 13, + "snippet": { + "text": "baseImbuement" + } + }, + "contextRegion": { + "startLine": 92, + "startColumn": 26, + "charOffset": 2363, + "charLength": 13, + "snippet": { + "text": "\tsetField(L, \"percent\", baseImbuement->percent);\n\tsetField(L, \"removeCost\", baseImbuement->removeCost);\n\tsetField(L, \"duration\", baseImbuement->duration);\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1f4361266f32e9ca1bcbbe95f21a6df6105b2c21ef8ac680935930a90c22be6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 100, + "startColumn": 2, + "charOffset": 2625, + "charLength": 9, + "snippet": { + "text": "Imbuement" + } + }, + "contextRegion": { + "startLine": 98, + "startColumn": 2, + "charOffset": 2532, + "charLength": 9, + "snippet": { + "text": "int ImbuementFunctions::luaImbuementGetCategory(lua_State* L) {\n\t// imbuement:getCategory()\n\tImbuement* imbuement = getUserdata(L, 1);\n\tif (!imbuement) {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f9f4d0a6227557861c662bd33e66b02a8856e287e078553a3d829ce4d7783e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 101, + "startColumn": 6, + "charOffset": 2683, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 99, + "startColumn": 6, + "charOffset": 2596, + "charLength": 1, + "snippet": { + "text": "\t// imbuement:getCategory()\n\tImbuement* imbuement = getUserdata(L, 1);\n\tif (!imbuement) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72371a3a2472369a4c028e2bad224af9077d7fe81a27507f43a9f2e5edc8b338" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'Imbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 101, + "startColumn": 7, + "charOffset": 2684, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 99, + "startColumn": 7, + "charOffset": 2596, + "charLength": 9, + "snippet": { + "text": "\t// imbuement:getCategory()\n\tImbuement* imbuement = getUserdata(L, 1);\n\tif (!imbuement) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95c9e9ccdc6d7915b6e7a4a9746acb3d4292918d99d74466bdf0297b05393048" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 108, + "startColumn": 6, + "charOffset": 2875, + "charLength": 17, + "snippet": { + "text": "categoryImbuement" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 6, + "charOffset": 2779, + "charLength": 17, + "snippet": { + "text": "\tconst CategoryImbuement* categoryImbuement = g_imbuements().getCategoryByID(categoryId);\n\n\tif (categoryImbuement) {\n\t\tlua_createtable(L, 0, 2);\n\t\tsetField(L, \"id\", categoryImbuement->id);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "809c21494e9e617366d08baa8a4791318b2ee1c0081b5bb4b42222959c02f2c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CategoryImbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 108, + "startColumn": 6, + "charOffset": 2875, + "charLength": 17, + "snippet": { + "text": "categoryImbuement" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 6, + "charOffset": 2779, + "charLength": 17, + "snippet": { + "text": "\tconst CategoryImbuement* categoryImbuement = g_imbuements().getCategoryByID(categoryId);\n\n\tif (categoryImbuement) {\n\t\tlua_createtable(L, 0, 2);\n\t\tsetField(L, \"id\", categoryImbuement->id);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78bddaa535ccb402032ce4b07f7a202e90b064daa262648bb0fa6ff0505075b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 110, + "startColumn": 21, + "charOffset": 2944, + "charLength": 17, + "snippet": { + "text": "categoryImbuement" + } + }, + "contextRegion": { + "startLine": 108, + "startColumn": 21, + "charOffset": 2870, + "charLength": 17, + "snippet": { + "text": "\tif (categoryImbuement) {\n\t\tlua_createtable(L, 0, 2);\n\t\tsetField(L, \"id\", categoryImbuement->id);\n\t\tsetField(L, \"name\", categoryImbuement->name);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd372b69191a6681168a596c766a3b642bc205b1e89c18f45d1da6b00ddd534b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 121, + "startColumn": 2, + "charOffset": 3151, + "charLength": 9, + "snippet": { + "text": "Imbuement" + } + }, + "contextRegion": { + "startLine": 119, + "startColumn": 2, + "charOffset": 3062, + "charLength": 9, + "snippet": { + "text": "int ImbuementFunctions::luaImbuementIsPremium(lua_State* L) {\n\t// imbuement:isPremium()\n\tImbuement* imbuement = getUserdata(L, 1);\n\tif (!imbuement) {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8608437b8d70508acb75faea7138587a1f33b1ca3755d027b36f2a9c2ba03124" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 122, + "startColumn": 6, + "charOffset": 3209, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 120, + "startColumn": 6, + "charOffset": 3124, + "charLength": 1, + "snippet": { + "text": "\t// imbuement:isPremium()\n\tImbuement* imbuement = getUserdata(L, 1);\n\tif (!imbuement) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92bc31e6f7ee14f94b613ef597f94f9e1e1677b79fe09f4a6f3e3a68d3633edf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'Imbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 122, + "startColumn": 7, + "charOffset": 3210, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 120, + "startColumn": 7, + "charOffset": 3124, + "charLength": 9, + "snippet": { + "text": "\t// imbuement:isPremium()\n\tImbuement* imbuement = getUserdata(L, 1);\n\tif (!imbuement) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36e46b3a4811de4d9c9fee89a688f5fb18952563cf65050a763dcc31aea0fbac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 133, + "startColumn": 2, + "charOffset": 3415, + "charLength": 9, + "snippet": { + "text": "Imbuement" + } + }, + "contextRegion": { + "startLine": 131, + "startColumn": 2, + "charOffset": 3312, + "charLength": 9, + "snippet": { + "text": "int ImbuementFunctions::luaImbuementGetElementDamage(lua_State* L) {\n\t// imbuement:getElementDamage()\n\tImbuement* imbuement = getUserdata(L, 1);\n\tif (imbuement) {\n\t\tlua_pushnumber(L, imbuement->elementDamage);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "489ebce971fece0a865769dd5ccae4286baa10eca6e06924478f39f348aca033" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 6, + "charOffset": 3473, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 6, + "charOffset": 3381, + "charLength": 9, + "snippet": { + "text": "\t// imbuement:getElementDamage()\n\tImbuement* imbuement = getUserdata(L, 1);\n\tif (imbuement) {\n\t\tlua_pushnumber(L, imbuement->elementDamage);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42cff681a98c7f0be5567c6b9b759dc7d703c532e44d0e7ae229a540d6eeb37f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'Imbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 6, + "charOffset": 3473, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 6, + "charOffset": 3381, + "charLength": 9, + "snippet": { + "text": "\t// imbuement:getElementDamage()\n\tImbuement* imbuement = getUserdata(L, 1);\n\tif (imbuement) {\n\t\tlua_pushnumber(L, imbuement->elementDamage);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee366a9e537fb2c26b30d50ad3dc873d8f345396a33f131c8a53069e91a7a234" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 135, + "startColumn": 21, + "charOffset": 3506, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 133, + "startColumn": 21, + "charOffset": 3414, + "charLength": 9, + "snippet": { + "text": "\tImbuement* imbuement = getUserdata(L, 1);\n\tif (imbuement) {\n\t\tlua_pushnumber(L, imbuement->elementDamage);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9f9aa36f771ed1ec7288503c779943d3ff99aa770a9417926418c4d10efa706" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 144, + "startColumn": 2, + "charOffset": 3675, + "charLength": 9, + "snippet": { + "text": "Imbuement" + } + }, + "contextRegion": { + "startLine": 142, + "startColumn": 2, + "charOffset": 3578, + "charLength": 9, + "snippet": { + "text": "int ImbuementFunctions::luaImbuementGetCombatType(lua_State* L) {\n\t// imbuement:getCombatType()\n\tImbuement* imbuement = getUserdata(L, 1);\n\tif (imbuement) {\n\t\tlua_pushnumber(L, imbuement->combatType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d50ba77070bda2a470cfd4c4b35755fe6fe3a6e0f47318283f43b91fc3733aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 145, + "startColumn": 6, + "charOffset": 3733, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 143, + "startColumn": 6, + "charOffset": 3644, + "charLength": 9, + "snippet": { + "text": "\t// imbuement:getCombatType()\n\tImbuement* imbuement = getUserdata(L, 1);\n\tif (imbuement) {\n\t\tlua_pushnumber(L, imbuement->combatType);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c286672610b96907e1cfaf9fda6bd1a458c673c1ce479f5c8b281dc35d6a1fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'Imbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 145, + "startColumn": 6, + "charOffset": 3733, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 143, + "startColumn": 6, + "charOffset": 3644, + "charLength": 9, + "snippet": { + "text": "\t// imbuement:getCombatType()\n\tImbuement* imbuement = getUserdata(L, 1);\n\tif (imbuement) {\n\t\tlua_pushnumber(L, imbuement->combatType);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6cd11069b06a27f1f4d47d120512743fd491b2b454012c11700da5a22b48b264" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/imbuement_functions.cpp" + }, + "region": { + "startLine": 146, + "startColumn": 21, + "charOffset": 3766, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 144, + "startColumn": 21, + "charOffset": 3674, + "charLength": 9, + "snippet": { + "text": "\tImbuement* imbuement = getUserdata(L, 1);\n\tif (imbuement) {\n\t\tlua_pushnumber(L, imbuement->combatType);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2e7f73868736e685cdd0bedb8ebe279bf2f244fbdfd0fc4ba5f4dc354f87f72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'loadFromXML' has cognitive complexity of 30 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 21, + "charOffset": 984, + "charLength": 11, + "snippet": { + "text": "loadFromXML" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 21, + "charOffset": 891, + "charLength": 11, + "snippet": { + "text": "static constexpr int32_t MONSTER_MAXSPAWN_INTERVAL = 86400000; // 1 day\n\nbool SpawnsMonster::loadFromXML(const std::string &filemonstername) {\n\tif (isLoaded()) {\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37b0950149c1c3789552fdb2e3e6a101120f37eb8fca4517d1305a3bcfb5beae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 6, + "charOffset": 1175, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 6, + "charOffset": 1072, + "charLength": 1, + "snippet": { + "text": "\tpugi::xml_document doc;\n\tpugi::xml_parse_result result = doc.load_file(filemonstername.c_str());\n\tif (!result) {\n\t\tprintXMLError(__FUNCTION__, filemonstername, result);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "607e1a98f1b70761d10dfa47b1d8dc70ed0f3f9d1071fe1cd8b331ad63ca2007" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-unused-local-non-trivial-variable", + "ruleIndex": 115, + "kind": "fail", + "level": "warning", + "message": { + "text": "unused local variable 'boostedNameGet' of type 'std::string' (aka 'basic_string')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 14, + "charOffset": 1334, + "charLength": 14, + "snippet": { + "text": "boostedNameGet" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 14, + "charOffset": 1304, + "charLength": 14, + "snippet": { + "text": "\tloaded = true;\n\n\tstd::string boostedNameGet = g_game().getBoostedMonsterName();\n\n\tfor (auto spawnMonsterNode : doc.child(\"monsters\").children()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "18b4c48e268c145f6423a12d2b1a358a33d830d78a8abb44f222b9993ebfd659" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 48, + "startColumn": 4, + "charOffset": 1621, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 4, + "charOffset": 1474, + "charLength": 4, + "snippet": { + "text": "\t\t\tpugi::cast(spawnMonsterNode.attribute(\"centerx\").value()),\n\t\t\tpugi::cast(spawnMonsterNode.attribute(\"centery\").value()),\n\t\t\tpugi::cast(spawnMonsterNode.attribute(\"centerz\").value())\n\t\t);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41538c5286926418b1376173bf03abd5838782e90c7bc51d80d98073ee9013b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'radius' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 51, + "startColumn": 11, + "charOffset": 1705, + "charLength": 6, + "snippet": { + "text": "radius" + } + }, + "contextRegion": { + "startLine": 49, + "startColumn": 11, + "charOffset": 1689, + "charLength": 6, + "snippet": { + "text": "\t\t);\n\n\t\tint32_t radius;\n\t\tpugi::xml_attribute radiusAttribute = spawnMonsterNode.attribute(\"radius\");\n\t\tif (radiusAttribute) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31fa864c7ccaa7355a6a135fa9827ca14b7b72e78df45b2ee9aaeb16e99104c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 53, + "startColumn": 7, + "charOffset": 1797, + "charLength": 15, + "snippet": { + "text": "radiusAttribute" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 7, + "charOffset": 1695, + "charLength": 15, + "snippet": { + "text": "\t\tint32_t radius;\n\t\tpugi::xml_attribute radiusAttribute = spawnMonsterNode.attribute(\"radius\");\n\t\tif (radiusAttribute) {\n\t\t\tradius = pugi::cast(radiusAttribute.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80cbb0a924776c3b774027901e68e8e91c27a36072c01badabc4978de1b410d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 53, + "startColumn": 7, + "charOffset": 1797, + "charLength": 15, + "snippet": { + "text": "radiusAttribute" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 7, + "charOffset": 1695, + "charLength": 15, + "snippet": { + "text": "\t\tint32_t radius;\n\t\tpugi::xml_attribute radiusAttribute = spawnMonsterNode.attribute(\"radius\");\n\t\tif (radiusAttribute) {\n\t\t\tradius = pugi::cast(radiusAttribute.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63ab538e7ca07ef0311fd944d1e6194c5f5f1afaadb09e3c6772343bee5f4337" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 7, + "charOffset": 1912, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 7, + "charOffset": 1901, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif (!spawnMonsterNode.first_child()) {\n\t\t\tg_logger().warn(\"[SpawnsMonster::loadFromXml] - Empty spawn at position: {} with radius: {}\", centerPos.toString(), radius);\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aac5a6633c3dcbb11fcbccf8770c9f7e49371e45ff3827ba14eb01b4e83ba12f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 3, + "charOffset": 2177, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 3, + "charOffset": 2093, + "charLength": 3, + "snippet": { + "text": "\t\tSpawnMonster &spawnMonster = spawnMonsterList.emplace_back(centerPos, radius);\n\n\t\tfor (auto childMonsterNode : spawnMonsterNode.children()) {\n\t\t\tif (strcasecmp(childMonsterNode.name(), \"monster\") == 0) {\n\t\t\t\tpugi::xml_attribute nameAttribute = childMonsterNode.attribute(\"name\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d61940c80459858968ac35280979f5c206b6bc099cc3a8d3a3d968e38f79f99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 69, + "startColumn": 9, + "charOffset": 2383, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 67, + "startColumn": 9, + "charOffset": 2237, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (strcasecmp(childMonsterNode.name(), \"monster\") == 0) {\n\t\t\t\tpugi::xml_attribute nameAttribute = childMonsterNode.attribute(\"name\");\n\t\t\t\tif (!nameAttribute) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "110453c6b0b93844e51857570a9c4e834d6de9f356e7ee7c10f32ea680341fc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'dir' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 73, + "startColumn": 15, + "charOffset": 2437, + "charLength": 3, + "snippet": { + "text": "dir" + } + }, + "contextRegion": { + "startLine": 71, + "startColumn": 15, + "charOffset": 2416, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tDirection dir;\n\n\t\t\t\tpugi::xml_attribute directionAttribute = childMonsterNode.attribute(\"direction\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25351ed43c6d79b87b0dc6d865ce0c6d7d26fcab0141652c3790c8417f22df1d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 9, + "charOffset": 2537, + "charLength": 18, + "snippet": { + "text": "directionAttribute" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 9, + "charOffset": 2442, + "charLength": 18, + "snippet": { + "text": "\n\t\t\t\tpugi::xml_attribute directionAttribute = childMonsterNode.attribute(\"direction\");\n\t\t\t\tif (directionAttribute) {\n\t\t\t\t\tdir = static_cast(pugi::cast(directionAttribute.value()));\n\t\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9aea3a90927edb44f377194cf478a1d94b27d8b5ea991d3a0a1d277a66f134d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 9, + "charOffset": 2537, + "charLength": 18, + "snippet": { + "text": "directionAttribute" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 9, + "charOffset": 2442, + "charLength": 18, + "snippet": { + "text": "\n\t\t\t\tpugi::xml_attribute directionAttribute = childMonsterNode.attribute(\"direction\");\n\t\t\t\tif (directionAttribute) {\n\t\t\t\t\tdir = static_cast(pugi::cast(directionAttribute.value()));\n\t\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71f8d8c79131f97388e9bfb90851bfe3cd80eb30bbb30f387e809f0c026c9e82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 92, + "startColumn": 9, + "charOffset": 3112, + "charLength": 15, + "snippet": { + "text": "weightAttribute" + } + }, + "contextRegion": { + "startLine": 90, + "startColumn": 9, + "charOffset": 2999, + "charLength": 15, + "snippet": { + "text": "\t\t\t\tpugi::xml_attribute weightAttribute = childMonsterNode.attribute(\"weight\");\n\t\t\t\tuint32_t weight = 1;\n\t\t\t\tif (weightAttribute) {\n\t\t\t\t\tweight = pugi::cast(weightAttribute.value());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd300edf170e5971e3c8c57f1b1035f6ee8a1a7a7994a48b608049ac4fcf0d32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 92, + "startColumn": 9, + "charOffset": 3112, + "charLength": 15, + "snippet": { + "text": "weightAttribute" + } + }, + "contextRegion": { + "startLine": 90, + "startColumn": 9, + "charOffset": 2999, + "charLength": 15, + "snippet": { + "text": "\t\t\t\tpugi::xml_attribute weightAttribute = childMonsterNode.attribute(\"weight\");\n\t\t\t\tuint32_t weight = 1;\n\t\t\t\tif (weightAttribute) {\n\t\t\t\t\tweight = pugi::cast(weightAttribute.value());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8c561733d473548c748293f7461acbb251f0ab6dc1d6259b9ad74c615cb1d35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 104, + "startColumn": 18, + "charOffset": 3659, + "charLength": 10, + "snippet": { + "text": "addMonster" + } + }, + "contextRegion": { + "startLine": 102, + "startColumn": 18, + "charOffset": 3635, + "charLength": 10, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tspawnMonster.addMonster(nameAttribute.as_string(), pos, dir, scheduleInterval * 1000, weight);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ab1df2cf4b2359dade7e0ffcf690b827da3a23ae9b6032b9d313ec71e8db743" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 104, + "startColumn": 85, + "charOffset": 3726, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 102, + "startColumn": 85, + "charOffset": 3635, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tspawnMonster.addMonster(nameAttribute.as_string(), pos, dir, scheduleInterval * 1000, weight);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5ed588eb5a144b08d649c62b5ac55db0bb7c4b9db54ade47e5b81bab181af7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 116, + "startColumn": 2, + "charOffset": 3852, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 114, + "startColumn": 2, + "charOffset": 3847, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (SpawnMonster &spawnMonster : spawnMonsterList) {\n\t\tspawnMonster.startup();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa6b5966456dda16661fb8a2df7d5f39de4a6b92613d36c11c634e0fe294ad1c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 124, + "startColumn": 2, + "charOffset": 3987, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 122, + "startColumn": 2, + "charOffset": 3955, + "charLength": 3, + "snippet": { + "text": "\nvoid SpawnsMonster::clear() {\n\tfor (SpawnMonster &spawnMonster : spawnMonsterList) {\n\t\tspawnMonster.stopEvent();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11a1f96365041a292a61b563d5f328c35a8ea03439d25cdfb71653cd6073894f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 144, + "startColumn": 28, + "charOffset": 4599, + "charLength": 12, + "snippet": { + "text": "g_dispatcher" + } + }, + "contextRegion": { + "startLine": 142, + "startColumn": 28, + "charOffset": 4490, + "charLength": 12, + "snippet": { + "text": "void SpawnMonster::startSpawnMonsterCheck() {\n\tif (checkSpawnMonsterEvent == 0) {\n\t\tcheckSpawnMonsterEvent = g_dispatcher().scheduleEvent(\n\t\t\tgetInterval(), [this] { checkSpawnMonster(); }, \"SpawnMonster::checkSpawnMonster\"\n\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9cdae5f6019b9f975cb9fc89a221972a7e28e6569dd0a08e604c60ccf40a9780" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 151, + "startColumn": 2, + "charOffset": 4758, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 149, + "startColumn": 2, + "charOffset": 4724, + "charLength": 3, + "snippet": { + "text": "\nSpawnMonster::~SpawnMonster() {\n\tfor (const auto &[_, monster] : spawnedMonsterMap) {\n\t\tmonster->setSpawnMonster(nullptr);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a9e3fffa952ba7495dc2ae2355ce5600b37ec40b46e482c3c14e9e5dbc3c743" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 161, + "startColumn": 10, + "charOffset": 5075, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 159, + "startColumn": 10, + "charOffset": 4947, + "charLength": 1, + "snippet": { + "text": "\tauto spectators = Spectators().find(pos);\n\treturn std::ranges::any_of(spectators, [](const auto &spectator) {\n\t\treturn !spectator->getPlayer()->hasFlag(PlayerFlags_t::IgnoredByMonsters);\n\t});\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7eb3d762521ecc55cf3dec16442bb1d64e669e32865d33ff0be1b3b2152b1f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'monsterType' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 169, + "startColumn": 111, + "charOffset": 5384, + "charLength": 11, + "snippet": { + "text": "monsterType" + } + }, + "contextRegion": { + "startLine": 167, + "startColumn": 111, + "charOffset": 5271, + "charLength": 11, + "snippet": { + "text": "}\n\nbool SpawnMonster::spawnMonster(uint32_t spawnMonsterId, spawnBlock_t &sb, const std::shared_ptr monsterType, bool startup /*= false*/) {\n\tif (spawnedMonsterMap.contains(spawnMonsterId)) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6fc0119d4c385aa2354766cf35a31968bdf413347cd8c3a10c91fe83d6f9e04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'startup' has cognitive complexity of 35 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 197, + "startColumn": 20, + "charOffset": 6318, + "charLength": 7, + "snippet": { + "text": "startup" + } + }, + "contextRegion": { + "startLine": 195, + "startColumn": 20, + "charOffset": 6296, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid SpawnMonster::startup(bool delayed) {\n\tif (g_configManager().getBoolean(RANDOM_MONSTER_SPAWN, __FUNCTION__)) {\n\t\tfor (auto it = spawnMonsterMap.begin(); it != spawnMonsterMap.end(); ++it) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7a3b360e543571599cfa169a1f4fef6ef8d5eed99436fac7e82308d44bf4da3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 199, + "startColumn": 3, + "charOffset": 6417, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 197, + "startColumn": 3, + "charOffset": 6299, + "charLength": 3, + "snippet": { + "text": "void SpawnMonster::startup(bool delayed) {\n\tif (g_configManager().getBoolean(RANDOM_MONSTER_SPAWN, __FUNCTION__)) {\n\t\tfor (auto it = spawnMonsterMap.begin(); it != spawnMonsterMap.end(); ++it) {\n\t\t\tauto &[spawnMonsterId, sb] = *it;\n\t\t\tfor (auto &[monsterType, weight] : sb.monsterTypes) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f3244b65d9be4839eb8a20279e26ac46bca6dfe1b3390bccf117ec851ae84e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 199, + "startColumn": 43, + "charOffset": 6457, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 197, + "startColumn": 43, + "charOffset": 6299, + "charLength": 2, + "snippet": { + "text": "void SpawnMonster::startup(bool delayed) {\n\tif (g_configManager().getBoolean(RANDOM_MONSTER_SPAWN, __FUNCTION__)) {\n\t\tfor (auto it = spawnMonsterMap.begin(); it != spawnMonsterMap.end(); ++it) {\n\t\t\tauto &[spawnMonsterId, sb] = *it;\n\t\t\tfor (auto &[monsterType, weight] : sb.monsterTypes) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5aade596cdd495ed863190b914b8052b02ca8635417d62e55c7990ec6b2e63ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 205, + "startColumn": 5, + "charOffset": 6646, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 203, + "startColumn": 5, + "charOffset": 6621, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tfor (auto otherIt = std::next(it); otherIt != spawnMonsterMap.end(); ++otherIt) {\n\t\t\t\t\tauto &[id, otherSb] = *otherIt;\n\t\t\t\t\tif (id == spawnMonsterId) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d119a12648e9c48b605efc08af6b74b98e3d191fe24f777d0a6fe7199ff14ae4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 205, + "startColumn": 5, + "charOffset": 6646, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 203, + "startColumn": 5, + "charOffset": 6621, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tfor (auto otherIt = std::next(it); otherIt != spawnMonsterMap.end(); ++otherIt) {\n\t\t\t\t\tauto &[id, otherSb] = *otherIt;\n\t\t\t\t\tif (id == spawnMonsterId) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46be198dbe228ef6f109ed7011d47ddca713e751535dcc64704c6acf2c8eb626" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'otherIt' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 205, + "startColumn": 40, + "charOffset": 6681, + "charLength": 7, + "snippet": { + "text": "otherIt" + } + }, + "contextRegion": { + "startLine": 203, + "startColumn": 40, + "charOffset": 6621, + "charLength": 7, + "snippet": { + "text": "\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tfor (auto otherIt = std::next(it); otherIt != spawnMonsterMap.end(); ++otherIt) {\n\t\t\t\t\tauto &[id, otherSb] = *otherIt;\n\t\t\t\t\tif (id == spawnMonsterId) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3152f0c602dc0227db6a9e88bf9effbe5b18a524a2811665f2c53f0596668dcf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 216, + "startColumn": 27, + "charOffset": 7013, + "charLength": 7, + "snippet": { + "text": "emplace" + } + }, + "contextRegion": { + "startLine": 214, + "startColumn": 27, + "charOffset": 6929, + "charLength": 7, + "snippet": { + "text": "\t\t\t\t\t\tweight += otherSb.monsterTypes[monsterType];\n\t\t\t\t\t}\n\t\t\t\t\totherSb.monsterTypes.emplace(monsterType, weight);\n\t\t\t\t\tsb.monsterTypes.emplace(monsterType, weight);\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a26d285283620b236639625a4199e79e18ac581dcbf15502821f803655324916" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 217, + "startColumn": 22, + "charOffset": 7064, + "charLength": 7, + "snippet": { + "text": "emplace" + } + }, + "contextRegion": { + "startLine": 215, + "startColumn": 22, + "charOffset": 6980, + "charLength": 7, + "snippet": { + "text": "\t\t\t\t\t}\n\t\t\t\t\totherSb.monsterTypes.emplace(monsterType, weight);\n\t\t\t\t\tsb.monsterTypes.emplace(monsterType, weight);\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d034a351577aa6287ec71dfacfe666e33ba23011df7b557e7b8d35efd050ae3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 222, + "startColumn": 2, + "charOffset": 7113, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 220, + "startColumn": 2, + "charOffset": 7105, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t}\n\tfor (auto &[spawnMonsterId, sb] : spawnMonsterMap) {\n\t\tconst auto &mType = sb.getMonsterType();\n\t\tif (!mType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44607a1e0b76c30eb36c7551a6e8c4d4dee1be822ab69278a827133aa372f47e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 224, + "startColumn": 7, + "charOffset": 7215, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 222, + "startColumn": 7, + "charOffset": 7112, + "charLength": 1, + "snippet": { + "text": "\tfor (auto &[spawnMonsterId, sb] : spawnMonsterMap) {\n\t\tconst auto &mType = sb.getMonsterType();\n\t\tif (!mType) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efc7bafb9da393d3e7f08d304841ab0bd54e1c7e9ca33f92524e7768fdf4598a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 243, + "startColumn": 2, + "charOffset": 7612, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 2, + "charOffset": 7598, + "charLength": 3, + "snippet": { + "text": "\tcleanup();\n\n\tfor (auto &[spawnMonsterId, sb] : spawnMonsterMap) {\n\t\tif (spawnedMonsterMap.contains(spawnMonsterId)) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fbb1ef399cf4137119c3fe0ddae57adb5db757b5c08370a1268d0794508733af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 249, + "startColumn": 7, + "charOffset": 7784, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 247, + "startColumn": 7, + "charOffset": 7734, + "charLength": 1, + "snippet": { + "text": "\n\t\tconst auto &mType = sb.getMonsterType();\n\t\tif (!mType) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83571771b49ef7bab275673a976b603f33f041239f09fa1c04f79ca256b6b52e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 261, + "startColumn": 4, + "charOffset": 8050, + "charLength": 12, + "snippet": { + "text": "spawnMonster" + } + }, + "contextRegion": { + "startLine": 259, + "startColumn": 4, + "charOffset": 8013, + "charLength": 12, + "snippet": { + "text": "\n\t\tif (mType->info.isBlockable) {\n\t\t\tspawnMonster(spawnMonsterId, sb, mType);\n\t\t} else {\n\t\t\tscheduleSpawn(spawnMonsterId, sb, mType, 3 * NONBLOCKABLE_SPAWN_MONSTER_INTERVAL);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f02c8eff0c1e4d04ccceef2ef5e453406dcd69e0d746150ab050a1135973da89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 268, + "startColumn": 28, + "charOffset": 8281, + "charLength": 12, + "snippet": { + "text": "g_dispatcher" + } + }, + "contextRegion": { + "startLine": 266, + "startColumn": 28, + "charOffset": 8195, + "charLength": 12, + "snippet": { + "text": "\n\tif (spawnedMonsterMap.size() < spawnMonsterMap.size()) {\n\t\tcheckSpawnMonsterEvent = g_dispatcher().scheduleEvent(\n\t\t\tgetInterval(), [this] { checkSpawnMonster(); }, \"SpawnMonster::checkSpawnMonster\"\n\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0d780e509d2eec50488cad82c7554d681d8297c82133ce327d489f01cfbf2df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'mType' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 274, + "startColumn": 112, + "charOffset": 8518, + "charLength": 5, + "snippet": { + "text": "mType" + } + }, + "contextRegion": { + "startLine": 272, + "startColumn": 112, + "charOffset": 8404, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid SpawnMonster::scheduleSpawn(uint32_t spawnMonsterId, spawnBlock_t &sb, const std::shared_ptr mType, uint16_t interval, bool startup /*= false*/) {\n\tif (interval <= 0) {\n\t\tspawnMonster(spawnMonsterId, sb, mType, startup);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df646929ddc62869a8abc6d23a5ee322673cff062a4568a41a91d2be612a9784" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 276, + "startColumn": 3, + "charOffset": 8596, + "charLength": 12, + "snippet": { + "text": "spawnMonster" + } + }, + "contextRegion": { + "startLine": 274, + "startColumn": 3, + "charOffset": 8407, + "charLength": 12, + "snippet": { + "text": "void SpawnMonster::scheduleSpawn(uint32_t spawnMonsterId, spawnBlock_t &sb, const std::shared_ptr mType, uint16_t interval, bool startup /*= false*/) {\n\tif (interval <= 0) {\n\t\tspawnMonster(spawnMonsterId, sb, mType, startup);\n\t} else {\n\t\tg_game().addMagicEffect(sb.pos, CONST_ME_TELEPORT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe69493dbb5939a41ec511d23fe1766b7c621c51687d93aab4255caa9353f916" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 279, + "startColumn": 18, + "charOffset": 8727, + "charLength": 13, + "snippet": { + "text": "scheduleEvent" + } + }, + "contextRegion": { + "startLine": 277, + "startColumn": 18, + "charOffset": 8646, + "charLength": 13, + "snippet": { + "text": "\t} else {\n\t\tg_game().addMagicEffect(sb.pos, CONST_ME_TELEPORT);\n\t\tg_dispatcher().scheduleEvent(\n\t\t\tNONBLOCKABLE_SPAWN_MONSTER_INTERVAL, [=, this, &sb] { scheduleSpawn(spawnMonsterId, sb, mType, interval - NONBLOCKABLE_SPAWN_MONSTER_INTERVAL, startup); }, \"SpawnMonster::scheduleSpawn\"\n\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86b166404958118613ef48fbef768699b222db9cf8ba7528547ca618eba294f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-misleading-capture-default-by-value", + "ruleIndex": 494, + "kind": "fail", + "level": "warning", + "message": { + "text": "lambdas that capture 'this' should not specify a by-value capture default" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 280, + "startColumn": 42, + "charOffset": 8783, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 278, + "startColumn": 42, + "charOffset": 8656, + "charLength": 1, + "snippet": { + "text": "\t\tg_game().addMagicEffect(sb.pos, CONST_ME_TELEPORT);\n\t\tg_dispatcher().scheduleEvent(\n\t\t\tNONBLOCKABLE_SPAWN_MONSTER_INTERVAL, [=, this, &sb] { scheduleSpawn(spawnMonsterId, sb, mType, interval - NONBLOCKABLE_SPAWN_MONSTER_INTERVAL, startup); }, \"SpawnMonster::scheduleSpawn\"\n\t\t);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c34addbea570d65ee0f0c55e790c94b14fca229c5299c08284d413de548de941" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 280, + "startColumn": 99, + "charOffset": 8840, + "charLength": 8, + "snippet": { + "text": "interval" + } + }, + "contextRegion": { + "startLine": 278, + "startColumn": 99, + "charOffset": 8656, + "charLength": 8, + "snippet": { + "text": "\t\tg_game().addMagicEffect(sb.pos, CONST_ME_TELEPORT);\n\t\tg_dispatcher().scheduleEvent(\n\t\t\tNONBLOCKABLE_SPAWN_MONSTER_INTERVAL, [=, this, &sb] { scheduleSpawn(spawnMonsterId, sb, mType, interval - NONBLOCKABLE_SPAWN_MONSTER_INTERVAL, startup); }, \"SpawnMonster::scheduleSpawn\"\n\t\t);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25e4d1fa2ec6926b749ea76d32151b2c3a2db68b8b6be57bfa900a520994e924" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 287, + "startColumn": 2, + "charOffset": 9009, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 285, + "startColumn": 2, + "charOffset": 8942, + "charLength": 3, + "snippet": { + "text": "void SpawnMonster::cleanup() {\n\tstd::vector removeList;\n\tfor (const auto &[spawnMonsterId, monster] : spawnedMonsterMap) {\n\t\tif (monster == nullptr || monster->isRemoved()) {\n\t\t\tremoveList.push_back(spawnMonsterId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae7a81ea20f89ba3e2e0aa1312471422e49c3cdb4e87a5f8ef4ca8be2f8a7b9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 292, + "startColumn": 2, + "charOffset": 9176, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 290, + "startColumn": 2, + "charOffset": 9168, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t}\n\tfor (const auto &spawnMonsterId : removeList) {\n\t\tspawnMonsterMap[spawnMonsterId].lastSpawn = OTSYS_TIME();\n\t\tspawnedMonsterMap.erase(spawnMonsterId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03494f3a365864fa7b337ec2a023f550a613be0718537f0d614dd708bcdfa675" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 294, + "startColumn": 21, + "charOffset": 9304, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 292, + "startColumn": 21, + "charOffset": 9175, + "charLength": 5, + "snippet": { + "text": "\tfor (const auto &spawnMonsterId : removeList) {\n\t\tspawnMonsterMap[spawnMonsterId].lastSpawn = OTSYS_TIME();\n\t\tspawnedMonsterMap.erase(spawnMonsterId);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc3a37d746a8e755b5a351ab1bbca26ede73bb44fd04a152efe193cdaf7fc84d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'addMonster' of similar type ('uint32_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 298, + "startColumn": 92, + "charOffset": 9424, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 296, + "startColumn": 92, + "charOffset": 9330, + "charLength": 8, + "snippet": { + "text": "}\n\nbool SpawnMonster::addMonster(const std::string &name, const Position &pos, Direction dir, uint32_t scheduleInterval, uint32_t weight /*= 1*/) {\n\tstd::string variant;\n\tfor (const auto &zone : Zone::getZones(pos)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d291b8fef0e83c4683ec4249cc796365fe73e2c7a4cf2af88dfca9a37f72483" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 300, + "startColumn": 2, + "charOffset": 9501, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 298, + "startColumn": 2, + "charOffset": 9333, + "charLength": 3, + "snippet": { + "text": "bool SpawnMonster::addMonster(const std::string &name, const Position &pos, Direction dir, uint32_t scheduleInterval, uint32_t weight /*= 1*/) {\n\tstd::string variant;\n\tfor (const auto &zone : Zone::getZones(pos)) {\n\t\tif (!zone->getMonsterVariant().empty()) {\n\t\t\tvariant = zone->getMonsterVariant() + \"|\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10483a4c1820566fc21cd5caa6246d38d5eaa139420243cd284978ae8ea37ab9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 307, + "startColumn": 6, + "charOffset": 9731, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 305, + "startColumn": 6, + "charOffset": 9652, + "charLength": 1, + "snippet": { + "text": "\t}\n\tconst auto monsterType = g_monsters().getMonsterType(variant + name);\n\tif (!monsterType) {\n\t\tg_logger().error(\"Can not find {}\", name);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01e7dc187cb08132cbb596266c280aef73c8887146a439278212fbe4ee4e203f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 319, + "startColumn": 40, + "charOffset": 10190, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 317, + "startColumn": 40, + "charOffset": 10025, + "charLength": 3, + "snippet": { + "text": "\t}\n\t// eventschedule is a whole percentage, so we need to multiply by 100 to match the order of magnitude of the other values\n\tscheduleInterval = scheduleInterval * 100 / std::max((uint32_t)1, (g_configManager().getNumber(RATE_SPAWN, __FUNCTION__) * boostedrate * eventschedule));\n\tif (scheduleInterval < MONSTER_MINSPAWN_INTERVAL) {\n\t\tg_logger().warn(\"[SpawnsMonster::addMonster] - {} {} spawntime cannot be less than {} seconds, set to {} by default.\", name, pos.toString(), MONSTER_MINSPAWN_INTERVAL / 1000, MONSTER_MINSPAWN_INTERVAL / 1000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a21aee941c052c7c4165a10e8132ed74522901f16c010dae44f3abde5b6d2516" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 319, + "startColumn": 55, + "charOffset": 10205, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 317, + "startColumn": 55, + "charOffset": 10025, + "charLength": 1, + "snippet": { + "text": "\t}\n\t// eventschedule is a whole percentage, so we need to multiply by 100 to match the order of magnitude of the other values\n\tscheduleInterval = scheduleInterval * 100 / std::max((uint32_t)1, (g_configManager().getNumber(RATE_SPAWN, __FUNCTION__) * boostedrate * eventschedule));\n\tif (scheduleInterval < MONSTER_MINSPAWN_INTERVAL) {\n\t\tg_logger().warn(\"[SpawnsMonster::addMonster] - {} {} spawntime cannot be less than {} seconds, set to {} by default.\", name, pos.toString(), MONSTER_MINSPAWN_INTERVAL / 1000, MONSTER_MINSPAWN_INTERVAL / 1000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29ab6c25b1eef3a18ce3bb1df18c32d18a6ae9ad59e648a06ee7fa933bfc4d3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 320, + "startColumn": 2, + "charOffset": 10307, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 318, + "startColumn": 2, + "charOffset": 10028, + "charLength": 2, + "snippet": { + "text": "\t// eventschedule is a whole percentage, so we need to multiply by 100 to match the order of magnitude of the other values\n\tscheduleInterval = scheduleInterval * 100 / std::max((uint32_t)1, (g_configManager().getNumber(RATE_SPAWN, __FUNCTION__) * boostedrate * eventschedule));\n\tif (scheduleInterval < MONSTER_MINSPAWN_INTERVAL) {\n\t\tg_logger().warn(\"[SpawnsMonster::addMonster] - {} {} spawntime cannot be less than {} seconds, set to {} by default.\", name, pos.toString(), MONSTER_MINSPAWN_INTERVAL / 1000, MONSTER_MINSPAWN_INTERVAL / 1000);\n\t\tscheduleInterval = MONSTER_MINSPAWN_INTERVAL;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2585f54cf2d541f9313daaeb12f0e5cd34e32b5135f2f0ef70ba4aca53da3e4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 321, + "startColumn": 172, + "charOffset": 10530, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 319, + "startColumn": 172, + "charOffset": 10151, + "charLength": 4, + "snippet": { + "text": "\tscheduleInterval = scheduleInterval * 100 / std::max((uint32_t)1, (g_configManager().getNumber(RATE_SPAWN, __FUNCTION__) * boostedrate * eventschedule));\n\tif (scheduleInterval < MONSTER_MINSPAWN_INTERVAL) {\n\t\tg_logger().warn(\"[SpawnsMonster::addMonster] - {} {} spawntime cannot be less than {} seconds, set to {} by default.\", name, pos.toString(), MONSTER_MINSPAWN_INTERVAL / 1000, MONSTER_MINSPAWN_INTERVAL / 1000);\n\t\tscheduleInterval = MONSTER_MINSPAWN_INTERVAL;\n\t} else if (scheduleInterval > MONSTER_MAXSPAWN_INTERVAL) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24c423c36d29ba87f020432136186266b04cc8b299a70485789d5d5889e9b46f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 321, + "startColumn": 206, + "charOffset": 10564, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 319, + "startColumn": 206, + "charOffset": 10151, + "charLength": 4, + "snippet": { + "text": "\tscheduleInterval = scheduleInterval * 100 / std::max((uint32_t)1, (g_configManager().getNumber(RATE_SPAWN, __FUNCTION__) * boostedrate * eventschedule));\n\tif (scheduleInterval < MONSTER_MINSPAWN_INTERVAL) {\n\t\tg_logger().warn(\"[SpawnsMonster::addMonster] - {} {} spawntime cannot be less than {} seconds, set to {} by default.\", name, pos.toString(), MONSTER_MINSPAWN_INTERVAL / 1000, MONSTER_MINSPAWN_INTERVAL / 1000);\n\t\tscheduleInterval = MONSTER_MINSPAWN_INTERVAL;\n\t} else if (scheduleInterval > MONSTER_MAXSPAWN_INTERVAL) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a658b5dd62d4568c8f8e486bd75b5ecc5989bcc069119174e0c924ed9adc256" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 324, + "startColumn": 172, + "charOffset": 10850, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 322, + "startColumn": 172, + "charOffset": 10571, + "charLength": 4, + "snippet": { + "text": "\t\tscheduleInterval = MONSTER_MINSPAWN_INTERVAL;\n\t} else if (scheduleInterval > MONSTER_MAXSPAWN_INTERVAL) {\n\t\tg_logger().warn(\"[SpawnsMonster::addMonster] - {} {} spawntime can not be more than {} seconds, set to {} by default\", name, pos.toString(), MONSTER_MAXSPAWN_INTERVAL / 1000, MONSTER_MAXSPAWN_INTERVAL / 1000);\n\t\tscheduleInterval = MONSTER_MAXSPAWN_INTERVAL;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "582cb16e916a8383fcffc2cfd92faa96d981fc7d112a8242db51de24fa2b78c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 324, + "startColumn": 206, + "charOffset": 10884, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 322, + "startColumn": 206, + "charOffset": 10571, + "charLength": 4, + "snippet": { + "text": "\t\tscheduleInterval = MONSTER_MINSPAWN_INTERVAL;\n\t} else if (scheduleInterval > MONSTER_MAXSPAWN_INTERVAL) {\n\t\tg_logger().warn(\"[SpawnsMonster::addMonster] - {} {} spawntime can not be more than {} seconds, set to {} by default\", name, pos.toString(), MONSTER_MAXSPAWN_INTERVAL / 1000, MONSTER_MAXSPAWN_INTERVAL / 1000);\n\t\tscheduleInterval = MONSTER_MAXSPAWN_INTERVAL;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa292409708fd06aabc0889c4c0ad3c0378e79f115a0bebacaeb5b2d32717854" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 331, + "startColumn": 2, + "charOffset": 11090, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 329, + "startColumn": 2, + "charOffset": 11005, + "charLength": 3, + "snippet": { + "text": "\tspawnBlock_t* sb = nullptr;\n\tuint32_t spawnMonsterId = spawnMonsterMap.size() + 1;\n\tfor (auto &[id, maybeSb] : spawnMonsterMap) {\n\t\tif (maybeSb.pos == pos) {\n\t\t\tsb = &maybeSb;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d44f9f19cf4ae69c1c9a24367c92c85e750d0f78d9dc90642e9fa0ebb3784ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 338, + "startColumn": 6, + "charOffset": 11228, + "charLength": 2, + "snippet": { + "text": "sb" + } + }, + "contextRegion": { + "startLine": 336, + "startColumn": 6, + "charOffset": 11216, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\t}\n\tif (sb) {\n\t\tif (sb->monsterTypes.contains(monsterType)) {\n\t\t\tg_logger().error(\"[SpawnMonster] Monster {} already exists in spawn block at {}\", name, pos.toString());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "020cd15f3cb156271b7ec02a44ebb6f928d5c40c185973013f9b8913f6ef2634" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'spawnBlock_t *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 338, + "startColumn": 6, + "charOffset": 11228, + "charLength": 2, + "snippet": { + "text": "sb" + } + }, + "contextRegion": { + "startLine": 336, + "startColumn": 6, + "charOffset": 11216, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\t}\n\tif (sb) {\n\t\tif (sb->monsterTypes.contains(monsterType)) {\n\t\t\tg_logger().error(\"[SpawnMonster] Monster {} already exists in spawn block at {}\", name, pos.toString());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0e558efa7d1b9ab32346d993e2ec83029c6870a23b3d043221d89869f0eb0e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 352, + "startColumn": 6, + "charOffset": 11797, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 350, + "startColumn": 6, + "charOffset": 11785, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\t}\n\tif (!sb) {\n\t\tsb = &spawnMonsterMap.emplace(spawnMonsterId, spawnBlock_t()).first->second;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "785c6045012e022d202a16469a17d2d615c6a449497bb73597927a3dbcf8cbab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'spawnBlock_t *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 352, + "startColumn": 7, + "charOffset": 11798, + "charLength": 2, + "snippet": { + "text": "sb" + } + }, + "contextRegion": { + "startLine": 350, + "startColumn": 7, + "charOffset": 11785, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\t}\n\tif (!sb) {\n\t\tsb = &spawnMonsterMap.emplace(spawnMonsterId, spawnBlock_t()).first->second;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3134f950b63c577778762cff064b18c62f39649cb41da3abb76f525ad7d155e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 355, + "startColumn": 19, + "charOffset": 11904, + "charLength": 7, + "snippet": { + "text": "emplace" + } + }, + "contextRegion": { + "startLine": 353, + "startColumn": 19, + "charOffset": 11804, + "charLength": 7, + "snippet": { + "text": "\t\tsb = &spawnMonsterMap.emplace(spawnMonsterId, spawnBlock_t()).first->second;\n\t}\n\tsb->monsterTypes.emplace(monsterType, weight);\n\tsb->pos = pos;\n\tsb->direction = dir;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "679e05bbf678aa02f00fe47939b7391f268cc636f67ad9992e8c9b99adc77628" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 363, + "startColumn": 59, + "charOffset": 12101, + "charLength": 7, + "snippet": { + "text": "monster" + } + }, + "contextRegion": { + "startLine": 361, + "startColumn": 59, + "charOffset": 12040, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid SpawnMonster::removeMonster(std::shared_ptr monster) {\n\tuint32_t spawnMonsterId = 0;\n\tfor (const auto &[id, m] : spawnedMonsterMap) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2dbc7ca490ea773de472c712b7a6c43efc8a1791193cf21a5d1d1d8c223730ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 365, + "startColumn": 2, + "charOffset": 12143, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 363, + "startColumn": 2, + "charOffset": 12043, + "charLength": 3, + "snippet": { + "text": "void SpawnMonster::removeMonster(std::shared_ptr monster) {\n\tuint32_t spawnMonsterId = 0;\n\tfor (const auto &[id, m] : spawnedMonsterMap) {\n\t\tif (m == monster) {\n\t\t\tspawnMonsterId = id;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d69b413457c158a4790f04352f97478b705ac1542812c5555f80e9a6baa91dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 371, + "startColumn": 20, + "charOffset": 12273, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 369, + "startColumn": 20, + "charOffset": 12247, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\t}\n\tspawnedMonsterMap.erase(spawnMonsterId);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d255eecb26d02112ce27e96ddcd84cb9951293adf7d8459d8ad9696e943d748" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 382, + "startColumn": 3, + "charOffset": 12574, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 380, + "startColumn": 3, + "charOffset": 12461, + "charLength": 3, + "snippet": { + "text": "\tfor (auto &it : spawnMonsterMap) {\n\t\tstd::unordered_map, uint32_t> monsterTypes;\n\t\tfor (const auto &[monsterType, weight] : it.second.monsterTypes) {\n\t\t\tif (!monsterType || monsterType->typeName.empty()) {\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e79cf590736eefcdafca25d3008173cc989831d8358432ee2355cd7ee027c9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 383, + "startColumn": 8, + "charOffset": 12648, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 381, + "startColumn": 8, + "charOffset": 12497, + "charLength": 1, + "snippet": { + "text": "\t\tstd::unordered_map, uint32_t> monsterTypes;\n\t\tfor (const auto &[monsterType, weight] : it.second.monsterTypes) {\n\t\t\tif (!monsterType || monsterType->typeName.empty()) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83571771b49ef7bab275673a976b603f33f041239f09fa1c04f79ca256b6b52e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 389, + "startColumn": 18, + "charOffset": 12886, + "charLength": 7, + "snippet": { + "text": "emplace" + } + }, + "contextRegion": { + "startLine": 387, + "startColumn": 18, + "charOffset": 12777, + "charLength": 7, + "snippet": { + "text": "\t\t\tauto variantType = g_monsters().getMonsterType(variantName, true);\n\t\t\tif (variantType) {\n\t\t\t\tmonsterTypes.emplace(variantType, weight);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3a55f90be76b9d26d90efa7fb7c140f8bed162d9c50964a7b2133cf95fbb830" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 408, + "startColumn": 2, + "charOffset": 13275, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 406, + "startColumn": 2, + "charOffset": 13244, + "charLength": 3, + "snippet": { + "text": "\t}\n\tuint32_t totalWeight = 0;\n\tfor (const auto &[mType, weight] : monsterTypes) {\n\t\tif (!mType) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61d571734cca0e42953232c3dccb9a97828d17b1594b26e265ae013fb5e83a5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 409, + "startColumn": 7, + "charOffset": 13332, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 407, + "startColumn": 7, + "charOffset": 13247, + "charLength": 1, + "snippet": { + "text": "\tuint32_t totalWeight = 0;\n\tfor (const auto &[mType, weight] : monsterTypes) {\n\t\tif (!mType) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4789edae33ddb9a367e4bd476d892fd16e25f474e0f0eaddc67b0e11b1b341a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 420, + "startColumn": 44, + "charOffset": 13655, + "charLength": 11, + "snippet": { + "text": "totalWeight" + } + }, + "contextRegion": { + "startLine": 418, + "startColumn": 44, + "charOffset": 13584, + "charLength": 11, + "snippet": { + "text": "\t\ttotalWeight += weight;\n\t}\n\tuint32_t randomWeight = uniform_random(0, totalWeight - 1);\n\t// order monsters by weight DESC\n\tstd::vector, uint32_t>> orderedMonsterTypes(monsterTypes.begin(), monsterTypes.end());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe10ede92463c89b9948e07ddf51b96298441e89bb03d9ddb33805e8af6bdaa3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.cpp" + }, + "region": { + "startLine": 426, + "startColumn": 2, + "charOffset": 13972, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 424, + "startColumn": 2, + "charOffset": 13936, + "charLength": 3, + "snippet": { + "text": "\t\treturn a.second > b.second;\n\t});\n\tfor (const auto &[mType, weight] : orderedMonsterTypes) {\n\t\tif (randomWeight < weight) {\n\t\t\treturn mType;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1aca3323772f38e6e76ce59ef0dae10879dab1f725103a07c4ca019ed1ee610" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'SpawnMonster::scheduleSpawn' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/monsters/spawns/spawn_monster.hpp", + "index": 1 + }, + "region": { + "startLine": 95, + "startColumn": 7, + "charOffset": 2685, + "charLength": 13, + "snippet": { + "text": "scheduleSpawn" + } + }, + "contextRegion": { + "startLine": 93, + "startColumn": 7, + "charOffset": 2525, + "charLength": 13, + "snippet": { + "text": "\tbool spawnMonster(uint32_t spawnMonsterId, spawnBlock_t &sb, std::shared_ptr monsterType, bool startup = false);\n\tvoid checkSpawnMonster();\n\tvoid scheduleSpawn(uint32_t spawnMonsterId, spawnBlock_t &sb, std::shared_ptr monsterType, uint16_t interval, bool startup = false);\n};\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1bf430ded281d8ce84642326e86f691dfb9952fb61fbf83f20d727afa72eff8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_classification_functions.cpp" + }, + "region": { + "startLine": 19, + "startColumn": 7, + "charOffset": 730, + "charLength": 18, + "snippet": { + "text": "itemClassification" + } + }, + "contextRegion": { + "startLine": 17, + "startColumn": 7, + "charOffset": 586, + "charLength": 18, + "snippet": { + "text": "\tif (isNumber(L, 2)) {\n\t\tconst ItemClassification* itemClassification = g_game().getItemsClassification(getNumber(L, 2), false);\n\t\tif (itemClassification) {\n\t\t\tpushUserdata(L, itemClassification);\n\t\t\tsetMetatable(L, -1, \"ItemClassification\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1c6d469dbeb0040dceb6a9623aab3e93af9c81f3e1203244e0f0f41341d50b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemClassification *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_classification_functions.cpp" + }, + "region": { + "startLine": 19, + "startColumn": 7, + "charOffset": 730, + "charLength": 18, + "snippet": { + "text": "itemClassification" + } + }, + "contextRegion": { + "startLine": 17, + "startColumn": 7, + "charOffset": 586, + "charLength": 18, + "snippet": { + "text": "\tif (isNumber(L, 2)) {\n\t\tconst ItemClassification* itemClassification = g_game().getItemsClassification(getNumber(L, 2), false);\n\t\tif (itemClassification) {\n\t\t\tpushUserdata(L, itemClassification);\n\t\t\tsetMetatable(L, -1, \"ItemClassification\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "994e3979913bd95a8b72a4eecfefc5439177c2c4aec39f3a5acc85a5c8cef27d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_classification_functions.cpp" + }, + "region": { + "startLine": 32, + "startColumn": 2, + "charOffset": 1112, + "charLength": 18, + "snippet": { + "text": "ItemClassification" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 2, + "charOffset": 928, + "charLength": 18, + "snippet": { + "text": "int ItemClassificationFunctions::luaItemClassificationAddTier(lua_State* L) {\n\t// itemClassification:addTier(id, core, regularPrice, convergenceFusionPrice, convergenceTransferPrice)\n\tItemClassification* itemClassification = getUserdata(L, 1);\n\tif (itemClassification) {\n\t\titemClassification->addTier(" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "299ca3501eaaac2f72cffda2729b517a9a55b6cbb274df8fc5501c72935017f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_classification_functions.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 6, + "charOffset": 1197, + "charLength": 18, + "snippet": { + "text": "itemClassification" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 6, + "charOffset": 1006, + "charLength": 18, + "snippet": { + "text": "\t// itemClassification:addTier(id, core, regularPrice, convergenceFusionPrice, convergenceTransferPrice)\n\tItemClassification* itemClassification = getUserdata(L, 1);\n\tif (itemClassification) {\n\t\titemClassification->addTier(\n\t\t\tgetNumber(L, 2)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2bac8bbdb9941e877b6fcdd3bb7c64c3be343ae9ac43dab693d6d9d041f8584" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'ItemClassification *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_classification_functions.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 6, + "charOffset": 1197, + "charLength": 18, + "snippet": { + "text": "itemClassification" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 6, + "charOffset": 1006, + "charLength": 18, + "snippet": { + "text": "\t// itemClassification:addTier(id, core, regularPrice, convergenceFusionPrice, convergenceTransferPrice)\n\tItemClassification* itemClassification = getUserdata(L, 1);\n\tif (itemClassification) {\n\t\titemClassification->addTier(\n\t\t\tgetNumber(L, 2)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "176169d439deb3370d0cd3016185d8ea93c4b562208127fc58ce0ecbcf64bd14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_classification_functions.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 27, + "charOffset": 1364, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 27, + "charOffset": 1279, + "charLength": 1, + "snippet": { + "text": "\t\t\tgetNumber(L, 3),\n\t\t\tgetNumber(L, 4),\n\t\t\tgetNumber(L, 5),\n\t\t\tgetNumber(L, 6)\n\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08dcc65e5cce52eaa5bc0961ccf683ce433e39daecc50bbb6ddb1e7554a65f75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_classification_functions.cpp" + }, + "region": { + "startLine": 39, + "startColumn": 27, + "charOffset": 1394, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 37, + "startColumn": 27, + "charOffset": 1308, + "charLength": 1, + "snippet": { + "text": "\t\t\tgetNumber(L, 4),\n\t\t\tgetNumber(L, 5),\n\t\t\tgetNumber(L, 6)\n\t\t);\n\t\tpushBoolean(L, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b68ff9d1673ebcc6815c9c4beb0b42d5a42e348ab6eb4a31ea84df0590961333" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 6, + "charOffset": 1174, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 6, + "charOffset": 1087, + "charLength": 1, + "snippet": { + "text": "\t// item:getParent()\n\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc0398c0e2c5892c6e2aa1abd2580e0a04206d092407372906cde0a67d03f85f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 51, + "startColumn": 6, + "charOffset": 1277, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 49, + "startColumn": 6, + "charOffset": 1216, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr parent = item->getParent();\n\tif (!parent) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f6226e7551fcafd951be982c3b739e83af12f43b9cccc6d47e8878a03dd462b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 63, + "startColumn": 6, + "charOffset": 1507, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 6, + "charOffset": 1417, + "charLength": 1, + "snippet": { + "text": "\t// item:getTopParent()\n\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35e1f035521aa07734ea6f0ed8c7c23beeefbb11e19a89aa37b1108e6c146e89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 69, + "startColumn": 6, + "charOffset": 1616, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 67, + "startColumn": 6, + "charOffset": 1549, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr topParent = item->getTopParent();\n\tif (!topParent) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c9684cd51afba75891e152245b293bae156a8c0647c2a992c8b6a0a9c1a1996" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 82, + "startColumn": 21, + "charOffset": 1866, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 21, + "charOffset": 1772, + "charLength": 4, + "snippet": { + "text": "\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (item) {\n\t\tlua_pushnumber(L, item->getID());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b56b423075062538a52fb7bf027bb826953587679fb4180cabe13bebd4a9454" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 92, + "startColumn": 6, + "charOffset": 2058, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 90, + "startColumn": 6, + "charOffset": 1975, + "charLength": 1, + "snippet": { + "text": "\t// item:clone()\n\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86b3e0892437dda5a5a0572fbcc71efee2216f92b51e5584ca6afc65f4a848a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 6, + "charOffset": 2152, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 6, + "charOffset": 2100, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr clone = item->clone();\n\tif (!clone) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9656f002af36085d1fc4aa7069d9aa3b9e518bc76cb6cff2496c656b346d2be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 114, + "startColumn": 6, + "charOffset": 2514, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 112, + "startColumn": 6, + "charOffset": 2413, + "charLength": 1, + "snippet": { + "text": "\t// item:split([count = 1])\n\tstd::shared_ptr* itemPtr = getRawUserDataShared(L, 1);\n\tif (!itemPtr) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43604771e2c304254889dc5b27754d22175cc352134dc3dd94ab0ea701287081" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'std::shared_ptr *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 114, + "startColumn": 7, + "charOffset": 2515, + "charLength": 7, + "snippet": { + "text": "itemPtr" + } + }, + "contextRegion": { + "startLine": 112, + "startColumn": 7, + "charOffset": 2413, + "charLength": 7, + "snippet": { + "text": "\t// item:split([count = 1])\n\tstd::shared_ptr* itemPtr = getRawUserDataShared(L, 1);\n\tif (!itemPtr) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca986ab381ae275b6c504cffe93336ea90424c390352cba5b412d8b688681845" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 120, + "startColumn": 6, + "charOffset": 2605, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 6, + "charOffset": 2559, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = *itemPtr;\n\tif (!item || !item->isStackable() || item->isRemoved()) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b5da925ad0dad4626c86c2c4356fd98de3c7c71f173781770c46affce0019fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 126, + "startColumn": 18, + "charOffset": 2800, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 124, + "startColumn": 18, + "charOffset": 2692, + "charLength": 4, + "snippet": { + "text": "\n\tuint16_t count = std::min(getNumber(L, 2, 1), item->getItemCount());\n\tuint16_t diff = item->getItemCount() - count;\n\n\tstd::shared_ptr splitItem = item->clone();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd47291ed560d865d8073a11ef3e16b09d0ddbc2be1e9783dc69ae07d2224f52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 129, + "startColumn": 6, + "charOffset": 2886, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 127, + "startColumn": 6, + "charOffset": 2830, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr splitItem = item->clone();\n\tif (!splitItem) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd09d210c908f33565f40d2dc98c8272ac3fde19149030e6b9ddb2aeadad4088" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 26, + "charOffset": 2959, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 26, + "charOffset": 2930, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tsplitItem->setItemCount(count);\n\n\tScriptEnvironment* env = getScriptEnv();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8f44b26c1a104fc57fd29635ec76645a874087368d2270b709a59db86e2632d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 162, + "startColumn": 3, + "charOffset": 3614, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 160, + "startColumn": 3, + "charOffset": 3538, + "charLength": 7, + "snippet": { + "text": "\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (item) {\n\t\tint32_t count = getNumber(L, 2, -1);\n\t\tpushBoolean(L, g_game().internalRemoveItem(item, count) == RETURNVALUE_NOERROR);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b556a2e85b3c5dbc20da1e459e584dca099ba589e04e6baa580755703a5b108" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 190, + "startColumn": 21, + "charOffset": 4438, + "charLength": 8, + "snippet": { + "text": "actionId" + } + }, + "contextRegion": { + "startLine": 188, + "startColumn": 21, + "charOffset": 4330, + "charLength": 8, + "snippet": { + "text": "\tif (item) {\n\t\tauto actionId = item->getAttribute(ItemAttribute_t::ACTIONID);\n\t\tlua_pushnumber(L, actionId);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "596245695907e47f2ac2ee29a83784dd306a79843988fd92ed88572aca05569f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 214, + "startColumn": 21, + "charOffset": 4994, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 21, + "charOffset": 4900, + "charLength": 4, + "snippet": { + "text": "\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (item) {\n\t\tlua_pushnumber(L, item->getItemCount());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04b2c1c1a7429012530b64c0322fd8cf50aca5096a1d8cd10d0f8e3e3f5a1860" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 225, + "startColumn": 21, + "charOffset": 5231, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 223, + "startColumn": 21, + "charOffset": 5137, + "charLength": 4, + "snippet": { + "text": "\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (item) {\n\t\tlua_pushnumber(L, item->getCharges());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2266ec5d1632367b3e3a129c6631189ec88e6a594b4ac12dc31b32818e4c2be5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 247, + "startColumn": 21, + "charOffset": 5766, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 245, + "startColumn": 21, + "charOffset": 5672, + "charLength": 4, + "snippet": { + "text": "\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (item) {\n\t\tlua_pushnumber(L, item->getWeight());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a47fb43340b81e13c47c0f86ac350aaef2e263616466416c4d7c072b5137f475" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 258, + "startColumn": 21, + "charOffset": 6000, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 256, + "startColumn": 21, + "charOffset": 5906, + "charLength": 4, + "snippet": { + "text": "\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (item) {\n\t\tlua_pushnumber(L, item->getSubType());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7fa323e13071b186ac27bcf0432d8a4c5400474dfaf4fe4ef64bdf0cc4246ec7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 312, + "startColumn": 6, + "charOffset": 7130, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 310, + "startColumn": 6, + "charOffset": 7045, + "charLength": 1, + "snippet": { + "text": "\t// item:getTile()\n\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1cef091f5d6fcbff8b938fef91be2a951d85ef9862816bf072e159b91d392f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 330, + "startColumn": 6, + "charOffset": 7488, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 328, + "startColumn": 6, + "charOffset": 7395, + "charLength": 1, + "snippet": { + "text": "\t// item:hasAttribute(key)\n\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b99484cd2611ced3624a7ec6b5007f2423c819da12da2d360bfd72a3217e7255" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'attribute' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 335, + "startColumn": 18, + "charOffset": 7548, + "charLength": 9, + "snippet": { + "text": "attribute" + } + }, + "contextRegion": { + "startLine": 333, + "startColumn": 18, + "charOffset": 7527, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tItemAttribute_t attribute;\n\tif (isNumber(L, 2)) {\n\t\tattribute = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c19b2b22e068181bacd25b3145419f6a29f584ef97b02d16452b07a8fda261bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 351, + "startColumn": 6, + "charOffset": 7975, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 349, + "startColumn": 6, + "charOffset": 7882, + "charLength": 1, + "snippet": { + "text": "\t// item:getAttribute(key)\n\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac85e43b296ff4cd6978e4cb6075a52dea45216d42201ea9d7cf92375c857a69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'attribute' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 356, + "startColumn": 18, + "charOffset": 8035, + "charLength": 9, + "snippet": { + "text": "attribute" + } + }, + "contextRegion": { + "startLine": 354, + "startColumn": 18, + "charOffset": 8014, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tItemAttribute_t attribute;\n\tif (isNumber(L, 2)) {\n\t\tattribute = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "064c2f7029cdad865321a2a016e88095f054dbcccb376af1ec2b432dae6c1cfc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 383, + "startColumn": 6, + "charOffset": 8827, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 381, + "startColumn": 6, + "charOffset": 8727, + "charLength": 1, + "snippet": { + "text": "\t// item:setAttribute(key, value)\n\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36eaf251c8b1e14a5de4586a0cd0d634c6188c527b148eb52be62d1272ba02bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'attribute' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 388, + "startColumn": 18, + "charOffset": 8887, + "charLength": 9, + "snippet": { + "text": "attribute" + } + }, + "contextRegion": { + "startLine": 386, + "startColumn": 18, + "charOffset": 8866, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tItemAttribute_t attribute;\n\tif (isNumber(L, 2)) {\n\t\tattribute = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fab0775e701930cf3e26a432999a8334595f1d5660f33d820070903dc71f6440" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 399, + "startColumn": 4, + "charOffset": 9174, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 397, + "startColumn": 4, + "charOffset": 9104, + "charLength": 4, + "snippet": { + "text": "\tif (item->isAttributeInteger(attribute)) {\n\t\tswitch (attribute) {\n\t\t\tcase ItemAttribute_t::DECAYSTATE: {\n\t\t\t\tif (ItemDecayState_t decayState = getNumber(L, 3);\n\t\t\t\t decayState == DECAYING_FALSE || decayState == DECAYING_STOPPING) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e1a778d9eae2bb7c854d37f5db3d0783d8b281872c3665af59621032c909413" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 409, + "startColumn": 4, + "charOffset": 9490, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 407, + "startColumn": 4, + "charOffset": 9468, + "charLength": 4, + "snippet": { + "text": "\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tcase ItemAttribute_t::DURATION: {\n\t\t\t\titem->setDecaying(DECAYING_PENDING);\n\t\t\t\titem->setDuration(getNumber(L, 3));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54b242cdc4a1e1a11dc7421c2eaacfc01336bb635029fa256090bfa6e6a7ee79" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 416, + "startColumn": 4, + "charOffset": 9694, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 414, + "startColumn": 4, + "charOffset": 9672, + "charLength": 4, + "snippet": { + "text": "\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tcase ItemAttribute_t::DURATION_TIMESTAMP: {\n\t\t\t\treportErrorFunc(\"Attempt to set protected key \\\"duration timestamp\\\"\");\n\t\t\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98316fa6e2b17dea8e6a02bebaa1e73244247ca15ef77cb303cfd35ed8eb4805" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 417, + "startColumn": 5, + "charOffset": 9742, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 415, + "startColumn": 5, + "charOffset": 9686, + "charLength": 15, + "snippet": { + "text": "\t\t\t}\n\t\t\tcase ItemAttribute_t::DURATION_TIMESTAMP: {\n\t\t\t\treportErrorFunc(\"Attempt to set protected key \\\"duration timestamp\\\"\");\n\t\t\t\tpushBoolean(L, false);\n\t\t\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ab017e37008557e8210ac2e4320d0256f4d62f885a00fd6d3fdf28cbea0ee4d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 442, + "startColumn": 6, + "charOffset": 10396, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 440, + "startColumn": 6, + "charOffset": 10300, + "charLength": 1, + "snippet": { + "text": "\t// item:removeAttribute(key)\n\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a726ae43a573541f24a02fda2712e680145d10502a4a96d67e71fadc7e0a636" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'attribute' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 447, + "startColumn": 18, + "charOffset": 10456, + "charLength": 9, + "snippet": { + "text": "attribute" + } + }, + "contextRegion": { + "startLine": 445, + "startColumn": 18, + "charOffset": 10435, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tItemAttribute_t attribute;\n\tif (isNumber(L, 2)) {\n\t\tattribute = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7404cb5845bea04afe5659b13f75e6b1d634a3f5d2318e59a93452e07759292f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 462, + "startColumn": 4, + "charOffset": 10863, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 460, + "startColumn": 4, + "charOffset": 10812, + "charLength": 15, + "snippet": { + "text": "\t\t\titem->removeAttribute(attribute);\n\t\t} else {\n\t\t\treportErrorFunc(\"Attempt to erase protected key \\\"duration timestamp\\\"\");\n\t\t}\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b8cc241d8eb02418432799707687ca7e08a460106378fcece405debc2ee5800" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 465, + "startColumn": 3, + "charOffset": 10953, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 463, + "startColumn": 3, + "charOffset": 10937, + "charLength": 15, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\treportErrorFunc(\"Attempt to erase protected key \\\"uid\\\"\");\n\t}\n\tpushBoolean(L, ret);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a79a31e9cd5cb03c179f56107e779683373cec234082b9195b4471a9a59be32c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 474, + "startColumn": 6, + "charOffset": 11211, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 472, + "startColumn": 6, + "charOffset": 11112, + "charLength": 1, + "snippet": { + "text": "\t// item:getCustomAttribute(key)\n\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50e4e7d50c0410d75acf0845187575dc4bffbf29c34d7b12b59a6b27094aa92b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'customAttribute' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 479, + "startColumn": 25, + "charOffset": 11278, + "charLength": 15, + "snippet": { + "text": "customAttribute" + } + }, + "contextRegion": { + "startLine": 477, + "startColumn": 25, + "charOffset": 11250, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tconst CustomAttribute* customAttribute;\n\tif (isNumber(L, 2)) {\n\t\tcustomAttribute = item->getCustomAttribute(std::to_string(getNumber(L, 2)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f6abfc2fb176c45e5cb456c7f37eedde6dc68022c5b34fb96bbbef97850e62e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 489, + "startColumn": 6, + "charOffset": 11548, + "charLength": 15, + "snippet": { + "text": "customAttribute" + } + }, + "contextRegion": { + "startLine": 487, + "startColumn": 6, + "charOffset": 11539, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (customAttribute) {\n\t\tcustomAttribute->pushToLua(L);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "caee6f0b2948c8c087add3a33958fb708cd0f14beed6362f2d0b51c3f0d01283" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 489, + "startColumn": 6, + "charOffset": 11548, + "charLength": 15, + "snippet": { + "text": "customAttribute" + } + }, + "contextRegion": { + "startLine": 487, + "startColumn": 6, + "charOffset": 11539, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (customAttribute) {\n\t\tcustomAttribute->pushToLua(L);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "176c8633c1861da9995b4b2b97c292203a07f81e0f442a1f46ddac3107e1cff3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 500, + "startColumn": 6, + "charOffset": 11812, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 498, + "startColumn": 6, + "charOffset": 11706, + "charLength": 1, + "snippet": { + "text": "\t// item:setCustomAttribute(key, value)\n\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0dee27c0c84cf905c9cac045c38830bbdf51d9be9976f1fb3d918ddc136597cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 541, + "startColumn": 6, + "charOffset": 12809, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 539, + "startColumn": 6, + "charOffset": 12707, + "charLength": 1, + "snippet": { + "text": "\t// item:removeCustomAttribute(key)\n\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1fec2594ff5903a7fa6ca3bc22caa6b9da316d68b3b70bc1c2b79f05b6c3a6bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 570, + "startColumn": 6, + "charOffset": 13494, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 568, + "startColumn": 6, + "charOffset": 13397, + "charLength": 1, + "snippet": { + "text": "\t// item:serializeAttributes()\n\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cdd012220e8f4cd3073222a56d29681bc1384c4e0582beef7a3243bb3cea525a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'attributesSize' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 578, + "startColumn": 9, + "charOffset": 13619, + "charLength": 14, + "snippet": { + "text": "attributesSize" + } + }, + "contextRegion": { + "startLine": 576, + "startColumn": 9, + "charOffset": 13571, + "charLength": 14, + "snippet": { + "text": "\titem->serializeAttr(propWriteStream);\n\n\tsize_t attributesSize;\n\tconst char* attributes = propWriteStream.getStream(attributesSize);\n\tlua_pushlstring(L, attributes, attributesSize);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44362160a39b71dcc56560d7bea600788212dbb792e64c302ce9d83852f3fcad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 587, + "startColumn": 6, + "charOffset": 13936, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 585, + "startColumn": 6, + "charOffset": 13816, + "charLength": 1, + "snippet": { + "text": "\t// item:moveTo(position or cylinder[, flags])\n\tstd::shared_ptr* itemPtr = getRawUserDataShared(L, 1);\n\tif (!itemPtr) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72429136688b88fcf29a8066bd2bcefec0a549c20fcb918ff05bd06211676011" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'std::shared_ptr *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 587, + "startColumn": 7, + "charOffset": 13937, + "charLength": 7, + "snippet": { + "text": "itemPtr" + } + }, + "contextRegion": { + "startLine": 585, + "startColumn": 7, + "charOffset": 13816, + "charLength": 7, + "snippet": { + "text": "\t// item:moveTo(position or cylinder[, flags])\n\tstd::shared_ptr* itemPtr = getRawUserDataShared(L, 1);\n\tif (!itemPtr) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6bc7778d21069f4037abe9fc13c8b18fc9f80ee7bc846111803a2d6b991c8ca0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 593, + "startColumn": 6, + "charOffset": 14027, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 591, + "startColumn": 6, + "charOffset": 13981, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = *itemPtr;\n\tif (!item || item->isRemoved()) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50e4e7d50c0410d75acf0845187575dc4bffbf29c34d7b12b59a6b27094aa92b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 619, + "startColumn": 6, + "charOffset": 14615, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 617, + "startColumn": 6, + "charOffset": 14606, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!toCylinder) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1a9810e1cb7262ae4746aef818a2d5fc1e6de10bcd1627a05b263f527cddaea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 629, + "startColumn": 2, + "charOffset": 14745, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 627, + "startColumn": 2, + "charOffset": 14740, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tuint32_t flags = getNumber(L, 3, FLAG_NOLIMIT | FLAG_IGNOREBLOCKITEM | FLAG_IGNOREBLOCKCREATURE | FLAG_IGNORENOTMOVABLE);\n\n\tif (item->getParent() == VirtualCylinder::virtualCylinder) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7808b210e559076b2e749e1decf4231edc66b950b58b3cc7feaaedbd3705f495" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 629, + "startColumn": 45, + "charOffset": 14788, + "charLength": 12, + "snippet": { + "text": "FLAG_NOLIMIT" + } + }, + "contextRegion": { + "startLine": 627, + "startColumn": 45, + "charOffset": 14740, + "charLength": 12, + "snippet": { + "text": "\t}\n\n\tuint32_t flags = getNumber(L, 3, FLAG_NOLIMIT | FLAG_IGNOREBLOCKITEM | FLAG_IGNOREBLOCKCREATURE | FLAG_IGNORENOTMOVABLE);\n\n\tif (item->getParent() == VirtualCylinder::virtualCylinder) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9f48ee625725c97f8cd405bbf6e88d0a9073cbc84b829ee3d2f21b8d9b7d85c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 629, + "startColumn": 58, + "charOffset": 14801, + "charLength": 1, + "snippet": { + "text": "|" + } + }, + "contextRegion": { + "startLine": 627, + "startColumn": 58, + "charOffset": 14740, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tuint32_t flags = getNumber(L, 3, FLAG_NOLIMIT | FLAG_IGNOREBLOCKITEM | FLAG_IGNOREBLOCKCREATURE | FLAG_IGNORENOTMOVABLE);\n\n\tif (item->getParent() == VirtualCylinder::virtualCylinder) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54d81dc016cb967e8a3a23b0c02217ba283344ca44a4d74e7832e4374a395457" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 629, + "startColumn": 81, + "charOffset": 14824, + "charLength": 1, + "snippet": { + "text": "|" + } + }, + "contextRegion": { + "startLine": 627, + "startColumn": 81, + "charOffset": 14740, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tuint32_t flags = getNumber(L, 3, FLAG_NOLIMIT | FLAG_IGNOREBLOCKITEM | FLAG_IGNOREBLOCKCREATURE | FLAG_IGNORENOTMOVABLE);\n\n\tif (item->getParent() == VirtualCylinder::virtualCylinder) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3bd0fee0f382fea6f001525c064712579e918a22fb735278031c727841b3f2b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 629, + "startColumn": 108, + "charOffset": 14851, + "charLength": 1, + "snippet": { + "text": "|" + } + }, + "contextRegion": { + "startLine": 627, + "startColumn": 108, + "charOffset": 14740, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tuint32_t flags = getNumber(L, 3, FLAG_NOLIMIT | FLAG_IGNOREBLOCKITEM | FLAG_IGNOREBLOCKCREATURE | FLAG_IGNORENOTMOVABLE);\n\n\tif (item->getParent() == VirtualCylinder::virtualCylinder) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aca9964af316fc409c12e94cce7ddccf33b9995527d86301d407ff74f84c8515" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 647, + "startColumn": 6, + "charOffset": 15527, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 645, + "startColumn": 6, + "charOffset": 15405, + "charLength": 1, + "snippet": { + "text": "\t// item:transform(itemId[, count/subType = -1])\n\tstd::shared_ptr* itemPtr = getRawUserDataShared(L, 1);\n\tif (!itemPtr) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e8f61f5fdbda954a6e2141a455353b5025f943c35a33343f1224f404e3c7d28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'std::shared_ptr *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 647, + "startColumn": 7, + "charOffset": 15528, + "charLength": 7, + "snippet": { + "text": "itemPtr" + } + }, + "contextRegion": { + "startLine": 645, + "startColumn": 7, + "charOffset": 15405, + "charLength": 7, + "snippet": { + "text": "\t// item:transform(itemId[, count/subType = -1])\n\tstd::shared_ptr* itemPtr = getRawUserDataShared(L, 1);\n\tif (!itemPtr) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "046e4059b78fba4751f636d2f3b37a4ade23c0ed452759c136e843201979fac5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 653, + "startColumn": 6, + "charOffset": 15619, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 651, + "startColumn": 6, + "charOffset": 15572, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr &item = *itemPtr;\n\tif (!item) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e35afb6c2ee80b9c814b04b3d8eb214f894a5401ef20aa1a4649dee3e876b1a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'itemId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 658, + "startColumn": 11, + "charOffset": 15672, + "charLength": 6, + "snippet": { + "text": "itemId" + } + }, + "contextRegion": { + "startLine": 656, + "startColumn": 11, + "charOffset": 15658, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tuint16_t itemId;\n\tif (isNumber(L, 2)) {\n\t\titemId = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e20ec199889e140f1d4ad51b5f4ef142f988183e3370a817357a94a2fc0e03df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 669, + "startColumn": 2, + "charOffset": 15870, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 667, + "startColumn": 2, + "charOffset": 15865, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tint32_t subType = getNumber(L, 3, -1);\n\tif (item->getID() == itemId && (subType == -1 || subType == item->getSubType())) {\n\t\tpushBoolean(L, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe45dbcbfedf51de1d53a43f0e4fbc584b6bbf43f0d760a756c41e662246924d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 717, + "startColumn": 6, + "charOffset": 17031, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 715, + "startColumn": 6, + "charOffset": 16931, + "charLength": 1, + "snippet": { + "text": "\t// item:moveToSlot(player, slot)\n\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item || item->isRemoved()) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9339afa26c7d5caf739fe08a946bb0d67d1997b31e5602804062bbd1bb8ecee4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 723, + "startColumn": 6, + "charOffset": 17167, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 721, + "startColumn": 6, + "charOffset": 17094, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr player = getUserdataShared(L, 2);\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b915d98c5d70e7ce19faa0695e0e9598abfc0d0f421cf7b9666fe265dd2974bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 728, + "startColumn": 2, + "charOffset": 17213, + "charLength": 7, + "snippet": { + "text": "Slots_t" + } + }, + "contextRegion": { + "startLine": 726, + "startColumn": 2, + "charOffset": 17208, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tSlots_t slot = getNumber(L, 3, CONST_SLOT_WHEREEVER);\n\n\tstd::shared_ptr moveItem = nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6e411e979170ec9d017c554581e5abd219053665c69e49ba84493029bd793fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 767, + "startColumn": 6, + "charOffset": 18294, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 765, + "startColumn": 6, + "charOffset": 18204, + "charLength": 1, + "snippet": { + "text": "\t// item:getImbuement()\n\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8856d1b14f817bead061ba9283885de699eb4b897a8e60c3e8ae41400d579153" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 768, + "startColumn": 3, + "charOffset": 18305, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 766, + "startColumn": 3, + "charOffset": 18228, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b12c697b329e5aa349de4adcba2a3f51682faa35e2c0a120068d210a3b95b248" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 773, + "startColumn": 2, + "charOffset": 18404, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 771, + "startColumn": 2, + "charOffset": 18399, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (uint8_t slotid = 0; slotid < item->getImbuementSlot(); slotid++) {\n\t\tImbuementInfo imbuementInfo;\n\t\tif (!item->getImbuementInfo(slotid, &imbuementInfo)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ca60efafcf0552019fa9ddf94521d7e8aaa7bcfa8ee51586ba35e293db649e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'item' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 773, + "startColumn": 27, + "charOffset": 18429, + "charLength": 6, + "snippet": { + "text": "slotid" + } + }, + "contextRegion": { + "startLine": 771, + "startColumn": 27, + "charOffset": 18399, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tfor (uint8_t slotid = 0; slotid < item->getImbuementSlot(); slotid++) {\n\t\tImbuementInfo imbuementInfo;\n\t\tif (!item->getImbuementInfo(slotid, &imbuementInfo)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93024299d1acc75acf9937cd6f740ca55596c94d14498d18fd81d51553da6b60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 780, + "startColumn": 7, + "charOffset": 18638, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 778, + "startColumn": 7, + "charOffset": 18581, + "charLength": 1, + "snippet": { + "text": "\n\t\tImbuement* imbuement = imbuementInfo.imbuement;\n\t\tif (!imbuement) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "953332d588b0b59c0a339f64d381728204f4f52612edd04f588865f0ff452b5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'Imbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 780, + "startColumn": 8, + "charOffset": 18639, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 778, + "startColumn": 8, + "charOffset": 18581, + "charLength": 9, + "snippet": { + "text": "\n\t\tImbuement* imbuement = imbuementInfo.imbuement;\n\t\tif (!imbuement) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a7a21398376b1deda626c805bb48c2ad19b1e30203eb36392d5eeeab4755448" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 788, + "startColumn": 21, + "charOffset": 18796, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 786, + "startColumn": 21, + "charOffset": 18747, + "charLength": 9, + "snippet": { + "text": "\n\t\tlua_createtable(L, 0, 3);\n\t\tsetField(L, \"id\", imbuement->getID());\n\t\tsetField(L, \"name\", imbuement->getName());\n\t\tsetField(L, \"duration\", static_cast(imbuementInfo.duration));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ff73b597d6256b8e4cfad4f0334098b51f49275d02494a89df4b401c8e29c8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 798, + "startColumn": 6, + "charOffset": 19108, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 796, + "startColumn": 6, + "charOffset": 19014, + "charLength": 1, + "snippet": { + "text": "\t// item:getImbuementSlot()\n\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec5792b0347b10de3fb7d5ad2f61843119cf20c16e8cd166f87b4fe3c70c33a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 799, + "startColumn": 3, + "charOffset": 19119, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 797, + "startColumn": 3, + "charOffset": 19042, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b74cd6d8854214e6eb10b3fabc7f3673f6776cf7577f7a5122536a73b04ce0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 804, + "startColumn": 20, + "charOffset": 19236, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 802, + "startColumn": 20, + "charOffset": 19213, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, item->getImbuementSlot());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f99a358d86655475f41408e61b8289c5b3235b792548964d803e1b281211acc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 812, + "startColumn": 6, + "charOffset": 19580, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 810, + "startColumn": 6, + "charOffset": 19416, + "charLength": 1, + "snippet": { + "text": "\t// Example: item:setDuration(10000, 20000, 2129, false) = random duration from range 10000/20000\n\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4305e80fb301eb643223b7c0fe4b82c1d9befab0b2a9f196c8be940353c4e85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 813, + "startColumn": 3, + "charOffset": 19591, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 811, + "startColumn": 3, + "charOffset": 19514, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "853b705d88fac13b49ddb2fcc9c9a34b59342387a0f9775f1f9363165eb9317c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 821, + "startColumn": 32, + "charOffset": 19824, + "charLength": 11, + "snippet": { + "text": "minDuration" + } + }, + "contextRegion": { + "startLine": 819, + "startColumn": 32, + "charOffset": 19740, + "charLength": 11, + "snippet": { + "text": "\tuint32_t maxDuration = 0;\n\tif (lua_gettop(L) > 2) {\n\t\tmaxDuration = uniform_random(minDuration, getNumber(L, 3));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1c942bf1f49028da6fe8f905ec328e7fc85044e7e375d142cd8fdffe2d8c6f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 821, + "startColumn": 45, + "charOffset": 19837, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 819, + "startColumn": 45, + "charOffset": 19740, + "charLength": 9, + "snippet": { + "text": "\tuint32_t maxDuration = 0;\n\tif (lua_gettop(L) > 2) {\n\t\tmaxDuration = uniform_random(minDuration, getNumber(L, 3));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1d91e5c3e99f188e85b7cd7d5bdb4750a6fb0d075cc69531b159bac1ac0c511" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 830, + "startColumn": 32, + "charOffset": 20042, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 828, + "startColumn": 32, + "charOffset": 19958, + "charLength": 1, + "snippet": { + "text": "\tbool showDuration = true;\n\tif (lua_gettop(L) > 4) {\n\t\tshowDuration = getBoolean(L, 5);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6a39403892b005b210566cea8fc79fbc469750d4dc54d4484934ef241ed3fe7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 849, + "startColumn": 6, + "charOffset": 20489, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 847, + "startColumn": 6, + "charOffset": 20376, + "charLength": 1, + "snippet": { + "text": "\t// item:isInsideDepot([includeInbox = false])\n\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1fec2594ff5903a7fa6ca3bc22caa6b9da316d68b3b70bc1c2b79f05b6c3a6bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 850, + "startColumn": 3, + "charOffset": 20500, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 848, + "startColumn": 3, + "charOffset": 20423, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c349a00e373922bd4d436a30d1d969feefb5de391221b5f420fd6be50fc8988" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 862, + "startColumn": 6, + "charOffset": 20813, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 860, + "startColumn": 6, + "charOffset": 20729, + "charLength": 1, + "snippet": { + "text": "\t// item:isContainer()\n\tconst auto item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10fc336ce367df9424e3730d6590ec28533b3cb2499cc32efcad3fb315b1e5dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 863, + "startColumn": 3, + "charOffset": 20824, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 861, + "startColumn": 3, + "charOffset": 20752, + "charLength": 15, + "snippet": { + "text": "\tconst auto item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a82c75f317c51cb8db1c260da3a7c66f2bd1ba8d24cd6920266b333ce273eab0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 876, + "startColumn": 6, + "charOffset": 21152, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 874, + "startColumn": 6, + "charOffset": 21067, + "charLength": 1, + "snippet": { + "text": "\t// item:getTier()\n\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1bb3ef127964faf8c3113830adb34d1336d8efbc63384ea3da6c58aa6008e631" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 877, + "startColumn": 3, + "charOffset": 21163, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 875, + "startColumn": 3, + "charOffset": 21086, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "089a8ca107f0cbafd52621540b696f4a66c69a027dfa1df1e4f7deaaee0abea3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 882, + "startColumn": 20, + "charOffset": 21280, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 880, + "startColumn": 20, + "charOffset": 21257, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, item->getTier());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "956c1ebebc479bcda70e068611af3c10a248c9a236a88eaaa30e7960f154cd63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 889, + "startColumn": 6, + "charOffset": 21451, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 887, + "startColumn": 6, + "charOffset": 21362, + "charLength": 1, + "snippet": { + "text": "\t// item:setTier(tier)\n\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50e4e7d50c0410d75acf0845187575dc4bffbf29c34d7b12b59a6b27094aa92b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 890, + "startColumn": 3, + "charOffset": 21462, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 888, + "startColumn": 3, + "charOffset": 21385, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6db69ede1b6e6ced1b3a5d67c2bd40e5e5d8c2006a36c8753d7289e2877ab682" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 903, + "startColumn": 6, + "charOffset": 21794, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 901, + "startColumn": 6, + "charOffset": 21699, + "charLength": 1, + "snippet": { + "text": "\t// item:getClassification()\n\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9cd9e0705496d82826787d40f1982cd579de25fca6c3d43412a4028ced7dafbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 904, + "startColumn": 3, + "charOffset": 21805, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 902, + "startColumn": 3, + "charOffset": 21728, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7005cc5c989f3728e18499eb7cb41fc2e49c801dd71bc255e01dc6163361926b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 909, + "startColumn": 20, + "charOffset": 21922, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 907, + "startColumn": 20, + "charOffset": 21899, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, item->getClassification());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0174f88352c13c38d77302477b1eeeb71e8c5cb2b0c28c14bc5d0caab61020a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 916, + "startColumn": 6, + "charOffset": 22125, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 914, + "startColumn": 6, + "charOffset": 22027, + "charLength": 1, + "snippet": { + "text": "\t// item:canReceiveAutoCarpet()\n\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f468d218fe38050460148d2234b5621dd7c973b912e419f1936255c5e15a64a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 917, + "startColumn": 3, + "charOffset": 22136, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 915, + "startColumn": 3, + "charOffset": 22059, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5d1fcb18b47e22919cb47b695f0abde31d0859212c4c98ff2436cc4532936e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 929, + "startColumn": 6, + "charOffset": 22451, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 927, + "startColumn": 6, + "charOffset": 22346, + "charLength": 1, + "snippet": { + "text": "\t// item:setOwner(creature|creatureId)\n\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32accb9d9768fab51641c7b5627a813cebe93b4e24b1402162791b52b60c5b63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 930, + "startColumn": 3, + "charOffset": 22462, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 928, + "startColumn": 3, + "charOffset": 22385, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "664cc1b3fcad589bf9ad2da9ffe17ab392c3ffbe5d5262c672b0b493967cd5c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 936, + "startColumn": 7, + "charOffset": 22640, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 934, + "startColumn": 7, + "charOffset": 22535, + "charLength": 1, + "snippet": { + "text": "\tif (isUserdata(L, 2)) {\n\t\tstd::shared_ptr creature = getUserdataShared(L, 2);\n\t\tif (!creature) {\n\t\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72429136688b88fcf29a8066bd2bcefec0a549c20fcb918ff05bd06211676011" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 937, + "startColumn": 4, + "charOffset": 22656, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 935, + "startColumn": 4, + "charOffset": 22560, + "charLength": 15, + "snippet": { + "text": "\t\tstd::shared_ptr creature = getUserdataShared(L, 2);\n\t\tif (!creature) {\n\t\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\t\treturn 0;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2b93c331a918da21843c850d8857161d4fad84a44ba32755a62f669a43006f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 959, + "startColumn": 6, + "charOffset": 23117, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 957, + "startColumn": 6, + "charOffset": 23031, + "charLength": 1, + "snippet": { + "text": "\t// item:getOwner()\n\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10fc336ce367df9424e3730d6590ec28533b3cb2499cc32efcad3fb315b1e5dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 960, + "startColumn": 3, + "charOffset": 23128, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 958, + "startColumn": 3, + "charOffset": 23051, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a82c75f317c51cb8db1c260da3a7c66f2bd1ba8d24cd6920266b333ce273eab0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 965, + "startColumn": 21, + "charOffset": 23263, + "charLength": 7, + "snippet": { + "text": "ownerId" + } + }, + "contextRegion": { + "startLine": 963, + "startColumn": 21, + "charOffset": 23200, + "charLength": 7, + "snippet": { + "text": "\n\tif (auto ownerId = item->getOwnerId()) {\n\t\tlua_pushnumber(L, ownerId);\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9eb735dae3d2a018ea4fa985efbcca91a26f68fe5d420b8bd0d75d55792bab1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 976, + "startColumn": 6, + "charOffset": 23474, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 974, + "startColumn": 6, + "charOffset": 23370, + "charLength": 1, + "snippet": { + "text": "\t// item:isOwner(creature|creatureId)\n\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8cfbc8716f4898384b8cf9e5a77221fe371022b0a0657e79dd5d4231d2c8f9c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 977, + "startColumn": 3, + "charOffset": 23485, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 975, + "startColumn": 3, + "charOffset": 23408, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd77a0edbe25fcf069174637cfd84f0bf490e0d8daaf28d706542a3fce61ca3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 983, + "startColumn": 7, + "charOffset": 23663, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 981, + "startColumn": 7, + "charOffset": 23558, + "charLength": 1, + "snippet": { + "text": "\tif (isUserdata(L, 2)) {\n\t\tstd::shared_ptr creature = getUserdataShared(L, 2);\n\t\tif (!creature) {\n\t\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d1c6322b5ae55432a202ce325025000f7b1e2a5b5acc32f09c852fd5d29e236" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 984, + "startColumn": 4, + "charOffset": 23679, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 982, + "startColumn": 4, + "charOffset": 23583, + "charLength": 15, + "snippet": { + "text": "\t\tstd::shared_ptr creature = getUserdataShared(L, 2);\n\t\tif (!creature) {\n\t\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\t\treturn 0;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77340e8512b3fc465d26f51867bbe434d8bdca4226d756ffc85a044b505c812b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 1004, + "startColumn": 6, + "charOffset": 24128, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1002, + "startColumn": 6, + "charOffset": 24038, + "charLength": 1, + "snippet": { + "text": "\t// item:getOwnerName()\n\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b99484cd2611ced3624a7ec6b5007f2423c819da12da2d360bfd72a3217e7255" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 1005, + "startColumn": 3, + "charOffset": 24139, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1003, + "startColumn": 3, + "charOffset": 24062, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bbe6c6091514f6fd475dda7f28e77949230e4f86638c24e08d3b2735aa0436be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 1021, + "startColumn": 6, + "charOffset": 24490, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1019, + "startColumn": 6, + "charOffset": 24404, + "charLength": 1, + "snippet": { + "text": "\t// item:hasOwner()\n\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87e63af2ec208cb3016a36e6e709ba13839d4c33e2b9b9bb7da35ed555346dba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_functions.cpp" + }, + "region": { + "startLine": 1022, + "startColumn": 3, + "charOffset": 24501, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 1020, + "startColumn": 3, + "charOffset": 24424, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr item = getUserdataShared(L, 1);\n\tif (!item) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3dd0c33feecef06a26203b79e21e22309ada937cfe9593c9a0b44eb3d4546db3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'id' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 18, + "startColumn": 11, + "charOffset": 592, + "charLength": 2, + "snippet": { + "text": "id" + } + }, + "contextRegion": { + "startLine": 16, + "startColumn": 11, + "charOffset": 500, + "charLength": 2, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeCreate(lua_State* L) {\n\t// ItemType(id or name)\n\tuint32_t id;\n\tif (isNumber(L, 2)) {\n\t\tid = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b11565994ad4975f1ad9c6b1e0e65fa343a260ba1b586691ca52db93578c0941" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 8, + "charOffset": 948, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 8, + "charOffset": 858, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsCorpse(lua_State* L) {\n\t// itemType:isCorpse()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isCorpse);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a97d9804de13b2af07dc6e6b04d349f9f17d5365e5f38bda4f33c3930b03901" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 6, + "charOffset": 1009, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 6, + "charOffset": 917, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isCorpse()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isCorpse);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a82f03c79b129b4a1f71d74817a87f8cc130f314a39170db682e77bed669e84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 6, + "charOffset": 1009, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 6, + "charOffset": 917, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isCorpse()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isCorpse);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63cf1ed4d3332f91b2f03152270a1ea0fc403bd8ecac20c42c5ac085aea25a4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 44, + "startColumn": 8, + "charOffset": 1190, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 42, + "startColumn": 8, + "charOffset": 1104, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsDoor(lua_State* L) {\n\t// itemType:isDoor()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isDoor());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b68b39b46e163055d96b2c44b2c37e10bb83183f556cc17fabbd096587c8cb8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 6, + "charOffset": 1251, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 6, + "charOffset": 1161, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isDoor()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isDoor());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a3c33a4e5cc068edebe153de788c16d60c02354f9862a7d130780136f6fbb79" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 6, + "charOffset": 1251, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 6, + "charOffset": 1161, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isDoor()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isDoor());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b76ad050c983ef13a19cad402d987c37c615c38e94df6ec7585a03040c329b92" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 55, + "startColumn": 8, + "charOffset": 1442, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 8, + "charOffset": 1346, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsContainer(lua_State* L) {\n\t// itemType:isContainer()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isContainer());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a16409ebaf4da72e4023a047e3d8c46ca205e889f6a166fe695f42e443a2cce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 56, + "startColumn": 6, + "charOffset": 1503, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 54, + "startColumn": 6, + "charOffset": 1408, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isContainer()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isContainer());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb9336b0e9391fe85e8a7c5897937b7380efadcbcb962d64a66a7ec0020bab85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 56, + "startColumn": 6, + "charOffset": 1503, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 54, + "startColumn": 6, + "charOffset": 1408, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isContainer()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isContainer());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "041f6a9fdcff7dcda896bdeb86fbadfc5695a7322ecd6845d2b0eeec2d66a5e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 8, + "charOffset": 1709, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 8, + "charOffset": 1603, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsFluidContainer(lua_State* L) {\n\t// itemType:isFluidContainer()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isFluidContainer());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2523fc0cc3cc1d260f809db7f388ffd1df5bffa2bb20ad8257e4258b766bb40b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 67, + "startColumn": 6, + "charOffset": 1770, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 65, + "startColumn": 6, + "charOffset": 1670, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isFluidContainer()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isFluidContainer());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6e46b53db3bde801fb47b00ac9978d1beb088fb2ba16ad0a28a27856e1d6a21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 67, + "startColumn": 6, + "charOffset": 1770, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 65, + "startColumn": 6, + "charOffset": 1670, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isFluidContainer()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isFluidContainer());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a401e7528a9f936a957eaf9f5e4da83792fb6f8c7d58e1eede8afafcc645f7a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 77, + "startColumn": 8, + "charOffset": 1967, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 75, + "startColumn": 8, + "charOffset": 1875, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsMovable(lua_State* L) {\n\t// itemType:isMovable()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->movable);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "377999837e5567717d063990c462c08cdc623600f972a081acc732a6fa7d8f01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 6, + "charOffset": 2028, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 6, + "charOffset": 1935, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isMovable()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->movable);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b042346d4949761a58ea19ff41309291d6f4aa42bf8732245236f15103db143" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 6, + "charOffset": 2028, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 6, + "charOffset": 1935, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isMovable()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->movable);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66b8986d95e57f801134bcec1f023976c306a5933aabde575d49dad5925223de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 88, + "startColumn": 8, + "charOffset": 2208, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 86, + "startColumn": 8, + "charOffset": 2122, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsRune(lua_State* L) {\n\t// itemType:isRune()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isRune());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c5953f47ad19afcc30566ec6d5b3b4f53dc4e4b0f44a3d6234b528631c2e6f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 89, + "startColumn": 6, + "charOffset": 2269, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 87, + "startColumn": 6, + "charOffset": 2179, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isRune()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isRune());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5806f7035199bd9bd70b47acf3f80cb06671b23ba51bdf38b9bffdf4d8f32a68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 89, + "startColumn": 6, + "charOffset": 2269, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 87, + "startColumn": 6, + "charOffset": 2179, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isRune()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isRune());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df4dd00eabc164a9df4b709e78bc6e5ffdbd38a77a9e5f6f86cea6d80476280f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 99, + "startColumn": 8, + "charOffset": 2460, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 97, + "startColumn": 8, + "charOffset": 2364, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsStackable(lua_State* L) {\n\t// itemType:isStackable()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->stackable);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85b88d2f630f0818ad12f578a9d6e00fb20cda32c03298c868d3b144291f8ee4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 100, + "startColumn": 6, + "charOffset": 2521, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 98, + "startColumn": 6, + "charOffset": 2426, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isStackable()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->stackable);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd8824c85d5dca3d8bb897e6f24aa09ed1c3d95a263c31bdfa4ac3d2b5c47157" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 100, + "startColumn": 6, + "charOffset": 2521, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 98, + "startColumn": 6, + "charOffset": 2426, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isStackable()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->stackable);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "749f57953009d1b46b8836d341e5e6469480a9f7f0f1dc5102371ddeda5ff436" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 110, + "startColumn": 8, + "charOffset": 2711, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 108, + "startColumn": 8, + "charOffset": 2617, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsStowable(lua_State* L) {\n\t// itemType:isStowable()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->stackable && itemType->wareId > 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f560de78ef524fb450cd171a3aabe3a7f42829a75875b3a9a8b13e39c9d42372" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 6, + "charOffset": 2772, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 6, + "charOffset": 2678, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isStowable()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->stackable && itemType->wareId > 0);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49000caa7c1b5fe2c4a1633844677bd2e652953d24fd46d4dadbc175e1ef899d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 6, + "charOffset": 2772, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 6, + "charOffset": 2678, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isStowable()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->stackable && itemType->wareId > 0);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "739b12a219330f92f4d082e2ee3b1010d0863ca0a41e0205b00d6840607318b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 121, + "startColumn": 8, + "charOffset": 2986, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 119, + "startColumn": 8, + "charOffset": 2892, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsReadable(lua_State* L) {\n\t// itemType:isReadable()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->canReadText);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8b86444bd7cbf35241229a017acd45c0b3b3cec12170ddb46d0fd3fb1dfdf50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 122, + "startColumn": 6, + "charOffset": 3047, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 120, + "startColumn": 6, + "charOffset": 2953, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isReadable()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->canReadText);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da34e7a40357253bf47d56a3a2fe43b9220f52ebc08a5bb144d6a6a8b3895816" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 122, + "startColumn": 6, + "charOffset": 3047, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 120, + "startColumn": 6, + "charOffset": 2953, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isReadable()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->canReadText);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c83dfd99d81571593cc5ff03e7bbcabe924d36aa402b76686d1e45e806dce6e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 132, + "startColumn": 8, + "charOffset": 3239, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 130, + "startColumn": 8, + "charOffset": 3145, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsWritable(lua_State* L) {\n\t// itemType:isWritable()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->canWriteText);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a93a17813fc4924b952637398a1fafd8aee890717d0a1f72c7227c4ea16978a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 133, + "startColumn": 6, + "charOffset": 3300, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 131, + "startColumn": 6, + "charOffset": 3206, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isWritable()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->canWriteText);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7322e5cba72e4ae716bdc7fb8e36beac5afa59e6f6d9bd98cbf169975a04ca7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 133, + "startColumn": 6, + "charOffset": 3300, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 131, + "startColumn": 6, + "charOffset": 3206, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isWritable()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->canWriteText);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02bf9821c329346dc787c038148fcb2005dc5387b6b19161461565333d5c4f92" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 143, + "startColumn": 8, + "charOffset": 3493, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 141, + "startColumn": 8, + "charOffset": 3399, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsBlocking(lua_State* L) {\n\t// itemType:isBlocking()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->blockProjectile || itemType->blockSolid);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cfb00527943266b920f387f7e3f5da03788346874fbcb581be98ba2a62233204" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 144, + "startColumn": 6, + "charOffset": 3554, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 142, + "startColumn": 6, + "charOffset": 3460, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isBlocking()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->blockProjectile || itemType->blockSolid);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba012a82acb70ddfb92ef08ce99e34fd909388ea556e78f2402587f626ce5c89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 144, + "startColumn": 6, + "charOffset": 3554, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 142, + "startColumn": 6, + "charOffset": 3460, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isBlocking()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->blockProjectile || itemType->blockSolid);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4663b5527660c2d2cd29f86027943efc336643df5a46db39846e71c52684c289" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 154, + "startColumn": 8, + "charOffset": 3778, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 8, + "charOffset": 3680, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsGroundTile(lua_State* L) {\n\t// itemType:isGroundTile()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isGroundTile());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "196da36c6589c0f5a379e492ea2f4204da4ad853c18f043a8251bdca57759bbb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 155, + "startColumn": 6, + "charOffset": 3839, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 153, + "startColumn": 6, + "charOffset": 3743, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isGroundTile()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isGroundTile());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01889551f989f284751e97c6adf8e70a7c3b83e4b0b456a352dfa0e08d28c20d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 155, + "startColumn": 6, + "charOffset": 3839, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 153, + "startColumn": 6, + "charOffset": 3743, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isGroundTile()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isGroundTile());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59e5afe7512732377dfc43a8c3eda0e33c99148dcc6ac1fb3dfe16258a80e7dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 165, + "startColumn": 8, + "charOffset": 4038, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 163, + "startColumn": 8, + "charOffset": 3940, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsMagicField(lua_State* L) {\n\t// itemType:isMagicField()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isMagicField());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83d4561eb0a57acfdbf2281fa6014cc5a00940e0e42755e1804c1ed6dbdd3f8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 166, + "startColumn": 6, + "charOffset": 4099, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 6, + "charOffset": 4003, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isMagicField()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isMagicField());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82b1daac7802e96e637aece601d5e1b7e2613872465b27b347bb7d9397cb822f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 166, + "startColumn": 6, + "charOffset": 4099, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 6, + "charOffset": 4003, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isMagicField()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isMagicField());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eac850921a41f6192c3f182eceeb8364e283d473035f3f7f01493797cbd25078" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 176, + "startColumn": 8, + "charOffset": 4294, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 174, + "startColumn": 8, + "charOffset": 4200, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsMultiUse(lua_State* L) {\n\t// itemType:isMultiUse()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isMultiUse());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83d4561eb0a57acfdbf2281fa6014cc5a00940e0e42755e1804c1ed6dbdd3f8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 177, + "startColumn": 6, + "charOffset": 4355, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 175, + "startColumn": 6, + "charOffset": 4261, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isMultiUse()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isMultiUse());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82b1daac7802e96e637aece601d5e1b7e2613872465b27b347bb7d9397cb822f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 177, + "startColumn": 6, + "charOffset": 4355, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 175, + "startColumn": 6, + "charOffset": 4261, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isMultiUse()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isMultiUse());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eac850921a41f6192c3f182eceeb8364e283d473035f3f7f01493797cbd25078" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 187, + "startColumn": 8, + "charOffset": 4552, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 185, + "startColumn": 8, + "charOffset": 4454, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsPickupable(lua_State* L) {\n\t// itemType:isPickupable()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isPickupable());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9aac76a8b36fd524f2e4eb8069e009221a74f83be677dfca1c0db85219308551" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 188, + "startColumn": 6, + "charOffset": 4613, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 186, + "startColumn": 6, + "charOffset": 4517, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isPickupable()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isPickupable());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0c60d5664b32e01d3ef70087bb05ba8a4bed646ae9e44246c309ba94c01863c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 188, + "startColumn": 6, + "charOffset": 4613, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 186, + "startColumn": 6, + "charOffset": 4517, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isPickupable()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isPickupable());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d870bf2e66094e44a863a27af23d8755baf1cb269b39eb470c32e3daab783bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 198, + "startColumn": 8, + "charOffset": 4798, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 196, + "startColumn": 8, + "charOffset": 4714, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsKey(lua_State* L) {\n\t// itemType:isKey()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isKey());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca5ab4a0c7acc850b4c63cb605df40481eed88c86e7cfa2d32ccd757c81a87fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 199, + "startColumn": 6, + "charOffset": 4859, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 197, + "startColumn": 6, + "charOffset": 4770, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isKey()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isKey());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2adc11a0580b5c796ece34b2fbc2ac0dfb07b469c3a02976bbed62177ee46a8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 199, + "startColumn": 6, + "charOffset": 4859, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 197, + "startColumn": 6, + "charOffset": 4770, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isKey()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isKey());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "868222602b75a9f4d0d453a7601c8c4af5704d4ae98ec4dc50870f13b461e86b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 209, + "startColumn": 8, + "charOffset": 5043, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 207, + "startColumn": 8, + "charOffset": 4953, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeIsQuiver(lua_State* L) {\n\t// itemType:isQuiver()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isQuiver());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db4b2770b31532af5c8c2edbe058b4f2391e8eb217dcdb1d8f0b54df0a59578b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 210, + "startColumn": 6, + "charOffset": 5104, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 208, + "startColumn": 6, + "charOffset": 5012, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isQuiver()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isQuiver());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "002d6b519d7cf4db451c9bf0876312fdc61fca5a464c4a60ef3ccd66510abada" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 210, + "startColumn": 6, + "charOffset": 5104, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 208, + "startColumn": 6, + "charOffset": 5012, + "charLength": 8, + "snippet": { + "text": "\t// itemType:isQuiver()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->isQuiver());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf3b42a5130090fa7fdda62f108c9ed75f68b08e5c88175b919832053dcaa14a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 220, + "startColumn": 8, + "charOffset": 5289, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 218, + "startColumn": 8, + "charOffset": 5201, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetType(lua_State* L) {\n\t// itemType:getType()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->type);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a19c639245be8a40806bd8e5245e56ea32ed4492b3283ec7276ec50dcd76d499" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 221, + "startColumn": 6, + "charOffset": 5350, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 219, + "startColumn": 6, + "charOffset": 5259, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getType()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->type);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbf45eb2a5340ebf199ba608aa74e4cbdfa556eb9bab331df37557084b6b4506" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 221, + "startColumn": 6, + "charOffset": 5350, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 219, + "startColumn": 6, + "charOffset": 5259, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getType()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->type);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2510799c6ad94a330036587bb6527a08e0dfb2b90d6870e2e2589957e43f4f79" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 222, + "startColumn": 21, + "charOffset": 5382, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 220, + "startColumn": 21, + "charOffset": 5282, + "charLength": 8, + "snippet": { + "text": "\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->type);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33c515267a68a620e5a3bea1e6fbfa39732a666f48168a26245fe8d87669d011" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 231, + "startColumn": 8, + "charOffset": 5528, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 229, + "startColumn": 8, + "charOffset": 5444, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetId(lua_State* L) {\n\t// itemType:getId()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->id);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a2175cd9855a95bf6b677ed9f9672e1017dbf67a7e83e71b53213287cbd4bcb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 232, + "startColumn": 6, + "charOffset": 5589, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 230, + "startColumn": 6, + "charOffset": 5500, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getId()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->id);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60721f497ae4f68f86fb111bf22a90d2b22fe5d4643ead9c3933e585511d944d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 232, + "startColumn": 6, + "charOffset": 5589, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 230, + "startColumn": 6, + "charOffset": 5500, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getId()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->id);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41f1a67312d34d494f7ed98e0f4d5d2696e0dbfdecfacf9dabc24272c2a4553c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 233, + "startColumn": 21, + "charOffset": 5621, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 231, + "startColumn": 21, + "charOffset": 5521, + "charLength": 8, + "snippet": { + "text": "\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->id);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89113b2bc569a4a174c7f88f3e23cc85ca8eea4cca1166f3300f4cd6daf88f22" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 8, + "charOffset": 5769, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 8, + "charOffset": 5681, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetName(lua_State* L) {\n\t// itemType:getName()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushString(L, itemType->name);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d4946297422cf4cfaf44dc4a4766480b7cae087e27713e8439150183919108b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 243, + "startColumn": 6, + "charOffset": 5830, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 6, + "charOffset": 5739, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getName()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushString(L, itemType->name);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf669dc0fe567c8d5afa64e1d3817c458c2778707ad0d9abeda51a938ba82efa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 243, + "startColumn": 6, + "charOffset": 5830, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 6, + "charOffset": 5739, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getName()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushString(L, itemType->name);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0a5142eb9d6daa175d6b04e41cce79bbbc8fd17df2b685891e1416ebd381413" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 253, + "startColumn": 8, + "charOffset": 6020, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 251, + "startColumn": 8, + "charOffset": 5920, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetPluralName(lua_State* L) {\n\t// itemType:getPluralName()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushString(L, itemType->getPluralName());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42f597da17dfa4ae10d378230e2b5e275520a1dd1803e8c6b6eb5e463a3543da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 254, + "startColumn": 6, + "charOffset": 6081, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 6, + "charOffset": 5984, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getPluralName()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushString(L, itemType->getPluralName());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "407f40f057809f140e1843d7138d5478d01eb28c9e51838fe627c2cb1ee524df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 254, + "startColumn": 6, + "charOffset": 6081, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 6, + "charOffset": 5984, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getPluralName()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushString(L, itemType->getPluralName());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c1fdea92efc13b08d3780da88518df113b45489e802266b2e5a85fd81e2d077" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 264, + "startColumn": 8, + "charOffset": 6276, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 262, + "startColumn": 8, + "charOffset": 6182, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetArticle(lua_State* L) {\n\t// itemType:getArticle()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushString(L, itemType->article);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42f597da17dfa4ae10d378230e2b5e275520a1dd1803e8c6b6eb5e463a3543da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 265, + "startColumn": 6, + "charOffset": 6337, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 263, + "startColumn": 6, + "charOffset": 6243, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getArticle()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushString(L, itemType->article);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "407f40f057809f140e1843d7138d5478d01eb28c9e51838fe627c2cb1ee524df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 265, + "startColumn": 6, + "charOffset": 6337, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 263, + "startColumn": 6, + "charOffset": 6243, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getArticle()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushString(L, itemType->article);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c1fdea92efc13b08d3780da88518df113b45489e802266b2e5a85fd81e2d077" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto itemType' can be declared as 'auto *itemType'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 275, + "startColumn": 2, + "charOffset": 6533, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 273, + "startColumn": 2, + "charOffset": 6430, + "charLength": 4, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetDescription(lua_State* L) {\n\t// itemType:getDescription([count])\n\tauto itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tauto count = getNumber(L, 2, -1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44e14ce0dd0aee37cb357f62815b71582f4acb7a343704c59f583f70dfba7893" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 276, + "startColumn": 6, + "charOffset": 6583, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 274, + "startColumn": 6, + "charOffset": 6495, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getDescription([count])\n\tauto itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tauto count = getNumber(L, 2, -1);\n\t\tauto description = Item::getDescription(*itemType, 1, nullptr, count);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1717c3e20f8439953becf2aabfa1677b1fd0f691dd8e62f185e9a6b110db9536" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 276, + "startColumn": 6, + "charOffset": 6583, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 274, + "startColumn": 6, + "charOffset": 6495, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getDescription([count])\n\tauto itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tauto count = getNumber(L, 2, -1);\n\t\tauto description = Item::getDescription(*itemType, 1, nullptr, count);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fc12c472944d76124b96158134c603524894465e214059cbde3b4db00c5648b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 288, + "startColumn": 8, + "charOffset": 6893, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 286, + "startColumn": 8, + "charOffset": 6789, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetSlotPosition(lua_State* L) {\n\t// itemType:getSlotPosition()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->slotPosition);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ef742851be2fc14bdc1471d0f7c52c9ec2d0e44208be41c65d3ac76932b9eb7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 289, + "startColumn": 6, + "charOffset": 6954, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 287, + "startColumn": 6, + "charOffset": 6855, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getSlotPosition()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->slotPosition);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "052ff89234818afc4a7c9d123f98a9a412cb0858e068bab2b326232912a0c8fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 289, + "startColumn": 6, + "charOffset": 6954, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 287, + "startColumn": 6, + "charOffset": 6855, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getSlotPosition()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->slotPosition);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fab6af3b82859513ec54d915423866e6e70dc1085598348c83bfba1b9bd4bde2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 290, + "startColumn": 21, + "charOffset": 6986, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 288, + "startColumn": 21, + "charOffset": 6886, + "charLength": 8, + "snippet": { + "text": "\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->slotPosition);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73f9deb8df0891825968189fae88edfd0315a6c1565b383a3c7a6e3e898888e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 299, + "startColumn": 8, + "charOffset": 7150, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 297, + "startColumn": 8, + "charOffset": 7056, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetCharges(lua_State* L) {\n\t// itemType:getCharges()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->charges);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "001f26daebadca8f6a3b27a3eb002080ee15e1af6167ccf212fb8c1868dd9f4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 300, + "startColumn": 6, + "charOffset": 7211, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 298, + "startColumn": 6, + "charOffset": 7117, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getCharges()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->charges);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "856955bd7bbe80c9fd673477a6a0624359f3f82ca001ff74cfc963f9d79a38ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 300, + "startColumn": 6, + "charOffset": 7211, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 298, + "startColumn": 6, + "charOffset": 7117, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getCharges()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->charges);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36f6c2fae8ab3d4f26abf58edc78be4a2d6ceb58e9412863956b97c7588f743a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 301, + "startColumn": 21, + "charOffset": 7243, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 299, + "startColumn": 21, + "charOffset": 7143, + "charLength": 8, + "snippet": { + "text": "\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->charges);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0cdc07c3e6f961055b8b57a833ec82cf8f75c6b4ff08c693741972973b1acae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 310, + "startColumn": 8, + "charOffset": 7410, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 308, + "startColumn": 8, + "charOffset": 7308, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetFluidSource(lua_State* L) {\n\t// itemType:getFluidSource()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->fluidSource);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1299af38270fea9d1e650674ef25c003231144eb0f636d11a59f2fc239cb2d08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 311, + "startColumn": 6, + "charOffset": 7471, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 309, + "startColumn": 6, + "charOffset": 7373, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getFluidSource()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->fluidSource);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1f2f1f6e9236b36009572f3e3bee49693bec68f3c31d4253117b25a88016b50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 311, + "startColumn": 6, + "charOffset": 7471, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 309, + "startColumn": 6, + "charOffset": 7373, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getFluidSource()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->fluidSource);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "acb0101bcc5f7643f7ff77fd7a2d59a3be318b357e8cc358128b5929c02a8d90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 312, + "startColumn": 21, + "charOffset": 7503, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 310, + "startColumn": 21, + "charOffset": 7403, + "charLength": 8, + "snippet": { + "text": "\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->fluidSource);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77b43bbb017fa0819d4461001cdf2b81fc44ae0e7532162652e45d2ef40adf58" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 321, + "startColumn": 8, + "charOffset": 7668, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 319, + "startColumn": 8, + "charOffset": 7572, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetCapacity(lua_State* L) {\n\t// itemType:getCapacity()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->maxItems);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16207ab0457b279f8a60a9cbf81cc265cdfbacf40ffb32e6c122401f5aeeb291" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 322, + "startColumn": 6, + "charOffset": 7729, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 320, + "startColumn": 6, + "charOffset": 7634, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getCapacity()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->maxItems);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11541a7c6bf114b7fa8de5a7b33d033ed96d0d7145614cd3ead5591a89ede633" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 322, + "startColumn": 6, + "charOffset": 7729, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 320, + "startColumn": 6, + "charOffset": 7634, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getCapacity()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->maxItems);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6dff002e36fd5459885db809c15519adb3160998db361e4db4838d7fe560f997" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 323, + "startColumn": 21, + "charOffset": 7761, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 321, + "startColumn": 21, + "charOffset": 7661, + "charLength": 8, + "snippet": { + "text": "\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->maxItems);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd2ada502dd8b2f56bc001fe9cd51556905b7a96e671e8db38376603a03b2e15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 332, + "startColumn": 2, + "charOffset": 7924, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 330, + "startColumn": 2, + "charOffset": 7827, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetWeight(lua_State* L) {\n\t// itemType:getWeight([count = 1])\n\tuint16_t count = getNumber(L, 2, 1);\n\n\tconst ItemType* itemType = getUserdata(L, 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16207ab0457b279f8a60a9cbf81cc265cdfbacf40ffb32e6c122401f5aeeb291" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 334, + "startColumn": 8, + "charOffset": 7979, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 332, + "startColumn": 8, + "charOffset": 7923, + "charLength": 8, + "snippet": { + "text": "\tuint16_t count = getNumber(L, 2, 1);\n\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (!itemType) {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2276061ec27418c14abad1b5d29406e67ea6969256d96aa4b740cda4fbd1808f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 335, + "startColumn": 6, + "charOffset": 8040, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 333, + "startColumn": 6, + "charOffset": 7971, + "charLength": 1, + "snippet": { + "text": "\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (!itemType) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9afdff9e4e386bb2bcd5503de49738b8d9f114f1872784f6f34c8d4ab4e849e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 335, + "startColumn": 7, + "charOffset": 8041, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 333, + "startColumn": 7, + "charOffset": 7971, + "charLength": 8, + "snippet": { + "text": "\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (!itemType) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be740dd8ee1ae1322282f12e03e0c9e19d8212cabd2e7e145d3cd44e8de4bcb9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 341, + "startColumn": 20, + "charOffset": 8196, + "charLength": 6, + "snippet": { + "text": "weight" + } + }, + "contextRegion": { + "startLine": 339, + "startColumn": 20, + "charOffset": 8086, + "charLength": 6, + "snippet": { + "text": "\n\tuint64_t weight = static_cast(itemType->weight) * std::max(1, count);\n\tlua_pushnumber(L, weight);\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b97735957aa3898dac9fe48695498159cbde77edd44f33e94326463f659ecda3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 341, + "startColumn": 20, + "charOffset": 8196, + "charLength": 6, + "snippet": { + "text": "weight" + } + }, + "contextRegion": { + "startLine": 339, + "startColumn": 20, + "charOffset": 8086, + "charLength": 6, + "snippet": { + "text": "\n\tuint64_t weight = static_cast(itemType->weight) * std::max(1, count);\n\tlua_pushnumber(L, weight);\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61befc630e3fdc1683505455f7aabfe859a61d3a57d0f575a69d1f18f0a8e044" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 347, + "startColumn": 8, + "charOffset": 8317, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 345, + "startColumn": 8, + "charOffset": 8219, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetStackSize(lua_State* L) {\n\t// itemType:getStackSize()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (!itemType) {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f5061b768aad64d114406df2bca6276dddfb5152e4d6d091b0df49931008368" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 348, + "startColumn": 6, + "charOffset": 8378, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 346, + "startColumn": 6, + "charOffset": 8282, + "charLength": 1, + "snippet": { + "text": "\t// itemType:getStackSize()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (!itemType) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ac551717f227cc1c762319c951b5b21d24cea8a9e5e9d9896418fa9232ec0c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 348, + "startColumn": 7, + "charOffset": 8379, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 346, + "startColumn": 7, + "charOffset": 8282, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getStackSize()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (!itemType) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d0b85535462bba5c5b2eb791d8b26b9a99478e46291f873980e94a335ef5312" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 353, + "startColumn": 2, + "charOffset": 8426, + "charLength": 8, + "snippet": { + "text": "uint64_t" + } + }, + "contextRegion": { + "startLine": 351, + "startColumn": 2, + "charOffset": 8421, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tuint64_t stackSize = static_cast(itemType->stackSize);\n\tlua_pushnumber(L, stackSize);\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24af7d8adfa7611aa9692ee3ea2f2e580141253796bee2d2f5ab9f3b57bc4c1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 354, + "startColumn": 20, + "charOffset": 8510, + "charLength": 9, + "snippet": { + "text": "stackSize" + } + }, + "contextRegion": { + "startLine": 352, + "startColumn": 20, + "charOffset": 8424, + "charLength": 9, + "snippet": { + "text": "\n\tuint64_t stackSize = static_cast(itemType->stackSize);\n\tlua_pushnumber(L, stackSize);\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef63e609c61de563e1cddceb7d70726e98feb550177b60758fa78b2c8635de97" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 354, + "startColumn": 20, + "charOffset": 8510, + "charLength": 9, + "snippet": { + "text": "stackSize" + } + }, + "contextRegion": { + "startLine": 352, + "startColumn": 20, + "charOffset": 8424, + "charLength": 9, + "snippet": { + "text": "\n\tuint64_t stackSize = static_cast(itemType->stackSize);\n\tlua_pushnumber(L, stackSize);\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc3840aa1053e4ceeb5a6cfca4e61932b20d3c53a05ba8dbec468db905b32469" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 360, + "startColumn": 8, + "charOffset": 8634, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 358, + "startColumn": 8, + "charOffset": 8536, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetHitChance(lua_State* L) {\n\t// itemType:getHitChance()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->hitChance);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0727c09db2836680d6705304a9b707b8da7fba46f7ea9575bc97c532d9433109" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 361, + "startColumn": 6, + "charOffset": 8695, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 359, + "startColumn": 6, + "charOffset": 8599, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getHitChance()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->hitChance);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e8b58897684b3502c21154bf2716331b7ac329b645f3b85a3a01c308f86e990" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 361, + "startColumn": 6, + "charOffset": 8695, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 359, + "startColumn": 6, + "charOffset": 8599, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getHitChance()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->hitChance);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b9d6c5f49c773ef38440aa564042fb3637cd50db6c1ddd5c4b7d0fd0cd5b621" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 362, + "startColumn": 21, + "charOffset": 8727, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 360, + "startColumn": 21, + "charOffset": 8627, + "charLength": 8, + "snippet": { + "text": "\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->hitChance);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8315da2eb839ebf398be0f24ac0491e5dfa1e26b4bfa5746b34fd2591fb965df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 371, + "startColumn": 8, + "charOffset": 8894, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 369, + "startColumn": 8, + "charOffset": 8794, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetShootRange(lua_State* L) {\n\t// itemType:getShootRange()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->shootRange);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca5ab4a0c7acc850b4c63cb605df40481eed88c86e7cfa2d32ccd757c81a87fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 372, + "startColumn": 6, + "charOffset": 8955, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 370, + "startColumn": 6, + "charOffset": 8858, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getShootRange()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->shootRange);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2adc11a0580b5c796ece34b2fbc2ac0dfb07b469c3a02976bbed62177ee46a8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 372, + "startColumn": 6, + "charOffset": 8955, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 370, + "startColumn": 6, + "charOffset": 8858, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getShootRange()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->shootRange);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "868222602b75a9f4d0d453a7601c8c4af5704d4ae98ec4dc50870f13b461e86b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 373, + "startColumn": 21, + "charOffset": 8987, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 371, + "startColumn": 21, + "charOffset": 8887, + "charLength": 8, + "snippet": { + "text": "\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->shootRange);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e8831260ab755ad937f2502f5a246f1d8d71e1849023f1d31112a3e97b7860d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 382, + "startColumn": 8, + "charOffset": 9147, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 380, + "startColumn": 8, + "charOffset": 9055, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetAttack(lua_State* L) {\n\t// itemType:getAttack()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->attack);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2f71958b732895d892828aa6d007ed02380f37f08fb1653bf10ab387125ceda" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 383, + "startColumn": 6, + "charOffset": 9208, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 381, + "startColumn": 6, + "charOffset": 9115, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getAttack()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->attack);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72754ee9cfacb2f5638936f078701927a69954385ebd98bc5ca4409cc1c314f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 383, + "startColumn": 6, + "charOffset": 9208, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 381, + "startColumn": 6, + "charOffset": 9115, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getAttack()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->attack);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "906c391c4b3ba699d2c2256cb4765a7ec29cf3ab6713732cac805d30d7d06769" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 384, + "startColumn": 21, + "charOffset": 9240, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 382, + "startColumn": 21, + "charOffset": 9140, + "charLength": 8, + "snippet": { + "text": "\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->attack);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0c64042d11881dcf4286e0a2f4927dd48aa2dc5eabe83236a4028ca90212adc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 393, + "startColumn": 8, + "charOffset": 9398, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 391, + "startColumn": 8, + "charOffset": 9304, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetDefense(lua_State* L) {\n\t// itemType:getDefense()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->defense);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b2c99d3cf988650ed639b65c3bb56312e3c3eec74b222daa11e9d90207055f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 394, + "startColumn": 6, + "charOffset": 9459, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 392, + "startColumn": 6, + "charOffset": 9365, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getDefense()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->defense);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b00578121db079b05c259c133b75e019d2e1b0268a4ffc66f4bae89d99ebcb12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 394, + "startColumn": 6, + "charOffset": 9459, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 392, + "startColumn": 6, + "charOffset": 9365, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getDefense()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->defense);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b315316124647739179e47e92777ab7ab90ad38edd67f07ebe4e0167192b5885" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 395, + "startColumn": 21, + "charOffset": 9491, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 393, + "startColumn": 21, + "charOffset": 9391, + "charLength": 8, + "snippet": { + "text": "\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->defense);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d644d86af2dec4189b49c3603b49a6478c3842210f7da3b8a79d9b5335fb3b73" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 404, + "startColumn": 8, + "charOffset": 9660, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 402, + "startColumn": 8, + "charOffset": 9556, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetExtraDefense(lua_State* L) {\n\t// itemType:getExtraDefense()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->extraDefense);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f5d280f86ba2e534ddfadde48a8ed24986ab78372b324479450b0699b59c4fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 405, + "startColumn": 6, + "charOffset": 9721, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 403, + "startColumn": 6, + "charOffset": 9622, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getExtraDefense()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->extraDefense);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77ea9bcb48204e0dc2a1f165721e12221848e9a4a133e16d80711e917eec6a3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 405, + "startColumn": 6, + "charOffset": 9721, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 403, + "startColumn": 6, + "charOffset": 9622, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getExtraDefense()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->extraDefense);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ecb19e94d4dcca92578f6c2aeb4afced55d3efa0f5b171e8391a41f3f6f64ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 406, + "startColumn": 21, + "charOffset": 9753, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 404, + "startColumn": 21, + "charOffset": 9653, + "charLength": 8, + "snippet": { + "text": "\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->extraDefense);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36a25ff2cf3809912f91841922af820d1463e975e64cbf425e95dbe590cd976f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 415, + "startColumn": 8, + "charOffset": 9929, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 413, + "startColumn": 8, + "charOffset": 9823, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetImbuementSlot(lua_State* L) {\n\t// itemType:getImbuementSlot()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->imbuementSlot);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0902f9463e0427a84589d94485d73eccdf57178f58a7e4691fef4edc45e260cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 416, + "startColumn": 6, + "charOffset": 9990, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 414, + "startColumn": 6, + "charOffset": 9890, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getImbuementSlot()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->imbuementSlot);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2bff849c8f302fd7ce3175a85de3362c1f995b95c7318067994863082c25dd7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 416, + "startColumn": 6, + "charOffset": 9990, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 414, + "startColumn": 6, + "charOffset": 9890, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getImbuementSlot()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->imbuementSlot);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33aa8efeca98707308546c75954ba5f802796c28bd8d271c1800f32763c0a19b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 417, + "startColumn": 21, + "charOffset": 10022, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 415, + "startColumn": 21, + "charOffset": 9922, + "charLength": 8, + "snippet": { + "text": "\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->imbuementSlot);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b95de0b3c58f0d822139aeb5ef8046c613989409d70797ad0f266341b0a321e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 426, + "startColumn": 8, + "charOffset": 10183, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 424, + "startColumn": 8, + "charOffset": 10093, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetArmor(lua_State* L) {\n\t// itemType:getArmor()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->armor);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99bb2b26e0e96f82a763c5dbd0844b4e427cb8d0d803fe6d183fa74b500adcc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 427, + "startColumn": 6, + "charOffset": 10244, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 425, + "startColumn": 6, + "charOffset": 10152, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getArmor()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->armor);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c7130c92181da2725f17ba7d74d9dbabd943df00f6fa10ae394a261295176f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 427, + "startColumn": 6, + "charOffset": 10244, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 425, + "startColumn": 6, + "charOffset": 10152, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getArmor()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->armor);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d9b8a0073d6208f4e541ed653ddbabbb489c3ea2605286d49767ebdf485b34a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 428, + "startColumn": 21, + "charOffset": 10276, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 426, + "startColumn": 21, + "charOffset": 10176, + "charLength": 8, + "snippet": { + "text": "\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->armor);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e12f6baec722bdb205ccda9689a366f5e761cf47045f9e4568d947fb8dd225e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 437, + "startColumn": 8, + "charOffset": 10439, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 435, + "startColumn": 8, + "charOffset": 10339, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetWeaponType(lua_State* L) {\n\t// itemType:getWeaponType()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->weaponType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99bb2b26e0e96f82a763c5dbd0844b4e427cb8d0d803fe6d183fa74b500adcc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 438, + "startColumn": 6, + "charOffset": 10500, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 436, + "startColumn": 6, + "charOffset": 10403, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getWeaponType()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->weaponType);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c7130c92181da2725f17ba7d74d9dbabd943df00f6fa10ae394a261295176f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 438, + "startColumn": 6, + "charOffset": 10500, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 436, + "startColumn": 6, + "charOffset": 10403, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getWeaponType()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->weaponType);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d9b8a0073d6208f4e541ed653ddbabbb489c3ea2605286d49767ebdf485b34a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 439, + "startColumn": 21, + "charOffset": 10532, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 437, + "startColumn": 21, + "charOffset": 10432, + "charLength": 8, + "snippet": { + "text": "\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->weaponType);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e12f6baec722bdb205ccda9689a366f5e761cf47045f9e4568d947fb8dd225e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 448, + "startColumn": 8, + "charOffset": 10696, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 446, + "startColumn": 8, + "charOffset": 10600, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetAmmoType(lua_State* L) {\n\t// itemType:getAmmoType()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->ammoType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9aac76a8b36fd524f2e4eb8069e009221a74f83be677dfca1c0db85219308551" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 449, + "startColumn": 6, + "charOffset": 10757, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 447, + "startColumn": 6, + "charOffset": 10662, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getAmmoType()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->ammoType);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0c60d5664b32e01d3ef70087bb05ba8a4bed646ae9e44246c309ba94c01863c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 449, + "startColumn": 6, + "charOffset": 10757, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 447, + "startColumn": 6, + "charOffset": 10662, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getAmmoType()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->ammoType);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d870bf2e66094e44a863a27af23d8755baf1cb269b39eb470c32e3daab783bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 450, + "startColumn": 21, + "charOffset": 10789, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 448, + "startColumn": 21, + "charOffset": 10689, + "charLength": 8, + "snippet": { + "text": "\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->ammoType);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0ca44ab3e6d35d8d9c4cd56cc81f1a24517358e71796e8d2bf06f49ed4a8964" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 459, + "startColumn": 8, + "charOffset": 10957, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 457, + "startColumn": 8, + "charOffset": 10855, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetElementType(lua_State* L) {\n\t// itemType:getElementType()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (!itemType) {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dba6ce0e8a173ee188e5986073f6f2d266891cb92edacad218e066a9ce3b0653" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 460, + "startColumn": 6, + "charOffset": 11018, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 458, + "startColumn": 6, + "charOffset": 10920, + "charLength": 1, + "snippet": { + "text": "\t// itemType:getElementType()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (!itemType) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29971517f44a5c58b2c06d21e1f4ea92a053e8558b93cb2116d259f7162d6b49" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 460, + "startColumn": 7, + "charOffset": 11019, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 458, + "startColumn": 7, + "charOffset": 10920, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getElementType()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (!itemType) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e181829e362091ef41314b44552da54c98afb557f232296fb260c6cb92e4e85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &abilities' can be declared as 'const auto &abilities'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 465, + "startColumn": 2, + "charOffset": 11066, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 463, + "startColumn": 2, + "charOffset": 11061, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tauto &abilities = itemType->abilities;\n\tif (abilities) {\n\t\tlua_pushnumber(L, abilities->elementType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d70658acb09c2caf8bd778852f0d886387786f1fa318a16cdd7a56907d0d0ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 467, + "startColumn": 21, + "charOffset": 11143, + "charLength": 9, + "snippet": { + "text": "abilities" + } + }, + "contextRegion": { + "startLine": 465, + "startColumn": 21, + "charOffset": 11065, + "charLength": 9, + "snippet": { + "text": "\tauto &abilities = itemType->abilities;\n\tif (abilities) {\n\t\tlua_pushnumber(L, abilities->elementType);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1101002c6fc683a9e0ef256327a070323d44be4b30bb11d74fe15d1578521b91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 476, + "startColumn": 8, + "charOffset": 11319, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 474, + "startColumn": 8, + "charOffset": 11213, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetElementDamage(lua_State* L) {\n\t// itemType:getElementDamage()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (!itemType) {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf30088c592e4ce0051616feecc8914ef5019ce4786c3fe5d8ad1be172d0f4c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 477, + "startColumn": 6, + "charOffset": 11380, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 475, + "startColumn": 6, + "charOffset": 11280, + "charLength": 1, + "snippet": { + "text": "\t// itemType:getElementDamage()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (!itemType) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a4bb0d888dd7e8451c8d23f85ffb51e995a1ae06b802a1cea7c86473ee030e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 477, + "startColumn": 7, + "charOffset": 11381, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 475, + "startColumn": 7, + "charOffset": 11280, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getElementDamage()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (!itemType) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d49c79894451e8ccf3dd65d875c4a06dd874115b2c6b8b8bf804069b9d80f82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &abilities' can be declared as 'const auto &abilities'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 482, + "startColumn": 2, + "charOffset": 11428, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 480, + "startColumn": 2, + "charOffset": 11423, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tauto &abilities = itemType->abilities;\n\tif (abilities) {\n\t\tlua_pushnumber(L, abilities->elementDamage);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "934c7c1cfc7c21d896d8bc5f785eef97e72b9a2553ee129ce7520e13d568a77e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 484, + "startColumn": 21, + "charOffset": 11505, + "charLength": 9, + "snippet": { + "text": "abilities" + } + }, + "contextRegion": { + "startLine": 482, + "startColumn": 21, + "charOffset": 11427, + "charLength": 9, + "snippet": { + "text": "\tauto &abilities = itemType->abilities;\n\tif (abilities) {\n\t\tlua_pushnumber(L, abilities->elementDamage);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c95cc97934f8fcb0910fd6a04b2ad281ec390be6808ae0248ac8a121dbb54d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 493, + "startColumn": 8, + "charOffset": 11689, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 491, + "startColumn": 8, + "charOffset": 11577, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetTransformEquipId(lua_State* L) {\n\t// itemType:getTransformEquipId()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->transformEquipTo);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a19c639245be8a40806bd8e5245e56ea32ed4492b3283ec7276ec50dcd76d499" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 494, + "startColumn": 6, + "charOffset": 11750, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 492, + "startColumn": 6, + "charOffset": 11647, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getTransformEquipId()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->transformEquipTo);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbf45eb2a5340ebf199ba608aa74e4cbdfa556eb9bab331df37557084b6b4506" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 494, + "startColumn": 6, + "charOffset": 11750, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 492, + "startColumn": 6, + "charOffset": 11647, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getTransformEquipId()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->transformEquipTo);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2510799c6ad94a330036587bb6527a08e0dfb2b90d6870e2e2589957e43f4f79" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 495, + "startColumn": 21, + "charOffset": 11782, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 493, + "startColumn": 21, + "charOffset": 11682, + "charLength": 8, + "snippet": { + "text": "\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->transformEquipTo);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33c515267a68a620e5a3bea1e6fbfa39732a666f48168a26245fe8d87669d011" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 504, + "startColumn": 8, + "charOffset": 11972, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 502, + "startColumn": 8, + "charOffset": 11856, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetTransformDeEquipId(lua_State* L) {\n\t// itemType:getTransformDeEquipId()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->transformDeEquipTo);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d85a9a25f97fafba422a2e594b2e69e03a55dedbea9dab95070999f6bc97aa17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 505, + "startColumn": 6, + "charOffset": 12033, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 503, + "startColumn": 6, + "charOffset": 11928, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getTransformDeEquipId()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->transformDeEquipTo);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67154e4d705ea3948b8f083d1ee53fc29a64f333f068539d5da21595a0e3d24f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 505, + "startColumn": 6, + "charOffset": 12033, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 503, + "startColumn": 6, + "charOffset": 11928, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getTransformDeEquipId()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->transformDeEquipTo);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1cf45d63c10e27373d524e0c3ca7bc12cdb3518e85674691240dbb9233d0815" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 506, + "startColumn": 21, + "charOffset": 12065, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 504, + "startColumn": 21, + "charOffset": 11965, + "charLength": 8, + "snippet": { + "text": "\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->transformDeEquipTo);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43f50505b7b968084b15b1341559e6b9d742d713894197207fad0a58400d59d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 515, + "startColumn": 8, + "charOffset": 12239, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 513, + "startColumn": 8, + "charOffset": 12141, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetDestroyId(lua_State* L) {\n\t// itemType:getDestroyId()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->destroyTo);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "656cdc1ebe74e11af4d80b05f163b26b981bc34f27d802e6c4ac01c782b5a79f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 516, + "startColumn": 6, + "charOffset": 12300, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 514, + "startColumn": 6, + "charOffset": 12204, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getDestroyId()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->destroyTo);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a564833b45e3473ab39de32cbd6b8661303136ac77be3af59942d3961360bc99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 516, + "startColumn": 6, + "charOffset": 12300, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 514, + "startColumn": 6, + "charOffset": 12204, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getDestroyId()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->destroyTo);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "736eba70ba3738918939bf7f8e8d2c68fc834f590f0ef769e7ae78282102f8b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 517, + "startColumn": 21, + "charOffset": 12332, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 515, + "startColumn": 21, + "charOffset": 12232, + "charLength": 8, + "snippet": { + "text": "\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->destroyTo);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66abeeb67937ec8ceb61fc93bea618b456fa39599f9f79f22bb37e917943e0b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 526, + "startColumn": 8, + "charOffset": 12493, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 524, + "startColumn": 8, + "charOffset": 12399, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetDecayId(lua_State* L) {\n\t// itemType:getDecayId()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->decayTo);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dba6ce0e8a173ee188e5986073f6f2d266891cb92edacad218e066a9ce3b0653" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 527, + "startColumn": 6, + "charOffset": 12554, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 525, + "startColumn": 6, + "charOffset": 12460, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getDecayId()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->decayTo);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "acf0bef1f9d7013384f69d82dc3741b85e9f56abcf2fa8024bc9e51dff6de50f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 527, + "startColumn": 6, + "charOffset": 12554, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 525, + "startColumn": 6, + "charOffset": 12460, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getDecayId()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->decayTo);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5fb35dc7b235e3ff78e2b62460ae54dea482d36500b08f73df79ed799b8f019" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 528, + "startColumn": 21, + "charOffset": 12586, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 526, + "startColumn": 21, + "charOffset": 12486, + "charLength": 8, + "snippet": { + "text": "\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->decayTo);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37a068a525c2ba0435562d4d250e67b85245a27b5922f25df6d6acb416751bae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 537, + "startColumn": 8, + "charOffset": 12757, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 535, + "startColumn": 8, + "charOffset": 12651, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetRequiredLevel(lua_State* L) {\n\t// itemType:getRequiredLevel()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->minReqLevel);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7097d8dda7a2d37b8d2338fd63032389a5562caabfe1fc8bf4c138fe701cf16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 538, + "startColumn": 6, + "charOffset": 12818, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 536, + "startColumn": 6, + "charOffset": 12718, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getRequiredLevel()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->minReqLevel);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1893fbcb62c1d8f0d96b0b5ac041fbf21869977ca7c60afa91dcd79564d83fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 538, + "startColumn": 6, + "charOffset": 12818, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 536, + "startColumn": 6, + "charOffset": 12718, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getRequiredLevel()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->minReqLevel);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a68ad4fc0ec2b4b3a22f6630fab42aa92c1ea71d6d86c60de7fb522d4026e260" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 539, + "startColumn": 21, + "charOffset": 12850, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 537, + "startColumn": 21, + "charOffset": 12750, + "charLength": 8, + "snippet": { + "text": "\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->minReqLevel);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cdd2efc8e2b7b65b261e922ee777f44d86009e8cd8e16d629baba9b7c0beec8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 548, + "startColumn": 8, + "charOffset": 13009, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 546, + "startColumn": 8, + "charOffset": 12919, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetSpeed(lua_State* L) {\n\t// itemType:getSpeed()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (!itemType) {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e2f1c43b20512fb17c4fa0dc90bc05e26f3a334a9cf8813ece808580bad8f48" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 549, + "startColumn": 6, + "charOffset": 13070, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 547, + "startColumn": 6, + "charOffset": 12978, + "charLength": 1, + "snippet": { + "text": "\t// itemType:getSpeed()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (!itemType) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e1b35d9771bd613cecb2548be99355b7e7499026435c11feb34369f70ff1319" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 549, + "startColumn": 7, + "charOffset": 13071, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 547, + "startColumn": 7, + "charOffset": 12978, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getSpeed()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (!itemType) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bea6fa4551e4316bee9a827fc73bfad091a71156bcbde6534033c94f77189e2b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &abilities' can be declared as 'const auto &abilities'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 554, + "startColumn": 2, + "charOffset": 13118, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 552, + "startColumn": 2, + "charOffset": 13113, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tauto &abilities = itemType->abilities;\n\tif (abilities) {\n\t\tlua_pushnumber(L, abilities->speed);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc74f1647e28fc73df4b5afd3fc4df8d128c11b6b3de7f2eba780072a31ae775" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 556, + "startColumn": 21, + "charOffset": 13195, + "charLength": 9, + "snippet": { + "text": "abilities" + } + }, + "contextRegion": { + "startLine": 554, + "startColumn": 21, + "charOffset": 13117, + "charLength": 9, + "snippet": { + "text": "\tauto &abilities = itemType->abilities;\n\tif (abilities) {\n\t\tlua_pushnumber(L, abilities->speed);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53b7eea5a7d6920a883cdb88a0cd7e2b56653e2c5f9fe8e2d6482e963099c733" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 565, + "startColumn": 8, + "charOffset": 13357, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 563, + "startColumn": 8, + "charOffset": 13259, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetBaseSpeed(lua_State* L) {\n\t// itemType:getBaseSpeed()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->speed);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c8fb5c193e0aedc6b6f5754c7f660732a4c382ca98a9ca3480444262d434881" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 566, + "startColumn": 6, + "charOffset": 13418, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 564, + "startColumn": 6, + "charOffset": 13322, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getBaseSpeed()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->speed);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11a567f314b67534ec8757127580beef183b4cfeb6921409dffb12b4d2e7e181" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 566, + "startColumn": 6, + "charOffset": 13418, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 564, + "startColumn": 6, + "charOffset": 13322, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getBaseSpeed()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->speed);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b71e1644d61ba01416f4e8453047c8e862430266b101447c74239596bf883c9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 567, + "startColumn": 21, + "charOffset": 13450, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 565, + "startColumn": 21, + "charOffset": 13350, + "charLength": 8, + "snippet": { + "text": "\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->speed);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb4922e3de0239c1d5e67994a846807ba9f2be2812bfdfefcd81499b92dcbc59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 576, + "startColumn": 8, + "charOffset": 13611, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 574, + "startColumn": 8, + "charOffset": 13513, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetDecayTime(lua_State* L) {\n\t// itemType:getDecayTime()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->decayTime);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2276061ec27418c14abad1b5d29406e67ea6969256d96aa4b740cda4fbd1808f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 577, + "startColumn": 6, + "charOffset": 13672, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 575, + "startColumn": 6, + "charOffset": 13576, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getDecayTime()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->decayTime);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0a74f303a4ce5541d01eb7b4936d50dd9ec508a8befb96230956ce372e74aa6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 577, + "startColumn": 6, + "charOffset": 13672, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 575, + "startColumn": 6, + "charOffset": 13576, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getDecayTime()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->decayTime);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "131c50d4c40e7e216eb07e5b5fa7008bae354d613348021edbf713015c3b0d5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 578, + "startColumn": 21, + "charOffset": 13704, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 576, + "startColumn": 21, + "charOffset": 13604, + "charLength": 8, + "snippet": { + "text": "\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->decayTime);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "154608b553bfd8219587e97222679945f53765188bf5bdeb0ec0bb0867ec93df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 587, + "startColumn": 8, + "charOffset": 13875, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 585, + "startColumn": 8, + "charOffset": 13771, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetShowDuration(lua_State* L) {\n\t// itemType:getShowDuration()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushboolean(L, itemType->showDuration);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f04ae4c9cb05e2b1f3dba5400b12bc224ea8e584f809bea67c5988e94b4699d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 588, + "startColumn": 6, + "charOffset": 13936, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 586, + "startColumn": 6, + "charOffset": 13837, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getShowDuration()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushboolean(L, itemType->showDuration);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b3aa3d1bd5adce979e14f7bd0d8adc93ab222649fad6425afb16894e65f49b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 588, + "startColumn": 6, + "charOffset": 13936, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 586, + "startColumn": 6, + "charOffset": 13837, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getShowDuration()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushboolean(L, itemType->showDuration);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f55841b5fb720d9d0d322655a383175f49411ce89f996fd61d6e46add954fe7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 589, + "startColumn": 22, + "charOffset": 13969, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 587, + "startColumn": 22, + "charOffset": 13868, + "charLength": 8, + "snippet": { + "text": "\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushboolean(L, itemType->showDuration);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46a8d1b6abe97a0298b5fb61d0335f392ee56f98f120d3996d0a48908dbfcfc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 597, + "startColumn": 8, + "charOffset": 14138, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 595, + "startColumn": 8, + "charOffset": 14038, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetWrapableTo(lua_State* L) {\n\t// itemType:getWrapableTo()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->wrapableTo);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75c6a80b5cc2f9dd0a6dda6ce8f27f08f2e058d864c8db5207d98ee173b9a744" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 598, + "startColumn": 6, + "charOffset": 14199, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 596, + "startColumn": 6, + "charOffset": 14102, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getWrapableTo()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->wrapableTo);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07ca4be5b121817241e0da0cd6d8e5a808814212ba7a253fc9a4ad4d0d843edc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 598, + "startColumn": 6, + "charOffset": 14199, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 596, + "startColumn": 6, + "charOffset": 14102, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getWrapableTo()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->wrapableTo);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "376315b0fb405432267726c01656f7aeb78e83dda4a9fbea8bd7af6ab18ef058" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 599, + "startColumn": 21, + "charOffset": 14231, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 597, + "startColumn": 21, + "charOffset": 14131, + "charLength": 8, + "snippet": { + "text": "\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tlua_pushnumber(L, itemType->wrapableTo);\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd162ab7a9e59f8d5a4145b2d4c6025828f08b185ff0c9fa72bab1a5769d18eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 608, + "startColumn": 8, + "charOffset": 14393, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 606, + "startColumn": 8, + "charOffset": 14299, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeHasSubType(lua_State* L) {\n\t// itemType:hasSubType()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->hasSubType());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a8fe9c83c1250ce5502a5a991ea83731797ecc89865c2db406df3bf9efafe6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 609, + "startColumn": 6, + "charOffset": 14454, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 607, + "startColumn": 6, + "charOffset": 14360, + "charLength": 8, + "snippet": { + "text": "\t// itemType:hasSubType()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->hasSubType());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68bd5038df7f55e2dcc7766f526297f17d4abdd09aea1aabb7e73809552f622e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 609, + "startColumn": 6, + "charOffset": 14454, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 607, + "startColumn": 6, + "charOffset": 14360, + "charLength": 8, + "snippet": { + "text": "\t// itemType:hasSubType()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushBoolean(L, itemType->hasSubType());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c36c6e12658001cde7c69e84ba007b2b9e9e32310dbf6f086b9c036274ea147c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 619, + "startColumn": 8, + "charOffset": 14661, + "charLength": 8, + "snippet": { + "text": "ItemType" + } + }, + "contextRegion": { + "startLine": 617, + "startColumn": 8, + "charOffset": 14553, + "charLength": 8, + "snippet": { + "text": "int ItemTypeFunctions::luaItemTypeGetVocationString(lua_State* L) {\n\t// itemType:getVocationString()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushString(L, itemType->vocationString);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fde2984b73c7f3663364415080d99d1fed08c9e51afe8ecac39773859d03d24d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 620, + "startColumn": 6, + "charOffset": 14722, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 618, + "startColumn": 6, + "charOffset": 14621, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getVocationString()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushString(L, itemType->vocationString);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5dfe2d18edbca360ece95a1d6f0e1b4ea586d3d6565683a7a869cd7b5869025" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemType *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/item_type_functions.cpp" + }, + "region": { + "startLine": 620, + "startColumn": 6, + "charOffset": 14722, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 618, + "startColumn": 6, + "charOffset": 14621, + "charLength": 8, + "snippet": { + "text": "\t// itemType:getVocationString()\n\tconst ItemType* itemType = getUserdata(L, 1);\n\tif (itemType) {\n\t\tpushString(L, itemType->vocationString);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11edc41dbf5ac2e31b094ad805596ff06e6eaa10b09c269ea382ce4698662837" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp" + }, + "region": { + "startLine": 25, + "startColumn": 3, + "charOffset": 763, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 3, + "charOffset": 723, + "charLength": 4, + "snippet": { + "text": "\tswitch (type) {\n\t\tcase WEAPON_SWORD:\n\t\tcase WEAPON_AXE:\n\t\tcase WEAPON_CLUB: {\n\t\t\tif (auto weaponPtr = g_luaEnvironment().createWeaponObject(getScriptEnv()->getScriptInterface())) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c66b1361a37c02bcd787fbe7f88556eeecae5be1ddcae7b05daaa4ab364f5f12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 3, + "charOffset": 782, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 3, + "charOffset": 740, + "charLength": 4, + "snippet": { + "text": "\t\tcase WEAPON_SWORD:\n\t\tcase WEAPON_AXE:\n\t\tcase WEAPON_CLUB: {\n\t\t\tif (auto weaponPtr = g_luaEnvironment().createWeaponObject(getScriptEnv()->getScriptInterface())) {\n\t\t\t\tpushUserdata(L, weaponPtr);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbdc61d98842fb5c35019c01c34871ea66697c45adc421dee0b00a29986d56c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp" + }, + "region": { + "startLine": 37, + "startColumn": 3, + "charOffset": 1108, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 35, + "startColumn": 3, + "charOffset": 1079, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t\tcase WEAPON_MISSILE:\n\t\tcase WEAPON_DISTANCE:\n\t\tcase WEAPON_AMMO: {\n\t\t\tif (auto weaponPtr = g_luaEnvironment().createWeaponObject(getScriptEnv()->getScriptInterface())) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98b7a843e915bb8521556cdae49a48189f725b893ae7ae5ffc33b75c151069a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 3, + "charOffset": 1132, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 3, + "charOffset": 1083, + "charLength": 4, + "snippet": { + "text": "\t\tcase WEAPON_MISSILE:\n\t\tcase WEAPON_DISTANCE:\n\t\tcase WEAPON_AMMO: {\n\t\t\tif (auto weaponPtr = g_luaEnvironment().createWeaponObject(getScriptEnv()->getScriptInterface())) {\n\t\t\t\tpushUserdata(L, weaponPtr);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10fcf054a873719354e9fbc2ac99547eba5c2fedfb5e4ce831ac702996ea3661" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp" + }, + "region": { + "startLine": 94, + "startColumn": 6, + "charOffset": 2691, + "charLength": 9, + "snippet": { + "text": "weaponPtr" + } + }, + "contextRegion": { + "startLine": 92, + "startColumn": 6, + "charOffset": 2597, + "charLength": 9, + "snippet": { + "text": "\t// weapon:register()\n\tWeaponShared_ptr* weaponPtr = getRawUserDataShared(L, 1);\n\tif (weaponPtr && *weaponPtr) {\n\t\tWeaponShared_ptr weapon = *weaponPtr;\n\t\tif (weapon->weaponType == WEAPON_DISTANCE || weapon->weaponType == WEAPON_AMMO || weapon->weaponType == WEAPON_MISSILE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fce8d5e0df515f40c652bef2b1284f8745bf032b9c38a48a38fe4302c6568ee6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'WeaponShared_ptr *' (aka 'shared_ptr *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp" + }, + "region": { + "startLine": 94, + "startColumn": 6, + "charOffset": 2691, + "charLength": 9, + "snippet": { + "text": "weaponPtr" + } + }, + "contextRegion": { + "startLine": 92, + "startColumn": 6, + "charOffset": 2597, + "charLength": 9, + "snippet": { + "text": "\t// weapon:register()\n\tWeaponShared_ptr* weaponPtr = getRawUserDataShared(L, 1);\n\tif (weaponPtr && *weaponPtr) {\n\t\tWeaponShared_ptr weapon = *weaponPtr;\n\t\tif (weapon->weaponType == WEAPON_DISTANCE || weapon->weaponType == WEAPON_AMMO || weapon->weaponType == WEAPON_MISSILE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bce331b6b1d8e57cf0c2a2f4ddd2ebeb0fa3196c032a9081a0b5522850c34fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp" + }, + "region": { + "startLine": 94, + "startColumn": 16, + "charOffset": 2701, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 92, + "startColumn": 16, + "charOffset": 2597, + "charLength": 2, + "snippet": { + "text": "\t// weapon:register()\n\tWeaponShared_ptr* weaponPtr = getRawUserDataShared(L, 1);\n\tif (weaponPtr && *weaponPtr) {\n\t\tWeaponShared_ptr weapon = *weaponPtr;\n\t\tif (weapon->weaponType == WEAPON_DISTANCE || weapon->weaponType == WEAPON_AMMO || weapon->weaponType == WEAPON_MISSILE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06d9fe5caa749f0e2fffebcced32133e8bb59367ac5fd737d534b0b28bdfa902" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 26, + "charOffset": 6523, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 26, + "charOffset": 6416, + "charLength": 9, + "snippet": { + "text": "\tconst WeaponShared_ptr &weapon = getUserdataShared(L, 1);\n\tif (weapon) {\n\t\tweapon->setBreakChance(getNumber(L, 2));\n\t\tpushBoolean(L, true);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b7b7a0732372e29d77311975d3bb8c9034208ac99bb08b2f3da4159e093937d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp" + }, + "region": { + "startLine": 254, + "startColumn": 24, + "charOffset": 6849, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 24, + "charOffset": 6752, + "charLength": 9, + "snippet": { + "text": "\tconst auto &weapon = getUserdataShared(L, 1);\n\tif (weapon) {\n\t\tweapon->setMinChange(getNumber(L, 2));\n\t\tif (lua_gettop(L) > 2) {\n\t\t\tweapon->setMaxChange(getNumber(L, 3));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b584c7c07c5c5399605733d6e30c58e22c23f600d5c399c2b40e83d1bb971ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp" + }, + "region": { + "startLine": 256, + "startColumn": 25, + "charOffset": 6928, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 254, + "startColumn": 25, + "charOffset": 6826, + "charLength": 9, + "snippet": { + "text": "\t\tweapon->setMinChange(getNumber(L, 2));\n\t\tif (lua_gettop(L) > 2) {\n\t\t\tweapon->setMaxChange(getNumber(L, 3));\n\t\t} else {\n\t\t\tweapon->setMaxChange(getNumber(L, 2));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "791ba81855a427e109fcb1135d6b4cf71af8a555aaf28cee9ad13dfe108190f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp" + }, + "region": { + "startLine": 258, + "startColumn": 25, + "charOffset": 6991, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 256, + "startColumn": 25, + "charOffset": 6904, + "charLength": 9, + "snippet": { + "text": "\t\t\tweapon->setMaxChange(getNumber(L, 3));\n\t\t} else {\n\t\t\tweapon->setMaxChange(getNumber(L, 2));\n\t\t}\n\t\tpushBoolean(L, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d96962590331a7dfde0fd30f8549c39b4e688c6bb4c99569b67e6be5ab1b8a0f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp" + }, + "region": { + "startLine": 271, + "startColumn": 7, + "charOffset": 7265, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 269, + "startColumn": 7, + "charOffset": 7177, + "charLength": 1, + "snippet": { + "text": "\tconst WeaponShared_ptr &weapon = getUserdataShared(L, 1);\n\tif (weapon) {\n\t\tif (!getNumber(L, 2)) {\n\t\t\tstd::string element = getString(L, 2);\n\t\t\tstd::string tmpStrValue = asLowerCaseString(element);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e27b98d0cd8eaaec01b2e818ea2f194ee0de4887215020488396fb6d74f67333" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp" + }, + "region": { + "startLine": 271, + "startColumn": 7, + "charOffset": 7265, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 269, + "startColumn": 7, + "charOffset": 7177, + "charLength": 1, + "snippet": { + "text": "\tconst WeaponShared_ptr &weapon = getUserdataShared(L, 1);\n\tif (weapon) {\n\t\tif (!getNumber(L, 2)) {\n\t\t\tstd::string element = getString(L, 2);\n\t\t\tstd::string tmpStrValue = asLowerCaseString(element);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0ce62b034895402e2651e75f1e049e47c61517a8a23b6533a3b787da5ae15bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'typename std::enable_if::value, CombatType_t>::type' (aka 'CombatType_t') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp" + }, + "region": { + "startLine": 271, + "startColumn": 8, + "charOffset": 7266, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 269, + "startColumn": 8, + "charOffset": 7177, + "charLength": 9, + "snippet": { + "text": "\tconst WeaponShared_ptr &weapon = getUserdataShared(L, 1);\n\tif (weapon) {\n\t\tif (!getNumber(L, 2)) {\n\t\t\tstd::string element = getString(L, 2);\n\t\t\tstd::string tmpStrValue = asLowerCaseString(element);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24a52ed803ab7636c3929eb75edefaf9498ff28782f3dbfb5441e376dfafb6e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp" + }, + "region": { + "startLine": 517, + "startColumn": 22, + "charOffset": 13841, + "charLength": 14, + "snippet": { + "text": "SLOTP_TWO_HAND" + } + }, + "contextRegion": { + "startLine": 515, + "startColumn": 22, + "charOffset": 13789, + "charLength": 14, + "snippet": { + "text": "\n\t\tif (slot == \"two-handed\") {\n\t\t\tit.slotPosition = SLOTP_TWO_HAND;\n\t\t} else {\n\t\t\tit.slotPosition = SLOTP_HAND;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ffe3f4fc146ee9528a88e42f7dbdc6afaa4a4779df164885232f095083853d8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp" + }, + "region": { + "startLine": 519, + "startColumn": 22, + "charOffset": 13889, + "charLength": 10, + "snippet": { + "text": "SLOTP_HAND" + } + }, + "contextRegion": { + "startLine": 517, + "startColumn": 22, + "charOffset": 13820, + "charLength": 10, + "snippet": { + "text": "\t\t\tit.slotPosition = SLOTP_TWO_HAND;\n\t\t} else {\n\t\t\tit.slotPosition = SLOTP_HAND;\n\t\t}\n\t\tpushBoolean(L, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4a53f1b8ad4f034e807bc9369e7561cdaa4dda3b2c46953b697901761e8f894" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp" + }, + "region": { + "startLine": 590, + "startColumn": 7, + "charOffset": 15659, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 588, + "startColumn": 7, + "charOffset": 15593, + "charLength": 1, + "snippet": { + "text": "\t\tit.abilities->elementDamage = getNumber(L, 2);\n\n\t\tif (!getNumber(L, 3)) {\n\t\t\tstd::string element = getString(L, 3);\n\t\t\tstd::string tmpStrValue = asLowerCaseString(element);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aae328409ee0b670711edcee1f5cf910775046d346fcf28bafc970ab3b450b64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp" + }, + "region": { + "startLine": 590, + "startColumn": 7, + "charOffset": 15659, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 588, + "startColumn": 7, + "charOffset": 15593, + "charLength": 1, + "snippet": { + "text": "\t\tit.abilities->elementDamage = getNumber(L, 2);\n\n\t\tif (!getNumber(L, 3)) {\n\t\t\tstd::string element = getString(L, 3);\n\t\t\tstd::string tmpStrValue = asLowerCaseString(element);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ed8fae30904f17199c20351dcf24fac42ade05a590351e9c9370e8221097d6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'typename std::enable_if::value, CombatType_t>::type' (aka 'CombatType_t') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/items/weapon_functions.cpp" + }, + "region": { + "startLine": 590, + "startColumn": 8, + "charOffset": 15660, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 588, + "startColumn": 8, + "charOffset": 15593, + "charLength": 9, + "snippet": { + "text": "\t\tit.abilities->elementDamage = getNumber(L, 2);\n\n\t\tif (!getNumber(L, 3)) {\n\t\t\tstd::string element = getString(L, 3);\n\t\t\tstd::string tmpStrValue = asLowerCaseString(element);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e992b129c6ba68377eb581e6cba1257e8c7c2eb454e107e6a16f40a6863c3648" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 21, + "charOffset": 996, + "charLength": 5, + "snippet": { + "text": "house" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 21, + "charOffset": 899, + "charLength": 5, + "snippet": { + "text": "\t// house:getId()\n\tif (const auto &house = getUserdataShared(L, 1)) {\n\t\tlua_pushnumber(L, house->getId());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9379735e018cf5f76e4a76bfbd8a2a13bda818161faf5f2f85fb0a5f289a8fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 53, + "startColumn": 6, + "charOffset": 1399, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 6, + "charOffset": 1321, + "charLength": 1, + "snippet": { + "text": "\t// house:getTown()\n\tconst auto &house = getUserdataShared(L, 1);\n\tif (!house) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23ebda38841a72fd3b5ca3fa91ebcda3610b0748611d87bf951d123542a3e985" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 80, + "startColumn": 21, + "charOffset": 2013, + "charLength": 5, + "snippet": { + "text": "house" + } + }, + "contextRegion": { + "startLine": 78, + "startColumn": 21, + "charOffset": 1914, + "charLength": 5, + "snippet": { + "text": "\t// house:getRent()\n\tif (const auto &house = getUserdataShared(L, 1)) {\n\t\tlua_pushnumber(L, house->getRent());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "498a703ae31c23498de988eecc86597c1f2999d77885b9614e3618d26561dcf4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 90, + "startColumn": 6, + "charOffset": 2209, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 88, + "startColumn": 6, + "charOffset": 2130, + "charLength": 1, + "snippet": { + "text": "\t// house:getPrice()\n\tconst auto &house = getUserdataShared(L, 1);\n\tif (!house) {\n\t\treportErrorFunc(\"House not found\");\n\t\tlua_pushnumber(L, 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0bef38612bc452d2acdd3948b0eb7d36de037fb6c1c5bf28ffb78b01648b1526" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 3, + "charOffset": 2221, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 3, + "charOffset": 2151, + "charLength": 15, + "snippet": { + "text": "\tconst auto &house = getUserdataShared(L, 1);\n\tif (!house) {\n\t\treportErrorFunc(\"House not found\");\n\t\tlua_pushnumber(L, 0);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56c5214cfb47a50cbac44ecf8c60a52b6a0c38111de575cb0774c585c0d912e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 92, + "startColumn": 21, + "charOffset": 2277, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 90, + "startColumn": 21, + "charOffset": 2204, + "charLength": 1, + "snippet": { + "text": "\tif (!house) {\n\t\treportErrorFunc(\"House not found\");\n\t\tlua_pushnumber(L, 0);\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a3bfb224b3f9a41260de2926e7d0fd95a48439f6ced36d9dc7e1981798ee57b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 96, + "startColumn": 20, + "charOffset": 2316, + "charLength": 5, + "snippet": { + "text": "house" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 20, + "charOffset": 2293, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, house->getPrice());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f964b73a8f1e51a3645848aa1c2e2dd49a5451c9395b05d2fc1788ccc720f194" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 103, + "startColumn": 21, + "charOffset": 2511, + "charLength": 5, + "snippet": { + "text": "house" + } + }, + "contextRegion": { + "startLine": 101, + "startColumn": 21, + "charOffset": 2407, + "charLength": 5, + "snippet": { + "text": "\t// house:getOwnerGuid()\n\tif (const auto &house = getUserdataShared(L, 1)) {\n\t\tlua_pushnumber(L, house->getOwner());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a5b137465d3b919f6882aad634e8ae1b54cac9e499d6a725d33c52d4c99951e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 113, + "startColumn": 6, + "charOffset": 2747, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 111, + "startColumn": 6, + "charOffset": 2634, + "charLength": 1, + "snippet": { + "text": "\t// house:setHouseOwner(guid[, updateDatabase = true])\n\tconst auto &house = getUserdataShared(L, 1);\n\tif (!house) {\n\t\treportErrorFunc(\"House not found\");\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53c7a1782ad4235ff159ba553cc35797042c31d0f8c7958d8259eaa4950a3f55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 114, + "startColumn": 3, + "charOffset": 2759, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 112, + "startColumn": 3, + "charOffset": 2689, + "charLength": 15, + "snippet": { + "text": "\tconst auto &house = getUserdataShared(L, 1);\n\tif (!house) {\n\t\treportErrorFunc(\"House not found\");\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21ef542c369ad5ccbb4a3daa6ce7f59e7add6f52fc038b4c8bc64447302c3b1f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 140, + "startColumn": 3, + "charOffset": 3637, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 138, + "startColumn": 3, + "charOffset": 3630, + "charLength": 8, + "snippet": { + "text": "\t\t}\n\n\t\tuint32_t guid = getNumber(L, 2, 0);\n\t\thouse->setNewOwnerGuid(guid, false);\n\t\tpushBoolean(L, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99c462f01c05796334a71d8fad785892cf7a5b4f37d1ac8db61a51a2b1491672" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 141, + "startColumn": 26, + "charOffset": 3708, + "charLength": 4, + "snippet": { + "text": "guid" + } + }, + "contextRegion": { + "startLine": 139, + "startColumn": 26, + "charOffset": 3634, + "charLength": 4, + "snippet": { + "text": "\n\t\tuint32_t guid = getNumber(L, 2, 0);\n\t\thouse->setNewOwnerGuid(guid, false);\n\t\tpushBoolean(L, true);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f90615261cf468ca48462dab01bb4a92d6363863af98a08902ed3e4a2ac2553c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 152, + "startColumn": 6, + "charOffset": 3926, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 6, + "charOffset": 3849, + "charLength": 1, + "snippet": { + "text": "\t// house:hasItemOnTile()\n\tauto house = getUserdataShared(L, 1);\n\tif (!house) {\n\t\treportErrorFunc(\"House not found\");\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43962b1186a85238eaf52f99c40b8c455fa364efa88c72c6298c4ee664fcdc44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 153, + "startColumn": 3, + "charOffset": 3938, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 151, + "startColumn": 3, + "charOffset": 3875, + "charLength": 15, + "snippet": { + "text": "\tauto house = getUserdataShared(L, 1);\n\tif (!house) {\n\t\treportErrorFunc(\"House not found\");\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c36c20c73a7faa560f0c8450ff36170bf17f783afe4d639a21cd1746d5f5bb3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 165, + "startColumn": 6, + "charOffset": 4206, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 163, + "startColumn": 6, + "charOffset": 4123, + "charLength": 1, + "snippet": { + "text": "\t// house:hasNewOwnership(guid)\n\tauto house = getUserdataShared(L, 1);\n\tif (!house) {\n\t\treportErrorFunc(\"House not found\");\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c00134358b8a6e0142bd93b1bd2ff966531a60f34aa1f566b161a82c9e660ccb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 166, + "startColumn": 3, + "charOffset": 4218, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 3, + "charOffset": 4155, + "charLength": 15, + "snippet": { + "text": "\tauto house = getUserdataShared(L, 1);\n\tif (!house) {\n\t\treportErrorFunc(\"House not found\");\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c434f88ba766e9bb742c1a731578acf6b45a826c77f3c17637ac603acd18d72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 182, + "startColumn": 6, + "charOffset": 4778, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 180, + "startColumn": 6, + "charOffset": 4699, + "charLength": 1, + "snippet": { + "text": "\tstd::shared_ptr tradePartner = getUserdataShared(L, 3);\n\n\tif (!player || !tradePartner || !house) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df25f9316227ee8412cadee216443ae27b25c84fc7ab512172b752f14ff87d7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 182, + "startColumn": 17, + "charOffset": 4789, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 180, + "startColumn": 17, + "charOffset": 4699, + "charLength": 1, + "snippet": { + "text": "\tstd::shared_ptr tradePartner = getUserdataShared(L, 3);\n\n\tif (!player || !tradePartner || !house) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ae901dba8c1feec85cea676b577f57654155d293ec1fafa91167faae8deeb8f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 182, + "startColumn": 34, + "charOffset": 4806, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 180, + "startColumn": 34, + "charOffset": 4699, + "charLength": 1, + "snippet": { + "text": "\tstd::shared_ptr tradePartner = getUserdataShared(L, 3);\n\n\tif (!player || !tradePartner || !house) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cabdbe77fe956608c2b92e032afc8a54ccc0eb3307ce432ede6632820bfaffac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 188, + "startColumn": 21, + "charOffset": 4961, + "charLength": 30, + "snippet": { + "text": "RETURNVALUE_TRADEPLAYERFARAWAY" + } + }, + "contextRegion": { + "startLine": 186, + "startColumn": 21, + "charOffset": 4849, + "charLength": 30, + "snippet": { + "text": "\n\tif (!Position::areInRange<2, 2, 0>(tradePartner->getPosition(), player->getPosition())) {\n\t\tlua_pushnumber(L, RETURNVALUE_TRADEPLAYERFARAWAY);\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46e6d432b44e242e64066d28e1ed524168a10e02f81d8bd9e8d681f097338525" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 193, + "startColumn": 21, + "charOffset": 5077, + "charLength": 31, + "snippet": { + "text": "RETURNVALUE_YOUDONTOWNTHISHOUSE" + } + }, + "contextRegion": { + "startLine": 191, + "startColumn": 21, + "charOffset": 5009, + "charLength": 31, + "snippet": { + "text": "\n\tif (house->getOwner() != player->getGUID()) {\n\t\tlua_pushnumber(L, RETURNVALUE_YOUDONTOWNTHISHOUSE);\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27a56f9d921aaacd9837acc7652b9343c370aa3eca7c77023168a44799c658eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 198, + "startColumn": 21, + "charOffset": 5219, + "charLength": 40, + "snippet": { + "text": "RETURNVALUE_TRADEPLAYERALREADYOWNSAHOUSE" + } + }, + "contextRegion": { + "startLine": 196, + "startColumn": 21, + "charOffset": 5126, + "charLength": 40, + "snippet": { + "text": "\n\tif (g_game().map.houses.getHouseByPlayerId(tradePartner->getGUID())) {\n\t\tlua_pushnumber(L, RETURNVALUE_TRADEPLAYERALREADYOWNSAHOUSE);\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cea9e5da50c3589c2e4ef48ed7c3aa66e6ccfd42283507f867438ca81c9f10ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 203, + "startColumn": 21, + "charOffset": 5361, + "charLength": 36, + "snippet": { + "text": "RETURNVALUE_TRADEPLAYERHIGHESTBIDDER" + } + }, + "contextRegion": { + "startLine": 201, + "startColumn": 21, + "charOffset": 5277, + "charLength": 36, + "snippet": { + "text": "\n\tif (IOLoginData::hasBiddedOnHouse(tradePartner->getGUID())) {\n\t\tlua_pushnumber(L, RETURNVALUE_TRADEPLAYERHIGHESTBIDDER);\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5de68d9e0328e75a49b5a7e4a15dc39e06d4b19569bbb79e5af85722b893b894" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 208, + "startColumn": 6, + "charOffset": 5485, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 206, + "startColumn": 6, + "charOffset": 5415, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr transferItem = house->getTransferItem();\n\tif (!transferItem) {\n\t\tlua_pushnumber(L, RETURNVALUE_YOUCANNOTTRADETHISHOUSE);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f5560a357505cc9b82f8380661d71d3273631c4e0785b73a229d1d9957ae55a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 209, + "startColumn": 21, + "charOffset": 5522, + "charLength": 35, + "snippet": { + "text": "RETURNVALUE_YOUCANNOTTRADETHISHOUSE" + } + }, + "contextRegion": { + "startLine": 207, + "startColumn": 21, + "charOffset": 5416, + "charLength": 35, + "snippet": { + "text": "\tstd::shared_ptr transferItem = house->getTransferItem();\n\tif (!transferItem) {\n\t\tlua_pushnumber(L, RETURNVALUE_YOUCANNOTTRADETHISHOUSE);\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4ff9946d8678f647c4a928dce54434c3d1f2f1f01d5b2ae5d16615316994d68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 217, + "startColumn": 21, + "charOffset": 6090, + "charLength": 35, + "snippet": { + "text": "RETURNVALUE_YOUCANNOTTRADETHISHOUSE" + } + }, + "contextRegion": { + "startLine": 215, + "startColumn": 21, + "charOffset": 5745, + "charLength": 35, + "snippet": { + "text": "\t\ttradePartner->sendTextMessage(MESSAGE_EVENT_ADVANCE, \"You cannot buy this house. Ownership is already scheduled to be transferred upon the next server restart.\");\n\t\tplayer->sendTextMessage(MESSAGE_EVENT_ADVANCE, \"You cannot sell this house. Ownership is already scheduled to be transferred upon the next server restart.\");\n\t\tlua_pushnumber(L, RETURNVALUE_YOUCANNOTTRADETHISHOUSE);\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08adb67bd97eff0ce92d141038aafe5e2fcd6a7f1cae3398ba98685f02b63026" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 20, + "charOffset": 6317, + "charLength": 19, + "snippet": { + "text": "RETURNVALUE_NOERROR" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 20, + "charOffset": 6294, + "charLength": 19, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, RETURNVALUE_NOERROR);\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4a41ca8c06ad77da354ea999768696d0f3f1074d7364d89bc05149557b04002" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 233, + "startColumn": 6, + "charOffset": 6483, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 231, + "startColumn": 6, + "charOffset": 6405, + "charLength": 1, + "snippet": { + "text": "\t// house:getBeds()\n\tconst auto &house = getUserdataShared(L, 1);\n\tif (!house) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "966284df7da954f253973378a232d374259cbb6cc587649a9666da0d4fa64b29" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 239, + "startColumn": 21, + "charOffset": 6584, + "charLength": 4, + "snippet": { + "text": "beds" + } + }, + "contextRegion": { + "startLine": 237, + "startColumn": 21, + "charOffset": 6526, + "charLength": 4, + "snippet": { + "text": "\n\tconst auto beds = house->getBeds();\n\tlua_createtable(L, beds.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0a5d4aaaa55d658397cfa85521c96bd3ef9dea04086b7e80afa6cc63d84847f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 239, + "startColumn": 21, + "charOffset": 6584, + "charLength": 4, + "snippet": { + "text": "beds" + } + }, + "contextRegion": { + "startLine": 237, + "startColumn": 21, + "charOffset": 6526, + "charLength": 4, + "snippet": { + "text": "\n\tconst auto beds = house->getBeds();\n\tlua_createtable(L, beds.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "914a1d7a505d70b4d897b8507e86de5b3176cf12bff0edbcac24aa79f0b7f76e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 2, + "charOffset": 6619, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 2, + "charOffset": 6601, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (std::shared_ptr bedItem : beds) {\n\t\tpushUserdata(L, bedItem);\n\t\tsetItemMetatable(L, -1, bedItem);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c40a2bc6400d1c50b29a19a181147b48399761f16053fd2262458546ddda23d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 32, + "charOffset": 6649, + "charLength": 7, + "snippet": { + "text": "bedItem" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 32, + "charOffset": 6601, + "charLength": 7, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (std::shared_ptr bedItem : beds) {\n\t\tpushUserdata(L, bedItem);\n\t\tsetItemMetatable(L, -1, bedItem);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "751cba0c4fc2165d1d40fe60b6507fbf5da916a9e46265e5cedb9fb2a16b2136" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 253, + "startColumn": 21, + "charOffset": 6944, + "charLength": 5, + "snippet": { + "text": "house" + } + }, + "contextRegion": { + "startLine": 251, + "startColumn": 21, + "charOffset": 6841, + "charLength": 5, + "snippet": { + "text": "\t// house:getBedCount()\n\tif (const auto &house = getUserdataShared(L, 1)) {\n\t\tlua_pushnumber(L, house->getBedCount());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0127cbd6e37160e8ea1b6367dce34ef32178bc984d56080faca250ba7fa1fcf0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 263, + "startColumn": 6, + "charOffset": 7144, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 261, + "startColumn": 6, + "charOffset": 7065, + "charLength": 1, + "snippet": { + "text": "\t// house:getDoors()\n\tconst auto &house = getUserdataShared(L, 1);\n\tif (!house) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32ca655f3c9745224e65a12fec8a0dce4c14104e916a160d60d6c6423bfd1f1e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 269, + "startColumn": 21, + "charOffset": 7247, + "charLength": 5, + "snippet": { + "text": "doors" + } + }, + "contextRegion": { + "startLine": 267, + "startColumn": 21, + "charOffset": 7187, + "charLength": 5, + "snippet": { + "text": "\n\tconst auto doors = house->getDoors();\n\tlua_createtable(L, doors.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b28087f3eb84c46c7ebb4d0892474cb3bce1ef9f06284b27b8529479a43466a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 269, + "startColumn": 21, + "charOffset": 7247, + "charLength": 5, + "snippet": { + "text": "doors" + } + }, + "contextRegion": { + "startLine": 267, + "startColumn": 21, + "charOffset": 7187, + "charLength": 5, + "snippet": { + "text": "\n\tconst auto doors = house->getDoors();\n\tlua_createtable(L, doors.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9677a71483f4b951edc5ac223eaa79c6998705a88b2ee96c95af1167d9fa32d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 272, + "startColumn": 2, + "charOffset": 7283, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 270, + "startColumn": 2, + "charOffset": 7265, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (std::shared_ptr door : doors) {\n\t\tpushUserdata(L, door);\n\t\tsetItemMetatable(L, -1, door);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b39888caca39d7b878f8a59ee64a85b6f24c06ce41064e91bf5d0cf5f35176b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 272, + "startColumn": 29, + "charOffset": 7310, + "charLength": 4, + "snippet": { + "text": "door" + } + }, + "contextRegion": { + "startLine": 270, + "startColumn": 29, + "charOffset": 7265, + "charLength": 4, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (std::shared_ptr door : doors) {\n\t\tpushUserdata(L, door);\n\t\tsetItemMetatable(L, -1, door);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3470ab8f7d7d484beb47f9516607c4708fee1a09322d5e1903bf85a517ce4ad5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 283, + "startColumn": 21, + "charOffset": 7599, + "charLength": 5, + "snippet": { + "text": "house" + } + }, + "contextRegion": { + "startLine": 281, + "startColumn": 21, + "charOffset": 7495, + "charLength": 5, + "snippet": { + "text": "\t// house:getDoorCount()\n\tif (const auto &house = getUserdataShared(L, 1)) {\n\t\tlua_pushnumber(L, house->getDoors().size());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c00741d688759a293c09cbde9ab6324993145f1f9a5d9d78b073f3e44d05cb1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 283, + "startColumn": 21, + "charOffset": 7599, + "charLength": 5, + "snippet": { + "text": "house" + } + }, + "contextRegion": { + "startLine": 281, + "startColumn": 21, + "charOffset": 7495, + "charLength": 5, + "snippet": { + "text": "\t// house:getDoorCount()\n\tif (const auto &house = getUserdataShared(L, 1)) {\n\t\tlua_pushnumber(L, house->getDoors().size());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "706729bdfbda1b1a005a6f52219143e63579231a923e406c4c52bc88fff23659" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 293, + "startColumn": 6, + "charOffset": 7833, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 291, + "startColumn": 6, + "charOffset": 7735, + "charLength": 1, + "snippet": { + "text": "\t// house:getDoorIdByPosition(position)\n\tconst auto &house = getUserdataShared(L, 1);\n\tif (!house) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac454e70e615d4ed4464a6c42516fa080cd21b620b2c1c9a3a8f279e039a7deb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 300, + "startColumn": 21, + "charOffset": 7985, + "charLength": 4, + "snippet": { + "text": "door" + } + }, + "contextRegion": { + "startLine": 298, + "startColumn": 21, + "charOffset": 7877, + "charLength": 4, + "snippet": { + "text": "\tstd::shared_ptr door = house->getDoorByPosition(getPosition(L, 2));\n\tif (door) {\n\t\tlua_pushnumber(L, door->getDoorId());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2adf5c5cadba66154ce5f443311f9dc5548c720809b66b97c403c28e95266c4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 310, + "startColumn": 6, + "charOffset": 8182, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 308, + "startColumn": 6, + "charOffset": 8103, + "charLength": 1, + "snippet": { + "text": "\t// house:getTiles()\n\tconst auto &house = getUserdataShared(L, 1);\n\tif (!house) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef71299fcf760d9e0bf073016cf0428bd6ae69bfcc89e24f89110b6b3bec9339" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 319, + "startColumn": 2, + "charOffset": 8301, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 317, + "startColumn": 2, + "charOffset": 8283, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (std::shared_ptr tile : tiles) {\n\t\tpushUserdata(L, tile);\n\t\tsetMetatable(L, -1, \"Tile\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "18c94b18183202e17d7aa9259850fec59cbebcb5f38e1f272a1f6e8eaa51a611" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 330, + "startColumn": 6, + "charOffset": 8586, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 328, + "startColumn": 6, + "charOffset": 8507, + "charLength": 1, + "snippet": { + "text": "\t// house:getItems()\n\tconst auto &house = getUserdataShared(L, 1);\n\tif (!house) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e1005baac7b4954f6aafc050a581696915d0d25e23e6bc05b0639fb466c666a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 341, + "startColumn": 7, + "charOffset": 8806, + "charLength": 10, + "snippet": { + "text": "itemVector" + } + }, + "contextRegion": { + "startLine": 339, + "startColumn": 7, + "charOffset": 8704, + "charLength": 10, + "snippet": { + "text": "\tfor (std::shared_ptr tile : tiles) {\n\t\tTileItemVector* itemVector = tile->getItemList();\n\t\tif (itemVector) {\n\t\t\tfor (auto &item : *itemVector) {\n\t\t\t\tpushUserdata(L, item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "168dfc37c2aea93070bfe022585774283d75647272e3fa292897cef6abc0ea17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 341, + "startColumn": 7, + "charOffset": 8806, + "charLength": 10, + "snippet": { + "text": "itemVector" + } + }, + "contextRegion": { + "startLine": 339, + "startColumn": 7, + "charOffset": 8704, + "charLength": 10, + "snippet": { + "text": "\tfor (std::shared_ptr tile : tiles) {\n\t\tTileItemVector* itemVector = tile->getItemList();\n\t\tif (itemVector) {\n\t\t\tfor (auto &item : *itemVector) {\n\t\t\t\tpushUserdata(L, item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52a79cdb28ef425e9c3168f809e3b0c2c9ae6900bc8db5ffef52e32d2d529c50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 342, + "startColumn": 4, + "charOffset": 8823, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 340, + "startColumn": 4, + "charOffset": 8748, + "charLength": 3, + "snippet": { + "text": "\t\tTileItemVector* itemVector = tile->getItemList();\n\t\tif (itemVector) {\n\t\t\tfor (auto &item : *itemVector) {\n\t\t\t\tpushUserdata(L, item);\n\t\t\t\tsetItemMetatable(L, -1, item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b4ddf56d358e1e668182df030010b014ddc9d2447d35b79710fb1279d853fd5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 355, + "startColumn": 21, + "charOffset": 9144, + "charLength": 5, + "snippet": { + "text": "house" + } + }, + "contextRegion": { + "startLine": 353, + "startColumn": 21, + "charOffset": 9040, + "charLength": 5, + "snippet": { + "text": "\t// house:getTileCount()\n\tif (const auto &house = getUserdataShared(L, 1)) {\n\t\tlua_pushnumber(L, house->getTiles().size());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1358698e533c1633fd3718ee93d1c13c9ad5cdb2220532289fb76d22c15c5ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 355, + "startColumn": 21, + "charOffset": 9144, + "charLength": 5, + "snippet": { + "text": "house" + } + }, + "contextRegion": { + "startLine": 353, + "startColumn": 21, + "charOffset": 9040, + "charLength": 5, + "snippet": { + "text": "\t// house:getTileCount()\n\tif (const auto &house = getUserdataShared(L, 1)) {\n\t\tlua_pushnumber(L, house->getTiles().size());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "650b7a5fa361d799f4cf0045aa1db754a91a285db12ccb5eb4567fcc28736390" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 365, + "startColumn": 6, + "charOffset": 9380, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 363, + "startColumn": 6, + "charOffset": 9278, + "charLength": 1, + "snippet": { + "text": "\t// house:canEditAccessList(listId, player)\n\tconst auto &house = getUserdataShared(L, 1);\n\tif (!house) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ab67309fffeb3d327498c730904fbd9720510bd10621bb6836a2db32ea04bf3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 373, + "startColumn": 6, + "charOffset": 9515, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 371, + "startColumn": 6, + "charOffset": 9470, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto &player = getPlayer(L, 3);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87f944ccc6e3f70ed6e4f57013ab125612ff08927929a61a03e4f23fa9c597fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 374, + "startColumn": 3, + "charOffset": 9528, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 372, + "startColumn": 3, + "charOffset": 9471, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getPlayer(L, 3);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44239a704b0c78dd21195de43eab26cac4118bc6a7464f5a9d0796e0510f0ed7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 385, + "startColumn": 6, + "charOffset": 9824, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 383, + "startColumn": 6, + "charOffset": 9734, + "charLength": 1, + "snippet": { + "text": "\t// house:getAccessList(listId)\n\tconst auto &house = getUserdataShared(L, 1);\n\tif (!house) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc8d20171840e108c29378e198e93a49628d7cc4172b8ba3878f6127e139ce9a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 403, + "startColumn": 6, + "charOffset": 10205, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 401, + "startColumn": 6, + "charOffset": 10109, + "charLength": 1, + "snippet": { + "text": "\t// house:setAccessList(listId, list)\n\tconst auto &house = getUserdataShared(L, 1);\n\tif (!house) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3201aaac27d541102e8f43fdc066339d24ce329b7a88ae6da49b584b0b99d5e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 418, + "startColumn": 6, + "charOffset": 10569, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 416, + "startColumn": 6, + "charOffset": 10468, + "charLength": 1, + "snippet": { + "text": "\t// house:kickPlayer(player, targetPlayer)\n\tconst auto &house = getUserdataShared(L, 1);\n\tif (!house) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfbab17c8b16000849bdeab25ca8a9bd35a25b687740b3fa4f0d5f53bbbc07f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 424, + "startColumn": 6, + "charOffset": 10657, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 422, + "startColumn": 6, + "charOffset": 10612, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto &player = getPlayer(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(\"Player is nullptr\");\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0bef38612bc452d2acdd3948b0eb7d36de037fb6c1c5bf28ffb78b01648b1526" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 425, + "startColumn": 3, + "charOffset": 10670, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 423, + "startColumn": 3, + "charOffset": 10613, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getPlayer(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(\"Player is nullptr\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "525208b3d4d2c5e1ef55060cc8eb4aa30f210600f4f86007c7540a0aa533ee91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 430, + "startColumn": 6, + "charOffset": 10767, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 428, + "startColumn": 6, + "charOffset": 10723, + "charLength": 1, + "snippet": { + "text": "\n\tauto targetPlayer = getPlayer(L, 3);\n\tif (!targetPlayer) {\n\t\treportErrorFunc(\"Target player is nullptr\");\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3800317865230a92ebb9432a390feb68b2b17e8adc5ffe3ca5dd5b1f52cddae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 431, + "startColumn": 3, + "charOffset": 10786, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 429, + "startColumn": 3, + "charOffset": 10724, + "charLength": 15, + "snippet": { + "text": "\tauto targetPlayer = getPlayer(L, 3);\n\tif (!targetPlayer) {\n\t\treportErrorFunc(\"Target player is nullptr\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce222bfe6f1abf67f9ba1239eae9487becaad045eaddfe137716500dcde3d13b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 442, + "startColumn": 6, + "charOffset": 11059, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 440, + "startColumn": 6, + "charOffset": 10973, + "charLength": 1, + "snippet": { + "text": "\t// house:isInvited(player)\n\tconst auto &house = getUserdataShared(L, 1);\n\tif (!house) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "045dbd61ccc1404cb0a8ebef5b8ecc942206be3baf0c015bf646f089b9863b0a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 448, + "startColumn": 6, + "charOffset": 11147, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 446, + "startColumn": 6, + "charOffset": 11102, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto &player = getPlayer(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca1b26f9216fc27de21c2bcbe82e8993c59777027b8767c0f44052e3f6d78c0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/house_functions.cpp" + }, + "region": { + "startLine": 449, + "startColumn": 3, + "charOffset": 11160, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 447, + "startColumn": 3, + "charOffset": 11103, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getPlayer(L, 2);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd286e40e05682c839ef8d28edd4cfd64178a4adb413a9cfe7d4330b9d37b116" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'stackpos' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/position_functions.cpp" + }, + "region": { + "startLine": 25, + "startColumn": 10, + "charOffset": 758, + "charLength": 8, + "snippet": { + "text": "stackpos" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 10, + "charOffset": 745, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tint32_t stackpos;\n\tif (isTable(L, 2)) {\n\t\tconst Position &position = getPosition(L, 2, stackpos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81cec330d78fb3b5e019a8592f5745752a90da47259ad9003e2b5267b40ea975" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/position_functions.cpp" + }, + "region": { + "startLine": 30, + "startColumn": 3, + "charOffset": 899, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 28, + "startColumn": 3, + "charOffset": 848, + "charLength": 8, + "snippet": { + "text": "\t\tpushPosition(L, position, stackpos);\n\t} else {\n\t\tuint16_t x = getNumber(L, 2, 0);\n\t\tuint16_t y = getNumber(L, 3, 0);\n\t\tuint8_t z = getNumber(L, 4, 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "410a0d2611029516f6f44ed88f8d7782d13f4818e8c7ab6a508d11ceda89807b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/position_functions.cpp" + }, + "region": { + "startLine": 31, + "startColumn": 3, + "charOffset": 944, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 29, + "startColumn": 3, + "charOffset": 887, + "charLength": 8, + "snippet": { + "text": "\t} else {\n\t\tuint16_t x = getNumber(L, 2, 0);\n\t\tuint16_t y = getNumber(L, 3, 0);\n\t\tuint8_t z = getNumber(L, 4, 0);\n\t\tstackpos = getNumber(L, 5, 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a01478a0182d65fd8ee12a1d4df22bb3448609d7e2c63c0ad9d2c762b5cf613e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/position_functions.cpp" + }, + "region": { + "startLine": 32, + "startColumn": 3, + "charOffset": 989, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 3, + "charOffset": 897, + "charLength": 7, + "snippet": { + "text": "\t\tuint16_t x = getNumber(L, 2, 0);\n\t\tuint16_t y = getNumber(L, 3, 0);\n\t\tuint8_t z = getNumber(L, 4, 0);\n\t\tstackpos = getNumber(L, 5, 0);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc1d14300da826771d5bbc9ca8c6e6260a8499b42bbce9abe1003ae71faabede" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/position_functions.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 36, + "charOffset": 1065, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 36, + "charOffset": 942, + "charLength": 1, + "snippet": { + "text": "\t\tuint16_t y = getNumber(L, 3, 0);\n\t\tuint8_t z = getNumber(L, 4, 0);\n\t\tstackpos = getNumber(L, 5, 0);\n\n\t\tpushPosition(L, Position(x, y, z), stackpos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ea25cacd56454d56a69edd9234e44d4f2658ba2750847439d826160026aa1e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'stackpos' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/position_functions.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 10, + "charOffset": 1243, + "charLength": 8, + "snippet": { + "text": "stackpos" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 10, + "charOffset": 1138, + "charLength": 8, + "snippet": { + "text": "int PositionFunctions::luaPositionAdd(lua_State* L) {\n\t// positionValue = position + positionEx\n\tint32_t stackpos;\n\tconst Position &position = getPosition(L, 1, stackpos);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b128ded54a3bd529d1b8374b5a0255d52055b946ff722bbcb52c47720d41efff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'stackpos' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/position_functions.cpp" + }, + "region": { + "startLine": 58, + "startColumn": 10, + "charOffset": 1617, + "charLength": 8, + "snippet": { + "text": "stackpos" + } + }, + "contextRegion": { + "startLine": 56, + "startColumn": 10, + "charOffset": 1512, + "charLength": 8, + "snippet": { + "text": "int PositionFunctions::luaPositionSub(lua_State* L) {\n\t// positionValue = position - positionEx\n\tint32_t stackpos;\n\tconst Position &position = getPosition(L, 1, stackpos);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "853c298d0c41123d7b1654a8357cb4f7ec4141bbcd5d07d7f0c540c8ec52742f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/position_functions.cpp" + }, + "region": { + "startLine": 84, + "startColumn": 20, + "charOffset": 2336, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 20, + "charOffset": 2221, + "charLength": 3, + "snippet": { + "text": "\tconst Position &positionEx = getPosition(L, 2);\n\tconst Position &position = getPosition(L, 1);\n\tlua_pushnumber(L, std::max(std::max(std::abs(Position::getDistanceX(position, positionEx)), std::abs(Position::getDistanceY(position, positionEx))), std::abs(Position::getDistanceZ(position, positionEx))));\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e32ea7b7041ae0956c1cbc8ecd1e7809cac60dc7072c14bcc4a810fa82f008d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/position_functions.cpp" + }, + "region": { + "startLine": 96, + "startColumn": 37, + "charOffset": 3001, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 37, + "charOffset": 2865, + "charLength": 1, + "snippet": { + "text": "\tfpp.minTargetDist = getNumber(L, 3, 0);\n\tfpp.maxTargetDist = getNumber(L, 4, 1);\n\tfpp.fullPathSearch = getBoolean(L, 5, fpp.fullPathSearch);\n\tfpp.clearSight = getBoolean(L, 6, fpp.clearSight);\n\tfpp.maxSearchDist = getNumber(L, 7, fpp.maxSearchDist);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40e21d34c9d84d565f5813ab3765148abf3247cf958f4f33b781699d80d0fa21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/position_functions.cpp" + }, + "region": { + "startLine": 97, + "startColumn": 33, + "charOffset": 3057, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 95, + "startColumn": 33, + "charOffset": 2915, + "charLength": 1, + "snippet": { + "text": "\tfpp.maxTargetDist = getNumber(L, 4, 1);\n\tfpp.fullPathSearch = getBoolean(L, 5, fpp.fullPathSearch);\n\tfpp.clearSight = getBoolean(L, 6, fpp.clearSight);\n\tfpp.maxSearchDist = getNumber(L, 7, fpp.maxSearchDist);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e11a6996d29f3c06001b8ffab5799f0eae0baa22a2d12025761aa898824395c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/position_functions.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 44, + "charOffset": 3120, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 44, + "charOffset": 2965, + "charLength": 1, + "snippet": { + "text": "\tfpp.fullPathSearch = getBoolean(L, 5, fpp.fullPathSearch);\n\tfpp.clearSight = getBoolean(L, 6, fpp.clearSight);\n\tfpp.maxSearchDist = getNumber(L, 7, fpp.maxSearchDist);\n\n\tstd::vector dirList;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4b93d6e1491724bffb382ab789cb876622d3db2bfbf9e83c4186b137c4bab85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/position_functions.cpp" + }, + "region": { + "startLine": 105, + "startColumn": 3, + "charOffset": 3310, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 103, + "startColumn": 3, + "charOffset": 3290, + "charLength": 3, + "snippet": { + "text": "\n\t\tint index = 0;\n\t\tfor (Direction dir : dirList) {\n\t\t\tlua_pushnumber(L, dir);\n\t\t\tlua_rawseti(L, -2, ++index);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c522ea2e19c1a62afb5609714914989e0d829c112e6a75d6f44bba368d16dcb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/position_functions.cpp" + }, + "region": { + "startLine": 106, + "startColumn": 22, + "charOffset": 3363, + "charLength": 3, + "snippet": { + "text": "dir" + } + }, + "contextRegion": { + "startLine": 104, + "startColumn": 22, + "charOffset": 3291, + "charLength": 3, + "snippet": { + "text": "\t\tint index = 0;\n\t\tfor (Direction dir : dirList) {\n\t\t\tlua_pushnumber(L, dir);\n\t\t\tlua_rawseti(L, -2, ++index);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b0f8856dc271246e9c17eb093440af8feb972ec5014bab30f7c605b1b53a712" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/position_functions.cpp" + }, + "region": { + "startLine": 140, + "startColumn": 2, + "charOffset": 4244, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 138, + "startColumn": 2, + "charOffset": 4224, + "charLength": 3, + "snippet": { + "text": "\t}\n\tint index = 0;\n\tfor (auto zone : tile->getZones()) {\n\t\tindex++;\n\t\tpushUserdata(L, zone);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d29d41b6b1c1581cec2ed1eb6edd20b91ead5388ee615558d37d5615015b4f9b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/position_functions.cpp" + }, + "region": { + "startLine": 140, + "startColumn": 12, + "charOffset": 4254, + "charLength": 4, + "snippet": { + "text": "zone" + } + }, + "contextRegion": { + "startLine": 138, + "startColumn": 12, + "charOffset": 4224, + "charLength": 4, + "snippet": { + "text": "\t}\n\tint index = 0;\n\tfor (auto zone : tile->getZones()) {\n\t\tindex++;\n\t\tpushUserdata(L, zone);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d2e191ea4980c4e609b3f67c31b366cbe9c3c399fe2a48adc541b468295390b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/position_functions.cpp" + }, + "region": { + "startLine": 154, + "startColumn": 7, + "charOffset": 4629, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 7, + "charOffset": 4556, + "charLength": 1, + "snippet": { + "text": "\tif (lua_gettop(L) >= 3) {\n\t\tconst auto &player = getPlayer(L, 3);\n\t\tif (!player) {\n\t\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7b20e6fdda6fab801fec4dcd01b371d7825e71935d639c3e96ef368ce5fd88d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/position_functions.cpp" + }, + "region": { + "startLine": 155, + "startColumn": 4, + "charOffset": 4643, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 153, + "startColumn": 4, + "charOffset": 4583, + "charLength": 15, + "snippet": { + "text": "\t\tconst auto &player = getPlayer(L, 3);\n\t\tif (!player) {\n\t\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\t\treturn 1;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69c61be9b8b162b7d63f8feef42cf5c4fbfd9af658f3e9b46e38bb3fb88e06ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/position_functions.cpp" + }, + "region": { + "startLine": 159, + "startColumn": 14, + "charOffset": 4733, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 157, + "startColumn": 14, + "charOffset": 4715, + "charLength": 12, + "snippet": { + "text": "\t\t}\n\n\t\tspectators.emplace_back(player);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4926f4f59b97da016491b3637d49c74c13c76621e3c02b2874c69b6d360bc599" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/position_functions.cpp" + }, + "region": { + "startLine": 185, + "startColumn": 7, + "charOffset": 5645, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 183, + "startColumn": 7, + "charOffset": 5572, + "charLength": 1, + "snippet": { + "text": "\tif (lua_gettop(L) >= 3) {\n\t\tconst auto &player = getPlayer(L, 3);\n\t\tif (!player) {\n\t\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b92642bd3aded9121c575f1b71ec327972be971e729fd543ad3844cc9bafc252" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/position_functions.cpp" + }, + "region": { + "startLine": 186, + "startColumn": 4, + "charOffset": 5659, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 184, + "startColumn": 4, + "charOffset": 5599, + "charLength": 15, + "snippet": { + "text": "\t\tconst auto &player = getPlayer(L, 3);\n\t\tif (!player) {\n\t\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\t\treturn 1;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ceb35429374ba8d7179ed05af0f5ef56d75264e1331fc6871d0f444d475ea088" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/position_functions.cpp" + }, + "region": { + "startLine": 190, + "startColumn": 14, + "charOffset": 5749, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 188, + "startColumn": 14, + "charOffset": 5731, + "charLength": 12, + "snippet": { + "text": "\t\t}\n\n\t\tspectators.emplace_back(player);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66cda0e23a9397db4ca26936993c4a59fdaf19864110cfb17ba22b436bb78407" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/position_functions.cpp" + }, + "region": { + "startLine": 216, + "startColumn": 7, + "charOffset": 6686, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 214, + "startColumn": 7, + "charOffset": 6613, + "charLength": 1, + "snippet": { + "text": "\tif (lua_gettop(L) >= 4) {\n\t\tconst auto &player = getPlayer(L, 4);\n\t\tif (!player) {\n\t\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d33d5e5ca98f1c7df0dbef3b40e9067b393dfd7769ffe3a4a99e8ba943baa711" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/position_functions.cpp" + }, + "region": { + "startLine": 217, + "startColumn": 4, + "charOffset": 6700, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 215, + "startColumn": 4, + "charOffset": 6640, + "charLength": 15, + "snippet": { + "text": "\t\tconst auto &player = getPlayer(L, 4);\n\t\tif (!player) {\n\t\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\t\treturn 1;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d4bd3e2c7b033f5c0cb69deff12e239027efaa66c09eb1fa270e47f370197ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/position_functions.cpp" + }, + "region": { + "startLine": 221, + "startColumn": 14, + "charOffset": 6790, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 219, + "startColumn": 14, + "charOffset": 6772, + "charLength": 12, + "snippet": { + "text": "\t\t}\n\n\t\tspectators.emplace_back(player);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f942ec21a1f04a63d1e913146cac17f90b6db6c2212f25f7ce2ec7fd1048069" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 64, + "startColumn": 6, + "charOffset": 1674, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 62, + "startColumn": 6, + "charOffset": 1565, + "charLength": 1, + "snippet": { + "text": "\tint32_t index = getNumber(L, 2);\n\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (!tile) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb8c8d7888f00fed8cc1c71d6c2c4d23afcad9cb29f068df81a2fb523c88399c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 6, + "charOffset": 1777, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 6, + "charOffset": 1716, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr thing = tile->getThing(index);\n\tif (!thing) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b19cc470125f1a8d32e9ff2a81e46f731987711fc07ae9df8172e2fc63fc5d08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 21, + "charOffset": 2312, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 21, + "charOffset": 2218, + "charLength": 4, + "snippet": { + "text": "\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (tile) {\n\t\tlua_pushnumber(L, tile->getThingCount());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "323498c353d8b544fe1da75410e9687006a3b23852fed1abe79d9014321217b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 21, + "charOffset": 2312, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 21, + "charOffset": 2218, + "charLength": 4, + "snippet": { + "text": "\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (tile) {\n\t\tlua_pushnumber(L, tile->getThingCount());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c4a36cc860ef6e58b2dba94453843eeee494455efb0f128ccc2d0f0343a8e40" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 102, + "startColumn": 6, + "charOffset": 2603, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 100, + "startColumn": 6, + "charOffset": 2480, + "charLength": 1, + "snippet": { + "text": "\tstd::shared_ptr creature = getCreature(L, 2);\n\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (!tile) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "132ef3c4794beed87637779aeba846e5e5f2dcc2f552e89ca7194ba9ae71373a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 108, + "startColumn": 6, + "charOffset": 2719, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 6, + "charOffset": 2645, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr thing = tile->getTopVisibleThing(creature);\n\tif (!thing) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6874904f2fa22f2d3cd160d68a7573ac2100bb0deef01bc7a94034d330eb4222" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 128, + "startColumn": 6, + "charOffset": 3268, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 126, + "startColumn": 6, + "charOffset": 3177, + "charLength": 1, + "snippet": { + "text": "\t// tile:getTopTopItem()\n\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (!tile) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94a6f14d8a5903983f6829b3bdd16d5a8c98cece19a994b591cf9dfca73a8fb4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 146, + "startColumn": 6, + "charOffset": 3635, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 144, + "startColumn": 6, + "charOffset": 3543, + "charLength": 1, + "snippet": { + "text": "\t// tile:getTopDownItem()\n\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (!tile) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d948217bcb8fade45793476af91867d6203a692e531a0873d04165aa20f77576" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 164, + "startColumn": 6, + "charOffset": 3999, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 162, + "startColumn": 6, + "charOffset": 3909, + "charLength": 1, + "snippet": { + "text": "\t// tile:getFieldItem()\n\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (!tile) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6874904f2fa22f2d3cd160d68a7573ac2100bb0deef01bc7a94034d330eb4222" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 182, + "startColumn": 6, + "charOffset": 4381, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 180, + "startColumn": 6, + "charOffset": 4270, + "charLength": 1, + "snippet": { + "text": "\t// tile:getItemById(itemId[, subType = -1])\n\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (!tile) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d6def52c845b4382d047b2add94ba35faad435d702a052a70e2cf249a352df4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'itemId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 187, + "startColumn": 11, + "charOffset": 4434, + "charLength": 6, + "snippet": { + "text": "itemId" + } + }, + "contextRegion": { + "startLine": 185, + "startColumn": 11, + "charOffset": 4420, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tuint16_t itemId;\n\tif (isNumber(L, 2)) {\n\t\titemId = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3fcb64b9eaab07a8f367cd211d8d5dfc93f5e9df8188a07659d4c494b2439d6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 197, + "startColumn": 2, + "charOffset": 4631, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 195, + "startColumn": 2, + "charOffset": 4623, + "charLength": 7, + "snippet": { + "text": "\t\t}\n\t}\n\tint32_t subType = getNumber(L, 3, -1);\n\n\tstd::shared_ptr item = g_game().findItemOfType(tile, itemId, false, subType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ee3f2d6b0a426643bb80161be3f7fc916f0a81d980b8ffd23950b40ddfc1bb3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 212, + "startColumn": 6, + "charOffset": 5042, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 210, + "startColumn": 6, + "charOffset": 4943, + "charLength": 1, + "snippet": { + "text": "\t// tile:getItemByType(itemType)\n\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (!tile) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a1e9d3b17cf9a6c55d0f8d458f4ca6452d30a2bd36196514f94fd2fbbce2a32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'found' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 217, + "startColumn": 7, + "charOffset": 5091, + "charLength": 5, + "snippet": { + "text": "found" + } + }, + "contextRegion": { + "startLine": 215, + "startColumn": 7, + "charOffset": 5081, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tbool found;\n\n\tItemTypes_t itemType = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4deb268ad48b8d2689edf97dd62baf7eaf6c8976f028af1ac7fdbbb281f2846a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 259, + "startColumn": 3, + "charOffset": 6037, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 257, + "startColumn": 3, + "charOffset": 5976, + "charLength": 3, + "snippet": { + "text": "\n\tif (const TileItemVector* items = tile->getItemList()) {\n\t\tfor (auto &item : *items) {\n\t\t\tconst ItemType &it = Item::items[item->getID()];\n\t\t\tif (it.type == itemType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12f9c27e9f73a16485f7d8840ddbae9f2160d8a9f055527c8b9974af34ce16b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &item' can be declared as 'const auto &item'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 259, + "startColumn": 8, + "charOffset": 6042, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 257, + "startColumn": 8, + "charOffset": 5976, + "charLength": 4, + "snippet": { + "text": "\n\tif (const TileItemVector* items = tile->getItemList()) {\n\t\tfor (auto &item : *items) {\n\t\t\tconst ItemType &it = Item::items[item->getID()];\n\t\t\tif (it.type == itemType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d82c2e611b8a7e64e2cdf6fd92c9e540bb77245f49b9969d0db4d8eba7f57d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 276, + "startColumn": 6, + "charOffset": 6436, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 274, + "startColumn": 6, + "charOffset": 6333, + "charLength": 1, + "snippet": { + "text": "\t// tile:getItemByTopOrder(topOrder)\n\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (!tile) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3075557032df7a18dcaa90e622c565b2df6f2c2a54c1ce70ae24f6b90651605" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 284, + "startColumn": 6, + "charOffset": 6596, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 282, + "startColumn": 6, + "charOffset": 6525, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = tile->getItemByTopOrder(topOrder);\n\tif (!item) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94a6f14d8a5903983f6829b3bdd16d5a8c98cece19a994b591cf9dfca73a8fb4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 297, + "startColumn": 6, + "charOffset": 6890, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 295, + "startColumn": 6, + "charOffset": 6774, + "charLength": 1, + "snippet": { + "text": "\t// tile:getItemCountById(itemId[, subType = -1])\n\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (!tile) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de6e8f3b1192a1a2c0c1101b9ec214e4971a96d20323b48fbfdcebdb65697ac9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 302, + "startColumn": 2, + "charOffset": 6934, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 300, + "startColumn": 2, + "charOffset": 6929, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tint32_t subType = getNumber(L, 3, -1);\n\n\tuint16_t itemId;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "533bc10473ba61262ac9f0bf6b398921e75ca6772e1cd99a67b46f22da737c1d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'itemId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 304, + "startColumn": 11, + "charOffset": 6993, + "charLength": 6, + "snippet": { + "text": "itemId" + } + }, + "contextRegion": { + "startLine": 302, + "startColumn": 11, + "charOffset": 6933, + "charLength": 6, + "snippet": { + "text": "\tint32_t subType = getNumber(L, 3, -1);\n\n\tuint16_t itemId;\n\tif (isNumber(L, 2)) {\n\t\titemId = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "575919595352d0e7dfebee8c18311833f499720382cb22e4856836f07b82ca96" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 315, + "startColumn": 20, + "charOffset": 7209, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 313, + "startColumn": 20, + "charOffset": 7186, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, tile->getItemTypeCount(itemId, subType));\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fdc3c00caad7ac7053eadff242a9d51961e1443d323038a3b73b5a941cd95f42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 322, + "startColumn": 6, + "charOffset": 7420, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 320, + "startColumn": 6, + "charOffset": 7325, + "charLength": 1, + "snippet": { + "text": "\t// tile:getBottomCreature()\n\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (!tile) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9bd523be9d7aad98cde0dbe5729e72cfc03db286658e8362c8e2becadae0442f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 328, + "startColumn": 6, + "charOffset": 7533, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 326, + "startColumn": 6, + "charOffset": 7462, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr creature = tile->getBottomCreature();\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a13e676c588b6330a65a1d395072b16e36f4e9c8f405d25db8473300d42ddc7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 341, + "startColumn": 6, + "charOffset": 7827, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 339, + "startColumn": 6, + "charOffset": 7735, + "charLength": 1, + "snippet": { + "text": "\t// tile:getTopCreature()\n\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (!tile) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0115b12b8c0266a875247465db31f8a44276f065d746b99f5385eab0eaad524" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 347, + "startColumn": 6, + "charOffset": 7937, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 345, + "startColumn": 6, + "charOffset": 7869, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr creature = tile->getTopCreature();\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11196ef7e1244c87d8830044cf984d7840a6585b96f4c3d20ad539d98f2c98dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 360, + "startColumn": 6, + "charOffset": 8253, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 358, + "startColumn": 6, + "charOffset": 8143, + "charLength": 1, + "snippet": { + "text": "\t// tile:getBottomVisibleCreature(creature)\n\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (!tile) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb7bef33dab06312ed59801a3dc391dc3bff8c28fb29836f47470b9bcbfa5c4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 366, + "startColumn": 6, + "charOffset": 8358, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 364, + "startColumn": 6, + "charOffset": 8295, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr creature = getCreature(L, 2);\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5a8c31b0770fe04d7a5f87f3669e4f9aa6591d4834e76c65c24cdcbd9f2cc4b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 384, + "startColumn": 6, + "charOffset": 8832, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 382, + "startColumn": 6, + "charOffset": 8725, + "charLength": 1, + "snippet": { + "text": "\t// tile:getTopVisibleCreature(creature)\n\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (!tile) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81e9e7d52a37de4fb1dc65e4f285de26735a52d88424429661b737e776d456ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 390, + "startColumn": 6, + "charOffset": 8937, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 388, + "startColumn": 6, + "charOffset": 8874, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr creature = getCreature(L, 2);\n\tif (!creature) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbb15eea81d31979c41b1238726c675a76072978865cc2d96faa70ab92b7e234" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 408, + "startColumn": 6, + "charOffset": 9368, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 406, + "startColumn": 6, + "charOffset": 9282, + "charLength": 1, + "snippet": { + "text": "\t// tile:getItems()\n\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (!tile) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39ef92053047428da1fb0b908ec8d864fe16545886d773e8ed54a89f2cc839d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 414, + "startColumn": 6, + "charOffset": 9467, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 412, + "startColumn": 6, + "charOffset": 9410, + "charLength": 1, + "snippet": { + "text": "\n\tTileItemVector* itemVector = tile->getItemList();\n\tif (!itemVector) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4912a89a8a029e8a0aeacf7e8ad6d5cd2d651abdfc38791ec5030145856a75c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 414, + "startColumn": 7, + "charOffset": 9468, + "charLength": 10, + "snippet": { + "text": "itemVector" + } + }, + "contextRegion": { + "startLine": 412, + "startColumn": 7, + "charOffset": 9410, + "charLength": 10, + "snippet": { + "text": "\n\tTileItemVector* itemVector = tile->getItemList();\n\tif (!itemVector) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c6aaf98164a7f0abd77213651503871ead151ad644ff86fb8706186e21787ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 419, + "startColumn": 21, + "charOffset": 9536, + "charLength": 10, + "snippet": { + "text": "itemVector" + } + }, + "contextRegion": { + "startLine": 417, + "startColumn": 21, + "charOffset": 9512, + "charLength": 10, + "snippet": { + "text": "\t}\n\n\tlua_createtable(L, itemVector->size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45ae2d856f3c651b6e39451d27ed6af5e602135a35e21c093c304b8a90e94786" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 419, + "startColumn": 21, + "charOffset": 9536, + "charLength": 10, + "snippet": { + "text": "itemVector" + } + }, + "contextRegion": { + "startLine": 417, + "startColumn": 21, + "charOffset": 9512, + "charLength": 10, + "snippet": { + "text": "\t}\n\n\tlua_createtable(L, itemVector->size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4147944c72704be0189a0e1fab18522fb8e1f82304e72dd709ec474b15d2db18" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 422, + "startColumn": 2, + "charOffset": 9578, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 420, + "startColumn": 2, + "charOffset": 9560, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (auto &item : *itemVector) {\n\t\tpushUserdata(L, item);\n\t\tsetItemMetatable(L, -1, item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63c37af235c5468424333ac6c2ab37d0e965dfef574bfcc24a3efa4200eaf94f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 433, + "startColumn": 6, + "charOffset": 9868, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 431, + "startColumn": 6, + "charOffset": 9778, + "charLength": 1, + "snippet": { + "text": "\t// tile:getItemCount()\n\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (!tile) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31918c6814ecc95043d57c941f4a19f16561afb079c275cc31be35734f7761c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 438, + "startColumn": 20, + "charOffset": 9930, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 436, + "startColumn": 20, + "charOffset": 9907, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, tile->getItemCount());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e843c3ca83960ced6c1798e590a296cfaff672a290898cac540c57d4ce68a44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 438, + "startColumn": 20, + "charOffset": 9930, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 436, + "startColumn": 20, + "charOffset": 9907, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, tile->getItemCount());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7872d8fa7e7ad7c8f054cf09341adb037ce29c3286f0d7cf6fdbe4a0f6aadc0a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 446, + "startColumn": 21, + "charOffset": 10148, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 444, + "startColumn": 21, + "charOffset": 10054, + "charLength": 4, + "snippet": { + "text": "\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (tile) {\n\t\tlua_pushnumber(L, tile->getDownItemCount());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4bbd16140f8543eb234ae0798863c91f14b5ee5dfcbd30d49bf8d665870b8c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 456, + "startColumn": 6, + "charOffset": 10371, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 454, + "startColumn": 6, + "charOffset": 10278, + "charLength": 1, + "snippet": { + "text": "\t// tile:getTopItemCount()\n\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (!tile) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a97b4884902ceb7b96c5d8b77108315fd915013a0625f4a0a6a2ac3d7f8f8971" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 461, + "startColumn": 20, + "charOffset": 10433, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 459, + "startColumn": 20, + "charOffset": 10410, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, tile->getTopItemCount());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d6d265cb9a8109c3ad1d055bdeb9dabf3fd2ca9fcc6f8c0ba8d2c7b2a4c6dcd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 468, + "startColumn": 6, + "charOffset": 10618, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 466, + "startColumn": 6, + "charOffset": 10528, + "charLength": 1, + "snippet": { + "text": "\t// tile:getCreatures()\n\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (!tile) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31d3ba3ce4e9f9bac1b58033b3d9638d4849be051b63a6ac69eaa69e7f4f7987" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 474, + "startColumn": 6, + "charOffset": 10722, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 472, + "startColumn": 6, + "charOffset": 10660, + "charLength": 1, + "snippet": { + "text": "\n\tCreatureVector* creatureVector = tile->getCreatures();\n\tif (!creatureVector) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28a5ce74cb77432c90df2650d96bb7ae78d4a3d1f7fac82ee03312b2b08d20eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'CreatureVector *' (aka 'vector> *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 474, + "startColumn": 7, + "charOffset": 10723, + "charLength": 14, + "snippet": { + "text": "creatureVector" + } + }, + "contextRegion": { + "startLine": 472, + "startColumn": 7, + "charOffset": 10660, + "charLength": 14, + "snippet": { + "text": "\n\tCreatureVector* creatureVector = tile->getCreatures();\n\tif (!creatureVector) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb2712700a14441d34b6156cfb8f35517554526dbf733d04e373943f2e8369df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 479, + "startColumn": 21, + "charOffset": 10795, + "charLength": 14, + "snippet": { + "text": "creatureVector" + } + }, + "contextRegion": { + "startLine": 477, + "startColumn": 21, + "charOffset": 10771, + "charLength": 14, + "snippet": { + "text": "\t}\n\n\tlua_createtable(L, creatureVector->size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f416b418f6b745efcd8854ae34388eaec7f7e2397154ac6a2f99d9ce7278952" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 479, + "startColumn": 21, + "charOffset": 10795, + "charLength": 14, + "snippet": { + "text": "creatureVector" + } + }, + "contextRegion": { + "startLine": 477, + "startColumn": 21, + "charOffset": 10771, + "charLength": 14, + "snippet": { + "text": "\t}\n\n\tlua_createtable(L, creatureVector->size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba78c293ff346b54758222dcbe4c2a0d395fa04a27c99db1d8234515c4022288" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 482, + "startColumn": 2, + "charOffset": 10841, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 480, + "startColumn": 2, + "charOffset": 10823, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (auto &creature : *creatureVector) {\n\t\tpushUserdata(L, creature);\n\t\tsetCreatureMetatable(L, -1, creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00e1216740b9681dff2757016ea8179b6a2e6f692fbe3e99a9483772d7de53bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 493, + "startColumn": 6, + "charOffset": 11163, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 491, + "startColumn": 6, + "charOffset": 11069, + "charLength": 1, + "snippet": { + "text": "\t// tile:getCreatureCount()\n\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (!tile) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f3a3639559d2c075961a798bf5bb8ba6914ccb5e70b3ad86de0a3f951c23411" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 498, + "startColumn": 20, + "charOffset": 11225, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 496, + "startColumn": 20, + "charOffset": 11202, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, tile->getCreatureCount());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b32e13adfdcf3269a632d3b6efe3870b8ac90cd26837e67a7426e1172307ae4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 498, + "startColumn": 20, + "charOffset": 11225, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 496, + "startColumn": 20, + "charOffset": 11202, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, tile->getCreatureCount());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6352f33c7aebddf9798945cea33179720b037489f7077a88b576f14a6455767a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 505, + "startColumn": 6, + "charOffset": 11425, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 503, + "startColumn": 6, + "charOffset": 11320, + "charLength": 1, + "snippet": { + "text": "\t// tile:hasProperty(property[, item])\n\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (!tile) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa37d284a83643b147285b098722311ccdefc275659ad43127f3373799892071" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 529, + "startColumn": 6, + "charOffset": 11944, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 527, + "startColumn": 6, + "charOffset": 11848, + "charLength": 1, + "snippet": { + "text": "\t// tile:getThingIndex(thing)\n\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (!tile) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9819098fb546a94243ff462f6fd6d5d8cdfe2c9645eeea7f7ecb4ebf962b64d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 536, + "startColumn": 21, + "charOffset": 12069, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 534, + "startColumn": 21, + "charOffset": 11987, + "charLength": 4, + "snippet": { + "text": "\tstd::shared_ptr thing = getThing(L, 2);\n\tif (thing) {\n\t\tlua_pushnumber(L, tile->getThingIndex(thing));\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36fd7633e87e142c441d197647bdb6708b49c968fd72a2e8c23e7b61263607ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 558, + "startColumn": 6, + "charOffset": 12576, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 556, + "startColumn": 6, + "charOffset": 12476, + "charLength": 1, + "snippet": { + "text": "\t// tile:queryAdd(thing[, flags])\n\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (!tile) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "816fa2be8d412536809a00a0c34952d6b456b818088bac9ef4d9d7309580e998" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 565, + "startColumn": 3, + "charOffset": 12683, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 563, + "startColumn": 3, + "charOffset": 12619, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr thing = getThing(L, 2);\n\tif (thing) {\n\t\tuint32_t flags = getNumber(L, 3, 0);\n\t\tlua_pushnumber(L, tile->queryAdd(0, thing, 1, flags));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba9120d35a6eaab5f46133433f7b2d2fe9ea9ce0c2861f51f7396d54a0fcc181" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 566, + "startColumn": 21, + "charOffset": 12750, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 564, + "startColumn": 21, + "charOffset": 12667, + "charLength": 4, + "snippet": { + "text": "\tif (thing) {\n\t\tuint32_t flags = getNumber(L, 3, 0);\n\t\tlua_pushnumber(L, tile->queryAdd(0, thing, 1, flags));\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96ed96962d3d399e569dd195ceac8d1e76e72a57f0293b3554157bcbd441c70e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 576, + "startColumn": 6, + "charOffset": 13007, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 574, + "startColumn": 6, + "charOffset": 12882, + "charLength": 1, + "snippet": { + "text": "\t// tile:addItem(itemId[, count/subType = 1[, flags = 0]])\n\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (!tile) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f356eb89c6f65d08f4af4f647f2a3f326edd4ff7053d316ecaeaa3e654edda94" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'itemId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 581, + "startColumn": 11, + "charOffset": 13060, + "charLength": 6, + "snippet": { + "text": "itemId" + } + }, + "contextRegion": { + "startLine": 579, + "startColumn": 11, + "charOffset": 13046, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tuint16_t itemId;\n\tif (isNumber(L, 2)) {\n\t\titemId = getNumber(L, 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4979624f0c40b11847d16d97a5081c522682a52089b3b3e81fb622478237c6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 592, + "startColumn": 2, + "charOffset": 13258, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 590, + "startColumn": 2, + "charOffset": 13253, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tuint32_t subType = getNumber(L, 3, 1);\n\n\tstd::shared_ptr item = Item::CreateItem(itemId, std::min(subType, Item::items[itemId].stackSize));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f643337d160b8b451533df6ce60c1939452c0f5e4168bb23fcbf59b72dcb4ad5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 594, + "startColumn": 56, + "charOffset": 13363, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 592, + "startColumn": 56, + "charOffset": 13257, + "charLength": 3, + "snippet": { + "text": "\tuint32_t subType = getNumber(L, 3, 1);\n\n\tstd::shared_ptr item = Item::CreateItem(itemId, std::min(subType, Item::items[itemId].stackSize));\n\tif (!item) {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14d1249bea73c887a08b3bb100a98ccf2631c30366553dec90ac35895a43f5ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 595, + "startColumn": 6, + "charOffset": 13429, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 593, + "startColumn": 6, + "charOffset": 13307, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = Item::CreateItem(itemId, std::min(subType, Item::items[itemId].stackSize));\n\tif (!item) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9695babc7084a2dbcd6066af51909db6689f844bbc9ee0900a7db8d268d4cee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 600, + "startColumn": 2, + "charOffset": 13473, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 598, + "startColumn": 2, + "charOffset": 13468, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tuint32_t flags = getNumber(L, 4, 0);\n\n\tReturnValue ret = g_game().internalAddItem(tile, item, INDEX_WHEREEVER, flags);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34eb5a16d9bcc3322adc4c45ce5f50de3d723249cf9ab6cc3843a8b13b8c3d67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 616, + "startColumn": 6, + "charOffset": 13903, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 614, + "startColumn": 6, + "charOffset": 13799, + "charLength": 1, + "snippet": { + "text": "\t// tile:addItemEx(item[, flags = 0])\n\tstd::shared_ptr item = getUserdataShared(L, 2);\n\tif (!item) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2cc92393218348cdd27c67940a9351dca0fa69d900d216c2944d39951922021a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 622, + "startColumn": 6, + "charOffset": 14012, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 620, + "startColumn": 6, + "charOffset": 13945, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (!tile) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "57e66bb832eb84a36035b0d47ebcaf486035aafab35012af99938af33a552d38" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 628, + "startColumn": 3, + "charOffset": 14119, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 626, + "startColumn": 3, + "charOffset": 14054, + "charLength": 15, + "snippet": { + "text": "\n\tif (item->getParent() != VirtualCylinder::virtualCylinder) {\n\t\treportErrorFunc(\"Item already has a parent\");\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "403cae8f112ffac497ae870acdec153c8749c76b6459f2135e2cf00fce959517" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 633, + "startColumn": 2, + "charOffset": 14200, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 631, + "startColumn": 2, + "charOffset": 14195, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tuint32_t flags = getNumber(L, 3, 0);\n\tReturnValue ret = g_game().internalAddItem(tile, item, INDEX_WHEREEVER, flags);\n\tif (ret == RETURNVALUE_NOERROR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38128d3b2b302d5a37567b90e6c9e460abaec9eb782071148813745cc3d9b1ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 638, + "startColumn": 20, + "charOffset": 14428, + "charLength": 3, + "snippet": { + "text": "ret" + } + }, + "contextRegion": { + "startLine": 636, + "startColumn": 20, + "charOffset": 14363, + "charLength": 3, + "snippet": { + "text": "\t\tScriptEnvironment::removeTempItem(item);\n\t}\n\tlua_pushnumber(L, ret);\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d998d998c644da5488734e32f4ee5ae28e085e4b7bac66f48175ce2d51a57278" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 645, + "startColumn": 6, + "charOffset": 14585, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 643, + "startColumn": 6, + "charOffset": 14499, + "charLength": 1, + "snippet": { + "text": "\t// tile:getHouse()\n\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (!tile) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74e9a1b4adced35331821f07713fd673eacc0f2216ed298af5c7ed42a210bc35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 662, + "startColumn": 6, + "charOffset": 14980, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 660, + "startColumn": 6, + "charOffset": 14892, + "charLength": 1, + "snippet": { + "text": "\t// tile:sweep(actor)\n\tstd::shared_ptr tile = getUserdataShared(L, 1);\n\tif (!tile) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4c3730783bbbff27d3b8c725c07acc7fe01c1f0de6e53c402b87341b76d32b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 667, + "startColumn": 6, + "charOffset": 15058, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 665, + "startColumn": 6, + "charOffset": 15019, + "charLength": 1, + "snippet": { + "text": "\t}\n\tauto actor = getPlayer(L, 2);\n\tif (!actor) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41800cf1c5400604ecbe0a417cb4779e0aef881026a0c83d30219a6118b286f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 673, + "startColumn": 6, + "charOffset": 15139, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 671, + "startColumn": 6, + "charOffset": 15101, + "charLength": 1, + "snippet": { + "text": "\n\tauto house = tile->getHouse();\n\tif (!house) {\n\t\tg_logger().debug(\"TileFunctions::luaTileSweep: tile has no house\");\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a8afad130a1f1d3c77e2e01c74b28d424d46756fc45e0f6058daeb6ebb4944d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/tile_functions.cpp" + }, + "region": { + "startLine": 686, + "startColumn": 6, + "charOffset": 15491, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 684, + "startColumn": 6, + "charOffset": 15423, + "charLength": 1, + "snippet": { + "text": "\n\tauto houseTile = std::dynamic_pointer_cast(tile);\n\tif (!houseTile) {\n\t\tg_logger().debug(\"TileFunctions::luaTileSweep: tile is not a house tile\");\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a97b4884902ceb7b96c5d8b77108315fd915013a0625f4a0a6a2ac3d7f8f8971" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/map/town_functions.cpp" + }, + "region": { + "startLine": 39, + "startColumn": 21, + "charOffset": 1053, + "charLength": 4, + "snippet": { + "text": "town" + } + }, + "contextRegion": { + "startLine": 37, + "startColumn": 21, + "charOffset": 959, + "charLength": 4, + "snippet": { + "text": "\t// town:getId()\n\tif (const auto &town = getUserdataShared(L, 1)) {\n\t\tlua_pushnumber(L, town->getID());\n\t} else {\n\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7f8c16a07bab718a1a28b684663ac4415528fc87a1891e605f8f1e1408c6c6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/baseevents.cpp" + }, + "region": { + "startLine": 36, + "startColumn": 6, + "charOffset": 1136, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 6, + "charOffset": 1040, + "charLength": 1, + "snippet": { + "text": "\tpugi::xml_document doc;\n\tpugi::xml_parse_result result = doc.load_file(filename.c_str());\n\tif (!result) {\n\t\tprintXMLError(__FUNCTION__, filename, result);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a8fcc270e478ad9c7140aea3c31d0e7d59fcb48d948a88db8f0b808340f9bded" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/baseevents.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 2, + "charOffset": 1234, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 2, + "charOffset": 1216, + "charLength": 3, + "snippet": { + "text": "\tloaded = true;\n\n\tfor (auto node : doc.child(scriptsName.c_str()).children()) {\n\t\tEvent_ptr event = getEvent(node.name());\n\t\tif (!event) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d2ba87261c0bf599599f852d8b7e4973ecd6d9b49999af3aeac75297793249c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/baseevents.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 7, + "charOffset": 1345, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 7, + "charOffset": 1233, + "charLength": 1, + "snippet": { + "text": "\tfor (auto node : doc.child(scriptsName.c_str()).children()) {\n\t\tEvent_ptr event = getEvent(node.name());\n\t\tif (!event) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4809b9d805d348c3b84df428859b97110ab5231158fbe7ab329419e0835126b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'success' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/baseevents.cpp" + }, + "region": { + "startLine": 54, + "startColumn": 8, + "charOffset": 1513, + "charLength": 7, + "snippet": { + "text": "success" + } + }, + "contextRegion": { + "startLine": 52, + "startColumn": 8, + "charOffset": 1501, + "charLength": 7, + "snippet": { + "text": "\t\t}\n\n\t\tbool success;\n\n\t\tpugi::xml_attribute scriptAttribute = node.attribute(\"script\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "277674dc750f1637885eb66ebbd2db885c5edc8a7495896df14fd771983b7792" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/baseevents.cpp" + }, + "region": { + "startLine": 57, + "startColumn": 7, + "charOffset": 1595, + "charLength": 15, + "snippet": { + "text": "scriptAttribute" + } + }, + "contextRegion": { + "startLine": 55, + "startColumn": 7, + "charOffset": 1522, + "charLength": 15, + "snippet": { + "text": "\n\t\tpugi::xml_attribute scriptAttribute = node.attribute(\"script\");\n\t\tif (scriptAttribute) {\n\t\t\tstd::string scriptFile = \"scripts/\" + std::string(scriptAttribute.as_string());\n\t\t\tsuccess = event->checkScript(basePath, scriptsName, scriptFile)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "040da456a149e18720c03f98f9be6053708d4e56c8711dfde251377e1d3b23c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/baseevents.cpp" + }, + "region": { + "startLine": 57, + "startColumn": 7, + "charOffset": 1595, + "charLength": 15, + "snippet": { + "text": "scriptAttribute" + } + }, + "contextRegion": { + "startLine": 55, + "startColumn": 7, + "charOffset": 1522, + "charLength": 15, + "snippet": { + "text": "\n\t\tpugi::xml_attribute scriptAttribute = node.attribute(\"script\");\n\t\tif (scriptAttribute) {\n\t\t\tstd::string scriptFile = \"scripts/\" + std::string(scriptAttribute.as_string());\n\t\t\tsuccess = event->checkScript(basePath, scriptsName, scriptFile)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd4cab726efa3139773c81fc8ba15091efe0a9a2e2d664eadc1d99c7bc301552" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/baseevents.cpp" + }, + "region": { + "startLine": 61, + "startColumn": 8, + "charOffset": 1849, + "charLength": 4, + "snippet": { + "text": "node" + } + }, + "contextRegion": { + "startLine": 59, + "startColumn": 8, + "charOffset": 1697, + "charLength": 4, + "snippet": { + "text": "\t\t\tsuccess = event->checkScript(basePath, scriptsName, scriptFile)\n\t\t\t\t&& event->loadScript(basePath + scriptFile, scriptAttribute.as_string());\n\t\t\tif (node.attribute(\"function\")) {\n\t\t\t\tevent->loadFunction(node.attribute(\"function\"), true);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c822e54121211e1091c8cf39b4e51e817b4f60056d39024c447dc44f9c8f6714" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/baseevents.cpp" + }, + "region": { + "startLine": 61, + "startColumn": 8, + "charOffset": 1849, + "charLength": 4, + "snippet": { + "text": "node" + } + }, + "contextRegion": { + "startLine": 59, + "startColumn": 8, + "charOffset": 1697, + "charLength": 4, + "snippet": { + "text": "\t\t\tsuccess = event->checkScript(basePath, scriptsName, scriptFile)\n\t\t\t\t&& event->loadScript(basePath + scriptFile, scriptAttribute.as_string());\n\t\t\tif (node.attribute(\"function\")) {\n\t\t\t\tevent->loadFunction(node.attribute(\"function\"), true);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d5f2990456c02e3684c139ee0c966d2dac02c659fd04734854550c01cf6067a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/baseevents.cpp" + }, + "region": { + "startLine": 62, + "startColumn": 12, + "charOffset": 1890, + "charLength": 12, + "snippet": { + "text": "loadFunction" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 12, + "charOffset": 1764, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t&& event->loadScript(basePath + scriptFile, scriptAttribute.as_string());\n\t\t\tif (node.attribute(\"function\")) {\n\t\t\t\tevent->loadFunction(node.attribute(\"function\"), true);\n\t\t\t}\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9598d1db7fb4c6c4de1c38c8a6b98419a2957c6bd87ac9c6b52a6850b0e61d9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/baseevents.cpp" + }, + "region": { + "startLine": 69, + "startColumn": 4, + "charOffset": 2048, + "charLength": 13, + "snippet": { + "text": "registerEvent" + } + }, + "contextRegion": { + "startLine": 67, + "startColumn": 4, + "charOffset": 2027, + "charLength": 13, + "snippet": { + "text": "\n\t\tif (success) {\n\t\t\tregisterEvent(std::move(event), node);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4a36eafc46c4a77f6f65b05b3994611044729c7608c6c80dd4c3ddeb5385161" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/baseevents.cpp" + }, + "region": { + "startLine": 82, + "startColumn": 23, + "charOffset": 2252, + "charLength": 11, + "snippet": { + "text": "reInitState" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 23, + "charOffset": 2196, + "charLength": 11, + "snippet": { + "text": "\nvoid BaseEvents::reInitState() {\n\tgetScriptInterface().reInitState();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64ec31f9390bc830d223b45b4ce545d048b56552c1d529c62d32089cd36a4375" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/baseevents.cpp" + }, + "region": { + "startLine": 90, + "startColumn": 17, + "charOffset": 2565, + "charLength": 11, + "snippet": { + "text": "reInitState" + } + }, + "contextRegion": { + "startLine": 88, + "startColumn": 17, + "charOffset": 2349, + "charLength": 11, + "snippet": { + "text": "bool Event::checkScript(const std::string &basePath, const std::string &scriptsName, const std::string &scriptFile) const {\n\tLuaScriptInterface* testInterface = g_luaEnvironment().getTestInterface();\n\ttestInterface->reInitState();\n\n\tif (testInterface->loadFile(basePath + \"lib/\" + scriptsName + \".lua\", scriptsName + \".lua\") == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7f2218d39363d0e99b918367c5c75286bcfb8ec39430ca1c47802e286330701" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-redundant-string-cstr", + "ruleIndex": 724, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant call to 'c_str'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/baseevents.cpp" + }, + "region": { + "startLine": 155, + "startColumn": 41, + "charOffset": 4454, + "charLength": 4, + "snippet": { + "text": "name" + } + }, + "contextRegion": { + "startLine": 153, + "startColumn": 41, + "charOffset": 4383, + "charLength": 4, + "snippet": { + "text": "\tscriptInterface = interface;\n\n\tint32_t id = scriptInterface->getEvent(name.c_str());\n\tif (id == -1) {\n\t\tg_logger().warn(\"[{}] - Event {} not found\", __FUNCTION__, name);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fee44cf73769abe215354eb21e3cc87f9e91b6438894af3673ff7211d288115" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x80000000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 24, + "startColumn": 27, + "charOffset": 749, + "charLength": 10, + "snippet": { + "text": "0x80000000" + } + }, + "contextRegion": { + "startLine": 22, + "startColumn": 27, + "charOffset": 694, + "charLength": 10, + "snippet": { + "text": "int32_t Npc::despawnRadius;\n\nuint32_t Npc::npcAutoID = 0x80000000;\n\nstd::shared_ptr Npc::createNpc(const std::string &name) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a26eb81d43e9591a380f087f19f1a8c9a1093c09e5fa70df10e67c6b82867d7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 6, + "charOffset": 880, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 6, + "charOffset": 762, + "charLength": 1, + "snippet": { + "text": "std::shared_ptr Npc::createNpc(const std::string &name) {\n\tconst auto &npcType = g_npcs().getNpcType(name);\n\tif (!npcType) {\n\t\treturn nullptr;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7bc365c7ee9b100b80e0bd107db71e6d507fc30a30a5d447cdd8b2c0876b9b62" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-redundant-member-init", + "ruleIndex": 721, + "kind": "fail", + "level": "warning", + "message": { + "text": "initializer for base class 'Creature' is redundant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 35, + "startColumn": 2, + "charOffset": 1009, + "charLength": 8, + "snippet": { + "text": "Creature" + } + }, + "contextRegion": { + "startLine": 33, + "startColumn": 2, + "charOffset": 955, + "charLength": 8, + "snippet": { + "text": "\nNpc::Npc(const std::shared_ptr &npcType) :\n\tCreature(),\n\tstrDescription(npcType->nameDescription),\n\tnpcType(npcType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9dea05dcd31addd1fb2562fa62938153fb853de77c5799f9722c551ddf0bf86d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 11, + "charOffset": 1251, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 11, + "charOffset": 1123, + "charLength": 7, + "snippet": { + "text": "\tcurrentOutfit = npcType->info.outfit;\n\tfloat multiplier = g_configManager().getFloat(RATE_NPC_HEALTH, __FUNCTION__);\n\thealth = npcType->info.health * multiplier;\n\thealthMax = npcType->info.healthMax * multiplier;\n\tbaseSpeed = npcType->info.baseSpeed;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c960931dc693379420cbae7aec68cc98d1861be050c052bcb2bf39f6cd2d3b8b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 11, + "charOffset": 1251, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 11, + "charOffset": 1123, + "charLength": 7, + "snippet": { + "text": "\tcurrentOutfit = npcType->info.outfit;\n\tfloat multiplier = g_configManager().getFloat(RATE_NPC_HEALTH, __FUNCTION__);\n\thealth = npcType->info.health * multiplier;\n\thealthMax = npcType->info.healthMax * multiplier;\n\tbaseSpeed = npcType->info.baseSpeed;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1a7592769dab9b32d493e6f60321ae41e95cdef182dcc1f799314b025d7b384" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 11, + "charOffset": 1251, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 11, + "charOffset": 1123, + "charLength": 7, + "snippet": { + "text": "\tcurrentOutfit = npcType->info.outfit;\n\tfloat multiplier = g_configManager().getFloat(RATE_NPC_HEALTH, __FUNCTION__);\n\thealth = npcType->info.health * multiplier;\n\thealthMax = npcType->info.healthMax * multiplier;\n\tbaseSpeed = npcType->info.baseSpeed;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "18aea35b2a53c7b15d72f8d331112ed1b983a6a765e6a076148d3b558c2d9258" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 14, + "charOffset": 1299, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 14, + "charOffset": 1162, + "charLength": 7, + "snippet": { + "text": "\tfloat multiplier = g_configManager().getFloat(RATE_NPC_HEALTH, __FUNCTION__);\n\thealth = npcType->info.health * multiplier;\n\thealthMax = npcType->info.healthMax * multiplier;\n\tbaseSpeed = npcType->info.baseSpeed;\n\tinternalLight = npcType->info.light;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6027540ca293c63ca7e4cb0ab67cc3fb36fb2c6033e05f4c8f4ce64ce859ab5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 14, + "charOffset": 1299, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 14, + "charOffset": 1162, + "charLength": 7, + "snippet": { + "text": "\tfloat multiplier = g_configManager().getFloat(RATE_NPC_HEALTH, __FUNCTION__);\n\thealth = npcType->info.health * multiplier;\n\thealthMax = npcType->info.healthMax * multiplier;\n\tbaseSpeed = npcType->info.baseSpeed;\n\tinternalLight = npcType->info.light;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1cfac9ea90b68b0e6fe87659eb71a5130e2f1826f201d6193184b127bc329be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 14, + "charOffset": 1299, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 14, + "charOffset": 1162, + "charLength": 7, + "snippet": { + "text": "\tfloat multiplier = g_configManager().getFloat(RATE_NPC_HEALTH, __FUNCTION__);\n\thealth = npcType->info.health * multiplier;\n\thealthMax = npcType->info.healthMax * multiplier;\n\tbaseSpeed = npcType->info.baseSpeed;\n\tinternalLight = npcType->info.light;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe4fc3299f8d0ee04d507d2db362edda50beb978fbfd29af735a4891df55dc1a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 14, + "charOffset": 1350, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 14, + "charOffset": 1241, + "charLength": 7, + "snippet": { + "text": "\thealth = npcType->info.health * multiplier;\n\thealthMax = npcType->info.healthMax * multiplier;\n\tbaseSpeed = npcType->info.baseSpeed;\n\tinternalLight = npcType->info.light;\n\tfloorChange = npcType->info.floorChange;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8baab0cc2fd3acc464f4e92991350d4c9431523cde210897e6ed98402e5919f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 48, + "startColumn": 2, + "charOffset": 1486, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 2, + "charOffset": 1455, + "charLength": 3, + "snippet": { + "text": "\n\t// register creature events\n\tfor (const std::string &scriptName : npcType->info.scripts) {\n\t\tif (!registerCreatureEvent(scriptName)) {\n\t\t\tg_logger().warn(\"Unknown event name: {}\", scriptName);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5d6501aee421c5937e8288712c0275f131f0a0eaae6577fd92a1443ba65a3fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 67, + "startColumn": 46, + "charOffset": 1970, + "charLength": 5, + "snippet": { + "text": "range" + } + }, + "contextRegion": { + "startLine": 65, + "startColumn": 46, + "charOffset": 1906, + "charLength": 5, + "snippet": { + "text": "\t\treturn false;\n\t}\n\treturn Creature::canSee(getPosition(), pos, range, range);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "622cc327230a2e4f452f91ae0f07055ea9c44c7510bedca4821f385ff3684147" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 67, + "startColumn": 53, + "charOffset": 1977, + "charLength": 5, + "snippet": { + "text": "range" + } + }, + "contextRegion": { + "startLine": 65, + "startColumn": 53, + "charOffset": 1906, + "charLength": 5, + "snippet": { + "text": "\t\treturn false;\n\t}\n\treturn Creature::canSee(getPosition(), pos, range, range);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bedcc3c6552b6e23e2943ffbb9cd34625710d75abbb0bfb2d583ced8342a94ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 140, + "startColumn": 2, + "charOffset": 4142, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 138, + "startColumn": 2, + "charOffset": 4115, + "charLength": 2, + "snippet": { + "text": "\nvoid Npc::manageIdle() {\n\tif (creatureCheck && playerSpectators.empty()) {\n\t\tGame::removeCreatureCheck(static_self_cast());\n\t} else if (!creatureCheck) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5bdcb65b3380969d2c11c7013471aa7eb9d60e595b377bb5776bfef034cf556e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 147, + "startColumn": 50, + "charOffset": 4384, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 145, + "startColumn": 50, + "charOffset": 4332, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Npc::onPlayerAppear(std::shared_ptr player) {\n\tif (player->hasFlag(PlayerFlags_t::IgnoredByNpcs) || playerSpectators.contains(player)) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4349c10aaa2b042644dfb319e93a5b3f2ba06502b39fcde04f065da889d1ce5c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 151, + "startColumn": 19, + "charOffset": 4516, + "charLength": 7, + "snippet": { + "text": "emplace" + } + }, + "contextRegion": { + "startLine": 149, + "startColumn": 19, + "charOffset": 4485, + "charLength": 7, + "snippet": { + "text": "\t\treturn;\n\t}\n\tplayerSpectators.emplace(player);\n\tmanageIdle();\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f34ecfd40f4a48988e89855c1926f52878778329ead59527155971cd3b8d9c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 155, + "startColumn": 53, + "charOffset": 4603, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 153, + "startColumn": 53, + "charOffset": 4548, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Npc::onPlayerDisappear(std::shared_ptr player) {\n\tremovePlayerInteraction(player);\n\tif (!player->hasFlag(PlayerFlags_t::IgnoredByNpcs) && playerSpectators.contains(player)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30bc716cd305e0327eadbfadd057acdb486763538a90be247683dac9f81f0f6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 158, + "startColumn": 20, + "charOffset": 4758, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 156, + "startColumn": 20, + "charOffset": 4613, + "charLength": 5, + "snippet": { + "text": "\tremovePlayerInteraction(player);\n\tif (!player->hasFlag(PlayerFlags_t::IgnoredByNpcs) && playerSpectators.contains(player)) {\n\t\tplayerSpectators.erase(player);\n\t\tmanageIdle();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45e7e7609858f0bef7f85665c5cb8ff2884bb8cf463f5c559ae7a5f1df24ecee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 166, + "startColumn": 6, + "charOffset": 4955, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 6, + "charOffset": 4901, + "charLength": 1, + "snippet": { + "text": "\tCreature::onCreatureSay(creature, type, text);\n\n\tif (!creature->getPlayer()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17352ceab850a7a203ff16c569dd9f59222d9a50496b9c715bf1a98ff7fab6b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 193, + "startColumn": 115, + "charOffset": 5719, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 191, + "startColumn": 115, + "charOffset": 5586, + "charLength": 3, + "snippet": { + "text": "\t\tsoundTicks = 0;\n\n\t\tif (!npcType->info.soundVector.empty() && (npcType->info.soundChance >= static_cast(uniform_random(1, 100)))) {\n\t\t\tauto index = uniform_random(0, npcType->info.soundVector.size() - 1);\n\t\t\tg_game().sendSingleSoundEffect(static_self_cast()->getPosition(), npcType->info.soundVector[index], getNpc());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d148e1d49aacd455b5ce9c3df3d31628bb2438166c98b9bfbee5ec75efbb35b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 194, + "startColumn": 35, + "charOffset": 5763, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 192, + "startColumn": 35, + "charOffset": 5604, + "charLength": 7, + "snippet": { + "text": "\n\t\tif (!npcType->info.soundVector.empty() && (npcType->info.soundChance >= static_cast(uniform_random(1, 100)))) {\n\t\t\tauto index = uniform_random(0, npcType->info.soundVector.size() - 1);\n\t\t\tg_game().sendSingleSoundEffect(static_self_cast()->getPosition(), npcType->info.soundVector[index], getNpc());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "041a31ed8544c153b5ae6bc1f100596e7c100e2ca0da2682c27e40e471d24252" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 194, + "startColumn": 35, + "charOffset": 5763, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 192, + "startColumn": 35, + "charOffset": 5604, + "charLength": 7, + "snippet": { + "text": "\n\t\tif (!npcType->info.soundVector.empty() && (npcType->info.soundChance >= static_cast(uniform_random(1, 100)))) {\n\t\t\tauto index = uniform_random(0, npcType->info.soundVector.size() - 1);\n\t\t\tg_game().sendSingleSoundEffect(static_self_cast()->getPosition(), npcType->info.soundVector[index], getNpc());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21c48ab1bfd1a81ec5add4b8bd0c5efc8a49bd22b9c0b86072d91ffa2bb1c156" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 207, + "startColumn": 23, + "charOffset": 6261, + "charLength": 8, + "snippet": { + "text": "interval" + } + }, + "contextRegion": { + "startLine": 205, + "startColumn": 23, + "charOffset": 6117, + "charLength": 8, + "snippet": { + "text": "\tif (callback.startScriptInterface(npcType->info.thinkEvent)) {\n\t\tcallback.pushSpecificCreature(static_self_cast());\n\t\tcallback.pushNumber(interval);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c31524dddc1572c3d138129f66a10475e6c4a1d1a9092e2f75e9b8080dd1bc7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 215, + "startColumn": 12, + "charOffset": 6373, + "charLength": 14, + "snippet": { + "text": "removeCreature" + } + }, + "contextRegion": { + "startLine": 213, + "startColumn": 12, + "charOffset": 6324, + "charLength": 14, + "snippet": { + "text": "\n\tif (!npcType->canSpawn(position)) {\n\t\tg_game().removeCreature(static_self_cast());\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a3fb56ae0f1066c3836da0416d04ec9121cb210eea3f02a161b4f2452f8e629" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 219, + "startColumn": 12, + "charOffset": 6463, + "charLength": 16, + "snippet": { + "text": "internalTeleport" + } + }, + "contextRegion": { + "startLine": 217, + "startColumn": 12, + "charOffset": 6417, + "charLength": 16, + "snippet": { + "text": "\n\tif (!isInSpawnRange(position)) {\n\t\tg_game().internalTeleport(static_self_cast(), masterPos);\n\t\tresetPlayerInteractions();\n\t\tcloseAllShopWindows();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ef13ba39816e2fad6726c56fc344fd1540eaacce1bff9c6245e60c935b25d7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'onPlayerBuyItem' has cognitive complexity of 31 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 231, + "startColumn": 11, + "charOffset": 6701, + "charLength": 15, + "snippet": { + "text": "onPlayerBuyItem" + } + }, + "contextRegion": { + "startLine": 229, + "startColumn": 11, + "charOffset": 6688, + "charLength": 15, + "snippet": { + "text": "}\n\nvoid Npc::onPlayerBuyItem(std::shared_ptr player, uint16_t itemId, uint8_t subType, uint16_t amount, bool ignore, bool inBackpacks) {\n\tif (player == nullptr) {\n\t\tg_logger().error(\"[Npc::onPlayerBuyItem] - Player is nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0adb58a380ff62fd4e4d7c8b9111adb4bca900ade68ec234ce1ecbcf3a42c8a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 231, + "startColumn": 51, + "charOffset": 6741, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 229, + "startColumn": 51, + "charOffset": 6688, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Npc::onPlayerBuyItem(std::shared_ptr player, uint16_t itemId, uint8_t subType, uint16_t amount, bool ignore, bool inBackpacks) {\n\tif (player == nullptr) {\n\t\tg_logger().error(\"[Npc::onPlayerBuyItem] - Player is nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bde35ffa69256b86f9a0af783db8f5ab499903e6bc3bd7f6539b5fa6135904ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 243, + "startColumn": 30, + "charOffset": 7138, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 30, + "charOffset": 7105, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tuint32_t shoppingBagPrice = 20;\n\tuint32_t shoppingBagSlots = 20;\n\tconst ItemType &itemType = Item::items[itemId];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ea9b8e418a632d6ad13bdaa51fc31a496e5ac30b7c3f207ef851a2ec909bdb7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 244, + "startColumn": 30, + "charOffset": 7171, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 30, + "charOffset": 7108, + "charLength": 2, + "snippet": { + "text": "\n\tuint32_t shoppingBagPrice = 20;\n\tuint32_t shoppingBagSlots = 20;\n\tconst ItemType &itemType = Item::items[itemId];\n\tif (std::shared_ptr tile = ignore ? player->getTile() : nullptr; tile) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e81a5520b6f3b11dee4be47ba4d9417468535a974e319f05851a181d88f5e2d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'slotsNedeed' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 247, + "startColumn": 10, + "charOffset": 7313, + "charLength": 11, + "snippet": { + "text": "slotsNedeed" + } + }, + "contextRegion": { + "startLine": 245, + "startColumn": 10, + "charOffset": 7175, + "charLength": 11, + "snippet": { + "text": "\tconst ItemType &itemType = Item::items[itemId];\n\tif (std::shared_ptr tile = ignore ? player->getTile() : nullptr; tile) {\n\t\tdouble slotsNedeed;\n\t\tif (itemType.stackable) {\n\t\t\tslotsNedeed = inBackpacks ? std::ceil(std::ceil(static_cast(amount) / itemType.stackSize) / shoppingBagSlots) : std::ceil(static_cast(amount) / itemType.stackSize);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d9a448f41a7026125b9ea2d5f2e12b7f8b65268d43b9d73ac7d38d43db48e27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 249, + "startColumn": 82, + "charOffset": 7435, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 247, + "startColumn": 82, + "charOffset": 7304, + "charLength": 8, + "snippet": { + "text": "\t\tdouble slotsNedeed;\n\t\tif (itemType.stackable) {\n\t\t\tslotsNedeed = inBackpacks ? std::ceil(std::ceil(static_cast(amount) / itemType.stackSize) / shoppingBagSlots) : std::ceil(static_cast(amount) / itemType.stackSize);\n\t\t} else {\n\t\t\tslotsNedeed = inBackpacks ? std::ceil(static_cast(amount) / shoppingBagSlots) : static_cast(amount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "436ebdeb768544a169b9da9529a4594f7ff5cd6e09a334910cb4a6b37adc5e3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 249, + "startColumn": 104, + "charOffset": 7457, + "charLength": 16, + "snippet": { + "text": "shoppingBagSlots" + } + }, + "contextRegion": { + "startLine": 247, + "startColumn": 104, + "charOffset": 7304, + "charLength": 16, + "snippet": { + "text": "\t\tdouble slotsNedeed;\n\t\tif (itemType.stackable) {\n\t\t\tslotsNedeed = inBackpacks ? std::ceil(std::ceil(static_cast(amount) / itemType.stackSize) / shoppingBagSlots) : std::ceil(static_cast(amount) / itemType.stackSize);\n\t\t} else {\n\t\t\tslotsNedeed = inBackpacks ? std::ceil(static_cast(amount) / shoppingBagSlots) : static_cast(amount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8490b7347b826b0d7576cd5913f6e0699fd8a444bd2cb9982930084ecb6a260" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 249, + "startColumn": 164, + "charOffset": 7517, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 247, + "startColumn": 164, + "charOffset": 7304, + "charLength": 8, + "snippet": { + "text": "\t\tdouble slotsNedeed;\n\t\tif (itemType.stackable) {\n\t\t\tslotsNedeed = inBackpacks ? std::ceil(std::ceil(static_cast(amount) / itemType.stackSize) / shoppingBagSlots) : std::ceil(static_cast(amount) / itemType.stackSize);\n\t\t} else {\n\t\t\tslotsNedeed = inBackpacks ? std::ceil(static_cast(amount) / shoppingBagSlots) : static_cast(amount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "392b6bfae9ca2ff99520b3ca7000083c58385befd2dcfa0bb6aeba43168707b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 251, + "startColumn": 72, + "charOffset": 7620, + "charLength": 16, + "snippet": { + "text": "shoppingBagSlots" + } + }, + "contextRegion": { + "startLine": 249, + "startColumn": 72, + "charOffset": 7354, + "charLength": 16, + "snippet": { + "text": "\t\t\tslotsNedeed = inBackpacks ? std::ceil(std::ceil(static_cast(amount) / itemType.stackSize) / shoppingBagSlots) : std::ceil(static_cast(amount) / itemType.stackSize);\n\t\t} else {\n\t\t\tslotsNedeed = inBackpacks ? std::ceil(static_cast(amount) / shoppingBagSlots) : static_cast(amount);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e796a9c029ee6dec4903dc992580afa4ea5e8fe72b5b372795ce09b3e4e77c81" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 254, + "startColumn": 74, + "charOffset": 7747, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 74, + "charOffset": 7669, + "charLength": 6, + "snippet": { + "text": "\t\t}\n\n\t\tif ((static_cast(tile->getItemList()->size()) + (slotsNedeed - player->getFreeBackpackSlots())) > 30) {\n\t\t\tplayer->sendCancelMessage(RETURNVALUE_NOTENOUGHROOM);\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "456d2ada16d5e8d3975eaee385a556928296e1f362b2e8f1fc3c3e82ea8c2130" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 254, + "startColumn": 109, + "charOffset": 7782, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 109, + "charOffset": 7669, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif ((static_cast(tile->getItemList()->size()) + (slotsNedeed - player->getFreeBackpackSlots())) > 30) {\n\t\t\tplayer->sendCancelMessage(RETURNVALUE_NOTENOUGHROOM);\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31a211faeafe287c1ef26ce28a774db076ec3bf78992c1d8fdc3963c05592f26" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 254, + "startColumn": 109, + "charOffset": 7782, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 109, + "charOffset": 7669, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif ((static_cast(tile->getItemList()->size()) + (slotsNedeed - player->getFreeBackpackSlots())) > 30) {\n\t\t\tplayer->sendCancelMessage(RETURNVALUE_NOTENOUGHROOM);\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bd0d95e5591ed0ba87ff22ade1c2b0707e009eeac9f6aea4dca76a24f61218d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 262, + "startColumn": 2, + "charOffset": 7953, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 260, + "startColumn": 2, + "charOffset": 7864, + "charLength": 3, + "snippet": { + "text": "\tuint32_t buyPrice = 0;\n\tconst auto &shopVector = getShopItemVector(player->getGUID());\n\tfor (const ShopBlock &shopBlock : shopVector) {\n\t\tif (itemType.id == shopBlock.itemId && shopBlock.itemBuyPrice != 0) {\n\t\t\tbuyPrice = shopBlock.itemBuyPrice;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87430456c5b8d41b080ed6717ccfa3e122af1d4f28210344099dbb1aa172a323" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 270, + "startColumn": 2, + "charOffset": 8185, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 268, + "startColumn": 2, + "charOffset": 8119, + "charLength": 2, + "snippet": { + "text": "\tuint32_t totalCost = buyPrice * amount;\n\tuint32_t bagsCost = 0;\n\tif (inBackpacks && itemType.stackable) {\n\t\tbagsCost = shoppingBagPrice * static_cast(std::ceil(std::ceil(static_cast(amount) / itemType.stackSize) / shoppingBagSlots));\n\t} else if (inBackpacks && !itemType.stackable) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3338ea7d09e351ed231158d4b37fc3d4f82c9004534fc6b6f271732a345d45a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 271, + "startColumn": 105, + "charOffset": 8330, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 269, + "startColumn": 105, + "charOffset": 8160, + "charLength": 8, + "snippet": { + "text": "\tuint32_t bagsCost = 0;\n\tif (inBackpacks && itemType.stackable) {\n\t\tbagsCost = shoppingBagPrice * static_cast(std::ceil(std::ceil(static_cast(amount) / itemType.stackSize) / shoppingBagSlots));\n\t} else if (inBackpacks && !itemType.stackable) {\n\t\tbagsCost = shoppingBagPrice * static_cast(std::ceil(static_cast(amount) / shoppingBagSlots));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0073676615cb905d7ba97704ab914e5f670877639f082bada52c6b292bd9f2b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 271, + "startColumn": 127, + "charOffset": 8352, + "charLength": 16, + "snippet": { + "text": "shoppingBagSlots" + } + }, + "contextRegion": { + "startLine": 269, + "startColumn": 127, + "charOffset": 8160, + "charLength": 16, + "snippet": { + "text": "\tuint32_t bagsCost = 0;\n\tif (inBackpacks && itemType.stackable) {\n\t\tbagsCost = shoppingBagPrice * static_cast(std::ceil(std::ceil(static_cast(amount) / itemType.stackSize) / shoppingBagSlots));\n\t} else if (inBackpacks && !itemType.stackable) {\n\t\tbagsCost = shoppingBagPrice * static_cast(std::ceil(static_cast(amount) / shoppingBagSlots));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d6b850d373518614532a0708575e0eeb2166e189c0e9f95d7db8ccb1d5cb7e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 273, + "startColumn": 95, + "charOffset": 8516, + "charLength": 16, + "snippet": { + "text": "shoppingBagSlots" + } + }, + "contextRegion": { + "startLine": 271, + "startColumn": 95, + "charOffset": 8226, + "charLength": 16, + "snippet": { + "text": "\t\tbagsCost = shoppingBagPrice * static_cast(std::ceil(std::ceil(static_cast(amount) / itemType.stackSize) / shoppingBagSlots));\n\t} else if (inBackpacks && !itemType.stackable) {\n\t\tbagsCost = shoppingBagPrice * static_cast(std::ceil(static_cast(amount) / shoppingBagSlots));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0793c118c01ab4fc0802811ebcb8a9347ee4cb2ae0a392c4a56ef531811c5a2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 276, + "startColumn": 2, + "charOffset": 8541, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 274, + "startColumn": 2, + "charOffset": 8536, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (getCurrency() == ITEM_GOLD_COIN && (player->getMoney() + player->getBankBalance()) < totalCost) {\n\t\tg_logger().error(\"[Npc::onPlayerBuyItem (getMoney)] - Player {} have a problem for buy item {} on shop for npc {}\", player->getName(), itemId, getName());\n\t\tg_logger().debug(\"[Information] Player {} tried to buy item {} on shop for npc {}, at position {}\", player->getName(), itemId, getName(), player->getPosition().toString());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8832897f7520d639891472ba0ff144d8e640fc97caaffb175f07cd8b17eb334" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 279, + "startColumn": 46, + "charOffset": 9020, + "charLength": 9, + "snippet": { + "text": "totalCost" + } + }, + "contextRegion": { + "startLine": 277, + "startColumn": 46, + "charOffset": 8643, + "charLength": 9, + "snippet": { + "text": "\t\tg_logger().error(\"[Npc::onPlayerBuyItem (getMoney)] - Player {} have a problem for buy item {} on shop for npc {}\", player->getName(), itemId, getName());\n\t\tg_logger().debug(\"[Information] Player {} tried to buy item {} on shop for npc {}, at position {}\", player->getName(), itemId, getName(), player->getPosition().toString());\n\t\tg_metrics().addCounter(\"balance_decrease\", totalCost, { { \"player\", player->getName() }, { \"context\", \"npc_purchase\" } });\n\t\treturn;\n\t} else if (getCurrency() != ITEM_GOLD_COIN && (player->getItemTypeCount(getCurrency()) < totalCost || ((player->getMoney() + player->getBankBalance()) < bagsCost))) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd5a9c8f46189df850df5c28b4ef811e0ce8cea179a03a554ce892eff8d0b9d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 281, + "startColumn": 4, + "charOffset": 9113, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 279, + "startColumn": 4, + "charOffset": 8975, + "charLength": 4, + "snippet": { + "text": "\t\tg_metrics().addCounter(\"balance_decrease\", totalCost, { { \"player\", player->getName() }, { \"context\", \"npc_purchase\" } });\n\t\treturn;\n\t} else if (getCurrency() != ITEM_GOLD_COIN && (player->getItemTypeCount(getCurrency()) < totalCost || ((player->getMoney() + player->getBankBalance()) < bagsCost))) {\n\t\tg_logger().error(\"[Npc::onPlayerBuyItem (getItemTypeCount)] - Player {} have a problem for buy item {} on shop for npc {}\", player->getName(), itemId, getName());\n\t\tg_logger().debug(\"[Information] Player {} tried to buy item {} on shop for npc {}, at position {}\", player->getName(), itemId, getName(), player->getPosition().toString());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c4f589e6949660b998d3c25602979898a074f2b87f752d5f2575890b09b211a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 297, + "startColumn": 23, + "charOffset": 10147, + "charLength": 9, + "snippet": { + "text": "totalCost" + } + }, + "contextRegion": { + "startLine": 295, + "startColumn": 23, + "charOffset": 10056, + "charLength": 9, + "snippet": { + "text": "\t\tcallback.pushBoolean(ignore);\n\t\tcallback.pushBoolean(inBackpacks);\n\t\tcallback.pushNumber(totalCost);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a41c9990ceb6bdbf19cfc069fd97fdbc629de4d8c0f5fc909a8f191d31f38f8f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'onPlayerSellAllLoot' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 310, + "startColumn": 31, + "charOffset": 10481, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 308, + "startColumn": 31, + "charOffset": 10448, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Npc::onPlayerSellAllLoot(uint32_t playerId, uint16_t itemId, bool ignore, uint64_t totalPrice) {\n\tstd::shared_ptr player = g_game().getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a41ca5f0138406f55fcf5f80fc1bfb94842874173b49cb66374b2eb624fe96a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 312, + "startColumn": 6, + "charOffset": 10626, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 310, + "startColumn": 6, + "charOffset": 10451, + "charLength": 1, + "snippet": { + "text": "void Npc::onPlayerSellAllLoot(uint32_t playerId, uint16_t itemId, bool ignore, uint64_t totalPrice) {\n\tstd::shared_ptr player = g_game().getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2cfef1ff58b2f4072af46b2820f95b224a147f4d22af4736849ed5a3ea634eb2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 317, + "startColumn": 7, + "charOffset": 10733, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 315, + "startColumn": 7, + "charOffset": 10650, + "charLength": 1, + "snippet": { + "text": "\tif (itemId == ITEM_GOLD_POUCH) {\n\t\tauto container = player->getLootPouch();\n\t\tif (!container) {\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84161af7dc74a64b48d8b8213d9684227b903ee64e6fd2b3c930679b5ff067b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 323, + "startColumn": 3, + "charOffset": 10867, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 321, + "startColumn": 3, + "charOffset": 10786, + "charLength": 3, + "snippet": { + "text": "\t\tuint64_t toSellCount = 0;\n\t\tphmap::flat_hash_map toSell;\n\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\tif (toSellCount >= 500) {\n\t\t\t\thasMore = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "509f6064eb5f8d7a159614c42500f582bacb2154152686b1168a099a83c7a680" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 323, + "startColumn": 3, + "charOffset": 10867, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 321, + "startColumn": 3, + "charOffset": 10786, + "charLength": 3, + "snippet": { + "text": "\t\tuint64_t toSellCount = 0;\n\t\tphmap::flat_hash_map toSell;\n\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\tif (toSellCount >= 500) {\n\t\t\t\thasMore = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1833af48027026b73b7affc79848dd12b47d73f0fd24242c998b9a03008edc38" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 323, + "startColumn": 54, + "charOffset": 10918, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 321, + "startColumn": 54, + "charOffset": 10786, + "charLength": 2, + "snippet": { + "text": "\t\tuint64_t toSellCount = 0;\n\t\tphmap::flat_hash_map toSell;\n\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\tif (toSellCount >= 500) {\n\t\t\t\thasMore = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c900086472ec44cc52a8c87fa05843bc741852448eb2b8a3065c55bc036194e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "500 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 324, + "startColumn": 23, + "charOffset": 10970, + "charLength": 3, + "snippet": { + "text": "500" + } + }, + "contextRegion": { + "startLine": 322, + "startColumn": 23, + "charOffset": 10814, + "charLength": 3, + "snippet": { + "text": "\t\tphmap::flat_hash_map toSell;\n\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\tif (toSellCount >= 500) {\n\t\t\t\thasMore = true;\n\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3aaf4df3515d8c0c3cee17b60b84adb84737969bdec297e22400aafa788918c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 329, + "startColumn": 8, + "charOffset": 11040, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 327, + "startColumn": 8, + "charOffset": 11008, + "charLength": 1, + "snippet": { + "text": "\t\t\t}\n\t\t\tauto item = *it;\n\t\t\tif (!item) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0bb2e57e829c0b036c00cf944c914d9663029766f4769950a6af0ec1e724937c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 339, + "startColumn": 3, + "charOffset": 11233, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 337, + "startColumn": 3, + "charOffset": 11222, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\t\t}\n\t\tfor (auto &[m_itemId, amount] : toSell) {\n\t\t\tonPlayerSellItem(player, m_itemId, 0, amount, ignore, totalPrice, container);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35247687921236f7f152d75c65f612d315bb089087a4f8877a295a294ee5f6f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 349, + "startColumn": 19, + "charOffset": 11577, + "charLength": 13, + "snippet": { + "text": "scheduleEvent" + } + }, + "contextRegion": { + "startLine": 347, + "startColumn": 19, + "charOffset": 11538, + "charLength": 13, + "snippet": { + "text": "\t\t}\n\t\tif (hasMore) {\n\t\t\tg_dispatcher().scheduleEvent(\n\t\t\t\tSCHEDULER_MINTICKS, [this, playerId = player->getID(), itemId, ignore, totalPrice] { onPlayerSellAllLoot(playerId, itemId, ignore, totalPrice); }, __FUNCTION__\n\t\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c09260b0597a03fb83fd42bde1b81eb035376c197d654796af04c140dad6a58" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'onPlayerSellItem' has cognitive complexity of 32 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 361, + "startColumn": 11, + "charOffset": 11980, + "charLength": 16, + "snippet": { + "text": "onPlayerSellItem" + } + }, + "contextRegion": { + "startLine": 359, + "startColumn": 11, + "charOffset": 11967, + "charLength": 16, + "snippet": { + "text": "}\n\nvoid Npc::onPlayerSellItem(std::shared_ptr player, uint16_t itemId, uint8_t subType, uint16_t amount, bool ignore, uint64_t &totalPrice, std::shared_ptr parent /*= nullptr*/) {\n\tif (!player) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "920e84b5f05e35d3ab6fa2bb8c85bd1c9190fd17161cbb028db85b839759c29b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 361, + "startColumn": 52, + "charOffset": 12021, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 359, + "startColumn": 52, + "charOffset": 11967, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Npc::onPlayerSellItem(std::shared_ptr player, uint16_t itemId, uint8_t subType, uint16_t amount, bool ignore, uint64_t &totalPrice, std::shared_ptr parent /*= nullptr*/) {\n\tif (!player) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b883f3d6a11b47a7bcc33be1754eb0b0ede4b364039a0de32c07f5271494958" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "3 adjacent parameters of 'onPlayerSellItem' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 361, + "startColumn": 60, + "charOffset": 12029, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 359, + "startColumn": 60, + "charOffset": 11967, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Npc::onPlayerSellItem(std::shared_ptr player, uint16_t itemId, uint8_t subType, uint16_t amount, bool ignore, uint64_t &totalPrice, std::shared_ptr parent /*= nullptr*/) {\n\tif (!player) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79b9d7de4fce358ba70ea4734df082e867cfba67ab26fcfdd90bdeb5edaff7a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'parent' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 361, + "startColumn": 172, + "charOffset": 12141, + "charLength": 6, + "snippet": { + "text": "parent" + } + }, + "contextRegion": { + "startLine": 359, + "startColumn": 172, + "charOffset": 11967, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Npc::onPlayerSellItem(std::shared_ptr player, uint16_t itemId, uint8_t subType, uint16_t amount, bool ignore, uint64_t &totalPrice, std::shared_ptr parent /*= nullptr*/) {\n\tif (!player) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15dc0de3e138276883f7b66dcab4b235b01101f2a4c7d7fdbe71aa1811c92ef1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 362, + "startColumn": 6, + "charOffset": 12170, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 360, + "startColumn": 6, + "charOffset": 11969, + "charLength": 1, + "snippet": { + "text": "\nvoid Npc::onPlayerSellItem(std::shared_ptr player, uint16_t itemId, uint8_t subType, uint16_t amount, bool ignore, uint64_t &totalPrice, std::shared_ptr parent /*= nullptr*/) {\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b74df74f1db2aeb6eef60ec255f7e4c45fcbfd5dbf4999ae81ba40b556ca8a85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 366, + "startColumn": 18, + "charOffset": 12245, + "charLength": 13, + "snippet": { + "text": "scheduleEvent" + } + }, + "contextRegion": { + "startLine": 364, + "startColumn": 18, + "charOffset": 12191, + "charLength": 13, + "snippet": { + "text": "\t}\n\tif (itemId == ITEM_GOLD_POUCH) {\n\t\tg_dispatcher().scheduleEvent(\n\t\t\tSCHEDULER_MINTICKS, [this, playerId = player->getID(), itemId, ignore] { onPlayerSellAllLoot(playerId, itemId, ignore, 0); }, __FUNCTION__\n\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db9da4dcebdeae6bfeaba1799b2c5190db9b852b4ec9aca892cf4e511fc7ee33" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 375, + "startColumn": 2, + "charOffset": 12560, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 373, + "startColumn": 2, + "charOffset": 12446, + "charLength": 3, + "snippet": { + "text": "\tconst ItemType &itemType = Item::items[itemId];\n\tconst auto &shopVector = getShopItemVector(player->getGUID());\n\tfor (const ShopBlock &shopBlock : shopVector) {\n\t\tif (itemType.id == shopBlock.itemId && shopBlock.itemSellPrice != 0) {\n\t\t\tsellPrice = shopBlock.itemSellPrice;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca9d2925070b6152d2bb62204f81db3424db21a7647b5ef80f116ae2d43c5aad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 385, + "startColumn": 2, + "charOffset": 12791, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 383, + "startColumn": 2, + "charOffset": 12764, + "charLength": 3, + "snippet": { + "text": "\n\tauto toRemove = amount;\n\tfor (const auto &item : player->getInventoryItemsFromId(itemId, ignore)) {\n\t\tif (!item || item->getTier() > 0 || item->hasImbuements()) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33195a234bcf326584387f1a033e3910c7f50f29f236fb5f376d39f830d093d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 386, + "startColumn": 7, + "charOffset": 12872, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 384, + "startColumn": 7, + "charOffset": 12765, + "charLength": 1, + "snippet": { + "text": "\tauto toRemove = amount;\n\tfor (const auto &item : player->getInventoryItemsFromId(itemId, ignore)) {\n\t\tif (!item || item->getTier() > 0 || item->hasImbuements()) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1318c0b551b3b2b9b1c316e8e61992057e5728a2a9cd3da8a9bf59165aaead0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-misplaced-widening-cast", + "ruleIndex": 70, + "kind": "fail", + "level": "warning", + "message": { + "text": "either cast from 'uint32_t' (aka 'unsigned int') to 'uint64_t' (aka 'unsigned long') is ineffective, or there is loss of precision before the conversion" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 408, + "startColumn": 19, + "charOffset": 13465, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 406, + "startColumn": 19, + "charOffset": 13406, + "charLength": 11, + "snippet": { + "text": "\n\tauto totalRemoved = amount - toRemove;\n\tauto totalCost = static_cast(sellPrice * totalRemoved);\n\tg_logger().debug(\"[Npc::onPlayerSellItem] - Removing items from player {} amount {} of items with id {} on shop for npc {}\", player->getName(), toRemove, itemId, getName());\n\tif (totalRemoved > 0 && totalCost > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fa1412126523d513810b5a8708d09034afd7f4b1d8163da37bfb83c0c355708" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 418, + "startColumn": 47, + "charOffset": 14034, + "charLength": 9, + "snippet": { + "text": "totalCost" + } + }, + "contextRegion": { + "startLine": 416, + "startColumn": 47, + "charOffset": 13941, + "charLength": 9, + "snippet": { + "text": "\t\t\t\tg_game().addMoney(player, totalCost);\n\t\t\t}\n\t\t\tg_metrics().addCounter(\"balance_increase\", totalCost, { { \"player\", player->getName() }, { \"context\", \"npc_sale\" } });\n\t\t} else {\n\t\t\tstd::shared_ptr newItem = Item::CreateItem(getCurrency(), totalCost);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d92ea690a072bf98e3791769b2ff56cf22dd81250c9cf90148f71da0accaacc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 418, + "startColumn": 47, + "charOffset": 14034, + "charLength": 9, + "snippet": { + "text": "totalCost" + } + }, + "contextRegion": { + "startLine": 416, + "startColumn": 47, + "charOffset": 13941, + "charLength": 9, + "snippet": { + "text": "\t\t\t\tg_game().addMoney(player, totalCost);\n\t\t\t}\n\t\t\tg_metrics().addCounter(\"balance_increase\", totalCost, { { \"player\", player->getName() }, { \"context\", \"npc_sale\" } });\n\t\t} else {\n\t\t\tstd::shared_ptr newItem = Item::CreateItem(getCurrency(), totalCost);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88403e82866a633786b65edb527d4962f20499708e8960944d7667a17b4fc668" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 420, + "startColumn": 68, + "charOffset": 14188, + "charLength": 9, + "snippet": { + "text": "totalCost" + } + }, + "contextRegion": { + "startLine": 418, + "startColumn": 68, + "charOffset": 13988, + "charLength": 9, + "snippet": { + "text": "\t\t\tg_metrics().addCounter(\"balance_increase\", totalCost, { { \"player\", player->getName() }, { \"context\", \"npc_sale\" } });\n\t\t} else {\n\t\t\tstd::shared_ptr newItem = Item::CreateItem(getCurrency(), totalCost);\n\t\t\tif (newItem) {\n\t\t\t\tg_game().internalPlayerAddItem(player, newItem, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2adde05552d01c2a2822911eb0cc66d4f2f11c2389078a1bfbbbbd402888c0c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 422, + "startColumn": 14, + "charOffset": 14231, + "charLength": 21, + "snippet": { + "text": "internalPlayerAddItem" + } + }, + "contextRegion": { + "startLine": 420, + "startColumn": 14, + "charOffset": 14121, + "charLength": 21, + "snippet": { + "text": "\t\t\tstd::shared_ptr newItem = Item::CreateItem(getCurrency(), totalCost);\n\t\t\tif (newItem) {\n\t\t\t\tg_game().internalPlayerAddItem(player, newItem, true);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c229777fe13f79b777511a206671e8fcc49376cf3e2f8fd5f4e76cf1a76fd241" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 437, + "startColumn": 23, + "charOffset": 14816, + "charLength": 9, + "snippet": { + "text": "totalCost" + } + }, + "contextRegion": { + "startLine": 435, + "startColumn": 23, + "charOffset": 14724, + "charLength": 9, + "snippet": { + "text": "\t\tcallback.pushBoolean(ignore);\n\t\tcallback.pushString(itemType.name);\n\t\tcallback.pushNumber(totalCost);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fe84e1db388882855cb7ddc9f54e4c8681cc062869a286eeb362463b02abccf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 437, + "startColumn": 23, + "charOffset": 14816, + "charLength": 9, + "snippet": { + "text": "totalCost" + } + }, + "contextRegion": { + "startLine": 435, + "startColumn": 23, + "charOffset": 14724, + "charLength": 9, + "snippet": { + "text": "\t\tcallback.pushBoolean(ignore);\n\t\tcallback.pushString(itemType.name);\n\t\tcallback.pushNumber(totalCost);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fce0b9bf76e1d11d4f2b2b2a387229e93ddfe328d3dbe5bc9bbd6a135cd201c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 445, + "startColumn": 53, + "charOffset": 14935, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 443, + "startColumn": 53, + "charOffset": 14880, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Npc::onPlayerCheckItem(std::shared_ptr player, uint16_t itemId, uint8_t subType) {\n\tif (!player) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ff3627b16063684232e98d48202af2137725eec708b90b0db86825074ec4175" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 446, + "startColumn": 6, + "charOffset": 14984, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 444, + "startColumn": 6, + "charOffset": 14882, + "charLength": 1, + "snippet": { + "text": "\nvoid Npc::onPlayerCheckItem(std::shared_ptr player, uint16_t itemId, uint8_t subType) {\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d20f348359ff757ac1dcd9c34369ee9ea0be4283b6ea30d38bef1cf2044ceb02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 464, + "startColumn": 58, + "charOffset": 15485, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 462, + "startColumn": 58, + "charOffset": 15425, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Npc::onPlayerCloseChannel(std::shared_ptr creature) {\n\tstd::shared_ptr player = creature->getPlayer();\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b0909fa7cce878dba866a57ac68644f72388fded6e1ac3d0e17e4caab0a1eac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 466, + "startColumn": 6, + "charOffset": 15559, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 464, + "startColumn": 6, + "charOffset": 15428, + "charLength": 1, + "snippet": { + "text": "void Npc::onPlayerCloseChannel(std::shared_ptr creature) {\n\tstd::shared_ptr player = creature->getPlayer();\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55af4e9290d885595faff4628bfda7bca02afd6e8aa7459ceb9fc3c01ba9ff3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 493, + "startColumn": 114, + "charOffset": 16267, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 491, + "startColumn": 114, + "charOffset": 16136, + "charLength": 3, + "snippet": { + "text": "\t\tyellTicks = 0;\n\n\t\tif (!npcType->info.voiceVector.empty() && (npcType->info.yellChance >= static_cast(uniform_random(1, 100)))) {\n\t\t\tuint32_t index = uniform_random(0, npcType->info.voiceVector.size() - 1);\n\t\t\tconst voiceBlock_t &vb = npcType->info.voiceVector[index];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52af7bc0c9eb5f46ad16200e215971f23468586342fe61ddab68989ae495ffd4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 494, + "startColumn": 39, + "charOffset": 16315, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 492, + "startColumn": 39, + "charOffset": 16153, + "charLength": 7, + "snippet": { + "text": "\n\t\tif (!npcType->info.voiceVector.empty() && (npcType->info.yellChance >= static_cast(uniform_random(1, 100)))) {\n\t\t\tuint32_t index = uniform_random(0, npcType->info.voiceVector.size() - 1);\n\t\t\tconst voiceBlock_t &vb = npcType->info.voiceVector[index];\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0952dc1b13825ff9a4cdd14146711fd2d3f39d98a5e7094d532fbcf17fd67224" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 494, + "startColumn": 39, + "charOffset": 16315, + "charLength": 7, + "snippet": { + "text": "npcType" + } + }, + "contextRegion": { + "startLine": 492, + "startColumn": 39, + "charOffset": 16153, + "charLength": 7, + "snippet": { + "text": "\n\t\tif (!npcType->info.voiceVector.empty() && (npcType->info.yellChance >= static_cast(uniform_random(1, 100)))) {\n\t\t\tuint32_t index = uniform_random(0, npcType->info.voiceVector.size() - 1);\n\t\t\tconst voiceBlock_t &vb = npcType->info.voiceVector[index];\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "635d99ea0f2fcc05fe57cc4ea234280aa4f5db5317c4a7b4ad6ce3ece2c894e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 498, + "startColumn": 14, + "charOffset": 16452, + "charLength": 19, + "snippet": { + "text": "internalCreatureSay" + } + }, + "contextRegion": { + "startLine": 496, + "startColumn": 14, + "charOffset": 16416, + "charLength": 19, + "snippet": { + "text": "\n\t\t\tif (vb.yellText) {\n\t\t\t\tg_game().internalCreatureSay(static_self_cast(), TALKTYPE_YELL, vb.text, false);\n\t\t\t} else {\n\t\t\t\tg_game().internalCreatureSay(static_self_cast(), TALKTYPE_SAY, vb.text, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86f03d44650a2e48d989d0cbde17c7c9e4de206fc67d56ef73ff02c2de3605f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 500, + "startColumn": 14, + "charOffset": 16554, + "charLength": 19, + "snippet": { + "text": "internalCreatureSay" + } + }, + "contextRegion": { + "startLine": 498, + "startColumn": 14, + "charOffset": 16439, + "charLength": 19, + "snippet": { + "text": "\t\t\t\tg_game().internalCreatureSay(static_self_cast(), TALKTYPE_YELL, vb.text, false);\n\t\t\t} else {\n\t\t\t\tg_game().internalCreatureSay(static_self_cast(), TALKTYPE_SAY, vb.text, false);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "545025fd43e59e5ffc2d7a861012c4b2f354affb2f8ec2a5299db85769c95013" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'newDirection' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 523, + "startColumn": 16, + "charOffset": 16971, + "charLength": 12, + "snippet": { + "text": "newDirection" + } + }, + "contextRegion": { + "startLine": 521, + "startColumn": 16, + "charOffset": 16952, + "charLength": 12, + "snippet": { + "text": "\t}\n\n\tif (Direction newDirection;\n\t getRandomStep(newDirection)) {\n\t\tlistWalkDir.emplace_back(newDirection);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f24647288e4aaf9d0afdebe6f2e1882636994b958fd87fb45aa34dd63ffe1ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 525, + "startColumn": 15, + "charOffset": 17035, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 523, + "startColumn": 15, + "charOffset": 16956, + "charLength": 12, + "snippet": { + "text": "\tif (Direction newDirection;\n\t getRandomStep(newDirection)) {\n\t\tlistWalkDir.emplace_back(newDirection);\n\t\taddEventWalk();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f2c2eba22a073c7e18feb8a8f8c09699bc8c31cbdd95a07693a442701e6fc57" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 534, + "startColumn": 2, + "charOffset": 17163, + "charLength": 5, + "snippet": { + "text": "phmap" + } + }, + "contextRegion": { + "startLine": 532, + "startColumn": 2, + "charOffset": 17104, + "charLength": 5, + "snippet": { + "text": "void Npc::onCreatureWalk() {\n\tCreature::onCreatureWalk();\n\tphmap::erase_if(playerSpectators, [this](const auto &creature) { return !this->canSee(creature->getPosition()); });\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4678e58a4fe9dba9352cbc20d348141998dbe9d7c1827521991dd05f4f05d0c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 534, + "startColumn": 74, + "charOffset": 17235, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 532, + "startColumn": 74, + "charOffset": 17104, + "charLength": 1, + "snippet": { + "text": "void Npc::onCreatureWalk() {\n\tCreature::onCreatureWalk();\n\tphmap::erase_if(playerSpectators, [this](const auto &creature) { return !this->canSee(creature->getPosition()); });\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d5f779ba88c925302f9b32812debc91d425ff3f38de63786c1a100caa5ba27a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 543, + "startColumn": 2, + "charOffset": 17433, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 541, + "startColumn": 2, + "charOffset": 17341, + "charLength": 3, + "snippet": { + "text": "void Npc::loadPlayerSpectators() {\n\tauto spec = Spectators().find(position, true);\n\tfor (const auto &creature : spec) {\n\t\tif (!creature->getPlayer()->hasFlag(PlayerFlags_t::IgnoredByNpcs)) {\n\t\t\tplayerSpectators.emplace(creature->getPlayer());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb0b09395f92180a1e35370957734057d9bb3bdca0e5dacadaef0ea178f4ec08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 545, + "startColumn": 21, + "charOffset": 17560, + "charLength": 7, + "snippet": { + "text": "emplace" + } + }, + "contextRegion": { + "startLine": 543, + "startColumn": 21, + "charOffset": 17432, + "charLength": 7, + "snippet": { + "text": "\tfor (const auto &creature : spec) {\n\t\tif (!creature->getPlayer()->hasFlag(PlayerFlags_t::IgnoredByNpcs)) {\n\t\t\tplayerSpectators.emplace(creature->getPlayer());\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95deecfddd75d60976c2358d294db06b369e8139e540ab25ac2e30a8cd16d880" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 551, + "startColumn": 6, + "charOffset": 17661, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 549, + "startColumn": 6, + "charOffset": 17601, + "charLength": 1, + "snippet": { + "text": "\nbool Npc::isInSpawnRange(const Position &pos) const {\n\tif (!spawnNpc) {\n\t\treturn true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9041a14ac4450c9eb1b174a5ed2ebc9a9b6926ca712f0096c22d05ac15778abd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 576, + "startColumn": 6, + "charOffset": 18140, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 574, + "startColumn": 6, + "charOffset": 17983, + "charLength": 1, + "snippet": { + "text": "void Npc::setPlayerInteraction(uint32_t playerId, uint16_t topicId /*= 0*/) {\n\tstd::shared_ptr creature = g_game().getCreatureByID(playerId);\n\tif (!creature) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa6577f80b0a109b900abbc1e8919d5ee31d4b59e2b662a6f6a42d28cf9ea3c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 585, + "startColumn": 59, + "charOffset": 18297, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 583, + "startColumn": 59, + "charOffset": 18236, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Npc::removePlayerInteraction(std::shared_ptr player) {\n\tif (playerInteractions.contains(player->getID())) {\n\t\tplayerInteractions.erase(player->getID());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "422dc83cb47ca5af5cc8a1842ef07facba7e79221647d14f4ac5a3e623420c33" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 587, + "startColumn": 22, + "charOffset": 18381, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 585, + "startColumn": 22, + "charOffset": 18239, + "charLength": 5, + "snippet": { + "text": "void Npc::removePlayerInteraction(std::shared_ptr player) {\n\tif (playerInteractions.contains(player->getID())) {\n\t\tplayerInteractions.erase(player->getID());\n\t\tplayer->closeShopWindow();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2efb8f1b0c705e739ec81d117dfb4ad6515e333d13d86842a59c58794f1789bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 588, + "startColumn": 11, + "charOffset": 18415, + "charLength": 15, + "snippet": { + "text": "closeShopWindow" + } + }, + "contextRegion": { + "startLine": 586, + "startColumn": 11, + "charOffset": 18307, + "charLength": 15, + "snippet": { + "text": "\tif (playerInteractions.contains(player->getID())) {\n\t\tplayerInteractions.erase(player->getID());\n\t\tplayer->closeShopWindow();\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e84cfd8cf17f26b38ecf6e31690c10d9703ac247b7693d95e4b418c70ce437fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 607, + "startColumn": 6, + "charOffset": 18838, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 605, + "startColumn": 6, + "charOffset": 18771, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr toTile = g_game().map.getTile(toPos);\n\tif (!toTile || toTile->queryAdd(0, getNpc(), 1, 0) != RETURNVALUE_NOERROR) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "094c234338d477b79eb2776794bbd858d10925616267b16f3e66dc16f1fb60c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 635, + "startColumn": 2, + "charOffset": 19537, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 633, + "startColumn": 2, + "charOffset": 19473, + "charLength": 3, + "snippet": { + "text": "\tstd::ranges::shuffle(directionvector, getRandomGenerator());\n\n\tfor (const Position &creaturePos = getPosition();\n\t Direction direction : directionvector) {\n\t\tif (canWalkTo(creaturePos, direction)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "768d0a93f1801d3e0e99c14bd4829b9da7c372e53b9eada6e8a7c759caa6b2e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 650, + "startColumn": 14, + "charOffset": 19963, + "charLength": 11, + "snippet": { + "text": "try_emplace" + } + }, + "contextRegion": { + "startLine": 648, + "startColumn": 14, + "charOffset": 19861, + "charLength": 11, + "snippet": { + "text": "\nvoid Npc::addShopPlayer(uint32_t playerGUID, const std::vector &shopItems) {\n\tshopPlayers.try_emplace(playerGUID, shopItems);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec43df1e433c002f64c9d8e6bf2ed921ad4a0c722a44503365e905c8441c1c79" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 654, + "startColumn": 14, + "charOffset": 20065, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 652, + "startColumn": 14, + "charOffset": 20001, + "charLength": 5, + "snippet": { + "text": "\nvoid Npc::removeShopPlayer(uint32_t playerGUID) {\n\tshopPlayers.erase(playerGUID);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b438a98956bf50fd633b11d3e12c2ae3490abddf63550254ea8d511bcd244c3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 658, + "startColumn": 2, + "charOffset": 20122, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 656, + "startColumn": 2, + "charOffset": 20086, + "charLength": 3, + "snippet": { + "text": "\nvoid Npc::closeAllShopWindows() {\n\tfor (const auto &[playerGUID, shopBlock] : shopPlayers) {\n\t\tconst auto &player = g_game().getPlayerByGUID(playerGUID);\n\t\tif (player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8df0489af50c8a111383c54cd89f4ca8ddabacfa3470e27222d0fa197255ad78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 661, + "startColumn": 12, + "charOffset": 20268, + "charLength": 15, + "snippet": { + "text": "closeShopWindow" + } + }, + "contextRegion": { + "startLine": 659, + "startColumn": 12, + "charOffset": 20180, + "charLength": 15, + "snippet": { + "text": "\t\tconst auto &player = g_game().getPlayerByGUID(playerGUID);\n\t\tif (player) {\n\t\t\tplayer->closeShopWindow();\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f1510c1e6085f40c5ec11db783f83a13a6963672b9ef3a55a2eeef836446262" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.cpp" + }, + "region": { + "startLine": 667, + "startColumn": 52, + "charOffset": 20370, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 665, + "startColumn": 52, + "charOffset": 20316, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Npc::handlePlayerMove(std::shared_ptr player, const Position &newPos) {\n\tif (!canInteract(newPos)) {\n\t\tremovePlayerInteraction(player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7876516f45ad646b03f0b28c61936654343530298c303c5619e04ee2fdce6251" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Npc::onPlayerBuyItem' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.hpp", + "index": 1 + }, + "region": { + "startLine": 152, + "startColumn": 7, + "charOffset": 4107, + "charLength": 15, + "snippet": { + "text": "onPlayerBuyItem" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 7, + "charOffset": 3948, + "charLength": 15, + "snippet": { + "text": "\tvoid onCreatureSay(std::shared_ptr creature, SpeakClasses type, const std::string &text) override;\n\tvoid onThink(uint32_t interval) override;\n\tvoid onPlayerBuyItem(std::shared_ptr player, uint16_t itemid, uint8_t count, uint16_t amount, bool ignore, bool inBackpacks);\n\tvoid onPlayerSellAllLoot(uint32_t playerId, uint16_t itemid, bool ignore, uint64_t totalPrice);\n\tvoid onPlayerSellItem(std::shared_ptr player, uint16_t itemid, uint8_t count, uint16_t amount, bool ignore);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e624b39d8afeb646bc08e915f265278ebe67959e2b442e3e7580fb0dc04bd4fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Npc::onPlayerSellItem' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.hpp", + "index": 1 + }, + "region": { + "startLine": 154, + "startColumn": 7, + "charOffset": 4339, + "charLength": 16, + "snippet": { + "text": "onPlayerSellItem" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 7, + "charOffset": 4101, + "charLength": 16, + "snippet": { + "text": "\tvoid onPlayerBuyItem(std::shared_ptr player, uint16_t itemid, uint8_t count, uint16_t amount, bool ignore, bool inBackpacks);\n\tvoid onPlayerSellAllLoot(uint32_t playerId, uint16_t itemid, bool ignore, uint64_t totalPrice);\n\tvoid onPlayerSellItem(std::shared_ptr player, uint16_t itemid, uint8_t count, uint16_t amount, bool ignore);\n\tvoid onPlayerSellItem(std::shared_ptr player, uint16_t itemid, uint8_t count, uint16_t amount, bool ignore, uint64_t &totalPrice, std::shared_ptr parent = nullptr);\n\tvoid onPlayerCheckItem(std::shared_ptr player, uint16_t itemid, uint8_t count);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ffbb3af3b16dc1d5f314a0895bc5b43a345947756503899895c6129460458748" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Npc::onPlayerSellItem' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.hpp", + "index": 1 + }, + "region": { + "startLine": 155, + "startColumn": 7, + "charOffset": 4457, + "charLength": 16, + "snippet": { + "text": "onPlayerSellItem" + } + }, + "contextRegion": { + "startLine": 153, + "startColumn": 7, + "charOffset": 4236, + "charLength": 16, + "snippet": { + "text": "\tvoid onPlayerSellAllLoot(uint32_t playerId, uint16_t itemid, bool ignore, uint64_t totalPrice);\n\tvoid onPlayerSellItem(std::shared_ptr player, uint16_t itemid, uint8_t count, uint16_t amount, bool ignore);\n\tvoid onPlayerSellItem(std::shared_ptr player, uint16_t itemid, uint8_t count, uint16_t amount, bool ignore, uint64_t &totalPrice, std::shared_ptr parent = nullptr);\n\tvoid onPlayerCheckItem(std::shared_ptr player, uint16_t itemid, uint8_t count);\n\tvoid onPlayerCloseChannel(std::shared_ptr creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9bc2b531cc341080eef38f60052ee515adc5b37ddbe7b8b81aae8a602918de9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Npc::onPlayerCheckItem' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.hpp", + "index": 1 + }, + "region": { + "startLine": 156, + "startColumn": 7, + "charOffset": 4641, + "charLength": 17, + "snippet": { + "text": "onPlayerCheckItem" + } + }, + "contextRegion": { + "startLine": 154, + "startColumn": 7, + "charOffset": 4333, + "charLength": 17, + "snippet": { + "text": "\tvoid onPlayerSellItem(std::shared_ptr player, uint16_t itemid, uint8_t count, uint16_t amount, bool ignore);\n\tvoid onPlayerSellItem(std::shared_ptr player, uint16_t itemid, uint8_t count, uint16_t amount, bool ignore, uint64_t &totalPrice, std::shared_ptr parent = nullptr);\n\tvoid onPlayerCheckItem(std::shared_ptr player, uint16_t itemid, uint8_t count);\n\tvoid onPlayerCloseChannel(std::shared_ptr creature);\n\tvoid onPlacedCreature() override;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "befb1c1daeaf9ce3cf0609f5d9b1f8cd1892bb5d12cd2741a32962b497d697b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'npc.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "index": 2 + }, + "region": { + "startLine": 34, + "startColumn": 10, + "charOffset": 1231, + "charLength": 24, + "snippet": { + "text": "\"creatures/npcs/npc.hpp\"" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 10, + "charOffset": 1164, + "charLength": 24, + "snippet": { + "text": "#include \"map/town.hpp\"\n#include \"vocations/vocation.hpp\"\n#include \"creatures/npcs/npc.hpp\"\n#include \"game/bank/bank.hpp\"\n#include \"enums/object_category.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d92e3a967a16d6acd7b5d78d39a1a75619719e01f52be307f0ba6178f5451c25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'globalEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 72, + "charOffset": 919, + "charLength": 11, + "snippet": { + "text": "globalEvent" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 72, + "charOffset": 845, + "charLength": 11, + "snippet": { + "text": "}\n\nbool GlobalEvents::registerLuaEvent(const std::shared_ptr globalEvent) {\n\tif (globalEvent->getEventType() == GLOBALEVENT_TIMER) {\n\t\tauto result = timerMap.emplace(globalEvent->getName(), globalEvent);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f4f9249d7b544d528729b5383a04daf28efe549f591f53ee22413789a69dc37" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 15, + "charOffset": 2102, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 15, + "charOffset": 2058, + "charLength": 4, + "snippet": { + "text": "\nvoid GlobalEvents::timer() {\n\ttime_t now = time(nullptr);\n\n\tint64_t nextScheduledTime = std::numeric_limits::max();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "498e9a7d19b167e2f63467f13d28be39096d8787e044fe1fb81ff601a8be7641" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 83, + "startColumn": 2, + "charOffset": 2215, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 81, + "startColumn": 2, + "charOffset": 2184, + "charLength": 5, + "snippet": { + "text": "\n\tauto it = timerMap.begin();\n\twhile (it != timerMap.end()) {\n\t\tconst auto globalEvent = it->second;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33719713402379bccb387f2d366dcb75ed51a7563b8d8d7e069b3d1532ca6475" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 83, + "startColumn": 9, + "charOffset": 2222, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 81, + "startColumn": 9, + "charOffset": 2184, + "charLength": 2, + "snippet": { + "text": "\n\tauto it = timerMap.begin();\n\twhile (it != timerMap.end()) {\n\t\tconst auto globalEvent = it->second;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "091985a3a909a192f8bb78e7c9732060dc72ab875fee40ddfc63692a521605c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-std-min-max", + "ruleIndex": 736, + "kind": "fail", + "level": "warning", + "message": { + "text": "use `std::min` instead of `<`" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 88, + "startColumn": 4, + "charOffset": 2389, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 86, + "startColumn": 4, + "charOffset": 2286, + "charLength": 2, + "snippet": { + "text": "\t\tint64_t nextExecutionTime = globalEvent->getNextExecution() - now;\n\t\tif (nextExecutionTime > 0) {\n\t\t\tif (nextExecutionTime < nextScheduledTime) {\n\t\t\t\tnextScheduledTime = nextExecutionTime;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "542522106536f45d097f973595f375f69fe9f046e366dfda9a9cdb31ca8f2b06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "86400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 101, + "startColumn": 23, + "charOffset": 2616, + "charLength": 5, + "snippet": { + "text": "86400" + } + }, + "contextRegion": { + "startLine": 99, + "startColumn": 23, + "charOffset": 2589, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\n\t\tnextExecutionTime = 86400;\n\t\tif (nextExecutionTime < nextScheduledTime) {\n\t\t\tnextScheduledTime = nextExecutionTime;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23348d5ba75ec2f2557762f8dfb5599590f0753d8cb1c5b67031d3217e803616" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-std-min-max", + "ruleIndex": 736, + "kind": "fail", + "level": "warning", + "message": { + "text": "use `std::min` instead of `<`" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 102, + "startColumn": 3, + "charOffset": 2625, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 100, + "startColumn": 3, + "charOffset": 2593, + "charLength": 2, + "snippet": { + "text": "\n\t\tnextExecutionTime = 86400;\n\t\tif (nextExecutionTime < nextScheduledTime) {\n\t\t\tnextScheduledTime = nextExecutionTime;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7dae059a31a6dec671a478779ca9507e6931f69b10229bdae7cc16ffd4f1b44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 113, + "startColumn": 4, + "charOffset": 2931, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 111, + "startColumn": 4, + "charOffset": 2816, + "charLength": 3, + "snippet": { + "text": "\tif (nextScheduledTime != std::numeric_limits::max()) {\n\t\ttimerEventId = g_dispatcher().scheduleEvent(\n\t\t\tstd::max(1000, nextScheduledTime * 1000), [this] { timer(); }, __FUNCTION__\n\t\t);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae35f5ab25f8b01807e0411533d0962357fd099bc3b2afe1970c1ee76b3ec4e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 113, + "startColumn": 22, + "charOffset": 2949, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 111, + "startColumn": 22, + "charOffset": 2816, + "charLength": 4, + "snippet": { + "text": "\tif (nextScheduledTime != std::numeric_limits::max()) {\n\t\ttimerEventId = g_dispatcher().scheduleEvent(\n\t\t\tstd::max(1000, nextScheduledTime * 1000), [this] { timer(); }, __FUNCTION__\n\t\t);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f47bb5b6b1a966dc24c7dda27eb3222c23f7c271b91a8b128c25258009a19d6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 113, + "startColumn": 48, + "charOffset": 2975, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 111, + "startColumn": 48, + "charOffset": 2816, + "charLength": 4, + "snippet": { + "text": "\tif (nextScheduledTime != std::numeric_limits::max()) {\n\t\ttimerEventId = g_dispatcher().scheduleEvent(\n\t\t\tstd::max(1000, nextScheduledTime * 1000), [this] { timer(); }, __FUNCTION__\n\t\t);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d0c0ae882dd975ef1fc1c05b8f2bb132c181f0d51088da05507bad096316fea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 122, + "startColumn": 2, + "charOffset": 3153, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 120, + "startColumn": 2, + "charOffset": 3085, + "charLength": 3, + "snippet": { + "text": "\n\tint64_t nextScheduledTime = std::numeric_limits::max();\n\tfor (const auto &[globalEventName, globalEvent] : thinkMap) {\n\t\tint64_t nextExecutionTime = globalEvent->getNextExecution() - now;\n\t\tif (nextExecutionTime > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fba18e2d85d01cc1ca5d4cfbbed8ceb57f032700a6b404601ece8a66fa3151ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-std-min-max", + "ruleIndex": 736, + "kind": "fail", + "level": "warning", + "message": { + "text": "use `std::min` instead of `<`" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 125, + "startColumn": 4, + "charOffset": 3318, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 123, + "startColumn": 4, + "charOffset": 3215, + "charLength": 2, + "snippet": { + "text": "\t\tint64_t nextExecutionTime = globalEvent->getNextExecution() - now;\n\t\tif (nextExecutionTime > 0) {\n\t\t\tif (nextExecutionTime < nextScheduledTime) {\n\t\t\t\tnextScheduledTime = nextExecutionTime;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "845e84060450df86aacadef0933cf49f749d448aeae3cfd9f17af1b72ac62596" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-std-min-max", + "ruleIndex": 736, + "kind": "fail", + "level": "warning", + "message": { + "text": "use `std::min` instead of `<`" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 140, + "startColumn": 3, + "charOffset": 3759, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 138, + "startColumn": 3, + "charOffset": 3706, + "charLength": 2, + "snippet": { + "text": "\n\t\tnextExecutionTime = globalEvent->getInterval();\n\t\tif (nextExecutionTime < nextScheduledTime) {\n\t\t\tnextScheduledTime = nextExecutionTime;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "637d9129dc2947bae3f67e07d5936403c84bbd76ea81ec3d1a2bb70316410b7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 156, + "startColumn": 2, + "charOffset": 4230, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 154, + "startColumn": 2, + "charOffset": 4173, + "charLength": 3, + "snippet": { + "text": "\nvoid GlobalEvents::execute(GlobalEvent_t type) const {\n\tfor (const auto &[globalEventName, globalEvent] : serverMap) {\n\t\tif (globalEvent->getEventType() == type) {\n\t\t\tglobalEvent->executeEvent();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea234bde66db338b5a6927bcc04a01ad52621e0045e7ce30a02ec6400fae8b7d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 158, + "startColumn": 17, + "charOffset": 4354, + "charLength": 12, + "snippet": { + "text": "executeEvent" + } + }, + "contextRegion": { + "startLine": 156, + "startColumn": 17, + "charOffset": 4229, + "charLength": 12, + "snippet": { + "text": "\tfor (const auto &[globalEventName, globalEvent] : serverMap) {\n\t\tif (globalEvent->getEventType() == type) {\n\t\t\tglobalEvent->executeEvent();\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b23c7636ecfd26e85096c8fd7e7aceef61a428d3e5bf5ce31b1859e493c6ed7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-todo", + "ruleIndex": 545, + "kind": "fail", + "level": "warning", + "message": { + "text": "missing username/bug in TODO" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 164, + "startColumn": 2, + "charOffset": 4444, + "charLength": 76, + "snippet": { + "text": "// TODO: This should be better implemented. Maybe have a map for every type." + } + }, + "contextRegion": { + "startLine": 162, + "startColumn": 2, + "charOffset": 4379, + "charLength": 76, + "snippet": { + "text": "\nGlobalEventMap GlobalEvents::getEventMap(GlobalEvent_t type) {\n\t// TODO: This should be better implemented. Maybe have a map for every type.\n\tswitch (type) {\n\t\tcase GLOBALEVENT_NONE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b4d99589a5b3e8f88cefc4890c8317a96ecc978efb146ccb3b04a62d076f40bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 166, + "startColumn": 3, + "charOffset": 4540, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 3, + "charOffset": 4443, + "charLength": 4, + "snippet": { + "text": "\t// TODO: This should be better implemented. Maybe have a map for every type.\n\tswitch (type) {\n\t\tcase GLOBALEVENT_NONE:\n\t\t\treturn thinkMap;\n\t\tcase GLOBALEVENT_TIMER:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09df5ea7837a9eb411fd818cc50e09cf4ab6c546782848934fc44af52b656e3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 168, + "startColumn": 3, + "charOffset": 4585, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 166, + "startColumn": 3, + "charOffset": 4538, + "charLength": 4, + "snippet": { + "text": "\t\tcase GLOBALEVENT_NONE:\n\t\t\treturn thinkMap;\n\t\tcase GLOBALEVENT_TIMER:\n\t\t\treturn timerMap;\n\t\tcase GLOBALEVENT_PERIODCHANGE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f9951bd34b70fdc9160727488c73c7e73377a1e1257da0b3044f594e2d4fe0a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 171, + "startColumn": 3, + "charOffset": 4664, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 169, + "startColumn": 3, + "charOffset": 4609, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn timerMap;\n\t\tcase GLOBALEVENT_PERIODCHANGE:\n\t\tcase GLOBALEVENT_STARTUP:\n\t\tcase GLOBALEVENT_SHUTDOWN:\n\t\tcase GLOBALEVENT_RECORD:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0590d847f779c0c2eb284e6b1451c535ef63dd1e255d9ffba275b01066f01265" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 3, + "charOffset": 4692, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 3, + "charOffset": 4629, + "charLength": 4, + "snippet": { + "text": "\t\tcase GLOBALEVENT_PERIODCHANGE:\n\t\tcase GLOBALEVENT_STARTUP:\n\t\tcase GLOBALEVENT_SHUTDOWN:\n\t\tcase GLOBALEVENT_RECORD:\n\t\tcase GLOBALEVENT_SAVE: {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d759bf6dbcaf127cc0f0ec479f132c4ac5c649da9e46a704c6571b9b74b05e21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 173, + "startColumn": 3, + "charOffset": 4721, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 171, + "startColumn": 3, + "charOffset": 4662, + "charLength": 4, + "snippet": { + "text": "\t\tcase GLOBALEVENT_STARTUP:\n\t\tcase GLOBALEVENT_SHUTDOWN:\n\t\tcase GLOBALEVENT_RECORD:\n\t\tcase GLOBALEVENT_SAVE: {\n\t\t\tGlobalEventMap retMap;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3fd17ed2cb24a7efe1d54b1d0351b820ac18682b85d94cc20a96bb169190f18d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 174, + "startColumn": 3, + "charOffset": 4748, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 3, + "charOffset": 4690, + "charLength": 4, + "snippet": { + "text": "\t\tcase GLOBALEVENT_SHUTDOWN:\n\t\tcase GLOBALEVENT_RECORD:\n\t\tcase GLOBALEVENT_SAVE: {\n\t\t\tGlobalEventMap retMap;\n\t\t\tfor (const auto &it : serverMap) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ec0cef332404dcea0ed13eea4ac8fa9c5195a93a2374e94a4f6d7af3bca4fce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 174, + "startColumn": 3, + "charOffset": 4748, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 3, + "charOffset": 4690, + "charLength": 4, + "snippet": { + "text": "\t\tcase GLOBALEVENT_SHUTDOWN:\n\t\tcase GLOBALEVENT_RECORD:\n\t\tcase GLOBALEVENT_SAVE: {\n\t\t\tGlobalEventMap retMap;\n\t\t\tfor (const auto &it : serverMap) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "336e98376c35424fbf6204fdfb49b9fa5c6affb95b7d6619bb0e5e81d3feb288" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 176, + "startColumn": 4, + "charOffset": 4802, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 174, + "startColumn": 4, + "charOffset": 4746, + "charLength": 3, + "snippet": { + "text": "\t\tcase GLOBALEVENT_SAVE: {\n\t\t\tGlobalEventMap retMap;\n\t\t\tfor (const auto &it : serverMap) {\n\t\t\t\tif (it.second->getEventType() == type) {\n\t\t\t\t\tretMap.emplace(it.first, it.second);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8407a8b49d599e441323e71cbcba0cf22b0dbb4d388cb847c257a398553c0ddc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 178, + "startColumn": 13, + "charOffset": 4894, + "charLength": 7, + "snippet": { + "text": "emplace" + } + }, + "contextRegion": { + "startLine": 176, + "startColumn": 13, + "charOffset": 4799, + "charLength": 7, + "snippet": { + "text": "\t\t\tfor (const auto &it : serverMap) {\n\t\t\t\tif (it.second->getEventType() == type) {\n\t\t\t\t\tretMap.emplace(it.first, it.second);\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "223aaf7b65029ac53f7d2b8678f917cf1d70639c21558360e4e60ee91869b527" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 183, + "startColumn": 3, + "charOffset": 4959, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 181, + "startColumn": 3, + "charOffset": 4935, + "charLength": 7, + "snippet": { + "text": "\t\t\treturn retMap;\n\t\t}\n\t\tdefault:\n\t\t\treturn GlobalEventMap();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93f40b4a427c7315222f95b4c274d68a5a46d45cffd2597548db74b9d6e78f5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-return-braced-init-list", + "ruleIndex": 630, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 184, + "startColumn": 11, + "charOffset": 4978, + "charLength": 14, + "snippet": { + "text": "GlobalEventMap" + } + }, + "contextRegion": { + "startLine": 182, + "startColumn": 11, + "charOffset": 4953, + "charLength": 14, + "snippet": { + "text": "\t\t}\n\t\tdefault:\n\t\t\treturn GlobalEventMap();\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b3315f50830d2e51c73a8ff1b2ffc3d7e422353c6d8ca8a67caf737654be32b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 193, + "startColumn": 3, + "charOffset": 5161, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 191, + "startColumn": 3, + "charOffset": 5084, + "charLength": 4, + "snippet": { + "text": "std::string GlobalEvent::getScriptTypeName() const {\n\tswitch (eventType) {\n\t\tcase GLOBALEVENT_STARTUP:\n\t\t\treturn \"onStartup\";\n\t\tcase GLOBALEVENT_SHUTDOWN:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b137acbcb5a918694b87741c2a2865c35e4f37f345de3e35f39a5ea4745aae77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 195, + "startColumn": 3, + "charOffset": 5212, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 193, + "startColumn": 3, + "charOffset": 5159, + "charLength": 4, + "snippet": { + "text": "\t\tcase GLOBALEVENT_STARTUP:\n\t\t\treturn \"onStartup\";\n\t\tcase GLOBALEVENT_SHUTDOWN:\n\t\t\treturn \"onShutdown\";\n\t\tcase GLOBALEVENT_RECORD:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25929c610ee4cc8e27c04388c5eb704d67ff721008290637b77918936aaa1770" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 197, + "startColumn": 3, + "charOffset": 5265, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 195, + "startColumn": 3, + "charOffset": 5210, + "charLength": 4, + "snippet": { + "text": "\t\tcase GLOBALEVENT_SHUTDOWN:\n\t\t\treturn \"onShutdown\";\n\t\tcase GLOBALEVENT_RECORD:\n\t\t\treturn \"onRecord\";\n\t\tcase GLOBALEVENT_TIMER:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd4c322be0677e3a7cccfdd36b4117d34aa6780eb6822bb84f155227943e330e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 199, + "startColumn": 3, + "charOffset": 5314, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 197, + "startColumn": 3, + "charOffset": 5263, + "charLength": 4, + "snippet": { + "text": "\t\tcase GLOBALEVENT_RECORD:\n\t\t\treturn \"onRecord\";\n\t\tcase GLOBALEVENT_TIMER:\n\t\t\treturn \"onTime\";\n\t\tcase GLOBALEVENT_PERIODCHANGE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "936399754eef754bbe0ab503938b87d201e765097ab673a4a5275d0f950aa1ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 201, + "startColumn": 3, + "charOffset": 5360, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 3, + "charOffset": 5312, + "charLength": 4, + "snippet": { + "text": "\t\tcase GLOBALEVENT_TIMER:\n\t\t\treturn \"onTime\";\n\t\tcase GLOBALEVENT_PERIODCHANGE:\n\t\t\treturn \"onPeriodChange\";\n\t\tcase GLOBALEVENT_ON_THINK:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af149a0b46b44433c770ca4f8f0e04cc61d01d89ec4e0aec2f9a0869e7f9c191" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 203, + "startColumn": 3, + "charOffset": 5421, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 201, + "startColumn": 3, + "charOffset": 5358, + "charLength": 4, + "snippet": { + "text": "\t\tcase GLOBALEVENT_PERIODCHANGE:\n\t\t\treturn \"onPeriodChange\";\n\t\tcase GLOBALEVENT_ON_THINK:\n\t\t\treturn \"onThink\";\n\t\tcase GLOBALEVENT_SAVE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "172b1b22f1516f26274e309dd6f4e82592e6e1850b3bd949a80f1303b4d7bcaa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 205, + "startColumn": 3, + "charOffset": 5471, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 203, + "startColumn": 3, + "charOffset": 5419, + "charLength": 4, + "snippet": { + "text": "\t\tcase GLOBALEVENT_ON_THINK:\n\t\t\treturn \"onThink\";\n\t\tcase GLOBALEVENT_SAVE:\n\t\t\treturn \"onSave\";\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93f40b4a427c7315222f95b4c274d68a5a46d45cffd2597548db74b9d6e78f5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 207, + "startColumn": 3, + "charOffset": 5516, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 205, + "startColumn": 3, + "charOffset": 5469, + "charLength": 7, + "snippet": { + "text": "\t\tcase GLOBALEVENT_SAVE:\n\t\t\treturn \"onSave\";\n\t\tdefault:\n\t\t\tg_logger().error(\"[GlobalEvent::getScriptTypeName] - Invalid event type\");\n\t\t\treturn std::string();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "336e98376c35424fbf6204fdfb49b9fa5c6affb95b7d6619bb0e5e81d3feb288" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-return-braced-init-list", + "ruleIndex": 630, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 209, + "startColumn": 11, + "charOffset": 5613, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 207, + "startColumn": 11, + "charOffset": 5514, + "charLength": 3, + "snippet": { + "text": "\t\tdefault:\n\t\t\tg_logger().error(\"[GlobalEvent::getScriptTypeName] - Invalid event type\");\n\t\t\treturn std::string();\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "048e474eaed589f11f3f06b6fc63fe954feca52a5355f21aa8682e5c20de1026" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 215, + "startColumn": 7, + "charOffset": 5774, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 213, + "startColumn": 7, + "charOffset": 5634, + "charLength": 18, + "snippet": { + "text": "bool GlobalEvent::executePeriodChange(LightState_t lightState, LightInfo lightInfo) const {\n\t// onPeriodChange(lightState, lightTime)\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[GlobalEvent::executePeriodChange - {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "770301676b49dc225c62ea599f6c7ed608e6408fe5078bc7e2bf6936d468d778" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 222, + "startColumn": 27, + "charOffset": 6040, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 220, + "startColumn": 27, + "charOffset": 6010, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\n\tenv->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "758f780c4719d62c81e1194a2f67e505a815f5f184644a260d1a9567e52dae24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 24, + "charOffset": 6211, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 24, + "charOffset": 6134, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tlua_pushnumber(L, lightState);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a8cffa2113ada91e1b25611d71a81a35577614ccaf3cbb6f12c59a5da68023e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 228, + "startColumn": 20, + "charOffset": 6260, + "charLength": 10, + "snippet": { + "text": "lightState" + } + }, + "contextRegion": { + "startLine": 226, + "startColumn": 20, + "charOffset": 6188, + "charLength": 10, + "snippet": { + "text": "\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tlua_pushnumber(L, lightState);\n\tlua_pushnumber(L, lightInfo.level);\n\treturn getScriptInterface()->callFunction(2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9da9597a5b531fb34b1ac697cb532f317eb3f0cc3c98a0814583aaca943d22c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 229, + "startColumn": 20, + "charOffset": 6292, + "charLength": 9, + "snippet": { + "text": "lightInfo" + } + }, + "contextRegion": { + "startLine": 227, + "startColumn": 20, + "charOffset": 6240, + "charLength": 9, + "snippet": { + "text": "\n\tlua_pushnumber(L, lightState);\n\tlua_pushnumber(L, lightInfo.level);\n\treturn getScriptInterface()->callFunction(2);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11ed3cee5b315be6a05b9e9b53b8acbd92ec2d58b326c5928dc137f87c0cc03c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 235, + "startColumn": 7, + "charOffset": 6459, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 233, + "startColumn": 7, + "charOffset": 6360, + "charLength": 18, + "snippet": { + "text": "bool GlobalEvent::executeRecord(uint32_t current, uint32_t old) {\n\t// onRecord(current, old)\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[GlobalEvent::executeRecord - {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a15fc622d9b07c5fd04885a3a59b046b0e7cb1704f036d67b3ae42b7cfdf2a59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 27, + "charOffset": 6719, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 27, + "charOffset": 6689, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\n\tenv->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41b665c3c2e8acc21d74f90c95bc693f3e23f1ab8299c5b883eb0c9bec98e53d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 246, + "startColumn": 24, + "charOffset": 6890, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 244, + "startColumn": 24, + "charOffset": 6813, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tlua_pushnumber(L, current);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a31aa2ace90a9a6bd0060adb0ebcd16164ad2ab6fc24026daa0d634a8075ff33" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 248, + "startColumn": 20, + "charOffset": 6939, + "charLength": 7, + "snippet": { + "text": "current" + } + }, + "contextRegion": { + "startLine": 246, + "startColumn": 20, + "charOffset": 6867, + "charLength": 7, + "snippet": { + "text": "\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tlua_pushnumber(L, current);\n\tlua_pushnumber(L, old);\n\treturn getScriptInterface()->callFunction(2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77bde7bd7237806eb5eda7871c0a2e48a55bea974a67b5da087c02560229165b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 249, + "startColumn": 20, + "charOffset": 6968, + "charLength": 3, + "snippet": { + "text": "old" + } + }, + "contextRegion": { + "startLine": 247, + "startColumn": 20, + "charOffset": 6919, + "charLength": 3, + "snippet": { + "text": "\n\tlua_pushnumber(L, current);\n\tlua_pushnumber(L, old);\n\treturn getScriptInterface()->callFunction(2);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08e16ccfb78167dd8c374c41af3e4c4cf16282edc38dfecb3081f3f1b7e73255" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 254, + "startColumn": 7, + "charOffset": 7071, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 7, + "charOffset": 7023, + "charLength": 18, + "snippet": { + "text": "\nbool GlobalEvent::executeEvent() const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[GlobalEvent::executeEvent - {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce528432b849e160ff92e08d9cb5217d9ee4c4b85b67080b6eca9ab9bd00d258" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 261, + "startColumn": 27, + "charOffset": 7330, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 259, + "startColumn": 27, + "charOffset": 7300, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\n\tenv->setScriptId(getScriptId(), getScriptInterface());\n\tlua_State* L = getScriptInterface()->getLuaState();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "280446bd4b09b1c91ff48d87e1dd8d389d501c4d972fdbd5bccb4e8c90a25e04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 264, + "startColumn": 24, + "charOffset": 7500, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 262, + "startColumn": 24, + "charOffset": 7368, + "charLength": 12, + "snippet": { + "text": "\tenv->setScriptId(getScriptId(), getScriptInterface());\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tint32_t params = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e61109e1cf264aadc299c037074b044c8147c5ef0f23601d5f99c00557bef970" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/global/globalevent.cpp" + }, + "region": { + "startLine": 268, + "startColumn": 21, + "charOffset": 7643, + "charLength": 8, + "snippet": { + "text": "interval" + } + }, + "contextRegion": { + "startLine": 266, + "startColumn": 21, + "charOffset": 7530, + "charLength": 8, + "snippet": { + "text": "\tint32_t params = 0;\n\tif (eventType == GLOBALEVENT_NONE || eventType == GLOBALEVENT_TIMER) {\n\t\tlua_pushnumber(L, interval);\n\t\tparams = 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6fe897e8f71bf41c831feb62e5a5f83b57fbe5f365feddcfca908f9661601716" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.hpp" + }, + "region": { + "startLine": 13, + "startColumn": 10, + "charOffset": 429, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 11, + "startColumn": 10, + "charOffset": 384, + "charLength": 30, + "snippet": { + "text": "\n#include \"creatures/npcs/npcs.hpp\"\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"items/tile.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f69d6cfec9be0f6769310fd1d031cff4d88ef48385f012190be0fe563d15e4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.hpp", + "index": 1 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"creatures/monsters/monsters.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e45483e1912ecf8c717a48f913562d9a9cf501f9947625dad361d43acc28406" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.hpp", + "index": 2 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a2b3a997037594f8bab93e08d9b46935593069da5e9def3fec147ea485ffc36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 18, + "startColumn": 18, + "charOffset": 570, + "charLength": 9, + "snippet": { + "text": "initState" + } + }, + "contextRegion": { + "startLine": 16, + "startColumn": 18, + "charOffset": 492, + "charLength": 9, + "snippet": { + "text": "Modules::Modules() :\n\tscriptInterface(\"Modules Interface\") {\n\tscriptInterface.initState();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e824da4fc71865865a56439b1ba47919d500e598602760d830c53a87d1f792b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 21, + "startColumn": 25, + "charOffset": 610, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 19, + "startColumn": 25, + "charOffset": 583, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Modules::clear(bool) {\n\t// clear recvbyte list\n\tfor (auto &it : recvbyteList) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "369d0ae054b46ef1f633863dc919ba51ba966601493c176b4b70469dbcde4481" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 23, + "startColumn": 2, + "charOffset": 639, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 21, + "startColumn": 2, + "charOffset": 586, + "charLength": 3, + "snippet": { + "text": "void Modules::clear(bool) {\n\t// clear recvbyte list\n\tfor (auto &it : recvbyteList) {\n\t\tit.second.clearEvent();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac22cbc6aaf78d7ce0fa5a03147d9cd0451cfa6cfde5292fea8f0ef56e50731d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 28, + "startColumn": 18, + "charOffset": 738, + "charLength": 11, + "snippet": { + "text": "reInitState" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 18, + "charOffset": 700, + "charLength": 11, + "snippet": { + "text": "\n\t// clear lua state\n\tscriptInterface.reInitState();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be8cdcec967561d7be608693539a39103e2548544706c5a6587e7e0c1e75bfc3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-4-1", + "ruleIndex": 412, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-4-1: Dynamic heap memory allocation shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 43, + "startColumn": 19, + "charOffset": 1057, + "charLength": 3, + "snippet": { + "text": "new" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 19, + "charOffset": 1018, + "charLength": 3, + "snippet": { + "text": "\t\treturn nullptr;\n\t}\n\treturn Event_ptr(new Module(&scriptInterface));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9691d4cdc8689f9864879ba2511d1f57af4736b74ddfdac27565ec80852ec557" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 46, + "startColumn": 68, + "charOffset": 1158, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 44, + "startColumn": 68, + "charOffset": 1088, + "charLength": 1, + "snippet": { + "text": "}\n\nbool Modules::registerEvent(Event_ptr event, const pugi::xml_node &) {\n\tModule_ptr module { static_cast(event.release()) };\n\tif (module->getEventType() == MODULE_TYPE_NONE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c019ec7a5911477c1e01dc4c194e01a5828b0d2cfbc7fe945c843d23dc4c0b07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-static-cast-downcast", + "ruleIndex": 512, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 47, + "startColumn": 22, + "charOffset": 1183, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 45, + "startColumn": 22, + "charOffset": 1090, + "charLength": 11, + "snippet": { + "text": "\nbool Modules::registerEvent(Event_ptr event, const pugi::xml_node &) {\n\tModule_ptr module { static_cast(event.release()) };\n\tif (module->getEventType() == MODULE_TYPE_NONE) {\n\t\tg_logger().error(\"Trying to register event without type!\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5500037932cb510b65719952c5eadf19482e273f0cd3a04ea42040a215e80cd4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 54, + "startColumn": 6, + "charOffset": 1433, + "charLength": 9, + "snippet": { + "text": "oldModule" + } + }, + "contextRegion": { + "startLine": 52, + "startColumn": 6, + "charOffset": 1356, + "charLength": 9, + "snippet": { + "text": "\n\tModule* oldModule = getEventByRecvbyte(module->getRecvbyte(), false);\n\tif (oldModule) {\n\t\tif (!oldModule->isLoaded() && oldModule->getEventType() == module->getEventType()) {\n\t\t\toldModule->copyEvent(module.get());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c10e4a18dbac1103b99bea215d7b692d4cc9a81d788a906cc8b033056939578e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'Module *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 54, + "startColumn": 6, + "charOffset": 1433, + "charLength": 9, + "snippet": { + "text": "oldModule" + } + }, + "contextRegion": { + "startLine": 52, + "startColumn": 6, + "charOffset": 1356, + "charLength": 9, + "snippet": { + "text": "\n\tModule* oldModule = getEventByRecvbyte(module->getRecvbyte(), false);\n\tif (oldModule) {\n\t\tif (!oldModule->isLoaded() && oldModule->getEventType() == module->getEventType()) {\n\t\t\toldModule->copyEvent(module.get());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd36d0e11e148534b236a231442c58e782bdc53d5ca0c5b6d74b12fce4e431b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 59, + "startColumn": 4, + "charOffset": 1595, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 4, + "charOffset": 1572, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t\treturn false;\n\t} else {\n\t\tauto it = recvbyteList.find(module->getRecvbyte());\n\t\tif (it != recvbyteList.end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b18be6aec24d2dac133f091fd286a44d3e7b27e5ed5c187a075c1bb4aa17e77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 64, + "startColumn": 17, + "charOffset": 1742, + "charLength": 7, + "snippet": { + "text": "emplace" + } + }, + "contextRegion": { + "startLine": 62, + "startColumn": 17, + "charOffset": 1690, + "charLength": 7, + "snippet": { + "text": "\t\t\tit->second = *module;\n\t\t} else {\n\t\t\trecvbyteList.emplace(module->getRecvbyte(), std::move(*module));\n\t\t}\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5eab245a24ebfa05165b7bf4868cbbe149abd8a9aa9c93891412c8e9979ed0e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when declaring iterators" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 71, + "startColumn": 2, + "charOffset": 1888, + "charLength": 11, + "snippet": { + "text": "ModulesList" + } + }, + "contextRegion": { + "startLine": 69, + "startColumn": 2, + "charOffset": 1818, + "charLength": 11, + "snippet": { + "text": "\nModule* Modules::getEventByRecvbyte(uint8_t recvbyte, bool force) {\n\tModulesList::iterator it = recvbyteList.find(recvbyte);\n\tif (it != recvbyteList.end()) {\n\t\tif (!force || it->second.isLoaded()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56f466ff3a5ab8b1860e82adf83422b1db727f14ae802a7c38ae77ab9af29917" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 82, + "startColumn": 6, + "charOffset": 2235, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 6, + "charOffset": 2068, + "charLength": 1, + "snippet": { + "text": "void Modules::executeOnRecvbyte(uint32_t playerId, NetworkMessage &msg, uint8_t byte) const {\n\tstd::shared_ptr player = g_game().getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c0a0936054eb97262bd3b9862aa99ed696c6c1f16475fb7d6dc46620114a6fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 86, + "startColumn": 2, + "charOffset": 2261, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 2, + "charOffset": 2256, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (auto &it : recvbyteList) {\n\t\tModule module = it.second;\n\t\tif (module.getEventType() == MODULE_TYPE_RECVBYTE && module.getRecvbyte() == byte && player->canRunModule(module.getRecvbyte())) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb2f2e8aa6ddc561272f996db635ee465de3141c023f2219740ba2b45a4e79df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &it' can be declared as 'const auto &it'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 86, + "startColumn": 7, + "charOffset": 2266, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 7, + "charOffset": 2256, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tfor (auto &it : recvbyteList) {\n\t\tModule module = it.second;\n\t\tif (module.getEventType() == MODULE_TYPE_RECVBYTE && module.getRecvbyte() == byte && player->canRunModule(module.getRecvbyte())) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ebbb03f3146be015713ff301d69d61aa4f56a7d8418f728eeb29628ea023c23" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-member-init", + "ruleIndex": 510, + "kind": "fail", + "level": "warning", + "message": { + "text": "constructor does not initialize these fields: recvbyte, delay" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 96, + "startColumn": 1, + "charOffset": 2586, + "charLength": 6, + "snippet": { + "text": "Module" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 1, + "charOffset": 2583, + "charLength": 6, + "snippet": { + "text": "}\n\nModule::Module(LuaScriptInterface* interface) :\n\tEvent(interface), type(MODULE_TYPE_NONE), loaded(false) { }\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d08b20def1b21c32f94922a53b854254aba94f80acc8085a91d147c6161fb440" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 103, + "startColumn": 6, + "charOffset": 2833, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 101, + "startColumn": 6, + "charOffset": 2766, + "charLength": 1, + "snippet": { + "text": "\n\tpugi::xml_attribute typeAttribute = node.attribute(\"type\");\n\tif (!typeAttribute) {\n\t\tg_logger().error(\"Missing type for module.\");\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01f13f2a7337aed4ac8823d19135c1c8e18cf0631a24908a5ca00aa944439df5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 111, + "startColumn": 7, + "charOffset": 3084, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 7, + "charOffset": 2987, + "charLength": 1, + "snippet": { + "text": "\tif (tmpStr == \"recvbyte\") {\n\t\tpugi::xml_attribute byteAttribute = node.attribute(\"byte\");\n\t\tif (!byteAttribute) {\n\t\t\tg_logger().error(\"Missing byte for module typed recvbyte.\");\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f20d76d13addf9c673bdf81e59ebac920d4d54b2dfa6f9959b38ae6d141e8e80" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 124, + "startColumn": 6, + "charOffset": 3424, + "charLength": 14, + "snippet": { + "text": "delayAttribute" + } + }, + "contextRegion": { + "startLine": 122, + "startColumn": 6, + "charOffset": 3355, + "charLength": 14, + "snippet": { + "text": "\n\tpugi::xml_attribute delayAttribute = node.attribute(\"delay\");\n\tif (delayAttribute) {\n\t\tdelay = static_cast(delayAttribute.as_uint());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "daee9ed505db91107558b983c36a62eb0f2e6fa6ba4709be11b7ef479055269b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 124, + "startColumn": 6, + "charOffset": 3424, + "charLength": 14, + "snippet": { + "text": "delayAttribute" + } + }, + "contextRegion": { + "startLine": 122, + "startColumn": 6, + "charOffset": 3355, + "charLength": 14, + "snippet": { + "text": "\n\tpugi::xml_attribute delayAttribute = node.attribute(\"delay\");\n\tif (delayAttribute) {\n\t\tdelay = static_cast(delayAttribute.as_uint());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52cafd61cf573bceff768eac9636ac10860f65dc2c8e2a1b1cf798409030b1c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 125, + "startColumn": 11, + "charOffset": 3452, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 123, + "startColumn": 11, + "charOffset": 3356, + "charLength": 11, + "snippet": { + "text": "\tpugi::xml_attribute delayAttribute = node.attribute(\"delay\");\n\tif (delayAttribute) {\n\t\tdelay = static_cast(delayAttribute.as_uint());\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95cfba6774727796568df975d1fb757de403d6c95fa9882b76eecb9e609f21e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 134, + "startColumn": 3, + "charOffset": 3606, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 3, + "charOffset": 3538, + "charLength": 4, + "snippet": { + "text": "std::string Module::getScriptEventName() const {\n\tswitch (type) {\n\t\tcase MODULE_TYPE_RECVBYTE:\n\t\t\treturn \"onRecvbyte\";\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc57ec6bf23e6173a79aacca4ab1391cdca24ca6da5cf97211906dedd3d7b137" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 136, + "startColumn": 3, + "charOffset": 3659, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 3, + "charOffset": 3604, + "charLength": 7, + "snippet": { + "text": "\t\tcase MODULE_TYPE_RECVBYTE:\n\t\t\treturn \"onRecvbyte\";\n\t\tdefault:\n\t\t\treturn std::string();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9ffcb301d2e8cd7a02ba3b7f0cbb38c9a299f581d11a6c289d7028c0717e2ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-return-braced-init-list", + "ruleIndex": 630, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 137, + "startColumn": 11, + "charOffset": 3678, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 135, + "startColumn": 11, + "charOffset": 3633, + "charLength": 3, + "snippet": { + "text": "\t\t\treturn \"onRecvbyte\";\n\t\tdefault:\n\t\t\treturn std::string();\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a2f7c13887b13f816a1db2ba328d83dc371d3e2d8f4e6f25550e9d9d3e17dbd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 155, + "startColumn": 56, + "charOffset": 4038, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 153, + "startColumn": 56, + "charOffset": 3980, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Module::executeOnRecvbyte(std::shared_ptr player, NetworkMessage &msg) {\n\t// onRecvbyte(player, msg, recvbyte)\n\tif (!scriptInterface->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "496373319d170851dd60fa7c6783be8fc53a8efc4c30f4b32a7047266b86daea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 157, + "startColumn": 7, + "charOffset": 4113, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 7, + "charOffset": 3983, + "charLength": 15, + "snippet": { + "text": "void Module::executeOnRecvbyte(std::shared_ptr player, NetworkMessage &msg) {\n\t// onRecvbyte(player, msg, recvbyte)\n\tif (!scriptInterface->reserveScriptEnv()) {\n\t\tg_logger().error(\"Call stack overflow. Too many lua script calls being nested {}\", player->getName());\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef241d830b715e92d69a96c514caf56c81d2fd98a1dae947234654d9729ed555" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 162, + "startColumn": 27, + "charOffset": 4297, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 160, + "startColumn": 27, + "charOffset": 4267, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\n\tenv->setScriptId(scriptId, scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c60a50b578b601685b669be8654519313aff4363ab8b7007f1b05a7610b53b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 167, + "startColumn": 19, + "charOffset": 4444, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 19, + "charOffset": 4377, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = scriptInterface->getLuaState();\n\n\tscriptInterface->pushFunction(scriptId);\n\tLuaScriptInterface::pushUserdata(L, player);\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8001aa308902e48bab08e737a392d71ae32d620002474b820e3d9265f374d96e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.cpp", + "index": 3 + }, + "region": { + "startLine": 174, + "startColumn": 20, + "charOffset": 4752, + "charLength": 8, + "snippet": { + "text": "recvbyte" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 20, + "charOffset": 4668, + "charLength": 8, + "snippet": { + "text": "\tLuaScriptInterface::setWeakMetatable(L, -1, \"NetworkMessage\");\n\n\tlua_pushnumber(L, recvbyte);\n\n\tscriptInterface->callVoidFunction(3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "937447beec09b3289195d8dede53af73d50a1ec0b22c5071febe1817abdf10ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Module::copyEvent' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/modules/modules.hpp", + "index": 4 + }, + "region": { + "startLine": 35, + "startColumn": 7, + "charOffset": 910, + "charLength": 9, + "snippet": { + "text": "copyEvent" + } + }, + "contextRegion": { + "startLine": 33, + "startColumn": 7, + "charOffset": 883, + "charLength": 9, + "snippet": { + "text": "\n\tvoid clearEvent();\n\tvoid copyEvent(Module* creatureEvent);\n\n\t// scripting" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1669d92a52891a7ced94ddeb057d9757b61130d49fed1f9be276276c6af771a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 20, + "startColumn": 1, + "charOffset": 651, + "charLength": 6, + "snippet": { + "text": "static" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 607, + "charLength": 6, + "snippet": { + "text": "bool LuaEnvironment::shuttingDown = false;\n\nstatic const std::unique_ptr &AreaCombatNull {};\n\nLuaEnvironment::LuaEnvironment() :" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2a978a9d940f05cde9c8e01e9b17609d74a4ad260b94ff9534cc74d07d374c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-use-anonymous-namespace", + "ruleIndex": 614, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'AreaCombatNull' declared 'static', move to anonymous namespace instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 20, + "startColumn": 43, + "charOffset": 693, + "charLength": 14, + "snippet": { + "text": "AreaCombatNull" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 43, + "charOffset": 607, + "charLength": 14, + "snippet": { + "text": "bool LuaEnvironment::shuttingDown = false;\n\nstatic const std::unique_ptr &AreaCombatNull {};\n\nLuaEnvironment::LuaEnvironment() :" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a99b0bfe3d89ce73bae4c951aa58dd0fa64a138fd9c545feb68954932ad05cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 6, + "charOffset": 832, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 6, + "charOffset": 790, + "charLength": 1, + "snippet": { + "text": "\nLuaEnvironment::~LuaEnvironment() {\n\tif (!testInterface) {\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eab6ff220d7ff98fa4fb33545799dc506c6166efc1d2ca435deb1777fb54ce22" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'LuaScriptInterface *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 7, + "charOffset": 833, + "charLength": 13, + "snippet": { + "text": "testInterface" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 7, + "charOffset": 790, + "charLength": 13, + "snippet": { + "text": "\nLuaEnvironment::~LuaEnvironment() {\n\tif (!testInterface) {\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16699682fe16f75180ca8acbacaf7484306ddeb90a031fa696e599de595e8e56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 30, + "startColumn": 2, + "charOffset": 893, + "charLength": 10, + "snippet": { + "text": "closeState" + } + }, + "contextRegion": { + "startLine": 28, + "startColumn": 2, + "charOffset": 853, + "charLength": 10, + "snippet": { + "text": "\n\tLuaEnvironment::shuttingDown = true;\n\tcloseState();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "084b541d45ddee8619e4c0500b3332257c0e4e273ceb1386ee2fc1d3e369d826" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-virtual-call-in-ctor-or-dtor", + "ruleIndex": 477, + "kind": "fail", + "level": "warning", + "message": { + "text": "Do not invoke virtual member functions from destructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 30, + "startColumn": 2, + "charOffset": 893, + "charLength": 10, + "snippet": { + "text": "closeState" + } + }, + "contextRegion": { + "startLine": 28, + "startColumn": 2, + "charOffset": 853, + "charLength": 10, + "snippet": { + "text": "\n\tLuaEnvironment::shuttingDown = true;\n\tcloseState();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79ce00d381ed3e78f033424b421b369507264b699eb27921fd74b3d3451db9d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 39, + "startColumn": 3, + "charOffset": 1047, + "charLength": 9, + "snippet": { + "text": "initState" + } + }, + "contextRegion": { + "startLine": 37, + "startColumn": 3, + "charOffset": 1016, + "charLength": 9, + "snippet": { + "text": "\n\tif (luaState == nullptr) {\n\t\tinitState();\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "889db903b4d2657ab6ef0b26922a5dc6f7a248acc0924baf571de9f9093b0b7f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 55, + "startColumn": 2, + "charOffset": 1324, + "charLength": 10, + "snippet": { + "text": "closeState" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 2, + "charOffset": 1237, + "charLength": 10, + "snippet": { + "text": "bool LuaEnvironment::reInitState() {\n\t// TODO(lgrossi): get children, reload children\n\tcloseState();\n\treturn initState();\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fbbdc43a1bc9508c291294034c908430d57cb4af33ee1a4375e45460058b132f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 60, + "startColumn": 6, + "charOffset": 1403, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 6, + "charOffset": 1361, + "charLength": 1, + "snippet": { + "text": "\nbool LuaEnvironment::closeState() {\n\tif (!luaState) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb4fd737fe8e4eb16e45b61096d40d7ffa6c5ed31ff2ca70469cac4b0036477f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'lua_State *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 60, + "startColumn": 7, + "charOffset": 1404, + "charLength": 8, + "snippet": { + "text": "luaState" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 7, + "charOffset": 1361, + "charLength": 8, + "snippet": { + "text": "\nbool LuaEnvironment::closeState() {\n\tif (!luaState) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aef3a43218a4b294f1034093e209f991b04d9276d816622143c5c7471bf01d51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 64, + "startColumn": 2, + "charOffset": 1437, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 62, + "startColumn": 2, + "charOffset": 1432, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &combatEntry : combatIdMap) {\n\t\tclearCombatObjects(combatEntry.first);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "108e7c25dee2b7f6e525f9c75dd58c356fc7ae0b2d5e4c75478f4b922e4e1dc3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 68, + "startColumn": 2, + "charOffset": 1529, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 66, + "startColumn": 2, + "charOffset": 1524, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &areaEntry : areaIdMap) {\n\t\tclearAreaObjects(areaEntry.first);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "438dc7ea50cfb823cf71a6d5684c94019f3b8199e8c477fddaca63aaca9a11ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 3, + "charOffset": 1721, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 3, + "charOffset": 1612, + "charLength": 3, + "snippet": { + "text": "\tfor (auto &timerEntry : timerEvents) {\n\t\tLuaTimerEventDesc timerEventDesc = std::move(timerEntry.second);\n\t\tfor (int32_t parameter : timerEventDesc.parameters) {\n\t\t\tluaL_unref(luaState, LUA_REGISTRYINDEX, parameter);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01037297358a83451e747f869bd166ddfe58adf9f317d8486456e2e7827134d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 6, + "charOffset": 2114, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 6, + "charOffset": 2051, + "charLength": 1, + "snippet": { + "text": "\nLuaScriptInterface* LuaEnvironment::getTestInterface() {\n\tif (!testInterface) {\n\t\ttestInterface = new LuaScriptInterface(\"Test Interface\");\n\t\ttestInterface->initState();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f983aeb89661e44aa1c2ec905390ea37ea2a5e93fdacd27d0b267905f2e6e98b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'LuaScriptInterface *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 7, + "charOffset": 2115, + "charLength": 13, + "snippet": { + "text": "testInterface" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 7, + "charOffset": 2051, + "charLength": 13, + "snippet": { + "text": "\nLuaScriptInterface* LuaEnvironment::getTestInterface() {\n\tif (!testInterface) {\n\t\ttestInterface = new LuaScriptInterface(\"Test Interface\");\n\t\ttestInterface->initState();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a5f3d589d3789c067aa1c6bd079e2558b4ea12caf893e1218751968d5205814" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-owning-memory", + "ruleIndex": 503, + "kind": "fail", + "level": "warning", + "message": { + "text": "assigning newly created 'gsl::owner<>' to non-owner 'LuaScriptInterface *'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 92, + "startColumn": 3, + "charOffset": 2134, + "charLength": 13, + "snippet": { + "text": "testInterface" + } + }, + "contextRegion": { + "startLine": 90, + "startColumn": 3, + "charOffset": 2052, + "charLength": 13, + "snippet": { + "text": "LuaScriptInterface* LuaEnvironment::getTestInterface() {\n\tif (!testInterface) {\n\t\ttestInterface = new LuaScriptInterface(\"Test Interface\");\n\t\ttestInterface->initState();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9841e0ff32a8c84db8b0ebedd8ee8db9cb9be91a8ace658f726b416f556194c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-4-1", + "ruleIndex": 412, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-4-1: Dynamic heap memory allocation shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 92, + "startColumn": 19, + "charOffset": 2150, + "charLength": 3, + "snippet": { + "text": "new" + } + }, + "contextRegion": { + "startLine": 90, + "startColumn": 19, + "charOffset": 2052, + "charLength": 3, + "snippet": { + "text": "LuaScriptInterface* LuaEnvironment::getTestInterface() {\n\tif (!testInterface) {\n\t\ttestInterface = new LuaScriptInterface(\"Test Interface\");\n\t\ttestInterface->initState();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "224950dbfb4295f2420d0ab091683b929ed96296e10af110a7a4924c533a9494" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 93, + "startColumn": 18, + "charOffset": 2209, + "charLength": 9, + "snippet": { + "text": "initState" + } + }, + "contextRegion": { + "startLine": 91, + "startColumn": 18, + "charOffset": 2109, + "charLength": 9, + "snippet": { + "text": "\tif (!testInterface) {\n\t\ttestInterface = new LuaScriptInterface(\"Test Interface\");\n\t\ttestInterface->initState();\n\t}\n\treturn testInterface;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed1564daf9897b679f298a4aa5a19d2a69d5369c6075da15da8ddf1642f8e76c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 143, + "startColumn": 2, + "charOffset": 3424, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 141, + "startColumn": 2, + "charOffset": 3419, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (uint32_t id : it->second) {\n\t\tauto itt = areaMap.find(id);\n\t\tif (itt != areaMap.end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7275c127a5570d986be75e3a62e69b2798df09066ca06ee2c6ad0c786b05758b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 146, + "startColumn": 12, + "charOffset": 3529, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 144, + "startColumn": 12, + "charOffset": 3457, + "charLength": 5, + "snippet": { + "text": "\t\tauto itt = areaMap.find(id);\n\t\tif (itt != areaMap.end()) {\n\t\t\tareaMap.erase(itt);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97bf484f983fb588a65ef8b60e40818cbd7a6f42aa8e717edc4d7a4e12411b0e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 159, + "startColumn": 14, + "charOffset": 3793, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 157, + "startColumn": 14, + "charOffset": 3720, + "charLength": 5, + "snippet": { + "text": "\n\tLuaTimerEventDesc timerEventDesc = std::move(it->second);\n\ttimerEvents.erase(it);\n\n\t// push function" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0fd5e7abe86707c2f6c985883dbc5cc4ad91ff5f5dbaade13e7cfb0bb6c1027" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 165, + "startColumn": 2, + "charOffset": 3913, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 163, + "startColumn": 2, + "charOffset": 3891, + "charLength": 3, + "snippet": { + "text": "\n\t// push parameters\n\tfor (auto parameter : std::views::reverse(timerEventDesc.parameters)) {\n\t\tlua_rawgeti(luaState, LUA_REGISTRYINDEX, parameter);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d66554227fbdbd7a08d19d3e98d040d7fdb76859fb05f835464dcb4112bb25a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 174, + "startColumn": 3, + "charOffset": 4213, + "charLength": 12, + "snippet": { + "text": "callFunction" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 3, + "charOffset": 4136, + "charLength": 12, + "snippet": { + "text": "\t\tenv->setTimerEvent();\n\t\tenv->setScriptId(timerEventDesc.scriptId, this);\n\t\tcallFunction(timerEventDesc.parameters.size());\n\t} else {\n\t\tg_logger().error(\"[LuaEnvironment::executeTimerEvent - Lua file {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f47074bcdd5d12de30e1ab9aad974ae9edea14551323f6a28f8eec3d329324d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 174, + "startColumn": 16, + "charOffset": 4226, + "charLength": 14, + "snippet": { + "text": "timerEventDesc" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 16, + "charOffset": 4136, + "charLength": 14, + "snippet": { + "text": "\t\tenv->setTimerEvent();\n\t\tenv->setScriptId(timerEventDesc.scriptId, this);\n\t\tcallFunction(timerEventDesc.parameters.size());\n\t} else {\n\t\tg_logger().error(\"[LuaEnvironment::executeTimerEvent - Lua file {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04357d932b2623910c4dd7f4c411521c33fbb588fa5498cad1e298d88d0085cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 174, + "startColumn": 16, + "charOffset": 4226, + "charLength": 14, + "snippet": { + "text": "timerEventDesc" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 16, + "charOffset": 4136, + "charLength": 14, + "snippet": { + "text": "\t\tenv->setTimerEvent();\n\t\tenv->setScriptId(timerEventDesc.scriptId, this);\n\t\tcallFunction(timerEventDesc.parameters.size());\n\t} else {\n\t\tg_logger().error(\"[LuaEnvironment::executeTimerEvent - Lua file {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3adddac2f1517b09f1bbf12e406f5296b6e1cbe0ffe5d011710d08abaf10266" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 183, + "startColumn": 2, + "charOffset": 4554, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 181, + "startColumn": 2, + "charOffset": 4467, + "charLength": 3, + "snippet": { + "text": "\t// free resources\n\tluaL_unref(luaState, LUA_REGISTRYINDEX, timerEventDesc.function);\n\tfor (auto parameter : timerEventDesc.parameters) {\n\t\tluaL_unref(luaState, LUA_REGISTRYINDEX, parameter);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16a639a1ba2d6e464799132c294003088600d6e326862e07696c6f635cb2ba91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 196, + "startColumn": 3, + "charOffset": 4925, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 194, + "startColumn": 3, + "charOffset": 4818, + "charLength": 3, + "snippet": { + "text": "\t\t// we must collect two times because __gc metamethod\n\t\t// is called on uservalues only the second time\n\t\tfor (int i = -1; ++i < 2;) {\n\t\t\tlua_gc(luaState, LUA_GCCOLLECT, 0);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a720f3ec9e4790e05a85970d6b8980ce788b0f6a47be911b47296c601c0b5f01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 196, + "startColumn": 3, + "charOffset": 4925, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 194, + "startColumn": 3, + "charOffset": 4818, + "charLength": 3, + "snippet": { + "text": "\t\t// we must collect two times because __gc metamethod\n\t\t// is called on uservalues only the second time\n\t\tfor (int i = -1; ++i < 2;) {\n\t\t\tlua_gc(luaState, LUA_GCCOLLECT, 0);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "affad4664afb2cdc097b8c261b679d82425058be99d76dcb22abb90a2eccd5d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/lua_environment.cpp" + }, + "region": { + "startLine": 197, + "startColumn": 4, + "charOffset": 4957, + "charLength": 6, + "snippet": { + "text": "lua_gc" + } + }, + "contextRegion": { + "startLine": 195, + "startColumn": 4, + "charOffset": 4873, + "charLength": 6, + "snippet": { + "text": "\t\t// is called on uservalues only the second time\n\t\tfor (int i = -1; ++i < 2;) {\n\t\t\tlua_gc(luaState, LUA_GCCOLLECT, 0);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "57422dc1a6e5d99f3b94560809a01e9fd620e3651dd1ac3cd6e721b3f06245d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp" + }, + "region": { + "startLine": 16, + "startColumn": 1, + "charOffset": 507, + "charLength": 17, + "snippet": { + "text": "ScriptEnvironment" + } + }, + "contextRegion": { + "startLine": 14, + "startColumn": 1, + "charOffset": 471, + "charLength": 17, + "snippet": { + "text": "#include \"lib/metrics/metrics.hpp\"\n\nScriptEnvironment::DBResultMap ScriptEnvironment::tempResults;\nuint32_t ScriptEnvironment::lastResultId = 0;\nstd::multimap> ScriptEnvironment::tempItems;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b46e5eb32e7bfce65ca63959f6d8d62e2f5bfef78bfdaecbe190b4221d44042" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp" + }, + "region": { + "startLine": 18, + "startColumn": 1, + "charOffset": 616, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 16, + "startColumn": 1, + "charOffset": 507, + "charLength": 3, + "snippet": { + "text": "ScriptEnvironment::DBResultMap ScriptEnvironment::tempResults;\nuint32_t ScriptEnvironment::lastResultId = 0;\nstd::multimap> ScriptEnvironment::tempItems;\n\nScriptEnvironment LuaFunctionsLoader::scriptEnv[16];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca70198df805f157c8bce40d7bb5e72f36673846a9cb45cb57463ef08a669ea8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-c-arrays", + "ruleIndex": 480, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not declare C-style arrays, use std::array<> instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp" + }, + "region": { + "startLine": 20, + "startColumn": 1, + "charOffset": 704, + "charLength": 17, + "snippet": { + "text": "ScriptEnvironment" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 616, + "charLength": 17, + "snippet": { + "text": "std::multimap> ScriptEnvironment::tempItems;\n\nScriptEnvironment LuaFunctionsLoader::scriptEnv[16];\nint32_t LuaFunctionsLoader::scriptEnvIndex = -1;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35b35258e1bd08f7c046495654055ff2167be55de2ffd0d1f556c6b3a4305895" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp" + }, + "region": { + "startLine": 20, + "startColumn": 1, + "charOffset": 704, + "charLength": 17, + "snippet": { + "text": "ScriptEnvironment" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 616, + "charLength": 17, + "snippet": { + "text": "std::multimap> ScriptEnvironment::tempItems;\n\nScriptEnvironment LuaFunctionsLoader::scriptEnv[16];\nint32_t LuaFunctionsLoader::scriptEnvIndex = -1;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07edbc465d61b9c4afc8046a935b621765855d9a244c7fbb80821996037c2a80" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'scriptEnv' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp" + }, + "region": { + "startLine": 20, + "startColumn": 39, + "charOffset": 742, + "charLength": 9, + "snippet": { + "text": "scriptEnv" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 39, + "charOffset": 616, + "charLength": 9, + "snippet": { + "text": "std::multimap> ScriptEnvironment::tempItems;\n\nScriptEnvironment LuaFunctionsLoader::scriptEnv[16];\nint32_t LuaFunctionsLoader::scriptEnvIndex = -1;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54dd52511f43fe4b8a4bb76ed35666c07eb49c7d1564b1f2f75120b4a527a7c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp" + }, + "region": { + "startLine": 20, + "startColumn": 49, + "charOffset": 752, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 49, + "charOffset": 616, + "charLength": 2, + "snippet": { + "text": "std::multimap> ScriptEnvironment::tempItems;\n\nScriptEnvironment LuaFunctionsLoader::scriptEnv[16];\nint32_t LuaFunctionsLoader::scriptEnvIndex = -1;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e2a3aa38908c2a985b9e28e1d541dee38430e74fe28d4682441f8966e54adfc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 2, + "charOffset": 974, + "charLength": 10, + "snippet": { + "text": "closeState" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 2, + "charOffset": 928, + "charLength": 10, + "snippet": { + "text": "\nLuaScriptInterface::~LuaScriptInterface() {\n\tcloseState();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d826c62067e690c463387ccd6c91dce81577367def37c7e65a81dc9ee3b44ae0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-virtual-call-in-ctor-or-dtor", + "ruleIndex": 477, + "kind": "fail", + "level": "warning", + "message": { + "text": "Do not invoke virtual member functions from destructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 2, + "charOffset": 974, + "charLength": 10, + "snippet": { + "text": "closeState" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 2, + "charOffset": 928, + "charLength": 10, + "snippet": { + "text": "\nLuaScriptInterface::~LuaScriptInterface() {\n\tcloseState();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1fc720daf81a10bbb564b2020fb4090161357be674866a22d15eabb350a40895" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp" + }, + "region": { + "startLine": 35, + "startColumn": 2, + "charOffset": 1124, + "charLength": 10, + "snippet": { + "text": "closeState" + } + }, + "contextRegion": { + "startLine": 33, + "startColumn": 2, + "charOffset": 1078, + "charLength": 10, + "snippet": { + "text": "\tg_luaEnvironment().clearAreaObjects(this);\n\n\tcloseState();\n\treturn initState();\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2beb7ca03c810d1a87a6d4066d841b4048a4762c6d0eb843273de9612d834de9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'loadFile' of similar type ('const std::string &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp" + }, + "region": { + "startLine": 40, + "startColumn": 38, + "charOffset": 1280, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 38, + "startColumn": 38, + "charOffset": 1161, + "charLength": 5, + "snippet": { + "text": "\n/// Same as lua_pcall, but adds stack trace to error strings in called function.\nint32_t LuaScriptInterface::loadFile(const std::string &file, const std::string &scriptName) {\n\t// loads file as a chunk at stack top\n\tint ret = luaL_loadfile(luaState, file.c_str());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0061a6af53c02344702a04c39478cc929d6ebe5b40100ca2e6643b4986809c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp" + }, + "region": { + "startLine": 211, + "startColumn": 6, + "charOffset": 5492, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 209, + "startColumn": 6, + "charOffset": 5402, + "charLength": 1, + "snippet": { + "text": "bool LuaScriptInterface::initState() {\n\tluaState = g_luaEnvironment().getLuaState();\n\tif (!luaState) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ab3b593d7cbf03849e993a30e5bc9887166742df3d6b715e9b32f332cb1cbb3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'lua_State *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp" + }, + "region": { + "startLine": 211, + "startColumn": 7, + "charOffset": 5493, + "charLength": 8, + "snippet": { + "text": "luaState" + } + }, + "contextRegion": { + "startLine": 209, + "startColumn": 7, + "charOffset": 5402, + "charLength": 8, + "snippet": { + "text": "bool LuaScriptInterface::initState() {\n\tluaState = g_luaEnvironment().getLuaState();\n\tif (!luaState) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b4085c536457c8cc19d031ba71859c84ecd96ebddd40969cc2cac1d5d8ae863e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 6, + "charOffset": 5768, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 6, + "charOffset": 5759, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!luaState || !g_luaEnvironment().getLuaState()) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29f82b08ff9668ae8a2a1febc4daf91c4783405dd0453e5635801d579535c5bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'lua_State *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 7, + "charOffset": 5769, + "charLength": 8, + "snippet": { + "text": "luaState" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 7, + "charOffset": 5759, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tif (!luaState || !g_luaEnvironment().getLuaState()) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f0e87b61d767aad9e821c712ab684245fe2a6e54e261daaed27b6a0f6001aa5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 19, + "charOffset": 5781, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 19, + "charOffset": 5759, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!luaState || !g_luaEnvironment().getLuaState()) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55e5a39bd56e4f6d29c93b7a4c05c85155e394b83f1341067a46e9b2f6f4a30a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'lua_State *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 20, + "charOffset": 5782, + "charLength": 16, + "snippet": { + "text": "g_luaEnvironment" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 20, + "charOffset": 5759, + "charLength": 16, + "snippet": { + "text": "\t}\n\n\tif (!luaState || !g_luaEnvironment().getLuaState()) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a44bb312099aeedf58e1d941e1d4f630aa3df4bba6227dadbb6798763f59657c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getMetricsScope' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp" + }, + "region": { + "startLine": 240, + "startColumn": 33, + "charOffset": 6041, + "charLength": 15, + "snippet": { + "text": "getMetricsScope" + } + }, + "contextRegion": { + "startLine": 238, + "startColumn": 33, + "charOffset": 6006, + "charLength": 15, + "snippet": { + "text": "}\n\nstd::string LuaScriptInterface::getMetricsScope() {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tint32_t scriptId;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6fbfbeb25d6eba14fd958696f89dcc6942b179a1a1af510c049adb47725138e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp" + }, + "region": { + "startLine": 241, + "startColumn": 34, + "charOffset": 6094, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 239, + "startColumn": 34, + "charOffset": 6008, + "charLength": 15, + "snippet": { + "text": "\nstd::string LuaScriptInterface::getMetricsScope() {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tint32_t scriptId;\n\tint32_t callbackId;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a93d45d32b43d8305b9b80678148ea8e5fa67774ebb856d8566a19a7452584f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'scriptId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 10, + "charOffset": 6121, + "charLength": 8, + "snippet": { + "text": "scriptId" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 10, + "charOffset": 6009, + "charLength": 8, + "snippet": { + "text": "std::string LuaScriptInterface::getMetricsScope() {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tint32_t scriptId;\n\tint32_t callbackId;\n\tbool timerEvent;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4cb11c6d2396e9ade17fe028f5c0873dd9d1939cf4c413cd0fc00a71e7281d66" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'callbackId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp" + }, + "region": { + "startLine": 243, + "startColumn": 10, + "charOffset": 6140, + "charLength": 10, + "snippet": { + "text": "callbackId" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 10, + "charOffset": 6061, + "charLength": 10, + "snippet": { + "text": "\tmetrics::method_latency measure(__METHOD_NAME__);\n\tint32_t scriptId;\n\tint32_t callbackId;\n\tbool timerEvent;\n\tLuaScriptInterface* scriptInterface;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47751dffd4e87e95811cda955cc657e807361a1bab3499ac17933e09183ac7cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'timerEvent' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp" + }, + "region": { + "startLine": 244, + "startColumn": 7, + "charOffset": 6158, + "charLength": 10, + "snippet": { + "text": "timerEvent" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 7, + "charOffset": 6112, + "charLength": 10, + "snippet": { + "text": "\tint32_t scriptId;\n\tint32_t callbackId;\n\tbool timerEvent;\n\tLuaScriptInterface* scriptInterface;\n\tgetScriptEnv()->getEventInfo(scriptId, scriptInterface, callbackId, timerEvent);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c0c481a846a0af0868829c57ef76213a8a060af1e973144373a7b82a1210c82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'scriptInterface' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/luascript.cpp" + }, + "region": { + "startLine": 245, + "startColumn": 22, + "charOffset": 6191, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 243, + "startColumn": 22, + "charOffset": 6131, + "charLength": 15, + "snippet": { + "text": "\tint32_t callbackId;\n\tbool timerEvent;\n\tLuaScriptInterface* scriptInterface;\n\tgetScriptEnv()->getEventInfo(scriptId, scriptInterface, callbackId, timerEvent);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ca9003eded5c55b63be67d7f6fea644e11761bd2c1bab1710a033f95a6251e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-member-init", + "ruleIndex": 510, + "kind": "fail", + "level": "warning", + "message": { + "text": "constructor does not initialize these fields: interface, scriptId, callbackId, timerEvent" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "region": { + "startLine": 16, + "startColumn": 1, + "charOffset": 500, + "charLength": 17, + "snippet": { + "text": "ScriptEnvironment" + } + }, + "contextRegion": { + "startLine": 14, + "startColumn": 1, + "charOffset": 453, + "charLength": 17, + "snippet": { + "text": "#include \"lua/scripts/script_environment.hpp\"\n\nScriptEnvironment::ScriptEnvironment() {\n\tresetEnv();\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92ac5b797da96c3b0c627eb73562504d18a52606c1b4245c3e11cdad6a6dcec6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 2, + "charOffset": 835, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 2, + "charOffset": 769, + "charLength": 5, + "snippet": { + "text": "\tauto pair = tempItems.equal_range(this);\n\tauto it = pair.first;\n\twhile (it != pair.second) {\n\t\tstd::shared_ptr item = it->second;\n\t\tit = tempItems.erase(it);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "747ed1978e852152bc1cebb0e3efd102e7c1f1b7810b5fe361283f5383216c2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 9, + "charOffset": 842, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 9, + "charOffset": 769, + "charLength": 2, + "snippet": { + "text": "\tauto pair = tempItems.equal_range(this);\n\tauto it = pair.first;\n\twhile (it != pair.second) {\n\t\tstd::shared_ptr item = it->second;\n\t\tit = tempItems.erase(it);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1fba60edbe07f441779b6909da29f497f8ad5c57bed2d92dd640bc2706771c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 7, + "charOffset": 1114, + "charLength": 9, + "snippet": { + "text": "interface" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 7, + "charOffset": 1040, + "charLength": 9, + "snippet": { + "text": "\tif (this->callbackId != 0) {\n\t\t// nested callbacks are not allowed\n\t\tif (interface) {\n\t\t\tinterface->reportErrorFunc(\"Nested callbacks!\");\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7cb1087261ef5af8fdc382b7c2b6aeb358d3119825b10987f08343324ada30d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'LuaScriptInterface *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 7, + "charOffset": 1114, + "charLength": 9, + "snippet": { + "text": "interface" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 7, + "charOffset": 1040, + "charLength": 9, + "snippet": { + "text": "\tif (this->callbackId != 0) {\n\t\t// nested callbacks are not allowed\n\t\tif (interface) {\n\t\t\tinterface->reportErrorFunc(\"Nested callbacks!\");\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e760e36456c492280da1dc06462f0ff9e9b83c39d31f19e2408e87372a84b7d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "region": { + "startLine": 44, + "startColumn": 4, + "charOffset": 1130, + "charLength": 9, + "snippet": { + "text": "interface" + } + }, + "contextRegion": { + "startLine": 42, + "startColumn": 4, + "charOffset": 1070, + "charLength": 9, + "snippet": { + "text": "\t\t// nested callbacks are not allowed\n\t\tif (interface) {\n\t\t\tinterface->reportErrorFunc(\"Nested callbacks!\");\n\t\t}\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1da5d66638f7594db3732d3c270fa705a842a29bd97b55d91ddcc9630ab286c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "region": { + "startLine": 44, + "startColumn": 15, + "charOffset": 1141, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 42, + "startColumn": 15, + "charOffset": 1070, + "charLength": 15, + "snippet": { + "text": "\t\t// nested callbacks are not allowed\n\t\tif (interface) {\n\t\t\tinterface->reportErrorFunc(\"Nested callbacks!\");\n\t\t}\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78a0cc955b5d69bb4eb9710f155b10479a2e395880d258a13cf0ae716238e9b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'getEventInfo' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "region": { + "startLine": 54, + "startColumn": 100, + "charOffset": 1384, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 52, + "startColumn": 100, + "charOffset": 1282, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid ScriptEnvironment::getEventInfo(int32_t &retScriptId, LuaScriptInterface*&retScriptInterface, int32_t &retCallbackId, bool &retTimerEvent) const {\n\tretScriptId = this->scriptId;\n\tretScriptInterface = interface;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "780bc49f3c6ecc976cc3cc8a3c0f242427b7aaf95f41774d88681efe12e61909" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "region": { + "startLine": 61, + "startColumn": 61, + "charOffset": 1634, + "charLength": 5, + "snippet": { + "text": "thing" + } + }, + "contextRegion": { + "startLine": 59, + "startColumn": 61, + "charOffset": 1571, + "charLength": 5, + "snippet": { + "text": "}\n\nuint32_t ScriptEnvironment::addThing(std::shared_ptr thing) {\n\tif (!thing || thing->isRemoved()) {\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "954c94f480bfc90e73320275577531daf10e7e94318296aaa09a2ab7a62252bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "region": { + "startLine": 62, + "startColumn": 6, + "charOffset": 1648, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 6, + "charOffset": 1573, + "charLength": 1, + "snippet": { + "text": "\nuint32_t ScriptEnvironment::addThing(std::shared_ptr thing) {\n\tif (!thing || thing->isRemoved()) {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca2266575ef07a532c1f6acbd5a1947b9d65599c86590c4cb186c1dabb42090b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 2, + "charOffset": 1986, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 2, + "charOffset": 1981, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &it : localMap) {\n\t\tif (it.second == item) {\n\t\t\treturn it.first;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6a302a8d9f22c6e10e12e36488b419f1ff0855edb63f2764318151ede365222" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "region": { + "startLine": 94, + "startColumn": 13, + "charOffset": 2416, + "charLength": 10, + "snippet": { + "text": "0x10000000" + } + }, + "contextRegion": { + "startLine": 92, + "startColumn": 13, + "charOffset": 2331, + "charLength": 10, + "snippet": { + "text": "\nstd::shared_ptr ScriptEnvironment::getThingByUID(uint32_t uid) {\n\tif (uid >= 0x10000000) {\n\t\treturn g_game().getCreatureByID(uid);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03db294d5321d0ad096ab921f008d2acee097cae4b3ea6e82f7216c2ceade163" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x10000000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "region": { + "startLine": 94, + "startColumn": 13, + "charOffset": 2416, + "charLength": 10, + "snippet": { + "text": "0x10000000" + } + }, + "contextRegion": { + "startLine": 92, + "startColumn": 13, + "charOffset": 2331, + "charLength": 10, + "snippet": { + "text": "\nstd::shared_ptr ScriptEnvironment::getThingByUID(uint32_t uid) {\n\tif (uid >= 0x10000000) {\n\t\treturn g_game().getCreatureByID(uid);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "559d20ea5f4e277326957ebae48e724325f23d32aad933c57925066ef04c43d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "region": { + "startLine": 118, + "startColumn": 6, + "charOffset": 2988, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 116, + "startColumn": 6, + "charOffset": 2861, + "charLength": 1, + "snippet": { + "text": "std::shared_ptr ScriptEnvironment::getItemByUID(uint32_t uid) {\n\tstd::shared_ptr thing = getThingByUID(uid);\n\tif (!thing) {\n\t\treturn nullptr;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4818b579152737e979a84b279b00d290cf8deca98cbaac9708562d3f4b6ba91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "region": { + "startLine": 126, + "startColumn": 6, + "charOffset": 3182, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 124, + "startColumn": 6, + "charOffset": 3048, + "charLength": 1, + "snippet": { + "text": "std::shared_ptr ScriptEnvironment::getContainerByUID(uint32_t uid) {\n\tstd::shared_ptr item = getItemByUID(uid);\n\tif (!item) {\n\t\treturn nullptr;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22be4c1d4e2c7a7983d4c8b056d80f653943cdaf9bf6c729d463ec534f97b4a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "region": { + "startLine": 140, + "startColumn": 12, + "charOffset": 3495, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 138, + "startColumn": 12, + "charOffset": 3424, + "charLength": 5, + "snippet": { + "text": "\tauto it = localMap.find(uid);\n\tif (it != localMap.end()) {\n\t\tlocalMap.erase(it);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2ed3d81a72aa85294096175deedac715f0ca3a091edb692caae5cae6a31e71a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "region": { + "startLine": 144, + "startColumn": 59, + "charOffset": 3570, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 142, + "startColumn": 59, + "charOffset": 3509, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid ScriptEnvironment::addTempItem(std::shared_ptr item) {\n\ttempItems.emplace(this, item);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bcc2682a015c08ded22d9c0666e76ed33441d85d937450a009ca79b34de76ccf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "region": { + "startLine": 145, + "startColumn": 12, + "charOffset": 3589, + "charLength": 7, + "snippet": { + "text": "emplace" + } + }, + "contextRegion": { + "startLine": 143, + "startColumn": 12, + "charOffset": 3511, + "charLength": 7, + "snippet": { + "text": "\nvoid ScriptEnvironment::addTempItem(std::shared_ptr item) {\n\ttempItems.emplace(this, item);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ebd805f3958cf880c2bdfb0104e98bcf11b686dc41f93f32931bcc47122f44b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "region": { + "startLine": 148, + "startColumn": 62, + "charOffset": 3674, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 146, + "startColumn": 62, + "charOffset": 3610, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid ScriptEnvironment::removeTempItem(std::shared_ptr item) {\n\tfor (auto it = tempItems.begin(), end = tempItems.end(); it != end; ++it) {\n\t\tif (it->second == item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a33fb827f647a0da6b9691d9be1794279fb90c228e203fce9d7afd5765134be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "region": { + "startLine": 149, + "startColumn": 2, + "charOffset": 3683, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 147, + "startColumn": 2, + "charOffset": 3612, + "charLength": 3, + "snippet": { + "text": "\nvoid ScriptEnvironment::removeTempItem(std::shared_ptr item) {\n\tfor (auto it = tempItems.begin(), end = tempItems.end(); it != end; ++it) {\n\t\tif (it->second == item) {\n\t\t\ttempItems.erase(it);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a62752abfa7fe4372f2679ae4f1e5770ada87b6eca27f9d8b29c79169bbc03f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "region": { + "startLine": 149, + "startColumn": 2, + "charOffset": 3683, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 147, + "startColumn": 2, + "charOffset": 3612, + "charLength": 3, + "snippet": { + "text": "\nvoid ScriptEnvironment::removeTempItem(std::shared_ptr item) {\n\tfor (auto it = tempItems.begin(), end = tempItems.end(); it != end; ++it) {\n\t\tif (it->second == item) {\n\t\t\ttempItems.erase(it);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b99c9c04b0e61ea94bf279167d324f5a7ec182aef8767da98507e91cc7365fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "region": { + "startLine": 149, + "startColumn": 7, + "charOffset": 3688, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 147, + "startColumn": 7, + "charOffset": 3612, + "charLength": 4, + "snippet": { + "text": "\nvoid ScriptEnvironment::removeTempItem(std::shared_ptr item) {\n\tfor (auto it = tempItems.begin(), end = tempItems.end(); it != end; ++it) {\n\t\tif (it->second == item) {\n\t\t\ttempItems.erase(it);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27356b89cff95e38b842cf9f405e0c1cc19ee27a99391db613d7363ccf5ebbe6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "region": { + "startLine": 149, + "startColumn": 59, + "charOffset": 3740, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 147, + "startColumn": 59, + "charOffset": 3612, + "charLength": 2, + "snippet": { + "text": "\nvoid ScriptEnvironment::removeTempItem(std::shared_ptr item) {\n\tfor (auto it = tempItems.begin(), end = tempItems.end(); it != end; ++it) {\n\t\tif (it->second == item) {\n\t\t\ttempItems.erase(it);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94a4e5d8f0c6a5dba7d3475da280936547aa8c1bb7c4d795d4d85ac985083427" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "region": { + "startLine": 151, + "startColumn": 14, + "charOffset": 3800, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 149, + "startColumn": 14, + "charOffset": 3682, + "charLength": 5, + "snippet": { + "text": "\tfor (auto it = tempItems.begin(), end = tempItems.end(); it != end; ++it) {\n\t\tif (it->second == item) {\n\t\t\ttempItems.erase(it);\n\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a433e2af27ce4d97dbb08aa5350ac01c3a1f32d3429a62293a1bc9b24c3f52bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'res' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "region": { + "startLine": 158, + "startColumn": 32, + "charOffset": 3920, + "charLength": 3, + "snippet": { + "text": "res" + } + }, + "contextRegion": { + "startLine": 156, + "startColumn": 32, + "charOffset": 3830, + "charLength": 3, + "snippet": { + "text": "\nuint32_t ScriptEnvironment::addResult(DBResult_ptr res) {\n\ttempResults[++lastResultId] = res;\n\treturn lastResultId;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "569160d2a62056f55b40a6dd513e54be71be27899b5d622e92e8dbe539d54d5c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/script_environment.cpp" + }, + "region": { + "startLine": 168, + "startColumn": 14, + "charOffset": 4100, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 166, + "startColumn": 14, + "charOffset": 4083, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\ttempResults.erase(it);\n\treturn true;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd52bf5e980710c55758ef77cfeaa37df6e3d860ef75ee7dc0588addd680a9ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'imbuements.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp" + }, + "region": { + "startLine": 22, + "startColumn": 10, + "charOffset": 760, + "charLength": 27, + "snippet": { + "text": "\"imbuements/imbuements.hpp\"" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 10, + "charOffset": 690, + "charLength": 27, + "snippet": { + "text": "#include \"grouping/groups.hpp\"\n#include \"grouping/guild.hpp\"\n#include \"imbuements/imbuements.hpp\"\n#include \"items/containers/inbox/inbox.hpp\"\n#include \"io/ioguild.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f490ad18bd902fc99f04171cfd7d69c9079600246fb9f94ac010cfabddf36133" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/scripts.cpp", + "index": 1 + }, + "region": { + "startLine": 22, + "startColumn": 18, + "charOffset": 757, + "charLength": 9, + "snippet": { + "text": "initState" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 18, + "charOffset": 679, + "charLength": 9, + "snippet": { + "text": "Scripts::Scripts() :\n\tscriptInterface(\"Scripts Interface\") {\n\tscriptInterface.initState();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa0103ec622fac97e10761aff4dccc1503a47403d3a6776785bdcf7f26deb880" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'clearAllScripts' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/scripts.cpp", + "index": 1 + }, + "region": { + "startLine": 25, + "startColumn": 15, + "charOffset": 787, + "charLength": 15, + "snippet": { + "text": "clearAllScripts" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 15, + "charOffset": 770, + "charLength": 15, + "snippet": { + "text": "}\n\nvoid Scripts::clearAllScripts() const {\n\tg_actions().clear();\n\tg_creatureEvents().clear();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9df75a22a394a4adac9f831a02820750b3071ec4e0efdbb49ddfa604f59d107" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/scripts.cpp", + "index": 1 + }, + "region": { + "startLine": 46, + "startColumn": 2, + "charOffset": 1544, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 44, + "startColumn": 2, + "charOffset": 1488, + "charLength": 3, + "snippet": { + "text": "\n\tstd::filesystem::recursive_directory_iterator endit;\n\tfor (std::filesystem::recursive_directory_iterator it(dir); it != endit; ++it) {\n\t\tif (std::filesystem::is_regular_file(*it) && it->path().extension() == \".lua\") {\n\t\t\tif (it->path().filename().string() == fileName) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64c877208dd7941e4df73a3b67a2ff2620577d9aff6be5edc6d324071ec4fc41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/scripts.cpp", + "index": 1 + }, + "region": { + "startLine": 46, + "startColumn": 62, + "charOffset": 1604, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 44, + "startColumn": 62, + "charOffset": 1488, + "charLength": 2, + "snippet": { + "text": "\n\tstd::filesystem::recursive_directory_iterator endit;\n\tfor (std::filesystem::recursive_directory_iterator it(dir); it != endit; ++it) {\n\t\tif (std::filesystem::is_regular_file(*it) && it->path().extension() == \".lua\") {\n\t\t\tif (it->path().filename().string() == fileName) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "410fb32c87d7239c37a28f441f79edb661cd84254835522e40bf396bd0a384cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'loadScripts' has cognitive complexity of 32 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/scripts.cpp", + "index": 1 + }, + "region": { + "startLine": 62, + "startColumn": 15, + "charOffset": 2041, + "charLength": 11, + "snippet": { + "text": "loadScripts" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 15, + "charOffset": 2024, + "charLength": 11, + "snippet": { + "text": "}\n\nbool Scripts::loadScripts(std::string loadPath, bool isLib, bool reload) {\n\tconst auto dir = std::filesystem::current_path() / loadPath;\n\t// Checks if the folder exists and is really a folder" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93b468e1178428dc963ef653387a8fdbaefb56f6b380abee7932d47644e4c73d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/scripts.cpp", + "index": 1 + }, + "region": { + "startLine": 73, + "startColumn": 2, + "charOffset": 2518, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 71, + "startColumn": 2, + "charOffset": 2430, + "charLength": 3, + "snippet": { + "text": "\tstd::string lastDirectory;\n\t// Recursive iterate through all entries in the directory\n\tfor (const auto &entry : std::filesystem::recursive_directory_iterator(dir)) {\n\t\t// Get the filename of the entry as a string\n\t\tconst auto realPath = entry.path();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "836c91fd75c647500aa233165c2ebd791d72da6a8dcd8b735599037294c97837" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified variable 'realPath' is copy-constructed from a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/scripts.cpp", + "index": 1 + }, + "region": { + "startLine": 75, + "startColumn": 14, + "charOffset": 2657, + "charLength": 8, + "snippet": { + "text": "realPath" + } + }, + "contextRegion": { + "startLine": 73, + "startColumn": 14, + "charOffset": 2517, + "charLength": 8, + "snippet": { + "text": "\tfor (const auto &entry : std::filesystem::recursive_directory_iterator(dir)) {\n\t\t// Get the filename of the entry as a string\n\t\tconst auto realPath = entry.path();\n\t\tstd::string fileFolder = realPath.parent_path().filename().string();\n\t\t// Script folder, example: \"actions\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c495536d8c992c0e556291cdcc2ef306f944868d175f1632ee7fff3fe3f0b4cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Scripts::loadScripts' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/scripts/scripts.hpp", + "index": 2 + }, + "region": { + "startLine": 30, + "startColumn": 7, + "charOffset": 758, + "charLength": 11, + "snippet": { + "text": "loadScripts" + } + }, + "contextRegion": { + "startLine": 28, + "startColumn": 7, + "charOffset": 689, + "charLength": 11, + "snippet": { + "text": "\n\tbool loadEventSchedulerScripts(const std::string &fileName);\n\tbool loadScripts(std::string folderName, bool isLib, bool reload);\n\tLuaScriptInterface &getScriptInterface() {\n\t\treturn scriptInterface;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c3c4f882e40c9c44d2937dfc127ccafaf4c2f2a663470953bba84c555ddefb1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 23, + "startColumn": 48, + "charOffset": 710, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 21, + "startColumn": 48, + "charOffset": 645, + "charLength": 4, + "snippet": { + "text": "\tid(houseId) { }\n\nvoid House::addTile(std::shared_ptr tile) {\n\ttile->setFlag(TILESTATE_PROTECTIONZONE);\n\thouseTiles.push_back(tile);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10969edbe8d4a3b784b5a83cc000cd0d622cb3cf9f63e0464d4b29cdfbe97581" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 40, + "startColumn": 5, + "charOffset": 1241, + "charLength": 12, + "snippet": { + "text": "executeQuery" + } + }, + "contextRegion": { + "startLine": 38, + "startColumn": 5, + "charOffset": 1195, + "charLength": 12, + "snippet": { + "text": "\n\tDatabase &db = Database::getInstance();\n\tdb.executeQuery(query.str());\n\tif (!serverStartup) {\n\t\tsetNewOwnership();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fdc6d2ff9b2a6fe63cd869f5accd1b1b4a8b1e1d8b6dfd11685df1ddeced62f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 48, + "startColumn": 2, + "charOffset": 1404, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 2, + "charOffset": 1318, + "charLength": 3, + "snippet": { + "text": "void House::clearHouseInfo(bool preventOwnerDeletion) {\n\t// Remove players from beds\n\tfor (const auto &bed : bedsList) {\n\t\tif (bed->getSleeper() != 0) {\n\t\t\tbed->wakeUp(nullptr);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5287dad684b7afcff1fd886f68545337643be3448f81d9ab646dccbd363fcb7d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 63, + "startColumn": 2, + "charOffset": 1687, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 2, + "charOffset": 1653, + "charLength": 3, + "snippet": { + "text": "\tsetAccessList(GUEST_LIST, \"\");\n\n\tfor (const auto &door : doorList) {\n\t\tdoor->setAccessList(\"\");\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2e6bbfe58def76e7f42bba69d7b9db526930d1b388d54a928116c257cdfd7f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 68, + "startColumn": 58, + "charOffset": 1813, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 66, + "startColumn": 58, + "charOffset": 1753, + "charLength": 6, + "snippet": { + "text": "}\n\nbool House::tryTransferOwnership(std::shared_ptr player, bool serverStartup) {\n\tbool transferSuccess = false;\n\tif (player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45d866c8f9234cead0e53917ea77dbb53a442463f95bbaf94098b85191c8232e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 4, + "charOffset": 2093, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 4, + "charOffset": 1987, + "charLength": 3, + "snippet": { + "text": "\tfor (const auto &tile : houseTiles) {\n\t\tif (const CreatureVector* creatures = tile->getCreatures()) {\n\t\t\tfor (int32_t i = creatures->size(); --i >= 0;) {\n\t\t\t\tconst auto creature = (*creatures)[i];\n\t\t\t\tkickPlayer(nullptr, creature->getPlayer());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2c29a15e94f160371662ea5543b0a07c29bbf48d87456746f2cddeaf99efeb1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 4, + "charOffset": 2093, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 4, + "charOffset": 1987, + "charLength": 3, + "snippet": { + "text": "\tfor (const auto &tile : houseTiles) {\n\t\tif (const CreatureVector* creatures = tile->getCreatures()) {\n\t\t\tfor (int32_t i = creatures->size(); --i >= 0;) {\n\t\t\t\tconst auto creature = (*creatures)[i];\n\t\t\t\tkickPlayer(nullptr, creature->getPlayer());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9c11ed2d5d826583d54b1d0be68923ee9a130480726cd8226cd748da3af5228" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 21, + "charOffset": 2110, + "charLength": 9, + "snippet": { + "text": "creatures" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 21, + "charOffset": 1987, + "charLength": 9, + "snippet": { + "text": "\tfor (const auto &tile : houseTiles) {\n\t\tif (const CreatureVector* creatures = tile->getCreatures()) {\n\t\t\tfor (int32_t i = creatures->size(); --i >= 0;) {\n\t\t\t\tconst auto creature = (*creatures)[i];\n\t\t\t\tkickPlayer(nullptr, creature->getPlayer());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fcb5e884f319f2fb6a2daa722be7eae16e2ae0599c0307ed080f9e72fe36e556" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 21, + "charOffset": 2110, + "charLength": 9, + "snippet": { + "text": "creatures" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 21, + "charOffset": 1987, + "charLength": 9, + "snippet": { + "text": "\tfor (const auto &tile : houseTiles) {\n\t\tif (const CreatureVector* creatures = tile->getCreatures()) {\n\t\t\tfor (int32_t i = creatures->size(); --i >= 0;) {\n\t\t\t\tconst auto creature = (*creatures)[i];\n\t\t\t\tkickPlayer(nullptr, creature->getPlayer());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e57139f1d5b31efdd6470e5bbd4a1cc2dc03f5b4cf7ba5575df5ea36af15366a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'i' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 40, + "charOffset": 2129, + "charLength": 2, + "snippet": { + "text": "--" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 40, + "charOffset": 1987, + "charLength": 2, + "snippet": { + "text": "\tfor (const auto &tile : houseTiles) {\n\t\tif (const CreatureVector* creatures = tile->getCreatures()) {\n\t\t\tfor (int32_t i = creatures->size(); --i >= 0;) {\n\t\t\t\tconst auto creature = (*creatures)[i];\n\t\t\t\tkickPlayer(nullptr, creature->getPlayer());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "684ffbb34e98d2d65f6423bafbc322bac615868cba7a73164f8732fd6e6f17f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 80, + "startColumn": 5, + "charOffset": 2189, + "charLength": 10, + "snippet": { + "text": "kickPlayer" + } + }, + "contextRegion": { + "startLine": 78, + "startColumn": 5, + "charOffset": 2090, + "charLength": 10, + "snippet": { + "text": "\t\t\tfor (int32_t i = creatures->size(); --i >= 0;) {\n\t\t\t\tconst auto creature = (*creatures)[i];\n\t\t\t\tkickPlayer(nullptr, creature->getPlayer());\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94f693f6287b27baabc522a223bce812c642f6d515a98dbbbed9aa279ae34d33" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 96, + "startColumn": 6, + "charOffset": 2703, + "charLength": 12, + "snippet": { + "text": "executeQuery" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 6, + "charOffset": 2508, + "charLength": 12, + "snippet": { + "text": "\t\tstd::ostringstream query;\n\t\tquery << \"UPDATE `houses` SET `owner` = \" << guid << \", `new_owner` = -1, `bid` = 0, `bid_end` = 0, `last_bid` = 0, `highest_bidder` = 0 WHERE `id` = \" << id;\n\t\tdb.executeQuery(query.str());\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6fde9e2bb4f5f129fc2109efb6ac90bf85dbec853034078ceb72fe979a19921e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 106, + "startColumn": 3, + "charOffset": 2822, + "charLength": 20, + "snippet": { + "text": "tryTransferOwnership" + } + }, + "contextRegion": { + "startLine": 104, + "startColumn": 3, + "charOffset": 2800, + "charLength": 20, + "snippet": { + "text": "\n\tif (owner != 0) {\n\t\ttryTransferOwnership(std::move(player), false);\n\t} else {\n\t\tstd::string strRentPeriod = asLowerCaseString(g_configManager().getString(HOUSE_RENT_PERIOD, __FUNCTION__));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f04b81e87d7f6a9222f1eca0014d56ab53085feff08e61c7c2213f92e698806" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 109, + "startColumn": 24, + "charOffset": 3014, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 107, + "startColumn": 24, + "charOffset": 2870, + "charLength": 4, + "snippet": { + "text": "\t} else {\n\t\tstd::string strRentPeriod = asLowerCaseString(g_configManager().getString(HOUSE_RENT_PERIOD, __FUNCTION__));\n\t\ttime_t currentTime = time(nullptr);\n\t\tif (strRentPeriod == \"yearly\") {\n\t\t\tcurrentTime += 24 * 60 * 60 * 365;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eeb62ba4a8f8ffe36818a782d0f90210f6915baeddb912acef46cbcb2dd4139f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'time_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 19, + "charOffset": 3082, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 19, + "charOffset": 2991, + "charLength": 2, + "snippet": { + "text": "\t\ttime_t currentTime = time(nullptr);\n\t\tif (strRentPeriod == \"yearly\") {\n\t\t\tcurrentTime += 24 * 60 * 60 * 365;\n\t\t} else if (strRentPeriod == \"monthly\") {\n\t\t\tcurrentTime += 24 * 60 * 60 * 30;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38644609574532093a80b988797670f2ad680afc2976007fec1183e980d5d80f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 19, + "charOffset": 3082, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 19, + "charOffset": 2991, + "charLength": 2, + "snippet": { + "text": "\t\ttime_t currentTime = time(nullptr);\n\t\tif (strRentPeriod == \"yearly\") {\n\t\t\tcurrentTime += 24 * 60 * 60 * 365;\n\t\t} else if (strRentPeriod == \"monthly\") {\n\t\t\tcurrentTime += 24 * 60 * 60 * 30;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2c360301f3c994df645072bfb9faebaefe82cd7665abd38f079009cc60b6bff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 24, + "charOffset": 3087, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 24, + "charOffset": 2991, + "charLength": 2, + "snippet": { + "text": "\t\ttime_t currentTime = time(nullptr);\n\t\tif (strRentPeriod == \"yearly\") {\n\t\t\tcurrentTime += 24 * 60 * 60 * 365;\n\t\t} else if (strRentPeriod == \"monthly\") {\n\t\t\tcurrentTime += 24 * 60 * 60 * 30;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2fa9249c81da6a6bfce89067453a43078f6d31af7c205f8497606d6a4143f4ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 29, + "charOffset": 3092, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 29, + "charOffset": 2991, + "charLength": 2, + "snippet": { + "text": "\t\ttime_t currentTime = time(nullptr);\n\t\tif (strRentPeriod == \"yearly\") {\n\t\t\tcurrentTime += 24 * 60 * 60 * 365;\n\t\t} else if (strRentPeriod == \"monthly\") {\n\t\t\tcurrentTime += 24 * 60 * 60 * 30;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e16e076f2fc515774046c2867850216d7092f252e5bb50be1b7001cfff36a57" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "365 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 34, + "charOffset": 3097, + "charLength": 3, + "snippet": { + "text": "365" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 34, + "charOffset": 2991, + "charLength": 3, + "snippet": { + "text": "\t\ttime_t currentTime = time(nullptr);\n\t\tif (strRentPeriod == \"yearly\") {\n\t\t\tcurrentTime += 24 * 60 * 60 * 365;\n\t\t} else if (strRentPeriod == \"monthly\") {\n\t\t\tcurrentTime += 24 * 60 * 60 * 30;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "662219f89bb89de9383179fb3bb3af74d4eb5009b80aecae9c7bd7a0096e5766" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'time_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 113, + "startColumn": 19, + "charOffset": 3163, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 111, + "startColumn": 19, + "charOffset": 3064, + "charLength": 2, + "snippet": { + "text": "\t\t\tcurrentTime += 24 * 60 * 60 * 365;\n\t\t} else if (strRentPeriod == \"monthly\") {\n\t\t\tcurrentTime += 24 * 60 * 60 * 30;\n\t\t} else if (strRentPeriod == \"weekly\") {\n\t\t\tcurrentTime += 24 * 60 * 60 * 7;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ed22ab7e80b95724c280df77de198b23bf2ef54d8937c6faab0ac41ad26f92c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 113, + "startColumn": 19, + "charOffset": 3163, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 111, + "startColumn": 19, + "charOffset": 3064, + "charLength": 2, + "snippet": { + "text": "\t\t\tcurrentTime += 24 * 60 * 60 * 365;\n\t\t} else if (strRentPeriod == \"monthly\") {\n\t\t\tcurrentTime += 24 * 60 * 60 * 30;\n\t\t} else if (strRentPeriod == \"weekly\") {\n\t\t\tcurrentTime += 24 * 60 * 60 * 7;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b4619cf7a1d4a6f33198b9fc5a3813576e48f53e619925b9de8e9b7205881dcf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 113, + "startColumn": 24, + "charOffset": 3168, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 111, + "startColumn": 24, + "charOffset": 3064, + "charLength": 2, + "snippet": { + "text": "\t\t\tcurrentTime += 24 * 60 * 60 * 365;\n\t\t} else if (strRentPeriod == \"monthly\") {\n\t\t\tcurrentTime += 24 * 60 * 60 * 30;\n\t\t} else if (strRentPeriod == \"weekly\") {\n\t\t\tcurrentTime += 24 * 60 * 60 * 7;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2585d9422211b80ca8c2978930039afa21d6282c05223c5725caaba6613a921" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 113, + "startColumn": 29, + "charOffset": 3173, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 111, + "startColumn": 29, + "charOffset": 3064, + "charLength": 2, + "snippet": { + "text": "\t\t\tcurrentTime += 24 * 60 * 60 * 365;\n\t\t} else if (strRentPeriod == \"monthly\") {\n\t\t\tcurrentTime += 24 * 60 * 60 * 30;\n\t\t} else if (strRentPeriod == \"weekly\") {\n\t\t\tcurrentTime += 24 * 60 * 60 * 7;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "629fb32feccb193ac3c24b54bc87667665dccdf6fd3eba1348140cec5cf9689f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 113, + "startColumn": 34, + "charOffset": 3178, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 111, + "startColumn": 34, + "charOffset": 3064, + "charLength": 2, + "snippet": { + "text": "\t\t\tcurrentTime += 24 * 60 * 60 * 365;\n\t\t} else if (strRentPeriod == \"monthly\") {\n\t\t\tcurrentTime += 24 * 60 * 60 * 30;\n\t\t} else if (strRentPeriod == \"weekly\") {\n\t\t\tcurrentTime += 24 * 60 * 60 * 7;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a8d3d92c3cfffde7f34a6cb5d37152db8fc11c82d0ff512dda25c3afd7963aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'time_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 115, + "startColumn": 19, + "charOffset": 3242, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 113, + "startColumn": 19, + "charOffset": 3145, + "charLength": 2, + "snippet": { + "text": "\t\t\tcurrentTime += 24 * 60 * 60 * 30;\n\t\t} else if (strRentPeriod == \"weekly\") {\n\t\t\tcurrentTime += 24 * 60 * 60 * 7;\n\t\t} else if (strRentPeriod == \"daily\") {\n\t\t\tcurrentTime += 24 * 60 * 60;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65048191be81837ad47bcf026d9626412baa4b071b025182d65983d1db7b0c15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 115, + "startColumn": 19, + "charOffset": 3242, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 113, + "startColumn": 19, + "charOffset": 3145, + "charLength": 2, + "snippet": { + "text": "\t\t\tcurrentTime += 24 * 60 * 60 * 30;\n\t\t} else if (strRentPeriod == \"weekly\") {\n\t\t\tcurrentTime += 24 * 60 * 60 * 7;\n\t\t} else if (strRentPeriod == \"daily\") {\n\t\t\tcurrentTime += 24 * 60 * 60;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "764a15915c85a910e8f68e44be9d7950aadbd84553a5627530649f4cf63f0b77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 115, + "startColumn": 24, + "charOffset": 3247, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 113, + "startColumn": 24, + "charOffset": 3145, + "charLength": 2, + "snippet": { + "text": "\t\t\tcurrentTime += 24 * 60 * 60 * 30;\n\t\t} else if (strRentPeriod == \"weekly\") {\n\t\t\tcurrentTime += 24 * 60 * 60 * 7;\n\t\t} else if (strRentPeriod == \"daily\") {\n\t\t\tcurrentTime += 24 * 60 * 60;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e431323cc14cbc8b33758039f2807320d99f413351f919508041a955f7975af9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 115, + "startColumn": 29, + "charOffset": 3252, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 113, + "startColumn": 29, + "charOffset": 3145, + "charLength": 2, + "snippet": { + "text": "\t\t\tcurrentTime += 24 * 60 * 60 * 30;\n\t\t} else if (strRentPeriod == \"weekly\") {\n\t\t\tcurrentTime += 24 * 60 * 60 * 7;\n\t\t} else if (strRentPeriod == \"daily\") {\n\t\t\tcurrentTime += 24 * 60 * 60;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3bfcd06002cef9ff96875179d6d1426b4954e837be1abe62997113248386c82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 115, + "startColumn": 34, + "charOffset": 3257, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 113, + "startColumn": 34, + "charOffset": 3145, + "charLength": 1, + "snippet": { + "text": "\t\t\tcurrentTime += 24 * 60 * 60 * 30;\n\t\t} else if (strRentPeriod == \"weekly\") {\n\t\t\tcurrentTime += 24 * 60 * 60 * 7;\n\t\t} else if (strRentPeriod == \"daily\") {\n\t\t\tcurrentTime += 24 * 60 * 60;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ae81b21249e29bdb5f0b753a809a5c891d36b4d51059bdfcf55471351c4af10" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'time_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 117, + "startColumn": 19, + "charOffset": 3319, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 115, + "startColumn": 19, + "charOffset": 3224, + "charLength": 2, + "snippet": { + "text": "\t\t\tcurrentTime += 24 * 60 * 60 * 7;\n\t\t} else if (strRentPeriod == \"daily\") {\n\t\t\tcurrentTime += 24 * 60 * 60;\n\t\t} else {\n\t\t\tcurrentTime = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d188e4c5d3ed510809564b42b90c1531c597fdb42c14ba0b22498ade83dc27af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 117, + "startColumn": 19, + "charOffset": 3319, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 115, + "startColumn": 19, + "charOffset": 3224, + "charLength": 2, + "snippet": { + "text": "\t\t\tcurrentTime += 24 * 60 * 60 * 7;\n\t\t} else if (strRentPeriod == \"daily\") {\n\t\t\tcurrentTime += 24 * 60 * 60;\n\t\t} else {\n\t\t\tcurrentTime = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae88cb79602d03817298f89e3e40acefd26d3fee4260d105c400737fe18125aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 117, + "startColumn": 24, + "charOffset": 3324, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 115, + "startColumn": 24, + "charOffset": 3224, + "charLength": 2, + "snippet": { + "text": "\t\t\tcurrentTime += 24 * 60 * 60 * 7;\n\t\t} else if (strRentPeriod == \"daily\") {\n\t\t\tcurrentTime += 24 * 60 * 60;\n\t\t} else {\n\t\t\tcurrentTime = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9b314421bdb73d8169aeb1f041aa81911275f97e77b98a6fb76a4e2607e4087" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 117, + "startColumn": 29, + "charOffset": 3329, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 115, + "startColumn": 29, + "charOffset": 3224, + "charLength": 2, + "snippet": { + "text": "\t\t\tcurrentTime += 24 * 60 * 60 * 7;\n\t\t} else if (strRentPeriod == \"daily\") {\n\t\t\tcurrentTime += 24 * 60 * 60;\n\t\t} else {\n\t\t\tcurrentTime = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc6e87d401349e40287c2c9814c1f4f4261b4ae56f861b67e36a4d9e54fa9b4b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 132, + "startColumn": 7, + "charOffset": 3645, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 130, + "startColumn": 7, + "charOffset": 3508, + "charLength": 1, + "snippet": { + "text": "\t\tquery << \"SELECT `name`, `account_id` FROM `players` WHERE `id` = \" << guid;\n\t\tDBResult_ptr result = db.storeQuery(query.str());\n\t\tif (!result) {\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62e9ce6a8defc998b8ef31cae372f12cd50971918b9090f69fd8d8c2b234df48" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 156, + "startColumn": 29, + "charOffset": 4231, + "charLength": 8, + "snippet": { + "text": "getPrice" + } + }, + "contextRegion": { + "startLine": 154, + "startColumn": 29, + "charOffset": 4150, + "charLength": 8, + "snippet": { + "text": "\n\tss << \" It is \" << getSize() << \" square meters.\";\n\tconst int32_t housePrice = getPrice();\n\tif (housePrice != -1) {\n\t\tif (g_configManager().getBoolean(HOUSE_PURSHASED_SHOW_PRICE, __FUNCTION__) || owner == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c15836d1db5594ebd6c8f852d188628f1ec50266f9f421812c7f5cb5a678c09" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 2, + "charOffset": 4706, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 2, + "charOffset": 4701, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &it : doorList) {\n\t\tit->setAttribute(ItemAttribute_t::DESCRIPTION, ss.str());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0077baac2ac5d7865474874c031ce9a2aa18f80a24c6a63a6097f3159b43cca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 71, + "charOffset": 4876, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 71, + "charOffset": 4803, + "charLength": 6, + "snippet": { + "text": "}\n\nAccessHouseLevel_t House::getHouseAccessLevel(std::shared_ptr player) const {\n\tif (!player) {\n\t\treturn HOUSE_OWNER;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b650b83e2a3c6b15caa65d001842b9e189a899fa0df62edac619fa0d2f05c2fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 173, + "startColumn": 6, + "charOffset": 4897, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 171, + "startColumn": 6, + "charOffset": 4805, + "charLength": 1, + "snippet": { + "text": "\nAccessHouseLevel_t House::getHouseAccessLevel(std::shared_ptr player) const {\n\tif (!player) {\n\t\treturn HOUSE_OWNER;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6839d3b48b0d5c2d5a07f717107b318401734704d19795c3a1e36cd65777730e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 202, + "startColumn": 80, + "charOffset": 5468, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 200, + "startColumn": 80, + "charOffset": 5386, + "charLength": 6, + "snippet": { + "text": "}\n\nbool House::kickPlayer(std::shared_ptr player, std::shared_ptr target) {\n\tif (!target) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5c65c38ad794ca0ee3db914f4a6202b201e83fc8b9080ff7cdd74294fa953c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 203, + "startColumn": 6, + "charOffset": 5483, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 201, + "startColumn": 6, + "charOffset": 5388, + "charLength": 1, + "snippet": { + "text": "\nbool House::kickPlayer(std::shared_ptr player, std::shared_ptr target) {\n\tif (!target) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d0704734a03332ab7b76986e43754fbb84c45fcc6f53ba30fdb9b75a4b9e044" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 208, + "startColumn": 6, + "charOffset": 5616, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 206, + "startColumn": 6, + "charOffset": 5513, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr houseTile = std::dynamic_pointer_cast(target->getTile());\n\tif (!houseTile || houseTile->getHouse() != static_self_cast()) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "950b3bcbdbde62274ae85a50a5937f57c3d794c0fc722fb95a20607a6115869b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 212, + "startColumn": 26, + "charOffset": 5729, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 210, + "startColumn": 26, + "charOffset": 5700, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tif (getHouseAccessLevel(player) < getHouseAccessLevel(target) || target->hasFlag(PlayerFlags_t::CanEditHouses)) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b19e70dc5940b787a27572576f1b4bd3136974ec6945db8a0144b068cae804a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 4, + "charOffset": 6635, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 4, + "charOffset": 6513, + "charLength": 3, + "snippet": { + "text": "\tfor (const std::shared_ptr &tile : houseTiles) {\n\t\tif (CreatureVector* creatures = tile->getCreatures()) {\n\t\t\tfor (int32_t i = creatures->size(); --i >= 0;) {\n\t\t\t\tstd::shared_ptr player = (*creatures)[i]->getPlayer();\n\t\t\t\tif (player && !isInvited(player)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e31a55fb4fec553ba22123b30de150a2872a153c214a6a60301e746ba47b4fe6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 4, + "charOffset": 6635, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 4, + "charOffset": 6513, + "charLength": 3, + "snippet": { + "text": "\tfor (const std::shared_ptr &tile : houseTiles) {\n\t\tif (CreatureVector* creatures = tile->getCreatures()) {\n\t\t\tfor (int32_t i = creatures->size(); --i >= 0;) {\n\t\t\t\tstd::shared_ptr player = (*creatures)[i]->getPlayer();\n\t\t\t\tif (player && !isInvited(player)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "91a6300931e3112edfba09eb1d20d300b32193f292d5af290903fa25d5b15a93" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 21, + "charOffset": 6652, + "charLength": 9, + "snippet": { + "text": "creatures" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 21, + "charOffset": 6513, + "charLength": 9, + "snippet": { + "text": "\tfor (const std::shared_ptr &tile : houseTiles) {\n\t\tif (CreatureVector* creatures = tile->getCreatures()) {\n\t\t\tfor (int32_t i = creatures->size(); --i >= 0;) {\n\t\t\t\tstd::shared_ptr player = (*creatures)[i]->getPlayer();\n\t\t\t\tif (player && !isInvited(player)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d7f786ee4d7c35b47bb2fcaa9a7fa826d1fdada7d87d802209593252e5450b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 21, + "charOffset": 6652, + "charLength": 9, + "snippet": { + "text": "creatures" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 21, + "charOffset": 6513, + "charLength": 9, + "snippet": { + "text": "\tfor (const std::shared_ptr &tile : houseTiles) {\n\t\tif (CreatureVector* creatures = tile->getCreatures()) {\n\t\t\tfor (int32_t i = creatures->size(); --i >= 0;) {\n\t\t\t\tstd::shared_ptr player = (*creatures)[i]->getPlayer();\n\t\t\t\tif (player && !isInvited(player)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e77e85ed09cbb26b0407bc5ee1e41427f2c86ef93114716a3cb799b5eb7dc52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'i' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 40, + "charOffset": 6671, + "charLength": 2, + "snippet": { + "text": "--" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 40, + "charOffset": 6513, + "charLength": 2, + "snippet": { + "text": "\tfor (const std::shared_ptr &tile : houseTiles) {\n\t\tif (CreatureVector* creatures = tile->getCreatures()) {\n\t\t\tfor (int32_t i = creatures->size(); --i >= 0;) {\n\t\t\t\tstd::shared_ptr player = (*creatures)[i]->getPlayer();\n\t\t\t\tif (player && !isInvited(player)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd93eaed973155508008ecae0ec47a24713713b845e2a2be99f2118665b6615f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 245, + "startColumn": 6, + "charOffset": 6796, + "charLength": 10, + "snippet": { + "text": "kickPlayer" + } + }, + "contextRegion": { + "startLine": 243, + "startColumn": 6, + "charOffset": 6684, + "charLength": 10, + "snippet": { + "text": "\t\t\t\tstd::shared_ptr player = (*creatures)[i]->getPlayer();\n\t\t\t\tif (player && !isInvited(player)) {\n\t\t\t\t\tkickPlayer(nullptr, player);\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "290344ae6b9abe58be4ea5fa6317cd17389350b95768b6fc740cbd95aaafcdb5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 259, + "startColumn": 3, + "charOffset": 7008, + "charLength": 15, + "snippet": { + "text": "transferToDepot" + } + }, + "contextRegion": { + "startLine": 257, + "startColumn": 3, + "charOffset": 6924, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr player = g_game().getPlayerByGUID(owner);\n\tif (player) {\n\t\ttransferToDepot(player);\n\t} else {\n\t\tstd::shared_ptr tmpPlayer = std::make_shared(nullptr);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b340eab6c60fb60c0fad1e0c7fd8b9618555f6c8ffbba41073b60502f7011a1a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 266, + "startColumn": 3, + "charOffset": 7196, + "charLength": 15, + "snippet": { + "text": "transferToDepot" + } + }, + "contextRegion": { + "startLine": 264, + "startColumn": 3, + "charOffset": 7189, + "charLength": 15, + "snippet": { + "text": "\t\t}\n\n\t\ttransferToDepot(tmpPlayer);\n\t}\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5283427aefbaa17b55abe69b97543f2e5baad72133fd0a73d6e17edb1a766f65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 271, + "startColumn": 53, + "charOffset": 7296, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 269, + "startColumn": 53, + "charOffset": 7241, + "charLength": 6, + "snippet": { + "text": "}\n\nbool House::transferToDepot(std::shared_ptr player) const {\n\tif (townId == 0 || !player) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc04b9af8f148f93c529d6e60dceae8f6e9233cf8385ce881ad3abc3a887bdfa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 272, + "startColumn": 21, + "charOffset": 7332, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 270, + "startColumn": 21, + "charOffset": 7243, + "charLength": 1, + "snippet": { + "text": "\nbool House::transferToDepot(std::shared_ptr player) const {\n\tif (townId == 0 || !player) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7baa203465fcc82054a06e6def4d10a372d8184c08c18720354786522a60f402" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 275, + "startColumn": 2, + "charOffset": 7363, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 273, + "startColumn": 2, + "charOffset": 7343, + "charLength": 3, + "snippet": { + "text": "\t\treturn false;\n\t}\n\tfor (const std::shared_ptr &tile : houseTiles) {\n\t\tif (!transferToDepot(player, tile)) {\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7bad34ed33baebaaf1e1212ed2f3c7c881ed53a4018180dc597bcd469ff737a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-anyofallof", + "ruleIndex": 735, + "kind": "fail", + "level": "warning", + "message": { + "text": "replace loop by 'std::ranges::all_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 275, + "startColumn": 2, + "charOffset": 7363, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 273, + "startColumn": 2, + "charOffset": 7343, + "charLength": 3, + "snippet": { + "text": "\t\treturn false;\n\t}\n\tfor (const std::shared_ptr &tile : houseTiles) {\n\t\tif (!transferToDepot(player, tile)) {\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc2bf1b6cf51f38d628f5cb2f549b878ca22d179dd7d9d06506124bf857b0313" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 283, + "startColumn": 53, + "charOffset": 7556, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 281, + "startColumn": 53, + "charOffset": 7501, + "charLength": 6, + "snippet": { + "text": "}\n\nbool House::transferToDepot(std::shared_ptr player, std::shared_ptr tile) const {\n\tif (townId == 0 || !player) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19dc3e2097e2cd9ff7eb1991a765ff51a14039fd923d80fc8399d144ce37d7b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 283, + "startColumn": 88, + "charOffset": 7591, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 281, + "startColumn": 88, + "charOffset": 7501, + "charLength": 4, + "snippet": { + "text": "}\n\nbool House::transferToDepot(std::shared_ptr player, std::shared_ptr tile) const {\n\tif (townId == 0 || !player) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b40825664d371a1d11a5a888d786f3fa55786599da356f911c93e2c29d80c05d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 284, + "startColumn": 21, + "charOffset": 7625, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 282, + "startColumn": 21, + "charOffset": 7503, + "charLength": 1, + "snippet": { + "text": "\nbool House::transferToDepot(std::shared_ptr player, std::shared_ptr tile) const {\n\tif (townId == 0 || !player) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23c84a5f706a806f64da24f161ec9d068e27d473d3225ea6ff056d47d14906e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 294, + "startColumn": 3, + "charOffset": 7869, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 292, + "startColumn": 3, + "charOffset": 7785, + "charLength": 3, + "snippet": { + "text": "\tItemList moveItemList;\n\tif (const TileItemVector* items = tile->getItemList()) {\n\t\tfor (const std::shared_ptr &item : *items) {\n\t\t\tif (item->isWrapable()) {\n\t\t\t\thandleWrapableItem(moveItemList, item, player, tile);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04c1ded4360c8515e1a73a21c9d1d6b85e2360b2624b205ddb57a3343daa479f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 307, + "startColumn": 2, + "charOffset": 8220, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 305, + "startColumn": 2, + "charOffset": 8145, + "charLength": 3, + "snippet": { + "text": "\tstd::unordered_set> playersToSave = { player };\n\n\tfor (const std::shared_ptr &item : moveItemList) {\n\t\tg_logger().debug(\"[{}] moving item '{}' to depot\", __FUNCTION__, item->getName());\n\t\tauto targetPlayer = player;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78335cd63ba2e95e7e2b5777d4dba6d17244dfcde2dbc9bf1460825a9b34f46a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 312, + "startColumn": 8, + "charOffset": 8521, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 310, + "startColumn": 8, + "charOffset": 8392, + "charLength": 1, + "snippet": { + "text": "\t\tif (item->hasOwner() && !item->isOwner(targetPlayer)) {\n\t\t\ttargetPlayer = g_game().getPlayerByGUID(item->getOwnerId());\n\t\t\tif (!targetPlayer) {\n\t\t\t\tg_game().internalRemoveItem(item, item->getItemCount());\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3124a8152c9c54cc5287cbad383a77ccdf8fc2e2c915f4a3e01a2e7976ed962e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 313, + "startColumn": 14, + "charOffset": 8551, + "charLength": 18, + "snippet": { + "text": "internalRemoveItem" + } + }, + "contextRegion": { + "startLine": 311, + "startColumn": 14, + "charOffset": 8450, + "charLength": 18, + "snippet": { + "text": "\t\t\ttargetPlayer = g_game().getPlayerByGUID(item->getOwnerId());\n\t\t\tif (!targetPlayer) {\n\t\t\t\tg_game().internalRemoveItem(item, item->getItemCount());\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c8f763ff398fc3d783cb27777aaa8c53bc320f554211309357cbda3b318e57b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 316, + "startColumn": 18, + "charOffset": 8635, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 314, + "startColumn": 18, + "charOffset": 8599, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tplayersToSave.insert(targetPlayer);\n\t\t}\n\t\tg_game().internalMoveItem(item->getParent(), targetPlayer->getInbox(), INDEX_WHEREEVER, item, item->getItemCount(), nullptr, FLAG_NOLIMIT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "111846c257f90ba44e391bc4403e3f17c1b075b4810b31b9fab31465176b35e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 318, + "startColumn": 12, + "charOffset": 8672, + "charLength": 16, + "snippet": { + "text": "internalMoveItem" + } + }, + "contextRegion": { + "startLine": 316, + "startColumn": 12, + "charOffset": 8618, + "charLength": 16, + "snippet": { + "text": "\t\t\tplayersToSave.insert(targetPlayer);\n\t\t}\n\t\tg_game().internalMoveItem(item->getParent(), targetPlayer->getInbox(), INDEX_WHEREEVER, item, item->getItemCount(), nullptr, FLAG_NOLIMIT);\n\t}\n\tfor (const auto &playerToSave : playersToSave) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5b9cf8600039b47c1a11b10ba46c0ee446a5de33f770b3aa0d83641292b070f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 320, + "startColumn": 2, + "charOffset": 8807, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 318, + "startColumn": 2, + "charOffset": 8661, + "charLength": 3, + "snippet": { + "text": "\t\tg_game().internalMoveItem(item->getParent(), targetPlayer->getInbox(), INDEX_WHEREEVER, item, item->getItemCount(), nullptr, FLAG_NOLIMIT);\n\t}\n\tfor (const auto &playerToSave : playersToSave) {\n\t\tg_saveManager().savePlayer(playerToSave);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61d139e0e6bd7cadafc7b0456b4c1e6d0385e0756403ff57b63d785b3a74eadf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 321, + "startColumn": 19, + "charOffset": 8874, + "charLength": 10, + "snippet": { + "text": "savePlayer" + } + }, + "contextRegion": { + "startLine": 319, + "startColumn": 19, + "charOffset": 8803, + "charLength": 10, + "snippet": { + "text": "\t}\n\tfor (const auto &playerToSave : playersToSave) {\n\t\tg_saveManager().savePlayer(playerToSave);\n\t}\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fdee937f4df7d84d251d8683cb6cff5f64dade2b5a3c98dd6808636eb9a9175b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 330, + "startColumn": 4, + "charOffset": 9094, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 328, + "startColumn": 4, + "charOffset": 8981, + "charLength": 3, + "snippet": { + "text": "\tfor (const std::shared_ptr &tile : houseTiles) {\n\t\tif (const auto &items = tile->getItemList()) {\n\t\t\tfor (const std::shared_ptr &item : *items) {\n\t\t\t\tif (!item) {\n\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf8bd1a5a3ed6025cc6a3a7d3234e7f4e346a56d82f79ef9a0a70898ee8765b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 331, + "startColumn": 9, + "charOffset": 9153, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 329, + "startColumn": 9, + "charOffset": 9042, + "charLength": 1, + "snippet": { + "text": "\t\tif (const auto &items = tile->getItemList()) {\n\t\t\tfor (const std::shared_ptr &item : *items) {\n\t\t\t\tif (!item) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ecd0333293a8afdf87435ed2e080d5d7175c5d3616e9477def9922d420ccaa5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'break'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 339, + "startColumn": 7, + "charOffset": 9394, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 337, + "startColumn": 7, + "charOffset": 9237, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\tg_logger().error(\"It is not possible to purchase a house with wrap item inside: id '{}', name '{}'\", item->getID(), item->getName());\n\t\t\t\t\tbreak;\n\t\t\t\t} else if (item->isPickupable()) {\n\t\t\t\t\tfoundItem = true;\n\t\t\t\t\tg_logger().error(\"It is not possible to purchase a house with pickupable item inside: id '{}', name '{}'\", item->getID(), item->getName());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f2f2eb8adc24ef8b0890661b23a1dfa61b29267669876f91e1435b44fe48e8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-6-4", + "ruleIndex": 461, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-6-4: For any iteration statement there shall be no more than one break or goto statement used for loop termination" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 342, + "startColumn": 6, + "charOffset": 9600, + "charLength": 5, + "snippet": { + "text": "break" + } + }, + "contextRegion": { + "startLine": 340, + "startColumn": 6, + "charOffset": 9427, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tfoundItem = true;\n\t\t\t\t\tg_logger().error(\"It is not possible to purchase a house with pickupable item inside: id '{}', name '{}'\", item->getID(), item->getName());\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tif (item->getContainer() && (item->isPickupable() || item->isWrapable())) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "109d5a436b362a4c41ae25fa96e907259ed5b1c3b8bee6b8d55dbd82d3282361" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-6-4", + "ruleIndex": 461, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-6-4: For any iteration statement there shall be no more than one break or goto statement used for loop termination" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 347, + "startColumn": 7, + "charOffset": 9876, + "charLength": 5, + "snippet": { + "text": "break" + } + }, + "contextRegion": { + "startLine": 345, + "startColumn": 7, + "charOffset": 9701, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\t\tfoundItem = true;\n\t\t\t\t\t\tg_logger().error(\"It is not possible to purchase a house with container item inside: id '{}', name '{}'\", item->getID(), item->getName());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8bc85e13270e76c7c1bfb13de2c23849dcdfa27ac68161eb37fb6e37237e89d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 365, + "startColumn": 78, + "charOffset": 10144, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 363, + "startColumn": 78, + "charOffset": 10064, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid House::handleWrapableItem(ItemList &moveItemList, std::shared_ptr item, std::shared_ptr player, std::shared_ptr houseTile) const {\n\tif (item->isWrapContainer()) {\n\t\tg_logger().debug(\"[{}] found wrapable item '{}'\", __FUNCTION__, item->getName());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c11ad739d03e9c9915031f217c2be5dae5467b30560669ef8b43a7f333167513" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 365, + "startColumn": 108, + "charOffset": 10174, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 363, + "startColumn": 108, + "charOffset": 10064, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid House::handleWrapableItem(ItemList &moveItemList, std::shared_ptr item, std::shared_ptr player, std::shared_ptr houseTile) const {\n\tif (item->isWrapContainer()) {\n\t\tg_logger().debug(\"[{}] found wrapable item '{}'\", __FUNCTION__, item->getName());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d429745f1f6e441e4a15124cfcce697ad40d07ebed5705c2f1174a16bbc55e86" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'houseTile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 365, + "startColumn": 143, + "charOffset": 10209, + "charLength": 9, + "snippet": { + "text": "houseTile" + } + }, + "contextRegion": { + "startLine": 363, + "startColumn": 143, + "charOffset": 10064, + "charLength": 9, + "snippet": { + "text": "}\n\nvoid House::handleWrapableItem(ItemList &moveItemList, std::shared_ptr item, std::shared_ptr player, std::shared_ptr houseTile) const {\n\tif (item->isWrapContainer()) {\n\t\tg_logger().debug(\"[{}] found wrapable item '{}'\", __FUNCTION__, item->getName());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd8efb3f04c81243fd5f6a425afa8a8a0d08e01d42d6ac0c7cde20c01fe8d089" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 372, + "startColumn": 30, + "charOffset": 10497, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 370, + "startColumn": 30, + "charOffset": 10386, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr newItem = g_game().wrapItem(item, houseTile->getHouse());\n\tif (newItem->isRemoved() && !newItem->getParent()) {\n\t\tg_logger().warn(\"[{}] item removed during wrapping - check ground type - player name: {} item id: {} position: {}\", __FUNCTION__, player->getName(), item->getID(), houseTile->getPosition().toString());\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f18d7503150616c73d3c6663b9682946c4716652b8ec073a17b6a687b598493" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'handleContainer' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 380, + "startColumn": 13, + "charOffset": 10789, + "charLength": 15, + "snippet": { + "text": "handleContainer" + } + }, + "contextRegion": { + "startLine": 378, + "startColumn": 13, + "charOffset": 10774, + "charLength": 15, + "snippet": { + "text": "}\n\nvoid House::handleContainer(ItemList &moveItemList, std::shared_ptr item) const {\n\tif (const auto container = item->getContainer()) {\n\t\tfor (const std::shared_ptr &containerItem : container->getItemList()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "205112fd980314c90764941f64708f4eaa7d72a4febcd0c5f27ab3356eacfdfe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 380, + "startColumn": 75, + "charOffset": 10851, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 378, + "startColumn": 75, + "charOffset": 10774, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid House::handleContainer(ItemList &moveItemList, std::shared_ptr item) const {\n\tif (const auto container = item->getContainer()) {\n\t\tfor (const std::shared_ptr &containerItem : container->getItemList()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1fe77be546e6eb06768d54cd25f8ef0bdc53b60c6b7684dbeb6f5ed40e5cf8d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 382, + "startColumn": 3, + "charOffset": 10919, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 380, + "startColumn": 3, + "charOffset": 10777, + "charLength": 3, + "snippet": { + "text": "void House::handleContainer(ItemList &moveItemList, std::shared_ptr item) const {\n\tif (const auto container = item->getContainer()) {\n\t\tfor (const std::shared_ptr &containerItem : container->getItemList()) {\n\t\t\tmoveItemList.push_back(containerItem);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d70f05b67f62cc43011fc640c67c6f0c4ee7d0209b52e97b34c5802b37ad924f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 389, + "startColumn": 2, + "charOffset": 11120, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 387, + "startColumn": 2, + "charOffset": 11048, + "charLength": 2, + "snippet": { + "text": "\nbool House::getAccessList(uint32_t listId, std::string &list) const {\n\tif (listId == GUEST_LIST) {\n\t\tguestList.getList(list);\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59caea511648a8fabc3aa85ef8c7a75440f69cf5bf03dc4eadf8c0e7957fc06b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 392, + "startColumn": 4, + "charOffset": 11193, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 390, + "startColumn": 4, + "charOffset": 11148, + "charLength": 4, + "snippet": { + "text": "\t\tguestList.getList(list);\n\t\treturn true;\n\t} else if (listId == SUBOWNER_LIST) {\n\t\tsubOwnerList.getList(list);\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b897aee02a3b5ce0f7a8b597810ad05c58975a295680ae16b89a437e0fccdde" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 398, + "startColumn": 6, + "charOffset": 11338, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 396, + "startColumn": 6, + "charOffset": 11277, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr door = getDoorByNumber(listId);\n\tif (!door) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1144c91d4bc1da4c0c896272dc28608610d45df5567a868e5ada5916e1f60397" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'door' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 405, + "startColumn": 43, + "charOffset": 11447, + "charLength": 4, + "snippet": { + "text": "door" + } + }, + "contextRegion": { + "startLine": 403, + "startColumn": 43, + "charOffset": 11402, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid House::addDoor(std::shared_ptr door) {\n\tdoorList.push_back(door);\n\tdoor->setHouse(static_self_cast());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e2b3cd32b13a7303519eddd9a38ebed2bc90ebd1add23deda287649ca7c4428" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'door' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 411, + "startColumn": 46, + "charOffset": 11600, + "charLength": 4, + "snippet": { + "text": "door" + } + }, + "contextRegion": { + "startLine": 409, + "startColumn": 46, + "charOffset": 11552, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid House::removeDoor(std::shared_ptr door) {\n\tauto it = std::find(doorList.begin(), doorList.end(), door);\n\tif (it != doorList.end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "807f11cd02c7c8301828efeedcec99c4431b5819a4356fb53655c4e66e331b84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 414, + "startColumn": 12, + "charOffset": 11710, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 412, + "startColumn": 12, + "charOffset": 11608, + "charLength": 5, + "snippet": { + "text": "\tauto it = std::find(doorList.begin(), doorList.end(), door);\n\tif (it != doorList.end()) {\n\t\tdoorList.erase(it);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5aa273e0749e04b9c3af87b1efa8ff5e99441150d7e1a769e159be7adcc9361a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'bed' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 418, + "startColumn": 45, + "charOffset": 11771, + "charLength": 3, + "snippet": { + "text": "bed" + } + }, + "contextRegion": { + "startLine": 416, + "startColumn": 45, + "charOffset": 11724, + "charLength": 3, + "snippet": { + "text": "}\n\nvoid House::addBed(std::shared_ptr bed) {\n\tbedsList.push_back(bed);\n\tbed->setHouse(static_self_cast());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd0cf9e1f5277a2b5e94db9bebf2f7763b574b1269dfee394feb1e5367165ca2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'bed' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 423, + "startColumn": 48, + "charOffset": 11897, + "charLength": 3, + "snippet": { + "text": "bed" + } + }, + "contextRegion": { + "startLine": 421, + "startColumn": 48, + "charOffset": 11847, + "charLength": 3, + "snippet": { + "text": "}\n\nvoid House::removeBed(std::shared_ptr bed) {\n\tbed->setHouse(nullptr);\n\tbedsList.remove(bed);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0a0388aa44b7d21a88f527a21c56e6365a4980f245aee77e35d845b481d915a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 425, + "startColumn": 11, + "charOffset": 11939, + "charLength": 6, + "snippet": { + "text": "remove" + } + }, + "contextRegion": { + "startLine": 423, + "startColumn": 11, + "charOffset": 11850, + "charLength": 6, + "snippet": { + "text": "void House::removeBed(std::shared_ptr bed) {\n\tbed->setHouse(nullptr);\n\tbedsList.remove(bed);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1b241334031e78602d9bf1403e74bd982c179d258775dfff523dcd88fdef3c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 429, + "startColumn": 2, + "charOffset": 12026, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 427, + "startColumn": 2, + "charOffset": 11954, + "charLength": 3, + "snippet": { + "text": "\nstd::shared_ptr House::getDoorByNumber(uint32_t doorId) const {\n\tfor (std::shared_ptr door : doorList) {\n\t\tif (door->getDoorId() == doorId) {\n\t\t\treturn door;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "844dc35e7ca7fff07e323b3452044823f898a7d97cd4dc1c7e41a097c1f4d64e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 438, + "startColumn": 2, + "charOffset": 12223, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 436, + "startColumn": 2, + "charOffset": 12151, + "charLength": 3, + "snippet": { + "text": "\nstd::shared_ptr House::getDoorByPosition(const Position &pos) {\n\tfor (std::shared_ptr door : doorList) {\n\t\tif (door->getPosition() == pos) {\n\t\t\treturn door;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42f61d99e46ba89c0404126f92d73ad55522341b5bc4960d7a9302205d6512a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 448, + "startColumn": 3, + "charOffset": 12484, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 446, + "startColumn": 3, + "charOffset": 12348, + "charLength": 4, + "snippet": { + "text": "bool House::canEditAccessList(uint32_t listId, const std::shared_ptr &player) const {\n\tswitch (getHouseAccessLevel(player)) {\n\t\tcase HOUSE_OWNER:\n\t\t\treturn true;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80a980cf74883d4d9de94160dad5b5339bf859d147fa57c272d782dc4cc072a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 451, + "startColumn": 3, + "charOffset": 12521, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 449, + "startColumn": 3, + "charOffset": 12502, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn true;\n\n\t\tcase HOUSE_SUBOWNER:\n\t\t\treturn listId == GUEST_LIST;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a968e9aeaf938284ffbe8d1c12d562bc37046a8e00e6de1eb5de316c1ed6fde" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 454, + "startColumn": 3, + "charOffset": 12577, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 452, + "startColumn": 3, + "charOffset": 12542, + "charLength": 7, + "snippet": { + "text": "\t\t\treturn listId == GUEST_LIST;\n\n\t\tdefault:\n\t\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a2973b4c8f578cbf03ee8618b60f746ab144e94fe8835733259e5d5d94af4b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 479, + "startColumn": 102, + "charOffset": 13260, + "charLength": 5, + "snippet": { + "text": "house" + } + }, + "contextRegion": { + "startLine": 477, + "startColumn": 102, + "charOffset": 13156, + "charLength": 5, + "snippet": { + "text": "}\n\nstd::shared_ptr HouseTransferItem::createHouseTransferItem(std::shared_ptr house) {\n\tstd::shared_ptr transferItem = std::make_shared(house);\n\ttransferItem->setID(ITEM_DOCUMENT_RO);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "121b50dc1c5f60b7fe5954e4284756b75e2ce83afff7c77271ab2a1ebdb322f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 490, + "startColumn": 2, + "charOffset": 13720, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 488, + "startColumn": 2, + "charOffset": 13627, + "charLength": 2, + "snippet": { + "text": "\nvoid HouseTransferItem::onTradeEvent(TradeEvents_t event, std::shared_ptr owner) {\n\tif (event == ON_TRADE_TRANSFER) {\n\t\tif (house) {\n\t\t\tauto isTransferOnRestart = g_configManager().getBoolean(TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART, __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83132ba95294130d5c9cb2e2920df556c2588cd1dc48f9b7ec307b6a81012269" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto ownershipTransferMessage' can be declared as 'const auto *ownershipTransferMessage'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 493, + "startColumn": 4, + "charOffset": 13887, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 491, + "startColumn": 4, + "charOffset": 13754, + "charLength": 4, + "snippet": { + "text": "\t\tif (house) {\n\t\t\tauto isTransferOnRestart = g_configManager().getBoolean(TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART, __FUNCTION__);\n\t\t\tauto ownershipTransferMessage = \" The ownership will be transferred upon server restart.\";\n\t\t\tauto boughtMessage = fmt::format(\"You have successfully bought the house.{}\", isTransferOnRestart ? ownershipTransferMessage : \"\");\n\t\t\tauto soldMessage = fmt::format(\"You have successfully sold your house.{}\", isTransferOnRestart ? ownershipTransferMessage : \"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9be5c301152af770d5e720a0ef741eebfd0657ff5b363718249c05e6f9e93bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 503, + "startColumn": 11, + "charOffset": 14477, + "charLength": 15, + "snippet": { + "text": "executeTransfer" + } + }, + "contextRegion": { + "startLine": 501, + "startColumn": 11, + "charOffset": 14395, + "charLength": 15, + "snippet": { + "text": "\t\t\t\toldOwner->sendTextMessage(MESSAGE_EVENT_ADVANCE, soldMessage);\n\t\t\t}\n\t\t\thouse->executeTransfer(static_self_cast(), owner);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94f693f6287b27baabc522a223bce812c642f6d515a98dbbbed9aa279ae34d33" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 506, + "startColumn": 12, + "charOffset": 14556, + "charLength": 18, + "snippet": { + "text": "internalRemoveItem" + } + }, + "contextRegion": { + "startLine": 504, + "startColumn": 12, + "charOffset": 14540, + "charLength": 18, + "snippet": { + "text": "\t\t}\n\n\t\tg_game().internalRemoveItem(static_self_cast(), 1);\n\t} else if (event == ON_TRADE_CANCEL) {\n\t\tif (house) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a73328ac99eb29030c67cc787d74df3a07d00aab031cd8c27684ab603dcc3d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 514, + "startColumn": 64, + "charOffset": 14777, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 512, + "startColumn": 64, + "charOffset": 14711, + "charLength": 4, + "snippet": { + "text": "}\n\nbool House::executeTransfer(std::shared_ptr item, std::shared_ptr newOwner) {\n\tif (transferItem != item) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e34c2aa292e64431478e1b5a292f3af2582ca923a22337b0e029ab80e1fea40e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'newOwner' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 514, + "startColumn": 94, + "charOffset": 14807, + "charLength": 8, + "snippet": { + "text": "newOwner" + } + }, + "contextRegion": { + "startLine": 512, + "startColumn": 94, + "charOffset": 14711, + "charLength": 8, + "snippet": { + "text": "}\n\nbool House::executeTransfer(std::shared_ptr item, std::shared_ptr newOwner) {\n\tif (transferItem != item) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26f6ef8b7519df7001749c7a7bebd83730961b2803ec25c89bb04df741677e54" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 525, + "startColumn": 19, + "charOffset": 15079, + "charLength": 8, + "snippet": { + "text": "newOwner" + } + }, + "contextRegion": { + "startLine": 523, + "startColumn": 19, + "charOffset": 15056, + "charLength": 8, + "snippet": { + "text": "\t\t}\n\n\t\tsetNewOwnerGuid(newOwner->getGUID(), false);\n\t} else {\n\t\tsetOwner(newOwner->getGUID());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a8fcd5918fd92c4c1e3a7bf311f695830e466093fc2039cf5a8afb266f9336b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 541, + "startColumn": 2, + "charOffset": 15478, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 539, + "startColumn": 2, + "charOffset": 15433, + "charLength": 5, + "snippet": { + "text": "\tstd::ostringstream oss;\n\tstd::string line;\n\twhile (std::getline(iss, line)) {\n\t\tif (!line.empty()) {\n\t\t\toss << line << '\\n';" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6c76c3fa736bdbb3f0b438e60eda008e7b95f304adec9237ea39e946298b326" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'iss' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 541, + "startColumn": 9, + "charOffset": 15485, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 539, + "startColumn": 9, + "charOffset": 15433, + "charLength": 3, + "snippet": { + "text": "\tstd::ostringstream oss;\n\tstd::string line;\n\twhile (std::getline(iss, line)) {\n\t\tif (!line.empty()) {\n\t\t\toss << line << '\\n';" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3709ce5554f60b4b8c18c6d9df6157a9101ee931f90dec2b3175e651c44b4fdd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 556, + "startColumn": 46, + "charOffset": 15765, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 554, + "startColumn": 46, + "charOffset": 15716, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tauto lines = explodeString(validList, \"\\n\", 100);\n\tfor (auto &m_line : lines) {\n\t\ttrimString(m_line);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa4816ca0647a1124ee996fccdc66b6d2a0a087c88808ac4f60a00dcbb3c70a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 557, + "startColumn": 2, + "charOffset": 15772, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 555, + "startColumn": 2, + "charOffset": 15719, + "charLength": 3, + "snippet": { + "text": "\n\tauto lines = explodeString(validList, \"\\n\", 100);\n\tfor (auto &m_line : lines) {\n\t\ttrimString(m_line);\n\t\ttrim_left(m_line, '\\t');" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34b9578b5d0d14b65710989965e8a9ea37a9018a52d56ff6ee8856a26b09fbfd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 563, + "startColumn": 68, + "charOffset": 15968, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 561, + "startColumn": 68, + "charOffset": 15878, + "charLength": 3, + "snippet": { + "text": "\t\ttrimString(m_line);\n\n\t\tif (m_line.empty() || m_line.front() == '#' || m_line.length() > 100) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33c16f02a06ce859581b18a25c6bdc649208db1a429f95c20bed94ccb3b91f90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 570, + "startColumn": 3, + "charOffset": 16077, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 568, + "startColumn": 3, + "charOffset": 16022, + "charLength": 2, + "snippet": { + "text": "\n\t\tstd::string::size_type at_pos = m_line.find('@');\n\t\tif (at_pos != std::string::npos) {\n\t\t\tif (at_pos == 0) {\n\t\t\t\taddGuild(m_line.substr(1));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9a2ef3958ca4c42b53bfd53e570901aa7e4a2bd960fd8b163d72292e32bb1eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 590, + "startColumn": 14, + "charOffset": 16718, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 588, + "startColumn": 14, + "charOffset": 16624, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr player = g_game().getPlayerByName(name);\n\tif (player) {\n\t\tplayerList.insert(player->getGUID());\n\t} else {\n\t\tuint32_t guid = IOLoginData::getGuidByName(name);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a3390f911431f5a9769048a895aa0a1a11c5049d1ff0d223b26c29ef95796d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 594, + "startColumn": 15, + "charOffset": 16840, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 592, + "startColumn": 15, + "charOffset": 16755, + "charLength": 6, + "snippet": { + "text": "\t\tuint32_t guid = IOLoginData::getGuidByName(name);\n\t\tif (guid != 0) {\n\t\t\tplayerList.insert(guid);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3bbab0803a1c1f68ce0e21f4c5ce2c0a97a2d9968cac413a80d959fe6aef997a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-namespace-comments", + "ruleIndex": 544, + "kind": "fail", + "level": "warning", + "message": { + "text": "anonymous namespace not terminated with a closing comment" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 613, + "startColumn": 1, + "charOffset": 17163, + "charLength": 1, + "snippet": { + "text": "}" + } + }, + "contextRegion": { + "startLine": 611, + "startColumn": 1, + "charOffset": 17122, + "charLength": 1, + "snippet": { + "text": "\t\treturn IOGuild::loadGuild(guildId);\n\t}\n}\n\nvoid AccessList::addGuild(const std::string &name) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb2e0ddab0c276bbddf2ba5417a0018900ffc190f2bf524b579197af196e0f69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 618, + "startColumn": 3, + "charOffset": 17277, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 616, + "startColumn": 3, + "charOffset": 17219, + "charLength": 3, + "snippet": { + "text": "\tconst auto guild = getGuildByName(name);\n\tif (guild) {\n\t\tfor (const auto &rank : guild->getRanks()) {\n\t\t\tguildRankList.insert(rank->id);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "086b04e2d50a041f149e7fa7f093712901414736cd11d4aff8891403ef779ded" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 619, + "startColumn": 18, + "charOffset": 17339, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 617, + "startColumn": 18, + "charOffset": 17261, + "charLength": 6, + "snippet": { + "text": "\tif (guild) {\n\t\tfor (const auto &rank : guild->getRanks()) {\n\t\t\tguildRankList.insert(rank->id);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "111846c257f90ba44e391bc4403e3f17c1b075b4810b31b9fab31465176b35e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'addGuildRank' of similar type ('const std::string &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 624, + "startColumn": 31, + "charOffset": 17397, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 622, + "startColumn": 31, + "charOffset": 17364, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid AccessList::addGuildRank(const std::string &name, const std::string &guildName) {\n\tconst auto guild = getGuildByName(guildName);\n\tif (guild) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e0fe2a223a086ab722fe9af0fd775ab8b74b7cf31251fc4d5fa22591460e1a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 629, + "startColumn": 18, + "charOffset": 17603, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 627, + "startColumn": 18, + "charOffset": 17515, + "charLength": 6, + "snippet": { + "text": "\t\tconst GuildRank_ptr rank = guild->getRankByName(name);\n\t\tif (rank) {\n\t\t\tguildRankList.insert(rank->id);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc30283dadb1c8bbcc676ba013a276182cd5e1cd916b37053f3da028ae94fdc2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 634, + "startColumn": 51, + "charOffset": 17681, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 632, + "startColumn": 51, + "charOffset": 17628, + "charLength": 6, + "snippet": { + "text": "}\n\nbool AccessList::isInList(std::shared_ptr player) const {\n\tif (allowEveryone) {\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "616da0ce0d73d8129dcc4589ac280d8960b545738c3af8fd0468d83e44fef702" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'doorId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 656, + "startColumn": 11, + "charOffset": 18144, + "charLength": 6, + "snippet": { + "text": "doorId" + } + }, + "contextRegion": { + "startLine": 654, + "startColumn": 11, + "charOffset": 18027, + "charLength": 6, + "snippet": { + "text": "Attr_ReadValue Door::readAttr(AttrTypes_t attr, PropStream &propStream) {\n\tif (attr == ATTR_HOUSEDOORID) {\n\t\tuint8_t doorId;\n\t\tif (!propStream.read(doorId)) {\n\t\t\treturn ATTR_READ_ERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7fd505c0264029a0e6ad3f87585f744714df8b11e761632507082f3bfea5adf7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 674, + "startColumn": 6, + "charOffset": 18467, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 672, + "startColumn": 6, + "charOffset": 18425, + "charLength": 1, + "snippet": { + "text": "\tthis->house = std::move(newHouse);\n\n\tif (!accessList) {\n\t\taccessList = std::make_unique();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b85c33a3a323d11d607e1d05af7409af541e8e0ed2a3c2b8cb175bbc7b833239" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 679, + "startColumn": 43, + "charOffset": 18577, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 677, + "startColumn": 43, + "charOffset": 18532, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Door::canUse(std::shared_ptr player) const {\n\tif (!house) {\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe5a7373691c695a57a9555e0ca48bba40a858732d5e2fd324495ad69b54f786" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 680, + "startColumn": 6, + "charOffset": 18598, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 678, + "startColumn": 6, + "charOffset": 18534, + "charLength": 1, + "snippet": { + "text": "\nbool Door::canUse(std::shared_ptr player) const {\n\tif (!house) {\n\t\treturn true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c5de2ba78f27d94ebeb455e70ef9336d253ba59d58db5e5fd994df423acde32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 692, + "startColumn": 6, + "charOffset": 18809, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 690, + "startColumn": 6, + "charOffset": 18747, + "charLength": 1, + "snippet": { + "text": "\nvoid Door::setAccessList(const std::string &textlist) {\n\tif (!accessList) {\n\t\taccessList = std::make_unique();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b3c0f77d38dd9fc4610726274893e14d7e3ab9d9f950cf21f4570b330856823" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 700, + "startColumn": 6, + "charOffset": 18969, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 698, + "startColumn": 6, + "charOffset": 18911, + "charLength": 1, + "snippet": { + "text": "\nbool Door::getAccessList(std::string &list) const {\n\tif (!house) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e00d5f69a13fcfcfad9e1af8c4703f409354c329ca7c00978bdebf6d1dcd8dff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 717, + "startColumn": 2, + "charOffset": 19229, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 715, + "startColumn": 2, + "charOffset": 19156, + "charLength": 3, + "snippet": { + "text": "\nstd::shared_ptr Houses::getHouseByPlayerId(uint32_t playerId) {\n\tfor (const auto &it : houseMap) {\n\t\tif (it.second->getOwner() == playerId) {\n\t\t\treturn it.second;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "037ffb72b9680abc23d0ba4d474497f10f572e22ae07663c095a0f91928074eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 728, + "startColumn": 6, + "charOffset": 19508, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 726, + "startColumn": 6, + "charOffset": 19412, + "charLength": 1, + "snippet": { + "text": "\tpugi::xml_document doc;\n\tpugi::xml_parse_result result = doc.load_file(filename.c_str());\n\tif (!result) {\n\t\tprintXMLError(__FUNCTION__, filename, result);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4abde6317dc44da46f7ba0af5df72f29f8bbdb02a344e044c1d689bea7dc2f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 733, + "startColumn": 2, + "charOffset": 19589, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 731, + "startColumn": 2, + "charOffset": 19584, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (auto houseNode : doc.child(\"houses\").children()) {\n\t\tpugi::xml_attribute houseIdAttribute = houseNode.attribute(\"houseid\");\n\t\tif (!houseIdAttribute) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5cf8049ba2ceeebeb42d58ee5565d495a5123010331fd6cff51de9e281cc7fd7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 735, + "startColumn": 7, + "charOffset": 19724, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 733, + "startColumn": 7, + "charOffset": 19588, + "charLength": 1, + "snippet": { + "text": "\tfor (auto houseNode : doc.child(\"houses\").children()) {\n\t\tpugi::xml_attribute houseIdAttribute = houseNode.attribute(\"houseid\");\n\t\tif (!houseIdAttribute) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e59cfd11fd44edd62364acbdc233386716436ccb24974704e0f312e89e03f5f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 739, + "startColumn": 3, + "charOffset": 19769, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 737, + "startColumn": 3, + "charOffset": 19762, + "charLength": 7, + "snippet": { + "text": "\t\t}\n\n\t\tint32_t houseId = pugi::cast(houseIdAttribute.value());\n\n\t\tstd::shared_ptr house = getHouse(houseId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b8d902b68df02cc7b2fe48a3ccb95d76ad4d1455e600e815da4398c66f8956e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 742, + "startColumn": 7, + "charOffset": 19893, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 740, + "startColumn": 7, + "charOffset": 19834, + "charLength": 1, + "snippet": { + "text": "\n\t\tstd::shared_ptr house = getHouse(houseId);\n\t\tif (!house) {\n\t\t\tg_logger().error(\"[Houses::loadHousesXML] - Unknown house, id: {}\", houseId);\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5712086b8aa65a4e20bdb08465edf6675be676687ee83aef36ab0f4083bfc158" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 752, + "startColumn": 4, + "charOffset": 20218, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 750, + "startColumn": 4, + "charOffset": 20087, + "charLength": 4, + "snippet": { + "text": "\t\t\tpugi::cast(houseNode.attribute(\"entryx\").value()),\n\t\t\tpugi::cast(houseNode.attribute(\"entryy\").value()),\n\t\t\tpugi::cast(houseNode.attribute(\"entryz\").value())\n\t\t);\n\t\tif (entryPos.x == 0 && entryPos.y == 0 && entryPos.z == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "788c68e1877acb6af9a225eaf5b6b8a58973f4b342fbf0605bbe88b6a407da7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'payHouses' has cognitive complexity of 34 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 776, + "startColumn": 14, + "charOffset": 21036, + "charLength": 9, + "snippet": { + "text": "payHouses" + } + }, + "contextRegion": { + "startLine": 774, + "startColumn": 14, + "charOffset": 21020, + "charLength": 9, + "snippet": { + "text": "}\n\nvoid Houses::payHouses(RentPeriod_t rentPeriod) const {\n\tif (rentPeriod == RENTPERIOD_NEVER) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6fc03851bfde062d4838ed558f5e3f958cd0952472e09cc743e24574dd8e22cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 781, + "startColumn": 23, + "charOffset": 21154, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 779, + "startColumn": 23, + "charOffset": 21128, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\ttime_t currentTime = time(nullptr);\n\tfor (const auto &it : houseMap) {\n\t\tstd::shared_ptr house = it.second;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e687260d84bae1cb4159372e681efb17c960977483c0f228ff56df101d76c4f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 782, + "startColumn": 2, + "charOffset": 21170, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 780, + "startColumn": 2, + "charOffset": 21131, + "charLength": 3, + "snippet": { + "text": "\n\ttime_t currentTime = time(nullptr);\n\tfor (const auto &it : houseMap) {\n\t\tstd::shared_ptr house = it.second;\n\t\tif (house->getOwner() == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbae26700b5d1307160804dc0f1aa882e7667a865850d67adba0192c36dc783c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 790, + "startColumn": 7, + "charOffset": 21419, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 788, + "startColumn": 7, + "charOffset": 21298, + "charLength": 1, + "snippet": { + "text": "\t\tconst uint32_t ownerId = house->getOwner();\n\t\tconst auto &town = g_game().map.towns.getTown(house->getTownId());\n\t\tif (!town) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "613fd624e41c212a8cf5dd5b2aff8a05bfad5aaf207bd3b51d0d8b0b5ac31191" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 795, + "startColumn": 7, + "charOffset": 21509, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 793, + "startColumn": 7, + "charOffset": 21445, + "charLength": 1, + "snippet": { + "text": "\n\t\tauto player = g_game().getPlayerByGUID(ownerId, true);\n\t\tif (!player) {\n\t\t\t// Player doesn't exist, reset house owner\n\t\t\thouse->tryTransferOwnership(nullptr, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6691d076b4b1b85313d6e5ef1091373648c224a9f6d02071961a6d00ddc6203" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 797, + "startColumn": 11, + "charOffset": 21576, + "charLength": 20, + "snippet": { + "text": "tryTransferOwnership" + } + }, + "contextRegion": { + "startLine": 795, + "startColumn": 11, + "charOffset": 21503, + "charLength": 20, + "snippet": { + "text": "\t\tif (!player) {\n\t\t\t// Player doesn't exist, reset house owner\n\t\t\thouse->tryTransferOwnership(nullptr, true);\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8328bb68b6063d5ea2224ba2ec299e5eabaca0e33d3277bd13efca6a3ff37dc4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'time_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 804, + "startColumn": 77, + "charOffset": 21885, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 802, + "startColumn": 77, + "charOffset": 21691, + "charLength": 2, + "snippet": { + "text": "\t\tauto daysToReset = g_configManager().getNumber(HOUSE_LOSE_AFTER_INACTIVITY, __FUNCTION__);\n\t\tif (daysToReset > 0) {\n\t\t\tauto daysSinceLastLogin = (currentTime - player->getLastLoginSaved()) / (60 * 60 * 24);\n\t\t\tbool vipKeep = g_configManager().getBoolean(VIP_KEEP_HOUSE, __FUNCTION__) && player->isVip();\n\t\t\tbool activityKeep = daysSinceLastLogin < daysToReset;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d1602a833b86901dcbbc1b250756a204b62067c78a6fad926b1c06dbbb39353" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 804, + "startColumn": 77, + "charOffset": 21885, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 802, + "startColumn": 77, + "charOffset": 21691, + "charLength": 2, + "snippet": { + "text": "\t\tauto daysToReset = g_configManager().getNumber(HOUSE_LOSE_AFTER_INACTIVITY, __FUNCTION__);\n\t\tif (daysToReset > 0) {\n\t\t\tauto daysSinceLastLogin = (currentTime - player->getLastLoginSaved()) / (60 * 60 * 24);\n\t\t\tbool vipKeep = g_configManager().getBoolean(VIP_KEEP_HOUSE, __FUNCTION__) && player->isVip();\n\t\t\tbool activityKeep = daysSinceLastLogin < daysToReset;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75d0c3b2f47e62a75d7304d679a55cf8b6abac2e4a659f5d997a9e23e2d3c927" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 804, + "startColumn": 82, + "charOffset": 21890, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 802, + "startColumn": 82, + "charOffset": 21691, + "charLength": 2, + "snippet": { + "text": "\t\tauto daysToReset = g_configManager().getNumber(HOUSE_LOSE_AFTER_INACTIVITY, __FUNCTION__);\n\t\tif (daysToReset > 0) {\n\t\t\tauto daysSinceLastLogin = (currentTime - player->getLastLoginSaved()) / (60 * 60 * 24);\n\t\t\tbool vipKeep = g_configManager().getBoolean(VIP_KEEP_HOUSE, __FUNCTION__) && player->isVip();\n\t\t\tbool activityKeep = daysSinceLastLogin < daysToReset;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "236cdc6333c740c603df11d7c7421dc5bbc93c11ac52ee0ef57da615b862a016" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 804, + "startColumn": 87, + "charOffset": 21895, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 802, + "startColumn": 87, + "charOffset": 21691, + "charLength": 2, + "snippet": { + "text": "\t\tauto daysToReset = g_configManager().getNumber(HOUSE_LOSE_AFTER_INACTIVITY, __FUNCTION__);\n\t\tif (daysToReset > 0) {\n\t\t\tauto daysSinceLastLogin = (currentTime - player->getLastLoginSaved()) / (60 * 60 * 24);\n\t\t\tbool vipKeep = g_configManager().getBoolean(VIP_KEEP_HOUSE, __FUNCTION__) && player->isVip();\n\t\t\tbool activityKeep = daysSinceLastLogin < daysToReset;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0bf3aa432fefc22af0269a6657bc4da2f2e9a0070197cd84b691a64dce4b1df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 807, + "startColumn": 4, + "charOffset": 22057, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 805, + "startColumn": 4, + "charOffset": 21900, + "charLength": 2, + "snippet": { + "text": "\t\t\tbool vipKeep = g_configManager().getBoolean(VIP_KEEP_HOUSE, __FUNCTION__) && player->isVip();\n\t\t\tbool activityKeep = daysSinceLastLogin < daysToReset;\n\t\t\tif (vipKeep && !activityKeep) {\n\t\t\t\tg_logger().info(\"Player {} has not logged in for {} days, but is a VIP, so the house will not be reset.\", player->getName(), daysToReset);\n\t\t\t} else if (!vipKeep && !activityKeep) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7bef962fb9365b67e8f1f8a5eb7cbb97a05883b1e00e0a2d2e71e58bf1b650df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 812, + "startColumn": 21, + "charOffset": 22458, + "charLength": 10, + "snippet": { + "text": "savePlayer" + } + }, + "contextRegion": { + "startLine": 810, + "startColumn": 21, + "charOffset": 22275, + "charLength": 10, + "snippet": { + "text": "\t\t\t\tg_logger().info(\"Player {} has not logged in for {} days, so the house will be reset.\", player->getName(), daysToReset);\n\t\t\t\thouse->setOwner(0, true, player);\n\t\t\t\tg_saveManager().savePlayer(player);\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b170e23f6d712e324413d50254fc5fbe0291f0530d65dd90622749f2466148e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 823, + "startColumn": 13, + "charOffset": 22674, + "charLength": 11, + "snippet": { + "text": "removeMoney" + } + }, + "contextRegion": { + "startLine": 821, + "startColumn": 13, + "charOffset": 22619, + "charLength": 11, + "snippet": { + "text": "\n\t\tif (player->getBankBalance() >= rent) {\n\t\t\tg_game().removeMoney(player, rent, 0, true);\n\t\t\tg_metrics().addCounter(\"balance_decrease\", rent, { { \"player\", player->getName() }, { \"context\", \"house_rent\" } });\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8741aedc54c0913674ba86bb441bd2d24b4985510f9ac8c50c9dd66af44918f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 824, + "startColumn": 47, + "charOffset": 22756, + "charLength": 4, + "snippet": { + "text": "rent" + } + }, + "contextRegion": { + "startLine": 822, + "startColumn": 47, + "charOffset": 22620, + "charLength": 4, + "snippet": { + "text": "\t\tif (player->getBankBalance() >= rent) {\n\t\t\tg_game().removeMoney(player, rent, 0, true);\n\t\t\tg_metrics().addCounter(\"balance_decrease\", rent, { { \"player\", player->getName() }, { \"context\", \"house_rent\" } });\n\n\t\t\ttime_t paidUntil = currentTime;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f369576e250f7425935a814093388749dcdf6a43522a29ed7691fda9a3168e03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'time_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 829, + "startColumn": 19, + "charOffset": 22935, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 827, + "startColumn": 19, + "charOffset": 22865, + "charLength": 2, + "snippet": { + "text": "\t\t\tswitch (rentPeriod) {\n\t\t\t\tcase RENTPERIOD_DAILY:\n\t\t\t\t\tpaidUntil += 24 * 60 * 60;\n\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_WEEKLY:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9630c544fc0ec16225960cdf7483bb442733473c828ba87acf90e41bea74fe89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 829, + "startColumn": 19, + "charOffset": 22935, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 827, + "startColumn": 19, + "charOffset": 22865, + "charLength": 2, + "snippet": { + "text": "\t\t\tswitch (rentPeriod) {\n\t\t\t\tcase RENTPERIOD_DAILY:\n\t\t\t\t\tpaidUntil += 24 * 60 * 60;\n\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_WEEKLY:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "812d8d2b1bce9cca4c0aee3e75a18052ec379228d70341560beecf939d4010e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 829, + "startColumn": 24, + "charOffset": 22940, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 827, + "startColumn": 24, + "charOffset": 22865, + "charLength": 2, + "snippet": { + "text": "\t\t\tswitch (rentPeriod) {\n\t\t\t\tcase RENTPERIOD_DAILY:\n\t\t\t\t\tpaidUntil += 24 * 60 * 60;\n\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_WEEKLY:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70378ae5704297d93ebd195fe195183ad87b484e9744b217eeba938e0afefa59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 829, + "startColumn": 29, + "charOffset": 22945, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 827, + "startColumn": 29, + "charOffset": 22865, + "charLength": 2, + "snippet": { + "text": "\t\t\tswitch (rentPeriod) {\n\t\t\t\tcase RENTPERIOD_DAILY:\n\t\t\t\t\tpaidUntil += 24 * 60 * 60;\n\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_WEEKLY:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "730bd4be74a3095f93a5e9295b7e166cc97742492ca86759af9d00d12b09e962" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'time_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 832, + "startColumn": 19, + "charOffset": 23007, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 830, + "startColumn": 19, + "charOffset": 22949, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_WEEKLY:\n\t\t\t\t\tpaidUntil += 24 * 60 * 60 * 7;\n\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_MONTHLY:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d9f14da16c54a738b9dc331c94cea1e1e022c1a73c863bf83986860be83d2ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 832, + "startColumn": 19, + "charOffset": 23007, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 830, + "startColumn": 19, + "charOffset": 22949, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_WEEKLY:\n\t\t\t\t\tpaidUntil += 24 * 60 * 60 * 7;\n\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_MONTHLY:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a84fb0c0a9e977b982bdbe573efe55414f479ab70cd793f585f9d8ec5dc6e6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 832, + "startColumn": 24, + "charOffset": 23012, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 830, + "startColumn": 24, + "charOffset": 22949, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_WEEKLY:\n\t\t\t\t\tpaidUntil += 24 * 60 * 60 * 7;\n\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_MONTHLY:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b2e312c45d1cdf8daf3ba6eb3ffa13252202ef717c89d7ec3a62f95c7258bb0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 832, + "startColumn": 29, + "charOffset": 23017, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 830, + "startColumn": 29, + "charOffset": 22949, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_WEEKLY:\n\t\t\t\t\tpaidUntil += 24 * 60 * 60 * 7;\n\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_MONTHLY:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a2b4c0252622a1d1b524b01d3975fb5c5e0b2ca8ab04e565d032b0e9498c3fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 832, + "startColumn": 34, + "charOffset": 23022, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 830, + "startColumn": 34, + "charOffset": 22949, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_WEEKLY:\n\t\t\t\t\tpaidUntil += 24 * 60 * 60 * 7;\n\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_MONTHLY:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dab3ffb5a84fdbe6e5735df8ddd7825fcff2e052fb28faf58ed99dd3172e3863" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'time_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 835, + "startColumn": 19, + "charOffset": 23084, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 833, + "startColumn": 19, + "charOffset": 23025, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_MONTHLY:\n\t\t\t\t\tpaidUntil += 24 * 60 * 60 * 30;\n\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_YEARLY:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8a666e69eedf0649070c04e124b06b9000c1d4d36cdc9990ee4019f60b76822" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 835, + "startColumn": 19, + "charOffset": 23084, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 833, + "startColumn": 19, + "charOffset": 23025, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_MONTHLY:\n\t\t\t\t\tpaidUntil += 24 * 60 * 60 * 30;\n\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_YEARLY:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b678d426c04a4a64e40b481b4ada1dbe441f7fbe59ea3d28b26e45b1bab9f5e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 835, + "startColumn": 24, + "charOffset": 23089, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 833, + "startColumn": 24, + "charOffset": 23025, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_MONTHLY:\n\t\t\t\t\tpaidUntil += 24 * 60 * 60 * 30;\n\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_YEARLY:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fac8a81957dc69137494a49758d59ba505fcf70f7e2933f3bb0f00381948de53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 835, + "startColumn": 29, + "charOffset": 23094, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 833, + "startColumn": 29, + "charOffset": 23025, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_MONTHLY:\n\t\t\t\t\tpaidUntil += 24 * 60 * 60 * 30;\n\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_YEARLY:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b70ebbecb41abede83418222e6a1a122df2e83e25169b4c0f8488739f3b3016" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 835, + "startColumn": 34, + "charOffset": 23099, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 833, + "startColumn": 34, + "charOffset": 23025, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_MONTHLY:\n\t\t\t\t\tpaidUntil += 24 * 60 * 60 * 30;\n\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_YEARLY:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5bc605b7b4292746ae0a0332e8e437b55434eec8d4c4d28d8aa99f82f4845208" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'time_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 838, + "startColumn": 19, + "charOffset": 23161, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 836, + "startColumn": 19, + "charOffset": 23103, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_YEARLY:\n\t\t\t\t\tpaidUntil += 24 * 60 * 60 * 365;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d40276b0f08fd4a21a1f26511c2861af8d964a8dc5037feab73da90fe596107" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 838, + "startColumn": 19, + "charOffset": 23161, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 836, + "startColumn": 19, + "charOffset": 23103, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_YEARLY:\n\t\t\t\t\tpaidUntil += 24 * 60 * 60 * 365;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0db01923fdfd5b209c88f0ff95ee9057bd496c7b2d0c208c09ef10b08a73887" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 838, + "startColumn": 24, + "charOffset": 23166, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 836, + "startColumn": 24, + "charOffset": 23103, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_YEARLY:\n\t\t\t\t\tpaidUntil += 24 * 60 * 60 * 365;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1baed2d3cadc940e9b11539f08e8a36f91ff95c1c7666f1e27fa7f2de676318f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 838, + "startColumn": 29, + "charOffset": 23171, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 836, + "startColumn": 29, + "charOffset": 23103, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_YEARLY:\n\t\t\t\t\tpaidUntil += 24 * 60 * 60 * 365;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9894d5dd01798b0593db410e573db0e5574b3343cd5afc9e61dc88db59188368" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "365 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 838, + "startColumn": 34, + "charOffset": 23176, + "charLength": 3, + "snippet": { + "text": "365" + } + }, + "contextRegion": { + "startLine": 836, + "startColumn": 34, + "charOffset": 23103, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase RENTPERIOD_YEARLY:\n\t\t\t\t\tpaidUntil += 24 * 60 * 60 * 365;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "940998b0eb67a285b6d3292b158f1f44d9ee4184c072f0884b25d054e5b32451" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 846, + "startColumn": 38, + "charOffset": 23307, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 844, + "startColumn": 38, + "charOffset": 23224, + "charLength": 1, + "snippet": { + "text": "\t\t\thouse->setPaidUntil(paidUntil);\n\t\t} else {\n\t\t\tif (house->getPayRentWarnings() < 7) {\n\t\t\t\tint32_t daysLeft = 7 - house->getPayRentWarnings();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88e3e89d0a9e3264b6061555a375999ba408010484102238dfe82c12b328edba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 847, + "startColumn": 24, + "charOffset": 23335, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 845, + "startColumn": 24, + "charOffset": 23259, + "charLength": 1, + "snippet": { + "text": "\t\t} else {\n\t\t\tif (house->getPayRentWarnings() < 7) {\n\t\t\t\tint32_t daysLeft = 7 - house->getPayRentWarnings();\n\n\t\t\t\tstd::shared_ptr letter = Item::CreateItem(ITEM_LETTER_STAMPED);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27793b09f0832ad2e008a05f4825a45759d7c20f8ed71480f00852eadbd0d5c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 847, + "startColumn": 24, + "charOffset": 23335, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 845, + "startColumn": 24, + "charOffset": 23259, + "charLength": 1, + "snippet": { + "text": "\t\t} else {\n\t\t\tif (house->getPayRentWarnings() < 7) {\n\t\t\t\tint32_t daysLeft = 7 - house->getPayRentWarnings();\n\n\t\t\t\tstd::shared_ptr letter = Item::CreateItem(ITEM_LETTER_STAMPED);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b17b9ede5832c85e1c810a6af5f4d54a7a2a7faca2814c8ada16c003c971de54" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 876, + "startColumn": 14, + "charOffset": 24143, + "charLength": 15, + "snippet": { + "text": "internalAddItem" + } + }, + "contextRegion": { + "startLine": 874, + "startColumn": 14, + "charOffset": 23827, + "charLength": 15, + "snippet": { + "text": "\t\t\t\tss << \"Warning! \\nThe \" << period << \" rent of \" << house->getRent() << \" gold for your house \\\"\" << house->getName() << \"\\\" is payable. Have it within \" << daysLeft << \" days or you will lose static_self_cast() house.\";\n\t\t\t\tletter->setAttribute(ItemAttribute_t::TEXT, ss.str());\n\t\t\t\tg_game().internalAddItem(player->getInbox(), letter, INDEX_WHEREEVER, FLAG_NOLIMIT);\n\t\t\t\thouse->setPayRentWarnings(house->getPayRentWarnings() + 1);\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "987782904cd5430ac8ea7ae3d081e41faa2d96c220c505755ef2f349f03b7411" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.cpp" + }, + "region": { + "startLine": 883, + "startColumn": 19, + "charOffset": 24361, + "charLength": 10, + "snippet": { + "text": "savePlayer" + } + }, + "contextRegion": { + "startLine": 881, + "startColumn": 19, + "charOffset": 24338, + "charLength": 10, + "snippet": { + "text": "\t\t}\n\n\t\tg_saveManager().savePlayer(player);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2d21f2d2c426c9fad5ae99258a32e828e71bf11648e2c77076085c0b2c72f9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'AccessList::addGuildRank' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.hpp", + "index": 1 + }, + "region": { + "startLine": 26, + "startColumn": 7, + "charOffset": 730, + "charLength": 12, + "snippet": { + "text": "addGuildRank" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 7, + "charOffset": 641, + "charLength": 12, + "snippet": { + "text": "\tvoid addPlayer(const std::string &name);\n\tvoid addGuild(const std::string &name);\n\tvoid addGuildRank(const std::string &name, const std::string &rankName);\n\n\tbool isInList(std::shared_ptr player) const;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ec66a933e4e7574c0db6d539515a1288b12b99947284f4f3fd5726466d67cb6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'House::executeTransfer' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/house.hpp", + "index": 1 + }, + "region": { + "startLine": 202, + "startColumn": 7, + "charOffset": 5599, + "charLength": 15, + "snippet": { + "text": "executeTransfer" + } + }, + "contextRegion": { + "startLine": 200, + "startColumn": 7, + "charOffset": 5511, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr getTransferItem();\n\tvoid resetTransferItem();\n\tbool executeTransfer(std::shared_ptr item, std::shared_ptr player);\n\n\tconst HouseTileList &getTiles() const {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa6edcbc67c513725cd1aae8064c50f67916b6119560704449095885b6c426da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-pass-by-value", + "ruleIndex": 624, + "kind": "fail", + "level": "warning", + "message": { + "text": "pass by value and use std::move" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.cpp" + }, + "region": { + "startLine": 18, + "startColumn": 67, + "charOffset": 617, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 16, + "startColumn": 67, + "charOffset": 525, + "charLength": 3, + "snippet": { + "text": "#include \"game/game.hpp\"\n\nHouseTile::HouseTile(int32_t initX, int32_t initY, int32_t initZ, std::shared_ptr initHouse) :\n\tDynamicTile(initX, initY, initZ), house(initHouse) { }\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "094311b4fcb72e427605fba966a2e5bc846989f2191f7d769ebd71a7d6cc3e0a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.cpp" + }, + "region": { + "startLine": 19, + "startColumn": 14, + "charOffset": 666, + "charLength": 5, + "snippet": { + "text": "initX" + } + }, + "contextRegion": { + "startLine": 17, + "startColumn": 14, + "charOffset": 550, + "charLength": 5, + "snippet": { + "text": "\nHouseTile::HouseTile(int32_t initX, int32_t initY, int32_t initZ, std::shared_ptr initHouse) :\n\tDynamicTile(initX, initY, initZ), house(initHouse) { }\n\nvoid HouseTile::addThing(int32_t index, std::shared_ptr thing) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a80d601031d17920280973a5f0f584ccc094a32f601822851703045894740f25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.cpp" + }, + "region": { + "startLine": 19, + "startColumn": 21, + "charOffset": 673, + "charLength": 5, + "snippet": { + "text": "initY" + } + }, + "contextRegion": { + "startLine": 17, + "startColumn": 21, + "charOffset": 550, + "charLength": 5, + "snippet": { + "text": "\nHouseTile::HouseTile(int32_t initX, int32_t initY, int32_t initZ, std::shared_ptr initHouse) :\n\tDynamicTile(initX, initY, initZ), house(initHouse) { }\n\nvoid HouseTile::addThing(int32_t index, std::shared_ptr thing) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf47eb1ddbe8ea24658632b3331aa406f73767d072efe4da00b55ffa643253e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.cpp" + }, + "region": { + "startLine": 19, + "startColumn": 28, + "charOffset": 680, + "charLength": 5, + "snippet": { + "text": "initZ" + } + }, + "contextRegion": { + "startLine": 17, + "startColumn": 28, + "charOffset": 550, + "charLength": 5, + "snippet": { + "text": "\nHouseTile::HouseTile(int32_t initX, int32_t initY, int32_t initZ, std::shared_ptr initHouse) :\n\tDynamicTile(initX, initY, initZ), house(initHouse) { }\n\nvoid HouseTile::addThing(int32_t index, std::shared_ptr thing) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6bdcc6178a11cbc537a630c2fa85736d6ab2ae6b38cb76e54f0284111ac82c0e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'initHouse' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.cpp" + }, + "region": { + "startLine": 19, + "startColumn": 42, + "charOffset": 694, + "charLength": 9, + "snippet": { + "text": "initHouse" + } + }, + "contextRegion": { + "startLine": 17, + "startColumn": 42, + "charOffset": 550, + "charLength": 9, + "snippet": { + "text": "\nHouseTile::HouseTile(int32_t initX, int32_t initY, int32_t initZ, std::shared_ptr initHouse) :\n\tDynamicTile(initX, initY, initZ), house(initHouse) { }\n\nvoid HouseTile::addThing(int32_t index, std::shared_ptr thing) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b00269e1af505e47d84da50708f4e8d8e9d5b508e554cd9b540e71b9ccb45373" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.cpp" + }, + "region": { + "startLine": 24, + "startColumn": 6, + "charOffset": 819, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 22, + "startColumn": 6, + "charOffset": 782, + "charLength": 1, + "snippet": { + "text": "\tTile::addThing(index, thing);\n\n\tif (!thing || !thing->getParent()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d02ea08d236f30065115ae399ef7d5dd8d48b13643dae08752f427796cdb7856" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.cpp" + }, + "region": { + "startLine": 24, + "startColumn": 16, + "charOffset": 829, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 22, + "startColumn": 16, + "charOffset": 782, + "charLength": 1, + "snippet": { + "text": "\tTile::addThing(index, thing);\n\n\tif (!thing || !thing->getParent()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "794757328ebe36d8ad0b5fc434621f17833156128ff4e005f95d34b308bbe4bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.cpp" + }, + "region": { + "startLine": 36, + "startColumn": 6, + "charOffset": 1073, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 6, + "charOffset": 1028, + "charLength": 1, + "snippet": { + "text": "\tTile::internalAddThing(index, thing);\n\n\tif (!thing || !thing->getParent()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ebf45c4170ef74bc7e43a8e6e09e0ce57cde6baf179d447dfbe538594e476f90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.cpp" + }, + "region": { + "startLine": 36, + "startColumn": 16, + "charOffset": 1083, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 16, + "charOffset": 1028, + "charLength": 1, + "snippet": { + "text": "\tTile::internalAddThing(index, thing);\n\n\tif (!thing || !thing->getParent()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "879a945d5f49df27598e7d31f150dee65a154ddb215bccfe92b650a8e9217a29" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 51, + "charOffset": 1251, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 51, + "charOffset": 1198, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid HouseTile::updateHouse(std::shared_ptr item) {\n\tif (item->getParent().get() != this) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc516091d0212a823b0f3431c5a2525cc97530575bd4e420b6ddd2ca0ccaa79c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.cpp" + }, + "region": { + "startLine": 63, + "startColumn": 24, + "charOffset": 1562, + "charLength": 8, + "snippet": { + "text": "queryAdd" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 24, + "charOffset": 1536, + "charLength": 8, + "snippet": { + "text": "}\n\nReturnValue HouseTile::queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t tileFlags, std::shared_ptr actor /* = nullptr*/) {\n\tif (std::shared_ptr creature = thing->getCreature()) {\n\t\tif (std::shared_ptr player = creature->getPlayer()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa41d9807f07fd6a6991c0a67085f0fdf362d1e698c8fe56d26fddd108739756" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'queryAdd' has cognitive complexity of 28 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.cpp" + }, + "region": { + "startLine": 63, + "startColumn": 24, + "charOffset": 1562, + "charLength": 8, + "snippet": { + "text": "queryAdd" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 24, + "charOffset": 1536, + "charLength": 8, + "snippet": { + "text": "}\n\nReturnValue HouseTile::queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t tileFlags, std::shared_ptr actor /* = nullptr*/) {\n\tif (std::shared_ptr creature = thing->getCreature()) {\n\t\tif (std::shared_ptr player = creature->getPlayer()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d6829e0efbdd5ddb673e474b852a3262f1e7abba98e443b37ca1829fca290c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.cpp" + }, + "region": { + "startLine": 64, + "startColumn": 2, + "charOffset": 1710, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 62, + "startColumn": 2, + "charOffset": 1538, + "charLength": 2, + "snippet": { + "text": "\nReturnValue HouseTile::queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t tileFlags, std::shared_ptr actor /* = nullptr*/) {\n\tif (std::shared_ptr creature = thing->getCreature()) {\n\t\tif (std::shared_ptr player = creature->getPlayer()) {\n\t\t\tif (!house->isInvited(player)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "319f585b29acd6bacf8a09d0576154ce8b512c82309ad354ddf41e5f65b7cff4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.cpp" + }, + "region": { + "startLine": 65, + "startColumn": 3, + "charOffset": 1777, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 3, + "charOffset": 1539, + "charLength": 2, + "snippet": { + "text": "ReturnValue HouseTile::queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t tileFlags, std::shared_ptr actor /* = nullptr*/) {\n\tif (std::shared_ptr creature = thing->getCreature()) {\n\t\tif (std::shared_ptr player = creature->getPlayer()) {\n\t\t\tif (!house->isInvited(player)) {\n\t\t\t\treturn RETURNVALUE_PLAYERISNOTINVITED;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5e14d12fc065d4df232c8f630820132ba74276574eae4b1b3051ddfb43dec17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 7, + "charOffset": 2354, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 7, + "charOffset": 2134, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tif (house->isInvited(monster->getMaster()->getPlayer()) && (hasFlag(TILESTATE_BLOCKSOLID) || (hasBitSet(FLAG_PATHFINDING, flags) && hasFlag(TILESTATE_NOFIELDBLOCKPATH)))) {\n\t\t\t\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t\t\t\t} else {\n\t\t\t\t\treturn RETURNVALUE_NOERROR;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "909cefb4ecaed894afaa96d311162ae907b1a8223197258af0f317eb090d57a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.cpp" + }, + "region": { + "startLine": 96, + "startColumn": 9, + "charOffset": 3272, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 9, + "charOffset": 3137, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tconst Position &entryPos = house->getEntryPosition();\n\t\t\t\tstd::shared_ptr destTile = g_game().map.getTile(entryPos);\n\t\t\t\tif (!destTile) {\n\t\t\t\t\tg_logger().error(\"[HouseTile::queryDestination] - \"\n\t\t\t\t\t \"Entry not correct for house name: {} \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "760988ea2d057e03dff21b48b5855f8ba88d8eaa493fad92a667655a8a1a4a72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.cpp" + }, + "region": { + "startLine": 102, + "startColumn": 10, + "charOffset": 3614, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 100, + "startColumn": 10, + "charOffset": 3460, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\t house->getName(), house->getId(), entryPos.toString());\n\t\t\t\t\tdestTile = g_game().map.getTile(player->getTemplePosition());\n\t\t\t\t\tif (!destTile) {\n\t\t\t\t\t\tdestTile = Tile::nullptr_tile;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d47c7ad305a9dbc2bdae68c445ae67d102c1d8c8512a24525098619cbf91b613" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.cpp" + }, + "region": { + "startLine": 117, + "startColumn": 24, + "charOffset": 3846, + "charLength": 11, + "snippet": { + "text": "queryRemove" + } + }, + "contextRegion": { + "startLine": 115, + "startColumn": 24, + "charOffset": 3820, + "charLength": 11, + "snippet": { + "text": "}\n\nReturnValue HouseTile::queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor /*= nullptr*/) {\n\tstd::shared_ptr item = thing->getItem();\n\tif (!item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8f487235b981ad5bbf83b54fe16f27848f8d6d59904d098e7ee1611f13fcd2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.cpp" + }, + "region": { + "startLine": 119, + "startColumn": 6, + "charOffset": 4029, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 117, + "startColumn": 6, + "charOffset": 3823, + "charLength": 1, + "snippet": { + "text": "ReturnValue HouseTile::queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor /*= nullptr*/) {\n\tstd::shared_ptr item = thing->getItem();\n\tif (!item) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a296c38a8596aa1af821d6e1b07f8aae9df855e16c8ea1e05bd90f224179f53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.cpp" + }, + "region": { + "startLine": 125, + "startColumn": 3, + "charOffset": 4233, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 123, + "startColumn": 3, + "charOffset": 4076, + "charLength": 2, + "snippet": { + "text": "\tif (actor && g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, __FUNCTION__)) {\n\t\tstd::shared_ptr actorPlayer = actor->getPlayer();\n\t\tif (house && !house->isInvited(actorPlayer)) {\n\t\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t\t} else if (house && house->getHouseAccessLevel(actorPlayer) == HOUSE_GUEST) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03c7d2c0dd29f1f5e3b2d0c80ba23cee367879be01e17e3283d9d5d658401ff8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/house/housetile.cpp" + }, + "region": { + "startLine": 127, + "startColumn": 5, + "charOffset": 4319, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 125, + "startColumn": 5, + "charOffset": 4231, + "charLength": 4, + "snippet": { + "text": "\t\tif (house && !house->isInvited(actorPlayer)) {\n\t\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t\t} else if (house && house->getHouseAccessLevel(actorPlayer) == HOUSE_GUEST) {\n\t\t\treturn RETURNVALUE_NOTMOVABLE;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e36521f4056699c79696dd94b5bf741a4a3e5f7df67b945e769a4acf5d1b40a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-member-init", + "ruleIndex": 510, + "kind": "fail", + "level": "warning", + "message": { + "text": "constructor does not initialize these fields: nodesTable, calculatedNodes" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 16, + "startColumn": 1, + "charOffset": 499, + "charLength": 10, + "snippet": { + "text": "AStarNodes" + } + }, + "contextRegion": { + "startLine": 14, + "startColumn": 1, + "charOffset": 459, + "charLength": 10, + "snippet": { + "text": "#include \"creatures/combat/combat.hpp\"\n\nAStarNodes::AStarNodes(uint32_t x, uint32_t y, int_fast32_t extraCost) :\n\topenNodes(), nodes() {\n#if defined(__AVX2__)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c8322321a7040c7b8288233bc1f9a98722ba57866e02ea20c5fd7b4ad170987" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'AStarNodes' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 16, + "startColumn": 36, + "charOffset": 534, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 14, + "startColumn": 36, + "charOffset": 459, + "charLength": 8, + "snippet": { + "text": "#include \"creatures/combat/combat.hpp\"\n\nAStarNodes::AStarNodes(uint32_t x, uint32_t y, int_fast32_t extraCost) :\n\topenNodes(), nodes() {\n#if defined(__AVX2__)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "275ca529f4b48909a36807063ec793139e4e2b1886d5307320212f6eb1a6125c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 29, + "startColumn": 2, + "charOffset": 1221, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 27, + "startColumn": 2, + "charOffset": 1120, + "charLength": 3, + "snippet": { + "text": "#elif defined(__SSE2__)\n\t__m128i defaultCost = _mm_set1_epi32(std::numeric_limits::max());\n\tfor (int32_t i = 0; i < MAX_NODES; i += 16) {\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 0]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 4]), defaultCost);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f78434f6a8077f074fbfaaddb144e6ee34cfb6d137e821827cb39de827859da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 29, + "startColumn": 42, + "charOffset": 1261, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 27, + "startColumn": 42, + "charOffset": 1120, + "charLength": 2, + "snippet": { + "text": "#elif defined(__SSE2__)\n\t__m128i defaultCost = _mm_set1_epi32(std::numeric_limits::max());\n\tfor (int32_t i = 0; i < MAX_NODES; i += 16) {\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 0]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 4]), defaultCost);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f49b3c1ed13ec34162de1a3de129f63a39cbe126ec7525528e0dcf935102d00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-reinterpret-cast", + "ruleIndex": 511, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use reinterpret_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 30, + "startColumn": 20, + "charOffset": 1286, + "charLength": 16, + "snippet": { + "text": "reinterpret_cast" + } + }, + "contextRegion": { + "startLine": 28, + "startColumn": 20, + "charOffset": 1144, + "charLength": 16, + "snippet": { + "text": "\t__m128i defaultCost = _mm_set1_epi32(std::numeric_limits::max());\n\tfor (int32_t i = 0; i < MAX_NODES; i += 16) {\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 0]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 4]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 8]), defaultCost);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "847f3127e1c0c6a772bb43b67165127a21b39740cc39f263a8e6779f818f21e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 30, + "startColumn": 48, + "charOffset": 1314, + "charLength": 15, + "snippet": { + "text": "calculatedNodes" + } + }, + "contextRegion": { + "startLine": 28, + "startColumn": 48, + "charOffset": 1144, + "charLength": 15, + "snippet": { + "text": "\t__m128i defaultCost = _mm_set1_epi32(std::numeric_limits::max());\n\tfor (int32_t i = 0; i < MAX_NODES; i += 16) {\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 0]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 4]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 8]), defaultCost);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a06b5f68d6bdc178c6b3ca76281df50eedf0c5c879ef3377d46e341f12faf8bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-reinterpret-cast", + "ruleIndex": 511, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use reinterpret_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 31, + "startColumn": 20, + "charOffset": 1372, + "charLength": 16, + "snippet": { + "text": "reinterpret_cast" + } + }, + "contextRegion": { + "startLine": 29, + "startColumn": 20, + "charOffset": 1220, + "charLength": 16, + "snippet": { + "text": "\tfor (int32_t i = 0; i < MAX_NODES; i += 16) {\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 0]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 4]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 8]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 12]), defaultCost);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0b76bab44dd880185f33338f5af90ac3b38158dfc82de7506d371e0ed382844" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 31, + "startColumn": 48, + "charOffset": 1400, + "charLength": 15, + "snippet": { + "text": "calculatedNodes" + } + }, + "contextRegion": { + "startLine": 29, + "startColumn": 48, + "charOffset": 1220, + "charLength": 15, + "snippet": { + "text": "\tfor (int32_t i = 0; i < MAX_NODES; i += 16) {\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 0]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 4]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 8]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 12]), defaultCost);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b758117e511127583b646e9e705591ae8707855686afddf3ff6286f3a77c3e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-reinterpret-cast", + "ruleIndex": 511, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use reinterpret_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 32, + "startColumn": 20, + "charOffset": 1458, + "charLength": 16, + "snippet": { + "text": "reinterpret_cast" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 20, + "charOffset": 1267, + "charLength": 16, + "snippet": { + "text": "\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 0]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 4]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 8]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 12]), defaultCost);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c19e19b3a8f754f8e83f04eef9174ac77d274a5f4351f1f818890dac73fa3860" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 32, + "startColumn": 48, + "charOffset": 1486, + "charLength": 15, + "snippet": { + "text": "calculatedNodes" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 48, + "charOffset": 1267, + "charLength": 15, + "snippet": { + "text": "\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 0]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 4]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 8]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 12]), defaultCost);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6760d3e935ad89b3f7d2f598ab2bcdb87118ca0ee09ec92a88b7d0a1e6432f50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 32, + "startColumn": 68, + "charOffset": 1506, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 68, + "charOffset": 1267, + "charLength": 1, + "snippet": { + "text": "\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 0]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 4]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 8]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 12]), defaultCost);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9f6f5797bd55601201c019162b85f50a06942b4e5843ea04731282d3898bc2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-reinterpret-cast", + "ruleIndex": 511, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use reinterpret_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 20, + "charOffset": 1544, + "charLength": 16, + "snippet": { + "text": "reinterpret_cast" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 20, + "charOffset": 1353, + "charLength": 16, + "snippet": { + "text": "\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 4]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 8]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 12]), defaultCost);\n\t}\n\t_mm_sfence();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9032b6c2b7bec5e484b3bd403e02acc128ed025ad50c533734b46b9f1dbcee6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 48, + "charOffset": 1572, + "charLength": 15, + "snippet": { + "text": "calculatedNodes" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 48, + "charOffset": 1353, + "charLength": 15, + "snippet": { + "text": "\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 4]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 8]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 12]), defaultCost);\n\t}\n\t_mm_sfence();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3f922acf1d6348e46e2d1c02690e0cfdb8ec06f43b23bef38a95873ffe0153e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "12 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 68, + "charOffset": 1592, + "charLength": 2, + "snippet": { + "text": "12" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 68, + "charOffset": 1353, + "charLength": 2, + "snippet": { + "text": "\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 4]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 8]), defaultCost);\n\t\t_mm_stream_si128(reinterpret_cast<__m128i*>(&calculatedNodes[i + 12]), defaultCost);\n\t}\n\t_mm_sfence();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85b2b366f1de35cd38c25cd0580fe6f99cb1dc2714ae6b864616c783aad3acd6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 44, + "startColumn": 16, + "charOffset": 1771, + "charLength": 1, + "snippet": { + "text": "x" + } + }, + "contextRegion": { + "startLine": 42, + "startColumn": 16, + "charOffset": 1693, + "charLength": 1, + "snippet": { + "text": "\tAStarNode &startNode = nodes[0];\n\tstartNode.parent = nullptr;\n\tstartNode.x = x;\n\tstartNode.y = y;\n\tstartNode.f = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7a0deded463d0d974e114e173c7e2c991d850c83ec085a3ee4fc9381b927775" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 16, + "charOffset": 1789, + "charLength": 1, + "snippet": { + "text": "y" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 16, + "charOffset": 1727, + "charLength": 1, + "snippet": { + "text": "\tstartNode.parent = nullptr;\n\tstartNode.x = x;\n\tstartNode.y = y;\n\tstartNode.f = 0;\n\tstartNode.g = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "173f327229786c5cdb1e83aee7af3d8cb376ea0ed7b663800487995c9dc10dbd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 49, + "startColumn": 24, + "charOffset": 1877, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 47, + "startColumn": 24, + "charOffset": 1810, + "charLength": 2, + "snippet": { + "text": "\tstartNode.g = 0;\n\tstartNode.c = extraCost;\n\tnodesTable[0] = (x << 16) | y;\n#if defined(__SSE2__)\n\tcalculatedNodes[0] = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4140242672ffb649222c2eb2938d03f2dffed30d7b99f9d7dab82805d766c673" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 49, + "startColumn": 24, + "charOffset": 1877, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 47, + "startColumn": 24, + "charOffset": 1810, + "charLength": 2, + "snippet": { + "text": "\tstartNode.g = 0;\n\tstartNode.c = extraCost;\n\tnodesTable[0] = (x << 16) | y;\n#if defined(__SSE2__)\n\tcalculatedNodes[0] = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbbdb7f3c24b135d794718cc68911d40f7a67dfa3e4bb9968c2042d5fdc24088" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'createOpenNode' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 55, + "startColumn": 64, + "charOffset": 2006, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 64, + "charOffset": 1940, + "charLength": 8, + "snippet": { + "text": "}\n\nbool AStarNodes::createOpenNode(AStarNode* parent, uint32_t x, uint32_t y, int_fast32_t f, int_fast32_t heuristic, int_fast32_t extraCost) {\n\tif (curNode >= MAX_NODES) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8de8e856f83f7392976af1ab54e2088d9515fcdc652ebffd85c8428802bd7663" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'createOpenNode' of similar type ('int_fast32_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 55, + "startColumn": 92, + "charOffset": 2034, + "charLength": 12, + "snippet": { + "text": "int_fast32_t" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 92, + "charOffset": 1940, + "charLength": 12, + "snippet": { + "text": "}\n\nbool AStarNodes::createOpenNode(AStarNode* parent, uint32_t x, uint32_t y, int_fast32_t f, int_fast32_t heuristic, int_fast32_t extraCost) {\n\tif (curNode >= MAX_NODES) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c03f2682666d3531932fd56301840bf1edf3e7a2e20ebbc011426d92fb516a1f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 61, + "startColumn": 2, + "charOffset": 2164, + "charLength": 9, + "snippet": { + "text": "openNodes" + } + }, + "contextRegion": { + "startLine": 59, + "startColumn": 2, + "charOffset": 2132, + "charLength": 9, + "snippet": { + "text": "\n\tint32_t retNode = curNode++;\n\topenNodes[retNode] = true;\n\n\tAStarNode &node = nodes[retNode];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bcc3ade824a50e90168ea612a37e20b8db5d0375c70f3374b9d492584ebbc99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 63, + "startColumn": 20, + "charOffset": 2211, + "charLength": 5, + "snippet": { + "text": "nodes" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 20, + "charOffset": 2163, + "charLength": 5, + "snippet": { + "text": "\topenNodes[retNode] = true;\n\n\tAStarNode &node = nodes[retNode];\n\tnode.parent = parent;\n\tnode.x = x;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5bceffdb4dcf44bfb92402e572e4694128ed3a7f3f7c1f7d3a91e3b7bcafd3be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 65, + "startColumn": 11, + "charOffset": 2260, + "charLength": 1, + "snippet": { + "text": "x" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 11, + "charOffset": 2192, + "charLength": 1, + "snippet": { + "text": "\tAStarNode &node = nodes[retNode];\n\tnode.parent = parent;\n\tnode.x = x;\n\tnode.y = y;\n\tnode.f = f;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9310520116376c4d2482e42b590ce016c939ce715c1d4c51004fe966d6d5eb07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 11, + "charOffset": 2273, + "charLength": 1, + "snippet": { + "text": "y" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 11, + "charOffset": 2227, + "charLength": 1, + "snippet": { + "text": "\tnode.parent = parent;\n\tnode.x = x;\n\tnode.y = y;\n\tnode.f = f;\n\tnode.g = heuristic;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c1f17806f1921b84d1ba1fda0c1e2f78041560c16bb3f4154c13c08e46afa8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 2, + "charOffset": 2332, + "charLength": 10, + "snippet": { + "text": "nodesTable" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 2, + "charOffset": 2289, + "charLength": 10, + "snippet": { + "text": "\tnode.g = heuristic;\n\tnode.c = extraCost;\n\tnodesTable[retNode] = (x << 16) | y;\n#if defined(__SSE2__)\n\tcalculatedNodes[retNode] = f + heuristic;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ea2e370898edb3b650635dd8e1a91417450eb99414b9847f454afcb762278b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 30, + "charOffset": 2360, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 30, + "charOffset": 2289, + "charLength": 2, + "snippet": { + "text": "\tnode.g = heuristic;\n\tnode.c = extraCost;\n\tnodesTable[retNode] = (x << 16) | y;\n#if defined(__SSE2__)\n\tcalculatedNodes[retNode] = f + heuristic;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "728bd29debc20088b5949aad0e62a78018eb13b457da73677b9dab4a9c4c8f9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 30, + "charOffset": 2360, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 30, + "charOffset": 2289, + "charLength": 2, + "snippet": { + "text": "\tnode.g = heuristic;\n\tnode.c = extraCost;\n\tnodesTable[retNode] = (x << 16) | y;\n#if defined(__SSE2__)\n\tcalculatedNodes[retNode] = f + heuristic;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "988ea382243039f0c182c2c8fbae88e241b5c747180e8eb01c270d3ce61f3855" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 2, + "charOffset": 2392, + "charLength": 15, + "snippet": { + "text": "calculatedNodes" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 2, + "charOffset": 2331, + "charLength": 15, + "snippet": { + "text": "\tnodesTable[retNode] = (x << 16) | y;\n#if defined(__SSE2__)\n\tcalculatedNodes[retNode] = f + heuristic;\n#endif\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3e5f9f4093ee90b7193c943e4047c8623eabbb7e79ed543a1d73e460c6c2dea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int_fast32_t' (aka 'long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 29, + "charOffset": 2419, + "charLength": 1, + "snippet": { + "text": "f" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 29, + "charOffset": 2331, + "charLength": 1, + "snippet": { + "text": "\tnodesTable[retNode] = (x << 16) | y;\n#if defined(__SSE2__)\n\tcalculatedNodes[retNode] = f + heuristic;\n#endif\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0d8568e2c7de9e183df4ed33a00b5a944c8107a4e671faf5ddec64057eca4e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 29, + "charOffset": 2419, + "charLength": 1, + "snippet": { + "text": "f" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 29, + "charOffset": 2331, + "charLength": 1, + "snippet": { + "text": "\tnodesTable[retNode] = (x << 16) | y;\n#if defined(__SSE2__)\n\tcalculatedNodes[retNode] = f + heuristic;\n#endif\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7e69e147c1ad8ddf42e5f2127175a3aa8faeea2e4034496a4cb58f040a0f8c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-reinterpret-cast", + "ruleIndex": 511, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use reinterpret_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 159, + "startColumn": 37, + "charOffset": 6708, + "charLength": 16, + "snippet": { + "text": "reinterpret_cast" + } + }, + "contextRegion": { + "startLine": 157, + "startColumn": 37, + "charOffset": 6594, + "charLength": 16, + "snippet": { + "text": "\t__m128i indices = _mm_setr_epi32(0, 1, 2, 3);\n\t__m128i minindices = indices;\n\t__m128i minvalues = _mm_load_si128(reinterpret_cast(calculatedNodes));\n\tfor (int32_t pos = 4; pos < curNode; pos += 4) {\n\t\tconst __m128i values = _mm_load_si128(reinterpret_cast(&calculatedNodes[pos]));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b5dc839b5f4710184e94278c339063fff0186bc6a2605120136be140a7c2321" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 159, + "startColumn": 70, + "charOffset": 6741, + "charLength": 15, + "snippet": { + "text": "calculatedNodes" + } + }, + "contextRegion": { + "startLine": 157, + "startColumn": 70, + "charOffset": 6594, + "charLength": 15, + "snippet": { + "text": "\t__m128i indices = _mm_setr_epi32(0, 1, 2, 3);\n\t__m128i minindices = indices;\n\t__m128i minvalues = _mm_load_si128(reinterpret_cast(calculatedNodes));\n\tfor (int32_t pos = 4; pos < curNode; pos += 4) {\n\t\tconst __m128i values = _mm_load_si128(reinterpret_cast(&calculatedNodes[pos]));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd9b5d8dd965a5efa5a102fed96f0f06d0e0fce4f4730abc4ceda30b43c0d2ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 160, + "startColumn": 2, + "charOffset": 6761, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 2, + "charOffset": 6641, + "charLength": 3, + "snippet": { + "text": "\t__m128i minindices = indices;\n\t__m128i minvalues = _mm_load_si128(reinterpret_cast(calculatedNodes));\n\tfor (int32_t pos = 4; pos < curNode; pos += 4) {\n\t\tconst __m128i values = _mm_load_si128(reinterpret_cast(&calculatedNodes[pos]));\n\t\tindices = _mm_add_epi32(indices, increment);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "866529a1285911d864881d743d9e3a5dd3f88fb2354a014a29a638ec1eefc71b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-reinterpret-cast", + "ruleIndex": 511, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use reinterpret_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 161, + "startColumn": 41, + "charOffset": 6850, + "charLength": 16, + "snippet": { + "text": "reinterpret_cast" + } + }, + "contextRegion": { + "startLine": 159, + "startColumn": 41, + "charOffset": 6672, + "charLength": 16, + "snippet": { + "text": "\t__m128i minvalues = _mm_load_si128(reinterpret_cast(calculatedNodes));\n\tfor (int32_t pos = 4; pos < curNode; pos += 4) {\n\t\tconst __m128i values = _mm_load_si128(reinterpret_cast(&calculatedNodes[pos]));\n\t\tindices = _mm_add_epi32(indices, increment);\n\t\tminindices = _mm_sse2_blendv_epi8(minindices, indices, _mm_cmplt_epi32(values, minvalues));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1852a1c3d39a23ae62f44eaeaeb58a44431bd454a23ce15438d8d8668003c332" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 161, + "startColumn": 75, + "charOffset": 6884, + "charLength": 15, + "snippet": { + "text": "calculatedNodes" + } + }, + "contextRegion": { + "startLine": 159, + "startColumn": 75, + "charOffset": 6672, + "charLength": 15, + "snippet": { + "text": "\t__m128i minvalues = _mm_load_si128(reinterpret_cast(calculatedNodes));\n\tfor (int32_t pos = 4; pos < curNode; pos += 4) {\n\t\tconst __m128i values = _mm_load_si128(reinterpret_cast(&calculatedNodes[pos]));\n\t\tindices = _mm_add_epi32(indices, increment);\n\t\tminindices = _mm_sse2_blendv_epi8(minindices, indices, _mm_cmplt_epi32(values, minvalues));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d064715040609e7e27e73d2ebb85f5ea864531f9e45a1a59ac57b35907f1dcf6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "portability-simd-intrinsics", + "ruleIndex": 685, + "kind": "fail", + "level": "warning", + "message": { + "text": "'_mm_add_epi32' is a non-portable x86_64 intrinsic function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 162, + "startColumn": 13, + "charOffset": 6920, + "charLength": 13, + "snippet": { + "text": "_mm_add_epi32" + } + }, + "contextRegion": { + "startLine": 160, + "startColumn": 13, + "charOffset": 6760, + "charLength": 13, + "snippet": { + "text": "\tfor (int32_t pos = 4; pos < curNode; pos += 4) {\n\t\tconst __m128i values = _mm_load_si128(reinterpret_cast(&calculatedNodes[pos]));\n\t\tindices = _mm_add_epi32(indices, increment);\n\t\tminindices = _mm_sse2_blendv_epi8(minindices, indices, _mm_cmplt_epi32(values, minvalues));\n\t\tminvalues = _mm_sse2_min_epi32(values, minvalues);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd96aba67b6175d40de6947cb13179fb58c74bdb9b5613218aaddc5c52f3ccab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 170, + "startColumn": 10, + "charOffset": 7362, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 168, + "startColumn": 10, + "charOffset": 7239, + "charLength": 2, + "snippet": { + "text": "\tres = _mm_sse2_min_epi32(res, _mm_shuffle_epi32(res, _MM_SHUFFLE(0, 1, 2, 3))); // Calculate horizontal minimum\n\n\talignas(16) int32_t indices_array[4];\n\t_mm_store_si128(reinterpret_cast<__m128i*>(indices_array), minindices);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "daa1b7a9bb17e0d5e227d9af88702995916f75202bb9a38c8c253304cd4d7d7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-c-arrays", + "ruleIndex": 480, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not declare C-style arrays, use std::array<> instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 170, + "startColumn": 14, + "charOffset": 7366, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 168, + "startColumn": 14, + "charOffset": 7239, + "charLength": 7, + "snippet": { + "text": "\tres = _mm_sse2_min_epi32(res, _mm_shuffle_epi32(res, _MM_SHUFFLE(0, 1, 2, 3))); // Calculate horizontal minimum\n\n\talignas(16) int32_t indices_array[4];\n\t_mm_store_si128(reinterpret_cast<__m128i*>(indices_array), minindices);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4fe3c6823dda241fd133c1be68292ae88bbeb156a1969bae775b79f1243de8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-reinterpret-cast", + "ruleIndex": 511, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use reinterpret_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 171, + "startColumn": 18, + "charOffset": 7409, + "charLength": 16, + "snippet": { + "text": "reinterpret_cast" + } + }, + "contextRegion": { + "startLine": 169, + "startColumn": 18, + "charOffset": 7352, + "charLength": 16, + "snippet": { + "text": "\n\talignas(16) int32_t indices_array[4];\n\t_mm_store_si128(reinterpret_cast<__m128i*>(indices_array), minindices);\n\n\tint32_t best_node = indices_array[(_mm_ctz(_mm_movemask_epi8(_mm_cmpeq_epi32(minvalues, res))) >> 2)];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61d03c8713faf5a5b07ab48ed93d5fb787e608308d78456a917d479785e96b3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 171, + "startColumn": 45, + "charOffset": 7436, + "charLength": 13, + "snippet": { + "text": "indices_array" + } + }, + "contextRegion": { + "startLine": 169, + "startColumn": 45, + "charOffset": 7352, + "charLength": 13, + "snippet": { + "text": "\n\talignas(16) int32_t indices_array[4];\n\t_mm_store_si128(reinterpret_cast<__m128i*>(indices_array), minindices);\n\n\tint32_t best_node = indices_array[(_mm_ctz(_mm_movemask_epi8(_mm_cmpeq_epi32(minvalues, res))) >> 2)];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9a79780ce8188383dcf688365d3be852b4cb2ba1dca80e2582881a185a8c882" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 173, + "startColumn": 22, + "charOffset": 7487, + "charLength": 13, + "snippet": { + "text": "indices_array" + } + }, + "contextRegion": { + "startLine": 171, + "startColumn": 22, + "charOffset": 7392, + "charLength": 13, + "snippet": { + "text": "\t_mm_store_si128(reinterpret_cast<__m128i*>(indices_array), minindices);\n\n\tint32_t best_node = indices_array[(_mm_ctz(_mm_movemask_epi8(_mm_cmpeq_epi32(minvalues, res))) >> 2)];\n\treturn (openNodes[best_node] ? &nodes[best_node] : NULL);\n#else" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb4f932dd5f353c878d22df25602d1421580b138d317793a849d7f29cc7b559b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 174, + "startColumn": 10, + "charOffset": 7579, + "charLength": 9, + "snippet": { + "text": "openNodes" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 10, + "charOffset": 7465, + "charLength": 9, + "snippet": { + "text": "\n\tint32_t best_node = indices_array[(_mm_ctz(_mm_movemask_epi8(_mm_cmpeq_epi32(minvalues, res))) >> 2)];\n\treturn (openNodes[best_node] ? &nodes[best_node] : NULL);\n#else\n\tint32_t best_node_f = std::numeric_limits::max();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f33fb63d756bf3a36057a589c7347b65e864344b830824f24fbfc29c1d90c680" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 174, + "startColumn": 34, + "charOffset": 7603, + "charLength": 5, + "snippet": { + "text": "nodes" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 34, + "charOffset": 7465, + "charLength": 5, + "snippet": { + "text": "\n\tint32_t best_node = indices_array[(_mm_ctz(_mm_movemask_epi8(_mm_cmpeq_epi32(minvalues, res))) >> 2)];\n\treturn (openNodes[best_node] ? &nodes[best_node] : NULL);\n#else\n\tint32_t best_node_f = std::numeric_limits::max();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "234e10ff8c8a6b1c0cd5ba316f58e36f2c7eab9b5c3435be6d22b1ac0f81daa5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-nullptr", + "ruleIndex": 577, + "kind": "fail", + "level": "warning", + "message": { + "text": "use nullptr" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 174, + "startColumn": 53, + "charOffset": 7622, + "charLength": 4, + "snippet": { + "text": "NULL" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 53, + "charOffset": 7465, + "charLength": 4, + "snippet": { + "text": "\n\tint32_t best_node = indices_array[(_mm_ctz(_mm_movemask_epi8(_mm_cmpeq_epi32(minvalues, res))) >> 2)];\n\treturn (openNodes[best_node] ? &nodes[best_node] : NULL);\n#else\n\tint32_t best_node_f = std::numeric_limits::max();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c506930705cf7c5144c8782581a68be652b04c52294b414cacb3dc129700b0fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 192, + "startColumn": 30, + "charOffset": 8144, + "charLength": 5, + "snippet": { + "text": "nodes" + } + }, + "contextRegion": { + "startLine": 190, + "startColumn": 30, + "charOffset": 8062, + "charLength": 5, + "snippet": { + "text": "\nvoid AStarNodes::closeNode(const AStarNode* node) {\n\tconst size_t index = node - nodes;\n\tassert(index < MAX_NODES);\n#if defined(__SSE2__)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3219d08ae10ca19d51a382906d52e204682f7fbddd65e739da6a174ba7f838f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 195, + "startColumn": 2, + "charOffset": 8202, + "charLength": 15, + "snippet": { + "text": "calculatedNodes" + } + }, + "contextRegion": { + "startLine": 193, + "startColumn": 2, + "charOffset": 8151, + "charLength": 15, + "snippet": { + "text": "\tassert(index < MAX_NODES);\n#if defined(__SSE2__)\n\tcalculatedNodes[index] = std::numeric_limits::max();\n#endif\n\topenNodes[index] = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "757679f49595f7b6ed48c9e395b00e7f4d4854d5bb7c25aabdad81e237828594" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 197, + "startColumn": 2, + "charOffset": 8272, + "charLength": 9, + "snippet": { + "text": "openNodes" + } + }, + "contextRegion": { + "startLine": 195, + "startColumn": 2, + "charOffset": 8201, + "charLength": 9, + "snippet": { + "text": "\tcalculatedNodes[index] = std::numeric_limits::max();\n#endif\n\topenNodes[index] = false;\n\t++closedNodes;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "beb8205f5fb1697533093eb52780990b9a1abfc12ff74e313f4cfab4e3e1860b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 202, + "startColumn": 30, + "charOffset": 8397, + "charLength": 5, + "snippet": { + "text": "nodes" + } + }, + "contextRegion": { + "startLine": 200, + "startColumn": 30, + "charOffset": 8316, + "charLength": 5, + "snippet": { + "text": "\nvoid AStarNodes::openNode(const AStarNode* node) {\n\tconst size_t index = node - nodes;\n\tassert(index < MAX_NODES);\n#if defined(__SSE2__)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ee95c5d9745c13f19846916135a1d5c7bf0183e411fa1eb0cc0d010678f10ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 205, + "startColumn": 2, + "charOffset": 8455, + "charLength": 15, + "snippet": { + "text": "calculatedNodes" + } + }, + "contextRegion": { + "startLine": 203, + "startColumn": 2, + "charOffset": 8404, + "charLength": 15, + "snippet": { + "text": "\tassert(index < MAX_NODES);\n#if defined(__SSE2__)\n\tcalculatedNodes[index] = nodes[index].f + nodes[index].g;\n#endif\n\tclosedNodes -= (openNodes[index] ? 0 : 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5787bd45c21045df707f947bfbc0999ac4461f36f7cbae0d37fa62bc887b5bea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int_fast32_t' (aka 'long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 205, + "startColumn": 27, + "charOffset": 8480, + "charLength": 5, + "snippet": { + "text": "nodes" + } + }, + "contextRegion": { + "startLine": 203, + "startColumn": 27, + "charOffset": 8404, + "charLength": 5, + "snippet": { + "text": "\tassert(index < MAX_NODES);\n#if defined(__SSE2__)\n\tcalculatedNodes[index] = nodes[index].f + nodes[index].g;\n#endif\n\tclosedNodes -= (openNodes[index] ? 0 : 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "666036fc1a3c449dc79adc698efd5260c01d95aab463a06c923b328f8673a3e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 205, + "startColumn": 27, + "charOffset": 8480, + "charLength": 5, + "snippet": { + "text": "nodes" + } + }, + "contextRegion": { + "startLine": 203, + "startColumn": 27, + "charOffset": 8404, + "charLength": 5, + "snippet": { + "text": "\tassert(index < MAX_NODES);\n#if defined(__SSE2__)\n\tcalculatedNodes[index] = nodes[index].f + nodes[index].g;\n#endif\n\tclosedNodes -= (openNodes[index] ? 0 : 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a67fb1ab79f34935de0481f5f0c9947b2f64970e0e8f02c29ec254f743fd4001" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 205, + "startColumn": 27, + "charOffset": 8480, + "charLength": 5, + "snippet": { + "text": "nodes" + } + }, + "contextRegion": { + "startLine": 203, + "startColumn": 27, + "charOffset": 8404, + "charLength": 5, + "snippet": { + "text": "\tassert(index < MAX_NODES);\n#if defined(__SSE2__)\n\tcalculatedNodes[index] = nodes[index].f + nodes[index].g;\n#endif\n\tclosedNodes -= (openNodes[index] ? 0 : 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a65e789fed103be2ee6c485552064b4beacee048f5211b8173593b9b099c2fa8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 205, + "startColumn": 44, + "charOffset": 8497, + "charLength": 5, + "snippet": { + "text": "nodes" + } + }, + "contextRegion": { + "startLine": 203, + "startColumn": 44, + "charOffset": 8404, + "charLength": 5, + "snippet": { + "text": "\tassert(index < MAX_NODES);\n#if defined(__SSE2__)\n\tcalculatedNodes[index] = nodes[index].f + nodes[index].g;\n#endif\n\tclosedNodes -= (openNodes[index] ? 0 : 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f515e18970e2893b84795f22013cc0ec1d6cfd29ac0db2986d2642012fa932fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 207, + "startColumn": 18, + "charOffset": 8537, + "charLength": 9, + "snippet": { + "text": "openNodes" + } + }, + "contextRegion": { + "startLine": 205, + "startColumn": 18, + "charOffset": 8454, + "charLength": 9, + "snippet": { + "text": "\tcalculatedNodes[index] = nodes[index].f + nodes[index].g;\n#endif\n\tclosedNodes -= (openNodes[index] ? 0 : 1);\n\topenNodes[index] = true;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf369f5f649ce38c6d9397de78e3fd15eab0e6f57526303f2ec3ad0cd4c3ea40" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 208, + "startColumn": 2, + "charOffset": 8565, + "charLength": 9, + "snippet": { + "text": "openNodes" + } + }, + "contextRegion": { + "startLine": 206, + "startColumn": 2, + "charOffset": 8513, + "charLength": 9, + "snippet": { + "text": "#endif\n\tclosedNodes -= (openNodes[index] ? 0 : 1);\n\topenNodes[index] = true;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31da612133e1f6880bb041d1af8a0f460e0fda822212b015a21d3a8f0868d311" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 216, + "startColumn": 22, + "charOffset": 8750, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 214, + "startColumn": 22, + "charOffset": 8661, + "charLength": 2, + "snippet": { + "text": "\nAStarNode* AStarNodes::getNodeByPosition(uint32_t x, uint32_t y) {\n\tuint32_t xy = (x << 16) | y;\n#if defined(__SSE2__)\n\tconst __m128i key = _mm_set1_epi32(xy);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab95d00d0afe93571e682266a3f94b5e047e11691179fa3cf91e349a009792d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 216, + "startColumn": 22, + "charOffset": 8750, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 214, + "startColumn": 22, + "charOffset": 8661, + "charLength": 2, + "snippet": { + "text": "\nAStarNode* AStarNodes::getNodeByPosition(uint32_t x, uint32_t y) {\n\tuint32_t xy = (x << 16) | y;\n#if defined(__SSE2__)\n\tconst __m128i key = _mm_set1_epi32(xy);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85e67d90cb17838e89005ba28a4d47b255f7277f22560aa8a9be5455c155a433" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 218, + "startColumn": 37, + "charOffset": 8817, + "charLength": 2, + "snippet": { + "text": "xy" + } + }, + "contextRegion": { + "startLine": 216, + "startColumn": 37, + "charOffset": 8729, + "charLength": 2, + "snippet": { + "text": "\tuint32_t xy = (x << 16) | y;\n#if defined(__SSE2__)\n\tconst __m128i key = _mm_set1_epi32(xy);\n\n\tint32_t pos = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a76a8e9d2cf153dbb3372227b2881a64a23b3a89e7426762f7a472946d818e82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 221, + "startColumn": 31, + "charOffset": 8871, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 219, + "startColumn": 31, + "charOffset": 8822, + "charLength": 2, + "snippet": { + "text": "\n\tint32_t pos = 0;\n\tint32_t curRound = curNode - 16;\n\tfor (; pos <= curRound; pos += 16) {\n\t\t__m128i v[4];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8fe3bccdc354f1ff38d554e7bf9315d7b767ad7ea922f0851d4771e12469fa5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 222, + "startColumn": 2, + "charOffset": 8876, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 220, + "startColumn": 2, + "charOffset": 8823, + "charLength": 3, + "snippet": { + "text": "\tint32_t pos = 0;\n\tint32_t curRound = curNode - 16;\n\tfor (; pos <= curRound; pos += 16) {\n\t\t__m128i v[4];\n\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8aba92e7b858071b74cd6cff34341a128e0c06602d7aae2ec61dcf28b6d5ac60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'curRound' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 222, + "startColumn": 9, + "charOffset": 8883, + "charLength": 3, + "snippet": { + "text": "pos" + } + }, + "contextRegion": { + "startLine": 220, + "startColumn": 9, + "charOffset": 8823, + "charLength": 3, + "snippet": { + "text": "\tint32_t pos = 0;\n\tint32_t curRound = curNode - 16;\n\tfor (; pos <= curRound; pos += 16) {\n\t\t__m128i v[4];\n\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b83a845ca1ba01c6b60a54a2f3b371a24cdaec08e394afe9a5f03536ba2dcfd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 222, + "startColumn": 33, + "charOffset": 8907, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 220, + "startColumn": 33, + "charOffset": 8823, + "charLength": 2, + "snippet": { + "text": "\tint32_t pos = 0;\n\tint32_t curRound = curNode - 16;\n\tfor (; pos <= curRound; pos += 16) {\n\t\t__m128i v[4];\n\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1aa2cb880603b934792ce36a4b8255f47e3a5221e563cb4dab9d5b20e019a1a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-c-arrays", + "ruleIndex": 480, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not declare C-style arrays, use std::array<> instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 223, + "startColumn": 3, + "charOffset": 8915, + "charLength": 7, + "snippet": { + "text": "__m128i" + } + }, + "contextRegion": { + "startLine": 221, + "startColumn": 3, + "charOffset": 8841, + "charLength": 7, + "snippet": { + "text": "\tint32_t curRound = curNode - 16;\n\tfor (; pos <= curRound; pos += 16) {\n\t\t__m128i v[4];\n\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);\n\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9733a6a53d246fb310fbefcc3813a5ee2cd9f25c4015c9c8ac1711225e0b428" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-reinterpret-cast", + "ruleIndex": 511, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use reinterpret_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 224, + "startColumn": 41, + "charOffset": 8969, + "charLength": 16, + "snippet": { + "text": "reinterpret_cast" + } + }, + "contextRegion": { + "startLine": 222, + "startColumn": 41, + "charOffset": 8875, + "charLength": 16, + "snippet": { + "text": "\tfor (; pos <= curRound; pos += 16) {\n\t\t__m128i v[4];\n\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);\n\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);\n\t\tv[2] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 8])), key);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe46b2782ed5285342451305670db523157a9754ae5a23dabcb119169d8211ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 224, + "startColumn": 75, + "charOffset": 9003, + "charLength": 10, + "snippet": { + "text": "nodesTable" + } + }, + "contextRegion": { + "startLine": 222, + "startColumn": 75, + "charOffset": 8875, + "charLength": 10, + "snippet": { + "text": "\tfor (; pos <= curRound; pos += 16) {\n\t\t__m128i v[4];\n\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);\n\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);\n\t\tv[2] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 8])), key);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e49b28848df3363effaef5cdb14d637b0c11c5265404bd34642ad45fcb1c2b41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-reinterpret-cast", + "ruleIndex": 511, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use reinterpret_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 225, + "startColumn": 41, + "charOffset": 9068, + "charLength": 16, + "snippet": { + "text": "reinterpret_cast" + } + }, + "contextRegion": { + "startLine": 223, + "startColumn": 41, + "charOffset": 8913, + "charLength": 16, + "snippet": { + "text": "\t\t__m128i v[4];\n\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);\n\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);\n\t\tv[2] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 8])), key);\n\t\tv[3] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 12])), key);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b5ef0d4e12c3373e30333fb84ebc2f350e1d0de7f6b5d6271f6571a0d2e7dc0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 225, + "startColumn": 75, + "charOffset": 9102, + "charLength": 10, + "snippet": { + "text": "nodesTable" + } + }, + "contextRegion": { + "startLine": 223, + "startColumn": 75, + "charOffset": 8913, + "charLength": 10, + "snippet": { + "text": "\t\t__m128i v[4];\n\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);\n\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);\n\t\tv[2] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 8])), key);\n\t\tv[3] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 12])), key);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d9a94ed4ce0fe1f290a881fe33feff73638f154614ef2ede60760fd036ebc55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-reinterpret-cast", + "ruleIndex": 511, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use reinterpret_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 41, + "charOffset": 9171, + "charLength": 16, + "snippet": { + "text": "reinterpret_cast" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 41, + "charOffset": 8929, + "charLength": 16, + "snippet": { + "text": "\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);\n\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);\n\t\tv[2] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 8])), key);\n\t\tv[3] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 12])), key);\n\t\tconst uint32_t mask = _mm_movemask_epi8(_mm_packs_epi16(_mm_packs_epi32(v[0], v[1]), _mm_packs_epi32(v[2], v[3])));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e872845c9e84ac5adb1ebdccabada670270024dbe96b1f9777b3d75a35896ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 75, + "charOffset": 9205, + "charLength": 10, + "snippet": { + "text": "nodesTable" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 75, + "charOffset": 8929, + "charLength": 10, + "snippet": { + "text": "\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);\n\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);\n\t\tv[2] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 8])), key);\n\t\tv[3] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 12])), key);\n\t\tconst uint32_t mask = _mm_movemask_epi8(_mm_packs_epi16(_mm_packs_epi32(v[0], v[1]), _mm_packs_epi32(v[2], v[3])));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47ced81b8a7dc941cd0285796a697b7cd7636262b69bdc1ec23bd486e77d7833" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 92, + "charOffset": 9222, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 92, + "charOffset": 8929, + "charLength": 1, + "snippet": { + "text": "\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);\n\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);\n\t\tv[2] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 8])), key);\n\t\tv[3] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 12])), key);\n\t\tconst uint32_t mask = _mm_movemask_epi8(_mm_packs_epi16(_mm_packs_epi32(v[0], v[1]), _mm_packs_epi32(v[2], v[3])));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efc928cad53d4e84dbe7aaf5c3d6a523fc241f9eac2d00dba639130368781ab3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-reinterpret-cast", + "ruleIndex": 511, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use reinterpret_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 227, + "startColumn": 41, + "charOffset": 9274, + "charLength": 16, + "snippet": { + "text": "reinterpret_cast" + } + }, + "contextRegion": { + "startLine": 225, + "startColumn": 41, + "charOffset": 9028, + "charLength": 16, + "snippet": { + "text": "\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);\n\t\tv[2] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 8])), key);\n\t\tv[3] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 12])), key);\n\t\tconst uint32_t mask = _mm_movemask_epi8(_mm_packs_epi16(_mm_packs_epi32(v[0], v[1]), _mm_packs_epi32(v[2], v[3])));\n\t\tif (mask != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b52869c7e65b312aedd1da9230188867a7af5f4421d6a6f825cb9eb94f8fae3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 227, + "startColumn": 75, + "charOffset": 9308, + "charLength": 10, + "snippet": { + "text": "nodesTable" + } + }, + "contextRegion": { + "startLine": 225, + "startColumn": 75, + "charOffset": 9028, + "charLength": 10, + "snippet": { + "text": "\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);\n\t\tv[2] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 8])), key);\n\t\tv[3] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 12])), key);\n\t\tconst uint32_t mask = _mm_movemask_epi8(_mm_packs_epi16(_mm_packs_epi32(v[0], v[1]), _mm_packs_epi32(v[2], v[3])));\n\t\tif (mask != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ffff7acb17e9e4499470b317461104557800618d5d8a87c1508dafaf11c7d438" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "12 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 227, + "startColumn": 92, + "charOffset": 9325, + "charLength": 2, + "snippet": { + "text": "12" + } + }, + "contextRegion": { + "startLine": 225, + "startColumn": 92, + "charOffset": 9028, + "charLength": 2, + "snippet": { + "text": "\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);\n\t\tv[2] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 8])), key);\n\t\tv[3] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 12])), key);\n\t\tconst uint32_t mask = _mm_movemask_epi8(_mm_packs_epi16(_mm_packs_epi32(v[0], v[1]), _mm_packs_epi32(v[2], v[3])));\n\t\tif (mask != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f162bb50bf9f5fa6babebe36c3ed7a59f91b67f54ac60525e263a6c4e7fc7b06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 230, + "startColumn": 12, + "charOffset": 9486, + "charLength": 5, + "snippet": { + "text": "nodes" + } + }, + "contextRegion": { + "startLine": 228, + "startColumn": 12, + "charOffset": 9338, + "charLength": 5, + "snippet": { + "text": "\t\tconst uint32_t mask = _mm_movemask_epi8(_mm_packs_epi16(_mm_packs_epi32(v[0], v[1]), _mm_packs_epi32(v[2], v[3])));\n\t\tif (mask != 0) {\n\t\t\treturn &nodes[pos + _mm_ctz(mask)];\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85cd12803f5c834a457ec5a5a8de4c5e7513d86cdca29937f256c02f8f541b2b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 233, + "startColumn": 23, + "charOffset": 9543, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 231, + "startColumn": 23, + "charOffset": 9514, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\t}\n\tcurRound = curNode - 8;\n\tif (pos <= curRound) {\n\t\t__m128i v[2];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "400387db14773f40acc1be920a354abe0db190fe05868609c401a27d94624c34" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-c-arrays", + "ruleIndex": 480, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not declare C-style arrays, use std::array<> instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 235, + "startColumn": 3, + "charOffset": 9572, + "charLength": 7, + "snippet": { + "text": "__m128i" + } + }, + "contextRegion": { + "startLine": 233, + "startColumn": 3, + "charOffset": 9521, + "charLength": 7, + "snippet": { + "text": "\tcurRound = curNode - 8;\n\tif (pos <= curRound) {\n\t\t__m128i v[2];\n\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);\n\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7df0fa8e5bcae9e98aaa6f59c10cf2b29c15d9948e188ab9a2901d61bc273b02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-reinterpret-cast", + "ruleIndex": 511, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use reinterpret_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 236, + "startColumn": 41, + "charOffset": 9626, + "charLength": 16, + "snippet": { + "text": "reinterpret_cast" + } + }, + "contextRegion": { + "startLine": 234, + "startColumn": 41, + "charOffset": 9546, + "charLength": 16, + "snippet": { + "text": "\tif (pos <= curRound) {\n\t\t__m128i v[2];\n\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);\n\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);\n\t\tconst uint32_t mask = _mm_movemask_epi8(_mm_packs_epi32(v[0], v[1]));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2dc1e702f112d89b56cfef4a9103c3c622638141e625efaeaaaf58ee861f99ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 236, + "startColumn": 75, + "charOffset": 9660, + "charLength": 10, + "snippet": { + "text": "nodesTable" + } + }, + "contextRegion": { + "startLine": 234, + "startColumn": 75, + "charOffset": 9546, + "charLength": 10, + "snippet": { + "text": "\tif (pos <= curRound) {\n\t\t__m128i v[2];\n\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);\n\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);\n\t\tconst uint32_t mask = _mm_movemask_epi8(_mm_packs_epi32(v[0], v[1]));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12a7458f1ee039b6373ef95f79d171bdcd0dd502babdc782be002f4cb49b1755" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-reinterpret-cast", + "ruleIndex": 511, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use reinterpret_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 237, + "startColumn": 41, + "charOffset": 9725, + "charLength": 16, + "snippet": { + "text": "reinterpret_cast" + } + }, + "contextRegion": { + "startLine": 235, + "startColumn": 41, + "charOffset": 9570, + "charLength": 16, + "snippet": { + "text": "\t\t__m128i v[2];\n\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);\n\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);\n\t\tconst uint32_t mask = _mm_movemask_epi8(_mm_packs_epi32(v[0], v[1]));\n\t\tif (mask != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f643b80fb1368e75b5d3b07bc8f47fa877eada1543ebbda55adc2d1f1861db8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 237, + "startColumn": 75, + "charOffset": 9759, + "charLength": 10, + "snippet": { + "text": "nodesTable" + } + }, + "contextRegion": { + "startLine": 235, + "startColumn": 75, + "charOffset": 9570, + "charLength": 10, + "snippet": { + "text": "\t\t__m128i v[2];\n\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);\n\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);\n\t\tconst uint32_t mask = _mm_movemask_epi8(_mm_packs_epi32(v[0], v[1]));\n\t\tif (mask != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5acb21341f8da80f7351321649ff0ad646dc5293358405bdf8d2649df55134d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 240, + "startColumn": 12, + "charOffset": 9890, + "charLength": 5, + "snippet": { + "text": "nodes" + } + }, + "contextRegion": { + "startLine": 238, + "startColumn": 12, + "charOffset": 9788, + "charLength": 5, + "snippet": { + "text": "\t\tconst uint32_t mask = _mm_movemask_epi8(_mm_packs_epi32(v[0], v[1]));\n\t\tif (mask != 0) {\n\t\t\treturn &nodes[pos + (_mm_ctz(mask) >> 1)];\n\t\t}\n\t\tpos += 8;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "493ee5dc33be4df5cbb27d287d5a0e6489cdb00f596163fe7c3ad315b428b142" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 10, + "charOffset": 9938, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 10, + "charOffset": 9879, + "charLength": 1, + "snippet": { + "text": "\t\t\treturn &nodes[pos + (_mm_ctz(mask) >> 1)];\n\t\t}\n\t\tpos += 8;\n\t}\n\tfor (; pos < curNode; ++pos) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c3afc0b42666308cba8f325c114a3de65943e1c3e7439509c830f7b4711497e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 244, + "startColumn": 2, + "charOffset": 9945, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 2, + "charOffset": 9929, + "charLength": 3, + "snippet": { + "text": "\t\tpos += 8;\n\t}\n\tfor (; pos < curNode; ++pos) {\n\t\tif (nodesTable[pos] == xy) {\n\t\t\treturn &nodes[pos];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd7600cec266cd4b9d7064c1a510529072fdd44d181a8f774715fc3d1c59b8cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 245, + "startColumn": 7, + "charOffset": 9982, + "charLength": 10, + "snippet": { + "text": "nodesTable" + } + }, + "contextRegion": { + "startLine": 243, + "startColumn": 7, + "charOffset": 9941, + "charLength": 10, + "snippet": { + "text": "\t}\n\tfor (; pos < curNode; ++pos) {\n\t\tif (nodesTable[pos] == xy) {\n\t\t\treturn &nodes[pos];\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65aa4f202e91af16fa438c5b82699e45fc4261b75e1b34ad8d29419b9252aca8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 246, + "startColumn": 12, + "charOffset": 10018, + "charLength": 5, + "snippet": { + "text": "nodes" + } + }, + "contextRegion": { + "startLine": 244, + "startColumn": 12, + "charOffset": 9944, + "charLength": 5, + "snippet": { + "text": "\tfor (; pos < curNode; ++pos) {\n\t\tif (nodesTable[pos] == xy) {\n\t\t\treturn &nodes[pos];\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a06b5f68d6bdc178c6b3ca76281df50eedf0c5c879ef3377d46e341f12faf8bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'int_fast32_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 271, + "startColumn": 12, + "charOffset": 10814, + "charLength": 18, + "snippet": { + "text": "MAP_NORMALWALKCOST" + } + }, + "contextRegion": { + "startLine": 269, + "startColumn": 12, + "charOffset": 10717, + "charLength": 18, + "snippet": { + "text": "\t\tif (tile->getTopVisibleCreature(creature) != nullptr) {\n\t\t\t// destroy creature cost\n\t\t\tcost += MAP_NORMALWALKCOST * 4;\n\t\t}\n\t\tif (const auto &field = tile->getFieldItem()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12456b75fefb96d448a9e4bb5d95f2d065e217b051319264f125837ff6a503da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'int_fast32_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 276, + "startColumn": 13, + "charOffset": 11156, + "charLength": 18, + "snippet": { + "text": "MAP_NORMALWALKCOST" + } + }, + "contextRegion": { + "startLine": 274, + "startColumn": 13, + "charOffset": 10892, + "charLength": 18, + "snippet": { + "text": "\t\t\tCombatType_t combatType = field->getCombatType();\n\t\t\tif (!creature->isImmune(combatType) && !creature->hasCondition(Combat::DamageToConditionType(combatType)) && (creature->getMonster() && !creature->getMonster()->canWalkOnFieldType(combatType))) {\n\t\t\t\tcost += MAP_NORMALWALKCOST * 18;\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95c683f16ed257eb15ef3417eb43ec4e5c24aa9913908aaeaf3e29c796165c5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "18 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/astarnodes.cpp" + }, + "region": { + "startLine": 276, + "startColumn": 34, + "charOffset": 11177, + "charLength": 2, + "snippet": { + "text": "18" + } + }, + "contextRegion": { + "startLine": 274, + "startColumn": 34, + "charOffset": 10892, + "charLength": 2, + "snippet": { + "text": "\t\t\tCombatType_t combatType = field->getCombatType();\n\t\t\tif (!creature->isImmune(combatType) && !creature->hasCondition(Combat::DamageToConditionType(combatType)) && (creature->getMonster() && !creature->getMonster()->canWalkOnFieldType(combatType))) {\n\t\t\t\tcost += MAP_NORMALWALKCOST * 18;\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd227ede55eb356d7119800d8b4b415c2c77778cef2bfb65ff0fb293e362d10c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/mapsector.cpp" + }, + "region": { + "startLine": 18, + "startColumn": 16, + "charOffset": 568, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 16, + "startColumn": 16, + "charOffset": 486, + "charLength": 12, + "snippet": { + "text": "\nvoid MapSector::addCreature(const std::shared_ptr &c) {\n\tcreature_list.emplace_back(c);\n\tif (c->getPlayer()) {\n\t\tplayer_list.emplace_back(c);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1939728075c340463f82a082184aafe678951606bcc429d3538287feff0a87b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/utils/mapsector.cpp" + }, + "region": { + "startLine": 20, + "startColumn": 15, + "charOffset": 622, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 15, + "charOffset": 553, + "charLength": 12, + "snippet": { + "text": "\tcreature_list.emplace_back(c);\n\tif (c->getPlayer()) {\n\t\tplayer_list.emplace_back(c);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa3530b9b32fb0b71c6eb4a38dffb77b2a47ff4dfa864fba8400ff54f8aa5a7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-make-member-function-const", + "ruleIndex": 708, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'canSpawn' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npcs.cpp" + }, + "region": { + "startLine": 20, + "startColumn": 15, + "charOffset": 650, + "charLength": 8, + "snippet": { + "text": "canSpawn" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 15, + "charOffset": 610, + "charLength": 8, + "snippet": { + "text": "#include \"game/game.hpp\"\n\nbool NpcType::canSpawn(const Position &pos) {\n\tbool canSpawn = true;\n\tbool isDay = g_game().gameIsDay();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24ebdc5790dfdac68a3091255f8278a7a82ff6214b0c547a39349dfc48495278" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-std-min-max", + "ruleIndex": 736, + "kind": "fail", + "level": "warning", + "message": { + "text": "use `std::max` instead of `>`" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npcs.cpp" + }, + "region": { + "startLine": 79, + "startColumn": 2, + "charOffset": 2165, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 77, + "startColumn": 2, + "charOffset": 2126, + "charLength": 2, + "snippet": { + "text": "\n\t// Registering item prices globaly.\n\tif (shopBlock.itemSellPrice > iType.sellPrice) {\n\t\tiType.sellPrice = shopBlock.itemSellPrice;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fdeec87f8d27655c67785fa5f0bbac6d06f420a930ead92f2a565a5009f9e9fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-std-min-max", + "ruleIndex": 736, + "kind": "fail", + "level": "warning", + "message": { + "text": "use `std::max` instead of `>`" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npcs.cpp" + }, + "region": { + "startLine": 82, + "startColumn": 2, + "charOffset": 2263, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 2, + "charOffset": 2214, + "charLength": 2, + "snippet": { + "text": "\t\tiType.sellPrice = shopBlock.itemSellPrice;\n\t}\n\tif (shopBlock.itemBuyPrice > iType.buyPrice) {\n\t\tiType.buyPrice = shopBlock.itemBuyPrice;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47632cceb52c181d01066846be6b325966a5f6421ca45311361f7b75dc213ed7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npcs.cpp" + }, + "region": { + "startLine": 96, + "startColumn": 4, + "charOffset": 2720, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 4, + "charOffset": 2654, + "charLength": 3, + "snippet": { + "text": "\t\tbool isContainer = iType.isContainer();\n\t\tif (isContainer) {\n\t\t\tfor (const ShopBlock &child : shopBlock.childShop) {\n\t\t\t\tshopBlock.childShop.push_back(child);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "621e09f57834a62734b6841d99cd7c8e7c752d3dc2d69d52853f5cd2b2378615" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npcs.cpp" + }, + "region": { + "startLine": 103, + "startColumn": 22, + "charOffset": 2901, + "charLength": 18, + "snippet": { + "text": "SPEECHBUBBLE_TRADE" + } + }, + "contextRegion": { + "startLine": 101, + "startColumn": 22, + "charOffset": 2827, + "charLength": 18, + "snippet": { + "text": "\tnpcType->info.shopItemVector.push_back(shopBlock);\n\n\tinfo.speechBubble = SPEECHBUBBLE_TRADE;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb5c157edf309fbeeb4e88db34748377a68e76fa3913f059fcb3e1e6d651129d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'load' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npcs.cpp" + }, + "region": { + "startLine": 106, + "startColumn": 12, + "charOffset": 2935, + "charLength": 4, + "snippet": { + "text": "load" + } + }, + "contextRegion": { + "startLine": 104, + "startColumn": 12, + "charOffset": 2921, + "charLength": 4, + "snippet": { + "text": "}\n\nbool Npcs::load(bool loadLibs /* = true*/, bool loadNpcs /* = true*/, bool reloading /* = false*/) const {\n\tif (loadLibs) {\n\t\tauto coreFolder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0b5976cd9d794a53d6024aaef7f2360e6048fd1a8eb26e8b8d46505253e760c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 24, + "charOffset": 857, + "charLength": 3, + "snippet": { + "text": "fmt" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 24, + "charOffset": 768, + "charLength": 3, + "snippet": { + "text": "\t\tIOMap::loadMap(this, pos);\n\t} catch (const std::exception &e) {\n\t\tthrow IOMapException(fmt::format(\n\t\t\t\"\\n[Map::load] - The map in folder {} is missing or corrupted\"\n\t\t\t\"\\n - {}\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d367816cdf6fb9fc9969a41ea46410667ed8bdf598c59f3dc579e64e6b557034" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 44, + "startColumn": 38, + "charOffset": 1679, + "charLength": 4, + "snippet": { + "text": "curl" + } + }, + "contextRegion": { + "startLine": 42, + "startColumn": 38, + "charOffset": 1637, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tif (CURL* curl = curl_easy_init(); curl && !mapDownloadUrl.empty()) {\n\t\t\tg_logger().info(\"Downloading \" + g_configManager().getString(MAP_NAME, __FUNCTION__) + \".otbm to world folder\");\n\t\t\tFILE* otbm = fopen(identifier.c_str(), \"wb\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eeeec80a826aed208cdc1c3297d6224b91222180c8bdcc71d783fd0bf90f58ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'CURL *' (aka 'void *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 44, + "startColumn": 38, + "charOffset": 1679, + "charLength": 4, + "snippet": { + "text": "curl" + } + }, + "contextRegion": { + "startLine": 42, + "startColumn": 38, + "charOffset": 1637, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tif (CURL* curl = curl_easy_init(); curl && !mapDownloadUrl.empty()) {\n\t\t\tg_logger().info(\"Downloading \" + g_configManager().getString(MAP_NAME, __FUNCTION__) + \".otbm to world folder\");\n\t\t\tFILE* otbm = fopen(identifier.c_str(), \"wb\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a1f30dd0b9fb93468562a29225d5cfe65289804aa6e0269243f4ad041e7980b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 44, + "startColumn": 43, + "charOffset": 1684, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 42, + "startColumn": 43, + "charOffset": 1637, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (CURL* curl = curl_easy_init(); curl && !mapDownloadUrl.empty()) {\n\t\t\tg_logger().info(\"Downloading \" + g_configManager().getString(MAP_NAME, __FUNCTION__) + \".otbm to world folder\");\n\t\t\tFILE* otbm = fopen(identifier.c_str(), \"wb\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "185b3aec39ef183ab18ebe7fa151a630bc4d077f84dfe1b63c4c26665ecd7fb7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-owning-memory", + "ruleIndex": 503, + "kind": "fail", + "level": "warning", + "message": { + "text": "initializing non-owner 'FILE *' (aka '_IO_FILE *') with a newly created 'gsl::owner<>'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 46, + "startColumn": 4, + "charOffset": 1833, + "charLength": 4, + "snippet": { + "text": "FILE" + } + }, + "contextRegion": { + "startLine": 44, + "startColumn": 4, + "charOffset": 1642, + "charLength": 4, + "snippet": { + "text": "\t\tif (CURL* curl = curl_easy_init(); curl && !mapDownloadUrl.empty()) {\n\t\t\tg_logger().info(\"Downloading \" + g_configManager().getString(MAP_NAME, __FUNCTION__) + \".otbm to world folder\");\n\t\t\tFILE* otbm = fopen(identifier.c_str(), \"wb\");\n\t\t\tcurl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);\n\t\t\tcurl_easy_setopt(curl, CURLOPT_URL, mapDownloadUrl.c_str());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39ff84ee7f4f53b129dd22655b74f5a896c932310a6887297f27df723ffb2596" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "android-cloexec-fopen", + "ruleIndex": 30, + "kind": "fail", + "level": "warning", + "message": { + "text": "use 'fopen' mode 'e' to set O_CLOEXEC" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 46, + "startColumn": 43, + "charOffset": 1872, + "charLength": 4, + "snippet": { + "text": "\"wb\"" + } + }, + "contextRegion": { + "startLine": 44, + "startColumn": 43, + "charOffset": 1642, + "charLength": 4, + "snippet": { + "text": "\t\tif (CURL* curl = curl_easy_init(); curl && !mapDownloadUrl.empty()) {\n\t\t\tg_logger().info(\"Downloading \" + g_configManager().getString(MAP_NAME, __FUNCTION__) + \".otbm to world folder\");\n\t\t\tFILE* otbm = fopen(identifier.c_str(), \"wb\");\n\t\t\tcurl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);\n\t\t\tcurl_easy_setopt(curl, CURLOPT_URL, mapDownloadUrl.c_str());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f3292381aa9feed6af29bcc4d594031617a38731decfd75f91f6ca2762d6130" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 51, + "startColumn": 4, + "charOffset": 2125, + "charLength": 17, + "snippet": { + "text": "curl_easy_perform" + } + }, + "contextRegion": { + "startLine": 49, + "startColumn": 4, + "charOffset": 1998, + "charLength": 17, + "snippet": { + "text": "\t\t\tcurl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);\n\t\t\tcurl_easy_setopt(curl, CURLOPT_WRITEDATA, otbm);\n\t\t\tcurl_easy_perform(curl);\n\t\t\tcurl_easy_cleanup(curl);\n\t\t\tfclose(otbm);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7169e0216bb41e396d18e3a9e5bffe0141b758d33ba4620855614bc71986622a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err33-c", + "ruleIndex": 132, + "kind": "fail", + "level": "warning", + "message": { + "text": "the value returned by this function should not be disregarded; neglecting it may lead to errors" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 53, + "startColumn": 4, + "charOffset": 2181, + "charLength": 6, + "snippet": { + "text": "fclose" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 4, + "charOffset": 2122, + "charLength": 6, + "snippet": { + "text": "\t\t\tcurl_easy_perform(curl);\n\t\t\tcurl_easy_cleanup(curl);\n\t\t\tfclose(otbm);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa65ae8fd9b1f9c6ea6aef693195162264e81521d4ed5b59f84415f88eae30d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 53, + "startColumn": 4, + "charOffset": 2181, + "charLength": 6, + "snippet": { + "text": "fclose" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 4, + "charOffset": 2122, + "charLength": 6, + "snippet": { + "text": "\t\t\tcurl_easy_perform(curl);\n\t\t\tcurl_easy_cleanup(curl);\n\t\t\tfclose(otbm);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd86d043395a1e273ca8d1a95b9acda192986ac473bc23bb79a01fde6b843549" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-owning-memory", + "ruleIndex": 503, + "kind": "fail", + "level": "warning", + "message": { + "text": "calling legacy resource function without passing a 'gsl::owner<>'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 53, + "startColumn": 4, + "charOffset": 2181, + "charLength": 6, + "snippet": { + "text": "fclose" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 4, + "charOffset": 2122, + "charLength": 6, + "snippet": { + "text": "\t\t\tcurl_easy_perform(curl);\n\t\t\tcurl_easy_cleanup(curl);\n\t\t\tfclose(otbm);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cdbfdc54f6228088a48cdbfd82b2c74022cf9dae7f81c18fd08d12ee8d4a96cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 69, + "startColumn": 3, + "charOffset": 2580, + "charLength": 5, + "snippet": { + "text": "IOMap" + } + }, + "contextRegion": { + "startLine": 67, + "startColumn": 3, + "charOffset": 2556, + "charLength": 5, + "snippet": { + "text": "\n\tif (loadMonsters) {\n\t\tIOMap::loadMonsters(this);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8500a288904965b0f0bcb4a0b1c25cf4e0c943e4d6c3d6d710491dcd6c76fed8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 73, + "startColumn": 3, + "charOffset": 2632, + "charLength": 5, + "snippet": { + "text": "IOMap" + } + }, + "contextRegion": { + "startLine": 71, + "startColumn": 3, + "charOffset": 2610, + "charLength": 5, + "snippet": { + "text": "\n\tif (loadHouses) {\n\t\tIOMap::loadHouses(this);\n\n\t\t/**" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "618341f9eb8c610be0964122bdce14fc81aeca16df5504af670a14d7b4f82380" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 81, + "startColumn": 4, + "charOffset": 2944, + "charLength": 14, + "snippet": { + "text": "IOMapSerialize" + } + }, + "contextRegion": { + "startLine": 79, + "startColumn": 4, + "charOffset": 2863, + "charLength": 14, + "snippet": { + "text": "\t\t */\n\t\tif (!g_configManager().getBoolean(TOGGLE_MAP_CUSTOM, __FUNCTION__)) {\n\t\t\tIOMapSerialize::loadHouseInfo();\n\t\t\tIOMapSerialize::loadHouseItems(this);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "030b83472f650a29a44c13853271448d1c7691d81c83e7fc51af5d743c3877b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 3, + "charOffset": 3045, + "charLength": 5, + "snippet": { + "text": "IOMap" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 3, + "charOffset": 3025, + "charLength": 5, + "snippet": { + "text": "\n\tif (loadNpcs) {\n\t\tIOMap::loadNpcs(this);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6475f70a64ddb0cd1c2e87138002754e0eb53aced569a7dd6d13cfbdc42dcb2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 3, + "charOffset": 3092, + "charLength": 5, + "snippet": { + "text": "IOMap" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 3, + "charOffset": 3071, + "charLength": 5, + "snippet": { + "text": "\n\tif (loadZones) {\n\t\tIOMap::loadZones(this);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8500a288904965b0f0bcb4a0b1c25cf4e0c943e4d6c3d6d710491dcd6c76fed8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 129, + "startColumn": 2, + "charOffset": 4345, + "charLength": 14, + "snippet": { + "text": "IOMapSerialize" + } + }, + "contextRegion": { + "startLine": 127, + "startColumn": 2, + "charOffset": 4315, + "charLength": 14, + "snippet": { + "text": "\nvoid Map::loadHouseInfo() {\n\tIOMapSerialize::loadHouseInfo();\n\tIOMapSerialize::loadHouseItems(this);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1924afc1bf6ce26b636b24d7560d4525665aa5073fd7207b4b90da28015a3acf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 135, + "startColumn": 2, + "charOffset": 4461, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 133, + "startColumn": 2, + "charOffset": 4420, + "charLength": 3, + "snippet": { + "text": "bool Map::save() {\n\tbool saved = false;\n\tfor (uint32_t tries = 0; tries < 6; tries++) {\n\t\tif (IOMapSerialize::saveHouseInfo()) {\n\t\t\tsaved = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df97a593e661c9a4e37b274cc85e296d53b3fe8c70057cfecc7761494f234409" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 135, + "startColumn": 35, + "charOffset": 4494, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 133, + "startColumn": 35, + "charOffset": 4420, + "charLength": 1, + "snippet": { + "text": "bool Map::save() {\n\tbool saved = false;\n\tfor (uint32_t tries = 0; tries < 6; tries++) {\n\t\tif (IOMapSerialize::saveHouseInfo()) {\n\t\t\tsaved = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54157b0eee85df0c43d54fd0988e0a05e945209b3127d3a746885a22e36ba79e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 148, + "startColumn": 6, + "charOffset": 4794, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 146, + "startColumn": 6, + "charOffset": 4662, + "charLength": 1, + "snippet": { + "text": "std::shared_ptr Map::getOrCreateTile(uint16_t x, uint16_t y, uint8_t z, bool isDynamic) {\n\tauto tile = getTile(x, y, z);\n\tif (!tile) {\n\t\tif (isDynamic) {\n\t\t\ttile = std::make_shared(x, y, z);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "028a0634ab057a64e10ba37ca6e76dfb27c4df0900a2e32ab60eb99ac94fdd31" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'getLoadedTile' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 161, + "startColumn": 54, + "charOffset": 5037, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 159, + "startColumn": 54, + "charOffset": 4981, + "charLength": 8, + "snippet": { + "text": "}\n\nstd::shared_ptr Map::getLoadedTile(uint16_t x, uint16_t y, uint8_t z) {\n\tif (z >= MAP_MAX_LAYERS) {\n\t\treturn nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31d7aaabaee885f9b1936208a1631c981f56c61b77c7c0b05440da2702f9b193" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto leaf' can be declared as 'auto *const leaf'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 166, + "startColumn": 2, + "charOffset": 5113, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 2, + "charOffset": 5108, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tconst auto leaf = getMapSector(x, y);\n\tif (!leaf) {\n\t\treturn nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "963301e84f2c17706ecc6d46c8373a9430dca349013d1bb12677401ce363dee4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 6, + "charOffset": 5156, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 6, + "charOffset": 5111, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto leaf = getMapSector(x, y);\n\tif (!leaf) {\n\t\treturn nullptr;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "274960258d658ae13da6a6e98a24f602d7a7a9bc6f44788088107dfbdbf41133" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'MapSector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 7, + "charOffset": 5157, + "charLength": 4, + "snippet": { + "text": "leaf" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 7, + "charOffset": 5111, + "charLength": 4, + "snippet": { + "text": "\n\tconst auto leaf = getMapSector(x, y);\n\tif (!leaf) {\n\t\treturn nullptr;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5da5294593d447c2e3e382012b6d5c97094a2f7f36bde9f766441a1816d4defe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 6, + "charOffset": 5232, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 6, + "charOffset": 5186, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto &floor = leaf->getFloor(z);\n\tif (!floor) {\n\t\treturn nullptr;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2db76563e4923ae74bc10ccd0c231f03a2ae5e599dc9c6fa338dbf7fa03d02a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'getTile' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 180, + "startColumn": 48, + "charOffset": 5369, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 178, + "startColumn": 48, + "charOffset": 5319, + "charLength": 8, + "snippet": { + "text": "}\n\nstd::shared_ptr Map::getTile(uint16_t x, uint16_t y, uint8_t z) {\n\tif (z >= MAP_MAX_LAYERS) {\n\t\treturn nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a981d7f8d5cf54e4f1cf9fcebe7991be5c245cceb80f6c5a11df8ca0cb7172f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto sector' can be declared as 'auto *const sector'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 185, + "startColumn": 2, + "charOffset": 5445, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 183, + "startColumn": 2, + "charOffset": 5440, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tconst auto sector = getMapSector(x, y);\n\tif (!sector) {\n\t\treturn nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "019288d889a139b39e37e3a36575eb5dd930398b68e0fb6aa6947a01a75eefbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 186, + "startColumn": 6, + "charOffset": 5490, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 184, + "startColumn": 6, + "charOffset": 5443, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto sector = getMapSector(x, y);\n\tif (!sector) {\n\t\treturn nullptr;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cab2a0938ca3006c02706430328554d06659e8bcf2500f27787731102c5c18b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'MapSector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 186, + "startColumn": 7, + "charOffset": 5491, + "charLength": 6, + "snippet": { + "text": "sector" + } + }, + "contextRegion": { + "startLine": 184, + "startColumn": 7, + "charOffset": 5443, + "charLength": 6, + "snippet": { + "text": "\n\tconst auto sector = getMapSector(x, y);\n\tif (!sector) {\n\t\treturn nullptr;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53ca77ae68bd73d6bf6b3656106a9ce9f74c53439326afab32ecce9a048327b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 191, + "startColumn": 6, + "charOffset": 5570, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 189, + "startColumn": 6, + "charOffset": 5522, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto &floor = sector->getFloor(z);\n\tif (!floor) {\n\t\treturn nullptr;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28f761156d8d163ffbea455c0f94cd5821452d5a691d0b99ba86cb3ab9a3b698" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 201, + "startColumn": 6, + "charOffset": 5815, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 6, + "charOffset": 5707, + "charLength": 1, + "snippet": { + "text": "void Map::refreshZones(uint16_t x, uint16_t y, uint8_t z) {\n\tconst auto tile = getLoadedTile(x, y, z);\n\tif (!tile) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "780a9c93126aad5963b01c6f608b46567fb904ba71a9c814e933ab67e9e8fd92" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 207, + "startColumn": 2, + "charOffset": 5918, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 205, + "startColumn": 2, + "charOffset": 5838, + "charLength": 3, + "snippet": { + "text": "\ttile->clearZones();\n\tconst auto &zones = Zone::getZones(tile->getPosition());\n\tfor (const auto &zone : zones) {\n\t\ttile->addZone(zone);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d333fefba0bc08f74897d12b6c77f66adb64a09b9033d33a75f41df7a17f098a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'newTile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 212, + "startColumn": 76, + "charOffset": 6055, + "charLength": 7, + "snippet": { + "text": "newTile" + } + }, + "contextRegion": { + "startLine": 210, + "startColumn": 76, + "charOffset": 5977, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid Map::setTile(uint16_t x, uint16_t y, uint8_t z, std::shared_ptr newTile) {\n\tif (z >= MAP_MAX_LAYERS) {\n\t\tg_logger().error(\"Attempt to set tile on invalid coordinate: {}\", Position(x, y, z).toString());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1005d10ae025479f610b7140440b6aeab645aeeb0c67c0e5af8825ca93bfb26e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto sector' can be declared as 'auto *const sector'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 218, + "startColumn": 6, + "charOffset": 6212, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 216, + "startColumn": 6, + "charOffset": 6203, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tif (const auto sector = getMapSector(x, y)) {\n\t\tsector->createFloor(z)->setTile(x, y, newTile);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1387e5e2393d81e86771d434012fddbd8f5a7bb029b55d459fe5a268273c8ddc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'placeCreature' has cognitive complexity of 39 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 225, + "startColumn": 11, + "charOffset": 6396, + "charLength": 13, + "snippet": { + "text": "placeCreature" + } + }, + "contextRegion": { + "startLine": 223, + "startColumn": 11, + "charOffset": 6383, + "charLength": 13, + "snippet": { + "text": "}\n\nbool Map::placeCreature(const Position ¢erPos, std::shared_ptr creature, bool extendedPos /* = false*/, bool forceLogin /* = false*/) {\n\tauto monster = creature->getMonster();\n\tif (monster) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c81987450213f828ca805ed7100461d6d86f5cfc2929ac71c47d0b756b9fdb9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 225, + "startColumn": 78, + "charOffset": 6463, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 223, + "startColumn": 78, + "charOffset": 6383, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Map::placeCreature(const Position ¢erPos, std::shared_ptr creature, bool extendedPos /* = false*/, bool forceLogin /* = false*/) {\n\tauto monster = creature->getMonster();\n\tif (monster) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5cbd850c08214c9b2f4dfa5d635491ad67e4f03804efbf8c4072f0b1dc257e52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'foundTile' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 231, + "startColumn": 7, + "charOffset": 6639, + "charLength": 9, + "snippet": { + "text": "foundTile" + } + }, + "contextRegion": { + "startLine": 229, + "startColumn": 7, + "charOffset": 6629, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tbool foundTile;\n\tbool placeInPZ;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3875523990181b49de0d8d8e0a706ecde3c382926fa01e8cadfab5f8ccc7b65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'placeInPZ' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 232, + "startColumn": 7, + "charOffset": 6656, + "charLength": 9, + "snippet": { + "text": "placeInPZ" + } + }, + "contextRegion": { + "startLine": 230, + "startColumn": 7, + "charOffset": 6632, + "charLength": 9, + "snippet": { + "text": "\n\tbool foundTile;\n\tbool placeInPZ;\n\n\tstd::shared_ptr tile = getTile(centerPos.x, centerPos.y, centerPos.z);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be66450dd54f6ab710e6714040cfa3dafe5080ddc9fefe229aeed26770ecbd3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 237, + "startColumn": 73, + "charOffset": 6886, + "charLength": 1, + "snippet": { + "text": "|" + } + }, + "contextRegion": { + "startLine": 235, + "startColumn": 73, + "charOffset": 6746, + "charLength": 1, + "snippet": { + "text": "\tif (tile) {\n\t\tplaceInPZ = tile->hasFlag(TILESTATE_PROTECTIONZONE);\n\t\tReturnValue ret = tile->queryAdd(0, creature, 1, FLAG_IGNOREBLOCKITEM | FLAG_IGNOREFIELDDAMAGE);\n\t\tfoundTile = forceLogin || ret == RETURNVALUE_NOERROR || ret == RETURNVALUE_PLAYERISNOTINVITED;\n\t\tif (monster) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f60d4d7faba3cd7c8a40aaa69020583c5885f3f516a0da947d6405e43dbca19" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 276, + "startColumn": 3, + "charOffset": 7908, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 274, + "startColumn": 3, + "charOffset": 7901, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfor (const auto &it : relList) {\n\t\t\tPosition tryPos(centerPos.x + it.first, centerPos.y + it.second, centerPos.z);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d0dbdb7c1eb0dfa3b0362690b97a83324b3ffc2ce5f8f97195d87c1048656ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 277, + "startColumn": 20, + "charOffset": 7960, + "charLength": 9, + "snippet": { + "text": "centerPos" + } + }, + "contextRegion": { + "startLine": 275, + "startColumn": 20, + "charOffset": 7905, + "charLength": 9, + "snippet": { + "text": "\n\t\tfor (const auto &it : relList) {\n\t\t\tPosition tryPos(centerPos.x + it.first, centerPos.y + it.second, centerPos.z);\n\n\t\t\ttile = getTile(tryPos.x, tryPos.y, tryPos.z);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a785e3e536fc0d3845cbfcb1239f62a6a7dcb1b9f57167400638701505f5d972" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 277, + "startColumn": 44, + "charOffset": 7984, + "charLength": 9, + "snippet": { + "text": "centerPos" + } + }, + "contextRegion": { + "startLine": 275, + "startColumn": 44, + "charOffset": 7905, + "charLength": 9, + "snippet": { + "text": "\n\t\tfor (const auto &it : relList) {\n\t\t\tPosition tryPos(centerPos.x + it.first, centerPos.y + it.second, centerPos.z);\n\n\t\t\ttile = getTile(tryPos.x, tryPos.y, tryPos.z);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b78b41a8834aa9722d55391886dabc48db01fe9e847cacf6ceb5a5cb0be32f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 280, + "startColumn": 8, + "charOffset": 8080, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 278, + "startColumn": 8, + "charOffset": 8023, + "charLength": 1, + "snippet": { + "text": "\n\t\t\ttile = getTile(tryPos.x, tryPos.y, tryPos.z);\n\t\t\tif (!tile || (placeInPZ && !tile->hasFlag(TILESTATE_PROTECTIONZONE))) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32b960c02977072553106b586075c8221a52cea5be0eaaca777b2f616565ecea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 293, + "startColumn": 60, + "charOffset": 8434, + "charLength": 1, + "snippet": { + "text": "|" + } + }, + "contextRegion": { + "startLine": 291, + "startColumn": 60, + "charOffset": 8369, + "charLength": 1, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (tile->queryAdd(0, creature, 1, FLAG_IGNOREBLOCKITEM | FLAG_IGNOREFIELDDAMAGE) == RETURNVALUE_NOERROR) {\n\t\t\t\tif (!extendedPos || isSightClear(centerPos, tryPos, false)) {\n\t\t\t\t\tfoundTile = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9925136e729c4c5ca4ed7e78047a58171d96815c9d40378e5138ff1c27ac5362" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 303, + "startColumn": 5, + "charOffset": 8644, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 301, + "startColumn": 5, + "charOffset": 8603, + "charLength": 4, + "snippet": { + "text": "\t\tif (!foundTile) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tif (monster) {\n\t\t\t\tmonster->ignoreFieldDamage = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08dfc744037bdc7ad4a917d6de4e42a5264f3dc931957933a8a2077dd9808b8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'moveCreature' has cognitive complexity of 30 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 322, + "startColumn": 11, + "charOffset": 9055, + "charLength": 12, + "snippet": { + "text": "moveCreature" + } + }, + "contextRegion": { + "startLine": 320, + "startColumn": 11, + "charOffset": 9042, + "charLength": 12, + "snippet": { + "text": "}\n\nvoid Map::moveCreature(const std::shared_ptr &creature, const std::shared_ptr &newTile, bool forceTeleport /* = false*/) {\n\tif (!creature || !newTile) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0911bcae1a3d62107ca4bef09a5a47b6a7385af0cc9d392c7ece850ff862d0c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 323, + "startColumn": 6, + "charOffset": 9189, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 321, + "startColumn": 6, + "charOffset": 9044, + "charLength": 1, + "snippet": { + "text": "\nvoid Map::moveCreature(const std::shared_ptr &creature, const std::shared_ptr &newTile, bool forceTeleport /* = false*/) {\n\tif (!creature || !newTile) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7c3c17f5adec17939a68591e3946376e9e29b04709cac6d45ee8b79059ae512" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 323, + "startColumn": 19, + "charOffset": 9202, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 321, + "startColumn": 19, + "charOffset": 9044, + "charLength": 1, + "snippet": { + "text": "\nvoid Map::moveCreature(const std::shared_ptr &creature, const std::shared_ptr &newTile, bool forceTeleport /* = false*/) {\n\tif (!creature || !newTile) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca2fe6c625e43b5ebda0508a83228b444de6e22c1394ab8b1062a306ea05d3fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 329, + "startColumn": 6, + "charOffset": 9278, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 327, + "startColumn": 6, + "charOffset": 9228, + "charLength": 1, + "snippet": { + "text": "\tconst auto &oldTile = creature->getTile();\n\n\tif (!oldTile) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a626ada645fe73b039520d2f923f28508a25f6744616cf63eb5e574318528d1c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 343, + "startColumn": 35, + "charOffset": 9647, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 341, + "startColumn": 35, + "charOffset": 9609, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tbool teleport = forceTeleport || !newTile->getGround() || !Position::areInRange<1, 1, 0>(oldPos, newPos);\n\n\tSpectators spectators;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ad86081fb558c407f432205b6d49b1fde4191820aaee4f0a697da7b3257dee2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 352, + "startColumn": 3, + "charOffset": 9962, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 350, + "startColumn": 3, + "charOffset": 9916, + "charLength": 2, + "snippet": { + "text": "\t\tint32_t maxRangeY = MAP_MAX_VIEW_PORT_Y;\n\n\t\tif (oldPos.y > newPos.y) {\n\t\t\t++minRangeY;\n\t\t} else if (oldPos.y < newPos.y) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79129d3bc8aad08c0c307f18e1d4abf61cc65c016f513ff6566094e6e8fccab8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 358, + "startColumn": 3, + "charOffset": 10064, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 356, + "startColumn": 3, + "charOffset": 10057, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (oldPos.x < newPos.x) {\n\t\t\t++maxRangeX;\n\t\t} else if (oldPos.x > newPos.x) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "458bb0ec96478ecf0a25a601c31f04012be83eec1e1b52eae711212a8e3c7349" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 364, + "startColumn": 14, + "charOffset": 10177, + "charLength": 4, + "snippet": { + "text": "find" + } + }, + "contextRegion": { + "startLine": 362, + "startColumn": 14, + "charOffset": 10159, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tspectators.find(oldPos, true, minRangeX, maxRangeX, minRangeY, maxRangeY);\n\t} else {\n\t\tspectators.find(oldPos, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89b6d50215bc48ec059c67fdc6f7de7b563455ab4fa00316cf774539683fba79" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 366, + "startColumn": 14, + "charOffset": 10274, + "charLength": 4, + "snippet": { + "text": "find" + } + }, + "contextRegion": { + "startLine": 364, + "startColumn": 14, + "charOffset": 10164, + "charLength": 4, + "snippet": { + "text": "\t\tspectators.find(oldPos, true, minRangeX, maxRangeX, minRangeY, maxRangeY);\n\t} else {\n\t\tspectators.find(oldPos, true);\n\t\tspectators.find(newPos, true);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39e1f5b3b455454d1ac68afb631df1fee640e89bf667e8215bd1b0e653b42468" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 367, + "startColumn": 14, + "charOffset": 10317, + "charLength": 4, + "snippet": { + "text": "find" + } + }, + "contextRegion": { + "startLine": 365, + "startColumn": 14, + "charOffset": 10251, + "charLength": 4, + "snippet": { + "text": "\t} else {\n\t\tspectators.find(oldPos, true);\n\t\tspectators.find(newPos, true);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7169e0216bb41e396d18e3a9e5bffe0141b758d33ba4620855614bc71986622a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 374, + "startColumn": 2, + "charOffset": 10503, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 372, + "startColumn": 2, + "charOffset": 10407, + "charLength": 3, + "snippet": { + "text": "\tstd::vector oldStackPosVector;\n\toldStackPosVector.reserve(playersSpectators.size());\n\tfor (const auto &spec : playersSpectators) {\n\t\tif (spec->canSeeCreature(creature)) {\n\t\t\toldStackPosVector.push_back(oldTile->getClientIndexOfCreature(spec->getPlayer(), creature));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "884507437c9d1c68ab025d1d7ad1d63d22ecbd03c8569b30d32956ea8090f438" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 398, + "startColumn": 3, + "charOffset": 11135, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 396, + "startColumn": 3, + "charOffset": 11114, + "charLength": 2, + "snippet": { + "text": "\n\tif (!teleport) {\n\t\tif (oldPos.y > newPos.y) {\n\t\t\tcreature->setDirection(DIRECTION_NORTH);\n\t\t} else if (oldPos.y < newPos.y) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c617a308089cd67b1abd8746a4edf9f2dd4c700d3f881e8b5205f9b8d219b58b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 404, + "startColumn": 3, + "charOffset": 11293, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 402, + "startColumn": 3, + "charOffset": 11286, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (oldPos.x < newPos.x) {\n\t\t\tcreature->setDirection(DIRECTION_EAST);\n\t\t} else if (oldPos.x > newPos.x) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4a81ebaabc67f93c19be71392b6c4f47c54ae9cea520f26020c01ed6f071b9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 413, + "startColumn": 2, + "charOffset": 11485, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 411, + "startColumn": 2, + "charOffset": 11450, + "charLength": 3, + "snippet": { + "text": "\t// send to client\n\tsize_t i = 0;\n\tfor (const auto &spectator : playersSpectators) {\n\t\t// Use the correct stackpos\n\t\tint32_t stackpos = oldStackPosVector[i++];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29983e966e017b5a7b6741b88a6040614df61527d9127cda1fad452e38abea92" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 423, + "startColumn": 2, + "charOffset": 11833, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 421, + "startColumn": 2, + "charOffset": 11814, + "charLength": 3, + "snippet": { + "text": "\n\t// event method\n\tfor (const auto &spectator : spectators) {\n\t\tspectator->onCreatureMove(creature, newTile, newPos, oldTile, oldPos, teleport);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d64af1ccf32202f600df4b730925cea17596f23c9283b7d2e14b55eedc9bc0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 436, + "startColumn": 20, + "charOffset": 12470, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 434, + "startColumn": 20, + "charOffset": 12397, + "charLength": 1, + "snippet": { + "text": "\t// underground 8->15\n\t// ground level and above 7->0\n\tif ((fromPos.z >= 8 && toPos.z <= MAP_INIT_SURFACE_LAYER) || (toPos.z >= MAP_INIT_SURFACE_LAYER + 1 && fromPos.z <= MAP_INIT_SURFACE_LAYER)) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd7fe666eb9713b28ff36af3e79ddbc7274f7ba84f4c6994eb6009c702241799" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 454, + "startColumn": 6, + "charOffset": 12930, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 452, + "startColumn": 6, + "charOffset": 12921, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!(lineOfSight & SightLine_CheckSightLine)) {\n\t\treturn true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f1d3b4f35116fe6c9c87b82ccaad554a16a7aae4b9be92791624f2863a1b0fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 454, + "startColumn": 7, + "charOffset": 12931, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 452, + "startColumn": 7, + "charOffset": 12921, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!(lineOfSight & SightLine_CheckSightLine)) {\n\t\treturn true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b36e84f0e1f121892054f2f9af67c3ab0c4393df8d56a0cd3ff668d4aaad112" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 454, + "startColumn": 20, + "charOffset": 12944, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 452, + "startColumn": 20, + "charOffset": 12921, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!(lineOfSight & SightLine_CheckSightLine)) {\n\t\treturn true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7889be51ccfd8d379593e4a51e26288a634476de11c34cc10de182ff7e6a92bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 458, + "startColumn": 38, + "charOffset": 13031, + "charLength": 11, + "snippet": { + "text": "lineOfSight" + } + }, + "contextRegion": { + "startLine": 456, + "startColumn": 38, + "charOffset": 12990, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\treturn isSightClear(fromPos, toPos, lineOfSight & SightLine_FloorCheck);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c005a946a9182070aa25160923d0f1f92efb8bd42378b898321ddd5b9fe3368" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 458, + "startColumn": 50, + "charOffset": 13043, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 456, + "startColumn": 50, + "charOffset": 12990, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\treturn isSightClear(fromPos, toPos, lineOfSight & SightLine_FloorCheck);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0771ec8177e81cdda063e32a0a132d17481d6e9e2053bfd6bf1f4b05e9124367" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'checkSightLine' has cognitive complexity of 70 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 461, + "startColumn": 11, + "charOffset": 13081, + "charLength": 14, + "snippet": { + "text": "checkSightLine" + } + }, + "contextRegion": { + "startLine": 459, + "startColumn": 11, + "charOffset": 13068, + "charLength": 14, + "snippet": { + "text": "}\n\nbool Map::checkSightLine(Position start, Position destination) {\n\tif (start.x == destination.x && start.y == destination.y) {\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ae6bb43cd393412363477027eba538e6242e88e634a5110a42f275d0ec48c7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 472, + "startColumn": 3, + "charOffset": 13471, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 470, + "startColumn": 3, + "charOffset": 13380, + "charLength": 5, + "snippet": { + "text": "\t\t// Horizontal line\n\t\tconst uint16_t delta = start.x < destination.x ? 0x0001 : 0xFFFF;\n\t\twhile (--distanceX > 0) {\n\t\t\tstart.x += delta;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78636216d69e6b1259afc2793572e6e3cd331792e5f21b690cc57de60bc729a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'distanceX' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 472, + "startColumn": 10, + "charOffset": 13478, + "charLength": 2, + "snippet": { + "text": "--" + } + }, + "contextRegion": { + "startLine": 470, + "startColumn": 10, + "charOffset": 13380, + "charLength": 2, + "snippet": { + "text": "\t\t// Horizontal line\n\t\tconst uint16_t delta = start.x < destination.x ? 0x0001 : 0xFFFF;\n\t\twhile (--distanceX > 0) {\n\t\t\tstart.x += delta;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ea22b66bcd1f1e6186bd837e080502fc8f89a7f6c20bc68ee38f344e2a51634" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 483, + "startColumn": 3, + "charOffset": 13797, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 481, + "startColumn": 3, + "charOffset": 13708, + "charLength": 5, + "snippet": { + "text": "\t\t// Vertical line\n\t\tconst uint16_t delta = start.y < destination.y ? 0x0001 : 0xFFFF;\n\t\twhile (--distanceY > 0) {\n\t\t\tstart.y += delta;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37e0b31f839b5ee369eb09c5f7236b28c7211bb92f9dbee235c671e758e64693" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'distanceY' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 483, + "startColumn": 10, + "charOffset": 13804, + "charLength": 2, + "snippet": { + "text": "--" + } + }, + "contextRegion": { + "startLine": 481, + "startColumn": 10, + "charOffset": 13708, + "charLength": 2, + "snippet": { + "text": "\t\t// Vertical line\n\t\tconst uint16_t delta = start.y < destination.y ? 0x0001 : 0xFFFF;\n\t\twhile (--distanceY > 0) {\n\t\t\tstart.y += delta;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2b5bc93e4d81445f5ab7c77ce3d86d7747fcc530415543392a9a3d72f402858" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'eAdj' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 494, + "startColumn": 12, + "charOffset": 14223, + "charLength": 4, + "snippet": { + "text": "eAdj" + } + }, + "contextRegion": { + "startLine": 492, + "startColumn": 12, + "charOffset": 14004, + "charLength": 4, + "snippet": { + "text": "\t\t// Xiaolin Wu's line algorithm - https://en.wikipedia.org/wiki/Xiaolin_Wu%27s_line_algorithm\n\t\t// based on Michael Abrash's implementation - https://www.amazon.com/gp/product/1576101746/102-5103244-8168911\n\t\tuint16_t eAdj;\n\t\tuint16_t eAcc = 0;\n\t\tuint16_t deltaX = 0x0001;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a2ba89dfc7691ac49d9350264eb8a41b5d94002a4da4d86a714796fccf100e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 496, + "startColumn": 21, + "charOffset": 14270, + "charLength": 6, + "snippet": { + "text": "0x0001" + } + }, + "contextRegion": { + "startLine": 494, + "startColumn": 21, + "charOffset": 14212, + "charLength": 6, + "snippet": { + "text": "\t\tuint16_t eAdj;\n\t\tuint16_t eAcc = 0;\n\t\tuint16_t deltaX = 0x0001;\n\t\tuint16_t deltaY = 0x0001;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "471a0ffe7a34632f953ca3394071e7985ba9ec3b3f2961f25cabac9bac1a41b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 497, + "startColumn": 21, + "charOffset": 14298, + "charLength": 6, + "snippet": { + "text": "0x0001" + } + }, + "contextRegion": { + "startLine": 495, + "startColumn": 21, + "charOffset": 14229, + "charLength": 6, + "snippet": { + "text": "\t\tuint16_t eAcc = 0;\n\t\tuint16_t deltaX = 0x0001;\n\t\tuint16_t deltaY = 0x0001;\n\n\t\tif (distanceY > distanceX) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28453438b553c7f76264bef886e4eecb5f9def53b766d92fbb301c86c5a988a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 500, + "startColumn": 11, + "charOffset": 14348, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 498, + "startColumn": 11, + "charOffset": 14306, + "charLength": 1, + "snippet": { + "text": "\n\t\tif (distanceY > distanceX) {\n\t\t\teAdj = (static_cast(distanceX) << 16) / static_cast(distanceY);\n\n\t\t\tif (start.y > destination.y) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bcd0f2940fcc5d8463869041b10753a942dcf3f44b6273debdd95dbd5951a78b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 500, + "startColumn": 48, + "charOffset": 14385, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 498, + "startColumn": 48, + "charOffset": 14306, + "charLength": 2, + "snippet": { + "text": "\n\t\tif (distanceY > distanceX) {\n\t\t\teAdj = (static_cast(distanceX) << 16) / static_cast(distanceY);\n\n\t\t\tif (start.y > destination.y) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9856e1f63bc2b8e95d8e0e86607a60a2c65897b24ce065d4faf66e6ff92ad28f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 500, + "startColumn": 48, + "charOffset": 14385, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 498, + "startColumn": 48, + "charOffset": 14306, + "charLength": 2, + "snippet": { + "text": "\n\t\tif (distanceY > distanceX) {\n\t\t\teAdj = (static_cast(distanceX) << 16) / static_cast(distanceY);\n\n\t\t\tif (start.y > destination.y) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf6a2e4435ff4171e61bb0057a7649bd012fa23e3c4aafa6c52b8b990c66021b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 507, + "startColumn": 14, + "charOffset": 14590, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 505, + "startColumn": 14, + "charOffset": 14538, + "charLength": 6, + "snippet": { + "text": "\t\t\t}\n\t\t\tif (start.x > destination.x) {\n\t\t\t\tdeltaX = 0xFFFF;\n\t\t\t\teAcc -= eAdj;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "405ff976759379047c738825974972233c6d9af6769882ec440c57d22997152a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 507, + "startColumn": 14, + "charOffset": 14590, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 505, + "startColumn": 14, + "charOffset": 14538, + "charLength": 6, + "snippet": { + "text": "\t\t\t}\n\t\t\tif (start.x > destination.x) {\n\t\t\t\tdeltaX = 0xFFFF;\n\t\t\t\teAcc -= eAdj;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5aabfea9ac423c8887b40645952148ef125ed765e421ae93b1d113517babd282" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 511, + "startColumn": 4, + "charOffset": 14625, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 509, + "startColumn": 4, + "charOffset": 14616, + "charLength": 5, + "snippet": { + "text": "\t\t\t}\n\n\t\t\twhile (--distanceY > 0) {\n\t\t\t\tuint16_t xIncrease = 0;\n\t\t\t\tconst uint16_t eAccTemp = eAcc;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ff170f8d292ab18f8280ee02bd67cec84086b627f7c54285a88662b254a71a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'distanceY' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 511, + "startColumn": 11, + "charOffset": 14632, + "charLength": 2, + "snippet": { + "text": "--" + } + }, + "contextRegion": { + "startLine": 509, + "startColumn": 11, + "charOffset": 14616, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\twhile (--distanceY > 0) {\n\t\t\t\tuint16_t xIncrease = 0;\n\t\t\t\tconst uint16_t eAccTemp = eAcc;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62f900e77b1913609ce677696143c1e37c8707b64e0c63451f643e723f805371" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 519, + "startColumn": 32, + "charOffset": 14824, + "charLength": 5, + "snippet": { + "text": "start" + } + }, + "contextRegion": { + "startLine": 517, + "startColumn": 32, + "charOffset": 14786, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tconst auto &tile = getTile(start.x + xIncrease, start.y + deltaY, start.z);\n\t\t\t\tif (tile && tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) {\n\t\t\t\t\tif (Position::areInRange<1, 1>(start, destination)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0874bb3b8318c505d3e4e49b93431d2d79cb1384bcea2e066f784533549ffaeb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 519, + "startColumn": 53, + "charOffset": 14845, + "charLength": 5, + "snippet": { + "text": "start" + } + }, + "contextRegion": { + "startLine": 517, + "startColumn": 53, + "charOffset": 14786, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tconst auto &tile = getTile(start.x + xIncrease, start.y + deltaY, start.z);\n\t\t\t\tif (tile && tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) {\n\t\t\t\t\tif (Position::areInRange<1, 1>(start, destination)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bca8a7aeebb0509615887d03f27bf8466d83689e8af2885673e7f46ff71d9684" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in conditional return statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 522, + "startColumn": 14, + "charOffset": 15010, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 520, + "startColumn": 14, + "charOffset": 14873, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tif (tile && tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) {\n\t\t\t\t\tif (Position::areInRange<1, 1>(start, destination)) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0fddd3f89ab4ac146ec86f25bf35c86c317166639271ba13006fee37c43d0b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 531, + "startColumn": 11, + "charOffset": 15124, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 529, + "startColumn": 11, + "charOffset": 15098, + "charLength": 1, + "snippet": { + "text": "\t\t\t}\n\t\t} else {\n\t\t\teAdj = (static_cast(distanceY) << 16) / static_cast(distanceX);\n\n\t\t\tif (start.x > destination.x) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2076ca2504493663efebd75c39811972294f0d3e1a6addb4946906bad096a798" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 531, + "startColumn": 48, + "charOffset": 15161, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 529, + "startColumn": 48, + "charOffset": 15098, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\t\t} else {\n\t\t\teAdj = (static_cast(distanceY) << 16) / static_cast(distanceX);\n\n\t\t\tif (start.x > destination.x) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1fe1c553d25fcfa83db924f2b48ad767e7fc65e3239e916c9e22fee0952401de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 531, + "startColumn": 48, + "charOffset": 15161, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 529, + "startColumn": 48, + "charOffset": 15098, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\t\t} else {\n\t\t\teAdj = (static_cast(distanceY) << 16) / static_cast(distanceX);\n\n\t\t\tif (start.x > destination.x) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98a5cfe6ae58b919a8f6cde42fdeee81cff3233e33d19190990b840bd7b5906a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 538, + "startColumn": 14, + "charOffset": 15366, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 536, + "startColumn": 14, + "charOffset": 15314, + "charLength": 6, + "snippet": { + "text": "\t\t\t}\n\t\t\tif (start.y > destination.y) {\n\t\t\t\tdeltaY = 0xFFFF;\n\t\t\t\teAcc -= eAdj;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b537de2a075d947241ac689e018865e763ce814be2c3fac165a7884a5f508132" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 538, + "startColumn": 14, + "charOffset": 15366, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 536, + "startColumn": 14, + "charOffset": 15314, + "charLength": 6, + "snippet": { + "text": "\t\t\t}\n\t\t\tif (start.y > destination.y) {\n\t\t\t\tdeltaY = 0xFFFF;\n\t\t\t\teAcc -= eAdj;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9653666dde8c824f0ca6c3c24c1bb922e9d680cc18deda5a1ba897dd235a499a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 542, + "startColumn": 4, + "charOffset": 15401, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 540, + "startColumn": 4, + "charOffset": 15392, + "charLength": 5, + "snippet": { + "text": "\t\t\t}\n\n\t\t\twhile (--distanceX > 0) {\n\t\t\t\tuint16_t yIncrease = 0;\n\t\t\t\tconst uint16_t eAccTemp = eAcc;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a6a26bc45441ac65ae7d989e7d89a83183437ed082d541f263e56a52303fb16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'distanceX' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 542, + "startColumn": 11, + "charOffset": 15408, + "charLength": 2, + "snippet": { + "text": "--" + } + }, + "contextRegion": { + "startLine": 540, + "startColumn": 11, + "charOffset": 15392, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\twhile (--distanceX > 0) {\n\t\t\t\tuint16_t yIncrease = 0;\n\t\t\t\tconst uint16_t eAccTemp = eAcc;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5cf906d61069583989eab6ba08797af17644c57f04875b69806702eccccf238c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 550, + "startColumn": 32, + "charOffset": 15600, + "charLength": 5, + "snippet": { + "text": "start" + } + }, + "contextRegion": { + "startLine": 548, + "startColumn": 32, + "charOffset": 15562, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tconst auto &tile = getTile(start.x + deltaX, start.y + yIncrease, start.z);\n\t\t\t\tif (tile && tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) {\n\t\t\t\t\tif (Position::areInRange<1, 1>(start, destination)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d37a44ee7b15d9ebe1336e83db6ca550d1d1d06db8a8a8b94858d1395247fbf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 550, + "startColumn": 50, + "charOffset": 15618, + "charLength": 5, + "snippet": { + "text": "start" + } + }, + "contextRegion": { + "startLine": 548, + "startColumn": 50, + "charOffset": 15562, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tconst auto &tile = getTile(start.x + deltaX, start.y + yIncrease, start.z);\n\t\t\t\tif (tile && tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) {\n\t\t\t\t\tif (Position::areInRange<1, 1>(start, destination)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3bbb0de314cfd79fa9f40ced9b1dfcde9718f15ab0c77448be9b58539bd67bf1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in conditional return statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 553, + "startColumn": 14, + "charOffset": 15786, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 551, + "startColumn": 14, + "charOffset": 15649, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tif (tile && tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) {\n\t\t\t\t\tif (Position::areInRange<1, 1>(start, destination)) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f91afbdebcefd3b1fdeb15b8e3a2ffcd9a9ac51fb1925fb8501ee43ee2295361" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'isSightClear' has cognitive complexity of 27 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 566, + "startColumn": 11, + "charOffset": 15913, + "charLength": 12, + "snippet": { + "text": "isSightClear" + } + }, + "contextRegion": { + "startLine": 564, + "startColumn": 11, + "charOffset": 15900, + "charLength": 12, + "snippet": { + "text": "}\n\nbool Map::isSightClear(const Position &fromPos, const Position &toPos, bool floorCheck) {\n\t// Check if this sight line should be even possible\n\tif (floorCheck && fromPos.z != toPos.z) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "844561a3be5ff9dfe36fa2ff22ed2ba6137397ca42b782a6f430febaa0e193df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'startZ' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 588, + "startColumn": 10, + "charOffset": 16606, + "charLength": 6, + "snippet": { + "text": "startZ" + } + }, + "contextRegion": { + "startLine": 586, + "startColumn": 10, + "charOffset": 16593, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tuint8_t startZ;\n\tif (sightClear && (fromPos.z < toPos.z || fromPos.z == toPos.z)) {\n\t\tstartZ = fromPos.z;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e743832d78b3a2c7a92132615725a141c27452dffe1f5eb07e14bea6bef903e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 607, + "startColumn": 2, + "charOffset": 17245, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 605, + "startColumn": 2, + "charOffset": 17152, + "charLength": 3, + "snippet": { + "text": "\n\t// now we need to perform a jump between floors to see if everything is clear (literally)\n\tfor (; startZ != toPos.z; ++startZ) {\n\t\tconst auto &tile = getTile(toPos.x, toPos.y, startZ);\n\t\tif (tile && (tile->getGround() || tile->hasProperty(CONST_PROP_BLOCKPROJECTILE))) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "18974195eb8f13f14fb72e6707a02dd78af9bd21b3c46f2d1ecea18d8ce51cf9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'startZ' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 607, + "startColumn": 9, + "charOffset": 17252, + "charLength": 6, + "snippet": { + "text": "startZ" + } + }, + "contextRegion": { + "startLine": 605, + "startColumn": 9, + "charOffset": 17152, + "charLength": 6, + "snippet": { + "text": "\n\t// now we need to perform a jump between floors to see if everything is clear (literally)\n\tfor (; startZ != toPos.z; ++startZ) {\n\t\tconst auto &tile = getTile(toPos.x, toPos.y, startZ);\n\t\tif (tile && (tile->getGround() || tile->hasProperty(CONST_PROP_BLOCKPROJECTILE))) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3dba411fc05410768a429d21ce4db409165566b350237073b4831e0af5d1f197" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 617, + "startColumn": 6, + "charOffset": 17574, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 615, + "startColumn": 6, + "charOffset": 17465, + "charLength": 1, + "snippet": { + "text": "\nstd::shared_ptr Map::canWalkTo(const std::shared_ptr &creature, const Position &pos) {\n\tif (!creature || creature->isRemoved()) {\n\t\treturn nullptr;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7bcc6f5aff77baccbf55f047db8fcca0e7727bfa2722bc1f1e5a5c7476df778e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 634, + "startColumn": 7, + "charOffset": 17924, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 632, + "startColumn": 7, + "charOffset": 17832, + "charLength": 1, + "snippet": { + "text": "\tconst auto &tile = getTile(pos.x, pos.y, pos.z);\n\tif (creature->getTile() != tile) {\n\t\tif (!tile || tile->queryAdd(0, creature, 1, FLAG_PATHFINDING | FLAG_IGNOREFIELDDAMAGE) != RETURNVALUE_NOERROR) {\n\t\t\treturn nullptr;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36772370b69843bccfec82772812b7864a0827fb5bb560b8c718617be8ec9c7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 634, + "startColumn": 64, + "charOffset": 17981, + "charLength": 1, + "snippet": { + "text": "|" + } + }, + "contextRegion": { + "startLine": 632, + "startColumn": 64, + "charOffset": 17832, + "charLength": 1, + "snippet": { + "text": "\tconst auto &tile = getTile(pos.x, pos.y, pos.z);\n\tif (creature->getTile() != tile) {\n\t\tif (!tile || tile->queryAdd(0, creature, 1, FLAG_PATHFINDING | FLAG_IGNOREFIELDDAMAGE) != RETURNVALUE_NOERROR) {\n\t\t\treturn nullptr;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87b73d9d0ab83b44d2568877d3a4ad879c449e6b5b62ecbc2c22b386869a381d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'getPathMatching' has cognitive complexity of 86 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 642, + "startColumn": 11, + "charOffset": 18087, + "charLength": 15, + "snippet": { + "text": "getPathMatching" + } + }, + "contextRegion": { + "startLine": 640, + "startColumn": 11, + "charOffset": 18074, + "charLength": 15, + "snippet": { + "text": "}\n\nbool Map::getPathMatching(const std::shared_ptr &creature, const Position &__targetPos, std::vector &dirList, const FrozenPathingConditionCall &pathCondition, const FindPathParams &fpp) {\n\tstatic int_fast32_t allNeighbors[8][2] = {\n\t\t{ -1, 0 }, { 0, 1 }, { 1, 0 }, { 0, -1 }, { -1, -1 }, { 1, -1 }, { 1, 1 }, { -1, 1 }" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "560df138b27a6ad16dab42f6b40d7d6b509a241bac9c83019a224fc9dc06782c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-reserved-identifier", + "ruleIndex": 83, + "kind": "fail", + "level": "warning", + "message": { + "text": "declaration uses identifier '__targetPos', which is a reserved identifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 642, + "startColumn": 86, + "charOffset": 18162, + "charLength": 11, + "snippet": { + "text": "__targetPos" + } + }, + "contextRegion": { + "startLine": 640, + "startColumn": 86, + "charOffset": 18074, + "charLength": 11, + "snippet": { + "text": "}\n\nbool Map::getPathMatching(const std::shared_ptr &creature, const Position &__targetPos, std::vector &dirList, const FrozenPathingConditionCall &pathCondition, const FindPathParams &fpp) {\n\tstatic int_fast32_t allNeighbors[8][2] = {\n\t\t{ -1, 0 }, { 0, 1 }, { 1, 0 }, { 0, -1 }, { -1, -1 }, { 1, -1 }, { 1, 1 }, { -1, 1 }" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17a8385540f64e8473aa94beb41a40585f24a368ff79ecf4fc9d211545a15937" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-c-arrays", + "ruleIndex": 480, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not declare C-style arrays, use std::array<> instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 643, + "startColumn": 9, + "charOffset": 18294, + "charLength": 12, + "snippet": { + "text": "int_fast32_t" + } + }, + "contextRegion": { + "startLine": 641, + "startColumn": 9, + "charOffset": 18076, + "charLength": 12, + "snippet": { + "text": "\nbool Map::getPathMatching(const std::shared_ptr &creature, const Position &__targetPos, std::vector &dirList, const FrozenPathingConditionCall &pathCondition, const FindPathParams &fpp) {\n\tstatic int_fast32_t allNeighbors[8][2] = {\n\t\t{ -1, 0 }, { 0, 1 }, { 1, 0 }, { 0, -1 }, { -1, -1 }, { 1, -1 }, { 1, 1 }, { -1, 1 }\n\t};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a4ff9d3e536cd03b81abfeaf20090d1ed9ee141dff06336f0ca8cbe2ffff069" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 643, + "startColumn": 35, + "charOffset": 18320, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 641, + "startColumn": 35, + "charOffset": 18076, + "charLength": 1, + "snippet": { + "text": "\nbool Map::getPathMatching(const std::shared_ptr &creature, const Position &__targetPos, std::vector &dirList, const FrozenPathingConditionCall &pathCondition, const FindPathParams &fpp) {\n\tstatic int_fast32_t allNeighbors[8][2] = {\n\t\t{ -1, 0 }, { 0, 1 }, { 1, 0 }, { 0, -1 }, { -1, -1 }, { 1, -1 }, { 1, 1 }, { -1, 1 }\n\t};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e1c8df123f72e02a5cc371a24ac7dd72b222816fa3306b67c0dfcf41555d93e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-c-arrays", + "ruleIndex": 480, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not declare C-style arrays, use std::array<> instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 647, + "startColumn": 9, + "charOffset": 18430, + "charLength": 12, + "snippet": { + "text": "int_fast32_t" + } + }, + "contextRegion": { + "startLine": 645, + "startColumn": 9, + "charOffset": 18417, + "charLength": 12, + "snippet": { + "text": "\t};\n\n\tstatic int_fast32_t dirNeighbors[8][5][2] = {\n\t\t{ { -1, 0 }, { 0, 1 }, { 1, 0 }, { 1, 1 }, { -1, 1 } },\n\t\t{ { -1, 0 }, { 0, 1 }, { 0, -1 }, { -1, -1 }, { -1, 1 } }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "832f4e4705ef98a82eb24fb1de7e44b2ba757a4be1767cfd4b4a233f62d800de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 647, + "startColumn": 35, + "charOffset": 18456, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 645, + "startColumn": 35, + "charOffset": 18417, + "charLength": 1, + "snippet": { + "text": "\t};\n\n\tstatic int_fast32_t dirNeighbors[8][5][2] = {\n\t\t{ { -1, 0 }, { 0, 1 }, { 1, 0 }, { 1, 1 }, { -1, 1 } },\n\t\t{ { -1, 0 }, { 0, 1 }, { 0, -1 }, { -1, -1 }, { -1, 1 } }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa4d5c4994bf588980c82aa87dd983cf9f6d05a58723e1555ce4a2ac6209e6d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 647, + "startColumn": 38, + "charOffset": 18459, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 645, + "startColumn": 38, + "charOffset": 18417, + "charLength": 1, + "snippet": { + "text": "\t};\n\n\tstatic int_fast32_t dirNeighbors[8][5][2] = {\n\t\t{ { -1, 0 }, { 0, 1 }, { 1, 0 }, { 1, 1 }, { -1, 1 } },\n\t\t{ { -1, 0 }, { 0, 1 }, { 0, -1 }, { -1, -1 }, { -1, 1 } }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ceda8ba4ced146e2a6c2fdc746061723ee3717c93f2305c0397cf1ca60b8a65a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 676, + "startColumn": 2, + "charOffset": 19532, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 674, + "startColumn": 2, + "charOffset": 19501, + "charLength": 2, + "snippet": { + "text": "\n\tAStarNode* found = nullptr;\n\tdo {\n\t\tAStarNode* n = nodes.getBestNode();\n\t\tif (!n) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5952f8bee5cae5702a732226017b0d4f96808c946b310a1e25d2f4f86a49c939" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 678, + "startColumn": 7, + "charOffset": 19581, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 676, + "startColumn": 7, + "charOffset": 19531, + "charLength": 1, + "snippet": { + "text": "\tdo {\n\t\tAStarNode* n = nodes.getBestNode();\n\t\tif (!n) {\n\t\t\tif (found) {\n\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75167b41840594820026433444356ca17215f2feb8237734b5db7a6b4fd47766" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'AStarNode *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 678, + "startColumn": 8, + "charOffset": 19582, + "charLength": 1, + "snippet": { + "text": "n" + } + }, + "contextRegion": { + "startLine": 676, + "startColumn": 8, + "charOffset": 19531, + "charLength": 1, + "snippet": { + "text": "\tdo {\n\t\tAStarNode* n = nodes.getBestNode();\n\t\tif (!n) {\n\t\t\tif (found) {\n\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef2efc17469f19ee1cf591ea9b70f7d9c0d6e5a024aaa1130cbc66d5d4614506" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 679, + "startColumn": 8, + "charOffset": 19594, + "charLength": 5, + "snippet": { + "text": "found" + } + }, + "contextRegion": { + "startLine": 677, + "startColumn": 8, + "charOffset": 19537, + "charLength": 5, + "snippet": { + "text": "\t\tAStarNode* n = nodes.getBestNode();\n\t\tif (!n) {\n\t\t\tif (found) {\n\t\t\t\tbreak;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da5c46f6c72d3eacdcac2fb8db717f2ef02f690541686f93d51e89521ca87213" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'AStarNode *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 679, + "startColumn": 8, + "charOffset": 19594, + "charLength": 5, + "snippet": { + "text": "found" + } + }, + "contextRegion": { + "startLine": 677, + "startColumn": 8, + "charOffset": 19537, + "charLength": 5, + "snippet": { + "text": "\t\tAStarNode* n = nodes.getBestNode();\n\t\tif (!n) {\n\t\t\tif (found) {\n\t\t\t\tbreak;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a78b7cab77a09e5f71b71a69ed878b5c719ce354fea05f47530d931a9150e966" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 687, + "startColumn": 11, + "charOffset": 19713, + "charLength": 1, + "snippet": { + "text": "x" + } + }, + "contextRegion": { + "startLine": 685, + "startColumn": 11, + "charOffset": 19641, + "charLength": 1, + "snippet": { + "text": "\t\tconst int_fast32_t x = n->x;\n\t\tconst int_fast32_t y = n->y;\n\t\tpos.x = x;\n\t\tpos.y = y;\n\t\tif (pathCondition(startPos, pos, fpp, bestMatch)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79a8c2d39c04904819d3889b63e0220051888ad4dcbd1eb40ea1414213c5ed56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 688, + "startColumn": 11, + "charOffset": 19726, + "charLength": 1, + "snippet": { + "text": "y" + } + }, + "contextRegion": { + "startLine": 686, + "startColumn": 11, + "charOffset": 19672, + "charLength": 1, + "snippet": { + "text": "\t\tconst int_fast32_t y = n->y;\n\t\tpos.x = x;\n\t\tpos.y = y;\n\t\tif (pathCondition(startPos, pos, fpp, bestMatch)) {\n\t\t\tfound = n;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f9cb274f1e84aa8c3639ac5badde0fe1f7e0255e124136d51be8a2ea7b67813" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-6-4", + "ruleIndex": 461, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-6-4: For any iteration statement there shall be no more than one break or goto statement used for loop termination" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 693, + "startColumn": 5, + "charOffset": 19843, + "charLength": 5, + "snippet": { + "text": "break" + } + }, + "contextRegion": { + "startLine": 691, + "startColumn": 5, + "charOffset": 19797, + "charLength": 5, + "snippet": { + "text": "\t\t\tendPos = pos;\n\t\t\tif (bestMatch == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6ee5c4df7d50347002d72620509a037a70b020f87f8971204bd834a2d3e53a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'dirCount' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 699, + "startColumn": 17, + "charOffset": 19890, + "charLength": 8, + "snippet": { + "text": "dirCount" + } + }, + "contextRegion": { + "startLine": 697, + "startColumn": 17, + "charOffset": 19860, + "charLength": 8, + "snippet": { + "text": "\t\t++cntDirs;\n\n\t\tuint_fast32_t dirCount;\n\t\tint_fast32_t* neighbors;\n\t\tif (n->parent) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a3774fd74901fba33f40b3af6f6804f7cda730c60dc7b1515bed9d82c731cde" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'neighbors' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 700, + "startColumn": 17, + "charOffset": 19916, + "charLength": 9, + "snippet": { + "text": "neighbors" + } + }, + "contextRegion": { + "startLine": 698, + "startColumn": 17, + "charOffset": 19873, + "charLength": 9, + "snippet": { + "text": "\n\t\tuint_fast32_t dirCount;\n\t\tint_fast32_t* neighbors;\n\t\tif (n->parent) {\n\t\t\tconst int_fast32_t offset_x = n->parent->x - x;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7395cf4a24f55b8b1fd9c37b000fc48b366b972aa44a31c585028f370bf62c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 701, + "startColumn": 7, + "charOffset": 19933, + "charLength": 1, + "snippet": { + "text": "n" + } + }, + "contextRegion": { + "startLine": 699, + "startColumn": 7, + "charOffset": 19874, + "charLength": 1, + "snippet": { + "text": "\t\tuint_fast32_t dirCount;\n\t\tint_fast32_t* neighbors;\n\t\tif (n->parent) {\n\t\t\tconst int_fast32_t offset_x = n->parent->x - x;\n\t\t\tconst int_fast32_t offset_y = n->parent->y - y;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "824cd1465b6810eb28984e3e8689ad1aba025d0c18087dcceb5a6cf5148d12a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'AStarNode *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 701, + "startColumn": 7, + "charOffset": 19933, + "charLength": 1, + "snippet": { + "text": "n" + } + }, + "contextRegion": { + "startLine": 699, + "startColumn": 7, + "charOffset": 19874, + "charLength": 1, + "snippet": { + "text": "\t\tuint_fast32_t dirCount;\n\t\tint_fast32_t* neighbors;\n\t\tif (n->parent) {\n\t\t\tconst int_fast32_t offset_x = n->parent->x - x;\n\t\t\tconst int_fast32_t offset_y = n->parent->y - y;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad26aeba6c87055901544db551a71034749ef8bf88944733b4b55972bbceeaf7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 706, + "startColumn": 18, + "charOffset": 20115, + "charLength": 1, + "snippet": { + "text": "*" + } + }, + "contextRegion": { + "startLine": 704, + "startColumn": 18, + "charOffset": 20048, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (offset_y == 0) {\n\t\t\t\tif (offset_x == -1) {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_WEST];\n\t\t\t\t} else {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_EAST];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e523f9855dc6960db51a2d130f2cdc79fbe540b8dc4f6cd2684ff75591e3050" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 706, + "startColumn": 19, + "charOffset": 20116, + "charLength": 12, + "snippet": { + "text": "dirNeighbors" + } + }, + "contextRegion": { + "startLine": 704, + "startColumn": 19, + "charOffset": 20048, + "charLength": 12, + "snippet": { + "text": "\t\t\tif (offset_y == 0) {\n\t\t\t\tif (offset_x == -1) {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_WEST];\n\t\t\t\t} else {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_EAST];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a49645adea17170a1ac0a1440b8ff959f1df5269e78cdf09f6dc5fe6158e8e4f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 708, + "startColumn": 18, + "charOffset": 20176, + "charLength": 1, + "snippet": { + "text": "*" + } + }, + "contextRegion": { + "startLine": 706, + "startColumn": 18, + "charOffset": 20098, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_WEST];\n\t\t\t\t} else {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_EAST];\n\t\t\t\t}\n\t\t\t} else if (offset_x == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b56960c0d2619552ffdb3cc684845d7c42dd27b469f0f9bee90a06f333e94555" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 708, + "startColumn": 19, + "charOffset": 20177, + "charLength": 12, + "snippet": { + "text": "dirNeighbors" + } + }, + "contextRegion": { + "startLine": 706, + "startColumn": 19, + "charOffset": 20098, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_WEST];\n\t\t\t\t} else {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_EAST];\n\t\t\t\t}\n\t\t\t} else if (offset_x == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6dceaa91711894f3a29cde16f7f4d58c09f9c55f0e437ba7702f2e9b098e651e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 712, + "startColumn": 18, + "charOffset": 20287, + "charLength": 1, + "snippet": { + "text": "*" + } + }, + "contextRegion": { + "startLine": 710, + "startColumn": 18, + "charOffset": 20213, + "charLength": 1, + "snippet": { + "text": "\t\t\t} else if (offset_x == 0) {\n\t\t\t\tif (offset_y == -1) {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_NORTH];\n\t\t\t\t} else {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_SOUTH];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7db9040e386c27708948cecb1849919672920f93e13e052dd7e55c7eac7045cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 712, + "startColumn": 19, + "charOffset": 20288, + "charLength": 12, + "snippet": { + "text": "dirNeighbors" + } + }, + "contextRegion": { + "startLine": 710, + "startColumn": 19, + "charOffset": 20213, + "charLength": 12, + "snippet": { + "text": "\t\t\t} else if (offset_x == 0) {\n\t\t\t\tif (offset_y == -1) {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_NORTH];\n\t\t\t\t} else {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_SOUTH];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ecfcf64cd120556a2f617aef0b0860a06c8f9c280f9ec529ef334c7a24e91980" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 714, + "startColumn": 18, + "charOffset": 20349, + "charLength": 1, + "snippet": { + "text": "*" + } + }, + "contextRegion": { + "startLine": 712, + "startColumn": 18, + "charOffset": 20270, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_NORTH];\n\t\t\t\t} else {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_SOUTH];\n\t\t\t\t}\n\t\t\t} else if (offset_y == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec907ae3701a14e25e3196139748b08c667ed2cfc3c91ee6b00eac98d42e4eee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 714, + "startColumn": 19, + "charOffset": 20350, + "charLength": 12, + "snippet": { + "text": "dirNeighbors" + } + }, + "contextRegion": { + "startLine": 712, + "startColumn": 19, + "charOffset": 20270, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_NORTH];\n\t\t\t\t} else {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_SOUTH];\n\t\t\t\t}\n\t\t\t} else if (offset_y == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50f329fdb02fa580909c056ffc04397412f8f3dd4396fc8e648df375e23e589c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 718, + "startColumn": 18, + "charOffset": 20462, + "charLength": 1, + "snippet": { + "text": "*" + } + }, + "contextRegion": { + "startLine": 716, + "startColumn": 18, + "charOffset": 20387, + "charLength": 1, + "snippet": { + "text": "\t\t\t} else if (offset_y == -1) {\n\t\t\t\tif (offset_x == -1) {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_NORTHWEST];\n\t\t\t\t} else {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_NORTHEAST];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe0b4e152cb149e1dfa23885c3d5bb37d8519504f80542bbfc4374adada31384" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 718, + "startColumn": 19, + "charOffset": 20463, + "charLength": 12, + "snippet": { + "text": "dirNeighbors" + } + }, + "contextRegion": { + "startLine": 716, + "startColumn": 19, + "charOffset": 20387, + "charLength": 12, + "snippet": { + "text": "\t\t\t} else if (offset_y == -1) {\n\t\t\t\tif (offset_x == -1) {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_NORTHWEST];\n\t\t\t\t} else {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_NORTHEAST];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b63cdf5cf21ad5d6e6454cea0074b40fb45ffbfa51fac448a6efdd508e5bcc07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 720, + "startColumn": 18, + "charOffset": 20528, + "charLength": 1, + "snippet": { + "text": "*" + } + }, + "contextRegion": { + "startLine": 718, + "startColumn": 18, + "charOffset": 20445, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_NORTHWEST];\n\t\t\t\t} else {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_NORTHEAST];\n\t\t\t\t}\n\t\t\t} else if (offset_x == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4ae82e341a5e66240fd9b51beab15dfc228859d100533583051571cb5e66d01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 720, + "startColumn": 19, + "charOffset": 20529, + "charLength": 12, + "snippet": { + "text": "dirNeighbors" + } + }, + "contextRegion": { + "startLine": 718, + "startColumn": 19, + "charOffset": 20445, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_NORTHWEST];\n\t\t\t\t} else {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_NORTHEAST];\n\t\t\t\t}\n\t\t\t} else if (offset_x == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f50115c0d5a7542c8d682af4a209bb9d337691e7c98b93fffd0352a5bc975dac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 723, + "startColumn": 17, + "charOffset": 20618, + "charLength": 1, + "snippet": { + "text": "*" + } + }, + "contextRegion": { + "startLine": 721, + "startColumn": 17, + "charOffset": 20564, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t} else if (offset_x == -1) {\n\t\t\t\tneighbors = *dirNeighbors[DIRECTION_SOUTHWEST];\n\t\t\t} else {\n\t\t\t\tneighbors = *dirNeighbors[DIRECTION_SOUTHEAST];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "959aaade022583e11f40e344eac70737d94a6977033ebf7b3e3d8cc7f153cd4f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 723, + "startColumn": 18, + "charOffset": 20619, + "charLength": 12, + "snippet": { + "text": "dirNeighbors" + } + }, + "contextRegion": { + "startLine": 721, + "startColumn": 18, + "charOffset": 20564, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t} else if (offset_x == -1) {\n\t\t\t\tneighbors = *dirNeighbors[DIRECTION_SOUTHWEST];\n\t\t\t} else {\n\t\t\t\tneighbors = *dirNeighbors[DIRECTION_SOUTHEAST];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d90d9f6de854737f374bb969d1a6b2004b4188e62c94b962d4f11691b1eaade" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 725, + "startColumn": 17, + "charOffset": 20682, + "charLength": 1, + "snippet": { + "text": "*" + } + }, + "contextRegion": { + "startLine": 723, + "startColumn": 17, + "charOffset": 20602, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tneighbors = *dirNeighbors[DIRECTION_SOUTHWEST];\n\t\t\t} else {\n\t\t\t\tneighbors = *dirNeighbors[DIRECTION_SOUTHEAST];\n\t\t\t}\n\t\t\tdirCount = 5;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b58ab613c7bba562afeb9e6384448738b743cc905da7d657c71f1c38475b5da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 725, + "startColumn": 18, + "charOffset": 20683, + "charLength": 12, + "snippet": { + "text": "dirNeighbors" + } + }, + "contextRegion": { + "startLine": 723, + "startColumn": 18, + "charOffset": 20602, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tneighbors = *dirNeighbors[DIRECTION_SOUTHWEST];\n\t\t\t} else {\n\t\t\t\tneighbors = *dirNeighbors[DIRECTION_SOUTHEAST];\n\t\t\t}\n\t\t\tdirCount = 5;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "512fdd90dae5ac0f18196cb872fb6416fb504e3e66143c3ea3176ee5e64b7f52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 727, + "startColumn": 15, + "charOffset": 20737, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 725, + "startColumn": 15, + "charOffset": 20666, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tneighbors = *dirNeighbors[DIRECTION_SOUTHEAST];\n\t\t\t}\n\t\t\tdirCount = 5;\n\t\t} else {\n\t\t\tdirCount = 8;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ca9f69b41adfa51bfe26f2d3c0f523bd72376131efac7eb774c401074430cbc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 729, + "startColumn": 15, + "charOffset": 20765, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 727, + "startColumn": 15, + "charOffset": 20723, + "charLength": 1, + "snippet": { + "text": "\t\t\tdirCount = 5;\n\t\t} else {\n\t\t\tdirCount = 8;\n\t\t\tneighbors = *allNeighbors;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78a49526c920949ff7f8a391f6323fcf0578ddef7b94671f105289cad665bbdb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 730, + "startColumn": 16, + "charOffset": 20783, + "charLength": 1, + "snippet": { + "text": "*" + } + }, + "contextRegion": { + "startLine": 728, + "startColumn": 16, + "charOffset": 20740, + "charLength": 1, + "snippet": { + "text": "\t\t} else {\n\t\t\tdirCount = 8;\n\t\t\tneighbors = *allNeighbors;\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed455d9aafe5400c409363c32f27296fce8d6e750de559b5bd0def4ca3f19e39" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 730, + "startColumn": 17, + "charOffset": 20784, + "charLength": 12, + "snippet": { + "text": "allNeighbors" + } + }, + "contextRegion": { + "startLine": 728, + "startColumn": 17, + "charOffset": 20740, + "charLength": 12, + "snippet": { + "text": "\t\t} else {\n\t\t\tdirCount = 8;\n\t\t\tneighbors = *allNeighbors;\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4ae82e341a5e66240fd9b51beab15dfc228859d100533583051571cb5e66d01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 734, + "startColumn": 3, + "charOffset": 20836, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 732, + "startColumn": 3, + "charOffset": 20802, + "charLength": 3, + "snippet": { + "text": "\n\t\tconst int_fast32_t f = n->f;\n\t\tfor (uint_fast32_t i = 0; i < dirCount; ++i) {\n\t\t\tpos.x = x + *neighbors++;\n\t\t\tpos.y = y + *neighbors++;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3fbb1c4a14e7f1197cce4141864d8d881275321cce38dbc2e2f8c5ad09b4e479" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 735, + "startColumn": 12, + "charOffset": 20894, + "charLength": 1, + "snippet": { + "text": "x" + } + }, + "contextRegion": { + "startLine": 733, + "startColumn": 12, + "charOffset": 20803, + "charLength": 1, + "snippet": { + "text": "\t\tconst int_fast32_t f = n->f;\n\t\tfor (uint_fast32_t i = 0; i < dirCount; ++i) {\n\t\t\tpos.x = x + *neighbors++;\n\t\t\tpos.y = y + *neighbors++;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "713bd73443cd5e91381191dd20ab84e2ed5f6051d54eb9a3d1f819cb77873b41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-10", + "ruleIndex": 433, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-10: The increment (++) and decrement (--) operators should not be mixed with other operators in an expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 735, + "startColumn": 26, + "charOffset": 20908, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 733, + "startColumn": 26, + "charOffset": 20803, + "charLength": 2, + "snippet": { + "text": "\t\tconst int_fast32_t f = n->f;\n\t\tfor (uint_fast32_t i = 0; i < dirCount; ++i) {\n\t\t\tpos.x = x + *neighbors++;\n\t\t\tpos.y = y + *neighbors++;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d80a67aed5ef2fd2bfabe66f3bfe8081ab2b534317081ef6cc3b61cf0dcc36e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 735, + "startColumn": 26, + "charOffset": 20908, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 733, + "startColumn": 26, + "charOffset": 20803, + "charLength": 2, + "snippet": { + "text": "\t\tconst int_fast32_t f = n->f;\n\t\tfor (uint_fast32_t i = 0; i < dirCount; ++i) {\n\t\t\tpos.x = x + *neighbors++;\n\t\t\tpos.y = y + *neighbors++;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a3bd98ee7ad43ece4addb99e2d15692da79de404ad7fae3c9d97b99b84f59a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 736, + "startColumn": 12, + "charOffset": 20923, + "charLength": 1, + "snippet": { + "text": "y" + } + }, + "contextRegion": { + "startLine": 734, + "startColumn": 12, + "charOffset": 20834, + "charLength": 1, + "snippet": { + "text": "\t\tfor (uint_fast32_t i = 0; i < dirCount; ++i) {\n\t\t\tpos.x = x + *neighbors++;\n\t\t\tpos.y = y + *neighbors++;\n\n\t\t\tint_fast32_t extraCost;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3260e788621fde91fa85318a5f10e84786a8f73717f0f34fc9b66bed644ffe4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-10", + "ruleIndex": 433, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-10: The increment (++) and decrement (--) operators should not be mixed with other operators in an expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 736, + "startColumn": 26, + "charOffset": 20937, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 734, + "startColumn": 26, + "charOffset": 20834, + "charLength": 2, + "snippet": { + "text": "\t\tfor (uint_fast32_t i = 0; i < dirCount; ++i) {\n\t\t\tpos.x = x + *neighbors++;\n\t\t\tpos.y = y + *neighbors++;\n\n\t\t\tint_fast32_t extraCost;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ab34dce6cfb8548954da4781813acd76b3cd5d9d23925e8c5382a6322b95480" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 736, + "startColumn": 26, + "charOffset": 20937, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 734, + "startColumn": 26, + "charOffset": 20834, + "charLength": 2, + "snippet": { + "text": "\t\tfor (uint_fast32_t i = 0; i < dirCount; ++i) {\n\t\t\tpos.x = x + *neighbors++;\n\t\t\tpos.y = y + *neighbors++;\n\n\t\t\tint_fast32_t extraCost;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ac1da314345d8ed8009d7f3213346c0e782c8868fd01603a2f1b8116ae04a07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'extraCost' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 738, + "startColumn": 17, + "charOffset": 20958, + "charLength": 9, + "snippet": { + "text": "extraCost" + } + }, + "contextRegion": { + "startLine": 736, + "startColumn": 17, + "charOffset": 20912, + "charLength": 9, + "snippet": { + "text": "\t\t\tpos.y = y + *neighbors++;\n\n\t\t\tint_fast32_t extraCost;\n\t\t\tAStarNode* neighborNode = nodes.getNodeByPosition(pos.x, pos.y);\n\t\t\tif (neighborNode) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "691a49f601ac3bdcefe3c58b341eee9b17c7562e9761a1378428a0d8b1350178" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 740, + "startColumn": 8, + "charOffset": 21044, + "charLength": 12, + "snippet": { + "text": "neighborNode" + } + }, + "contextRegion": { + "startLine": 738, + "startColumn": 8, + "charOffset": 20942, + "charLength": 12, + "snippet": { + "text": "\t\t\tint_fast32_t extraCost;\n\t\t\tAStarNode* neighborNode = nodes.getNodeByPosition(pos.x, pos.y);\n\t\t\tif (neighborNode) {\n\t\t\t\textraCost = neighborNode->c;\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a855d0ac95313768121605cc2da625d200cbb6b0a660061966e0368532a2c90b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'AStarNode *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 740, + "startColumn": 8, + "charOffset": 21044, + "charLength": 12, + "snippet": { + "text": "neighborNode" + } + }, + "contextRegion": { + "startLine": 738, + "startColumn": 8, + "charOffset": 20942, + "charLength": 12, + "snippet": { + "text": "\t\t\tint_fast32_t extraCost;\n\t\t\tAStarNode* neighborNode = nodes.getNodeByPosition(pos.x, pos.y);\n\t\t\tif (neighborNode) {\n\t\t\t\textraCost = neighborNode->c;\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d2ba30e137fa1462eb8844dbe0b6dc264c3ed4cca524fda57bcdb8fce1d142f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 744, + "startColumn": 9, + "charOffset": 21211, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 742, + "startColumn": 9, + "charOffset": 21093, + "charLength": 1, + "snippet": { + "text": "\t\t\t} else {\n\t\t\t\tconst auto &tile = withoutCreature ? getTile(pos.x, pos.y, pos.z) : canWalkTo(creature, pos);\n\t\t\t\tif (!tile) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62cfd272c8715a9ad432d910590c0b2f798069e12748b451e26ac5c70e0c99e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 753, + "startColumn": 8, + "charOffset": 21468, + "charLength": 12, + "snippet": { + "text": "neighborNode" + } + }, + "contextRegion": { + "startLine": 751, + "startColumn": 8, + "charOffset": 21345, + "charLength": 12, + "snippet": { + "text": "\t\t\tconst int_fast32_t cost = AStarNodes::getMapWalkCost(n, pos);\n\t\t\tconst int_fast32_t newf = f + cost + extraCost;\n\t\t\tif (neighborNode) {\n\t\t\t\tif (neighborNode->f <= newf) {\n\t\t\t\t\t// The node on the closed/open list is cheaper than this one" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9afb8d0d13117630d90ba531750af0ae63b1d97aff0130580906bdfc7edc741" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'AStarNode *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 753, + "startColumn": 8, + "charOffset": 21468, + "charLength": 12, + "snippet": { + "text": "neighborNode" + } + }, + "contextRegion": { + "startLine": 751, + "startColumn": 8, + "charOffset": 21345, + "charLength": 12, + "snippet": { + "text": "\t\t\tconst int_fast32_t cost = AStarNodes::getMapWalkCost(n, pos);\n\t\t\tconst int_fast32_t newf = f + cost + extraCost;\n\t\t\tif (neighborNode) {\n\t\t\t\tif (neighborNode->f <= newf) {\n\t\t\t\t\t// The node on the closed/open list is cheaper than this one" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "132b3c964aadd0dc70289b42334b810f622de4e21e39984aa1c093f7382251b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 765, + "startColumn": 55, + "charOffset": 21967, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 763, + "startColumn": 55, + "charOffset": 21775, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tconst int_fast32_t dX = std::abs(targetPos.getX() - pos.getX());\n\t\t\t\tconst int_fast32_t dY = std::abs(targetPos.getY() - pos.getY());\n\t\t\t\tif (!nodes.createOpenNode(n, pos.x, pos.y, newf, ((dX - sX) << 3) + ((dY - sY) << 3) + (std::max(dX, dY) << 3), extraCost)) {\n\t\t\t\t\tif (found) {\n\t\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "692e50f8c477e7126a5a4af329bcc0083436f672d138c50370ecbbc168fb9657" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 765, + "startColumn": 74, + "charOffset": 21986, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 763, + "startColumn": 74, + "charOffset": 21775, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tconst int_fast32_t dX = std::abs(targetPos.getX() - pos.getX());\n\t\t\t\tconst int_fast32_t dY = std::abs(targetPos.getY() - pos.getY());\n\t\t\t\tif (!nodes.createOpenNode(n, pos.x, pos.y, newf, ((dX - sX) << 3) + ((dY - sY) << 3) + (std::max(dX, dY) << 3), extraCost)) {\n\t\t\t\t\tif (found) {\n\t\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d206577a7efce47cd83417a6b9e0ba17572cfbbcb4618a901db12787d506dc1a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 765, + "startColumn": 93, + "charOffset": 22005, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 763, + "startColumn": 93, + "charOffset": 21775, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tconst int_fast32_t dX = std::abs(targetPos.getX() - pos.getX());\n\t\t\t\tconst int_fast32_t dY = std::abs(targetPos.getY() - pos.getY());\n\t\t\t\tif (!nodes.createOpenNode(n, pos.x, pos.y, newf, ((dX - sX) << 3) + ((dY - sY) << 3) + (std::max(dX, dY) << 3), extraCost)) {\n\t\t\t\t\tif (found) {\n\t\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b671db2dd57409b246d68a041d856f4bfbd9b930cd8ad4e977e06564ad9b3d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 766, + "startColumn": 10, + "charOffset": 22052, + "charLength": 5, + "snippet": { + "text": "found" + } + }, + "contextRegion": { + "startLine": 764, + "startColumn": 10, + "charOffset": 21844, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tconst int_fast32_t dY = std::abs(targetPos.getY() - pos.getY());\n\t\t\t\tif (!nodes.createOpenNode(n, pos.x, pos.y, newf, ((dX - sX) << 3) + ((dY - sY) << 3) + (std::max(dX, dY) << 3), extraCost)) {\n\t\t\t\t\tif (found) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06f8c6af4f26c926157134d2ad5a0605e2b38d825251b193076cf0ee7b10c1f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'AStarNode *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 766, + "startColumn": 10, + "charOffset": 22052, + "charLength": 5, + "snippet": { + "text": "found" + } + }, + "contextRegion": { + "startLine": 764, + "startColumn": 10, + "charOffset": 21844, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tconst int_fast32_t dY = std::abs(targetPos.getY() - pos.getY());\n\t\t\t\tif (!nodes.createOpenNode(n, pos.x, pos.y, newf, ((dX - sX) << 3) + ((dY - sY) << 3) + (std::max(dX, dY) << 3), extraCost)) {\n\t\t\t\t\tif (found) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb421f513ae500b7c78a9a7e5db41925a259fc81b3507b198b4d85d9f4e211d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (do loop) is ID-dependent due to variable reference to 'nodes' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 774, + "startColumn": 11, + "charOffset": 22147, + "charLength": 5, + "snippet": { + "text": "nodes" + } + }, + "contextRegion": { + "startLine": 772, + "startColumn": 11, + "charOffset": 22111, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\t\tnodes.closeNode(n);\n\t} while (nodes.getClosedNodes() < 100);\n\tif (!found) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fe7a2b0e1aab174779657b2992ddd423108fd6c620277a0ac9521d693f64d50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 774, + "startColumn": 36, + "charOffset": 22172, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 772, + "startColumn": 36, + "charOffset": 22111, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t\tnodes.closeNode(n);\n\t} while (nodes.getClosedNodes() < 100);\n\tif (!found) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f70239f98e45e42f4c0c26de7bcb2a021f5b61f5d3b9aa8f665d6ec530c3e82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 775, + "startColumn": 6, + "charOffset": 22183, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 773, + "startColumn": 6, + "charOffset": 22115, + "charLength": 1, + "snippet": { + "text": "\t\tnodes.closeNode(n);\n\t} while (nodes.getClosedNodes() < 100);\n\tif (!found) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "028943503291fdfff2be75925220191041b981f595d28716e1a55cf34d6d93b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'AStarNode *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 775, + "startColumn": 7, + "charOffset": 22184, + "charLength": 5, + "snippet": { + "text": "found" + } + }, + "contextRegion": { + "startLine": 773, + "startColumn": 7, + "charOffset": 22115, + "charLength": 5, + "snippet": { + "text": "\t\tnodes.closeNode(n);\n\t} while (nodes.getClosedNodes() < 100);\n\tif (!found) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c7ec4b7635274544d5eedaab7d53c3979c4e33ee0f06f498aebdf919105fba0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 785, + "startColumn": 2, + "charOffset": 22331, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 783, + "startColumn": 2, + "charOffset": 22305, + "charLength": 5, + "snippet": { + "text": "\n\tfound = found->parent;\n\twhile (found) {\n\t\tpos.x = found->x;\n\t\tpos.y = found->y;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3b3a6538fbc0525e311f48942d32350f359ae7bc566c11feb10414ff197b978" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'found' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 785, + "startColumn": 9, + "charOffset": 22338, + "charLength": 5, + "snippet": { + "text": "found" + } + }, + "contextRegion": { + "startLine": 783, + "startColumn": 9, + "charOffset": 22305, + "charLength": 5, + "snippet": { + "text": "\n\tfound = found->parent;\n\twhile (found) {\n\t\tpos.x = found->x;\n\t\tpos.y = found->y;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b22c7304564e72387942134e9076d48ad00a8da671bc87b37f1188a7abfb7bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 785, + "startColumn": 9, + "charOffset": 22338, + "charLength": 5, + "snippet": { + "text": "found" + } + }, + "contextRegion": { + "startLine": 783, + "startColumn": 9, + "charOffset": 22305, + "charLength": 5, + "snippet": { + "text": "\n\tfound = found->parent;\n\twhile (found) {\n\t\tpos.x = found->x;\n\t\tpos.y = found->y;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9c442553699853f17b4d2d452b3614c38a75cc28a3f2b16b94b421e4da09344" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'AStarNode *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 785, + "startColumn": 9, + "charOffset": 22338, + "charLength": 5, + "snippet": { + "text": "found" + } + }, + "contextRegion": { + "startLine": 783, + "startColumn": 9, + "charOffset": 22305, + "charLength": 5, + "snippet": { + "text": "\n\tfound = found->parent;\n\twhile (found) {\n\t\tpos.x = found->x;\n\t\tpos.y = found->y;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca4561e3e7a540e6dccdef5c741ca89aec0d821747238ee1bee048b963cdd6f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 794, + "startColumn": 3, + "charOffset": 22505, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 792, + "startColumn": 3, + "charOffset": 22469, + "charLength": 2, + "snippet": { + "text": "\t\tprevx = pos.x;\n\t\tprevy = pos.y;\n\t\tif (dx == 1) {\n\t\t\tif (dy == 1) {\n\t\t\t\tdirList.emplace_back(DIRECTION_NORTHWEST);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ad031cf015c08ac899cfb3ca431ba9ddedc4b6cb3c0a694068a477eb33f587a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 796, + "startColumn": 13, + "charOffset": 22550, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 794, + "startColumn": 13, + "charOffset": 22503, + "charLength": 12, + "snippet": { + "text": "\t\tif (dx == 1) {\n\t\t\tif (dy == 1) {\n\t\t\t\tdirList.emplace_back(DIRECTION_NORTHWEST);\n\t\t\t} else if (dy == -1) {\n\t\t\t\tdirList.emplace_back(DIRECTION_SOUTHWEST);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb1dffb685ac4ca0f5730e39ebbceedcc6d6619b4e3ba5dbea9b75f175d79620" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 798, + "startColumn": 13, + "charOffset": 22623, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 796, + "startColumn": 13, + "charOffset": 22538, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tdirList.emplace_back(DIRECTION_NORTHWEST);\n\t\t\t} else if (dy == -1) {\n\t\t\t\tdirList.emplace_back(DIRECTION_SOUTHWEST);\n\t\t\t} else {\n\t\t\t\tdirList.emplace_back(DIRECTION_WEST);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22dd503a81765b7b35e5d55107199953304cd50c1fcc0884dab8e3f0213e6356" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 800, + "startColumn": 13, + "charOffset": 22682, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 798, + "startColumn": 13, + "charOffset": 22611, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tdirList.emplace_back(DIRECTION_SOUTHWEST);\n\t\t\t} else {\n\t\t\t\tdirList.emplace_back(DIRECTION_WEST);\n\t\t\t}\n\t\t} else if (dx == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47ea0d7d3f30c35ec063162cc97018d0a77d983eab3a350d9fe8843eb7c6ae94" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 804, + "startColumn": 13, + "charOffset": 22772, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 802, + "startColumn": 13, + "charOffset": 22717, + "charLength": 12, + "snippet": { + "text": "\t\t} else if (dx == -1) {\n\t\t\tif (dy == 1) {\n\t\t\t\tdirList.emplace_back(DIRECTION_NORTHEAST);\n\t\t\t} else if (dy == -1) {\n\t\t\t\tdirList.emplace_back(DIRECTION_SOUTHEAST);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8750bf509b0a75b9c27712c5b2e5d72c2ac44411462357ce815fcfcda9d9ad6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 806, + "startColumn": 13, + "charOffset": 22845, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 804, + "startColumn": 13, + "charOffset": 22760, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tdirList.emplace_back(DIRECTION_NORTHEAST);\n\t\t\t} else if (dy == -1) {\n\t\t\t\tdirList.emplace_back(DIRECTION_SOUTHEAST);\n\t\t\t} else {\n\t\t\t\tdirList.emplace_back(DIRECTION_EAST);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5cae813662caa4cf42daf0a08a1aeba755add230369a22b3eeb9f38f16c2c21b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 808, + "startColumn": 13, + "charOffset": 22904, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 806, + "startColumn": 13, + "charOffset": 22833, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tdirList.emplace_back(DIRECTION_SOUTHEAST);\n\t\t\t} else {\n\t\t\t\tdirList.emplace_back(DIRECTION_EAST);\n\t\t\t}\n\t\t} else if (dy == 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc90ddd6c5427e153208ecb7c1c78323b6edbc7ad38314a213b1bb45e00b1e58" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 811, + "startColumn": 12, + "charOffset": 22974, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 809, + "startColumn": 12, + "charOffset": 22934, + "charLength": 12, + "snippet": { + "text": "\t\t\t}\n\t\t} else if (dy == 1) {\n\t\t\tdirList.emplace_back(DIRECTION_NORTH);\n\t\t} else if (dy == -1) {\n\t\t\tdirList.emplace_back(DIRECTION_SOUTH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b80b655e99864f91457be43b56040373db5ae3c222c8268891023798db8e3ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 813, + "startColumn": 12, + "charOffset": 23041, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 811, + "startColumn": 12, + "charOffset": 22963, + "charLength": 12, + "snippet": { + "text": "\t\t\tdirList.emplace_back(DIRECTION_NORTH);\n\t\t} else if (dy == -1) {\n\t\t\tdirList.emplace_back(DIRECTION_SOUTH);\n\t\t}\n\t\tfound = found->parent;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e18e1f046f6ac4a8a243995fb4169f3a2e80386b30e27197fc3958c0a7f72219" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'getPathMatchingCond' has cognitive complexity of 90 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 825, + "startColumn": 11, + "charOffset": 23404, + "charLength": 19, + "snippet": { + "text": "getPathMatchingCond" + } + }, + "contextRegion": { + "startLine": 823, + "startColumn": 11, + "charOffset": 23391, + "charLength": 19, + "snippet": { + "text": "}\n\nbool Map::getPathMatchingCond(const std::shared_ptr &creature, const Position &targetPos, std::vector &dirList, const FrozenPathingConditionCall &pathCondition, const FindPathParams &fpp) {\n\tPosition pos = creature->getPosition();\n\tPosition endPos;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1a99a37d534645c9b2666ad31a9e802f5a9550b914089b85eee5ca796431690" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-c-arrays", + "ruleIndex": 480, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not declare C-style arrays, use std::array<> instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 833, + "startColumn": 9, + "charOffset": 23801, + "charLength": 12, + "snippet": { + "text": "int_fast32_t" + } + }, + "contextRegion": { + "startLine": 831, + "startColumn": 9, + "charOffset": 23768, + "charLength": 12, + "snippet": { + "text": "\tint32_t bestMatch = 0;\n\n\tstatic int_fast32_t dirNeighbors[8][5][2] = {\n\t\t{ { -1, 0 }, { 0, 1 }, { 1, 0 }, { 1, 1 }, { -1, 1 } },\n\t\t{ { -1, 0 }, { 0, 1 }, { 0, -1 }, { -1, -1 }, { -1, 1 } }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d42df8c1ce8773cc70ac560952cc73398dd783cef72154ede9d69cb7b9faf7d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 833, + "startColumn": 35, + "charOffset": 23827, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 831, + "startColumn": 35, + "charOffset": 23768, + "charLength": 1, + "snippet": { + "text": "\tint32_t bestMatch = 0;\n\n\tstatic int_fast32_t dirNeighbors[8][5][2] = {\n\t\t{ { -1, 0 }, { 0, 1 }, { 1, 0 }, { 1, 1 }, { -1, 1 } },\n\t\t{ { -1, 0 }, { 0, 1 }, { 0, -1 }, { -1, -1 }, { -1, 1 } }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a61498059ada55c4294b9a087a41045ca3334a4c4c681200afc9cee5f2e8501f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 833, + "startColumn": 38, + "charOffset": 23830, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 831, + "startColumn": 38, + "charOffset": 23768, + "charLength": 1, + "snippet": { + "text": "\tint32_t bestMatch = 0;\n\n\tstatic int_fast32_t dirNeighbors[8][5][2] = {\n\t\t{ { -1, 0 }, { 0, 1 }, { 1, 0 }, { 1, 1 }, { -1, 1 } },\n\t\t{ { -1, 0 }, { 0, 1 }, { 0, -1 }, { -1, -1 }, { -1, 1 } }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b15dbb14c41806799499673250605169ed79a6975ed0bdccccb5fd4d2733937" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-c-arrays", + "ruleIndex": 480, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not declare C-style arrays, use std::array<> instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 844, + "startColumn": 9, + "charOffset": 24330, + "charLength": 12, + "snippet": { + "text": "int_fast32_t" + } + }, + "contextRegion": { + "startLine": 842, + "startColumn": 9, + "charOffset": 24317, + "charLength": 12, + "snippet": { + "text": "\t};\n\n\tstatic int_fast32_t allNeighbors[8][2] = {\n\t\t{ -1, 0 }, { 0, 1 }, { 1, 0 }, { 0, -1 }, { -1, -1 }, { 1, -1 }, { 1, 1 }, { -1, 1 }\n\t};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6fdf1084ba36c77c2e08c55e1eaaee6bf402340f0f1165b45888c22e921370f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 844, + "startColumn": 35, + "charOffset": 24356, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 842, + "startColumn": 35, + "charOffset": 24317, + "charLength": 1, + "snippet": { + "text": "\t};\n\n\tstatic int_fast32_t allNeighbors[8][2] = {\n\t\t{ -1, 0 }, { 0, 1 }, { 1, 0 }, { 0, -1 }, { -1, -1 }, { 1, -1 }, { 1, 1 }, { -1, 1 }\n\t};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "988e4fe38385d2ae4bf267f36063e4132dbd06a7a82aad409a717be7dc970a05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 856, + "startColumn": 2, + "charOffset": 24683, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 854, + "startColumn": 2, + "charOffset": 24652, + "charLength": 2, + "snippet": { + "text": "\n\tAStarNode* found = nullptr;\n\tdo {\n\t\tAStarNode* n = nodes.getBestNode();\n\t\tif (!n) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d910b33203767d9751ece7438f738d70b479decc34e449082c6c8e9e06f42b17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 858, + "startColumn": 7, + "charOffset": 24732, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 856, + "startColumn": 7, + "charOffset": 24682, + "charLength": 1, + "snippet": { + "text": "\tdo {\n\t\tAStarNode* n = nodes.getBestNode();\n\t\tif (!n) {\n\t\t\tif (found) {\n\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ebcbd827ae78ce4ffa3a5bf944b4846192201c0f8b1da0d85736489337b06b1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'AStarNode *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 858, + "startColumn": 8, + "charOffset": 24733, + "charLength": 1, + "snippet": { + "text": "n" + } + }, + "contextRegion": { + "startLine": 856, + "startColumn": 8, + "charOffset": 24682, + "charLength": 1, + "snippet": { + "text": "\tdo {\n\t\tAStarNode* n = nodes.getBestNode();\n\t\tif (!n) {\n\t\t\tif (found) {\n\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0200e29efecf794c73042b6720723c760818c61e6066ce4d8e41de80570d58e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 859, + "startColumn": 8, + "charOffset": 24745, + "charLength": 5, + "snippet": { + "text": "found" + } + }, + "contextRegion": { + "startLine": 857, + "startColumn": 8, + "charOffset": 24688, + "charLength": 5, + "snippet": { + "text": "\t\tAStarNode* n = nodes.getBestNode();\n\t\tif (!n) {\n\t\t\tif (found) {\n\t\t\t\tbreak;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "247f9e3d79e843c1deadc261fc1297ef8d86c652835a54b031c88a3865a88e76" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'AStarNode *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 859, + "startColumn": 8, + "charOffset": 24745, + "charLength": 5, + "snippet": { + "text": "found" + } + }, + "contextRegion": { + "startLine": 857, + "startColumn": 8, + "charOffset": 24688, + "charLength": 5, + "snippet": { + "text": "\t\tAStarNode* n = nodes.getBestNode();\n\t\tif (!n) {\n\t\t\tif (found) {\n\t\t\t\tbreak;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39698ccba53be9073fdc0f16b03272f0aa5c4b17e8e4dea935b1468a932eef05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 867, + "startColumn": 11, + "charOffset": 24864, + "charLength": 1, + "snippet": { + "text": "x" + } + }, + "contextRegion": { + "startLine": 865, + "startColumn": 11, + "charOffset": 24792, + "charLength": 1, + "snippet": { + "text": "\t\tconst int_fast32_t x = n->x;\n\t\tconst int_fast32_t y = n->y;\n\t\tpos.x = x;\n\t\tpos.y = y;\n\t\tif (pathCondition(startPos, pos, fpp, bestMatch)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "344cee3b4277a72374d9ba90adc39425702f75b57fb907c61949a60fd8c7c055" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 868, + "startColumn": 11, + "charOffset": 24877, + "charLength": 1, + "snippet": { + "text": "y" + } + }, + "contextRegion": { + "startLine": 866, + "startColumn": 11, + "charOffset": 24823, + "charLength": 1, + "snippet": { + "text": "\t\tconst int_fast32_t y = n->y;\n\t\tpos.x = x;\n\t\tpos.y = y;\n\t\tif (pathCondition(startPos, pos, fpp, bestMatch)) {\n\t\t\tfound = n;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2909e92110132e51ceef7e8f1729282c15c6968c28cb60a2835001f6c158e936" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-6-4", + "ruleIndex": 461, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-6-4: For any iteration statement there shall be no more than one break or goto statement used for loop termination" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 873, + "startColumn": 5, + "charOffset": 24994, + "charLength": 5, + "snippet": { + "text": "break" + } + }, + "contextRegion": { + "startLine": 871, + "startColumn": 5, + "charOffset": 24948, + "charLength": 5, + "snippet": { + "text": "\t\t\tendPos = pos;\n\t\t\tif (bestMatch == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7966b1a932c0ff152a6aa5a28e15db018b1578be139a657c7e08891f66d7059" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'dirCount' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 879, + "startColumn": 17, + "charOffset": 25041, + "charLength": 8, + "snippet": { + "text": "dirCount" + } + }, + "contextRegion": { + "startLine": 877, + "startColumn": 17, + "charOffset": 25011, + "charLength": 8, + "snippet": { + "text": "\t\t++cntDirs;\n\n\t\tuint_fast32_t dirCount;\n\t\tint_fast32_t* neighbors;\n\t\tif (n->parent) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "101e7e4fdce49506a8985fa4933765f1ef0374add44130c1a60810527f9d84bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'neighbors' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 880, + "startColumn": 17, + "charOffset": 25067, + "charLength": 9, + "snippet": { + "text": "neighbors" + } + }, + "contextRegion": { + "startLine": 878, + "startColumn": 17, + "charOffset": 25024, + "charLength": 9, + "snippet": { + "text": "\n\t\tuint_fast32_t dirCount;\n\t\tint_fast32_t* neighbors;\n\t\tif (n->parent) {\n\t\t\tconst int_fast32_t offset_x = n->parent->x - x;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed998f322d73d7af6a0d19e0de2f9a8e5cb64e3e5d7161cde77e893d716df73d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 881, + "startColumn": 7, + "charOffset": 25084, + "charLength": 1, + "snippet": { + "text": "n" + } + }, + "contextRegion": { + "startLine": 879, + "startColumn": 7, + "charOffset": 25025, + "charLength": 1, + "snippet": { + "text": "\t\tuint_fast32_t dirCount;\n\t\tint_fast32_t* neighbors;\n\t\tif (n->parent) {\n\t\t\tconst int_fast32_t offset_x = n->parent->x - x;\n\t\t\tconst int_fast32_t offset_y = n->parent->y - y;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a538d280bdb6e8cfb7ce1e8d8d6c9e2f3a33e40b3e60ad987571d24425525b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'AStarNode *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 881, + "startColumn": 7, + "charOffset": 25084, + "charLength": 1, + "snippet": { + "text": "n" + } + }, + "contextRegion": { + "startLine": 879, + "startColumn": 7, + "charOffset": 25025, + "charLength": 1, + "snippet": { + "text": "\t\tuint_fast32_t dirCount;\n\t\tint_fast32_t* neighbors;\n\t\tif (n->parent) {\n\t\t\tconst int_fast32_t offset_x = n->parent->x - x;\n\t\t\tconst int_fast32_t offset_y = n->parent->y - y;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4d6a960c44e2dc6268127fc184dfbdfac77e665bd5dd862a8815246e03e5853" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 886, + "startColumn": 18, + "charOffset": 25266, + "charLength": 1, + "snippet": { + "text": "*" + } + }, + "contextRegion": { + "startLine": 884, + "startColumn": 18, + "charOffset": 25199, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (offset_y == 0) {\n\t\t\t\tif (offset_x == -1) {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_WEST];\n\t\t\t\t} else {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_EAST];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2ba979dcdaa3e7f7b54abaa3c7454abd375d03936189c2dae54ab41ff359899" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 886, + "startColumn": 19, + "charOffset": 25267, + "charLength": 12, + "snippet": { + "text": "dirNeighbors" + } + }, + "contextRegion": { + "startLine": 884, + "startColumn": 19, + "charOffset": 25199, + "charLength": 12, + "snippet": { + "text": "\t\t\tif (offset_y == 0) {\n\t\t\t\tif (offset_x == -1) {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_WEST];\n\t\t\t\t} else {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_EAST];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4674a08523a2636afbc759cb5ff2438cf9c9cbe1f1f00e8f642ec2715e608e2b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 888, + "startColumn": 18, + "charOffset": 25327, + "charLength": 1, + "snippet": { + "text": "*" + } + }, + "contextRegion": { + "startLine": 886, + "startColumn": 18, + "charOffset": 25249, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_WEST];\n\t\t\t\t} else {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_EAST];\n\t\t\t\t}\n\t\t\t} else if (offset_x == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b63cdf5cf21ad5d6e6454cea0074b40fb45ffbfa51fac448a6efdd508e5bcc07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 888, + "startColumn": 19, + "charOffset": 25328, + "charLength": 12, + "snippet": { + "text": "dirNeighbors" + } + }, + "contextRegion": { + "startLine": 886, + "startColumn": 19, + "charOffset": 25249, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_WEST];\n\t\t\t\t} else {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_EAST];\n\t\t\t\t}\n\t\t\t} else if (offset_x == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14f20d41bcaf4087cde534f954fb656733ee63a978e6ac9b6a9f632ad346215f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 892, + "startColumn": 18, + "charOffset": 25438, + "charLength": 1, + "snippet": { + "text": "*" + } + }, + "contextRegion": { + "startLine": 890, + "startColumn": 18, + "charOffset": 25364, + "charLength": 1, + "snippet": { + "text": "\t\t\t} else if (offset_x == 0) {\n\t\t\t\tif (offset_y == -1) {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_NORTH];\n\t\t\t\t} else {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_SOUTH];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d62dbd803c17ade1cd49c3bbc7e1f320b1ff0482ab0a5731a0cdfe832ccda50f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 892, + "startColumn": 19, + "charOffset": 25439, + "charLength": 12, + "snippet": { + "text": "dirNeighbors" + } + }, + "contextRegion": { + "startLine": 890, + "startColumn": 19, + "charOffset": 25364, + "charLength": 12, + "snippet": { + "text": "\t\t\t} else if (offset_x == 0) {\n\t\t\t\tif (offset_y == -1) {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_NORTH];\n\t\t\t\t} else {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_SOUTH];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9757368b94a563fa739493221548afb08a7f8472b061e542b9ee5185ab44987" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 894, + "startColumn": 18, + "charOffset": 25500, + "charLength": 1, + "snippet": { + "text": "*" + } + }, + "contextRegion": { + "startLine": 892, + "startColumn": 18, + "charOffset": 25421, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_NORTH];\n\t\t\t\t} else {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_SOUTH];\n\t\t\t\t}\n\t\t\t} else if (offset_y == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cea52fe8aec2f4e3fc63aba942a8fc260c6280b7f807bd16429b2cbb968fc91f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 894, + "startColumn": 19, + "charOffset": 25501, + "charLength": 12, + "snippet": { + "text": "dirNeighbors" + } + }, + "contextRegion": { + "startLine": 892, + "startColumn": 19, + "charOffset": 25421, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_NORTH];\n\t\t\t\t} else {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_SOUTH];\n\t\t\t\t}\n\t\t\t} else if (offset_y == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "770ab184c6cb5907244b972313bb11ca0866999c82941f2c486bd5edca29b524" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 898, + "startColumn": 18, + "charOffset": 25613, + "charLength": 1, + "snippet": { + "text": "*" + } + }, + "contextRegion": { + "startLine": 896, + "startColumn": 18, + "charOffset": 25538, + "charLength": 1, + "snippet": { + "text": "\t\t\t} else if (offset_y == -1) {\n\t\t\t\tif (offset_x == -1) {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_NORTHWEST];\n\t\t\t\t} else {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_NORTHEAST];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26400fe40f28c3786e10faac4a2c3883cc663116af671389404c2fd2b4f2d3fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 898, + "startColumn": 19, + "charOffset": 25614, + "charLength": 12, + "snippet": { + "text": "dirNeighbors" + } + }, + "contextRegion": { + "startLine": 896, + "startColumn": 19, + "charOffset": 25538, + "charLength": 12, + "snippet": { + "text": "\t\t\t} else if (offset_y == -1) {\n\t\t\t\tif (offset_x == -1) {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_NORTHWEST];\n\t\t\t\t} else {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_NORTHEAST];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79fd381144f9e9f5709c21d8af73b1f592347dc76f19252f0a6bb0e879f79463" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 900, + "startColumn": 18, + "charOffset": 25679, + "charLength": 1, + "snippet": { + "text": "*" + } + }, + "contextRegion": { + "startLine": 898, + "startColumn": 18, + "charOffset": 25596, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_NORTHWEST];\n\t\t\t\t} else {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_NORTHEAST];\n\t\t\t\t}\n\t\t\t} else if (offset_x == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14adfb287724957c525b888b5b1416899e5c6305a1debb94d77015be6f88f5f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 900, + "startColumn": 19, + "charOffset": 25680, + "charLength": 12, + "snippet": { + "text": "dirNeighbors" + } + }, + "contextRegion": { + "startLine": 898, + "startColumn": 19, + "charOffset": 25596, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_NORTHWEST];\n\t\t\t\t} else {\n\t\t\t\t\tneighbors = *dirNeighbors[DIRECTION_NORTHEAST];\n\t\t\t\t}\n\t\t\t} else if (offset_x == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d25bd2b7eb18093f138d7a27e4e777f0ba6c207257f08a4668c4ddb69dea06f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 903, + "startColumn": 17, + "charOffset": 25769, + "charLength": 1, + "snippet": { + "text": "*" + } + }, + "contextRegion": { + "startLine": 901, + "startColumn": 17, + "charOffset": 25715, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t} else if (offset_x == -1) {\n\t\t\t\tneighbors = *dirNeighbors[DIRECTION_SOUTHWEST];\n\t\t\t} else {\n\t\t\t\tneighbors = *dirNeighbors[DIRECTION_SOUTHEAST];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c523b30ad0a14ec0d604bea906c9ef058ba504df857b612f143ec03b7e4d4b60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 903, + "startColumn": 18, + "charOffset": 25770, + "charLength": 12, + "snippet": { + "text": "dirNeighbors" + } + }, + "contextRegion": { + "startLine": 901, + "startColumn": 18, + "charOffset": 25715, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t} else if (offset_x == -1) {\n\t\t\t\tneighbors = *dirNeighbors[DIRECTION_SOUTHWEST];\n\t\t\t} else {\n\t\t\t\tneighbors = *dirNeighbors[DIRECTION_SOUTHEAST];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d057725db8f868874b3600e7c478b7f16d908feda1bb802616d36a481ab9ab9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 905, + "startColumn": 17, + "charOffset": 25833, + "charLength": 1, + "snippet": { + "text": "*" + } + }, + "contextRegion": { + "startLine": 903, + "startColumn": 17, + "charOffset": 25753, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tneighbors = *dirNeighbors[DIRECTION_SOUTHWEST];\n\t\t\t} else {\n\t\t\t\tneighbors = *dirNeighbors[DIRECTION_SOUTHEAST];\n\t\t\t}\n\t\t\tdirCount = 5;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83145afdeb65de689e0f40f46ff2c9f397d9fee4346c9fa8f5002e6b36a07d89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 905, + "startColumn": 18, + "charOffset": 25834, + "charLength": 12, + "snippet": { + "text": "dirNeighbors" + } + }, + "contextRegion": { + "startLine": 903, + "startColumn": 18, + "charOffset": 25753, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tneighbors = *dirNeighbors[DIRECTION_SOUTHWEST];\n\t\t\t} else {\n\t\t\t\tneighbors = *dirNeighbors[DIRECTION_SOUTHEAST];\n\t\t\t}\n\t\t\tdirCount = 5;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e27b80795e7d5c6a622253d5001d6e17d8652f032347e280bdf68a3decb1ce2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 907, + "startColumn": 15, + "charOffset": 25888, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 905, + "startColumn": 15, + "charOffset": 25817, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tneighbors = *dirNeighbors[DIRECTION_SOUTHEAST];\n\t\t\t}\n\t\t\tdirCount = 5;\n\t\t} else {\n\t\t\tdirCount = 8;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3a4211807e9aa5f168fa1cffb235a7deb38544697fecdd038e5a813daf1265b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 909, + "startColumn": 15, + "charOffset": 25916, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 907, + "startColumn": 15, + "charOffset": 25874, + "charLength": 1, + "snippet": { + "text": "\t\t\tdirCount = 5;\n\t\t} else {\n\t\t\tdirCount = 8;\n\t\t\tneighbors = *allNeighbors;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64a4aea80a449ad8c9fcf404b0b9c01e67398f8d7cc522cda45b6d8b519489ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 910, + "startColumn": 16, + "charOffset": 25934, + "charLength": 1, + "snippet": { + "text": "*" + } + }, + "contextRegion": { + "startLine": 908, + "startColumn": 16, + "charOffset": 25891, + "charLength": 1, + "snippet": { + "text": "\t\t} else {\n\t\t\tdirCount = 8;\n\t\t\tneighbors = *allNeighbors;\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e35c7318967138dc9a58a6d291be70cda86c7393a4a31da194a841608f57b89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 910, + "startColumn": 17, + "charOffset": 25935, + "charLength": 12, + "snippet": { + "text": "allNeighbors" + } + }, + "contextRegion": { + "startLine": 908, + "startColumn": 17, + "charOffset": 25891, + "charLength": 12, + "snippet": { + "text": "\t\t} else {\n\t\t\tdirCount = 8;\n\t\t\tneighbors = *allNeighbors;\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14adfb287724957c525b888b5b1416899e5c6305a1debb94d77015be6f88f5f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 914, + "startColumn": 3, + "charOffset": 25987, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 912, + "startColumn": 3, + "charOffset": 25953, + "charLength": 3, + "snippet": { + "text": "\n\t\tconst int_fast32_t f = n->f;\n\t\tfor (uint_fast32_t i = 0; i < dirCount; ++i) {\n\t\t\tpos.x = x + *neighbors++;\n\t\t\tpos.y = y + *neighbors++;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c89e1e358e12bd19432c383d06c267545ee091f83fcc5f25a962579134b664b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 915, + "startColumn": 12, + "charOffset": 26045, + "charLength": 1, + "snippet": { + "text": "x" + } + }, + "contextRegion": { + "startLine": 913, + "startColumn": 12, + "charOffset": 25954, + "charLength": 1, + "snippet": { + "text": "\t\tconst int_fast32_t f = n->f;\n\t\tfor (uint_fast32_t i = 0; i < dirCount; ++i) {\n\t\t\tpos.x = x + *neighbors++;\n\t\t\tpos.y = y + *neighbors++;\n\t\t\tif (fpp.maxSearchDist != 0 && (Position::getDistanceX(startPos, pos) > fpp.maxSearchDist || Position::getDistanceY(startPos, pos) > fpp.maxSearchDist)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4984b80d606c118074a7bfda61eb4fa73fa2da5b0e8911b16dd72d1ad1d9d9cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-10", + "ruleIndex": 433, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-10: The increment (++) and decrement (--) operators should not be mixed with other operators in an expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 915, + "startColumn": 26, + "charOffset": 26059, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 913, + "startColumn": 26, + "charOffset": 25954, + "charLength": 2, + "snippet": { + "text": "\t\tconst int_fast32_t f = n->f;\n\t\tfor (uint_fast32_t i = 0; i < dirCount; ++i) {\n\t\t\tpos.x = x + *neighbors++;\n\t\t\tpos.y = y + *neighbors++;\n\t\t\tif (fpp.maxSearchDist != 0 && (Position::getDistanceX(startPos, pos) > fpp.maxSearchDist || Position::getDistanceY(startPos, pos) > fpp.maxSearchDist)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16342e1c3f22c41dd9b90b7214a87417627e0ac8314824b1c6ef1498ccb4e67e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 915, + "startColumn": 26, + "charOffset": 26059, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 913, + "startColumn": 26, + "charOffset": 25954, + "charLength": 2, + "snippet": { + "text": "\t\tconst int_fast32_t f = n->f;\n\t\tfor (uint_fast32_t i = 0; i < dirCount; ++i) {\n\t\t\tpos.x = x + *neighbors++;\n\t\t\tpos.y = y + *neighbors++;\n\t\t\tif (fpp.maxSearchDist != 0 && (Position::getDistanceX(startPos, pos) > fpp.maxSearchDist || Position::getDistanceY(startPos, pos) > fpp.maxSearchDist)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "139d81be988c0b8b4b27bdfb857634a116e2f5337459e0bd292fc17423359f10" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 916, + "startColumn": 12, + "charOffset": 26074, + "charLength": 1, + "snippet": { + "text": "y" + } + }, + "contextRegion": { + "startLine": 914, + "startColumn": 12, + "charOffset": 25985, + "charLength": 1, + "snippet": { + "text": "\t\tfor (uint_fast32_t i = 0; i < dirCount; ++i) {\n\t\t\tpos.x = x + *neighbors++;\n\t\t\tpos.y = y + *neighbors++;\n\t\t\tif (fpp.maxSearchDist != 0 && (Position::getDistanceX(startPos, pos) > fpp.maxSearchDist || Position::getDistanceY(startPos, pos) > fpp.maxSearchDist)) {\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "528241cdd4644b7a5de860327b863cb2f0c1f7197ad5499ff9ccdd24064140bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-10", + "ruleIndex": 433, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-10: The increment (++) and decrement (--) operators should not be mixed with other operators in an expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 916, + "startColumn": 26, + "charOffset": 26088, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 914, + "startColumn": 26, + "charOffset": 25985, + "charLength": 2, + "snippet": { + "text": "\t\tfor (uint_fast32_t i = 0; i < dirCount; ++i) {\n\t\t\tpos.x = x + *neighbors++;\n\t\t\tpos.y = y + *neighbors++;\n\t\t\tif (fpp.maxSearchDist != 0 && (Position::getDistanceX(startPos, pos) > fpp.maxSearchDist || Position::getDistanceY(startPos, pos) > fpp.maxSearchDist)) {\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b46be51d6038360719c8b83e44052de00cc290973f44cb638775e5e9c3308c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 916, + "startColumn": 26, + "charOffset": 26088, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 914, + "startColumn": 26, + "charOffset": 25985, + "charLength": 2, + "snippet": { + "text": "\t\tfor (uint_fast32_t i = 0; i < dirCount; ++i) {\n\t\t\tpos.x = x + *neighbors++;\n\t\t\tpos.y = y + *neighbors++;\n\t\t\tif (fpp.maxSearchDist != 0 && (Position::getDistanceX(startPos, pos) > fpp.maxSearchDist || Position::getDistanceY(startPos, pos) > fpp.maxSearchDist)) {\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4acec8e3727fc5fa86643666f88bcb7fbeedda8367d80e25ec9498418175996b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'extraCost' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 925, + "startColumn": 17, + "charOffset": 26380, + "charLength": 9, + "snippet": { + "text": "extraCost" + } + }, + "contextRegion": { + "startLine": 923, + "startColumn": 17, + "charOffset": 26358, + "charLength": 9, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tint_fast32_t extraCost;\n\t\t\tAStarNode* neighborNode = nodes.getNodeByPosition(pos.x, pos.y);\n\t\t\tif (neighborNode) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05f81128458031501b989206e42140edaff6cbf049ca878eb769fc6a138a65ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 927, + "startColumn": 8, + "charOffset": 26466, + "charLength": 12, + "snippet": { + "text": "neighborNode" + } + }, + "contextRegion": { + "startLine": 925, + "startColumn": 8, + "charOffset": 26364, + "charLength": 12, + "snippet": { + "text": "\t\t\tint_fast32_t extraCost;\n\t\t\tAStarNode* neighborNode = nodes.getNodeByPosition(pos.x, pos.y);\n\t\t\tif (neighborNode) {\n\t\t\t\textraCost = neighborNode->c;\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fef250e7229bc31b48aab321146ca35b8840c8d0c910d73e416189fb16277d44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'AStarNode *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 927, + "startColumn": 8, + "charOffset": 26466, + "charLength": 12, + "snippet": { + "text": "neighborNode" + } + }, + "contextRegion": { + "startLine": 925, + "startColumn": 8, + "charOffset": 26364, + "charLength": 12, + "snippet": { + "text": "\t\t\tint_fast32_t extraCost;\n\t\t\tAStarNode* neighborNode = nodes.getNodeByPosition(pos.x, pos.y);\n\t\t\tif (neighborNode) {\n\t\t\t\textraCost = neighborNode->c;\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "465fadd79399a2f6f69cd701b802dd7af3b9e2f5c001071ff0d652a0630bd435" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 931, + "startColumn": 9, + "charOffset": 26589, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 929, + "startColumn": 9, + "charOffset": 26515, + "charLength": 1, + "snippet": { + "text": "\t\t\t} else {\n\t\t\t\tconst auto &tile = Map::canWalkTo(creature, pos);\n\t\t\t\tif (!tile) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19829c4df6883deb79715c910ee5c518c46ed8c7e874c2e50df723898c3c8873" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 940, + "startColumn": 8, + "charOffset": 26846, + "charLength": 12, + "snippet": { + "text": "neighborNode" + } + }, + "contextRegion": { + "startLine": 938, + "startColumn": 8, + "charOffset": 26723, + "charLength": 12, + "snippet": { + "text": "\t\t\tconst int_fast32_t cost = AStarNodes::getMapWalkCost(n, pos);\n\t\t\tconst int_fast32_t newf = f + cost + extraCost;\n\t\t\tif (neighborNode) {\n\t\t\t\tif (neighborNode->f <= newf) {\n\t\t\t\t\t// The node on the closed/open list is cheaper than this one" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "477ce3c707b5354135d1a76ff64768e1592acf7e579c68237c8dfbbdc511ff51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'AStarNode *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 940, + "startColumn": 8, + "charOffset": 26846, + "charLength": 12, + "snippet": { + "text": "neighborNode" + } + }, + "contextRegion": { + "startLine": 938, + "startColumn": 8, + "charOffset": 26723, + "charLength": 12, + "snippet": { + "text": "\t\t\tconst int_fast32_t cost = AStarNodes::getMapWalkCost(n, pos);\n\t\t\tconst int_fast32_t newf = f + cost + extraCost;\n\t\t\tif (neighborNode) {\n\t\t\t\tif (neighborNode->f <= newf) {\n\t\t\t\t\t// The node on the closed/open list is cheaper than this one" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "57a5e6fc64ae8dd0eba7fdf073359660e60fc3b5e33ce09652d4b3266015ad4b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 952, + "startColumn": 55, + "charOffset": 27345, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 950, + "startColumn": 55, + "charOffset": 27153, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tconst int_fast32_t dX = std::abs(targetPos.getX() - pos.getX());\n\t\t\t\tconst int_fast32_t dY = std::abs(targetPos.getY() - pos.getY());\n\t\t\t\tif (!nodes.createOpenNode(n, pos.x, pos.y, newf, ((dX - sX) << 3) + ((dY - sY) << 3) + (std::max(dX, dY) << 3), extraCost)) {\n\t\t\t\t\tif (found) {\n\t\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a91b6d792f9dca6b4ef83e60e6393a83d6e59611a73e9f4f30464284a9a3818" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 952, + "startColumn": 74, + "charOffset": 27364, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 950, + "startColumn": 74, + "charOffset": 27153, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tconst int_fast32_t dX = std::abs(targetPos.getX() - pos.getX());\n\t\t\t\tconst int_fast32_t dY = std::abs(targetPos.getY() - pos.getY());\n\t\t\t\tif (!nodes.createOpenNode(n, pos.x, pos.y, newf, ((dX - sX) << 3) + ((dY - sY) << 3) + (std::max(dX, dY) << 3), extraCost)) {\n\t\t\t\t\tif (found) {\n\t\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6c804de9073968c1e27eb96187d2a21ce2bf08930f8e8e6a368418b266a5a0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 952, + "startColumn": 93, + "charOffset": 27383, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 950, + "startColumn": 93, + "charOffset": 27153, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tconst int_fast32_t dX = std::abs(targetPos.getX() - pos.getX());\n\t\t\t\tconst int_fast32_t dY = std::abs(targetPos.getY() - pos.getY());\n\t\t\t\tif (!nodes.createOpenNode(n, pos.x, pos.y, newf, ((dX - sX) << 3) + ((dY - sY) << 3) + (std::max(dX, dY) << 3), extraCost)) {\n\t\t\t\t\tif (found) {\n\t\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd096e9f42061732e36e866fe05db6c8e061352e110575e0cd33a66179a0bca8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 953, + "startColumn": 10, + "charOffset": 27430, + "charLength": 5, + "snippet": { + "text": "found" + } + }, + "contextRegion": { + "startLine": 951, + "startColumn": 10, + "charOffset": 27222, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tconst int_fast32_t dY = std::abs(targetPos.getY() - pos.getY());\n\t\t\t\tif (!nodes.createOpenNode(n, pos.x, pos.y, newf, ((dX - sX) << 3) + ((dY - sY) << 3) + (std::max(dX, dY) << 3), extraCost)) {\n\t\t\t\t\tif (found) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b15d18fde7cd4e6c4018d01583d63892f3383cd25ab3464a384f9739c5d802e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'AStarNode *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 953, + "startColumn": 10, + "charOffset": 27430, + "charLength": 5, + "snippet": { + "text": "found" + } + }, + "contextRegion": { + "startLine": 951, + "startColumn": 10, + "charOffset": 27222, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tconst int_fast32_t dY = std::abs(targetPos.getY() - pos.getY());\n\t\t\t\tif (!nodes.createOpenNode(n, pos.x, pos.y, newf, ((dX - sX) << 3) + ((dY - sY) << 3) + (std::max(dX, dY) << 3), extraCost)) {\n\t\t\t\t\tif (found) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c18f2ff8221faf72a683c9b9d9007e8920bc321ebcf4c7cfb094758ab4d162ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (do loop) is ID-dependent due to variable reference to 'nodes' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 961, + "startColumn": 11, + "charOffset": 27525, + "charLength": 3, + "snippet": { + "text": "fpp" + } + }, + "contextRegion": { + "startLine": 959, + "startColumn": 11, + "charOffset": 27489, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t\tnodes.closeNode(n);\n\t} while (fpp.maxSearchDist != 0 || nodes.getClosedNodes() < 100);\n\n\tif (!found) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb8bd612408e5d485656739649d681d56eccdb78a43980fe467a903cc08dbdeb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 961, + "startColumn": 62, + "charOffset": 27576, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 959, + "startColumn": 62, + "charOffset": 27489, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t\tnodes.closeNode(n);\n\t} while (fpp.maxSearchDist != 0 || nodes.getClosedNodes() < 100);\n\n\tif (!found) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12c491e94496e649dc37f0a7363ea5c1e5911fc93f26eeb3c6f0b53ad5cfddcf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 963, + "startColumn": 6, + "charOffset": 27588, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 961, + "startColumn": 6, + "charOffset": 27515, + "charLength": 1, + "snippet": { + "text": "\t} while (fpp.maxSearchDist != 0 || nodes.getClosedNodes() < 100);\n\n\tif (!found) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69a89f40db3c5ce9b6a82e4e63d3fe13c7591a70dc3a05dd2b4ef0afa77f912f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'AStarNode *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 963, + "startColumn": 7, + "charOffset": 27589, + "charLength": 5, + "snippet": { + "text": "found" + } + }, + "contextRegion": { + "startLine": 961, + "startColumn": 7, + "charOffset": 27515, + "charLength": 5, + "snippet": { + "text": "\t} while (fpp.maxSearchDist != 0 || nodes.getClosedNodes() < 100);\n\n\tif (!found) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20d8113da7678f9e7eb8aa96b2cd47f7f589750e4268c02a131a6e303ffdd058" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 973, + "startColumn": 2, + "charOffset": 27736, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 971, + "startColumn": 2, + "charOffset": 27710, + "charLength": 5, + "snippet": { + "text": "\n\tfound = found->parent;\n\twhile (found) {\n\t\tpos.x = found->x;\n\t\tpos.y = found->y;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2005edf560348a6b494c0d2abbdba602affcc5215cd852b6ce9854354ee7999a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'found' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 973, + "startColumn": 9, + "charOffset": 27743, + "charLength": 5, + "snippet": { + "text": "found" + } + }, + "contextRegion": { + "startLine": 971, + "startColumn": 9, + "charOffset": 27710, + "charLength": 5, + "snippet": { + "text": "\n\tfound = found->parent;\n\twhile (found) {\n\t\tpos.x = found->x;\n\t\tpos.y = found->y;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56c0b99cbfefc31c624de615a34db0d51efdc2f85fd18a6133dce96c089be0c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 973, + "startColumn": 9, + "charOffset": 27743, + "charLength": 5, + "snippet": { + "text": "found" + } + }, + "contextRegion": { + "startLine": 971, + "startColumn": 9, + "charOffset": 27710, + "charLength": 5, + "snippet": { + "text": "\n\tfound = found->parent;\n\twhile (found) {\n\t\tpos.x = found->x;\n\t\tpos.y = found->y;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af75e7399a3f72028a81d9215cd5bbab84093eb9d31cc29dce6c4ff2a14450b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'AStarNode *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 973, + "startColumn": 9, + "charOffset": 27743, + "charLength": 5, + "snippet": { + "text": "found" + } + }, + "contextRegion": { + "startLine": 971, + "startColumn": 9, + "charOffset": 27710, + "charLength": 5, + "snippet": { + "text": "\n\tfound = found->parent;\n\twhile (found) {\n\t\tpos.x = found->x;\n\t\tpos.y = found->y;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6816625c31a38ce28e48cd1f638de80ca84f7f9a98ee4a8e4d23296893b8081" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 982, + "startColumn": 3, + "charOffset": 27910, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 980, + "startColumn": 3, + "charOffset": 27874, + "charLength": 2, + "snippet": { + "text": "\t\tprevx = pos.x;\n\t\tprevy = pos.y;\n\t\tif (dx == 1) {\n\t\t\tif (dy == 1) {\n\t\t\t\tdirList.emplace_back(DIRECTION_NORTHWEST);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7429a9c5e1b79d415bbc2ffc1ca72c2641df4365704eaed7ec60f51ce7624fff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 984, + "startColumn": 13, + "charOffset": 27955, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 982, + "startColumn": 13, + "charOffset": 27908, + "charLength": 12, + "snippet": { + "text": "\t\tif (dx == 1) {\n\t\t\tif (dy == 1) {\n\t\t\t\tdirList.emplace_back(DIRECTION_NORTHWEST);\n\t\t\t} else if (dy == -1) {\n\t\t\t\tdirList.emplace_back(DIRECTION_SOUTHWEST);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46d86188325522461b2fe67369d19dc513e29ce4209bfeaa74d7c38ddc1b3157" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 986, + "startColumn": 13, + "charOffset": 28028, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 984, + "startColumn": 13, + "charOffset": 27943, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tdirList.emplace_back(DIRECTION_NORTHWEST);\n\t\t\t} else if (dy == -1) {\n\t\t\t\tdirList.emplace_back(DIRECTION_SOUTHWEST);\n\t\t\t} else {\n\t\t\t\tdirList.emplace_back(DIRECTION_WEST);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d6b9f2ee96b0899f8c8c494e99922a991982bc63c16ede284b09f3b9eb38486" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 988, + "startColumn": 13, + "charOffset": 28087, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 986, + "startColumn": 13, + "charOffset": 28016, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tdirList.emplace_back(DIRECTION_SOUTHWEST);\n\t\t\t} else {\n\t\t\t\tdirList.emplace_back(DIRECTION_WEST);\n\t\t\t}\n\t\t} else if (dx == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b288e87a2b067958e05c249e9cfeb112542a73b9335de3c1788362cccebaa565" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 992, + "startColumn": 13, + "charOffset": 28177, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 990, + "startColumn": 13, + "charOffset": 28122, + "charLength": 12, + "snippet": { + "text": "\t\t} else if (dx == -1) {\n\t\t\tif (dy == 1) {\n\t\t\t\tdirList.emplace_back(DIRECTION_NORTHEAST);\n\t\t\t} else if (dy == -1) {\n\t\t\t\tdirList.emplace_back(DIRECTION_SOUTHEAST);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3899c44e4b3f9ee34c3d1217fa94a2e7f02abfc15a041c8cbe819ac1d9435684" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 994, + "startColumn": 13, + "charOffset": 28250, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 992, + "startColumn": 13, + "charOffset": 28165, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tdirList.emplace_back(DIRECTION_NORTHEAST);\n\t\t\t} else if (dy == -1) {\n\t\t\t\tdirList.emplace_back(DIRECTION_SOUTHEAST);\n\t\t\t} else {\n\t\t\t\tdirList.emplace_back(DIRECTION_EAST);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0569c9f188399eb65478b1373b6969ae45faa2463ab9adc8177c7493db619aed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 996, + "startColumn": 13, + "charOffset": 28309, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 994, + "startColumn": 13, + "charOffset": 28238, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tdirList.emplace_back(DIRECTION_SOUTHEAST);\n\t\t\t} else {\n\t\t\t\tdirList.emplace_back(DIRECTION_EAST);\n\t\t\t}\n\t\t} else if (dy == 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24ae6712c2fd165a2b74e507d530a2353aac5fd6be40d6b37964ca78800cece9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 999, + "startColumn": 12, + "charOffset": 28379, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 997, + "startColumn": 12, + "charOffset": 28339, + "charLength": 12, + "snippet": { + "text": "\t\t\t}\n\t\t} else if (dy == 1) {\n\t\t\tdirList.emplace_back(DIRECTION_NORTH);\n\t\t} else if (dy == -1) {\n\t\t\tdirList.emplace_back(DIRECTION_SOUTH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "91f77b22b8b40f746ab50038dac9159ae8adf2db804cf64cc50cd74105c4ed7d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 1001, + "startColumn": 12, + "charOffset": 28446, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 999, + "startColumn": 12, + "charOffset": 28368, + "charLength": 12, + "snippet": { + "text": "\t\t\tdirList.emplace_back(DIRECTION_NORTH);\n\t\t} else if (dy == -1) {\n\t\t\tdirList.emplace_back(DIRECTION_SOUTH);\n\t\t}\n\t\tfound = found->parent;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0564621786773ad4c813a18ed00a2b53406db8a4aa539d14d07cc9b465ee114f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'clean' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 1009, + "startColumn": 15, + "charOffset": 28541, + "charLength": 5, + "snippet": { + "text": "clean" + } + }, + "contextRegion": { + "startLine": 1007, + "startColumn": 15, + "charOffset": 28524, + "charLength": 5, + "snippet": { + "text": "}\n\nuint32_t Map::clean() {\n\tuint64_t start = OTSYS_TIME();\n\tsize_t qntTiles = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2cedd4993b1dcbc53c153f374cf3ec336c8f5820c865457b4375fa2b05a0233" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "128 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 1018, + "startColumn": 19, + "charOffset": 28749, + "charLength": 3, + "snippet": { + "text": "128" + } + }, + "contextRegion": { + "startLine": 1016, + "startColumn": 19, + "charOffset": 28708, + "charLength": 3, + "snippet": { + "text": "\n\tItemVector toRemove;\n\ttoRemove.reserve(128);\n\n\tfor (const auto &tile : g_game().getTilesToClean()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72d508f737a74abc67a82dabbd6be9f753461464b0de1910f7f4c38efc339e49" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 1021, + "startColumn": 7, + "charOffset": 28817, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1019, + "startColumn": 7, + "charOffset": 28755, + "charLength": 1, + "snippet": { + "text": "\n\tfor (const auto &tile : g_game().getTilesToClean()) {\n\t\tif (!tile) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c33f58924dbacf1cad874de5aa9d3c11486372ee90df3e1d3b150b8574eb8708" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto items' can be declared as 'auto *const items'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 1025, + "startColumn": 7, + "charOffset": 28850, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 1023, + "startColumn": 7, + "charOffset": 28839, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\n\t\tif (const auto items = tile->getItemList()) {\n\t\t\t++qntTiles;\n\t\t\tfor (const auto &item : *items) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e1ccfbb58aa509ffcd8bc1f29e17f99fe58c06c9638a7941a6ebd35730c36f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 1027, + "startColumn": 4, + "charOffset": 28910, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1025, + "startColumn": 4, + "charOffset": 28844, + "charLength": 3, + "snippet": { + "text": "\t\tif (const auto items = tile->getItemList()) {\n\t\t\t++qntTiles;\n\t\t\tfor (const auto &item : *items) {\n\t\t\t\tif (item->isCleanable()) {\n\t\t\t\t\ttoRemove.emplace_back(item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0589e409c1f802a51ee0ea94c046b8907807c8fbc8b5e51b2b8bef57fbe5f5e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 1029, + "startColumn": 15, + "charOffset": 28989, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1027, + "startColumn": 15, + "charOffset": 28907, + "charLength": 12, + "snippet": { + "text": "\t\t\tfor (const auto &item : *items) {\n\t\t\t\tif (item->isCleanable()) {\n\t\t\t\t\ttoRemove.emplace_back(item);\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5cae813662caa4cf42daf0a08a1aeba755add230369a22b3eeb9f38f16c2c21b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 1036, + "startColumn": 2, + "charOffset": 29068, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1034, + "startColumn": 2, + "charOffset": 29027, + "charLength": 3, + "snippet": { + "text": "\n\tconst size_t count = toRemove.size();\n\tfor (const auto &item : toRemove) {\n\t\tg_game().internalRemoveItem(item, -1);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6378584c5a845ef4436dd53e4a35548c5d29d246317b48877b9c74fc300a5605" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 1037, + "startColumn": 12, + "charOffset": 29115, + "charLength": 18, + "snippet": { + "text": "internalRemoveItem" + } + }, + "contextRegion": { + "startLine": 1035, + "startColumn": 12, + "charOffset": 29028, + "charLength": 18, + "snippet": { + "text": "\tconst size_t count = toRemove.size();\n\tfor (const auto &item : toRemove) {\n\t\tg_game().internalRemoveItem(item, -1);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2e213ed21a7760065ed1ae107fd0b621fffcc5a44100b6546f788045fb7ef0c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 1047, + "startColumn": 145, + "charOffset": 29458, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1045, + "startColumn": 145, + "charOffset": 29283, + "charLength": 1, + "snippet": { + "text": "\n\tuint64_t end = OTSYS_TIME();\n\tg_logger().info(\"CLEAN: Removed {} item{} from {} tile{} in {} seconds\", count, (count != 1 ? \"s\" : \"\"), qntTiles, (qntTiles != 1 ? \"s\" : \"\"), (end - start) / (1000.f));\n\treturn count;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6a043d665314fbc93690522249c38c097f1c9a996777d6401829113af0f82fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 1047, + "startColumn": 145, + "charOffset": 29458, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1045, + "startColumn": 145, + "charOffset": 29283, + "charLength": 1, + "snippet": { + "text": "\n\tuint64_t end = OTSYS_TIME();\n\tg_logger().info(\"CLEAN: Removed {} item{} from {} tile{} in {} seconds\", count, (count != 1 ? \"s\" : \"\"), qntTiles, (qntTiles != 1 ? \"s\" : \"\"), (end - start) / (1000.f));\n\treturn count;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8bb47374c16b4280415eaa818285bf6637529f44aa434b95383f344ee61dfbff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 1047, + "startColumn": 162, + "charOffset": 29475, + "charLength": 6, + "snippet": { + "text": "1000.f" + } + }, + "contextRegion": { + "startLine": 1045, + "startColumn": 162, + "charOffset": 29283, + "charLength": 6, + "snippet": { + "text": "\n\tuint64_t end = OTSYS_TIME();\n\tg_logger().info(\"CLEAN: Removed {} item{} from {} tile{} in {} seconds\", count, (count != 1 ? \"s\" : \"\"), qntTiles, (qntTiles != 1 ? \"s\" : \"\"), (end - start) / (1000.f));\n\treturn count;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81bde2df4f459ea5d06fa1e6d98c2a54ae679e0df22aac382e6da2f16b7d4fd1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 1047, + "startColumn": 162, + "charOffset": 29475, + "charLength": 6, + "snippet": { + "text": "1000.f" + } + }, + "contextRegion": { + "startLine": 1045, + "startColumn": 162, + "charOffset": 29283, + "charLength": 6, + "snippet": { + "text": "\n\tuint64_t end = OTSYS_TIME();\n\tg_logger().info(\"CLEAN: Removed {} item{} from {} tile{} in {} seconds\", count, (count != 1 ? \"s\" : \"\"), qntTiles, (qntTiles != 1 ? \"s\" : \"\"), (end - start) / (1000.f));\n\treturn count;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dacd27f80b3d436eaba096c554e98b705d4b43f2fdd81a10d33e4ed4b8696c28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000.f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 1047, + "startColumn": 162, + "charOffset": 29475, + "charLength": 6, + "snippet": { + "text": "1000.f" + } + }, + "contextRegion": { + "startLine": 1045, + "startColumn": 162, + "charOffset": 29283, + "charLength": 6, + "snippet": { + "text": "\n\tuint64_t end = OTSYS_TIME();\n\tg_logger().info(\"CLEAN: Removed {} item{} from {} tile{} in {} seconds\", count, (count != 1 ? \"s\" : \"\"), qntTiles, (qntTiles != 1 ? \"s\" : \"\"), (end - start) / (1000.f));\n\treturn count;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb7a264ff499756e1bd7e6497db048a067ee311d8078eccc313f960332366d11" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/map.cpp" + }, + "region": { + "startLine": 1048, + "startColumn": 9, + "charOffset": 29493, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 1046, + "startColumn": 9, + "charOffset": 29284, + "charLength": 5, + "snippet": { + "text": "\tuint64_t end = OTSYS_TIME();\n\tg_logger().info(\"CLEAN: Removed {} item{} from {} tile{} in {} seconds\", count, (count != 1 ? \"s\" : \"\"), qntTiles, (qntTiles != 1 ? \"s\" : \"\"), (end - start) / (1000.f));\n\treturn count;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ba69d1ff0ef5e23dc450bb231695f1a4ffaa3113083213e109d33c629df5f95" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 1, + "charOffset": 737, + "charLength": 6, + "snippet": { + "text": "static" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 1, + "charOffset": 712, + "charLength": 6, + "snippet": { + "text": "#include \"io/iomap.hpp\"\n\nstatic phmap::flat_hash_map> items;\nstatic phmap::flat_hash_map> tiles;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a03dba4afd1d0b056a95386ed887331898a7c60ea487abfe4bbd24bb4b95c3da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'items' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 65, + "charOffset": 801, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 65, + "charOffset": 712, + "charLength": 5, + "snippet": { + "text": "#include \"io/iomap.hpp\"\n\nstatic phmap::flat_hash_map> items;\nstatic phmap::flat_hash_map> tiles;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c2ce00efee5a8991bf57d27808d6147761cba1023f206b3076d3be5a083a9d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-non-const-global-variables", + "ruleIndex": 486, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'items' is non-const and globally accessible, consider making it const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 65, + "charOffset": 801, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 65, + "charOffset": 712, + "charLength": 5, + "snippet": { + "text": "#include \"io/iomap.hpp\"\n\nstatic phmap::flat_hash_map> items;\nstatic phmap::flat_hash_map> tiles;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee3a8944a382c2f3effb577c2ed4333efb0393191b7521bd2a89468adf8bef30" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-use-anonymous-namespace", + "ruleIndex": 614, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'items' declared 'static', move to anonymous namespace instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 65, + "charOffset": 801, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 65, + "charOffset": 712, + "charLength": 5, + "snippet": { + "text": "#include \"io/iomap.hpp\"\n\nstatic phmap::flat_hash_map> items;\nstatic phmap::flat_hash_map> tiles;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "550de4a950de543c5900e86a4ecb4c82ec28c1eb2db0c3024812d4f6b7e88c62" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 1, + "charOffset": 808, + "charLength": 6, + "snippet": { + "text": "static" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 1, + "charOffset": 736, + "charLength": 6, + "snippet": { + "text": "\nstatic phmap::flat_hash_map> items;\nstatic phmap::flat_hash_map> tiles;\n\nstd::shared_ptr static_tryGetItemFromCache(const std::shared_ptr &ref) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7fda5f21573a90ff378246b4a38cd6798735984ba6fc8504d7d84a5412f7fb5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'tiles' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 65, + "charOffset": 872, + "charLength": 5, + "snippet": { + "text": "tiles" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 65, + "charOffset": 736, + "charLength": 5, + "snippet": { + "text": "\nstatic phmap::flat_hash_map> items;\nstatic phmap::flat_hash_map> tiles;\n\nstd::shared_ptr static_tryGetItemFromCache(const std::shared_ptr &ref) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e78e14d844e210cee4ad3dc8f6d9b63c99b29ef81efae613cd3c807b169a460e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-non-const-global-variables", + "ruleIndex": 486, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'tiles' is non-const and globally accessible, consider making it const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 65, + "charOffset": 872, + "charLength": 5, + "snippet": { + "text": "tiles" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 65, + "charOffset": 736, + "charLength": 5, + "snippet": { + "text": "\nstatic phmap::flat_hash_map> items;\nstatic phmap::flat_hash_map> tiles;\n\nstd::shared_ptr static_tryGetItemFromCache(const std::shared_ptr &ref) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "211af959cdd2e817416f5bbbae0adc825164725b630b1953a4f758efe100beac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-use-anonymous-namespace", + "ruleIndex": 614, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'tiles' declared 'static', move to anonymous namespace instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 65, + "charOffset": 872, + "charLength": 5, + "snippet": { + "text": "tiles" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 65, + "charOffset": 736, + "charLength": 5, + "snippet": { + "text": "\nstatic phmap::flat_hash_map> items;\nstatic phmap::flat_hash_map> tiles;\n\nstd::shared_ptr static_tryGetItemFromCache(const std::shared_ptr &ref) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e96ca3b01ec67b3e2dd03629cfb7d736a5837590b764f67a5bff3557ebc7189" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'flush' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 16, + "charOffset": 1241, + "charLength": 5, + "snippet": { + "text": "flush" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 16, + "charOffset": 1223, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid MapCache::flush() {\n\titems.clear();\n\ttiles.clear();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b33f98997eb021262875cf5f367b327a88aa9a28ab5411e880a32587d840045c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'parseItemAttr' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 16, + "charOffset": 1301, + "charLength": 13, + "snippet": { + "text": "parseItemAttr" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 16, + "charOffset": 1283, + "charLength": 13, + "snippet": { + "text": "}\n\nvoid MapCache::parseItemAttr(const std::shared_ptr &BasicItem, std::shared_ptr item) {\n\tif (BasicItem->charges > 0) {\n\t\titem->setSubType(BasicItem->charges);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c5ca4e57f2cac8bd80076431b0fcc5938a9ed155d83d63eb7eb5ec87ab7986e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 97, + "charOffset": 1382, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 97, + "charOffset": 1283, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid MapCache::parseItemAttr(const std::shared_ptr &BasicItem, std::shared_ptr item) {\n\tif (BasicItem->charges > 0) {\n\t\titem->setSubType(BasicItem->charges);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "521544ee6e5f6a1b7db3479df5e532b3670186085434cafc711c4ad31ece82be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'createItem' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 77, + "startColumn": 33, + "charOffset": 2446, + "charLength": 10, + "snippet": { + "text": "createItem" + } + }, + "contextRegion": { + "startLine": 75, + "startColumn": 33, + "charOffset": 2411, + "charLength": 10, + "snippet": { + "text": "}\n\nstd::shared_ptr MapCache::createItem(const std::shared_ptr &BasicItem, Position position) {\n\tauto item = Item::CreateItem(BasicItem->id, position);\n\tif (!item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e62fffbfb80b8c3c77f289a707347cc657f79bd777404e93ba7877babece0c0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 79, + "startColumn": 6, + "charOffset": 2584, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 77, + "startColumn": 6, + "charOffset": 2414, + "charLength": 1, + "snippet": { + "text": "std::shared_ptr MapCache::createItem(const std::shared_ptr &BasicItem, Position position) {\n\tauto item = Item::CreateItem(BasicItem->id, position);\n\tif (!item) {\n\t\treturn nullptr;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6761c01fa267d4a59ca4a7c26c0b7b3a0ddd0f10e8db98eba0d4a997487b242" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 86, + "startColumn": 3, + "charOffset": 2709, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 3, + "charOffset": 2648, + "charLength": 3, + "snippet": { + "text": "\n\tif (item->getContainer() && !BasicItem->items.empty()) {\n\t\tfor (const auto &BasicItemInside : BasicItem->items) {\n\t\t\tif (auto itemInsede = createItem(BasicItemInside, position)) {\n\t\t\t\titem->getContainer()->addItem(itemInsede);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c188ea14f19e80d1ca5b7df453487e7dcb617dde4aff82cb730443bf2ad710c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 89, + "startColumn": 44, + "charOffset": 2920, + "charLength": 10, + "snippet": { + "text": "itemInsede" + } + }, + "contextRegion": { + "startLine": 87, + "startColumn": 44, + "charOffset": 2764, + "charLength": 10, + "snippet": { + "text": "\t\t\tif (auto itemInsede = createItem(BasicItemInside, position)) {\n\t\t\t\titem->getContainer()->addItem(itemInsede);\n\t\t\t\titem->getContainer()->updateItemWeight(itemInsede->getWeight());\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92854c86c6fd74a5f8feb1daba50193bdfc21ac1c31cebeab43cf465182ab8f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 107, + "startColumn": 6, + "charOffset": 3335, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 105, + "startColumn": 6, + "charOffset": 3158, + "charLength": 1, + "snippet": { + "text": "std::shared_ptr MapCache::getOrCreateTileFromCache(const std::unique_ptr &floor, uint16_t x, uint16_t y) {\n\tconst auto cachedTile = floor->getTileCache(x, y);\n\tif (!cachedTile) {\n\t\treturn floor->getTile(x, y);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb4060205971c15b80af3590dd2b178d9569333afc8a6dabbfbe19e542ed8722" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto map' can be declared as 'auto *map'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 115, + "startColumn": 2, + "charOffset": 3462, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 113, + "startColumn": 2, + "charOffset": 3426, + "charLength": 4, + "snippet": { + "text": "\tconst uint8_t z = floor->getZ();\n\n\tauto map = static_cast(this);\n\n\tstd::shared_ptr tile = nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29f3459f7243979b5720b1aaa3858d940fcb79fbebbdaad1ac5e51d59eff98f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-static-cast-downcast", + "ruleIndex": 512, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 115, + "startColumn": 13, + "charOffset": 3473, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 113, + "startColumn": 13, + "charOffset": 3426, + "charLength": 11, + "snippet": { + "text": "\tconst uint8_t z = floor->getZ();\n\n\tauto map = static_cast(this);\n\n\tstd::shared_ptr tile = nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf56ace32fca531f537405c2728237ee1aae45f3fbcef16e47d5158c5692d7e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 2, + "charOffset": 4032, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 2, + "charOffset": 4027, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &BasicItemd : cachedTile->items) {\n\t\ttile->internalAddThing(createItem(BasicItemd, pos));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f045a1aa959adf5b4cb3a4f5b74e4dbd4f7c5775c72fa8f1f2502bc01ae637f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 142, + "startColumn": 3, + "charOffset": 4285, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 140, + "startColumn": 3, + "charOffset": 4204, + "charLength": 3, + "snippet": { + "text": "\t// add zone synchronously\n\tg_dispatcher().context().tryAddEvent([tile, pos] {\n\t\tfor (const auto &zone : Zone::getZones(pos)) {\n\t\t\ttile->addZone(zone);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "215523f20687593262e720431f0fbd83ace57b77cd541d37698e84a040716273" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto sector' can be declared as 'auto *const sector'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 162, + "startColumn": 6, + "charOffset": 4788, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 160, + "startColumn": 6, + "charOffset": 4726, + "charLength": 5, + "snippet": { + "text": "\n\tconst auto tile = static_tryGetTileFromCache(newTile);\n\tif (const auto sector = getMapSector(x, y)) {\n\t\tsector->createFloor(z)->setTileCache(x, y, tile);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "400c0e431d0cdc87374acf21e1e63d1bbf9c3af7c952716ce0c435798144538a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'tryReplaceItemFromCache' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 169, + "startColumn": 38, + "charOffset": 5003, + "charLength": 23, + "snippet": { + "text": "tryReplaceItemFromCache" + } + }, + "contextRegion": { + "startLine": 167, + "startColumn": 38, + "charOffset": 4963, + "charLength": 23, + "snippet": { + "text": "}\n\nstd::shared_ptr MapCache::tryReplaceItemFromCache(const std::shared_ptr &ref) {\n\treturn static_tryGetItemFromCache(ref);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "edebbcb1ec2ff63a52d6a0636a485ad08bcb2ed6804266815bc33ada068950aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 174, + "startColumn": 62, + "charOffset": 5248, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 62, + "charOffset": 5111, + "charLength": 2, + "snippet": { + "text": "\nMapSector* MapCache::createMapSector(const uint32_t x, const uint32_t y) {\n\tconst uint32_t index = x / SECTOR_SIZE | y / SECTOR_SIZE << 16;\n\tconst auto it = mapSectors.find(index);\n\tif (it != mapSectors.end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fed38f98bc32cd68878f221cd43dc25561b680b9682f0e424d929b981a13a62c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto sector' can be declared as 'auto *const sector'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 186, + "startColumn": 2, + "charOffset": 5507, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 184, + "startColumn": 2, + "charOffset": 5411, + "charLength": 5, + "snippet": { + "text": "MapSector* MapCache::getBestMapSector(uint32_t x, uint32_t y) {\n\tMapSector::newSector = false;\n\tconst auto sector = createMapSector(x, y);\n\n\tif (MapSector::newSector) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b6e3c498aa54feb916e294830f6ee0bde99bcccc0ffe614f14e583f17c6dbe6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto northSector' can be declared as 'auto *const northSector'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 190, + "startColumn": 7, + "charOffset": 5611, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 188, + "startColumn": 7, + "charOffset": 5551, + "charLength": 5, + "snippet": { + "text": "\tif (MapSector::newSector) {\n\t\t// update north sector\n\t\tif (const auto northSector = getMapSector(x, y - SECTOR_SIZE)) {\n\t\t\tnorthSector->sectorS = sector;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6753cfb67b25eacd88924540b36f508db6b8c378098f9de3d84ead3cf372a806" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto westSector' can be declared as 'auto *const westSector'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 195, + "startColumn": 7, + "charOffset": 5741, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 193, + "startColumn": 7, + "charOffset": 5710, + "charLength": 5, + "snippet": { + "text": "\n\t\t// update west sector\n\t\tif (const auto westSector = getMapSector(x - SECTOR_SIZE, y)) {\n\t\t\twestSector->sectorE = sector;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc5ef11a0f794682ca0046b0a0228b2eee8830c6f3b2ced28cb4fac3ea1bb7b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto southSector' can be declared as 'auto *const southSector'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 200, + "startColumn": 7, + "charOffset": 5870, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 198, + "startColumn": 7, + "charOffset": 5838, + "charLength": 5, + "snippet": { + "text": "\n\t\t// update south sector\n\t\tif (const auto southSector = getMapSector(x, y + SECTOR_SIZE)) {\n\t\t\tsector->sectorS = southSector;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0cb63ae79d8971c8b817a696b6dbf82355e7d1c25d76d8cd1bd2a391fc67c307" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto eastSector' can be declared as 'auto *const eastSector'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 205, + "startColumn": 7, + "charOffset": 6000, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 203, + "startColumn": 7, + "charOffset": 5969, + "charLength": 5, + "snippet": { + "text": "\n\t\t// update east sector\n\t\tif (const auto eastSector = getMapSector(x + SECTOR_SIZE, y)) {\n\t\t\tsector->sectorE = eastSector;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "392dc418d05b409291ee29d6555bf582329273552762562d7bdc915482d4103d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'unsigned int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 214, + "startColumn": 56, + "charOffset": 6215, + "charLength": 8, + "snippet": { + "text": "isStatic" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 56, + "charOffset": 6119, + "charLength": 8, + "snippet": { + "text": "\nvoid BasicTile::hash(size_t &h) const {\n\tstd::array arr = { flags, houseId, type, isStatic };\n\tfor (const auto v : arr) {\n\t\tif (v > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f645650e0b3326adcef72eaf5166e14dbda226d5f2ef07424b96b88b8d5185b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 215, + "startColumn": 2, + "charOffset": 6228, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 213, + "startColumn": 2, + "charOffset": 6120, + "charLength": 3, + "snippet": { + "text": "void BasicTile::hash(size_t &h) const {\n\tstd::array arr = { flags, houseId, type, isStatic };\n\tfor (const auto v : arr) {\n\t\tif (v > 0) {\n\t\t\tstdext::hash_combine(h, v);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "915f10a7fef55f3d19e0f3cb3ab4c1cd117333142f4e38b4e06c26f6cf6ee1eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 227, + "startColumn": 3, + "charOffset": 6424, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 225, + "startColumn": 3, + "charOffset": 6358, + "charLength": 3, + "snippet": { + "text": "\tif (!items.empty()) {\n\t\tstdext::hash_combine(h, items.size());\n\t\tfor (const auto &item : items) {\n\t\t\titem->hash(h);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db5a02d7f90564dbc223b70469afc466d16dd14d7e432ae0a2e704147336129e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'hash' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 233, + "startColumn": 17, + "charOffset": 6501, + "charLength": 4, + "snippet": { + "text": "hash" + } + }, + "contextRegion": { + "startLine": 231, + "startColumn": 17, + "charOffset": 6482, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid BasicItem::hash(size_t &h) const {\n\tconst std::array arr = { id, charges, actionId, uniqueId, destX, destY, destZ, doorOrDepotId };\n\tfor (const auto v : arr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36a628deb7abb04b2e5da62ad3265cc3b30f749290532d785bf871874c895711" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 235, + "startColumn": 2, + "charOffset": 6636, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 233, + "startColumn": 2, + "charOffset": 6485, + "charLength": 3, + "snippet": { + "text": "void BasicItem::hash(size_t &h) const {\n\tconst std::array arr = { id, charges, actionId, uniqueId, destX, destY, destZ, doorOrDepotId };\n\tfor (const auto v : arr) {\n\t\tif (v > 0) {\n\t\t\tstdext::hash_combine(h, v);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e108d8eb2ec6acc216cf9628232cc69b25f009acdd6037d5a726672c3be0547" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 247, + "startColumn": 3, + "charOffset": 6842, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 245, + "startColumn": 3, + "charOffset": 6776, + "charLength": 3, + "snippet": { + "text": "\tif (!items.empty()) {\n\t\tstdext::hash_combine(h, items.size());\n\t\tfor (const auto &item : items) {\n\t\t\titem->hash(h);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d5067a9c5c6d7b199d0c791d47f8143b7c432b542efc4cceac1802644bf71ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'unserializeItemNode' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 253, + "startColumn": 17, + "charOffset": 6919, + "charLength": 19, + "snippet": { + "text": "unserializeItemNode" + } + }, + "contextRegion": { + "startLine": 251, + "startColumn": 17, + "charOffset": 6900, + "charLength": 19, + "snippet": { + "text": "}\n\nbool BasicItem::unserializeItemNode(FileStream &stream, uint16_t x, uint16_t y, uint8_t z) {\n\tif (stream.isProp(OTB::Node::END)) {\n\t\tstream.back();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25d5e937950553784d1af309819ce71a418b107a63bf33609739133cddd32fe3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 261, + "startColumn": 2, + "charOffset": 7091, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 259, + "startColumn": 2, + "charOffset": 7070, + "charLength": 5, + "snippet": { + "text": "\treadAttr(stream);\n\n\twhile (stream.startNode()) {\n\t\tif (stream.getU8() != OTBM_ITEM) {\n\t\t\tthrow IOMapException(fmt::format(\"[x:{}, y:{}, z:{}] Could not read item node.\", x, y, z));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "714009c6db6289bdbf78c23b34af436197424f2aa2c5150aee58af76ebc208c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 263, + "startColumn": 25, + "charOffset": 7181, + "charLength": 3, + "snippet": { + "text": "fmt" + } + }, + "contextRegion": { + "startLine": 261, + "startColumn": 25, + "charOffset": 7090, + "charLength": 3, + "snippet": { + "text": "\twhile (stream.startNode()) {\n\t\tif (stream.getU8() != OTBM_ITEM) {\n\t\t\tthrow IOMapException(fmt::format(\"[x:{}, y:{}, z:{}] Could not read item node.\", x, y, z));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98f120436fea29027a9e58d7582ffeffbd75ac75c61d59c4220f18b9c1363280" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 272, + "startColumn": 25, + "charOffset": 7455, + "charLength": 3, + "snippet": { + "text": "fmt" + } + }, + "contextRegion": { + "startLine": 270, + "startColumn": 25, + "charOffset": 7377, + "charLength": 3, + "snippet": { + "text": "\n\t\tif (!item->unserializeItemNode(stream, x, y, z)) {\n\t\t\tthrow IOMapException(fmt::format(\"[x:{}, y:{}, z:{}] Failed to load item.\", x, y, z));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "940780423a578b15c1f1250f903ce09d057234c8e2d3c16792831b1a2dcfc8ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 275, + "startColumn": 9, + "charOffset": 7534, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 273, + "startColumn": 9, + "charOffset": 7521, + "charLength": 12, + "snippet": { + "text": "\t\t}\n\n\t\titems.emplace_back(static_tryGetItemFromCache(item));\n\n\t\tif (!stream.endNode()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eea4dbe80dc48772555d037b54151c7f81a3e6ff4e7db15218ca3a53db9da435" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 278, + "startColumn": 25, + "charOffset": 7634, + "charLength": 3, + "snippet": { + "text": "fmt" + } + }, + "contextRegion": { + "startLine": 276, + "startColumn": 25, + "charOffset": 7582, + "charLength": 3, + "snippet": { + "text": "\n\t\tif (!stream.endNode()) {\n\t\t\tthrow IOMapException(fmt::format(\"[x:{}, y:{}, z:{}] Could not end node.\", x, y, z));\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "599dc1dc0676db81a887db3f5c466dceacd89a9fa3f018dbdc97cd587f4a9764" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 287, + "startColumn": 2, + "charOffset": 7791, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 285, + "startColumn": 2, + "charOffset": 7724, + "charLength": 5, + "snippet": { + "text": "void BasicItem::readAttr(FileStream &stream) {\n\tbool end = false;\n\twhile (!end) {\n\t\tconst uint8_t attr = stream.getU8();\n\t\tswitch (attr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a308241c1b61c0b4c62b201a94bb9cef70151a7f753638c934a6b1dc935f629f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-unused-local-non-trivial-variable", + "ruleIndex": 115, + "kind": "fail", + "level": "warning", + "message": { + "text": "unused local variable 'str' of type 'const std::string' (aka 'const basic_string')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 328, + "startColumn": 16, + "charOffset": 8573, + "charLength": 3, + "snippet": { + "text": "str" + } + }, + "contextRegion": { + "startLine": 326, + "startColumn": 16, + "charOffset": 8536, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tcase ATTR_DESC: {\n\t\t\t\tconst auto str = stream.getString();\n\t\t\t\t// if (!str.empty())\n\t\t\t\t//\ttext = str;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b3afcebfe60b95bee75068bf272c57b8358c7cb15c12288148e1431dcc6b2b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.cpp" + }, + "region": { + "startLine": 333, + "startColumn": 4, + "charOffset": 8659, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 331, + "startColumn": 4, + "charOffset": 8643, + "charLength": 7, + "snippet": { + "text": "\t\t\t} break;\n\n\t\t\tdefault:\n\t\t\t\tstream.back();\n\t\t\t\tend = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc5d0f282bc1dcbd6bbe2cc002ae71a0da1e9ccbccc5fa58cc849cee9cfd3553" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'MapCache::setBasicTile' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/mapcache.hpp", + "index": 1 + }, + "region": { + "startLine": 86, + "startColumn": 7, + "charOffset": 1720, + "charLength": 12, + "snippet": { + "text": "setBasicTile" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 7, + "charOffset": 1681, + "charLength": 12, + "snippet": { + "text": "\tvirtual ~MapCache() = default;\n\n\tvoid setBasicTile(uint16_t x, uint16_t y, uint8_t z, const std::shared_ptr &BasicTile);\n\n\tstd::shared_ptr tryReplaceItemFromCache(const std::shared_ptr &ref);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "621d943fade87d7a64c26b6b21b352b470db9e48b3b27b6132e9f365ee95957b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 15, + "startColumn": 1, + "charOffset": 443, + "charLength": 5, + "snippet": { + "text": "phmap" + } + }, + "contextRegion": { + "startLine": 13, + "startColumn": 1, + "charOffset": 417, + "charLength": 5, + "snippet": { + "text": "#include \"game/game.hpp\"\n\nphmap::flat_hash_map Spectators::spectatorsCache;\n\nvoid Spectators::clearCache() {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b6a4ce12da36bfe6b62035c86d2d3454ab79fa31fcb66cdcb6d6e7f4af4d21a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'spectatorsCache' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 15, + "startColumn": 61, + "charOffset": 503, + "charLength": 15, + "snippet": { + "text": "spectatorsCache" + } + }, + "contextRegion": { + "startLine": 13, + "startColumn": 61, + "charOffset": 417, + "charLength": 15, + "snippet": { + "text": "#include \"game/game.hpp\"\n\nphmap::flat_hash_map Spectators::spectatorsCache;\n\nvoid Spectators::clearCache() {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14720cea342cc20047ed97633696f6179344c62269479fc1dfec5e6cb94f4970" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 23, + "startColumn": 13, + "charOffset": 686, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 21, + "startColumn": 13, + "charOffset": 582, + "charLength": 12, + "snippet": { + "text": "Spectators Spectators::insert(const std::shared_ptr &creature) {\n\tif (creature) {\n\t\tcreatures.emplace_back(creature);\n\t}\n\treturn *this;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8cb3ccbc952cbbf2f07a230ceccda574ab8fbf9c11753949fc37b428b3ec8da5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 32, + "startColumn": 13, + "charOffset": 873, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 13, + "charOffset": 816, + "charLength": 6, + "snippet": { + "text": "\t\tconst bool hasValue = !creatures.empty();\n\n\t\tcreatures.insert(creatures.end(), list.begin(), list.end());\n\n\t\t// Remove duplicate" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "edc85862aec4775f9ef6b5e75f9ee94c20966fdbcf98bcc2d1ef8c5a781742ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 14, + "charOffset": 1064, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 14, + "charOffset": 965, + "charLength": 6, + "snippet": { + "text": "\t\t\tstd::unordered_set uset(creatures.begin(), creatures.end());\n\t\t\tcreatures.clear();\n\t\t\tcreatures.insert(creatures.end(), uset.begin(), uset.end());\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f888a077092cc4267db4b7902ff621a68ca4fd31fed71b8fc9304cffa0e9b4ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 35, + "charOffset": 1406, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 35, + "charOffset": 1139, + "charLength": 1, + "snippet": { + "text": "\nbool Spectators::checkCache(const SpectatorsCache::FloorData &specData, bool onlyPlayers, const Position ¢erPos, bool checkDistance, bool multifloor, int32_t minRangeX, int32_t maxRangeX, int32_t minRangeY, int32_t maxRangeY) {\n\tconst auto &list = multifloor || !specData.floor ? specData.multiFloor : specData.floor;\n\n\tif (!list) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb761c427ea7032b6e96a4ac17eae10afc8138832ef24b21ee405a6dbe8cc45d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 47, + "startColumn": 6, + "charOffset": 1468, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 45, + "startColumn": 6, + "charOffset": 1372, + "charLength": 1, + "snippet": { + "text": "\tconst auto &list = multifloor || !specData.floor ? specData.multiFloor : specData.floor;\n\n\tif (!list) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff6a44387ef3484e5943699939ee3dd7d6376d158de960ae7bb9dcb0f25298a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 51, + "startColumn": 21, + "charOffset": 1517, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 49, + "startColumn": 21, + "charOffset": 1493, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!multifloor && !specData.floor) {\n\t\t// Force check the distance of creatures as we only need to pick up creatures from the Floor(centerPos.z)\n\t\tcheckDistance = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec664456e9890cd603ee4a09b1d06a8d300f9070dda0ddf00d02ffa3cb24ea0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 3, + "charOffset": 1765, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 3, + "charOffset": 1694, + "charLength": 3, + "snippet": { + "text": "\t\tCreatureVector spectators;\n\t\tspectators.reserve(creatures.size());\n\t\tfor (const auto &creature : *list) {\n\t\t\tconst auto &specPos = creature->getPosition();\n\t\t\tif (centerPos.x - specPos.x >= minRangeX" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "490cf6da0a82350265c9cb359acec9068c8b26ef52cc58fdb6bd93826ba60828" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 67, + "startColumn": 16, + "charOffset": 2156, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 65, + "startColumn": 16, + "charOffset": 2037, + "charLength": 12, + "snippet": { + "text": "\t\t\t && (multifloor || specPos.z == centerPos.z)\n\t\t\t && (!onlyPlayers || creature->getPlayer())) {\n\t\t\t\tspectators.emplace_back(creature);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "828e57f7fab484d6d8db8d952cabaea489c39f15c6b1568b10ec9f4a2e34ff0f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 3, + "charOffset": 2191, + "charLength": 9, + "snippet": { + "text": "insertAll" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 3, + "charOffset": 2180, + "charLength": 9, + "snippet": { + "text": "\t\t\t}\n\t\t}\n\t\tinsertAll(spectators);\n\t} else {\n\t\tinsertAll(*list);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ace14170e55c7709339a244374864237c976622a46cd95b8c063c3e9990e6ea5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 3, + "charOffset": 2226, + "charLength": 9, + "snippet": { + "text": "insertAll" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 3, + "charOffset": 2189, + "charLength": 9, + "snippet": { + "text": "\t\tinsertAll(spectators);\n\t} else {\n\t\tinsertAll(*list);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2692e156b278b820b96e9ca57cc9e1b0e584ee3bd1a3fbe757371e1dd8327378" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'find' has cognitive complexity of 64 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 24, + "charOffset": 2288, + "charLength": 4, + "snippet": { + "text": "find" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 24, + "charOffset": 2262, + "charLength": 4, + "snippet": { + "text": "}\n\nSpectators Spectators::find(const Position ¢erPos, bool multifloor, bool onlyPlayers, int32_t minRangeX, int32_t maxRangeX, int32_t minRangeY, int32_t maxRangeY) {\n\tminRangeX = (minRangeX == 0 ? -MAP_MAX_VIEW_PORT_X : -minRangeX);\n\tmaxRangeX = (maxRangeX == 0 ? MAP_MAX_VIEW_PORT_X : maxRangeX);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c3b368585ea3f156c885cdcefca16c67c23ba204856edb971b0986f27307377" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-2-1", + "ruleIndex": 447, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-2-1: Assignment operators shall not be used in sub-expressions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 90, + "startColumn": 32, + "charOffset": 3040, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 88, + "startColumn": 32, + "charOffset": 2850, + "charLength": 1, + "snippet": { + "text": "\t\tif (minRangeX < cache.minRangeX || maxRangeX > cache.maxRangeX || minRangeY < cache.minRangeY || maxRangeY > cache.maxRangeY) {\n\t\t\t// recache with new range\n\t\t\tcache.minRangeX = minRangeX = std::min(minRangeX, cache.minRangeX);\n\t\t\tcache.minRangeY = minRangeY = std::min(minRangeY, cache.minRangeY);\n\t\t\tcache.maxRangeX = maxRangeX = std::max(maxRangeX, cache.maxRangeX);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f208a3a810e919ce3b1c7f9c2de2536e37ef789f4586d0773ea301e43e118384" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-2-1", + "ruleIndex": 447, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-2-1: Assignment operators shall not be used in sub-expressions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 32, + "charOffset": 3120, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 32, + "charOffset": 2980, + "charLength": 1, + "snippet": { + "text": "\t\t\t// recache with new range\n\t\t\tcache.minRangeX = minRangeX = std::min(minRangeX, cache.minRangeX);\n\t\t\tcache.minRangeY = minRangeY = std::min(minRangeY, cache.minRangeY);\n\t\t\tcache.maxRangeX = maxRangeX = std::max(maxRangeX, cache.maxRangeX);\n\t\t\tcache.maxRangeY = maxRangeY = std::max(maxRangeY, cache.maxRangeY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a255f1be325a11bc87ccade7f14288189a8a4798366acb951b43f293bee6b97" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-2-1", + "ruleIndex": 447, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-2-1: Assignment operators shall not be used in sub-expressions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 92, + "startColumn": 32, + "charOffset": 3200, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 90, + "startColumn": 32, + "charOffset": 3009, + "charLength": 1, + "snippet": { + "text": "\t\t\tcache.minRangeX = minRangeX = std::min(minRangeX, cache.minRangeX);\n\t\t\tcache.minRangeY = minRangeY = std::min(minRangeY, cache.minRangeY);\n\t\t\tcache.maxRangeX = maxRangeX = std::max(maxRangeX, cache.maxRangeX);\n\t\t\tcache.maxRangeY = maxRangeY = std::max(maxRangeY, cache.maxRangeY);\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "976627d7653f5fa2e03d1baa4ee3f0e948487268c15a9df4469ffa2e39ac11cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-2-1", + "ruleIndex": 447, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-2-1: Assignment operators shall not be used in sub-expressions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 93, + "startColumn": 32, + "charOffset": 3280, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 91, + "startColumn": 32, + "charOffset": 3089, + "charLength": 1, + "snippet": { + "text": "\t\t\tcache.minRangeY = minRangeY = std::min(minRangeY, cache.minRangeY);\n\t\t\tcache.maxRangeX = maxRangeX = std::max(maxRangeX, cache.maxRangeX);\n\t\t\tcache.maxRangeY = maxRangeY = std::max(maxRangeY, cache.maxRangeY);\n\t\t} else {\n\t\t\tconst bool checkDistance = minRangeX != cache.minRangeX || maxRangeX != cache.maxRangeX || minRangeY != cache.minRangeY || maxRangeY != cache.maxRangeY;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47d9cda83ee20471215bed4831b61f774b56edb3c740df8bc79664e2791a0071" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 97, + "startColumn": 4, + "charOffset": 3500, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 95, + "startColumn": 4, + "charOffset": 3340, + "charLength": 2, + "snippet": { + "text": "\t\t\tconst bool checkDistance = minRangeX != cache.minRangeX || maxRangeX != cache.maxRangeX || minRangeY != cache.minRangeY || maxRangeY != cache.maxRangeY;\n\n\t\t\tif (onlyPlayers) {\n\t\t\t\t// check players cache\n\t\t\t\tif (checkCache(cache.players, true, centerPos, checkDistance, multifloor, minRangeX, maxRangeX, minRangeY, maxRangeY)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78f3c6f307116b379e7caecda8ea67ef47e9640c64d985fb3ed148c989d33f48" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'signed char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 120, + "startColumn": 54, + "charOffset": 4291, + "charLength": 9, + "snippet": { + "text": "centerPos" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 54, + "charOffset": 4173, + "charLength": 9, + "snippet": { + "text": "\tif (multifloor) {\n\t\tif (centerPos.z > MAP_INIT_SURFACE_LAYER) {\n\t\t\tminRangeZ = static_cast(std::max(centerPos.z - MAP_LAYER_VIEW_LIMIT, 0u));\n\t\t\tmaxRangeZ = static_cast(std::min(centerPos.z + MAP_LAYER_VIEW_LIMIT, MAP_MAX_LAYERS - 1));\n\t\t} else if (centerPos.z == MAP_INIT_SURFACE_LAYER - 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da8f27c9f3b3e637a1eb3ac4c5590d7505940204e80c286da92c97d11a44667b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 120, + "startColumn": 90, + "charOffset": 4327, + "charLength": 2, + "snippet": { + "text": "0u" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 90, + "charOffset": 4173, + "charLength": 2, + "snippet": { + "text": "\tif (multifloor) {\n\t\tif (centerPos.z > MAP_INIT_SURFACE_LAYER) {\n\t\t\tminRangeZ = static_cast(std::max(centerPos.z - MAP_LAYER_VIEW_LIMIT, 0u));\n\t\t\tmaxRangeZ = static_cast(std::min(centerPos.z + MAP_LAYER_VIEW_LIMIT, MAP_MAX_LAYERS - 1));\n\t\t} else if (centerPos.z == MAP_INIT_SURFACE_LAYER - 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9873b74bd303832df8f8aa867e8334ea381a351eda1f548f48c033b46aa85655" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "integer literal has suffix 'u', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 120, + "startColumn": 90, + "charOffset": 4327, + "charLength": 2, + "snippet": { + "text": "0u" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 90, + "charOffset": 4173, + "charLength": 2, + "snippet": { + "text": "\tif (multifloor) {\n\t\tif (centerPos.z > MAP_INIT_SURFACE_LAYER) {\n\t\t\tminRangeZ = static_cast(std::max(centerPos.z - MAP_LAYER_VIEW_LIMIT, 0u));\n\t\t\tmaxRangeZ = static_cast(std::min(centerPos.z + MAP_LAYER_VIEW_LIMIT, MAP_MAX_LAYERS - 1));\n\t\t} else if (centerPos.z == MAP_INIT_SURFACE_LAYER - 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13f0225a5daf9b6ab2f025c0d81f83698ea4d1baa07e9c29b1d5ac399cf57910" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'signed char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 121, + "startColumn": 54, + "charOffset": 4386, + "charLength": 9, + "snippet": { + "text": "centerPos" + } + }, + "contextRegion": { + "startLine": 119, + "startColumn": 54, + "charOffset": 4192, + "charLength": 9, + "snippet": { + "text": "\t\tif (centerPos.z > MAP_INIT_SURFACE_LAYER) {\n\t\t\tminRangeZ = static_cast(std::max(centerPos.z - MAP_LAYER_VIEW_LIMIT, 0u));\n\t\t\tmaxRangeZ = static_cast(std::min(centerPos.z + MAP_LAYER_VIEW_LIMIT, MAP_MAX_LAYERS - 1));\n\t\t} else if (centerPos.z == MAP_INIT_SURFACE_LAYER - 1) {\n\t\t\tminRangeZ = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76cf5979e4bc527ab4d591d9f11aec744049617b737140a11b4282275d35dff0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int_fast16_t' (aka 'long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 143, + "startColumn": 28, + "charOffset": 5202, + "charLength": 9, + "snippet": { + "text": "centerPos" + } + }, + "contextRegion": { + "startLine": 141, + "startColumn": 28, + "charOffset": 5108, + "charLength": 9, + "snippet": { + "text": "\tconst auto depth = static_cast(maxRangeZ - minRangeZ);\n\n\tconst int32_t minoffset = centerPos.getZ() - maxRangeZ;\n\tconst int32_t x1 = std::min(0xFFFF, std::max(0, min_x + minoffset));\n\tconst int32_t y1 = std::min(0xFFFF, std::max(0, min_y + minoffset));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b15b2b786bbb8a86d5121fb7de15f292b2d2f3b4af6677b1170f3630f3514c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 143, + "startColumn": 28, + "charOffset": 5202, + "charLength": 9, + "snippet": { + "text": "centerPos" + } + }, + "contextRegion": { + "startLine": 141, + "startColumn": 28, + "charOffset": 5108, + "charLength": 9, + "snippet": { + "text": "\tconst auto depth = static_cast(maxRangeZ - minRangeZ);\n\n\tconst int32_t minoffset = centerPos.getZ() - maxRangeZ;\n\tconst int32_t x1 = std::min(0xFFFF, std::max(0, min_x + minoffset));\n\tconst int32_t y1 = std::min(0xFFFF, std::max(0, min_y + minoffset));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1bfb747b3c29c925945cee8dcf119ba69b870841434264de903e74e405b0815" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int_fast16_t' (aka 'long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 147, + "startColumn": 28, + "charOffset": 5436, + "charLength": 9, + "snippet": { + "text": "centerPos" + } + }, + "contextRegion": { + "startLine": 145, + "startColumn": 28, + "charOffset": 5320, + "charLength": 9, + "snippet": { + "text": "\tconst int32_t y1 = std::min(0xFFFF, std::max(0, min_y + minoffset));\n\n\tconst int32_t maxoffset = centerPos.getZ() - minRangeZ;\n\tconst int32_t x2 = std::min(0xFFFF, std::max(0, max_x + maxoffset));\n\tconst int32_t y2 = std::min(0xFFFF, std::max(0, max_y + maxoffset));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f273155d9e5a64990e4ed2655c6f9a42ae0f254b889072099eb501dfd44213a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 147, + "startColumn": 28, + "charOffset": 5436, + "charLength": 9, + "snippet": { + "text": "centerPos" + } + }, + "contextRegion": { + "startLine": 145, + "startColumn": 28, + "charOffset": 5320, + "charLength": 9, + "snippet": { + "text": "\tconst int32_t y1 = std::min(0xFFFF, std::max(0, min_y + minoffset));\n\n\tconst int32_t maxoffset = centerPos.getZ() - minRangeZ;\n\tconst int32_t x2 = std::min(0xFFFF, std::max(0, max_x + maxoffset));\n\tconst int32_t y2 = std::min(0xFFFF, std::max(0, max_y + maxoffset));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "910740e21ad10deed345fed36d8612aca5e7366d4509ab0a3e74dc19bf7f5597" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 151, + "startColumn": 32, + "charOffset": 5674, + "charLength": 2, + "snippet": { + "text": "x1" + } + }, + "contextRegion": { + "startLine": 149, + "startColumn": 32, + "charOffset": 5554, + "charLength": 2, + "snippet": { + "text": "\tconst int32_t y2 = std::min(0xFFFF, std::max(0, max_y + maxoffset));\n\n\tconst int32_t startx1 = x1 - (x1 & SECTOR_MASK);\n\tconst int32_t starty1 = y1 - (y1 & SECTOR_MASK);\n\tconst int32_t endx2 = x2 - (x2 & SECTOR_MASK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2eb2e18257db9d5d389d6381963f0a60a5897ac4742f4cddaf83f91c35a36416" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 152, + "startColumn": 32, + "charOffset": 5724, + "charLength": 2, + "snippet": { + "text": "y1" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 32, + "charOffset": 5642, + "charLength": 2, + "snippet": { + "text": "\n\tconst int32_t startx1 = x1 - (x1 & SECTOR_MASK);\n\tconst int32_t starty1 = y1 - (y1 & SECTOR_MASK);\n\tconst int32_t endx2 = x2 - (x2 & SECTOR_MASK);\n\tconst int32_t endy2 = y2 - (y2 & SECTOR_MASK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39196f273618728aa7ffcf6f746173b60e2c69ffc5dcc940c637d09bab66db7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 153, + "startColumn": 30, + "charOffset": 5772, + "charLength": 2, + "snippet": { + "text": "x2" + } + }, + "contextRegion": { + "startLine": 151, + "startColumn": 30, + "charOffset": 5643, + "charLength": 2, + "snippet": { + "text": "\tconst int32_t startx1 = x1 - (x1 & SECTOR_MASK);\n\tconst int32_t starty1 = y1 - (y1 & SECTOR_MASK);\n\tconst int32_t endx2 = x2 - (x2 & SECTOR_MASK);\n\tconst int32_t endy2 = y2 - (y2 & SECTOR_MASK);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6cdb8763b529694eca3d92724cf36497193ebc99fc95586729913dcb84493eea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 154, + "startColumn": 30, + "charOffset": 5820, + "charLength": 2, + "snippet": { + "text": "y2" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 30, + "charOffset": 5693, + "charLength": 2, + "snippet": { + "text": "\tconst int32_t starty1 = y1 - (y1 & SECTOR_MASK);\n\tconst int32_t endx2 = x2 - (x2 & SECTOR_MASK);\n\tconst int32_t endy2 = y2 - (y2 & SECTOR_MASK);\n\n\tCreatureVector spectators;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb1aada0fe9d2f42ab86d91298069122e173c4054bda73e3ba20dd064908701c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'size_type' (aka 'unsigned long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 21, + "charOffset": 5888, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 21, + "charOffset": 5839, + "charLength": 3, + "snippet": { + "text": "\n\tCreatureVector spectators;\n\tspectators.reserve(std::max(MAP_MAX_VIEW_PORT_X, MAP_MAX_VIEW_PORT_Y) * 2);\n\n\tconst MapSector* startSector = g_game().map.getMapSector(startx1, starty1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34e258c9448abcc6f8d61b32a7868da86c00a0960837300705582131b3d5fd18" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 39, + "charOffset": 5906, + "charLength": 19, + "snippet": { + "text": "MAP_MAX_VIEW_PORT_X" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 39, + "charOffset": 5839, + "charLength": 19, + "snippet": { + "text": "\n\tCreatureVector spectators;\n\tspectators.reserve(std::max(MAP_MAX_VIEW_PORT_X, MAP_MAX_VIEW_PORT_Y) * 2);\n\n\tconst MapSector* startSector = g_game().map.getMapSector(startx1, starty1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "264d39728034a9cbd51b23592b31c0c79fecf59196a11ecbc4f2ab0929c04221" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 60, + "charOffset": 5927, + "charLength": 19, + "snippet": { + "text": "MAP_MAX_VIEW_PORT_Y" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 60, + "charOffset": 5839, + "charLength": 19, + "snippet": { + "text": "\n\tCreatureVector spectators;\n\tspectators.reserve(std::max(MAP_MAX_VIEW_PORT_X, MAP_MAX_VIEW_PORT_Y) * 2);\n\n\tconst MapSector* startSector = g_game().map.getMapSector(startx1, starty1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6760a7a1a5af74db71d1b7a6be0c85ade98a752e258bbc60fee7b614e97736df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'ny' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 161, + "startColumn": 29, + "charOffset": 6101, + "charLength": 2, + "snippet": { + "text": "ny" + } + }, + "contextRegion": { + "startLine": 159, + "startColumn": 29, + "charOffset": 5955, + "charLength": 2, + "snippet": { + "text": "\tconst MapSector* startSector = g_game().map.getMapSector(startx1, starty1);\n\tconst MapSector* sectorS = startSector;\n\tfor (int32_t ny = starty1; ny <= endy2; ny += SECTOR_SIZE) {\n\t\tconst MapSector* sectorE = sectorS;\n\t\tfor (int32_t nx = startx1; nx <= endx2; nx += SECTOR_SIZE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01aae6d4724c6adf57e1a98bcb6d5264c68d8c25561522844e27fbac1c015c09" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'nx' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 163, + "startColumn": 30, + "charOffset": 6202, + "charLength": 2, + "snippet": { + "text": "nx" + } + }, + "contextRegion": { + "startLine": 161, + "startColumn": 30, + "charOffset": 6073, + "charLength": 2, + "snippet": { + "text": "\tfor (int32_t ny = starty1; ny <= endy2; ny += SECTOR_SIZE) {\n\t\tconst MapSector* sectorE = sectorS;\n\t\tfor (int32_t nx = startx1; nx <= endx2; nx += SECTOR_SIZE) {\n\t\t\tif (sectorE) {\n\t\t\t\tconst auto &node_list = onlyPlayers ? sectorE->player_list : sectorE->creature_list;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "686efb61628bb6ad66eeb51667312451860cd3c5dd568d7f3c9d7f65b4fc8109" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 164, + "startColumn": 8, + "charOffset": 6243, + "charLength": 7, + "snippet": { + "text": "sectorE" + } + }, + "contextRegion": { + "startLine": 162, + "startColumn": 8, + "charOffset": 6135, + "charLength": 7, + "snippet": { + "text": "\t\tconst MapSector* sectorE = sectorS;\n\t\tfor (int32_t nx = startx1; nx <= endx2; nx += SECTOR_SIZE) {\n\t\t\tif (sectorE) {\n\t\t\t\tconst auto &node_list = onlyPlayers ? sectorE->player_list : sectorE->creature_list;\n\t\t\t\tfor (const auto &creature : node_list) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df7975cc1a0f809e647e9e106d9bf33fac9ab51e63b49777894b037c4ec58fc2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const MapSector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 164, + "startColumn": 8, + "charOffset": 6243, + "charLength": 7, + "snippet": { + "text": "sectorE" + } + }, + "contextRegion": { + "startLine": 162, + "startColumn": 8, + "charOffset": 6135, + "charLength": 7, + "snippet": { + "text": "\t\tconst MapSector* sectorE = sectorS;\n\t\tfor (int32_t nx = startx1; nx <= endx2; nx += SECTOR_SIZE) {\n\t\t\tif (sectorE) {\n\t\t\t\tconst auto &node_list = onlyPlayers ? sectorE->player_list : sectorE->creature_list;\n\t\t\t\tfor (const auto &creature : node_list) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d175d3d0ea50d7bc42623b4f77276737f1ffe6c4f7b4d702edb3a742576be6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 166, + "startColumn": 5, + "charOffset": 6347, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 5, + "charOffset": 6236, + "charLength": 3, + "snippet": { + "text": "\t\t\tif (sectorE) {\n\t\t\t\tconst auto &node_list = onlyPlayers ? sectorE->player_list : sectorE->creature_list;\n\t\t\t\tfor (const auto &creature : node_list) {\n\t\t\t\t\tconst auto &cpos = creature->getPosition();\n\t\t\t\t\tif (static_cast(static_cast(cpos.z) - minRangeZ) <= depth) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9762bf6dc23fa6356eb97ff21f04769aa50229d500921f351f67ed93eec03a99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 171, + "startColumn": 19, + "charOffset": 6745, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 169, + "startColumn": 19, + "charOffset": 6522, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t\t\tconst int_fast16_t offsetZ = Position::getOffsetZ(centerPos, cpos);\n\t\t\t\t\t\tif (static_cast(cpos.x - offsetZ - min_x) <= width && static_cast(cpos.y - offsetZ - min_y) <= height) {\n\t\t\t\t\t\t\tspectators.emplace_back(creature);\n\t\t\t\t\t\t}\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b111ba937ec8d1c66e1896a9a9ebeaa76c05fdef0c9f07d3ea1f214a1b4979b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 181, + "startColumn": 7, + "charOffset": 6913, + "charLength": 7, + "snippet": { + "text": "sectorS" + } + }, + "contextRegion": { + "startLine": 179, + "startColumn": 7, + "charOffset": 6902, + "charLength": 7, + "snippet": { + "text": "\t\t}\n\n\t\tif (sectorS) {\n\t\t\tsectorS = sectorS->sectorS;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe9ddae611ffc8fbda4969b89cb0a7079e91018043d1d21cc7627628f4384776" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const MapSector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 181, + "startColumn": 7, + "charOffset": 6913, + "charLength": 7, + "snippet": { + "text": "sectorS" + } + }, + "contextRegion": { + "startLine": 179, + "startColumn": 7, + "charOffset": 6902, + "charLength": 7, + "snippet": { + "text": "\t\t}\n\n\t\tif (sectorS) {\n\t\t\tsectorS = sectorS->sectorS;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9776f9812fa318176097158389d7fe294661116e8be6d09a39b06103275471f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 195, + "startColumn": 16, + "charOffset": 7615, + "charLength": 7, + "snippet": { + "text": "emplace" + } + }, + "contextRegion": { + "startLine": 193, + "startColumn": 16, + "charOffset": 7565, + "charLength": 7, + "snippet": { + "text": "\t\tcreatureList->clear();\n\t} else {\n\t\tcreatureList.emplace();\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef5238e2d0603e2aefc2e0dbb19569413941d458212638d5fd77e252bc361ede" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 199, + "startColumn": 3, + "charOffset": 7660, + "charLength": 9, + "snippet": { + "text": "insertAll" + } + }, + "contextRegion": { + "startLine": 197, + "startColumn": 3, + "charOffset": 7629, + "charLength": 9, + "snippet": { + "text": "\n\tif (!spectators.empty()) {\n\t\tinsertAll(spectators);\n\n\t\tcreatureList->insert(creatureList->end(), spectators.begin(), spectators.end());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f19756c0df55ac5ae11870cfbe997aded26b994357974a5f1168098cd21ee63a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/map/spectators.cpp" + }, + "region": { + "startLine": 201, + "startColumn": 17, + "charOffset": 7700, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 17, + "charOffset": 7658, + "charLength": 6, + "snippet": { + "text": "\t\tinsertAll(spectators);\n\n\t\tcreatureList->insert(creatureList->end(), spectators.begin(), spectators.end());\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e19aeb1b425d5d59d7ec85ccafe11e18ab84beef0088c00432e35bdd2c2fb956" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvmlibc-restrict-system-libc-headers", + "ruleIndex": 592, + "kind": "fail", + "level": "warning", + "message": { + "text": "system include argon2.h not allowed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 16, + "startColumn": 1, + "charOffset": 491, + "charLength": 1, + "snippet": { + "text": "#" + } + }, + "contextRegion": { + "startLine": 14, + "startColumn": 1, + "charOffset": 460, + "charLength": 1, + "snippet": { + "text": "#include \"security/argon.hpp\"\n\n#include \n\nArgon2::Argon2() {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ebe4a8bbec66578f9de0e8e584e24abe6216ba43a23524f55471a1c21998b12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-member-init", + "ruleIndex": 510, + "kind": "fail", + "level": "warning", + "message": { + "text": "constructor does not initialize these fields: m_cost, t_cost, parallelism" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 18, + "startColumn": 1, + "charOffset": 512, + "charLength": 6, + "snippet": { + "text": "Argon2" + } + }, + "contextRegion": { + "startLine": 16, + "startColumn": 1, + "charOffset": 491, + "charLength": 6, + "snippet": { + "text": "#include \n\nArgon2::Argon2() {\n\tupdateConstants();\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf3b3f5d66a08ffe7716584c5b6dae8e00d10251ea5934373c8df0b94b6d6af8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'parseBitShift' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 29, + "startColumn": 18, + "charOffset": 845, + "charLength": 13, + "snippet": { + "text": "parseBitShift" + } + }, + "contextRegion": { + "startLine": 27, + "startColumn": 18, + "charOffset": 825, + "charLength": 13, + "snippet": { + "text": "}\n\nuint32_t Argon2::parseBitShift(const std::string &bitShiftStr) const {\n\tstd::stringstream ss(bitShiftStr);\n\tint base;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3966c2f825d6c038df83abc5ad427008052383ed8a330fad7d6c7132bd91a9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'base' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 31, + "startColumn": 6, + "charOffset": 940, + "charLength": 4, + "snippet": { + "text": "base" + } + }, + "contextRegion": { + "startLine": 29, + "startColumn": 6, + "charOffset": 828, + "charLength": 4, + "snippet": { + "text": "uint32_t Argon2::parseBitShift(const std::string &bitShiftStr) const {\n\tstd::stringstream ss(bitShiftStr);\n\tint base;\n\tint shift;\n\tchar op1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c9c949a06eabf8662533efbbb8a0c59502f05fedb27fa20167e838c484f9c57" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'shift' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 32, + "startColumn": 6, + "charOffset": 951, + "charLength": 5, + "snippet": { + "text": "shift" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 6, + "charOffset": 899, + "charLength": 5, + "snippet": { + "text": "\tstd::stringstream ss(bitShiftStr);\n\tint base;\n\tint shift;\n\tchar op1;\n\tchar op2;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a164b1979820afe373d1db13cdfa96221b62f53622d8e53a7317f8c3d4332369" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'op1' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 7, + "charOffset": 964, + "charLength": 3, + "snippet": { + "text": "op1" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 7, + "charOffset": 935, + "charLength": 3, + "snippet": { + "text": "\tint base;\n\tint shift;\n\tchar op1;\n\tchar op2;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6336f5d7cb86c42b0f88045b752c293683f758fea34650c5601a71b1f11cb61a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'op2' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 7, + "charOffset": 975, + "charLength": 3, + "snippet": { + "text": "op2" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 7, + "charOffset": 946, + "charLength": 3, + "snippet": { + "text": "\tint shift;\n\tchar op1;\n\tchar op2;\n\n\tif (!(ss >> base >> op1 >> op2 >> shift) || op1 != '<' || op2 != '<') {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe8a917218d5963ef4b54bb6c851865d061853321ed511aba6bd2e0347770da5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 36, + "startColumn": 6, + "charOffset": 986, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 6, + "charOffset": 969, + "charLength": 1, + "snippet": { + "text": "\tchar op2;\n\n\tif (!(ss >> base >> op1 >> op2 >> shift) || op1 != '<' || op2 != '<') {\n\t\tg_logger().warn(\"Invalid bit shift string\");\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d108d0d652e462f56760c0e42131c074fcd1e9d061a5434a80c99009c629b29a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 40, + "startColumn": 9, + "charOffset": 1113, + "charLength": 4, + "snippet": { + "text": "base" + } + }, + "contextRegion": { + "startLine": 38, + "startColumn": 9, + "charOffset": 1101, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\treturn base << shift;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a7c7df36e9935364e8248db2597e8538772dd3a0c7c64b7e395809d94ef1df0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'verifyPassword' of similar type ('const std::string &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 29, + "charOffset": 1159, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 29, + "charOffset": 1128, + "charLength": 5, + "snippet": { + "text": "}\n\nbool Argon2::verifyPassword(const std::string &password, const std::string &phash) const {\n\n\tconst std::regex re(\"\\\\$([A-Za-z0-9+/]+)\\\\$([A-Za-z0-9+/]+)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a36fe50f086b0e4a232ef2fc43878a9be9b89d1e2d18bf73080dd65ed3e738b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-1", + "ruleIndex": 413, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-1: Only those escape sequences that are defined in ISO/IEC 14882:2003 shall be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 22, + "charOffset": 1244, + "charLength": 40, + "snippet": { + "text": "\"\\\\$([A-Za-z0-9+/]+)\\\\$([A-Za-z0-9+/]+)\"" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 22, + "charOffset": 1131, + "charLength": 40, + "snippet": { + "text": "bool Argon2::verifyPassword(const std::string &password, const std::string &phash) const {\n\n\tconst std::regex re(\"\\\\$([A-Za-z0-9+/]+)\\\\$([A-Za-z0-9+/]+)\");\n\tstd::smatch match;\n\tif (!std::regex_search(phash, match, re)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0eb2945e4031b1ff610f094696e680e44744287ee518994f9f6ec7cdf849dffa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'base64_decode' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 30, + "charOffset": 1922, + "charLength": 13, + "snippet": { + "text": "base64_decode" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 30, + "charOffset": 1890, + "charLength": 13, + "snippet": { + "text": "}\n\nstd::vector Argon2::base64_decode(const std::string &input) const {\n\tconst std::string base64_chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n\tstd::vector ret;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "acd1ca59f4f8597ae9e861632977af013458e6b458e29d0c891be79a35d3ed6c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 71, + "startColumn": 2, + "charOffset": 2131, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 69, + "startColumn": 2, + "charOffset": 2099, + "charLength": 3, + "snippet": { + "text": "\tint i = 0;\n\tuint32_t val = 0;\n\tfor (char c : input) {\n\t\tif (isspace(c) || c == '=') {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08aa52b2766cb3e125142595b6c2dc0bd89653dd9564d9cd84103f57ce265ba8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-11", + "ruleIndex": 423, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-11: The plain char type shall only be used for the storage and use of character values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 71, + "startColumn": 12, + "charOffset": 2141, + "charLength": 1, + "snippet": { + "text": "c" + } + }, + "contextRegion": { + "startLine": 69, + "startColumn": 12, + "charOffset": 2099, + "charLength": 1, + "snippet": { + "text": "\tint i = 0;\n\tuint32_t val = 0;\n\tfor (char c : input) {\n\t\tif (isspace(c) || c == '=') {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c8c9845637f54f45b0e8a83eabac96d5e050d806991a411cee9a0d2de940e57" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 7, + "charOffset": 2160, + "charLength": 7, + "snippet": { + "text": "isspace" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 7, + "charOffset": 2111, + "charLength": 7, + "snippet": { + "text": "\tuint32_t val = 0;\n\tfor (char c : input) {\n\t\tif (isspace(c) || c == '=') {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d40ee8dc8574b5bb7b7a1154835bf7ea35932e7487f50eeecde3b293f43a39f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 7, + "charOffset": 2160, + "charLength": 7, + "snippet": { + "text": "isspace" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 7, + "charOffset": 2111, + "charLength": 7, + "snippet": { + "text": "\tuint32_t val = 0;\n\tfor (char c : input) {\n\t\tif (isspace(c) || c == '=') {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b75964512a053254b0dd159c541322fdf0e497daf0205b1a6295d986d7ee274" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 18, + "charOffset": 2171, + "charLength": 2, + "snippet": { + "text": "||" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 18, + "charOffset": 2111, + "charLength": 2, + "snippet": { + "text": "\tuint32_t val = 0;\n\tfor (char c : input) {\n\t\tif (isspace(c) || c == '=') {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f4ad04dcff51da5395b5ba6dbf0920aa3eedf705154a3919241ce774e040e13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 82, + "startColumn": 18, + "charOffset": 2475, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 18, + "charOffset": 2392, + "charLength": 1, + "snippet": { + "text": "\t\t\tg_logger().warn(\"Position too large for uint32_t\");\n\t\t} else {\n\t\t\tval = (val << 6) + static_cast(pos);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34d8b06d80983e7c57fe617d13c324f474905406977fc9442cc6f6a99c100776" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 82, + "startColumn": 18, + "charOffset": 2475, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 18, + "charOffset": 2392, + "charLength": 1, + "snippet": { + "text": "\t\t\tg_logger().warn(\"Position too large for uint32_t\");\n\t\t} else {\n\t\t\tval = (val << 6) + static_cast(pos);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dac46ea5502c970e5708b2aa0f77f8dc9970c3d03846cf8e8b20752a715432f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-10", + "ruleIndex": 433, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-10: The increment (++) and decrement (--) operators should not be mixed with other operators in an expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 85, + "startColumn": 7, + "charOffset": 2519, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 7, + "charOffset": 2508, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (++i % 4 == 0) {\n\t\t\tret.push_back((val >> 16) & 0xFF);\n\t\t\tret.push_back((val >> 8) & 0xFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98e545677e85eb162b32769fb20f7bdd4c08b750e2aa52feee06eabf1c384c66" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 86, + "startColumn": 18, + "charOffset": 2552, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 18, + "charOffset": 2512, + "charLength": 1, + "snippet": { + "text": "\n\t\tif (++i % 4 == 0) {\n\t\t\tret.push_back((val >> 16) & 0xFF);\n\t\t\tret.push_back((val >> 8) & 0xFF);\n\t\t\tret.push_back(val & 0xFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0eaa5b197474c28a87d8131b44482ddb5b305ac09e8af2e8efd8f87955d45b56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 86, + "startColumn": 26, + "charOffset": 2560, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 26, + "charOffset": 2512, + "charLength": 2, + "snippet": { + "text": "\n\t\tif (++i % 4 == 0) {\n\t\t\tret.push_back((val >> 16) & 0xFF);\n\t\t\tret.push_back((val >> 8) & 0xFF);\n\t\t\tret.push_back(val & 0xFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75cfc2fd8560f13099fb4e23509dd964825004b30ab1b6cc6071fef5473f0cc4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 86, + "startColumn": 26, + "charOffset": 2560, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 26, + "charOffset": 2512, + "charLength": 2, + "snippet": { + "text": "\n\t\tif (++i % 4 == 0) {\n\t\t\tret.push_back((val >> 16) & 0xFF);\n\t\t\tret.push_back((val >> 8) & 0xFF);\n\t\t\tret.push_back(val & 0xFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "612360efc3a4eb866e1bf5da95f3ca66ddec3d64a8d791ae38c3ba82994114ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 86, + "startColumn": 32, + "charOffset": 2566, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 32, + "charOffset": 2512, + "charLength": 4, + "snippet": { + "text": "\n\t\tif (++i % 4 == 0) {\n\t\t\tret.push_back((val >> 16) & 0xFF);\n\t\t\tret.push_back((val >> 8) & 0xFF);\n\t\t\tret.push_back(val & 0xFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9e1adaf4f97ce572c46a5f2309641b5d0bccacddd040eaac5c84d73575c8348" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 86, + "startColumn": 32, + "charOffset": 2566, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 32, + "charOffset": 2512, + "charLength": 4, + "snippet": { + "text": "\n\t\tif (++i % 4 == 0) {\n\t\t\tret.push_back((val >> 16) & 0xFF);\n\t\t\tret.push_back((val >> 8) & 0xFF);\n\t\t\tret.push_back(val & 0xFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08eb911125ae59965287feeea8f5ed5da00c7a896833951d4ef6a30403981ea1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 86, + "startColumn": 32, + "charOffset": 2566, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 32, + "charOffset": 2512, + "charLength": 4, + "snippet": { + "text": "\n\t\tif (++i % 4 == 0) {\n\t\t\tret.push_back((val >> 16) & 0xFF);\n\t\t\tret.push_back((val >> 8) & 0xFF);\n\t\t\tret.push_back(val & 0xFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e7df1c8016e9e60298a4b990081b65b32a17a45fcef74dd516efc5b0688df82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 18, + "charOffset": 2590, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 18, + "charOffset": 2513, + "charLength": 1, + "snippet": { + "text": "\t\tif (++i % 4 == 0) {\n\t\t\tret.push_back((val >> 16) & 0xFF);\n\t\t\tret.push_back((val >> 8) & 0xFF);\n\t\t\tret.push_back(val & 0xFF);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0fa4e834f04931b68410d4b56927cf42c2238e378465a7c92dfe70176fe16e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 26, + "charOffset": 2598, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 26, + "charOffset": 2513, + "charLength": 1, + "snippet": { + "text": "\t\tif (++i % 4 == 0) {\n\t\t\tret.push_back((val >> 16) & 0xFF);\n\t\t\tret.push_back((val >> 8) & 0xFF);\n\t\t\tret.push_back(val & 0xFF);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f5efadfa95038196cfe268edfb60758f177fcbcad2e8adcf4925104815cb444" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 26, + "charOffset": 2598, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 26, + "charOffset": 2513, + "charLength": 1, + "snippet": { + "text": "\t\tif (++i % 4 == 0) {\n\t\t\tret.push_back((val >> 16) & 0xFF);\n\t\t\tret.push_back((val >> 8) & 0xFF);\n\t\t\tret.push_back(val & 0xFF);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1d24215e6c3cd561970ed027e1975b60e162766958e409db51cf997151cd72b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 31, + "charOffset": 2603, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 31, + "charOffset": 2513, + "charLength": 4, + "snippet": { + "text": "\t\tif (++i % 4 == 0) {\n\t\t\tret.push_back((val >> 16) & 0xFF);\n\t\t\tret.push_back((val >> 8) & 0xFF);\n\t\t\tret.push_back(val & 0xFF);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "933700f51b66dd8610d7e410deebccb09a3a6507d35685448ce7f8eda78ed27b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 31, + "charOffset": 2603, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 31, + "charOffset": 2513, + "charLength": 4, + "snippet": { + "text": "\t\tif (++i % 4 == 0) {\n\t\t\tret.push_back((val >> 16) & 0xFF);\n\t\t\tret.push_back((val >> 8) & 0xFF);\n\t\t\tret.push_back(val & 0xFF);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "056ac3c04490a54ed9481917c39adc0a2887ad16363ce74de2d7eac0c0c1916e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 31, + "charOffset": 2603, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 31, + "charOffset": 2513, + "charLength": 4, + "snippet": { + "text": "\t\tif (++i % 4 == 0) {\n\t\t\tret.push_back((val >> 16) & 0xFF);\n\t\t\tret.push_back((val >> 8) & 0xFF);\n\t\t\tret.push_back(val & 0xFF);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8cdb0e93b7482240b1c8b69f494d7b19078468e9d4b493e876090f29092f675d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 88, + "startColumn": 18, + "charOffset": 2627, + "charLength": 3, + "snippet": { + "text": "val" + } + }, + "contextRegion": { + "startLine": 86, + "startColumn": 18, + "charOffset": 2535, + "charLength": 3, + "snippet": { + "text": "\t\t\tret.push_back((val >> 16) & 0xFF);\n\t\t\tret.push_back((val >> 8) & 0xFF);\n\t\t\tret.push_back(val & 0xFF);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2c2aa2939a078950f566d0ac7ae317f1f562d5ebbc37678c4f146c7dcc217c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 88, + "startColumn": 24, + "charOffset": 2633, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 86, + "startColumn": 24, + "charOffset": 2535, + "charLength": 4, + "snippet": { + "text": "\t\t\tret.push_back((val >> 16) & 0xFF);\n\t\t\tret.push_back((val >> 8) & 0xFF);\n\t\t\tret.push_back(val & 0xFF);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5cdd759aaac79775b410583395aa8a32914eec6c938372ee2b0b9d67d18beed5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 88, + "startColumn": 24, + "charOffset": 2633, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 86, + "startColumn": 24, + "charOffset": 2535, + "charLength": 4, + "snippet": { + "text": "\t\t\tret.push_back((val >> 16) & 0xFF);\n\t\t\tret.push_back((val >> 8) & 0xFF);\n\t\t\tret.push_back(val & 0xFF);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ccfbe32102971f4102d70bc0aae80d2c1b7a0820d6d78943694caf627a30fb41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 88, + "startColumn": 24, + "charOffset": 2633, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 86, + "startColumn": 24, + "charOffset": 2535, + "charLength": 4, + "snippet": { + "text": "\t\t\tret.push_back((val >> 16) & 0xFF);\n\t\t\tret.push_back((val >> 8) & 0xFF);\n\t\t\tret.push_back(val & 0xFF);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ab4b7713f37f7f988b383bf3c1cce724d62c324b4d4639ec321ea091c146fbf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 97, + "startColumn": 18, + "charOffset": 2769, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 95, + "startColumn": 18, + "charOffset": 2732, + "charLength": 1, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase 2:\n\t\t\tret.push_back((val >> 4) & 0xFF);\n\t\t\tbreak;\n\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f282ce960fcb9f54d010695e608f2f94f4c1118458f1c4eb022f248f9130771" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 97, + "startColumn": 26, + "charOffset": 2777, + "charLength": 1, + "snippet": { + "text": "4" + } + }, + "contextRegion": { + "startLine": 95, + "startColumn": 26, + "charOffset": 2732, + "charLength": 1, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase 2:\n\t\t\tret.push_back((val >> 4) & 0xFF);\n\t\t\tbreak;\n\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dcd6379c3c875baa8465c154cde2fef04c83083ad59271e1cb46cdcada484629" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 97, + "startColumn": 31, + "charOffset": 2782, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 95, + "startColumn": 31, + "charOffset": 2732, + "charLength": 4, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase 2:\n\t\t\tret.push_back((val >> 4) & 0xFF);\n\t\t\tbreak;\n\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90e625169ad0189b2090d7f32ed2b0c432e5464c8bd22777907cd0b2682672ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 97, + "startColumn": 31, + "charOffset": 2782, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 95, + "startColumn": 31, + "charOffset": 2732, + "charLength": 4, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase 2:\n\t\t\tret.push_back((val >> 4) & 0xFF);\n\t\t\tbreak;\n\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f79b913ca9d182a49d76210c79908a8a8e7f2ece8617fafedb4bdaf55cd1dc5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 97, + "startColumn": 31, + "charOffset": 2782, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 95, + "startColumn": 31, + "charOffset": 2732, + "charLength": 4, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase 2:\n\t\t\tret.push_back((val >> 4) & 0xFF);\n\t\t\tbreak;\n\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "561f5c209815af06237f51badbbef6f2eae6bbd31538b04e193adc43de095a99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 99, + "startColumn": 3, + "charOffset": 2801, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 97, + "startColumn": 3, + "charOffset": 2752, + "charLength": 4, + "snippet": { + "text": "\t\t\tret.push_back((val >> 4) & 0xFF);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tret.push_back((val >> 10) & 0xFF);\n\t\t\tret.push_back((val >> 2) & 0xFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e43746343d32794e5153bd30a649633d1da72043a5aa4b83ed99d03365bc7365" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 100, + "startColumn": 18, + "charOffset": 2826, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 98, + "startColumn": 18, + "charOffset": 2789, + "charLength": 1, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase 3:\n\t\t\tret.push_back((val >> 10) & 0xFF);\n\t\t\tret.push_back((val >> 2) & 0xFF);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f07b230c1250ad51611c7d8dc6c37bfdd5d8d520489ed3a6289d958e70eb48b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 100, + "startColumn": 26, + "charOffset": 2834, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 98, + "startColumn": 26, + "charOffset": 2789, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase 3:\n\t\t\tret.push_back((val >> 10) & 0xFF);\n\t\t\tret.push_back((val >> 2) & 0xFF);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd664e1f4d9dc84966b25493141406bb13985ba262c9009c99e1d2ccfebf4d68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 100, + "startColumn": 26, + "charOffset": 2834, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 98, + "startColumn": 26, + "charOffset": 2789, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase 3:\n\t\t\tret.push_back((val >> 10) & 0xFF);\n\t\t\tret.push_back((val >> 2) & 0xFF);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd3e47c16556fdde241d66298b4abebe24bc3075e9f71660b85ff42f422b6c10" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 100, + "startColumn": 32, + "charOffset": 2840, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 98, + "startColumn": 32, + "charOffset": 2789, + "charLength": 4, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase 3:\n\t\t\tret.push_back((val >> 10) & 0xFF);\n\t\t\tret.push_back((val >> 2) & 0xFF);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a391e08eaba064c826b39485864568e3b4d9fca49b864a47bb7a3b6052fed8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 100, + "startColumn": 32, + "charOffset": 2840, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 98, + "startColumn": 32, + "charOffset": 2789, + "charLength": 4, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase 3:\n\t\t\tret.push_back((val >> 10) & 0xFF);\n\t\t\tret.push_back((val >> 2) & 0xFF);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27f94b6ce95c0ffa38e7a4a6ac0a290c1c42725da13cd2bc29cdb63fbcd41a86" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 100, + "startColumn": 32, + "charOffset": 2840, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 98, + "startColumn": 32, + "charOffset": 2789, + "charLength": 4, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase 3:\n\t\t\tret.push_back((val >> 10) & 0xFF);\n\t\t\tret.push_back((val >> 2) & 0xFF);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa3f2b437d205bdbba70bcbc194048bdef71271db650cf47d06463ef66e3efbd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 101, + "startColumn": 18, + "charOffset": 2864, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 99, + "startColumn": 18, + "charOffset": 2799, + "charLength": 1, + "snippet": { + "text": "\t\tcase 3:\n\t\t\tret.push_back((val >> 10) & 0xFF);\n\t\t\tret.push_back((val >> 2) & 0xFF);\n\t\t\tbreak;\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d5612715caefeaf61287760d2a70e6559cb5a749b199aa91f72d5b9e6e6f3cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 101, + "startColumn": 26, + "charOffset": 2872, + "charLength": 1, + "snippet": { + "text": "2" + } + }, + "contextRegion": { + "startLine": 99, + "startColumn": 26, + "charOffset": 2799, + "charLength": 1, + "snippet": { + "text": "\t\tcase 3:\n\t\t\tret.push_back((val >> 10) & 0xFF);\n\t\t\tret.push_back((val >> 2) & 0xFF);\n\t\t\tbreak;\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b66eb5c3f31e5514ce7fcb78068e83144d214ea5bd818c085859f14be213c30" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 101, + "startColumn": 31, + "charOffset": 2877, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 99, + "startColumn": 31, + "charOffset": 2799, + "charLength": 4, + "snippet": { + "text": "\t\tcase 3:\n\t\t\tret.push_back((val >> 10) & 0xFF);\n\t\t\tret.push_back((val >> 2) & 0xFF);\n\t\t\tbreak;\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "388644507ce26cc8191acc7176fe1854cf6733b97a340c81db4e11dbf22d04e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 101, + "startColumn": 31, + "charOffset": 2877, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 99, + "startColumn": 31, + "charOffset": 2799, + "charLength": 4, + "snippet": { + "text": "\t\tcase 3:\n\t\t\tret.push_back((val >> 10) & 0xFF);\n\t\t\tret.push_back((val >> 2) & 0xFF);\n\t\t\tbreak;\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "caf66ceab23cb53ad8a3007976c39b767f45ba46a58717d2a7d5246da6530b6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 101, + "startColumn": 31, + "charOffset": 2877, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 99, + "startColumn": 31, + "charOffset": 2799, + "charLength": 4, + "snippet": { + "text": "\t\tcase 3:\n\t\t\tret.push_back((val >> 10) & 0xFF);\n\t\t\tret.push_back((val >> 2) & 0xFF);\n\t\t\tbreak;\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a81fe91389c0ef3cf54c4c646d62eae95894171d42b65e6341e29a50dab6a251" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-suspicious-call-argument", + "ruleIndex": 732, + "kind": "fail", + "level": "warning", + "message": { + "text": "1st argument 'password_attempt' (passed to 'password') looks like it might be swapped with the 2nd, 'hashed_password' (passed to 'phash')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/argon.cpp" + }, + "region": { + "startLine": 112, + "startColumn": 9, + "charOffset": 3120, + "charLength": 14, + "snippet": { + "text": "verifyPassword" + } + }, + "contextRegion": { + "startLine": 110, + "startColumn": 9, + "charOffset": 3011, + "charLength": 14, + "snippet": { + "text": "\nbool Argon2::argon(const std::string &password_attempt, const std::string &hashed_password) const {\n\treturn verifyPassword(password_attempt, hashed_password);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed5e703fda8c468ddc0fed6e19560c88ac565815c8bb590ad91f9eaa20db90cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-member-init", + "ruleIndex": 510, + "kind": "fail", + "level": "warning", + "message": { + "text": "constructor does not initialize these fields: n, d" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 15, + "startColumn": 1, + "charOffset": 452, + "charLength": 3, + "snippet": { + "text": "RSA" + } + }, + "contextRegion": { + "startLine": 13, + "startColumn": 1, + "charOffset": 423, + "charLength": 3, + "snippet": { + "text": "#include \"security/rsa.hpp\"\n\nRSA::RSA(Logger &logger) :\n\tlogger(logger) {\n\tmpz_init(n);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d256727a15c153723770a4c2cf0bc0d9b2d1824f75097970feeb45d10f75f90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 17, + "startColumn": 11, + "charOffset": 507, + "charLength": 1, + "snippet": { + "text": "n" + } + }, + "contextRegion": { + "startLine": 15, + "startColumn": 11, + "charOffset": 452, + "charLength": 1, + "snippet": { + "text": "RSA::RSA(Logger &logger) :\n\tlogger(logger) {\n\tmpz_init(n);\n\tmpz_init2(d, 1024);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbe824a9d492069112b4632a36c97d29b08fc1be5174125fe83a3958b22d634b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 18, + "startColumn": 12, + "charOffset": 522, + "charLength": 1, + "snippet": { + "text": "d" + } + }, + "contextRegion": { + "startLine": 16, + "startColumn": 12, + "charOffset": 479, + "charLength": 1, + "snippet": { + "text": "\tlogger(logger) {\n\tmpz_init(n);\n\tmpz_init2(d, 1024);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db95859894f7505737b1a0dfc5b8ae1f14ad9819279e463b0759e5e178b55783" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1024 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 18, + "startColumn": 15, + "charOffset": 525, + "charLength": 4, + "snippet": { + "text": "1024" + } + }, + "contextRegion": { + "startLine": 16, + "startColumn": 15, + "charOffset": 479, + "charLength": 4, + "snippet": { + "text": "\tlogger(logger) {\n\tmpz_init(n);\n\tmpz_init2(d, 1024);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61edc4f860568d4adf2eba4351f18a055cdba93e007bb655d80307ae47cb7479" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 22, + "startColumn": 12, + "charOffset": 560, + "charLength": 1, + "snippet": { + "text": "n" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 12, + "charOffset": 534, + "charLength": 1, + "snippet": { + "text": "\nRSA::~RSA() {\n\tmpz_clear(n);\n\tmpz_clear(d);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "924f81775bf567a017b44ccc5b283114e959cc9684244228c90fe56fea0da734" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 23, + "startColumn": 12, + "charOffset": 575, + "charLength": 1, + "snippet": { + "text": "d" + } + }, + "contextRegion": { + "startLine": 21, + "startColumn": 12, + "charOffset": 535, + "charLength": 1, + "snippet": { + "text": "RSA::~RSA() {\n\tmpz_clear(n);\n\tmpz_clear(d);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e00897edac3d12fd52256e44912b548eedf1884bedc2837645f06f181a964db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 50, + "startColumn": 12, + "charOffset": 1534, + "charLength": 1, + "snippet": { + "text": "p" + } + }, + "contextRegion": { + "startLine": 48, + "startColumn": 12, + "charOffset": 1503, + "charLength": 1, + "snippet": { + "text": "\tmpz_t q;\n\tmpz_t e;\n\tmpz_init2(p, 1024);\n\tmpz_init2(q, 1024);\n\tmpz_init(e);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "900f608304cc9730e1c434f662760dd249594c123dfde68c885a3d9cbb6d1713" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1024 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 50, + "startColumn": 15, + "charOffset": 1537, + "charLength": 4, + "snippet": { + "text": "1024" + } + }, + "contextRegion": { + "startLine": 48, + "startColumn": 15, + "charOffset": 1503, + "charLength": 4, + "snippet": { + "text": "\tmpz_t q;\n\tmpz_t e;\n\tmpz_init2(p, 1024);\n\tmpz_init2(q, 1024);\n\tmpz_init(e);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a97c41419cb1169b186c75dcb3cbd02a4e2112b5a0694fc9b39997a00efc522" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 51, + "startColumn": 12, + "charOffset": 1555, + "charLength": 1, + "snippet": { + "text": "q" + } + }, + "contextRegion": { + "startLine": 49, + "startColumn": 12, + "charOffset": 1513, + "charLength": 1, + "snippet": { + "text": "\tmpz_t e;\n\tmpz_init2(p, 1024);\n\tmpz_init2(q, 1024);\n\tmpz_init(e);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0aaad92f05cfc712626edc5062d1981225d67c0c2f4d9923c67206ad7879c62" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1024 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 51, + "startColumn": 15, + "charOffset": 1558, + "charLength": 4, + "snippet": { + "text": "1024" + } + }, + "contextRegion": { + "startLine": 49, + "startColumn": 15, + "charOffset": 1513, + "charLength": 4, + "snippet": { + "text": "\tmpz_t e;\n\tmpz_init2(p, 1024);\n\tmpz_init2(q, 1024);\n\tmpz_init(e);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bffa1078c82563974a0c5d23ca2fa6450382035d30a6e7f07d161fa5972da5ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 52, + "startColumn": 11, + "charOffset": 1575, + "charLength": 1, + "snippet": { + "text": "e" + } + }, + "contextRegion": { + "startLine": 50, + "startColumn": 11, + "charOffset": 1523, + "charLength": 1, + "snippet": { + "text": "\tmpz_init2(p, 1024);\n\tmpz_init2(q, 1024);\n\tmpz_init(e);\n\n\tmpz_set_str(p, pString, base);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9d467954e4295772275fb42ff6139b599d95497daef58b512d801e0e3bad7b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 54, + "startColumn": 14, + "charOffset": 1593, + "charLength": 1, + "snippet": { + "text": "p" + } + }, + "contextRegion": { + "startLine": 52, + "startColumn": 14, + "charOffset": 1565, + "charLength": 1, + "snippet": { + "text": "\tmpz_init(e);\n\n\tmpz_set_str(p, pString, base);\n\tmpz_set_str(q, qString, base);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58caaf156bfaf589930896229b51285b5c43b93e53ee8da67c1ad63f1513833a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 55, + "startColumn": 14, + "charOffset": 1625, + "charLength": 1, + "snippet": { + "text": "q" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 14, + "charOffset": 1579, + "charLength": 1, + "snippet": { + "text": "\n\tmpz_set_str(p, pString, base);\n\tmpz_set_str(q, qString, base);\n\n\t// e = 65537" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c571272c1848a40e5c9495f69917ca650f9e51fca91d83fccc232c5a3f4aa9fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 58, + "startColumn": 13, + "charOffset": 1671, + "charLength": 1, + "snippet": { + "text": "e" + } + }, + "contextRegion": { + "startLine": 56, + "startColumn": 13, + "charOffset": 1644, + "charLength": 1, + "snippet": { + "text": "\n\t// e = 65537\n\tmpz_set_ui(e, 65537);\n\n\t// n = p * q" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d82f61d690bd36920b02ad0b15de4d63d22cb09e44a249ae19ffc08ee86c870" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "65537 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 58, + "startColumn": 16, + "charOffset": 1674, + "charLength": 5, + "snippet": { + "text": "65537" + } + }, + "contextRegion": { + "startLine": 56, + "startColumn": 16, + "charOffset": 1644, + "charLength": 5, + "snippet": { + "text": "\n\t// e = 65537\n\tmpz_set_ui(e, 65537);\n\n\t// n = p * q" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a3a18dfe596befcac22b622ab1913bf62ca1ce7b614fed1474d8d4a18e84609" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 61, + "startColumn": 10, + "charOffset": 1706, + "charLength": 1, + "snippet": { + "text": "n" + } + }, + "contextRegion": { + "startLine": 59, + "startColumn": 10, + "charOffset": 1682, + "charLength": 1, + "snippet": { + "text": "\n\t// n = p * q\n\tmpz_mul(n, p, q);\n\n\t// d = e^-1 mod (p - 1)(q - 1)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eae3e829c1851df9242f0d2ad93b75cfd184f1b4f30236f27aba3cbeafe2868a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 61, + "startColumn": 13, + "charOffset": 1709, + "charLength": 1, + "snippet": { + "text": "p" + } + }, + "contextRegion": { + "startLine": 59, + "startColumn": 13, + "charOffset": 1682, + "charLength": 1, + "snippet": { + "text": "\n\t// n = p * q\n\tmpz_mul(n, p, q);\n\n\t// d = e^-1 mod (p - 1)(q - 1)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5bb612cbaca518ca9ba25829aefd6c568fa545705ab599ad05b76e560e9b20ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 61, + "startColumn": 16, + "charOffset": 1712, + "charLength": 1, + "snippet": { + "text": "q" + } + }, + "contextRegion": { + "startLine": 59, + "startColumn": 16, + "charOffset": 1682, + "charLength": 1, + "snippet": { + "text": "\n\t// n = p * q\n\tmpz_mul(n, p, q);\n\n\t// d = e^-1 mod (p - 1)(q - 1)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ecbecbbbb55f9fec3efba2cbe1ef3af562f1e083b742d83ed542ec7e18befc7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 67, + "startColumn": 12, + "charOffset": 1797, + "charLength": 3, + "snippet": { + "text": "p_1" + } + }, + "contextRegion": { + "startLine": 65, + "startColumn": 12, + "charOffset": 1761, + "charLength": 3, + "snippet": { + "text": "\tmpz_t q_1;\n\tmpz_t pq_1;\n\tmpz_init2(p_1, 1024);\n\tmpz_init2(q_1, 1024);\n\tmpz_init2(pq_1, 1024);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f51c8d205a2def96b013ad3fd5e12bfe452c1fe0eeeee3ad856440283192561" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1024 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 67, + "startColumn": 17, + "charOffset": 1802, + "charLength": 4, + "snippet": { + "text": "1024" + } + }, + "contextRegion": { + "startLine": 65, + "startColumn": 17, + "charOffset": 1761, + "charLength": 4, + "snippet": { + "text": "\tmpz_t q_1;\n\tmpz_t pq_1;\n\tmpz_init2(p_1, 1024);\n\tmpz_init2(q_1, 1024);\n\tmpz_init2(pq_1, 1024);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ed673d90edec7e59bcd6fba99f95028feeccf065fbb7f29555a3aecfcd3933d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 68, + "startColumn": 12, + "charOffset": 1820, + "charLength": 3, + "snippet": { + "text": "q_1" + } + }, + "contextRegion": { + "startLine": 66, + "startColumn": 12, + "charOffset": 1773, + "charLength": 3, + "snippet": { + "text": "\tmpz_t pq_1;\n\tmpz_init2(p_1, 1024);\n\tmpz_init2(q_1, 1024);\n\tmpz_init2(pq_1, 1024);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b4fec95d7335ab771dac30aa414724292dc26ab0518f5b81728979566239643" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1024 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 68, + "startColumn": 17, + "charOffset": 1825, + "charLength": 4, + "snippet": { + "text": "1024" + } + }, + "contextRegion": { + "startLine": 66, + "startColumn": 17, + "charOffset": 1773, + "charLength": 4, + "snippet": { + "text": "\tmpz_t pq_1;\n\tmpz_init2(p_1, 1024);\n\tmpz_init2(q_1, 1024);\n\tmpz_init2(pq_1, 1024);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f66faacab11a24d12d1a42de0d6094e36270825a408a42addc8ea784f98a8917" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 69, + "startColumn": 12, + "charOffset": 1843, + "charLength": 4, + "snippet": { + "text": "pq_1" + } + }, + "contextRegion": { + "startLine": 67, + "startColumn": 12, + "charOffset": 1786, + "charLength": 4, + "snippet": { + "text": "\tmpz_init2(p_1, 1024);\n\tmpz_init2(q_1, 1024);\n\tmpz_init2(pq_1, 1024);\n\n\tmpz_sub_ui(p_1, p, 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c2db1400dc262a48809c4a16feff83e7fd9491f6d422ae22f0f7cbafebb9390d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1024 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 69, + "startColumn": 18, + "charOffset": 1849, + "charLength": 4, + "snippet": { + "text": "1024" + } + }, + "contextRegion": { + "startLine": 67, + "startColumn": 18, + "charOffset": 1786, + "charLength": 4, + "snippet": { + "text": "\tmpz_init2(p_1, 1024);\n\tmpz_init2(q_1, 1024);\n\tmpz_init2(pq_1, 1024);\n\n\tmpz_sub_ui(p_1, p, 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "763a5555f194461ef60b71795fad368aa1e6843e59ac9b7bd10682647a1be857" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 71, + "startColumn": 13, + "charOffset": 1869, + "charLength": 3, + "snippet": { + "text": "p_1" + } + }, + "contextRegion": { + "startLine": 69, + "startColumn": 13, + "charOffset": 1832, + "charLength": 3, + "snippet": { + "text": "\tmpz_init2(pq_1, 1024);\n\n\tmpz_sub_ui(p_1, p, 1);\n\tmpz_sub_ui(q_1, q, 1);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35e6a70f445bc6667cbbaec54d1fbfac9795faa941d85a33919d3fb3fc0605cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 71, + "startColumn": 18, + "charOffset": 1874, + "charLength": 1, + "snippet": { + "text": "p" + } + }, + "contextRegion": { + "startLine": 69, + "startColumn": 18, + "charOffset": 1832, + "charLength": 1, + "snippet": { + "text": "\tmpz_init2(pq_1, 1024);\n\n\tmpz_sub_ui(p_1, p, 1);\n\tmpz_sub_ui(q_1, q, 1);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6712af59618ae6fbd2c0c1749d73e04906288fd2b79e4a63d93f7e96293a85d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 13, + "charOffset": 1893, + "charLength": 3, + "snippet": { + "text": "q_1" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 13, + "charOffset": 1856, + "charLength": 3, + "snippet": { + "text": "\n\tmpz_sub_ui(p_1, p, 1);\n\tmpz_sub_ui(q_1, q, 1);\n\n\t// pq_1 = (p -1)(q - 1)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6bb1f7d0187c6923489a93801937c04a4577fc3464fdf76683d31e61698f0a4f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 18, + "charOffset": 1898, + "charLength": 1, + "snippet": { + "text": "q" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 18, + "charOffset": 1856, + "charLength": 1, + "snippet": { + "text": "\n\tmpz_sub_ui(p_1, p, 1);\n\tmpz_sub_ui(q_1, q, 1);\n\n\t// pq_1 = (p -1)(q - 1)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4112c7038c5fc376a25dc536c5c021501f3cf708432f30331841897a504cde2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 75, + "startColumn": 10, + "charOffset": 1940, + "charLength": 4, + "snippet": { + "text": "pq_1" + } + }, + "contextRegion": { + "startLine": 73, + "startColumn": 10, + "charOffset": 1905, + "charLength": 4, + "snippet": { + "text": "\n\t// pq_1 = (p -1)(q - 1)\n\tmpz_mul(pq_1, p_1, q_1);\n\n\t// d = e^-1 mod (p - 1)(q - 1)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5730b4fed75b5018c44a689e20a2c01fd1ae4706a35bedbf3b277191dd514552" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 75, + "startColumn": 16, + "charOffset": 1946, + "charLength": 3, + "snippet": { + "text": "p_1" + } + }, + "contextRegion": { + "startLine": 73, + "startColumn": 16, + "charOffset": 1905, + "charLength": 3, + "snippet": { + "text": "\n\t// pq_1 = (p -1)(q - 1)\n\tmpz_mul(pq_1, p_1, q_1);\n\n\t// d = e^-1 mod (p - 1)(q - 1)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "451d4ba29058d6c7634349fc5a39306a8bda0b46ad170b1b8744da682d4be942" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 75, + "startColumn": 21, + "charOffset": 1951, + "charLength": 3, + "snippet": { + "text": "q_1" + } + }, + "contextRegion": { + "startLine": 73, + "startColumn": 21, + "charOffset": 1905, + "charLength": 3, + "snippet": { + "text": "\n\t// pq_1 = (p -1)(q - 1)\n\tmpz_mul(pq_1, p_1, q_1);\n\n\t// d = e^-1 mod (p - 1)(q - 1)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2fa3269e26b398f467a3ab57ce85b14d4aab26cb3223f79a15abb12a8638a633" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 13, + "charOffset": 2002, + "charLength": 1, + "snippet": { + "text": "d" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 13, + "charOffset": 1957, + "charLength": 1, + "snippet": { + "text": "\n\t// d = e^-1 mod (p - 1)(q - 1)\n\tmpz_invert(d, e, pq_1);\n\n\tmpz_clear(p_1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "277e67e9ca3a7290dc8f724ffb1277ebd1493e8f8cdfc09beec89ac8bfe888ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 16, + "charOffset": 2005, + "charLength": 1, + "snippet": { + "text": "e" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 16, + "charOffset": 1957, + "charLength": 1, + "snippet": { + "text": "\n\t// d = e^-1 mod (p - 1)(q - 1)\n\tmpz_invert(d, e, pq_1);\n\n\tmpz_clear(p_1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86ff41ed9c5b5011b6221d446342343b8300d325f08f5e57ec31285b84aa67d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 19, + "charOffset": 2008, + "charLength": 4, + "snippet": { + "text": "pq_1" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 19, + "charOffset": 1957, + "charLength": 4, + "snippet": { + "text": "\n\t// d = e^-1 mod (p - 1)(q - 1)\n\tmpz_invert(d, e, pq_1);\n\n\tmpz_clear(p_1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59141f44f8b08aaba8b81f0622f4898b93b5bb624ada1f1bf882dfaf70678fad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 80, + "startColumn": 12, + "charOffset": 2027, + "charLength": 3, + "snippet": { + "text": "p_1" + } + }, + "contextRegion": { + "startLine": 78, + "startColumn": 12, + "charOffset": 1990, + "charLength": 3, + "snippet": { + "text": "\tmpz_invert(d, e, pq_1);\n\n\tmpz_clear(p_1);\n\tmpz_clear(q_1);\n\tmpz_clear(pq_1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba0d27ac880eeedb3c9df7cd123aca8cd7fe263dbb86d40472d54f029536cfd4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 81, + "startColumn": 12, + "charOffset": 2044, + "charLength": 3, + "snippet": { + "text": "q_1" + } + }, + "contextRegion": { + "startLine": 79, + "startColumn": 12, + "charOffset": 2015, + "charLength": 3, + "snippet": { + "text": "\n\tmpz_clear(p_1);\n\tmpz_clear(q_1);\n\tmpz_clear(pq_1);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "361a251c1b1fcc0f8cf30aff9f95aa1e2d4ee15f06b60d4f08eb41152098f772" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 82, + "startColumn": 12, + "charOffset": 2061, + "charLength": 4, + "snippet": { + "text": "pq_1" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 12, + "charOffset": 2016, + "charLength": 4, + "snippet": { + "text": "\tmpz_clear(p_1);\n\tmpz_clear(q_1);\n\tmpz_clear(pq_1);\n\n\tmpz_clear(p);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71f6b37592ade4702b7dd38196f6116f1d0585aff5ccef85be52fd8c9d67e59c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 84, + "startColumn": 12, + "charOffset": 2080, + "charLength": 1, + "snippet": { + "text": "p" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 12, + "charOffset": 2050, + "charLength": 1, + "snippet": { + "text": "\tmpz_clear(pq_1);\n\n\tmpz_clear(p);\n\tmpz_clear(q);\n\tmpz_clear(e);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70135c19e292dad42eb807eeb80abd2ed02befde911f6bbe726ddb30e7131308" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 85, + "startColumn": 12, + "charOffset": 2095, + "charLength": 1, + "snippet": { + "text": "q" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 12, + "charOffset": 2068, + "charLength": 1, + "snippet": { + "text": "\n\tmpz_clear(p);\n\tmpz_clear(q);\n\tmpz_clear(e);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b24963b825eba47b03e0b570f31707782d5d244ddc7d243bd821ca691ac745e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 86, + "startColumn": 12, + "charOffset": 2110, + "charLength": 1, + "snippet": { + "text": "e" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 12, + "charOffset": 2069, + "charLength": 1, + "snippet": { + "text": "\tmpz_clear(p);\n\tmpz_clear(q);\n\tmpz_clear(e);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e6e756e5ddd9c01459a6ee7e6fc9059b630c7fdb6f66833e46d8cd5c8880298" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 92, + "startColumn": 12, + "charOffset": 2185, + "charLength": 1, + "snippet": { + "text": "c" + } + }, + "contextRegion": { + "startLine": 90, + "startColumn": 12, + "charOffset": 2154, + "charLength": 1, + "snippet": { + "text": "\tmpz_t c;\n\tmpz_t m;\n\tmpz_init2(c, 1024);\n\tmpz_init2(m, 1024);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93eaa939be55162c80ab8fd76548d6cfac72775bb0c32f85a832337d440570b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1024 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 92, + "startColumn": 15, + "charOffset": 2188, + "charLength": 4, + "snippet": { + "text": "1024" + } + }, + "contextRegion": { + "startLine": 90, + "startColumn": 15, + "charOffset": 2154, + "charLength": 4, + "snippet": { + "text": "\tmpz_t c;\n\tmpz_t m;\n\tmpz_init2(c, 1024);\n\tmpz_init2(m, 1024);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b4b2ecbec3c31fcbe0a12e48856fbcfc7cb253db653af01c1c8c34ebf0d67d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 93, + "startColumn": 12, + "charOffset": 2206, + "charLength": 1, + "snippet": { + "text": "m" + } + }, + "contextRegion": { + "startLine": 91, + "startColumn": 12, + "charOffset": 2164, + "charLength": 1, + "snippet": { + "text": "\tmpz_t m;\n\tmpz_init2(c, 1024);\n\tmpz_init2(m, 1024);\n\n\tmpz_import(c, 128, 1, 1, 0, 0, msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd62020416b2852df7dd458a666db3ca530a4d802894c1f6936bad0064104e4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1024 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 93, + "startColumn": 15, + "charOffset": 2209, + "charLength": 4, + "snippet": { + "text": "1024" + } + }, + "contextRegion": { + "startLine": 91, + "startColumn": 15, + "charOffset": 2164, + "charLength": 4, + "snippet": { + "text": "\tmpz_t m;\n\tmpz_init2(c, 1024);\n\tmpz_init2(m, 1024);\n\n\tmpz_import(c, 128, 1, 1, 0, 0, msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5fe198222282d6a0fdb5cc30897a773773682ff576a227fcdc8c494914e63c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 95, + "startColumn": 13, + "charOffset": 2229, + "charLength": 1, + "snippet": { + "text": "c" + } + }, + "contextRegion": { + "startLine": 93, + "startColumn": 13, + "charOffset": 2195, + "charLength": 1, + "snippet": { + "text": "\tmpz_init2(m, 1024);\n\n\tmpz_import(c, 128, 1, 1, 0, 0, msg);\n\n\t// m = c^d mod n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb21f32b4b788355e76d3aed27eb583bd125c1c0083f6f54fefd13470683d760" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "128 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 95, + "startColumn": 16, + "charOffset": 2232, + "charLength": 3, + "snippet": { + "text": "128" + } + }, + "contextRegion": { + "startLine": 93, + "startColumn": 16, + "charOffset": 2195, + "charLength": 3, + "snippet": { + "text": "\tmpz_init2(m, 1024);\n\n\tmpz_import(c, 128, 1, 1, 0, 0, msg);\n\n\t// m = c^d mod n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f84f2e6f44370113f44d41b72bbfcd825e86b820f253d583f8785ae983737b8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 11, + "charOffset": 2284, + "charLength": 1, + "snippet": { + "text": "m" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 11, + "charOffset": 2255, + "charLength": 1, + "snippet": { + "text": "\n\t// m = c^d mod n\n\tmpz_powm(m, c, d, n);\n\n\tsize_t count = (mpz_sizeinbase(m, 2) + 7) / 8;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b261204296fa23e404a7cf0846f770e5ac22155463b9ce1e8a5c32868f23115" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 14, + "charOffset": 2287, + "charLength": 1, + "snippet": { + "text": "c" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 14, + "charOffset": 2255, + "charLength": 1, + "snippet": { + "text": "\n\t// m = c^d mod n\n\tmpz_powm(m, c, d, n);\n\n\tsize_t count = (mpz_sizeinbase(m, 2) + 7) / 8;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac7cf87f3d78f91c14d2703312c16e854543fd1e33e18d4ab40e3eeaf72f7127" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 17, + "charOffset": 2290, + "charLength": 1, + "snippet": { + "text": "d" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 17, + "charOffset": 2255, + "charLength": 1, + "snippet": { + "text": "\n\t// m = c^d mod n\n\tmpz_powm(m, c, d, n);\n\n\tsize_t count = (mpz_sizeinbase(m, 2) + 7) / 8;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d13aa5900f2ce61953c3fa9f7174929931ba4f2c296fe1b6b2245751c4d52c4d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 20, + "charOffset": 2293, + "charLength": 1, + "snippet": { + "text": "n" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 20, + "charOffset": 2255, + "charLength": 1, + "snippet": { + "text": "\n\t// m = c^d mod n\n\tmpz_powm(m, c, d, n);\n\n\tsize_t count = (mpz_sizeinbase(m, 2) + 7) / 8;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84e5cea251f0b7fa86a2f6b44d7b0904f893fdc91d2665940bd1889b62467863" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 100, + "startColumn": 33, + "charOffset": 2330, + "charLength": 1, + "snippet": { + "text": "m" + } + }, + "contextRegion": { + "startLine": 98, + "startColumn": 33, + "charOffset": 2274, + "charLength": 1, + "snippet": { + "text": "\tmpz_powm(m, c, d, n);\n\n\tsize_t count = (mpz_sizeinbase(m, 2) + 7) / 8;\n\tmemset(msg, 0, 128 - count);\n\tmpz_export(msg + (128 - count), nullptr, 1, 1, 0, 0, m);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "503a0bff75d6963e7edca2955867f2f8049281308f453c471dfe782016944631" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 100, + "startColumn": 41, + "charOffset": 2338, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 98, + "startColumn": 41, + "charOffset": 2274, + "charLength": 1, + "snippet": { + "text": "\tmpz_powm(m, c, d, n);\n\n\tsize_t count = (mpz_sizeinbase(m, 2) + 7) / 8;\n\tmemset(msg, 0, 128 - count);\n\tmpz_export(msg + (128 - count), nullptr, 1, 1, 0, 0, m);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d65d898d72571ebc25d50cf90dfafe28337fdc027ca5d316b984b8ab96bc9ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 100, + "startColumn": 46, + "charOffset": 2343, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 98, + "startColumn": 46, + "charOffset": 2274, + "charLength": 1, + "snippet": { + "text": "\tmpz_powm(m, c, d, n);\n\n\tsize_t count = (mpz_sizeinbase(m, 2) + 7) / 8;\n\tmemset(msg, 0, 128 - count);\n\tmpz_export(msg + (128 - count), nullptr, 1, 1, 0, 0, m);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53dc342c5f499abffc20fe512f3ad802f7f902bc612898efb30bab59a30c7558" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 101, + "startColumn": 2, + "charOffset": 2347, + "charLength": 6, + "snippet": { + "text": "memset" + } + }, + "contextRegion": { + "startLine": 99, + "startColumn": 2, + "charOffset": 2297, + "charLength": 6, + "snippet": { + "text": "\n\tsize_t count = (mpz_sizeinbase(m, 2) + 7) / 8;\n\tmemset(msg, 0, 128 - count);\n\tmpz_export(msg + (128 - count), nullptr, 1, 1, 0, 0, m);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c3cb812d44e9e466a000bd44da85032056e37740eee52589278e33409b95b3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "128 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 101, + "startColumn": 17, + "charOffset": 2362, + "charLength": 3, + "snippet": { + "text": "128" + } + }, + "contextRegion": { + "startLine": 99, + "startColumn": 17, + "charOffset": 2297, + "charLength": 3, + "snippet": { + "text": "\n\tsize_t count = (mpz_sizeinbase(m, 2) + 7) / 8;\n\tmemset(msg, 0, 128 - count);\n\tmpz_export(msg + (128 - count), nullptr, 1, 1, 0, 0, m);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db9b83b5af57030bcd396ed98951408cbbf038a6c0a3f647ae698d399fea3791" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 102, + "startColumn": 17, + "charOffset": 2392, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 100, + "startColumn": 17, + "charOffset": 2298, + "charLength": 1, + "snippet": { + "text": "\tsize_t count = (mpz_sizeinbase(m, 2) + 7) / 8;\n\tmemset(msg, 0, 128 - count);\n\tmpz_export(msg + (128 - count), nullptr, 1, 1, 0, 0, m);\n\n\tmpz_clear(c);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7fee358503839103f725d5714e4545533719d5d965e0f57b9f5f51eea7854d97" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "128 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 102, + "startColumn": 20, + "charOffset": 2395, + "charLength": 3, + "snippet": { + "text": "128" + } + }, + "contextRegion": { + "startLine": 100, + "startColumn": 20, + "charOffset": 2298, + "charLength": 3, + "snippet": { + "text": "\tsize_t count = (mpz_sizeinbase(m, 2) + 7) / 8;\n\tmemset(msg, 0, 128 - count);\n\tmpz_export(msg + (128 - count), nullptr, 1, 1, 0, 0, m);\n\n\tmpz_clear(c);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca92f082a9aa7635b22a202285dc9dc1962ece20d474d341d5d9bee8811eab3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 102, + "startColumn": 55, + "charOffset": 2430, + "charLength": 1, + "snippet": { + "text": "m" + } + }, + "contextRegion": { + "startLine": 100, + "startColumn": 55, + "charOffset": 2298, + "charLength": 1, + "snippet": { + "text": "\tsize_t count = (mpz_sizeinbase(m, 2) + 7) / 8;\n\tmemset(msg, 0, 128 - count);\n\tmpz_export(msg + (128 - count), nullptr, 1, 1, 0, 0, m);\n\n\tmpz_clear(c);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "378d230d5dc32ef15ec3d526f834826b841fc37ef14607b72278b170b857e267" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 104, + "startColumn": 12, + "charOffset": 2446, + "charLength": 1, + "snippet": { + "text": "c" + } + }, + "contextRegion": { + "startLine": 102, + "startColumn": 12, + "charOffset": 2376, + "charLength": 1, + "snippet": { + "text": "\tmpz_export(msg + (128 - count), nullptr, 1, 1, 0, 0, m);\n\n\tmpz_clear(c);\n\tmpz_clear(m);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "024baa44d2b00c7d711bbf5ce1cc9c0586baea4da3eddc7d2a3efd2f69a72198" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 105, + "startColumn": 12, + "charOffset": 2461, + "charLength": 1, + "snippet": { + "text": "m" + } + }, + "contextRegion": { + "startLine": 103, + "startColumn": 12, + "charOffset": 2434, + "charLength": 1, + "snippet": { + "text": "\n\tmpz_clear(c);\n\tmpz_clear(m);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6b08558e6a32a29733007c0505a2472e27b5f708b9a68ed7020c4e60c15e9e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'base64Decrypt' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 108, + "startColumn": 18, + "charOffset": 2485, + "charLength": 13, + "snippet": { + "text": "base64Decrypt" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 18, + "charOffset": 2465, + "charLength": 13, + "snippet": { + "text": "}\n\nstd::string RSA::base64Decrypt(const std::string &input) const {\n\tauto posOfCharacter = [](const uint8_t chr) -> uint16_t {\n\t\tif (chr >= 'A' && chr <= 'Z') {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50a4dfc8a86eea6334b3bf413c1a5fd6bbdeb6ca2a17454c8a4b71357f216a7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 110, + "startColumn": 3, + "charOffset": 2594, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 108, + "startColumn": 3, + "charOffset": 2468, + "charLength": 2, + "snippet": { + "text": "std::string RSA::base64Decrypt(const std::string &input) const {\n\tauto posOfCharacter = [](const uint8_t chr) -> uint16_t {\n\t\tif (chr >= 'A' && chr <= 'Z') {\n\t\t\treturn chr - 'A';\n\t\t} else if (chr >= 'a' && chr <= 'z') {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "386673d8d7b8dfd5d2b3793d3843c091ee30f16da3bab41df2edfe141f506ae7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 112, + "startColumn": 5, + "charOffset": 2651, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 110, + "startColumn": 5, + "charOffset": 2592, + "charLength": 4, + "snippet": { + "text": "\t\tif (chr >= 'A' && chr <= 'Z') {\n\t\t\treturn chr - 'A';\n\t\t} else if (chr >= 'a' && chr <= 'z') {\n\t\t\treturn chr - 'a' + ('Z' - 'A') + 1;\n\t\t} else if (chr >= '0' && chr <= '9') {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66819cb7de1ec08f2398fcc10246e9c5a1a72b7a012fc5051453f82b19ae5bfd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "62 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 117, + "startColumn": 11, + "charOffset": 2872, + "charLength": 2, + "snippet": { + "text": "62" + } + }, + "contextRegion": { + "startLine": 115, + "startColumn": 11, + "charOffset": 2768, + "charLength": 2, + "snippet": { + "text": "\t\t\treturn chr - '0' + ('Z' - 'A') + ('z' - 'a') + 2;\n\t\t} else if (chr == '+' || chr == '-') {\n\t\t\treturn 62;\n\t\t} else if (chr == '/' || chr == '_') {\n\t\t\treturn 63;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "935e33003b28e863e92d0f9d322ebed1edda8825c61a0b49fb72f4fc6eb73f3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "63 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 119, + "startColumn": 11, + "charOffset": 2927, + "charLength": 2, + "snippet": { + "text": "63" + } + }, + "contextRegion": { + "startLine": 117, + "startColumn": 11, + "charOffset": 2862, + "charLength": 2, + "snippet": { + "text": "\t\t\treturn 62;\n\t\t} else if (chr == '/' || chr == '_') {\n\t\t\treturn 63;\n\t\t}\n\t\tg_logger().error(\"[RSA::base64Decrypt] - Invalid base6409\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "202c3434ba5b47155ecc206adf56ced860c44eace658f2e258e6bc51e3ab6878" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-return-braced-init-list", + "ruleIndex": 630, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 126, + "startColumn": 10, + "charOffset": 3046, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 124, + "startColumn": 10, + "charOffset": 3014, + "charLength": 3, + "snippet": { + "text": "\n\tif (input.empty()) {\n\t\treturn std::string();\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3f9ff100b6c0edcb9ff01ab22353c0d5323d1aedc677b280b3f8d171b21cacf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 2, + "charOffset": 3171, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 2, + "charOffset": 3116, + "charLength": 5, + "snippet": { + "text": "\tstd::string output;\n\toutput.reserve(length / 4 * 3);\n\twhile (pos < length) {\n\t\tuint16_t pos1 = posOfCharacter(input[pos + 1]);\n\t\toutput.push_back(static_cast(((posOfCharacter(input[pos])) << 2) + ((pos1 & 0x30) >> 4)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55e85b46391ec93799cd86abfb98bbb3168faef9e5c2286af40d52256630fb5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'length' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 9, + "charOffset": 3178, + "charLength": 3, + "snippet": { + "text": "pos" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 9, + "charOffset": 3116, + "charLength": 3, + "snippet": { + "text": "\tstd::string output;\n\toutput.reserve(length / 4 * 3);\n\twhile (pos < length) {\n\t\tuint16_t pos1 = posOfCharacter(input[pos + 1]);\n\t\toutput.push_back(static_cast(((posOfCharacter(input[pos])) << 2) + ((pos1 & 0x30) >> 4)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49d608720e2335924051e671740d1661177f570d5fc0987d3b048e224d8468bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 136, + "startColumn": 90, + "charOffset": 3333, + "charLength": 1, + "snippet": { + "text": "2" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 90, + "charOffset": 3170, + "charLength": 1, + "snippet": { + "text": "\twhile (pos < length) {\n\t\tuint16_t pos1 = posOfCharacter(input[pos + 1]);\n\t\toutput.push_back(static_cast(((posOfCharacter(input[pos])) << 2) + ((pos1 & 0x30) >> 4)));\n\t\tif (input[pos + 2] != '=' && input[pos + 2] != '.') {\n\t\t\tuint16_t pos2 = posOfCharacter(input[pos + 2]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7dda86f0d2445adc8bfcec5f074ec77b8866e1de9d00cd9b7ca986b1a9463a01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 136, + "startColumn": 96, + "charOffset": 3339, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 96, + "charOffset": 3170, + "charLength": 1, + "snippet": { + "text": "\twhile (pos < length) {\n\t\tuint16_t pos1 = posOfCharacter(input[pos + 1]);\n\t\toutput.push_back(static_cast(((posOfCharacter(input[pos])) << 2) + ((pos1 & 0x30) >> 4)));\n\t\tif (input[pos + 2] != '=' && input[pos + 2] != '.') {\n\t\t\tuint16_t pos2 = posOfCharacter(input[pos + 2]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44c46156cf88e28450252dcba6c19636c5e539cb5b7baba793950104c0293a8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 136, + "startColumn": 104, + "charOffset": 3347, + "charLength": 4, + "snippet": { + "text": "0x30" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 104, + "charOffset": 3170, + "charLength": 4, + "snippet": { + "text": "\twhile (pos < length) {\n\t\tuint16_t pos1 = posOfCharacter(input[pos + 1]);\n\t\toutput.push_back(static_cast(((posOfCharacter(input[pos])) << 2) + ((pos1 & 0x30) >> 4)));\n\t\tif (input[pos + 2] != '=' && input[pos + 2] != '.') {\n\t\t\tuint16_t pos2 = posOfCharacter(input[pos + 2]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "633bf3cad94e1d46bddf4a2e5e314a8410e7b937929163ff4c13263fe447883d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 136, + "startColumn": 104, + "charOffset": 3347, + "charLength": 4, + "snippet": { + "text": "0x30" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 104, + "charOffset": 3170, + "charLength": 4, + "snippet": { + "text": "\twhile (pos < length) {\n\t\tuint16_t pos1 = posOfCharacter(input[pos + 1]);\n\t\toutput.push_back(static_cast(((posOfCharacter(input[pos])) << 2) + ((pos1 & 0x30) >> 4)));\n\t\tif (input[pos + 2] != '=' && input[pos + 2] != '.') {\n\t\t\tuint16_t pos2 = posOfCharacter(input[pos + 2]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3fb9211b19cb7636ced03d46da0501670494159ad1dac4552153691c69053dd5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 139, + "startColumn": 59, + "charOffset": 3527, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 137, + "startColumn": 59, + "charOffset": 3362, + "charLength": 1, + "snippet": { + "text": "\t\tif (input[pos + 2] != '=' && input[pos + 2] != '.') {\n\t\t\tuint16_t pos2 = posOfCharacter(input[pos + 2]);\n\t\t\toutput.push_back(static_cast(((pos1 & 0x0f) << 4) + ((pos2 & 0x3c) >> 2)));\n\t\t\tif (input[pos + 3] != '=' && input[pos + 3] != '.') {\n\t\t\t\toutput.push_back(static_cast(((pos2 & 0x03) << 6) + posOfCharacter(input[pos + 3])));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9cbd1f54702138b4e966445b269d083d43833ed74f1b42f8d3dcddc2289569ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 139, + "startColumn": 67, + "charOffset": 3535, + "charLength": 4, + "snippet": { + "text": "0x0f" + } + }, + "contextRegion": { + "startLine": 137, + "startColumn": 67, + "charOffset": 3362, + "charLength": 4, + "snippet": { + "text": "\t\tif (input[pos + 2] != '=' && input[pos + 2] != '.') {\n\t\t\tuint16_t pos2 = posOfCharacter(input[pos + 2]);\n\t\t\toutput.push_back(static_cast(((pos1 & 0x0f) << 4) + ((pos2 & 0x3c) >> 2)));\n\t\t\tif (input[pos + 3] != '=' && input[pos + 3] != '.') {\n\t\t\t\toutput.push_back(static_cast(((pos2 & 0x03) << 6) + posOfCharacter(input[pos + 3])));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bff010818d08cbc965f5a0be2d1678057df04db231146c0f9a65f2293ec9cb43" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x0f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 139, + "startColumn": 67, + "charOffset": 3535, + "charLength": 4, + "snippet": { + "text": "0x0f" + } + }, + "contextRegion": { + "startLine": 137, + "startColumn": 67, + "charOffset": 3362, + "charLength": 4, + "snippet": { + "text": "\t\tif (input[pos + 2] != '=' && input[pos + 2] != '.') {\n\t\t\tuint16_t pos2 = posOfCharacter(input[pos + 2]);\n\t\t\toutput.push_back(static_cast(((pos1 & 0x0f) << 4) + ((pos2 & 0x3c) >> 2)));\n\t\t\tif (input[pos + 3] != '=' && input[pos + 3] != '.') {\n\t\t\t\toutput.push_back(static_cast(((pos2 & 0x03) << 6) + posOfCharacter(input[pos + 3])));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2a33842ecb986d0f8f5d87197c107416184bf47621b9117350c6e3b84620b52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 139, + "startColumn": 82, + "charOffset": 3550, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 137, + "startColumn": 82, + "charOffset": 3362, + "charLength": 1, + "snippet": { + "text": "\t\tif (input[pos + 2] != '=' && input[pos + 2] != '.') {\n\t\t\tuint16_t pos2 = posOfCharacter(input[pos + 2]);\n\t\t\toutput.push_back(static_cast(((pos1 & 0x0f) << 4) + ((pos2 & 0x3c) >> 2)));\n\t\t\tif (input[pos + 3] != '=' && input[pos + 3] != '.') {\n\t\t\t\toutput.push_back(static_cast(((pos2 & 0x03) << 6) + posOfCharacter(input[pos + 3])));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3767934245d9a96461c8eaefe8148e4833577f879b9694dffee8828d8174743" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 139, + "startColumn": 90, + "charOffset": 3558, + "charLength": 4, + "snippet": { + "text": "0x3c" + } + }, + "contextRegion": { + "startLine": 137, + "startColumn": 90, + "charOffset": 3362, + "charLength": 4, + "snippet": { + "text": "\t\tif (input[pos + 2] != '=' && input[pos + 2] != '.') {\n\t\t\tuint16_t pos2 = posOfCharacter(input[pos + 2]);\n\t\t\toutput.push_back(static_cast(((pos1 & 0x0f) << 4) + ((pos2 & 0x3c) >> 2)));\n\t\t\tif (input[pos + 3] != '=' && input[pos + 3] != '.') {\n\t\t\t\toutput.push_back(static_cast(((pos2 & 0x03) << 6) + posOfCharacter(input[pos + 3])));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22b3fdada9124220000e27a1beb642677b96bd8577da35d213acf4220c18d60d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x3c is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 139, + "startColumn": 90, + "charOffset": 3558, + "charLength": 4, + "snippet": { + "text": "0x3c" + } + }, + "contextRegion": { + "startLine": 137, + "startColumn": 90, + "charOffset": 3362, + "charLength": 4, + "snippet": { + "text": "\t\tif (input[pos + 2] != '=' && input[pos + 2] != '.') {\n\t\t\tuint16_t pos2 = posOfCharacter(input[pos + 2]);\n\t\t\toutput.push_back(static_cast(((pos1 & 0x0f) << 4) + ((pos2 & 0x3c) >> 2)));\n\t\t\tif (input[pos + 3] != '=' && input[pos + 3] != '.') {\n\t\t\t\toutput.push_back(static_cast(((pos2 & 0x03) << 6) + posOfCharacter(input[pos + 3])));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2aadb3c72be067d0b9e12f08dbf37f47f09b97c7bde04ed05572a11594b4ca9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 141, + "startColumn": 60, + "charOffset": 3689, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 139, + "startColumn": 60, + "charOffset": 3469, + "charLength": 1, + "snippet": { + "text": "\t\t\toutput.push_back(static_cast(((pos1 & 0x0f) << 4) + ((pos2 & 0x3c) >> 2)));\n\t\t\tif (input[pos + 3] != '=' && input[pos + 3] != '.') {\n\t\t\t\toutput.push_back(static_cast(((pos2 & 0x03) << 6) + posOfCharacter(input[pos + 3])));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bead13091b7ebae59df663b504e1a6f796305e9fcf33f1d94c95a2685ce88bce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 141, + "startColumn": 68, + "charOffset": 3697, + "charLength": 4, + "snippet": { + "text": "0x03" + } + }, + "contextRegion": { + "startLine": 139, + "startColumn": 68, + "charOffset": 3469, + "charLength": 4, + "snippet": { + "text": "\t\t\toutput.push_back(static_cast(((pos1 & 0x0f) << 4) + ((pos2 & 0x3c) >> 2)));\n\t\t\tif (input[pos + 3] != '=' && input[pos + 3] != '.') {\n\t\t\t\toutput.push_back(static_cast(((pos2 & 0x03) << 6) + posOfCharacter(input[pos + 3])));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c19a6a55bd2ab3350a343a2ffdadb3549f66651c01e1fcef3e2f51a9ef1d4a43" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 141, + "startColumn": 77, + "charOffset": 3706, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 139, + "startColumn": 77, + "charOffset": 3469, + "charLength": 1, + "snippet": { + "text": "\t\t\toutput.push_back(static_cast(((pos1 & 0x0f) << 4) + ((pos2 & 0x3c) >> 2)));\n\t\t\tif (input[pos + 3] != '=' && input[pos + 3] != '.') {\n\t\t\t\toutput.push_back(static_cast(((pos2 & 0x03) << 6) + posOfCharacter(input[pos + 3])));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9cf44463bd781588a90b4485cb7cc1c40f77f1e7cade30b79182222f81616ce9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 151, + "startColumn": 1, + "charOffset": 3790, + "charLength": 6, + "snippet": { + "text": "static" + } + }, + "contextRegion": { + "startLine": 149, + "startColumn": 1, + "charOffset": 3787, + "charLength": 6, + "snippet": { + "text": "}\n\nstatic const std::string header_old = \"-----BEGIN RSA PRIVATE KEY-----\";\nstatic const std::string footer_old = \"-----END RSA PRIVATE KEY-----\";\nstatic const std::string header_new = \"-----BEGIN PRIVATE KEY-----\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16d29fc90c34c085eac33aa3b6dc15ac0ba48e79d0fa80eaeb6a3995eda12b06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'header_old' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 151, + "startColumn": 26, + "charOffset": 3815, + "charLength": 10, + "snippet": { + "text": "header_old" + } + }, + "contextRegion": { + "startLine": 149, + "startColumn": 26, + "charOffset": 3787, + "charLength": 10, + "snippet": { + "text": "}\n\nstatic const std::string header_old = \"-----BEGIN RSA PRIVATE KEY-----\";\nstatic const std::string footer_old = \"-----END RSA PRIVATE KEY-----\";\nstatic const std::string header_new = \"-----BEGIN PRIVATE KEY-----\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2b5ced4fbadfbcc7b39b6f84180008e5a1c0a1947a06e2cef8e95c6cdef818e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 152, + "startColumn": 1, + "charOffset": 3863, + "charLength": 6, + "snippet": { + "text": "static" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 1, + "charOffset": 3789, + "charLength": 6, + "snippet": { + "text": "\nstatic const std::string header_old = \"-----BEGIN RSA PRIVATE KEY-----\";\nstatic const std::string footer_old = \"-----END RSA PRIVATE KEY-----\";\nstatic const std::string header_new = \"-----BEGIN PRIVATE KEY-----\";\nstatic const std::string footer_new = \"-----END PRIVATE KEY-----\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "474359e1986233eff5d3bed4ac51f97540d7c4a0fdef58faa8f216aefe85558c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'footer_old' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 152, + "startColumn": 26, + "charOffset": 3888, + "charLength": 10, + "snippet": { + "text": "footer_old" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 26, + "charOffset": 3789, + "charLength": 10, + "snippet": { + "text": "\nstatic const std::string header_old = \"-----BEGIN RSA PRIVATE KEY-----\";\nstatic const std::string footer_old = \"-----END RSA PRIVATE KEY-----\";\nstatic const std::string header_new = \"-----BEGIN PRIVATE KEY-----\";\nstatic const std::string footer_new = \"-----END PRIVATE KEY-----\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0bc8a0123251b11297f44fe447740c3dbd1397a253a50cd2db65ae238b1b553" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 153, + "startColumn": 1, + "charOffset": 3934, + "charLength": 6, + "snippet": { + "text": "static" + } + }, + "contextRegion": { + "startLine": 151, + "startColumn": 1, + "charOffset": 3790, + "charLength": 6, + "snippet": { + "text": "static const std::string header_old = \"-----BEGIN RSA PRIVATE KEY-----\";\nstatic const std::string footer_old = \"-----END RSA PRIVATE KEY-----\";\nstatic const std::string header_new = \"-----BEGIN PRIVATE KEY-----\";\nstatic const std::string footer_new = \"-----END PRIVATE KEY-----\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1794356006724ba53239e7ca6a0fd179cc1a487105a2340120aa514d4c7b88a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'header_new' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 153, + "startColumn": 26, + "charOffset": 3959, + "charLength": 10, + "snippet": { + "text": "header_new" + } + }, + "contextRegion": { + "startLine": 151, + "startColumn": 26, + "charOffset": 3790, + "charLength": 10, + "snippet": { + "text": "static const std::string header_old = \"-----BEGIN RSA PRIVATE KEY-----\";\nstatic const std::string footer_old = \"-----END RSA PRIVATE KEY-----\";\nstatic const std::string header_new = \"-----BEGIN PRIVATE KEY-----\";\nstatic const std::string footer_new = \"-----END PRIVATE KEY-----\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0eee17a69e0e78c4ce1e5bad9e1b7de054125736c2ca3afdff5a1bfd6d01d1b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 154, + "startColumn": 1, + "charOffset": 4003, + "charLength": 6, + "snippet": { + "text": "static" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 1, + "charOffset": 3863, + "charLength": 6, + "snippet": { + "text": "static const std::string footer_old = \"-----END RSA PRIVATE KEY-----\";\nstatic const std::string header_new = \"-----BEGIN PRIVATE KEY-----\";\nstatic const std::string footer_new = \"-----END PRIVATE KEY-----\";\n\nenum {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac0450bc1aae16576674ef11ec8e83d27cbf1675a8a452f67816b0cb9ea0f60a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'footer_new' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 154, + "startColumn": 26, + "charOffset": 4028, + "charLength": 10, + "snippet": { + "text": "footer_new" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 26, + "charOffset": 3863, + "charLength": 10, + "snippet": { + "text": "static const std::string footer_old = \"-----END RSA PRIVATE KEY-----\";\nstatic const std::string header_new = \"-----BEGIN PRIVATE KEY-----\";\nstatic const std::string footer_new = \"-----END PRIVATE KEY-----\";\n\nenum {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3a24c571c22e0d31ed44bb631419c78cb14099861d2504c017e4a79d3e6cc15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-enum-size", + "ruleIndex": 666, + "kind": "fail", + "level": "warning", + "message": { + "text": "enum '(unnamed enum at /data/project/src/security/rsa.cpp:156:1)' uses a larger base type ('unsigned int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 156, + "startColumn": 1, + "charOffset": 4071, + "charLength": 4, + "snippet": { + "text": "enum" + } + }, + "contextRegion": { + "startLine": 154, + "startColumn": 1, + "charOffset": 4003, + "charLength": 4, + "snippet": { + "text": "static const std::string footer_new = \"-----END PRIVATE KEY-----\";\n\nenum {\n\tCRYPT_RSA_ASN1_SEQUENCE = 48,\n\tCRYPT_RSA_ASN1_INTEGER = 2," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e5f219bf259ca91bc0428cb2c94606db4b31a69f9f8f4c78eefb4c46fcda3a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'decodeLength' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 163, + "startColumn": 15, + "charOffset": 4214, + "charLength": 12, + "snippet": { + "text": "decodeLength" + } + }, + "contextRegion": { + "startLine": 161, + "startColumn": 15, + "charOffset": 4196, + "charLength": 12, + "snippet": { + "text": "};\n\nuint16_t RSA::decodeLength(char*&pos) const {\n\tuint8_t buffer[4] = { 0 };\n\tauto length = static_cast(static_cast(*pos++));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "368172b6a23ee30630bd7e2fa79d5829693a0df5ff9ef5e9844d509ba89f2c67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-c-arrays", + "ruleIndex": 480, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not declare C-style arrays, use std::array<> instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 164, + "startColumn": 2, + "charOffset": 4247, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 162, + "startColumn": 2, + "charOffset": 4199, + "charLength": 7, + "snippet": { + "text": "\nuint16_t RSA::decodeLength(char*&pos) const {\n\tuint8_t buffer[4] = { 0 };\n\tauto length = static_cast(static_cast(*pos++));\n\tif (length & 0x80) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a1406e9e81050aec97e328041ef7c47bf81ae6bacd685360a3880310f21de3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 165, + "startColumn": 63, + "charOffset": 4336, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 163, + "startColumn": 63, + "charOffset": 4200, + "charLength": 2, + "snippet": { + "text": "uint16_t RSA::decodeLength(char*&pos) const {\n\tuint8_t buffer[4] = { 0 };\n\tauto length = static_cast(static_cast(*pos++));\n\tif (length & 0x80) {\n\t\tlength &= 0x7F;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59ff25e15124ea1f4bed0b6b5ccced0f22a7a2957a1f3d023f1f2aefbe3db5c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 166, + "startColumn": 6, + "charOffset": 4347, + "charLength": 6, + "snippet": { + "text": "length" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 6, + "charOffset": 4246, + "charLength": 6, + "snippet": { + "text": "\tuint8_t buffer[4] = { 0 };\n\tauto length = static_cast(static_cast(*pos++));\n\tif (length & 0x80) {\n\t\tlength &= 0x7F;\n\t\tif (length > 4) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14e1a514985b0a21a20c51dac550ae83ca510d412f1f31892b5fda5f13c79d55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 166, + "startColumn": 6, + "charOffset": 4347, + "charLength": 6, + "snippet": { + "text": "length" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 6, + "charOffset": 4246, + "charLength": 6, + "snippet": { + "text": "\tuint8_t buffer[4] = { 0 };\n\tauto length = static_cast(static_cast(*pos++));\n\tif (length & 0x80) {\n\t\tlength &= 0x7F;\n\t\tif (length > 4) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e8abf0b3a6faaf92fdc0ae4b60da24e1d7777eb1abfdff467dccea7db148794" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 166, + "startColumn": 15, + "charOffset": 4356, + "charLength": 4, + "snippet": { + "text": "0x80" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 15, + "charOffset": 4246, + "charLength": 4, + "snippet": { + "text": "\tuint8_t buffer[4] = { 0 };\n\tauto length = static_cast(static_cast(*pos++));\n\tif (length & 0x80) {\n\t\tlength &= 0x7F;\n\t\tif (length > 4) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0767bc6d30ba855f1dfd4181769ec986191da80e48555af5c9f20a5eaaaf3fed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 166, + "startColumn": 15, + "charOffset": 4356, + "charLength": 4, + "snippet": { + "text": "0x80" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 15, + "charOffset": 4246, + "charLength": 4, + "snippet": { + "text": "\tuint8_t buffer[4] = { 0 };\n\tauto length = static_cast(static_cast(*pos++));\n\tif (length & 0x80) {\n\t\tlength &= 0x7F;\n\t\tif (length > 4) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b9af84d7ccdeb4c2c75b1d635988438f568c9490e8678dffebccc323bfe0974" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x80 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 166, + "startColumn": 15, + "charOffset": 4356, + "charLength": 4, + "snippet": { + "text": "0x80" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 15, + "charOffset": 4246, + "charLength": 4, + "snippet": { + "text": "\tuint8_t buffer[4] = { 0 };\n\tauto length = static_cast(static_cast(*pos++));\n\tif (length & 0x80) {\n\t\tlength &= 0x7F;\n\t\tif (length > 4) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f879b69c5d0bfd569ae0e12a58b4e3bbe0c622547b8a41eaa327b5ffa73dbc7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 13, + "charOffset": 4376, + "charLength": 4, + "snippet": { + "text": "0x7F" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 13, + "charOffset": 4274, + "charLength": 4, + "snippet": { + "text": "\tauto length = static_cast(static_cast(*pos++));\n\tif (length & 0x80) {\n\t\tlength &= 0x7F;\n\t\tif (length > 4) {\n\t\t\tg_logger().error(\"[RSA::loadPEM] - Invalid 'length'\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "923453ff75142da70a71fe17892bfa591e557fb7b60b6d4097d64788f1e9d998" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x7F is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 13, + "charOffset": 4376, + "charLength": 4, + "snippet": { + "text": "0x7F" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 13, + "charOffset": 4274, + "charLength": 4, + "snippet": { + "text": "\tauto length = static_cast(static_cast(*pos++));\n\tif (length & 0x80) {\n\t\tlength &= 0x7F;\n\t\tif (length > 4) {\n\t\t\tg_logger().error(\"[RSA::loadPEM] - Invalid 'length'\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "036433fc6acb80eafaf37b6fb45447f36109eed6b6fa908daad2fb999f0a2d99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 173, + "startColumn": 4, + "charOffset": 4500, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 171, + "startColumn": 4, + "charOffset": 4473, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t\tswitch (length) {\n\t\t\tcase 4:\n\t\t\t\tbuffer[3] = static_cast(*pos++);\n\t\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "baf48cb5b28ebe1466e8a62eb08ac0ac093dc5c9d92d78826e5f18464f4c5454" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 174, + "startColumn": 42, + "charOffset": 4549, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 42, + "charOffset": 4477, + "charLength": 2, + "snippet": { + "text": "\t\tswitch (length) {\n\t\t\tcase 4:\n\t\t\t\tbuffer[3] = static_cast(*pos++);\n\t\t\tcase 3:\n\t\t\t\tbuffer[2] = static_cast(*pos++);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90f8a8db267a27e2ef71ef6e6d2b6b3470a1f055c410f37ad96f31ab3f88b1a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 175, + "startColumn": 4, + "charOffset": 4557, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 173, + "startColumn": 4, + "charOffset": 4497, + "charLength": 4, + "snippet": { + "text": "\t\t\tcase 4:\n\t\t\t\tbuffer[3] = static_cast(*pos++);\n\t\t\tcase 3:\n\t\t\t\tbuffer[2] = static_cast(*pos++);\n\t\t\tcase 2:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68678b91ec38193a446cd19b9ab279050728574794bfaa670780480c494272d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 176, + "startColumn": 42, + "charOffset": 4606, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 174, + "startColumn": 42, + "charOffset": 4508, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tbuffer[3] = static_cast(*pos++);\n\t\t\tcase 3:\n\t\t\t\tbuffer[2] = static_cast(*pos++);\n\t\t\tcase 2:\n\t\t\t\tbuffer[1] = static_cast(*pos++);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ad9259cbf25cd7df1250abaeae6be9757828c1cd338f860538eeb3aa6e2ea69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 177, + "startColumn": 4, + "charOffset": 4614, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 175, + "startColumn": 4, + "charOffset": 4554, + "charLength": 4, + "snippet": { + "text": "\t\t\tcase 3:\n\t\t\t\tbuffer[2] = static_cast(*pos++);\n\t\t\tcase 2:\n\t\t\t\tbuffer[1] = static_cast(*pos++);\n\t\t\tcase 1:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b90fca63aedf26535750bbd76cc366d33a245adcdaf0ce01e44d0fee2d8cca9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 178, + "startColumn": 42, + "charOffset": 4663, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 176, + "startColumn": 42, + "charOffset": 4565, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tbuffer[2] = static_cast(*pos++);\n\t\t\tcase 2:\n\t\t\t\tbuffer[1] = static_cast(*pos++);\n\t\t\tcase 1:\n\t\t\t\tbuffer[0] = static_cast(*pos++);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28f2d8dd47e4a4a0b925f34b1976e4ba0a7e606a522335105558a409b4a66372" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 179, + "startColumn": 4, + "charOffset": 4671, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 177, + "startColumn": 4, + "charOffset": 4611, + "charLength": 4, + "snippet": { + "text": "\t\t\tcase 2:\n\t\t\t\tbuffer[1] = static_cast(*pos++);\n\t\t\tcase 1:\n\t\t\t\tbuffer[0] = static_cast(*pos++);\n\t\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1b60f81e723d335e7599ce4641da1fc42a303ce208c5a9bbd31c747068ed5cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 180, + "startColumn": 42, + "charOffset": 4720, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 178, + "startColumn": 42, + "charOffset": 4622, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tbuffer[1] = static_cast(*pos++);\n\t\t\tcase 1:\n\t\t\t\tbuffer[0] = static_cast(*pos++);\n\t\t\tdefault:\n\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f00855c06500b807a46eb3f2cc8f5dfc2ea571c1226ce66a23d629864049395" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 184, + "startColumn": 3, + "charOffset": 4754, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 182, + "startColumn": 3, + "charOffset": 4737, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t}\n\t\tstd::memcpy(&length, buffer, sizeof(length));\n\t}\n\treturn length;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f6fe37f241343a627b8ea9dd521bf53aeb5c2f2d6a2ad7d544953955667edec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 184, + "startColumn": 24, + "charOffset": 4775, + "charLength": 6, + "snippet": { + "text": "buffer" + } + }, + "contextRegion": { + "startLine": 182, + "startColumn": 24, + "charOffset": 4737, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t}\n\t\tstd::memcpy(&length, buffer, sizeof(length));\n\t}\n\treturn length;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb5db6d59b9dd2c53d4cfbf5d4d4a1fcc98077a2a2ed732ce25866fc8dade37d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 184, + "startColumn": 24, + "charOffset": 4775, + "charLength": 6, + "snippet": { + "text": "buffer" + } + }, + "contextRegion": { + "startLine": 182, + "startColumn": 24, + "charOffset": 4737, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t}\n\t\tstd::memcpy(&length, buffer, sizeof(length));\n\t}\n\treturn length;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9423c3348ace8d65e53dbd02a0aa0bcf66922b735736eb9be470cff1da19617b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'readHexString' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 189, + "startColumn": 11, + "charOffset": 4832, + "charLength": 13, + "snippet": { + "text": "readHexString" + } + }, + "contextRegion": { + "startLine": 187, + "startColumn": 11, + "charOffset": 4819, + "charLength": 13, + "snippet": { + "text": "}\n\nvoid RSA::readHexString(char*&pos, uint16_t length, std::string &output) const {\n\toutput.reserve(static_cast(length) * 2);\n\tfor (uint16_t i = 0; i < length; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7fb58e2ca5b343478be9bd89595fd4b55b1f806a928768a3fec1c3a43ffbbf7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 191, + "startColumn": 2, + "charOffset": 4954, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 189, + "startColumn": 2, + "charOffset": 4822, + "charLength": 3, + "snippet": { + "text": "void RSA::readHexString(char*&pos, uint16_t length, std::string &output) const {\n\toutput.reserve(static_cast(length) * 2);\n\tfor (uint16_t i = 0; i < length; ++i) {\n\t\tauto hex = static_cast(*pos++);\n\t\toutput.push_back(\"0123456789ABCDEF\"[(hex >> 4) & 15]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3cf435f8f5033224feab4489c2fbe710eaa0d12f1ca0e9e7a4dbe7def98c88e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 192, + "startColumn": 39, + "charOffset": 5032, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 190, + "startColumn": 39, + "charOffset": 4903, + "charLength": 2, + "snippet": { + "text": "\toutput.reserve(static_cast(length) * 2);\n\tfor (uint16_t i = 0; i < length; ++i) {\n\t\tauto hex = static_cast(*pos++);\n\t\toutput.push_back(\"0123456789ABCDEF\"[(hex >> 4) & 15]);\n\t\toutput.push_back(\"0123456789ABCDEF\"[hex & 15]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dac0f83a4315c03951ba3795378fbccc84978bbb834c7718abf2222fbe9f9461" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 193, + "startColumn": 20, + "charOffset": 5056, + "charLength": 18, + "snippet": { + "text": "\"0123456789ABCDEF\"" + } + }, + "contextRegion": { + "startLine": 191, + "startColumn": 20, + "charOffset": 4953, + "charLength": 18, + "snippet": { + "text": "\tfor (uint16_t i = 0; i < length; ++i) {\n\t\tauto hex = static_cast(*pos++);\n\t\toutput.push_back(\"0123456789ABCDEF\"[(hex >> 4) & 15]);\n\t\toutput.push_back(\"0123456789ABCDEF\"[hex & 15]);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8fa55dea2f91f007e822efac01a45cf01a305251a47f244097383d8d7ef1fa49" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 193, + "startColumn": 39, + "charOffset": 5075, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 191, + "startColumn": 39, + "charOffset": 4953, + "charLength": 1, + "snippet": { + "text": "\tfor (uint16_t i = 0; i < length; ++i) {\n\t\tauto hex = static_cast(*pos++);\n\t\toutput.push_back(\"0123456789ABCDEF\"[(hex >> 4) & 15]);\n\t\toutput.push_back(\"0123456789ABCDEF\"[hex & 15]);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0933200339ca60e8e3b1f400aed05cf115f22f635ee437c48d4572f30d16948a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 193, + "startColumn": 47, + "charOffset": 5083, + "charLength": 1, + "snippet": { + "text": "4" + } + }, + "contextRegion": { + "startLine": 191, + "startColumn": 47, + "charOffset": 4953, + "charLength": 1, + "snippet": { + "text": "\tfor (uint16_t i = 0; i < length; ++i) {\n\t\tauto hex = static_cast(*pos++);\n\t\toutput.push_back(\"0123456789ABCDEF\"[(hex >> 4) & 15]);\n\t\toutput.push_back(\"0123456789ABCDEF\"[hex & 15]);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a0c9a393196af81f7a57c3122b3e6d9a35ef5797da8dac57f49d101654e618c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "15 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 193, + "startColumn": 52, + "charOffset": 5088, + "charLength": 2, + "snippet": { + "text": "15" + } + }, + "contextRegion": { + "startLine": 191, + "startColumn": 52, + "charOffset": 4953, + "charLength": 2, + "snippet": { + "text": "\tfor (uint16_t i = 0; i < length; ++i) {\n\t\tauto hex = static_cast(*pos++);\n\t\toutput.push_back(\"0123456789ABCDEF\"[(hex >> 4) & 15]);\n\t\toutput.push_back(\"0123456789ABCDEF\"[hex & 15]);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85eb09387dc24f2eeaf5b84ef642146f035c6b2c60b70138152e104787de7bf1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 194, + "startColumn": 20, + "charOffset": 5113, + "charLength": 18, + "snippet": { + "text": "\"0123456789ABCDEF\"" + } + }, + "contextRegion": { + "startLine": 192, + "startColumn": 20, + "charOffset": 4994, + "charLength": 18, + "snippet": { + "text": "\t\tauto hex = static_cast(*pos++);\n\t\toutput.push_back(\"0123456789ABCDEF\"[(hex >> 4) & 15]);\n\t\toutput.push_back(\"0123456789ABCDEF\"[hex & 15]);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a7649d07bab2cf73a2293f54394187d8463535010b568df5be1237325d4fac0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 194, + "startColumn": 45, + "charOffset": 5138, + "charLength": 2, + "snippet": { + "text": "15" + } + }, + "contextRegion": { + "startLine": 192, + "startColumn": 45, + "charOffset": 4994, + "charLength": 2, + "snippet": { + "text": "\t\tauto hex = static_cast(*pos++);\n\t\toutput.push_back(\"0123456789ABCDEF\"[(hex >> 4) & 15]);\n\t\toutput.push_back(\"0123456789ABCDEF\"[hex & 15]);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b65457c93ed41bc3a806c1abb8563ac206b06e853c708df2835625edc6b3979d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "15 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 194, + "startColumn": 45, + "charOffset": 5138, + "charLength": 2, + "snippet": { + "text": "15" + } + }, + "contextRegion": { + "startLine": 192, + "startColumn": 45, + "charOffset": 4994, + "charLength": 2, + "snippet": { + "text": "\t\tauto hex = static_cast(*pos++);\n\t\toutput.push_back(\"0123456789ABCDEF\"[(hex >> 4) & 15]);\n\t\toutput.push_back(\"0123456789ABCDEF\"[hex & 15]);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4b4d83e8402032e677ff1ef47016784c496e9ef05ee5063de0b5250426eb616" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 207, + "startColumn": 2, + "charOffset": 5340, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 205, + "startColumn": 2, + "charOffset": 5295, + "charLength": 3, + "snippet": { + "text": "\tstd::string pString;\n\tstd::string qString;\n\tfor (std::string line; std::getline(file, line); key.append(line))\n\t\t;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d89e471a07174cbfaab710f5610b1898c94b360106a157c469d2d6e6a242e89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-3-1", + "ruleIndex": 448, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-3-1: The statement forming the body of a switch, while, do ... while or for statement shall be a compound statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 207, + "startColumn": 2, + "charOffset": 5340, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 205, + "startColumn": 2, + "charOffset": 5295, + "charLength": 3, + "snippet": { + "text": "\tstd::string pString;\n\tstd::string qString;\n\tfor (std::string line; std::getline(file, line); key.append(line))\n\t\t;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c740c071b58ab85c1d233dca2ceaecc83ab12da6335bab159d53eb8f1fc7f00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 207, + "startColumn": 2, + "charOffset": 5340, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 205, + "startColumn": 2, + "charOffset": 5295, + "charLength": 3, + "snippet": { + "text": "\tstd::string pString;\n\tstd::string qString;\n\tfor (std::string line; std::getline(file, line); key.append(line))\n\t\t;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6f7036c0114598fc64c48230f9a676a668102057a663b1645df79ecdd49ca6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'file' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 207, + "startColumn": 25, + "charOffset": 5363, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 205, + "startColumn": 25, + "charOffset": 5295, + "charLength": 3, + "snippet": { + "text": "\tstd::string pString;\n\tstd::string qString;\n\tfor (std::string line; std::getline(file, line); key.append(line))\n\t\t;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0cc84cdba0950225261fda873bb8d9297d17293feec55972b129941408c3aa9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-braces-around-statements", + "ruleIndex": 541, + "kind": "fail", + "level": "warning", + "message": { + "text": "statement should be inside braces" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 207, + "startColumn": 68, + "charOffset": 5406, + "snippet": {} + }, + "contextRegion": { + "startLine": 205, + "startColumn": 68, + "charOffset": 5295, + "snippet": { + "text": "\tstd::string pString;\n\tstd::string qString;\n\tfor (std::string line; std::getline(file, line); key.append(line))\n\t\t;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad1d76fca7e6d442004bf660dcb315fd91a05b81f90b58b477560b153204db3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-container-data-pointer", + "ruleIndex": 694, + "kind": "fail", + "level": "warning", + "message": { + "text": "'data' should be used for accessing the data pointer instead of taking the address of the 0-th element" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 229, + "startColumn": 14, + "charOffset": 6229, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 227, + "startColumn": 14, + "charOffset": 6212, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tchar* pos = &key[0];\n\tif (static_cast(*pos++) != CRYPT_RSA_ASN1_SEQUENCE) {\n\t\tg_logger().error(\"[RSA::loadPEM] - Invalid unsupported RSA key\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a1ec981f79e2e0a4642d2282c5f8c23455640f7d93a90c87e675c0fc58cd2f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 230, + "startColumn": 31, + "charOffset": 6268, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 228, + "startColumn": 31, + "charOffset": 6215, + "charLength": 2, + "snippet": { + "text": "\n\tchar* pos = &key[0];\n\tif (static_cast(*pos++) != CRYPT_RSA_ASN1_SEQUENCE) {\n\t\tg_logger().error(\"[RSA::loadPEM] - Invalid unsupported RSA key\");\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19a8393f60254bbff4743a13fa16cdba3c9e9b0685ef4adefcbfb00fd237cdc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-container-data-pointer", + "ruleIndex": 694, + "kind": "fail", + "level": "warning", + "message": { + "text": "'data' should be used for accessing the data pointer instead of taking the address of the 0-th element" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 236, + "startColumn": 45, + "charOffset": 6472, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 234, + "startColumn": 45, + "charOffset": 6389, + "charLength": 1, + "snippet": { + "text": "\n\tuint16_t length = decodeLength(pos);\n\tif (length != key.length() - std::distance(&key[0], pos)) {\n\t\tg_logger().error(\"[RSA::loadPEM] - Invalid unsupported RSA key\");\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c824cac7df1773ddebe9ce5c92789d476cee8b47da56f400a0ebc99174d1fa7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 241, + "startColumn": 38, + "charOffset": 6614, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 239, + "startColumn": 38, + "charOffset": 6573, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tauto tag = static_cast(*pos++);\n\tif (tag == CRYPT_RSA_ASN1_INTEGER && static_cast(*(pos + 0)) == 0x01 && static_cast(*(pos + 1)) == 0x00 && static_cast(*(pos + 2)) == 0x30) {\n\t\tpos += 3;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e3324d02c4fd820c47d75d609c199699a2399d3573c06f85ca5cda3c14157ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 66, + "charOffset": 6684, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 66, + "charOffset": 6576, + "charLength": 1, + "snippet": { + "text": "\n\tauto tag = static_cast(*pos++);\n\tif (tag == CRYPT_RSA_ASN1_INTEGER && static_cast(*(pos + 0)) == 0x01 && static_cast(*(pos + 1)) == 0x00 && static_cast(*(pos + 2)) == 0x30) {\n\t\tpos += 3;\n\t\ttag = CRYPT_RSA_ASN1_SEQUENCE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f05877d9dd47db25025faf203ce1b8af6a42f76c7bd66272595f0e134f2bd02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 110, + "charOffset": 6728, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 110, + "charOffset": 6576, + "charLength": 1, + "snippet": { + "text": "\n\tauto tag = static_cast(*pos++);\n\tif (tag == CRYPT_RSA_ASN1_INTEGER && static_cast(*(pos + 0)) == 0x01 && static_cast(*(pos + 1)) == 0x00 && static_cast(*(pos + 2)) == 0x30) {\n\t\tpos += 3;\n\t\ttag = CRYPT_RSA_ASN1_SEQUENCE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b2102516518163dc2f29ef9dbbf63d53bbeb20bc7824fa9f67a5bf33faad67a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 154, + "charOffset": 6772, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 154, + "charOffset": 6576, + "charLength": 1, + "snippet": { + "text": "\n\tauto tag = static_cast(*pos++);\n\tif (tag == CRYPT_RSA_ASN1_INTEGER && static_cast(*(pos + 0)) == 0x01 && static_cast(*(pos + 1)) == 0x00 && static_cast(*(pos + 2)) == 0x30) {\n\t\tpos += 3;\n\t\ttag = CRYPT_RSA_ASN1_SEQUENCE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8891d0cc5fbc5d4d36ba496d6fcdc926df72a74583b6156f3535fae53a92878" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 163, + "charOffset": 6781, + "charLength": 4, + "snippet": { + "text": "0x30" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 163, + "charOffset": 6576, + "charLength": 4, + "snippet": { + "text": "\n\tauto tag = static_cast(*pos++);\n\tif (tag == CRYPT_RSA_ASN1_INTEGER && static_cast(*(pos + 0)) == 0x01 && static_cast(*(pos + 1)) == 0x00 && static_cast(*(pos + 2)) == 0x30) {\n\t\tpos += 3;\n\t\ttag = CRYPT_RSA_ASN1_SEQUENCE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87b2018449ad7a2c3198ceadb4a191ac941c074199104bf93cd42f9716d0f2d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 243, + "startColumn": 7, + "charOffset": 6795, + "charLength": 2, + "snippet": { + "text": "+=" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 7, + "charOffset": 6577, + "charLength": 2, + "snippet": { + "text": "\tauto tag = static_cast(*pos++);\n\tif (tag == CRYPT_RSA_ASN1_INTEGER && static_cast(*(pos + 0)) == 0x01 && static_cast(*(pos + 1)) == 0x00 && static_cast(*(pos + 2)) == 0x30) {\n\t\tpos += 3;\n\t\ttag = CRYPT_RSA_ASN1_SEQUENCE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c2366c64fdd890db0c2bc41cb19ad0bf55f933f854ef0b1d9704d5cf1fbb93c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 244, + "startColumn": 9, + "charOffset": 6809, + "charLength": 23, + "snippet": { + "text": "CRYPT_RSA_ASN1_SEQUENCE" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 9, + "charOffset": 6619, + "charLength": 23, + "snippet": { + "text": "\tif (tag == CRYPT_RSA_ASN1_INTEGER && static_cast(*(pos + 0)) == 0x01 && static_cast(*(pos + 1)) == 0x00 && static_cast(*(pos + 2)) == 0x30) {\n\t\tpos += 3;\n\t\ttag = CRYPT_RSA_ASN1_SEQUENCE;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c29547e75e1efe4c82ea54f3946b43415f88064f4adb2a83c3a85c06dc9912fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 248, + "startColumn": 7, + "charOffset": 6883, + "charLength": 2, + "snippet": { + "text": "+=" + } + }, + "contextRegion": { + "startLine": 246, + "startColumn": 7, + "charOffset": 6837, + "charLength": 2, + "snippet": { + "text": "\n\tif (tag == CRYPT_RSA_ASN1_SEQUENCE) {\n\t\tpos += decodeLength(pos);\n\t\ttag = static_cast(*pos++);\n\t\tdecodeLength(pos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ba582b9336cb716ef247a9468b0e579146cce184ec17f806982067cbae905a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 249, + "startColumn": 34, + "charOffset": 6938, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 247, + "startColumn": 34, + "charOffset": 6838, + "charLength": 2, + "snippet": { + "text": "\tif (tag == CRYPT_RSA_ASN1_SEQUENCE) {\n\t\tpos += decodeLength(pos);\n\t\ttag = static_cast(*pos++);\n\t\tdecodeLength(pos);\n\t\tif (tag == CRYPT_RSA_ASN1_BITSTRING) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e9b0fe428e21f706f4388c1307ec74888149ceb5078971cdc82216ff75711a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 250, + "startColumn": 3, + "charOffset": 6945, + "charLength": 12, + "snippet": { + "text": "decodeLength" + } + }, + "contextRegion": { + "startLine": 248, + "startColumn": 3, + "charOffset": 6877, + "charLength": 12, + "snippet": { + "text": "\t\tpos += decodeLength(pos);\n\t\ttag = static_cast(*pos++);\n\t\tdecodeLength(pos);\n\t\tif (tag == CRYPT_RSA_ASN1_BITSTRING) {\n\t\t\t++pos;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "851879ad2ecb584544e1d82494e6af45f2c7efc2a3cdc1646bdb910af1f162f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 252, + "startColumn": 4, + "charOffset": 7008, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 250, + "startColumn": 4, + "charOffset": 6943, + "charLength": 2, + "snippet": { + "text": "\t\tdecodeLength(pos);\n\t\tif (tag == CRYPT_RSA_ASN1_BITSTRING) {\n\t\t\t++pos;\n\t\t}\n\t\tif (static_cast(*pos++) != CRYPT_RSA_ASN1_SEQUENCE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1dab5c996a0d52de52824abb010afa2306e48272f06d143f4f9b155c2210778a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 254, + "startColumn": 32, + "charOffset": 7050, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 32, + "charOffset": 7005, + "charLength": 2, + "snippet": { + "text": "\t\t\t++pos;\n\t\t}\n\t\tif (static_cast(*pos++) != CRYPT_RSA_ASN1_SEQUENCE) {\n\t\t\tg_logger().error(\"[RSA::loadPEM] - Invalid unsupported RSA key\");\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "064b4d457284bfa9bd5ed22f93f92c232bfeb28262ab6e589a400fc3dd5d56e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-container-data-pointer", + "ruleIndex": 694, + "kind": "fail", + "level": "warning", + "message": { + "text": "'data' should be used for accessing the data pointer instead of taking the address of the 0-th element" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 260, + "startColumn": 46, + "charOffset": 7250, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 258, + "startColumn": 46, + "charOffset": 7174, + "charLength": 1, + "snippet": { + "text": "\n\t\tlength = decodeLength(pos);\n\t\tif (length != key.length() - std::distance(&key[0], pos)) {\n\t\t\tg_logger().error(\"[RSA::loadPEM] - Invalid unsupported RSA key\");\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c208380fc6fa282f863a39699702db580d951016909e72c22f7c28b3ed474c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 265, + "startColumn": 34, + "charOffset": 7391, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 263, + "startColumn": 34, + "charOffset": 7353, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\ttag = static_cast(*pos++);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d213f037d46f1ca49b2335aa5b8205c810092f27382e0480384cf09b92f864a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 274, + "startColumn": 6, + "charOffset": 7560, + "charLength": 2, + "snippet": { + "text": "+=" + } + }, + "contextRegion": { + "startLine": 272, + "startColumn": 6, + "charOffset": 7525, + "charLength": 2, + "snippet": { + "text": "\n\tlength = decodeLength(pos);\n\tpos += length;\n\tif (length != 1 || static_cast(*pos) > 2) {\n\t\t// public key - we don't have any interest in it" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79e3bb18516225fed80c5d73f02eb7e970f7495fcafe492cab1faa2a61e58957" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 281, + "startColumn": 33, + "charOffset": 7796, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 279, + "startColumn": 33, + "charOffset": 7760, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\ttag = static_cast(*pos++);\n\tif (tag != CRYPT_RSA_ASN1_INTEGER) {\n\t\tg_logger().error(\"[RSA::loadPEM] - Invalid unsupported RSA key\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8891d0cc5fbc5d4d36ba496d6fcdc926df72a74583b6156f3535fae53a92878" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 288, + "startColumn": 6, + "charOffset": 7961, + "charLength": 2, + "snippet": { + "text": "+=" + } + }, + "contextRegion": { + "startLine": 286, + "startColumn": 6, + "charOffset": 7926, + "charLength": 2, + "snippet": { + "text": "\n\tlength = decodeLength(pos);\n\tpos += length + 1; // Modulus - we don't care\n\tlength = decodeLength(pos);\n\tpos += length + 1; // Public Exponent - we don't care" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4618b6fdc5217cdb2f1ba34392cd8c96825771cf274344d7a3d848121bb907a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 290, + "startColumn": 6, + "charOffset": 8037, + "charLength": 2, + "snippet": { + "text": "+=" + } + }, + "contextRegion": { + "startLine": 288, + "startColumn": 6, + "charOffset": 7956, + "charLength": 2, + "snippet": { + "text": "\tpos += length + 1; // Modulus - we don't care\n\tlength = decodeLength(pos);\n\tpos += length + 1; // Public Exponent - we don't care\n\tlength = decodeLength(pos);\n\tpos += length + 1; // Private Exponent - we don't care" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6be6da81460253e39e8a53e72a472fd31b37091add29f4d15b360e0fecbbfc20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 292, + "startColumn": 6, + "charOffset": 8121, + "charLength": 2, + "snippet": { + "text": "+=" + } + }, + "contextRegion": { + "startLine": 290, + "startColumn": 6, + "charOffset": 8032, + "charLength": 2, + "snippet": { + "text": "\tpos += length + 1; // Public Exponent - we don't care\n\tlength = decodeLength(pos);\n\tpos += length + 1; // Private Exponent - we don't care\n\tlength = decodeLength(pos);\n\treadHexString(pos, length, pString);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a74220e350558151b7491d177d25e547b56f256c9994aba265d81f484553f926" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 295, + "startColumn": 2, + "charOffset": 8240, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 293, + "startColumn": 2, + "charOffset": 8172, + "charLength": 2, + "snippet": { + "text": "\tlength = decodeLength(pos);\n\treadHexString(pos, length, pString);\n\t++pos;\n\tlength = decodeLength(pos);\n\treadHexString(pos, length, qString);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b523da6e93f82fd42bf1ecb22f2ae3ec1959f454073b57c709548d9c36222f09" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 298, + "startColumn": 2, + "charOffset": 8315, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 296, + "startColumn": 2, + "charOffset": 8247, + "charLength": 2, + "snippet": { + "text": "\tlength = decodeLength(pos);\n\treadHexString(pos, length, qString);\n\t++pos;\n\tlength = decodeLength(pos);\n\tpos += length + 1; // Prime Exponent P - we don't care" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1b908864f240976d7ba24817814757216c884b3689399f6c8a964dd02b58a8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 300, + "startColumn": 6, + "charOffset": 8356, + "charLength": 2, + "snippet": { + "text": "+=" + } + }, + "contextRegion": { + "startLine": 298, + "startColumn": 6, + "charOffset": 8314, + "charLength": 2, + "snippet": { + "text": "\t++pos;\n\tlength = decodeLength(pos);\n\tpos += length + 1; // Prime Exponent P - we don't care\n\tlength = decodeLength(pos);\n\tpos += length + 1; // Prime Exponent Q - we don't care" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b5ff5bb4cae9df12acf4d755a21c1225ab4fb32ac71588449e3700b56ec7012" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 302, + "startColumn": 6, + "charOffset": 8441, + "charLength": 2, + "snippet": { + "text": "+=" + } + }, + "contextRegion": { + "startLine": 300, + "startColumn": 6, + "charOffset": 8351, + "charLength": 2, + "snippet": { + "text": "\tpos += length + 1; // Prime Exponent P - we don't care\n\tlength = decodeLength(pos);\n\tpos += length + 1; // Prime Exponent Q - we don't care\n\tlength = decodeLength(pos);\n\tpos += length + 1; // Coefficient - we don't care" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9ee113183741aa4a3425f9871924e841db31f0134902ec926d10e874f784822" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 304, + "startColumn": 6, + "charOffset": 8526, + "charLength": 2, + "snippet": { + "text": "+=" + } + }, + "contextRegion": { + "startLine": 302, + "startColumn": 6, + "charOffset": 8436, + "charLength": 2, + "snippet": { + "text": "\tpos += length + 1; // Prime Exponent Q - we don't care\n\tlength = decodeLength(pos);\n\tpos += length + 1; // Coefficient - we don't care\n\t++pos;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29734f8d0d2e8672aad66322e901299b1efbf4ce9b92c372f199d1eb1870ff14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 305, + "startColumn": 2, + "charOffset": 8573, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 303, + "startColumn": 2, + "charOffset": 8492, + "charLength": 2, + "snippet": { + "text": "\tlength = decodeLength(pos);\n\tpos += length + 1; // Coefficient - we don't care\n\t++pos;\n\n\tsetKey(pString.c_str(), qString.c_str(), 16);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c118f599948389fb75ae0729386ffdbbb2bef2a3f213c279289054fc12a3104" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/security/rsa.cpp" + }, + "region": { + "startLine": 307, + "startColumn": 43, + "charOffset": 8623, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 305, + "startColumn": 43, + "charOffset": 8572, + "charLength": 2, + "snippet": { + "text": "\t++pos;\n\n\tsetKey(pString.c_str(), qString.c_str(), 16);\n\treturn true;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cdc528d6cf7f968b64311dbacb3918ac1958e3cd81ba11466d0e556930f6fe02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'operator()' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "build/linux-debug/vcpkg_installed/x64-linux/include/asio/impl/read.hpp" + }, + "region": { + "startLine": 361, + "startColumn": 10, + "charOffset": 12194, + "charLength": 8, + "snippet": { + "text": "operator" + } + }, + "contextRegion": { + "startLine": 359, + "startColumn": 10, + "charOffset": 12178, + "charLength": 8, + "snippet": { + "text": " }\n\n void operator()(asio::error_code ec,\n std::size_t bytes_transferred, int start = 0)\n {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77275c3db9e82d304a5c698e98da7f5690932dfb579ca9604fb8ab0e5fc41349" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'servicePort' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 18, + "startColumn": 103, + "charOffset": 717, + "charLength": 11, + "snippet": { + "text": "servicePort" + } + }, + "contextRegion": { + "startLine": 16, + "startColumn": 103, + "charOffset": 585, + "charLength": 11, + "snippet": { + "text": "#include \"server/server.hpp\"\n\nConnection_ptr ConnectionManager::createConnection(asio::io_service &io_service, ConstServicePort_ptr servicePort) {\n\tauto connection = std::make_shared(io_service, servicePort);\n\tconnections.emplace(connection);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5787d2aece46354c3c33cd535f7e364cb5ba7ed2d410e3744741961200de724e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 20, + "startColumn": 14, + "charOffset": 819, + "charLength": 7, + "snippet": { + "text": "emplace" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 14, + "charOffset": 615, + "charLength": 7, + "snippet": { + "text": "Connection_ptr ConnectionManager::createConnection(asio::io_service &io_service, ConstServicePort_ptr servicePort) {\n\tauto connection = std::make_shared(io_service, servicePort);\n\tconnections.emplace(connection);\n\treturn connection;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38c8a93d3c3ee17ac5c13561a82aa62a19843af8aee3643fa9c0f624c4791575" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 25, + "startColumn": 14, + "charOffset": 954, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 14, + "charOffset": 862, + "charLength": 5, + "snippet": { + "text": "\nvoid ConnectionManager::releaseConnection(const Connection_ptr &connection) {\n\tconnections.erase(connection);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3abfb0dc913f2c510ac0beadb35d883a220341e2d7d04e6f90bb8b8a9512761b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-unused-return-value", + "ruleIndex": 117, + "kind": "fail", + "level": "warning", + "message": { + "text": "the value returned by this function should not be disregarded; neglecting it may lead to errors" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 33, + "startColumn": 5, + "charOffset": 1153, + "charLength": 10, + "snippet": { + "text": "connection" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 5, + "charOffset": 1113, + "charLength": 10, + "snippet": { + "text": "\t\t\ttry {\n\t\t\t\tstd::error_code error;\n\t\t\t\tconnection->socket.shutdown(asio::ip::tcp::socket::shutdown_both, error);\n\t\t\t\tif (error) {\n\t\t\t\t\tg_logger().error(\"[ConnectionManager::closeAll] - Failed to close connection, system error code {}\", error.message());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1b5bf7f84b5e0f90a584547ebece689e31a5b26957dc6fefeb9499c2488b569" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 33, + "startColumn": 24, + "charOffset": 1172, + "charLength": 8, + "snippet": { + "text": "shutdown" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 24, + "charOffset": 1113, + "charLength": 8, + "snippet": { + "text": "\t\t\ttry {\n\t\t\t\tstd::error_code error;\n\t\t\t\tconnection->socket.shutdown(asio::ip::tcp::socket::shutdown_both, error);\n\t\t\t\tif (error) {\n\t\t\t\t\tg_logger().error(\"[ConnectionManager::closeAll] - Failed to close connection, system error code {}\", error.message());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c2a0df0e2407eafe96cec10be4341387cdbcb9021b7e28085c4285596cdfcc3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 65, + "startColumn": 96, + "charOffset": 2168, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 96, + "charOffset": 2055, + "charLength": 3, + "snippet": { + "text": "\n\tif (protocol) {\n\t\tg_dispatcher().addEvent([protocol = protocol] { protocol->release(); }, \"Protocol::release\", std::chrono::milliseconds(CONNECTION_WRITE_TIMEOUT * 1000).count());\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0f9692661330baf7fab0c7e537cc766e9b6606b15f5e0c6bbdf4e41f3525bd6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 65, + "startColumn": 149, + "charOffset": 2221, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 149, + "charOffset": 2055, + "charLength": 4, + "snippet": { + "text": "\n\tif (protocol) {\n\t\tg_dispatcher().addEvent([protocol = protocol] { protocol->release(); }, \"Protocol::release\", std::chrono::milliseconds(CONNECTION_WRITE_TIMEOUT * 1000).count());\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bdaf7db2303812741d5d0892c819c6661f6bc5270dcea29190b0620c5558c475" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 79, + "startColumn": 13, + "charOffset": 2394, + "charLength": 6, + "snippet": { + "text": "cancel" + } + }, + "contextRegion": { + "startLine": 77, + "startColumn": 13, + "charOffset": 2374, + "charLength": 6, + "snippet": { + "text": "\n\ttry {\n\t\treadTimer.cancel();\n\t\twriteTimer.cancel();\n\t\tsocket.cancel();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13f5757c8f8c929a7434dd27f9029a3237810eaf138821f6ecab0e36935224aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 80, + "startColumn": 14, + "charOffset": 2417, + "charLength": 6, + "snippet": { + "text": "cancel" + } + }, + "contextRegion": { + "startLine": 78, + "startColumn": 14, + "charOffset": 2375, + "charLength": 6, + "snippet": { + "text": "\ttry {\n\t\treadTimer.cancel();\n\t\twriteTimer.cancel();\n\t\tsocket.cancel();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2603d8eee2dde0092f8a819523daa030fd727338031aade3b069712ff2aa1179" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-unused-return-value", + "ruleIndex": 117, + "kind": "fail", + "level": "warning", + "message": { + "text": "the value returned by this function should not be disregarded; neglecting it may lead to errors" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 84, + "startColumn": 3, + "charOffset": 2474, + "charLength": 6, + "snippet": { + "text": "socket" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 3, + "charOffset": 2446, + "charLength": 6, + "snippet": { + "text": "\n\t\tstd::error_code error;\n\t\tsocket.shutdown(asio::ip::tcp::socket::shutdown_both, error);\n\t\tif (error && error != asio::error::not_connected) {\n\t\t\tg_logger().error(\"[Connection::closeSocket] - Failed to shutdown socket: {}\", error.message());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "269ffb6352cd8a0dd3e281ed4873bbd373f783d4bfc1af699cad5c15e7a6091f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 84, + "startColumn": 10, + "charOffset": 2481, + "charLength": 8, + "snippet": { + "text": "shutdown" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 10, + "charOffset": 2446, + "charLength": 8, + "snippet": { + "text": "\n\t\tstd::error_code error;\n\t\tsocket.shutdown(asio::ip::tcp::socket::shutdown_both, error);\n\t\tif (error && error != asio::error::not_connected) {\n\t\t\tg_logger().error(\"[Connection::closeSocket] - Failed to shutdown socket: {}\", error.message());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0fca62f063d47b2d9e39711aa819247c7cdc07004c2920f646a1fa375b0d1e60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-unused-return-value", + "ruleIndex": 117, + "kind": "fail", + "level": "warning", + "message": { + "text": "the value returned by this function should not be disregarded; neglecting it may lead to errors" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 89, + "startColumn": 3, + "charOffset": 2696, + "charLength": 6, + "snippet": { + "text": "socket" + } + }, + "contextRegion": { + "startLine": 87, + "startColumn": 3, + "charOffset": 2689, + "charLength": 6, + "snippet": { + "text": "\t\t}\n\n\t\tsocket.close(error);\n\t\tif (error && error != asio::error::not_connected) {\n\t\t\tg_logger().error(\"[Connection::closeSocket] - Failed to close socket: {}\", error.message());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b555adbbc0829ed11443b42076f435736aaf35f3262170b5b4ef7fab632af7da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 89, + "startColumn": 10, + "charOffset": 2703, + "charLength": 5, + "snippet": { + "text": "close" + } + }, + "contextRegion": { + "startLine": 87, + "startColumn": 10, + "charOffset": 2689, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\n\t\tsocket.close(error);\n\t\tif (error && error != asio::error::not_connected) {\n\t\t\tg_logger().error(\"[Connection::closeSocket] - Failed to close socket: {}\", error.message());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d78d6500b4ea676ba2f7ce214db02cfa411a02f00f3c84918d704d2b6ca08a94" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 101, + "startColumn": 99, + "charOffset": 3235, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 99, + "startColumn": 99, + "charOffset": 3052, + "charLength": 3, + "snippet": { + "text": "\tconnectionState = CONNECTION_STATE_IDENTIFYING;\n\tprotocol = std::move(protocolPtr);\n\tg_dispatcher().addEvent([protocol = protocol] { protocol->onConnect(); }, \"Protocol::onConnect\", std::chrono::milliseconds(CONNECTION_WRITE_TIMEOUT * 1000).count());\n\n\tacceptInternal(false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6de92e9a603919a283268c4b7c4b4db018cf6138f0004d792be9076b865b81c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 101, + "startColumn": 152, + "charOffset": 3288, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 99, + "startColumn": 152, + "charOffset": 3052, + "charLength": 4, + "snippet": { + "text": "\tconnectionState = CONNECTION_STATE_IDENTIFYING;\n\tprotocol = std::move(protocolPtr);\n\tg_dispatcher().addEvent([protocol = protocol] { protocol->onConnect(); }, \"Protocol::onConnect\", std::chrono::milliseconds(CONNECTION_WRITE_TIMEOUT * 1000).count());\n\n\tacceptInternal(false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b76406b299d052f13bb53740a4fa1d16115fb58645c58376b010549ce51a30b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'acceptInternal' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 106, + "startColumn": 18, + "charOffset": 3349, + "charLength": 14, + "snippet": { + "text": "acceptInternal" + } + }, + "contextRegion": { + "startLine": 104, + "startColumn": 18, + "charOffset": 3329, + "charLength": 14, + "snippet": { + "text": "}\n\nvoid Connection::acceptInternal(bool toggleParseHeader) {\n\treadTimer.expires_from_now(std::chrono::seconds(CONNECTION_READ_TIMEOUT));\n\treadTimer.async_wait([self = std::weak_ptr(shared_from_this())](const std::error_code &error) { Connection::handleTimeout(self, error); });" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b44072b2071a804d107c29f0853f3584a276451ab77dc28b1b3666bea7a7c01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 107, + "startColumn": 12, + "charOffset": 3401, + "charLength": 16, + "snippet": { + "text": "expires_from_now" + } + }, + "contextRegion": { + "startLine": 105, + "startColumn": 12, + "charOffset": 3331, + "charLength": 16, + "snippet": { + "text": "\nvoid Connection::acceptInternal(bool toggleParseHeader) {\n\treadTimer.expires_from_now(std::chrono::seconds(CONNECTION_READ_TIMEOUT));\n\treadTimer.async_wait([self = std::weak_ptr(shared_from_this())](const std::error_code &error) { Connection::handleTimeout(self, error); });\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d48550d175826899af1492ce4f3763e0f8e5ea7ef31fbc0c7f5c746c19927c05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'operator()' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 111, + "startColumn": 74, + "charOffset": 3700, + "charLength": 1, + "snippet": { + "text": "[" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 74, + "charOffset": 3619, + "charLength": 1, + "snippet": { + "text": "\n\ttry {\n\t\tasio::async_read(socket, asio::buffer(msg.getBuffer(), HEADER_LENGTH), [self = shared_from_this(), toggleParseHeader](const std::error_code &error, std::size_t N) {\n\t\t\tif (toggleParseHeader) {\n\t\t\t\tself->parseHeader(error);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f893d1d830432c8fb2d6165e9a64b6963652ea0b0034cbd1b25b19e5b90af47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-unused-parameters", + "ruleIndex": 612, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'N' is unused" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 111, + "startColumn": 163, + "charOffset": 3789, + "charLength": 1, + "snippet": { + "text": "N" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 163, + "charOffset": 3619, + "charLength": 1, + "snippet": { + "text": "\n\ttry {\n\t\tasio::async_read(socket, asio::buffer(msg.getBuffer(), HEADER_LENGTH), [self = shared_from_this(), toggleParseHeader](const std::error_code &error, std::size_t N) {\n\t\t\tif (toggleParseHeader) {\n\t\t\t\tself->parseHeader(error);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ca0541c43abb7ef97a1ed9f47c0bfd0b1e19c66c066f1a035fef4388102af0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion '(unnamed enum at /data/project/src/server/server_definitions.hpp:14:1)' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 120, + "startColumn": 9, + "charOffset": 4058, + "charLength": 11, + "snippet": { + "text": "FORCE_CLOSE" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 9, + "charOffset": 3918, + "charLength": 11, + "snippet": { + "text": "\t} catch (const std::system_error &e) {\n\t\tg_logger().error(\"[Connection::acceptInternal] - Exception in async_read: {}\", e.what());\n\t\tclose(FORCE_CLOSE);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7b1dc5b038fad396a19686f3159ec3ef2d81a8c6815336fc136d830a1e556e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'parseProxyIdentification' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 123, + "startColumn": 18, + "charOffset": 4094, + "charLength": 24, + "snippet": { + "text": "parseProxyIdentification" + } + }, + "contextRegion": { + "startLine": 121, + "startColumn": 18, + "charOffset": 4072, + "charLength": 24, + "snippet": { + "text": "\t}\n}\nvoid Connection::parseProxyIdentification(const std::error_code &error) {\n\tstd::scoped_lock lock(connectionLock);\n\treadTimer.cancel();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "362cbdce5f58bbc05c15f69ed9f4a49dd71151c7ac79a0316b53aa7237472a61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 125, + "startColumn": 12, + "charOffset": 4202, + "charLength": 6, + "snippet": { + "text": "cancel" + } + }, + "contextRegion": { + "startLine": 123, + "startColumn": 12, + "charOffset": 4077, + "charLength": 6, + "snippet": { + "text": "void Connection::parseProxyIdentification(const std::error_code &error) {\n\tstd::scoped_lock lock(connectionLock);\n\treadTimer.cancel();\n\n\tif (error || connectionState == CONNECTION_STATE_CLOSED) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc0d28325922cb3199fdeecff610edda95e40624de5f638ea5b61ab1dc6d1b61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion '(unnamed enum at /data/project/src/server/server_definitions.hpp:14:1)' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 131, + "startColumn": 9, + "charOffset": 4502, + "charLength": 11, + "snippet": { + "text": "FORCE_CLOSE" + } + }, + "contextRegion": { + "startLine": 129, + "startColumn": 9, + "charOffset": 4393, + "charLength": 11, + "snippet": { + "text": "\t\t\tg_logger().error(\"[Connection::parseProxyIdentification] - Read error: {}\", error.message());\n\t\t}\n\t\tclose(FORCE_CLOSE);\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1cb45420f6c431a4772964bfe58651952d3e261936667c6241dec1eb67fc12f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto charData' can be declared as 'auto *charData'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 136, + "startColumn": 2, + "charOffset": 4570, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 2, + "charOffset": 4529, + "charLength": 4, + "snippet": { + "text": "\n\tuint8_t* msgBuffer = msg.getBuffer();\n\tauto charData = static_cast(static_cast(msgBuffer));\n\tstd::string serverName = g_configManager().getString(SERVER_NAME, __FUNCTION__) + \"\\n\";\n\tif (connectionState == CONNECTION_STATE_IDENTIFYING) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "175a6720da382fe461bb6603744ecfc9af7b0c8d3b97545558ad376394afb9c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-8", + "ruleIndex": 440, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-8: An object with integer type or pointer to void type shall not be converted to an object with pointer type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 136, + "startColumn": 18, + "charOffset": 4586, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 18, + "charOffset": 4529, + "charLength": 11, + "snippet": { + "text": "\n\tuint8_t* msgBuffer = msg.getBuffer();\n\tauto charData = static_cast(static_cast(msgBuffer));\n\tstd::string serverName = g_configManager().getString(SERVER_NAME, __FUNCTION__) + \"\\n\";\n\tif (connectionState == CONNECTION_STATE_IDENTIFYING) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "446cc32d91099bced6ca021427f1c845be14543f893b3144b672532658fe9d64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-casting-through-void", + "ruleIndex": 46, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not cast 'uint8_t *' (aka 'unsigned char *') to 'char *' through 'void *'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 136, + "startColumn": 37, + "charOffset": 4605, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 37, + "charOffset": 4529, + "charLength": 11, + "snippet": { + "text": "\n\tuint8_t* msgBuffer = msg.getBuffer();\n\tauto charData = static_cast(static_cast(msgBuffer));\n\tstd::string serverName = g_configManager().getString(SERVER_NAME, __FUNCTION__) + \"\\n\";\n\tif (connectionState == CONNECTION_STATE_IDENTIFYING) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1ce45c1bb17f5d6a77f4b4327bf6b0c5de5acbe5bbc886ef553b1417c9b27b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 138, + "startColumn": 2, + "charOffset": 4727, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 136, + "startColumn": 2, + "charOffset": 4569, + "charLength": 2, + "snippet": { + "text": "\tauto charData = static_cast(static_cast(msgBuffer));\n\tstd::string serverName = g_configManager().getString(SERVER_NAME, __FUNCTION__) + \"\\n\";\n\tif (connectionState == CONNECTION_STATE_IDENTIFYING) {\n\t\tif (msgBuffer[1] == 0x00 || strncasecmp(charData, &serverName[0], 2) != 0) {\n\t\t\t// Probably not proxy identification so let's try standard parsing method" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72b77a8a5a76a954bfb8dfd633388a061f2727b9df74aef049ab4f1a6c55a26d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 139, + "startColumn": 7, + "charOffset": 4788, + "charLength": 9, + "snippet": { + "text": "msgBuffer" + } + }, + "contextRegion": { + "startLine": 137, + "startColumn": 7, + "charOffset": 4637, + "charLength": 9, + "snippet": { + "text": "\tstd::string serverName = g_configManager().getString(SERVER_NAME, __FUNCTION__) + \"\\n\";\n\tif (connectionState == CONNECTION_STATE_IDENTIFYING) {\n\t\tif (msgBuffer[1] == 0x00 || strncasecmp(charData, &serverName[0], 2) != 0) {\n\t\t\t// Probably not proxy identification so let's try standard parsing method\n\t\t\tconnectionState = CONNECTION_STATE_OPEN;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "853d3c90fd5e02c59128128b62edb50be45bd409218897027d04737d9e000648" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-container-data-pointer", + "ruleIndex": 694, + "kind": "fail", + "level": "warning", + "message": { + "text": "'data' should be used for accessing the data pointer instead of taking the address of the 0-th element" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 139, + "startColumn": 53, + "charOffset": 4834, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 137, + "startColumn": 53, + "charOffset": 4637, + "charLength": 1, + "snippet": { + "text": "\tstd::string serverName = g_configManager().getString(SERVER_NAME, __FUNCTION__) + \"\\n\";\n\tif (connectionState == CONNECTION_STATE_IDENTIFYING) {\n\t\tif (msgBuffer[1] == 0x00 || strncasecmp(charData, &serverName[0], 2) != 0) {\n\t\t\t// Probably not proxy identification so let's try standard parsing method\n\t\t\tconnectionState = CONNECTION_STATE_OPEN;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d5aaf2faaa896342b76459f0b23331e7fdf768679e95235a916634d4ce560cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 144, + "startColumn": 5, + "charOffset": 5020, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 142, + "startColumn": 5, + "charOffset": 4982, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseHeader(error);\n\t\t\treturn;\n\t\t} else {\n\t\t\tsize_t remainder = serverName.length() - 2;\n\t\t\tif (remainder > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "945fd0c849faaef61b4304b8ee95a7541ae00644ac91320edbbf1a5a51070b6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 149, + "startColumn": 16, + "charOffset": 5172, + "charLength": 16, + "snippet": { + "text": "expires_from_now" + } + }, + "contextRegion": { + "startLine": 147, + "startColumn": 16, + "charOffset": 5098, + "charLength": 16, + "snippet": { + "text": "\t\t\t\tconnectionState = CONNECTION_STATE_READINGS;\n\t\t\t\ttry {\n\t\t\t\t\treadTimer.expires_from_now(std::chrono::seconds(CONNECTION_READ_TIMEOUT));\n\t\t\t\t\treadTimer.async_wait([self = std::weak_ptr(shared_from_this())](const std::error_code &error) { Connection::handleTimeout(self, error); });\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ed3f4dde3f02eafc2faa77114316cd89ec0e8a7ae7da3841bca250882440530" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'operator()' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 153, + "startColumn": 73, + "charOffset": 5518, + "charLength": 1, + "snippet": { + "text": "[" + } + }, + "contextRegion": { + "startLine": 151, + "startColumn": 73, + "charOffset": 5394, + "charLength": 1, + "snippet": { + "text": "\n\t\t\t\t\t// Read the remainder of proxy identification\n\t\t\t\t\tasio::async_read(socket, asio::buffer(msg.getBuffer(), remainder), [self = shared_from_this()](const std::error_code &error, std::size_t N) { self->parseProxyIdentification(error); });\n\t\t\t\t} catch (const std::system_error &e) {\n\t\t\t\t\tg_logger().error(\"Connection::parseProxyIdentification] - error: {}\", e.what());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd401a124863745119bf6513343a459e9a53a0a30d46461af685de60ba7b4772" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-unused-parameters", + "ruleIndex": 612, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'N' is unused" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 153, + "startColumn": 143, + "charOffset": 5588, + "charLength": 1, + "snippet": { + "text": "N" + } + }, + "contextRegion": { + "startLine": 151, + "startColumn": 143, + "charOffset": 5394, + "charLength": 1, + "snippet": { + "text": "\n\t\t\t\t\t// Read the remainder of proxy identification\n\t\t\t\t\tasio::async_read(socket, asio::buffer(msg.getBuffer(), remainder), [self = shared_from_this()](const std::error_code &error, std::size_t N) { self->parseProxyIdentification(error); });\n\t\t\t\t} catch (const std::system_error &e) {\n\t\t\t\t\tg_logger().error(\"Connection::parseProxyIdentification] - error: {}\", e.what());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9366b03c56bc040c017002893c1559177c5c1418ae8b52d1fdeac5193351f2c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion '(unnamed enum at /data/project/src/server/server_definitions.hpp:14:1)' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 156, + "startColumn": 12, + "charOffset": 5776, + "charLength": 11, + "snippet": { + "text": "FORCE_CLOSE" + } + }, + "contextRegion": { + "startLine": 154, + "startColumn": 12, + "charOffset": 5636, + "charLength": 11, + "snippet": { + "text": "\t\t\t\t} catch (const std::system_error &e) {\n\t\t\t\t\tg_logger().error(\"Connection::parseProxyIdentification] - error: {}\", e.what());\n\t\t\t\t\tclose(FORCE_CLOSE);\n\t\t\t\t}\n\t\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f5fbf6324b27d998aa6275cf01b227e3b299237eb771a2e52c8dbc8e0985ac7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 159, + "startColumn": 6, + "charOffset": 5813, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 157, + "startColumn": 6, + "charOffset": 5790, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tconnectionState = CONNECTION_STATE_OPEN;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d716317df859a83aea942d364abbe5c349675c03b003cf7c577a048ebf3810e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion '(unnamed enum at /data/project/src/server/server_definitions.hpp:14:1)' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 169, + "startColumn": 10, + "charOffset": 6213, + "charLength": 11, + "snippet": { + "text": "FORCE_CLOSE" + } + }, + "contextRegion": { + "startLine": 167, + "startColumn": 10, + "charOffset": 6087, + "charLength": 11, + "snippet": { + "text": "\t\t} else {\n\t\t\tg_logger().error(\"Connection::parseProxyIdentification] Invalid Client Login! Server Name mismatch!\");\n\t\t\tclose(FORCE_CLOSE);\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2687c2ee521dd7bff2416eb44b0259bb95edb0dac3c2ee64e1e7878b1b209c20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'parseHeader' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 177, + "startColumn": 18, + "charOffset": 6289, + "charLength": 11, + "snippet": { + "text": "parseHeader" + } + }, + "contextRegion": { + "startLine": 175, + "startColumn": 18, + "charOffset": 6269, + "charLength": 11, + "snippet": { + "text": "}\n\nvoid Connection::parseHeader(const std::error_code &error) {\n\tstd::scoped_lock lock(connectionLock);\n\treadTimer.cancel();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a70185892bc0f6cf1988d9a7c4962b9dabdf24e9acf4dff13757f4862020e63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 179, + "startColumn": 12, + "charOffset": 6384, + "charLength": 6, + "snippet": { + "text": "cancel" + } + }, + "contextRegion": { + "startLine": 177, + "startColumn": 12, + "charOffset": 6272, + "charLength": 6, + "snippet": { + "text": "void Connection::parseHeader(const std::error_code &error) {\n\tstd::scoped_lock lock(connectionLock);\n\treadTimer.cancel();\n\n\tif (error) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a63bf9d7d166f19a98ecf3f42f8802155d85b975e79eb41ef24009fa8cf17d9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 181, + "startColumn": 2, + "charOffset": 6396, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 179, + "startColumn": 2, + "charOffset": 6373, + "charLength": 2, + "snippet": { + "text": "\treadTimer.cancel();\n\n\tif (error) {\n\t\tif (error != asio::error::operation_aborted && error != asio::error::eof && error != asio::error::connection_reset) {\n\t\t\tg_logger().debug(\"[Connection::parseHeader] - Read error: {}\", error.message());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9eeb1719640be8e786ce6399c4fca6591bde89d35eeb5515722d2d6550b686b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion '(unnamed enum at /data/project/src/server/server_definitions.hpp:14:1)' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 185, + "startColumn": 9, + "charOffset": 6625, + "charLength": 11, + "snippet": { + "text": "FORCE_CLOSE" + } + }, + "contextRegion": { + "startLine": 183, + "startColumn": 9, + "charOffset": 6529, + "charLength": 11, + "snippet": { + "text": "\t\t\tg_logger().debug(\"[Connection::parseHeader] - Read error: {}\", error.message());\n\t\t}\n\t\tclose(FORCE_CLOSE);\n\t\treturn;\n\t} else if (connectionState == CONNECTION_STATE_CLOSED) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2284173576046688f8b31c2769b0dc3c5d8465e1a362dd23868e442900c68174" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 187, + "startColumn": 4, + "charOffset": 6652, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 185, + "startColumn": 4, + "charOffset": 6617, + "charLength": 4, + "snippet": { + "text": "\t\tclose(FORCE_CLOSE);\n\t\treturn;\n\t} else if (connectionState == CONNECTION_STATE_CLOSED) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a801b57fc1b32120c51b2c7391eafbe9e310b9c825bbad9b9e3ca090d56fd11f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 191, + "startColumn": 46, + "charOffset": 6766, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 189, + "startColumn": 46, + "charOffset": 6717, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tuint32_t timePassed = std::max(1, (time(nullptr) - timeConnected) + 1);\n\tif ((++packetsSent / timePassed) > static_cast(g_configManager().getNumber(MAX_PACKETS_PER_SECOND, __FUNCTION__))) {\n\t\tg_logger().warn(\"[Connection::parseHeader] - {} disconnected for exceeding packet per second limit.\", convertIPToString(getIP()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e512298f814dc66750162fef8085d67c77fe044cf0c9ea9246de5c44faf3989c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 191, + "startColumn": 47, + "charOffset": 6767, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 189, + "startColumn": 47, + "charOffset": 6717, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tuint32_t timePassed = std::max(1, (time(nullptr) - timeConnected) + 1);\n\tif ((++packetsSent / timePassed) > static_cast(g_configManager().getNumber(MAX_PACKETS_PER_SECOND, __FUNCTION__))) {\n\t\tg_logger().warn(\"[Connection::parseHeader] - {} disconnected for exceeding packet per second limit.\", convertIPToString(getIP()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03837cd8e79fa7b820933b69e7bf4502663dc8442276955df00b1c5193f51a02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-10", + "ruleIndex": 433, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-10: The increment (++) and decrement (--) operators should not be mixed with other operators in an expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 192, + "startColumn": 7, + "charOffset": 6810, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 190, + "startColumn": 7, + "charOffset": 6720, + "charLength": 2, + "snippet": { + "text": "\n\tuint32_t timePassed = std::max(1, (time(nullptr) - timeConnected) + 1);\n\tif ((++packetsSent / timePassed) > static_cast(g_configManager().getNumber(MAX_PACKETS_PER_SECOND, __FUNCTION__))) {\n\t\tg_logger().warn(\"[Connection::parseHeader] - {} disconnected for exceeding packet per second limit.\", convertIPToString(getIP()));\n\t\tclose();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14c0918add28192fbb8cf9ab06131feb0f7551ec5c56957268b87cc5ccb2d324" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 199, + "startColumn": 19, + "charOffset": 7131, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 197, + "startColumn": 19, + "charOffset": 7089, + "charLength": 4, + "snippet": { + "text": "\n\tif (timePassed > 2) {\n\t\ttimeConnected = time(nullptr);\n\t\tpacketsSent = 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a129621f5c249d7944d612fbee267bc36a0e54db39a7847247cd10c00d8fb721" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion '(unnamed enum at /data/project/src/server/server_definitions.hpp:14:1)' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 205, + "startColumn": 9, + "charOffset": 7266, + "charLength": 11, + "snippet": { + "text": "FORCE_CLOSE" + } + }, + "contextRegion": { + "startLine": 203, + "startColumn": 9, + "charOffset": 7169, + "charLength": 11, + "snippet": { + "text": "\tuint16_t size = msg.getLengthHeader();\n\tif (size == 0 || size > INPUTMESSAGE_MAXSIZE) {\n\t\tclose(FORCE_CLOSE);\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78d688db2101d63c82c94f65138cd3ad7303d060956f02618ca782de07fd361e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 210, + "startColumn": 13, + "charOffset": 7313, + "charLength": 16, + "snippet": { + "text": "expires_from_now" + } + }, + "contextRegion": { + "startLine": 208, + "startColumn": 13, + "charOffset": 7293, + "charLength": 16, + "snippet": { + "text": "\n\ttry {\n\t\treadTimer.expires_from_now(std::chrono::seconds(CONNECTION_READ_TIMEOUT));\n\t\treadTimer.async_wait([self = std::weak_ptr(shared_from_this())](const std::error_code &error) { Connection::handleTimeout(self, error); });\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fecb97aadc42f3d2e99e41a4d3e9a3fe1795728360f3b1e1da7399e0d8d0fae3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 214, + "startColumn": 17, + "charOffset": 7574, + "charLength": 4, + "snippet": { + "text": "size" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 17, + "charOffset": 7532, + "charLength": 4, + "snippet": { + "text": "\n\t\t// Read packet content\n\t\tmsg.setLength(size + HEADER_LENGTH);\n\t\t// Read the remainder of proxy identification\n\t\tasio::async_read(socket, asio::buffer(msg.getBodyBuffer(), size), [self = shared_from_this()](const std::error_code &error, std::size_t N) { self->parsePacket(error); });" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24dce069f9457da7e0bd32d43d49b6f3b03f72ee8cfa32d2300715a4fe36a6d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 214, + "startColumn": 22, + "charOffset": 7579, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 22, + "charOffset": 7532, + "charLength": 1, + "snippet": { + "text": "\n\t\t// Read packet content\n\t\tmsg.setLength(size + HEADER_LENGTH);\n\t\t// Read the remainder of proxy identification\n\t\tasio::async_read(socket, asio::buffer(msg.getBodyBuffer(), size), [self = shared_from_this()](const std::error_code &error, std::size_t N) { self->parsePacket(error); });" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "600a6eb2cd9c3699831ecef3b448cf5314f8c1ff18f51dad104bdfc59d01624d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'operator()' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 216, + "startColumn": 69, + "charOffset": 7713, + "charLength": 1, + "snippet": { + "text": "[" + } + }, + "contextRegion": { + "startLine": 214, + "startColumn": 69, + "charOffset": 7558, + "charLength": 1, + "snippet": { + "text": "\t\tmsg.setLength(size + HEADER_LENGTH);\n\t\t// Read the remainder of proxy identification\n\t\tasio::async_read(socket, asio::buffer(msg.getBodyBuffer(), size), [self = shared_from_this()](const std::error_code &error, std::size_t N) { self->parsePacket(error); });\n\t} catch (const std::system_error &e) {\n\t\tg_logger().error(\"[Connection::parseHeader] - error: {}\", e.what());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6dd3627ebbe000c4d9e291191a0d84e3420611f030a83766775b658de748e718" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-unused-parameters", + "ruleIndex": 612, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'N' is unused" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 216, + "startColumn": 139, + "charOffset": 7783, + "charLength": 1, + "snippet": { + "text": "N" + } + }, + "contextRegion": { + "startLine": 214, + "startColumn": 139, + "charOffset": 7558, + "charLength": 1, + "snippet": { + "text": "\t\tmsg.setLength(size + HEADER_LENGTH);\n\t\t// Read the remainder of proxy identification\n\t\tasio::async_read(socket, asio::buffer(msg.getBodyBuffer(), size), [self = shared_from_this()](const std::error_code &error, std::size_t N) { self->parsePacket(error); });\n\t} catch (const std::system_error &e) {\n\t\tg_logger().error(\"[Connection::parseHeader] - error: {}\", e.what());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36ce36082e3666d488befe19e0c8e6ce830b65f4af668f0b1cfcf1c4dc6f6722" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion '(unnamed enum at /data/project/src/server/server_definitions.hpp:14:1)' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 219, + "startColumn": 9, + "charOffset": 7937, + "charLength": 11, + "snippet": { + "text": "FORCE_CLOSE" + } + }, + "contextRegion": { + "startLine": 217, + "startColumn": 9, + "charOffset": 7818, + "charLength": 11, + "snippet": { + "text": "\t} catch (const std::system_error &e) {\n\t\tg_logger().error(\"[Connection::parseHeader] - error: {}\", e.what());\n\t\tclose(FORCE_CLOSE);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23641c1e2b9b8c4dbbd19ade74a9e9592b11c0b2ff365351686d072ef39aa808" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'parsePacket' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 223, + "startColumn": 18, + "charOffset": 7974, + "charLength": 11, + "snippet": { + "text": "parsePacket" + } + }, + "contextRegion": { + "startLine": 221, + "startColumn": 18, + "charOffset": 7954, + "charLength": 11, + "snippet": { + "text": "}\n\nvoid Connection::parsePacket(const std::error_code &error) {\n\tstd::scoped_lock lock(connectionLock);\n\treadTimer.cancel();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "576750681550d1074c30be3c82711b1d19b82f635a81302233e4eb3275545356" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 225, + "startColumn": 12, + "charOffset": 8069, + "charLength": 6, + "snippet": { + "text": "cancel" + } + }, + "contextRegion": { + "startLine": 223, + "startColumn": 12, + "charOffset": 7957, + "charLength": 6, + "snippet": { + "text": "void Connection::parsePacket(const std::error_code &error) {\n\tstd::scoped_lock lock(connectionLock);\n\treadTimer.cancel();\n\n\tif (error || connectionState == CONNECTION_STATE_CLOSED) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c58ed0e042d7a5225b634a6e0edc0a62f048476db96e458ff654c1a9f718ae1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion '(unnamed enum at /data/project/src/server/server_definitions.hpp:14:1)' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 231, + "startColumn": 9, + "charOffset": 8251, + "charLength": 11, + "snippet": { + "text": "FORCE_CLOSE" + } + }, + "contextRegion": { + "startLine": 229, + "startColumn": 9, + "charOffset": 8155, + "charLength": 11, + "snippet": { + "text": "\t\t\tg_logger().error(\"[Connection::parsePacket] - Read error: {}\", error.message());\n\t\t}\n\t\tclose(FORCE_CLOSE);\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3581a97608823ab4ffb8d67039b963f2226b09a7e97b4e792d5cdd549fd28725" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 240, + "startColumn": 7, + "charOffset": 8398, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 238, + "startColumn": 7, + "charOffset": 8367, + "charLength": 1, + "snippet": { + "text": "\t\treceivedFirst = true;\n\n\t\tif (!protocol) {\n\t\t\t// Check packet checksum\n\t\t\tuint32_t checksum;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2751d6dfe41f8e5d4e57af15782bccce231c3ec3dfe36bf3dfb73c8a7469ca21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'checksum' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 242, + "startColumn": 13, + "charOffset": 8451, + "charLength": 8, + "snippet": { + "text": "checksum" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 13, + "charOffset": 8392, + "charLength": 8, + "snippet": { + "text": "\t\tif (!protocol) {\n\t\t\t// Check packet checksum\n\t\t\tuint32_t checksum;\n\t\t\tif (int32_t len = msg.getLength() - msg.getBufferPosition() - CHECKSUM_LENGTH;\n\t\t\t len > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "893f0b0988003315bb056521da2839d1d95cc07f8293e26410b3af86d2247848" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 243, + "startColumn": 64, + "charOffset": 8524, + "charLength": 1, + "snippet": { + "text": "-" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 64, + "charOffset": 8411, + "charLength": 1, + "snippet": { + "text": "\t\t\t// Check packet checksum\n\t\t\tuint32_t checksum;\n\t\t\tif (int32_t len = msg.getLength() - msg.getBufferPosition() - CHECKSUM_LENGTH;\n\t\t\t len > 0) {\n\t\t\t\tchecksum = adlerChecksum(msg.getBuffer() + msg.getBufferPosition() + CHECKSUM_LENGTH, len);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c5a3119b8db75671e5460c08ddbd88197bb8ccfb73be4d335e4c9a25def38b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 245, + "startColumn": 46, + "charOffset": 8606, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 243, + "startColumn": 46, + "charOffset": 8461, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (int32_t len = msg.getLength() - msg.getBufferPosition() - CHECKSUM_LENGTH;\n\t\t\t len > 0) {\n\t\t\t\tchecksum = adlerChecksum(msg.getBuffer() + msg.getBufferPosition() + CHECKSUM_LENGTH, len);\n\t\t\t} else {\n\t\t\t\tchecksum = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96ce227ab0f1b356dcc2a53aa093244ff230e53b8cd3e5c7a73158e66884f010" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 245, + "startColumn": 72, + "charOffset": 8632, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 243, + "startColumn": 72, + "charOffset": 8461, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (int32_t len = msg.getLength() - msg.getBufferPosition() - CHECKSUM_LENGTH;\n\t\t\t len > 0) {\n\t\t\t\tchecksum = adlerChecksum(msg.getBuffer() + msg.getBufferPosition() + CHECKSUM_LENGTH, len);\n\t\t\t} else {\n\t\t\t\tchecksum = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6bd18158c20e750e47ce285dd90ba9a5b51ba842a24506d3e47e557afe036bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 245, + "startColumn": 72, + "charOffset": 8632, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 243, + "startColumn": 72, + "charOffset": 8461, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (int32_t len = msg.getLength() - msg.getBufferPosition() - CHECKSUM_LENGTH;\n\t\t\t len > 0) {\n\t\t\t\tchecksum = adlerChecksum(msg.getBuffer() + msg.getBufferPosition() + CHECKSUM_LENGTH, len);\n\t\t\t} else {\n\t\t\t\tchecksum = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31cef6d36fbf8a23868e306c1fbbef5a5f63314fff15b5bbd57ec216d68e6618" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 250, + "startColumn": 4, + "charOffset": 8696, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 248, + "startColumn": 4, + "charOffset": 8687, + "charLength": 8, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tuint32_t recvChecksum = msg.get();\n\t\t\tif (recvChecksum != checksum) {\n\t\t\t\t// it might not have been the checksum, step back" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b5badd5868c66b5b7dd0650b25ec1bf1103017f2796f25653062a47bbfc2541" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 253, + "startColumn": 19, + "charOffset": 8848, + "charLength": 1, + "snippet": { + "text": "-" + } + }, + "contextRegion": { + "startLine": 251, + "startColumn": 19, + "charOffset": 8741, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (recvChecksum != checksum) {\n\t\t\t\t// it might not have been the checksum, step back\n\t\t\t\tmsg.skipBytes(-CHECKSUM_LENGTH);\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c33439a554fed25b483feaa30fe309b1daa27f8926991b555697904573c80b1c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 253, + "startColumn": 19, + "charOffset": 8848, + "charLength": 1, + "snippet": { + "text": "-" + } + }, + "contextRegion": { + "startLine": 251, + "startColumn": 19, + "charOffset": 8741, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (recvChecksum != checksum) {\n\t\t\t\t// it might not have been the checksum, step back\n\t\t\t\tmsg.skipBytes(-CHECKSUM_LENGTH);\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b9f989e7b9c4f3faf5ac7032d5ca05c27278167980c6f641a9094fc03aa2302" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-2", + "ruleIndex": 443, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-2: The unary minus operator shall not be applied to an expression whose underlying type is unsigned" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 253, + "startColumn": 19, + "charOffset": 8848, + "charLength": 1, + "snippet": { + "text": "-" + } + }, + "contextRegion": { + "startLine": 251, + "startColumn": 19, + "charOffset": 8741, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (recvChecksum != checksum) {\n\t\t\t\t// it might not have been the checksum, step back\n\t\t\t\tmsg.skipBytes(-CHECKSUM_LENGTH);\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5b61940f4efe9832deb540c02af83513c72d2cae755424f99c9592ab1033651" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 258, + "startColumn": 8, + "charOffset": 9033, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 256, + "startColumn": 8, + "charOffset": 8873, + "charLength": 1, + "snippet": { + "text": "\t\t\t// Game protocol has already been created at this point\n\t\t\tprotocol = service_port->make_protocol(recvChecksum == checksum, msg, shared_from_this());\n\t\t\tif (!protocol) {\n\t\t\t\tclose(FORCE_CLOSE);\n\t\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62f2f8c2485c35a6e93e636fcdfb4710cfa6fbc334a31fba9163be7d6c3d567c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion '(unnamed enum at /data/project/src/server/server_definitions.hpp:14:1)' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 259, + "startColumn": 11, + "charOffset": 9056, + "charLength": 11, + "snippet": { + "text": "FORCE_CLOSE" + } + }, + "contextRegion": { + "startLine": 257, + "startColumn": 11, + "charOffset": 8932, + "charLength": 11, + "snippet": { + "text": "\t\t\tprotocol = service_port->make_protocol(recvChecksum == checksum, msg, shared_from_this());\n\t\t\tif (!protocol) {\n\t\t\t\tclose(FORCE_CLOSE);\n\t\t\t\treturn;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2087df495bea900155c2fff7df34dc79b04b15606aa21d3cf6112bf869260c2a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 265, + "startColumn": 8, + "charOffset": 9313, + "charLength": 3, + "snippet": { + "text": "get" + } + }, + "contextRegion": { + "startLine": 263, + "startColumn": 8, + "charOffset": 9098, + "charLength": 3, + "snippet": { + "text": "\t\t\t// It is rather hard to detect if we have checksum or sequence method here so let's skip checksum check\n\t\t\t// it doesn't generate any problem because olders protocol don't use 'server sends first' feature\n\t\t\tmsg.get();\n\t\t\t// Skip protocol ID\n\t\t\tmsg.skipBytes(1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b571af9fe4b91aef3da674aced4bcdee02777de4e06d1d7c8fa04e0e7653eae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 277, + "startColumn": 13, + "charOffset": 9550, + "charLength": 16, + "snippet": { + "text": "expires_from_now" + } + }, + "contextRegion": { + "startLine": 275, + "startColumn": 13, + "charOffset": 9530, + "charLength": 16, + "snippet": { + "text": "\n\ttry {\n\t\treadTimer.expires_from_now(std::chrono::seconds(CONNECTION_READ_TIMEOUT));\n\t\treadTimer.async_wait([self = std::weak_ptr(shared_from_this())](const std::error_code &error) { Connection::handleTimeout(self, error); });\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88767888bf03d6b6e4f216879e56aa49dc3bf2743039382f3d1455c8bcc6cfba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'operator()' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 282, + "startColumn": 75, + "charOffset": 9906, + "charLength": 1, + "snippet": { + "text": "[" + } + }, + "contextRegion": { + "startLine": 280, + "startColumn": 75, + "charOffset": 9770, + "charLength": 1, + "snippet": { + "text": "\t\tif (!skipReadingNextPacket) {\n\t\t\t// Wait to the next packet\n\t\t\tasio::async_read(socket, asio::buffer(msg.getBuffer(), HEADER_LENGTH), [self = shared_from_this()](const std::error_code &error, std::size_t N) { self->parseHeader(error); });\n\t\t}\n\t} catch (const std::system_error &e) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f1a2d94c4427a4ac8ba12a930cc5eaf343ad13a1010d3a9b315af9f23e743ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-unused-parameters", + "ruleIndex": 612, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'N' is unused" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 282, + "startColumn": 145, + "charOffset": 9976, + "charLength": 1, + "snippet": { + "text": "N" + } + }, + "contextRegion": { + "startLine": 280, + "startColumn": 145, + "charOffset": 9770, + "charLength": 1, + "snippet": { + "text": "\t\tif (!skipReadingNextPacket) {\n\t\t\t// Wait to the next packet\n\t\t\tasio::async_read(socket, asio::buffer(msg.getBuffer(), HEADER_LENGTH), [self = shared_from_this()](const std::error_code &error, std::size_t N) { self->parseHeader(error); });\n\t\t}\n\t} catch (const std::system_error &e) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac289b0f90e4fc4296060e74e41456f20ddabb0c2d5d5c7dfaf0a0f43a44ff05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion '(unnamed enum at /data/project/src/server/server_definitions.hpp:14:1)' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 286, + "startColumn": 9, + "charOffset": 10134, + "charLength": 11, + "snippet": { + "text": "FORCE_CLOSE" + } + }, + "contextRegion": { + "startLine": 284, + "startColumn": 9, + "charOffset": 10015, + "charLength": 11, + "snippet": { + "text": "\t} catch (const std::system_error &e) {\n\t\tg_logger().error(\"[Connection::parsePacket] - error: {}\", e.what());\n\t\tclose(FORCE_CLOSE);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1cb45420f6c431a4772964bfe58651952d3e261936667c6241dec1eb67fc12f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 291, + "startColumn": 12, + "charOffset": 10197, + "charLength": 16, + "snippet": { + "text": "expires_from_now" + } + }, + "contextRegion": { + "startLine": 289, + "startColumn": 12, + "charOffset": 10153, + "charLength": 16, + "snippet": { + "text": "\nvoid Connection::resumeWork() {\n\treadTimer.expires_from_now(std::chrono::seconds(CONNECTION_READ_TIMEOUT));\n\treadTimer.async_wait([self = std::weak_ptr(shared_from_this())](const std::error_code &error) { Connection::handleTimeout(self, error); });\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6ea8c6491669ef984a06601585cb4e6bef993bc1d94b19bd3a7eeccb1440db9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-unused-parameters", + "ruleIndex": 612, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'N' is unused" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 295, + "startColumn": 144, + "charOffset": 10566, + "charLength": 1, + "snippet": { + "text": "N" + } + }, + "contextRegion": { + "startLine": 293, + "startColumn": 144, + "charOffset": 10415, + "charLength": 1, + "snippet": { + "text": "\n\ttry {\n\t\tasio::async_read(socket, asio::buffer(msg.getBuffer(), HEADER_LENGTH), [self = shared_from_this()](const std::error_code &error, std::size_t N) { self->parseHeader(error); });\n\t} catch (const std::system_error &e) {\n\t\tg_logger().error(\"[Connection::resumeWork] - Exception in async_read: {}\", e.what());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89348e1c6c88822eaf27e539ffbbe5233c968cdc9cde3d5f7d6d83ab5af9cc53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion '(unnamed enum at /data/project/src/server/server_definitions.hpp:14:1)' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 298, + "startColumn": 9, + "charOffset": 10737, + "charLength": 11, + "snippet": { + "text": "FORCE_CLOSE" + } + }, + "contextRegion": { + "startLine": 296, + "startColumn": 9, + "charOffset": 10601, + "charLength": 11, + "snippet": { + "text": "\t} catch (const std::system_error &e) {\n\t\tg_logger().error(\"[Connection::resumeWork] - Exception in async_read: {}\", e.what());\n\t\tclose(FORCE_CLOSE);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1609e5448f5f1aa66e450189d61eefb69e1f14dc326dff24c65f683ac0c28ef6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 309, + "startColumn": 15, + "charOffset": 10985, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 307, + "startColumn": 15, + "charOffset": 10925, + "charLength": 12, + "snippet": { + "text": "\n\tbool noPendingWrite = messageQueue.empty();\n\tmessageQueue.emplace_back(outputMessage);\n\n\tif (noPendingWrite) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63738806c6da85e9858e1a587258c21adced117c5d316c8a34491dc5008a800f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion '(unnamed enum at /data/project/src/server/server_definitions.hpp:14:1)' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 317, + "startColumn": 11, + "charOffset": 11318, + "charLength": 11, + "snippet": { + "text": "FORCE_CLOSE" + } + }, + "contextRegion": { + "startLine": 315, + "startColumn": 11, + "charOffset": 11169, + "charLength": 11, + "snippet": { + "text": "\t\t\t} catch (const std::system_error &e) {\n\t\t\t\tg_logger().error(\"[Connection::send] - Exception in posting write operation: {}\", e.what());\n\t\t\t\tclose(FORCE_CLOSE);\n\t\t\t}\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f11df69c35e314cdaec3579a97fcd9a00295d4713cc15c19a96b14775a1599a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion '(unnamed enum at /data/project/src/server/server_definitions.hpp:14:1)' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 321, + "startColumn": 10, + "charOffset": 11434, + "charLength": 11, + "snippet": { + "text": "FORCE_CLOSE" + } + }, + "contextRegion": { + "startLine": 319, + "startColumn": 10, + "charOffset": 11337, + "charLength": 11, + "snippet": { + "text": "\t\t} else {\n\t\t\tg_logger().error(\"[Connection::send] - Socket is not open for writing.\");\n\t\t\tclose(FORCE_CLOSE);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "460e9e3d096379c05c21c4a49e2c02f9f4eaf21803bc2e6db0d8905f691d3865" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'internalSend' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 359, + "startColumn": 18, + "charOffset": 12214, + "charLength": 12, + "snippet": { + "text": "internalSend" + } + }, + "contextRegion": { + "startLine": 357, + "startColumn": 18, + "charOffset": 12194, + "charLength": 12, + "snippet": { + "text": "}\n\nvoid Connection::internalSend(const OutputMessage_ptr &outputMessage) {\n\twriteTimer.expires_from_now(std::chrono::seconds(CONNECTION_WRITE_TIMEOUT));\n\twriteTimer.async_wait([self = std::weak_ptr(shared_from_this())](const std::error_code &error) { Connection::handleTimeout(self, error); });" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca7551723d6785a085f41452a82b66b1afe11a7cb66df5257af52276a4897213" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 360, + "startColumn": 13, + "charOffset": 12281, + "charLength": 16, + "snippet": { + "text": "expires_from_now" + } + }, + "contextRegion": { + "startLine": 358, + "startColumn": 13, + "charOffset": 12196, + "charLength": 16, + "snippet": { + "text": "\nvoid Connection::internalSend(const OutputMessage_ptr &outputMessage) {\n\twriteTimer.expires_from_now(std::chrono::seconds(CONNECTION_WRITE_TIMEOUT));\n\twriteTimer.async_wait([self = std::weak_ptr(shared_from_this())](const std::error_code &error) { Connection::handleTimeout(self, error); });\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9961a8cdb3d0343f5923974d2e6afece6db034372c07b1136b89b4b2d9759e74" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'operator()' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 364, + "startColumn": 105, + "charOffset": 12613, + "charLength": 1, + "snippet": { + "text": "[" + } + }, + "contextRegion": { + "startLine": 362, + "startColumn": 105, + "charOffset": 12501, + "charLength": 1, + "snippet": { + "text": "\n\ttry {\n\t\tasio::async_write(socket, asio::buffer(outputMessage->getOutputBuffer(), outputMessage->getLength()), [self = shared_from_this()](const std::error_code &error, std::size_t N) { self->onWriteOperation(error); });\n\t} catch (const std::system_error &e) {\n\t\tg_logger().error(\"[Connection::internalSend] - Exception in async_write: {}\", e.what());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61ed4173dfb79b320e9858ca0794e9108ea79be91766a424b3c949ad07bdee60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-unused-parameters", + "ruleIndex": 612, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'N' is unused" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 364, + "startColumn": 175, + "charOffset": 12683, + "charLength": 1, + "snippet": { + "text": "N" + } + }, + "contextRegion": { + "startLine": 362, + "startColumn": 175, + "charOffset": 12501, + "charLength": 1, + "snippet": { + "text": "\n\ttry {\n\t\tasio::async_write(socket, asio::buffer(outputMessage->getOutputBuffer(), outputMessage->getLength()), [self = shared_from_this()](const std::error_code &error, std::size_t N) { self->onWriteOperation(error); });\n\t} catch (const std::system_error &e) {\n\t\tg_logger().error(\"[Connection::internalSend] - Exception in async_write: {}\", e.what());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c811527c3ec2c1a34a131fb6da803c58099e1a6a3057c703ec96320c935bf576" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion '(unnamed enum at /data/project/src/server/server_definitions.hpp:14:1)' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 367, + "startColumn": 9, + "charOffset": 12862, + "charLength": 11, + "snippet": { + "text": "FORCE_CLOSE" + } + }, + "contextRegion": { + "startLine": 365, + "startColumn": 9, + "charOffset": 12723, + "charLength": 11, + "snippet": { + "text": "\t} catch (const std::system_error &e) {\n\t\tg_logger().error(\"[Connection::internalSend] - Exception in async_write: {}\", e.what());\n\t\tclose(FORCE_CLOSE);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c82f9316f91c7d5a72da060beca0fb135c57589ea2375fd4abfac7e3f3d32406" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'onWriteOperation' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 371, + "startColumn": 18, + "charOffset": 12899, + "charLength": 16, + "snippet": { + "text": "onWriteOperation" + } + }, + "contextRegion": { + "startLine": 369, + "startColumn": 18, + "charOffset": 12879, + "charLength": 16, + "snippet": { + "text": "}\n\nvoid Connection::onWriteOperation(const std::error_code &error) {\n\tstd::unique_lock lock(connectionLock);\n\twriteTimer.cancel();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1bd59fe057736064dfe4e3663db17059c71b35790d78e1dc30283e74b23defc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 373, + "startColumn": 13, + "charOffset": 13000, + "charLength": 6, + "snippet": { + "text": "cancel" + } + }, + "contextRegion": { + "startLine": 371, + "startColumn": 13, + "charOffset": 12882, + "charLength": 6, + "snippet": { + "text": "void Connection::onWriteOperation(const std::error_code &error) {\n\tstd::unique_lock lock(connectionLock);\n\twriteTimer.cancel();\n\n\tif (error) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47365465aa160d43cd5a4845f7dfd96a95581c8390071c9dbc7c74c5903f5319" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion '(unnamed enum at /data/project/src/server/server_definitions.hpp:14:1)' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 378, + "startColumn": 9, + "charOffset": 13146, + "charLength": 11, + "snippet": { + "text": "FORCE_CLOSE" + } + }, + "contextRegion": { + "startLine": 376, + "startColumn": 9, + "charOffset": 13025, + "charLength": 11, + "snippet": { + "text": "\t\tg_logger().error(\"[Connection::onWriteOperation] - Write error: {}\", error.message());\n\t\tmessageQueue.clear();\n\t\tclose(FORCE_CLOSE);\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aeeba4b5931c07bf60bada7cbed2c4bb7cb36f84f6b845ef116ff5b14624e156" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 384, + "startColumn": 2, + "charOffset": 13203, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 382, + "startColumn": 2, + "charOffset": 13174, + "charLength": 2, + "snippet": { + "text": "\tmessageQueue.pop_front();\n\n\tif (!messageQueue.empty()) {\n\t\tconst auto &outputMessage = messageQueue.front();\n\t\tlock.unlock();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a0c713bc49f94becf9824cb8be6f06728c6a6e38a36d37472d4fc27a738933d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'connectionWeak' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 395, + "startColumn": 51, + "charOffset": 13520, + "charLength": 14, + "snippet": { + "text": "connectionWeak" + } + }, + "contextRegion": { + "startLine": 393, + "startColumn": 51, + "charOffset": 13467, + "charLength": 14, + "snippet": { + "text": "}\n\nvoid Connection::handleTimeout(ConnectionWeak_ptr connectionWeak, const std::error_code &error) {\n\tif (error == asio::error::operation_aborted) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1585e3940f79395fe4e3fa09177c60f7bec35a801a6ceb117020587a474a443" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 401, + "startColumn": 7, + "charOffset": 13684, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 399, + "startColumn": 7, + "charOffset": 13629, + "charLength": 1, + "snippet": { + "text": "\n\tif (auto connection = connectionWeak.lock()) {\n\t\tif (!error) {\n\t\t\tg_logger().debug(\"Connection Timeout, IP: {}\", convertIPToString(connection->getIP()));\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "625115fd9d6dee0241bd731492340ca7c9475cbf1a03044e15985349bf29842d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion '(unnamed enum at /data/project/src/server/server_definitions.hpp:14:1)' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/connection/connection.cpp", + "index": 1 + }, + "region": { + "startLine": 406, + "startColumn": 21, + "charOffset": 13941, + "charLength": 11, + "snippet": { + "text": "FORCE_CLOSE" + } + }, + "contextRegion": { + "startLine": 404, + "startColumn": 21, + "charOffset": 13796, + "charLength": 11, + "snippet": { + "text": "\t\t\tg_logger().debug(\"Connection Timeout or error: {}, IP: {}\", error.message(), convertIPToString(connection->getIP()));\n\t\t}\n\t\tconnection->close(FORCE_CLOSE);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4b4edc1869f7202185e7fc7a6972113ce6e63979a9e898f66bffb7be8ce5407" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp" + }, + "region": { + "startLine": 16, + "startColumn": 32, + "charOffset": 559, + "charLength": 6, + "snippet": { + "text": "buffer" + } + }, + "contextRegion": { + "startLine": 14, + "startColumn": 32, + "charOffset": 486, + "charLength": 6, + "snippet": { + "text": "\nint32_t NetworkMessage::decodeHeader() {\n\tint32_t newSize = buffer[0] | buffer[1] << 8;\n\tinfo.length = newSize;\n\treturn info.length;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33bc6bf163f235da473a9d15ed753a7b0888d6f7c0cef40d92cf10f9e49447c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-8-1", + "ruleIndex": 446, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-8-1: The right hand operand of a shift operator shall lie between zero and one less than the width in bits of the underlying type of the left hand operand" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp" + }, + "region": { + "startLine": 16, + "startColumn": 45, + "charOffset": 572, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 14, + "startColumn": 45, + "charOffset": 486, + "charLength": 1, + "snippet": { + "text": "\nint32_t NetworkMessage::decodeHeader() {\n\tint32_t newSize = buffer[0] | buffer[1] << 8;\n\tinfo.length = newSize;\n\treturn info.length;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c2147ec1c475eba2411bc7d8752497b47ffd4606dd30a33db709981c09fae04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp" + }, + "region": { + "startLine": 16, + "startColumn": 45, + "charOffset": 572, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 14, + "startColumn": 45, + "charOffset": 486, + "charLength": 1, + "snippet": { + "text": "\nint32_t NetworkMessage::decodeHeader() {\n\tint32_t newSize = buffer[0] | buffer[1] << 8;\n\tinfo.length = newSize;\n\treturn info.length;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ced6998f58206e5c849543d20c004cebb1a6c01bca5d74a4244037eba474503" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp" + }, + "region": { + "startLine": 16, + "startColumn": 45, + "charOffset": 572, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 14, + "startColumn": 45, + "charOffset": 486, + "charLength": 1, + "snippet": { + "text": "\nint32_t NetworkMessage::decodeHeader() {\n\tint32_t newSize = buffer[0] | buffer[1] << 8;\n\tinfo.length = newSize;\n\treturn info.length;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1749c4fd71b095c9d9d81eaeddeccc95043849fbc527fc3b6894819e56563061" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp" + }, + "region": { + "startLine": 17, + "startColumn": 16, + "charOffset": 590, + "charLength": 7, + "snippet": { + "text": "newSize" + } + }, + "contextRegion": { + "startLine": 15, + "startColumn": 16, + "charOffset": 487, + "charLength": 7, + "snippet": { + "text": "int32_t NetworkMessage::decodeHeader() {\n\tint32_t newSize = buffer[0] | buffer[1] << 8;\n\tinfo.length = newSize;\n\treturn info.length;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b2e315ff44e53e0e9ff1fb2b793ddaa5c2260ffe259950a228736fcd6821dc7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-return-braced-init-list", + "ruleIndex": 630, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 10, + "charOffset": 787, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 10, + "charOffset": 749, + "charLength": 3, + "snippet": { + "text": "\n\tif (!canRead(stringLen)) {\n\t\treturn std::string();\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "129a865653a10caa9c1bb9d776fbfbdc182ebb23f93660468448a690d8c2796a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-reinterpret-cast", + "ruleIndex": 511, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use reinterpret_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp" + }, + "region": { + "startLine": 30, + "startColumn": 12, + "charOffset": 817, + "charLength": 16, + "snippet": { + "text": "reinterpret_cast" + } + }, + "contextRegion": { + "startLine": 28, + "startColumn": 12, + "charOffset": 802, + "charLength": 16, + "snippet": { + "text": "\t}\n\n\tchar* v = reinterpret_cast(buffer) + info.position; // does not break strict aliasing\n\tinfo.position += stringLen;\n\treturn std::string(v, stringLen);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83b9c3870015821f32e591982d7d0db133462557c9618b46314055f7da4f7b4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp" + }, + "region": { + "startLine": 30, + "startColumn": 44, + "charOffset": 849, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 28, + "startColumn": 44, + "charOffset": 802, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tchar* v = reinterpret_cast(buffer) + info.position; // does not break strict aliasing\n\tinfo.position += stringLen;\n\treturn std::string(v, stringLen);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d45728c11b03385644b2575239db4f01a6b06546d0eac68e91029928e33a88c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-return-braced-init-list", + "ruleIndex": 630, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp" + }, + "region": { + "startLine": 32, + "startColumn": 9, + "charOffset": 937, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 9, + "charOffset": 806, + "charLength": 3, + "snippet": { + "text": "\tchar* v = reinterpret_cast(buffer) + info.position; // does not break strict aliasing\n\tinfo.position += stringLen;\n\treturn std::string(v, stringLen);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca0f8398b3991928342d78569ef119a5d2817c688d2d769e294a7490d17e29e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp" + }, + "region": { + "startLine": 57, + "startColumn": 16, + "charOffset": 1797, + "charLength": 9, + "snippet": { + "text": "stringLen" + } + }, + "contextRegion": { + "startLine": 55, + "startColumn": 16, + "charOffset": 1778, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tadd(stringLen);\n\tmemcpy(buffer + info.position, value.c_str(), stringLen);\n\tinfo.position += stringLen;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3cb01ae07a938d1d039038f8e0650c95ca83f2ea1c325e6c519de9a347b996a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp" + }, + "region": { + "startLine": 58, + "startColumn": 2, + "charOffset": 1810, + "charLength": 6, + "snippet": { + "text": "memcpy" + } + }, + "contextRegion": { + "startLine": 56, + "startColumn": 2, + "charOffset": 1781, + "charLength": 6, + "snippet": { + "text": "\n\tadd(stringLen);\n\tmemcpy(buffer + info.position, value.c_str(), stringLen);\n\tinfo.position += stringLen;\n\tinfo.length += stringLen;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fbc40a9fc93a0e9a95cce3ca8da3f5a0b1a9ee48bc0d96d825ff833b15c04539" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp" + }, + "region": { + "startLine": 58, + "startColumn": 9, + "charOffset": 1817, + "charLength": 6, + "snippet": { + "text": "buffer" + } + }, + "contextRegion": { + "startLine": 56, + "startColumn": 9, + "charOffset": 1781, + "charLength": 6, + "snippet": { + "text": "\n\tadd(stringLen);\n\tmemcpy(buffer + info.position, value.c_str(), stringLen);\n\tinfo.position += stringLen;\n\tinfo.length += stringLen;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c946c2ce4caa1e8070d5ef7956d72220a685d4fe90f4dc65d8acd561e3441fad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp" + }, + "region": { + "startLine": 58, + "startColumn": 16, + "charOffset": 1824, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 56, + "startColumn": 16, + "charOffset": 1781, + "charLength": 1, + "snippet": { + "text": "\n\tadd(stringLen);\n\tmemcpy(buffer + info.position, value.c_str(), stringLen);\n\tinfo.position += stringLen;\n\tinfo.length += stringLen;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "864c0e4f66dea511c2bf5145e0721c1e8e8ca73c055443f246f526811c195570" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'unsigned int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp" + }, + "region": { + "startLine": 65, + "startColumn": 16, + "charOffset": 2038, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 16, + "charOffset": 1927, + "charLength": 1, + "snippet": { + "text": "void NetworkMessage::addDouble(double value, uint8_t precision /* = 2*/) {\n\taddByte(precision);\n\tadd((value * std::pow(static_cast(10), precision)) + std::numeric_limits::max());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f64c275399172d4dc8a764ad1618883a54cf060cccc70bffd1d7bf6f59fbc5c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp" + }, + "region": { + "startLine": 65, + "startColumn": 16, + "charOffset": 2038, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 16, + "charOffset": 1927, + "charLength": 1, + "snippet": { + "text": "void NetworkMessage::addDouble(double value, uint8_t precision /* = 2*/) {\n\taddByte(precision);\n\tadd((value * std::pow(static_cast(10), precision)) + std::numeric_limits::max());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff2936cf0a5de3c6379f7e34770c6efcd23c4e0b8d739afac3f831e07efa51c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp" + }, + "region": { + "startLine": 65, + "startColumn": 53, + "charOffset": 2075, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 53, + "charOffset": 1927, + "charLength": 2, + "snippet": { + "text": "void NetworkMessage::addDouble(double value, uint8_t precision /* = 2*/) {\n\taddByte(precision);\n\tadd((value * std::pow(static_cast(10), precision)) + std::numeric_limits::max());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c0fa456d796b148a8706710939df63dcfcd3736ce1ef7e8fb96aada59175545" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp" + }, + "region": { + "startLine": 82, + "startColumn": 2, + "charOffset": 2622, + "charLength": 6, + "snippet": { + "text": "memcpy" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 2, + "charOffset": 2617, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tmemcpy(buffer + info.position, bytes, size);\n\tinfo.position += size;\n\tinfo.length += size;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "002479fb08ce995db949ab7d1154004372d462766d34d5485af6b0301b5b5f49" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp" + }, + "region": { + "startLine": 82, + "startColumn": 9, + "charOffset": 2629, + "charLength": 6, + "snippet": { + "text": "buffer" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 9, + "charOffset": 2617, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tmemcpy(buffer + info.position, bytes, size);\n\tinfo.position += size;\n\tinfo.length += size;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ef5abf3d33327758c676d64306fb6da07fe317474637aa3a5669b0b55843988" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp" + }, + "region": { + "startLine": 82, + "startColumn": 16, + "charOffset": 2636, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 16, + "charOffset": 2617, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tmemcpy(buffer + info.position, bytes, size);\n\tinfo.position += size;\n\tinfo.length += size;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f13db6c2d5ec0f56e4a50f4f1076bd63563d50ada1b567a85673810e687993d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-macro-usage", + "ruleIndex": 493, + "kind": "fail", + "level": "warning", + "message": { + "text": "function-like macro 'canAdd' used; consider a 'constexpr' template function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp" + }, + "region": { + "startLine": 88, + "startColumn": 9, + "charOffset": 2773, + "charLength": 6, + "snippet": { + "text": "canAdd" + } + }, + "contextRegion": { + "startLine": 86, + "startColumn": 9, + "charOffset": 2715, + "charLength": 6, + "snippet": { + "text": "\nvoid NetworkMessage::addPaddingBytes(size_t n) {\n#define canAdd(size) ((size + info.position) < NETWORKMESSAGE_MAXSIZE)\n\tif (!canAdd(n)) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b51845e965e55c3335e8a25659920c1d774419d03e8364f81982e461797d31e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-macro-parentheses", + "ruleIndex": 66, + "kind": "fail", + "level": "warning", + "message": { + "text": "macro argument should be enclosed in parentheses" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp" + }, + "region": { + "startLine": 88, + "startColumn": 24, + "charOffset": 2788, + "charLength": 4, + "snippet": { + "text": "size" + } + }, + "contextRegion": { + "startLine": 86, + "startColumn": 24, + "charOffset": 2715, + "charLength": 4, + "snippet": { + "text": "\nvoid NetworkMessage::addPaddingBytes(size_t n) {\n#define canAdd(size) ((size + info.position) < NETWORKMESSAGE_MAXSIZE)\n\tif (!canAdd(n)) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95c7ae3e56f6d6b219048d6d75525ff88b4d0f173a8b68e60dd822eaad306807" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp" + }, + "region": { + "startLine": 94, + "startColumn": 2, + "charOffset": 2884, + "charLength": 6, + "snippet": { + "text": "memset" + } + }, + "contextRegion": { + "startLine": 92, + "startColumn": 2, + "charOffset": 2868, + "charLength": 6, + "snippet": { + "text": "#undef canAdd\n\n\tmemset(buffer + info.position, 0x33, n);\n\tinfo.length += n;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f3274cd46021dbfa42e33316f23ea894073057c92a0c78259c7a534a30bcfd0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp" + }, + "region": { + "startLine": 94, + "startColumn": 9, + "charOffset": 2891, + "charLength": 6, + "snippet": { + "text": "buffer" + } + }, + "contextRegion": { + "startLine": 92, + "startColumn": 9, + "charOffset": 2868, + "charLength": 6, + "snippet": { + "text": "#undef canAdd\n\n\tmemset(buffer + info.position, 0x33, n);\n\tinfo.length += n;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e96c3ab2329ced8b58ba7cdc494a98edf743c3091c119b740e7358e4b8ea6946" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp" + }, + "region": { + "startLine": 94, + "startColumn": 16, + "charOffset": 2898, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 92, + "startColumn": 16, + "charOffset": 2868, + "charLength": 1, + "snippet": { + "text": "#undef canAdd\n\n\tmemset(buffer + info.position, 0x33, n);\n\tinfo.length += n;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "447385be1b58f5aa160179345099a922f4da022d6610e900f58f0cbb9e009f28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x33 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/networkmessage.cpp" + }, + "region": { + "startLine": 94, + "startColumn": 33, + "charOffset": 2915, + "charLength": 4, + "snippet": { + "text": "0x33" + } + }, + "contextRegion": { + "startLine": 92, + "startColumn": 33, + "charOffset": 2868, + "charLength": 4, + "snippet": { + "text": "#undef canAdd\n\n\tmemset(buffer + info.position, 0x33, n);\n\tinfo.length += n;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c739231524970772008de3e608b18f57a62ca8011bec1f5219f345cab66365cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'OUTPUTMESSAGE_AUTOSEND_DELAY' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/outputmessage.cpp" + }, + "region": { + "startLine": 16, + "startColumn": 33, + "charOffset": 543, + "charLength": 28, + "snippet": { + "text": "OUTPUTMESSAGE_AUTOSEND_DELAY" + } + }, + "contextRegion": { + "startLine": 14, + "startColumn": 33, + "charOffset": 468, + "charLength": 28, + "snippet": { + "text": "#include \"game/scheduling/dispatcher.hpp\"\n\nconst std::chrono::milliseconds OUTPUTMESSAGE_AUTOSEND_DELAY { 10 };\n\nvoid OutputMessagePool::scheduleSendAll() {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "502b847b1f4c69efca8ac4a8a30efda9ea6741472d397c91cbe208af5ba00449" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/outputmessage.cpp" + }, + "region": { + "startLine": 19, + "startColumn": 17, + "charOffset": 641, + "charLength": 13, + "snippet": { + "text": "scheduleEvent" + } + }, + "contextRegion": { + "startLine": 17, + "startColumn": 17, + "charOffset": 580, + "charLength": 13, + "snippet": { + "text": "\nvoid OutputMessagePool::scheduleSendAll() {\n\tg_dispatcher().scheduleEvent(\n\t\tOUTPUTMESSAGE_AUTOSEND_DELAY.count(), [this] { sendAll(); }, \"OutputMessagePool::sendAll\"\n\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e09a94b5f6c3c3ad30eea6266793c563d3187fa2db76c897275a1cf78ea0181" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/outputmessage.cpp" + }, + "region": { + "startLine": 20, + "startColumn": 3, + "charOffset": 658, + "charLength": 28, + "snippet": { + "text": "OUTPUTMESSAGE_AUTOSEND_DELAY" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 3, + "charOffset": 581, + "charLength": 28, + "snippet": { + "text": "void OutputMessagePool::scheduleSendAll() {\n\tg_dispatcher().scheduleEvent(\n\t\tOUTPUTMESSAGE_AUTOSEND_DELAY.count(), [this] { sendAll(); }, \"OutputMessagePool::sendAll\"\n\t);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f8231185ea7156275af5a99de93f3fc624e047ff0eccc9c876265213bb9ba1e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/outputmessage.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 2, + "charOffset": 814, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 2, + "charOffset": 755, + "charLength": 3, + "snippet": { + "text": "void OutputMessagePool::sendAll() {\n\t// dispatcher thread\n\tfor (auto &protocol : bufferedProtocols) {\n\t\tauto &msg = protocol->getCurrentBuffer();\n\t\tif (msg) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93be2c262245fc41ae21e53e1b2089565ad332558c38086f75866de4aca86b84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'protocol' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/outputmessage.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 60, + "charOffset": 1078, + "charLength": 8, + "snippet": { + "text": "protocol" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 60, + "charOffset": 1016, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid OutputMessagePool::addProtocolToAutosend(Protocol_ptr protocol) {\n\t// dispatcher thread\n\tif (bufferedProtocols.empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2193e0c57c8b3004eb2925d12fcf509e5b15feb30354ef85109dc7700cabf945" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/outputmessage.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 20, + "charOffset": 1189, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 20, + "charOffset": 1146, + "charLength": 12, + "snippet": { + "text": "\t\tscheduleSendAll();\n\t}\n\tbufferedProtocols.emplace_back(protocol);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05bfd4124c28ef3f3a0d49b7e44b0a75f2a8aa01b98dc152a4f0593d5b93d692" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-unconstrained-variable-type", + "ruleIndex": 476, + "kind": "fail", + "level": "warning", + "message": { + "text": "Add 'std::input_iterator' constraint" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/message/outputmessage.cpp" + }, + "region": { + "startLine": 48, + "startColumn": 2, + "charOffset": 1322, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 2, + "charOffset": 1216, + "charLength": 4, + "snippet": { + "text": "void OutputMessagePool::removeProtocolFromAutosend(const Protocol_ptr &protocol) {\n\t// dispatcher thread\n\tauto it = std::ranges::find(bufferedProtocols.begin(), bufferedProtocols.end(), protocol);\n\tif (it != bufferedProtocols.end()) {\n\t\t*it = bufferedProtocols.back();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a9e7385ed7b26ba6d2a4cb83caf8695e6ca7d3af45cee2c660c8663c160d78b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-8-1", + "ruleIndex": 446, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-8-1: The right hand operand of a shift operator shall lie between zero and one less than the width in bits of the underlying type of the left hand operand" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 19, + "startColumn": 94, + "charOffset": 737, + "charLength": 2, + "snippet": { + "text": "31" + } + }, + "contextRegion": { + "startLine": 17, + "startColumn": 94, + "charOffset": 562, + "charLength": 2, + "snippet": { + "text": "void Protocol::onSendMessage(const OutputMessage_ptr &msg) {\n\tif (!rawMessages) {\n\t\tconst uint32_t sendMessageChecksum = msg->getLength() >= 128 && compression(*msg) ? (1U << 31) : 0;\n\n\t\tmsg->writeMessageLength();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5c8d7d3b8879ea87a8750bcc54b8318291c4678db9b7c5c0db9f0e509f0dfdf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 19, + "startColumn": 94, + "charOffset": 737, + "charLength": 2, + "snippet": { + "text": "31" + } + }, + "contextRegion": { + "startLine": 17, + "startColumn": 94, + "charOffset": 562, + "charLength": 2, + "snippet": { + "text": "void Protocol::onSendMessage(const OutputMessage_ptr &msg) {\n\tif (!rawMessages) {\n\t\tconst uint32_t sendMessageChecksum = msg->getLength() >= 128 && compression(*msg) ? (1U << 31) : 0;\n\n\t\tmsg->writeMessageLength();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78e1bf0d382b16d52f6ab10bb3c571d1437bf55154fb4dac80cea2de3caedb55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 3, + "charOffset": 845, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 3, + "charOffset": 820, + "charLength": 2, + "snippet": { + "text": "\n\t\tXTEA_encrypt(*msg);\n\t\tif (checksumMethod == CHECKSUM_METHOD_NONE) {\n\t\t\tmsg->addCryptoHeader(false, 0);\n\t\t} else if (checksumMethod == CHECKSUM_METHOD_ADLER32) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe11e31e05a93b60c1b0c5a69d8b6334af55d5fca3ae315784dcb4041fae4cc3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-10", + "ruleIndex": 433, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-10: The increment (++) and decrement (--) operators should not be mixed with other operators in an expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 54, + "charOffset": 1184, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 54, + "charOffset": 984, + "charLength": 2, + "snippet": { + "text": "\t\t\tmsg->addCryptoHeader(true, adlerChecksum(msg->getOutputBuffer(), msg->getLength()));\n\t\t} else if (checksumMethod == CHECKSUM_METHOD_SEQUENCE) {\n\t\t\tmsg->addCryptoHeader(true, sendMessageChecksum | (++serverSequenceNumber));\n\t\t\tif (serverSequenceNumber >= 0x7FFFFFFF) {\n\t\t\t\tserverSequenceNumber = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "595883b169e324a2a2591022edbd9e33d6618802daa7995b026b347bd7100f3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 32, + "charOffset": 1241, + "charLength": 10, + "snippet": { + "text": "0x7FFFFFFF" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 32, + "charOffset": 1072, + "charLength": 10, + "snippet": { + "text": "\t\t} else if (checksumMethod == CHECKSUM_METHOD_SEQUENCE) {\n\t\t\tmsg->addCryptoHeader(true, sendMessageChecksum | (++serverSequenceNumber));\n\t\t\tif (serverSequenceNumber >= 0x7FFFFFFF) {\n\t\t\t\tserverSequenceNumber = 0;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8a48c2bb37d8b5bc8beacea3e83e460af4e59dfd4df4ec05449a17544c02cbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x7FFFFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 32, + "charOffset": 1241, + "charLength": 10, + "snippet": { + "text": "0x7FFFFFFF" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 32, + "charOffset": 1072, + "charLength": 10, + "snippet": { + "text": "\t\t} else if (checksumMethod == CHECKSUM_METHOD_SEQUENCE) {\n\t\t\tmsg->addCryptoHeader(true, sendMessageChecksum | (++serverSequenceNumber));\n\t\t\tif (serverSequenceNumber >= 0x7FFFFFFF) {\n\t\t\t\tserverSequenceNumber = 0;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "baf0ac337f1e6369c91df67cf99aafd0019b662e1643c67c66de11620ee05ff0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 60, + "startColumn": 3, + "charOffset": 1943, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 3, + "charOffset": 1842, + "charLength": 8, + "snippet": { + "text": "bool Protocol::onRecvMessage(NetworkMessage &msg) {\n\tif (checksumMethod != CHECKSUM_METHOD_NONE) {\n\t\tuint32_t recvChecksum = msg.get();\n\t\tif (checksumMethod == CHECKSUM_METHOD_SEQUENCE) {\n\t\t\tif (recvChecksum == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed3c5244a18244cd0b463b10a1b432ecd4752a69121285de3b29ac3bab07492f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'checksum' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 68, + "startColumn": 13, + "charOffset": 2241, + "charLength": 8, + "snippet": { + "text": "checksum" + } + }, + "contextRegion": { + "startLine": 66, + "startColumn": 13, + "charOffset": 2223, + "charLength": 8, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tuint32_t checksum;\n\t\t\tchecksum = ++clientSequenceNumber;\n\t\t\tif (clientSequenceNumber >= 0x7FFFFFFF) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8fa136cae55154e575c2f969a958c47530cef5bc3f10105bb6e8813e5759778" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 32, + "charOffset": 2320, + "charLength": 10, + "snippet": { + "text": "0x7FFFFFFF" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 32, + "charOffset": 2229, + "charLength": 10, + "snippet": { + "text": "\t\t\tuint32_t checksum;\n\t\t\tchecksum = ++clientSequenceNumber;\n\t\t\tif (clientSequenceNumber >= 0x7FFFFFFF) {\n\t\t\t\tclientSequenceNumber = 0;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75d7a56326c54650ff94eb04960427eafc0ec8fad3127f52b6f56472b7bf3439" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x7FFFFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 32, + "charOffset": 2320, + "charLength": 10, + "snippet": { + "text": "0x7FFFFFFF" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 32, + "charOffset": 2229, + "charLength": 10, + "snippet": { + "text": "\t\t\tuint32_t checksum;\n\t\t\tchecksum = ++clientSequenceNumber;\n\t\t\tif (clientSequenceNumber >= 0x7FFFFFFF) {\n\t\t\t\tclientSequenceNumber = 0;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4aad0e0324b6a2033ad62fc4c3f193bc832c355665f98e4c6ce6e5fe5bd0a7af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'checksum' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 79, + "startColumn": 13, + "charOffset": 2485, + "charLength": 8, + "snippet": { + "text": "checksum" + } + }, + "contextRegion": { + "startLine": 77, + "startColumn": 13, + "charOffset": 2457, + "charLength": 8, + "snippet": { + "text": "\t\t\t}\n\t\t} else {\n\t\t\tuint32_t checksum;\n\t\t\tif (int32_t len = msg.getLength() - msg.getBufferPosition();\n\t\t\t len > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a80317bb291463979b3e76a9f22031a265684f86d0066bfcda8930a12d3b8c2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 82, + "startColumn": 46, + "charOffset": 2622, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 46, + "charOffset": 2495, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (int32_t len = msg.getLength() - msg.getBufferPosition();\n\t\t\t len > 0) {\n\t\t\t\tchecksum = adlerChecksum(msg.getBuffer() + msg.getBufferPosition(), len);\n\t\t\t} else {\n\t\t\t\tchecksum = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fcbd03f1645ddf428bd11682e6d6c3a6cefd34bd36d8dc4b3d11c981fb70757" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 99, + "startColumn": 2, + "charOffset": 2915, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 97, + "startColumn": 2, + "charOffset": 2832, + "charLength": 2, + "snippet": { + "text": "OutputMessage_ptr Protocol::getOutputBuffer(int32_t size) {\n\t// dispatcher thread\n\tif (!outputBuffer) {\n\t\toutputBuffer = OutputMessagePool::getOutputMessage();\n\t} else if ((outputBuffer->getLength() + size) > MAX_PROTOCOL_BODY_LENGTH) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f14c50dfe76f66bf620272640eb7a7cc4e2a9e19e8891f77d6babb53541838b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 99, + "startColumn": 6, + "charOffset": 2919, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 97, + "startColumn": 6, + "charOffset": 2832, + "charLength": 1, + "snippet": { + "text": "OutputMessage_ptr Protocol::getOutputBuffer(int32_t size) {\n\t// dispatcher thread\n\tif (!outputBuffer) {\n\t\toutputBuffer = OutputMessagePool::getOutputMessage();\n\t} else if ((outputBuffer->getLength() + size) > MAX_PROTOCOL_BODY_LENGTH) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bff47b997a0b13adfc9f39125ccf2ec707337a0cd867771c8537ccfd986216bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 109, + "startColumn": 25, + "charOffset": 3255, + "charLength": 10, + "snippet": { + "text": "0x61C88647" + } + }, + "contextRegion": { + "startLine": 107, + "startColumn": 25, + "charOffset": 3174, + "charLength": 10, + "snippet": { + "text": "\nvoid Protocol::XTEA_encrypt(OutputMessage &msg) const {\n\tconst uint32_t delta = 0x61C88647;\n\n\t// The message must be a multiple of 8" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c762afe757959a5d3609efcc84d274c4e3eb6fda5152411719e6ee7c2c01a856" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 112, + "startColumn": 42, + "charOffset": 3349, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 110, + "startColumn": 42, + "charOffset": 3267, + "charLength": 1, + "snippet": { + "text": "\n\t// The message must be a multiple of 8\n\tsize_t paddingBytes = msg.getLength() & 7;\n\tif (paddingBytes != 0) {\n\t\tmsg.addPaddingBytes(8 - paddingBytes);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1d1f94953ccf911f407546f10ca23125009e46c78e479ef1931133c09ce5c06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 112, + "startColumn": 42, + "charOffset": 3349, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 110, + "startColumn": 42, + "charOffset": 3267, + "charLength": 1, + "snippet": { + "text": "\n\t// The message must be a multiple of 8\n\tsize_t paddingBytes = msg.getLength() & 7;\n\tif (paddingBytes != 0) {\n\t\tmsg.addPaddingBytes(8 - paddingBytes);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3be0c17c714b2ed62ef8b737c1e1be59e45aae8a7a011f33a54d4dd6735abccd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 114, + "startColumn": 23, + "charOffset": 3400, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 112, + "startColumn": 23, + "charOffset": 3308, + "charLength": 1, + "snippet": { + "text": "\tsize_t paddingBytes = msg.getLength() & 7;\n\tif (paddingBytes != 0) {\n\t\tmsg.addPaddingBytes(8 - paddingBytes);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b1e3b4c423912b6a7fa1738f8c19bd899ea55b7d8324c6a6b46e66fa28e2e40" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-todo", + "ruleIndex": 545, + "kind": "fail", + "level": "warning", + "message": { + "text": "missing username/bug in TODO" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 121, + "startColumn": 2, + "charOffset": 3625, + "charLength": 42, + "snippet": { + "text": "// TODO: refactor this for not use c-style" + } + }, + "contextRegion": { + "startLine": 119, + "startColumn": 2, + "charOffset": 3526, + "charLength": 42, + "snippet": { + "text": "\tint32_t readPos = 0;\n\tconst std::array newKey = { key[0], key[1], key[2], key[3] };\n\t// TODO: refactor this for not use c-style\n\tuint32_t precachedControlSum[32][2];\n\tuint32_t sum = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ee862e7abd4dec63cc3de5bc03d777b6ed912241101d5a23a253159271e9d1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-c-arrays", + "ruleIndex": 480, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not declare C-style arrays, use std::array<> instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 122, + "startColumn": 2, + "charOffset": 3669, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 120, + "startColumn": 2, + "charOffset": 3548, + "charLength": 8, + "snippet": { + "text": "\tconst std::array newKey = { key[0], key[1], key[2], key[3] };\n\t// TODO: refactor this for not use c-style\n\tuint32_t precachedControlSum[32][2];\n\tuint32_t sum = 0;\n\tfor (int32_t i = 0; i < 32; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "edbe43d3f2d282e4ce071512c5c62217569e96f774e2ba4c4866df04ab4f0c1c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "32 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 122, + "startColumn": 31, + "charOffset": 3698, + "charLength": 2, + "snippet": { + "text": "32" + } + }, + "contextRegion": { + "startLine": 120, + "startColumn": 31, + "charOffset": 3548, + "charLength": 2, + "snippet": { + "text": "\tconst std::array newKey = { key[0], key[1], key[2], key[3] };\n\t// TODO: refactor this for not use c-style\n\tuint32_t precachedControlSum[32][2];\n\tuint32_t sum = 0;\n\tfor (int32_t i = 0; i < 32; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c1e2d9fb23362557ecad80f10ea7a7db3357a97b9b9b4e0ea87eca2a3409313" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 124, + "startColumn": 2, + "charOffset": 3726, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 122, + "startColumn": 2, + "charOffset": 3668, + "charLength": 3, + "snippet": { + "text": "\tuint32_t precachedControlSum[32][2];\n\tuint32_t sum = 0;\n\tfor (int32_t i = 0; i < 32; ++i) {\n\t\tprecachedControlSum[i][0] = (sum + newKey[sum & 3]);\n\t\tsum -= delta;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de8618372450ddf22d7daad90e1d3384c653317590dcc40a097398413f970a88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-loop-convert", + "ruleIndex": 620, + "kind": "fail", + "level": "warning", + "message": { + "text": "use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 124, + "startColumn": 2, + "charOffset": 3726, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 122, + "startColumn": 2, + "charOffset": 3668, + "charLength": 3, + "snippet": { + "text": "\tuint32_t precachedControlSum[32][2];\n\tuint32_t sum = 0;\n\tfor (int32_t i = 0; i < 32; ++i) {\n\t\tprecachedControlSum[i][0] = (sum + newKey[sum & 3]);\n\t\tsum -= delta;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "363e6d3114ec41b83a36d79f4a2c7b689a3bc946b1c5723ae2e442ff2db01253" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "32 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 124, + "startColumn": 26, + "charOffset": 3750, + "charLength": 2, + "snippet": { + "text": "32" + } + }, + "contextRegion": { + "startLine": 122, + "startColumn": 26, + "charOffset": 3668, + "charLength": 2, + "snippet": { + "text": "\tuint32_t precachedControlSum[32][2];\n\tuint32_t sum = 0;\n\tfor (int32_t i = 0; i < 32; ++i) {\n\t\tprecachedControlSum[i][0] = (sum + newKey[sum & 3]);\n\t\tsum -= delta;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f61e56c99ebd05311dacbd3bb37db8bec0f471be038bea27c6df70c9cbf9c947" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 125, + "startColumn": 3, + "charOffset": 3763, + "charLength": 19, + "snippet": { + "text": "precachedControlSum" + } + }, + "contextRegion": { + "startLine": 123, + "startColumn": 3, + "charOffset": 3706, + "charLength": 19, + "snippet": { + "text": "\tuint32_t sum = 0;\n\tfor (int32_t i = 0; i < 32; ++i) {\n\t\tprecachedControlSum[i][0] = (sum + newKey[sum & 3]);\n\t\tsum -= delta;\n\t\tprecachedControlSum[i][1] = (sum + newKey[(sum >> 11) & 3]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d0863d8fa6d3f3519427d6fc4a42cbc4b077f4aa76be5d01200c8604bdd4b4d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 125, + "startColumn": 38, + "charOffset": 3798, + "charLength": 6, + "snippet": { + "text": "newKey" + } + }, + "contextRegion": { + "startLine": 123, + "startColumn": 38, + "charOffset": 3706, + "charLength": 6, + "snippet": { + "text": "\tuint32_t sum = 0;\n\tfor (int32_t i = 0; i < 32; ++i) {\n\t\tprecachedControlSum[i][0] = (sum + newKey[sum & 3]);\n\t\tsum -= delta;\n\t\tprecachedControlSum[i][1] = (sum + newKey[(sum >> 11) & 3]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b956248e80c9b16c474d429289d155c1cd512d899d5b21794bfa8b0813bc1252" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 125, + "startColumn": 51, + "charOffset": 3811, + "charLength": 1, + "snippet": { + "text": "3" + } + }, + "contextRegion": { + "startLine": 123, + "startColumn": 51, + "charOffset": 3706, + "charLength": 1, + "snippet": { + "text": "\tuint32_t sum = 0;\n\tfor (int32_t i = 0; i < 32; ++i) {\n\t\tprecachedControlSum[i][0] = (sum + newKey[sum & 3]);\n\t\tsum -= delta;\n\t\tprecachedControlSum[i][1] = (sum + newKey[(sum >> 11) & 3]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbaada66d9e2195a3334b77c0ec90776595a77bf2b264bcc545cb74997cb1979" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 127, + "startColumn": 3, + "charOffset": 3834, + "charLength": 19, + "snippet": { + "text": "precachedControlSum" + } + }, + "contextRegion": { + "startLine": 125, + "startColumn": 3, + "charOffset": 3761, + "charLength": 19, + "snippet": { + "text": "\t\tprecachedControlSum[i][0] = (sum + newKey[sum & 3]);\n\t\tsum -= delta;\n\t\tprecachedControlSum[i][1] = (sum + newKey[(sum >> 11) & 3]);\n\t}\n\twhile (readPos < messageLength) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41306df82c021a96356bc9523b0b0733beee828ebc0caf8766c8e5384d3f3457" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 127, + "startColumn": 38, + "charOffset": 3869, + "charLength": 6, + "snippet": { + "text": "newKey" + } + }, + "contextRegion": { + "startLine": 125, + "startColumn": 38, + "charOffset": 3761, + "charLength": 6, + "snippet": { + "text": "\t\tprecachedControlSum[i][0] = (sum + newKey[sum & 3]);\n\t\tsum -= delta;\n\t\tprecachedControlSum[i][1] = (sum + newKey[(sum >> 11) & 3]);\n\t}\n\twhile (readPos < messageLength) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff0fa489f234018f1c7032e94ba485a0c30f15b054085895cf79b12b85fb26ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 127, + "startColumn": 53, + "charOffset": 3884, + "charLength": 2, + "snippet": { + "text": "11" + } + }, + "contextRegion": { + "startLine": 125, + "startColumn": 53, + "charOffset": 3761, + "charLength": 2, + "snippet": { + "text": "\t\tprecachedControlSum[i][0] = (sum + newKey[sum & 3]);\n\t\tsum -= delta;\n\t\tprecachedControlSum[i][1] = (sum + newKey[(sum >> 11) & 3]);\n\t}\n\twhile (readPos < messageLength) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db2e0a2d23e576209f2bfbcf400b27f7c5db72ed553297d2f07cea4bc66ddc84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "11 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 127, + "startColumn": 53, + "charOffset": 3884, + "charLength": 2, + "snippet": { + "text": "11" + } + }, + "contextRegion": { + "startLine": 125, + "startColumn": 53, + "charOffset": 3761, + "charLength": 2, + "snippet": { + "text": "\t\tprecachedControlSum[i][0] = (sum + newKey[sum & 3]);\n\t\tsum -= delta;\n\t\tprecachedControlSum[i][1] = (sum + newKey[(sum >> 11) & 3]);\n\t}\n\twhile (readPos < messageLength) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06e8bc55f1dae69669299a43e4d7abe49b068bfe7ec3c771f1c167376a59c82b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 127, + "startColumn": 59, + "charOffset": 3890, + "charLength": 1, + "snippet": { + "text": "3" + } + }, + "contextRegion": { + "startLine": 125, + "startColumn": 59, + "charOffset": 3761, + "charLength": 1, + "snippet": { + "text": "\t\tprecachedControlSum[i][0] = (sum + newKey[sum & 3]);\n\t\tsum -= delta;\n\t\tprecachedControlSum[i][1] = (sum + newKey[(sum >> 11) & 3]);\n\t}\n\twhile (readPos < messageLength) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a7a9cf48cdb5b374b62262cf4585c52dbb43449c59b309c41c8392696c35143" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'messageLength' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 129, + "startColumn": 9, + "charOffset": 3906, + "charLength": 7, + "snippet": { + "text": "readPos" + } + }, + "contextRegion": { + "startLine": 127, + "startColumn": 9, + "charOffset": 3832, + "charLength": 7, + "snippet": { + "text": "\t\tprecachedControlSum[i][1] = (sum + newKey[(sum >> 11) & 3]);\n\t}\n\twhile (readPos < messageLength) {\n\t\tstd::array vData = {};\n\t\tmemcpy(vData.data(), buffer + readPos, 8);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "329f52d658c528b89af8e6d53ebb6c8ac13e98cc2f12195b478c842c2ad5fa43" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 131, + "startColumn": 3, + "charOffset": 3973, + "charLength": 6, + "snippet": { + "text": "memcpy" + } + }, + "contextRegion": { + "startLine": 129, + "startColumn": 3, + "charOffset": 3898, + "charLength": 6, + "snippet": { + "text": "\twhile (readPos < messageLength) {\n\t\tstd::array vData = {};\n\t\tmemcpy(vData.data(), buffer + readPos, 8);\n\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[0] += ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][0];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40e96a7547a50c09dc9323b2d2bdfe3664062f51a740029d98d7ce9bc7f46719" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 131, + "startColumn": 31, + "charOffset": 4001, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 129, + "startColumn": 31, + "charOffset": 3898, + "charLength": 1, + "snippet": { + "text": "\twhile (readPos < messageLength) {\n\t\tstd::array vData = {};\n\t\tmemcpy(vData.data(), buffer + readPos, 8);\n\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[0] += ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][0];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfd8149ea1eaa6e7501abc48ebcbec987a7754f93325bc1afa417a493eae6b4f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 131, + "startColumn": 42, + "charOffset": 4012, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 129, + "startColumn": 42, + "charOffset": 3898, + "charLength": 1, + "snippet": { + "text": "\twhile (readPos < messageLength) {\n\t\tstd::array vData = {};\n\t\tmemcpy(vData.data(), buffer + readPos, 8);\n\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[0] += ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][0];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db34e507e71a1e669bc911ef0c90c5af164f926392911be4fcf51608129b9e6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 132, + "startColumn": 3, + "charOffset": 4018, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 130, + "startColumn": 3, + "charOffset": 3933, + "charLength": 3, + "snippet": { + "text": "\t\tstd::array vData = {};\n\t\tmemcpy(vData.data(), buffer + readPos, 8);\n\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[0] += ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][0];\n\t\t\tvData[1] += ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][1];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6acb6ca1cbfdb13fb8559536476c4403fdf7d2a5fac1926a72f9b3c6f32b32de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-loop-convert", + "ruleIndex": 620, + "kind": "fail", + "level": "warning", + "message": { + "text": "use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 132, + "startColumn": 3, + "charOffset": 4018, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 130, + "startColumn": 3, + "charOffset": 3933, + "charLength": 3, + "snippet": { + "text": "\t\tstd::array vData = {};\n\t\tmemcpy(vData.data(), buffer + readPos, 8);\n\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[0] += ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][0];\n\t\t\tvData[1] += ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][1];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2982cff1c8525b043e559459ff46fa0f0dcb03218bbc67bbd6856d0d4a00340c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "32 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 132, + "startColumn": 27, + "charOffset": 4042, + "charLength": 2, + "snippet": { + "text": "32" + } + }, + "contextRegion": { + "startLine": 130, + "startColumn": 27, + "charOffset": 3933, + "charLength": 2, + "snippet": { + "text": "\t\tstd::array vData = {};\n\t\tmemcpy(vData.data(), buffer + readPos, 8);\n\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[0] += ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][0];\n\t\t\tvData[1] += ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][1];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d3389fdbc592e3df19fa0c02967924969669aad45c280167a90895ab438a028" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 133, + "startColumn": 30, + "charOffset": 4082, + "charLength": 1, + "snippet": { + "text": "4" + } + }, + "contextRegion": { + "startLine": 131, + "startColumn": 30, + "charOffset": 3971, + "charLength": 1, + "snippet": { + "text": "\t\tmemcpy(vData.data(), buffer + readPos, 8);\n\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[0] += ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][0];\n\t\t\tvData[1] += ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][1];\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "981e2239a4e43c30b3ad9382d7582ec492b19dea75a61390bbf16c097be78d38" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 133, + "startColumn": 46, + "charOffset": 4098, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 131, + "startColumn": 46, + "charOffset": 3971, + "charLength": 1, + "snippet": { + "text": "\t\tmemcpy(vData.data(), buffer + readPos, 8);\n\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[0] += ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][0];\n\t\t\tvData[1] += ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][1];\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a2cfbf7693827bad9393209b68af109a370f46ada31c9dbaf40adfdf2f97d29" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 133, + "startColumn": 46, + "charOffset": 4098, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 131, + "startColumn": 46, + "charOffset": 3971, + "charLength": 1, + "snippet": { + "text": "\t\tmemcpy(vData.data(), buffer + readPos, 8);\n\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[0] += ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][0];\n\t\t\tvData[1] += ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][1];\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ab65473fd0afdbf2d596831425ba558ef482a732ae5a8fcfa8362edf7718225" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 133, + "startColumn": 63, + "charOffset": 4115, + "charLength": 19, + "snippet": { + "text": "precachedControlSum" + } + }, + "contextRegion": { + "startLine": 131, + "startColumn": 63, + "charOffset": 3971, + "charLength": 19, + "snippet": { + "text": "\t\tmemcpy(vData.data(), buffer + readPos, 8);\n\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[0] += ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][0];\n\t\t\tvData[1] += ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][1];\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d695c1a438191c2a4e3303ddcae0f126250bf9a9ddf14f696d6c06b214bd5aff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 30, + "charOffset": 4171, + "charLength": 1, + "snippet": { + "text": "4" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 30, + "charOffset": 4016, + "charLength": 1, + "snippet": { + "text": "\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[0] += ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][0];\n\t\t\tvData[1] += ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][1];\n\t\t}\n\t\tmemcpy(buffer + readPos, vData.data(), 8);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "680f583cdf2033526f86b908d7e9b3bc9a51566602b17770999c5518b31b462f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 46, + "charOffset": 4187, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 46, + "charOffset": 4016, + "charLength": 1, + "snippet": { + "text": "\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[0] += ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][0];\n\t\t\tvData[1] += ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][1];\n\t\t}\n\t\tmemcpy(buffer + readPos, vData.data(), 8);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bade4643e870062479db0d9b91e2511f95266af78f07c248b3bb219fdb70eb84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 46, + "charOffset": 4187, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 46, + "charOffset": 4016, + "charLength": 1, + "snippet": { + "text": "\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[0] += ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][0];\n\t\t\tvData[1] += ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][1];\n\t\t}\n\t\tmemcpy(buffer + readPos, vData.data(), 8);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9eb759928dc59819c74b86bd767cb1f646282063e47ef47b765603c700bb6feb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 63, + "charOffset": 4204, + "charLength": 19, + "snippet": { + "text": "precachedControlSum" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 63, + "charOffset": 4016, + "charLength": 19, + "snippet": { + "text": "\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[0] += ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][0];\n\t\t\tvData[1] += ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][1];\n\t\t}\n\t\tmemcpy(buffer + readPos, vData.data(), 8);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2bcdb602a94ea6a902c270121fb761187fe842217db665e6d955cf945301fece" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 136, + "startColumn": 3, + "charOffset": 4237, + "charLength": 6, + "snippet": { + "text": "memcpy" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 3, + "charOffset": 4142, + "charLength": 6, + "snippet": { + "text": "\t\t\tvData[1] += ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][1];\n\t\t}\n\t\tmemcpy(buffer + readPos, vData.data(), 8);\n\t\treadPos += 8;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f21dbdd0a5c06ccb8611ed0d845b39a221c1bb0dc54313841a36542484e3818f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 136, + "startColumn": 17, + "charOffset": 4251, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 17, + "charOffset": 4142, + "charLength": 1, + "snippet": { + "text": "\t\t\tvData[1] += ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][1];\n\t\t}\n\t\tmemcpy(buffer + readPos, vData.data(), 8);\n\t\treadPos += 8;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78838e565d1b5d7f06d0b43549aa33edf9ba831620103f7865dc5ae6d1aae0d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 136, + "startColumn": 42, + "charOffset": 4276, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 42, + "charOffset": 4142, + "charLength": 1, + "snippet": { + "text": "\t\t\tvData[1] += ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][1];\n\t\t}\n\t\tmemcpy(buffer + readPos, vData.data(), 8);\n\t\treadPos += 8;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "558b86046b824266dd50664ab5a60b30d87bed5991cacd530da17a5478814bd0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 137, + "startColumn": 14, + "charOffset": 4293, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 135, + "startColumn": 14, + "charOffset": 4231, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\t\tmemcpy(buffer + readPos, vData.data(), 8);\n\t\treadPos += 8;\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a68151124b0ddffb834f27eba5051b4b1977e60ce6ddd138e0554827eee76211" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 142, + "startColumn": 23, + "charOffset": 4381, + "charLength": 3, + "snippet": { + "text": "msg" + } + }, + "contextRegion": { + "startLine": 140, + "startColumn": 23, + "charOffset": 4301, + "charLength": 3, + "snippet": { + "text": "\nbool Protocol::XTEA_decrypt(NetworkMessage &msg) const {\n\tuint16_t msgLength = msg.getLength() - (checksumMethod == CHECKSUM_METHOD_NONE ? 2 : 6);\n\tif ((msgLength & 7) != 0) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56393e483dbee387343c9b98664ffdbb6aea9ab45e2f350b6641b8800922d2c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 142, + "startColumn": 87, + "charOffset": 4445, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 140, + "startColumn": 87, + "charOffset": 4301, + "charLength": 1, + "snippet": { + "text": "\nbool Protocol::XTEA_decrypt(NetworkMessage &msg) const {\n\tuint16_t msgLength = msg.getLength() - (checksumMethod == CHECKSUM_METHOD_NONE ? 2 : 6);\n\tif ((msgLength & 7) != 0) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a815f7731952001480d9473db1b68bcd0a8222f372f464487a0f58e384985d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 143, + "startColumn": 19, + "charOffset": 4467, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 141, + "startColumn": 19, + "charOffset": 4302, + "charLength": 1, + "snippet": { + "text": "bool Protocol::XTEA_decrypt(NetworkMessage &msg) const {\n\tuint16_t msgLength = msg.getLength() - (checksumMethod == CHECKSUM_METHOD_NONE ? 2 : 6);\n\tif ((msgLength & 7) != 0) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a480ca3ae744e9537b9a687fa64c638aff5e6271482bbb29e3d630af04c44b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 143, + "startColumn": 19, + "charOffset": 4467, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 141, + "startColumn": 19, + "charOffset": 4302, + "charLength": 1, + "snippet": { + "text": "bool Protocol::XTEA_decrypt(NetworkMessage &msg) const {\n\tuint16_t msgLength = msg.getLength() - (checksumMethod == CHECKSUM_METHOD_NONE ? 2 : 6);\n\tif ((msgLength & 7) != 0) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fb11cc79d8d93c2f6356709724879e78a608726aca737821ddd4e055a3751d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 147, + "startColumn": 25, + "charOffset": 4522, + "charLength": 10, + "snippet": { + "text": "0x61C88647" + } + }, + "contextRegion": { + "startLine": 145, + "startColumn": 25, + "charOffset": 4494, + "charLength": 10, + "snippet": { + "text": "\t}\n\n\tconst uint32_t delta = 0x61C88647;\n\n\tuint8_t* buffer = msg.getBuffer() + msg.getBufferPosition();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d173cb9eba6d9df769be30d0a9806d2d7778de1ea8c8ad2cc0166255f76e03e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 149, + "startColumn": 36, + "charOffset": 4570, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 147, + "startColumn": 36, + "charOffset": 4498, + "charLength": 1, + "snippet": { + "text": "\tconst uint32_t delta = 0x61C88647;\n\n\tuint8_t* buffer = msg.getBuffer() + msg.getBufferPosition();\n\tauto messageLength = static_cast(msgLength);\n\tint32_t readPos = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6dc3b07f1eb0301c45cda55c7300ba4ef4e90c66133a01edeecfce9835d229a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-todo", + "ruleIndex": 545, + "kind": "fail", + "level": "warning", + "message": { + "text": "missing username/bug in TODO" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 153, + "startColumn": 2, + "charOffset": 4751, + "charLength": 42, + "snippet": { + "text": "// TODO: refactor this for not use c-style" + } + }, + "contextRegion": { + "startLine": 151, + "startColumn": 2, + "charOffset": 4652, + "charLength": 42, + "snippet": { + "text": "\tint32_t readPos = 0;\n\tconst std::array newKey = { key[0], key[1], key[2], key[3] };\n\t// TODO: refactor this for not use c-style\n\tuint32_t precachedControlSum[32][2];\n\tuint32_t sum = 0xC6EF3720;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89a0ea6b9806aa5e0eeab28010cb8a48bf3a3ee7330eb8faf48ac3c3904befc9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-c-arrays", + "ruleIndex": 480, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not declare C-style arrays, use std::array<> instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 154, + "startColumn": 2, + "charOffset": 4795, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 2, + "charOffset": 4674, + "charLength": 8, + "snippet": { + "text": "\tconst std::array newKey = { key[0], key[1], key[2], key[3] };\n\t// TODO: refactor this for not use c-style\n\tuint32_t precachedControlSum[32][2];\n\tuint32_t sum = 0xC6EF3720;\n\tfor (int32_t i = 0; i < 32; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "344740545a1115c17079b504458ec3e3e22ba4614e82e196012739610c484134" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "32 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 154, + "startColumn": 31, + "charOffset": 4824, + "charLength": 2, + "snippet": { + "text": "32" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 31, + "charOffset": 4674, + "charLength": 2, + "snippet": { + "text": "\tconst std::array newKey = { key[0], key[1], key[2], key[3] };\n\t// TODO: refactor this for not use c-style\n\tuint32_t precachedControlSum[32][2];\n\tuint32_t sum = 0xC6EF3720;\n\tfor (int32_t i = 0; i < 32; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "259cfc71407d4967eaad1f1861f6c13fd4a5900a321bec1e18e1258e6a07e437" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xC6EF3720 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 155, + "startColumn": 17, + "charOffset": 4848, + "charLength": 10, + "snippet": { + "text": "0xC6EF3720" + } + }, + "contextRegion": { + "startLine": 153, + "startColumn": 17, + "charOffset": 4750, + "charLength": 10, + "snippet": { + "text": "\t// TODO: refactor this for not use c-style\n\tuint32_t precachedControlSum[32][2];\n\tuint32_t sum = 0xC6EF3720;\n\tfor (int32_t i = 0; i < 32; ++i) {\n\t\tprecachedControlSum[i][0] = (sum + newKey[(sum >> 11) & 3]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ddf354a9231d14877d054350733ea434c71a49c31caffd6ec7710ce41122581f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 156, + "startColumn": 2, + "charOffset": 4861, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 154, + "startColumn": 2, + "charOffset": 4794, + "charLength": 3, + "snippet": { + "text": "\tuint32_t precachedControlSum[32][2];\n\tuint32_t sum = 0xC6EF3720;\n\tfor (int32_t i = 0; i < 32; ++i) {\n\t\tprecachedControlSum[i][0] = (sum + newKey[(sum >> 11) & 3]);\n\t\tsum += delta;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a61b423189e2fd6f19e6302d83e3bf7dac192c3c74451ed31a85ffafeaaf68c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-loop-convert", + "ruleIndex": 620, + "kind": "fail", + "level": "warning", + "message": { + "text": "use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 156, + "startColumn": 2, + "charOffset": 4861, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 154, + "startColumn": 2, + "charOffset": 4794, + "charLength": 3, + "snippet": { + "text": "\tuint32_t precachedControlSum[32][2];\n\tuint32_t sum = 0xC6EF3720;\n\tfor (int32_t i = 0; i < 32; ++i) {\n\t\tprecachedControlSum[i][0] = (sum + newKey[(sum >> 11) & 3]);\n\t\tsum += delta;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62cf7efdd66e663ab1536a6fc82dfa680c4300f961cf2e5be82c1a30e061371c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "32 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 156, + "startColumn": 26, + "charOffset": 4885, + "charLength": 2, + "snippet": { + "text": "32" + } + }, + "contextRegion": { + "startLine": 154, + "startColumn": 26, + "charOffset": 4794, + "charLength": 2, + "snippet": { + "text": "\tuint32_t precachedControlSum[32][2];\n\tuint32_t sum = 0xC6EF3720;\n\tfor (int32_t i = 0; i < 32; ++i) {\n\t\tprecachedControlSum[i][0] = (sum + newKey[(sum >> 11) & 3]);\n\t\tsum += delta;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06ec71ba40dd98e344fcc77b0d32d1db79d8cc2e6da8c0b27cdaf10abf5484b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 3, + "charOffset": 4898, + "charLength": 19, + "snippet": { + "text": "precachedControlSum" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 3, + "charOffset": 4832, + "charLength": 19, + "snippet": { + "text": "\tuint32_t sum = 0xC6EF3720;\n\tfor (int32_t i = 0; i < 32; ++i) {\n\t\tprecachedControlSum[i][0] = (sum + newKey[(sum >> 11) & 3]);\n\t\tsum += delta;\n\t\tprecachedControlSum[i][1] = (sum + newKey[sum & 3]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29a34e251a71cbada40c38993a8783971fe0102422265ba75d138dccd3689764" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 38, + "charOffset": 4933, + "charLength": 6, + "snippet": { + "text": "newKey" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 38, + "charOffset": 4832, + "charLength": 6, + "snippet": { + "text": "\tuint32_t sum = 0xC6EF3720;\n\tfor (int32_t i = 0; i < 32; ++i) {\n\t\tprecachedControlSum[i][0] = (sum + newKey[(sum >> 11) & 3]);\n\t\tsum += delta;\n\t\tprecachedControlSum[i][1] = (sum + newKey[sum & 3]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22155a24cdc98ceb0615522710501abb1bd159534fe0dc4a24d0373f60fddc66" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 53, + "charOffset": 4948, + "charLength": 2, + "snippet": { + "text": "11" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 53, + "charOffset": 4832, + "charLength": 2, + "snippet": { + "text": "\tuint32_t sum = 0xC6EF3720;\n\tfor (int32_t i = 0; i < 32; ++i) {\n\t\tprecachedControlSum[i][0] = (sum + newKey[(sum >> 11) & 3]);\n\t\tsum += delta;\n\t\tprecachedControlSum[i][1] = (sum + newKey[sum & 3]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05c6df72aba9a6fed1afed0a21ed5c7f4816ef4f4af25e362c1544ef7eee74d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "11 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 53, + "charOffset": 4948, + "charLength": 2, + "snippet": { + "text": "11" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 53, + "charOffset": 4832, + "charLength": 2, + "snippet": { + "text": "\tuint32_t sum = 0xC6EF3720;\n\tfor (int32_t i = 0; i < 32; ++i) {\n\t\tprecachedControlSum[i][0] = (sum + newKey[(sum >> 11) & 3]);\n\t\tsum += delta;\n\t\tprecachedControlSum[i][1] = (sum + newKey[sum & 3]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad38c553690fcdbc2e0a67d20162ef7f44f4f55e67b35e876c2aae01df9fa4dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 59, + "charOffset": 4954, + "charLength": 1, + "snippet": { + "text": "3" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 59, + "charOffset": 4832, + "charLength": 1, + "snippet": { + "text": "\tuint32_t sum = 0xC6EF3720;\n\tfor (int32_t i = 0; i < 32; ++i) {\n\t\tprecachedControlSum[i][0] = (sum + newKey[(sum >> 11) & 3]);\n\t\tsum += delta;\n\t\tprecachedControlSum[i][1] = (sum + newKey[sum & 3]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c643d36586c3fb61b8f150a83baa0332d0a31f7cee9244cf8e643ce2f93fe75d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 159, + "startColumn": 3, + "charOffset": 4977, + "charLength": 19, + "snippet": { + "text": "precachedControlSum" + } + }, + "contextRegion": { + "startLine": 157, + "startColumn": 3, + "charOffset": 4896, + "charLength": 19, + "snippet": { + "text": "\t\tprecachedControlSum[i][0] = (sum + newKey[(sum >> 11) & 3]);\n\t\tsum += delta;\n\t\tprecachedControlSum[i][1] = (sum + newKey[sum & 3]);\n\t}\n\twhile (readPos < messageLength) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c2c96daaf9e185bc6c1a63b3e1fcfb177f210594a7e7c5da5f208d3632bc1ad1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 159, + "startColumn": 38, + "charOffset": 5012, + "charLength": 6, + "snippet": { + "text": "newKey" + } + }, + "contextRegion": { + "startLine": 157, + "startColumn": 38, + "charOffset": 4896, + "charLength": 6, + "snippet": { + "text": "\t\tprecachedControlSum[i][0] = (sum + newKey[(sum >> 11) & 3]);\n\t\tsum += delta;\n\t\tprecachedControlSum[i][1] = (sum + newKey[sum & 3]);\n\t}\n\twhile (readPos < messageLength) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1e5d7c2aa9e0f52db8ee544fe9c2e13a17477630d3d3f0003b5cf6964a452b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 159, + "startColumn": 51, + "charOffset": 5025, + "charLength": 1, + "snippet": { + "text": "3" + } + }, + "contextRegion": { + "startLine": 157, + "startColumn": 51, + "charOffset": 4896, + "charLength": 1, + "snippet": { + "text": "\t\tprecachedControlSum[i][0] = (sum + newKey[(sum >> 11) & 3]);\n\t\tsum += delta;\n\t\tprecachedControlSum[i][1] = (sum + newKey[sum & 3]);\n\t}\n\twhile (readPos < messageLength) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac30363d6891124ff6086f67bcb88242fabb38ffc35cbac39f3a8d21830efff6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'messageLength' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 161, + "startColumn": 9, + "charOffset": 5041, + "charLength": 7, + "snippet": { + "text": "readPos" + } + }, + "contextRegion": { + "startLine": 159, + "startColumn": 9, + "charOffset": 4975, + "charLength": 7, + "snippet": { + "text": "\t\tprecachedControlSum[i][1] = (sum + newKey[sum & 3]);\n\t}\n\twhile (readPos < messageLength) {\n\t\tstd::array vData = {};\n\t\tmemcpy(vData.data(), buffer + readPos, 8);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "005cb6663101ac7424d0b4bf65429d7e0878cabc4d286e7e935ee63a50359368" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 163, + "startColumn": 3, + "charOffset": 5108, + "charLength": 6, + "snippet": { + "text": "memcpy" + } + }, + "contextRegion": { + "startLine": 161, + "startColumn": 3, + "charOffset": 5033, + "charLength": 6, + "snippet": { + "text": "\twhile (readPos < messageLength) {\n\t\tstd::array vData = {};\n\t\tmemcpy(vData.data(), buffer + readPos, 8);\n\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[1] -= ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][0];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2049e0b40b3e9757b1cb776a1e269b0b91e17789ce064c4071614473ef185ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 163, + "startColumn": 31, + "charOffset": 5136, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 161, + "startColumn": 31, + "charOffset": 5033, + "charLength": 1, + "snippet": { + "text": "\twhile (readPos < messageLength) {\n\t\tstd::array vData = {};\n\t\tmemcpy(vData.data(), buffer + readPos, 8);\n\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[1] -= ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][0];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08e2551f0bd6d704bd4b63e349e440d487dbf0ce3f0b038c59535085777077d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 163, + "startColumn": 42, + "charOffset": 5147, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 161, + "startColumn": 42, + "charOffset": 5033, + "charLength": 1, + "snippet": { + "text": "\twhile (readPos < messageLength) {\n\t\tstd::array vData = {};\n\t\tmemcpy(vData.data(), buffer + readPos, 8);\n\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[1] -= ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][0];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "349587ba70c0e8494ec23671cba38b788d85f1cf22bf9107f5d42d40838bce55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 164, + "startColumn": 3, + "charOffset": 5153, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 162, + "startColumn": 3, + "charOffset": 5068, + "charLength": 3, + "snippet": { + "text": "\t\tstd::array vData = {};\n\t\tmemcpy(vData.data(), buffer + readPos, 8);\n\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[1] -= ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][0];\n\t\t\tvData[0] -= ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][1];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ead193e7986c427c47a661d23800b19cd7637fd431f6ca2e80335806ac2d803" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-loop-convert", + "ruleIndex": 620, + "kind": "fail", + "level": "warning", + "message": { + "text": "use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 164, + "startColumn": 3, + "charOffset": 5153, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 162, + "startColumn": 3, + "charOffset": 5068, + "charLength": 3, + "snippet": { + "text": "\t\tstd::array vData = {};\n\t\tmemcpy(vData.data(), buffer + readPos, 8);\n\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[1] -= ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][0];\n\t\t\tvData[0] -= ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][1];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a11b24ee0a74d553fba51f3464475441cd2947de332b3845990fb9ce8afc8a71" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "32 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 164, + "startColumn": 27, + "charOffset": 5177, + "charLength": 2, + "snippet": { + "text": "32" + } + }, + "contextRegion": { + "startLine": 162, + "startColumn": 27, + "charOffset": 5068, + "charLength": 2, + "snippet": { + "text": "\t\tstd::array vData = {};\n\t\tmemcpy(vData.data(), buffer + readPos, 8);\n\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[1] -= ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][0];\n\t\t\tvData[0] -= ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][1];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ddfdffb0cd8fd4b7480b398b1c567af4a57dfb9710773dc9301ba609d5be7051" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 165, + "startColumn": 30, + "charOffset": 5217, + "charLength": 1, + "snippet": { + "text": "4" + } + }, + "contextRegion": { + "startLine": 163, + "startColumn": 30, + "charOffset": 5106, + "charLength": 1, + "snippet": { + "text": "\t\tmemcpy(vData.data(), buffer + readPos, 8);\n\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[1] -= ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][0];\n\t\t\tvData[0] -= ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][1];\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e731685d218d8a349ea6307678bd15faace9340da0c6df7bfd57974270948f00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 165, + "startColumn": 46, + "charOffset": 5233, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 163, + "startColumn": 46, + "charOffset": 5106, + "charLength": 1, + "snippet": { + "text": "\t\tmemcpy(vData.data(), buffer + readPos, 8);\n\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[1] -= ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][0];\n\t\t\tvData[0] -= ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][1];\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc4b0e7e32acb1e54716ceeb6ede708f5af246abbd0d430cf0b374bc2357c5bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 165, + "startColumn": 46, + "charOffset": 5233, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 163, + "startColumn": 46, + "charOffset": 5106, + "charLength": 1, + "snippet": { + "text": "\t\tmemcpy(vData.data(), buffer + readPos, 8);\n\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[1] -= ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][0];\n\t\t\tvData[0] -= ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][1];\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98dabf4ccbe35785c7f5493b5eecbe132abf34a909c3d57c1331a91aed8a57d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 165, + "startColumn": 63, + "charOffset": 5250, + "charLength": 19, + "snippet": { + "text": "precachedControlSum" + } + }, + "contextRegion": { + "startLine": 163, + "startColumn": 63, + "charOffset": 5106, + "charLength": 19, + "snippet": { + "text": "\t\tmemcpy(vData.data(), buffer + readPos, 8);\n\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[1] -= ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][0];\n\t\t\tvData[0] -= ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][1];\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34e33954ed51c81fd75b1f1dffeb9cc2a80fece5983166f7eb802b8a41680374" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 166, + "startColumn": 30, + "charOffset": 5306, + "charLength": 1, + "snippet": { + "text": "4" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 30, + "charOffset": 5151, + "charLength": 1, + "snippet": { + "text": "\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[1] -= ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][0];\n\t\t\tvData[0] -= ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][1];\n\t\t}\n\t\tmemcpy(buffer + readPos, vData.data(), 8);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8b26531986b74cd1eec3a287976afe026639100c2bd26bf66f7ddf03e37b1fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 166, + "startColumn": 46, + "charOffset": 5322, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 46, + "charOffset": 5151, + "charLength": 1, + "snippet": { + "text": "\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[1] -= ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][0];\n\t\t\tvData[0] -= ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][1];\n\t\t}\n\t\tmemcpy(buffer + readPos, vData.data(), 8);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8752a0dbab5773bce36278d8a0a6e2fcf87705918c9a4dcf59304e2825807a4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 166, + "startColumn": 46, + "charOffset": 5322, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 46, + "charOffset": 5151, + "charLength": 1, + "snippet": { + "text": "\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[1] -= ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][0];\n\t\t\tvData[0] -= ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][1];\n\t\t}\n\t\tmemcpy(buffer + readPos, vData.data(), 8);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55ac839a9c6cb0a00f2fda4170bb17c34deebb2889d07d130283587e09a79312" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 166, + "startColumn": 63, + "charOffset": 5339, + "charLength": 19, + "snippet": { + "text": "precachedControlSum" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 63, + "charOffset": 5151, + "charLength": 19, + "snippet": { + "text": "\t\tfor (int32_t i = 0; i < 32; ++i) {\n\t\t\tvData[1] -= ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][0];\n\t\t\tvData[0] -= ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][1];\n\t\t}\n\t\tmemcpy(buffer + readPos, vData.data(), 8);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c38714d405a092f826fa784458d059699dd2ccb6655ebe6d9098bb193e4535fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 168, + "startColumn": 3, + "charOffset": 5372, + "charLength": 6, + "snippet": { + "text": "memcpy" + } + }, + "contextRegion": { + "startLine": 166, + "startColumn": 3, + "charOffset": 5277, + "charLength": 6, + "snippet": { + "text": "\t\t\tvData[0] -= ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][1];\n\t\t}\n\t\tmemcpy(buffer + readPos, vData.data(), 8);\n\t\treadPos += 8;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0b8d9f8a8f55cda78072f953557480bf24df62d9d37e63b7b4d84fa6af0b3bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 168, + "startColumn": 17, + "charOffset": 5386, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 166, + "startColumn": 17, + "charOffset": 5277, + "charLength": 1, + "snippet": { + "text": "\t\t\tvData[0] -= ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][1];\n\t\t}\n\t\tmemcpy(buffer + readPos, vData.data(), 8);\n\t\treadPos += 8;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c27251c125a1bc520f06e29c5e739c5874db8eca2f2c05e42c1aceed858cb92e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 168, + "startColumn": 42, + "charOffset": 5411, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 166, + "startColumn": 42, + "charOffset": 5277, + "charLength": 1, + "snippet": { + "text": "\t\t\tvData[0] -= ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][1];\n\t\t}\n\t\tmemcpy(buffer + readPos, vData.data(), 8);\n\t\treadPos += 8;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0858c665d6c614bab1df3a8828842912b7cfdafc20c954b7b6f53df68f23cc77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 169, + "startColumn": 14, + "charOffset": 5428, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 167, + "startColumn": 14, + "charOffset": 5366, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\t\tmemcpy(buffer + readPos, vData.data(), 8);\n\t\treadPos += 8;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6f63279cf7fd153cbfc5df0bcc4bd46d4d850855d5107c339af10ac7f4d91f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 2, + "charOffset": 5436, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 2, + "charOffset": 5431, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tuint16_t innerLength = msg.get();\n\tif (std::cmp_greater(innerLength, msgLength - 2)) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d51d0c153639479ddf8978d2bbd819e7a334deb56a3c6dec12d4a8682656467" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "128 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 182, + "startColumn": 52, + "charOffset": 5700, + "charLength": 3, + "snippet": { + "text": "128" + } + }, + "contextRegion": { + "startLine": 180, + "startColumn": 52, + "charOffset": 5598, + "charLength": 3, + "snippet": { + "text": "\nbool Protocol::RSA_decrypt(NetworkMessage &msg) {\n\tif ((msg.getLength() - msg.getBufferPosition()) < 128) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa60c1b968929c535fd866200630a88850ad9972e5a0a473fbc16f94113b6756" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto charData' can be declared as 'auto *charData'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 186, + "startColumn": 2, + "charOffset": 5728, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 184, + "startColumn": 2, + "charOffset": 5723, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tauto charData = static_cast(static_cast(msg.getBuffer()));\n\t// Does not break strict aliasing\n\tg_RSA().decrypt(charData + msg.getBufferPosition());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e69afa4ea18ebbe36c14e98c8c7b526594161309d4d1128b6b2b7114b65db48" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-8", + "ruleIndex": 440, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-8: An object with integer type or pointer to void type shall not be converted to an object with pointer type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 186, + "startColumn": 18, + "charOffset": 5744, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 184, + "startColumn": 18, + "charOffset": 5723, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\tauto charData = static_cast(static_cast(msg.getBuffer()));\n\t// Does not break strict aliasing\n\tg_RSA().decrypt(charData + msg.getBufferPosition());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92e9034926ca92802b9b776d3c025979744bf118d0ffd4668fbf97b7c5bf102f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-casting-through-void", + "ruleIndex": 46, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not cast 'uint8_t *' (aka 'unsigned char *') to 'char *' through 'void *'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 186, + "startColumn": 37, + "charOffset": 5763, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 184, + "startColumn": 37, + "charOffset": 5723, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\tauto charData = static_cast(static_cast(msg.getBuffer()));\n\t// Does not break strict aliasing\n\tg_RSA().decrypt(charData + msg.getBufferPosition());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25b29e74cdd9ae402f2be9d58c67efb77aa74b3ff0afdcc7de0b1f71a5cc1bab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 188, + "startColumn": 27, + "charOffset": 5862, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 186, + "startColumn": 27, + "charOffset": 5727, + "charLength": 1, + "snippet": { + "text": "\tauto charData = static_cast(static_cast(msg.getBuffer()));\n\t// Does not break strict aliasing\n\tg_RSA().decrypt(charData + msg.getBufferPosition());\n\treturn (msg.getByte() == 0);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e306c009fdb51e5ffcf9fcaaa735d06d95338f91902fcf8160edbcee633b7f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 206, + "startColumn": 6, + "charOffset": 6268, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 204, + "startColumn": 6, + "charOffset": 6189, + "charLength": 1, + "snippet": { + "text": "\n\tstatic const thread_local auto &compress = std::make_unique();\n\tif (!compress->stream) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac1a89bfc210e2249e5ae76f81b6cdde51b0608616867afd41dbec57e6f5ed43" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-reinterpret-cast", + "ruleIndex": 511, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use reinterpret_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 218, + "startColumn": 31, + "charOffset": 6713, + "charLength": 16, + "snippet": { + "text": "reinterpret_cast" + } + }, + "contextRegion": { + "startLine": 216, + "startColumn": 31, + "charOffset": 6582, + "charLength": 16, + "snippet": { + "text": "\tcompress->stream->next_in = msg.getOutputBuffer();\n\tcompress->stream->avail_in = outputMessageSize;\n\tcompress->stream->next_out = reinterpret_cast(compress->buffer.data());\n\tcompress->stream->avail_out = NETWORKMESSAGE_MAXSIZE;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81d470177b836365bf589bd66ad62a7553f5e5bf79730e132258267dbef18d96" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocol.cpp" + }, + "region": { + "startLine": 227, + "startColumn": 2, + "charOffset": 7001, + "charLength": 12, + "snippet": { + "text": "deflateReset" + } + }, + "contextRegion": { + "startLine": 225, + "startColumn": 2, + "charOffset": 6946, + "charLength": 12, + "snippet": { + "text": "\n\tconst auto totalSize = compress->stream->total_out;\n\tdeflateReset(compress->stream.get());\n\n\tif (totalSize == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de0d511b4bbfa746385a5666ecb08d933d81a9837551ea9af95461c24041bd14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 3, + "charOffset": 2405, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 3, + "charOffset": 2321, + "charLength": 3, + "snippet": { + "text": "\tuint16_t getIterationIncreaseCount(T &map) {\n\t\tuint16_t totalIterationCount = 0;\n\t\tfor ([[maybe_unused]] const auto &[first, second] : map) {\n\t\t\ttotalIterationCount++;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9745188c8580634fd00be76e76e573e4632846b736ad79146ee86f56c66ccebb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 69, + "startColumn": 3, + "charOffset": 2645, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 67, + "startColumn": 3, + "charOffset": 2552, + "charLength": 3, + "snippet": { + "text": "\tuint16_t getVectorIterationIncreaseCount(T &vector) {\n\t\tuint16_t totalIterationCount = 0;\n\t\tfor ([[maybe_unused]] const auto &vectorIteration : vector) {\n\t\t\ttotalIterationCount++;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ca1b9f46b2ac25729ca835b07a822f4be957701ca204c6fd19ba18163538ad6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 73, + "charOffset": 2844, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 73, + "charOffset": 2768, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tvoid addOutfitAndMountBytes(NetworkMessage &msg, std::shared_ptr item, const CustomAttribute* attribute, const std::string &head, const std::string &body, const std::string &legs, const std::string &feet, bool addAddon = false, bool addByte = false) {\n\t\tauto look = attribute->getAttribute();\n\t\tmsg.add(look);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4cdce20e80dfb0f553e4a9eb3dc1547c4c703dd4dd899ebf3f923aad5f633a44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-default-arguments-declarations", + "ruleIndex": 523, + "kind": "fail", + "level": "warning", + "message": { + "text": "declaring a parameter with a default argument is disallowed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 213, + "charOffset": 2984, + "charLength": 4, + "snippet": { + "text": "bool" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 213, + "charOffset": 2768, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tvoid addOutfitAndMountBytes(NetworkMessage &msg, std::shared_ptr item, const CustomAttribute* attribute, const std::string &head, const std::string &body, const std::string &legs, const std::string &feet, bool addAddon = false, bool addByte = false) {\n\t\tauto look = attribute->getAttribute();\n\t\tmsg.add(look);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9b5b1099fad615f889d295d3d0fe860e31c3a279b69fa46844482cd6967f672" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-default-arguments-declarations", + "ruleIndex": 523, + "kind": "fail", + "level": "warning", + "message": { + "text": "declaring a parameter with a default argument is disallowed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 236, + "charOffset": 3007, + "charLength": 4, + "snippet": { + "text": "bool" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 236, + "charOffset": 2768, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tvoid addOutfitAndMountBytes(NetworkMessage &msg, std::shared_ptr item, const CustomAttribute* attribute, const std::string &head, const std::string &body, const std::string &legs, const std::string &feet, bool addAddon = false, bool addByte = false) {\n\t\tauto look = attribute->getAttribute();\n\t\tmsg.add(look);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4a10cbfdbff5941910add931a799f3614d3a8a6fafb9be518984fb5e4e9adfa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto lookHead' can be declared as 'const auto *const lookHead'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 80, + "startColumn": 4, + "charOffset": 3131, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 78, + "startColumn": 4, + "charOffset": 3082, + "charLength": 5, + "snippet": { + "text": "\t\tmsg.add(look);\n\t\tif (look != 0) {\n\t\t\tconst auto lookHead = item->getCustomAttribute(head);\n\t\t\tconst auto lookBody = item->getCustomAttribute(body);\n\t\t\tconst auto lookLegs = item->getCustomAttribute(legs);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "039f6cfc1c6f848525ac2d452403bd98548f8ed28cb3ce728499b47ee7576419" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto lookBody' can be declared as 'const auto *const lookBody'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 81, + "startColumn": 4, + "charOffset": 3188, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 79, + "startColumn": 4, + "charOffset": 3109, + "charLength": 5, + "snippet": { + "text": "\t\tif (look != 0) {\n\t\t\tconst auto lookHead = item->getCustomAttribute(head);\n\t\t\tconst auto lookBody = item->getCustomAttribute(body);\n\t\t\tconst auto lookLegs = item->getCustomAttribute(legs);\n\t\t\tconst auto lookFeet = item->getCustomAttribute(feet);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "022b4867a90cdc9b311c7a7623a0f7fd0dc31d0d441ab124a760cf20417c2ae0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto lookLegs' can be declared as 'const auto *const lookLegs'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 82, + "startColumn": 4, + "charOffset": 3245, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 4, + "charOffset": 3128, + "charLength": 5, + "snippet": { + "text": "\t\t\tconst auto lookHead = item->getCustomAttribute(head);\n\t\t\tconst auto lookBody = item->getCustomAttribute(body);\n\t\t\tconst auto lookLegs = item->getCustomAttribute(legs);\n\t\t\tconst auto lookFeet = item->getCustomAttribute(feet);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff76cf055df44a119606fcaa0865cfdd04332e08a00667dae6f2edfde87ceb11" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto lookFeet' can be declared as 'const auto *const lookFeet'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 83, + "startColumn": 4, + "charOffset": 3302, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 81, + "startColumn": 4, + "charOffset": 3185, + "charLength": 5, + "snippet": { + "text": "\t\t\tconst auto lookBody = item->getCustomAttribute(body);\n\t\t\tconst auto lookLegs = item->getCustomAttribute(legs);\n\t\t\tconst auto lookFeet = item->getCustomAttribute(feet);\n\n\t\t\tmsg.addByte(lookHead ? lookHead->getAttribute() : 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e176d557b03de1690a049cd8af51b5934ca35aebf0a78480e945024773a00bfc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 85, + "startColumn": 16, + "charOffset": 3372, + "charLength": 8, + "snippet": { + "text": "lookHead" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 16, + "charOffset": 3299, + "charLength": 8, + "snippet": { + "text": "\t\t\tconst auto lookFeet = item->getCustomAttribute(feet);\n\n\t\t\tmsg.addByte(lookHead ? lookHead->getAttribute() : 0);\n\t\t\tmsg.addByte(lookBody ? lookBody->getAttribute() : 0);\n\t\t\tmsg.addByte(lookLegs ? lookLegs->getAttribute() : 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7bfd4ca070112299d18290d214aba2aaab2099d01ed68197c4ca107df7a3f0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 85, + "startColumn": 16, + "charOffset": 3372, + "charLength": 8, + "snippet": { + "text": "lookHead" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 16, + "charOffset": 3299, + "charLength": 8, + "snippet": { + "text": "\t\t\tconst auto lookFeet = item->getCustomAttribute(feet);\n\n\t\t\tmsg.addByte(lookHead ? lookHead->getAttribute() : 0);\n\t\t\tmsg.addByte(lookBody ? lookBody->getAttribute() : 0);\n\t\t\tmsg.addByte(lookLegs ? lookLegs->getAttribute() : 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8012deb8f3bab5a47063a1756caa58c40a28a923115b1664f220e75462ee2f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 85, + "startColumn": 16, + "charOffset": 3372, + "charLength": 8, + "snippet": { + "text": "lookHead" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 16, + "charOffset": 3299, + "charLength": 8, + "snippet": { + "text": "\t\t\tconst auto lookFeet = item->getCustomAttribute(feet);\n\n\t\t\tmsg.addByte(lookHead ? lookHead->getAttribute() : 0);\n\t\t\tmsg.addByte(lookBody ? lookBody->getAttribute() : 0);\n\t\t\tmsg.addByte(lookLegs ? lookLegs->getAttribute() : 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e63493add6849680f7d95b7f5c6df4d30c424fc31c7f0be2e4f17b8a77e5f2d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 86, + "startColumn": 16, + "charOffset": 3438, + "charLength": 8, + "snippet": { + "text": "lookBody" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 16, + "charOffset": 3356, + "charLength": 8, + "snippet": { + "text": "\n\t\t\tmsg.addByte(lookHead ? lookHead->getAttribute() : 0);\n\t\t\tmsg.addByte(lookBody ? lookBody->getAttribute() : 0);\n\t\t\tmsg.addByte(lookLegs ? lookLegs->getAttribute() : 0);\n\t\t\tmsg.addByte(lookFeet ? lookFeet->getAttribute() : 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b1efb40343f4568cbc345cf4ce6283ffd444244c9a8e7c672727fda2e1e5506" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 86, + "startColumn": 16, + "charOffset": 3438, + "charLength": 8, + "snippet": { + "text": "lookBody" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 16, + "charOffset": 3356, + "charLength": 8, + "snippet": { + "text": "\n\t\t\tmsg.addByte(lookHead ? lookHead->getAttribute() : 0);\n\t\t\tmsg.addByte(lookBody ? lookBody->getAttribute() : 0);\n\t\t\tmsg.addByte(lookLegs ? lookLegs->getAttribute() : 0);\n\t\t\tmsg.addByte(lookFeet ? lookFeet->getAttribute() : 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7b929150b890ed373843ada5122276930bfbe610d4ba80f992571c065928b09" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 86, + "startColumn": 16, + "charOffset": 3438, + "charLength": 8, + "snippet": { + "text": "lookBody" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 16, + "charOffset": 3356, + "charLength": 8, + "snippet": { + "text": "\n\t\t\tmsg.addByte(lookHead ? lookHead->getAttribute() : 0);\n\t\t\tmsg.addByte(lookBody ? lookBody->getAttribute() : 0);\n\t\t\tmsg.addByte(lookLegs ? lookLegs->getAttribute() : 0);\n\t\t\tmsg.addByte(lookFeet ? lookFeet->getAttribute() : 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "944b4830c4c8d1e2e9ae5a2ed2af687c8e1260f025153390222099146a9a745c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 16, + "charOffset": 3504, + "charLength": 8, + "snippet": { + "text": "lookLegs" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 16, + "charOffset": 3357, + "charLength": 8, + "snippet": { + "text": "\t\t\tmsg.addByte(lookHead ? lookHead->getAttribute() : 0);\n\t\t\tmsg.addByte(lookBody ? lookBody->getAttribute() : 0);\n\t\t\tmsg.addByte(lookLegs ? lookLegs->getAttribute() : 0);\n\t\t\tmsg.addByte(lookFeet ? lookFeet->getAttribute() : 0);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae50160b9fda286928a0b79a9f5a8f1c101727a2d47c4eaca66a38d6d06a1ce7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 16, + "charOffset": 3504, + "charLength": 8, + "snippet": { + "text": "lookLegs" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 16, + "charOffset": 3357, + "charLength": 8, + "snippet": { + "text": "\t\t\tmsg.addByte(lookHead ? lookHead->getAttribute() : 0);\n\t\t\tmsg.addByte(lookBody ? lookBody->getAttribute() : 0);\n\t\t\tmsg.addByte(lookLegs ? lookLegs->getAttribute() : 0);\n\t\t\tmsg.addByte(lookFeet ? lookFeet->getAttribute() : 0);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb6f9d643f1992541c55f0c5a5aa63d602df6ebb63be4d7ff6d68448e35b00c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 16, + "charOffset": 3504, + "charLength": 8, + "snippet": { + "text": "lookLegs" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 16, + "charOffset": 3357, + "charLength": 8, + "snippet": { + "text": "\t\t\tmsg.addByte(lookHead ? lookHead->getAttribute() : 0);\n\t\t\tmsg.addByte(lookBody ? lookBody->getAttribute() : 0);\n\t\t\tmsg.addByte(lookLegs ? lookLegs->getAttribute() : 0);\n\t\t\tmsg.addByte(lookFeet ? lookFeet->getAttribute() : 0);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "330fd7da4ad0d2c85239ef37062eb1fae8fd9654b094c080c8ce12bdce9057a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 88, + "startColumn": 16, + "charOffset": 3570, + "charLength": 8, + "snippet": { + "text": "lookFeet" + } + }, + "contextRegion": { + "startLine": 86, + "startColumn": 16, + "charOffset": 3423, + "charLength": 8, + "snippet": { + "text": "\t\t\tmsg.addByte(lookBody ? lookBody->getAttribute() : 0);\n\t\t\tmsg.addByte(lookLegs ? lookLegs->getAttribute() : 0);\n\t\t\tmsg.addByte(lookFeet ? lookFeet->getAttribute() : 0);\n\n\t\t\tif (addAddon) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39a29dcb38a03c3286ad0e35358ec4d74daeda01ad55f07459610af9d00a92d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 88, + "startColumn": 16, + "charOffset": 3570, + "charLength": 8, + "snippet": { + "text": "lookFeet" + } + }, + "contextRegion": { + "startLine": 86, + "startColumn": 16, + "charOffset": 3423, + "charLength": 8, + "snippet": { + "text": "\t\t\tmsg.addByte(lookBody ? lookBody->getAttribute() : 0);\n\t\t\tmsg.addByte(lookLegs ? lookLegs->getAttribute() : 0);\n\t\t\tmsg.addByte(lookFeet ? lookFeet->getAttribute() : 0);\n\n\t\t\tif (addAddon) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ba8f2c10facb89dbee60aeec58cd7b9ca2e0de8a5dc785e7cc593ec2f3ed0b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 88, + "startColumn": 16, + "charOffset": 3570, + "charLength": 8, + "snippet": { + "text": "lookFeet" + } + }, + "contextRegion": { + "startLine": 86, + "startColumn": 16, + "charOffset": 3423, + "charLength": 8, + "snippet": { + "text": "\t\t\tmsg.addByte(lookBody ? lookBody->getAttribute() : 0);\n\t\t\tmsg.addByte(lookLegs ? lookLegs->getAttribute() : 0);\n\t\t\tmsg.addByte(lookFeet ? lookFeet->getAttribute() : 0);\n\n\t\t\tif (addAddon) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc8d131ff77998d5242c4d97e0f6565812326b393a37a410e2228e090fd5e93a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto lookAddons' can be declared as 'const auto *const lookAddons'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 5, + "charOffset": 3645, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 5, + "charOffset": 3621, + "charLength": 5, + "snippet": { + "text": "\n\t\t\tif (addAddon) {\n\t\t\t\tconst auto lookAddons = item->getCustomAttribute(\"LookAddons\");\n\t\t\t\tmsg.addByte(lookAddons ? lookAddons->getAttribute() : 0);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a99200a33b871062785dbfe19d816d2dbc3908288c9b86d0fcd54293278120b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 92, + "startColumn": 17, + "charOffset": 3725, + "charLength": 10, + "snippet": { + "text": "lookAddons" + } + }, + "contextRegion": { + "startLine": 90, + "startColumn": 17, + "charOffset": 3622, + "charLength": 10, + "snippet": { + "text": "\t\t\tif (addAddon) {\n\t\t\t\tconst auto lookAddons = item->getCustomAttribute(\"LookAddons\");\n\t\t\t\tmsg.addByte(lookAddons ? lookAddons->getAttribute() : 0);\n\t\t\t}\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c2abfe04fdba0085ef49afcec3987a92cd41a4ac16eff34358bc1960ceb8bc13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 92, + "startColumn": 17, + "charOffset": 3725, + "charLength": 10, + "snippet": { + "text": "lookAddons" + } + }, + "contextRegion": { + "startLine": 90, + "startColumn": 17, + "charOffset": 3622, + "charLength": 10, + "snippet": { + "text": "\t\t\tif (addAddon) {\n\t\t\t\tconst auto lookAddons = item->getCustomAttribute(\"LookAddons\");\n\t\t\t\tmsg.addByte(lookAddons ? lookAddons->getAttribute() : 0);\n\t\t\t}\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f9749744b3dcaa75ed38e88f8adab9da1a6ba166ec5e5088223d6d4ff13cf05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 92, + "startColumn": 17, + "charOffset": 3725, + "charLength": 10, + "snippet": { + "text": "lookAddons" + } + }, + "contextRegion": { + "startLine": 90, + "startColumn": 17, + "charOffset": 3622, + "charLength": 10, + "snippet": { + "text": "\t\t\tif (addAddon) {\n\t\t\t\tconst auto lookAddons = item->getCustomAttribute(\"LookAddons\");\n\t\t\t\tmsg.addByte(lookAddons ? lookAddons->getAttribute() : 0);\n\t\t\t}\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce530e80c6840145c4d27e069cf4125b61b00f7ccd6c1abed255c2216476ba39" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "3 adjacent parameters of 'sendBosstiarySlotsBytes' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 102, + "startColumn": 52, + "charOffset": 3950, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 100, + "startColumn": 52, + "charOffset": 3852, + "charLength": 7, + "snippet": { + "text": "\n\t// Send bytes function for avoid repetitions\n\tvoid sendBosstiarySlotsBytes(NetworkMessage &msg, uint8_t bossRace, uint32_t bossKillCount, uint16_t bonusBossSlotOne, uint8_t killBonus, uint8_t isSlotOneInactive, uint32_t removePrice) {\n\t\tmsg.addByte(bossRace); // Boss Race\n\t\tmsg.add(bossKillCount); // Kill Count" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa0e02c2bf6ad75cc7ec59debb1715635b3ea740c393451b565f3906cce9a02d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 121, + "startColumn": 74, + "charOffset": 5144, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 119, + "startColumn": 74, + "charOffset": 4977, + "charLength": 6, + "snippet": { + "text": "\t * @param player Pointer to the player for whom the imbuement damage should be handled.\n\t */\n\tvoid handleImbuementDamage(NetworkMessage &msg, std::shared_ptr player) {\n\t\tbool imbueDmg = false;\n\t\tstd::shared_ptr weapon = player->getWeapon();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50c545e303175357e38c8638037d5fe72ab6dc0612e7d13a0ccaef4b5a410aa5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 127, + "startColumn": 5, + "charOffset": 5336, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 125, + "startColumn": 5, + "charOffset": 5249, + "charLength": 3, + "snippet": { + "text": "\t\t\tuint8_t slots = Item::items[weapon->getID()].imbuementSlot;\n\t\t\tif (slots > 0) {\n\t\t\t\tfor (uint8_t i = 0; i < slots; i++) {\n\t\t\t\t\tImbuementInfo imbuementInfo;\n\t\t\t\t\tif (!weapon->getImbuementInfo(i, &imbuementInfo)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7782260d7c9745f34300d641bd8e0b51ea5ace34e769440a3f4af65d1b0749da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'slots' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 127, + "startColumn": 25, + "charOffset": 5356, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 125, + "startColumn": 25, + "charOffset": 5249, + "charLength": 1, + "snippet": { + "text": "\t\t\tuint8_t slots = Item::items[weapon->getID()].imbuementSlot;\n\t\t\tif (slots > 0) {\n\t\t\t\tfor (uint8_t i = 0; i < slots; i++) {\n\t\t\t\t\tImbuementInfo imbuementInfo;\n\t\t\t\t\tif (!weapon->getImbuementInfo(i, &imbuementInfo)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45285b242d950fec8258edcaf44c690b496d51a5490d81e3fcaa85a14c9a4a15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 136, + "startColumn": 20, + "charOffset": 5645, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 20, + "charOffset": 5528, + "charLength": 11, + "snippet": { + "text": "\t\t\t\t\t\tauto imbuement = *imbuementInfo.imbuement;\n\t\t\t\t\t\tif (imbuement.combatType != COMBAT_NONE) {\n\t\t\t\t\t\t\tmsg.addByte(static_cast(imbuement.elementDamage));\n\t\t\t\t\t\t\tmsg.addByte(getCipbiaElement(imbuement.combatType));\n\t\t\t\t\t\t\timbueDmg = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "067994b0994414e1038121b373648942aadaed13ce2e2a4f72057ec5486ea069" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'calculateAbsorbValues' has cognitive complexity of 36 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 159, + "startColumn": 7, + "charOffset": 6275, + "charLength": 21, + "snippet": { + "text": "calculateAbsorbValues" + } + }, + "contextRegion": { + "startLine": 157, + "startColumn": 7, + "charOffset": 6179, + "charLength": 21, + "snippet": { + "text": "\t * @param[in] player The pointer to the player whose equipped items are considered.\n\t */\n\tvoid calculateAbsorbValues(std::shared_ptr player, NetworkMessage &msg, uint8_t &combats) {\n\t\talignas(16) uint16_t damageModifiers[COMBAT_COUNT] = { 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000 };\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e90423e26aef753efe5a18b53f695d8393167fbc983cd23b9c6548283170336" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 159, + "startColumn": 53, + "charOffset": 6321, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 157, + "startColumn": 53, + "charOffset": 6179, + "charLength": 6, + "snippet": { + "text": "\t * @param[in] player The pointer to the player whose equipped items are considered.\n\t */\n\tvoid calculateAbsorbValues(std::shared_ptr player, NetworkMessage &msg, uint8_t &combats) {\n\t\talignas(16) uint16_t damageModifiers[COMBAT_COUNT] = { 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000 };\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66b39c716c52a65a3b4aaa7e297c0b101006311dedb6d8145e5c44d7aae7f191" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 160, + "startColumn": 11, + "charOffset": 6380, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 11, + "charOffset": 6264, + "charLength": 2, + "snippet": { + "text": "\t */\n\tvoid calculateAbsorbValues(std::shared_ptr player, NetworkMessage &msg, uint8_t &combats) {\n\t\talignas(16) uint16_t damageModifiers[COMBAT_COUNT] = { 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000 };\n\n\t\tfor (int32_t slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; ++slot) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a779828583a97c5d54fa33dbeea1c8b5f86a8d3e0ce083ba79088131f55bfef1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-c-arrays", + "ruleIndex": 480, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not declare C-style arrays, use std::array<> instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 160, + "startColumn": 15, + "charOffset": 6384, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 15, + "charOffset": 6264, + "charLength": 8, + "snippet": { + "text": "\t */\n\tvoid calculateAbsorbValues(std::shared_ptr player, NetworkMessage &msg, uint8_t &combats) {\n\t\talignas(16) uint16_t damageModifiers[COMBAT_COUNT] = { 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000 };\n\n\t\tfor (int32_t slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; ++slot) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb84a2d0d5a879bddf1a63501e17ad4d7286960f3a0c1af39407a73abe10e31d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 160, + "startColumn": 58, + "charOffset": 6427, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 58, + "charOffset": 6264, + "charLength": 5, + "snippet": { + "text": "\t */\n\tvoid calculateAbsorbValues(std::shared_ptr player, NetworkMessage &msg, uint8_t &combats) {\n\t\talignas(16) uint16_t damageModifiers[COMBAT_COUNT] = { 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000 };\n\n\t\tfor (int32_t slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; ++slot) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f21b5e2c8e74074607bf53c693a78a61d378beab67f6df03cc14342871fb4b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 160, + "startColumn": 65, + "charOffset": 6434, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 65, + "charOffset": 6264, + "charLength": 5, + "snippet": { + "text": "\t */\n\tvoid calculateAbsorbValues(std::shared_ptr player, NetworkMessage &msg, uint8_t &combats) {\n\t\talignas(16) uint16_t damageModifiers[COMBAT_COUNT] = { 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000 };\n\n\t\tfor (int32_t slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; ++slot) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "864b5dffaccd7d6cdf57609f41a54ee6a63acbb877c514e55581c76d585d018f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 160, + "startColumn": 72, + "charOffset": 6441, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 72, + "charOffset": 6264, + "charLength": 5, + "snippet": { + "text": "\t */\n\tvoid calculateAbsorbValues(std::shared_ptr player, NetworkMessage &msg, uint8_t &combats) {\n\t\talignas(16) uint16_t damageModifiers[COMBAT_COUNT] = { 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000 };\n\n\t\tfor (int32_t slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; ++slot) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71bff5657222cde26836854db76f218513df97305f3168d1b8dc52c90f859504" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 160, + "startColumn": 79, + "charOffset": 6448, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 79, + "charOffset": 6264, + "charLength": 5, + "snippet": { + "text": "\t */\n\tvoid calculateAbsorbValues(std::shared_ptr player, NetworkMessage &msg, uint8_t &combats) {\n\t\talignas(16) uint16_t damageModifiers[COMBAT_COUNT] = { 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000 };\n\n\t\tfor (int32_t slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; ++slot) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f35c176ae3b26aa1779001d1138812d6367ad7d05ce70d9d088cd1618096974d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 160, + "startColumn": 86, + "charOffset": 6455, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 86, + "charOffset": 6264, + "charLength": 5, + "snippet": { + "text": "\t */\n\tvoid calculateAbsorbValues(std::shared_ptr player, NetworkMessage &msg, uint8_t &combats) {\n\t\talignas(16) uint16_t damageModifiers[COMBAT_COUNT] = { 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000 };\n\n\t\tfor (int32_t slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; ++slot) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27d7b7a95dccbed7f887a0e6ee3f68c6b196074ff59c114d1ba709b931bef20a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 160, + "startColumn": 93, + "charOffset": 6462, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 93, + "charOffset": 6264, + "charLength": 5, + "snippet": { + "text": "\t */\n\tvoid calculateAbsorbValues(std::shared_ptr player, NetworkMessage &msg, uint8_t &combats) {\n\t\talignas(16) uint16_t damageModifiers[COMBAT_COUNT] = { 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000 };\n\n\t\tfor (int32_t slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; ++slot) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4f0798ed45c45b23b942d0d6ac52dcf8e432870bb29a80bcf36fa764de0824f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 160, + "startColumn": 100, + "charOffset": 6469, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 100, + "charOffset": 6264, + "charLength": 5, + "snippet": { + "text": "\t */\n\tvoid calculateAbsorbValues(std::shared_ptr player, NetworkMessage &msg, uint8_t &combats) {\n\t\talignas(16) uint16_t damageModifiers[COMBAT_COUNT] = { 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000 };\n\n\t\tfor (int32_t slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; ++slot) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5ce31f13458a09650676b55c16297e07df2a43a2387fc690dddccc803b338bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 160, + "startColumn": 107, + "charOffset": 6476, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 107, + "charOffset": 6264, + "charLength": 5, + "snippet": { + "text": "\t */\n\tvoid calculateAbsorbValues(std::shared_ptr player, NetworkMessage &msg, uint8_t &combats) {\n\t\talignas(16) uint16_t damageModifiers[COMBAT_COUNT] = { 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000 };\n\n\t\tfor (int32_t slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; ++slot) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aad9a91619de39e366d04d8f9c70f321893e53b725c9b7051e6a2b59f30faad2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 160, + "startColumn": 114, + "charOffset": 6483, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 114, + "charOffset": 6264, + "charLength": 5, + "snippet": { + "text": "\t */\n\tvoid calculateAbsorbValues(std::shared_ptr player, NetworkMessage &msg, uint8_t &combats) {\n\t\talignas(16) uint16_t damageModifiers[COMBAT_COUNT] = { 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000 };\n\n\t\tfor (int32_t slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; ++slot) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dff9ec93eae0504a554f0dcb25e35722b627d3b841c9c467c2458da154a9ca0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 160, + "startColumn": 121, + "charOffset": 6490, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 121, + "charOffset": 6264, + "charLength": 5, + "snippet": { + "text": "\t */\n\tvoid calculateAbsorbValues(std::shared_ptr player, NetworkMessage &msg, uint8_t &combats) {\n\t\talignas(16) uint16_t damageModifiers[COMBAT_COUNT] = { 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000 };\n\n\t\tfor (int32_t slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; ++slot) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c33219b83fb2f23895da3a8b4bacec87043c9ceb527150231d829b08f219410" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 160, + "startColumn": 128, + "charOffset": 6497, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 128, + "charOffset": 6264, + "charLength": 5, + "snippet": { + "text": "\t */\n\tvoid calculateAbsorbValues(std::shared_ptr player, NetworkMessage &msg, uint8_t &combats) {\n\t\talignas(16) uint16_t damageModifiers[COMBAT_COUNT] = { 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000 };\n\n\t\tfor (int32_t slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; ++slot) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5fb8af9c82a6074a09900ba995b8e98df13ecc350a092afb6c61731d9a61003" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 160, + "startColumn": 135, + "charOffset": 6504, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 135, + "charOffset": 6264, + "charLength": 5, + "snippet": { + "text": "\t */\n\tvoid calculateAbsorbValues(std::shared_ptr player, NetworkMessage &msg, uint8_t &combats) {\n\t\talignas(16) uint16_t damageModifiers[COMBAT_COUNT] = { 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000 };\n\n\t\tfor (int32_t slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; ++slot) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b624083492decb3232aa984d85e645b1e36ca03d9d49f50cc650fc3131cc1690" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 160, + "startColumn": 142, + "charOffset": 6511, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 142, + "charOffset": 6264, + "charLength": 5, + "snippet": { + "text": "\t */\n\tvoid calculateAbsorbValues(std::shared_ptr player, NetworkMessage &msg, uint8_t &combats) {\n\t\talignas(16) uint16_t damageModifiers[COMBAT_COUNT] = { 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000 };\n\n\t\tfor (int32_t slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; ++slot) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f01b36678861b2e6ecdc6acdff627bc33479f1e4418415629163eaaee743abc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 160, + "startColumn": 149, + "charOffset": 6518, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 149, + "charOffset": 6264, + "charLength": 5, + "snippet": { + "text": "\t */\n\tvoid calculateAbsorbValues(std::shared_ptr player, NetworkMessage &msg, uint8_t &combats) {\n\t\talignas(16) uint16_t damageModifiers[COMBAT_COUNT] = { 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000 };\n\n\t\tfor (int32_t slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; ++slot) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4a0e34553462425ee8d2d70d1b780332b532b92f6987034d01262c13797e734" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 168, + "startColumn": 8, + "charOffset": 6784, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 166, + "startColumn": 8, + "charOffset": 6690, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tstd::shared_ptr item = player->getInventoryItem(static_cast(slot));\n\t\t\tif (!item) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6dcf9997adb02593fba9167c52b0b3f55bf8eefe3c4110ecdb550fce87319f4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 173, + "startColumn": 8, + "charOffset": 6878, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 171, + "startColumn": 8, + "charOffset": 6812, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tconst ItemType &itemType = Item::items[item->getID()];\n\t\t\tif (!itemType.abilities) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86f5023c2bb712353ac6f2bb1d025be29c103253cc3a555e0c713c03c6c4485f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 177, + "startColumn": 4, + "charOffset": 6924, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 175, + "startColumn": 4, + "charOffset": 6915, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (uint16_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\tdamageModifiers[i] *= (std::floor(100. - itemType.abilities->absorbPercent[i]) / 100.);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8579792ce2e66337b11901f3bcbf1f7d82f207d7360fc8308549ab575328743" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 178, + "startColumn": 5, + "charOffset": 6974, + "charLength": 15, + "snippet": { + "text": "damageModifiers" + } + }, + "contextRegion": { + "startLine": 176, + "startColumn": 5, + "charOffset": 6920, + "charLength": 15, + "snippet": { + "text": "\n\t\t\tfor (uint16_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\tdamageModifiers[i] *= (std::floor(100. - itemType.abilities->absorbPercent[i]) / 100.);\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d51ad446fa51242f756c758e6cfe02f99435330fb051a44a6ca34191128be1a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'uint16_t' (aka 'unsigned short')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 178, + "startColumn": 27, + "charOffset": 6996, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 176, + "startColumn": 27, + "charOffset": 6920, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tfor (uint16_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\tdamageModifiers[i] *= (std::floor(100. - itemType.abilities->absorbPercent[i]) / 100.);\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aad11f7e4fa22fb42541e5c61fffce0bf39bc3145fe85ce47d446e1eeb678bf0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 178, + "startColumn": 46, + "charOffset": 7015, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 176, + "startColumn": 46, + "charOffset": 6920, + "charLength": 8, + "snippet": { + "text": "\n\t\t\tfor (uint16_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\tdamageModifiers[i] *= (std::floor(100. - itemType.abilities->absorbPercent[i]) / 100.);\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c395ed1e45abfbe4689e197a064b42dedeabed2ec2b44a0011e69308f09d0b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 178, + "startColumn": 46, + "charOffset": 7015, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 176, + "startColumn": 46, + "charOffset": 6920, + "charLength": 8, + "snippet": { + "text": "\n\t\t\tfor (uint16_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\tdamageModifiers[i] *= (std::floor(100. - itemType.abilities->absorbPercent[i]) / 100.);\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1682da3c1736ee9e00c0f96eaf703901411d67177ea620cd6572a7a042783cae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'imbuementSlots' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 183, + "startColumn": 30, + "charOffset": 7178, + "charLength": 6, + "snippet": { + "text": "slotId" + } + }, + "contextRegion": { + "startLine": 181, + "startColumn": 30, + "charOffset": 7068, + "charLength": 6, + "snippet": { + "text": "\t\t\tuint8_t imbuementSlots = itemType.imbuementSlot;\n\t\t\tif (imbuementSlots > 0) {\n\t\t\t\tfor (uint8_t slotId = 0; slotId < imbuementSlots; ++slotId) {\n\t\t\t\t\tImbuementInfo imbuementInfo;\n\t\t\t\t\tif (!item->getImbuementInfo(slotId, &imbuementInfo)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01f674d68bc138aad1ce3c88917e5184d47ef28018f7217f5a9ddcdcb78a91a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 194, + "startColumn": 6, + "charOffset": 7450, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 192, + "startColumn": 6, + "charOffset": 7396, + "charLength": 3, + "snippet": { + "text": "\n\t\t\t\t\tauto imbuement = *imbuementInfo.imbuement;\n\t\t\t\t\tfor (uint16_t combat = 0; combat < COMBAT_COUNT; ++combat) {\n\t\t\t\t\t\tconst int16_t &imbuementAbsorbPercent = imbuement.absorbPercent[combat];\n\t\t\t\t\t\tif (imbuementAbsorbPercent == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ddd789dabcabcbf2e6fe1f065f30a56ec204612ddca6eb5156997412e4bf24f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 195, + "startColumn": 47, + "charOffset": 7557, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 193, + "startColumn": 47, + "charOffset": 7397, + "charLength": 9, + "snippet": { + "text": "\t\t\t\t\tauto imbuement = *imbuementInfo.imbuement;\n\t\t\t\t\tfor (uint16_t combat = 0; combat < COMBAT_COUNT; ++combat) {\n\t\t\t\t\t\tconst int16_t &imbuementAbsorbPercent = imbuement.absorbPercent[combat];\n\t\t\t\t\t\tif (imbuementAbsorbPercent == 0) {\n\t\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1062147f17c8ea5dca241ac5f6bc1dfd71ccdaf0e3ba54189c1c443c1624d45" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 202, + "startColumn": 7, + "charOffset": 7858, + "charLength": 15, + "snippet": { + "text": "damageModifiers" + } + }, + "contextRegion": { + "startLine": 200, + "startColumn": 7, + "charOffset": 7657, + "charLength": 15, + "snippet": { + "text": "\t\t\t\t\t\tg_logger().debug(\"[cyclopedia damage reduction] imbued item {}, reduced {} percent, for element {}\", item->getName(), imbuementAbsorbPercent, combatTypeToName(indexToCombatType(combat)));\n\n\t\t\t\t\t\tdamageModifiers[combat] *= (std::floor(100. - imbuementAbsorbPercent) / 100.);\n\t\t\t\t\t}\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ba8f817a95661d0bbad13c99c560b0f564c323fdce9c51de3ceef646bf074f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'uint16_t' (aka 'unsigned short')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 202, + "startColumn": 34, + "charOffset": 7885, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 200, + "startColumn": 34, + "charOffset": 7657, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\t\tg_logger().debug(\"[cyclopedia damage reduction] imbued item {}, reduced {} percent, for element {}\", item->getName(), imbuementAbsorbPercent, combatTypeToName(indexToCombatType(combat)));\n\n\t\t\t\t\t\tdamageModifiers[combat] *= (std::floor(100. - imbuementAbsorbPercent) / 100.);\n\t\t\t\t\t}\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a379efbea460a35092e4a6f360f584b4b4597e30177cc579c38a46bf45ab9e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 202, + "startColumn": 53, + "charOffset": 7904, + "charLength": 22, + "snippet": { + "text": "imbuementAbsorbPercent" + } + }, + "contextRegion": { + "startLine": 200, + "startColumn": 53, + "charOffset": 7657, + "charLength": 22, + "snippet": { + "text": "\t\t\t\t\t\tg_logger().debug(\"[cyclopedia damage reduction] imbued item {}, reduced {} percent, for element {}\", item->getName(), imbuementAbsorbPercent, combatTypeToName(indexToCombatType(combat)));\n\n\t\t\t\t\t\tdamageModifiers[combat] *= (std::floor(100. - imbuementAbsorbPercent) / 100.);\n\t\t\t\t\t}\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5667fe7cf09320dc550a92afb823b5439142abb7d8f653e6c80ebaf9b57305cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 208, + "startColumn": 3, + "charOffset": 7962, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 206, + "startColumn": 3, + "charOffset": 7955, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\tdamageModifiers[i] -= 100 * player->getAbsorbPercent(indexToCombatType(i));\n\t\t\tif (g_configManager().getBoolean(TOGGLE_WHEELSYSTEM, __FUNCTION__)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ddd789dabcabcbf2e6fe1f065f30a56ec204612ddca6eb5156997412e4bf24f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-3", + "ruleIndex": 458, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-3: The loop-counter shall not be modified within condition or statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 208, + "startColumn": 3, + "charOffset": 7962, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 206, + "startColumn": 3, + "charOffset": 7955, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\tdamageModifiers[i] -= 100 * player->getAbsorbPercent(indexToCombatType(i));\n\t\t\tif (g_configManager().getBoolean(TOGGLE_WHEELSYSTEM, __FUNCTION__)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9242a3ceaec6f2db2e9d911e51c2f874be1e98ac589174c51d4a0ed840b59f35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 209, + "startColumn": 4, + "charOffset": 8009, + "charLength": 15, + "snippet": { + "text": "damageModifiers" + } + }, + "contextRegion": { + "startLine": 207, + "startColumn": 4, + "charOffset": 7959, + "charLength": 15, + "snippet": { + "text": "\n\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\tdamageModifiers[i] -= 100 * player->getAbsorbPercent(indexToCombatType(i));\n\t\t\tif (g_configManager().getBoolean(TOGGLE_WHEELSYSTEM, __FUNCTION__)) {\n\t\t\t\tdamageModifiers[i] -= player->wheel()->getResistance(indexToCombatType(i));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "acdb88fdaf8ced93aa62020be58739396b0a1676cb98d89d5af984e3ae631c4f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 209, + "startColumn": 26, + "charOffset": 8031, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 207, + "startColumn": 26, + "charOffset": 7959, + "charLength": 3, + "snippet": { + "text": "\n\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\tdamageModifiers[i] -= 100 * player->getAbsorbPercent(indexToCombatType(i));\n\t\t\tif (g_configManager().getBoolean(TOGGLE_WHEELSYSTEM, __FUNCTION__)) {\n\t\t\t\tdamageModifiers[i] -= player->wheel()->getResistance(indexToCombatType(i));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e857097e2feaadd34f7ae67d680a353b3bf1ffffb92589d48363fba83c8b927" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 211, + "startColumn": 5, + "charOffset": 8162, + "charLength": 15, + "snippet": { + "text": "damageModifiers" + } + }, + "contextRegion": { + "startLine": 209, + "startColumn": 5, + "charOffset": 8006, + "charLength": 15, + "snippet": { + "text": "\t\t\tdamageModifiers[i] -= 100 * player->getAbsorbPercent(indexToCombatType(i));\n\t\t\tif (g_configManager().getBoolean(TOGGLE_WHEELSYSTEM, __FUNCTION__)) {\n\t\t\t\tdamageModifiers[i] -= player->wheel()->getResistance(indexToCombatType(i));\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ccfac5be0acf3a310e4b2e77631731cafe161470cf27fe8344f58fd5e7af8330" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 214, + "startColumn": 8, + "charOffset": 8251, + "charLength": 15, + "snippet": { + "text": "damageModifiers" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 8, + "charOffset": 8238, + "charLength": 15, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (damageModifiers[i] != 10000) {\n\t\t\t\tint16_t clientModifier = std::clamp(10000 - static_cast(damageModifiers[i]), -10000, 10000);\n\t\t\t\tg_logger().debug(\"[{}] CombatType: {}, Damage Modifier: {}, Resulting Client Modifier: {}\", __FUNCTION__, i, damageModifiers[i], clientModifier);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "649dec1dcb0d8f094a9fd2edfb6f33cbddfd50587ed7475a0a0a5c531d74bcbb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 214, + "startColumn": 30, + "charOffset": 8273, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 30, + "charOffset": 8238, + "charLength": 5, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (damageModifiers[i] != 10000) {\n\t\t\t\tint16_t clientModifier = std::clamp(10000 - static_cast(damageModifiers[i]), -10000, 10000);\n\t\t\t\tg_logger().debug(\"[{}] CombatType: {}, Damage Modifier: {}, Resulting Client Modifier: {}\", __FUNCTION__, i, damageModifiers[i], clientModifier);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc40870a94dd423cf960428347d391cf8f8f3ccefc985d94779aa8057ba1fc52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 215, + "startColumn": 30, + "charOffset": 8311, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 213, + "startColumn": 30, + "charOffset": 8243, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tif (damageModifiers[i] != 10000) {\n\t\t\t\tint16_t clientModifier = std::clamp(10000 - static_cast(damageModifiers[i]), -10000, 10000);\n\t\t\t\tg_logger().debug(\"[{}] CombatType: {}, Damage Modifier: {}, Resulting Client Modifier: {}\", __FUNCTION__, i, damageModifiers[i], clientModifier);\n\t\t\t\tmsg.addByte(getCipbiaElement(indexToCombatType(i)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c98a50979640abba4ec895cd8939ba41d16b9c0832618a4f28652be61bc8f5ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 215, + "startColumn": 30, + "charOffset": 8311, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 213, + "startColumn": 30, + "charOffset": 8243, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tif (damageModifiers[i] != 10000) {\n\t\t\t\tint16_t clientModifier = std::clamp(10000 - static_cast(damageModifiers[i]), -10000, 10000);\n\t\t\t\tg_logger().debug(\"[{}] CombatType: {}, Damage Modifier: {}, Resulting Client Modifier: {}\", __FUNCTION__, i, damageModifiers[i], clientModifier);\n\t\t\t\tmsg.addByte(getCipbiaElement(indexToCombatType(i)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22c6caae1cdfeef7c98985ec6645ab05983e80c7efea5d4ba5819a0b93f0a711" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 215, + "startColumn": 41, + "charOffset": 8322, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 213, + "startColumn": 41, + "charOffset": 8243, + "charLength": 5, + "snippet": { + "text": "\n\t\t\tif (damageModifiers[i] != 10000) {\n\t\t\t\tint16_t clientModifier = std::clamp(10000 - static_cast(damageModifiers[i]), -10000, 10000);\n\t\t\t\tg_logger().debug(\"[{}] CombatType: {}, Damage Modifier: {}, Resulting Client Modifier: {}\", __FUNCTION__, i, damageModifiers[i], clientModifier);\n\t\t\t\tmsg.addByte(getCipbiaElement(indexToCombatType(i)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6d26cd9a50cfa5a4e3ab672d0ce2591b1b5322b0cb00fe6e520fca777fd928c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 215, + "startColumn": 70, + "charOffset": 8351, + "charLength": 15, + "snippet": { + "text": "damageModifiers" + } + }, + "contextRegion": { + "startLine": 213, + "startColumn": 70, + "charOffset": 8243, + "charLength": 15, + "snippet": { + "text": "\n\t\t\tif (damageModifiers[i] != 10000) {\n\t\t\t\tint16_t clientModifier = std::clamp(10000 - static_cast(damageModifiers[i]), -10000, 10000);\n\t\t\t\tg_logger().debug(\"[{}] CombatType: {}, Damage Modifier: {}, Resulting Client Modifier: {}\", __FUNCTION__, i, damageModifiers[i], clientModifier);\n\t\t\t\tmsg.addByte(getCipbiaElement(indexToCombatType(i)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38e7dd63d6ec32f1a2349ed4251f0caa1a980723abb29c3ac8012d2b2cf2abe4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 215, + "startColumn": 92, + "charOffset": 8373, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 213, + "startColumn": 92, + "charOffset": 8243, + "charLength": 5, + "snippet": { + "text": "\n\t\t\tif (damageModifiers[i] != 10000) {\n\t\t\t\tint16_t clientModifier = std::clamp(10000 - static_cast(damageModifiers[i]), -10000, 10000);\n\t\t\t\tg_logger().debug(\"[{}] CombatType: {}, Damage Modifier: {}, Resulting Client Modifier: {}\", __FUNCTION__, i, damageModifiers[i], clientModifier);\n\t\t\t\tmsg.addByte(getCipbiaElement(indexToCombatType(i)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "169fd25b481e84c103e2844b2bcfee65f77967f75e662f8e63fb86372401685f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 215, + "startColumn": 99, + "charOffset": 8380, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 213, + "startColumn": 99, + "charOffset": 8243, + "charLength": 5, + "snippet": { + "text": "\n\t\t\tif (damageModifiers[i] != 10000) {\n\t\t\t\tint16_t clientModifier = std::clamp(10000 - static_cast(damageModifiers[i]), -10000, 10000);\n\t\t\t\tg_logger().debug(\"[{}] CombatType: {}, Damage Modifier: {}, Resulting Client Modifier: {}\", __FUNCTION__, i, damageModifiers[i], clientModifier);\n\t\t\t\tmsg.addByte(getCipbiaElement(indexToCombatType(i)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf91ff350984c072e8a7ff224300614265a2cb7f54eeb87a63795c85a5edb8d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 216, + "startColumn": 114, + "charOffset": 8501, + "charLength": 15, + "snippet": { + "text": "damageModifiers" + } + }, + "contextRegion": { + "startLine": 214, + "startColumn": 114, + "charOffset": 8244, + "charLength": 15, + "snippet": { + "text": "\t\t\tif (damageModifiers[i] != 10000) {\n\t\t\t\tint16_t clientModifier = std::clamp(10000 - static_cast(damageModifiers[i]), -10000, 10000);\n\t\t\t\tg_logger().debug(\"[{}] CombatType: {}, Damage Modifier: {}, Resulting Client Modifier: {}\", __FUNCTION__, i, damageModifiers[i], clientModifier);\n\t\t\t\tmsg.addByte(getCipbiaElement(indexToCombatType(i)));\n\t\t\t\tmsg.add(clientModifier);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b20091e0affaba9beef50f9c248c05d555a7f9f397aa9483a0420178563d6fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-default-arguments-declarations", + "ruleIndex": 523, + "kind": "fail", + "level": "warning", + "message": { + "text": "declaring a parameter with a default argument is disallowed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 234, + "startColumn": 50, + "charOffset": 9049, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 232, + "startColumn": 50, + "charOffset": 8972, + "charLength": 5, + "snippet": { + "text": "\t */\n\ttemplate \n\tvoid sendContainerCategory(NetworkMessage &msg, const std::vector &categories = {}, uint8_t categoryType = 0) {\n\t\tmsg.addByte(categoryType);\n\t\tg_logger().debug(\"Sendding category type '{}', categories total size '{}'\", categoryType, categories.size());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a372d7b72b92580311beb1fa8c0eb81b079f72ad3289b2850b303ddd9f227456" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-default-arguments-declarations", + "ruleIndex": 523, + "kind": "fail", + "level": "warning", + "message": { + "text": "declaring a parameter with a default argument is disallowed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 234, + "startColumn": 89, + "charOffset": 9088, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 232, + "startColumn": 89, + "charOffset": 8972, + "charLength": 7, + "snippet": { + "text": "\t */\n\ttemplate \n\tvoid sendContainerCategory(NetworkMessage &msg, const std::vector &categories = {}, uint8_t categoryType = 0) {\n\t\tmsg.addByte(categoryType);\n\t\tg_logger().debug(\"Sendding category type '{}', categories total size '{}'\", categoryType, categories.size());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5a01dc84977442f5b4e5ae3fc0c2ff67ecd82d4136192a767c00c2f5d9a5f9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 237, + "startColumn": 15, + "charOffset": 9271, + "charLength": 10, + "snippet": { + "text": "categories" + } + }, + "contextRegion": { + "startLine": 235, + "startColumn": 15, + "charOffset": 9116, + "charLength": 10, + "snippet": { + "text": "\t\tmsg.addByte(categoryType);\n\t\tg_logger().debug(\"Sendding category type '{}', categories total size '{}'\", categoryType, categories.size());\n\t\tmsg.addByte(categories.size());\n\t\tfor (auto value : categories) {\n\t\t\tif (value == T::All) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee9ec307c15380e228a61c6e452bad2d96df2a5fc1ceef28c267352fb7f8b3cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 238, + "startColumn": 3, + "charOffset": 9293, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 236, + "startColumn": 3, + "charOffset": 9145, + "charLength": 3, + "snippet": { + "text": "\t\tg_logger().debug(\"Sendding category type '{}', categories total size '{}'\", categoryType, categories.size());\n\t\tmsg.addByte(categories.size());\n\t\tfor (auto value : categories) {\n\t\t\tif (value == T::All) {\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bac094bad8d4a5f0bd5f659446044a99287d72a0b793c0c196404d061d0c7885" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'initConnection' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 251, + "startColumn": 11, + "charOffset": 9816, + "charLength": 14, + "snippet": { + "text": "initConnection" + } + }, + "contextRegion": { + "startLine": 249, + "startColumn": 11, + "charOffset": 9745, + "charLength": 14, + "snippet": { + "text": "\nProtocolGame::ProtocolGame(Connection_ptr initConnection) :\n\tProtocol(initConnection) {\n\tversion = CLIENT_VERSION;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "145f8a6c0fb8743a81dedd2968567b280472f6ee5fa7858d65095641aeaef1be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-prefer-member-initializer", + "ruleIndex": 504, + "kind": "fail", + "level": "warning", + "message": { + "text": "'version' should be initialized in a member initializer of the constructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 252, + "startColumn": 2, + "charOffset": 9835, + "charLength": 7, + "snippet": { + "text": "version" + } + }, + "contextRegion": { + "startLine": 250, + "startColumn": 2, + "charOffset": 9746, + "charLength": 7, + "snippet": { + "text": "ProtocolGame::ProtocolGame(Connection_ptr initConnection) :\n\tProtocol(initConnection) {\n\tversion = CLIENT_VERSION;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68e3cc25671937fe7e9315e2e041c19e5fe23077eed1c59aa7c5ddb1ba696c85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 252, + "startColumn": 12, + "charOffset": 9845, + "charLength": 14, + "snippet": { + "text": "CLIENT_VERSION" + } + }, + "contextRegion": { + "startLine": 250, + "startColumn": 12, + "charOffset": 9746, + "charLength": 14, + "snippet": { + "text": "ProtocolGame::ProtocolGame(Connection_ptr initConnection) :\n\tProtocol(initConnection) {\n\tversion = CLIENT_VERSION;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eae002620fc2caf2bc6114142dc37de842c4f6fb443025cf60e4a3dacd57b0d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-make-member-function-const", + "ruleIndex": 708, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'AddItem' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 255, + "startColumn": 20, + "charOffset": 9883, + "charLength": 7, + "snippet": { + "text": "AddItem" + } + }, + "contextRegion": { + "startLine": 253, + "startColumn": 20, + "charOffset": 9861, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid ProtocolGame::AddItem(NetworkMessage &msg, uint16_t id, uint8_t count, uint8_t tier) {\n\tconst ItemType &it = Item::items[id];\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a0eef2a862b7374a98ac3986ae2ad7a4b4a89e02168a56c62a449b22de1fbe5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'AddItem' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 255, + "startColumn": 49, + "charOffset": 9912, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 253, + "startColumn": 49, + "charOffset": 9861, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::AddItem(NetworkMessage &msg, uint16_t id, uint8_t count, uint8_t tier) {\n\tconst ItemType &it = Item::items[id];\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f0dc6251a9d88978737f9b9e6277224387a36ba887b94ad8b68319f913b707f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 261, + "startColumn": 15, + "charOffset": 10058, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 259, + "startColumn": 15, + "charOffset": 10023, + "charLength": 4, + "snippet": { + "text": "\n\tif (oldProtocol) {\n\t\tmsg.addByte(0xFF);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3d563f9212097d49ba5d2fff4bc720488f7851a90eee55a02ffddd02ebf8574" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 261, + "startColumn": 15, + "charOffset": 10058, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 259, + "startColumn": 15, + "charOffset": 10023, + "charLength": 4, + "snippet": { + "text": "\n\tif (oldProtocol) {\n\t\tmsg.addByte(0xFF);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e05ee0c07c060169a4d56ad5e89bf377db20d53798f57d35d8b63a85cca6e2a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 273, + "startColumn": 3, + "charOffset": 10211, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 271, + "startColumn": 3, + "charOffset": 10188, + "charLength": 2, + "snippet": { + "text": "\n\tif (oldProtocol) {\n\t\tif (it.animationType == ANIMATION_RANDOM) {\n\t\t\tmsg.addByte(0xFE);\n\t\t} else if (it.animationType == ANIMATION_DESYNC) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e90ef430a055d0f53df6915f7c2fda7d7883367fc7191bb916f37f014c53edee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 274, + "startColumn": 16, + "charOffset": 10270, + "charLength": 4, + "snippet": { + "text": "0xFE" + } + }, + "contextRegion": { + "startLine": 272, + "startColumn": 16, + "charOffset": 10189, + "charLength": 4, + "snippet": { + "text": "\tif (oldProtocol) {\n\t\tif (it.animationType == ANIMATION_RANDOM) {\n\t\t\tmsg.addByte(0xFE);\n\t\t} else if (it.animationType == ANIMATION_DESYNC) {\n\t\t\tmsg.addByte(0xFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b54ef7b7c5be802ee6a0bad3909373905e9c18f26972bd1e028b8d616b82369f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFE is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 274, + "startColumn": 16, + "charOffset": 10270, + "charLength": 4, + "snippet": { + "text": "0xFE" + } + }, + "contextRegion": { + "startLine": 272, + "startColumn": 16, + "charOffset": 10189, + "charLength": 4, + "snippet": { + "text": "\tif (oldProtocol) {\n\t\tif (it.animationType == ANIMATION_RANDOM) {\n\t\t\tmsg.addByte(0xFE);\n\t\t} else if (it.animationType == ANIMATION_DESYNC) {\n\t\t\tmsg.addByte(0xFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc9a5443948bf201f7732a4b4c7fa22c21764bfabff932c17229388d21b5a913" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 276, + "startColumn": 16, + "charOffset": 10345, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 274, + "startColumn": 16, + "charOffset": 10255, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.addByte(0xFE);\n\t\t} else if (it.animationType == ANIMATION_DESYNC) {\n\t\t\tmsg.addByte(0xFF);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd2d3662ae35fbe4038e161d11f3799a098cc1d37f550807edeb70666e925aa6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 276, + "startColumn": 16, + "charOffset": 10345, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 274, + "startColumn": 16, + "charOffset": 10255, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.addByte(0xFE);\n\t\t} else if (it.animationType == ANIMATION_DESYNC) {\n\t\t\tmsg.addByte(0xFF);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ab27161bbad20b59ce1690d096653cb58904843e807d0e71af0d7c804e7cff7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 283, + "startColumn": 15, + "charOffset": 10410, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 281, + "startColumn": 15, + "charOffset": 10370, + "charLength": 4, + "snippet": { + "text": "\n\tif (it.isContainer()) {\n\t\tmsg.addByte(0x00);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0091eabb2c5630a095761ee97c16646cc08cce6b5b52d539fc8bd352d767cbd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 292, + "startColumn": 15, + "charOffset": 10546, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 290, + "startColumn": 15, + "charOffset": 10513, + "charLength": 4, + "snippet": { + "text": "\n\t\tmsg.addByte(2);\n\t\tmsg.addByte(0x01);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae81f0113338b8380ca7b0037b2e9c63ba407083bb1c254def9e26a39b7e9e01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 301, + "startColumn": 15, + "charOffset": 10721, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 299, + "startColumn": 15, + "charOffset": 10619, + "charLength": 4, + "snippet": { + "text": "\tif (it.expire || it.expireStop || it.clockExpire) {\n\t\tmsg.add(it.decayTime);\n\t\tmsg.addByte(0x01); // Brand-new\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe8ca648127e904d33c5f5c5814c6cdc9451402264c93ce1e49959fe5199ce6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 306, + "startColumn": 15, + "charOffset": 10811, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 304, + "startColumn": 15, + "charOffset": 10745, + "charLength": 4, + "snippet": { + "text": "\tif (it.wearOut) {\n\t\tmsg.add(it.charges);\n\t\tmsg.addByte(0x01); // Brand-new\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97cd451b1f0b22740629f30b4bd7b9f63db8bc77d9bb196e7c25c63517278379" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 310, + "startColumn": 21, + "charOffset": 10892, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 308, + "startColumn": 21, + "charOffset": 10834, + "charLength": 4, + "snippet": { + "text": "\n\tif (it.isWrapKit && !oldProtocol) {\n\t\tmsg.add(0x00);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a09230cd24f0e275f30d8025a9df1a9c0817b44f81c891b9433ace6b8dcf29a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'AddItem' has cognitive complexity of 83 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 314, + "startColumn": 20, + "charOffset": 10924, + "charLength": 7, + "snippet": { + "text": "AddItem" + } + }, + "contextRegion": { + "startLine": 312, + "startColumn": 20, + "charOffset": 10902, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid ProtocolGame::AddItem(NetworkMessage &msg, std::shared_ptr item) {\n\tif (!item) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "164d25144fbb80e32edf9ed308daccaedb0d00d45ea57f78cad2a5c4b2b6e385" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 314, + "startColumn": 71, + "charOffset": 10975, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 312, + "startColumn": 71, + "charOffset": 10902, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid ProtocolGame::AddItem(NetworkMessage &msg, std::shared_ptr item) {\n\tif (!item) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b25320615c737ed678e2d2e06bd34494b3a53e6f9df6ffdfb8e5d4a02366ffe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 315, + "startColumn": 6, + "charOffset": 10988, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 313, + "startColumn": 6, + "charOffset": 10904, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::AddItem(NetworkMessage &msg, std::shared_ptr item) {\n\tif (!item) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ba80c6ca50dd8c440fb8602c1f2ccb838ed04d287ac4c50a37fdfb4d0d9cd59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 324, + "startColumn": 15, + "charOffset": 11124, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 322, + "startColumn": 15, + "charOffset": 11089, + "charLength": 4, + "snippet": { + "text": "\n\tif (oldProtocol) {\n\t\tmsg.addByte(0xFF);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c228576a79747283f85a75457def08f3e28de8f98a4e619773eb6400220699d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 324, + "startColumn": 15, + "charOffset": 11124, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 322, + "startColumn": 15, + "charOffset": 11089, + "charLength": 4, + "snippet": { + "text": "\n\tif (oldProtocol) {\n\t\tmsg.addByte(0xFF);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02957feee34fe8be5673fff050bc548da7b6b888717c876209a1f83bdbadda27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 336, + "startColumn": 3, + "charOffset": 11421, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 334, + "startColumn": 3, + "charOffset": 11398, + "charLength": 2, + "snippet": { + "text": "\n\tif (oldProtocol) {\n\t\tif (it.animationType == ANIMATION_RANDOM) {\n\t\t\tmsg.addByte(0xFE);\n\t\t} else if (it.animationType == ANIMATION_DESYNC) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6529b5b240997c6e6c4a0256ac15591015ee14a7f1391c40dd63f796214109c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 337, + "startColumn": 16, + "charOffset": 11480, + "charLength": 4, + "snippet": { + "text": "0xFE" + } + }, + "contextRegion": { + "startLine": 335, + "startColumn": 16, + "charOffset": 11399, + "charLength": 4, + "snippet": { + "text": "\tif (oldProtocol) {\n\t\tif (it.animationType == ANIMATION_RANDOM) {\n\t\t\tmsg.addByte(0xFE);\n\t\t} else if (it.animationType == ANIMATION_DESYNC) {\n\t\t\tmsg.addByte(0xFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "354a93964fc95341442a71518772c50c634444ccafdcacfac2f072beae888617" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFE is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 337, + "startColumn": 16, + "charOffset": 11480, + "charLength": 4, + "snippet": { + "text": "0xFE" + } + }, + "contextRegion": { + "startLine": 335, + "startColumn": 16, + "charOffset": 11399, + "charLength": 4, + "snippet": { + "text": "\tif (oldProtocol) {\n\t\tif (it.animationType == ANIMATION_RANDOM) {\n\t\t\tmsg.addByte(0xFE);\n\t\t} else if (it.animationType == ANIMATION_DESYNC) {\n\t\t\tmsg.addByte(0xFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7619cc06c1d29785a82f7eca05f3da04abf407fa97015a3d316e11e0bd104d1c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 339, + "startColumn": 16, + "charOffset": 11555, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 337, + "startColumn": 16, + "charOffset": 11465, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.addByte(0xFE);\n\t\t} else if (it.animationType == ANIMATION_DESYNC) {\n\t\t\tmsg.addByte(0xFF);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab1252f5f6eee5ad6f17851d7451a67bf5afa15e3bb19f5d5fe305b206e95b3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 339, + "startColumn": 16, + "charOffset": 11555, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 337, + "startColumn": 16, + "charOffset": 11465, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.addByte(0xFE);\n\t\t} else if (it.animationType == ANIMATION_DESYNC) {\n\t\t\tmsg.addByte(0xFF);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7bb73eca8bace2b0100dd756384656da0ad6734411cb25df5dae9a3de4259ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 352, + "startColumn": 4, + "charOffset": 11842, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 350, + "startColumn": 4, + "charOffset": 11783, + "charLength": 3, + "snippet": { + "text": "\t\t\tuint32_t lootFlags = 0;\n\t\t\tuint32_t obtainFlags = 0;\n\t\t\tfor (auto [category, containerMap] : player->m_managedContainers) {\n\t\t\t\tif (!isValidObjectCategory(category)) {\n\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0d05c6bdc72238a4842d78113cd14ad5dcebfaaf7b2c88718ee74162f807cb0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 352, + "startColumn": 14, + "charOffset": 11852, + "charLength": 1, + "snippet": { + "text": "[" + } + }, + "contextRegion": { + "startLine": 350, + "startColumn": 14, + "charOffset": 11783, + "charLength": 1, + "snippet": { + "text": "\t\t\tuint32_t lootFlags = 0;\n\t\t\tuint32_t obtainFlags = 0;\n\t\t\tfor (auto [category, containerMap] : player->m_managedContainers) {\n\t\t\t\tif (!isValidObjectCategory(category)) {\n\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58ba68b0a0dba13a6692444f75231a679f3dc2113781e67e98df00d221774b44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 357, + "startColumn": 19, + "charOffset": 12036, + "charLength": 1, + "snippet": { + "text": "1" + } + }, + "contextRegion": { + "startLine": 355, + "startColumn": 19, + "charOffset": 11969, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t\tif (containerMap.first == container) {\n\t\t\t\t\tlootFlags |= 1 << category;\n\t\t\t\t}\n\t\t\t\tif (containerMap.second == container) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14c056616f738f4e75aa6682822d171b5bdedd60d34e7e0170efdf1c8370b381" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 357, + "startColumn": 21, + "charOffset": 12038, + "charLength": 2, + "snippet": { + "text": "<<" + } + }, + "contextRegion": { + "startLine": 355, + "startColumn": 21, + "charOffset": 11969, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t\tif (containerMap.first == container) {\n\t\t\t\t\tlootFlags |= 1 << category;\n\t\t\t\t}\n\t\t\t\tif (containerMap.second == container) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54e77c1cc91fe719aa272477ef3320e2e89f76f9eff9fc2d1ea26e25b7b718bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 360, + "startColumn": 21, + "charOffset": 12121, + "charLength": 1, + "snippet": { + "text": "1" + } + }, + "contextRegion": { + "startLine": 358, + "startColumn": 21, + "charOffset": 12051, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t\tif (containerMap.second == container) {\n\t\t\t\t\tobtainFlags |= 1 << category;\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b62526e9b4d9064a2e4eb9869842ea4b858f2458688b7eec4e65edac9c7a23a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 360, + "startColumn": 23, + "charOffset": 12123, + "charLength": 2, + "snippet": { + "text": "<<" + } + }, + "contextRegion": { + "startLine": 358, + "startColumn": 23, + "charOffset": 12051, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t\tif (containerMap.second == container) {\n\t\t\t\t\tobtainFlags |= 1 << category;\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9b5acfb3d67d9692cc2a2dde444feac9a8c0619ec3b658471847241b00a326e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 365, + "startColumn": 21, + "charOffset": 12213, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 363, + "startColumn": 21, + "charOffset": 12147, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tif (lootFlags != 0 || obtainFlags != 0) {\n\t\t\t\tcontainerType = 9;\n\t\t\t\tmsg.addByte(containerType);\n\t\t\t\tmsg.add(lootFlags);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e90a9af081a809fca3804733e67ff40b86ef3f124cd090d9e8578ef233491ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 375, + "startColumn": 4, + "charOffset": 12488, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 373, + "startColumn": 4, + "charOffset": 12351, + "charLength": 3, + "snippet": { + "text": "\t\tif (container && containerType == 0 && item->isQuiver() && player->getThing(CONST_SLOT_RIGHT) == item) {\n\t\t\tuint16_t ammoTotal = 0;\n\t\t\tfor (std::shared_ptr listItem : container->getItemList()) {\n\t\t\t\tif (player->getLevel() >= Item::items[listItem->getID()].minReqLevel) {\n\t\t\t\t\tammoTotal += listItem->getItemCount();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1191c61139dfe2a37597e5b6c09050addd6528f10b02c560572ccaaa2177d9e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 375, + "startColumn": 31, + "charOffset": 12515, + "charLength": 8, + "snippet": { + "text": "listItem" + } + }, + "contextRegion": { + "startLine": 373, + "startColumn": 31, + "charOffset": 12351, + "charLength": 8, + "snippet": { + "text": "\t\tif (container && containerType == 0 && item->isQuiver() && player->getThing(CONST_SLOT_RIGHT) == item) {\n\t\t\tuint16_t ammoTotal = 0;\n\t\t\tfor (std::shared_ptr listItem : container->getItemList()) {\n\t\t\t\tif (player->getLevel() >= Item::items[listItem->getID()].minReqLevel) {\n\t\t\t\t\tammoTotal += listItem->getItemCount();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43d786982ba8b023401e2a87e6f8264a76da087f4a27c00645a36ef904ebef02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 386, + "startColumn": 16, + "charOffset": 12819, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 384, + "startColumn": 16, + "charOffset": 12775, + "charLength": 4, + "snippet": { + "text": "\n\t\tif (containerType == 0) {\n\t\t\tmsg.addByte(0x00);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01ae22ac9e999912f22f53fa721bf866e5093247025e60da56d2d652e0d8fad8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto podiumVisible' can be declared as 'const auto *const podiumVisible'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 391, + "startColumn": 3, + "charOffset": 12856, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 389, + "startColumn": 3, + "charOffset": 12833, + "charLength": 5, + "snippet": { + "text": "\n\tif (it.isPodium) {\n\t\tconst auto podiumVisible = item->getCustomAttribute(\"PodiumVisible\");\n\t\tconst auto lookType = item->getCustomAttribute(\"LookType\");\n\t\tconst auto lookTypeAttribute = item->getCustomAttribute(\"LookTypeEx\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08899c7ed4c911e37c02ff4853170a79dcbddedcdd0753c86ceb7e3a3ec44c58" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto lookType' can be declared as 'const auto *const lookType'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 392, + "startColumn": 3, + "charOffset": 12928, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 390, + "startColumn": 3, + "charOffset": 12834, + "charLength": 5, + "snippet": { + "text": "\tif (it.isPodium) {\n\t\tconst auto podiumVisible = item->getCustomAttribute(\"PodiumVisible\");\n\t\tconst auto lookType = item->getCustomAttribute(\"LookType\");\n\t\tconst auto lookTypeAttribute = item->getCustomAttribute(\"LookTypeEx\");\n\t\tconst auto lookMount = item->getCustomAttribute(\"LookMount\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "383d82233ef730f0ccb303c07678c52b858ad8194b378091bcd340dfa61b9875" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto lookTypeAttribute' can be declared as 'const auto *const lookTypeAttribute'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 393, + "startColumn": 3, + "charOffset": 12990, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 391, + "startColumn": 3, + "charOffset": 12854, + "charLength": 5, + "snippet": { + "text": "\t\tconst auto podiumVisible = item->getCustomAttribute(\"PodiumVisible\");\n\t\tconst auto lookType = item->getCustomAttribute(\"LookType\");\n\t\tconst auto lookTypeAttribute = item->getCustomAttribute(\"LookTypeEx\");\n\t\tconst auto lookMount = item->getCustomAttribute(\"LookMount\");\n\t\tconst auto lookDirection = item->getCustomAttribute(\"LookDirection\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85bbb8c5be09808b55729fa8788c58526ff53f90b05491891b49f7e4ac32c0f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto lookMount' can be declared as 'const auto *const lookMount'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 394, + "startColumn": 3, + "charOffset": 13063, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 392, + "startColumn": 3, + "charOffset": 12926, + "charLength": 5, + "snippet": { + "text": "\t\tconst auto lookType = item->getCustomAttribute(\"LookType\");\n\t\tconst auto lookTypeAttribute = item->getCustomAttribute(\"LookTypeEx\");\n\t\tconst auto lookMount = item->getCustomAttribute(\"LookMount\");\n\t\tconst auto lookDirection = item->getCustomAttribute(\"LookDirection\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "681855d3a77c494d31bf6f7492ac1948b4a8c147d6f84b6a22e8cb327a6b17ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto lookDirection' can be declared as 'const auto *const lookDirection'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 395, + "startColumn": 3, + "charOffset": 13127, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 393, + "startColumn": 3, + "charOffset": 12988, + "charLength": 5, + "snippet": { + "text": "\t\tconst auto lookTypeAttribute = item->getCustomAttribute(\"LookTypeEx\");\n\t\tconst auto lookMount = item->getCustomAttribute(\"LookMount\");\n\t\tconst auto lookDirection = item->getCustomAttribute(\"LookDirection\");\n\n\t\tif (lookType && lookType->getAttribute() != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c79985ad6db118b2a3a7979e1c1e336a9a7bca29f35640981bedb9f6fc7c3ce8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 397, + "startColumn": 7, + "charOffset": 13204, + "charLength": 8, + "snippet": { + "text": "lookType" + } + }, + "contextRegion": { + "startLine": 395, + "startColumn": 7, + "charOffset": 13125, + "charLength": 8, + "snippet": { + "text": "\t\tconst auto lookDirection = item->getCustomAttribute(\"LookDirection\");\n\n\t\tif (lookType && lookType->getAttribute() != 0) {\n\t\t\taddOutfitAndMountBytes(msg, item, lookType, \"LookHead\", \"LookBody\", \"LookLegs\", \"LookFeet\", true);\n\t\t} else if (lookTypeAttribute) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34341dae2ea9e43b1e1be85018e70c1a8dac02ca608792c5bff8ed38c0160a44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 397, + "startColumn": 7, + "charOffset": 13204, + "charLength": 8, + "snippet": { + "text": "lookType" + } + }, + "contextRegion": { + "startLine": 395, + "startColumn": 7, + "charOffset": 13125, + "charLength": 8, + "snippet": { + "text": "\t\tconst auto lookDirection = item->getCustomAttribute(\"LookDirection\");\n\n\t\tif (lookType && lookType->getAttribute() != 0) {\n\t\t\taddOutfitAndMountBytes(msg, item, lookType, \"LookHead\", \"LookBody\", \"LookLegs\", \"LookFeet\", true);\n\t\t} else if (lookTypeAttribute) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d1cb3a8f7198c7971fd95a2e2373cfad2f69426c487b3acdf85b34c1cf7d366" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 397, + "startColumn": 16, + "charOffset": 13213, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 395, + "startColumn": 16, + "charOffset": 13125, + "charLength": 2, + "snippet": { + "text": "\t\tconst auto lookDirection = item->getCustomAttribute(\"LookDirection\");\n\n\t\tif (lookType && lookType->getAttribute() != 0) {\n\t\t\taddOutfitAndMountBytes(msg, item, lookType, \"LookHead\", \"LookBody\", \"LookLegs\", \"LookFeet\", true);\n\t\t} else if (lookTypeAttribute) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c41d4157143255573fe1064cb1bdd9f23c4ef2fb260e8bb98ffefe0ef15d204" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 399, + "startColumn": 14, + "charOffset": 13374, + "charLength": 17, + "snippet": { + "text": "lookTypeAttribute" + } + }, + "contextRegion": { + "startLine": 397, + "startColumn": 14, + "charOffset": 13198, + "charLength": 17, + "snippet": { + "text": "\t\tif (lookType && lookType->getAttribute() != 0) {\n\t\t\taddOutfitAndMountBytes(msg, item, lookType, \"LookHead\", \"LookBody\", \"LookLegs\", \"LookFeet\", true);\n\t\t} else if (lookTypeAttribute) {\n\t\t\tauto lookTypeEx = lookTypeAttribute->getAttribute();\n\t\t\t// \"Tantugly's Head\" boss have to send other looktype to the podium" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "092b27682d650173a858fc5731d540275f6bae8e2c8cea81d289de966d16ecc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 399, + "startColumn": 14, + "charOffset": 13374, + "charLength": 17, + "snippet": { + "text": "lookTypeAttribute" + } + }, + "contextRegion": { + "startLine": 397, + "startColumn": 14, + "charOffset": 13198, + "charLength": 17, + "snippet": { + "text": "\t\tif (lookType && lookType->getAttribute() != 0) {\n\t\t\taddOutfitAndMountBytes(msg, item, lookType, \"LookHead\", \"LookBody\", \"LookLegs\", \"LookFeet\", true);\n\t\t} else if (lookTypeAttribute) {\n\t\t\tauto lookTypeEx = lookTypeAttribute->getAttribute();\n\t\t\t// \"Tantugly's Head\" boss have to send other looktype to the podium" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9a2a680b622b730ffc466a68bf38571bdd69e43886cb024dcd1f7ea51f92708" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "35105 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 402, + "startColumn": 22, + "charOffset": 13553, + "charLength": 5, + "snippet": { + "text": "35105" + } + }, + "contextRegion": { + "startLine": 400, + "startColumn": 22, + "charOffset": 13395, + "charLength": 5, + "snippet": { + "text": "\t\t\tauto lookTypeEx = lookTypeAttribute->getAttribute();\n\t\t\t// \"Tantugly's Head\" boss have to send other looktype to the podium\n\t\t\tif (lookTypeEx == 35105) {\n\t\t\t\tlookTypeEx = 39003;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbbc6abba519e7a2e4d679c19857e8cfc0a0ad5b1e7bfc75c915c4d0f02e2733" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "39003 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 403, + "startColumn": 18, + "charOffset": 13579, + "charLength": 5, + "snippet": { + "text": "39003" + } + }, + "contextRegion": { + "startLine": 401, + "startColumn": 18, + "charOffset": 13461, + "charLength": 5, + "snippet": { + "text": "\t\t\t// \"Tantugly's Head\" boss have to send other looktype to the podium\n\t\t\tif (lookTypeEx == 35105) {\n\t\t\t\tlookTypeEx = 39003;\n\t\t\t}\n\t\t\tmsg.add(0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e80e8295fc2a2183c60e8645fb4bc4b63a19169d2549aa0bc25f122758a1159" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 412, + "startColumn": 7, + "charOffset": 13722, + "charLength": 9, + "snippet": { + "text": "lookMount" + } + }, + "contextRegion": { + "startLine": 410, + "startColumn": 7, + "charOffset": 13711, + "charLength": 9, + "snippet": { + "text": "\t\t}\n\n\t\tif (lookMount) {\n\t\t\taddOutfitAndMountBytes(msg, item, lookMount, \"LookMountHead\", \"LookMountBody\", \"LookMountLegs\", \"LookMountFeet\");\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd9e63f109c7153836c628a2fdedb5901d31af8d8b33cbb468313eeae330ada2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 412, + "startColumn": 7, + "charOffset": 13722, + "charLength": 9, + "snippet": { + "text": "lookMount" + } + }, + "contextRegion": { + "startLine": 410, + "startColumn": 7, + "charOffset": 13711, + "charLength": 9, + "snippet": { + "text": "\t\t}\n\n\t\tif (lookMount) {\n\t\t\taddOutfitAndMountBytes(msg, item, lookMount, \"LookMountHead\", \"LookMountBody\", \"LookMountLegs\", \"LookMountFeet\");\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25473b48b7ed7eb99230fd7b7c6e81f4dc8348127cedb1e18303820e91b3508d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 418, + "startColumn": 15, + "charOffset": 13907, + "charLength": 13, + "snippet": { + "text": "lookDirection" + } + }, + "contextRegion": { + "startLine": 416, + "startColumn": 15, + "charOffset": 13888, + "charLength": 13, + "snippet": { + "text": "\t\t}\n\n\t\tmsg.addByte(lookDirection ? lookDirection->getAttribute() : 2);\n\t\tmsg.addByte(podiumVisible ? podiumVisible->getAttribute() : 0x01);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ebbc7acdbaa66f16fe5a35f892f781b5c47f7471b66728d930b0d6733195cb5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 418, + "startColumn": 15, + "charOffset": 13907, + "charLength": 13, + "snippet": { + "text": "lookDirection" + } + }, + "contextRegion": { + "startLine": 416, + "startColumn": 15, + "charOffset": 13888, + "charLength": 13, + "snippet": { + "text": "\t\t}\n\n\t\tmsg.addByte(lookDirection ? lookDirection->getAttribute() : 2);\n\t\tmsg.addByte(podiumVisible ? podiumVisible->getAttribute() : 0x01);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de78e9ea049a2ff8c26dad56579dede673095a42bedaaa52baea9d22e034c559" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 418, + "startColumn": 15, + "charOffset": 13907, + "charLength": 13, + "snippet": { + "text": "lookDirection" + } + }, + "contextRegion": { + "startLine": 416, + "startColumn": 15, + "charOffset": 13888, + "charLength": 13, + "snippet": { + "text": "\t\t}\n\n\t\tmsg.addByte(lookDirection ? lookDirection->getAttribute() : 2);\n\t\tmsg.addByte(podiumVisible ? podiumVisible->getAttribute() : 0x01);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb13347a75a57b73be62562dc7c99a0f2f47e6600daa5bcca8cdc0890d4ff5a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 419, + "startColumn": 15, + "charOffset": 13982, + "charLength": 13, + "snippet": { + "text": "podiumVisible" + } + }, + "contextRegion": { + "startLine": 417, + "startColumn": 15, + "charOffset": 13892, + "charLength": 13, + "snippet": { + "text": "\n\t\tmsg.addByte(lookDirection ? lookDirection->getAttribute() : 2);\n\t\tmsg.addByte(podiumVisible ? podiumVisible->getAttribute() : 0x01);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d47bb46ebe5c3c901b09d062c9f8aa8e50be985c5b7089ec891acbb84ccabf1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 419, + "startColumn": 15, + "charOffset": 13982, + "charLength": 13, + "snippet": { + "text": "podiumVisible" + } + }, + "contextRegion": { + "startLine": 417, + "startColumn": 15, + "charOffset": 13892, + "charLength": 13, + "snippet": { + "text": "\n\t\tmsg.addByte(lookDirection ? lookDirection->getAttribute() : 2);\n\t\tmsg.addByte(podiumVisible ? podiumVisible->getAttribute() : 0x01);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34297183f3fa775fdf89ede371659ce1f80fac6524b925195764af22c5118adf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 419, + "startColumn": 15, + "charOffset": 13982, + "charLength": 13, + "snippet": { + "text": "podiumVisible" + } + }, + "contextRegion": { + "startLine": 417, + "startColumn": 15, + "charOffset": 13892, + "charLength": 13, + "snippet": { + "text": "\n\t\tmsg.addByte(lookDirection ? lookDirection->getAttribute() : 2);\n\t\tmsg.addByte(podiumVisible ? podiumVisible->getAttribute() : 0x01);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17adce25a8248dac587b3caec18d94d3b52fd36d3ff8bbc24e0e9c8aad2ca435" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 429, + "startColumn": 44, + "charOffset": 14285, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 427, + "startColumn": 44, + "charOffset": 14134, + "charLength": 4, + "snippet": { + "text": "\tif (it.expire || it.expireStop || it.clockExpire) {\n\t\tif (item->hasAttribute(ItemAttribute_t::DURATION)) {\n\t\t\tmsg.add(item->getDuration() / 1000);\n\t\t\tmsg.addByte((item->getDuration() / 1000) == it.decayTime ? 0x01 : 0x00); // Brand-new\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee45e8f3c3244bffcb60fa0e52bc3f15874e237678388b11282d8491b4950027" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 430, + "startColumn": 39, + "charOffset": 14330, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 428, + "startColumn": 39, + "charOffset": 14187, + "charLength": 4, + "snippet": { + "text": "\t\tif (item->hasAttribute(ItemAttribute_t::DURATION)) {\n\t\t\tmsg.add(item->getDuration() / 1000);\n\t\t\tmsg.addByte((item->getDuration() / 1000) == it.decayTime ? 0x01 : 0x00); // Brand-new\n\t\t} else {\n\t\t\tmsg.add(it.decayTime);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4463152b79553c8140624b888ba02d8884cea2223feb6f45ba0ffa97761aa57" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 433, + "startColumn": 16, + "charOffset": 14443, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 431, + "startColumn": 16, + "charOffset": 14381, + "charLength": 4, + "snippet": { + "text": "\t\t} else {\n\t\t\tmsg.add(it.decayTime);\n\t\t\tmsg.addByte(0x01); // Brand-new\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1cc3f484808845ccd0d325e6c76f24b379ec5a07eec1fe10cb0e3f86373b99ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 441, + "startColumn": 16, + "charOffset": 14583, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 439, + "startColumn": 16, + "charOffset": 14501, + "charLength": 4, + "snippet": { + "text": "\t\tif (item->getSubType() == 0) {\n\t\t\tmsg.add(it.charges);\n\t\t\tmsg.addByte(0x01); // Brand-new\n\t\t} else {\n\t\t\tmsg.add(static_cast(item->getSubType()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eab6eb4347031da14f1b3ee0521322ef18081d70c939b969d74ac9f298e93a7f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 449, + "startColumn": 23, + "charOffset": 14823, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 447, + "startColumn": 23, + "charOffset": 14763, + "charLength": 4, + "snippet": { + "text": "\n\tif (it.isWrapKit && !oldProtocol) {\n\t\tuint16_t unWrapId = item->getCustomAttribute(\"unWrapId\") ? static_cast(item->getCustomAttribute(\"unWrapId\")->getInteger()) : 0;\n\t\tif (unWrapId != 0) {\n\t\t\tmsg.add(unWrapId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "915b00431c1f7969e8c5ac8ae44b451fd1524db66d6ffec13c3b7e0fb9e55139" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 449, + "startColumn": 23, + "charOffset": 14823, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 447, + "startColumn": 23, + "charOffset": 14763, + "charLength": 4, + "snippet": { + "text": "\n\tif (it.isWrapKit && !oldProtocol) {\n\t\tuint16_t unWrapId = item->getCustomAttribute(\"unWrapId\") ? static_cast(item->getCustomAttribute(\"unWrapId\")->getInteger()) : 0;\n\t\tif (unWrapId != 0) {\n\t\t\tmsg.add(unWrapId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "368eed585fd1411fbb58a5b2527fc9878da2d26658317df1d6900ecbc85ef08c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 449, + "startColumn": 23, + "charOffset": 14823, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 447, + "startColumn": 23, + "charOffset": 14763, + "charLength": 4, + "snippet": { + "text": "\n\tif (it.isWrapKit && !oldProtocol) {\n\t\tuint16_t unWrapId = item->getCustomAttribute(\"unWrapId\") ? static_cast(item->getCustomAttribute(\"unWrapId\")->getInteger()) : 0;\n\t\tif (unWrapId != 0) {\n\t\t\tmsg.add(unWrapId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e643fba33c00b5e81cca23dcdf8a68cfb7cc04dd737e47b458c21f7500abae8d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 453, + "startColumn": 22, + "charOffset": 15028, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 451, + "startColumn": 22, + "charOffset": 14964, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.add(unWrapId);\n\t\t} else {\n\t\t\tmsg.add(0x00);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c6ec4af5ccba2732f5871f7ab072ea4296609f231eeff69a8e5f9fee30590a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'login' has cognitive complexity of 77 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 469, + "startColumn": 20, + "charOffset": 15329, + "charLength": 5, + "snippet": { + "text": "login" + } + }, + "contextRegion": { + "startLine": 467, + "startColumn": 20, + "charOffset": 15307, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid ProtocolGame::login(const std::string &name, uint32_t accountId, OperatingSystem_t operatingSystem) {\n\t// OTCV8 features\n\tif (otclientV8 > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b24a599721f70c38a1c061ebe7c5c50f86935236ec71e300f418051026539eff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 479, + "startColumn": 25, + "charOffset": 15625, + "charLength": 4, + "snippet": { + "text": "0x32" + } + }, + "contextRegion": { + "startLine": 477, + "startColumn": 25, + "charOffset": 15553, + "charLength": 4, + "snippet": { + "text": "\t\tisOTC = true;\n\t\tNetworkMessage opcodeMessage;\n\t\topcodeMessage.addByte(0x32);\n\t\topcodeMessage.addByte(0x00);\n\t\topcodeMessage.add(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac592019aff40cadea41e0d7b821f7ec091fd9d7793a1ede01f604097717c820" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x32 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 479, + "startColumn": 25, + "charOffset": 15625, + "charLength": 4, + "snippet": { + "text": "0x32" + } + }, + "contextRegion": { + "startLine": 477, + "startColumn": 25, + "charOffset": 15553, + "charLength": 4, + "snippet": { + "text": "\t\tisOTC = true;\n\t\tNetworkMessage opcodeMessage;\n\t\topcodeMessage.addByte(0x32);\n\t\topcodeMessage.addByte(0x00);\n\t\topcodeMessage.add(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a72cc1edbb621cbd8cd918ae501fa0374faedd178e42971b24ecca54fdd4a0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 480, + "startColumn": 25, + "charOffset": 15656, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 478, + "startColumn": 25, + "charOffset": 15569, + "charLength": 4, + "snippet": { + "text": "\t\tNetworkMessage opcodeMessage;\n\t\topcodeMessage.addByte(0x32);\n\t\topcodeMessage.addByte(0x00);\n\t\topcodeMessage.add(0x00);\n\t\twriteToOutputBuffer(opcodeMessage);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a5510fee869e529e3862c77a265a20eaa58305b6cb2e3503fca188d299f45c62" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 481, + "startColumn": 31, + "charOffset": 15693, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 479, + "startColumn": 31, + "charOffset": 15601, + "charLength": 4, + "snippet": { + "text": "\t\topcodeMessage.addByte(0x32);\n\t\topcodeMessage.addByte(0x00);\n\t\topcodeMessage.add(0x00);\n\t\twriteToOutputBuffer(opcodeMessage);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad321b6ad90bb0f09c10fbb717bc4f9ad341da801746e57bde0915f3eb3d08e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 489, + "startColumn": 6, + "charOffset": 15950, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 487, + "startColumn": 6, + "charOffset": 15847, + "charLength": 1, + "snippet": { + "text": "\t// dispatcher thread\n\tstd::shared_ptr foundPlayer = g_game().getPlayerUniqueLogin(name);\n\tif (!foundPlayer) {\n\t\tplayer = std::make_shared(getThis());\n\t\tplayer->setName(name);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4cbecad9abd51f8866d3178c5ce1fd6d79c53798630dfedfe5ff082343e1610a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 570, + "startColumn": 20, + "charOffset": 19138, + "charLength": 4, + "snippet": { + "text": "0x16" + } + }, + "contextRegion": { + "startLine": 568, + "startColumn": 20, + "charOffset": 19062, + "charLength": 4, + "snippet": { + "text": "\n\t\t\tauto output = OutputMessagePool::getOutputMessage();\n\t\t\toutput->addByte(0x16);\n\t\t\toutput->addString(ss.str(), \"ProtocolGame::login - ss.str()\");\n\t\t\toutput->addByte(retryTime);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43bff0f68f85b2dcb85ea8dd1881b813e30f90e250305f3b9c2d61bf45fcc911" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 570, + "startColumn": 20, + "charOffset": 19138, + "charLength": 4, + "snippet": { + "text": "0x16" + } + }, + "contextRegion": { + "startLine": 568, + "startColumn": 20, + "charOffset": 19062, + "charLength": 4, + "snippet": { + "text": "\n\t\t\tauto output = OutputMessagePool::getOutputMessage();\n\t\t\toutput->addByte(0x16);\n\t\t\toutput->addString(ss.str(), \"ProtocolGame::login - ss.str()\");\n\t\t\toutput->addByte(retryTime);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8a8d2507e6969d5cfd302fba9c652c7beed81056286c1f535a836b4082574ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 572, + "startColumn": 20, + "charOffset": 19230, + "charLength": 9, + "snippet": { + "text": "retryTime" + } + }, + "contextRegion": { + "startLine": 570, + "startColumn": 20, + "charOffset": 19119, + "charLength": 9, + "snippet": { + "text": "\t\t\toutput->addByte(0x16);\n\t\t\toutput->addString(ss.str(), \"ProtocolGame::login - ss.str()\");\n\t\t\toutput->addByte(retryTime);\n\t\t\tsend(output);\n\t\t\tdisconnect();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d97ce52a78e6114ef5104029d0a106ccb9771330c1264709e10bafd9c23e2ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 594, + "startColumn": 4, + "charOffset": 20102, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 592, + "startColumn": 4, + "charOffset": 19995, + "charLength": 3, + "snippet": { + "text": "\t\t\tauto accountPlayers = g_game().getPlayersByAccount(player->getAccount());\n\t\t\tint countOutsizePZ = 0;\n\t\t\tfor (const auto &accountPlayer : accountPlayers) {\n\t\t\t\tif (accountPlayer != player && accountPlayer->getTile() && !accountPlayer->getTile()->hasFlag(TILESTATE_PROTECTIONZONE)) {\n\t\t\t\t\t++countOutsizePZ;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f5db21d66c7285cc2b1ddffc0dd6e045865e7ef4d4a20794b67a21fdee2f896" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 614, + "startColumn": 45, + "charOffset": 21078, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 612, + "startColumn": 45, + "charOffset": 20997, + "charLength": 4, + "snippet": { + "text": "\n\t\tplayer->lastIP = player->getIP();\n\t\tplayer->lastLoginSaved = std::max(time(nullptr), player->lastLoginSaved + 1);\n\t\tacceptPackets = true;\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10c30c83aca998ae333ef2d0f5798f51422ef02ea6df94312e10ee30f3365c1c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 627, + "startColumn": 19, + "charOffset": 21467, + "charLength": 12, + "snippet": { + "text": "g_dispatcher" + } + }, + "contextRegion": { + "startLine": 625, + "startColumn": 19, + "charOffset": 21411, + "charLength": 12, + "snippet": { + "text": "\t\t\tfoundPlayer->isConnecting = true;\n\n\t\t\teventConnect = g_dispatcher().scheduleEvent(\n\t\t\t\t1000,\n\t\t\t\t[self = getThis(), playerName = foundPlayer->getName(), operatingSystem] { self->connect(playerName, operatingSystem); }, \"ProtocolGame::connect\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "590c6311199fab0e6f1132824f87ea1b2e5675ad4a186039c3f597762fbe5845" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 628, + "startColumn": 5, + "charOffset": 21501, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 626, + "startColumn": 5, + "charOffset": 21448, + "charLength": 4, + "snippet": { + "text": "\n\t\t\teventConnect = g_dispatcher().scheduleEvent(\n\t\t\t\t1000,\n\t\t\t\t[self = getThis(), playerName = foundPlayer->getName(), operatingSystem] { self->connect(playerName, operatingSystem); }, \"ProtocolGame::connect\"\n\t\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f10fa43fd372baf45e6a452bdc9a46eeca71cab6f4e919e696c5183ab8965cde" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 643, + "startColumn": 6, + "charOffset": 22047, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 641, + "startColumn": 6, + "charOffset": 21959, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr foundPlayer = g_game().getPlayerUniqueLogin(playerName);\n\tif (!foundPlayer) {\n\t\tdisconnectClient(\"You are already logged in.\");\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "550e374acec8481ac35d9a5fde5481b0163fb454e40f0a681b9f779beffc6659" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 666, + "startColumn": 44, + "charOffset": 22741, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 664, + "startColumn": 44, + "charOffset": 22605, + "charLength": 4, + "snippet": { + "text": "\tsendAddCreature(player, player->getPosition(), 0, true);\n\tplayer->lastIP = player->getIP();\n\tplayer->lastLoginSaved = std::max(time(nullptr), player->lastLoginSaved + 1);\n\tplayer->resetIdleTime();\n\tacceptPackets = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28c5b47a6d8244d0e8706335a7d50d3e409f8934825e64ee44b755aaf6afcfb9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 672, + "startColumn": 6, + "charOffset": 22903, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 670, + "startColumn": 6, + "charOffset": 22836, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::logout(bool displayEffect, bool forced) {\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97c11dccc6da7fe5c9944120e6432e4d9568e4003fea8a9916a3205b11978da9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 701, + "startColumn": 11, + "charOffset": 23759, + "charLength": 14, + "snippet": { + "text": "removeCreature" + } + }, + "contextRegion": { + "startLine": 699, + "startColumn": 11, + "charOffset": 23666, + "charLength": 14, + "snippet": { + "text": "\tsendSessionEndInformation(forced ? SESSION_END_FORCECLOSE : SESSION_END_LOGOUT);\n\n\tg_game().removeCreature(player, true);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ce0960942dc5c769448f52c99ddc7615e642aa3b80d0d67a0e3abc7cc37e3d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'onRecvFirstMessage' has cognitive complexity of 47 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 704, + "startColumn": 20, + "charOffset": 23811, + "charLength": 18, + "snippet": { + "text": "onRecvFirstMessage" + } + }, + "contextRegion": { + "startLine": 702, + "startColumn": 20, + "charOffset": 23789, + "charLength": 18, + "snippet": { + "text": "}\n\nvoid ProtocolGame::onRecvFirstMessage(NetworkMessage &msg) {\n\tif (g_game().getGameState() == GAME_STATE_SHUTDOWN) {\n\t\tdisconnect();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f75388f3ee1f6adc49b64bd44f6b1467761b23e8a1019842bc9a2999dd6eb8ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 710, + "startColumn": 2, + "charOffset": 23939, + "charLength": 17, + "snippet": { + "text": "OperatingSystem_t" + } + }, + "contextRegion": { + "startLine": 708, + "startColumn": 2, + "charOffset": 23934, + "charLength": 17, + "snippet": { + "text": "\t}\n\n\tOperatingSystem_t operatingSystem = static_cast(msg.get());\n\tversion = msg.get(); // Protocol version\n\tg_logger().trace(\"Protocol version: {}\", version);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b0e67515dcc0132b5cc12d97290b1e96c0253ef84776b2d4c8ef4b62cfa7fb3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 715, + "startColumn": 87, + "charOffset": 24244, + "charLength": 4, + "snippet": { + "text": "1100" + } + }, + "contextRegion": { + "startLine": 713, + "startColumn": 87, + "charOffset": 24132, + "charLength": 4, + "snippet": { + "text": "\n\t// Old protocol support\n\toldProtocol = g_configManager().getBoolean(OLD_PROTOCOL, __FUNCTION__) && version <= 1100;\n\n\tif (oldProtocol) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ef37e5eba384b98907134ece4281179dea725378cc9aa4485e51fb7c340a7bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 717, + "startColumn": 2, + "charOffset": 24252, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 715, + "startColumn": 2, + "charOffset": 24158, + "charLength": 2, + "snippet": { + "text": "\toldProtocol = g_configManager().getBoolean(OLD_PROTOCOL, __FUNCTION__) && version <= 1100;\n\n\tif (oldProtocol) {\n\t\tsetChecksumMethod(CHECKSUM_METHOD_ADLER32);\n\t} else if (operatingSystem <= CLIENTOS_OTCLIENT_MAC) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a3ea5e0e03bc20e47c80ccba7e85c3135469baa0bd684a4fdeca83ef1d9dd17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1334 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 728, + "startColumn": 18, + "charOffset": 24659, + "charLength": 4, + "snippet": { + "text": "1334" + } + }, + "contextRegion": { + "startLine": 726, + "startColumn": 18, + "charOffset": 24506, + "charLength": 4, + "snippet": { + "text": "\t\tauto clientVersionString = msg.getString(); // Client version (String)\n\t\tg_logger().trace(\"Client version: {}\", clientVersionString);\n\t\tif (version >= 1334) {\n\t\t\tauto assetHashIdentifier = msg.getString(); // Assets hash identifier\n\t\t\tg_logger().trace(\"Client asset hash identifier: {}\", assetHashIdentifier);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "216a16fd5b08a4e7c964cfab0145c6b8e40e714a2d30d36735318ede922b5a14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1334 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 734, + "startColumn": 16, + "charOffset": 24841, + "charLength": 4, + "snippet": { + "text": "1334" + } + }, + "contextRegion": { + "startLine": 732, + "startColumn": 16, + "charOffset": 24822, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tif (version < 1334) {\n\t\tauto datRevision = msg.get(); // Dat revision\n\t\tg_logger().trace(\"Dat revision: {}\", datRevision);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7712eced3b33a3e1191d4d3e03fe22a0ab7d9a8079eed19e6cb598742b59722e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-redundant-string-init", + "ruleIndex": 725, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 759, + "startColumn": 14, + "charOffset": 25740, + "charLength": 8, + "snippet": { + "text": "password" + } + }, + "contextRegion": { + "startLine": 757, + "startColumn": 14, + "charOffset": 25639, + "charLength": 8, + "snippet": { + "text": "\tstd::string sessionKey = msg.getString();\n\tstd::string accountDescriptor = sessionKey;\n\tstd::string password = \"\";\n\n\tif (authType != \"session\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b065d4c02786fe7552e891847dffe632c6ee4ae55904a04bb6ef68b598bad2ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-todo", + "ruleIndex": 545, + "kind": "fail", + "level": "warning", + "message": { + "text": "missing username/bug in TODO" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 779, + "startColumn": 3, + "charOffset": 26329, + "charLength": 46, + "snippet": { + "text": "// TODO: check what new info for linux is send" + } + }, + "contextRegion": { + "startLine": 777, + "startColumn": 3, + "charOffset": 26264, + "charLength": 46, + "snippet": { + "text": "\n\tif (!oldProtocol && operatingSystem == CLIENTOS_NEW_LINUX) {\n\t\t// TODO: check what new info for linux is send\n\t\tmsg.getString();\n\t\tmsg.getString();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b96adb4b27438c3077d79a19e301897cfe02b39f8128b7f6f976f4950937608" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 780, + "startColumn": 7, + "charOffset": 26382, + "charLength": 9, + "snippet": { + "text": "getString" + } + }, + "contextRegion": { + "startLine": 778, + "startColumn": 7, + "charOffset": 26265, + "charLength": 9, + "snippet": { + "text": "\tif (!oldProtocol && operatingSystem == CLIENTOS_NEW_LINUX) {\n\t\t// TODO: check what new info for linux is send\n\t\tmsg.getString();\n\t\tmsg.getString();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef41ca42c4d20a2248be3b7b86c5696ed7297dcba1053797e5936a852d0dcb47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 781, + "startColumn": 7, + "charOffset": 26401, + "charLength": 9, + "snippet": { + "text": "getString" + } + }, + "contextRegion": { + "startLine": 779, + "startColumn": 7, + "charOffset": 26327, + "charLength": 9, + "snippet": { + "text": "\t\t// TODO: check what new info for linux is send\n\t\tmsg.getString();\n\t\tmsg.getString();\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4e06b53f5355b329908a299a6348bd08a2a73fb6503f87f3eb884e083e58a90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 796, + "startColumn": 2, + "charOffset": 27026, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 794, + "startColumn": 2, + "charOffset": 27021, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tuint32_t timeStamp = msg.get();\n\tuint8_t randNumber = msg.getByte();\n\tif (challengeTimestamp != timeStamp || challengeRandom != randNumber) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a919ad7e2389c5e41958b5fa309b7089e21235d5aa51c84b7f7a88be75cefc51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 804, + "startColumn": 2, + "charOffset": 27237, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 802, + "startColumn": 2, + "charOffset": 27207, + "charLength": 8, + "snippet": { + "text": "\n\t// OTCv8 version detection\n\tuint16_t otcV8StringLength = msg.get();\n\tif (otcV8StringLength == 5 && msg.getString(5) == \"OTCv8\") {\n\t\totclientV8 = msg.get(); // 253, 260, 261, ..." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "abc0d16d5bd5cf11eabf2216bfcb036909693806d5a97288d2cc6f973e7cb2b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 805, + "startColumn": 27, + "charOffset": 27313, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 803, + "startColumn": 27, + "charOffset": 27208, + "charLength": 1, + "snippet": { + "text": "\t// OTCv8 version detection\n\tuint16_t otcV8StringLength = msg.get();\n\tif (otcV8StringLength == 5 && msg.getString(5) == \"OTCv8\") {\n\t\totclientV8 = msg.get(); // 253, 260, 261, ...\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f14c9f77fee59792cbefbe79927891a1b682d6e02a65a90c5e5fd574b15e3fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 805, + "startColumn": 46, + "charOffset": 27332, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 803, + "startColumn": 46, + "charOffset": 27208, + "charLength": 1, + "snippet": { + "text": "\t// OTCv8 version detection\n\tuint16_t otcV8StringLength = msg.get();\n\tif (otcV8StringLength == 5 && msg.getString(5) == \"OTCv8\") {\n\t\totclientV8 = msg.get(); // 253, 260, 261, ...\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "280ee0f69e14790dd386ddbe44c1eab883adc262def37aa9948456966636ad90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'accountId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 843, + "startColumn": 11, + "charOffset": 28398, + "charLength": 9, + "snippet": { + "text": "accountId" + } + }, + "contextRegion": { + "startLine": 841, + "startColumn": 11, + "charOffset": 28384, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tuint32_t accountId;\n\tif (!IOLoginData::gameWorldAuthentication(accountDescriptor, password, characterName, accountId, oldProtocol)) {\n\t\tss.str(std::string());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ad2784b7b31c2357ff3416035b65f034edd056f93c451988faeede0d756cb85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 853, + "startColumn": 19, + "charOffset": 28845, + "charLength": 4, + "snippet": { + "text": "0x14" + } + }, + "contextRegion": { + "startLine": 851, + "startColumn": 19, + "charOffset": 28771, + "charLength": 4, + "snippet": { + "text": "\n\t\tauto output = OutputMessagePool::getOutputMessage();\n\t\toutput->addByte(0x14);\n\t\toutput->addString(ss.str(), \"ProtocolGame::onRecvFirstMessage - ss.str()\");\n\t\tsend(output);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "420220b35f46a038602b290882e603e7363d3ae4610039d9109e84a986ba59fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x14 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 853, + "startColumn": 19, + "charOffset": 28845, + "charLength": 4, + "snippet": { + "text": "0x14" + } + }, + "contextRegion": { + "startLine": 851, + "startColumn": 19, + "charOffset": 28771, + "charLength": 4, + "snippet": { + "text": "\n\t\tauto output = OutputMessagePool::getOutputMessage();\n\t\toutput->addByte(0x14);\n\t\toutput->addString(ss.str(), \"ProtocolGame::onRecvFirstMessage - ss.str()\");\n\t\tsend(output);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7829b8e3d7f779380888789187ebedc276eeb5964d9884af716a26ed1360de8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 856, + "startColumn": 18, + "charOffset": 28963, + "charLength": 13, + "snippet": { + "text": "scheduleEvent" + } + }, + "contextRegion": { + "startLine": 854, + "startColumn": 18, + "charOffset": 28852, + "charLength": 13, + "snippet": { + "text": "\t\toutput->addString(ss.str(), \"ProtocolGame::onRecvFirstMessage - ss.str()\");\n\t\tsend(output);\n\t\tg_dispatcher().scheduleEvent(\n\t\t\t1000, [self = getThis()] { self->disconnect(); }, \"ProtocolGame::disconnect\"\n\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "105ee8f964e816fc7da7c979bc6ec5b4883689e5abc15b8ebcee15d5164d89e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 857, + "startColumn": 4, + "charOffset": 28981, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 855, + "startColumn": 4, + "charOffset": 28930, + "charLength": 4, + "snippet": { + "text": "\t\tsend(output);\n\t\tg_dispatcher().scheduleEvent(\n\t\t\t1000, [self = getThis()] { self->disconnect(); }, \"ProtocolGame::disconnect\"\n\t\t);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eedd8deb9f588bf3862621e8b13b73c85fe4c41b1df4ca3f79815bdd73ad6654" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 869, + "startColumn": 60, + "charOffset": 29468, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 867, + "startColumn": 60, + "charOffset": 29339, + "charLength": 4, + "snippet": { + "text": "\tstatic std::random_device rd;\n\tstatic std::ranlux24 generator(rd());\n\tstatic std::uniform_int_distribution randNumber(0x00, 0xFF);\n\n\t// Skip checksum" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8311f45843f140be61648dea28ffd57c4e741faee3015aadde77bd2014e7525" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 869, + "startColumn": 66, + "charOffset": 29474, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 867, + "startColumn": 66, + "charOffset": 29339, + "charLength": 4, + "snippet": { + "text": "\tstatic std::random_device rd;\n\tstatic std::ranlux24 generator(rd());\n\tstatic std::uniform_int_distribution randNumber(0x00, 0xFF);\n\n\t// Skip checksum" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72e7a2206ba5e73387bc5b2d40c00ac67134dacf05c8f812cfc4bd409a031087" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 869, + "startColumn": 66, + "charOffset": 29474, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 867, + "startColumn": 66, + "charOffset": 29339, + "charLength": 4, + "snippet": { + "text": "\tstatic std::random_device rd;\n\tstatic std::ranlux24 generator(rd());\n\tstatic std::uniform_int_distribution randNumber(0x00, 0xFF);\n\n\t// Skip checksum" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "91b8033be296d78b2705f3acbce7e3c19c01a3023d860f817724e9b629f56329" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 872, + "startColumn": 20, + "charOffset": 29519, + "charLength": 6, + "snippet": { + "text": "sizeof" + } + }, + "contextRegion": { + "startLine": 870, + "startColumn": 20, + "charOffset": 29481, + "charLength": 6, + "snippet": { + "text": "\n\t// Skip checksum\n\toutput->skipBytes(sizeof(uint32_t));\n\n\t// Packet length & type" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be15816817486fb3d9eca41eb3668b11d1baf7031f653527ef39ba7eef1be147" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 875, + "startColumn": 24, + "charOffset": 29587, + "charLength": 6, + "snippet": { + "text": "0x0006" + } + }, + "contextRegion": { + "startLine": 873, + "startColumn": 24, + "charOffset": 29538, + "charLength": 6, + "snippet": { + "text": "\n\t// Packet length & type\n\toutput->add(0x0006);\n\toutput->addByte(0x1F);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0cdbc7c2d50620516a6e8c8fd5440d7b46b8355e56846f098815bedd975a9799" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x0006 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 875, + "startColumn": 24, + "charOffset": 29587, + "charLength": 6, + "snippet": { + "text": "0x0006" + } + }, + "contextRegion": { + "startLine": 873, + "startColumn": 24, + "charOffset": 29538, + "charLength": 6, + "snippet": { + "text": "\n\t// Packet length & type\n\toutput->add(0x0006);\n\toutput->addByte(0x1F);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e95ed627654b579b66f9d4c82dced47c029fa9135cdfc091aa6206947c2544d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 876, + "startColumn": 18, + "charOffset": 29613, + "charLength": 4, + "snippet": { + "text": "0x1F" + } + }, + "contextRegion": { + "startLine": 874, + "startColumn": 18, + "charOffset": 29539, + "charLength": 4, + "snippet": { + "text": "\t// Packet length & type\n\toutput->add(0x0006);\n\toutput->addByte(0x1F);\n\n\t// Add timestamp & random number" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "420220b35f46a038602b290882e603e7363d3ae4610039d9109e84a986ba59fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x1F is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 876, + "startColumn": 18, + "charOffset": 29613, + "charLength": 4, + "snippet": { + "text": "0x1F" + } + }, + "contextRegion": { + "startLine": 874, + "startColumn": 18, + "charOffset": 29539, + "charLength": 4, + "snippet": { + "text": "\t// Packet length & type\n\toutput->add(0x0006);\n\toutput->addByte(0x1F);\n\n\t// Add timestamp & random number" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ffc5b3fde3c889fe47c4c8f7c5f9bf77be64b03081c262410611accc611bf098" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 879, + "startColumn": 45, + "charOffset": 29699, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 877, + "startColumn": 45, + "charOffset": 29620, + "charLength": 4, + "snippet": { + "text": "\n\t// Add timestamp & random number\n\tchallengeTimestamp = static_cast(time(nullptr));\n\toutput->add(challengeTimestamp);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "146df0f7ccfaf113b7eb36414502cd6b3b64dd8852db7653c1057e383f474bb8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 882, + "startColumn": 20, + "charOffset": 29779, + "charLength": 10, + "snippet": { + "text": "randNumber" + } + }, + "contextRegion": { + "startLine": 880, + "startColumn": 20, + "charOffset": 29715, + "charLength": 10, + "snippet": { + "text": "\toutput->add(challengeTimestamp);\n\n\tchallengeRandom = randNumber(generator);\n\toutput->addByte(challengeRandom);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de78e9ea049a2ff8c26dad56579dede673095a42bedaaa52baea9d22e034c559" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "12 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 886, + "startColumn": 21, + "charOffset": 29889, + "charLength": 2, + "snippet": { + "text": "12" + } + }, + "contextRegion": { + "startLine": 884, + "startColumn": 21, + "charOffset": 29837, + "charLength": 2, + "snippet": { + "text": "\n\t// Go back and write checksum\n\toutput->skipBytes(-12);\n\t// To support 11.10-, not have problems with 11.11+\n\toutput->add(adlerChecksum(output->getOutputBuffer() + sizeof(uint32_t), 8));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b2bb03aff5ed2af8a6d0952132f6fe3c61aeab89f3131ea10c4975059a3ee8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 888, + "startColumn": 64, + "charOffset": 30010, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 886, + "startColumn": 64, + "charOffset": 29869, + "charLength": 1, + "snippet": { + "text": "\toutput->skipBytes(-12);\n\t// To support 11.10-, not have problems with 11.11+\n\toutput->add(adlerChecksum(output->getOutputBuffer() + sizeof(uint32_t), 8));\n\n\tsend(std::move(output));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "abbd727a87f42e62ef5ad576a7a01e4d4a89126ab78fca52f429f2b0711f4556" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 888, + "startColumn": 84, + "charOffset": 30030, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 886, + "startColumn": 84, + "charOffset": 29869, + "charLength": 1, + "snippet": { + "text": "\toutput->skipBytes(-12);\n\t// To support 11.10-, not have problems with 11.11+\n\toutput->add(adlerChecksum(output->getOutputBuffer() + sizeof(uint32_t), 8));\n\n\tsend(std::move(output));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7fded1877a89c0c32bb70c5375d9d3d220e1b40c352ec8366c5f9884b6fcfdc8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 895, + "startColumn": 18, + "charOffset": 30208, + "charLength": 4, + "snippet": { + "text": "0x14" + } + }, + "contextRegion": { + "startLine": 893, + "startColumn": 18, + "charOffset": 30065, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::disconnectClient(const std::string &message) const {\n\tauto output = OutputMessagePool::getOutputMessage();\n\toutput->addByte(0x14);\n\toutput->addString(message, \"ProtocolGame::disconnectClient - message\");\n\tsend(output);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef435d790b51b0ee4e38becacc938647e09d1572065e1c3b76b1dc1b37c7f71a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x14 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 895, + "startColumn": 18, + "charOffset": 30208, + "charLength": 4, + "snippet": { + "text": "0x14" + } + }, + "contextRegion": { + "startLine": 893, + "startColumn": 18, + "charOffset": 30065, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::disconnectClient(const std::string &message) const {\n\tauto output = OutputMessagePool::getOutputMessage();\n\toutput->addByte(0x14);\n\toutput->addString(message, \"ProtocolGame::disconnectClient - message\");\n\tsend(output);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "332df2c492c48b2d73ee948d77cc6a17a664ec21c4a747bd853971a35a6ce15b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 913, + "startColumn": 6, + "charOffset": 30663, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 911, + "startColumn": 6, + "charOffset": 30622, + "charLength": 1, + "snippet": { + "text": "\tuint8_t recvbyte = msg.getByte();\n\n\tif (!player || player->isRemoved()) {\n\t\tif (recvbyte == 0x0F) {\n\t\t\tdisconnect();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76cb7f9ea0b435177101b41546f6a9002b7d07f92690183a29ac670c51903ac9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x0F is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 914, + "startColumn": 19, + "charOffset": 30715, + "charLength": 4, + "snippet": { + "text": "0x0F" + } + }, + "contextRegion": { + "startLine": 912, + "startColumn": 19, + "charOffset": 30657, + "charLength": 4, + "snippet": { + "text": "\n\tif (!player || player->isRemoved()) {\n\t\tif (recvbyte == 0x0F) {\n\t\t\tdisconnect();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca1df832f941a34424188dfaa50ca8133ffb631fe8e5677c8aea3a0cf2fbcea9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 923, + "startColumn": 52, + "charOffset": 30937, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 921, + "startColumn": 52, + "charOffset": 30811, + "charLength": 4, + "snippet": { + "text": "\t\t// Check player activity on death screen\n\t\tif (m_playerDeathTime == 0) {\n\t\t\tg_game().playerCheckActivity(player->getName(), 1000);\n\t\t\tm_playerDeathTime++;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c716fe39179e9c53f6b4e4a3f86624ac131ee239ea5b1b0c153fd4c32b0df6bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xD3 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 932, + "startColumn": 28, + "charOffset": 31062, + "charLength": 4, + "snippet": { + "text": "0xD3" + } + }, + "contextRegion": { + "startLine": 930, + "startColumn": 28, + "charOffset": 31015, + "charLength": 4, + "snippet": { + "text": "\n\t// Modules system\n\tif (player && recvbyte != 0xD3) {\n\t\tg_modules().executeOnRecvbyte(player->getID(), msg, recvbyte);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7df90b5a39e5dcd1ab2319f72d0200d1106630ef1dad05ccf21a371f0af58f9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x14 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 940, + "startColumn": 18, + "charOffset": 31257, + "charLength": 4, + "snippet": { + "text": "0x14" + } + }, + "contextRegion": { + "startLine": 938, + "startColumn": 18, + "charOffset": 31184, + "charLength": 4, + "snippet": { + "text": "\nvoid ProtocolGame::parsePacketDead(uint8_t recvbyte) {\n\tif (recvbyte == 0x14) {\n\t\t// Remove player from game if click \"ok\" using otc\n\t\tif (player && isOTC) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d06112223704f4c2d46601b7a832eb981d39d840b5792732deb46cdd9c17954" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x0F is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 950, + "startColumn": 18, + "charOffset": 31511, + "charLength": 4, + "snippet": { + "text": "0x0F" + } + }, + "contextRegion": { + "startLine": 948, + "startColumn": 18, + "charOffset": 31490, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tif (recvbyte == 0x0F) {\n\t\tif (!player) {\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de3b9e14449dba26c8f3a2ade867656ad355998022fcc8456fcd8aff9d5d9a19" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 951, + "startColumn": 7, + "charOffset": 31525, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 949, + "startColumn": 7, + "charOffset": 31493, + "charLength": 1, + "snippet": { + "text": "\n\tif (recvbyte == 0x0F) {\n\t\tif (!player) {\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "045103919229b50268c1f154e172cccfac963c9019a21918831a21a90d5617da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 955, + "startColumn": 18, + "charOffset": 31569, + "charLength": 13, + "snippet": { + "text": "scheduleEvent" + } + }, + "contextRegion": { + "startLine": 953, + "startColumn": 18, + "charOffset": 31547, + "charLength": 13, + "snippet": { + "text": "\t\t}\n\n\t\tg_dispatcher().scheduleEvent(\n\t\t\t100, [self = getThis()] { self->sendPing(); }, \"ProtocolGame::sendPing\"\n\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "470dc5a916d3bfd72329833e4afa956e17361ab91f6e8ded74a658ace2398fe4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 956, + "startColumn": 4, + "charOffset": 31587, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 954, + "startColumn": 4, + "charOffset": 31551, + "charLength": 3, + "snippet": { + "text": "\n\t\tg_dispatcher().scheduleEvent(\n\t\t\t100, [self = getThis()] { self->sendPing(); }, \"ProtocolGame::sendPing\"\n\t\t);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f36eba2811e82c1e28793fe28744b696697e5aaf0d8bfb6457243ac27ad3acbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 961, + "startColumn": 13, + "charOffset": 31720, + "charLength": 14, + "snippet": { + "text": "removeCreature" + } + }, + "contextRegion": { + "startLine": 959, + "startColumn": 13, + "charOffset": 31665, + "charLength": 14, + "snippet": { + "text": "\t\tif (!player->spawn()) {\n\t\t\tdisconnect();\n\t\t\tg_game().removeCreature(player, true);\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d352527f1cdcb2ab0d7d03b45759fe39594306fea046933a8711f531d276d34d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x1D is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 971, + "startColumn": 18, + "charOffset": 31897, + "charLength": 4, + "snippet": { + "text": "0x1D" + } + }, + "contextRegion": { + "startLine": 969, + "startColumn": 18, + "charOffset": 31876, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tif (recvbyte == 0x1D) {\n\t\t// keep the connection alive\n\t\tg_dispatcher().scheduleEvent(" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f90ad207e4183a1360b74a21a17e37a6b823940e010f349dcdd127c7b355e8b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 973, + "startColumn": 18, + "charOffset": 31953, + "charLength": 13, + "snippet": { + "text": "scheduleEvent" + } + }, + "contextRegion": { + "startLine": 971, + "startColumn": 18, + "charOffset": 31880, + "charLength": 13, + "snippet": { + "text": "\tif (recvbyte == 0x1D) {\n\t\t// keep the connection alive\n\t\tg_dispatcher().scheduleEvent(\n\t\t\t100, [self = getThis()] { self->sendPingBack(); }, \"ProtocolGame::sendPingBack\"\n\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d0d90f44d7f2cafaabaf75b6998fb8f30d777a1cc30a2b3896a729c7ddab656" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 974, + "startColumn": 4, + "charOffset": 31971, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 972, + "startColumn": 4, + "charOffset": 31905, + "charLength": 3, + "snippet": { + "text": "\t\t// keep the connection alive\n\t\tg_dispatcher().scheduleEvent(\n\t\t\t100, [self = getThis()] { self->sendPingBack(); }, \"ProtocolGame::sendPingBack\"\n\t\t);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a3fba1651c39c328bd112e42f7fca82cce823c18f0ad88d0a4cd1f96c15577d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 981, + "startColumn": 6, + "charOffset": 32109, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 979, + "startColumn": 6, + "charOffset": 32071, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::addBless() {\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ddf1eba863b9e6bfe0b72eac988d6a88027b81b5f56d6ae985d78fa88657f9e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 992, + "startColumn": 6, + "charOffset": 32353, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 990, + "startColumn": 6, + "charOffset": 32344, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!player || player->isRemoved() || player->getHealth() <= 0) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d90e71f4cd597f284fb71178bba07321884b2b0d60b192d8e2b97cdcd579b24c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x14 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 997, + "startColumn": 8, + "charOffset": 32457, + "charLength": 4, + "snippet": { + "text": "0x14" + } + }, + "contextRegion": { + "startLine": 995, + "startColumn": 8, + "charOffset": 32428, + "charLength": 4, + "snippet": { + "text": "\n\tswitch (recvbyte) {\n\t\tcase 0x14:\n\t\t\tlogout(true, false);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ecfce8502bc197e816d75a43879d86f34121e9e77ae014a0ee3a13701c36469f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x1D is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1000, + "startColumn": 8, + "charOffset": 32504, + "charLength": 4, + "snippet": { + "text": "0x1D" + } + }, + "contextRegion": { + "startLine": 998, + "startColumn": 8, + "charOffset": 32463, + "charLength": 4, + "snippet": { + "text": "\t\t\tlogout(true, false);\n\t\t\tbreak;\n\t\tcase 0x1D:\n\t\t\tg_game().playerReceivePingBack(player->getID());\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e4c4310b9fba41ed83a838f04f62b872d0fea89051f6dce4048e22e66e090ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x1E is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1003, + "startColumn": 8, + "charOffset": 32579, + "charLength": 4, + "snippet": { + "text": "0x1E" + } + }, + "contextRegion": { + "startLine": 1001, + "startColumn": 8, + "charOffset": 32510, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_game().playerReceivePingBack(player->getID());\n\t\t\tbreak;\n\t\tcase 0x1E:\n\t\t\tg_game().playerReceivePing(player->getID());\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8722574c752a52da0140a8882ed09432e5db5bfd075ac1464e271ebf7efddabb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x2a is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1006, + "startColumn": 8, + "charOffset": 32650, + "charLength": 4, + "snippet": { + "text": "0x2a" + } + }, + "contextRegion": { + "startLine": 1004, + "startColumn": 8, + "charOffset": 32585, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_game().playerReceivePing(player->getID());\n\t\t\tbreak;\n\t\tcase 0x2a:\n\t\t\tparseCyclopediaMonsterTracker(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "553807037efa14b39146ebb358ab4f7aa965c0e807f80b87f088e441d64fb127" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x2B is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1009, + "startColumn": 8, + "charOffset": 32712, + "charLength": 4, + "snippet": { + "text": "0x2B" + } + }, + "contextRegion": { + "startLine": 1007, + "startColumn": 8, + "charOffset": 32656, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseCyclopediaMonsterTracker(msg);\n\t\t\tbreak;\n\t\tcase 0x2B:\n\t\t\tparsePartyAnalyzerAction(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a7b6e4d5cfeb3c9d17b58d35c47f44ea5b11dcfacfcfbfd075b682efd8d68f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x2c is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1012, + "startColumn": 8, + "charOffset": 32769, + "charLength": 4, + "snippet": { + "text": "0x2c" + } + }, + "contextRegion": { + "startLine": 1010, + "startColumn": 8, + "charOffset": 32718, + "charLength": 4, + "snippet": { + "text": "\t\t\tparsePartyAnalyzerAction(msg);\n\t\t\tbreak;\n\t\tcase 0x2c:\n\t\t\tparseLeaderFinderWindow(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08445e5f41c766a4ac2a985334e31603b761ae84628f82b1d1dbdda34cd56916" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x2d is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1015, + "startColumn": 8, + "charOffset": 32825, + "charLength": 4, + "snippet": { + "text": "0x2d" + } + }, + "contextRegion": { + "startLine": 1013, + "startColumn": 8, + "charOffset": 32775, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseLeaderFinderWindow(msg);\n\t\t\tbreak;\n\t\tcase 0x2d:\n\t\t\tparseMemberFinderWindow(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e857be2379ce505cf4503678bbdaf5bc5abb3cd297b40f0b993c06546d3d4f3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x28 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1018, + "startColumn": 8, + "charOffset": 32881, + "charLength": 4, + "snippet": { + "text": "0x28" + } + }, + "contextRegion": { + "startLine": 1016, + "startColumn": 8, + "charOffset": 32831, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseMemberFinderWindow(msg);\n\t\t\tbreak;\n\t\tcase 0x28:\n\t\t\tparseStashWithdraw(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "477465a7eaf640f4b9c7779180f53ba9220a78849452c2465bf52b44bdf43ed1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x29 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1021, + "startColumn": 8, + "charOffset": 32932, + "charLength": 4, + "snippet": { + "text": "0x29" + } + }, + "contextRegion": { + "startLine": 1019, + "startColumn": 8, + "charOffset": 32887, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseStashWithdraw(msg);\n\t\t\tbreak;\n\t\tcase 0x29:\n\t\t\tparseRetrieveDepotSearch(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52c9943d40e33a0c39123bd76a2a90b842c9ea2b3659512a7e0ae299daff08e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x32 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1024, + "startColumn": 8, + "charOffset": 32989, + "charLength": 4, + "snippet": { + "text": "0x32" + } + }, + "contextRegion": { + "startLine": 1022, + "startColumn": 8, + "charOffset": 32938, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseRetrieveDepotSearch(msg);\n\t\t\tbreak;\n\t\tcase 0x32:\n\t\t\tparseExtendedOpcode(msg);\n\t\t\tbreak; // otclient extended opcode" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74de2c3695a5a901dffa4bdab1e5bf8f322056a27287c65b7cf74011158abaa1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1027, + "startColumn": 8, + "charOffset": 33069, + "charLength": 4, + "snippet": { + "text": "0x60" + } + }, + "contextRegion": { + "startLine": 1025, + "startColumn": 8, + "charOffset": 32995, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseExtendedOpcode(msg);\n\t\t\tbreak; // otclient extended opcode\n\t\tcase 0x60:\n\t\t\tparseInventoryImbuements(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd7f721fb8d504f5426537ae9384c3b6ad42576d48111e50ec1a98a3b1d705fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x61 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1030, + "startColumn": 8, + "charOffset": 33126, + "charLength": 4, + "snippet": { + "text": "0x61" + } + }, + "contextRegion": { + "startLine": 1028, + "startColumn": 8, + "charOffset": 33075, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseInventoryImbuements(msg);\n\t\t\tbreak;\n\t\tcase 0x61:\n\t\t\tparseOpenWheel(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7f346b9e4b7683bcd19c4d4682024b81cbb8a1f48f60f912b9a22c0d907c99f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x62 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1033, + "startColumn": 8, + "charOffset": 33173, + "charLength": 4, + "snippet": { + "text": "0x62" + } + }, + "contextRegion": { + "startLine": 1031, + "startColumn": 8, + "charOffset": 33132, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseOpenWheel(msg);\n\t\t\tbreak;\n\t\tcase 0x62:\n\t\t\tparseSaveWheel(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b4145e03077a4d42ce77fcb8f9bdefafeb49b25a6c053c6917353af0ea677ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x64 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1036, + "startColumn": 8, + "charOffset": 33220, + "charLength": 4, + "snippet": { + "text": "0x64" + } + }, + "contextRegion": { + "startLine": 1034, + "startColumn": 8, + "charOffset": 33179, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseSaveWheel(msg);\n\t\t\tbreak;\n\t\tcase 0x64:\n\t\t\tparseAutoWalk(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "986149c75d3b674cc24a47990e18300af55a919d4fd4627fdfdfba3862d64968" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x65 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1039, + "startColumn": 8, + "charOffset": 33266, + "charLength": 4, + "snippet": { + "text": "0x65" + } + }, + "contextRegion": { + "startLine": 1037, + "startColumn": 8, + "charOffset": 33226, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseAutoWalk(msg);\n\t\t\tbreak;\n\t\tcase 0x65:\n\t\t\tg_game().playerMove(player->getID(), DIRECTION_NORTH);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b428703e0b70ba18786b212fd18635b4bb7ab8ce66acf5f1987603ce862bc4e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x66 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1042, + "startColumn": 8, + "charOffset": 33347, + "charLength": 4, + "snippet": { + "text": "0x66" + } + }, + "contextRegion": { + "startLine": 1040, + "startColumn": 8, + "charOffset": 33272, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_game().playerMove(player->getID(), DIRECTION_NORTH);\n\t\t\tbreak;\n\t\tcase 0x66:\n\t\t\tg_game().playerMove(player->getID(), DIRECTION_EAST);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "def077bb0b4970a7030abd80980c2ed8f420affd02609f65209703e9fb9f2b9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x67 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1045, + "startColumn": 8, + "charOffset": 33427, + "charLength": 4, + "snippet": { + "text": "0x67" + } + }, + "contextRegion": { + "startLine": 1043, + "startColumn": 8, + "charOffset": 33353, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_game().playerMove(player->getID(), DIRECTION_EAST);\n\t\t\tbreak;\n\t\tcase 0x67:\n\t\t\tg_game().playerMove(player->getID(), DIRECTION_SOUTH);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c6487f74797bf76a3233e977d6d531b77988ca5dfa7ca967c9d70c8c19ad771" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x68 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1048, + "startColumn": 8, + "charOffset": 33508, + "charLength": 4, + "snippet": { + "text": "0x68" + } + }, + "contextRegion": { + "startLine": 1046, + "startColumn": 8, + "charOffset": 33433, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_game().playerMove(player->getID(), DIRECTION_SOUTH);\n\t\t\tbreak;\n\t\tcase 0x68:\n\t\t\tg_game().playerMove(player->getID(), DIRECTION_WEST);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5bf237cf5aca600f4c4e80b5eb16ca8b51cc6caeb5559aeba9a9b220024e38e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x69 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1051, + "startColumn": 8, + "charOffset": 33588, + "charLength": 4, + "snippet": { + "text": "0x69" + } + }, + "contextRegion": { + "startLine": 1049, + "startColumn": 8, + "charOffset": 33514, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_game().playerMove(player->getID(), DIRECTION_WEST);\n\t\t\tbreak;\n\t\tcase 0x69:\n\t\t\tg_game().playerStopAutoWalk(player->getID());\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56d749551db447745187cdb77d64425468c2a4d5cbec1d11499fbfbc2b0d0b6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x6A is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1054, + "startColumn": 8, + "charOffset": 33660, + "charLength": 4, + "snippet": { + "text": "0x6A" + } + }, + "contextRegion": { + "startLine": 1052, + "startColumn": 8, + "charOffset": 33594, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_game().playerStopAutoWalk(player->getID());\n\t\t\tbreak;\n\t\tcase 0x6A:\n\t\t\tg_game().playerMove(player->getID(), DIRECTION_NORTHEAST);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5c74f85ab1a97db2f07daed2e777896d5cead2c1b5829e0a0cb86ac6861cfaa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x6B is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1057, + "startColumn": 8, + "charOffset": 33745, + "charLength": 4, + "snippet": { + "text": "0x6B" + } + }, + "contextRegion": { + "startLine": 1055, + "startColumn": 8, + "charOffset": 33666, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_game().playerMove(player->getID(), DIRECTION_NORTHEAST);\n\t\t\tbreak;\n\t\tcase 0x6B:\n\t\t\tg_game().playerMove(player->getID(), DIRECTION_SOUTHEAST);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9a9e33e4dd48efc4d24e22c7b7cc26309d1047e128a1889a0b7ed8b32d2a942" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x6C is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1060, + "startColumn": 8, + "charOffset": 33830, + "charLength": 4, + "snippet": { + "text": "0x6C" + } + }, + "contextRegion": { + "startLine": 1058, + "startColumn": 8, + "charOffset": 33751, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_game().playerMove(player->getID(), DIRECTION_SOUTHEAST);\n\t\t\tbreak;\n\t\tcase 0x6C:\n\t\t\tg_game().playerMove(player->getID(), DIRECTION_SOUTHWEST);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bf6b6094ceb5f967196057767de2dde7cf77c7b0426f1342710e38f0446f227" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x6D is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1063, + "startColumn": 8, + "charOffset": 33915, + "charLength": 4, + "snippet": { + "text": "0x6D" + } + }, + "contextRegion": { + "startLine": 1061, + "startColumn": 8, + "charOffset": 33836, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_game().playerMove(player->getID(), DIRECTION_SOUTHWEST);\n\t\t\tbreak;\n\t\tcase 0x6D:\n\t\t\tg_game().playerMove(player->getID(), DIRECTION_NORTHWEST);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1370a8136793ac8bf16e537e8df2793a6a0915227d5b105bde78545a7561032d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x6F is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1066, + "startColumn": 8, + "charOffset": 34000, + "charLength": 4, + "snippet": { + "text": "0x6F" + } + }, + "contextRegion": { + "startLine": 1064, + "startColumn": 8, + "charOffset": 33921, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_game().playerMove(player->getID(), DIRECTION_NORTHWEST);\n\t\t\tbreak;\n\t\tcase 0x6F:\n\t\t\tg_game().playerTurn(player->getID(), DIRECTION_NORTH);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80bbfd9f339e764a3870ad12ab985383d75939a362e5fc5057db3692c6978d6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x70 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1069, + "startColumn": 8, + "charOffset": 34081, + "charLength": 4, + "snippet": { + "text": "0x70" + } + }, + "contextRegion": { + "startLine": 1067, + "startColumn": 8, + "charOffset": 34006, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_game().playerTurn(player->getID(), DIRECTION_NORTH);\n\t\t\tbreak;\n\t\tcase 0x70:\n\t\t\tg_game().playerTurn(player->getID(), DIRECTION_EAST);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e988bb90d9746ee7791ac2e8e65f0d8c98e3c32ae018e15aa92a2817016ad1ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x71 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1072, + "startColumn": 8, + "charOffset": 34161, + "charLength": 4, + "snippet": { + "text": "0x71" + } + }, + "contextRegion": { + "startLine": 1070, + "startColumn": 8, + "charOffset": 34087, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_game().playerTurn(player->getID(), DIRECTION_EAST);\n\t\t\tbreak;\n\t\tcase 0x71:\n\t\t\tg_game().playerTurn(player->getID(), DIRECTION_SOUTH);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d919ef26dcd98ed90b41481cecd93401e65366d2d38dafc7a289531c71e9fb4d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x72 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1075, + "startColumn": 8, + "charOffset": 34242, + "charLength": 4, + "snippet": { + "text": "0x72" + } + }, + "contextRegion": { + "startLine": 1073, + "startColumn": 8, + "charOffset": 34167, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_game().playerTurn(player->getID(), DIRECTION_SOUTH);\n\t\t\tbreak;\n\t\tcase 0x72:\n\t\t\tg_game().playerTurn(player->getID(), DIRECTION_WEST);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34e9a9acfc67a62c7269b9c17b23d468f7b575b903e003f70dc3886f0d4f761d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x73 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1078, + "startColumn": 8, + "charOffset": 34322, + "charLength": 4, + "snippet": { + "text": "0x73" + } + }, + "contextRegion": { + "startLine": 1076, + "startColumn": 8, + "charOffset": 34248, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_game().playerTurn(player->getID(), DIRECTION_WEST);\n\t\t\tbreak;\n\t\tcase 0x73:\n\t\t\tparseTeleport(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "431d361966c57be0b047db31f77603ec480db040fed468b800cd69bb17abd4d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x77 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1081, + "startColumn": 8, + "charOffset": 34368, + "charLength": 4, + "snippet": { + "text": "0x77" + } + }, + "contextRegion": { + "startLine": 1079, + "startColumn": 8, + "charOffset": 34328, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseTeleport(msg);\n\t\t\tbreak;\n\t\tcase 0x77:\n\t\t\tparseHotkeyEquip(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00aeb70a9adda828de1707fdb06276320f0c95f0cefc1db0fbfd9026e51eab07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x78 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1084, + "startColumn": 8, + "charOffset": 34417, + "charLength": 4, + "snippet": { + "text": "0x78" + } + }, + "contextRegion": { + "startLine": 1082, + "startColumn": 8, + "charOffset": 34374, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseHotkeyEquip(msg);\n\t\t\tbreak;\n\t\tcase 0x78:\n\t\t\tparseThrow(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a5dddbedee70285d951255260ff0d5cdfcdc6d0a0a8ce42b8716894b0fc5b2c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x79 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1087, + "startColumn": 8, + "charOffset": 34460, + "charLength": 4, + "snippet": { + "text": "0x79" + } + }, + "contextRegion": { + "startLine": 1085, + "startColumn": 8, + "charOffset": 34423, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseThrow(msg);\n\t\t\tbreak;\n\t\tcase 0x79:\n\t\t\tparseLookInShop(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8080249f73bb2f9596e5fc7d9de2a40187cbb2b25492545e0e326b091859001d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x7A is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1090, + "startColumn": 8, + "charOffset": 34508, + "charLength": 4, + "snippet": { + "text": "0x7A" + } + }, + "contextRegion": { + "startLine": 1088, + "startColumn": 8, + "charOffset": 34466, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseLookInShop(msg);\n\t\t\tbreak;\n\t\tcase 0x7A:\n\t\t\tparsePlayerBuyOnShop(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed47e9d6802c6db88e7045e642ab91a301f79c38efcc3209bf3e057c2dd4b2ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x7B is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1093, + "startColumn": 8, + "charOffset": 34561, + "charLength": 4, + "snippet": { + "text": "0x7B" + } + }, + "contextRegion": { + "startLine": 1091, + "startColumn": 8, + "charOffset": 34514, + "charLength": 4, + "snippet": { + "text": "\t\t\tparsePlayerBuyOnShop(msg);\n\t\t\tbreak;\n\t\tcase 0x7B:\n\t\t\tparsePlayerSellOnShop(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "420e21aa834162640a436c779a581385a793b7472820382bf8db5fa8677d0567" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x7C is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1096, + "startColumn": 8, + "charOffset": 34615, + "charLength": 4, + "snippet": { + "text": "0x7C" + } + }, + "contextRegion": { + "startLine": 1094, + "startColumn": 8, + "charOffset": 34567, + "charLength": 4, + "snippet": { + "text": "\t\t\tparsePlayerSellOnShop(msg);\n\t\t\tbreak;\n\t\tcase 0x7C:\n\t\t\tg_game().playerCloseShop(player->getID());\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1fbb75f6ec16156661bc2e094d3035583cdb1f8dda0a2550380e4c54ab2b2a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x7D is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1099, + "startColumn": 8, + "charOffset": 34684, + "charLength": 4, + "snippet": { + "text": "0x7D" + } + }, + "contextRegion": { + "startLine": 1097, + "startColumn": 8, + "charOffset": 34621, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_game().playerCloseShop(player->getID());\n\t\t\tbreak;\n\t\tcase 0x7D:\n\t\t\tparseRequestTrade(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a60fb7a5189369929a8c45d26854ff2b106d8c6c86f9e77794c8e9e029a654ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x7E is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1102, + "startColumn": 8, + "charOffset": 34734, + "charLength": 4, + "snippet": { + "text": "0x7E" + } + }, + "contextRegion": { + "startLine": 1100, + "startColumn": 8, + "charOffset": 34690, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseRequestTrade(msg);\n\t\t\tbreak;\n\t\tcase 0x7E:\n\t\t\tparseLookInTrade(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba772b983fc4cda399815b409e26ae00f70cd7aafa58ac1d51cef88dd0595c2a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x7F is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1105, + "startColumn": 8, + "charOffset": 34783, + "charLength": 4, + "snippet": { + "text": "0x7F" + } + }, + "contextRegion": { + "startLine": 1103, + "startColumn": 8, + "charOffset": 34740, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseLookInTrade(msg);\n\t\t\tbreak;\n\t\tcase 0x7F:\n\t\t\tg_game().playerAcceptTrade(player->getID());\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70725587ca0fc42d95299e0122e297ddfcd24b399717cdcab9a90750c4c69373" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x80 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1108, + "startColumn": 8, + "charOffset": 34854, + "charLength": 4, + "snippet": { + "text": "0x80" + } + }, + "contextRegion": { + "startLine": 1106, + "startColumn": 8, + "charOffset": 34789, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_game().playerAcceptTrade(player->getID());\n\t\t\tbreak;\n\t\tcase 0x80:\n\t\t\tg_game().playerCloseTrade(player->getID());\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ef89612aa22ac18c67f33875c5c4c70f07bc5f695aed301c1796d438a9f8660" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x81 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1111, + "startColumn": 8, + "charOffset": 34924, + "charLength": 4, + "snippet": { + "text": "0x81" + } + }, + "contextRegion": { + "startLine": 1109, + "startColumn": 8, + "charOffset": 34860, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_game().playerCloseTrade(player->getID());\n\t\t\tbreak;\n\t\tcase 0x81:\n\t\t\tparseFriendSystemAction(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45fe7409056d788492e2c07320981abd634b15e290de1307112a817bc2f49133" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x82 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1114, + "startColumn": 8, + "charOffset": 34980, + "charLength": 4, + "snippet": { + "text": "0x82" + } + }, + "contextRegion": { + "startLine": 1112, + "startColumn": 8, + "charOffset": 34930, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseFriendSystemAction(msg);\n\t\t\tbreak;\n\t\tcase 0x82:\n\t\t\tparseUseItem(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4de0a3db3793aa8b65037a010c737af6c5705863ac78c3cb4dace94500cbc9b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x83 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1117, + "startColumn": 8, + "charOffset": 35025, + "charLength": 4, + "snippet": { + "text": "0x83" + } + }, + "contextRegion": { + "startLine": 1115, + "startColumn": 8, + "charOffset": 34986, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseUseItem(msg);\n\t\t\tbreak;\n\t\tcase 0x83:\n\t\t\tparseUseItemEx(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc981eb3083dd9ea5dd23700d71c087334b064bde55746cb1d3bd969c5823ed6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x84 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1120, + "startColumn": 8, + "charOffset": 35072, + "charLength": 4, + "snippet": { + "text": "0x84" + } + }, + "contextRegion": { + "startLine": 1118, + "startColumn": 8, + "charOffset": 35031, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseUseItemEx(msg);\n\t\t\tbreak;\n\t\tcase 0x84:\n\t\t\tparseUseWithCreature(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2bbb46df9d64eea2daaf3fb16bf8166d0b57e1c4411df48082f31e205b2e910" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x85 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1123, + "startColumn": 8, + "charOffset": 35125, + "charLength": 4, + "snippet": { + "text": "0x85" + } + }, + "contextRegion": { + "startLine": 1121, + "startColumn": 8, + "charOffset": 35078, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseUseWithCreature(msg);\n\t\t\tbreak;\n\t\tcase 0x85:\n\t\t\tparseRotateItem(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6dea3c2da86a988f38553ad2e60355867a04e099ae0ce05cf434bbf620ca949c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x86 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1126, + "startColumn": 8, + "charOffset": 35173, + "charLength": 4, + "snippet": { + "text": "0x86" + } + }, + "contextRegion": { + "startLine": 1124, + "startColumn": 8, + "charOffset": 35131, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseRotateItem(msg);\n\t\t\tbreak;\n\t\tcase 0x86:\n\t\t\tparseConfigureShowOffSocket(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f76e6d7a355bc95880b1292fde75fe6225fb5d445c0847661704b519fcebce4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x87 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1129, + "startColumn": 8, + "charOffset": 35233, + "charLength": 4, + "snippet": { + "text": "0x87" + } + }, + "contextRegion": { + "startLine": 1127, + "startColumn": 8, + "charOffset": 35179, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseConfigureShowOffSocket(msg);\n\t\t\tbreak;\n\t\tcase 0x87:\n\t\t\tparseCloseContainer(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2733479b93fa66ec69c61d30328ef329e389a62d60d6e1e94aa73836ea2f0410" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x88 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1132, + "startColumn": 8, + "charOffset": 35285, + "charLength": 4, + "snippet": { + "text": "0x88" + } + }, + "contextRegion": { + "startLine": 1130, + "startColumn": 8, + "charOffset": 35239, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseCloseContainer(msg);\n\t\t\tbreak;\n\t\tcase 0x88:\n\t\t\tparseUpArrowContainer(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a821575768b3782cd6972722dcc42a237fb26734bd55657e788719dc111ad94a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x89 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1135, + "startColumn": 8, + "charOffset": 35339, + "charLength": 4, + "snippet": { + "text": "0x89" + } + }, + "contextRegion": { + "startLine": 1133, + "startColumn": 8, + "charOffset": 35291, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseUpArrowContainer(msg);\n\t\t\tbreak;\n\t\tcase 0x89:\n\t\t\tparseTextWindow(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8d7a345f6e47d34c47dc9483139fe93eae1de984e2968614c9a03d1413a49b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x8A is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1138, + "startColumn": 8, + "charOffset": 35387, + "charLength": 4, + "snippet": { + "text": "0x8A" + } + }, + "contextRegion": { + "startLine": 1136, + "startColumn": 8, + "charOffset": 35345, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseTextWindow(msg);\n\t\t\tbreak;\n\t\tcase 0x8A:\n\t\t\tparseHouseWindow(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c610c9ca6e5e5df3ba65fda0e119b10467223d2e574cffc07f7cd980d0df87b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x8B is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1141, + "startColumn": 8, + "charOffset": 35436, + "charLength": 4, + "snippet": { + "text": "0x8B" + } + }, + "contextRegion": { + "startLine": 1139, + "startColumn": 8, + "charOffset": 35393, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseHouseWindow(msg);\n\t\t\tbreak;\n\t\tcase 0x8B:\n\t\t\tparseWrapableItem(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ef3587c8e2a09b796558e1e41a47fac71fcee27bdee5795ff053089536a87a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x8C is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1144, + "startColumn": 8, + "charOffset": 35486, + "charLength": 4, + "snippet": { + "text": "0x8C" + } + }, + "contextRegion": { + "startLine": 1142, + "startColumn": 8, + "charOffset": 35442, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseWrapableItem(msg);\n\t\t\tbreak;\n\t\tcase 0x8C:\n\t\t\tparseLookAt(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a777829109ce971afb429ff8df1d014439af859631df67215e779f5f6e0b9084" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x8D is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1147, + "startColumn": 8, + "charOffset": 35530, + "charLength": 4, + "snippet": { + "text": "0x8D" + } + }, + "contextRegion": { + "startLine": 1145, + "startColumn": 8, + "charOffset": 35492, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseLookAt(msg);\n\t\t\tbreak;\n\t\tcase 0x8D:\n\t\t\tparseLookInBattleList(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb5aab06e1265fdf177d4d06cb565b75fefa247fc4fe1f45820f8a25bfbb811e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x8E is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1150, + "startColumn": 8, + "charOffset": 35584, + "charLength": 4, + "snippet": { + "text": "0x8E" + } + }, + "contextRegion": { + "startLine": 1148, + "startColumn": 8, + "charOffset": 35536, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseLookInBattleList(msg);\n\t\t\tbreak;\n\t\tcase 0x8E: /* join aggression */\n\t\t\tbreak;\n\t\tcase 0x8F:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6ec04a55be80965e4632af8162ea3df21bb49b6b4e11a179c0c674cb6aae105" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x8F is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1152, + "startColumn": 8, + "charOffset": 35629, + "charLength": 4, + "snippet": { + "text": "0x8F" + } + }, + "contextRegion": { + "startLine": 1150, + "startColumn": 8, + "charOffset": 35577, + "charLength": 4, + "snippet": { + "text": "\t\tcase 0x8E: /* join aggression */\n\t\t\tbreak;\n\t\tcase 0x8F:\n\t\t\tparseQuickLoot(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3be504c9bcda542333eca77c99bfdd64ffa98aebe0e321746a34db363c488c4d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x90 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1155, + "startColumn": 8, + "charOffset": 35676, + "charLength": 4, + "snippet": { + "text": "0x90" + } + }, + "contextRegion": { + "startLine": 1153, + "startColumn": 8, + "charOffset": 35635, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseQuickLoot(msg);\n\t\t\tbreak;\n\t\tcase 0x90:\n\t\t\tparseLootContainer(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fbdc7b59d9607010b8e5296f848a8134f09f785c0c490a2cbd69af81f054dfd7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x91 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1158, + "startColumn": 8, + "charOffset": 35727, + "charLength": 4, + "snippet": { + "text": "0x91" + } + }, + "contextRegion": { + "startLine": 1156, + "startColumn": 8, + "charOffset": 35682, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseLootContainer(msg);\n\t\t\tbreak;\n\t\tcase 0x91:\n\t\t\tparseQuickLootBlackWhitelist(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "301d41914368bccf4b8a2b1fffbbcc4888ea7f738ce9098c118121e38e5f6fa1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x92 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1161, + "startColumn": 8, + "charOffset": 35788, + "charLength": 4, + "snippet": { + "text": "0x92" + } + }, + "contextRegion": { + "startLine": 1159, + "startColumn": 8, + "charOffset": 35733, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseQuickLootBlackWhitelist(msg);\n\t\t\tbreak;\n\t\tcase 0x92:\n\t\t\tparseOpenDepotSearch();\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "574b5278b6052f6852bd1b2886932a12085c7d3aa284d9c8ac1e919ac2ceab37" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x93 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1164, + "startColumn": 8, + "charOffset": 35838, + "charLength": 4, + "snippet": { + "text": "0x93" + } + }, + "contextRegion": { + "startLine": 1162, + "startColumn": 8, + "charOffset": 35794, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseOpenDepotSearch();\n\t\t\tbreak;\n\t\tcase 0x93:\n\t\t\tparseCloseDepotSearch();\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93764bd667a4697d09f54d9b710df5f1a16001df3d7c6dffe7798882bd5b71fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x94 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1167, + "startColumn": 8, + "charOffset": 35889, + "charLength": 4, + "snippet": { + "text": "0x94" + } + }, + "contextRegion": { + "startLine": 1165, + "startColumn": 8, + "charOffset": 35844, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseCloseDepotSearch();\n\t\t\tbreak;\n\t\tcase 0x94:\n\t\t\tparseDepotSearchItemRequest(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "590859a7d8a86178492a5519e265ee6f6fd341ae9141dc588e3ac9f3a40ca7bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x95 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1170, + "startColumn": 8, + "charOffset": 35949, + "charLength": 4, + "snippet": { + "text": "0x95" + } + }, + "contextRegion": { + "startLine": 1168, + "startColumn": 8, + "charOffset": 35895, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseDepotSearchItemRequest(msg);\n\t\t\tbreak;\n\t\tcase 0x95:\n\t\t\tparseOpenParentContainer(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e30f6b537681aba703bfd54b546b941c8da30e776149d50a05a6caa75cdcedb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x96 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1173, + "startColumn": 8, + "charOffset": 36006, + "charLength": 4, + "snippet": { + "text": "0x96" + } + }, + "contextRegion": { + "startLine": 1171, + "startColumn": 8, + "charOffset": 35955, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseOpenParentContainer(msg);\n\t\t\tbreak;\n\t\tcase 0x96:\n\t\t\tparseSay(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc9c083dc81d729c7e8b011fda8f95970a15a9747db959e428d2ba1c57a1a586" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x97 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1176, + "startColumn": 8, + "charOffset": 36047, + "charLength": 4, + "snippet": { + "text": "0x97" + } + }, + "contextRegion": { + "startLine": 1174, + "startColumn": 8, + "charOffset": 36012, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseSay(msg);\n\t\t\tbreak;\n\t\tcase 0x97:\n\t\t\tg_game().playerRequestChannels(player->getID());\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afa56bf16b86203ba4b8b84e16ca2b1ef1bd47049571cbb3a7f7996a78ab7444" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x98 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1179, + "startColumn": 8, + "charOffset": 36122, + "charLength": 4, + "snippet": { + "text": "0x98" + } + }, + "contextRegion": { + "startLine": 1177, + "startColumn": 8, + "charOffset": 36053, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_game().playerRequestChannels(player->getID());\n\t\t\tbreak;\n\t\tcase 0x98:\n\t\t\tparseOpenChannel(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e032f7635b989ce32d4d40e306794c8bc2c81b2411a02d9e2025958d7a486480" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x99 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1182, + "startColumn": 8, + "charOffset": 36171, + "charLength": 4, + "snippet": { + "text": "0x99" + } + }, + "contextRegion": { + "startLine": 1180, + "startColumn": 8, + "charOffset": 36128, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseOpenChannel(msg);\n\t\t\tbreak;\n\t\tcase 0x99:\n\t\t\tparseCloseChannel(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0f5b74385e95a333b75335224d407a11f5c2a5f93f3b76be6e119c0822d3bf3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x9A is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1185, + "startColumn": 8, + "charOffset": 36221, + "charLength": 4, + "snippet": { + "text": "0x9A" + } + }, + "contextRegion": { + "startLine": 1183, + "startColumn": 8, + "charOffset": 36177, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseCloseChannel(msg);\n\t\t\tbreak;\n\t\tcase 0x9A:\n\t\t\tparseOpenPrivateChannel(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60683f0c0275b228894b5dabcfd6665c458e02f6abba7607ba940dca492dc4a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x9E is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1188, + "startColumn": 8, + "charOffset": 36277, + "charLength": 4, + "snippet": { + "text": "0x9E" + } + }, + "contextRegion": { + "startLine": 1186, + "startColumn": 8, + "charOffset": 36227, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseOpenPrivateChannel(msg);\n\t\t\tbreak;\n\t\tcase 0x9E:\n\t\t\tg_game().playerCloseNpcChannel(player->getID());\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e1609699e2c3702598e4c33252a166626157fff20a33f8207a4cd6af2b97481" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x9F is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1191, + "startColumn": 8, + "charOffset": 36352, + "charLength": 4, + "snippet": { + "text": "0x9F" + } + }, + "contextRegion": { + "startLine": 1189, + "startColumn": 8, + "charOffset": 36283, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_game().playerCloseNpcChannel(player->getID());\n\t\t\tbreak;\n\t\tcase 0x9F:\n\t\t\tparseSetMonsterPodium(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44e25dfbdfe755042d2f9fbf72711b3e4f8f846348dcd52b45da201af6535da1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xA0 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1194, + "startColumn": 8, + "charOffset": 36406, + "charLength": 4, + "snippet": { + "text": "0xA0" + } + }, + "contextRegion": { + "startLine": 1192, + "startColumn": 8, + "charOffset": 36358, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseSetMonsterPodium(msg);\n\t\t\tbreak;\n\t\tcase 0xA0:\n\t\t\tparseFightModes(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8791a5252e7b82a6332ef6f52ab271a13f332cd76f86d323eb8dd4bb9baf4763" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xA1 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1197, + "startColumn": 8, + "charOffset": 36454, + "charLength": 4, + "snippet": { + "text": "0xA1" + } + }, + "contextRegion": { + "startLine": 1195, + "startColumn": 8, + "charOffset": 36412, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseFightModes(msg);\n\t\t\tbreak;\n\t\tcase 0xA1:\n\t\t\tparseAttack(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "140d722fb1040b6dd3e835d1bd3c9f0c53b787e05945c98e9e6416292c6a990a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xA2 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1200, + "startColumn": 8, + "charOffset": 36498, + "charLength": 4, + "snippet": { + "text": "0xA2" + } + }, + "contextRegion": { + "startLine": 1198, + "startColumn": 8, + "charOffset": 36460, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseAttack(msg);\n\t\t\tbreak;\n\t\tcase 0xA2:\n\t\t\tparseFollow(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "120fefe20718eab638997a8764d31e204d3cd32888b3456d985cd5511fac5209" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xA3 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1203, + "startColumn": 8, + "charOffset": 36542, + "charLength": 4, + "snippet": { + "text": "0xA3" + } + }, + "contextRegion": { + "startLine": 1201, + "startColumn": 8, + "charOffset": 36504, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseFollow(msg);\n\t\t\tbreak;\n\t\tcase 0xA3:\n\t\t\tparseInviteToParty(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45e20abf4d81411b77953c274786766475db6f7dc8ac0df7f940f4bfac6f7d19" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xA4 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1206, + "startColumn": 8, + "charOffset": 36593, + "charLength": 4, + "snippet": { + "text": "0xA4" + } + }, + "contextRegion": { + "startLine": 1204, + "startColumn": 8, + "charOffset": 36548, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseInviteToParty(msg);\n\t\t\tbreak;\n\t\tcase 0xA4:\n\t\t\tparseJoinParty(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94da85cb8c7512cfcba35d3f38139f8221dbd52e8ff60823fa2f35eb874437ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xA5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1209, + "startColumn": 8, + "charOffset": 36640, + "charLength": 4, + "snippet": { + "text": "0xA5" + } + }, + "contextRegion": { + "startLine": 1207, + "startColumn": 8, + "charOffset": 36599, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseJoinParty(msg);\n\t\t\tbreak;\n\t\tcase 0xA5:\n\t\t\tparseRevokePartyInvite(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "acc5332d8069ff9aab2d86dd72241915826e26a3fe2272060e72ef9cb591b3ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xA6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1212, + "startColumn": 8, + "charOffset": 36695, + "charLength": 4, + "snippet": { + "text": "0xA6" + } + }, + "contextRegion": { + "startLine": 1210, + "startColumn": 8, + "charOffset": 36646, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseRevokePartyInvite(msg);\n\t\t\tbreak;\n\t\tcase 0xA6:\n\t\t\tparsePassPartyLeadership(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e150938198d47626cbfaa2e53818ce2ad0b35a223d652baaf14ef9c7eb5fae1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xA7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1215, + "startColumn": 8, + "charOffset": 36752, + "charLength": 4, + "snippet": { + "text": "0xA7" + } + }, + "contextRegion": { + "startLine": 1213, + "startColumn": 8, + "charOffset": 36701, + "charLength": 4, + "snippet": { + "text": "\t\t\tparsePassPartyLeadership(msg);\n\t\t\tbreak;\n\t\tcase 0xA7:\n\t\t\tg_game().playerLeaveParty(player->getID());\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e42f77c42d7ec12a8d05c5a397faf21e1480dcb9f5799082ed43939feb094058" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xA8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1218, + "startColumn": 8, + "charOffset": 36822, + "charLength": 4, + "snippet": { + "text": "0xA8" + } + }, + "contextRegion": { + "startLine": 1216, + "startColumn": 8, + "charOffset": 36758, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_game().playerLeaveParty(player->getID());\n\t\t\tbreak;\n\t\tcase 0xA8:\n\t\t\tparseEnableSharedPartyExperience(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d96b63df735eeec2008833fab2507efca690170be2eb147b59ddc056c3afab50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xAA is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1221, + "startColumn": 8, + "charOffset": 36887, + "charLength": 4, + "snippet": { + "text": "0xAA" + } + }, + "contextRegion": { + "startLine": 1219, + "startColumn": 8, + "charOffset": 36828, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseEnableSharedPartyExperience(msg);\n\t\t\tbreak;\n\t\tcase 0xAA:\n\t\t\tg_game().playerCreatePrivateChannel(player->getID());\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d584e30ea366411c6e317b5e501a93b9cf5008a460748d1210cd7d27e5f799f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xAB is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1224, + "startColumn": 8, + "charOffset": 36967, + "charLength": 4, + "snippet": { + "text": "0xAB" + } + }, + "contextRegion": { + "startLine": 1222, + "startColumn": 8, + "charOffset": 36893, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_game().playerCreatePrivateChannel(player->getID());\n\t\t\tbreak;\n\t\tcase 0xAB:\n\t\t\tparseChannelInvite(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "920b32b14debd82388aed9a0ee3cfb3d6a0bffdba6f1235159713460bad6c699" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xAC is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1227, + "startColumn": 8, + "charOffset": 37018, + "charLength": 4, + "snippet": { + "text": "0xAC" + } + }, + "contextRegion": { + "startLine": 1225, + "startColumn": 8, + "charOffset": 36973, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseChannelInvite(msg);\n\t\t\tbreak;\n\t\tcase 0xAC:\n\t\t\tparseChannelExclude(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c0e7242d9ca6500b28982b4668965f9c4976b22461d8528793d006b7144f9aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xAE is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1230, + "startColumn": 8, + "charOffset": 37070, + "charLength": 4, + "snippet": { + "text": "0xAE" + } + }, + "contextRegion": { + "startLine": 1228, + "startColumn": 8, + "charOffset": 37024, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseChannelExclude(msg);\n\t\t\tbreak;\n\t\tcase 0xAE:\n\t\t\tparseSendBosstiary();\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58d2f7c51bd9e6e9d2de6f13e309dc58e41aedd7c19ae49a209d14e839f4c8ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xAF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1233, + "startColumn": 8, + "charOffset": 37118, + "charLength": 4, + "snippet": { + "text": "0xAF" + } + }, + "contextRegion": { + "startLine": 1231, + "startColumn": 8, + "charOffset": 37076, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseSendBosstiary();\n\t\t\tbreak;\n\t\tcase 0xAF:\n\t\t\tparseSendBosstiarySlots();\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b54af7f4114a4a9c369d686ab9b3f02b3dd9d81eff57c02f66d34f9b45a9387c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xB0 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1236, + "startColumn": 8, + "charOffset": 37171, + "charLength": 4, + "snippet": { + "text": "0xB0" + } + }, + "contextRegion": { + "startLine": 1234, + "startColumn": 8, + "charOffset": 37124, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseSendBosstiarySlots();\n\t\t\tbreak;\n\t\tcase 0xB0:\n\t\t\tparseBosstiarySlot(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28a6806ee8e25a05deb4f93e0c721f87f6caa7623a0113a50a5c007e108c8de8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xB1 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1239, + "startColumn": 8, + "charOffset": 37222, + "charLength": 4, + "snippet": { + "text": "0xB1" + } + }, + "contextRegion": { + "startLine": 1237, + "startColumn": 8, + "charOffset": 37177, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseBosstiarySlot(msg);\n\t\t\tbreak;\n\t\tcase 0xB1:\n\t\t\tparseHighscores(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02d0a055aaf69be90f03340fa8769e130f441b15aa75c54b14f811a4108c77b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xBA is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1242, + "startColumn": 8, + "charOffset": 37270, + "charLength": 4, + "snippet": { + "text": "0xBA" + } + }, + "contextRegion": { + "startLine": 1240, + "startColumn": 8, + "charOffset": 37228, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseHighscores(msg);\n\t\t\tbreak;\n\t\tcase 0xBA:\n\t\t\tparseTaskHuntingAction(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45475dd127cbf2179a298685bc765bee6ed0b681f0426c5508edfeab4b3e4147" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xBE is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1245, + "startColumn": 8, + "charOffset": 37325, + "charLength": 4, + "snippet": { + "text": "0xBE" + } + }, + "contextRegion": { + "startLine": 1243, + "startColumn": 8, + "charOffset": 37276, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseTaskHuntingAction(msg);\n\t\t\tbreak;\n\t\tcase 0xBE:\n\t\t\tg_game().playerCancelAttackAndFollow(player->getID());\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05a4d8efa83a8489b3d863d47209f8c4479c19e570f060cd4a0a3e11b3783a21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xBF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1248, + "startColumn": 8, + "charOffset": 37406, + "charLength": 4, + "snippet": { + "text": "0xBF" + } + }, + "contextRegion": { + "startLine": 1246, + "startColumn": 8, + "charOffset": 37331, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_game().playerCancelAttackAndFollow(player->getID());\n\t\t\tbreak;\n\t\tcase 0xBF:\n\t\t\tparseForgeEnter(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c782e4525e42199f546416f7c2c36ffe3b57ab9f51bf319ead77bc71f52652e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xC0 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1251, + "startColumn": 8, + "charOffset": 37454, + "charLength": 4, + "snippet": { + "text": "0xC0" + } + }, + "contextRegion": { + "startLine": 1249, + "startColumn": 8, + "charOffset": 37412, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseForgeEnter(msg);\n\t\t\tbreak;\n\t\tcase 0xC0:\n\t\t\tparseForgeBrowseHistory(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c65d7590e4741334e616d960e6d518343185af827c7e4215d3e087885bbde3c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xC9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1254, + "startColumn": 8, + "charOffset": 37510, + "charLength": 4, + "snippet": { + "text": "0xC9" + } + }, + "contextRegion": { + "startLine": 1252, + "startColumn": 8, + "charOffset": 37460, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseForgeBrowseHistory(msg);\n\t\t\tbreak;\n\t\tcase 0xC9: /* update tile */\n\t\t\tbreak;\n\t\tcase 0xCA:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9075ca087b1e01060c12a2f245fe2e2a6869c7fa97b4a8b4f3b340e26b1da523" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xCA is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1256, + "startColumn": 8, + "charOffset": 37551, + "charLength": 4, + "snippet": { + "text": "0xCA" + } + }, + "contextRegion": { + "startLine": 1254, + "startColumn": 8, + "charOffset": 37503, + "charLength": 4, + "snippet": { + "text": "\t\tcase 0xC9: /* update tile */\n\t\t\tbreak;\n\t\tcase 0xCA:\n\t\t\tparseUpdateContainer(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26886864003f0f04bb445d6c3c35ed97c47f259b691a41ad2e8852ff8694ecb5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xCB is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1259, + "startColumn": 8, + "charOffset": 37604, + "charLength": 4, + "snippet": { + "text": "0xCB" + } + }, + "contextRegion": { + "startLine": 1257, + "startColumn": 8, + "charOffset": 37557, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseUpdateContainer(msg);\n\t\t\tbreak;\n\t\tcase 0xCB:\n\t\t\tparseBrowseField(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69118c425f039f9964cc8723f27ee2f5dd4f32464f594b752e337bd7ab3432ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xCC is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1262, + "startColumn": 8, + "charOffset": 37653, + "charLength": 4, + "snippet": { + "text": "0xCC" + } + }, + "contextRegion": { + "startLine": 1260, + "startColumn": 8, + "charOffset": 37610, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseBrowseField(msg);\n\t\t\tbreak;\n\t\tcase 0xCC:\n\t\t\tparseSeekInContainer(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22315eedfc09b679eaac9c2df93bffb18527fc4b1b9edec32468d1a85341e5eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xCD is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1265, + "startColumn": 8, + "charOffset": 37706, + "charLength": 4, + "snippet": { + "text": "0xCD" + } + }, + "contextRegion": { + "startLine": 1263, + "startColumn": 8, + "charOffset": 37659, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseSeekInContainer(msg);\n\t\t\tbreak;\n\t\tcase 0xCD:\n\t\t\tparseInspectionObject(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05883d12e34f50a1bcc786cd59fd6adbe2ef12f63697e4e95be7976f1e0cd9bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xD2 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1268, + "startColumn": 8, + "charOffset": 37760, + "charLength": 4, + "snippet": { + "text": "0xD2" + } + }, + "contextRegion": { + "startLine": 1266, + "startColumn": 8, + "charOffset": 37712, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseInspectionObject(msg);\n\t\t\tbreak;\n\t\tcase 0xD2:\n\t\t\tg_game().playerRequestOutfit(player->getID());\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c561a6caa2e85e73a086c5173bdd6e841a22bb71f5c1926736b35154b3158fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xD3 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1271, + "startColumn": 8, + "charOffset": 37833, + "charLength": 4, + "snippet": { + "text": "0xD3" + } + }, + "contextRegion": { + "startLine": 1269, + "startColumn": 8, + "charOffset": 37766, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_game().playerRequestOutfit(player->getID());\n\t\t\tbreak;\n\t\tcase 0xD3:\n\t\t\tparseSetOutfit(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e200dcc6fd655ae1a741f028ab68376b4ea019202cdfd3a9f26d282d441e872" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xD4 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1274, + "startColumn": 8, + "charOffset": 37880, + "charLength": 4, + "snippet": { + "text": "0xD4" + } + }, + "contextRegion": { + "startLine": 1272, + "startColumn": 8, + "charOffset": 37839, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseSetOutfit(msg);\n\t\t\tbreak;\n\t\tcase 0xD4:\n\t\t\tparseToggleMount(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed5a837c5e27a4996cc8e580f3c77327b586de5d8220382482f9fe6669ea77ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xD5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1277, + "startColumn": 8, + "charOffset": 37929, + "charLength": 4, + "snippet": { + "text": "0xD5" + } + }, + "contextRegion": { + "startLine": 1275, + "startColumn": 8, + "charOffset": 37886, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseToggleMount(msg);\n\t\t\tbreak;\n\t\tcase 0xD5:\n\t\t\tparseApplyImbuement(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "18e6f8b87397f5ddee058fcacc3de934b755d92ba8c55da42cccc4ef5b427370" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xD6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1280, + "startColumn": 8, + "charOffset": 37981, + "charLength": 4, + "snippet": { + "text": "0xD6" + } + }, + "contextRegion": { + "startLine": 1278, + "startColumn": 8, + "charOffset": 37935, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseApplyImbuement(msg);\n\t\t\tbreak;\n\t\tcase 0xD6:\n\t\t\tparseClearImbuement(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08884dff9367692dd8d4bed0befd4ee898401893783796b366c136c52084e2b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xD7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1283, + "startColumn": 8, + "charOffset": 38033, + "charLength": 4, + "snippet": { + "text": "0xD7" + } + }, + "contextRegion": { + "startLine": 1281, + "startColumn": 8, + "charOffset": 37987, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseClearImbuement(msg);\n\t\t\tbreak;\n\t\tcase 0xD7:\n\t\t\tparseCloseImbuementWindow(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c65c8af7b603c57f23ba02820f29573b7d1ea64b941a46bd1e5923768007a3b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xDC is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1286, + "startColumn": 8, + "charOffset": 38091, + "charLength": 4, + "snippet": { + "text": "0xDC" + } + }, + "contextRegion": { + "startLine": 1284, + "startColumn": 8, + "charOffset": 38039, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseCloseImbuementWindow(msg);\n\t\t\tbreak;\n\t\tcase 0xDC:\n\t\t\tparseAddVip(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a29e27194b73221573b1ec60cd1e7d6a56680c63dd6bf7c409410977f5650a33" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xDD is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1289, + "startColumn": 8, + "charOffset": 38135, + "charLength": 4, + "snippet": { + "text": "0xDD" + } + }, + "contextRegion": { + "startLine": 1287, + "startColumn": 8, + "charOffset": 38097, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseAddVip(msg);\n\t\t\tbreak;\n\t\tcase 0xDD:\n\t\t\tparseRemoveVip(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5b4599e2cda51a385449a0abd553e4d1af08af28f1ea0308c9be590ed33f10d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xDE is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1292, + "startColumn": 8, + "charOffset": 38182, + "charLength": 4, + "snippet": { + "text": "0xDE" + } + }, + "contextRegion": { + "startLine": 1290, + "startColumn": 8, + "charOffset": 38141, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseRemoveVip(msg);\n\t\t\tbreak;\n\t\tcase 0xDE:\n\t\t\tparseEditVip(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3ae09616cd4769d75696126e563eea14c669077cef30f4179eb0cba5647ba59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xDF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1295, + "startColumn": 8, + "charOffset": 38227, + "charLength": 4, + "snippet": { + "text": "0xDF" + } + }, + "contextRegion": { + "startLine": 1293, + "startColumn": 8, + "charOffset": 38188, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseEditVip(msg);\n\t\t\tbreak;\n\t\tcase 0xDF:\n\t\t\tparseVipGroupActions(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca893a632c0831d40a57247122e36d55f2e2cd41069aa789cb6c543dfd10780a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xE1 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1298, + "startColumn": 8, + "charOffset": 38280, + "charLength": 4, + "snippet": { + "text": "0xE1" + } + }, + "contextRegion": { + "startLine": 1296, + "startColumn": 8, + "charOffset": 38233, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseVipGroupActions(msg);\n\t\t\tbreak;\n\t\tcase 0xE1:\n\t\t\tparseBestiarysendRaces();\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4fffd32aeb92708e7ffa231286abbcb1cd276fd827cdd1ff5709a44e88caac56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xE2 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1301, + "startColumn": 8, + "charOffset": 38332, + "charLength": 4, + "snippet": { + "text": "0xE2" + } + }, + "contextRegion": { + "startLine": 1299, + "startColumn": 8, + "charOffset": 38286, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseBestiarysendRaces();\n\t\t\tbreak;\n\t\tcase 0xE2:\n\t\t\tparseBestiarysendCreatures(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb5b74a603f8d41f9d40ff95337c5f77124d36dca9732c69ff5363009f2a9e11" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xE3 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1304, + "startColumn": 8, + "charOffset": 38391, + "charLength": 4, + "snippet": { + "text": "0xE3" + } + }, + "contextRegion": { + "startLine": 1302, + "startColumn": 8, + "charOffset": 38338, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseBestiarysendCreatures(msg);\n\t\t\tbreak;\n\t\tcase 0xE3:\n\t\t\tparseBestiarysendMonsterData(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e821eaa86e94048790bbad5a965df9c509a86c04609d1c01c61445b2404e769b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xE4 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1307, + "startColumn": 8, + "charOffset": 38452, + "charLength": 4, + "snippet": { + "text": "0xE4" + } + }, + "contextRegion": { + "startLine": 1305, + "startColumn": 8, + "charOffset": 38397, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseBestiarysendMonsterData(msg);\n\t\t\tbreak;\n\t\tcase 0xE4:\n\t\t\tparseSendBuyCharmRune(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e02cac6a9c2b4c4c5153b3e0dcf77f62d41d47d780fc225135510021387a5027" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xE5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1310, + "startColumn": 8, + "charOffset": 38506, + "charLength": 4, + "snippet": { + "text": "0xE5" + } + }, + "contextRegion": { + "startLine": 1308, + "startColumn": 8, + "charOffset": 38458, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseSendBuyCharmRune(msg);\n\t\t\tbreak;\n\t\tcase 0xE5:\n\t\t\tparseCyclopediaCharacterInfo(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb2d737c210ac97cf6dd05ab3ee3a53b40a610a7fbd5690e36cc94e32e0316dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xE6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1313, + "startColumn": 8, + "charOffset": 38567, + "charLength": 4, + "snippet": { + "text": "0xE6" + } + }, + "contextRegion": { + "startLine": 1311, + "startColumn": 8, + "charOffset": 38512, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseCyclopediaCharacterInfo(msg);\n\t\t\tbreak;\n\t\tcase 0xE6:\n\t\t\tparseBugReport(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b65838c10dcb296bc6cb349ed1cb485a4a17f4e0880f4e14c39d65900bde3d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xE7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1316, + "startColumn": 8, + "charOffset": 38614, + "charLength": 4, + "snippet": { + "text": "0xE7" + } + }, + "contextRegion": { + "startLine": 1314, + "startColumn": 8, + "charOffset": 38573, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseBugReport(msg);\n\t\t\tbreak;\n\t\tcase 0xE7:\n\t\t\tparseWheelGemAction(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a17439989c0d080e77ec252d9c44b7bebbba33c7a37d89810625125516d815be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xE8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1319, + "startColumn": 8, + "charOffset": 38666, + "charLength": 4, + "snippet": { + "text": "0xE8" + } + }, + "contextRegion": { + "startLine": 1317, + "startColumn": 8, + "charOffset": 38620, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseWheelGemAction(msg);\n\t\t\tbreak;\n\t\tcase 0xE8:\n\t\t\tparseDebugAssert(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a32f13c1412e9e46f1ac8ecc8d0ec0d211cbf594dd1d492282cbf253f6b04b02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xEB is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1322, + "startColumn": 8, + "charOffset": 38715, + "charLength": 4, + "snippet": { + "text": "0xEB" + } + }, + "contextRegion": { + "startLine": 1320, + "startColumn": 8, + "charOffset": 38672, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseDebugAssert(msg);\n\t\t\tbreak;\n\t\tcase 0xEB:\n\t\t\tparsePreyAction(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "215dacc814a0236549bec800d1a7b2cda3063b1f12e2b69333141f8d88279f24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xED is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1325, + "startColumn": 8, + "charOffset": 38763, + "charLength": 4, + "snippet": { + "text": "0xED" + } + }, + "contextRegion": { + "startLine": 1323, + "startColumn": 8, + "charOffset": 38721, + "charLength": 4, + "snippet": { + "text": "\t\t\tparsePreyAction(msg);\n\t\t\tbreak;\n\t\tcase 0xED:\n\t\t\tparseSendResourceBalance();\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dad41c6a07cb0e26a7c7ef8a573063ccfb487d1c593e292e177b08523881c109" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xEE is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1328, + "startColumn": 8, + "charOffset": 38817, + "charLength": 4, + "snippet": { + "text": "0xEE" + } + }, + "contextRegion": { + "startLine": 1326, + "startColumn": 8, + "charOffset": 38769, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseSendResourceBalance();\n\t\t\tbreak;\n\t\tcase 0xEE:\n\t\t\tparseGreet(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a384be3c54bc6ab96e185e99fdfc48a34d192db9c568012f221b21d955f95901" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xF0 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1333, + "startColumn": 8, + "charOffset": 38935, + "charLength": 4, + "snippet": { + "text": "0xF0" + } + }, + "contextRegion": { + "startLine": 1331, + "startColumn": 8, + "charOffset": 38853, + "charLength": 4, + "snippet": { + "text": "\t\t// Premium coins transfer\n\t\t// case 0xEF: parseCoinTransfer(msg); break;\n\t\tcase 0xF0:\n\t\t\tg_game().playerShowQuestLog(player->getID());\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d87d1004feaf87fc88b9d0dfd1c05b95043c9dbc103f247fec26fb57835b15d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xF1 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1336, + "startColumn": 8, + "charOffset": 39007, + "charLength": 4, + "snippet": { + "text": "0xF1" + } + }, + "contextRegion": { + "startLine": 1334, + "startColumn": 8, + "charOffset": 38941, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_game().playerShowQuestLog(player->getID());\n\t\t\tbreak;\n\t\tcase 0xF1:\n\t\t\tparseQuestLine(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e86b2ee3639b340111ac585993e26862fec086229ef364eb0e71612ccdc60683" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xF3 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1340, + "startColumn": 8, + "charOffset": 39108, + "charLength": 4, + "snippet": { + "text": "0xF3" + } + }, + "contextRegion": { + "startLine": 1338, + "startColumn": 8, + "charOffset": 39037, + "charLength": 4, + "snippet": { + "text": "\t\t\tbreak;\n\t\t// case 0xF2: parseRuleViolationReport(msg); break;\n\t\tcase 0xF3: /* get object info */\n\t\t\tbreak;\n\t\tcase 0xF4:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "888b960987c85c3929f1a7d178a9606c457eb059d92ea23a81944e5588b5629e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xF4 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1342, + "startColumn": 8, + "charOffset": 39153, + "charLength": 4, + "snippet": { + "text": "0xF4" + } + }, + "contextRegion": { + "startLine": 1340, + "startColumn": 8, + "charOffset": 39101, + "charLength": 4, + "snippet": { + "text": "\t\tcase 0xF3: /* get object info */\n\t\t\tbreak;\n\t\tcase 0xF4:\n\t\t\tparseMarketLeave();\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "074dfd400b4dffe58eaa524feef570eb45335c83023dc129a1e7f2fc31bc55c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xF5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1345, + "startColumn": 8, + "charOffset": 39199, + "charLength": 4, + "snippet": { + "text": "0xF5" + } + }, + "contextRegion": { + "startLine": 1343, + "startColumn": 8, + "charOffset": 39159, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseMarketLeave();\n\t\t\tbreak;\n\t\tcase 0xF5:\n\t\t\tparseMarketBrowse(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5d4730b8bb736df7083df9df0d3ba258c66fbb012726cc5550e86434d2ec1b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xF6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1348, + "startColumn": 8, + "charOffset": 39249, + "charLength": 4, + "snippet": { + "text": "0xF6" + } + }, + "contextRegion": { + "startLine": 1346, + "startColumn": 8, + "charOffset": 39205, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseMarketBrowse(msg);\n\t\t\tbreak;\n\t\tcase 0xF6:\n\t\t\tparseMarketCreateOffer(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7b41ca0e03cc6930233ce52681209a117c13ff23506e2561a87364e59383a3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xF7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1351, + "startColumn": 8, + "charOffset": 39304, + "charLength": 4, + "snippet": { + "text": "0xF7" + } + }, + "contextRegion": { + "startLine": 1349, + "startColumn": 8, + "charOffset": 39255, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseMarketCreateOffer(msg);\n\t\t\tbreak;\n\t\tcase 0xF7:\n\t\t\tparseMarketCancelOffer(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ffdcc65ad27d360c815304b015ee270ad54063e3791328f5baab09589415fe1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xF8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1354, + "startColumn": 8, + "charOffset": 39359, + "charLength": 4, + "snippet": { + "text": "0xF8" + } + }, + "contextRegion": { + "startLine": 1352, + "startColumn": 8, + "charOffset": 39310, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseMarketCancelOffer(msg);\n\t\t\tbreak;\n\t\tcase 0xF8:\n\t\t\tparseMarketAcceptOffer(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1835e11b14bbf85d3524e8f8946b3f3d029f864d0ac8475788673943f11466b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xF9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1357, + "startColumn": 8, + "charOffset": 39414, + "charLength": 4, + "snippet": { + "text": "0xF9" + } + }, + "contextRegion": { + "startLine": 1355, + "startColumn": 8, + "charOffset": 39365, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseMarketAcceptOffer(msg);\n\t\t\tbreak;\n\t\tcase 0xF9:\n\t\t\tparseModalWindowAnswer(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "91046a0e4b1464fed3e1ddc96f1799743efabe23bd9f7ef72d78767267d59ded" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1360, + "startColumn": 8, + "charOffset": 39469, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 1358, + "startColumn": 8, + "charOffset": 39420, + "charLength": 4, + "snippet": { + "text": "\t\t\tparseModalWindowAnswer(msg);\n\t\t\tbreak;\n\t\tcase 0xFF:\n\t\t\tparseRewardChestCollect(msg);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3bc6342a7d2f3a1871d644d0479f19aeba95ce12aec46e8ad0ea4c8d732c05f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1371, + "startColumn": 3, + "charOffset": 39864, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 1369, + "startColumn": 3, + "charOffset": 39795, + "charLength": 7, + "snippet": { + "text": "\t\t\t// case 0xDF, 0xE0, 0xE1, 0xFB, 0xFC, 0xFD, 0xFE Premium Shop.\n\n\t\tdefault:\n\t\t\tstd::string hexString = fmt::format(\"0x{:02x}\", recvbyte);\n\t\t\tg_logger().debug(\"Player '{}' sent unknown packet header: hex[{}], decimal[{}]\", player->getName(), asUpperCaseString(hexString), recvbyte);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5480462c18b3de8f3e8b0398d1346318cff802c1760b81762f8b95e6d21e3406" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1379, + "startColumn": 6, + "charOffset": 40159, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1377, + "startColumn": 6, + "charOffset": 40094, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::parseHotkeyEquip(NetworkMessage &msg) {\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea1de4d8d9f3bc107337a5bed5f0d8a5943c497109a0f7509c1251148cefa22d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1383, + "startColumn": 2, + "charOffset": 40185, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 1381, + "startColumn": 2, + "charOffset": 40180, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tuint16_t itemId = msg.get();\n\tuint8_t tier = msg.get();\n\tg_game().playerEquipItem(player->getID(), itemId, Item::items[itemId].upgradeClassification > 0, tier);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76d04c5841dfabe8017afe1da29f2392c38d41edc9e359c94ca4ca2d1c9fb767" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1384, + "startColumn": 2, + "charOffset": 40225, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 1382, + "startColumn": 2, + "charOffset": 40183, + "charLength": 7, + "snippet": { + "text": "\n\tuint16_t itemId = msg.get();\n\tuint8_t tier = msg.get();\n\tg_game().playerEquipItem(player->getID(), itemId, Item::items[itemId].upgradeClassification > 0, tier);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf1798addf798902769ebb92e39d7a1035e47220bb44e575140220a36eca3066" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'GetTileDescription' has cognitive complexity of 33 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1388, + "startColumn": 20, + "charOffset": 40387, + "charLength": 18, + "snippet": { + "text": "GetTileDescription" + } + }, + "contextRegion": { + "startLine": 1386, + "startColumn": 20, + "charOffset": 40365, + "charLength": 18, + "snippet": { + "text": "}\n\nvoid ProtocolGame::GetTileDescription(std::shared_ptr tile, NetworkMessage &msg) {\n\tif (oldProtocol) {\n\t\tmsg.add(0x00); // Env effects" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "335724fa0c0ce23d083150e64a29791fb7c46bcca994df23a3fd0f0493ae186d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1388, + "startColumn": 61, + "charOffset": 40428, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 1386, + "startColumn": 61, + "charOffset": 40365, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid ProtocolGame::GetTileDescription(std::shared_ptr tile, NetworkMessage &msg) {\n\tif (oldProtocol) {\n\t\tmsg.add(0x00); // Env effects" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9037d5e96caeea7adde426d530bb42c95282288a6e87e98b8cc24d9727d76b73" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1390, + "startColumn": 21, + "charOffset": 40497, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 1388, + "startColumn": 21, + "charOffset": 40368, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::GetTileDescription(std::shared_ptr tile, NetworkMessage &msg) {\n\tif (oldProtocol) {\n\t\tmsg.add(0x00); // Env effects\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47b7a810274c52c1f9dc28506e08b90187887698f152bba29eb7a2406770cba7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'count' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1393, + "startColumn": 10, + "charOffset": 40532, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 1391, + "startColumn": 10, + "charOffset": 40519, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tint32_t count;\n\tstd::shared_ptr ground = tile->getGround();\n\tif (ground) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff8a1a8effe8cf7e7718ef3a978fe60eacdcf0b483b02d657fb36f428734c2f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1403, + "startColumn": 6, + "charOffset": 40726, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1401, + "startColumn": 6, + "charOffset": 40668, + "charLength": 5, + "snippet": { + "text": "\n\tconst TileItemVector* items = tile->getItemList();\n\tif (items) {\n\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\tAddItem(msg, *it);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e0584f3266e289e3980dee22d2edffd5c7592bda029ed7f14c17e8799a7a950" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1403, + "startColumn": 6, + "charOffset": 40726, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1401, + "startColumn": 6, + "charOffset": 40668, + "charLength": 5, + "snippet": { + "text": "\n\tconst TileItemVector* items = tile->getItemList();\n\tif (items) {\n\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\tAddItem(msg, *it);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8a07ff18aa392de03ed7e14c569762bf088a504cb17665433c1aae840ea0fad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1404, + "startColumn": 3, + "charOffset": 40737, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1402, + "startColumn": 3, + "charOffset": 40669, + "charLength": 3, + "snippet": { + "text": "\tconst TileItemVector* items = tile->getItemList();\n\tif (items) {\n\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\tAddItem(msg, *it);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8fd1afdeb61ff5b354d26dc611fd4ff093117cfc23ae0275d81d2ca0e24916e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1404, + "startColumn": 3, + "charOffset": 40737, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1402, + "startColumn": 3, + "charOffset": 40669, + "charLength": 3, + "snippet": { + "text": "\tconst TileItemVector* items = tile->getItemList();\n\tif (items) {\n\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\tAddItem(msg, *it);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4eae299d446de191b1a5d4641a8e6f913f234bebd8bf8d2b4a5c2380f99c64a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1404, + "startColumn": 8, + "charOffset": 40742, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1402, + "startColumn": 8, + "charOffset": 40669, + "charLength": 4, + "snippet": { + "text": "\tconst TileItemVector* items = tile->getItemList();\n\tif (items) {\n\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\tAddItem(msg, *it);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22527f6a7eaeef97eda8ddbf8b85e5a73b032bc1ac7b78714880fd56e8564305" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1404, + "startColumn": 74, + "charOffset": 40808, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1402, + "startColumn": 74, + "charOffset": 40669, + "charLength": 2, + "snippet": { + "text": "\tconst TileItemVector* items = tile->getItemList();\n\tif (items) {\n\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\tAddItem(msg, *it);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b2fc6ea99e08394d9369bbb772a1b15fbff7df0423b940bc52901afe13562c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1408, + "startColumn": 4, + "charOffset": 40865, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1406, + "startColumn": 4, + "charOffset": 40849, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tcount++;\n\t\t\tif (count == 9 && tile->getPosition() == player->getPosition()) {\n\t\t\t\tbreak;\n\t\t\t} else if (count == 10) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9aef903b2236c8962a765f44f519b75cbc057997c806272f2125573d4edff543" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1408, + "startColumn": 17, + "charOffset": 40878, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 1406, + "startColumn": 17, + "charOffset": 40849, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tcount++;\n\t\t\tif (count == 9 && tile->getPosition() == player->getPosition()) {\n\t\t\t\tbreak;\n\t\t\t} else if (count == 10) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d7e9a02a09cee62a1fc24be77d8e9251c8338ba682010f97f7c7e5cc94e0512" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'break'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1410, + "startColumn": 6, + "charOffset": 40947, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1408, + "startColumn": 6, + "charOffset": 40862, + "charLength": 4, + "snippet": { + "text": "\t\t\tif (count == 9 && tile->getPosition() == player->getPosition()) {\n\t\t\t\tbreak;\n\t\t\t} else if (count == 10) {\n\t\t\t\treturn;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d6c33a93f28c96cb06fb0da189406078f40b2e367881b5182136e97dcb37692" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1410, + "startColumn": 24, + "charOffset": 40965, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 1408, + "startColumn": 24, + "charOffset": 40862, + "charLength": 2, + "snippet": { + "text": "\t\t\tif (count == 9 && tile->getPosition() == player->getPosition()) {\n\t\t\t\tbreak;\n\t\t\t} else if (count == 10) {\n\t\t\t\treturn;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b217f3adbaed72d8b869b9a96df0c57adcdd1ec7abbbb14250d55c149fb3d8d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1417, + "startColumn": 6, + "charOffset": 41058, + "charLength": 9, + "snippet": { + "text": "creatures" + } + }, + "contextRegion": { + "startLine": 1415, + "startColumn": 6, + "charOffset": 40995, + "charLength": 9, + "snippet": { + "text": "\n\tconst CreatureVector* creatures = tile->getCreatures();\n\tif (creatures) {\n\t\tbool playerAdded = false;\n\t\tfor (auto it = creatures->rbegin(); it != creatures->rend(); ++it) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69fa7809cd1061f09129cfc34b2bc65ade71d133cd21b14cf91ff9f94886b432" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CreatureVector *' (aka 'const vector> *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1417, + "startColumn": 6, + "charOffset": 41058, + "charLength": 9, + "snippet": { + "text": "creatures" + } + }, + "contextRegion": { + "startLine": 1415, + "startColumn": 6, + "charOffset": 40995, + "charLength": 9, + "snippet": { + "text": "\n\tconst CreatureVector* creatures = tile->getCreatures();\n\tif (creatures) {\n\t\tbool playerAdded = false;\n\t\tfor (auto it = creatures->rbegin(); it != creatures->rend(); ++it) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfebdee6221b942a4f967447903a65c45cfb506985a06bdb5a48e2f812d0d50b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1419, + "startColumn": 3, + "charOffset": 41101, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1417, + "startColumn": 3, + "charOffset": 41053, + "charLength": 3, + "snippet": { + "text": "\tif (creatures) {\n\t\tbool playerAdded = false;\n\t\tfor (auto it = creatures->rbegin(); it != creatures->rend(); ++it) {\n\t\t\tstd::shared_ptr creature = *it;\n\t\t\tif (!player->canSeeCreature(creature)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af04fd70960d6d3c1d8faa7dd69db515e1def18ffb08991bbefe875a9bba1dbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1419, + "startColumn": 3, + "charOffset": 41101, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1417, + "startColumn": 3, + "charOffset": 41053, + "charLength": 3, + "snippet": { + "text": "\tif (creatures) {\n\t\tbool playerAdded = false;\n\t\tfor (auto it = creatures->rbegin(); it != creatures->rend(); ++it) {\n\t\t\tstd::shared_ptr creature = *it;\n\t\t\tif (!player->canSeeCreature(creature)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf2aa2990f0d1b21c9d663f03f1a82cb8eff055426e7e8dae29b885f9676d76f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-loop-convert", + "ruleIndex": 620, + "kind": "fail", + "level": "warning", + "message": { + "text": "use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1419, + "startColumn": 3, + "charOffset": 41101, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1417, + "startColumn": 3, + "charOffset": 41053, + "charLength": 3, + "snippet": { + "text": "\tif (creatures) {\n\t\tbool playerAdded = false;\n\t\tfor (auto it = creatures->rbegin(); it != creatures->rend(); ++it) {\n\t\t\tstd::shared_ptr creature = *it;\n\t\t\tif (!player->canSeeCreature(creature)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0327217284db647515fcca8f44a87b4cd2b6dea77e208826e7b317bcda10f05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1419, + "startColumn": 39, + "charOffset": 41137, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1417, + "startColumn": 39, + "charOffset": 41053, + "charLength": 2, + "snippet": { + "text": "\tif (creatures) {\n\t\tbool playerAdded = false;\n\t\tfor (auto it = creatures->rbegin(); it != creatures->rend(); ++it) {\n\t\t\tstd::shared_ptr creature = *it;\n\t\t\tif (!player->canSeeCreature(creature)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b726013140e049085cf7a9d64a9a50e04e35a7527e9b9292f86d96133882c673" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1425, + "startColumn": 65, + "charOffset": 41343, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 1423, + "startColumn": 65, + "charOffset": 41273, + "charLength": 1, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (tile->getPosition() == player->getPosition() && count == 9 && !playerAdded) {\n\t\t\t\tcreature = player;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ff5436af5b119ac512b128afb4abd0e367900da65b6f79c22135f1988d60d19" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'known' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1433, + "startColumn": 9, + "charOffset": 41478, + "charLength": 5, + "snippet": { + "text": "known" + } + }, + "contextRegion": { + "startLine": 1431, + "startColumn": 9, + "charOffset": 41464, + "charLength": 5, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tbool known;\n\t\t\tuint32_t removedKnown;\n\t\t\tcheckCreatureAsKnown(creature->getID(), known, removedKnown);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9569da2d74c4b58343724809498a2e7872c615af968ef4f2210c17b5339cbc6c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'removedKnown' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1434, + "startColumn": 13, + "charOffset": 41497, + "charLength": 12, + "snippet": { + "text": "removedKnown" + } + }, + "contextRegion": { + "startLine": 1432, + "startColumn": 13, + "charOffset": 41469, + "charLength": 12, + "snippet": { + "text": "\n\t\t\tbool known;\n\t\t\tuint32_t removedKnown;\n\t\t\tcheckCreatureAsKnown(creature->getID(), known, removedKnown);\n\t\t\tAddCreature(msg, creature, known, removedKnown);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "233f8bec749782016eb3bcb021b5f2495076c2acc9d3b7f6fac122226fd0d0ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1438, + "startColumn": 19, + "charOffset": 41647, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 1436, + "startColumn": 19, + "charOffset": 41576, + "charLength": 2, + "snippet": { + "text": "\t\t\tAddCreature(msg, creature, known, removedKnown);\n\n\t\t\tif (++count == 10) {\n\t\t\t\treturn;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e237913a432e35b273d4fb660b1ac8460923806be4e47ba16ea42088646ed3af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1444, + "startColumn": 6, + "charOffset": 41683, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1442, + "startColumn": 6, + "charOffset": 41674, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tif (items) {\n\t\tfor (auto it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\tAddItem(msg, *it);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ad279cca2755c59dc1bd17eb737c28313fa07c722328f53e0f9f09fae76f5f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1444, + "startColumn": 6, + "charOffset": 41683, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1442, + "startColumn": 6, + "charOffset": 41674, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tif (items) {\n\t\tfor (auto it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\tAddItem(msg, *it);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4cfbd170a3097dde13fc23ba6ce7517f40268bc3287998d658ca820db072931b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1445, + "startColumn": 3, + "charOffset": 41694, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1443, + "startColumn": 3, + "charOffset": 41677, + "charLength": 3, + "snippet": { + "text": "\n\tif (items) {\n\t\tfor (auto it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\tAddItem(msg, *it);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10f36d7e71d8ca13702b8a16f65d552142617511124aa0426ca9b593abc9b4a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1445, + "startColumn": 3, + "charOffset": 41694, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1443, + "startColumn": 3, + "charOffset": 41677, + "charLength": 3, + "snippet": { + "text": "\n\tif (items) {\n\t\tfor (auto it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\tAddItem(msg, *it);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "732b422451e06420dee6bfb6f09fea9f07048f45dfa3dd2154a46760a44d0641" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1445, + "startColumn": 8, + "charOffset": 41699, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1443, + "startColumn": 8, + "charOffset": 41677, + "charLength": 4, + "snippet": { + "text": "\n\tif (items) {\n\t\tfor (auto it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\tAddItem(msg, *it);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1b854c23258b68c4bed667d3ae7d147fe28c0d52c0e568b406f5cae50eda7c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1445, + "startColumn": 76, + "charOffset": 41767, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1443, + "startColumn": 76, + "charOffset": 41677, + "charLength": 2, + "snippet": { + "text": "\n\tif (items) {\n\t\tfor (auto it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\tAddItem(msg, *it);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "18cb10f7958f8c731ecc5ac19040a266f712ad503ab0487da2d3520a4b706e24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1448, + "startColumn": 19, + "charOffset": 41827, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 1446, + "startColumn": 19, + "charOffset": 41786, + "charLength": 2, + "snippet": { + "text": "\t\t\tAddItem(msg, *it);\n\n\t\t\tif (++count == 10) {\n\t\t\t\treturn;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67da32a73f76c633a2005a29b8160b00a967581db2119bde9e03d5eeaa973a58" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1457, + "startColumn": 2, + "charOffset": 42005, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 1455, + "startColumn": 2, + "charOffset": 41860, + "charLength": 7, + "snippet": { + "text": "void ProtocolGame::GetMapDescription(int32_t x, int32_t y, int32_t z, int32_t width, int32_t height, NetworkMessage &msg) {\n\tint32_t skip = -1;\n\tint32_t startz, endz, zstep;\n\n\tif (z > MAP_INIT_SURFACE_LAYER) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d66dbc59057d75db58dbdad0eb4540a98a5ed9db587c8f54bf0a30f4f08fd3ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1457, + "startColumn": 2, + "charOffset": 42005, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 1455, + "startColumn": 2, + "charOffset": 41860, + "charLength": 7, + "snippet": { + "text": "void ProtocolGame::GetMapDescription(int32_t x, int32_t y, int32_t z, int32_t width, int32_t height, NetworkMessage &msg) {\n\tint32_t skip = -1;\n\tint32_t startz, endz, zstep;\n\n\tif (z > MAP_INIT_SURFACE_LAYER) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "224d172adc64972d76a576e61cda854c7cd832241c762521ed9b45c15b9f431c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'startz' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1457, + "startColumn": 10, + "charOffset": 42013, + "charLength": 6, + "snippet": { + "text": "startz" + } + }, + "contextRegion": { + "startLine": 1455, + "startColumn": 10, + "charOffset": 41860, + "charLength": 6, + "snippet": { + "text": "void ProtocolGame::GetMapDescription(int32_t x, int32_t y, int32_t z, int32_t width, int32_t height, NetworkMessage &msg) {\n\tint32_t skip = -1;\n\tint32_t startz, endz, zstep;\n\n\tif (z > MAP_INIT_SURFACE_LAYER) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0cadbb8ccff061de340d7e5f09c2560b71790665f4d5d9074eaff82d22890a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'endz' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1457, + "startColumn": 18, + "charOffset": 42021, + "charLength": 4, + "snippet": { + "text": "endz" + } + }, + "contextRegion": { + "startLine": 1455, + "startColumn": 18, + "charOffset": 41860, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::GetMapDescription(int32_t x, int32_t y, int32_t z, int32_t width, int32_t height, NetworkMessage &msg) {\n\tint32_t skip = -1;\n\tint32_t startz, endz, zstep;\n\n\tif (z > MAP_INIT_SURFACE_LAYER) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9253e6a8438642d7d6bb2b308efc813dfc79f76ce7887be1fcd2929dcab0b473" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'zstep' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1457, + "startColumn": 24, + "charOffset": 42027, + "charLength": 5, + "snippet": { + "text": "zstep" + } + }, + "contextRegion": { + "startLine": 1455, + "startColumn": 24, + "charOffset": 41860, + "charLength": 5, + "snippet": { + "text": "void ProtocolGame::GetMapDescription(int32_t x, int32_t y, int32_t z, int32_t width, int32_t height, NetworkMessage &msg) {\n\tint32_t skip = -1;\n\tint32_t startz, endz, zstep;\n\n\tif (z > MAP_INIT_SURFACE_LAYER) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ccd184a7f997d6c34a2d061b87289df7d490344a7a0374112b7bb3ac375691f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1469, + "startColumn": 2, + "charOffset": 42270, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1467, + "startColumn": 2, + "charOffset": 42265, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (int32_t nz = startz; nz != endz + zstep; nz += zstep) {\n\t\tGetFloorDescription(msg, x, y, nz, width, height, z - nz, skip);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b54d6db2a99aa949d055bf1883bce0013fe3717f755d2f2786e0c330f303fcab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-2", + "ruleIndex": 457, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-2: If loop-counter is not modified by -- or ++, then, within condition, the loop-counter shall only be used as an operand to <=, <, > or >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1469, + "startColumn": 2, + "charOffset": 42270, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1467, + "startColumn": 2, + "charOffset": 42265, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (int32_t nz = startz; nz != endz + zstep; nz += zstep) {\n\t\tGetFloorDescription(msg, x, y, nz, width, height, z - nz, skip);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0fd89122c3b62f7b3e10a99b379246abaae67e4c0d237eb7b0bf6bdd3a5d769c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'nz' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1469, + "startColumn": 28, + "charOffset": 42296, + "charLength": 2, + "snippet": { + "text": "nz" + } + }, + "contextRegion": { + "startLine": 1467, + "startColumn": 28, + "charOffset": 42265, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tfor (int32_t nz = startz; nz != endz + zstep; nz += zstep) {\n\t\tGetFloorDescription(msg, x, y, nz, width, height, z - nz, skip);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01c8390369f621065a20bd4ae25c19b8e5c5b053742ac958f3cada5e508d0be9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1474, + "startColumn": 15, + "charOffset": 42434, + "charLength": 4, + "snippet": { + "text": "skip" + } + }, + "contextRegion": { + "startLine": 1472, + "startColumn": 15, + "charOffset": 42401, + "charLength": 4, + "snippet": { + "text": "\n\tif (skip >= 0) {\n\t\tmsg.addByte(skip);\n\t\tmsg.addByte(0xFF);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e29fb4514a150235b85c7c90f601187d3bd89874e23e73c14660c7871c240c51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1475, + "startColumn": 15, + "charOffset": 42455, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 1473, + "startColumn": 15, + "charOffset": 42402, + "charLength": 4, + "snippet": { + "text": "\tif (skip >= 0) {\n\t\tmsg.addByte(skip);\n\t\tmsg.addByte(0xFF);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33c7d774d6073270e94d1a7b351e2f2a891718b02f6814a43118506690a14d43" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1475, + "startColumn": 15, + "charOffset": 42455, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 1473, + "startColumn": 15, + "charOffset": 42402, + "charLength": 4, + "snippet": { + "text": "\tif (skip >= 0) {\n\t\tmsg.addByte(skip);\n\t\tmsg.addByte(0xFF);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78382a40f2ddafd6ea8aef09fffbe23f23d0e3b09d724d4df18db55543888af8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "3 adjacent parameters of 'GetFloorDescription' of similar type ('int32_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1479, + "startColumn": 83, + "charOffset": 42550, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 1477, + "startColumn": 83, + "charOffset": 42465, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid ProtocolGame::GetFloorDescription(NetworkMessage &msg, int32_t x, int32_t y, int32_t z, int32_t width, int32_t height, int32_t offset, int32_t &skip) {\n\tfor (int32_t nx = 0; nx < width; nx++) {\n\t\tfor (int32_t ny = 0; ny < height; ny++) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8314b31811cc74dca2af4ad66a895e4b6f2a30acc10be036d7a6391367651983" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1481, + "startColumn": 3, + "charOffset": 42669, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1479, + "startColumn": 3, + "charOffset": 42468, + "charLength": 3, + "snippet": { + "text": "void ProtocolGame::GetFloorDescription(NetworkMessage &msg, int32_t x, int32_t y, int32_t z, int32_t width, int32_t height, int32_t offset, int32_t &skip) {\n\tfor (int32_t nx = 0; nx < width; nx++) {\n\t\tfor (int32_t ny = 0; ny < height; ny++) {\n\t\t\tstd::shared_ptr tile = g_game().map.getTile(static_cast(x + nx + offset), static_cast(y + ny + offset), static_cast(z));\n\t\t\tif (tile) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3230f051a81e79fedde7909665e7d54497fdd96421200b4e2a2470b7b1e0808b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1485, + "startColumn": 18, + "charOffset": 42923, + "charLength": 4, + "snippet": { + "text": "skip" + } + }, + "contextRegion": { + "startLine": 1483, + "startColumn": 18, + "charOffset": 42870, + "charLength": 4, + "snippet": { + "text": "\t\t\tif (tile) {\n\t\t\t\tif (skip >= 0) {\n\t\t\t\t\tmsg.addByte(skip);\n\t\t\t\t\tmsg.addByte(0xFF);\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8bbd78de407b802f4bd6d37cb514be5b00aec693c9bfe88c5a746edb35929b91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1486, + "startColumn": 18, + "charOffset": 42947, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 1484, + "startColumn": 18, + "charOffset": 42885, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tif (skip >= 0) {\n\t\t\t\t\tmsg.addByte(skip);\n\t\t\t\t\tmsg.addByte(0xFF);\n\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e62689a463549e1ca16611bdf4836e8446b3ea6f14f7616912f74bd6ebb86f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1486, + "startColumn": 18, + "charOffset": 42947, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 1484, + "startColumn": 18, + "charOffset": 42885, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tif (skip >= 0) {\n\t\t\t\t\tmsg.addByte(skip);\n\t\t\t\t\tmsg.addByte(0xFF);\n\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19cb5cfe381a75fc8f8c75a659cac8939151f708ccfe9409ad58a0d5607049f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFE is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1491, + "startColumn": 23, + "charOffset": 43032, + "charLength": 4, + "snippet": { + "text": "0xFE" + } + }, + "contextRegion": { + "startLine": 1489, + "startColumn": 23, + "charOffset": 42961, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tskip = 0;\n\t\t\t\tGetTileDescription(tile, msg);\n\t\t\t} else if (skip == 0xFE) {\n\t\t\t\tmsg.addByte(0xFF);\n\t\t\t\tmsg.addByte(0xFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3678d4bd914c1e70573e6188f5668b571f78336d3aa4fcc269e517420cb3d56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1492, + "startColumn": 17, + "charOffset": 43056, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 1490, + "startColumn": 17, + "charOffset": 42975, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tGetTileDescription(tile, msg);\n\t\t\t} else if (skip == 0xFE) {\n\t\t\t\tmsg.addByte(0xFF);\n\t\t\t\tmsg.addByte(0xFF);\n\t\t\t\tskip = -1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9a31663af6aaa7da80f44a27ba35861fb9cfd90769ba0f408d3ac3e4ab02625" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1492, + "startColumn": 17, + "charOffset": 43056, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 1490, + "startColumn": 17, + "charOffset": 42975, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tGetTileDescription(tile, msg);\n\t\t\t} else if (skip == 0xFE) {\n\t\t\t\tmsg.addByte(0xFF);\n\t\t\t\tmsg.addByte(0xFF);\n\t\t\t\tskip = -1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff2c0ff0271da401cce50ad90ef531c65a2466b8e58a7426ee9768cd28dfb4e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1493, + "startColumn": 17, + "charOffset": 43079, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 1491, + "startColumn": 17, + "charOffset": 43010, + "charLength": 4, + "snippet": { + "text": "\t\t\t} else if (skip == 0xFE) {\n\t\t\t\tmsg.addByte(0xFF);\n\t\t\t\tmsg.addByte(0xFF);\n\t\t\t\tskip = -1;\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f39200bc83a7753b28e585923d5a11e554dfb16812378a0da07f00805c400b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1493, + "startColumn": 17, + "charOffset": 43079, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 1491, + "startColumn": 17, + "charOffset": 43010, + "charLength": 4, + "snippet": { + "text": "\t\t\t} else if (skip == 0xFE) {\n\t\t\t\tmsg.addByte(0xFF);\n\t\t\t\tmsg.addByte(0xFF);\n\t\t\t\tskip = -1;\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4cd05b39a6b8b65a7e6fcec0841b367b9e23955cd4ae9b3860cd5febb40e3c92" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'checkCreatureAsKnown' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1502, + "startColumn": 54, + "charOffset": 43193, + "charLength": 4, + "snippet": { + "text": "bool" + } + }, + "contextRegion": { + "startLine": 1500, + "startColumn": 54, + "charOffset": 43137, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid ProtocolGame::checkCreatureAsKnown(uint32_t id, bool &known, uint32_t &removedKnown) {\n\tif (auto [creatureKnown, creatureInserted] = knownCreatureSet.insert(id);\n\t !creatureInserted) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7ac8617aebaf73c1edcb75135d5fbd13df8de935f864962e854bd47a523ea20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1509, + "startColumn": 32, + "charOffset": 43409, + "charLength": 4, + "snippet": { + "text": "1300" + } + }, + "contextRegion": { + "startLine": 1507, + "startColumn": 32, + "charOffset": 43359, + "charLength": 4, + "snippet": { + "text": "\t}\n\tknown = false;\n\tif (knownCreatureSet.size() > 1300) {\n\t\t// Look for a creature to remove\n\t\tfor (auto it = knownCreatureSet.begin(), end = knownCreatureSet.end(); it != end; ++it) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed8327643ccd96594f64efae7fe68e47404a37bc092668a2bdfc974ee355b9b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1511, + "startColumn": 3, + "charOffset": 43454, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1509, + "startColumn": 3, + "charOffset": 43378, + "charLength": 3, + "snippet": { + "text": "\tif (knownCreatureSet.size() > 1300) {\n\t\t// Look for a creature to remove\n\t\tfor (auto it = knownCreatureSet.begin(), end = knownCreatureSet.end(); it != end; ++it) {\n\t\t\tif (*it == id) {\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68d642cbc0f9197cc2ee32a97e4d16dd2eaa83f3504dfde8552dc38b06074b8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1511, + "startColumn": 3, + "charOffset": 43454, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1509, + "startColumn": 3, + "charOffset": 43378, + "charLength": 3, + "snippet": { + "text": "\tif (knownCreatureSet.size() > 1300) {\n\t\t// Look for a creature to remove\n\t\tfor (auto it = knownCreatureSet.begin(), end = knownCreatureSet.end(); it != end; ++it) {\n\t\t\tif (*it == id) {\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31845545df1b7e4283c26389d3293a289929674671727aadc2b0b01da80ab5ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1511, + "startColumn": 8, + "charOffset": 43459, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1509, + "startColumn": 8, + "charOffset": 43378, + "charLength": 4, + "snippet": { + "text": "\tif (knownCreatureSet.size() > 1300) {\n\t\t// Look for a creature to remove\n\t\tfor (auto it = knownCreatureSet.begin(), end = knownCreatureSet.end(); it != end; ++it) {\n\t\t\tif (*it == id) {\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2073a6bfc37a7a10be5c08f1de8b578b0dc1289495e961b1373a5686724474ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1511, + "startColumn": 74, + "charOffset": 43525, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1509, + "startColumn": 74, + "charOffset": 43378, + "charLength": 2, + "snippet": { + "text": "\tif (knownCreatureSet.size() > 1300) {\n\t\t// Look for a creature to remove\n\t\tfor (auto it = knownCreatureSet.begin(), end = knownCreatureSet.end(); it != end; ++it) {\n\t\t\tif (*it == id) {\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbc8f24970a48100cfda860315cb6c98263cdd8bb9d18e9ed92c0a36be8fa0f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1517, + "startColumn": 4, + "charOffset": 43710, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1515, + "startColumn": 4, + "charOffset": 43583, + "charLength": 2, + "snippet": { + "text": "\t\t\t// We need to protect party players from removing\n\t\t\tstd::shared_ptr creature = g_game().getCreatureByID(*it);\n\t\t\tif (std::shared_ptr checkPlayer;\n\t\t\t creature && (checkPlayer = creature->getPlayer()) != nullptr) {\n\t\t\t\tif (player->getParty() != checkPlayer->getParty() && !canSee(creature)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "938c77d05cf91fc080f4a74c2b192b85b87666887a270b964ad04d1f6a470726" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1518, + "startColumn": 33, + "charOffset": 43783, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 1516, + "startColumn": 33, + "charOffset": 43636, + "charLength": 1, + "snippet": { + "text": "\t\t\tstd::shared_ptr creature = g_game().getCreatureByID(*it);\n\t\t\tif (std::shared_ptr checkPlayer;\n\t\t\t creature && (checkPlayer = creature->getPlayer()) != nullptr) {\n\t\t\t\tif (player->getParty() != checkPlayer->getParty() && !canSee(creature)) {\n\t\t\t\t\tremovedKnown = *it;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3aceedc3e85d68f51fd8e90e3862d7dfab58c04f0622c8e29c04a5c99e920ae1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1521, + "startColumn": 23, + "charOffset": 43947, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 1519, + "startColumn": 23, + "charOffset": 43822, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tif (player->getParty() != checkPlayer->getParty() && !canSee(creature)) {\n\t\t\t\t\tremovedKnown = *it;\n\t\t\t\t\tknownCreatureSet.erase(it);\n\t\t\t\t\treturn;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33cab0e4ed125020cb54fbee636653b49e453baf6807394d2014acd5c5ab1857" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1526, + "startColumn": 22, + "charOffset": 44057, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 1524, + "startColumn": 22, + "charOffset": 43977, + "charLength": 5, + "snippet": { + "text": "\t\t\t} else if (!canSee(creature)) {\n\t\t\t\tremovedKnown = *it;\n\t\t\t\tknownCreatureSet.erase(it);\n\t\t\t\treturn;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2d126c4a75ef685f493d627c887f9c833cdc082057b7675f2b96c79f1fe6c08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1538, + "startColumn": 20, + "charOffset": 44248, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 1536, + "startColumn": 20, + "charOffset": 44206, + "charLength": 5, + "snippet": { + "text": "\n\t\tremovedKnown = *it;\n\t\tknownCreatureSet.erase(it);\n\t} else {\n\t\tremovedKnown = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a58c8eec4e9ec6cfee1db265ac6533a34e0ba0a001e00ef63c450aeab2606b6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'c' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1544, + "startColumn": 53, + "charOffset": 44347, + "charLength": 1, + "snippet": { + "text": "c" + } + }, + "contextRegion": { + "startLine": 1542, + "startColumn": 53, + "charOffset": 44292, + "charLength": 1, + "snippet": { + "text": "}\n\nbool ProtocolGame::canSee(std::shared_ptr c) const {\n\tif (!c || !player || c->isRemoved()) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49be0913a568a49c282e44e48fd8a63739fef106f91cba042a51df04dbbc5ead" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1545, + "startColumn": 6, + "charOffset": 44363, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1543, + "startColumn": 6, + "charOffset": 44294, + "charLength": 1, + "snippet": { + "text": "\nbool ProtocolGame::canSee(std::shared_ptr c) const {\n\tif (!c || !player || c->isRemoved()) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7281770b9e9a5bd551d92818efb2b12a6b80564465f785192e8e753f8a14bef4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1545, + "startColumn": 12, + "charOffset": 44369, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1543, + "startColumn": 12, + "charOffset": 44294, + "charLength": 1, + "snippet": { + "text": "\nbool ProtocolGame::canSee(std::shared_ptr c) const {\n\tif (!c || !player || c->isRemoved()) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b717369ea9ed15adad2b04b2556038048f8288747a37c8fefb5de95e528f8bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'canSee' of similar type ('int32_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1560, + "startColumn": 38, + "charOffset": 44642, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 1558, + "startColumn": 38, + "charOffset": 44602, + "charLength": 7, + "snippet": { + "text": "}\n\nbool ProtocolGame::canSee(int32_t x, int32_t y, int32_t z) const {\n\tif (!player) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c77cc7ab1ddb9d13a4140d526c7a50c05b4c3ec93f6061996dadb5392e90bc17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1561, + "startColumn": 6, + "charOffset": 44677, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1559, + "startColumn": 6, + "charOffset": 44604, + "charLength": 1, + "snippet": { + "text": "\nbool ProtocolGame::canSee(int32_t x, int32_t y, int32_t z) const {\n\tif (!player) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8651fa5516aaed5b3280e3b2e95c57f23a70811d887c86346cbff3a225f9714e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1566, + "startColumn": 2, + "charOffset": 44757, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1564, + "startColumn": 2, + "charOffset": 44707, + "charLength": 2, + "snippet": { + "text": "\n\tconst Position &myPos = player->getPosition();\n\tif (myPos.z <= MAP_INIT_SURFACE_LAYER) {\n\t\t// we are on ground level or above (7 -> 0)\n\t\t// view is from 7 -> 0" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "000ae1669bc0f1fcbec3e72f7cb4621834225a9d7d026ae0b503c009a991cce3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int_fast16_t' (aka 'long') to signed type 'int8_t' (aka 'signed char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1581, + "startColumn": 25, + "charOffset": 45254, + "charLength": 5, + "snippet": { + "text": "myPos" + } + }, + "contextRegion": { + "startLine": 1579, + "startColumn": 25, + "charOffset": 45142, + "charLength": 5, + "snippet": { + "text": "\n\t// negative offset means that the action taken place is on a lower floor than ourself\n\tconst int8_t offsetz = myPos.getZ() - z;\n\treturn (x >= myPos.getX() - MAP_MAX_CLIENT_VIEW_PORT_X + offsetz) && (x <= myPos.getX() + (MAP_MAX_CLIENT_VIEW_PORT_X + 1) + offsetz) && (y >= myPos.getY() - MAP_MAX_CLIENT_VIEW_PORT_Y + offsetz) && (y <= myPos.getY() + (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) + offsetz);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a82f67d996c0bfffc8290e89b044d948b1d493c1026414ee38c2ea9ad10c673f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1581, + "startColumn": 25, + "charOffset": 45254, + "charLength": 5, + "snippet": { + "text": "myPos" + } + }, + "contextRegion": { + "startLine": 1579, + "startColumn": 25, + "charOffset": 45142, + "charLength": 5, + "snippet": { + "text": "\n\t// negative offset means that the action taken place is on a lower floor than ourself\n\tconst int8_t offsetz = myPos.getZ() - z;\n\treturn (x >= myPos.getX() - MAP_MAX_CLIENT_VIEW_PORT_X + offsetz) && (x <= myPos.getX() + (MAP_MAX_CLIENT_VIEW_PORT_X + 1) + offsetz) && (y >= myPos.getY() - MAP_MAX_CLIENT_VIEW_PORT_Y + offsetz) && (y <= myPos.getY() + (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) + offsetz);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d01186ff56defd3f770ffd2179c79f9f1ebcb6e84d3c121138a3d0c9ae87d5aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1597, + "startColumn": 2, + "charOffset": 45942, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 1595, + "startColumn": 2, + "charOffset": 45881, + "charLength": 8, + "snippet": { + "text": "\nvoid ProtocolGame::parseOpenChannel(NetworkMessage &msg) {\n\tuint16_t channelId = msg.get();\n\tg_game().playerOpenChannel(player->getID(), channelId);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40357d5287161a568d33efc0b58df077bb0f3943c399fb5e4283b8b8bb56b0eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1602, + "startColumn": 2, + "charOffset": 46105, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 1600, + "startColumn": 2, + "charOffset": 46043, + "charLength": 8, + "snippet": { + "text": "\nvoid ProtocolGame::parseCloseChannel(NetworkMessage &msg) {\n\tuint16_t channelId = msg.get();\n\tg_game().playerCloseChannel(player->getID(), channelId);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "726b24f296857933dfa0618b904bab14c3234e993e8f6c80635c563181350867" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1613, + "startColumn": 80, + "charOffset": 46550, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 1611, + "startColumn": 80, + "charOffset": 46381, + "charLength": 1, + "snippet": { + "text": "void ProtocolGame::parseAutoWalk(NetworkMessage &msg) {\n\tuint8_t numdirs = msg.getByte();\n\tif (numdirs == 0 || (msg.getBufferPosition() + numdirs) != (msg.getLength() + 8)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "953a3559c7327409b5d4be4264d8e15b50fcc2fc799290a766bcbbb49bed115b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1619, + "startColumn": 2, + "charOffset": 46641, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1617, + "startColumn": 2, + "charOffset": 46570, + "charLength": 3, + "snippet": { + "text": "\tstd::vector path;\n\tpath.resize(numdirs, DIRECTION_NORTH);\n\tfor (size_t i = numdirs; --i < numdirs;) {\n\t\tconst uint8_t rawdir = msg.getByte();\n\t\tswitch (rawdir) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e06b2983a617d680d9213492a8a9eb56ac729266498e2259d4d2689bfe2b0783" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1619, + "startColumn": 2, + "charOffset": 46641, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1617, + "startColumn": 2, + "charOffset": 46570, + "charLength": 3, + "snippet": { + "text": "\tstd::vector path;\n\tpath.resize(numdirs, DIRECTION_NORTH);\n\tfor (size_t i = numdirs; --i < numdirs;) {\n\t\tconst uint8_t rawdir = msg.getByte();\n\t\tswitch (rawdir) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43a988a2e79cfdba376b62ebd75b60bf4f670ecabe87d401d77b492dba480ea9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'i' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1619, + "startColumn": 27, + "charOffset": 46666, + "charLength": 2, + "snippet": { + "text": "--" + } + }, + "contextRegion": { + "startLine": 1617, + "startColumn": 27, + "charOffset": 46570, + "charLength": 2, + "snippet": { + "text": "\tstd::vector path;\n\tpath.resize(numdirs, DIRECTION_NORTH);\n\tfor (size_t i = numdirs; --i < numdirs;) {\n\t\tconst uint8_t rawdir = msg.getByte();\n\t\tswitch (rawdir) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c825070bdaa9084b48d266400b74b5731289edaa29c6353e464216a61440adc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1634, + "startColumn": 9, + "charOffset": 46971, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 1632, + "startColumn": 9, + "charOffset": 46917, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tpath[i] = DIRECTION_NORTHWEST;\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tpath[i] = DIRECTION_WEST;\n\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9f14276846a2b4e43042f686d03a66bbf6b7a5f83bc2093329fe4ed716d6035" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1637, + "startColumn": 9, + "charOffset": 47023, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 1635, + "startColumn": 9, + "charOffset": 46974, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tpath[i] = DIRECTION_WEST;\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tpath[i] = DIRECTION_SOUTHWEST;\n\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9f5ad55db6940976dad2335d38dd18152862248f157d5dd68aa3adf8daad6fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1640, + "startColumn": 9, + "charOffset": 47080, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 1638, + "startColumn": 9, + "charOffset": 47026, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tpath[i] = DIRECTION_SOUTHWEST;\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\tpath[i] = DIRECTION_SOUTH;\n\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44acad5d4d2e94391aa2ca2fd8ffea67172b46fee1c6d158bb908c559264af93" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1643, + "startColumn": 9, + "charOffset": 47133, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 1641, + "startColumn": 9, + "charOffset": 47083, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tpath[i] = DIRECTION_SOUTH;\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\tpath[i] = DIRECTION_SOUTHEAST;\n\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8c8472812c26dc9e227b9ab2653d588bdd4201d73e833c6363d60f53d5b4a4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1659, + "startColumn": 6, + "charOffset": 47362, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1657, + "startColumn": 6, + "charOffset": 47299, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::parseSetOutfit(NetworkMessage &msg) {\n\tif (!player || player->isRemoved()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1a03266fe624dc1a61639d5d054c81643d7d11f54e927e3a97a6405795d834b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1664, + "startColumn": 56, + "charOffset": 47522, + "charLength": 4, + "snippet": { + "text": "0xD3" + } + }, + "contextRegion": { + "startLine": 1662, + "startColumn": 56, + "charOffset": 47409, + "charLength": 4, + "snippet": { + "text": "\n\tuint16_t startBufferPosition = msg.getBufferPosition();\n\tModule* outfitModule = g_modules().getEventByRecvbyte(0xD3, false);\n\tif (outfitModule) {\n\t\toutfitModule->executeOnRecvbyte(player, msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39057e406a69de9665d66147802da4c3945f7441e36cb7806363597bd0e136bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xD3 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1664, + "startColumn": 56, + "charOffset": 47522, + "charLength": 4, + "snippet": { + "text": "0xD3" + } + }, + "contextRegion": { + "startLine": 1662, + "startColumn": 56, + "charOffset": 47409, + "charLength": 4, + "snippet": { + "text": "\n\tuint16_t startBufferPosition = msg.getBufferPosition();\n\tModule* outfitModule = g_modules().getEventByRecvbyte(0xD3, false);\n\tif (outfitModule) {\n\t\toutfitModule->executeOnRecvbyte(player, msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e46faba662b8e6c014356e8104498635ee0d8abceac61ead2eb9adadd64422f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1665, + "startColumn": 6, + "charOffset": 47541, + "charLength": 12, + "snippet": { + "text": "outfitModule" + } + }, + "contextRegion": { + "startLine": 1663, + "startColumn": 6, + "charOffset": 47410, + "charLength": 12, + "snippet": { + "text": "\tuint16_t startBufferPosition = msg.getBufferPosition();\n\tModule* outfitModule = g_modules().getEventByRecvbyte(0xD3, false);\n\tif (outfitModule) {\n\t\toutfitModule->executeOnRecvbyte(player, msg);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ca9a14ae3122119a2938886361060d972180a9278a9594b2ae5ffd73b7b6c9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'Module *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1665, + "startColumn": 6, + "charOffset": 47541, + "charLength": 12, + "snippet": { + "text": "outfitModule" + } + }, + "contextRegion": { + "startLine": 1663, + "startColumn": 6, + "charOffset": 47410, + "charLength": 12, + "snippet": { + "text": "\tuint16_t startBufferPosition = msg.getBufferPosition();\n\tModule* outfitModule = g_modules().getEventByRecvbyte(0xD3, false);\n\tif (outfitModule) {\n\t\toutfitModule->executeOnRecvbyte(player, msg);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94a88de168e5b7276704139e32740af893ec9848dfad64d7ab9c7233c1093cd1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1670, + "startColumn": 24, + "charOffset": 47687, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1668, + "startColumn": 24, + "charOffset": 47608, + "charLength": 1, + "snippet": { + "text": "\n\tif (msg.getBufferPosition() == startBufferPosition) {\n\t\tuint8_t outfitType = !oldProtocol ? msg.getByte() : 0;\n\t\tOutfit_t newOutfit;\n\t\tnewOutfit.lookType = msg.get();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17ec25dda56940f1a9409e2146015806535a38b83b4d1fa474be86281b32192c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "132 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1673, + "startColumn": 42, + "charOffset": 47828, + "charLength": 3, + "snippet": { + "text": "132" + } + }, + "contextRegion": { + "startLine": 1671, + "startColumn": 42, + "charOffset": 47721, + "charLength": 3, + "snippet": { + "text": "\t\tOutfit_t newOutfit;\n\t\tnewOutfit.lookType = msg.get();\n\t\tnewOutfit.lookHead = std::min(132, msg.getByte());\n\t\tnewOutfit.lookBody = std::min(132, msg.getByte());\n\t\tnewOutfit.lookLegs = std::min(132, msg.getByte());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da5854854951b6d8e887d57acaf0e6e7829a2c4bcb8cc8550fb0b2ad04b7efbc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "132 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1674, + "startColumn": 42, + "charOffset": 47890, + "charLength": 3, + "snippet": { + "text": "132" + } + }, + "contextRegion": { + "startLine": 1672, + "startColumn": 42, + "charOffset": 47743, + "charLength": 3, + "snippet": { + "text": "\t\tnewOutfit.lookType = msg.get();\n\t\tnewOutfit.lookHead = std::min(132, msg.getByte());\n\t\tnewOutfit.lookBody = std::min(132, msg.getByte());\n\t\tnewOutfit.lookLegs = std::min(132, msg.getByte());\n\t\tnewOutfit.lookFeet = std::min(132, msg.getByte());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6595804b51b2803265a41204328a132541ad69cfa23dc4c5bc1d45704f922fec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "132 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1675, + "startColumn": 42, + "charOffset": 47952, + "charLength": 3, + "snippet": { + "text": "132" + } + }, + "contextRegion": { + "startLine": 1673, + "startColumn": 42, + "charOffset": 47787, + "charLength": 3, + "snippet": { + "text": "\t\tnewOutfit.lookHead = std::min(132, msg.getByte());\n\t\tnewOutfit.lookBody = std::min(132, msg.getByte());\n\t\tnewOutfit.lookLegs = std::min(132, msg.getByte());\n\t\tnewOutfit.lookFeet = std::min(132, msg.getByte());\n\t\tnewOutfit.lookAddons = msg.getByte();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f48c6496236e4bbf1af77b6abead9b6c71761cb4a5bd2ad15fab05acb25e81ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "132 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1676, + "startColumn": 42, + "charOffset": 48014, + "charLength": 3, + "snippet": { + "text": "132" + } + }, + "contextRegion": { + "startLine": 1674, + "startColumn": 42, + "charOffset": 47849, + "charLength": 3, + "snippet": { + "text": "\t\tnewOutfit.lookBody = std::min(132, msg.getByte());\n\t\tnewOutfit.lookLegs = std::min(132, msg.getByte());\n\t\tnewOutfit.lookFeet = std::min(132, msg.getByte());\n\t\tnewOutfit.lookAddons = msg.getByte();\n\t\tif (outfitType == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6d32f68cd86b2c62b96c6352174adb743a7729a11336410d91812fa43cf9fa5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1678, + "startColumn": 3, + "charOffset": 48077, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1676, + "startColumn": 3, + "charOffset": 47973, + "charLength": 2, + "snippet": { + "text": "\t\tnewOutfit.lookFeet = std::min(132, msg.getByte());\n\t\tnewOutfit.lookAddons = msg.getByte();\n\t\tif (outfitType == 0) {\n\t\t\tnewOutfit.lookMount = msg.get();\n\t\t\tif (!oldProtocol) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b33786fde4c26cce8490f46423678cf07d0f3924999aaf6491f686a95154a596" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "132 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1681, + "startColumn": 49, + "charOffset": 48217, + "charLength": 3, + "snippet": { + "text": "132" + } + }, + "contextRegion": { + "startLine": 1679, + "startColumn": 49, + "charOffset": 48100, + "charLength": 3, + "snippet": { + "text": "\t\t\tnewOutfit.lookMount = msg.get();\n\t\t\tif (!oldProtocol) {\n\t\t\t\tnewOutfit.lookMountHead = std::min(132, msg.getByte());\n\t\t\t\tnewOutfit.lookMountBody = std::min(132, msg.getByte());\n\t\t\t\tnewOutfit.lookMountLegs = std::min(132, msg.getByte());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "305ff595cfed82855b6e07b63c7a49aa6565c904e9a511a8094ad6210f56cbcd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "132 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1682, + "startColumn": 49, + "charOffset": 48286, + "charLength": 3, + "snippet": { + "text": "132" + } + }, + "contextRegion": { + "startLine": 1680, + "startColumn": 49, + "charOffset": 48146, + "charLength": 3, + "snippet": { + "text": "\t\t\tif (!oldProtocol) {\n\t\t\t\tnewOutfit.lookMountHead = std::min(132, msg.getByte());\n\t\t\t\tnewOutfit.lookMountBody = std::min(132, msg.getByte());\n\t\t\t\tnewOutfit.lookMountLegs = std::min(132, msg.getByte());\n\t\t\t\tnewOutfit.lookMountFeet = std::min(132, msg.getByte());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0181ed986d3e87871129bedfec6389146fda6345afb745f16ba2715513fc2d40" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "132 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1683, + "startColumn": 49, + "charOffset": 48355, + "charLength": 3, + "snippet": { + "text": "132" + } + }, + "contextRegion": { + "startLine": 1681, + "startColumn": 49, + "charOffset": 48169, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tnewOutfit.lookMountHead = std::min(132, msg.getByte());\n\t\t\t\tnewOutfit.lookMountBody = std::min(132, msg.getByte());\n\t\t\t\tnewOutfit.lookMountLegs = std::min(132, msg.getByte());\n\t\t\t\tnewOutfit.lookMountFeet = std::min(132, msg.getByte());\n\t\t\t\tbool isMounted = msg.getByte();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93305157e0f490bda25f417c61a21b23bb120dfff34ccec3d430f1127eade9f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "132 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1684, + "startColumn": 49, + "charOffset": 48424, + "charLength": 3, + "snippet": { + "text": "132" + } + }, + "contextRegion": { + "startLine": 1682, + "startColumn": 49, + "charOffset": 48238, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tnewOutfit.lookMountBody = std::min(132, msg.getByte());\n\t\t\t\tnewOutfit.lookMountLegs = std::min(132, msg.getByte());\n\t\t\t\tnewOutfit.lookMountFeet = std::min(132, msg.getByte());\n\t\t\t\tbool isMounted = msg.getByte();\n\t\t\t\tnewOutfit.lookFamiliarsType = msg.get();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28ffe3f62910a8868a212951518e7ae999a8fb52c559056427a9e5104d97c488" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1685, + "startColumn": 22, + "charOffset": 48466, + "charLength": 3, + "snippet": { + "text": "msg" + } + }, + "contextRegion": { + "startLine": 1683, + "startColumn": 22, + "charOffset": 48307, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tnewOutfit.lookMountLegs = std::min(132, msg.getByte());\n\t\t\t\tnewOutfit.lookMountFeet = std::min(132, msg.getByte());\n\t\t\t\tbool isMounted = msg.getByte();\n\t\t\t\tnewOutfit.lookFamiliarsType = msg.get();\n\t\t\t\tg_logger().debug(\"Bool isMounted: {}\", isMounted);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e29be0ab9fc4bd299461c846ce821c6198011aa681cf107ae398427608d802f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1696, + "startColumn": 8, + "charOffset": 49005, + "charLength": 3, + "snippet": { + "text": "get" + } + }, + "contextRegion": { + "startLine": 1694, + "startColumn": 8, + "charOffset": 48853, + "charLength": 3, + "snippet": { + "text": "\t\t\t// if try outfit is set to 2 it expects uint32_t value after mounted and disable mounts from outfit window dialog\n\t\t\tnewOutfit.lookMount = 0;\n\t\t\tmsg.get();\n\t\t} else if (outfitType == 2) {\n\t\t\tPosition pos = msg.getPosition();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a8fc9889c7e36d5071f3b010eb0a8d7d4c42da6b7fb65b9d0a1e52b0577d965" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1699, + "startColumn": 4, + "charOffset": 49094, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 1697, + "startColumn": 4, + "charOffset": 49022, + "charLength": 8, + "snippet": { + "text": "\t\t} else if (outfitType == 2) {\n\t\t\tPosition pos = msg.getPosition();\n\t\t\tuint16_t itemId = msg.get();\n\t\t\tuint8_t stackpos = msg.getByte();\n\t\t\tnewOutfit.lookMount = msg.get();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e1c1a230e827cae6c9bfb6e78ea0741b5bf6ea1dc05b91a2e6be462a878d9f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "132 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1702, + "startColumn": 48, + "charOffset": 49263, + "charLength": 3, + "snippet": { + "text": "132" + } + }, + "contextRegion": { + "startLine": 1700, + "startColumn": 48, + "charOffset": 49133, + "charLength": 3, + "snippet": { + "text": "\t\t\tuint8_t stackpos = msg.getByte();\n\t\t\tnewOutfit.lookMount = msg.get();\n\t\t\tnewOutfit.lookMountHead = std::min(132, msg.getByte());\n\t\t\tnewOutfit.lookMountBody = std::min(132, msg.getByte());\n\t\t\tnewOutfit.lookMountLegs = std::min(132, msg.getByte());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95a478c118050353621019c14a5293e05c59ae5847ed2d926b405d7f536e0c33" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "132 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1703, + "startColumn": 48, + "charOffset": 49331, + "charLength": 3, + "snippet": { + "text": "132" + } + }, + "contextRegion": { + "startLine": 1701, + "startColumn": 48, + "charOffset": 49170, + "charLength": 3, + "snippet": { + "text": "\t\t\tnewOutfit.lookMount = msg.get();\n\t\t\tnewOutfit.lookMountHead = std::min(132, msg.getByte());\n\t\t\tnewOutfit.lookMountBody = std::min(132, msg.getByte());\n\t\t\tnewOutfit.lookMountLegs = std::min(132, msg.getByte());\n\t\t\tnewOutfit.lookMountFeet = std::min(132, msg.getByte());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd0f3bcf936c0aeaf6d64527a7c0aa112d44823868b542a6d766b7fe830cf4c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "132 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1704, + "startColumn": 48, + "charOffset": 49399, + "charLength": 3, + "snippet": { + "text": "132" + } + }, + "contextRegion": { + "startLine": 1702, + "startColumn": 48, + "charOffset": 49216, + "charLength": 3, + "snippet": { + "text": "\t\t\tnewOutfit.lookMountHead = std::min(132, msg.getByte());\n\t\t\tnewOutfit.lookMountBody = std::min(132, msg.getByte());\n\t\t\tnewOutfit.lookMountLegs = std::min(132, msg.getByte());\n\t\t\tnewOutfit.lookMountFeet = std::min(132, msg.getByte());\n\t\t\tuint8_t direction = std::max(DIRECTION_NORTH, std::min(DIRECTION_WEST, msg.getByte()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee440b3aa9e3cc1867797189f5e29fe73911a06af0c51afb7949a1877b2e17cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "132 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1705, + "startColumn": 48, + "charOffset": 49467, + "charLength": 3, + "snippet": { + "text": "132" + } + }, + "contextRegion": { + "startLine": 1703, + "startColumn": 48, + "charOffset": 49284, + "charLength": 3, + "snippet": { + "text": "\t\t\tnewOutfit.lookMountBody = std::min(132, msg.getByte());\n\t\t\tnewOutfit.lookMountLegs = std::min(132, msg.getByte());\n\t\t\tnewOutfit.lookMountFeet = std::min(132, msg.getByte());\n\t\t\tuint8_t direction = std::max(DIRECTION_NORTH, std::min(DIRECTION_WEST, msg.getByte()));\n\t\t\tuint8_t podiumVisible = msg.getByte();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f9682003c91a4f7f315a8a10b1affd778dab34d8e6552ca1e6ac43d7da1b6d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1720, + "startColumn": 2, + "charOffset": 50005, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 1718, + "startColumn": 2, + "charOffset": 49911, + "charLength": 8, + "snippet": { + "text": "void ProtocolGame::parseApplyImbuement(NetworkMessage &msg) {\n\tuint8_t slot = msg.getByte();\n\tuint32_t imbuementId = msg.get();\n\tbool protectionCharm = msg.getByte() != 0x00;\n\tg_game().playerApplyImbuement(player->getID(), imbuementId, slot, protectionCharm);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c5479c9e062aa0e708531ab71c746546d4af73518a6a1f03dbdd44050f5d07b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1722, + "startColumn": 49, + "charOffset": 50144, + "charLength": 11, + "snippet": { + "text": "imbuementId" + } + }, + "contextRegion": { + "startLine": 1720, + "startColumn": 49, + "charOffset": 50004, + "charLength": 11, + "snippet": { + "text": "\tuint32_t imbuementId = msg.get();\n\tbool protectionCharm = msg.getByte() != 0x00;\n\tg_game().playerApplyImbuement(player->getID(), imbuementId, slot, protectionCharm);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1b7553ad8e4d1dea7dc9fca07a24f53b40727bed3d635943ab7dda1e6cbcc33" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1730, + "startColumn": 62, + "charOffset": 50396, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 1728, + "startColumn": 62, + "charOffset": 50332, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid ProtocolGame::parseCloseImbuementWindow(NetworkMessage &) {\n\tg_game().playerCloseImbuementWindow(player->getID());\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7efb527352e7c6e4b5c6fe8eae0931851a53a6c11ea097877e5006084770d3fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1736, + "startColumn": 2, + "charOffset": 50549, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 1734, + "startColumn": 2, + "charOffset": 50458, + "charLength": 8, + "snippet": { + "text": "void ProtocolGame::parseUseItem(NetworkMessage &msg) {\n\tPosition pos = msg.getPosition();\n\tuint16_t itemId = msg.get();\n\tuint8_t stackpos = msg.getByte();\n\tuint8_t index = msg.getByte();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "730f4a0b590888cc32e80d5765379a44eb5c4d04186e1d419c508ae3eb36d970" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1744, + "startColumn": 2, + "charOffset": 50827, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 1742, + "startColumn": 2, + "charOffset": 50730, + "charLength": 8, + "snippet": { + "text": "void ProtocolGame::parseUseItemEx(NetworkMessage &msg) {\n\tPosition fromPos = msg.getPosition();\n\tuint16_t fromItemId = msg.get();\n\tuint8_t fromStackPos = msg.getByte();\n\tPosition toPos = msg.getPosition();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "616a10ee709612d20292c37702de1657eeeb72419d390bb14f7ad0f2218e781d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1747, + "startColumn": 2, + "charOffset": 50947, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 1745, + "startColumn": 2, + "charOffset": 50870, + "charLength": 8, + "snippet": { + "text": "\tuint8_t fromStackPos = msg.getByte();\n\tPosition toPos = msg.getPosition();\n\tuint16_t toItemId = msg.get();\n\tuint8_t toStackPos = msg.getByte();\n\tg_game().playerUseItemEx(player->getID(), fromPos, fromStackPos, fromItemId, toPos, toStackPos, toItemId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac5023764b359a4f416fabdae01b050cebb6ce7efa73354182ecf55877aa84cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1754, + "startColumn": 2, + "charOffset": 51239, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 1752, + "startColumn": 2, + "charOffset": 51136, + "charLength": 8, + "snippet": { + "text": "void ProtocolGame::parseUseWithCreature(NetworkMessage &msg) {\n\tPosition fromPos = msg.getPosition();\n\tuint16_t itemId = msg.get();\n\tuint8_t fromStackPos = msg.getByte();\n\tuint32_t creatureId = msg.get();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65d38c3e64b23de9d2019303631a2a22c5476dfe625d1d1338b4e2ebbb85107d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1756, + "startColumn": 2, + "charOffset": 51318, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 1754, + "startColumn": 2, + "charOffset": 51238, + "charLength": 8, + "snippet": { + "text": "\tuint16_t itemId = msg.get();\n\tuint8_t fromStackPos = msg.getByte();\n\tuint32_t creatureId = msg.get();\n\tg_game().playerUseWithCreature(player->getID(), fromPos, fromStackPos, creatureId, itemId);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40357d5287161a568d33efc0b58df077bb0f3943c399fb5e4283b8b8bb56b0eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1782, + "startColumn": 2, + "charOffset": 52160, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 1780, + "startColumn": 2, + "charOffset": 52067, + "charLength": 8, + "snippet": { + "text": "void ProtocolGame::parseThrow(NetworkMessage &msg) {\n\tPosition fromPos = msg.getPosition();\n\tuint16_t itemId = msg.get();\n\tuint8_t fromStackpos = msg.getByte();\n\tPosition toPos = msg.getPosition();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a19ca836b8fccc8f447a57f83bc5b00520fc7f9c3cfebe4871effee3ff195d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1794, + "startColumn": 2, + "charOffset": 52519, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 1792, + "startColumn": 2, + "charOffset": 52429, + "charLength": 8, + "snippet": { + "text": "void ProtocolGame::parseLookAt(NetworkMessage &msg) {\n\tPosition pos = msg.getPosition();\n\tuint16_t itemId = msg.get();\n\tuint8_t stackpos = msg.getByte();\n\tg_game().playerLookAt(player->getID(), itemId, pos, stackpos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65d38c3e64b23de9d2019303631a2a22c5476dfe625d1d1338b4e2ebbb85107d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1800, + "startColumn": 2, + "charOffset": 52725, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 1798, + "startColumn": 2, + "charOffset": 52659, + "charLength": 8, + "snippet": { + "text": "\nvoid ProtocolGame::parseLookInBattleList(NetworkMessage &msg) {\n\tuint32_t creatureId = msg.get();\n\tg_game().playerLookInBattleList(player->getID(), creatureId);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e710e03e2a1812b92d4d48c7c0b5129856ae5d2e1335cfcf75bfd7ab96325192" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1835, + "startColumn": 2, + "charOffset": 53639, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1833, + "startColumn": 2, + "charOffset": 53604, + "charLength": 2, + "snippet": { + "text": "\n\tuint8_t action = msg.getByte();\n\tif (action == 0) {\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\n\t\tPosition pos = msg.getPosition();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7e165c290b19880e71e0aec3ca38428ac2382071b471e0d5567dda440038c0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1836, + "startColumn": 3, + "charOffset": 53660, + "charLength": 16, + "snippet": { + "text": "ObjectCategory_t" + } + }, + "contextRegion": { + "startLine": 1834, + "startColumn": 3, + "charOffset": 53605, + "charLength": 16, + "snippet": { + "text": "\tuint8_t action = msg.getByte();\n\tif (action == 0) {\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\n\t\tPosition pos = msg.getPosition();\n\t\tuint16_t itemId = msg.get();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae2d86847cd0e7b9674c2a3eed9d380374150a2ae8cee090e88a89d038c56e86" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1836, + "startColumn": 31, + "charOffset": 53688, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1834, + "startColumn": 31, + "charOffset": 53605, + "charLength": 1, + "snippet": { + "text": "\tuint8_t action = msg.getByte();\n\tif (action == 0) {\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\n\t\tPosition pos = msg.getPosition();\n\t\tuint16_t itemId = msg.get();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8310c4ac620c92ae7719e1700b2e418221a1563e3a6b442d7751da9fcd3962d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1838, + "startColumn": 3, + "charOffset": 53759, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 1836, + "startColumn": 3, + "charOffset": 53658, + "charLength": 8, + "snippet": { + "text": "\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\n\t\tPosition pos = msg.getPosition();\n\t\tuint16_t itemId = msg.get();\n\t\tuint8_t stackpos = msg.getByte();\n\t\tg_game().playerSetManagedContainer(player->getID(), category, pos, itemId, stackpos, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b1a72bf0e21d23f26f7cc4a674fd5571a79717d0c8b723f6f771782df6ee1b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1842, + "startColumn": 3, + "charOffset": 53957, + "charLength": 16, + "snippet": { + "text": "ObjectCategory_t" + } + }, + "contextRegion": { + "startLine": 1840, + "startColumn": 3, + "charOffset": 53834, + "charLength": 16, + "snippet": { + "text": "\t\tg_game().playerSetManagedContainer(player->getID(), category, pos, itemId, stackpos, true);\n\t} else if (action == 1) {\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\n\t\tg_game().playerClearManagedContainer(player->getID(), category, true);\n\t} else if (action == 2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10bf08f027521158ac40630d46af9f6c42b3900c0205ecc53e6d402250109909" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1842, + "startColumn": 31, + "charOffset": 53985, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1840, + "startColumn": 31, + "charOffset": 53834, + "charLength": 1, + "snippet": { + "text": "\t\tg_game().playerSetManagedContainer(player->getID(), category, pos, itemId, stackpos, true);\n\t} else if (action == 1) {\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\n\t\tg_game().playerClearManagedContainer(player->getID(), category, true);\n\t} else if (action == 2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ab09d5f908f257afe385f3a0b38a66aec15327a6dc6762a6d8189daa04b33d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1845, + "startColumn": 3, + "charOffset": 54120, + "charLength": 16, + "snippet": { + "text": "ObjectCategory_t" + } + }, + "contextRegion": { + "startLine": 1843, + "startColumn": 3, + "charOffset": 54018, + "charLength": 16, + "snippet": { + "text": "\t\tg_game().playerClearManagedContainer(player->getID(), category, true);\n\t} else if (action == 2) {\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\n\t\tg_game().playerOpenManagedContainer(player->getID(), category, true);\n\t} else if (action == 3) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0bfaf1c9d3a3c6ba7916ee53d360033e5a3cc7fb2babe206316969cc2f7b242" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1845, + "startColumn": 31, + "charOffset": 54148, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1843, + "startColumn": 31, + "charOffset": 54018, + "charLength": 1, + "snippet": { + "text": "\t\tg_game().playerClearManagedContainer(player->getID(), category, true);\n\t} else if (action == 2) {\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\n\t\tg_game().playerOpenManagedContainer(player->getID(), category, true);\n\t} else if (action == 3) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "abe7cb3f6081185c2f191b7af576cfdea4a955e3a8f68d41a0bcd5f80fa80cf6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1851, + "startColumn": 3, + "charOffset": 54431, + "charLength": 16, + "snippet": { + "text": "ObjectCategory_t" + } + }, + "contextRegion": { + "startLine": 1849, + "startColumn": 3, + "charOffset": 54327, + "charLength": 16, + "snippet": { + "text": "\t\tg_game().playerSetQuickLootFallback(player->getID(), useMainAsFallback);\n\t} else if (action == 4) {\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\n\t\tPosition pos = msg.getPosition();\n\t\tuint16_t itemId = msg.get();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb3a05e1b59d279a64f9972fb829cf6d7bc5ced26fa6d2f42e4bb5f090b8634e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1851, + "startColumn": 31, + "charOffset": 54459, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1849, + "startColumn": 31, + "charOffset": 54327, + "charLength": 1, + "snippet": { + "text": "\t\tg_game().playerSetQuickLootFallback(player->getID(), useMainAsFallback);\n\t} else if (action == 4) {\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\n\t\tPosition pos = msg.getPosition();\n\t\tuint16_t itemId = msg.get();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3098af91eda46e57aa4d13ae57190f5cb737c0140399fb4ab767ec3a2cc1091" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1853, + "startColumn": 3, + "charOffset": 54530, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 1851, + "startColumn": 3, + "charOffset": 54429, + "charLength": 8, + "snippet": { + "text": "\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\n\t\tPosition pos = msg.getPosition();\n\t\tuint16_t itemId = msg.get();\n\t\tuint8_t stackpos = msg.getByte();\n\t\tg_logger().debug(\"[{}] action {}, category {}, pos {}, itemId {}, stackPos {}\", __FUNCTION__, action, static_cast(category), pos.toString(), itemId, stackpos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dda160d12d55aa9152b15032e312526af2dcd0c934bfcdf49cf3eada0c62c059" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1857, + "startColumn": 23, + "charOffset": 54893, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 1855, + "startColumn": 23, + "charOffset": 54605, + "charLength": 1, + "snippet": { + "text": "\t\tg_logger().debug(\"[{}] action {}, category {}, pos {}, itemId {}, stackPos {}\", __FUNCTION__, action, static_cast(category), pos.toString(), itemId, stackpos);\n\t\tg_game().playerSetManagedContainer(player->getID(), category, pos, itemId, stackpos, false);\n\t} else if (action == 5) {\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\n\t\tg_game().playerClearManagedContainer(player->getID(), category, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73d116be61b6a007e1b9987068b10656ab49b7a2a93f2422ccb6a094572754c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1858, + "startColumn": 3, + "charOffset": 54900, + "charLength": 16, + "snippet": { + "text": "ObjectCategory_t" + } + }, + "contextRegion": { + "startLine": 1856, + "startColumn": 3, + "charOffset": 54776, + "charLength": 16, + "snippet": { + "text": "\t\tg_game().playerSetManagedContainer(player->getID(), category, pos, itemId, stackpos, false);\n\t} else if (action == 5) {\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\n\t\tg_game().playerClearManagedContainer(player->getID(), category, false);\n\t} else if (action == 6) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8cc725623076bcd9bfbdc8559185918a68e811712f45e5a44b81a2af5b4472e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1858, + "startColumn": 31, + "charOffset": 54928, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1856, + "startColumn": 31, + "charOffset": 54776, + "charLength": 1, + "snippet": { + "text": "\t\tg_game().playerSetManagedContainer(player->getID(), category, pos, itemId, stackpos, false);\n\t} else if (action == 5) {\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\n\t\tg_game().playerClearManagedContainer(player->getID(), category, false);\n\t} else if (action == 6) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6fa679100053f5f1181ee89f7ef9511a2854975d5521b454dc608fa9fa608c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1860, + "startColumn": 23, + "charOffset": 55057, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 1858, + "startColumn": 23, + "charOffset": 54898, + "charLength": 1, + "snippet": { + "text": "\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\n\t\tg_game().playerClearManagedContainer(player->getID(), category, false);\n\t} else if (action == 6) {\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\n\t\tg_game().playerOpenManagedContainer(player->getID(), category, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee09eba23accedaf1db4132bccfabd03aa2c84adb9382e84a3fc69382db340df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1861, + "startColumn": 3, + "charOffset": 55064, + "charLength": 16, + "snippet": { + "text": "ObjectCategory_t" + } + }, + "contextRegion": { + "startLine": 1859, + "startColumn": 3, + "charOffset": 54961, + "charLength": 16, + "snippet": { + "text": "\t\tg_game().playerClearManagedContainer(player->getID(), category, false);\n\t} else if (action == 6) {\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\n\t\tg_game().playerOpenManagedContainer(player->getID(), category, false);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7530cc068af2c8e311f1d4aba7335f36c2f3b13dc7a0650d96639b7f6f113053" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1861, + "startColumn": 31, + "charOffset": 55092, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1859, + "startColumn": 31, + "charOffset": 54961, + "charLength": 1, + "snippet": { + "text": "\t\tg_game().playerClearManagedContainer(player->getID(), category, false);\n\t} else if (action == 6) {\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\n\t\tg_game().playerOpenManagedContainer(player->getID(), category, false);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0760b13698251510a55b9e35bd1390e00be5be3f9833fae64f14f1f5c3b8f25d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1873, + "startColumn": 2, + "charOffset": 55375, + "charLength": 17, + "snippet": { + "text": "QuickLootFilter_t" + } + }, + "contextRegion": { + "startLine": 1871, + "startColumn": 2, + "charOffset": 55370, + "charLength": 17, + "snippet": { + "text": "\t}\n\n\tQuickLootFilter_t filter = (QuickLootFilter_t)msg.getByte();\n\tstd::vector listedItems;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb5a9749235fa49e2ad6a7295f4468ed135f3eb7de94ae44ae8c207d9034f6a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1873, + "startColumn": 29, + "charOffset": 55402, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1871, + "startColumn": 29, + "charOffset": 55370, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tQuickLootFilter_t filter = (QuickLootFilter_t)msg.getByte();\n\tstd::vector listedItems;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6be28705971551a8d6ebb392bf9cc8855efb04e5f4b0e2d455cfa8933bd23d3a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1876, + "startColumn": 2, + "charOffset": 55474, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 1874, + "startColumn": 2, + "charOffset": 55436, + "charLength": 8, + "snippet": { + "text": "\tstd::vector listedItems;\n\n\tuint16_t size = msg.get();\n\tlistedItems.reserve(size);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1ca5aabbf62fb0a84d9f368396fb0b339404d8aa6d3b6c1ffbe7d2ef80935e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1879, + "startColumn": 2, + "charOffset": 55541, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1877, + "startColumn": 2, + "charOffset": 55511, + "charLength": 3, + "snippet": { + "text": "\tlistedItems.reserve(size);\n\n\tfor (int i = 0; i < size; i++) {\n\t\tlistedItems.push_back(msg.get());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "425c6ef452ecec9f9078f8042d7cd315ec23f1b9efa158607e445df0a9faed03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'size' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1879, + "startColumn": 18, + "charOffset": 55557, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1877, + "startColumn": 18, + "charOffset": 55511, + "charLength": 1, + "snippet": { + "text": "\tlistedItems.reserve(size);\n\n\tfor (int i = 0; i < size; i++) {\n\t\tlistedItems.push_back(msg.get());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb399fa0b322a6c4dd8373772e64d6feb88c8cac81acd835687b170936681869" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'channelId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1888, + "startColumn": 11, + "charOffset": 55790, + "charLength": 9, + "snippet": { + "text": "channelId" + } + }, + "contextRegion": { + "startLine": 1886, + "startColumn": 11, + "charOffset": 55706, + "charLength": 9, + "snippet": { + "text": "void ProtocolGame::parseSay(NetworkMessage &msg) {\n\tstd::string receiver;\n\tuint16_t channelId;\n\n\tSpeakClasses type = static_cast(msg.getByte());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4afd3a16d09c0159d8df4d4288536a4d3fb3f4949e5154a515e9e8e357194143" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1890, + "startColumn": 2, + "charOffset": 55803, + "charLength": 12, + "snippet": { + "text": "SpeakClasses" + } + }, + "contextRegion": { + "startLine": 1888, + "startColumn": 2, + "charOffset": 55780, + "charLength": 12, + "snippet": { + "text": "\tuint16_t channelId;\n\n\tSpeakClasses type = static_cast(msg.getByte());\n\tswitch (type) {\n\t\tcase TALKTYPE_PRIVATE_TO:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7c197b35975145f0c3c12ed6327dc85caaf1131f12e2da483de349189ab7787" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1893, + "startColumn": 3, + "charOffset": 55912, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1891, + "startColumn": 3, + "charOffset": 55865, + "charLength": 4, + "snippet": { + "text": "\tswitch (type) {\n\t\tcase TALKTYPE_PRIVATE_TO:\n\t\tcase TALKTYPE_PRIVATE_RED_TO:\n\t\t\treceiver = msg.getString();\n\t\t\tchannelId = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca32dc1583fc3694ecad45fa3dec5e6c90e818b6837c6203ab61d3d8d184ac7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1893, + "startColumn": 3, + "charOffset": 55912, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1891, + "startColumn": 3, + "charOffset": 55865, + "charLength": 4, + "snippet": { + "text": "\tswitch (type) {\n\t\tcase TALKTYPE_PRIVATE_TO:\n\t\tcase TALKTYPE_PRIVATE_RED_TO:\n\t\t\treceiver = msg.getString();\n\t\t\tchannelId = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c434b84ab3d089da1d1d20fcbb0af1a9c94ff1e1b487ab5da6ed26b97c50998" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1899, + "startColumn": 3, + "charOffset": 56031, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1897, + "startColumn": 3, + "charOffset": 56001, + "charLength": 4, + "snippet": { + "text": "\n\t\tcase TALKTYPE_CHANNEL_Y:\n\t\tcase TALKTYPE_CHANNEL_R1:\n\t\t\tchannelId = msg.get();\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cba8027fa9c00bc1aa89d2f81240e6d4cedb887af9e12a03eae5d458d4c86b44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "255 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1909, + "startColumn": 22, + "charOffset": 56211, + "charLength": 3, + "snippet": { + "text": "255" + } + }, + "contextRegion": { + "startLine": 1907, + "startColumn": 22, + "charOffset": 56146, + "charLength": 3, + "snippet": { + "text": "\n\tconst std::string text = msg.getString();\n\tif (text.length() > 255) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1edb7ed3abea479f06c029470145c3e59ebe09685ff609f5906ab26914c69a4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'fightMode' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1922, + "startColumn": 14, + "charOffset": 56716, + "charLength": 9, + "snippet": { + "text": "fightMode" + } + }, + "contextRegion": { + "startLine": 1920, + "startColumn": 14, + "charOffset": 56631, + "charLength": 9, + "snippet": { + "text": "\t// uint8_t rawPvpMode = msg.getByte(); // pvp mode introduced in 10.0\n\n\tFightMode_t fightMode;\n\tif (rawFightMode == 1) {\n\t\tfightMode = FIGHTMODE_ATTACK;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "deba087624840ff87bc8aa8a45b543ae64be44d4f6437e7e8b4dc48fb8a9bdd1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1935, + "startColumn": 2, + "charOffset": 57055, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 1933, + "startColumn": 2, + "charOffset": 56999, + "charLength": 8, + "snippet": { + "text": "\nvoid ProtocolGame::parseAttack(NetworkMessage &msg) {\n\tuint32_t creatureId = msg.get();\n\t// msg.get(); creatureId (same as above)\n\tg_game().playerSetAttackedCreature(player->getID(), creatureId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62cd4a141d321bde5714a6eb50d2f70d3486a4513296b13de27942824b61f93e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1941, + "startColumn": 2, + "charOffset": 57274, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 1939, + "startColumn": 2, + "charOffset": 57218, + "charLength": 8, + "snippet": { + "text": "\nvoid ProtocolGame::parseFollow(NetworkMessage &msg) {\n\tuint32_t creatureId = msg.get();\n\t// msg.get(); creatureId (same as above)\n\tg_game().playerFollowCreature(player->getID(), creatureId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "debc28df8beb4bda20bd035329e8beb35a56fbb6c0c75175255d1085725608dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1947, + "startColumn": 2, + "charOffset": 57492, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 1945, + "startColumn": 2, + "charOffset": 57432, + "charLength": 8, + "snippet": { + "text": "\nvoid ProtocolGame::parseTextWindow(NetworkMessage &msg) {\n\tuint32_t windowTextId = msg.get();\n\tconst std::string newText = msg.getString();\n\tg_game().playerWriteItem(player->getID(), windowTextId, newText);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30fedd08b50d1e5ac8381a47f4776a7a4b7237d57146e7c7fe5409c4f78b6e5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1954, + "startColumn": 2, + "charOffset": 57746, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 1952, + "startColumn": 2, + "charOffset": 57653, + "charLength": 8, + "snippet": { + "text": "void ProtocolGame::parseHouseWindow(NetworkMessage &msg) {\n\tuint8_t doorId = msg.getByte();\n\tuint32_t id = msg.get();\n\tconst std::string text = msg.getString();\n\tg_game().playerUpdateHouseWindow(player->getID(), doorId, id, text);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a919ad7e2389c5e41958b5fa309b7089e21235d5aa51c84b7f7a88be75cefc51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1960, + "startColumn": 2, + "charOffset": 57956, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 1958, + "startColumn": 2, + "charOffset": 57896, + "charLength": 8, + "snippet": { + "text": "\nvoid ProtocolGame::parseLookInShop(NetworkMessage &msg) {\n\tuint16_t id = msg.get();\n\tuint8_t count = msg.getByte();\n\tg_game().playerLookInShop(player->getID(), id, count);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf96fda18a80e033b8a0401a56a55ee17a354239e9347a627c925e3dd979e5a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1966, + "startColumn": 2, + "charOffset": 58146, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 1964, + "startColumn": 2, + "charOffset": 58081, + "charLength": 8, + "snippet": { + "text": "\nvoid ProtocolGame::parsePlayerBuyOnShop(NetworkMessage &msg) {\n\tuint16_t id = msg.get();\n\tuint8_t count = msg.getByte();\n\tuint16_t amount = oldProtocol ? static_cast(msg.getByte()) : msg.get();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6bb489cdd04ecc7e064d7c05532ec2c3c3c9b8a7fd292132662c89bdc0a99e60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1975, + "startColumn": 2, + "charOffset": 58537, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 1973, + "startColumn": 2, + "charOffset": 58471, + "charLength": 8, + "snippet": { + "text": "\nvoid ProtocolGame::parsePlayerSellOnShop(NetworkMessage &msg) {\n\tuint16_t id = msg.get();\n\tuint8_t count = std::max(msg.getByte(), (uint8_t)1);\n\tuint16_t amount = oldProtocol ? static_cast(msg.getByte()) : msg.get();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58737cb74f9ba429a0b9f162d65690ba986b9157f196b1a10d3d6e7eb0c31a3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1976, + "startColumn": 42, + "charOffset": 58613, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1974, + "startColumn": 42, + "charOffset": 58472, + "charLength": 1, + "snippet": { + "text": "void ProtocolGame::parsePlayerSellOnShop(NetworkMessage &msg) {\n\tuint16_t id = msg.get();\n\tuint8_t count = std::max(msg.getByte(), (uint8_t)1);\n\tuint16_t amount = oldProtocol ? static_cast(msg.getByte()) : msg.get();\n\tbool ignoreEquipped = msg.getByte() != 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f483598e970c97340de457a3854b96dc7d7aad358bd9d1473b3947cf85a9cc4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1985, + "startColumn": 2, + "charOffset": 58940, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 1983, + "startColumn": 2, + "charOffset": 58844, + "charLength": 8, + "snippet": { + "text": "void ProtocolGame::parseRequestTrade(NetworkMessage &msg) {\n\tPosition pos = msg.getPosition();\n\tuint16_t itemId = msg.get();\n\tuint8_t stackpos = msg.getByte();\n\tuint32_t playerId = msg.get();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cfb269d1649cb4c5183f914dc8a89dd4345af3668bdf04623fe35f980219d915" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 1987, + "startColumn": 2, + "charOffset": 59015, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 1985, + "startColumn": 2, + "charOffset": 58939, + "charLength": 8, + "snippet": { + "text": "\tuint16_t itemId = msg.get();\n\tuint8_t stackpos = msg.getByte();\n\tuint32_t playerId = msg.get();\n\tg_game().playerRequestTrade(player->getID(), pos, stackpos, playerId, itemId);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83a3f8e5bef1631bc6680ba1b2cb22c75e02462ca4b5423aef6097d450cc1fa6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2003, + "startColumn": 2, + "charOffset": 59558, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 2001, + "startColumn": 2, + "charOffset": 59499, + "charLength": 8, + "snippet": { + "text": "\nvoid ProtocolGame::parseRemoveVip(NetworkMessage &msg) {\n\tuint32_t guid = msg.get();\n\tg_game().playerRequestRemoveVip(player->getID(), guid);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea5f9ca22d6a13b9002ab94b76ea6d9fe8ca43d0ba633edd2d8c3cbc40066eac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2009, + "startColumn": 2, + "charOffset": 59746, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 2007, + "startColumn": 2, + "charOffset": 59655, + "charLength": 8, + "snippet": { + "text": "void ProtocolGame::parseEditVip(NetworkMessage &msg) {\n\tstd::vector vipGroupsId;\n\tuint32_t guid = msg.get();\n\tconst std::string description = msg.getString();\n\tuint32_t icon = std::min(10, msg.get()); // 10 is max icon in 9.63" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f9c045dc43a1ca0d745f8739360e4e1a8fbce5b8b360f13b324775562893c0e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2011, + "startColumn": 37, + "charOffset": 59869, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 2009, + "startColumn": 37, + "charOffset": 59745, + "charLength": 2, + "snippet": { + "text": "\tuint32_t guid = msg.get();\n\tconst std::string description = msg.getString();\n\tuint32_t icon = std::min(10, msg.get()); // 10 is max icon in 9.63\n\tbool notify = msg.getByte() != 0;\n\tuint8_t groupsAmount = msg.getByte();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3282364403689dbf28b4323f45cc906f6b5b7d51a86eb9a23a812560bf6110dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2014, + "startColumn": 2, + "charOffset": 59996, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2012, + "startColumn": 2, + "charOffset": 59921, + "charLength": 3, + "snippet": { + "text": "\tbool notify = msg.getByte() != 0;\n\tuint8_t groupsAmount = msg.getByte();\n\tfor (uint8_t i = 0; i < groupsAmount; ++i) {\n\t\tuint8_t groupId = msg.getByte();\n\t\tvipGroupsId.emplace_back(groupId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6763f28219687f879acf35b11513c295c404b829585148d9a7765ddc4a639f85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'groupsAmount' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2014, + "startColumn": 22, + "charOffset": 60016, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 2012, + "startColumn": 22, + "charOffset": 59921, + "charLength": 1, + "snippet": { + "text": "\tbool notify = msg.getByte() != 0;\n\tuint8_t groupsAmount = msg.getByte();\n\tfor (uint8_t i = 0; i < groupsAmount; ++i) {\n\t\tuint8_t groupId = msg.getByte();\n\t\tvipGroupsId.emplace_back(groupId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c184b8c9dfc3d7f8f4cfed7d603648f10f775afe991b883dbf0b8bacc70a3aef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2016, + "startColumn": 15, + "charOffset": 60090, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 2014, + "startColumn": 15, + "charOffset": 59995, + "charLength": 12, + "snippet": { + "text": "\tfor (uint8_t i = 0; i < groupsAmount; ++i) {\n\t\tuint8_t groupId = msg.getByte();\n\t\tvipGroupsId.emplace_back(groupId);\n\t}\n\tg_game().playerRequestEditVip(player->getID(), guid, description, icon, notify, vipGroupsId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43e18f6ba86eda18b706090ec391a4c6671c59d0c3f30228c6528b1b0a9e7b88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2049, + "startColumn": 2, + "charOffset": 60862, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 2047, + "startColumn": 2, + "charOffset": 60768, + "charLength": 8, + "snippet": { + "text": "void ProtocolGame::parseRotateItem(NetworkMessage &msg) {\n\tPosition pos = msg.getPosition();\n\tuint16_t itemId = msg.get();\n\tuint8_t stackpos = msg.getByte();\n\tconst auto &itemType = Item::items[itemId];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13dc688c650201d2fd77f52353ba3ae182186a66b9fb51fea25f2ad68ade00af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2061, + "startColumn": 2, + "charOffset": 61259, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 2059, + "startColumn": 2, + "charOffset": 61163, + "charLength": 8, + "snippet": { + "text": "void ProtocolGame::parseWrapableItem(NetworkMessage &msg) {\n\tPosition pos = msg.getPosition();\n\tuint16_t itemId = msg.get();\n\tuint8_t stackpos = msg.getByte();\n\tg_game().playerWrapableItem(player->getID(), pos, stackpos, itemId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2654bbaa5cd5c967c55fae06738a90cb7c64c30840f89516022eb8b82707ee41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2072, + "startColumn": 2, + "charOffset": 61546, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2070, + "startColumn": 2, + "charOffset": 61503, + "charLength": 2, + "snippet": { + "text": "\n\tuint8_t inspectionType = msg.getByte();\n\tif (inspectionType == INSPECT_NORMALOBJECT) {\n\t\tPosition pos = msg.getPosition();\n\t\tg_game().playerInspectItem(player, pos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e69832f0c5ee6ee4d146c443d2172c270edfff91795df49aa4034a5287e7ecb5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2076, + "startColumn": 3, + "charOffset": 61763, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 2074, + "startColumn": 3, + "charOffset": 61628, + "charLength": 8, + "snippet": { + "text": "\t\tg_game().playerInspectItem(player, pos);\n\t} else if (inspectionType == INSPECT_NPCTRADE || inspectionType == INSPECT_CYCLOPEDIA) {\n\t\tuint16_t itemId = msg.get();\n\t\tuint16_t itemCount = msg.getByte();\n\t\tg_game().playerInspectItem(player, itemId, static_cast(itemCount), (inspectionType == INSPECT_CYCLOPEDIA));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f27d6c5c677c7d753e249a8fe953b558ccc90dcbf9d7c1921c159d12261c1b67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2085, + "startColumn": 19, + "charOffset": 62141, + "charLength": 4, + "snippet": { + "text": "0x18" + } + }, + "contextRegion": { + "startLine": 2083, + "startColumn": 19, + "charOffset": 62047, + "charLength": 4, + "snippet": { + "text": "\tif (!oldProtocol) {\n\t\tauto output = OutputMessagePool::getOutputMessage();\n\t\toutput->addByte(0x18);\n\t\toutput->addByte(information);\n\t\tsend(output);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4adec86aa57efb9bb9a0bec59583a74ca4d57023f9dce4ffee22d37765843264" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x18 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2085, + "startColumn": 19, + "charOffset": 62141, + "charLength": 4, + "snippet": { + "text": "0x18" + } + }, + "contextRegion": { + "startLine": 2083, + "startColumn": 19, + "charOffset": 62047, + "charLength": 4, + "snippet": { + "text": "\tif (!oldProtocol) {\n\t\tauto output = OutputMessagePool::getOutputMessage();\n\t\toutput->addByte(0x18);\n\t\toutput->addByte(information);\n\t\tsend(output);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb22df23c748ace727a554a7d1d99b29f62660941319df22e1ee7f63aa15fac4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'sendItemInspection' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2092, + "startColumn": 39, + "charOffset": 62255, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 2090, + "startColumn": 39, + "charOffset": 62214, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendItemInspection(uint16_t itemId, uint8_t itemCount, std::shared_ptr item, bool cyclopedia) {\n\tif (oldProtocol) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e94db6f21949a047feb525e1af5e0e6d5579c31031b6ba46e0de961ee425f70a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2092, + "startColumn": 97, + "charOffset": 62313, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 2090, + "startColumn": 97, + "charOffset": 62214, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendItemInspection(uint16_t itemId, uint8_t itemCount, std::shared_ptr item, bool cyclopedia) {\n\tif (oldProtocol) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1f32039896e7508df51cd2e44cc536d4772e12113452ec68a592bb8e1bd57c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2098, + "startColumn": 14, + "charOffset": 62406, + "charLength": 4, + "snippet": { + "text": "0x76" + } + }, + "contextRegion": { + "startLine": 2096, + "startColumn": 14, + "charOffset": 62371, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x76);\n\tmsg.addByte(0x00);\n\tmsg.addByte(cyclopedia ? 0x01 : 0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6b36031f811402115d9e220d36d3f7b9bd6b524ec3bae044dfd3bbd96d0e9ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x76 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2098, + "startColumn": 14, + "charOffset": 62406, + "charLength": 4, + "snippet": { + "text": "0x76" + } + }, + "contextRegion": { + "startLine": 2096, + "startColumn": 14, + "charOffset": 62371, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x76);\n\tmsg.addByte(0x00);\n\tmsg.addByte(cyclopedia ? 0x01 : 0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd521014fef0aff79c57336f940681ecc1e83752c2dbcfc950c61995c49dfbbb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2099, + "startColumn": 14, + "charOffset": 62426, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 2097, + "startColumn": 14, + "charOffset": 62372, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\tmsg.addByte(0x76);\n\tmsg.addByte(0x00);\n\tmsg.addByte(cyclopedia ? 0x01 : 0x00);\n\tmsg.add(player->getID()); // 13.00 Creature ID" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d53820f1cc837ecc23b39f09fa338ea7d46abb0297f3f63d88d7bf8205217eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2102, + "startColumn": 14, + "charOffset": 62544, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 2100, + "startColumn": 14, + "charOffset": 62433, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(cyclopedia ? 0x01 : 0x00);\n\tmsg.add(player->getID()); // 13.00 Creature ID\n\tmsg.addByte(0x01);\n\n\tconst ItemType &it = Item::items[itemId];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f5040f5c1634f6206d2dd8f4935319f2f770ce1050f246fb09652119860ee9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2116, + "startColumn": 14, + "charOffset": 62926, + "charLength": 12, + "snippet": { + "text": "descriptions" + } + }, + "contextRegion": { + "startLine": 2114, + "startColumn": 14, + "charOffset": 62858, + "charLength": 12, + "snippet": { + "text": "\n\tauto descriptions = Item::getDescriptions(it, item);\n\tmsg.addByte(descriptions.size());\n\tfor (const auto &description : descriptions) {\n\t\tmsg.addString(description.first, \"ProtocolGame::sendItemInspection - description.first\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa4a5e0398a21c63ef0b1b8489c93d267ddb93335424421b6dfaf5bc88066431" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2117, + "startColumn": 2, + "charOffset": 62949, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2115, + "startColumn": 2, + "charOffset": 62859, + "charLength": 3, + "snippet": { + "text": "\tauto descriptions = Item::getDescriptions(it, item);\n\tmsg.addByte(descriptions.size());\n\tfor (const auto &description : descriptions) {\n\t\tmsg.addString(description.first, \"ProtocolGame::sendItemInspection - description.first\");\n\t\tmsg.addString(description.second, \"ProtocolGame::sendItemInspection - description.second\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d110d059f07637db565983f4b8eb3ae8c0fedfd498baee2bd0fa69c8f27523a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x0E is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2126, + "startColumn": 15, + "charOffset": 63327, + "charLength": 4, + "snippet": { + "text": "0x0E" + } + }, + "contextRegion": { + "startLine": 2124, + "startColumn": 15, + "charOffset": 63215, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::parseFriendSystemAction(NetworkMessage &msg) {\n\tuint8_t state = msg.getByte();\n\tif (state == 0x0E) {\n\t\tuint8_t titleId = msg.getByte();\n\t\tg_game().playerFriendSystemAction(player, state, titleId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d7e5d5ab89811ff8d62390d8668a3b2e79ef4fae80eebc839325a397ce04adb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'characterID' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2137, + "startColumn": 11, + "charOffset": 63552, + "charLength": 11, + "snippet": { + "text": "characterID" + } + }, + "contextRegion": { + "startLine": 2135, + "startColumn": 11, + "charOffset": 63538, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\tuint32_t characterID;\n\tCyclopediaCharacterInfoType_t characterInfoType;\n\tcharacterID = msg.get();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05a9d51d270498c50485179cfedb77b132eba881b135bebcac5b8f21a949dc89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'characterInfoType' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2138, + "startColumn": 32, + "charOffset": 63596, + "charLength": 17, + "snippet": { + "text": "characterInfoType" + } + }, + "contextRegion": { + "startLine": 2136, + "startColumn": 32, + "charOffset": 63541, + "charLength": 17, + "snippet": { + "text": "\n\tuint32_t characterID;\n\tCyclopediaCharacterInfoType_t characterInfoType;\n\tcharacterID = msg.get();\n\tcharacterInfoType = static_cast(msg.getByte());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86b26de98328a2bd165ee5c033cc2b397e4a20e90126ceb6d29c7c827937c036" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2141, + "startColumn": 2, + "charOffset": 63732, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 2139, + "startColumn": 2, + "charOffset": 63615, + "charLength": 8, + "snippet": { + "text": "\tcharacterID = msg.get();\n\tcharacterInfoType = static_cast(msg.getByte());\n\tuint16_t entriesPerPage = 0, page = 0;\n\tif (characterInfoType == CYCLOPEDIA_CHARACTERINFO_RECENTDEATHS || characterInfoType == CYCLOPEDIA_CHARACTERINFO_RECENTPVPKILLS) {\n\t\tentriesPerPage = std::min(30, std::max(5, msg.get()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5f9d0ff82214fad563f0391c1f78712e5887073d170868629466558d5703e4b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2141, + "startColumn": 2, + "charOffset": 63732, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 2139, + "startColumn": 2, + "charOffset": 63615, + "charLength": 8, + "snippet": { + "text": "\tcharacterID = msg.get();\n\tcharacterInfoType = static_cast(msg.getByte());\n\tuint16_t entriesPerPage = 0, page = 0;\n\tif (characterInfoType == CYCLOPEDIA_CHARACTERINFO_RECENTDEATHS || characterInfoType == CYCLOPEDIA_CHARACTERINFO_RECENTPVPKILLS) {\n\t\tentriesPerPage = std::min(30, std::max(5, msg.get()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c635b61eeadfca86f265bf47494dcd13da3bec34b3bfe22c5ecbf0511c355ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2143, + "startColumn": 39, + "charOffset": 63940, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 2141, + "startColumn": 39, + "charOffset": 63731, + "charLength": 2, + "snippet": { + "text": "\tuint16_t entriesPerPage = 0, page = 0;\n\tif (characterInfoType == CYCLOPEDIA_CHARACTERINFO_RECENTDEATHS || characterInfoType == CYCLOPEDIA_CHARACTERINFO_RECENTPVPKILLS) {\n\t\tentriesPerPage = std::min(30, std::max(5, msg.get()));\n\t\tpage = std::max(1, msg.get());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4596b08956f4a82c6529b6df0862d6288e478a7b27518716ee4052dd70ab17e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2143, + "startColumn": 62, + "charOffset": 63963, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2141, + "startColumn": 62, + "charOffset": 63731, + "charLength": 1, + "snippet": { + "text": "\tuint16_t entriesPerPage = 0, page = 0;\n\tif (characterInfoType == CYCLOPEDIA_CHARACTERINFO_RECENTDEATHS || characterInfoType == CYCLOPEDIA_CHARACTERINFO_RECENTPVPKILLS) {\n\t\tentriesPerPage = std::min(30, std::max(5, msg.get()));\n\t\tpage = std::max(1, msg.get());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe1de3f096d35254bdb47076a50b420e85f596ddcada16b04ad216f36a18654e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2157, + "startColumn": 2, + "charOffset": 64307, + "charLength": 15, + "snippet": { + "text": "HighscoreType_t" + } + }, + "contextRegion": { + "startLine": 2155, + "startColumn": 2, + "charOffset": 64302, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tHighscoreType_t type = static_cast(msg.getByte());\n\tuint8_t category = msg.getByte();\n\tuint32_t vocation = msg.get();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40404777c283ea26e2348470cc1ff8c41c21d3b386b03ce91199ac0cde5a5bf3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2159, + "startColumn": 2, + "charOffset": 64411, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 2157, + "startColumn": 2, + "charOffset": 64306, + "charLength": 8, + "snippet": { + "text": "\tHighscoreType_t type = static_cast(msg.getByte());\n\tuint8_t category = msg.getByte();\n\tuint32_t vocation = msg.get();\n\tuint16_t page = 1;\n\tconst std::string worldName = msg.getString();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b442848d0a04487d7f94e37421a705e00570c28f23a87b2c9fd3fe14a2654ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2162, + "startColumn": 6, + "charOffset": 64525, + "charLength": 7, + "snippet": { + "text": "getByte" + } + }, + "contextRegion": { + "startLine": 2160, + "startColumn": 6, + "charOffset": 64452, + "charLength": 7, + "snippet": { + "text": "\tuint16_t page = 1;\n\tconst std::string worldName = msg.getString();\n\tmsg.getByte(); // Game World Category\n\tmsg.getByte(); // BattlEye World Type\n\tif (type == HIGHSCORE_GETENTRIES) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4cd6312798bd188a7a3c817dc980f02f27b76761c80e3ef803088061212603f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2163, + "startColumn": 6, + "charOffset": 64564, + "charLength": 7, + "snippet": { + "text": "getByte" + } + }, + "contextRegion": { + "startLine": 2161, + "startColumn": 6, + "charOffset": 64472, + "charLength": 7, + "snippet": { + "text": "\tconst std::string worldName = msg.getString();\n\tmsg.getByte(); // Game World Category\n\tmsg.getByte(); // BattlEye World Type\n\tif (type == HIGHSCORE_GETENTRIES) {\n\t\tpage = std::max(1, msg.get());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b50c4324a5227fc5a282cd1cf9d93b601ed40924b6c9af1b467312108bb74b6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2167, + "startColumn": 45, + "charOffset": 64735, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 2165, + "startColumn": 45, + "charOffset": 64635, + "charLength": 2, + "snippet": { + "text": "\t\tpage = std::max(1, msg.get());\n\t}\n\tuint8_t entriesPerPage = std::min(30, std::max(5, msg.getByte()));\n\tg_game().playerHighscores(player, type, category, vocation, worldName, page, entriesPerPage);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5782a6780ed7c2e29427095a3ab4a1c161de0d978a699c860dbce9a18744d27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2167, + "startColumn": 67, + "charOffset": 64757, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2165, + "startColumn": 67, + "charOffset": 64635, + "charLength": 1, + "snippet": { + "text": "\t\tpage = std::max(1, msg.get());\n\t}\n\tuint8_t entriesPerPage = std::min(30, std::max(5, msg.getByte()));\n\tg_game().playerHighscores(player, type, category, vocation, worldName, page, entriesPerPage);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e9588cd4c0a607bab3dbecde802559f98626065300f7e3819ade530e71113d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2179, + "startColumn": 2, + "charOffset": 65075, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 2177, + "startColumn": 2, + "charOffset": 65005, + "charLength": 8, + "snippet": { + "text": "\tuint8_t action = msg.getByte();\n\tbool upgrade = msg.getByte() != 0;\n\tuint16_t raceId = msg.get();\n\n\tif (!g_configManager().getBoolean(TASK_HUNTING_ENABLED, __FUNCTION__)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "edd6c0f7f72c7e089065668ea7ccaab703d1aad91fba0e7a889f6737c81c707a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2194, + "startColumn": 14, + "charOffset": 65401, + "charLength": 4, + "snippet": { + "text": "0xB1" + } + }, + "contextRegion": { + "startLine": 2192, + "startColumn": 14, + "charOffset": 65366, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xB1);\n\tmsg.addByte(0x01); // No data available\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "530a28c04e2e54ddb364e68096184f937fa5055481c156068f40fdaa6c7e0729" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xB1 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2194, + "startColumn": 14, + "charOffset": 65401, + "charLength": 4, + "snippet": { + "text": "0xB1" + } + }, + "contextRegion": { + "startLine": 2192, + "startColumn": 14, + "charOffset": 65366, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xB1);\n\tmsg.addByte(0x01); // No data available\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab34f1441f2e8734a3714ddd04da5f6f29b54b6c45ce5074ff16422f1928b8a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2195, + "startColumn": 14, + "charOffset": 65421, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 2193, + "startColumn": 14, + "charOffset": 65367, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\tmsg.addByte(0xB1);\n\tmsg.addByte(0x01); // No data available\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "056210b1e9c2ae7ef209b2b088f2ade9ed08fc5c36ba689e8075b8d95e828e8b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "3 adjacent parameters of 'sendHighscores' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2199, + "startColumn": 86, + "charOffset": 65564, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 2197, + "startColumn": 86, + "charOffset": 65476, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendHighscores(const std::vector &characters, uint8_t categoryId, uint32_t vocationId, uint16_t page, uint16_t pages, uint32_t updateTimer) {\n\tif (oldProtocol) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9992d787e034ffa0c02380e046ce545f014190c31a6dfc3fb81ce6553e5a4949" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'sendHighscores' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2199, + "startColumn": 142, + "charOffset": 65620, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 2197, + "startColumn": 142, + "charOffset": 65476, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendHighscores(const std::vector &characters, uint8_t categoryId, uint32_t vocationId, uint16_t page, uint16_t pages, uint32_t updateTimer) {\n\tif (oldProtocol) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "695f712dc9caedd540bee2f6174a30d1dccda0383e4675c03915ab00d65e110b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2205, + "startColumn": 14, + "charOffset": 65728, + "charLength": 4, + "snippet": { + "text": "0xB1" + } + }, + "contextRegion": { + "startLine": 2203, + "startColumn": 14, + "charOffset": 65693, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xB1);\n\tmsg.addByte(0x00); // All data available\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37c34e050a1950b7f22a2a0d3ee5d6f383f9c2ff7035c0384793c4cd9c9c296d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xB1 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2205, + "startColumn": 14, + "charOffset": 65728, + "charLength": 4, + "snippet": { + "text": "0xB1" + } + }, + "contextRegion": { + "startLine": 2203, + "startColumn": 14, + "charOffset": 65693, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xB1);\n\tmsg.addByte(0x00); // All data available\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2e3d10592b178691c9d0fbe7510eab5493db1b2701e42f5ba9714c41d37c756" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2206, + "startColumn": 14, + "charOffset": 65748, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 2204, + "startColumn": 14, + "charOffset": 65694, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\tmsg.addByte(0xB1);\n\tmsg.addByte(0x00); // All data available\n\n\tmsg.addByte(1); // Worlds" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "adf9db70c03a5e18f96106e8e350b0ec1f00e09f36752d1c05909e5e1184ef24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFFFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2220, + "startColumn": 20, + "charOffset": 66359, + "charLength": 10, + "snippet": { + "text": "0xFFFFFFFF" + } + }, + "contextRegion": { + "startLine": 2218, + "startColumn": 20, + "charOffset": 66302, + "charLength": 10, + "snippet": { + "text": "\n\tmsg.skipBytes(1); // Vocation Count\n\tmsg.add(0xFFFFFFFF); // All Vocations - hardcoded\n\tmsg.addString(\"(all)\", \"ProtocolGame::sendHighscores - (all)\"); // All Vocations - hardcoded\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db623c22807e62fca89a9f9b84a18f4f03d970cb6cdf371feca69da2a6e52e8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFFFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2223, + "startColumn": 30, + "charOffset": 66525, + "charLength": 10, + "snippet": { + "text": "0xFFFFFFFF" + } + }, + "contextRegion": { + "startLine": 2221, + "startColumn": 30, + "charOffset": 66401, + "charLength": 10, + "snippet": { + "text": "\tmsg.addString(\"(all)\", \"ProtocolGame::sendHighscores - (all)\"); // All Vocations - hardcoded\n\n\tuint32_t selectedVocation = 0xFFFFFFFF;\n\tconst auto vocationsMap = g_vocations().getVocations();\n\tfor (const auto &it : vocationsMap) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d73f75bf9e1be8a2a32e1d6887cab4ecd8775cac48c8d2aa8d569d64a734c087" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2225, + "startColumn": 2, + "charOffset": 66595, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2223, + "startColumn": 2, + "charOffset": 66496, + "charLength": 3, + "snippet": { + "text": "\tuint32_t selectedVocation = 0xFFFFFFFF;\n\tconst auto vocationsMap = g_vocations().getVocations();\n\tfor (const auto &it : vocationsMap) {\n\t\tconst auto &vocation = it.second;\n\t\tif (vocation->getFromVocation() == static_cast(vocation->getId())) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8dd42ee246d9455d328511b41e9dcc906534dc1c2dd2daef6e35e863bdbbd597" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2240, + "startColumn": 14, + "charOffset": 67220, + "charLength": 19, + "snippet": { + "text": "highscoreCategories" + } + }, + "contextRegion": { + "startLine": 2238, + "startColumn": 14, + "charOffset": 67106, + "charLength": 19, + "snippet": { + "text": "\tuint8_t selectedCategory = 0;\n\tconst auto &highscoreCategories = g_game().getHighscoreCategories();\n\tmsg.addByte(highscoreCategories.size()); // Category Count\n\tg_logger().debug(\"[ProtocolGame::sendHighscores] - Category Count: {}\", highscoreCategories.size());\n\tfor (const HighscoreCategory &category : highscoreCategories) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6eb4a0f4c2add4c841d2bc244a4c8b81c65b56511356766e8d82ba8aa4bd9c90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2242, + "startColumn": 2, + "charOffset": 67370, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2240, + "startColumn": 2, + "charOffset": 67207, + "charLength": 3, + "snippet": { + "text": "\tmsg.addByte(highscoreCategories.size()); // Category Count\n\tg_logger().debug(\"[ProtocolGame::sendHighscores] - Category Count: {}\", highscoreCategories.size());\n\tfor (const HighscoreCategory &category : highscoreCategories) {\n\t\tg_logger().debug(\"[ProtocolGame::sendHighscores] - Category: {} - Name: {}\", category.m_id, category.m_name);\n\t\tmsg.addByte(category.m_id); // Category Id" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "547d29f121b01bf834f7093edd6b1c5d2a103f1541f135b9f0df088abb723e2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2255, + "startColumn": 14, + "charOffset": 67914, + "charLength": 10, + "snippet": { + "text": "characters" + } + }, + "contextRegion": { + "startLine": 2253, + "startColumn": 14, + "charOffset": 67864, + "charLength": 10, + "snippet": { + "text": "\tmsg.add(pages); // Pages\n\n\tmsg.addByte(characters.size()); // Character Count\n\tfor (const HighscoreCharacter &character : characters) {\n\t\tmsg.add(character.rank); // Rank" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15cd6e595c48e22ec48082b67a9e2f5e7936e755419e1c6542caca09b56ccc75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2256, + "startColumn": 2, + "charOffset": 67954, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2254, + "startColumn": 2, + "charOffset": 67900, + "charLength": 3, + "snippet": { + "text": "\n\tmsg.addByte(characters.size()); // Character Count\n\tfor (const HighscoreCharacter &character : characters) {\n\t\tmsg.add(character.rank); // Rank\n\t\tmsg.addString(character.name, \"ProtocolGame::sendHighscores - character.name\"); // Character Name" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aebdc80da2f27cf1b4f2c7f6c0ee9dcc3700d6e3e952b04edd89b3a25b74801d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2263, + "startColumn": 15, + "charOffset": 68505, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 2261, + "startColumn": 15, + "charOffset": 68331, + "charLength": 1, + "snippet": { + "text": "\t\tmsg.addString(serverName, \"ProtocolGame::sendHighscores - g_configManager().getString(SERVER_NAME)\"); // World\n\t\tmsg.add(character.level); // Level\n\t\tmsg.addByte((player->getGUID() == character.id)); // Player Indicator Boolean\n\t\tmsg.add(character.points); // Points\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d623ff49e3e094e1255a6a2b970e25fb121bc8b6acf5e9729d08116720b3b90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2267, + "startColumn": 14, + "charOffset": 68637, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 2265, + "startColumn": 14, + "charOffset": 68620, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tmsg.addByte(0xFF); // ??\n\tmsg.addByte(0); // ??\n\tmsg.addByte(1); // ??" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86a1ab6824eb95d73753cbd3f3b5b2bc306517f7fb41c8ed92713f98fb4a628a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2267, + "startColumn": 14, + "charOffset": 68637, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 2265, + "startColumn": 14, + "charOffset": 68620, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tmsg.addByte(0xFF); // ??\n\tmsg.addByte(0); // ??\n\tmsg.addByte(1); // ??" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ab16dd4fb2ef59eac7a901c1e6a879096f59ef225418aacfca504c82c293289" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2282, + "startColumn": 2, + "charOffset": 68981, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 2280, + "startColumn": 2, + "charOffset": 68944, + "charLength": 8, + "snippet": { + "text": "\n\tPosition pos = msg.getPosition();\n\tuint16_t itemId = msg.get();\n\tuint8_t stackpos = msg.getByte();\n\tg_game().playerConfigureShowOffSocket(player->getID(), pos, stackpos, itemId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "730f4a0b590888cc32e80d5765379a44eb5c4d04186e1d419c508ae3eb36d970" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2293, + "startColumn": 2, + "charOffset": 69405, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2291, + "startColumn": 2, + "charOffset": 69331, + "charLength": 2, + "snippet": { + "text": "\tconst std::string &comment = msg.getString();\n\tstd::string translation;\n\tif (reportType == REPORT_TYPE_NAME) {\n\t\ttranslation = msg.getString();\n\t} else if (reportType == REPORT_TYPE_STATEMENT) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9aab7aab98a92c68b5fcd2510aae2e2ab8a5bb9f7cfbcd3b48b4bbea62b48371" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2297, + "startColumn": 7, + "charOffset": 69566, + "charLength": 3, + "snippet": { + "text": "get" + } + }, + "contextRegion": { + "startLine": 2295, + "startColumn": 7, + "charOffset": 69476, + "charLength": 3, + "snippet": { + "text": "\t} else if (reportType == REPORT_TYPE_STATEMENT) {\n\t\ttranslation = msg.getString();\n\t\tmsg.get(); // statement id, used to get whatever player have said, we don't log that.\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ad7b7ecfbbf9ea3fc6d30c90a9539583d7c0e4c2e3d9ebcc5c998639afd00fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2309, + "startColumn": 14, + "charOffset": 69899, + "charLength": 4, + "snippet": { + "text": "0xd5" + } + }, + "contextRegion": { + "startLine": 2307, + "startColumn": 14, + "charOffset": 69864, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xd5);\n\tmsg.add(BESTY_RACE_LAST);\n\tstd::map mtype_list = g_game().getBestiaryList();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0d1e7c57b328d75c1e722eeafc3370764ff8cd48c85bfe744132b829bc85376" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xd5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2309, + "startColumn": 14, + "charOffset": 69899, + "charLength": 4, + "snippet": { + "text": "0xd5" + } + }, + "contextRegion": { + "startLine": 2307, + "startColumn": 14, + "charOffset": 69864, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xd5);\n\tmsg.add(BESTY_RACE_LAST);\n\tstd::map mtype_list = g_game().getBestiaryList();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e52eeaa0be7fafd67a5ee0418e66ecd2aa4e4c193f95e1b1639ee1359083abd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-redundant-string-init", + "ruleIndex": 725, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2313, + "startColumn": 15, + "charOffset": 70096, + "charLength": 9, + "snippet": { + "text": "BestClass" + } + }, + "contextRegion": { + "startLine": 2311, + "startColumn": 15, + "charOffset": 69943, + "charLength": 9, + "snippet": { + "text": "\tstd::map mtype_list = g_game().getBestiaryList();\n\tfor (uint8_t i = BESTY_RACE_FIRST; i <= BESTY_RACE_LAST; i++) {\n\t\tstd::string BestClass = \"\";\n\t\tuint16_t count = 0;\n\t\tfor (const auto &rit : mtype_list) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e66221ab32e2fd0695871599aa03218ef2f055154d7f0e0e029628f6f1fede25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2315, + "startColumn": 3, + "charOffset": 70136, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2313, + "startColumn": 3, + "charOffset": 70082, + "charLength": 3, + "snippet": { + "text": "\t\tstd::string BestClass = \"\";\n\t\tuint16_t count = 0;\n\t\tfor (const auto &rit : mtype_list) {\n\t\t\tconst auto mtype = g_monsters().getMonsterType(rit.second);\n\t\t\tif (!mtype) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "542ef67ef1ee59ee87e24943304525e9d55905c0ea0be9a35834199fa8efc9ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2317, + "startColumn": 8, + "charOffset": 70243, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2315, + "startColumn": 8, + "charOffset": 70134, + "charLength": 1, + "snippet": { + "text": "\t\tfor (const auto &rit : mtype_list) {\n\t\t\tconst auto mtype = g_monsters().getMonsterType(rit.second);\n\t\t\tif (!mtype) {\n\t\t\t\treturn;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fb93b7735435bed975903351e5e0aeaad6fa98572ddf24f4a2e2c8e1dd2ee63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2341, + "startColumn": 14, + "charOffset": 70854, + "charLength": 4, + "snippet": { + "text": "0xd9" + } + }, + "contextRegion": { + "startLine": 2339, + "startColumn": 14, + "charOffset": 70819, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xd9);\n\tmsg.add(raceid);\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6b36031f811402115d9e220d36d3f7b9bd6b524ec3bae044dfd3bbd96d0e9ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xd9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2341, + "startColumn": 14, + "charOffset": 70854, + "charLength": 4, + "snippet": { + "text": "0xd9" + } + }, + "contextRegion": { + "startLine": 2339, + "startColumn": 14, + "charOffset": 70819, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xd9);\n\tmsg.add(raceid);\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c901edfa98a8b8dfec804172da1e98ad1f0a2bc0ef8104cc01727bc903e6187" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'parseBestiarysendMonsterData' has cognitive complexity of 34 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2346, + "startColumn": 20, + "charOffset": 70938, + "charLength": 28, + "snippet": { + "text": "parseBestiarysendMonsterData" + } + }, + "contextRegion": { + "startLine": 2344, + "startColumn": 20, + "charOffset": 70916, + "charLength": 28, + "snippet": { + "text": "}\n\nvoid ProtocolGame::parseBestiarysendMonsterData(NetworkMessage &msg) {\n\tif (oldProtocol) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ca71d4f23f15f910df6d3d6bd4a8c703194a2633a0f36624fbb0858bb19a84c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2351, + "startColumn": 2, + "charOffset": 71025, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 2349, + "startColumn": 2, + "charOffset": 71020, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tuint16_t raceId = msg.get();\n\tstd::string Class = \"\";\n\tstd::shared_ptr mtype = nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b883415b93a771782091d53d4830f46ab1b63ba5b82499fef98d9330fc39f07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-redundant-string-init", + "ruleIndex": 725, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2352, + "startColumn": 14, + "charOffset": 71077, + "charLength": 5, + "snippet": { + "text": "Class" + } + }, + "contextRegion": { + "startLine": 2350, + "startColumn": 14, + "charOffset": 71023, + "charLength": 5, + "snippet": { + "text": "\n\tuint16_t raceId = msg.get();\n\tstd::string Class = \"\";\n\tstd::shared_ptr mtype = nullptr;\n\tstd::map mtype_list = g_game().getBestiaryList();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6538c9755f3e266744b5432f2994649b798851f47a42d5df5de978b63f53c3d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2365, + "startColumn": 6, + "charOffset": 71421, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2363, + "startColumn": 6, + "charOffset": 71412, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!mtype) {\n\t\tg_logger().warn(\"[ProtocolGame::parseBestiarysendMonsterData] - \"\n\t\t \"MonsterType was not found\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25de5d7915493a3f82f97593c3b3b3c436d8f43148533d768b7583dd0ed9de51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2375, + "startColumn": 17, + "charOffset": 71738, + "charLength": 4, + "snippet": { + "text": "0xd7" + } + }, + "contextRegion": { + "startLine": 2373, + "startColumn": 17, + "charOffset": 71697, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage newmsg;\n\tnewmsg.addByte(0xd7);\n\tnewmsg.add(raceId);\n\tnewmsg.addString(Class, \"ProtocolGame::parseBestiarysendMonsterData - Class\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "529e2b10fc92df70d7d619c6ccabb1b9b90a1324880c79eee2ba8dfece2c448c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xd7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2375, + "startColumn": 17, + "charOffset": 71738, + "charLength": 4, + "snippet": { + "text": "0xd7" + } + }, + "contextRegion": { + "startLine": 2373, + "startColumn": 17, + "charOffset": 71697, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage newmsg;\n\tnewmsg.addByte(0xd7);\n\tnewmsg.add(raceId);\n\tnewmsg.addString(Class, \"ProtocolGame::parseBestiarysendMonsterData - Class\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ec6acde59e3fc4bd5195dba8f6cc6651e81070d3cfa5644c0443f5d029ee962" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2394, + "startColumn": 17, + "charOffset": 72363, + "charLength": 8, + "snippet": { + "text": "lootList" + } + }, + "contextRegion": { + "startLine": 2392, + "startColumn": 17, + "charOffset": 72288, + "charLength": 8, + "snippet": { + "text": "\n\tstd::vector lootList = mtype->info.lootItems;\n\tnewmsg.addByte(lootList.size());\n\tfor (const LootBlock &loot : lootList) {\n\t\tint8_t difficult = g_iobestiary().calculateDifficult(loot.chance);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8bbd78de407b802f4bd6d37cb514be5b00aec693c9bfe88c5a746edb35929b91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2395, + "startColumn": 2, + "charOffset": 72382, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2393, + "startColumn": 2, + "charOffset": 72289, + "charLength": 3, + "snippet": { + "text": "\tstd::vector lootList = mtype->info.lootItems;\n\tnewmsg.addByte(lootList.size());\n\tfor (const LootBlock &loot : lootList) {\n\t\tint8_t difficult = g_iobestiary().calculateDifficult(loot.chance);\n\t\tbool shouldAddItem = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68d642cbc0f9197cc2ee32a97e4d16dd2eaa83f3504dfde8552dc38b06074b8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-switch-missing-default-case", + "ruleIndex": 104, + "kind": "fail", + "level": "warning", + "message": { + "text": "switching on non-enum value without default case may not cover all cases" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2399, + "startColumn": 3, + "charOffset": 72525, + "charLength": 6, + "snippet": { + "text": "switch" + } + }, + "contextRegion": { + "startLine": 2397, + "startColumn": 3, + "charOffset": 72492, + "charLength": 6, + "snippet": { + "text": "\t\tbool shouldAddItem = false;\n\n\t\tswitch (currentLevel) {\n\t\t\tcase 1:\n\t\t\t\tshouldAddItem = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f438611deb495c99c2cc3ece8770afb57aaeafe8da1ee9ae3be90e4aa5c6bb5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-6", + "ruleIndex": 453, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-6: The final clause of a switch statement shall be the default-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2399, + "startColumn": 3, + "charOffset": 72525, + "charLength": 6, + "snippet": { + "text": "switch" + } + }, + "contextRegion": { + "startLine": 2397, + "startColumn": 3, + "charOffset": 72492, + "charLength": 6, + "snippet": { + "text": "\t\tbool shouldAddItem = false;\n\n\t\tswitch (currentLevel) {\n\t\t\tcase 1:\n\t\t\t\tshouldAddItem = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e36310b8f058751e36adb8eb727aa6ea8a5350c7cc73d44e7d79c23e80630f50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-multiway-paths-covered", + "ruleIndex": 560, + "kind": "fail", + "level": "warning", + "message": { + "text": "potential uncovered code path; add a default label" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2399, + "startColumn": 3, + "charOffset": 72525, + "charLength": 6, + "snippet": { + "text": "switch" + } + }, + "contextRegion": { + "startLine": 2397, + "startColumn": 3, + "charOffset": 72492, + "charLength": 6, + "snippet": { + "text": "\t\tbool shouldAddItem = false;\n\n\t\tswitch (currentLevel) {\n\t\t\tcase 1:\n\t\t\t\tshouldAddItem = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fbf2cda2d2129947ecc884a27d0102312820ea70409e9108c671c5dc2aa2681c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2418, + "startColumn": 24, + "charOffset": 72834, + "charLength": 15, + "snippet": { + "text": "g_configManager" + } + }, + "contextRegion": { + "startLine": 2416, + "startColumn": 24, + "charOffset": 72806, + "charLength": 15, + "snippet": { + "text": "\t\t}\n\n\t\tnewmsg.add(g_configManager().getBoolean(SHOW_LOOTS_IN_BESTIARY, __FUNCTION__) || shouldAddItem == true ? loot.id : 0);\n\t\tnewmsg.addByte(difficult);\n\t\tnewmsg.addByte(0); // 1 if special event - 0 if regular loot (?)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1b8fee31d3689d302d8af40076e8b89e1798163d19f7cc0ac83ee1a0953862d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Expression can be simplified" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2418, + "startColumn": 108, + "charOffset": 72918, + "charLength": 2, + "snippet": { + "text": "==" + } + }, + "contextRegion": { + "startLine": 2416, + "startColumn": 108, + "charOffset": 72806, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tnewmsg.add(g_configManager().getBoolean(SHOW_LOOTS_IN_BESTIARY, __FUNCTION__) || shouldAddItem == true ? loot.id : 0);\n\t\tnewmsg.addByte(difficult);\n\t\tnewmsg.addByte(0); // 1 if special event - 0 if regular loot (?)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae17fa0e9af253cc5a246892662a4c0f899564c92a21060bd68c129403e867d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal supplied to boolean operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2418, + "startColumn": 111, + "charOffset": 72921, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 2416, + "startColumn": 111, + "charOffset": 72806, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tnewmsg.add(g_configManager().getBoolean(SHOW_LOOTS_IN_BESTIARY, __FUNCTION__) || shouldAddItem == true ? loot.id : 0);\n\t\tnewmsg.addByte(difficult);\n\t\tnewmsg.addByte(0); // 1 if special event - 0 if regular loot (?)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "285d19e141fcd57f18aa58a086ae918198494ffb0cd61490dda5003de04ab076" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Expression can be simplified" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2421, + "startColumn": 91, + "charOffset": 73128, + "charLength": 2, + "snippet": { + "text": "==" + } + }, + "contextRegion": { + "startLine": 2419, + "startColumn": 91, + "charOffset": 72942, + "charLength": 2, + "snippet": { + "text": "\t\tnewmsg.addByte(difficult);\n\t\tnewmsg.addByte(0); // 1 if special event - 0 if regular loot (?)\n\t\tif (g_configManager().getBoolean(SHOW_LOOTS_IN_BESTIARY, __FUNCTION__) || shouldAddItem == true) {\n\t\t\tnewmsg.addString(loot.name, \"ProtocolGame::parseBestiarysendMonsterData - loot.name\");\n\t\t\tnewmsg.addByte(loot.countmax > 0 ? 0x1 : 0x0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afd82f1d563b18ec9f0a26cb9e6f685132793f4b42db23c355f0c168915fbbac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal supplied to boolean operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2421, + "startColumn": 94, + "charOffset": 73131, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 2419, + "startColumn": 94, + "charOffset": 72942, + "charLength": 4, + "snippet": { + "text": "\t\tnewmsg.addByte(difficult);\n\t\tnewmsg.addByte(0); // 1 if special event - 0 if regular loot (?)\n\t\tif (g_configManager().getBoolean(SHOW_LOOTS_IN_BESTIARY, __FUNCTION__) || shouldAddItem == true) {\n\t\t\tnewmsg.addString(loot.name, \"ProtocolGame::parseBestiarysendMonsterData - loot.name\");\n\t\t\tnewmsg.addByte(loot.countmax > 0 ? 0x1 : 0x0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4724b915d0e0b9ef2a2c1fd5462cef8b26e4e17074711b982d42a0e15817b2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2430, + "startColumn": 3, + "charOffset": 73397, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2428, + "startColumn": 3, + "charOffset": 73312, + "charLength": 2, + "snippet": { + "text": "\t\tnewmsg.add(mtype->info.bestiaryCharmsPoints);\n\t\tint8_t attackmode = 0;\n\t\tif (!mtype->info.isHostile) {\n\t\t\tattackmode = 2;\n\t\t} else if (mtype->info.targetDistance) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aae650c04fd4674267c3394fbe0fe106642fa84aab0a8d0192d5636abe451bbb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2432, + "startColumn": 14, + "charOffset": 73459, + "charLength": 5, + "snippet": { + "text": "mtype" + } + }, + "contextRegion": { + "startLine": 2430, + "startColumn": 14, + "charOffset": 73395, + "charLength": 5, + "snippet": { + "text": "\t\tif (!mtype->info.isHostile) {\n\t\t\tattackmode = 2;\n\t\t} else if (mtype->info.targetDistance) {\n\t\t\tattackmode = 1;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da5dff3b99e2af77b91887e3254f4bf64897c0bea0cdc253ad8ece8757876fed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2432, + "startColumn": 14, + "charOffset": 73459, + "charLength": 5, + "snippet": { + "text": "mtype" + } + }, + "contextRegion": { + "startLine": 2430, + "startColumn": 14, + "charOffset": 73395, + "charLength": 5, + "snippet": { + "text": "\t\tif (!mtype->info.isHostile) {\n\t\t\tattackmode = 2;\n\t\t} else if (mtype->info.targetDistance) {\n\t\t\tattackmode = 1;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a660ebec1bb12a30c65a0c12f19f3c819f104c7a294c6f423bc52de1423a7f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2437, + "startColumn": 18, + "charOffset": 73560, + "charLength": 3, + "snippet": { + "text": "0x2" + } + }, + "contextRegion": { + "startLine": 2435, + "startColumn": 18, + "charOffset": 73512, + "charLength": 3, + "snippet": { + "text": "\n\t\tnewmsg.addByte(attackmode);\n\t\tnewmsg.addByte(0x2);\n\t\tnewmsg.add(mtype->info.healthMax);\n\t\tnewmsg.add(mtype->info.experience);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb298535a996ca8bb8541bc755a40a1b691ee0450208e26ca160f78dc669382d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2439, + "startColumn": 24, + "charOffset": 73636, + "charLength": 5, + "snippet": { + "text": "mtype" + } + }, + "contextRegion": { + "startLine": 2437, + "startColumn": 24, + "charOffset": 73543, + "charLength": 5, + "snippet": { + "text": "\t\tnewmsg.addByte(0x2);\n\t\tnewmsg.add(mtype->info.healthMax);\n\t\tnewmsg.add(mtype->info.experience);\n\t\tnewmsg.add(mtype->getBaseSpeed());\n\t\tnewmsg.add(mtype->info.armor);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df0189218f489d52ea7d8f24069934b3432d47a6037629d35fcb3a402c6c365a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2441, + "startColumn": 24, + "charOffset": 73731, + "charLength": 5, + "snippet": { + "text": "mtype" + } + }, + "contextRegion": { + "startLine": 2439, + "startColumn": 24, + "charOffset": 73613, + "charLength": 5, + "snippet": { + "text": "\t\tnewmsg.add(mtype->info.experience);\n\t\tnewmsg.add(mtype->getBaseSpeed());\n\t\tnewmsg.add(mtype->info.armor);\n\t\tnewmsg.addDouble(mtype->info.mitigation);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85460f5dd7610b873983f24966084aa5585ec73da2466cc0ff02cc9cfc727078" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2448, + "startColumn": 18, + "charOffset": 73924, + "charLength": 8, + "snippet": { + "text": "elements" + } + }, + "contextRegion": { + "startLine": 2446, + "startColumn": 18, + "charOffset": 73824, + "charLength": 8, + "snippet": { + "text": "\t\tstd::map elements = g_iobestiary().getMonsterElements(mtype);\n\n\t\tnewmsg.addByte(elements.size());\n\t\tfor (auto it = std::begin(elements), end = std::end(elements); it != end; it++) {\n\t\t\tnewmsg.addByte(it->first);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44d34d715ba7cc1cc66c21e6e30df789fc382fffba0dafd78b034fb5bd9b64f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2449, + "startColumn": 3, + "charOffset": 73944, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2447, + "startColumn": 3, + "charOffset": 73906, + "charLength": 3, + "snippet": { + "text": "\n\t\tnewmsg.addByte(elements.size());\n\t\tfor (auto it = std::begin(elements), end = std::end(elements); it != end; it++) {\n\t\t\tnewmsg.addByte(it->first);\n\t\t\tnewmsg.add(it->second);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7782260d7c9745f34300d641bd8e0b51ea5ace34e769440a3f4af65d1b0749da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2449, + "startColumn": 3, + "charOffset": 73944, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2447, + "startColumn": 3, + "charOffset": 73906, + "charLength": 3, + "snippet": { + "text": "\n\t\tnewmsg.addByte(elements.size());\n\t\tfor (auto it = std::begin(elements), end = std::end(elements); it != end; it++) {\n\t\t\tnewmsg.addByte(it->first);\n\t\t\tnewmsg.add(it->second);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44d3f3020ffcf4a428a532648f3f0ab63d832b8319730c9777f716d539a758f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-loop-convert", + "ruleIndex": 620, + "kind": "fail", + "level": "warning", + "message": { + "text": "use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2449, + "startColumn": 3, + "charOffset": 73944, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2447, + "startColumn": 3, + "charOffset": 73906, + "charLength": 3, + "snippet": { + "text": "\n\t\tnewmsg.addByte(elements.size());\n\t\tfor (auto it = std::begin(elements), end = std::end(elements); it != end; it++) {\n\t\t\tnewmsg.addByte(it->first);\n\t\t\tnewmsg.add(it->second);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb1b55dae6a47005562dd9d64089dd120d9c3d7037a4f58bf7e3113cf57de581" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2449, + "startColumn": 8, + "charOffset": 73949, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 2447, + "startColumn": 8, + "charOffset": 73906, + "charLength": 4, + "snippet": { + "text": "\n\t\tnewmsg.addByte(elements.size());\n\t\tfor (auto it = std::begin(elements), end = std::end(elements); it != end; it++) {\n\t\t\tnewmsg.addByte(it->first);\n\t\t\tnewmsg.add(it->second);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "378a21e72e581ef584b2692d345c028caea872d083487374005b19a809aaba78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2449, + "startColumn": 66, + "charOffset": 74007, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2447, + "startColumn": 66, + "charOffset": 73906, + "charLength": 2, + "snippet": { + "text": "\n\t\tnewmsg.addByte(elements.size());\n\t\tfor (auto it = std::begin(elements), end = std::end(elements); it != end; it++) {\n\t\t\tnewmsg.addByte(it->first);\n\t\t\tnewmsg.add(it->second);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5fc07f79b343d8d020dbbef33368601d569b59de341db6790bb345c1d79e613" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2463, + "startColumn": 46, + "charOffset": 74483, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2461, + "startColumn": 46, + "charOffset": 74388, + "charLength": 3, + "snippet": { + "text": "\t\t\tnewmsg.addByte(1);\n\t\t\tnewmsg.addByte(mType_c);\n\t\t\tnewmsg.add(player->getLevel() * 100);\n\t\t} else {\n\t\t\tnewmsg.addByte(0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af3b43c3d78b01ae25de7e74040caa2bd3e6fc2d6f4d23427497976204f902fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2474, + "startColumn": 2, + "charOffset": 74658, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 2472, + "startColumn": 2, + "charOffset": 74584, + "charLength": 8, + "snippet": { + "text": "\nvoid ProtocolGame::parseCyclopediaMonsterTracker(NetworkMessage &msg) {\n\tuint16_t monsterRaceId = msg.get();\n\t// Bosstiary tracker: 0 = disabled, 1 = enabled\n\t// Bestiary tracker: 1 = enabled" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c782c452ca3196d8b93a762219988ffd267f6273ce42bd37a387a58d0d51999a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2481, + "startColumn": 7, + "charOffset": 74954, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 2479, + "startColumn": 7, + "charOffset": 74829, + "charLength": 6, + "snippet": { + "text": "\t// Bosstiary tracker logic\n\tif (const auto monsterType = g_ioBosstiary().getMonsterTypeByBossRaceId(monsterRaceId)) {\n\t\tif (player->getBestiaryKillCount(monsterRaceId)) {\n\t\t\tif (trackerButtonType == 1) {\n\t\t\t\tplayer->addMonsterToCyclopediaTrackerList(monsterType, true, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85e04964056ceeb139b4cd482acbb8078c8a1289ca773759730e8c1b42aa87a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2481, + "startColumn": 7, + "charOffset": 74954, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 2479, + "startColumn": 7, + "charOffset": 74829, + "charLength": 6, + "snippet": { + "text": "\t// Bosstiary tracker logic\n\tif (const auto monsterType = g_ioBosstiary().getMonsterTypeByBossRaceId(monsterRaceId)) {\n\t\tif (player->getBestiaryKillCount(monsterRaceId)) {\n\t\t\tif (trackerButtonType == 1) {\n\t\t\t\tplayer->addMonsterToCyclopediaTrackerList(monsterType, true, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40bbddca71559578c9bec3b102bb7f85aed0911eb1cc5df162067ede5eda7320" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2496, + "startColumn": 7, + "charOffset": 75458, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2494, + "startColumn": 7, + "charOffset": 75353, + "charLength": 1, + "snippet": { + "text": "\tif (it != bestiaryMonsters.end()) {\n\t\tconst auto mtype = g_monsters().getMonsterType(it->second);\n\t\tif (!mtype) {\n\t\t\tg_logger().error(\"[{}] player {} have wrong boss with race {}\", __FUNCTION__, player->getName(), monsterRaceId);\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cec8d16f68420a7119825507665dc9aca3101cae48e3b51c6439bd0f05977d07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2510, + "startColumn": 6, + "charOffset": 75837, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2508, + "startColumn": 6, + "charOffset": 75789, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendTeamFinderList() {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77442e2c95b87236e152cb1d46b0b864e6c7c090a7e430c98d16abc75873aceb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2515, + "startColumn": 14, + "charOffset": 75911, + "charLength": 4, + "snippet": { + "text": "0x2D" + } + }, + "contextRegion": { + "startLine": 2513, + "startColumn": 14, + "charOffset": 75876, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x2D);\n\tmsg.addByte(0x00); // Bool value, with 'true' the player exceed packets for second.\n\tconst auto &teamFinder = g_game().getTeamFinderList();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "57dfe7c0326683e07d39b09627ed6ccbb46a3b647b1d2577f19c13de0ef7ed3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x2D is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2515, + "startColumn": 14, + "charOffset": 75911, + "charLength": 4, + "snippet": { + "text": "0x2D" + } + }, + "contextRegion": { + "startLine": 2513, + "startColumn": 14, + "charOffset": 75876, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x2D);\n\tmsg.addByte(0x00); // Bool value, with 'true' the player exceed packets for second.\n\tconst auto &teamFinder = g_game().getTeamFinderList();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64ef56771377c558ff675345ff533781d00698621f638cc72d04dc380e8ef669" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2516, + "startColumn": 14, + "charOffset": 75931, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 2514, + "startColumn": 14, + "charOffset": 75877, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\tmsg.addByte(0x2D);\n\tmsg.addByte(0x00); // Bool value, with 'true' the player exceed packets for second.\n\tconst auto &teamFinder = g_game().getTeamFinderList();\n\tmsg.add(teamFinder.size());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "200b429b6a151eebbc20111d9941e7f71a67c23bfbdcade9b382d16ecf826f49" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2518, + "startColumn": 20, + "charOffset": 76078, + "charLength": 10, + "snippet": { + "text": "teamFinder" + } + }, + "contextRegion": { + "startLine": 2516, + "startColumn": 20, + "charOffset": 75918, + "charLength": 10, + "snippet": { + "text": "\tmsg.addByte(0x00); // Bool value, with 'true' the player exceed packets for second.\n\tconst auto &teamFinder = g_game().getTeamFinderList();\n\tmsg.add(teamFinder.size());\n\tfor (const auto &it : teamFinder) {\n\t\tconst auto &leader = g_game().getPlayerByGUID(it.first);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "396f32bf7c5ea5b6ed101f2dc66ab262f09597b231ad16095c87ceee399d61d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2521, + "startColumn": 7, + "charOffset": 76200, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2519, + "startColumn": 7, + "charOffset": 76098, + "charLength": 1, + "snippet": { + "text": "\tfor (const auto &it : teamFinder) {\n\t\tconst auto &leader = g_game().getPlayerByGUID(it.first);\n\t\tif (!leader) {\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f61a99c53229c047642ebabe817f59c962320cdb045b8541baefe2fd834a0355" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2526, + "startColumn": 7, + "charOffset": 76273, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2524, + "startColumn": 7, + "charOffset": 76226, + "charLength": 1, + "snippet": { + "text": "\n\t\tconst auto &teamAssemble = it.second;\n\t\tif (!teamAssemble) {\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07a7d06c2f2eb1c2c61fe3027283298357dad27b766b009d5556e9642de5c40c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2538, + "startColumn": 3, + "charOffset": 76668, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2536, + "startColumn": 3, + "charOffset": 76578, + "charLength": 3, + "snippet": { + "text": "\t\tmsg.addByte(teamAssemble->vocationIDs);\n\t\tmsg.add(teamAssemble->teamSlots);\n\t\tfor (auto itt : teamAssemble->membersMap) {\n\t\t\tstd::shared_ptr member = g_game().getPlayerByGUID(it.first);\n\t\t\tif (member) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f33c0a6f34d09cb8d2fe7d58a0fc4bfb80c5db5318a31eda8d05a4ff102b4b99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2550, + "startColumn": 40, + "charOffset": 76980, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 2548, + "startColumn": 40, + "charOffset": 76932, + "charLength": 1, + "snippet": { + "text": "\t\t\t}\n\t\t}\n\t\tmsg.add(std::max((teamAssemble->teamSlots - teamAssemble->freeSlots), membersSize));\n\t\t// The leader does not count on this math, he is included inside the 'freeSlots'.\n\t\tmsg.add(teamAssemble->timestamp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "086602e2d530dd9ed54cda1babcc1dc3c2fb77996df043d5018b9aca2b6f9f4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2580, + "startColumn": 6, + "charOffset": 77672, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2578, + "startColumn": 6, + "charOffset": 77612, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendLeaderTeamFinder(bool reset) {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d34a2e00b8e69f14662042003f15729b2997f6d05a2a7c64e06e8753ed46e144" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2585, + "startColumn": 6, + "charOffset": 77777, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2583, + "startColumn": 6, + "charOffset": 77711, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto &teamAssemble = g_game().getTeamFinder(player);\n\tif (!teamAssemble) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ffd267036bc696a15cb1e5e9218c8a7ac4f87af31937212b07978f6854a7f9b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2590, + "startColumn": 14, + "charOffset": 77842, + "charLength": 4, + "snippet": { + "text": "0x2C" + } + }, + "contextRegion": { + "startLine": 2588, + "startColumn": 14, + "charOffset": 77807, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x2C);\n\tmsg.addByte(reset ? 1 : 0);\n\tif (reset) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf49689ec6951b0c5e6b6efd44967f8ab3d991027571f93fa92d65e729b79391" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x2C is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2590, + "startColumn": 14, + "charOffset": 77842, + "charLength": 4, + "snippet": { + "text": "0x2C" + } + }, + "contextRegion": { + "startLine": 2588, + "startColumn": 14, + "charOffset": 77807, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x2C);\n\tmsg.addByte(reset ? 1 : 0);\n\tif (reset) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b2d3388b5622005386e4905eda237388dc58291a4d1ff0411c65202db531e82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2625, + "startColumn": 2, + "charOffset": 78613, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2623, + "startColumn": 2, + "charOffset": 78584, + "charLength": 3, + "snippet": { + "text": "\n\tuint16_t membersSize = 1;\n\tfor (auto memberPair : teamAssemble->membersMap) {\n\t\tstd::shared_ptr member = g_game().getPlayerByGUID(memberPair.first);\n\t\tif (member) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6312cffbeb22cfb8328048f84ae93b37ed733f2b247d3e8a4af073ae4e48bffb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2634, + "startColumn": 6, + "charOffset": 78912, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2632, + "startColumn": 6, + "charOffset": 78788, + "charLength": 1, + "snippet": { + "text": "\tmsg.add(membersSize);\n\tstd::shared_ptr leader = g_game().getPlayerByGUID(teamAssemble->leaderGuid);\n\tif (!leader) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f377e42dfdd592eb2f575fcb10ab693286dd3b918fdff0ebdfe82737b07a85d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2640, + "startColumn": 20, + "charOffset": 79088, + "charLength": 6, + "snippet": { + "text": "leader" + } + }, + "contextRegion": { + "startLine": 2638, + "startColumn": 20, + "charOffset": 78937, + "charLength": 6, + "snippet": { + "text": "\tmsg.add(leader->getGUID());\n\tmsg.addString(leader->getName(), \"ProtocolGame::sendLeaderTeamFinder - leader->getName()\");\n\tmsg.add(leader->getLevel());\n\tmsg.addByte(leader->getVocation()->getClientId());\n\tmsg.addByte(3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "abc613621de7a1f54ce0f8738f179ac9cdfd4c501eaa5e25a5523094ddd122ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2644, + "startColumn": 2, + "charOffset": 79180, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2642, + "startColumn": 2, + "charOffset": 79161, + "charLength": 3, + "snippet": { + "text": "\tmsg.addByte(3);\n\n\tfor (auto memberPair : teamAssemble->membersMap) {\n\t\tstd::shared_ptr member = g_game().getPlayerByGUID(memberPair.first);\n\t\tif (!member) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6b14d0d96d286340366ff104d193a69adc6e641e3ea15b076af6d347e012384" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2646, + "startColumn": 7, + "charOffset": 79316, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2644, + "startColumn": 7, + "charOffset": 79179, + "charLength": 1, + "snippet": { + "text": "\tfor (auto memberPair : teamAssemble->membersMap) {\n\t\tstd::shared_ptr member = g_game().getPlayerByGUID(memberPair.first);\n\t\tif (!member) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bae7bd57088ec7db833f390f4557fb84a8db168097dd04dbb98ef60e697912c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2651, + "startColumn": 21, + "charOffset": 79498, + "charLength": 6, + "snippet": { + "text": "member" + } + }, + "contextRegion": { + "startLine": 2649, + "startColumn": 21, + "charOffset": 79344, + "charLength": 6, + "snippet": { + "text": "\t\tmsg.add(member->getGUID());\n\t\tmsg.addString(member->getName(), \"ProtocolGame::sendLeaderTeamFinder - member->getName()\");\n\t\tmsg.add(member->getLevel());\n\t\tmsg.addByte(member->getVocation()->getClientId());\n\t\tmsg.addByte(memberPair.second);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ec5b7a5b4b8ed4a27f23861da76c5c67eb68571ac3e822f5553657ffb489e93" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2660, + "startColumn": 6, + "charOffset": 79710, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2658, + "startColumn": 6, + "charOffset": 79639, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::createLeaderTeamFinder(NetworkMessage &msg) {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40ab2a4cd5e31e5e15ed1d82cac119d8d0982848671ba11453a49d3e9aca3454" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2707, + "startColumn": 3, + "charOffset": 80833, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2705, + "startColumn": 3, + "charOffset": 80756, + "charLength": 3, + "snippet": { + "text": "\tauto party = player->getParty();\n\tif (teamAssemble->partyBool && party) {\n\t\tfor (const std::shared_ptr &member : party->getMembers()) {\n\t\t\tif (member && member->getGUID() != player->getGUID()) {\n\t\t\t\tteamAssemble->membersMap.insert({ member->getGUID(), 3 });" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "195a02ee1445312019f564991055f5095a7d5fad0b97223856653be03f77a0bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2709, + "startColumn": 30, + "charOffset": 80989, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 2707, + "startColumn": 30, + "charOffset": 80831, + "charLength": 6, + "snippet": { + "text": "\t\tfor (const std::shared_ptr &member : party->getMembers()) {\n\t\t\tif (member && member->getGUID() != player->getGUID()) {\n\t\t\t\tteamAssemble->membersMap.insert({ member->getGUID(), 3 });\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "beea51d9b09c9c2267a65c72f7f1fc8aafebda7e2967f7bdc0226a3183a546f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2714, + "startColumn": 29, + "charOffset": 81169, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 2712, + "startColumn": 29, + "charOffset": 81032, + "charLength": 6, + "snippet": { + "text": "\t\tauto partyLeader = party->getLeader();\n\t\tif (partyLeader && partyLeader->getGUID() != player->getGUID()) {\n\t\t\tteamAssemble->membersMap.insert({ partyLeader->getGUID(), 3 });\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6299253ab79a149946cd50a362c50774781dd1f6988625c85a0f27ca6a1f4ac3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2720, + "startColumn": 6, + "charOffset": 81296, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2718, + "startColumn": 6, + "charOffset": 81217, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::parsePartyAnalyzerAction(NetworkMessage &msg) const {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32139b7c2072d682642b68d525d5b126791099707680c1adb66dd2ea67a37d02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2725, + "startColumn": 6, + "charOffset": 81393, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2723, + "startColumn": 6, + "charOffset": 81335, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr party = player->getParty();\n\tif (!party || !party->getLeader() || party->getLeader()->getID() != player->getID()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07a7d06c2f2eb1c2c61fe3027283298357dad27b766b009d5556e9642de5c40c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2725, + "startColumn": 16, + "charOffset": 81403, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2723, + "startColumn": 16, + "charOffset": 81335, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr party = player->getParty();\n\tif (!party || !party->getLeader() || party->getLeader()->getID() != player->getID()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06667ea6907fe827dfca21d6a2ee44ff7527b1eb724746f654953e547a26d0a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2729, + "startColumn": 2, + "charOffset": 81491, + "charLength": 21, + "snippet": { + "text": "PartyAnalyzerAction_t" + } + }, + "contextRegion": { + "startLine": 2727, + "startColumn": 2, + "charOffset": 81486, + "charLength": 21, + "snippet": { + "text": "\t}\n\n\tPartyAnalyzerAction_t action = static_cast(msg.getByte());\n\tif (action == PARTYANALYZERACTION_RESET) {\n\t\tparty->resetAnalyzer();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a091a89839da4da615028ef436708d26c01b05a926bbbb3d3601e6aa53b0cb4b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2730, + "startColumn": 2, + "charOffset": 81574, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2728, + "startColumn": 2, + "charOffset": 81489, + "charLength": 2, + "snippet": { + "text": "\n\tPartyAnalyzerAction_t action = static_cast(msg.getByte());\n\tif (action == PARTYANALYZERACTION_RESET) {\n\t\tparty->resetAnalyzer();\n\t} else if (action == PARTYANALYZERACTION_PRICETYPE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be8d381a054ca32fbed416f575f5f33b6ff9df97e1a7ac697eed21f530f16ef6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2735, + "startColumn": 3, + "charOffset": 81792, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 2733, + "startColumn": 3, + "charOffset": 81698, + "charLength": 8, + "snippet": { + "text": "\t\tparty->switchAnalyzerPriceType();\n\t} else if (action == PARTYANALYZERACTION_PRICEVALUE) {\n\t\tuint16_t size = msg.get();\n\t\tfor (uint16_t i = 1; i <= size; i++) {\n\t\t\tuint16_t itemId = msg.get();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef874588c2e818dde29f87c636bd81c9e6a152a1d44420176f47eec4cf5ee2c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2736, + "startColumn": 3, + "charOffset": 81831, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2734, + "startColumn": 3, + "charOffset": 81734, + "charLength": 3, + "snippet": { + "text": "\t} else if (action == PARTYANALYZERACTION_PRICEVALUE) {\n\t\tuint16_t size = msg.get();\n\t\tfor (uint16_t i = 1; i <= size; i++) {\n\t\t\tuint16_t itemId = msg.get();\n\t\t\tuint64_t price = msg.get();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "979a6693451d2a0cb6b8c5e1ecef5fe3fa3fac9aa471bb5aa36ed7573f10229e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'size' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2736, + "startColumn": 24, + "charOffset": 81852, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 2734, + "startColumn": 24, + "charOffset": 81734, + "charLength": 1, + "snippet": { + "text": "\t} else if (action == PARTYANALYZERACTION_PRICEVALUE) {\n\t\tuint16_t size = msg.get();\n\t\tfor (uint16_t i = 1; i <= size; i++) {\n\t\t\tuint16_t itemId = msg.get();\n\t\t\tuint64_t price = msg.get();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16aecbd1edc4057f1a646837758404e01cc4ff9f6b376c26daebccdab5b80dc0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2737, + "startColumn": 4, + "charOffset": 81873, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 2735, + "startColumn": 4, + "charOffset": 81790, + "charLength": 8, + "snippet": { + "text": "\t\tuint16_t size = msg.get();\n\t\tfor (uint16_t i = 1; i <= size; i++) {\n\t\t\tuint16_t itemId = msg.get();\n\t\t\tuint64_t price = msg.get();\n\t\t\tplayer->setItemCustomPrice(itemId, price);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a834e2a2b3140686dcb166716662330d2f4d7fc62c4f167f36686b96f7d48c53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2738, + "startColumn": 4, + "charOffset": 81915, + "charLength": 8, + "snippet": { + "text": "uint64_t" + } + }, + "contextRegion": { + "startLine": 2736, + "startColumn": 4, + "charOffset": 81829, + "charLength": 8, + "snippet": { + "text": "\t\tfor (uint16_t i = 1; i <= size; i++) {\n\t\t\tuint16_t itemId = msg.get();\n\t\t\tuint64_t price = msg.get();\n\t\t\tplayer->setItemCustomPrice(itemId, price);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b57eb349636c295b861920dc5ca0a43148027ec522761ae215790b6e2862d8ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2747, + "startColumn": 6, + "charOffset": 82139, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2745, + "startColumn": 6, + "charOffset": 82067, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::parseLeaderFinderWindow(NetworkMessage &msg) {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6c6186c5ff9a615fba6c1edcd3329a7319f0da6edb4ace8fdf0b121063203d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2762, + "startColumn": 4, + "charOffset": 82377, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 2760, + "startColumn": 4, + "charOffset": 82358, + "charLength": 8, + "snippet": { + "text": "\t\t}\n\t\tcase 2: {\n\t\t\tuint32_t memberID = msg.get();\n\t\t\tstd::shared_ptr member = g_game().getPlayerByGUID(memberID);\n\t\t\tif (!member) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1a837daf38a455aa4e3dc8292f5fa55f5622a6d259c6517c19a1ceede1ce3b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2764, + "startColumn": 8, + "charOffset": 82497, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2762, + "startColumn": 8, + "charOffset": 82374, + "charLength": 1, + "snippet": { + "text": "\t\t\tuint32_t memberID = msg.get();\n\t\t\tstd::shared_ptr member = g_game().getPlayerByGUID(memberID);\n\t\t\tif (!member) {\n\t\t\t\treturn;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6080dd7d342f19c77b67573c22f0fcfeb475558145ee988d6b624a92332404d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2769, + "startColumn": 8, + "charOffset": 82595, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2767, + "startColumn": 8, + "charOffset": 82525, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tconst auto &teamAssemble = g_game().getTeamFinder(player);\n\t\t\tif (!teamAssemble) {\n\t\t\t\treturn;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab0c92182462149cd09255360d3992c3c93f109f47e9c012a8fa994f1d7950f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2774, + "startColumn": 4, + "charOffset": 82674, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2772, + "startColumn": 4, + "charOffset": 82629, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tuint8_t memberStatus = msg.getByte();\n\t\t\tfor (auto &memberPair : teamAssemble->membersMap) {\n\t\t\t\tif (memberPair.first == memberID) {\n\t\t\t\t\tmemberPair.second = memberStatus;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7b5b02b8520ee01d746bd504859bdc5d54ae7331abf7ac8d63af2fa6284717c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2812, + "startColumn": 6, + "charOffset": 83484, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2810, + "startColumn": 6, + "charOffset": 83412, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::parseMemberFinderWindow(NetworkMessage &msg) {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4c6761d307e69a33f0c0f702c8922890605ab2f8e29458250b7df7a335d77af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2820, + "startColumn": 3, + "charOffset": 83621, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 2818, + "startColumn": 3, + "charOffset": 83577, + "charLength": 8, + "snippet": { + "text": "\t\tplayer->sendTeamFinderList();\n\t} else {\n\t\tuint32_t leaderID = msg.get();\n\t\tstd::shared_ptr leader = g_game().getPlayerByGUID(leaderID);\n\t\tif (!leader) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e06bc0abf2febebd6d3785d9d2df82db03cde3a7d34e2460d4c33be68e71b38d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2822, + "startColumn": 7, + "charOffset": 83739, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2820, + "startColumn": 7, + "charOffset": 83619, + "charLength": 1, + "snippet": { + "text": "\t\tuint32_t leaderID = msg.get();\n\t\tstd::shared_ptr leader = g_game().getPlayerByGUID(leaderID);\n\t\tif (!leader) {\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f336b68808fbfeb3e18edf968eaa335b665d3ecad494bf4c2093ce0410e43df9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2827, + "startColumn": 7, + "charOffset": 83833, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2825, + "startColumn": 7, + "charOffset": 83765, + "charLength": 1, + "snippet": { + "text": "\n\t\tconst auto &teamAssemble = g_game().getTeamFinder(player);\n\t\tif (!teamAssemble) {\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e45a298c819e8a7f334fc73056a10cec84315c68ea8c36a355c310876186f24c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2833, + "startColumn": 29, + "charOffset": 84004, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 2831, + "startColumn": 29, + "charOffset": 83866, + "charLength": 6, + "snippet": { + "text": "\t\tif (action == 1) {\n\t\t\tleader->sendTextMessage(MESSAGE_STATUS, \"There is a new request to join your team.\");\n\t\t\tteamAssemble->membersMap.insert({ player->getGUID(), 1 });\n\t\t} else {\n\t\t\tfor (auto itt = teamAssemble->membersMap.begin(), end = teamAssemble->membersMap.end(); itt != end; ++itt) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82489ae411a4a89b6aa4cb796581bc06cbf31ace2684cb8dd6d255eb14c7575f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2835, + "startColumn": 4, + "charOffset": 84052, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2833, + "startColumn": 4, + "charOffset": 83976, + "charLength": 3, + "snippet": { + "text": "\t\t\tteamAssemble->membersMap.insert({ player->getGUID(), 1 });\n\t\t} else {\n\t\t\tfor (auto itt = teamAssemble->membersMap.begin(), end = teamAssemble->membersMap.end(); itt != end; ++itt) {\n\t\t\t\tif (itt->first == player->getGUID()) {\n\t\t\t\t\tteamAssemble->membersMap.erase(itt);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6fdfdaa8e274b8ac6ac4069f16857385289a10742f7b4c64e99ed1d55b4205e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2835, + "startColumn": 4, + "charOffset": 84052, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2833, + "startColumn": 4, + "charOffset": 83976, + "charLength": 3, + "snippet": { + "text": "\t\t\tteamAssemble->membersMap.insert({ player->getGUID(), 1 });\n\t\t} else {\n\t\t\tfor (auto itt = teamAssemble->membersMap.begin(), end = teamAssemble->membersMap.end(); itt != end; ++itt) {\n\t\t\t\tif (itt->first == player->getGUID()) {\n\t\t\t\t\tteamAssemble->membersMap.erase(itt);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8b9c6d06387467522dd63674683c93f4492f3bc595c12a6c0d5b026b55f5cd7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2835, + "startColumn": 9, + "charOffset": 84057, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 2833, + "startColumn": 9, + "charOffset": 83976, + "charLength": 4, + "snippet": { + "text": "\t\t\tteamAssemble->membersMap.insert({ player->getGUID(), 1 });\n\t\t} else {\n\t\t\tfor (auto itt = teamAssemble->membersMap.begin(), end = teamAssemble->membersMap.end(); itt != end; ++itt) {\n\t\t\t\tif (itt->first == player->getGUID()) {\n\t\t\t\t\tteamAssemble->membersMap.erase(itt);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b99287f46f31412d01b5563c2c9e5238927e0f7198dd208f6c076a0d87001d37" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'itt' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2835, + "startColumn": 92, + "charOffset": 84140, + "charLength": 3, + "snippet": { + "text": "itt" + } + }, + "contextRegion": { + "startLine": 2833, + "startColumn": 92, + "charOffset": 83976, + "charLength": 3, + "snippet": { + "text": "\t\t\tteamAssemble->membersMap.insert({ player->getGUID(), 1 });\n\t\t} else {\n\t\t\tfor (auto itt = teamAssemble->membersMap.begin(), end = teamAssemble->membersMap.end(); itt != end; ++itt) {\n\t\t\t\tif (itt->first == player->getGUID()) {\n\t\t\t\t\tteamAssemble->membersMap.erase(itt);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c4658f89998c76cbc138ada4268a2261b344d9e8fed94f37c7c1060d15ee8c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2837, + "startColumn": 31, + "charOffset": 84234, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 2835, + "startColumn": 31, + "charOffset": 84049, + "charLength": 5, + "snippet": { + "text": "\t\t\tfor (auto itt = teamAssemble->membersMap.begin(), end = teamAssemble->membersMap.end(); itt != end; ++itt) {\n\t\t\t\tif (itt->first == player->getGUID()) {\n\t\t\t\t\tteamAssemble->membersMap.erase(itt);\n\t\t\t\t\tbreak;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "347827e8513ccacf0aed98853740b495ef0d73b89fc88c725fceaf69be5413bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2847, + "startColumn": 6, + "charOffset": 84380, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2845, + "startColumn": 6, + "charOffset": 84310, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::parseSendBuyCharmRune(NetworkMessage &msg) {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce793b1607f451297a0badd6d604cc4a175e75d1e72b9e856b45b0130c118e0c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2851, + "startColumn": 2, + "charOffset": 84421, + "charLength": 11, + "snippet": { + "text": "charmRune_t" + } + }, + "contextRegion": { + "startLine": 2849, + "startColumn": 2, + "charOffset": 84416, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\tcharmRune_t runeID = static_cast(msg.getByte());\n\tuint8_t action = msg.getByte();\n\tuint16_t raceid = msg.get();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10bf08f027521158ac40630d46af9f6c42b3900c0205ecc53e6d402250109909" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2853, + "startColumn": 2, + "charOffset": 84517, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 2851, + "startColumn": 2, + "charOffset": 84420, + "charLength": 8, + "snippet": { + "text": "\tcharmRune_t runeID = static_cast(msg.getByte());\n\tuint8_t action = msg.getByte();\n\tuint16_t raceid = msg.get();\n\tg_iobestiary().sendBuyCharmRune(player, runeID, action, raceid);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2fc6e9fcde571829cee90e46104f4cd36172ead0c625c40670dc8da2e0fd42ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2858, + "startColumn": 6, + "charOffset": 84764, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2856, + "startColumn": 6, + "charOffset": 84624, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::refreshCyclopediaMonsterTracker(const std::unordered_set> &trackerSet, bool isBoss) {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4c6761d307e69a33f0c0f702c8922890605ab2f8e29458250b7df7a335d77af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2863, + "startColumn": 14, + "charOffset": 84838, + "charLength": 4, + "snippet": { + "text": "0xB9" + } + }, + "contextRegion": { + "startLine": 2861, + "startColumn": 14, + "charOffset": 84803, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xB9);\n\tmsg.addByte(isBoss ? 0x01 : 0x00);\n\tmsg.addByte(trackerSet.size());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9634242a96ae5cdcf23354ee96c706bd356d80794196b75299d1f63da392ca12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xB9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2863, + "startColumn": 14, + "charOffset": 84838, + "charLength": 4, + "snippet": { + "text": "0xB9" + } + }, + "contextRegion": { + "startLine": 2861, + "startColumn": 14, + "charOffset": 84803, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xB9);\n\tmsg.addByte(isBoss ? 0x01 : 0x00);\n\tmsg.addByte(trackerSet.size());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3255eea00770292317db65eb8de4ce34bdc164f95fafb5b4d79e524cc42f839f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2865, + "startColumn": 14, + "charOffset": 84894, + "charLength": 10, + "snippet": { + "text": "trackerSet" + } + }, + "contextRegion": { + "startLine": 2863, + "startColumn": 14, + "charOffset": 84825, + "charLength": 10, + "snippet": { + "text": "\tmsg.addByte(0xB9);\n\tmsg.addByte(isBoss ? 0x01 : 0x00);\n\tmsg.addByte(trackerSet.size());\n\tfor (const auto &mtype : trackerSet) {\n\t\tauto raceId = mtype->info.raceid;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34297183f3fa775fdf89ede371659ce1f80fac6524b925195764af22c5118adf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2878, + "startColumn": 4, + "charOffset": 85321, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2876, + "startColumn": 4, + "charOffset": 85276, + "charLength": 3, + "snippet": { + "text": "\t\tbool completed = false;\n\t\tif (isBoss) {\n\t\t\tfor (const auto &stage : stages) {\n\t\t\t\tmsg.add(static_cast(stage.kills));\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d1fa08ba2ce196d673ba97d7e69e33630d2af244e44c89669ea1e4f1c18dc3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2900, + "startColumn": 6, + "charOffset": 85894, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2898, + "startColumn": 6, + "charOffset": 85846, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::BestiarysendCharms() {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11572932cc7dc43e66e6765cb778b64e2224e4db7b9a64c7fce935952b33f595" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2904, + "startColumn": 27, + "charOffset": 85960, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 2902, + "startColumn": 27, + "charOffset": 85930, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tint32_t removeRuneCost = player->getLevel() * 100;\n\tif (player->hasCharmExpansion()) {\n\t\tremoveRuneCost = (removeRuneCost * 75) / 100;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41188e136dca127d15096ab46f9ad34e31d6eefe5b1332a9ed989ce60c7bb8cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2904, + "startColumn": 48, + "charOffset": 85981, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2902, + "startColumn": 48, + "charOffset": 85930, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tint32_t removeRuneCost = player->getLevel() * 100;\n\tif (player->hasCharmExpansion()) {\n\t\tremoveRuneCost = (removeRuneCost * 75) / 100;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07736d8c004b1e660135e3cc1f85bd84d95448945fd9e1a47e18ec4ed5e68b21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "75 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2906, + "startColumn": 38, + "charOffset": 86059, + "charLength": 2, + "snippet": { + "text": "75" + } + }, + "contextRegion": { + "startLine": 2904, + "startColumn": 38, + "charOffset": 85934, + "charLength": 2, + "snippet": { + "text": "\tint32_t removeRuneCost = player->getLevel() * 100;\n\tif (player->hasCharmExpansion()) {\n\t\tremoveRuneCost = (removeRuneCost * 75) / 100;\n\t}\n\tNetworkMessage msg;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f064a29775164591e3f258da9da9d927b320de51742ba7f0482863f91b39038e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2906, + "startColumn": 44, + "charOffset": 86065, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2904, + "startColumn": 44, + "charOffset": 85934, + "charLength": 3, + "snippet": { + "text": "\tint32_t removeRuneCost = player->getLevel() * 100;\n\tif (player->hasCharmExpansion()) {\n\t\tremoveRuneCost = (removeRuneCost * 75) / 100;\n\t}\n\tNetworkMessage msg;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "212985b3a82c0c22ad38f8751950a8b8ec44d4ae3df3b029d845a3f4d385a0a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2909, + "startColumn": 14, + "charOffset": 86107, + "charLength": 4, + "snippet": { + "text": "0xd8" + } + }, + "contextRegion": { + "startLine": 2907, + "startColumn": 14, + "charOffset": 86070, + "charLength": 4, + "snippet": { + "text": "\t}\n\tNetworkMessage msg;\n\tmsg.addByte(0xd8);\n\tmsg.add(player->getCharmPoints());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a07d44a991136bd56f256160253861f957d138f74555c57e875ebd44b6f6ffe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xd8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2909, + "startColumn": 14, + "charOffset": 86107, + "charLength": 4, + "snippet": { + "text": "0xd8" + } + }, + "contextRegion": { + "startLine": 2907, + "startColumn": 14, + "charOffset": 86070, + "charLength": 4, + "snippet": { + "text": "\t}\n\tNetworkMessage msg;\n\tmsg.addByte(0xd8);\n\tmsg.add(player->getCharmPoints());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81d749d262d03351fd8ba2ed0f3d68a4919c368bb3dd714e5bb74312f22aa9f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2913, + "startColumn": 14, + "charOffset": 86223, + "charLength": 9, + "snippet": { + "text": "charmList" + } + }, + "contextRegion": { + "startLine": 2911, + "startColumn": 14, + "charOffset": 86160, + "charLength": 9, + "snippet": { + "text": "\n\tconst auto charmList = g_game().getCharmList();\n\tmsg.addByte(charmList.size());\n\tfor (const auto &c_type : charmList) {\n\t\tmsg.addByte(c_type->id);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2def4eb83ec2284a41455b2ceb270ad4bcb5bba96d425c6576ca15eae04cd786" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2914, + "startColumn": 2, + "charOffset": 86243, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2912, + "startColumn": 2, + "charOffset": 86161, + "charLength": 3, + "snippet": { + "text": "\tconst auto charmList = g_game().getCharmList();\n\tmsg.addByte(charmList.size());\n\tfor (const auto &c_type : charmList) {\n\t\tmsg.addByte(c_type->id);\n\t\tmsg.addString(c_type->name, \"ProtocolGame::BestiarysendCharms - c_type->name\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "932e4d721c461d75cec3f75eabfe29b56eb2eac0a35847f525a522545dd21c82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2938, + "startColumn": 2, + "charOffset": 87034, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2936, + "startColumn": 2, + "charOffset": 86960, + "charLength": 3, + "snippet": { + "text": "\n\tauto finishedMonstersSet = g_iobestiary().getBestiaryFinished(player);\n\tfor (charmRune_t charmRune : g_iobestiary().getCharmUsedRuneBitAll(player)) {\n\t\tconst auto tmpCharm = g_iobestiary().getBestiaryCharm(charmRune);\n\t\tuint16_t tmp_raceid = player->parseRacebyCharm(tmpCharm->id, false, 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80b3f8e58629d3259f6699d958d0f2120e10d2b72ebdd081cb25761fce46e5b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2942, + "startColumn": 3, + "charOffset": 87257, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 2940, + "startColumn": 3, + "charOffset": 87180, + "charLength": 3, + "snippet": { + "text": "\t\tuint16_t tmp_raceid = player->parseRacebyCharm(tmpCharm->id, false, 0);\n\n\t\tstd::erase(finishedMonstersSet, tmp_raceid);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5705cd90682d4b8a0d0516129f41e4e7ba7f37e8398a0b6bc608bf0deea45c85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2945, + "startColumn": 20, + "charOffset": 87325, + "charLength": 19, + "snippet": { + "text": "finishedMonstersSet" + } + }, + "contextRegion": { + "startLine": 2943, + "startColumn": 20, + "charOffset": 87302, + "charLength": 19, + "snippet": { + "text": "\t}\n\n\tmsg.add(finishedMonstersSet.size());\n\tfor (uint16_t raceid_tmp : finishedMonstersSet) {\n\t\tmsg.add(raceid_tmp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "891716b11c987772b8324e9dfac6a7e3d145308e556b41ad4b1aef6c3e0e2162" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2946, + "startColumn": 2, + "charOffset": 87355, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2944, + "startColumn": 2, + "charOffset": 87305, + "charLength": 3, + "snippet": { + "text": "\n\tmsg.add(finishedMonstersSet.size());\n\tfor (uint16_t raceid_tmp : finishedMonstersSet) {\n\t\tmsg.add(raceid_tmp);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85adde1f9de4ea0ee3aa58e74d32a39e4c8b607062a5096edf284ab3d8bd596f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'parseBestiarysendCreatures' has cognitive complexity of 28 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2953, + "startColumn": 20, + "charOffset": 87491, + "charLength": 26, + "snippet": { + "text": "parseBestiarysendCreatures" + } + }, + "contextRegion": { + "startLine": 2951, + "startColumn": 20, + "charOffset": 87469, + "charLength": 26, + "snippet": { + "text": "}\n\nvoid ProtocolGame::parseBestiarysendCreatures(NetworkMessage &msg) {\n\tif (!player || oldProtocol) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca25784c7353e1e7dc97f52f41e8639b1c52cb57a1fb4c567beeab995f850f33" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2954, + "startColumn": 6, + "charOffset": 87546, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2952, + "startColumn": 6, + "charOffset": 87471, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::parseBestiarysendCreatures(NetworkMessage &msg) {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f8264014482f1b00d65581bcab4441edc5bd9a0cf9b611ca3e675b4b2ffcc4d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-redundant-string-init", + "ruleIndex": 725, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2960, + "startColumn": 14, + "charOffset": 87667, + "charLength": 4, + "snippet": { + "text": "text" + } + }, + "contextRegion": { + "startLine": 2958, + "startColumn": 14, + "charOffset": 87586, + "charLength": 4, + "snippet": { + "text": "\tstd::ostringstream ss;\n\tstd::map race = {};\n\tstd::string text = \"\";\n\tuint8_t search = msg.getByte();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5d5248b756f2ca04e86abe73a0371231e85d1b06d268554d58aab0f4bea377e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2964, + "startColumn": 3, + "charOffset": 87734, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 2962, + "startColumn": 3, + "charOffset": 87711, + "charLength": 8, + "snippet": { + "text": "\n\tif (search == 1) {\n\t\tuint16_t monsterAmount = msg.get();\n\t\tstd::map mtype_list = g_game().getBestiaryList();\n\t\tfor (uint16_t monsterCount = 1; monsterCount <= monsterAmount; monsterCount++) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79e2084b9c442fa78ea5e1fb56be1dc4ae2bd24ca62a76456225a2afcd72b71e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2966, + "startColumn": 3, + "charOffset": 87857, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2964, + "startColumn": 3, + "charOffset": 87732, + "charLength": 3, + "snippet": { + "text": "\t\tuint16_t monsterAmount = msg.get();\n\t\tstd::map mtype_list = g_game().getBestiaryList();\n\t\tfor (uint16_t monsterCount = 1; monsterCount <= monsterAmount; monsterCount++) {\n\t\t\tuint16_t raceid = msg.get();\n\t\t\tif (player->getBestiaryKillCount(raceid) > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e06b2983a617d680d9213492a8a9eb56ac729266498e2259d4d2689bfe2b0783" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'monsterAmount' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2966, + "startColumn": 35, + "charOffset": 87889, + "charLength": 12, + "snippet": { + "text": "monsterCount" + } + }, + "contextRegion": { + "startLine": 2964, + "startColumn": 35, + "charOffset": 87732, + "charLength": 12, + "snippet": { + "text": "\t\tuint16_t monsterAmount = msg.get();\n\t\tstd::map mtype_list = g_game().getBestiaryList();\n\t\tfor (uint16_t monsterCount = 1; monsterCount <= monsterAmount; monsterCount++) {\n\t\t\tuint16_t raceid = msg.get();\n\t\t\tif (player->getBestiaryKillCount(raceid) > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3bef9dff293d9e17a493efdc44279487a00dbb289c14c8a876478edcc4073901" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2967, + "startColumn": 4, + "charOffset": 87941, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 2965, + "startColumn": 4, + "charOffset": 87780, + "charLength": 8, + "snippet": { + "text": "\t\tstd::map mtype_list = g_game().getBestiaryList();\n\t\tfor (uint16_t monsterCount = 1; monsterCount <= monsterAmount; monsterCount++) {\n\t\t\tuint16_t raceid = msg.get();\n\t\t\tif (player->getBestiaryKillCount(raceid) > 0) {\n\t\t\t\tauto it = mtype_list.find(raceid);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8222d35cb4600b22fdaea30435379b37e9dc03c82a7bb20aaf4c4597eb083021" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2971, + "startColumn": 11, + "charOffset": 88114, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 2969, + "startColumn": 11, + "charOffset": 88031, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tauto it = mtype_list.find(raceid);\n\t\t\t\tif (it != mtype_list.end()) {\n\t\t\t\t\trace.insert({ raceid, it->second });\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e83450b2aeb8381e8a7033d6de9e67dc8385e0db491d3e6463e532878dc1edb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2988, + "startColumn": 17, + "charOffset": 88524, + "charLength": 4, + "snippet": { + "text": "0xd6" + } + }, + "contextRegion": { + "startLine": 2986, + "startColumn": 17, + "charOffset": 88481, + "charLength": 4, + "snippet": { + "text": "\t}\n\tNetworkMessage newmsg;\n\tnewmsg.addByte(0xd6);\n\tnewmsg.addString(text, \"ProtocolGame::parseBestiarysendCreatures - text\");\n\tnewmsg.add(race.size());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "036eaf56251ab369b074c266c889433dffe2ec4ddbc3612a9b658b84c124e1fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xd6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2988, + "startColumn": 17, + "charOffset": 88524, + "charLength": 4, + "snippet": { + "text": "0xd6" + } + }, + "contextRegion": { + "startLine": 2986, + "startColumn": 17, + "charOffset": 88481, + "charLength": 4, + "snippet": { + "text": "\t}\n\tNetworkMessage newmsg;\n\tnewmsg.addByte(0xd6);\n\tnewmsg.addString(text, \"ProtocolGame::parseBestiarysendCreatures - text\");\n\tnewmsg.add(race.size());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "642fd205185dbb44dc2324ec8ad6a6596614d72374c37a3417b21795bca01eec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2990, + "startColumn": 23, + "charOffset": 88629, + "charLength": 4, + "snippet": { + "text": "race" + } + }, + "contextRegion": { + "startLine": 2988, + "startColumn": 23, + "charOffset": 88508, + "charLength": 4, + "snippet": { + "text": "\tnewmsg.addByte(0xd6);\n\tnewmsg.addString(text, \"ProtocolGame::parseBestiarysendCreatures - text\");\n\tnewmsg.add(race.size());\n\tstd::map creaturesKilled = g_iobestiary().getBestiaryKillCountByMonsterIDs(player, race);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43e0226415714388fa1f7f3145b3b6ca94dd68ce7272836ebd11006c38751a36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 2999, + "startColumn": 3, + "charOffset": 88905, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2997, + "startColumn": 3, + "charOffset": 88853, + "charLength": 3, + "snippet": { + "text": "\t\tuint8_t progress = 0;\n\t\tuint8_t occurrence = 0;\n\t\tfor (const auto &_it : creaturesKilled) {\n\t\t\tif (_it.first == raceid_) {\n\t\t\t\tconst auto tmpType = g_monsters().getMonsterType(it_.second);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d1fa08ba2ce196d673ba97d7e69e33630d2af244e44c89669ea1e4f1c18dc3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3002, + "startColumn": 9, + "charOffset": 89052, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3000, + "startColumn": 9, + "charOffset": 88947, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (_it.first == raceid_) {\n\t\t\t\tconst auto tmpType = g_monsters().getMonsterType(it_.second);\n\t\t\t\tif (!tmpType) {\n\t\t\t\t\treturn;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a021d2c2f799dd4c911a136c6bf53a8f05b8dd7bfd301a512ab8387d6656681c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3038, + "startColumn": 2, + "charOffset": 89828, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 3036, + "startColumn": 2, + "charOffset": 89773, + "charLength": 8, + "snippet": { + "text": "\nvoid ProtocolGame::parseGreet(NetworkMessage &msg) {\n\tuint32_t npcId = msg.get();\n\tg_game().playerNpcGreet(player->getID(), npcId);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee997c3c2b976775852ad8133056d806b55ebf40d4b32874777a13c224689c97" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3062, + "startColumn": 2, + "charOffset": 90481, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 3060, + "startColumn": 2, + "charOffset": 90437, + "charLength": 2, + "snippet": { + "text": "\tuint8_t option = 0;\n\tuint16_t raceId = 0;\n\tif (action == static_cast(PreyAction_MonsterSelection)) {\n\t\tindex = msg.getByte();\n\t} else if (action == static_cast(PreyAction_Option)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4047e47e3b8fb120ae345dc54dbf1c2db75cf47a47d7c10adde20ab1f3c3ab21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint8_t' (aka 'unsigned char') to signed type 'int8_t' (aka 'signed char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3063, + "startColumn": 11, + "charOffset": 90558, + "charLength": 3, + "snippet": { + "text": "msg" + } + }, + "contextRegion": { + "startLine": 3061, + "startColumn": 11, + "charOffset": 90458, + "charLength": 3, + "snippet": { + "text": "\tuint16_t raceId = 0;\n\tif (action == static_cast(PreyAction_MonsterSelection)) {\n\t\tindex = msg.getByte();\n\t} else if (action == static_cast(PreyAction_Option)) {\n\t\toption = msg.getByte();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a3553618f7b571384e866d5fb998b59c33b441c429f093a7aaf705918702da8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3092, + "startColumn": 2, + "charOffset": 91314, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 3090, + "startColumn": 2, + "charOffset": 91251, + "charLength": 8, + "snippet": { + "text": "\nvoid ProtocolGame::parseInviteToParty(NetworkMessage &msg) {\n\tuint32_t targetId = msg.get();\n\tg_game().playerInviteToParty(player->getID(), targetId);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1ca5aabbf62fb0a84d9f368396fb0b339404d8aa6d3b6c1ffbe7d2ef80935e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3097, + "startColumn": 2, + "charOffset": 91474, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 3095, + "startColumn": 2, + "charOffset": 91415, + "charLength": 8, + "snippet": { + "text": "\nvoid ProtocolGame::parseJoinParty(NetworkMessage &msg) {\n\tuint32_t targetId = msg.get();\n\tg_game().playerJoinParty(player->getID(), targetId);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbb632534cffb917be3f8a0a47066ef606962988331fb512dc9e9cb17e9b9c83" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3102, + "startColumn": 2, + "charOffset": 91638, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 3100, + "startColumn": 2, + "charOffset": 91571, + "charLength": 8, + "snippet": { + "text": "\nvoid ProtocolGame::parseRevokePartyInvite(NetworkMessage &msg) {\n\tuint32_t targetId = msg.get();\n\tg_game().playerRevokePartyInvitation(player->getID(), targetId);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60b2f04720a4f35b25844b6a850578edcf458faa2656095d825ec94b3912fe7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3107, + "startColumn": 2, + "charOffset": 91816, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 3105, + "startColumn": 2, + "charOffset": 91747, + "charLength": 8, + "snippet": { + "text": "\nvoid ProtocolGame::parsePassPartyLeadership(NetworkMessage &msg) {\n\tuint32_t targetId = msg.get();\n\tg_game().playerPassPartyLeadership(player->getID(), targetId);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75817a01918b111b3d845cfa8fde6e5bb6a9abc826f7b679a405ee00c226820a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3117, + "startColumn": 2, + "charOffset": 92183, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 3115, + "startColumn": 2, + "charOffset": 92124, + "charLength": 8, + "snippet": { + "text": "\nvoid ProtocolGame::parseQuestLine(NetworkMessage &msg) {\n\tuint16_t questId = msg.get();\n\tg_game().playerShowQuestLine(player->getID(), questId);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c825465db1b13c3d339908a9b6f918b88318c173beacc047ed2db6294ade2dce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3133, + "startColumn": 3, + "charOffset": 92930, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 3131, + "startColumn": 3, + "charOffset": 92842, + "charLength": 8, + "snippet": { + "text": "\t\tg_game().playerBrowseMarketOwnHistory(player->getID());\n\t} else if (!oldProtocol) {\n\t\tuint16_t itemId = msg.get();\n\t\tuint8_t tier = msg.get();\n\t\tplayer->sendMarketEnter(player->getLastDepotId());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dda160d12d55aa9152b15032e312526af2dcd0c934bfcdf49cf3eada0c62c059" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3134, + "startColumn": 3, + "charOffset": 92971, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 3132, + "startColumn": 3, + "charOffset": 92900, + "charLength": 7, + "snippet": { + "text": "\t} else if (!oldProtocol) {\n\t\tuint16_t itemId = msg.get();\n\t\tuint8_t tier = msg.get();\n\t\tplayer->sendMarketEnter(player->getLastDepotId());\n\t\tg_game().playerBrowseMarket(player->getID(), itemId, tier);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7af19737f9de67bc48f6134b64b7fdf5d8b1b901d0fd89b97f94298a5859700c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3144, + "startColumn": 2, + "charOffset": 93295, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 3142, + "startColumn": 2, + "charOffset": 93198, + "charLength": 8, + "snippet": { + "text": "void ProtocolGame::parseMarketCreateOffer(NetworkMessage &msg) {\n\tuint8_t type = msg.getByte();\n\tuint16_t itemId = msg.get();\n\tuint8_t itemTier = 0;\n\tif (!oldProtocol && Item::items[itemId].upgradeClassification > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6addaade180348ae7eddd64c4c37d1cf0752f902b821e6d04a1d4d8513c1a25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3150, + "startColumn": 2, + "charOffset": 93460, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 3148, + "startColumn": 2, + "charOffset": 93455, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tuint16_t amount = msg.get();\n\tuint64_t price = oldProtocol ? static_cast(msg.get()) : msg.get();\n\tbool anonymous = (msg.getByte() != 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d946899e4ab2db150243dd0e20f2d384852f741ddb7a18882f056a9bbf2187c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3159, + "startColumn": 2, + "charOffset": 93844, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 3157, + "startColumn": 2, + "charOffset": 93777, + "charLength": 8, + "snippet": { + "text": "\nvoid ProtocolGame::parseMarketCancelOffer(NetworkMessage &msg) {\n\tuint32_t timestamp = msg.get();\n\tuint16_t counter = msg.get();\n\tif (counter > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30fedd08b50d1e5ac8381a47f4776a7a4b7237d57146e7c7fe5409c4f78b6e5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3160, + "startColumn": 2, + "charOffset": 93887, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 3158, + "startColumn": 2, + "charOffset": 93778, + "charLength": 8, + "snippet": { + "text": "void ProtocolGame::parseMarketCancelOffer(NetworkMessage &msg) {\n\tuint32_t timestamp = msg.get();\n\tuint16_t counter = msg.get();\n\tif (counter > 0) {\n\t\tg_game().playerCancelMarketOffer(player->getID(), timestamp, counter);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31ce81d609f9cc19e7ed640bd932be45235d1737e67d6be7ff0f167a533e2620" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3169, + "startColumn": 2, + "charOffset": 94115, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 3167, + "startColumn": 2, + "charOffset": 94048, + "charLength": 8, + "snippet": { + "text": "\nvoid ProtocolGame::parseMarketAcceptOffer(NetworkMessage &msg) {\n\tuint32_t timestamp = msg.get();\n\tuint16_t counter = msg.get();\n\tuint16_t amount = msg.get();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b565136b51a8750de8be028502650e0868a315e8c57c4f88e484f53440cda47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3170, + "startColumn": 2, + "charOffset": 94158, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 3168, + "startColumn": 2, + "charOffset": 94049, + "charLength": 8, + "snippet": { + "text": "void ProtocolGame::parseMarketAcceptOffer(NetworkMessage &msg) {\n\tuint32_t timestamp = msg.get();\n\tuint16_t counter = msg.get();\n\tuint16_t amount = msg.get();\n\tif (amount > 0 && counter > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b3ebe5e072501f0220483920e36aa3b2c0c16c5a6dedc8b69aea251649fd182" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3171, + "startColumn": 2, + "charOffset": 94199, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 3169, + "startColumn": 2, + "charOffset": 94114, + "charLength": 8, + "snippet": { + "text": "\tuint32_t timestamp = msg.get();\n\tuint16_t counter = msg.get();\n\tuint16_t amount = msg.get();\n\tif (amount > 0 && counter > 0) {\n\t\tg_game().playerAcceptMarketOffer(player->getID(), timestamp, counter, amount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9815314bf77d91d022f1b739f6dd4543f2b00510d265af414746c991c0ae447" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3180, + "startColumn": 2, + "charOffset": 94448, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 3178, + "startColumn": 2, + "charOffset": 94381, + "charLength": 8, + "snippet": { + "text": "\nvoid ProtocolGame::parseModalWindowAnswer(NetworkMessage &msg) {\n\tuint32_t id = msg.get();\n\tuint8_t button = msg.getByte();\n\tuint8_t choice = msg.getByte();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5631cb505cefc56cdd9b9c0cc4fa556e7b12c9d413e69ec1f7504ae726cd1c44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3208, + "startColumn": 2, + "charOffset": 95420, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 3206, + "startColumn": 2, + "charOffset": 95318, + "charLength": 8, + "snippet": { + "text": "void ProtocolGame::parseSeekInContainer(NetworkMessage &msg) {\n\tuint8_t containerId = msg.getByte();\n\tuint16_t index = msg.get();\n\tauto primaryType = msg.getByte();\n\tg_game().playerSeekInContainer(player->getID(), containerId, index, primaryType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e763a68879a60079ef6ac4b78830cca435fca0b40033b2745600a4017dd2d00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3216, + "startColumn": 14, + "charOffset": 95702, + "charLength": 4, + "snippet": { + "text": "0xAD" + } + }, + "contextRegion": { + "startLine": 3214, + "startColumn": 14, + "charOffset": 95595, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendOpenPrivateChannel(const std::string &receiver) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xAD);\n\tmsg.addString(receiver, \"ProtocolGame::sendOpenPrivateChannel - receiver\");\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3dbe69b6a86bd723bd3fb6e65963243e552b1a8daddaf6f2f5025ad2e75bd8c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xAD is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3216, + "startColumn": 14, + "charOffset": 95702, + "charLength": 4, + "snippet": { + "text": "0xAD" + } + }, + "contextRegion": { + "startLine": 3214, + "startColumn": 14, + "charOffset": 95595, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendOpenPrivateChannel(const std::string &receiver) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xAD);\n\tmsg.addString(receiver, \"ProtocolGame::sendOpenPrivateChannel - receiver\");\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "358142d771bd83aecd4656cf2bb9328cc29f168b876839e0990363425e36000e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3222, + "startColumn": 6, + "charOffset": 95898, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3220, + "startColumn": 6, + "charOffset": 95815, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendExperienceTracker(int64_t rawExp, int64_t finalExp) {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad8bf181d5f604757d271e43e339aa670f0eca631a30d331c0704523b80bcbb6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3227, + "startColumn": 14, + "charOffset": 95972, + "charLength": 4, + "snippet": { + "text": "0xAF" + } + }, + "contextRegion": { + "startLine": 3225, + "startColumn": 14, + "charOffset": 95937, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xAF);\n\tmsg.add(rawExp);\n\tmsg.add(finalExp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0fa525913063ac32f56dba74f66e1346f0b0cdbc2df8a6fb0af036f24accf95" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xAF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3227, + "startColumn": 14, + "charOffset": 95972, + "charLength": 4, + "snippet": { + "text": "0xAF" + } + }, + "contextRegion": { + "startLine": 3225, + "startColumn": 14, + "charOffset": 95937, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xAF);\n\tmsg.add(rawExp);\n\tmsg.add(finalExp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4dd479f1b44e8fa4fabcbca372b6a94767e754f7ca398b7da0440d3f2f94cb9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3235, + "startColumn": 14, + "charOffset": 96217, + "charLength": 4, + "snippet": { + "text": "0xF3" + } + }, + "contextRegion": { + "startLine": 3233, + "startColumn": 14, + "charOffset": 96065, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendChannelEvent(uint16_t channelId, const std::string &playerName, ChannelEvent_t channelEvent) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xF3);\n\tmsg.add(channelId);\n\tmsg.addString(playerName, \"ProtocolGame::sendChannelEvent - playerName\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b4e642a0022554dba943f5720e065a48c31e3b123849c9dabce7c77959d4fd4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xF3 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3235, + "startColumn": 14, + "charOffset": 96217, + "charLength": 4, + "snippet": { + "text": "0xF3" + } + }, + "contextRegion": { + "startLine": 3233, + "startColumn": 14, + "charOffset": 96065, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendChannelEvent(uint16_t channelId, const std::string &playerName, ChannelEvent_t channelEvent) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xF3);\n\tmsg.add(channelId);\n\tmsg.addString(playerName, \"ProtocolGame::sendChannelEvent - playerName\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0c4cac840174e89909daa851aeddfe98531d0c42fd8fba2eca4d1c7247e6b8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3242, + "startColumn": 65, + "charOffset": 96452, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 3240, + "startColumn": 65, + "charOffset": 96385, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendCreatureOutfit(std::shared_ptr creature, const Outfit_t &outfit) {\n\tif (!canSee(creature)) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db49853351ddc03dd5628159635c5b173748921bc9dff1a759f359fff1f639a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3254, + "startColumn": 14, + "charOffset": 96694, + "charLength": 4, + "snippet": { + "text": "0x8E" + } + }, + "contextRegion": { + "startLine": 3252, + "startColumn": 14, + "charOffset": 96659, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x8E);\n\tmsg.add(creature->getID());\n\tAddOutfit(msg, newOutfit);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b87ddfd3f6167c4a2d938b301e4870dd84823dcf01bd24014a637f7f4458a9a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x8E is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3254, + "startColumn": 14, + "charOffset": 96694, + "charLength": 4, + "snippet": { + "text": "0x8E" + } + }, + "contextRegion": { + "startLine": 3252, + "startColumn": 14, + "charOffset": 96659, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x8E);\n\tmsg.add(creature->getID());\n\tAddOutfit(msg, newOutfit);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34e7568aed7159f716fb5caeb55051fd574e653c94ace453cd4094cfc520f89e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3267, + "startColumn": 64, + "charOffset": 97074, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 3265, + "startColumn": 64, + "charOffset": 97008, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendCreatureLight(std::shared_ptr creature) {\n\tif (!canSee(creature)) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "725b5fae522b92717b28c17cbc1ee9e3dc237076fab8c2dd5286fe71dd290e59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3277, + "startColumn": 83, + "charOffset": 97293, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 3275, + "startColumn": 83, + "charOffset": 97208, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::addCreatureIcon(NetworkMessage &msg, std::shared_ptr creature) {\n\tif (!creature || !player || oldProtocol) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac75d41a75a05234e3333f11981e1c317665e7bfd905523f20d966d72bd37bf4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3278, + "startColumn": 6, + "charOffset": 97310, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3276, + "startColumn": 6, + "charOffset": 97210, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::addCreatureIcon(NetworkMessage &msg, std::shared_ptr creature) {\n\tif (!creature || !player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74972e334e0dcf6ef602361fe34217db0b73e6e33bf2ff280d6cbf6b0b7770c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3278, + "startColumn": 19, + "charOffset": 97323, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3276, + "startColumn": 19, + "charOffset": 97210, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::addCreatureIcon(NetworkMessage &msg, std::shared_ptr creature) {\n\tif (!creature || !player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7bce0c9f40252a2c6cd9d8717bfa2704578099b1bbd8e2826dae922c4563251e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3285, + "startColumn": 14, + "charOffset": 97533, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 3283, + "startColumn": 14, + "charOffset": 97405, + "charLength": 5, + "snippet": { + "text": "\t// client only supports 3 icons, otherwise it will crash\n\tconst auto count = icons.size() > 3 ? 3 : icons.size();\n\tmsg.addByte(count);\n\tfor (uint8_t i = 0; i < count; ++i) {\n\t\tconst auto icon = icons[i];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "942d288049d6325c96d86c264a5864bd9f505cdb9dfaff2c1a79d9f6ec164186" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3286, + "startColumn": 2, + "charOffset": 97542, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3284, + "startColumn": 2, + "charOffset": 97463, + "charLength": 3, + "snippet": { + "text": "\tconst auto count = icons.size() > 3 ? 3 : icons.size();\n\tmsg.addByte(count);\n\tfor (uint8_t i = 0; i < count; ++i) {\n\t\tconst auto icon = icons[i];\n\t\tmsg.addByte(icon.serialize());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f877568ba422fd60b1c9e430886b786fa4b46cad1fa2c342ed4e02189fa31e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'count' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3286, + "startColumn": 22, + "charOffset": 97562, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 3284, + "startColumn": 22, + "charOffset": 97463, + "charLength": 1, + "snippet": { + "text": "\tconst auto count = icons.size() > 3 ? 3 : icons.size();\n\tmsg.addByte(count);\n\tfor (uint8_t i = 0; i < count; ++i) {\n\t\tconst auto icon = icons[i];\n\t\tmsg.addByte(icon.serialize());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32e703fe217c5dd57e2d82f31348c0d25a3dc742229588dca5400ac2a20d8531" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3294, + "startColumn": 63, + "charOffset": 97796, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 3292, + "startColumn": 63, + "charOffset": 97731, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendCreatureIcon(std::shared_ptr creature) {\n\tif (!creature || !player || oldProtocol) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9512ff23531cec4944c96212844200244fe387528d61e9164d9ef35604e87cf2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3295, + "startColumn": 6, + "charOffset": 97813, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3293, + "startColumn": 6, + "charOffset": 97733, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendCreatureIcon(std::shared_ptr creature) {\n\tif (!creature || !player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc1d2606f8e526cb8aaa0175cf90edd5acf119a4abed0e83cba138f5e5e4eacf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3295, + "startColumn": 19, + "charOffset": 97826, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3293, + "startColumn": 19, + "charOffset": 97733, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendCreatureIcon(std::shared_ptr creature) {\n\tif (!creature || !player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c943e4b3b7bb59045452137bd20dd94299039692f1f587980c1c32bba7a2170" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3300, + "startColumn": 14, + "charOffset": 97900, + "charLength": 4, + "snippet": { + "text": "0x8B" + } + }, + "contextRegion": { + "startLine": 3298, + "startColumn": 14, + "charOffset": 97865, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x8B);\n\tmsg.add(creature->getID());\n\t// Type 14 for this" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97ee87343e645ff418eeda892ca35e607ada8a9680e3a02a979da6705fc93dc8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x8B is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3300, + "startColumn": 14, + "charOffset": 97900, + "charLength": 4, + "snippet": { + "text": "0x8B" + } + }, + "contextRegion": { + "startLine": 3298, + "startColumn": 14, + "charOffset": 97865, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x8B);\n\tmsg.add(creature->getID());\n\t// Type 14 for this" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ef3587c8e2a09b796558e1e41a47fac71fcee27bdee5795ff053089536a87a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "14 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3303, + "startColumn": 14, + "charOffset": 97980, + "charLength": 2, + "snippet": { + "text": "14" + } + }, + "contextRegion": { + "startLine": 3301, + "startColumn": 14, + "charOffset": 97907, + "charLength": 2, + "snippet": { + "text": "\tmsg.add(creature->getID());\n\t// Type 14 for this\n\tmsg.addByte(14);\n\taddCreatureIcon(msg, creature);\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31a230ab4e83edd8d6388a1cbc81a6ef3fa0d3ad9947eeff4d6f4e72ca7233fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3315, + "startColumn": 6, + "charOffset": 98249, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3313, + "startColumn": 6, + "charOffset": 98194, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendTibiaTime(int32_t time) {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fcb2db46ec2e91da53c0a4cf46ab23df4883df546e8054ed1ec02630ffbc0c32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3320, + "startColumn": 14, + "charOffset": 98323, + "charLength": 4, + "snippet": { + "text": "0xEF" + } + }, + "contextRegion": { + "startLine": 3318, + "startColumn": 14, + "charOffset": 98288, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xEF);\n\tmsg.addByte(time / 60);\n\tmsg.addByte(time % 60);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01ae22ac9e999912f22f53fa721bf866e5093247025e60da56d2d652e0d8fad8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xEF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3320, + "startColumn": 14, + "charOffset": 98323, + "charLength": 4, + "snippet": { + "text": "0xEF" + } + }, + "contextRegion": { + "startLine": 3318, + "startColumn": 14, + "charOffset": 98288, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xEF);\n\tmsg.addByte(time / 60);\n\tmsg.addByte(time % 60);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae7c0d992b05fbd74e01f37f3c00630f09e48725083a3d964452ac8be3195d0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3321, + "startColumn": 14, + "charOffset": 98343, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 3319, + "startColumn": 14, + "charOffset": 98289, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\tmsg.addByte(0xEF);\n\tmsg.addByte(time / 60);\n\tmsg.addByte(time % 60);\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48e30ab4c412092348031ec06d136c11e4894c231c10e1987e6483aac02ac8b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3321, + "startColumn": 21, + "charOffset": 98350, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 3319, + "startColumn": 21, + "charOffset": 98289, + "charLength": 2, + "snippet": { + "text": "\tNetworkMessage msg;\n\tmsg.addByte(0xEF);\n\tmsg.addByte(time / 60);\n\tmsg.addByte(time % 60);\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aea4056b621ac8d86b6d5b7f18806e6b5a19b1e2dadbb47441cbfeaaf78e3e6c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3322, + "startColumn": 14, + "charOffset": 98368, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 3320, + "startColumn": 14, + "charOffset": 98310, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(0xEF);\n\tmsg.addByte(time / 60);\n\tmsg.addByte(time % 60);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d611802be036f78704c381e2887faee051da5770e9c903035deebfcd398ba0f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3322, + "startColumn": 21, + "charOffset": 98375, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 3320, + "startColumn": 21, + "charOffset": 98310, + "charLength": 2, + "snippet": { + "text": "\tmsg.addByte(0xEF);\n\tmsg.addByte(time / 60);\n\tmsg.addByte(time % 60);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7336721f348395ebe02627c8813d95c51b91ce212889e098f11d4d0fe51be17d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3326, + "startColumn": 70, + "charOffset": 98479, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 3324, + "startColumn": 70, + "charOffset": 98407, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendCreatureWalkthrough(std::shared_ptr creature, bool walkthrough) {\n\tif (!canSee(creature)) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1dec1cb5ddc715aefff235cf1875e28cdcef89a51be432ca47a472bcf2ed4629" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3332, + "startColumn": 14, + "charOffset": 98583, + "charLength": 4, + "snippet": { + "text": "0x92" + } + }, + "contextRegion": { + "startLine": 3330, + "startColumn": 14, + "charOffset": 98548, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x92);\n\tmsg.add(creature->getID());\n\tmsg.addByte(walkthrough ? 0x00 : 0x01);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6dd26914d9db008b82160f80d3e1c77b9387f2dac63df36ac572a0f76fb1ba22" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x92 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3332, + "startColumn": 14, + "charOffset": 98583, + "charLength": 4, + "snippet": { + "text": "0x92" + } + }, + "contextRegion": { + "startLine": 3330, + "startColumn": 14, + "charOffset": 98548, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x92);\n\tmsg.add(creature->getID());\n\tmsg.addByte(walkthrough ? 0x00 : 0x01);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd492a29732daf4d511e577b4628c55448fc95c49fa39c7a2c527a95409cdaad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3338, + "startColumn": 65, + "charOffset": 98764, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 3336, + "startColumn": 65, + "charOffset": 98697, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendCreatureShield(std::shared_ptr creature) {\n\tif (!canSee(creature)) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67aa1c8c67f536f02ab3628b978eae53450c11154f29cdf1cdb45746ee17b3e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3344, + "startColumn": 14, + "charOffset": 98850, + "charLength": 4, + "snippet": { + "text": "0x91" + } + }, + "contextRegion": { + "startLine": 3342, + "startColumn": 14, + "charOffset": 98815, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x91);\n\tmsg.add(creature->getID());\n\tmsg.addByte(player->getPartyShield(creature->getPlayer()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72e7a2206ba5e73387bc5b2d40c00ac67134dacf05c8f812cfc4bd409a031087" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x91 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3344, + "startColumn": 14, + "charOffset": 98850, + "charLength": 4, + "snippet": { + "text": "0x91" + } + }, + "contextRegion": { + "startLine": 3342, + "startColumn": 14, + "charOffset": 98815, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x91);\n\tmsg.add(creature->getID());\n\tmsg.addByte(player->getPartyShield(creature->getPlayer()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08e573a85797c5880d82693a7916f420b4a40ad33ff8974d02eae8f8ba745379" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3350, + "startColumn": 65, + "charOffset": 99051, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 3348, + "startColumn": 65, + "charOffset": 98984, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendCreatureEmblem(std::shared_ptr creature) {\n\tif (!creature || !canSee(creature) || oldProtocol) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e48d632ba14540e49f4e4cd566ca201d7b06d1204dc38e9c7191fbd53518d9ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3351, + "startColumn": 6, + "charOffset": 99068, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3349, + "startColumn": 6, + "charOffset": 98986, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendCreatureEmblem(std::shared_ptr creature) {\n\tif (!creature || !canSee(creature) || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "513db6330ddcef51c04a2b2a055c0b38555e33416c3019ba2d666725d1916844" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3356, + "startColumn": 6, + "charOffset": 99170, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3354, + "startColumn": 6, + "charOffset": 99130, + "charLength": 1, + "snippet": { + "text": "\n\tauto tile = creature->getTile();\n\tif (!tile) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0baade0a4a30abcea3eeba796edcd2819fe5216a5606206afbac8a70176f610f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3365, + "startColumn": 14, + "charOffset": 99428, + "charLength": 4, + "snippet": { + "text": "0x6A" + } + }, + "contextRegion": { + "startLine": 3363, + "startColumn": 14, + "charOffset": 99357, + "charLength": 4, + "snippet": { + "text": "\tsendRemoveTileThing(pos, stackpos);\n\tNetworkMessage msg;\n\tmsg.addByte(0x6A);\n\tmsg.addPosition(pos);\n\tmsg.addByte(static_cast(stackpos));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "436fa7a272a1a1df5424a85e3095e292893166bbb53813b46cc403963d84164e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x6A is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3365, + "startColumn": 14, + "charOffset": 99428, + "charLength": 4, + "snippet": { + "text": "0x6A" + } + }, + "contextRegion": { + "startLine": 3363, + "startColumn": 14, + "charOffset": 99357, + "charLength": 4, + "snippet": { + "text": "\tsendRemoveTileThing(pos, stackpos);\n\tNetworkMessage msg;\n\tmsg.addByte(0x6A);\n\tmsg.addPosition(pos);\n\tmsg.addByte(static_cast(stackpos));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54c826565a189a9b364bb538773cf18ca5802b1564edf7a65ad606090af0cc8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3372, + "startColumn": 64, + "charOffset": 99652, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 3370, + "startColumn": 64, + "charOffset": 99586, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendCreatureSkull(std::shared_ptr creature) {\n\tif (g_game().getWorldType() != WORLD_TYPE_PVP) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c161b65880ed72e5015213dab612e91b7e9b1f15d10f4e2896b7e49d7b4e73c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3382, + "startColumn": 14, + "charOffset": 99802, + "charLength": 4, + "snippet": { + "text": "0x90" + } + }, + "contextRegion": { + "startLine": 3380, + "startColumn": 14, + "charOffset": 99767, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x90);\n\tmsg.add(creature->getID());\n\tmsg.addByte(player->getSkullClient(creature));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d53820f1cc837ecc23b39f09fa338ea7d46abb0297f3f63d88d7bf8205217eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x90 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3382, + "startColumn": 14, + "charOffset": 99802, + "charLength": 4, + "snippet": { + "text": "0x90" + } + }, + "contextRegion": { + "startLine": 3380, + "startColumn": 14, + "charOffset": 99767, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x90);\n\tmsg.add(creature->getID());\n\tmsg.addByte(player->getSkullClient(creature));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e7408eee5562737bcffa1b7515184736055ba9f8920f4bf5a2dceaa9d7b9349" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3388, + "startColumn": 63, + "charOffset": 99988, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 3386, + "startColumn": 63, + "charOffset": 99923, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendCreatureType(std::shared_ptr creature, uint8_t creatureType) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x95);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dba58919e17c0d5d80080a95f7fd30c9a00e5b21a04dcdcfd70e911acfc29bd3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3390, + "startColumn": 14, + "charOffset": 100056, + "charLength": 4, + "snippet": { + "text": "0x95" + } + }, + "contextRegion": { + "startLine": 3388, + "startColumn": 14, + "charOffset": 99926, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendCreatureType(std::shared_ptr creature, uint8_t creatureType) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x95);\n\tmsg.add(creature->getID());\n\tif (creatureType == CREATURETYPE_SUMMON_OTHERS) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "354a93964fc95341442a71518772c50c634444ccafdcacfac2f072beae888617" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x95 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3390, + "startColumn": 14, + "charOffset": 100056, + "charLength": 4, + "snippet": { + "text": "0x95" + } + }, + "contextRegion": { + "startLine": 3388, + "startColumn": 14, + "charOffset": 99926, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendCreatureType(std::shared_ptr creature, uint8_t creatureType) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x95);\n\tmsg.add(creature->getID());\n\tif (creatureType == CREATURETYPE_SUMMON_OTHERS) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8507dd4c38a4ab3ee5ede38176b2732714ec6a9a1d1d8cf65c1811e6e050a626" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3408, + "startColumn": 65, + "charOffset": 100573, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 3406, + "startColumn": 65, + "charOffset": 100506, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendCreatureSquare(std::shared_ptr creature, SquareColor_t color) {\n\tif (!canSee(creature)) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "957beb7a763544ba844cd9453bf4f2107d66c33a4bad090bff02bba50036a676" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3414, + "startColumn": 14, + "charOffset": 100680, + "charLength": 4, + "snippet": { + "text": "0x93" + } + }, + "contextRegion": { + "startLine": 3412, + "startColumn": 14, + "charOffset": 100645, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x93);\n\tmsg.add(creature->getID());\n\tmsg.addByte(0x01);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53cc3ae93bdb5038a45be8ede7b000aaa601506e1e90d7261fb1939cbd11b386" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x93 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3414, + "startColumn": 14, + "charOffset": 100680, + "charLength": 4, + "snippet": { + "text": "0x93" + } + }, + "contextRegion": { + "startLine": 3412, + "startColumn": 14, + "charOffset": 100645, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x93);\n\tmsg.add(creature->getID());\n\tmsg.addByte(0x01);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79d0072e3728cf29abed33fa795ed87c1010a6faddb4e754af3fcfcab3e9d3c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3416, + "startColumn": 14, + "charOffset": 100739, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 3414, + "startColumn": 14, + "charOffset": 100667, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(0x93);\n\tmsg.add(creature->getID());\n\tmsg.addByte(0x01);\n\tmsg.addByte(color);\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ae3a3a4ea1af5ba3bdee77480002f4da3fb31968871615b647ad40500af9513" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3423, + "startColumn": 14, + "charOffset": 100885, + "charLength": 4, + "snippet": { + "text": "0xDC" + } + }, + "contextRegion": { + "startLine": 3421, + "startColumn": 14, + "charOffset": 100797, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendTutorial(uint8_t tutorialId) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xDC);\n\tmsg.addByte(tutorialId);\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb13a7b9514ff95251d096b014e82b62860153ae161dadfa7a194983ecf4ce61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xDC is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3423, + "startColumn": 14, + "charOffset": 100885, + "charLength": 4, + "snippet": { + "text": "0xDC" + } + }, + "contextRegion": { + "startLine": 3421, + "startColumn": 14, + "charOffset": 100797, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendTutorial(uint8_t tutorialId) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xDC);\n\tmsg.addByte(tutorialId);\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72aaf1103ed9cc64ed29ad4d53b63c99e14841f446d336f34b3fba7c78f2fef9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3430, + "startColumn": 14, + "charOffset": 101081, + "charLength": 4, + "snippet": { + "text": "0xDD" + } + }, + "contextRegion": { + "startLine": 3428, + "startColumn": 14, + "charOffset": 100948, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendAddMarker(const Position &pos, uint8_t markType, const std::string &desc) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xDD);\n\n\tif (!oldProtocol) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b4e642a0022554dba943f5720e065a48c31e3b123849c9dabce7c77959d4fd4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xDD is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3430, + "startColumn": 14, + "charOffset": 101081, + "charLength": 4, + "snippet": { + "text": "0xDD" + } + }, + "contextRegion": { + "startLine": 3428, + "startColumn": 14, + "charOffset": 100948, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendAddMarker(const Position &pos, uint8_t markType, const std::string &desc) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xDD);\n\n\tif (!oldProtocol) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "599836902e08a012a90d4dd67a3e205723ea54468aa5b11bc22db03f980b5609" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3443, + "startColumn": 6, + "charOffset": 101439, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3441, + "startColumn": 6, + "charOffset": 101314, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendCyclopediaCharacterNoData(CyclopediaCharacterInfoType_t characterInfoType, uint8_t errorCode) {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d598e3316fc13f37f40098b700404bd8a45f826d88726786a8cfd5f6741c6f6c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3448, + "startColumn": 14, + "charOffset": 101513, + "charLength": 4, + "snippet": { + "text": "0xDA" + } + }, + "contextRegion": { + "startLine": 3446, + "startColumn": 14, + "charOffset": 101478, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xDA);\n\tmsg.addByte(static_cast(characterInfoType));\n\tmsg.addByte(errorCode);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d11a7d78f58d3bd45ce218fbd12e2013c948c395755c821d3042012acc77775c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xDA is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3448, + "startColumn": 14, + "charOffset": 101513, + "charLength": 4, + "snippet": { + "text": "0xDA" + } + }, + "contextRegion": { + "startLine": 3446, + "startColumn": 14, + "charOffset": 101478, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xDA);\n\tmsg.addByte(static_cast(characterInfoType));\n\tmsg.addByte(errorCode);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "362ec5de3cc85ba2dc38648237124e0230dbd484ec96fefa4b3f22ab5e63a408" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3455, + "startColumn": 6, + "charOffset": 101697, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3453, + "startColumn": 6, + "charOffset": 101629, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendCyclopediaCharacterBaseInformation() {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6080dd7d342f19c77b67573c22f0fcfeb475558145ee988d6b624a92332404d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3460, + "startColumn": 14, + "charOffset": 101771, + "charLength": 4, + "snippet": { + "text": "0xDA" + } + }, + "contextRegion": { + "startLine": 3458, + "startColumn": 14, + "charOffset": 101736, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_BASEINFORMATION);\n\tmsg.addByte(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f27c6a7238d87bebfe505ac07380ce7f9b9b78ed19097ea0e5ccea4520a25e0a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xDA is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3460, + "startColumn": 14, + "charOffset": 101771, + "charLength": 4, + "snippet": { + "text": "0xDA" + } + }, + "contextRegion": { + "startLine": 3458, + "startColumn": 14, + "charOffset": 101736, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_BASEINFORMATION);\n\tmsg.addByte(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f26e4b3e66b07e80467b9982e3af1c85cfc23172616cbc891ceb28591968db4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3462, + "startColumn": 14, + "charOffset": 101847, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 3460, + "startColumn": 14, + "charOffset": 101758, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_BASEINFORMATION);\n\tmsg.addByte(0x00);\n\tmsg.addString(player->getName(), \"ProtocolGame::sendCyclopediaCharacterBaseInformation - player->getName()\");\n\tmsg.addString(player->getVocation()->getVocName(), \"ProtocolGame::sendCyclopediaCharacterBaseInformation - player->getVocation()->getVocName()\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33c7d774d6073270e94d1a7b351e2f2a891718b02f6814a43118506690a14d43" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3465, + "startColumn": 20, + "charOffset": 102131, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3463, + "startColumn": 20, + "charOffset": 101854, + "charLength": 6, + "snippet": { + "text": "\tmsg.addString(player->getName(), \"ProtocolGame::sendCyclopediaCharacterBaseInformation - player->getName()\");\n\tmsg.addString(player->getVocation()->getVocName(), \"ProtocolGame::sendCyclopediaCharacterBaseInformation - player->getVocation()->getVocName()\");\n\tmsg.add(player->getLevel());\n\tAddOutfit(msg, player->getDefaultOutfit(), false);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afae6f5594fa610d8dd65d72b49a1cf1407e75b55a93b09021bcc59c8e7cf66d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3468, + "startColumn": 14, + "charOffset": 102218, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 3466, + "startColumn": 14, + "charOffset": 102152, + "charLength": 4, + "snippet": { + "text": "\tAddOutfit(msg, player->getDefaultOutfit(), false);\n\n\tmsg.addByte(0x01); // Store summary & Character titles\n\tmsg.addString(player->title()->getCurrentTitleName(), \"ProtocolGame::sendCyclopediaCharacterBaseInformation - player->title()->getCurrentTitleName()\"); // character title\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3d563f9212097d49ba5d2fff4bc720488f7851a90eee55a02ffddd02ebf8574" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3474, + "startColumn": 6, + "charOffset": 102527, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3472, + "startColumn": 6, + "charOffset": 102462, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendCyclopediaCharacterGeneralStats() {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea497a040d144124c181aa88e3c78327164cfd0e656ec3f216999c95d1d2450e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3479, + "startColumn": 14, + "charOffset": 102601, + "charLength": 4, + "snippet": { + "text": "0xDA" + } + }, + "contextRegion": { + "startLine": 3477, + "startColumn": 14, + "charOffset": 102566, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_GENERALSTATS);\n\t// Send no error" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5325b9b1bde69f059005a33b9921adf57e8e0f8990ec30a847a5782382033b27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xDA is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3479, + "startColumn": 14, + "charOffset": 102601, + "charLength": 4, + "snippet": { + "text": "0xDA" + } + }, + "contextRegion": { + "startLine": 3477, + "startColumn": 14, + "charOffset": 102566, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_GENERALSTATS);\n\t// Send no error" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4eee690d6b0b5242e26995c37d8e7f8ff76b8483b14fb329e22b94c9e3058fc4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3485, + "startColumn": 14, + "charOffset": 102843, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 3483, + "startColumn": 14, + "charOffset": 102719, + "charLength": 4, + "snippet": { + "text": "\t// 2: You are not allowed to see this character's data.\n\t// 3: You are not allowed to inspect this character.\n\tmsg.addByte(0x00); // 0x00 Here means 'no error'\n\n\tmsg.add(player->getExperience());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "933eb2777dacbc5610574a075ec7524668317208f5629e021722842d3babeb94" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3488, + "startColumn": 20, + "charOffset": 102945, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3486, + "startColumn": 20, + "charOffset": 102880, + "charLength": 6, + "snippet": { + "text": "\n\tmsg.add(player->getExperience());\n\tmsg.add(player->getLevel());\n\tmsg.addByte(player->getLevelPercent());\n\tmsg.add(player->getBaseXpGain()); // BaseXPGainRate" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9032b80015e6ed3966f23aa2ea1f7d49fa507ae71fa9a04b2bfd5fa3c63b200b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3498, + "startColumn": 38, + "charOffset": 103658, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3496, + "startColumn": 38, + "charOffset": 103422, + "charLength": 6, + "snippet": { + "text": "\tmsg.add(std::min(player->getHealth(), std::numeric_limits::max()));\n\tmsg.add(std::min(player->getMaxHealth(), std::numeric_limits::max()));\n\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\n\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\n\tmsg.addByte(player->getSoul());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3abb5436a1818a61e8cbbdfe39e81cfbc072f44b796cdcc9ed94506a86945f9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3499, + "startColumn": 38, + "charOffset": 103754, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3497, + "startColumn": 38, + "charOffset": 103520, + "charLength": 6, + "snippet": { + "text": "\tmsg.add(std::min(player->getMaxHealth(), std::numeric_limits::max()));\n\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\n\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\n\tmsg.addByte(player->getSoul());\n\tmsg.add(player->getStaminaMinutes());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c29e122bc1a64af850e2501bf31c07a410ee82f0b14670333418e3f6abb8f871" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3504, + "startColumn": 20, + "charOffset": 104025, + "charLength": 9, + "snippet": { + "text": "condition" + } + }, + "contextRegion": { + "startLine": 3502, + "startColumn": 20, + "charOffset": 103898, + "charLength": 9, + "snippet": { + "text": "\n\tstd::shared_ptr condition = player->getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT);\n\tmsg.add(condition ? condition->getTicks() / 1000 : 0x00);\n\tmsg.add(player->getOfflineTrainingTime() / 60 / 1000);\n\tmsg.add(player->getSpeed());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b99b1f3e92bbbf976e09100c1e443757e357c76237b9c6994eb273dc2b652c14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3504, + "startColumn": 56, + "charOffset": 104061, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 3502, + "startColumn": 56, + "charOffset": 103898, + "charLength": 4, + "snippet": { + "text": "\n\tstd::shared_ptr condition = player->getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT);\n\tmsg.add(condition ? condition->getTicks() / 1000 : 0x00);\n\tmsg.add(player->getOfflineTrainingTime() / 60 / 1000);\n\tmsg.add(player->getSpeed());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc5f6a426070943c45953caddaa8921aa9d12320cbdc76fbedaafdf9c29c93df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3505, + "startColumn": 20, + "charOffset": 104094, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3503, + "startColumn": 20, + "charOffset": 103899, + "charLength": 6, + "snippet": { + "text": "\tstd::shared_ptr condition = player->getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT);\n\tmsg.add(condition ? condition->getTicks() / 1000 : 0x00);\n\tmsg.add(player->getOfflineTrainingTime() / 60 / 1000);\n\tmsg.add(player->getSpeed());\n\tmsg.add(player->getBaseSpeed());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34297183f3fa775fdf89ede371659ce1f80fac6524b925195764af22c5118adf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3505, + "startColumn": 55, + "charOffset": 104129, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 3503, + "startColumn": 55, + "charOffset": 103899, + "charLength": 2, + "snippet": { + "text": "\tstd::shared_ptr condition = player->getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT);\n\tmsg.add(condition ? condition->getTicks() / 1000 : 0x00);\n\tmsg.add(player->getOfflineTrainingTime() / 60 / 1000);\n\tmsg.add(player->getSpeed());\n\tmsg.add(player->getBaseSpeed());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e57c0f757fbcb6a1702842b869d994245fbffce8b3a2c670785731912ab7bb30" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3505, + "startColumn": 60, + "charOffset": 104134, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 3503, + "startColumn": 60, + "charOffset": 103899, + "charLength": 4, + "snippet": { + "text": "\tstd::shared_ptr condition = player->getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT);\n\tmsg.add(condition ? condition->getTicks() / 1000 : 0x00);\n\tmsg.add(player->getOfflineTrainingTime() / 60 / 1000);\n\tmsg.add(player->getSpeed());\n\tmsg.add(player->getBaseSpeed());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6dc8e0cf2d2e7765dba12692bf38c716b84e9d08db6ef2bd4e8b02327f5b9409" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3510, + "startColumn": 74, + "charOffset": 104388, + "charLength": 7, + "snippet": { + "text": "1000000" + } + }, + "contextRegion": { + "startLine": 3508, + "startColumn": 74, + "charOffset": 104225, + "charLength": 7, + "snippet": { + "text": "\tmsg.add(player->getCapacity());\n\tmsg.add(player->getBaseCapacity());\n\tmsg.add(player->hasFlag(PlayerFlags_t::HasInfiniteCapacity) ? 1000000 : player->getFreeCapacity());\n\tmsg.addByte(8);\n\tmsg.addByte(1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78d8c3173dd425f8ee222faca3d03bc653933ac0c5f6a31d69798831b10718b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3511, + "startColumn": 14, + "charOffset": 104439, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 3509, + "startColumn": 14, + "charOffset": 104268, + "charLength": 1, + "snippet": { + "text": "\tmsg.add(player->getBaseCapacity());\n\tmsg.add(player->hasFlag(PlayerFlags_t::HasInfiniteCapacity) ? 1000000 : player->getFreeCapacity());\n\tmsg.addByte(8);\n\tmsg.addByte(1);\n\tmsg.add(player->getMagicLevel());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c62d56e26170d12b5efa92e2d1ec1d9d22ac36a9c31f0f41d8a95161afda217" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3513, + "startColumn": 20, + "charOffset": 104479, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3511, + "startColumn": 20, + "charOffset": 104426, + "charLength": 6, + "snippet": { + "text": "\tmsg.addByte(8);\n\tmsg.addByte(1);\n\tmsg.add(player->getMagicLevel());\n\tmsg.add(player->getBaseMagicLevel());\n\tmsg.add(player->getLoyaltyMagicLevel());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b3cb89a0ce5286b8effa729b2989a20463f0f1a340c8cb61e0bf295a1548a18" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3514, + "startColumn": 20, + "charOffset": 104524, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3512, + "startColumn": 20, + "charOffset": 104443, + "charLength": 6, + "snippet": { + "text": "\tmsg.addByte(1);\n\tmsg.add(player->getMagicLevel());\n\tmsg.add(player->getBaseMagicLevel());\n\tmsg.add(player->getLoyaltyMagicLevel());\n\tmsg.add(player->getMagicLevelPercent() * 100);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8654a7c0d5dbff4b21c1d3c6e679f3205c94404c2b27511ded4190f2c65cb89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3515, + "startColumn": 20, + "charOffset": 104573, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3513, + "startColumn": 20, + "charOffset": 104460, + "charLength": 6, + "snippet": { + "text": "\tmsg.add(player->getMagicLevel());\n\tmsg.add(player->getBaseMagicLevel());\n\tmsg.add(player->getLoyaltyMagicLevel());\n\tmsg.add(player->getMagicLevelPercent() * 100);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77af9233549dab676c65a99d6a58355646a2f281ff62280afb38cce95d96e9fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3516, + "startColumn": 20, + "charOffset": 104625, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3514, + "startColumn": 20, + "charOffset": 104505, + "charLength": 6, + "snippet": { + "text": "\tmsg.add(player->getBaseMagicLevel());\n\tmsg.add(player->getLoyaltyMagicLevel());\n\tmsg.add(player->getMagicLevelPercent() * 100);\n\n\tfor (uint8_t i = SKILL_FIRST; i < SKILL_CRITICAL_HIT_CHANCE; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9705cce99483c49a266b9e28e9740abe1bbaa91e9aa2fe5fe6ed37088be56e50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3516, + "startColumn": 20, + "charOffset": 104625, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3514, + "startColumn": 20, + "charOffset": 104505, + "charLength": 6, + "snippet": { + "text": "\tmsg.add(player->getBaseMagicLevel());\n\tmsg.add(player->getLoyaltyMagicLevel());\n\tmsg.add(player->getMagicLevelPercent() * 100);\n\n\tfor (uint8_t i = SKILL_FIRST; i < SKILL_CRITICAL_HIT_CHANCE; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1385ebcc48a087534e04753252ffc404e96614a955b5073125dc8a82763a67ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3516, + "startColumn": 53, + "charOffset": 104658, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 3514, + "startColumn": 53, + "charOffset": 104505, + "charLength": 3, + "snippet": { + "text": "\tmsg.add(player->getBaseMagicLevel());\n\tmsg.add(player->getLoyaltyMagicLevel());\n\tmsg.add(player->getMagicLevelPercent() * 100);\n\n\tfor (uint8_t i = SKILL_FIRST; i < SKILL_CRITICAL_HIT_CHANCE; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c77f9ec51737f1f754378502645df9e1e52471c8a26ea1ca92f80a62e2829c55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3518, + "startColumn": 2, + "charOffset": 104666, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3516, + "startColumn": 2, + "charOffset": 104606, + "charLength": 3, + "snippet": { + "text": "\tmsg.add(player->getMagicLevelPercent() * 100);\n\n\tfor (uint8_t i = SKILL_FIRST; i < SKILL_CRITICAL_HIT_CHANCE; ++i) {\n\t\tstatic const uint8_t HardcodedSkillIds[] = { 11, 9, 8, 10, 7, 6, 13 };\n\t\tconst auto skill = static_cast(i);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d901dc747c5ec9cfa5e44e9d592fd32fc89335097314cb413b838ccd292b2456" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-c-arrays", + "ruleIndex": 480, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not declare C-style arrays, use std::array<> instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3519, + "startColumn": 16, + "charOffset": 104749, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 3517, + "startColumn": 16, + "charOffset": 104664, + "charLength": 7, + "snippet": { + "text": "\n\tfor (uint8_t i = SKILL_FIRST; i < SKILL_CRITICAL_HIT_CHANCE; ++i) {\n\t\tstatic const uint8_t HardcodedSkillIds[] = { 11, 9, 8, 10, 7, 6, 13 };\n\t\tconst auto skill = static_cast(i);\n\t\tmsg.addByte(HardcodedSkillIds[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08444d37195056aba763265f0db7f23d0cfa2ad1b0251add24f9eab140a903fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3521, + "startColumn": 15, + "charOffset": 104868, + "charLength": 17, + "snippet": { + "text": "HardcodedSkillIds" + } + }, + "contextRegion": { + "startLine": 3519, + "startColumn": 15, + "charOffset": 104734, + "charLength": 17, + "snippet": { + "text": "\t\tstatic const uint8_t HardcodedSkillIds[] = { 11, 9, 8, 10, 7, 6, 13 };\n\t\tconst auto skill = static_cast(i);\n\t\tmsg.addByte(HardcodedSkillIds[i]);\n\t\tmsg.add(std::min(player->getSkillLevel(skill), std::numeric_limits::max()));\n\t\tmsg.add(player->getBaseSkill(skill));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b0c07de2c030deb865d17222a61a1a6c4731a302713807266d265fda861df7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3522, + "startColumn": 21, + "charOffset": 104911, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 3520, + "startColumn": 21, + "charOffset": 104807, + "charLength": 3, + "snippet": { + "text": "\t\tconst auto skill = static_cast(i);\n\t\tmsg.addByte(HardcodedSkillIds[i]);\n\t\tmsg.add(std::min(player->getSkillLevel(skill), std::numeric_limits::max()));\n\t\tmsg.add(player->getBaseSkill(skill));\n\t\tmsg.add(player->getLoyaltySkill(skill));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2def4eb83ec2284a41455b2ceb270ad4bcb5bba96d425c6576ca15eae04cd786" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3525, + "startColumn": 21, + "charOffset": 105122, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3523, + "startColumn": 21, + "charOffset": 104999, + "charLength": 6, + "snippet": { + "text": "\t\tmsg.add(player->getBaseSkill(skill));\n\t\tmsg.add(player->getLoyaltySkill(skill));\n\t\tmsg.add(player->getSkillPercent(skill) * 100);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "363328fa839aac2fd74e7926771bf8b42b27b40bc11bd076f724b868cc228ed4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3525, + "startColumn": 21, + "charOffset": 105122, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3523, + "startColumn": 21, + "charOffset": 104999, + "charLength": 6, + "snippet": { + "text": "\t\tmsg.add(player->getBaseSkill(skill));\n\t\tmsg.add(player->getLoyaltySkill(skill));\n\t\tmsg.add(player->getSkillPercent(skill) * 100);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ebfba234ad0cf4f747f50f7ff23f1f223b05bb24348ca283ed55062b7b2f80c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3525, + "startColumn": 54, + "charOffset": 105155, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 3523, + "startColumn": 54, + "charOffset": 104999, + "charLength": 3, + "snippet": { + "text": "\t\tmsg.add(player->getBaseSkill(skill));\n\t\tmsg.add(player->getLoyaltySkill(skill));\n\t\tmsg.add(player->getSkillPercent(skill) * 100);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "233a01d7d00d90f77a1836c75a0034739ddcbb993e053ade147fc33760a60699" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3531, + "startColumn": 2, + "charOffset": 105253, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3529, + "startColumn": 2, + "charOffset": 105213, + "charLength": 3, + "snippet": { + "text": "\tmsg.skipBytes(1);\n\tuint8_t total = 0;\n\tfor (size_t i = 0; i < COMBAT_COUNT; i++) {\n\t\tauto specializedMagicLevel = player->getSpecializedMagicLevel(indexToCombatType(i));\n\t\tif (specializedMagicLevel > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25727df04bc6c78c1c80077474680c6e4897ae8535699a4a01954d6c959c2df6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3536, + "startColumn": 22, + "charOffset": 105508, + "charLength": 21, + "snippet": { + "text": "specializedMagicLevel" + } + }, + "contextRegion": { + "startLine": 3534, + "startColumn": 22, + "charOffset": 105419, + "charLength": 21, + "snippet": { + "text": "\t\t\t++total;\n\t\t\tmsg.addByte(getCipbiaElement(indexToCombatType(i)));\n\t\t\tmsg.add(specializedMagicLevel);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b77ef17f064bc08ecead31a71b8a36c4cd2b9b9073682cabb235e17707ed404f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'sendCyclopediaCharacterCombatStats' has cognitive complexity of 57 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3544, + "startColumn": 20, + "charOffset": 105649, + "charLength": 34, + "snippet": { + "text": "sendCyclopediaCharacterCombatStats" + } + }, + "contextRegion": { + "startLine": 3542, + "startColumn": 20, + "charOffset": 105627, + "charLength": 34, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendCyclopediaCharacterCombatStats() {\n\tif (!player || oldProtocol) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6dc554505fb381d73cf2ed421690d8810f0f880e835f16997fe5b3f1d19c3168" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3545, + "startColumn": 6, + "charOffset": 105693, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3543, + "startColumn": 6, + "charOffset": 105629, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendCyclopediaCharacterCombatStats() {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f3ab5ae51705de8918986fcb00387acbd3b9d5a51ec83b400390361149aafdd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3550, + "startColumn": 14, + "charOffset": 105767, + "charLength": 4, + "snippet": { + "text": "0xDA" + } + }, + "contextRegion": { + "startLine": 3548, + "startColumn": 14, + "charOffset": 105732, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_COMBATSTATS);\n\tmsg.addByte(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e357cbcf4db9dce9187c23d7782725063d3b860da30a6258c9160ba9cb63c709" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xDA is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3550, + "startColumn": 14, + "charOffset": 105767, + "charLength": 4, + "snippet": { + "text": "0xDA" + } + }, + "contextRegion": { + "startLine": 3548, + "startColumn": 14, + "charOffset": 105732, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_COMBATSTATS);\n\tmsg.addByte(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd39a842b13062c50f44aabac0ce11c9ac9f17cb7d00095f927d69b9677c0605" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3552, + "startColumn": 14, + "charOffset": 105839, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 3550, + "startColumn": 14, + "charOffset": 105754, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_COMBATSTATS);\n\tmsg.addByte(0x00);\n\tfor (uint8_t i = SKILL_CRITICAL_HIT_CHANCE; i <= SKILL_LAST; ++i) {\n\t\tif (i == SKILL_LIFE_LEECH_CHANCE || i == SKILL_MANA_LEECH_CHANCE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "490f7baa3785b54a58d6f53de6fde1c713e4688dc2323c80d20a22580d23a1cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3553, + "startColumn": 2, + "charOffset": 105847, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3551, + "startColumn": 2, + "charOffset": 105774, + "charLength": 3, + "snippet": { + "text": "\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_COMBATSTATS);\n\tmsg.addByte(0x00);\n\tfor (uint8_t i = SKILL_CRITICAL_HIT_CHANCE; i <= SKILL_LAST; ++i) {\n\t\tif (i == SKILL_LIFE_LEECH_CHANCE || i == SKILL_MANA_LEECH_CHANCE) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3965757c94bff7217d624da524f5cc480dc582c1e6154ad8c734d462c4241d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3557, + "startColumn": 3, + "charOffset": 106004, + "charLength": 8, + "snippet": { + "text": "skills_t" + } + }, + "contextRegion": { + "startLine": 3555, + "startColumn": 3, + "charOffset": 105985, + "charLength": 8, + "snippet": { + "text": "\t\t\tcontinue;\n\t\t}\n\t\tskills_t skill = static_cast(i);\n\t\tmsg.add(std::min(player->getSkillLevel(skill), std::numeric_limits::max()));\n\t\tmsg.add(0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a6d61b46a7e93cb652ccafb5112ab22aed677380772a0e087f0cff379393c07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3558, + "startColumn": 21, + "charOffset": 106067, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 3556, + "startColumn": 21, + "charOffset": 105998, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t\tskills_t skill = static_cast(i);\n\t\tmsg.add(std::min(player->getSkillLevel(skill), std::numeric_limits::max()));\n\t\tmsg.add(0);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de78e9ea049a2ff8c26dad56579dede673095a42bedaaa52baea9d22e034c559" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3572, + "startColumn": 2, + "charOffset": 106625, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3570, + "startColumn": 2, + "charOffset": 106592, + "charLength": 3, + "snippet": { + "text": "\n\t// Perfect shot range (12.70)\n\tfor (uint8_t range = 1; range <= 5; range++) {\n\t\tmsg.add(static_cast(player->getPerfectShotDamage(range)));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c92390f0e6e65556457e3e939f5c683788539517f55611fd12465e2dc3ca82d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3572, + "startColumn": 35, + "charOffset": 106658, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 3570, + "startColumn": 35, + "charOffset": 106592, + "charLength": 1, + "snippet": { + "text": "\n\t// Perfect shot range (12.70)\n\tfor (uint8_t range = 1; range <= 5; range++) {\n\t\tmsg.add(static_cast(player->getPerfectShotDamage(range)));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac9cbecc252765a85810a0b9367bdbdb7cda1e34ac3ea65d351691e3368533b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3580, + "startColumn": 2, + "charOffset": 106905, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3578, + "startColumn": 2, + "charOffset": 106877, + "charLength": 3, + "snippet": { + "text": "\n\tuint8_t haveBlesses = 0;\n\tfor (auto bless : magic_enum::enum_values()) {\n\t\tif (player->hasBlessing(enumToValue(bless))) {\n\t\t\t++haveBlesses;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "462051e6c94688bda2a2932b3ad84151feef78cf44a1be4fa82f40d297f40cde" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3587, + "startColumn": 14, + "charOffset": 107078, + "charLength": 10, + "snippet": { + "text": "magic_enum" + } + }, + "contextRegion": { + "startLine": 3585, + "startColumn": 14, + "charOffset": 107037, + "charLength": 10, + "snippet": { + "text": "\n\tmsg.addByte(haveBlesses);\n\tmsg.addByte(magic_enum::enum_count());\n\n\tstd::shared_ptr weapon = player->getWeapon();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "979d8843762d0f70a399af5bef707a7b4e13bfcac8f2f6d8524d670968922146" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3593, + "startColumn": 22, + "charOffset": 107297, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 3591, + "startColumn": 22, + "charOffset": 107185, + "charLength": 2, + "snippet": { + "text": "\t\tconst ItemType &it = Item::items[weapon->getID()];\n\t\tif (it.weaponType == WEAPON_WAND) {\n\t\t\tmsg.add(it.maxHitChance);\n\t\t\tmsg.addByte(getCipbiaElement(it.combatType));\n\t\t\tmsg.addByte(0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9032b80015e6ed3966f23aa2ea1f7d49fa507ae71fa9a04b2bfd5fa3c63b200b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3608, + "startColumn": 45, + "charOffset": 107905, + "charLength": 7, + "snippet": { + "text": "Weapons" + } + }, + "contextRegion": { + "startLine": 3606, + "startColumn": 45, + "charOffset": 107746, + "charLength": 7, + "snippet": { + "text": "\t\t\tint32_t attackSkill = player->getSkillLevel(SKILL_DISTANCE);\n\t\t\tfloat attackFactor = player->getAttackFactor();\n\t\t\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor, true) * player->getVocation()->distDamageMultiplier);\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\n\t\t\t\tmaxDamage += static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue - weapon->getAttack() + it.abilities->elementDamage, attackFactor, true) * player->getVocation()->distDamageMultiplier);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d47173f4da7bf6c6b044a6dabda37ee6fb29c0e9292a6cede3cad2123398c298" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3608, + "startColumn": 45, + "charOffset": 107905, + "charLength": 7, + "snippet": { + "text": "Weapons" + } + }, + "contextRegion": { + "startLine": 3606, + "startColumn": 45, + "charOffset": 107746, + "charLength": 7, + "snippet": { + "text": "\t\t\tint32_t attackSkill = player->getSkillLevel(SKILL_DISTANCE);\n\t\t\tfloat attackFactor = player->getAttackFactor();\n\t\t\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor, true) * player->getVocation()->distDamageMultiplier);\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\n\t\t\t\tmaxDamage += static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue - weapon->getAttack() + it.abilities->elementDamage, attackFactor, true) * player->getVocation()->distDamageMultiplier);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72c929fc4cf18d61ddc61e0424fdbaa8142da98a9e8c168fcf14bb56a3412243" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3610, + "startColumn": 39, + "charOffset": 108152, + "charLength": 7, + "snippet": { + "text": "Weapons" + } + }, + "contextRegion": { + "startLine": 3608, + "startColumn": 39, + "charOffset": 107861, + "charLength": 7, + "snippet": { + "text": "\t\t\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor, true) * player->getVocation()->distDamageMultiplier);\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\n\t\t\t\tmaxDamage += static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue - weapon->getAttack() + it.abilities->elementDamage, attackFactor, true) * player->getVocation()->distDamageMultiplier);\n\t\t\t}\n\t\t\tmsg.add(maxDamage >> 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c53127ac56c9616ff8ba21dd8a5a495cd899f6e7b0b0f2113f26643f6d10d09" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3610, + "startColumn": 39, + "charOffset": 108152, + "charLength": 7, + "snippet": { + "text": "Weapons" + } + }, + "contextRegion": { + "startLine": 3608, + "startColumn": 39, + "charOffset": 107861, + "charLength": 7, + "snippet": { + "text": "\t\t\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor, true) * player->getVocation()->distDamageMultiplier);\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\n\t\t\t\tmaxDamage += static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue - weapon->getAttack() + it.abilities->elementDamage, attackFactor, true) * player->getVocation()->distDamageMultiplier);\n\t\t\t}\n\t\t\tmsg.add(maxDamage >> 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6bdca0cef395b955c8ef0c9cf137b4c51e0e360e0bff7d5015090412476393dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3612, + "startColumn": 22, + "charOffset": 108372, + "charLength": 9, + "snippet": { + "text": "maxDamage" + } + }, + "contextRegion": { + "startLine": 3610, + "startColumn": 22, + "charOffset": 108114, + "charLength": 9, + "snippet": { + "text": "\t\t\t\tmaxDamage += static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue - weapon->getAttack() + it.abilities->elementDamage, attackFactor, true) * player->getVocation()->distDamageMultiplier);\n\t\t\t}\n\t\t\tmsg.add(maxDamage >> 1);\n\t\t\tmsg.addByte(CIPBIA_ELEMENTAL_PHYSICAL);\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9911f0339708de4ee008501a0c9f7945216ebce1fb85b5245376c7917a1d0828" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3612, + "startColumn": 22, + "charOffset": 108372, + "charLength": 9, + "snippet": { + "text": "maxDamage" + } + }, + "contextRegion": { + "startLine": 3610, + "startColumn": 22, + "charOffset": 108114, + "charLength": 9, + "snippet": { + "text": "\t\t\t\tmaxDamage += static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue - weapon->getAttack() + it.abilities->elementDamage, attackFactor, true) * player->getVocation()->distDamageMultiplier);\n\t\t\t}\n\t\t\tmsg.add(maxDamage >> 1);\n\t\t\tmsg.addByte(CIPBIA_ELEMENTAL_PHYSICAL);\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7af626654db13ec9ae5a1cdb72cf5d4167bcbd8144ab7bab91593ecbf274cdc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3615, + "startColumn": 9, + "charOffset": 108507, + "charLength": 11, + "snippet": { + "text": "attackValue" + } + }, + "contextRegion": { + "startLine": 3613, + "startColumn": 9, + "charOffset": 108389, + "charLength": 11, + "snippet": { + "text": "\t\t\tmsg.addByte(CIPBIA_ELEMENTAL_PHYSICAL);\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\n\t\t\t\tif (attackValue) {\n\t\t\t\t\tmsg.addByte(static_cast(it.abilities->elementDamage) * 100 / attackValue);\n\t\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1633a8be2d130875d1baf699e41a4a4bb15745fa0fcb3ae01bb4d9476116d93" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3615, + "startColumn": 9, + "charOffset": 108507, + "charLength": 11, + "snippet": { + "text": "attackValue" + } + }, + "contextRegion": { + "startLine": 3613, + "startColumn": 9, + "charOffset": 108389, + "charLength": 11, + "snippet": { + "text": "\t\t\tmsg.addByte(CIPBIA_ELEMENTAL_PHYSICAL);\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\n\t\t\t\tif (attackValue) {\n\t\t\t\t\tmsg.addByte(static_cast(it.abilities->elementDamage) * 100 / attackValue);\n\t\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3323af74584a3ccbc9a3f4f582ed12b06babdcd4ebb433c3e1a9e8c3f25659f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3616, + "startColumn": 18, + "charOffset": 108539, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 3614, + "startColumn": 18, + "charOffset": 108432, + "charLength": 11, + "snippet": { + "text": "\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\n\t\t\t\tif (attackValue) {\n\t\t\t\t\tmsg.addByte(static_cast(it.abilities->elementDamage) * 100 / attackValue);\n\t\t\t\t} else {\n\t\t\t\t\tmsg.addByte(0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d5685b21786a96d6156ac7b04541fbb325a1b182e8a8d7b3d35705cba86d063" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3616, + "startColumn": 71, + "charOffset": 108592, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 3614, + "startColumn": 71, + "charOffset": 108432, + "charLength": 3, + "snippet": { + "text": "\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\n\t\t\t\tif (attackValue) {\n\t\t\t\t\tmsg.addByte(static_cast(it.abilities->elementDamage) * 100 / attackValue);\n\t\t\t\t} else {\n\t\t\t\t\tmsg.addByte(0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c5ba800d08c7b4092d6631b217bfa553120f0b82e73815518893884c1e641f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3628, + "startColumn": 45, + "charOffset": 109002, + "charLength": 7, + "snippet": { + "text": "Weapons" + } + }, + "contextRegion": { + "startLine": 3626, + "startColumn": 45, + "charOffset": 108850, + "charLength": 7, + "snippet": { + "text": "\t\t\tint32_t attackSkill = player->getWeaponSkill(weapon);\n\t\t\tfloat attackFactor = player->getAttackFactor();\n\t\t\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\n\t\t\t\tmaxDamage += static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, it.abilities->elementDamage, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "131792ff5a43e42f9f74efa0403835d6ab7140be10c1bdf97bb39fa79f7141aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3628, + "startColumn": 45, + "charOffset": 109002, + "charLength": 7, + "snippet": { + "text": "Weapons" + } + }, + "contextRegion": { + "startLine": 3626, + "startColumn": 45, + "charOffset": 108850, + "charLength": 7, + "snippet": { + "text": "\t\t\tint32_t attackSkill = player->getWeaponSkill(weapon);\n\t\t\tfloat attackFactor = player->getAttackFactor();\n\t\t\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\n\t\t\t\tmaxDamage += static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, it.abilities->elementDamage, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "719ef002a03e13ab2e87325dcd76b8eda0e5f1d2154ea7bf9ab2d5d104f3301a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3630, + "startColumn": 39, + "charOffset": 109250, + "charLength": 7, + "snippet": { + "text": "Weapons" + } + }, + "contextRegion": { + "startLine": 3628, + "startColumn": 39, + "charOffset": 108958, + "charLength": 7, + "snippet": { + "text": "\t\t\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\n\t\t\t\tmaxDamage += static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, it.abilities->elementDamage, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\n\t\t\t}\n\t\t\tmsg.add(maxDamage >> 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9906361562c5cda37820b88d412c014d9c7b7dfc5d231a09ae90247f9984eb8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3630, + "startColumn": 39, + "charOffset": 109250, + "charLength": 7, + "snippet": { + "text": "Weapons" + } + }, + "contextRegion": { + "startLine": 3628, + "startColumn": 39, + "charOffset": 108958, + "charLength": 7, + "snippet": { + "text": "\t\t\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\n\t\t\t\tmaxDamage += static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, it.abilities->elementDamage, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\n\t\t\t}\n\t\t\tmsg.add(maxDamage >> 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6fe0372dcdde28d22b2d2688ecd0db74dec8b974ed9dcc0aea0f0a119f5c4772" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3632, + "startColumn": 22, + "charOffset": 109435, + "charLength": 9, + "snippet": { + "text": "maxDamage" + } + }, + "contextRegion": { + "startLine": 3630, + "startColumn": 22, + "charOffset": 109212, + "charLength": 9, + "snippet": { + "text": "\t\t\t\tmaxDamage += static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, it.abilities->elementDamage, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\n\t\t\t}\n\t\t\tmsg.add(maxDamage >> 1);\n\t\t\tmsg.addByte(CIPBIA_ELEMENTAL_PHYSICAL);\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7229e2b6d4a1bab49777e568ce2e0a4b1424c9cb24587e159abf0fa71613235" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3632, + "startColumn": 22, + "charOffset": 109435, + "charLength": 9, + "snippet": { + "text": "maxDamage" + } + }, + "contextRegion": { + "startLine": 3630, + "startColumn": 22, + "charOffset": 109212, + "charLength": 9, + "snippet": { + "text": "\t\t\t\tmaxDamage += static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, it.abilities->elementDamage, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\n\t\t\t}\n\t\t\tmsg.add(maxDamage >> 1);\n\t\t\tmsg.addByte(CIPBIA_ELEMENTAL_PHYSICAL);\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c84e2e8b2dbd322c84710c0e1f151536f5da4f4d57548222f59832090aeed5c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3635, + "startColumn": 9, + "charOffset": 109570, + "charLength": 11, + "snippet": { + "text": "attackValue" + } + }, + "contextRegion": { + "startLine": 3633, + "startColumn": 9, + "charOffset": 109452, + "charLength": 11, + "snippet": { + "text": "\t\t\tmsg.addByte(CIPBIA_ELEMENTAL_PHYSICAL);\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\n\t\t\t\tif (attackValue) {\n\t\t\t\t\tmsg.addByte(static_cast(it.abilities->elementDamage) * 100 / attackValue);\n\t\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45dac0be85b323508d55eba030ade8ca164987a83a53e2eb17788c740bb5bced" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3635, + "startColumn": 9, + "charOffset": 109570, + "charLength": 11, + "snippet": { + "text": "attackValue" + } + }, + "contextRegion": { + "startLine": 3633, + "startColumn": 9, + "charOffset": 109452, + "charLength": 11, + "snippet": { + "text": "\t\t\tmsg.addByte(CIPBIA_ELEMENTAL_PHYSICAL);\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\n\t\t\t\tif (attackValue) {\n\t\t\t\t\tmsg.addByte(static_cast(it.abilities->elementDamage) * 100 / attackValue);\n\t\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53ed33602f984951ca0b9dedce54cf48976d5995e44ce4451d18607f426a0add" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3636, + "startColumn": 18, + "charOffset": 109602, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 3634, + "startColumn": 18, + "charOffset": 109495, + "charLength": 11, + "snippet": { + "text": "\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\n\t\t\t\tif (attackValue) {\n\t\t\t\t\tmsg.addByte(static_cast(it.abilities->elementDamage) * 100 / attackValue);\n\t\t\t\t} else {\n\t\t\t\t\tmsg.addByte(0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3fe226baee2f6940b9064d8f4845d8b5c517ea767f70e39513578978b7982d0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3636, + "startColumn": 71, + "charOffset": 109655, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 3634, + "startColumn": 71, + "charOffset": 109495, + "charLength": 3, + "snippet": { + "text": "\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\n\t\t\t\tif (attackValue) {\n\t\t\t\t\tmsg.addByte(static_cast(it.abilities->elementDamage) * 100 / attackValue);\n\t\t\t\t} else {\n\t\t\t\t\tmsg.addByte(0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d227b6e11de2b4745a36e8dd50cfa72f3bb6a25c0214096bf66d1cf8b4372519" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3648, + "startColumn": 25, + "charOffset": 109981, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 3646, + "startColumn": 25, + "charOffset": 109848, + "charLength": 1, + "snippet": { + "text": "\t\tfloat attackFactor = player->getAttackFactor();\n\t\tint32_t attackSkill = player->getSkillLevel(SKILL_FIST);\n\t\tint32_t attackValue = 7;\n\n\t\tint32_t maxDamage = Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e61c3bfa246a0c2be21c4dddc10ac1b55b37974e1c32bb0f272b670fed49211" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3651, + "startColumn": 21, + "charOffset": 110122, + "charLength": 9, + "snippet": { + "text": "maxDamage" + } + }, + "contextRegion": { + "startLine": 3649, + "startColumn": 21, + "charOffset": 109984, + "charLength": 9, + "snippet": { + "text": "\n\t\tint32_t maxDamage = Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor, true);\n\t\tmsg.add(maxDamage >> 1);\n\t\tmsg.addByte(CIPBIA_ELEMENTAL_PHYSICAL);\n\t\tmsg.addByte(0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d13c32f564990a3611af48b73be5321c0a554af6636d6d8e1bb9c5c5f842158c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3651, + "startColumn": 21, + "charOffset": 110122, + "charLength": 9, + "snippet": { + "text": "maxDamage" + } + }, + "contextRegion": { + "startLine": 3649, + "startColumn": 21, + "charOffset": 109984, + "charLength": 9, + "snippet": { + "text": "\n\t\tint32_t maxDamage = Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor, true);\n\t\tmsg.add(maxDamage >> 1);\n\t\tmsg.addByte(CIPBIA_ELEMENTAL_PHYSICAL);\n\t\tmsg.addByte(0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6bdd60ba4926975cca9cad5b9959945349d817d8326557a3c1cf46ddae8d7f73" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3657, + "startColumn": 20, + "charOffset": 110240, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3655, + "startColumn": 20, + "charOffset": 110217, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tmsg.add(player->getArmor());\n\tmsg.add(player->getDefense());\n\t// Wheel of destiny mitigation" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "071f66a24379c4e1993edb994b4c80a0b9b22c99c67775fd8fc3625218b27bed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3658, + "startColumn": 20, + "charOffset": 110280, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3656, + "startColumn": 20, + "charOffset": 110220, + "charLength": 6, + "snippet": { + "text": "\n\tmsg.add(player->getArmor());\n\tmsg.add(player->getDefense());\n\t// Wheel of destiny mitigation\n\tif (g_configManager().getBoolean(TOGGLE_WHEELSYSTEM, __FUNCTION__)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74e76205d9862f18f63f629d6abe0b12e012781b6a7067b50fce109cff55c070" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3663, + "startColumn": 17, + "charOffset": 110474, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 3661, + "startColumn": 17, + "charOffset": 110406, + "charLength": 1, + "snippet": { + "text": "\t\tmsg.addDouble(player->getMitigation());\n\t} else {\n\t\tmsg.addDouble(0);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3f08e4497150731435a66560debe6d014f5b9e22adbafc50f784101f109e8ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3685, + "startColumn": 2, + "charOffset": 111154, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3683, + "startColumn": 2, + "charOffset": 111069, + "charLength": 3, + "snippet": { + "text": "\tauto activeConcoctions = player->getActiveConcoctions();\n\tuint8_t concoctions = 0;\n\tfor (const auto &concoction : activeConcoctions) {\n\t\tif (concoction.second == 0) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b9785fac36edfd44a70401631289a43af2a7bb862ab0420af7d0de860b7ec69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3701, + "startColumn": 6, + "charOffset": 111593, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3699, + "startColumn": 6, + "charOffset": 111453, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendCyclopediaCharacterRecentDeaths(uint16_t page, uint16_t pages, const std::vector &entries) {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89654d591f3324430d87e11567075b5c29ecf00a8d06e5d86d7ef72405d39252" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3706, + "startColumn": 14, + "charOffset": 111667, + "charLength": 4, + "snippet": { + "text": "0xDA" + } + }, + "contextRegion": { + "startLine": 3704, + "startColumn": 14, + "charOffset": 111632, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_RECENTDEATHS);\n\tmsg.addByte(0x00); // 0x00 Here means 'no error'" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c649f214ee19e4f9a07d4534affc51d02958848f5a166353872445e523044bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xDA is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3706, + "startColumn": 14, + "charOffset": 111667, + "charLength": 4, + "snippet": { + "text": "0xDA" + } + }, + "contextRegion": { + "startLine": 3704, + "startColumn": 14, + "charOffset": 111632, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_RECENTDEATHS);\n\tmsg.addByte(0x00); // 0x00 Here means 'no error'" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5e18a867c6e8c585944c42e19b1a0f002bdd4084903dd7079e4a3b11653d06e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3708, + "startColumn": 14, + "charOffset": 111740, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 3706, + "startColumn": 14, + "charOffset": 111654, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_RECENTDEATHS);\n\tmsg.addByte(0x00); // 0x00 Here means 'no error'\n\tmsg.add(page);\n\tmsg.add(pages);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35fa210da436c3b5269d0e09ac2baf78bf143a8977616b8a3f68122ae6fb66de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3711, + "startColumn": 20, + "charOffset": 111849, + "charLength": 7, + "snippet": { + "text": "entries" + } + }, + "contextRegion": { + "startLine": 3709, + "startColumn": 20, + "charOffset": 111777, + "charLength": 7, + "snippet": { + "text": "\tmsg.add(page);\n\tmsg.add(pages);\n\tmsg.add(entries.size());\n\tfor (const RecentDeathEntry &entry : entries) {\n\t\tmsg.add(entry.timestamp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75a2aff057e96970bb0d379f8104ab70d52c14842b9dc18426b890b28e205956" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3712, + "startColumn": 2, + "charOffset": 111867, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3710, + "startColumn": 2, + "charOffset": 111803, + "charLength": 3, + "snippet": { + "text": "\tmsg.add(pages);\n\tmsg.add(entries.size());\n\tfor (const RecentDeathEntry &entry : entries) {\n\t\tmsg.add(entry.timestamp);\n\t\tmsg.addString(entry.cause, \"ProtocolGame::sendCyclopediaCharacterRecentDeaths - entry.cause\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ad32e23b4e58a12c69546b69aaf686381c2715e55f0db1de23cf52d32eee6b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3721, + "startColumn": 6, + "charOffset": 112227, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3719, + "startColumn": 6, + "charOffset": 112083, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendCyclopediaCharacterRecentPvPKills(uint16_t page, uint16_t pages, const std::vector &entries) {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fb93b7735435bed975903351e5e0aeaad6fa98572ddf24f4a2e2c8e1dd2ee63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3726, + "startColumn": 14, + "charOffset": 112301, + "charLength": 4, + "snippet": { + "text": "0xDA" + } + }, + "contextRegion": { + "startLine": 3724, + "startColumn": 14, + "charOffset": 112266, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_RECENTPVPKILLS);\n\tmsg.addByte(0x00); // 0x00 Here means 'no error'" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "420220b35f46a038602b290882e603e7363d3ae4610039d9109e84a986ba59fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xDA is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3726, + "startColumn": 14, + "charOffset": 112301, + "charLength": 4, + "snippet": { + "text": "0xDA" + } + }, + "contextRegion": { + "startLine": 3724, + "startColumn": 14, + "charOffset": 112266, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_RECENTPVPKILLS);\n\tmsg.addByte(0x00); // 0x00 Here means 'no error'" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c987a18ea5c140bfda3891190696dd6de6f3471f3fabcd3577b277e72d1bc271" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3728, + "startColumn": 14, + "charOffset": 112376, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 3726, + "startColumn": 14, + "charOffset": 112288, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_RECENTPVPKILLS);\n\tmsg.addByte(0x00); // 0x00 Here means 'no error'\n\tmsg.add(page);\n\tmsg.add(pages);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f24483c380096934210b0b88de352c8b38e3530a02f272c719b36f9f8e023302" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3731, + "startColumn": 20, + "charOffset": 112485, + "charLength": 7, + "snippet": { + "text": "entries" + } + }, + "contextRegion": { + "startLine": 3729, + "startColumn": 20, + "charOffset": 112413, + "charLength": 7, + "snippet": { + "text": "\tmsg.add(page);\n\tmsg.add(pages);\n\tmsg.add(entries.size());\n\tfor (const RecentPvPKillEntry &entry : entries) {\n\t\tmsg.add(entry.timestamp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45a204e1f9a88ee5778d7a5037ecf1e616ce0d7f00df561dbbc6b9ee59e08f26" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3732, + "startColumn": 2, + "charOffset": 112503, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3730, + "startColumn": 2, + "charOffset": 112439, + "charLength": 3, + "snippet": { + "text": "\tmsg.add(pages);\n\tmsg.add(entries.size());\n\tfor (const RecentPvPKillEntry &entry : entries) {\n\t\tmsg.add(entry.timestamp);\n\t\tmsg.addString(entry.description, \"ProtocolGame::sendCyclopediaCharacterRecentPvPKills - entry.description\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3965757c94bff7217d624da524f5cc480dc582c1e6154ad8c734d462c4241d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'achievementsUnlocked' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3741, + "startColumn": 128, + "charOffset": 112892, + "charLength": 20, + "snippet": { + "text": "achievementsUnlocked" + } + }, + "contextRegion": { + "startLine": 3739, + "startColumn": 128, + "charOffset": 112762, + "charLength": 20, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendCyclopediaCharacterAchievements(uint16_t secretsUnlocked, std::vector> achievementsUnlocked) {\n\tif (!player || oldProtocol) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce5750d548a1c171bbfcfb7fba61f063aa55d1a5c6b063f7188851e517eb2fca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3742, + "startColumn": 6, + "charOffset": 112921, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3740, + "startColumn": 6, + "charOffset": 112764, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendCyclopediaCharacterAchievements(uint16_t secretsUnlocked, std::vector> achievementsUnlocked) {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2fae827117a2d0962d13b748ba85ea1aae3f2a015e8e47e89ca0e05aa2b8bf6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3747, + "startColumn": 14, + "charOffset": 112995, + "charLength": 4, + "snippet": { + "text": "0xDA" + } + }, + "contextRegion": { + "startLine": 3745, + "startColumn": 14, + "charOffset": 112960, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_ACHIEVEMENTS);\n\tmsg.addByte(0x00); // 0x00 Here means 'no error'" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbcc0c2c4e35079efa03d4553f8077858ebd47f6aa9333a63f2fc16fd37fa73f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xDA is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3747, + "startColumn": 14, + "charOffset": 112995, + "charLength": 4, + "snippet": { + "text": "0xDA" + } + }, + "contextRegion": { + "startLine": 3745, + "startColumn": 14, + "charOffset": 112960, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_ACHIEVEMENTS);\n\tmsg.addByte(0x00); // 0x00 Here means 'no error'" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "942fc665eee0d01a3b02ecefbcfd5dc9b5d9072d2610a8090588e9070ab4618a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3749, + "startColumn": 14, + "charOffset": 113068, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 3747, + "startColumn": 14, + "charOffset": 112982, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_ACHIEVEMENTS);\n\tmsg.addByte(0x00); // 0x00 Here means 'no error'\n\tmsg.add(player->achiev()->getPoints());\n\tmsg.add(secretsUnlocked);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3e84dc9b9784357004504769bbfb93621fe16e18dc15bd54d0973255e0f6b10" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3755, + "startColumn": 2, + "charOffset": 113483, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3753, + "startColumn": 2, + "charOffset": 113265, + "charLength": 3, + "snippet": { + "text": "\tstd::string messageAchievName = \"ProtocolGame::sendCyclopediaCharacterAchievements - achievement.name\";\n\tstd::string messageAchievDesc = \"ProtocolGame::sendCyclopediaCharacterAchievements - achievement.description\";\n\tfor (const auto &[achievement, addedTimestamp] : achievementsUnlocked) {\n\t\tmsg.add(achievement.id);\n\t\tmsg.add(addedTimestamp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04bc4888c93ca6788beed0ed398fa52181cad3a454511c754a2082ca19aec88d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3759, + "startColumn": 16, + "charOffset": 113673, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 3757, + "startColumn": 16, + "charOffset": 113593, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.add(addedTimestamp);\n\t\tif (achievement.secret) {\n\t\t\tmsg.addByte(0x01);\n\t\t\tmsg.addString(achievement.name, messageAchievName);\n\t\t\tmsg.addString(achievement.description, messageAchievDesc);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac592019aff40cadea41e0d7b821f7ec091fd9d7793a1ede01f604097717c820" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3764, + "startColumn": 16, + "charOffset": 113858, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 3762, + "startColumn": 16, + "charOffset": 113797, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.addByte(achievement.grade);\n\t\t} else {\n\t\t\tmsg.addByte(0x00);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43bff0f68f85b2dcb85ea8dd1881b813e30f90e250305f3b9c2d61bf45fcc911" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'sendCyclopediaCharacterItemSummary' has cognitive complexity of 27 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3770, + "startColumn": 20, + "charOffset": 113921, + "charLength": 34, + "snippet": { + "text": "sendCyclopediaCharacterItemSummary" + } + }, + "contextRegion": { + "startLine": 3768, + "startColumn": 20, + "charOffset": 113899, + "charLength": 34, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendCyclopediaCharacterItemSummary(const ItemsTierCountList &inventoryItems, const ItemsTierCountList &storeInboxItems, const StashItemList &supplyStashItems, const ItemsTierCountList &depotBoxItems, const ItemsTierCountList &inboxItems) {\n\tif (!player || oldProtocol) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa1b520b355d15ee07dbc23c98e2d3f8dc20f0b73330449bedc006bf40e054a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'sendCyclopediaCharacterItemSummary' of similar type ('const ItemsTierCountList &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3770, + "startColumn": 55, + "charOffset": 113956, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 3768, + "startColumn": 55, + "charOffset": 113899, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendCyclopediaCharacterItemSummary(const ItemsTierCountList &inventoryItems, const ItemsTierCountList &storeInboxItems, const StashItemList &supplyStashItems, const ItemsTierCountList &depotBoxItems, const ItemsTierCountList &inboxItems) {\n\tif (!player || oldProtocol) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71b8717eaa579a4cb4ae03d7708150d11603f1b297bd680903b092cf6f5f72ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'sendCyclopediaCharacterItemSummary' of similar type ('const ItemsTierCountList &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3770, + "startColumn": 179, + "charOffset": 114080, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 3768, + "startColumn": 179, + "charOffset": 113899, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendCyclopediaCharacterItemSummary(const ItemsTierCountList &inventoryItems, const ItemsTierCountList &storeInboxItems, const StashItemList &supplyStashItems, const ItemsTierCountList &depotBoxItems, const ItemsTierCountList &inboxItems) {\n\tif (!player || oldProtocol) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2c532b454e9b427ef1ee20636dfd37239588eaa9b7647db199d185073d65ee2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3771, + "startColumn": 6, + "charOffset": 114166, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3769, + "startColumn": 6, + "charOffset": 113901, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendCyclopediaCharacterItemSummary(const ItemsTierCountList &inventoryItems, const ItemsTierCountList &storeInboxItems, const StashItemList &supplyStashItems, const ItemsTierCountList &depotBoxItems, const ItemsTierCountList &inboxItems) {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14fc9a24c9058d92e49cefbc58e1497852964e802d9f658cb764b20c25d17451" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3776, + "startColumn": 14, + "charOffset": 114240, + "charLength": 4, + "snippet": { + "text": "0xDA" + } + }, + "contextRegion": { + "startLine": 3774, + "startColumn": 14, + "charOffset": 114205, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_ITEMSUMMARY);\n\tmsg.addByte(0x00); // 0x00 Here means 'no error'" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1158ba0c2bbfaf25290e82d0e6e74ad174660cce884cc455c4d9f52b6774612" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xDA is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3776, + "startColumn": 14, + "charOffset": 114240, + "charLength": 4, + "snippet": { + "text": "0xDA" + } + }, + "contextRegion": { + "startLine": 3774, + "startColumn": 14, + "charOffset": 114205, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_ITEMSUMMARY);\n\tmsg.addByte(0x00); // 0x00 Here means 'no error'" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b472b13bb736f9d22eff360264f9af3955c6991938fe2f8848619af70d0c052" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3778, + "startColumn": 14, + "charOffset": 114312, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 3776, + "startColumn": 14, + "charOffset": 114227, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_ITEMSUMMARY);\n\tmsg.addByte(0x00); // 0x00 Here means 'no error'\n\n\tuint16_t inventoryItemsCount = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e43475cfa51e6ee75b9f7f8c251af39eb6d0c7e6229e3089ad4c699e436a1be8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3785, + "startColumn": 3, + "charOffset": 114517, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3783, + "startColumn": 3, + "charOffset": 114458, + "charLength": 3, + "snippet": { + "text": "\n\tfor (const auto &inventoryItems_it : inventoryItems) {\n\t\tfor (const auto &[itemTier, itemCount] : inventoryItems_it.second) {\n\t\t\tconst ItemType &it = Item::items[inventoryItems_it.first];\n\t\t\tmsg.add(inventoryItems_it.first); // Item ID" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ca1b9f46b2ac25729ca835b07a822f4be957701ca204c6fd19ba18163538ad6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3809, + "startColumn": 3, + "charOffset": 115190, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3807, + "startColumn": 3, + "charOffset": 115129, + "charLength": 3, + "snippet": { + "text": "\n\tfor (const auto &storeInboxItems_it : storeInboxItems) {\n\t\tfor (const auto &[itemTier, itemCount] : storeInboxItems_it.second) {\n\t\t\tconst ItemType &it = Item::items[storeInboxItems_it.first];\n\t\t\tmsg.add(storeInboxItems_it.first); // Item ID" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "075d3f1073a938fb0e303a2da38a5af18a68dcb98ec492e92b1aaf7f95350937" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3828, + "startColumn": 20, + "charOffset": 115719, + "charLength": 16, + "snippet": { + "text": "supplyStashItems" + } + }, + "contextRegion": { + "startLine": 3826, + "startColumn": 20, + "charOffset": 115660, + "charLength": 16, + "snippet": { + "text": "\tmsg.setBufferPosition(endStoreInbox);\n\n\tmsg.add(supplyStashItems.size());\n\n\tfor (const auto &[itemId, itemCount] : supplyStashItems) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99f493db91232a44fb6b69a6db856ac8deaa0dd9606ef6218de7edb500474cc8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3830, + "startColumn": 2, + "charOffset": 115747, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3828, + "startColumn": 2, + "charOffset": 115700, + "charLength": 3, + "snippet": { + "text": "\tmsg.add(supplyStashItems.size());\n\n\tfor (const auto &[itemId, itemCount] : supplyStashItems) {\n\t\tmsg.add(itemId);\n\t\tmsg.add(itemCount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8dd42ee246d9455d328511b41e9dcc906534dc1c2dd2daef6e35e863bdbbd597" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3840, + "startColumn": 3, + "charOffset": 116034, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3838, + "startColumn": 3, + "charOffset": 115977, + "charLength": 3, + "snippet": { + "text": "\n\tfor (const auto &depotBoxItems_it : depotBoxItems) {\n\t\tfor (const auto &[itemTier, itemCount] : depotBoxItems_it.second) {\n\t\t\tconst ItemType &it = Item::items[depotBoxItems_it.first];\n\t\t\tmsg.add(depotBoxItems_it.first); // Item ID" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0d05c6bdc72238a4842d78113cd14ad5dcebfaaf7b2c88718ee74162f807cb0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3864, + "startColumn": 3, + "charOffset": 116679, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3862, + "startColumn": 3, + "charOffset": 116628, + "charLength": 3, + "snippet": { + "text": "\n\tfor (const auto &inboxItems_it : inboxItems) {\n\t\tfor (const auto &[itemTier, itemCount] : inboxItems_it.second) {\n\t\t\tconst ItemType &it = Item::items[inboxItems_it.first];\n\t\t\tmsg.add(inboxItems_it.first); // Item ID" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0a53f7db06245baa0bbcc9609828b57b4345c059c0ee28436753be044eb6d55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'sendCyclopediaCharacterOutfitsMounts' has cognitive complexity of 28 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3882, + "startColumn": 20, + "charOffset": 117114, + "charLength": 36, + "snippet": { + "text": "sendCyclopediaCharacterOutfitsMounts" + } + }, + "contextRegion": { + "startLine": 3880, + "startColumn": 20, + "charOffset": 117092, + "charLength": 36, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendCyclopediaCharacterOutfitsMounts() {\n\tif (!player || oldProtocol) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4437b5e968b8d17819557528e504c54f83ed8798c9dda5467ca15669d707c5ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3883, + "startColumn": 6, + "charOffset": 117160, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3881, + "startColumn": 6, + "charOffset": 117094, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendCyclopediaCharacterOutfitsMounts() {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f61a99c53229c047642ebabe817f59c962320cdb045b8541baefe2fd834a0355" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3888, + "startColumn": 14, + "charOffset": 117234, + "charLength": 4, + "snippet": { + "text": "0xDA" + } + }, + "contextRegion": { + "startLine": 3886, + "startColumn": 14, + "charOffset": 117199, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_OUTFITSMOUNTS);\n\tmsg.addByte(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2645da4ab886b5e8826bfdd66617e226cbacdc266547ec6e8ff04d6b6bd7faad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xDA is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3888, + "startColumn": 14, + "charOffset": 117234, + "charLength": 4, + "snippet": { + "text": "0xDA" + } + }, + "contextRegion": { + "startLine": 3886, + "startColumn": 14, + "charOffset": 117199, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_OUTFITSMOUNTS);\n\tmsg.addByte(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85ef9d0f0bead1c55abb1bfe9297141b0d1a6b8b991b0423a71c34819b321c48" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3890, + "startColumn": 14, + "charOffset": 117308, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 3888, + "startColumn": 14, + "charOffset": 117221, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_OUTFITSMOUNTS);\n\tmsg.addByte(0x00);\n\tOutfit_t currentOutfit = player->getDefaultOutfit();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4d966a27b511722bd3cdb7f0c99b54bca3cbf5bae466c51b44c8c9f7db78623" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3898, + "startColumn": 2, + "charOffset": 117538, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3896, + "startColumn": 2, + "charOffset": 117461, + "charLength": 3, + "snippet": { + "text": "\n\tconst auto outfits = Outfits::getInstance().getOutfits(player->getSex());\n\tfor (const auto &outfit : outfits) {\n\t\tuint8_t addons;\n\t\tif (!player->getOutfitAddons(outfit, addons)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7b21d1b70a2c587c6157179c9aceb675c993acd9b02236f8848488c4ad6ec38" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'addons' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3899, + "startColumn": 11, + "charOffset": 117585, + "charLength": 6, + "snippet": { + "text": "addons" + } + }, + "contextRegion": { + "startLine": 3897, + "startColumn": 11, + "charOffset": 117462, + "charLength": 6, + "snippet": { + "text": "\tconst auto outfits = Outfits::getInstance().getOutfits(player->getSex());\n\tfor (const auto &outfit : outfits) {\n\t\tuint8_t addons;\n\t\tif (!player->getOutfitAddons(outfit, addons)) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2d0e3d4e963d5d1abfa6072777cddef9aa519d19c96e7d8383eaeb8b8bffc2b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3917, + "startColumn": 22, + "charOffset": 118201, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 3915, + "startColumn": 22, + "charOffset": 118124, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t\tif (outfit->lookType == currentOutfit.lookType) {\n\t\t\tmsg.add(1000);\n\t\t} else {\n\t\t\tmsg.add(0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6eea48fde56c955ea7477d76c0fa9cbb1447f82674b6cae2254eca20ffa098a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3932, + "startColumn": 2, + "charOffset": 118524, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3930, + "startColumn": 2, + "charOffset": 118459, + "charLength": 3, + "snippet": { + "text": "\tauto startMounts = msg.getBufferPosition();\n\tmsg.skipBytes(2);\n\tfor (const auto &mount : g_game().mounts.getMounts()) {\n\t\tconst std::string type = mount->type;\n\t\tif (player->hasMount(mount)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b2a96fd132cb67804e11a4c241e103d06a7d4dc95b11004dc01815d16da921f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3946, + "startColumn": 22, + "charOffset": 119084, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 3944, + "startColumn": 22, + "charOffset": 118999, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_OUTFITTYPE_NONE);\n\t\t\t}\n\t\t\tmsg.add(1000);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2d88f10158983f42019a3c48e3dcc73193298b805ed85a488ef24c89fd98228" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3960, + "startColumn": 2, + "charOffset": 119485, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3958, + "startColumn": 2, + "charOffset": 119377, + "charLength": 3, + "snippet": { + "text": "\tmsg.skipBytes(2);\n\tconst auto familiars = Familiars::getInstance().getFamiliars(player->getVocationId());\n\tfor (const auto &familiar : familiars) {\n\t\tconst std::string type = familiar->type;\n\t\tif (!player->getFamiliar(familiar)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "206b8d05901dea3251f02e7f4da56a003d6d987e96167237fe64a152a9f75df0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3986, + "startColumn": 6, + "charOffset": 120281, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3984, + "startColumn": 6, + "charOffset": 120216, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendCyclopediaCharacterStoreSummary() {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d25595c1f22a7391b515e0df1c58940171c9486b08bb635c4eef9681c2a3478e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3991, + "startColumn": 14, + "charOffset": 120355, + "charLength": 4, + "snippet": { + "text": "0xDA" + } + }, + "contextRegion": { + "startLine": 3989, + "startColumn": 14, + "charOffset": 120320, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_STORESUMMARY);\n\tmsg.addByte(0x00); // 0x00 Here means 'no error'" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab1252f5f6eee5ad6f17851d7451a67bf5afa15e3bb19f5d5fe305b206e95b3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xDA is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3991, + "startColumn": 14, + "charOffset": 120355, + "charLength": 4, + "snippet": { + "text": "0xDA" + } + }, + "contextRegion": { + "startLine": 3989, + "startColumn": 14, + "charOffset": 120320, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_STORESUMMARY);\n\tmsg.addByte(0x00); // 0x00 Here means 'no error'" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3791c9e386610ec86808ba323479e7637e34e7b891d29386aa3865266d73ec46" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 3993, + "startColumn": 14, + "charOffset": 120428, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 3991, + "startColumn": 14, + "charOffset": 120342, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_STORESUMMARY);\n\tmsg.addByte(0x00); // 0x00 Here means 'no error'\n\tmsg.add(player->getXpBoostTime()); // Remaining Store Xp Boost Time\n\tauto remaining = player->kv()->get(\"daily-reward-xp-boost\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97ee87343e645ff418eeda892ca35e607ada8a9680e3a02a979da6705fc93dc8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4001, + "startColumn": 2, + "charOffset": 120867, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3999, + "startColumn": 2, + "charOffset": 120792, + "charLength": 3, + "snippet": { + "text": "\n\tmsg.addByte(static_cast(magic_enum::enum_count()));\n\tfor (auto bless : magic_enum::enum_values()) {\n\t\tstd::string name = toStartCaseWithSpace(magic_enum::enum_name(bless).data());\n\t\tmsg.addString(name, \"ProtocolGame::sendCyclopediaCharacterStoreSummary - blessing.name\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8dd42ee246d9455d328511b41e9dcc906534dc1c2dd2daef6e35e863bdbbd597" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4006, + "startColumn": 16, + "charOffset": 121193, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 4004, + "startColumn": 16, + "charOffset": 121097, + "charLength": 11, + "snippet": { + "text": "\t\tauto blessValue = enumToValue(bless);\n\t\tif (player->hasBlessing(blessValue)) {\n\t\t\tmsg.addByte(static_cast(player->blessings[blessValue - 1]));\n\t\t} else {\n\t\t\tmsg.addByte(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9aedee6f18f37965144561c4e6b7daf58109699cfb19521ace0a933d5ef87598" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4008, + "startColumn": 16, + "charOffset": 121278, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 4006, + "startColumn": 16, + "charOffset": 121178, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.addByte(static_cast(player->blessings[blessValue - 1]));\n\t\t} else {\n\t\t\tmsg.addByte(0x00);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6e652213029079ed1329e8b56b6990d16b424535f34e756050ebfa2f12e94de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4025, + "startColumn": 14, + "charOffset": 121785, + "charLength": 17, + "snippet": { + "text": "cyclopediaSummary" + } + }, + "contextRegion": { + "startLine": 4023, + "startColumn": 14, + "charOffset": 121694, + "charLength": 17, + "snippet": { + "text": "\tmsg.addByte(preySlotsUnlocked); // getPreySlotById + getTaskHuntingSlotById\n\n\tmsg.addByte(cyclopediaSummary.m_preyWildcards); // getPreyCardsObtained\n\tmsg.addByte(cyclopediaSummary.m_instantRewards); // getRewardCollectionObtained\n\tmsg.addByte(player->hasCharmExpansion() ? 0x01 : 0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae413e8f1f6fd7b2147f210dcbe1a4cba5a9df84bb030c70ad941c268efe1d86" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4026, + "startColumn": 14, + "charOffset": 121858, + "charLength": 17, + "snippet": { + "text": "cyclopediaSummary" + } + }, + "contextRegion": { + "startLine": 4024, + "startColumn": 14, + "charOffset": 121771, + "charLength": 17, + "snippet": { + "text": "\n\tmsg.addByte(cyclopediaSummary.m_preyWildcards); // getPreyCardsObtained\n\tmsg.addByte(cyclopediaSummary.m_instantRewards); // getRewardCollectionObtained\n\tmsg.addByte(player->hasCharmExpansion() ? 0x01 : 0x00);\n\tmsg.addByte(cyclopediaSummary.m_hirelings); // getHirelingsObtained" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f9c0ee51156829a674ae617689f15d536132635b6531a0ff559adb69df6b4b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4028, + "startColumn": 14, + "charOffset": 121996, + "charLength": 17, + "snippet": { + "text": "cyclopediaSummary" + } + }, + "contextRegion": { + "startLine": 4026, + "startColumn": 14, + "charOffset": 121845, + "charLength": 17, + "snippet": { + "text": "\tmsg.addByte(cyclopediaSummary.m_instantRewards); // getRewardCollectionObtained\n\tmsg.addByte(player->hasCharmExpansion() ? 0x01 : 0x00);\n\tmsg.addByte(cyclopediaSummary.m_hirelings); // getHirelingsObtained\n\n\tstd::vector m_hSkills;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2037fc5383a174e2277801196ad48d568f25ed2c2fad7eb60d5003ed012356db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4031, + "startColumn": 2, + "charOffset": 122088, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4029, + "startColumn": 2, + "charOffset": 122052, + "charLength": 3, + "snippet": { + "text": "\n\tstd::vector m_hSkills;\n\tfor (const auto &it : g_game().getHirelingSkills()) {\n\t\tif (player->kv()->scoped(\"hireling-skills\")->get(it.second)) {\n\t\t\tm_hSkills.emplace_back(it.first);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d37ac5f522e313e8370de2af78a8e556b2bd3b4cad42d3ac048836c420061ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4033, + "startColumn": 14, + "charOffset": 122220, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 4031, + "startColumn": 14, + "charOffset": 122087, + "charLength": 12, + "snippet": { + "text": "\tfor (const auto &it : g_game().getHirelingSkills()) {\n\t\tif (player->kv()->scoped(\"hireling-skills\")->get(it.second)) {\n\t\t\tm_hSkills.emplace_back(it.first);\n\t\t\tg_logger().debug(\"skill id: {}, name: {}\", it.first, it.second);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f3dd1e0df647b53fe25bafbe625234aa20ba10fa59a3aa4ba43144ae2f5cddf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4037, + "startColumn": 14, + "charOffset": 122332, + "charLength": 9, + "snippet": { + "text": "m_hSkills" + } + }, + "contextRegion": { + "startLine": 4035, + "startColumn": 14, + "charOffset": 122312, + "charLength": 9, + "snippet": { + "text": "\t\t}\n\t}\n\tmsg.addByte(m_hSkills.size());\n\tfor (const auto &id : m_hSkills) {\n\t\tmsg.addByte(id - 1000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0bf06cc78ed5e1e7448bf747aa0f9b2b9624a71448868d9366ae51001d0149b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4038, + "startColumn": 2, + "charOffset": 122352, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4036, + "startColumn": 2, + "charOffset": 122316, + "charLength": 3, + "snippet": { + "text": "\t}\n\tmsg.addByte(m_hSkills.size());\n\tfor (const auto &id : m_hSkills) {\n\t\tmsg.addByte(id - 1000);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5bf67e7b4b5ebc9dac9c786cc095e9a4b357e499d3bead3f8702937afd78929" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4039, + "startColumn": 15, + "charOffset": 122401, + "charLength": 2, + "snippet": { + "text": "id" + } + }, + "contextRegion": { + "startLine": 4037, + "startColumn": 15, + "charOffset": 122319, + "charLength": 2, + "snippet": { + "text": "\tmsg.addByte(m_hSkills.size());\n\tfor (const auto &id : m_hSkills) {\n\t\tmsg.addByte(id - 1000);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9032b80015e6ed3966f23aa2ea1f7d49fa507ae71fa9a04b2bfd5fa3c63b200b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4039, + "startColumn": 20, + "charOffset": 122406, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 4037, + "startColumn": 20, + "charOffset": 122319, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(m_hSkills.size());\n\tfor (const auto &id : m_hSkills) {\n\t\tmsg.addByte(id - 1000);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55c4423156cdbf4fe89d5784489adb81c370d7d6f833ba504835f908a4c0fd17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4053, + "startColumn": 14, + "charOffset": 122876, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 4051, + "startColumn": 14, + "charOffset": 122778, + "charLength": 4, + "snippet": { + "text": "\t msg.addByte(0x01); // TODO need to get the correct id from hireling outfit\n\t}*/\n\tmsg.addByte(0x00); // hireling outfit size\n\n\tauto houseItems = player->cyclopedia()->getResult(static_cast(Summary_t::HOUSE_ITEMS));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94fa65f32230d739b2236ece50afab261375c3ed7d6ab5b7cbbab3f9fab8967a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4056, + "startColumn": 20, + "charOffset": 123025, + "charLength": 10, + "snippet": { + "text": "houseItems" + } + }, + "contextRegion": { + "startLine": 4054, + "startColumn": 20, + "charOffset": 122907, + "charLength": 10, + "snippet": { + "text": "\n\tauto houseItems = player->cyclopedia()->getResult(static_cast(Summary_t::HOUSE_ITEMS));\n\tmsg.add(houseItems.size());\n\tfor (const auto &hItem_it : houseItems) {\n\t\tconst ItemType &it = Item::items[hItem_it.first];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9d75e79348a3c01134e94594d670f35c4a0b6ac9502fdff583414f0d409a68a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4057, + "startColumn": 2, + "charOffset": 123046, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4055, + "startColumn": 2, + "charOffset": 122908, + "charLength": 3, + "snippet": { + "text": "\tauto houseItems = player->cyclopedia()->getResult(static_cast(Summary_t::HOUSE_ITEMS));\n\tmsg.add(houseItems.size());\n\tfor (const auto &hItem_it : houseItems) {\n\t\tconst ItemType &it = Item::items[hItem_it.first];\n\t\tmsg.add(it.id); // Item ID" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5fb7bfe0c0cb428af2173c70a5f7866f0be9d9615e511b1a88be3573c8823ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4061, + "startColumn": 15, + "charOffset": 123289, + "charLength": 8, + "snippet": { + "text": "hItem_it" + } + }, + "contextRegion": { + "startLine": 4059, + "startColumn": 15, + "charOffset": 123140, + "charLength": 8, + "snippet": { + "text": "\t\tmsg.add(it.id); // Item ID\n\t\tmsg.addString(it.name, \"ProtocolGame::sendCyclopediaCharacterStoreSummary - houseItem.name\");\n\t\tmsg.addByte(hItem_it.second);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c270c4b4cd200a2e4f7814025c2c6fc4e98cdc2463e4df401ca19f705b0c2201" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'sendCyclopediaCharacterInspection' has cognitive complexity of 39 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4067, + "startColumn": 20, + "charOffset": 123360, + "charLength": 33, + "snippet": { + "text": "sendCyclopediaCharacterInspection" + } + }, + "contextRegion": { + "startLine": 4065, + "startColumn": 20, + "charOffset": 123338, + "charLength": 33, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendCyclopediaCharacterInspection() {\n\tif (!player || oldProtocol) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "806b7b9475e5225950228f87e0f612a9f2a9608cdccf1b50468894b39e5b89ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4068, + "startColumn": 6, + "charOffset": 123403, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4066, + "startColumn": 6, + "charOffset": 123340, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendCyclopediaCharacterInspection() {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1bcc02944c9652e153a854a07820c185822af17f69eb3a8ed835b2e6f169bc37" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4073, + "startColumn": 14, + "charOffset": 123477, + "charLength": 4, + "snippet": { + "text": "0xDA" + } + }, + "contextRegion": { + "startLine": 4071, + "startColumn": 14, + "charOffset": 123442, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_INSPECTION);\n\tmsg.addByte(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d46e4f4fa6fa6559bbb99a27b23dab5677337846022061bcd5ae2b4719cf54a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xDA is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4073, + "startColumn": 14, + "charOffset": 123477, + "charLength": 4, + "snippet": { + "text": "0xDA" + } + }, + "contextRegion": { + "startLine": 4071, + "startColumn": 14, + "charOffset": 123442, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_INSPECTION);\n\tmsg.addByte(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "57e390e27a45cc5adf15ca288fd8a31761bb43a9ebd90ffe4a958ec020ef136c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4075, + "startColumn": 14, + "charOffset": 123548, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 4073, + "startColumn": 14, + "charOffset": 123464, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_INSPECTION);\n\tmsg.addByte(0x00);\n\tuint8_t inventoryItems = 0;\n\tauto startInventory = msg.getBufferPosition();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7725e276a9487cefe083b41b0b77049dbe49f2525f9d003fd72545b265353299" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-type-traits", + "ruleIndex": 632, + "kind": "fail", + "level": "warning", + "message": { + "text": "use c++14 style type templates" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4079, + "startColumn": 7, + "charOffset": 123657, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 4077, + "startColumn": 7, + "charOffset": 123584, + "charLength": 3, + "snippet": { + "text": "\tauto startInventory = msg.getBufferPosition();\n\tmsg.skipBytes(1);\n\tfor (std::underlying_type::type slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; slot++) {\n\t\tstd::shared_ptr inventoryItem = player->getInventoryItem(static_cast(slot));\n\t\tif (inventoryItem) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b1865c2ab97d60ed87a812003ed7df19b2295f964017103c353cb21b89d13f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4091, + "startColumn": 4, + "charOffset": 124175, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4089, + "startColumn": 4, + "charOffset": 124100, + "charLength": 3, + "snippet": { + "text": "\t\t\tauto startImbuements = msg.getBufferPosition();\n\t\t\tmsg.skipBytes(1);\n\t\t\tfor (uint8_t slotid = 0; slotid < inventoryItem->getImbuementSlot(); slotid++) {\n\t\t\t\tImbuementInfo imbuementInfo;\n\t\t\t\tif (!inventoryItem->getImbuementInfo(slotid, &imbuementInfo)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "135efa7bb32e92de698af1662ab420da0b875af7047ae8d0b1a8370a1e195db1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'inventoryItem' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4091, + "startColumn": 29, + "charOffset": 124200, + "charLength": 6, + "snippet": { + "text": "slotid" + } + }, + "contextRegion": { + "startLine": 4089, + "startColumn": 29, + "charOffset": 124100, + "charLength": 6, + "snippet": { + "text": "\t\t\tauto startImbuements = msg.getBufferPosition();\n\t\t\tmsg.skipBytes(1);\n\t\t\tfor (uint8_t slotid = 0; slotid < inventoryItem->getImbuementSlot(); slotid++) {\n\t\t\t\tImbuementInfo imbuementInfo;\n\t\t\t\tif (!inventoryItem->getImbuementInfo(slotid, &imbuementInfo)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89e4bae87fafa986db35b2f976f644fd1505c81a9761dd0572ec93b944185b42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4107, + "startColumn": 16, + "charOffset": 124743, + "charLength": 12, + "snippet": { + "text": "descriptions" + } + }, + "contextRegion": { + "startLine": 4105, + "startColumn": 16, + "charOffset": 124629, + "charLength": 12, + "snippet": { + "text": "\n\t\t\tauto descriptions = Item::getDescriptions(Item::items[inventoryItem->getID()], inventoryItem);\n\t\t\tmsg.addByte(descriptions.size());\n\t\t\tfor (const auto &description : descriptions) {\n\t\t\t\tmsg.addString(description.first, \"ProtocolGame::sendCyclopediaCharacterInspection - description.first\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17ec25dda56940f1a9409e2146015806535a38b83b4d1fa474be86281b32192c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4108, + "startColumn": 4, + "charOffset": 124768, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4106, + "startColumn": 4, + "charOffset": 124630, + "charLength": 3, + "snippet": { + "text": "\t\t\tauto descriptions = Item::getDescriptions(Item::items[inventoryItem->getID()], inventoryItem);\n\t\t\tmsg.addByte(descriptions.size());\n\t\t\tfor (const auto &description : descriptions) {\n\t\t\t\tmsg.addString(description.first, \"ProtocolGame::sendCyclopediaCharacterInspection - description.first\");\n\t\t\t\tmsg.addString(description.second, \"ProtocolGame::sendCyclopediaCharacterInspection - description.second\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e50cf0a04d0b7eb87ee3e932986c2c313a8bdf67323864b92a71035ebbb4b1c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4156, + "startColumn": 2, + "charOffset": 126997, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4154, + "startColumn": 2, + "charOffset": 126974, + "charLength": 3, + "snippet": { + "text": "\n\t// Prey description\n\tfor (uint8_t slotId = PreySlot_First; slotId <= PreySlot_Last; slotId++) {\n\t\tif (const auto &slot = player->getPreySlotById(static_cast(slotId));\n\t\t slot && slot->isOccupied()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6312cffbeb22cfb8328048f84ae93b37ed733f2b247d3e8a4af073ae4e48bffb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4165, + "startColumn": 10, + "charOffset": 127497, + "charLength": 6, + "snippet": { + "text": "append" + } + }, + "contextRegion": { + "startLine": 4163, + "startColumn": 10, + "charOffset": 127386, + "charLength": 6, + "snippet": { + "text": "\t\t\tstd::string desc;\n\t\t\tif (auto mtype = g_monsters().getMonsterTypeByRaceId(slot->selectedRaceId)) {\n\t\t\t\tdesc.append(mtype->name);\n\t\t\t} else {\n\t\t\t\tdesc.append(\"Unknown creature\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c5d5a43a0cd82dd9f72e8ec2192265fac83b76e7033279b6e55fa9cb42dbf77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4167, + "startColumn": 10, + "charOffset": 127539, + "charLength": 6, + "snippet": { + "text": "append" + } + }, + "contextRegion": { + "startLine": 4165, + "startColumn": 10, + "charOffset": 127488, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tdesc.append(mtype->name);\n\t\t\t} else {\n\t\t\t\tdesc.append(\"Unknown creature\");\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa544fc61b85597d979498770a2f6dad1eb6e521667e173fbb82b90a6a913ee5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4170, + "startColumn": 4, + "charOffset": 127576, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 4168, + "startColumn": 4, + "charOffset": 127567, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (slot->bonus == PreyBonus_Damage) {\n\t\t\t\tdesc.append(\" (Improved Damage +\");\n\t\t\t} else if (slot->bonus == PreyBonus_Defense) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cfe34bc0376020429d0e21489d06b3229261dca05656782cffe12efa0b600ac8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4171, + "startColumn": 10, + "charOffset": 127624, + "charLength": 6, + "snippet": { + "text": "append" + } + }, + "contextRegion": { + "startLine": 4169, + "startColumn": 10, + "charOffset": 127572, + "charLength": 6, + "snippet": { + "text": "\n\t\t\tif (slot->bonus == PreyBonus_Damage) {\n\t\t\t\tdesc.append(\" (Improved Damage +\");\n\t\t\t} else if (slot->bonus == PreyBonus_Defense) {\n\t\t\t\tdesc.append(\" (Improved Defense +\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d32904670d516779d226388f1eb3acb31dd0472e93e8dfb7383b2295af2cc8c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4173, + "startColumn": 10, + "charOffset": 127714, + "charLength": 6, + "snippet": { + "text": "append" + } + }, + "contextRegion": { + "startLine": 4171, + "startColumn": 10, + "charOffset": 127615, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tdesc.append(\" (Improved Damage +\");\n\t\t\t} else if (slot->bonus == PreyBonus_Defense) {\n\t\t\t\tdesc.append(\" (Improved Defense +\");\n\t\t\t} else if (slot->bonus == PreyBonus_Experience) {\n\t\t\t\tdesc.append(\" (Improved Experience +\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db41fa6574d5973c630bc4cce9c6162d0669775922daabf0e57ef6c77920652d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4175, + "startColumn": 10, + "charOffset": 127808, + "charLength": 6, + "snippet": { + "text": "append" + } + }, + "contextRegion": { + "startLine": 4173, + "startColumn": 10, + "charOffset": 127705, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tdesc.append(\" (Improved Defense +\");\n\t\t\t} else if (slot->bonus == PreyBonus_Experience) {\n\t\t\t\tdesc.append(\" (Improved Experience +\");\n\t\t\t} else if (slot->bonus == PreyBonus_Loot) {\n\t\t\t\tdesc.append(\" (Improved Loot +\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93862de401a6b002c0b4ae63ee4e712cec2972084ca6f4d3763cefe315bf8e01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4177, + "startColumn": 10, + "charOffset": 127899, + "charLength": 6, + "snippet": { + "text": "append" + } + }, + "contextRegion": { + "startLine": 4175, + "startColumn": 10, + "charOffset": 127799, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tdesc.append(\" (Improved Experience +\");\n\t\t\t} else if (slot->bonus == PreyBonus_Loot) {\n\t\t\t\tdesc.append(\" (Improved Loot +\");\n\t\t\t}\n\t\t\tdesc.append(fmt::format(\"{}%, remaining\", slot->bonusPercentage));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a5d6a2fbf065719ba8bb8aa4a79bcc6d03aa5f04b815c27d97714dc949b12844" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4179, + "startColumn": 9, + "charOffset": 127941, + "charLength": 6, + "snippet": { + "text": "append" + } + }, + "contextRegion": { + "startLine": 4177, + "startColumn": 9, + "charOffset": 127890, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tdesc.append(\" (Improved Loot +\");\n\t\t\t}\n\t\t\tdesc.append(fmt::format(\"{}%, remaining\", slot->bonusPercentage));\n\t\t\tuint8_t hours = slot->bonusTimeLeft / 3600;\n\t\t\tuint8_t minutes = (slot->bonusTimeLeft - (hours * 3600)) / 60;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a49424d406dbf1a46154b0d68082b9d05ae9438f68d7ee010bae424d2a7b518" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4180, + "startColumn": 20, + "charOffset": 128022, + "charLength": 4, + "snippet": { + "text": "slot" + } + }, + "contextRegion": { + "startLine": 4178, + "startColumn": 20, + "charOffset": 127928, + "charLength": 4, + "snippet": { + "text": "\t\t\t}\n\t\t\tdesc.append(fmt::format(\"{}%, remaining\", slot->bonusPercentage));\n\t\t\tuint8_t hours = slot->bonusTimeLeft / 3600;\n\t\t\tuint8_t minutes = (slot->bonusTimeLeft - (hours * 3600)) / 60;\n\t\t\tdesc.append(fmt::format(\"{}:{}{}h\", hours, (minutes < 10 ? \"0\" : \"\"), minutes));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd0eacc683bd6e07a35171080a8b5c588e2dafd8dfb1211dc4e66455279c6ec6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "3600 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4180, + "startColumn": 42, + "charOffset": 128044, + "charLength": 4, + "snippet": { + "text": "3600" + } + }, + "contextRegion": { + "startLine": 4178, + "startColumn": 42, + "charOffset": 127928, + "charLength": 4, + "snippet": { + "text": "\t\t\t}\n\t\t\tdesc.append(fmt::format(\"{}%, remaining\", slot->bonusPercentage));\n\t\t\tuint8_t hours = slot->bonusTimeLeft / 3600;\n\t\t\tuint8_t minutes = (slot->bonusTimeLeft - (hours * 3600)) / 60;\n\t\t\tdesc.append(fmt::format(\"{}:{}{}h\", hours, (minutes < 10 ? \"0\" : \"\"), minutes));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac0d4d8c3ffccde01941ea8f56c0b320a0ca0db6b1155bad29373fcad66a6ac6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4181, + "startColumn": 22, + "charOffset": 128071, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 4179, + "startColumn": 22, + "charOffset": 127933, + "charLength": 1, + "snippet": { + "text": "\t\t\tdesc.append(fmt::format(\"{}%, remaining\", slot->bonusPercentage));\n\t\t\tuint8_t hours = slot->bonusTimeLeft / 3600;\n\t\t\tuint8_t minutes = (slot->bonusTimeLeft - (hours * 3600)) / 60;\n\t\t\tdesc.append(fmt::format(\"{}:{}{}h\", hours, (minutes < 10 ? \"0\" : \"\"), minutes));\n\t\t\tmsg.addString(desc, \"ProtocolGame::sendCyclopediaCharacterInspection - prey description\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17ec25dda56940f1a9409e2146015806535a38b83b4d1fa474be86281b32192c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "3600 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4181, + "startColumn": 54, + "charOffset": 128103, + "charLength": 4, + "snippet": { + "text": "3600" + } + }, + "contextRegion": { + "startLine": 4179, + "startColumn": 54, + "charOffset": 127933, + "charLength": 4, + "snippet": { + "text": "\t\t\tdesc.append(fmt::format(\"{}%, remaining\", slot->bonusPercentage));\n\t\t\tuint8_t hours = slot->bonusTimeLeft / 3600;\n\t\t\tuint8_t minutes = (slot->bonusTimeLeft - (hours * 3600)) / 60;\n\t\t\tdesc.append(fmt::format(\"{}:{}{}h\", hours, (minutes < 10 ? \"0\" : \"\"), minutes));\n\t\t\tmsg.addString(desc, \"ProtocolGame::sendCyclopediaCharacterInspection - prey description\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d91c9c1ff4b6e5c2050c16cf3ae039f9f8f822a9fcec1f898385d4988cdc5fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4181, + "startColumn": 63, + "charOffset": 128112, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 4179, + "startColumn": 63, + "charOffset": 127933, + "charLength": 2, + "snippet": { + "text": "\t\t\tdesc.append(fmt::format(\"{}%, remaining\", slot->bonusPercentage));\n\t\t\tuint8_t hours = slot->bonusTimeLeft / 3600;\n\t\t\tuint8_t minutes = (slot->bonusTimeLeft - (hours * 3600)) / 60;\n\t\t\tdesc.append(fmt::format(\"{}:{}{}h\", hours, (minutes < 10 ? \"0\" : \"\"), minutes));\n\t\t\tmsg.addString(desc, \"ProtocolGame::sendCyclopediaCharacterInspection - prey description\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d641794c19424a7e2a2f8e8c31acfcca2447d074411f58ccf80c090967072fdf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4182, + "startColumn": 9, + "charOffset": 128124, + "charLength": 6, + "snippet": { + "text": "append" + } + }, + "contextRegion": { + "startLine": 4180, + "startColumn": 9, + "charOffset": 128003, + "charLength": 6, + "snippet": { + "text": "\t\t\tuint8_t hours = slot->bonusTimeLeft / 3600;\n\t\t\tuint8_t minutes = (slot->bonusTimeLeft - (hours * 3600)) / 60;\n\t\t\tdesc.append(fmt::format(\"{}:{}{}h\", hours, (minutes < 10 ? \"0\" : \"\"), minutes));\n\t\t\tmsg.addString(desc, \"ProtocolGame::sendCyclopediaCharacterInspection - prey description\");\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "373308beff5b23f427c79208fc453dfeefa8ab38720b118648aae8b4efd35249" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4182, + "startColumn": 58, + "charOffset": 128173, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 4180, + "startColumn": 58, + "charOffset": 128003, + "charLength": 2, + "snippet": { + "text": "\t\t\tuint8_t hours = slot->bonusTimeLeft / 3600;\n\t\t\tuint8_t minutes = (slot->bonusTimeLeft - (hours * 3600)) / 60;\n\t\t\tdesc.append(fmt::format(\"{}:{}{}h\", hours, (minutes < 10 ? \"0\" : \"\"), minutes));\n\t\t\tmsg.addString(desc, \"ProtocolGame::sendCyclopediaCharacterInspection - prey description\");\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29610242865d8feec2063a52c47f2f6d1b1174a2f3c0a1186613d6430a55d099" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4206, + "startColumn": 6, + "charOffset": 129001, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4204, + "startColumn": 6, + "charOffset": 128942, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendCyclopediaCharacterBadges() {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89654d591f3324430d87e11567075b5c29ecf00a8d06e5d86d7ef72405d39252" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4211, + "startColumn": 14, + "charOffset": 129075, + "charLength": 4, + "snippet": { + "text": "0xDA" + } + }, + "contextRegion": { + "startLine": 4209, + "startColumn": 14, + "charOffset": 129040, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_BADGES);\n\tmsg.addByte(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c649f214ee19e4f9a07d4534affc51d02958848f5a166353872445e523044bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xDA is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4211, + "startColumn": 14, + "charOffset": 129075, + "charLength": 4, + "snippet": { + "text": "0xDA" + } + }, + "contextRegion": { + "startLine": 4209, + "startColumn": 14, + "charOffset": 129040, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_BADGES);\n\tmsg.addByte(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5e18a867c6e8c585944c42e19b1a0f002bdd4084903dd7079e4a3b11653d06e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4213, + "startColumn": 14, + "charOffset": 129142, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 4211, + "startColumn": 14, + "charOffset": 129062, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_BADGES);\n\tmsg.addByte(0x00);\n\tmsg.addByte(0x01); // ShowAccountInformation, if 0x01 will show IsOnline, IsPremium, character title, badges\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c36341b7aa41a9dc234ea57c9ea3e197138dda0d6dbbd11c70b8eb038698e95b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4214, + "startColumn": 14, + "charOffset": 129162, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 4212, + "startColumn": 14, + "charOffset": 129082, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_BADGES);\n\tmsg.addByte(0x00);\n\tmsg.addByte(0x01); // ShowAccountInformation, if 0x01 will show IsOnline, IsPremium, character title, badges\n\n\tconst auto loggedPlayer = g_game().getPlayerUniqueLogin(player->getName());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "486823f308311ba11e39bdab7d0a40dc45ef4820cdd8bfafa2b5356830c96c8d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4225, + "startColumn": 2, + "charOffset": 129724, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4223, + "startColumn": 2, + "charOffset": 129652, + "charLength": 3, + "snippet": { + "text": "\tauto badgesSizePosition = msg.getBufferPosition();\n\tmsg.skipBytes(1);\n\tfor (const auto &badge : g_game().getBadges()) {\n\t\tif (player->badge()->hasBadge(badge.m_id)) {\n\t\t\tmsg.add(badge.m_id);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb4634f4e888dbca3b0d31c59a592d60e87a105db5a1a04a3795eb6897a38aad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4240, + "startColumn": 6, + "charOffset": 130124, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4238, + "startColumn": 6, + "charOffset": 130065, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendCyclopediaCharacterTitles() {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62430ad30db69a6f864da554af29541718ec72620b3c03bddd34e97ab25b1c2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4247, + "startColumn": 14, + "charOffset": 130236, + "charLength": 4, + "snippet": { + "text": "0xDA" + } + }, + "contextRegion": { + "startLine": 4245, + "startColumn": 14, + "charOffset": 130201, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_TITLES);\n\tmsg.addByte(0x00); // 0x00 Here means 'no error'" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b336c93bc18af8f49bb423af804d6de0f85ecf4ee0e944fc133c75067ec0863b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xDA is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4247, + "startColumn": 14, + "charOffset": 130236, + "charLength": 4, + "snippet": { + "text": "0xDA" + } + }, + "contextRegion": { + "startLine": 4245, + "startColumn": 14, + "charOffset": 130201, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_TITLES);\n\tmsg.addByte(0x00); // 0x00 Here means 'no error'" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be3d554c0255f5414ba634b5c581747cd048fbe35162ca5a0a0224f10598a040" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4249, + "startColumn": 14, + "charOffset": 130303, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 4247, + "startColumn": 14, + "charOffset": 130223, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(0xDA);\n\tmsg.addByte(CYCLOPEDIA_CHARACTERINFO_TITLES);\n\tmsg.addByte(0x00); // 0x00 Here means 'no error'\n\tmsg.addByte(player->title()->getCurrentTitle());\n\tmsg.addByte(static_cast(titles.size()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46fff25e982fd24765d5a9d160497e465e429af0ddbf3e948ede0f6d2a509ad9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4255, + "startColumn": 2, + "charOffset": 130634, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4253, + "startColumn": 2, + "charOffset": 130442, + "charLength": 3, + "snippet": { + "text": "\tstd::string messageTitleName = \"ProtocolGame::sendCyclopediaCharacterTitles - title.name\";\n\tstd::string messageTitleDesc = \"ProtocolGame::sendCyclopediaCharacterTitles - title.description\";\n\tfor (const auto &title : titles) {\n\t\tmsg.addByte(title.m_id);\n\t\tauto titleName = player->title()->getNameBySex(player->getSex(), title.m_maleName, title.m_femaleName);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02bb550067738e72f6348494f8db09015c69c15fec9db2dde0bb8bf82bf6a526" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4270, + "startColumn": 14, + "charOffset": 131196, + "charLength": 4, + "snippet": { + "text": "0x28" + } + }, + "contextRegion": { + "startLine": 4268, + "startColumn": 14, + "charOffset": 131093, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendReLoginWindow(uint8_t unfairFightReduction) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x28);\n\tmsg.addByte(0x00);\n\tmsg.addByte(unfairFightReduction);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35fa210da436c3b5269d0e09ac2baf78bf143a8977616b8a3f68122ae6fb66de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x28 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4270, + "startColumn": 14, + "charOffset": 131196, + "charLength": 4, + "snippet": { + "text": "0x28" + } + }, + "contextRegion": { + "startLine": 4268, + "startColumn": 14, + "charOffset": 131093, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendReLoginWindow(uint8_t unfairFightReduction) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x28);\n\tmsg.addByte(0x00);\n\tmsg.addByte(unfairFightReduction);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8da9ec8e6fec3881f793d1d9000d91e222337f04b74d18f550a60cdd0cfdd4d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4271, + "startColumn": 14, + "charOffset": 131216, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 4269, + "startColumn": 14, + "charOffset": 131162, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\tmsg.addByte(0x28);\n\tmsg.addByte(0x00);\n\tmsg.addByte(unfairFightReduction);\n\tif (!oldProtocol) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1c5b92bb953ac3169c0198092661d7acf5d6971926501a74e27636e8fb662e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4274, + "startColumn": 15, + "charOffset": 131294, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 4272, + "startColumn": 15, + "charOffset": 131223, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(unfairFightReduction);\n\tif (!oldProtocol) {\n\t\tmsg.addByte(0x00); // use death redemption (boolean)\n\t}\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "859b55f74a8c0fa53796b8a3cd175c7f143efa3be99f808d48077a1a46fe7735" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'sendBasicData' has cognitive complexity of 27 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4285, + "startColumn": 20, + "charOffset": 131493, + "charLength": 13, + "snippet": { + "text": "sendBasicData" + } + }, + "contextRegion": { + "startLine": 4283, + "startColumn": 20, + "charOffset": 131471, + "charLength": 13, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendBasicData() {\n\tif (!player) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35c869b6252eb3f7f783ab1839a399b658a33f27168068ae1591d739a21d2301" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4286, + "startColumn": 6, + "charOffset": 131516, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4284, + "startColumn": 6, + "charOffset": 131473, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendBasicData() {\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39dae82d5aa36ff8d13f9dd1cbdd1ca7775ac6bccf96788973543d43958c0194" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4291, + "startColumn": 14, + "charOffset": 131575, + "charLength": 4, + "snippet": { + "text": "0x9F" + } + }, + "contextRegion": { + "startLine": 4289, + "startColumn": 14, + "charOffset": 131540, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x9F);\n\tif (player->isPremium() || player->isVip()) {\n\t\tmsg.addByte(1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eab6eb4347031da14f1b3ee0521322ef18081d70c939b969d74ac9f298e93a7f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x9F is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4291, + "startColumn": 14, + "charOffset": 131575, + "charLength": 4, + "snippet": { + "text": "0x9F" + } + }, + "contextRegion": { + "startLine": 4289, + "startColumn": 14, + "charOffset": 131540, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x9F);\n\tif (player->isPremium() || player->isVip()) {\n\t\tmsg.addByte(1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5665da944a08ac3ca87975526066aa5ff1a890ea1fbf624cb793d065f8f12ec6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4294, + "startColumn": 21, + "charOffset": 131667, + "charLength": 10, + "snippet": { + "text": "getTimeNow" + } + }, + "contextRegion": { + "startLine": 4292, + "startColumn": 21, + "charOffset": 131582, + "charLength": 10, + "snippet": { + "text": "\tif (player->isPremium() || player->isVip()) {\n\t\tmsg.addByte(1);\n\t\tmsg.add(getTimeNow() + ((player->getPremiumDays() + 1) * 86400));\n\t} else {\n\t\tmsg.addByte(0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de78e9ea049a2ff8c26dad56579dede673095a42bedaaa52baea9d22e034c559" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'std::time_t' (aka 'long') of a multiplication performed in type 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4294, + "startColumn": 37, + "charOffset": 131683, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 4292, + "startColumn": 37, + "charOffset": 131582, + "charLength": 1, + "snippet": { + "text": "\tif (player->isPremium() || player->isVip()) {\n\t\tmsg.addByte(1);\n\t\tmsg.add(getTimeNow() + ((player->getPremiumDays() + 1) * 86400));\n\t} else {\n\t\tmsg.addByte(0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e170cf5b4f4f1a72cbfaf3f6a5b3979105771649ea5f38936070ddac689e878" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "86400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4294, + "startColumn": 70, + "charOffset": 131716, + "charLength": 5, + "snippet": { + "text": "86400" + } + }, + "contextRegion": { + "startLine": 4292, + "startColumn": 70, + "charOffset": 131582, + "charLength": 5, + "snippet": { + "text": "\tif (player->isPremium() || player->isVip()) {\n\t\tmsg.addByte(1);\n\t\tmsg.add(getTimeNow() + ((player->getPremiumDays() + 1) * 86400));\n\t} else {\n\t\tmsg.addByte(0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3501d8e03cbff9cbcaaf685990ba7a77e0c6559124cd94ad2d14f3ed84ff6cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4311, + "startColumn": 2, + "charOffset": 132223, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4309, + "startColumn": 2, + "charOffset": 132074, + "charLength": 3, + "snippet": { + "text": "\tstd::list spellsList = g_spells().getSpellsByVocation(player->getVocationId());\n\tstd::vector> validSpells;\n\tfor (uint16_t sid : spellsList) {\n\t\tauto spell = g_spells().getInstantSpellById(sid);\n\t\tif (spell && spell->getSpellId() > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb4a920ef097ee18345d5efec2ec4d5fbb04915d2c76cd3024b923ab595e1f77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4319, + "startColumn": 20, + "charOffset": 132441, + "charLength": 11, + "snippet": { + "text": "validSpells" + } + }, + "contextRegion": { + "startLine": 4317, + "startColumn": 20, + "charOffset": 132391, + "charLength": 11, + "snippet": { + "text": "\n\t// Send total size of spells\n\tmsg.add(validSpells.size());\n\t// Send each spell valid ids\n\tfor (const auto &spell : validSpells) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b99b1f3e92bbbf976e09100c1e443757e357c76237b9c6994eb273dc2b652c14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4321, + "startColumn": 2, + "charOffset": 132493, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4319, + "startColumn": 2, + "charOffset": 132422, + "charLength": 3, + "snippet": { + "text": "\tmsg.add(validSpells.size());\n\t// Send each spell valid ids\n\tfor (const auto &spell : validSpells) {\n\t\tif (!spell) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af04fd70960d6d3c1d8faa7dd69db515e1def18ffb08991bbefe875a9bba1dbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4322, + "startColumn": 7, + "charOffset": 132539, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4320, + "startColumn": 7, + "charOffset": 132462, + "charLength": 1, + "snippet": { + "text": "\t// Send each spell valid ids\n\tfor (const auto &spell : validSpells) {\n\t\tif (!spell) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "deb7919710f8ceaaef52dc51ae4691a5c08446ae7cbbfbdbeb48215044f46050" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4328, + "startColumn": 16, + "charOffset": 132645, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 4326, + "startColumn": 16, + "charOffset": 132567, + "charLength": 5, + "snippet": { + "text": "\t\t// Only send valid spells to old client\n\t\tif (oldProtocol) {\n\t\t\tmsg.addByte(spell->getSpellId());\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c77ae33d1f3e096e40177fdfcc06c351ff33a9e46e6a7b86d11c7001b3a406e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4348, + "startColumn": 15, + "charOffset": 133251, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 4346, + "startColumn": 15, + "charOffset": 133215, + "charLength": 6, + "snippet": { + "text": "\n\tif (!oldProtocol) {\n\t\tmsg.addByte(player->getVocation()->getMagicShield()); // bool - determine whether magic shield is active or not\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0360f0254ec758f51ccc5e1c124dac17e82697af2307eebcd5d7854b76d39656" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4355, + "startColumn": 6, + "charOffset": 133429, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4353, + "startColumn": 6, + "charOffset": 133384, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendBlessStatus() {\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de4c7a193b365245c015d5d580ee421eed9175bb1ff764cc84afebd88e625e1c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4365, + "startColumn": 2, + "charOffset": 133693, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4363, + "startColumn": 2, + "charOffset": 133652, + "charLength": 3, + "snippet": { + "text": "\tuint16_t flag = 0;\n\tuint16_t pow2 = 2;\n\tfor (int i = 1; i <= 8; i++) {\n\t\tif (player->hasBlessing(i)) {\n\t\t\tif (i > 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "292c50623ff22ec978d544b931b01545fea7ef71217edf3891117b08766f658e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4365, + "startColumn": 23, + "charOffset": 133714, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 4363, + "startColumn": 23, + "charOffset": 133652, + "charLength": 1, + "snippet": { + "text": "\tuint16_t flag = 0;\n\tuint16_t pow2 = 2;\n\tfor (int i = 1; i <= 8; i++) {\n\t\tif (player->hasBlessing(i)) {\n\t\t\tif (i > 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "beab8da0ecc238fa4c3a3aba55067c24d2ec8554e6b6c5bcb719d340f6bd32d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4366, + "startColumn": 27, + "charOffset": 133750, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 4364, + "startColumn": 27, + "charOffset": 133672, + "charLength": 1, + "snippet": { + "text": "\tuint16_t pow2 = 2;\n\tfor (int i = 1; i <= 8; i++) {\n\t\tif (player->hasBlessing(i)) {\n\t\t\tif (i > 1) {\n\t\t\t\tblessCount++;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92b4e43661f55217c9c67de1c24f9e10d36c8671fa3cf3e0e1035e91f2de5d4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4375, + "startColumn": 14, + "charOffset": 133834, + "charLength": 4, + "snippet": { + "text": "0x9C" + } + }, + "contextRegion": { + "startLine": 4373, + "startColumn": 14, + "charOffset": 133817, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tmsg.addByte(0x9C);\n\tif (oldProtocol) {\n\t\tmsg.add(blessCount >= 5 ? 0x01 : 0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "089e0beb79b7d955932dff4981536f438f34e78c06d4901368e3632ce43c4c56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x9C is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4375, + "startColumn": 14, + "charOffset": 133834, + "charLength": 4, + "snippet": { + "text": "0x9C" + } + }, + "contextRegion": { + "startLine": 4373, + "startColumn": 14, + "charOffset": 133817, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tmsg.addByte(0x9C);\n\tif (oldProtocol) {\n\t\tmsg.add(blessCount >= 5 ? 0x01 : 0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82b0084cff3156c72204be14318e41544269b5a27fa71babbf24f9ccface298c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4377, + "startColumn": 35, + "charOffset": 133895, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 4375, + "startColumn": 35, + "charOffset": 133821, + "charLength": 1, + "snippet": { + "text": "\tmsg.addByte(0x9C);\n\tif (oldProtocol) {\n\t\tmsg.add(blessCount >= 5 ? 0x01 : 0x00);\n\t} else {\n\t\tbool glow = player->getVocationId() > VOCATION_NONE && ((g_configManager().getBoolean(INVENTORY_GLOW, __FUNCTION__) && blessCount >= 5) || player->getLevel() < g_configManager().getNumber(ADVENTURERSBLESSING_LEVEL, __FUNCTION__));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc4dc4642b0a2ee338df3a37d2a7ebc047d63513fa9143bef6c7f667ee499cad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4379, + "startColumn": 136, + "charOffset": 134058, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 4377, + "startColumn": 136, + "charOffset": 133861, + "charLength": 1, + "snippet": { + "text": "\t\tmsg.add(blessCount >= 5 ? 0x01 : 0x00);\n\t} else {\n\t\tbool glow = player->getVocationId() > VOCATION_NONE && ((g_configManager().getBoolean(INVENTORY_GLOW, __FUNCTION__) && blessCount >= 5) || player->getLevel() < g_configManager().getNumber(ADVENTURERSBLESSING_LEVEL, __FUNCTION__));\n\t\tmsg.add(glow ? 1 : 0); // Show up the glowing effect in items if you have all blesses or adventurer's blessing\n\t\tmsg.addByte((blessCount >= 7) ? 3 : ((blessCount >= 5) ? 2 : 1)); // 1 = Disabled | 2 = normal | 3 = green" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e184c491f6267347d5b5b5dc6f16f58a8cf55b8733c413919c702335cba4eef5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4381, + "startColumn": 30, + "charOffset": 134308, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 4379, + "startColumn": 30, + "charOffset": 133923, + "charLength": 1, + "snippet": { + "text": "\t\tbool glow = player->getVocationId() > VOCATION_NONE && ((g_configManager().getBoolean(INVENTORY_GLOW, __FUNCTION__) && blessCount >= 5) || player->getLevel() < g_configManager().getNumber(ADVENTURERSBLESSING_LEVEL, __FUNCTION__));\n\t\tmsg.add(glow ? 1 : 0); // Show up the glowing effect in items if you have all blesses or adventurer's blessing\n\t\tmsg.addByte((blessCount >= 7) ? 3 : ((blessCount >= 5) ? 2 : 1)); // 1 = Disabled | 2 = normal | 3 = green\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28a1e5f530a9be362a01ba794423d0dcd20ef74b92ca428a8b7c9d73154a6a8b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-avoid-nested-conditional-operator", + "ruleIndex": 688, + "kind": "fail", + "level": "warning", + "message": { + "text": "conditional operator is used as sub-expression of parent conditional operator, refrain from using nested conditional operators" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4381, + "startColumn": 40, + "charOffset": 134318, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 4379, + "startColumn": 40, + "charOffset": 133923, + "charLength": 1, + "snippet": { + "text": "\t\tbool glow = player->getVocationId() > VOCATION_NONE && ((g_configManager().getBoolean(INVENTORY_GLOW, __FUNCTION__) && blessCount >= 5) || player->getLevel() < g_configManager().getNumber(ADVENTURERSBLESSING_LEVEL, __FUNCTION__));\n\t\tmsg.add(glow ? 1 : 0); // Show up the glowing effect in items if you have all blesses or adventurer's blessing\n\t\tmsg.addByte((blessCount >= 7) ? 3 : ((blessCount >= 5) ? 2 : 1)); // 1 = Disabled | 2 = normal | 3 = green\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c08e9c7a25ed141f30aa6f1eb46deffbf0d1dbba1a383973399876380213eff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4381, + "startColumn": 55, + "charOffset": 134333, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 4379, + "startColumn": 55, + "charOffset": 133923, + "charLength": 1, + "snippet": { + "text": "\t\tbool glow = player->getVocationId() > VOCATION_NONE && ((g_configManager().getBoolean(INVENTORY_GLOW, __FUNCTION__) && blessCount >= 5) || player->getLevel() < g_configManager().getNumber(ADVENTURERSBLESSING_LEVEL, __FUNCTION__));\n\t\tmsg.add(glow ? 1 : 0); // Show up the glowing effect in items if you have all blesses or adventurer's blessing\n\t\tmsg.addByte((blessCount >= 7) ? 3 : ((blessCount >= 5) ? 2 : 1)); // 1 = Disabled | 2 = normal | 3 = green\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "347a7b5d49cc6389ef5f9a2903facc3b1290d315048b7f6e0eab635f4e92e866" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4390, + "startColumn": 15, + "charOffset": 134633, + "charLength": 4, + "snippet": { + "text": "0x9E" + } + }, + "contextRegion": { + "startLine": 4388, + "startColumn": 15, + "charOffset": 134464, + "charLength": 4, + "snippet": { + "text": "\tif (!g_configManager().getBoolean(FREE_PREMIUM, __FUNCTION__) && !g_configManager().getBoolean(VIP_SYSTEM_ENABLED, __FUNCTION__)) {\n\t\tNetworkMessage msg;\n\t\tmsg.addByte(0x9E);\n\t\tmsg.addByte(16);\n\t\tfor (uint16_t i = 0; i <= 15; i++) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce44e2bded7a63949ebb9056716a311b9805d2be99d2b43848aac6c044bdfd45" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x9E is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4390, + "startColumn": 15, + "charOffset": 134633, + "charLength": 4, + "snippet": { + "text": "0x9E" + } + }, + "contextRegion": { + "startLine": 4388, + "startColumn": 15, + "charOffset": 134464, + "charLength": 4, + "snippet": { + "text": "\tif (!g_configManager().getBoolean(FREE_PREMIUM, __FUNCTION__) && !g_configManager().getBoolean(VIP_SYSTEM_ENABLED, __FUNCTION__)) {\n\t\tNetworkMessage msg;\n\t\tmsg.addByte(0x9E);\n\t\tmsg.addByte(16);\n\t\tfor (uint16_t i = 0; i <= 15; i++) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "683f916dc40a3cda8f6f073281480e90cce734e39f12ed47307bed74db2fb600" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4391, + "startColumn": 15, + "charOffset": 134654, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 4389, + "startColumn": 15, + "charOffset": 134597, + "charLength": 2, + "snippet": { + "text": "\t\tNetworkMessage msg;\n\t\tmsg.addByte(0x9E);\n\t\tmsg.addByte(16);\n\t\tfor (uint16_t i = 0; i <= 15; i++) {\n\t\t\t// PREMIUM_TRIGGER_TRAIN_OFFLINE = false, PREMIUM_TRIGGER_XP_BOOST = false, PREMIUM_TRIGGER_MARKET = false, PREMIUM_TRIGGER_VIP_LIST = false, PREMIUM_TRIGGER_DEPOT_SPACE = false, PREMIUM_TRIGGER_INVITE_PRIVCHAT = false" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5bf867d1c8e9bfd5ba610398124fdc2a1b2de49e2606e0d236470a21491bed7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4392, + "startColumn": 3, + "charOffset": 134661, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4390, + "startColumn": 3, + "charOffset": 134619, + "charLength": 3, + "snippet": { + "text": "\t\tmsg.addByte(0x9E);\n\t\tmsg.addByte(16);\n\t\tfor (uint16_t i = 0; i <= 15; i++) {\n\t\t\t// PREMIUM_TRIGGER_TRAIN_OFFLINE = false, PREMIUM_TRIGGER_XP_BOOST = false, PREMIUM_TRIGGER_MARKET = false, PREMIUM_TRIGGER_VIP_LIST = false, PREMIUM_TRIGGER_DEPOT_SPACE = false, PREMIUM_TRIGGER_INVITE_PRIVCHAT = false\n\t\t\tmsg.addByte(0x01);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e831346a62677e255afd0ee1da2b40b41be48f738e54186786f58b8bdfdc8253" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "15 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4392, + "startColumn": 29, + "charOffset": 134687, + "charLength": 2, + "snippet": { + "text": "15" + } + }, + "contextRegion": { + "startLine": 4390, + "startColumn": 29, + "charOffset": 134619, + "charLength": 2, + "snippet": { + "text": "\t\tmsg.addByte(0x9E);\n\t\tmsg.addByte(16);\n\t\tfor (uint16_t i = 0; i <= 15; i++) {\n\t\t\t// PREMIUM_TRIGGER_TRAIN_OFFLINE = false, PREMIUM_TRIGGER_XP_BOOST = false, PREMIUM_TRIGGER_MARKET = false, PREMIUM_TRIGGER_VIP_LIST = false, PREMIUM_TRIGGER_DEPOT_SPACE = false, PREMIUM_TRIGGER_INVITE_PRIVCHAT = false\n\t\t\tmsg.addByte(0x01);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ad85590f1c22cb4ac235043a0ae933610b676ea6c43434f652bf348f5e50752" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4394, + "startColumn": 16, + "charOffset": 134935, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 4392, + "startColumn": 16, + "charOffset": 134659, + "charLength": 4, + "snippet": { + "text": "\t\tfor (uint16_t i = 0; i <= 15; i++) {\n\t\t\t// PREMIUM_TRIGGER_TRAIN_OFFLINE = false, PREMIUM_TRIGGER_XP_BOOST = false, PREMIUM_TRIGGER_MARKET = false, PREMIUM_TRIGGER_VIP_LIST = false, PREMIUM_TRIGGER_DEPOT_SPACE = false, PREMIUM_TRIGGER_INVITE_PRIVCHAT = false\n\t\t\tmsg.addByte(0x01);\n\t\t}\n\t\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6dd26914d9db008b82160f80d3e1c77b9387f2dac63df36ac572a0f76fb1ba22" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'sendTextMessage' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4400, + "startColumn": 20, + "charOffset": 134999, + "charLength": 15, + "snippet": { + "text": "sendTextMessage" + } + }, + "contextRegion": { + "startLine": 4398, + "startColumn": 20, + "charOffset": 134977, + "charLength": 15, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendTextMessage(const TextMessage &message) {\n\tif (message.type == MESSAGE_NONE) {\n\t\tg_logger().error(\"[ProtocolGame::sendTextMessage] - Message type is wrong, missing or invalid for player with name {}, on position {}\", player->getName(), player->getPosition().toString());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3b6f6f5e95b4ee774a9bb0499096d3307600c51ca8d9c8c17a9e6070df666a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "switch has 2 consecutive identical branches" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4418, + "startColumn": 4, + "charOffset": 135714, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 4416, + "startColumn": 4, + "charOffset": 135695, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase MESSAGE_TUTORIAL_HINT: {\n\t\t\t\tinternalType = MESSAGE_LOGIN;\n\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9f2b4351568d558ee893cd85524f41cc1c8eba03c812ce59504d7f5c19dc59a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "switch has 3 consecutive identical branches" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4442, + "startColumn": 4, + "charOffset": 136202, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 4440, + "startColumn": 4, + "charOffset": 136183, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase MESSAGE_BOOSTED_CREATURE: {\n\t\t\t\tinternalType = MESSAGE_LOOT;\n\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25ed17a2c466ecab387629a82dd4b7bd3e794b50e440da1c4c35b2714f15d536" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4467, + "startColumn": 14, + "charOffset": 136642, + "charLength": 4, + "snippet": { + "text": "0xB4" + } + }, + "contextRegion": { + "startLine": 4465, + "startColumn": 14, + "charOffset": 136607, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xB4);\n\tmsg.addByte(internalType);\n\tswitch (internalType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43bff0f68f85b2dcb85ea8dd1881b813e30f90e250305f3b9c2d61bf45fcc911" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xB4 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4467, + "startColumn": 14, + "charOffset": 136642, + "charLength": 4, + "snippet": { + "text": "0xB4" + } + }, + "contextRegion": { + "startLine": 4465, + "startColumn": 14, + "charOffset": 136607, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xB4);\n\tmsg.addByte(internalType);\n\tswitch (internalType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6fbb60777a4000a909ef8031a28734e033bd637d6052e73a50c4c4c50304eb5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4471, + "startColumn": 3, + "charOffset": 136733, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 4469, + "startColumn": 3, + "charOffset": 136677, + "charLength": 4, + "snippet": { + "text": "\tswitch (internalType) {\n\t\tcase MESSAGE_DAMAGE_DEALT:\n\t\tcase MESSAGE_DAMAGE_RECEIVED:\n\t\tcase MESSAGE_DAMAGE_OTHERS: {\n\t\t\tmsg.addPosition(message.position);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad3706e56d1f4beecda09d628c0194ce3a0fa81df16e0d1f5f3f1dd6caa9f5b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4472, + "startColumn": 3, + "charOffset": 136765, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 4470, + "startColumn": 3, + "charOffset": 136702, + "charLength": 4, + "snippet": { + "text": "\t\tcase MESSAGE_DAMAGE_DEALT:\n\t\tcase MESSAGE_DAMAGE_RECEIVED:\n\t\tcase MESSAGE_DAMAGE_OTHERS: {\n\t\t\tmsg.addPosition(message.position);\n\t\t\tmsg.add(message.primary.value);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2f843b98656f2d465b8b5235c84991a5009f2e52d2396f11cec6776b7079f54" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4481, + "startColumn": 3, + "charOffset": 137044, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 4479, + "startColumn": 3, + "charOffset": 137015, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t\tcase MESSAGE_HEALED:\n\t\tcase MESSAGE_HEALED_OTHERS: {\n\t\t\tmsg.addPosition(message.position);\n\t\t\tmsg.add(message.primary.value);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b3ee1174e123d10e10a3c09554cc9af4d313babca8602c47932de2c2ccf4948" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4488, + "startColumn": 3, + "charOffset": 137239, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 4486, + "startColumn": 3, + "charOffset": 137206, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t\tcase MESSAGE_EXPERIENCE:\n\t\tcase MESSAGE_EXPERIENCE_OTHERS: {\n\t\t\tmsg.addPosition(message.position);\n\t\t\tif (!oldProtocol) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12eac94b40c44ba20d87800c54d2fe66be23381d8caf48cf7d5e09f920bf60b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4499, + "startColumn": 3, + "charOffset": 137520, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 4497, + "startColumn": 3, + "charOffset": 137492, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t\tcase MESSAGE_GUILD:\n\t\tcase MESSAGE_PARTY_MANAGEMENT:\n\t\tcase MESSAGE_PARTY:\n\t\t\tmsg.add(message.channelId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b49b086a70288734d2f0bafdd0661684739a24f78d1411a08d7ced9b5861e4cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4500, + "startColumn": 3, + "charOffset": 137553, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 4498, + "startColumn": 3, + "charOffset": 137496, + "charLength": 4, + "snippet": { + "text": "\t\tcase MESSAGE_GUILD:\n\t\tcase MESSAGE_PARTY_MANAGEMENT:\n\t\tcase MESSAGE_PARTY:\n\t\t\tmsg.add(message.channelId);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ba8166816c641b2e3d36328a84f30e88da1c91fd982aa697f82836fe4c51fa7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4512, + "startColumn": 14, + "charOffset": 137848, + "charLength": 4, + "snippet": { + "text": "0xB3" + } + }, + "contextRegion": { + "startLine": 4510, + "startColumn": 14, + "charOffset": 137756, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendClosePrivate(uint16_t channelId) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xB3);\n\tmsg.add(channelId);\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2d444b69936580ceb7db8a9cbc1195e8946d333e9784e075e7f21f27bd46eed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xB3 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4512, + "startColumn": 14, + "charOffset": 137848, + "charLength": 4, + "snippet": { + "text": "0xB3" + } + }, + "contextRegion": { + "startLine": 4510, + "startColumn": 14, + "charOffset": 137756, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendClosePrivate(uint16_t channelId) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xB3);\n\tmsg.add(channelId);\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1aa4674fb5914ead79dcde4356c84e22061d0e5de54409441f1cd6e78dea347e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4519, + "startColumn": 14, + "charOffset": 138048, + "charLength": 4, + "snippet": { + "text": "0xB2" + } + }, + "contextRegion": { + "startLine": 4517, + "startColumn": 14, + "charOffset": 137916, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendCreatePrivateChannel(uint16_t channelId, const std::string &channelName) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xB2);\n\tmsg.add(channelId);\n\tmsg.addString(channelName, \"ProtocolGame::sendCreatePrivateChannel - channelName\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1158ba0c2bbfaf25290e82d0e6e74ad174660cce884cc455c4d9f52b6774612" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xB2 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4519, + "startColumn": 14, + "charOffset": 138048, + "charLength": 4, + "snippet": { + "text": "0xB2" + } + }, + "contextRegion": { + "startLine": 4517, + "startColumn": 14, + "charOffset": 137916, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendCreatePrivateChannel(uint16_t channelId, const std::string &channelName) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xB2);\n\tmsg.add(channelId);\n\tmsg.addString(channelName, \"ProtocolGame::sendCreatePrivateChannel - channelName\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44e23736e3d5b82b239690eb9ecb6bcfe67670558ea1aece1220351050eeb734" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4522, + "startColumn": 20, + "charOffset": 138190, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 4520, + "startColumn": 20, + "charOffset": 138055, + "charLength": 4, + "snippet": { + "text": "\tmsg.add(channelId);\n\tmsg.addString(channelName, \"ProtocolGame::sendCreatePrivateChannel - channelName\");\n\tmsg.add(0x01);\n\tmsg.addString(player->getName(), \"ProtocolGame::sendCreatePrivateChannel - player->getName()\");\n\tmsg.add(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af0b96bef4f32dc887d4d195b7d99d9694f983a957b3c622d88255ab4bc8a2c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4524, + "startColumn": 20, + "charOffset": 138313, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 4522, + "startColumn": 20, + "charOffset": 138171, + "charLength": 4, + "snippet": { + "text": "\tmsg.add(0x01);\n\tmsg.addString(player->getName(), \"ProtocolGame::sendCreatePrivateChannel - player->getName()\");\n\tmsg.add(0x00);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "213c61fb3aa33b3059e68a24ae1feee956ff3304e2baae202efa6942dd388f2d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4530, + "startColumn": 14, + "charOffset": 138426, + "charLength": 4, + "snippet": { + "text": "0xAB" + } + }, + "contextRegion": { + "startLine": 4528, + "startColumn": 14, + "charOffset": 138350, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendChannelsDialog() {\n\tNetworkMessage msg;\n\tmsg.addByte(0xAB);\n\n\tconst ChannelList &list = g_chat().getChannelList(player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac6a85d3e306c50fc67b4e329d9630a72509eacc9d8623a52460c9752e390cf6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xAB is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4530, + "startColumn": 14, + "charOffset": 138426, + "charLength": 4, + "snippet": { + "text": "0xAB" + } + }, + "contextRegion": { + "startLine": 4528, + "startColumn": 14, + "charOffset": 138350, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendChannelsDialog() {\n\tNetworkMessage msg;\n\tmsg.addByte(0xAB);\n\n\tconst ChannelList &list = g_chat().getChannelList(player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc8c020819503a5afdfd25574114e9ce87c0bb492974d2fce4c26fb1451aaa25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4533, + "startColumn": 14, + "charOffset": 138507, + "charLength": 4, + "snippet": { + "text": "list" + } + }, + "contextRegion": { + "startLine": 4531, + "startColumn": 14, + "charOffset": 138433, + "charLength": 4, + "snippet": { + "text": "\n\tconst ChannelList &list = g_chat().getChannelList(player);\n\tmsg.addByte(list.size());\n\tfor (const auto &channel : list) {\n\t\tmsg.add(channel->getId());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "acc0bb7fb07c1f5bcc24b9dbee70a7b2bcb28ef258b556b4e2b2fe5268f569fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4534, + "startColumn": 2, + "charOffset": 138522, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4532, + "startColumn": 2, + "charOffset": 138434, + "charLength": 3, + "snippet": { + "text": "\tconst ChannelList &list = g_chat().getChannelList(player);\n\tmsg.addByte(list.size());\n\tfor (const auto &channel : list) {\n\t\tmsg.add(channel->getId());\n\t\tmsg.addString(channel->getName(), \"ProtocolGame::sendChannelsDialog - channel->getName()\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ddd789dabcabcbf2e6fe1f065f30a56ec204612ddca6eb5156997412e4bf24f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4544, + "startColumn": 14, + "charOffset": 138905, + "charLength": 4, + "snippet": { + "text": "0xAC" + } + }, + "contextRegion": { + "startLine": 4542, + "startColumn": 14, + "charOffset": 138724, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendChannel(uint16_t channelId, const std::string &channelName, const UsersMap* channelUsers, const InvitedMap* invitedUsers) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xAC);\n\n\tmsg.add(channelId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "248c7620a2528f35f4ba63b17fb7c7ba444b17038d2ab31471b26e5c61087c6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xAC is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4544, + "startColumn": 14, + "charOffset": 138905, + "charLength": 4, + "snippet": { + "text": "0xAC" + } + }, + "contextRegion": { + "startLine": 4542, + "startColumn": 14, + "charOffset": 138724, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendChannel(uint16_t channelId, const std::string &channelName, const UsersMap* channelUsers, const InvitedMap* invitedUsers) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xAC);\n\n\tmsg.add(channelId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e87bf5340769e8e08245c9795b29c74d253ed378cde096e8273e14059a929888" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4549, + "startColumn": 6, + "charOffset": 139022, + "charLength": 12, + "snippet": { + "text": "channelUsers" + } + }, + "contextRegion": { + "startLine": 4547, + "startColumn": 6, + "charOffset": 138944, + "charLength": 12, + "snippet": { + "text": "\tmsg.addString(channelName, \"ProtocolGame::sendChannel - channelName\");\n\n\tif (channelUsers) {\n\t\tmsg.add(channelUsers->size());\n\t\tfor (const auto &it : *channelUsers) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa98f852ceda7583e237d53d470de72c6479743c09cd33f5836d5aa41cd28d70" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const UsersMap *' (aka 'const map> *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4549, + "startColumn": 6, + "charOffset": 139022, + "charLength": 12, + "snippet": { + "text": "channelUsers" + } + }, + "contextRegion": { + "startLine": 4547, + "startColumn": 6, + "charOffset": 138944, + "charLength": 12, + "snippet": { + "text": "\tmsg.addString(channelName, \"ProtocolGame::sendChannel - channelName\");\n\n\tif (channelUsers) {\n\t\tmsg.add(channelUsers->size());\n\t\tfor (const auto &it : *channelUsers) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73b456626c96618809c8c5d7a8aa729732ae98e97e72ec858d4df673839961c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4550, + "startColumn": 21, + "charOffset": 139058, + "charLength": 12, + "snippet": { + "text": "channelUsers" + } + }, + "contextRegion": { + "startLine": 4548, + "startColumn": 21, + "charOffset": 139016, + "charLength": 12, + "snippet": { + "text": "\n\tif (channelUsers) {\n\t\tmsg.add(channelUsers->size());\n\t\tfor (const auto &it : *channelUsers) {\n\t\t\tmsg.addString(it.second->getName(), \"ProtocolGame::sendChannel - it.second->getName()\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0835db23260141a80a9bb5a2f84099d7bb61ceea3600a2e85868f5fa93f10960" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4551, + "startColumn": 3, + "charOffset": 139083, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4549, + "startColumn": 3, + "charOffset": 139017, + "charLength": 3, + "snippet": { + "text": "\tif (channelUsers) {\n\t\tmsg.add(channelUsers->size());\n\t\tfor (const auto &it : *channelUsers) {\n\t\t\tmsg.addString(it.second->getName(), \"ProtocolGame::sendChannel - it.second->getName()\");\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04bc4888c93ca6788beed0ed398fa52181cad3a454511c754a2082ca19aec88d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4555, + "startColumn": 21, + "charOffset": 139248, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 4553, + "startColumn": 21, + "charOffset": 139214, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\tmsg.add(0x00);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "143811f55eb7cc227da9ef6e80e243a12bef4d86027eeefb373c7b87f9836e73" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4558, + "startColumn": 6, + "charOffset": 139264, + "charLength": 12, + "snippet": { + "text": "invitedUsers" + } + }, + "contextRegion": { + "startLine": 4556, + "startColumn": 6, + "charOffset": 139255, + "charLength": 12, + "snippet": { + "text": "\t}\n\n\tif (invitedUsers) {\n\t\tmsg.add(invitedUsers->size());\n\t\tfor (const auto &it : *invitedUsers) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a7f87d045ab07878c7010d092c0981919e6153f97c690301c11345bb74c6743" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const InvitedMap *' (aka 'const map> *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4558, + "startColumn": 6, + "charOffset": 139264, + "charLength": 12, + "snippet": { + "text": "invitedUsers" + } + }, + "contextRegion": { + "startLine": 4556, + "startColumn": 6, + "charOffset": 139255, + "charLength": 12, + "snippet": { + "text": "\t}\n\n\tif (invitedUsers) {\n\t\tmsg.add(invitedUsers->size());\n\t\tfor (const auto &it : *invitedUsers) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "576a5a0eca4fe9e1bf897b3c87eba4064c2545c52cc0e2a7d42be9283213626a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4559, + "startColumn": 21, + "charOffset": 139300, + "charLength": 12, + "snippet": { + "text": "invitedUsers" + } + }, + "contextRegion": { + "startLine": 4557, + "startColumn": 21, + "charOffset": 139258, + "charLength": 12, + "snippet": { + "text": "\n\tif (invitedUsers) {\n\t\tmsg.add(invitedUsers->size());\n\t\tfor (const auto &it : *invitedUsers) {\n\t\t\tmsg.addString(it.second->getName(), \"ProtocolGame::sendChannel - it.second->getName()\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b77ef17f064bc08ecead31a71b8a36c4cd2b9b9073682cabb235e17707ed404f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4560, + "startColumn": 3, + "charOffset": 139325, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4558, + "startColumn": 3, + "charOffset": 139259, + "charLength": 3, + "snippet": { + "text": "\tif (invitedUsers) {\n\t\tmsg.add(invitedUsers->size());\n\t\tfor (const auto &it : *invitedUsers) {\n\t\t\tmsg.addString(it.second->getName(), \"ProtocolGame::sendChannel - it.second->getName()\");\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "292c50623ff22ec978d544b931b01545fea7ef71217edf3891117b08766f658e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4564, + "startColumn": 21, + "charOffset": 139490, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 4562, + "startColumn": 21, + "charOffset": 139456, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\tmsg.add(0x00);\n\t}\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0c7f7ad089407cdaa8760b149ff6e85e30584e31d477163634be9890a108b5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4571, + "startColumn": 14, + "charOffset": 139693, + "charLength": 4, + "snippet": { + "text": "0xAA" + } + }, + "contextRegion": { + "startLine": 4569, + "startColumn": 14, + "charOffset": 139530, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendChannelMessage(const std::string &author, const std::string &text, SpeakClasses type, uint16_t channel) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xAA);\n\tmsg.add(0x00);\n\tmsg.addString(author, \"ProtocolGame::sendChannelMessage - author\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "420220b35f46a038602b290882e603e7363d3ae4610039d9109e84a986ba59fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xAA is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4571, + "startColumn": 14, + "charOffset": 139693, + "charLength": 4, + "snippet": { + "text": "0xAA" + } + }, + "contextRegion": { + "startLine": 4569, + "startColumn": 14, + "charOffset": 139530, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendChannelMessage(const std::string &author, const std::string &text, SpeakClasses type, uint16_t channel) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xAA);\n\tmsg.add(0x00);\n\tmsg.addString(author, \"ProtocolGame::sendChannelMessage - author\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee36ee7c7e3851d0947c456172216bc8d3cbc924419c81423f9f4c7b51183d78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4572, + "startColumn": 20, + "charOffset": 139719, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 4570, + "startColumn": 20, + "charOffset": 139659, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\tmsg.addByte(0xAA);\n\tmsg.add(0x00);\n\tmsg.addString(author, \"ProtocolGame::sendChannelMessage - author\");\n\tmsg.add(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e802535f57860169fac1f1717ce367629f7e15a4335929a454702137f4cc2deb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4574, + "startColumn": 20, + "charOffset": 139814, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 4572, + "startColumn": 20, + "charOffset": 139700, + "charLength": 4, + "snippet": { + "text": "\tmsg.add(0x00);\n\tmsg.addString(author, \"ProtocolGame::sendChannelMessage - author\");\n\tmsg.add(0x00);\n\tmsg.addByte(type);\n\tmsg.add(channel);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0454602f28d4ef701462ad7d7d534fea2c6545ff3d23e13ae9c47b7ef4f94c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4583, + "startColumn": 14, + "charOffset": 140112, + "charLength": 4, + "snippet": { + "text": "0xA2" + } + }, + "contextRegion": { + "startLine": 4581, + "startColumn": 14, + "charOffset": 139965, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendIcons(const std::unordered_set &iconSet, const IconBakragore iconBakragore) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xA2);\n\n\tstd::bitset(PlayerIcon::Count)> iconsBitSet;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f5040f5c1634f6206d2dd8f4935319f2f770ce1050f246fb09652119860ee9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xA2 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4583, + "startColumn": 14, + "charOffset": 140112, + "charLength": 4, + "snippet": { + "text": "0xA2" + } + }, + "contextRegion": { + "startLine": 4581, + "startColumn": 14, + "charOffset": 139965, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendIcons(const std::unordered_set &iconSet, const IconBakragore iconBakragore) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xA2);\n\n\tstd::bitset(PlayerIcon::Count)> iconsBitSet;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba8a0b9c7276448e6ff8ce9a8722b6a0d6e812b7a64ba0b7618eecb2267b6966" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4586, + "startColumn": 2, + "charOffset": 140187, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4584, + "startColumn": 2, + "charOffset": 140119, + "charLength": 3, + "snippet": { + "text": "\n\tstd::bitset(PlayerIcon::Count)> iconsBitSet;\n\tfor (const auto &icon : iconSet) {\n\t\ticonsBitSet.set(enumToValue(icon));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc4e4a90185322d546d6e28ca60780bd775cb7d7938adb07a1e0588199c6c7d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4587, + "startColumn": 15, + "charOffset": 140236, + "charLength": 3, + "snippet": { + "text": "set" + } + }, + "contextRegion": { + "startLine": 4585, + "startColumn": 15, + "charOffset": 140120, + "charLength": 3, + "snippet": { + "text": "\tstd::bitset(PlayerIcon::Count)> iconsBitSet;\n\tfor (const auto &icon : iconSet) {\n\t\ticonsBitSet.set(enumToValue(icon));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b713fc471520102012427f998c586fb7a903869cd783b458df8e0f5567a58586" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4590, + "startColumn": 19, + "charOffset": 140282, + "charLength": 11, + "snippet": { + "text": "iconsBitSet" + } + }, + "contextRegion": { + "startLine": 4588, + "startColumn": 19, + "charOffset": 140260, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\tuint32_t icons = iconsBitSet.to_ulong();\n\n\tif (oldProtocol) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1a32ef3d62298f7f2b1f9684583790cc077231c0db500ae636cb0fdae96d74c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4606, + "startColumn": 14, + "charOffset": 140687, + "charLength": 4, + "snippet": { + "text": "0xA2" + } + }, + "contextRegion": { + "startLine": 4604, + "startColumn": 14, + "charOffset": 140588, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendIconBakragore(const IconBakragore icon) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xA2);\n\tmsg.add(0); // Send empty normal icons\n\tmsg.addByte(enumToValue(icon));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ee6aa1eac8fc405002f1f7ca65548c4cf7b3036db88d7c8e6aabe0aeec7ac64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xA2 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4606, + "startColumn": 14, + "charOffset": 140687, + "charLength": 4, + "snippet": { + "text": "0xA2" + } + }, + "contextRegion": { + "startLine": 4604, + "startColumn": 14, + "charOffset": 140588, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendIconBakragore(const IconBakragore icon) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xA2);\n\tmsg.add(0); // Send empty normal icons\n\tmsg.addByte(enumToValue(icon));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "359ddbd5a5b099937758a8b9f7fd4971ade1b4e9d798331f0860ec087d6809c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4614, + "startColumn": 14, + "charOffset": 141076, + "charLength": 4, + "snippet": { + "text": "0xB7" + } + }, + "contextRegion": { + "startLine": 4612, + "startColumn": 14, + "charOffset": 140807, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendUnjustifiedPoints(const uint8_t &dayProgress, const uint8_t &dayLeft, const uint8_t &weekProgress, const uint8_t &weekLeft, const uint8_t &monthProgress, const uint8_t &monthLeft, const uint8_t &skullDuration) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xB7);\n\tmsg.addByte(dayProgress);\n\tmsg.addByte(dayLeft);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f8d36889318a949393f044c506a5c447bdc1bbe2318febb97f5fffc2ee00909" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xB7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4614, + "startColumn": 14, + "charOffset": 141076, + "charLength": 4, + "snippet": { + "text": "0xB7" + } + }, + "contextRegion": { + "startLine": 4612, + "startColumn": 14, + "charOffset": 140807, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendUnjustifiedPoints(const uint8_t &dayProgress, const uint8_t &dayLeft, const uint8_t &weekProgress, const uint8_t &weekLeft, const uint8_t &monthProgress, const uint8_t &monthLeft, const uint8_t &skullDuration) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xB7);\n\tmsg.addByte(dayProgress);\n\tmsg.addByte(dayLeft);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78b053da817dcb3052fb73acef98ff9821f4c67e1d4e7598c1352b2bbcac89be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'sendContainer' has cognitive complexity of 47 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4625, + "startColumn": 20, + "charOffset": 141317, + "charLength": 13, + "snippet": { + "text": "sendContainer" + } + }, + "contextRegion": { + "startLine": 4623, + "startColumn": 20, + "charOffset": 141295, + "charLength": 13, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendContainer(uint8_t cid, std::shared_ptr container, bool hasParent, uint16_t firstIndex) {\n\tif (!player) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ee84a0e493cb4eb1e070b1232dfa133ed17c46dda8a0769cb10100809f566f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4625, + "startColumn": 74, + "charOffset": 141371, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 4623, + "startColumn": 74, + "charOffset": 141295, + "charLength": 9, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendContainer(uint8_t cid, std::shared_ptr container, bool hasParent, uint16_t firstIndex) {\n\tif (!player) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88e023f9ba507b8ca8f1241232c100253506471c0cfae207f388107fef79df2d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4626, + "startColumn": 6, + "charOffset": 141426, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4624, + "startColumn": 6, + "charOffset": 141297, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendContainer(uint8_t cid, std::shared_ptr container, bool hasParent, uint16_t firstIndex) {\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "709cb99f5ced3e911d37085bbe0403fe9dafd5f22912b09d585571298b02c9c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4631, + "startColumn": 14, + "charOffset": 141485, + "charLength": 4, + "snippet": { + "text": "0x6E" + } + }, + "contextRegion": { + "startLine": 4629, + "startColumn": 14, + "charOffset": 141450, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x6E);\n\n\tmsg.addByte(cid);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "420220b35f46a038602b290882e603e7363d3ae4610039d9109e84a986ba59fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x6E is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4631, + "startColumn": 14, + "charOffset": 141485, + "charLength": 4, + "snippet": { + "text": "0x6E" + } + }, + "contextRegion": { + "startLine": 4629, + "startColumn": 14, + "charOffset": 141450, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x6E);\n\n\tmsg.addByte(cid);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb7fa2872b0b3c17578cf696ee441cde05a9c7f90f059281f89a806d216e0e56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4645, + "startColumn": 14, + "charOffset": 141915, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 4643, + "startColumn": 14, + "charOffset": 141824, + "charLength": 9, + "snippet": { + "text": "\tconst auto itemsStoreInboxToSend = container->getStoreInboxFilteredItems();\n\n\tmsg.addByte(container->capacity());\n\n\tmsg.addByte(hasParent ? 0x01 : 0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d7c92f88464b89567c5cfb4683d1e986c79abcdce5900298b538ea2e7b585d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4657, + "startColumn": 27, + "charOffset": 142288, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 4655, + "startColumn": 27, + "charOffset": 142191, + "charLength": 9, + "snippet": { + "text": "\tmsg.addByte(container->hasPagination() ? 0x01 : 0x00); // Pagination\n\n\tuint32_t containerSize = container->size();\n\tif (!itemsStoreInboxToSend.empty()) {\n\t\tcontainerSize = itemsStoreInboxToSend.size();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bda116732c89c86beff1e3d4f6064dad00f9d7b576fb3e86d3ee2f2f59131048" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4659, + "startColumn": 19, + "charOffset": 142364, + "charLength": 21, + "snippet": { + "text": "itemsStoreInboxToSend" + } + }, + "contextRegion": { + "startLine": 4657, + "startColumn": 19, + "charOffset": 142262, + "charLength": 21, + "snippet": { + "text": "\tuint32_t containerSize = container->size();\n\tif (!itemsStoreInboxToSend.empty()) {\n\t\tcontainerSize = itemsStoreInboxToSend.size();\n\t}\n\tmsg.add(containerSize);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6374087754ccb4ac56d738160d75098a21d2874e0b7a549b548ffe8fa6852bde" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4661, + "startColumn": 20, + "charOffset": 142416, + "charLength": 13, + "snippet": { + "text": "containerSize" + } + }, + "contextRegion": { + "startLine": 4659, + "startColumn": 20, + "charOffset": 142346, + "charLength": 13, + "snippet": { + "text": "\t\tcontainerSize = itemsStoreInboxToSend.size();\n\t}\n\tmsg.add(containerSize);\n\tmsg.add(firstIndex);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc406c103d0b1e01adddd0d4da7b5b80aac5b9be3e7773d35a528ad905824a7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'maxItemsToSend' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4664, + "startColumn": 11, + "charOffset": 142475, + "charLength": 14, + "snippet": { + "text": "maxItemsToSend" + } + }, + "contextRegion": { + "startLine": 4662, + "startColumn": 11, + "charOffset": 142432, + "charLength": 14, + "snippet": { + "text": "\tmsg.add(firstIndex);\n\n\tuint32_t maxItemsToSend;\n\n\tif (container->hasPagination() && firstIndex > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64693f351dbddcecaf84591d2e1655ba4709ebd299d6095ab88bc32979b0480d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4674, + "startColumn": 15, + "charOffset": 142796, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 4672, + "startColumn": 15, + "charOffset": 142691, + "charLength": 4, + "snippet": { + "text": "\tconst ItemDeque &itemList = container->getItemList();\n\tif (firstIndex >= containerSize) {\n\t\tmsg.addByte(0x00);\n\t} else if (container->getID() == ITEM_STORE_INBOX && !itemsStoreInboxToSend.empty()) {\n\t\tmsg.addByte(std::min(maxItemsToSend, containerSize));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "036eaf56251ab369b074c266c889433dffe2ec4ddbc3612a9b658b84c124e1fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4676, + "startColumn": 15, + "charOffset": 142905, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 4674, + "startColumn": 15, + "charOffset": 142782, + "charLength": 3, + "snippet": { + "text": "\t\tmsg.addByte(0x00);\n\t} else if (container->getID() == ITEM_STORE_INBOX && !itemsStoreInboxToSend.empty()) {\n\t\tmsg.addByte(std::min(maxItemsToSend, containerSize));\n\t\tfor (const auto &item : itemsStoreInboxToSend) {\n\t\t\tAddItem(msg, item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c5cc8c4074e86d28dd51936b2310d31cb67c760ea590b7015b8076a0f29a5f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4677, + "startColumn": 3, + "charOffset": 142959, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4675, + "startColumn": 3, + "charOffset": 142803, + "charLength": 3, + "snippet": { + "text": "\t} else if (container->getID() == ITEM_STORE_INBOX && !itemsStoreInboxToSend.empty()) {\n\t\tmsg.addByte(std::min(maxItemsToSend, containerSize));\n\t\tfor (const auto &item : itemsStoreInboxToSend) {\n\t\t\tAddItem(msg, item);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37fe174b1b6b52fa77e3915d36c7a80914db0b44bab69e88e85c2e6b14af9ebb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4681, + "startColumn": 15, + "charOffset": 143059, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 4679, + "startColumn": 15, + "charOffset": 143031, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\tmsg.addByte(std::min(maxItemsToSend, containerSize));\n\n\t\tuint32_t i = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9679e702c48704e64559a56672cc7c8f50a0aa02b8a06af794595741cc8689e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4684, + "startColumn": 3, + "charOffset": 143132, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4682, + "startColumn": 3, + "charOffset": 143111, + "charLength": 3, + "snippet": { + "text": "\n\t\tuint32_t i = 0;\n\t\tfor (ItemDeque::const_iterator it = itemList.begin() + firstIndex, end = itemList.end(); i < maxItemsToSend && it != end; ++it, ++i) {\n\t\t\tAddItem(msg, *it);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4282e1b0be361f1125ccabc36eeb0f67a0d6df61918c3a9a08d9eb9b6da67969" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4684, + "startColumn": 3, + "charOffset": 143132, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4682, + "startColumn": 3, + "charOffset": 143111, + "charLength": 3, + "snippet": { + "text": "\n\t\tuint32_t i = 0;\n\t\tfor (ItemDeque::const_iterator it = itemList.begin() + firstIndex, end = itemList.end(); i < maxItemsToSend && it != end; ++it, ++i) {\n\t\t\tAddItem(msg, *it);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00f40d746c3c6ea05939bde95d43e51429caf387f229035b5b5028036b40d3e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4684, + "startColumn": 8, + "charOffset": 143137, + "charLength": 9, + "snippet": { + "text": "ItemDeque" + } + }, + "contextRegion": { + "startLine": 4682, + "startColumn": 8, + "charOffset": 143111, + "charLength": 9, + "snippet": { + "text": "\n\t\tuint32_t i = 0;\n\t\tfor (ItemDeque::const_iterator it = itemList.begin() + firstIndex, end = itemList.end(); i < maxItemsToSend && it != end; ++it, ++i) {\n\t\t\tAddItem(msg, *it);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f417d981397e4f09659d0c35250a7c3f580ff0c39488ab43179f5f06e192e153" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when declaring iterators" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4684, + "startColumn": 8, + "charOffset": 143137, + "charLength": 9, + "snippet": { + "text": "ItemDeque" + } + }, + "contextRegion": { + "startLine": 4682, + "startColumn": 8, + "charOffset": 143111, + "charLength": 9, + "snippet": { + "text": "\n\t\tuint32_t i = 0;\n\t\tfor (ItemDeque::const_iterator it = itemList.begin() + firstIndex, end = itemList.end(); i < maxItemsToSend && it != end; ++it, ++i) {\n\t\t\tAddItem(msg, *it);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61e854e407aac684e4c568a054ea0b1a690e47dd82d4069e21d97825406eb6f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'maxItemsToSend' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4684, + "startColumn": 92, + "charOffset": 143221, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 4682, + "startColumn": 92, + "charOffset": 143111, + "charLength": 1, + "snippet": { + "text": "\n\t\tuint32_t i = 0;\n\t\tfor (ItemDeque::const_iterator it = itemList.begin() + firstIndex, end = itemList.end(); i < maxItemsToSend && it != end; ++it, ++i) {\n\t\t\tAddItem(msg, *it);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c903898a619d4b1a65d93f33199c0d95ad408899bf36435a6ad1d2a99f78b50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-18-1", + "ruleIndex": 432, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-18-1: The comma operator shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4684, + "startColumn": 129, + "charOffset": 143258, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 4682, + "startColumn": 129, + "charOffset": 143111, + "charLength": 1, + "snippet": { + "text": "\n\t\tuint32_t i = 0;\n\t\tfor (ItemDeque::const_iterator it = itemList.begin() + firstIndex, end = itemList.end(); i < maxItemsToSend && it != end; ++it, ++i) {\n\t\t\tAddItem(msg, *it);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97ddec627135e4d55e2fe82d117c7f619eeedf58bfef923c8ccffd2cc0501877" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4702, + "startColumn": 4, + "charOffset": 143788, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4700, + "startColumn": 4, + "charOffset": 143710, + "charLength": 3, + "snippet": { + "text": "\t\t\tbool toSendCategory = false;\n\t\t\t// Check if category exist in the deque\n\t\t\tfor (const auto &tempCategory : categories) {\n\t\t\t\tif (tempCategory == category.value()) {\n\t\t\t\t\ttoSendCategory = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1e0cce1fde03db9ac550f510f068241d1b1cba8a43e1c8f10657f5a55b68e07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4720, + "startColumn": 15, + "charOffset": 144389, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 4718, + "startColumn": 15, + "charOffset": 144361, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\tmsg.addByte(0x00);\n\t\tmsg.addByte(0x00);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d95c084015d37d2270fdc5c4b59f245ef6c11b9f4c0bdd7aca20aadf3c5f8cc6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4721, + "startColumn": 15, + "charOffset": 144410, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 4719, + "startColumn": 15, + "charOffset": 144365, + "charLength": 4, + "snippet": { + "text": "\t} else {\n\t\tmsg.addByte(0x00);\n\t\tmsg.addByte(0x00);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a5de4c4b957c1c03d9e39f347bbe819c957b0e757793728d9bab6b6e27213d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4741, + "startColumn": 6, + "charOffset": 144756, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4739, + "startColumn": 6, + "charOffset": 144708, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendLootContainers() {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dee40691903862d8ce4b7fd5dfbec3843a86953075bd7992995cb1f1971f8cd7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4746, + "startColumn": 14, + "charOffset": 144830, + "charLength": 4, + "snippet": { + "text": "0xC0" + } + }, + "contextRegion": { + "startLine": 4744, + "startColumn": 14, + "charOffset": 144795, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xC0);\n\tmsg.addByte(player->quickLootFallbackToMainContainer ? 1 : 0);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6e652213029079ed1329e8b56b6990d16b424535f34e756050ebfa2f12e94de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xC0 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4746, + "startColumn": 14, + "charOffset": 144830, + "charLength": 4, + "snippet": { + "text": "0xC0" + } + }, + "contextRegion": { + "startLine": 4744, + "startColumn": 14, + "charOffset": 144795, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xC0);\n\tmsg.addByte(player->quickLootFallbackToMainContainer ? 1 : 0);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e440b3bf79b2d94a960455a32b9070f19b1888025c4ec54f19a2f9591a1e7c1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4750, + "startColumn": 2, + "charOffset": 145020, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4748, + "startColumn": 2, + "charOffset": 144901, + "charLength": 3, + "snippet": { + "text": "\n\tstd::map, std::shared_ptr>> managedContainersMap;\n\tfor (auto [category, containersPair] : player->m_managedContainers) {\n\t\tif (containersPair.first && !containersPair.first->isRemoved()) {\n\t\t\tmanagedContainersMap[category].first = containersPair.first;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f33c0a6f34d09cb8d2fe7d58a0fc4bfb80c5db5318a31eda8d05a4ff102b4b99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4750, + "startColumn": 12, + "charOffset": 145030, + "charLength": 1, + "snippet": { + "text": "[" + } + }, + "contextRegion": { + "startLine": 4748, + "startColumn": 12, + "charOffset": 144901, + "charLength": 1, + "snippet": { + "text": "\n\tstd::map, std::shared_ptr>> managedContainersMap;\n\tfor (auto [category, containersPair] : player->m_managedContainers) {\n\t\tif (containersPair.first && !containersPair.first->isRemoved()) {\n\t\t\tmanagedContainersMap[category].first = containersPair.first;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59a3c031bb22bbb63d42c4a43bf0da55ba01ae22452bb9d4103ebb4f18502f1e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4762, + "startColumn": 2, + "charOffset": 145460, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4760, + "startColumn": 2, + "charOffset": 145415, + "charLength": 3, + "snippet": { + "text": "\tmsg.skipBytes(1);\n\tuint8_t containers = 0;\n\tfor (auto [category, containersPair] : managedContainersMap) {\n\t\tif (!isValidObjectCategory(category)) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "317e90b99fef7d87bd4c70d75c06bc3bc3ea5b37103f0bc1d037f99204ac77da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4762, + "startColumn": 12, + "charOffset": 145470, + "charLength": 1, + "snippet": { + "text": "[" + } + }, + "contextRegion": { + "startLine": 4760, + "startColumn": 12, + "charOffset": 145415, + "charLength": 1, + "snippet": { + "text": "\tmsg.skipBytes(1);\n\tuint8_t containers = 0;\n\tfor (auto [category, containersPair] : managedContainersMap) {\n\t\tif (!isValidObjectCategory(category)) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26c062d164dd746508a91c1179080aaf3729987f69cdbfab54d2a02d5ce38836" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4767, + "startColumn": 15, + "charOffset": 145612, + "charLength": 8, + "snippet": { + "text": "category" + } + }, + "contextRegion": { + "startLine": 4765, + "startColumn": 15, + "charOffset": 145578, + "charLength": 8, + "snippet": { + "text": "\t\t}\n\t\tcontainers++;\n\t\tmsg.addByte(category);\n\t\tuint16_t lootContainerId = containersPair.first ? containersPair.first->getID() : 0;\n\t\tuint16_t obtainContainerId = containersPair.second ? containersPair.second->getID() : 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fe724a42d5e5df061751b979347399ceefc556798b1bc70dd0b5b77c9009f84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4768, + "startColumn": 30, + "charOffset": 145652, + "charLength": 14, + "snippet": { + "text": "containersPair" + } + }, + "contextRegion": { + "startLine": 4766, + "startColumn": 30, + "charOffset": 145582, + "charLength": 14, + "snippet": { + "text": "\t\tcontainers++;\n\t\tmsg.addByte(category);\n\t\tuint16_t lootContainerId = containersPair.first ? containersPair.first->getID() : 0;\n\t\tuint16_t obtainContainerId = containersPair.second ? containersPair.second->getID() : 0;\n\t\tmsg.add(lootContainerId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f4837e49134a81b6b426d17ca2d2c190d50080dc056a59ca17861244b1b672f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4769, + "startColumn": 32, + "charOffset": 145741, + "charLength": 14, + "snippet": { + "text": "containersPair" + } + }, + "contextRegion": { + "startLine": 4767, + "startColumn": 32, + "charOffset": 145598, + "charLength": 14, + "snippet": { + "text": "\t\tmsg.addByte(category);\n\t\tuint16_t lootContainerId = containersPair.first ? containersPair.first->getID() : 0;\n\t\tuint16_t obtainContainerId = containersPair.second ? containersPair.second->getID() : 0;\n\t\tmsg.add(lootContainerId);\n\t\tmsg.add(obtainContainerId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54b0935e43b268225f2808f65d1524e00f4db46578cc5af34d4f2c7989abcc27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4779, + "startColumn": 56, + "charOffset": 146031, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 4777, + "startColumn": 56, + "charOffset": 145973, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendLootStats(std::shared_ptr item, uint8_t count) {\n\tif (!item) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4e123b91ae129e3b84b19379669f0dc16be9d7945b5d0d3f487ad6497615939" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4780, + "startColumn": 6, + "charOffset": 146059, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4778, + "startColumn": 6, + "charOffset": 145975, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendLootStats(std::shared_ptr item, uint8_t count) {\n\tif (!item) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8edde48732fa28e0578be0fc095f893f7fec780a86f3637e10df68e7c5698b20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4794, + "startColumn": 14, + "charOffset": 146295, + "charLength": 4, + "snippet": { + "text": "0xCF" + } + }, + "contextRegion": { + "startLine": 4792, + "startColumn": 14, + "charOffset": 146260, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xCF);\n\tAddItem(msg, lootedItem);\n\tmsg.addString(lootedItem->getName(), \"ProtocolGame::sendLootStats - lootedItem->getName()\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd12f3a3d6344a5673faa79bc3bb30ed480d43e2982ad5dd86f8c6b3b9da553f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xCF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4794, + "startColumn": 14, + "charOffset": 146295, + "charLength": 4, + "snippet": { + "text": "0xCF" + } + }, + "contextRegion": { + "startLine": 4792, + "startColumn": 14, + "charOffset": 146260, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xCF);\n\tAddItem(msg, lootedItem);\n\tmsg.addString(lootedItem->getName(), \"ProtocolGame::sendLootStats - lootedItem->getName()\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3aa7413f19de95297434607264132aadfc6b58b1867081954bddc345946b4f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4803, + "startColumn": 50, + "charOffset": 146561, + "charLength": 3, + "snippet": { + "text": "npc" + } + }, + "contextRegion": { + "startLine": 4801, + "startColumn": 50, + "charOffset": 146509, + "charLength": 3, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendShop(std::shared_ptr npc) {\n\tBenchmark brenchmark;\n\tNetworkMessage msg;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc3f792addd5f857cb01e2649690bed7a17066072c4eea9410162909ebb8c871" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4806, + "startColumn": 14, + "charOffset": 146625, + "charLength": 4, + "snippet": { + "text": "0x7A" + } + }, + "contextRegion": { + "startLine": 4804, + "startColumn": 14, + "charOffset": 146568, + "charLength": 4, + "snippet": { + "text": "\tBenchmark brenchmark;\n\tNetworkMessage msg;\n\tmsg.addByte(0x7A);\n\tmsg.addString(npc->getName(), \"ProtocolGame::sendShop - npc->getName()\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc295e822360dbb2aa64533202bf8259f6a4064cf3125576a10197795f5c6093" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x7A is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4806, + "startColumn": 14, + "charOffset": 146625, + "charLength": 4, + "snippet": { + "text": "0x7A" + } + }, + "contextRegion": { + "startLine": 4804, + "startColumn": 14, + "charOffset": 146568, + "charLength": 4, + "snippet": { + "text": "\tBenchmark brenchmark;\n\tNetworkMessage msg;\n\tmsg.addByte(0x7A);\n\tmsg.addString(npc->getName(), \"ProtocolGame::sendShop - npc->getName()\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56c75cc787747a46f0bdf0cfe214d1454335ba30cd84c2a45c5c4d7cce02bc89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4815, + "startColumn": 25, + "charOffset": 146914, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 4813, + "startColumn": 25, + "charOffset": 146822, + "charLength": 3, + "snippet": { + "text": "\n\tconst auto &shoplist = npc->getShopItemVector(player->getGUID());\n\tuint16_t itemsToSend = std::min(shoplist.size(), std::numeric_limits::max());\n\tmsg.add(itemsToSend);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c36841f662b9997dda9a051a00049b7d4fe16fa0696dd05d00b744c980cca8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4822, + "startColumn": 10, + "charOffset": 147308, + "charLength": 24, + "snippet": { + "text": "getAllSaleItemIdAndCount" + } + }, + "contextRegion": { + "startLine": 4820, + "startColumn": 10, + "charOffset": 147170, + "charLength": 24, + "snippet": { + "text": "\t// Initialize the inventoryMap outside the loop to avoid creation on each iteration\n\tstd::map inventoryMap;\n\tplayer->getAllSaleItemIdAndCount(inventoryMap);\n\tuint16_t i = 0;\n\tfor (const ShopBlock &shopBlock : shoplist) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f3dd1e0df647b53fe25bafbe625234aa20ba10fa59a3aa4ba43144ae2f5cddf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4824, + "startColumn": 2, + "charOffset": 147366, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4822, + "startColumn": 2, + "charOffset": 147299, + "charLength": 3, + "snippet": { + "text": "\tplayer->getAllSaleItemIdAndCount(inventoryMap);\n\tuint16_t i = 0;\n\tfor (const ShopBlock &shopBlock : shoplist) {\n\t\tif (++i > itemsToSend) {\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5fb7bfe0c0cb428af2173c70a5f7866f0be9d9615e511b1a88be3573c8823ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4847, + "startColumn": 14, + "charOffset": 148063, + "charLength": 4, + "snippet": { + "text": "0x7C" + } + }, + "contextRegion": { + "startLine": 4845, + "startColumn": 14, + "charOffset": 147992, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendCloseShop() {\n\tNetworkMessage msg;\n\tmsg.addByte(0x7C);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43bf45482293549ef5488bb81763d21b0870d6bf6a079f7a3596b07e8ebf93c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x7C is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4847, + "startColumn": 14, + "charOffset": 148063, + "charLength": 4, + "snippet": { + "text": "0x7C" + } + }, + "contextRegion": { + "startLine": 4845, + "startColumn": 14, + "charOffset": 147992, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendCloseShop() {\n\tNetworkMessage msg;\n\tmsg.addByte(0x7C);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "521d75e564f992b7e9b0de923acd829face4caaf0724e5c2ddf9a79fea0ab6bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4852, + "startColumn": 6, + "charOffset": 148144, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4850, + "startColumn": 6, + "charOffset": 148099, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendClientCheck() {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84c7f9608a39fb0819d2b4eb0b67b220b102c8a619946684740d96cc5a8d1bb8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4857, + "startColumn": 14, + "charOffset": 148218, + "charLength": 4, + "snippet": { + "text": "0x63" + } + }, + "contextRegion": { + "startLine": 4855, + "startColumn": 14, + "charOffset": 148183, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x63);\n\tmsg.add(1);\n\tmsg.addByte(1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3cceab59d1f0fe07cd104df742f2b1692610460a601d030ee3ad3039cec025be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x63 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4857, + "startColumn": 14, + "charOffset": 148218, + "charLength": 4, + "snippet": { + "text": "0x63" + } + }, + "contextRegion": { + "startLine": 4855, + "startColumn": 14, + "charOffset": 148183, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x63);\n\tmsg.add(1);\n\tmsg.addByte(1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "422f16336dbac637a09011b209878c2de8e108e87a02eb4046ea30c6e8518b45" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4864, + "startColumn": 6, + "charOffset": 148336, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4862, + "startColumn": 6, + "charOffset": 148294, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendGameNews() {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1afc36cf08ac4523241a16cff8ce2aa3fb2193556e808506cce981fa6153b0e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4869, + "startColumn": 14, + "charOffset": 148410, + "charLength": 4, + "snippet": { + "text": "0x98" + } + }, + "contextRegion": { + "startLine": 4867, + "startColumn": 14, + "charOffset": 148375, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x98);\n\tmsg.add(1); // unknown\n\tmsg.addByte(1); //(0 = open | 1 = highlight)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac6a85d3e306c50fc67b4e329d9630a72509eacc9d8623a52460c9752e390cf6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x98 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4869, + "startColumn": 14, + "charOffset": 148410, + "charLength": 4, + "snippet": { + "text": "0x98" + } + }, + "contextRegion": { + "startLine": 4867, + "startColumn": 14, + "charOffset": 148375, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x98);\n\tmsg.add(1); // unknown\n\tmsg.addByte(1); //(0 = open | 1 = highlight)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a458d33ae81ab0655a49443f5ca6b39620fcfbb0e7fd32476f2e364a2128dd9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4891, + "startColumn": 14, + "charOffset": 149330, + "charLength": 4, + "snippet": { + "text": "0xEE" + } + }, + "contextRegion": { + "startLine": 4889, + "startColumn": 14, + "charOffset": 149295, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xEE);\n\tmsg.addByte(resourceType);\n\tmsg.add(value);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "104f09a800d9b15935922d90983f2d4b595d501c3301ded879d0ab350afd414b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xEE is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4891, + "startColumn": 14, + "charOffset": 149330, + "charLength": 4, + "snippet": { + "text": "0xEE" + } + }, + "contextRegion": { + "startLine": 4889, + "startColumn": 14, + "charOffset": 149295, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xEE);\n\tmsg.addByte(resourceType);\n\tmsg.add(value);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9d7f7a972618abc455d0e4b5ed795a34781bbe60b7f974ea9d68eb97aa35cbb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'sendSaleItemList' has cognitive complexity of 26 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4897, + "startColumn": 20, + "charOffset": 149441, + "charLength": 16, + "snippet": { + "text": "sendSaleItemList" + } + }, + "contextRegion": { + "startLine": 4895, + "startColumn": 20, + "charOffset": 149419, + "charLength": 16, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendSaleItemList(const std::vector &shopVector, const std::map &inventoryMap) {\n\tsendResourceBalance(RESOURCE_BANK, player->getBankBalance());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cdee53e1be4c877e20f4e18da538cb4047703f5e2645e6957d86dc01e44b28ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4906, + "startColumn": 55, + "charOffset": 150053, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 4904, + "startColumn": 55, + "charOffset": 149915, + "charLength": 5, + "snippet": { + "text": "\t\tauto it = inventoryMap.find(ITEM_CRYSTAL_COIN);\n\t\tif (it != inventoryMap.end()) {\n\t\t\tplayerMoney += static_cast(it->second) * 10000;\n\t\t}\n\t\tit = inventoryMap.find(ITEM_PLATINUM_COIN);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f3807df42bfc2d8a909e7096b74de23e465986690867fb078d223036499a7b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4910, + "startColumn": 55, + "charOffset": 150198, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 4908, + "startColumn": 55, + "charOffset": 150064, + "charLength": 3, + "snippet": { + "text": "\t\tit = inventoryMap.find(ITEM_PLATINUM_COIN);\n\t\tif (it != inventoryMap.end()) {\n\t\t\tplayerMoney += static_cast(it->second) * 100;\n\t\t}\n\t\tit = inventoryMap.find(ITEM_GOLD_COIN);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0cee3fc4310ce3e7d5232cb5d7aa6bee80d54e0278f7b810295642117ba923db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4927, + "startColumn": 14, + "charOffset": 150759, + "charLength": 4, + "snippet": { + "text": "0x7B" + } + }, + "contextRegion": { + "startLine": 4925, + "startColumn": 14, + "charOffset": 150724, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x7B);\n\n\tif (oldProtocol) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6861adf95c88b330c4a6c477293cf94f6f6a6dffced17c01fbc2c6099f59d1ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x7B is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4927, + "startColumn": 14, + "charOffset": 150759, + "charLength": 4, + "snippet": { + "text": "0x7B" + } + }, + "contextRegion": { + "startLine": 4925, + "startColumn": 14, + "charOffset": 150724, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x7B);\n\n\tif (oldProtocol) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41e7d99ace1c7247f1c90b96fec7070f03563e79d2601bbb0c79bc9525aa8d03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4937, + "startColumn": 2, + "charOffset": 150952, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4935, + "startColumn": 2, + "charOffset": 150931, + "charLength": 3, + "snippet": { + "text": "\tmsg.skipBytes(2);\n\n\tfor (const ShopBlock &shopBlock : shopVector) {\n\t\tif (shopBlock.itemSellPrice == 0) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "077ff36874ddba45135b9d4b208d4e8a7f67f2602994c587e9c60cf3e5c8fc5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4950, + "startColumn": 25, + "charOffset": 151443, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 4948, + "startColumn": 25, + "charOffset": 151321, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tmsg.add(std::min(it->second, std::numeric_limits::max()));\n\t\t\t}\n\t\t\tif (++itemsToSend >= 0xFFFF) {\n\t\t\t\tbreak;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3470fd0da394d3a4157e6699f61150a15e0b3573808a8c119856ca78a363fe5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4963, + "startColumn": 14, + "charOffset": 151666, + "charLength": 4, + "snippet": { + "text": "0xF6" + } + }, + "contextRegion": { + "startLine": 4961, + "startColumn": 14, + "charOffset": 151577, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendMarketEnter(uint32_t depotId) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xF6);\n\n\tif (oldProtocol) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aacd8c8554b8cbc277ed04aa31559205c8508f76508cb94fd4700a0f1741b79e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xF6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4963, + "startColumn": 14, + "charOffset": 151666, + "charLength": 4, + "snippet": { + "text": "0xF6" + } + }, + "contextRegion": { + "startLine": 4961, + "startColumn": 14, + "charOffset": 151577, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendMarketEnter(uint32_t depotId) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xF6);\n\n\tif (oldProtocol) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db1c1fac46131564dc684dca496531dafa05caa94e8daa0845dc4e2dcd6369d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4972, + "startColumn": 6, + "charOffset": 151971, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4970, + "startColumn": 6, + "charOffset": 151888, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr depotLocker = player->getDepotLocker(depotId);\n\tif (!depotLocker) {\n\t\tmsg.add(0x00);\n\t\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab0c92182462149cd09255360d3992c3c93f109f47e9c012a8fa994f1d7950f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4973, + "startColumn": 21, + "charOffset": 152007, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 4971, + "startColumn": 21, + "charOffset": 151889, + "charLength": 4, + "snippet": { + "text": "\tstd::shared_ptr depotLocker = player->getDepotLocker(depotId);\n\tif (!depotLocker) {\n\t\tmsg.add(0x00);\n\t\twriteToOutputBuffer(msg);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e802535f57860169fac1f1717ce367629f7e15a4335929a454702137f4cc2deb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 4987, + "startColumn": 3, + "charOffset": 152439, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4985, + "startColumn": 3, + "charOffset": 152345, + "charLength": 3, + "snippet": { + "text": "\tuint16_t totalItemsCount = 0;\n\tfor (const auto &[itemId, tierAndCountMap] : lockerItems) {\n\t\tfor (const auto &[tier, count] : tierAndCountMap) {\n\t\t\tmsg.add(itemId);\n\t\t\tif (!oldProtocol && Item::items[itemId].upgradeClassification > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3965757c94bff7217d624da524f5cc480dc582c1e6154ad8c734d462c4241d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5006, + "startColumn": 6, + "charOffset": 153011, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5004, + "startColumn": 6, + "charOffset": 152966, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendCoinBalance() {\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9bdae305ba836d3ab3932b9326660a112d891758ced9259f55168aa110e0906" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-todo", + "ruleIndex": 545, + "kind": "fail", + "level": "warning", + "message": { + "text": "missing username/bug in TODO" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5011, + "startColumn": 2, + "charOffset": 153058, + "charLength": 39, + "snippet": { + "text": "// TODO: export this to it own function" + } + }, + "contextRegion": { + "startLine": 5009, + "startColumn": 2, + "charOffset": 153035, + "charLength": 39, + "snippet": { + "text": "\n\t// send is updating\n\t// TODO: export this to it own function\n\tNetworkMessage msg;\n\tmsg.addByte(0xF2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d88cef30603ead05153b3858d653326fcaf97e94e6ab60a5faffe99042d24f0a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5013, + "startColumn": 14, + "charOffset": 153132, + "charLength": 4, + "snippet": { + "text": "0xF2" + } + }, + "contextRegion": { + "startLine": 5011, + "startColumn": 14, + "charOffset": 153057, + "charLength": 4, + "snippet": { + "text": "\t// TODO: export this to it own function\n\tNetworkMessage msg;\n\tmsg.addByte(0xF2);\n\tmsg.addByte(0x01);\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b905ff3237d724d790efa48c0b6ef88c123b969e0faa8e1efde1cfdbc2c21d89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xF2 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5013, + "startColumn": 14, + "charOffset": 153132, + "charLength": 4, + "snippet": { + "text": "0xF2" + } + }, + "contextRegion": { + "startLine": 5011, + "startColumn": 14, + "charOffset": 153057, + "charLength": 4, + "snippet": { + "text": "\t// TODO: export this to it own function\n\tNetworkMessage msg;\n\tmsg.addByte(0xF2);\n\tmsg.addByte(0x01);\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4402c391a2bbef620ecc502d1dee2bacebca65e4e131a67b31b7a2189a310b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5014, + "startColumn": 14, + "charOffset": 153152, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 5012, + "startColumn": 14, + "charOffset": 153098, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\tmsg.addByte(0xF2);\n\tmsg.addByte(0x01);\n\twriteToOutputBuffer(msg);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1158ba0c2bbfaf25290e82d0e6e74ad174660cce884cc455c4d9f52b6774612" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5020, + "startColumn": 14, + "charOffset": 153231, + "charLength": 4, + "snippet": { + "text": "0xDF" + } + }, + "contextRegion": { + "startLine": 5018, + "startColumn": 14, + "charOffset": 153201, + "charLength": 4, + "snippet": { + "text": "\n\t// send update\n\tmsg.addByte(0xDF);\n\tmsg.addByte(0x01);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ee6aa1eac8fc405002f1f7ca65548c4cf7b3036db88d7c8e6aabe0aeec7ac64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xDF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5020, + "startColumn": 14, + "charOffset": 153231, + "charLength": 4, + "snippet": { + "text": "0xDF" + } + }, + "contextRegion": { + "startLine": 5018, + "startColumn": 14, + "charOffset": 153201, + "charLength": 4, + "snippet": { + "text": "\n\t// send update\n\tmsg.addByte(0xDF);\n\tmsg.addByte(0x01);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33e61861f48b20c6e71bc099912fa0580e660dcc6522db982c0246c8670ad047" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5021, + "startColumn": 14, + "charOffset": 153251, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 5019, + "startColumn": 14, + "charOffset": 153202, + "charLength": 4, + "snippet": { + "text": "\t// send update\n\tmsg.addByte(0xDF);\n\tmsg.addByte(0x01);\n\n\tmsg.add(player->coinBalance); // Normal Coins" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38295e9cf1a4cad50e5e2e6d7759b0e4dd356ee6f869e0fb8b49bea627a958a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5034, + "startColumn": 6, + "charOffset": 153561, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5032, + "startColumn": 6, + "charOffset": 153514, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::updateCoinBalance() {\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d25595c1f22a7391b515e0df1c58940171c9486b08bb635c4eef9681c2a3478e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5054, + "startColumn": 14, + "charOffset": 154254, + "charLength": 4, + "snippet": { + "text": "0xF7" + } + }, + "contextRegion": { + "startLine": 5052, + "startColumn": 14, + "charOffset": 154181, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendMarketLeave() {\n\tNetworkMessage msg;\n\tmsg.addByte(0xF7);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3db484473334f837172c2028fbcaa8215f000390864733ab149cb1680fd75640" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xF7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5054, + "startColumn": 14, + "charOffset": 154254, + "charLength": 4, + "snippet": { + "text": "0xF7" + } + }, + "contextRegion": { + "startLine": 5052, + "startColumn": 14, + "charOffset": 154181, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendMarketLeave() {\n\tNetworkMessage msg;\n\tmsg.addByte(0xF7);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b5d1a968f8bc81e907cf80079b50ed529972dec6ce73a4ad4ed30022cbdeb04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5061, + "startColumn": 14, + "charOffset": 154468, + "charLength": 4, + "snippet": { + "text": "0xF9" + } + }, + "contextRegion": { + "startLine": 5059, + "startColumn": 14, + "charOffset": 154433, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\n\tmsg.addByte(0xF9);\n\tif (!oldProtocol) {\n\t\tmsg.addByte(MARKETREQUEST_ITEM_BROWSE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "436fa7a272a1a1df5424a85e3095e292893166bbb53813b46cc403963d84164e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xF9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5061, + "startColumn": 14, + "charOffset": 154468, + "charLength": 4, + "snippet": { + "text": "0xF9" + } + }, + "contextRegion": { + "startLine": 5059, + "startColumn": 14, + "charOffset": 154433, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\n\tmsg.addByte(0xF9);\n\tif (!oldProtocol) {\n\t\tmsg.addByte(MARKETREQUEST_ITEM_BROWSE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ac075e1db875b5ce2829120df514c5806f162feb39bf3706a54f0ef65bf53b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5063, + "startColumn": 15, + "charOffset": 154510, + "charLength": 25, + "snippet": { + "text": "MARKETREQUEST_ITEM_BROWSE" + } + }, + "contextRegion": { + "startLine": 5061, + "startColumn": 15, + "charOffset": 154455, + "charLength": 25, + "snippet": { + "text": "\tmsg.addByte(0xF9);\n\tif (!oldProtocol) {\n\t\tmsg.addByte(MARKETREQUEST_ITEM_BROWSE);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73f2f035170ced82ce864383ff398c695f8df03d764c451ee52d302cd44f5295" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5071, + "startColumn": 20, + "charOffset": 154684, + "charLength": 9, + "snippet": { + "text": "buyOffers" + } + }, + "contextRegion": { + "startLine": 5069, + "startColumn": 20, + "charOffset": 154661, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tmsg.add(buyOffers.size());\n\tfor (const MarketOffer &offer : buyOffers) {\n\t\tmsg.add(offer.timestamp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ba759cc1cf8100627a601b81d49466ad0924e11db9be594702fc9e8fe1e84d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5072, + "startColumn": 2, + "charOffset": 154704, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5070, + "startColumn": 2, + "charOffset": 154664, + "charLength": 3, + "snippet": { + "text": "\n\tmsg.add(buyOffers.size());\n\tfor (const MarketOffer &offer : buyOffers) {\n\t\tmsg.add(offer.timestamp);\n\t\tmsg.add(offer.counter);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6079bd3054687c577d41439a20da02d2b3a1fad868bf6e76b4109ece397f5ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5077, + "startColumn": 22, + "charOffset": 154900, + "charLength": 5, + "snippet": { + "text": "offer" + } + }, + "contextRegion": { + "startLine": 5075, + "startColumn": 22, + "charOffset": 154823, + "charLength": 5, + "snippet": { + "text": "\t\tmsg.add(offer.amount);\n\t\tif (oldProtocol) {\n\t\t\tmsg.add(offer.price);\n\t\t} else {\n\t\t\tmsg.add(static_cast(offer.price));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b0cfbc82ef8c99c9e9a717c3ba140ea5c6443b4099594549e13c81fb7e45352" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5084, + "startColumn": 20, + "charOffset": 155102, + "charLength": 10, + "snippet": { + "text": "sellOffers" + } + }, + "contextRegion": { + "startLine": 5082, + "startColumn": 20, + "charOffset": 155079, + "charLength": 10, + "snippet": { + "text": "\t}\n\n\tmsg.add(sellOffers.size());\n\tfor (const MarketOffer &offer : sellOffers) {\n\t\tmsg.add(offer.timestamp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9e0bd9ee2b07b38ea2986c53bb58ebb5fca0c2423fcfa0a11026efa969509fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5085, + "startColumn": 2, + "charOffset": 155123, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5083, + "startColumn": 2, + "charOffset": 155082, + "charLength": 3, + "snippet": { + "text": "\n\tmsg.add(sellOffers.size());\n\tfor (const MarketOffer &offer : sellOffers) {\n\t\tmsg.add(offer.timestamp);\n\t\tmsg.add(offer.counter);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53693112f52b9d7a2537b4391f9c92976ec5cf77cd38b462d8687d6ffc1c2939" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5090, + "startColumn": 22, + "charOffset": 155320, + "charLength": 5, + "snippet": { + "text": "offer" + } + }, + "contextRegion": { + "startLine": 5088, + "startColumn": 22, + "charOffset": 155243, + "charLength": 5, + "snippet": { + "text": "\t\tmsg.add(offer.amount);\n\t\tif (oldProtocol) {\n\t\t\tmsg.add(offer.price);\n\t\t} else {\n\t\t\tmsg.add(static_cast(offer.price));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1aad1eb945c3ddb01e805a06288efa8eb891bc4eaa67d23d1d9f5fe3a94ae91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5103, + "startColumn": 14, + "charOffset": 155660, + "charLength": 4, + "snippet": { + "text": "0xF9" + } + }, + "contextRegion": { + "startLine": 5101, + "startColumn": 14, + "charOffset": 155555, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendMarketAcceptOffer(const MarketOfferEx &offer) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xF9);\n\tif (!oldProtocol) {\n\t\tmsg.addByte(MARKETREQUEST_ITEM_BROWSE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12497708faa67e6152db71abb15c9d360bfc98152a9208e5e2f54e9858ec8158" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xF9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5103, + "startColumn": 14, + "charOffset": 155660, + "charLength": 4, + "snippet": { + "text": "0xF9" + } + }, + "contextRegion": { + "startLine": 5101, + "startColumn": 14, + "charOffset": 155555, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendMarketAcceptOffer(const MarketOfferEx &offer) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xF9);\n\tif (!oldProtocol) {\n\t\tmsg.addByte(MARKETREQUEST_ITEM_BROWSE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6dcc652645f67e7b185cd024d01be6b890cc35f1beb47ae30f659782e3dd549c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5105, + "startColumn": 15, + "charOffset": 155702, + "charLength": 25, + "snippet": { + "text": "MARKETREQUEST_ITEM_BROWSE" + } + }, + "contextRegion": { + "startLine": 5103, + "startColumn": 15, + "charOffset": 155647, + "charLength": 25, + "snippet": { + "text": "\tmsg.addByte(0xF9);\n\tif (!oldProtocol) {\n\t\tmsg.addByte(MARKETREQUEST_ITEM_BROWSE);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df54ac2355c640d3d13b97608cbd6e9c88d31ee7fc53ba3fe18274c7e870be77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5114, + "startColumn": 21, + "charOffset": 155934, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 5112, + "startColumn": 21, + "charOffset": 155874, + "charLength": 4, + "snippet": { + "text": "\n\tif (offer.type == MARKETACTION_BUY) {\n\t\tmsg.add(0x01);\n\t\tmsg.add(offer.timestamp);\n\t\tmsg.add(offer.counter);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b54ef7b7c5be802ee6a0bad3909373905e9c18f26972bd1e028b8d616b82369f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5119, + "startColumn": 22, + "charOffset": 156092, + "charLength": 5, + "snippet": { + "text": "offer" + } + }, + "contextRegion": { + "startLine": 5117, + "startColumn": 22, + "charOffset": 156015, + "charLength": 5, + "snippet": { + "text": "\t\tmsg.add(offer.amount);\n\t\tif (oldProtocol) {\n\t\t\tmsg.add(offer.price);\n\t\t} else {\n\t\t\tmsg.add(static_cast(offer.price));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5509ac20a8ce8ead5ca3f7fa1743f414cb362ce7ba060d19c9da298f02bc67b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5124, + "startColumn": 21, + "charOffset": 156292, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5122, + "startColumn": 21, + "charOffset": 156175, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t\tmsg.addString(offer.playerName, \"ProtocolGame::sendMarketAcceptOffer - offer.playerName\");\n\t\tmsg.add(0x00);\n\t} else {\n\t\tmsg.add(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "875e9c25a1aef98fa3dd9fc4040eaae1465ff402a5ccc1b2e0add376a397f301" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5126, + "startColumn": 21, + "charOffset": 156329, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5124, + "startColumn": 21, + "charOffset": 156272, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.add(0x00);\n\t} else {\n\t\tmsg.add(0x00);\n\t\tmsg.add(0x01);\n\t\tmsg.add(offer.timestamp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d517a1bcddd1095222eb902088e8e01a03257037676dd9e6dbd9b563beb8e588" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5127, + "startColumn": 21, + "charOffset": 156356, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 5125, + "startColumn": 21, + "charOffset": 156299, + "charLength": 4, + "snippet": { + "text": "\t} else {\n\t\tmsg.add(0x00);\n\t\tmsg.add(0x01);\n\t\tmsg.add(offer.timestamp);\n\t\tmsg.add(offer.counter);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d14982e3f17cb9891d2f7188bc9294952b13d1bcf9d8bd56c4b758899fb6a71" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5132, + "startColumn": 22, + "charOffset": 156514, + "charLength": 5, + "snippet": { + "text": "offer" + } + }, + "contextRegion": { + "startLine": 5130, + "startColumn": 22, + "charOffset": 156437, + "charLength": 5, + "snippet": { + "text": "\t\tmsg.add(offer.amount);\n\t\tif (oldProtocol) {\n\t\t\tmsg.add(offer.price);\n\t\t} else {\n\t\t\tmsg.add(static_cast(offer.price));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "242ef6c78ccaf717b740ad618d51c64c65bbb1a35c24ba3c639e0be643341f51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5144, + "startColumn": 14, + "charOffset": 156878, + "charLength": 4, + "snippet": { + "text": "0xF9" + } + }, + "contextRegion": { + "startLine": 5142, + "startColumn": 14, + "charOffset": 156728, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendMarketBrowseOwnOffers(const MarketOfferList &buyOffers, const MarketOfferList &sellOffers) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xF9);\n\tif (oldProtocol) {\n\t\tmsg.add(MARKETREQUEST_OWN_OFFERS_OLD);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af0b96bef4f32dc887d4d195b7d99d9694f983a957b3c622d88255ab4bc8a2c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xF9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5144, + "startColumn": 14, + "charOffset": 156878, + "charLength": 4, + "snippet": { + "text": "0xF9" + } + }, + "contextRegion": { + "startLine": 5142, + "startColumn": 14, + "charOffset": 156728, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendMarketBrowseOwnOffers(const MarketOfferList &buyOffers, const MarketOfferList &sellOffers) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xF9);\n\tif (oldProtocol) {\n\t\tmsg.add(MARKETREQUEST_OWN_OFFERS_OLD);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e137ae77b5cdebe8d135b12d884b95d2e1c745a957ae2cb41fbcbfa5906c1d05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5146, + "startColumn": 21, + "charOffset": 156925, + "charLength": 28, + "snippet": { + "text": "MARKETREQUEST_OWN_OFFERS_OLD" + } + }, + "contextRegion": { + "startLine": 5144, + "startColumn": 21, + "charOffset": 156865, + "charLength": 28, + "snippet": { + "text": "\tmsg.addByte(0xF9);\n\tif (oldProtocol) {\n\t\tmsg.add(MARKETREQUEST_OWN_OFFERS_OLD);\n\t} else {\n\t\tmsg.addByte(MARKETREQUEST_OWN_OFFERS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "942d288049d6325c96d86c264a5864bd9f505cdb9dfaff2c1a79d9f6ec164186" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5148, + "startColumn": 15, + "charOffset": 156980, + "charLength": 24, + "snippet": { + "text": "MARKETREQUEST_OWN_OFFERS" + } + }, + "contextRegion": { + "startLine": 5146, + "startColumn": 15, + "charOffset": 156905, + "charLength": 24, + "snippet": { + "text": "\t\tmsg.add(MARKETREQUEST_OWN_OFFERS_OLD);\n\t} else {\n\t\tmsg.addByte(MARKETREQUEST_OWN_OFFERS);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39b60fbd601f7bbbfc094a87fbefc4d6f3e98d9f0917d3403a13ea5bc94fb04d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5151, + "startColumn": 20, + "charOffset": 157030, + "charLength": 9, + "snippet": { + "text": "buyOffers" + } + }, + "contextRegion": { + "startLine": 5149, + "startColumn": 20, + "charOffset": 157007, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tmsg.add(buyOffers.size());\n\tfor (const MarketOffer &offer : buyOffers) {\n\t\tmsg.add(offer.timestamp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a2ba90b4e27b92181932f04ea0df29da9a357e209c961478c18aea9b466d25e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5152, + "startColumn": 2, + "charOffset": 157050, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5150, + "startColumn": 2, + "charOffset": 157010, + "charLength": 3, + "snippet": { + "text": "\n\tmsg.add(buyOffers.size());\n\tfor (const MarketOffer &offer : buyOffers) {\n\t\tmsg.add(offer.timestamp);\n\t\tmsg.add(offer.counter);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "475cf9b0fa85fb04ff01c02af30fdeae7d9c56977709bea1e38b2e8169346eb6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5161, + "startColumn": 22, + "charOffset": 157390, + "charLength": 5, + "snippet": { + "text": "offer" + } + }, + "contextRegion": { + "startLine": 5159, + "startColumn": 22, + "charOffset": 157313, + "charLength": 5, + "snippet": { + "text": "\t\tmsg.add(offer.amount);\n\t\tif (oldProtocol) {\n\t\t\tmsg.add(offer.price);\n\t\t} else {\n\t\t\tmsg.add(static_cast(offer.price));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa4a5e0398a21c63ef0b1b8489c93d267ddb93335424421b6dfaf5bc88066431" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5167, + "startColumn": 20, + "charOffset": 157500, + "charLength": 10, + "snippet": { + "text": "sellOffers" + } + }, + "contextRegion": { + "startLine": 5165, + "startColumn": 20, + "charOffset": 157477, + "charLength": 10, + "snippet": { + "text": "\t}\n\n\tmsg.add(sellOffers.size());\n\tfor (const MarketOffer &offer : sellOffers) {\n\t\tmsg.add(offer.timestamp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ba759cc1cf8100627a601b81d49466ad0924e11db9be594702fc9e8fe1e84d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5168, + "startColumn": 2, + "charOffset": 157521, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5166, + "startColumn": 2, + "charOffset": 157480, + "charLength": 3, + "snippet": { + "text": "\n\tmsg.add(sellOffers.size());\n\tfor (const MarketOffer &offer : sellOffers) {\n\t\tmsg.add(offer.timestamp);\n\t\tmsg.add(offer.counter);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9cdf6d85c524c2c4a3381bb3151bf7473ab4971995370cb279cede46921d504" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5177, + "startColumn": 22, + "charOffset": 157862, + "charLength": 5, + "snippet": { + "text": "offer" + } + }, + "contextRegion": { + "startLine": 5175, + "startColumn": 22, + "charOffset": 157785, + "charLength": 5, + "snippet": { + "text": "\t\tmsg.add(offer.amount);\n\t\tif (oldProtocol) {\n\t\t\tmsg.add(offer.price);\n\t\t} else {\n\t\t\tmsg.add(static_cast(offer.price));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a8d9cf69dcfaf89ae35d3bb0cee497310ee96a95a493988abbe8b9d406b1c7f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5188, + "startColumn": 14, + "charOffset": 158088, + "charLength": 4, + "snippet": { + "text": "0xF9" + } + }, + "contextRegion": { + "startLine": 5186, + "startColumn": 14, + "charOffset": 157983, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendMarketCancelOffer(const MarketOfferEx &offer) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xF9);\n\tif (oldProtocol) {\n\t\tmsg.add(MARKETREQUEST_OWN_OFFERS_OLD);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e43475cfa51e6ee75b9f7f8c251af39eb6d0c7e6229e3089ad4c699e436a1be8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xF9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5188, + "startColumn": 14, + "charOffset": 158088, + "charLength": 4, + "snippet": { + "text": "0xF9" + } + }, + "contextRegion": { + "startLine": 5186, + "startColumn": 14, + "charOffset": 157983, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendMarketCancelOffer(const MarketOfferEx &offer) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xF9);\n\tif (oldProtocol) {\n\t\tmsg.add(MARKETREQUEST_OWN_OFFERS_OLD);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5dadf936a7e61fa2ca3cae31e743d01e588621720b842923dde0a67195c631d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5190, + "startColumn": 21, + "charOffset": 158135, + "charLength": 28, + "snippet": { + "text": "MARKETREQUEST_OWN_OFFERS_OLD" + } + }, + "contextRegion": { + "startLine": 5188, + "startColumn": 21, + "charOffset": 158075, + "charLength": 28, + "snippet": { + "text": "\tmsg.addByte(0xF9);\n\tif (oldProtocol) {\n\t\tmsg.add(MARKETREQUEST_OWN_OFFERS_OLD);\n\t} else {\n\t\tmsg.addByte(MARKETREQUEST_OWN_OFFERS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bdd5649366ade3638483d987cd07506afd0d374598ef45fd2130de771769dd40" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5192, + "startColumn": 15, + "charOffset": 158190, + "charLength": 24, + "snippet": { + "text": "MARKETREQUEST_OWN_OFFERS" + } + }, + "contextRegion": { + "startLine": 5190, + "startColumn": 15, + "charOffset": 158115, + "charLength": 24, + "snippet": { + "text": "\t\tmsg.add(MARKETREQUEST_OWN_OFFERS_OLD);\n\t} else {\n\t\tmsg.addByte(MARKETREQUEST_OWN_OFFERS);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d6f49d4ea8577e3405e4fa4cf9b7e404ff82c75781ceb2e866944dcda34a3da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5196, + "startColumn": 21, + "charOffset": 158280, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 5194, + "startColumn": 21, + "charOffset": 158220, + "charLength": 4, + "snippet": { + "text": "\n\tif (offer.type == MARKETACTION_BUY) {\n\t\tmsg.add(0x01);\n\t\tmsg.add(offer.timestamp);\n\t\tmsg.add(offer.counter);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53cc3ae93bdb5038a45be8ede7b000aaa601506e1e90d7261fb1939cbd11b386" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5205, + "startColumn": 22, + "charOffset": 158582, + "charLength": 5, + "snippet": { + "text": "offer" + } + }, + "contextRegion": { + "startLine": 5203, + "startColumn": 22, + "charOffset": 158505, + "charLength": 5, + "snippet": { + "text": "\t\tmsg.add(offer.amount);\n\t\tif (oldProtocol) {\n\t\t\tmsg.add(offer.price);\n\t\t} else {\n\t\t\tmsg.add(static_cast(offer.price));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92b4e43661f55217c9c67de1c24f9e10d36c8671fa3cf3e0e1035e91f2de5d4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5209, + "startColumn": 21, + "charOffset": 158689, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5207, + "startColumn": 21, + "charOffset": 158607, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.add(static_cast(offer.price));\n\t\t}\n\t\tmsg.add(0x00);\n\t} else {\n\t\tmsg.add(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe8ca648127e904d33c5f5c5814c6cdc9451402264c93ce1e49959fe5199ce6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5211, + "startColumn": 21, + "charOffset": 158726, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5209, + "startColumn": 21, + "charOffset": 158669, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.add(0x00);\n\t} else {\n\t\tmsg.add(0x00);\n\t\tmsg.add(0x01);\n\t\tmsg.add(offer.timestamp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "acde2745a38d2889221fcb1f50c9b34016afb626ef9536ac8a4d6dd6e5c48e6e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5212, + "startColumn": 21, + "charOffset": 158753, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 5210, + "startColumn": 21, + "charOffset": 158696, + "charLength": 4, + "snippet": { + "text": "\t} else {\n\t\tmsg.add(0x00);\n\t\tmsg.add(0x01);\n\t\tmsg.add(offer.timestamp);\n\t\tmsg.add(offer.counter);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "894b5bf504c906853ce2c8bab40c50984b7661543b99bf6de26115502299cb77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5221, + "startColumn": 22, + "charOffset": 159055, + "charLength": 5, + "snippet": { + "text": "offer" + } + }, + "contextRegion": { + "startLine": 5219, + "startColumn": 22, + "charOffset": 158978, + "charLength": 5, + "snippet": { + "text": "\t\tmsg.add(offer.amount);\n\t\tif (oldProtocol) {\n\t\t\tmsg.add(offer.price);\n\t\t} else {\n\t\t\tmsg.add(static_cast(offer.price));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be15816817486fb3d9eca41eb3668b11d1baf7031f653527ef39ba7eef1be147" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5233, + "startColumn": 48, + "charOffset": 159413, + "charLength": 9, + "snippet": { + "text": "buyOffers" + } + }, + "contextRegion": { + "startLine": 5231, + "startColumn": 48, + "charOffset": 159307, + "charLength": 9, + "snippet": { + "text": "\tuint32_t i = 0;\n\tstd::map counterMap;\n\tuint32_t buyOffersToSend = std::min(buyOffers.size(), 810 + std::max(0, 810 - sellOffers.size()));\n\tuint32_t sellOffersToSend = std::min(sellOffers.size(), 810 + std::max(0, 810 - buyOffers.size()));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be6cef3f62cdd4b5517f35df84bfed0dea3d1f3a3a6a48f071760c966036842d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "810 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5233, + "startColumn": 66, + "charOffset": 159431, + "charLength": 3, + "snippet": { + "text": "810" + } + }, + "contextRegion": { + "startLine": 5231, + "startColumn": 66, + "charOffset": 159307, + "charLength": 3, + "snippet": { + "text": "\tuint32_t i = 0;\n\tstd::map counterMap;\n\tuint32_t buyOffersToSend = std::min(buyOffers.size(), 810 + std::max(0, 810 - sellOffers.size()));\n\tuint32_t sellOffersToSend = std::min(sellOffers.size(), 810 + std::max(0, 810 - buyOffers.size()));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3aae51966eab7793b349b2642e6cb44f978098e1136186731c10a088a6dea6c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5233, + "startColumn": 93, + "charOffset": 159458, + "charLength": 3, + "snippet": { + "text": "810" + } + }, + "contextRegion": { + "startLine": 5231, + "startColumn": 93, + "charOffset": 159307, + "charLength": 3, + "snippet": { + "text": "\tuint32_t i = 0;\n\tstd::map counterMap;\n\tuint32_t buyOffersToSend = std::min(buyOffers.size(), 810 + std::max(0, 810 - sellOffers.size()));\n\tuint32_t sellOffersToSend = std::min(sellOffers.size(), 810 + std::max(0, 810 - buyOffers.size()));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "054b69b43353eade5bdefcc2db0f9dc51530e84eeb8341350a31651313e54d04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5233, + "startColumn": 93, + "charOffset": 159458, + "charLength": 3, + "snippet": { + "text": "810" + } + }, + "contextRegion": { + "startLine": 5231, + "startColumn": 93, + "charOffset": 159307, + "charLength": 3, + "snippet": { + "text": "\tuint32_t i = 0;\n\tstd::map counterMap;\n\tuint32_t buyOffersToSend = std::min(buyOffers.size(), 810 + std::max(0, 810 - sellOffers.size()));\n\tuint32_t sellOffersToSend = std::min(sellOffers.size(), 810 + std::max(0, 810 - buyOffers.size()));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c36841f662b9997dda9a051a00049b7d4fe16fa0696dd05d00b744c980cca8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "810 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5233, + "startColumn": 93, + "charOffset": 159458, + "charLength": 3, + "snippet": { + "text": "810" + } + }, + "contextRegion": { + "startLine": 5231, + "startColumn": 93, + "charOffset": 159307, + "charLength": 3, + "snippet": { + "text": "\tuint32_t i = 0;\n\tstd::map counterMap;\n\tuint32_t buyOffersToSend = std::min(buyOffers.size(), 810 + std::max(0, 810 - sellOffers.size()));\n\tuint32_t sellOffersToSend = std::min(sellOffers.size(), 810 + std::max(0, 810 - buyOffers.size()));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3b10625db1e92f049c07dff715259c64921353382386ed88d9a4d88df286a02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5234, + "startColumn": 49, + "charOffset": 159533, + "charLength": 10, + "snippet": { + "text": "sellOffers" + } + }, + "contextRegion": { + "startLine": 5232, + "startColumn": 49, + "charOffset": 159324, + "charLength": 10, + "snippet": { + "text": "\tstd::map counterMap;\n\tuint32_t buyOffersToSend = std::min(buyOffers.size(), 810 + std::max(0, 810 - sellOffers.size()));\n\tuint32_t sellOffersToSend = std::min(sellOffers.size(), 810 + std::max(0, 810 - buyOffers.size()));\n\n\tNetworkMessage msg;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e70fe75f8fbf31ae7d1116754e5b9b9e1aa9b05e0a036e545d8378b38615e93" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "810 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5234, + "startColumn": 68, + "charOffset": 159552, + "charLength": 3, + "snippet": { + "text": "810" + } + }, + "contextRegion": { + "startLine": 5232, + "startColumn": 68, + "charOffset": 159324, + "charLength": 3, + "snippet": { + "text": "\tstd::map counterMap;\n\tuint32_t buyOffersToSend = std::min(buyOffers.size(), 810 + std::max(0, 810 - sellOffers.size()));\n\tuint32_t sellOffersToSend = std::min(sellOffers.size(), 810 + std::max(0, 810 - buyOffers.size()));\n\n\tNetworkMessage msg;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "143a46e17045b7dbe1843b826b9e50e0e128c5b9b01c86ddc6793ea03d642a31" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5234, + "startColumn": 95, + "charOffset": 159579, + "charLength": 3, + "snippet": { + "text": "810" + } + }, + "contextRegion": { + "startLine": 5232, + "startColumn": 95, + "charOffset": 159324, + "charLength": 3, + "snippet": { + "text": "\tstd::map counterMap;\n\tuint32_t buyOffersToSend = std::min(buyOffers.size(), 810 + std::max(0, 810 - sellOffers.size()));\n\tuint32_t sellOffersToSend = std::min(sellOffers.size(), 810 + std::max(0, 810 - buyOffers.size()));\n\n\tNetworkMessage msg;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95c7400b31dc36d755109b6f698c4d859b6d873100960a041a4ef7b74fe19809" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5234, + "startColumn": 95, + "charOffset": 159579, + "charLength": 3, + "snippet": { + "text": "810" + } + }, + "contextRegion": { + "startLine": 5232, + "startColumn": 95, + "charOffset": 159324, + "charLength": 3, + "snippet": { + "text": "\tstd::map counterMap;\n\tuint32_t buyOffersToSend = std::min(buyOffers.size(), 810 + std::max(0, 810 - sellOffers.size()));\n\tuint32_t sellOffersToSend = std::min(sellOffers.size(), 810 + std::max(0, 810 - buyOffers.size()));\n\n\tNetworkMessage msg;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d7c92f88464b89567c5cfb4683d1e986c79abcdce5900298b538ea2e7b585d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "810 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5234, + "startColumn": 95, + "charOffset": 159579, + "charLength": 3, + "snippet": { + "text": "810" + } + }, + "contextRegion": { + "startLine": 5232, + "startColumn": 95, + "charOffset": 159324, + "charLength": 3, + "snippet": { + "text": "\tstd::map counterMap;\n\tuint32_t buyOffersToSend = std::min(buyOffers.size(), 810 + std::max(0, 810 - sellOffers.size()));\n\tuint32_t sellOffersToSend = std::min(sellOffers.size(), 810 + std::max(0, 810 - buyOffers.size()));\n\n\tNetworkMessage msg;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dadbb0ffc4546658cf0c5e3912409faa33c3810b2fe4d0b787ce9dcc6ff9dfa9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5237, + "startColumn": 14, + "charOffset": 159640, + "charLength": 4, + "snippet": { + "text": "0xF9" + } + }, + "contextRegion": { + "startLine": 5235, + "startColumn": 14, + "charOffset": 159605, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xF9);\n\tif (oldProtocol) {\n\t\tmsg.add(MARKETREQUEST_OWN_HISTORY_OLD);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de71efdfd6d7b3264cae1ec6c742428631fb982fb57d43df3945a5d84e5a93d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xF9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5237, + "startColumn": 14, + "charOffset": 159640, + "charLength": 4, + "snippet": { + "text": "0xF9" + } + }, + "contextRegion": { + "startLine": 5235, + "startColumn": 14, + "charOffset": 159605, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xF9);\n\tif (oldProtocol) {\n\t\tmsg.add(MARKETREQUEST_OWN_HISTORY_OLD);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f69712b7db1d981bf6ae1f19ae04834a9b1145c7b21b90c8cadf8b9f263ca4a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5239, + "startColumn": 21, + "charOffset": 159687, + "charLength": 29, + "snippet": { + "text": "MARKETREQUEST_OWN_HISTORY_OLD" + } + }, + "contextRegion": { + "startLine": 5237, + "startColumn": 21, + "charOffset": 159627, + "charLength": 29, + "snippet": { + "text": "\tmsg.addByte(0xF9);\n\tif (oldProtocol) {\n\t\tmsg.add(MARKETREQUEST_OWN_HISTORY_OLD);\n\t} else {\n\t\tmsg.addByte(MARKETREQUEST_OWN_HISTORY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b30a57f635d446891154ed53e10fce4a7796862317f5bdb7a5f06bcd27a9b7d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5241, + "startColumn": 15, + "charOffset": 159743, + "charLength": 25, + "snippet": { + "text": "MARKETREQUEST_OWN_HISTORY" + } + }, + "contextRegion": { + "startLine": 5239, + "startColumn": 15, + "charOffset": 159667, + "charLength": 25, + "snippet": { + "text": "\t\tmsg.add(MARKETREQUEST_OWN_HISTORY_OLD);\n\t} else {\n\t\tmsg.addByte(MARKETREQUEST_OWN_HISTORY);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9371605ca91e95a5ace6339969f85041a67e60e3b90a998eed13574a8d5b2b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5245, + "startColumn": 2, + "charOffset": 159813, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5243, + "startColumn": 2, + "charOffset": 159774, + "charLength": 3, + "snippet": { + "text": "\n\tmsg.add(buyOffersToSend);\n\tfor (auto it = buyOffers.begin(); i < buyOffersToSend; ++it, ++i) {\n\t\tmsg.add(it->timestamp);\n\t\tmsg.add(counterMap[it->timestamp]++);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f96dbbf165de687269594a5ef092206fde6e911a78d6aafe6d19efacb4cfd941" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'buyOffersToSend' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5245, + "startColumn": 36, + "charOffset": 159847, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 5243, + "startColumn": 36, + "charOffset": 159774, + "charLength": 1, + "snippet": { + "text": "\n\tmsg.add(buyOffersToSend);\n\tfor (auto it = buyOffers.begin(); i < buyOffersToSend; ++it, ++i) {\n\t\tmsg.add(it->timestamp);\n\t\tmsg.add(counterMap[it->timestamp]++);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06c243ac2d5ea8e4ff88d3516aca3f29ba06a5c0a78ac010ed6e04b37110ce36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-18-1", + "ruleIndex": 432, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-18-1: The comma operator shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5245, + "startColumn": 61, + "charOffset": 159872, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 5243, + "startColumn": 61, + "charOffset": 159774, + "charLength": 1, + "snippet": { + "text": "\n\tmsg.add(buyOffersToSend);\n\tfor (auto it = buyOffers.begin(); i < buyOffersToSend; ++it, ++i) {\n\t\tmsg.add(it->timestamp);\n\t\tmsg.add(counterMap[it->timestamp]++);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9229eb1d191415c71d530c3e5b90189cf2c1a6af77a5ad3cf6c57bcf9960173" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5254, + "startColumn": 22, + "charOffset": 160180, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 5252, + "startColumn": 22, + "charOffset": 160105, + "charLength": 2, + "snippet": { + "text": "\t\tmsg.add(it->amount);\n\t\tif (oldProtocol) {\n\t\t\tmsg.add(it->price);\n\t\t} else {\n\t\t\tmsg.add(static_cast(it->price));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "086602e2d530dd9ed54cda1babcc1dc3c2fb77996df043d5018b9aca2b6f9f4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5258, + "startColumn": 15, + "charOffset": 160277, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 5256, + "startColumn": 15, + "charOffset": 160203, + "charLength": 2, + "snippet": { + "text": "\t\t\tmsg.add(static_cast(it->price));\n\t\t}\n\t\tmsg.addByte(it->state);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa755614c99704122c60e6e2d78846a41c0915a1355d68254494eb756f2aa4d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5265, + "startColumn": 2, + "charOffset": 160362, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5263, + "startColumn": 2, + "charOffset": 160322, + "charLength": 3, + "snippet": { + "text": "\n\tmsg.add(sellOffersToSend);\n\tfor (auto it = sellOffers.begin(); i < sellOffersToSend; ++it, ++i) {\n\t\tmsg.add(it->timestamp);\n\t\tmsg.add(counterMap[it->timestamp]++);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "18af8b80a262b9d7c0f302c1ea429f4bfd407d861cc0da5d10a5865762e3c0bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'sellOffersToSend' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5265, + "startColumn": 37, + "charOffset": 160397, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 5263, + "startColumn": 37, + "charOffset": 160322, + "charLength": 1, + "snippet": { + "text": "\n\tmsg.add(sellOffersToSend);\n\tfor (auto it = sellOffers.begin(); i < sellOffersToSend; ++it, ++i) {\n\t\tmsg.add(it->timestamp);\n\t\tmsg.add(counterMap[it->timestamp]++);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2c9c771c376e33f467f917855b637da6956d239d7d61eaf82b9b975f77aae51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-18-1", + "ruleIndex": 432, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-18-1: The comma operator shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5265, + "startColumn": 63, + "charOffset": 160423, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 5263, + "startColumn": 63, + "charOffset": 160322, + "charLength": 1, + "snippet": { + "text": "\n\tmsg.add(sellOffersToSend);\n\tfor (auto it = sellOffers.begin(); i < sellOffersToSend; ++it, ++i) {\n\t\tmsg.add(it->timestamp);\n\t\tmsg.add(counterMap[it->timestamp]++);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90f668f733f8bccba3b14abba93c62fc3e28ef160a48648c1e14a1f1ca8bde19" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5274, + "startColumn": 15, + "charOffset": 160719, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 5272, + "startColumn": 15, + "charOffset": 160640, + "charLength": 2, + "snippet": { + "text": "\t\tmsg.add(it->amount);\n\t\tmsg.add(it->price);\n\t\tmsg.addByte(it->state);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2def4eb83ec2284a41455b2ceb270ad4bcb5bba96d425c6576ca15eae04cd786" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5281, + "startColumn": 6, + "charOffset": 160809, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5279, + "startColumn": 6, + "charOffset": 160764, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendForgingData() {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5448d19704e0a2919a82e2643a3d0e195b487b069ebbe1143b8105ad58f80585" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5286, + "startColumn": 14, + "charOffset": 160883, + "charLength": 4, + "snippet": { + "text": "0x86" + } + }, + "contextRegion": { + "startLine": 5284, + "startColumn": 14, + "charOffset": 160848, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x86);\n\n\tstd::map tierCorePrices;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fcbe0d79669548a2e574829875fef453d2be7825bb3937dbf57a1513675afb7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x86 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5286, + "startColumn": 14, + "charOffset": 160883, + "charLength": 4, + "snippet": { + "text": "0x86" + } + }, + "contextRegion": { + "startLine": 5284, + "startColumn": 14, + "charOffset": 160848, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x86);\n\n\tstd::map tierCorePrices;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eca3c4080dd5e100b480270bcb3dfc5b923f2dea416691a66db625a2952ae4be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5293, + "startColumn": 14, + "charOffset": 161126, + "charLength": 15, + "snippet": { + "text": "classifications" + } + }, + "contextRegion": { + "startLine": 5291, + "startColumn": 14, + "charOffset": 161046, + "charLength": 15, + "snippet": { + "text": "\n\tconst auto classifications = g_game().getItemsClassifications();\n\tmsg.addByte(classifications.size());\n\tfor (const auto &classification : classifications) {\n\t\tmsg.addByte(classification->id);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a2ba90b4e27b92181932f04ea0df29da9a357e209c961478c18aea9b466d25e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5296, + "startColumn": 15, + "charOffset": 161254, + "charLength": 14, + "snippet": { + "text": "classification" + } + }, + "contextRegion": { + "startLine": 5294, + "startColumn": 15, + "charOffset": 161151, + "charLength": 14, + "snippet": { + "text": "\tfor (const auto &classification : classifications) {\n\t\tmsg.addByte(classification->id);\n\t\tmsg.addByte(classification->tiers.size());\n\t\tfor (const auto &[tier, tierInfo] : classification->tiers) {\n\t\t\tmsg.addByte(tier - 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb5354928648c83bc4ae1bbb272ac9f46d9091c277ce219dc8c8255460a1489f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5297, + "startColumn": 3, + "charOffset": 161287, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5295, + "startColumn": 3, + "charOffset": 161205, + "charLength": 3, + "snippet": { + "text": "\t\tmsg.addByte(classification->id);\n\t\tmsg.addByte(classification->tiers.size());\n\t\tfor (const auto &[tier, tierInfo] : classification->tiers) {\n\t\t\tmsg.addByte(tier - 1);\n\t\t\tmsg.add(tierInfo.regularPrice);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "396306923429937eabdf35c2848f94bb1fc104014a6ca2eebbde416fa8da100a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5311, + "startColumn": 2, + "charOffset": 161747, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5309, + "startColumn": 2, + "charOffset": 161655, + "charLength": 3, + "snippet": { + "text": "\t// Exalted core table per tier\n\tmsg.addByte(static_cast(tierCorePrices.size()));\n\tfor (const auto &[tier, cores] : tierCorePrices) {\n\t\tmsg.addByte(tier);\n\t\tmsg.addByte(cores);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35b6e3e9f44e98c73004fb58919e901be1c23273e76df69ffc7c88f38ee54031" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5313, + "startColumn": 15, + "charOffset": 161833, + "charLength": 5, + "snippet": { + "text": "cores" + } + }, + "contextRegion": { + "startLine": 5311, + "startColumn": 15, + "charOffset": 161746, + "charLength": 5, + "snippet": { + "text": "\tfor (const auto &[tier, cores] : tierCorePrices) {\n\t\tmsg.addByte(tier);\n\t\tmsg.addByte(cores);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a90a25d0e590b5f6a70338529df11953309db360bf47d61bd5c1f8c0bd93bfc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5318, + "startColumn": 2, + "charOffset": 161953, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5316, + "startColumn": 2, + "charOffset": 161845, + "charLength": 3, + "snippet": { + "text": "\t// Convergence fusion prices per tier\n\tmsg.addByte(static_cast(convergenceFusionPrices.size()));\n\tfor (const auto &[tier, price] : convergenceFusionPrices) {\n\t\tmsg.addByte(tier - 1);\n\t\tmsg.add(price);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49998bce91fb8ed78a3ca7826325fff0fad706bb229ba57b526743d3a8aba6e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5325, + "startColumn": 2, + "charOffset": 162182, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5323, + "startColumn": 2, + "charOffset": 162070, + "charLength": 3, + "snippet": { + "text": "\t// Convergence transfer prices per tier\n\tmsg.addByte(static_cast(convergenceTransferPrices.size()));\n\tfor (const auto &[tier, price] : convergenceTransferPrices) {\n\t\tmsg.addByte(tier);\n\t\tmsg.add(price);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f5db21d66c7285cc2b1ddffc0dd6e045865e7ef4d4a20794b67a21fdee2f896" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "75 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5337, + "startColumn": 14, + "charOffset": 162919, + "charLength": 2, + "snippet": { + "text": "75" + } + }, + "contextRegion": { + "startLine": 5335, + "startColumn": 14, + "charOffset": 162688, + "charLength": 2, + "snippet": { + "text": "\tmsg.addByte(static_cast(g_configManager().getNumber(FORGE_CORE_COST, __FUNCTION__)));\n\t// (conversion) (right column top) Current stored dust limit minus this number = cost to increase stored dust limit - 75\n\tmsg.addByte(75);\n\t// (conversion) (right column bottom) Starting stored dust limit\n\tmsg.add(player->getForgeDustLevel());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14a0031d57b4adfcdb8e25fe1f409577a56e2e61a8f2172ea218a14ffad03a80" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5339, + "startColumn": 20, + "charOffset": 163009, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 5337, + "startColumn": 20, + "charOffset": 162906, + "charLength": 6, + "snippet": { + "text": "\tmsg.addByte(75);\n\t// (conversion) (right column bottom) Starting stored dust limit\n\tmsg.add(player->getForgeDustLevel());\n\t// (conversion) (right column bottom) Max stored dust limit - 325\n\tmsg.add(g_configManager().getNumber(FORGE_MAX_DUST, __FUNCTION__));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a566abb3a256d48f95e86c7c99d0143dd2a03df2ca847308ba19fecc5cacec45" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5341, + "startColumn": 20, + "charOffset": 163125, + "charLength": 15, + "snippet": { + "text": "g_configManager" + } + }, + "contextRegion": { + "startLine": 5339, + "startColumn": 20, + "charOffset": 162990, + "charLength": 15, + "snippet": { + "text": "\tmsg.add(player->getForgeDustLevel());\n\t// (conversion) (right column bottom) Max stored dust limit - 325\n\tmsg.add(g_configManager().getNumber(FORGE_MAX_DUST, __FUNCTION__));\n\t// (normal fusion) dust cost - 100\n\tmsg.addByte(static_cast(g_configManager().getNumber(FORGE_FUSION_DUST_COST, __FUNCTION__)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43e0226415714388fa1f7f3145b3b6ca94dd68ce7272836ebd11006c38751a36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'sendOpenForge' has cognitive complexity of 101 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5363, + "startColumn": 20, + "charOffset": 164330, + "charLength": 13, + "snippet": { + "text": "sendOpenForge" + } + }, + "contextRegion": { + "startLine": 5361, + "startColumn": 20, + "charOffset": 164308, + "charLength": 13, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendOpenForge() {\n\t// We will use it when sending the bytes to send the item information to the client\n\tstd::map> fusionItemsMap;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf7d1ebb0f23c300ee47cd0ec0cfafe0711cdca113a826cd075f320a3fd8ed5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5375, + "startColumn": 2, + "charOffset": 164859, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5373, + "startColumn": 2, + "charOffset": 164815, + "charLength": 3, + "snippet": { + "text": "\t *Start - Parsing items informations\n\t */\n\tfor (const auto &item : player->getAllInventoryItems(true)) {\n\t\tif (item->hasImbuements()) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ad32e23b4e58a12c69546b69aaf686381c2715e55f0db1de23cf52d32eee6b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5409, + "startColumn": 3, + "charOffset": 165930, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5407, + "startColumn": 3, + "charOffset": 165828, + "charLength": 3, + "snippet": { + "text": "\tuint8_t fusionTotalItemsCount = 0;\n\tfor (const auto &[itemId, tierAndCountMap] : fusionItemsMap) {\n\t\tfor (const auto [itemTier, itemCount] : tierAndCountMap) {\n\t\t\tif (itemCount >= 2) {\n\t\t\t\tfusionTotalItemsCount++;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "547d29f121b01bf834f7093edd6b1c5d2a103f1541f135b9f0df088abb723e2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5422, + "startColumn": 14, + "charOffset": 166148, + "charLength": 4, + "snippet": { + "text": "0x87" + } + }, + "contextRegion": { + "startLine": 5420, + "startColumn": 14, + "charOffset": 166112, + "charLength": 4, + "snippet": { + "text": "\n\t// Header byte (135)\n\tmsg.addByte(0x87);\n\n\tmsg.add(fusionTotalItemsCount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ba1b9bab1ac69b7a1aaef2f34314a3de3a5b5a2498c9413a7129639290575d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x87 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5422, + "startColumn": 14, + "charOffset": 166148, + "charLength": 4, + "snippet": { + "text": "0x87" + } + }, + "contextRegion": { + "startLine": 5420, + "startColumn": 14, + "charOffset": 166112, + "charLength": 4, + "snippet": { + "text": "\n\t// Header byte (135)\n\tmsg.addByte(0x87);\n\n\tmsg.add(fusionTotalItemsCount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "565394fa6fde552a555d1843d48e58f4c7c52c024e1fd17508adfa74617fa4a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5426, + "startColumn": 3, + "charOffset": 166265, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5424, + "startColumn": 3, + "charOffset": 166156, + "charLength": 3, + "snippet": { + "text": "\tmsg.add(fusionTotalItemsCount);\n\tfor (const auto &[itemId, tierAndCountMap] : fusionItemsMap) {\n\t\tfor (const auto [itemTier, itemCount] : tierAndCountMap) {\n\t\t\tif (itemCount >= 2) {\n\t\t\t\tmsg.addByte(0x01); // Number of friend items?" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e650ec8d3194a03c46d62dccd6db19c627046c505c4d342cd8ae448a3045ca4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5428, + "startColumn": 17, + "charOffset": 166365, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 5426, + "startColumn": 17, + "charOffset": 166263, + "charLength": 4, + "snippet": { + "text": "\t\tfor (const auto [itemTier, itemCount] : tierAndCountMap) {\n\t\t\tif (itemCount >= 2) {\n\t\t\t\tmsg.addByte(0x01); // Number of friend items?\n\t\t\t\tmsg.add(itemId);\n\t\t\t\tmsg.addByte(itemTier);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "abb68b289dd1e3c034ea5b752f0b0b1c6aa1a4cc9521ba0a9ccc1cb550a988be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5453, + "startColumn": 4, + "charOffset": 167109, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5451, + "startColumn": 4, + "charOffset": 167007, + "charLength": 3, + "snippet": { + "text": "\t\tmsg.skipBytes(1); // Total items count\n\t\tfor (const auto &[itemId, tierAndCountMap] : itemMap) {\n\t\t\tfor (const auto [tier, itemCount] : tierAndCountMap) {\n\t\t\t\tif (tier >= maxConfigTier) {\n\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78f58d80480bde65b30b3baed6a929e9d976086178bfb50cb8e7da53a43c0618" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5488, + "startColumn": 4, + "charOffset": 168391, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5486, + "startColumn": 4, + "charOffset": 168261, + "charLength": 3, + "snippet": { + "text": "\t\t\tauto donorTierTotalItemsCount = getIterationIncreaseCount(tierAndCountMap);\n\t\t\tmsg.add(donorTierTotalItemsCount);\n\t\t\tfor (const auto [donorItemTier, donorItemCount] : tierAndCountMap) {\n\t\t\t\tmsg.add(itemId);\n\t\t\t\tmsg.addByte(donorItemTier);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0a53f7db06245baa0bbcc9609828b57b4345c059c0ee28436753be044eb6d55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5495, + "startColumn": 4, + "charOffset": 168614, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5493, + "startColumn": 4, + "charOffset": 168567, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tuint16_t receiveTierTotalItemCount = 0;\n\t\t\tfor (const auto &[iteratorItemId, unusedTierAndCountMap] : receiveTierItemMap) {\n\t\t\t\t// Let's access the itemType to check the item's (receiver of tier) classification level\n\t\t\t\tconst ItemType &receiveType = Item::items[iteratorItemId];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5fb7bfe0c0cb428af2173c70a5f7866f0be9d9615e511b1a88be3573c8823ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5510, + "startColumn": 7, + "charOffset": 169440, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5508, + "startColumn": 7, + "charOffset": 169290, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tconst ItemType &receiveType = Item::items[receiveItemId];\n\t\t\t\t\tif (donorType.upgradeClassification == receiveType.upgradeClassification) {\n\t\t\t\t\t\tfor (const auto [receiveItemTier, receiveItemCount] : receiveTierAndCountMap) {\n\t\t\t\t\t\t\tmsg.add(receiveItemId);\n\t\t\t\t\t\t\tmsg.add(receiveItemCount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1afb429411230123bf3e0c4f67f57bc7daa18984f725db089115e198e5e3e63f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5542, + "startColumn": 4, + "charOffset": 170285, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5540, + "startColumn": 4, + "charOffset": 170189, + "charLength": 3, + "snippet": { + "text": "\t\tmsg.skipBytes(2); // Donor count\n\t\tfor (const auto &[itemId, tierAndCountMap] : itemMap) {\n\t\t\tfor (const auto [tier, itemCount] : tierAndCountMap) {\n\t\t\t\tif (tier >= 1) {\n\t\t\t\t\tdonorCount++;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb89bd04480db27be3c11d817b98dfa1e090ebbe0e831ea4633b9f516c08de21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5564, + "startColumn": 4, + "charOffset": 170940, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5562, + "startColumn": 4, + "charOffset": 170843, + "charLength": 3, + "snippet": { + "text": "\t\tmsg.add(receiverCount);\n\t\tfor (const auto &[itemId, tierAndCountMap] : itemMap) {\n\t\t\tfor (const auto [tier, itemCount] : tierAndCountMap) {\n\t\t\t\tif (tier == 0) {\n\t\t\t\t\tmsg.add(itemId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb4634f4e888dbca3b0d31c59a592d60e87a105db5a1a04a3795eb6897a38aad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5577, + "startColumn": 20, + "charOffset": 171305, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 5575, + "startColumn": 20, + "charOffset": 171242, + "charLength": 6, + "snippet": { + "text": "\tmsg.setBufferPosition(dustLevelPosition);\n\n\tmsg.add(player->getForgeDustLevel()); // Player dust limit\n\twriteToOutputBuffer(msg);\n\t// Update forging informations" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a90a25d0e590b5f6a70338529df11953309db360bf47d61bd5c1f8c0bd93bfc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5590, + "startColumn": 21, + "charOffset": 171714, + "charLength": 3, + "snippet": { + "text": "msg" + } + }, + "contextRegion": { + "startLine": 5588, + "startColumn": 21, + "charOffset": 171530, + "charLength": 3, + "snippet": { + "text": "\t// 0xBF -> 0 = fusion, 1 = transfer, 2 = dust to sliver, 3 = sliver to core, 4 = increase dust limit\n\tauto actionType = static_cast(msg.getByte());\n\tbool convergence = msg.getByte();\n\tuint16_t firstItem = msg.get();\n\tuint8_t tier = msg.getByte();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb0ab56cb995589b839b31106e9c5ba79e3840f624297e5e6a8b2c2b7b5ac552" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5591, + "startColumn": 2, + "charOffset": 171730, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 5589, + "startColumn": 2, + "charOffset": 171632, + "charLength": 8, + "snippet": { + "text": "\tauto actionType = static_cast(msg.getByte());\n\tbool convergence = msg.getByte();\n\tuint16_t firstItem = msg.get();\n\tuint8_t tier = msg.getByte();\n\tuint16_t secondItem = msg.get();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa5ff70d9056bc59c05ce4d33927492e23a8571243aed693c5208fcceeeb8c47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5593, + "startColumn": 2, + "charOffset": 171804, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 5591, + "startColumn": 2, + "charOffset": 171729, + "charLength": 8, + "snippet": { + "text": "\tuint16_t firstItem = msg.get();\n\tuint8_t tier = msg.getByte();\n\tuint16_t secondItem = msg.get();\n\tbool usedCore = msg.getByte();\n\tbool reduceTierLoss = msg.getByte();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b3e1faae7d90d8c17c01296f09f919a5a4a2623c3513b92c80df84ef37e3c2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5594, + "startColumn": 18, + "charOffset": 171864, + "charLength": 3, + "snippet": { + "text": "msg" + } + }, + "contextRegion": { + "startLine": 5592, + "startColumn": 18, + "charOffset": 171772, + "charLength": 3, + "snippet": { + "text": "\tuint8_t tier = msg.getByte();\n\tuint16_t secondItem = msg.get();\n\tbool usedCore = msg.getByte();\n\tbool reduceTierLoss = msg.getByte();\n\tif (actionType == ForgeAction_t::FUSION) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff9ed68cae8bccf29c8e20a4b999bfc327424006a3d23a5ff76579cbf2ba7de2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5595, + "startColumn": 24, + "charOffset": 171902, + "charLength": 3, + "snippet": { + "text": "msg" + } + }, + "contextRegion": { + "startLine": 5593, + "startColumn": 24, + "charOffset": 171803, + "charLength": 3, + "snippet": { + "text": "\tuint16_t secondItem = msg.get();\n\tbool usedCore = msg.getByte();\n\tbool reduceTierLoss = msg.getByte();\n\tif (actionType == ForgeAction_t::FUSION) {\n\t\tg_game().playerForgeFuseItems(player->getID(), actionType, firstItem, tier, secondItem, usedCore, reduceTierLoss, convergence);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d782e378627d4332059e932c2d4c6b22548b8e4e9a815c930785c3ee80b1821" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5596, + "startColumn": 2, + "charOffset": 171918, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 5594, + "startColumn": 2, + "charOffset": 171847, + "charLength": 2, + "snippet": { + "text": "\tbool usedCore = msg.getByte();\n\tbool reduceTierLoss = msg.getByte();\n\tif (actionType == ForgeAction_t::FUSION) {\n\t\tg_game().playerForgeFuseItems(player->getID(), actionType, firstItem, tier, secondItem, usedCore, reduceTierLoss, convergence);\n\t} else if (actionType == ForgeAction_t::TRANSFER) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56f2d6f68a1988b56f64c20aa49243d0849296aba8b90bd053768319f47f131b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5615, + "startColumn": 14, + "charOffset": 172804, + "charLength": 4, + "snippet": { + "text": "0x8A" + } + }, + "contextRegion": { + "startLine": 5613, + "startColumn": 14, + "charOffset": 172561, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendForgeResult(ForgeAction_t actionType, uint16_t leftItemId, uint8_t leftTier, uint16_t rightItemId, uint8_t rightTier, bool success, uint8_t bonus, uint8_t coreCount, bool convergence) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x8A);\n\n\t// 0 = fusion | 1 = transfer" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ba1b9bab1ac69b7a1aaef2f34314a3de3a5b5a2498c9413a7129639290575d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x8A is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5615, + "startColumn": 14, + "charOffset": 172804, + "charLength": 4, + "snippet": { + "text": "0x8A" + } + }, + "contextRegion": { + "startLine": 5613, + "startColumn": 14, + "charOffset": 172561, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendForgeResult(ForgeAction_t actionType, uint16_t leftItemId, uint8_t leftTier, uint16_t rightItemId, uint8_t rightTier, bool success, uint8_t bonus, uint8_t coreCount, bool convergence) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x8A);\n\n\t// 0 = fusion | 1 = transfer" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af491c73a9c81d2e54cd6cfe35cd90495c74506a76a22c5f53baae26389ff916" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5619, + "startColumn": 14, + "charOffset": 172903, + "charLength": 11, + "snippet": { + "text": "convergence" + } + }, + "contextRegion": { + "startLine": 5617, + "startColumn": 14, + "charOffset": 172812, + "charLength": 11, + "snippet": { + "text": "\t// 0 = fusion | 1 = transfer\n\tmsg.addByte(static_cast(actionType));\n\tmsg.addByte(convergence);\n\n\tif (convergence && actionType == ForgeAction_t::FUSION) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ddefb2d1ed2379c69f3ec24ad3ad7e21893e119f21183c52f9afa7b209d07142" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5626, + "startColumn": 14, + "charOffset": 173050, + "charLength": 7, + "snippet": { + "text": "success" + } + }, + "contextRegion": { + "startLine": 5624, + "startColumn": 14, + "charOffset": 173033, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tmsg.addByte(success);\n\n\tmsg.add(leftItemId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6c67425e8aafa02b3fd75ed36d9e637bddcf2b3950b71decdf7a31914520090" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5634, + "startColumn": 15, + "charOffset": 173236, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5632, + "startColumn": 15, + "charOffset": 173175, + "charLength": 4, + "snippet": { + "text": "\n\tif (actionType == ForgeAction_t::TRANSFER) {\n\t\tmsg.addByte(0x00); // Bonus type always none for transfer\n\t} else {\n\t\tmsg.addByte(bonus); // Roll fusion bonus" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c6ec4af5ccba2732f5871f7ab072ea4296609f231eeff69a8e5f9fee30590a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5638, + "startColumn": 3, + "charOffset": 173352, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 5636, + "startColumn": 3, + "charOffset": 173292, + "charLength": 2, + "snippet": { + "text": "\t\tmsg.addByte(bonus); // Roll fusion bonus\n\t\t// Core kept\n\t\tif (bonus == 2) {\n\t\t\tmsg.addByte(coreCount);\n\t\t} else if (bonus >= 4 && bonus <= 8) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ee1f63e26767a4ac86e5b0f69d6887befa0621bd638ee99a0ed82109f225f8d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5640, + "startColumn": 37, + "charOffset": 173433, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 5638, + "startColumn": 37, + "charOffset": 173350, + "charLength": 1, + "snippet": { + "text": "\t\tif (bonus == 2) {\n\t\t\tmsg.addByte(coreCount);\n\t\t} else if (bonus >= 4 && bonus <= 8) {\n\t\t\tmsg.add(leftItemId);\n\t\t\tmsg.addByte(leftTier);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61955f4a1065e50dacc725f56c6804b3cf8fe5cdd10dea024fc5d2a07cd38c36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5656, + "startColumn": 22, + "charOffset": 174041, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 5654, + "startColumn": 22, + "charOffset": 173946, + "charLength": 1, + "snippet": { + "text": "\tauto historyVectorLen = getVectorIterationIncreaseCount(historyVector);\n\n\tuint16_t lastPage = (1 < std::floor((historyVectorLen - 1) / 9) + 1) ? static_cast(std::floor((historyVectorLen - 1) / 9) + 1) : 1;\n\tuint16_t currentPage = (lastPage < page) ? lastPage : page;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7b6ee07f85d74d1df41cb5a4ca3dd0558f657de70399cd74a936d0b0ffcdb8d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5656, + "startColumn": 23, + "charOffset": 174042, + "charLength": 1, + "snippet": { + "text": "1" + } + }, + "contextRegion": { + "startLine": 5654, + "startColumn": 23, + "charOffset": 173946, + "charLength": 1, + "snippet": { + "text": "\tauto historyVectorLen = getVectorIterationIncreaseCount(historyVector);\n\n\tuint16_t lastPage = (1 < std::floor((historyVectorLen - 1) / 9) + 1) ? static_cast(std::floor((historyVectorLen - 1) / 9) + 1) : 1;\n\tuint16_t currentPage = (lastPage < page) ? lastPage : page;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "854e68e2eb9bc70fa049683220ee30f8e22de313e886cd11844eafdb14f7cea4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5656, + "startColumn": 63, + "charOffset": 174082, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 5654, + "startColumn": 63, + "charOffset": 173946, + "charLength": 1, + "snippet": { + "text": "\tauto historyVectorLen = getVectorIterationIncreaseCount(historyVector);\n\n\tuint16_t lastPage = (1 < std::floor((historyVectorLen - 1) / 9) + 1) ? static_cast(std::floor((historyVectorLen - 1) / 9) + 1) : 1;\n\tuint16_t currentPage = (lastPage < page) ? lastPage : page;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a947afb1876bf1f61c8442564a6e23c4fcc649e3489f851607643e6d81847418" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5656, + "startColumn": 68, + "charOffset": 174087, + "charLength": 1, + "snippet": { + "text": "1" + } + }, + "contextRegion": { + "startLine": 5654, + "startColumn": 68, + "charOffset": 173946, + "charLength": 1, + "snippet": { + "text": "\tauto historyVectorLen = getVectorIterationIncreaseCount(historyVector);\n\n\tuint16_t lastPage = (1 < std::floor((historyVectorLen - 1) / 9) + 1) ? static_cast(std::floor((historyVectorLen - 1) / 9) + 1) : 1;\n\tuint16_t currentPage = (lastPage < page) ? lastPage : page;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60a3fb2bffbe275c87decec3b51ce0208badd54609b77263eefec8a544621d50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5656, + "startColumn": 131, + "charOffset": 174150, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 5654, + "startColumn": 131, + "charOffset": 173946, + "charLength": 1, + "snippet": { + "text": "\tauto historyVectorLen = getVectorIterationIncreaseCount(historyVector);\n\n\tuint16_t lastPage = (1 < std::floor((historyVectorLen - 1) / 9) + 1) ? static_cast(std::floor((historyVectorLen - 1) / 9) + 1) : 1;\n\tuint16_t currentPage = (lastPage < page) ? lastPage : page;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a5d317060300113e80ce677a4fed5392a3e84704ddbcaad7e245d6004b4a9f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5656, + "startColumn": 136, + "charOffset": 174155, + "charLength": 1, + "snippet": { + "text": "1" + } + }, + "contextRegion": { + "startLine": 5654, + "startColumn": 136, + "charOffset": 173946, + "charLength": 1, + "snippet": { + "text": "\tauto historyVectorLen = getVectorIterationIncreaseCount(historyVector);\n\n\tuint16_t lastPage = (1 < std::floor((historyVectorLen - 1) / 9) + 1) ? static_cast(std::floor((historyVectorLen - 1) / 9) + 1) : 1;\n\tuint16_t currentPage = (lastPage < page) ? lastPage : page;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e977b9f28882ae268cc73bfd7c85f29ba675cae49253321ff2dab399cf8617cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5657, + "startColumn": 25, + "charOffset": 174187, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 5655, + "startColumn": 25, + "charOffset": 174019, + "charLength": 1, + "snippet": { + "text": "\n\tuint16_t lastPage = (1 < std::floor((historyVectorLen - 1) / 9) + 1) ? static_cast(std::floor((historyVectorLen - 1) / 9) + 1) : 1;\n\tuint16_t currentPage = (lastPage < page) ? lastPage : page;\n\n\tstd::vector historyPerPage;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b354d634742c6a3897aaf72b364783c6b8a052a8192fa618ba0af02bc81fc2b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5660, + "startColumn": 28, + "charOffset": 174295, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 5658, + "startColumn": 28, + "charOffset": 174224, + "charLength": 1, + "snippet": { + "text": "\n\tstd::vector historyPerPage;\n\tuint16_t pageFirstEntry = (0 < historyVectorLen - (currentPage - 1) * 9) ? historyVectorLen - (currentPage - 1) * 9 : 0;\n\tuint16_t pageLastEntry = (0 < historyVectorLen - currentPage * 9) ? historyVectorLen - currentPage * 9 : 0;\n\tfor (uint16_t entry = pageFirstEntry; entry > pageLastEntry; --entry) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac3897e86464b5ad7b78e9970c441e7d3077e876ecef6f3ea1c0d5e58305c301" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5660, + "startColumn": 72, + "charOffset": 174339, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 5658, + "startColumn": 72, + "charOffset": 174224, + "charLength": 1, + "snippet": { + "text": "\n\tstd::vector historyPerPage;\n\tuint16_t pageFirstEntry = (0 < historyVectorLen - (currentPage - 1) * 9) ? historyVectorLen - (currentPage - 1) * 9 : 0;\n\tuint16_t pageLastEntry = (0 < historyVectorLen - currentPage * 9) ? historyVectorLen - currentPage * 9 : 0;\n\tfor (uint16_t entry = pageFirstEntry; entry > pageLastEntry; --entry) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d6af49520944ee2a9495cd6cae1a69a186d7cdec3ca1b07af2cd8348b18a265" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5660, + "startColumn": 116, + "charOffset": 174383, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 5658, + "startColumn": 116, + "charOffset": 174224, + "charLength": 1, + "snippet": { + "text": "\n\tstd::vector historyPerPage;\n\tuint16_t pageFirstEntry = (0 < historyVectorLen - (currentPage - 1) * 9) ? historyVectorLen - (currentPage - 1) * 9 : 0;\n\tuint16_t pageLastEntry = (0 < historyVectorLen - currentPage * 9) ? historyVectorLen - currentPage * 9 : 0;\n\tfor (uint16_t entry = pageFirstEntry; entry > pageLastEntry; --entry) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab020da9e18975bf26b44bf5d8746bf3dc53a65e7028bc8f948527535d8b3598" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5661, + "startColumn": 27, + "charOffset": 174416, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 5659, + "startColumn": 27, + "charOffset": 174225, + "charLength": 1, + "snippet": { + "text": "\tstd::vector historyPerPage;\n\tuint16_t pageFirstEntry = (0 < historyVectorLen - (currentPage - 1) * 9) ? historyVectorLen - (currentPage - 1) * 9 : 0;\n\tuint16_t pageLastEntry = (0 < historyVectorLen - currentPage * 9) ? historyVectorLen - currentPage * 9 : 0;\n\tfor (uint16_t entry = pageFirstEntry; entry > pageLastEntry; --entry) {\n\t\thistoryPerPage.push_back(historyVector[entry - 1]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc406c103d0b1e01adddd0d4da7b5b80aac5b9be3e7773d35a528ad905824a7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5661, + "startColumn": 65, + "charOffset": 174454, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 5659, + "startColumn": 65, + "charOffset": 174225, + "charLength": 1, + "snippet": { + "text": "\tstd::vector historyPerPage;\n\tuint16_t pageFirstEntry = (0 < historyVectorLen - (currentPage - 1) * 9) ? historyVectorLen - (currentPage - 1) * 9 : 0;\n\tuint16_t pageLastEntry = (0 < historyVectorLen - currentPage * 9) ? historyVectorLen - currentPage * 9 : 0;\n\tfor (uint16_t entry = pageFirstEntry; entry > pageLastEntry; --entry) {\n\t\thistoryPerPage.push_back(historyVector[entry - 1]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "440574965746eb0b854aa94366109c36a3a4bb3329f9eb89f6e55262dbce922e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5661, + "startColumn": 103, + "charOffset": 174492, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 5659, + "startColumn": 103, + "charOffset": 174225, + "charLength": 1, + "snippet": { + "text": "\tstd::vector historyPerPage;\n\tuint16_t pageFirstEntry = (0 < historyVectorLen - (currentPage - 1) * 9) ? historyVectorLen - (currentPage - 1) * 9 : 0;\n\tuint16_t pageLastEntry = (0 < historyVectorLen - currentPage * 9) ? historyVectorLen - currentPage * 9 : 0;\n\tfor (uint16_t entry = pageFirstEntry; entry > pageLastEntry; --entry) {\n\t\thistoryPerPage.push_back(historyVector[entry - 1]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a99d1ffad56d6619d9e05a966a66ee3e601b1879c4d24ab2f4704e407e7d0028" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5662, + "startColumn": 2, + "charOffset": 174500, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5660, + "startColumn": 2, + "charOffset": 174268, + "charLength": 3, + "snippet": { + "text": "\tuint16_t pageFirstEntry = (0 < historyVectorLen - (currentPage - 1) * 9) ? historyVectorLen - (currentPage - 1) * 9 : 0;\n\tuint16_t pageLastEntry = (0 < historyVectorLen - currentPage * 9) ? historyVectorLen - currentPage * 9 : 0;\n\tfor (uint16_t entry = pageFirstEntry; entry > pageLastEntry; --entry) {\n\t\thistoryPerPage.push_back(historyVector[entry - 1]);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4fa510cc2e21bf6c38ac39eea808104794cf9894d857e1e2a1e8471a82dad09a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'entry' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5662, + "startColumn": 40, + "charOffset": 174538, + "charLength": 5, + "snippet": { + "text": "entry" + } + }, + "contextRegion": { + "startLine": 5660, + "startColumn": 40, + "charOffset": 174268, + "charLength": 5, + "snippet": { + "text": "\tuint16_t pageFirstEntry = (0 < historyVectorLen - (currentPage - 1) * 9) ? historyVectorLen - (currentPage - 1) * 9 : 0;\n\tuint16_t pageLastEntry = (0 < historyVectorLen - currentPage * 9) ? historyVectorLen - currentPage * 9 : 0;\n\tfor (uint16_t entry = pageFirstEntry; entry > pageLastEntry; --entry) {\n\t\thistoryPerPage.push_back(historyVector[entry - 1]);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7adba176342e23226de821a8b6de53ff657f4de4faf45ef1643379544860a862" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5669, + "startColumn": 14, + "charOffset": 174740, + "charLength": 4, + "snippet": { + "text": "0x88" + } + }, + "contextRegion": { + "startLine": 5667, + "startColumn": 14, + "charOffset": 174705, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x88);\n\tmsg.add(currentPage - 1); // Current page\n\tmsg.add(lastPage); // Last page" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4f1e7d03528a79ee88f91c888ed71785895f10e897afb44e78de10fa7c42670" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x88 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5669, + "startColumn": 14, + "charOffset": 174740, + "charLength": 4, + "snippet": { + "text": "0x88" + } + }, + "contextRegion": { + "startLine": 5667, + "startColumn": 14, + "charOffset": 174705, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x88);\n\tmsg.add(currentPage - 1); // Current page\n\tmsg.add(lastPage); // Last page" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3971a35542da7fb7ab966b319f94226e54af59ec750c84b465839f17b450b203" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5670, + "startColumn": 20, + "charOffset": 174766, + "charLength": 11, + "snippet": { + "text": "currentPage" + } + }, + "contextRegion": { + "startLine": 5668, + "startColumn": 20, + "charOffset": 174706, + "charLength": 11, + "snippet": { + "text": "\tNetworkMessage msg;\n\tmsg.addByte(0x88);\n\tmsg.add(currentPage - 1); // Current page\n\tmsg.add(lastPage); // Last page\n\tmsg.addByte(static_cast(historyPageToSend)); // History to send" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0532864bea736ca354f40e67ca749b5f4f157f3c870142ffe7a87d6e17244eb4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5675, + "startColumn": 3, + "charOffset": 174950, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5673, + "startColumn": 3, + "charOffset": 174917, + "charLength": 3, + "snippet": { + "text": "\n\tif (historyPageToSend > 0) {\n\t\tfor (const auto &history : historyPerPage) {\n\t\t\tauto action = magic_enum::enum_integer(history.actionType);\n\t\t\tmsg.add(static_cast(history.createdAt));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3397485b2148fe8a528cd30288e6f06ec31d413c90ccf3fe687db2ca34fc26ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5680, + "startColumn": 55, + "charOffset": 175295, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 5678, + "startColumn": 55, + "charOffset": 175122, + "charLength": 1, + "snippet": { + "text": "\t\t\tmsg.addByte(action);\n\t\t\tmsg.addString(history.description, \"ProtocolGame::sendForgeHistory - history.description\");\n\t\t\tmsg.addByte((history.bonus >= 1 && history.bonus < 8) ? 0x01 : 0x00);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89fd8435b70dc32cc644e42bd446c1bd8be0708c022d4b6c08b10f5c02607638" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5694, + "startColumn": 14, + "charOffset": 175568, + "charLength": 4, + "snippet": { + "text": "0x89" + } + }, + "contextRegion": { + "startLine": 5692, + "startColumn": 14, + "charOffset": 175494, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::closeForgeWindow() {\n\tNetworkMessage msg;\n\tmsg.addByte(0x89);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83ff76f7be5e535935291caea6978a40d3476a5e10912d73fbe71b3f6d2eab6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x89 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5694, + "startColumn": 14, + "charOffset": 175568, + "charLength": 4, + "snippet": { + "text": "0x89" + } + }, + "contextRegion": { + "startLine": 5692, + "startColumn": 14, + "charOffset": 175494, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::closeForgeWindow() {\n\tNetworkMessage msg;\n\tmsg.addByte(0x89);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c2457659b2d61ed99df9b49b0eec257e96a6a4d6faf0e111d07b8b8847702779" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'sendMarketDetail' has cognitive complexity of 162 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5698, + "startColumn": 20, + "charOffset": 175624, + "charLength": 16, + "snippet": { + "text": "sendMarketDetail" + } + }, + "contextRegion": { + "startLine": 5696, + "startColumn": 20, + "charOffset": 175602, + "charLength": 16, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xF8);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46c3986293f41733755635fec38041a976f29721b0585d87840c64e863ac10ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'sendMarketDetail' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5698, + "startColumn": 37, + "charOffset": 175641, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 5696, + "startColumn": 37, + "charOffset": 175602, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xF8);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7f26cd26bdb80dc39c7be7d6e7d6751117b483702a94975f5e6276302dc9fb8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5700, + "startColumn": 14, + "charOffset": 175708, + "charLength": 4, + "snippet": { + "text": "0xF8" + } + }, + "contextRegion": { + "startLine": 5698, + "startColumn": 14, + "charOffset": 175605, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xF8);\n\tmsg.add(itemId);\n\tconst ItemType &it = Item::items[itemId];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "460231f01713bcffd5ee88b2b9e3e56998347d094623b1c7c8e9f868caca92e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xF8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5700, + "startColumn": 14, + "charOffset": 175708, + "charLength": 4, + "snippet": { + "text": "0xF8" + } + }, + "contextRegion": { + "startLine": 5698, + "startColumn": 14, + "charOffset": 175605, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xF8);\n\tmsg.add(itemId);\n\tconst ItemType &it = Item::items[itemId];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7a515867cc5b0f6a7f54ec6a0e9fe05dc21179555dac53079ed6bc3e80963c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5711, + "startColumn": 21, + "charOffset": 176021, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5709, + "startColumn": 21, + "charOffset": 175887, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addString(std::to_string(it.armor), \"ProtocolGame::sendMarketDetail - std::to_string(it.armor)\");\n\t} else {\n\t\tmsg.add(0x00);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86fe840d1814466c327c9c80ddb2700c91d25200be321fd6603bb9592124bb83" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5747, + "startColumn": 21, + "charOffset": 177082, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5745, + "startColumn": 21, + "charOffset": 177048, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\tmsg.add(0x00);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac6a85d3e306c50fc67b4e329d9630a72509eacc9d8623a52460c9752e390cf6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5753, + "startColumn": 21, + "charOffset": 177258, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5751, + "startColumn": 21, + "charOffset": 177118, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addString(std::to_string(it.maxItems), \"ProtocolGame::sendMarketDetail - std::to_string(it.maxItems)\");\n\t} else {\n\t\tmsg.add(0x00);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "760c4117c74fcf2972f9653e8b94d9c1095d5978934b4ec5421c5591db6d6a91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5765, + "startColumn": 21, + "charOffset": 177675, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5763, + "startColumn": 21, + "charOffset": 177641, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\tmsg.add(0x00);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0d1e7c57b328d75c1e722eeafc3370764ff8cd48c85bfe744132b829bc85376" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5776, + "startColumn": 21, + "charOffset": 178043, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5774, + "startColumn": 21, + "charOffset": 178009, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\tmsg.add(0x00);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e7ad84f957cb77cea223c020b3f8f03527aa2c3d152b8b8e345e86763e247fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5784, + "startColumn": 21, + "charOffset": 178243, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5782, + "startColumn": 21, + "charOffset": 178141, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addString(ss.str(), \"ProtocolGame::sendMarketDetail - ss.str()\");\n\t} else {\n\t\tmsg.add(0x00);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "711fe26d5bd2efc8366b62fc7b56def90ff31be23bddd25588feb969e2584194" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5791, + "startColumn": 3, + "charOffset": 178329, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5789, + "startColumn": 3, + "charOffset": 178300, + "charLength": 3, + "snippet": { + "text": "\t\tbool separator = false;\n\n\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\tif (it.abilities->absorbPercent[i] == 0) {\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "462051e6c94688bda2a2932b3ad84151feef78cf44a1be4fa82f40d297f40cde" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5792, + "startColumn": 8, + "charOffset": 178380, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 5790, + "startColumn": 8, + "charOffset": 178326, + "charLength": 2, + "snippet": { + "text": "\n\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\tif (it.abilities->absorbPercent[i] == 0) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4437961163e3f7a9b13418ec8b51bc237708e9ced1d070c24cda09f47be0407" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5802, + "startColumn": 71, + "charOffset": 178585, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 5800, + "startColumn": 71, + "charOffset": 178509, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tss << fmt::format(\"{} {:+}%\", getCombatName(indexToCombatType(i)), it.abilities->absorbPercent[i]);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ce900800efa73e945db1e31f0815d539f3628ab932fa5942fb55d86ed8befa1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5807, + "startColumn": 21, + "charOffset": 178725, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5805, + "startColumn": 21, + "charOffset": 178623, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addString(ss.str(), \"ProtocolGame::sendMarketDetail - ss.str()\");\n\t} else {\n\t\tmsg.add(0x00);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7d6ddf8a0b10dff0568f7b0e11e66ad9d0ba1c72bb0f3cca1d017b51447dfd5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5813, + "startColumn": 21, + "charOffset": 178910, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5811, + "startColumn": 21, + "charOffset": 178764, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addString(std::to_string(it.minReqLevel), \"ProtocolGame::sendMarketDetail - std::to_string(it.minReqLevel)\");\n\t} else {\n\t\tmsg.add(0x00);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "859b55f74a8c0fa53796b8a3cd175c7f143efa3be99f808d48077a1a46fe7735" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5819, + "startColumn": 21, + "charOffset": 179110, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5817, + "startColumn": 21, + "charOffset": 178954, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addString(std::to_string(it.minReqMagicLevel), \"ProtocolGame::sendMarketDetail - std::to_string(it.minReqMagicLevel)\");\n\t} else {\n\t\tmsg.add(0x00);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "056debda64d9d74cb71f1bbfd3c40ac878ca3baecea6ce359b8436f2e5a78a4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5829, + "startColumn": 3, + "charOffset": 179373, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5827, + "startColumn": 3, + "charOffset": 179344, + "charLength": 3, + "snippet": { + "text": "\t\tbool separator = false;\n\n\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; i++) {\n\t\t\tif (!it.abilities->skills[i]) {\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3230f051a81e79fedde7909665e7d54497fdd96421200b4e2a2470b7b1e0808b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5830, + "startColumn": 8, + "charOffset": 179437, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5828, + "startColumn": 8, + "charOffset": 179370, + "charLength": 1, + "snippet": { + "text": "\n\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; i++) {\n\t\t\tif (!it.abilities->skills[i]) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d501459cfc2ed202a02898b5403540a9d54564c214c4d99ee7025f2cc528eb4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5830, + "startColumn": 9, + "charOffset": 179438, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 5828, + "startColumn": 9, + "charOffset": 179370, + "charLength": 2, + "snippet": { + "text": "\n\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; i++) {\n\t\t\tif (!it.abilities->skills[i]) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9b4d296d4a8c0599d342aa1ad17156b2b29a05533ba21a7dc68a171bc265880" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5830, + "startColumn": 9, + "charOffset": 179438, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 5828, + "startColumn": 9, + "charOffset": 179370, + "charLength": 2, + "snippet": { + "text": "\n\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; i++) {\n\t\t\tif (!it.abilities->skills[i]) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44d94dd2c74e410aff874b441951152f1d12409f8f0fde6f6af7500350875014" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5840, + "startColumn": 50, + "charOffset": 179610, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 5838, + "startColumn": 50, + "charOffset": 179555, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tss << fmt::format(\"{} {:+}\", getSkillName(i), it.abilities->skills[i]);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72b963843b7ff188bddeb23bd1382978bb1dc3c47a4bfcef5a631266a3039c60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5843, + "startColumn": 3, + "charOffset": 179643, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5841, + "startColumn": 3, + "charOffset": 179636, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfor (uint8_t i = SKILL_CRITICAL_HIT_CHANCE; i <= SKILL_LAST; i++) {\n\t\t\tauto skills = it.abilities->skills[i];\n\t\t\tif (!skills) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80f67459939e8cf17c1a5e31dd3bbb41814a7b746ab09fa7d7dc79c606cdc0d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5844, + "startColumn": 18, + "charOffset": 179728, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 5842, + "startColumn": 18, + "charOffset": 179640, + "charLength": 2, + "snippet": { + "text": "\n\t\tfor (uint8_t i = SKILL_CRITICAL_HIT_CHANCE; i <= SKILL_LAST; i++) {\n\t\t\tauto skills = it.abilities->skills[i];\n\t\t\tif (!skills) {\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b17e4651d9052d508075ac44e60ca83b8ee845a101905e8d1beebf5226550c13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5845, + "startColumn": 8, + "charOffset": 179760, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5843, + "startColumn": 8, + "charOffset": 179641, + "charLength": 1, + "snippet": { + "text": "\t\tfor (uint8_t i = SKILL_CRITICAL_HIT_CHANCE; i <= SKILL_LAST; i++) {\n\t\t\tauto skills = it.abilities->skills[i];\n\t\t\tif (!skills) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51f74e07af800996c18e23f45fec10c20a753f858d5e119f28d3a6e023009276" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5845, + "startColumn": 9, + "charOffset": 179761, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 5843, + "startColumn": 9, + "charOffset": 179641, + "charLength": 6, + "snippet": { + "text": "\t\tfor (uint8_t i = SKILL_CRITICAL_HIT_CHANCE; i <= SKILL_LAST; i++) {\n\t\t\tauto skills = it.abilities->skills[i];\n\t\t\tif (!skills) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9f31f4f4ea227669dacd93e6f4775099101ee171315261571870847b6cc9af3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5855, + "startColumn": 54, + "charOffset": 179920, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 5853, + "startColumn": 54, + "charOffset": 179861, + "charLength": 6, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tss << fmt::format(\"{} {:+.2f}%\", getSkillName(i), skills / 100.0);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0f08cbc0e7245285ab3c8744b868441ca3a2f4a33a373c98760639b962d175b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5869, + "startColumn": 3, + "charOffset": 180213, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5867, + "startColumn": 3, + "charOffset": 180156, + "charLength": 3, + "snippet": { + "text": "\n\t\t// Version 12.72 (Specialized magic level modifier)\n\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\tif (it.abilities->specializedMagicLevel[i]) {\n\t\t\t\tif (separator) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "425c6ef452ecec9f9078f8042d7cd315ec23f1b9efa158607e445df0a9faed03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "11 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5869, + "startColumn": 28, + "charOffset": 180238, + "charLength": 2, + "snippet": { + "text": "11" + } + }, + "contextRegion": { + "startLine": 5867, + "startColumn": 28, + "charOffset": 180156, + "charLength": 2, + "snippet": { + "text": "\n\t\t// Version 12.72 (Specialized magic level modifier)\n\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\tif (it.abilities->specializedMagicLevel[i]) {\n\t\t\t\tif (separator) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "379f2ae6bfa52dbf8471553ad3c923dcd7e661198748ab2c185f1da1fd834754" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5870, + "startColumn": 8, + "charOffset": 180256, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 5868, + "startColumn": 8, + "charOffset": 180157, + "charLength": 2, + "snippet": { + "text": "\t\t// Version 12.72 (Specialized magic level modifier)\n\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\tif (it.abilities->specializedMagicLevel[i]) {\n\t\t\t\tif (separator) {\n\t\t\t\t\tss << \", \";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fe6e2b1635781de55b6d9cfdd8b4a398a18d5303390c6ff3b7b63489fc55cde" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5870, + "startColumn": 8, + "charOffset": 180256, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 5868, + "startColumn": 8, + "charOffset": 180157, + "charLength": 2, + "snippet": { + "text": "\t\t// Version 12.72 (Specialized magic level modifier)\n\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\tif (it.abilities->specializedMagicLevel[i]) {\n\t\t\t\tif (separator) {\n\t\t\t\t\tss << \", \";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4cbca61f7ca34793df404bc0882db354e192da36e1e6fd144cbb9baaba62844c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5870, + "startColumn": 8, + "charOffset": 180256, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 5868, + "startColumn": 8, + "charOffset": 180157, + "charLength": 2, + "snippet": { + "text": "\t\t// Version 12.72 (Specialized magic level modifier)\n\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\tif (it.abilities->specializedMagicLevel[i]) {\n\t\t\t\tif (separator) {\n\t\t\t\t\tss << \", \";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "541f953c6eea98bba8e190f72a0022c461b41deba587306a794feff379a19f4d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5877, + "startColumn": 78, + "charOffset": 180521, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 5875, + "startColumn": 78, + "charOffset": 180372, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t\tstd::string combatName = getCombatName(indexToCombatType(i));\n\t\t\t\tss << std::showpos << combatName << std::noshowpos << \"magic level +\" << it.abilities->specializedMagicLevel[i];\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82f324ac27b8e5cc2870af6160590e0b33cf7b5e822c9ff1488d9fb91f5ee870" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5886, + "startColumn": 37, + "charOffset": 180683, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 5884, + "startColumn": 37, + "charOffset": 180641, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tss << fmt::format(\"speed {:+}\", (it.abilities->speed >> 1));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f6c3edf244c8e8df01221c7bbc5b473cc7df4a9f123d8fc85a1d0bdb05226c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5891, + "startColumn": 21, + "charOffset": 180818, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5889, + "startColumn": 21, + "charOffset": 180716, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addString(ss.str(), \"ProtocolGame::sendMarketDetail - ss.str()\");\n\t} else {\n\t\tmsg.add(0x00);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "104f09a800d9b15935922d90983f2d4b595d501c3301ded879d0ab350afd414b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5897, + "startColumn": 21, + "charOffset": 180991, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5895, + "startColumn": 21, + "charOffset": 180853, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addString(std::to_string(it.charges), \"ProtocolGame::sendMarketDetail - std::to_string(it.charges)\");\n\t} else {\n\t\tmsg.add(0x00);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46fff25e982fd24765d5a9d160497e465e429af0ddbf3e948ede0f6d2a509ad9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5902, + "startColumn": 6, + "charOffset": 181064, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 5900, + "startColumn": 6, + "charOffset": 181002, + "charLength": 2, + "snippet": { + "text": "\tstd::string weaponName = getWeaponName(it.weaponType);\n\n\tif (it.slotPosition & SLOTP_TWO_HAND) {\n\t\tif (!weaponName.empty()) {\n\t\t\tweaponName += \", two-handed\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a208f66ce54b354172cf97590e7649c29f9b62d4bb2715e5669ed64ff6d3748" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5902, + "startColumn": 6, + "charOffset": 181064, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 5900, + "startColumn": 6, + "charOffset": 181002, + "charLength": 2, + "snippet": { + "text": "\tstd::string weaponName = getWeaponName(it.weaponType);\n\n\tif (it.slotPosition & SLOTP_TWO_HAND) {\n\t\tif (!weaponName.empty()) {\n\t\t\tweaponName += \", two-handed\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5b0a9943290f06abdc90d6a6ba0929679625a170cf8ce146c5a264aaea9febd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5902, + "startColumn": 22, + "charOffset": 181080, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 5900, + "startColumn": 22, + "charOffset": 181002, + "charLength": 1, + "snippet": { + "text": "\tstd::string weaponName = getWeaponName(it.weaponType);\n\n\tif (it.slotPosition & SLOTP_TWO_HAND) {\n\t\tif (!weaponName.empty()) {\n\t\t\tweaponName += \", two-handed\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e48e09fb876a803886f7d328bdb09a0ed46fff4ca3071d46e845d76c179359b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5914, + "startColumn": 19, + "charOffset": 181353, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 5912, + "startColumn": 19, + "charOffset": 181287, + "charLength": 2, + "snippet": { + "text": "\tif (it.weight != 0) {\n\t\tstd::ostringstream ss;\n\t\tif (it.weight < 10) {\n\t\t\tss << \"0.0\" << it.weight;\n\t\t} else if (it.weight < 100) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71e8042816729fdbd6cfe2d13455c19aee4cee11d00716557d06402b281399d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5916, + "startColumn": 26, + "charOffset": 181413, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 5914, + "startColumn": 26, + "charOffset": 181335, + "charLength": 3, + "snippet": { + "text": "\t\tif (it.weight < 10) {\n\t\t\tss << \"0.0\" << it.weight;\n\t\t} else if (it.weight < 100) {\n\t\t\tss << \"0.\" << it.weight;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c7abd949dd46c784257a97807773cc36ecd547e75c20d0efef928bc38fb5387" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5920, + "startColumn": 17, + "charOffset": 181532, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 5918, + "startColumn": 17, + "charOffset": 181448, + "charLength": 6, + "snippet": { + "text": "\t\t} else {\n\t\t\tstd::string weightString = std::to_string(it.weight);\n\t\t\tweightString.insert(weightString.end() - 2, '.');\n\t\t\tss << weightString;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f31589a7d979b2f4f4a96783f8e431f42c1f974d1394ac79e42750d6980cc11a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5926, + "startColumn": 21, + "charOffset": 181713, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5924, + "startColumn": 21, + "charOffset": 181611, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addString(ss.str(), \"ProtocolGame::sendMarketDetail - ss.str()\");\n\t} else {\n\t\tmsg.add(0x00);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98c8613df458d670a2dfe3954ca10e3e384dc84b4e7d489c760a5734d10de5a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5934, + "startColumn": 22, + "charOffset": 181980, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5932, + "startColumn": 22, + "charOffset": 181853, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.addString(augmentsDescription, \"ProtocolGame::sendMarketDetail - augmentsDescription\");\n\t\t} else {\n\t\t\tmsg.add(0x00); // no augments\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23a142d87eb73839c2ee399a0bd2fcd73f5c97b28157fd0336371ef0d969dbdd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5941, + "startColumn": 21, + "charOffset": 182189, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5939, + "startColumn": 21, + "charOffset": 182039, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addString(std::to_string(it.imbuementSlot), \"ProtocolGame::sendMarketDetail - std::to_string(it.imbuementSlot)\");\n\t} else {\n\t\tmsg.add(0x00);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "420220b35f46a038602b290882e603e7363d3ae4610039d9109e84a986ba59fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5953, + "startColumn": 23, + "charOffset": 182640, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5951, + "startColumn": 23, + "charOffset": 182524, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tmsg.addString(string.str(), \"ProtocolGame::sendMarketDetail - string.str()\");\n\t\t\t} else {\n\t\t\t\tmsg.add(0x00);\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e045546f7a77f10dbe743be2b238abfeea0640db37e700a8e27902f09a3ff562" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5961, + "startColumn": 23, + "charOffset": 182881, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5959, + "startColumn": 23, + "charOffset": 182765, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tmsg.addString(string.str(), \"ProtocolGame::sendMarketDetail - string.str()\");\n\t\t\t} else {\n\t\t\t\tmsg.add(0x00);\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8f360a6556f02fff31151ba2d37dacd4c35c4e534a9f085e4308d3a93a34eff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5969, + "startColumn": 23, + "charOffset": 183157, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5967, + "startColumn": 23, + "charOffset": 183041, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tmsg.addString(string.str(), \"ProtocolGame::sendMarketDetail - string.str()\");\n\t\t\t} else {\n\t\t\t\tmsg.add(0x00);\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e27e0088d10951e83cda4ccbcb73ee789d266989806c66484995dc16612b35f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5974, + "startColumn": 100, + "charOffset": 183335, + "charLength": 8, + "snippet": { + "text": "unsigned" + } + }, + "contextRegion": { + "startLine": 5972, + "startColumn": 100, + "charOffset": 183170, + "charLength": 8, + "snippet": { + "text": "\t\t\tif (it.abilities->perfectShotDamage > 0) {\n\t\t\t\tstring.clear();\n\t\t\t\tstring << std::showpos << it.abilities->perfectShotDamage << std::noshowpos << \" at range \" << unsigned(it.abilities->perfectShotRange);\n\t\t\t\tmsg.addString(string.str(), \"ProtocolGame::sendMarketDetail - string.str()\");\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c790a44038a6ba69e0438598457693f93f6f4573781177d90ca022482af8ea7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5977, + "startColumn": 23, + "charOffset": 183493, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5975, + "startColumn": 23, + "charOffset": 183377, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tmsg.addString(string.str(), \"ProtocolGame::sendMarketDetail - string.str()\");\n\t\t\t} else {\n\t\t\t\tmsg.add(0x00);\n\t\t\t}\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01a9ef86dfbc94384fe77ecd03fc8eac4ad0ebd166c409c866630d66b67a0c31" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5982, + "startColumn": 22, + "charOffset": 183583, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5980, + "startColumn": 22, + "charOffset": 183516, + "charLength": 4, + "snippet": { + "text": "\t\t\t// Send empty skills\n\t\t\t// Cleave modifier\n\t\t\tmsg.add(0x00);\n\t\t\t// Magic shield capacity\n\t\t\tmsg.add(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2212ead2c44b77fb1e75d2eb24cd03aba4f12996b5bd162a372945e760270bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5984, + "startColumn": 22, + "charOffset": 183639, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5982, + "startColumn": 22, + "charOffset": 183562, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.add(0x00);\n\t\t\t// Magic shield capacity\n\t\t\tmsg.add(0x00);\n\t\t\t// Damage reflection modifie\n\t\t\tmsg.add(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6b95a6c9740f238b73a0adc733b88afae463cc692c00334263ee87217ce9204" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5986, + "startColumn": 22, + "charOffset": 183699, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5984, + "startColumn": 22, + "charOffset": 183618, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.add(0x00);\n\t\t\t// Damage reflection modifie\n\t\t\tmsg.add(0x00);\n\t\t\t// Perfect shot modifier\n\t\t\tmsg.add(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0cdbc7c2d50620516a6e8c8fd5440d7b46b8355e56846f098815bedd975a9799" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5988, + "startColumn": 22, + "charOffset": 183755, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 5986, + "startColumn": 22, + "charOffset": 183678, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.add(0x00);\n\t\t\t// Perfect shot modifier\n\t\t\tmsg.add(0x00);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "991fef6bd66bd08983f5a60a3c097d2cab79ead1a8c5cc23a2fa203a5b8e623a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'chance' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5996, + "startColumn": 11, + "charOffset": 184029, + "charLength": 6, + "snippet": { + "text": "chance" + } + }, + "contextRegion": { + "startLine": 5994, + "startColumn": 11, + "charOffset": 183992, + "charLength": 6, + "snippet": { + "text": "\t\t\tstd::ostringstream ss;\n\n\t\t\tdouble chance;\n\t\t\tif (it.isWeapon()) {\n\t\t\t\tchance = 0.5 * tier + 0.05 * ((tier - 1) * (tier - 1));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e476879c86624baed6049a9c31ea2a5c9f577081cd21db67fb4ca053695e1929" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5997, + "startColumn": 4, + "charOffset": 184040, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 5995, + "startColumn": 4, + "charOffset": 184018, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tdouble chance;\n\t\t\tif (it.isWeapon()) {\n\t\t\t\tchance = 0.5 * tier + 0.05 * ((tier - 1) * (tier - 1));\n\t\t\t\tss << fmt::format(\"{} ({:.2f}% Onslaught)\", static_cast(tier), chance);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19b2dc4cfca19691068b2f21f360614f2a5c6fec6724e1bed82bfebc42e75f59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5998, + "startColumn": 14, + "charOffset": 184074, + "charLength": 3, + "snippet": { + "text": "0.5" + } + }, + "contextRegion": { + "startLine": 5996, + "startColumn": 14, + "charOffset": 184019, + "charLength": 3, + "snippet": { + "text": "\t\t\tdouble chance;\n\t\t\tif (it.isWeapon()) {\n\t\t\t\tchance = 0.5 * tier + 0.05 * ((tier - 1) * (tier - 1));\n\t\t\t\tss << fmt::format(\"{} ({:.2f}% Onslaught)\", static_cast(tier), chance);\n\t\t\t} else if (it.isHelmet()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4632c1806b21306da1e5a5e5ce0e9281407d51afcbe9b6499be4e3cb2a9b7c90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5998, + "startColumn": 20, + "charOffset": 184080, + "charLength": 4, + "snippet": { + "text": "tier" + } + }, + "contextRegion": { + "startLine": 5996, + "startColumn": 20, + "charOffset": 184019, + "charLength": 4, + "snippet": { + "text": "\t\t\tdouble chance;\n\t\t\tif (it.isWeapon()) {\n\t\t\t\tchance = 0.5 * tier + 0.05 * ((tier - 1) * (tier - 1));\n\t\t\t\tss << fmt::format(\"{} ({:.2f}% Onslaught)\", static_cast(tier), chance);\n\t\t\t} else if (it.isHelmet()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a8fc01784dc86f1ddc07911b0d01a0293b52ed8eb446de383a34aeaaf758f26" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.05 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5998, + "startColumn": 27, + "charOffset": 184087, + "charLength": 4, + "snippet": { + "text": "0.05" + } + }, + "contextRegion": { + "startLine": 5996, + "startColumn": 27, + "charOffset": 184019, + "charLength": 4, + "snippet": { + "text": "\t\t\tdouble chance;\n\t\t\tif (it.isWeapon()) {\n\t\t\t\tchance = 0.5 * tier + 0.05 * ((tier - 1) * (tier - 1));\n\t\t\t\tss << fmt::format(\"{} ({:.2f}% Onslaught)\", static_cast(tier), chance);\n\t\t\t} else if (it.isHelmet()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a2738520dc8d67d4f5fc21b530663c005e25547c2f4b7c1e3f84e9f8bd8db18" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 5998, + "startColumn": 34, + "charOffset": 184094, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 5996, + "startColumn": 34, + "charOffset": 184019, + "charLength": 1, + "snippet": { + "text": "\t\t\tdouble chance;\n\t\t\tif (it.isWeapon()) {\n\t\t\t\tchance = 0.5 * tier + 0.05 * ((tier - 1) * (tier - 1));\n\t\t\t\tss << fmt::format(\"{} ({:.2f}% Onslaught)\", static_cast(tier), chance);\n\t\t\t} else if (it.isHelmet()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41c9ccf178d15125fa5c715b2fd91a44cf74f4badb5acae3d62cfde2d1be2043" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6001, + "startColumn": 14, + "charOffset": 184251, + "charLength": 1, + "snippet": { + "text": "2" + } + }, + "contextRegion": { + "startLine": 5999, + "startColumn": 14, + "charOffset": 184121, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tss << fmt::format(\"{} ({:.2f}% Onslaught)\", static_cast(tier), chance);\n\t\t\t} else if (it.isHelmet()) {\n\t\t\t\tchance = 2 * tier + 0.05 * ((tier - 1) * (tier - 1));\n\t\t\t\tss << fmt::format(\"{} ({:.2f}% Momentum)\", static_cast(tier), chance);\n\t\t\t} else if (it.isArmor()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "068c46a81e7cd0b988e920567e7ca74d7c1ab08842157910a86a53c7cb33535e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.05 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6001, + "startColumn": 25, + "charOffset": 184262, + "charLength": 4, + "snippet": { + "text": "0.05" + } + }, + "contextRegion": { + "startLine": 5999, + "startColumn": 25, + "charOffset": 184121, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tss << fmt::format(\"{} ({:.2f}% Onslaught)\", static_cast(tier), chance);\n\t\t\t} else if (it.isHelmet()) {\n\t\t\t\tchance = 2 * tier + 0.05 * ((tier - 1) * (tier - 1));\n\t\t\t\tss << fmt::format(\"{} ({:.2f}% Momentum)\", static_cast(tier), chance);\n\t\t\t} else if (it.isArmor()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb1fbe1634183f1daeeeb274d1eb257a0b18a2d921d8e1957a28355782c3b1d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6001, + "startColumn": 32, + "charOffset": 184269, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 5999, + "startColumn": 32, + "charOffset": 184121, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tss << fmt::format(\"{} ({:.2f}% Onslaught)\", static_cast(tier), chance);\n\t\t\t} else if (it.isHelmet()) {\n\t\t\t\tchance = 2 * tier + 0.05 * ((tier - 1) * (tier - 1));\n\t\t\t\tss << fmt::format(\"{} ({:.2f}% Momentum)\", static_cast(tier), chance);\n\t\t\t} else if (it.isArmor()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f0a4fbb9fe743d9517b60220d5484fffbd9960c21d8a6fde462957a12156680" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.0307576 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6004, + "startColumn": 15, + "charOffset": 184425, + "charLength": 9, + "snippet": { + "text": "0.0307576" + } + }, + "contextRegion": { + "startLine": 6002, + "startColumn": 15, + "charOffset": 184296, + "charLength": 9, + "snippet": { + "text": "\t\t\t\tss << fmt::format(\"{} ({:.2f}% Momentum)\", static_cast(tier), chance);\n\t\t\t} else if (it.isArmor()) {\n\t\t\t\tchance = (0.0307576 * tier * tier) + (0.440697 * tier) + 0.026;\n\t\t\t\tss << fmt::format(\"{} ({:.2f}% Ruse)\", static_cast(tier), chance);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2644be64422beadfb4732acf08047413974f233892a59f0bc19d7f1abe1671a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6004, + "startColumn": 27, + "charOffset": 184437, + "charLength": 4, + "snippet": { + "text": "tier" + } + }, + "contextRegion": { + "startLine": 6002, + "startColumn": 27, + "charOffset": 184296, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tss << fmt::format(\"{} ({:.2f}% Momentum)\", static_cast(tier), chance);\n\t\t\t} else if (it.isArmor()) {\n\t\t\t\tchance = (0.0307576 * tier * tier) + (0.440697 * tier) + 0.026;\n\t\t\t\tss << fmt::format(\"{} ({:.2f}% Ruse)\", static_cast(tier), chance);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01e8eec69d8a24ade8b08cfeb9bdb74c0e428b3117e7a657402ee156789688dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6004, + "startColumn": 34, + "charOffset": 184444, + "charLength": 4, + "snippet": { + "text": "tier" + } + }, + "contextRegion": { + "startLine": 6002, + "startColumn": 34, + "charOffset": 184296, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tss << fmt::format(\"{} ({:.2f}% Momentum)\", static_cast(tier), chance);\n\t\t\t} else if (it.isArmor()) {\n\t\t\t\tchance = (0.0307576 * tier * tier) + (0.440697 * tier) + 0.026;\n\t\t\t\tss << fmt::format(\"{} ({:.2f}% Ruse)\", static_cast(tier), chance);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f095c604635f357c4f745f4e2190f8f8926461c99d93fbb622abaae30455375" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.440697 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6004, + "startColumn": 43, + "charOffset": 184453, + "charLength": 8, + "snippet": { + "text": "0.440697" + } + }, + "contextRegion": { + "startLine": 6002, + "startColumn": 43, + "charOffset": 184296, + "charLength": 8, + "snippet": { + "text": "\t\t\t\tss << fmt::format(\"{} ({:.2f}% Momentum)\", static_cast(tier), chance);\n\t\t\t} else if (it.isArmor()) {\n\t\t\t\tchance = (0.0307576 * tier * tier) + (0.440697 * tier) + 0.026;\n\t\t\t\tss << fmt::format(\"{} ({:.2f}% Ruse)\", static_cast(tier), chance);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2dd41b8227324a1c88266119d98b2c0852fe04f61f8890617f3002e97979f34e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6004, + "startColumn": 54, + "charOffset": 184464, + "charLength": 4, + "snippet": { + "text": "tier" + } + }, + "contextRegion": { + "startLine": 6002, + "startColumn": 54, + "charOffset": 184296, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tss << fmt::format(\"{} ({:.2f}% Momentum)\", static_cast(tier), chance);\n\t\t\t} else if (it.isArmor()) {\n\t\t\t\tchance = (0.0307576 * tier * tier) + (0.440697 * tier) + 0.026;\n\t\t\t\tss << fmt::format(\"{} ({:.2f}% Ruse)\", static_cast(tier), chance);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5f150aef8f852a7d1cc1e0dd877581c39cbe13d3e6913cebdfcdf43df26974a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.026 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6004, + "startColumn": 62, + "charOffset": 184472, + "charLength": 5, + "snippet": { + "text": "0.026" + } + }, + "contextRegion": { + "startLine": 6002, + "startColumn": 62, + "charOffset": 184296, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tss << fmt::format(\"{} ({:.2f}% Momentum)\", static_cast(tier), chance);\n\t\t\t} else if (it.isArmor()) {\n\t\t\t\tchance = (0.0307576 * tier * tier) + (0.440697 * tier) + 0.026;\n\t\t\t\tss << fmt::format(\"{} ({:.2f}% Ruse)\", static_cast(tier), chance);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f03ddcbef5843cd1635e79ba9ae39392455afc322a2928c78dd681b14a45f3ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6012, + "startColumn": 22, + "charOffset": 184962, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6010, + "startColumn": 22, + "charOffset": 184833, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.addString(std::to_string(tier), \"ProtocolGame::sendMarketDetail - std::to_string(tier)\");\n\t\t} else {\n\t\t\tmsg.add(0x00);\n\t\t\tmsg.add(0x00);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5fee761832b2097ae3a1aa7093823d159fa7346729fd7c7d9d434c27032d067" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6013, + "startColumn": 22, + "charOffset": 184990, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6011, + "startColumn": 22, + "charOffset": 184930, + "charLength": 4, + "snippet": { + "text": "\t\t} else {\n\t\t\tmsg.add(0x00);\n\t\t\tmsg.add(0x00);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fdb7d8d0363f20102040cf11920b2c0ab77188afdd5d2d99db31d748ff2f7421" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6024, + "startColumn": 16, + "charOffset": 185415, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 6022, + "startColumn": 16, + "charOffset": 185296, + "charLength": 4, + "snippet": { + "text": "\t\tif (tierStatsIter != tierStatsMap.end()) {\n\t\t\tconst auto &purchaseStatistics = tierStatsIter->second;\n\t\t\tmsg.addByte(0x01);\n\t\t\tmsg.add(purchaseStatistics.numTransactions);\n\t\t\tif (oldProtocol) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f39200bc83a7753b28e585923d5a11e554dfb16812378a0da07f00805c400b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6027, + "startColumn": 23, + "charOffset": 185524, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 6025, + "startColumn": 23, + "charOffset": 185422, + "charLength": 3, + "snippet": { + "text": "\t\t\tmsg.add(purchaseStatistics.numTransactions);\n\t\t\tif (oldProtocol) {\n\t\t\t\tmsg.add(std::min(std::numeric_limits::max(), purchaseStatistics.totalPrice));\n\t\t\t\tmsg.add(std::min(std::numeric_limits::max(), purchaseStatistics.highestPrice));\n\t\t\t\tmsg.add(std::min(std::numeric_limits::max(), purchaseStatistics.lowestPrice));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "086602e2d530dd9ed54cda1babcc1dc3c2fb77996df043d5018b9aca2b6f9f4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6028, + "startColumn": 23, + "charOffset": 185636, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 6026, + "startColumn": 23, + "charOffset": 185480, + "charLength": 3, + "snippet": { + "text": "\t\t\tif (oldProtocol) {\n\t\t\t\tmsg.add(std::min(std::numeric_limits::max(), purchaseStatistics.totalPrice));\n\t\t\t\tmsg.add(std::min(std::numeric_limits::max(), purchaseStatistics.highestPrice));\n\t\t\t\tmsg.add(std::min(std::numeric_limits::max(), purchaseStatistics.lowestPrice));\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b77ef17f064bc08ecead31a71b8a36c4cd2b9b9073682cabb235e17707ed404f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6029, + "startColumn": 23, + "charOffset": 185750, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 6027, + "startColumn": 23, + "charOffset": 185502, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tmsg.add(std::min(std::numeric_limits::max(), purchaseStatistics.totalPrice));\n\t\t\t\tmsg.add(std::min(std::numeric_limits::max(), purchaseStatistics.highestPrice));\n\t\t\t\tmsg.add(std::min(std::numeric_limits::max(), purchaseStatistics.lowestPrice));\n\t\t\t} else {\n\t\t\t\tmsg.add(purchaseStatistics.totalPrice);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "851dfbe7149e5278a4aa3c3c6d970920e49edd7a90f2c7fc410ff170ce54008a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6036, + "startColumn": 16, + "charOffset": 186049, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6034, + "startColumn": 16, + "charOffset": 186018, + "charLength": 4, + "snippet": { + "text": "\t\t\t}\n\t\t} else {\n\t\t\tmsg.addByte(0x00);\n\t\t}\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc295e822360dbb2aa64533202bf8259f6a4064cf3125576a10197795f5c6093" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6039, + "startColumn": 15, + "charOffset": 186084, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6037, + "startColumn": 15, + "charOffset": 186056, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\tmsg.addByte(0x00); // send to old protocol ?\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0fa525913063ac32f56dba74f66e1346f0b0cdbc2df8a6fb0af036f24accf95" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6049, + "startColumn": 16, + "charOffset": 186499, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 6047, + "startColumn": 16, + "charOffset": 186384, + "charLength": 4, + "snippet": { + "text": "\t\tif (tierStatsIter != tierStatsMap.end()) {\n\t\t\tconst auto &saleStatistics = tierStatsIter->second;\n\t\t\tmsg.addByte(0x01);\n\t\t\tmsg.add(saleStatistics.numTransactions);\n\t\t\tif (oldProtocol) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ae3a3a4ea1af5ba3bdee77480002f4da3fb31968871615b647ad40500af9513" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6052, + "startColumn": 23, + "charOffset": 186604, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 6050, + "startColumn": 23, + "charOffset": 186506, + "charLength": 3, + "snippet": { + "text": "\t\t\tmsg.add(saleStatistics.numTransactions);\n\t\t\tif (oldProtocol) {\n\t\t\t\tmsg.add(std::min(std::numeric_limits::max(), saleStatistics.totalPrice));\n\t\t\t\tmsg.add(std::min(std::numeric_limits::max(), saleStatistics.highestPrice));\n\t\t\t\tmsg.add(std::min(std::numeric_limits::max(), saleStatistics.lowestPrice));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f3f954c8cd4a44c85faeda871fbb131a3b983c91371b63bf192f9d300dfc722" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6053, + "startColumn": 23, + "charOffset": 186712, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 6051, + "startColumn": 23, + "charOffset": 186560, + "charLength": 3, + "snippet": { + "text": "\t\t\tif (oldProtocol) {\n\t\t\t\tmsg.add(std::min(std::numeric_limits::max(), saleStatistics.totalPrice));\n\t\t\t\tmsg.add(std::min(std::numeric_limits::max(), saleStatistics.highestPrice));\n\t\t\t\tmsg.add(std::min(std::numeric_limits::max(), saleStatistics.lowestPrice));\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27999b917192c1b27eb4e5609cef00832bc9d8cafecabf1e33c47bfc3745f8df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6054, + "startColumn": 23, + "charOffset": 186822, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 6052, + "startColumn": 23, + "charOffset": 186582, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tmsg.add(std::min(std::numeric_limits::max(), saleStatistics.totalPrice));\n\t\t\t\tmsg.add(std::min(std::numeric_limits::max(), saleStatistics.highestPrice));\n\t\t\t\tmsg.add(std::min(std::numeric_limits::max(), saleStatistics.lowestPrice));\n\t\t\t} else {\n\t\t\t\tmsg.add(std::min(std::numeric_limits::max(), saleStatistics.totalPrice));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d01186ff56defd3f770ffd2179c79f9f1ebcb6e84d3c121138a3d0c9ae87d5aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6061, + "startColumn": 16, + "charOffset": 187163, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6059, + "startColumn": 16, + "charOffset": 187132, + "charLength": 4, + "snippet": { + "text": "\t\t\t}\n\t\t} else {\n\t\t\tmsg.addByte(0x00);\n\t\t}\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f1c0dae065ccfbc113a390923f9809e4d56715ad9b54731ccbb554691957d55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6064, + "startColumn": 15, + "charOffset": 187198, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6062, + "startColumn": 15, + "charOffset": 187170, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\tmsg.addByte(0x00); // send to old protocol ?\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28c9148d28d557b49f4719abb2a6b10c25ecd07b76c4ad27b4bd3824504c2938" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6070, + "startColumn": 94, + "charOffset": 187358, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 6068, + "startColumn": 94, + "charOffset": 187262, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendTradeItemRequest(const std::string &traderName, std::shared_ptr item, bool ack) {\n\tNetworkMessage msg;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f6db1c9476966949f86d40010c7fc12b4e3fff32dab57f91f72edd89ebcf2c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6074, + "startColumn": 15, + "charOffset": 187424, + "charLength": 4, + "snippet": { + "text": "0x7D" + } + }, + "contextRegion": { + "startLine": 6072, + "startColumn": 15, + "charOffset": 187397, + "charLength": 4, + "snippet": { + "text": "\n\tif (ack) {\n\t\tmsg.addByte(0x7D);\n\t} else {\n\t\tmsg.addByte(0x7E);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50c49d80fb10b1888d2231d62fc42bb4d8dc8bf5b189db3d39b3472da85d0ab2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x7D is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6074, + "startColumn": 15, + "charOffset": 187424, + "charLength": 4, + "snippet": { + "text": "0x7D" + } + }, + "contextRegion": { + "startLine": 6072, + "startColumn": 15, + "charOffset": 187397, + "charLength": 4, + "snippet": { + "text": "\n\tif (ack) {\n\t\tmsg.addByte(0x7D);\n\t} else {\n\t\tmsg.addByte(0x7E);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a04548ad5adf192acfdf69af3246ab0a4140478eb8eeb2a2c667ab56fce07b07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6076, + "startColumn": 15, + "charOffset": 187455, + "charLength": 4, + "snippet": { + "text": "0x7E" + } + }, + "contextRegion": { + "startLine": 6074, + "startColumn": 15, + "charOffset": 187410, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addByte(0x7D);\n\t} else {\n\t\tmsg.addByte(0x7E);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fa6f9052ecf370c75449c6cba2ba9c263dbfca8f9458d13e5283970edffd711" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x7E is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6076, + "startColumn": 15, + "charOffset": 187455, + "charLength": 4, + "snippet": { + "text": "0x7E" + } + }, + "contextRegion": { + "startLine": 6074, + "startColumn": 15, + "charOffset": 187410, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addByte(0x7D);\n\t} else {\n\t\tmsg.addByte(0x7E);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81218e8cda308fa72f1ababb34db33e3e4c67dd8e5e2bf53af93af98f8f1251e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'listContainer' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6084, + "startColumn": 10, + "charOffset": 187766, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6082, + "startColumn": 10, + "charOffset": 187619, + "charLength": 1, + "snippet": { + "text": "\t\tstd::list> listContainer { tradeContainer };\n\t\tstd::list> itemList { tradeContainer };\n\t\twhile (!listContainer.empty()) {\n\t\t\tstd::shared_ptr container = listContainer.front();\n\t\t\tlistContainer.pop_front();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9070d99d571989d1b302abef818b313aadc109531f5981826bd375c37af8308f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6088, + "startColumn": 4, + "charOffset": 187891, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6086, + "startColumn": 4, + "charOffset": 187857, + "charLength": 3, + "snippet": { + "text": "\t\t\tlistContainer.pop_front();\n\n\t\t\tfor (const std::shared_ptr &containerItem : container->getItemList()) {\n\t\t\t\tstd::shared_ptr tmpContainer = containerItem->getContainer();\n\t\t\t\tif (tmpContainer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53693112f52b9d7a2537b4391f9c92976ec5cf77cd38b462d8687d6ffc1c2939" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6097, + "startColumn": 15, + "charOffset": 188183, + "charLength": 8, + "snippet": { + "text": "itemList" + } + }, + "contextRegion": { + "startLine": 6095, + "startColumn": 15, + "charOffset": 188164, + "charLength": 8, + "snippet": { + "text": "\t\t}\n\n\t\tmsg.addByte(itemList.size());\n\t\tfor (const std::shared_ptr &listItem : itemList) {\n\t\t\tAddItem(msg, listItem);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26554c7d845b0e8d2118bb16898fbe6eff92f6f8b5f068ec897934a87c0e9abc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6098, + "startColumn": 3, + "charOffset": 188203, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6096, + "startColumn": 3, + "charOffset": 188168, + "charLength": 3, + "snippet": { + "text": "\n\t\tmsg.addByte(itemList.size());\n\t\tfor (const std::shared_ptr &listItem : itemList) {\n\t\t\tAddItem(msg, listItem);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9f081845d6df7d39da3eede7fb2a7c92833321f0d9719c28a325d15ec5bdb6e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6102, + "startColumn": 15, + "charOffset": 188315, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 6100, + "startColumn": 15, + "charOffset": 188287, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\tmsg.addByte(0x01);\n\t\tAddItem(msg, item);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "200b429b6a151eebbc20111d9941e7f71a67c23bfbdcade9b382d16ecf826f49" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6110, + "startColumn": 14, + "charOffset": 188449, + "charLength": 4, + "snippet": { + "text": "0x7F" + } + }, + "contextRegion": { + "startLine": 6108, + "startColumn": 14, + "charOffset": 188377, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendCloseTrade() {\n\tNetworkMessage msg;\n\tmsg.addByte(0x7F);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "894b5bf504c906853ce2c8bab40c50984b7661543b99bf6de26115502299cb77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x7F is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6110, + "startColumn": 14, + "charOffset": 188449, + "charLength": 4, + "snippet": { + "text": "0x7F" + } + }, + "contextRegion": { + "startLine": 6108, + "startColumn": 14, + "charOffset": 188377, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendCloseTrade() {\n\tNetworkMessage msg;\n\tmsg.addByte(0x7F);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de3cea5ac03da24f6ba913a74ea6d83bb8c53ae3ee53800b160bf8a84671ee3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6116, + "startColumn": 14, + "charOffset": 188573, + "charLength": 4, + "snippet": { + "text": "0x6F" + } + }, + "contextRegion": { + "startLine": 6114, + "startColumn": 14, + "charOffset": 188486, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendCloseContainer(uint8_t cid) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x6F);\n\tmsg.addByte(cid);\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b904d0345a7689a69ef865719e72302d34aeea7bf2a35a89c6f18accd6a585a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x6F is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6116, + "startColumn": 14, + "charOffset": 188573, + "charLength": 4, + "snippet": { + "text": "0x6F" + } + }, + "contextRegion": { + "startLine": 6114, + "startColumn": 14, + "charOffset": 188486, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendCloseContainer(uint8_t cid) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x6F);\n\tmsg.addByte(cid);\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "effe1dce07ac6f3130ff3e0b18e6fa58b1098a245cacedad6e6f5d76066ed83b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6121, + "startColumn": 63, + "charOffset": 188691, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 6119, + "startColumn": 63, + "charOffset": 188626, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendCreatureTurn(std::shared_ptr creature, uint32_t stackPos) {\n\tif (!canSee(creature)) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "376967f45709b337e2c3c5bdc8094ccefcb12c2638354bb2655f8fc067f88c8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6127, + "startColumn": 14, + "charOffset": 188796, + "charLength": 4, + "snippet": { + "text": "0x6B" + } + }, + "contextRegion": { + "startLine": 6125, + "startColumn": 14, + "charOffset": 188761, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x6B);\n\tmsg.addPosition(creature->getPosition());\n\tmsg.addByte(static_cast(stackPos));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35fa210da436c3b5269d0e09ac2baf78bf143a8977616b8a3f68122ae6fb66de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x6B is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6127, + "startColumn": 14, + "charOffset": 188796, + "charLength": 4, + "snippet": { + "text": "0x6B" + } + }, + "contextRegion": { + "startLine": 6125, + "startColumn": 14, + "charOffset": 188761, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x6B);\n\tmsg.addPosition(creature->getPosition());\n\tmsg.addByte(static_cast(stackPos));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd7bb4cf3cd99bee82b71bbacef2b09d8712337524a2c28f3be3e4c4c39bc101" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6130, + "startColumn": 20, + "charOffset": 188911, + "charLength": 4, + "snippet": { + "text": "0x63" + } + }, + "contextRegion": { + "startLine": 6128, + "startColumn": 20, + "charOffset": 188803, + "charLength": 4, + "snippet": { + "text": "\tmsg.addPosition(creature->getPosition());\n\tmsg.addByte(static_cast(stackPos));\n\tmsg.add(0x63);\n\tmsg.add(creature->getID());\n\tmsg.addByte(creature->getDirection());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef773cacf4a402ca1cff7f6f2e0e7af7d3833a206f836537f11b3c66fcdfb751" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x63 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6130, + "startColumn": 20, + "charOffset": 188911, + "charLength": 4, + "snippet": { + "text": "0x63" + } + }, + "contextRegion": { + "startLine": 6128, + "startColumn": 20, + "charOffset": 188803, + "charLength": 4, + "snippet": { + "text": "\tmsg.addPosition(creature->getPosition());\n\tmsg.addByte(static_cast(stackPos));\n\tmsg.add(0x63);\n\tmsg.add(creature->getID());\n\tmsg.addByte(creature->getDirection());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f11fd373ba9ba7a3720126f894cde415e033658f792a77462f16062af75904ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6137, + "startColumn": 62, + "charOffset": 189152, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 6135, + "startColumn": 62, + "charOffset": 189088, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendCreatureSay(std::shared_ptr creature, SpeakClasses type, const std::string &text, const Position* pos /* = nullptr*/) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xAA);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3cb92314ded75d22f3eec1b5aefd04f1ef8cb68b6217ec3b5380f9ef76c119e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6139, + "startColumn": 14, + "charOffset": 189278, + "charLength": 4, + "snippet": { + "text": "0xAA" + } + }, + "contextRegion": { + "startLine": 6137, + "startColumn": 14, + "charOffset": 189091, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendCreatureSay(std::shared_ptr creature, SpeakClasses type, const std::string &text, const Position* pos /* = nullptr*/) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xAA);\n\n\tstatic uint32_t statementId = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb9be655cc06f5a0dbe6d278bcb40df56a936ec84844f266bbcb778b0550f0b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xAA is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6139, + "startColumn": 14, + "charOffset": 189278, + "charLength": 4, + "snippet": { + "text": "0xAA" + } + }, + "contextRegion": { + "startLine": 6137, + "startColumn": 14, + "charOffset": 189091, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendCreatureSay(std::shared_ptr creature, SpeakClasses type, const std::string &text, const Position* pos /* = nullptr*/) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xAA);\n\n\tstatic uint32_t statementId = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1d4606c1b32062cbbaf4a81dc421083d7fca8e3fd91010e1e6932e3fc22d9ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6147, + "startColumn": 15, + "charOffset": 189484, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6145, + "startColumn": 15, + "charOffset": 189448, + "charLength": 4, + "snippet": { + "text": "\n\tif (!oldProtocol) {\n\t\tmsg.addByte(0x00); // Show (Traded)\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b905ff3237d724d790efa48c0b6ef88c123b969e0faa8e1efde1cfdbc2c21d89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6152, + "startColumn": 21, + "charOffset": 189627, + "charLength": 7, + "snippet": { + "text": "speaker" + } + }, + "contextRegion": { + "startLine": 6150, + "startColumn": 21, + "charOffset": 189512, + "charLength": 7, + "snippet": { + "text": "\t// Add level only for players\n\tif (std::shared_ptr speaker = creature->getPlayer()) {\n\t\tmsg.add(speaker->getLevel());\n\t} else {\n\t\tmsg.add(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b69a44d4a37e2febceecb1c41178b76da1b86609b53f1dd7c659a66f12d6b2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6154, + "startColumn": 21, + "charOffset": 189679, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6152, + "startColumn": 21, + "charOffset": 189607, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.add(speaker->getLevel());\n\t} else {\n\t\tmsg.add(0x00);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef773cacf4a402ca1cff7f6f2e0e7af7d3833a206f836537f11b3c66fcdfb751" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6163, + "startColumn": 6, + "charOffset": 189863, + "charLength": 3, + "snippet": { + "text": "pos" + } + }, + "contextRegion": { + "startLine": 6161, + "startColumn": 6, + "charOffset": 189854, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tif (pos) {\n\t\tmsg.addPosition(*pos);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfec0b4f49f14a8ef268c3cd38ec3ef6e51e894f66c1c66f387f39e4102ff93d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const Position *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6163, + "startColumn": 6, + "charOffset": 189863, + "charLength": 3, + "snippet": { + "text": "pos" + } + }, + "contextRegion": { + "startLine": 6161, + "startColumn": 6, + "charOffset": 189854, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tif (pos) {\n\t\tmsg.addPosition(*pos);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e33603e9ef08783f7129f410e2ecdbfdf1a8b3bba2ef7b0ad10ed1653f4fe12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6173, + "startColumn": 60, + "charOffset": 190104, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 6171, + "startColumn": 60, + "charOffset": 190042, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendToChannel(std::shared_ptr creature, SpeakClasses type, const std::string &text, uint16_t channelId) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xAA);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5447978b8e8218e8f02506b7df7733a172ac973aaaa385642b7468782749b2aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6175, + "startColumn": 14, + "charOffset": 190214, + "charLength": 4, + "snippet": { + "text": "0xAA" + } + }, + "contextRegion": { + "startLine": 6173, + "startColumn": 14, + "charOffset": 190045, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendToChannel(std::shared_ptr creature, SpeakClasses type, const std::string &text, uint16_t channelId) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xAA);\n\n\tstatic uint32_t statementId = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "acde2745a38d2889221fcb1f50c9b34016afb626ef9536ac8a4d6dd6e5c48e6e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xAA is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6175, + "startColumn": 14, + "charOffset": 190214, + "charLength": 4, + "snippet": { + "text": "0xAA" + } + }, + "contextRegion": { + "startLine": 6173, + "startColumn": 14, + "charOffset": 190045, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendToChannel(std::shared_ptr creature, SpeakClasses type, const std::string &text, uint16_t channelId) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xAA);\n\n\tstatic uint32_t statementId = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b15b7f2d66cf92f9e60cef77c34ab86ded3379917fffc96158951b074f968a2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6179, + "startColumn": 6, + "charOffset": 190296, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6177, + "startColumn": 6, + "charOffset": 190222, + "charLength": 1, + "snippet": { + "text": "\tstatic uint32_t statementId = 0;\n\tmsg.add(++statementId);\n\tif (!creature) {\n\t\tmsg.add(0x00);\n\t\tif (!oldProtocol && statementId != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7ce92bf81cab41fcc165d61c987a2cfedbf4aa67285d26d198335b030f557ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6180, + "startColumn": 21, + "charOffset": 190329, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6178, + "startColumn": 21, + "charOffset": 190256, + "charLength": 4, + "snippet": { + "text": "\tmsg.add(++statementId);\n\tif (!creature) {\n\t\tmsg.add(0x00);\n\t\tif (!oldProtocol && statementId != 0) {\n\t\t\tmsg.addByte(0x00); // Show (Traded)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "530a28c04e2e54ddb364e68096184f937fa5055481c156068f40fdaa6c7e0729" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6182, + "startColumn": 16, + "charOffset": 190393, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6180, + "startColumn": 16, + "charOffset": 190309, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.add(0x00);\n\t\tif (!oldProtocol && statementId != 0) {\n\t\t\tmsg.addByte(0x00); // Show (Traded)\n\t\t}\n\t} else if (type == TALKTYPE_CHANNEL_R2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5feb3a38eb4e69c7c6df147f0fe3cb363306707ee2a277ce8caa02321d718b5c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6185, + "startColumn": 21, + "charOffset": 190484, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6183, + "startColumn": 21, + "charOffset": 190417, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else if (type == TALKTYPE_CHANNEL_R2) {\n\t\tmsg.add(0x00);\n\t\tif (!oldProtocol && statementId != 0) {\n\t\t\tmsg.addByte(0x00); // Show (Traded)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f8d36889318a949393f044c506a5c447bdc1bbe2318febb97f5fffc2ee00909" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6187, + "startColumn": 16, + "charOffset": 190548, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6185, + "startColumn": 16, + "charOffset": 190464, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.add(0x00);\n\t\tif (!oldProtocol && statementId != 0) {\n\t\t\tmsg.addByte(0x00); // Show (Traded)\n\t\t}\n\t\ttype = TALKTYPE_CHANNEL_R1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84abedc213ad6e782651ec11475d35150f570bfe4be2af0927624593ffe53ee9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6193, + "startColumn": 16, + "charOffset": 190764, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6191, + "startColumn": 16, + "charOffset": 190616, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addString(creature->getName(), \"ProtocolGame::sendToChannel - creature->getName()\");\n\t\tif (!oldProtocol && statementId != 0) {\n\t\t\tmsg.addByte(0x00); // Show (Traded)\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b905ff3237d724d790efa48c0b6ef88c123b969e0faa8e1efde1cfdbc2c21d89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6198, + "startColumn": 22, + "charOffset": 190911, + "charLength": 7, + "snippet": { + "text": "speaker" + } + }, + "contextRegion": { + "startLine": 6196, + "startColumn": 22, + "charOffset": 190793, + "charLength": 7, + "snippet": { + "text": "\t\t// Add level only for players\n\t\tif (std::shared_ptr speaker = creature->getPlayer()) {\n\t\t\tmsg.add(speaker->getLevel());\n\t\t} else {\n\t\t\tmsg.add(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e4baffa6163b46eea99192be46a42ad54f8546dfc5bee161d9e3fe5d07b954a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6200, + "startColumn": 22, + "charOffset": 190965, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6198, + "startColumn": 22, + "charOffset": 190890, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.add(speaker->getLevel());\n\t\t} else {\n\t\t\tmsg.add(0x00);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c89517f498a877790108f6c40d74788855f582c6dec7eb5aa98cd47952fecf05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'speaker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6215, + "startColumn": 63, + "charOffset": 191329, + "charLength": 7, + "snippet": { + "text": "speaker" + } + }, + "contextRegion": { + "startLine": 6213, + "startColumn": 63, + "charOffset": 191264, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendPrivateMessage(std::shared_ptr speaker, SpeakClasses type, const std::string &text) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xAA);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "645649654b4cda559da54bfa1b97b13ebd41ddd8c486cc3730291c8fe8bf4aae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6217, + "startColumn": 14, + "charOffset": 191418, + "charLength": 4, + "snippet": { + "text": "0xAA" + } + }, + "contextRegion": { + "startLine": 6215, + "startColumn": 14, + "charOffset": 191267, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendPrivateMessage(std::shared_ptr speaker, SpeakClasses type, const std::string &text) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xAA);\n\tstatic uint32_t statementId = 0;\n\tmsg.add(++statementId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac6a85d3e306c50fc67b4e329d9630a72509eacc9d8623a52460c9752e390cf6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xAA is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6217, + "startColumn": 14, + "charOffset": 191418, + "charLength": 4, + "snippet": { + "text": "0xAA" + } + }, + "contextRegion": { + "startLine": 6215, + "startColumn": 14, + "charOffset": 191267, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendPrivateMessage(std::shared_ptr speaker, SpeakClasses type, const std::string &text) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xAA);\n\tstatic uint32_t statementId = 0;\n\tmsg.add(++statementId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "146e6bd5e6f65b2b9d7c82f49c2ac3dfdc4cf12302b497f717f59acf114fa3f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6223, + "startColumn": 16, + "charOffset": 191661, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6221, + "startColumn": 16, + "charOffset": 191510, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addString(speaker->getName(), \"ProtocolGame::sendPrivateMessage - speaker->getName()\");\n\t\tif (!oldProtocol && statementId != 0) {\n\t\t\tmsg.addByte(0x00); // Show (Traded)\n\t\t}\n\t\tmsg.add(speaker->getLevel());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "420220b35f46a038602b290882e603e7363d3ae4610039d9109e84a986ba59fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6225, + "startColumn": 21, + "charOffset": 191709, + "charLength": 7, + "snippet": { + "text": "speaker" + } + }, + "contextRegion": { + "startLine": 6223, + "startColumn": 21, + "charOffset": 191646, + "charLength": 7, + "snippet": { + "text": "\t\t\tmsg.addByte(0x00); // Show (Traded)\n\t\t}\n\t\tmsg.add(speaker->getLevel());\n\t} else {\n\t\tmsg.add(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34a0d2ccd0a7a8887c9abfd5fd9cb543066ed81bba73ed427f20da3a819f270e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6227, + "startColumn": 21, + "charOffset": 191761, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6225, + "startColumn": 21, + "charOffset": 191689, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.add(speaker->getLevel());\n\t} else {\n\t\tmsg.add(0x00);\n\t\tif (!oldProtocol && statementId != 0) {\n\t\t\tmsg.addByte(0x00); // Show (Traded)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b9db47f704c03a037eb6c24b657a76b8288bad6e6ade7f0540259d29bdf0755" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6229, + "startColumn": 16, + "charOffset": 191825, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6227, + "startColumn": 16, + "charOffset": 191741, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.add(0x00);\n\t\tif (!oldProtocol && statementId != 0) {\n\t\t\tmsg.addByte(0x00); // Show (Traded)\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf6225075e98ab69d2e1ade5230d671ae85fcfe9eef9f095a8f49028e0080b3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6245, + "startColumn": 14, + "charOffset": 192193, + "charLength": 4, + "snippet": { + "text": "0xA3" + } + }, + "contextRegion": { + "startLine": 6243, + "startColumn": 14, + "charOffset": 192119, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendCancelTarget() {\n\tNetworkMessage msg;\n\tmsg.addByte(0xA3);\n\tmsg.add(0x00);\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc295e822360dbb2aa64533202bf8259f6a4064cf3125576a10197795f5c6093" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xA3 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6245, + "startColumn": 14, + "charOffset": 192193, + "charLength": 4, + "snippet": { + "text": "0xA3" + } + }, + "contextRegion": { + "startLine": 6243, + "startColumn": 14, + "charOffset": 192119, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendCancelTarget() {\n\tNetworkMessage msg;\n\tmsg.addByte(0xA3);\n\tmsg.add(0x00);\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db8b3ce6f8631e647e6b0dba1e43dc35914c6116c55bb8517846bfeae19e26c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6246, + "startColumn": 20, + "charOffset": 192219, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6244, + "startColumn": 20, + "charOffset": 192159, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\tmsg.addByte(0xA3);\n\tmsg.add(0x00);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "797b3fe13f85019531f009a97a04b258459bb2ca89230da7f38874d36f478f65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6250, + "startColumn": 62, + "charOffset": 192317, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 6248, + "startColumn": 62, + "charOffset": 192253, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendChangeSpeed(std::shared_ptr creature, uint16_t speed) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x8F);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89582c4ad359d361de088116331dcf1a7b14a5f4cd1bb2a9978082bb3b5a8fc6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6252, + "startColumn": 14, + "charOffset": 192379, + "charLength": 4, + "snippet": { + "text": "0x8F" + } + }, + "contextRegion": { + "startLine": 6250, + "startColumn": 14, + "charOffset": 192256, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendChangeSpeed(std::shared_ptr creature, uint16_t speed) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x8F);\n\tmsg.add(creature->getID());\n\tmsg.add(creature->getBaseSpeed());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e7ad84f957cb77cea223c020b3f8f03527aa2c3d152b8b8e345e86763e247fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x8F is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6252, + "startColumn": 14, + "charOffset": 192379, + "charLength": 4, + "snippet": { + "text": "0x8F" + } + }, + "contextRegion": { + "startLine": 6250, + "startColumn": 14, + "charOffset": 192256, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendChangeSpeed(std::shared_ptr creature, uint16_t speed) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x8F);\n\tmsg.add(creature->getID());\n\tmsg.add(creature->getBaseSpeed());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3b878b72220e6d2f70547e30f11d46820f0229e1292049143c083b34ab42ac2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6262, + "startColumn": 15, + "charOffset": 192617, + "charLength": 4, + "snippet": { + "text": "0xB5" + } + }, + "contextRegion": { + "startLine": 6260, + "startColumn": 15, + "charOffset": 192566, + "charLength": 4, + "snippet": { + "text": "\tif (player) {\n\t\tNetworkMessage msg;\n\t\tmsg.addByte(0xB5);\n\t\tmsg.addByte(player->getDirection());\n\t\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd2d3662ae35fbe4038e161d11f3799a098cc1d37f550807edeb70666e925aa6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xB5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6262, + "startColumn": 15, + "charOffset": 192617, + "charLength": 4, + "snippet": { + "text": "0xB5" + } + }, + "contextRegion": { + "startLine": 6260, + "startColumn": 15, + "charOffset": 192566, + "charLength": 4, + "snippet": { + "text": "\tif (player) {\n\t\tNetworkMessage msg;\n\t\tmsg.addByte(0xB5);\n\t\tmsg.addByte(player->getDirection());\n\t\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55a7bd89864b2fc0dbf552aee78f6635c88aba2063eb8fe2b66edce0cd626ed0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6277, + "startColumn": 15, + "charOffset": 192888, + "charLength": 4, + "snippet": { + "text": "0x1D" + } + }, + "contextRegion": { + "startLine": 6275, + "startColumn": 15, + "charOffset": 192837, + "charLength": 4, + "snippet": { + "text": "\tif (player) {\n\t\tNetworkMessage msg;\n\t\tmsg.addByte(0x1D);\n\t\twriteToOutputBuffer(msg);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2d444b69936580ceb7db8a9cbc1195e8946d333e9784e075e7f21f27bd46eed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x1D is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6277, + "startColumn": 15, + "charOffset": 192888, + "charLength": 4, + "snippet": { + "text": "0x1D" + } + }, + "contextRegion": { + "startLine": 6275, + "startColumn": 15, + "charOffset": 192837, + "charLength": 4, + "snippet": { + "text": "\tif (player) {\n\t\tNetworkMessage msg;\n\t\tmsg.addByte(0x1D);\n\t\twriteToOutputBuffer(msg);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70121d4656baada8f25ad3cf55d4a1c4277ad987a15a57033ed8318f4dbd12b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6284, + "startColumn": 14, + "charOffset": 192999, + "charLength": 4, + "snippet": { + "text": "0x1E" + } + }, + "contextRegion": { + "startLine": 6282, + "startColumn": 14, + "charOffset": 192929, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendPingBack() {\n\tNetworkMessage msg;\n\tmsg.addByte(0x1E);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6861adf95c88b330c4a6c477293cf94f6f6a6dffced17c01fbc2c6099f59d1ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x1E is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6284, + "startColumn": 14, + "charOffset": 192999, + "charLength": 4, + "snippet": { + "text": "0x1E" + } + }, + "contextRegion": { + "startLine": 6282, + "startColumn": 14, + "charOffset": 192929, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendPingBack() {\n\tNetworkMessage msg;\n\tmsg.addByte(0x1E);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2820e931d133797314f50c9d5896206786fa5130ece3fe7d5856c5297c5cd8bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6289, + "startColumn": 28, + "charOffset": 193159, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 6287, + "startColumn": 28, + "charOffset": 193035, + "charLength": 4, + "snippet": { + "text": "\nvoid ProtocolGame::sendDistanceShoot(const Position &from, const Position &to, uint16_t type) {\n\tif (oldProtocol && type > 0xFF) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1fb4aeb479921ceddd44fb1be2810202c516918d623557067cbbfa0b748e7b53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6294, + "startColumn": 15, + "charOffset": 193235, + "charLength": 4, + "snippet": { + "text": "0x85" + } + }, + "contextRegion": { + "startLine": 6292, + "startColumn": 15, + "charOffset": 193180, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\tif (oldProtocol) {\n\t\tmsg.addByte(0x85);\n\t\tmsg.addPosition(from);\n\t\tmsg.addPosition(to);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a25e654b63e9273e54f12d2757375fcd96efdfe78ba9442b2de21cc69bf23750" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x85 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6294, + "startColumn": 15, + "charOffset": 193235, + "charLength": 4, + "snippet": { + "text": "0x85" + } + }, + "contextRegion": { + "startLine": 6292, + "startColumn": 15, + "charOffset": 193180, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\tif (oldProtocol) {\n\t\tmsg.addByte(0x85);\n\t\tmsg.addPosition(from);\n\t\tmsg.addPosition(to);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ec092f8983fd5a596c9780b319c3df85b9fd5f0ec6993e519f56cbcdd44ff98" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6299, + "startColumn": 15, + "charOffset": 193357, + "charLength": 4, + "snippet": { + "text": "0x83" + } + }, + "contextRegion": { + "startLine": 6297, + "startColumn": 15, + "charOffset": 193290, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addByte(static_cast(type));\n\t} else {\n\t\tmsg.addByte(0x83);\n\t\tmsg.addPosition(from);\n\t\tmsg.addByte(MAGIC_EFFECTS_CREATE_DISTANCEEFFECT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad321b6ad90bb0f09c10fbb717bc4f9ad341da801746e57bde0915f3eb3d08e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x83 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6299, + "startColumn": 15, + "charOffset": 193357, + "charLength": 4, + "snippet": { + "text": "0x83" + } + }, + "contextRegion": { + "startLine": 6297, + "startColumn": 15, + "charOffset": 193290, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addByte(static_cast(type));\n\t} else {\n\t\tmsg.addByte(0x83);\n\t\tmsg.addPosition(from);\n\t\tmsg.addByte(MAGIC_EFFECTS_CREATE_DISTANCEEFFECT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62431b8b950896941e57856e488002f240e48b76f3b1782a35fcb3724d949c8b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6311, + "startColumn": 21, + "charOffset": 193853, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6309, + "startColumn": 21, + "charOffset": 193773, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendRestingStatus(uint8_t protection) {\n\tif (oldProtocol || !player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77442e2c95b87236e152cb1d46b0b864e6c7c090a7e430c98d16abc75873aceb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6316, + "startColumn": 14, + "charOffset": 193912, + "charLength": 4, + "snippet": { + "text": "0xA9" + } + }, + "contextRegion": { + "startLine": 6314, + "startColumn": 14, + "charOffset": 193877, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xA9);\n\tmsg.addByte(protection); // 1 / 0\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2d444b69936580ceb7db8a9cbc1195e8946d333e9784e075e7f21f27bd46eed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xA9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6316, + "startColumn": 14, + "charOffset": 193912, + "charLength": 4, + "snippet": { + "text": "0xA9" + } + }, + "contextRegion": { + "startLine": 6314, + "startColumn": 14, + "charOffset": 193877, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xA9);\n\tmsg.addByte(protection); // 1 / 0\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3bcb9d0474153518c2b9cd2fb9948b0dca438eeb44f875f32289da0bf869a8dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6356, + "startColumn": 45, + "charOffset": 195255, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 6354, + "startColumn": 45, + "charOffset": 195137, + "charLength": 4, + "snippet": { + "text": "\nvoid ProtocolGame::sendMagicEffect(const Position &pos, uint16_t type) {\n\tif (!canSee(pos) || (oldProtocol && type > 0xFF)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39c234fd52a0010c63ab5be12f5d7bae237a7d7d60df1782f6dfe8404ba65436" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6362, + "startColumn": 15, + "charOffset": 195333, + "charLength": 4, + "snippet": { + "text": "0x83" + } + }, + "contextRegion": { + "startLine": 6360, + "startColumn": 15, + "charOffset": 195278, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\tif (oldProtocol) {\n\t\tmsg.addByte(0x83);\n\t\tmsg.addPosition(pos);\n\t\tmsg.addByte(static_cast(type));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d95c084015d37d2270fdc5c4b59f245ef6c11b9f4c0bdd7aca20aadf3c5f8cc6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x83 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6362, + "startColumn": 15, + "charOffset": 195333, + "charLength": 4, + "snippet": { + "text": "0x83" + } + }, + "contextRegion": { + "startLine": 6360, + "startColumn": 15, + "charOffset": 195278, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\tif (oldProtocol) {\n\t\tmsg.addByte(0x83);\n\t\tmsg.addPosition(pos);\n\t\tmsg.addByte(static_cast(type));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "381c45b5648533900eabc7e90a86fd85babb6979d2d1fdca03541d3f1a20c506" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6366, + "startColumn": 15, + "charOffset": 195431, + "charLength": 4, + "snippet": { + "text": "0x83" + } + }, + "contextRegion": { + "startLine": 6364, + "startColumn": 15, + "charOffset": 195364, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addByte(static_cast(type));\n\t} else {\n\t\tmsg.addByte(0x83);\n\t\tmsg.addPosition(pos);\n\t\tmsg.addByte(MAGIC_EFFECTS_CREATE_EFFECT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82bcdfd151c383738fb8ffd5653bd838c83fc6f31a35210ae7a68ed05be8ebfc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x83 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6366, + "startColumn": 15, + "charOffset": 195431, + "charLength": 4, + "snippet": { + "text": "0x83" + } + }, + "contextRegion": { + "startLine": 6364, + "startColumn": 15, + "charOffset": 195364, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addByte(static_cast(type));\n\t} else {\n\t\tmsg.addByte(0x83);\n\t\tmsg.addPosition(pos);\n\t\tmsg.addByte(MAGIC_EFFECTS_CREATE_EFFECT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ebe08ce005e897509f861a9f9dc524a302fbc111abac0a09f97acaefe235191" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6376, + "startColumn": 28, + "charOffset": 195707, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 6374, + "startColumn": 28, + "charOffset": 195604, + "charLength": 4, + "snippet": { + "text": "\nvoid ProtocolGame::removeMagicEffect(const Position &pos, uint16_t type) {\n\tif (oldProtocol && type > 0xFF) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d799aac0420451a0b222f745a8d50a0ff6c07ffb0d56a3bb1e6e22bfa4421e8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6380, + "startColumn": 14, + "charOffset": 195762, + "charLength": 4, + "snippet": { + "text": "0x84" + } + }, + "contextRegion": { + "startLine": 6378, + "startColumn": 14, + "charOffset": 195725, + "charLength": 4, + "snippet": { + "text": "\t}\n\tNetworkMessage msg;\n\tmsg.addByte(0x84);\n\tmsg.addPosition(pos);\n\tif (oldProtocol) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95a109da00264300aa6cdd41c605e5ad79696b145748bb50e88fad960fb0d1a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x84 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6380, + "startColumn": 14, + "charOffset": 195762, + "charLength": 4, + "snippet": { + "text": "0x84" + } + }, + "contextRegion": { + "startLine": 6378, + "startColumn": 14, + "charOffset": 195725, + "charLength": 4, + "snippet": { + "text": "\t}\n\tNetworkMessage msg;\n\tmsg.addByte(0x84);\n\tmsg.addPosition(pos);\n\tif (oldProtocol) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74ef791cc581b61f2a0e98e8a44b8b4a8dcc435d9b0594805c24c7af4e9b6422" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6390, + "startColumn": 65, + "charOffset": 195989, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 6388, + "startColumn": 65, + "charOffset": 195922, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendCreatureHealth(std::shared_ptr creature) {\n\tif (creature->isHealthHidden()) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33d7f8768dfdf4ec7db6468fbbd3d97194549a1c188e8fd63598ed4c8bbbc05e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6396, + "startColumn": 14, + "charOffset": 196084, + "charLength": 4, + "snippet": { + "text": "0x8C" + } + }, + "contextRegion": { + "startLine": 6394, + "startColumn": 14, + "charOffset": 196049, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x8C);\n\tmsg.add(creature->getID());\n\tif (creature->isHealthHidden()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93cbc5df9cc75a12147a1a393504a6865fb62a1f6645f83c0e65d856a3f7d5ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x8C is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6396, + "startColumn": 14, + "charOffset": 196084, + "charLength": 4, + "snippet": { + "text": "0x8C" + } + }, + "contextRegion": { + "startLine": 6394, + "startColumn": 14, + "charOffset": 196049, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x8C);\n\tmsg.add(creature->getID());\n\tif (creature->isHealthHidden()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c9385d57099fa71b20e8bbb71fe92a1228743a5c8005588e7b5af753e7f78ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6399, + "startColumn": 15, + "charOffset": 196179, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6397, + "startColumn": 15, + "charOffset": 196091, + "charLength": 4, + "snippet": { + "text": "\tmsg.add(creature->getID());\n\tif (creature->isHealthHidden()) {\n\t\tmsg.addByte(0x00);\n\t} else {\n\t\tmsg.addByte(static_cast(std::min(100, std::ceil((static_cast(creature->getHealth()) / std::max(creature->getMaxHealth(), 1)) * 100))));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aae342ef37810e6b9ffef2ec66cb7d8e6818320a55006301050dd86ba166572f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6401, + "startColumn": 53, + "charOffset": 196248, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 6399, + "startColumn": 53, + "charOffset": 196165, + "charLength": 3, + "snippet": { + "text": "\t\tmsg.addByte(0x00);\n\t} else {\n\t\tmsg.addByte(static_cast(std::min(100, std::ceil((static_cast(creature->getHealth()) / std::max(creature->getMaxHealth(), 1)) * 100))));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd67cfcbf9a3fee95f83223515a7f0923002d99807388793f4b69e965df78d41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6401, + "startColumn": 53, + "charOffset": 196248, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 6399, + "startColumn": 53, + "charOffset": 196165, + "charLength": 3, + "snippet": { + "text": "\t\tmsg.addByte(0x00);\n\t} else {\n\t\tmsg.addByte(static_cast(std::min(100, std::ceil((static_cast(creature->getHealth()) / std::max(creature->getMaxHealth(), 1)) * 100))));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65e68243ea7bd061ae08a37aece86cf3b5c899871d8adcf4edf793703d884021" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6401, + "startColumn": 114, + "charOffset": 196309, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 6399, + "startColumn": 114, + "charOffset": 196165, + "charLength": 3, + "snippet": { + "text": "\t\tmsg.addByte(0x00);\n\t} else {\n\t\tmsg.addByte(static_cast(std::min(100, std::ceil((static_cast(creature->getHealth()) / std::max(creature->getMaxHealth(), 1)) * 100))));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f7acc2445b455ea9e2d470ad4ce4403f506457a684280cdff95b3caa412c245" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6401, + "startColumn": 164, + "charOffset": 196359, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 6399, + "startColumn": 164, + "charOffset": 196165, + "charLength": 3, + "snippet": { + "text": "\t\tmsg.addByte(0x00);\n\t} else {\n\t\tmsg.addByte(static_cast(std::min(100, std::ceil((static_cast(creature->getHealth()) / std::max(creature->getMaxHealth(), 1)) * 100))));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60a3fb2bffbe275c87decec3b51ce0208badd54609b77263eefec8a544621d50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6401, + "startColumn": 164, + "charOffset": 196359, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 6399, + "startColumn": 164, + "charOffset": 196165, + "charLength": 3, + "snippet": { + "text": "\t\tmsg.addByte(0x00);\n\t} else {\n\t\tmsg.addByte(static_cast(std::min(100, std::ceil((static_cast(creature->getHealth()) / std::max(creature->getMaxHealth(), 1)) * 100))));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e84c79a2ebae8bb2af1df60cf7c9839b0760feb8d4a19f38725cc220d6db135f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6407, + "startColumn": 70, + "charOffset": 196471, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 6405, + "startColumn": 70, + "charOffset": 196399, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendPartyCreatureUpdate(std::shared_ptr target) {\n\tif (!player || oldProtocol) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c93df29b3061389f07bc4308423175d5bc0cc5a4254631a11545b5950703ded" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6408, + "startColumn": 6, + "charOffset": 196486, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6406, + "startColumn": 6, + "charOffset": 196401, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendPartyCreatureUpdate(std::shared_ptr target) {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11572932cc7dc43e66e6765cb778b64e2224e4db7b9a64c7fce935952b33f595" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'known' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6412, + "startColumn": 7, + "charOffset": 196532, + "charLength": 5, + "snippet": { + "text": "known" + } + }, + "contextRegion": { + "startLine": 6410, + "startColumn": 7, + "charOffset": 196522, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tbool known;\n\tuint32_t removedKnown = 0;\n\tuint32_t cid = target->getID();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd88c24f81103ce7be272dbc3364d5017ef7fa77d6d786b676b7b8a2060fa436" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6418, + "startColumn": 14, + "charOffset": 196684, + "charLength": 4, + "snippet": { + "text": "0x8B" + } + }, + "contextRegion": { + "startLine": 6416, + "startColumn": 14, + "charOffset": 196649, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x8B);\n\tmsg.add(cid);\n\tmsg.addByte(0); // creature update" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61f2c748c931c8797bc486339058790637b5bb22fb10dc29c4116287efafb3d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x8B is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6418, + "startColumn": 14, + "charOffset": 196684, + "charLength": 4, + "snippet": { + "text": "0x8B" + } + }, + "contextRegion": { + "startLine": 6416, + "startColumn": 14, + "charOffset": 196649, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x8B);\n\tmsg.add(cid);\n\tmsg.addByte(0); // creature update" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba064369a341fbe1caf81a928f28ecca71dbd9fd7e8c606dc2ed2f558f463bf9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6425, + "startColumn": 70, + "charOffset": 196899, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 6423, + "startColumn": 70, + "charOffset": 196827, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendPartyCreatureShield(std::shared_ptr target) {\n\tuint32_t cid = target->getID();\n\tif (!knownCreatureSet.contains(cid)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7dae03ccbaa4a569c197eafba1f7e211614559b7fe2d410ac2428142266b4abc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6433, + "startColumn": 14, + "charOffset": 197065, + "charLength": 4, + "snippet": { + "text": "0x91" + } + }, + "contextRegion": { + "startLine": 6431, + "startColumn": 14, + "charOffset": 197030, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x91);\n\tmsg.add(cid);\n\tmsg.addByte(player->getPartyShield(target->getPlayer()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5325b9b1bde69f059005a33b9921adf57e8e0f8990ec30a847a5782382033b27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x91 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6433, + "startColumn": 14, + "charOffset": 197065, + "charLength": 4, + "snippet": { + "text": "0x91" + } + }, + "contextRegion": { + "startLine": 6431, + "startColumn": 14, + "charOffset": 197030, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x91);\n\tmsg.add(cid);\n\tmsg.addByte(player->getPartyShield(target->getPlayer()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73d855d45b51404310bd077f4db1b5681ddd07bd3bd24379481d8f2342b8f1b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6439, + "startColumn": 69, + "charOffset": 197254, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 6437, + "startColumn": 69, + "charOffset": 197183, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendPartyCreatureSkull(std::shared_ptr target) {\n\tif (g_game().getWorldType() != WORLD_TYPE_PVP) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5626fcad244ab582a9066bf2a20b9cf0139dec20e4d88d37be08b927da7fedb2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6451, + "startColumn": 14, + "charOffset": 197484, + "charLength": 4, + "snippet": { + "text": "0x90" + } + }, + "contextRegion": { + "startLine": 6449, + "startColumn": 14, + "charOffset": 197449, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x90);\n\tmsg.add(cid);\n\tmsg.addByte(player->getSkullClient(target));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97ee87343e645ff418eeda892ca35e607ada8a9680e3a02a979da6705fc93dc8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x90 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6451, + "startColumn": 14, + "charOffset": 197484, + "charLength": 4, + "snippet": { + "text": "0x90" + } + }, + "contextRegion": { + "startLine": 6449, + "startColumn": 14, + "charOffset": 197449, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x90);\n\tmsg.add(cid);\n\tmsg.addByte(player->getSkullClient(target));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "879b8d85f3030273b626a09f023e4798c0f5c5e356d742161574a2f818e4833d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6457, + "startColumn": 70, + "charOffset": 197661, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 6455, + "startColumn": 70, + "charOffset": 197589, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendPartyCreatureHealth(std::shared_ptr target, uint8_t healthPercent) {\n\tuint32_t cid = target->getID();\n\tif (!knownCreatureSet.contains(cid)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "216bd6b30ca84562440de5c13d1166a748bbfbd94ba0715a0c91234cc6b41b91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6465, + "startColumn": 14, + "charOffset": 197850, + "charLength": 4, + "snippet": { + "text": "0x8C" + } + }, + "contextRegion": { + "startLine": 6463, + "startColumn": 14, + "charOffset": 197815, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x8C);\n\tmsg.add(cid);\n\tmsg.addByte(std::min(100, healthPercent));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d53820f1cc837ecc23b39f09fa338ea7d46abb0297f3f63d88d7bf8205217eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x8C is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6465, + "startColumn": 14, + "charOffset": 197850, + "charLength": 4, + "snippet": { + "text": "0x8C" + } + }, + "contextRegion": { + "startLine": 6463, + "startColumn": 14, + "charOffset": 197815, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x8C);\n\tmsg.add(cid);\n\tmsg.addByte(std::min(100, healthPercent));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0fae2f47d52c2e36668696c76f323b2869cc6b28378f9e0e3f24645be56b6c82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6467, + "startColumn": 32, + "charOffset": 197913, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 6465, + "startColumn": 32, + "charOffset": 197837, + "charLength": 3, + "snippet": { + "text": "\tmsg.addByte(0x8C);\n\tmsg.add(cid);\n\tmsg.addByte(std::min(100, healthPercent));\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42fbdf7e5b25f468aed34af7f42c14aef9433a6980a7fbcc35c09898a7ad0455" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6471, + "startColumn": 64, + "charOffset": 198028, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 6469, + "startColumn": 64, + "charOffset": 197962, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendPartyPlayerMana(std::shared_ptr target, uint8_t manaPercent) {\n\tuint32_t cid = target->getID();\n\tif (!knownCreatureSet.contains(cid)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e80b45bf78aaf92674a42f9bce1c7440098bec9b1f75d27e24d6f895c3f5e739" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6482, + "startColumn": 14, + "charOffset": 198239, + "charLength": 4, + "snippet": { + "text": "0x8B" + } + }, + "contextRegion": { + "startLine": 6480, + "startColumn": 14, + "charOffset": 198204, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x8B);\n\tmsg.add(cid);\n\tmsg.addByte(11); // mana percent" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43bf45482293549ef5488bb81763d21b0870d6bf6a079f7a3596b07e8ebf93c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x8B is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6482, + "startColumn": 14, + "charOffset": 198239, + "charLength": 4, + "snippet": { + "text": "0x8B" + } + }, + "contextRegion": { + "startLine": 6480, + "startColumn": 14, + "charOffset": 198204, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x8B);\n\tmsg.add(cid);\n\tmsg.addByte(11); // mana percent" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "689bcc7dec94425cf5e1851d3fa35d4ebd9b038ea1bc2847a1fb9480d360f247" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "11 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6484, + "startColumn": 14, + "charOffset": 198284, + "charLength": 2, + "snippet": { + "text": "11" + } + }, + "contextRegion": { + "startLine": 6482, + "startColumn": 14, + "charOffset": 198226, + "charLength": 2, + "snippet": { + "text": "\tmsg.addByte(0x8B);\n\tmsg.add(cid);\n\tmsg.addByte(11); // mana percent\n\tmsg.addByte(std::min(100, manaPercent));\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2d13f29771caf756d57c548e81e881fdc88853f8c203902f4ddb04e31fe4b79" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6485, + "startColumn": 32, + "charOffset": 198336, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 6483, + "startColumn": 32, + "charOffset": 198246, + "charLength": 3, + "snippet": { + "text": "\tmsg.add(cid);\n\tmsg.addByte(11); // mana percent\n\tmsg.addByte(std::min(100, manaPercent));\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69c364dfdc421970effcf4e54828edafbc8b572d3867724816223121c7dc151f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6489, + "startColumn": 74, + "charOffset": 198459, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 6487, + "startColumn": 74, + "charOffset": 198383, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendPartyCreatureShowStatus(std::shared_ptr target, bool showStatus) {\n\tuint32_t cid = target->getID();\n\tif (!knownCreatureSet.contains(cid)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0df9a2258b37789f0fba2ce177766be8d5fd00f24e0cc26635134ee9fd94687" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6500, + "startColumn": 14, + "charOffset": 198666, + "charLength": 4, + "snippet": { + "text": "0x8B" + } + }, + "contextRegion": { + "startLine": 6498, + "startColumn": 14, + "charOffset": 198631, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x8B);\n\tmsg.add(cid);\n\tmsg.addByte(12); // show status" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c30c63abc9326c9fa7eb695134854687ac03df1fe06b66bacb564a16a9b1e0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x8B is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6500, + "startColumn": 14, + "charOffset": 198666, + "charLength": 4, + "snippet": { + "text": "0x8B" + } + }, + "contextRegion": { + "startLine": 6498, + "startColumn": 14, + "charOffset": 198631, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x8B);\n\tmsg.add(cid);\n\tmsg.addByte(12); // show status" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "686727a3b0728807d6b3c79dce5a9a7d6838c8a8156a7d0a2008572cb5e8b1d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "12 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6502, + "startColumn": 14, + "charOffset": 198711, + "charLength": 2, + "snippet": { + "text": "12" + } + }, + "contextRegion": { + "startLine": 6500, + "startColumn": 14, + "charOffset": 198653, + "charLength": 2, + "snippet": { + "text": "\tmsg.addByte(0x8B);\n\tmsg.add(cid);\n\tmsg.addByte(12); // show status\n\tmsg.addByte((showStatus ? 0x01 : 0x00));\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e15eef4b607d715b6420de40f034f5cb87275968bd4be89854a25b186057964" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6507, + "startColumn": 68, + "charOffset": 198870, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 6505, + "startColumn": 68, + "charOffset": 198800, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendPartyPlayerVocation(std::shared_ptr target) {\n\tif (!target) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "187278909d0a298061189f2d21df870719d02887437c01599cf7a231fd57f455" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6508, + "startColumn": 6, + "charOffset": 198885, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6506, + "startColumn": 6, + "charOffset": 198802, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendPartyPlayerVocation(std::shared_ptr target) {\n\tif (!target) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e64e6179d34ce79b28dcc79098ab19e5de8ae32f6c72cdf29a257183edcc2a70" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6523, + "startColumn": 14, + "charOffset": 199100, + "charLength": 4, + "snippet": { + "text": "0x8B" + } + }, + "contextRegion": { + "startLine": 6521, + "startColumn": 14, + "charOffset": 199065, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x8B);\n\tmsg.add(cid);\n\tmsg.addByte(13); // vocation" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b336c93bc18af8f49bb423af804d6de0f85ecf4ee0e944fc133c75067ec0863b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x8B is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6523, + "startColumn": 14, + "charOffset": 199100, + "charLength": 4, + "snippet": { + "text": "0x8B" + } + }, + "contextRegion": { + "startLine": 6521, + "startColumn": 14, + "charOffset": 199065, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x8B);\n\tmsg.add(cid);\n\tmsg.addByte(13); // vocation" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6af373abe0c24c47b783b6c326ae571035de1263d83e1639aee74b18c7fa5454" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "13 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6525, + "startColumn": 14, + "charOffset": 199145, + "charLength": 2, + "snippet": { + "text": "13" + } + }, + "contextRegion": { + "startLine": 6523, + "startColumn": 14, + "charOffset": 199087, + "charLength": 2, + "snippet": { + "text": "\tmsg.addByte(0x8B);\n\tmsg.add(cid);\n\tmsg.addByte(13); // vocation\n\tmsg.addByte(target->getVocation()->getClientId());\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fecab0d601466774027b5dbd8fa62c64a6d7e64efdbbb9d727e2e87dbc4504c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6530, + "startColumn": 63, + "charOffset": 199306, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 6528, + "startColumn": 63, + "charOffset": 199241, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendPlayerVocation(std::shared_ptr target) {\n\tif (!player || !target || oldProtocol) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf16be7d76046c20d6c947477a3487a8e5a4e01044cab78369ff68dde8e6ef07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6531, + "startColumn": 6, + "charOffset": 199321, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6529, + "startColumn": 6, + "charOffset": 199243, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendPlayerVocation(std::shared_ptr target) {\n\tif (!player || !target || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39237276ea065eb310549a3449b74690735781115818fbf6dca29562fd637525" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6531, + "startColumn": 17, + "charOffset": 199332, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6529, + "startColumn": 17, + "charOffset": 199243, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendPlayerVocation(std::shared_ptr target) {\n\tif (!player || !target || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a34fabf87ada7bbcc60d5ca584ada831fb9d55b6014f5eb5e8df23bb938490d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6536, + "startColumn": 14, + "charOffset": 199406, + "charLength": 4, + "snippet": { + "text": "0x8B" + } + }, + "contextRegion": { + "startLine": 6534, + "startColumn": 14, + "charOffset": 199371, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x8B);\n\tmsg.add(target->getID());\n\tmsg.addByte(13); // vocation" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "885373d7a8f80dc55060400dca847db6d6538f6358e2aad1d6b28169bb78ed22" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x8B is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6536, + "startColumn": 14, + "charOffset": 199406, + "charLength": 4, + "snippet": { + "text": "0x8B" + } + }, + "contextRegion": { + "startLine": 6534, + "startColumn": 14, + "charOffset": 199371, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x8B);\n\tmsg.add(target->getID());\n\tmsg.addByte(13); // vocation" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54bacb86292a388e1d1e928d7bdf0a9c0d57f7505fad36fe0cd2be40b4aa4c61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "13 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6538, + "startColumn": 14, + "charOffset": 199463, + "charLength": 2, + "snippet": { + "text": "13" + } + }, + "contextRegion": { + "startLine": 6536, + "startColumn": 14, + "charOffset": 199393, + "charLength": 2, + "snippet": { + "text": "\tmsg.addByte(0x8B);\n\tmsg.add(target->getID());\n\tmsg.addByte(13); // vocation\n\tmsg.addByte(target->getVocation()->getClientId());\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "643c9e22217a1333f6c735f3ce18f841139179210e37cd23edfe2e9da5e498eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6545, + "startColumn": 14, + "charOffset": 199656, + "charLength": 4, + "snippet": { + "text": "0x15" + } + }, + "contextRegion": { + "startLine": 6543, + "startColumn": 14, + "charOffset": 199562, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendFYIBox(const std::string &message) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x15);\n\tmsg.addString(message, \"ProtocolGame::sendFYIBox - message\");\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1253f10159e09f1d0743b83c76c63e39dc4a49459526c69fcb4eb6ca36a16e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x15 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6545, + "startColumn": 14, + "charOffset": 199656, + "charLength": 4, + "snippet": { + "text": "0x15" + } + }, + "contextRegion": { + "startLine": 6543, + "startColumn": 14, + "charOffset": 199562, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendFYIBox(const std::string &message) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x15);\n\tmsg.addString(message, \"ProtocolGame::sendFYIBox - message\");\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d01d94a3a8c81229f43684a40e6e8f51a35cfdd4e2a1e3ee0ffc9dff58ae936" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6553, + "startColumn": 14, + "charOffset": 199859, + "charLength": 4, + "snippet": { + "text": "0x64" + } + }, + "contextRegion": { + "startLine": 6551, + "startColumn": 14, + "charOffset": 199764, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendMapDescription(const Position &pos) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x64);\n\tmsg.addPosition(player->getPosition());\n\tGetMapDescription(pos.x - MAP_MAX_CLIENT_VIEW_PORT_X, pos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, pos.z, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8f491a78b57f4d339e696f4e438337bc6c80ba7aad7c9655042944241947d04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x64 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6553, + "startColumn": 14, + "charOffset": 199859, + "charLength": 4, + "snippet": { + "text": "0x64" + } + }, + "contextRegion": { + "startLine": 6551, + "startColumn": 14, + "charOffset": 199764, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendMapDescription(const Position &pos) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x64);\n\tmsg.addPosition(player->getPosition());\n\tGetMapDescription(pos.x - MAP_MAX_CLIENT_VIEW_PORT_X, pos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, pos.z, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13d3046cbb8c18d370d5b4b39d5676e3cdebc161dadc261bc463a0c5b6b87ee5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6565, + "startColumn": 14, + "charOffset": 200291, + "charLength": 4, + "snippet": { + "text": "0x6A" + } + }, + "contextRegion": { + "startLine": 6563, + "startColumn": 14, + "charOffset": 200256, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x6A);\n\tmsg.addPosition(pos);\n\tmsg.addByte(static_cast(stackpos));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbcc0c2c4e35079efa03d4553f8077858ebd47f6aa9333a63f2fc16fd37fa73f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x6A is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6565, + "startColumn": 14, + "charOffset": 200291, + "charLength": 4, + "snippet": { + "text": "0x6A" + } + }, + "contextRegion": { + "startLine": 6563, + "startColumn": 14, + "charOffset": 200256, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x6A);\n\tmsg.addPosition(pos);\n\tmsg.addByte(static_cast(stackpos));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05f412193f8b7680322a3e19caf11328a2157e75b50caadb05726775ba7e1515" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6568, + "startColumn": 15, + "charOffset": 200381, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 6566, + "startColumn": 15, + "charOffset": 200298, + "charLength": 4, + "snippet": { + "text": "\tmsg.addPosition(pos);\n\tmsg.addByte(static_cast(stackpos));\n\tAddItem(msg, item);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1fb51f189249b44e3a4cf4fbea2d29e0753a537c66d5bd80569354eadffa01bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6578, + "startColumn": 14, + "charOffset": 200595, + "charLength": 4, + "snippet": { + "text": "0x6B" + } + }, + "contextRegion": { + "startLine": 6576, + "startColumn": 14, + "charOffset": 200560, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x6B);\n\tmsg.addPosition(pos);\n\tmsg.addByte(static_cast(stackpos));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0cdbc7c2d50620516a6e8c8fd5440d7b46b8355e56846f098815bedd975a9799" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x6B is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6578, + "startColumn": 14, + "charOffset": 200595, + "charLength": 4, + "snippet": { + "text": "0x6B" + } + }, + "contextRegion": { + "startLine": 6576, + "startColumn": 14, + "charOffset": 200560, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x6B);\n\tmsg.addPosition(pos);\n\tmsg.addByte(static_cast(stackpos));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60e140c74adc290e7d1962adf475be772f608b14587add934a1a884d13200396" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6581, + "startColumn": 15, + "charOffset": 200685, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 6579, + "startColumn": 15, + "charOffset": 200602, + "charLength": 4, + "snippet": { + "text": "\tmsg.addPosition(pos);\n\tmsg.addByte(static_cast(stackpos));\n\tAddItem(msg, item);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1293c0b1b743d44f076def38ecb31f253005aee8da35f89e2e8bfbfd2b3d3c31" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'creature' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6595, + "startColumn": 115, + "charOffset": 201041, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 6593, + "startColumn": 115, + "charOffset": 200924, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendUpdateTileCreature(const Position &pos, uint32_t stackpos, const std::shared_ptr creature) {\n\tif (!canSee(pos)) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b6d4efc69ed5bc7db065f00ba7dfbc585b40d46fb054e62bf46ebbab347346f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6601, + "startColumn": 14, + "charOffset": 201122, + "charLength": 4, + "snippet": { + "text": "0x6B" + } + }, + "contextRegion": { + "startLine": 6599, + "startColumn": 14, + "charOffset": 201087, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x6B);\n\tmsg.addPosition(pos);\n\tmsg.addByte(static_cast(stackpos));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39057e406a69de9665d66147802da4c3945f7441e36cb7806363597bd0e136bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x6B is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6601, + "startColumn": 14, + "charOffset": 201122, + "charLength": 4, + "snippet": { + "text": "0x6B" + } + }, + "contextRegion": { + "startLine": 6599, + "startColumn": 14, + "charOffset": 201087, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x6B);\n\tmsg.addPosition(pos);\n\tmsg.addByte(static_cast(stackpos));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79a1f0cda5cad9e8647705bb22bb4d0e00ca2b30721cb4730b232c96267577ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'known' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6605, + "startColumn": 7, + "charOffset": 201205, + "charLength": 5, + "snippet": { + "text": "known" + } + }, + "contextRegion": { + "startLine": 6603, + "startColumn": 7, + "charOffset": 201152, + "charLength": 5, + "snippet": { + "text": "\tmsg.addByte(static_cast(stackpos));\n\n\tbool known;\n\tuint32_t removedKnown;\n\tcheckCreatureAsKnown(creature->getID(), known, removedKnown);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e381b3827054a1aff96531a9a4d8a808338d116e91140fb53ae4c3d55c20a5e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'removedKnown' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6606, + "startColumn": 11, + "charOffset": 201222, + "charLength": 12, + "snippet": { + "text": "removedKnown" + } + }, + "contextRegion": { + "startLine": 6604, + "startColumn": 11, + "charOffset": 201198, + "charLength": 12, + "snippet": { + "text": "\n\tbool known;\n\tuint32_t removedKnown;\n\tcheckCreatureAsKnown(creature->getID(), known, removedKnown);\n\tAddCreature(msg, creature, false, removedKnown);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f92ac5c269d83fa9bbf54d1eecf2616519b2083dea74f13a21042ec6936a9ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6612, + "startColumn": 57, + "charOffset": 201435, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 6610, + "startColumn": 57, + "charOffset": 201376, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendUpdateTile(std::shared_ptr tile, const Position &pos) {\n\tif (!canSee(pos)) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8019db26c47b1993d1b81d11013cee17cb99ceefa1a70594f0f9cfad0fedf60a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6618, + "startColumn": 14, + "charOffset": 201533, + "charLength": 4, + "snippet": { + "text": "0x69" + } + }, + "contextRegion": { + "startLine": 6616, + "startColumn": 14, + "charOffset": 201498, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x69);\n\tmsg.addPosition(pos);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1b4f849753a7fec0d49bd61bfb4c65c78959e0c7511edf94d9d5fad8222fbe7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x69 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6618, + "startColumn": 14, + "charOffset": 201533, + "charLength": 4, + "snippet": { + "text": "0x69" + } + }, + "contextRegion": { + "startLine": 6616, + "startColumn": 14, + "charOffset": 201498, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x69);\n\tmsg.addPosition(pos);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb035f07f9999ffa8844cf841a31ca2d042aa1b28190550dd914c519ebd48e8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6623, + "startColumn": 15, + "charOffset": 201624, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6621, + "startColumn": 15, + "charOffset": 201564, + "charLength": 4, + "snippet": { + "text": "\tif (tile) {\n\t\tGetTileDescription(tile, msg);\n\t\tmsg.addByte(0x00);\n\t\tmsg.addByte(0xFF);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de71efdfd6d7b3264cae1ec6c742428631fb982fb57d43df3945a5d84e5a93d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6624, + "startColumn": 15, + "charOffset": 201645, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 6622, + "startColumn": 15, + "charOffset": 201577, + "charLength": 4, + "snippet": { + "text": "\t\tGetTileDescription(tile, msg);\n\t\tmsg.addByte(0x00);\n\t\tmsg.addByte(0xFF);\n\t} else {\n\t\tmsg.addByte(0x01);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "420220b35f46a038602b290882e603e7363d3ae4610039d9109e84a986ba59fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6624, + "startColumn": 15, + "charOffset": 201645, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 6622, + "startColumn": 15, + "charOffset": 201577, + "charLength": 4, + "snippet": { + "text": "\t\tGetTileDescription(tile, msg);\n\t\tmsg.addByte(0x00);\n\t\tmsg.addByte(0xFF);\n\t} else {\n\t\tmsg.addByte(0x01);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79a8a9afc85f33a7db64708278e5e34731300e918032fdb19fab43aa9d08a9c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6626, + "startColumn": 15, + "charOffset": 201676, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 6624, + "startColumn": 15, + "charOffset": 201631, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addByte(0xFF);\n\t} else {\n\t\tmsg.addByte(0x01);\n\t\tmsg.addByte(0xFF);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "036eaf56251ab369b074c266c889433dffe2ec4ddbc3612a9b658b84c124e1fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6627, + "startColumn": 15, + "charOffset": 201697, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 6625, + "startColumn": 15, + "charOffset": 201652, + "charLength": 4, + "snippet": { + "text": "\t} else {\n\t\tmsg.addByte(0x01);\n\t\tmsg.addByte(0xFF);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe8ca648127e904d33c5f5c5814c6cdc9451402264c93ce1e49959fe5199ce6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6627, + "startColumn": 15, + "charOffset": 201697, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 6625, + "startColumn": 15, + "charOffset": 201652, + "charLength": 4, + "snippet": { + "text": "\t} else {\n\t\tmsg.addByte(0x01);\n\t\tmsg.addByte(0xFF);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f487b3e18048bf1495f2ad44342c5140d324e5314aeb8572957c9eaac823aaea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6634, + "startColumn": 6, + "charOffset": 201790, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6632, + "startColumn": 6, + "charOffset": 201737, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendPendingStateEntered() {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f14e67f7c93680656b8f0adab799285837fd2d3f8c6b5479d4e7925d00de321" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6639, + "startColumn": 14, + "charOffset": 201864, + "charLength": 4, + "snippet": { + "text": "0x0A" + } + }, + "contextRegion": { + "startLine": 6637, + "startColumn": 14, + "charOffset": 201829, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x0A);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e43475cfa51e6ee75b9f7f8c251af39eb6d0c7e6229e3089ad4c699e436a1be8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x0A is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6639, + "startColumn": 14, + "charOffset": 201864, + "charLength": 4, + "snippet": { + "text": "0x0A" + } + }, + "contextRegion": { + "startLine": 6637, + "startColumn": 14, + "charOffset": 201829, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x0A);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f667843fc870c44ddd4865bb7824e786c5b03e03694271b710f1657be03948b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6645, + "startColumn": 14, + "charOffset": 201973, + "charLength": 4, + "snippet": { + "text": "0x0F" + } + }, + "contextRegion": { + "startLine": 6643, + "startColumn": 14, + "charOffset": 201901, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendEnterWorld() {\n\tNetworkMessage msg;\n\tmsg.addByte(0x0F);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c89517f498a877790108f6c40d74788855f582c6dec7eb5aa98cd47952fecf05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x0F is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6645, + "startColumn": 14, + "charOffset": 201973, + "charLength": 4, + "snippet": { + "text": "0x0F" + } + }, + "contextRegion": { + "startLine": 6643, + "startColumn": 14, + "charOffset": 201901, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendEnterWorld() {\n\tNetworkMessage msg;\n\tmsg.addByte(0x0F);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a3933c36d2b53fe4e599522ba2f9abf02ff86ad78d868c2ed96afb8129d4273" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6651, + "startColumn": 14, + "charOffset": 202082, + "charLength": 4, + "snippet": { + "text": "0xA7" + } + }, + "contextRegion": { + "startLine": 6649, + "startColumn": 14, + "charOffset": 202010, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendFightModes() {\n\tNetworkMessage msg;\n\tmsg.addByte(0xA7);\n\tmsg.addByte(player->fightMode);\n\tmsg.addByte(player->chaseMode);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1451632de5496be983a7026fdee553808a0655c71b6a24c20d65cb7b4908c3ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xA7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6651, + "startColumn": 14, + "charOffset": 202082, + "charLength": 4, + "snippet": { + "text": "0xA7" + } + }, + "contextRegion": { + "startLine": 6649, + "startColumn": 14, + "charOffset": 202010, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendFightModes() {\n\tNetworkMessage msg;\n\tmsg.addByte(0xA7);\n\tmsg.addByte(player->fightMode);\n\tmsg.addByte(player->chaseMode);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0cb4d1dbd56e6048c67627c065bcfaa27eb84ff4153a8a55a38ee09fec36cc59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6653, + "startColumn": 14, + "charOffset": 202135, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 6651, + "startColumn": 14, + "charOffset": 202069, + "charLength": 6, + "snippet": { + "text": "\tmsg.addByte(0xA7);\n\tmsg.addByte(player->fightMode);\n\tmsg.addByte(player->chaseMode);\n\tmsg.addByte(player->secureMode);\n\tmsg.addByte(PVP_MODE_DOVE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0cbc2efc79006e18a165b565da28e8301a7b6e19851b18ef81f0a0f365a82ee7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6654, + "startColumn": 14, + "charOffset": 202168, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 6652, + "startColumn": 14, + "charOffset": 202089, + "charLength": 6, + "snippet": { + "text": "\tmsg.addByte(player->fightMode);\n\tmsg.addByte(player->chaseMode);\n\tmsg.addByte(player->secureMode);\n\tmsg.addByte(PVP_MODE_DOVE);\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "566d0ab8bd19fb094cb60ef5a22d74a2a4cab5596e732c04663116637176dba8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6665, + "startColumn": 14, + "charOffset": 202358, + "charLength": 4, + "snippet": { + "text": "0x1A" + } + }, + "contextRegion": { + "startLine": 6663, + "startColumn": 14, + "charOffset": 202323, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x1A);\n\tmsg.addByte(0x00); // 0x01 = DISABLE bug report\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c36341b7aa41a9dc234ea57c9ea3e197138dda0d6dbbd11c70b8eb038698e95b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x1A is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6665, + "startColumn": 14, + "charOffset": 202358, + "charLength": 4, + "snippet": { + "text": "0x1A" + } + }, + "contextRegion": { + "startLine": 6663, + "startColumn": 14, + "charOffset": 202323, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x1A);\n\tmsg.addByte(0x00); // 0x01 = DISABLE bug report\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2950b31f8b4603d0ef3b025eedd04810ceb688cbf6c4b5d1511ea7d8d27623e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6666, + "startColumn": 14, + "charOffset": 202378, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6664, + "startColumn": 14, + "charOffset": 202324, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\tmsg.addByte(0x1A);\n\tmsg.addByte(0x00); // 0x01 = DISABLE bug report\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "486823f308311ba11e39bdab7d0a40dc45ef4820cdd8bfafa2b5356830c96c8d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'sendAddCreature' has cognitive complexity of 44 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6670, + "startColumn": 20, + "charOffset": 202463, + "charLength": 15, + "snippet": { + "text": "sendAddCreature" + } + }, + "contextRegion": { + "startLine": 6668, + "startColumn": 20, + "charOffset": 202441, + "charLength": 15, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendAddCreature(std::shared_ptr creature, const Position &pos, int32_t stackpos, bool isLogin) {\n\tif (!canSee(pos)) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "363583fbb3d233d3c0665efa0fbea83eb86bdca9c68af997481f0eb6dc380945" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6670, + "startColumn": 62, + "charOffset": 202505, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 6668, + "startColumn": 62, + "charOffset": 202441, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendAddCreature(std::shared_ptr creature, const Position &pos, int32_t stackpos, bool isLogin) {\n\tif (!canSee(pos)) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c243e63949716fee726d708c5db3514f541ca94f93adc6dc8f279908acb04a89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6676, + "startColumn": 19, + "charOffset": 202650, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 6674, + "startColumn": 19, + "charOffset": 202604, + "charLength": 2, + "snippet": { + "text": "\n\tif (creature != player) {\n\t\tif (stackpos >= 10) {\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f906fdfba93b10c0d03192b97547d88ee30763ad91a072d5858e72c5f1f4b20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6681, + "startColumn": 15, + "charOffset": 202708, + "charLength": 4, + "snippet": { + "text": "0x6A" + } + }, + "contextRegion": { + "startLine": 6679, + "startColumn": 15, + "charOffset": 202671, + "charLength": 4, + "snippet": { + "text": "\n\t\tNetworkMessage msg;\n\t\tmsg.addByte(0x6A);\n\t\tmsg.addPosition(pos);\n\t\tmsg.addByte(static_cast(stackpos));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "adf9db70c03a5e18f96106e8e350b0ec1f00e09f36752d1c05909e5e1184ef24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x6A is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6681, + "startColumn": 15, + "charOffset": 202708, + "charLength": 4, + "snippet": { + "text": "0x6A" + } + }, + "contextRegion": { + "startLine": 6679, + "startColumn": 15, + "charOffset": 202671, + "charLength": 4, + "snippet": { + "text": "\n\t\tNetworkMessage msg;\n\t\tmsg.addByte(0x6A);\n\t\tmsg.addPosition(pos);\n\t\tmsg.addByte(static_cast(stackpos));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9413980a950a6d1aa98560d6df827a66595e5bfc62cf6d7d5a56208ba430d61b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'known' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6685, + "startColumn": 8, + "charOffset": 202794, + "charLength": 5, + "snippet": { + "text": "known" + } + }, + "contextRegion": { + "startLine": 6683, + "startColumn": 8, + "charOffset": 202739, + "charLength": 5, + "snippet": { + "text": "\t\tmsg.addByte(static_cast(stackpos));\n\n\t\tbool known;\n\t\tuint32_t removedKnown;\n\t\tcheckCreatureAsKnown(creature->getID(), known, removedKnown);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "779e9fc58cce9998aceb7c4751505daa365e3d188fc190727dd389c730c47575" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'removedKnown' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6686, + "startColumn": 12, + "charOffset": 202812, + "charLength": 12, + "snippet": { + "text": "removedKnown" + } + }, + "contextRegion": { + "startLine": 6684, + "startColumn": 12, + "charOffset": 202786, + "charLength": 12, + "snippet": { + "text": "\n\t\tbool known;\n\t\tuint32_t removedKnown;\n\t\tcheckCreatureAsKnown(creature->getID(), known, removedKnown);\n\t\tAddCreature(msg, creature, known, removedKnown);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6e33f93ba43ab115fbbc6b26e04341f71d8a25dbca80507d3bc4e2d14947c9b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6705, + "startColumn": 14, + "charOffset": 203331, + "charLength": 4, + "snippet": { + "text": "0x17" + } + }, + "contextRegion": { + "startLine": 6703, + "startColumn": 14, + "charOffset": 203296, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x17);\n\n\tmsg.add(player->getID());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "711fe26d5bd2efc8366b62fc7b56def90ff31be23bddd25588feb969e2584194" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x17 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6705, + "startColumn": 14, + "charOffset": 203331, + "charLength": 4, + "snippet": { + "text": "0x17" + } + }, + "contextRegion": { + "startLine": 6703, + "startColumn": 14, + "charOffset": 203296, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x17);\n\n\tmsg.add(player->getID());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd9e1d3bc99f1b339f9aeddddbf17e50489ef6540690b7cc0986f8a62f8d3b12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6717, + "startColumn": 16, + "charOffset": 203668, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 6715, + "startColumn": 16, + "charOffset": 203576, + "charLength": 4, + "snippet": { + "text": "\tif (oldProtocol) {\n\t\tif (player->getAccountType() >= ACCOUNT_TYPE_NORMAL) {\n\t\t\tmsg.addByte(0x01);\n\t\t} else {\n\t\t\tmsg.addByte(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4f1e7d03528a79ee88f91c888ed71785895f10e897afb44e78de10fa7c42670" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6719, + "startColumn": 16, + "charOffset": 203701, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6717, + "startColumn": 16, + "charOffset": 203653, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.addByte(0x01);\n\t\t} else {\n\t\t\tmsg.addByte(0x00);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6093596bbd3835322e15a5171063250906a5057b9575488b6abd9c14d5af7a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6723, + "startColumn": 14, + "charOffset": 203729, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6721, + "startColumn": 14, + "charOffset": 203712, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tmsg.addByte(0x00); // can change pvp framing option\n\tmsg.addByte(0x00); // expert mode button enabled\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98c8613df458d670a2dfe3954ca10e3e384dc84b4e7d489c760a5734d10de5a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6724, + "startColumn": 14, + "charOffset": 203782, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6722, + "startColumn": 14, + "charOffset": 203715, + "charLength": 4, + "snippet": { + "text": "\n\tmsg.addByte(0x00); // can change pvp framing option\n\tmsg.addByte(0x00); // expert mode button enabled\n\n\tmsg.addString(g_configManager().getString(STORE_IMAGES_URL, __FUNCTION__), \"ProtocolGame::sendAddCreature - g_configManager().getString(STORE_IMAGES_URL)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "acde2745a38d2889221fcb1f50c9b34016afb626ef9536ac8a4d6dd6e5c48e6e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6750, + "startColumn": 2, + "charOffset": 204520, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6748, + "startColumn": 2, + "charOffset": 204515, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (int i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; ++i) {\n\t\tsendInventoryItem(static_cast(i), player->getInventoryItem(static_cast(i)));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d37ac5f522e313e8370de2af78a8e556b2bd3b4cad42d3ac048836c420061ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6775, + "startColumn": 3, + "charOffset": 205133, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6773, + "startColumn": 3, + "charOffset": 205097, + "charLength": 3, + "snippet": { + "text": "\n\tif (player->isAccessPlayer()) {\n\t\tfor (const VIPEntry &entry : vipEntries) {\n\t\t\tVipStatus_t vipStatus;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bac094bad8d4a5f0bd5f659446044a99287d72a0b793c0c196404d061d0c7885" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'vipStatus' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6776, + "startColumn": 16, + "charOffset": 205191, + "charLength": 9, + "snippet": { + "text": "vipStatus" + } + }, + "contextRegion": { + "startLine": 6774, + "startColumn": 16, + "charOffset": 205098, + "charLength": 9, + "snippet": { + "text": "\tif (player->isAccessPlayer()) {\n\t\tfor (const VIPEntry &entry : vipEntries) {\n\t\t\tVipStatus_t vipStatus;\n\n\t\t\tstd::shared_ptr vipPlayer = g_game().getPlayerByGUID(entry.guid);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d749d4034ff4441c6181bdf17b9c3610b53db101a1150ccd5d000741331e9782" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6779, + "startColumn": 8, + "charOffset": 205287, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6777, + "startColumn": 8, + "charOffset": 205202, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tstd::shared_ptr vipPlayer = g_game().getPlayerByGUID(entry.guid);\n\t\t\tif (!vipPlayer) {\n\t\t\t\tvipStatus = VipStatus_t::Offline;\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a8449f955148954ccaa7484a86753e16d6115c230e46c5bc88ba3e60bf32e0bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6788, + "startColumn": 3, + "charOffset": 205512, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6786, + "startColumn": 3, + "charOffset": 205496, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\tfor (const VIPEntry &entry : vipEntries) {\n\t\t\tVipStatus_t vipStatus;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1191c61139dfe2a37597e5b6c09050addd6528f10b02c560572ccaaa2177d9e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'vipStatus' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6789, + "startColumn": 16, + "charOffset": 205570, + "charLength": 9, + "snippet": { + "text": "vipStatus" + } + }, + "contextRegion": { + "startLine": 6787, + "startColumn": 16, + "charOffset": 205500, + "charLength": 9, + "snippet": { + "text": "\t} else {\n\t\tfor (const VIPEntry &entry : vipEntries) {\n\t\t\tVipStatus_t vipStatus;\n\n\t\t\tstd::shared_ptr vipPlayer = g_game().getPlayerByGUID(entry.guid);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba379ad9bc164e2b34e14f87b9179d15422945a7d67977b692a7f2a8f675c580" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6792, + "startColumn": 8, + "charOffset": 205666, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6790, + "startColumn": 8, + "charOffset": 205581, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tstd::shared_ptr vipPlayer = g_game().getPlayerByGUID(entry.guid);\n\t\t\tif (!vipPlayer || vipPlayer->isInGhostMode()) {\n\t\t\t\tvipStatus = VipStatus_t::Offline;\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0baade0a4a30abcea3eeba796edcd2819fe5216a5606206afbac8a70176f610f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'sendMoveCreature' has cognitive complexity of 31 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6825, + "startColumn": 20, + "charOffset": 206568, + "charLength": 16, + "snippet": { + "text": "sendMoveCreature" + } + }, + "contextRegion": { + "startLine": 6823, + "startColumn": 20, + "charOffset": 206546, + "charLength": 16, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendMoveCreature(std::shared_ptr creature, const Position &newPos, int32_t newStackPos, const Position &oldPos, int32_t oldStackPos, bool teleport) {\n\tif (creature == player) {\n\t\tif (oldStackPos >= 10) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7151afd0b9a0e1a994bb38481d775087fb8cc37693f124adfcf6baa4d7ad29ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6825, + "startColumn": 63, + "charOffset": 206611, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 6823, + "startColumn": 63, + "charOffset": 206546, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendMoveCreature(std::shared_ptr creature, const Position &newPos, int32_t newStackPos, const Position &oldPos, int32_t oldStackPos, bool teleport) {\n\tif (creature == player) {\n\t\tif (oldStackPos >= 10) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "376967f45709b337e2c3c5bdc8094ccefcb12c2638354bb2655f8fc067f88c8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6826, + "startColumn": 2, + "charOffset": 206729, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 6824, + "startColumn": 2, + "charOffset": 206548, + "charLength": 2, + "snippet": { + "text": "\nvoid ProtocolGame::sendMoveCreature(std::shared_ptr creature, const Position &newPos, int32_t newStackPos, const Position &oldPos, int32_t oldStackPos, bool teleport) {\n\tif (creature == player) {\n\t\tif (oldStackPos >= 10) {\n\t\t\tsendMapDescription(newPos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc0c554d2f267fdeea0e5c76bf9ce1823ee7e0bb927b4f609c61b84f35bb1d30" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6827, + "startColumn": 22, + "charOffset": 206776, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 6825, + "startColumn": 22, + "charOffset": 206549, + "charLength": 2, + "snippet": { + "text": "void ProtocolGame::sendMoveCreature(std::shared_ptr creature, const Position &newPos, int32_t newStackPos, const Position &oldPos, int32_t oldStackPos, bool teleport) {\n\tif (creature == player) {\n\t\tif (oldStackPos >= 10) {\n\t\t\tsendMapDescription(newPos);\n\t\t} else if (teleport) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54d7c2ebba348c6cb58ec51055294f8798a37987b88868dd4560498446620bbb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6839, + "startColumn": 17, + "charOffset": 207163, + "charLength": 4, + "snippet": { + "text": "0x6D" + } + }, + "contextRegion": { + "startLine": 6837, + "startColumn": 17, + "charOffset": 207088, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tRemoveTileThing(msg, oldPos, oldStackPos);\n\t\t\t} else {\n\t\t\t\tmsg.addByte(0x6D);\n\t\t\t\tmsg.addPosition(oldPos);\n\t\t\t\tmsg.addByte(static_cast(oldStackPos));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97cd451b1f0b22740629f30b4bd7b9f63db8bc77d9bb196e7c25c63517278379" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x6D is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6839, + "startColumn": 17, + "charOffset": 207163, + "charLength": 4, + "snippet": { + "text": "0x6D" + } + }, + "contextRegion": { + "startLine": 6837, + "startColumn": 17, + "charOffset": 207088, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tRemoveTileThing(msg, oldPos, oldStackPos);\n\t\t\t} else {\n\t\t\t\tmsg.addByte(0x6D);\n\t\t\t\tmsg.addPosition(oldPos);\n\t\t\t\tmsg.addByte(static_cast(oldStackPos));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63074c54c33a95509a03cc0e2d7cfb5a8e61f7890e97aaa38cb1ae316caa5fd7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6845, + "startColumn": 4, + "charOffset": 207289, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 6843, + "startColumn": 4, + "charOffset": 207280, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (newPos.z > oldPos.z) {\n\t\t\t\tMoveDownCreature(msg, creature, newPos, oldPos);\n\t\t\t} else if (newPos.z < oldPos.z) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81120b43221d53488f7feccecdda47a65c8b27e864168020746be0fa7780d594" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6851, + "startColumn": 4, + "charOffset": 207466, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 6849, + "startColumn": 4, + "charOffset": 207457, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (oldPos.y > newPos.y) { // north, for old x\n\t\t\t\tmsg.addByte(0x65);\n\t\t\t\tGetMapDescription(oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, newPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, newPos.z, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, 1, msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e69832f0c5ee6ee4d146c443d2172c270edfff91795df49aa4034a5287e7ecb5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6852, + "startColumn": 17, + "charOffset": 207529, + "charLength": 4, + "snippet": { + "text": "0x65" + } + }, + "contextRegion": { + "startLine": 6850, + "startColumn": 17, + "charOffset": 207462, + "charLength": 4, + "snippet": { + "text": "\n\t\t\tif (oldPos.y > newPos.y) { // north, for old x\n\t\t\t\tmsg.addByte(0x65);\n\t\t\t\tGetMapDescription(oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, newPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, newPos.z, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, 1, msg);\n\t\t\t} else if (oldPos.y < newPos.y) { // south, for old x" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d517a1bcddd1095222eb902088e8e01a03257037676dd9e6dbd9b563beb8e588" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x65 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6852, + "startColumn": 17, + "charOffset": 207529, + "charLength": 4, + "snippet": { + "text": "0x65" + } + }, + "contextRegion": { + "startLine": 6850, + "startColumn": 17, + "charOffset": 207462, + "charLength": 4, + "snippet": { + "text": "\n\t\t\tif (oldPos.y > newPos.y) { // north, for old x\n\t\t\t\tmsg.addByte(0x65);\n\t\t\t\tGetMapDescription(oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, newPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, newPos.z, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, 1, msg);\n\t\t\t} else if (oldPos.y < newPos.y) { // south, for old x" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "886c7421aee6f8afe7be4f8ec180239121dccd4753b33e4dbce0ae9f1089afd2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6855, + "startColumn": 17, + "charOffset": 207766, + "charLength": 4, + "snippet": { + "text": "0x67" + } + }, + "contextRegion": { + "startLine": 6853, + "startColumn": 17, + "charOffset": 207536, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tGetMapDescription(oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, newPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, newPos.z, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, 1, msg);\n\t\t\t} else if (oldPos.y < newPos.y) { // south, for old x\n\t\t\t\tmsg.addByte(0x67);\n\t\t\t\tGetMapDescription(oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, newPos.y + (MAP_MAX_CLIENT_VIEW_PORT_Y + 1), newPos.z, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, 1, msg);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "134dae0acf6210d6a43d05a4fb3b43cd632115bd89cd8b143f178f08059c5b11" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x67 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6855, + "startColumn": 17, + "charOffset": 207766, + "charLength": 4, + "snippet": { + "text": "0x67" + } + }, + "contextRegion": { + "startLine": 6853, + "startColumn": 17, + "charOffset": 207536, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tGetMapDescription(oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, newPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, newPos.z, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, 1, msg);\n\t\t\t} else if (oldPos.y < newPos.y) { // south, for old x\n\t\t\t\tmsg.addByte(0x67);\n\t\t\t\tGetMapDescription(oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, newPos.y + (MAP_MAX_CLIENT_VIEW_PORT_Y + 1), newPos.z, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, 1, msg);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f71b73fc0e4017faa34c3f067d9820f92187182cb4136e71d7b83c129c43a778" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6859, + "startColumn": 4, + "charOffset": 207945, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 6857, + "startColumn": 4, + "charOffset": 207936, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (oldPos.x < newPos.x) { // east, [with new y]\n\t\t\t\tmsg.addByte(0x66);\n\t\t\t\tGetMapDescription(newPos.x + (MAP_MAX_CLIENT_VIEW_PORT_X + 1), newPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, newPos.z, 1, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6b2db59b9f501a7d2465edbfeeb62d6c4d33564dae29a10b4fbdcdf71d8fbd0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6860, + "startColumn": 17, + "charOffset": 208010, + "charLength": 4, + "snippet": { + "text": "0x66" + } + }, + "contextRegion": { + "startLine": 6858, + "startColumn": 17, + "charOffset": 207941, + "charLength": 4, + "snippet": { + "text": "\n\t\t\tif (oldPos.x < newPos.x) { // east, [with new y]\n\t\t\t\tmsg.addByte(0x66);\n\t\t\t\tGetMapDescription(newPos.x + (MAP_MAX_CLIENT_VIEW_PORT_X + 1), newPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, newPos.z, 1, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, msg);\n\t\t\t} else if (oldPos.x > newPos.x) { // west, [with new y]" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "486823f308311ba11e39bdab7d0a40dc45ef4820cdd8bfafa2b5356830c96c8d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x66 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6860, + "startColumn": 17, + "charOffset": 208010, + "charLength": 4, + "snippet": { + "text": "0x66" + } + }, + "contextRegion": { + "startLine": 6858, + "startColumn": 17, + "charOffset": 207941, + "charLength": 4, + "snippet": { + "text": "\n\t\t\tif (oldPos.x < newPos.x) { // east, [with new y]\n\t\t\t\tmsg.addByte(0x66);\n\t\t\t\tGetMapDescription(newPos.x + (MAP_MAX_CLIENT_VIEW_PORT_X + 1), newPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, newPos.z, 1, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, msg);\n\t\t\t} else if (oldPos.x > newPos.x) { // west, [with new y]" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69c200e636444a38eea3dd683988f1c13dace7e106f26dc33f151db88946e721" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6863, + "startColumn": 17, + "charOffset": 208255, + "charLength": 4, + "snippet": { + "text": "0x68" + } + }, + "contextRegion": { + "startLine": 6861, + "startColumn": 17, + "charOffset": 208017, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tGetMapDescription(newPos.x + (MAP_MAX_CLIENT_VIEW_PORT_X + 1), newPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, newPos.z, 1, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, msg);\n\t\t\t} else if (oldPos.x > newPos.x) { // west, [with new y]\n\t\t\t\tmsg.addByte(0x68);\n\t\t\t\tGetMapDescription(newPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, newPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, newPos.z, 1, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, msg);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "859b7c83184fa0a1de6ae395b92046fbb3b2b2507c75928cb41c989b1b6a17b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x68 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6863, + "startColumn": 17, + "charOffset": 208255, + "charLength": 4, + "snippet": { + "text": "0x68" + } + }, + "contextRegion": { + "startLine": 6861, + "startColumn": 17, + "charOffset": 208017, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tGetMapDescription(newPos.x + (MAP_MAX_CLIENT_VIEW_PORT_X + 1), newPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, newPos.z, 1, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, msg);\n\t\t\t} else if (oldPos.x > newPos.x) { // west, [with new y]\n\t\t\t\tmsg.addByte(0x68);\n\t\t\t\tGetMapDescription(newPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, newPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, newPos.z, 1, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, msg);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21f91c66586f61d4e390a43460899505ac0548ced143a7dd799c920c422e569a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6869, + "startColumn": 116, + "charOffset": 208620, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 6867, + "startColumn": 116, + "charOffset": 208453, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\t} else if (canSee(oldPos) && canSee(newPos)) {\n\t\tif (teleport || (oldPos.z == MAP_INIT_SURFACE_LAYER && newPos.z >= MAP_INIT_SURFACE_LAYER + 1) || oldStackPos >= 10) {\n\t\t\tsendRemoveTileThing(oldPos, oldStackPos);\n\t\t\tsendAddCreature(creature, newPos, newStackPos, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "369dbbd249be7d2775f08bf972e60136fada1cc8fb21b5e9d88509f91d6e112d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6874, + "startColumn": 16, + "charOffset": 208778, + "charLength": 4, + "snippet": { + "text": "0x6D" + } + }, + "contextRegion": { + "startLine": 6872, + "startColumn": 16, + "charOffset": 208729, + "charLength": 4, + "snippet": { + "text": "\t\t} else {\n\t\t\tNetworkMessage msg;\n\t\t\tmsg.addByte(0x6D);\n\t\t\tmsg.addPosition(oldPos);\n\t\t\tmsg.addByte(static_cast(oldStackPos));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "486823f308311ba11e39bdab7d0a40dc45ef4820cdd8bfafa2b5356830c96c8d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x6D is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6874, + "startColumn": 16, + "charOffset": 208778, + "charLength": 4, + "snippet": { + "text": "0x6D" + } + }, + "contextRegion": { + "startLine": 6872, + "startColumn": 16, + "charOffset": 208729, + "charLength": 4, + "snippet": { + "text": "\t\t} else {\n\t\t\tNetworkMessage msg;\n\t\t\tmsg.addByte(0x6D);\n\t\t\tmsg.addPosition(oldPos);\n\t\t\tmsg.addByte(static_cast(oldStackPos));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "562691a9ebff0ee358014f93436a9af51bc5701469ebf62716fafc57a56b427e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6887, + "startColumn": 74, + "charOffset": 209165, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 6885, + "startColumn": 74, + "charOffset": 209089, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendInventoryItem(Slots_t slot, std::shared_ptr item) {\n\tNetworkMessage msg;\n\tif (item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b37e98c7c5d9e4381908bc62a851cd0ea48110513e9cf8614707c0f75a8543ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6890, + "startColumn": 15, + "charOffset": 209221, + "charLength": 4, + "snippet": { + "text": "0x78" + } + }, + "contextRegion": { + "startLine": 6888, + "startColumn": 15, + "charOffset": 209173, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\tif (item) {\n\t\tmsg.addByte(0x78);\n\t\tmsg.addByte(slot);\n\t\tAddItem(msg, item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "080fe11b76e041828c10d9f3d6ecb430046c61e2302903f39668526a319881c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x78 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6890, + "startColumn": 15, + "charOffset": 209221, + "charLength": 4, + "snippet": { + "text": "0x78" + } + }, + "contextRegion": { + "startLine": 6888, + "startColumn": 15, + "charOffset": 209173, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\tif (item) {\n\t\tmsg.addByte(0x78);\n\t\tmsg.addByte(slot);\n\t\tAddItem(msg, item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1fe60aa3a6ca38075c257a9176ddaa1d76edf7770fe70ac7b21445ad1036c96" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6894, + "startColumn": 15, + "charOffset": 209295, + "charLength": 4, + "snippet": { + "text": "0x79" + } + }, + "contextRegion": { + "startLine": 6892, + "startColumn": 15, + "charOffset": 209249, + "charLength": 4, + "snippet": { + "text": "\t\tAddItem(msg, item);\n\t} else {\n\t\tmsg.addByte(0x79);\n\t\tmsg.addByte(slot);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ee6aa1eac8fc405002f1f7ca65548c4cf7b3036db88d7c8e6aabe0aeec7ac64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x79 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6894, + "startColumn": 15, + "charOffset": 209295, + "charLength": 4, + "snippet": { + "text": "0x79" + } + }, + "contextRegion": { + "startLine": 6892, + "startColumn": 15, + "charOffset": 209249, + "charLength": 4, + "snippet": { + "text": "\t\tAddItem(msg, item);\n\t} else {\n\t\tmsg.addByte(0x79);\n\t\tmsg.addByte(slot);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78130e7a91c1eb12313d612c417b2cbbf3951b558e45577008a944047ec783a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6904, + "startColumn": 14, + "charOffset": 209490, + "charLength": 4, + "snippet": { + "text": "0xF5" + } + }, + "contextRegion": { + "startLine": 6902, + "startColumn": 14, + "charOffset": 209455, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xF5);\n\tauto countPosition = msg.getBufferPosition();\n\tmsg.skipBytes(2); // Total items count" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "104f09a800d9b15935922d90983f2d4b595d501c3301ded879d0ab350afd414b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xF5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6904, + "startColumn": 14, + "charOffset": 209490, + "charLength": 4, + "snippet": { + "text": "0xF5" + } + }, + "contextRegion": { + "startLine": 6902, + "startColumn": 14, + "charOffset": 209455, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xF5);\n\tauto countPosition = msg.getBufferPosition();\n\tmsg.skipBytes(2); // Total items count" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "500004fd08276241e9962d45de72e2b2ae2cc8fef605f80d94e56c4f51692ed5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6908, + "startColumn": 2, + "charOffset": 209586, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6906, + "startColumn": 2, + "charOffset": 209544, + "charLength": 3, + "snippet": { + "text": "\tmsg.skipBytes(2); // Total items count\n\n\tfor (uint16_t i = 1; i <= 11; i++) {\n\t\tmsg.add(i);\n\t\tmsg.addByte(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9b394ecfe4c42e8d557a23d32c1553f5837c1a4e1e24696e02bcf0bf13874e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "11 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6908, + "startColumn": 28, + "charOffset": 209612, + "charLength": 2, + "snippet": { + "text": "11" + } + }, + "contextRegion": { + "startLine": 6906, + "startColumn": 28, + "charOffset": 209544, + "charLength": 2, + "snippet": { + "text": "\tmsg.skipBytes(2); // Total items count\n\n\tfor (uint16_t i = 1; i <= 11; i++) {\n\t\tmsg.add(i);\n\t\tmsg.addByte(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a42e09ed1fe3c7a1b67fdb17ee967dca59226adc9021fcccddacba1f0bcc601a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6910, + "startColumn": 15, + "charOffset": 209661, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6908, + "startColumn": 15, + "charOffset": 209585, + "charLength": 4, + "snippet": { + "text": "\tfor (uint16_t i = 1; i <= 11; i++) {\n\t\tmsg.add(i);\n\t\tmsg.addByte(0x00);\n\t\tmsg.add(0x01);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db6722400f6566fde377ff1c8fc23403739ef4a87394026604b69dfd2b219fc5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6911, + "startColumn": 21, + "charOffset": 209688, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 6909, + "startColumn": 21, + "charOffset": 209623, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.add(i);\n\t\tmsg.addByte(0x00);\n\t\tmsg.add(0x01);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2213c09a89a5b764cc6538f9e2751eac50a7091243066c0a0d4d83c89831ac7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6916, + "startColumn": 3, + "charOffset": 209776, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6914, + "startColumn": 3, + "charOffset": 209699, + "charLength": 3, + "snippet": { + "text": "\tuint16_t totalItemsCount = 0;\n\tfor (const auto &[itemId, item] : items) {\n\t\tfor (const auto [tier, count] : item) {\n\t\t\tmsg.add(itemId);\n\t\t\tmsg.addByte(tier);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60dab907e4bd3893bf8d483ff0880e6eedb6bb64b478fdb596bc16e1b425df48" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "11 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6925, + "startColumn": 38, + "charOffset": 210026, + "charLength": 2, + "snippet": { + "text": "11" + } + }, + "contextRegion": { + "startLine": 6923, + "startColumn": 38, + "charOffset": 209949, + "charLength": 2, + "snippet": { + "text": "\n\tmsg.setBufferPosition(countPosition);\n\tmsg.add(totalItemsCount + 11);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9a25a633dbdbb4abd52a039005d8c37ed695b1a2c025738287bd5f045ad23fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'sendAddContainerItem' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6929, + "startColumn": 41, + "charOffset": 210101, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 6927, + "startColumn": 41, + "charOffset": 210058, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendAddContainerItem(uint8_t cid, uint16_t slot, std::shared_ptr item) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x70);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "467e8f9609a75fe419af75e35a0f17ef0a61b0a8607ee20be0c660d1d2474ad9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6931, + "startColumn": 14, + "charOffset": 210193, + "charLength": 4, + "snippet": { + "text": "0x70" + } + }, + "contextRegion": { + "startLine": 6929, + "startColumn": 14, + "charOffset": 210061, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendAddContainerItem(uint8_t cid, uint16_t slot, std::shared_ptr item) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x70);\n\tmsg.addByte(cid);\n\tmsg.add(slot);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b9db47f704c03a037eb6c24b657a76b8288bad6e6ade7f0540259d29bdf0755" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x70 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6931, + "startColumn": 14, + "charOffset": 210193, + "charLength": 4, + "snippet": { + "text": "0x70" + } + }, + "contextRegion": { + "startLine": 6929, + "startColumn": 14, + "charOffset": 210061, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendAddContainerItem(uint8_t cid, uint16_t slot, std::shared_ptr item) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x70);\n\tmsg.addByte(cid);\n\tmsg.add(slot);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5d1544d8431656b4f19543e0e27d46520108b6816eeaf3ac139eb1aae6010ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6934, + "startColumn": 15, + "charOffset": 210259, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 6932, + "startColumn": 15, + "charOffset": 210200, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(cid);\n\tmsg.add(slot);\n\tAddItem(msg, item);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a3b59f88b2bfb6e053f7419383893c2ab430a9bf4407c01d76e7ab2d638ffa9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'sendUpdateContainerItem' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6938, + "startColumn": 44, + "charOffset": 210339, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 6936, + "startColumn": 44, + "charOffset": 210293, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendUpdateContainerItem(uint8_t cid, uint16_t slot, std::shared_ptr item) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x71);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08695151c424cd610529da39cefd15cfbf035cc2761982dd0f0fc62032616193" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6940, + "startColumn": 14, + "charOffset": 210431, + "charLength": 4, + "snippet": { + "text": "0x71" + } + }, + "contextRegion": { + "startLine": 6938, + "startColumn": 14, + "charOffset": 210296, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendUpdateContainerItem(uint8_t cid, uint16_t slot, std::shared_ptr item) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x71);\n\tmsg.addByte(cid);\n\tmsg.add(slot);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46fff25e982fd24765d5a9d160497e465e429af0ddbf3e948ede0f6d2a509ad9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x71 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6940, + "startColumn": 14, + "charOffset": 210431, + "charLength": 4, + "snippet": { + "text": "0x71" + } + }, + "contextRegion": { + "startLine": 6938, + "startColumn": 14, + "charOffset": 210296, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendUpdateContainerItem(uint8_t cid, uint16_t slot, std::shared_ptr item) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x71);\n\tmsg.addByte(cid);\n\tmsg.add(slot);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b40b20d07a0d0b2f9aabc86668eeb0f4998b17f06f78382a19eff2f4ebf1a831" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6943, + "startColumn": 15, + "charOffset": 210497, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 6941, + "startColumn": 15, + "charOffset": 210438, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(cid);\n\tmsg.add(slot);\n\tAddItem(msg, item);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1609d6bf5e0694030f2334ca90dc2c4b9d4da46d292b74be4ef46699cb9ff9c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'sendRemoveContainerItem' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6947, + "startColumn": 44, + "charOffset": 210577, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 6945, + "startColumn": 44, + "charOffset": 210531, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendRemoveContainerItem(uint8_t cid, uint16_t slot, std::shared_ptr lastItem) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x72);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afd586d88eed6a00099f2f95e9614113232c69214c8efdec2f7746a135b9fce2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'lastItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6947, + "startColumn": 94, + "charOffset": 210627, + "charLength": 8, + "snippet": { + "text": "lastItem" + } + }, + "contextRegion": { + "startLine": 6945, + "startColumn": 94, + "charOffset": 210531, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendRemoveContainerItem(uint8_t cid, uint16_t slot, std::shared_ptr lastItem) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x72);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63e88aa2e42755e52487270619acee19a24ba98998946544674f514c0f6fb948" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6949, + "startColumn": 14, + "charOffset": 210673, + "charLength": 4, + "snippet": { + "text": "0x72" + } + }, + "contextRegion": { + "startLine": 6947, + "startColumn": 14, + "charOffset": 210534, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendRemoveContainerItem(uint8_t cid, uint16_t slot, std::shared_ptr lastItem) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x72);\n\tmsg.addByte(cid);\n\tmsg.add(slot);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a6bcbb0c35c8071f8661cc19f3bcd6af545b0c68f2e7212e598c7b7a0d7b69a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x72 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6949, + "startColumn": 14, + "charOffset": 210673, + "charLength": 4, + "snippet": { + "text": "0x72" + } + }, + "contextRegion": { + "startLine": 6947, + "startColumn": 14, + "charOffset": 210534, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendRemoveContainerItem(uint8_t cid, uint16_t slot, std::shared_ptr lastItem) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x72);\n\tmsg.addByte(cid);\n\tmsg.add(slot);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21f7982e606e5d44e31b5d5bfa0e9f86aa580a94c6f1cea9ec8d9db8adc6b717" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6955, + "startColumn": 21, + "charOffset": 210798, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6953, + "startColumn": 21, + "charOffset": 210742, + "charLength": 4, + "snippet": { + "text": "\t\tAddItem(msg, lastItem);\n\t} else {\n\t\tmsg.add(0x00);\n\t}\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96d41e5dc2616d081426578e0748919a36fafa8761794eaf8011a5996739105e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6960, + "startColumn": 80, + "charOffset": 210917, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 6958, + "startColumn": 80, + "charOffset": 210835, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendTextWindow(uint32_t windowTextId, std::shared_ptr item, uint16_t maxlen, bool canWrite) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x96);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ab4f49ae83a7a116c40377010b2a6401942d44ea9487faccfee3f443a2ce68c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6962, + "startColumn": 14, + "charOffset": 210991, + "charLength": 4, + "snippet": { + "text": "0x96" + } + }, + "contextRegion": { + "startLine": 6960, + "startColumn": 14, + "charOffset": 210838, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendTextWindow(uint32_t windowTextId, std::shared_ptr item, uint16_t maxlen, bool canWrite) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x96);\n\tmsg.add(windowTextId);\n\tAddItem(msg, item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cdad76cea529247f9383f9e9fc5b64970f6908e9ad89a3201fa07db9829f8a63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x96 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6962, + "startColumn": 14, + "charOffset": 210991, + "charLength": 4, + "snippet": { + "text": "0x96" + } + }, + "contextRegion": { + "startLine": 6960, + "startColumn": 14, + "charOffset": 210838, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendTextWindow(uint32_t windowTextId, std::shared_ptr item, uint16_t maxlen, bool canWrite) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x96);\n\tmsg.add(windowTextId);\n\tAddItem(msg, item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "884173788acd893d2d7bfde5068e59a243f4173b58a049acc5aaa57f2ef753c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6971, + "startColumn": 21, + "charOffset": 211376, + "charLength": 4, + "snippet": { + "text": "text" + } + }, + "contextRegion": { + "startLine": 6969, + "startColumn": 21, + "charOffset": 211262, + "charLength": 4, + "snippet": { + "text": "\t} else {\n\t\tconst std::string &text = item->getAttribute(ItemAttribute_t::TEXT);\n\t\tmsg.add(text.size());\n\t\tmsg.addString(text, \"ProtocolGame::sendTextWindow - text\");\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb6f9d643f1992541c55f0c5a5aa63d602df6ebb63be4d7ff6d68448e35b00c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6979, + "startColumn": 21, + "charOffset": 211663, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6977, + "startColumn": 21, + "charOffset": 211567, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addString(writer, \"ProtocolGame::sendTextWindow - writer\");\n\t} else {\n\t\tmsg.add(0x00);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86905c3aaa4ef33339849b3a0343bdcc3be0ab2e672932454c4175b77c35e674" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6983, + "startColumn": 15, + "charOffset": 211709, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6981, + "startColumn": 15, + "charOffset": 211673, + "charLength": 4, + "snippet": { + "text": "\n\tif (!oldProtocol) {\n\t\tmsg.addByte(0x00); // Show (Traded)\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db6722400f6566fde377ff1c8fc23403739ef4a87394026604b69dfd2b219fc5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6990, + "startColumn": 21, + "charOffset": 211973, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 6988, + "startColumn": 21, + "charOffset": 211833, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addString(formatDateShort(writtenDate), \"ProtocolGame::sendTextWindow - formatDateShort(writtenDate)\");\n\t} else {\n\t\tmsg.add(0x00);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d95c084015d37d2270fdc5c4b59f245ef6c11b9f4c0bdd7aca20aadf3c5f8cc6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'sendTextWindow' of similar type ('uint32_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6996, + "startColumn": 35, + "charOffset": 212048, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 6994, + "startColumn": 35, + "charOffset": 212011, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendTextWindow(uint32_t windowTextId, uint32_t itemId, const std::string &text) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x96);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2b41424e5daf37fa19027ad16d92ef90e32cae30f3069ec581e578a2aac556c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6998, + "startColumn": 14, + "charOffset": 212149, + "charLength": 4, + "snippet": { + "text": "0x96" + } + }, + "contextRegion": { + "startLine": 6996, + "startColumn": 14, + "charOffset": 212014, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendTextWindow(uint32_t windowTextId, uint32_t itemId, const std::string &text) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x96);\n\tmsg.add(windowTextId);\n\tAddItem(msg, itemId, 1, 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6093596bbd3835322e15a5171063250906a5057b9575488b6abd9c14d5af7a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x96 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 6998, + "startColumn": 14, + "charOffset": 212149, + "charLength": 4, + "snippet": { + "text": "0x96" + } + }, + "contextRegion": { + "startLine": 6996, + "startColumn": 14, + "charOffset": 212014, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendTextWindow(uint32_t windowTextId, uint32_t itemId, const std::string &text) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x96);\n\tmsg.add(windowTextId);\n\tAddItem(msg, itemId, 1, 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "237d10fc78019c961854013f9c7720312c00550a2bfc63cdff1c003f5997b812" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7000, + "startColumn": 15, + "charOffset": 212204, + "charLength": 6, + "snippet": { + "text": "itemId" + } + }, + "contextRegion": { + "startLine": 6998, + "startColumn": 15, + "charOffset": 212136, + "charLength": 6, + "snippet": { + "text": "\tmsg.addByte(0x96);\n\tmsg.add(windowTextId);\n\tAddItem(msg, itemId, 1, 0);\n\tmsg.add(text.size());\n\tmsg.addString(text, \"ProtocolGame::sendTextWindow - text\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f3f954c8cd4a44c85faeda871fbb131a3b983c91371b63bf192f9d300dfc722" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7001, + "startColumn": 20, + "charOffset": 212238, + "charLength": 4, + "snippet": { + "text": "text" + } + }, + "contextRegion": { + "startLine": 6999, + "startColumn": 20, + "charOffset": 212156, + "charLength": 4, + "snippet": { + "text": "\tmsg.add(windowTextId);\n\tAddItem(msg, itemId, 1, 0);\n\tmsg.add(text.size());\n\tmsg.addString(text, \"ProtocolGame::sendTextWindow - text\");\n\tmsg.add(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "231a1a68f97d8991c1602a2609bd31df790f165375c60ef4364b83a9b89cf3e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7003, + "startColumn": 20, + "charOffset": 212332, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 7001, + "startColumn": 20, + "charOffset": 212219, + "charLength": 4, + "snippet": { + "text": "\tmsg.add(text.size());\n\tmsg.addString(text, \"ProtocolGame::sendTextWindow - text\");\n\tmsg.add(0x00);\n\n\tif (!oldProtocol) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97ee87343e645ff418eeda892ca35e607ada8a9680e3a02a979da6705fc93dc8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7006, + "startColumn": 15, + "charOffset": 212375, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 7004, + "startColumn": 15, + "charOffset": 212339, + "charLength": 4, + "snippet": { + "text": "\n\tif (!oldProtocol) {\n\t\tmsg.addByte(0x00); // Show (Traded)\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "781143c3367202e7b48c1ada40b74ce6c5389deb037de43a80f12d222bd56cdd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7009, + "startColumn": 20, + "charOffset": 212422, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 7007, + "startColumn": 20, + "charOffset": 212399, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tmsg.add(0x00);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6b36031f811402115d9e220d36d3f7b9bd6b524ec3bae044dfd3bbd96d0e9ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7015, + "startColumn": 14, + "charOffset": 212578, + "charLength": 4, + "snippet": { + "text": "0x97" + } + }, + "contextRegion": { + "startLine": 7013, + "startColumn": 14, + "charOffset": 212459, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendHouseWindow(uint32_t windowTextId, const std::string &text) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x97);\n\tmsg.addByte(0x00);\n\tmsg.add(windowTextId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1451632de5496be983a7026fdee553808a0655c71b6a24c20d65cb7b4908c3ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x97 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7015, + "startColumn": 14, + "charOffset": 212578, + "charLength": 4, + "snippet": { + "text": "0x97" + } + }, + "contextRegion": { + "startLine": 7013, + "startColumn": 14, + "charOffset": 212459, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendHouseWindow(uint32_t windowTextId, const std::string &text) {\n\tNetworkMessage msg;\n\tmsg.addByte(0x97);\n\tmsg.addByte(0x00);\n\tmsg.add(windowTextId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "631427494425df423587392e185da04570399dcd4a6ddf67ad6019fee881820b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7016, + "startColumn": 14, + "charOffset": 212598, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 7014, + "startColumn": 14, + "charOffset": 212544, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\tmsg.addByte(0x97);\n\tmsg.addByte(0x00);\n\tmsg.add(windowTextId);\n\tmsg.addString(text, \"ProtocolGame::sendHouseWindow - text\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c36341b7aa41a9dc234ea57c9ea3e197138dda0d6dbbd11c70b8eb038698e95b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'sendOutfitWindow' has cognitive complexity of 65 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7022, + "startColumn": 20, + "charOffset": 212750, + "charLength": 16, + "snippet": { + "text": "sendOutfitWindow" + } + }, + "contextRegion": { + "startLine": 7020, + "startColumn": 20, + "charOffset": 212728, + "charLength": 16, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendOutfitWindow() {\n\tNetworkMessage msg;\n\tmsg.addByte(0xC8);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e99ab148b64cf22270f8f76ef63ddfc02bbb362abca71e038a159370a3739ede" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7024, + "startColumn": 14, + "charOffset": 212805, + "charLength": 4, + "snippet": { + "text": "0xC8" + } + }, + "contextRegion": { + "startLine": 7022, + "startColumn": 14, + "charOffset": 212731, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendOutfitWindow() {\n\tNetworkMessage msg;\n\tmsg.addByte(0xC8);\n\n\tOutfit_t currentOutfit = player->getDefaultOutfit();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "080fe11b76e041828c10d9f3d6ecb430046c61e2302903f39668526a319881c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xC8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7024, + "startColumn": 14, + "charOffset": 212805, + "charLength": 4, + "snippet": { + "text": "0xC8" + } + }, + "contextRegion": { + "startLine": 7022, + "startColumn": 14, + "charOffset": 212731, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendOutfitWindow() {\n\tNetworkMessage msg;\n\tmsg.addByte(0xC8);\n\n\tOutfit_t currentOutfit = player->getDefaultOutfit();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1dd4c114eb83b6f3789210c235aba1a7d73e3544bdac5443c305a94fc85eaf91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7046, + "startColumn": 3, + "charOffset": 213467, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7044, + "startColumn": 3, + "charOffset": 213346, + "charLength": 3, + "snippet": { + "text": "\t\tconst auto outfits = Outfits::getInstance().getOutfits(player->getSex());\n\t\tprotocolOutfits.reserve(outfits.size());\n\t\tfor (const auto &outfit : outfits) {\n\t\t\tuint8_t addons;\n\t\t\tif (!player->getOutfitAddons(outfit, addons)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "454d3db6c5280a7e5d8bd72edb51ea5baeba054e9ad123c8ecce7fd7141ecc2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'addons' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7047, + "startColumn": 12, + "charOffset": 213515, + "charLength": 6, + "snippet": { + "text": "addons" + } + }, + "contextRegion": { + "startLine": 7045, + "startColumn": 12, + "charOffset": 213422, + "charLength": 6, + "snippet": { + "text": "\t\tprotocolOutfits.reserve(outfits.size());\n\t\tfor (const auto &outfit : outfits) {\n\t\t\tuint8_t addons;\n\t\t\tif (!player->getOutfitAddons(outfit, addons)) {\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "babf509f8e869ec9ddfc89466829ca5374fefbc78ebc3297d7bd87747d4d4aea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7052, + "startColumn": 20, + "charOffset": 213613, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 7050, + "startColumn": 20, + "charOffset": 213588, + "charLength": 12, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tprotocolOutfits.emplace_back(outfit->name, outfit->lookType, addons);\n\t\t\t// Game client doesn't allow more than 100 outfits\n\t\t\tif (protocolOutfits.size() == 150) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a8fc9889c7e36d5071f3b010eb0a8d7d4c42da6b7fb65b9d0a1e52b0577d965" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "150 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7054, + "startColumn": 34, + "charOffset": 213754, + "charLength": 3, + "snippet": { + "text": "150" + } + }, + "contextRegion": { + "startLine": 7052, + "startColumn": 34, + "charOffset": 213594, + "charLength": 3, + "snippet": { + "text": "\t\t\tprotocolOutfits.emplace_back(outfit->name, outfit->lookType, addons);\n\t\t\t// Game client doesn't allow more than 100 outfits\n\t\t\tif (protocolOutfits.size() == 150) {\n\t\t\t\tbreak;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12ed338acf79f152f85529f3d83ffa260f3b93bd4b8cc0e8591c07c65204f615" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7059, + "startColumn": 15, + "charOffset": 213796, + "charLength": 15, + "snippet": { + "text": "protocolOutfits" + } + }, + "contextRegion": { + "startLine": 7057, + "startColumn": 15, + "charOffset": 213777, + "charLength": 15, + "snippet": { + "text": "\t\t}\n\n\t\tmsg.addByte(protocolOutfits.size());\n\t\tfor (const ProtocolOutfit &outfit : protocolOutfits) {\n\t\t\tmsg.add(outfit.lookType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b77ef17f064bc08ecead31a71b8a36c4cd2b9b9073682cabb235e17707ed404f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7060, + "startColumn": 3, + "charOffset": 213823, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7058, + "startColumn": 3, + "charOffset": 213781, + "charLength": 3, + "snippet": { + "text": "\n\t\tmsg.addByte(protocolOutfits.size());\n\t\tfor (const ProtocolOutfit &outfit : protocolOutfits) {\n\t\t\tmsg.add(outfit.lookType);\n\t\t\tmsg.addString(outfit.name, \"ProtocolGame::sendOutfitWindow - outfit.name\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a33ecf6f21b34167373875b3006666a17b434a41fb4bbe7020ec24750dd5353b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7067, + "startColumn": 3, + "charOffset": 214080, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7065, + "startColumn": 3, + "charOffset": 214031, + "charLength": 3, + "snippet": { + "text": "\n\t\tstd::vector> mounts;\n\t\tfor (const auto &mount : g_game().mounts.getMounts()) {\n\t\t\tif (player->hasMount(mount)) {\n\t\t\t\tmounts.push_back(mount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28bca9cf6e795a7cc506a63b7adfaa6105b42840fa96c265daba2733d5134672" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7073, + "startColumn": 15, + "charOffset": 214223, + "charLength": 6, + "snippet": { + "text": "mounts" + } + }, + "contextRegion": { + "startLine": 7071, + "startColumn": 15, + "charOffset": 214204, + "charLength": 6, + "snippet": { + "text": "\t\t}\n\n\t\tmsg.addByte(mounts.size());\n\t\tfor (const auto &mount : mounts) {\n\t\t\tmsg.add(mount->clientId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2def4eb83ec2284a41455b2ceb270ad4bcb5bba96d425c6576ca15eae04cd786" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7074, + "startColumn": 3, + "charOffset": 214241, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7072, + "startColumn": 3, + "charOffset": 214208, + "charLength": 3, + "snippet": { + "text": "\n\t\tmsg.addByte(mounts.size());\n\t\tfor (const auto &mount : mounts) {\n\t\t\tmsg.add(mount->clientId);\n\t\t\tmsg.addString(mount->name, \"ProtocolGame::sendOutfitWindow - mount->name\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2caac706b25d0f481bdeea741609a84255fa93c2a6101e2eccc758d450a891ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7083, + "startColumn": 14, + "charOffset": 214454, + "charLength": 15, + "snippet": { + "text": "isSupportOutfit" + } + }, + "contextRegion": { + "startLine": 7081, + "startColumn": 14, + "charOffset": 214437, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tmsg.addByte(isSupportOutfit ? 0 : currentOutfit.lookMountHead);\n\tmsg.addByte(isSupportOutfit ? 0 : currentOutfit.lookMountBody);\n\tmsg.addByte(isSupportOutfit ? 0 : currentOutfit.lookMountLegs);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ca0a771bab23b613ffff7d437fa1555d9569c7f3246113bfcaf63b3d3f0ba99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7084, + "startColumn": 14, + "charOffset": 214519, + "charLength": 15, + "snippet": { + "text": "isSupportOutfit" + } + }, + "contextRegion": { + "startLine": 7082, + "startColumn": 14, + "charOffset": 214440, + "charLength": 15, + "snippet": { + "text": "\n\tmsg.addByte(isSupportOutfit ? 0 : currentOutfit.lookMountHead);\n\tmsg.addByte(isSupportOutfit ? 0 : currentOutfit.lookMountBody);\n\tmsg.addByte(isSupportOutfit ? 0 : currentOutfit.lookMountLegs);\n\tmsg.addByte(isSupportOutfit ? 0 : currentOutfit.lookMountFeet);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bbdaadf06c28230bc434feb0ebfe37290781d906bd6f18179b966e9e9cdbf20b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7085, + "startColumn": 14, + "charOffset": 214584, + "charLength": 15, + "snippet": { + "text": "isSupportOutfit" + } + }, + "contextRegion": { + "startLine": 7083, + "startColumn": 14, + "charOffset": 214441, + "charLength": 15, + "snippet": { + "text": "\tmsg.addByte(isSupportOutfit ? 0 : currentOutfit.lookMountHead);\n\tmsg.addByte(isSupportOutfit ? 0 : currentOutfit.lookMountBody);\n\tmsg.addByte(isSupportOutfit ? 0 : currentOutfit.lookMountLegs);\n\tmsg.addByte(isSupportOutfit ? 0 : currentOutfit.lookMountFeet);\n\tmsg.add(currentOutfit.lookFamiliarsType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3dab8278d2c17426e19e3f1c59fccd46154a01f12c8c9c76023cf264e3d1375" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7086, + "startColumn": 14, + "charOffset": 214649, + "charLength": 15, + "snippet": { + "text": "isSupportOutfit" + } + }, + "contextRegion": { + "startLine": 7084, + "startColumn": 14, + "charOffset": 214506, + "charLength": 15, + "snippet": { + "text": "\tmsg.addByte(isSupportOutfit ? 0 : currentOutfit.lookMountBody);\n\tmsg.addByte(isSupportOutfit ? 0 : currentOutfit.lookMountLegs);\n\tmsg.addByte(isSupportOutfit ? 0 : currentOutfit.lookMountFeet);\n\tmsg.add(currentOutfit.lookFamiliarsType);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eeda2819ab2c23d58992cde548f5e5441b79cbb44d5eee0842605e16e59d199e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "75 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7096, + "startColumn": 21, + "charOffset": 215078, + "charLength": 2, + "snippet": { + "text": "75" + } + }, + "contextRegion": { + "startLine": 7094, + "startColumn": 21, + "charOffset": 214955, + "charLength": 2, + "snippet": { + "text": "\n\tif (player->isAccessPlayer() && g_configManager().getBoolean(ENABLE_SUPPORT_OUTFIT, __FUNCTION__)) {\n\t\tmsg.add(75);\n\t\tmsg.addString(\"Gamemaster\", \"ProtocolGame::sendOutfitWindow - Gamemaster\");\n\t\tmsg.addByte(0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9eea7e208e184067efd95a24bb35035df757b7a36146685ea4aacbfc423c1f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7099, + "startColumn": 15, + "charOffset": 215193, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 7097, + "startColumn": 15, + "charOffset": 215083, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addString(\"Gamemaster\", \"ProtocolGame::sendOutfitWindow - Gamemaster\");\n\t\tmsg.addByte(0);\n\t\tmsg.addByte(0x00);\n\t\t++outfitSize;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "248c7620a2528f35f4ba63b17fb7c7ba444b17038d2ab31471b26e5c61087c6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "266 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7102, + "startColumn": 21, + "charOffset": 215237, + "charLength": 3, + "snippet": { + "text": "266" + } + }, + "contextRegion": { + "startLine": 7100, + "startColumn": 21, + "charOffset": 215200, + "charLength": 3, + "snippet": { + "text": "\t\t++outfitSize;\n\n\t\tmsg.add(266);\n\t\tmsg.addString(\"Customer Support\", \"ProtocolGame::sendOutfitWindow - Customer Support\");\n\t\tmsg.addByte(0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb7b4a9285f9375970af2e4d14c2e7489d0a3e9109da2c700a7e950a14b4c33e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7105, + "startColumn": 15, + "charOffset": 215365, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 7103, + "startColumn": 15, + "charOffset": 215243, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addString(\"Customer Support\", \"ProtocolGame::sendOutfitWindow - Customer Support\");\n\t\tmsg.addByte(0);\n\t\tmsg.addByte(0x00);\n\t\t++outfitSize;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "080fe11b76e041828c10d9f3d6ecb430046c61e2302903f39668526a319881c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "302 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7108, + "startColumn": 21, + "charOffset": 215409, + "charLength": 3, + "snippet": { + "text": "302" + } + }, + "contextRegion": { + "startLine": 7106, + "startColumn": 21, + "charOffset": 215372, + "charLength": 3, + "snippet": { + "text": "\t\t++outfitSize;\n\n\t\tmsg.add(302);\n\t\tmsg.addString(\"Community Manager\", \"ProtocolGame::sendOutfitWindow - Community Manager\");\n\t\tmsg.addByte(0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70da89390626057c73e9478c1eaa9fba80d94e68821033be23767a46eecae672" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7111, + "startColumn": 15, + "charOffset": 215539, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 7109, + "startColumn": 15, + "charOffset": 215415, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addString(\"Community Manager\", \"ProtocolGame::sendOutfitWindow - Community Manager\");\n\t\tmsg.addByte(0);\n\t\tmsg.addByte(0x00);\n\t\t++outfitSize;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7801d4ad52e4030d977abc599b36c2baedc87794cb44a38abce289659291d496" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7117, + "startColumn": 2, + "charOffset": 215643, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7115, + "startColumn": 2, + "charOffset": 215566, + "charLength": 3, + "snippet": { + "text": "\tconst auto outfits = Outfits::getInstance().getOutfits(player->getSex());\n\n\tfor (const auto &outfit : outfits) {\n\t\tuint8_t addons;\n\t\tif (player->getOutfitAddons(outfit, addons)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1160d22d7a4fb3b9541588d45184aacf42f129ba94e844d5c1b60395636e83a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'addons' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7118, + "startColumn": 11, + "charOffset": 215690, + "charLength": 6, + "snippet": { + "text": "addons" + } + }, + "contextRegion": { + "startLine": 7116, + "startColumn": 11, + "charOffset": 215641, + "charLength": 6, + "snippet": { + "text": "\n\tfor (const auto &outfit : outfits) {\n\t\tuint8_t addons;\n\t\tif (player->getOutfitAddons(outfit, addons)) {\n\t\t\tmsg.add(outfit->lookType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b526583436bb5332ca4cb3d278c86ef6ca9e2d4157b9e8958639111b34ebdf17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7119, + "startColumn": 3, + "charOffset": 215700, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 7117, + "startColumn": 3, + "charOffset": 215642, + "charLength": 2, + "snippet": { + "text": "\tfor (const auto &outfit : outfits) {\n\t\tuint8_t addons;\n\t\tif (player->getOutfitAddons(outfit, addons)) {\n\t\t\tmsg.add(outfit->lookType);\n\t\t\tmsg.addString(outfit->name, \"ProtocolGame::sendOutfitWindow - outfit->name\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81242f35193b65568c70ac738781c4cad0858a25f5a32a4c3f49d12524115ed3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7123, + "startColumn": 16, + "charOffset": 215907, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 7121, + "startColumn": 16, + "charOffset": 215787, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.addString(outfit->name, \"ProtocolGame::sendOutfitWindow - outfit->name\");\n\t\t\tmsg.addByte(addons);\n\t\t\tmsg.addByte(0x00);\n\t\t\t++outfitSize;\n\t\t} else if (outfit->lookType == 1210 || outfit->lookType == 1211) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbcc0c2c4e35079efa03d4553f8077858ebd47f6aa9333a63f2fc16fd37fa73f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1210 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7125, + "startColumn": 34, + "charOffset": 215964, + "charLength": 4, + "snippet": { + "text": "1210" + } + }, + "contextRegion": { + "startLine": 7123, + "startColumn": 34, + "charOffset": 215892, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.addByte(0x00);\n\t\t\t++outfitSize;\n\t\t} else if (outfit->lookType == 1210 || outfit->lookType == 1211) {\n\t\t\tif (player->canWear(1210, 0) || player->canWear(1211, 0)) {\n\t\t\t\tmsg.add(outfit->lookType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a0bade33c4b86590d28f72d13dea7bace4a6ddad490f6b86310940b760215e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1211 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7125, + "startColumn": 62, + "charOffset": 215992, + "charLength": 4, + "snippet": { + "text": "1211" + } + }, + "contextRegion": { + "startLine": 7123, + "startColumn": 62, + "charOffset": 215892, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.addByte(0x00);\n\t\t\t++outfitSize;\n\t\t} else if (outfit->lookType == 1210 || outfit->lookType == 1211) {\n\t\t\tif (player->canWear(1210, 0) || player->canWear(1211, 0)) {\n\t\t\t\tmsg.add(outfit->lookType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e11b93c841139ff881158a9cc272eda55c98b397c5bd4637c7741c5986b603d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1210 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7126, + "startColumn": 24, + "charOffset": 216023, + "charLength": 4, + "snippet": { + "text": "1210" + } + }, + "contextRegion": { + "startLine": 7124, + "startColumn": 24, + "charOffset": 215914, + "charLength": 4, + "snippet": { + "text": "\t\t\t++outfitSize;\n\t\t} else if (outfit->lookType == 1210 || outfit->lookType == 1211) {\n\t\t\tif (player->canWear(1210, 0) || player->canWear(1211, 0)) {\n\t\t\t\tmsg.add(outfit->lookType);\n\t\t\t\tmsg.addString(outfit->name, \"ProtocolGame::sendOutfitWindow - outfit->name\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19a1ed567692be88eb7fde113b58d1477f4402386be4130881f1102213e784ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1211 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7126, + "startColumn": 52, + "charOffset": 216051, + "charLength": 4, + "snippet": { + "text": "1211" + } + }, + "contextRegion": { + "startLine": 7124, + "startColumn": 52, + "charOffset": 215914, + "charLength": 4, + "snippet": { + "text": "\t\t\t++outfitSize;\n\t\t} else if (outfit->lookType == 1210 || outfit->lookType == 1211) {\n\t\t\tif (player->canWear(1210, 0) || player->canWear(1211, 0)) {\n\t\t\t\tmsg.add(outfit->lookType);\n\t\t\t\tmsg.addString(outfit->name, \"ProtocolGame::sendOutfitWindow - outfit->name\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b041fe7d97ea42ecee737baebb18e9b54aa4610dcac21172bc3d744aa44186f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7130, + "startColumn": 17, + "charOffset": 216222, + "charLength": 4, + "snippet": { + "text": "0x02" + } + }, + "contextRegion": { + "startLine": 7128, + "startColumn": 17, + "charOffset": 216104, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tmsg.addString(outfit->name, \"ProtocolGame::sendOutfitWindow - outfit->name\");\n\t\t\t\tmsg.addByte(3);\n\t\t\t\tmsg.addByte(0x02);\n\t\t\t\t++outfitSize;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fdb7d8d0363f20102040cf11920b2c0ab77188afdd5d2d99db31d748ff2f7421" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1456 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7133, + "startColumn": 34, + "charOffset": 216285, + "charLength": 4, + "snippet": { + "text": "1456" + } + }, + "contextRegion": { + "startLine": 7131, + "startColumn": 34, + "charOffset": 216229, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t++outfitSize;\n\t\t\t}\n\t\t} else if (outfit->lookType == 1456 || outfit->lookType == 1457) {\n\t\t\tif (player->canWear(1456, 0) || player->canWear(1457, 0)) {\n\t\t\t\tmsg.add(outfit->lookType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e5bfc8da88ac746e06b7f982a9bffe79e5e64f836124af997abaf85c4439cd4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1457 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7133, + "startColumn": 62, + "charOffset": 216313, + "charLength": 4, + "snippet": { + "text": "1457" + } + }, + "contextRegion": { + "startLine": 7131, + "startColumn": 62, + "charOffset": 216229, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t++outfitSize;\n\t\t\t}\n\t\t} else if (outfit->lookType == 1456 || outfit->lookType == 1457) {\n\t\t\tif (player->canWear(1456, 0) || player->canWear(1457, 0)) {\n\t\t\t\tmsg.add(outfit->lookType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6fd45b3dd2470603e1fb92836591e61dcc19d6607507d848487b880dcc6f0ccc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1456 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7134, + "startColumn": 24, + "charOffset": 216344, + "charLength": 4, + "snippet": { + "text": "1456" + } + }, + "contextRegion": { + "startLine": 7132, + "startColumn": 24, + "charOffset": 216247, + "charLength": 4, + "snippet": { + "text": "\t\t\t}\n\t\t} else if (outfit->lookType == 1456 || outfit->lookType == 1457) {\n\t\t\tif (player->canWear(1456, 0) || player->canWear(1457, 0)) {\n\t\t\t\tmsg.add(outfit->lookType);\n\t\t\t\tmsg.addString(outfit->name, \"ProtocolGame::sendOutfitWindow - outfit->name\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c6f7e99c4e9cb96012286340ecf5e7e353b41e1c7d6a0481fcab6246a561e5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1457 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7134, + "startColumn": 52, + "charOffset": 216372, + "charLength": 4, + "snippet": { + "text": "1457" + } + }, + "contextRegion": { + "startLine": 7132, + "startColumn": 52, + "charOffset": 216247, + "charLength": 4, + "snippet": { + "text": "\t\t\t}\n\t\t} else if (outfit->lookType == 1456 || outfit->lookType == 1457) {\n\t\t\tif (player->canWear(1456, 0) || player->canWear(1457, 0)) {\n\t\t\t\tmsg.add(outfit->lookType);\n\t\t\t\tmsg.addString(outfit->name, \"ProtocolGame::sendOutfitWindow - outfit->name\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d761db0cc49edff6556fea6b0aa93f39778f6ad6e0458485173310f340b6196" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7138, + "startColumn": 17, + "charOffset": 216543, + "charLength": 4, + "snippet": { + "text": "0x03" + } + }, + "contextRegion": { + "startLine": 7136, + "startColumn": 17, + "charOffset": 216425, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tmsg.addString(outfit->name, \"ProtocolGame::sendOutfitWindow - outfit->name\");\n\t\t\t\tmsg.addByte(3);\n\t\t\t\tmsg.addByte(0x03);\n\t\t\t\t++outfitSize;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e4fcaf81002b40a50a47a06c8b5a08f984f708f1a3147e0b5468e82c0f04c42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "962 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7144, + "startColumn": 36, + "charOffset": 216769, + "charLength": 3, + "snippet": { + "text": "962" + } + }, + "contextRegion": { + "startLine": 7142, + "startColumn": 36, + "charOffset": 216613, + "charLength": 3, + "snippet": { + "text": "\t\t\tmsg.add(outfit->lookType);\n\t\t\tmsg.addString(outfit->name, \"ProtocolGame::sendOutfitWindow - outfit->name\");\n\t\t\tmsg.addByte(outfit->lookType >= 962 && outfit->lookType <= 975 ? 0 : 3);\n\t\t\tmsg.addByte(0x01);\n\t\t\tmsg.add(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21c6061cfcef197161a67db81f15f9dd6d0c3064c3162518a68810c0046af504" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "975 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7144, + "startColumn": 63, + "charOffset": 216796, + "charLength": 3, + "snippet": { + "text": "975" + } + }, + "contextRegion": { + "startLine": 7142, + "startColumn": 63, + "charOffset": 216613, + "charLength": 3, + "snippet": { + "text": "\t\t\tmsg.add(outfit->lookType);\n\t\t\tmsg.addString(outfit->name, \"ProtocolGame::sendOutfitWindow - outfit->name\");\n\t\t\tmsg.addByte(outfit->lookType >= 962 && outfit->lookType <= 975 ? 0 : 3);\n\t\t\tmsg.addByte(0x01);\n\t\t\tmsg.add(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "284c59784007a43f8ae6cdaff693cb8d5f2904f9108008b6138f2fe3ba9a2b9a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7145, + "startColumn": 16, + "charOffset": 216825, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 7143, + "startColumn": 16, + "charOffset": 216653, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.addString(outfit->name, \"ProtocolGame::sendOutfitWindow - outfit->name\");\n\t\t\tmsg.addByte(outfit->lookType >= 962 && outfit->lookType <= 975 ? 0 : 3);\n\t\t\tmsg.addByte(0x01);\n\t\t\tmsg.add(0x00);\n\t\t\t++outfitSize;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c50c5ae1a3566785f44a9b88b674c590b3af2d43a5c7216c7dbe7f57c5fcfa1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7146, + "startColumn": 22, + "charOffset": 216853, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 7144, + "startColumn": 22, + "charOffset": 216734, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.addByte(outfit->lookType >= 962 && outfit->lookType <= 975 ? 0 : 3);\n\t\t\tmsg.addByte(0x01);\n\t\t\tmsg.add(0x00);\n\t\t\t++outfitSize;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb13a7b9514ff95251d096b014e82b62860153ae161dadfa7a194983ecf4ce61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7166, + "startColumn": 2, + "charOffset": 217290, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7164, + "startColumn": 2, + "charOffset": 217238, + "charLength": 3, + "snippet": { + "text": "\n\tconst auto mounts = g_game().mounts.getMounts();\n\tfor (const auto &mount : mounts) {\n\t\tif (player->hasMount(mount)) {\n\t\t\tmsg.add(mount->clientId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a250444cda1394c3917aee8a806a99756efa3b1b61300ad9384c284014c08d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7167, + "startColumn": 3, + "charOffset": 217327, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 7165, + "startColumn": 3, + "charOffset": 217239, + "charLength": 2, + "snippet": { + "text": "\tconst auto mounts = g_game().mounts.getMounts();\n\tfor (const auto &mount : mounts) {\n\t\tif (player->hasMount(mount)) {\n\t\t\tmsg.add(mount->clientId);\n\t\t\tmsg.addString(mount->name, \"ProtocolGame::sendOutfitWindow - mount->name\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0290cf4bc61996af14ad883c4b3b649670e6a8c58e1107e5252b19fe025cb0a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7170, + "startColumn": 16, + "charOffset": 217491, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 7168, + "startColumn": 16, + "charOffset": 217358, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.add(mount->clientId);\n\t\t\tmsg.addString(mount->name, \"ProtocolGame::sendOutfitWindow - mount->name\");\n\t\t\tmsg.addByte(0x00);\n\t\t\t++mountSize;\n\t\t} else if (mount->type == \"store\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0cdbc7c2d50620516a6e8c8fd5440d7b46b8355e56846f098815bedd975a9799" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7175, + "startColumn": 16, + "charOffset": 217686, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 7173, + "startColumn": 16, + "charOffset": 217553, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.add(mount->clientId);\n\t\t\tmsg.addString(mount->name, \"ProtocolGame::sendOutfitWindow - mount->name\");\n\t\t\tmsg.addByte(0x01);\n\t\t\tmsg.add(0x00);\n\t\t\t++mountSize;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "474054d9e6f8bd6c05c8d6bf1e4ee2b9243854530f8e775302789d0ba0fc96a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7176, + "startColumn": 22, + "charOffset": 217714, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 7174, + "startColumn": 22, + "charOffset": 217592, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.addString(mount->name, \"ProtocolGame::sendOutfitWindow - mount->name\");\n\t\t\tmsg.addByte(0x01);\n\t\t\tmsg.add(0x00);\n\t\t\t++mountSize;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aacd8c8554b8cbc277ed04aa31559205c8508f76508cb94fd4700a0f1741b79e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7197, + "startColumn": 2, + "charOffset": 218192, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7195, + "startColumn": 2, + "charOffset": 218102, + "charLength": 3, + "snippet": { + "text": "\tconst auto familiars = Familiars::getInstance().getFamiliars(player->getVocationId());\n\n\tfor (const auto &familiar : familiars) {\n\t\tif (!player->getFamiliar(familiar)) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6079bd3054687c577d41439a20da02d2b3a1fad868bf6e76b4109ece397f5ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7204, + "startColumn": 15, + "charOffset": 218429, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 7202, + "startColumn": 15, + "charOffset": 218291, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.add(familiar->lookType);\n\t\tmsg.addString(familiar->name, \"ProtocolGame::sendOutfitWindow - familiar.name\");\n\t\tmsg.addByte(0x00);\n\t\tif (++familiarSize == limitFamiliars) {\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1b4f849753a7fec0d49bd61bfb4c65c78959e0c7511edf94d9d5fad8222fbe7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7215, + "startColumn": 14, + "charOffset": 218668, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 7213, + "startColumn": 14, + "charOffset": 218616, + "charLength": 4, + "snippet": { + "text": "\tmsg.setBufferPosition(endFamiliars);\n\n\tmsg.addByte(0x00); // Try outfit\n\tmsg.addByte(mounted ? 0x01 : 0x00);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b905ff3237d724d790efa48c0b6ef88c123b969e0faa8e1efde1cfdbc2c21d89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7219, + "startColumn": 40, + "charOffset": 218806, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 7217, + "startColumn": 40, + "charOffset": 218726, + "charLength": 6, + "snippet": { + "text": "\n\t// Version 12.81 - Random mount 'bool'\n\tmsg.addByte(isSupportOutfit ? 0x00 : (player->isRandomMounted() ? 0x01 : 0x00));\n\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "edb1348024a6f2ad8f5be2d6b35a4c52c5240824ec822d03ac85d4c1dfa1c860" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-avoid-nested-conditional-operator", + "ruleIndex": 688, + "kind": "fail", + "level": "warning", + "message": { + "text": "conditional operator is used as sub-expression of parent conditional operator, refrain from using nested conditional operators" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7219, + "startColumn": 40, + "charOffset": 218806, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 7217, + "startColumn": 40, + "charOffset": 218726, + "charLength": 6, + "snippet": { + "text": "\n\t// Version 12.81 - Random mount 'bool'\n\tmsg.addByte(isSupportOutfit ? 0x00 : (player->isRandomMounted() ? 0x01 : 0x00));\n\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbaab4dcb30517e0d19621ce7dca909fa487815b031920e633678d8fb0825691" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7219, + "startColumn": 40, + "charOffset": 218806, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 7217, + "startColumn": 40, + "charOffset": 218726, + "charLength": 6, + "snippet": { + "text": "\n\t// Version 12.81 - Random mount 'bool'\n\tmsg.addByte(isSupportOutfit ? 0x00 : (player->isRandomMounted() ? 0x01 : 0x00));\n\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f16401e47d723e336cd08625645936238f78ab77a190978b19a0cdaf5386d945" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'podium' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7224, + "startColumn": 59, + "charOffset": 218938, + "charLength": 6, + "snippet": { + "text": "podium" + } + }, + "contextRegion": { + "startLine": 7222, + "startColumn": 59, + "charOffset": 218877, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendPodiumWindow(std::shared_ptr podium, const Position &position, uint16_t itemId, uint8_t stackpos) {\n\tif (!podium || oldProtocol) {\n\t\tg_logger().error(\"[{}] item is nullptr\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "107a9bba80cf734b8bef2fa4dd2014ff80a3fd21a81ba5e9fe7b65eefa8b0381" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'sendPodiumWindow' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7224, + "startColumn": 93, + "charOffset": 218972, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 7222, + "startColumn": 93, + "charOffset": 218877, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendPodiumWindow(std::shared_ptr podium, const Position &position, uint16_t itemId, uint8_t stackpos) {\n\tif (!podium || oldProtocol) {\n\t\tg_logger().error(\"[{}] item is nullptr\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d91b1daa5278e6b91d9ca8a28057e36257f84633e9cf14c0919dd45788eef4f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7225, + "startColumn": 6, + "charOffset": 219014, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7223, + "startColumn": 6, + "charOffset": 218879, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendPodiumWindow(std::shared_ptr podium, const Position &position, uint16_t itemId, uint8_t stackpos) {\n\tif (!podium || oldProtocol) {\n\t\tg_logger().error(\"[{}] item is nullptr\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11572932cc7dc43e66e6765cb778b64e2224e4db7b9a64c7fce935952b33f595" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7231, + "startColumn": 14, + "charOffset": 219146, + "charLength": 4, + "snippet": { + "text": "0xC8" + } + }, + "contextRegion": { + "startLine": 7229, + "startColumn": 14, + "charOffset": 219111, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xC8);\n\n\tconst auto podiumVisible = podium->getCustomAttribute(\"PodiumVisible\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c30c63abc9326c9fa7eb695134854687ac03df1fe06b66bacb564a16a9b1e0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xC8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7231, + "startColumn": 14, + "charOffset": 219146, + "charLength": 4, + "snippet": { + "text": "0xC8" + } + }, + "contextRegion": { + "startLine": 7229, + "startColumn": 14, + "charOffset": 219111, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xC8);\n\n\tconst auto podiumVisible = podium->getCustomAttribute(\"PodiumVisible\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a8ae7e85efa4d4f670536b3bc5ec32e6e3df0775e8ac8a1ab71dc80cb09057f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto podiumVisible' can be declared as 'const auto *const podiumVisible'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7233, + "startColumn": 2, + "charOffset": 219155, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 7231, + "startColumn": 2, + "charOffset": 219133, + "charLength": 5, + "snippet": { + "text": "\tmsg.addByte(0xC8);\n\n\tconst auto podiumVisible = podium->getCustomAttribute(\"PodiumVisible\");\n\tconst auto lookType = podium->getCustomAttribute(\"LookType\");\n\tconst auto lookMount = podium->getCustomAttribute(\"LookMount\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5c7f00fd0eb7d3f5e2c9f1f89c7f883c143c1a8038ce4079775d7b7e5a8ac25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto lookType' can be declared as 'const auto *const lookType'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7234, + "startColumn": 2, + "charOffset": 219228, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 7232, + "startColumn": 2, + "charOffset": 219153, + "charLength": 5, + "snippet": { + "text": "\n\tconst auto podiumVisible = podium->getCustomAttribute(\"PodiumVisible\");\n\tconst auto lookType = podium->getCustomAttribute(\"LookType\");\n\tconst auto lookMount = podium->getCustomAttribute(\"LookMount\");\n\tconst auto lookDirection = podium->getCustomAttribute(\"LookDirection\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb57cb9747c89849a4d4f038c2d0cacce6daa186fec4aa06f56defdf5fc512f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto lookMount' can be declared as 'const auto *const lookMount'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7235, + "startColumn": 2, + "charOffset": 219291, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 7233, + "startColumn": 2, + "charOffset": 219154, + "charLength": 5, + "snippet": { + "text": "\tconst auto podiumVisible = podium->getCustomAttribute(\"PodiumVisible\");\n\tconst auto lookType = podium->getCustomAttribute(\"LookType\");\n\tconst auto lookMount = podium->getCustomAttribute(\"LookMount\");\n\tconst auto lookDirection = podium->getCustomAttribute(\"LookDirection\");\n\tif (lookType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bdbdeddb2c814eb3896bb44f161252085d8c5d75565663bb7bbba8a0c723c648" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto lookDirection' can be declared as 'const auto *const lookDirection'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7236, + "startColumn": 2, + "charOffset": 219356, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 7234, + "startColumn": 2, + "charOffset": 219227, + "charLength": 5, + "snippet": { + "text": "\tconst auto lookType = podium->getCustomAttribute(\"LookType\");\n\tconst auto lookMount = podium->getCustomAttribute(\"LookMount\");\n\tconst auto lookDirection = podium->getCustomAttribute(\"LookDirection\");\n\tif (lookType) {\n\t\taddOutfitAndMountBytes(msg, podium, lookType, \"LookHead\", \"LookBody\", \"LookLegs\", \"LookFeet\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b4deaf39496a26775b6b416cc577d9ff7119d84f2978c2e6ebd16c295e0adce5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7237, + "startColumn": 6, + "charOffset": 219433, + "charLength": 8, + "snippet": { + "text": "lookType" + } + }, + "contextRegion": { + "startLine": 7235, + "startColumn": 6, + "charOffset": 219290, + "charLength": 8, + "snippet": { + "text": "\tconst auto lookMount = podium->getCustomAttribute(\"LookMount\");\n\tconst auto lookDirection = podium->getCustomAttribute(\"LookDirection\");\n\tif (lookType) {\n\t\taddOutfitAndMountBytes(msg, podium, lookType, \"LookHead\", \"LookBody\", \"LookLegs\", \"LookFeet\", true);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd8f64b1afe0ff90f611bd0fbe0986a1418a3f53ac17a18c0fac28809a065978" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7237, + "startColumn": 6, + "charOffset": 219433, + "charLength": 8, + "snippet": { + "text": "lookType" + } + }, + "contextRegion": { + "startLine": 7235, + "startColumn": 6, + "charOffset": 219290, + "charLength": 8, + "snippet": { + "text": "\tconst auto lookMount = podium->getCustomAttribute(\"LookMount\");\n\tconst auto lookDirection = podium->getCustomAttribute(\"LookDirection\");\n\tif (lookType) {\n\t\taddOutfitAndMountBytes(msg, podium, lookType, \"LookHead\", \"LookBody\", \"LookLegs\", \"LookFeet\", true);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6a2951a880d49a9d4acdfa2188ef38c5f7ef8060f127ac72fceda64d811cb4f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7243, + "startColumn": 6, + "charOffset": 219591, + "charLength": 9, + "snippet": { + "text": "lookMount" + } + }, + "contextRegion": { + "startLine": 7241, + "startColumn": 6, + "charOffset": 219582, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tif (lookMount) {\n\t\taddOutfitAndMountBytes(msg, podium, lookMount, \"LookMountHead\", \"LookMountBody\", \"LookMountLegs\", \"LookMountFeet\");\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d45315ca925d7823b039c8ca38d79e4e819d28e02550084c9761475e8b9bae2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7243, + "startColumn": 6, + "charOffset": 219591, + "charLength": 9, + "snippet": { + "text": "lookMount" + } + }, + "contextRegion": { + "startLine": 7241, + "startColumn": 6, + "charOffset": 219582, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tif (lookMount) {\n\t\taddOutfitAndMountBytes(msg, podium, lookMount, \"LookMountHead\", \"LookMountBody\", \"LookMountLegs\", \"LookMountFeet\");\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "daf6664b53163825b47c5600cfcb2f1be2e6835e59a5d73fc08a4649aa83a0de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7260, + "startColumn": 2, + "charOffset": 220086, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7258, + "startColumn": 2, + "charOffset": 220009, + "charLength": 3, + "snippet": { + "text": "\n\tconst auto outfits = Outfits::getInstance().getOutfits(player->getSex());\n\tfor (const auto &outfit : outfits) {\n\t\tuint8_t addons;\n\t\tif (!player->getOutfitAddons(outfit, addons)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce1889895d3d208b725789e0b78a1a386f067812e65bbf47d1762afe4c536b02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'addons' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7261, + "startColumn": 11, + "charOffset": 220133, + "charLength": 6, + "snippet": { + "text": "addons" + } + }, + "contextRegion": { + "startLine": 7259, + "startColumn": 11, + "charOffset": 220010, + "charLength": 6, + "snippet": { + "text": "\tconst auto outfits = Outfits::getInstance().getOutfits(player->getSex());\n\tfor (const auto &outfit : outfits) {\n\t\tuint8_t addons;\n\t\tif (!player->getOutfitAddons(outfit, addons)) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2200c4c0f3e8c3ba06214d54cbca061d9582ab55f626a3ee20c42492d94ab0e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7269, + "startColumn": 15, + "charOffset": 220365, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 7267, + "startColumn": 15, + "charOffset": 220248, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addString(outfit->name, \"ProtocolGame::sendPodiumWindow - outfit->name\");\n\t\tmsg.addByte(addons);\n\t\tmsg.addByte(0x00);\n\t\tif (++outfitSize == limitOutfits) {\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07f9b4eed6bf79a9fc1ae2297a3b93402f046a5dee08206668c8ccd5618a5935" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7286, + "startColumn": 2, + "charOffset": 220782, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7284, + "startColumn": 2, + "charOffset": 220730, + "charLength": 3, + "snippet": { + "text": "\n\tconst auto mounts = g_game().mounts.getMounts();\n\tfor (const auto &mount : mounts) {\n\t\tif (player->hasMount(mount)) {\n\t\t\tmsg.add(mount->clientId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a571f5e85a9feecb803385b5bb76555aae81388504a04a35134fd59b8424f83" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7290, + "startColumn": 16, + "charOffset": 220983, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 7288, + "startColumn": 16, + "charOffset": 220850, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.add(mount->clientId);\n\t\t\tmsg.addString(mount->name, \"ProtocolGame::sendPodiumWindow - mount->name\");\n\t\t\tmsg.addByte(0x00);\n\t\t\tif (++mountSize == limitMounts) {\n\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6453747c4eec6e8f7308db54c1be6dc5104c3c70762d64ff6320a3bdc34869a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7304, + "startColumn": 14, + "charOffset": 221235, + "charLength": 4, + "snippet": { + "text": "0x05" + } + }, + "contextRegion": { + "startLine": 7302, + "startColumn": 14, + "charOffset": 221198, + "charLength": 4, + "snippet": { + "text": "\tmsg.add(0);\n\n\tmsg.addByte(0x05);\n\tmsg.addByte(lookMount ? 0x01 : 0x00);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c649f214ee19e4f9a07d4534affc51d02958848f5a166353872445e523044bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x05 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7304, + "startColumn": 14, + "charOffset": 221235, + "charLength": 4, + "snippet": { + "text": "0x05" + } + }, + "contextRegion": { + "startLine": 7302, + "startColumn": 14, + "charOffset": 221198, + "charLength": 4, + "snippet": { + "text": "\tmsg.add(0);\n\n\tmsg.addByte(0x05);\n\tmsg.addByte(lookMount ? 0x01 : 0x00);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d298d1803a705b9cca4afae53423fa48de6108ef53b1faecef419c957427fb9c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7305, + "startColumn": 14, + "charOffset": 221255, + "charLength": 9, + "snippet": { + "text": "lookMount" + } + }, + "contextRegion": { + "startLine": 7303, + "startColumn": 14, + "charOffset": 221221, + "charLength": 9, + "snippet": { + "text": "\n\tmsg.addByte(0x05);\n\tmsg.addByte(lookMount ? 0x01 : 0x00);\n\n\tmsg.add(0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2387cbfaad1b977a2d958d6e940795bdb30576eb823e35f1e2902acb6bdbb03c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7305, + "startColumn": 14, + "charOffset": 221255, + "charLength": 9, + "snippet": { + "text": "lookMount" + } + }, + "contextRegion": { + "startLine": 7303, + "startColumn": 14, + "charOffset": 221221, + "charLength": 9, + "snippet": { + "text": "\n\tmsg.addByte(0x05);\n\tmsg.addByte(lookMount ? 0x01 : 0x00);\n\n\tmsg.add(0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e83048fd183628e6c0e1262307ee28f3f86fedc580cad845d410378d24786d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7313, + "startColumn": 14, + "charOffset": 221400, + "charLength": 13, + "snippet": { + "text": "podiumVisible" + } + }, + "contextRegion": { + "startLine": 7311, + "startColumn": 14, + "charOffset": 221362, + "charLength": 13, + "snippet": { + "text": "\tmsg.addByte(stackpos);\n\n\tmsg.addByte(podiumVisible ? podiumVisible->getAttribute() : 0x01);\n\tmsg.addByte(lookType ? 0x01 : 0x00);\n\tmsg.addByte(lookDirection ? lookDirection->getAttribute() : 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dcf240e3e780f846b976bd41fbed9b9ab2da24c51f4e6571f448b3d8fbf904c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7313, + "startColumn": 14, + "charOffset": 221400, + "charLength": 13, + "snippet": { + "text": "podiumVisible" + } + }, + "contextRegion": { + "startLine": 7311, + "startColumn": 14, + "charOffset": 221362, + "charLength": 13, + "snippet": { + "text": "\tmsg.addByte(stackpos);\n\n\tmsg.addByte(podiumVisible ? podiumVisible->getAttribute() : 0x01);\n\tmsg.addByte(lookType ? 0x01 : 0x00);\n\tmsg.addByte(lookDirection ? lookDirection->getAttribute() : 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b45531435bf59c4ea15ac4634d6dd1e1b46f46cb4d34fc2a6258b3e945edee3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7313, + "startColumn": 14, + "charOffset": 221400, + "charLength": 13, + "snippet": { + "text": "podiumVisible" + } + }, + "contextRegion": { + "startLine": 7311, + "startColumn": 14, + "charOffset": 221362, + "charLength": 13, + "snippet": { + "text": "\tmsg.addByte(stackpos);\n\n\tmsg.addByte(podiumVisible ? podiumVisible->getAttribute() : 0x01);\n\tmsg.addByte(lookType ? 0x01 : 0x00);\n\tmsg.addByte(lookDirection ? lookDirection->getAttribute() : 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "275a3600db90727358b555b245dbdcaa77534d27718a4b388f1e5f47da4abcfb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7314, + "startColumn": 14, + "charOffset": 221477, + "charLength": 8, + "snippet": { + "text": "lookType" + } + }, + "contextRegion": { + "startLine": 7312, + "startColumn": 14, + "charOffset": 221386, + "charLength": 8, + "snippet": { + "text": "\n\tmsg.addByte(podiumVisible ? podiumVisible->getAttribute() : 0x01);\n\tmsg.addByte(lookType ? 0x01 : 0x00);\n\tmsg.addByte(lookDirection ? lookDirection->getAttribute() : 2);\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e42b726de814ea7c57ce9677dedcdf241e6457d40f3b22a0dc916910e4b8d92" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7314, + "startColumn": 14, + "charOffset": 221477, + "charLength": 8, + "snippet": { + "text": "lookType" + } + }, + "contextRegion": { + "startLine": 7312, + "startColumn": 14, + "charOffset": 221386, + "charLength": 8, + "snippet": { + "text": "\n\tmsg.addByte(podiumVisible ? podiumVisible->getAttribute() : 0x01);\n\tmsg.addByte(lookType ? 0x01 : 0x00);\n\tmsg.addByte(lookDirection ? lookDirection->getAttribute() : 2);\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "549d7b2de3d2425f668dc9f129624c4a3be4a83652a7e3025a2f5a633f2217c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7315, + "startColumn": 14, + "charOffset": 221515, + "charLength": 13, + "snippet": { + "text": "lookDirection" + } + }, + "contextRegion": { + "startLine": 7313, + "startColumn": 14, + "charOffset": 221387, + "charLength": 13, + "snippet": { + "text": "\tmsg.addByte(podiumVisible ? podiumVisible->getAttribute() : 0x01);\n\tmsg.addByte(lookType ? 0x01 : 0x00);\n\tmsg.addByte(lookDirection ? lookDirection->getAttribute() : 2);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8d69ebb4691122847414644d6a9a4751672855b0301acc788ccfe1aa134e4f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7315, + "startColumn": 14, + "charOffset": 221515, + "charLength": 13, + "snippet": { + "text": "lookDirection" + } + }, + "contextRegion": { + "startLine": 7313, + "startColumn": 14, + "charOffset": 221387, + "charLength": 13, + "snippet": { + "text": "\tmsg.addByte(podiumVisible ? podiumVisible->getAttribute() : 0x01);\n\tmsg.addByte(lookType ? 0x01 : 0x00);\n\tmsg.addByte(lookDirection ? lookDirection->getAttribute() : 2);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1fdc4bd4f831aaf47e714584e82a8aa294c16fc99272393a66e453e61d0c85b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7315, + "startColumn": 14, + "charOffset": 221515, + "charLength": 13, + "snippet": { + "text": "lookDirection" + } + }, + "contextRegion": { + "startLine": 7313, + "startColumn": 14, + "charOffset": 221387, + "charLength": 13, + "snippet": { + "text": "\tmsg.addByte(podiumVisible ? podiumVisible->getAttribute() : 0x01);\n\tmsg.addByte(lookType ? 0x01 : 0x00);\n\tmsg.addByte(lookDirection ? lookDirection->getAttribute() : 2);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1db49fd0b563c48f5dbcaa89af289226bf9e0763bd50745ac63a97b933619848" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7325, + "startColumn": 14, + "charOffset": 221792, + "charLength": 4, + "snippet": { + "text": "0xD3" + } + }, + "contextRegion": { + "startLine": 7323, + "startColumn": 14, + "charOffset": 221757, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xD3);\n\tmsg.add(guid);\n\tmsg.addByte(enumToValue(newStatus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e306678a8fc3a4893d1736725b86a944632af2c2ed499a0b939e34299abb604" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xD3 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7325, + "startColumn": 14, + "charOffset": 221792, + "charLength": 4, + "snippet": { + "text": "0xD3" + } + }, + "contextRegion": { + "startLine": 7323, + "startColumn": 14, + "charOffset": 221757, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xD3);\n\tmsg.add(guid);\n\tmsg.addByte(enumToValue(newStatus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed38d719d88495d6ed9fcb1b9f262a7ea1c463386b4a41aa8a24d17e1e3dbbe1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7337, + "startColumn": 14, + "charOffset": 222145, + "charLength": 4, + "snippet": { + "text": "0xD2" + } + }, + "contextRegion": { + "startLine": 7335, + "startColumn": 14, + "charOffset": 222110, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xD2);\n\tmsg.add(guid);\n\tmsg.addString(name, \"ProtocolGame::sendVIP - name\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc295e822360dbb2aa64533202bf8259f6a4064cf3125576a10197795f5c6093" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xD2 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7337, + "startColumn": 14, + "charOffset": 222145, + "charLength": 4, + "snippet": { + "text": "0xD2" + } + }, + "contextRegion": { + "startLine": 7335, + "startColumn": 14, + "charOffset": 222110, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xD2);\n\tmsg.add(guid);\n\tmsg.addString(name, \"ProtocolGame::sendVIP - name\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3091ede1865e956b7204f35a9257c516b98d712e55da5ab6bb5f9e0bb84c5176" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7341, + "startColumn": 39, + "charOffset": 222338, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 7339, + "startColumn": 39, + "charOffset": 222178, + "charLength": 2, + "snippet": { + "text": "\tmsg.addString(name, \"ProtocolGame::sendVIP - name\");\n\tmsg.addString(description, \"ProtocolGame::sendVIP - description\");\n\tmsg.add(std::min(10, icon));\n\tmsg.addByte(notify ? 0x01 : 0x00);\n\tmsg.addByte(enumToValue(status));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ffd2bdf4cdc06dfa85e11151803efc2472a417ce8745437ef6b44b9020c5fb4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7348, + "startColumn": 15, + "charOffset": 222532, + "charLength": 13, + "snippet": { + "text": "vipGuidGroups" + } + }, + "contextRegion": { + "startLine": 7346, + "startColumn": 15, + "charOffset": 222496, + "charLength": 13, + "snippet": { + "text": "\n\tif (!oldProtocol) {\n\t\tmsg.addByte(vipGuidGroups.size()); // vipGroups\n\t\tfor (const auto &vipGroupID : vipGuidGroups) {\n\t\t\tmsg.addByte(vipGroupID);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3c9b16fd2cd00d0f77b2cb6ddf2a6579c6997d20b7cd7fa92cbd8ae99f3baf9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7349, + "startColumn": 3, + "charOffset": 222570, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7347, + "startColumn": 3, + "charOffset": 222497, + "charLength": 3, + "snippet": { + "text": "\tif (!oldProtocol) {\n\t\tmsg.addByte(vipGuidGroups.size()); // vipGroups\n\t\tfor (const auto &vipGroupID : vipGuidGroups) {\n\t\t\tmsg.addByte(vipGroupID);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "18af8b80a262b9d7c0f302c1ea429f4bfd407d861cc0da5d10a5865762e3c0bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7365, + "startColumn": 14, + "charOffset": 222842, + "charLength": 4, + "snippet": { + "text": "0xD4" + } + }, + "contextRegion": { + "startLine": 7363, + "startColumn": 14, + "charOffset": 222807, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xD4);\n\tmsg.addByte(vipGroups.size()); // vipGroups.size()\n\tfor (const auto &vipGroup : vipGroups) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5683a403a2a4e820bf9a9c26c2a2e5a1496bab8621e3ad91611f4c62ce5d37f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xD4 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7365, + "startColumn": 14, + "charOffset": 222842, + "charLength": 4, + "snippet": { + "text": "0xD4" + } + }, + "contextRegion": { + "startLine": 7363, + "startColumn": 14, + "charOffset": 222807, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xD4);\n\tmsg.addByte(vipGroups.size()); // vipGroups.size()\n\tfor (const auto &vipGroup : vipGroups) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "582ea5899392b63692ca27a1d7e53c9e19c841c5b83c1ad3cb7daf2e02fa2f93" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7366, + "startColumn": 14, + "charOffset": 222862, + "charLength": 9, + "snippet": { + "text": "vipGroups" + } + }, + "contextRegion": { + "startLine": 7364, + "startColumn": 14, + "charOffset": 222808, + "charLength": 9, + "snippet": { + "text": "\tNetworkMessage msg;\n\tmsg.addByte(0xD4);\n\tmsg.addByte(vipGroups.size()); // vipGroups.size()\n\tfor (const auto &vipGroup : vipGroups) {\n\t\tmsg.addByte(vipGroup->id);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73f2f035170ced82ce864383ff398c695f8df03d764c451ee52d302cd44f5295" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7367, + "startColumn": 2, + "charOffset": 222902, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7365, + "startColumn": 2, + "charOffset": 222829, + "charLength": 3, + "snippet": { + "text": "\tmsg.addByte(0xD4);\n\tmsg.addByte(vipGroups.size()); // vipGroups.size()\n\tfor (const auto &vipGroup : vipGroups) {\n\t\tmsg.addByte(vipGroup->id);\n\t\tmsg.addString(vipGroup->name, \"ProtocolGame::sendVIP - vipGroup.name\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce1889895d3d208b725789e0b78a1a386f067812e65bbf47d1762afe4c536b02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'sendSpellCooldown' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7377, + "startColumn": 38, + "charOffset": 223306, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 7375, + "startColumn": 38, + "charOffset": 223266, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendSpellCooldown(uint16_t spellId, uint32_t time) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xA4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c83be458b02e8febfa23a8023f29242199737169ffc7c799ee10d6725515fe7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7379, + "startColumn": 14, + "charOffset": 223375, + "charLength": 4, + "snippet": { + "text": "0xA4" + } + }, + "contextRegion": { + "startLine": 7377, + "startColumn": 14, + "charOffset": 223269, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendSpellCooldown(uint16_t spellId, uint32_t time) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xA4);\n\tif (oldProtocol && spellId >= 170) {\n\t\tmsg.addByte(170);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ee6aa1eac8fc405002f1f7ca65548c4cf7b3036db88d7c8e6aabe0aeec7ac64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xA4 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7379, + "startColumn": 14, + "charOffset": 223375, + "charLength": 4, + "snippet": { + "text": "0xA4" + } + }, + "contextRegion": { + "startLine": 7377, + "startColumn": 14, + "charOffset": 223269, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendSpellCooldown(uint16_t spellId, uint32_t time) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xA4);\n\tif (oldProtocol && spellId >= 170) {\n\t\tmsg.addByte(170);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b649587aea57325c14a3d136f7bf9add0514bffa1ad7d09d0e30a8c3d601b49d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "170 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7380, + "startColumn": 32, + "charOffset": 223413, + "charLength": 3, + "snippet": { + "text": "170" + } + }, + "contextRegion": { + "startLine": 7378, + "startColumn": 32, + "charOffset": 223341, + "charLength": 3, + "snippet": { + "text": "\tNetworkMessage msg;\n\tmsg.addByte(0xA4);\n\tif (oldProtocol && spellId >= 170) {\n\t\tmsg.addByte(170);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb48bafa146301aecf1de8d926b23afc351262263ca11c7f99abd868f68b02f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "170 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7381, + "startColumn": 15, + "charOffset": 223434, + "charLength": 3, + "snippet": { + "text": "170" + } + }, + "contextRegion": { + "startLine": 7379, + "startColumn": 15, + "charOffset": 223362, + "charLength": 3, + "snippet": { + "text": "\tmsg.addByte(0xA4);\n\tif (oldProtocol && spellId >= 170) {\n\t\tmsg.addByte(170);\n\t} else {\n\t\tif (oldProtocol) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a068d6417b2481d5db64d148cb755ddb04d5ab0ff7940c9b85bea1fb0999ebd9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7384, + "startColumn": 16, + "charOffset": 223486, + "charLength": 7, + "snippet": { + "text": "spellId" + } + }, + "contextRegion": { + "startLine": 7382, + "startColumn": 16, + "charOffset": 223440, + "charLength": 7, + "snippet": { + "text": "\t} else {\n\t\tif (oldProtocol) {\n\t\t\tmsg.addByte(spellId);\n\t\t} else {\n\t\t\tmsg.add(spellId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68505652146f29f7be2f402b175782b02ee67e7104d15fdae9f1f63013352b9b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7399, + "startColumn": 14, + "charOffset": 223750, + "charLength": 4, + "snippet": { + "text": "0xA5" + } + }, + "contextRegion": { + "startLine": 7397, + "startColumn": 14, + "charOffset": 223715, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xA5);\n\tmsg.addByte(groupId);\n\tmsg.add(time);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "acde2745a38d2889221fcb1f50c9b34016afb626ef9536ac8a4d6dd6e5c48e6e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xA5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7399, + "startColumn": 14, + "charOffset": 223750, + "charLength": 4, + "snippet": { + "text": "0xA5" + } + }, + "contextRegion": { + "startLine": 7397, + "startColumn": 14, + "charOffset": 223715, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xA5);\n\tmsg.addByte(groupId);\n\tmsg.add(time);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fbf9d65df1a8930c1fe348b541984ed818a4777bbac86f54431912eff237062d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7406, + "startColumn": 6, + "charOffset": 223897, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7404, + "startColumn": 6, + "charOffset": 223835, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendUseItemCooldown(uint32_t time) {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39237276ea065eb310549a3449b74690735781115818fbf6dca29562fd637525" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7411, + "startColumn": 14, + "charOffset": 223971, + "charLength": 4, + "snippet": { + "text": "0xA6" + } + }, + "contextRegion": { + "startLine": 7409, + "startColumn": 14, + "charOffset": 223936, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xA6);\n\tmsg.add(time);\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51bfec819dd6d3c1e249917e4bfe5099fff7b648d2ee2f9f6984675f195d8828" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xA6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7411, + "startColumn": 14, + "charOffset": 223971, + "charLength": 4, + "snippet": { + "text": "0xA6" + } + }, + "contextRegion": { + "startLine": 7409, + "startColumn": 14, + "charOffset": 223936, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xA6);\n\tmsg.add(time);\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72ab26f7461134cf3b1c05efebdfaabf0fbc262bcb17ee86ba4ee5c0f939c29e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7417, + "startColumn": 6, + "charOffset": 224116, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7415, + "startColumn": 6, + "charOffset": 224033, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendPreyTimeLeft(const std::unique_ptr &slot) {\n\tif (!player || !slot) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dee40691903862d8ce4b7fd5dfbec3843a86953075bd7992995cb1f1971f8cd7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7417, + "startColumn": 17, + "charOffset": 224127, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7415, + "startColumn": 17, + "charOffset": 224033, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendPreyTimeLeft(const std::unique_ptr &slot) {\n\tif (!player || !slot) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea497a040d144124c181aa88e3c78327164cfd0e656ec3f216999c95d1d2450e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7423, + "startColumn": 14, + "charOffset": 224185, + "charLength": 4, + "snippet": { + "text": "0xE7" + } + }, + "contextRegion": { + "startLine": 7421, + "startColumn": 14, + "charOffset": 224150, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\n\tmsg.addByte(0xE7);\n\tmsg.addByte(static_cast(slot->id));\n\tmsg.add(slot->bonusTimeLeft);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5feb3a38eb4e69c7c6df147f0fe3cb363306707ee2a277ce8caa02321d718b5c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xE7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7423, + "startColumn": 14, + "charOffset": 224185, + "charLength": 4, + "snippet": { + "text": "0xE7" + } + }, + "contextRegion": { + "startLine": 7421, + "startColumn": 14, + "charOffset": 224150, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\n\tmsg.addByte(0xE7);\n\tmsg.addByte(static_cast(slot->id));\n\tmsg.add(slot->bonusTimeLeft);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "18860f44751aec8b71e7f32eaea55144606cfb255aab63a8304832f4fb1002ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'sendPreyData' has cognitive complexity of 42 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7430, + "startColumn": 20, + "charOffset": 224329, + "charLength": 12, + "snippet": { + "text": "sendPreyData" + } + }, + "contextRegion": { + "startLine": 7428, + "startColumn": 20, + "charOffset": 224307, + "charLength": 12, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendPreyData(const std::unique_ptr &slot) {\n\tif (!player) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "777a743e9ffb727ebf0ce30fadb0d4decf2848a777600d382a9343aec6d627b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7431, + "startColumn": 6, + "charOffset": 224388, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7429, + "startColumn": 6, + "charOffset": 224309, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendPreyData(const std::unique_ptr &slot) {\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41d603ce1484f3c3593e491d13753bfe8199150744fd439315407d05a069efc6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7436, + "startColumn": 14, + "charOffset": 224447, + "charLength": 4, + "snippet": { + "text": "0xE8" + } + }, + "contextRegion": { + "startLine": 7434, + "startColumn": 14, + "charOffset": 224412, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xE8);\n\tstd::vector validRaceIds;\n\tfor (auto raceId : slot->raceIdList) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87b1cf9dafc366847fd1a68219fae1905c00ca0544d389ccf33cf295d3b91410" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xE8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7436, + "startColumn": 14, + "charOffset": 224447, + "charLength": 4, + "snippet": { + "text": "0xE8" + } + }, + "contextRegion": { + "startLine": 7434, + "startColumn": 14, + "charOffset": 224412, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xE8);\n\tstd::vector validRaceIds;\n\tfor (auto raceId : slot->raceIdList) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93b1c8dcf77be9b6c6994ddcd2dee00c3d5d59b210d007c0ad08ce3ab8bd3a19" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7438, + "startColumn": 2, + "charOffset": 224492, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7436, + "startColumn": 2, + "charOffset": 224434, + "charLength": 3, + "snippet": { + "text": "\tmsg.addByte(0xE8);\n\tstd::vector validRaceIds;\n\tfor (auto raceId : slot->raceIdList) {\n\t\tif (g_monsters().getMonsterTypeByRaceId(raceId)) {\n\t\t\tvalidRaceIds.push_back(raceId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc6dfc5f45301e326c6adfb96f52fab9b069485f0c037ebc4cd1e1e068a21a15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7484, + "startColumn": 3, + "charOffset": 226133, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7482, + "startColumn": 3, + "charOffset": 226019, + "charLength": 3, + "snippet": { + "text": "\t} else if (slot->state == PreyDataState_Selection) {\n\t\tmsg.addByte(static_cast(validRaceIds.size()));\n\t\tfor (uint16_t raceId : validRaceIds) {\n\t\t\tconst auto mtype = g_monsters().getMonsterTypeByRaceId(raceId);\n\t\t\tif (!mtype) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ca1b9f46b2ac25729ca835b07a822f4be957701ca204c6fd19ba18163538ad6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7486, + "startColumn": 8, + "charOffset": 226246, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7484, + "startColumn": 8, + "charOffset": 226131, + "charLength": 1, + "snippet": { + "text": "\t\tfor (uint16_t raceId : validRaceIds) {\n\t\t\tconst auto mtype = g_monsters().getMonsterTypeByRaceId(raceId);\n\t\t\tif (!mtype) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca3e851da8db7125342b8e835c43807a73ccbe84f2a211d9de78ec24a91e39d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7509, + "startColumn": 3, + "charOffset": 226956, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7507, + "startColumn": 3, + "charOffset": 226862, + "charLength": 3, + "snippet": { + "text": "\t\tmsg.addByte(slot->bonusRarity);\n\t\tmsg.addByte(static_cast(validRaceIds.size()));\n\t\tfor (uint16_t raceId : validRaceIds) {\n\t\t\tconst auto mtype = g_monsters().getMonsterTypeByRaceId(raceId);\n\t\t\tif (!mtype) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47dcef7acf7b90fe438c27cb5bbe5132083531d23f0def805f45e22408b1375c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7511, + "startColumn": 8, + "charOffset": 227069, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7509, + "startColumn": 8, + "charOffset": 226954, + "charLength": 1, + "snippet": { + "text": "\t\tfor (uint16_t raceId : validRaceIds) {\n\t\t\tconst auto mtype = g_monsters().getMonsterTypeByRaceId(raceId);\n\t\t\tif (!mtype) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25de5d7915493a3f82f97593c3b3b3c436d8f43148533d768b7583dd0ed9de51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7532, + "startColumn": 3, + "charOffset": 227732, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 7530, + "startColumn": 3, + "charOffset": 227582, + "charLength": 3, + "snippet": { + "text": "\t\tconst std::map bestiaryList = g_game().getBestiaryList();\n\t\tmsg.add(static_cast(bestiaryList.size()));\n\t\tstd::for_each(bestiaryList.begin(), bestiaryList.end(), [&msg](auto mType) {\n\t\t\tmsg.add(mType.first);\n\t\t});" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76f9b4cbed9a6cad8da9eb9053ed036e91098f5eca0c96accd358982cdee3fa6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7543, + "startColumn": 39, + "charOffset": 228184, + "charLength": 5, + "snippet": { + "text": "60000" + } + }, + "contextRegion": { + "startLine": 7541, + "startColumn": 39, + "charOffset": 228000, + "charLength": 5, + "snippet": { + "text": "\t\tauto currentTime = OTSYS_TIME();\n\t\tauto timeDiffMs = (slot->freeRerollTimeStamp > currentTime) ? (slot->freeRerollTimeStamp - currentTime) : 0;\n\t\tauto timeDiffMinutes = timeDiffMs / 60000;\n\t\tmsg.add(timeDiffMinutes ? timeDiffMinutes : 0);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bfb4223f5e806973204a062ac4b2608ea1825d15717ca6e1bc1e06ae4dece0e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7544, + "startColumn": 21, + "charOffset": 228211, + "charLength": 15, + "snippet": { + "text": "timeDiffMinutes" + } + }, + "contextRegion": { + "startLine": 7542, + "startColumn": 21, + "charOffset": 228035, + "charLength": 15, + "snippet": { + "text": "\t\tauto timeDiffMs = (slot->freeRerollTimeStamp > currentTime) ? (slot->freeRerollTimeStamp - currentTime) : 0;\n\t\tauto timeDiffMinutes = timeDiffMs / 60000;\n\t\tmsg.add(timeDiffMinutes ? timeDiffMinutes : 0);\n\t} else {\n\t\tmsg.add(std::max(static_cast(((slot->freeRerollTimeStamp - OTSYS_TIME()) / 1000)), 0));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c06fa241f118f4bf2a24365bfa339a764ba26f73152b731eb8a25fca913c217b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7544, + "startColumn": 21, + "charOffset": 228211, + "charLength": 15, + "snippet": { + "text": "timeDiffMinutes" + } + }, + "contextRegion": { + "startLine": 7542, + "startColumn": 21, + "charOffset": 228035, + "charLength": 15, + "snippet": { + "text": "\t\tauto timeDiffMs = (slot->freeRerollTimeStamp > currentTime) ? (slot->freeRerollTimeStamp - currentTime) : 0;\n\t\tauto timeDiffMinutes = timeDiffMs / 60000;\n\t\tmsg.add(timeDiffMinutes ? timeDiffMinutes : 0);\n\t} else {\n\t\tmsg.add(std::max(static_cast(((slot->freeRerollTimeStamp - OTSYS_TIME()) / 1000)), 0));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "907354237c173e840eb0c9202658f30f1b3ec89310935db011b509b2cb8b5cd5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int64_t' (aka 'long') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7544, + "startColumn": 21, + "charOffset": 228211, + "charLength": 15, + "snippet": { + "text": "timeDiffMinutes" + } + }, + "contextRegion": { + "startLine": 7542, + "startColumn": 21, + "charOffset": 228035, + "charLength": 15, + "snippet": { + "text": "\t\tauto timeDiffMs = (slot->freeRerollTimeStamp > currentTime) ? (slot->freeRerollTimeStamp - currentTime) : 0;\n\t\tauto timeDiffMinutes = timeDiffMs / 60000;\n\t\tmsg.add(timeDiffMinutes ? timeDiffMinutes : 0);\n\t} else {\n\t\tmsg.add(std::max(static_cast(((slot->freeRerollTimeStamp - OTSYS_TIME()) / 1000)), 0));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9abf0b16af812eadb536c6c121b1663f1be0cfb24e09a5d1a5bf4e8935f2afc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7546, + "startColumn": 108, + "charOffset": 228368, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 7544, + "startColumn": 108, + "charOffset": 228191, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.add(timeDiffMinutes ? timeDiffMinutes : 0);\n\t} else {\n\t\tmsg.add(std::max(static_cast(((slot->freeRerollTimeStamp - OTSYS_TIME()) / 1000)), 0));\n\t\tmsg.addByte(static_cast(slot->option));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65ebc03b23a0d388904aa4133b2ea936fb7d92e3cee4cb6b49ee0117098d6982" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7554, + "startColumn": 6, + "charOffset": 228509, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7552, + "startColumn": 6, + "charOffset": 228465, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendPreyPrices() {\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0146d7ee3f77a7d8e1f05911ac197d817f38cbc813ce8260992309eb82b5500d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7560, + "startColumn": 14, + "charOffset": 228569, + "charLength": 4, + "snippet": { + "text": "0xE9" + } + }, + "contextRegion": { + "startLine": 7558, + "startColumn": 14, + "charOffset": 228534, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\n\tmsg.addByte(0xE9);\n\tmsg.add(player->getPreyRerollPrice());\n\tif (!oldProtocol) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b4e642a0022554dba943f5720e065a48c31e3b123849c9dabce7c77959d4fd4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xE9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7560, + "startColumn": 14, + "charOffset": 228569, + "charLength": 4, + "snippet": { + "text": "0xE9" + } + }, + "contextRegion": { + "startLine": 7558, + "startColumn": 14, + "charOffset": 228534, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\n\tmsg.addByte(0xE9);\n\tmsg.add(player->getPreyRerollPrice());\n\tif (!oldProtocol) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e819b53e7424f898c7edc54004f32bd112280bf43bf72a4e827828bb55b5475f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7575, + "startColumn": 6, + "charOffset": 229311, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7573, + "startColumn": 6, + "charOffset": 229236, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendModalWindow(const ModalWindow &modalWindow) {\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "908abe3d26f2d9232bf1b2f4e5169aad0ceeae2d2deef1000df01b56541bb74e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7580, + "startColumn": 14, + "charOffset": 229370, + "charLength": 4, + "snippet": { + "text": "0xFA" + } + }, + "contextRegion": { + "startLine": 7578, + "startColumn": 14, + "charOffset": 229335, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xFA);\n\n\tmsg.add(modalWindow.id);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3cceab59d1f0fe07cd104df742f2b1692610460a601d030ee3ad3039cec025be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFA is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7580, + "startColumn": 14, + "charOffset": 229370, + "charLength": 4, + "snippet": { + "text": "0xFA" + } + }, + "contextRegion": { + "startLine": 7578, + "startColumn": 14, + "charOffset": 229335, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xFA);\n\n\tmsg.add(modalWindow.id);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dcf65066cb2043529470e505a5c747873c0768179427cc55df5677f3b66e65e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7586, + "startColumn": 14, + "charOffset": 229608, + "charLength": 11, + "snippet": { + "text": "modalWindow" + } + }, + "contextRegion": { + "startLine": 7584, + "startColumn": 14, + "charOffset": 229502, + "charLength": 11, + "snippet": { + "text": "\tmsg.addString(modalWindow.message, \"ProtocolGame::sendModalWindow - modalWindow.message\");\n\n\tmsg.addByte(modalWindow.buttons.size());\n\tfor (const auto &it : modalWindow.buttons) {\n\t\tmsg.addString(it.first, \"ProtocolGame::sendModalWindow - it.first\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40a4907cba068ca93fca89fec069be16b5161bd3dc3446335601f447ae667d3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7587, + "startColumn": 2, + "charOffset": 229638, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7585, + "startColumn": 2, + "charOffset": 229594, + "charLength": 3, + "snippet": { + "text": "\n\tmsg.addByte(modalWindow.buttons.size());\n\tfor (const auto &it : modalWindow.buttons) {\n\t\tmsg.addString(it.first, \"ProtocolGame::sendModalWindow - it.first\");\n\t\tmsg.addByte(it.second);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f877568ba422fd60b1c9e430886b786fa4b46cad1fa2c342ed4e02189fa31e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7592, + "startColumn": 14, + "charOffset": 229797, + "charLength": 11, + "snippet": { + "text": "modalWindow" + } + }, + "contextRegion": { + "startLine": 7590, + "startColumn": 14, + "charOffset": 229780, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\tmsg.addByte(modalWindow.choices.size());\n\tfor (const auto &it : modalWindow.choices) {\n\t\tmsg.addString(it.first, \"ProtocolGame::sendModalWindow - it.first\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9cca277fa2bff7ecc8bec4964c595e095cf5aec4c53089611aa60cf33b496509" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7593, + "startColumn": 2, + "charOffset": 229827, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7591, + "startColumn": 2, + "charOffset": 229783, + "charLength": 3, + "snippet": { + "text": "\n\tmsg.addByte(modalWindow.choices.size());\n\tfor (const auto &it : modalWindow.choices) {\n\t\tmsg.addString(it.first, \"ProtocolGame::sendModalWindow - it.first\");\n\t\tmsg.addByte(it.second);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe75e68e0233909803e0a4e0b2ac86653f0308d1645a7ae7b20b6c2cc45b184d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'AddCreature' has cognitive complexity of 55 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7606, + "startColumn": 20, + "charOffset": 230201, + "charLength": 11, + "snippet": { + "text": "AddCreature" + } + }, + "contextRegion": { + "startLine": 7604, + "startColumn": 20, + "charOffset": 230146, + "charLength": 11, + "snippet": { + "text": "\n////////////// Add common messages\nvoid ProtocolGame::AddCreature(NetworkMessage &msg, std::shared_ptr creature, bool known, uint32_t remove) {\n\tCreatureType_t creatureType = creature->getType();\n\tstd::shared_ptr otherPlayer = creature->getPlayer();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aeeb33aa39cc1c510c4c4efb7d0b261c5b368ddae389952f95a5fd7423867ec5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7606, + "startColumn": 79, + "charOffset": 230260, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 7604, + "startColumn": 79, + "charOffset": 230146, + "charLength": 8, + "snippet": { + "text": "\n////////////// Add common messages\nvoid ProtocolGame::AddCreature(NetworkMessage &msg, std::shared_ptr creature, bool known, uint32_t remove) {\n\tCreatureType_t creatureType = creature->getType();\n\tstd::shared_ptr otherPlayer = creature->getPlayer();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b4bf78a3076b962c7ccff9835ea68e66ef43fb4185afa871130f8e2a40eadcd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7611, + "startColumn": 21, + "charOffset": 230450, + "charLength": 4, + "snippet": { + "text": "0x62" + } + }, + "contextRegion": { + "startLine": 7609, + "startColumn": 21, + "charOffset": 230415, + "charLength": 4, + "snippet": { + "text": "\n\tif (known) {\n\t\tmsg.add(0x62);\n\t\tmsg.add(creature->getID());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae81f0113338b8380ca7b0037b2e9c63ba407083bb1c254def9e26a39b7e9e01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x62 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7611, + "startColumn": 21, + "charOffset": 230450, + "charLength": 4, + "snippet": { + "text": "0x62" + } + }, + "contextRegion": { + "startLine": 7609, + "startColumn": 21, + "charOffset": 230415, + "charLength": 4, + "snippet": { + "text": "\n\tif (known) {\n\t\tmsg.add(0x62);\n\t\tmsg.add(creature->getID());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "077fb2b902130828ecfee697a03e21ad4a6350fa622e2359882f7e3fb783b71f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7614, + "startColumn": 21, + "charOffset": 230527, + "charLength": 4, + "snippet": { + "text": "0x61" + } + }, + "contextRegion": { + "startLine": 7612, + "startColumn": 21, + "charOffset": 230457, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.add(creature->getID());\n\t} else {\n\t\tmsg.add(0x61);\n\t\tmsg.add(remove);\n\t\tmsg.add(creature->getID());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "859b7c83184fa0a1de6ae395b92046fbb3b2b2507c75928cb41c989b1b6a17b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x61 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7614, + "startColumn": 21, + "charOffset": 230527, + "charLength": 4, + "snippet": { + "text": "0x61" + } + }, + "contextRegion": { + "startLine": 7612, + "startColumn": 21, + "charOffset": 230457, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.add(creature->getID());\n\t} else {\n\t\tmsg.add(0x61);\n\t\tmsg.add(remove);\n\t\tmsg.add(creature->getID());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a2d0d4dc3916e7315153707638d1a883368682cdae12771d1d10b885c8d9664" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7627, + "startColumn": 23, + "charOffset": 230947, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 7625, + "startColumn": 23, + "charOffset": 230873, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tmsg.add(master->getID());\n\t\t\t} else {\n\t\t\t\tmsg.add(0x00);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab1252f5f6eee5ad6f17851d7451a67bf5afa15e3bb19f5d5fe305b206e95b3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7639, + "startColumn": 15, + "charOffset": 231207, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 7637, + "startColumn": 15, + "charOffset": 231157, + "charLength": 4, + "snippet": { + "text": "\n\tif (creature->isHealthHidden()) {\n\t\tmsg.addByte(0x00);\n\t} else {\n\t\tmsg.addByte(std::ceil((static_cast(creature->getHealth()) / std::max(creature->getMaxHealth(), 1)) * 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e357cbcf4db9dce9187c23d7782725063d3b860da30a6258c9160ba9cb63c709" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7641, + "startColumn": 15, + "charOffset": 231238, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 7639, + "startColumn": 15, + "charOffset": 231193, + "charLength": 3, + "snippet": { + "text": "\t\tmsg.addByte(0x00);\n\t} else {\n\t\tmsg.addByte(std::ceil((static_cast(creature->getHealth()) / std::max(creature->getMaxHealth(), 1)) * 100));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a8aa5c7331395e302e35901497315db1217f59dea7969b271e612fe32bd3b9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7641, + "startColumn": 121, + "charOffset": 231344, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 7639, + "startColumn": 121, + "charOffset": 231193, + "charLength": 3, + "snippet": { + "text": "\t\tmsg.addByte(0x00);\n\t} else {\n\t\tmsg.addByte(std::ceil((static_cast(creature->getHealth()) / std::max(creature->getMaxHealth(), 1)) * 100));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f568956ab7f0fa5092c25f0e3fb7bb49dcf04bbed5b5c8f9488f1763d6a055b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7661, + "startColumn": 14, + "charOffset": 231877, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 7659, + "startColumn": 14, + "charOffset": 231810, + "charLength": 6, + "snippet": { + "text": "\n\tLightInfo lightInfo = creature->getCreatureLight();\n\tmsg.addByte(player->isAccessPlayer() ? 0xFF : lightInfo.level);\n\tmsg.addByte(lightInfo.color);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f12493616e9da0a7746e40c1649ac15abed2c3aa303fc8e42afd80254cbbce23" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7661, + "startColumn": 41, + "charOffset": 231904, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 7659, + "startColumn": 41, + "charOffset": 231810, + "charLength": 4, + "snippet": { + "text": "\n\tLightInfo lightInfo = creature->getCreatureLight();\n\tmsg.addByte(player->isAccessPlayer() ? 0xFF : lightInfo.level);\n\tmsg.addByte(lightInfo.color);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0f31c25e9991a42409d4559a9d1ad6696ec5eb4cfeb45b0e9648108ef2af5f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7693, + "startColumn": 22, + "charOffset": 232825, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 7691, + "startColumn": 22, + "charOffset": 232754, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.add(master->getID());\n\t\t} else {\n\t\t\tmsg.add(0x00);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "530a28c04e2e54ddb364e68096184f937fa5055481c156068f40fdaa6c7e0729" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7707, + "startColumn": 14, + "charOffset": 233240, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 7705, + "startColumn": 14, + "charOffset": 233070, + "charLength": 4, + "snippet": { + "text": "\tauto bubble = creature->getSpeechBubble();\n\tmsg.addByte(oldProtocol && bubble == SPEECHBUBBLE_HIRELING ? static_cast(SPEECHBUBBLE_NONE) : bubble);\n\tmsg.addByte(0xFF); // MARK_UNMARKED\n\tif (!oldProtocol) {\n\t\tmsg.addByte(0x00); // inspection type" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2213c09a89a5b764cc6538f9e2751eac50a7091243066c0a0d4d83c89831ac7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7707, + "startColumn": 14, + "charOffset": 233240, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 7705, + "startColumn": 14, + "charOffset": 233070, + "charLength": 4, + "snippet": { + "text": "\tauto bubble = creature->getSpeechBubble();\n\tmsg.addByte(oldProtocol && bubble == SPEECHBUBBLE_HIRELING ? static_cast(SPEECHBUBBLE_NONE) : bubble);\n\tmsg.addByte(0xFF); // MARK_UNMARKED\n\tif (!oldProtocol) {\n\t\tmsg.addByte(0x00); // inspection type" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9118c65d40c9a6ac4f772f8a32844f6f93ea82940c6df5679aaa51ea6c242bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7709, + "startColumn": 15, + "charOffset": 233299, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 7707, + "startColumn": 15, + "charOffset": 233227, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(0xFF); // MARK_UNMARKED\n\tif (!oldProtocol) {\n\t\tmsg.addByte(0x00); // inspection type\n\t} else {\n\t\tif (otherPlayer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aae342ef37810e6b9ffef2ec66cb7d8e6818320a55006301050dd86ba166572f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7714, + "startColumn": 22, + "charOffset": 233437, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 7712, + "startColumn": 22, + "charOffset": 233356, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.add(otherPlayer->getHelpers());\n\t\t} else {\n\t\t\tmsg.add(0x00);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "abb68b289dd1e3c034ea5b752f0b0b1c6aa1a4cc9521ba0a9ccc1cb550a988be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7722, + "startColumn": 14, + "charOffset": 233589, + "charLength": 4, + "snippet": { + "text": "0xA0" + } + }, + "contextRegion": { + "startLine": 7720, + "startColumn": 14, + "charOffset": 233518, + "charLength": 4, + "snippet": { + "text": "\nvoid ProtocolGame::AddPlayerStats(NetworkMessage &msg) {\n\tmsg.addByte(0xA0);\n\n\tif (oldProtocol) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e27e0088d10951e83cda4ccbcb73ee789d266989806c66484995dc16612b35f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xA0 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7722, + "startColumn": 14, + "charOffset": 233589, + "charLength": 4, + "snippet": { + "text": "0xA0" + } + }, + "contextRegion": { + "startLine": 7720, + "startColumn": 14, + "charOffset": 233518, + "charLength": 4, + "snippet": { + "text": "\nvoid ProtocolGame::AddPlayerStats(NetworkMessage &msg) {\n\tmsg.addByte(0xA0);\n\n\tif (oldProtocol) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3e587a45416acacca83768127b35d29034002a7e815e9d655007130f4ce9243" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7725, + "startColumn": 21, + "charOffset": 233637, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 7723, + "startColumn": 21, + "charOffset": 233596, + "charLength": 3, + "snippet": { + "text": "\n\tif (oldProtocol) {\n\t\tmsg.add(std::min(player->getHealth(), std::numeric_limits::max()));\n\t\tmsg.add(std::min(player->getMaxHealth(), std::numeric_limits::max()));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9cca277fa2bff7ecc8bec4964c595e095cf5aec4c53089611aa60cf33b496509" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7726, + "startColumn": 21, + "charOffset": 233736, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 7724, + "startColumn": 21, + "charOffset": 233597, + "charLength": 3, + "snippet": { + "text": "\tif (oldProtocol) {\n\t\tmsg.add(std::min(player->getHealth(), std::numeric_limits::max()));\n\t\tmsg.add(std::min(player->getMaxHealth(), std::numeric_limits::max()));\n\t} else {\n\t\tmsg.add(std::min(player->getHealth(), std::numeric_limits::max()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bdee572766d11415b98621db0951dc8eaaab366bb0eaa5dd7703265e20a87667" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7732, + "startColumn": 74, + "charOffset": 234104, + "charLength": 7, + "snippet": { + "text": "1000000" + } + }, + "contextRegion": { + "startLine": 7730, + "startColumn": 74, + "charOffset": 234027, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tmsg.add(player->hasFlag(PlayerFlags_t::HasInfiniteCapacity) ? 1000000 : player->getFreeCapacity());\n\tif (oldProtocol) {\n\t\tmsg.add(player->getFreeCapacity());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ebaaef5e88642332ebbb7715a33ba56ac69528e635f5cbbf9e4c24e862f588af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7739, + "startColumn": 20, + "charOffset": 234279, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 7737, + "startColumn": 20, + "charOffset": 234214, + "charLength": 6, + "snippet": { + "text": "\tmsg.add(player->getExperience());\n\n\tmsg.add(player->getLevel());\n\tmsg.addByte(std::min(player->getLevelPercent(), 100));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48e30ab4c412092348031ec06d136c11e4894c231c10e1987e6483aac02ac8b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7740, + "startColumn": 59, + "charOffset": 234358, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 7738, + "startColumn": 59, + "charOffset": 234259, + "charLength": 3, + "snippet": { + "text": "\n\tmsg.add(player->getLevel());\n\tmsg.addByte(std::min(player->getLevelPercent(), 100));\n\n\tmsg.add(player->getBaseXpGain()); // base xp gain rate" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f0b19f01c70aef3bad86e88337b30db16bca45305c8353ad28e14f8675822f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7753, + "startColumn": 39, + "charOffset": 234795, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 7751, + "startColumn": 39, + "charOffset": 234735, + "charLength": 6, + "snippet": { + "text": "\n\tif (!oldProtocol) {\n\t\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\n\t\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36be86e1b6090715137c2b60604e11f40bf8e60307696cc7a57406710829242f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7754, + "startColumn": 39, + "charOffset": 234891, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 7752, + "startColumn": 39, + "charOffset": 234736, + "charLength": 6, + "snippet": { + "text": "\tif (!oldProtocol) {\n\t\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\n\t\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\n\t} else {\n\t\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89f26704ae86d75f5d6ef315434b9118d96d73b1b2178a0f932228cc1dbf6587" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7756, + "startColumn": 21, + "charOffset": 234982, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 7754, + "startColumn": 21, + "charOffset": 234853, + "charLength": 3, + "snippet": { + "text": "\t\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\n\t} else {\n\t\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\n\t\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb5354928648c83bc4ae1bbb272ac9f46d9091c277ce219dc8c8255460a1489f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7756, + "startColumn": 39, + "charOffset": 235000, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 7754, + "startColumn": 39, + "charOffset": 234853, + "charLength": 6, + "snippet": { + "text": "\t\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\n\t} else {\n\t\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\n\t\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e92e5b1387ac6274920c404d2248dc085c22f5e50a0bb0e75b15be8f92830b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7757, + "startColumn": 21, + "charOffset": 235079, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 7755, + "startColumn": 21, + "charOffset": 234952, + "charLength": 3, + "snippet": { + "text": "\t} else {\n\t\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\n\t\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\n\n\t\tmsg.addByte(static_cast(std::min(player->getMagicLevel(), std::numeric_limits::max())));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17ec25dda56940f1a9409e2146015806535a38b83b4d1fa474be86281b32192c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7757, + "startColumn": 39, + "charOffset": 235097, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 7755, + "startColumn": 39, + "charOffset": 234952, + "charLength": 6, + "snippet": { + "text": "\t} else {\n\t\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\n\t\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\n\n\t\tmsg.addByte(static_cast(std::min(player->getMagicLevel(), std::numeric_limits::max())));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43a71e08ebd724a8de155d407e5e727c6105197dac03e4e6c0e52466c123f8a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7761, + "startColumn": 87, + "charOffset": 235488, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 7759, + "startColumn": 87, + "charOffset": 235160, + "charLength": 3, + "snippet": { + "text": "\t\tmsg.addByte(static_cast(std::min(player->getMagicLevel(), std::numeric_limits::max())));\n\t\tmsg.addByte(static_cast(std::min(player->getBaseMagicLevel(), std::numeric_limits::max())));\n\t\tmsg.addByte(std::min(static_cast(player->getMagicLevelPercent()), 100));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84bcf0bd2ca15803a6ff77aa8ef8b24f63919ca0f1bee84ec60d8709851377ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7771, + "startColumn": 20, + "charOffset": 235754, + "charLength": 9, + "snippet": { + "text": "condition" + } + }, + "contextRegion": { + "startLine": 7769, + "startColumn": 20, + "charOffset": 235627, + "charLength": 9, + "snippet": { + "text": "\n\tstd::shared_ptr condition = player->getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT);\n\tmsg.add(condition ? condition->getTicks() / 1000 : 0x00);\n\n\tmsg.add(player->getOfflineTrainingTime() / 60 / 1000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a660165611c80b1139aa05f7092b25128a85d622c552ab276c2f8c073482a76c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7771, + "startColumn": 56, + "charOffset": 235790, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 7769, + "startColumn": 56, + "charOffset": 235627, + "charLength": 4, + "snippet": { + "text": "\n\tstd::shared_ptr condition = player->getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT);\n\tmsg.add(condition ? condition->getTicks() / 1000 : 0x00);\n\n\tmsg.add(player->getOfflineTrainingTime() / 60 / 1000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d43861d3af9a4d897fa3b5cc16265cc8fcab38f305b6e76d61dd0e642855a35b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7773, + "startColumn": 20, + "charOffset": 235824, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 7771, + "startColumn": 20, + "charOffset": 235735, + "charLength": 6, + "snippet": { + "text": "\tmsg.add(condition ? condition->getTicks() / 1000 : 0x00);\n\n\tmsg.add(player->getOfflineTrainingTime() / 60 / 1000);\n\n\tmsg.add(player->getXpBoostTime()); // xp boost time (seconds)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d93f36380a58578db363c47d03b84a764fd198fd92335e0d3686e6afd058d8c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7773, + "startColumn": 55, + "charOffset": 235859, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 7771, + "startColumn": 55, + "charOffset": 235735, + "charLength": 2, + "snippet": { + "text": "\tmsg.add(condition ? condition->getTicks() / 1000 : 0x00);\n\n\tmsg.add(player->getOfflineTrainingTime() / 60 / 1000);\n\n\tmsg.add(player->getXpBoostTime()); // xp boost time (seconds)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "516feca95ecc8b91fa9a89f115934a51678626d8812bddf9d21a41b13dfa52d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7773, + "startColumn": 60, + "charOffset": 235864, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 7771, + "startColumn": 60, + "charOffset": 235735, + "charLength": 4, + "snippet": { + "text": "\tmsg.add(condition ? condition->getTicks() / 1000 : 0x00);\n\n\tmsg.add(player->getOfflineTrainingTime() / 60 / 1000);\n\n\tmsg.add(player->getXpBoostTime()); // xp boost time (seconds)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7544694b280f15e900901f2c616389c2e885551ed4af326339f158ea54431363" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7785, + "startColumn": 14, + "charOffset": 236236, + "charLength": 4, + "snippet": { + "text": "0xA1" + } + }, + "contextRegion": { + "startLine": 7783, + "startColumn": 14, + "charOffset": 236164, + "charLength": 4, + "snippet": { + "text": "\nvoid ProtocolGame::AddPlayerSkills(NetworkMessage &msg) {\n\tmsg.addByte(0xA1);\n\n\tif (oldProtocol) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "036eaf56251ab369b074c266c889433dffe2ec4ddbc3612a9b658b84c124e1fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xA1 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7785, + "startColumn": 14, + "charOffset": 236236, + "charLength": 4, + "snippet": { + "text": "0xA1" + } + }, + "contextRegion": { + "startLine": 7783, + "startColumn": 14, + "charOffset": 236164, + "charLength": 4, + "snippet": { + "text": "\nvoid ProtocolGame::AddPlayerSkills(NetworkMessage &msg) {\n\tmsg.addByte(0xA1);\n\n\tif (oldProtocol) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "300ec3a7e470b73b31224df2f129cef52e1f3ec830f4996a8007c4b0bb5f7038" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7788, + "startColumn": 3, + "charOffset": 236266, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7786, + "startColumn": 3, + "charOffset": 236243, + "charLength": 3, + "snippet": { + "text": "\n\tif (oldProtocol) {\n\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; ++i) {\n\t\t\tskills_t skill = static_cast(i);\n\t\t\tmsg.add(std::min(player->getSkillLevel(skill), std::numeric_limits::max()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04107e1bb0bc7a6848d49b0c0ecc460bf974d4d20f745993e1a2ae8563eb35cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7789, + "startColumn": 4, + "charOffset": 236326, + "charLength": 8, + "snippet": { + "text": "skills_t" + } + }, + "contextRegion": { + "startLine": 7787, + "startColumn": 4, + "charOffset": 236244, + "charLength": 8, + "snippet": { + "text": "\tif (oldProtocol) {\n\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; ++i) {\n\t\t\tskills_t skill = static_cast(i);\n\t\t\tmsg.add(std::min(player->getSkillLevel(skill), std::numeric_limits::max()));\n\t\t\tmsg.add(player->getBaseSkill(skill));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ef7c3d52b0354404c6eb3bb1bcdaa89f547d1fb2ced73f2507343168d8e8883" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7790, + "startColumn": 22, + "charOffset": 236390, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 7788, + "startColumn": 22, + "charOffset": 236264, + "charLength": 3, + "snippet": { + "text": "\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; ++i) {\n\t\t\tskills_t skill = static_cast(i);\n\t\t\tmsg.add(std::min(player->getSkillLevel(skill), std::numeric_limits::max()));\n\t\t\tmsg.add(player->getBaseSkill(skill));\n\t\t\tmsg.addByte(std::min(100, static_cast(player->getSkillPercent(skill))));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a2ba90b4e27b92181932f04ea0df29da9a357e209c961478c18aea9b466d25e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7792, + "startColumn": 34, + "charOffset": 236562, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 7790, + "startColumn": 34, + "charOffset": 236369, + "charLength": 3, + "snippet": { + "text": "\t\t\tmsg.add(std::min(player->getSkillLevel(skill), std::numeric_limits::max()));\n\t\t\tmsg.add(player->getBaseSkill(skill));\n\t\t\tmsg.addByte(std::min(100, static_cast(player->getSkillPercent(skill))));\n\t\t}\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14684f6a429aa369d55546065b8f0c651a84c7af437e64689240f85a9507599c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7795, + "startColumn": 21, + "charOffset": 236657, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 7793, + "startColumn": 21, + "charOffset": 236623, + "charLength": 6, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\tmsg.add(player->getMagicLevel());\n\t\tmsg.add(player->getBaseMagicLevel());\n\t\tmsg.add(player->getLoyaltyMagicLevel());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f0c3b9ac1b10a5fa840f2d908a19db0b5571ce3912a1c5be8bbdd95ba0a5de3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7796, + "startColumn": 21, + "charOffset": 236703, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 7794, + "startColumn": 21, + "charOffset": 236627, + "charLength": 6, + "snippet": { + "text": "\t} else {\n\t\tmsg.add(player->getMagicLevel());\n\t\tmsg.add(player->getBaseMagicLevel());\n\t\tmsg.add(player->getLoyaltyMagicLevel());\n\t\tmsg.add(player->getMagicLevelPercent() * 100);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "439cc6d1fa1d066c9e7df4c54f637be058b783edce67c7785730b2e70d52191b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7797, + "startColumn": 21, + "charOffset": 236753, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 7795, + "startColumn": 21, + "charOffset": 236637, + "charLength": 6, + "snippet": { + "text": "\t\tmsg.add(player->getMagicLevel());\n\t\tmsg.add(player->getBaseMagicLevel());\n\t\tmsg.add(player->getLoyaltyMagicLevel());\n\t\tmsg.add(player->getMagicLevelPercent() * 100);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93bfd1c7c128f12f41e736c57a73ebeb1db8d0e01994cbf233c6c41e578733cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7798, + "startColumn": 21, + "charOffset": 236806, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 7796, + "startColumn": 21, + "charOffset": 236683, + "charLength": 6, + "snippet": { + "text": "\t\tmsg.add(player->getBaseMagicLevel());\n\t\tmsg.add(player->getLoyaltyMagicLevel());\n\t\tmsg.add(player->getMagicLevelPercent() * 100);\n\n\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ebd1e84a0b381bcaa3ecc22e030015b60f310135124f648c889175d6147e85c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7798, + "startColumn": 21, + "charOffset": 236806, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 7796, + "startColumn": 21, + "charOffset": 236683, + "charLength": 6, + "snippet": { + "text": "\t\tmsg.add(player->getBaseMagicLevel());\n\t\tmsg.add(player->getLoyaltyMagicLevel());\n\t\tmsg.add(player->getMagicLevelPercent() * 100);\n\n\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d44107b488e6b87f98d11c94c6c2f4b6d18ba73319751c77a41ecb827b3e330" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7798, + "startColumn": 54, + "charOffset": 236839, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 7796, + "startColumn": 54, + "charOffset": 236683, + "charLength": 3, + "snippet": { + "text": "\t\tmsg.add(player->getBaseMagicLevel());\n\t\tmsg.add(player->getLoyaltyMagicLevel());\n\t\tmsg.add(player->getMagicLevelPercent() * 100);\n\n\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a509e6f9ee22aed61096e881309e14fbfcc433a1f7a98e8eb3a43dc785a5cd9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7800, + "startColumn": 3, + "charOffset": 236848, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7798, + "startColumn": 3, + "charOffset": 236786, + "charLength": 3, + "snippet": { + "text": "\t\tmsg.add(player->getMagicLevelPercent() * 100);\n\n\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; ++i) {\n\t\t\tskills_t skill = static_cast(i);\n\t\t\tmsg.add(std::min(player->getSkillLevel(skill), std::numeric_limits::max()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6968ae7787fb4854b83ad38fa4bc4402849611d6aa0437a836aad7d1d94dce31" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7801, + "startColumn": 4, + "charOffset": 236908, + "charLength": 8, + "snippet": { + "text": "skills_t" + } + }, + "contextRegion": { + "startLine": 7799, + "startColumn": 4, + "charOffset": 236845, + "charLength": 8, + "snippet": { + "text": "\n\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; ++i) {\n\t\t\tskills_t skill = static_cast(i);\n\t\t\tmsg.add(std::min(player->getSkillLevel(skill), std::numeric_limits::max()));\n\t\t\tmsg.add(player->getBaseSkill(skill));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "150da01ba392a6b50b9c8e53cfe9cd0a52d9d585f9d596ca5fb17344e6357344" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7802, + "startColumn": 22, + "charOffset": 236972, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 7800, + "startColumn": 22, + "charOffset": 236846, + "charLength": 3, + "snippet": { + "text": "\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; ++i) {\n\t\t\tskills_t skill = static_cast(i);\n\t\t\tmsg.add(std::min(player->getSkillLevel(skill), std::numeric_limits::max()));\n\t\t\tmsg.add(player->getBaseSkill(skill));\n\t\t\tmsg.add(player->getLoyaltySkill(skill));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b69d6e8788945c45a14a6b70fba43c01d5c7cfe5847e08a219b578d9dd0fdef6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7805, + "startColumn": 22, + "charOffset": 237186, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 7803, + "startColumn": 22, + "charOffset": 237060, + "charLength": 6, + "snippet": { + "text": "\t\t\tmsg.add(player->getBaseSkill(skill));\n\t\t\tmsg.add(player->getLoyaltySkill(skill));\n\t\t\tmsg.add(player->getSkillPercent(skill) * 100);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c7e40fb118647a3be349df76289b519a2e349885cfc72a590937cff5f077cb7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7805, + "startColumn": 22, + "charOffset": 237186, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 7803, + "startColumn": 22, + "charOffset": 237060, + "charLength": 6, + "snippet": { + "text": "\t\t\tmsg.add(player->getBaseSkill(skill));\n\t\t\tmsg.add(player->getLoyaltySkill(skill));\n\t\t\tmsg.add(player->getSkillPercent(skill) * 100);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "414fd4e441aed9f426d31faa8b63b06f87bfeb4a89b4af72951608a2cb51c0a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7805, + "startColumn": 55, + "charOffset": 237219, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 7803, + "startColumn": 55, + "charOffset": 237060, + "charLength": 3, + "snippet": { + "text": "\t\t\tmsg.add(player->getBaseSkill(skill));\n\t\t\tmsg.add(player->getLoyaltySkill(skill));\n\t\t\tmsg.add(player->getSkillPercent(skill) * 100);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "289bdc1ee9e8bc1d6a3c8a93c8bccae9f219fd56c7be282d5cf9a37477623086" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7809, + "startColumn": 2, + "charOffset": 237234, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7807, + "startColumn": 2, + "charOffset": 237229, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (uint8_t i = SKILL_CRITICAL_HIT_CHANCE; i <= SKILL_LAST; ++i) {\n\t\tif (!oldProtocol && (i == SKILL_LIFE_LEECH_CHANCE || i == SKILL_MANA_LEECH_CHANCE)) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9b394ecfe4c42e8d557a23d32c1553f5837c1a4e1e24696e02bcf0bf13874e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7813, + "startColumn": 3, + "charOffset": 237409, + "charLength": 8, + "snippet": { + "text": "skills_t" + } + }, + "contextRegion": { + "startLine": 7811, + "startColumn": 3, + "charOffset": 237390, + "charLength": 8, + "snippet": { + "text": "\t\t\tcontinue;\n\t\t}\n\t\tskills_t skill = static_cast(i);\n\t\tmsg.add(std::min(player->getSkillLevel(skill), std::numeric_limits::max()));\n\t\tmsg.add(player->getBaseSkill(skill));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d99cfdb9615cab0c5f1bec4e3f78d6843ae54f10a2c5c597d6c28a18180a5932" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7814, + "startColumn": 21, + "charOffset": 237472, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 7812, + "startColumn": 21, + "charOffset": 237403, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t\tskills_t skill = static_cast(i);\n\t\tmsg.add(std::min(player->getSkillLevel(skill), std::numeric_limits::max()));\n\t\tmsg.add(player->getBaseSkill(skill));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "071f66a24379c4e1993edb994b4c80a0b9b22c99c67775fd8fc3625218b27bed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'AddOutfit' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7830, + "startColumn": 20, + "charOffset": 237958, + "charLength": 9, + "snippet": { + "text": "AddOutfit" + } + }, + "contextRegion": { + "startLine": 7828, + "startColumn": 20, + "charOffset": 237936, + "charLength": 9, + "snippet": { + "text": "}\n\nvoid ProtocolGame::AddOutfit(NetworkMessage &msg, const Outfit_t &outfit, bool addMount /* = true*/) {\n\tmsg.add(outfit.lookType);\n\tif (outfit.lookType != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd22663ac166449b88a55e86fc78c8ae0eb6b704fce30f49c317e19a16d22f25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'addImbuementInfo' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7847, + "startColumn": 20, + "charOffset": 238405, + "charLength": 16, + "snippet": { + "text": "addImbuementInfo" + } + }, + "contextRegion": { + "startLine": 7845, + "startColumn": 20, + "charOffset": 238383, + "charLength": 16, + "snippet": { + "text": "}\n\nvoid ProtocolGame::addImbuementInfo(NetworkMessage &msg, uint16_t imbuementId) const {\n\tImbuement* imbuement = g_imbuements().getImbuement(imbuementId);\n\tconst BaseImbuement* baseImbuement = g_imbuements().getBaseByID(imbuement->getBaseID());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0d5f1352027ff941ba2955c8a96054bcdadbc407896242338934399ae1df42a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7864, + "startColumn": 14, + "charOffset": 239447, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 7862, + "startColumn": 14, + "charOffset": 239390, + "charLength": 5, + "snippet": { + "text": "\n\tconst auto items = imbuement->getItems();\n\tmsg.addByte(items.size());\n\n\tfor (const auto &itm : items) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b7dcda1565614bae0d1ecfca65c4495b21adf30a750708d7ba81a19c93fa20f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7866, + "startColumn": 2, + "charOffset": 239464, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7864, + "startColumn": 2, + "charOffset": 239434, + "charLength": 3, + "snippet": { + "text": "\tmsg.addByte(items.size());\n\n\tfor (const auto &itm : items) {\n\t\tconst ItemType &it = Item::items[itm.first];\n\t\tmsg.add(itm.first);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32d618c1c4160ac6c83377aabee69a1585e59eed60e09070103ad69217a0d16a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7878, + "startColumn": 62, + "charOffset": 239878, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 7876, + "startColumn": 62, + "charOffset": 239814, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid ProtocolGame::openImbuementWindow(std::shared_ptr item) {\n\tif (!item || item->isRemoved()) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af027e1c7e53bf2a65e2793730749a83a64ab01546e1001b0497d4b9db308710" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7879, + "startColumn": 6, + "charOffset": 239891, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7877, + "startColumn": 6, + "charOffset": 239816, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::openImbuementWindow(std::shared_ptr item) {\n\tif (!item || item->isRemoved()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b369f71d3d0494f0925578a00f319aff52e7734e20f35e9985130fc5e5d2d7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7886, + "startColumn": 14, + "charOffset": 240001, + "charLength": 4, + "snippet": { + "text": "0xEB" + } + }, + "contextRegion": { + "startLine": 7884, + "startColumn": 14, + "charOffset": 239966, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xEB);\n\tmsg.add(item->getID());\n\tif (!oldProtocol && item->getClassification() > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40cc162cb2959daa8752f99b1ff04283742202d99372604851570f1a16db13c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xEB is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7886, + "startColumn": 14, + "charOffset": 240001, + "charLength": 4, + "snippet": { + "text": "0xEB" + } + }, + "contextRegion": { + "startLine": 7884, + "startColumn": 14, + "charOffset": 239966, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xEB);\n\tmsg.add(item->getID());\n\tif (!oldProtocol && item->getClassification() > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80c8625183cf71e4adedd938d11b0f695789ec328e8018117e85c3c22439f0ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7894, + "startColumn": 2, + "charOffset": 240184, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7892, + "startColumn": 2, + "charOffset": 240158, + "charLength": 3, + "snippet": { + "text": "\n\t// Send imbuement time\n\tfor (uint8_t slotid = 0; slotid < static_cast(item->getImbuementSlot()); slotid++) {\n\t\tImbuementInfo imbuementInfo;\n\t\tif (!item->getImbuementInfo(slotid, &imbuementInfo)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "993a4ff286836b9fa3a331504eb698e85c22dd7fb60bcc6f3e09d6a18c9ca307" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-redundant-casting", + "ruleIndex": 716, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant explicit casting to the same type 'uint8_t' (aka 'unsigned char') as the sub-expression, remove this casting" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7894, + "startColumn": 36, + "charOffset": 240218, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 7892, + "startColumn": 36, + "charOffset": 240158, + "charLength": 11, + "snippet": { + "text": "\n\t// Send imbuement time\n\tfor (uint8_t slotid = 0; slotid < static_cast(item->getImbuementSlot()); slotid++) {\n\t\tImbuementInfo imbuementInfo;\n\t\tif (!item->getImbuementInfo(slotid, &imbuementInfo)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f4af5382384f11c17ebc2165319f5af455da6a4dd10fd0484b8cbad198ef998" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7897, + "startColumn": 16, + "charOffset": 240381, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 7895, + "startColumn": 16, + "charOffset": 240278, + "charLength": 4, + "snippet": { + "text": "\t\tImbuementInfo imbuementInfo;\n\t\tif (!item->getImbuementInfo(slotid, &imbuementInfo)) {\n\t\t\tmsg.addByte(0x00);\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db6722400f6566fde377ff1c8fc23403739ef4a87394026604b69dfd2b219fc5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7901, + "startColumn": 15, + "charOffset": 240420, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 7899, + "startColumn": 15, + "charOffset": 240401, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tmsg.addByte(0x01);\n\t\taddImbuementInfo(msg, imbuementInfo.imbuement->getID());\n\t\tmsg.add(imbuementInfo.duration);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d56d872ac04561a91d57cccc0955d36bf86719e7071520e3395ca3f62b05683" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7910, + "startColumn": 20, + "charOffset": 240789, + "charLength": 10, + "snippet": { + "text": "imbuements" + } + }, + "contextRegion": { + "startLine": 7908, + "startColumn": 20, + "charOffset": 240716, + "charLength": 10, + "snippet": { + "text": "\tphmap::flat_hash_map needItems;\n\n\tmsg.add(imbuements.size());\n\tfor (const Imbuement* imbuement : imbuements) {\n\t\taddImbuementInfo(msg, imbuement->getID());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf2e5ee54c5f4a3e93bc0629f75e7ff7d609eb4a0e436a24ffc01ae8ffe5c222" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7915, + "startColumn": 3, + "charOffset": 240950, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7913, + "startColumn": 3, + "charOffset": 240903, + "charLength": 3, + "snippet": { + "text": "\n\t\tconst auto items = imbuement->getItems();\n\t\tfor (const auto &itm : items) {\n\t\t\tif (!needItems.count(itm.first)) {\n\t\t\t\tneedItems[itm.first] = player->getItemTypeCount(itm.first);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81c2c38eabd5038fef53348052edf99df325604f4b77bdfefa6b2da97cf5bd45" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7916, + "startColumn": 8, + "charOffset": 240989, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7914, + "startColumn": 8, + "charOffset": 240904, + "charLength": 1, + "snippet": { + "text": "\t\tconst auto items = imbuement->getItems();\n\t\tfor (const auto &itm : items) {\n\t\t\tif (!needItems.count(itm.first)) {\n\t\t\t\tneedItems[itm.first] = player->getItemTypeCount(itm.first);\n\t\t\t\tuint32_t stashCount = player->getStashItemCount(Item::items[itm.first].id);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c4c714b10ff126badf08bf6fcd1cf8cf20bee1197dbfc0c176c200d11c1070e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'size_t' (aka 'unsigned long') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7916, + "startColumn": 9, + "charOffset": 240990, + "charLength": 9, + "snippet": { + "text": "needItems" + } + }, + "contextRegion": { + "startLine": 7914, + "startColumn": 9, + "charOffset": 240904, + "charLength": 9, + "snippet": { + "text": "\t\tconst auto items = imbuement->getItems();\n\t\tfor (const auto &itm : items) {\n\t\t\tif (!needItems.count(itm.first)) {\n\t\t\t\tneedItems[itm.first] = player->getItemTypeCount(itm.first);\n\t\t\t\tuint32_t stashCount = player->getStashItemCount(Item::items[itm.first].id);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99559404e2f21f7f50ddc832a7d9b3cbd3257b453fa4b8e4ab092b80638f1c86" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7917, + "startColumn": 28, + "charOffset": 241047, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 7915, + "startColumn": 28, + "charOffset": 240948, + "charLength": 6, + "snippet": { + "text": "\t\tfor (const auto &itm : items) {\n\t\t\tif (!needItems.count(itm.first)) {\n\t\t\t\tneedItems[itm.first] = player->getItemTypeCount(itm.first);\n\t\t\t\tuint32_t stashCount = player->getStashItemCount(Item::items[itm.first].id);\n\t\t\t\tif (stashCount > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea96c87c7805864f9412814a5a5627ff3d492a14fd22d481c2781234cccd9995" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7926, + "startColumn": 20, + "charOffset": 241269, + "charLength": 9, + "snippet": { + "text": "needItems" + } + }, + "contextRegion": { + "startLine": 7924, + "startColumn": 20, + "charOffset": 241246, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tmsg.add(needItems.size());\n\tfor (const auto &itm : needItems) {\n\t\tmsg.add(itm.first);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eae002620fc2caf2bc6114142dc37de842c4f6fb443025cf60e4a3dacd57b0d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7927, + "startColumn": 2, + "charOffset": 241289, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7925, + "startColumn": 2, + "charOffset": 241249, + "charLength": 3, + "snippet": { + "text": "\n\tmsg.add(needItems.size());\n\tfor (const auto &itm : needItems) {\n\t\tmsg.add(itm.first);\n\t\tmsg.add(itm.second);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "106295dfa895b84e85e2d7c8109ed63af5e5e116cdc1b1d1d8861b9a7bc57188" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7939, + "startColumn": 14, + "charOffset": 241651, + "charLength": 4, + "snippet": { + "text": "0xED" + } + }, + "contextRegion": { + "startLine": 7937, + "startColumn": 14, + "charOffset": 241550, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendMessageDialog(const std::string &message) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xED);\n\tmsg.addByte(0x14); // Unknown type\n\tmsg.addString(message, \"ProtocolGame::sendMessageDialog - message\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7801d4ad52e4030d977abc599b36c2baedc87794cb44a38abce289659291d496" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xED is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7939, + "startColumn": 14, + "charOffset": 241651, + "charLength": 4, + "snippet": { + "text": "0xED" + } + }, + "contextRegion": { + "startLine": 7937, + "startColumn": 14, + "charOffset": 241550, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendMessageDialog(const std::string &message) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xED);\n\tmsg.addByte(0x14); // Unknown type\n\tmsg.addString(message, \"ProtocolGame::sendMessageDialog - message\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19eafe5acc80d283929b974ddf8cf1e9073d9573fb3d214cb8be280ace35aa1d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7940, + "startColumn": 14, + "charOffset": 241671, + "charLength": 4, + "snippet": { + "text": "0x14" + } + }, + "contextRegion": { + "startLine": 7938, + "startColumn": 14, + "charOffset": 241617, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\tmsg.addByte(0xED);\n\tmsg.addByte(0x14); // Unknown type\n\tmsg.addString(message, \"ProtocolGame::sendMessageDialog - message\");\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19967b32777351b7e62d9830377af2b9e9a94228832cdce5362be196111a23a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x14 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7940, + "startColumn": 14, + "charOffset": 241671, + "charLength": 4, + "snippet": { + "text": "0x14" + } + }, + "contextRegion": { + "startLine": 7938, + "startColumn": 14, + "charOffset": 241617, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\tmsg.addByte(0xED);\n\tmsg.addByte(0x14); // Unknown type\n\tmsg.addString(message, \"ProtocolGame::sendMessageDialog - message\");\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4734d806f625564438e12f4886bf96e0d7f6592574984e86f8ddcee0c6e049e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'message' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7945, + "startColumn": 58, + "charOffset": 241851, + "charLength": 7, + "snippet": { + "text": "message" + } + }, + "contextRegion": { + "startLine": 7943, + "startColumn": 58, + "charOffset": 241791, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendImbuementResult(const std::string message) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xED);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6037dd3b1bdc71584cc0a6f3773650cd84a313fcfc5a8837b62b7b64ffc02528" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7947, + "startColumn": 14, + "charOffset": 241896, + "charLength": 4, + "snippet": { + "text": "0xED" + } + }, + "contextRegion": { + "startLine": 7945, + "startColumn": 14, + "charOffset": 241794, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendImbuementResult(const std::string message) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xED);\n\tmsg.addByte(0x01);\n\tmsg.addString(message, \"ProtocolGame::sendImbuementResult - message\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1253f10159e09f1d0743b83c76c63e39dc4a49459526c69fcb4eb6ca36a16e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xED is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7947, + "startColumn": 14, + "charOffset": 241896, + "charLength": 4, + "snippet": { + "text": "0xED" + } + }, + "contextRegion": { + "startLine": 7945, + "startColumn": 14, + "charOffset": 241794, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::sendImbuementResult(const std::string message) {\n\tNetworkMessage msg;\n\tmsg.addByte(0xED);\n\tmsg.addByte(0x01);\n\tmsg.addString(message, \"ProtocolGame::sendImbuementResult - message\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c65fea82e25e502d54570450e3cfa669a184ec6b078cd9a0c1c0dd45b31304e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7948, + "startColumn": 14, + "charOffset": 241916, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 7946, + "startColumn": 14, + "charOffset": 241862, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\tmsg.addByte(0xED);\n\tmsg.addByte(0x01);\n\tmsg.addString(message, \"ProtocolGame::sendImbuementResult - message\");\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94fa65f32230d739b2236ece50afab261375c3ed7d6ab5b7cbbab3f9fab8967a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7955, + "startColumn": 14, + "charOffset": 242103, + "charLength": 4, + "snippet": { + "text": "0xEC" + } + }, + "contextRegion": { + "startLine": 7953, + "startColumn": 14, + "charOffset": 242025, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::closeImbuementWindow() {\n\tNetworkMessage msg;\n\tmsg.addByte(0xEC);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1692a181c2bee9c09e48a99f2d7adab4bf63a28326d8ae194613c556458a1768" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xEC is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7955, + "startColumn": 14, + "charOffset": 242103, + "charLength": 4, + "snippet": { + "text": "0xEC" + } + }, + "contextRegion": { + "startLine": 7953, + "startColumn": 14, + "charOffset": 242025, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::closeImbuementWindow() {\n\tNetworkMessage msg;\n\tmsg.addByte(0xEC);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ffbb0d6df0e676e9b129b1c554544813bc93589c1f84b3a7dea19d38a4787fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7960, + "startColumn": 14, + "charOffset": 242230, + "charLength": 4, + "snippet": { + "text": "0x82" + } + }, + "contextRegion": { + "startLine": 7958, + "startColumn": 14, + "charOffset": 242139, + "charLength": 4, + "snippet": { + "text": "\nvoid ProtocolGame::AddWorldLight(NetworkMessage &msg, LightInfo lightInfo) {\n\tmsg.addByte(0x82);\n\tmsg.addByte((player->isAccessPlayer() ? 0xFF : lightInfo.level));\n\tmsg.addByte(lightInfo.color);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a27948f54fb65b5afa9a6b587214996c42b436dabe9b4fa6143a8a25b219a5b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x82 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7960, + "startColumn": 14, + "charOffset": 242230, + "charLength": 4, + "snippet": { + "text": "0x82" + } + }, + "contextRegion": { + "startLine": 7958, + "startColumn": 14, + "charOffset": 242139, + "charLength": 4, + "snippet": { + "text": "\nvoid ProtocolGame::AddWorldLight(NetworkMessage &msg, LightInfo lightInfo) {\n\tmsg.addByte(0x82);\n\tmsg.addByte((player->isAccessPlayer() ? 0xFF : lightInfo.level));\n\tmsg.addByte(lightInfo.color);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63de33d08ff41709aa65f74680fa49c9ff0f828f86ee0ed4fb10e1d2ba1db5be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7961, + "startColumn": 14, + "charOffset": 242250, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 7959, + "startColumn": 14, + "charOffset": 242140, + "charLength": 1, + "snippet": { + "text": "void ProtocolGame::AddWorldLight(NetworkMessage &msg, LightInfo lightInfo) {\n\tmsg.addByte(0x82);\n\tmsg.addByte((player->isAccessPlayer() ? 0xFF : lightInfo.level));\n\tmsg.addByte(lightInfo.color);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15cd6e595c48e22ec48082b67a9e2f5e7936e755419e1c6542caca09b56ccc75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7961, + "startColumn": 42, + "charOffset": 242278, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 7959, + "startColumn": 42, + "charOffset": 242140, + "charLength": 4, + "snippet": { + "text": "void ProtocolGame::AddWorldLight(NetworkMessage &msg, LightInfo lightInfo) {\n\tmsg.addByte(0x82);\n\tmsg.addByte((player->isAccessPlayer() ? 0xFF : lightInfo.level));\n\tmsg.addByte(lightInfo.color);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ca87812e6b977d8d870580d581a249764add69344ea37ab566dbb112ee7d1ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7966, + "startColumn": 21, + "charOffset": 242412, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7964, + "startColumn": 21, + "charOffset": 242337, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendSpecialContainersAvailable() {\n\tif (oldProtocol || !player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ba80c6ca50dd8c440fb8602c1f2ccb838ed04d287ac4c50a37fdfb4d0d9cd59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7971, + "startColumn": 14, + "charOffset": 242471, + "charLength": 4, + "snippet": { + "text": "0x2A" + } + }, + "contextRegion": { + "startLine": 7969, + "startColumn": 14, + "charOffset": 242436, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x2A);\n\tmsg.addByte(player->isSupplyStashMenuAvailable() ? 0x01 : 0x00);\n\tmsg.addByte(player->isMarketMenuAvailable() ? 0x01 : 0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e357cbcf4db9dce9187c23d7782725063d3b860da30a6258c9160ba9cb63c709" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x2A is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7971, + "startColumn": 14, + "charOffset": 242471, + "charLength": 4, + "snippet": { + "text": "0x2A" + } + }, + "contextRegion": { + "startLine": 7969, + "startColumn": 14, + "charOffset": 242436, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x2A);\n\tmsg.addByte(player->isSupplyStashMenuAvailable() ? 0x01 : 0x00);\n\tmsg.addByte(player->isMarketMenuAvailable() ? 0x01 : 0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83c4a90cf7a6ee04b071abaf87c3e9617de20dd27899671c47ee6dc0bb0afac9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'party' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7977, + "startColumn": 76, + "charOffset": 242710, + "charLength": 5, + "snippet": { + "text": "party" + } + }, + "contextRegion": { + "startLine": 7975, + "startColumn": 76, + "charOffset": 242632, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid ProtocolGame::updatePartyTrackerAnalyzer(const std::shared_ptr party) {\n\tif (oldProtocol || !player || !party || !party->getLeader()) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ccccb71c6d28a19c488a1061e945fb5822584cf572916917082038e62ea618e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7978, + "startColumn": 21, + "charOffset": 242739, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7976, + "startColumn": 21, + "charOffset": 242634, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::updatePartyTrackerAnalyzer(const std::shared_ptr party) {\n\tif (oldProtocol || !player || !party || !party->getLeader()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d630794a034011a42153910af7dbafcc947927d0c8687c88e7a186d9b92811d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7978, + "startColumn": 32, + "charOffset": 242750, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7976, + "startColumn": 32, + "charOffset": 242634, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::updatePartyTrackerAnalyzer(const std::shared_ptr party) {\n\tif (oldProtocol || !player || !party || !party->getLeader()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f14e67f7c93680656b8f0adab799285837fd2d3f8c6b5479d4e7925d00de321" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7978, + "startColumn": 42, + "charOffset": 242760, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7976, + "startColumn": 42, + "charOffset": 242634, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::updatePartyTrackerAnalyzer(const std::shared_ptr party) {\n\tif (oldProtocol || !player || !party || !party->getLeader()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f61e659e548d6a0b34e977d6ce1b312c42b1455d27386dc172c9abb1218992e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7983, + "startColumn": 14, + "charOffset": 242831, + "charLength": 4, + "snippet": { + "text": "0x2B" + } + }, + "contextRegion": { + "startLine": 7981, + "startColumn": 14, + "charOffset": 242796, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x2B);\n\tmsg.add(party->getAnalyzerTimeNow());\n\tmsg.add(party->getLeader()->getID());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ee6aa1eac8fc405002f1f7ca65548c4cf7b3036db88d7c8e6aabe0aeec7ac64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x2B is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7983, + "startColumn": 14, + "charOffset": 242831, + "charLength": 4, + "snippet": { + "text": "0x2B" + } + }, + "contextRegion": { + "startLine": 7981, + "startColumn": 14, + "charOffset": 242796, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x2B);\n\tmsg.add(party->getAnalyzerTimeNow());\n\tmsg.add(party->getLeader()->getID());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5586d873e932d0cef53ef3e4027ca833a0bb5f597defc1ffc999d26558216ced" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7989, + "startColumn": 2, + "charOffset": 243055, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7987, + "startColumn": 2, + "charOffset": 242990, + "charLength": 3, + "snippet": { + "text": "\n\tmsg.addByte(static_cast(party->membersData.size()));\n\tfor (const std::shared_ptr &analyzer : party->membersData) {\n\t\tmsg.add(analyzer->id);\n\t\tif (std::shared_ptr member = g_game().getPlayerByID(analyzer->id);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37fe174b1b6b52fa77e3915d36c7a80914db0b44bab69e88e85c2e6b14af9ebb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7992, + "startColumn": 7, + "charOffset": 243249, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7990, + "startColumn": 7, + "charOffset": 243131, + "charLength": 1, + "snippet": { + "text": "\t\tmsg.add(analyzer->id);\n\t\tif (std::shared_ptr member = g_game().getPlayerByID(analyzer->id);\n\t\t !member || !member->getParty() || member->getParty() != party) {\n\t\t\tmsg.addByte(0);\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0519f86fc6a8507273cd77e71029e1effa5bb60c1c292630c1dfb2683bf6fe24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 7992, + "startColumn": 18, + "charOffset": 243260, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7990, + "startColumn": 18, + "charOffset": 243131, + "charLength": 1, + "snippet": { + "text": "\t\tmsg.add(analyzer->id);\n\t\tif (std::shared_ptr member = g_game().getPlayerByID(analyzer->id);\n\t\t !member || !member->getParty() || member->getParty() != party) {\n\t\t\tmsg.addByte(0);\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32f18db5d583fa0b5c9f0155b275b8a2ac2fe422e9e09d913db91661130604a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8008, + "startColumn": 3, + "charOffset": 243707, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 8006, + "startColumn": 3, + "charOffset": 243623, + "charLength": 3, + "snippet": { + "text": "\tif (showNames) {\n\t\tmsg.addByte(static_cast(party->membersData.size()));\n\t\tfor (const std::shared_ptr &analyzer : party->membersData) {\n\t\t\tmsg.add(analyzer->id);\n\t\t\tmsg.addString(analyzer->name, \"ProtocolGame::updatePartyTrackerAnalyzer - analyzer->name\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ad32e23b4e58a12c69546b69aaf686381c2715e55f0db1de23cf52d32eee6b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8017, + "startColumn": 84, + "charOffset": 244035, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 8015, + "startColumn": 84, + "charOffset": 243949, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::AddCreatureLight(NetworkMessage &msg, std::shared_ptr creature) {\n\tLightInfo lightInfo = creature->getCreatureLight();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b3ba46ae6c5c877eda7e95c72cf9fe6d099e8da40d0edcbe89b8f8266cb0997" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8020, + "startColumn": 14, + "charOffset": 244114, + "charLength": 4, + "snippet": { + "text": "0x8D" + } + }, + "contextRegion": { + "startLine": 8018, + "startColumn": 14, + "charOffset": 244047, + "charLength": 4, + "snippet": { + "text": "\tLightInfo lightInfo = creature->getCreatureLight();\n\n\tmsg.addByte(0x8D);\n\tmsg.add(creature->getID());\n\tmsg.addByte((player->isAccessPlayer() ? 0xFF : lightInfo.level));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a99466053c9ad161fc54647024358376c71f8ff9db4724277f88d537872e5a5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x8D is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8020, + "startColumn": 14, + "charOffset": 244114, + "charLength": 4, + "snippet": { + "text": "0x8D" + } + }, + "contextRegion": { + "startLine": 8018, + "startColumn": 14, + "charOffset": 244047, + "charLength": 4, + "snippet": { + "text": "\tLightInfo lightInfo = creature->getCreatureLight();\n\n\tmsg.addByte(0x8D);\n\tmsg.add(creature->getID());\n\tmsg.addByte((player->isAccessPlayer() ? 0xFF : lightInfo.level));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c09b35a413e2d437d82322ea2cb87320ccaa52b3cf59772660aea8e3536a9546" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8022, + "startColumn": 14, + "charOffset": 244173, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 8020, + "startColumn": 14, + "charOffset": 244101, + "charLength": 1, + "snippet": { + "text": "\tmsg.addByte(0x8D);\n\tmsg.add(creature->getID());\n\tmsg.addByte((player->isAccessPlayer() ? 0xFF : lightInfo.level));\n\tmsg.addByte(lightInfo.color);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fae1d495d120e04a9ccc570a7bca726bdc0788a19ac1d0ea22aa1db5e8ce3a18" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8022, + "startColumn": 42, + "charOffset": 244201, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 8020, + "startColumn": 42, + "charOffset": 244101, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(0x8D);\n\tmsg.add(creature->getID());\n\tmsg.addByte((player->isAccessPlayer() ? 0xFF : lightInfo.level));\n\tmsg.addByte(lightInfo.color);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05cb2deec014fc26896748bd60334064b4435a198a51eb7cd9a4e8150f3f652b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8028, + "startColumn": 18, + "charOffset": 244384, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 8026, + "startColumn": 18, + "charOffset": 244261, + "charLength": 2, + "snippet": { + "text": "// tile\nvoid ProtocolGame::RemoveTileThing(NetworkMessage &msg, const Position &pos, uint32_t stackpos) {\n\tif (stackpos >= 10) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "266cd58a60338a9a890b034dadfeea0a2b40ccd4eac8d1c77965c0425aff1ca4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8032, + "startColumn": 14, + "charOffset": 244417, + "charLength": 4, + "snippet": { + "text": "0x6C" + } + }, + "contextRegion": { + "startLine": 8030, + "startColumn": 14, + "charOffset": 244400, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tmsg.addByte(0x6C);\n\tmsg.addPosition(pos);\n\tmsg.addByte(static_cast(stackpos));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc295e822360dbb2aa64533202bf8259f6a4064cf3125576a10197795f5c6093" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x6C is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8032, + "startColumn": 14, + "charOffset": 244417, + "charLength": 4, + "snippet": { + "text": "0x6C" + } + }, + "contextRegion": { + "startLine": 8030, + "startColumn": 14, + "charOffset": 244400, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tmsg.addByte(0x6C);\n\tmsg.addPosition(pos);\n\tmsg.addByte(static_cast(stackpos));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "882b70062e4fee204ab3f49d4da7e0006d66fae593c4fe1fda07819ba147502a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8037, + "startColumn": 69, + "charOffset": 244564, + "charLength": 6, + "snippet": { + "text": "corpse" + } + }, + "contextRegion": { + "startLine": 8035, + "startColumn": 69, + "charOffset": 244493, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendKillTrackerUpdate(std::shared_ptr corpse, const std::string &name, const Outfit_t creatureOutfit) {\n\tif (oldProtocol) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "691f5f0c10dbbae341d535b149c12b5c66193fef08d215ea7c190ae7aab0a093" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8045, + "startColumn": 14, + "charOffset": 244738, + "charLength": 4, + "snippet": { + "text": "0xD1" + } + }, + "contextRegion": { + "startLine": 8043, + "startColumn": 14, + "charOffset": 244703, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xD1);\n\tmsg.addString(name, \"ProtocolGame::sendKillTrackerUpdate - name\");\n\tmsg.add(creatureOutfit.lookType ? creatureOutfit.lookType : 21);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e50dfada9812acc049f0da6dff96c79cb7d9a1caa1ff9cc7271293f805d4074d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xD1 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8045, + "startColumn": 14, + "charOffset": 244738, + "charLength": 4, + "snippet": { + "text": "0xD1" + } + }, + "contextRegion": { + "startLine": 8043, + "startColumn": 14, + "charOffset": 244703, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xD1);\n\tmsg.addString(name, \"ProtocolGame::sendKillTrackerUpdate - name\");\n\tmsg.add(creatureOutfit.lookType ? creatureOutfit.lookType : 21);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64b1ed20dce51c900b2c374def7a19b70bdfae4da7a8e85b623caec9742cbd09" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8047, + "startColumn": 20, + "charOffset": 244832, + "charLength": 14, + "snippet": { + "text": "creatureOutfit" + } + }, + "contextRegion": { + "startLine": 8045, + "startColumn": 20, + "charOffset": 244725, + "charLength": 14, + "snippet": { + "text": "\tmsg.addByte(0xD1);\n\tmsg.addString(name, \"ProtocolGame::sendKillTrackerUpdate - name\");\n\tmsg.add(creatureOutfit.lookType ? creatureOutfit.lookType : 21);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookHead : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookBody : 0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9dbf835f4e2cdc99858cacad1ebc6c9e53118747c298c77ca210531399d594c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8047, + "startColumn": 20, + "charOffset": 244832, + "charLength": 14, + "snippet": { + "text": "creatureOutfit" + } + }, + "contextRegion": { + "startLine": 8045, + "startColumn": 20, + "charOffset": 244725, + "charLength": 14, + "snippet": { + "text": "\tmsg.addByte(0xD1);\n\tmsg.addString(name, \"ProtocolGame::sendKillTrackerUpdate - name\");\n\tmsg.add(creatureOutfit.lookType ? creatureOutfit.lookType : 21);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookHead : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookBody : 0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ded909b66bc81fa030115ad7cba110a0bb52f0b5dd7951355a29e9053b2811ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint16_t' (aka 'unsigned short') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8047, + "startColumn": 20, + "charOffset": 244832, + "charLength": 14, + "snippet": { + "text": "creatureOutfit" + } + }, + "contextRegion": { + "startLine": 8045, + "startColumn": 20, + "charOffset": 244725, + "charLength": 14, + "snippet": { + "text": "\tmsg.addByte(0xD1);\n\tmsg.addString(name, \"ProtocolGame::sendKillTrackerUpdate - name\");\n\tmsg.add(creatureOutfit.lookType ? creatureOutfit.lookType : 21);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookHead : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookBody : 0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3661d4ad001ed207cca3cbb16ed978fa1403c8179a89b41043d4828a879395d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "21 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8047, + "startColumn": 72, + "charOffset": 244884, + "charLength": 2, + "snippet": { + "text": "21" + } + }, + "contextRegion": { + "startLine": 8045, + "startColumn": 72, + "charOffset": 244725, + "charLength": 2, + "snippet": { + "text": "\tmsg.addByte(0xD1);\n\tmsg.addString(name, \"ProtocolGame::sendKillTrackerUpdate - name\");\n\tmsg.add(creatureOutfit.lookType ? creatureOutfit.lookType : 21);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookHead : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookBody : 0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8acac6ae6b187fe85fd5832a37d33aa33fde92564b7882443f8ea25ac8222009" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8048, + "startColumn": 14, + "charOffset": 244902, + "charLength": 14, + "snippet": { + "text": "creatureOutfit" + } + }, + "contextRegion": { + "startLine": 8046, + "startColumn": 14, + "charOffset": 244745, + "charLength": 14, + "snippet": { + "text": "\tmsg.addString(name, \"ProtocolGame::sendKillTrackerUpdate - name\");\n\tmsg.add(creatureOutfit.lookType ? creatureOutfit.lookType : 21);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookHead : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookBody : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookLegs : 0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17560fe3c8c94bcc8f8dcccf9bea22054a4f99be6a5b8974512f954f0dcdf02a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8048, + "startColumn": 14, + "charOffset": 244902, + "charLength": 14, + "snippet": { + "text": "creatureOutfit" + } + }, + "contextRegion": { + "startLine": 8046, + "startColumn": 14, + "charOffset": 244745, + "charLength": 14, + "snippet": { + "text": "\tmsg.addString(name, \"ProtocolGame::sendKillTrackerUpdate - name\");\n\tmsg.add(creatureOutfit.lookType ? creatureOutfit.lookType : 21);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookHead : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookBody : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookLegs : 0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a8d9cf69dcfaf89ae35d3bb0cee497310ee96a95a493988abbe8b9d406b1c7f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint16_t' (aka 'unsigned short') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8048, + "startColumn": 14, + "charOffset": 244902, + "charLength": 14, + "snippet": { + "text": "creatureOutfit" + } + }, + "contextRegion": { + "startLine": 8046, + "startColumn": 14, + "charOffset": 244745, + "charLength": 14, + "snippet": { + "text": "\tmsg.addString(name, \"ProtocolGame::sendKillTrackerUpdate - name\");\n\tmsg.add(creatureOutfit.lookType ? creatureOutfit.lookType : 21);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookHead : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookBody : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookLegs : 0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96bfd9d02916d13320cc4e1b62fdd26a5c06e5a70162c8f214c878584168a489" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8049, + "startColumn": 14, + "charOffset": 244974, + "charLength": 14, + "snippet": { + "text": "creatureOutfit" + } + }, + "contextRegion": { + "startLine": 8047, + "startColumn": 14, + "charOffset": 244813, + "charLength": 14, + "snippet": { + "text": "\tmsg.add(creatureOutfit.lookType ? creatureOutfit.lookType : 21);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookHead : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookBody : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookLegs : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookFeet : 0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5274492500ae75bad8756ca1e6f3c81b9f04ef893634b07001743660e96c51de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8049, + "startColumn": 14, + "charOffset": 244974, + "charLength": 14, + "snippet": { + "text": "creatureOutfit" + } + }, + "contextRegion": { + "startLine": 8047, + "startColumn": 14, + "charOffset": 244813, + "charLength": 14, + "snippet": { + "text": "\tmsg.add(creatureOutfit.lookType ? creatureOutfit.lookType : 21);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookHead : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookBody : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookLegs : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookFeet : 0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d6f49d4ea8577e3405e4fa4cf9b7e404ff82c75781ceb2e866944dcda34a3da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint16_t' (aka 'unsigned short') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8049, + "startColumn": 14, + "charOffset": 244974, + "charLength": 14, + "snippet": { + "text": "creatureOutfit" + } + }, + "contextRegion": { + "startLine": 8047, + "startColumn": 14, + "charOffset": 244813, + "charLength": 14, + "snippet": { + "text": "\tmsg.add(creatureOutfit.lookType ? creatureOutfit.lookType : 21);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookHead : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookBody : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookLegs : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookFeet : 0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0108e090f0724e450c2611380a499c2945bf746fab3fea92e7b46e9e76d1bdc4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8050, + "startColumn": 14, + "charOffset": 245046, + "charLength": 14, + "snippet": { + "text": "creatureOutfit" + } + }, + "contextRegion": { + "startLine": 8048, + "startColumn": 14, + "charOffset": 244889, + "charLength": 14, + "snippet": { + "text": "\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookHead : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookBody : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookLegs : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookFeet : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookAddons : 0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f667a03dc99da37d6008f9b4224d2a02e60421e0ea1b6349796b75fbcf2d6e28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8050, + "startColumn": 14, + "charOffset": 245046, + "charLength": 14, + "snippet": { + "text": "creatureOutfit" + } + }, + "contextRegion": { + "startLine": 8048, + "startColumn": 14, + "charOffset": 244889, + "charLength": 14, + "snippet": { + "text": "\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookHead : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookBody : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookLegs : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookFeet : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookAddons : 0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df54ac2355c640d3d13b97608cbd6e9c88d31ee7fc53ba3fe18274c7e870be77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint16_t' (aka 'unsigned short') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8050, + "startColumn": 14, + "charOffset": 245046, + "charLength": 14, + "snippet": { + "text": "creatureOutfit" + } + }, + "contextRegion": { + "startLine": 8048, + "startColumn": 14, + "charOffset": 244889, + "charLength": 14, + "snippet": { + "text": "\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookHead : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookBody : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookLegs : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookFeet : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookAddons : 0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a2fa3817999bc47d4853f637d298541877bdf8b2d160f003a2583669091d2ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8051, + "startColumn": 14, + "charOffset": 245118, + "charLength": 14, + "snippet": { + "text": "creatureOutfit" + } + }, + "contextRegion": { + "startLine": 8049, + "startColumn": 14, + "charOffset": 244961, + "charLength": 14, + "snippet": { + "text": "\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookBody : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookLegs : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookFeet : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookAddons : 0x00);\n\tmsg.addByte(isCorpseEmpty ? 0 : corpse->size());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b8fd977da923cebdefd5d96b37d539f9e58ed0b00d22fd0dfcec39ef5129278" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8051, + "startColumn": 14, + "charOffset": 245118, + "charLength": 14, + "snippet": { + "text": "creatureOutfit" + } + }, + "contextRegion": { + "startLine": 8049, + "startColumn": 14, + "charOffset": 244961, + "charLength": 14, + "snippet": { + "text": "\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookBody : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookLegs : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookFeet : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookAddons : 0x00);\n\tmsg.addByte(isCorpseEmpty ? 0 : corpse->size());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a7dfa93a1915bd11dee818fd86055a5e6c8019e9f980ba68a55e487ad00894d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint16_t' (aka 'unsigned short') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8051, + "startColumn": 14, + "charOffset": 245118, + "charLength": 14, + "snippet": { + "text": "creatureOutfit" + } + }, + "contextRegion": { + "startLine": 8049, + "startColumn": 14, + "charOffset": 244961, + "charLength": 14, + "snippet": { + "text": "\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookBody : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookLegs : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookFeet : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookAddons : 0x00);\n\tmsg.addByte(isCorpseEmpty ? 0 : corpse->size());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07741da12184a802a6d3b4b9ab72f15d1e08dc3736211e1900a04cfa6ee862d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8052, + "startColumn": 14, + "charOffset": 245190, + "charLength": 14, + "snippet": { + "text": "creatureOutfit" + } + }, + "contextRegion": { + "startLine": 8050, + "startColumn": 14, + "charOffset": 245033, + "charLength": 14, + "snippet": { + "text": "\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookLegs : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookFeet : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookAddons : 0x00);\n\tmsg.addByte(isCorpseEmpty ? 0 : corpse->size());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76be9fcb7d1c83a9cca9fb62f8a7c0f3a420abe0a3297445e825af97c3a22d33" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8052, + "startColumn": 14, + "charOffset": 245190, + "charLength": 14, + "snippet": { + "text": "creatureOutfit" + } + }, + "contextRegion": { + "startLine": 8050, + "startColumn": 14, + "charOffset": 245033, + "charLength": 14, + "snippet": { + "text": "\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookLegs : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookFeet : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookAddons : 0x00);\n\tmsg.addByte(isCorpseEmpty ? 0 : corpse->size());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d01186ff56defd3f770ffd2179c79f9f1ebcb6e84d3c121138a3d0c9ae87d5aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint16_t' (aka 'unsigned short') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8052, + "startColumn": 14, + "charOffset": 245190, + "charLength": 14, + "snippet": { + "text": "creatureOutfit" + } + }, + "contextRegion": { + "startLine": 8050, + "startColumn": 14, + "charOffset": 245033, + "charLength": 14, + "snippet": { + "text": "\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookLegs : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookFeet : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookAddons : 0x00);\n\tmsg.addByte(isCorpseEmpty ? 0 : corpse->size());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8239f7de5dae906b0db94bd35c2b7f56dcb01c2de91eff6de155e489f681170" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8053, + "startColumn": 14, + "charOffset": 245264, + "charLength": 13, + "snippet": { + "text": "isCorpseEmpty" + } + }, + "contextRegion": { + "startLine": 8051, + "startColumn": 14, + "charOffset": 245105, + "charLength": 13, + "snippet": { + "text": "\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookFeet : 0x00);\n\tmsg.addByte(creatureOutfit.lookType ? creatureOutfit.lookAddons : 0x00);\n\tmsg.addByte(isCorpseEmpty ? 0 : corpse->size());\n\n\tif (!isCorpseEmpty) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "035d90c3d321f77d06b902404c2885317b41ff316377f509db42e3accafc55a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8056, + "startColumn": 3, + "charOffset": 245327, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 8054, + "startColumn": 3, + "charOffset": 245301, + "charLength": 3, + "snippet": { + "text": "\n\tif (!isCorpseEmpty) {\n\t\tfor (const auto &it : corpse->getItemList()) {\n\t\t\tAddItem(msg, it);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86695ac2527d0348fc929a24b126891b458086c7ccbdc2019ace9a3ada01ae3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8064, + "startColumn": 66, + "charOffset": 245498, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 8062, + "startColumn": 66, + "charOffset": 245430, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendUpdateSupplyTracker(std::shared_ptr item) {\n\tif (oldProtocol || !player || !item) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f360acd211247bac29cdbf3eaa1670f8ba228f28820bdb885469b905ca3e01be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8065, + "startColumn": 21, + "charOffset": 245526, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8063, + "startColumn": 21, + "charOffset": 245432, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendUpdateSupplyTracker(std::shared_ptr item) {\n\tif (oldProtocol || !player || !item) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c82c800a9c5b277155cf66e82c7a6e4f300e08e0a866cf9f4ddc4aa480da899d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8065, + "startColumn": 32, + "charOffset": 245537, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8063, + "startColumn": 32, + "charOffset": 245432, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendUpdateSupplyTracker(std::shared_ptr item) {\n\tif (oldProtocol || !player || !item) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "812fe0ece629e98d22aefd345e406941fb243989523139ae38300bdd0d6fd0bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8070, + "startColumn": 14, + "charOffset": 245594, + "charLength": 4, + "snippet": { + "text": "0xCE" + } + }, + "contextRegion": { + "startLine": 8068, + "startColumn": 14, + "charOffset": 245559, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xCE);\n\tmsg.add(item->getID());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14b1d5fc5d975c94621e43fa1178941b6c78197c21dc4183b2862ee3e42e6892" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xCE is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8070, + "startColumn": 14, + "charOffset": 245594, + "charLength": 4, + "snippet": { + "text": "0xCE" + } + }, + "contextRegion": { + "startLine": 8068, + "startColumn": 14, + "charOffset": 245559, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xCE);\n\tmsg.add(item->getID());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c44f7e583d9dcd0c95bc35cc725f72e1103e3064e1d62af86f7c32bb063e988" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8077, + "startColumn": 6, + "charOffset": 245752, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8075, + "startColumn": 6, + "charOffset": 245666, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendUpdateImpactTracker(CombatType_t type, int32_t amount) {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "622d5b8143353398cb531e88257339dc844df67c2f62e51d4d8bea7e05a8d1f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8087, + "startColumn": 14, + "charOffset": 245938, + "charLength": 4, + "snippet": { + "text": "0xCC" + } + }, + "contextRegion": { + "startLine": 8085, + "startColumn": 14, + "charOffset": 245903, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xCC);\n\tif (type == COMBAT_HEALING) {\n\t\tmsg.addByte(ANALYZER_HEAL);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95a109da00264300aa6cdd41c605e5ad79696b145748bb50e88fad960fb0d1a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xCC is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8087, + "startColumn": 14, + "charOffset": 245938, + "charLength": 4, + "snippet": { + "text": "0xCC" + } + }, + "contextRegion": { + "startLine": 8085, + "startColumn": 14, + "charOffset": 245903, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xCC);\n\tif (type == COMBAT_HEALING) {\n\t\tmsg.addByte(ANALYZER_HEAL);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f5fd6c4ebe95e561ba276eb1d924248f52c0a321a1635bc441f9e224d69ace4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8099, + "startColumn": 91, + "charOffset": 246265, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 8097, + "startColumn": 91, + "charOffset": 246172, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendUpdateInputAnalyzer(CombatType_t type, int32_t amount, std::string target) {\n\tif (!player || oldProtocol) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56d168693c6ad848857b562d2637452e9177ec02563213056fdf51688df46153" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8100, + "startColumn": 6, + "charOffset": 246280, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8098, + "startColumn": 6, + "charOffset": 246174, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendUpdateInputAnalyzer(CombatType_t type, int32_t amount, std::string target) {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e905190e57f3681ff5c8e05f31acb7445ed50dfad3158834358d598fe3ef6891" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8110, + "startColumn": 14, + "charOffset": 246466, + "charLength": 4, + "snippet": { + "text": "0xCC" + } + }, + "contextRegion": { + "startLine": 8108, + "startColumn": 14, + "charOffset": 246431, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xCC);\n\tmsg.addByte(ANALYZER_DAMAGE_RECEIVED);\n\tmsg.add(amount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43bff0f68f85b2dcb85ea8dd1881b813e30f90e250305f3b9c2d61bf45fcc911" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xCC is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8110, + "startColumn": 14, + "charOffset": 246466, + "charLength": 4, + "snippet": { + "text": "0xCC" + } + }, + "contextRegion": { + "startLine": 8108, + "startColumn": 14, + "charOffset": 246431, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xCC);\n\tmsg.addByte(ANALYZER_DAMAGE_RECEIVED);\n\tmsg.add(amount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e37efa6dc4ca7d85cb4887e0c31c129b299c0c8a5052a56e6c0ce8df85743876" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'sendTaskHuntingData' has cognitive complexity of 31 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8118, + "startColumn": 20, + "charOffset": 246693, + "charLength": 19, + "snippet": { + "text": "sendTaskHuntingData" + } + }, + "contextRegion": { + "startLine": 8116, + "startColumn": 20, + "charOffset": 246671, + "charLength": 19, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendTaskHuntingData(const std::unique_ptr &slot) {\n\tif (!player || oldProtocol) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "18f20ca905784d21099f9432ea75c7cf81441564376a3bcf60057c0f4a8898a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8119, + "startColumn": 6, + "charOffset": 246766, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8117, + "startColumn": 6, + "charOffset": 246673, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendTaskHuntingData(const std::unique_ptr &slot) {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "856bcd66ff90b0582468eb7b5c889b8d9a5045ec0cd3f7994ef0a65198e2c87f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8124, + "startColumn": 14, + "charOffset": 246840, + "charLength": 4, + "snippet": { + "text": "0xBB" + } + }, + "contextRegion": { + "startLine": 8122, + "startColumn": 14, + "charOffset": 246805, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xBB);\n\tmsg.addByte(static_cast(slot->id));\n\tmsg.addByte(static_cast(slot->state));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5eb8ab2170e669923357877df69e0e9d9bd33526b5061123a0e87c6130e56296" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xBB is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8124, + "startColumn": 14, + "charOffset": 246840, + "charLength": 4, + "snippet": { + "text": "0xBB" + } + }, + "contextRegion": { + "startLine": 8122, + "startColumn": 14, + "charOffset": 246805, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xBB);\n\tmsg.addByte(static_cast(slot->id));\n\tmsg.addByte(static_cast(slot->state));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3311d5b78a16248e1ae764ee89a0ba8a6ba349cfd817307d4a5e10080e2bdd92" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8134, + "startColumn": 3, + "charOffset": 247278, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 8132, + "startColumn": 3, + "charOffset": 247166, + "charLength": 3, + "snippet": { + "text": "\t\tstd::shared_ptr user = player;\n\t\tmsg.add(static_cast(slot->raceIdList.size()));\n\t\tstd::for_each(slot->raceIdList.begin(), slot->raceIdList.end(), [&msg, user](uint16_t raceid) {\n\t\t\tmsg.add(raceid);\n\t\t\tmsg.addByte(user->isCreatureUnlockedOnTaskHunting(g_monsters().getMonsterTypeByRaceId(raceid)) ? 0x01 : 0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3721cdfd244ac8d1287af4d889f879d5af7f58d39bee9eb17082e5271f326ff1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8142, + "startColumn": 3, + "charOffset": 247777, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 8140, + "startColumn": 3, + "charOffset": 247627, + "charLength": 3, + "snippet": { + "text": "\t\tconst std::map bestiaryList = g_game().getBestiaryList();\n\t\tmsg.add(static_cast(bestiaryList.size()));\n\t\tstd::for_each(bestiaryList.begin(), bestiaryList.end(), [&msg, user](auto mType) {\n\t\t\tmsg.add(mType.first);\n\t\t\tmsg.addByte(user->isCreatureUnlockedOnTaskHunting(g_monsters().getMonsterType(mType.second)) ? 0x01 : 0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "980277ed1738d010c74223666f4e1de7c2b2e691801294da9fc0b522ee74798a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8150, + "startColumn": 17, + "charOffset": 248219, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 8148, + "startColumn": 17, + "charOffset": 248135, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.add(slot->selectedRaceId);\n\t\t\tif (slot->upgrade) {\n\t\t\t\tmsg.addByte(0x01);\n\t\t\t\tmsg.add(option->secondKills);\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "200b429b6a151eebbc20111d9941e7f71a67c23bfbdcade9b382d16ecf826f49" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8153, + "startColumn": 17, + "charOffset": 248298, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 8151, + "startColumn": 17, + "charOffset": 248226, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tmsg.add(option->secondKills);\n\t\t\t} else {\n\t\t\t\tmsg.addByte(0x00);\n\t\t\t\tmsg.add(option->firstKills);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4fab15973282ed21612b034250d86398e631b587ff617919f9351820837f0e99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8166, + "startColumn": 17, + "charOffset": 248803, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 8164, + "startColumn": 17, + "charOffset": 248719, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.add(slot->selectedRaceId);\n\t\t\tif (slot->upgrade) {\n\t\t\t\tmsg.addByte(0x01);\n\t\t\t\tmsg.add(option->secondKills);\n\t\t\t\tmsg.add(std::min(slot->currentKills, option->secondKills));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51bfec819dd6d3c1e249917e4bfe5099fff7b648d2ee2f9f6984675f195d8828" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8170, + "startColumn": 17, + "charOffset": 248966, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 8168, + "startColumn": 17, + "charOffset": 248854, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tmsg.add(std::min(slot->currentKills, option->secondKills));\n\t\t\t} else {\n\t\t\t\tmsg.addByte(0x00);\n\t\t\t\tmsg.add(option->firstKills);\n\t\t\t\tmsg.add(std::min(slot->currentKills, option->firstKills));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76c8d4091153f99a8b3146d5e6a66ab2b276c5e77d19252677299a1c40e9e086" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8184, + "startColumn": 107, + "charOffset": 249554, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 8182, + "startColumn": 107, + "charOffset": 249444, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tmsg.add(std::max(static_cast(((slot->freeRerollTimeStamp - OTSYS_TIME()) / 1000)), 0));\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2bbf7ef07a7871124095f53502297c37ad868946427951fd5b518d869927e57d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8188, + "startColumn": 82, + "charOffset": 249678, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 8186, + "startColumn": 82, + "charOffset": 249594, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::MoveUpCreature(NetworkMessage &msg, std::shared_ptr creature, const Position &newPos, const Position &oldPos) {\n\tif (creature != player) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78401b6d1c2cc93eb468e64f2bfbc15a250e94313d274d9d9e34a94fd5575d7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8194, + "startColumn": 14, + "charOffset": 249812, + "charLength": 4, + "snippet": { + "text": "0xBE" + } + }, + "contextRegion": { + "startLine": 8192, + "startColumn": 14, + "charOffset": 249778, + "charLength": 4, + "snippet": { + "text": "\n\t// floor change up\n\tmsg.addByte(0xBE);\n\n\t// going to surface" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "adf9db70c03a5e18f96106e8e350b0ec1f00e09f36752d1c05909e5e1184ef24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xBE is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8194, + "startColumn": 14, + "charOffset": 249812, + "charLength": 4, + "snippet": { + "text": "0xBE" + } + }, + "contextRegion": { + "startLine": 8192, + "startColumn": 14, + "charOffset": 249778, + "charLength": 4, + "snippet": { + "text": "\n\t// floor change up\n\tmsg.addByte(0xBE);\n\n\t// going to surface" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02da623f66495e3e43a907f2771249fb2e0f5867a89750bccf61f5a18d418241" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8197, + "startColumn": 2, + "charOffset": 249842, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 8195, + "startColumn": 2, + "charOffset": 249819, + "charLength": 2, + "snippet": { + "text": "\n\t// going to surface\n\tif (newPos.z == MAP_INIT_SURFACE_LAYER) {\n\t\tint32_t skip = -1;\n\t\tGetFloorDescription(msg, oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, 5, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, 3, skip); //(floor 7 and 6 already set)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2861ed404e18a87a1a39e8f07caa613a578276f0e6334dd439d59cdfb8cd56c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8199, + "startColumn": 106, + "charOffset": 250010, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 8197, + "startColumn": 106, + "charOffset": 249841, + "charLength": 1, + "snippet": { + "text": "\tif (newPos.z == MAP_INIT_SURFACE_LAYER) {\n\t\tint32_t skip = -1;\n\t\tGetFloorDescription(msg, oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, 5, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, 3, skip); //(floor 7 and 6 already set)\n\t\tGetFloorDescription(msg, oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, 4, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, 4, skip);\n\t\tGetFloorDescription(msg, oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, 3, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, 5, skip);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae5fe818b16761cffd81f25c13a36e6a88fd2b2b5192b9f30aeda406388bfe43" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8201, + "startColumn": 185, + "charOffset": 250507, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 8199, + "startColumn": 185, + "charOffset": 249905, + "charLength": 1, + "snippet": { + "text": "\t\tGetFloorDescription(msg, oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, 5, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, 3, skip); //(floor 7 and 6 already set)\n\t\tGetFloorDescription(msg, oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, 4, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, 4, skip);\n\t\tGetFloorDescription(msg, oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, 3, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, 5, skip);\n\t\tGetFloorDescription(msg, oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, 2, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, 6, skip);\n\t\tGetFloorDescription(msg, oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, 1, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, 7, skip);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b2e4716c586dbc9ed1c51ec757ae36a66fa37987a9ced2274c1c6bbf828dd58" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8202, + "startColumn": 185, + "charOffset": 250701, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 8200, + "startColumn": 185, + "charOffset": 250129, + "charLength": 1, + "snippet": { + "text": "\t\tGetFloorDescription(msg, oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, 4, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, 4, skip);\n\t\tGetFloorDescription(msg, oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, 3, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, 5, skip);\n\t\tGetFloorDescription(msg, oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, 2, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, 6, skip);\n\t\tGetFloorDescription(msg, oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, 1, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, 7, skip);\n\t\tGetFloorDescription(msg, oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, 0, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, 8, skip);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00ade3c9126363b2e09b454327b74bb66c0b43306da41b2d1ae4cae6c2a64687" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8203, + "startColumn": 185, + "charOffset": 250895, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 8201, + "startColumn": 185, + "charOffset": 250323, + "charLength": 1, + "snippet": { + "text": "\t\tGetFloorDescription(msg, oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, 3, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, 5, skip);\n\t\tGetFloorDescription(msg, oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, 2, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, 6, skip);\n\t\tGetFloorDescription(msg, oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, 1, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, 7, skip);\n\t\tGetFloorDescription(msg, oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, 0, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, 8, skip);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55e650ea9f32f4f382ba1ed5ce6448dd9ba9b3c1759e8284a06ceb057c45f735" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8204, + "startColumn": 185, + "charOffset": 251089, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 8202, + "startColumn": 185, + "charOffset": 250517, + "charLength": 1, + "snippet": { + "text": "\t\tGetFloorDescription(msg, oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, 2, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, 6, skip);\n\t\tGetFloorDescription(msg, oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, 1, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, 7, skip);\n\t\tGetFloorDescription(msg, oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, 0, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, 8, skip);\n\n\t\tif (skip >= 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e02c24f687822252469c288f7114571377218ba5db8a27111637f9a09ade4090" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8207, + "startColumn": 16, + "charOffset": 251134, + "charLength": 4, + "snippet": { + "text": "skip" + } + }, + "contextRegion": { + "startLine": 8205, + "startColumn": 16, + "charOffset": 251099, + "charLength": 4, + "snippet": { + "text": "\n\t\tif (skip >= 0) {\n\t\t\tmsg.addByte(skip);\n\t\t\tmsg.addByte(0xFF);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68505652146f29f7be2f402b175782b02ee67e7104d15fdae9f1f63013352b9b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8208, + "startColumn": 16, + "charOffset": 251156, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 8206, + "startColumn": 16, + "charOffset": 251100, + "charLength": 4, + "snippet": { + "text": "\t\tif (skip >= 0) {\n\t\t\tmsg.addByte(skip);\n\t\t\tmsg.addByte(0xFF);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f8d36889318a949393f044c506a5c447bdc1bbe2318febb97f5fffc2ee00909" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8208, + "startColumn": 16, + "charOffset": 251156, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 8206, + "startColumn": 16, + "charOffset": 251100, + "charLength": 4, + "snippet": { + "text": "\t\tif (skip >= 0) {\n\t\t\tmsg.addByte(skip);\n\t\t\tmsg.addByte(0xFF);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5cb6f3176d03c37895e6c686b199b54c84869ebb845d12fde56f4d11ef70bcea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int_fast16_t' (aka 'long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8214, + "startColumn": 106, + "charOffset": 251399, + "charLength": 6, + "snippet": { + "text": "oldPos" + } + }, + "contextRegion": { + "startLine": 8212, + "startColumn": 106, + "charOffset": 251226, + "charLength": 6, + "snippet": { + "text": "\telse if (newPos.z > MAP_INIT_SURFACE_LAYER) {\n\t\tint32_t skip = -1;\n\t\tGetFloorDescription(msg, oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, oldPos.getZ() - 3, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, 3, skip);\n\n\t\tif (skip >= 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fcaf7f613b8e7ddbbba6fa9844cd908854d3dd7d55f6345edcb3ad10a073f35b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8214, + "startColumn": 106, + "charOffset": 251399, + "charLength": 6, + "snippet": { + "text": "oldPos" + } + }, + "contextRegion": { + "startLine": 8212, + "startColumn": 106, + "charOffset": 251226, + "charLength": 6, + "snippet": { + "text": "\telse if (newPos.z > MAP_INIT_SURFACE_LAYER) {\n\t\tint32_t skip = -1;\n\t\tGetFloorDescription(msg, oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, oldPos.getZ() - 3, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, 3, skip);\n\n\t\tif (skip >= 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99f493db91232a44fb6b69a6db856ac8deaa0dd9606ef6218de7edb500474cc8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8217, + "startColumn": 16, + "charOffset": 251539, + "charLength": 4, + "snippet": { + "text": "skip" + } + }, + "contextRegion": { + "startLine": 8215, + "startColumn": 16, + "charOffset": 251504, + "charLength": 4, + "snippet": { + "text": "\n\t\tif (skip >= 0) {\n\t\t\tmsg.addByte(skip);\n\t\t\tmsg.addByte(0xFF);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d14beef7597dbbb8141d09a0d6cae7db06525f35b998436b0e4e51aace5a9c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8218, + "startColumn": 16, + "charOffset": 251561, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 8216, + "startColumn": 16, + "charOffset": 251505, + "charLength": 4, + "snippet": { + "text": "\t\tif (skip >= 0) {\n\t\t\tmsg.addByte(skip);\n\t\t\tmsg.addByte(0xFF);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d517a1bcddd1095222eb902088e8e01a03257037676dd9e6dbd9b563beb8e588" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8218, + "startColumn": 16, + "charOffset": 251561, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 8216, + "startColumn": 16, + "charOffset": 251505, + "charLength": 4, + "snippet": { + "text": "\t\tif (skip >= 0) {\n\t\t\tmsg.addByte(skip);\n\t\t\tmsg.addByte(0xFF);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70abd260593505a222d3f4cbab6816b6b5ec10965d980729ed83f286a20765ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8224, + "startColumn": 14, + "charOffset": 251644, + "charLength": 4, + "snippet": { + "text": "0x68" + } + }, + "contextRegion": { + "startLine": 8222, + "startColumn": 14, + "charOffset": 251576, + "charLength": 4, + "snippet": { + "text": "\t// moving up a floor up makes us out of sync\n\t// west\n\tmsg.addByte(0x68);\n\tGetMapDescription(oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - (MAP_MAX_CLIENT_VIEW_PORT_Y - 1), newPos.z, 1, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, msg);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94fa65f32230d739b2236ece50afab261375c3ed7d6ab5b7cbbab3f9fab8967a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x68 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8224, + "startColumn": 14, + "charOffset": 251644, + "charLength": 4, + "snippet": { + "text": "0x68" + } + }, + "contextRegion": { + "startLine": 8222, + "startColumn": 14, + "charOffset": 251576, + "charLength": 4, + "snippet": { + "text": "\t// moving up a floor up makes us out of sync\n\t// west\n\tmsg.addByte(0x68);\n\tGetMapDescription(oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - (MAP_MAX_CLIENT_VIEW_PORT_Y - 1), newPos.z, 1, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, msg);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c41c4eaa90e56948efd21fd0f6566b7bc41873c70d7eb7a29c9705579fa3a96e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8228, + "startColumn": 14, + "charOffset": 251835, + "charLength": 4, + "snippet": { + "text": "0x65" + } + }, + "contextRegion": { + "startLine": 8226, + "startColumn": 14, + "charOffset": 251811, + "charLength": 4, + "snippet": { + "text": "\n\t// north\n\tmsg.addByte(0x65);\n\tGetMapDescription(oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, newPos.z, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, 1, msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "933eb2777dacbc5610574a075ec7524668317208f5629e021722842d3babeb94" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x65 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8228, + "startColumn": 14, + "charOffset": 251835, + "charLength": 4, + "snippet": { + "text": "0x65" + } + }, + "contextRegion": { + "startLine": 8226, + "startColumn": 14, + "charOffset": 251811, + "charLength": 4, + "snippet": { + "text": "\n\t// north\n\tmsg.addByte(0x65);\n\tGetMapDescription(oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y - MAP_MAX_CLIENT_VIEW_PORT_Y, newPos.z, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, 1, msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e16710f08e53e62e9e91c8e66139378e5dc0917a118fdd24c677ff329ae370e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8232, + "startColumn": 84, + "charOffset": 252082, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 8230, + "startColumn": 84, + "charOffset": 251996, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::MoveDownCreature(NetworkMessage &msg, std::shared_ptr creature, const Position &newPos, const Position &oldPos) {\n\tif (creature != player) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1dbde96f2a19ab8a474d90c8c332f5a73637787d552f5e5e4281dce4e9135ba3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8238, + "startColumn": 14, + "charOffset": 252218, + "charLength": 4, + "snippet": { + "text": "0xBF" + } + }, + "contextRegion": { + "startLine": 8236, + "startColumn": 14, + "charOffset": 252182, + "charLength": 4, + "snippet": { + "text": "\n\t// floor change down\n\tmsg.addByte(0xBF);\n\n\t// going from surface to underground" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "529e2b10fc92df70d7d619c6ccabb1b9b90a1324880c79eee2ba8dfece2c448c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xBF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8238, + "startColumn": 14, + "charOffset": 252218, + "charLength": 4, + "snippet": { + "text": "0xBF" + } + }, + "contextRegion": { + "startLine": 8236, + "startColumn": 14, + "charOffset": 252182, + "charLength": 4, + "snippet": { + "text": "\n\t// floor change down\n\tmsg.addByte(0xBF);\n\n\t// going from surface to underground" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "832de9179f350073cdf9866fa87655e4d52b75db999a602779c66b39f452d969" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8241, + "startColumn": 2, + "charOffset": 252265, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 8239, + "startColumn": 2, + "charOffset": 252225, + "charLength": 2, + "snippet": { + "text": "\n\t// going from surface to underground\n\tif (newPos.z == MAP_INIT_SURFACE_LAYER + 1) {\n\t\tint32_t skip = -1;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1de03abcf46d61fb8e06dafe46dc9d77c05ddc8af5d0b659e35316e307ccdb4f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8249, + "startColumn": 16, + "charOffset": 252982, + "charLength": 4, + "snippet": { + "text": "skip" + } + }, + "contextRegion": { + "startLine": 8247, + "startColumn": 16, + "charOffset": 252947, + "charLength": 4, + "snippet": { + "text": "\n\t\tif (skip >= 0) {\n\t\t\tmsg.addByte(skip);\n\t\t\tmsg.addByte(0xFF);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df54ac2355c640d3d13b97608cbd6e9c88d31ee7fc53ba3fe18274c7e870be77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8250, + "startColumn": 16, + "charOffset": 253004, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 8248, + "startColumn": 16, + "charOffset": 252948, + "charLength": 4, + "snippet": { + "text": "\t\tif (skip >= 0) {\n\t\t\tmsg.addByte(skip);\n\t\t\tmsg.addByte(0xFF);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61f2c748c931c8797bc486339058790637b5bb22fb10dc29c4116287efafb3d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8250, + "startColumn": 16, + "charOffset": 253004, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 8248, + "startColumn": 16, + "charOffset": 252948, + "charLength": 4, + "snippet": { + "text": "\t\tif (skip >= 0) {\n\t\t\tmsg.addByte(skip);\n\t\t\tmsg.addByte(0xFF);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf641612dd8a8c53952f2b308fbc602e7eedcaffc861d964be66e3b0d696ff3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8259, + "startColumn": 16, + "charOffset": 253448, + "charLength": 4, + "snippet": { + "text": "skip" + } + }, + "contextRegion": { + "startLine": 8257, + "startColumn": 16, + "charOffset": 253413, + "charLength": 4, + "snippet": { + "text": "\n\t\tif (skip >= 0) {\n\t\t\tmsg.addByte(skip);\n\t\t\tmsg.addByte(0xFF);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bdee572766d11415b98621db0951dc8eaaab366bb0eaa5dd7703265e20a87667" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8260, + "startColumn": 16, + "charOffset": 253470, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 8258, + "startColumn": 16, + "charOffset": 253414, + "charLength": 4, + "snippet": { + "text": "\t\tif (skip >= 0) {\n\t\t\tmsg.addByte(skip);\n\t\t\tmsg.addByte(0xFF);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b54ef7b7c5be802ee6a0bad3909373905e9c18f26972bd1e028b8d616b82369f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8260, + "startColumn": 16, + "charOffset": 253470, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 8258, + "startColumn": 16, + "charOffset": 253414, + "charLength": 4, + "snippet": { + "text": "\t\tif (skip >= 0) {\n\t\t\tmsg.addByte(skip);\n\t\t\tmsg.addByte(0xFF);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76b817328907ad19baa26a426657b9a8795b1ef49e40bf35e8efd0e199df984f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8266, + "startColumn": 14, + "charOffset": 253552, + "charLength": 4, + "snippet": { + "text": "0x66" + } + }, + "contextRegion": { + "startLine": 8264, + "startColumn": 14, + "charOffset": 253485, + "charLength": 4, + "snippet": { + "text": "\t// moving down a floor makes us out of sync\n\t// east\n\tmsg.addByte(0x66);\n\tGetMapDescription(oldPos.x + MAP_MAX_CLIENT_VIEW_PORT_X + 1, oldPos.y - (MAP_MAX_CLIENT_VIEW_PORT_Y + 1), newPos.z, 1, ((MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2), msg);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e045546f7a77f10dbe743be2b238abfeea0640db37e700a8e27902f09a3ff562" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x66 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8266, + "startColumn": 14, + "charOffset": 253552, + "charLength": 4, + "snippet": { + "text": "0x66" + } + }, + "contextRegion": { + "startLine": 8264, + "startColumn": 14, + "charOffset": 253485, + "charLength": 4, + "snippet": { + "text": "\t// moving down a floor makes us out of sync\n\t// east\n\tmsg.addByte(0x66);\n\tGetMapDescription(oldPos.x + MAP_MAX_CLIENT_VIEW_PORT_X + 1, oldPos.y - (MAP_MAX_CLIENT_VIEW_PORT_Y + 1), newPos.z, 1, ((MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2), msg);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0de593f88748426edefe1f1ec42b2f811ce4e1a700b569af7cfda1d963d98b30" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8270, + "startColumn": 14, + "charOffset": 253749, + "charLength": 4, + "snippet": { + "text": "0x67" + } + }, + "contextRegion": { + "startLine": 8268, + "startColumn": 14, + "charOffset": 253725, + "charLength": 4, + "snippet": { + "text": "\n\t// south\n\tmsg.addByte(0x67);\n\tGetMapDescription(oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y + (MAP_MAX_CLIENT_VIEW_PORT_Y + 1), newPos.z, ((MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2), 1, msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92c6cb975d81f74204e9c8812449f100ae7c039966488a87e993b864a16986f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x67 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8270, + "startColumn": 14, + "charOffset": 253749, + "charLength": 4, + "snippet": { + "text": "0x67" + } + }, + "contextRegion": { + "startLine": 8268, + "startColumn": 14, + "charOffset": 253725, + "charLength": 4, + "snippet": { + "text": "\n\t// south\n\tmsg.addByte(0x67);\n\tGetMapDescription(oldPos.x - MAP_MAX_CLIENT_VIEW_PORT_X, oldPos.y + (MAP_MAX_CLIENT_VIEW_PORT_Y + 1), newPos.z, ((MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2), 1, msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34bd571a98435619990582df9679c337c2f24744395affe092e78bd52f9e9ff4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'AddHiddenShopItem' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8274, + "startColumn": 20, + "charOffset": 253940, + "charLength": 17, + "snippet": { + "text": "AddHiddenShopItem" + } + }, + "contextRegion": { + "startLine": 8272, + "startColumn": 20, + "charOffset": 253918, + "charLength": 17, + "snippet": { + "text": "}\n\nvoid ProtocolGame::AddHiddenShopItem(NetworkMessage &msg) {\n\t// Empty bytes from AddShopItem\n\tmsg.add(0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a65717abb44d6d2d6b6233d088858896f9e5e341af1988c4119a2765d4f5be5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8296, + "startColumn": 15, + "charOffset": 254724, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 8294, + "startColumn": 15, + "charOffset": 254640, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addByte(static_cast(shopBlock.itemSubType));\n\t} else {\n\t\tmsg.addByte(0x00);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ba1b9bab1ac69b7a1aaef2f34314a3de3a5b5a2498c9413a7129639290575d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "4294967295 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8306, + "startColumn": 46, + "charOffset": 255112, + "charLength": 10, + "snippet": { + "text": "4294967295" + } + }, + "contextRegion": { + "startLine": 8304, + "startColumn": 46, + "charOffset": 255033, + "charLength": 10, + "snippet": { + "text": "\t}\n\tmsg.add(it.weight);\n\tmsg.add(shopBlock.itemBuyPrice == 4294967295 ? 0 : shopBlock.itemBuyPrice);\n\tmsg.add(shopBlock.itemSellPrice == 4294967295 ? 0 : shopBlock.itemSellPrice);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f43b52abd7406250e45b371848a1d411004c097fd137376cb1b9296772d0567" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "4294967295 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8307, + "startColumn": 47, + "charOffset": 255200, + "charLength": 10, + "snippet": { + "text": "4294967295" + } + }, + "contextRegion": { + "startLine": 8305, + "startColumn": 47, + "charOffset": 255036, + "charLength": 10, + "snippet": { + "text": "\tmsg.add(it.weight);\n\tmsg.add(shopBlock.itemBuyPrice == 4294967295 ? 0 : shopBlock.itemBuyPrice);\n\tmsg.add(shopBlock.itemSellPrice == 4294967295 ? 0 : shopBlock.itemSellPrice);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7172ee8b9456470b8d786a3ac5568a659f79150ecb2b687823c1bda32a44d877" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8333, + "startColumn": 14, + "charOffset": 255802, + "charLength": 4, + "snippet": { + "text": "0x43" + } + }, + "contextRegion": { + "startLine": 8331, + "startColumn": 14, + "charOffset": 255767, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x43);\n\tmsg.add(static_cast(features.size()));\n\tfor (const auto &[gameFeature, haveFeature] : features) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "529e2b10fc92df70d7d619c6ccabb1b9b90a1324880c79eee2ba8dfece2c448c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x43 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8333, + "startColumn": 14, + "charOffset": 255802, + "charLength": 4, + "snippet": { + "text": "0x43" + } + }, + "contextRegion": { + "startLine": 8331, + "startColumn": 14, + "charOffset": 255767, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x43);\n\tmsg.add(static_cast(features.size()));\n\tfor (const auto &[gameFeature, haveFeature] : features) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1e42aff44bec21a0ce148dde8fef906d3eb62071d9b49a08c19ef858a512ba7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8335, + "startColumn": 2, + "charOffset": 255870, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 8333, + "startColumn": 2, + "charOffset": 255789, + "charLength": 3, + "snippet": { + "text": "\tmsg.addByte(0x43);\n\tmsg.add(static_cast(features.size()));\n\tfor (const auto &[gameFeature, haveFeature] : features) {\n\t\tmsg.addByte(static_cast(gameFeature));\n\t\tmsg.addByte(haveFeature ? 1 : 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6454480e1a45015e4baedf390644e7775f9ccf4b5e0aa199c79821bb9b5fcfcc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8347, + "startColumn": 23, + "charOffset": 256170, + "charLength": 3, + "snippet": { + "text": "msg" + } + }, + "contextRegion": { + "startLine": 8345, + "startColumn": 23, + "charOffset": 256144, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tbool isTrackerOpen = msg.getByte(); // Window is opened or closed\n\tg_game().playerRequestInventoryImbuements(player->getID(), isTrackerOpen);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15afbdc5cc07c113aacd4d757a018d99bf272b4289b71288b8930ea50250f0d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'items' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8351, + "startColumn": 91, + "charOffset": 256384, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 8349, + "startColumn": 91, + "charOffset": 256291, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendInventoryImbuements(const std::map> items) {\n\tif (oldProtocol) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0927657d821015e23e717b5b9ddda4c0f10f17273c0dbf25a666b4a8bc1868f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8357, + "startColumn": 14, + "charOffset": 256461, + "charLength": 4, + "snippet": { + "text": "0x5D" + } + }, + "contextRegion": { + "startLine": 8355, + "startColumn": 14, + "charOffset": 256426, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x5D);\n\n\tmsg.addByte(static_cast(items.size()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07f9b4eed6bf79a9fc1ae2297a3b93402f046a5dee08206668c8ccd5618a5935" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x5D is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8357, + "startColumn": 14, + "charOffset": 256461, + "charLength": 4, + "snippet": { + "text": "0x5D" + } + }, + "contextRegion": { + "startLine": 8355, + "startColumn": 14, + "charOffset": 256426, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x5D);\n\n\tmsg.addByte(static_cast(items.size()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4c01335081107da91b9e8e59d40aa8d6260a287c83f042df6e25636045c8ad0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8370, + "startColumn": 3, + "charOffset": 256711, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 8368, + "startColumn": 3, + "charOffset": 256704, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfor (uint8_t imbueSlot = 0; imbueSlot < slots; imbueSlot++) {\n\t\t\tImbuementInfo imbuementInfo;\n\t\t\tif (!item->getImbuementInfo(imbueSlot, &imbuementInfo)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0a53f7db06245baa0bbcc9609828b57b4345c059c0ee28436753be044eb6d55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8373, + "startColumn": 17, + "charOffset": 256882, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 8371, + "startColumn": 17, + "charOffset": 256773, + "charLength": 4, + "snippet": { + "text": "\t\t\tImbuementInfo imbuementInfo;\n\t\t\tif (!item->getImbuementInfo(imbueSlot, &imbuementInfo)) {\n\t\t\t\tmsg.addByte(0x00);\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aacd8c8554b8cbc277ed04aa31559205c8508f76508cb94fd4700a0f1741b79e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto imbuement' can be declared as 'auto *imbuement'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8377, + "startColumn": 4, + "charOffset": 256912, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 8375, + "startColumn": 4, + "charOffset": 256903, + "charLength": 4, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tauto imbuement = imbuementInfo.imbuement;\n\t\t\tif (!imbuement) {\n\t\t\t\tmsg.addByte(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5493f0c61b7da37d84b39d00b3fa11657a88f55d23f01490825998dfbe688078" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8378, + "startColumn": 8, + "charOffset": 256961, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8376, + "startColumn": 8, + "charOffset": 256908, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tauto imbuement = imbuementInfo.imbuement;\n\t\t\tif (!imbuement) {\n\t\t\t\tmsg.addByte(0x00);\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "902daf103165ed7593c12b68fc62a8ef65dc55f0604d78c1acbf4b487cff7e60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'Imbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8378, + "startColumn": 9, + "charOffset": 256962, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 8376, + "startColumn": 9, + "charOffset": 256908, + "charLength": 9, + "snippet": { + "text": "\n\t\t\tauto imbuement = imbuementInfo.imbuement;\n\t\t\tif (!imbuement) {\n\t\t\t\tmsg.addByte(0x00);\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "acd56dd26b8ea97ad489e46183ac45f86c1fde65a6839043be6488668b44522f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8379, + "startColumn": 17, + "charOffset": 256991, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 8377, + "startColumn": 17, + "charOffset": 256909, + "charLength": 4, + "snippet": { + "text": "\t\t\tauto imbuement = imbuementInfo.imbuement;\n\t\t\tif (!imbuement) {\n\t\t\t\tmsg.addByte(0x00);\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e4fcaf81002b40a50a47a06c8b5a08f984f708f1a3147e0b5468e82c0f04c42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8384, + "startColumn": 16, + "charOffset": 257125, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 8382, + "startColumn": 16, + "charOffset": 257017, + "charLength": 4, + "snippet": { + "text": "\n\t\t\tconst BaseImbuement* baseImbuement = g_imbuements().getBaseByID(imbuement->getBaseID());\n\t\t\tmsg.addByte(0x01);\n\t\t\tmsg.addString(baseImbuement->name + \" \" + imbuement->getName(), \"ProtocolGame::sendInventoryImbuements - baseImbuement->name + \"\n\t\t\t \" + imbuement->getName()\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d6063b35d92cbd4321642de3d57813f4c5628df019baf6e7d0e6479f137b2de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8400, + "startColumn": 8, + "charOffset": 258121, + "charLength": 17, + "snippet": { + "text": "categoryImbuement" + } + }, + "contextRegion": { + "startLine": 8398, + "startColumn": 8, + "charOffset": 257935, + "charLength": 17, + "snippet": { + "text": "\t\t\tauto parent = item->getParent();\n\t\t\t// If the imbuement is aggressive and the player is not in fight mode or is in a protection zone, or the item is in a container, ignore it.\n\t\t\tif (categoryImbuement && categoryImbuement->agressive && (isInProtectionZone || !isInFightMode)) {\n\t\t\t\tmsg.addByte(0);\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "573f5baa4981354695b5e6e97a01c719e2959dd2e315fb2d3315a2932587bcd1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CategoryImbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8400, + "startColumn": 8, + "charOffset": 258121, + "charLength": 17, + "snippet": { + "text": "categoryImbuement" + } + }, + "contextRegion": { + "startLine": 8398, + "startColumn": 8, + "charOffset": 257935, + "charLength": 17, + "snippet": { + "text": "\t\t\tauto parent = item->getParent();\n\t\t\t// If the imbuement is aggressive and the player is not in fight mode or is in a protection zone, or the item is in a container, ignore it.\n\t\t\tif (categoryImbuement && categoryImbuement->agressive && (isInProtectionZone || !isInFightMode)) {\n\t\t\t\tmsg.addByte(0);\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04b1f490072d6bab337af696f4a8e1199dfdb6b19c2f1b3554530db815fd8557" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8400, + "startColumn": 58, + "charOffset": 258171, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 8398, + "startColumn": 58, + "charOffset": 257935, + "charLength": 2, + "snippet": { + "text": "\t\t\tauto parent = item->getParent();\n\t\t\t// If the imbuement is aggressive and the player is not in fight mode or is in a protection zone, or the item is in a container, ignore it.\n\t\t\tif (categoryImbuement && categoryImbuement->agressive && (isInProtectionZone || !isInFightMode)) {\n\t\t\t\tmsg.addByte(0);\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f829cc776ac91fe63c1d65316b8d5adbd29af284bbe4d99b0c261e0bdfa30e3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8405, + "startColumn": 8, + "charOffset": 258355, + "charLength": 17, + "snippet": { + "text": "categoryImbuement" + } + }, + "contextRegion": { + "startLine": 8403, + "startColumn": 8, + "charOffset": 258250, + "charLength": 17, + "snippet": { + "text": "\t\t\t}\n\t\t\t// If the item is not in the backpack slot and it's not a agressive imbuement, ignore it.\n\t\t\tif (categoryImbuement && !categoryImbuement->agressive && parent && parent != player) {\n\t\t\t\tmsg.addByte(0);\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d630794a034011a42153910af7dbafcc947927d0c8687c88e7a186d9b92811d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CategoryImbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8405, + "startColumn": 8, + "charOffset": 258355, + "charLength": 17, + "snippet": { + "text": "categoryImbuement" + } + }, + "contextRegion": { + "startLine": 8403, + "startColumn": 8, + "charOffset": 258250, + "charLength": 17, + "snippet": { + "text": "\t\t\t}\n\t\t\t// If the item is not in the backpack slot and it's not a agressive imbuement, ignore it.\n\t\t\tif (categoryImbuement && !categoryImbuement->agressive && parent && parent != player) {\n\t\t\t\tmsg.addByte(0);\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae293470b2f9e5344150bce12c38e7ea97647b05367e57cc3b91f296594c206a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8405, + "startColumn": 69, + "charOffset": 258416, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 8403, + "startColumn": 69, + "charOffset": 258250, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\t\t\t// If the item is not in the backpack slot and it's not a agressive imbuement, ignore it.\n\t\t\tif (categoryImbuement && !categoryImbuement->agressive && parent && parent != player) {\n\t\t\t\tmsg.addByte(0);\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "313e3890769fab0f4c7e535ecf03d051a936b57f501f5568e87595816f71e211" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8418, + "startColumn": 6, + "charOffset": 258579, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8416, + "startColumn": 6, + "charOffset": 258535, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendItemsPrice() {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b369f71d3d0494f0925578a00f319aff52e7734e20f35e9985130fc5e5d2d7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8423, + "startColumn": 14, + "charOffset": 258653, + "charLength": 4, + "snippet": { + "text": "0xCD" + } + }, + "contextRegion": { + "startLine": 8421, + "startColumn": 14, + "charOffset": 258618, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xCD);\n\n\tauto countBuffer = msg.getBufferPosition();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "daa6258c17990517834c68ef99608cef8d50112bf62e6e8d1de50ed02e337869" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xCD is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8423, + "startColumn": 14, + "charOffset": 258653, + "charLength": 4, + "snippet": { + "text": "0xCD" + } + }, + "contextRegion": { + "startLine": 8421, + "startColumn": 14, + "charOffset": 258618, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xCD);\n\n\tauto countBuffer = msg.getBufferPosition();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0937a0610eb7a17bb25eb10ac37489f8f2b8286dab81b09d496571c1fff84e06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8429, + "startColumn": 3, + "charOffset": 258822, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 8427, + "startColumn": 3, + "charOffset": 258727, + "charLength": 3, + "snippet": { + "text": "\tmsg.skipBytes(2);\n\tfor (const auto &[itemId, tierAndPriceMap] : g_game().getItemsPrice()) {\n\t\tfor (const auto &[tier, price] : tierAndPriceMap) {\n\t\t\tmsg.add(itemId);\n\t\t\tif (Item::items[itemId].upgradeClassification > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f877568ba422fd60b1c9e430886b786fa4b46cad1fa2c342ed4e02189fa31e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8444, + "startColumn": 61, + "charOffset": 259191, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 8442, + "startColumn": 61, + "charOffset": 259128, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::reloadCreature(std::shared_ptr creature) {\n\tif (!creature || !canSee(creature)) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3bdf8d02b4ef4ecca9584d14d730162c439154e87e0f921aeda41c836e0cb428" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8445, + "startColumn": 6, + "charOffset": 259208, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8443, + "startColumn": 6, + "charOffset": 259130, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::reloadCreature(std::shared_ptr creature) {\n\tif (!creature || !canSee(creature)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c5ea61d7dbed22d6844f12c1b9a1b37d23c744b15b402d14579edbca568972a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8450, + "startColumn": 6, + "charOffset": 259295, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8448, + "startColumn": 6, + "charOffset": 259255, + "charLength": 1, + "snippet": { + "text": "\n\tauto tile = creature->getTile();\n\tif (!tile) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea1de4d8d9f3bc107337a5bed5f0d8a5943c497109a0f7509c1251148cefa22d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8456, + "startColumn": 18, + "charOffset": 259407, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 8454, + "startColumn": 18, + "charOffset": 259318, + "charLength": 2, + "snippet": { + "text": "\tuint32_t stackpos = tile->getClientIndexOfCreature(player, creature);\n\n\tif (stackpos >= 10) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59dee1672a14ef8df0ea47a003b7ffbd479cf421b989c2df5e420c1b77cd8bf7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8463, + "startColumn": 15, + "charOffset": 259516, + "charLength": 4, + "snippet": { + "text": "0x6B" + } + }, + "contextRegion": { + "startLine": 8461, + "startColumn": 15, + "charOffset": 259448, + "charLength": 4, + "snippet": { + "text": "\n\tif (knownCreatureSet.contains(creature->getID())) {\n\t\tmsg.addByte(0x6B);\n\t\tmsg.addPosition(creature->getPosition());\n\t\tmsg.addByte(static_cast(stackpos));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b336c93bc18af8f49bb423af804d6de0f85ecf4ee0e944fc133c75067ec0863b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x6B is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8463, + "startColumn": 15, + "charOffset": 259516, + "charLength": 4, + "snippet": { + "text": "0x6B" + } + }, + "contextRegion": { + "startLine": 8461, + "startColumn": 15, + "charOffset": 259448, + "charLength": 4, + "snippet": { + "text": "\n\tif (knownCreatureSet.contains(creature->getID())) {\n\t\tmsg.addByte(0x6B);\n\t\tmsg.addPosition(creature->getPosition());\n\t\tmsg.addByte(static_cast(stackpos));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0fd4ad2df55a9e92ce33f971f7b4ee87229eecc3f8e25b7a859e806ea61f4e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8468, + "startColumn": 54, + "charOffset": 259717, + "charLength": 8, + "snippet": { + "text": "stackpos" + } + }, + "contextRegion": { + "startLine": 8466, + "startColumn": 54, + "charOffset": 259614, + "charLength": 8, + "snippet": { + "text": "\t\tAddCreature(msg, creature, false, 0);\n\t} else {\n\t\tsendAddCreature(creature, creature->getPosition(), stackpos, false);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48673e21aa729418fee1684981ce901d0205bb52336419d04e0afa94d0a6a922" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8475, + "startColumn": 6, + "charOffset": 259811, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8473, + "startColumn": 6, + "charOffset": 259768, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendOpenStash() {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14deaea224d23e70488dadcc165982b33640f4dcc6e568b8604d465a113bd0fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8480, + "startColumn": 14, + "charOffset": 259885, + "charLength": 4, + "snippet": { + "text": "0x29" + } + }, + "contextRegion": { + "startLine": 8478, + "startColumn": 14, + "charOffset": 259850, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x29);\n\tStashItemList list = player->getStashItems();\n\tmsg.add(list.size());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39ee7f175fb2984d0f7fc04e02d32d0273c40ff1ae340437f3416c9946caf5ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x29 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8480, + "startColumn": 14, + "charOffset": 259885, + "charLength": 4, + "snippet": { + "text": "0x29" + } + }, + "contextRegion": { + "startLine": 8478, + "startColumn": 14, + "charOffset": 259850, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x29);\n\tStashItemList list = player->getStashItems();\n\tmsg.add(list.size());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b38263bdf974df7c982f95fe9e57799ea3d9bc4b9ff737a89cfbd4e893b2f65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8482, + "startColumn": 20, + "charOffset": 259958, + "charLength": 4, + "snippet": { + "text": "list" + } + }, + "contextRegion": { + "startLine": 8480, + "startColumn": 20, + "charOffset": 259872, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(0x29);\n\tStashItemList list = player->getStashItems();\n\tmsg.add(list.size());\n\tfor (auto item : list) {\n\t\tmsg.add(item.first);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92b4e43661f55217c9c67de1c24f9e10d36c8671fa3cf3e0e1035e91f2de5d4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8483, + "startColumn": 2, + "charOffset": 259973, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 8481, + "startColumn": 2, + "charOffset": 259892, + "charLength": 3, + "snippet": { + "text": "\tStashItemList list = player->getStashItems();\n\tmsg.add(list.size());\n\tfor (auto item : list) {\n\t\tmsg.add(item.first);\n\t\tmsg.add(item.second);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be77c2a9a1bcca5c5579d89375e0388d7b73279d044b4f0d53694af238dcf6a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "500 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8501, + "startColumn": 28, + "charOffset": 260470, + "charLength": 3, + "snippet": { + "text": "500" + } + }, + "contextRegion": { + "startLine": 8499, + "startColumn": 28, + "charOffset": 260439, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tif (player->isUIExhausted(500)) {\n\t\tplayer->sendCancelMessage(\"You need to wait to do this again.\");\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b0019c3382a720c00904bf493249b90c13ab8b407d58d1e57a80356cc2aea60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8506, + "startColumn": 2, + "charOffset": 260560, + "charLength": 22, + "snippet": { + "text": "Supply_Stash_Actions_t" + } + }, + "contextRegion": { + "startLine": 8504, + "startColumn": 2, + "charOffset": 260555, + "charLength": 22, + "snippet": { + "text": "\t}\n\n\tSupply_Stash_Actions_t action = static_cast(msg.getByte());\n\tswitch (action) {\n\t\tcase SUPPLY_STASH_ACTION_STOW_ITEM: {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5ac4133808598097dcf0a6e945f872ff6bbbe404b8a1afc054daf9577b6866c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8510, + "startColumn": 4, + "charOffset": 260743, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 8508, + "startColumn": 4, + "charOffset": 260663, + "charLength": 8, + "snippet": { + "text": "\t\tcase SUPPLY_STASH_ACTION_STOW_ITEM: {\n\t\t\tPosition pos = msg.getPosition();\n\t\t\tuint16_t itemId = msg.get();\n\t\t\tuint8_t stackpos = msg.getByte();\n\t\t\tuint32_t count = msg.getByte();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83a3f8e5bef1631bc6680ba1b2cb22c75e02462ca4b5423aef6097d450cc1fa6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8513, + "startColumn": 68, + "charOffset": 260921, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 8511, + "startColumn": 68, + "charOffset": 260782, + "charLength": 5, + "snippet": { + "text": "\t\t\tuint8_t stackpos = msg.getByte();\n\t\t\tuint32_t count = msg.getByte();\n\t\t\tg_game().playerStowItem(player->getID(), pos, itemId, stackpos, count, false);\n\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c5cc8c4074e86d28dd51936b2310d31cb67c760ea590b7015b8076a0f29a5f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8518, + "startColumn": 4, + "charOffset": 261035, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 8516, + "startColumn": 4, + "charOffset": 260950, + "charLength": 8, + "snippet": { + "text": "\t\tcase SUPPLY_STASH_ACTION_STOW_CONTAINER: {\n\t\t\tPosition pos = msg.getPosition();\n\t\t\tuint16_t itemId = msg.get();\n\t\t\tuint8_t stackpos = msg.getByte();\n\t\t\tg_game().playerStowItem(player->getID(), pos, itemId, stackpos, 0, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "053ce9b6a2ded435eb0293d92ab01869cf11936091f6c1511f976004db7c1300" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8525, + "startColumn": 4, + "charOffset": 261284, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 8523, + "startColumn": 4, + "charOffset": 261203, + "charLength": 8, + "snippet": { + "text": "\t\tcase SUPPLY_STASH_ACTION_STOW_STACK: {\n\t\t\tPosition pos = msg.getPosition();\n\t\t\tuint16_t itemId = msg.get();\n\t\t\tuint8_t stackpos = msg.getByte();\n\t\t\tg_game().playerStowItem(player->getID(), pos, itemId, stackpos, 0, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4e9e338cff889475d7237734e37f5e2bd2c391492cb270b5695ea468ba36bc4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8531, + "startColumn": 4, + "charOffset": 261493, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 8529, + "startColumn": 4, + "charOffset": 261447, + "charLength": 8, + "snippet": { + "text": "\t\t}\n\t\tcase SUPPLY_STASH_ACTION_WITHDRAW: {\n\t\t\tuint16_t itemId = msg.get();\n\t\t\tuint32_t count = msg.get();\n\t\t\tuint8_t stackpos = msg.getByte();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "730f4a0b590888cc32e80d5765379a44eb5c4d04186e1d419c508ae3eb36d970" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8532, + "startColumn": 4, + "charOffset": 261535, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 8530, + "startColumn": 4, + "charOffset": 261451, + "charLength": 8, + "snippet": { + "text": "\t\tcase SUPPLY_STASH_ACTION_WITHDRAW: {\n\t\t\tuint16_t itemId = msg.get();\n\t\t\tuint32_t count = msg.get();\n\t\t\tuint8_t stackpos = msg.getByte();\n\t\t\tg_game().playerStashWithdraw(player->getID(), itemId, count, stackpos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "191d67a97dc1e0961c55bb834fcacfc2d058d786556dd392296150da6ac662d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'sendCreatureHelpers' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8545, + "startColumn": 40, + "charOffset": 261886, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 8543, + "startColumn": 40, + "charOffset": 261844, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendCreatureHelpers(uint32_t creatureId, uint16_t helpers) {\n\tif (!oldProtocol) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4285d9fa82d598a7be71466875ac92260244b93384876be620f497fea4fa285d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8551, + "startColumn": 14, + "charOffset": 261996, + "charLength": 4, + "snippet": { + "text": "0x94" + } + }, + "contextRegion": { + "startLine": 8549, + "startColumn": 14, + "charOffset": 261961, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x94);\n\tmsg.add(creatureId);\n\tmsg.add(helpers);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97ee87343e645ff418eeda892ca35e607ada8a9680e3a02a979da6705fc93dc8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x94 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8551, + "startColumn": 14, + "charOffset": 261996, + "charLength": 4, + "snippet": { + "text": "0x94" + } + }, + "contextRegion": { + "startLine": 8549, + "startColumn": 14, + "charOffset": 261961, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x94);\n\tmsg.add(creatureId);\n\tmsg.add(helpers);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea46a246a6ce156fbb3672e94302039d2ba74967f662332b8cba44be981446ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8558, + "startColumn": 6, + "charOffset": 262186, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8556, + "startColumn": 6, + "charOffset": 262093, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendDepotItems(const ItemsTierCountList &itemMap, uint16_t count) {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b64206d8dceafa5a2a298799ae6400b53b214f6153d9c546b66bd6ab6f284b85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8563, + "startColumn": 14, + "charOffset": 262260, + "charLength": 4, + "snippet": { + "text": "0x94" + } + }, + "contextRegion": { + "startLine": 8561, + "startColumn": 14, + "charOffset": 262225, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x94);\n\n\tmsg.add(count); // List size" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c228576a79747283f85a75457def08f3e28de8f98a4e619773eb6400220699d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x94 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8563, + "startColumn": 14, + "charOffset": 262260, + "charLength": 4, + "snippet": { + "text": "0x94" + } + }, + "contextRegion": { + "startLine": 8561, + "startColumn": 14, + "charOffset": 262225, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x94);\n\n\tmsg.add(count); // List size" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd992246c8e7e81bb7eedc2db7f4b6877ccc920d6246a0a44a11f8efdc8e0a6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8567, + "startColumn": 3, + "charOffset": 262352, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 8565, + "startColumn": 3, + "charOffset": 262268, + "charLength": 3, + "snippet": { + "text": "\tmsg.add(count); // List size\n\tfor (const auto &itemMap_it : itemMap) {\n\t\tfor (const auto &[itemTier, itemCount] : itemMap_it.second) {\n\t\t\tmsg.add(itemMap_it.first); // Item ID\n\t\t\tif (itemTier > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85a3fe8d3af6eb9e8b6aa26f526b1c17a2f09b94a69e5b449983edd2e8614f8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8580, + "startColumn": 6, + "charOffset": 262667, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8578, + "startColumn": 6, + "charOffset": 262617, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendCloseDepotSearch() {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1bcc02944c9652e153a854a07820c185822af17f69eb3a8ed835b2e6f169bc37" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8585, + "startColumn": 14, + "charOffset": 262741, + "charLength": 4, + "snippet": { + "text": "0x9A" + } + }, + "contextRegion": { + "startLine": 8583, + "startColumn": 14, + "charOffset": 262706, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x9A);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d46e4f4fa6fa6559bbb99a27b23dab5677337846022061bcd5ae2b4719cf54a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x9A is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8585, + "startColumn": 14, + "charOffset": 262741, + "charLength": 4, + "snippet": { + "text": "0x9A" + } + }, + "contextRegion": { + "startLine": 8583, + "startColumn": 14, + "charOffset": 262706, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x9A);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "993798be1b2e9be1e4a6ec33a96e3f8a186db96e41d04d2c46ab7e7bc0e26ad6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "3 adjacent parameters of 'sendDepotSearchResultDetail' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8589, + "startColumn": 48, + "charOffset": 262825, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 8587, + "startColumn": 48, + "charOffset": 262775, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendDepotSearchResultDetail(uint16_t itemId, uint8_t tier, uint32_t depotCount, const ItemVector &depotItems, uint32_t inboxCount, const ItemVector &inboxItems, uint32_t stashCount) {\n\tif (!player || oldProtocol) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d5e6e047a361a5b4d3bf1211e43db1b97f913b5deb92458a1c83a1d30e646f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8590, + "startColumn": 6, + "charOffset": 262986, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8588, + "startColumn": 6, + "charOffset": 262777, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendDepotSearchResultDetail(uint16_t itemId, uint8_t tier, uint32_t depotCount, const ItemVector &depotItems, uint32_t inboxCount, const ItemVector &inboxItems, uint32_t stashCount) {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b205041330650e8248b43cddd16aaf4b8fd59c7abf5ef86238d1ca956afc2c8d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8595, + "startColumn": 14, + "charOffset": 263060, + "charLength": 4, + "snippet": { + "text": "0x99" + } + }, + "contextRegion": { + "startLine": 8593, + "startColumn": 14, + "charOffset": 263025, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x99);\n\tmsg.add(itemId);\n\tif (Item::items[itemId].upgradeClassification > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4f1e7d03528a79ee88f91c888ed71785895f10e897afb44e78de10fa7c42670" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x99 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8595, + "startColumn": 14, + "charOffset": 263060, + "charLength": 4, + "snippet": { + "text": "0x99" + } + }, + "contextRegion": { + "startLine": 8593, + "startColumn": 14, + "charOffset": 263025, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x99);\n\tmsg.add(itemId);\n\tif (Item::items[itemId].upgradeClassification > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb84b9983b4711844148f85562322124a5d9ab6ed8e87fced3118fa8e35f65eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8603, + "startColumn": 2, + "charOffset": 263262, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 8601, + "startColumn": 2, + "charOffset": 263174, + "charLength": 3, + "snippet": { + "text": "\tmsg.add(depotCount);\n\tmsg.addByte(static_cast(depotItems.size()));\n\tfor (const auto &item : depotItems) {\n\t\tAddItem(msg, item);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2f49611f9531dd3f762119043795941c9533a7d3def1e44e8850defad27da78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8609, + "startColumn": 2, + "charOffset": 263414, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 8607, + "startColumn": 2, + "charOffset": 263326, + "charLength": 3, + "snippet": { + "text": "\tmsg.add(inboxCount);\n\tmsg.addByte(static_cast(inboxItems.size()));\n\tfor (const auto &item : inboxItems) {\n\t\tAddItem(msg, item);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "075d3f1073a938fb0e303a2da38a5af18a68dcb98ec492e92b1aaf7f95350937" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8643, + "startColumn": 2, + "charOffset": 264019, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 8641, + "startColumn": 2, + "charOffset": 264014, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tuint16_t itemId = msg.get();\n\tuint8_t itemTier = 0;\n\tif (Item::items[itemId].upgradeClassification > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d984e8077c7c8861b164496d79a4e959bb67747adb54e9e6a9790c2c895b4f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8657, + "startColumn": 2, + "charOffset": 264347, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 8655, + "startColumn": 2, + "charOffset": 264342, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tuint16_t itemId = msg.get();\n\tuint8_t itemTier = 0;\n\tif (Item::items[itemId].upgradeClassification > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b442848d0a04487d7f94e37421a705e00570c28f23a87b2c9fd3fe14a2654ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8676, + "startColumn": 65, + "charOffset": 264892, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 8674, + "startColumn": 65, + "charOffset": 264825, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendUpdateCreature(std::shared_ptr creature) {\n\tif (oldProtocol || !creature || !player) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f84329fe62f2d7c45f89c081a88d6946c235c763502f49e273e628510961dd1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8677, + "startColumn": 21, + "charOffset": 264924, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8675, + "startColumn": 21, + "charOffset": 264827, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendUpdateCreature(std::shared_ptr creature) {\n\tif (oldProtocol || !creature || !player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a021d2c2f799dd4c911a136c6bf53a8f05b8dd7bfd301a512ab8387d6656681c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8677, + "startColumn": 34, + "charOffset": 264937, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8675, + "startColumn": 34, + "charOffset": 264827, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendUpdateCreature(std::shared_ptr creature) {\n\tif (oldProtocol || !creature || !player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89654d591f3324430d87e11567075b5c29ecf00a8d06e5d86d7ef72405d39252" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8682, + "startColumn": 6, + "charOffset": 265001, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8680, + "startColumn": 6, + "charOffset": 264961, + "charLength": 1, + "snippet": { + "text": "\n\tauto tile = creature->getTile();\n\tif (!tile) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5448d19704e0a2919a82e2643a3d0e195b487b069ebbe1143b8105ad58f80585" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8691, + "startColumn": 36, + "charOffset": 265169, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 8689, + "startColumn": 36, + "charOffset": 265063, + "charLength": 2, + "snippet": { + "text": "\n\tint32_t stackPos = tile->getClientIndexOfCreature(player, creature);\n\tif (stackPos == -1 || stackPos >= 10) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40057672708065fd5ee81004f3c9badabdaf5a1100b94a5079dacee57ab15555" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8696, + "startColumn": 14, + "charOffset": 265223, + "charLength": 4, + "snippet": { + "text": "0x6B" + } + }, + "contextRegion": { + "startLine": 8694, + "startColumn": 14, + "charOffset": 265188, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x6B);\n\tmsg.addPosition(creature->getPosition());\n\tmsg.addByte(static_cast(stackPos));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19967b32777351b7e62d9830377af2b9e9a94228832cdce5362be196111a23a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x6B is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8696, + "startColumn": 14, + "charOffset": 265223, + "charLength": 4, + "snippet": { + "text": "0x6B" + } + }, + "contextRegion": { + "startLine": 8694, + "startColumn": 14, + "charOffset": 265188, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x6B);\n\tmsg.addPosition(creature->getPosition());\n\tmsg.addByte(static_cast(stackPos));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5107a0621f1817b5c30d1fd3db39072f353b08d9641a38213fcdd26f2bd5bde" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getForgeInfoMap' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8703, + "startColumn": 20, + "charOffset": 265407, + "charLength": 15, + "snippet": { + "text": "getForgeInfoMap" + } + }, + "contextRegion": { + "startLine": 8701, + "startColumn": 20, + "charOffset": 265385, + "charLength": 15, + "snippet": { + "text": "}\n\nvoid ProtocolGame::getForgeInfoMap(std::shared_ptr item, std::map> &itemsMap) const {\n\tstd::map itemInfo;\n\titemInfo.insert({ item->getTier(), item->getItemCount() });" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44a710ecf3b408b44faa68e6ed19384fac0d1b32072ad9bf1d2c82c1a4abe028" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8703, + "startColumn": 58, + "charOffset": 265445, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 8701, + "startColumn": 58, + "charOffset": 265385, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid ProtocolGame::getForgeInfoMap(std::shared_ptr item, std::map> &itemsMap) const {\n\tstd::map itemInfo;\n\titemInfo.insert({ item->getTier(), item->getItemCount() });" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ab4f49ae83a7a116c40377010b2a6401942d44ea9487faccfee3f443a2ce68c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8705, + "startColumn": 11, + "charOffset": 265567, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 8703, + "startColumn": 11, + "charOffset": 265388, + "charLength": 6, + "snippet": { + "text": "void ProtocolGame::getForgeInfoMap(std::shared_ptr item, std::map> &itemsMap) const {\n\tstd::map itemInfo;\n\titemInfo.insert({ item->getTier(), item->getItemCount() });\n\tauto [first, inserted] = itemsMap.try_emplace(item->getID(), itemInfo);\n\tif (!inserted) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7175e72f066e00e307418328c909369d73aded8ab717efb7d221735dc97bf6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8721, + "startColumn": 2, + "charOffset": 266131, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 8719, + "startColumn": 2, + "charOffset": 266028, + "charLength": 3, + "snippet": { + "text": "\n\tstd::vector slots { CONST_SLOT_LEFT, CONST_SLOT_ARMOR, CONST_SLOT_HEAD, CONST_SLOT_LEGS };\n\tfor (const auto &slot : slots) {\n\t\tdouble_t skill = 0;\n\t\tif (std::shared_ptr item = player->getInventoryItem(slot); item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42f610d0001f6f41bb3e4ec1055dd639f0caf27d7c478e2aa6b6ca758214a6c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8722, + "startColumn": 20, + "charOffset": 266183, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 8720, + "startColumn": 20, + "charOffset": 266029, + "charLength": 1, + "snippet": { + "text": "\tstd::vector slots { CONST_SLOT_LEFT, CONST_SLOT_ARMOR, CONST_SLOT_HEAD, CONST_SLOT_LEGS };\n\tfor (const auto &slot : slots) {\n\t\tdouble_t skill = 0;\n\t\tif (std::shared_ptr item = player->getInventoryItem(slot); item) {\n\t\t\tconst ItemType &it = Item::items[item->getID()];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc4e21a475a9f9ebb1bf66d653531a6a9e99f88032b4fbfc23b64f8d9579ddbb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8726, + "startColumn": 38, + "charOffset": 266374, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 8724, + "startColumn": 38, + "charOffset": 266261, + "charLength": 3, + "snippet": { + "text": "\t\t\tconst ItemType &it = Item::items[item->getID()];\n\t\t\tif (it.isWeapon()) {\n\t\t\t\tskill = item->getFatalChance() * 100;\n\t\t\t}\n\t\t\tif (it.isArmor()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c613fd8075c88a627396f22e414b5c37b4ad265edb1595f3d7de96f47a437e38" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8726, + "startColumn": 38, + "charOffset": 266374, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 8724, + "startColumn": 38, + "charOffset": 266261, + "charLength": 3, + "snippet": { + "text": "\t\t\tconst ItemType &it = Item::items[item->getID()];\n\t\t\tif (it.isWeapon()) {\n\t\t\t\tskill = item->getFatalChance() * 100;\n\t\t\t}\n\t\t\tif (it.isArmor()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21bf89b7c1c0dcf1a7b534725bac4c76b1ce1cf7b8fe49b82bc84a07e43c5e06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8729, + "startColumn": 38, + "charOffset": 266444, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 8727, + "startColumn": 38, + "charOffset": 266379, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\t\t\tif (it.isArmor()) {\n\t\t\t\tskill = item->getDodgeChance() * 100;\n\t\t\t}\n\t\t\tif (it.isHelmet()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b6529bdb9660797b1382e039e5c85d7986e33334018e3d0fbfdc233e674df30" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8729, + "startColumn": 38, + "charOffset": 266444, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 8727, + "startColumn": 38, + "charOffset": 266379, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\t\t\tif (it.isArmor()) {\n\t\t\t\tskill = item->getDodgeChance() * 100;\n\t\t\t}\n\t\t\tif (it.isHelmet()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8adad1e478d5c9f3f81e54b577085505997c226a2048bf8acf797f7a4b9b7d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8732, + "startColumn": 41, + "charOffset": 266518, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 8730, + "startColumn": 41, + "charOffset": 266449, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\t\t\tif (it.isHelmet()) {\n\t\t\t\tskill = item->getMomentumChance() * 100;\n\t\t\t}\n\t\t\tif (it.isLegs()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17ac92abe39de135eca8b71d51b74dfe732a86b882c1003f21f35fabd143a28a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8732, + "startColumn": 41, + "charOffset": 266518, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 8730, + "startColumn": 41, + "charOffset": 266449, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\t\t\tif (it.isHelmet()) {\n\t\t\t\tskill = item->getMomentumChance() * 100;\n\t\t\t}\n\t\t\tif (it.isLegs()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "945c8135c6915762d2f538ea99392ed08bc279b93f1d70f8b3ba15860806d126" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8735, + "startColumn": 46, + "charOffset": 266595, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 8733, + "startColumn": 46, + "charOffset": 266523, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\t\t\tif (it.isLegs()) {\n\t\t\t\tskill = item->getTranscendenceChance() * 100;\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a5c31b823f467c70dd790236f26ee39e7a1d47e1d8f802487745e43ed2034fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8735, + "startColumn": 46, + "charOffset": 266595, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 8733, + "startColumn": 46, + "charOffset": 266523, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\t\t\tif (it.isLegs()) {\n\t\t\t\tskill = item->getTranscendenceChance() * 100;\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f36eba2811e82c1e28793fe28744b696697e5aaf0d8bfb6457243ac27ad3acbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8751, + "startColumn": 14, + "charOffset": 266838, + "charLength": 4, + "snippet": { + "text": "0x61" + } + }, + "contextRegion": { + "startLine": 8749, + "startColumn": 14, + "charOffset": 266803, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x61);\n\n\tmsg.add(25); // Number of kills to achieve 'Bane Prowess'" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "474054d9e6f8bd6c05c8d6bf1e4ee2b9243854530f8e775302789d0ba0fc96a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x61 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8751, + "startColumn": 14, + "charOffset": 266838, + "charLength": 4, + "snippet": { + "text": "0x61" + } + }, + "contextRegion": { + "startLine": 8749, + "startColumn": 14, + "charOffset": 266803, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x61);\n\n\tmsg.add(25); // Number of kills to achieve 'Bane Prowess'" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e82503a96dfbbc12f90eda075d6f4429a1bec09ff427435b7113099f070953d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8753, + "startColumn": 20, + "charOffset": 266865, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 8751, + "startColumn": 20, + "charOffset": 266825, + "charLength": 2, + "snippet": { + "text": "\tmsg.addByte(0x61);\n\n\tmsg.add(25); // Number of kills to achieve 'Bane Prowess'\n\tmsg.add(100); // Number of kills to achieve 'Bane expertise'\n\tmsg.add(300); // Number of kills to achieve 'Base Mastery'" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28f496193340bd0caf45cf1d852fe63028bd0c4618860c7169e2d0c7a83475be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8754, + "startColumn": 20, + "charOffset": 266934, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 8752, + "startColumn": 20, + "charOffset": 266845, + "charLength": 3, + "snippet": { + "text": "\n\tmsg.add(25); // Number of kills to achieve 'Bane Prowess'\n\tmsg.add(100); // Number of kills to achieve 'Bane expertise'\n\tmsg.add(300); // Number of kills to achieve 'Base Mastery'\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0cee3fc4310ce3e7d5232cb5d7aa6bee80d54e0278f7b810295642117ba923db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8755, + "startColumn": 20, + "charOffset": 267006, + "charLength": 3, + "snippet": { + "text": "300" + } + }, + "contextRegion": { + "startLine": 8753, + "startColumn": 20, + "charOffset": 266846, + "charLength": 3, + "snippet": { + "text": "\tmsg.add(25); // Number of kills to achieve 'Bane Prowess'\n\tmsg.add(100); // Number of kills to achieve 'Bane expertise'\n\tmsg.add(300); // Number of kills to achieve 'Base Mastery'\n\n\tmsg.add(5); // Number of kills to achieve 'Archfoe Prowess'" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "355e6fc8b6e66b9419a02b831dfb5797071de74fef7f05b5a01bf098d245c1f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8757, + "startColumn": 20, + "charOffset": 267077, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 8755, + "startColumn": 20, + "charOffset": 266987, + "charLength": 1, + "snippet": { + "text": "\tmsg.add(300); // Number of kills to achieve 'Base Mastery'\n\n\tmsg.add(5); // Number of kills to achieve 'Archfoe Prowess'\n\tmsg.add(20); // Number of kills to achieve 'Archfoe Expertise'\n\tmsg.add(60); // Number of kills to achieve 'Archfoe Mastery'" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "acaf4e8b69bca50012c092f659a1b7a560fde5bc21249fd43c20e1b447cda442" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8758, + "startColumn": 20, + "charOffset": 267148, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 8756, + "startColumn": 20, + "charOffset": 267057, + "charLength": 2, + "snippet": { + "text": "\n\tmsg.add(5); // Number of kills to achieve 'Archfoe Prowess'\n\tmsg.add(20); // Number of kills to achieve 'Archfoe Expertise'\n\tmsg.add(60); // Number of kills to achieve 'Archfoe Mastery'\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51756ecce3b70fcab11faa5a14f448c7ce6d069d73c3980606ba03e902a56dff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8759, + "startColumn": 20, + "charOffset": 267222, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 8757, + "startColumn": 20, + "charOffset": 267058, + "charLength": 2, + "snippet": { + "text": "\tmsg.add(5); // Number of kills to achieve 'Archfoe Prowess'\n\tmsg.add(20); // Number of kills to achieve 'Archfoe Expertise'\n\tmsg.add(60); // Number of kills to achieve 'Archfoe Mastery'\n\n\tmsg.add(1); // Number of kills to achieve 'Nemesis Prowess'" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7cb2e59edbdb9f0fdf5c5d7f71f9cc28dbea24f6fd49f0d1ee928d32bd5d5416" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8763, + "startColumn": 20, + "charOffset": 267439, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 8761, + "startColumn": 20, + "charOffset": 267276, + "charLength": 1, + "snippet": { + "text": "\tmsg.add(1); // Number of kills to achieve 'Nemesis Prowess'\n\tmsg.add(3); // Number of kills to achieve 'Nemesis Expertise'\n\tmsg.add(5); // Number of kills to achieve 'Nemesis Mastery'\n\n\tmsg.add(5); // Points will receive when reach 'Bane Prowess'" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f6dee32aa2796509ffbd8861d3d3032bac781b1e81869400c4773054d9f794e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8765, + "startColumn": 20, + "charOffset": 267511, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 8763, + "startColumn": 20, + "charOffset": 267420, + "charLength": 1, + "snippet": { + "text": "\tmsg.add(5); // Number of kills to achieve 'Nemesis Mastery'\n\n\tmsg.add(5); // Points will receive when reach 'Bane Prowess'\n\tmsg.add(15); // Points will receive when reach 'Bane Expertise'\n\tmsg.add(30); // Points will receive when reach 'Base Mastery'" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7bf7378e0018857ad42a016f4a5fc0b277a59ea3a45d099b1037a66770b14450" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "15 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8766, + "startColumn": 20, + "charOffset": 267583, + "charLength": 2, + "snippet": { + "text": "15" + } + }, + "contextRegion": { + "startLine": 8764, + "startColumn": 20, + "charOffset": 267491, + "charLength": 2, + "snippet": { + "text": "\n\tmsg.add(5); // Points will receive when reach 'Bane Prowess'\n\tmsg.add(15); // Points will receive when reach 'Bane Expertise'\n\tmsg.add(30); // Points will receive when reach 'Base Mastery'\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1415a46f914cd2ea65616945532d55dc57629878dd5044d7cb3ea73676a148a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8767, + "startColumn": 20, + "charOffset": 267658, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 8765, + "startColumn": 20, + "charOffset": 267492, + "charLength": 2, + "snippet": { + "text": "\tmsg.add(5); // Points will receive when reach 'Bane Prowess'\n\tmsg.add(15); // Points will receive when reach 'Bane Expertise'\n\tmsg.add(30); // Points will receive when reach 'Base Mastery'\n\n\tmsg.add(10); // Points will receive when reach 'Archfoe Prowess'" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f362d8d5dcb6c4f138ec805c92fc6bf91dc37db833cf177dfe56e61197ac807" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8769, + "startColumn": 20, + "charOffset": 267732, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 8767, + "startColumn": 20, + "charOffset": 267639, + "charLength": 2, + "snippet": { + "text": "\tmsg.add(30); // Points will receive when reach 'Base Mastery'\n\n\tmsg.add(10); // Points will receive when reach 'Archfoe Prowess'\n\tmsg.add(30); // Points will receive when reach 'Archfoe Expertise'\n\tmsg.add(60); // Points will receive when reach 'Archfoe Mastery'" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6018cd44fb701100495c681766f7e6c64a17905d2fc51fa2f49c8564408dc294" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8770, + "startColumn": 20, + "charOffset": 267808, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 8768, + "startColumn": 20, + "charOffset": 267712, + "charLength": 2, + "snippet": { + "text": "\n\tmsg.add(10); // Points will receive when reach 'Archfoe Prowess'\n\tmsg.add(30); // Points will receive when reach 'Archfoe Expertise'\n\tmsg.add(60); // Points will receive when reach 'Archfoe Mastery'\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "295890cc491155e3fa309f68c95af8f404ea5317cc5f75c3bd09e38a95cd9454" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8771, + "startColumn": 20, + "charOffset": 267886, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 8769, + "startColumn": 20, + "charOffset": 267713, + "charLength": 2, + "snippet": { + "text": "\tmsg.add(10); // Points will receive when reach 'Archfoe Prowess'\n\tmsg.add(30); // Points will receive when reach 'Archfoe Expertise'\n\tmsg.add(60); // Points will receive when reach 'Archfoe Mastery'\n\n\tmsg.add(10); // Points will receive when reach 'Nemesis Prowess'" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c395ce5cf8112c0b2760b1fc20aab22d491a79a0ec772011c49d7f1f4ae79f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8773, + "startColumn": 20, + "charOffset": 267963, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 8771, + "startColumn": 20, + "charOffset": 267867, + "charLength": 2, + "snippet": { + "text": "\tmsg.add(60); // Points will receive when reach 'Archfoe Mastery'\n\n\tmsg.add(10); // Points will receive when reach 'Nemesis Prowess'\n\tmsg.add(30); // Points will receive when reach 'Nemesis Expertise'\n\tmsg.add(60); // Points will receive when reach 'Nemesis Mastery'" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b4cce21768fd53c908d632dd9439bcf0d7b72d3a2387341bdad6cfaabb26060" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8774, + "startColumn": 20, + "charOffset": 268039, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 8772, + "startColumn": 20, + "charOffset": 267943, + "charLength": 2, + "snippet": { + "text": "\n\tmsg.add(10); // Points will receive when reach 'Nemesis Prowess'\n\tmsg.add(30); // Points will receive when reach 'Nemesis Expertise'\n\tmsg.add(60); // Points will receive when reach 'Nemesis Mastery'\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce8cb1a976f28b6f6bd19eb57de7e5ee49cb13442def415933b2ef078498a55c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8775, + "startColumn": 20, + "charOffset": 268117, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 8773, + "startColumn": 20, + "charOffset": 267944, + "charLength": 2, + "snippet": { + "text": "\tmsg.add(10); // Points will receive when reach 'Nemesis Prowess'\n\tmsg.add(30); // Points will receive when reach 'Nemesis Expertise'\n\tmsg.add(60); // Points will receive when reach 'Nemesis Mastery'\n\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1353b1d1c51d171e0b84f283538827b142e272472790b82da50f44f70970fe29" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8788, + "startColumn": 14, + "charOffset": 268338, + "charLength": 4, + "snippet": { + "text": "0x73" + } + }, + "contextRegion": { + "startLine": 8786, + "startColumn": 14, + "charOffset": 268303, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x73);\n\n\tauto mtype_map = g_ioBosstiary().getBosstiaryMap();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae81f0113338b8380ca7b0037b2e9c63ba407083bb1c254def9e26a39b7e9e01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x73 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8788, + "startColumn": 14, + "charOffset": 268338, + "charLength": 4, + "snippet": { + "text": "0x73" + } + }, + "contextRegion": { + "startLine": 8786, + "startColumn": 14, + "charOffset": 268303, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x73);\n\n\tauto mtype_map = g_ioBosstiary().getBosstiaryMap();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0961a579befb6b23bce2d2c1ebf6a7dfb12dad7d4951eb74c89b4045e628f26f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8795, + "startColumn": 2, + "charOffset": 268493, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 8793, + "startColumn": 2, + "charOffset": 268472, + "charLength": 3, + "snippet": { + "text": "\tmsg.skipBytes(2);\n\n\tfor (const auto &[bossid, name] : mtype_map) {\n\t\tconst auto mType = g_monsters().getMonsterType(name);\n\t\tif (!mType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73f3b15c4bf4d80fe9825344d81dd1a1d98f797a1af64c1d0c7d2317520584ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8797, + "startColumn": 7, + "charOffset": 268602, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8795, + "startColumn": 7, + "charOffset": 268492, + "charLength": 1, + "snippet": { + "text": "\tfor (const auto &[bossid, name] : mtype_map) {\n\t\tconst auto mType = g_monsters().getMonsterType(name);\n\t\tif (!mType) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3afa0f1be7ffb9517cb2833d48bfe5aea53f01fc65f9f0c39d0fa2875b8ad1fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'parseSendBosstiarySlots' has cognitive complexity of 50 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8822, + "startColumn": 20, + "charOffset": 269305, + "charLength": 23, + "snippet": { + "text": "parseSendBosstiarySlots" + } + }, + "contextRegion": { + "startLine": 8820, + "startColumn": 20, + "charOffset": 269283, + "charLength": 23, + "snippet": { + "text": "}\n\nvoid ProtocolGame::parseSendBosstiarySlots() {\n\tif (oldProtocol) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01cf72e82b9ec2155c188acff79670b31c9609bb378ca2de37945bc817c8b117" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8841, + "startColumn": 71, + "charOffset": 270172, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 8839, + "startColumn": 71, + "charOffset": 270098, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tconst auto mTypeSlotOne = g_ioBosstiary().getMonsterTypeByBossRaceId((uint16_t)bossIdSlotOne);\n\tauto bossRaceSlotOne = mTypeSlotOne ? mTypeSlotOne->info.bosstiaryRace : BosstiaryRarity_t::BOSS_INVALID;\n\tauto isValidBossSlotOne = bossIdSlotOne == 0 || (bossRaceSlotOne >= BosstiaryRarity_t::RARITY_BANE && bossRaceSlotOne <= BosstiaryRarity_t::RARITY_NEMESIS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8f3bcd58a2703a4fe6aa46cd2b2ae6b11d5f590a96c66ccb9ae0c760a0c3182" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8849, + "startColumn": 71, + "charOffset": 270681, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 8847, + "startColumn": 71, + "charOffset": 270607, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tconst auto mTypeSlotTwo = g_ioBosstiary().getMonsterTypeByBossRaceId((uint16_t)bossIdSlotTwo);\n\tauto bossRaceSlotTwo = mTypeSlotTwo ? mTypeSlotTwo->info.bosstiaryRace : BosstiaryRarity_t::BOSS_INVALID;\n\tauto isValidBossSlotTwo = bossIdSlotTwo == 0 || (bossRaceSlotTwo >= BosstiaryRarity_t::RARITY_BANE && bossRaceSlotTwo <= BosstiaryRarity_t::RARITY_NEMESIS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12a4b8bccdeb41224d15c8c9011939d057223703c2bc90c82659dd0b1b9ff8ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8860, + "startColumn": 14, + "charOffset": 271177, + "charLength": 4, + "snippet": { + "text": "0x62" + } + }, + "contextRegion": { + "startLine": 8858, + "startColumn": 14, + "charOffset": 271142, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x62);\n\n\tuint32_t playerBossPoints = player->getBossPoints();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "213c61fb3aa33b3059e68a24ae1feee956ff3304e2baae202efa6942dd388f2d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x62 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8860, + "startColumn": 14, + "charOffset": 271177, + "charLength": 4, + "snippet": { + "text": "0x62" + } + }, + "contextRegion": { + "startLine": 8858, + "startColumn": 14, + "charOffset": 271142, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x62);\n\n\tuint32_t playerBossPoints = player->getBossPoints();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4b239570745c06942db1cf762d9348c6e2ae85b7aef82df0d5b50fe68d3b447" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-unconstrained-variable-type", + "ruleIndex": 476, + "kind": "fail", + "level": "warning", + "message": { + "text": "Add 'std::input_iterator' constraint" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8873, + "startColumn": 6, + "charOffset": 271789, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 8871, + "startColumn": 6, + "charOffset": 271710, + "charLength": 4, + "snippet": { + "text": "\n\tauto bossesUnlockedList = g_ioBosstiary().getBosstiaryFinished(player);\n\tif (auto it = std::ranges::find(bossesUnlockedList.begin(), bossesUnlockedList.end(), boostedBossId);\n\t it != bossesUnlockedList.end()) {\n\t\tbossesUnlockedList.erase(it);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "680934c6182183d4317d3e29358812dfb21f2ee7bad56bd56779f93d3ec59e2b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8875, + "startColumn": 22, + "charOffset": 271947, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 8873, + "startColumn": 22, + "charOffset": 271784, + "charLength": 5, + "snippet": { + "text": "\tif (auto it = std::ranges::find(bossesUnlockedList.begin(), bossesUnlockedList.end(), boostedBossId);\n\t it != bossesUnlockedList.end()) {\n\t\tbossesUnlockedList.erase(it);\n\t}\n\tauto bossesUnlockedSize = static_cast(bossesUnlockedList.size());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9494ce7958e22426f4fb9d17205e3aba44c9d79cc8205ff778048479e315a4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in ternary expression result" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8879, + "startColumn": 53, + "charOffset": 272091, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 8877, + "startColumn": 53, + "charOffset": 271961, + "charLength": 4, + "snippet": { + "text": "\tauto bossesUnlockedSize = static_cast(bossesUnlockedList.size());\n\n\tbool isSlotOneUnlocked = (bossesUnlockedSize > 0 ? true : false);\n\tmsg.addByte(isSlotOneUnlocked ? 1 : 0);\n\tmsg.add(isSlotOneUnlocked ? bossIdSlotOne : 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "831998de9b69eae8a430c5ec02283a7815506459f0da2700ca040aac541861c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Expression can be simplified" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8879, + "startColumn": 58, + "charOffset": 272096, + "charLength": 1, + "snippet": { + "text": ":" + } + }, + "contextRegion": { + "startLine": 8877, + "startColumn": 58, + "charOffset": 271961, + "charLength": 1, + "snippet": { + "text": "\tauto bossesUnlockedSize = static_cast(bossesUnlockedList.size());\n\n\tbool isSlotOneUnlocked = (bossesUnlockedSize > 0 ? true : false);\n\tmsg.addByte(isSlotOneUnlocked ? 1 : 0);\n\tmsg.add(isSlotOneUnlocked ? bossIdSlotOne : 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f64d6cad6c4337ab1e76a898668032769b3ab937bbc34c2869d2da27f0431d93" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8885, + "startColumn": 71, + "charOffset": 272444, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 8883, + "startColumn": 71, + "charOffset": 272254, + "charLength": 1, + "snippet": { + "text": "\t\t// Variables Boss Slot One\n\t\tauto bossKillCount = player->getBestiaryKillCount(static_cast(bossIdSlotOne));\n\t\tauto slotOneBossLevel = g_ioBosstiary().getBossCurrentLevel(player, (uint16_t)bossIdSlotOne);\n\t\tuint16_t bonusBossSlotOne = currentBonus + (slotOneBossLevel == 3 ? 25 : 0);\n\t\tuint8_t isSlotOneInactive = bossIdSlotOne == boostedBossId ? 1 : 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16c779532adbe5d0340f16a819ee5bbdc79169f04f24a0cf46c2c835ae619df7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8886, + "startColumn": 71, + "charOffset": 272540, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 8884, + "startColumn": 71, + "charOffset": 272283, + "charLength": 2, + "snippet": { + "text": "\t\tauto bossKillCount = player->getBestiaryKillCount(static_cast(bossIdSlotOne));\n\t\tauto slotOneBossLevel = g_ioBosstiary().getBossCurrentLevel(player, (uint16_t)bossIdSlotOne);\n\t\tuint16_t bonusBossSlotOne = currentBonus + (slotOneBossLevel == 3 ? 25 : 0);\n\t\tuint8_t isSlotOneInactive = bossIdSlotOne == boostedBossId ? 1 : 0;\n\t\t// Bytes Slot One" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d13465d9602f1a81864d0946ccd0870db8da890483fe717368de7c2260be318" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1500 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8893, + "startColumn": 27, + "charOffset": 272832, + "charLength": 4, + "snippet": { + "text": "1500" + } + }, + "contextRegion": { + "startLine": 8891, + "startColumn": 27, + "charOffset": 272802, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tuint32_t slotTwoPoints = 1500;\n\tbool isSlotTwoUnlocked = (playerBossPoints >= slotTwoPoints ? true : false);\n\tmsg.addByte(isSlotTwoUnlocked ? 1 : 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12ae8a42d9be41b56237329840d44ecc10a841dbfb5c89c9c71c70a7faf3d7bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in ternary expression result" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8894, + "startColumn": 64, + "charOffset": 272901, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 8892, + "startColumn": 64, + "charOffset": 272805, + "charLength": 4, + "snippet": { + "text": "\n\tuint32_t slotTwoPoints = 1500;\n\tbool isSlotTwoUnlocked = (playerBossPoints >= slotTwoPoints ? true : false);\n\tmsg.addByte(isSlotTwoUnlocked ? 1 : 0);\n\tmsg.add(isSlotTwoUnlocked ? bossIdSlotTwo : slotTwoPoints);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2fa074aa3e8430c0a75c9f4f5fdc289d2509d9d80b26e51b6fd68c663ebf83ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Expression can be simplified" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8894, + "startColumn": 69, + "charOffset": 272906, + "charLength": 1, + "snippet": { + "text": ":" + } + }, + "contextRegion": { + "startLine": 8892, + "startColumn": 69, + "charOffset": 272805, + "charLength": 1, + "snippet": { + "text": "\n\tuint32_t slotTwoPoints = 1500;\n\tbool isSlotTwoUnlocked = (playerBossPoints >= slotTwoPoints ? true : false);\n\tmsg.addByte(isSlotTwoUnlocked ? 1 : 0);\n\tmsg.add(isSlotTwoUnlocked ? bossIdSlotTwo : slotTwoPoints);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ad5a1fefabeabed1cdb49a1b698daa8d8b297a0236b30678eb855dc5fef12b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8899, + "startColumn": 53, + "charOffset": 273157, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 8897, + "startColumn": 53, + "charOffset": 273028, + "charLength": 1, + "snippet": { + "text": "\tif (isSlotTwoUnlocked && bossIdSlotTwo != 0) {\n\t\t// Variables Boss Slot Two\n\t\tauto bossKillCount = player->getBestiaryKillCount((uint16_t)(bossIdSlotTwo));\n\t\tauto slotTwoBossLevel = g_ioBosstiary().getBossCurrentLevel(player, (uint16_t)bossIdSlotTwo);\n\t\tuint16_t bonusBossSlotTwo = currentBonus + (slotTwoBossLevel == 3 ? 25 : 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "285da13ec12f1ba2d8376020b27a7ff451322bd7b38909138d85abe30ab4e94c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8900, + "startColumn": 71, + "charOffset": 273255, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 8898, + "startColumn": 71, + "charOffset": 273076, + "charLength": 1, + "snippet": { + "text": "\t\t// Variables Boss Slot Two\n\t\tauto bossKillCount = player->getBestiaryKillCount((uint16_t)(bossIdSlotTwo));\n\t\tauto slotTwoBossLevel = g_ioBosstiary().getBossCurrentLevel(player, (uint16_t)bossIdSlotTwo);\n\t\tuint16_t bonusBossSlotTwo = currentBonus + (slotTwoBossLevel == 3 ? 25 : 0);\n\t\tuint8_t isSlotTwoInactive = bossIdSlotTwo == boostedBossId ? 1 : 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0be6ad862c7d17aecbf6a39636dbd01c4eff3e11d4e467b4437a45f127bc2c53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8901, + "startColumn": 71, + "charOffset": 273351, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 8899, + "startColumn": 71, + "charOffset": 273105, + "charLength": 2, + "snippet": { + "text": "\t\tauto bossKillCount = player->getBestiaryKillCount((uint16_t)(bossIdSlotTwo));\n\t\tauto slotTwoBossLevel = g_ioBosstiary().getBossCurrentLevel(player, (uint16_t)bossIdSlotTwo);\n\t\tuint16_t bonusBossSlotTwo = currentBonus + (slotTwoBossLevel == 3 ? 25 : 0);\n\t\tuint8_t isSlotTwoInactive = bossIdSlotTwo == boostedBossId ? 1 : 0;\n\t\t// Bytes Slot Two" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b9bb24aadf028317c65a8bd03b66d1d6943c522e51d97b540cc7f768c97247d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8924, + "startColumn": 3, + "charOffset": 274630, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 8922, + "startColumn": 3, + "charOffset": 274580, + "charLength": 3, + "snippet": { + "text": "\t\tuint16_t bossesCount = 0;\n\t\tmsg.skipBytes(2);\n\t\tfor (const auto &bossId : bossesUnlockedList) {\n\t\t\tif (bossId == bossIdSlotOne || bossId == bossIdSlotTwo) {\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2aad63a47786164bb0f220a66d99b3d99a8e86951d105636f45f3ee036d686b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8930, + "startColumn": 8, + "charOffset": 274840, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8928, + "startColumn": 8, + "charOffset": 274758, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tconst auto mType = g_ioBosstiary().getMonsterTypeByBossRaceId(bossId);\n\t\t\tif (!mType) {\n\t\t\t\tg_logger().error(\"[{}] monster {} not found\", __FUNCTION__, bossId);\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d20aba5acf5441735e1a2424bc8e821296fdbcc55ca5f4b056641d63547a75e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8959, + "startColumn": 2, + "charOffset": 275602, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 8957, + "startColumn": 2, + "charOffset": 275563, + "charLength": 8, + "snippet": { + "text": "\n\tuint8_t slotBossId = msg.getByte();\n\tuint32_t selectedBossId = msg.get();\n\n\tg_game().playerBosstiarySlot(player->getID(), slotBossId, selectedBossId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a919ad7e2389c5e41958b5fa309b7089e21235d5aa51c84b7f7a88be75cefc51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'sendPodiumDetails' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8964, + "startColumn": 20, + "charOffset": 275748, + "charLength": 17, + "snippet": { + "text": "sendPodiumDetails" + } + }, + "contextRegion": { + "startLine": 8962, + "startColumn": 20, + "charOffset": 275726, + "charLength": 17, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendPodiumDetails(NetworkMessage &msg, const std::vector &toSendMonsters, bool isBoss) const {\n\tauto toSendMonstersSize = static_cast(toSendMonsters.size());\n\tmsg.add(toSendMonstersSize);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b28d3e426ea15ca60c7db48ec2772a51fc602e73e382f84cfadf43505adf47ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8967, + "startColumn": 2, + "charOffset": 275967, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 8965, + "startColumn": 2, + "charOffset": 275853, + "charLength": 3, + "snippet": { + "text": "\tauto toSendMonstersSize = static_cast(toSendMonsters.size());\n\tmsg.add(toSendMonstersSize);\n\tfor (const auto &raceId : toSendMonsters) {\n\t\tconst auto mType = g_monsters().getMonsterTypeByRaceId(raceId, isBoss);\n\t\tif (!mType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e24abec078a64c7c1b71844cb2722c9e0ebc6cdcffa203e76be8286a3bfcb5b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8969, + "startColumn": 7, + "charOffset": 276091, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8967, + "startColumn": 7, + "charOffset": 275966, + "charLength": 1, + "snippet": { + "text": "\tfor (const auto &raceId : toSendMonsters) {\n\t\tconst auto mType = g_monsters().getMonsterTypeByRaceId(raceId, isBoss);\n\t\tif (!mType) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "699f6ab10487658f9e107400db1dd29fedde1278509b9fde38f73f1967d0ec0e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "35105 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8983, + "startColumn": 35, + "charOffset": 276450, + "charLength": 5, + "snippet": { + "text": "35105" + } + }, + "contextRegion": { + "startLine": 8981, + "startColumn": 35, + "charOffset": 276297, + "charLength": 5, + "snippet": { + "text": "\t\tauto isLookType = monsterOutfit.lookType != 0;\n\t\t// \"Tantugly's Head\" boss have to send other looktype to the podium\n\t\tif (monsterOutfit.lookTypeEx == 35105) {\n\t\t\tmonsterOutfit.lookTypeEx = 39003;\n\t\t\tmsg.addString(\"Tentugly\", \"ProtocolGame::sendPodiumDetails - Tentugly\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "114fa334fad677608de5ef28274f5e365d4da6f1f4896b256340e1deb0f6a2eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "39003 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 8984, + "startColumn": 31, + "charOffset": 276489, + "charLength": 5, + "snippet": { + "text": "39003" + } + }, + "contextRegion": { + "startLine": 8982, + "startColumn": 31, + "charOffset": 276346, + "charLength": 5, + "snippet": { + "text": "\t\t// \"Tantugly's Head\" boss have to send other looktype to the podium\n\t\tif (monsterOutfit.lookTypeEx == 35105) {\n\t\t\tmonsterOutfit.lookTypeEx = 39003;\n\t\t\tmsg.addString(\"Tentugly\", \"ProtocolGame::sendPodiumDetails - Tentugly\");\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e56e7756a7b92d0e84767f400209de7273fee6e32a6b97696fd0c07456cd288" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'podium' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9002, + "startColumn": 66, + "charOffset": 277068, + "charLength": 6, + "snippet": { + "text": "podium" + } + }, + "contextRegion": { + "startLine": 9000, + "startColumn": 66, + "charOffset": 277000, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendMonsterPodiumWindow(std::shared_ptr podium, const Position &position, uint16_t itemId, uint8_t stackPos) {\n\tif (!podium || oldProtocol) {\n\t\tg_logger().error(\"[{}] item is nullptr\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3cbc551f9280bb7c9c28127824d4ac331c236106e610b8a1b2c0e101056e07d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'sendMonsterPodiumWindow' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9002, + "startColumn": 100, + "charOffset": 277102, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 9000, + "startColumn": 100, + "charOffset": 277000, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ProtocolGame::sendMonsterPodiumWindow(std::shared_ptr podium, const Position &position, uint16_t itemId, uint8_t stackPos) {\n\tif (!podium || oldProtocol) {\n\t\tg_logger().error(\"[{}] item is nullptr\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5f40742f7a3f857a09cb67854d90f67b3c85759678b4643a5c69f9bc1c1e82d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9003, + "startColumn": 6, + "charOffset": 277144, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9001, + "startColumn": 6, + "charOffset": 277002, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendMonsterPodiumWindow(std::shared_ptr podium, const Position &position, uint16_t itemId, uint8_t stackPos) {\n\tif (!podium || oldProtocol) {\n\t\tg_logger().error(\"[{}] item is nullptr\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d20aba5acf5441735e1a2424bc8e821296fdbcc55ca5f4b056641d63547a75e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9009, + "startColumn": 14, + "charOffset": 277276, + "charLength": 4, + "snippet": { + "text": "0xC2" + } + }, + "contextRegion": { + "startLine": 9007, + "startColumn": 14, + "charOffset": 277241, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xC2);\n\n\tauto podiumVisible = podium->getCustomAttribute(\"PodiumVisible\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8311f45843f140be61648dea28ffd57c4e741faee3015aadde77bd2014e7525" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xC2 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9009, + "startColumn": 14, + "charOffset": 277276, + "charLength": 4, + "snippet": { + "text": "0xC2" + } + }, + "contextRegion": { + "startLine": 9007, + "startColumn": 14, + "charOffset": 277241, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xC2);\n\n\tauto podiumVisible = podium->getCustomAttribute(\"PodiumVisible\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3dd132e7477e995a7f0b8baad57387d0305a9c8a82749a28ee23a8d661aaa54" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto podiumVisible' can be declared as 'const auto *podiumVisible'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9011, + "startColumn": 2, + "charOffset": 277285, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 9009, + "startColumn": 2, + "charOffset": 277263, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(0xC2);\n\n\tauto podiumVisible = podium->getCustomAttribute(\"PodiumVisible\");\n\tauto lookType = podium->getCustomAttribute(\"LookType\");\n\tauto lookDirection = podium->getCustomAttribute(\"LookDirection\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8281a82271ef4536128ffe56dba05c60fcd7aaf29c38e060e013b2ecf773c7ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto lookType' can be declared as 'const auto *lookType'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9012, + "startColumn": 2, + "charOffset": 277352, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 9010, + "startColumn": 2, + "charOffset": 277283, + "charLength": 4, + "snippet": { + "text": "\n\tauto podiumVisible = podium->getCustomAttribute(\"PodiumVisible\");\n\tauto lookType = podium->getCustomAttribute(\"LookType\");\n\tauto lookDirection = podium->getCustomAttribute(\"LookDirection\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d820d9a8ce718fbcfaa30222e83a1f5b9171acc6c3a9938475e4a6ffc2a793de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto lookDirection' can be declared as 'const auto *lookDirection'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9013, + "startColumn": 2, + "charOffset": 277409, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 9011, + "startColumn": 2, + "charOffset": 277284, + "charLength": 4, + "snippet": { + "text": "\tauto podiumVisible = podium->getCustomAttribute(\"PodiumVisible\");\n\tauto lookType = podium->getCustomAttribute(\"LookType\");\n\tauto lookDirection = podium->getCustomAttribute(\"LookDirection\");\n\n\tbool isBossSelected = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ce06cd3f55eeb981d7abc512226b14a88f9970f0ebf1137ff9cfb789e6d1427" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9017, + "startColumn": 6, + "charOffset": 277536, + "charLength": 8, + "snippet": { + "text": "lookType" + } + }, + "contextRegion": { + "startLine": 9015, + "startColumn": 6, + "charOffset": 277476, + "charLength": 8, + "snippet": { + "text": "\tbool isBossSelected = false;\n\tuint16_t lookValue = 0;\n\tif (lookType) {\n\t\tlookValue = static_cast(lookType->getInteger());\n\t\tisBossSelected = lookValue > 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fe6e2b1635781de55b6d9cfdd8b4a398a18d5303390c6ff3b7b63489fc55cde" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9017, + "startColumn": 6, + "charOffset": 277536, + "charLength": 8, + "snippet": { + "text": "lookType" + } + }, + "contextRegion": { + "startLine": 9015, + "startColumn": 6, + "charOffset": 277476, + "charLength": 8, + "snippet": { + "text": "\tbool isBossSelected = false;\n\tuint16_t lookValue = 0;\n\tif (lookType) {\n\t\tlookValue = static_cast(lookType->getInteger());\n\t\tisBossSelected = lookValue > 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da5e40928c8db6bdfbed5989106f366b7d0bc2cdcec18bfa10b94d2399a54e5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9022, + "startColumn": 20, + "charOffset": 277666, + "charLength": 14, + "snippet": { + "text": "isBossSelected" + } + }, + "contextRegion": { + "startLine": 9020, + "startColumn": 20, + "charOffset": 277643, + "charLength": 14, + "snippet": { + "text": "\t}\n\n\tmsg.add(isBossSelected ? lookValue : 0); // Boss LookType\n\tif (isBossSelected) {\n\t\tauto lookHead = podium->getCustomAttribute(\"LookHead\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32a1fa8babccbd9fd7b7ec757bcfbe15a98c8a9c7031ab716934dcbf3c9bf675" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto lookHead' can be declared as 'const auto *lookHead'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9024, + "startColumn": 3, + "charOffset": 277741, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 9022, + "startColumn": 3, + "charOffset": 277647, + "charLength": 4, + "snippet": { + "text": "\tmsg.add(isBossSelected ? lookValue : 0); // Boss LookType\n\tif (isBossSelected) {\n\t\tauto lookHead = podium->getCustomAttribute(\"LookHead\");\n\t\tauto lookBody = podium->getCustomAttribute(\"LookBody\");\n\t\tauto lookLegs = podium->getCustomAttribute(\"LookLegs\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4935031e586c2a6c6b296de2d626f69817fbd2e9e6eb6fcdef1b208a4678e18a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto lookBody' can be declared as 'const auto *lookBody'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9025, + "startColumn": 3, + "charOffset": 277799, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 9023, + "startColumn": 3, + "charOffset": 277716, + "charLength": 4, + "snippet": { + "text": "\tif (isBossSelected) {\n\t\tauto lookHead = podium->getCustomAttribute(\"LookHead\");\n\t\tauto lookBody = podium->getCustomAttribute(\"LookBody\");\n\t\tauto lookLegs = podium->getCustomAttribute(\"LookLegs\");\n\t\tauto lookFeet = podium->getCustomAttribute(\"LookFeet\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8cfdfb35369ca9596118161cc05bb6b5d00d9dcb4e2b3d1d2452f2237d885565" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto lookLegs' can be declared as 'const auto *lookLegs'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9026, + "startColumn": 3, + "charOffset": 277857, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 9024, + "startColumn": 3, + "charOffset": 277739, + "charLength": 4, + "snippet": { + "text": "\t\tauto lookHead = podium->getCustomAttribute(\"LookHead\");\n\t\tauto lookBody = podium->getCustomAttribute(\"LookBody\");\n\t\tauto lookLegs = podium->getCustomAttribute(\"LookLegs\");\n\t\tauto lookFeet = podium->getCustomAttribute(\"LookFeet\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35fcd33353ecf023eb18c939f50526eb0c4989f7cec39c76a6059a279baf994b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto lookFeet' can be declared as 'const auto *lookFeet'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9027, + "startColumn": 3, + "charOffset": 277915, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 9025, + "startColumn": 3, + "charOffset": 277797, + "charLength": 4, + "snippet": { + "text": "\t\tauto lookBody = podium->getCustomAttribute(\"LookBody\");\n\t\tauto lookLegs = podium->getCustomAttribute(\"LookLegs\");\n\t\tauto lookFeet = podium->getCustomAttribute(\"LookFeet\");\n\n\t\tmsg.addByte(lookHead ? static_cast(lookHead->getInteger()) : 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8edcbe41b0c7505865cee6555ae245745267d2b3c0ab493ca2f52c7c314087c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9029, + "startColumn": 15, + "charOffset": 277986, + "charLength": 8, + "snippet": { + "text": "lookHead" + } + }, + "contextRegion": { + "startLine": 9027, + "startColumn": 15, + "charOffset": 277913, + "charLength": 8, + "snippet": { + "text": "\t\tauto lookFeet = podium->getCustomAttribute(\"LookFeet\");\n\n\t\tmsg.addByte(lookHead ? static_cast(lookHead->getInteger()) : 0);\n\t\tmsg.addByte(lookBody ? static_cast(lookBody->getInteger()) : 0);\n\t\tmsg.addByte(lookLegs ? static_cast(lookLegs->getInteger()) : 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73dc37c9ebef527ddd7957e7be76aa73a7316d09e29eb4d48030fcaf382d277e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9029, + "startColumn": 15, + "charOffset": 277986, + "charLength": 8, + "snippet": { + "text": "lookHead" + } + }, + "contextRegion": { + "startLine": 9027, + "startColumn": 15, + "charOffset": 277913, + "charLength": 8, + "snippet": { + "text": "\t\tauto lookFeet = podium->getCustomAttribute(\"LookFeet\");\n\n\t\tmsg.addByte(lookHead ? static_cast(lookHead->getInteger()) : 0);\n\t\tmsg.addByte(lookBody ? static_cast(lookBody->getInteger()) : 0);\n\t\tmsg.addByte(lookLegs ? static_cast(lookLegs->getInteger()) : 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c36841f662b9997dda9a051a00049b7d4fe16fa0696dd05d00b744c980cca8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9029, + "startColumn": 15, + "charOffset": 277986, + "charLength": 8, + "snippet": { + "text": "lookHead" + } + }, + "contextRegion": { + "startLine": 9027, + "startColumn": 15, + "charOffset": 277913, + "charLength": 8, + "snippet": { + "text": "\t\tauto lookFeet = podium->getCustomAttribute(\"LookFeet\");\n\n\t\tmsg.addByte(lookHead ? static_cast(lookHead->getInteger()) : 0);\n\t\tmsg.addByte(lookBody ? static_cast(lookBody->getInteger()) : 0);\n\t\tmsg.addByte(lookLegs ? static_cast(lookLegs->getInteger()) : 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2924e5a48c5a4052ba62f8cebc46ace62a97f0be56827ce4d203046cfaa8b7ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9030, + "startColumn": 15, + "charOffset": 278062, + "charLength": 8, + "snippet": { + "text": "lookBody" + } + }, + "contextRegion": { + "startLine": 9028, + "startColumn": 15, + "charOffset": 277971, + "charLength": 8, + "snippet": { + "text": "\n\t\tmsg.addByte(lookHead ? static_cast(lookHead->getInteger()) : 0);\n\t\tmsg.addByte(lookBody ? static_cast(lookBody->getInteger()) : 0);\n\t\tmsg.addByte(lookLegs ? static_cast(lookLegs->getInteger()) : 0);\n\t\tmsg.addByte(lookFeet ? static_cast(lookFeet->getInteger()) : 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6e09a76a1429706bc004e0fed2dacc8fff09f4ebb3cf86fdab138b75feec769" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9030, + "startColumn": 15, + "charOffset": 278062, + "charLength": 8, + "snippet": { + "text": "lookBody" + } + }, + "contextRegion": { + "startLine": 9028, + "startColumn": 15, + "charOffset": 277971, + "charLength": 8, + "snippet": { + "text": "\n\t\tmsg.addByte(lookHead ? static_cast(lookHead->getInteger()) : 0);\n\t\tmsg.addByte(lookBody ? static_cast(lookBody->getInteger()) : 0);\n\t\tmsg.addByte(lookLegs ? static_cast(lookLegs->getInteger()) : 0);\n\t\tmsg.addByte(lookFeet ? static_cast(lookFeet->getInteger()) : 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "396f32bf7c5ea5b6ed101f2dc66ab262f09597b231ad16095c87ceee399d61d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9030, + "startColumn": 15, + "charOffset": 278062, + "charLength": 8, + "snippet": { + "text": "lookBody" + } + }, + "contextRegion": { + "startLine": 9028, + "startColumn": 15, + "charOffset": 277971, + "charLength": 8, + "snippet": { + "text": "\n\t\tmsg.addByte(lookHead ? static_cast(lookHead->getInteger()) : 0);\n\t\tmsg.addByte(lookBody ? static_cast(lookBody->getInteger()) : 0);\n\t\tmsg.addByte(lookLegs ? static_cast(lookLegs->getInteger()) : 0);\n\t\tmsg.addByte(lookFeet ? static_cast(lookFeet->getInteger()) : 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d680c489b4b168356134855f9a1b45519422ea7ada0f8e16ccaa0bccf7cb5b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9031, + "startColumn": 15, + "charOffset": 278138, + "charLength": 8, + "snippet": { + "text": "lookLegs" + } + }, + "contextRegion": { + "startLine": 9029, + "startColumn": 15, + "charOffset": 277972, + "charLength": 8, + "snippet": { + "text": "\t\tmsg.addByte(lookHead ? static_cast(lookHead->getInteger()) : 0);\n\t\tmsg.addByte(lookBody ? static_cast(lookBody->getInteger()) : 0);\n\t\tmsg.addByte(lookLegs ? static_cast(lookLegs->getInteger()) : 0);\n\t\tmsg.addByte(lookFeet ? static_cast(lookFeet->getInteger()) : 0);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "735c4d8081cb58520eb03c3ec613e90d87d490e338b56c23c70590897c8ac7c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9031, + "startColumn": 15, + "charOffset": 278138, + "charLength": 8, + "snippet": { + "text": "lookLegs" + } + }, + "contextRegion": { + "startLine": 9029, + "startColumn": 15, + "charOffset": 277972, + "charLength": 8, + "snippet": { + "text": "\t\tmsg.addByte(lookHead ? static_cast(lookHead->getInteger()) : 0);\n\t\tmsg.addByte(lookBody ? static_cast(lookBody->getInteger()) : 0);\n\t\tmsg.addByte(lookLegs ? static_cast(lookLegs->getInteger()) : 0);\n\t\tmsg.addByte(lookFeet ? static_cast(lookFeet->getInteger()) : 0);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b25917a14e564353309c5b0ec3ba9a3684af55c546f65fce0efde3593f4f5b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9031, + "startColumn": 15, + "charOffset": 278138, + "charLength": 8, + "snippet": { + "text": "lookLegs" + } + }, + "contextRegion": { + "startLine": 9029, + "startColumn": 15, + "charOffset": 277972, + "charLength": 8, + "snippet": { + "text": "\t\tmsg.addByte(lookHead ? static_cast(lookHead->getInteger()) : 0);\n\t\tmsg.addByte(lookBody ? static_cast(lookBody->getInteger()) : 0);\n\t\tmsg.addByte(lookLegs ? static_cast(lookLegs->getInteger()) : 0);\n\t\tmsg.addByte(lookFeet ? static_cast(lookFeet->getInteger()) : 0);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05e9e5d9d759242064d5a238201051c85002119239d1fa2f48a35aef3f925713" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9032, + "startColumn": 15, + "charOffset": 278214, + "charLength": 8, + "snippet": { + "text": "lookFeet" + } + }, + "contextRegion": { + "startLine": 9030, + "startColumn": 15, + "charOffset": 278048, + "charLength": 8, + "snippet": { + "text": "\t\tmsg.addByte(lookBody ? static_cast(lookBody->getInteger()) : 0);\n\t\tmsg.addByte(lookLegs ? static_cast(lookLegs->getInteger()) : 0);\n\t\tmsg.addByte(lookFeet ? static_cast(lookFeet->getInteger()) : 0);\n\n\t\tauto lookAddons = podium->getCustomAttribute(\"LookAddons\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76be9fcb7d1c83a9cca9fb62f8a7c0f3a420abe0a3297445e825af97c3a22d33" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9032, + "startColumn": 15, + "charOffset": 278214, + "charLength": 8, + "snippet": { + "text": "lookFeet" + } + }, + "contextRegion": { + "startLine": 9030, + "startColumn": 15, + "charOffset": 278048, + "charLength": 8, + "snippet": { + "text": "\t\tmsg.addByte(lookBody ? static_cast(lookBody->getInteger()) : 0);\n\t\tmsg.addByte(lookLegs ? static_cast(lookLegs->getInteger()) : 0);\n\t\tmsg.addByte(lookFeet ? static_cast(lookFeet->getInteger()) : 0);\n\n\t\tauto lookAddons = podium->getCustomAttribute(\"LookAddons\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d01186ff56defd3f770ffd2179c79f9f1ebcb6e84d3c121138a3d0c9ae87d5aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9032, + "startColumn": 15, + "charOffset": 278214, + "charLength": 8, + "snippet": { + "text": "lookFeet" + } + }, + "contextRegion": { + "startLine": 9030, + "startColumn": 15, + "charOffset": 278048, + "charLength": 8, + "snippet": { + "text": "\t\tmsg.addByte(lookBody ? static_cast(lookBody->getInteger()) : 0);\n\t\tmsg.addByte(lookLegs ? static_cast(lookLegs->getInteger()) : 0);\n\t\tmsg.addByte(lookFeet ? static_cast(lookFeet->getInteger()) : 0);\n\n\t\tauto lookAddons = podium->getCustomAttribute(\"LookAddons\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae4b5617972abd433334089ee8801e5e273baaee58de6006b60a4378c2b61871" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto lookAddons' can be declared as 'const auto *lookAddons'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9034, + "startColumn": 3, + "charOffset": 278279, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 9032, + "startColumn": 3, + "charOffset": 278200, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addByte(lookFeet ? static_cast(lookFeet->getInteger()) : 0);\n\n\t\tauto lookAddons = podium->getCustomAttribute(\"LookAddons\");\n\t\tmsg.addByte(lookAddons ? static_cast(lookAddons->getInteger()) : 0);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a57bf909ca2ebf4d8175b0262ad84be3b259a637a92692a06e1a21e075452d12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9035, + "startColumn": 15, + "charOffset": 278353, + "charLength": 10, + "snippet": { + "text": "lookAddons" + } + }, + "contextRegion": { + "startLine": 9033, + "startColumn": 15, + "charOffset": 278276, + "charLength": 10, + "snippet": { + "text": "\n\t\tauto lookAddons = podium->getCustomAttribute(\"LookAddons\");\n\t\tmsg.addByte(lookAddons ? static_cast(lookAddons->getInteger()) : 0);\n\t} else {\n\t\tmsg.add(0); // Boss LookType" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b201b414da6b513a5b82463a4564ad90b884e1aed1b9579d090655b5c3f963b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9035, + "startColumn": 15, + "charOffset": 278353, + "charLength": 10, + "snippet": { + "text": "lookAddons" + } + }, + "contextRegion": { + "startLine": 9033, + "startColumn": 15, + "charOffset": 278276, + "charLength": 10, + "snippet": { + "text": "\n\t\tauto lookAddons = podium->getCustomAttribute(\"LookAddons\");\n\t\tmsg.addByte(lookAddons ? static_cast(lookAddons->getInteger()) : 0);\n\t} else {\n\t\tmsg.add(0); // Boss LookType" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2d7b245bec483ca73811ef5e19cbc74fd6b58ea3813a4c88eb6bc4cee28150f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9035, + "startColumn": 15, + "charOffset": 278353, + "charLength": 10, + "snippet": { + "text": "lookAddons" + } + }, + "contextRegion": { + "startLine": 9033, + "startColumn": 15, + "charOffset": 278276, + "charLength": 10, + "snippet": { + "text": "\n\t\tauto lookAddons = podium->getCustomAttribute(\"LookAddons\");\n\t\tmsg.addByte(lookAddons ? static_cast(lookAddons->getInteger()) : 0);\n\t} else {\n\t\tmsg.add(0); // Boss LookType" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4ff8ecdf20992e9f3c850dd88c2885d86f85ab4da65189a460301f1b23818d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9055, + "startColumn": 14, + "charOffset": 279166, + "charLength": 13, + "snippet": { + "text": "podiumVisible" + } + }, + "contextRegion": { + "startLine": 9053, + "startColumn": 14, + "charOffset": 279091, + "charLength": 13, + "snippet": { + "text": "\tmsg.addByte(stackPos); // StackPos of the podium on the map\n\n\tmsg.addByte(podiumVisible ? static_cast(podiumVisible->getInteger()) : 0x01); // A boolean saying if it's visible or not\n\tmsg.addByte(lookType ? 0x01 : 0x00); // A boolean saying if there's a boss selected\n\tmsg.addByte(lookDirection ? static_cast(lookDirection->getInteger()) : 2); // Direction where the boss is looking" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b8fd977da923cebdefd5d96b37d539f9e58ed0b00d22fd0dfcec39ef5129278" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9055, + "startColumn": 14, + "charOffset": 279166, + "charLength": 13, + "snippet": { + "text": "podiumVisible" + } + }, + "contextRegion": { + "startLine": 9053, + "startColumn": 14, + "charOffset": 279091, + "charLength": 13, + "snippet": { + "text": "\tmsg.addByte(stackPos); // StackPos of the podium on the map\n\n\tmsg.addByte(podiumVisible ? static_cast(podiumVisible->getInteger()) : 0x01); // A boolean saying if it's visible or not\n\tmsg.addByte(lookType ? 0x01 : 0x00); // A boolean saying if there's a boss selected\n\tmsg.addByte(lookDirection ? static_cast(lookDirection->getInteger()) : 2); // Direction where the boss is looking" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a7dfa93a1915bd11dee818fd86055a5e6c8019e9f980ba68a55e487ad00894d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9055, + "startColumn": 14, + "charOffset": 279166, + "charLength": 13, + "snippet": { + "text": "podiumVisible" + } + }, + "contextRegion": { + "startLine": 9053, + "startColumn": 14, + "charOffset": 279091, + "charLength": 13, + "snippet": { + "text": "\tmsg.addByte(stackPos); // StackPos of the podium on the map\n\n\tmsg.addByte(podiumVisible ? static_cast(podiumVisible->getInteger()) : 0x01); // A boolean saying if it's visible or not\n\tmsg.addByte(lookType ? 0x01 : 0x00); // A boolean saying if there's a boss selected\n\tmsg.addByte(lookDirection ? static_cast(lookDirection->getInteger()) : 2); // Direction where the boss is looking" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7fae8a1f2201da5d0f981db62fbe5061f065733388fac2e28a69f963b5567dcd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9056, + "startColumn": 14, + "charOffset": 279297, + "charLength": 8, + "snippet": { + "text": "lookType" + } + }, + "contextRegion": { + "startLine": 9054, + "startColumn": 14, + "charOffset": 279152, + "charLength": 8, + "snippet": { + "text": "\n\tmsg.addByte(podiumVisible ? static_cast(podiumVisible->getInteger()) : 0x01); // A boolean saying if it's visible or not\n\tmsg.addByte(lookType ? 0x01 : 0x00); // A boolean saying if there's a boss selected\n\tmsg.addByte(lookDirection ? static_cast(lookDirection->getInteger()) : 2); // Direction where the boss is looking\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d10bc130fc2e950c946464cb221fb93e8ba1c2f8610e8b56ca9b845a7de35179" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9056, + "startColumn": 14, + "charOffset": 279297, + "charLength": 8, + "snippet": { + "text": "lookType" + } + }, + "contextRegion": { + "startLine": 9054, + "startColumn": 14, + "charOffset": 279152, + "charLength": 8, + "snippet": { + "text": "\n\tmsg.addByte(podiumVisible ? static_cast(podiumVisible->getInteger()) : 0x01); // A boolean saying if it's visible or not\n\tmsg.addByte(lookType ? 0x01 : 0x00); // A boolean saying if there's a boss selected\n\tmsg.addByte(lookDirection ? static_cast(lookDirection->getInteger()) : 2); // Direction where the boss is looking\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f131d26f33e81e6e2cdc62e7eae2fda9d3596d86e5ee3489c674797adf10234a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9057, + "startColumn": 14, + "charOffset": 279382, + "charLength": 13, + "snippet": { + "text": "lookDirection" + } + }, + "contextRegion": { + "startLine": 9055, + "startColumn": 14, + "charOffset": 279153, + "charLength": 13, + "snippet": { + "text": "\tmsg.addByte(podiumVisible ? static_cast(podiumVisible->getInteger()) : 0x01); // A boolean saying if it's visible or not\n\tmsg.addByte(lookType ? 0x01 : 0x00); // A boolean saying if there's a boss selected\n\tmsg.addByte(lookDirection ? static_cast(lookDirection->getInteger()) : 2); // Direction where the boss is looking\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2593b44294cce58000f0a28271ec6a68eae9634b555a7735f6f2b8ca909484a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9057, + "startColumn": 14, + "charOffset": 279382, + "charLength": 13, + "snippet": { + "text": "lookDirection" + } + }, + "contextRegion": { + "startLine": 9055, + "startColumn": 14, + "charOffset": 279153, + "charLength": 13, + "snippet": { + "text": "\tmsg.addByte(podiumVisible ? static_cast(podiumVisible->getInteger()) : 0x01); // A boolean saying if it's visible or not\n\tmsg.addByte(lookType ? 0x01 : 0x00); // A boolean saying if there's a boss selected\n\tmsg.addByte(lookDirection ? static_cast(lookDirection->getInteger()) : 2); // Direction where the boss is looking\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc6b57f6db6c42b0c169516d3045fb1016d31eb0ef815ae52177c82d93936a32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9057, + "startColumn": 14, + "charOffset": 279382, + "charLength": 13, + "snippet": { + "text": "lookDirection" + } + }, + "contextRegion": { + "startLine": 9055, + "startColumn": 14, + "charOffset": 279153, + "charLength": 13, + "snippet": { + "text": "\tmsg.addByte(podiumVisible ? static_cast(podiumVisible->getInteger()) : 0x01); // A boolean saying if it's visible or not\n\tmsg.addByte(lookType ? 0x01 : 0x00); // A boolean saying if there's a boss selected\n\tmsg.addByte(lookDirection ? static_cast(lookDirection->getInteger()) : 2); // Direction where the boss is looking\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1cb0881f245c4114507f12ffc65d08115d4535507030ef24c1b1f1f00b72107" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9062, + "startColumn": 6, + "charOffset": 279598, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9060, + "startColumn": 6, + "charOffset": 279522, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::parseSetMonsterPodium(NetworkMessage &msg) const {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cfaf55de64426e8d8cbb4d6dfb520e7a1118979b84a75f4b338ffe630eebb722" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9067, + "startColumn": 2, + "charOffset": 279730, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 9065, + "startColumn": 2, + "charOffset": 279637, + "charLength": 8, + "snippet": { + "text": "\n\t// For some reason the cip sends uint32_t, but we use uint16_t, so let's just ignore that\n\tuint16_t monsterRaceId = (uint16_t)msg.get();\n\tPosition pos = msg.getPosition();\n\tuint16_t itemId = msg.get();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6324a6a16441c56dee7f723d81576c491e46101c18b55db79163f7e0b165e6c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9067, + "startColumn": 27, + "charOffset": 279755, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 9065, + "startColumn": 27, + "charOffset": 279637, + "charLength": 1, + "snippet": { + "text": "\n\t// For some reason the cip sends uint32_t, but we use uint16_t, so let's just ignore that\n\tuint16_t monsterRaceId = (uint16_t)msg.get();\n\tPosition pos = msg.getPosition();\n\tuint16_t itemId = msg.get();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "153a274d3f690b876ecf9ca32820088d74af17362fd53ddd8bd101a569b0aa9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9069, + "startColumn": 2, + "charOffset": 279822, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 9067, + "startColumn": 2, + "charOffset": 279729, + "charLength": 8, + "snippet": { + "text": "\tuint16_t monsterRaceId = (uint16_t)msg.get();\n\tPosition pos = msg.getPosition();\n\tuint16_t itemId = msg.get();\n\tuint8_t stackpos = msg.getByte();\n\tuint8_t direction = msg.getByte();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e237c6d29df13d6170ec12bf995349de4de971f36eea3f003838377874c2cdd1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9079, + "startColumn": 6, + "charOffset": 280219, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9077, + "startColumn": 6, + "charOffset": 280163, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendBosstiaryCooldownTimer() {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0836e7bf9c31ef735ea903cc101f79c7b46b9fc4c014805a5b6af8b5a8a06b74" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9084, + "startColumn": 14, + "charOffset": 280293, + "charLength": 4, + "snippet": { + "text": "0xBD" + } + }, + "contextRegion": { + "startLine": 9082, + "startColumn": 14, + "charOffset": 280258, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xBD);\n\n\tauto startBosses = msg.getBufferPosition();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b59c966ecaeaf03358b5363b504b9788dfc745e505145047a03aeb3e588b6ab4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xBD is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9084, + "startColumn": 14, + "charOffset": 280293, + "charLength": 4, + "snippet": { + "text": "0xBD" + } + }, + "contextRegion": { + "startLine": 9082, + "startColumn": 14, + "charOffset": 280258, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xBD);\n\n\tauto startBosses = msg.getBufferPosition();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c33350825cb8384e99ff1ad5b653440d93635f1b19579e33916610bdb3e30b16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9089, + "startColumn": 2, + "charOffset": 280407, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 9087, + "startColumn": 2, + "charOffset": 280346, + "charLength": 3, + "snippet": { + "text": "\tmsg.skipBytes(2); // Boss count\n\tuint16_t bossesCount = 0;\n\tfor (std::map bossesMap = g_ioBosstiary().getBosstiaryMap();\n\t const auto &[bossRaceId, _] : bossesMap) {\n\t\tconst auto mType = g_ioBosstiary().getMonsterTypeByBossRaceId(bossRaceId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d48a0d0ed5c386d90276b83e7236f777d5188d744f5de28d5fb34d517e5fcc3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9092, + "startColumn": 7, + "charOffset": 280623, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9090, + "startColumn": 7, + "charOffset": 280491, + "charLength": 1, + "snippet": { + "text": "\t const auto &[bossRaceId, _] : bossesMap) {\n\t\tconst auto mType = g_ioBosstiary().getMonsterTypeByBossRaceId(bossRaceId);\n\t\tif (!mType) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ace3cd77672de8d5ca9540355ac6f395e0b98086acc1569025bd30d67b14430" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9097, + "startColumn": 7, + "charOffset": 280756, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9095, + "startColumn": 7, + "charOffset": 280650, + "charLength": 1, + "snippet": { + "text": "\n\t\tauto timerValue = player->kv()->scoped(\"boss.cooldown\")->get(toKey(std::to_string(bossRaceId)));\n\t\tif (!timerValue || !timerValue.has_value()) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "861a6c3bb9779ca66c67c5ddc1862b8a7048e0d2e827c4870f80c4523c3c0a5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9101, + "startColumn": 32, + "charOffset": 280886, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 9099, + "startColumn": 32, + "charOffset": 280811, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\t\tauto timer = timerValue->getNumber();\n\t\tuint64_t sendTimer = timer > 0 ? static_cast(timer) : 0;\n\t\tmsg.add(bossRaceId); // bossRaceId\n\t\tmsg.add(sendTimer); // Boss cooldown in seconds" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23b39368172801aae0cabfd3c10d44f54924020506a9cbc9cb48c4f9640a44eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9120, + "startColumn": 14, + "charOffset": 281362, + "charLength": 4, + "snippet": { + "text": "0xE6" + } + }, + "contextRegion": { + "startLine": 9118, + "startColumn": 14, + "charOffset": 281327, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xE6);\n\tmsg.add(bossid);\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf49689ec6951b0c5e6b6efd44967f8ab3d991027571f93fa92d65e729b79391" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xE6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9120, + "startColumn": 14, + "charOffset": 281362, + "charLength": 4, + "snippet": { + "text": "0xE6" + } + }, + "contextRegion": { + "startLine": 9118, + "startColumn": 14, + "charOffset": 281327, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0xE6);\n\tmsg.add(bossid);\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da82b1fa1f32bfbe27121de0cce0b57b6f799733d6a8cbaf1204a9619d5289ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9131, + "startColumn": 14, + "charOffset": 281600, + "charLength": 4, + "snippet": { + "text": "0x83" + } + }, + "contextRegion": { + "startLine": 9129, + "startColumn": 14, + "charOffset": 281565, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x83);\n\tmsg.addPosition(pos);\n\tmsg.addByte(0x06); // Sound effect type" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef435d790b51b0ee4e38becacc938647e09d1572065e1c3b76b1dc1b37c7f71a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x83 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9131, + "startColumn": 14, + "charOffset": 281600, + "charLength": 4, + "snippet": { + "text": "0x83" + } + }, + "contextRegion": { + "startLine": 9129, + "startColumn": 14, + "charOffset": 281565, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x83);\n\tmsg.addPosition(pos);\n\tmsg.addByte(0x06); // Sound effect type" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "529b0b89e4c06a567fefcd5f62573e686b903c12804059fdb6e2a24da3e911e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9133, + "startColumn": 14, + "charOffset": 281643, + "charLength": 4, + "snippet": { + "text": "0x06" + } + }, + "contextRegion": { + "startLine": 9131, + "startColumn": 14, + "charOffset": 281587, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(0x83);\n\tmsg.addPosition(pos);\n\tmsg.addByte(0x06); // Sound effect type\n\tmsg.addByte(static_cast(source)); // Sound source type\n\tmsg.add(static_cast(id)); // Sound id" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f72e3452299839d72064d76fb108d07f02d19371763226c5da43d842f65e622" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x06 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9133, + "startColumn": 14, + "charOffset": 281643, + "charLength": 4, + "snippet": { + "text": "0x06" + } + }, + "contextRegion": { + "startLine": 9131, + "startColumn": 14, + "charOffset": 281587, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(0x83);\n\tmsg.addPosition(pos);\n\tmsg.addByte(0x06); // Sound effect type\n\tmsg.addByte(static_cast(source)); // Sound source type\n\tmsg.add(static_cast(id)); // Sound id" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e6db825d09d81ae1d0b4e6f56c95be7109de2c56e01169486f0ae94d7befb5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9136, + "startColumn": 14, + "charOffset": 281808, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 9134, + "startColumn": 14, + "charOffset": 281671, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(static_cast(source)); // Sound source type\n\tmsg.add(static_cast(id)); // Sound id\n\tmsg.addByte(0x00); // Breaking the effects loop\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83ff76f7be5e535935291caea6978a40d3476a5e10912d73fbe71b3f6d2eab6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9152, + "startColumn": 14, + "charOffset": 282131, + "charLength": 4, + "snippet": { + "text": "0x83" + } + }, + "contextRegion": { + "startLine": 9150, + "startColumn": 14, + "charOffset": 282096, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x83);\n\tmsg.addPosition(pos);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01ae22ac9e999912f22f53fa721bf866e5093247025e60da56d2d652e0d8fad8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x83 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9152, + "startColumn": 14, + "charOffset": 282131, + "charLength": 4, + "snippet": { + "text": "0x83" + } + }, + "contextRegion": { + "startLine": 9150, + "startColumn": 14, + "charOffset": 282096, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x83);\n\tmsg.addPosition(pos);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85c846f2285e1c9411228ea1bd9c1abd3693397835d7d3e0d65317d6690d1400" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9156, + "startColumn": 14, + "charOffset": 282193, + "charLength": 4, + "snippet": { + "text": "0x06" + } + }, + "contextRegion": { + "startLine": 9154, + "startColumn": 14, + "charOffset": 282161, + "charLength": 4, + "snippet": { + "text": "\n\t// Primary sound\n\tmsg.addByte(0x06); // Sound effect type\n\tmsg.addByte(static_cast(mainSource)); // Sound source type\n\tmsg.add(static_cast(mainSoundId)); // Sound id" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf6225075e98ab69d2e1ade5230d671ae85fcfe9eef9f095a8f49028e0080b3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x06 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9156, + "startColumn": 14, + "charOffset": 282193, + "charLength": 4, + "snippet": { + "text": "0x06" + } + }, + "contextRegion": { + "startLine": 9154, + "startColumn": 14, + "charOffset": 282161, + "charLength": 4, + "snippet": { + "text": "\n\t// Primary sound\n\tmsg.addByte(0x06); // Sound effect type\n\tmsg.addByte(static_cast(mainSource)); // Sound source type\n\tmsg.add(static_cast(mainSoundId)); // Sound id" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8fd61575e735713f4008454dd8ff0d65f7196b8c55903a35d56ad0521a118968" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9161, + "startColumn": 14, + "charOffset": 282438, + "charLength": 4, + "snippet": { + "text": "0x07" + } + }, + "contextRegion": { + "startLine": 9159, + "startColumn": 14, + "charOffset": 282358, + "charLength": 4, + "snippet": { + "text": "\n\t// Secondary sound (Can be an array too, but not necessary here)\n\tmsg.addByte(0x07); // Multiple effect type\n\tmsg.addByte(0x01); // Useless ENUM (So far)\n\tmsg.addByte(static_cast(secondarySource)); // Sound source type" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ad0046b48f9d77f549c6ba37bfa13354dc532cd218955974c13ee1a8b0b899b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x07 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9161, + "startColumn": 14, + "charOffset": 282438, + "charLength": 4, + "snippet": { + "text": "0x07" + } + }, + "contextRegion": { + "startLine": 9159, + "startColumn": 14, + "charOffset": 282358, + "charLength": 4, + "snippet": { + "text": "\n\t// Secondary sound (Can be an array too, but not necessary here)\n\tmsg.addByte(0x07); // Multiple effect type\n\tmsg.addByte(0x01); // Useless ENUM (So far)\n\tmsg.addByte(static_cast(secondarySource)); // Sound source type" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ce3a61b05fb5f987bb6be4dcc6c3b17b6633dddf4d3f0947dae35a883e62a8f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9162, + "startColumn": 14, + "charOffset": 282482, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 9160, + "startColumn": 14, + "charOffset": 282359, + "charLength": 4, + "snippet": { + "text": "\t// Secondary sound (Can be an array too, but not necessary here)\n\tmsg.addByte(0x07); // Multiple effect type\n\tmsg.addByte(0x01); // Useless ENUM (So far)\n\tmsg.addByte(static_cast(secondarySource)); // Sound source type\n\tmsg.add(static_cast(secondarySoundId)); // Sound id" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aacd8c8554b8cbc277ed04aa31559205c8508f76508cb94fd4700a0f1741b79e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9166, + "startColumn": 14, + "charOffset": 282675, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 9164, + "startColumn": 14, + "charOffset": 282588, + "charLength": 4, + "snippet": { + "text": "\tmsg.add(static_cast(secondarySoundId)); // Sound id\n\n\tmsg.addByte(0x00); // Breaking the effects loop\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c649f214ee19e4f9a07d4534affc51d02958848f5a166353872445e523044bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9188, + "startColumn": 6, + "charOffset": 283276, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9186, + "startColumn": 6, + "charOffset": 283211, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendOpenWheelWindow(uint32_t ownerId) {\n\tif (!player || oldProtocol || !g_configManager().getBoolean(TOGGLE_WHEELSYSTEM, __FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2aeada0b15bf124469b2b1ede6acaed72d5e29daedf34966de4b45041a8f6e67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9206, + "startColumn": 21, + "charOffset": 283762, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9204, + "startColumn": 21, + "charOffset": 283696, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendDisableLoginMusic() {\n\tif (oldProtocol || !player || player->getOperatingSystem() >= CLIENTOS_OTCLIENT_LINUX) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "709cb99f5ced3e911d37085bbe0403fe9dafd5f22912b09d585571298b02c9c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9211, + "startColumn": 14, + "charOffset": 283880, + "charLength": 4, + "snippet": { + "text": "0x85" + } + }, + "contextRegion": { + "startLine": 9209, + "startColumn": 14, + "charOffset": 283845, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x85);\n\tmsg.addByte(0x01);\n\tmsg.addByte(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1253f10159e09f1d0743b83c76c63e39dc4a49459526c69fcb4eb6ca36a16e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x85 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9211, + "startColumn": 14, + "charOffset": 283880, + "charLength": 4, + "snippet": { + "text": "0x85" + } + }, + "contextRegion": { + "startLine": 9209, + "startColumn": 14, + "charOffset": 283845, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x85);\n\tmsg.addByte(0x01);\n\tmsg.addByte(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6cfc64d390e9ea5546b9830a2d2b9b856d9a7a20befc2c226830480d10dbacf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9212, + "startColumn": 14, + "charOffset": 283900, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 9210, + "startColumn": 14, + "charOffset": 283846, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\tmsg.addByte(0x85);\n\tmsg.addByte(0x01);\n\tmsg.addByte(0x00);\n\tmsg.addByte(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94fa65f32230d739b2236ece50afab261375c3ed7d6ab5b7cbbab3f9fab8967a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9213, + "startColumn": 14, + "charOffset": 283920, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 9211, + "startColumn": 14, + "charOffset": 283867, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(0x85);\n\tmsg.addByte(0x01);\n\tmsg.addByte(0x00);\n\tmsg.addByte(0x00);\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc13004eecacf0edec6fa923cf9074807ef17523dda352aef2a46da29f22810e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9214, + "startColumn": 14, + "charOffset": 283940, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 9212, + "startColumn": 14, + "charOffset": 283887, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(0x01);\n\tmsg.addByte(0x00);\n\tmsg.addByte(0x00);\n\twriteToOutputBuffer(msg);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d56d872ac04561a91d57cccc0955d36bf86719e7071520e3395ca3f62b05683" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9219, + "startColumn": 6, + "charOffset": 284022, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9217, + "startColumn": 6, + "charOffset": 283976, + "charLength": 1, + "snippet": { + "text": "\nvoid ProtocolGame::sendHotkeyPreset() {\n\tif (!player || oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac401043093d8e188570d800ec7b7979bfe4715f4006e47ec7e513d20aeda868" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9226, + "startColumn": 15, + "charOffset": 284195, + "charLength": 4, + "snippet": { + "text": "0x9D" + } + }, + "contextRegion": { + "startLine": 9224, + "startColumn": 15, + "charOffset": 284142, + "charLength": 4, + "snippet": { + "text": "\tif (vocation) {\n\t\tNetworkMessage msg;\n\t\tmsg.addByte(0x9D);\n\t\tmsg.add(vocation->getClientId());\n\t\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab1252f5f6eee5ad6f17851d7451a67bf5afa15e3bb19f5d5fe305b206e95b3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x9D is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9226, + "startColumn": 15, + "charOffset": 284195, + "charLength": 4, + "snippet": { + "text": "0x9D" + } + }, + "contextRegion": { + "startLine": 9224, + "startColumn": 15, + "charOffset": 284142, + "charLength": 4, + "snippet": { + "text": "\tif (vocation) {\n\t\tNetworkMessage msg;\n\t\tmsg.addByte(0x9D);\n\t\tmsg.add(vocation->getClientId());\n\t\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a232a01161f4a8239dd60de055190709ea9b3ee4ccd512daa57ef01eb30444a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9238, + "startColumn": 14, + "charOffset": 284461, + "charLength": 4, + "snippet": { + "text": "0x75" + } + }, + "contextRegion": { + "startLine": 9236, + "startColumn": 14, + "charOffset": 284426, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x75);\n\tmsg.addByte(screenshotType);\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39ee7f175fb2984d0f7fc04e02d32d0273c40ff1ae340437f3416c9946caf5ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x75 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.cpp" + }, + "region": { + "startLine": 9238, + "startColumn": 14, + "charOffset": 284461, + "charLength": 4, + "snippet": { + "text": "0x75" + } + }, + "contextRegion": { + "startLine": 9236, + "startColumn": 14, + "charOffset": 284426, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x75);\n\tmsg.addByte(screenshotType);\n\twriteToOutputBuffer(msg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3569d9d4bc9ea87cf61e189fd7b60d50a02692c54b4f316a3b97e428dcc3da84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'ProtocolGame::login' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolgame.hpp", + "index": 1 + }, + "region": { + "startLine": 71, + "startColumn": 7, + "charOffset": 1787, + "charLength": 5, + "snippet": { + "text": "login" + } + }, + "contextRegion": { + "startLine": 69, + "startColumn": 7, + "charOffset": 1725, + "charLength": 5, + "snippet": { + "text": "\texplicit ProtocolGame(Connection_ptr initConnection);\n\n\tvoid login(const std::string &name, uint32_t accnumber, OperatingSystem_t operatingSystem);\n\tvoid logout(bool displayEffect, bool forced);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92e1008d5fde164e08ec12259c11e82f3055221f834394fd667bbb2aa8154717" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'loadFromXml' has cognitive complexity of 34 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 25, + "startColumn": 17, + "charOffset": 869, + "charLength": 11, + "snippet": { + "text": "loadFromXml" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 17, + "charOffset": 788, + "charLength": 11, + "snippet": { + "text": "static constexpr int32_t MAXSPAWN_INTERVAL = 86400000; // 1 day\n\nbool SpawnsNpc::loadFromXml(const std::string &fileNpcName) {\n\tif (isLoaded()) {\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31e9d074fb4b790e983c18cc0bb8a9c194d01577d66a6d40d1166d21601e5b50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 32, + "startColumn": 6, + "charOffset": 1052, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 6, + "charOffset": 953, + "charLength": 1, + "snippet": { + "text": "\tpugi::xml_document doc;\n\tpugi::xml_parse_result result = doc.load_file(fileNpcName.c_str());\n\tif (!result) {\n\t\tprintXMLError(__FUNCTION__, fileNpcName, result);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "810f25deaf548030974e5bc53c52dcf8127f71cfcafce1a42a1657ae321cb0d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 37, + "startColumn": 2, + "charOffset": 1136, + "charLength": 11, + "snippet": { + "text": "setFileName" + } + }, + "contextRegion": { + "startLine": 35, + "startColumn": 2, + "charOffset": 1131, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\tsetFileName(fileNpcName);\n\tsetLoaded(true);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05d0246347abb6780a34d8fea49a4b946911da0a9101e90337950689919db740" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 2, + "charOffset": 1163, + "charLength": 9, + "snippet": { + "text": "setLoaded" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 2, + "charOffset": 1134, + "charLength": 9, + "snippet": { + "text": "\n\tsetFileName(fileNpcName);\n\tsetLoaded(true);\n\n\tfor (auto spawnNode : doc.child(\"npcs\").children()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e57906f9e47c035eaa33f4865aa8ae3cb15066bf155fc6d0530854e6ef44d9c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 44, + "startColumn": 4, + "charOffset": 1391, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 42, + "startColumn": 4, + "charOffset": 1258, + "charLength": 4, + "snippet": { + "text": "\t\t\tpugi::cast(spawnNode.attribute(\"centerx\").value()),\n\t\t\tpugi::cast(spawnNode.attribute(\"centery\").value()),\n\t\t\tpugi::cast(spawnNode.attribute(\"centerz\").value())\n\t\t);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b80e4326eaf8a82a095d667309a115c0be0ce6a1dcc9a364a32671d37727b62f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'radius' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 47, + "startColumn": 11, + "charOffset": 1468, + "charLength": 6, + "snippet": { + "text": "radius" + } + }, + "contextRegion": { + "startLine": 45, + "startColumn": 11, + "charOffset": 1452, + "charLength": 6, + "snippet": { + "text": "\t\t);\n\n\t\tint32_t radius;\n\t\tpugi::xml_attribute radiusAttribute = spawnNode.attribute(\"radius\");\n\t\tif (radiusAttribute) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "727883ba324b403c87d1d00e8a8f1a7b3dd92b7e1572b3a8c5bf3c111a1e34e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 49, + "startColumn": 7, + "charOffset": 1553, + "charLength": 15, + "snippet": { + "text": "radiusAttribute" + } + }, + "contextRegion": { + "startLine": 47, + "startColumn": 7, + "charOffset": 1458, + "charLength": 15, + "snippet": { + "text": "\t\tint32_t radius;\n\t\tpugi::xml_attribute radiusAttribute = spawnNode.attribute(\"radius\");\n\t\tif (radiusAttribute) {\n\t\t\tradius = pugi::cast(radiusAttribute.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab1e753196a344200ff7a1fe0584043c8eb336f393cdfd1ea51302bf28fe3bc7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 49, + "startColumn": 7, + "charOffset": 1553, + "charLength": 15, + "snippet": { + "text": "radiusAttribute" + } + }, + "contextRegion": { + "startLine": 47, + "startColumn": 7, + "charOffset": 1458, + "charLength": 15, + "snippet": { + "text": "\t\tint32_t radius;\n\t\tpugi::xml_attribute radiusAttribute = spawnNode.attribute(\"radius\");\n\t\tif (radiusAttribute) {\n\t\t\tradius = pugi::cast(radiusAttribute.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fbf15b9156f6cbbddf883ee554ea8523f66871938d01591e2f3649f8d678521f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 55, + "startColumn": 7, + "charOffset": 1668, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 7, + "charOffset": 1657, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif (!spawnNode.first_child()) {\n\t\t\tg_logger().warn(\"[SpawnsNpc::loadFromXml] - Empty spawn at position: {} with radius: {}\", centerPos.toString(), radius);\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3ae1c4411c14384d27f110c6dbf4c6ea7087d75758cfa77aeedd7fddf518b77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 62, + "startColumn": 3, + "charOffset": 1940, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 3, + "charOffset": 1838, + "charLength": 3, + "snippet": { + "text": "\t\tconst auto &spawnNpc = spawnNpcList.emplace_back(std::make_shared(centerPos, radius));\n\n\t\tfor (auto childNode : spawnNode.children()) {\n\t\t\tif (strcasecmp(childNode.name(), \"npc\") == 0) {\n\t\t\t\tpugi::xml_attribute nameAttribute = childNode.attribute(\"name\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a5025c2843504e6da5cfa7a5b5692e76ae8c4f810bc4045bce2721c17fea7fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 65, + "startColumn": 9, + "charOffset": 2114, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 9, + "charOffset": 1986, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (strcasecmp(childNode.name(), \"npc\") == 0) {\n\t\t\t\tpugi::xml_attribute nameAttribute = childNode.attribute(\"name\");\n\t\t\t\tif (!nameAttribute) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb29938ed8a15fc7ad773b3cc02b577b4a693a064194146d71766335433bb977" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'dir' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 69, + "startColumn": 15, + "charOffset": 2168, + "charLength": 3, + "snippet": { + "text": "dir" + } + }, + "contextRegion": { + "startLine": 67, + "startColumn": 15, + "charOffset": 2147, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tDirection dir;\n\n\t\t\t\tpugi::xml_attribute directionAttribute = childNode.attribute(\"direction\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99690dbcdb9ac54528c86b0f1fd7b214222c57ab8c4cbcc587f47a7de821ff10" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 9, + "charOffset": 2261, + "charLength": 18, + "snippet": { + "text": "directionAttribute" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 9, + "charOffset": 2173, + "charLength": 18, + "snippet": { + "text": "\n\t\t\t\tpugi::xml_attribute directionAttribute = childNode.attribute(\"direction\");\n\t\t\t\tif (directionAttribute) {\n\t\t\t\t\tdir = static_cast(pugi::cast(directionAttribute.value()));\n\t\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6d8394f6a2e331b58e5e5ae456bd1d9240aaeb518ecba37d21261380b9518f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 9, + "charOffset": 2261, + "charLength": 18, + "snippet": { + "text": "directionAttribute" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 9, + "charOffset": 2173, + "charLength": 18, + "snippet": { + "text": "\n\t\t\t\tpugi::xml_attribute directionAttribute = childNode.attribute(\"direction\");\n\t\t\t\tif (directionAttribute) {\n\t\t\t\t\tdir = static_cast(pugi::cast(directionAttribute.value()));\n\t\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cfd4b071f10ef5f718aa20bd4ec54fc2d697bda6afb3938ad1a0ac61daec4814" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 85, + "startColumn": 88, + "charOffset": 2795, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 88, + "charOffset": 2684, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\tcenterPos.z\n\t\t\t\t);\n\t\t\t\tint64_t interval = pugi::cast(childNode.attribute(\"spawntime\").value()) * 1000;\n\t\t\t\tif (interval >= MINSPAWN_INTERVAL && interval <= MAXSPAWN_INTERVAL) {\n\t\t\t\t\tspawnNpc->addNpc(nameAttribute.as_string(), pos, dir, static_cast(interval));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89fbc38bf01fcb08f1ce150aaeebd132cf47e390a0f4d54880296387590dfa0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 16, + "charOffset": 2890, + "charLength": 6, + "snippet": { + "text": "addNpc" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 16, + "charOffset": 2708, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tint64_t interval = pugi::cast(childNode.attribute(\"spawntime\").value()) * 1000;\n\t\t\t\tif (interval >= MINSPAWN_INTERVAL && interval <= MAXSPAWN_INTERVAL) {\n\t\t\t\t\tspawnNpc->addNpc(nameAttribute.as_string(), pos, dir, static_cast(interval));\n\t\t\t\t} else {\n\t\t\t\t\tif (interval <= MINSPAWN_INTERVAL) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c6509b75ed5069c0c306ea54263843d1b14ac9e001a15ec9b2ea74c2b822e14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 90, + "startColumn": 164, + "charOffset": 3186, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 88, + "startColumn": 164, + "charOffset": 2968, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t} else {\n\t\t\t\t\tif (interval <= MINSPAWN_INTERVAL) {\n\t\t\t\t\t\tg_logger().warn(\"[SpawnsNpc::loadFromXml] - {} {} spawntime can not be less than {} seconds\", nameAttribute.as_string(), pos.toString(), MINSPAWN_INTERVAL / 1000);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tg_logger().warn(\"[SpawnsNpc::loadFromXml] - {} {} spawntime can not be more than {} seconds\", nameAttribute.as_string(), pos.toString(), MAXSPAWN_INTERVAL / 1000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37abf0bd84898d0d5730ac4deb12e811a5ac353db1cac584656f1684c30d3ed5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 92, + "startColumn": 164, + "charOffset": 3370, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 90, + "startColumn": 164, + "charOffset": 3023, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\t\tg_logger().warn(\"[SpawnsNpc::loadFromXml] - {} {} spawntime can not be less than {} seconds\", nameAttribute.as_string(), pos.toString(), MINSPAWN_INTERVAL / 1000);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tg_logger().warn(\"[SpawnsNpc::loadFromXml] - {} {} spawntime can not be more than {} seconds\", nameAttribute.as_string(), pos.toString(), MAXSPAWN_INTERVAL / 1000);\n\t\t\t\t\t}\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "940a703f1675e467079296f0bb544a57d7d96ba8ac1a1eee129e552241e2f070" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 106, + "startColumn": 2, + "charOffset": 3497, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 104, + "startColumn": 2, + "charOffset": 3492, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &spawnNpc : spawnNpcList) {\n\t\tspawnNpc->startup();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01e79cf3805679663ba038f9ece3d2b067ec479479ed0d94169eff4ac8e950b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 110, + "startColumn": 2, + "charOffset": 3569, + "charLength": 10, + "snippet": { + "text": "setStarted" + } + }, + "contextRegion": { + "startLine": 108, + "startColumn": 2, + "charOffset": 3564, + "charLength": 10, + "snippet": { + "text": "\t}\n\n\tsetStarted(true);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d8d67539f95fd1a0a8651e1d287aca8df6e6f321820ff035e7fc6fe921886b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 114, + "startColumn": 2, + "charOffset": 3617, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 112, + "startColumn": 2, + "charOffset": 3589, + "charLength": 3, + "snippet": { + "text": "\nvoid SpawnsNpc::clear() {\n\tfor (const auto &spawnNpc : spawnNpcList) {\n\t\tspawnNpc->stopEvent();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ce828027d2442d5ea47a6e92c8e77334980e980c5d8ea07547f1d07721a84fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 119, + "startColumn": 2, + "charOffset": 3714, + "charLength": 9, + "snippet": { + "text": "setLoaded" + } + }, + "contextRegion": { + "startLine": 117, + "startColumn": 2, + "charOffset": 3689, + "charLength": 9, + "snippet": { + "text": "\tspawnNpcList.clear();\n\n\tsetLoaded(false);\n\tsetStarted(false);\n\tfileName.clear();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45bd8f8db4e5bb6f46d143ebfb19410a7ec5a117dea1ab799a774e97086c1c5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 120, + "startColumn": 2, + "charOffset": 3733, + "charLength": 10, + "snippet": { + "text": "setStarted" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 2, + "charOffset": 3712, + "charLength": 10, + "snippet": { + "text": "\n\tsetLoaded(false);\n\tsetStarted(false);\n\tfileName.clear();\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bdd5479a5b3299a7e1153a5f01a9b49c83ad709a43bb13bbd315766043eaff65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 24, + "charOffset": 4189, + "charLength": 12, + "snippet": { + "text": "g_dispatcher" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 24, + "charOffset": 4096, + "charLength": 12, + "snippet": { + "text": "void SpawnNpc::startSpawnNpcCheck() {\n\tif (checkSpawnNpcEvent == 0) {\n\t\tcheckSpawnNpcEvent = g_dispatcher().scheduleEvent(\n\t\t\tgetInterval(), [this] { checkSpawnNpc(); }, \"SpawnNpc::checkSpawnNpc\"\n\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db787e843bb56d5914fd53b2d6b208d319559f30d9d3477fbacd0d99aaeb1fd6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 141, + "startColumn": 2, + "charOffset": 4328, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 139, + "startColumn": 2, + "charOffset": 4302, + "charLength": 3, + "snippet": { + "text": "\nSpawnNpc::~SpawnNpc() {\n\tfor (const auto &it : spawnedNpcMap) {\n\t\tauto npc = it.second;\n\t\tnpc->setSpawnNpc(nullptr);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5992e875e592fde63a73e12dd644972a86ce118fcaa52b06de28b96c51eb0a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 150, + "startColumn": 10, + "charOffset": 4603, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 148, + "startColumn": 10, + "charOffset": 4475, + "charLength": 1, + "snippet": { + "text": "\tauto spectators = Spectators().find(pos);\n\treturn std::ranges::any_of(spectators, [](const auto &spectator) {\n\t\treturn !spectator->getPlayer()->hasFlag(PlayerFlags_t::IgnoredByNpcs);\n\t});\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71ad322d49a0aaacce73e6ca373ddefa5d277ecca84b6ff18694ec1f949b0855" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 175, + "startColumn": 16, + "charOffset": 5378, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 173, + "startColumn": 16, + "charOffset": 5337, + "charLength": 6, + "snippet": { + "text": "\tnpc->setMasterPos(pos);\n\n\tspawnedNpcMap.insert(spawned_pair(spawnId, npc));\n\tspawnNpcMap[spawnId].lastSpawnNpc = OTSYS_TIME();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ab9e5297f4261a44fcc93bf53fcb4d45f05f805924d196269c0bd7512b2be0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 184, + "startColumn": 2, + "charOffset": 5649, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 182, + "startColumn": 2, + "charOffset": 5620, + "charLength": 3, + "snippet": { + "text": "\nvoid SpawnNpc::startup() {\n\tfor (const auto &it : spawnNpcMap) {\n\t\tuint32_t spawnId = it.first;\n\t\tconst spawnBlockNpc_t &sb = it.second;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54c8e1138a0a14441e99e303229f4776df05dbe76be5e2f338bc299c349aba76" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 187, + "startColumn": 3, + "charOffset": 5760, + "charLength": 8, + "snippet": { + "text": "spawnNpc" + } + }, + "contextRegion": { + "startLine": 185, + "startColumn": 3, + "charOffset": 5686, + "charLength": 8, + "snippet": { + "text": "\t\tuint32_t spawnId = it.first;\n\t\tconst spawnBlockNpc_t &sb = it.second;\n\t\tspawnNpc(spawnId, sb.npcType, sb.pos, sb.direction, true);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "358c16e60e137aa6622cde83f666348cd59ba858d8b285746b969a3cb575bfd1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 196, + "startColumn": 2, + "charOffset": 5898, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 194, + "startColumn": 2, + "charOffset": 5884, + "charLength": 3, + "snippet": { + "text": "\tcleanup();\n\n\tfor (auto &it : spawnNpcMap) {\n\t\tuint32_t spawnId = it.first;\n\t\tif (spawnedNpcMap.find(spawnId) != spawnedNpcMap.end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c38081320d5dab3de9ac9ab9e0b305025ef056d3a96e802310143fed1f0aaec6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 219, + "startColumn": 24, + "charOffset": 6457, + "charLength": 12, + "snippet": { + "text": "g_dispatcher" + } + }, + "contextRegion": { + "startLine": 217, + "startColumn": 24, + "charOffset": 6383, + "charLength": 12, + "snippet": { + "text": "\n\tif (spawnedNpcMap.size() < spawnNpcMap.size()) {\n\t\tcheckSpawnNpcEvent = g_dispatcher().scheduleEvent(\n\t\t\tgetInterval(), [this] { checkSpawnNpc(); }, __FUNCTION__\n\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6029f0364da7e41918866e616bffe0a89269f31b4d0a30dffa99d463f38369b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 227, + "startColumn": 3, + "charOffset": 6674, + "charLength": 8, + "snippet": { + "text": "spawnNpc" + } + }, + "contextRegion": { + "startLine": 225, + "startColumn": 3, + "charOffset": 6558, + "charLength": 8, + "snippet": { + "text": "void SpawnNpc::scheduleSpawnNpc(uint32_t spawnId, spawnBlockNpc_t &sb, uint16_t interval) {\n\tif (interval <= 0) {\n\t\tspawnNpc(spawnId, sb.npcType, sb.pos, sb.direction);\n\t} else {\n\t\tg_game().addMagicEffect(sb.pos, CONST_ME_TELEPORT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0cf210ff564dc7848134a10b5b92b35adad8fbfd35b42d8a62b0c8a9b6310a62" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 230, + "startColumn": 18, + "charOffset": 6808, + "charLength": 13, + "snippet": { + "text": "scheduleEvent" + } + }, + "contextRegion": { + "startLine": 228, + "startColumn": 18, + "charOffset": 6727, + "charLength": 13, + "snippet": { + "text": "\t} else {\n\t\tg_game().addMagicEffect(sb.pos, CONST_ME_TELEPORT);\n\t\tg_dispatcher().scheduleEvent(\n\t\t\t1400, [=, this, &sb] { scheduleSpawnNpc(spawnId, sb, interval - NONBLOCKABLE_SPAWN_NPC_INTERVAL); }, __FUNCTION__\n\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b284b8813c1b690a98e1652182386264931a5e6ba34a329c7e048f8606c7b429" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 231, + "startColumn": 4, + "charOffset": 6826, + "charLength": 4, + "snippet": { + "text": "1400" + } + }, + "contextRegion": { + "startLine": 229, + "startColumn": 4, + "charOffset": 6737, + "charLength": 4, + "snippet": { + "text": "\t\tg_game().addMagicEffect(sb.pos, CONST_ME_TELEPORT);\n\t\tg_dispatcher().scheduleEvent(\n\t\t\t1400, [=, this, &sb] { scheduleSpawnNpc(spawnId, sb, interval - NONBLOCKABLE_SPAWN_NPC_INTERVAL); }, __FUNCTION__\n\t\t);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "590a8a2ddeb67c7ee7b1c8825c818bc06a7a50e611821bd22c71e3965b4db6a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-misleading-capture-default-by-value", + "ruleIndex": 494, + "kind": "fail", + "level": "warning", + "message": { + "text": "lambdas that capture 'this' should not specify a by-value capture default" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 231, + "startColumn": 11, + "charOffset": 6833, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 229, + "startColumn": 11, + "charOffset": 6737, + "charLength": 1, + "snippet": { + "text": "\t\tg_game().addMagicEffect(sb.pos, CONST_ME_TELEPORT);\n\t\tg_dispatcher().scheduleEvent(\n\t\t\t1400, [=, this, &sb] { scheduleSpawnNpc(spawnId, sb, interval - NONBLOCKABLE_SPAWN_NPC_INTERVAL); }, __FUNCTION__\n\t\t);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92261c881bb20173fc15d8b7a5259f32866f8a109af38cc07f337a18ca03ccb4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 231, + "startColumn": 57, + "charOffset": 6879, + "charLength": 8, + "snippet": { + "text": "interval" + } + }, + "contextRegion": { + "startLine": 229, + "startColumn": 57, + "charOffset": 6737, + "charLength": 8, + "snippet": { + "text": "\t\tg_game().addMagicEffect(sb.pos, CONST_ME_TELEPORT);\n\t\tg_dispatcher().scheduleEvent(\n\t\t\t1400, [=, this, &sb] { scheduleSpawnNpc(spawnId, sb, interval - NONBLOCKABLE_SPAWN_NPC_INTERVAL); }, __FUNCTION__\n\t\t);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4994d39442f8ec46b869417475060e5d703d9e857ac8735d0c1cea8e1df409c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 238, + "startColumn": 2, + "charOffset": 7013, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 236, + "startColumn": 2, + "charOffset": 6951, + "charLength": 5, + "snippet": { + "text": "void SpawnNpc::cleanup() {\n\tauto it = spawnedNpcMap.begin();\n\twhile (it != spawnedNpcMap.end()) {\n\t\tuint32_t spawnId = it->first;\n\t\tauto npc = it->second;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ee2adbfe479fe25aad1320224998a4393ab9d70b60bc359039e93bc2c157891" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 238, + "startColumn": 9, + "charOffset": 7020, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 236, + "startColumn": 9, + "charOffset": 6951, + "charLength": 2, + "snippet": { + "text": "void SpawnNpc::cleanup() {\n\tauto it = spawnedNpcMap.begin();\n\twhile (it != spawnedNpcMap.end()) {\n\t\tuint32_t spawnId = it->first;\n\t\tauto npc = it->second;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a0a07d7a9424f0d2e02e4a665369d4aab19c7cbf4d679b4daca12182189972f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 252, + "startColumn": 6, + "charOffset": 7415, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 250, + "startColumn": 6, + "charOffset": 7248, + "charLength": 1, + "snippet": { + "text": "bool SpawnNpc::addNpc(const std::string &name, const Position &pos, Direction dir, uint32_t scheduleInterval) {\n\tconst auto &npcType = g_npcs().getNpcType(name);\n\tif (!npcType) {\n\t\tg_logger().error(\"Can not find {}\", name);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0da9c18a9afd80b1a0461b23cc6d2e8c4002913f00ea7459bf92d07c06811dde" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 271, + "startColumn": 47, + "charOffset": 7826, + "charLength": 3, + "snippet": { + "text": "npc" + } + }, + "contextRegion": { + "startLine": 269, + "startColumn": 47, + "charOffset": 7777, + "charLength": 3, + "snippet": { + "text": "}\n\nvoid SpawnNpc::removeNpc(std::shared_ptr npc) {\n\tfor (auto it = spawnedNpcMap.begin(), end = spawnedNpcMap.end(); it != end; ++it) {\n\t\tif (it->second == npc) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e92160b34070874f35ab0f02b77b2bfbb32f06cb5a4483ca955261826d87dd12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 272, + "startColumn": 2, + "charOffset": 7834, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 270, + "startColumn": 2, + "charOffset": 7779, + "charLength": 3, + "snippet": { + "text": "\nvoid SpawnNpc::removeNpc(std::shared_ptr npc) {\n\tfor (auto it = spawnedNpcMap.begin(), end = spawnedNpcMap.end(); it != end; ++it) {\n\t\tif (it->second == npc) {\n\t\t\tspawnedNpcMap.erase(it);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b53853108ace3dd26bbd9a32137a32b351cf162ed1b264309cfce3fc2b7cf8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 272, + "startColumn": 2, + "charOffset": 7834, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 270, + "startColumn": 2, + "charOffset": 7779, + "charLength": 3, + "snippet": { + "text": "\nvoid SpawnNpc::removeNpc(std::shared_ptr npc) {\n\tfor (auto it = spawnedNpcMap.begin(), end = spawnedNpcMap.end(); it != end; ++it) {\n\t\tif (it->second == npc) {\n\t\t\tspawnedNpcMap.erase(it);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d32ddb2662fab682d44cc0e77415b518abb9d74e919fa5970d5aa632a620df0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 272, + "startColumn": 7, + "charOffset": 7839, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 270, + "startColumn": 7, + "charOffset": 7779, + "charLength": 4, + "snippet": { + "text": "\nvoid SpawnNpc::removeNpc(std::shared_ptr npc) {\n\tfor (auto it = spawnedNpcMap.begin(), end = spawnedNpcMap.end(); it != end; ++it) {\n\t\tif (it->second == npc) {\n\t\t\tspawnedNpcMap.erase(it);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1cfba8dffd97112faa8b60a365d8258b50212ad0601fcda797df040472d300a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 272, + "startColumn": 67, + "charOffset": 7899, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 270, + "startColumn": 67, + "charOffset": 7779, + "charLength": 2, + "snippet": { + "text": "\nvoid SpawnNpc::removeNpc(std::shared_ptr npc) {\n\tfor (auto it = spawnedNpcMap.begin(), end = spawnedNpcMap.end(); it != end; ++it) {\n\t\tif (it->second == npc) {\n\t\t\tspawnedNpcMap.erase(it);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d830bda8a8a0de08229673080ac03fc4140c9381bd90d8141b2c1954ec01f52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/spawns/spawn_npc.cpp" + }, + "region": { + "startLine": 274, + "startColumn": 18, + "charOffset": 7962, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 272, + "startColumn": 18, + "charOffset": 7833, + "charLength": 5, + "snippet": { + "text": "\tfor (auto it = spawnedNpcMap.begin(), end = spawnedNpcMap.end(); it != end; ++it) {\n\t\tif (it->second == npc) {\n\t\t\tspawnedNpcMap.erase(it);\n\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d438cd3ac5fd0b56104029b5aa7e1f01d98d7cd56e1ed6960752a47b85a80e87" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'npc.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "index": 1 + }, + "region": { + "startLine": 34, + "startColumn": 10, + "charOffset": 1231, + "charLength": 24, + "snippet": { + "text": "\"creatures/npcs/npc.hpp\"" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 10, + "charOffset": 1164, + "charLength": 24, + "snippet": { + "text": "#include \"map/town.hpp\"\n#include \"vocations/vocation.hpp\"\n#include \"creatures/npcs/npc.hpp\"\n#include \"game/bank/bank.hpp\"\n#include \"enums/object_category.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d92e3a967a16d6acd7b5d78d39a1a75619719e01f52be307f0ba6178f5451c25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocollogin.cpp" + }, + "region": { + "startLine": 25, + "startColumn": 18, + "charOffset": 868, + "charLength": 4, + "snippet": { + "text": "0x0B" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 18, + "charOffset": 796, + "charLength": 4, + "snippet": { + "text": "\tauto output = OutputMessagePool::getOutputMessage();\n\n\toutput->addByte(0x0B);\n\toutput->addString(message, \"ProtocolLogin::disconnectClient - message\");\n\tsend(output);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9109e89ed45418bce6e9f68dfa7fdfd46a03726e836a307ffe359bb6a06626f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x0B is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocollogin.cpp" + }, + "region": { + "startLine": 25, + "startColumn": 18, + "charOffset": 868, + "charLength": 4, + "snippet": { + "text": "0x0B" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 18, + "charOffset": 796, + "charLength": 4, + "snippet": { + "text": "\tauto output = OutputMessagePool::getOutputMessage();\n\n\toutput->addByte(0x0B);\n\toutput->addString(message, \"ProtocolLogin::disconnectClient - message\");\n\tsend(output);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60eb116edd71fdf6546462e8ffcf0b78415f6ceff945bdbc4b8c9f33a8c95195" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocollogin.cpp" + }, + "region": { + "startLine": 36, + "startColumn": 2, + "charOffset": 1169, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 2, + "charOffset": 1126, + "charLength": 2, + "snippet": { + "text": "\taccount.setProtocolCompat(oldProtocol);\n\n\tif (oldProtocol && !g_configManager().getBoolean(OLD_PROTOCOL, __FUNCTION__)) {\n\t\tdisconnectClient(fmt::format(\"Only protocol version {}.{} is allowed.\", CLIENT_VERSION_UPPER, CLIENT_VERSION_LOWER));\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12b70ff1ec0ee140b2551dea9bb857fa1f04d06f6c5855cbcfefc4b8f30da771" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocollogin.cpp" + }, + "region": { + "startLine": 39, + "startColumn": 4, + "charOffset": 1382, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 37, + "startColumn": 4, + "charOffset": 1249, + "charLength": 4, + "snippet": { + "text": "\t\tdisconnectClient(fmt::format(\"Only protocol version {}.{} is allowed.\", CLIENT_VERSION_UPPER, CLIENT_VERSION_LOWER));\n\t\treturn;\n\t} else if (!oldProtocol) {\n\t\tdisconnectClient(fmt::format(\"Only protocol version {}.{} or outdated 11.00 is allowed.\", CLIENT_VERSION_UPPER, CLIENT_VERSION_LOWER));\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae0c596e79646b1cdf8b2c28932e1fc716071ac9718012f40efe0e259a10bed3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocollogin.cpp" + }, + "region": { + "startLine": 55, + "startColumn": 19, + "charOffset": 1993, + "charLength": 4, + "snippet": { + "text": "0x14" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 19, + "charOffset": 1939, + "charLength": 4, + "snippet": { + "text": "\tif (!motd.empty()) {\n\t\t// Add MOTD\n\t\toutput->addByte(0x14);\n\n\t\tstd::ostringstream ss;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afb70dba5016e686d80dff4b3a91b82681ab92def1aaefea10cc9c418a9d8ff5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x14 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocollogin.cpp" + }, + "region": { + "startLine": 55, + "startColumn": 19, + "charOffset": 1993, + "charLength": 4, + "snippet": { + "text": "0x14" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 19, + "charOffset": 1939, + "charLength": 4, + "snippet": { + "text": "\tif (!motd.empty()) {\n\t\t// Add MOTD\n\t\toutput->addByte(0x14);\n\n\t\tstd::ostringstream ss;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "284d0ddde29b77bf547a2e171c5b4c82b2c454c9f7e304ea75be111a84173ad7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocollogin.cpp" + }, + "region": { + "startLine": 64, + "startColumn": 18, + "charOffset": 2196, + "charLength": 4, + "snippet": { + "text": "0x28" + } + }, + "contextRegion": { + "startLine": 62, + "startColumn": 18, + "charOffset": 2158, + "charLength": 4, + "snippet": { + "text": "\n\t// Add session key\n\toutput->addByte(0x28);\n\toutput->addString(accountDescriptor + \"\\n\" + password, \"ProtocolLogin::getCharacterList - accountDescriptor + password\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5df71cb2cf9fedd450d6233a4e08de58bf7d9e66e2f1f60717bc8c62c1bd1497" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x28 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocollogin.cpp" + }, + "region": { + "startLine": 64, + "startColumn": 18, + "charOffset": 2196, + "charLength": 4, + "snippet": { + "text": "0x28" + } + }, + "contextRegion": { + "startLine": 62, + "startColumn": 18, + "charOffset": 2158, + "charLength": 4, + "snippet": { + "text": "\n\t// Add session key\n\toutput->addByte(0x28);\n\toutput->addString(accountDescriptor + \"\\n\" + password, \"ProtocolLogin::getCharacterList - accountDescriptor + password\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d7e4cd6ad7380ddf8e1b33bac3fc27a8810e9753a4b5fd3a2d8bfeda9a417d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocollogin.cpp" + }, + "region": { + "startLine": 73, + "startColumn": 18, + "charOffset": 2547, + "charLength": 4, + "snippet": { + "text": "0x64" + } + }, + "contextRegion": { + "startLine": 71, + "startColumn": 18, + "charOffset": 2526, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\toutput->addByte(0x64);\n\n\toutput->addByte(1); // number of worlds" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6bff8cb4b2ffa26108265d70417f1d2965ce9dc49b30579cdf787562b1b4e13e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x64 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocollogin.cpp" + }, + "region": { + "startLine": 73, + "startColumn": 18, + "charOffset": 2547, + "charLength": 4, + "snippet": { + "text": "0x64" + } + }, + "contextRegion": { + "startLine": 71, + "startColumn": 18, + "charOffset": 2526, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\toutput->addByte(0x64);\n\n\toutput->addByte(1); // number of worlds" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92304a2add2ffb146a322780428c9e71bb9e4eafd535492510956147dedf47c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocollogin.cpp" + }, + "region": { + "startLine": 81, + "startColumn": 24, + "charOffset": 2943, + "charLength": 15, + "snippet": { + "text": "g_configManager" + } + }, + "contextRegion": { + "startLine": 79, + "startColumn": 24, + "charOffset": 2783, + "charLength": 15, + "snippet": { + "text": "\toutput->addString(g_configManager().getString(IP, __FUNCTION__), \"ProtocolLogin::getCharacterList - g_configManager().getString(IP)\");\n\n\toutput->add(g_configManager().getNumber(GAME_PORT, __FUNCTION__));\n\n\toutput->addByte(0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0ab62abcfc881b64b8e4609c6e7d222ef98fc995b8ba3910222ca0796e54173" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocollogin.cpp" + }, + "region": { + "startLine": 85, + "startColumn": 17, + "charOffset": 3037, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 17, + "charOffset": 2999, + "charLength": 3, + "snippet": { + "text": "\toutput->addByte(0);\n\n\tuint8_t size = std::min(std::numeric_limits::max(), players.size());\n\toutput->addByte(size);\n\tfor (const auto &[name, deletion] : players) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "527a88d6b1abc05e425b74d8ba92bf3eec3848c39181d9412e7095abdbcd5839" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocollogin.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 2, + "charOffset": 3133, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 2, + "charOffset": 3021, + "charLength": 3, + "snippet": { + "text": "\tuint8_t size = std::min(std::numeric_limits::max(), players.size());\n\toutput->addByte(size);\n\tfor (const auto &[name, deletion] : players) {\n\t\toutput->addByte(0);\n\t\toutput->addString(name, \"ProtocolLogin::getCharacterList - name\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e8d565c5762da4a67a8559e3063844b9f171ece9852e421133c88f00b7ae0a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocollogin.cpp" + }, + "region": { + "startLine": 93, + "startColumn": 18, + "charOffset": 3347, + "charLength": 7, + "snippet": { + "text": "account" + } + }, + "contextRegion": { + "startLine": 91, + "startColumn": 18, + "charOffset": 3274, + "charLength": 7, + "snippet": { + "text": "\n\t// Get premium days, check is premium and get lastday\n\toutput->addByte(account.getPremiumRemainingDays());\n\toutput->addByte(account.getPremiumLastDay() > getTimeNow());\n\toutput->add(account.getPremiumLastDay());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df37bfb296f419949d1342a63e64ba19b4ad9ec9cdf2dbb18f972e28a78202c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocollogin.cpp" + }, + "region": { + "startLine": 94, + "startColumn": 18, + "charOffset": 3400, + "charLength": 7, + "snippet": { + "text": "account" + } + }, + "contextRegion": { + "startLine": 92, + "startColumn": 18, + "charOffset": 3275, + "charLength": 7, + "snippet": { + "text": "\t// Get premium days, check is premium and get lastday\n\toutput->addByte(account.getPremiumRemainingDays());\n\toutput->addByte(account.getPremiumLastDay() > getTimeNow());\n\toutput->add(account.getPremiumLastDay());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80faf59115f74eaa60b74aa4c249d1ddc425ffce4b14c2572543a98bdfa1e0ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocollogin.cpp" + }, + "region": { + "startLine": 95, + "startColumn": 24, + "charOffset": 3468, + "charLength": 7, + "snippet": { + "text": "account" + } + }, + "contextRegion": { + "startLine": 93, + "startColumn": 24, + "charOffset": 3330, + "charLength": 7, + "snippet": { + "text": "\toutput->addByte(account.getPremiumRemainingDays());\n\toutput->addByte(account.getPremiumLastDay() > getTimeNow());\n\toutput->add(account.getPremiumLastDay());\n\n\tsend(output);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c3319f07c8460c5a6bd0e4b03c0c7affe6f822a519445a9539fc300962801d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocollogin.cpp" + }, + "region": { + "startLine": 110, + "startColumn": 2, + "charOffset": 3714, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 108, + "startColumn": 2, + "charOffset": 3680, + "charLength": 8, + "snippet": { + "text": "\tmsg.skipBytes(2); // client OS\n\n\tuint16_t version = msg.get();\n\n\t// Old protocol support" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d080af4112e9b0316f21c66e9b597d9a1d95cb4aa68df01582e93a875de9c7e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocollogin.cpp" + }, + "region": { + "startLine": 113, + "startColumn": 27, + "charOffset": 3806, + "charLength": 4, + "snippet": { + "text": "1100" + } + }, + "contextRegion": { + "startLine": 111, + "startColumn": 27, + "charOffset": 3754, + "charLength": 4, + "snippet": { + "text": "\n\t// Old protocol support\n\toldProtocol = version == 1100;\n\n\tmsg.skipBytes(17);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0f2fa60e443c7b9b6011ef9a2f54a316d126989d3b91b703f9625ab0060c759" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "17 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocollogin.cpp" + }, + "region": { + "startLine": 115, + "startColumn": 16, + "charOffset": 3828, + "charLength": 2, + "snippet": { + "text": "17" + } + }, + "contextRegion": { + "startLine": 113, + "startColumn": 16, + "charOffset": 3780, + "charLength": 2, + "snippet": { + "text": "\toldProtocol = version == 1100;\n\n\tmsg.skipBytes(17);\n\t/*\n\t - Skipped bytes:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1959e68e93a6588b586cef2506ed0e48650871e099c45564a50fb771c5925217" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocollogin.cpp" + }, + "region": { + "startLine": 147, + "startColumn": 6, + "charOffset": 4691, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 145, + "startColumn": 6, + "charOffset": 4629, + "charLength": 1, + "snippet": { + "text": "\tBanInfo banInfo;\n\tauto curConnection = getConnection();\n\tif (!curConnection) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f78aff5722a319e30d01b5c436352735d81e6bd370b2fc688c02c41a7a68a259" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 21, + "startColumn": 1, + "charOffset": 623, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 19, + "startColumn": 1, + "charOffset": 570, + "charLength": 3, + "snippet": { + "text": "#include \"server/network/message/outputmessage.hpp\"\n\nstd::string ProtocolStatus::SERVER_NAME = \"Canary\";\nstd::string ProtocolStatus::SERVER_VERSION = \"3.0\";\nstd::string ProtocolStatus::SERVER_DEVELOPERS = \"OpenTibiaBR Organization\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "797af4e3c743169aba3b69dd54821fac05e52de5241fa00e5f6c4323a80a116a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'SERVER_NAME' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 21, + "startColumn": 29, + "charOffset": 651, + "charLength": 11, + "snippet": { + "text": "SERVER_NAME" + } + }, + "contextRegion": { + "startLine": 19, + "startColumn": 29, + "charOffset": 570, + "charLength": 11, + "snippet": { + "text": "#include \"server/network/message/outputmessage.hpp\"\n\nstd::string ProtocolStatus::SERVER_NAME = \"Canary\";\nstd::string ProtocolStatus::SERVER_VERSION = \"3.0\";\nstd::string ProtocolStatus::SERVER_DEVELOPERS = \"OpenTibiaBR Organization\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c916dc46ec43ce8d1a0fad0f7b0dd6a260fd5db9f74fd844487a9d5e91a79f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 22, + "startColumn": 1, + "charOffset": 675, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 622, + "charLength": 3, + "snippet": { + "text": "\nstd::string ProtocolStatus::SERVER_NAME = \"Canary\";\nstd::string ProtocolStatus::SERVER_VERSION = \"3.0\";\nstd::string ProtocolStatus::SERVER_DEVELOPERS = \"OpenTibiaBR Organization\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b6dcf1a7bb3ae456a8942e30240317fbcab4e5db0a9f229a35b64cba26e2da2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'SERVER_VERSION' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 22, + "startColumn": 29, + "charOffset": 703, + "charLength": 14, + "snippet": { + "text": "SERVER_VERSION" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 29, + "charOffset": 622, + "charLength": 14, + "snippet": { + "text": "\nstd::string ProtocolStatus::SERVER_NAME = \"Canary\";\nstd::string ProtocolStatus::SERVER_VERSION = \"3.0\";\nstd::string ProtocolStatus::SERVER_DEVELOPERS = \"OpenTibiaBR Organization\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "016b03edd7c96c3fc4a5d4217e46ec33a3179aba33407c2b66db554306d02473" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 23, + "startColumn": 1, + "charOffset": 727, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 21, + "startColumn": 1, + "charOffset": 623, + "charLength": 3, + "snippet": { + "text": "std::string ProtocolStatus::SERVER_NAME = \"Canary\";\nstd::string ProtocolStatus::SERVER_VERSION = \"3.0\";\nstd::string ProtocolStatus::SERVER_DEVELOPERS = \"OpenTibiaBR Organization\";\n\nstd::map ProtocolStatus::ipConnectMap;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b376236201e1bbc3f1592593b83200efd54223b7ed26d70e1a12eecd65f416b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'SERVER_DEVELOPERS' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 23, + "startColumn": 29, + "charOffset": 755, + "charLength": 17, + "snippet": { + "text": "SERVER_DEVELOPERS" + } + }, + "contextRegion": { + "startLine": 21, + "startColumn": 29, + "charOffset": 623, + "charLength": 17, + "snippet": { + "text": "std::string ProtocolStatus::SERVER_NAME = \"Canary\";\nstd::string ProtocolStatus::SERVER_VERSION = \"3.0\";\nstd::string ProtocolStatus::SERVER_DEVELOPERS = \"OpenTibiaBR Organization\";\n\nstd::map ProtocolStatus::ipConnectMap;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "029b063a8c8c437f200228bef46683a507a946ccb1f71c12cef0be42ca69572b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 25, + "startColumn": 1, + "charOffset": 804, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 1, + "charOffset": 727, + "charLength": 3, + "snippet": { + "text": "std::string ProtocolStatus::SERVER_DEVELOPERS = \"OpenTibiaBR Organization\";\n\nstd::map ProtocolStatus::ipConnectMap;\nconst uint64_t ProtocolStatus::start = OTSYS_TIME(true);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0165368859492b786fb65277a5cf9f6ef9db9658e8214ca0c7853dd7ed0d9ebd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'start' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 32, + "charOffset": 893, + "charLength": 5, + "snippet": { + "text": "start" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 32, + "charOffset": 803, + "charLength": 5, + "snippet": { + "text": "\nstd::map ProtocolStatus::ipConnectMap;\nconst uint64_t ProtocolStatus::start = OTSYS_TIME(true);\n\nvoid ProtocolStatus::onRecvFirstMessage(NetworkMessage &msg) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f2da5e28c339d25a9bb38d09778b6b70423019de33cbe4d1d0f2e174e49a98d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 30, + "startColumn": 12, + "charOffset": 1018, + "charLength": 10, + "snippet": { + "text": "0x0100007F" + } + }, + "contextRegion": { + "startLine": 28, + "startColumn": 12, + "charOffset": 920, + "charLength": 10, + "snippet": { + "text": "void ProtocolStatus::onRecvFirstMessage(NetworkMessage &msg) {\n\tuint32_t ip = getIP();\n\tif (ip != 0x0100007F) {\n\t\tstd::string ipStr = convertIPToString(ip);\n\t\tif (ipStr != g_configManager().getString(IP, __FUNCTION__)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9785cc3d25135c3b833032a5de999c655ee4cdca827045dbf7f6556e01ae0c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x0100007F is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 30, + "startColumn": 12, + "charOffset": 1018, + "charLength": 10, + "snippet": { + "text": "0x0100007F" + } + }, + "contextRegion": { + "startLine": 28, + "startColumn": 12, + "charOffset": 920, + "charLength": 10, + "snippet": { + "text": "void ProtocolStatus::onRecvFirstMessage(NetworkMessage &msg) {\n\tuint32_t ip = getIP();\n\tif (ip != 0x0100007F) {\n\t\tstd::string ipStr = convertIPToString(ip);\n\t\tif (ipStr != g_configManager().getString(IP, __FUNCTION__)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7bc519288a6502d8917b6c8a5cc6f301a1523afd87d5c794bdae948aa174410" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when declaring iterators" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 4, + "charOffset": 1144, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 4, + "charOffset": 1032, + "charLength": 3, + "snippet": { + "text": "\t\tstd::string ipStr = convertIPToString(ip);\n\t\tif (ipStr != g_configManager().getString(IP, __FUNCTION__)) {\n\t\t\tstd::map::const_iterator it = ipConnectMap.find(ip);\n\t\t\tif (it != ipConnectMap.end() && (OTSYS_TIME() < (it->second + g_configManager().getNumber(STATUSQUERY_TIMEOUT, __FUNCTION__)))) {\n\t\t\t\tdisconnect();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43eee884868da01cb9c3123ebde28e9c3fac077ef4f86d63b31ae7f660b1a3ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 8, + "charOffset": 1483, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 8, + "charOffset": 1427, + "charLength": 4, + "snippet": { + "text": "\tswitch (msg.getByte()) {\n\t\t// XML info protocol\n\t\tcase 0xFF: {\n\t\t\tif (msg.getString(4) == \"info\") {\n\t\t\t\tg_dispatcher().addEvent([self = std::static_pointer_cast(shared_from_this())] {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0300be01fc6f65a82cddd16b76b81e2c10cdedcac3ddcdf552282ed008190998" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 57, + "startColumn": 3, + "charOffset": 1798, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 55, + "startColumn": 3, + "charOffset": 1762, + "charLength": 4, + "snippet": { + "text": "\n\t\t// Another ServerInfo protocol\n\t\tcase 0x01: {\n\t\t\tuint16_t requestedInfo = msg.get(); // only a Byte is necessary, though we could add new info here\n\t\t\tstd::string characterName;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52ec35eab813bcf1c25f2ca3b389d67499520371323fce88b6450c7333ade302" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 58, + "startColumn": 4, + "charOffset": 1814, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 56, + "startColumn": 4, + "charOffset": 1763, + "charLength": 8, + "snippet": { + "text": "\t\t// Another ServerInfo protocol\n\t\tcase 0x01: {\n\t\t\tuint16_t requestedInfo = msg.get(); // only a Byte is necessary, though we could add new info here\n\t\t\tstd::string characterName;\n\t\t\tif (requestedInfo & REQUEST_PLAYER_STATUS_INFO) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a6506e70a8f4a48f760e278c21c8a2f76dd100ec48897fc08a3b269d3979fee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 60, + "startColumn": 8, + "charOffset": 1960, + "charLength": 13, + "snippet": { + "text": "requestedInfo" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 8, + "charOffset": 1811, + "charLength": 13, + "snippet": { + "text": "\t\t\tuint16_t requestedInfo = msg.get(); // only a Byte is necessary, though we could add new info here\n\t\t\tstd::string characterName;\n\t\t\tif (requestedInfo & REQUEST_PLAYER_STATUS_INFO) {\n\t\t\t\tcharacterName = msg.getString();\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7798de09e7e431b812847102c689bcfd42e9034097b3952fc5757486686903c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 60, + "startColumn": 8, + "charOffset": 1960, + "charLength": 13, + "snippet": { + "text": "requestedInfo" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 8, + "charOffset": 1811, + "charLength": 13, + "snippet": { + "text": "\t\t\tuint16_t requestedInfo = msg.get(); // only a Byte is necessary, though we could add new info here\n\t\t\tstd::string characterName;\n\t\t\tif (requestedInfo & REQUEST_PLAYER_STATUS_INFO) {\n\t\t\t\tcharacterName = msg.getString();\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56368a5112923a89aef929845399a39943b46cc30ef013a184f3f3ccbc038dd6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 60, + "startColumn": 22, + "charOffset": 1974, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 22, + "charOffset": 1811, + "charLength": 1, + "snippet": { + "text": "\t\t\tuint16_t requestedInfo = msg.get(); // only a Byte is necessary, though we could add new info here\n\t\t\tstd::string characterName;\n\t\t\tif (requestedInfo & REQUEST_PLAYER_STATUS_INFO) {\n\t\t\t\tcharacterName = msg.getString();\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06fce404a49c2008a06e62448f1254309a4935d68e510e118b92f3e698c456f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 61, + "charOffset": 2820, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 61, + "charOffset": 2697, + "charLength": 4, + "snippet": { + "text": "\n\tpugi::xml_node serverinfo = tsqp.append_child(\"serverinfo\");\n\tuint64_t uptime = (OTSYS_TIME() - ProtocolStatus::start) / 1000;\n\tserverinfo.append_attribute(\"uptime\") = std::to_string(uptime).c_str();\n\tserverinfo.append_attribute(\"ip\") = g_configManager().getString(IP, __FUNCTION__).c_str();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "abd24ba7428478586814915f1ba9ecda1f13a9b7e97d3f06138822e30c43e835" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 109, + "startColumn": 2, + "charOffset": 4069, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 107, + "startColumn": 2, + "charOffset": 4010, + "charLength": 3, + "snippet": { + "text": "\tuint32_t real = 0;\n\tstd::map listIP;\n\tfor (const auto &[key, player] : g_game().getPlayers()) {\n\t\tif (player->getIP() != 0) {\n\t\t\tauto ip = listIP.find(player->getIP());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14dccd5e18ff932031560eb4e1810c0d9ad6188fbd223fd1df960e971cc3c225" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 114, + "startColumn": 35, + "charOffset": 4294, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 112, + "startColumn": 35, + "charOffset": 4200, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (ip != listIP.end()) {\n\t\t\t\tlistIP[player->getIP()]++;\n\t\t\t\tif (listIP[player->getIP()] < 5) {\n\t\t\t\t\treal++;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73990e8f0f14f7197e908801c9cea55230d91ab4e3fa0e9859c93730fc2e9f50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 144, + "startColumn": 2, + "charOffset": 5817, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 142, + "startColumn": 2, + "charOffset": 5718, + "charLength": 8, + "snippet": { + "text": "\tmap.append_attribute(\"author\") = g_configManager().getString(MAP_AUTHOR, __FUNCTION__).c_str();\n\n\tuint32_t mapWidth, mapHeight;\n\tg_game().getMapDimensions(mapWidth, mapHeight);\n\tmap.append_attribute(\"width\") = std::to_string(mapWidth).c_str();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d438b4c4bc0b66d1b3155cac6b53f9f28a5a2980514615b95a78631e6e2b53ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 144, + "startColumn": 2, + "charOffset": 5817, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 142, + "startColumn": 2, + "charOffset": 5718, + "charLength": 8, + "snippet": { + "text": "\tmap.append_attribute(\"author\") = g_configManager().getString(MAP_AUTHOR, __FUNCTION__).c_str();\n\n\tuint32_t mapWidth, mapHeight;\n\tg_game().getMapDimensions(mapWidth, mapHeight);\n\tmap.append_attribute(\"width\") = std::to_string(mapWidth).c_str();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "994497ef6b40f178e44f53d65fc5e3ee608d1c262fa278ce3febe0e1a89a859a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'mapWidth' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 144, + "startColumn": 11, + "charOffset": 5826, + "charLength": 8, + "snippet": { + "text": "mapWidth" + } + }, + "contextRegion": { + "startLine": 142, + "startColumn": 11, + "charOffset": 5718, + "charLength": 8, + "snippet": { + "text": "\tmap.append_attribute(\"author\") = g_configManager().getString(MAP_AUTHOR, __FUNCTION__).c_str();\n\n\tuint32_t mapWidth, mapHeight;\n\tg_game().getMapDimensions(mapWidth, mapHeight);\n\tmap.append_attribute(\"width\") = std::to_string(mapWidth).c_str();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "abe581f2430490ace2e64eb26ae159815e4f30e3b0b9adad11f393b0c603f883" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'mapHeight' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 144, + "startColumn": 21, + "charOffset": 5836, + "charLength": 9, + "snippet": { + "text": "mapHeight" + } + }, + "contextRegion": { + "startLine": 142, + "startColumn": 21, + "charOffset": 5718, + "charLength": 9, + "snippet": { + "text": "\tmap.append_attribute(\"author\") = g_configManager().getString(MAP_AUTHOR, __FUNCTION__).c_str();\n\n\tuint32_t mapWidth, mapHeight;\n\tg_game().getMapDimensions(mapWidth, mapHeight);\n\tmap.append_attribute(\"width\") = std::to_string(mapWidth).c_str();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0e561de2fefc49aa4e5ba8d2d3ee55f87b0df0ed85f5c363080f7708c144e0c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 164, + "startColumn": 6, + "charOffset": 6484, + "charLength": 13, + "snippet": { + "text": "requestedInfo" + } + }, + "contextRegion": { + "startLine": 162, + "startColumn": 6, + "charOffset": 6424, + "charLength": 13, + "snippet": { + "text": "\tauto output = OutputMessagePool::getOutputMessage();\n\n\tif (requestedInfo & REQUEST_BASIC_SERVER_INFO) {\n\t\toutput->addByte(0x10);\n\t\toutput->addString(g_configManager().getString(ConfigKey_t::SERVER_NAME, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(stringConfig_t::SERVER_NAME)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4394e5fcb9a5e53ea7dbd51a65af56ff72c9aa1d65b369bdaea560d04a98b71b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 164, + "startColumn": 6, + "charOffset": 6484, + "charLength": 13, + "snippet": { + "text": "requestedInfo" + } + }, + "contextRegion": { + "startLine": 162, + "startColumn": 6, + "charOffset": 6424, + "charLength": 13, + "snippet": { + "text": "\tauto output = OutputMessagePool::getOutputMessage();\n\n\tif (requestedInfo & REQUEST_BASIC_SERVER_INFO) {\n\t\toutput->addByte(0x10);\n\t\toutput->addString(g_configManager().getString(ConfigKey_t::SERVER_NAME, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(stringConfig_t::SERVER_NAME)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9dc39acdeea05f05be160fb39a1527c3ebb80a7c9d5ebe353ee75119bff10ed0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 164, + "startColumn": 20, + "charOffset": 6498, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 162, + "startColumn": 20, + "charOffset": 6424, + "charLength": 1, + "snippet": { + "text": "\tauto output = OutputMessagePool::getOutputMessage();\n\n\tif (requestedInfo & REQUEST_BASIC_SERVER_INFO) {\n\t\toutput->addByte(0x10);\n\t\toutput->addString(g_configManager().getString(ConfigKey_t::SERVER_NAME, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(stringConfig_t::SERVER_NAME)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "562454f7acce272ebc13e6a828c9d43bb4b45f9bd8c2d8305f20bfb47f463131" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 165, + "startColumn": 19, + "charOffset": 6547, + "charLength": 4, + "snippet": { + "text": "0x10" + } + }, + "contextRegion": { + "startLine": 163, + "startColumn": 19, + "charOffset": 6478, + "charLength": 4, + "snippet": { + "text": "\n\tif (requestedInfo & REQUEST_BASIC_SERVER_INFO) {\n\t\toutput->addByte(0x10);\n\t\toutput->addString(g_configManager().getString(ConfigKey_t::SERVER_NAME, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(stringConfig_t::SERVER_NAME)\");\n\t\toutput->addString(g_configManager().getString(IP, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(IP)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7bdd7f3a4fbc7df27ca48545e349498574866539973b1e9812ba91eede78e133" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 165, + "startColumn": 19, + "charOffset": 6547, + "charLength": 4, + "snippet": { + "text": "0x10" + } + }, + "contextRegion": { + "startLine": 163, + "startColumn": 19, + "charOffset": 6478, + "charLength": 4, + "snippet": { + "text": "\n\tif (requestedInfo & REQUEST_BASIC_SERVER_INFO) {\n\t\toutput->addByte(0x10);\n\t\toutput->addString(g_configManager().getString(ConfigKey_t::SERVER_NAME, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(stringConfig_t::SERVER_NAME)\");\n\t\toutput->addString(g_configManager().getString(IP, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(IP)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3bf0a33ee66efaff188105f76180ae8ff2e9f126414c5fe5923b7ce90ca1450" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 171, + "startColumn": 6, + "charOffset": 7048, + "charLength": 13, + "snippet": { + "text": "requestedInfo" + } + }, + "contextRegion": { + "startLine": 169, + "startColumn": 6, + "charOffset": 7039, + "charLength": 13, + "snippet": { + "text": "\t}\n\n\tif (requestedInfo & REQUEST_OWNER_SERVER_INFO) {\n\t\toutput->addByte(0x11);\n\t\toutput->addString(g_configManager().getString(OWNER_NAME, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(OWNER_NAME)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75efef3974bbc34e9a9bb854c1d29bbb85efcd1659f9e283228f4f450d76d520" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 171, + "startColumn": 6, + "charOffset": 7048, + "charLength": 13, + "snippet": { + "text": "requestedInfo" + } + }, + "contextRegion": { + "startLine": 169, + "startColumn": 6, + "charOffset": 7039, + "charLength": 13, + "snippet": { + "text": "\t}\n\n\tif (requestedInfo & REQUEST_OWNER_SERVER_INFO) {\n\t\toutput->addByte(0x11);\n\t\toutput->addString(g_configManager().getString(OWNER_NAME, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(OWNER_NAME)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32cd525421b7ac943a0cac1ca6e9d7ec1777e66bbe23c21dbfee5ba0868f83b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 171, + "startColumn": 20, + "charOffset": 7062, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 169, + "startColumn": 20, + "charOffset": 7039, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (requestedInfo & REQUEST_OWNER_SERVER_INFO) {\n\t\toutput->addByte(0x11);\n\t\toutput->addString(g_configManager().getString(OWNER_NAME, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(OWNER_NAME)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5106325c05a56628840c201914bd1841a1f8dd8bd50e56884f06500c15875d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 19, + "charOffset": 7111, + "charLength": 4, + "snippet": { + "text": "0x11" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 19, + "charOffset": 7042, + "charLength": 4, + "snippet": { + "text": "\n\tif (requestedInfo & REQUEST_OWNER_SERVER_INFO) {\n\t\toutput->addByte(0x11);\n\t\toutput->addString(g_configManager().getString(OWNER_NAME, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(OWNER_NAME)\");\n\t\toutput->addString(g_configManager().getString(OWNER_EMAIL, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(OWNER_EMAIL)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f049a9607d4863767614dd49cb4ebffd715b86cd3fe57d5c357226d32b385dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x11 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 19, + "charOffset": 7111, + "charLength": 4, + "snippet": { + "text": "0x11" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 19, + "charOffset": 7042, + "charLength": 4, + "snippet": { + "text": "\n\tif (requestedInfo & REQUEST_OWNER_SERVER_INFO) {\n\t\toutput->addByte(0x11);\n\t\toutput->addString(g_configManager().getString(OWNER_NAME, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(OWNER_NAME)\");\n\t\toutput->addString(g_configManager().getString(OWNER_EMAIL, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(OWNER_EMAIL)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4732d3efad8bea78c2515efddeb0b27fd73795e36e7ef61a19b4a7841ace949c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 177, + "startColumn": 6, + "charOffset": 7421, + "charLength": 13, + "snippet": { + "text": "requestedInfo" + } + }, + "contextRegion": { + "startLine": 175, + "startColumn": 6, + "charOffset": 7412, + "charLength": 13, + "snippet": { + "text": "\t}\n\n\tif (requestedInfo & REQUEST_MISC_SERVER_INFO) {\n\t\toutput->addByte(0x12);\n\t\toutput->addString(g_configManager().getString(SERVER_MOTD, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(SERVER_MOTD)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7beb1339035b85a27688e858a28c4b912e8e696c955c2c7148bf2da63d46a9e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 177, + "startColumn": 6, + "charOffset": 7421, + "charLength": 13, + "snippet": { + "text": "requestedInfo" + } + }, + "contextRegion": { + "startLine": 175, + "startColumn": 6, + "charOffset": 7412, + "charLength": 13, + "snippet": { + "text": "\t}\n\n\tif (requestedInfo & REQUEST_MISC_SERVER_INFO) {\n\t\toutput->addByte(0x12);\n\t\toutput->addString(g_configManager().getString(SERVER_MOTD, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(SERVER_MOTD)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee1d61b94e234a8e268d0d090e35de0f538ca9f0f502edc0e82bc90464ad5d8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 177, + "startColumn": 20, + "charOffset": 7435, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 175, + "startColumn": 20, + "charOffset": 7412, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (requestedInfo & REQUEST_MISC_SERVER_INFO) {\n\t\toutput->addByte(0x12);\n\t\toutput->addString(g_configManager().getString(SERVER_MOTD, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(SERVER_MOTD)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c9d3f96f2cbfe821b79fc6355305de132fbba66e88417644997bafe73fa486b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 178, + "startColumn": 19, + "charOffset": 7483, + "charLength": 4, + "snippet": { + "text": "0x12" + } + }, + "contextRegion": { + "startLine": 176, + "startColumn": 19, + "charOffset": 7415, + "charLength": 4, + "snippet": { + "text": "\n\tif (requestedInfo & REQUEST_MISC_SERVER_INFO) {\n\t\toutput->addByte(0x12);\n\t\toutput->addString(g_configManager().getString(SERVER_MOTD, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(SERVER_MOTD)\");\n\t\toutput->addString(g_configManager().getString(LOCATION, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(LOCATION)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e97d15d25cc38e8ad7636dbd80423673cdf9eec37f880eac621f5a170ae6020c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x12 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 178, + "startColumn": 19, + "charOffset": 7483, + "charLength": 4, + "snippet": { + "text": "0x12" + } + }, + "contextRegion": { + "startLine": 176, + "startColumn": 19, + "charOffset": 7415, + "charLength": 4, + "snippet": { + "text": "\n\tif (requestedInfo & REQUEST_MISC_SERVER_INFO) {\n\t\toutput->addByte(0x12);\n\t\toutput->addString(g_configManager().getString(SERVER_MOTD, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(SERVER_MOTD)\");\n\t\toutput->addString(g_configManager().getString(LOCATION, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(LOCATION)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3dcb6d3389f01bd4deca141bccc93d9e6f54e5b9cb3bcc2268d871aec877b314" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 182, + "startColumn": 66, + "charOffset": 7977, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 180, + "startColumn": 66, + "charOffset": 7638, + "charLength": 4, + "snippet": { + "text": "\t\toutput->addString(g_configManager().getString(LOCATION, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(LOCATION)\");\n\t\toutput->addString(g_configManager().getString(URL, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(URL)\");\n\t\toutput->add((OTSYS_TIME() - ProtocolStatus::start) / 1000);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9cbf651d49929f5e4e6b776b37f3a509a600ed552bd14196607ebfbf8cc85dc3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 185, + "startColumn": 6, + "charOffset": 7993, + "charLength": 13, + "snippet": { + "text": "requestedInfo" + } + }, + "contextRegion": { + "startLine": 183, + "startColumn": 6, + "charOffset": 7984, + "charLength": 13, + "snippet": { + "text": "\t}\n\n\tif (requestedInfo & REQUEST_PLAYERS_INFO) {\n\t\toutput->addByte(0x20);\n\t\toutput->add(static_cast(g_game().getPlayersOnline()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06108fd1c03913f8b11d048d6cb9ef70259cc4bdfa80a008ca6b3ea1874c104a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 185, + "startColumn": 6, + "charOffset": 7993, + "charLength": 13, + "snippet": { + "text": "requestedInfo" + } + }, + "contextRegion": { + "startLine": 183, + "startColumn": 6, + "charOffset": 7984, + "charLength": 13, + "snippet": { + "text": "\t}\n\n\tif (requestedInfo & REQUEST_PLAYERS_INFO) {\n\t\toutput->addByte(0x20);\n\t\toutput->add(static_cast(g_game().getPlayersOnline()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5910e2f50a1f63d3870509a4b2f2f8108bac13f75af917f313804068e11c5d55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 185, + "startColumn": 20, + "charOffset": 8007, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 183, + "startColumn": 20, + "charOffset": 7984, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (requestedInfo & REQUEST_PLAYERS_INFO) {\n\t\toutput->addByte(0x20);\n\t\toutput->add(static_cast(g_game().getPlayersOnline()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f3443431f0efed3f29fd2e1dd02b3fcf35b58d4cf01f003ad8762569f470d0a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 186, + "startColumn": 19, + "charOffset": 8051, + "charLength": 4, + "snippet": { + "text": "0x20" + } + }, + "contextRegion": { + "startLine": 184, + "startColumn": 19, + "charOffset": 7987, + "charLength": 4, + "snippet": { + "text": "\n\tif (requestedInfo & REQUEST_PLAYERS_INFO) {\n\t\toutput->addByte(0x20);\n\t\toutput->add(static_cast(g_game().getPlayersOnline()));\n\t\toutput->add(g_configManager().getNumber(MAX_PLAYERS, __FUNCTION__));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b8cbe2b13a2087e2c6ff05f1b778405110103e3789de2a5c3e9264566a68e69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 186, + "startColumn": 19, + "charOffset": 8051, + "charLength": 4, + "snippet": { + "text": "0x20" + } + }, + "contextRegion": { + "startLine": 184, + "startColumn": 19, + "charOffset": 7987, + "charLength": 4, + "snippet": { + "text": "\n\tif (requestedInfo & REQUEST_PLAYERS_INFO) {\n\t\toutput->addByte(0x20);\n\t\toutput->add(static_cast(g_game().getPlayersOnline()));\n\t\toutput->add(g_configManager().getNumber(MAX_PLAYERS, __FUNCTION__));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46e786b1891f2b677049ea99fa2b8cbc2fc2d406266eed76ce84c41bb2b84013" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 192, + "startColumn": 6, + "charOffset": 8279, + "charLength": 13, + "snippet": { + "text": "requestedInfo" + } + }, + "contextRegion": { + "startLine": 190, + "startColumn": 6, + "charOffset": 8270, + "charLength": 13, + "snippet": { + "text": "\t}\n\n\tif (requestedInfo & REQUEST_MAP_INFO) {\n\t\toutput->addByte(0x30);\n\t\toutput->addString(g_configManager().getString(MAP_NAME, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(MAP_NAME)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22e1895b9aa32e85e99edebe8e42fe899312fbf0492adb8660f590766307cbcf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 192, + "startColumn": 6, + "charOffset": 8279, + "charLength": 13, + "snippet": { + "text": "requestedInfo" + } + }, + "contextRegion": { + "startLine": 190, + "startColumn": 6, + "charOffset": 8270, + "charLength": 13, + "snippet": { + "text": "\t}\n\n\tif (requestedInfo & REQUEST_MAP_INFO) {\n\t\toutput->addByte(0x30);\n\t\toutput->addString(g_configManager().getString(MAP_NAME, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(MAP_NAME)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c45986d694b16988ce3c2e33e7df59d43a53506220d927b3e950b7a8a8b0d52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 192, + "startColumn": 20, + "charOffset": 8293, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 190, + "startColumn": 20, + "charOffset": 8270, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (requestedInfo & REQUEST_MAP_INFO) {\n\t\toutput->addByte(0x30);\n\t\toutput->addString(g_configManager().getString(MAP_NAME, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(MAP_NAME)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a1ec0bb84362c3ebaa292f770bfc7f87ec9e03afe289b5b0d11cce0cccd507f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 193, + "startColumn": 19, + "charOffset": 8333, + "charLength": 4, + "snippet": { + "text": "0x30" + } + }, + "contextRegion": { + "startLine": 191, + "startColumn": 19, + "charOffset": 8273, + "charLength": 4, + "snippet": { + "text": "\n\tif (requestedInfo & REQUEST_MAP_INFO) {\n\t\toutput->addByte(0x30);\n\t\toutput->addString(g_configManager().getString(MAP_NAME, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(MAP_NAME)\");\n\t\toutput->addString(g_configManager().getString(MAP_AUTHOR, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(MAP_AUTHOR)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98b5406702251ee535580dda6f96e8ab7aabea2cd63892100fb26fdc25776b13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 193, + "startColumn": 19, + "charOffset": 8333, + "charLength": 4, + "snippet": { + "text": "0x30" + } + }, + "contextRegion": { + "startLine": 191, + "startColumn": 19, + "charOffset": 8273, + "charLength": 4, + "snippet": { + "text": "\n\tif (requestedInfo & REQUEST_MAP_INFO) {\n\t\toutput->addByte(0x30);\n\t\toutput->addString(g_configManager().getString(MAP_NAME, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(MAP_NAME)\");\n\t\toutput->addString(g_configManager().getString(MAP_AUTHOR, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(MAP_AUTHOR)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0116f1c0077c5434578772738bf95376d7b287acdeacbdc573d6936984c3cc65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 196, + "startColumn": 3, + "charOffset": 8630, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 194, + "startColumn": 3, + "charOffset": 8340, + "charLength": 8, + "snippet": { + "text": "\t\toutput->addString(g_configManager().getString(MAP_NAME, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(MAP_NAME)\");\n\t\toutput->addString(g_configManager().getString(MAP_AUTHOR, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(MAP_AUTHOR)\");\n\t\tuint32_t mapWidth, mapHeight;\n\t\tg_game().getMapDimensions(mapWidth, mapHeight);\n\t\toutput->add(mapWidth);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c28ca582e3f2a34005e7fb0f00a2ab4de7754e7c5badcd9179d1c503584cef9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 196, + "startColumn": 3, + "charOffset": 8630, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 194, + "startColumn": 3, + "charOffset": 8340, + "charLength": 8, + "snippet": { + "text": "\t\toutput->addString(g_configManager().getString(MAP_NAME, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(MAP_NAME)\");\n\t\toutput->addString(g_configManager().getString(MAP_AUTHOR, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(MAP_AUTHOR)\");\n\t\tuint32_t mapWidth, mapHeight;\n\t\tg_game().getMapDimensions(mapWidth, mapHeight);\n\t\toutput->add(mapWidth);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56b0bc50c12ae8dd6b374541fd5f7b45b45264c3681d57d4645df8bf5eedfa7f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'mapWidth' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 196, + "startColumn": 12, + "charOffset": 8639, + "charLength": 8, + "snippet": { + "text": "mapWidth" + } + }, + "contextRegion": { + "startLine": 194, + "startColumn": 12, + "charOffset": 8340, + "charLength": 8, + "snippet": { + "text": "\t\toutput->addString(g_configManager().getString(MAP_NAME, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(MAP_NAME)\");\n\t\toutput->addString(g_configManager().getString(MAP_AUTHOR, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(MAP_AUTHOR)\");\n\t\tuint32_t mapWidth, mapHeight;\n\t\tg_game().getMapDimensions(mapWidth, mapHeight);\n\t\toutput->add(mapWidth);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6651b56520dba0642a4b87cc9de85bf6e5940d4ff8e535df8271267985eedd83" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'mapHeight' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 196, + "startColumn": 22, + "charOffset": 8649, + "charLength": 9, + "snippet": { + "text": "mapHeight" + } + }, + "contextRegion": { + "startLine": 194, + "startColumn": 22, + "charOffset": 8340, + "charLength": 9, + "snippet": { + "text": "\t\toutput->addString(g_configManager().getString(MAP_NAME, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(MAP_NAME)\");\n\t\toutput->addString(g_configManager().getString(MAP_AUTHOR, __FUNCTION__), \"ProtocolStatus::sendInfo - g_configManager().getString(MAP_AUTHOR)\");\n\t\tuint32_t mapWidth, mapHeight;\n\t\tg_game().getMapDimensions(mapWidth, mapHeight);\n\t\toutput->add(mapWidth);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4db07d7841969eb7e5e14900cb587e6da34172a5b2dcc45e0e8ce87ce7deb66b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 198, + "startColumn": 25, + "charOffset": 8734, + "charLength": 8, + "snippet": { + "text": "mapWidth" + } + }, + "contextRegion": { + "startLine": 196, + "startColumn": 25, + "charOffset": 8628, + "charLength": 8, + "snippet": { + "text": "\t\tuint32_t mapWidth, mapHeight;\n\t\tg_game().getMapDimensions(mapWidth, mapHeight);\n\t\toutput->add(mapWidth);\n\t\toutput->add(mapHeight);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7bb49fc7b4e526884ac909fdf8cc13de78a7a7c3251b83c949d68a290257fae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 199, + "startColumn": 25, + "charOffset": 8769, + "charLength": 9, + "snippet": { + "text": "mapHeight" + } + }, + "contextRegion": { + "startLine": 197, + "startColumn": 25, + "charOffset": 8660, + "charLength": 9, + "snippet": { + "text": "\t\tg_game().getMapDimensions(mapWidth, mapHeight);\n\t\toutput->add(mapWidth);\n\t\toutput->add(mapHeight);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "617fec5e0a1498f629eafe4986b01cd928b5e5241c7da8f861acfeb2b815af85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 202, + "startColumn": 6, + "charOffset": 8790, + "charLength": 13, + "snippet": { + "text": "requestedInfo" + } + }, + "contextRegion": { + "startLine": 200, + "startColumn": 6, + "charOffset": 8781, + "charLength": 13, + "snippet": { + "text": "\t}\n\n\tif (requestedInfo & REQUEST_EXT_PLAYERS_INFO) {\n\t\toutput->addByte(0x21); // players info - online players list\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d66e29dabebff95f7e87b9053a829709e20bf33916311b27d736ab63192e2a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 202, + "startColumn": 6, + "charOffset": 8790, + "charLength": 13, + "snippet": { + "text": "requestedInfo" + } + }, + "contextRegion": { + "startLine": 200, + "startColumn": 6, + "charOffset": 8781, + "charLength": 13, + "snippet": { + "text": "\t}\n\n\tif (requestedInfo & REQUEST_EXT_PLAYERS_INFO) {\n\t\toutput->addByte(0x21); // players info - online players list\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "236e0e9e19322a0ce3072ea08578556b30dff599868a95a3886939645294d00b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 202, + "startColumn": 20, + "charOffset": 8804, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 200, + "startColumn": 20, + "charOffset": 8781, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (requestedInfo & REQUEST_EXT_PLAYERS_INFO) {\n\t\toutput->addByte(0x21); // players info - online players list\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48b6ea6e91211c30b3532bc69d8acc15ceaddbe94c6fb7f13a8fe022c9c7b105" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 203, + "startColumn": 19, + "charOffset": 8852, + "charLength": 4, + "snippet": { + "text": "0x21" + } + }, + "contextRegion": { + "startLine": 201, + "startColumn": 19, + "charOffset": 8784, + "charLength": 4, + "snippet": { + "text": "\n\tif (requestedInfo & REQUEST_EXT_PLAYERS_INFO) {\n\t\toutput->addByte(0x21); // players info - online players list\n\n\t\tconst auto players = g_game().getPlayers();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d4c67a8b76c60eec4e4001ad58a8a273895de46e327661ed1ec8a265b4d56ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x21 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 203, + "startColumn": 19, + "charOffset": 8852, + "charLength": 4, + "snippet": { + "text": "0x21" + } + }, + "contextRegion": { + "startLine": 201, + "startColumn": 19, + "charOffset": 8784, + "charLength": 4, + "snippet": { + "text": "\n\tif (requestedInfo & REQUEST_EXT_PLAYERS_INFO) {\n\t\toutput->addByte(0x21); // players info - online players list\n\n\t\tconst auto players = g_game().getPlayers();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eba9617b1f0b49cef9a729e7eba06a98b7fd4dd1a3fcc444b2a1a5d03197278c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 206, + "startColumn": 25, + "charOffset": 8968, + "charLength": 7, + "snippet": { + "text": "players" + } + }, + "contextRegion": { + "startLine": 204, + "startColumn": 25, + "charOffset": 8897, + "charLength": 7, + "snippet": { + "text": "\n\t\tconst auto players = g_game().getPlayers();\n\t\toutput->add(players.size());\n\t\tfor (const auto &it : players) {\n\t\t\toutput->addString(it.second->getName(), \"ProtocolStatus::sendInfo - it.second->getName()\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cad92a16e257c56808721e29ecc10a3afb3ad91dbc90cefaa4dff803004bb692" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 207, + "startColumn": 3, + "charOffset": 8987, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 205, + "startColumn": 3, + "charOffset": 8898, + "charLength": 3, + "snippet": { + "text": "\t\tconst auto players = g_game().getPlayers();\n\t\toutput->add(players.size());\n\t\tfor (const auto &it : players) {\n\t\t\toutput->addString(it.second->getName(), \"ProtocolStatus::sendInfo - it.second->getName()\");\n\t\t\toutput->add(it.second->getLevel());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85c95e64c32dfe6f9db854da3121c99f7b68bf81d35a7e0e9aff45b271460300" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 213, + "startColumn": 6, + "charOffset": 9177, + "charLength": 13, + "snippet": { + "text": "requestedInfo" + } + }, + "contextRegion": { + "startLine": 211, + "startColumn": 6, + "charOffset": 9168, + "charLength": 13, + "snippet": { + "text": "\t}\n\n\tif (requestedInfo & REQUEST_PLAYER_STATUS_INFO) {\n\t\toutput->addByte(0x22); // players info - online status info of a player\n\t\tif (g_game().getPlayerByName(characterName) != nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7cdcd0b67add7a43a9689b0cb3da9296c44682b48f6adf540ac46b17e2e5eeb6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 213, + "startColumn": 6, + "charOffset": 9177, + "charLength": 13, + "snippet": { + "text": "requestedInfo" + } + }, + "contextRegion": { + "startLine": 211, + "startColumn": 6, + "charOffset": 9168, + "charLength": 13, + "snippet": { + "text": "\t}\n\n\tif (requestedInfo & REQUEST_PLAYER_STATUS_INFO) {\n\t\toutput->addByte(0x22); // players info - online status info of a player\n\t\tif (g_game().getPlayerByName(characterName) != nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9dd622c41bcb01af1298e5e9d4b62b53a9cf9b65e5484cd549045e91d8faf397" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 213, + "startColumn": 20, + "charOffset": 9191, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 211, + "startColumn": 20, + "charOffset": 9168, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (requestedInfo & REQUEST_PLAYER_STATUS_INFO) {\n\t\toutput->addByte(0x22); // players info - online status info of a player\n\t\tif (g_game().getPlayerByName(characterName) != nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5fb241f1ea28d8bf86c9e247a7b92dc6c4d503cd8c8442706f66bf08e01f198" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 214, + "startColumn": 19, + "charOffset": 9241, + "charLength": 4, + "snippet": { + "text": "0x22" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 19, + "charOffset": 9171, + "charLength": 4, + "snippet": { + "text": "\n\tif (requestedInfo & REQUEST_PLAYER_STATUS_INFO) {\n\t\toutput->addByte(0x22); // players info - online status info of a player\n\t\tif (g_game().getPlayerByName(characterName) != nullptr) {\n\t\t\toutput->addByte(0x01);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a50d8ceac97315b7462732efb9ad94625ed523918d7d1084b31f6bd5d348d56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x22 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 214, + "startColumn": 19, + "charOffset": 9241, + "charLength": 4, + "snippet": { + "text": "0x22" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 19, + "charOffset": 9171, + "charLength": 4, + "snippet": { + "text": "\n\tif (requestedInfo & REQUEST_PLAYER_STATUS_INFO) {\n\t\toutput->addByte(0x22); // players info - online status info of a player\n\t\tif (g_game().getPlayerByName(characterName) != nullptr) {\n\t\t\toutput->addByte(0x01);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a83bdafff49100c421668442402a13232cf4ca100d4a153d23a9ea9fe4827426" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 216, + "startColumn": 20, + "charOffset": 9376, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 214, + "startColumn": 20, + "charOffset": 9223, + "charLength": 4, + "snippet": { + "text": "\t\toutput->addByte(0x22); // players info - online status info of a player\n\t\tif (g_game().getPlayerByName(characterName) != nullptr) {\n\t\t\toutput->addByte(0x01);\n\t\t} else {\n\t\t\toutput->addByte(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "641173f4366a1b4634f659fa28995cc69fbaa6e39d2ac3adae5206e095c56ce4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 218, + "startColumn": 20, + "charOffset": 9413, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 216, + "startColumn": 20, + "charOffset": 9357, + "charLength": 4, + "snippet": { + "text": "\t\t\toutput->addByte(0x01);\n\t\t} else {\n\t\t\toutput->addByte(0x00);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "307b54939c55e4b6ad0f4052deffc77401d383c339a5c4679b2c8ec08f7586ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 222, + "startColumn": 6, + "charOffset": 9433, + "charLength": 13, + "snippet": { + "text": "requestedInfo" + } + }, + "contextRegion": { + "startLine": 220, + "startColumn": 6, + "charOffset": 9424, + "charLength": 13, + "snippet": { + "text": "\t}\n\n\tif (requestedInfo & REQUEST_SERVER_SOFTWARE_INFO) {\n\t\toutput->addByte(0x23); // server software info\n\t\toutput->addString(ProtocolStatus::SERVER_NAME, \"ProtocolStatus::sendInfo - ProtocolStatus::SERVER_NAME\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7cdcd0b67add7a43a9689b0cb3da9296c44682b48f6adf540ac46b17e2e5eeb6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 222, + "startColumn": 6, + "charOffset": 9433, + "charLength": 13, + "snippet": { + "text": "requestedInfo" + } + }, + "contextRegion": { + "startLine": 220, + "startColumn": 6, + "charOffset": 9424, + "charLength": 13, + "snippet": { + "text": "\t}\n\n\tif (requestedInfo & REQUEST_SERVER_SOFTWARE_INFO) {\n\t\toutput->addByte(0x23); // server software info\n\t\toutput->addString(ProtocolStatus::SERVER_NAME, \"ProtocolStatus::sendInfo - ProtocolStatus::SERVER_NAME\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9dd622c41bcb01af1298e5e9d4b62b53a9cf9b65e5484cd549045e91d8faf397" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 222, + "startColumn": 20, + "charOffset": 9447, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 220, + "startColumn": 20, + "charOffset": 9424, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (requestedInfo & REQUEST_SERVER_SOFTWARE_INFO) {\n\t\toutput->addByte(0x23); // server software info\n\t\toutput->addString(ProtocolStatus::SERVER_NAME, \"ProtocolStatus::sendInfo - ProtocolStatus::SERVER_NAME\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5fb241f1ea28d8bf86c9e247a7b92dc6c4d503cd8c8442706f66bf08e01f198" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 223, + "startColumn": 19, + "charOffset": 9499, + "charLength": 4, + "snippet": { + "text": "0x23" + } + }, + "contextRegion": { + "startLine": 221, + "startColumn": 19, + "charOffset": 9427, + "charLength": 4, + "snippet": { + "text": "\n\tif (requestedInfo & REQUEST_SERVER_SOFTWARE_INFO) {\n\t\toutput->addByte(0x23); // server software info\n\t\toutput->addString(ProtocolStatus::SERVER_NAME, \"ProtocolStatus::sendInfo - ProtocolStatus::SERVER_NAME\");\n\t\toutput->addString(ProtocolStatus::SERVER_VERSION, \"ProtocolStatus::sendInfo - ProtocolStatus::SERVER_VERSION)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93529eff75913a85271c4f39448e9f9eecbfc6c2323310e397433d443b5f0945" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x23 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/protocol/protocolstatus.cpp" + }, + "region": { + "startLine": 223, + "startColumn": 19, + "charOffset": 9499, + "charLength": 4, + "snippet": { + "text": "0x23" + } + }, + "contextRegion": { + "startLine": 221, + "startColumn": 19, + "charOffset": 9427, + "charLength": 4, + "snippet": { + "text": "\n\tif (requestedInfo & REQUEST_SERVER_SOFTWARE_INFO) {\n\t\toutput->addByte(0x23); // server software info\n\t\toutput->addString(ProtocolStatus::SERVER_NAME, \"ProtocolStatus::sendInfo - ProtocolStatus::SERVER_NAME\");\n\t\toutput->addString(ProtocolStatus::SERVER_VERSION, \"ProtocolStatus::sendInfo - ProtocolStatus::SERVER_VERSION)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "088d9f4d8e203dabf895dc6579eed05c55159505fe0e7e2462cd26f12e7b67c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-nullptr", + "ruleIndex": 577, + "kind": "fail", + "level": "warning", + "message": { + "text": "use nullptr" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 17, + "charOffset": 938, + "charLength": 4, + "snippet": { + "text": "NULL" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 17, + "charOffset": 854, + "charLength": 4, + "snippet": { + "text": "\theaders = curl_slist_append(headers, \"accept: application/json\");\n\n\tif (headers == NULL) {\n\t\tg_logger().error(\"Failed to init curl, appending request headers failed\");\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aaa9c0bf7201671fdc5e1fc399cccf136871608649b338ae2cf52f8e2f4a3e4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 17, + "charOffset": 1202, + "charLength": 13, + "snippet": { + "text": "scheduleEvent" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 17, + "charOffset": 1112, + "charLength": 13, + "snippet": { + "text": "void Webhook::run() {\n\tthreadPool.detach_task([this] { sendWebhook(); });\n\tg_dispatcher().scheduleEvent(\n\t\tg_configManager().getNumber(DISCORD_WEBHOOK_DELAY_MS, __FUNCTION__), [this] { run(); }, \"Webhook::run\"\n\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb9973f8cb1ec9faa93072c510c6884ea3b37864b871884fcac1799873d7f938" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'url' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp" + }, + "region": { + "startLine": 47, + "startColumn": 67, + "charOffset": 1395, + "charLength": 3, + "snippet": { + "text": "url" + } + }, + "contextRegion": { + "startLine": 45, + "startColumn": 67, + "charOffset": 1326, + "charLength": 3, + "snippet": { + "text": "}\n\nvoid Webhook::sendPayload(const std::string &payload, std::string url) {\n\tstd::scoped_lock lock { taskLock };\n\twebhooks.push_back(std::make_shared(payload, url));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1c4dd31e34099cdce5d4bbe57889c0c5ddaed430d65eaad38cb0f3b80ef6339" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'sendRequest' of similar type ('const char *') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 26, + "charOffset": 2165, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 26, + "charOffset": 2137, + "charLength": 5, + "snippet": { + "text": "}\n\nint Webhook::sendRequest(const char* url, const char* payload, std::string* response_body) const {\n\tCURL* curl = curl_easy_init();\n\tif (!curl) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ced2fba814859934bdafc0cf7cc8d7badaf3429623578281c8ba26d1b83e4e55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 6, + "charOffset": 2276, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 6, + "charOffset": 2140, + "charLength": 1, + "snippet": { + "text": "int Webhook::sendRequest(const char* url, const char* payload, std::string* response_body) const {\n\tCURL* curl = curl_easy_init();\n\tif (!curl) {\n\t\tg_logger().error(\"Failed to send webhook message; curl_easy_init failed\");\n\t\treturn -1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21fcef82e7e375dad7b0ef37bb82486fd2f00f0c9ce060d8bd62e1a73ecaab0f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'CURL *' (aka 'void *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 7, + "charOffset": 2277, + "charLength": 4, + "snippet": { + "text": "curl" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 7, + "charOffset": 2140, + "charLength": 4, + "snippet": { + "text": "int Webhook::sendRequest(const char* url, const char* payload, std::string* response_body) const {\n\tCURL* curl = curl_easy_init();\n\tif (!curl) {\n\t\tg_logger().error(\"Failed to send webhook message; curl_easy_init failed\");\n\t\treturn -1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64855e62849c022d4a3379f5700f13f097d39f13aa980ef932c0b88cf8e90e7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-reinterpret-cast", + "ruleIndex": 511, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use reinterpret_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp" + }, + "region": { + "startLine": 88, + "startColumn": 44, + "charOffset": 2705, + "charLength": 16, + "snippet": { + "text": "reinterpret_cast" + } + }, + "contextRegion": { + "startLine": 86, + "startColumn": 44, + "charOffset": 2535, + "charLength": 16, + "snippet": { + "text": "\tcurl_easy_setopt(curl, CURLOPT_POSTFIELDS, payload);\n\tcurl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &Webhook::writeCallback);\n\tcurl_easy_setopt(curl, CURLOPT_WRITEDATA, reinterpret_cast(response_body));\n\tcurl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);\n\tcurl_easy_setopt(curl, CURLOPT_USERAGENT, \"canary (https://github.com/opentibiabr/canary)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "365dea862b85bc635ac47e5a064cb41d4c054c566b6abf475258db32e10a7ff9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'response_code' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp" + }, + "region": { + "startLine": 101, + "startColumn": 6, + "charOffset": 3109, + "charLength": 13, + "snippet": { + "text": "response_code" + } + }, + "contextRegion": { + "startLine": 99, + "startColumn": 6, + "charOffset": 3100, + "charLength": 13, + "snippet": { + "text": "\t}\n\n\tint response_code;\n\n\tcurl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response_code);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b06c9426e423cbd804fb8257284b6b8046da5cce39e6f5a23902a053c67d6a74" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-8", + "ruleIndex": 440, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-8: An object with integer type or pointer to void type shall not be converted to an object with pointer type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 14, + "charOffset": 3379, + "charLength": 16, + "snippet": { + "text": "reinterpret_cast" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 14, + "charOffset": 3244, + "charLength": 16, + "snippet": { + "text": "size_t Webhook::writeCallback(void* contents, size_t size, size_t nmemb, void* userp) {\n\tsize_t real_size = size * nmemb;\n\tauto* str = reinterpret_cast(userp);\n\tstr->append(reinterpret_cast(contents), real_size);\n\treturn real_size;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a5ab989eb9f6ef9a9e2bf3c4906147340a4c31a6951bc301d859a0aab8d72a89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-reinterpret-cast", + "ruleIndex": 511, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use reinterpret_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 14, + "charOffset": 3379, + "charLength": 16, + "snippet": { + "text": "reinterpret_cast" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 14, + "charOffset": 3244, + "charLength": 16, + "snippet": { + "text": "size_t Webhook::writeCallback(void* contents, size_t size, size_t nmemb, void* userp) {\n\tsize_t real_size = size * nmemb;\n\tauto* str = reinterpret_cast(userp);\n\tstr->append(reinterpret_cast(contents), real_size);\n\treturn real_size;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b9356a3643c063ca58bf24d384110f85b37017704c1335b064d8e55727ce328" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp" + }, + "region": { + "startLine": 112, + "startColumn": 7, + "charOffset": 3424, + "charLength": 6, + "snippet": { + "text": "append" + } + }, + "contextRegion": { + "startLine": 110, + "startColumn": 7, + "charOffset": 3332, + "charLength": 6, + "snippet": { + "text": "\tsize_t real_size = size * nmemb;\n\tauto* str = reinterpret_cast(userp);\n\tstr->append(reinterpret_cast(contents), real_size);\n\treturn real_size;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8da3caf6f1081ef3379d59d310eb888725905e5fc2b8b66ec06dea23a953b9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-8", + "ruleIndex": 440, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-8: An object with integer type or pointer to void type shall not be converted to an object with pointer type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp" + }, + "region": { + "startLine": 112, + "startColumn": 14, + "charOffset": 3431, + "charLength": 16, + "snippet": { + "text": "reinterpret_cast" + } + }, + "contextRegion": { + "startLine": 110, + "startColumn": 14, + "charOffset": 3332, + "charLength": 16, + "snippet": { + "text": "\tsize_t real_size = size * nmemb;\n\tauto* str = reinterpret_cast(userp);\n\tstr->append(reinterpret_cast(contents), real_size);\n\treturn real_size;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c225079dde5339f479503f69226a7db8aa4ac6cc7e0665084fbdf59bc5d277cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-reinterpret-cast", + "ruleIndex": 511, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use reinterpret_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp" + }, + "region": { + "startLine": 112, + "startColumn": 14, + "charOffset": 3431, + "charLength": 16, + "snippet": { + "text": "reinterpret_cast" + } + }, + "contextRegion": { + "startLine": 110, + "startColumn": 14, + "charOffset": 3332, + "charLength": 16, + "snippet": { + "text": "\tsize_t real_size = size * nmemb;\n\tauto* str = reinterpret_cast(userp);\n\tstr->append(reinterpret_cast(contents), real_size);\n\treturn real_size;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "494bf3d9906008e329d9786e9199c8c792f02de3be8e8eb4a00a36eee2032ee2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getPayload' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp" + }, + "region": { + "startLine": 116, + "startColumn": 22, + "charOffset": 3521, + "charLength": 10, + "snippet": { + "text": "getPayload" + } + }, + "contextRegion": { + "startLine": 114, + "startColumn": 22, + "charOffset": 3497, + "charLength": 10, + "snippet": { + "text": "}\n\nstd::string Webhook::getPayload(const std::string &title, const std::string &message, int color, bool embed) const {\n\tstd::time_t now = getTimeNow();\n\tstd::string time_buf = formatDate(now);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8070c065b05a2d87831a07c7890212690d8b23a6cc6c6aab2bd30ace1b91ca3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-raw-string-literal", + "ruleIndex": 625, + "kind": "fail", + "level": "warning", + "message": { + "text": "escaped string literal can be written as a raw string literal" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp" + }, + "region": { + "startLine": 128, + "startColumn": 14, + "charOffset": 3911, + "charLength": 15, + "snippet": { + "text": "\"\\\"title\\\": \\\"\"" + } + }, + "contextRegion": { + "startLine": 126, + "startColumn": 14, + "charOffset": 3850, + "charLength": 15, + "snippet": { + "text": "\tif (embed) {\n\t\tpayload << \"{ \\\"embeds\\\": [{ \";\n\t\tpayload << \"\\\"title\\\": \\\"\" << title << \"\\\", \";\n\t\tif (!message.empty()) {\n\t\t\tpayload << \"\\\"description\\\": \\\"\" << message << \"\\\", \";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65ad8c8951c070a7bfefa5017a4e450ed10a2e74d744c0c396b0950b484c9332" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-raw-string-literal", + "ruleIndex": 625, + "kind": "fail", + "level": "warning", + "message": { + "text": "escaped string literal can be written as a raw string literal" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp" + }, + "region": { + "startLine": 130, + "startColumn": 15, + "charOffset": 3987, + "charLength": 21, + "snippet": { + "text": "\"\\\"description\\\": \\\"\"" + } + }, + "contextRegion": { + "startLine": 128, + "startColumn": 15, + "charOffset": 3898, + "charLength": 21, + "snippet": { + "text": "\t\tpayload << \"\\\"title\\\": \\\"\" << title << \"\\\", \";\n\t\tif (!message.empty()) {\n\t\t\tpayload << \"\\\"description\\\": \\\"\" << message << \"\\\", \";\n\t\t}\n\t\tif (g_configManager().getBoolean(DISCORD_SEND_FOOTER, __FUNCTION__)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b6617b0af88d2abb908ed550f7863e98989b8af1ee9938d38a714c20b23b468" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-raw-string-literal", + "ruleIndex": 625, + "kind": "fail", + "level": "warning", + "message": { + "text": "escaped string literal can be written as a raw string literal" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp" + }, + "region": { + "startLine": 133, + "startColumn": 15, + "charOffset": 4122, + "charLength": 28, + "snippet": { + "text": "\"\\\"footer\\\": { \\\"text\\\": \\\"\"" + } + }, + "contextRegion": { + "startLine": 131, + "startColumn": 15, + "charOffset": 4031, + "charLength": 28, + "snippet": { + "text": "\t\t}\n\t\tif (g_configManager().getBoolean(DISCORD_SEND_FOOTER, __FUNCTION__)) {\n\t\t\tpayload << \"\\\"footer\\\": { \\\"text\\\": \\\"\" << footer_text.str() << \"\\\" }, \";\n\t\t}\n\t\tif (color >= 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39b753c30f15c4122e437b85ac21b779dd0205a5aae044295278d8083d0f0fa6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-raw-string-literal", + "ruleIndex": 625, + "kind": "fail", + "level": "warning", + "message": { + "text": "escaped string literal can be written as a raw string literal" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp" + }, + "region": { + "startLine": 140, + "startColumn": 14, + "charOffset": 4296, + "charLength": 19, + "snippet": { + "text": "\"{ \\\"content\\\": \\\"\"" + } + }, + "contextRegion": { + "startLine": 138, + "startColumn": 14, + "charOffset": 4251, + "charLength": 19, + "snippet": { + "text": "\t\tpayload << \" }] }\";\n\t} else {\n\t\tpayload << \"{ \\\"content\\\": \\\"\" << (!message.empty() ? message : title) << \"\\\" }\";\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9775180e80821831847b3e9ef77028e9cab939b063df2b5c0a828343a437c11b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "429 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp" + }, + "region": { + "startLine": 161, + "startColumn": 23, + "charOffset": 4721, + "charLength": 3, + "snippet": { + "text": "429" + } + }, + "contextRegion": { + "startLine": 159, + "startColumn": 23, + "charOffset": 4695, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tif (response_code == 429 || response_code == 504) {\n\t\tg_logger().warn(\"Webhook encountered error code {}, re-queueing task.\", response_code);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3e6156db7a5aa7679287675654874eceafc9ab04ebf35cfe0530e9f4309c124" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "504 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp" + }, + "region": { + "startLine": 161, + "startColumn": 47, + "charOffset": 4745, + "charLength": 3, + "snippet": { + "text": "504" + } + }, + "contextRegion": { + "startLine": 159, + "startColumn": 47, + "charOffset": 4695, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tif (response_code == 429 || response_code == 504) {\n\t\tg_logger().warn(\"Webhook encountered error code {}, re-queueing task.\", response_code);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c6e62bccc82cf2714e0d3bf5bd721ab053b366112c37679c4ebd0eeae4b9cf0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/network/webhook/webhook.cpp" + }, + "region": { + "startLine": 169, + "startColumn": 23, + "charOffset": 4903, + "charLength": 3, + "snippet": { + "text": "300" + } + }, + "contextRegion": { + "startLine": 167, + "startColumn": 23, + "charOffset": 4857, + "charLength": 3, + "snippet": { + "text": "\twebhooks.pop_front();\n\n\tif (response_code >= 300) {\n\t\tg_logger().error(\n\t\t\t\"Failed to send webhook message, error code: {} response body: {} request body: {}\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db29f4f9ac9a285f6075beafd7d7d81f3b57263ee4a7239123fa84a34bb03537" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 13, + "charOffset": 1014, + "charLength": 3, + "snippet": { + "text": "run" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 13, + "charOffset": 966, + "charLength": 3, + "snippet": { + "text": "\tassert(!running);\n\trunning = true;\n\tio_service.run();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ca18cd61a265c847be478137fd05d068c4343b179b5fb69db8ee40ef0402b80" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 48, + "startColumn": 2, + "charOffset": 1105, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 2, + "charOffset": 1085, + "charLength": 3, + "snippet": { + "text": "\trunning = false;\n\n\tfor (auto &servicePortIt : acceptors) {\n\t\ttry {\n\t\t\tio_service.post([servicePort = servicePortIt.second] { servicePort->onStopServer(); });" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dae97db4c14e5dab0e4bb5cacc2a59314ded95cd242889a59d4a0c3e9f76fdd9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 58, + "startColumn": 14, + "charOffset": 1403, + "charLength": 16, + "snippet": { + "text": "expires_from_now" + } + }, + "contextRegion": { + "startLine": 56, + "startColumn": 14, + "charOffset": 1369, + "charLength": 16, + "snippet": { + "text": "\tacceptors.clear();\n\n\tdeath_timer.expires_from_now(std::chrono::seconds(3));\n\tdeath_timer.async_wait([this](const std::error_code &err) {\n\t\tdie();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ca281056abe83d1ab6dd394ed2ab3120ff91382b8ebab300e15107ec82f136b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-unused-parameters", + "ruleIndex": 612, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'err' is unused" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 55, + "charOffset": 1500, + "charLength": 3, + "snippet": { + "text": "err" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 55, + "charOffset": 1389, + "charLength": 3, + "snippet": { + "text": "\n\tdeath_timer.expires_from_now(std::chrono::seconds(3));\n\tdeath_timer.async_wait([this](const std::error_code &err) {\n\t\tdie();\n\t});" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6bd780939e9b7834ab6e90df404303ad353e56c471c5a45a0bc374c80ce64dec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-return-braced-init-list", + "ruleIndex": 630, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 10, + "charOffset": 1770, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 10, + "charOffset": 1682, + "charLength": 3, + "snippet": { + "text": "std::string ServicePort::get_protocol_names() const {\n\tif (services.empty()) {\n\t\treturn std::string();\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb6118d1bdb3397422559245cf0b70cb31ef87073fff09556d73e89b9d38c4ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 2, + "charOffset": 1848, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 2, + "charOffset": 1788, + "charLength": 3, + "snippet": { + "text": "\n\tstd::string str = services.front()->get_protocol_name();\n\tfor (size_t i = 1; i < services.size(); ++i) {\n\t\tstr.push_back(',');\n\t\tstr.push_back(' ');" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6535099fa8396a07e6a21b7d386918d841f351033c4e0181dcff45d26a6b2c76" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 81, + "startColumn": 7, + "charOffset": 1945, + "charLength": 6, + "snippet": { + "text": "append" + } + }, + "contextRegion": { + "startLine": 79, + "startColumn": 7, + "charOffset": 1895, + "charLength": 6, + "snippet": { + "text": "\t\tstr.push_back(',');\n\t\tstr.push_back(' ');\n\t\tstr.append(services[i]->get_protocol_name());\n\t}\n\treturn str;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "668f334ce6e2c9b5680c35e1eb27f732772e19e82dc610ff3619172f7dac3d25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 6, + "charOffset": 2040, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 6, + "charOffset": 2005, + "charLength": 1, + "snippet": { + "text": "\nvoid ServicePort::accept() {\n\tif (!acceptor) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f13880fcdd774b2f5e4c70edfbaa6193c610e5b471df5fabee32b2c665da00c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'connection' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 95, + "startColumn": 43, + "charOffset": 2374, + "charLength": 10, + "snippet": { + "text": "connection" + } + }, + "contextRegion": { + "startLine": 93, + "startColumn": 43, + "charOffset": 2329, + "charLength": 10, + "snippet": { + "text": "}\n\nvoid ServicePort::onAccept(Connection_ptr connection, const std::error_code &error) {\n\tif (!error) {\n\t\tif (services.empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eecb1eae90ff798ac7726dc04991a10d3f2a89aaddd1f289ab44f2fb8b58e213" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 96, + "startColumn": 2, + "charOffset": 2419, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 2, + "charOffset": 2331, + "charLength": 2, + "snippet": { + "text": "\nvoid ServicePort::onAccept(Connection_ptr connection, const std::error_code &error) {\n\tif (!error) {\n\t\tif (services.empty()) {\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e43e332e0f0c5fa05fba0e840a9478d08d2ed80b7d7e955baffa6dc09ef9f0bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 96, + "startColumn": 6, + "charOffset": 2423, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 6, + "charOffset": 2331, + "charLength": 1, + "snippet": { + "text": "\nvoid ServicePort::onAccept(Connection_ptr connection, const std::error_code &error) {\n\tif (!error) {\n\t\tif (services.empty()) {\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e6c37c83f25479aca2b0e0dc7f6d8160d6b10564dede363e4355d1915e6070c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion '(unnamed enum at /data/project/src/server/server_definitions.hpp:14:1)' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 110, + "startColumn": 22, + "charOffset": 2808, + "charLength": 11, + "snippet": { + "text": "FORCE_CLOSE" + } + }, + "contextRegion": { + "startLine": 108, + "startColumn": 22, + "charOffset": 2771, + "charLength": 11, + "snippet": { + "text": "\t\t\t}\n\t\t} else {\n\t\t\tconnection->close(FORCE_CLOSE);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afec74fd84e9810a3651919f653ca28d7061e72bcbc4024d8ce9c691304864f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 118, + "startColumn": 19, + "charOffset": 2971, + "charLength": 13, + "snippet": { + "text": "scheduleEvent" + } + }, + "contextRegion": { + "startLine": 116, + "startColumn": 19, + "charOffset": 2917, + "charLength": 13, + "snippet": { + "text": "\t\t\tclose();\n\t\t\tpendingStart = true;\n\t\t\tg_dispatcher().scheduleEvent(\n\t\t\t\t15000, [self = shared_from_this(), serverPort = serverPort] { ServicePort::openAcceptor(std::weak_ptr(self), serverPort); }, \"ServicePort::openAcceptor\"\n\t\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fe6717f67c006a6fe68d96748cb6e97d7519629ab78597b1d176da27894a5b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "15000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 119, + "startColumn": 5, + "charOffset": 2990, + "charLength": 5, + "snippet": { + "text": "15000" + } + }, + "contextRegion": { + "startLine": 117, + "startColumn": 5, + "charOffset": 2929, + "charLength": 5, + "snippet": { + "text": "\t\t\tpendingStart = true;\n\t\t\tg_dispatcher().scheduleEvent(\n\t\t\t\t15000, [self = shared_from_this(), serverPort = serverPort] { ServicePort::openAcceptor(std::weak_ptr(self), serverPort); }, \"ServicePort::openAcceptor\"\n\t\t\t);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1ec8686bbb64b7e6475042c5fea447fcbc0fe1a665fe1bd76e9b544a4fd991b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 127, + "startColumn": 2, + "charOffset": 3331, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 125, + "startColumn": 2, + "charOffset": 3172, + "charLength": 3, + "snippet": { + "text": "Protocol_ptr ServicePort::make_protocol(bool checksummed, NetworkMessage &msg, const Connection_ptr &connection) const {\n\tuint8_t protocolID = msg.getByte();\n\tfor (auto &service : services) {\n\t\tif (protocolID != service->get_protocol_identifier()) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "869a6da02332d0cd34f48dd3f1e20ca4f6b8d16046e461675ecb6299775e2486" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &service' can be declared as 'const auto &service'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 127, + "startColumn": 7, + "charOffset": 3336, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 125, + "startColumn": 7, + "charOffset": 3172, + "charLength": 4, + "snippet": { + "text": "Protocol_ptr ServicePort::make_protocol(bool checksummed, NetworkMessage &msg, const Connection_ptr &connection) const {\n\tuint8_t protocolID = msg.getByte();\n\tfor (auto &service : services) {\n\t\tif (protocolID != service->get_protocol_identifier()) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e4a485a648a99dffe2aa7eee3be9ea183126396eacf871e6db9365adf31597d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'weak_service' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 143, + "startColumn": 59, + "charOffset": 3701, + "charLength": 12, + "snippet": { + "text": "weak_service" + } + }, + "contextRegion": { + "startLine": 141, + "startColumn": 59, + "charOffset": 3640, + "charLength": 12, + "snippet": { + "text": "}\n\nvoid ServicePort::openAcceptor(std::weak_ptr weak_service, uint16_t port) {\n\tif (auto service = weak_service.lock()) {\n\t\tservice->open(port);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0061ad12a62248757556de15bed2fd01bb00e3dcf12995d1076996fe760bc574" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-make-unique", + "ruleIndex": 623, + "kind": "fail", + "level": "warning", + "message": { + "text": "use std::make_unique instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 13, + "charOffset": 3996, + "charLength": 5, + "snippet": { + "text": "reset" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 13, + "charOffset": 3899, + "charLength": 5, + "snippet": { + "text": "\ttry {\n\t\tif (g_configManager().getBoolean(BIND_ONLY_GLOBAL_ADDRESS, __FUNCTION__)) {\n\t\t\tacceptor.reset(new asio::ip::tcp::acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::address(asio::ip::address_v4::from_string(g_configManager().getString(IP, __FUNCTION__))), serverPort)));\n\t\t} else {\n\t\t\tacceptor.reset(new asio::ip::tcp::acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::address(asio::ip::address_v4(INADDR_ANY)), serverPort)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35d2835830d74d989ea630e606c32e8579dca1f74bc802ba753348eb05cf18ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-4-1", + "ruleIndex": 412, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-4-1: Dynamic heap memory allocation shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 19, + "charOffset": 4002, + "charLength": 3, + "snippet": { + "text": "new" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 19, + "charOffset": 3899, + "charLength": 3, + "snippet": { + "text": "\ttry {\n\t\tif (g_configManager().getBoolean(BIND_ONLY_GLOBAL_ADDRESS, __FUNCTION__)) {\n\t\t\tacceptor.reset(new asio::ip::tcp::acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::address(asio::ip::address_v4::from_string(g_configManager().getString(IP, __FUNCTION__))), serverPort)));\n\t\t} else {\n\t\t\tacceptor.reset(new asio::ip::tcp::acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::address(asio::ip::address_v4(INADDR_ANY)), serverPort)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "147d848ca0f0fb4b2b2305b1ec09a5cc4ecff47a71e9f95ee996eeef5112df36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-owning-memory", + "ruleIndex": 503, + "kind": "fail", + "level": "warning", + "message": { + "text": "initializing non-owner argument of type 'pointer' (aka 'asio::basic_socket_acceptor *') with a newly created 'gsl::owner<>'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 19, + "charOffset": 4002, + "charLength": 3, + "snippet": { + "text": "new" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 19, + "charOffset": 3899, + "charLength": 3, + "snippet": { + "text": "\ttry {\n\t\tif (g_configManager().getBoolean(BIND_ONLY_GLOBAL_ADDRESS, __FUNCTION__)) {\n\t\t\tacceptor.reset(new asio::ip::tcp::acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::address(asio::ip::address_v4::from_string(g_configManager().getString(IP, __FUNCTION__))), serverPort)));\n\t\t} else {\n\t\t\tacceptor.reset(new asio::ip::tcp::acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::address(asio::ip::address_v4(INADDR_ANY)), serverPort)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e576fd7dc64b8c18fd64138e8b9ebf98f5fe72655d739570f125318777018b1f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-make-unique", + "ruleIndex": 623, + "kind": "fail", + "level": "warning", + "message": { + "text": "use std::make_unique instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 159, + "startColumn": 13, + "charOffset": 4205, + "charLength": 5, + "snippet": { + "text": "reset" + } + }, + "contextRegion": { + "startLine": 157, + "startColumn": 13, + "charOffset": 3984, + "charLength": 5, + "snippet": { + "text": "\t\t\tacceptor.reset(new asio::ip::tcp::acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::address(asio::ip::address_v4::from_string(g_configManager().getString(IP, __FUNCTION__))), serverPort)));\n\t\t} else {\n\t\t\tacceptor.reset(new asio::ip::tcp::acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::address(asio::ip::address_v4(INADDR_ANY)), serverPort)));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "abae773d7d100d67e42cc74665bab1e56f232214b9caff543943e6ab6bb3fe9c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-4-1", + "ruleIndex": 412, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-4-1: Dynamic heap memory allocation shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 159, + "startColumn": 19, + "charOffset": 4211, + "charLength": 3, + "snippet": { + "text": "new" + } + }, + "contextRegion": { + "startLine": 157, + "startColumn": 19, + "charOffset": 3984, + "charLength": 3, + "snippet": { + "text": "\t\t\tacceptor.reset(new asio::ip::tcp::acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::address(asio::ip::address_v4::from_string(g_configManager().getString(IP, __FUNCTION__))), serverPort)));\n\t\t} else {\n\t\t\tacceptor.reset(new asio::ip::tcp::acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::address(asio::ip::address_v4(INADDR_ANY)), serverPort)));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d31ce7b0894e044822c5008f65b4784b5fd2faca74a3d91cfbc24f5798ac408a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-owning-memory", + "ruleIndex": 503, + "kind": "fail", + "level": "warning", + "message": { + "text": "initializing non-owner argument of type 'pointer' (aka 'asio::basic_socket_acceptor *') with a newly created 'gsl::owner<>'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 159, + "startColumn": 19, + "charOffset": 4211, + "charLength": 3, + "snippet": { + "text": "new" + } + }, + "contextRegion": { + "startLine": 157, + "startColumn": 19, + "charOffset": 3984, + "charLength": 3, + "snippet": { + "text": "\t\t\tacceptor.reset(new asio::ip::tcp::acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::address(asio::ip::address_v4::from_string(g_configManager().getString(IP, __FUNCTION__))), serverPort)));\n\t\t} else {\n\t\t\tacceptor.reset(new asio::ip::tcp::acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::address(asio::ip::address_v4(INADDR_ANY)), serverPort)));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa138b35e9f3cc8f539543e912bd854ec7ff6c2b369ac61e6821acb8d8499b9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 169, + "startColumn": 18, + "charOffset": 4566, + "charLength": 13, + "snippet": { + "text": "scheduleEvent" + } + }, + "contextRegion": { + "startLine": 167, + "startColumn": 18, + "charOffset": 4525, + "charLength": 13, + "snippet": { + "text": "\n\t\tpendingStart = true;\n\t\tg_dispatcher().scheduleEvent(\n\t\t\t15000,\n\t\t\t[self = shared_from_this(), port] { ServicePort::openAcceptor(std::weak_ptr(self), port); }, \"ServicePort::openAcceptor\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4893808354cfcca90787046313e932113d7a446ee8f361f46d55f9193785677d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "15000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 170, + "startColumn": 4, + "charOffset": 4584, + "charLength": 5, + "snippet": { + "text": "15000" + } + }, + "contextRegion": { + "startLine": 168, + "startColumn": 4, + "charOffset": 4526, + "charLength": 5, + "snippet": { + "text": "\t\tpendingStart = true;\n\t\tg_dispatcher().scheduleEvent(\n\t\t\t15000,\n\t\t\t[self = shared_from_this(), port] { ServicePort::openAcceptor(std::weak_ptr(self), port); }, \"ServicePort::openAcceptor\"\n\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4caf446becba9edb3b5652f2676a167ef83d3cfa97d2ab177f95979249c29ee2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-unused-return-value", + "ruleIndex": 117, + "kind": "fail", + "level": "warning", + "message": { + "text": "the value returned by this function should not be disregarded; neglecting it may lead to errors" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 179, + "startColumn": 3, + "charOffset": 4834, + "charLength": 8, + "snippet": { + "text": "acceptor" + } + }, + "contextRegion": { + "startLine": 177, + "startColumn": 3, + "charOffset": 4767, + "charLength": 8, + "snippet": { + "text": "\tif (acceptor && acceptor->is_open()) {\n\t\tstd::error_code error;\n\t\tacceptor->close(error);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "338d66a9d1a87afef8627675f79bf04919d36b2034ce2c1ae335f2ffbd3831c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/server.cpp" + }, + "region": { + "startLine": 179, + "startColumn": 13, + "charOffset": 4844, + "charLength": 5, + "snippet": { + "text": "close" + } + }, + "contextRegion": { + "startLine": 177, + "startColumn": 13, + "charOffset": 4767, + "charLength": 5, + "snippet": { + "text": "\tif (acceptor && acceptor->is_open()) {\n\t\tstd::error_code error;\n\t\tacceptor->close(error);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "798de3fea7e4f602da9903d94b0483ff32c320b2d74759ae26a0639cf1cecc64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/signals.cpp" + }, + "region": { + "startLine": 104, + "startColumn": 20, + "charOffset": 3000, + "charLength": 6, + "snippet": { + "text": "reload" + } + }, + "contextRegion": { + "startLine": 102, + "startColumn": 20, + "charOffset": 2916, + "charLength": 6, + "snippet": { + "text": "\tg_logger().info(\"SIGHUP received, reloading config files...\");\n\n\tg_configManager().reload();\n\tg_logger().info(\"Reloaded config\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54201e10984e12b5c7fe7bad28457a1d952d2aa3b27b9fce7a349f116a92fe9c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/signals.cpp" + }, + "region": { + "startLine": 107, + "startColumn": 17, + "charOffset": 3064, + "charLength": 6, + "snippet": { + "text": "reload" + } + }, + "contextRegion": { + "startLine": 105, + "startColumn": 17, + "charOffset": 3010, + "charLength": 6, + "snippet": { + "text": "\tg_logger().info(\"Reloaded config\");\n\n\tg_game().raids.reload();\n\tg_game().raids.startup();\n\tg_logger().info(\"Reloaded raids\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef76a2f93789274555a64cdf0c02c07edf8efa1bfd9671d997c7ebb984b39b4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/signals.cpp" + }, + "region": { + "startLine": 108, + "startColumn": 17, + "charOffset": 3090, + "charLength": 7, + "snippet": { + "text": "startup" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 17, + "charOffset": 3047, + "charLength": 7, + "snippet": { + "text": "\n\tg_game().raids.reload();\n\tg_game().raids.startup();\n\tg_logger().info(\"Reloaded raids\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6dc80178ae5b711edb38f5ce367848679c9fadf92b9a5f996a29dc9a1201632b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/signals.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 14, + "charOffset": 3151, + "charLength": 6, + "snippet": { + "text": "reload" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 14, + "charOffset": 3101, + "charLength": 6, + "snippet": { + "text": "\tg_logger().info(\"Reloaded raids\");\n\n\tItem::items.reload();\n\tg_logger().info(\"Reloaded items\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "346c827f4444c37320ffe91f87bcd8f5f1ec505e780869d094d816846eeba243" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/signals.cpp" + }, + "region": { + "startLine": 114, + "startColumn": 18, + "charOffset": 3215, + "charLength": 6, + "snippet": { + "text": "reload" + } + }, + "contextRegion": { + "startLine": 112, + "startColumn": 18, + "charOffset": 3161, + "charLength": 6, + "snippet": { + "text": "\tg_logger().info(\"Reloaded items\");\n\n\tg_game().mounts.reload();\n\tg_logger().info(\"Reloaded mounts\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e4134b9f0de299fc7694fbf71788e706d006076fb48c0b66976f427fb960b7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/signals.cpp" + }, + "region": { + "startLine": 117, + "startColumn": 13, + "charOffset": 3275, + "charLength": 11, + "snippet": { + "text": "loadFromXml" + } + }, + "contextRegion": { + "startLine": 115, + "startColumn": 13, + "charOffset": 3225, + "charLength": 11, + "snippet": { + "text": "\tg_logger().info(\"Reloaded mounts\");\n\n\tg_events().loadFromXml();\n\tg_logger().info(\"Reloaded events\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1ae795f127fdc3d611e3298a476a3aa9b06f4e864d64b0e839805f15f15b8d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/signals.cpp" + }, + "region": { + "startLine": 120, + "startColumn": 11, + "charOffset": 3338, + "charLength": 4, + "snippet": { + "text": "load" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 11, + "charOffset": 3290, + "charLength": 4, + "snippet": { + "text": "\tg_logger().info(\"Reloaded events\");\n\n\tg_chat().load();\n\tg_logger().info(\"Reloaded chatchannels\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3a9bd7a493ae42ff53ae29735b2421556ee63545006c06dcbe6a5ad251dce9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/signals.cpp" + }, + "region": { + "startLine": 123, + "startColumn": 21, + "charOffset": 3410, + "charLength": 8, + "snippet": { + "text": "loadFile" + } + }, + "contextRegion": { + "startLine": 121, + "startColumn": 21, + "charOffset": 3346, + "charLength": 8, + "snippet": { + "text": "\tg_logger().info(\"Reloaded chatchannels\");\n\n\tg_luaEnvironment().loadFile(g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + \"/core.lua\", \"core.lua\");\n\tg_logger().info(\"Reloaded core.lua\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fce6715d2016f6e772f6bfb489264e39ea4e372511229e62bf6613f07a7337f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/server/signals.cpp" + }, + "region": { + "startLine": 126, + "startColumn": 2, + "charOffset": 3546, + "charLength": 6, + "snippet": { + "text": "lua_gc" + } + }, + "contextRegion": { + "startLine": 124, + "startColumn": 2, + "charOffset": 3505, + "charLength": 6, + "snippet": { + "text": "\tg_logger().info(\"Reloaded core.lua\");\n\n\tlua_gc(g_luaEnvironment().getLuaState(), LUA_GCCOLLECT, 0);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4185d446e58d0aa7a7315f9c5ce5aef5b1d465fb6f04ade55fb30776b6f5f0ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-namespace-comment", + "ruleIndex": 584, + "kind": "fail", + "level": "warning", + "message": { + "text": "namespace 'pugi' not terminated with a closing comment" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/pugicast.cpp" + }, + "region": { + "startLine": 16, + "startColumn": 1, + "charOffset": 520, + "charLength": 1, + "snippet": { + "text": "}" + } + }, + "contextRegion": { + "startLine": 14, + "startColumn": 1, + "charOffset": 492, + "charLength": 1, + "snippet": { + "text": "\t\tg_logger().error(str);\n\t}\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a7b4f9c105c29338b8f7fbc310c8bb7056a016d00b0b3026560e7d6fab54aff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-owning-memory", + "ruleIndex": 503, + "kind": "fail", + "level": "warning", + "message": { + "text": "initializing non-owner 'FILE *' (aka '_IO_FILE *') with a newly created 'gsl::owner<>'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 19, + "startColumn": 2, + "charOffset": 669, + "charLength": 4, + "snippet": { + "text": "FILE" + } + }, + "contextRegion": { + "startLine": 17, + "startColumn": 2, + "charOffset": 579, + "charLength": 4, + "snippet": { + "text": "\tg_logger().error(\"[{}] Failed to load {}: {}\", where, fileName, result.description());\n\n\tFILE* file = fopen(fileName.c_str(), \"rb\");\n\tif (!file) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23ef5635136d15cc74d0469513debea630978450f3633d26291cee00c64d0b2b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "android-cloexec-fopen", + "ruleIndex": 30, + "kind": "fail", + "level": "warning", + "message": { + "text": "use 'fopen' mode 'e' to set O_CLOEXEC" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 19, + "startColumn": 39, + "charOffset": 706, + "charLength": 4, + "snippet": { + "text": "\"rb\"" + } + }, + "contextRegion": { + "startLine": 17, + "startColumn": 39, + "charOffset": 579, + "charLength": 4, + "snippet": { + "text": "\tg_logger().error(\"[{}] Failed to load {}: {}\", where, fileName, result.description());\n\n\tFILE* file = fopen(fileName.c_str(), \"rb\");\n\tif (!file) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a640f957ac48a3da2f1ac2e31766c269efc0b635cb755675af62c2f671c886d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 20, + "startColumn": 6, + "charOffset": 718, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 6, + "charOffset": 667, + "charLength": 1, + "snippet": { + "text": "\n\tFILE* file = fopen(fileName.c_str(), \"rb\");\n\tif (!file) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61be66ad8d772fa33e6f909eda16c5351eaba2cdae01411a5fe3203cc17f6d35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'FILE *' (aka '_IO_FILE *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 20, + "startColumn": 7, + "charOffset": 719, + "charLength": 4, + "snippet": { + "text": "file" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 7, + "charOffset": 667, + "charLength": 4, + "snippet": { + "text": "\n\tFILE* file = fopen(fileName.c_str(), \"rb\");\n\tif (!file) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d373e70117f691a7f23c529954a388c1fea486af5ce5c2ba1443cadcd4f89e84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-c-arrays", + "ruleIndex": 480, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not declare C-style arrays, use std::array<> instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 24, + "startColumn": 2, + "charOffset": 742, + "charLength": 4, + "snippet": { + "text": "char" + } + }, + "contextRegion": { + "startLine": 22, + "startColumn": 2, + "charOffset": 737, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tchar buffer[32768];\n\tuint32_t currentLine = 1;\n\tstd::string line;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c277ef9b2bdce1571d4d8cf243fbbc30b03f854b99120f57339548ce7c4dbc00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "32768 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 24, + "startColumn": 14, + "charOffset": 754, + "charLength": 5, + "snippet": { + "text": "32768" + } + }, + "contextRegion": { + "startLine": 22, + "startColumn": 14, + "charOffset": 737, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tchar buffer[32768];\n\tuint32_t currentLine = 1;\n\tstd::string line;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f150fc70498583dbfa4dde678c994c2d088788bf3531fbffbb77b7737f87fc8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 2, + "charOffset": 810, + "charLength": 6, + "snippet": { + "text": "size_t" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 2, + "charOffset": 789, + "charLength": 6, + "snippet": { + "text": "\tstd::string line;\n\n\tsize_t offset = static_cast(result.offset);\n\tsize_t lineOffsetPosition = 0;\n\tsize_t index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14c536e932987d59470520ce704c8f36776a09a13407c29c78cdd2a769871caf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'bytes' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 31, + "startColumn": 9, + "charOffset": 921, + "charLength": 5, + "snippet": { + "text": "bytes" + } + }, + "contextRegion": { + "startLine": 29, + "startColumn": 9, + "charOffset": 862, + "charLength": 5, + "snippet": { + "text": "\tsize_t lineOffsetPosition = 0;\n\tsize_t index = 0;\n\tsize_t bytes;\n\tdo {\n\t\tbytes = fread(buffer, 1, 32768, file);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad8615bdee8aa75e089008dc854e9b81f3ea5edefc938f9af3aec022be6c79d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 32, + "startColumn": 2, + "charOffset": 929, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 2, + "charOffset": 894, + "charLength": 2, + "snippet": { + "text": "\tsize_t index = 0;\n\tsize_t bytes;\n\tdo {\n\t\tbytes = fread(buffer, 1, 32768, file);\n\t\tfor (size_t i = 0; i < bytes; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a309df40f20f2e72fb77ac0b632d5e6faaf529d42976d0f75b76851a528c452" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 17, + "charOffset": 950, + "charLength": 6, + "snippet": { + "text": "buffer" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 17, + "charOffset": 913, + "charLength": 6, + "snippet": { + "text": "\tsize_t bytes;\n\tdo {\n\t\tbytes = fread(buffer, 1, 32768, file);\n\t\tfor (size_t i = 0; i < bytes; ++i) {\n\t\t\tchar ch = buffer[i];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58f74b04d25312356e39ac18f7a05fc0d35970c2eee6ed59b80858945f713558" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 17, + "charOffset": 950, + "charLength": 6, + "snippet": { + "text": "buffer" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 17, + "charOffset": 913, + "charLength": 6, + "snippet": { + "text": "\tsize_t bytes;\n\tdo {\n\t\tbytes = fread(buffer, 1, 32768, file);\n\t\tfor (size_t i = 0; i < bytes; ++i) {\n\t\t\tchar ch = buffer[i];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd8ee61a6fee5eb0db12a849c8678d3a60dd8c1bc63c64e08a25b03e439ec375" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "32768 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 28, + "charOffset": 961, + "charLength": 5, + "snippet": { + "text": "32768" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 28, + "charOffset": 913, + "charLength": 5, + "snippet": { + "text": "\tsize_t bytes;\n\tdo {\n\t\tbytes = fread(buffer, 1, 32768, file);\n\t\tfor (size_t i = 0; i < bytes; ++i) {\n\t\t\tchar ch = buffer[i];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b9bd3c5f058bd0aec3bd8be447b6fa35478fb81cc7d6c0d6cc4de5c6ec9f1a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 3, + "charOffset": 977, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 3, + "charOffset": 928, + "charLength": 3, + "snippet": { + "text": "\tdo {\n\t\tbytes = fread(buffer, 1, 32768, file);\n\t\tfor (size_t i = 0; i < bytes; ++i) {\n\t\t\tchar ch = buffer[i];\n\t\t\tif (ch == '\\n') {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1446ddd38f0702de4f6928dcc136b41a118e9d6496dd52280f0ddc62bcdfe2c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'bytes' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 22, + "charOffset": 996, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 22, + "charOffset": 928, + "charLength": 1, + "snippet": { + "text": "\tdo {\n\t\tbytes = fread(buffer, 1, 32768, file);\n\t\tfor (size_t i = 0; i < bytes; ++i) {\n\t\t\tchar ch = buffer[i];\n\t\t\tif (ch == '\\n') {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6861e58245eefe87101864f1655a70e3eaeca8141cb6aab7ac6c7a2b5e94a0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 35, + "startColumn": 14, + "charOffset": 1027, + "charLength": 6, + "snippet": { + "text": "buffer" + } + }, + "contextRegion": { + "startLine": 33, + "startColumn": 14, + "charOffset": 934, + "charLength": 6, + "snippet": { + "text": "\t\tbytes = fread(buffer, 1, 32768, file);\n\t\tfor (size_t i = 0; i < bytes; ++i) {\n\t\t\tchar ch = buffer[i];\n\t\t\tif (ch == '\\n') {\n\t\t\t\tif ((index + i) >= offset) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db64425c95511ca8b8a33b8dcdb1b9ebb84dc9ea6f66ddb2d3195c863c54fc0c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (do loop) is ID-dependent due to variable reference to 'bytes' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 49, + "startColumn": 11, + "charOffset": 1302, + "charLength": 5, + "snippet": { + "text": "bytes" + } + }, + "contextRegion": { + "startLine": 47, + "startColumn": 11, + "charOffset": 1270, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\t\tindex += bytes;\n\t} while (bytes == 32768);\n\tfclose(file);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f1e97287869a9cecd6e106968c32f8f76e57dc3fc951cb9ea15beb9d8678a5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "32768 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 49, + "startColumn": 20, + "charOffset": 1311, + "charLength": 5, + "snippet": { + "text": "32768" + } + }, + "contextRegion": { + "startLine": 47, + "startColumn": 20, + "charOffset": 1270, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\t\tindex += bytes;\n\t} while (bytes == 32768);\n\tfclose(file);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97aebd048694145d22e33bfeb0f958f4179a0d733f49edfa42f86d91f96a8013" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err33-c", + "ruleIndex": 132, + "kind": "fail", + "level": "warning", + "message": { + "text": "the value returned by this function should not be disregarded; neglecting it may lead to errors" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 50, + "startColumn": 2, + "charOffset": 1320, + "charLength": 6, + "snippet": { + "text": "fclose" + } + }, + "contextRegion": { + "startLine": 48, + "startColumn": 2, + "charOffset": 1274, + "charLength": 6, + "snippet": { + "text": "\t\tindex += bytes;\n\t} while (bytes == 32768);\n\tfclose(file);\n\n\tg_logger().error(\"Line {}:\", currentLine);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "248828e068fbb5d083d5ecfd7b5d25208219d9c0845acfb7dc85b45123efb424" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 50, + "startColumn": 2, + "charOffset": 1320, + "charLength": 6, + "snippet": { + "text": "fclose" + } + }, + "contextRegion": { + "startLine": 48, + "startColumn": 2, + "charOffset": 1274, + "charLength": 6, + "snippet": { + "text": "\t\tindex += bytes;\n\t} while (bytes == 32768);\n\tfclose(file);\n\n\tg_logger().error(\"Line {}:\", currentLine);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eea5711ed3d767530913b2c8e2b6ff81e84a80936df0cc1295b6e792b951dbd8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-owning-memory", + "ruleIndex": 503, + "kind": "fail", + "level": "warning", + "message": { + "text": "calling legacy resource function without passing a 'gsl::owner<>'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 50, + "startColumn": 2, + "charOffset": 1320, + "charLength": 6, + "snippet": { + "text": "fclose" + } + }, + "contextRegion": { + "startLine": 48, + "startColumn": 2, + "charOffset": 1274, + "charLength": 6, + "snippet": { + "text": "\t\tindex += bytes;\n\t} while (bytes == 32768);\n\tfclose(file);\n\n\tg_logger().error(\"Line {}:\", currentLine);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd2afbbe1880cc288e53440f1ed80c7060405f5da461636824663de68b25c7db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 54, + "startColumn": 2, + "charOffset": 1411, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 52, + "startColumn": 2, + "charOffset": 1335, + "charLength": 3, + "snippet": { + "text": "\tg_logger().error(\"Line {}:\", currentLine);\n\tg_logger().error(\"{}\", line);\n\tfor (size_t i = 0; i < lineOffsetPosition; i++) {\n\t\tif (line[i] == '\\t') {\n\t\t\tg_logger().error(\"\\t\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3588bb36d53c8966d37a1219c07cd944d9bcf8ed7494df8d114c81f7b7597917" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'lineOffsetPosition' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 54, + "startColumn": 21, + "charOffset": 1430, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 52, + "startColumn": 21, + "charOffset": 1335, + "charLength": 1, + "snippet": { + "text": "\tg_logger().error(\"Line {}:\", currentLine);\n\tg_logger().error(\"{}\", line);\n\tfor (size_t i = 0; i < lineOffsetPosition; i++) {\n\t\tif (line[i] == '\\t') {\n\t\t\tg_logger().error(\"\\t\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69aa7c96f87add484e2c15321f092d6e06f7a4d7baa367818139fbe28db0244b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-use-anonymous-namespace", + "ruleIndex": 614, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'circularShift' declared 'static', move to anonymous namespace instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 64, + "startColumn": 17, + "charOffset": 1600, + "charLength": 13, + "snippet": { + "text": "circularShift" + } + }, + "contextRegion": { + "startLine": 62, + "startColumn": 17, + "charOffset": 1581, + "charLength": 13, + "snippet": { + "text": "}\n\nstatic uint32_t circularShift(int bits, uint32_t value) {\n\treturn (value << bits) | (value >> (32 - bits));\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "405ff67c27843adfa89d968f462f25822e264b2cfdb73ab922b0afed8754207f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 65, + "startColumn": 19, + "charOffset": 1660, + "charLength": 4, + "snippet": { + "text": "bits" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 19, + "charOffset": 1583, + "charLength": 4, + "snippet": { + "text": "\nstatic uint32_t circularShift(int bits, uint32_t value) {\n\treturn (value << bits) | (value >> (32 - bits));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de10964e4fcd30d29345bbc1bed28bc4a40f959e1caa22ae4ab89391dad2257a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 65, + "startColumn": 37, + "charOffset": 1678, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 37, + "charOffset": 1583, + "charLength": 1, + "snippet": { + "text": "\nstatic uint32_t circularShift(int bits, uint32_t value) {\n\treturn (value << bits) | (value >> (32 - bits));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "625692e9db7c301a9cf14bc21f94a0de1187baf21d187820c5e38cf68740866c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "32 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 65, + "startColumn": 38, + "charOffset": 1679, + "charLength": 2, + "snippet": { + "text": "32" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 38, + "charOffset": 1583, + "charLength": 2, + "snippet": { + "text": "\nstatic uint32_t circularShift(int bits, uint32_t value) {\n\treturn (value << bits) | (value >> (32 - bits));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9d4966dabb861b2a5bdaa21c08994c4cfde9a241357940137ffc4313ab6169f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-use-anonymous-namespace", + "ruleIndex": 614, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'processSHA1MessageBlock' declared 'static', move to anonymous namespace instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 68, + "startColumn": 13, + "charOffset": 1707, + "charLength": 23, + "snippet": { + "text": "processSHA1MessageBlock" + } + }, + "contextRegion": { + "startLine": 66, + "startColumn": 13, + "charOffset": 1692, + "charLength": 23, + "snippet": { + "text": "}\n\nstatic void processSHA1MessageBlock(const uint8_t* messageBlock, uint32_t* H) {\n\tuint32_t W[80];\n\tfor (int i = 0; i < 16; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ad57584833a0f72a71cae730326197265832ee7cbfa3cf839002d3670d95719" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-c-arrays", + "ruleIndex": 480, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not declare C-style arrays, use std::array<> instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 69, + "startColumn": 2, + "charOffset": 1776, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 67, + "startColumn": 2, + "charOffset": 1694, + "charLength": 8, + "snippet": { + "text": "\nstatic void processSHA1MessageBlock(const uint8_t* messageBlock, uint32_t* H) {\n\tuint32_t W[80];\n\tfor (int i = 0; i < 16; ++i) {\n\t\tconst size_t offset = i << 2;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b4f8061f5ebe7b842305fffe900430e9d98051c38b7b535daecc7de0a2c36309" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "80 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 69, + "startColumn": 13, + "charOffset": 1787, + "charLength": 2, + "snippet": { + "text": "80" + } + }, + "contextRegion": { + "startLine": 67, + "startColumn": 13, + "charOffset": 1694, + "charLength": 2, + "snippet": { + "text": "\nstatic void processSHA1MessageBlock(const uint8_t* messageBlock, uint32_t* H) {\n\tuint32_t W[80];\n\tfor (int i = 0; i < 16; ++i) {\n\t\tconst size_t offset = i << 2;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2fe641485fc50651b5819280efed327005e99ab05f3130291dd4cc93bc05e561" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 2, + "charOffset": 1793, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 2, + "charOffset": 1695, + "charLength": 3, + "snippet": { + "text": "static void processSHA1MessageBlock(const uint8_t* messageBlock, uint32_t* H) {\n\tuint32_t W[80];\n\tfor (int i = 0; i < 16; ++i) {\n\t\tconst size_t offset = i << 2;\n\t\tW[i] = messageBlock[offset] << 24 | messageBlock[offset + 1] << 16 | messageBlock[offset + 2] << 8 | messageBlock[offset + 3];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5ba179a57371957c26a3328c7fed08b482a6917b9bd6b3b6af797c6bacb8ca6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 22, + "charOffset": 1813, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 22, + "charOffset": 1695, + "charLength": 2, + "snippet": { + "text": "static void processSHA1MessageBlock(const uint8_t* messageBlock, uint32_t* H) {\n\tuint32_t W[80];\n\tfor (int i = 0; i < 16; ++i) {\n\t\tconst size_t offset = i << 2;\n\t\tW[i] = messageBlock[offset] << 24 | messageBlock[offset + 1] << 16 | messageBlock[offset + 2] << 8 | messageBlock[offset + 3];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6607c0e7c3143f2b1059fdb0436efbf15639f069114a5e217f1b886a584d0abd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 71, + "startColumn": 25, + "charOffset": 1848, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 69, + "startColumn": 25, + "charOffset": 1775, + "charLength": 1, + "snippet": { + "text": "\tuint32_t W[80];\n\tfor (int i = 0; i < 16; ++i) {\n\t\tconst size_t offset = i << 2;\n\t\tW[i] = messageBlock[offset] << 24 | messageBlock[offset + 1] << 16 | messageBlock[offset + 2] << 8 | messageBlock[offset + 3];\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "367fcbbcde664539869000640b90e58908022034c3f71f634c8544a295db157e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 3, + "charOffset": 1858, + "charLength": 1, + "snippet": { + "text": "W" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 3, + "charOffset": 1792, + "charLength": 1, + "snippet": { + "text": "\tfor (int i = 0; i < 16; ++i) {\n\t\tconst size_t offset = i << 2;\n\t\tW[i] = messageBlock[offset] << 24 | messageBlock[offset + 1] << 16 | messageBlock[offset + 2] << 8 | messageBlock[offset + 3];\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d49e9b4edbf3a874a3ad61dfd29fc677668e39b36ce9b915a1ad1cb1d2d11530" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 10, + "charOffset": 1865, + "charLength": 12, + "snippet": { + "text": "messageBlock" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 10, + "charOffset": 1792, + "charLength": 12, + "snippet": { + "text": "\tfor (int i = 0; i < 16; ++i) {\n\t\tconst size_t offset = i << 2;\n\t\tW[i] = messageBlock[offset] << 24 | messageBlock[offset + 1] << 16 | messageBlock[offset + 2] << 8 | messageBlock[offset + 3];\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac29846b349134d7ba317b55c0b8e022ab1657f2014b6152dab13e9bd6886aed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 10, + "charOffset": 1865, + "charLength": 12, + "snippet": { + "text": "messageBlock" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 10, + "charOffset": 1792, + "charLength": 12, + "snippet": { + "text": "\tfor (int i = 0; i < 16; ++i) {\n\t\tconst size_t offset = i << 2;\n\t\tW[i] = messageBlock[offset] << 24 | messageBlock[offset + 1] << 16 | messageBlock[offset + 2] << 8 | messageBlock[offset + 3];\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec0b643fab483118753cf809f24fd311dccb0f6a436bf16b23c9ca233572e2eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-8-1", + "ruleIndex": 446, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-8-1: The right hand operand of a shift operator shall lie between zero and one less than the width in bits of the underlying type of the left hand operand" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 34, + "charOffset": 1889, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 34, + "charOffset": 1792, + "charLength": 2, + "snippet": { + "text": "\tfor (int i = 0; i < 16; ++i) {\n\t\tconst size_t offset = i << 2;\n\t\tW[i] = messageBlock[offset] << 24 | messageBlock[offset + 1] << 16 | messageBlock[offset + 2] << 8 | messageBlock[offset + 3];\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef122594837cd527d4e2b6efc21578ade33b028a6b75241c526f4a7cfc6a1397" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 34, + "charOffset": 1889, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 34, + "charOffset": 1792, + "charLength": 2, + "snippet": { + "text": "\tfor (int i = 0; i < 16; ++i) {\n\t\tconst size_t offset = i << 2;\n\t\tW[i] = messageBlock[offset] << 24 | messageBlock[offset + 1] << 16 | messageBlock[offset + 2] << 8 | messageBlock[offset + 3];\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "376ce2f92e2fc61a6e4f74eb7c71458770fe129b562d27625bd03d31778d8123" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 34, + "charOffset": 1889, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 34, + "charOffset": 1792, + "charLength": 2, + "snippet": { + "text": "\tfor (int i = 0; i < 16; ++i) {\n\t\tconst size_t offset = i << 2;\n\t\tW[i] = messageBlock[offset] << 24 | messageBlock[offset + 1] << 16 | messageBlock[offset + 2] << 8 | messageBlock[offset + 3];\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "886b19bc17c314f42cb3e0e691fcb687e87d5ee1a16188b483b9d4de5fbd433b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 39, + "charOffset": 1894, + "charLength": 12, + "snippet": { + "text": "messageBlock" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 39, + "charOffset": 1792, + "charLength": 12, + "snippet": { + "text": "\tfor (int i = 0; i < 16; ++i) {\n\t\tconst size_t offset = i << 2;\n\t\tW[i] = messageBlock[offset] << 24 | messageBlock[offset + 1] << 16 | messageBlock[offset + 2] << 8 | messageBlock[offset + 3];\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fba29ec242e9755739cfd80b483e36dbfcee512590b00e0a8241f3c324f884f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-8-1", + "ruleIndex": 446, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-8-1: The right hand operand of a shift operator shall lie between zero and one less than the width in bits of the underlying type of the left hand operand" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 67, + "charOffset": 1922, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 67, + "charOffset": 1792, + "charLength": 2, + "snippet": { + "text": "\tfor (int i = 0; i < 16; ++i) {\n\t\tconst size_t offset = i << 2;\n\t\tW[i] = messageBlock[offset] << 24 | messageBlock[offset + 1] << 16 | messageBlock[offset + 2] << 8 | messageBlock[offset + 3];\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68d22a300223d29cb3c9f1c52121517a95ac5d6ea03e3199efc0088d3447b46c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 67, + "charOffset": 1922, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 67, + "charOffset": 1792, + "charLength": 2, + "snippet": { + "text": "\tfor (int i = 0; i < 16; ++i) {\n\t\tconst size_t offset = i << 2;\n\t\tW[i] = messageBlock[offset] << 24 | messageBlock[offset + 1] << 16 | messageBlock[offset + 2] << 8 | messageBlock[offset + 3];\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9bed1ed6a4eff0bcce8392ff89f55edc4dd9ac23b6e15c27496347175fccfb78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 67, + "charOffset": 1922, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 67, + "charOffset": 1792, + "charLength": 2, + "snippet": { + "text": "\tfor (int i = 0; i < 16; ++i) {\n\t\tconst size_t offset = i << 2;\n\t\tW[i] = messageBlock[offset] << 24 | messageBlock[offset + 1] << 16 | messageBlock[offset + 2] << 8 | messageBlock[offset + 3];\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5b4be782b083649f4fb18780704fa573b61979e60f7634f77cc36fdfe78b1c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 72, + "charOffset": 1927, + "charLength": 12, + "snippet": { + "text": "messageBlock" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 72, + "charOffset": 1792, + "charLength": 12, + "snippet": { + "text": "\tfor (int i = 0; i < 16; ++i) {\n\t\tconst size_t offset = i << 2;\n\t\tW[i] = messageBlock[offset] << 24 | messageBlock[offset + 1] << 16 | messageBlock[offset + 2] << 8 | messageBlock[offset + 3];\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94be1586a9163e527a5ce25920f02a82934ced9fa3869a2aa7fc6db5b75ab8f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-8-1", + "ruleIndex": 446, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-8-1: The right hand operand of a shift operator shall lie between zero and one less than the width in bits of the underlying type of the left hand operand" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 100, + "charOffset": 1955, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 100, + "charOffset": 1792, + "charLength": 1, + "snippet": { + "text": "\tfor (int i = 0; i < 16; ++i) {\n\t\tconst size_t offset = i << 2;\n\t\tW[i] = messageBlock[offset] << 24 | messageBlock[offset + 1] << 16 | messageBlock[offset + 2] << 8 | messageBlock[offset + 3];\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19c3bcff785539615f9e23c1d76d5c426a0a7985d526440af6a6ee2ee5231140" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 100, + "charOffset": 1955, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 100, + "charOffset": 1792, + "charLength": 1, + "snippet": { + "text": "\tfor (int i = 0; i < 16; ++i) {\n\t\tconst size_t offset = i << 2;\n\t\tW[i] = messageBlock[offset] << 24 | messageBlock[offset + 1] << 16 | messageBlock[offset + 2] << 8 | messageBlock[offset + 3];\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a49966f8fbd56f2f8608fc78b61dfb24f657facbe7448ec9346a59de14e2ecd1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 100, + "charOffset": 1955, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 100, + "charOffset": 1792, + "charLength": 1, + "snippet": { + "text": "\tfor (int i = 0; i < 16; ++i) {\n\t\tconst size_t offset = i << 2;\n\t\tW[i] = messageBlock[offset] << 24 | messageBlock[offset + 1] << 16 | messageBlock[offset + 2] << 8 | messageBlock[offset + 3];\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "debd928f35dd5b3e7ae3849a5c40ba0d46daf646e49ad140b7286b632c2e34bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 104, + "charOffset": 1959, + "charLength": 12, + "snippet": { + "text": "messageBlock" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 104, + "charOffset": 1792, + "charLength": 12, + "snippet": { + "text": "\tfor (int i = 0; i < 16; ++i) {\n\t\tconst size_t offset = i << 2;\n\t\tW[i] = messageBlock[offset] << 24 | messageBlock[offset + 1] << 16 | messageBlock[offset + 2] << 8 | messageBlock[offset + 3];\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b769db39d693ec39b9b7fb2f4736860185393f5ba9a10f4485cdcf0865441353" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 75, + "startColumn": 2, + "charOffset": 1990, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 73, + "startColumn": 2, + "charOffset": 1985, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (int i = 16; i < 80; ++i) {\n\t\tW[i] = circularShift(1, W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21d5a52280ecd854b6711e3e4f93746a4665766ce67418aeb6f0a1f8bcc6cf4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 75, + "startColumn": 15, + "charOffset": 2003, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 73, + "startColumn": 15, + "charOffset": 1985, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tfor (int i = 16; i < 80; ++i) {\n\t\tW[i] = circularShift(1, W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b213353c84b3b7a334d376a276dd648a45614069382e16b72917b77eaa9ed00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "80 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 75, + "startColumn": 23, + "charOffset": 2011, + "charLength": 2, + "snippet": { + "text": "80" + } + }, + "contextRegion": { + "startLine": 73, + "startColumn": 23, + "charOffset": 1985, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tfor (int i = 16; i < 80; ++i) {\n\t\tW[i] = circularShift(1, W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "554f90cdd5e9de2212c66b4dcdf80d86c8ac135907264abd490b8b386c4a5760" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 3, + "charOffset": 2024, + "charLength": 1, + "snippet": { + "text": "W" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 3, + "charOffset": 1988, + "charLength": 1, + "snippet": { + "text": "\n\tfor (int i = 16; i < 80; ++i) {\n\t\tW[i] = circularShift(1, W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9779c0c2ac4f5ad3344a929bec7afb687dd283a4ed96f4f7689d2be1aa120ebd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 27, + "charOffset": 2048, + "charLength": 1, + "snippet": { + "text": "W" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 27, + "charOffset": 1988, + "charLength": 1, + "snippet": { + "text": "\n\tfor (int i = 16; i < 80; ++i) {\n\t\tW[i] = circularShift(1, W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41eaf6702468a03e64e5eb4a4f8929f35df130c735863d040fade576d1f942ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 38, + "charOffset": 2059, + "charLength": 1, + "snippet": { + "text": "W" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 38, + "charOffset": 1988, + "charLength": 1, + "snippet": { + "text": "\n\tfor (int i = 16; i < 80; ++i) {\n\t\tW[i] = circularShift(1, W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3334848dc1d612a42b38dc56fedbc3a84a331c5982d8768cc3a7e445cb3138bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 44, + "charOffset": 2065, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 44, + "charOffset": 1988, + "charLength": 1, + "snippet": { + "text": "\n\tfor (int i = 16; i < 80; ++i) {\n\t\tW[i] = circularShift(1, W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69deeb4701ad8e557d5e7a8bc77d36715b911b9a5b5079cc6190dc2d784e42ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 49, + "charOffset": 2070, + "charLength": 1, + "snippet": { + "text": "W" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 49, + "charOffset": 1988, + "charLength": 1, + "snippet": { + "text": "\n\tfor (int i = 16; i < 80; ++i) {\n\t\tW[i] = circularShift(1, W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7b4c441348916af65b7415fb0cf88eadc77d1b202ef85fb41b6e712f697b94b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "14 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 55, + "charOffset": 2076, + "charLength": 2, + "snippet": { + "text": "14" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 55, + "charOffset": 1988, + "charLength": 2, + "snippet": { + "text": "\n\tfor (int i = 16; i < 80; ++i) {\n\t\tW[i] = circularShift(1, W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c1dbab872eb529b86ed17d82ad662e91fb3c76538eaacf3881f27bec391a8d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 61, + "charOffset": 2082, + "charLength": 1, + "snippet": { + "text": "W" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 61, + "charOffset": 1988, + "charLength": 1, + "snippet": { + "text": "\n\tfor (int i = 16; i < 80; ++i) {\n\t\tW[i] = circularShift(1, W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "122315ff3780e3812e75669ab54002825f05f36e180bb1d96e789196e24a345d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 67, + "charOffset": 2088, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 67, + "charOffset": 1988, + "charLength": 2, + "snippet": { + "text": "\n\tfor (int i = 16; i < 80; ++i) {\n\t\tW[i] = circularShift(1, W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2842462941babf5374abd2feefe85a4baa3fdfe4560961f2cec4d0d74e775a46" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 79, + "startColumn": 2, + "charOffset": 2099, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 77, + "startColumn": 2, + "charOffset": 2094, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tuint32_t A = H[0], B = H[1], C = H[2], D = H[3], E = H[4];\n\n\tfor (int i = 0; i < 20; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6233b7d1ebdc4195e76cf3479df52195e439299b15d6748a19334a2c962f15e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 79, + "startColumn": 2, + "charOffset": 2099, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 77, + "startColumn": 2, + "charOffset": 2094, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tuint32_t A = H[0], B = H[1], C = H[2], D = H[3], E = H[4];\n\n\tfor (int i = 0; i < 20; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c5e76e0de7acb0fc591c7d2aa1d5f306866cf96d0f63f1044e4e7f664bfd7a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 79, + "startColumn": 15, + "charOffset": 2112, + "charLength": 1, + "snippet": { + "text": "H" + } + }, + "contextRegion": { + "startLine": 77, + "startColumn": 15, + "charOffset": 2094, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tuint32_t A = H[0], B = H[1], C = H[2], D = H[3], E = H[4];\n\n\tfor (int i = 0; i < 20; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e892ef501f545c7ae36bbd0f242feccf233544d671681c04b954a0c1a488d0f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 79, + "startColumn": 25, + "charOffset": 2122, + "charLength": 1, + "snippet": { + "text": "H" + } + }, + "contextRegion": { + "startLine": 77, + "startColumn": 25, + "charOffset": 2094, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tuint32_t A = H[0], B = H[1], C = H[2], D = H[3], E = H[4];\n\n\tfor (int i = 0; i < 20; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6767fc318980a10b0db9d3c0a0f53dc7701185c15fd970dd5d02d2cbc09722fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 79, + "startColumn": 35, + "charOffset": 2132, + "charLength": 1, + "snippet": { + "text": "H" + } + }, + "contextRegion": { + "startLine": 77, + "startColumn": 35, + "charOffset": 2094, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tuint32_t A = H[0], B = H[1], C = H[2], D = H[3], E = H[4];\n\n\tfor (int i = 0; i < 20; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2647e8b996356323cdcde48cbe9f1f3e4c8d42ee65cb78f5809d83bd3d6f9e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 79, + "startColumn": 45, + "charOffset": 2142, + "charLength": 1, + "snippet": { + "text": "H" + } + }, + "contextRegion": { + "startLine": 77, + "startColumn": 45, + "charOffset": 2094, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tuint32_t A = H[0], B = H[1], C = H[2], D = H[3], E = H[4];\n\n\tfor (int i = 0; i < 20; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7dd034f194081d79c5c61e6d919d06eb645cca5078179f94516c39691bfa6bb7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 79, + "startColumn": 55, + "charOffset": 2152, + "charLength": 1, + "snippet": { + "text": "H" + } + }, + "contextRegion": { + "startLine": 77, + "startColumn": 55, + "charOffset": 2094, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tuint32_t A = H[0], B = H[1], C = H[2], D = H[3], E = H[4];\n\n\tfor (int i = 0; i < 20; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f1412f44c65a9aa687984ebe3f59f8aa4dd8f9d7fd6a759b61baf215825a03f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 81, + "startColumn": 2, + "charOffset": 2160, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 79, + "startColumn": 2, + "charOffset": 2098, + "charLength": 3, + "snippet": { + "text": "\tuint32_t A = H[0], B = H[1], C = H[2], D = H[3], E = H[4];\n\n\tfor (int i = 0; i < 20; ++i) {\n\t\tconst uint32_t tmp = circularShift(5, A) + ((B & C) | ((~B) & D)) + E + W[i] + 0x5A827999;\n\t\tE = D;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97c1120b998d5a9a470a1b72d213c2fdd8d8615a8efacab54e82269c87cf3280" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 81, + "startColumn": 22, + "charOffset": 2180, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 79, + "startColumn": 22, + "charOffset": 2098, + "charLength": 2, + "snippet": { + "text": "\tuint32_t A = H[0], B = H[1], C = H[2], D = H[3], E = H[4];\n\n\tfor (int i = 0; i < 20; ++i) {\n\t\tconst uint32_t tmp = circularShift(5, A) + ((B & C) | ((~B) & D)) + E + W[i] + 0x5A827999;\n\t\tE = D;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3e2d5ba645db37450d6a5a3a7c020e45ac8e79dea9372ecc96c9641dae6052b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 82, + "startColumn": 75, + "charOffset": 2265, + "charLength": 1, + "snippet": { + "text": "W" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 75, + "charOffset": 2158, + "charLength": 1, + "snippet": { + "text": "\n\tfor (int i = 0; i < 20; ++i) {\n\t\tconst uint32_t tmp = circularShift(5, A) + ((B & C) | ((~B) & D)) + E + W[i] + 0x5A827999;\n\t\tE = D;\n\t\tD = C;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eaad9c4f4cccf70b87f6346d68974b729e07f5da10256c378ce80bc341025673" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 82, + "startColumn": 82, + "charOffset": 2272, + "charLength": 10, + "snippet": { + "text": "0x5A827999" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 82, + "charOffset": 2158, + "charLength": 10, + "snippet": { + "text": "\n\tfor (int i = 0; i < 20; ++i) {\n\t\tconst uint32_t tmp = circularShift(5, A) + ((B & C) | ((~B) & D)) + E + W[i] + 0x5A827999;\n\t\tE = D;\n\t\tD = C;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3536661b2135ba6fdb0f3c9840867f6daee88791e4f3988ed96f9b5c8850c4ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 85, + "startColumn": 21, + "charOffset": 2322, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 21, + "charOffset": 2284, + "charLength": 2, + "snippet": { + "text": "\t\tE = D;\n\t\tD = C;\n\t\tC = circularShift(30, B);\n\t\tB = A;\n\t\tA = tmp;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "903b64646bfb727f36b6bb9746aeb162613155c5902e75aff4c9d350cd73f36c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 90, + "startColumn": 2, + "charOffset": 2355, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 88, + "startColumn": 2, + "charOffset": 2350, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (int i = 20; i < 40; ++i) {\n\t\tconst uint32_t tmp = circularShift(5, A) + (B ^ C ^ D) + E + W[i] + 0x6ED9EBA1;\n\t\tE = D;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88ed7c2286062d5e46f8bb19549b410ba9d816bd147b60dc92b2c90b0f20754b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 90, + "startColumn": 15, + "charOffset": 2368, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 88, + "startColumn": 15, + "charOffset": 2350, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tfor (int i = 20; i < 40; ++i) {\n\t\tconst uint32_t tmp = circularShift(5, A) + (B ^ C ^ D) + E + W[i] + 0x6ED9EBA1;\n\t\tE = D;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bad442d28e8c37a065a30c5c26b2b8ec47a99ecb49374005d2f2589384b2c6fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 90, + "startColumn": 23, + "charOffset": 2376, + "charLength": 2, + "snippet": { + "text": "40" + } + }, + "contextRegion": { + "startLine": 88, + "startColumn": 23, + "charOffset": 2350, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tfor (int i = 20; i < 40; ++i) {\n\t\tconst uint32_t tmp = circularShift(5, A) + (B ^ C ^ D) + E + W[i] + 0x6ED9EBA1;\n\t\tE = D;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e89adda1d35085072e721e19d02bae214a3148908b3eef159e10ca6ff57763a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 64, + "charOffset": 2450, + "charLength": 1, + "snippet": { + "text": "W" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 64, + "charOffset": 2353, + "charLength": 1, + "snippet": { + "text": "\n\tfor (int i = 20; i < 40; ++i) {\n\t\tconst uint32_t tmp = circularShift(5, A) + (B ^ C ^ D) + E + W[i] + 0x6ED9EBA1;\n\t\tE = D;\n\t\tD = C;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d95b3f740fd2f4d0704189b972f3fdc93a604089bdeadcdcbbd6a12c239143b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 71, + "charOffset": 2457, + "charLength": 10, + "snippet": { + "text": "0x6ED9EBA1" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 71, + "charOffset": 2353, + "charLength": 10, + "snippet": { + "text": "\n\tfor (int i = 20; i < 40; ++i) {\n\t\tconst uint32_t tmp = circularShift(5, A) + (B ^ C ^ D) + E + W[i] + 0x6ED9EBA1;\n\t\tE = D;\n\t\tD = C;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "976c70d51441437819916830ba841b5c5db7fa89912459359463d3abe60e7224" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 94, + "startColumn": 21, + "charOffset": 2507, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 92, + "startColumn": 21, + "charOffset": 2469, + "charLength": 2, + "snippet": { + "text": "\t\tE = D;\n\t\tD = C;\n\t\tC = circularShift(30, B);\n\t\tB = A;\n\t\tA = tmp;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69c12b46c13872cd52117826f6af842da3d4836ec7f8dbd6740e7dc785aaed7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 99, + "startColumn": 2, + "charOffset": 2540, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 97, + "startColumn": 2, + "charOffset": 2535, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (int i = 40; i < 60; ++i) {\n\t\tconst uint32_t tmp = circularShift(5, A) + ((B & C) | (B & D) | (C & D)) + E + W[i] + 0x8F1BBCDC;\n\t\tE = D;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21b3f3f579fa5692d92970202b3dfddb9fe2122697d4a8bd3e306d588f065e85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 99, + "startColumn": 15, + "charOffset": 2553, + "charLength": 2, + "snippet": { + "text": "40" + } + }, + "contextRegion": { + "startLine": 97, + "startColumn": 15, + "charOffset": 2535, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tfor (int i = 40; i < 60; ++i) {\n\t\tconst uint32_t tmp = circularShift(5, A) + ((B & C) | (B & D) | (C & D)) + E + W[i] + 0x8F1BBCDC;\n\t\tE = D;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3d6e9317e16e298beca5b505d043019c9abc268b61ea1569ccec0312c2dd2f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 99, + "startColumn": 23, + "charOffset": 2561, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 97, + "startColumn": 23, + "charOffset": 2535, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tfor (int i = 40; i < 60; ++i) {\n\t\tconst uint32_t tmp = circularShift(5, A) + ((B & C) | (B & D) | (C & D)) + E + W[i] + 0x8F1BBCDC;\n\t\tE = D;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60dd31d37d3255acf60f4ca534364ec8f53d0012c2975b7c3a2b84dbf4442834" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 100, + "startColumn": 82, + "charOffset": 2653, + "charLength": 1, + "snippet": { + "text": "W" + } + }, + "contextRegion": { + "startLine": 98, + "startColumn": 82, + "charOffset": 2538, + "charLength": 1, + "snippet": { + "text": "\n\tfor (int i = 40; i < 60; ++i) {\n\t\tconst uint32_t tmp = circularShift(5, A) + ((B & C) | (B & D) | (C & D)) + E + W[i] + 0x8F1BBCDC;\n\t\tE = D;\n\t\tD = C;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "549a25ed1fb8da9a78291d02bba8981a85a35d336c4b802ee7cbebcb9319b5a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 103, + "startColumn": 21, + "charOffset": 2710, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 101, + "startColumn": 21, + "charOffset": 2672, + "charLength": 2, + "snippet": { + "text": "\t\tE = D;\n\t\tD = C;\n\t\tC = circularShift(30, B);\n\t\tB = A;\n\t\tA = tmp;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81ac620dd4497b0325581b5c1f3128fb6a3d46dfac6b663c1bf8962ca248bf96" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 108, + "startColumn": 2, + "charOffset": 2743, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 2, + "charOffset": 2738, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (int i = 60; i < 80; ++i) {\n\t\tconst uint32_t tmp = circularShift(5, A) + (B ^ C ^ D) + E + W[i] + 0xCA62C1D6;\n\t\tE = D;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a4097530c40324fc1201e134d78f127e9421528fd156a1e690388479704689d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 108, + "startColumn": 15, + "charOffset": 2756, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 15, + "charOffset": 2738, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tfor (int i = 60; i < 80; ++i) {\n\t\tconst uint32_t tmp = circularShift(5, A) + (B ^ C ^ D) + E + W[i] + 0xCA62C1D6;\n\t\tE = D;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "535b5e0de8cfb2646567f37a2e64f85a64e4f7f623891695e523f1f4b4034e3a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "80 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 108, + "startColumn": 23, + "charOffset": 2764, + "charLength": 2, + "snippet": { + "text": "80" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 23, + "charOffset": 2738, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tfor (int i = 60; i < 80; ++i) {\n\t\tconst uint32_t tmp = circularShift(5, A) + (B ^ C ^ D) + E + W[i] + 0xCA62C1D6;\n\t\tE = D;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae1a27a6102029b8d11aa5054f8d4dbb2ada35a47aeadf8407cbac340bc943ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 109, + "startColumn": 64, + "charOffset": 2838, + "charLength": 1, + "snippet": { + "text": "W" + } + }, + "contextRegion": { + "startLine": 107, + "startColumn": 64, + "charOffset": 2741, + "charLength": 1, + "snippet": { + "text": "\n\tfor (int i = 60; i < 80; ++i) {\n\t\tconst uint32_t tmp = circularShift(5, A) + (B ^ C ^ D) + E + W[i] + 0xCA62C1D6;\n\t\tE = D;\n\t\tD = C;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7b4c441348916af65b7415fb0cf88eadc77d1b202ef85fb41b6e712f697b94b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 112, + "startColumn": 21, + "charOffset": 2895, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 110, + "startColumn": 21, + "charOffset": 2857, + "charLength": 2, + "snippet": { + "text": "\t\tE = D;\n\t\tD = C;\n\t\tC = circularShift(30, B);\n\t\tB = A;\n\t\tA = tmp;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52f818d0b1f774df82a7e31320cff0c2e19d20ac4e7f65dc48580024eb0df545" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 117, + "startColumn": 2, + "charOffset": 2928, + "charLength": 1, + "snippet": { + "text": "H" + } + }, + "contextRegion": { + "startLine": 115, + "startColumn": 2, + "charOffset": 2923, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tH[0] += A;\n\tH[1] += B;\n\tH[2] += C;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "430e6f9d704ada8334fb5597c95a9f068f2d8592c711c3d446317d20fd6fc019" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 118, + "startColumn": 2, + "charOffset": 2940, + "charLength": 1, + "snippet": { + "text": "H" + } + }, + "contextRegion": { + "startLine": 116, + "startColumn": 2, + "charOffset": 2926, + "charLength": 1, + "snippet": { + "text": "\n\tH[0] += A;\n\tH[1] += B;\n\tH[2] += C;\n\tH[3] += D;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d93c95351428a7ec7338c871578a2cf4e98e742869cc5a3506ec671215be0113" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 119, + "startColumn": 2, + "charOffset": 2952, + "charLength": 1, + "snippet": { + "text": "H" + } + }, + "contextRegion": { + "startLine": 117, + "startColumn": 2, + "charOffset": 2927, + "charLength": 1, + "snippet": { + "text": "\tH[0] += A;\n\tH[1] += B;\n\tH[2] += C;\n\tH[3] += D;\n\tH[4] += E;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "093cbbfbbd1b8fc088a93000d2e25cb4366a2ce07aefac3c2ac4138c65d2ba91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 120, + "startColumn": 2, + "charOffset": 2964, + "charLength": 1, + "snippet": { + "text": "H" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 2, + "charOffset": 2939, + "charLength": 1, + "snippet": { + "text": "\tH[1] += B;\n\tH[2] += C;\n\tH[3] += D;\n\tH[4] += E;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16f4bdb24f8dfebd368c279f69d9014bae5fd340977f00736ee59ee6dc29cc5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 121, + "startColumn": 2, + "charOffset": 2976, + "charLength": 1, + "snippet": { + "text": "H" + } + }, + "contextRegion": { + "startLine": 119, + "startColumn": 2, + "charOffset": 2951, + "charLength": 1, + "snippet": { + "text": "\tH[2] += C;\n\tH[3] += D;\n\tH[4] += E;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5edb576121d53bb38b927dede96bdb6c94d72aeb623d5b4c5a408e00abb37d3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-c-arrays", + "ruleIndex": 480, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not declare C-style arrays, use std::array<> instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 125, + "startColumn": 2, + "charOffset": 3047, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 123, + "startColumn": 2, + "charOffset": 2989, + "charLength": 8, + "snippet": { + "text": "\nstd::string transformToSHA1(const std::string &input) {\n\tuint32_t H[] = {\n\t\t0x67452301,\n\t\t0xEFCDAB89," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80968a54e34b16c139d4855e49e93411b1d38bf5aba51bc408cb55cacfd382a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 126, + "startColumn": 3, + "charOffset": 3066, + "charLength": 10, + "snippet": { + "text": "0x67452301" + } + }, + "contextRegion": { + "startLine": 124, + "startColumn": 3, + "charOffset": 2990, + "charLength": 10, + "snippet": { + "text": "std::string transformToSHA1(const std::string &input) {\n\tuint32_t H[] = {\n\t\t0x67452301,\n\t\t0xEFCDAB89,\n\t\t0x98BADCFE," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4137a270894452c49c3e0f0ca1cfb4224c5aa407ec7ac6d2dccc49c8b7e5527c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x67452301 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 126, + "startColumn": 3, + "charOffset": 3066, + "charLength": 10, + "snippet": { + "text": "0x67452301" + } + }, + "contextRegion": { + "startLine": 124, + "startColumn": 3, + "charOffset": 2990, + "charLength": 10, + "snippet": { + "text": "std::string transformToSHA1(const std::string &input) {\n\tuint32_t H[] = {\n\t\t0x67452301,\n\t\t0xEFCDAB89,\n\t\t0x98BADCFE," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0cd7adf960fb8dbe9ff87e14a79ce6b2ce6e3bc1ee0474a2d779dd86b1ba28f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xEFCDAB89 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 127, + "startColumn": 3, + "charOffset": 3080, + "charLength": 10, + "snippet": { + "text": "0xEFCDAB89" + } + }, + "contextRegion": { + "startLine": 125, + "startColumn": 3, + "charOffset": 3046, + "charLength": 10, + "snippet": { + "text": "\tuint32_t H[] = {\n\t\t0x67452301,\n\t\t0xEFCDAB89,\n\t\t0x98BADCFE,\n\t\t0x10325476," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1465a8ef3fe99f88a2cb1904f218de731ef84dcfadfee6f216e33cc4d722b656" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x98BADCFE is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 128, + "startColumn": 3, + "charOffset": 3094, + "charLength": 10, + "snippet": { + "text": "0x98BADCFE" + } + }, + "contextRegion": { + "startLine": 126, + "startColumn": 3, + "charOffset": 3064, + "charLength": 10, + "snippet": { + "text": "\t\t0x67452301,\n\t\t0xEFCDAB89,\n\t\t0x98BADCFE,\n\t\t0x10325476,\n\t\t0xC3D2E1F0" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad86effb5ef332f1378a4d44e988220634404358b185617f3f36c540ef4c62b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 129, + "startColumn": 3, + "charOffset": 3108, + "charLength": 10, + "snippet": { + "text": "0x10325476" + } + }, + "contextRegion": { + "startLine": 127, + "startColumn": 3, + "charOffset": 3078, + "charLength": 10, + "snippet": { + "text": "\t\t0xEFCDAB89,\n\t\t0x98BADCFE,\n\t\t0x10325476,\n\t\t0xC3D2E1F0\n\t};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "acc573ee9b1c17c9ea600d892b56a7730836a41b5b8ff8d212f18ae4b62e060f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x10325476 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 129, + "startColumn": 3, + "charOffset": 3108, + "charLength": 10, + "snippet": { + "text": "0x10325476" + } + }, + "contextRegion": { + "startLine": 127, + "startColumn": 3, + "charOffset": 3078, + "charLength": 10, + "snippet": { + "text": "\t\t0xEFCDAB89,\n\t\t0x98BADCFE,\n\t\t0x10325476,\n\t\t0xC3D2E1F0\n\t};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8c5e80279b9f656d19faa2f7e13e82455662c57f54a787203acc5dc9449d553" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xC3D2E1F0 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 130, + "startColumn": 3, + "charOffset": 3122, + "charLength": 10, + "snippet": { + "text": "0xC3D2E1F0" + } + }, + "contextRegion": { + "startLine": 128, + "startColumn": 3, + "charOffset": 3092, + "charLength": 10, + "snippet": { + "text": "\t\t0x98BADCFE,\n\t\t0x10325476,\n\t\t0xC3D2E1F0\n\t};\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c08e812b3a0d4f4f37af4b27235093631947b92143d5d09e5c79cc864481792" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-c-arrays", + "ruleIndex": 480, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not declare C-style arrays, use std::array<> instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 133, + "startColumn": 2, + "charOffset": 3139, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 131, + "startColumn": 2, + "charOffset": 3133, + "charLength": 7, + "snippet": { + "text": "\t};\n\n\tuint8_t messageBlock[64];\n\tsize_t index = 0;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "060530b602f29d44ac6fed37c1a1e19ec493e132fca9bc17e55fbc09d80f4974" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "64 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 133, + "startColumn": 23, + "charOffset": 3160, + "charLength": 2, + "snippet": { + "text": "64" + } + }, + "contextRegion": { + "startLine": 131, + "startColumn": 23, + "charOffset": 3133, + "charLength": 2, + "snippet": { + "text": "\t};\n\n\tuint8_t messageBlock[64];\n\tsize_t index = 0;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "510c5ae307a15858bcb58de3a053d62465ab8ec019d9ef6a10a04dac29dd24e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 138, + "startColumn": 2, + "charOffset": 3239, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 136, + "startColumn": 2, + "charOffset": 3185, + "charLength": 3, + "snippet": { + "text": "\tuint32_t length_low = 0;\n\tuint32_t length_high = 0;\n\tfor (char ch : input) {\n\t\tmessageBlock[index++] = ch;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5c0688516004be5689ca29b0f71d9d63a8bed015de6d827ec93efdced6ff111" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-11", + "ruleIndex": 423, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-11: The plain char type shall only be used for the storage and use of character values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 138, + "startColumn": 12, + "charOffset": 3249, + "charLength": 2, + "snippet": { + "text": "ch" + } + }, + "contextRegion": { + "startLine": 136, + "startColumn": 12, + "charOffset": 3185, + "charLength": 2, + "snippet": { + "text": "\tuint32_t length_low = 0;\n\tuint32_t length_high = 0;\n\tfor (char ch : input) {\n\t\tmessageBlock[index++] = ch;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cdd74d8ba563f7efa361f7043fc2016c4b1948f2782f876001043dbe3e6ec3cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-12", + "ruleIndex": 424, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-12: signed char and unsigned char type shall only be used for the storage and use of numeric values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 139, + "startColumn": 3, + "charOffset": 3265, + "charLength": 12, + "snippet": { + "text": "messageBlock" + } + }, + "contextRegion": { + "startLine": 137, + "startColumn": 3, + "charOffset": 3211, + "charLength": 12, + "snippet": { + "text": "\tuint32_t length_high = 0;\n\tfor (char ch : input) {\n\t\tmessageBlock[index++] = ch;\n\n\t\tlength_low += 8;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4000e0cdedac128f9369b06f69a55f29727a16dc094b390e20dee8f5e7c2788a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 139, + "startColumn": 3, + "charOffset": 3265, + "charLength": 12, + "snippet": { + "text": "messageBlock" + } + }, + "contextRegion": { + "startLine": 137, + "startColumn": 3, + "charOffset": 3211, + "charLength": 12, + "snippet": { + "text": "\tuint32_t length_high = 0;\n\tfor (char ch : input) {\n\t\tmessageBlock[index++] = ch;\n\n\t\tlength_low += 8;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92d21a91c7feb5338e1868d84c875bc84b83c9576ba2509818df51eadf6b1d97" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 141, + "startColumn": 17, + "charOffset": 3310, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 139, + "startColumn": 17, + "charOffset": 3263, + "charLength": 1, + "snippet": { + "text": "\t\tmessageBlock[index++] = ch;\n\n\t\tlength_low += 8;\n\t\tif (length_low == 0) {\n\t\t\tlength_high++;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "590b3d6350196716d59b7158e22713278ef4c337b0a125bd10769e99b5ccc0e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "64 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 146, + "startColumn": 16, + "charOffset": 3376, + "charLength": 2, + "snippet": { + "text": "64" + } + }, + "contextRegion": { + "startLine": 144, + "startColumn": 16, + "charOffset": 3356, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (index == 64) {\n\t\t\tprocessSHA1MessageBlock(messageBlock, H);\n\t\t\tindex = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a634a0c05e21542997022b7d116bfe92f7c0f7e9ca94dfd266d0588fc665404d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 147, + "startColumn": 28, + "charOffset": 3409, + "charLength": 12, + "snippet": { + "text": "messageBlock" + } + }, + "contextRegion": { + "startLine": 145, + "startColumn": 28, + "charOffset": 3360, + "charLength": 12, + "snippet": { + "text": "\n\t\tif (index == 64) {\n\t\t\tprocessSHA1MessageBlock(messageBlock, H);\n\t\t\tindex = 0;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "659cd00f9abdefa8a0e0385711f2158cf999b911f6f85654f6a7b03384c92286" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 147, + "startColumn": 28, + "charOffset": 3409, + "charLength": 12, + "snippet": { + "text": "messageBlock" + } + }, + "contextRegion": { + "startLine": 145, + "startColumn": 28, + "charOffset": 3360, + "charLength": 12, + "snippet": { + "text": "\n\t\tif (index == 64) {\n\t\t\tprocessSHA1MessageBlock(messageBlock, H);\n\t\t\tindex = 0;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cced276576ad3e1e6ce997024821cb0366bd4da104d17757cb6d467bc047ee1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 147, + "startColumn": 42, + "charOffset": 3423, + "charLength": 1, + "snippet": { + "text": "H" + } + }, + "contextRegion": { + "startLine": 145, + "startColumn": 42, + "charOffset": 3360, + "charLength": 1, + "snippet": { + "text": "\n\t\tif (index == 64) {\n\t\t\tprocessSHA1MessageBlock(messageBlock, H);\n\t\t\tindex = 0;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "724e920a50914a25712aae174ec5b687768933895fe800fc6eb0fc61ddbb8fc8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 147, + "startColumn": 42, + "charOffset": 3423, + "charLength": 1, + "snippet": { + "text": "H" + } + }, + "contextRegion": { + "startLine": 145, + "startColumn": 42, + "charOffset": 3360, + "charLength": 1, + "snippet": { + "text": "\n\t\tif (index == 64) {\n\t\t\tprocessSHA1MessageBlock(messageBlock, H);\n\t\t\tindex = 0;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3570d0bef8484b9d8e29c6d7dd6d080266f5ce8a718c7ab38f696747a7c01d61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 152, + "startColumn": 2, + "charOffset": 3450, + "charLength": 12, + "snippet": { + "text": "messageBlock" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 2, + "charOffset": 3445, + "charLength": 12, + "snippet": { + "text": "\t}\n\n\tmessageBlock[index++] = 0x80;\n\n\tif (index > 56) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12cdec96111bf4f0ffaa28c32ba7dea2cab14200809baf5c7b9772b5621259c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 152, + "startColumn": 26, + "charOffset": 3474, + "charLength": 4, + "snippet": { + "text": "0x80" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 26, + "charOffset": 3445, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tmessageBlock[index++] = 0x80;\n\n\tif (index > 56) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7af4f07144f1b2405b73f54f30336756d228329fd0c368069e8b204542a1476f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x80 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 152, + "startColumn": 26, + "charOffset": 3474, + "charLength": 4, + "snippet": { + "text": "0x80" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 26, + "charOffset": 3445, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tmessageBlock[index++] = 0x80;\n\n\tif (index > 56) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b15909f94629a3382bc3a1d61cbdd5ae9b6e3440e1cf34bec32676447dafefb7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "56 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 154, + "startColumn": 14, + "charOffset": 3494, + "charLength": 2, + "snippet": { + "text": "56" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 14, + "charOffset": 3449, + "charLength": 2, + "snippet": { + "text": "\tmessageBlock[index++] = 0x80;\n\n\tif (index > 56) {\n\t\twhile (index < 64) {\n\t\t\tmessageBlock[index++] = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d15126986f9694d04cc4943aa7d75a2e50533fe8b90bbb223f73b3c64ac1cab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 155, + "startColumn": 3, + "charOffset": 3502, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 153, + "startColumn": 3, + "charOffset": 3480, + "charLength": 5, + "snippet": { + "text": "\n\tif (index > 56) {\n\t\twhile (index < 64) {\n\t\t\tmessageBlock[index++] = 0;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4567c8c927742f93ddf2ecaec9b5af51c5097bf3a8689328993e4c03d90723b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'index' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 155, + "startColumn": 10, + "charOffset": 3509, + "charLength": 5, + "snippet": { + "text": "index" + } + }, + "contextRegion": { + "startLine": 153, + "startColumn": 10, + "charOffset": 3480, + "charLength": 5, + "snippet": { + "text": "\n\tif (index > 56) {\n\t\twhile (index < 64) {\n\t\t\tmessageBlock[index++] = 0;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89f0647b1c357f330aa7b7372ad736361faf9b068833d095b28e585088534077" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "64 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 155, + "startColumn": 18, + "charOffset": 3517, + "charLength": 2, + "snippet": { + "text": "64" + } + }, + "contextRegion": { + "startLine": 153, + "startColumn": 18, + "charOffset": 3480, + "charLength": 2, + "snippet": { + "text": "\n\tif (index > 56) {\n\t\twhile (index < 64) {\n\t\t\tmessageBlock[index++] = 0;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba76ea800fd35b3650a0db2b0bf9685ab294d62e598e9aedae789fcb70a49ca9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 156, + "startColumn": 4, + "charOffset": 3526, + "charLength": 12, + "snippet": { + "text": "messageBlock" + } + }, + "contextRegion": { + "startLine": 154, + "startColumn": 4, + "charOffset": 3481, + "charLength": 12, + "snippet": { + "text": "\tif (index > 56) {\n\t\twhile (index < 64) {\n\t\t\tmessageBlock[index++] = 0;\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd0c9c60748e23c64ee1a4893d656c828c42ec5fdd54d45907e17f41712ecfa7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 159, + "startColumn": 27, + "charOffset": 3584, + "charLength": 12, + "snippet": { + "text": "messageBlock" + } + }, + "contextRegion": { + "startLine": 157, + "startColumn": 27, + "charOffset": 3553, + "charLength": 12, + "snippet": { + "text": "\t\t}\n\n\t\tprocessSHA1MessageBlock(messageBlock, H);\n\t\tindex = 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d67faa7e66a8d25f52a15be6c624779631302c187709beb4a0b4296676a38bcd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 159, + "startColumn": 27, + "charOffset": 3584, + "charLength": 12, + "snippet": { + "text": "messageBlock" + } + }, + "contextRegion": { + "startLine": 157, + "startColumn": 27, + "charOffset": 3553, + "charLength": 12, + "snippet": { + "text": "\t\t}\n\n\t\tprocessSHA1MessageBlock(messageBlock, H);\n\t\tindex = 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d620e8339009ff9f7ea05abcd3a6c9c201f0e2d105b60550d18066ad3d4371a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 159, + "startColumn": 41, + "charOffset": 3598, + "charLength": 1, + "snippet": { + "text": "H" + } + }, + "contextRegion": { + "startLine": 157, + "startColumn": 41, + "charOffset": 3553, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tprocessSHA1MessageBlock(messageBlock, H);\n\t\tindex = 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce0403963fe43be082d8eb2292c9fd041a6325195ab5c2743adfad78f66438e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 159, + "startColumn": 41, + "charOffset": 3598, + "charLength": 1, + "snippet": { + "text": "H" + } + }, + "contextRegion": { + "startLine": 157, + "startColumn": 41, + "charOffset": 3553, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tprocessSHA1MessageBlock(messageBlock, H);\n\t\tindex = 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2350e7d2f2efd0d1e914f6e61d7c6d793e40386f5c57112b1e40b37f495ae0a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 163, + "startColumn": 2, + "charOffset": 3620, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 161, + "startColumn": 2, + "charOffset": 3615, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\twhile (index < 56) {\n\t\tmessageBlock[index++] = 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f693385e37f299070bb16bd1289d07c1658cc940c5a0d52011a779a486674675" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'index' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 163, + "startColumn": 9, + "charOffset": 3627, + "charLength": 5, + "snippet": { + "text": "index" + } + }, + "contextRegion": { + "startLine": 161, + "startColumn": 9, + "charOffset": 3615, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\twhile (index < 56) {\n\t\tmessageBlock[index++] = 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1aa46661a96fad319a7feb4a45e2c96f31b113a0531f8c985128e7ea1c02440c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "56 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 163, + "startColumn": 17, + "charOffset": 3635, + "charLength": 2, + "snippet": { + "text": "56" + } + }, + "contextRegion": { + "startLine": 161, + "startColumn": 17, + "charOffset": 3615, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\twhile (index < 56) {\n\t\tmessageBlock[index++] = 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "601b53fc1d1e64305380f954b15bb2e7abc69736a09cfff3627aff341a4f8d9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 164, + "startColumn": 3, + "charOffset": 3643, + "charLength": 12, + "snippet": { + "text": "messageBlock" + } + }, + "contextRegion": { + "startLine": 162, + "startColumn": 3, + "charOffset": 3618, + "charLength": 12, + "snippet": { + "text": "\n\twhile (index < 56) {\n\t\tmessageBlock[index++] = 0;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8bfbf5644d37942ac705cac1d6b32b9b7c7b3719b275371555d6f4ab8417799" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "56 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 15, + "charOffset": 3688, + "charLength": 2, + "snippet": { + "text": "56" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 15, + "charOffset": 3670, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tmessageBlock[56] = length_high >> 24;\n\tmessageBlock[57] = length_high >> 16;\n\tmessageBlock[58] = length_high >> 8;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "899a09ab09259fcbcc4dcd3747671fb56f9b084a63ccd99328d6ff2c829ce06a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 21, + "charOffset": 3694, + "charLength": 11, + "snippet": { + "text": "length_high" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 21, + "charOffset": 3670, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\tmessageBlock[56] = length_high >> 24;\n\tmessageBlock[57] = length_high >> 16;\n\tmessageBlock[58] = length_high >> 8;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80bb4b4e7f90d13764a3fdb14fa66420632c9b62f86c06c4f5cb781cff6aba86" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 36, + "charOffset": 3709, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 36, + "charOffset": 3670, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tmessageBlock[56] = length_high >> 24;\n\tmessageBlock[57] = length_high >> 16;\n\tmessageBlock[58] = length_high >> 8;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6796d0e27419d0f665a535816300d778ba1b4c98e7a3ae113b607b25e897b39d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 36, + "charOffset": 3709, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 36, + "charOffset": 3670, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tmessageBlock[56] = length_high >> 24;\n\tmessageBlock[57] = length_high >> 16;\n\tmessageBlock[58] = length_high >> 8;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ebd01d6d56aab7c956155258b22a3bb78fd1fdacdd00f0ca172f6d5e18954fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "57 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 168, + "startColumn": 15, + "charOffset": 3727, + "charLength": 2, + "snippet": { + "text": "57" + } + }, + "contextRegion": { + "startLine": 166, + "startColumn": 15, + "charOffset": 3673, + "charLength": 2, + "snippet": { + "text": "\n\tmessageBlock[56] = length_high >> 24;\n\tmessageBlock[57] = length_high >> 16;\n\tmessageBlock[58] = length_high >> 8;\n\tmessageBlock[59] = length_high;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "494650bc40742a33dd9e77ad21af63cb0f45ab14a315a232bd708c70ad907adf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 168, + "startColumn": 21, + "charOffset": 3733, + "charLength": 11, + "snippet": { + "text": "length_high" + } + }, + "contextRegion": { + "startLine": 166, + "startColumn": 21, + "charOffset": 3673, + "charLength": 11, + "snippet": { + "text": "\n\tmessageBlock[56] = length_high >> 24;\n\tmessageBlock[57] = length_high >> 16;\n\tmessageBlock[58] = length_high >> 8;\n\tmessageBlock[59] = length_high;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bdd9d416ca78039f3ab39699a2c647073fb4d0a66d705db1f5a1435edbf9615" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 168, + "startColumn": 36, + "charOffset": 3748, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 166, + "startColumn": 36, + "charOffset": 3673, + "charLength": 2, + "snippet": { + "text": "\n\tmessageBlock[56] = length_high >> 24;\n\tmessageBlock[57] = length_high >> 16;\n\tmessageBlock[58] = length_high >> 8;\n\tmessageBlock[59] = length_high;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f96356ca85a7445987b0dac268d059a35efe275ad57614c73d19383aa409ae7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 168, + "startColumn": 36, + "charOffset": 3748, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 166, + "startColumn": 36, + "charOffset": 3673, + "charLength": 2, + "snippet": { + "text": "\n\tmessageBlock[56] = length_high >> 24;\n\tmessageBlock[57] = length_high >> 16;\n\tmessageBlock[58] = length_high >> 8;\n\tmessageBlock[59] = length_high;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8677efc8139faf62d0bf2b07fb6f8280387d1912fcd2682fa7810412f8a1a864" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "58 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 169, + "startColumn": 15, + "charOffset": 3766, + "charLength": 2, + "snippet": { + "text": "58" + } + }, + "contextRegion": { + "startLine": 167, + "startColumn": 15, + "charOffset": 3674, + "charLength": 2, + "snippet": { + "text": "\tmessageBlock[56] = length_high >> 24;\n\tmessageBlock[57] = length_high >> 16;\n\tmessageBlock[58] = length_high >> 8;\n\tmessageBlock[59] = length_high;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1a2637fbb51cce2e869e47c1a0dc879eecbdd24cf02e1db3ae7aced2df15a35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 169, + "startColumn": 21, + "charOffset": 3772, + "charLength": 11, + "snippet": { + "text": "length_high" + } + }, + "contextRegion": { + "startLine": 167, + "startColumn": 21, + "charOffset": 3674, + "charLength": 11, + "snippet": { + "text": "\tmessageBlock[56] = length_high >> 24;\n\tmessageBlock[57] = length_high >> 16;\n\tmessageBlock[58] = length_high >> 8;\n\tmessageBlock[59] = length_high;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "018901cceedd8f1d61b62e0f34a46ca96262d618b26e87a871be0da161943686" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 169, + "startColumn": 36, + "charOffset": 3787, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 167, + "startColumn": 36, + "charOffset": 3674, + "charLength": 1, + "snippet": { + "text": "\tmessageBlock[56] = length_high >> 24;\n\tmessageBlock[57] = length_high >> 16;\n\tmessageBlock[58] = length_high >> 8;\n\tmessageBlock[59] = length_high;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "556dd832ea78f5ae1d44497dbe29af983d58d3f3cf386de4cf523feb0af509ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 169, + "startColumn": 36, + "charOffset": 3787, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 167, + "startColumn": 36, + "charOffset": 3674, + "charLength": 1, + "snippet": { + "text": "\tmessageBlock[56] = length_high >> 24;\n\tmessageBlock[57] = length_high >> 16;\n\tmessageBlock[58] = length_high >> 8;\n\tmessageBlock[59] = length_high;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22fe0d483c9fc0b029b738c8871ead3b7e31ac80a1b04034c6f2de21c2843f56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "59 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 170, + "startColumn": 15, + "charOffset": 3804, + "charLength": 2, + "snippet": { + "text": "59" + } + }, + "contextRegion": { + "startLine": 168, + "startColumn": 15, + "charOffset": 3713, + "charLength": 2, + "snippet": { + "text": "\tmessageBlock[57] = length_high >> 16;\n\tmessageBlock[58] = length_high >> 8;\n\tmessageBlock[59] = length_high;\n\n\tmessageBlock[60] = length_low >> 24;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d3fe80478eec649cd8884f2c4849fa2229f3b99a7ed10ad5c0fe5c034d98a3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 170, + "startColumn": 21, + "charOffset": 3810, + "charLength": 11, + "snippet": { + "text": "length_high" + } + }, + "contextRegion": { + "startLine": 168, + "startColumn": 21, + "charOffset": 3713, + "charLength": 11, + "snippet": { + "text": "\tmessageBlock[57] = length_high >> 16;\n\tmessageBlock[58] = length_high >> 8;\n\tmessageBlock[59] = length_high;\n\n\tmessageBlock[60] = length_low >> 24;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2a5e923e644337255d75811797d654f5564309b7c2e1ab32643e23100862258" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 15, + "charOffset": 3838, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 15, + "charOffset": 3790, + "charLength": 2, + "snippet": { + "text": "\tmessageBlock[59] = length_high;\n\n\tmessageBlock[60] = length_low >> 24;\n\tmessageBlock[61] = length_low >> 16;\n\tmessageBlock[62] = length_low >> 8;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69135b976cf325ce7f77da686955c199cfab12456e928afdc4c077e821b455ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 21, + "charOffset": 3844, + "charLength": 10, + "snippet": { + "text": "length_low" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 21, + "charOffset": 3790, + "charLength": 10, + "snippet": { + "text": "\tmessageBlock[59] = length_high;\n\n\tmessageBlock[60] = length_low >> 24;\n\tmessageBlock[61] = length_low >> 16;\n\tmessageBlock[62] = length_low >> 8;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "607d1b25b03423bdc05369de488aaf7f2612fc2cad40cb162044ab4c7c1a1078" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 35, + "charOffset": 3858, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 35, + "charOffset": 3790, + "charLength": 2, + "snippet": { + "text": "\tmessageBlock[59] = length_high;\n\n\tmessageBlock[60] = length_low >> 24;\n\tmessageBlock[61] = length_low >> 16;\n\tmessageBlock[62] = length_low >> 8;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db3677318931fa02ffbe67b2b72eb8df266f4435c73c94b67141c83e4fad9aa9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 35, + "charOffset": 3858, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 35, + "charOffset": 3790, + "charLength": 2, + "snippet": { + "text": "\tmessageBlock[59] = length_high;\n\n\tmessageBlock[60] = length_low >> 24;\n\tmessageBlock[61] = length_low >> 16;\n\tmessageBlock[62] = length_low >> 8;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b1efbe89ace12fdaf546d331742c1b85a50ad8c8cb2627001e5502f4a9df4f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "61 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 173, + "startColumn": 15, + "charOffset": 3876, + "charLength": 2, + "snippet": { + "text": "61" + } + }, + "contextRegion": { + "startLine": 171, + "startColumn": 15, + "charOffset": 3823, + "charLength": 2, + "snippet": { + "text": "\n\tmessageBlock[60] = length_low >> 24;\n\tmessageBlock[61] = length_low >> 16;\n\tmessageBlock[62] = length_low >> 8;\n\tmessageBlock[63] = length_low;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b09b4e17620cddc5c19bbe4b94616e411acbe44a54e9eb1b70da8e6105a826c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 173, + "startColumn": 21, + "charOffset": 3882, + "charLength": 10, + "snippet": { + "text": "length_low" + } + }, + "contextRegion": { + "startLine": 171, + "startColumn": 21, + "charOffset": 3823, + "charLength": 10, + "snippet": { + "text": "\n\tmessageBlock[60] = length_low >> 24;\n\tmessageBlock[61] = length_low >> 16;\n\tmessageBlock[62] = length_low >> 8;\n\tmessageBlock[63] = length_low;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32111026b57798c9e379bc52c321727310e5182b91c64e3ffa9238d7c3dcedab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 173, + "startColumn": 35, + "charOffset": 3896, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 171, + "startColumn": 35, + "charOffset": 3823, + "charLength": 2, + "snippet": { + "text": "\n\tmessageBlock[60] = length_low >> 24;\n\tmessageBlock[61] = length_low >> 16;\n\tmessageBlock[62] = length_low >> 8;\n\tmessageBlock[63] = length_low;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "367fcbbcde664539869000640b90e58908022034c3f71f634c8544a295db157e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 173, + "startColumn": 35, + "charOffset": 3896, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 171, + "startColumn": 35, + "charOffset": 3823, + "charLength": 2, + "snippet": { + "text": "\n\tmessageBlock[60] = length_low >> 24;\n\tmessageBlock[61] = length_low >> 16;\n\tmessageBlock[62] = length_low >> 8;\n\tmessageBlock[63] = length_low;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ecb5090319add52d066ee201a067322c90a8af533f2537b266299150069beb51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "62 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 174, + "startColumn": 15, + "charOffset": 3914, + "charLength": 2, + "snippet": { + "text": "62" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 15, + "charOffset": 3824, + "charLength": 2, + "snippet": { + "text": "\tmessageBlock[60] = length_low >> 24;\n\tmessageBlock[61] = length_low >> 16;\n\tmessageBlock[62] = length_low >> 8;\n\tmessageBlock[63] = length_low;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39791d0a5f1e12796055baab36b778564400b14a32febc9218bb54703dbc51f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 174, + "startColumn": 21, + "charOffset": 3920, + "charLength": 10, + "snippet": { + "text": "length_low" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 21, + "charOffset": 3824, + "charLength": 10, + "snippet": { + "text": "\tmessageBlock[60] = length_low >> 24;\n\tmessageBlock[61] = length_low >> 16;\n\tmessageBlock[62] = length_low >> 8;\n\tmessageBlock[63] = length_low;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d71b17e048ff305841ac0d0913bc8712c42accb4b5ccd603d5bbb04a4b83843a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 174, + "startColumn": 35, + "charOffset": 3934, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 35, + "charOffset": 3824, + "charLength": 1, + "snippet": { + "text": "\tmessageBlock[60] = length_low >> 24;\n\tmessageBlock[61] = length_low >> 16;\n\tmessageBlock[62] = length_low >> 8;\n\tmessageBlock[63] = length_low;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30865e92731b8ce948686dd070f5efcbd7a0160c5b7234d06d11356f108515ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 174, + "startColumn": 35, + "charOffset": 3934, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 35, + "charOffset": 3824, + "charLength": 1, + "snippet": { + "text": "\tmessageBlock[60] = length_low >> 24;\n\tmessageBlock[61] = length_low >> 16;\n\tmessageBlock[62] = length_low >> 8;\n\tmessageBlock[63] = length_low;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc75d215886b1ae88266a9a03c2b6d7441d587b0ed86e9b3318fb886d8b59a70" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "63 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 175, + "startColumn": 15, + "charOffset": 3951, + "charLength": 2, + "snippet": { + "text": "63" + } + }, + "contextRegion": { + "startLine": 173, + "startColumn": 15, + "charOffset": 3862, + "charLength": 2, + "snippet": { + "text": "\tmessageBlock[61] = length_low >> 16;\n\tmessageBlock[62] = length_low >> 8;\n\tmessageBlock[63] = length_low;\n\n\tprocessSHA1MessageBlock(messageBlock, H);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75932aea9bf2002315bab4c13dda592e302dc8a3332990d6c98f9328d13a2787" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 175, + "startColumn": 21, + "charOffset": 3957, + "charLength": 10, + "snippet": { + "text": "length_low" + } + }, + "contextRegion": { + "startLine": 173, + "startColumn": 21, + "charOffset": 3862, + "charLength": 10, + "snippet": { + "text": "\tmessageBlock[61] = length_low >> 16;\n\tmessageBlock[62] = length_low >> 8;\n\tmessageBlock[63] = length_low;\n\n\tprocessSHA1MessageBlock(messageBlock, H);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2503473d8f57aec66005a4e2585f4bf0738845ba324f34aa4f48f63fc1c59d55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 177, + "startColumn": 26, + "charOffset": 3995, + "charLength": 12, + "snippet": { + "text": "messageBlock" + } + }, + "contextRegion": { + "startLine": 175, + "startColumn": 26, + "charOffset": 3937, + "charLength": 12, + "snippet": { + "text": "\tmessageBlock[63] = length_low;\n\n\tprocessSHA1MessageBlock(messageBlock, H);\n\n\tchar hexstring[41];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d48496e1f44cc2a5a97fbf3fcd579270eedd62ecabb5fbb4333dded2e5a0dbd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 177, + "startColumn": 26, + "charOffset": 3995, + "charLength": 12, + "snippet": { + "text": "messageBlock" + } + }, + "contextRegion": { + "startLine": 175, + "startColumn": 26, + "charOffset": 3937, + "charLength": 12, + "snippet": { + "text": "\tmessageBlock[63] = length_low;\n\n\tprocessSHA1MessageBlock(messageBlock, H);\n\n\tchar hexstring[41];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8902e21f2d7e3b6b8f1bc00a7a96f3092333d1f39e98cce2850c64138b88b1e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 177, + "startColumn": 40, + "charOffset": 4009, + "charLength": 1, + "snippet": { + "text": "H" + } + }, + "contextRegion": { + "startLine": 175, + "startColumn": 40, + "charOffset": 3937, + "charLength": 1, + "snippet": { + "text": "\tmessageBlock[63] = length_low;\n\n\tprocessSHA1MessageBlock(messageBlock, H);\n\n\tchar hexstring[41];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b5f5761fe9fee9a0c6e95dee358d2f2ed97d2c54865186ce211278e7cd63f12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 177, + "startColumn": 40, + "charOffset": 4009, + "charLength": 1, + "snippet": { + "text": "H" + } + }, + "contextRegion": { + "startLine": 175, + "startColumn": 40, + "charOffset": 3937, + "charLength": 1, + "snippet": { + "text": "\tmessageBlock[63] = length_low;\n\n\tprocessSHA1MessageBlock(messageBlock, H);\n\n\tchar hexstring[41];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5051a673a1e914ecf4e0e4fe28ee7f1b1112e47d3e556710a0007b5f80cdf0f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-c-arrays", + "ruleIndex": 480, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not declare C-style arrays, use std::array<> instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 179, + "startColumn": 2, + "charOffset": 4015, + "charLength": 4, + "snippet": { + "text": "char" + } + }, + "contextRegion": { + "startLine": 177, + "startColumn": 2, + "charOffset": 3970, + "charLength": 4, + "snippet": { + "text": "\tprocessSHA1MessageBlock(messageBlock, H);\n\n\tchar hexstring[41];\n\tstatic const char hexDigits[] = { \"0123456789abcdef\" };\n\tfor (int hashByte = 20; --hashByte >= 0;) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50244f60ba58ddce057a7647ed7bf533728eb5f483c348e5f725b7174bc0c79d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "41 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 179, + "startColumn": 17, + "charOffset": 4030, + "charLength": 2, + "snippet": { + "text": "41" + } + }, + "contextRegion": { + "startLine": 177, + "startColumn": 17, + "charOffset": 3970, + "charLength": 2, + "snippet": { + "text": "\tprocessSHA1MessageBlock(messageBlock, H);\n\n\tchar hexstring[41];\n\tstatic const char hexDigits[] = { \"0123456789abcdef\" };\n\tfor (int hashByte = 20; --hashByte >= 0;) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0af51b60bc6c5e316bff0be081ffcaac31d2732a5a01c9504f2e451002f02bc7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-c-arrays", + "ruleIndex": 480, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not declare C-style arrays, use std::array<> instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 180, + "startColumn": 15, + "charOffset": 4049, + "charLength": 4, + "snippet": { + "text": "char" + } + }, + "contextRegion": { + "startLine": 178, + "startColumn": 15, + "charOffset": 4013, + "charLength": 4, + "snippet": { + "text": "\n\tchar hexstring[41];\n\tstatic const char hexDigits[] = { \"0123456789abcdef\" };\n\tfor (int hashByte = 20; --hashByte >= 0;) {\n\t\tconst uint8_t byte = H[hashByte >> 2] >> (((3 - hashByte) & 3) << 3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "020f5997275bd045b44fe3823d3ac23387a177838602c36fce261803b278ef9a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 181, + "startColumn": 2, + "charOffset": 4093, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 179, + "startColumn": 2, + "charOffset": 4014, + "charLength": 3, + "snippet": { + "text": "\tchar hexstring[41];\n\tstatic const char hexDigits[] = { \"0123456789abcdef\" };\n\tfor (int hashByte = 20; --hashByte >= 0;) {\n\t\tconst uint8_t byte = H[hashByte >> 2] >> (((3 - hashByte) & 3) << 3);\n\t\tindex = hashByte << 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2cadf992bbb7aa1054fd31dac6ac2362241af460998eb79a15bda10398d66097" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 181, + "startColumn": 2, + "charOffset": 4093, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 179, + "startColumn": 2, + "charOffset": 4014, + "charLength": 3, + "snippet": { + "text": "\tchar hexstring[41];\n\tstatic const char hexDigits[] = { \"0123456789abcdef\" };\n\tfor (int hashByte = 20; --hashByte >= 0;) {\n\t\tconst uint8_t byte = H[hashByte >> 2] >> (((3 - hashByte) & 3) << 3);\n\t\tindex = hashByte << 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12c237be86cccef56b97de9fb683c4ef8810548b0d400bbb41369019c68400cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 181, + "startColumn": 22, + "charOffset": 4113, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 179, + "startColumn": 22, + "charOffset": 4014, + "charLength": 2, + "snippet": { + "text": "\tchar hexstring[41];\n\tstatic const char hexDigits[] = { \"0123456789abcdef\" };\n\tfor (int hashByte = 20; --hashByte >= 0;) {\n\t\tconst uint8_t byte = H[hashByte >> 2] >> (((3 - hashByte) & 3) << 3);\n\t\tindex = hashByte << 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a152b52d9dacd601b3ff536df35ff6dd2205b196694f59c5567b1f3a604658fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 182, + "startColumn": 24, + "charOffset": 4160, + "charLength": 1, + "snippet": { + "text": "H" + } + }, + "contextRegion": { + "startLine": 180, + "startColumn": 24, + "charOffset": 4035, + "charLength": 1, + "snippet": { + "text": "\tstatic const char hexDigits[] = { \"0123456789abcdef\" };\n\tfor (int hashByte = 20; --hashByte >= 0;) {\n\t\tconst uint8_t byte = H[hashByte >> 2] >> (((3 - hashByte) & 3) << 3);\n\t\tindex = hashByte << 1;\n\t\thexstring[index] = hexDigits[byte >> 4];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "addac048c5fa191af3abc744f5daed1c3a911a1994dfd3aa454c84713c17a8ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 182, + "startColumn": 24, + "charOffset": 4160, + "charLength": 1, + "snippet": { + "text": "H" + } + }, + "contextRegion": { + "startLine": 180, + "startColumn": 24, + "charOffset": 4035, + "charLength": 1, + "snippet": { + "text": "\tstatic const char hexDigits[] = { \"0123456789abcdef\" };\n\tfor (int hashByte = 20; --hashByte >= 0;) {\n\t\tconst uint8_t byte = H[hashByte >> 2] >> (((3 - hashByte) & 3) << 3);\n\t\tindex = hashByte << 1;\n\t\thexstring[index] = hexDigits[byte >> 4];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78103a62436f7ecf4e389edaffae9a79ae931eec95b5c0cd9769042c78b04251" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 182, + "startColumn": 26, + "charOffset": 4162, + "charLength": 8, + "snippet": { + "text": "hashByte" + } + }, + "contextRegion": { + "startLine": 180, + "startColumn": 26, + "charOffset": 4035, + "charLength": 8, + "snippet": { + "text": "\tstatic const char hexDigits[] = { \"0123456789abcdef\" };\n\tfor (int hashByte = 20; --hashByte >= 0;) {\n\t\tconst uint8_t byte = H[hashByte >> 2] >> (((3 - hashByte) & 3) << 3);\n\t\tindex = hashByte << 1;\n\t\thexstring[index] = hexDigits[byte >> 4];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd7f91acfb78fe67fd5be0808876805a2df578117c4b8138e8b50f274fbc1909" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 182, + "startColumn": 44, + "charOffset": 4180, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 180, + "startColumn": 44, + "charOffset": 4035, + "charLength": 1, + "snippet": { + "text": "\tstatic const char hexDigits[] = { \"0123456789abcdef\" };\n\tfor (int hashByte = 20; --hashByte >= 0;) {\n\t\tconst uint8_t byte = H[hashByte >> 2] >> (((3 - hashByte) & 3) << 3);\n\t\tindex = hashByte << 1;\n\t\thexstring[index] = hexDigits[byte >> 4];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43a56cf3bbb64d60c9f84ce36b5b750bf9b10bb777e3ba65851f2271ec3b7f52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 182, + "startColumn": 45, + "charOffset": 4181, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 180, + "startColumn": 45, + "charOffset": 4035, + "charLength": 1, + "snippet": { + "text": "\tstatic const char hexDigits[] = { \"0123456789abcdef\" };\n\tfor (int hashByte = 20; --hashByte >= 0;) {\n\t\tconst uint8_t byte = H[hashByte >> 2] >> (((3 - hashByte) & 3) << 3);\n\t\tindex = hashByte << 1;\n\t\thexstring[index] = hexDigits[byte >> 4];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e60bf250955dc5e66aa084b069ffa6c2d2d3c5a1318e2540a687d29d0dd5f397" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 182, + "startColumn": 46, + "charOffset": 4182, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 180, + "startColumn": 46, + "charOffset": 4035, + "charLength": 1, + "snippet": { + "text": "\tstatic const char hexDigits[] = { \"0123456789abcdef\" };\n\tfor (int hashByte = 20; --hashByte >= 0;) {\n\t\tconst uint8_t byte = H[hashByte >> 2] >> (((3 - hashByte) & 3) << 3);\n\t\tindex = hashByte << 1;\n\t\thexstring[index] = hexDigits[byte >> 4];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c12ee055a10983b89d206b65d9af00cfcf0f2e6eceb2ccf53f324c2e326be64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 183, + "startColumn": 11, + "charOffset": 4219, + "charLength": 8, + "snippet": { + "text": "hashByte" + } + }, + "contextRegion": { + "startLine": 181, + "startColumn": 11, + "charOffset": 4092, + "charLength": 8, + "snippet": { + "text": "\tfor (int hashByte = 20; --hashByte >= 0;) {\n\t\tconst uint8_t byte = H[hashByte >> 2] >> (((3 - hashByte) & 3) << 3);\n\t\tindex = hashByte << 1;\n\t\thexstring[index] = hexDigits[byte >> 4];\n\t\thexstring[index + 1] = hexDigits[byte & 15];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "900f79491f6ee8f45069ac52798c0458e923f565b1d629093d0d3e798d94d346" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-11", + "ruleIndex": 423, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-11: The plain char type shall only be used for the storage and use of character values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 184, + "startColumn": 3, + "charOffset": 4236, + "charLength": 9, + "snippet": { + "text": "hexstring" + } + }, + "contextRegion": { + "startLine": 182, + "startColumn": 3, + "charOffset": 4137, + "charLength": 9, + "snippet": { + "text": "\t\tconst uint8_t byte = H[hashByte >> 2] >> (((3 - hashByte) & 3) << 3);\n\t\tindex = hashByte << 1;\n\t\thexstring[index] = hexDigits[byte >> 4];\n\t\thexstring[index + 1] = hexDigits[byte & 15];\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d13a2e3115b2d8ee1bbb0a765b586a0986a2a4fddfb4037b7d99ac3555e8196" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 184, + "startColumn": 3, + "charOffset": 4236, + "charLength": 9, + "snippet": { + "text": "hexstring" + } + }, + "contextRegion": { + "startLine": 182, + "startColumn": 3, + "charOffset": 4137, + "charLength": 9, + "snippet": { + "text": "\t\tconst uint8_t byte = H[hashByte >> 2] >> (((3 - hashByte) & 3) << 3);\n\t\tindex = hashByte << 1;\n\t\thexstring[index] = hexDigits[byte >> 4];\n\t\thexstring[index + 1] = hexDigits[byte & 15];\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd235a0877f9724b908b2e8fe84fc8002e43b082c9c5017daadbde049309c108" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 184, + "startColumn": 22, + "charOffset": 4255, + "charLength": 9, + "snippet": { + "text": "hexDigits" + } + }, + "contextRegion": { + "startLine": 182, + "startColumn": 22, + "charOffset": 4137, + "charLength": 9, + "snippet": { + "text": "\t\tconst uint8_t byte = H[hashByte >> 2] >> (((3 - hashByte) & 3) << 3);\n\t\tindex = hashByte << 1;\n\t\thexstring[index] = hexDigits[byte >> 4];\n\t\thexstring[index + 1] = hexDigits[byte & 15];\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb573425661df4b471d15f4e8085caf9de0b7802b812492a75166676de2d01e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 184, + "startColumn": 40, + "charOffset": 4273, + "charLength": 1, + "snippet": { + "text": "4" + } + }, + "contextRegion": { + "startLine": 182, + "startColumn": 40, + "charOffset": 4137, + "charLength": 1, + "snippet": { + "text": "\t\tconst uint8_t byte = H[hashByte >> 2] >> (((3 - hashByte) & 3) << 3);\n\t\tindex = hashByte << 1;\n\t\thexstring[index] = hexDigits[byte >> 4];\n\t\thexstring[index + 1] = hexDigits[byte & 15];\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77a9df216e9fbaaed2acd846bb64d842da3f9108db5eb05adedfbd771f306793" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-11", + "ruleIndex": 423, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-11: The plain char type shall only be used for the storage and use of character values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 185, + "startColumn": 3, + "charOffset": 4279, + "charLength": 9, + "snippet": { + "text": "hexstring" + } + }, + "contextRegion": { + "startLine": 183, + "startColumn": 3, + "charOffset": 4209, + "charLength": 9, + "snippet": { + "text": "\t\tindex = hashByte << 1;\n\t\thexstring[index] = hexDigits[byte >> 4];\n\t\thexstring[index + 1] = hexDigits[byte & 15];\n\t}\n\treturn std::string(hexstring, 40);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07a42cb9ecaecee2f7d1e4076a6ca868534c1d0de10d42fb308c32628f8968cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 185, + "startColumn": 3, + "charOffset": 4279, + "charLength": 9, + "snippet": { + "text": "hexstring" + } + }, + "contextRegion": { + "startLine": 183, + "startColumn": 3, + "charOffset": 4209, + "charLength": 9, + "snippet": { + "text": "\t\tindex = hashByte << 1;\n\t\thexstring[index] = hexDigits[byte >> 4];\n\t\thexstring[index + 1] = hexDigits[byte & 15];\n\t}\n\treturn std::string(hexstring, 40);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13670817d8e7c7db66421d43afb295fcd14f9f3ca0559e9fe15e6e16d6c647e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 185, + "startColumn": 26, + "charOffset": 4302, + "charLength": 9, + "snippet": { + "text": "hexDigits" + } + }, + "contextRegion": { + "startLine": 183, + "startColumn": 26, + "charOffset": 4209, + "charLength": 9, + "snippet": { + "text": "\t\tindex = hashByte << 1;\n\t\thexstring[index] = hexDigits[byte >> 4];\n\t\thexstring[index + 1] = hexDigits[byte & 15];\n\t}\n\treturn std::string(hexstring, 40);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4caf81ed554a6aabad822bd12a8e699a6c78b0b99072bd39538f487ecd51ee08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 185, + "startColumn": 43, + "charOffset": 4319, + "charLength": 2, + "snippet": { + "text": "15" + } + }, + "contextRegion": { + "startLine": 183, + "startColumn": 43, + "charOffset": 4209, + "charLength": 2, + "snippet": { + "text": "\t\tindex = hashByte << 1;\n\t\thexstring[index] = hexDigits[byte >> 4];\n\t\thexstring[index + 1] = hexDigits[byte & 15];\n\t}\n\treturn std::string(hexstring, 40);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e779a852c9aa70c34b5055ec99322966a343df3008b44cda33f040ebb72843fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "15 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 185, + "startColumn": 43, + "charOffset": 4319, + "charLength": 2, + "snippet": { + "text": "15" + } + }, + "contextRegion": { + "startLine": 183, + "startColumn": 43, + "charOffset": 4209, + "charLength": 2, + "snippet": { + "text": "\t\tindex = hashByte << 1;\n\t\thexstring[index] = hexDigits[byte >> 4];\n\t\thexstring[index + 1] = hexDigits[byte & 15];\n\t}\n\treturn std::string(hexstring, 40);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6438997b626e25a44bd9b9040ef51d4b4dff25fa9f8fb3138baf000ed09c59c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-return-braced-init-list", + "ruleIndex": 630, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 187, + "startColumn": 9, + "charOffset": 4335, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 185, + "startColumn": 9, + "charOffset": 4277, + "charLength": 3, + "snippet": { + "text": "\t\thexstring[index + 1] = hexDigits[byte & 15];\n\t}\n\treturn std::string(hexstring, 40);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a87c87acd83b37084a7eff2686693e1d74e091b1b8d5300603f322fc5c2e90f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 187, + "startColumn": 21, + "charOffset": 4347, + "charLength": 9, + "snippet": { + "text": "hexstring" + } + }, + "contextRegion": { + "startLine": 185, + "startColumn": 21, + "charOffset": 4277, + "charLength": 9, + "snippet": { + "text": "\t\thexstring[index + 1] = hexDigits[byte & 15];\n\t}\n\treturn std::string(hexstring, 40);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a73565b9d459870d68d1e7f85647dca532467a2c663600aba46515f291f67bf3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 187, + "startColumn": 32, + "charOffset": 4358, + "charLength": 2, + "snippet": { + "text": "40" + } + }, + "contextRegion": { + "startLine": 185, + "startColumn": 32, + "charOffset": 4277, + "charLength": 2, + "snippet": { + "text": "\t\thexstring[index + 1] = hexDigits[byte & 15];\n\t}\n\treturn std::string(hexstring, 40);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf022182be46fa594be60eed8c4378e9e1aec6a0e46bfe004591f153e4f2cdf1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'itemList' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 190, + "startColumn": 37, + "charOffset": 4402, + "charLength": 8, + "snippet": { + "text": "itemList" + } + }, + "contextRegion": { + "startLine": 188, + "startColumn": 37, + "charOffset": 4363, + "charLength": 8, + "snippet": { + "text": "}\n\nuint16_t getStashSize(StashItemList itemList) {\n\tuint16_t size = 0;\n\tfor (auto item : itemList) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4618a5119ce650f92f28d224e3aee479c4bd05086dd752539553f23411db9f8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 192, + "startColumn": 2, + "charOffset": 4435, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 190, + "startColumn": 2, + "charOffset": 4366, + "charLength": 3, + "snippet": { + "text": "uint16_t getStashSize(StashItemList itemList) {\n\tuint16_t size = 0;\n\tfor (auto item : itemList) {\n\t\tsize += ceil(item.second / (float_t)Item::items[item.first].stackSize);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d60e91fe9a881e266b57b999e2ae440cc8808281289f63b58b5363de13425023" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to 'float_t' (aka 'float')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 193, + "startColumn": 16, + "charOffset": 4479, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 191, + "startColumn": 16, + "charOffset": 4414, + "charLength": 4, + "snippet": { + "text": "\tuint16_t size = 0;\n\tfor (auto item : itemList) {\n\t\tsize += ceil(item.second / (float_t)Item::items[item.first].stackSize);\n\t}\n\treturn size;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3809255fadec6830572c8f2b8ce17c9fd3deac04c35ea0f6121abcb3ec88266e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 193, + "startColumn": 16, + "charOffset": 4479, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 191, + "startColumn": 16, + "charOffset": 4414, + "charLength": 4, + "snippet": { + "text": "\tuint16_t size = 0;\n\tfor (auto item : itemList) {\n\t\tsize += ceil(item.second / (float_t)Item::items[item.first].stackSize);\n\t}\n\treturn size;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1eb24f9f4053015219a2c3286ff841198872b1191b0e4849aa792415b9b5bd7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 193, + "startColumn": 30, + "charOffset": 4493, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 191, + "startColumn": 30, + "charOffset": 4414, + "charLength": 1, + "snippet": { + "text": "\tuint16_t size = 0;\n\tfor (auto item : itemList) {\n\t\tsize += ceil(item.second / (float_t)Item::items[item.first].stackSize);\n\t}\n\treturn size;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b047f39e1d3791e436752be65653638a27afcc21cb31df228830cea46b5c2b2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 200, + "startColumn": 22, + "charOffset": 4679, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 198, + "startColumn": 22, + "charOffset": 4558, + "charLength": 1, + "snippet": { + "text": "std::string generateToken(const std::string &key, uint32_t ticks) {\n\t// generate message from ticks\n\tstd::string message(8, 0);\n\tfor (uint8_t i = 8; --i; ticks >>= 8) {\n\t\tmessage[i] = static_cast(ticks & 0xFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c045642d3a6ee8d372f363ae3497f194a6921e061a848a7f0178bbccad3b8d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 201, + "startColumn": 2, + "charOffset": 4687, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 2, + "charOffset": 4626, + "charLength": 3, + "snippet": { + "text": "\t// generate message from ticks\n\tstd::string message(8, 0);\n\tfor (uint8_t i = 8; --i; ticks >>= 8) {\n\t\tmessage[i] = static_cast(ticks & 0xFF);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56fec508bc41c1a9ecb893edb05ac36dfacf8a10db5e8e964eb9d601802212c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 201, + "startColumn": 2, + "charOffset": 4687, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 2, + "charOffset": 4626, + "charLength": 3, + "snippet": { + "text": "\t// generate message from ticks\n\tstd::string message(8, 0);\n\tfor (uint8_t i = 8; --i; ticks >>= 8) {\n\t\tmessage[i] = static_cast(ticks & 0xFF);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b34784103cb3f60043bf088ea5c2751085c263b0e3d8c4fa562b4fb74a30f64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 201, + "startColumn": 19, + "charOffset": 4704, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 19, + "charOffset": 4626, + "charLength": 1, + "snippet": { + "text": "\t// generate message from ticks\n\tstd::string message(8, 0);\n\tfor (uint8_t i = 8; --i; ticks >>= 8) {\n\t\tmessage[i] = static_cast(ticks & 0xFF);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e72bedd5480ed40da1430898e6afebdb4c6521c1067574417bb54b7274bea6af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 201, + "startColumn": 22, + "charOffset": 4707, + "charLength": 2, + "snippet": { + "text": "--" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 22, + "charOffset": 4626, + "charLength": 2, + "snippet": { + "text": "\t// generate message from ticks\n\tstd::string message(8, 0);\n\tfor (uint8_t i = 8; --i; ticks >>= 8) {\n\t\tmessage[i] = static_cast(ticks & 0xFF);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29dc00bb685a2220147660a7aea9677cdc97bc5dcfff70fee01273ad52167db5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 201, + "startColumn": 22, + "charOffset": 4707, + "charLength": 2, + "snippet": { + "text": "--" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 22, + "charOffset": 4626, + "charLength": 2, + "snippet": { + "text": "\t// generate message from ticks\n\tstd::string message(8, 0);\n\tfor (uint8_t i = 8; --i; ticks >>= 8) {\n\t\tmessage[i] = static_cast(ticks & 0xFF);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2663a6687c012252431dafaffd5158a5a56e630f131bcdab0b9e0341db9a0b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 201, + "startColumn": 37, + "charOffset": 4722, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 37, + "charOffset": 4626, + "charLength": 1, + "snippet": { + "text": "\t// generate message from ticks\n\tstd::string message(8, 0);\n\tfor (uint8_t i = 8; --i; ticks >>= 8) {\n\t\tmessage[i] = static_cast(ticks & 0xFF);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce29d328eab2b13682a359da80a31ab2682a62326083cf183c5a782424b891e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 201, + "startColumn": 37, + "charOffset": 4722, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 37, + "charOffset": 4626, + "charLength": 1, + "snippet": { + "text": "\t// generate message from ticks\n\tstd::string message(8, 0);\n\tfor (uint8_t i = 8; --i; ticks >>= 8) {\n\t\tmessage[i] = static_cast(ticks & 0xFF);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "176cafb0ad432566888da1538c9da90fccb822c6226072e971e5b670c57695f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 202, + "startColumn": 42, + "charOffset": 4768, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 200, + "startColumn": 42, + "charOffset": 4658, + "charLength": 4, + "snippet": { + "text": "\tstd::string message(8, 0);\n\tfor (uint8_t i = 8; --i; ticks >>= 8) {\n\t\tmessage[i] = static_cast(ticks & 0xFF);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32ce687f740cb5352244b3a63f5f29c59a49575b820a81da3519fccc7fdfa735" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 202, + "startColumn": 42, + "charOffset": 4768, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 200, + "startColumn": 42, + "charOffset": 4658, + "charLength": 4, + "snippet": { + "text": "\tstd::string message(8, 0);\n\tfor (uint8_t i = 8; --i; ticks >>= 8) {\n\t\tmessage[i] = static_cast(ticks & 0xFF);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "febc913dab7cbf0167ce04d4a452e6171301d6cb035f2a47b332eee88343bc56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 202, + "startColumn": 42, + "charOffset": 4768, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 200, + "startColumn": 42, + "charOffset": 4658, + "charLength": 4, + "snippet": { + "text": "\tstd::string message(8, 0);\n\tfor (uint8_t i = 8; --i; ticks >>= 8) {\n\t\tmessage[i] = static_cast(ticks & 0xFF);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1f690771246bf6b8a91dd5a5076f98e662674b55e8945dccc62ed5ba3d8565a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 206, + "startColumn": 2, + "charOffset": 4808, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 204, + "startColumn": 2, + "charOffset": 4778, + "charLength": 3, + "snippet": { + "text": "\n\t// hmac key pad generation\n\tstd::string iKeyPad(64, 0x36), oKeyPad(64, 0x5C);\n\tfor (uint8_t i = 0; i < key.length(); ++i) {\n\t\tiKeyPad[i] ^= key[i];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "386fb754ab02df027f5b4180a15d66a96c2b75362abba8d75e61bebfae68e6e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 206, + "startColumn": 2, + "charOffset": 4808, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 204, + "startColumn": 2, + "charOffset": 4778, + "charLength": 3, + "snippet": { + "text": "\n\t// hmac key pad generation\n\tstd::string iKeyPad(64, 0x36), oKeyPad(64, 0x5C);\n\tfor (uint8_t i = 0; i < key.length(); ++i) {\n\t\tiKeyPad[i] ^= key[i];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "217998adef9dc61bec93ed50b24e4f074fd34769d76cbc112c14be2c94fa1575" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "64 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 206, + "startColumn": 22, + "charOffset": 4828, + "charLength": 2, + "snippet": { + "text": "64" + } + }, + "contextRegion": { + "startLine": 204, + "startColumn": 22, + "charOffset": 4778, + "charLength": 2, + "snippet": { + "text": "\n\t// hmac key pad generation\n\tstd::string iKeyPad(64, 0x36), oKeyPad(64, 0x5C);\n\tfor (uint8_t i = 0; i < key.length(); ++i) {\n\t\tiKeyPad[i] ^= key[i];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39478bfa546a14ff27742eb0ffafc353de2d0103d9c0fede4db2489f5871fa73" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x36 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 206, + "startColumn": 26, + "charOffset": 4832, + "charLength": 4, + "snippet": { + "text": "0x36" + } + }, + "contextRegion": { + "startLine": 204, + "startColumn": 26, + "charOffset": 4778, + "charLength": 4, + "snippet": { + "text": "\n\t// hmac key pad generation\n\tstd::string iKeyPad(64, 0x36), oKeyPad(64, 0x5C);\n\tfor (uint8_t i = 0; i < key.length(); ++i) {\n\t\tiKeyPad[i] ^= key[i];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7eb11848c75997640cc6c33009fe03444905b2497de1f7086f6c6f04acb23e19" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "64 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 206, + "startColumn": 41, + "charOffset": 4847, + "charLength": 2, + "snippet": { + "text": "64" + } + }, + "contextRegion": { + "startLine": 204, + "startColumn": 41, + "charOffset": 4778, + "charLength": 2, + "snippet": { + "text": "\n\t// hmac key pad generation\n\tstd::string iKeyPad(64, 0x36), oKeyPad(64, 0x5C);\n\tfor (uint8_t i = 0; i < key.length(); ++i) {\n\t\tiKeyPad[i] ^= key[i];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b2d7a3457d3bb559bcb449706d238a3a2edfce3aed31799df7c1ece8dc71242" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x5C is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 206, + "startColumn": 45, + "charOffset": 4851, + "charLength": 4, + "snippet": { + "text": "0x5C" + } + }, + "contextRegion": { + "startLine": 204, + "startColumn": 45, + "charOffset": 4778, + "charLength": 4, + "snippet": { + "text": "\n\t// hmac key pad generation\n\tstd::string iKeyPad(64, 0x36), oKeyPad(64, 0x5C);\n\tfor (uint8_t i = 0; i < key.length(); ++i) {\n\t\tiKeyPad[i] ^= key[i];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2c1cc3f05f957f9159820ec060ede7083975909a64f95613c8ce53bbc75de5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 207, + "startColumn": 2, + "charOffset": 4859, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 205, + "startColumn": 2, + "charOffset": 4779, + "charLength": 3, + "snippet": { + "text": "\t// hmac key pad generation\n\tstd::string iKeyPad(64, 0x36), oKeyPad(64, 0x5C);\n\tfor (uint8_t i = 0; i < key.length(); ++i) {\n\t\tiKeyPad[i] ^= key[i];\n\t\toKeyPad[i] ^= key[i];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b982a25eadddec08ed9382c16368b9a4676699ed584e1f198919515f6d18df70" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-too-small-loop-variable", + "ruleIndex": 107, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable has narrower type 'uint8_t' than iteration's upper bound 'size_type'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 207, + "startColumn": 22, + "charOffset": 4879, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 205, + "startColumn": 22, + "charOffset": 4779, + "charLength": 1, + "snippet": { + "text": "\t// hmac key pad generation\n\tstd::string iKeyPad(64, 0x36), oKeyPad(64, 0x5C);\n\tfor (uint8_t i = 0; i < key.length(); ++i) {\n\t\tiKeyPad[i] ^= key[i];\n\t\toKeyPad[i] ^= key[i];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "025e0b63b99abb302797c3f46e8197cdfedb8978c7fe414ef0969601d0dc3653" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-11", + "ruleIndex": 423, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-11: The plain char type shall only be used for the storage and use of character values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 208, + "startColumn": 3, + "charOffset": 4906, + "charLength": 7, + "snippet": { + "text": "iKeyPad" + } + }, + "contextRegion": { + "startLine": 206, + "startColumn": 3, + "charOffset": 4807, + "charLength": 7, + "snippet": { + "text": "\tstd::string iKeyPad(64, 0x36), oKeyPad(64, 0x5C);\n\tfor (uint8_t i = 0; i < key.length(); ++i) {\n\t\tiKeyPad[i] ^= key[i];\n\t\toKeyPad[i] ^= key[i];\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9379ea98479660110a32436d95593bf76a438d73e4d040b6bf48d412d5d0381d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 208, + "startColumn": 3, + "charOffset": 4906, + "charLength": 7, + "snippet": { + "text": "iKeyPad" + } + }, + "contextRegion": { + "startLine": 206, + "startColumn": 3, + "charOffset": 4807, + "charLength": 7, + "snippet": { + "text": "\tstd::string iKeyPad(64, 0x36), oKeyPad(64, 0x5C);\n\tfor (uint8_t i = 0; i < key.length(); ++i) {\n\t\tiKeyPad[i] ^= key[i];\n\t\toKeyPad[i] ^= key[i];\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b7d4df0fc26ec974501cab636903a6c05a6621d6ea1644c08867ae9f85ed586" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'value_type' (aka 'char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 208, + "startColumn": 17, + "charOffset": 4920, + "charLength": 3, + "snippet": { + "text": "key" + } + }, + "contextRegion": { + "startLine": 206, + "startColumn": 17, + "charOffset": 4807, + "charLength": 3, + "snippet": { + "text": "\tstd::string iKeyPad(64, 0x36), oKeyPad(64, 0x5C);\n\tfor (uint8_t i = 0; i < key.length(); ++i) {\n\t\tiKeyPad[i] ^= key[i];\n\t\toKeyPad[i] ^= key[i];\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "379b872a523b89277ab034957f67962e5bb06c614f9b72d7e5deff950e57cbbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-11", + "ruleIndex": 423, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-11: The plain char type shall only be used for the storage and use of character values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 209, + "startColumn": 3, + "charOffset": 4930, + "charLength": 7, + "snippet": { + "text": "oKeyPad" + } + }, + "contextRegion": { + "startLine": 207, + "startColumn": 3, + "charOffset": 4858, + "charLength": 7, + "snippet": { + "text": "\tfor (uint8_t i = 0; i < key.length(); ++i) {\n\t\tiKeyPad[i] ^= key[i];\n\t\toKeyPad[i] ^= key[i];\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3b38752d643472dc76271ba6bacb0495e90fbbbd573ff39d97f49fc9ff70bac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 209, + "startColumn": 3, + "charOffset": 4930, + "charLength": 7, + "snippet": { + "text": "oKeyPad" + } + }, + "contextRegion": { + "startLine": 207, + "startColumn": 3, + "charOffset": 4858, + "charLength": 7, + "snippet": { + "text": "\tfor (uint8_t i = 0; i < key.length(); ++i) {\n\t\tiKeyPad[i] ^= key[i];\n\t\toKeyPad[i] ^= key[i];\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd7f91acfb78fe67fd5be0808876805a2df578117c4b8138e8b50f274fbc1909" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'value_type' (aka 'char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 209, + "startColumn": 17, + "charOffset": 4944, + "charLength": 3, + "snippet": { + "text": "key" + } + }, + "contextRegion": { + "startLine": 207, + "startColumn": 17, + "charOffset": 4858, + "charLength": 3, + "snippet": { + "text": "\tfor (uint8_t i = 0; i < key.length(); ++i) {\n\t\tiKeyPad[i] ^= key[i];\n\t\toKeyPad[i] ^= key[i];\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4935893803d3c66a0753980b6d07ce2b8cc296de2a62a156c3d70d67036e21a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "84 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 212, + "startColumn": 18, + "charOffset": 4973, + "charLength": 2, + "snippet": { + "text": "84" + } + }, + "contextRegion": { + "startLine": 210, + "startColumn": 18, + "charOffset": 4952, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\toKeyPad.reserve(84);\n\n\t// hmac concat inner pad with message" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2466e51b4b3bde0f91083ef34544354014af35d39f3f5557c050a4b854f9a1c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 215, + "startColumn": 10, + "charOffset": 5027, + "charLength": 6, + "snippet": { + "text": "append" + } + }, + "contextRegion": { + "startLine": 213, + "startColumn": 10, + "charOffset": 4978, + "charLength": 6, + "snippet": { + "text": "\n\t// hmac concat inner pad with message\n\tiKeyPad.append(message);\n\n\t// hmac first pass" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8fc6fabdd96c0b00c0952a343ce0f7483729dae981fd9db508666a085c43995" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 218, + "startColumn": 10, + "charOffset": 5074, + "charLength": 6, + "snippet": { + "text": "assign" + } + }, + "contextRegion": { + "startLine": 216, + "startColumn": 10, + "charOffset": 5044, + "charLength": 6, + "snippet": { + "text": "\n\t// hmac first pass\n\tmessage.assign(transformToSHA1(iKeyPad));\n\n\t// hmac concat outer pad with message, conversion from hex to int needed" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87bde4e82739277bae42373142e18efff9761b6fafb1f8b70dd7c35bf85f5513" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 221, + "startColumn": 2, + "charOffset": 5184, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 219, + "startColumn": 2, + "charOffset": 5108, + "charLength": 3, + "snippet": { + "text": "\n\t// hmac concat outer pad with message, conversion from hex to int needed\n\tfor (uint8_t i = 0; i < message.length(); i += 2) {\n\t\toKeyPad.push_back(static_cast(std::stol(message.substr(i, 2), nullptr, 16)));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9150538ea8628db75e1ee1ac03f58bdd9fe15a6841f4c3ed62c13341c9b995f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-too-small-loop-variable", + "ruleIndex": 107, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable has narrower type 'uint8_t' than iteration's upper bound 'size_type'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 221, + "startColumn": 22, + "charOffset": 5204, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 219, + "startColumn": 22, + "charOffset": 5108, + "charLength": 1, + "snippet": { + "text": "\n\t// hmac concat outer pad with message, conversion from hex to int needed\n\tfor (uint8_t i = 0; i < message.length(); i += 2) {\n\t\toKeyPad.push_back(static_cast(std::stol(message.substr(i, 2), nullptr, 16)));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ccacd265a5b00e24be89867ce15a4483608ec751b61164c44b283aa014608557" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 222, + "startColumn": 80, + "charOffset": 5315, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 220, + "startColumn": 80, + "charOffset": 5109, + "charLength": 2, + "snippet": { + "text": "\t// hmac concat outer pad with message, conversion from hex to int needed\n\tfor (uint8_t i = 0; i < message.length(); i += 2) {\n\t\toKeyPad.push_back(static_cast(std::stol(message.substr(i, 2), nullptr, 16)));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62c1c2f2db254d0ea0256dcffe3ad97b938b30acd678e72a0cc9162cf9af81d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 10, + "charOffset": 5356, + "charLength": 6, + "snippet": { + "text": "assign" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 10, + "charOffset": 5325, + "charLength": 6, + "snippet": { + "text": "\n\t// hmac second pass\n\tmessage.assign(transformToSHA1(oKeyPad));\n\n\t// calculate hmac offset" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f26ada8c8005449403a93e837e2ea5175dd3c0a426a33ea707c6c886184d8f3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 229, + "startColumn": 42, + "charOffset": 5458, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 227, + "startColumn": 42, + "charOffset": 5390, + "charLength": 3, + "snippet": { + "text": "\n\t// calculate hmac offset\n\tuint32_t offset = static_cast(std::stol(message.substr(39, 1), nullptr, 16) & 0xF);\n\n\t// get truncated hash" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7dc8ce97615e928dfd1cc4c10a8a07e1770f184fb3c1d0cdbd927cd2165a4313" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "39 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 229, + "startColumn": 67, + "charOffset": 5483, + "charLength": 2, + "snippet": { + "text": "39" + } + }, + "contextRegion": { + "startLine": 227, + "startColumn": 67, + "charOffset": 5390, + "charLength": 2, + "snippet": { + "text": "\n\t// calculate hmac offset\n\tuint32_t offset = static_cast(std::stol(message.substr(39, 1), nullptr, 16) & 0xF);\n\n\t// get truncated hash" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e782c9b683dd2c37ac55877b2016e9b040454075415e07a550e4fd6203f3a8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 229, + "startColumn": 84, + "charOffset": 5500, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 227, + "startColumn": 84, + "charOffset": 5390, + "charLength": 2, + "snippet": { + "text": "\n\t// calculate hmac offset\n\tuint32_t offset = static_cast(std::stol(message.substr(39, 1), nullptr, 16) & 0xF);\n\n\t// get truncated hash" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2932e68139352d3d29d5031c8187875abeacc707e57cccd3bfc654161c47c90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 229, + "startColumn": 90, + "charOffset": 5506, + "charLength": 3, + "snippet": { + "text": "0xF" + } + }, + "contextRegion": { + "startLine": 227, + "startColumn": 90, + "charOffset": 5390, + "charLength": 3, + "snippet": { + "text": "\n\t// calculate hmac offset\n\tuint32_t offset = static_cast(std::stol(message.substr(39, 1), nullptr, 16) & 0xF);\n\n\t// get truncated hash" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d527d0c75e3dd06b0ae8389b7bae0692bdc5c9cb67855138f32bff1251f7703" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 232, + "startColumn": 23, + "charOffset": 5558, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 230, + "startColumn": 23, + "charOffset": 5512, + "charLength": 3, + "snippet": { + "text": "\n\t// get truncated hash\n\tuint32_t truncHash = std::stol(message.substr(2 * offset, 8), nullptr, 16) & 0x7FFFFFFF;\n\tmessage.assign(std::to_string(truncHash));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20f5b7013beb9a4adaeff0cbab514b0913231614dac7c91a82b12552cab13680" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 232, + "startColumn": 23, + "charOffset": 5558, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 230, + "startColumn": 23, + "charOffset": 5512, + "charLength": 3, + "snippet": { + "text": "\n\t// get truncated hash\n\tuint32_t truncHash = std::stol(message.substr(2 * offset, 8), nullptr, 16) & 0x7FFFFFFF;\n\tmessage.assign(std::to_string(truncHash));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad24a78fc6d5ea43ed2beea8732162e0b253b4b1b596a9a889293098742cd1e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'size_type' (aka 'unsigned long') of a multiplication performed in type 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 232, + "startColumn": 48, + "charOffset": 5583, + "charLength": 1, + "snippet": { + "text": "2" + } + }, + "contextRegion": { + "startLine": 230, + "startColumn": 48, + "charOffset": 5512, + "charLength": 1, + "snippet": { + "text": "\n\t// get truncated hash\n\tuint32_t truncHash = std::stol(message.substr(2 * offset, 8), nullptr, 16) & 0x7FFFFFFF;\n\tmessage.assign(std::to_string(truncHash));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fde63a59b845b7d4cb9337e1585db74a362ba92ebfc73ddfbc8ab4fab1a85f38" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 232, + "startColumn": 60, + "charOffset": 5595, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 230, + "startColumn": 60, + "charOffset": 5512, + "charLength": 1, + "snippet": { + "text": "\n\t// get truncated hash\n\tuint32_t truncHash = std::stol(message.substr(2 * offset, 8), nullptr, 16) & 0x7FFFFFFF;\n\tmessage.assign(std::to_string(truncHash));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "901359a99503339a81b35a7023da80edd456fa426270c0fce81203b47d0bc051" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 232, + "startColumn": 73, + "charOffset": 5608, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 230, + "startColumn": 73, + "charOffset": 5512, + "charLength": 2, + "snippet": { + "text": "\n\t// get truncated hash\n\tuint32_t truncHash = std::stol(message.substr(2 * offset, 8), nullptr, 16) & 0x7FFFFFFF;\n\tmessage.assign(std::to_string(truncHash));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a827510f4cc64831a5da3966ad908032bd5eceefb543add08addaf3b0edb9949" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x7FFFFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 232, + "startColumn": 79, + "charOffset": 5614, + "charLength": 10, + "snippet": { + "text": "0x7FFFFFFF" + } + }, + "contextRegion": { + "startLine": 230, + "startColumn": 79, + "charOffset": 5512, + "charLength": 10, + "snippet": { + "text": "\n\t// get truncated hash\n\tuint32_t truncHash = std::stol(message.substr(2 * offset, 8), nullptr, 16) & 0x7FFFFFFF;\n\tmessage.assign(std::to_string(truncHash));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d578a68a68184cda69dfb027d8a095aabf928b4507b445dcef79c42c569b7ff5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 233, + "startColumn": 10, + "charOffset": 5635, + "charLength": 6, + "snippet": { + "text": "assign" + } + }, + "contextRegion": { + "startLine": 231, + "startColumn": 10, + "charOffset": 5513, + "charLength": 6, + "snippet": { + "text": "\t// get truncated hash\n\tuint32_t truncHash = std::stol(message.substr(2 * offset, 8), nullptr, 16) & 0x7FFFFFFF;\n\tmessage.assign(std::to_string(truncHash));\n\n\t// return only last AUTHENTICATOR_DIGITS (default 6) digits, also asserts exactly 6 digits" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32509c35188c39fcc9396378a68f3d9e87d5d4fd7f9151f7488c57b70361763c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 236, + "startColumn": 21, + "charOffset": 5783, + "charLength": 7, + "snippet": { + "text": "message" + } + }, + "contextRegion": { + "startLine": 234, + "startColumn": 21, + "charOffset": 5670, + "charLength": 7, + "snippet": { + "text": "\n\t// return only last AUTHENTICATOR_DIGITS (default 6) digits, also asserts exactly 6 digits\n\tuint32_t hashLen = message.length();\n\tmessage.assign(message.substr(hashLen - std::min(hashLen, AUTHENTICATOR_DIGITS)));\n\tmessage.insert(0, AUTHENTICATOR_DIGITS - std::min(hashLen, AUTHENTICATOR_DIGITS), '0');" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4fb77ae5a951cd639d8a7f7ebbd6ecfa8159899a6f334da98030c47187fc0d8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 237, + "startColumn": 10, + "charOffset": 5810, + "charLength": 6, + "snippet": { + "text": "assign" + } + }, + "contextRegion": { + "startLine": 235, + "startColumn": 10, + "charOffset": 5671, + "charLength": 6, + "snippet": { + "text": "\t// return only last AUTHENTICATOR_DIGITS (default 6) digits, also asserts exactly 6 digits\n\tuint32_t hashLen = message.length();\n\tmessage.assign(message.substr(hashLen - std::min(hashLen, AUTHENTICATOR_DIGITS)));\n\tmessage.insert(0, AUTHENTICATOR_DIGITS - std::min(hashLen, AUTHENTICATOR_DIGITS), '0');\n\treturn message;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c67eb004b3f17d89050f71c9e26cea4d679ea4637e81896c26f076b9adec5a55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 238, + "startColumn": 10, + "charOffset": 5894, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 236, + "startColumn": 10, + "charOffset": 5763, + "charLength": 6, + "snippet": { + "text": "\tuint32_t hashLen = message.length();\n\tmessage.assign(message.substr(hashLen - std::min(hashLen, AUTHENTICATOR_DIGITS)));\n\tmessage.insert(0, AUTHENTICATOR_DIGITS - std::min(hashLen, AUTHENTICATOR_DIGITS), '0');\n\treturn message;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d837e2cd6d2d749343e1917c6370682b6ab12e633fb010334e2365ca025b1401" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 247, + "startColumn": 2, + "charOffset": 6127, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 245, + "startColumn": 2, + "charOffset": 6122, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (size_t startPos = 0; (startPos = str.find(sought, startPos)) != std::string::npos; startPos += replacement.length()) {\n\t\tstr.replace(startPos, sought.length(), replacement);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a836e8b08444eb6647cc4214422945ae2f4bef894da3bda90234103cf63814df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-2", + "ruleIndex": 457, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-2: If loop-counter is not modified by -- or ++, then, within condition, the loop-counter shall only be used as an operand to <=, <, > or >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 247, + "startColumn": 2, + "charOffset": 6127, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 245, + "startColumn": 2, + "charOffset": 6122, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (size_t startPos = 0; (startPos = str.find(sought, startPos)) != std::string::npos; startPos += replacement.length()) {\n\t\tstr.replace(startPos, sought.length(), replacement);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2401b86826c43c0c6f8031eec2c66cacb18487207b49a0aed202dc110d83101a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-3", + "ruleIndex": 458, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-3: The loop-counter shall not be modified within condition or statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 247, + "startColumn": 2, + "charOffset": 6127, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 245, + "startColumn": 2, + "charOffset": 6122, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (size_t startPos = 0; (startPos = str.find(sought, startPos)) != std::string::npos; startPos += replacement.length()) {\n\t\tstr.replace(startPos, sought.length(), replacement);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35702ccc4ef9aa151324061040cfa1d3279be03f1aa86210822ae3780d953e8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-4", + "ruleIndex": 459, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-4: The loop-counter shall be modified by one of: --, ++, -= n, or += n; where n remains constant for the duration of the loop" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 247, + "startColumn": 2, + "charOffset": 6127, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 245, + "startColumn": 2, + "charOffset": 6122, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (size_t startPos = 0; (startPos = str.find(sought, startPos)) != std::string::npos; startPos += replacement.length()) {\n\t\tstr.replace(startPos, sought.length(), replacement);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8df6fa9ad7d4aa17d5dc35d7d0f5ff5ce909cf06e8fd34c9c81d778edc0d9e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'startPos' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 247, + "startColumn": 28, + "charOffset": 6153, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 245, + "startColumn": 28, + "charOffset": 6122, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tfor (size_t startPos = 0; (startPos = str.find(sought, startPos)) != std::string::npos; startPos += replacement.length()) {\n\t\tstr.replace(startPos, sought.length(), replacement);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2a0b561ea970f18701dc8ca8860bc4f4057c36f4a463b1ff43c4f3a710f673f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 248, + "startColumn": 7, + "charOffset": 6257, + "charLength": 7, + "snippet": { + "text": "replace" + } + }, + "contextRegion": { + "startLine": 246, + "startColumn": 7, + "charOffset": 6125, + "charLength": 7, + "snippet": { + "text": "\n\tfor (size_t startPos = 0; (startPos = str.find(sought, startPos)) != std::string::npos; startPos += replacement.length()) {\n\t\tstr.replace(startPos, sought.length(), replacement);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "370289805cf7bba3be33f4ce5f5415c36b81f48a0f25cb5e134fe4ae7f3cbd20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 253, + "startColumn": 9, + "charOffset": 6367, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 251, + "startColumn": 9, + "charOffset": 6311, + "charLength": 5, + "snippet": { + "text": "\nvoid trim_right(std::string &source, char t) {\n\tsource.erase(source.find_last_not_of(t) + 1);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f456d96c489b458b9e9ab9ce31209c5116e2a8fabe819cb70df0b12a0793ddc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 257, + "startColumn": 9, + "charOffset": 6463, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 255, + "startColumn": 9, + "charOffset": 6408, + "charLength": 5, + "snippet": { + "text": "\nvoid trim_left(std::string &source, char t) {\n\tsource.erase(0, source.find_first_not_of(t));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7699a9442c58aee09773203eabd7cefb9c5e3ed80508f295cdcf37a6961b693c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 263, + "startColumn": 7, + "charOffset": 6633, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 261, + "startColumn": 7, + "charOffset": 6555, + "charLength": 5, + "snippet": { + "text": "\tsize_t spacePos = str.find(' ');\n\tif (spacePos != std::string::npos) {\n\t\tstr.erase(spacePos);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2cef4acd9735aaec5dbd1dfa9cfde7a95286895f4563070ba2948d18941df386" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 270, + "startColumn": 2, + "charOffset": 6717, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 268, + "startColumn": 2, + "charOffset": 6669, + "charLength": 3, + "snippet": { + "text": "\nvoid toLowerCaseString(std::string &source) {\n\tstd::transform(source.begin(), source.end(), source.begin(), tolower);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6049291e2dd1afdb6c2f393f68eb61b52c71a9d331af31c469f2e8e64c5a358a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 279, + "startColumn": 2, + "charOffset": 6943, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 277, + "startColumn": 2, + "charOffset": 6889, + "charLength": 3, + "snippet": { + "text": "\nstd::string asUpperCaseString(std::string source) {\n\tstd::transform(source.begin(), source.end(), source.begin(), toupper);\n\treturn source;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd1dc31c855ff30bdca0c5f245af885bf112d11cd13c2700173fc5c6ba3d6a8d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 287, + "startColumn": 2, + "charOffset": 7136, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 285, + "startColumn": 2, + "charOffset": 7104, + "charLength": 3, + "snippet": { + "text": "\tbool capitalizeNext = false;\n\n\tfor (char ch : str) {\n\t\tif (ch == '_' || std::isspace(ch) || ch == '-') {\n\t\t\tcapitalizeNext = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30f52a43f28f08b3498f3ea96317334267f0fb6ac9e8f377651af1f0a8945f1d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-11", + "ruleIndex": 423, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-11: The plain char type shall only be used for the storage and use of character values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 287, + "startColumn": 12, + "charOffset": 7146, + "charLength": 2, + "snippet": { + "text": "ch" + } + }, + "contextRegion": { + "startLine": 285, + "startColumn": 12, + "charOffset": 7104, + "charLength": 2, + "snippet": { + "text": "\tbool capitalizeNext = false;\n\n\tfor (char ch : str) {\n\t\tif (ch == '_' || std::isspace(ch) || ch == '-') {\n\t\t\tcapitalizeNext = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10baf4efcf8e55654d3a0a21ed264e2f5ef4c9d395e4b0e44223513ca3e5262d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 288, + "startColumn": 7, + "charOffset": 7164, + "charLength": 2, + "snippet": { + "text": "ch" + } + }, + "contextRegion": { + "startLine": 286, + "startColumn": 7, + "charOffset": 7134, + "charLength": 2, + "snippet": { + "text": "\n\tfor (char ch : str) {\n\t\tif (ch == '_' || std::isspace(ch) || ch == '-') {\n\t\t\tcapitalizeNext = true;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b613d796c21b6cb73814be974f09461f0c9ae5556f34698382f3186e308cd531" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 288, + "startColumn": 20, + "charOffset": 7177, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 286, + "startColumn": 20, + "charOffset": 7134, + "charLength": 3, + "snippet": { + "text": "\n\tfor (char ch : str) {\n\t\tif (ch == '_' || std::isspace(ch) || ch == '-') {\n\t\t\tcapitalizeNext = true;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c05e2676dff90b6da351efd03c6e80283785854668ca83f3515ccf65fff2a659" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 288, + "startColumn": 37, + "charOffset": 7194, + "charLength": 2, + "snippet": { + "text": "||" + } + }, + "contextRegion": { + "startLine": 286, + "startColumn": 37, + "charOffset": 7134, + "charLength": 2, + "snippet": { + "text": "\n\tfor (char ch : str) {\n\t\tif (ch == '_' || std::isspace(ch) || ch == '-') {\n\t\t\tcapitalizeNext = true;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "039cdf3f26a0cefc60a9e765498a504fb90d43d2f591b806e380cbb6815d914d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 292, + "startColumn": 15, + "charOffset": 7286, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 290, + "startColumn": 15, + "charOffset": 7236, + "charLength": 3, + "snippet": { + "text": "\t\t} else {\n\t\t\tif (capitalizeNext) {\n\t\t\t\tresult += std::toupper(ch);\n\t\t\t\tcapitalizeNext = false;\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46bd2bb00cd7bb15007bfcf9e69376ba4c4e3097167727f124077e51f8b15adb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 292, + "startColumn": 15, + "charOffset": 7286, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 290, + "startColumn": 15, + "charOffset": 7236, + "charLength": 3, + "snippet": { + "text": "\t\t} else {\n\t\t\tif (capitalizeNext) {\n\t\t\t\tresult += std::toupper(ch);\n\t\t\t\tcapitalizeNext = false;\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db51aa5dfd9d4c311bc318ad681406bfb3c41961397ec102fc8aa11bc2792a39" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 295, + "startColumn": 15, + "charOffset": 7358, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 293, + "startColumn": 15, + "charOffset": 7304, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tcapitalizeNext = false;\n\t\t\t} else {\n\t\t\t\tresult += std::tolower(ch);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a47f68d8569b94c9aa6dee7209f07230f66e18afd6ad277e1ae54e9662636bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 295, + "startColumn": 15, + "charOffset": 7358, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 293, + "startColumn": 15, + "charOffset": 7304, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tcapitalizeNext = false;\n\t\t\t} else {\n\t\t\t\tresult += std::tolower(ch);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95e0d9ec0fe2a0cc067bae6baea1a107bb9661cdff945446b7bcbc2c0b659406" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 307, + "startColumn": 2, + "charOffset": 7511, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 305, + "startColumn": 2, + "charOffset": 7480, + "charLength": 3, + "snippet": { + "text": "\tbool capitalizeNext = true;\n\n\tfor (char ch : str) {\n\t\tif (ch == '_' || std::isspace(ch) || ch == '-') {\n\t\t\tcapitalizeNext = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8889a55fea01f288c142fdbd2cfc92632919c2798b673181abaf1c4a6649a5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-11", + "ruleIndex": 423, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-11: The plain char type shall only be used for the storage and use of character values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 307, + "startColumn": 12, + "charOffset": 7521, + "charLength": 2, + "snippet": { + "text": "ch" + } + }, + "contextRegion": { + "startLine": 305, + "startColumn": 12, + "charOffset": 7480, + "charLength": 2, + "snippet": { + "text": "\tbool capitalizeNext = true;\n\n\tfor (char ch : str) {\n\t\tif (ch == '_' || std::isspace(ch) || ch == '-') {\n\t\t\tcapitalizeNext = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fd43e73a7f1be0636ebc3dc191fe420dc9d1f6b1a902576f1db17b087ad244b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 308, + "startColumn": 7, + "charOffset": 7539, + "charLength": 2, + "snippet": { + "text": "ch" + } + }, + "contextRegion": { + "startLine": 306, + "startColumn": 7, + "charOffset": 7509, + "charLength": 2, + "snippet": { + "text": "\n\tfor (char ch : str) {\n\t\tif (ch == '_' || std::isspace(ch) || ch == '-') {\n\t\t\tcapitalizeNext = true;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d808750fb989be5e52c8d766ee6dd01abed8d8aa967bc042b88b6856f772ec2a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 308, + "startColumn": 20, + "charOffset": 7552, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 306, + "startColumn": 20, + "charOffset": 7509, + "charLength": 3, + "snippet": { + "text": "\n\tfor (char ch : str) {\n\t\tif (ch == '_' || std::isspace(ch) || ch == '-') {\n\t\t\tcapitalizeNext = true;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55bac20b3e16903de47642bd11021686d8935cfd393318aead427f579fdfbba0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 308, + "startColumn": 37, + "charOffset": 7569, + "charLength": 2, + "snippet": { + "text": "||" + } + }, + "contextRegion": { + "startLine": 306, + "startColumn": 37, + "charOffset": 7509, + "charLength": 2, + "snippet": { + "text": "\n\tfor (char ch : str) {\n\t\tif (ch == '_' || std::isspace(ch) || ch == '-') {\n\t\t\tcapitalizeNext = true;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "575783118cf27f749cd95c85881d8bd89de593c79e2351531ee9395a48d51d67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 312, + "startColumn": 15, + "charOffset": 7661, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 310, + "startColumn": 15, + "charOffset": 7611, + "charLength": 3, + "snippet": { + "text": "\t\t} else {\n\t\t\tif (capitalizeNext) {\n\t\t\t\tresult += std::toupper(ch);\n\t\t\t\tcapitalizeNext = false;\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6f66ff1fc3bd899d446cb92422ce773172b069b3bd3df16bb3ad84594a17486" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 312, + "startColumn": 15, + "charOffset": 7661, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 310, + "startColumn": 15, + "charOffset": 7611, + "charLength": 3, + "snippet": { + "text": "\t\t} else {\n\t\t\tif (capitalizeNext) {\n\t\t\t\tresult += std::toupper(ch);\n\t\t\t\tcapitalizeNext = false;\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee0ef4b4c063411380507f7abfb6d5aea140ac41b0646839739df96d1ef46039" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 325, + "startColumn": 2, + "charOffset": 7870, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 323, + "startColumn": 2, + "charOffset": 7798, + "charLength": 3, + "snippet": { + "text": "std::string toSnakeCase(const std::string &str) {\n\tstd::string result;\n\tfor (char ch : str) {\n\t\tif (std::isupper(ch)) {\n\t\t\tresult += '_';" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de8094abe8decd0f758f55c747a7b963ebf32f476c8255af3d30677986d53072" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-11", + "ruleIndex": 423, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-11: The plain char type shall only be used for the storage and use of character values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 325, + "startColumn": 12, + "charOffset": 7880, + "charLength": 2, + "snippet": { + "text": "ch" + } + }, + "contextRegion": { + "startLine": 323, + "startColumn": 12, + "charOffset": 7798, + "charLength": 2, + "snippet": { + "text": "std::string toSnakeCase(const std::string &str) {\n\tstd::string result;\n\tfor (char ch : str) {\n\t\tif (std::isupper(ch)) {\n\t\t\tresult += '_';" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f3d547ad9e4ab38fd32adc22ba3e7eba9e785bbea82a6bf95a93291d994fe6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 326, + "startColumn": 7, + "charOffset": 7898, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 324, + "startColumn": 7, + "charOffset": 7848, + "charLength": 3, + "snippet": { + "text": "\tstd::string result;\n\tfor (char ch : str) {\n\t\tif (std::isupper(ch)) {\n\t\t\tresult += '_';\n\t\t\tresult += std::tolower(ch);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b402aeaba6ba502575dc9969be5b5016b36ec3ff50ded0e083c0d1f7b0899b5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 326, + "startColumn": 7, + "charOffset": 7898, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 324, + "startColumn": 7, + "charOffset": 7848, + "charLength": 3, + "snippet": { + "text": "\tstd::string result;\n\tfor (char ch : str) {\n\t\tif (std::isupper(ch)) {\n\t\t\tresult += '_';\n\t\t\tresult += std::tolower(ch);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3339ba11441ad0d9d76a96957c204c52cd30c7e88855a77b50bf431cc2e46927" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 328, + "startColumn": 14, + "charOffset": 7949, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 326, + "startColumn": 14, + "charOffset": 7892, + "charLength": 3, + "snippet": { + "text": "\t\tif (std::isupper(ch)) {\n\t\t\tresult += '_';\n\t\t\tresult += std::tolower(ch);\n\t\t} else if (std::isspace(ch) || ch == '-') {\n\t\t\tresult += '_';" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cdf3928c77ef3f645f5bf0644cd470349900197ead61839f5aae7ae7c779c55f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 328, + "startColumn": 14, + "charOffset": 7949, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 326, + "startColumn": 14, + "charOffset": 7892, + "charLength": 3, + "snippet": { + "text": "\t\tif (std::isupper(ch)) {\n\t\t\tresult += '_';\n\t\t\tresult += std::tolower(ch);\n\t\t} else if (std::isspace(ch) || ch == '-') {\n\t\t\tresult += '_';" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a595b4ee0814639bbda6a4c7f29d5c16cdf0595e3e56fe16709a8891707c345" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 329, + "startColumn": 14, + "charOffset": 7980, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 327, + "startColumn": 14, + "charOffset": 7918, + "charLength": 3, + "snippet": { + "text": "\t\t\tresult += '_';\n\t\t\tresult += std::tolower(ch);\n\t\t} else if (std::isspace(ch) || ch == '-') {\n\t\t\tresult += '_';\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41d794f2ed52d4153b704a8e1a0b4dd9c8cfec35c88f44a4e20879033fee4ba8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 329, + "startColumn": 14, + "charOffset": 7980, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 327, + "startColumn": 14, + "charOffset": 7918, + "charLength": 3, + "snippet": { + "text": "\t\t\tresult += '_';\n\t\t\tresult += std::tolower(ch);\n\t\t} else if (std::isspace(ch) || ch == '-') {\n\t\t\tresult += '_';\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aaef00884636f8e4a937eb8a0bd4484215dafe080cac956fb02e7a78a8a9e533" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 329, + "startColumn": 31, + "charOffset": 7997, + "charLength": 2, + "snippet": { + "text": "||" + } + }, + "contextRegion": { + "startLine": 327, + "startColumn": 31, + "charOffset": 7918, + "charLength": 2, + "snippet": { + "text": "\t\t\tresult += '_';\n\t\t\tresult += std::tolower(ch);\n\t\t} else if (std::isspace(ch) || ch == '-') {\n\t\t\tresult += '_';\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eeb38533170d4c99c1735adb069ae7efdcb24a531c1f72a9029153aa9c630beb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 341, + "startColumn": 2, + "charOffset": 8158, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 339, + "startColumn": 2, + "charOffset": 8086, + "charLength": 3, + "snippet": { + "text": "std::string toKebabCase(const std::string &str) {\n\tstd::string result;\n\tfor (char ch : str) {\n\t\tif (std::isupper(ch)) {\n\t\t\tresult += '-';" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b048af60217daa91216e30a6014f023c661f7c663db1730e4414c69fdbd20b54" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-11", + "ruleIndex": 423, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-11: The plain char type shall only be used for the storage and use of character values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 341, + "startColumn": 12, + "charOffset": 8168, + "charLength": 2, + "snippet": { + "text": "ch" + } + }, + "contextRegion": { + "startLine": 339, + "startColumn": 12, + "charOffset": 8086, + "charLength": 2, + "snippet": { + "text": "std::string toKebabCase(const std::string &str) {\n\tstd::string result;\n\tfor (char ch : str) {\n\t\tif (std::isupper(ch)) {\n\t\t\tresult += '-';" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9711133c397ff6afad904fdf52ad8d2c952c5b6e6e1f761588e021437246981" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 342, + "startColumn": 7, + "charOffset": 8186, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 340, + "startColumn": 7, + "charOffset": 8136, + "charLength": 3, + "snippet": { + "text": "\tstd::string result;\n\tfor (char ch : str) {\n\t\tif (std::isupper(ch)) {\n\t\t\tresult += '-';\n\t\t\tresult += std::tolower(ch);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c2e519f41fbb037338c7dcb55ab2dd40b8a3512bd30b0000025f8fba56faa5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 342, + "startColumn": 7, + "charOffset": 8186, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 340, + "startColumn": 7, + "charOffset": 8136, + "charLength": 3, + "snippet": { + "text": "\tstd::string result;\n\tfor (char ch : str) {\n\t\tif (std::isupper(ch)) {\n\t\t\tresult += '-';\n\t\t\tresult += std::tolower(ch);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22adf7a2d9ee45346daa0e6997eb72e119f9bb318e6b3b18fd8da2f8f0b5b5ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 344, + "startColumn": 14, + "charOffset": 8237, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 342, + "startColumn": 14, + "charOffset": 8180, + "charLength": 3, + "snippet": { + "text": "\t\tif (std::isupper(ch)) {\n\t\t\tresult += '-';\n\t\t\tresult += std::tolower(ch);\n\t\t} else if (std::isspace(ch) || ch == '_') {\n\t\t\tresult += '-';" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1e01809e247d46774510e897b521a9b0f00c7a7af6e790b8b2c1f4cdd088799" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 344, + "startColumn": 14, + "charOffset": 8237, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 342, + "startColumn": 14, + "charOffset": 8180, + "charLength": 3, + "snippet": { + "text": "\t\tif (std::isupper(ch)) {\n\t\t\tresult += '-';\n\t\t\tresult += std::tolower(ch);\n\t\t} else if (std::isspace(ch) || ch == '_') {\n\t\t\tresult += '-';" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77a4e39b0b8418dd447a4bcae3e3cb8467f20bc0a5e525bd582d60fe03603fb6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 345, + "startColumn": 14, + "charOffset": 8268, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 343, + "startColumn": 14, + "charOffset": 8206, + "charLength": 3, + "snippet": { + "text": "\t\t\tresult += '-';\n\t\t\tresult += std::tolower(ch);\n\t\t} else if (std::isspace(ch) || ch == '_') {\n\t\t\tresult += '-';\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "147dfb087f3d7bdf2449d8755a7fef3f5ecaa7b9f5608885732a096e58d8c602" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 345, + "startColumn": 14, + "charOffset": 8268, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 343, + "startColumn": 14, + "charOffset": 8206, + "charLength": 3, + "snippet": { + "text": "\t\t\tresult += '-';\n\t\t\tresult += std::tolower(ch);\n\t\t} else if (std::isspace(ch) || ch == '_') {\n\t\t\tresult += '-';\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c40b0945183a9206a78dc6e98e5fc2436a6be18e5e4f913f07d56c90f6054bcf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 345, + "startColumn": 31, + "charOffset": 8285, + "charLength": 2, + "snippet": { + "text": "||" + } + }, + "contextRegion": { + "startLine": 343, + "startColumn": 31, + "charOffset": 8206, + "charLength": 2, + "snippet": { + "text": "\t\t\tresult += '-';\n\t\t\tresult += std::tolower(ch);\n\t\t} else if (std::isspace(ch) || ch == '_') {\n\t\t\tresult += '-';\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5916c44a110bb68f8dbd3f863efe5482616ca2d6b7f607aa4ded1d62276a65eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 357, + "startColumn": 2, + "charOffset": 8455, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 355, + "startColumn": 2, + "charOffset": 8374, + "charLength": 3, + "snippet": { + "text": "std::string toStartCaseWithSpace(const std::string &str) {\n\tstd::string result;\n\tfor (size_t i = 0; i < str.length(); ++i) {\n\t\tchar ch = str[i];\n\t\tif (i == 0 || std::isupper(ch)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0491e59a0172b6ec0841c2da03dd9816dad26d05ab3e12ef5c05afad6d303c35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-11", + "ruleIndex": 423, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-11: The plain char type shall only be used for the storage and use of character values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 358, + "startColumn": 8, + "charOffset": 8506, + "charLength": 2, + "snippet": { + "text": "ch" + } + }, + "contextRegion": { + "startLine": 356, + "startColumn": 8, + "charOffset": 8433, + "charLength": 2, + "snippet": { + "text": "\tstd::string result;\n\tfor (size_t i = 0; i < str.length(); ++i) {\n\t\tchar ch = str[i];\n\t\tif (i == 0 || std::isupper(ch)) {\n\t\t\tif (i > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3488bcfffa70469d5b9867db7331b8033e1f90f0b0ff10d91401e25cf8ac9365" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 359, + "startColumn": 7, + "charOffset": 8525, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 357, + "startColumn": 7, + "charOffset": 8454, + "charLength": 1, + "snippet": { + "text": "\tfor (size_t i = 0; i < str.length(); ++i) {\n\t\tchar ch = str[i];\n\t\tif (i == 0 || std::isupper(ch)) {\n\t\t\tif (i > 0) {\n\t\t\t\tresult += ' ';" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23b1d21d576a4746771cc5c5773d62f322d5f5ac4f041948e9d239baaf72683b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 359, + "startColumn": 14, + "charOffset": 8532, + "charLength": 2, + "snippet": { + "text": "||" + } + }, + "contextRegion": { + "startLine": 357, + "startColumn": 14, + "charOffset": 8454, + "charLength": 2, + "snippet": { + "text": "\tfor (size_t i = 0; i < str.length(); ++i) {\n\t\tchar ch = str[i];\n\t\tif (i == 0 || std::isupper(ch)) {\n\t\t\tif (i > 0) {\n\t\t\t\tresult += ' ';" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "449aa62a00525db53c0ec8c6202b4ce6358ee864cc0b3529027a0ded8699faa5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 359, + "startColumn": 17, + "charOffset": 8535, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 357, + "startColumn": 17, + "charOffset": 8454, + "charLength": 3, + "snippet": { + "text": "\tfor (size_t i = 0; i < str.length(); ++i) {\n\t\tchar ch = str[i];\n\t\tif (i == 0 || std::isupper(ch)) {\n\t\t\tif (i > 0) {\n\t\t\t\tresult += ' ';" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f3133c739cd168d9fe47e046f6999494dc3c3112f7127b87b1426aa6f396cef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 363, + "startColumn": 14, + "charOffset": 8608, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 361, + "startColumn": 14, + "charOffset": 8571, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tresult += ' ';\n\t\t\t}\n\t\t\tresult += std::toupper(ch);\n\t\t} else {\n\t\t\tresult += std::tolower(ch);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "550b5105e693cc3ff8af158be89356ba195a8d578ebb953624e594c69627334c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 363, + "startColumn": 14, + "charOffset": 8608, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 361, + "startColumn": 14, + "charOffset": 8571, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tresult += ' ';\n\t\t\t}\n\t\t\tresult += std::toupper(ch);\n\t\t} else {\n\t\t\tresult += std::tolower(ch);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49869d46bbfbddbc9ef6d32ff833735666982318bff004f9d078aa784460b834" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 365, + "startColumn": 14, + "charOffset": 8650, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 363, + "startColumn": 14, + "charOffset": 8595, + "charLength": 3, + "snippet": { + "text": "\t\t\tresult += std::toupper(ch);\n\t\t} else {\n\t\t\tresult += std::tolower(ch);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee88b84a0ecee6031a634d712be94ad45403e9185a5300d2a6f9f1abf8a7ec7f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 365, + "startColumn": 14, + "charOffset": 8650, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 363, + "startColumn": 14, + "charOffset": 8595, + "charLength": 3, + "snippet": { + "text": "\t\t\tresult += std::toupper(ch);\n\t\t} else {\n\t\t\tresult += std::tolower(ch);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "634334074ac85bfca87e3758796c462f98b3db371f726bc7f085dddd360fc13a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 373, + "startColumn": 2, + "charOffset": 8836, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 371, + "startColumn": 2, + "charOffset": 8694, + "charLength": 3, + "snippet": { + "text": "StringVector explodeString(const std::string &inString, const std::string &separator, int32_t limit /* = -1*/) {\n\tStringVector returnVector;\n\tstd::string::size_type start = 0, end = 0;\n\n\twhile (--limit != -1 && (end = inString.find(separator, start)) != std::string::npos) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef05e9a012050c648d076219c6d789192be4f8edb73c19d87867185a58349481" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 373, + "startColumn": 2, + "charOffset": 8836, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 371, + "startColumn": 2, + "charOffset": 8694, + "charLength": 3, + "snippet": { + "text": "StringVector explodeString(const std::string &inString, const std::string &separator, int32_t limit /* = -1*/) {\n\tStringVector returnVector;\n\tstd::string::size_type start = 0, end = 0;\n\n\twhile (--limit != -1 && (end = inString.find(separator, start)) != std::string::npos) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a167255f9d366069b54de13577bf57e897c3dde80e7eab87e9f2db950df8a82c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 375, + "startColumn": 2, + "charOffset": 8881, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 373, + "startColumn": 2, + "charOffset": 8835, + "charLength": 5, + "snippet": { + "text": "\tstd::string::size_type start = 0, end = 0;\n\n\twhile (--limit != -1 && (end = inString.find(separator, start)) != std::string::npos) {\n\t\treturnVector.push_back(inString.substr(start, end - start));\n\t\tstart = end + separator.size();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a813e253742979794e997ce18b2f9e53131d982509b12a3e14444ef4f05bd7a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'end' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 375, + "startColumn": 9, + "charOffset": 8888, + "charLength": 2, + "snippet": { + "text": "--" + } + }, + "contextRegion": { + "startLine": 373, + "startColumn": 9, + "charOffset": 8835, + "charLength": 2, + "snippet": { + "text": "\tstd::string::size_type start = 0, end = 0;\n\n\twhile (--limit != -1 && (end = inString.find(separator, start)) != std::string::npos) {\n\t\treturnVector.push_back(inString.substr(start, end - start));\n\t\tstart = end + separator.size();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20586382a66cafa9b41e19de88d27bb1b74ae7cc222f5170df576f46c81208b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-14-1", + "ruleIndex": 431, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-14-1: The right hand operand of a logical && or || operator shall not contain side effects" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 375, + "startColumn": 66, + "charOffset": 8945, + "charLength": 2, + "snippet": { + "text": "!=" + } + }, + "contextRegion": { + "startLine": 373, + "startColumn": 66, + "charOffset": 8835, + "charLength": 2, + "snippet": { + "text": "\tstd::string::size_type start = 0, end = 0;\n\n\twhile (--limit != -1 && (end = inString.find(separator, start)) != std::string::npos) {\n\t\treturnVector.push_back(inString.substr(start, end - start));\n\t\tstart = end + separator.size();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3d023cf8f837813ee9b3d0bff7cd2c5933c7e7e747d6e0645078c76d7376136" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 386, + "startColumn": 2, + "charOffset": 9235, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 384, + "startColumn": 2, + "charOffset": 9144, + "charLength": 3, + "snippet": { + "text": "IntegerVector vectorAtoi(const StringVector &stringVector) {\n\tIntegerVector returnVector;\n\tfor (const auto &string : stringVector) {\n\t\treturnVector.push_back(std::stoi(string));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bcf8400d24d996d888e235b727f122403bcad1de2c5837d522aa70a0363f1296" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 400, + "startColumn": 2, + "charOffset": 9602, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 398, + "startColumn": 2, + "charOffset": 9478, + "charLength": 2, + "snippet": { + "text": "int32_t uniform_random(int32_t minNumber, int32_t maxNumber) {\n\tstatic std::uniform_int_distribution uniformRand;\n\tif (minNumber == maxNumber) {\n\t\treturn minNumber;\n\t} else if (minNumber > maxNumber) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af7bc0c35e51492e3bde70a61377884a46b7affc6f53bbbf61fc29b091b4e9a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 402, + "startColumn": 4, + "charOffset": 9655, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 400, + "startColumn": 4, + "charOffset": 9601, + "charLength": 4, + "snippet": { + "text": "\tif (minNumber == maxNumber) {\n\t\treturn minNumber;\n\t} else if (minNumber > maxNumber) {\n\t\tstd::swap(minNumber, maxNumber);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb2b3a4c5f42630105a486ef47238d96c5596cf9c3c220507237c24a8cd97c52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 409, + "startColumn": 52, + "charOffset": 9960, + "charLength": 4, + "snippet": { + "text": "0.5f" + } + }, + "contextRegion": { + "startLine": 407, + "startColumn": 52, + "charOffset": 9846, + "charLength": 4, + "snippet": { + "text": "\nint32_t normal_random(int32_t minNumber, int32_t maxNumber) {\n\tstatic std::normal_distribution normalRand(0.5f, 0.25f);\n\tfloat v;\n\tdo {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01c8a4cacb0b5c7b7d7d9289ba691c2fde3a53afab90f869e9711e637c416351" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 409, + "startColumn": 52, + "charOffset": 9960, + "charLength": 4, + "snippet": { + "text": "0.5f" + } + }, + "contextRegion": { + "startLine": 407, + "startColumn": 52, + "charOffset": 9846, + "charLength": 4, + "snippet": { + "text": "\nint32_t normal_random(int32_t minNumber, int32_t maxNumber) {\n\tstatic std::normal_distribution normalRand(0.5f, 0.25f);\n\tfloat v;\n\tdo {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1966eb1c9fde8dfcff4515e53eec70172a5bf1fbb7ccb8feb9bc0c32feb46d3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.5f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 409, + "startColumn": 52, + "charOffset": 9960, + "charLength": 4, + "snippet": { + "text": "0.5f" + } + }, + "contextRegion": { + "startLine": 407, + "startColumn": 52, + "charOffset": 9846, + "charLength": 4, + "snippet": { + "text": "\nint32_t normal_random(int32_t minNumber, int32_t maxNumber) {\n\tstatic std::normal_distribution normalRand(0.5f, 0.25f);\n\tfloat v;\n\tdo {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17ac36f109bb5e953f5a11e8af884ef86a25936afae2b83f4f885e7a509dfdce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 409, + "startColumn": 58, + "charOffset": 9966, + "charLength": 5, + "snippet": { + "text": "0.25f" + } + }, + "contextRegion": { + "startLine": 407, + "startColumn": 58, + "charOffset": 9846, + "charLength": 5, + "snippet": { + "text": "\nint32_t normal_random(int32_t minNumber, int32_t maxNumber) {\n\tstatic std::normal_distribution normalRand(0.5f, 0.25f);\n\tfloat v;\n\tdo {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "928808e1f6e82cec230dbc081c8c0fa4d5fa4a547695986d9cc5e8f5df9841e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 409, + "startColumn": 58, + "charOffset": 9966, + "charLength": 5, + "snippet": { + "text": "0.25f" + } + }, + "contextRegion": { + "startLine": 407, + "startColumn": 58, + "charOffset": 9846, + "charLength": 5, + "snippet": { + "text": "\nint32_t normal_random(int32_t minNumber, int32_t maxNumber) {\n\tstatic std::normal_distribution normalRand(0.5f, 0.25f);\n\tfloat v;\n\tdo {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90b62d1b4d4887a006f56d0ad32ba102a84ad77cb05194391bcdf2a53faebbcd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.25f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 409, + "startColumn": 58, + "charOffset": 9966, + "charLength": 5, + "snippet": { + "text": "0.25f" + } + }, + "contextRegion": { + "startLine": 407, + "startColumn": 58, + "charOffset": 9846, + "charLength": 5, + "snippet": { + "text": "\nint32_t normal_random(int32_t minNumber, int32_t maxNumber) {\n\tstatic std::normal_distribution normalRand(0.5f, 0.25f);\n\tfloat v;\n\tdo {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79cd9690825e6d09315fb865020b60de37066556f6e418458af4f60e7ee72407" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'v' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 410, + "startColumn": 8, + "charOffset": 9981, + "charLength": 1, + "snippet": { + "text": "v" + } + }, + "contextRegion": { + "startLine": 408, + "startColumn": 8, + "charOffset": 9847, + "charLength": 1, + "snippet": { + "text": "int32_t normal_random(int32_t minNumber, int32_t maxNumber) {\n\tstatic std::normal_distribution normalRand(0.5f, 0.25f);\n\tfloat v;\n\tdo {\n\t\tv = normalRand(getRandomGenerator());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4033bd2dad1887148ce1f2181446e21b884c287468dd50aeed2b3d7d42059e6e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 411, + "startColumn": 2, + "charOffset": 9985, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 409, + "startColumn": 2, + "charOffset": 9909, + "charLength": 2, + "snippet": { + "text": "\tstatic std::normal_distribution normalRand(0.5f, 0.25f);\n\tfloat v;\n\tdo {\n\t\tv = normalRand(getRandomGenerator());\n\t} while (v < 0.0 || v > 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5ba179a57371957c26a3328c7fed08b482a6917b9bd6b3b6af797c6bacb8ca6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 411, + "startColumn": 2, + "charOffset": 9985, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 409, + "startColumn": 2, + "charOffset": 9909, + "charLength": 2, + "snippet": { + "text": "\tstatic std::normal_distribution normalRand(0.5f, 0.25f);\n\tfloat v;\n\tdo {\n\t\tv = normalRand(getRandomGenerator());\n\t} while (v < 0.0 || v > 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c3a97a9c1e31f1d8b3a3af563a86f3e35b5c17ac54b38b8157743ee8d8fa76e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (do loop) is ID-dependent due to variable reference to 'v' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 413, + "startColumn": 11, + "charOffset": 10040, + "charLength": 1, + "snippet": { + "text": "v" + } + }, + "contextRegion": { + "startLine": 411, + "startColumn": 11, + "charOffset": 9984, + "charLength": 1, + "snippet": { + "text": "\tdo {\n\t\tv = normalRand(getRandomGenerator());\n\t} while (v < 0.0 || v > 1.0);\n\n\tauto &&[a, b] = std::minmax(minNumber, maxNumber);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1241b19e5f2974178e07e77946f1bac250ed50318d6759f4da6e0ac8d7073c32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'long' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 416, + "startColumn": 9, + "charOffset": 10122, + "charLength": 1, + "snippet": { + "text": "a" + } + }, + "contextRegion": { + "startLine": 414, + "startColumn": 9, + "charOffset": 10061, + "charLength": 1, + "snippet": { + "text": "\n\tauto &&[a, b] = std::minmax(minNumber, maxNumber);\n\treturn a + std::lround(v * (b - a));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "074b2fa30d3cc64d034a759106c916b1f2c865660e484a498f4f2af2d8ac2d80" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 416, + "startColumn": 9, + "charOffset": 10122, + "charLength": 1, + "snippet": { + "text": "a" + } + }, + "contextRegion": { + "startLine": 414, + "startColumn": 9, + "charOffset": 10061, + "charLength": 1, + "snippet": { + "text": "\n\tauto &&[a, b] = std::minmax(minNumber, maxNumber);\n\treturn a + std::lround(v * (b - a));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bfd5b4296820eb7c23b8a9ee87a27841a819cbf8015fc935452e4dc413a7ea43" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 416, + "startColumn": 29, + "charOffset": 10142, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 414, + "startColumn": 29, + "charOffset": 10061, + "charLength": 1, + "snippet": { + "text": "\n\tauto &&[a, b] = std::minmax(minNumber, maxNumber);\n\treturn a + std::lround(v * (b - a));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b444dc15d235e2f19124d1fecb5628da1f2f5cd8b3a90b43f3a952069a509995" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 416, + "startColumn": 29, + "charOffset": 10142, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 414, + "startColumn": 29, + "charOffset": 10061, + "charLength": 1, + "snippet": { + "text": "\n\tauto &&[a, b] = std::minmax(minNumber, maxNumber);\n\treturn a + std::lround(v * (b - a));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "725d543ae4920d089469443d7613d136656002ba47a06b7553e985f56831110a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 425, + "startColumn": 6, + "charOffset": 10398, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 423, + "startColumn": 6, + "charOffset": 10356, + "charLength": 5, + "snippet": { + "text": "\nvoid trimString(std::string &str) {\n\tstr.erase(str.find_last_not_of(' ') + 1);\n\tstr.erase(0, str.find_first_not_of(' '));\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3283e2c3c9fe61f9bbb1ce74b403aad85e2e933652a5e380cc2b862af3006fe8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 426, + "startColumn": 6, + "charOffset": 10441, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 424, + "startColumn": 6, + "charOffset": 10357, + "charLength": 5, + "snippet": { + "text": "void trimString(std::string &str) {\n\tstr.erase(str.find_last_not_of(' ') + 1);\n\tstr.erase(0, str.find_first_not_of(' '));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28efd3db8cb9159d0f0a9068dc9787cdb1b249020d4dda032185d74ec94df29a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-c-arrays", + "ruleIndex": 480, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not declare C-style arrays, use std::array<> instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 430, + "startColumn": 2, + "charOffset": 10528, + "charLength": 4, + "snippet": { + "text": "char" + } + }, + "contextRegion": { + "startLine": 428, + "startColumn": 2, + "charOffset": 10481, + "charLength": 4, + "snippet": { + "text": "\nstd::string convertIPToString(uint32_t ip) {\n\tchar buffer[17];\n\tfmt::format_to_n(buffer, sizeof(buffer), \"{}.{}.{}.{}\", ip & 0xFF, (ip >> 8) & 0xFF, (ip >> 16) & 0xFF, (ip >> 24));\n\treturn buffer;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f3bd124c789710b72e0f6d5ec39e4dd00740d1cf73eb8f481422ba00bbf18c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "17 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 430, + "startColumn": 14, + "charOffset": 10540, + "charLength": 2, + "snippet": { + "text": "17" + } + }, + "contextRegion": { + "startLine": 428, + "startColumn": 14, + "charOffset": 10481, + "charLength": 2, + "snippet": { + "text": "\nstd::string convertIPToString(uint32_t ip) {\n\tchar buffer[17];\n\tfmt::format_to_n(buffer, sizeof(buffer), \"{}.{}.{}.{}\", ip & 0xFF, (ip >> 8) & 0xFF, (ip >> 16) & 0xFF, (ip >> 24));\n\treturn buffer;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a47842b278dd5c05d9d862da87cb19935c1564388c1053a54017ae1c2607018" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 431, + "startColumn": 2, + "charOffset": 10546, + "charLength": 3, + "snippet": { + "text": "fmt" + } + }, + "contextRegion": { + "startLine": 429, + "startColumn": 2, + "charOffset": 10482, + "charLength": 3, + "snippet": { + "text": "std::string convertIPToString(uint32_t ip) {\n\tchar buffer[17];\n\tfmt::format_to_n(buffer, sizeof(buffer), \"{}.{}.{}.{}\", ip & 0xFF, (ip >> 8) & 0xFF, (ip >> 16) & 0xFF, (ip >> 24));\n\treturn buffer;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa03dd2b7b3bfa82e2e4da1bac1ef586c5251c2c71f29c524d387600fa377dc4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 431, + "startColumn": 19, + "charOffset": 10563, + "charLength": 6, + "snippet": { + "text": "buffer" + } + }, + "contextRegion": { + "startLine": 429, + "startColumn": 19, + "charOffset": 10482, + "charLength": 6, + "snippet": { + "text": "std::string convertIPToString(uint32_t ip) {\n\tchar buffer[17];\n\tfmt::format_to_n(buffer, sizeof(buffer), \"{}.{}.{}.{}\", ip & 0xFF, (ip >> 8) & 0xFF, (ip >> 16) & 0xFF, (ip >> 24));\n\treturn buffer;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5e4e3f392f5d97073c67bd88c6309030d50f02bf4af9da55a0c486e17b64e1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 431, + "startColumn": 19, + "charOffset": 10563, + "charLength": 6, + "snippet": { + "text": "buffer" + } + }, + "contextRegion": { + "startLine": 429, + "startColumn": 19, + "charOffset": 10482, + "charLength": 6, + "snippet": { + "text": "std::string convertIPToString(uint32_t ip) {\n\tchar buffer[17];\n\tfmt::format_to_n(buffer, sizeof(buffer), \"{}.{}.{}.{}\", ip & 0xFF, (ip >> 8) & 0xFF, (ip >> 16) & 0xFF, (ip >> 24));\n\treturn buffer;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0de5d84679ba89ee553b950cbf62bd03a22c19c02a40b770901693d1ad8cd15d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 431, + "startColumn": 63, + "charOffset": 10607, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 429, + "startColumn": 63, + "charOffset": 10482, + "charLength": 4, + "snippet": { + "text": "std::string convertIPToString(uint32_t ip) {\n\tchar buffer[17];\n\tfmt::format_to_n(buffer, sizeof(buffer), \"{}.{}.{}.{}\", ip & 0xFF, (ip >> 8) & 0xFF, (ip >> 16) & 0xFF, (ip >> 24));\n\treturn buffer;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6283d17819b314eae73a7d3f99cb4ecf9a039267039a4222888600094f72b075" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 431, + "startColumn": 63, + "charOffset": 10607, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 429, + "startColumn": 63, + "charOffset": 10482, + "charLength": 4, + "snippet": { + "text": "std::string convertIPToString(uint32_t ip) {\n\tchar buffer[17];\n\tfmt::format_to_n(buffer, sizeof(buffer), \"{}.{}.{}.{}\", ip & 0xFF, (ip >> 8) & 0xFF, (ip >> 16) & 0xFF, (ip >> 24));\n\treturn buffer;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5464389cbaf134b36c72416fd5abb98b72df57d28cb74ca278ce9df9677be4f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 431, + "startColumn": 63, + "charOffset": 10607, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 429, + "startColumn": 63, + "charOffset": 10482, + "charLength": 4, + "snippet": { + "text": "std::string convertIPToString(uint32_t ip) {\n\tchar buffer[17];\n\tfmt::format_to_n(buffer, sizeof(buffer), \"{}.{}.{}.{}\", ip & 0xFF, (ip >> 8) & 0xFF, (ip >> 16) & 0xFF, (ip >> 24));\n\treturn buffer;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f363c0d4b585a1a65d6453fd17c88f9975866bc23063f05028f99346585fc614" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 431, + "startColumn": 76, + "charOffset": 10620, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 429, + "startColumn": 76, + "charOffset": 10482, + "charLength": 1, + "snippet": { + "text": "std::string convertIPToString(uint32_t ip) {\n\tchar buffer[17];\n\tfmt::format_to_n(buffer, sizeof(buffer), \"{}.{}.{}.{}\", ip & 0xFF, (ip >> 8) & 0xFF, (ip >> 16) & 0xFF, (ip >> 24));\n\treturn buffer;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de10964e4fcd30d29345bbc1bed28bc4a40f959e1caa22ae4ab89391dad2257a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 431, + "startColumn": 76, + "charOffset": 10620, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 429, + "startColumn": 76, + "charOffset": 10482, + "charLength": 1, + "snippet": { + "text": "std::string convertIPToString(uint32_t ip) {\n\tchar buffer[17];\n\tfmt::format_to_n(buffer, sizeof(buffer), \"{}.{}.{}.{}\", ip & 0xFF, (ip >> 8) & 0xFF, (ip >> 16) & 0xFF, (ip >> 24));\n\treturn buffer;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f0673368d2dc02562741cb27d452b21b06121f7084cd4f90b6e9a400734b9dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 431, + "startColumn": 81, + "charOffset": 10625, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 429, + "startColumn": 81, + "charOffset": 10482, + "charLength": 4, + "snippet": { + "text": "std::string convertIPToString(uint32_t ip) {\n\tchar buffer[17];\n\tfmt::format_to_n(buffer, sizeof(buffer), \"{}.{}.{}.{}\", ip & 0xFF, (ip >> 8) & 0xFF, (ip >> 16) & 0xFF, (ip >> 24));\n\treturn buffer;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c538f0512535de6fe0a3f80e6efd4fec7682a8b5be9e7c644df162f02560aa21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 431, + "startColumn": 81, + "charOffset": 10625, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 429, + "startColumn": 81, + "charOffset": 10482, + "charLength": 4, + "snippet": { + "text": "std::string convertIPToString(uint32_t ip) {\n\tchar buffer[17];\n\tfmt::format_to_n(buffer, sizeof(buffer), \"{}.{}.{}.{}\", ip & 0xFF, (ip >> 8) & 0xFF, (ip >> 16) & 0xFF, (ip >> 24));\n\treturn buffer;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1476cb0ad384fd911db63f6406c68dc863f9fed926c50b9f73de0f8d3788cc9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 431, + "startColumn": 81, + "charOffset": 10625, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 429, + "startColumn": 81, + "charOffset": 10482, + "charLength": 4, + "snippet": { + "text": "std::string convertIPToString(uint32_t ip) {\n\tchar buffer[17];\n\tfmt::format_to_n(buffer, sizeof(buffer), \"{}.{}.{}.{}\", ip & 0xFF, (ip >> 8) & 0xFF, (ip >> 16) & 0xFF, (ip >> 24));\n\treturn buffer;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7af905f0741e477244f6c8c6ebc27e50e39ac382459c026874d58af4fbbecb6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 431, + "startColumn": 94, + "charOffset": 10638, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 429, + "startColumn": 94, + "charOffset": 10482, + "charLength": 2, + "snippet": { + "text": "std::string convertIPToString(uint32_t ip) {\n\tchar buffer[17];\n\tfmt::format_to_n(buffer, sizeof(buffer), \"{}.{}.{}.{}\", ip & 0xFF, (ip >> 8) & 0xFF, (ip >> 16) & 0xFF, (ip >> 24));\n\treturn buffer;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "625692e9db7c301a9cf14bc21f94a0de1187baf21d187820c5e38cf68740866c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 431, + "startColumn": 94, + "charOffset": 10638, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 429, + "startColumn": 94, + "charOffset": 10482, + "charLength": 2, + "snippet": { + "text": "std::string convertIPToString(uint32_t ip) {\n\tchar buffer[17];\n\tfmt::format_to_n(buffer, sizeof(buffer), \"{}.{}.{}.{}\", ip & 0xFF, (ip >> 8) & 0xFF, (ip >> 16) & 0xFF, (ip >> 24));\n\treturn buffer;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ff4f61e0377259b9729b9646d19f0f98a7258550890d6f35659ff7ae3753ea7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 431, + "startColumn": 100, + "charOffset": 10644, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 429, + "startColumn": 100, + "charOffset": 10482, + "charLength": 4, + "snippet": { + "text": "std::string convertIPToString(uint32_t ip) {\n\tchar buffer[17];\n\tfmt::format_to_n(buffer, sizeof(buffer), \"{}.{}.{}.{}\", ip & 0xFF, (ip >> 8) & 0xFF, (ip >> 16) & 0xFF, (ip >> 24));\n\treturn buffer;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c33d4894a3ad8c4523d5892f244e6d208c50e83c7b5d9f6a35c604fb44c46607" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 431, + "startColumn": 100, + "charOffset": 10644, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 429, + "startColumn": 100, + "charOffset": 10482, + "charLength": 4, + "snippet": { + "text": "std::string convertIPToString(uint32_t ip) {\n\tchar buffer[17];\n\tfmt::format_to_n(buffer, sizeof(buffer), \"{}.{}.{}.{}\", ip & 0xFF, (ip >> 8) & 0xFF, (ip >> 16) & 0xFF, (ip >> 24));\n\treturn buffer;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8312661c83f2d604a6b67d57dedf2c331c2f4988114e960d27d0f5ba89cce85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 431, + "startColumn": 100, + "charOffset": 10644, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 429, + "startColumn": 100, + "charOffset": 10482, + "charLength": 4, + "snippet": { + "text": "std::string convertIPToString(uint32_t ip) {\n\tchar buffer[17];\n\tfmt::format_to_n(buffer, sizeof(buffer), \"{}.{}.{}.{}\", ip & 0xFF, (ip >> 8) & 0xFF, (ip >> 16) & 0xFF, (ip >> 24));\n\treturn buffer;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15cc132d93ddb1a081348348da663d2e792758ee3954e69b36dc48fc1260ef67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 431, + "startColumn": 113, + "charOffset": 10657, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 429, + "startColumn": 113, + "charOffset": 10482, + "charLength": 2, + "snippet": { + "text": "std::string convertIPToString(uint32_t ip) {\n\tchar buffer[17];\n\tfmt::format_to_n(buffer, sizeof(buffer), \"{}.{}.{}.{}\", ip & 0xFF, (ip >> 8) & 0xFF, (ip >> 16) & 0xFF, (ip >> 24));\n\treturn buffer;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28eff38977e091e8b7900611ee7641e9ca83b84cad472dba775f87f166f058ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 431, + "startColumn": 113, + "charOffset": 10657, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 429, + "startColumn": 113, + "charOffset": 10482, + "charLength": 2, + "snippet": { + "text": "std::string convertIPToString(uint32_t ip) {\n\tchar buffer[17];\n\tfmt::format_to_n(buffer, sizeof(buffer), \"{}.{}.{}.{}\", ip & 0xFF, (ip >> 8) & 0xFF, (ip >> 16) & 0xFF, (ip >> 24));\n\treturn buffer;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d4b7998e4718d045f11634b19238508573765fa8c67816984014d142c41d62a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 432, + "startColumn": 9, + "charOffset": 10671, + "charLength": 6, + "snippet": { + "text": "buffer" + } + }, + "contextRegion": { + "startLine": 430, + "startColumn": 9, + "charOffset": 10527, + "charLength": 6, + "snippet": { + "text": "\tchar buffer[17];\n\tfmt::format_to_n(buffer, sizeof(buffer), \"{}.{}.{}.{}\", ip & 0xFF, (ip >> 8) & 0xFF, (ip >> 16) & 0xFF, (ip >> 24));\n\treturn buffer;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07c9199af36c0a21068bad6949f651bca609ce4b936d72bcfffeca516cd63812" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 465, + "startColumn": 2, + "charOffset": 11619, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 463, + "startColumn": 2, + "charOffset": 11513, + "charLength": 3, + "snippet": { + "text": "\tstd::string result { name.begin(), name.end() };\n\tstd::replace(result.begin(), result.end(), '_', ' ');\n\tstd::transform(result.begin(), result.end(), result.begin(), [](unsigned char c) { return std::tolower(c); });\n\treturn result;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b4ff48b8966f86757db079427a41b5923d3989068aa3dbb4caf9dc8e2d789bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 484, + "startColumn": 2, + "charOffset": 12276, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 482, + "startColumn": 2, + "charOffset": 12216, + "charLength": 2, + "snippet": { + "text": "\nBedItemPart_t getBedPart(const std::string_view string) {\n\tif (string == \"pillow\" || string == \"1\") {\n\t\treturn BED_PILLOW_PART;\n\t} else if (string == \"blanket\" || string == \"2\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad29fba7f71d6dcc07d2cef76670f95462a379257f06b4bf380910244c580038" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 486, + "startColumn": 4, + "charOffset": 12348, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 484, + "startColumn": 4, + "charOffset": 12275, + "charLength": 4, + "snippet": { + "text": "\tif (string == \"pillow\" || string == \"1\") {\n\t\treturn BED_PILLOW_PART;\n\t} else if (string == \"blanket\" || string == \"2\") {\n\t\treturn BED_BLANKET_PART;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61e6648576cc07c9c014e88ce5568463e259ed713bf1b984468016d81bb1eb70" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 495, + "startColumn": 2, + "charOffset": 12547, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 493, + "startColumn": 2, + "charOffset": 12505, + "charLength": 2, + "snippet": { + "text": "\tDirection direction = DIRECTION_NORTH;\n\n\tif (string == \"north\" || string == \"n\" || string == \"0\") {\n\t\tdirection = DIRECTION_NORTH;\n\t} else if (string == \"east\" || string == \"e\" || string == \"1\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f61d3cd17b79851b11292372a5ab3f4d7e605215f3a5b5c801c4fd00988debe9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 534, + "startColumn": 3, + "charOffset": 13861, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 532, + "startColumn": 3, + "charOffset": 13848, + "charLength": 4, + "snippet": { + "text": "\t\t\tbreak;\n\n\t\tcase DIRECTION_SOUTHWEST:\n\t\t\tpos.x--;\n\t\t\tpos.y++;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6cbd4054c90e515318516fe8ad0f5d8c38b68ad4e735e4bd9c685e84c76a9d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 539, + "startColumn": 3, + "charOffset": 13924, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 537, + "startColumn": 3, + "charOffset": 13911, + "charLength": 4, + "snippet": { + "text": "\t\t\tbreak;\n\n\t\tcase DIRECTION_NORTHWEST:\n\t\t\tpos.x--;\n\t\t\tpos.y--;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e28efe00c6fb17da1db099d71c8565756593845b3ce0c7bcbc77edcf4685cde" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 544, + "startColumn": 3, + "charOffset": 13987, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 542, + "startColumn": 3, + "charOffset": 13974, + "charLength": 4, + "snippet": { + "text": "\t\t\tbreak;\n\n\t\tcase DIRECTION_NORTHEAST:\n\t\t\tpos.x++;\n\t\t\tpos.y--;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b33c0423afe6f8be087588e7f98990ce016af7b19883fbe29f5eb517719e89f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 549, + "startColumn": 3, + "charOffset": 14050, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 547, + "startColumn": 3, + "charOffset": 14037, + "charLength": 4, + "snippet": { + "text": "\t\t\tbreak;\n\n\t\tcase DIRECTION_SOUTHEAST:\n\t\t\tpos.x++;\n\t\t\tpos.y++;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a389a67a397be38a9995e798bad8cf3c781dc721665a3679b110f0012a5aeba2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 617, + "startColumn": 1, + "charOffset": 15743, + "charLength": 16, + "snippet": { + "text": "MagicEffectNames" + } + }, + "contextRegion": { + "startLine": 615, + "startColumn": 1, + "charOffset": 15671, + "charLength": 16, + "snippet": { + "text": "using SpawnTypeNames = phmap::flat_hash_map;\n\nMagicEffectNames magicEffectNames = {\n\t{ \"assassin\", CONST_ME_ASSASSIN },\n\t{ \"bluefireworks\", CONST_ME_BLUE_FIREWORKS }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d38902b1c0196d78d0a4b21905fbc97d0d37cfbab7fdf19778ab605d7d0d4524" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'magicEffectNames' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 617, + "startColumn": 18, + "charOffset": 15760, + "charLength": 16, + "snippet": { + "text": "magicEffectNames" + } + }, + "contextRegion": { + "startLine": 615, + "startColumn": 18, + "charOffset": 15671, + "charLength": 16, + "snippet": { + "text": "using SpawnTypeNames = phmap::flat_hash_map;\n\nMagicEffectNames magicEffectNames = {\n\t{ \"assassin\", CONST_ME_ASSASSIN },\n\t{ \"bluefireworks\", CONST_ME_BLUE_FIREWORKS }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82a6c45f89c534187a87fcea111c48bfefd989633919b1495ecb1f682b9fb911" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-non-const-global-variables", + "ruleIndex": 486, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'magicEffectNames' is non-const and globally accessible, consider making it const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 617, + "startColumn": 18, + "charOffset": 15760, + "charLength": 16, + "snippet": { + "text": "magicEffectNames" + } + }, + "contextRegion": { + "startLine": 615, + "startColumn": 18, + "charOffset": 15671, + "charLength": 16, + "snippet": { + "text": "using SpawnTypeNames = phmap::flat_hash_map;\n\nMagicEffectNames magicEffectNames = {\n\t{ \"assassin\", CONST_ME_ASSASSIN },\n\t{ \"bluefireworks\", CONST_ME_BLUE_FIREWORKS }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1160c86486475899b6c2c9ad0923f67e7b7fb59e501ab0f5e895849780efaf93" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 736, + "startColumn": 1, + "charOffset": 20540, + "charLength": 14, + "snippet": { + "text": "ShootTypeNames" + } + }, + "contextRegion": { + "startLine": 734, + "startColumn": 1, + "charOffset": 20536, + "charLength": 14, + "snippet": { + "text": "};\n\nShootTypeNames shootTypeNames = {\n\t{ \"arrow\", CONST_ANI_ARROW },\n\t{ \"bolt\", CONST_ANI_BOLT }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "726666fd412dbf6e4c0a252afdaf358544155414621ad68735b56df5f073c630" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'shootTypeNames' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 736, + "startColumn": 16, + "charOffset": 20555, + "charLength": 14, + "snippet": { + "text": "shootTypeNames" + } + }, + "contextRegion": { + "startLine": 734, + "startColumn": 16, + "charOffset": 20536, + "charLength": 14, + "snippet": { + "text": "};\n\nShootTypeNames shootTypeNames = {\n\t{ \"arrow\", CONST_ANI_ARROW },\n\t{ \"bolt\", CONST_ANI_BOLT }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca809c78e7ddd1fd38d068013fd954f4c1305898b357bdb439d2c3c57017c070" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-non-const-global-variables", + "ruleIndex": 486, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'shootTypeNames' is non-const and globally accessible, consider making it const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 736, + "startColumn": 16, + "charOffset": 20555, + "charLength": 14, + "snippet": { + "text": "shootTypeNames" + } + }, + "contextRegion": { + "startLine": 734, + "startColumn": 16, + "charOffset": 20536, + "charLength": 14, + "snippet": { + "text": "};\n\nShootTypeNames shootTypeNames = {\n\t{ \"arrow\", CONST_ANI_ARROW },\n\t{ \"bolt\", CONST_ANI_BOLT }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c25207910a5d5d3520375290c58687c0a65dc5ac934df3eb741d35c0f3d4496" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 793, + "startColumn": 1, + "charOffset": 22748, + "charLength": 15, + "snippet": { + "text": "CombatTypeNames" + } + }, + "contextRegion": { + "startLine": 791, + "startColumn": 1, + "charOffset": 22744, + "charLength": 15, + "snippet": { + "text": "};\n\nCombatTypeNames combatTypeNames = {\n\t{ COMBAT_DROWNDAMAGE, \"drown\" },\n\t{ COMBAT_DEATHDAMAGE, \"death\" }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6358009e6a849f0b271d4655c6c9faf92da47bec762a342234acaabab799292" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'combatTypeNames' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 793, + "startColumn": 17, + "charOffset": 22764, + "charLength": 15, + "snippet": { + "text": "combatTypeNames" + } + }, + "contextRegion": { + "startLine": 791, + "startColumn": 17, + "charOffset": 22744, + "charLength": 15, + "snippet": { + "text": "};\n\nCombatTypeNames combatTypeNames = {\n\t{ COMBAT_DROWNDAMAGE, \"drown\" },\n\t{ COMBAT_DEATHDAMAGE, \"death\" }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2aa8c1fefa4b4a41d27ca6e75673bcf9e5626cca0b27f9ad63422c2c5332359b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-non-const-global-variables", + "ruleIndex": 486, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'combatTypeNames' is non-const and globally accessible, consider making it const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 793, + "startColumn": 17, + "charOffset": 22764, + "charLength": 15, + "snippet": { + "text": "combatTypeNames" + } + }, + "contextRegion": { + "startLine": 791, + "startColumn": 17, + "charOffset": 22744, + "charLength": 15, + "snippet": { + "text": "};\n\nCombatTypeNames combatTypeNames = {\n\t{ COMBAT_DROWNDAMAGE, \"drown\" },\n\t{ COMBAT_DEATHDAMAGE, \"death\" }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e179a8bba992efbdbd00a6349ebe1010d7197f9de3a5377a38dd4d28a9a6e2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 810, + "startColumn": 1, + "charOffset": 23278, + "charLength": 13, + "snippet": { + "text": "AmmoTypeNames" + } + }, + "contextRegion": { + "startLine": 808, + "startColumn": 1, + "charOffset": 23274, + "charLength": 13, + "snippet": { + "text": "};\n\nAmmoTypeNames ammoTypeNames = {\n\t{ \"arrow\", AMMO_ARROW },\n\t{ \"bolt\", AMMO_BOLT }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe5bf5817b30ca058bcfc33bb69aa750a239e2eabeb27596649f1c709f725717" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'ammoTypeNames' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 810, + "startColumn": 15, + "charOffset": 23292, + "charLength": 13, + "snippet": { + "text": "ammoTypeNames" + } + }, + "contextRegion": { + "startLine": 808, + "startColumn": 15, + "charOffset": 23274, + "charLength": 13, + "snippet": { + "text": "};\n\nAmmoTypeNames ammoTypeNames = {\n\t{ \"arrow\", AMMO_ARROW },\n\t{ \"bolt\", AMMO_BOLT }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30dca110ff02195e25077a209703b3f8a53005ad9ccc7500dfaa02e3d49ac745" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-non-const-global-variables", + "ruleIndex": 486, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'ammoTypeNames' is non-const and globally accessible, consider making it const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 810, + "startColumn": 15, + "charOffset": 23292, + "charLength": 13, + "snippet": { + "text": "ammoTypeNames" + } + }, + "contextRegion": { + "startLine": 808, + "startColumn": 15, + "charOffset": 23274, + "charLength": 13, + "snippet": { + "text": "};\n\nAmmoTypeNames ammoTypeNames = {\n\t{ \"arrow\", AMMO_ARROW },\n\t{ \"bolt\", AMMO_BOLT }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e96b0e6c68904da81dc6307cdedad027599b7064218880a42c7749195a0af31" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 838, + "startColumn": 1, + "charOffset": 24109, + "charLength": 17, + "snippet": { + "text": "WeaponActionNames" + } + }, + "contextRegion": { + "startLine": 836, + "startColumn": 1, + "charOffset": 24105, + "charLength": 17, + "snippet": { + "text": "};\n\nWeaponActionNames weaponActionNames = {\n\t{ \"move\", WEAPONACTION_MOVE },\n\t{ \"removecharge\", WEAPONACTION_REMOVECHARGE }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a93658d77fb38cc3d1ebf78dc27482ecd8f54037d335ebff9e7c36fd1e0e869e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'weaponActionNames' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 838, + "startColumn": 19, + "charOffset": 24127, + "charLength": 17, + "snippet": { + "text": "weaponActionNames" + } + }, + "contextRegion": { + "startLine": 836, + "startColumn": 19, + "charOffset": 24105, + "charLength": 17, + "snippet": { + "text": "};\n\nWeaponActionNames weaponActionNames = {\n\t{ \"move\", WEAPONACTION_MOVE },\n\t{ \"removecharge\", WEAPONACTION_REMOVECHARGE }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4fb59722c1a34ac2a17d96674317441e0957296bb38c10b4bd571ca616fe40d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-non-const-global-variables", + "ruleIndex": 486, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'weaponActionNames' is non-const and globally accessible, consider making it const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 838, + "startColumn": 19, + "charOffset": 24127, + "charLength": 17, + "snippet": { + "text": "weaponActionNames" + } + }, + "contextRegion": { + "startLine": 836, + "startColumn": 19, + "charOffset": 24105, + "charLength": 17, + "snippet": { + "text": "};\n\nWeaponActionNames weaponActionNames = {\n\t{ \"move\", WEAPONACTION_MOVE },\n\t{ \"removecharge\", WEAPONACTION_REMOVECHARGE }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06a6452328376b5b5eaa07d8f7c99fdcabb77a470f20bcdc7a8503eb78f9832c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 844, + "startColumn": 1, + "charOffset": 24279, + "charLength": 10, + "snippet": { + "text": "SkullNames" + } + }, + "contextRegion": { + "startLine": 842, + "startColumn": 1, + "charOffset": 24275, + "charLength": 10, + "snippet": { + "text": "};\n\nSkullNames skullNames = {\n\t{ \"black\", SKULL_BLACK },\n\t{ \"green\", SKULL_GREEN }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9a71954abbc96a936bfd67e0c82930c16ed543a686838d98f0d048facc1959a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'skullNames' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 844, + "startColumn": 12, + "charOffset": 24290, + "charLength": 10, + "snippet": { + "text": "skullNames" + } + }, + "contextRegion": { + "startLine": 842, + "startColumn": 12, + "charOffset": 24275, + "charLength": 10, + "snippet": { + "text": "};\n\nSkullNames skullNames = {\n\t{ \"black\", SKULL_BLACK },\n\t{ \"green\", SKULL_GREEN }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "431e9042d2a8931a9ad198c9111dcf0fd5300f3a820a163f56cdd1c55b3af8ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-non-const-global-variables", + "ruleIndex": 486, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'skullNames' is non-const and globally accessible, consider making it const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 844, + "startColumn": 12, + "charOffset": 24290, + "charLength": 10, + "snippet": { + "text": "skullNames" + } + }, + "contextRegion": { + "startLine": 842, + "startColumn": 12, + "charOffset": 24275, + "charLength": 10, + "snippet": { + "text": "};\n\nSkullNames skullNames = {\n\t{ \"black\", SKULL_BLACK },\n\t{ \"green\", SKULL_GREEN }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c34422a5861353ec3f9e0b1505da6aa02b2fd6c44cefbb4c4e08c08b5ccbdc5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 854, + "startColumn": 1, + "charOffset": 24496, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 852, + "startColumn": 1, + "charOffset": 24492, + "charLength": 5, + "snippet": { + "text": "};\n\nconst ImbuementTypeNames imbuementTypeNames = {\n\t{ \"elemental damage\", IMBUEMENT_ELEMENTAL_DAMAGE },\n\t{ \"life leech\", IMBUEMENT_LIFE_LEECH }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42dfa8d97803b00a1c98c3624cd9718fe85ed4ce42f42c911c8a302e2b314e4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'imbuementTypeNames' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 854, + "startColumn": 26, + "charOffset": 24521, + "charLength": 18, + "snippet": { + "text": "imbuementTypeNames" + } + }, + "contextRegion": { + "startLine": 852, + "startColumn": 26, + "charOffset": 24492, + "charLength": 18, + "snippet": { + "text": "};\n\nconst ImbuementTypeNames imbuementTypeNames = {\n\t{ \"elemental damage\", IMBUEMENT_ELEMENTAL_DAMAGE },\n\t{ \"life leech\", IMBUEMENT_LIFE_LEECH }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15c0b810290de8151529ebca6938f8e7ecbc72efb69d8b43a2215443f14ed1ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 879, + "startColumn": 1, + "charOffset": 25690, + "charLength": 14, + "snippet": { + "text": "SpawnTypeNames" + } + }, + "contextRegion": { + "startLine": 877, + "startColumn": 1, + "charOffset": 25620, + "charLength": 14, + "snippet": { + "text": " * It will be dropped with monsters. Use RespawnPeriod_t instead.\n */\nSpawnTypeNames spawnTypeNames = {\n\t{ \"all\", RESPAWN_IN_ALL },\n\t{ \"day\", RESPAWN_IN_DAY }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77c4861124f4b849c4fcf058dddff74d068a2f0107a431978e1765f7e47a8ad7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'spawnTypeNames' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 879, + "startColumn": 16, + "charOffset": 25705, + "charLength": 14, + "snippet": { + "text": "spawnTypeNames" + } + }, + "contextRegion": { + "startLine": 877, + "startColumn": 16, + "charOffset": 25620, + "charLength": 14, + "snippet": { + "text": " * It will be dropped with monsters. Use RespawnPeriod_t instead.\n */\nSpawnTypeNames spawnTypeNames = {\n\t{ \"all\", RESPAWN_IN_ALL },\n\t{ \"day\", RESPAWN_IN_DAY }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "964c04d0fad99ef415ff98b34f786baab0f00622d41bce861b5227cd557a3cde" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-non-const-global-variables", + "ruleIndex": 486, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'spawnTypeNames' is non-const and globally accessible, consider making it const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 879, + "startColumn": 16, + "charOffset": 25705, + "charLength": 14, + "snippet": { + "text": "spawnTypeNames" + } + }, + "contextRegion": { + "startLine": 877, + "startColumn": 16, + "charOffset": 25620, + "charLength": 14, + "snippet": { + "text": " * It will be dropped with monsters. Use RespawnPeriod_t instead.\n */\nSpawnTypeNames spawnTypeNames = {\n\t{ \"all\", RESPAWN_IN_ALL },\n\t{ \"day\", RESPAWN_IN_DAY }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbae88bd8469ac2325207ded47ff4c2843b7add8856c07efc15cba470c9d3290" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 949, + "startColumn": 3, + "charOffset": 27530, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 947, + "startColumn": 3, + "charOffset": 27464, + "charLength": 4, + "snippet": { + "text": "std::string getSkillName(uint8_t skillid) {\n\tswitch (skillid) {\n\t\tcase SKILL_FIST:\n\t\t\treturn \"fist fighting\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d84297e4332a66aff13363ee78f9aa4ad6251d16318893c8b8c71fae2aec8661" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 952, + "startColumn": 3, + "charOffset": 27577, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 950, + "startColumn": 3, + "charOffset": 27547, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"fist fighting\";\n\n\t\tcase SKILL_CLUB:\n\t\t\treturn \"club fighting\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0498ecd6a0fb2948f4b14b8ff76375a58117c296aa033caf6ca581c7b5a5277" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 955, + "startColumn": 3, + "charOffset": 27624, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 953, + "startColumn": 3, + "charOffset": 27594, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"club fighting\";\n\n\t\tcase SKILL_SWORD:\n\t\t\treturn \"sword fighting\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f80cb5c402813e740425de6743d0fcb8d945d099e6b7bcca8c3feb4782b3b1f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 958, + "startColumn": 3, + "charOffset": 27673, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 956, + "startColumn": 3, + "charOffset": 27642, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"sword fighting\";\n\n\t\tcase SKILL_AXE:\n\t\t\treturn \"axe fighting\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7dbee4ad5d46fe45e466c04fd9d7a935c44322af67d4d9b0195d9e2dad33d00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 961, + "startColumn": 3, + "charOffset": 27718, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 959, + "startColumn": 3, + "charOffset": 27689, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"axe fighting\";\n\n\t\tcase SKILL_DISTANCE:\n\t\t\treturn \"distance fighting\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1a5f710edc94d61c206c8e17196d8b4ff097431d98cdb10a687067379c4a041" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 964, + "startColumn": 3, + "charOffset": 27773, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 962, + "startColumn": 3, + "charOffset": 27739, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"distance fighting\";\n\n\t\tcase SKILL_SHIELD:\n\t\t\treturn \"shielding\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59f35eb42532b6083a61d780182f03f1ee8647f9d5364b12de3c967a5440b8c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 967, + "startColumn": 3, + "charOffset": 27818, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 965, + "startColumn": 3, + "charOffset": 27792, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"shielding\";\n\n\t\tcase SKILL_FISHING:\n\t\t\treturn \"fishing\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0d744138d1934c87ad51f4b48b16d2a0470661a184784517729321c7af94303" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 970, + "startColumn": 3, + "charOffset": 27862, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 968, + "startColumn": 3, + "charOffset": 27838, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"fishing\";\n\n\t\tcase SKILL_CRITICAL_HIT_CHANCE:\n\t\t\treturn \"critical hit chance\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47b8783850c2060d12cb60f9a2cf602421ba5ff2cfbc37e1c3c8244cbbb5b68e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 973, + "startColumn": 3, + "charOffset": 27930, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 971, + "startColumn": 3, + "charOffset": 27894, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"critical hit chance\";\n\n\t\tcase SKILL_CRITICAL_HIT_DAMAGE:\n\t\t\treturn \"critical extra damage\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64b6238e2c6a6b3f22700527350a862865589e3cd653024ecb9856d516419980" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 976, + "startColumn": 3, + "charOffset": 28000, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 974, + "startColumn": 3, + "charOffset": 27962, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"critical extra damage\";\n\n\t\tcase SKILL_LIFE_LEECH_CHANCE:\n\t\t\treturn \"life leech chance\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04d11bcf6c7670e6e5ca11e75b5db9a5637d7476e028034bcac9ac231f6941c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 979, + "startColumn": 3, + "charOffset": 28064, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 977, + "startColumn": 3, + "charOffset": 28030, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"life leech chance\";\n\n\t\tcase SKILL_LIFE_LEECH_AMOUNT:\n\t\t\treturn \"life leech amount\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "078e6197eca18876eab3d4a4cac6217479d92f6593e5826ac31064d8567794e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 982, + "startColumn": 3, + "charOffset": 28128, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 980, + "startColumn": 3, + "charOffset": 28094, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"life leech amount\";\n\n\t\tcase SKILL_MANA_LEECH_CHANCE:\n\t\t\treturn \"mana leech chance\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c4260eca5846cdf6b67ca92a5f8590efbe83388ad4bcac796c5213a8770f30d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 985, + "startColumn": 3, + "charOffset": 28192, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 983, + "startColumn": 3, + "charOffset": 28158, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"mana leech chance\";\n\n\t\tcase SKILL_MANA_LEECH_AMOUNT:\n\t\t\treturn \"mana leech amount\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10b35da4022279681d277e9292a298e48717ada98de5368ba47f396d9ac05018" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 988, + "startColumn": 3, + "charOffset": 28256, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 986, + "startColumn": 3, + "charOffset": 28222, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"mana leech amount\";\n\n\t\tcase SKILL_MAGLEVEL:\n\t\t\treturn \"magic level\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04d11bcf6c7670e6e5ca11e75b5db9a5637d7476e028034bcac9ac231f6941c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 991, + "startColumn": 3, + "charOffset": 28305, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 989, + "startColumn": 3, + "charOffset": 28277, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"magic level\";\n\n\t\tcase SKILL_LEVEL:\n\t\t\treturn \"level\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62f584105032bf271d80cf9e66a93d244f1e92c2d6936026718b1f7a297de32d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 994, + "startColumn": 3, + "charOffset": 28345, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 992, + "startColumn": 3, + "charOffset": 28323, + "charLength": 7, + "snippet": { + "text": "\t\t\treturn \"level\";\n\n\t\tdefault:\n\t\t\treturn \"unknown\";\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0498ecd6a0fb2948f4b14b8ff76375a58117c296aa033caf6ca581c7b5a5277" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1006, + "startColumn": 2, + "charOffset": 28531, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 1004, + "startColumn": 2, + "charOffset": 28498, + "charLength": 8, + "snippet": { + "text": "\tconst uint16_t adler = 65521;\n\n\tuint32_t a = 1, b = 0;\n\n\twhile (length > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7122cd04276ab9e461c364882aab5190a70d7a2ce52a6284c7304cf459b1ba1e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1006, + "startColumn": 2, + "charOffset": 28531, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 1004, + "startColumn": 2, + "charOffset": 28498, + "charLength": 8, + "snippet": { + "text": "\tconst uint16_t adler = 65521;\n\n\tuint32_t a = 1, b = 0;\n\n\twhile (length > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b30b5150384bfc39ae7be31c6c0712899b12b4ee9bee47ca211f3480aae53553" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'length' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1008, + "startColumn": 9, + "charOffset": 28563, + "charLength": 6, + "snippet": { + "text": "length" + } + }, + "contextRegion": { + "startLine": 1006, + "startColumn": 9, + "charOffset": 28530, + "charLength": 6, + "snippet": { + "text": "\tuint32_t a = 1, b = 0;\n\n\twhile (length > 0) {\n\t\tsize_t tmp = length > 5552 ? 5552 : length;\n\t\tlength -= tmp;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2b1c3845b1d5d6b8281a32775510458889211bbedaf368c6e0f88b8574c818a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5552 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1009, + "startColumn": 25, + "charOffset": 28601, + "charLength": 4, + "snippet": { + "text": "5552" + } + }, + "contextRegion": { + "startLine": 1007, + "startColumn": 25, + "charOffset": 28554, + "charLength": 4, + "snippet": { + "text": "\n\twhile (length > 0) {\n\t\tsize_t tmp = length > 5552 ? 5552 : length;\n\t\tlength -= tmp;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "781f19e5a907dc14412edc81e5ee175bec84a4cb2d306d0292d876fc485f763d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5552 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1009, + "startColumn": 32, + "charOffset": 28608, + "charLength": 4, + "snippet": { + "text": "5552" + } + }, + "contextRegion": { + "startLine": 1007, + "startColumn": 32, + "charOffset": 28554, + "charLength": 4, + "snippet": { + "text": "\n\twhile (length > 0) {\n\t\tsize_t tmp = length > 5552 ? 5552 : length;\n\t\tlength -= tmp;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "951bd9919089b5bdb64ec741bcf2e36515e652f11a682a22c87ec4949db17ee4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1012, + "startColumn": 3, + "charOffset": 28643, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 1010, + "startColumn": 3, + "charOffset": 28623, + "charLength": 2, + "snippet": { + "text": "\t\tlength -= tmp;\n\n\t\tdo {\n\t\t\ta += *data++;\n\t\t\tb += a;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd8ec90c9310bed92e7b06d7ea32c1fb728ed00334edc3e52cc40aad8b315df7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1012, + "startColumn": 3, + "charOffset": 28643, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 1010, + "startColumn": 3, + "charOffset": 28623, + "charLength": 2, + "snippet": { + "text": "\t\tlength -= tmp;\n\n\t\tdo {\n\t\t\ta += *data++;\n\t\t\tb += a;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2f139fb69f7abb1416c1d4d9bc1369631f6d2d68e5b0a3bd614d3fa6f7941c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1013, + "startColumn": 14, + "charOffset": 28661, + "charLength": 2, + "snippet": { + "text": "++" + } + }, + "contextRegion": { + "startLine": 1011, + "startColumn": 14, + "charOffset": 28640, + "charLength": 2, + "snippet": { + "text": "\n\t\tdo {\n\t\t\ta += *data++;\n\t\t\tb += a;\n\t\t} while (--tmp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab8bfde06f7c1c4fbc9cfb122ba3065ac28949e74bd7bbe07f0ef213dc9d9668" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (do loop) is ID-dependent due to variable reference to 'tmp' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1015, + "startColumn": 12, + "charOffset": 28687, + "charLength": 2, + "snippet": { + "text": "--" + } + }, + "contextRegion": { + "startLine": 1013, + "startColumn": 12, + "charOffset": 28648, + "charLength": 2, + "snippet": { + "text": "\t\t\ta += *data++;\n\t\t\tb += a;\n\t\t} while (--tmp);\n\n\t\ta %= adler;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96d752b559d3cc879e15f688bf7dc2a4f2d3b7bc55eb9d08b708141b7f73c9a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1015, + "startColumn": 12, + "charOffset": 28687, + "charLength": 2, + "snippet": { + "text": "--" + } + }, + "contextRegion": { + "startLine": 1013, + "startColumn": 12, + "charOffset": 28648, + "charLength": 2, + "snippet": { + "text": "\t\t\ta += *data++;\n\t\t\tb += a;\n\t\t} while (--tmp);\n\n\t\ta %= adler;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4458e1d4622c53a9c47b7800b51a2c2eb6cd2397a7315e74e5ca3956fd798b44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'size_t' (aka 'unsigned long') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1015, + "startColumn": 12, + "charOffset": 28687, + "charLength": 2, + "snippet": { + "text": "--" + } + }, + "contextRegion": { + "startLine": 1013, + "startColumn": 12, + "charOffset": 28648, + "charLength": 2, + "snippet": { + "text": "\t\t\ta += *data++;\n\t\t\tb += a;\n\t\t} while (--tmp);\n\n\t\ta %= adler;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd0178899614a6b4627619f0f6186a403a2286f7e6139071b9a70a0c03cbd59e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1021, + "startColumn": 15, + "charOffset": 28742, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 1019, + "startColumn": 15, + "charOffset": 28724, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\treturn (b << 16) | a;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "567291aef8f3b559f56c4e5947e4f8bcd73682b9405afc59b1072520afee4880" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1021, + "startColumn": 15, + "charOffset": 28742, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 1019, + "startColumn": 15, + "charOffset": 28724, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\treturn (b << 16) | a;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7db6b92a1a36a6ca25817e3837214dbcdb959efe7e7cb8f9afc5d1b7cdcdf754" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1025, + "startColumn": 2, + "charOffset": 28794, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1023, + "startColumn": 2, + "charOffset": 28753, + "charLength": 3, + "snippet": { + "text": "\nstd::string ucfirst(std::string str) {\n\tfor (char &i : str) {\n\t\tif (i != ' ') {\n\t\t\ti = toupper(i);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4449ae3d4e953ee3ae9c4b479cd8e477dce6b3fe5f5e8fe90f0c954d08abcdb2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-11", + "ruleIndex": 423, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-11: The plain char type shall only be used for the storage and use of character values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1027, + "startColumn": 4, + "charOffset": 28837, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1025, + "startColumn": 4, + "charOffset": 28793, + "charLength": 1, + "snippet": { + "text": "\tfor (char &i : str) {\n\t\tif (i != ' ') {\n\t\t\ti = toupper(i);\n\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2893df9111922548a8f498d6fc7f7352c850af7550d1debe78cc698ad3a06716" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1027, + "startColumn": 8, + "charOffset": 28841, + "charLength": 7, + "snippet": { + "text": "toupper" + } + }, + "contextRegion": { + "startLine": 1025, + "startColumn": 8, + "charOffset": 28793, + "charLength": 7, + "snippet": { + "text": "\tfor (char &i : str) {\n\t\tif (i != ' ') {\n\t\t\ti = toupper(i);\n\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34bc509c6ca3d9ec328f5e9de0a84410a8215cee08e78a1db583b68661621e56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1027, + "startColumn": 8, + "charOffset": 28841, + "charLength": 7, + "snippet": { + "text": "toupper" + } + }, + "contextRegion": { + "startLine": 1025, + "startColumn": 8, + "charOffset": 28793, + "charLength": 7, + "snippet": { + "text": "\tfor (char &i : str) {\n\t\tif (i != ' ') {\n\t\t\ti = toupper(i);\n\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68f82e104d0b9236e4c8a431344744cb290ae7eaa68f11c59881597e8a354633" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-11", + "ruleIndex": 423, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-11: The plain char type shall only be used for the storage and use of character values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1040, + "startColumn": 2, + "charOffset": 29001, + "charLength": 3, + "snippet": { + "text": "str" + } + }, + "contextRegion": { + "startLine": 1038, + "startColumn": 2, + "charOffset": 28996, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tstr[0] = toupper(str.front());\n\tfor (size_t i = 1; i < strLength; ++i) {\n\t\tif (str[i - 1] == ' ') {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2308fa9906cbee83a0023c87fe08ac18709c29b35da05692f5838424e8a65d35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'value_type' (aka 'char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1040, + "startColumn": 11, + "charOffset": 29010, + "charLength": 7, + "snippet": { + "text": "toupper" + } + }, + "contextRegion": { + "startLine": 1038, + "startColumn": 11, + "charOffset": 28996, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tstr[0] = toupper(str.front());\n\tfor (size_t i = 1; i < strLength; ++i) {\n\t\tif (str[i - 1] == ' ') {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f477f84cd6b469fb2f864a12fe359185a29208371f98980eb0a5e3d32f143f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1040, + "startColumn": 11, + "charOffset": 29010, + "charLength": 7, + "snippet": { + "text": "toupper" + } + }, + "contextRegion": { + "startLine": 1038, + "startColumn": 11, + "charOffset": 28996, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tstr[0] = toupper(str.front());\n\tfor (size_t i = 1; i < strLength; ++i) {\n\t\tif (str[i - 1] == ' ') {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f21e00eb20dbafcae378148a2348aa4b7c2d4f4b867042a1f99c91ff053d3c47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1041, + "startColumn": 2, + "charOffset": 29033, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1039, + "startColumn": 2, + "charOffset": 28999, + "charLength": 3, + "snippet": { + "text": "\n\tstr[0] = toupper(str.front());\n\tfor (size_t i = 1; i < strLength; ++i) {\n\t\tif (str[i - 1] == ' ') {\n\t\t\tstr[i] = toupper(str[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "971abb25dd808b804f54b2d68c996fdc5568d81445882b66c31bc0e34ea4d631" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'strLength' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1041, + "startColumn": 21, + "charOffset": 29052, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1039, + "startColumn": 21, + "charOffset": 28999, + "charLength": 1, + "snippet": { + "text": "\n\tstr[0] = toupper(str.front());\n\tfor (size_t i = 1; i < strLength; ++i) {\n\t\tif (str[i - 1] == ' ') {\n\t\t\tstr[i] = toupper(str[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "612d4af9ddca13b5031865f6637f7e8279c8986b781f75f8c1ba26491e25e93c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-11", + "ruleIndex": 423, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-11: The plain char type shall only be used for the storage and use of character values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1043, + "startColumn": 4, + "charOffset": 29104, + "charLength": 3, + "snippet": { + "text": "str" + } + }, + "contextRegion": { + "startLine": 1041, + "startColumn": 4, + "charOffset": 29032, + "charLength": 3, + "snippet": { + "text": "\tfor (size_t i = 1; i < strLength; ++i) {\n\t\tif (str[i - 1] == ' ') {\n\t\t\tstr[i] = toupper(str[i]);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e6895ce00f7aa88e6134fca6dc04a5585d3c0e1fe4cdefccba737de46b660f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'value_type' (aka 'char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1043, + "startColumn": 13, + "charOffset": 29113, + "charLength": 7, + "snippet": { + "text": "toupper" + } + }, + "contextRegion": { + "startLine": 1041, + "startColumn": 13, + "charOffset": 29032, + "charLength": 7, + "snippet": { + "text": "\tfor (size_t i = 1; i < strLength; ++i) {\n\t\tif (str[i - 1] == ' ') {\n\t\t\tstr[i] = toupper(str[i]);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f7f7f7bb31577b7b9a8f845bf5a8b192727de6d4ec93195544ead979ebfcc9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1043, + "startColumn": 13, + "charOffset": 29113, + "charLength": 7, + "snippet": { + "text": "toupper" + } + }, + "contextRegion": { + "startLine": 1041, + "startColumn": 13, + "charOffset": 29032, + "charLength": 7, + "snippet": { + "text": "\tfor (size_t i = 1; i < strLength; ++i) {\n\t\tif (str[i - 1] == ' ') {\n\t\t\tstr[i] = toupper(str[i]);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3f8eb4f667aa2f28326c36252a5bcd190c856c6f03b0571908e22f1e5122ac0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-11", + "ruleIndex": 423, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-11: The plain char type shall only be used for the storage and use of character values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1055, + "startColumn": 7, + "charOffset": 29245, + "charLength": 2, + "snippet": { + "text": "ch" + } + }, + "contextRegion": { + "startLine": 1053, + "startColumn": 7, + "charOffset": 29235, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tchar ch = tolower(str.front());\n\treturn ch != 'f' && ch != 'n' && ch != '0';\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "398f4fef30a69f776c9296740fe2dd66e591ad1efb34869c3326af5de9781fdf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1055, + "startColumn": 12, + "charOffset": 29250, + "charLength": 7, + "snippet": { + "text": "tolower" + } + }, + "contextRegion": { + "startLine": 1053, + "startColumn": 12, + "charOffset": 29235, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tchar ch = tolower(str.front());\n\treturn ch != 'f' && ch != 'n' && ch != '0';\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2fa4ebe4b2f0905345595269a6e71423549ab0ea7bbd92b90c63dc68e115b482" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1055, + "startColumn": 12, + "charOffset": 29250, + "charLength": 7, + "snippet": { + "text": "tolower" + } + }, + "contextRegion": { + "startLine": 1053, + "startColumn": 12, + "charOffset": 29235, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tchar ch = tolower(str.front());\n\treturn ch != 'f' && ch != 'n' && ch != '0';\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "907a23795c765e223083dd05dbf0f320877958608271c6e54ec75641531a996c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1061, + "startColumn": 3, + "charOffset": 29398, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1059, + "startColumn": 3, + "charOffset": 29320, + "charLength": 4, + "snippet": { + "text": "std::string getWeaponName(WeaponType_t weaponType) {\n\tswitch (weaponType) {\n\t\tcase WEAPON_SWORD:\n\t\t\treturn \"sword\";\n\t\tcase WEAPON_CLUB:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47b8783850c2060d12cb60f9a2cf602421ba5ff2cfbc37e1c3c8244cbbb5b68e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1063, + "startColumn": 3, + "charOffset": 29438, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1061, + "startColumn": 3, + "charOffset": 29396, + "charLength": 4, + "snippet": { + "text": "\t\tcase WEAPON_SWORD:\n\t\t\treturn \"sword\";\n\t\tcase WEAPON_CLUB:\n\t\t\treturn \"club\";\n\t\tcase WEAPON_AXE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3bcaf9edd6e0d81251b104c72d14cae1c9dddf8d94e012354ccb8552c9ead5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1065, + "startColumn": 3, + "charOffset": 29476, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1063, + "startColumn": 3, + "charOffset": 29436, + "charLength": 4, + "snippet": { + "text": "\t\tcase WEAPON_CLUB:\n\t\t\treturn \"club\";\n\t\tcase WEAPON_AXE:\n\t\t\treturn \"axe\";\n\t\tcase WEAPON_DISTANCE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fdc238b7a1a86e89d1adf81699f9603e9a4e09683bb22da0e3fd617a99abd7bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1067, + "startColumn": 3, + "charOffset": 29512, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1065, + "startColumn": 3, + "charOffset": 29474, + "charLength": 4, + "snippet": { + "text": "\t\tcase WEAPON_AXE:\n\t\t\treturn \"axe\";\n\t\tcase WEAPON_DISTANCE:\n\t\t\treturn \"distance\";\n\t\tcase WEAPON_WAND:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66d96538bc63d76275b6507dea38fa8a3f32f85bc80879df3b2570283f123a60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1069, + "startColumn": 3, + "charOffset": 29558, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1067, + "startColumn": 3, + "charOffset": 29510, + "charLength": 4, + "snippet": { + "text": "\t\tcase WEAPON_DISTANCE:\n\t\t\treturn \"distance\";\n\t\tcase WEAPON_WAND:\n\t\t\treturn \"wand\";\n\t\tcase WEAPON_AMMO:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "552eecbdd90d9b95533410357713b547c5a606364fb52e9e09c3a2795d778869" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1071, + "startColumn": 3, + "charOffset": 29596, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1069, + "startColumn": 3, + "charOffset": 29556, + "charLength": 4, + "snippet": { + "text": "\t\tcase WEAPON_WAND:\n\t\t\treturn \"wand\";\n\t\tcase WEAPON_AMMO:\n\t\t\treturn \"ammunition\";\n\t\tcase WEAPON_MISSILE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1200d8cc6eadca83761f483e12a3315fe9e9bbbff959886b27441c179c19d0d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1073, + "startColumn": 3, + "charOffset": 29640, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1071, + "startColumn": 3, + "charOffset": 29594, + "charLength": 4, + "snippet": { + "text": "\t\tcase WEAPON_AMMO:\n\t\t\treturn \"ammunition\";\n\t\tcase WEAPON_MISSILE:\n\t\t\treturn \"missile\";\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4b711ad968516b49c4d03e6664ea2cde74ad422a074e38f70378d2e99193e3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1075, + "startColumn": 3, + "charOffset": 29684, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 1073, + "startColumn": 3, + "charOffset": 29638, + "charLength": 7, + "snippet": { + "text": "\t\tcase WEAPON_MISSILE:\n\t\t\treturn \"missile\";\n\t\tdefault:\n\t\t\treturn std::string();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "688a97f2d9064acc109921a49eace4c93c7948645365c26c6e00d52ee55c65e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-return-braced-init-list", + "ruleIndex": 630, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1076, + "startColumn": 11, + "charOffset": 29703, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1074, + "startColumn": 11, + "charOffset": 29661, + "charLength": 3, + "snippet": { + "text": "\t\t\treturn \"missile\";\n\t\tdefault:\n\t\t\treturn std::string();\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e354fb4c47ed0448e68db545924b1c9a23f0cd650021848ce1a6d0188d2c3f5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1141, + "startColumn": 4, + "charOffset": 31735, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1139, + "startColumn": 4, + "charOffset": 31623, + "charLength": 4, + "snippet": { + "text": "\tif (enum_index_opt.has_value() && enum_index_opt.value() < COMBAT_COUNT) {\n\t\treturn enum_index_opt.value();\n\t} else {\n\t\tg_logger().error(\"[{}] Combat type {} is out of range\", __FUNCTION__, fmt::underlying(combatType));\n\t\t// Uncomment for catch the function call with debug" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25cbdec67fd7b159b07347b875dddb862fa7895d35f49061145b79de8bfb5fe6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1154, + "startColumn": 4, + "charOffset": 32183, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1152, + "startColumn": 4, + "charOffset": 32098, + "charLength": 4, + "snippet": { + "text": "\tif (!name.empty() && combatType < COMBAT_COUNT) {\n\t\treturn formatEnumName(name);\n\t} else {\n\t\tg_logger().error(\"[{}] Combat type {} is out of range\", __FUNCTION__, fmt::underlying(combatType));\n\t\t// Uncomment for catch the function call with debug" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb2b3a4c5f42630105a486ef47238d96c5596cf9c3c220507237c24a8cd97c52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'stringToItemAttribute' has cognitive complexity of 28 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1167, + "startColumn": 17, + "charOffset": 32520, + "charLength": 21, + "snippet": { + "text": "stringToItemAttribute" + } + }, + "contextRegion": { + "startLine": 1165, + "startColumn": 17, + "charOffset": 32501, + "charLength": 21, + "snippet": { + "text": "}\n\nItemAttribute_t stringToItemAttribute(const std::string &str) {\n\tif (str == \"store\") {\n\t\treturn ItemAttribute_t::STORE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a55a18a462a2d948a36c6962c2a16a6749f54791d7859d5045602c1738d5686" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1168, + "startColumn": 2, + "charOffset": 32569, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1166, + "startColumn": 2, + "charOffset": 32503, + "charLength": 2, + "snippet": { + "text": "\nItemAttribute_t stringToItemAttribute(const std::string &str) {\n\tif (str == \"store\") {\n\t\treturn ItemAttribute_t::STORE;\n\t} else if (str == \"aid\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ab14afb3c8c04bd68a85d092c6e7787c7457630d29010aaf6b374908d1a9535" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1170, + "startColumn": 4, + "charOffset": 32627, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1168, + "startColumn": 4, + "charOffset": 32568, + "charLength": 4, + "snippet": { + "text": "\tif (str == \"store\") {\n\t\treturn ItemAttribute_t::STORE;\n\t} else if (str == \"aid\") {\n\t\treturn ItemAttribute_t::ACTIONID;\n\t} else if (str == \"uid\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "604d9e2be6e61dc5e533b18c5390c8f1df8c9260fb954c3addfc94192d95ce89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1233, + "startColumn": 2, + "charOffset": 34703, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1231, + "startColumn": 2, + "charOffset": 34644, + "charLength": 3, + "snippet": { + "text": "\tstd::string firstLine;\n\tfirstLine.reserve(str.length());\n\tfor (const char c : str) {\n\t\tif (c == '\\n') {\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff2a43296e2b5b0b7c0dca6069a255e73bde83549a82ac455e9575b3041384ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1244, + "startColumn": 3, + "charOffset": 34884, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1242, + "startColumn": 3, + "charOffset": 34814, + "charLength": 4, + "snippet": { + "text": "const char* getReturnMessage(ReturnValue value) {\n\tswitch (value) {\n\t\tcase RETURNVALUE_NOERROR:\n\t\t\treturn \"No error.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52e18ced545e32f2421c6ed7203cbfe78de5833e97627cec92e5ca8215ce5a0f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1247, + "startColumn": 3, + "charOffset": 34936, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1245, + "startColumn": 3, + "charOffset": 34910, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"No error.\";\n\n\t\tcase RETURNVALUE_NOTBOUGHTINSTORE:\n\t\t\treturn \"You cannot move this item into your store inbox as it was not bought in the store.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7d1982ad0dea2fcdfe86d2ac80b4a373a0e03c5a6aba5bb50d1d5f2dec55516" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1250, + "startColumn": 3, + "charOffset": 35070, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1248, + "startColumn": 3, + "charOffset": 34971, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You cannot move this item into your store inbox as it was not bought in the store.\";\n\n\t\tcase RETURNVALUE_ITEMCANNOTBEMOVEDPOUCH:\n\t\t\treturn \"This item cannot be moved there. You can only place gold, platinum and crystal coins in your gold pouch.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3bcaf9edd6e0d81251b104c72d14cae1c9dddf8d94e012354ccb8552c9ead5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1253, + "startColumn": 3, + "charOffset": 35232, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1251, + "startColumn": 3, + "charOffset": 35111, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"This item cannot be moved there. You can only place gold, platinum and crystal coins in your gold pouch.\";\n\n\t\tcase RETURNVALUE_ITEMCANNOTBEMOVEDTHERE:\n\t\t\treturn \"This item cannot be moved there.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "078e6197eca18876eab3d4a4cac6217479d92f6593e5826ac31064d8567794e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1256, + "startColumn": 3, + "charOffset": 35322, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1254, + "startColumn": 3, + "charOffset": 35273, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"This item cannot be moved there.\";\n\n\t\tcase RETURNVALUE_REWARDCHESTISEMPTY:\n\t\t\treturn \"The chest is currently empty. You did not take part in any battles in the last seven days or already claimed your reward.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77248fc8f2ef5edf813e8c5771df636fbe5d36078872158a92708c95d8f93cdb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1259, + "startColumn": 3, + "charOffset": 35497, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1257, + "startColumn": 3, + "charOffset": 35359, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"The chest is currently empty. You did not take part in any battles in the last seven days or already claimed your reward.\";\n\n\t\tcase RETURNVALUE_DESTINATIONOUTOFREACH:\n\t\t\treturn \"Destination is out of reach.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79cc824136d3bc39f493f2122d135c5d58a1d0a2f401cc85f84d507cc98b7d0e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1262, + "startColumn": 3, + "charOffset": 35582, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1260, + "startColumn": 3, + "charOffset": 35537, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"Destination is out of reach.\";\n\n\t\tcase RETURNVALUE_NOTMOVABLE:\n\t\t\treturn \"You cannot move this object.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3bcaf9edd6e0d81251b104c72d14cae1c9dddf8d94e012354ccb8552c9ead5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1265, + "startColumn": 3, + "charOffset": 35656, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1263, + "startColumn": 3, + "charOffset": 35611, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You cannot move this object.\";\n\n\t\tcase RETURNVALUE_DROPTWOHANDEDITEM:\n\t\t\treturn \"Drop the double-handed object first.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66d96538bc63d76275b6507dea38fa8a3f32f85bc80879df3b2570283f123a60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1268, + "startColumn": 3, + "charOffset": 35745, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1266, + "startColumn": 3, + "charOffset": 35692, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"Drop the double-handed object first.\";\n\n\t\tcase RETURNVALUE_BOTHHANDSNEEDTOBEFREE:\n\t\t\treturn \"Both hands need to be free.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec9522eef3bbcb4b476c2d7d2e209499c9d79821519227ff26082aa79683432a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1271, + "startColumn": 3, + "charOffset": 35829, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1269, + "startColumn": 3, + "charOffset": 35785, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"Both hands need to be free.\";\n\n\t\tcase RETURNVALUE_CANNOTBEDRESSED:\n\t\t\treturn \"You cannot dress this object there.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb8cb10c9ba3794171ac7caf3af78c08157dd284fda96e77269f3fa83e404403" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1274, + "startColumn": 3, + "charOffset": 35915, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1272, + "startColumn": 3, + "charOffset": 35863, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You cannot dress this object there.\";\n\n\t\tcase RETURNVALUE_PUTTHISOBJECTINYOURHAND:\n\t\t\treturn \"Put this object in your hand.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3e17f468f0c1dfab1ed26ffb989399c9197d0accbf37c37e722e931855e51e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1277, + "startColumn": 3, + "charOffset": 36003, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1275, + "startColumn": 3, + "charOffset": 35957, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"Put this object in your hand.\";\n\n\t\tcase RETURNVALUE_PUTTHISOBJECTINBOTHHANDS:\n\t\t\treturn \"Put this object in both hands.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b33c0423afe6f8be087588e7f98990ce016af7b19883fbe29f5eb517719e89f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1280, + "startColumn": 3, + "charOffset": 36093, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1278, + "startColumn": 3, + "charOffset": 36046, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"Put this object in both hands.\";\n\n\t\tcase RETURNVALUE_CANONLYUSEONEWEAPON:\n\t\t\treturn \"You may only use one weapon.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98da6a056f07618a7eb78fa00b02bd860e6087000d24f04413d27184a31f2b60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1283, + "startColumn": 3, + "charOffset": 36176, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1281, + "startColumn": 3, + "charOffset": 36131, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You may only use one weapon.\";\n\n\t\tcase RETURNVALUE_TOOFARAWAY:\n\t\t\treturn \"Too far away.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a88b12ae52b7748e863bea73375ee679f110dde8c90ae7eb188ea8208754e2d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1286, + "startColumn": 3, + "charOffset": 36235, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1284, + "startColumn": 3, + "charOffset": 36205, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"Too far away.\";\n\n\t\tcase RETURNVALUE_FIRSTGODOWNSTAIRS:\n\t\t\treturn \"First go downstairs.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2074029184820a3ed13eb92e2a55d8421f60b296ba50074e3deea49ccf970374" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1289, + "startColumn": 3, + "charOffset": 36308, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1287, + "startColumn": 3, + "charOffset": 36271, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"First go downstairs.\";\n\n\t\tcase RETURNVALUE_FIRSTGOUPSTAIRS:\n\t\t\treturn \"First go upstairs.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5e44b203557c2700c8b93349eaf2489a14b4cb4a3a02874b08f750e64d92caf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1292, + "startColumn": 3, + "charOffset": 36377, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1290, + "startColumn": 3, + "charOffset": 36342, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"First go upstairs.\";\n\n\t\tcase RETURNVALUE_NOTENOUGHCAPACITY:\n\t\t\treturn \"This object is too heavy for you to carry.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7dbee4ad5d46fe45e466c04fd9d7a935c44322af67d4d9b0195d9e2dad33d00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1295, + "startColumn": 3, + "charOffset": 36472, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1293, + "startColumn": 3, + "charOffset": 36413, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"This object is too heavy for you to carry.\";\n\n\t\tcase RETURNVALUE_CONTAINERNOTENOUGHROOM:\n\t\t\treturn \"You cannot put more objects in this container.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7d1982ad0dea2fcdfe86d2ac80b4a373a0e03c5a6aba5bb50d1d5f2dec55516" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1298, + "startColumn": 3, + "charOffset": 36576, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1296, + "startColumn": 3, + "charOffset": 36513, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You cannot put more objects in this container.\";\n\n\t\tcase RETURNVALUE_ONLYAMMOINQUIVER:\n\t\t\treturn \"This quiver only holds arrows and bolts.\\nYou cannot put any other items in it.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c4260eca5846cdf6b67ca92a5f8590efbe83388ad4bcac796c5213a8770f30d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1302, + "startColumn": 3, + "charOffset": 36741, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1300, + "startColumn": 3, + "charOffset": 36704, + "charLength": 4, + "snippet": { + "text": "\n\t\tcase RETURNVALUE_CREATUREBLOCK:\n\t\tcase RETURNVALUE_NEEDEXCHANGE:\n\t\tcase RETURNVALUE_NOTENOUGHROOM:\n\t\t\treturn \"There is not enough room.\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c63c0e76fcdca3aa4a076a3a1f2319a5db4acf680a82d975c7021f8b1e64583a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1303, + "startColumn": 3, + "charOffset": 36774, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1301, + "startColumn": 3, + "charOffset": 36705, + "charLength": 4, + "snippet": { + "text": "\t\tcase RETURNVALUE_CREATUREBLOCK:\n\t\tcase RETURNVALUE_NEEDEXCHANGE:\n\t\tcase RETURNVALUE_NOTENOUGHROOM:\n\t\t\treturn \"There is not enough room.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55922915945421c1fc7f38c3dc32a4ce6554b62a825e3ee4ec8bfdffc58fb7a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1303, + "startColumn": 3, + "charOffset": 36774, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1301, + "startColumn": 3, + "charOffset": 36705, + "charLength": 4, + "snippet": { + "text": "\t\tcase RETURNVALUE_CREATUREBLOCK:\n\t\tcase RETURNVALUE_NEEDEXCHANGE:\n\t\tcase RETURNVALUE_NOTENOUGHROOM:\n\t\t\treturn \"There is not enough room.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc3e525744fa001252b488dd4c80c30bbfd7c2edccbf2b29e824e4eaabd88f2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1306, + "startColumn": 3, + "charOffset": 36848, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1304, + "startColumn": 3, + "charOffset": 36806, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"There is not enough room.\";\n\n\t\tcase RETURNVALUE_CANNOTPICKUP:\n\t\t\treturn \"You cannot take this object.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dca40c5d0ab287528b3d2a3991ee43a93504363e3e8b7b25ebaa9a12a8acdc84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1309, + "startColumn": 3, + "charOffset": 36924, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1307, + "startColumn": 3, + "charOffset": 36879, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You cannot take this object.\";\n\n\t\tcase RETURNVALUE_CANNOTTHROW:\n\t\t\treturn \"You cannot throw there.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a179b75e8f773db2536bc7f2b2f25eb7a5f838d76bd099f06090b91f2bd9fb0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1312, + "startColumn": 3, + "charOffset": 36994, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1310, + "startColumn": 3, + "charOffset": 36954, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You cannot throw there.\";\n\n\t\tcase RETURNVALUE_THEREISNOWAY:\n\t\t\treturn \"There is no way.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77c34a7b46774a2f81ba7bfb07e2b0fe511664c6c5ae20b2344ef752d4996cde" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1315, + "startColumn": 3, + "charOffset": 37058, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1313, + "startColumn": 3, + "charOffset": 37025, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"There is no way.\";\n\n\t\tcase RETURNVALUE_THISISIMPOSSIBLE:\n\t\t\treturn \"This is impossible.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb08f36ea0d8eef7d755b32f3155b3f96a25726a9f8ac8bb88b85c89327b422c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1318, + "startColumn": 3, + "charOffset": 37129, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1316, + "startColumn": 3, + "charOffset": 37093, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"This is impossible.\";\n\n\t\tcase RETURNVALUE_PLAYERISPZLOCKED:\n\t\t\treturn \"You can not enter a protection zone after attacking another player.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e83ce6dd7f9fbaee82ac758aad33ec35bb016b430094dd97191d49d7fda2ac2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1321, + "startColumn": 3, + "charOffset": 37248, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1319, + "startColumn": 3, + "charOffset": 37164, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You can not enter a protection zone after attacking another player.\";\n\n\t\tcase RETURNVALUE_PLAYERISNOTINVITED:\n\t\t\treturn \"You are not invited.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24b128cf7d0a931ef072f7a0b8346bd462a6e8d3530c2242185f5d686bcce1f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1324, + "startColumn": 3, + "charOffset": 37322, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1322, + "startColumn": 3, + "charOffset": 37285, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You are not invited.\";\n\n\t\tcase RETURNVALUE_CREATUREDOESNOTEXIST:\n\t\t\treturn \"Creature does not exist.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d77c8095f156d8de0922954f6f9abfef526348e495e5a94629181596c3dbf087" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1327, + "startColumn": 3, + "charOffset": 37402, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1325, + "startColumn": 3, + "charOffset": 37361, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"Creature does not exist.\";\n\n\t\tcase RETURNVALUE_DEPOTISFULL:\n\t\t\treturn \"You cannot put more items in this depot.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64b6238e2c6a6b3f22700527350a862865589e3cd653024ecb9856d516419980" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1330, + "startColumn": 3, + "charOffset": 37489, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1328, + "startColumn": 3, + "charOffset": 37432, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You cannot put more items in this depot.\";\n\n\t\tcase RETURNVALUE_CONTAINERISFULL:\n\t\t\treturn \"You cannot put more items in this container.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c98c28b2b2f60c321285285bf51e6d54f5ea930e8cac3dbba544655ada594af8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1333, + "startColumn": 3, + "charOffset": 37584, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1331, + "startColumn": 3, + "charOffset": 37523, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You cannot put more items in this container.\";\n\n\t\tcase RETURNVALUE_CANNOTUSETHISOBJECT:\n\t\t\treturn \"You cannot use this object.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bcfcb12f63fc20591d8ddbfd40bc35cb1d808a721f1b63b1b35405b7b6e38419" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1336, + "startColumn": 3, + "charOffset": 37666, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1334, + "startColumn": 3, + "charOffset": 37622, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You cannot use this object.\";\n\n\t\tcase RETURNVALUE_PLAYERWITHTHISNAMEISNOTONLINE:\n\t\t\treturn \"A player with this name is not online.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85514d3ee139be4f10579ac719ba9421cd80ef82b73b88e4a1bba4fd62012b29" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1339, + "startColumn": 3, + "charOffset": 37769, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1337, + "startColumn": 3, + "charOffset": 37714, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"A player with this name is not online.\";\n\n\t\tcase RETURNVALUE_NOTREQUIREDLEVELTOUSERUNE:\n\t\t\treturn \"You do not have the required magic level to use this rune.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c263093e273195dcc9c43a508c17c2902959c4244c9fe53bbdef52f6c5a798e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1342, + "startColumn": 3, + "charOffset": 37888, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1340, + "startColumn": 3, + "charOffset": 37813, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You do not have the required magic level to use this rune.\";\n\n\t\tcase RETURNVALUE_YOUAREALREADYTRADING:\n\t\t\treturn \"You are already trading. Finish this trade first.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e30c768cde3c6324a084e7459a8ae8ea2595af1cff74372113645fbf1d9c240e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1345, + "startColumn": 3, + "charOffset": 37993, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1343, + "startColumn": 3, + "charOffset": 37927, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You are already trading. Finish this trade first.\";\n\n\t\tcase RETURNVALUE_THISPLAYERISALREADYTRADING:\n\t\t\treturn \"This player is already trading.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51c676ba58ea84b710365fdde9712e296f021a5d95be685ee6e9119f2e073a59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1348, + "startColumn": 3, + "charOffset": 38086, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1346, + "startColumn": 3, + "charOffset": 38038, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"This player is already trading.\";\n\n\t\tcase RETURNVALUE_YOUMAYNOTLOGOUTDURINGAFIGHT:\n\t\t\treturn \"You may not logout during or immediately after a fight!\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e4688d80d21b19c2d99b74358eb9ffe8a0a45900a09bde25e7e4cca9b4ad36f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1351, + "startColumn": 3, + "charOffset": 38204, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1349, + "startColumn": 3, + "charOffset": 38132, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You may not logout during or immediately after a fight!\";\n\n\t\tcase RETURNVALUE_DIRECTPLAYERSHOOT:\n\t\t\treturn \"You are not allowed to shoot directly on players.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a179b75e8f773db2536bc7f2b2f25eb7a5f838d76bd099f06090b91f2bd9fb0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1354, + "startColumn": 3, + "charOffset": 38306, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1352, + "startColumn": 3, + "charOffset": 38240, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You are not allowed to shoot directly on players.\";\n\n\t\tcase RETURNVALUE_NOTENOUGHLEVEL:\n\t\t\treturn \"You do not have enough level.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95175bce814e2149098e3aecd9df716cd876460868d44c4ae2d8d79b5f521f21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1357, + "startColumn": 3, + "charOffset": 38385, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1355, + "startColumn": 3, + "charOffset": 38339, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You do not have enough level.\";\n\n\t\tcase RETURNVALUE_NOTENOUGHMAGICLEVEL:\n\t\t\treturn \"You do not have enough magic level.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1168e5f33b641e427308e4e27ef60c4df0f2fdbea9c380cfa395cc0f4879754" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1360, + "startColumn": 3, + "charOffset": 38475, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1358, + "startColumn": 3, + "charOffset": 38423, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You do not have enough magic level.\";\n\n\t\tcase RETURNVALUE_NOTENOUGHMANA:\n\t\t\treturn \"You do not have enough mana.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3e17f468f0c1dfab1ed26ffb989399c9197d0accbf37c37e722e931855e51e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1363, + "startColumn": 3, + "charOffset": 38552, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1361, + "startColumn": 3, + "charOffset": 38507, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You do not have enough mana.\";\n\n\t\tcase RETURNVALUE_NOTENOUGHSOUL:\n\t\t\treturn \"You do not have enough soul.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f669d3de86499b52fa3ff913381542a3895d65e8bf974aa58e4011ce4a86c3b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1366, + "startColumn": 3, + "charOffset": 38629, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1364, + "startColumn": 3, + "charOffset": 38584, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You do not have enough soul.\";\n\n\t\tcase RETURNVALUE_YOUAREEXHAUSTED:\n\t\t\treturn \"You are exhausted.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "133592482f538ff4778bcb06be5a0e2f31fa0cc9b3046ea37fef6560885361c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1369, + "startColumn": 3, + "charOffset": 38698, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1367, + "startColumn": 3, + "charOffset": 38663, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You are exhausted.\";\n\n\t\tcase RETURNVALUE_CANONLYUSETHISRUNEONCREATURES:\n\t\t\treturn \"You can only use this rune on creatures.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78a33630d9547dc8bfc76ad0d591de1f79554623cf7a081a0ac6729d8912fea0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1372, + "startColumn": 3, + "charOffset": 38803, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1370, + "startColumn": 3, + "charOffset": 38746, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You can only use this rune on creatures.\";\n\n\t\tcase RETURNVALUE_PLAYERISNOTREACHABLE:\n\t\t\treturn \"Player is not reachable.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3af9352799b9400d4cc2a486743653d5dff6651afbbc50f89e8044e9a244c08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1375, + "startColumn": 3, + "charOffset": 38883, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1373, + "startColumn": 3, + "charOffset": 38842, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"Player is not reachable.\";\n\n\t\tcase RETURNVALUE_CREATUREISNOTREACHABLE:\n\t\t\treturn \"Creature is not reachable.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27cfeecf5d149f400fcb3746808c8df89dbdd05b6b35ba9001b267b0ab57b2ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1378, + "startColumn": 3, + "charOffset": 38967, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1376, + "startColumn": 3, + "charOffset": 38924, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"Creature is not reachable.\";\n\n\t\tcase RETURNVALUE_ACTIONNOTPERMITTEDINPROTECTIONZONE:\n\t\t\treturn \"This action is not permitted in a protection zone.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93c3431c11950ebb8660ad3174ca452ff1d27704aa151dc96068ed4b92767aca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1381, + "startColumn": 3, + "charOffset": 39087, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1379, + "startColumn": 3, + "charOffset": 39020, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"This action is not permitted in a protection zone.\";\n\n\t\tcase RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER:\n\t\t\treturn \"You may not attack this player.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f002350f41953950178a25b44bbb718f1d843488102a826b68a12a782250802e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1384, + "startColumn": 3, + "charOffset": 39179, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1382, + "startColumn": 3, + "charOffset": 39131, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You may not attack this player.\";\n\n\t\tcase RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE:\n\t\t\treturn \"You may not attack this creature.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87cd76589753de9674455a4bddc27250bdf0e43393966fca2f30d1391989f661" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1387, + "startColumn": 3, + "charOffset": 39275, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1385, + "startColumn": 3, + "charOffset": 39225, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You may not attack this creature.\";\n\n\t\tcase RETURNVALUE_YOUMAYNOTATTACKAPERSONINPROTECTIONZONE:\n\t\t\treturn \"You may not attack a person in a protection zone.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03fc3b00caadd0843829db6360b6085c1208e472be4e2f9b95d2d1cba9fd335c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1390, + "startColumn": 3, + "charOffset": 39398, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1388, + "startColumn": 3, + "charOffset": 39332, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You may not attack a person in a protection zone.\";\n\n\t\tcase RETURNVALUE_YOUMAYNOTATTACKAPERSONWHILEINPROTECTIONZONE:\n\t\t\treturn \"You may not attack a person while you are in a protection zone.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f39af3d9b12faf509220a240a8117a4ad2f5d6b8e3242270afbe8c26b6f7fd1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1393, + "startColumn": 3, + "charOffset": 39540, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1391, + "startColumn": 3, + "charOffset": 39460, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You may not attack a person while you are in a protection zone.\";\n\n\t\tcase RETURNVALUE_YOUCANONLYUSEITONCREATURES:\n\t\t\treturn \"You can only use it on creatures.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41219c1385abad9c19244b04ebdd849d1c5a214c103205b9738d4c3a0a58644a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1396, + "startColumn": 3, + "charOffset": 39635, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1394, + "startColumn": 3, + "charOffset": 39585, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You can only use it on creatures.\";\n\n\t\tcase RETURNVALUE_TURNSECUREMODETOATTACKUNMARKEDPLAYERS:\n\t\t\treturn \"Turn secure mode off if you really want to attack unmarked players.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b1a55793fa62aec0845d3bc96e0fd0765647a794d07639ee2b28a94680abe06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1399, + "startColumn": 3, + "charOffset": 39775, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1397, + "startColumn": 3, + "charOffset": 39691, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"Turn secure mode off if you really want to attack unmarked players.\";\n\n\t\tcase RETURNVALUE_YOUNEEDPREMIUMACCOUNT:\n\t\t\treturn \"You need a premium account.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad31c1f16adc7994fccb07c442402ce46e9c20b45a17e3bd2837f1eb4a2bcf29" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1402, + "startColumn": 3, + "charOffset": 39859, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1400, + "startColumn": 3, + "charOffset": 39815, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You need a premium account.\";\n\n\t\tcase RETURNVALUE_YOUNEEDTOLEARNTHISSPELL:\n\t\t\treturn \"You need to learn this spell first.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "265d4dd32ee6abbe2ee96ed3f87b412613d5eb128d726f93b79cd9c79d887fb3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1405, + "startColumn": 3, + "charOffset": 39953, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1403, + "startColumn": 3, + "charOffset": 39901, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You need to learn this spell first.\";\n\n\t\tcase RETURNVALUE_YOURVOCATIONCANNOTUSETHISSPELL:\n\t\t\treturn \"Your vocation cannot use this spell.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "585c270551b495f8d21c85703d34cd56faab2928f50d6bea1646e1d556449250" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1408, + "startColumn": 3, + "charOffset": 40055, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1406, + "startColumn": 3, + "charOffset": 40002, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"Your vocation cannot use this spell.\";\n\n\t\tcase RETURNVALUE_YOUNEEDAWEAPONTOUSETHISSPELL:\n\t\t\treturn \"You need to equip a weapon to use this spell.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c2b42b3127d2f637e40ff4ccc4e676d0f528ccb8c964e75d1d3e3a7d7746c92" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1411, + "startColumn": 3, + "charOffset": 40164, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1409, + "startColumn": 3, + "charOffset": 40102, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You need to equip a weapon to use this spell.\";\n\n\t\tcase RETURNVALUE_PLAYERISPZLOCKEDLEAVEPVPZONE:\n\t\t\treturn \"You can not leave a pvp zone after attacking another player.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb9a951284635b66802889c63f193fc34acb60d6432d21523a565389a96f3d52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1414, + "startColumn": 3, + "charOffset": 40288, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1412, + "startColumn": 3, + "charOffset": 40211, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You can not leave a pvp zone after attacking another player.\";\n\n\t\tcase RETURNVALUE_PLAYERISPZLOCKEDENTERPVPZONE:\n\t\t\treturn \"You can not enter a pvp zone after attacking another player.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04d11bcf6c7670e6e5ca11e75b5db9a5637d7476e028034bcac9ac231f6941c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1417, + "startColumn": 3, + "charOffset": 40412, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1415, + "startColumn": 3, + "charOffset": 40335, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You can not enter a pvp zone after attacking another player.\";\n\n\t\tcase RETURNVALUE_ACTIONNOTPERMITTEDINANOPVPZONE:\n\t\t\treturn \"This action is not permitted in a non pvp zone.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a695842b11704d1e671934f7d9c68ba4e3dbf853b4e3e77ad8c861925e7f8ce2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1420, + "startColumn": 3, + "charOffset": 40525, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1418, + "startColumn": 3, + "charOffset": 40461, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"This action is not permitted in a non pvp zone.\";\n\n\t\tcase RETURNVALUE_YOUCANNOTLOGOUTHERE:\n\t\t\treturn \"You can not logout here.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0db9761ab36222c13baee1982f0c3fce3237362dcd86b929d828f343a76cc66b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1423, + "startColumn": 3, + "charOffset": 40604, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1421, + "startColumn": 3, + "charOffset": 40563, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You can not logout here.\";\n\n\t\tcase RETURNVALUE_YOUNEEDAMAGICITEMTOCASTSPELL:\n\t\t\treturn \"You need a magic item to cast this spell.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1200d8cc6eadca83761f483e12a3315fe9e9bbbff959886b27441c179c19d0d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1426, + "startColumn": 3, + "charOffset": 40709, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1424, + "startColumn": 3, + "charOffset": 40651, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You need a magic item to cast this spell.\";\n\n\t\tcase RETURNVALUE_CANNOTCONJUREITEMHERE:\n\t\t\treturn \"You cannot conjure items here.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22a90b27554046317d39c4487baa2875ba3235324674c96913840992c759410e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1429, + "startColumn": 3, + "charOffset": 40796, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1427, + "startColumn": 3, + "charOffset": 40749, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You cannot conjure items here.\";\n\n\t\tcase RETURNVALUE_YOUNEEDTOSPLITYOURSPEARS:\n\t\t\treturn \"You need to split your spears first.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1b454c83d6f2b73315b7729aeeca31006f3d4ab65dc78285caeafab379211cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1432, + "startColumn": 3, + "charOffset": 40892, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1430, + "startColumn": 3, + "charOffset": 40839, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You need to split your spears first.\";\n\n\t\tcase RETURNVALUE_NAMEISTOOAMBIGUOUS:\n\t\t\treturn \"Player name is ambiguous.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16adbbdc5e980de0e5ba1d69704428349b0dc6a9fb80afab45f85f7c0d9015a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1435, + "startColumn": 3, + "charOffset": 40971, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1433, + "startColumn": 3, + "charOffset": 40929, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"Player name is ambiguous.\";\n\n\t\tcase RETURNVALUE_CANONLYUSEONESHIELD:\n\t\t\treturn \"You may use only one shield.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87cd76589753de9674455a4bddc27250bdf0e43393966fca2f30d1391989f661" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1438, + "startColumn": 3, + "charOffset": 41054, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1436, + "startColumn": 3, + "charOffset": 41009, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You may use only one shield.\";\n\n\t\tcase RETURNVALUE_NOPARTYMEMBERSINRANGE:\n\t\t\treturn \"No party members in range.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a41d5fd800fd0532ad98a52747eea21a912cd754adc99a674a7fba7065b627fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1441, + "startColumn": 3, + "charOffset": 41137, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1439, + "startColumn": 3, + "charOffset": 41094, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"No party members in range.\";\n\n\t\tcase RETURNVALUE_YOUARENOTTHEOWNER:\n\t\t\treturn \"You are not the owner.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95436c357549667d43d79f233ed0ee6368f7d19ab7da59c350d10898608057b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1444, + "startColumn": 3, + "charOffset": 41212, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1442, + "startColumn": 3, + "charOffset": 41173, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You are not the owner.\";\n\n\t\tcase RETURNVALUE_YOUCANTOPENCORPSEADM:\n\t\t\treturn \"You can't open this corpse, because you are an Admin.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "169f2b780b402d970d8099458520b664411df0a6e602ee26b7a440607f80df7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1447, + "startColumn": 3, + "charOffset": 41321, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1445, + "startColumn": 3, + "charOffset": 41251, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You can't open this corpse, because you are an Admin.\";\n\n\t\tcase RETURNVALUE_NOSUCHRAIDEXISTS:\n\t\t\treturn \"No such raid exists.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51c676ba58ea84b710365fdde9712e296f021a5d95be685ee6e9119f2e073a59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1450, + "startColumn": 3, + "charOffset": 41393, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1448, + "startColumn": 3, + "charOffset": 41356, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"No such raid exists.\";\n\n\t\tcase RETURNVALUE_ANOTHERRAIDISALREADYEXECUTING:\n\t\t\treturn \"Another raid is already executing.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95436c357549667d43d79f233ed0ee6368f7d19ab7da59c350d10898608057b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1453, + "startColumn": 3, + "charOffset": 41492, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1451, + "startColumn": 3, + "charOffset": 41441, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"Another raid is already executing.\";\n\n\t\tcase RETURNVALUE_TRADEPLAYERFARAWAY:\n\t\t\treturn \"Trade player is too far away.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63dcbb53cda6e20c7eb013bef07c2b4f755a333e3725c0bbe42a5abe274ac30c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1456, + "startColumn": 3, + "charOffset": 41575, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1454, + "startColumn": 3, + "charOffset": 41529, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"Trade player is too far away.\";\n\n\t\tcase RETURNVALUE_YOUDONTOWNTHISHOUSE:\n\t\t\treturn \"You don't own this house.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db01c1dc3832d0afa31eecde306316fdc5112e5330b182b352e6ce1f1b9c269d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1459, + "startColumn": 3, + "charOffset": 41655, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1457, + "startColumn": 3, + "charOffset": 41613, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You don't own this house.\";\n\n\t\tcase RETURNVALUE_TRADEPLAYERALREADYOWNSAHOUSE:\n\t\t\treturn \"Trade player already owns a house.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "799a706d3bd9d5e71ed6d3a371ac2c471c95bd1d30250124e218409b02a70eff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1462, + "startColumn": 3, + "charOffset": 41753, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1460, + "startColumn": 3, + "charOffset": 41702, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"Trade player already owns a house.\";\n\n\t\tcase RETURNVALUE_TRADEPLAYERHIGHESTBIDDER:\n\t\t\treturn \"Trade player is currently the highest bidder of an auctioned house.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7dbee4ad5d46fe45e466c04fd9d7a935c44322af67d4d9b0195d9e2dad33d00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1465, + "startColumn": 3, + "charOffset": 41880, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1463, + "startColumn": 3, + "charOffset": 41796, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"Trade player is currently the highest bidder of an auctioned house.\";\n\n\t\tcase RETURNVALUE_YOUCANNOTTRADETHISHOUSE:\n\t\t\treturn \"You can not trade this house.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f669d3de86499b52fa3ff913381542a3895d65e8bf974aa58e4011ce4a86c3b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1468, + "startColumn": 3, + "charOffset": 41968, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1466, + "startColumn": 3, + "charOffset": 41922, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You can not trade this house.\";\n\n\t\tcase RETURNVALUE_YOUDONTHAVEREQUIREDPROFESSION:\n\t\t\treturn \"You don't have the required profession.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dca40c5d0ab287528b3d2a3991ee43a93504363e3e8b7b25ebaa9a12a8acdc84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1471, + "startColumn": 3, + "charOffset": 42072, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1469, + "startColumn": 3, + "charOffset": 42016, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You don't have the required profession.\";\n\n\t\tcase RETURNVALUE_NOTENOUGHFISTLEVEL:\n\t\t\treturn \"You do not have enough fist level\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5a360ba637cffa4452291fdd301b7cfb91e0b68f369faab37276b5cf8133232" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1474, + "startColumn": 3, + "charOffset": 42159, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1472, + "startColumn": 3, + "charOffset": 42109, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You do not have enough fist level\";\n\n\t\tcase RETURNVALUE_NOTENOUGHCLUBLEVEL:\n\t\t\treturn \"You do not have enough club level\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f002350f41953950178a25b44bbb718f1d843488102a826b68a12a782250802e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1477, + "startColumn": 3, + "charOffset": 42246, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1475, + "startColumn": 3, + "charOffset": 42196, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You do not have enough club level\";\n\n\t\tcase RETURNVALUE_NOTENOUGHSWORDLEVEL:\n\t\t\treturn \"You do not have enough sword level\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e3f667c9c53f2e0165baceebd8200efb2633962aa9e3051b182d62b53cc91ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1480, + "startColumn": 3, + "charOffset": 42335, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1478, + "startColumn": 3, + "charOffset": 42284, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You do not have enough sword level\";\n\n\t\tcase RETURNVALUE_NOTENOUGHAXELEVEL:\n\t\t\treturn \"You do not have enough axe level\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad31c1f16adc7994fccb07c442402ce46e9c20b45a17e3bd2837f1eb4a2bcf29" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1483, + "startColumn": 3, + "charOffset": 42420, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1481, + "startColumn": 3, + "charOffset": 42371, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You do not have enough axe level\";\n\n\t\tcase RETURNVALUE_NOTENOUGHDISTANCELEVEL:\n\t\t\treturn \"You do not have enough distance level\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ea0169e0fa37412190b7696356286b77b02a29f57238b0f1be8ec0678ea0426" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1486, + "startColumn": 3, + "charOffset": 42515, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1484, + "startColumn": 3, + "charOffset": 42461, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You do not have enough distance level\";\n\n\t\tcase RETURNVALUE_NOTENOUGHSHIELDLEVEL:\n\t\t\treturn \"You do not have enough shielding level\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "403bb01511a5fca1450179f4400cd7ff033cd4a81c7cd09230baa5dbcdb6b4a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1489, + "startColumn": 3, + "charOffset": 42609, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1487, + "startColumn": 3, + "charOffset": 42554, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You do not have enough shielding level\";\n\n\t\tcase RETURNVALUE_NOTENOUGHFISHLEVEL:\n\t\t\treturn \"You do not have enough fishing level\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c98c28b2b2f60c321285285bf51e6d54f5ea930e8cac3dbba544655ada594af8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1492, + "startColumn": 3, + "charOffset": 42699, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1490, + "startColumn": 3, + "charOffset": 42646, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You do not have enough fishing level\";\n\n\t\tcase RETURNVALUE_NOTPOSSIBLE:\n\t\t\treturn \"Sorry, not possible.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3a8392fa5b7f641535ef1885734a5166f55b5285985d743d16e5aaae53bb2c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1495, + "startColumn": 3, + "charOffset": 42766, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1493, + "startColumn": 3, + "charOffset": 42729, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"Sorry, not possible.\";\n\n\t\tcase RETURNVALUE_REWARDCONTAINERISEMPTY:\n\t\t\treturn \"You already claimed your reward.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "117cfd261a47b2585af1e821a2dd1d051fbf9eca6431a9071d371752d2ecffdd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1498, + "startColumn": 3, + "charOffset": 42856, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1496, + "startColumn": 3, + "charOffset": 42807, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"You already claimed your reward.\";\n\n\t\tcase RETURNVALUE_CONTACTADMINISTRATOR:\n\t\t\treturn \"An error has occurred, please contact your administrator.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4dad2cfbfdc871d621eabe03db79cab21dd59332aa0dd7e9e641dc7c65cd52b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1501, + "startColumn": 3, + "charOffset": 42969, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1499, + "startColumn": 3, + "charOffset": 42895, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"An error has occurred, please contact your administrator.\";\n\n\t\tcase RETURNVALUE_ITEMISNOTYOURS:\n\t\t\treturn \"This item is not yours.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8df0dcd97bee038bba5d211846528b05f0d2d27eef72c653644c2d0d8ff9269" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1504, + "startColumn": 3, + "charOffset": 43042, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1502, + "startColumn": 3, + "charOffset": 43002, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"This item is not yours.\";\n\n\t\tcase RETURNVALUE_ITEMUNTRADEABLE:\n\t\t\treturn \"This item is untradeable.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85514d3ee139be4f10579ac719ba9421cd80ef82b73b88e4a1bba4fd62012b29" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1508, + "startColumn": 3, + "charOffset": 43168, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 1506, + "startColumn": 3, + "charOffset": 43115, + "charLength": 7, + "snippet": { + "text": "\n\t\t// Any unhandled ReturnValue will go enter here\n\t\tdefault:\n\t\t\treturn \"Unknown error.\";\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "078e6197eca18876eab3d4a4cac6217479d92f6593e5826ac31064d8567794e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-non-const-global-variables", + "ruleIndex": 486, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'OTSYSTIME' is non-const and globally accessible, consider making it const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1513, + "startColumn": 9, + "charOffset": 43219, + "charLength": 9, + "snippet": { + "text": "OTSYSTIME" + } + }, + "contextRegion": { + "startLine": 1511, + "startColumn": 9, + "charOffset": 43208, + "charLength": 9, + "snippet": { + "text": "}\n\nint64_t OTSYSTIME = 0;\nvoid UPDATE_OTSYS_TIME() {\n\tOTSYSTIME = std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "367be2a3cf3bf999c315470adde645b50c0590fbe2f8b97f53eed4b8a64bbb3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1527, + "startColumn": 2, + "charOffset": 43703, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1525, + "startColumn": 2, + "charOffset": 43594, + "charLength": 2, + "snippet": { + "text": "SpellGroup_t stringToSpellGroup(const std::string &value) {\n\tstd::string tmpStr = asLowerCaseString(value);\n\tif (tmpStr == \"attack\" || tmpStr == \"1\") {\n\t\treturn SPELLGROUP_ATTACK;\n\t} else if (tmpStr == \"healing\" || tmpStr == \"2\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea70ebda8580c838eea1287c698d63fac244a7cb6ccccd907f028e9129ecff48" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1529, + "startColumn": 4, + "charOffset": 43777, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1527, + "startColumn": 4, + "charOffset": 43702, + "charLength": 4, + "snippet": { + "text": "\tif (tmpStr == \"attack\" || tmpStr == \"1\") {\n\t\treturn SPELLGROUP_ATTACK;\n\t} else if (tmpStr == \"healing\" || tmpStr == \"2\") {\n\t\treturn SPELLGROUP_HEALING;\n\t} else if (tmpStr == \"support\" || tmpStr == \"3\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1cea4af08b6fc1e64c2b25bc3a66da600569a7cbc70f6e94fc438063a8242c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1554, + "startColumn": 2, + "charOffset": 44497, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 1552, + "startColumn": 2, + "charOffset": 44424, + "charLength": 7, + "snippet": { + "text": "void capitalizeWords(std::string &source) {\n\ttoLowerCaseString(source);\n\tuint8_t size = (uint8_t)source.size();\n\tfor (uint8_t i = 0; i < size; i++) {\n\t\tif (i == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09bc12a9d31abb43f247b03d894fe25aaaacce75cd82bf3e9463855d2015cef2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1554, + "startColumn": 17, + "charOffset": 44512, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1552, + "startColumn": 17, + "charOffset": 44424, + "charLength": 1, + "snippet": { + "text": "void capitalizeWords(std::string &source) {\n\ttoLowerCaseString(source);\n\tuint8_t size = (uint8_t)source.size();\n\tfor (uint8_t i = 0; i < size; i++) {\n\t\tif (i == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d36bdac11b88fc9cb717657fc2e6eef5d885105cab4e2ca940539ffc1c25dcff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1555, + "startColumn": 2, + "charOffset": 44537, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1553, + "startColumn": 2, + "charOffset": 44468, + "charLength": 3, + "snippet": { + "text": "\ttoLowerCaseString(source);\n\tuint8_t size = (uint8_t)source.size();\n\tfor (uint8_t i = 0; i < size; i++) {\n\t\tif (i == 0) {\n\t\t\tsource[i] = (char)toupper(source[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9099d1990eb78c4a4209a2b798efda6fc2b4c17bd99f843de470369cc3ab8fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'size' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1555, + "startColumn": 22, + "charOffset": 44557, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1553, + "startColumn": 22, + "charOffset": 44468, + "charLength": 1, + "snippet": { + "text": "\ttoLowerCaseString(source);\n\tuint8_t size = (uint8_t)source.size();\n\tfor (uint8_t i = 0; i < size; i++) {\n\t\tif (i == 0) {\n\t\t\tsource[i] = (char)toupper(source[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d17f1239dff99a001591b4fcb4ba2ed7ea1d05152509ecd38a972e42b4177a46" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1556, + "startColumn": 3, + "charOffset": 44576, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1554, + "startColumn": 3, + "charOffset": 44496, + "charLength": 2, + "snippet": { + "text": "\tuint8_t size = (uint8_t)source.size();\n\tfor (uint8_t i = 0; i < size; i++) {\n\t\tif (i == 0) {\n\t\t\tsource[i] = (char)toupper(source[i]);\n\t\t} else if (source[i - 1] == ' ' || source[i - 1] == '\\'') {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1d13d296aea7b1c7cfc70966da3621f9b0115637a9fd00b9c6b3531c95ea64d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1556, + "startColumn": 15, + "charOffset": 44588, + "charLength": 1, + "snippet": { + "text": "{" + } + }, + "contextRegion": { + "startLine": 1554, + "startColumn": 15, + "charOffset": 44496, + "charLength": 1, + "snippet": { + "text": "\tuint8_t size = (uint8_t)source.size();\n\tfor (uint8_t i = 0; i < size; i++) {\n\t\tif (i == 0) {\n\t\t\tsource[i] = (char)toupper(source[i]);\n\t\t} else if (source[i - 1] == ' ' || source[i - 1] == '\\'') {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d999de665a7ce62c62f0f116946f21881749da0ba2bdeb5c8b47b75c70a28333" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1557, + "startColumn": 16, + "charOffset": 44605, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1555, + "startColumn": 16, + "charOffset": 44536, + "charLength": 1, + "snippet": { + "text": "\tfor (uint8_t i = 0; i < size; i++) {\n\t\tif (i == 0) {\n\t\t\tsource[i] = (char)toupper(source[i]);\n\t\t} else if (source[i - 1] == ' ' || source[i - 1] == '\\'') {\n\t\t\tsource[i] = (char)toupper(source[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f526c5ec03466294f0af1f56fc04f8589626188cfc53249045b4b6e40d388c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1559, + "startColumn": 16, + "charOffset": 44708, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1557, + "startColumn": 16, + "charOffset": 44590, + "charLength": 1, + "snippet": { + "text": "\t\t\tsource[i] = (char)toupper(source[i]);\n\t\t} else if (source[i - 1] == ' ' || source[i - 1] == '\\'') {\n\t\t\tsource[i] = (char)toupper(source[i]);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f1594fa05ba7bdb3b1a3ef71dba6c7fd3564582db69db59b5bb3dd46ff418c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'stringToIgnore' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1564, + "startColumn": 75, + "charOffset": 44818, + "charLength": 14, + "snippet": { + "text": "stringToIgnore" + } + }, + "contextRegion": { + "startLine": 1562, + "startColumn": 75, + "charOffset": 44741, + "charLength": 14, + "snippet": { + "text": "}\n\nvoid capitalizeWordsIgnoringString(std::string &source, const std::string stringToIgnore) {\n\ttoLowerCaseString(source);\n\tauto size = static_cast(source.size());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd19be7d0b40b73c4df90a4bdc1862aabd4b36aa9e4ca37517f7d75fde404c5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1569, + "startColumn": 2, + "charOffset": 44964, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1567, + "startColumn": 2, + "charOffset": 44914, + "charLength": 3, + "snippet": { + "text": "\tauto indexFound = source.find(stringToIgnore);\n\n\tfor (uint8_t i = 0; i < size; i++) {\n\t\tif (indexFound != std::string::npos && indexFound > 0 && std::cmp_greater(i, static_cast(indexFound - 1)) && i < (indexFound + stringToIgnore.size())) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f985c5f5ea8bf116ca710325d4dd489d123c6296e253ea147a83a9db54fe1cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'size' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1569, + "startColumn": 22, + "charOffset": 44984, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1567, + "startColumn": 22, + "charOffset": 44914, + "charLength": 1, + "snippet": { + "text": "\tauto indexFound = source.find(stringToIgnore);\n\n\tfor (uint8_t i = 0; i < size; i++) {\n\t\tif (indexFound != std::string::npos && indexFound > 0 && std::cmp_greater(i, static_cast(indexFound - 1)) && i < (indexFound + stringToIgnore.size())) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16628b905b47c55841211e92c717ef6d094d383e53e6edcc4e3206c4bf8f16f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1586, + "startColumn": 6, + "charOffset": 45565, + "charLength": 6, + "snippet": { + "text": "isatty" + } + }, + "contextRegion": { + "startLine": 1584, + "startColumn": 6, + "charOffset": 45455, + "charLength": 6, + "snippet": { + "text": "void consoleHandlerExit() {\n\tg_logger().error(\"The program will close after pressing the enter key...\");\n\tif (isatty(STDIN_FILENO)) {\n\t\tgetchar();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a58e69bd64ffcd9e12d97b22bb67d9c1e714573de29c25c718f6bcae6d7fd762" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1586, + "startColumn": 6, + "charOffset": 45565, + "charLength": 6, + "snippet": { + "text": "isatty" + } + }, + "contextRegion": { + "startLine": 1584, + "startColumn": 6, + "charOffset": 45455, + "charLength": 6, + "snippet": { + "text": "void consoleHandlerExit() {\n\tg_logger().error(\"The program will close after pressing the enter key...\");\n\tif (isatty(STDIN_FILENO)) {\n\t\tgetchar();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ecffc36d12cbb98cdc079ce8153f1ff353a9234a86ca9a283361eb343a0f6de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err33-c", + "ruleIndex": 132, + "kind": "fail", + "level": "warning", + "message": { + "text": "the value returned by this function should not be disregarded; neglecting it may lead to errors" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1587, + "startColumn": 3, + "charOffset": 45591, + "charLength": 7, + "snippet": { + "text": "getchar" + } + }, + "contextRegion": { + "startLine": 1585, + "startColumn": 3, + "charOffset": 45483, + "charLength": 7, + "snippet": { + "text": "\tg_logger().error(\"The program will close after pressing the enter key...\");\n\tif (isatty(STDIN_FILENO)) {\n\t\tgetchar();\n\t}\n\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21e46c1b37ff24032df4cebf28fac9f20ba299d90fa2a8a91345492de79f2133" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1587, + "startColumn": 3, + "charOffset": 45591, + "charLength": 7, + "snippet": { + "text": "getchar" + } + }, + "contextRegion": { + "startLine": 1585, + "startColumn": 3, + "charOffset": 45483, + "charLength": 7, + "snippet": { + "text": "\tg_logger().error(\"The program will close after pressing the enter key...\");\n\tif (isatty(STDIN_FILENO)) {\n\t\tgetchar();\n\t}\n\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f0c64acfffbf1b9280f440f8d3339af5a36a0b1be17c2d18251224e9233e69d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-redundant-control-flow", + "ruleIndex": 717, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant return statement at the end of a function with a void return type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1589, + "startColumn": 2, + "charOffset": 45606, + "charLength": 6, + "snippet": { + "text": "return" + } + }, + "contextRegion": { + "startLine": 1587, + "startColumn": 2, + "charOffset": 45589, + "charLength": 6, + "snippet": { + "text": "\t\tgetchar();\n\t}\n\treturn;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd3702cf3042f0dd951c85bb4e6c1c74691b1e3d2c704e955be7ff342b72f8c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1600, + "startColumn": 2, + "charOffset": 46074, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1598, + "startColumn": 2, + "charOffset": 45985, + "charLength": 3, + "snippet": { + "text": "\tstd::istream_iterator begin(ss);\n\tstd::istream_iterator end;\n\tstd::copy(begin, end, std::back_inserter(toks));\n\n\tif (name.length() < 3 || name.length() > 18) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82edc139e4120e0d87bf67cd6cdd2d08f3882bcb9510cd831d3f38cada8a812f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "18 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1602, + "startColumn": 43, + "charOffset": 46166, + "charLength": 2, + "snippet": { + "text": "18" + } + }, + "contextRegion": { + "startLine": 1600, + "startColumn": 43, + "charOffset": 46073, + "charLength": 2, + "snippet": { + "text": "\tstd::copy(begin, end, std::back_inserter(toks));\n\n\tif (name.length() < 3 || name.length() > 18) {\n\t\treturn INVALID_LENGTH;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "341d2f8018fbb65aaf3ff08b14e73089be318137c350717a309a910cc92bb6be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1610, + "startColumn": 2, + "charOffset": 46308, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1608, + "startColumn": 2, + "charOffset": 46303, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (std::string str : toks) {\n\t\tif (str.length() < 2) {\n\t\t\treturn INVALID_TOKEN_LENGTH;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "883fd0498e2c80e2d9113ab03ab530a3e109ba53d95aa4086147ba90f70c78da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1610, + "startColumn": 19, + "charOffset": 46325, + "charLength": 3, + "snippet": { + "text": "str" + } + }, + "contextRegion": { + "startLine": 1608, + "startColumn": 19, + "charOffset": 46303, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (std::string str : toks) {\n\t\tif (str.length() < 2) {\n\t\t\treturn INVALID_TOKEN_LENGTH;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8a7800c4b6638dd145d9a44b7cd398b84ffc616afea632de7b1b1913e12ea03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1611, + "startColumn": 3, + "charOffset": 46341, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1609, + "startColumn": 3, + "charOffset": 46306, + "charLength": 2, + "snippet": { + "text": "\n\tfor (std::string str : toks) {\n\t\tif (str.length() < 2) {\n\t\t\treturn INVALID_TOKEN_LENGTH;\n\t\t} else if (std::find(prohibitedWords.begin(), prohibitedWords.end(), str) != prohibitedWords.end()) { // searching for prohibited words" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33ebd3a9b29af8e05ea50a029968b29a48c81a7065de67b0c12a11b38e54ff7b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1613, + "startColumn": 5, + "charOffset": 46401, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1611, + "startColumn": 5, + "charOffset": 46339, + "charLength": 4, + "snippet": { + "text": "\t\tif (str.length() < 2) {\n\t\t\treturn INVALID_TOKEN_LENGTH;\n\t\t} else if (std::find(prohibitedWords.begin(), prohibitedWords.end(), str) != prohibitedWords.end()) { // searching for prohibited words\n\t\t\treturn INVALID_FORBIDDEN;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc41eadb1a3fb680e6d9f272f9a44a14d0c82e90e6bcf1eb6846a2f4c50ab03f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1627, + "startColumn": 3, + "charOffset": 46932, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1625, + "startColumn": 3, + "charOffset": 46846, + "charLength": 4, + "snippet": { + "text": "std::string getObjectCategoryName(ObjectCategory_t category) {\n\tswitch (category) {\n\t\tcase OBJECTCATEGORY_ARMORS:\n\t\t\treturn \"Armors\";\n\t\tcase OBJECTCATEGORY_NECKLACES:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63036ed773914a32af65c08dbbde5ae19ab6924f3f29d87ee7d08514f86e8085" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1629, + "startColumn": 3, + "charOffset": 46982, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1627, + "startColumn": 3, + "charOffset": 46930, + "charLength": 4, + "snippet": { + "text": "\t\tcase OBJECTCATEGORY_ARMORS:\n\t\t\treturn \"Armors\";\n\t\tcase OBJECTCATEGORY_NECKLACES:\n\t\t\treturn \"Amulets\";\n\t\tcase OBJECTCATEGORY_BOOTS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f09c50ccdb538c06229b492ddbef2c4be374e622984535051c9cbadefe9b442" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1631, + "startColumn": 3, + "charOffset": 47036, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1629, + "startColumn": 3, + "charOffset": 46980, + "charLength": 4, + "snippet": { + "text": "\t\tcase OBJECTCATEGORY_NECKLACES:\n\t\t\treturn \"Amulets\";\n\t\tcase OBJECTCATEGORY_BOOTS:\n\t\t\treturn \"Boots\";\n\t\tcase OBJECTCATEGORY_CONTAINERS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16adbbdc5e980de0e5ba1d69704428349b0dc6a9fb80afab45f85f7c0d9015a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1633, + "startColumn": 3, + "charOffset": 47084, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1631, + "startColumn": 3, + "charOffset": 47034, + "charLength": 4, + "snippet": { + "text": "\t\tcase OBJECTCATEGORY_BOOTS:\n\t\t\treturn \"Boots\";\n\t\tcase OBJECTCATEGORY_CONTAINERS:\n\t\t\treturn \"Containers\";\n\t\tcase OBJECTCATEGORY_DECORATION:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8947f1be102e3a7e1a8f67496aba6ae84ccf8d092f6c5d6158435021bc9269a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1635, + "startColumn": 3, + "charOffset": 47142, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1633, + "startColumn": 3, + "charOffset": 47082, + "charLength": 4, + "snippet": { + "text": "\t\tcase OBJECTCATEGORY_CONTAINERS:\n\t\t\treturn \"Containers\";\n\t\tcase OBJECTCATEGORY_DECORATION:\n\t\t\treturn \"Decoration\";\n\t\tcase OBJECTCATEGORY_FOOD:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d5030d2b1af3cca1359fa6322ef8a4f027ac1f51a6ca78ae4f46a42a6289698" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1637, + "startColumn": 3, + "charOffset": 47200, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1635, + "startColumn": 3, + "charOffset": 47140, + "charLength": 4, + "snippet": { + "text": "\t\tcase OBJECTCATEGORY_DECORATION:\n\t\t\treturn \"Decoration\";\n\t\tcase OBJECTCATEGORY_FOOD:\n\t\t\treturn \"Food\";\n\t\tcase OBJECTCATEGORY_HELMETS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04d11bcf6c7670e6e5ca11e75b5db9a5637d7476e028034bcac9ac231f6941c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1639, + "startColumn": 3, + "charOffset": 47246, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1637, + "startColumn": 3, + "charOffset": 47198, + "charLength": 4, + "snippet": { + "text": "\t\tcase OBJECTCATEGORY_FOOD:\n\t\t\treturn \"Food\";\n\t\tcase OBJECTCATEGORY_HELMETS:\n\t\t\treturn \"Helmets\";\n\t\tcase OBJECTCATEGORY_LEGS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22082e8f74fc2cf480659d37c2c6eb921cbe6784300fbe3641f7be6a41b00f14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1641, + "startColumn": 3, + "charOffset": 47298, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1639, + "startColumn": 3, + "charOffset": 47244, + "charLength": 4, + "snippet": { + "text": "\t\tcase OBJECTCATEGORY_HELMETS:\n\t\t\treturn \"Helmets\";\n\t\tcase OBJECTCATEGORY_LEGS:\n\t\t\treturn \"Legs\";\n\t\tcase OBJECTCATEGORY_OTHERS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb08f36ea0d8eef7d755b32f3155b3f96a25726a9f8ac8bb88b85c89327b422c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1643, + "startColumn": 3, + "charOffset": 47344, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1641, + "startColumn": 3, + "charOffset": 47296, + "charLength": 4, + "snippet": { + "text": "\t\tcase OBJECTCATEGORY_LEGS:\n\t\t\treturn \"Legs\";\n\t\tcase OBJECTCATEGORY_OTHERS:\n\t\t\treturn \"Others\";\n\t\tcase OBJECTCATEGORY_POTIONS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dca40c5d0ab287528b3d2a3991ee43a93504363e3e8b7b25ebaa9a12a8acdc84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1645, + "startColumn": 3, + "charOffset": 47394, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1643, + "startColumn": 3, + "charOffset": 47342, + "charLength": 4, + "snippet": { + "text": "\t\tcase OBJECTCATEGORY_OTHERS:\n\t\t\treturn \"Others\";\n\t\tcase OBJECTCATEGORY_POTIONS:\n\t\t\treturn \"Potions\";\n\t\tcase OBJECTCATEGORY_RINGS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85514d3ee139be4f10579ac719ba9421cd80ef82b73b88e4a1bba4fd62012b29" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1647, + "startColumn": 3, + "charOffset": 47446, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1645, + "startColumn": 3, + "charOffset": 47392, + "charLength": 4, + "snippet": { + "text": "\t\tcase OBJECTCATEGORY_POTIONS:\n\t\t\treturn \"Potions\";\n\t\tcase OBJECTCATEGORY_RINGS:\n\t\t\treturn \"Rings\";\n\t\tcase OBJECTCATEGORY_RUNES:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "969b049c0681dba2e60d0f0521c971b4802654756443faafb494d4e2f5f2afd2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1649, + "startColumn": 3, + "charOffset": 47494, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1647, + "startColumn": 3, + "charOffset": 47444, + "charLength": 4, + "snippet": { + "text": "\t\tcase OBJECTCATEGORY_RINGS:\n\t\t\treturn \"Rings\";\n\t\tcase OBJECTCATEGORY_RUNES:\n\t\t\treturn \"Runes\";\n\t\tcase OBJECTCATEGORY_SHIELDS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f09c50ccdb538c06229b492ddbef2c4be374e622984535051c9cbadefe9b442" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1651, + "startColumn": 3, + "charOffset": 47542, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1649, + "startColumn": 3, + "charOffset": 47492, + "charLength": 4, + "snippet": { + "text": "\t\tcase OBJECTCATEGORY_RUNES:\n\t\t\treturn \"Runes\";\n\t\tcase OBJECTCATEGORY_SHIELDS:\n\t\t\treturn \"Shields\";\n\t\tcase OBJECTCATEGORY_TOOLS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac850d8d35b141b2f6ca8ebfb04cecb4bee208ff3c09e1b12f8a418fb3c5e4f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1653, + "startColumn": 3, + "charOffset": 47594, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1651, + "startColumn": 3, + "charOffset": 47540, + "charLength": 4, + "snippet": { + "text": "\t\tcase OBJECTCATEGORY_SHIELDS:\n\t\t\treturn \"Shields\";\n\t\tcase OBJECTCATEGORY_TOOLS:\n\t\t\treturn \"Tools\";\n\t\tcase OBJECTCATEGORY_VALUABLES:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14e64daeadac075f316ec42d7df2ef2146d5c1fe33dd1eaa1a5cd4b4f52b2392" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1655, + "startColumn": 3, + "charOffset": 47642, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1653, + "startColumn": 3, + "charOffset": 47592, + "charLength": 4, + "snippet": { + "text": "\t\tcase OBJECTCATEGORY_TOOLS:\n\t\t\treturn \"Tools\";\n\t\tcase OBJECTCATEGORY_VALUABLES:\n\t\t\treturn \"Valuables\";\n\t\tcase OBJECTCATEGORY_AMMO:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64b6238e2c6a6b3f22700527350a862865589e3cd653024ecb9856d516419980" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1657, + "startColumn": 3, + "charOffset": 47698, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1655, + "startColumn": 3, + "charOffset": 47640, + "charLength": 4, + "snippet": { + "text": "\t\tcase OBJECTCATEGORY_VALUABLES:\n\t\t\treturn \"Valuables\";\n\t\tcase OBJECTCATEGORY_AMMO:\n\t\t\treturn \"Weapons: Ammunition\";\n\t\tcase OBJECTCATEGORY_AXES:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5427bc798c6dbc7f64d9e6ba72b735a3c90502ac06ab64cdf7f4bbe1b295f13f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1659, + "startColumn": 3, + "charOffset": 47759, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1657, + "startColumn": 3, + "charOffset": 47696, + "charLength": 4, + "snippet": { + "text": "\t\tcase OBJECTCATEGORY_AMMO:\n\t\t\treturn \"Weapons: Ammunition\";\n\t\tcase OBJECTCATEGORY_AXES:\n\t\t\treturn \"Weapons: Axes\";\n\t\tcase OBJECTCATEGORY_CLUBS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bf20a87a888a683899a35df6f1b25cba804fa76af2afa30018f00a49999faf6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1661, + "startColumn": 3, + "charOffset": 47814, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1659, + "startColumn": 3, + "charOffset": 47757, + "charLength": 4, + "snippet": { + "text": "\t\tcase OBJECTCATEGORY_AXES:\n\t\t\treturn \"Weapons: Axes\";\n\t\tcase OBJECTCATEGORY_CLUBS:\n\t\t\treturn \"Weapons: Clubs\";\n\t\tcase OBJECTCATEGORY_DISTANCEWEAPONS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e4688d80d21b19c2d99b74358eb9ffe8a0a45900a09bde25e7e4cca9b4ad36f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1663, + "startColumn": 3, + "charOffset": 47871, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1661, + "startColumn": 3, + "charOffset": 47812, + "charLength": 4, + "snippet": { + "text": "\t\tcase OBJECTCATEGORY_CLUBS:\n\t\t\treturn \"Weapons: Clubs\";\n\t\tcase OBJECTCATEGORY_DISTANCEWEAPONS:\n\t\t\treturn \"Weapons: Distance\";\n\t\tcase OBJECTCATEGORY_SWORDS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd53382f671484f8518c58de86f63a1c677c20c5d4922db0bdc9ef9d57501174" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1665, + "startColumn": 3, + "charOffset": 47941, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1663, + "startColumn": 3, + "charOffset": 47869, + "charLength": 4, + "snippet": { + "text": "\t\tcase OBJECTCATEGORY_DISTANCEWEAPONS:\n\t\t\treturn \"Weapons: Distance\";\n\t\tcase OBJECTCATEGORY_SWORDS:\n\t\t\treturn \"Weapons: Swords\";\n\t\tcase OBJECTCATEGORY_WANDS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f95684878f0547e101062224680fbc9c131a8788db7e1e039db6f384e308ad9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1667, + "startColumn": 3, + "charOffset": 48000, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1665, + "startColumn": 3, + "charOffset": 47939, + "charLength": 4, + "snippet": { + "text": "\t\tcase OBJECTCATEGORY_SWORDS:\n\t\t\treturn \"Weapons: Swords\";\n\t\tcase OBJECTCATEGORY_WANDS:\n\t\t\treturn \"Weapons: Wands\";\n\t\tcase OBJECTCATEGORY_PREMIUMSCROLLS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24b128cf7d0a931ef072f7a0b8346bd462a6e8d3530c2242185f5d686bcce1f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1669, + "startColumn": 3, + "charOffset": 48057, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1667, + "startColumn": 3, + "charOffset": 47998, + "charLength": 4, + "snippet": { + "text": "\t\tcase OBJECTCATEGORY_WANDS:\n\t\t\treturn \"Weapons: Wands\";\n\t\tcase OBJECTCATEGORY_PREMIUMSCROLLS:\n\t\t\treturn \"Premium Scrolls\";\n\t\tcase OBJECTCATEGORY_TIBIACOINS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0498ecd6a0fb2948f4b14b8ff76375a58117c296aa033caf6ca581c7b5a5277" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1671, + "startColumn": 3, + "charOffset": 48124, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1669, + "startColumn": 3, + "charOffset": 48055, + "charLength": 4, + "snippet": { + "text": "\t\tcase OBJECTCATEGORY_PREMIUMSCROLLS:\n\t\t\treturn \"Premium Scrolls\";\n\t\tcase OBJECTCATEGORY_TIBIACOINS:\n\t\t\treturn \"Tibia Coins\";\n\t\tcase OBJECTCATEGORY_CREATUREPRODUCTS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "169f2b780b402d970d8099458520b664411df0a6e602ee26b7a440607f80df7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1673, + "startColumn": 3, + "charOffset": 48183, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1671, + "startColumn": 3, + "charOffset": 48122, + "charLength": 4, + "snippet": { + "text": "\t\tcase OBJECTCATEGORY_TIBIACOINS:\n\t\t\treturn \"Tibia Coins\";\n\t\tcase OBJECTCATEGORY_CREATUREPRODUCTS:\n\t\t\treturn \"Creature Products\";\n\t\tcase OBJECTCATEGORY_GOLD:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93c3431c11950ebb8660ad3174ca452ff1d27704aa151dc96068ed4b92767aca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1675, + "startColumn": 3, + "charOffset": 48254, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1673, + "startColumn": 3, + "charOffset": 48181, + "charLength": 4, + "snippet": { + "text": "\t\tcase OBJECTCATEGORY_CREATUREPRODUCTS:\n\t\t\treturn \"Creature Products\";\n\t\tcase OBJECTCATEGORY_GOLD:\n\t\t\treturn \"Gold\";\n\t\tcase OBJECTCATEGORY_DEFAULT:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2bf6e86fe912efe647bf04c7ffbba45d69909d023c86f297a21d126ec874b089" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1677, + "startColumn": 3, + "charOffset": 48300, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1675, + "startColumn": 3, + "charOffset": 48252, + "charLength": 4, + "snippet": { + "text": "\t\tcase OBJECTCATEGORY_GOLD:\n\t\t\treturn \"Gold\";\n\t\tcase OBJECTCATEGORY_DEFAULT:\n\t\t\treturn \"Unassigned Loot\";\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afbc80a5fc394328ff3aed816c601755c1b27b6a763be0de17e9ba11174d9297" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1679, + "startColumn": 3, + "charOffset": 48360, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 1677, + "startColumn": 3, + "charOffset": 48298, + "charLength": 7, + "snippet": { + "text": "\t\tcase OBJECTCATEGORY_DEFAULT:\n\t\t\treturn \"Unassigned Loot\";\n\t\tdefault:\n\t\t\treturn std::string();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f80cb5c402813e740425de6743d0fcb8d945d099e6b7bcca8c3feb4782b3b1f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-return-braced-init-list", + "ruleIndex": 630, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1680, + "startColumn": 11, + "charOffset": 48379, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1678, + "startColumn": 11, + "charOffset": 48329, + "charLength": 3, + "snippet": { + "text": "\t\t\treturn \"Unassigned Loot\";\n\t\tdefault:\n\t\t\treturn std::string();\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f647c992b28dd25257338e3ae3eb765d80231ca8cb66230d2b1a12387c0818a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1719, + "startColumn": 2, + "charOffset": 49305, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1717, + "startColumn": 2, + "charOffset": 49258, + "charLength": 2, + "snippet": { + "text": "uint8_t forgeBonus(int32_t number) {\n\t// None\n\tif (number < 7400) {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8bac472aedf7819a162f99336cf9ffad9f0979e15ecf8c0f124e62763d67f577" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1719, + "startColumn": 15, + "charOffset": 49318, + "charLength": 4, + "snippet": { + "text": "7400" + } + }, + "contextRegion": { + "startLine": 1717, + "startColumn": 15, + "charOffset": 49258, + "charLength": 4, + "snippet": { + "text": "uint8_t forgeBonus(int32_t number) {\n\t// None\n\tif (number < 7400) {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc21bdfc36fe70a5704b8bca412ec6656ff44100ebb76952f082f7d1f12afdc6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1723, + "startColumn": 2, + "charOffset": 49364, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1721, + "startColumn": 2, + "charOffset": 49338, + "charLength": 4, + "snippet": { + "text": "\t}\n\t// Dust not consumed\n\telse if (number >= 7400 && number < 9000) {\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "809c0897be126bb8b809d041e8126912f3e1ae3d5c94fb948eff5b9ac110c40e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1723, + "startColumn": 21, + "charOffset": 49383, + "charLength": 4, + "snippet": { + "text": "7400" + } + }, + "contextRegion": { + "startLine": 1721, + "startColumn": 21, + "charOffset": 49338, + "charLength": 4, + "snippet": { + "text": "\t}\n\t// Dust not consumed\n\telse if (number >= 7400 && number < 9000) {\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8df167cd30bff4da0473713f3b43d19a12ed658f4d22e354526196370a104511" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1723, + "startColumn": 38, + "charOffset": 49400, + "charLength": 4, + "snippet": { + "text": "9000" + } + }, + "contextRegion": { + "startLine": 1721, + "startColumn": 38, + "charOffset": 49338, + "charLength": 4, + "snippet": { + "text": "\t}\n\t// Dust not consumed\n\telse if (number >= 7400 && number < 9000) {\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee82a17f789c77c75a37fb8615c55a167decde4b09c5afa6f54f8e5a67b1aa1c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1727, + "startColumn": 21, + "charOffset": 49466, + "charLength": 4, + "snippet": { + "text": "9000" + } + }, + "contextRegion": { + "startLine": 1725, + "startColumn": 21, + "charOffset": 49420, + "charLength": 4, + "snippet": { + "text": "\t}\n\t// Cores not consumed\n\telse if (number >= 9000 && number < 9500) {\n\t\treturn 2;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43396f7d82f35485813cad312068a56cb74e3840b604435f3524ab5072363e7d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9500 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1727, + "startColumn": 38, + "charOffset": 49483, + "charLength": 4, + "snippet": { + "text": "9500" + } + }, + "contextRegion": { + "startLine": 1725, + "startColumn": 38, + "charOffset": 49420, + "charLength": 4, + "snippet": { + "text": "\t}\n\t// Cores not consumed\n\telse if (number >= 9000 && number < 9500) {\n\t\treturn 2;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "347d56f16c158153a2887d4954620e8c2c3c76e595118647d85c76a49b41f54f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9500 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1731, + "startColumn": 21, + "charOffset": 49548, + "charLength": 4, + "snippet": { + "text": "9500" + } + }, + "contextRegion": { + "startLine": 1729, + "startColumn": 21, + "charOffset": 49503, + "charLength": 4, + "snippet": { + "text": "\t}\n\t// Gold not consumed\n\telse if (number >= 9500 && number < 9525) {\n\t\treturn 3;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b9e1fb8599bf19ef1895f4424cc21f98a2aaaec11054e4badb98c4245f1a1e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9525 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1731, + "startColumn": 38, + "charOffset": 49565, + "charLength": 4, + "snippet": { + "text": "9525" + } + }, + "contextRegion": { + "startLine": 1729, + "startColumn": 38, + "charOffset": 49503, + "charLength": 4, + "snippet": { + "text": "\t}\n\t// Gold not consumed\n\telse if (number >= 9500 && number < 9525) {\n\t\treturn 3;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "523bd8ccd5d40029751bc83efd9bd746096a7fd0cac961b47e7d01f7b1aa88f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9525 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1735, + "startColumn": 21, + "charOffset": 49653, + "charLength": 4, + "snippet": { + "text": "9525" + } + }, + "contextRegion": { + "startLine": 1733, + "startColumn": 21, + "charOffset": 49585, + "charLength": 4, + "snippet": { + "text": "\t}\n\t// Second item retained with decreased tier\n\telse if (number >= 9525 && number < 9550) {\n\t\treturn 4;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed1c33913d34828ea55c001739cebeabaae25958f5c56e3b7a9e3b4cead7d054" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9550 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1735, + "startColumn": 38, + "charOffset": 49670, + "charLength": 4, + "snippet": { + "text": "9550" + } + }, + "contextRegion": { + "startLine": 1733, + "startColumn": 38, + "charOffset": 49585, + "charLength": 4, + "snippet": { + "text": "\t}\n\t// Second item retained with decreased tier\n\telse if (number >= 9525 && number < 9550) {\n\t\treturn 4;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f76b6489442ab02aa18fd1669d271c149fe113e16882358280d857cc8aed8742" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9550 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1739, + "startColumn": 21, + "charOffset": 49758, + "charLength": 4, + "snippet": { + "text": "9550" + } + }, + "contextRegion": { + "startLine": 1737, + "startColumn": 21, + "charOffset": 49690, + "charLength": 4, + "snippet": { + "text": "\t}\n\t// Second item retained with unchanged tier\n\telse if (number >= 9550 && number < 9950) {\n\t\treturn 5;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee2c866d36b3f38ba9cf63b666d276364a8aa82de77e026547c0e60ea8ac6348" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9950 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1739, + "startColumn": 38, + "charOffset": 49775, + "charLength": 4, + "snippet": { + "text": "9950" + } + }, + "contextRegion": { + "startLine": 1737, + "startColumn": 38, + "charOffset": 49690, + "charLength": 4, + "snippet": { + "text": "\t}\n\t// Second item retained with unchanged tier\n\telse if (number >= 9550 && number < 9950) {\n\t\treturn 5;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d559b75be781cc4012c1a924d1a85d7ab75368911f99f56d14bf6a8c1b2b398" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1740, + "startColumn": 10, + "charOffset": 49792, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 1738, + "startColumn": 10, + "charOffset": 49693, + "charLength": 1, + "snippet": { + "text": "\t// Second item retained with unchanged tier\n\telse if (number >= 9550 && number < 9950) {\n\t\treturn 5;\n\t}\n\t// Second item retained with increased tier" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92d43f6eb627ed7b8db7db53a000bb1977e9508fb0dac0c399f2eba74fcd6f8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9950 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1743, + "startColumn": 21, + "charOffset": 49863, + "charLength": 4, + "snippet": { + "text": "9950" + } + }, + "contextRegion": { + "startLine": 1741, + "startColumn": 21, + "charOffset": 49795, + "charLength": 4, + "snippet": { + "text": "\t}\n\t// Second item retained with increased tier\n\telse if (number >= 9950 && number < 9975) {\n\t\treturn 6;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96c65172775fd3839eaf3c360bd522bf72dd8df1f0bdf74c758410303697e92d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9975 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1743, + "startColumn": 38, + "charOffset": 49880, + "charLength": 4, + "snippet": { + "text": "9975" + } + }, + "contextRegion": { + "startLine": 1741, + "startColumn": 38, + "charOffset": 49795, + "charLength": 4, + "snippet": { + "text": "\t}\n\t// Second item retained with increased tier\n\telse if (number >= 9950 && number < 9975) {\n\t\treturn 6;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6642603f4914d8c31ab8cf9271d3b5438fb163b5399f6c39553ce1969dff86e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1744, + "startColumn": 10, + "charOffset": 49897, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 1742, + "startColumn": 10, + "charOffset": 49798, + "charLength": 1, + "snippet": { + "text": "\t// Second item retained with increased tier\n\telse if (number >= 9950 && number < 9975) {\n\t\treturn 6;\n\t}\n\t// Gain two tiers" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7dbcde0af8bbf5cafd0aa82f3cfe7ad0b6cd1c0776ea5e044af44c297c028cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9975 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1747, + "startColumn": 21, + "charOffset": 49942, + "charLength": 4, + "snippet": { + "text": "9975" + } + }, + "contextRegion": { + "startLine": 1745, + "startColumn": 21, + "charOffset": 49900, + "charLength": 4, + "snippet": { + "text": "\t}\n\t// Gain two tiers\n\telse if (number >= 9975) {\n\t\treturn 7;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfa09085e4f3875293b21f440c26dd03569d7bfd2ef2c6b81e930e82ebd882a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1748, + "startColumn": 10, + "charOffset": 49959, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 1746, + "startColumn": 10, + "charOffset": 49903, + "charLength": 1, + "snippet": { + "text": "\t// Gain two tiers\n\telse if (number >= 9975) {\n\t\treturn 7;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "234ddbdee8ac4b44fe381e4f1026eeb17add7b38b015d7dcbbd73867d7de601f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1767, + "startColumn": 3, + "charOffset": 50476, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1765, + "startColumn": 3, + "charOffset": 50349, + "charLength": 4, + "snippet": { + "text": "std::string getPlayerSubjectPronoun(PlayerPronoun_t pronoun, PlayerSex_t sex, const std::string &name) {\n\tswitch (pronoun) {\n\t\tcase PLAYERPRONOUN_THEY:\n\t\t\treturn \"they\";\n\t\tcase PLAYERPRONOUN_SHE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7e897c51a2ec1b578108766d6b8319f6bb0d242012f16697532ba05efda0bf8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1769, + "startColumn": 3, + "charOffset": 50521, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1767, + "startColumn": 3, + "charOffset": 50474, + "charLength": 4, + "snippet": { + "text": "\t\tcase PLAYERPRONOUN_THEY:\n\t\t\treturn \"they\";\n\t\tcase PLAYERPRONOUN_SHE:\n\t\t\treturn \"she\";\n\t\tcase PLAYERPRONOUN_HE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ca9234b94258810ce7edaf73d592672f5205a8ec7f9cd9324f7a727b95919d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1771, + "startColumn": 3, + "charOffset": 50564, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1769, + "startColumn": 3, + "charOffset": 50519, + "charLength": 4, + "snippet": { + "text": "\t\tcase PLAYERPRONOUN_SHE:\n\t\t\treturn \"she\";\n\t\tcase PLAYERPRONOUN_HE:\n\t\t\treturn \"he\";\n\t\tcase PLAYERPRONOUN_ZE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9d74f5352fb32295551cfb06ddb797bc21d97811b1b62b0f9063e779555846f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1773, + "startColumn": 3, + "charOffset": 50605, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1771, + "startColumn": 3, + "charOffset": 50562, + "charLength": 4, + "snippet": { + "text": "\t\tcase PLAYERPRONOUN_HE:\n\t\t\treturn \"he\";\n\t\tcase PLAYERPRONOUN_ZE:\n\t\t\treturn \"ze\";\n\t\tcase PLAYERPRONOUN_NAME:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ee1b888b04cb54a0e1c8726c14d15376b4bd6467a4711d50a7249d87e56b592" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1775, + "startColumn": 3, + "charOffset": 50646, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1773, + "startColumn": 3, + "charOffset": 50603, + "charLength": 4, + "snippet": { + "text": "\t\tcase PLAYERPRONOUN_ZE:\n\t\t\treturn \"ze\";\n\t\tcase PLAYERPRONOUN_NAME:\n\t\t\treturn name;\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47b8783850c2060d12cb60f9a2cf602421ba5ff2cfbc37e1c3c8244cbbb5b68e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1777, + "startColumn": 3, + "charOffset": 50689, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 1775, + "startColumn": 3, + "charOffset": 50644, + "charLength": 7, + "snippet": { + "text": "\t\tcase PLAYERPRONOUN_NAME:\n\t\t\treturn name;\n\t\tdefault:\n\t\t\treturn sex == PLAYERSEX_FEMALE ? \"she\" : \"he\";\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "933f94410edec8d33d63f9c58a6f854bdc519cbb5c30f86ea97a15e2922561a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1784, + "startColumn": 3, + "charOffset": 50880, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1782, + "startColumn": 3, + "charOffset": 50754, + "charLength": 4, + "snippet": { + "text": "std::string getPlayerObjectPronoun(PlayerPronoun_t pronoun, PlayerSex_t sex, const std::string &name) {\n\tswitch (pronoun) {\n\t\tcase PLAYERPRONOUN_THEY:\n\t\t\treturn \"them\";\n\t\tcase PLAYERPRONOUN_SHE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de418d3c020ada24584e92ba5721989b69a9983626d7f7e6469877a4ac868a5c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1786, + "startColumn": 3, + "charOffset": 50925, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1784, + "startColumn": 3, + "charOffset": 50878, + "charLength": 4, + "snippet": { + "text": "\t\tcase PLAYERPRONOUN_THEY:\n\t\t\treturn \"them\";\n\t\tcase PLAYERPRONOUN_SHE:\n\t\t\treturn \"her\";\n\t\tcase PLAYERPRONOUN_HE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6dda4df3ce89a04aa5ebd567074da09571379e2be16f0aad0e4b28ed81b6262" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1788, + "startColumn": 3, + "charOffset": 50968, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1786, + "startColumn": 3, + "charOffset": 50923, + "charLength": 4, + "snippet": { + "text": "\t\tcase PLAYERPRONOUN_SHE:\n\t\t\treturn \"her\";\n\t\tcase PLAYERPRONOUN_HE:\n\t\t\treturn \"him\";\n\t\tcase PLAYERPRONOUN_ZE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85676660bdde78b9111b252c1377d1294546f2edd7ed06ef75b83823b92fbfac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1790, + "startColumn": 3, + "charOffset": 51010, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1788, + "startColumn": 3, + "charOffset": 50966, + "charLength": 4, + "snippet": { + "text": "\t\tcase PLAYERPRONOUN_HE:\n\t\t\treturn \"him\";\n\t\tcase PLAYERPRONOUN_ZE:\n\t\t\treturn \"zir\";\n\t\tcase PLAYERPRONOUN_NAME:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bbca84832fa278939d1a3f0dab58a4e118bc9eecc458c31fee1020360690fab4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1792, + "startColumn": 3, + "charOffset": 51052, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1790, + "startColumn": 3, + "charOffset": 51008, + "charLength": 4, + "snippet": { + "text": "\t\tcase PLAYERPRONOUN_ZE:\n\t\t\treturn \"zir\";\n\t\tcase PLAYERPRONOUN_NAME:\n\t\t\treturn name;\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b449ab45121dc8f436a8daf6a6adb21e0aad0fe147f40fdeebaf01ac9c790c09" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1794, + "startColumn": 3, + "charOffset": 51095, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 1792, + "startColumn": 3, + "charOffset": 51050, + "charLength": 7, + "snippet": { + "text": "\t\tcase PLAYERPRONOUN_NAME:\n\t\t\treturn name;\n\t\tdefault:\n\t\t\treturn sex == PLAYERSEX_FEMALE ? \"her\" : \"him\";\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf80569193083b9f65d7f811855741c5af22d57f0e5f4da3b3b8ad5012f703fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1801, + "startColumn": 3, + "charOffset": 51291, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1799, + "startColumn": 3, + "charOffset": 51161, + "charLength": 4, + "snippet": { + "text": "std::string getPlayerPossessivePronoun(PlayerPronoun_t pronoun, PlayerSex_t sex, const std::string &name) {\n\tswitch (pronoun) {\n\t\tcase PLAYERPRONOUN_THEY:\n\t\t\treturn \"their\";\n\t\tcase PLAYERPRONOUN_SHE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49a419efb0bd912453660037766449d535ca8bc648b79dd7317a24e296636a71" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1803, + "startColumn": 3, + "charOffset": 51337, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1801, + "startColumn": 3, + "charOffset": 51289, + "charLength": 4, + "snippet": { + "text": "\t\tcase PLAYERPRONOUN_THEY:\n\t\t\treturn \"their\";\n\t\tcase PLAYERPRONOUN_SHE:\n\t\t\treturn \"her\";\n\t\tcase PLAYERPRONOUN_HE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c263093e273195dcc9c43a508c17c2902959c4244c9fe53bbdef52f6c5a798e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1805, + "startColumn": 3, + "charOffset": 51380, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1803, + "startColumn": 3, + "charOffset": 51335, + "charLength": 4, + "snippet": { + "text": "\t\tcase PLAYERPRONOUN_SHE:\n\t\t\treturn \"her\";\n\t\tcase PLAYERPRONOUN_HE:\n\t\t\treturn \"his\";\n\t\tcase PLAYERPRONOUN_ZE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ea0169e0fa37412190b7696356286b77b02a29f57238b0f1be8ec0678ea0426" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1807, + "startColumn": 3, + "charOffset": 51422, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1805, + "startColumn": 3, + "charOffset": 51378, + "charLength": 4, + "snippet": { + "text": "\t\tcase PLAYERPRONOUN_HE:\n\t\t\treturn \"his\";\n\t\tcase PLAYERPRONOUN_ZE:\n\t\t\treturn \"zir\";\n\t\tcase PLAYERPRONOUN_NAME:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37f495991e5b19f6025883b4eaf890e66fae9c22362995c1def1c4af0b502b6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1809, + "startColumn": 3, + "charOffset": 51464, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1807, + "startColumn": 3, + "charOffset": 51420, + "charLength": 4, + "snippet": { + "text": "\t\tcase PLAYERPRONOUN_ZE:\n\t\t\treturn \"zir\";\n\t\tcase PLAYERPRONOUN_NAME:\n\t\t\treturn name + \"'s\";\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad079f8ec13a478f9ed1254cdde7f42cc4df51b784c65b7d9bd9523113d5e65a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1811, + "startColumn": 3, + "charOffset": 51514, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 1809, + "startColumn": 3, + "charOffset": 51462, + "charLength": 7, + "snippet": { + "text": "\t\tcase PLAYERPRONOUN_NAME:\n\t\t\treturn name + \"'s\";\n\t\tdefault:\n\t\t\treturn sex == PLAYERSEX_FEMALE ? \"her\" : \"his\";\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8129d9dd936088fdfcecc2f6fe3ea4020c8a1c68bf468526372bb3a77f1f7b02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1818, + "startColumn": 3, + "charOffset": 51709, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1816, + "startColumn": 3, + "charOffset": 51580, + "charLength": 4, + "snippet": { + "text": "std::string getPlayerReflexivePronoun(PlayerPronoun_t pronoun, PlayerSex_t sex, const std::string &name) {\n\tswitch (pronoun) {\n\t\tcase PLAYERPRONOUN_THEY:\n\t\t\treturn \"themself\";\n\t\tcase PLAYERPRONOUN_SHE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98da6a056f07618a7eb78fa00b02bd860e6087000d24f04413d27184a31f2b60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1820, + "startColumn": 3, + "charOffset": 51758, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1818, + "startColumn": 3, + "charOffset": 51707, + "charLength": 4, + "snippet": { + "text": "\t\tcase PLAYERPRONOUN_THEY:\n\t\t\treturn \"themself\";\n\t\tcase PLAYERPRONOUN_SHE:\n\t\t\treturn \"herself\";\n\t\tcase PLAYERPRONOUN_HE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "017452dcaefdced5277476b0f4367658bf43a30cd7a85828f2ad45d2e40fbd32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1822, + "startColumn": 3, + "charOffset": 51805, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1820, + "startColumn": 3, + "charOffset": 51756, + "charLength": 4, + "snippet": { + "text": "\t\tcase PLAYERPRONOUN_SHE:\n\t\t\treturn \"herself\";\n\t\tcase PLAYERPRONOUN_HE:\n\t\t\treturn \"himself\";\n\t\tcase PLAYERPRONOUN_ZE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b139c3c8542042c6196fbd38e8a4eba3c3a16467921ed9b252744fb170a4771" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1824, + "startColumn": 3, + "charOffset": 51851, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1822, + "startColumn": 3, + "charOffset": 51803, + "charLength": 4, + "snippet": { + "text": "\t\tcase PLAYERPRONOUN_HE:\n\t\t\treturn \"himself\";\n\t\tcase PLAYERPRONOUN_ZE:\n\t\t\treturn \"zirself\";\n\t\tcase PLAYERPRONOUN_NAME:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2074029184820a3ed13eb92e2a55d8421f60b296ba50074e3deea49ccf970374" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1826, + "startColumn": 3, + "charOffset": 51897, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1824, + "startColumn": 3, + "charOffset": 51849, + "charLength": 4, + "snippet": { + "text": "\t\tcase PLAYERPRONOUN_ZE:\n\t\t\treturn \"zirself\";\n\t\tcase PLAYERPRONOUN_NAME:\n\t\t\treturn name;\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0498ecd6a0fb2948f4b14b8ff76375a58117c296aa033caf6ca581c7b5a5277" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1828, + "startColumn": 3, + "charOffset": 51940, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 1826, + "startColumn": 3, + "charOffset": 51895, + "charLength": 7, + "snippet": { + "text": "\t\tcase PLAYERPRONOUN_NAME:\n\t\t\treturn name;\n\t\tdefault:\n\t\t\treturn sex == PLAYERSEX_FEMALE ? \"herself\" : \"himself\";\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb9a951284635b66802889c63f193fc34acb60d6432d21523a565389a96f3d52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-c-arrays", + "ruleIndex": 480, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not declare C-style arrays, use std::array<> instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1846, + "startColumn": 9, + "charOffset": 52389, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1844, + "startColumn": 9, + "charOffset": 52314, + "charLength": 3, + "snippet": { + "text": "\n\tauto removeArticle = [](const std::string &str) -> std::string {\n\t\tconst std::string articles[] = { \"a \", \"an \" };\n\t\tfor (const auto &article : articles) {\n\t\t\tif (str.size() > article.size() && std::equal(article.begin(), article.end(), str.begin(), [](char a, char b) { return std::tolower(a) == std::tolower(b); })) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a668a481912566bd44f65ce0bf34e82625ff28b732155d861191eea96a1f76a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1847, + "startColumn": 3, + "charOffset": 52433, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1845, + "startColumn": 3, + "charOffset": 52315, + "charLength": 3, + "snippet": { + "text": "\tauto removeArticle = [](const std::string &str) -> std::string {\n\t\tconst std::string articles[] = { \"a \", \"an \" };\n\t\tfor (const auto &article : articles) {\n\t\t\tif (str.size() > article.size() && std::equal(article.begin(), article.end(), str.begin(), [](char a, char b) { return std::tolower(a) == std::tolower(b); })) {\n\t\t\t\treturn str.substr(article.size());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1446ddd38f0702de4f6928dcc136b41a118e9d6496dd52280f0ddc62bcdfe2c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'char' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1860, + "startColumn": 26, + "charOffset": 52826, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1858, + "startColumn": 26, + "charOffset": 52797, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tconst char &character = std::tolower(modifiedValue.front());\n\tauto article = character == 'a' || character == 'e' || character == 'i' || character == 'o' || character == 'u' ? \"an\" : \"a\";\n\treturn fmt::format(\"{}{} {}.\", withSpace ? \" \" : \"\", article, modifiedValue);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d28a7dc2663c5307c85bb8a539e8f2f5e82de2e95551cf1cf68a429a0cefa147" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1860, + "startColumn": 26, + "charOffset": 52826, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1858, + "startColumn": 26, + "charOffset": 52797, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tconst char &character = std::tolower(modifiedValue.front());\n\tauto article = character == 'a' || character == 'e' || character == 'i' || character == 'o' || character == 'u' ? \"an\" : \"a\";\n\treturn fmt::format(\"{}{} {}.\", withSpace ? \" \" : \"\", article, modifiedValue);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86ad5b38ed0c27fed51d4cc7aedbb36adcdb2a147b98a989320ab1af9b4178dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto article' can be declared as 'const auto *article'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1861, + "startColumn": 2, + "charOffset": 52864, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1859, + "startColumn": 2, + "charOffset": 52800, + "charLength": 4, + "snippet": { + "text": "\n\tconst char &character = std::tolower(modifiedValue.front());\n\tauto article = character == 'a' || character == 'e' || character == 'i' || character == 'o' || character == 'u' ? \"an\" : \"a\";\n\treturn fmt::format(\"{}{} {}.\", withSpace ? \" \" : \"\", article, modifiedValue);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6139064f5bd4145b6819dbab83faf714a85afb54c644a90c08ef1cfb0113f44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1869, + "startColumn": 2, + "charOffset": 53249, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 1867, + "startColumn": 2, + "charOffset": 53190, + "charLength": 5, + "snippet": { + "text": "\tstd::string token;\n\tstd::istringstream tokenStream(str);\n\twhile (std::getline(tokenStream, token, delimiter)) {\n\t\tauto trimedToken = token;\n\t\ttrimString(trimedToken);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5ba179a57371957c26a3328c7fed08b482a6917b9bd6b3b6af797c6bacb8ca6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'tokenStream' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1869, + "startColumn": 9, + "charOffset": 53256, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1867, + "startColumn": 9, + "charOffset": 53190, + "charLength": 3, + "snippet": { + "text": "\tstd::string token;\n\tstd::istringstream tokenStream(str);\n\twhile (std::getline(tokenStream, token, delimiter)) {\n\t\tauto trimedToken = token;\n\t\ttrimString(trimedToken);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "adc8efb6e4763c371743968506065520c4c19f7cf3c51d95b6ecda149c739b82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "86400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1880, + "startColumn": 57, + "charOffset": 53570, + "charLength": 5, + "snippet": { + "text": "86400" + } + }, + "contextRegion": { + "startLine": 1878, + "startColumn": 57, + "charOffset": 53468, + "charLength": 5, + "snippet": { + "text": "\ttime_t timeRemaining = time - getTimeNow();\n\n\tint days = static_cast(std::floor(timeRemaining / 86400));\n\n\tstd::stringstream output;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bea3be589ecc3e319d53a19cd70748f7c6ca358fb8011f0c140c2409c9d1e1fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "86400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1888, + "startColumn": 59, + "charOffset": 53738, + "charLength": 5, + "snippet": { + "text": "86400" + } + }, + "contextRegion": { + "startLine": 1886, + "startColumn": 59, + "charOffset": 53676, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tint hours = static_cast(std::floor((timeRemaining % 86400) / 3600));\n\tint minutes = static_cast(std::floor((timeRemaining % 3600) / 60));\n\tint seconds = static_cast(timeRemaining % 60);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f12ef4197605bf3c2fd30e0683f5a16a600fedb767f09a16152cbfc52b81b3c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "3600 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1888, + "startColumn": 68, + "charOffset": 53747, + "charLength": 4, + "snippet": { + "text": "3600" + } + }, + "contextRegion": { + "startLine": 1886, + "startColumn": 68, + "charOffset": 53676, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tint hours = static_cast(std::floor((timeRemaining % 86400) / 3600));\n\tint minutes = static_cast(std::floor((timeRemaining % 3600) / 60));\n\tint seconds = static_cast(timeRemaining % 60);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68c860011a3954da361f937be8d3668e0189e2f956b9d2518999917acd0c724d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "3600 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1889, + "startColumn": 61, + "charOffset": 53815, + "charLength": 4, + "snippet": { + "text": "3600" + } + }, + "contextRegion": { + "startLine": 1887, + "startColumn": 61, + "charOffset": 53679, + "charLength": 4, + "snippet": { + "text": "\n\tint hours = static_cast(std::floor((timeRemaining % 86400) / 3600));\n\tint minutes = static_cast(std::floor((timeRemaining % 3600) / 60));\n\tint seconds = static_cast(timeRemaining % 60);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8522ccce99698d9965047f42d6319d4b41dab438bdeddadf0840f225cede9a02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1889, + "startColumn": 69, + "charOffset": 53823, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 1887, + "startColumn": 69, + "charOffset": 53679, + "charLength": 2, + "snippet": { + "text": "\n\tint hours = static_cast(std::floor((timeRemaining % 86400) / 3600));\n\tint minutes = static_cast(std::floor((timeRemaining % 3600) / 60));\n\tint seconds = static_cast(timeRemaining % 60);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8702c860c1ae8e74335d15d7b9f394ade44b607a6740eee1bfc0a6bf2153081c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1890, + "startColumn": 49, + "charOffset": 53877, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 1888, + "startColumn": 49, + "charOffset": 53680, + "charLength": 2, + "snippet": { + "text": "\tint hours = static_cast(std::floor((timeRemaining % 86400) / 3600));\n\tint minutes = static_cast(std::floor((timeRemaining % 3600) / 60));\n\tint seconds = static_cast(timeRemaining % 60);\n\n\tif (hours == 0 && minutes == 0 && seconds > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3de21642bf559d94834829402e53221cef53df7a81a467ef54e733350d0de1e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1918, + "startColumn": 12, + "charOffset": 54556, + "charLength": 15, + "snippet": { + "text": "formattedNumber" + } + }, + "contextRegion": { + "startLine": 1916, + "startColumn": 12, + "charOffset": 54446, + "charLength": 15, + "snippet": { + "text": "std::string formatNumber(uint64_t number) {\n\tstd::string formattedNumber = std::to_string(number);\n\tint pos = formattedNumber.length() - 3;\n\twhile (pos > 0) {\n\t\tformattedNumber.insert(pos, \",\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a7011617cf5f1e7d64d1119a117bf53667e374eeb2d8ec0a6584f6a07831b2a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1918, + "startColumn": 12, + "charOffset": 54556, + "charLength": 15, + "snippet": { + "text": "formattedNumber" + } + }, + "contextRegion": { + "startLine": 1916, + "startColumn": 12, + "charOffset": 54446, + "charLength": 15, + "snippet": { + "text": "std::string formatNumber(uint64_t number) {\n\tstd::string formattedNumber = std::to_string(number);\n\tint pos = formattedNumber.length() - 3;\n\twhile (pos > 0) {\n\t\tformattedNumber.insert(pos, \",\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d64520a4151a70aef84044fcf4c6f220010243723ff0776583ff185e4ab9747" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1919, + "startColumn": 2, + "charOffset": 54587, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 1917, + "startColumn": 2, + "charOffset": 54490, + "charLength": 5, + "snippet": { + "text": "\tstd::string formattedNumber = std::to_string(number);\n\tint pos = formattedNumber.length() - 3;\n\twhile (pos > 0) {\n\t\tformattedNumber.insert(pos, \",\");\n\t\tpos -= 3;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd12d7ec7cb2a0f53c1d1dabe0ac47971a26f4ecb632a93320dd56ec8b09d53c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'pos' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1919, + "startColumn": 9, + "charOffset": 54594, + "charLength": 3, + "snippet": { + "text": "pos" + } + }, + "contextRegion": { + "startLine": 1917, + "startColumn": 9, + "charOffset": 54490, + "charLength": 3, + "snippet": { + "text": "\tstd::string formattedNumber = std::to_string(number);\n\tint pos = formattedNumber.length() - 3;\n\twhile (pos > 0) {\n\t\tformattedNumber.insert(pos, \",\");\n\t\tpos -= 3;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a62e3ad0bc6d709de7ad0cc16dc48f8c0430f4674ce8758738834238e63e39b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1920, + "startColumn": 19, + "charOffset": 54623, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 1918, + "startColumn": 19, + "charOffset": 54545, + "charLength": 6, + "snippet": { + "text": "\tint pos = formattedNumber.length() - 3;\n\twhile (pos > 0) {\n\t\tformattedNumber.insert(pos, \",\");\n\t\tpos -= 3;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7e7ff2254f5f7f47b1785dc2589b76996f31b852edf5685c8969a29e3a60aae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1938, + "startColumn": 6, + "charOffset": 55093, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 1936, + "startColumn": 6, + "charOffset": 54996, + "charLength": 5, + "snippet": { + "text": "\tstd::string key = asLowerCaseString(str);\n\tstd::replace(key.begin(), key.end(), ' ', '-');\n\tkey.erase(std::remove_if(key.begin(), key.end(), [](char c) { return std::isspace(c); }), key.end());\n\treturn key;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3cbe7f08bc732c2b7425a029c8ec8d25251e76b70644f0575906f28d3ce8b46f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1944, + "startColumn": 3, + "charOffset": 55290, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1942, + "startColumn": 3, + "charOffset": 55207, + "charLength": 4, + "snippet": { + "text": "uint8_t convertWheelGemAffinityToDomain(uint8_t affinity) {\n\tswitch (affinity) {\n\t\tcase 0:\n\t\t\treturn 1;\n\t\tcase 1:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77248fc8f2ef5edf813e8c5771df636fbe5d36078872158a92708c95d8f93cdb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1946, + "startColumn": 3, + "charOffset": 55313, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1944, + "startColumn": 3, + "charOffset": 55288, + "charLength": 4, + "snippet": { + "text": "\t\tcase 0:\n\t\t\treturn 1;\n\t\tcase 1:\n\t\t\treturn 3;\n\t\tcase 2:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "585c270551b495f8d21c85703d34cd56faab2928f50d6bea1646e1d556449250" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1948, + "startColumn": 3, + "charOffset": 55336, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1946, + "startColumn": 3, + "charOffset": 55311, + "charLength": 4, + "snippet": { + "text": "\t\tcase 1:\n\t\t\treturn 3;\n\t\tcase 2:\n\t\t\treturn 0;\n\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe2797d1bc7df7d4c79e72cb9819b279c6d95328fed3c051c87618567788df50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1950, + "startColumn": 3, + "charOffset": 55359, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1948, + "startColumn": 3, + "charOffset": 55334, + "charLength": 4, + "snippet": { + "text": "\t\tcase 2:\n\t\t\treturn 0;\n\t\tcase 3:\n\t\t\treturn 2;\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "165ae82d38d9f6e0d80893055b9d6454607816f207b0e590ac9aee3bbf938aae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.cpp" + }, + "region": { + "startLine": 1952, + "startColumn": 3, + "charOffset": 55382, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 1950, + "startColumn": 3, + "charOffset": 55357, + "charLength": 7, + "snippet": { + "text": "\t\tcase 3:\n\t\t\treturn 2;\n\t\tdefault:\n\t\t\tg_logger().error(\"Failed to get gem affinity {}\", affinity);\n\t\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "969b049c0681dba2e60d0f0521c971b4802654756443faafb494d4e2f5f2afd2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'generateToken' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/tools.hpp", + "index": 1 + }, + "region": { + "startLine": 32, + "startColumn": 13, + "charOffset": 898, + "charLength": 13, + "snippet": { + "text": "generateToken" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 13, + "charOffset": 838, + "charLength": 13, + "snippet": { + "text": "uint16_t getStashSize(StashItemList itemList);\n\nstd::string generateToken(const std::string &secret, uint32_t ticks);\n\nvoid replaceString(std::string &str, const std::string &sought, const std::string &replacement);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f71184bf3874086c1c53b505a9e74deb1dbe6be89279dc24db1c93d4195234a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/wildcardtree.cpp" + }, + "region": { + "startLine": 47, + "startColumn": 2, + "charOffset": 1394, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 45, + "startColumn": 2, + "charOffset": 1357, + "charLength": 3, + "snippet": { + "text": "\n\tsize_t length = str.length() - 1;\n\tfor (size_t pos = 0; pos < length; ++pos) {\n\t\tcur = cur->addChild(str[pos], false);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "202a5c3d700cd079fade06168b819c95cea79e71e6b0ee01f0ed11fa933b9695" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'length' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/wildcardtree.cpp" + }, + "region": { + "startLine": 47, + "startColumn": 23, + "charOffset": 1415, + "charLength": 3, + "snippet": { + "text": "pos" + } + }, + "contextRegion": { + "startLine": 45, + "startColumn": 23, + "charOffset": 1357, + "charLength": 3, + "snippet": { + "text": "\n\tsize_t length = str.length() - 1;\n\tfor (size_t pos = 0; pos < length; ++pos) {\n\t\tcur = cur->addChild(str[pos], false);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1718814465a4d9198ad67732ec922c18a92ae8a732af7fc617d8043b3654483" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/wildcardtree.cpp" + }, + "region": { + "startLine": 51, + "startColumn": 7, + "charOffset": 1488, + "charLength": 8, + "snippet": { + "text": "addChild" + } + }, + "contextRegion": { + "startLine": 49, + "startColumn": 7, + "charOffset": 1478, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tcur->addChild(str[length], true);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d6aa046ea7d9adb7b38f570682ad8d9ffdd5b24acc8bb8c07460e61febbea59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/wildcardtree.cpp" + }, + "region": { + "startLine": 60, + "startColumn": 2, + "charOffset": 1755, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 2, + "charOffset": 1709, + "charLength": 3, + "snippet": { + "text": "\tpath.push(cur);\n\tsize_t len = str.length();\n\tfor (size_t pos = 0; pos < len; ++pos) {\n\t\tcur = cur->getChild(str[pos]);\n\t\tif (!cur) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca2795db3c6ed97c24f26e8ff097ea007f99e826afba37564948338dd129d2b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'len' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/wildcardtree.cpp" + }, + "region": { + "startLine": 60, + "startColumn": 23, + "charOffset": 1776, + "charLength": 3, + "snippet": { + "text": "pos" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 23, + "charOffset": 1709, + "charLength": 3, + "snippet": { + "text": "\tpath.push(cur);\n\tsize_t len = str.length();\n\tfor (size_t pos = 0; pos < len; ++pos) {\n\t\tcur = cur->getChild(str[pos]);\n\t\tif (!cur) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f84b58128fc0bdfcaf4c0abce64390d91e35fc9aea698b0fdd0f7c2722614b7f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/wildcardtree.cpp" + }, + "region": { + "startLine": 62, + "startColumn": 7, + "charOffset": 1835, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 7, + "charOffset": 1754, + "charLength": 1, + "snippet": { + "text": "\tfor (size_t pos = 0; pos < len; ++pos) {\n\t\tcur = cur->getChild(str[pos]);\n\t\tif (!cur) {\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c509b76e23ab6211de81b8786065eab947d527cdfa5c1f7700d56b21f78a23f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/wildcardtree.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 2, + "charOffset": 1908, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 2, + "charOffset": 1880, + "charLength": 2, + "snippet": { + "text": "\tcur->breakpoint = false;\n\n\tdo {\n\t\tcur = path.top();\n\t\tpath.pop();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41de98f35531317f5cacfa5236faac5bf871b89d12909ec566c834c74aa1cf5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/wildcardtree.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 2, + "charOffset": 1908, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 2, + "charOffset": 1880, + "charLength": 2, + "snippet": { + "text": "\tcur->breakpoint = false;\n\n\tdo {\n\t\tcur = path.top();\n\t\tpath.pop();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc2c8aabe550b397e47cdb3c61b54506a21a6cc8cb8bd5457164055d0ffa5a80" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/wildcardtree.cpp" + }, + "region": { + "startLine": 82, + "startColumn": 18, + "charOffset": 2147, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 18, + "charOffset": 2051, + "charLength": 5, + "snippet": { + "text": "\t\tauto it = cur->children.find(str[--len]);\n\t\tif (it != cur->children.end()) {\n\t\t\tcur->children.erase(it);\n\t\t}\n\t} while (true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f43a4786a606f89cda21e22da3bce98236c127b8e83b114a95d9123a80fa4755" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Condition is always true" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/wildcardtree.cpp" + }, + "region": { + "startLine": 84, + "startColumn": 11, + "charOffset": 2172, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 11, + "charOffset": 2130, + "charLength": 4, + "snippet": { + "text": "\t\t\tcur->children.erase(it);\n\t\t}\n\t} while (true);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9447c43760526d93888626d43aa68c67a635687c616fb178f797989200a248a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/wildcardtree.cpp" + }, + "region": { + "startLine": 89, + "startColumn": 2, + "charOffset": 2332, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 87, + "startColumn": 2, + "charOffset": 2182, + "charLength": 3, + "snippet": { + "text": "ReturnValue WildcardTreeNode::findOne(const std::string &query, std::string &result) const {\n\tauto cur = static_self_cast();\n\tfor (char pos : query) {\n\t\tcur = cur->getChild(pos);\n\t\tif (!cur) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3d4b386303d95ebc2a35966370b4d082f5ecedfea002ba5ea4f7db778a4af3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-11", + "ruleIndex": 423, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-11: The plain char type shall only be used for the storage and use of character values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/wildcardtree.cpp" + }, + "region": { + "startLine": 89, + "startColumn": 12, + "charOffset": 2342, + "charLength": 3, + "snippet": { + "text": "pos" + } + }, + "contextRegion": { + "startLine": 87, + "startColumn": 12, + "charOffset": 2182, + "charLength": 3, + "snippet": { + "text": "ReturnValue WildcardTreeNode::findOne(const std::string &query, std::string &result) const {\n\tauto cur = static_self_cast();\n\tfor (char pos : query) {\n\t\tcur = cur->getChild(pos);\n\t\tif (!cur) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19e08c7cab2d137cefbc515138d7de7377e38108eb8e615b5d85cdab0574074a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/wildcardtree.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 7, + "charOffset": 2391, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 7, + "charOffset": 2331, + "charLength": 1, + "snippet": { + "text": "\tfor (char pos : query) {\n\t\tcur = cur->getChild(pos);\n\t\tif (!cur) {\n\t\t\treturn RETURNVALUE_PLAYERWITHTHISNAMEISNOTONLINE;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "299e588ef8ca07d679abccb8655707f0e6111cdfd1b2f81ae51145be64021fb3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/wildcardtree.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 2, + "charOffset": 2479, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 2, + "charOffset": 2460, + "charLength": 2, + "snippet": { + "text": "\tresult = query;\n\n\tdo {\n\t\tsize_t size = cur->children.size();\n\t\tif (size == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84656d81e4fcdde79052fb04add5a13a77369baff9666847fcac9d30f5b89a4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/wildcardtree.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 2, + "charOffset": 2479, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 2, + "charOffset": 2460, + "charLength": 2, + "snippet": { + "text": "\tresult = query;\n\n\tdo {\n\t\tsize_t size = cur->children.size();\n\t\tif (size == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "adcc5c0512834f35aa96878d188fc30ec8c7dbb60c80d9439a7a2712eada8966" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/wildcardtree.cpp" + }, + "region": { + "startLine": 100, + "startColumn": 3, + "charOffset": 2524, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 98, + "startColumn": 3, + "charOffset": 2478, + "charLength": 2, + "snippet": { + "text": "\tdo {\n\t\tsize_t size = cur->children.size();\n\t\tif (size == 0) {\n\t\t\treturn RETURNVALUE_NOERROR;\n\t\t} else if (size > 1 || cur->breakpoint) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0709372f054792ab5031f37054faed4fbfdd6802628dd1d2fee099994d982099" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/wildcardtree.cpp" + }, + "region": { + "startLine": 102, + "startColumn": 5, + "charOffset": 2576, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 100, + "startColumn": 5, + "charOffset": 2522, + "charLength": 4, + "snippet": { + "text": "\t\tif (size == 0) {\n\t\t\treturn RETURNVALUE_NOERROR;\n\t\t} else if (size > 1 || cur->breakpoint) {\n\t\t\treturn RETURNVALUE_NAMEISTOOAMBIGUOUS;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74f8783ced64375fd74b8a92dd5dea0e316874212c93b8e10b52dced14de4d18" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Condition is always true" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/utils/wildcardtree.cpp" + }, + "region": { + "startLine": 109, + "startColumn": 11, + "charOffset": 2751, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 107, + "startColumn": 11, + "charOffset": 2698, + "charLength": 4, + "snippet": { + "text": "\t\tresult += it->first;\n\t\tcur = it->second;\n\t} while (true);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da8188d3189e4e35ce116a33aafd34084ca39e234407d742d3369b7d411953ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp" + }, + "region": { + "startLine": 47, + "startColumn": 2, + "charOffset": 1421, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 45, + "startColumn": 2, + "charOffset": 1349, + "charLength": 3, + "snippet": { + "text": "\ttoggleForceCloseButton();\n\tg_game().setGameState(GAME_STATE_STARTUP);\n\tstd::set_new_handler(badAllocationHandler);\n\tsrand(static_cast(OTSYS_TIME()));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06fabc80aa3058d43ea902260586e14dfdf7976ad7428b27683863d7e6a1e13c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp" + }, + "region": { + "startLine": 119, + "startColumn": 9, + "charOffset": 4000, + "charLength": 6, + "snippet": { + "text": "isatty" + } + }, + "contextRegion": { + "startLine": 117, + "startColumn": 9, + "charOffset": 3915, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tlogger.error(\"The program will close after pressing the enter key...\");\n\n\t\t\t\tif (isatty(STDIN_FILENO)) {\n\t\t\t\t\tgetchar();\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f15c945a3fce887b49dfd28082e1d86b04087b01cd7dcedc32ffca290c4df04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp" + }, + "region": { + "startLine": 119, + "startColumn": 9, + "charOffset": 4000, + "charLength": 6, + "snippet": { + "text": "isatty" + } + }, + "contextRegion": { + "startLine": 117, + "startColumn": 9, + "charOffset": 3915, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tlogger.error(\"The program will close after pressing the enter key...\");\n\n\t\t\t\tif (isatty(STDIN_FILENO)) {\n\t\t\t\t\tgetchar();\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1dd2a4066be21315bbc8dcc01b2348b47e2032f7bf242fee17c8ddd0bad95d7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err33-c", + "ruleIndex": 132, + "kind": "fail", + "level": "warning", + "message": { + "text": "the value returned by this function should not be disregarded; neglecting it may lead to errors" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp" + }, + "region": { + "startLine": 120, + "startColumn": 6, + "charOffset": 4029, + "charLength": 7, + "snippet": { + "text": "getchar" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 6, + "charOffset": 3991, + "charLength": 7, + "snippet": { + "text": "\n\t\t\t\tif (isatty(STDIN_FILENO)) {\n\t\t\t\t\tgetchar();\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f618c7886eb3fc075ba0cf93e07a2ba16e0bbfbbfd3a607ee08aaf2116a58186" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp" + }, + "region": { + "startLine": 120, + "startColumn": 6, + "charOffset": 4029, + "charLength": 7, + "snippet": { + "text": "getchar" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 6, + "charOffset": 3991, + "charLength": 7, + "snippet": { + "text": "\n\t\t\t\tif (isatty(STDIN_FILENO)) {\n\t\t\t\t\tgetchar();\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e1b12753c314f0dfef450c9cf58680e4ca23b17f0bf02a909acb8d841e1c02a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp" + }, + "region": { + "startLine": 155, + "startColumn": 4, + "charOffset": 4932, + "charLength": 3, + "snippet": { + "text": "fmt" + } + }, + "contextRegion": { + "startLine": 153, + "startColumn": 4, + "charOffset": 4885, + "charLength": 3, + "snippet": { + "text": "\t} else {\n\t\tthrow FailedToInitializeCanary(\n\t\t\tfmt::format(\n\t\t\t\t\"Unknown world type: {}, valid world types are: pvp, no-pvp and pvp-enforced\",\n\t\t\t\tg_configManager().getString(WORLD_TYPE, __FUNCTION__)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c24bbc4cced1a9d325018a3f2bb8c3e7bfe7ef7ac4479435affd3d590f47aa9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'loadMaps' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp" + }, + "region": { + "startLine": 165, + "startColumn": 20, + "charOffset": 5191, + "charLength": 8, + "snippet": { + "text": "loadMaps" + } + }, + "contextRegion": { + "startLine": 163, + "startColumn": 20, + "charOffset": 5169, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid CanaryServer::loadMaps() const {\n\ttry {\n\t\tg_game().loadMainMap(g_configManager().getString(MAP_NAME, __FUNCTION__));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "392412cef467f919b4961930e46b634f2f80dfc21903d7608c1716c455997ac9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp" + }, + "region": { + "startLine": 175, + "startColumn": 38, + "charOffset": 5649, + "charLength": 4, + "snippet": { + "text": "what" + } + }, + "contextRegion": { + "startLine": 173, + "startColumn": 38, + "charOffset": 5551, + "charLength": 4, + "snippet": { + "text": "\t\tZone::refreshAll();\n\t} catch (const std::exception &err) {\n\t\tthrow FailedToInitializeCanary(err.what());\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37844fc294b2f9d1681ef9fbcb3132ce31870e421b123a0aeba712a1eee03514" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'setupHousesRent' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp" + }, + "region": { + "startLine": 179, + "startColumn": 20, + "charOffset": 5683, + "charLength": 15, + "snippet": { + "text": "setupHousesRent" + } + }, + "contextRegion": { + "startLine": 177, + "startColumn": 20, + "charOffset": 5661, + "charLength": 15, + "snippet": { + "text": "}\n\nvoid CanaryServer::setupHousesRent() {\n\tRentPeriod_t rentPeriod;\n\tstd::string strRentPeriod = asLowerCaseString(g_configManager().getString(HOUSE_RENT_PERIOD, __FUNCTION__));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3378a9311f2ca2fe4fdddc0d4cd7e40968b54175d2e3701fbbadc88c843c68b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'rentPeriod' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp" + }, + "region": { + "startLine": 180, + "startColumn": 15, + "charOffset": 5717, + "charLength": 10, + "snippet": { + "text": "rentPeriod" + } + }, + "contextRegion": { + "startLine": 178, + "startColumn": 15, + "charOffset": 5663, + "charLength": 10, + "snippet": { + "text": "\nvoid CanaryServer::setupHousesRent() {\n\tRentPeriod_t rentPeriod;\n\tstd::string strRentPeriod = asLowerCaseString(g_configManager().getString(HOUSE_RENT_PERIOD, __FUNCTION__));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d5ae394909e16d0674c2eeac351db20c923d09f92fae2224b3bebe119004b1d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp" + }, + "region": { + "startLine": 239, + "startColumn": 6, + "charOffset": 7951, + "charLength": 6, + "snippet": { + "text": "isatty" + } + }, + "contextRegion": { + "startLine": 237, + "startColumn": 6, + "charOffset": 7866, + "charLength": 6, + "snippet": { + "text": "\t \"decrease the size of your map or compile in 64 bits mode\");\n\n\tif (isatty(STDIN_FILENO)) {\n\t\tgetchar();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19b65cbf7e572298e37eae02ad241516738a178a998644a1afec68a7fa0ba058" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp" + }, + "region": { + "startLine": 239, + "startColumn": 6, + "charOffset": 7951, + "charLength": 6, + "snippet": { + "text": "isatty" + } + }, + "contextRegion": { + "startLine": 237, + "startColumn": 6, + "charOffset": 7866, + "charLength": 6, + "snippet": { + "text": "\t \"decrease the size of your map or compile in 64 bits mode\");\n\n\tif (isatty(STDIN_FILENO)) {\n\t\tgetchar();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8baf9549ffaf45d733f7e30b86216e1908a791f5d25a56cf58878904dcfcb3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err33-c", + "ruleIndex": 132, + "kind": "fail", + "level": "warning", + "message": { + "text": "the value returned by this function should not be disregarded; neglecting it may lead to errors" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp" + }, + "region": { + "startLine": 240, + "startColumn": 3, + "charOffset": 7977, + "charLength": 7, + "snippet": { + "text": "getchar" + } + }, + "contextRegion": { + "startLine": 238, + "startColumn": 3, + "charOffset": 7945, + "charLength": 7, + "snippet": { + "text": "\n\tif (isatty(STDIN_FILENO)) {\n\t\tgetchar();\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc5b47e0571a48743fee0539ba1987a817a970e15216c8a55b2e6dc92f0584a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp" + }, + "region": { + "startLine": 240, + "startColumn": 3, + "charOffset": 7977, + "charLength": 7, + "snippet": { + "text": "getchar" + } + }, + "contextRegion": { + "startLine": 238, + "startColumn": 3, + "charOffset": 7945, + "charLength": 7, + "snippet": { + "text": "\n\tif (isatty(STDIN_FILENO)) {\n\t\tgetchar();\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12fcc84f424bcdafe369f0c71e9ef4d0469bcd3caa74bdb5dffafbc0567530a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-3", + "ruleIndex": 409, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-3: The library functions abort, exit, getenv and system from library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp" + }, + "region": { + "startLine": 244, + "startColumn": 2, + "charOffset": 8006, + "charLength": 4, + "snippet": { + "text": "exit" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 2, + "charOffset": 7991, + "charLength": 4, + "snippet": { + "text": "\n\tshutdown();\n\texit(-1);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02a448a3839038a2e78a11a88abdb65163261930d63235547512c71da49c184d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "concurrency-mt-unsafe", + "ruleIndex": 478, + "kind": "fail", + "level": "warning", + "message": { + "text": "function is not thread safe" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp" + }, + "region": { + "startLine": 244, + "startColumn": 2, + "charOffset": 8006, + "charLength": 4, + "snippet": { + "text": "exit" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 2, + "charOffset": 7991, + "charLength": 4, + "snippet": { + "text": "\n\tshutdown();\n\texit(-1);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3e56c4eff6f6efff918507ac1891fb9a4aae2b33271a9f1cedc8abd041f7b3a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp" + }, + "region": { + "startLine": 289, + "startColumn": 20, + "charOffset": 9255, + "charLength": 16, + "snippet": { + "text": "setConfigFileLua" + } + }, + "contextRegion": { + "startLine": 287, + "startColumn": 20, + "charOffset": 9232, + "charLength": 16, + "snippet": { + "text": "\t}\n\n\tg_configManager().setConfigFileLua(configName);\n\n\tmodulesLoadHelper(g_configManager().load(), g_configManager().getConfigFileLua());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a18d03685cd90cd80fe1801ea00d1630134767b4bade8b792a6fc42dedb37b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp" + }, + "region": { + "startLine": 312, + "startColumn": 34, + "charOffset": 10158, + "charLength": 3, + "snippet": { + "text": "fmt" + } + }, + "contextRegion": { + "startLine": 310, + "startColumn": 34, + "charOffset": 10035, + "charLength": 3, + "snippet": { + "text": "\tlogger.debug(\"Running database manager...\");\n\tif (!DatabaseManager::isDatabaseSetup()) {\n\t\tthrow FailedToInitializeCanary(fmt::format(\n\t\t\t\"The database you have specified in {} is empty, please import the schema.sql to your database.\",\n\t\t\tg_configManager().getConfigFileLua()" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2fa10a360e25a96d6ad079a1f71fcda108a86f635499dbc40cc26df3c9c1d5d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp" + }, + "region": { + "startLine": 331, + "startColumn": 34, + "charOffset": 10971, + "charLength": 3, + "snippet": { + "text": "fmt" + } + }, + "contextRegion": { + "startLine": 329, + "startColumn": 34, + "charOffset": 10759, + "charLength": 3, + "snippet": { + "text": "\tauto datapackName = g_configManager().getString(DATA_DIRECTORY, __FUNCTION__);\n\tif (!useAnyDatapack && datapackName != \"data-canary\" && datapackName != \"data-otservbr-global\") {\n\t\tthrow FailedToInitializeCanary(fmt::format(\n\t\t\t\"The datapack folder name '{}' is wrong, please select valid \"\n\t\t\t\"datapack name 'data-canary' or 'data-otservbr-global \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bdf33a3bb4a6ccbc5aab3d823e4473937b5ad5c8c2749f4e99cab7ead3c28522" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp" + }, + "region": { + "startLine": 340, + "startColumn": 6, + "charOffset": 11247, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 338, + "startColumn": 6, + "charOffset": 11191, + "charLength": 1, + "snippet": { + "text": "\n\tlogger.debug(\"Initializing lua environment...\");\n\tif (!g_luaEnvironment().getLuaState()) {\n\t\tg_luaEnvironment().initState();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95c92090c123f4fe7549ef43129c0807e4937d6fe1f0336baa118bfc12c45a21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'lua_State *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp" + }, + "region": { + "startLine": 340, + "startColumn": 7, + "charOffset": 11248, + "charLength": 16, + "snippet": { + "text": "g_luaEnvironment" + } + }, + "contextRegion": { + "startLine": 338, + "startColumn": 7, + "charOffset": 11191, + "charLength": 16, + "snippet": { + "text": "\n\tlogger.debug(\"Initializing lua environment...\");\n\tif (!g_luaEnvironment().getLuaState()) {\n\t\tg_luaEnvironment().initState();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "667f8981f78c29e0c320b6181f580eeb5a73a088aaef55532439d4522907c678" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp" + }, + "region": { + "startLine": 341, + "startColumn": 22, + "charOffset": 11305, + "charLength": 9, + "snippet": { + "text": "initState" + } + }, + "contextRegion": { + "startLine": 339, + "startColumn": 22, + "charOffset": 11192, + "charLength": 9, + "snippet": { + "text": "\tlogger.debug(\"Initializing lua environment...\");\n\tif (!g_luaEnvironment().getLuaState()) {\n\t\tg_luaEnvironment().initState();\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12fcc84f424bcdafe369f0c71e9ef4d0469bcd3caa74bdb5dffafbc0567530a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp" + }, + "region": { + "startLine": 385, + "startColumn": 34, + "charOffset": 13548, + "charLength": 3, + "snippet": { + "text": "fmt" + } + }, + "contextRegion": { + "startLine": 383, + "startColumn": 34, + "charOffset": 13458, + "charLength": 3, + "snippet": { + "text": "\tlogger.debug(\"Loading {}\", moduleName);\n\tif (!loaded) {\n\t\tthrow FailedToInitializeCanary(fmt::format(\"Cannot load: {}\", moduleName));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d14c2e81356a9f2c0ac0d11f2b5d6282549c02c7d4c859e0c78cab990d4a9c5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-3", + "ruleIndex": 409, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-3: The library functions abort, exit, getenv and system from library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp" + }, + "region": { + "startLine": 393, + "startColumn": 2, + "charOffset": 13719, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 391, + "startColumn": 2, + "charOffset": 13659, + "charLength": 3, + "snippet": { + "text": "\tg_metrics().shutdown();\n\tinject().shutdown();\n\tstd::exit(0);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e43cd9d690f92691cdb3b51a955d666d60163cbdd73a1b2bbb0b8310c1a8bb45" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "concurrency-mt-unsafe", + "ruleIndex": 478, + "kind": "fail", + "level": "warning", + "message": { + "text": "function is not thread safe" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/canary_server.cpp" + }, + "region": { + "startLine": 393, + "startColumn": 2, + "charOffset": 13719, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 391, + "startColumn": 2, + "charOffset": 13659, + "charLength": 3, + "snippet": { + "text": "\tg_metrics().shutdown();\n\tinject().shutdown();\n\tstd::exit(0);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62f0b2762b80df1f1cac302ca88e5e7d8362a286428b6cc0e76d846cdcec0df8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/familiars.cpp" + }, + "region": { + "startLine": 23, + "startColumn": 2, + "charOffset": 667, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 21, + "startColumn": 2, + "charOffset": 638, + "charLength": 3, + "snippet": { + "text": "\nbool Familiars::reload() {\n\tfor (auto &familiarsVector : familiars) {\n\t\tfamiliarsVector.clear();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a8c936b3ba4a482b03fc7debcd7ffe998311cf110749db9ca49d24b6a540fe26" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/familiars.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 6, + "charOffset": 988, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 6, + "charOffset": 822, + "charLength": 1, + "snippet": { + "text": "\tauto folder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + \"/XML/familiars.xml\";\n\tpugi::xml_parse_result result = doc.load_file(folder.c_str());\n\tif (!result) {\n\t\tg_logger().error(\"Failed to load Familiars\");\n\t\tprintXMLError(__FUNCTION__, folder, result);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9027a9426b78000a6e3e81d3efc21e3ccba29de45d380a71b17f00b1361dd1bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/familiars.cpp" + }, + "region": { + "startLine": 39, + "startColumn": 2, + "charOffset": 1115, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 37, + "startColumn": 2, + "charOffset": 1110, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (auto familiarsNode : doc.child(\"familiars\").children()) {\n\t\tpugi::xml_attribute attr;\n\t\tif ((attr = familiarsNode.attribute(\"enabled\")) && !attr.as_bool()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3aa88005d1b7e5d92b130256c51f708d72559ab2d5d5c3609c0a6fd2e88e8fcb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/familiars.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 7, + "charOffset": 1212, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 7, + "charOffset": 1114, + "charLength": 1, + "snippet": { + "text": "\tfor (auto familiarsNode : doc.child(\"familiars\").children()) {\n\t\tpugi::xml_attribute attr;\n\t\tif ((attr = familiarsNode.attribute(\"enabled\")) && !attr.as_bool()) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a66f44b05782ffe4df2a5a1b4562342efa51cec39f3d179ba70b2116f0aa84e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/familiars.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 7, + "charOffset": 1212, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 7, + "charOffset": 1114, + "charLength": 1, + "snippet": { + "text": "\tfor (auto familiarsNode : doc.child(\"familiars\").children()) {\n\t\tpugi::xml_attribute attr;\n\t\tif ((attr = familiarsNode.attribute(\"enabled\")) && !attr.as_bool()) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6e87c68b061fc4208ac0256c4ab6a57c511dcd10fee21cf251398c5fbf084fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/familiars.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 7, + "charOffset": 1212, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 7, + "charOffset": 1114, + "charLength": 1, + "snippet": { + "text": "\tfor (auto familiarsNode : doc.child(\"familiars\").children()) {\n\t\tpugi::xml_attribute attr;\n\t\tif ((attr = familiarsNode.attribute(\"enabled\")) && !attr.as_bool()) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "454e00894c790ded344d42ab61491ee849fba45b7a6424a79c8030a27f35c00d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/familiars.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 13, + "charOffset": 1218, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 13, + "charOffset": 1114, + "charLength": 1, + "snippet": { + "text": "\tfor (auto familiarsNode : doc.child(\"familiars\").children()) {\n\t\tpugi::xml_attribute attr;\n\t\tif ((attr = familiarsNode.attribute(\"enabled\")) && !attr.as_bool()) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48aa202a48ee617789914c05c48a9e91dbce55c965ae3f633d637be976120576" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/familiars.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 7, + "charOffset": 1302, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 7, + "charOffset": 1291, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif (!(attr = familiarsNode.attribute(\"vocation\"))) {\n\t\t\tg_logger().warn(\"[Familiars::loadFromXml] - Missing familiar vocation.\");\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "388b78156a324d2b0a6c3ec8c6a4f1422285b6d320c82c964fc986647c08fca8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/familiars.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 14, + "charOffset": 1309, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 14, + "charOffset": 1291, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif (!(attr = familiarsNode.attribute(\"vocation\"))) {\n\t\t\tg_logger().warn(\"[Familiars::loadFromXml] - Missing familiar vocation.\");\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0a8bfbcdede36040eeb67bd22a4ff14caa151c4a6646e41ef36d1b3b25c8249" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/familiars.cpp" + }, + "region": { + "startLine": 57, + "startColumn": 7, + "charOffset": 1726, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 55, + "startColumn": 7, + "charOffset": 1640, + "charLength": 1, + "snippet": { + "text": "\n\t\tpugi::xml_attribute lookTypeAttribute = familiarsNode.attribute(\"lookType\");\n\t\tif (!lookTypeAttribute) {\n\t\t\tg_logger().warn(\"[Familiars::loadFromXml] - Missing looktype on familiar.\");\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ad3e98caf64e837231729612c0697126182d307a4ca3b2ec0ecc3acb5f72793" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/familiars.cpp" + }, + "region": { + "startLine": 62, + "startColumn": 3, + "charOffset": 1848, + "charLength": 9, + "snippet": { + "text": "familiars" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 3, + "charOffset": 1841, + "charLength": 9, + "snippet": { + "text": "\t\t}\n\n\t\tfamiliars[vocation].emplace_back(std::make_shared(\n\t\t\tfamiliarsNode.attribute(\"name\").as_string(),\n\t\t\tpugi::cast(lookTypeAttribute.value())," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4b78ac4f58afce8296bddaf0dcc27dfad391effb8679928c4cbe96b03affea0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/familiars.cpp" + }, + "region": { + "startLine": 62, + "startColumn": 23, + "charOffset": 1868, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 23, + "charOffset": 1841, + "charLength": 12, + "snippet": { + "text": "\t\t}\n\n\t\tfamiliars[vocation].emplace_back(std::make_shared(\n\t\t\tfamiliarsNode.attribute(\"name\").as_string(),\n\t\t\tpugi::cast(lookTypeAttribute.value())," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2195d3dc18759d2b1930e291e6659e9eaad799de24b68aec8f8d524d92e34905" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/familiars.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 2, + "charOffset": 2169, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 2, + "charOffset": 2159, + "charLength": 3, + "snippet": { + "text": "\t\t));\n\t}\n\tfor (uint16_t vocation = VOCATION_NONE; vocation <= VOCATION_LAST; ++vocation) {\n\t\tfamiliars[vocation].shrink_to_fit();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7c17348de98923adf011085c638952838b66905f7e0c1851a250d08d481fc33" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/familiars.cpp" + }, + "region": { + "startLine": 71, + "startColumn": 3, + "charOffset": 2252, + "charLength": 9, + "snippet": { + "text": "familiars" + } + }, + "contextRegion": { + "startLine": 69, + "startColumn": 3, + "charOffset": 2165, + "charLength": 9, + "snippet": { + "text": "\t}\n\tfor (uint16_t vocation = VOCATION_NONE; vocation <= VOCATION_LAST; ++vocation) {\n\t\tfamiliars[vocation].shrink_to_fit();\n\t}\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "428bcf6d8a59dcabfa9fa592cf7ae4695bd2a605b494ea56153f1203e3988c3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/familiars.cpp" + }, + "region": { + "startLine": 77, + "startColumn": 29, + "charOffset": 2442, + "charLength": 9, + "snippet": { + "text": "familiars" + } + }, + "contextRegion": { + "startLine": 75, + "startColumn": 29, + "charOffset": 2308, + "charLength": 9, + "snippet": { + "text": "\nstd::shared_ptr Familiars::getFamiliarByLookType(uint16_t vocation, uint16_t lookType) const {\n\tif (auto it = std::find_if(familiars[vocation].begin(), familiars[vocation].end(), [lookType](auto familiar_it) {\n\t\t\treturn familiar_it->lookType == lookType;\n\t\t});" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af1b78124aab74c975f64763e7aa366bba9c5775a644c762ab2ac004d07f78a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/familiars.cpp" + }, + "region": { + "startLine": 77, + "startColumn": 58, + "charOffset": 2471, + "charLength": 9, + "snippet": { + "text": "familiars" + } + }, + "contextRegion": { + "startLine": 75, + "startColumn": 58, + "charOffset": 2308, + "charLength": 9, + "snippet": { + "text": "\nstd::shared_ptr Familiars::getFamiliarByLookType(uint16_t vocation, uint16_t lookType) const {\n\tif (auto it = std::find_if(familiars[vocation].begin(), familiars[vocation].end(), [lookType](auto familiar_it) {\n\t\t\treturn familiar_it->lookType == lookType;\n\t\t});" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a72ec837f57a5577cc04711d2851e20346c4568a81854e17d5ca1af5a9234dbf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/familiars.cpp" + }, + "region": { + "startLine": 80, + "startColumn": 12, + "charOffset": 2591, + "charLength": 9, + "snippet": { + "text": "familiars" + } + }, + "contextRegion": { + "startLine": 78, + "startColumn": 12, + "charOffset": 2529, + "charLength": 9, + "snippet": { + "text": "\t\t\treturn familiar_it->lookType == lookType;\n\t\t});\n\t it != familiars[vocation].end()) {\n\t\treturn *it;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f19829b9e71ac2568c33fcfaa1ff63c2ba2768208ee4c402420d64b083517664" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/groups.cpp" + }, + "region": { + "startLine": 23, + "startColumn": 3, + "charOffset": 868, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 21, + "startColumn": 3, + "charOffset": 745, + "charLength": 3, + "snippet": { + "text": "\t\tphmap::flat_hash_map map;\n\t\t// Iterate through all values of the PlayerFlags_t enumeration\n\t\tfor (auto value : magic_enum::enum_values()) {\n\t\t\t// Get the string representation of the current enumeration value\n\t\t\tstd::string name(magic_enum::enum_name(value).data());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "745ebca6d5eafb1b935ea288a47aa999eb9d35e5951f7d83efbceef22119b172" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'parsePlayerFlagMap' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/groups.cpp" + }, + "region": { + "startLine": 35, + "startColumn": 57, + "charOffset": 1365, + "charLength": 18, + "snippet": { + "text": "parsePlayerFlagMap" + } + }, + "contextRegion": { + "startLine": 33, + "startColumn": 57, + "charOffset": 1305, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tconst phmap::flat_hash_map parsePlayerFlagMap = initParsePlayerFlagMap();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "389ba2644648f90263016adc3ddd5360cd49465f21013eaff7fab33c7f85b08c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-namespace-comments", + "ruleIndex": 544, + "kind": "fail", + "level": "warning", + "message": { + "text": "namespace 'ParsePlayerFlagMap' not terminated with a closing comment" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/groups.cpp" + }, + "region": { + "startLine": 36, + "startColumn": 1, + "charOffset": 1412, + "charLength": 1, + "snippet": { + "text": "}" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 1, + "charOffset": 1308, + "charLength": 1, + "snippet": { + "text": "\n\tconst phmap::flat_hash_map parsePlayerFlagMap = initParsePlayerFlagMap();\n}\n\nuint8_t Groups::getFlagNumber(PlayerFlags_t playerFlags) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db85a97d637be62244ad977ed88806d55ab63cbbd128a1e29566c81215323fd9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/groups.cpp" + }, + "region": { + "startLine": 54, + "startColumn": 3, + "charOffset": 1879, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 52, + "startColumn": 3, + "charOffset": 1752, + "charLength": 3, + "snippet": { + "text": "void parseGroupFlags(Group &group, const pugi::xml_node &groupNode) {\n\tif (pugi::xml_node node = groupNode.child(\"flags\")) {\n\t\tfor (auto flagNode : node.children()) {\n\t\t\tpugi::xml_attribute attr = flagNode.first_attribute();\n\t\t\tif (!attr || !attr.as_bool()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "120cc84a14c705ca0eb1724e9eaad492a6591a34b9f20d13cc4bf5c77b631b2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/groups.cpp" + }, + "region": { + "startLine": 56, + "startColumn": 8, + "charOffset": 1984, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 54, + "startColumn": 8, + "charOffset": 1877, + "charLength": 1, + "snippet": { + "text": "\t\tfor (auto flagNode : node.children()) {\n\t\t\tpugi::xml_attribute attr = flagNode.first_attribute();\n\t\t\tif (!attr || !attr.as_bool()) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e97d426eee1f753cc1015e92e69d579291ed415692054c73c7b3fcf1525cee6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/groups.cpp" + }, + "region": { + "startLine": 64, + "startColumn": 5, + "charOffset": 2294, + "charLength": 5, + "snippet": { + "text": "group" + } + }, + "contextRegion": { + "startLine": 62, + "startColumn": 5, + "charOffset": 2149, + "charLength": 5, + "snippet": { + "text": "\t\t\tauto parseFlag = ParsePlayerFlagMap::parsePlayerFlagMap.find(string);\n\t\t\tif (parseFlag != ParsePlayerFlagMap::parsePlayerFlagMap.end()) {\n\t\t\t\tgroup.flags[Groups::getFlagNumber(parseFlag->second)] = true;\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7cf4fe20ac88039abec641be2d5433d003ce81507933e65e5e3dd3aabcf062b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/groups.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 6, + "charOffset": 2581, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 6, + "charOffset": 2418, + "charLength": 1, + "snippet": { + "text": "\tauto folder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + \"/XML/groups.xml\";\n\tpugi::xml_parse_result result = doc.load_file(folder.c_str());\n\tif (!result) {\n\t\tprintXMLError(__FUNCTION__, folder, result);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "57531808a945885f95310111c00d359a030fb782b441429c3035eef29ab0f11f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/groups.cpp" + }, + "region": { + "startLine": 81, + "startColumn": 14, + "charOffset": 2744, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 79, + "startColumn": 14, + "charOffset": 2659, + "charLength": 4, + "snippet": { + "text": "\tfor (auto groupNode : doc.child(\"groups\").children()) {\n\t\tGroup group;\n\t\tgroup.id = pugi::cast(groupNode.attribute(\"id\").value());\n\t\tgroup.name = groupNode.attribute(\"name\").as_string();\n\t\tgroup.access = groupNode.attribute(\"access\").as_bool();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13b811c220bc2086df6aaa67117454c21edea3686ca8a17b0d6ef4831a43be2b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/groups.cpp" + }, + "region": { + "startLine": 88, + "startColumn": 3, + "charOffset": 3263, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 86, + "startColumn": 3, + "charOffset": 3099, + "charLength": 3, + "snippet": { + "text": "\t\tauto flagsInt = static_cast(groupNode.attribute(\"flags\").as_uint());\n\t\tstd::bitset flags(flagsInt);\n\t\tfor (uint8_t i = 0; i < getFlagNumber(PlayerFlags_t::FlagLast); i++) {\n\t\t\tPlayerFlags_t flag = getFlagFromNumber(i);\n\t\t\tgroup.flags[i] = flags[Groups::getFlagNumber(flag)];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7409c7b05c698c7be41a1352c1191093e6e27c16359093a2d24a75a99f96359b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/groups.cpp" + }, + "region": { + "startLine": 90, + "startColumn": 4, + "charOffset": 3383, + "charLength": 5, + "snippet": { + "text": "group" + } + }, + "contextRegion": { + "startLine": 88, + "startColumn": 4, + "charOffset": 3261, + "charLength": 5, + "snippet": { + "text": "\t\tfor (uint8_t i = 0; i < getFlagNumber(PlayerFlags_t::FlagLast); i++) {\n\t\t\tPlayerFlags_t flag = getFlagFromNumber(i);\n\t\t\tgroup.flags[i] = flags[Groups::getFlagNumber(flag)];\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aec616eca58829ac6e8a0e31480c7a3ac91dd867f1cb8d7bb65693e437589c03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/groups.cpp" + }, + "region": { + "startLine": 96, + "startColumn": 17, + "charOffset": 3520, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 17, + "charOffset": 3466, + "charLength": 12, + "snippet": { + "text": "\t\tparseGroupFlags(group, groupNode);\n\n\t\tgroups_vector.emplace_back(std::make_shared(group));\n\t}\n\tgroups_vector.shrink_to_fit();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75bca743e44abb50263cb2da3d92cae2a711032c47ca8d440595461d0a11f207" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/guild.cpp" + }, + "region": { + "startLine": 17, + "startColumn": 2, + "charOffset": 563, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 15, + "startColumn": 2, + "charOffset": 465, + "charLength": 3, + "snippet": { + "text": "void Guild::addMember(const std::shared_ptr &player) {\n\tmembersOnline.push_back(player);\n\tfor (const auto &member : getMembersOnline()) {\n\t\tg_game().updatePlayerHelpers(member);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "131140aa7f909f4af83593dee675286ada47ff1494f41ab2441855ddab33ed6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/guild.cpp" + }, + "region": { + "startLine": 24, + "startColumn": 16, + "charOffset": 810, + "charLength": 6, + "snippet": { + "text": "remove" + } + }, + "contextRegion": { + "startLine": 22, + "startColumn": 16, + "charOffset": 657, + "charLength": 6, + "snippet": { + "text": "void Guild::removeMember(const std::shared_ptr &player) {\n\t// loop over to udpate all members and delete the player from the list\n\tmembersOnline.remove(player);\n\tfor (const auto &member : membersOnline) {\n\t\tg_game().updatePlayerHelpers(member);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "670282cabacd4fde95e2057f9fa323a54b56a2c13a3078e5ed942d91f514cd20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/guild.cpp" + }, + "region": { + "startLine": 25, + "startColumn": 2, + "charOffset": 827, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 2, + "charOffset": 723, + "charLength": 3, + "snippet": { + "text": "\t// loop over to udpate all members and delete the player from the list\n\tmembersOnline.remove(player);\n\tfor (const auto &member : membersOnline) {\n\t\tg_game().updatePlayerHelpers(member);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81af738bcdcef606437c67be4efa4c330ec1858512cbd2371c9cc1bdaf53fa94" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/guild.cpp" + }, + "region": { + "startLine": 36, + "startColumn": 2, + "charOffset": 1070, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 2, + "charOffset": 1016, + "charLength": 3, + "snippet": { + "text": "\nGuildRank_ptr Guild::getRankById(uint32_t rankId) {\n\tfor (auto rank : ranks) {\n\t\tif (rank->id == rankId) {\n\t\t\treturn rank;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23f05c41bb268750ef67995f5d627614673fb82ce065da3e247ba343796a7689" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/guild.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 2, + "charOffset": 1241, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 2, + "charOffset": 1166, + "charLength": 3, + "snippet": { + "text": "\nGuildRank_ptr Guild::getRankByName(const std::string &guildName) const {\n\tfor (auto rank : ranks) {\n\t\tif (rank->name == guildName) {\n\t\t\treturn rank;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3121b10f1b00442f5d62782142a50facb6414b7d9176071847d1191c81a833a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/guild.cpp" + }, + "region": { + "startLine": 54, + "startColumn": 2, + "charOffset": 1403, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 52, + "startColumn": 2, + "charOffset": 1342, + "charLength": 3, + "snippet": { + "text": "\nGuildRank_ptr Guild::getRankByLevel(uint8_t level) const {\n\tfor (auto rank : ranks) {\n\t\tif (rank->level == level) {\n\t\t\treturn rank;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ea685829e6f25b1d8218c10975e690373ec23fcac858b784a123a4a361698aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/guild.cpp" + }, + "region": { + "startLine": 63, + "startColumn": 8, + "charOffset": 1592, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 8, + "charOffset": 1501, + "charLength": 12, + "snippet": { + "text": "\nvoid Guild::addRank(uint32_t rankId, const std::string &rankName, uint8_t level) {\n\tranks.emplace_back(std::make_shared(rankId, rankName, level));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a3a6b8f25742fdca6ce54e670dad74a989830b6b7301d07e28a613c5db1660a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvmlibc-restrict-system-libc-headers", + "ruleIndex": 592, + "kind": "fail", + "level": "warning", + "message": { + "text": "system include utility not allowed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 10, + "startColumn": 1, + "charOffset": 371, + "charLength": 1, + "snippet": { + "text": "#" + } + }, + "contextRegion": { + "startLine": 8, + "startColumn": 1, + "charOffset": 366, + "charLength": 1, + "snippet": { + "text": " */\n\n#include \n\n#include \"pch.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2961e2be12f7593542711baf1284468e87af1e3eb6bd52487fff33569902962d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'leader' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 20, + "startColumn": 62, + "charOffset": 671, + "charLength": 6, + "snippet": { + "text": "leader" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 62, + "charOffset": 563, + "charLength": 6, + "snippet": { + "text": "#include \"lua/callbacks/events_callbacks.hpp\"\n\nstd::shared_ptr Party::create(std::shared_ptr leader) {\n\tauto party = std::make_shared();\n\tparty->m_leader = leader;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0977632aa7b15177ab902d763024eac0771cb25f75bf124c1896df7584b27577" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 25, + "startColumn": 10, + "charOffset": 864, + "charLength": 19, + "snippet": { + "text": "setSharedExperience" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 10, + "charOffset": 749, + "charLength": 19, + "snippet": { + "text": "\tleader->setParty(party);\n\tif (g_configManager().getBoolean(PARTY_AUTO_SHARE_EXPERIENCE, __FUNCTION__)) {\n\t\tparty->setSharedExperience(leader, true);\n\t}\n\treturn party;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01b0d4111d04581da2f86b892413ea8bd621a7f91b407e291cca86e6881a670c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 40, + "startColumn": 6, + "charOffset": 1178, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 38, + "startColumn": 6, + "charOffset": 1137, + "charLength": 1, + "snippet": { + "text": "\n\tauto currentLeader = getLeader();\n\tif (!currentLeader) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e3ea5cce49bcfe3edeaa7310261e5ba47017f0c0b4e4f05d72070c57663a11f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 46, + "startColumn": 34, + "charOffset": 1297, + "charLength": 13, + "snippet": { + "text": "CHANNEL_PARTY" + } + }, + "contextRegion": { + "startLine": 44, + "startColumn": 34, + "charOffset": 1228, + "charLength": 13, + "snippet": { + "text": "\n\tcurrentLeader->setParty(nullptr);\n\tcurrentLeader->sendClosePrivate(CHANNEL_PARTY);\n\tg_game().updatePlayerShield(currentLeader);\n\tg_game().updatePlayerHelpers(currentLeader);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea5c1be890428945e98e0867326edc88420e87457531d01b71928eb439e4d1b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 52, + "startColumn": 2, + "charOffset": 1549, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 50, + "startColumn": 2, + "charOffset": 1454, + "charLength": 3, + "snippet": { + "text": "\tcurrentLeader->sendTextMessage(MESSAGE_PARTY_MANAGEMENT, \"Your party has been disbanded.\");\n\n\tfor (const auto &invitee : getInvitees()) {\n\t\tinvitee->removePartyInvitation(getParty());\n\t\tcurrentLeader->sendCreatureShield(invitee);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "daa542f72bd27c866cfbf572eb9c0ef68a91215a4d02249b89f3d224875b977f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 2, + "charOffset": 1741, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 2, + "charOffset": 1709, + "charLength": 3, + "snippet": { + "text": "\n\tauto members = getMembers();\n\tfor (const auto &member : members) {\n\t\tmember->setParty(nullptr);\n\t\tmember->sendClosePrivate(CHANNEL_PARTY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01156a614526eda6a040ade3de60a51e2b92aa5bfc8e327a5b143e64acc71035" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 61, + "startColumn": 28, + "charOffset": 1834, + "charLength": 13, + "snippet": { + "text": "CHANNEL_PARTY" + } + }, + "contextRegion": { + "startLine": 59, + "startColumn": 28, + "charOffset": 1740, + "charLength": 13, + "snippet": { + "text": "\tfor (const auto &member : members) {\n\t\tmember->setParty(nullptr);\n\t\tmember->sendClosePrivate(CHANNEL_PARTY);\n\t\tmember->sendTextMessage(MESSAGE_PARTY_MANAGEMENT, \"Your party has been disbanded.\");\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6529bd8f3d97255ac7cb6c50f049e8753b573221cb1084315c5e13bedace5653" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 68, + "startColumn": 3, + "charOffset": 2021, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 66, + "startColumn": 3, + "charOffset": 1979, + "charLength": 3, + "snippet": { + "text": "\t\tg_game().updatePlayerShield(member);\n\n\t\tfor (const auto &otherMember : members) {\n\t\t\totherMember->sendCreatureSkull(member);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3349221107b979f81b896bb4a8c606055cb17f437cfd720c5959bd8940a1d682" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'leaveParty' has cognitive complexity of 32 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 80, + "startColumn": 13, + "charOffset": 2300, + "charLength": 10, + "snippet": { + "text": "leaveParty" + } + }, + "contextRegion": { + "startLine": 78, + "startColumn": 13, + "charOffset": 2285, + "charLength": 10, + "snippet": { + "text": "}\n\nbool Party::leaveParty(std::shared_ptr player) {\n\tif (!player) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "963b44657a9faea5e0bd3464cf9fe8c74ef5bd9c27794a14a9e6967cc9c3f81b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 80, + "startColumn": 48, + "charOffset": 2335, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 78, + "startColumn": 48, + "charOffset": 2285, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Party::leaveParty(std::shared_ptr player) {\n\tif (!player) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "800227cef0e361f6691c7e781344efac049b3788aef6d4cdd3d7c39a0fff3708" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 81, + "startColumn": 6, + "charOffset": 2350, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 79, + "startColumn": 6, + "charOffset": 2287, + "charLength": 1, + "snippet": { + "text": "\nbool Party::leaveParty(std::shared_ptr player) {\n\tif (!player) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1b985e128db895b175b18a846045a8be07163978ff0ec2202b94b770ab95c85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 86, + "startColumn": 6, + "charOffset": 2414, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 6, + "charOffset": 2380, + "charLength": 1, + "snippet": { + "text": "\n\tauto leader = getLeader();\n\tif (!leader) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "889edd2bdb118ec6574773330cf1238b3b38324d5688ae65d24920c5fc66848b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 109, + "startColumn": 5, + "charOffset": 2963, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 107, + "startColumn": 5, + "charOffset": 2906, + "charLength": 5, + "snippet": { + "text": "\t\t\t} else {\n\t\t\t\tauto newLeader = memberList.front();\n\t\t\t\twhile (!newLeader) {\n\t\t\t\t\tmemberList.erase(memberList.begin());\n\t\t\t\t\tif (memberList.empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0db2f0ae30a20d7b6746a9be675122a41b553d790fcfe9adae16f301544c2b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'newLeader' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 109, + "startColumn": 12, + "charOffset": 2970, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 107, + "startColumn": 12, + "charOffset": 2906, + "charLength": 1, + "snippet": { + "text": "\t\t\t} else {\n\t\t\t\tauto newLeader = memberList.front();\n\t\t\t\twhile (!newLeader) {\n\t\t\t\t\tmemberList.erase(memberList.begin());\n\t\t\t\t\tif (memberList.empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f11b4899548cc994797089dd36067ea47654c587da28368ec79cda60ca22b62e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 109, + "startColumn": 12, + "charOffset": 2970, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 107, + "startColumn": 12, + "charOffset": 2906, + "charLength": 1, + "snippet": { + "text": "\t\t\t} else {\n\t\t\t\tauto newLeader = memberList.front();\n\t\t\t\twhile (!newLeader) {\n\t\t\t\t\tmemberList.erase(memberList.begin());\n\t\t\t\t\tif (memberList.empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e3ea5cce49bcfe3edeaa7310261e5ba47017f0c0b4e4f05d72070c57663a11f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 110, + "startColumn": 17, + "charOffset": 3000, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 108, + "startColumn": 17, + "charOffset": 2918, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tauto newLeader = memberList.front();\n\t\t\t\twhile (!newLeader) {\n\t\t\t\t\tmemberList.erase(memberList.begin());\n\t\t\t\t\tif (memberList.empty()) {\n\t\t\t\t\t\tmissingLeader = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a5c8a3e76e54f6b0b67f44acee6d7a5704ea5b60038f21a4e42485cca8a4ead" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 118, + "startColumn": 6, + "charOffset": 3175, + "charLength": 19, + "snippet": { + "text": "passPartyLeadership" + } + }, + "contextRegion": { + "startLine": 116, + "startColumn": 6, + "charOffset": 3143, + "charLength": 19, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t\tif (newLeader) {\n\t\t\t\t\tpassPartyLeadership(newLeader);\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d24231df8a8220dfd2496d87b4013fd489a5fd86e7501d16be6c53f94dd3582" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 129, + "startColumn": 14, + "charOffset": 3453, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 127, + "startColumn": 14, + "charOffset": 3341, + "charLength": 5, + "snippet": { + "text": "\tauto it = std::find(memberList.begin(), memberList.end(), player);\n\tif (it != memberList.end()) {\n\t\tmemberList.erase(it);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d2c8d5cd9578ca120e1659dd7c658ce513e220c7c148b635983d42e61a450e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 133, + "startColumn": 27, + "charOffset": 3522, + "charLength": 13, + "snippet": { + "text": "CHANNEL_PARTY" + } + }, + "contextRegion": { + "startLine": 131, + "startColumn": 27, + "charOffset": 3467, + "charLength": 13, + "snippet": { + "text": "\n\tplayer->setParty(nullptr);\n\tplayer->sendClosePrivate(CHANNEL_PARTY);\n\tg_game().updatePlayerShield(player);\n\tg_game().updatePlayerHelpers(player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6c2c5624c6301b674eb142a9ac21de8b033d69f98a1bc55b2bf9d62d8b6ca42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 137, + "startColumn": 2, + "charOffset": 3617, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 135, + "startColumn": 2, + "charOffset": 3576, + "charLength": 3, + "snippet": { + "text": "\tg_game().updatePlayerHelpers(player);\n\n\tfor (const auto &member : getMembers()) {\n\t\tmember->sendCreatureSkull(player);\n\t\tplayer->sendPlayerPartyIcons(member);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1cb30e835bdc5c77bcdb2a72f09db4d6361db29171b3c1260447e818e610484" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 166, + "startColumn": 57, + "charOffset": 4375, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 57, + "charOffset": 4316, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Party::passPartyLeadership(std::shared_ptr player) {\n\tauto leader = getLeader();\n\tif (!leader || !player || leader == player || player->getParty().get() != this) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46fd4e9f47ad458bde678ad4be70313df6c79510a457e8da576a84bc3286e6ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 168, + "startColumn": 6, + "charOffset": 4418, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 166, + "startColumn": 6, + "charOffset": 4319, + "charLength": 1, + "snippet": { + "text": "bool Party::passPartyLeadership(std::shared_ptr player) {\n\tauto leader = getLeader();\n\tif (!leader || !player || leader == player || player->getParty().get() != this) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e5cac8d7773d9b5bd90e677eb2c37cb69d5c0a6e39f55563773c27529d85fa8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 168, + "startColumn": 17, + "charOffset": 4429, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 166, + "startColumn": 17, + "charOffset": 4319, + "charLength": 1, + "snippet": { + "text": "bool Party::passPartyLeadership(std::shared_ptr player) {\n\tauto leader = getLeader();\n\tif (!leader || !player || leader == player || player->getParty().get() != this) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa00eec3017e7f8bf6ccd91ab63a57844aca704cbfd2a1414fd7bb9ce05face4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 175, + "startColumn": 14, + "charOffset": 4684, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 173, + "startColumn": 14, + "charOffset": 4572, + "charLength": 5, + "snippet": { + "text": "\tauto it = std::find(memberList.begin(), memberList.end(), player);\n\tif (it != memberList.end()) {\n\t\tmemberList.erase(it);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96772372325367d6b58f62b5bb5b4f15b24fe9d3645303c22151663fc184cd61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'oldLeader' of the variable 'leader' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 182, + "startColumn": 7, + "charOffset": 4860, + "charLength": 9, + "snippet": { + "text": "oldLeader" + } + }, + "contextRegion": { + "startLine": 180, + "startColumn": 7, + "charOffset": 4787, + "charLength": 9, + "snippet": { + "text": "\tbroadcastPartyMessage(MESSAGE_PARTY_MANAGEMENT, ss.str(), true);\n\n\tauto oldLeader = leader;\n\tm_leader = player;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cfc4b51815eca3da07bf1aaae0a6331f7b6f9a795983da6168788e0bb7ab3734" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 185, + "startColumn": 13, + "charOffset": 4913, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 183, + "startColumn": 13, + "charOffset": 4880, + "charLength": 6, + "snippet": { + "text": "\tm_leader = player;\n\n\tmemberList.insert(memberList.begin(), oldLeader);\n\n\tupdateSharedExperience();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7e9b9e1f21708b8e974b27852f9ccec79ad2fe75a1dd450bbd05cdfa2255cb8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 190, + "startColumn": 2, + "charOffset": 5008, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 188, + "startColumn": 2, + "charOffset": 4980, + "charLength": 3, + "snippet": { + "text": "\tupdateTrackerAnalyzer();\n\n\tfor (const auto &member : getMembers()) {\n\t\tmember->sendPartyCreatureShield(oldLeader);\n\t\tmember->sendPartyCreatureShield(player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed54a4c8446b85d8b3145fd5f4aefa94f542c42d7b5b550c6b37ae085d2b4455" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 195, + "startColumn": 2, + "charOffset": 5144, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 193, + "startColumn": 2, + "charOffset": 5139, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &invitee : getInvitees()) {\n\t\tinvitee->sendCreatureShield(oldLeader);\n\t\tinvitee->sendCreatureShield(player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5befebbc41309d256268e8fa8edae37e9e2c2078fcb313ab224d240355b0e53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 209, + "startColumn": 6, + "charOffset": 5566, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 207, + "startColumn": 6, + "charOffset": 5470, + "charLength": 1, + "snippet": { + "text": "bool Party::joinParty(const std::shared_ptr &player) {\n\tauto leader = getLeader();\n\tif (!leader) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b220f50bafab4cd64e73d90127172112a8d090a0f6c257d55c450a5f7dd793d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 13, + "charOffset": 5941, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 13, + "charOffset": 5925, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tinviteList.erase(it);\n\n\tstd::ostringstream ss;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7d86515e1bcbf590be0de2742cc01e4883c26e9dcf24a720f9e49bf46f9ba15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 236, + "startColumn": 2, + "charOffset": 6164, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 234, + "startColumn": 2, + "charOffset": 6124, + "charLength": 3, + "snippet": { + "text": "\tg_game().updatePlayerShield(player);\n\n\tfor (const auto &member : getMembers()) {\n\t\tmember->sendCreatureSkull(player);\n\t\tmember->sendPlayerPartyIcons(player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48623b966e87675b688bc88201bf8375c226f74d1870676da4a1501b7faa371e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 266, + "startColumn": 6, + "charOffset": 7129, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 264, + "startColumn": 6, + "charOffset": 6995, + "charLength": 1, + "snippet": { + "text": "bool Party::removeInvite(const std::shared_ptr &player, bool removeFromPlayer /* = true*/) {\n\tauto leader = getLeader();\n\tif (!leader) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f722e7d1128ff64ed5553090c4d13769940f65cf2db68e8670f571851ce7e10" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 275, + "startColumn": 13, + "charOffset": 7291, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 273, + "startColumn": 13, + "charOffset": 7275, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tinviteList.erase(it);\n\n\tleader->sendCreatureShield(player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0f1a3e8cf6a84e06026d18e2ef7ca90da8c488cf092a64826f21f7a561905dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 287, + "startColumn": 3, + "charOffset": 7493, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 285, + "startColumn": 3, + "charOffset": 7468, + "charLength": 3, + "snippet": { + "text": "\t\tdisband();\n\t} else {\n\t\tfor (const auto &member : getMembers()) {\n\t\t\tg_game().updatePlayerHelpers(member);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "654a1f79d214f113452d6d073147ff376d3f8673d14a331394cedcddce924ff9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 299, + "startColumn": 6, + "charOffset": 7745, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 297, + "startColumn": 6, + "charOffset": 7642, + "charLength": 1, + "snippet": { + "text": "void Party::revokeInvitation(const std::shared_ptr &player) {\n\tauto leader = getLeader();\n\tif (!leader) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe8780a606c789afc02767dc84ec8afa81daf2a48c44a0040abb7da891922508" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 311, + "startColumn": 2, + "charOffset": 8113, + "charLength": 12, + "snippet": { + "text": "removeInvite" + } + }, + "contextRegion": { + "startLine": 309, + "startColumn": 2, + "charOffset": 8049, + "charLength": 12, + "snippet": { + "text": "\tleader->sendTextMessage(MESSAGE_PARTY_MANAGEMENT, ss.str());\n\n\tremoveInvite(player);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50af8c3134ef4b5241aa7782b0208b1b195c4ab4988893a7d0e93e505d7337d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 316, + "startColumn": 6, + "charOffset": 8237, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 314, + "startColumn": 6, + "charOffset": 8138, + "charLength": 1, + "snippet": { + "text": "bool Party::invitePlayer(const std::shared_ptr &player) {\n\tauto leader = getLeader();\n\tif (!leader) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3bba638f33133a880112edde7ee9ad4bcf1fdaf3a54b76e2efb6ef72045b4f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 337, + "startColumn": 2, + "charOffset": 8737, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 335, + "startColumn": 2, + "charOffset": 8704, + "charLength": 3, + "snippet": { + "text": "\tinviteList.push_back(player);\n\n\tfor (const auto &member : getMembers()) {\n\t\tg_game().updatePlayerHelpers(member);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1cb30e835bdc5c77bcdb2a72f09db4d6361db29171b3c1260447e818e610484" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 345, + "startColumn": 10, + "charOffset": 8946, + "charLength": 18, + "snippet": { + "text": "addPartyInvitation" + } + }, + "contextRegion": { + "startLine": 343, + "startColumn": 10, + "charOffset": 8899, + "charLength": 18, + "snippet": { + "text": "\tplayer->sendCreatureShield(leader);\n\n\tplayer->addPartyInvitation(getParty());\n\n\tss.str(std::string());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94dd2839f8ef297685eab3866ab096f321de33abe84ea22d311222dee5985ce0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 360, + "startColumn": 6, + "charOffset": 9477, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 358, + "startColumn": 6, + "charOffset": 9408, + "charLength": 1, + "snippet": { + "text": "void Party::updateAllPartyIcons() {\n\tauto leader = getLeader();\n\tif (!leader) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "246fbf809273b7d40ba53f4d5560521b05e87f85f523eaaeef8e6acf5596ff32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 365, + "startColumn": 3, + "charOffset": 9571, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 363, + "startColumn": 3, + "charOffset": 9501, + "charLength": 3, + "snippet": { + "text": "\tauto members = getMembers();\n\tfor (const auto &member : members) {\n\t\tfor (const auto &otherMember : members) {\n\t\t\tmember->sendPartyCreatureShield(otherMember);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06e8ec5883d44290eea10d0ba63e25d2dd9236b6e4ad8100d243d0b0ff9a0055" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 378, + "startColumn": 6, + "charOffset": 9981, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 376, + "startColumn": 6, + "charOffset": 9827, + "charLength": 1, + "snippet": { + "text": "void Party::broadcastPartyMessage(MessageClasses msgClass, const std::string &msg, bool sendToInvitations /*= false*/) {\n\tauto leader = getLeader();\n\tif (!leader) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71c5860702dc520dc4b24588c21a729bc498ac2a4259573b64af920c28cffbea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 381, + "startColumn": 2, + "charOffset": 10006, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 379, + "startColumn": 2, + "charOffset": 9992, + "charLength": 3, + "snippet": { + "text": "\t\treturn;\n\t}\n\tfor (const auto &member : getMembers()) {\n\t\tmember->sendTextMessage(msgClass, msg);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23491e31b91cc03bcf8244ee6367024f1dd9e1be68e0489952a711d9f46dd888" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 388, + "startColumn": 3, + "charOffset": 10164, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 386, + "startColumn": 3, + "charOffset": 10135, + "charLength": 3, + "snippet": { + "text": "\n\tif (sendToInvitations) {\n\t\tfor (const auto &invitee : getInvitees()) {\n\t\t\tinvitee->sendTextMessage(msgClass, msg);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63fa913b43df61c91dd7566581b1038e571fc2aa1c7ebdd37564848fba52f4c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getSharedExpReturnMessage' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 404, + "startColumn": 20, + "charOffset": 10507, + "charLength": 25, + "snippet": { + "text": "getSharedExpReturnMessage" + } + }, + "contextRegion": { + "startLine": 402, + "startColumn": 20, + "charOffset": 10485, + "charLength": 25, + "snippet": { + "text": "}\n\nconst char* Party::getSharedExpReturnMessage(SharedExpStatus_t value) {\n\tswitch (value) {\n\t\tcase SHAREDEXP_OK:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49d7c537eafa7d6d9f0937485766fe3e32873c1b7182d0a06c5c0a4896cd00ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 406, + "startColumn": 3, + "charOffset": 10580, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 404, + "startColumn": 3, + "charOffset": 10488, + "charLength": 4, + "snippet": { + "text": "const char* Party::getSharedExpReturnMessage(SharedExpStatus_t value) {\n\tswitch (value) {\n\t\tcase SHAREDEXP_OK:\n\t\t\treturn \"Shared Experience is now active.\";\n\t\tcase SHAREDEXP_TOOFARAWAY:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "407f3ad155f49d0f6d779128d3bbe396379f17cd1c459b43cfade620001db66c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 408, + "startColumn": 3, + "charOffset": 10647, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 406, + "startColumn": 3, + "charOffset": 10578, + "charLength": 4, + "snippet": { + "text": "\t\tcase SHAREDEXP_OK:\n\t\t\treturn \"Shared Experience is now active.\";\n\t\tcase SHAREDEXP_TOOFARAWAY:\n\t\t\treturn \"Shared Experience has been activated, but some members of your party are too far away.\";\n\t\tcase SHAREDEXP_LEVELDIFFTOOLARGE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f4bb959dd641e7daaff7d2f8a96b0126ce69044b957760092a412cda1a3d94b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 410, + "startColumn": 3, + "charOffset": 10776, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 408, + "startColumn": 3, + "charOffset": 10645, + "charLength": 4, + "snippet": { + "text": "\t\tcase SHAREDEXP_TOOFARAWAY:\n\t\t\treturn \"Shared Experience has been activated, but some members of your party are too far away.\";\n\t\tcase SHAREDEXP_LEVELDIFFTOOLARGE:\n\t\t\treturn \"Shared Experience has been activated, but the level spread of your party is too wide.\";\n\t\tcase SHAREDEXP_MEMBERINACTIVE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f67cfbbc49f57b440f10b7580c68b6f71ddfa7a14299f873b841817bfbd64b25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 412, + "startColumn": 3, + "charOffset": 10911, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 410, + "startColumn": 3, + "charOffset": 10774, + "charLength": 4, + "snippet": { + "text": "\t\tcase SHAREDEXP_LEVELDIFFTOOLARGE:\n\t\t\treturn \"Shared Experience has been activated, but the level spread of your party is too wide.\";\n\t\tcase SHAREDEXP_MEMBERINACTIVE:\n\t\t\treturn \"Shared Experience has been activated, but some members of your party are inactive.\";\n\t\tcase SHAREDEXP_EMPTYPARTY:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f84228cdaed0f1eca8fc7793467394830607f4dbd3a20b33bbe992e1c72298f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 414, + "startColumn": 3, + "charOffset": 11040, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 412, + "startColumn": 3, + "charOffset": 10909, + "charLength": 4, + "snippet": { + "text": "\t\tcase SHAREDEXP_MEMBERINACTIVE:\n\t\t\treturn \"Shared Experience has been activated, but some members of your party are inactive.\";\n\t\tcase SHAREDEXP_EMPTYPARTY:\n\t\t\treturn \"Shared Experience has been activated, but you are alone in your party.\";\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06da1cbc4ae2e36be6fc6739e9a63518c040d85d8ec6cebb767d1c816c4d6e07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 416, + "startColumn": 3, + "charOffset": 11153, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 414, + "startColumn": 3, + "charOffset": 11038, + "charLength": 7, + "snippet": { + "text": "\t\tcase SHAREDEXP_EMPTYPARTY:\n\t\t\treturn \"Shared Experience has been activated, but you are alone in your party.\";\n\t\tdefault:\n\t\t\treturn \"An error occured. Unable to activate shared experience.\";\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0ad6c22b0eeebe19db6daae6d7b0ccdba89eb1bcacc5c3e1209671a02d89939" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 421, + "startColumn": 57, + "charOffset": 11293, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 419, + "startColumn": 57, + "charOffset": 11234, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Party::setSharedExperience(std::shared_ptr player, bool newSharedExpActive, bool silent /*= false*/) {\n\tauto leader = getLeader();\n\tif (!player || leader != player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6ac21d68b2e47bf8e6f0a4dabaaad71636aa027a63899d453126014308c9789" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 423, + "startColumn": 6, + "charOffset": 11386, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 421, + "startColumn": 6, + "charOffset": 11237, + "charLength": 1, + "snippet": { + "text": "bool Party::setSharedExperience(std::shared_ptr player, bool newSharedExpActive, bool silent /*= false*/) {\n\tauto leader = getLeader();\n\tif (!player || leader != player) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a00597b023b850772c3e4b755f0fd093e2171d6d3d9bad18de4efbb3adaaa69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 449, + "startColumn": 76, + "charOffset": 12075, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 447, + "startColumn": 76, + "charOffset": 11997, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Party::shareExperience(uint64_t experience, std::shared_ptr target /* = nullptr*/) {\n\tauto leader = getLeader();\n\tif (!leader) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "669039ce5182951eebc27178b485e69b4424a0d0cd6bced4ace340a93d5f47ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 451, + "startColumn": 6, + "charOffset": 12133, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 449, + "startColumn": 6, + "charOffset": 12000, + "charLength": 1, + "snippet": { + "text": "void Party::shareExperience(uint64_t experience, std::shared_ptr target /* = nullptr*/) {\n\tauto leader = getLeader();\n\tif (!leader) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "745e41c16b566f255e17597a23898d2aaf5f6e7a2451c5fba0409b23c0e41c0a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 459, + "startColumn": 2, + "charOffset": 12412, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 457, + "startColumn": 2, + "charOffset": 12268, + "charLength": 3, + "snippet": { + "text": "\tg_callbacks().executeCallback(EventCallback_t::partyOnShareExperience, &EventCallback::partyOnShareExperience, getParty(), shareExperience);\n\n\tfor (const auto &member : getMembers()) {\n\t\tmember->onGainSharedExperience(shareExperience, target);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ddac2f5268e07ac5e8859c014108f38c43bd12a88bd8cf72c09078f86748b7b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 469, + "startColumn": 82, + "charOffset": 12806, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 467, + "startColumn": 82, + "charOffset": 12722, + "charLength": 6, + "snippet": { + "text": "}\n\nSharedExpStatus_t Party::getMemberSharedExperienceStatus(std::shared_ptr player) {\n\tauto leader = getLeader();\n\tif (!leader) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95ade95e08f4238f566f6777bb76a7c03d90d25b9ec15eba4a2b337ddb1a4c14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 471, + "startColumn": 6, + "charOffset": 12849, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 469, + "startColumn": 6, + "charOffset": 12725, + "charLength": 1, + "snippet": { + "text": "SharedExpStatus_t Party::getMemberSharedExperienceStatus(std::shared_ptr player) {\n\tauto leader = getLeader();\n\tif (!leader) {\n\t\treturn SHAREDEXP_EMPTYPARTY;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "228b0efc1b4748074b554b4431f278bbcecdb180d97123c457cea530c705d06d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 483, + "startColumn": 28, + "charOffset": 13099, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 481, + "startColumn": 28, + "charOffset": 13068, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (!Position::areInRange<30, 30, 1>(leader->getPosition(), player->getPosition())) {\n\t\treturn SHAREDEXP_TOOFARAWAY;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e98e1ebb12ea06e7999efa4fd9b296b1920b2265c95b9df5e22c7250abfd3cdc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 483, + "startColumn": 32, + "charOffset": 13103, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 481, + "startColumn": 32, + "charOffset": 13068, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (!Position::areInRange<30, 30, 1>(leader->getPosition(), player->getPosition())) {\n\t\treturn SHAREDEXP_TOOFARAWAY;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d88b853b70e8e1cf37dd7527fdfc07896907787036f59eef03664e6efd86754" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'shareRangeMultiplier' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 495, + "startColumn": 14, + "charOffset": 13364, + "charLength": 20, + "snippet": { + "text": "shareRangeMultiplier" + } + }, + "contextRegion": { + "startLine": 493, + "startColumn": 14, + "charOffset": 13348, + "charLength": 20, + "snippet": { + "text": "}\n\nfloat Party::shareRangeMultiplier() const {\n\treturn g_configManager().getFloat(PARTY_SHARE_RANGE_MULTIPLIER, __FUNCTION__);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4eec45d3e0827890e2317a40b1bae4aeedcd749cd0a62d389b1985586fe0aad8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 501, + "startColumn": 6, + "charOffset": 13547, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 499, + "startColumn": 6, + "charOffset": 13478, + "charLength": 1, + "snippet": { + "text": "uint32_t Party::getHighestLevel() {\n\tauto leader = getLeader();\n\tif (!leader) {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce092272f422749ba5fa719ada80c4551d0990556cb42383189a93764e49a834" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 506, + "startColumn": 2, + "charOffset": 13620, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 504, + "startColumn": 2, + "charOffset": 13573, + "charLength": 3, + "snippet": { + "text": "\n\tuint32_t highestLevel = leader->getLevel();\n\tfor (const auto &member : getMembers()) {\n\t\tif (member->getLevel() > highestLevel) {\n\t\t\thighestLevel = member->getLevel();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74c63bbcdbc87f1ebc0ac88da7fbddc1650b68f92e98e8fa1b0a3942a261bde1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-std-min-max", + "ruleIndex": 736, + "kind": "fail", + "level": "warning", + "message": { + "text": "use `std::max` instead of `>`" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 507, + "startColumn": 3, + "charOffset": 13664, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 505, + "startColumn": 3, + "charOffset": 13574, + "charLength": 2, + "snippet": { + "text": "\tuint32_t highestLevel = leader->getLevel();\n\tfor (const auto &member : getMembers()) {\n\t\tif (member->getLevel() > highestLevel) {\n\t\t\thighestLevel = member->getLevel();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db969eddde34a9f6e8068e0714f461fab77b9a9350faef6e6f564d2afac20119" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 520, + "startColumn": 6, + "charOffset": 13984, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 518, + "startColumn": 6, + "charOffset": 13916, + "charLength": 1, + "snippet": { + "text": "uint32_t Party::getLowestLevel() {\n\tauto leader = getLeader();\n\tif (!leader) {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ebf22e0f493f21cb6f5a35aa67a56863f910d4561d67c3e260dcdde7e931517" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 524, + "startColumn": 2, + "charOffset": 14055, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 522, + "startColumn": 2, + "charOffset": 14007, + "charLength": 3, + "snippet": { + "text": "\t}\n\tuint32_t lowestLevel = leader->getLevel();\n\tfor (const auto &member : getMembers()) {\n\t\tif (member->getLevel() < lowestLevel) {\n\t\t\tlowestLevel = member->getLevel();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d08dc6cf6ebae4c74347dc1b729298705686e207585d6beb3c7ffe8c431288b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-std-min-max", + "ruleIndex": 736, + "kind": "fail", + "level": "warning", + "message": { + "text": "use `std::min` instead of `<`" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 525, + "startColumn": 3, + "charOffset": 14099, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 523, + "startColumn": 3, + "charOffset": 14010, + "charLength": 2, + "snippet": { + "text": "\tuint32_t lowestLevel = leader->getLevel();\n\tfor (const auto &member : getMembers()) {\n\t\tif (member->getLevel() < lowestLevel) {\n\t\t\tlowestLevel = member->getLevel();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f4b301e570ba61f9d788aac065ec15d58da8d4f74f58e7345bce6e22ffd0b95" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 536, + "startColumn": 52, + "charOffset": 14399, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 534, + "startColumn": 52, + "charOffset": 14345, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Party::isPlayerActive(std::shared_ptr player) {\n\tauto it = ticksMap.find(player->getID());\n\tif (it == ticksMap.end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "830c98231be70b0185eff8d55288824620397ffd02222b612dc8d18811d9afbb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'uint64_t' (aka 'unsigned long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 542, + "startColumn": 21, + "charOffset": 14568, + "charLength": 1, + "snippet": { + "text": "2" + } + }, + "contextRegion": { + "startLine": 540, + "startColumn": 21, + "charOffset": 14497, + "charLength": 1, + "snippet": { + "text": "\t}\n\tuint64_t timeDiff = OTSYS_TIME() - it->second;\n\treturn timeDiff <= 2 * 60 * 1000;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f087109bc6770c2f3eb355f5e71bf7141a7b719f463791dec2c89ff52524f4a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 542, + "startColumn": 25, + "charOffset": 14572, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 540, + "startColumn": 25, + "charOffset": 14497, + "charLength": 2, + "snippet": { + "text": "\t}\n\tuint64_t timeDiff = OTSYS_TIME() - it->second;\n\treturn timeDiff <= 2 * 60 * 1000;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25cc831cf0698882a6c554696e06593eb25800015df3d9ed5a86ad0a288485c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 542, + "startColumn": 30, + "charOffset": 14577, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 540, + "startColumn": 30, + "charOffset": 14497, + "charLength": 4, + "snippet": { + "text": "\t}\n\tuint64_t timeDiff = OTSYS_TIME() - it->second;\n\treturn timeDiff <= 2 * 60 * 1000;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f27f1082483fd99051be0d1866b5ee236bef4f31beba7ab5bca452bc5d67868" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 547, + "startColumn": 6, + "charOffset": 14674, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 545, + "startColumn": 6, + "charOffset": 14586, + "charLength": 1, + "snippet": { + "text": "SharedExpStatus_t Party::getSharedExperienceStatus() {\n\tauto leader = getLeader();\n\tif (!leader) {\n\t\treturn SHAREDEXP_EMPTYPARTY;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "844091fd93940b36472eaea8ec7e7992ec081a9e21dfd89358ac86f5f24bbc29" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 555, + "startColumn": 2, + "charOffset": 14859, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 553, + "startColumn": 2, + "charOffset": 14854, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &member : getMembers()) {\n\t\tSharedExpStatus_t memberStatus = getMemberSharedExperienceStatus(member);\n\t\tif (memberStatus != SHAREDEXP_OK) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b28b12f99ccbf3158978891d60a49c15fb2deaaf0e1d436149a2cfaf1aec933" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 564, + "startColumn": 55, + "charOffset": 15125, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 562, + "startColumn": 55, + "charOffset": 15068, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Party::updatePlayerTicks(std::shared_ptr player, uint32_t points) {\n\tif (points != 0 && !player->hasFlag(PlayerFlags_t::NotGainInFight)) {\n\t\tticksMap[player->getID()] = OTSYS_TIME();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ecf8a06e103ca4b760a9d767c21b1cdf061013ea5752184956e332e76a45d69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 571, + "startColumn": 55, + "charOffset": 15355, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 569, + "startColumn": 55, + "charOffset": 15298, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Party::clearPlayerPoints(std::shared_ptr player) {\n\tauto it = ticksMap.find(player->getID());\n\tif (it != ticksMap.end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fbab42a1744323f244b33d973ac9863b8aa693a1a3c473c30c0018f13a02b9a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 574, + "startColumn": 12, + "charOffset": 15448, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 572, + "startColumn": 12, + "charOffset": 15365, + "charLength": 5, + "snippet": { + "text": "\tauto it = ticksMap.find(player->getID());\n\tif (it != ticksMap.end()) {\n\t\tticksMap.erase(it);\n\t\tupdateSharedExperience();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1db12ec4a090bdc7d2336767b7a4db818c1493157435687f37746a4dec4b4eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 581, + "startColumn": 6, + "charOffset": 15578, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 579, + "startColumn": 6, + "charOffset": 15493, + "charLength": 1, + "snippet": { + "text": "bool Party::canOpenCorpse(uint32_t ownerId) const {\n\tauto leader = getLeader();\n\tif (!leader) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01b0e5a2ccaef713e39539201499f52fb160d127bbbc686e6525f319dd695b38" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'showPlayerStatus' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 591, + "startColumn": 13, + "charOffset": 15788, + "charLength": 16, + "snippet": { + "text": "showPlayerStatus" + } + }, + "contextRegion": { + "startLine": 589, + "startColumn": 13, + "charOffset": 15773, + "charLength": 16, + "snippet": { + "text": "}\n\nvoid Party::showPlayerStatus(std::shared_ptr player, std::shared_ptr member, bool showStatus) {\n\tplayer->sendPartyCreatureShowStatus(member, showStatus);\n\tmember->sendPartyCreatureShowStatus(player, showStatus);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25076492d8c3988a512dff72e71a6511e9fad8b5d37f9047190540f7e26b0dcf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 591, + "startColumn": 54, + "charOffset": 15829, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 589, + "startColumn": 54, + "charOffset": 15773, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Party::showPlayerStatus(std::shared_ptr player, std::shared_ptr member, bool showStatus) {\n\tplayer->sendPartyCreatureShowStatus(member, showStatus);\n\tmember->sendPartyCreatureShowStatus(player, showStatus);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbb458afa23a89276b759b8ce7da8415ec49d9c180725268ff52b7e36fa4fa01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'member' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 591, + "startColumn": 86, + "charOffset": 15861, + "charLength": 6, + "snippet": { + "text": "member" + } + }, + "contextRegion": { + "startLine": 589, + "startColumn": 86, + "charOffset": 15773, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Party::showPlayerStatus(std::shared_ptr player, std::shared_ptr member, bool showStatus) {\n\tplayer->sendPartyCreatureShowStatus(member, showStatus);\n\tmember->sendPartyCreatureShowStatus(player, showStatus);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65230416f067e034fb0ede9f424d08c164fd0c5778ec4cb6402978ffa72fa8f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 595, + "startColumn": 3, + "charOffset": 16025, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 593, + "startColumn": 3, + "charOffset": 15946, + "charLength": 3, + "snippet": { + "text": "\tmember->sendPartyCreatureShowStatus(player, showStatus);\n\tif (showStatus) {\n\t\tfor (const auto &summon : member->getSummons()) {\n\t\t\tplayer->sendPartyCreatureShowStatus(summon, showStatus);\n\t\t\tplayer->sendPartyCreatureHealth(summon, std::ceil((static_cast(summon->getHealth()) / std::max(summon->getMaxHealth(), 1)) * 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "110125aeb804c0abe3915f2644c03167bf058f0a81c4d30d936d3b4a39d1e943" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 597, + "startColumn": 44, + "charOffset": 16178, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 595, + "startColumn": 44, + "charOffset": 16023, + "charLength": 3, + "snippet": { + "text": "\t\tfor (const auto &summon : member->getSummons()) {\n\t\t\tplayer->sendPartyCreatureShowStatus(summon, showStatus);\n\t\t\tplayer->sendPartyCreatureHealth(summon, std::ceil((static_cast(summon->getHealth()) / std::max(summon->getMaxHealth(), 1)) * 100));\n\t\t}\n\t\tfor (const auto &summon : player->getSummons()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f760f44c3a2f1d0d5d28bec16c890eb8fec1d65487535a88559733b7e53608cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 597, + "startColumn": 146, + "charOffset": 16280, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 595, + "startColumn": 146, + "charOffset": 16023, + "charLength": 3, + "snippet": { + "text": "\t\tfor (const auto &summon : member->getSummons()) {\n\t\t\tplayer->sendPartyCreatureShowStatus(summon, showStatus);\n\t\t\tplayer->sendPartyCreatureHealth(summon, std::ceil((static_cast(summon->getHealth()) / std::max(summon->getMaxHealth(), 1)) * 100));\n\t\t}\n\t\tfor (const auto &summon : player->getSummons()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8800c1f3b63a0e60f7a2a9bc0721f8e24a2e6574f9218a4dc01fc2bd991f518a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 599, + "startColumn": 3, + "charOffset": 16293, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 597, + "startColumn": 3, + "charOffset": 16135, + "charLength": 3, + "snippet": { + "text": "\t\t\tplayer->sendPartyCreatureHealth(summon, std::ceil((static_cast(summon->getHealth()) / std::max(summon->getMaxHealth(), 1)) * 100));\n\t\t}\n\t\tfor (const auto &summon : player->getSummons()) {\n\t\t\tmember->sendPartyCreatureShowStatus(summon, showStatus);\n\t\t\tmember->sendPartyCreatureHealth(summon, std::ceil((static_cast(summon->getHealth()) / std::max(summon->getMaxHealth(), 1)) * 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ede99bc093139d512cf9d7b1a765eeeccb4037e73c207acb03dde855955dffb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 601, + "startColumn": 44, + "charOffset": 16446, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 599, + "startColumn": 44, + "charOffset": 16291, + "charLength": 3, + "snippet": { + "text": "\t\tfor (const auto &summon : player->getSummons()) {\n\t\t\tmember->sendPartyCreatureShowStatus(summon, showStatus);\n\t\t\tmember->sendPartyCreatureHealth(summon, std::ceil((static_cast(summon->getHealth()) / std::max(summon->getMaxHealth(), 1)) * 100));\n\t\t}\n\t\tplayer->sendPartyCreatureHealth(member, std::ceil((static_cast(member->getHealth()) / std::max(member->getMaxHealth(), 1)) * 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98d33f1bc0ffeaef3082c0be580e6fe468e8a733bb9b1516d1d1894d39368d97" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 601, + "startColumn": 146, + "charOffset": 16548, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 599, + "startColumn": 146, + "charOffset": 16291, + "charLength": 3, + "snippet": { + "text": "\t\tfor (const auto &summon : player->getSummons()) {\n\t\t\tmember->sendPartyCreatureShowStatus(summon, showStatus);\n\t\t\tmember->sendPartyCreatureHealth(summon, std::ceil((static_cast(summon->getHealth()) / std::max(summon->getMaxHealth(), 1)) * 100));\n\t\t}\n\t\tplayer->sendPartyCreatureHealth(member, std::ceil((static_cast(member->getHealth()) / std::max(member->getMaxHealth(), 1)) * 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bac8376e672318381cf53845254d2134eaf130ecd6b599911d45784ffe7d26c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 603, + "startColumn": 43, + "charOffset": 16601, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 601, + "startColumn": 43, + "charOffset": 16403, + "charLength": 3, + "snippet": { + "text": "\t\t\tmember->sendPartyCreatureHealth(summon, std::ceil((static_cast(summon->getHealth()) / std::max(summon->getMaxHealth(), 1)) * 100));\n\t\t}\n\t\tplayer->sendPartyCreatureHealth(member, std::ceil((static_cast(member->getHealth()) / std::max(member->getMaxHealth(), 1)) * 100));\n\t\tmember->sendPartyCreatureHealth(player, std::ceil((static_cast(player->getHealth()) / std::max(player->getMaxHealth(), 1)) * 100));\n\t\tplayer->sendPartyPlayerMana(member, std::ceil((static_cast(member->getMana()) / std::max(member->getMaxMana(), 1)) * 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29bec5bfc3f0a3ed93f08492d8f7ef1bcf2a72266528b926c54dd41077c70ab0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 603, + "startColumn": 145, + "charOffset": 16703, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 601, + "startColumn": 145, + "charOffset": 16403, + "charLength": 3, + "snippet": { + "text": "\t\t\tmember->sendPartyCreatureHealth(summon, std::ceil((static_cast(summon->getHealth()) / std::max(summon->getMaxHealth(), 1)) * 100));\n\t\t}\n\t\tplayer->sendPartyCreatureHealth(member, std::ceil((static_cast(member->getHealth()) / std::max(member->getMaxHealth(), 1)) * 100));\n\t\tmember->sendPartyCreatureHealth(player, std::ceil((static_cast(player->getHealth()) / std::max(player->getMaxHealth(), 1)) * 100));\n\t\tplayer->sendPartyPlayerMana(member, std::ceil((static_cast(member->getMana()) / std::max(member->getMaxMana(), 1)) * 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be8bd1a907c055794806bb0ef0f65982ff0c0e6805db57abdb9cdf3afa466dc0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 604, + "startColumn": 43, + "charOffset": 16752, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 602, + "startColumn": 43, + "charOffset": 16555, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t\tplayer->sendPartyCreatureHealth(member, std::ceil((static_cast(member->getHealth()) / std::max(member->getMaxHealth(), 1)) * 100));\n\t\tmember->sendPartyCreatureHealth(player, std::ceil((static_cast(player->getHealth()) / std::max(player->getMaxHealth(), 1)) * 100));\n\t\tplayer->sendPartyPlayerMana(member, std::ceil((static_cast(member->getMana()) / std::max(member->getMaxMana(), 1)) * 100));\n\t\tmember->sendPartyPlayerMana(player, std::ceil((static_cast(player->getMana()) / std::max(player->getMaxMana(), 1)) * 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ce989faf0904e9b297130d8d8c880aad3410b0f2187b21caabd589363c7940d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 604, + "startColumn": 145, + "charOffset": 16854, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 602, + "startColumn": 145, + "charOffset": 16555, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t\tplayer->sendPartyCreatureHealth(member, std::ceil((static_cast(member->getHealth()) / std::max(member->getMaxHealth(), 1)) * 100));\n\t\tmember->sendPartyCreatureHealth(player, std::ceil((static_cast(player->getHealth()) / std::max(player->getMaxHealth(), 1)) * 100));\n\t\tplayer->sendPartyPlayerMana(member, std::ceil((static_cast(member->getMana()) / std::max(member->getMaxMana(), 1)) * 100));\n\t\tmember->sendPartyPlayerMana(player, std::ceil((static_cast(player->getMana()) / std::max(player->getMaxMana(), 1)) * 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d37d78f9af8ae9ad20bc6c6426e933edf76f92fc25b8558c64dbfc0a2d17b119" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 605, + "startColumn": 39, + "charOffset": 16899, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 603, + "startColumn": 39, + "charOffset": 16559, + "charLength": 3, + "snippet": { + "text": "\t\tplayer->sendPartyCreatureHealth(member, std::ceil((static_cast(member->getHealth()) / std::max(member->getMaxHealth(), 1)) * 100));\n\t\tmember->sendPartyCreatureHealth(player, std::ceil((static_cast(player->getHealth()) / std::max(player->getMaxHealth(), 1)) * 100));\n\t\tplayer->sendPartyPlayerMana(member, std::ceil((static_cast(member->getMana()) / std::max(member->getMaxMana(), 1)) * 100));\n\t\tmember->sendPartyPlayerMana(player, std::ceil((static_cast(player->getMana()) / std::max(player->getMaxMana(), 1)) * 100));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96e74ccf866ce2ca27654c4d1945a04356d9ea9724cc42916bb6568bb2cb20b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 605, + "startColumn": 109, + "charOffset": 16969, + "charLength": 6, + "snippet": { + "text": "member" + } + }, + "contextRegion": { + "startLine": 603, + "startColumn": 109, + "charOffset": 16559, + "charLength": 6, + "snippet": { + "text": "\t\tplayer->sendPartyCreatureHealth(member, std::ceil((static_cast(member->getHealth()) / std::max(member->getMaxHealth(), 1)) * 100));\n\t\tmember->sendPartyCreatureHealth(player, std::ceil((static_cast(player->getHealth()) / std::max(player->getMaxHealth(), 1)) * 100));\n\t\tplayer->sendPartyPlayerMana(member, std::ceil((static_cast(member->getMana()) / std::max(member->getMaxMana(), 1)) * 100));\n\t\tmember->sendPartyPlayerMana(player, std::ceil((static_cast(player->getMana()) / std::max(player->getMaxMana(), 1)) * 100));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29d273bbe054f20d5124a7426a6f28ff413fe33bbff8f56382e21dc8436058a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 605, + "startColumn": 137, + "charOffset": 16997, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 603, + "startColumn": 137, + "charOffset": 16559, + "charLength": 3, + "snippet": { + "text": "\t\tplayer->sendPartyCreatureHealth(member, std::ceil((static_cast(member->getHealth()) / std::max(member->getMaxHealth(), 1)) * 100));\n\t\tmember->sendPartyCreatureHealth(player, std::ceil((static_cast(player->getHealth()) / std::max(player->getMaxHealth(), 1)) * 100));\n\t\tplayer->sendPartyPlayerMana(member, std::ceil((static_cast(member->getMana()) / std::max(member->getMaxMana(), 1)) * 100));\n\t\tmember->sendPartyPlayerMana(player, std::ceil((static_cast(player->getMana()) / std::max(player->getMaxMana(), 1)) * 100));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee2d0bd8dc9ad5e2585ca47044c393c6cc8741ca150ea940153b91e52b66537b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 606, + "startColumn": 39, + "charOffset": 17042, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 604, + "startColumn": 39, + "charOffset": 16710, + "charLength": 3, + "snippet": { + "text": "\t\tmember->sendPartyCreatureHealth(player, std::ceil((static_cast(player->getHealth()) / std::max(player->getMaxHealth(), 1)) * 100));\n\t\tplayer->sendPartyPlayerMana(member, std::ceil((static_cast(member->getMana()) / std::max(member->getMaxMana(), 1)) * 100));\n\t\tmember->sendPartyPlayerMana(player, std::ceil((static_cast(player->getMana()) / std::max(player->getMaxMana(), 1)) * 100));\n\t} else {\n\t\tfor (const auto &summon : player->getSummons()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f38fc69de6213554010da91c700ea9dcb89d79ae64c6b4712ce18a52d866d6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 606, + "startColumn": 109, + "charOffset": 17112, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 604, + "startColumn": 109, + "charOffset": 16710, + "charLength": 6, + "snippet": { + "text": "\t\tmember->sendPartyCreatureHealth(player, std::ceil((static_cast(player->getHealth()) / std::max(player->getMaxHealth(), 1)) * 100));\n\t\tplayer->sendPartyPlayerMana(member, std::ceil((static_cast(member->getMana()) / std::max(member->getMaxMana(), 1)) * 100));\n\t\tmember->sendPartyPlayerMana(player, std::ceil((static_cast(player->getMana()) / std::max(player->getMaxMana(), 1)) * 100));\n\t} else {\n\t\tfor (const auto &summon : player->getSummons()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fbfb655b14150e442a718200afa4f7c5b454ea5e92ff4f09407ba3c99ea30310" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 606, + "startColumn": 137, + "charOffset": 17140, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 604, + "startColumn": 137, + "charOffset": 16710, + "charLength": 3, + "snippet": { + "text": "\t\tmember->sendPartyCreatureHealth(player, std::ceil((static_cast(player->getHealth()) / std::max(player->getMaxHealth(), 1)) * 100));\n\t\tplayer->sendPartyPlayerMana(member, std::ceil((static_cast(member->getMana()) / std::max(member->getMaxMana(), 1)) * 100));\n\t\tmember->sendPartyPlayerMana(player, std::ceil((static_cast(player->getMana()) / std::max(player->getMaxMana(), 1)) * 100));\n\t} else {\n\t\tfor (const auto &summon : player->getSummons()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69b19ed5aeed58bfb4c688441b5671fcae5e07a8d651fd23fa0de71e351aefdc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 608, + "startColumn": 3, + "charOffset": 17159, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 606, + "startColumn": 3, + "charOffset": 17004, + "charLength": 3, + "snippet": { + "text": "\t\tmember->sendPartyPlayerMana(player, std::ceil((static_cast(player->getMana()) / std::max(player->getMaxMana(), 1)) * 100));\n\t} else {\n\t\tfor (const auto &summon : player->getSummons()) {\n\t\t\tmember->sendPartyCreatureShowStatus(summon, showStatus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14b662ae16fc010c8f417ac2cddee963687e1d0d17a24bcdfa015f12dfa6bd4f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 611, + "startColumn": 3, + "charOffset": 17275, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 609, + "startColumn": 3, + "charOffset": 17209, + "charLength": 3, + "snippet": { + "text": "\t\t\tmember->sendPartyCreatureShowStatus(summon, showStatus);\n\t\t}\n\t\tfor (const auto &summon : member->getSummons()) {\n\t\t\tplayer->sendPartyCreatureShowStatus(summon, showStatus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e7367e4a2a26cc767a0496522689ab2fb5485f794ae24c4c69bf670dda18ea7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 617, + "startColumn": 56, + "charOffset": 17450, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 615, + "startColumn": 56, + "charOffset": 17392, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Party::updatePlayerStatus(std::shared_ptr player) {\n\tauto leader = getLeader();\n\tif (!leader) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0118edb5b6e5b604c30d04fed231d02ea4edbcc4b91e55a3aa7eacc44dcaf8ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 619, + "startColumn": 6, + "charOffset": 17493, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 617, + "startColumn": 6, + "charOffset": 17395, + "charLength": 1, + "snippet": { + "text": "void Party::updatePlayerStatus(std::shared_ptr player) {\n\tauto leader = getLeader();\n\tif (!leader) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "206c5daf3e5fb7b5c0bd67c4993d55901aaa137ecd05608f241237b30779f10f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 624, + "startColumn": 2, + "charOffset": 17610, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 622, + "startColumn": 2, + "charOffset": 17517, + "charLength": 3, + "snippet": { + "text": "\n\tint32_t maxDistance = g_configManager().getNumber(PARTY_LIST_MAX_DISTANCE, __FUNCTION__);\n\tfor (const auto &member : getMembers()) {\n\t\tbool condition = (maxDistance == 0 || (Position::getDistanceX(player->getPosition(), member->getPosition()) <= maxDistance && Position::getDistanceY(player->getPosition(), member->getPosition()) <= maxDistance));\n\t\tif (condition) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37ecc097503823bd05baaa05fc0b3877709fd0bdf18c962b1c182daa84f7afba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 640, + "startColumn": 56, + "charOffset": 18379, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 638, + "startColumn": 56, + "charOffset": 18321, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Party::updatePlayerStatus(std::shared_ptr player, const Position &oldPos, const Position &newPos) {\n\tauto leader = getLeader();\n\tif (!leader) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37d510e6eb912d3c50fcd9c4043a0db3a873b31a8747f475500cb1697e43aca5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 642, + "startColumn": 6, + "charOffset": 18470, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 640, + "startColumn": 6, + "charOffset": 18324, + "charLength": 1, + "snippet": { + "text": "void Party::updatePlayerStatus(std::shared_ptr player, const Position &oldPos, const Position &newPos) {\n\tauto leader = getLeader();\n\tif (!leader) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e07b92800d21448711da2ed7898c19309f67e0e5650311e5c1eb3c4bcaefc17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 648, + "startColumn": 3, + "charOffset": 18613, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 646, + "startColumn": 3, + "charOffset": 18495, + "charLength": 3, + "snippet": { + "text": "\tint32_t maxDistance = g_configManager().getNumber(PARTY_LIST_MAX_DISTANCE, __FUNCTION__);\n\tif (maxDistance != 0) {\n\t\tfor (const auto &member : getMembers()) {\n\t\t\tbool condition1 = (Position::getDistanceX(oldPos, member->getPosition()) <= maxDistance && Position::getDistanceY(oldPos, member->getPosition()) <= maxDistance);\n\t\t\tbool condition2 = (Position::getDistanceX(newPos, member->getPosition()) <= maxDistance && Position::getDistanceY(newPos, member->getPosition()) <= maxDistance);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08afe911a3a51f81742652a96e5c3c6a5159cca51a5df50daea969d10932dbbf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 651, + "startColumn": 4, + "charOffset": 18988, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 649, + "startColumn": 4, + "charOffset": 18655, + "charLength": 2, + "snippet": { + "text": "\t\t\tbool condition1 = (Position::getDistanceX(oldPos, member->getPosition()) <= maxDistance && Position::getDistanceY(oldPos, member->getPosition()) <= maxDistance);\n\t\t\tbool condition2 = (Position::getDistanceX(newPos, member->getPosition()) <= maxDistance && Position::getDistanceY(newPos, member->getPosition()) <= maxDistance);\n\t\t\tif (condition1 && !condition2) {\n\t\t\t\tshowPlayerStatus(player, member, false);\n\t\t\t} else if (!condition1 && condition2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4bf7b234709d82b67f2cd7c6a798789d0cae62f7b25d9c3044f4caa8856a159" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 660, + "startColumn": 3, + "charOffset": 19493, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 658, + "startColumn": 3, + "charOffset": 19163, + "charLength": 2, + "snippet": { + "text": "\t\tbool condition1 = (Position::getDistanceX(oldPos, leader->getPosition()) <= maxDistance && Position::getDistanceY(oldPos, leader->getPosition()) <= maxDistance);\n\t\tbool condition2 = (Position::getDistanceX(newPos, leader->getPosition()) <= maxDistance && Position::getDistanceY(newPos, leader->getPosition()) <= maxDistance);\n\t\tif (condition1 && !condition2) {\n\t\t\tshowPlayerStatus(player, leader, false);\n\t\t} else if (!condition1 && condition2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "995a2ebc3f309372ac7054fc527daf653e383e517defe778e0d4957c5932efce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 668, + "startColumn": 56, + "charOffset": 19720, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 666, + "startColumn": 56, + "charOffset": 19662, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Party::updatePlayerHealth(std::shared_ptr player, std::shared_ptr target, uint8_t healthPercent) {\n\tauto leader = getLeader();\n\tif (!leader) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b869088bdb80ee2abe75141e9e7554f97d9ad7b6224730ac5e56bdc9e6ebb149" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 668, + "startColumn": 90, + "charOffset": 19754, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 666, + "startColumn": 90, + "charOffset": 19662, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Party::updatePlayerHealth(std::shared_ptr player, std::shared_ptr target, uint8_t healthPercent) {\n\tauto leader = getLeader();\n\tif (!leader) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2a9cd882d8ac94bddad82965c9d738549173819506baed6d6655d4587a79b83" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 670, + "startColumn": 6, + "charOffset": 19820, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 668, + "startColumn": 6, + "charOffset": 19665, + "charLength": 1, + "snippet": { + "text": "void Party::updatePlayerHealth(std::shared_ptr player, std::shared_ptr target, uint8_t healthPercent) {\n\tauto leader = getLeader();\n\tif (!leader) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c13dbd90b5320e5ef30b1e3f712a998a8d2466c19a3cd89abb571c76927ced38" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 677, + "startColumn": 2, + "charOffset": 20029, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 675, + "startColumn": 2, + "charOffset": 19936, + "charLength": 3, + "snippet": { + "text": "\tauto playerPosition = player->getPosition();\n\tauto leaderPosition = leader->getPosition();\n\tfor (const auto &member : getMembers()) {\n\t\tauto memberPosition = member->getPosition();\n\t\tbool condition = (maxDistance == 0 || (Position::getDistanceX(playerPosition, memberPosition) <= maxDistance && Position::getDistanceY(playerPosition, memberPosition) <= maxDistance));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a06a66ff35acc6bab3da783794200704a1d78861f6334f04b6b84d5bd48c212" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 690, + "startColumn": 54, + "charOffset": 20711, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 688, + "startColumn": 54, + "charOffset": 20655, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Party::updatePlayerMana(std::shared_ptr player, uint8_t manaPercent) {\n\tauto leader = getLeader();\n\tif (!leader) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01e581d6b9f50c1a2aea36b2b633bbeae27371898bbb007270bba751673684a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 692, + "startColumn": 6, + "charOffset": 20775, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 690, + "startColumn": 6, + "charOffset": 20658, + "charLength": 1, + "snippet": { + "text": "void Party::updatePlayerMana(std::shared_ptr player, uint8_t manaPercent) {\n\tauto leader = getLeader();\n\tif (!leader) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2276481bbe182c42526d15193507fc5c9d1049310be8701712312bfdcb421359" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 697, + "startColumn": 2, + "charOffset": 20892, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 695, + "startColumn": 2, + "charOffset": 20799, + "charLength": 3, + "snippet": { + "text": "\n\tint32_t maxDistance = g_configManager().getNumber(PARTY_LIST_MAX_DISTANCE, __FUNCTION__);\n\tfor (const auto &member : getMembers()) {\n\t\tbool condition = (maxDistance == 0 || (Position::getDistanceX(player->getPosition(), member->getPosition()) <= maxDistance && Position::getDistanceY(player->getPosition(), member->getPosition()) <= maxDistance));\n\t\tif (condition) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d850df58e376f9229542392296e3d4bff3d8666df108846f9a5d02b552ea433b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 709, + "startColumn": 58, + "charOffset": 21575, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 707, + "startColumn": 58, + "charOffset": 21515, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Party::updatePlayerVocation(std::shared_ptr player) {\n\tauto leader = getLeader();\n\tif (!leader) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49f3e7ecb4662b3ef57ad016bceb6d1968dcfd4237e03b588ae0f80b8c3fb556" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 711, + "startColumn": 6, + "charOffset": 21618, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 709, + "startColumn": 6, + "charOffset": 21518, + "charLength": 1, + "snippet": { + "text": "void Party::updatePlayerVocation(std::shared_ptr player) {\n\tauto leader = getLeader();\n\tif (!leader) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "639be6f9699670506d81c40a9bad525bbc80d01c8b179ec8441c7a7c9e2a519e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 716, + "startColumn": 2, + "charOffset": 21735, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 714, + "startColumn": 2, + "charOffset": 21642, + "charLength": 3, + "snippet": { + "text": "\n\tint32_t maxDistance = g_configManager().getNumber(PARTY_LIST_MAX_DISTANCE, __FUNCTION__);\n\tfor (const auto &member : getMembers()) {\n\t\tbool condition = (maxDistance == 0 || (Position::getDistanceX(player->getPosition(), member->getPosition()) <= maxDistance && Position::getDistanceY(player->getPosition(), member->getPosition()) <= maxDistance));\n\t\tif (condition) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d08dc6cf6ebae4c74347dc1b729298705686e207585d6beb3c7ffe8c431288b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 730, + "startColumn": 6, + "charOffset": 22414, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 728, + "startColumn": 6, + "charOffset": 22343, + "charLength": 1, + "snippet": { + "text": "void Party::updateTrackerAnalyzer() {\n\tauto leader = getLeader();\n\tif (!leader) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d16c7b56ea78d9f0fd49c4d0bdd32285d09be0b42176d4bb586a91ce555b422c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 734, + "startColumn": 2, + "charOffset": 22440, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 732, + "startColumn": 2, + "charOffset": 22435, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &member : getMembers()) {\n\t\tmember->updatePartyTrackerAnalyzer();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc80eef58f200e38ef27563edcc0ff9711a1c5a0e0989d3bba42c4a1c456baf1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 741, + "startColumn": 51, + "charOffset": 22618, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 739, + "startColumn": 51, + "charOffset": 22565, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Party::addPlayerLoot(std::shared_ptr player, std::shared_ptr item) {\n\tauto leader = getLeader();\n\tif (!leader) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15edd68db9cb24bece7550c9da94ba1e451c0844588b567948c3f60c15f2a01c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 741, + "startColumn": 81, + "charOffset": 22648, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 739, + "startColumn": 81, + "charOffset": 22565, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Party::addPlayerLoot(std::shared_ptr player, std::shared_ptr item) {\n\tauto leader = getLeader();\n\tif (!leader) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62dcbd7af74d571af0f616dc05456fd28664f2c078f6880858e3d44182fb86cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 743, + "startColumn": 6, + "charOffset": 22689, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 741, + "startColumn": 6, + "charOffset": 22568, + "charLength": 1, + "snippet": { + "text": "void Party::addPlayerLoot(std::shared_ptr player, std::shared_ptr item) {\n\tauto leader = getLeader();\n\tif (!leader) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "044de71a9ba423f9f849ee167e026d0723305cc2f974b2f494c0ad7ccfa86cae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 748, + "startColumn": 6, + "charOffset": 22789, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 746, + "startColumn": 6, + "charOffset": 22713, + "charLength": 1, + "snippet": { + "text": "\n\tauto playerAnalyzer = getPlayerPartyAnalyzerStruct(player->getID());\n\tif (!playerAnalyzer) {\n\t\tplayerAnalyzer = std::make_shared(player->getID(), player->getName());\n\t\tmembersData.push_back(playerAnalyzer);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "246fbf809273b7d40ba53f4d5560521b05e87f85f523eaaeef8e6acf5596ff32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 757, + "startColumn": 27, + "charOffset": 23164, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 755, + "startColumn": 27, + "charOffset": 23103, + "charLength": 6, + "snippet": { + "text": "\t\t(*it).second += count;\n\t} else {\n\t\tplayerAnalyzer->lootMap.insert({ item->getID(), count });\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e139fc74e358714a329954fc9e03e4fbab575c6c13168ecb124300c8e65b15f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 769, + "startColumn": 53, + "charOffset": 23557, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 767, + "startColumn": 53, + "charOffset": 23502, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Party::addPlayerSupply(std::shared_ptr player, std::shared_ptr item) {\n\tauto leader = getLeader();\n\tif (!leader) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "605a4d3db8d51638c39270425a406909ef145140ad1d451110ef1b557c19c340" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 769, + "startColumn": 83, + "charOffset": 23587, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 767, + "startColumn": 83, + "charOffset": 23502, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Party::addPlayerSupply(std::shared_ptr player, std::shared_ptr item) {\n\tauto leader = getLeader();\n\tif (!leader) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f79984e3285eae785d1564dc733d61544cd908ca151265589549510e42605d6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 771, + "startColumn": 6, + "charOffset": 23628, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 769, + "startColumn": 6, + "charOffset": 23505, + "charLength": 1, + "snippet": { + "text": "void Party::addPlayerSupply(std::shared_ptr player, std::shared_ptr item) {\n\tauto leader = getLeader();\n\tif (!leader) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dca2bf009932ba83d350d61cc377bbb9e88b2595efef3805abeffd6da0f6d5ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 776, + "startColumn": 6, + "charOffset": 23754, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 774, + "startColumn": 6, + "charOffset": 23652, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr playerAnalyzer = getPlayerPartyAnalyzerStruct(player->getID());\n\tif (!playerAnalyzer) {\n\t\tplayerAnalyzer = std::make_shared(player->getID(), player->getName());\n\t\tmembersData.push_back(playerAnalyzer);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9bfc4ab12134cffb2fe93b94937015e199a2879f24033eeef2e9e3e9d95a80ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 784, + "startColumn": 29, + "charOffset": 24068, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 782, + "startColumn": 29, + "charOffset": 24009, + "charLength": 6, + "snippet": { + "text": "\t\t(*it).second += 1;\n\t} else {\n\t\tplayerAnalyzer->supplyMap.insert({ item->getID(), 1 });\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c2832ed1c98435514b8a9dff1191db827e5bfb109c71e6a012c65befc1ce9821" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 796, + "startColumn": 53, + "charOffset": 24454, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 794, + "startColumn": 53, + "charOffset": 24399, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Party::addPlayerDamage(std::shared_ptr player, uint64_t amount) {\n\tauto playerAnalyzer = getPlayerPartyAnalyzerStruct(player->getID());\n\tif (!playerAnalyzer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a34a9bcc3ac84328e7470878774dd8db6599f9bdc67ac7a3ef01cf84429fd05c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 798, + "startColumn": 6, + "charOffset": 24556, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 796, + "startColumn": 6, + "charOffset": 24402, + "charLength": 1, + "snippet": { + "text": "void Party::addPlayerDamage(std::shared_ptr player, uint64_t amount) {\n\tauto playerAnalyzer = getPlayerPartyAnalyzerStruct(player->getID());\n\tif (!playerAnalyzer) {\n\t\tplayerAnalyzer = std::make_shared(player->getID(), player->getName());\n\t\tmembersData.push_back(playerAnalyzer);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c62270d596baed544139e495da5d654fd58f7daa8e29c188d0b4e389e2ff1b6e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 807, + "startColumn": 54, + "charOffset": 24825, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 805, + "startColumn": 54, + "charOffset": 24769, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Party::addPlayerHealing(std::shared_ptr player, uint64_t amount) {\n\tauto playerAnalyzer = getPlayerPartyAnalyzerStruct(player->getID());\n\tif (!playerAnalyzer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc4f9b90f9589ae0243e357190a93ab1964254a71c3c4d89e385a3f7f008c640" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 809, + "startColumn": 6, + "charOffset": 24927, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 807, + "startColumn": 6, + "charOffset": 24772, + "charLength": 1, + "snippet": { + "text": "void Party::addPlayerHealing(std::shared_ptr player, uint64_t amount) {\n\tauto playerAnalyzer = getPlayerPartyAnalyzerStruct(player->getID());\n\tif (!playerAnalyzer) {\n\t\tplayerAnalyzer = std::make_shared(player->getID(), player->getName());\n\t\tmembersData.push_back(playerAnalyzer);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ffdc416e65bd9db64c7d0598ccfbaa02f325c7f6b1b1eba125b2c25278124cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 820, + "startColumn": 6, + "charOffset": 25217, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 818, + "startColumn": 6, + "charOffset": 25144, + "charLength": 1, + "snippet": { + "text": "void Party::switchAnalyzerPriceType() {\n\tauto leader = getLeader();\n\tif (!leader) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fcf3d7556d06c84ef1d8f09afbe8b02f0271ae9b41649de98ccbb9ed3b3db34" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 830, + "startColumn": 16, + "charOffset": 25403, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 828, + "startColumn": 16, + "charOffset": 25357, + "charLength": 4, + "snippet": { + "text": "\nvoid Party::resetAnalyzer() {\n\ttrackerTime = time(nullptr);\n\tmembersData.clear();\n\tupdateTrackerAnalyzer();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ad17d224c4efe370fd206c32652e584cd9e7151daa5118fbe391c5994178944" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 837, + "startColumn": 6, + "charOffset": 25531, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 835, + "startColumn": 6, + "charOffset": 25469, + "charLength": 1, + "snippet": { + "text": "void Party::reloadPrices() {\n\tauto leader = getLeader();\n\tif (!leader) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3cadd239d31ddc3ca38114b212f3b9e67e13afc2d733fc8bc3a283dca276653a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 849, + "startColumn": 3, + "charOffset": 25845, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 847, + "startColumn": 3, + "charOffset": 25815, + "charLength": 3, + "snippet": { + "text": "\n\t\tanalyzer->lootPrice = 0;\n\t\tfor (const auto it : analyzer->lootMap) {\n\t\t\tanalyzer->lootPrice += leader->getItemCustomPrice(it.first) * it.second;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67b549bbffd4a1277734a7ebdedb27c46a9b6eb18585849fa28055b4e32b9f32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.cpp" + }, + "region": { + "startLine": 854, + "startColumn": 3, + "charOffset": 25999, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 852, + "startColumn": 3, + "charOffset": 25967, + "charLength": 3, + "snippet": { + "text": "\n\t\tanalyzer->supplyPrice = 0;\n\t\tfor (const auto it : analyzer->supplyMap) {\n\t\t\tanalyzer->supplyPrice += leader->getItemCustomPrice(it.first, true) * it.second;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ee9c5815b5bc5a82c73acf9a29f66d007fefc58e591904a4d30c4982f12ee32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'party.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "index": 1 + }, + "region": { + "startLine": 28, + "startColumn": 10, + "charOffset": 992, + "charLength": 20, + "snippet": { + "text": "\"grouping/party.hpp\"" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 10, + "charOffset": 883, + "charLength": 20, + "snippet": { + "text": "#include \"creatures/appearance/mounts/mounts.hpp\"\n#include \"creatures/appearance/outfit/outfit.hpp\"\n#include \"grouping/party.hpp\"\n#include \"server/network/protocol/protocolgame.hpp\"\n#include \"items/containers/rewards/reward.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "471f4fffb872ddab4fd2f2f330933708266310ee3f741faac9d93acc5f35f5eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'loadFromXml' has cognitive complexity of 185 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 18, + "charOffset": 778, + "charLength": 11, + "snippet": { + "text": "loadFromXml" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 18, + "charOffset": 758, + "charLength": 11, + "snippet": { + "text": "}\n\nbool Imbuements::loadFromXml(bool /* reloading */) {\n\tpugi::xml_document doc;\n\tauto folder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + \"/XML/imbuements.xml\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37b1d70d02e6aa44a2713ceeaaf1b81d7abe822638938990d410695c7990c25a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 32, + "startColumn": 6, + "charOffset": 1006, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 6, + "charOffset": 839, + "charLength": 1, + "snippet": { + "text": "\tauto folder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + \"/XML/imbuements.xml\";\n\tpugi::xml_parse_result result = doc.load_file(folder.c_str());\n\tif (!result) {\n\t\tprintXMLError(__FUNCTION__, folder, result);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3546ad1982121fa8472574ff1961d5f0ba210da013b8a7d60fa2c9d7327b32aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 3, + "charOffset": 1210, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 3, + "charOffset": 1160, + "charLength": 2, + "snippet": { + "text": "\t\tpugi::xml_attribute attr;\n\t\t// Base for imbue\n\t\tif (strcasecmp(baseNode.name(), \"base\") == 0) {\n\t\t\tpugi::xml_attribute id = baseNode.attribute(\"id\");\n\t\t\tif (!id) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f98e7598f0a90af78f9f6fa9d3cb92cd3e80c80b06b3860e9f7664ed7e9398a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 8, + "charOffset": 1319, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 8, + "charOffset": 1208, + "charLength": 1, + "snippet": { + "text": "\t\tif (strcasecmp(baseNode.name(), \"base\") == 0) {\n\t\t\tpugi::xml_attribute id = baseNode.attribute(\"id\");\n\t\t\tif (!id) {\n\t\t\t\tg_logger().warn(\"Missing id for base entry\");\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16c452ee15b0048446e4c0c7f52a608a126b4b5ca8b93909c633bad5b9226514" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 47, + "startColumn": 19, + "charOffset": 1413, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 45, + "startColumn": 19, + "charOffset": 1376, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbasesImbuement.emplace_back(\n\t\t\t\tpugi::cast(id.value()),\n\t\t\t\tbaseNode.attribute(\"name\").as_string()," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9677dfda022100d0b8aae00cb372d1928097c07219d6b9113a70c4e250ab232" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 60, + "startColumn": 8, + "charOffset": 1993, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 8, + "charOffset": 1871, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (strcasecmp(baseNode.name(), \"category\") == 0) {\n\t\t\tpugi::xml_attribute id = baseNode.attribute(\"id\");\n\t\t\tif (!id) {\n\t\t\t\tg_logger().warn(\"Missing id for category entry\");\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2f96305152bd7efd943cd99223796f6fff819a47263945d7617a85287a8668e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 64, + "startColumn": 24, + "charOffset": 2096, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 62, + "startColumn": 24, + "charOffset": 2054, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tcategoriesImbuement.emplace_back(\n\t\t\t\tpugi::cast(id.value()),\n\t\t\t\tbaseNode.attribute(\"name\").as_string()," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e19f8cb8c13d376fb061490f284a77553a551324a1788c1d979dd538e7a7d9f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 8, + "charOffset": 2409, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 8, + "charOffset": 2328, + "charLength": 1, + "snippet": { + "text": "\t\t\t++runningid;\n\t\t\tpugi::xml_attribute base = baseNode.attribute(\"base\");\n\t\t\tif (!base) {\n\t\t\t\tg_logger().warn(\"Missing imbuement base id\");\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97687c8807b02fe548ccdbf0005263ff899fb5e1b2aa314f46cc48dcbc4ac39d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 79, + "startColumn": 22, + "charOffset": 2509, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 77, + "startColumn": 22, + "charOffset": 2482, + "charLength": 4, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tuint16_t baseid = pugi::cast(base.value());\n\t\t\tauto groupBase = getBaseByID(baseid);\n\t\t\tif (groupBase == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87e10e52f7b0ac2020a832eccca651c39d43d22b4adaaee39296b8c0feb7d190" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto groupBase' can be declared as 'auto *groupBase'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 80, + "startColumn": 4, + "charOffset": 2548, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 78, + "startColumn": 4, + "charOffset": 2487, + "charLength": 4, + "snippet": { + "text": "\n\t\t\tuint16_t baseid = pugi::cast(base.value());\n\t\t\tauto groupBase = getBaseByID(baseid);\n\t\t\tif (groupBase == nullptr) {\n\t\t\t\tg_logger().warn(\"Group base '{}' not exist\", baseid);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a08afbe29b54d95fd938f9012d2de8a498912dd23a8e15e3dd3f4d0289b0703" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 96, + "startColumn": 8, + "charOffset": 3091, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 8, + "charOffset": 3019, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tpugi::xml_attribute iconBase = baseNode.attribute(\"iconid\");\n\t\t\tif (!iconBase) {\n\t\t\t\tg_logger().warn(\"Missing 'iconid' for imbuement entry\");\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c194ac5bfe2d24e5fa88cf927a85a2655f2715174a4f7a8ddfb63a5939f20c85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 107, + "startColumn": 8, + "charOffset": 3493, + "charLength": 11, + "snippet": { + "text": "premiumBase" + } + }, + "contextRegion": { + "startLine": 105, + "startColumn": 8, + "charOffset": 3417, + "charLength": 11, + "snippet": { + "text": "\n\t\t\tpugi::xml_attribute premiumBase = baseNode.attribute(\"premium\");\n\t\t\tif (premiumBase) {\n\t\t\t\timbuement.premium = premiumBase.as_bool();\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bfcd45a9c8d06a4274a52880bf78612a820ab3facfdb56d79e6b35148e2ae4b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 107, + "startColumn": 8, + "charOffset": 3493, + "charLength": 11, + "snippet": { + "text": "premiumBase" + } + }, + "contextRegion": { + "startLine": 105, + "startColumn": 8, + "charOffset": 3417, + "charLength": 11, + "snippet": { + "text": "\n\t\t\tpugi::xml_attribute premiumBase = baseNode.attribute(\"premium\");\n\t\t\tif (premiumBase) {\n\t\t\t\timbuement.premium = premiumBase.as_bool();\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0993e9b9aba8e4a13dc6506d683a83b3d653acf06ce4bd79a43efc066dd8221" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 116, + "startColumn": 8, + "charOffset": 3785, + "charLength": 12, + "snippet": { + "text": "subgroupBase" + } + }, + "contextRegion": { + "startLine": 114, + "startColumn": 8, + "charOffset": 3707, + "charLength": 12, + "snippet": { + "text": "\n\t\t\tpugi::xml_attribute subgroupBase = baseNode.attribute(\"subgroup\");\n\t\t\tif (subgroupBase) {\n\t\t\t\timbuement.subgroup = subgroupBase.as_string();\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5418e869cb223af943b735b2285a7e12eaaf4fd4169b7ad7b750bbc72e991e6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 116, + "startColumn": 8, + "charOffset": 3785, + "charLength": 12, + "snippet": { + "text": "subgroupBase" + } + }, + "contextRegion": { + "startLine": 114, + "startColumn": 8, + "charOffset": 3707, + "charLength": 12, + "snippet": { + "text": "\n\t\t\tpugi::xml_attribute subgroupBase = baseNode.attribute(\"subgroup\");\n\t\t\tif (subgroupBase) {\n\t\t\t\timbuement.subgroup = subgroupBase.as_string();\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "703d154847e4287af582d4366157ac873bc9846fee4cab068df095030303c06b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 121, + "startColumn": 8, + "charOffset": 3935, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 119, + "startColumn": 8, + "charOffset": 3857, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tpugi::xml_attribute categorybase = baseNode.attribute(\"category\");\n\t\t\tif (!categorybase) {\n\t\t\t\tg_logger().warn(\"Missing imbuement category\");\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "090d4710241d02340fc84c486afe82b0b7dd3a926b7f2cc6f011995a87c41827" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 126, + "startColumn": 4, + "charOffset": 4026, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 124, + "startColumn": 4, + "charOffset": 4017, + "charLength": 8, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tuint16_t category = pugi::cast(categorybase.value());\n\t\t\tauto category_p = getCategoryByID(category);\n\t\t\tif (category_p == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1373ec72dfb46971869dc1f5b7fac4c89622b17268673a861ddafd17cc11491" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto category_p' can be declared as 'auto *category_p'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 127, + "startColumn": 4, + "charOffset": 4093, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 125, + "startColumn": 4, + "charOffset": 4022, + "charLength": 4, + "snippet": { + "text": "\n\t\t\tuint16_t category = pugi::cast(categorybase.value());\n\t\t\tauto category_p = getCategoryByID(category);\n\t\t\tif (category_p == nullptr) {\n\t\t\t\tg_logger().warn(\"Category imbuement {} not exist\", category);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29aea58990cb411474c93b6fc73fc6b31ea43f0c75cface88a5bf18bf1442bb0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 136, + "startColumn": 8, + "charOffset": 4360, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 8, + "charOffset": 4290, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tpugi::xml_attribute nameBase = baseNode.attribute(\"name\");\n\t\t\tif (!nameBase) {\n\t\t\t\tg_logger().warn(\"Missing imbuement name\");\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af63952cd23e59cdb8f71b3093469c0da7ef15cc1ba185382c506fc630b3b25e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 142, + "startColumn": 4, + "charOffset": 4481, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 140, + "startColumn": 4, + "charOffset": 4439, + "charLength": 3, + "snippet": { + "text": "\t\t\timbuement.name = nameBase.value();\n\n\t\t\tfor (auto childNode : baseNode.children()) {\n\t\t\t\tif (!(attr = childNode.attribute(\"key\"))) {\n\t\t\t\t\tg_logger().warn(\"Missing key attribute in imbuement id: {}\", runningid);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0410ef89c9c8acf8fab0eb2e9f362a26fa2a956bbbae1757390a409b373d7f06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 143, + "startColumn": 9, + "charOffset": 4534, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 141, + "startColumn": 9, + "charOffset": 4477, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tfor (auto childNode : baseNode.children()) {\n\t\t\t\tif (!(attr = childNode.attribute(\"key\"))) {\n\t\t\t\t\tg_logger().warn(\"Missing key attribute in imbuement id: {}\", runningid);\n\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86966c6592046b92a29d9a7e52f450557b4f5083b417e03a03eb93003837567f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 143, + "startColumn": 16, + "charOffset": 4541, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 141, + "startColumn": 16, + "charOffset": 4477, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tfor (auto childNode : baseNode.children()) {\n\t\t\t\tif (!(attr = childNode.attribute(\"key\"))) {\n\t\t\t\t\tg_logger().warn(\"Missing key attribute in imbuement id: {}\", runningid);\n\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "262151f77ada82a4b5d3b8b3fac2f7ed6e14aa90415385e36b540f926681d2ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 149, + "startColumn": 5, + "charOffset": 4719, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 147, + "startColumn": 5, + "charOffset": 4673, + "charLength": 2, + "snippet": { + "text": "\n\t\t\t\tstd::string type = attr.as_string();\n\t\t\t\tif (strcasecmp(type.c_str(), \"item\") == 0) {\n\t\t\t\t\tif (!(attr = childNode.attribute(\"value\"))) {\n\t\t\t\t\t\tg_logger().warn(\"Missing item ID for imbuement name '{}'\", imbuement.name);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7989e802e092d3ece26fd5456ce03ce3377a9cde65640fb223d929f009c4283f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 150, + "startColumn": 10, + "charOffset": 4773, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 148, + "startColumn": 10, + "charOffset": 4674, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tstd::string type = attr.as_string();\n\t\t\t\tif (strcasecmp(type.c_str(), \"item\") == 0) {\n\t\t\t\t\tif (!(attr = childNode.attribute(\"value\"))) {\n\t\t\t\t\t\tg_logger().warn(\"Missing item ID for imbuement name '{}'\", imbuement.name);\n\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08a5deec2f0ac8b66844ded95d9e2a86c9d8cd9a7eae4e3dbed6e13d4764cce1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 150, + "startColumn": 17, + "charOffset": 4780, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 148, + "startColumn": 17, + "charOffset": 4674, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tstd::string type = attr.as_string();\n\t\t\t\tif (strcasecmp(type.c_str(), \"item\") == 0) {\n\t\t\t\t\tif (!(attr = childNode.attribute(\"value\"))) {\n\t\t\t\t\t\tg_logger().warn(\"Missing item ID for imbuement name '{}'\", imbuement.name);\n\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39c38cf2956a5f01b0c73cb7fc309aaeb6bee9d787dbc4ac5bf61997a9ad0ff9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 154, + "startColumn": 6, + "charOffset": 4925, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 6, + "charOffset": 4897, + "charLength": 8, + "snippet": { + "text": "\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tuint16_t sourceId = pugi::cast(attr.value());\n\n\t\t\t\t\tuint16_t count = 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae5781ebfe25f471ced3059aadae07d0836ed60c6296dae8eed9510bf5637810" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 10, + "charOffset": 5016, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 10, + "charOffset": 4981, + "charLength": 1, + "snippet": { + "text": "\n\t\t\t\t\tuint16_t count = 1;\n\t\t\t\t\tif ((attr = childNode.attribute(\"count\"))) {\n\t\t\t\t\t\tcount = pugi::cast(childNode.attribute(\"count\").value());\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc2e7737d715f0dd3b34d8aa5c4cf9a8a189cbe5b04065b6de6b2529aae7b3fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 10, + "charOffset": 5016, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 10, + "charOffset": 4981, + "charLength": 1, + "snippet": { + "text": "\n\t\t\t\t\tuint16_t count = 1;\n\t\t\t\t\tif ((attr = childNode.attribute(\"count\"))) {\n\t\t\t\t\t\tcount = pugi::cast(childNode.attribute(\"count\").value());\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "728a96a602ebbe47d14f3d5d30b3f06ed9c18a97ce23a3cb2c5dac5be221b52e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 16, + "charOffset": 5022, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 16, + "charOffset": 4981, + "charLength": 1, + "snippet": { + "text": "\n\t\t\t\t\tuint16_t count = 1;\n\t\t\t\t\tif ((attr = childNode.attribute(\"count\"))) {\n\t\t\t\t\t\tcount = pugi::cast(childNode.attribute(\"count\").value());\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71621a1180901726a3296c4f2aa93c3886fe661e3f08da513a3b0fe2dc92fb09" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 170, + "startColumn": 22, + "charOffset": 5543, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 168, + "startColumn": 22, + "charOffset": 5514, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t\t}\n\n\t\t\t\t\timbuement.items.emplace_back(sourceId, count);\n\n\t\t\t\t} else if (strcasecmp(type.c_str(), \"description\") == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4858730022c1aa7db3c78892416b1965965fff7a0bcc74da3d94ed1d61be4a35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 174, + "startColumn": 10, + "charOffset": 5694, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 10, + "charOffset": 5575, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t} else if (strcasecmp(type.c_str(), \"description\") == 0) {\n\t\t\t\t\tstd::string description = imbuement.name;\n\t\t\t\t\tif ((attr = childNode.attribute(\"value\"))) {\n\t\t\t\t\t\tdescription = attr.as_string();\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "043b12efe97f233d6043a25f33dc48ca08a7b105caac400f5ca604ca81e8cb1c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 174, + "startColumn": 10, + "charOffset": 5694, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 10, + "charOffset": 5575, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t} else if (strcasecmp(type.c_str(), \"description\") == 0) {\n\t\t\t\t\tstd::string description = imbuement.name;\n\t\t\t\t\tif ((attr = childNode.attribute(\"value\"))) {\n\t\t\t\t\t\tdescription = attr.as_string();\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4bdd6005237e7ccbe87dc8b4fc3f993b9de9589f3d14f1d50e1f1a51ed3e5b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 174, + "startColumn": 16, + "charOffset": 5700, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 16, + "charOffset": 5575, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t} else if (strcasecmp(type.c_str(), \"description\") == 0) {\n\t\t\t\t\tstd::string description = imbuement.name;\n\t\t\t\t\tif ((attr = childNode.attribute(\"value\"))) {\n\t\t\t\t\t\tdescription = attr.as_string();\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb4ab64be7faa2ffd041ab0c5b79d062dc43884012372da6024be33b9a150861" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 181, + "startColumn": 10, + "charOffset": 5906, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 179, + "startColumn": 10, + "charOffset": 5823, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t} else if (strcasecmp(type.c_str(), \"effect\") == 0) {\n\t\t\t\t\t// Effects\n\t\t\t\t\tif (!(attr = childNode.attribute(\"type\"))) {\n\t\t\t\t\t\tg_logger().warn(\"Missing effect type for imbuement name: {}\", imbuement.name);\n\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4fde70848a5f1b5704420b4e64898a17c045a129d40dc4b2736040160642fb5c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 181, + "startColumn": 17, + "charOffset": 5913, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 179, + "startColumn": 17, + "charOffset": 5823, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t} else if (strcasecmp(type.c_str(), \"effect\") == 0) {\n\t\t\t\t\t// Effects\n\t\t\t\t\tif (!(attr = childNode.attribute(\"type\"))) {\n\t\t\t\t\t\tg_logger().warn(\"Missing effect type for imbuement name: {}\", imbuement.name);\n\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a347e3a035ae39e171c43da9644bbbab1430c70f968d327fbc5fcac0cbb5ff29" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 188, + "startColumn": 6, + "charOffset": 6110, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 186, + "startColumn": 6, + "charOffset": 6056, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tstd::string effecttype = attr.as_string();\n\n\t\t\t\t\tif (strcasecmp(effecttype.c_str(), \"skill\") == 0) {\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"value\"))) {\n\t\t\t\t\t\t\tg_logger().warn(\"Missing effect value for imbuement name {}\", imbuement.name);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ffb66a1055f4b563583edd8d336bb9d66de023e57df23e41fa10d6d7c95ad61b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 189, + "startColumn": 11, + "charOffset": 6172, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 187, + "startColumn": 11, + "charOffset": 6104, + "charLength": 1, + "snippet": { + "text": "\n\t\t\t\t\tif (strcasecmp(effecttype.c_str(), \"skill\") == 0) {\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"value\"))) {\n\t\t\t\t\t\t\tg_logger().warn(\"Missing effect value for imbuement name {}\", imbuement.name);\n\t\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa9d949dd61f99a6a6f7707cc20297f4296c657137777628f652ff35f1dbd821" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 189, + "startColumn": 18, + "charOffset": 6179, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 187, + "startColumn": 18, + "charOffset": 6104, + "charLength": 1, + "snippet": { + "text": "\n\t\t\t\t\tif (strcasecmp(effecttype.c_str(), \"skill\") == 0) {\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"value\"))) {\n\t\t\t\t\t\t\tg_logger().warn(\"Missing effect value for imbuement name {}\", imbuement.name);\n\t\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1814676436ecfb00f146debfe78ec160a2254033881c43768558d252bed6fa34" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'skillId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 196, + "startColumn": 15, + "charOffset": 6428, + "charLength": 7, + "snippet": { + "text": "skillId" + } + }, + "contextRegion": { + "startLine": 194, + "startColumn": 15, + "charOffset": 6326, + "charLength": 7, + "snippet": { + "text": "\t\t\t\t\t\tuint8_t usenormalskill = 1; // 1 = skill normal, 2 = magiclevel, 3 = leechs/crit\n\n\t\t\t\t\t\tuint8_t skillId;\n\t\t\t\t\t\tstd::string tmpStrValue = asLowerCaseString(attr.as_string());\n\t\t\t\t\t\tif (tmpStrValue == \"sword\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "926124bd959f985eecaeb099e903db11a317190f9c3523181fb73fb680d990e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 213, + "startColumn": 18, + "charOffset": 7106, + "charLength": 16, + "snippet": { + "text": "STAT_MAGICPOINTS" + } + }, + "contextRegion": { + "startLine": 211, + "startColumn": 18, + "charOffset": 7011, + "charLength": 16, + "snippet": { + "text": "\t\t\t\t\t\t\tskillId = SKILL_FIST;\n\t\t\t\t\t\t} else if (tmpStrValue == \"magicpoints\") {\n\t\t\t\t\t\t\tskillId = STAT_MAGICPOINTS;\n\t\t\t\t\t\t\tusenormalskill = 2;\n\t\t\t\t\t\t} else if (tmpStrValue == \"critical\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c8ab53ba4773a6383e41a9e321a4e994eba6964ab0cef3b66bc0137d4c4fe53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 229, + "startColumn": 11, + "charOffset": 7649, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 227, + "startColumn": 11, + "charOffset": 7630, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"bonus\"))) {\n\t\t\t\t\t\t\tg_logger().warn(\"Missing skill bonus for imbuement name {}\", imbuement.name);\n\t\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fada089ddf70aff0830b2676d2009840ffad40a882cddf009b0766dcda2e325" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 229, + "startColumn": 18, + "charOffset": 7656, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 227, + "startColumn": 18, + "charOffset": 7630, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"bonus\"))) {\n\t\t\t\t\t\t\tg_logger().warn(\"Missing skill bonus for imbuement name {}\", imbuement.name);\n\t\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a26670b814c8a3143af83932ac4b6de4b02b5d5255b475754a81107de8f7c288" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 233, + "startColumn": 7, + "charOffset": 7807, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 231, + "startColumn": 7, + "charOffset": 7776, + "charLength": 7, + "snippet": { + "text": "\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tint32_t bonus = pugi::cast(attr.value());\n\n\t\t\t\t\t\tif (usenormalskill == 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7e7c7bfcf23f1c8b9c212eb78659b1e3ebe244cfb59d084c18ca8c36b87ab5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 235, + "startColumn": 7, + "charOffset": 7865, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 233, + "startColumn": 7, + "charOffset": 7801, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\t\tint32_t bonus = pugi::cast(attr.value());\n\n\t\t\t\t\t\tif (usenormalskill == 1) {\n\t\t\t\t\t\t\timbuement.skills[skillId] = bonus;\n\t\t\t\t\t\t} else if (usenormalskill == 2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1f7ae9ef005567b23ff026374c18587f140565094e4b4249306afc251f71e6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 236, + "startColumn": 8, + "charOffset": 7899, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 234, + "startColumn": 8, + "charOffset": 7858, + "charLength": 9, + "snippet": { + "text": "\n\t\t\t\t\t\tif (usenormalskill == 1) {\n\t\t\t\t\t\t\timbuement.skills[skillId] = bonus;\n\t\t\t\t\t\t} else if (usenormalskill == 2) {\n\t\t\t\t\t\t\timbuement.stats[skillId] = bonus;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15a4c2d278e129696925fc14dc61075409bb5e321bf651bdc257fbe09665ebf6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 238, + "startColumn": 8, + "charOffset": 7981, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 236, + "startColumn": 8, + "charOffset": 7892, + "charLength": 9, + "snippet": { + "text": "\t\t\t\t\t\t\timbuement.skills[skillId] = bonus;\n\t\t\t\t\t\t} else if (usenormalskill == 2) {\n\t\t\t\t\t\t\timbuement.stats[skillId] = bonus;\n\t\t\t\t\t\t} else if (usenormalskill == 3) {\n\t\t\t\t\t\t\timbuement.skills[skillId] = bonus;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b2dfd259fc1fde4e29bf4a610038b13635fca2a493f254b2dd8536be71b6538" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 240, + "startColumn": 8, + "charOffset": 8062, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 238, + "startColumn": 8, + "charOffset": 7974, + "charLength": 9, + "snippet": { + "text": "\t\t\t\t\t\t\timbuement.stats[skillId] = bonus;\n\t\t\t\t\t\t} else if (usenormalskill == 3) {\n\t\t\t\t\t\t\timbuement.skills[skillId] = bonus;\n\t\t\t\t\t\t\tint32_t chance = 100;\n\t\t\t\t\t\t\tif ((attr = childNode.attribute(\"chance\"))) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e2f4fba24c6c1ce80ab69494129ff5eedb6b460ff7565065df92c6d2f19d4a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 241, + "startColumn": 25, + "charOffset": 8121, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 239, + "startColumn": 25, + "charOffset": 8015, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\t\t} else if (usenormalskill == 3) {\n\t\t\t\t\t\t\timbuement.skills[skillId] = bonus;\n\t\t\t\t\t\t\tint32_t chance = 100;\n\t\t\t\t\t\t\tif ((attr = childNode.attribute(\"chance\"))) {\n\t\t\t\t\t\t\t\tchance = std::min(10000, pugi::cast(attr.value()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e87ea1031a9244cc435b97a4cbd79470e2e9df0fb0d4d00cc08bef02926dc4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 12, + "charOffset": 8137, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 12, + "charOffset": 8055, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\t\t\timbuement.skills[skillId] = bonus;\n\t\t\t\t\t\t\tint32_t chance = 100;\n\t\t\t\t\t\t\tif ((attr = childNode.attribute(\"chance\"))) {\n\t\t\t\t\t\t\t\tchance = std::min(10000, pugi::cast(attr.value()));\n\t\t\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5418e869cb223af943b735b2285a7e12eaaf4fd4169b7ad7b750bbc72e991e6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 12, + "charOffset": 8137, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 12, + "charOffset": 8055, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\t\t\timbuement.skills[skillId] = bonus;\n\t\t\t\t\t\t\tint32_t chance = 100;\n\t\t\t\t\t\t\tif ((attr = childNode.attribute(\"chance\"))) {\n\t\t\t\t\t\t\t\tchance = std::min(10000, pugi::cast(attr.value()));\n\t\t\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "703d154847e4287af582d4366157ac873bc9846fee4cab068df095030303c06b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 18, + "charOffset": 8143, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 18, + "charOffset": 8055, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\t\t\timbuement.skills[skillId] = bonus;\n\t\t\t\t\t\t\tint32_t chance = 100;\n\t\t\t\t\t\t\tif ((attr = childNode.attribute(\"chance\"))) {\n\t\t\t\t\t\t\t\tchance = std::min(10000, pugi::cast(attr.value()));\n\t\t\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66bc436aa18a40042e7e5f52e9704c1e90ae70fcdef9bf15bb7857c76d0ff627" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 243, + "startColumn": 18, + "charOffset": 8196, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 18, + "charOffset": 8097, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\t\t\tint32_t chance = 100;\n\t\t\t\t\t\t\tif ((attr = childNode.attribute(\"chance\"))) {\n\t\t\t\t\t\t\t\tchance = std::min(10000, pugi::cast(attr.value()));\n\t\t\t\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "534badbe6d388563df9405f9156509ac0bea40d2e4b7bc7dd166d1a6d176489d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 243, + "startColumn": 37, + "charOffset": 8215, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 37, + "charOffset": 8097, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\t\t\tint32_t chance = 100;\n\t\t\t\t\t\t\tif ((attr = childNode.attribute(\"chance\"))) {\n\t\t\t\t\t\t\t\tchance = std::min(10000, pugi::cast(attr.value()));\n\t\t\t\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "607146cd65bc753d037d5914864780f23bdc415bce4e9f7f085ea0b0c9862dbf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 246, + "startColumn": 8, + "charOffset": 8275, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 244, + "startColumn": 8, + "charOffset": 8258, + "charLength": 9, + "snippet": { + "text": "\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\timbuement.skills[skillId - 1] = chance;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (strcasecmp(effecttype.c_str(), \"damage\") == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a4182f6bc4c0f4b7dfce0bfd871d6861d005833f4790eea76c365170a5d05ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 249, + "startColumn": 11, + "charOffset": 8398, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 247, + "startColumn": 11, + "charOffset": 8315, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\t\t}\n\t\t\t\t\t} else if (strcasecmp(effecttype.c_str(), \"damage\") == 0) {\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"combat\"))) {\n\t\t\t\t\t\t\tg_logger().warn(\"Missing combat for imbuement name {}\", imbuement.name);\n\t\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c60bbd80e687893c201a031b0a4eb4e10566fbda70f71d8b4b932a979323f5c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 249, + "startColumn": 18, + "charOffset": 8405, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 247, + "startColumn": 18, + "charOffset": 8315, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\t\t}\n\t\t\t\t\t} else if (strcasecmp(effecttype.c_str(), \"damage\") == 0) {\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"combat\"))) {\n\t\t\t\t\t\t\tg_logger().warn(\"Missing combat for imbuement name {}\", imbuement.name);\n\t\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1508fefa6ee308b9b31e38c0d0dcdbd920537c01da3dbcd2384c297ceb1feabf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 260, + "startColumn": 11, + "charOffset": 8773, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 258, + "startColumn": 11, + "charOffset": 8754, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"value\"))) {\n\t\t\t\t\t\t\tg_logger().warn(\"Missing damage reduction percentage for imbuement name {}\", imbuement.name);\n\t\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1dcd5815375a087e446da42a22dd25b9df10210c74c560dd38cd17c2ecd23b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 260, + "startColumn": 18, + "charOffset": 8780, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 258, + "startColumn": 18, + "charOffset": 8754, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"value\"))) {\n\t\t\t\t\t\t\tg_logger().warn(\"Missing damage reduction percentage for imbuement name {}\", imbuement.name);\n\t\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ae2a04839b4e1e5409e26f64fd94ccc1df488e623328ab4bb4243424fc954b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 265, + "startColumn": 45, + "charOffset": 8986, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 263, + "startColumn": 45, + "charOffset": 8933, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\t\t}\n\n\t\t\t\t\t\tuint32_t percent = std::min(100, pugi::cast(attr.value()));\n\n\t\t\t\t\t\timbuement.combatType = combatType;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc8df682a211ce4262b6840c04bc1075099a46dc72362420426fe4f92fcaedb4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 268, + "startColumn": 51, + "charOffset": 9120, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 266, + "startColumn": 51, + "charOffset": 9028, + "charLength": 3, + "snippet": { + "text": "\n\t\t\t\t\t\timbuement.combatType = combatType;\n\t\t\t\t\t\timbuement.elementDamage = std::min(100, percent);\n\t\t\t\t\t} else if (strcasecmp(effecttype.c_str(), \"reduction\") == 0) {\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"combat\"))) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "641c58629af984f5c0e71416b45bd17f6b24188eeb95a86fd3cb5ad142db4fd0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'short' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 268, + "startColumn": 56, + "charOffset": 9125, + "charLength": 7, + "snippet": { + "text": "percent" + } + }, + "contextRegion": { + "startLine": 266, + "startColumn": 56, + "charOffset": 9028, + "charLength": 7, + "snippet": { + "text": "\n\t\t\t\t\t\timbuement.combatType = combatType;\n\t\t\t\t\t\timbuement.elementDamage = std::min(100, percent);\n\t\t\t\t\t} else if (strcasecmp(effecttype.c_str(), \"reduction\") == 0) {\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"combat\"))) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07de5f108d1883e9aecc6419a33d506eaf6c8848aeacf1d0656c89aa5637b6fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 268, + "startColumn": 56, + "charOffset": 9125, + "charLength": 7, + "snippet": { + "text": "percent" + } + }, + "contextRegion": { + "startLine": 266, + "startColumn": 56, + "charOffset": 9028, + "charLength": 7, + "snippet": { + "text": "\n\t\t\t\t\t\timbuement.combatType = combatType;\n\t\t\t\t\t\timbuement.elementDamage = std::min(100, percent);\n\t\t\t\t\t} else if (strcasecmp(effecttype.c_str(), \"reduction\") == 0) {\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"combat\"))) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4171909bee2b42f9025d2605de5e37b786da2a3997754fbbf4997444649cc930" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 270, + "startColumn": 11, + "charOffset": 9213, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 268, + "startColumn": 11, + "charOffset": 9070, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\t\timbuement.elementDamage = std::min(100, percent);\n\t\t\t\t\t} else if (strcasecmp(effecttype.c_str(), \"reduction\") == 0) {\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"combat\"))) {\n\t\t\t\t\t\t\tg_logger().warn(\"Missing combat for imbuement name {}\", imbuement.name);\n\t\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6cf4808f38992f08c40d0f9bb656b45aac4670601d18b057a793026bb62deef0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 270, + "startColumn": 18, + "charOffset": 9220, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 268, + "startColumn": 18, + "charOffset": 9070, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\t\timbuement.elementDamage = std::min(100, percent);\n\t\t\t\t\t} else if (strcasecmp(effecttype.c_str(), \"reduction\") == 0) {\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"combat\"))) {\n\t\t\t\t\t\t\tg_logger().warn(\"Missing combat for imbuement name {}\", imbuement.name);\n\t\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81cfa38cda8cae9509726daac7fc8e895c17c7a1dc5752a6184e592e4462bdff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 281, + "startColumn": 11, + "charOffset": 9588, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 279, + "startColumn": 11, + "charOffset": 9569, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"value\"))) {\n\t\t\t\t\t\t\tg_logger().warn(\"Missing damage reduction percentage for imbuement name {}\", imbuement.name);\n\t\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "feba9c0bf7732a1b7bf51de0612e6ef3c82574f400f1e8ca8c9e801bcecf1912" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 281, + "startColumn": 18, + "charOffset": 9595, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 279, + "startColumn": 18, + "charOffset": 9569, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"value\"))) {\n\t\t\t\t\t\t\tg_logger().warn(\"Missing damage reduction percentage for imbuement name {}\", imbuement.name);\n\t\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c19bf751db3680f5a01227a1141821490b400f0d4e76b9c89ddee43d5cd8662" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 286, + "startColumn": 45, + "charOffset": 9801, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 284, + "startColumn": 45, + "charOffset": 9748, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\t\t}\n\n\t\t\t\t\t\tuint32_t percent = std::min(100, pugi::cast(attr.value()));\n\n\t\t\t\t\t\timbuement.absorbPercent[combatTypeToIndex(combatType)] = percent;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a038322fa840b3dc3a3eb475b23272a87c1d4355bf70fcf5f58c79d6a5bd336e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 288, + "startColumn": 7, + "charOffset": 9850, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 286, + "startColumn": 7, + "charOffset": 9757, + "charLength": 9, + "snippet": { + "text": "\t\t\t\t\t\tuint32_t percent = std::min(100, pugi::cast(attr.value()));\n\n\t\t\t\t\t\timbuement.absorbPercent[combatTypeToIndex(combatType)] = percent;\n\t\t\t\t\t} else if (strcasecmp(effecttype.c_str(), \"speed\") == 0) {\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"value\"))) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f925be9895e8ca6af6dc55eafd9874b5551d2567ef0753001dd85c399ae061e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 288, + "startColumn": 64, + "charOffset": 9907, + "charLength": 7, + "snippet": { + "text": "percent" + } + }, + "contextRegion": { + "startLine": 286, + "startColumn": 64, + "charOffset": 9757, + "charLength": 7, + "snippet": { + "text": "\t\t\t\t\t\tuint32_t percent = std::min(100, pugi::cast(attr.value()));\n\n\t\t\t\t\t\timbuement.absorbPercent[combatTypeToIndex(combatType)] = percent;\n\t\t\t\t\t} else if (strcasecmp(effecttype.c_str(), \"speed\") == 0) {\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"value\"))) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10e71c445c3360939f177024014e3f9919cc2c889e9d548287b57b8ffb35fe04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 288, + "startColumn": 64, + "charOffset": 9907, + "charLength": 7, + "snippet": { + "text": "percent" + } + }, + "contextRegion": { + "startLine": 286, + "startColumn": 64, + "charOffset": 9757, + "charLength": 7, + "snippet": { + "text": "\t\t\t\t\t\tuint32_t percent = std::min(100, pugi::cast(attr.value()));\n\n\t\t\t\t\t\timbuement.absorbPercent[combatTypeToIndex(combatType)] = percent;\n\t\t\t\t\t} else if (strcasecmp(effecttype.c_str(), \"speed\") == 0) {\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"value\"))) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a1871971e3deeedfd241270844e258c77e6a40de7ca9278f35dcd5572ef3a38" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 290, + "startColumn": 11, + "charOffset": 9990, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 288, + "startColumn": 11, + "charOffset": 9844, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\t\timbuement.absorbPercent[combatTypeToIndex(combatType)] = percent;\n\t\t\t\t\t} else if (strcasecmp(effecttype.c_str(), \"speed\") == 0) {\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"value\"))) {\n\t\t\t\t\t\t\tg_logger().warn(\"Missing speed value for imbuement name {}\", imbuement.name);\n\t\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61171a3a6106e4a7f4e40253481588ff32be20dbb01fba741e0bb704e8fa7a8b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 290, + "startColumn": 18, + "charOffset": 9997, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 288, + "startColumn": 18, + "charOffset": 9844, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\t\timbuement.absorbPercent[combatTypeToIndex(combatType)] = percent;\n\t\t\t\t\t} else if (strcasecmp(effecttype.c_str(), \"speed\") == 0) {\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"value\"))) {\n\t\t\t\t\t\t\tg_logger().warn(\"Missing speed value for imbuement name {}\", imbuement.name);\n\t\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "905faa9c269ea27c58664bf8649a439e87110b17f711f28523cfae1e0ab97c28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 295, + "startColumn": 25, + "charOffset": 10167, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 293, + "startColumn": 25, + "charOffset": 10134, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\t\t}\n\n\t\t\t\t\t\timbuement.speed = pugi::cast(attr.value());\n\t\t\t\t\t} else if (strcasecmp(effecttype.c_str(), \"capacity\") == 0) {\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"value\"))) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f4b7cb6c359770551e8a26abfa16e49bba5ff64160c66233000cd4f28b76a75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 297, + "startColumn": 11, + "charOffset": 10280, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 295, + "startColumn": 11, + "charOffset": 10143, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\t\timbuement.speed = pugi::cast(attr.value());\n\t\t\t\t\t} else if (strcasecmp(effecttype.c_str(), \"capacity\") == 0) {\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"value\"))) {\n\t\t\t\t\t\t\tg_logger().warn(\"Missing cap value for imbuement name {}\", imbuement.name);\n\t\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ffc0ecd0fafb52e97be236b29f6c5a898b566a3ee871bd8be58c57632c878ad5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 297, + "startColumn": 18, + "charOffset": 10287, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 295, + "startColumn": 18, + "charOffset": 10143, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\t\timbuement.speed = pugi::cast(attr.value());\n\t\t\t\t\t} else if (strcasecmp(effecttype.c_str(), \"capacity\") == 0) {\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"value\"))) {\n\t\t\t\t\t\t\tg_logger().warn(\"Missing cap value for imbuement name {}\", imbuement.name);\n\t\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e093c1cc159d24ded8c731d0d1afe5a2f9c84bf0c7e019c397f41ba6cc2a62f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 339, + "startColumn": 75, + "charOffset": 11427, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 337, + "startColumn": 75, + "charOffset": 11350, + "charLength": 6, + "snippet": { + "text": "}\n\nstd::vector Imbuements::getImbuements(std::shared_ptr player, std::shared_ptr item) {\n\tstd::vector imbuements;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e70918f79e40dc3e49190d59c6932429df850b83c134e1082e090142dda0d2db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 339, + "startColumn": 105, + "charOffset": 11457, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 337, + "startColumn": 105, + "charOffset": 11350, + "charLength": 4, + "snippet": { + "text": "}\n\nstd::vector Imbuements::getImbuements(std::shared_ptr player, std::shared_ptr item) {\n\tstd::vector imbuements;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f953f0829dab5d43df205679404c80ae15ccea77c480c36741996afe9125b4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 342, + "startColumn": 2, + "charOffset": 11504, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 340, + "startColumn": 2, + "charOffset": 11465, + "charLength": 3, + "snippet": { + "text": "\tstd::vector imbuements;\n\n\tfor (auto &[key, value] : imbuementMap) {\n\t\tImbuement* imbuement = &value;\n\t\tif (!imbuement) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf9c5842a944019f630f95ffee50464abf8c2d315a5768a4e2fefac621151a30" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 344, + "startColumn": 7, + "charOffset": 11585, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 342, + "startColumn": 7, + "charOffset": 11503, + "charLength": 1, + "snippet": { + "text": "\tfor (auto &[key, value] : imbuementMap) {\n\t\tImbuement* imbuement = &value;\n\t\tif (!imbuement) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9df382b69c236efe8e50d2010b558908973b90fb2c35bb5f69999216fd0cd531" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'Imbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 344, + "startColumn": 8, + "charOffset": 11586, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 342, + "startColumn": 8, + "charOffset": 11503, + "charLength": 9, + "snippet": { + "text": "\tfor (auto &[key, value] : imbuementMap) {\n\t\tImbuement* imbuement = &value;\n\t\tif (!imbuement) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d394ee58fdbed91865cbd3fa86210aa197236831872efaf83d63559da3ef982" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 349, + "startColumn": 7, + "charOffset": 11724, + "charLength": 15, + "snippet": { + "text": "g_configManager" + } + }, + "contextRegion": { + "startLine": 347, + "startColumn": 7, + "charOffset": 11616, + "charLength": 15, + "snippet": { + "text": "\n\t\t// Parse the storages for each imbuement in imbuements.xml and config.lua (enable/disable storage)\n\t\tif (g_configManager().getBoolean(TOGGLE_IMBUEMENT_SHRINE_STORAGE, __FUNCTION__)\n\t\t && imbuement->getStorage() != 0\n\t\t && player->getStorageValue(imbuement->getStorage() == -1)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea85b041316a9e677d458788c803acba419e2a8046d8a64fe36300e09d0badcd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 349, + "startColumn": 7, + "charOffset": 11724, + "charLength": 15, + "snippet": { + "text": "g_configManager" + } + }, + "contextRegion": { + "startLine": 347, + "startColumn": 7, + "charOffset": 11616, + "charLength": 15, + "snippet": { + "text": "\n\t\t// Parse the storages for each imbuement in imbuements.xml and config.lua (enable/disable storage)\n\t\tif (g_configManager().getBoolean(TOGGLE_IMBUEMENT_SHRINE_STORAGE, __FUNCTION__)\n\t\t && imbuement->getStorage() != 0\n\t\t && player->getStorageValue(imbuement->getStorage() == -1)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a143b803ad175c54c1af4858ad8d97e34d4c999454fe4341ea72ec6e199d3dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 351, + "startColumn": 10, + "charOffset": 11847, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 349, + "startColumn": 10, + "charOffset": 11718, + "charLength": 6, + "snippet": { + "text": "\t\tif (g_configManager().getBoolean(TOGGLE_IMBUEMENT_SHRINE_STORAGE, __FUNCTION__)\n\t\t && imbuement->getStorage() != 0\n\t\t && player->getStorageValue(imbuement->getStorage() == -1)\n\t\t && imbuement->getBaseID() >= 1 && imbuement->getBaseID() <= 3) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43ff6542ab461762d812ab706be6346d15f5184e51b30e7750e42e53b5f21547" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.cpp" + }, + "region": { + "startLine": 351, + "startColumn": 34, + "charOffset": 11871, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 349, + "startColumn": 34, + "charOffset": 11718, + "charLength": 9, + "snippet": { + "text": "\t\tif (g_configManager().getBoolean(TOGGLE_IMBUEMENT_SHRINE_STORAGE, __FUNCTION__)\n\t\t && imbuement->getStorage() != 0\n\t\t && player->getStorageValue(imbuement->getStorage() == -1)\n\t\t && imbuement->getBaseID() >= 1 && imbuement->getBaseID() <= 3) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "905db9247ccbfae1909e9172494e9bb97331c8350874d6f990daebc328c2030a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'imbuements.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "index": 1 + }, + "region": { + "startLine": 22, + "startColumn": 10, + "charOffset": 760, + "charLength": 27, + "snippet": { + "text": "\"imbuements/imbuements.hpp\"" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 10, + "charOffset": 690, + "charLength": 27, + "snippet": { + "text": "#include \"grouping/groups.hpp\"\n#include \"grouping/guild.hpp\"\n#include \"imbuements/imbuements.hpp\"\n#include \"items/containers/inbox/inbox.hpp\"\n#include \"io/ioguild.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f490ad18bd902fc99f04171cfd7d69c9079600246fb9f94ac010cfabddf36133" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/ban.cpp" + }, + "region": { + "startLine": 24, + "startColumn": 16, + "charOffset": 771, + "charLength": 7, + "snippet": { + "text": "emplace" + } + }, + "contextRegion": { + "startLine": 22, + "startColumn": 16, + "charOffset": 683, + "charLength": 7, + "snippet": { + "text": "\tauto it = ipConnectMap.find(clientIP);\n\tif (it == ipConnectMap.end()) {\n\t\tipConnectMap.emplace(clientIP, ConnectBlock(currentTime, 0, 1));\n\t\treturn true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e7025135c4055f2eee0352f424fded80e0b3cbc559ae39576ae7e253797cea6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "250 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/ban.cpp" + }, + "region": { + "startLine": 30, + "startColumn": 29, + "charOffset": 957, + "charLength": 3, + "snippet": { + "text": "250" + } + }, + "contextRegion": { + "startLine": 28, + "startColumn": 29, + "charOffset": 842, + "charLength": 3, + "snippet": { + "text": "\tConnectBlock &connectBlock = it->second;\n\tif (connectBlock.blockTime > currentTime) {\n\t\tconnectBlock.blockTime += 250;\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a21a69a5cda5f0cc587bb162e4e7f84deaa929425165ae150f912c252e521493" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to signed type 'int64_t' (aka 'long') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/ban.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 21, + "charOffset": 1002, + "charLength": 11, + "snippet": { + "text": "currentTime" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 21, + "charOffset": 978, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\tint64_t timeDiff = currentTime - connectBlock.lastAttempt;\n\tconnectBlock.lastAttempt = currentTime;\n\tif (timeDiff <= 5000) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f55ee001110e7696af06a60202559b7d5fbd8e16c8b7989613e84df74e5f4092" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/ban.cpp" + }, + "region": { + "startLine": 36, + "startColumn": 18, + "charOffset": 1100, + "charLength": 4, + "snippet": { + "text": "5000" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 18, + "charOffset": 982, + "charLength": 4, + "snippet": { + "text": "\tint64_t timeDiff = currentTime - connectBlock.lastAttempt;\n\tconnectBlock.lastAttempt = currentTime;\n\tif (timeDiff <= 5000) {\n\t\tif (++connectBlock.count > 5) {\n\t\t\tconnectBlock.count = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6a6116d93dcf8dcb02d473a00d88fdf147cae7259141e06bf4749ae791a5590" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/ban.cpp" + }, + "region": { + "startLine": 37, + "startColumn": 30, + "charOffset": 1137, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 35, + "startColumn": 30, + "charOffset": 1042, + "charLength": 1, + "snippet": { + "text": "\tconnectBlock.lastAttempt = currentTime;\n\tif (timeDiff <= 5000) {\n\t\tif (++connectBlock.count > 5) {\n\t\t\tconnectBlock.count = 0;\n\t\t\tif (timeDiff <= 500) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9db64328e8a65332f78d4002e84f445047873bafbc695b4de8d5f4fb7b38694" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "500 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/ban.cpp" + }, + "region": { + "startLine": 39, + "startColumn": 20, + "charOffset": 1188, + "charLength": 3, + "snippet": { + "text": "500" + } + }, + "contextRegion": { + "startLine": 37, + "startColumn": 20, + "charOffset": 1108, + "charLength": 3, + "snippet": { + "text": "\t\tif (++connectBlock.count > 5) {\n\t\t\tconnectBlock.count = 0;\n\t\t\tif (timeDiff <= 500) {\n\t\t\t\tconnectBlock.blockTime = currentTime + 3000;\n\t\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b03f7c9c6a581d6a19acfc190a776257d7ae990d599dc4fd2571bd19bbe4026" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "3000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/ban.cpp" + }, + "region": { + "startLine": 40, + "startColumn": 44, + "charOffset": 1238, + "charLength": 4, + "snippet": { + "text": "3000" + } + }, + "contextRegion": { + "startLine": 38, + "startColumn": 44, + "charOffset": 1142, + "charLength": 4, + "snippet": { + "text": "\t\t\tconnectBlock.count = 0;\n\t\t\tif (timeDiff <= 500) {\n\t\t\t\tconnectBlock.blockTime = currentTime + 3000;\n\t\t\t\treturn false;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aaa59091491d6a6e0ad0027cb2fb878156f17d73a9f1fc4423754061f98bfc1d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/ban.cpp" + }, + "region": { + "startLine": 57, + "startColumn": 6, + "charOffset": 1712, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 55, + "startColumn": 6, + "charOffset": 1655, + "charLength": 1, + "snippet": { + "text": "\n\tDBResult_ptr result = db.storeQuery(query.str());\n\tif (!result) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c44ae5b49bdb998da036dc2e2f4527902534a26f899ef9363e528ba20d86fd8f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/ban.cpp" + }, + "region": { + "startLine": 61, + "startColumn": 2, + "charOffset": 1744, + "charLength": 7, + "snippet": { + "text": "int64_t" + } + }, + "contextRegion": { + "startLine": 59, + "startColumn": 2, + "charOffset": 1739, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tint64_t expiresAt = result->getNumber(\"expires_at\");\n\tif (expiresAt != 0 && time(nullptr) > expiresAt) {\n\t\t// Move the ban to history if it has expired" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4c59cf94edd72683776ecf85a479379dd48a30e3a232f7c57b15c5aeb3c9e3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/ban.cpp" + }, + "region": { + "startLine": 62, + "startColumn": 24, + "charOffset": 1829, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 24, + "charOffset": 1742, + "charLength": 4, + "snippet": { + "text": "\n\tint64_t expiresAt = result->getNumber(\"expires_at\");\n\tif (expiresAt != 0 && time(nullptr) > expiresAt) {\n\t\t// Move the ban to history if it has expired\n\t\tquery.str(std::string());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d21b2b13802c0a40e2e5099dc18431827d127437b4f4c4005b5cbbfa67f767fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/ban.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 6, + "charOffset": 2983, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 6, + "charOffset": 2926, + "charLength": 1, + "snippet": { + "text": "\n\tDBResult_ptr result = db.storeQuery(query.str());\n\tif (!result) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e52c0a7792e3802f01483b73394aee3e2305e3c50299ec1f98430f3a598f8b4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/ban.cpp" + }, + "region": { + "startLine": 95, + "startColumn": 2, + "charOffset": 3015, + "charLength": 7, + "snippet": { + "text": "int64_t" + } + }, + "contextRegion": { + "startLine": 93, + "startColumn": 2, + "charOffset": 3010, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tint64_t expiresAt = result->getNumber(\"expires_at\");\n\tif (expiresAt != 0 && time(nullptr) > expiresAt) {\n\t\tquery.str(std::string());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12494026b08cb3ba3b2826643724e08bf982f27658b27255e6ea97d7556569a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/ban.cpp" + }, + "region": { + "startLine": 96, + "startColumn": 24, + "charOffset": 3100, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 24, + "charOffset": 3013, + "charLength": 4, + "snippet": { + "text": "\n\tint64_t expiresAt = result->getNumber(\"expires_at\");\n\tif (expiresAt != 0 && time(nullptr) > expiresAt) {\n\t\tquery.str(std::string());\n\t\tquery << \"DELETE FROM `ip_bans` WHERE `ip` = \" << clientIP;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e332766f699d78ae3ddcfd156e68ea803011ad15a45b955fa4511188d8b3edcc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-4-1", + "ruleIndex": 412, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-4-1: Dynamic heap memory allocation shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp" + }, + "region": { + "startLine": 24, + "startColumn": 7, + "charOffset": 757, + "charLength": 3, + "snippet": { + "text": "new" + } + }, + "contextRegion": { + "startLine": 22, + "startColumn": 7, + "charOffset": 721, + "charLength": 3, + "snippet": { + "text": "\nWaitingList::WaitingList() :\n\tinfo(new WaitListInfo) { }\n\nWaitingList &WaitingList::getInstance() {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "934d6def82918657c5c3071956c5043480628b19b9e446ee87b49d0bd43f2521" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 2, + "charOffset": 961, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 2, + "charOffset": 934, + "charLength": 5, + "snippet": { + "text": "\n\tauto it = list.begin();\n\twhile (it != list.end()) {\n\t\tauto timeout = static_cast(it->timeout);\n\t\tg_logger().warn(\"time: {}\", timeout - time);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1770ee01ef907a38b6982223fd3ab8cae6e9035ad1e57bc2e0c517012b7c15d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 9, + "charOffset": 968, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 9, + "charOffset": 934, + "charLength": 2, + "snippet": { + "text": "\n\tauto it = list.begin();\n\twhile (it != list.end()) {\n\t\tauto timeout = static_cast(it->timeout);\n\t\tg_logger().warn(\"time: {}\", timeout - time);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4319c32f399839ba5c005f86670951aa0663a9a4379ebd289aab3a635f19081e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 27, + "charOffset": 1144, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 27, + "charOffset": 1040, + "charLength": 5, + "snippet": { + "text": "\t\tg_logger().warn(\"time: {}\", timeout - time);\n\t\tif ((timeout - time) <= 0) {\n\t\t\tinfo->playerReferences.erase(it->playerGUID);\n\t\t\tit = list.erase(it);\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2fbf69105539417f90d9f0ae0a0b37ac9e3ca3f30bd62c3b72863e3f97f3a704" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getTimeout' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp" + }, + "region": { + "startLine": 46, + "startColumn": 26, + "charOffset": 1246, + "charLength": 10, + "snippet": { + "text": "getTimeout" + } + }, + "contextRegion": { + "startLine": 44, + "startColumn": 26, + "charOffset": 1218, + "charLength": 10, + "snippet": { + "text": "}\n\nstd::size_t WaitingList::getTimeout(std::size_t slot) {\n\treturn WaitingList::getTime(slot) + TIMEOUT_EXTRA;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e89c41a4acddbcae338ec3762711936b47eac993d36412b81465dada48f6bbf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp" + }, + "region": { + "startLine": 52, + "startColumn": 10, + "charOffset": 1424, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 50, + "startColumn": 10, + "charOffset": 1332, + "charLength": 1, + "snippet": { + "text": "std::size_t WaitingList::getTime(std::size_t slot) {\n\tif (slot < SLOT_LIMIT_ONE) {\n\t\treturn 5;\n\t} else if (slot < SLOT_LIMIT_TWO) {\n\t\treturn 10;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5aafbbfa673bd9938f9f0f5d83de8d359ae07a2c7ba37d0b71d1053da853a80c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp" + }, + "region": { + "startLine": 53, + "startColumn": 4, + "charOffset": 1430, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 4, + "charOffset": 1385, + "charLength": 4, + "snippet": { + "text": "\tif (slot < SLOT_LIMIT_ONE) {\n\t\treturn 5;\n\t} else if (slot < SLOT_LIMIT_TWO) {\n\t\treturn 10;\n\t} else if (slot < SLOT_LIMIT_THREE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bc427d7d42edd1c4f92ef7cc674b24cee06450e45ec26860f3985c3abfbbb2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp" + }, + "region": { + "startLine": 54, + "startColumn": 10, + "charOffset": 1473, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 52, + "startColumn": 10, + "charOffset": 1415, + "charLength": 2, + "snippet": { + "text": "\t\treturn 5;\n\t} else if (slot < SLOT_LIMIT_TWO) {\n\t\treturn 10;\n\t} else if (slot < SLOT_LIMIT_THREE) {\n\t\treturn 20;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a63cb92d5c1948a1936f11dc636ce251c44cf32e869bae6bab9eb348c0ffcf5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp" + }, + "region": { + "startLine": 56, + "startColumn": 10, + "charOffset": 1525, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 54, + "startColumn": 10, + "charOffset": 1464, + "charLength": 2, + "snippet": { + "text": "\t\treturn 10;\n\t} else if (slot < SLOT_LIMIT_THREE) {\n\t\treturn 20;\n\t} else if (slot < SLOT_LIMIT_FOUR) {\n\t\treturn 60;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba05fc8c9c457f2234a01624b42404e07ba6b442c209ab60b9f7a1086a2968dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp" + }, + "region": { + "startLine": 58, + "startColumn": 10, + "charOffset": 1576, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 56, + "startColumn": 10, + "charOffset": 1516, + "charLength": 2, + "snippet": { + "text": "\t\treturn 20;\n\t} else if (slot < SLOT_LIMIT_FOUR) {\n\t\treturn 60;\n\t} else {\n\t\treturn 120;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0d9132d892b9cb7578800ddefbc4f6aeb1ae06fc927763da6fe7abc3c633105" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "120 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp" + }, + "region": { + "startLine": 60, + "startColumn": 10, + "charOffset": 1599, + "charLength": 3, + "snippet": { + "text": "120" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 10, + "charOffset": 1567, + "charLength": 3, + "snippet": { + "text": "\t\treturn 60;\n\t} else {\n\t\treturn 120;\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0ef0d4c1e410b6eeaf114466be480ccc142c553086c424f904313dbf3cec5e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp" + }, + "region": { + "startLine": 64, + "startColumn": 55, + "charOffset": 1664, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 62, + "startColumn": 55, + "charOffset": 1607, + "charLength": 6, + "snippet": { + "text": "}\n\nbool WaitingList::clientLogin(std::shared_ptr player) {\n\tif (player->hasFlag(PlayerFlags_t::CanAlwaysLogin) || player->getAccountType() >= ACCOUNT_TYPE_GAMEMASTER) {\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb566d7acf38be89a69d1a01ed0dfe2c85218384b61823a3e0c63c0ddacca463" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp" + }, + "region": { + "startLine": 83, + "startColumn": 18, + "charOffset": 2353, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 81, + "startColumn": 18, + "charOffset": 2244, + "charLength": 5, + "snippet": { + "text": "\tif ((g_game().getPlayersOnline() + slot) <= maxPlayers) {\n\t\t// should be able to login now\n\t\tinfo->waitList.erase(it->second.first);\n\t\tinfo->playerReferences.erase(it);\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f37a9a5df99eac3d521e91426eacc2ca3e2a6069beb3af013406bdc609610fc7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp" + }, + "region": { + "startLine": 84, + "startColumn": 26, + "charOffset": 2403, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 26, + "charOffset": 2303, + "charLength": 5, + "snippet": { + "text": "\t\t// should be able to login now\n\t\tinfo->waitList.erase(it->second.first);\n\t\tinfo->playerReferences.erase(it);\n\t\treturn true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53d670879cbbc5ce655b8e1a4f2552bcbf9135ef9244b34ebd930aeb31754ebd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp" + }, + "region": { + "startLine": 90, + "startColumn": 59, + "charOffset": 2508, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 88, + "startColumn": 59, + "charOffset": 2447, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid WaitingList::addPlayerToList(std::shared_ptr player) {\n\tauto it = info->playerReferences.find(player->getGUID());\n\tif (it != info->playerReferences.end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "91e98f4b46d25901937df2338716e54c3ba0cd6be1af5e7d381e7f379710b786" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'slot' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp" + }, + "region": { + "startLine": 93, + "startColumn": 15, + "charOffset": 2634, + "charLength": 4, + "snippet": { + "text": "slot" + } + }, + "contextRegion": { + "startLine": 91, + "startColumn": 15, + "charOffset": 2518, + "charLength": 4, + "snippet": { + "text": "\tauto it = info->playerReferences.find(player->getGUID());\n\tif (it != info->playerReferences.end()) {\n\t\tstd::size_t slot;\n\t\tif (player->isPremium()) {\n\t\t\tslot = std::distance(info->priorityWaitList.begin(), it->second.first) + 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16b3b22e188c6e753e08fabcc5257118ee2ddd6cd19912bbbfbae74091d720e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp" + }, + "region": { + "startLine": 100, + "startColumn": 66, + "charOffset": 2959, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 98, + "startColumn": 66, + "charOffset": 2862, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t\tit->second.second = slot;\n\t\tit->second.first->timeout = OTSYS_TIME() + (getTimeout(slot) * 1000);\n\t} else {\n\t\tstd::size_t slot = info->priorityWaitList.size();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "467c6bbc381a1643045d2ad667f5e1ca79ac30ea4e593fcf020bd8b6c54025b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp" + }, + "region": { + "startLine": 104, + "startColumn": 27, + "charOffset": 3083, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 102, + "startColumn": 27, + "charOffset": 2976, + "charLength": 12, + "snippet": { + "text": "\t\tstd::size_t slot = info->priorityWaitList.size();\n\t\tif (player->isPremium()) {\n\t\t\tinfo->priorityWaitList.emplace_back(OTSYS_TIME() + (getTimeout(slot + 1) * 1000), player->getGUID());\n\t\t\tauto insertedIt = std::prev(info->priorityWaitList.end());\n\t\t\tinfo->playerReferences[player->getGUID()] = { insertedIt, slot + 1 };" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1756dcf3ede88cf9cf0102b85f115a8c6c3a6dd8a5bd5828ca4aac3087e640d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp" + }, + "region": { + "startLine": 104, + "startColumn": 79, + "charOffset": 3135, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 102, + "startColumn": 79, + "charOffset": 2976, + "charLength": 4, + "snippet": { + "text": "\t\tstd::size_t slot = info->priorityWaitList.size();\n\t\tif (player->isPremium()) {\n\t\t\tinfo->priorityWaitList.emplace_back(OTSYS_TIME() + (getTimeout(slot + 1) * 1000), player->getGUID());\n\t\t\tauto insertedIt = std::prev(info->priorityWaitList.end());\n\t\t\tinfo->playerReferences[player->getGUID()] = { insertedIt, slot + 1 };" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "123471ea8d400839a282be17a05478c23109710c056481209342b96178436639" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp" + }, + "region": { + "startLine": 109, + "startColumn": 19, + "charOffset": 3360, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 107, + "startColumn": 19, + "charOffset": 3297, + "charLength": 12, + "snippet": { + "text": "\t\t} else {\n\t\t\tslot += info->waitList.size();\n\t\t\tinfo->waitList.emplace_back(OTSYS_TIME() + (getTimeout(slot + 1) * 1000), player->getGUID());\n\t\t\tauto insertedIt = std::prev(info->waitList.end());\n\t\t\tinfo->playerReferences[player->getGUID()] = { insertedIt, slot + 1 };" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09790472201055be78d344ee9456503c533767b1b534f1475b5df73993215874" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp" + }, + "region": { + "startLine": 109, + "startColumn": 71, + "charOffset": 3412, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 107, + "startColumn": 71, + "charOffset": 3297, + "charLength": 4, + "snippet": { + "text": "\t\t} else {\n\t\t\tslot += info->waitList.size();\n\t\t\tinfo->waitList.emplace_back(OTSYS_TIME() + (getTimeout(slot + 1) * 1000), player->getGUID());\n\t\t\tauto insertedIt = std::prev(info->waitList.end());\n\t\t\tinfo->playerReferences[player->getGUID()] = { insertedIt, slot + 1 };" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55f75b57e500da93e0d4ef9846025d8bad4449ad1ce62baaa76661514d93ab27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp" + }, + "region": { + "startLine": 116, + "startColumn": 64, + "charOffset": 3639, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 114, + "startColumn": 64, + "charOffset": 3573, + "charLength": 6, + "snippet": { + "text": "}\n\nstd::size_t WaitingList::getClientSlot(std::shared_ptr player) {\n\tauto it = info->playerReferences.find(player->getGUID());\n\tif (it == info->playerReferences.end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae85ff0efd87b7bf29bdc0992f1767b13d9d930f4fd239c4c67ca03837763e3a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'slot' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/management/waitlist.cpp" + }, + "region": { + "startLine": 122, + "startColumn": 14, + "charOffset": 3780, + "charLength": 4, + "snippet": { + "text": "slot" + } + }, + "contextRegion": { + "startLine": 120, + "startColumn": 14, + "charOffset": 3763, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tstd::size_t slot;\n\tif (player->isPremium()) {\n\t\tslot = std::distance(info->priorityWaitList.begin(), it->second.first) + 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e2765e39295ae2665718a62c35a4f9bb737854514fb10e0e919106046d9a70c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/storages/storages.cpp" + }, + "region": { + "startLine": 21, + "startColumn": 6, + "charOffset": 702, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 19, + "startColumn": 6, + "charOffset": 632, + "charLength": 1, + "snippet": { + "text": "\tpugi::xml_parse_result result = doc.load_file(folder.c_str());\n\n\tif (!result) {\n\t\tg_logger().error(\"[{}] parsed with errors\", folder);\n\t\tg_logger().warn(\"Error description: {}\", result.description());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b66bdffc63a95f7366dad1b6de2f3b285584fe5fb4a35f099fd5fae8e1487892" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/storages/storages.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 3, + "charOffset": 1142, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 3, + "charOffset": 1088, + "charLength": 3, + "snippet": { + "text": "\t\tuint32_t end = range.attribute(\"end\").as_uint();\n\n\t\tfor (const auto &existingRange : ranges) {\n\t\t\tif ((start >= existingRange.first && start <= existingRange.second) || (end >= existingRange.first && end <= existingRange.second)) {\n\t\t\t\tg_logger().warn(\"[{}] Storage range from {} to {} conflicts with a previously defined range\", __func__, start, end);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd27a0218edbf1f7cca80988083d393ab012539216cde85f9573919792836872" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/storages/storages.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 10, + "charOffset": 1476, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 10, + "charOffset": 1462, + "charLength": 12, + "snippet": { + "text": "\t\t}\n\n\t\tranges.emplace_back(start, end);\n\n\t\tfor (pugi::xml_node storage : range.children(\"storage\")) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1080b26ef3435bd55ba63e5720ae486ec7c840b1c29a96a7d00ab5d9faa67fd7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/storages/storages.cpp" + }, + "region": { + "startLine": 47, + "startColumn": 4, + "charOffset": 1683, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 45, + "startColumn": 4, + "charOffset": 1625, + "charLength": 3, + "snippet": { + "text": "\t\t\tuint32_t key = storage.attribute(\"key\").as_uint();\n\n\t\t\tfor (char c : name) {\n\t\t\t\tif (std::isupper(c)) {\n\t\t\t\t\tg_logger().warn(\"[{}] Storage from storages.xml with name: {}, contains uppercase letters. Please use dot notation pattern\", __func__, name);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb7a828cb9a99fbaf3ba66fe6bce2d4e646d64a566c2bd59def5033b1854f44c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/storages/storages.cpp" + }, + "region": { + "startLine": 48, + "startColumn": 9, + "charOffset": 1713, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 9, + "charOffset": 1679, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tfor (char c : name) {\n\t\t\t\tif (std::isupper(c)) {\n\t\t\t\t\tg_logger().warn(\"[{}] Storage from storages.xml with name: {}, contains uppercase letters. Please use dot notation pattern\", __func__, name);\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4052ec818374ffa0131091022ea57603fa2e4240dd616637b9b5c4f878e199b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/storages/storages.cpp" + }, + "region": { + "startLine": 48, + "startColumn": 9, + "charOffset": 1713, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 9, + "charOffset": 1679, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tfor (char c : name) {\n\t\t\t\tif (std::isupper(c)) {\n\t\t\t\t\tg_logger().warn(\"[{}] Storage from storages.xml with name: {}, contains uppercase letters. Please use dot notation pattern\", __func__, name);\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80b9a503134f34b7d1d57e601399293d590bcb4bf9223a8f52c75f0cb1d64107" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.hpp" + }, + "region": { + "startLine": 13, + "startColumn": 10, + "charOffset": 429, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 11, + "startColumn": 10, + "charOffset": 384, + "charLength": 30, + "snippet": { + "text": "\n#include \"creatures/npcs/npcs.hpp\"\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"items/tile.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f69d6cfec9be0f6769310fd1d031cff4d88ef48385f012190be0fe563d15e4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.hpp", + "index": 1 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"creatures/monsters/monsters.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e45483e1912ecf8c717a48f913562d9a9cf501f9947625dad361d43acc28406" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.hpp", + "index": 2 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a2b3a997037594f8bab93e08d9b46935593069da5e9def3fec147ea485ffc36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 46, + "startColumn": 1, + "charOffset": 1735, + "charLength": 12, + "snippet": { + "text": "MuteCountMap" + } + }, + "contextRegion": { + "startLine": 44, + "startColumn": 1, + "charOffset": 1696, + "charLength": 12, + "snippet": { + "text": "#include \"enums/player_blessings.hpp\"\n\nMuteCountMap Player::muteCountMap;\n\nPlayer::Player(ProtocolGame_ptr p) :" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b57b53989100a86944b8bc1f140ee297bd038fc6d84e705442709d2f6e631708" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-member-init", + "ruleIndex": 510, + "kind": "fail", + "level": "warning", + "message": { + "text": "constructor does not initialize these fields: quickLootFilter" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 48, + "startColumn": 1, + "charOffset": 1771, + "charLength": 6, + "snippet": { + "text": "Player" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 1, + "charOffset": 1735, + "charLength": 6, + "snippet": { + "text": "MuteCountMap Player::muteCountMap;\n\nPlayer::Player(ProtocolGame_ptr p) :\n\tCreature(),\n\tlastPing(OTSYS_TIME())," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba64e60329b5dc042fee1deae63a02e8bd43f5cf9a58494f427f6421ee4d90c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-redundant-member-init", + "ruleIndex": 721, + "kind": "fail", + "level": "warning", + "message": { + "text": "initializer for base class 'Creature' is redundant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 49, + "startColumn": 2, + "charOffset": 1809, + "charLength": 8, + "snippet": { + "text": "Creature" + } + }, + "contextRegion": { + "startLine": 47, + "startColumn": 2, + "charOffset": 1770, + "charLength": 8, + "snippet": { + "text": "\nPlayer::Player(ProtocolGame_ptr p) :\n\tCreature(),\n\tlastPing(OTSYS_TIME()),\n\tlastPong(lastPing)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4e5902d5a4ef7cc3b9b132090907cf34cc10818a1e55a46474152410b0d333e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 63, + "startColumn": 2, + "charOffset": 2308, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 2, + "charOffset": 2286, + "charLength": 3, + "snippet": { + "text": "\nPlayer::~Player() {\n\tfor (const std::shared_ptr &item : inventory) {\n\t\tif (item) {\n\t\t\titem->resetParent();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1c8d49ef00ec6462ae150d3cd781b6598b30e0a5a60822fa5f68414a38539f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 70, + "startColumn": 2, + "charOffset": 2434, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 2, + "charOffset": 2429, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &it : depotLockerMap) {\n\t\tit.second->removeInbox(inbox);\n\t\tit.second->stopDecaying();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86b74b135a3c8f808ce48d4838c331f4d386520aaf0361c6e7ba7d5854ace54c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 84, + "startColumn": 6, + "charOffset": 2734, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 6, + "charOffset": 2633, + "charLength": 1, + "snippet": { + "text": "bool Player::setVocation(uint16_t vocId) {\n\tconst auto &voc = g_vocations().getVocation(vocId);\n\tif (!voc) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "abe267184198005e6450a6769f2304a09809b4abf5f6f078c39c18a6347f1f98" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'context' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 101, + "startColumn": 105, + "charOffset": 3109, + "charLength": 7, + "snippet": { + "text": "context" + } + }, + "contextRegion": { + "startLine": 99, + "startColumn": 105, + "charOffset": 3002, + "charLength": 7, + "snippet": { + "text": "}\n\nstd::shared_ptr Player::createPlayerTask(uint32_t delay, std::function f, std::string context) {\n\treturn std::make_shared(std::move(f), std::move(context), delay);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5be8a12532ea50421c6bcadfd2e299b43e117965d27d28ac5801b5cfe4638a2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 105, + "startColumn": 34, + "charOffset": 3229, + "charLength": 10, + "snippet": { + "text": "0x10000000" + } + }, + "contextRegion": { + "startLine": 103, + "startColumn": 34, + "charOffset": 3193, + "charLength": 10, + "snippet": { + "text": "}\n\nuint32_t Player::playerFirstID = 0x10000000;\nuint32_t Player::playerLastID = 0x50000000;\nuint32_t Player::getFirstID() {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d179bd24185f1218d0309afade1a4056d6910824daf5a8bd9343c71340294cce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x10000000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 105, + "startColumn": 34, + "charOffset": 3229, + "charLength": 10, + "snippet": { + "text": "0x10000000" + } + }, + "contextRegion": { + "startLine": 103, + "startColumn": 34, + "charOffset": 3193, + "charLength": 10, + "snippet": { + "text": "}\n\nuint32_t Player::playerFirstID = 0x10000000;\nuint32_t Player::playerLastID = 0x50000000;\nuint32_t Player::getFirstID() {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a81116c7e2424e59850e1c9c00176de9b41be1bbd67992969950a65b29364468" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 106, + "startColumn": 33, + "charOffset": 3273, + "charLength": 10, + "snippet": { + "text": "0x50000000" + } + }, + "contextRegion": { + "startLine": 104, + "startColumn": 33, + "charOffset": 3195, + "charLength": 10, + "snippet": { + "text": "\nuint32_t Player::playerFirstID = 0x10000000;\nuint32_t Player::playerLastID = 0x50000000;\nuint32_t Player::getFirstID() {\n\treturn playerFirstID;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3ab470313d83f21ca25900b77606f8ac831f6698a5804233a489af255de5e7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x50000000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 106, + "startColumn": 33, + "charOffset": 3273, + "charLength": 10, + "snippet": { + "text": "0x50000000" + } + }, + "contextRegion": { + "startLine": 104, + "startColumn": 33, + "charOffset": 3195, + "charLength": 10, + "snippet": { + "text": "\nuint32_t Player::playerFirstID = 0x10000000;\nuint32_t Player::playerLastID = 0x50000000;\nuint32_t Player::getFirstID() {\n\treturn playerFirstID;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76e53b205eadc29ceab4e45ea73599f7d44668c94d1523e72b714c2fc8078cde" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'getDescription' has cognitive complexity of 47 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 124, + "startColumn": 21, + "charOffset": 3690, + "charLength": 14, + "snippet": { + "text": "getDescription" + } + }, + "contextRegion": { + "startLine": 122, + "startColumn": 21, + "charOffset": 3667, + "charLength": 14, + "snippet": { + "text": "}\n\nstd::string Player::getDescription(int32_t lookDistance) {\n\tstd::ostringstream s;\n\tstd::string subjectPronoun = getSubjectPronoun();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95e55512c2e493c46b1af1bc8744a1d0408525a0ce8397602ef0def89130bc3a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 201, + "startColumn": 22, + "charOffset": 5805, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 22, + "charOffset": 5709, + "charLength": 4, + "snippet": { + "text": "\tif (guild && guildRank) {\n\t\tsize_t memberCount = guild->getMemberCount();\n\t\tif (memberCount >= 1000) {\n\t\t\ts << \"\";\n\t\t\treturn s.str();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8032a4f721ea09259d0548ee151b2f3e8246ec1fd12a91cd0f53b96c9ecdb794" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 230, + "startColumn": 9, + "charOffset": 6529, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 228, + "startColumn": 9, + "charOffset": 6500, + "charLength": 9, + "snippet": { + "text": "\t\treturn nullptr;\n\t}\n\treturn inventory[slot];\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d5434cea77ce90bd282ad49ae5da59ea2c4d0a930be6615a5de31d8a9249e89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-unused-parameters", + "ruleIndex": 612, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'attackerPlayer' is unused" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 233, + "startColumn": 61, + "charOffset": 6609, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + } + }, + "contextRegion": { + "startLine": 231, + "startColumn": 61, + "charOffset": 6546, + "charLength": 14, + "snippet": { + "text": "}\n\nbool Player::isSuppress(ConditionType_t conditionType, bool attackerPlayer) const {\n\tauto minDelay = g_configManager().getNumber(MIN_DELAY_BETWEEN_CONDITIONS, __FUNCTION__);\n\tif (IsConditionSuppressible(conditionType) && checkLastConditionTimeWithin(conditionType, minDelay)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4bd87cd996aef9df2966cc6f259357f348fc7314859103699eed79ed79ad6fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 243, + "startColumn": 2, + "charOffset": 7043, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 2, + "charOffset": 6917, + "charLength": 3, + "snippet": { + "text": "\nvoid Player::addConditionSuppressions(const std::array &addConditions) {\n\tfor (const auto &conditionType : addConditions) {\n\t\tm_conditionSuppressions[static_cast(conditionType)] = true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c52df2f2872dd440c621792d45dd054a18d02994d6856af0eb3b34bbb8f5850" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-5", + "ruleIndex": 438, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-5: A cast shall not remove any const or volatile qualification from the type of a pointer or reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 244, + "startColumn": 27, + "charOffset": 7119, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 27, + "charOffset": 6918, + "charLength": 11, + "snippet": { + "text": "void Player::addConditionSuppressions(const std::array &addConditions) {\n\tfor (const auto &conditionType : addConditions) {\n\t\tm_conditionSuppressions[static_cast(conditionType)] = true;\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6f92f7a3fb0d3b86e2af9e28bcd6e196a7e22daed68daf1348962ff5679667f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 249, + "startColumn": 26, + "charOffset": 7239, + "charLength": 5, + "snippet": { + "text": "reset" + } + }, + "contextRegion": { + "startLine": 247, + "startColumn": 26, + "charOffset": 7168, + "charLength": 5, + "snippet": { + "text": "\nvoid Player::removeConditionSuppressions() {\n\tm_conditionSuppressions.reset();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "480cfc0b29dd63bfa8950de1feb65b33880219e0d8b4c085046ee6315618eed9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 253, + "startColumn": 31, + "charOffset": 7360, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 251, + "startColumn": 31, + "charOffset": 7250, + "charLength": 9, + "snippet": { + "text": "\nstd::shared_ptr Player::getWeapon(Slots_t slot, bool ignoreAmmo) const {\n\tstd::shared_ptr item = inventory[slot];\n\tif (!item) {\n\t\treturn nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "57edd16eb768d4b6280bf17204ef1130d7bb577f66affe6ed672e3f61118fca7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 254, + "startColumn": 6, + "charOffset": 7382, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 6, + "charOffset": 7251, + "charLength": 1, + "snippet": { + "text": "std::shared_ptr Player::getWeapon(Slots_t slot, bool ignoreAmmo) const {\n\tstd::shared_ptr item = inventory[slot];\n\tif (!item) {\n\t\treturn nullptr;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea22c0a29c3b9667f455d903675a9eafb72d1142d82c1937c9493258755c0967" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 289, + "startColumn": 2, + "charOffset": 8339, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 287, + "startColumn": 2, + "charOffset": 8276, + "charLength": 3, + "snippet": { + "text": "\n\tstd::shared_ptr quiver = inventory[CONST_SLOT_RIGHT];\n\tfor (std::shared_ptr container = quiver->getContainer();\n\t auto ammoItem : container->getItemList()) {\n\t\tif (ammoItem->getAmmoType() == it.ammoType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51a98cc219c0bf831f911933f8cb783a0cc0bdd1defdac07330abe54b62b106a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 315, + "startColumn": 6, + "charOffset": 8993, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 313, + "startColumn": 6, + "charOffset": 8900, + "charLength": 1, + "snippet": { + "text": "WeaponType_t Player::getWeaponType() const {\n\tstd::shared_ptr item = getWeapon();\n\tif (!item) {\n\t\treturn WEAPON_NONE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15e061d2f4284841c7f6e15f8c36c056b8bcc5263fd91a2b101750f2fd3d9584" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 321, + "startColumn": 54, + "charOffset": 9114, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 319, + "startColumn": 54, + "charOffset": 9058, + "charLength": 4, + "snippet": { + "text": "}\n\nint32_t Player::getWeaponSkill(std::shared_ptr item) const {\n\tif (!item) {\n\t\treturn getSkillLevel(SKILL_FIST);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb8f04aab626ed982944c63430ea0fd2c39612aaf0e431a7668a51a98c72fce3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 322, + "startColumn": 6, + "charOffset": 9133, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 320, + "startColumn": 6, + "charOffset": 9060, + "charLength": 1, + "snippet": { + "text": "\nint32_t Player::getWeaponSkill(std::shared_ptr item) const {\n\tif (!item) {\n\t\treturn getSkillLevel(SKILL_FIST);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de188f1f5201d59d409748603db8112e9ab503589a57904c0b27f99ddb2b8f09" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'attackSkill' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 326, + "startColumn": 10, + "charOffset": 9191, + "charLength": 11, + "snippet": { + "text": "attackSkill" + } + }, + "contextRegion": { + "startLine": 324, + "startColumn": 10, + "charOffset": 9178, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\tint32_t attackSkill;\n\n\tWeaponType_t weaponType = item->getWeaponType();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd596b65f40e8f9a9d3a7ff727f1728eb875cb7cf2b3182253b0167cadcd8009" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 346, + "startColumn": 3, + "charOffset": 9546, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 344, + "startColumn": 3, + "charOffset": 9520, + "charLength": 4, + "snippet": { + "text": "\n\t\tcase WEAPON_MISSILE:\n\t\tcase WEAPON_DISTANCE: {\n\t\t\tattackSkill = getSkillLevel(SKILL_DISTANCE);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46319d86f9961fc40c1f51a284d188e2b0373519b98b09c875b40b0eb68cd6bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-c-arrays", + "ruleIndex": 480, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not declare C-style arrays, use std::array<> instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 362, + "startColumn": 15, + "charOffset": 9777, + "charLength": 7, + "snippet": { + "text": "Slots_t" + } + }, + "contextRegion": { + "startLine": 360, + "startColumn": 15, + "charOffset": 9742, + "charLength": 7, + "snippet": { + "text": "\tint32_t armor = 0;\n\n\tstatic const Slots_t armorSlots[] = { CONST_SLOT_HEAD, CONST_SLOT_NECKLACE, CONST_SLOT_ARMOR, CONST_SLOT_LEGS, CONST_SLOT_FEET, CONST_SLOT_RING, CONST_SLOT_AMMO };\n\tfor (Slots_t slot : armorSlots) {\n\t\tstd::shared_ptr inventoryItem = inventory[slot];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "460c966b73cae138cc34c2390797ee2f7be3b6b4142c8af616f5679088eddd49" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 363, + "startColumn": 2, + "charOffset": 9929, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 361, + "startColumn": 2, + "charOffset": 9762, + "charLength": 3, + "snippet": { + "text": "\n\tstatic const Slots_t armorSlots[] = { CONST_SLOT_HEAD, CONST_SLOT_NECKLACE, CONST_SLOT_ARMOR, CONST_SLOT_LEGS, CONST_SLOT_FEET, CONST_SLOT_RING, CONST_SLOT_AMMO };\n\tfor (Slots_t slot : armorSlots) {\n\t\tstd::shared_ptr inventoryItem = inventory[slot];\n\t\tif (inventoryItem) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96f7b58dfc3007ee95c12297f8d9c4955299e6620661966d07a7eb679e307715" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 364, + "startColumn": 41, + "charOffset": 10003, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 362, + "startColumn": 41, + "charOffset": 9763, + "charLength": 9, + "snippet": { + "text": "\tstatic const Slots_t armorSlots[] = { CONST_SLOT_HEAD, CONST_SLOT_NECKLACE, CONST_SLOT_ARMOR, CONST_SLOT_LEGS, CONST_SLOT_FEET, CONST_SLOT_RING, CONST_SLOT_AMMO };\n\tfor (Slots_t slot : armorSlots) {\n\t\tstd::shared_ptr inventoryItem = inventory[slot];\n\t\tif (inventoryItem) {\n\t\t\tarmor += inventoryItem->getArmor();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ffa9abe8c59af15ca5dc7ddbb728fd3f3cee2de3e0c3cc987a55fc6e34d0aead" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 369, + "startColumn": 30, + "charOffset": 10118, + "charLength": 5, + "snippet": { + "text": "armor" + } + }, + "contextRegion": { + "startLine": 367, + "startColumn": 30, + "charOffset": 10082, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\t}\n\treturn static_cast(armor * vocation->armorMultiplier);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b633406246427a9bb14327af5ff572d6573e8c106aee6b356f5a880714e5dfc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 369, + "startColumn": 30, + "charOffset": 10118, + "charLength": 5, + "snippet": { + "text": "armor" + } + }, + "contextRegion": { + "startLine": 367, + "startColumn": 30, + "charOffset": 10082, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\t}\n\treturn static_cast(armor * vocation->armorMultiplier);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d7f2ee880eb5166f2820863bd8ce06d02fcdbcba61c8da806f0fe5be7fbc5fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'getShieldAndWeapon' of similar type ('std::shared_ptr &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 372, + "startColumn": 33, + "charOffset": 10189, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 370, + "startColumn": 33, + "charOffset": 10154, + "charLength": 3, + "snippet": { + "text": "}\n\nvoid Player::getShieldAndWeapon(std::shared_ptr &shield, std::shared_ptr &weapon) const {\n\tshield = nullptr;\n\tweapon = nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "674c05ed81ddcf71f30a0d3884b7caa2b10e382ebcbefb089820eb7336c38ea9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 376, + "startColumn": 2, + "charOffset": 10299, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 374, + "startColumn": 2, + "charOffset": 10278, + "charLength": 3, + "snippet": { + "text": "\tweapon = nullptr;\n\n\tfor (uint32_t slot = CONST_SLOT_RIGHT; slot <= CONST_SLOT_LEFT; slot++) {\n\t\tstd::shared_ptr item = inventory[slot];\n\t\tif (!item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f43cb1f07e96ae207803b3a81d22af7c6571af085e40f394404c26a3fce22cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 377, + "startColumn": 32, + "charOffset": 10404, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 375, + "startColumn": 32, + "charOffset": 10297, + "charLength": 9, + "snippet": { + "text": "\n\tfor (uint32_t slot = CONST_SLOT_RIGHT; slot <= CONST_SLOT_LEFT; slot++) {\n\t\tstd::shared_ptr item = inventory[slot];\n\t\tif (!item) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "707a51740254a2fada2c219c79f007dcdb5f9b643ef0f7d5073b2443f0840d2b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 378, + "startColumn": 7, + "charOffset": 10427, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 376, + "startColumn": 7, + "charOffset": 10298, + "charLength": 1, + "snippet": { + "text": "\tfor (uint32_t slot = CONST_SLOT_RIGHT; slot <= CONST_SLOT_LEFT; slot++) {\n\t\tstd::shared_ptr item = inventory[slot];\n\t\tif (!item) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df1b531e39ae4431cee438ee135b62b254df43278c6f5d83a21693d21ac7b7e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 387, + "startColumn": 9, + "charOffset": 10555, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 385, + "startColumn": 9, + "charOffset": 10521, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tcase WEAPON_SHIELD: {\n\t\t\t\tif (!shield || (shield && item->getDefense() > shield->getDefense())) {\n\t\t\t\t\tshield = item;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ca935a5ff7d1695ea59f9aad98b9d8dbc046fa2f5728eb8ff8a3b52394e4750" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 407, + "startColumn": 25, + "charOffset": 10950, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 405, + "startColumn": 25, + "charOffset": 10838, + "charLength": 1, + "snippet": { + "text": "int32_t Player::getDefense() const {\n\tint32_t defenseSkill = getSkillLevel(SKILL_FIST);\n\tint32_t defenseValue = 7;\n\tstd::shared_ptr weapon;\n\tstd::shared_ptr shield;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8381595e2617736a407b3955b85442e10d5ad1b4ef6707af1d7499c1efb6358a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 433, + "startColumn": 4, + "charOffset": 11716, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 431, + "startColumn": 4, + "charOffset": 11664, + "charLength": 4, + "snippet": { + "text": "\t\tswitch (fightMode) {\n\t\t\tcase FIGHTMODE_ATTACK:\n\t\t\tcase FIGHTMODE_BALANCED:\n\t\t\t\treturn 1;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ea7f9dbb39a582f79a9e0a4e23cee8be293ed856ceb614bbfd58179d33b88c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 433, + "startColumn": 4, + "charOffset": 11716, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 431, + "startColumn": 4, + "charOffset": 11664, + "charLength": 4, + "snippet": { + "text": "\t\tswitch (fightMode) {\n\t\t\tcase FIGHTMODE_ATTACK:\n\t\t\tcase FIGHTMODE_BALANCED:\n\t\t\t\treturn 1;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8326be5b7a62ffb59174038c16d27a97b5b1101a8261caafb5adae5019f2182" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 436, + "startColumn": 4, + "charOffset": 11759, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 434, + "startColumn": 4, + "charOffset": 11741, + "charLength": 4, + "snippet": { + "text": "\t\t\t\treturn 1;\n\n\t\t\tcase FIGHTMODE_DEFENSE:\n\t\t\t\treturn 2;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a83a22ea27689d6cf776fef2cd7045224b353f582e12f88eaa9b4a8fbbd2cf5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 441, + "startColumn": 9, + "charOffset": 11813, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 439, + "startColumn": 9, + "charOffset": 11801, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\treturn (defenseSkill / 4. + 2.23) * defenseValue * 0.15 * getDefenseFactor() * vocation->defenseMultiplier;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28ff553afbb4c1b60b14afdfd3844eae1cc8363c9e2400ab0c3cc47dd0466200" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 441, + "startColumn": 9, + "charOffset": 11813, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 439, + "startColumn": 9, + "charOffset": 11801, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\treturn (defenseSkill / 4. + 2.23) * defenseValue * 0.15 * getDefenseFactor() * vocation->defenseMultiplier;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa726d71320ea7b43e7d05982927faa9ffe60b63c7f92410ab7ce53ea527c7fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "4. is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 441, + "startColumn": 25, + "charOffset": 11829, + "charLength": 2, + "snippet": { + "text": "4." + } + }, + "contextRegion": { + "startLine": 439, + "startColumn": 25, + "charOffset": 11801, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\treturn (defenseSkill / 4. + 2.23) * defenseValue * 0.15 * getDefenseFactor() * vocation->defenseMultiplier;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c49e1fcbb3cd1a8795a8e81745969d0d08185228d3020ff4d46e0ae77f13d91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2.23 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 441, + "startColumn": 30, + "charOffset": 11834, + "charLength": 4, + "snippet": { + "text": "2.23" + } + }, + "contextRegion": { + "startLine": 439, + "startColumn": 30, + "charOffset": 11801, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\treturn (defenseSkill / 4. + 2.23) * defenseValue * 0.15 * getDefenseFactor() * vocation->defenseMultiplier;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67c67c3d8695e448f78779d582ac9f0172263e7b91cb94cade3632b27caa7d8d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.15 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 441, + "startColumn": 53, + "charOffset": 11857, + "charLength": 4, + "snippet": { + "text": "0.15" + } + }, + "contextRegion": { + "startLine": 439, + "startColumn": 53, + "charOffset": 11801, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\treturn (defenseSkill / 4. + 2.23) * defenseValue * 0.15 * getDefenseFactor() * vocation->defenseMultiplier;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2184e4226eb0b099af77c31252fa06506b8d3f302d1af367d99b03212c2f666d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 446, + "startColumn": 3, + "charOffset": 11981, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 444, + "startColumn": 3, + "charOffset": 11917, + "charLength": 4, + "snippet": { + "text": "float Player::getAttackFactor() const {\n\tswitch (fightMode) {\n\t\tcase FIGHTMODE_ATTACK:\n\t\t\treturn 1.0f;\n\t\tcase FIGHTMODE_BALANCED:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35e417b5b24e617cc23bbaee67b21e753a56f5162495cfc2e1cc596e11d5b19e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 447, + "startColumn": 11, + "charOffset": 12014, + "charLength": 4, + "snippet": { + "text": "1.0f" + } + }, + "contextRegion": { + "startLine": 445, + "startColumn": 11, + "charOffset": 11957, + "charLength": 4, + "snippet": { + "text": "\tswitch (fightMode) {\n\t\tcase FIGHTMODE_ATTACK:\n\t\t\treturn 1.0f;\n\t\tcase FIGHTMODE_BALANCED:\n\t\t\treturn 0.75f;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6069609dcf657321f531150cb58ce846d7febcbb9dadc18368152fb3bea0e44c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 447, + "startColumn": 11, + "charOffset": 12014, + "charLength": 4, + "snippet": { + "text": "1.0f" + } + }, + "contextRegion": { + "startLine": 445, + "startColumn": 11, + "charOffset": 11957, + "charLength": 4, + "snippet": { + "text": "\tswitch (fightMode) {\n\t\tcase FIGHTMODE_ATTACK:\n\t\t\treturn 1.0f;\n\t\tcase FIGHTMODE_BALANCED:\n\t\t\treturn 0.75f;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a692d5edfeea9f8399b4b80524d3232f724d270d5f66fc7c649eed5f03545b15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 448, + "startColumn": 3, + "charOffset": 12022, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 446, + "startColumn": 3, + "charOffset": 11979, + "charLength": 4, + "snippet": { + "text": "\t\tcase FIGHTMODE_ATTACK:\n\t\t\treturn 1.0f;\n\t\tcase FIGHTMODE_BALANCED:\n\t\t\treturn 0.75f;\n\t\tcase FIGHTMODE_DEFENSE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "defb88e43218e6664582b20e309c9f3f4383ac0e07a13e809d84eb4b42021e0a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 449, + "startColumn": 11, + "charOffset": 12057, + "charLength": 5, + "snippet": { + "text": "0.75f" + } + }, + "contextRegion": { + "startLine": 447, + "startColumn": 11, + "charOffset": 12004, + "charLength": 5, + "snippet": { + "text": "\t\t\treturn 1.0f;\n\t\tcase FIGHTMODE_BALANCED:\n\t\t\treturn 0.75f;\n\t\tcase FIGHTMODE_DEFENSE:\n\t\t\treturn 0.5f;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "790e0320429fca13d526e896924f69434bd2b60d3a7fa837ed4320b2acbff5ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 449, + "startColumn": 11, + "charOffset": 12057, + "charLength": 5, + "snippet": { + "text": "0.75f" + } + }, + "contextRegion": { + "startLine": 447, + "startColumn": 11, + "charOffset": 12004, + "charLength": 5, + "snippet": { + "text": "\t\t\treturn 1.0f;\n\t\tcase FIGHTMODE_BALANCED:\n\t\t\treturn 0.75f;\n\t\tcase FIGHTMODE_DEFENSE:\n\t\t\treturn 0.5f;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "313e9aae4070499404373d2c9e59397a03ac59ade2f919f56ee574cf070f4cb3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.75f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 449, + "startColumn": 11, + "charOffset": 12057, + "charLength": 5, + "snippet": { + "text": "0.75f" + } + }, + "contextRegion": { + "startLine": 447, + "startColumn": 11, + "charOffset": 12004, + "charLength": 5, + "snippet": { + "text": "\t\t\treturn 1.0f;\n\t\tcase FIGHTMODE_BALANCED:\n\t\t\treturn 0.75f;\n\t\tcase FIGHTMODE_DEFENSE:\n\t\t\treturn 0.5f;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9109b6b7d4ce8d4ae1a3f9faf0b6302375221638983be2790d7d50e903aee3e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 450, + "startColumn": 3, + "charOffset": 12066, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 448, + "startColumn": 3, + "charOffset": 12020, + "charLength": 4, + "snippet": { + "text": "\t\tcase FIGHTMODE_BALANCED:\n\t\t\treturn 0.75f;\n\t\tcase FIGHTMODE_DEFENSE:\n\t\t\treturn 0.5f;\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b06e743b801073e37ba9cca3048cd16caad649efe2ec24d750d9086b6571b884" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 451, + "startColumn": 11, + "charOffset": 12100, + "charLength": 4, + "snippet": { + "text": "0.5f" + } + }, + "contextRegion": { + "startLine": 449, + "startColumn": 11, + "charOffset": 12047, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn 0.75f;\n\t\tcase FIGHTMODE_DEFENSE:\n\t\t\treturn 0.5f;\n\t\tdefault:\n\t\t\treturn 1.0f;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "330c7da3e7607641849aaa19b40b85235b55b7240e0b33a57b71502acaab2c33" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 451, + "startColumn": 11, + "charOffset": 12100, + "charLength": 4, + "snippet": { + "text": "0.5f" + } + }, + "contextRegion": { + "startLine": 449, + "startColumn": 11, + "charOffset": 12047, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn 0.75f;\n\t\tcase FIGHTMODE_DEFENSE:\n\t\t\treturn 0.5f;\n\t\tdefault:\n\t\t\treturn 1.0f;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fed0142b495cf6b798034f4c8398d1a0728ba74a094204cbdaeb35169c0ad58a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.5f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 451, + "startColumn": 11, + "charOffset": 12100, + "charLength": 4, + "snippet": { + "text": "0.5f" + } + }, + "contextRegion": { + "startLine": 449, + "startColumn": 11, + "charOffset": 12047, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn 0.75f;\n\t\tcase FIGHTMODE_DEFENSE:\n\t\t\treturn 0.5f;\n\t\tdefault:\n\t\t\treturn 1.0f;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d419c0b5fc7c5afe37a965332471b1a14e87a74f1bfc92616b4cf20d78e73be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 452, + "startColumn": 3, + "charOffset": 12108, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 450, + "startColumn": 3, + "charOffset": 12064, + "charLength": 7, + "snippet": { + "text": "\t\tcase FIGHTMODE_DEFENSE:\n\t\t\treturn 0.5f;\n\t\tdefault:\n\t\t\treturn 1.0f;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8726d5a5ad8777e4e2e3337236e28acb6af37422ae6ef2b8d2201273fcce3f35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 453, + "startColumn": 11, + "charOffset": 12127, + "charLength": 4, + "snippet": { + "text": "1.0f" + } + }, + "contextRegion": { + "startLine": 451, + "startColumn": 11, + "charOffset": 12090, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn 0.5f;\n\t\tdefault:\n\t\t\treturn 1.0f;\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "825a9bad35b31564582b2d9c27fd6222f5510c440831da915e414603ff1538b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 453, + "startColumn": 11, + "charOffset": 12127, + "charLength": 4, + "snippet": { + "text": "1.0f" + } + }, + "contextRegion": { + "startLine": 451, + "startColumn": 11, + "charOffset": 12090, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn 0.5f;\n\t\tdefault:\n\t\t\treturn 1.0f;\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a408e5be933de5843f2176be327bc59ea507e21345e304290871e4a79fe3aeca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 459, + "startColumn": 3, + "charOffset": 12204, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 457, + "startColumn": 3, + "charOffset": 12139, + "charLength": 4, + "snippet": { + "text": "float Player::getDefenseFactor() const {\n\tswitch (fightMode) {\n\t\tcase FIGHTMODE_ATTACK:\n\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.5f : 1.0f;\n\t\tcase FIGHTMODE_BALANCED:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4eafe119124257fc6cba1c1e453560df1a13b9bde7518d253c0386f1b58b438" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 460, + "startColumn": 60, + "charOffset": 12286, + "charLength": 4, + "snippet": { + "text": "0.5f" + } + }, + "contextRegion": { + "startLine": 458, + "startColumn": 60, + "charOffset": 12180, + "charLength": 4, + "snippet": { + "text": "\tswitch (fightMode) {\n\t\tcase FIGHTMODE_ATTACK:\n\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.5f : 1.0f;\n\t\tcase FIGHTMODE_BALANCED:\n\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.75f : 1.0f;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "943b26b74c3e66cd5229d80a5eef234d7c9dc69d0244925be6a84cb181e5c6de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 460, + "startColumn": 60, + "charOffset": 12286, + "charLength": 4, + "snippet": { + "text": "0.5f" + } + }, + "contextRegion": { + "startLine": 458, + "startColumn": 60, + "charOffset": 12180, + "charLength": 4, + "snippet": { + "text": "\tswitch (fightMode) {\n\t\tcase FIGHTMODE_ATTACK:\n\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.5f : 1.0f;\n\t\tcase FIGHTMODE_BALANCED:\n\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.75f : 1.0f;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5263d9faa5f1a720f3d3f145a50d74632e302c4af523159e14a1498b8a5652ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.5f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 460, + "startColumn": 60, + "charOffset": 12286, + "charLength": 4, + "snippet": { + "text": "0.5f" + } + }, + "contextRegion": { + "startLine": 458, + "startColumn": 60, + "charOffset": 12180, + "charLength": 4, + "snippet": { + "text": "\tswitch (fightMode) {\n\t\tcase FIGHTMODE_ATTACK:\n\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.5f : 1.0f;\n\t\tcase FIGHTMODE_BALANCED:\n\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.75f : 1.0f;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cdb26997cdd043edb38dbc28884b04c99a6ecbf00faabfa59f88d5a4c34cc895" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 460, + "startColumn": 67, + "charOffset": 12293, + "charLength": 4, + "snippet": { + "text": "1.0f" + } + }, + "contextRegion": { + "startLine": 458, + "startColumn": 67, + "charOffset": 12180, + "charLength": 4, + "snippet": { + "text": "\tswitch (fightMode) {\n\t\tcase FIGHTMODE_ATTACK:\n\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.5f : 1.0f;\n\t\tcase FIGHTMODE_BALANCED:\n\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.75f : 1.0f;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d898223668137f939d8190765f2c39e1aaeb6c2307d7995ddb028e5bd5c793ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 460, + "startColumn": 67, + "charOffset": 12293, + "charLength": 4, + "snippet": { + "text": "1.0f" + } + }, + "contextRegion": { + "startLine": 458, + "startColumn": 67, + "charOffset": 12180, + "charLength": 4, + "snippet": { + "text": "\tswitch (fightMode) {\n\t\tcase FIGHTMODE_ATTACK:\n\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.5f : 1.0f;\n\t\tcase FIGHTMODE_BALANCED:\n\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.75f : 1.0f;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f52eff128feada0265734a0f0be718eea17ef670f1048e9fc5e22de081f87bf0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 461, + "startColumn": 3, + "charOffset": 12301, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 459, + "startColumn": 3, + "charOffset": 12202, + "charLength": 4, + "snippet": { + "text": "\t\tcase FIGHTMODE_ATTACK:\n\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.5f : 1.0f;\n\t\tcase FIGHTMODE_BALANCED:\n\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.75f : 1.0f;\n\t\tcase FIGHTMODE_DEFENSE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9a6646636c9a49c37196a8c19630b47c37b895d288052d8ab8ecd36576a6159" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 462, + "startColumn": 60, + "charOffset": 12385, + "charLength": 5, + "snippet": { + "text": "0.75f" + } + }, + "contextRegion": { + "startLine": 460, + "startColumn": 60, + "charOffset": 12227, + "charLength": 5, + "snippet": { + "text": "\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.5f : 1.0f;\n\t\tcase FIGHTMODE_BALANCED:\n\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.75f : 1.0f;\n\t\tcase FIGHTMODE_DEFENSE:\n\t\t\treturn 1.0f;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0128f50aba63225df96f23f9e7961b0a0ecd153b0dce56feddcdb6dffae164ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 462, + "startColumn": 60, + "charOffset": 12385, + "charLength": 5, + "snippet": { + "text": "0.75f" + } + }, + "contextRegion": { + "startLine": 460, + "startColumn": 60, + "charOffset": 12227, + "charLength": 5, + "snippet": { + "text": "\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.5f : 1.0f;\n\t\tcase FIGHTMODE_BALANCED:\n\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.75f : 1.0f;\n\t\tcase FIGHTMODE_DEFENSE:\n\t\t\treturn 1.0f;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af9995bd8c03f0aebc6f78e5cc082f4cb61f831a4a21e1319d2c9ad0b0dea460" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.75f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 462, + "startColumn": 60, + "charOffset": 12385, + "charLength": 5, + "snippet": { + "text": "0.75f" + } + }, + "contextRegion": { + "startLine": 460, + "startColumn": 60, + "charOffset": 12227, + "charLength": 5, + "snippet": { + "text": "\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.5f : 1.0f;\n\t\tcase FIGHTMODE_BALANCED:\n\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.75f : 1.0f;\n\t\tcase FIGHTMODE_DEFENSE:\n\t\t\treturn 1.0f;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7bd4c0664d93db6658ef95e976295658e88cec236d915e387db694b0f3e5c321" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 462, + "startColumn": 68, + "charOffset": 12393, + "charLength": 4, + "snippet": { + "text": "1.0f" + } + }, + "contextRegion": { + "startLine": 460, + "startColumn": 68, + "charOffset": 12227, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.5f : 1.0f;\n\t\tcase FIGHTMODE_BALANCED:\n\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.75f : 1.0f;\n\t\tcase FIGHTMODE_DEFENSE:\n\t\t\treturn 1.0f;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01c294c6e19071b96b80ff0d0edefa26420a67231ed016750049d368bfd09840" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 462, + "startColumn": 68, + "charOffset": 12393, + "charLength": 4, + "snippet": { + "text": "1.0f" + } + }, + "contextRegion": { + "startLine": 460, + "startColumn": 68, + "charOffset": 12227, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.5f : 1.0f;\n\t\tcase FIGHTMODE_BALANCED:\n\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.75f : 1.0f;\n\t\tcase FIGHTMODE_DEFENSE:\n\t\t\treturn 1.0f;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f63a9cfc3756a0d3583fa6a81b09c0a57309f71ecf12fa8e4d96b55aba5d091" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "switch has 2 consecutive identical branches" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 463, + "startColumn": 3, + "charOffset": 12401, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 461, + "startColumn": 3, + "charOffset": 12299, + "charLength": 4, + "snippet": { + "text": "\t\tcase FIGHTMODE_BALANCED:\n\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.75f : 1.0f;\n\t\tcase FIGHTMODE_DEFENSE:\n\t\t\treturn 1.0f;\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ddb09ae7831a779fcaba49195e5fb49d5301d15effe8930ce79538b5a3e4f289" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 463, + "startColumn": 3, + "charOffset": 12401, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 461, + "startColumn": 3, + "charOffset": 12299, + "charLength": 4, + "snippet": { + "text": "\t\tcase FIGHTMODE_BALANCED:\n\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.75f : 1.0f;\n\t\tcase FIGHTMODE_DEFENSE:\n\t\t\treturn 1.0f;\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "434d41a85c8e2b1e11ac8b781b85e38deb50884906ccd326e46a102bc6a850a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 464, + "startColumn": 11, + "charOffset": 12435, + "charLength": 4, + "snippet": { + "text": "1.0f" + } + }, + "contextRegion": { + "startLine": 462, + "startColumn": 11, + "charOffset": 12326, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.75f : 1.0f;\n\t\tcase FIGHTMODE_DEFENSE:\n\t\t\treturn 1.0f;\n\t\tdefault:\n\t\t\treturn 1.0f;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4def7a42843e7f149cc6cad6d900504e68d72558be958b4d9ec3e731f318d6c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 464, + "startColumn": 11, + "charOffset": 12435, + "charLength": 4, + "snippet": { + "text": "1.0f" + } + }, + "contextRegion": { + "startLine": 462, + "startColumn": 11, + "charOffset": 12326, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.75f : 1.0f;\n\t\tcase FIGHTMODE_DEFENSE:\n\t\t\treturn 1.0f;\n\t\tdefault:\n\t\t\treturn 1.0f;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d852b7820dca497283fff69ded9e3357e414e4eba2d2337f8497c0be1c70b67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 465, + "startColumn": 3, + "charOffset": 12443, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 463, + "startColumn": 3, + "charOffset": 12399, + "charLength": 7, + "snippet": { + "text": "\t\tcase FIGHTMODE_DEFENSE:\n\t\t\treturn 1.0f;\n\t\tdefault:\n\t\t\treturn 1.0f;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b00d2abab98b8478ea71e6c35bd022e98618c78ca99c0d9834249859e7b340a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 466, + "startColumn": 11, + "charOffset": 12462, + "charLength": 4, + "snippet": { + "text": "1.0f" + } + }, + "contextRegion": { + "startLine": 464, + "startColumn": 11, + "charOffset": 12425, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn 1.0f;\n\t\tdefault:\n\t\t\treturn 1.0f;\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee8d12b4cae09fea63cb7f1de069f7acf998b9ca6c55049da3a40a1b7b179650" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 466, + "startColumn": 11, + "charOffset": 12462, + "charLength": 4, + "snippet": { + "text": "1.0f" + } + }, + "contextRegion": { + "startLine": 464, + "startColumn": 11, + "charOffset": 12425, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn 1.0f;\n\t\tdefault:\n\t\t\treturn 1.0f;\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "971c2c36a84ca8b25e7310065cf7cf6a78bbdfcc67782c598b1ff9860edc40be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 473, + "startColumn": 2, + "charOffset": 12573, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 471, + "startColumn": 2, + "charOffset": 12532, + "charLength": 3, + "snippet": { + "text": "\tstd::unordered_set icons;\n\n\tfor (const auto &condition : conditions) {\n\t\tif (!isSuppress(condition->getType(), false)) {\n\t\t\tauto conditionIcons = condition->getIcons();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8847407949f1730ea5d2a3c1da07854eff271045deb9330bacbef32aceca259" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 477, + "startColumn": 24, + "charOffset": 12800, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 475, + "startColumn": 24, + "charOffset": 12666, + "charLength": 1, + "snippet": { + "text": "\t\t\tauto conditionIcons = condition->getIcons();\n\t\t\ticons.insert(conditionIcons.begin(), conditionIcons.end());\n\t\t\tif (icons.size() == 9) {\n\t\t\t\treturn icons;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bbe15aca757b41223731494e9b1bec554deb5134c3a58d84984228c50d1bdb60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 483, + "startColumn": 33, + "charOffset": 12868, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 481, + "startColumn": 33, + "charOffset": 12832, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (pzLocked && icons.size() < 9) {\n\t\ticons.insert(PlayerIcon::RedSwords);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52f354b96775d738210a8fd7b0f1a1ad8f8e8eae8c0ad13f97e415a588255397" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 484, + "startColumn": 9, + "charOffset": 12881, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 482, + "startColumn": 9, + "charOffset": 12835, + "charLength": 6, + "snippet": { + "text": "\n\tif (pzLocked && icons.size() < 9) {\n\t\ticons.insert(PlayerIcon::RedSwords);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2cf1fe42a5ed53180f49d577b256d3e26b705680666e2cba489419c89b2030ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 489, + "startColumn": 22, + "charOffset": 13017, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 487, + "startColumn": 22, + "charOffset": 12916, + "charLength": 1, + "snippet": { + "text": "\tauto tile = getTile();\n\tif (tile && tile->hasFlag(TILESTATE_PROTECTIONZONE)) {\n\t\tif (icons.size() < 9) {\n\t\t\ticons.insert(PlayerIcon::Pigeon);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f868133d32e1245f9130b7d93b77dfbdeac60e3e8f295410edc25c6d8cfbb4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 490, + "startColumn": 10, + "charOffset": 13031, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 488, + "startColumn": 10, + "charOffset": 12940, + "charLength": 6, + "snippet": { + "text": "\tif (tile && tile->hasFlag(TILESTATE_PROTECTIONZONE)) {\n\t\tif (icons.size() < 9) {\n\t\t\ticons.insert(PlayerIcon::Pigeon);\n\t\t}\n\t\tclient->sendRestingStatus(1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2819ff240ce5a820e203e89795a337dbd22c3eccb32ed3304ecceca38a3a6847" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 494, + "startColumn": 9, + "charOffset": 13104, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 492, + "startColumn": 9, + "charOffset": 13063, + "charLength": 5, + "snippet": { + "text": "\t\tclient->sendRestingStatus(1);\n\n\t\ticons.erase(PlayerIcon::Swords);\n\t} else {\n\t\tclient->sendRestingStatus(0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a3f9c922e7f638ee4582226b97838bc4868f5763d148e68ba12678429f1247c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'mtype' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 502, + "startColumn": 83, + "charOffset": 13277, + "charLength": 5, + "snippet": { + "text": "mtype" + } + }, + "contextRegion": { + "startLine": 500, + "startColumn": 83, + "charOffset": 13192, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid Player::addMonsterToCyclopediaTrackerList(const std::shared_ptr mtype, bool isBoss, bool reloadClient /* = false */) {\n\tif (!client) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03c4ffdca006793978fe7f76da114272fbd2454866f2d049d9bfa30fb4ba937b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 503, + "startColumn": 6, + "charOffset": 13337, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 501, + "startColumn": 6, + "charOffset": 13194, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::addMonsterToCyclopediaTrackerList(const std::shared_ptr mtype, bool isBoss, bool reloadClient /* = false */) {\n\tif (!client) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9058655b3f0f90f648615e064ca6b2d221078a2cb812992ea80c78717d4ec519" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 507, + "startColumn": 26, + "charOffset": 13387, + "charLength": 5, + "snippet": { + "text": "mtype" + } + }, + "contextRegion": { + "startLine": 505, + "startColumn": 26, + "charOffset": 13358, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tconst uint16_t raceId = mtype ? mtype->info.raceid : 0;\n\tauto &tracker = isBoss ? m_bosstiaryMonsterTracker : m_bestiaryMonsterTracker;\n\tif (tracker.emplace(mtype).second) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbe0a98238635b61caa59a14aca1c1f1c4b9bf85478e40c45996e7ff9a952aa3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'mtype' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 522, + "startColumn": 82, + "charOffset": 13840, + "charLength": 5, + "snippet": { + "text": "mtype" + } + }, + "contextRegion": { + "startLine": 520, + "startColumn": 82, + "charOffset": 13756, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid Player::removeMonsterFromCyclopediaTrackerList(std::shared_ptr mtype, bool isBoss, bool reloadClient /* = false */) {\n\tif (!client) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a61f05756572d8c65b024c933958209c648048088eac5f4ed3dee9c7acd51f0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 523, + "startColumn": 6, + "charOffset": 13900, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 521, + "startColumn": 6, + "charOffset": 13758, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::removeMonsterFromCyclopediaTrackerList(std::shared_ptr mtype, bool isBoss, bool reloadClient /* = false */) {\n\tif (!client) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf6ec10441ca0585c0e4e6e5a9f07d5aa0bc43efdd73466c9a82d3a1c3febd00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 527, + "startColumn": 26, + "charOffset": 13950, + "charLength": 5, + "snippet": { + "text": "mtype" + } + }, + "contextRegion": { + "startLine": 525, + "startColumn": 26, + "charOffset": 13921, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tconst uint16_t raceId = mtype ? mtype->info.raceid : 0;\n\tauto &tracker = isBoss ? m_bosstiaryMonsterTracker : m_bestiaryMonsterTracker;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a0bc4d429a894dd86973601888fa6fcbcc49edfbb2952338460b78ee34c7561" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Expression can be simplified" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 544, + "startColumn": 71, + "charOffset": 14483, + "charLength": 1, + "snippet": { + "text": ":" + } + }, + "contextRegion": { + "startLine": 542, + "startColumn": 71, + "charOffset": 14317, + "charLength": 1, + "snippet": { + "text": "\nbool Player::isBossOnBosstiaryTracker(const std::shared_ptr &monsterType) const {\n\treturn monsterType ? m_bosstiaryMonsterTracker.contains(monsterType) : false;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eecd6c3df7f1ab08fa55c21a84e87418b22135eb1dff484c049f3084886cbe0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 553, + "startColumn": 2, + "charOffset": 14623, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 551, + "startColumn": 2, + "charOffset": 14599, + "charLength": 3, + "snippet": { + "text": "\n\tinventoryWeight = 0;\n\tfor (int i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; ++i) {\n\t\tstd::shared_ptr item = inventory[i];\n\t\tif (item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d04ab07b6dfd5253e18ed58e1c079d384e6ec525aee3f5a29128216ef5d18f65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 554, + "startColumn": 32, + "charOffset": 14714, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 552, + "startColumn": 32, + "charOffset": 14600, + "charLength": 9, + "snippet": { + "text": "\tinventoryWeight = 0;\n\tfor (int i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; ++i) {\n\t\tstd::shared_ptr item = inventory[i];\n\t\tif (item) {\n\t\t\tinventoryWeight += item->getWeight();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61453789400433d960645013c97ef8243ad76c88a4364a82f179ada33a0b5a35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 571, + "startColumn": 12, + "charOffset": 15345, + "charLength": 1, + "snippet": { + "text": "[" + } + }, + "contextRegion": { + "startLine": 569, + "startColumn": 12, + "charOffset": 15277, + "charLength": 1, + "snippet": { + "text": "\n\t// Iterate through all items in the player's inventory\n\tfor (auto [key, item] : getAllSlotItems()) {\n\t\t// Iterate through all imbuement slots on the item\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bac2f30531f7bd3c47ee520473c7b4b943a30f90e581b9779fcdbd67d1ae05b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 574, + "startColumn": 3, + "charOffset": 15436, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 572, + "startColumn": 3, + "charOffset": 15380, + "charLength": 3, + "snippet": { + "text": "\t\t// Iterate through all imbuement slots on the item\n\n\t\tfor (uint8_t slotid = 0; slotid < item->getImbuementSlot(); slotid++) {\n\t\t\tImbuementInfo imbuementInfo;\n\t\t\t// Get the imbuement information for the current slot" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b09d438d5afaf0e4aa7ff223e1b59e4f4f0ebd5e001eded7616961b13aff86ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto imbuement' can be declared as 'auto *imbuement'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 583, + "startColumn": 4, + "charOffset": 15811, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 581, + "startColumn": 4, + "charOffset": 15733, + "charLength": 4, + "snippet": { + "text": "\n\t\t\t// Imbuement from imbuementInfo, this variable reduces code complexity\n\t\t\tauto imbuement = imbuementInfo.imbuement;\n\t\t\t// Get the category of the imbuement\n\t\t\tconst CategoryImbuement* categoryImbuement = g_imbuements().getCategoryByID(imbuement->getCategory());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3469b7dcca33586ef34535ee4466b4ca09764455e899bf5b314f44d69aa4a6d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 590, + "startColumn": 8, + "charOffset": 16274, + "charLength": 17, + "snippet": { + "text": "categoryImbuement" + } + }, + "contextRegion": { + "startLine": 588, + "startColumn": 8, + "charOffset": 16067, + "charLength": 17, + "snippet": { + "text": "\t\t\tbool isInBackpack = parent && parent->getContainer();\n\t\t\t// If the imbuement is aggressive and the player is not in fight mode or is in a protection zone, or the item is in a container, ignore it.\n\t\t\tif (categoryImbuement && (categoryImbuement->agressive || nonAggressiveFightOnly) && (isInProtectionZone || !isInFightMode || isInBackpack)) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "708b1d5d63d233f5e6ba3089943fdc0e1e4ea1f755e43dfb94f56afa08b5e41e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CategoryImbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 590, + "startColumn": 8, + "charOffset": 16274, + "charLength": 17, + "snippet": { + "text": "categoryImbuement" + } + }, + "contextRegion": { + "startLine": 588, + "startColumn": 8, + "charOffset": 16067, + "charLength": 17, + "snippet": { + "text": "\t\t\tbool isInBackpack = parent && parent->getContainer();\n\t\t\t// If the imbuement is aggressive and the player is not in fight mode or is in a protection zone, or the item is in a container, ignore it.\n\t\t\tif (categoryImbuement && (categoryImbuement->agressive || nonAggressiveFightOnly) && (isInProtectionZone || !isInFightMode || isInBackpack)) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0855d32a6cabe46c37e6f975f3951cf5fc6c2d6bee0dfcbbc293a843c5fafdf8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 590, + "startColumn": 86, + "charOffset": 16352, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 588, + "startColumn": 86, + "charOffset": 16067, + "charLength": 2, + "snippet": { + "text": "\t\t\tbool isInBackpack = parent && parent->getContainer();\n\t\t\t// If the imbuement is aggressive and the player is not in fight mode or is in a protection zone, or the item is in a container, ignore it.\n\t\t\tif (categoryImbuement && (categoryImbuement->agressive || nonAggressiveFightOnly) && (isInProtectionZone || !isInFightMode || isInBackpack)) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c0e47b8958be7c718c2f7529abdbf09addfa2f39bd42600c3350fbfab5d2160" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 594, + "startColumn": 8, + "charOffset": 16532, + "charLength": 17, + "snippet": { + "text": "categoryImbuement" + } + }, + "contextRegion": { + "startLine": 592, + "startColumn": 8, + "charOffset": 16427, + "charLength": 17, + "snippet": { + "text": "\t\t\t}\n\t\t\t// If the item is not in the backpack slot and it's not a agressive imbuement, ignore it.\n\t\t\tif (categoryImbuement && !categoryImbuement->agressive && parent && parent != getPlayer()) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2740b670ed58557851e6971c9c53fe40027ee4487642af6dd0a1eacf202134a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 594, + "startColumn": 8, + "charOffset": 16532, + "charLength": 17, + "snippet": { + "text": "categoryImbuement" + } + }, + "contextRegion": { + "startLine": 592, + "startColumn": 8, + "charOffset": 16427, + "charLength": 17, + "snippet": { + "text": "\t\t\t}\n\t\t\t// If the item is not in the backpack slot and it's not a agressive imbuement, ignore it.\n\t\t\tif (categoryImbuement && !categoryImbuement->agressive && parent && parent != getPlayer()) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12bc9220059142fcbcd5240173427edbfa8594f03fb4cadb232f1d2b6e75fbf9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CategoryImbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 594, + "startColumn": 8, + "charOffset": 16532, + "charLength": 17, + "snippet": { + "text": "categoryImbuement" + } + }, + "contextRegion": { + "startLine": 592, + "startColumn": 8, + "charOffset": 16427, + "charLength": 17, + "snippet": { + "text": "\t\t\t}\n\t\t\t// If the item is not in the backpack slot and it's not a agressive imbuement, ignore it.\n\t\t\tif (categoryImbuement && !categoryImbuement->agressive && parent && parent != getPlayer()) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c7b54426428708882403595b423bd9e8d02c4c538f24f6ebbcf3d3d0e7d4b1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 607, + "startColumn": 98, + "charOffset": 17166, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 605, + "startColumn": 98, + "charOffset": 16862, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_logger().trace(\"Decaying imbuement {} from item {} of player {}\", imbuement->getName(), item->getName(), getName());\n\t\t\t// Calculate the new duration of the imbuement, making sure it doesn't go below 0\n\t\t\tuint32_t duration = std::max(0, imbuementInfo.duration - EVENT_IMBUEMENT_INTERVAL / 1000);\n\t\t\t// Update the imbuement's duration in the item\n\t\t\titem->decayImbuementTime(slotid, imbuement->getID(), duration);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "838b1ecde27a868717c45580f4bf4fb5e6b21587a37a027d137c74bfcde9f626" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 622, + "startColumn": 2, + "charOffset": 17571, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 620, + "startColumn": 2, + "charOffset": 17420, + "charLength": 3, + "snippet": { + "text": "phmap::flat_hash_map> Player::getAllSlotItems() const {\n\tphmap::flat_hash_map> itemMap;\n\tfor (uint8_t i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; ++i) {\n\t\tstd::shared_ptr item = inventory[i];\n\t\tif (!item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "320de15b0afeabcfc4b319106afb8db3bb787f0c3d65abe3932a4b5ce18f95b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 623, + "startColumn": 32, + "charOffset": 17666, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 621, + "startColumn": 32, + "charOffset": 17507, + "charLength": 9, + "snippet": { + "text": "\tphmap::flat_hash_map> itemMap;\n\tfor (uint8_t i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; ++i) {\n\t\tstd::shared_ptr item = inventory[i];\n\t\tif (!item) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d7edf633246b033036e67008ce44118a479c937d7e2c1c6e1000a6e3521950f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 624, + "startColumn": 7, + "charOffset": 17686, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 622, + "startColumn": 7, + "charOffset": 17570, + "charLength": 1, + "snippet": { + "text": "\tfor (uint8_t i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; ++i) {\n\t\tstd::shared_ptr item = inventory[i];\n\t\tif (!item) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db243006d3820722014f5fd09049cf50defc86da9a04ccb309e79a46172f8d88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 635, + "startColumn": 2, + "charOffset": 17798, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 633, + "startColumn": 2, + "charOffset": 17757, + "charLength": 3, + "snippet": { + "text": "\nvoid Player::setTraining(bool value) {\n\tfor (const auto &[key, player] : g_game().getPlayers()) {\n\t\tif (!this->isInGhostMode() || player->isAccessPlayer()) {\n\t\t\tplayer->vip()->notifyStatusChange(static_self_cast(), value ? VipStatus_t::Training : VipStatus_t::Online, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c048c35ff3ceda06ee48acf5fc641900b1d2e8ac9170a6b2155db8f6535ac6c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 650, + "startColumn": 10, + "charOffset": 18447, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 648, + "startColumn": 10, + "charOffset": 18367, + "charLength": 6, + "snippet": { + "text": "\tif (currReqTries >= nextReqTries) {\n\t\t// player has reached max skill\n\t\treturn skills[skill].level;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90cc4709b420cfa268bab805d73826a519f7f56788d835aebb8e98a032f8b1e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 653, + "startColumn": 24, + "charOffset": 18495, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 651, + "startColumn": 24, + "charOffset": 18468, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tabsl::uint128 tries = skills[skill].tries;\n\tabsl::uint128 totalTries = vocation->getTotalSkillTries(skill, skills[skill].level) + tries;\n\tabsl::uint128 loyaltyTries = (totalTries * getLoyaltyBonus()) / 100;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2334b7d33cfd1489ccb306189ce6a69e85f38f7b727416f27ceea393cddbf8ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 654, + "startColumn": 65, + "charOffset": 18580, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 652, + "startColumn": 65, + "charOffset": 18471, + "charLength": 6, + "snippet": { + "text": "\n\tabsl::uint128 tries = skills[skill].tries;\n\tabsl::uint128 totalTries = vocation->getTotalSkillTries(skill, skills[skill].level) + tries;\n\tabsl::uint128 loyaltyTries = (totalTries * getLoyaltyBonus()) / 100;\n\twhile ((tries + loyaltyTries) >= nextReqTries) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a36cc8fe22ff55596b19094d333d6be69753300fbda24c4ff115589232a0d64b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 655, + "startColumn": 66, + "charOffset": 18675, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 653, + "startColumn": 66, + "charOffset": 18472, + "charLength": 3, + "snippet": { + "text": "\tabsl::uint128 tries = skills[skill].tries;\n\tabsl::uint128 totalTries = vocation->getTotalSkillTries(skill, skills[skill].level) + tries;\n\tabsl::uint128 loyaltyTries = (totalTries * getLoyaltyBonus()) / 100;\n\twhile ((tries + loyaltyTries) >= nextReqTries) {\n\t\tloyaltyTries -= nextReqTries - tries;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d77f0a4fc7d2b1aa3336b65373e73dc477f8373fbfe5a8c46fe72c1758ee562" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 656, + "startColumn": 2, + "charOffset": 18681, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 654, + "startColumn": 2, + "charOffset": 18516, + "charLength": 5, + "snippet": { + "text": "\tabsl::uint128 totalTries = vocation->getTotalSkillTries(skill, skills[skill].level) + tries;\n\tabsl::uint128 loyaltyTries = (totalTries * getLoyaltyBonus()) / 100;\n\twhile ((tries + loyaltyTries) >= nextReqTries) {\n\t\tloyaltyTries -= nextReqTries - tries;\n\t\tlevel++;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62c4fd808da50f86c63eb6755976ad4cda17c30eb96671012dbfc2292e3a03bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'tries' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 656, + "startColumn": 9, + "charOffset": 18688, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 654, + "startColumn": 9, + "charOffset": 18516, + "charLength": 1, + "snippet": { + "text": "\tabsl::uint128 totalTries = vocation->getTotalSkillTries(skill, skills[skill].level) + tries;\n\tabsl::uint128 loyaltyTries = (totalTries * getLoyaltyBonus()) / 100;\n\twhile ((tries + loyaltyTries) >= nextReqTries) {\n\t\tloyaltyTries -= nextReqTries - tries;\n\t\tlevel++;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0f532839957a542612a1bd017e5aaa90b5b4c0ae835b94130e805d8998d7652" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 672, + "startColumn": 60, + "charOffset": 19105, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 670, + "startColumn": 60, + "charOffset": 18982, + "charLength": 6, + "snippet": { + "text": "\nvoid Player::addSkillAdvance(skills_t skill, uint64_t count) {\n\tuint64_t currReqTries = vocation->getReqSkillTries(skill, skills[skill].level);\n\tuint64_t nextReqTries = vocation->getReqSkillTries(skill, skills[skill].level + 1);\n\tif (currReqTries >= nextReqTries) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10521a9354c395f8a8c28405f8979e3b3b41fec3abbf0793ce789661749cae9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 673, + "startColumn": 60, + "charOffset": 19186, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 671, + "startColumn": 60, + "charOffset": 18983, + "charLength": 6, + "snippet": { + "text": "void Player::addSkillAdvance(skills_t skill, uint64_t count) {\n\tuint64_t currReqTries = vocation->getReqSkillTries(skill, skills[skill].level);\n\tuint64_t nextReqTries = vocation->getReqSkillTries(skill, skills[skill].level + 1);\n\tif (currReqTries >= nextReqTries) {\n\t\t// player has reached max skill" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1ddd025941cf3db457f4bc3940ac957d3d9839ff2ba50f06196b2bfbf6f607e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 686, + "startColumn": 2, + "charOffset": 19586, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 684, + "startColumn": 2, + "charOffset": 19552, + "charLength": 5, + "snippet": { + "text": "\n\tbool sendUpdateSkills = false;\n\twhile ((skills[skill].tries + count) >= nextReqTries) {\n\t\tcount -= nextReqTries - skills[skill].tries;\n\t\tskills[skill].level++;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86b74b135a3c8f808ce48d4838c331f4d386520aaf0361c6e7ba7d5854ace54c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'count' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 686, + "startColumn": 9, + "charOffset": 19593, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 684, + "startColumn": 9, + "charOffset": 19552, + "charLength": 1, + "snippet": { + "text": "\n\tbool sendUpdateSkills = false;\n\twhile ((skills[skill].tries + count) >= nextReqTries) {\n\t\tcount -= nextReqTries - skills[skill].tries;\n\t\tskills[skill].level++;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cfac838202abea8d9a8ce0f26bbc7b6d1cd33a1a5991f6d4b813bc3ee7b19904" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 686, + "startColumn": 10, + "charOffset": 19594, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 684, + "startColumn": 10, + "charOffset": 19552, + "charLength": 6, + "snippet": { + "text": "\n\tbool sendUpdateSkills = false;\n\twhile ((skills[skill].tries + count) >= nextReqTries) {\n\t\tcount -= nextReqTries - skills[skill].tries;\n\t\tskills[skill].level++;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4d11d2c29c7eca3c4a8da261d0b4acd4cef5976113cf8685cb9d14904c7f4f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 687, + "startColumn": 27, + "charOffset": 19668, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 685, + "startColumn": 27, + "charOffset": 19553, + "charLength": 6, + "snippet": { + "text": "\tbool sendUpdateSkills = false;\n\twhile ((skills[skill].tries + count) >= nextReqTries) {\n\t\tcount -= nextReqTries - skills[skill].tries;\n\t\tskills[skill].level++;\n\t\tskills[skill].tries = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00d6be002a8c4c3e8d71428aa29eabbee1558c24cec095b7180b145a0c1d0bf7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 688, + "startColumn": 3, + "charOffset": 19691, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 686, + "startColumn": 3, + "charOffset": 19585, + "charLength": 6, + "snippet": { + "text": "\twhile ((skills[skill].tries + count) >= nextReqTries) {\n\t\tcount -= nextReqTries - skills[skill].tries;\n\t\tskills[skill].level++;\n\t\tskills[skill].tries = 0;\n\t\tskills[skill].percent = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae41222815db2a289981d53e3617298e49d26ac682543805142405ae1adb5fb3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 689, + "startColumn": 3, + "charOffset": 19716, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 687, + "startColumn": 3, + "charOffset": 19642, + "charLength": 6, + "snippet": { + "text": "\t\tcount -= nextReqTries - skills[skill].tries;\n\t\tskills[skill].level++;\n\t\tskills[skill].tries = 0;\n\t\tskills[skill].percent = 0;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01ec9997addf11203e7c8543a0043b426341cd47a92cd35e00dc78ea5991cfab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 690, + "startColumn": 3, + "charOffset": 19743, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 688, + "startColumn": 3, + "charOffset": 19689, + "charLength": 6, + "snippet": { + "text": "\t\tskills[skill].level++;\n\t\tskills[skill].tries = 0;\n\t\tskills[skill].percent = 0;\n\n\t\tstd::ostringstream ss;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4568e5f98000ad4287bb83a18468828072bfd8df08ffa1abe9fc22f5fb096c13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 690, + "startColumn": 27, + "charOffset": 19767, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 688, + "startColumn": 27, + "charOffset": 19689, + "charLength": 1, + "snippet": { + "text": "\t\tskills[skill].level++;\n\t\tskills[skill].tries = 0;\n\t\tskills[skill].percent = 0;\n\n\t\tstd::ostringstream ss;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afe44f7a033022101381e2ae33908f56e988defc98549faacf904cf0f8712402" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 693, + "startColumn": 67, + "charOffset": 19862, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 691, + "startColumn": 67, + "charOffset": 19770, + "charLength": 6, + "snippet": { + "text": "\n\t\tstd::ostringstream ss;\n\t\tss << \"You advanced to \" << getSkillName(skill) << \" level \" << skills[skill].level << '.';\n\t\tsendTextMessage(MESSAGE_EVENT_ADVANCE, ss.str());\n\t\tif (skill == SKILL_LEVEL) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5ae6cf3e0c69dfb227e0b172bf6acd44132439171da5ac3108eb3d40490beab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 701, + "startColumn": 22, + "charOffset": 20105, + "charLength": 13, + "snippet": { + "text": "playerAdvance" + } + }, + "contextRegion": { + "startLine": 699, + "startColumn": 22, + "charOffset": 20079, + "charLength": 13, + "snippet": { + "text": "\t\t}\n\n\t\tg_creatureEvents().playerAdvance(static_self_cast(), skill, (skills[skill].level - 1), skills[skill].level);\n\n\t\tsendUpdateSkills = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7929735f708b9d4c3adeeff7562ff9cb85ebca8bdb70c46aa5ea6ee55e797d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 701, + "startColumn": 72, + "charOffset": 20155, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 699, + "startColumn": 72, + "charOffset": 20079, + "charLength": 6, + "snippet": { + "text": "\t\t}\n\n\t\tg_creatureEvents().playerAdvance(static_self_cast(), skill, (skills[skill].level - 1), skills[skill].level);\n\n\t\tsendUpdateSkills = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f866e197610c1f98e935f7c27832670ff5532f4f73a6d4a404d2e955a40e2b07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 701, + "startColumn": 98, + "charOffset": 20181, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 699, + "startColumn": 98, + "charOffset": 20079, + "charLength": 6, + "snippet": { + "text": "\t\t}\n\n\t\tg_creatureEvents().playerAdvance(static_self_cast(), skill, (skills[skill].level - 1), skills[skill].level);\n\n\t\tsendUpdateSkills = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96c9a1d912c3aaf0e33a8dbf989fe36308e31ab6f28f8f67abb22d3d56911805" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 705, + "startColumn": 52, + "charOffset": 20313, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 703, + "startColumn": 52, + "charOffset": 20204, + "charLength": 6, + "snippet": { + "text": "\t\tsendUpdateSkills = true;\n\t\tcurrReqTries = nextReqTries;\n\t\tnextReqTries = vocation->getReqSkillTries(skill, skills[skill].level + 1);\n\t\tif (currReqTries >= nextReqTries) {\n\t\t\tcount = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d49ddf225864a3405fde39d048d2a994176bf1834fdbaf50d29c3506cce4ab6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 712, + "startColumn": 2, + "charOffset": 20410, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 710, + "startColumn": 2, + "charOffset": 20405, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tskills[skill].tries += count;\n\n\tuint32_t newPercent;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5ea61f86de5d34aab8ceb4af04b4e837c23d8db918eeee5801febac7d806306" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'newPercent' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 714, + "startColumn": 11, + "charOffset": 20451, + "charLength": 10, + "snippet": { + "text": "newPercent" + } + }, + "contextRegion": { + "startLine": 712, + "startColumn": 11, + "charOffset": 20409, + "charLength": 10, + "snippet": { + "text": "\tskills[skill].tries += count;\n\n\tuint32_t newPercent;\n\tif (nextReqTries > currReqTries) {\n\t\tnewPercent = Player::getPercentLevel(skills[skill].tries, nextReqTries);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a981e89c80c98da807ca5d6d22bff6fd52d01764c24a009cabbd1f59132703fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double_t' (aka 'double') to 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 716, + "startColumn": 16, + "charOffset": 20514, + "charLength": 6, + "snippet": { + "text": "Player" + } + }, + "contextRegion": { + "startLine": 714, + "startColumn": 16, + "charOffset": 20441, + "charLength": 6, + "snippet": { + "text": "\tuint32_t newPercent;\n\tif (nextReqTries > currReqTries) {\n\t\tnewPercent = Player::getPercentLevel(skills[skill].tries, nextReqTries);\n\t} else {\n\t\tnewPercent = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a43e50264e53ea806f4036d845e69347207aa547c7837544ccecc43db4a6b93" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 716, + "startColumn": 16, + "charOffset": 20514, + "charLength": 6, + "snippet": { + "text": "Player" + } + }, + "contextRegion": { + "startLine": 714, + "startColumn": 16, + "charOffset": 20441, + "charLength": 6, + "snippet": { + "text": "\tuint32_t newPercent;\n\tif (nextReqTries > currReqTries) {\n\t\tnewPercent = Player::getPercentLevel(skills[skill].tries, nextReqTries);\n\t} else {\n\t\tnewPercent = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9499946e3207c3b1e8f02c6e17db5071953e173deed0a1934bcd399d570eba05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 716, + "startColumn": 40, + "charOffset": 20538, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 714, + "startColumn": 40, + "charOffset": 20441, + "charLength": 6, + "snippet": { + "text": "\tuint32_t newPercent;\n\tif (nextReqTries > currReqTries) {\n\t\tnewPercent = Player::getPercentLevel(skills[skill].tries, nextReqTries);\n\t} else {\n\t\tnewPercent = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4221a954bdf72f18b43f35faaa712127501034f89380f062c0dbb5e8a9614fa5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 721, + "startColumn": 6, + "charOffset": 20611, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 719, + "startColumn": 6, + "charOffset": 20602, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tif (skills[skill].percent != newPercent) {\n\t\tskills[skill].percent = newPercent;\n\t\tsendUpdateSkills = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8dc5c62834f1bc0079746ecc7cf1b8521e67a9d5d17f7b7ab6d20570798c5089" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 721, + "startColumn": 31, + "charOffset": 20636, + "charLength": 10, + "snippet": { + "text": "newPercent" + } + }, + "contextRegion": { + "startLine": 719, + "startColumn": 31, + "charOffset": 20602, + "charLength": 10, + "snippet": { + "text": "\t}\n\n\tif (skills[skill].percent != newPercent) {\n\t\tskills[skill].percent = newPercent;\n\t\tsendUpdateSkills = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61a974c1b7c008964a027c4dcbf5bab43270e1c1753f489260c9a5df6777b50b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 722, + "startColumn": 3, + "charOffset": 20652, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 720, + "startColumn": 3, + "charOffset": 20605, + "charLength": 6, + "snippet": { + "text": "\n\tif (skills[skill].percent != newPercent) {\n\t\tskills[skill].percent = newPercent;\n\t\tsendUpdateSkills = true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b76a22d901dddc3b56b7d290befefc8b096f33211580513e86858de9e16e17b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 722, + "startColumn": 27, + "charOffset": 20676, + "charLength": 10, + "snippet": { + "text": "newPercent" + } + }, + "contextRegion": { + "startLine": 720, + "startColumn": 27, + "charOffset": 20605, + "charLength": 10, + "snippet": { + "text": "\n\tif (skills[skill].percent != newPercent) {\n\t\tskills[skill].percent = newPercent;\n\t\tsendUpdateSkills = true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b4a5f4c7d5a6ca42e38a9f89db77b29b504f93cbd1684af3f7c4291e934b394" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 733, + "startColumn": 2, + "charOffset": 20841, + "charLength": 8, + "snippet": { + "text": "varStats" + } + }, + "contextRegion": { + "startLine": 731, + "startColumn": 2, + "charOffset": 20780, + "charLength": 8, + "snippet": { + "text": "\nvoid Player::setVarStats(stats_t stat, int32_t modifier) {\n\tvarStats[stat] += modifier;\n\n\tswitch (stat) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "203786851a5112b1814203b41c58ddd48dacbe21f35c873346ba652b51a15654" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 747, + "startColumn": 26, + "charOffset": 21193, + "charLength": 10, + "snippet": { + "text": "getMaxMana" + } + }, + "contextRegion": { + "startLine": 745, + "startColumn": 26, + "charOffset": 21104, + "charLength": 10, + "snippet": { + "text": "\t\tcase STAT_MAXMANAPOINTS: {\n\t\t\tif (getMana() > getMaxMana()) {\n\t\t\t\tCreature::changeMana(getMaxMana() - getMana());\n\t\t\t} else {\n\t\t\t\tg_game().addPlayerMana(static_self_cast());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e7a5df524a4febc4035e7db3e5eec27b7f22fd428542799f88cfd1a7448358c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 762, + "startColumn": 3, + "charOffset": 21414, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 760, + "startColumn": 3, + "charOffset": 21341, + "charLength": 4, + "snippet": { + "text": "int32_t Player::getDefaultStats(stats_t stat) const {\n\tswitch (stat) {\n\t\tcase STAT_MAXHITPOINTS:\n\t\t\treturn healthMax;\n\t\tcase STAT_MAXMANAPOINTS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36b375e685510423c7c76fcceab98cf99b0850830bc00ad1f72a96178be10a8f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 764, + "startColumn": 3, + "charOffset": 21461, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 762, + "startColumn": 3, + "charOffset": 21412, + "charLength": 4, + "snippet": { + "text": "\t\tcase STAT_MAXHITPOINTS:\n\t\t\treturn healthMax;\n\t\tcase STAT_MAXMANAPOINTS:\n\t\t\treturn manaMax;\n\t\tcase STAT_MAGICPOINTS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b643654823c678b566bfa02d171ad3cf764e05c23e4c5e7c7cee7a93aa7e7cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 765, + "startColumn": 11, + "charOffset": 21496, + "charLength": 7, + "snippet": { + "text": "manaMax" + } + }, + "contextRegion": { + "startLine": 763, + "startColumn": 11, + "charOffset": 21438, + "charLength": 7, + "snippet": { + "text": "\t\t\treturn healthMax;\n\t\tcase STAT_MAXMANAPOINTS:\n\t\t\treturn manaMax;\n\t\tcase STAT_MAGICPOINTS:\n\t\t\treturn getBaseMagicLevel();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb527358c8a26cb5c0625ac0d7540d0b8963d02c659b04e57cd03d9ba47789c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 766, + "startColumn": 3, + "charOffset": 21507, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 764, + "startColumn": 3, + "charOffset": 21459, + "charLength": 4, + "snippet": { + "text": "\t\tcase STAT_MAXMANAPOINTS:\n\t\t\treturn manaMax;\n\t\tcase STAT_MAGICPOINTS:\n\t\t\treturn getBaseMagicLevel();\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c804e18bd9a0114d3422934d5cb363983861f63eea9c992c4ddd6a023866630d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 767, + "startColumn": 11, + "charOffset": 21540, + "charLength": 17, + "snippet": { + "text": "getBaseMagicLevel" + } + }, + "contextRegion": { + "startLine": 765, + "startColumn": 11, + "charOffset": 21486, + "charLength": 17, + "snippet": { + "text": "\t\t\treturn manaMax;\n\t\tcase STAT_MAGICPOINTS:\n\t\t\treturn getBaseMagicLevel();\n\t\tdefault:\n\t\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c33495f5909b902867ae08eaceb7424b24e03e9b105119dbe5f5b2abfe27d281" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 768, + "startColumn": 3, + "charOffset": 21563, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 766, + "startColumn": 3, + "charOffset": 21505, + "charLength": 7, + "snippet": { + "text": "\t\tcase STAT_MAGICPOINTS:\n\t\t\treturn getBaseMagicLevel();\n\t\tdefault:\n\t\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ca38d6846471fbcd0b975c7596e5abff8534715e30855276465df9f4b288a97" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 773, + "startColumn": 67, + "charOffset": 21657, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 771, + "startColumn": 67, + "charOffset": 21588, + "charLength": 9, + "snippet": { + "text": "}\n\nvoid Player::addContainer(uint8_t cid, std::shared_ptr container) {\n\tif (cid > 0xF) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aaa214875d4539c2e2721b026d41a5707b8b4c4697507144091a2a97eb6a3406" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 774, + "startColumn": 12, + "charOffset": 21681, + "charLength": 3, + "snippet": { + "text": "0xF" + } + }, + "contextRegion": { + "startLine": 772, + "startColumn": 12, + "charOffset": 21590, + "charLength": 3, + "snippet": { + "text": "\nvoid Player::addContainer(uint8_t cid, std::shared_ptr container) {\n\tif (cid > 0xF) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8892d2a40b4c3e494bc061aafed2a49a14884e118f3c8f644d71e0e97d1d5a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 778, + "startColumn": 6, + "charOffset": 21707, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 776, + "startColumn": 6, + "charOffset": 21698, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!container) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0207eb27f2fe3cd5430f0889bcbeeeff2899ddeda31ff71a01869f7da39a3122" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 811, + "startColumn": 17, + "charOffset": 22554, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 809, + "startColumn": 17, + "charOffset": 22511, + "charLength": 5, + "snippet": { + "text": "\t\tremoveEmptyRewards();\n\t}\n\topenContainers.erase(it);\n\tif (container && container->getID() == ITEM_BROWSEFIELD) {\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "067c9784d3273033403da2fa27bef2251372904cbcf8b73b7ac4a867c2f19ffc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 817, + "startColumn": 2, + "charOffset": 22668, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 815, + "startColumn": 2, + "charOffset": 22630, + "charLength": 3, + "snippet": { + "text": "\nvoid Player::removeEmptyRewards() {\n\tstd::erase_if(rewardMap, [this](const auto &rewardBag) {\n\t\tauto [id, reward] = rewardBag;\n\t\tif (reward->empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0100b8205187216d146b81e446b180610463f03730cabb87affc765faa6b5ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'setContainerIndex' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 833, + "startColumn": 32, + "charOffset": 23233, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 831, + "startColumn": 32, + "charOffset": 23199, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid Player::setContainerIndex(uint8_t cid, uint16_t index) {\n\tauto it = openContainers.find(cid);\n\tif (it == openContainers.end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "877df84b1d68db182a0f2e3da99e511f53415f2ed5320b968d6fb94ad8b9733b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 849, + "startColumn": 58, + "charOffset": 23629, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 847, + "startColumn": 58, + "charOffset": 23569, + "charLength": 9, + "snippet": { + "text": "}\n\nint8_t Player::getContainerID(std::shared_ptr container) const {\n\tfor (const auto &it : openContainers) {\n\t\tif (it.second.container == container) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fda8f1a5cd7f6833f9a8c50c88e9b24a2d060a22a53a517c13340adfd73c93f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 850, + "startColumn": 2, + "charOffset": 23649, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 848, + "startColumn": 2, + "charOffset": 23571, + "charLength": 3, + "snippet": { + "text": "\nint8_t Player::getContainerID(std::shared_ptr container) const {\n\tfor (const auto &it : openContainers) {\n\t\tif (it.second.container == container) {\n\t\t\treturn it.first;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3b62c30eee4c7a35effc2038e3840d601dc6e62034870d5e9343b08b0dc80e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned char' to signed type 'int8_t' (aka 'signed char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 852, + "startColumn": 11, + "charOffset": 23741, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 850, + "startColumn": 11, + "charOffset": 23648, + "charLength": 2, + "snippet": { + "text": "\tfor (const auto &it : openContainers) {\n\t\tif (it.second.container == container) {\n\t\t\treturn it.first;\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c93bbacecfbb6c08fa2b0e4577627c45fbf0eae39d9b403746d89ffef87b81d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 873, + "startColumn": 4, + "charOffset": 24182, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 871, + "startColumn": 4, + "charOffset": 24118, + "charLength": 4, + "snippet": { + "text": "\tif (sex == PLAYERSEX_FEMALE) {\n\t\treturn ITEM_FEMALE_CORPSE;\n\t} else {\n\t\treturn ITEM_MALE_CORPSE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00224c5ab7d54278839b1e1322522624a8dc80d6dc3cdffc048195cd3dde83c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 881, + "startColumn": 12, + "charOffset": 24426, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 879, + "startColumn": 12, + "charOffset": 24327, + "charLength": 12, + "snippet": { + "text": "\tif (IS_IN_KEYRANGE(key, RESERVED_RANGE)) {\n\t\tif (IS_IN_KEYRANGE(key, OUTFITS_RANGE)) {\n\t\t\toutfits.emplace_back(\n\t\t\t\tvalue >> 16,\n\t\t\t\tvalue & 0xFF" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce2ae358d6d22dc1b2910af9d3436e148cbd165a6aaf94d81b940a6a100ed1c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 882, + "startColumn": 5, + "charOffset": 24444, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 880, + "startColumn": 5, + "charOffset": 24371, + "charLength": 5, + "snippet": { + "text": "\t\tif (IS_IN_KEYRANGE(key, OUTFITS_RANGE)) {\n\t\t\toutfits.emplace_back(\n\t\t\t\tvalue >> 16,\n\t\t\t\tvalue & 0xFF\n\t\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b254d3ebbbc037b0817a2a1ecf2540ec672bcc42250d722701c43a30f5bd4a65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 882, + "startColumn": 14, + "charOffset": 24453, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 880, + "startColumn": 14, + "charOffset": 24371, + "charLength": 2, + "snippet": { + "text": "\t\tif (IS_IN_KEYRANGE(key, OUTFITS_RANGE)) {\n\t\t\toutfits.emplace_back(\n\t\t\t\tvalue >> 16,\n\t\t\t\tvalue & 0xFF\n\t\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8009bc97de4ff78545bd98fcbc869e91c84248f3900fe7ba5be519d57a1d29a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 883, + "startColumn": 5, + "charOffset": 24461, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 881, + "startColumn": 5, + "charOffset": 24415, + "charLength": 5, + "snippet": { + "text": "\t\t\toutfits.emplace_back(\n\t\t\t\tvalue >> 16,\n\t\t\t\tvalue & 0xFF\n\t\t\t);\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86569c5f72d1a70bf5dfac6b1c87fc45857ddd648217ec927bd637dfdb4e8d83" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 883, + "startColumn": 13, + "charOffset": 24469, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 881, + "startColumn": 13, + "charOffset": 24415, + "charLength": 4, + "snippet": { + "text": "\t\t\toutfits.emplace_back(\n\t\t\t\tvalue >> 16,\n\t\t\t\tvalue & 0xFF\n\t\t\t);\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e0b2be7356607f76840be3d6f3020bd71df7855c4f844b485425a17e79f5db6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 886, + "startColumn": 5, + "charOffset": 24495, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 884, + "startColumn": 5, + "charOffset": 24474, + "charLength": 4, + "snippet": { + "text": "\t\t\t);\n\t\t\treturn;\n\t\t} else if (IS_IN_KEYRANGE(key, MOUNTS_RANGE)) {\n\t\t\t// do nothing\n\t\t} else if (IS_IN_KEYRANGE(key, FAMILIARS_RANGE)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5582695e5608a131be7f1776155b72e0dbfa732610d00c7d470c9b64886189b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 889, + "startColumn": 14, + "charOffset": 24624, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 887, + "startColumn": 14, + "charOffset": 24541, + "charLength": 12, + "snippet": { + "text": "\t\t\t// do nothing\n\t\t} else if (IS_IN_KEYRANGE(key, FAMILIARS_RANGE)) {\n\t\t\tfamiliars.emplace_back(\n\t\t\t\tvalue >> 16\n\t\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a3f9c922e7f638ee4582226b97838bc4868f5763d148e68ba12678429f1247c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 890, + "startColumn": 5, + "charOffset": 24642, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 888, + "startColumn": 5, + "charOffset": 24558, + "charLength": 5, + "snippet": { + "text": "\t\t} else if (IS_IN_KEYRANGE(key, FAMILIARS_RANGE)) {\n\t\t\tfamiliars.emplace_back(\n\t\t\t\tvalue >> 16\n\t\t\t);\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68f8017267103983b44d11d4c5c0c9ff4d4bedd7e4efa3faaf1a13370a8f9451" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 890, + "startColumn": 14, + "charOffset": 24651, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 888, + "startColumn": 14, + "charOffset": 24558, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (IS_IN_KEYRANGE(key, FAMILIARS_RANGE)) {\n\t\t\tfamiliars.emplace_back(\n\t\t\t\tvalue >> 16\n\t\t\t);\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7da18a7cd7584476e540042dbb2b1dcc188e83b02b49fc2165445444c689a15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 909, + "startColumn": 14, + "charOffset": 25250, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 907, + "startColumn": 14, + "charOffset": 25223, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\tstorageMap.erase(key);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa11b26e27865ac213a699d60f035e93905f2feeb160c044b4799d0c0351956a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 945, + "startColumn": 6, + "charOffset": 26247, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 943, + "startColumn": 6, + "charOffset": 26198, + "charLength": 1, + "snippet": { + "text": "\nbool Player::canSee(const Position &pos) {\n\tif (!client) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e19f84a26247a1734470894449e9551a510f1c69b1e8d66432cc58ad3fd1dc27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 960, + "startColumn": 6, + "charOffset": 26508, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 958, + "startColumn": 6, + "charOffset": 26499, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!creature->getPlayer() && !canSeeInvisibility() && creature->isInvisible()) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8038362b213da413207afdf8f0d74f99815c08c1424015965862aa7351c24767" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 966, + "startColumn": 55, + "charOffset": 26676, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 964, + "startColumn": 55, + "charOffset": 26619, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Player::canWalkthrough(std::shared_ptr creature) {\n\tif (group->access || creature->isInGhostMode()) {\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22667a2abb0d7a8cb4f4d59542669aa5175288500b2f5a4cf2ed6917e3ba5c66" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in conditional return statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 976, + "startColumn": 11, + "charOffset": 26981, + "charLength": 5, + "snippet": { + "text": "false" + } + }, + "contextRegion": { + "startLine": 974, + "startColumn": 11, + "charOffset": 26923, + "charLength": 5, + "snippet": { + "text": "\tif (monster) {\n\t\tif (!monster->isFamiliar()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5022a2a6afb6fa769b8cad033a8385281119882919e51df37c7bfd36f099e635" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 981, + "startColumn": 2, + "charOffset": 27012, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 979, + "startColumn": 2, + "charOffset": 27007, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (player) {\n\t\tstd::shared_ptr playerTile = player->getTile();\n\t\tif (!playerTile || (!playerTile->hasFlag(TILESTATE_NOPVPZONE) && !playerTile->hasFlag(TILESTATE_PROTECTIONZONE) && player->getLevel() > static_cast(g_configManager().getNumber(PROTECTION_LEVEL, __FUNCTION__)) && g_game().getWorldType() != WORLD_TYPE_NO_PVP)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a638a378fd457fce59cc5fc10bc9aa289a22e410b9670b857e6a9973ef840ba9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 983, + "startColumn": 7, + "charOffset": 27088, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 981, + "startColumn": 7, + "charOffset": 27011, + "charLength": 1, + "snippet": { + "text": "\tif (player) {\n\t\tstd::shared_ptr playerTile = player->getTile();\n\t\tif (!playerTile || (!playerTile->hasFlag(TILESTATE_NOPVPZONE) && !playerTile->hasFlag(TILESTATE_PROTECTIONZONE) && player->getLevel() > static_cast(g_configManager().getNumber(PROTECTION_LEVEL, __FUNCTION__)) && g_game().getWorldType() != WORLD_TYPE_NO_PVP)) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0d021fe8ff3a5c86e4a933ea4f6363c2960103c99aafcab0b9e16e2ba789898" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 988, + "startColumn": 7, + "charOffset": 27451, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 986, + "startColumn": 7, + "charOffset": 27376, + "charLength": 1, + "snippet": { + "text": "\n\t\tstd::shared_ptr playerTileGround = playerTile->getGround();\n\t\tif (!playerTileGround || !playerTileGround->hasWalkStack()) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ca935a5ff7d1695ea59f9aad98b9d8dbc046fa2f5728eb8ff8a3b52394e4750" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 993, + "startColumn": 49, + "charOffset": 27631, + "charLength": 4, + "snippet": { + "text": "2000" + } + }, + "contextRegion": { + "startLine": 991, + "startColumn": 49, + "charOffset": 27530, + "charLength": 4, + "snippet": { + "text": "\n\t\tstd::shared_ptr thisPlayer = getPlayer();\n\t\tif ((OTSYS_TIME() - lastWalkthroughAttempt) > 2000) {\n\t\t\tthisPlayer->setLastWalkthroughAttempt(OTSYS_TIME());\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "076e05b3c90826953a770949ab93597e5352efca69620e12e977044c72ee21ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1005, + "startColumn": 4, + "charOffset": 27952, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1003, + "startColumn": 4, + "charOffset": 27867, + "charLength": 4, + "snippet": { + "text": "\t\tthisPlayer->setLastWalkthroughPosition(creature->getPosition());\n\t\treturn true;\n\t} else if (npc) {\n\t\tstd::shared_ptr tile = npc->getTile();\n\t\tstd::shared_ptr houseTile = std::dynamic_pointer_cast(tile);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07c9aaaa026a0802564ec82a34d5f39b07617415d541f411844e7b8e99db9491" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1014, + "startColumn": 57, + "charOffset": 28211, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1012, + "startColumn": 57, + "charOffset": 28152, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Player::canWalkthroughEx(std::shared_ptr creature) {\n\tif (group->access) {\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a31d93c02d6fd11f7a86797dea0b8658479ba55c448f85b08679dce114dffd64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in conditional return statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1022, + "startColumn": 11, + "charOffset": 28382, + "charLength": 5, + "snippet": { + "text": "false" + } + }, + "contextRegion": { + "startLine": 1020, + "startColumn": 11, + "charOffset": 28324, + "charLength": 5, + "snippet": { + "text": "\tif (monster) {\n\t\tif (!monster->isFamiliar()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3a1a7eaa75c853387cbb4cf551a966eb967a676003c55a7088b493ca32f7eb6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1032, + "startColumn": 4, + "charOffset": 28863, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1030, + "startColumn": 4, + "charOffset": 28532, + "charLength": 4, + "snippet": { + "text": "\t\tstd::shared_ptr playerTile = player->getTile();\n\t\treturn playerTile && (playerTile->hasFlag(TILESTATE_NOPVPZONE) || playerTile->hasFlag(TILESTATE_PROTECTIONZONE) || player->getLevel() <= static_cast(g_configManager().getNumber(PROTECTION_LEVEL, __FUNCTION__)) || g_game().getWorldType() == WORLD_TYPE_NO_PVP);\n\t} else if (npc) {\n\t\tstd::shared_ptr tile = npc->getTile();\n\t\tstd::shared_ptr houseTile = std::dynamic_pointer_cast(tile);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ba9b16310cb5c1b17891317e4e1aa6359e56dca53bd4ca16aff25311fb59cee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'refreshManagedContainer' has cognitive complexity of 31 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1047, + "startColumn": 36, + "charOffset": 29240, + "charLength": 23, + "snippet": { + "text": "refreshManagedContainer" + } + }, + "contextRegion": { + "startLine": 1045, + "startColumn": 36, + "charOffset": 29202, + "charLength": 23, + "snippet": { + "text": "}\n\nstd::shared_ptr Player::refreshManagedContainer(ObjectCategory_t category, std::shared_ptr container, bool isLootContainer, bool loading /* = false*/) {\n\tstd::shared_ptr previousContainer = nullptr;\n\tauto toSetAttribute = isLootContainer ? ItemAttribute_t::QUICKLOOTCONTAINER : ItemAttribute_t::OBTAINCONTAINER;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89e002eb5f907c999b4da06c07467c9aa4f3739847bea82717da74f5a92a08ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1047, + "startColumn": 114, + "charOffset": 29318, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 1045, + "startColumn": 114, + "charOffset": 29202, + "charLength": 9, + "snippet": { + "text": "}\n\nstd::shared_ptr Player::refreshManagedContainer(ObjectCategory_t category, std::shared_ptr container, bool isLootContainer, bool loading /* = false*/) {\n\tstd::shared_ptr previousContainer = nullptr;\n\tauto toSetAttribute = isLootContainer ? ItemAttribute_t::QUICKLOOTCONTAINER : ItemAttribute_t::OBTAINCONTAINER;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e96aadcf7cb6082f5b28778b72d828bbdca6925df0b0632becea393be589eb9a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1054, + "startColumn": 13, + "charOffset": 29840, + "charLength": 1, + "snippet": { + "text": "~" + } + }, + "contextRegion": { + "startLine": 1052, + "startColumn": 13, + "charOffset": 29726, + "charLength": 1, + "snippet": { + "text": "\t\tif (previousContainer) {\n\t\t\tauto flags = previousContainer->getAttribute(toSetAttribute);\n\t\t\tflags &= ~(1 << category);\n\t\t\tif (flags == 0) {\n\t\t\t\tpreviousContainer->removeAttribute(toSetAttribute);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8e11fc201c719f7a817cd5a9f4183be4fbf936f0205417882d67da00f69f6ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a unary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1054, + "startColumn": 14, + "charOffset": 29841, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1052, + "startColumn": 14, + "charOffset": 29726, + "charLength": 1, + "snippet": { + "text": "\t\tif (previousContainer) {\n\t\t\tauto flags = previousContainer->getAttribute(toSetAttribute);\n\t\t\tflags &= ~(1 << category);\n\t\t\tif (flags == 0) {\n\t\t\t\tpreviousContainer->removeAttribute(toSetAttribute);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4b574446ee934304fb1200155e7e1bfe3cdfdefa21680eb5e834d4c693d9c66" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1054, + "startColumn": 15, + "charOffset": 29842, + "charLength": 1, + "snippet": { + "text": "1" + } + }, + "contextRegion": { + "startLine": 1052, + "startColumn": 15, + "charOffset": 29726, + "charLength": 1, + "snippet": { + "text": "\t\tif (previousContainer) {\n\t\t\tauto flags = previousContainer->getAttribute(toSetAttribute);\n\t\t\tflags &= ~(1 << category);\n\t\t\tif (flags == 0) {\n\t\t\t\tpreviousContainer->removeAttribute(toSetAttribute);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42dbe72b1fa4afe77a3ae51f8903cf6ad15dba5546250695d4ec67e6818204fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1054, + "startColumn": 17, + "charOffset": 29844, + "charLength": 2, + "snippet": { + "text": "<<" + } + }, + "contextRegion": { + "startLine": 1052, + "startColumn": 17, + "charOffset": 29726, + "charLength": 2, + "snippet": { + "text": "\t\tif (previousContainer) {\n\t\t\tauto flags = previousContainer->getAttribute(toSetAttribute);\n\t\t\tflags &= ~(1 << category);\n\t\t\tif (flags == 0) {\n\t\t\t\tpreviousContainer->removeAttribute(toSetAttribute);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5612ce3e2a776b50bf2568d13b081dd4f3faf86fc596973b22e9f6678b1ae37" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-suspicious-call-argument", + "ruleIndex": 732, + "kind": "fail", + "level": "warning", + "message": { + "text": "1st argument 'toSetAttribute' (passed to 'type') looks like it might be swapped with the 2nd, 'flags' (passed to 'genericAttribute')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1058, + "startColumn": 24, + "charOffset": 29970, + "charLength": 12, + "snippet": { + "text": "setAttribute" + } + }, + "contextRegion": { + "startLine": 1056, + "startColumn": 24, + "charOffset": 29879, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tpreviousContainer->removeAttribute(toSetAttribute);\n\t\t\t} else {\n\t\t\t\tpreviousContainer->setAttribute(toSetAttribute, flags);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f1a06ce8019103ee31d258d663afe4adfa681da5d045ac42c5cf2a8eacb73ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1068, + "startColumn": 7, + "charOffset": 30127, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1066, + "startColumn": 7, + "charOffset": 30116, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif (!it->second.first && !it->second.second) {\n\t\t\tm_managedContainers.erase(it);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bef29f1a7e820e12968c2c1a68ccabb7e4ccd10037864287b962bdb42a7f474b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1068, + "startColumn": 28, + "charOffset": 30148, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1066, + "startColumn": 28, + "charOffset": 30116, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif (!it->second.first && !it->second.second) {\n\t\t\tm_managedContainers.erase(it);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9aad82cbdc64cdad8733aa0f1e32eb8165beb0ae5b6ff98b252c5743b71d0e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1069, + "startColumn": 24, + "charOffset": 30193, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 1067, + "startColumn": 24, + "charOffset": 30120, + "charLength": 5, + "snippet": { + "text": "\n\t\tif (!it->second.first && !it->second.second) {\n\t\t\tm_managedContainers.erase(it);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e78afb24c2c702c7b89749f4df63444e94032902d505ef2b0c1b8d8e7678576f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1095, + "startColumn": 33, + "charOffset": 30906, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1093, + "startColumn": 33, + "charOffset": 30789, + "charLength": 1, + "snippet": { + "text": "\t\tif (!loading) {\n\t\t\tauto flags = container->getAttribute(toSetAttribute);\n\t\t\tauto sendAttribute = flags | (1 << category);\n\t\t\tcontainer->setAttribute(toSetAttribute, sendAttribute);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51ff18125fb29c0669434a28680940ffaeb775632e0c53736827fb8236637ce8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1095, + "startColumn": 34, + "charOffset": 30907, + "charLength": 1, + "snippet": { + "text": "1" + } + }, + "contextRegion": { + "startLine": 1093, + "startColumn": 34, + "charOffset": 30789, + "charLength": 1, + "snippet": { + "text": "\t\tif (!loading) {\n\t\t\tauto flags = container->getAttribute(toSetAttribute);\n\t\t\tauto sendAttribute = flags | (1 << category);\n\t\t\tcontainer->setAttribute(toSetAttribute, sendAttribute);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "922262ebf5010e7ba16f8119933765f4ac1c355313f90bf6da3dd5216539ef3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1095, + "startColumn": 36, + "charOffset": 30909, + "charLength": 2, + "snippet": { + "text": "<<" + } + }, + "contextRegion": { + "startLine": 1093, + "startColumn": 36, + "charOffset": 30789, + "charLength": 2, + "snippet": { + "text": "\t\tif (!loading) {\n\t\t\tauto flags = container->getAttribute(toSetAttribute);\n\t\t\tauto sendAttribute = flags | (1 << category);\n\t\t\tcontainer->setAttribute(toSetAttribute, sendAttribute);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c0b5cc7b72fa7dc3fa6071b6ea62618b57ecbf67b7b97dfc8bfc8efa6ec0ebb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'getManagedContainer' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1103, + "startColumn": 36, + "charOffset": 31055, + "charLength": 19, + "snippet": { + "text": "getManagedContainer" + } + }, + "contextRegion": { + "startLine": 1101, + "startColumn": 36, + "charOffset": 31017, + "charLength": 19, + "snippet": { + "text": "}\n\nstd::shared_ptr Player::getManagedContainer(ObjectCategory_t category, bool isLootContainer) const {\n\tif (category != OBJECTCATEGORY_DEFAULT && !isPremium()) {\n\t\tcategory = OBJECTCATEGORY_DEFAULT;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8b403271a32f9084bbbfff82e228c0a1b1f7c302664cb9bfddb5c62dc061d17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1114, + "startColumn": 6, + "charOffset": 31447, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1112, + "startColumn": 6, + "charOffset": 31438, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!container && category != OBJECTCATEGORY_DEFAULT) {\n\t\t// firstly, fallback to default\n\t\tcontainer = getManagedContainer(OBJECTCATEGORY_DEFAULT, isLootContainer);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e60c97dc252463046fbda2e6422f6582a4da9589455e9a0af6441c45e909020" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1122, + "startColumn": 61, + "charOffset": 31695, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 1120, + "startColumn": 61, + "charOffset": 31632, + "charLength": 9, + "snippet": { + "text": "}\n\nvoid Player::checkLootContainers(std::shared_ptr container) {\n\tif (!container) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9653469d3bc8ca516175517544172036b1e27754e041937d0ebd99439f4ccdfe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1123, + "startColumn": 6, + "charOffset": 31713, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1121, + "startColumn": 6, + "charOffset": 31634, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::checkLootContainers(std::shared_ptr container) {\n\tif (!container) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f56763fd2815d1b26cf7f3062f66735cdd53036779bc8ee6215459ad359c5be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1128, + "startColumn": 2, + "charOffset": 31768, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1126, + "startColumn": 2, + "charOffset": 31740, + "charLength": 3, + "snippet": { + "text": "\n\tbool shouldSend = false;\n\tfor (auto it = m_managedContainers.begin(); it != m_managedContainers.end();) {\n\t\tstd::shared_ptr &lootContainer = it->second.first;\n\t\tstd::shared_ptr &obtainContainer = it->second.second;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47bfa1ea0c6cde63a5f96575bb15c4b4b73be09920484e874e0cd6d06505791d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1128, + "startColumn": 2, + "charOffset": 31768, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1126, + "startColumn": 2, + "charOffset": 31740, + "charLength": 3, + "snippet": { + "text": "\n\tbool shouldSend = false;\n\tfor (auto it = m_managedContainers.begin(); it != m_managedContainers.end();) {\n\t\tstd::shared_ptr &lootContainer = it->second.first;\n\t\tstd::shared_ptr &obtainContainer = it->second.second;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c00c91f1aab397407cd58c6b628a864bfd13316ea374e19e2fadf80a2734678" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1128, + "startColumn": 46, + "charOffset": 31812, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1126, + "startColumn": 46, + "charOffset": 31740, + "charLength": 2, + "snippet": { + "text": "\n\tbool shouldSend = false;\n\tfor (auto it = m_managedContainers.begin(); it != m_managedContainers.end();) {\n\t\tstd::shared_ptr &lootContainer = it->second.first;\n\t\tstd::shared_ptr &obtainContainer = it->second.second;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03aaf229a22ed3b84111574214f032869ae72e344d2a449e6557d3d69bbd602e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1153, + "startColumn": 7, + "charOffset": 32688, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1151, + "startColumn": 7, + "charOffset": 32677, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif (!lootContainer && !obtainContainer) {\n\t\t\tit = m_managedContainers.erase(it);\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2ea500275b9482804379f4d9987f6eff41f41b060d9f44eedf8202dfd7929bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1153, + "startColumn": 25, + "charOffset": 32706, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1151, + "startColumn": 25, + "charOffset": 32677, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif (!lootContainer && !obtainContainer) {\n\t\t\tit = m_managedContainers.erase(it);\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4e61c794c071f8d6f415d5ae670735b6d30a58d8dc2ab88cb421320196e1e32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1165, + "startColumn": 67, + "charOffset": 32908, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 1163, + "startColumn": 67, + "charOffset": 32839, + "charLength": 9, + "snippet": { + "text": "}\n\nvoid Player::setMainBackpackUnassigned(std::shared_ptr container) {\n\tif (!container) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6f678fb94f80915fce86ee6eaae10edf87361f8dd0a7340380bbb74fd55a8fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1166, + "startColumn": 6, + "charOffset": 32926, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1164, + "startColumn": 6, + "charOffset": 32841, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::setMainBackpackUnassigned(std::shared_ptr container) {\n\tif (!container) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8cbbe2f5879f2e8048b212a4143e8728001581c6daf379fce738112e3d2d43cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1172, + "startColumn": 2, + "charOffset": 33014, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1170, + "startColumn": 2, + "charOffset": 32954, + "charLength": 3, + "snippet": { + "text": "\t// Update containers\n\tbool toSendInventoryUpdate = false;\n\tfor (bool isLootContainer : { true, false }) {\n\t\tstd::shared_ptr managedContainer = getManagedContainer(OBJECTCATEGORY_DEFAULT, isLootContainer);\n\t\tif (!managedContainer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b2055d1673cfb6074eb40f5b1761cba6f605b6aa19eacb2422a0819b3ad3ec6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1174, + "startColumn": 7, + "charOffset": 33177, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1172, + "startColumn": 7, + "charOffset": 33013, + "charLength": 1, + "snippet": { + "text": "\tfor (bool isLootContainer : { true, false }) {\n\t\tstd::shared_ptr managedContainer = getManagedContainer(OBJECTCATEGORY_DEFAULT, isLootContainer);\n\t\tif (!managedContainer) {\n\t\t\trefreshManagedContainer(OBJECTCATEGORY_DEFAULT, container, isLootContainer);\n\t\t\ttoSendInventoryUpdate = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20ec60e7f33855b85e5bd69161fb22f8a562d736c4a811cb04d4fbdd008b7a69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1175, + "startColumn": 4, + "charOffset": 33201, + "charLength": 23, + "snippet": { + "text": "refreshManagedContainer" + } + }, + "contextRegion": { + "startLine": 1173, + "startColumn": 4, + "charOffset": 33061, + "charLength": 23, + "snippet": { + "text": "\t\tstd::shared_ptr managedContainer = getManagedContainer(OBJECTCATEGORY_DEFAULT, isLootContainer);\n\t\tif (!managedContainer) {\n\t\t\trefreshManagedContainer(OBJECTCATEGORY_DEFAULT, container, isLootContainer);\n\t\t\ttoSendInventoryUpdate = true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b95c2776a94f6533e4bd29d712ffdc7e80c4f1c7d687abb5a1fc03c28217736" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1186, + "startColumn": 50, + "charOffset": 33481, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 1184, + "startColumn": 50, + "charOffset": 33429, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Player::sendLootStats(std::shared_ptr item, uint8_t count) {\n\tuint64_t value = 0;\n\tif (item->getID() == ITEM_GOLD_COIN || item->getID() == ITEM_PLATINUM_COIN || item->getID() == ITEM_CRYSTAL_COIN) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b25238f787a92008ceca5d90e0605e356b488074d8e85ea8646717de6605c11" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1188, + "startColumn": 2, + "charOffset": 33526, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1186, + "startColumn": 2, + "charOffset": 33432, + "charLength": 2, + "snippet": { + "text": "void Player::sendLootStats(std::shared_ptr item, uint8_t count) {\n\tuint64_t value = 0;\n\tif (item->getID() == ITEM_GOLD_COIN || item->getID() == ITEM_PLATINUM_COIN || item->getID() == ITEM_CRYSTAL_COIN) {\n\t\tif (item->getID() == ITEM_PLATINUM_COIN) {\n\t\t\tvalue = count * 100;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0181304b8486a424e0b90ee40f6e19560d3d1f887c9b2b06a6d2cb884e2c507" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'uint64_t' (aka 'unsigned long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1190, + "startColumn": 12, + "charOffset": 33698, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 1188, + "startColumn": 12, + "charOffset": 33525, + "charLength": 5, + "snippet": { + "text": "\tif (item->getID() == ITEM_GOLD_COIN || item->getID() == ITEM_PLATINUM_COIN || item->getID() == ITEM_CRYSTAL_COIN) {\n\t\tif (item->getID() == ITEM_PLATINUM_COIN) {\n\t\t\tvalue = count * 100;\n\t\t} else if (item->getID() == ITEM_CRYSTAL_COIN) {\n\t\t\tvalue = count * 10000;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d7794265f203a8c67204393647972b48c3caf61d7a047848c21f8d1eb730886" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1190, + "startColumn": 20, + "charOffset": 33706, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 1188, + "startColumn": 20, + "charOffset": 33525, + "charLength": 3, + "snippet": { + "text": "\tif (item->getID() == ITEM_GOLD_COIN || item->getID() == ITEM_PLATINUM_COIN || item->getID() == ITEM_CRYSTAL_COIN) {\n\t\tif (item->getID() == ITEM_PLATINUM_COIN) {\n\t\t\tvalue = count * 100;\n\t\t} else if (item->getID() == ITEM_CRYSTAL_COIN) {\n\t\t\tvalue = count * 10000;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70fcb29471fe515609cd9893bcd3ed5fb271d2d8b94333dbae13a2cd8dc6bf18" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'uint64_t' (aka 'unsigned long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1192, + "startColumn": 12, + "charOffset": 33773, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 1190, + "startColumn": 12, + "charOffset": 33687, + "charLength": 5, + "snippet": { + "text": "\t\t\tvalue = count * 100;\n\t\t} else if (item->getID() == ITEM_CRYSTAL_COIN) {\n\t\t\tvalue = count * 10000;\n\t\t} else {\n\t\t\tvalue = count;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e0591094cf673dff3057c09569a28a1868e39f0b630213ce6c1ea9c7ac20016" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1192, + "startColumn": 20, + "charOffset": 33781, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 1190, + "startColumn": 20, + "charOffset": 33687, + "charLength": 5, + "snippet": { + "text": "\t\t\tvalue = count * 100;\n\t\t} else if (item->getID() == ITEM_CRYSTAL_COIN) {\n\t\t\tvalue = count * 10000;\n\t\t} else {\n\t\t\tvalue = count;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d224a17012f91c14704097ce75e99b7026e753be5607a28722c22e20d33580b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'uint64_t' (aka 'unsigned long') of a multiplication performed in type 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1200, + "startColumn": 11, + "charOffset": 33964, + "charLength": 5, + "snippet": { + "text": "iType" + } + }, + "contextRegion": { + "startLine": 1198, + "startColumn": 11, + "charOffset": 33887, + "charLength": 5, + "snippet": { + "text": "\t) {\n\t\tconst auto &iType = Item::items.getItemType(item->getID());\n\t\tvalue = iType.sellPrice * count;\n\t}\n\tg_metrics().addCounter(\"player_loot\", value, { { \"player\", getName() } });" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4efe41d17904abf58c0fc97c8bce84be485568b94d97bf66e5b0cad7a5f9a97d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1202, + "startColumn": 40, + "charOffset": 34031, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 1200, + "startColumn": 40, + "charOffset": 33954, + "charLength": 5, + "snippet": { + "text": "\t\tvalue = iType.sellPrice * count;\n\t}\n\tg_metrics().addCounter(\"player_loot\", value, { { \"player\", getName() } });\n\n\tif (client) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "997655ca80bca991c454130ab638a1f261dc4855aa13bcd733ebcae52318d800" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1202, + "startColumn": 40, + "charOffset": 34031, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 1200, + "startColumn": 40, + "charOffset": 33954, + "charLength": 5, + "snippet": { + "text": "\t\tvalue = iType.sellPrice * count;\n\t}\n\tg_metrics().addCounter(\"player_loot\", value, { { \"player\", getName() } });\n\n\tif (client) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f8d5f4cd8157dc1e8dd65e725273f6c2d14f572353de04aec8b460ef9796b7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1216, + "startColumn": 3, + "charOffset": 34305, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1214, + "startColumn": 3, + "charOffset": 34225, + "charLength": 3, + "snippet": { + "text": "\tconst Position &pos = getPosition();\n\tfor (int32_t cx = -1; cx <= 1; ++cx) {\n\t\tfor (int32_t cy = -1; cy <= 1; ++cy) {\n\t\t\tstd::shared_ptr posTile = g_game().map.getTile(static_cast(pos.x + cx), static_cast(pos.y + cy), pos.z);\n\t\t\tif (!posTile) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbf6d9bb379b9f5c5aab3d57904ab6d7696ab2501f826f53e45faff42b6d5ba6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1218, + "startColumn": 8, + "charOffset": 34485, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1216, + "startColumn": 8, + "charOffset": 34303, + "charLength": 1, + "snippet": { + "text": "\t\tfor (int32_t cy = -1; cy <= 1; ++cy) {\n\t\t\tstd::shared_ptr posTile = g_game().map.getTile(static_cast(pos.x + cx), static_cast(pos.y + cy), pos.z);\n\t\t\tif (!posTile) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4b6adfe9e75444ff0207c3eb733d6de83b1dc0ca4e49cb9eea611ee13a468f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "18 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1241, + "startColumn": 31, + "charOffset": 34903, + "charLength": 2, + "snippet": { + "text": "18" + } + }, + "contextRegion": { + "startLine": 1239, + "startColumn": 31, + "charOffset": 34831, + "charLength": 2, + "snippet": { + "text": "\n\tstd::shared_ptr depotChest;\n\tif (depotId > 0 && depotId < 18) {\n\t\tdepotChest = std::make_shared(ITEM_DEPOT_NULL + depotId);\n\t} else if (depotId == 18) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75c6eaf55000389421f18b1a83cc5cd9d399d601f25c022312bcae0b9e270fa6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1242, + "startColumn": 61, + "charOffset": 34969, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 1240, + "startColumn": 61, + "charOffset": 34832, + "charLength": 1, + "snippet": { + "text": "\tstd::shared_ptr depotChest;\n\tif (depotId > 0 && depotId < 18) {\n\t\tdepotChest = std::make_shared(ITEM_DEPOT_NULL + depotId);\n\t} else if (depotId == 18) {\n\t\tdepotChest = std::make_shared(ITEM_DEPOT_XVIII);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "733746dabf68e3c661b0abd5869c1ac85471d84854778bdc7a6aa3b926bcb97a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "18 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1243, + "startColumn": 24, + "charOffset": 35004, + "charLength": 2, + "snippet": { + "text": "18" + } + }, + "contextRegion": { + "startLine": 1241, + "startColumn": 24, + "charOffset": 34873, + "charLength": 2, + "snippet": { + "text": "\tif (depotId > 0 && depotId < 18) {\n\t\tdepotChest = std::make_shared(ITEM_DEPOT_NULL + depotId);\n\t} else if (depotId == 18) {\n\t\tdepotChest = std::make_shared(ITEM_DEPOT_XVIII);\n\t} else if (depotId == 19) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "607b8d54d5a2cd7bae7db80d82fb7897389ba1ef2397956fd9e48f3713db6cd1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "19 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1245, + "startColumn": 24, + "charOffset": 35096, + "charLength": 2, + "snippet": { + "text": "19" + } + }, + "contextRegion": { + "startLine": 1243, + "startColumn": 24, + "charOffset": 34981, + "charLength": 2, + "snippet": { + "text": "\t} else if (depotId == 18) {\n\t\tdepotChest = std::make_shared(ITEM_DEPOT_XVIII);\n\t} else if (depotId == 19) {\n\t\tdepotChest = std::make_shared(ITEM_DEPOT_XIX);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c19657f26c3c4ed4951305f23efb9762fd24b476b502b889fe39308d6196ba59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1259, + "startColumn": 3, + "charOffset": 35478, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1257, + "startColumn": 3, + "charOffset": 35409, + "charLength": 3, + "snippet": { + "text": "\tif (it != depotLockerMap.end()) {\n\t\tinbox->setParent(it->second);\n\t\tfor (uint32_t i = g_configManager().getNumber(DEPOT_BOXES, __FUNCTION__); i > 0; i--) {\n\t\t\tif (std::shared_ptr depotBox = getDepotChest(i, false)) {\n\t\t\t\tdepotBox->setParent(it->second->getItemByIndex(0)->getContainer());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8cd4ae70312b04be55ec302f861baaf6b637e3436acb974d3cdeac4f7aa6c5e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'i' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1259, + "startColumn": 77, + "charOffset": 35552, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1257, + "startColumn": 77, + "charOffset": 35409, + "charLength": 1, + "snippet": { + "text": "\tif (it != depotLockerMap.end()) {\n\t\tinbox->setParent(it->second);\n\t\tfor (uint32_t i = g_configManager().getNumber(DEPOT_BOXES, __FUNCTION__); i > 0; i--) {\n\t\t\tif (std::shared_ptr depotBox = getDepotChest(i, false)) {\n\t\t\t\tdepotBox->setParent(it->second->getItemByIndex(0)->getContainer());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "021de98f965dafa789eabc1293ac4c1cc979926a3ba3039d9e61ec20d21da225" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1271, + "startColumn": 26, + "charOffset": 36024, + "charLength": 7, + "snippet": { + "text": "depotId" + } + }, + "contextRegion": { + "startLine": 1269, + "startColumn": 26, + "charOffset": 35883, + "charLength": 7, + "snippet": { + "text": "\n\tstd::shared_ptr depotLocker = std::make_shared(ITEM_LOCKER, createSupplyStash ? 4 : 3);\n\tdepotLocker->setDepotId(depotId);\n\tdepotLocker->internalAddThing(Item::CreateItem(ITEM_MARKET));\n\tdepotLocker->internalAddThing(inbox);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e8693169c2e8aa00cda7c120442207ca327a3ee9b59449073993add5cea1b17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1278, + "startColumn": 2, + "charOffset": 36397, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1276, + "startColumn": 2, + "charOffset": 36232, + "charLength": 3, + "snippet": { + "text": "\t}\n\tstd::shared_ptr depotChest = Item::CreateItemAsContainer(ITEM_DEPOT, static_cast(g_configManager().getNumber(DEPOT_BOXES, __FUNCTION__)));\n\tfor (uint32_t i = g_configManager().getNumber(DEPOT_BOXES, __FUNCTION__); i > 0; i--) {\n\t\tstd::shared_ptr depotBox = getDepotChest(i, true);\n\t\tdepotChest->internalAddThing(depotBox);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30a9b7b8116f5ebaf0477f1d55b0bf06f44afce9a2dd8a7c7a81216d62e31080" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'i' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1278, + "startColumn": 76, + "charOffset": 36471, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1276, + "startColumn": 76, + "charOffset": 36232, + "charLength": 1, + "snippet": { + "text": "\t}\n\tstd::shared_ptr depotChest = Item::CreateItemAsContainer(ITEM_DEPOT, static_cast(g_configManager().getNumber(DEPOT_BOXES, __FUNCTION__)));\n\tfor (uint32_t i = g_configManager().getNumber(DEPOT_BOXES, __FUNCTION__); i > 0; i--) {\n\t\tstd::shared_ptr depotBox = getDepotChest(i, true);\n\t\tdepotChest->internalAddThing(depotBox);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71026a8dfe6cd7d8cc39c018931dd2995433b8e9237c4d2a36a6862aa014feea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1309, + "startColumn": 11, + "charOffset": 37305, + "charLength": 15, + "snippet": { + "text": "internalAddItem" + } + }, + "contextRegion": { + "startLine": 1307, + "startColumn": 11, + "charOffset": 37208, + "charLength": 15, + "snippet": { + "text": "\treward->setAttribute(ItemAttribute_t::DATE, rewardId);\n\trewardMap[rewardId] = reward;\n\tg_game().internalAddItem(getRewardChest(), reward, INDEX_WHEREEVER, FLAG_NOLIMIT);\n\n\treturn reward;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd45a28ef145bfc12babc6843bce0dbbf1c1d329a798b7ccaaa8dcd56ab6eef4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1315, + "startColumn": 12, + "charOffset": 37457, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 1313, + "startColumn": 12, + "charOffset": 37398, + "charLength": 5, + "snippet": { + "text": "\nvoid Player::removeReward(uint64_t rewardId) {\n\trewardMap.erase(rewardId);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2cf1fe42a5ed53180f49d577b256d3e26b705680666e2cba489419c89b2030ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1320, + "startColumn": 2, + "charOffset": 37581, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1318, + "startColumn": 2, + "charOffset": 37477, + "charLength": 3, + "snippet": { + "text": "void Player::getRewardList(std::vector &rewards) const {\n\trewards.reserve(rewardMap.size());\n\tfor (auto &it : rewardMap) {\n\t\trewards.push_back(it.first);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56c49da6369ba6ac66ec978dd2f2a1324f9c06028a8d57965712047f0c083525" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &it' can be declared as 'const auto &it'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1320, + "startColumn": 7, + "charOffset": 37586, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1318, + "startColumn": 7, + "charOffset": 37477, + "charLength": 4, + "snippet": { + "text": "void Player::getRewardList(std::vector &rewards) const {\n\trewards.reserve(rewardMap.size());\n\tfor (auto &it : rewardMap) {\n\t\trewards.push_back(it.first);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1ab8fb64b2cc5075bc08c5b059824f551bf43e59660ff544b8e59e1c1b6a129" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'getRewardsFromContainer' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1325, + "startColumn": 44, + "charOffset": 37690, + "charLength": 23, + "snippet": { + "text": "getRewardsFromContainer" + } + }, + "contextRegion": { + "startLine": 1323, + "startColumn": 44, + "charOffset": 37644, + "charLength": 23, + "snippet": { + "text": "}\n\nstd::vector> Player::getRewardsFromContainer(std::shared_ptr container) const {\n\tstd::vector> rewardItemsVector;\n\tif (container) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd1710e7c6f5a558b01eee9f3e0ed75e73c5753262a8de1b70ec9431a97ff8a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1325, + "startColumn": 95, + "charOffset": 37741, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 1323, + "startColumn": 95, + "charOffset": 37644, + "charLength": 9, + "snippet": { + "text": "}\n\nstd::vector> Player::getRewardsFromContainer(std::shared_ptr container) const {\n\tstd::vector> rewardItemsVector;\n\tif (container) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef11aacedb0afb348b1e8151044c64c666a66734e013f5028afb40b1e5d659b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1328, + "startColumn": 3, + "charOffset": 37835, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1326, + "startColumn": 3, + "charOffset": 37760, + "charLength": 3, + "snippet": { + "text": "\tstd::vector> rewardItemsVector;\n\tif (container) {\n\t\tfor (const auto &item : container->getItems(false)) {\n\t\t\tif (item->getID() == ITEM_REWARD_CONTAINER) {\n\t\t\t\tauto items = getRewardsFromContainer(item->getContainer());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c3cf2dc04f0a285645fdb712badb6e3e7d270623ac65e5291c660ef1ae17250" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1331, + "startColumn": 23, + "charOffset": 38024, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 1329, + "startColumn": 23, + "charOffset": 37889, + "charLength": 6, + "snippet": { + "text": "\t\t\tif (item->getID() == ITEM_REWARD_CONTAINER) {\n\t\t\t\tauto items = getRewardsFromContainer(item->getContainer());\n\t\t\t\trewardItemsVector.insert(rewardItemsVector.end(), items.begin(), items.end());\n\t\t\t} else {\n\t\t\t\trewardItemsVector.push_back(item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32651d104c3d363ef425e0058c121344fbdb495d7a3ff0a1876311c636376913" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1348, + "startColumn": 27, + "charOffset": 38380, + "charLength": 22, + "snippet": { + "text": "getOfflineTrainingTime" + } + }, + "contextRegion": { + "startLine": 1346, + "startColumn": 27, + "charOffset": 38316, + "charLength": 22, + "snippet": { + "text": "\tif (client) {\n\t\tclient->sendStats();\n\t\tlastStatsTrainingTime = getOfflineTrainingTime() / 60 / 1000;\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35f1af0cb3428a8de376e5246ccc5212393b0abcd631f508fb50cac428c69d57" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1348, + "startColumn": 54, + "charOffset": 38407, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 1346, + "startColumn": 54, + "charOffset": 38316, + "charLength": 2, + "snippet": { + "text": "\tif (client) {\n\t\tclient->sendStats();\n\t\tlastStatsTrainingTime = getOfflineTrainingTime() / 60 / 1000;\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97f1a4dcc014b8eb83049326596dd266f3b2652de15a416a787eac0b79bb2659" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1348, + "startColumn": 59, + "charOffset": 38412, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 1346, + "startColumn": 59, + "charOffset": 38316, + "charLength": 4, + "snippet": { + "text": "\tif (client) {\n\t\tclient->sendStats();\n\t\tlastStatsTrainingTime = getOfflineTrainingTime() / 60 / 1000;\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b55b2bf6934b91a15440807ae4a807a601853fb06225aa6001a02a00f2e3ed9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1352, + "startColumn": 56, + "charOffset": 38479, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 1350, + "startColumn": 56, + "charOffset": 38421, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Player::updateSupplyTracker(std::shared_ptr item) {\n\tconst auto &iType = Item::items.getItemType(item->getID());\n\tauto value = iType.buyPrice;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a3eec0d465834a9cfbbf4eaf1312276e7ed4000a9a9b4a3042fa6ab89e5cfc5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1355, + "startColumn": 42, + "charOffset": 38619, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 1353, + "startColumn": 42, + "charOffset": 38487, + "charLength": 5, + "snippet": { + "text": "\tconst auto &iType = Item::items.getItemType(item->getID());\n\tauto value = iType.buyPrice;\n\tg_metrics().addCounter(\"player_supply\", value, { { \"player\", getName() } });\n\n\tif (client) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab7c7a7abce714f4971fbfc6b7625c43e840e0a977b7bb1e5f5e58dd658b667b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1376, + "startColumn": 30, + "charOffset": 39054, + "charLength": 4, + "snippet": { + "text": "5000" + } + }, + "contextRegion": { + "startLine": 1374, + "startColumn": 30, + "charOffset": 38991, + "charLength": 4, + "snippet": { + "text": "\n\tbool hasLostConnection = false;\n\tif ((timeNow - lastPing) >= 5000) {\n\t\tlastPing = timeNow;\n\t\tif (client) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8aa8bf771e9eb33d877af12d84efffee36bdb1aeb64665bd83904dd3d412de07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1387, + "startColumn": 42, + "charOffset": 39302, + "charLength": 4, + "snippet": { + "text": "7000" + } + }, + "contextRegion": { + "startLine": 1385, + "startColumn": 42, + "charOffset": 39171, + "charLength": 4, + "snippet": { + "text": "\tint64_t noPongTime = timeNow - lastPong;\n\tauto attackedCreature = getAttackedCreature();\n\tif ((hasLostConnection || noPongTime >= 7000) && attackedCreature && attackedCreature->getPlayer()) {\n\t\tsetAttackedCreature(nullptr);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ebbbf18c50f2a156f44cef48cd8a8781ad5a2c7bd9a015cb4f594e33b41f5fd5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1388, + "startColumn": 3, + "charOffset": 39366, + "charLength": 19, + "snippet": { + "text": "setAttackedCreature" + } + }, + "contextRegion": { + "startLine": 1386, + "startColumn": 3, + "charOffset": 39213, + "charLength": 19, + "snippet": { + "text": "\tauto attackedCreature = getAttackedCreature();\n\tif ((hasLostConnection || noPongTime >= 7000) && attackedCreature && attackedCreature->getPlayer()) {\n\t\tsetAttackedCreature(nullptr);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ebd81e6a4c8edeb509535749d350d47d093e319bc2e1016470d52a18711e04e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1391, + "startColumn": 20, + "charOffset": 39419, + "charLength": 5, + "snippet": { + "text": "60000" + } + }, + "contextRegion": { + "startLine": 1389, + "startColumn": 20, + "charOffset": 39396, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tif (noPongTime >= 60000 && canLogout() && g_creatureEvents().playerLogout(static_self_cast())) {\n\t\tg_logger().info(\"Player {} has been kicked due to ping timeout. (has client: {})\", getName(), client != nullptr);\n\t\tif (client) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8db07a5bd5051159ea717704543a75b560561e7ab5dd03fd763f87023304aa99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1396, + "startColumn": 13, + "charOffset": 39692, + "charLength": 14, + "snippet": { + "text": "removeCreature" + } + }, + "contextRegion": { + "startLine": 1394, + "startColumn": 13, + "charOffset": 39638, + "charLength": 14, + "snippet": { + "text": "\t\t\tclient->logout(true, true);\n\t\t} else {\n\t\t\tg_game().removeCreature(static_self_cast(), true);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "429ada0ee926cf3ac16e648baad85568b8fe65c625be0bc404403392a8ec449f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'getWriteItem' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1401, + "startColumn": 44, + "charOffset": 39795, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 1399, + "startColumn": 44, + "charOffset": 39749, + "charLength": 8, + "snippet": { + "text": "}\n\nstd::shared_ptr Player::getWriteItem(uint32_t &retWindowTextId, uint16_t &retMaxWriteLen) {\n\tretWindowTextId = this->windowTextId;\n\tretMaxWriteLen = this->maxWriteLen;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6180dfe9ab24b053097136a0c2a208451f07e99019008ccd9040daafc9ff13f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1408, + "startColumn": 16, + "charOffset": 40021, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 1406, + "startColumn": 16, + "charOffset": 39947, + "charLength": 4, + "snippet": { + "text": "\nvoid Player::setImbuingItem(std::shared_ptr item) {\n\timbuingItem = item;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67b618a21eb7a712fda5ca110ade402dee528c2cdb86cf95571acefe02cdd43a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1411, + "startColumn": 49, + "charOffset": 40078, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 1409, + "startColumn": 49, + "charOffset": 40027, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Player::setWriteItem(std::shared_ptr item, uint16_t maxWriteLength /*= 0*/) {\n\twindowTextId++;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae56a7f34b2d5c62ed9a7092249462b57490a4dfb52014cfb81877eb77163129" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'getEditHouse' of similar type ('uint32_t &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1423, + "startColumn": 45, + "charOffset": 40316, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 1421, + "startColumn": 45, + "charOffset": 40269, + "charLength": 8, + "snippet": { + "text": "}\n\nstd::shared_ptr Player::getEditHouse(uint32_t &retWindowTextId, uint32_t &retListId) {\n\tretWindowTextId = this->windowTextId;\n\tretListId = this->editListId;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2857b15c7aca950260ee50d0bdcd6aeaafa4601f35258061fcc7032869b828e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'house' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1431, + "startColumn": 14, + "charOffset": 40571, + "charLength": 5, + "snippet": { + "text": "house" + } + }, + "contextRegion": { + "startLine": 1429, + "startColumn": 14, + "charOffset": 40458, + "charLength": 5, + "snippet": { + "text": "void Player::setEditHouse(std::shared_ptr house, uint32_t listId /*= 0*/) {\n\twindowTextId++;\n\teditHouse = house;\n\teditListId = listId;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b84b1cd95fd483129206b10b5448ccb16ce3f6d7e7581b48b4563c21882c457c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1435, + "startColumn": 53, + "charOffset": 40655, + "charLength": 5, + "snippet": { + "text": "house" + } + }, + "contextRegion": { + "startLine": 1433, + "startColumn": 53, + "charOffset": 40600, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid Player::sendHouseWindow(std::shared_ptr house, uint32_t listId) const {\n\tif (!client) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56e6e3b13eeacdbe07c4c28911e68dbe894b96f90cac0249c7b347bf385916df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1436, + "startColumn": 6, + "charOffset": 40692, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1434, + "startColumn": 6, + "charOffset": 40602, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::sendHouseWindow(std::shared_ptr house, uint32_t listId) const {\n\tif (!client) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59d34d05344020a9486ebcf97db199fee4d1f398d8392d043a8e0e4d7b84f88d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1446, + "startColumn": 75, + "charOffset": 40906, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 1444, + "startColumn": 75, + "charOffset": 40829, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Player::onApplyImbuement(Imbuement* imbuement, std::shared_ptr item, uint8_t slot, bool protectionCharm) {\n\tif (!imbuement || !item) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74f30f48a9469b1196105b4c35fdbdc104a3096d1de4ea614b43585917b5c810" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1447, + "startColumn": 6, + "charOffset": 40955, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1445, + "startColumn": 6, + "charOffset": 40831, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::onApplyImbuement(Imbuement* imbuement, std::shared_ptr item, uint8_t slot, bool protectionCharm) {\n\tif (!imbuement || !item) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4d79bfdb279a98bf980addfcfc31c5bcf51345eb55b4e3709ed90a35a7725ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'Imbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1447, + "startColumn": 7, + "charOffset": 40956, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 1445, + "startColumn": 7, + "charOffset": 40831, + "charLength": 9, + "snippet": { + "text": "\nvoid Player::onApplyImbuement(Imbuement* imbuement, std::shared_ptr item, uint8_t slot, bool protectionCharm) {\n\tif (!imbuement || !item) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56beea646e566bab9a070e5c8c3de027a9fd9fde69e55d3997d4709a68c91288" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1447, + "startColumn": 20, + "charOffset": 40969, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1445, + "startColumn": 20, + "charOffset": 40831, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::onApplyImbuement(Imbuement* imbuement, std::shared_ptr item, uint8_t slot, bool protectionCharm) {\n\tif (!imbuement || !item) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4115f6352958ad8dd0581ddfd76da96c17c77c887609849124b0c7596207474" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1459, + "startColumn": 2, + "charOffset": 41384, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1457, + "startColumn": 2, + "charOffset": 41339, + "charLength": 3, + "snippet": { + "text": "\n\tconst auto items = imbuement->getItems();\n\tfor (auto &[key, value] : items) {\n\t\tconst ItemType &itemType = Item::items[key];\n\t\tif (static_self_cast()->getItemTypeCount(key) + this->getStashItemCount(itemType.id) < value) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "605710d039ac35d76a90f18736ef3f0aaa2c03b2397736a1b105f6f010da23e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &' can be declared as 'const auto &'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1459, + "startColumn": 7, + "charOffset": 41389, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1457, + "startColumn": 7, + "charOffset": 41339, + "charLength": 4, + "snippet": { + "text": "\n\tconst auto items = imbuement->getItems();\n\tfor (auto &[key, value] : items) {\n\t\tconst ItemType &itemType = Item::items[key];\n\t\tif (static_self_cast()->getItemTypeCount(key) + this->getStashItemCount(itemType.id) < value) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "898f7ad169ed5e87766ef61cfa60c0a337d27c52ae29bfe1c490c8dd65295885" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1468, + "startColumn": 6, + "charOffset": 41755, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1466, + "startColumn": 6, + "charOffset": 41659, + "charLength": 1, + "snippet": { + "text": "\n\tconst BaseImbuement* baseImbuement = g_imbuements().getBaseByID(imbuement->getBaseID());\n\tif (!baseImbuement) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52fddffd248e896c78d667074cd7164525469d211ba43809153c6116404d3bf1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const BaseImbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1468, + "startColumn": 7, + "charOffset": 41756, + "charLength": 13, + "snippet": { + "text": "baseImbuement" + } + }, + "contextRegion": { + "startLine": 1466, + "startColumn": 7, + "charOffset": 41659, + "charLength": 13, + "snippet": { + "text": "\n\tconst BaseImbuement* baseImbuement = g_imbuements().getBaseByID(imbuement->getBaseID());\n\tif (!baseImbuement) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a04e903fb5dfc72d635595544365b78cade71522c9fbb0e1980dd0d5cb7704a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1483, + "startColumn": 45, + "charOffset": 42296, + "charLength": 5, + "snippet": { + "text": "price" + } + }, + "contextRegion": { + "startLine": 1481, + "startColumn": 45, + "charOffset": 42248, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tg_metrics().addCounter(\"balance_decrease\", price, { { \"player\", getName() }, { \"context\", \"apply_imbuement\" } });\n\n\tfor (auto &[key, value] : items) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3aa065278e769d01ea81a1e826c8e6fe608373c2930b4541abd3e4fb0d78171b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1485, + "startColumn": 2, + "charOffset": 42369, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1483, + "startColumn": 2, + "charOffset": 42252, + "charLength": 3, + "snippet": { + "text": "\tg_metrics().addCounter(\"balance_decrease\", price, { { \"player\", getName() }, { \"context\", \"apply_imbuement\" } });\n\n\tfor (auto &[key, value] : items) {\n\t\tstd::stringstream withdrawItemMessage;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff5e9d5e33aac22eee8db7bd7d1ea8b728eabe7bcbb1df28f39d0d2a8458eaaf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &' can be declared as 'const auto &'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1485, + "startColumn": 7, + "charOffset": 42374, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1483, + "startColumn": 7, + "charOffset": 42252, + "charLength": 4, + "snippet": { + "text": "\tg_metrics().addCounter(\"balance_decrease\", price, { { \"player\", getName() }, { \"context\", \"apply_imbuement\" } });\n\n\tfor (auto &[key, value] : items) {\n\t\tstd::stringstream withdrawItemMessage;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf498fd48221b89efb1997d8e2b51351216c4af4d86f09b993afcaed9a72993b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1490, + "startColumn": 4, + "charOffset": 42541, + "charLength": 16, + "snippet": { + "text": "removeItemOfType" + } + }, + "contextRegion": { + "startLine": 1488, + "startColumn": 4, + "charOffset": 42446, + "charLength": 16, + "snippet": { + "text": "\t\tuint32_t inventoryItemCount = getItemTypeCount(key);\n\t\tif (inventoryItemCount >= value) {\n\t\t\tremoveItemOfType(key, value, -1, true);\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37c047e371c66c7d587d1828d7b96e53d5a408e0d35316764d1187ff910268a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1502, + "startColumn": 3, + "charOffset": 42939, + "charLength": 12, + "snippet": { + "text": "withdrawItem" + } + }, + "contextRegion": { + "startLine": 1500, + "startColumn": 3, + "charOffset": 42828, + "charLength": 12, + "snippet": { + "text": "\n\t\twithdrawItemMessage << \"Using \" << mathItemCount << \"x \" << itemType.name << \" from your supply stash. \";\n\t\twithdrawItem(itemType.id, mathItemCount);\n\t\tsendTextMessage(MESSAGE_STATUS, withdrawItemMessage.str());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7629e57692a5b8526195d3d1172aede324d4437595dd9cebb3c30c0e8c958533" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1506, + "startColumn": 44, + "charOffset": 43090, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 1504, + "startColumn": 44, + "charOffset": 43043, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tif (!protectionCharm && uniform_random(1, 100) > baseImbuement->percent) {\n\t\topenImbuementWindow(item);\n\t\tsendImbuementResult(\"Oh no!\\n\\nThe imbuement has failed. You have lost the astral sources and gold you needed for the imbuement.\\n\\nNext time use a protection charm to better your chances.\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f05f93763b7cf24ca0538a2c7863ce4b47548b6395030207c29db6edfc6cda67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1522, + "startColumn": 53, + "charOffset": 43681, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 1520, + "startColumn": 53, + "charOffset": 43626, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Player::onClearImbuement(std::shared_ptr item, uint8_t slot) {\n\tif (!item) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "670a3e2151333b2937f610a30919504b7b821f9fea60ce3ea17c68c7e5dd8078" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1523, + "startColumn": 6, + "charOffset": 43708, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1521, + "startColumn": 6, + "charOffset": 43628, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::onClearImbuement(std::shared_ptr item, uint8_t slot) {\n\tif (!item) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23674e46c2e5f4517bc66741ec95f4d3e9849db0f9037f70e6ea53adaec96acb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1535, + "startColumn": 6, + "charOffset": 44185, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1533, + "startColumn": 6, + "charOffset": 44075, + "charLength": 1, + "snippet": { + "text": "\n\tconst BaseImbuement* baseImbuement = g_imbuements().getBaseByID(imbuementInfo.imbuement->getBaseID());\n\tif (!baseImbuement) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20ec60e7f33855b85e5bd69161fb22f8a562d736c4a811cb04d4fbdd008b7a69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const BaseImbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1535, + "startColumn": 7, + "charOffset": 44186, + "charLength": 13, + "snippet": { + "text": "baseImbuement" + } + }, + "contextRegion": { + "startLine": 1533, + "startColumn": 7, + "charOffset": 44075, + "charLength": 13, + "snippet": { + "text": "\n\tconst BaseImbuement* baseImbuement = g_imbuements().getBaseByID(imbuementInfo.imbuement->getBaseID());\n\tif (!baseImbuement) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe6be35173c4b68af714f9908ff68152ef563668c09f9d24fd221890335f2efb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1547, + "startColumn": 45, + "charOffset": 44701, + "charLength": 13, + "snippet": { + "text": "baseImbuement" + } + }, + "contextRegion": { + "startLine": 1545, + "startColumn": 45, + "charOffset": 44644, + "charLength": 13, + "snippet": { + "text": "\t\treturn;\n\t}\n\tg_metrics().addCounter(\"balance_decrease\", baseImbuement->removeCost, { { \"player\", getName() }, { \"context\", \"clear_imbuement\" } });\n\n\tif (item->getParent() == getPlayer()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c98c8bd929b7dad1a33c91e0e82a4b70edc9fa7b0a9b70fd465e91c2a4b2ebb0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1557, + "startColumn": 56, + "charOffset": 45046, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 1555, + "startColumn": 56, + "charOffset": 44988, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Player::openImbuementWindow(std::shared_ptr item) {\n\tif (!client || !item) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8cfb0db71feb10921e797058c51080f1063e0fc559696fec2f458e4bb5c46ad2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1558, + "startColumn": 6, + "charOffset": 45059, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1556, + "startColumn": 6, + "charOffset": 44990, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::openImbuementWindow(std::shared_ptr item) {\n\tif (!client || !item) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24ce144856b8da604645286e417456a455322131f7677d8f0ceb2a6dd9a50f16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1558, + "startColumn": 17, + "charOffset": 45070, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1556, + "startColumn": 17, + "charOffset": 44990, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::openImbuementWindow(std::shared_ptr item) {\n\tif (!client || !item) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c88c8159f46007f388b44723d51c744538e8baab643a19f1645b267ad9d44a0f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1583, + "startColumn": 6, + "charOffset": 45717, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1581, + "startColumn": 6, + "charOffset": 45662, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::sendMarketEnter(uint32_t depotId) {\n\tif (!client || this->getLastDepotId() == -1 || !depotId) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9f7d407ac014fbf985f04927b127094ad34335b25f7a187b861abbbbc47a8f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1583, + "startColumn": 49, + "charOffset": 45760, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1581, + "startColumn": 49, + "charOffset": 45662, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::sendMarketEnter(uint32_t depotId) {\n\tif (!client || this->getLastDepotId() == -1 || !depotId) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2106a01fffdcd320ae8b8b211e6927f0eaf6dc13969998c084873756fe3980c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1583, + "startColumn": 50, + "charOffset": 45761, + "charLength": 7, + "snippet": { + "text": "depotId" + } + }, + "contextRegion": { + "startLine": 1581, + "startColumn": 50, + "charOffset": 45662, + "charLength": 7, + "snippet": { + "text": "\nvoid Player::sendMarketEnter(uint32_t depotId) {\n\tif (!client || this->getLastDepotId() == -1 || !depotId) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42f57c8d7882604c0e664d51b0123ad556128b6fe3ee40e9f1cb104f945e08e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1591, + "startColumn": 62, + "charOffset": 45898, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 1589, + "startColumn": 62, + "charOffset": 45823, + "charLength": 9, + "snippet": { + "text": "\n// container\nvoid Player::sendAddContainerItem(std::shared_ptr container, std::shared_ptr item) {\n\tif (!client) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "848f4ba5e6e80b2061ea737229bf477fb8ff8c9f76f764326753db0c68bef265" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1592, + "startColumn": 6, + "charOffset": 45944, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1590, + "startColumn": 6, + "charOffset": 45824, + "charLength": 1, + "snippet": { + "text": "// container\nvoid Player::sendAddContainerItem(std::shared_ptr container, std::shared_ptr item) {\n\tif (!client) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e72c47af3a53ed0b73b35c7070be63e504bf1e2aefb75c4620b112c13f42d9b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1596, + "startColumn": 6, + "charOffset": 45974, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1594, + "startColumn": 6, + "charOffset": 45965, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!container) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2dd755eda6a8e373007338ef5d3b6d848e8af2028d525e7ca710ce0eee7de6c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1600, + "startColumn": 2, + "charOffset": 46003, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1598, + "startColumn": 2, + "charOffset": 45998, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &it : openContainers) {\n\t\tconst OpenContainer &openContainer = it.second;\n\t\tif (openContainer.container != container) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30f4b65e031ed9ea8b8968d64eee7ec7f2c254a450fed86aafdaae67b5cb4b2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1607, + "startColumn": 3, + "charOffset": 46198, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1605, + "startColumn": 3, + "charOffset": 46156, + "charLength": 2, + "snippet": { + "text": "\n\t\tuint16_t slot = openContainer.index;\n\t\tif (container->getID() == ITEM_BROWSEFIELD) {\n\t\t\tuint16_t containerSize = container->size() - 1;\n\t\t\tuint16_t pageEnd = openContainer.index + container->capacity() - 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8e656bc17a32e3815e92c5be43a08857b7db4b07e62fc7050754ba8150a70ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1608, + "startColumn": 29, + "charOffset": 46272, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 1606, + "startColumn": 29, + "charOffset": 46157, + "charLength": 9, + "snippet": { + "text": "\t\tuint16_t slot = openContainer.index;\n\t\tif (container->getID() == ITEM_BROWSEFIELD) {\n\t\t\tuint16_t containerSize = container->size() - 1;\n\t\t\tuint16_t pageEnd = openContainer.index + container->capacity() - 1;\n\t\t\tif (containerSize > pageEnd) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7c099c3e1634d9a0cc6708fcf0a8c566a9ed6182795f3f0082315acfa7e5416" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1609, + "startColumn": 23, + "charOffset": 46317, + "charLength": 13, + "snippet": { + "text": "openContainer" + } + }, + "contextRegion": { + "startLine": 1607, + "startColumn": 23, + "charOffset": 46196, + "charLength": 13, + "snippet": { + "text": "\t\tif (container->getID() == ITEM_BROWSEFIELD) {\n\t\t\tuint16_t containerSize = container->size() - 1;\n\t\t\tuint16_t pageEnd = openContainer.index + container->capacity() - 1;\n\t\t\tif (containerSize > pageEnd) {\n\t\t\t\tslot = pageEnd;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9dad6c15a8960ef8c95f0678135c3fe5ad5f00b6807e19cb33759b0fab504a8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1623, + "startColumn": 65, + "charOffset": 46761, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 1621, + "startColumn": 65, + "charOffset": 46694, + "charLength": 9, + "snippet": { + "text": "}\n\nvoid Player::sendUpdateContainerItem(std::shared_ptr container, uint16_t slot, std::shared_ptr newItem) {\n\tif (!client) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efabd2e58cbb8139c2b1a80514ebfb994e7a252f0f19ea2e100708b48bb4e481" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1623, + "startColumn": 113, + "charOffset": 46809, + "charLength": 7, + "snippet": { + "text": "newItem" + } + }, + "contextRegion": { + "startLine": 1621, + "startColumn": 113, + "charOffset": 46694, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid Player::sendUpdateContainerItem(std::shared_ptr container, uint16_t slot, std::shared_ptr newItem) {\n\tif (!client) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e16a7f9dd4d7f425d7ae4216598c8190a40463aa94f2f5ef081c0d3a5678e7d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1624, + "startColumn": 6, + "charOffset": 46825, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1622, + "startColumn": 6, + "charOffset": 46696, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::sendUpdateContainerItem(std::shared_ptr container, uint16_t slot, std::shared_ptr newItem) {\n\tif (!client) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80d1a2110b17d97a7aaf8b3de421f37694331279924cbd25a19ea07de142d1e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1628, + "startColumn": 2, + "charOffset": 46851, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1626, + "startColumn": 2, + "charOffset": 46846, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &it : openContainers) {\n\t\tconst OpenContainer &openContainer = it.second;\n\t\tif (openContainer.container != container) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4939daa51e0a980224a7530274b6891f0d141de9550d5ae3287960706832a5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1638, + "startColumn": 22, + "charOffset": 47080, + "charLength": 13, + "snippet": { + "text": "openContainer" + } + }, + "contextRegion": { + "startLine": 1636, + "startColumn": 22, + "charOffset": 47054, + "charLength": 13, + "snippet": { + "text": "\t\t}\n\n\t\tuint16_t pageEnd = openContainer.index + container->capacity();\n\t\tif (slot >= pageEnd) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d631181bd5537cc9926eb328dfff6fad7c16b0c090d9b47163d3c377d54d004b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1647, + "startColumn": 65, + "charOffset": 47298, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 1645, + "startColumn": 65, + "charOffset": 47231, + "charLength": 9, + "snippet": { + "text": "}\n\nvoid Player::sendRemoveContainerItem(std::shared_ptr container, uint16_t slot) {\n\tif (!client) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4c827f72d69c84c41a39b3d7a5167f73ad7d398a5075a91278c1f280b04ed20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1648, + "startColumn": 6, + "charOffset": 47331, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1646, + "startColumn": 6, + "charOffset": 47233, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::sendRemoveContainerItem(std::shared_ptr container, uint16_t slot) {\n\tif (!client) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d1f95323d44b5223edf6aa646149b5f9cf94bc19e03ba4680f283efb4ad4a25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1652, + "startColumn": 6, + "charOffset": 47361, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1650, + "startColumn": 6, + "charOffset": 47352, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!container) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e6f9df633fcce299bb5fd5c547f455771d987cdd256e2ce5e168a9d3aea3d95" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1656, + "startColumn": 2, + "charOffset": 47390, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1654, + "startColumn": 2, + "charOffset": 47385, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (auto &it : openContainers) {\n\t\tOpenContainer &openContainer = it.second;\n\t\tif (openContainer.container != container) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5cd6a342be58eb805b0fe94f99a406cec958616e98206a8acbd19c351a6e7149" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'onCreatureAppear' has cognitive complexity of 30 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1703, + "startColumn": 14, + "charOffset": 48932, + "charLength": 16, + "snippet": { + "text": "onCreatureAppear" + } + }, + "contextRegion": { + "startLine": 1701, + "startColumn": 14, + "charOffset": 48916, + "charLength": 16, + "snippet": { + "text": "}\n\nvoid Player::onCreatureAppear(std::shared_ptr creature, bool isLogin) {\n\tCreature::onCreatureAppear(creature, isLogin);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3437c653ff84981d3178e297a47885b5b26b776095f7d9d27eb683eeb37775ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1714, + "startColumn": 3, + "charOffset": 49279, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1712, + "startColumn": 3, + "charOffset": 49234, + "charLength": 3, + "snippet": { + "text": "\t\trefreshCyclopediaMonsterTracker(false);\n\n\t\tfor (const auto &condition : storedConditionList) {\n\t\t\taddCondition(condition);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "849eb464cda31f9dbe5d0f5f1c87ac266c2093b18c84f7536102189199bd7320" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1715, + "startColumn": 4, + "charOffset": 49334, + "charLength": 12, + "snippet": { + "text": "addCondition" + } + }, + "contextRegion": { + "startLine": 1713, + "startColumn": 4, + "charOffset": 49276, + "charLength": 12, + "snippet": { + "text": "\n\t\tfor (const auto &condition : storedConditionList) {\n\t\t\taddCondition(condition);\n\t\t}\n\t\tstoredConditionList.clear();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "839035d14fdebe0659caa612f28b641ef33730fd36f630cd6fdbfc34d23f7227" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'offlineTime' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1733, + "startColumn": 11, + "charOffset": 49775, + "charLength": 11, + "snippet": { + "text": "offlineTime" + } + }, + "contextRegion": { + "startLine": 1731, + "startColumn": 11, + "charOffset": 49760, + "charLength": 11, + "snippet": { + "text": "\t\t}\n\n\t\tint32_t offlineTime;\n\t\tif (getLastLogout() != 0) {\n\t\t\t// Not counting more than 21 days to prevent overflow when multiplying with 1000 (for milliseconds)." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7f1148ca717b6458156eb76c41749ec255d3a2353eecba25358235995456149" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'time_t' (aka 'long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1736, + "startColumn": 36, + "charOffset": 49957, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 1734, + "startColumn": 36, + "charOffset": 49788, + "charLength": 4, + "snippet": { + "text": "\t\tif (getLastLogout() != 0) {\n\t\t\t// Not counting more than 21 days to prevent overflow when multiplying with 1000 (for milliseconds).\n\t\t\tofflineTime = std::min(time(nullptr) - getLastLogout(), 86400 * 21);\n\t\t} else {\n\t\t\tofflineTime = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02a7f5aa35b3abbc5b2ed822498fab67c73bfb42056529ac5cdf0c69c8f9b92c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1736, + "startColumn": 36, + "charOffset": 49957, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 1734, + "startColumn": 36, + "charOffset": 49788, + "charLength": 4, + "snippet": { + "text": "\t\tif (getLastLogout() != 0) {\n\t\t\t// Not counting more than 21 days to prevent overflow when multiplying with 1000 (for milliseconds).\n\t\t\tofflineTime = std::min(time(nullptr) - getLastLogout(), 86400 * 21);\n\t\t} else {\n\t\t\tofflineTime = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "016e8c08bfff1c9c46eb88b6c99c42a62856c2018a78639c9e475a7350b99a4b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1736, + "startColumn": 36, + "charOffset": 49957, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 1734, + "startColumn": 36, + "charOffset": 49788, + "charLength": 4, + "snippet": { + "text": "\t\tif (getLastLogout() != 0) {\n\t\t\t// Not counting more than 21 days to prevent overflow when multiplying with 1000 (for milliseconds).\n\t\t\tofflineTime = std::min(time(nullptr) - getLastLogout(), 86400 * 21);\n\t\t} else {\n\t\t\tofflineTime = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff200c9a1a63951e6992bbe1ab6240f9c304cd260d485f5578cfce85366993a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "86400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1736, + "startColumn": 69, + "charOffset": 49990, + "charLength": 5, + "snippet": { + "text": "86400" + } + }, + "contextRegion": { + "startLine": 1734, + "startColumn": 69, + "charOffset": 49788, + "charLength": 5, + "snippet": { + "text": "\t\tif (getLastLogout() != 0) {\n\t\t\t// Not counting more than 21 days to prevent overflow when multiplying with 1000 (for milliseconds).\n\t\t\tofflineTime = std::min(time(nullptr) - getLastLogout(), 86400 * 21);\n\t\t} else {\n\t\t\tofflineTime = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f81ec1d394e6a4343a2f3ef207dcd64da48ce55e6e97571321f6c094ff6c43e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "21 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1736, + "startColumn": 77, + "charOffset": 49998, + "charLength": 2, + "snippet": { + "text": "21" + } + }, + "contextRegion": { + "startLine": 1734, + "startColumn": 77, + "charOffset": 49788, + "charLength": 2, + "snippet": { + "text": "\t\tif (getLastLogout() != 0) {\n\t\t\t// Not counting more than 21 days to prevent overflow when multiplying with 1000 (for milliseconds).\n\t\t\tofflineTime = std::min(time(nullptr) - getLastLogout(), 86400 * 21);\n\t\t} else {\n\t\t\tofflineTime = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb793d5d2964dbbc6a7bb3fb7f0565d0ebba54f318a8fafa08eed2fee0ad5ccb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1741, + "startColumn": 3, + "charOffset": 50041, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1739, + "startColumn": 3, + "charOffset": 50034, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfor (const std::shared_ptr &condition : getMuteConditions()) {\n\t\t\tcondition->setTicks(condition->getTicks() - (offlineTime * 1000));\n\t\t\tif (condition->getTicks() <= 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9f5becb9446205a63a49025dd7b873cac4d00521690ad7be957aa27d377f9dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1742, + "startColumn": 63, + "charOffset": 50177, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 1740, + "startColumn": 63, + "charOffset": 50038, + "charLength": 4, + "snippet": { + "text": "\n\t\tfor (const std::shared_ptr &condition : getMuteConditions()) {\n\t\t\tcondition->setTicks(condition->getTicks() - (offlineTime * 1000));\n\t\t\tif (condition->getTicks() <= 0) {\n\t\t\t\tremoveCondition(condition);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "948557149395750aa1a9144c3c46a33e88eb77f42e8bc9b03ecbecfb0b7af04a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1751, + "startColumn": 4, + "charOffset": 50473, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1749, + "startColumn": 4, + "charOffset": 50297, + "charLength": 3, + "snippet": { + "text": "\t\tIOLoginData::updateOnlineStatus(guid, true);\n\t\tif (getLevel() < g_configManager().getNumber(ADVENTURERSBLESSING_LEVEL, __FUNCTION__) && getVocationId() > VOCATION_NONE) {\n\t\t\tfor (uint8_t i = 2; i <= 6; i++) {\n\t\t\t\tif (!hasBlessing(i)) {\n\t\t\t\t\taddBlessing(i, 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "351aa89fc9bcec4a8d0fdf04ef61177a3cce5769f03e02c679293acbcbb94f3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1751, + "startColumn": 29, + "charOffset": 50498, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 1749, + "startColumn": 29, + "charOffset": 50297, + "charLength": 1, + "snippet": { + "text": "\t\tIOLoginData::updateOnlineStatus(guid, true);\n\t\tif (getLevel() < g_configManager().getNumber(ADVENTURERSBLESSING_LEVEL, __FUNCTION__) && getVocationId() > VOCATION_NONE) {\n\t\t\tfor (uint8_t i = 2; i <= 6; i++) {\n\t\t\t\tif (!hasBlessing(i)) {\n\t\t\t\t\taddBlessing(i, 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "580ed018834be239157ffd472c5bf25b510442cb980db9b39e846417b091cfc7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1760, + "startColumn": 4, + "charOffset": 50632, + "charLength": 11, + "snippet": { + "text": "toggleMount" + } + }, + "contextRegion": { + "startLine": 1758, + "startColumn": 4, + "charOffset": 50596, + "charLength": 11, + "snippet": { + "text": "\n\t\tif (getCurrentMount() != 0) {\n\t\t\ttoggleMount(true);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1b48cc7078eb0d155113b67a807963605aa916c348326d61ee5526a0bb1ef58" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1786, + "startColumn": 4, + "charOffset": 51193, + "charLength": 19, + "snippet": { + "text": "setAttackedCreature" + } + }, + "contextRegion": { + "startLine": 1784, + "startColumn": 4, + "charOffset": 51078, + "charLength": 19, + "snippet": { + "text": "\tif (zone == ZONE_PROTECTION) {\n\t\tif (getAttackedCreature() && !hasFlag(PlayerFlags_t::IgnoreProtectionZone)) {\n\t\t\tsetAttackedCreature(nullptr);\n\t\t\tonAttackedCreatureDisappear(false);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ae9eaf09845d9482789d3fbd687fdc7e73e3b1c4d411e29e2da7a53091d9c5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1799, + "startColumn": 5, + "charOffset": 51706, + "charLength": 12, + "snippet": { + "text": "addCondition" + } + }, + "contextRegion": { + "startLine": 1797, + "startColumn": 5, + "charOffset": 51571, + "charLength": 12, + "snippet": { + "text": "\t\tif (ticks > 0) {\n\t\t\tif (const auto &condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_PACIFIED, ticks, 0)) {\n\t\t\t\taddCondition(condition);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb70facf55877b326330312f8f775f680d81c99a30080ac9016428f8ba9a9113" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1803, + "startColumn": 4, + "charOffset": 51763, + "charLength": 11, + "snippet": { + "text": "toggleMount" + } + }, + "contextRegion": { + "startLine": 1801, + "startColumn": 4, + "charOffset": 51736, + "charLength": 11, + "snippet": { + "text": "\t\t}\n\t\tif (wasMounted) {\n\t\t\ttoggleMount(true);\n\t\t\twasMounted = false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b6787b614a70760d2f538825bade2aca8bf11d34e55490a55aaf071ab13e18e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1820, + "startColumn": 6, + "charOffset": 52298, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1818, + "startColumn": 6, + "charOffset": 52184, + "charLength": 1, + "snippet": { + "text": "void Player::onAttackedCreatureChangeZone(ZoneType_t zone) {\n\tauto attackedCreature = getAttackedCreature();\n\tif (!attackedCreature) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0741f5f29a268bf7d7ac78ae5c1d4830299f0d0396523e390b9618b13fe4032d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1823, + "startColumn": 2, + "charOffset": 52333, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1821, + "startColumn": 2, + "charOffset": 52319, + "charLength": 2, + "snippet": { + "text": "\t\treturn;\n\t}\n\tif (zone == ZONE_PROTECTION) {\n\t\tif (!hasFlag(PlayerFlags_t::IgnoreProtectionZone)) {\n\t\t\tsetAttackedCreature(nullptr);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "894bb2aadda3a71fcc2f5e295ae8b787a997d295a0f560e1612a64d0e8c11b4f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1825, + "startColumn": 4, + "charOffset": 52422, + "charLength": 19, + "snippet": { + "text": "setAttackedCreature" + } + }, + "contextRegion": { + "startLine": 1823, + "startColumn": 4, + "charOffset": 52332, + "charLength": 19, + "snippet": { + "text": "\tif (zone == ZONE_PROTECTION) {\n\t\tif (!hasFlag(PlayerFlags_t::IgnoreProtectionZone)) {\n\t\t\tsetAttackedCreature(nullptr);\n\t\t\tonAttackedCreatureDisappear(false);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ebd81e6a4c8edeb509535749d350d47d093e319bc2e1016470d52a18711e04e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1831, + "startColumn": 5, + "charOffset": 52628, + "charLength": 19, + "snippet": { + "text": "setAttackedCreature" + } + }, + "contextRegion": { + "startLine": 1829, + "startColumn": 5, + "charOffset": 52529, + "charLength": 19, + "snippet": { + "text": "\t\tif (attackedCreature->getPlayer()) {\n\t\t\tif (!hasFlag(PlayerFlags_t::IgnoreProtectionZone)) {\n\t\t\t\tsetAttackedCreature(nullptr);\n\t\t\t\tonAttackedCreatureDisappear(false);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6d5bce27f2fe85a8a7fe39488afca323db1d1c5b224c45f9dbd4a3ef06ef879" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1838, + "startColumn": 4, + "charOffset": 52891, + "charLength": 19, + "snippet": { + "text": "setAttackedCreature" + } + }, + "contextRegion": { + "startLine": 1836, + "startColumn": 4, + "charOffset": 52790, + "charLength": 19, + "snippet": { + "text": "\t\t// attackedCreature can leave a pvp zone if not pzlocked\n\t\tif (attackedCreature->getPlayer()) {\n\t\t\tsetAttackedCreature(nullptr);\n\t\t\tonAttackedCreatureDisappear(false);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41302fac59a1d3333223333c4ffafbedc8b31ee1e940260aff3d5e1c2c0c729c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1852, + "startColumn": 14, + "charOffset": 53232, + "charLength": 10, + "snippet": { + "text": "leaveParty" + } + }, + "contextRegion": { + "startLine": 1850, + "startColumn": 14, + "charOffset": 53200, + "charLength": 10, + "snippet": { + "text": "\n\t\t\tif (m_party) {\n\t\t\t\tm_party->leaveParty(player);\n\t\t\t}\n\t\t\tif (guild) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0160c091174fb9941addf2c825ce3cb9117f260d088234210a161a15ec01e3f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1860, + "startColumn": 17, + "charOffset": 53407, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 1858, + "startColumn": 17, + "charOffset": 53312, + "charLength": 4, + "snippet": { + "text": "\t\t\tg_game().removePlayerUniqueLogin(player);\n\t\t\tloginPosition = getPosition();\n\t\t\tlastLogout = time(nullptr);\n\t\t\tg_logger().info(\"{} has logged out\", getName());\n\t\t\tg_chat().removeUserFromAllChannels(player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0241ca57b976b38861f262db5c1aed58b02a68d0436e0de42d8fca5101ec2d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1868, + "startColumn": 4, + "charOffset": 53630, + "charLength": 17, + "snippet": { + "text": "setFollowCreature" + } + }, + "contextRegion": { + "startLine": 1866, + "startColumn": 4, + "charOffset": 53602, + "charLength": 17, + "snippet": { + "text": "\n\t\tif (eventWalk != 0) {\n\t\t\tsetFollowCreature(nullptr);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e12b750ac5d59b97417ff5ec206bcc11b0d8f8fef518142b297ead5258ea0367" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1875, + "startColumn": 3, + "charOffset": 53732, + "charLength": 15, + "snippet": { + "text": "closeShopWindow" + } + }, + "contextRegion": { + "startLine": 1873, + "startColumn": 3, + "charOffset": 53725, + "charLength": 15, + "snippet": { + "text": "\t\t}\n\n\t\tcloseShopWindow();\n\n\t\tg_saveManager().savePlayer(player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f77b55764de01e9fd6d0c85a421a82f4c6699c1470b130f17bd59ea9e5c436e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1877, + "startColumn": 19, + "charOffset": 53770, + "charLength": 10, + "snippet": { + "text": "savePlayer" + } + }, + "contextRegion": { + "startLine": 1875, + "startColumn": 19, + "charOffset": 53730, + "charLength": 10, + "snippet": { + "text": "\t\tcloseShopWindow();\n\n\t\tg_saveManager().savePlayer(player);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d552c1d483194e667e6fba88e5fa922e5604d76a86b6f099704ff9ce21a1f182" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1886, + "startColumn": 50, + "charOffset": 53923, + "charLength": 3, + "snippet": { + "text": "npc" + } + }, + "contextRegion": { + "startLine": 1884, + "startColumn": 50, + "charOffset": 53871, + "charLength": 3, + "snippet": { + "text": "}\n\nbool Player::openShopWindow(std::shared_ptr npc, const std::vector &shopItems) {\n\tBenchmark brenchmark;\n\tif (!npc) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc49a2988f9c307761c5a45b74717f680c04ee9733bb092b9bc860968e06d81b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1888, + "startColumn": 6, + "charOffset": 53999, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1886, + "startColumn": 6, + "charOffset": 53874, + "charLength": 1, + "snippet": { + "text": "bool Player::openShopWindow(std::shared_ptr npc, const std::vector &shopItems) {\n\tBenchmark brenchmark;\n\tif (!npc) {\n\t\tg_logger().error(\"[Player::openShopWindow] - Npc is wrong or nullptr\");\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11df3193ddda027a3d5d05675525a9e34ec79f2ad5cdd2d1a90aab40d506539c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1911, + "startColumn": 6, + "charOffset": 54620, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1909, + "startColumn": 6, + "charOffset": 54581, + "charLength": 1, + "snippet": { + "text": "\nbool Player::closeShopWindow() {\n\tif (!shopOwner) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "158e3b9f1a0f3617b81587f4108f872f78f3d3e2651fb3ad6feaee7637fb7ea1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'onCreatureMove' has cognitive complexity of 27 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1943, + "startColumn": 14, + "charOffset": 55381, + "charLength": 14, + "snippet": { + "text": "onCreatureMove" + } + }, + "contextRegion": { + "startLine": 1941, + "startColumn": 14, + "charOffset": 55365, + "charLength": 14, + "snippet": { + "text": "}\n\nvoid Player::onCreatureMove(const std::shared_ptr &creature, const std::shared_ptr &newTile, const Position &newPos, const std::shared_ptr &oldTile, const Position &oldPos, bool teleport) {\n\tCreature::onCreatureMove(creature, newTile, newPos, oldTile, oldPos, teleport);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5bdcd3219a07ecae3075d48cd27d3d89e7fcd5675bfe16bafa2aa21241dee68a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-todo", + "ruleIndex": 545, + "kind": "fail", + "level": "warning", + "message": { + "text": "missing username/bug in TODO" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1969, + "startColumn": 3, + "charOffset": 56439, + "charLength": 36, + "snippet": { + "text": "// TODO: This shouldn't be hardcoded" + } + }, + "contextRegion": { + "startLine": 1967, + "startColumn": 3, + "charOffset": 56383, + "charLength": 36, + "snippet": { + "text": "\t// close modal windows\n\tif (!modalWindows.empty()) {\n\t\t// TODO: This shouldn't be hardcoded\n\t\tfor (uint32_t modalWindowId : modalWindows) {\n\t\t\tif (modalWindowId == std::numeric_limits::max()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a374eda3af90b93d5335f0c56b959117770cb0f48b91f7fccf9cd9f65587137" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1970, + "startColumn": 3, + "charOffset": 56478, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1968, + "startColumn": 3, + "charOffset": 56407, + "charLength": 3, + "snippet": { + "text": "\tif (!modalWindows.empty()) {\n\t\t// TODO: This shouldn't be hardcoded\n\t\tfor (uint32_t modalWindowId : modalWindows) {\n\t\t\tif (modalWindowId == std::numeric_limits::max()) {\n\t\t\t\tsendTextMessage(MESSAGE_EVENT_ADVANCE, \"Offline training aborted.\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5866a76b60e6862f4c1d6320751001a7ef1c23e334882e2f29e3676aa898ee1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 1993, + "startColumn": 5, + "charOffset": 57137, + "charLength": 12, + "snippet": { + "text": "addCondition" + } + }, + "contextRegion": { + "startLine": 1991, + "startColumn": 5, + "charOffset": 57002, + "charLength": 12, + "snippet": { + "text": "\t\tif (ticks > 0) {\n\t\t\tif (const auto &condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_PACIFIED, ticks, 0)) {\n\t\t\t\taddCondition(condition);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "edd7aa69354f6b57943a7de59c5c62e1a22b24dbaa5fdc8d4cba284fa9b954f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2000, + "startColumn": 2, + "charOffset": 57212, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1998, + "startColumn": 2, + "charOffset": 57176, + "charLength": 3, + "snippet": { + "text": "\nvoid Player::onEquipInventory() {\n\tfor (int32_t slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; ++slot) {\n\t\tstd::shared_ptr item = inventory[slot];\n\t\tif (item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae7faf113f6cfdea3f4caa94fce0faec006d1df0dfff332c8ffaf4a97faac48e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2001, + "startColumn": 32, + "charOffset": 57316, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 1999, + "startColumn": 32, + "charOffset": 57177, + "charLength": 9, + "snippet": { + "text": "void Player::onEquipInventory() {\n\tfor (int32_t slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; ++slot) {\n\t\tstd::shared_ptr item = inventory[slot];\n\t\tif (item) {\n\t\t\titem->startDecaying();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "859b4d43071404c2f5ac1887ee91761d43ab68636dff4252848d5dfcd4ed14ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2004, + "startColumn": 19, + "charOffset": 57391, + "charLength": 13, + "snippet": { + "text": "onPlayerEquip" + } + }, + "contextRegion": { + "startLine": 2002, + "startColumn": 19, + "charOffset": 57333, + "charLength": 13, + "snippet": { + "text": "\t\tif (item) {\n\t\t\titem->startDecaying();\n\t\t\tg_moveEvents().onPlayerEquip(getPlayer(), item, static_cast(slot), false);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1cacf92aadd30663e1909a24f092ca4bcbbb4ab206a739df720a341356a68933" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2010, + "startColumn": 2, + "charOffset": 57507, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2008, + "startColumn": 2, + "charOffset": 57469, + "charLength": 3, + "snippet": { + "text": "\nvoid Player::onDeEquipInventory() {\n\tfor (int32_t slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; ++slot) {\n\t\tstd::shared_ptr item = inventory[slot];\n\t\tif (item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "320de15b0afeabcfc4b319106afb8db3bb787f0c3d65abe3932a4b5ce18f95b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2011, + "startColumn": 32, + "charOffset": 57611, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 2009, + "startColumn": 32, + "charOffset": 57470, + "charLength": 9, + "snippet": { + "text": "void Player::onDeEquipInventory() {\n\tfor (int32_t slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; ++slot) {\n\t\tstd::shared_ptr item = inventory[slot];\n\t\tif (item) {\n\t\t\tg_moveEvents().onPlayerDeEquip(getPlayer(), item, static_cast(slot));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1a6d179937c9c416afa26fe0e50dfea5cfbe3a2b9c27f4b068c5bc5459a1043" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2013, + "startColumn": 19, + "charOffset": 57660, + "charLength": 15, + "snippet": { + "text": "onPlayerDeEquip" + } + }, + "contextRegion": { + "startLine": 2011, + "startColumn": 19, + "charOffset": 57580, + "charLength": 15, + "snippet": { + "text": "\t\tstd::shared_ptr item = inventory[slot];\n\t\tif (item) {\n\t\t\tg_moveEvents().onPlayerDeEquip(getPlayer(), item, static_cast(slot));\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17aa7d1eaa0d12dce52a6f324aa9732e418733fd5bbccbd60378281d29c5e339" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2020, + "startColumn": 18, + "charOffset": 57826, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 2018, + "startColumn": 18, + "charOffset": 57734, + "charLength": 4, + "snippet": { + "text": "// container\nvoid Player::onAddContainerItem(std::shared_ptr item) {\n\tcheckTradeState(item);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "441dfe71f82764c9b9d752d677195ad4b96deb5937b4560f0b4bd534ca8a16f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2023, + "startColumn": 96, + "charOffset": 57931, + "charLength": 7, + "snippet": { + "text": "oldItem" + } + }, + "contextRegion": { + "startLine": 2021, + "startColumn": 96, + "charOffset": 57833, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid Player::onUpdateContainerItem(std::shared_ptr container, std::shared_ptr oldItem, std::shared_ptr newItem) {\n\tif (oldItem != newItem) {\n\t\tonRemoveContainerItem(container, oldItem);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1db3c022292502f8f0a3a30f1f8789b5fcf557f8f9613b1a61280a0e44d294b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2023, + "startColumn": 127, + "charOffset": 57962, + "charLength": 7, + "snippet": { + "text": "newItem" + } + }, + "contextRegion": { + "startLine": 2021, + "startColumn": 127, + "charOffset": 57833, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid Player::onUpdateContainerItem(std::shared_ptr container, std::shared_ptr oldItem, std::shared_ptr newItem) {\n\tif (oldItem != newItem) {\n\t\tonRemoveContainerItem(container, oldItem);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a1b00d4ad5efbc0bb74a104e98a56d41bcd4ff64a212ad92c5d1171f1a747d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'container' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2025, + "startColumn": 25, + "charOffset": 58024, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 2023, + "startColumn": 25, + "charOffset": 57836, + "charLength": 9, + "snippet": { + "text": "void Player::onUpdateContainerItem(std::shared_ptr container, std::shared_ptr oldItem, std::shared_ptr newItem) {\n\tif (oldItem != newItem) {\n\t\tonRemoveContainerItem(container, oldItem);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "452968e899ffb05957bd1f56fe858ff624a237733a3c590c97c603d90c087389" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2033, + "startColumn": 63, + "charOffset": 58182, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 2031, + "startColumn": 63, + "charOffset": 58117, + "charLength": 9, + "snippet": { + "text": "}\n\nvoid Player::onRemoveContainerItem(std::shared_ptr container, std::shared_ptr item) {\n\tif (tradeState != TRADE_TRANSFER) {\n\t\tcheckTradeState(item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be6148d8f5f4b4ddc498ae43a8be6e69a0ca01b2c676f9bd619cc38178e82a4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2033, + "startColumn": 96, + "charOffset": 58215, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 2031, + "startColumn": 96, + "charOffset": 58117, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Player::onRemoveContainerItem(std::shared_ptr container, std::shared_ptr item) {\n\tif (tradeState != TRADE_TRANSFER) {\n\t\tcheckTradeState(item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36e04f95339eaf18efe509393c7eb60fe4a8782a105284f72d6c2c7750afe1b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2047, + "startColumn": 58, + "charOffset": 58568, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 2045, + "startColumn": 58, + "charOffset": 58508, + "charLength": 9, + "snippet": { + "text": "}\n\nvoid Player::onCloseContainer(std::shared_ptr container) {\n\tif (!client) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45b3c8211a14774ee3896ab20c8120fe952e3e74156db92ba14051e12707a3f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2048, + "startColumn": 6, + "charOffset": 58586, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2046, + "startColumn": 6, + "charOffset": 58510, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::onCloseContainer(std::shared_ptr container) {\n\tif (!client) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "855eb9195fdfbbacd4021423c2180c376965c60fe1e7398cab18812eb8a3a15b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2052, + "startColumn": 2, + "charOffset": 58612, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2050, + "startColumn": 2, + "charOffset": 58607, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &it : openContainers) {\n\t\tif (it.second.container == container) {\n\t\t\tclient->sendCloseContainer(it.first);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75ab7af99dc5f9d34c763756cac8d4004599e00509e50618ad38f266de776d18" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2059, + "startColumn": 57, + "charOffset": 58801, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 2057, + "startColumn": 57, + "charOffset": 58742, + "charLength": 9, + "snippet": { + "text": "}\n\nvoid Player::onSendContainer(std::shared_ptr container) {\n\tif (!client || !container) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b33091c360278e378ba4ff32057acee743492abce6cb4e12e9733c572fd0aca8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2060, + "startColumn": 6, + "charOffset": 58819, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2058, + "startColumn": 6, + "charOffset": 58744, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::onSendContainer(std::shared_ptr container) {\n\tif (!client || !container) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "532b7c81fd2264002008b395384f5e0b107984a784826dee3cda8c703069f895" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2060, + "startColumn": 17, + "charOffset": 58830, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2058, + "startColumn": 17, + "charOffset": 58744, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::onSendContainer(std::shared_ptr container) {\n\tif (!client || !container) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d6754f61e06f131615a1c60799d747233a17192ee34030dd7be53b9b9d21ce9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2065, + "startColumn": 2, + "charOffset": 58901, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2063, + "startColumn": 2, + "charOffset": 58857, + "charLength": 3, + "snippet": { + "text": "\n\tbool hasParent = container->hasParent();\n\tfor (const auto &it : openContainers) {\n\t\tconst OpenContainer &openContainer = it.second;\n\t\tif (openContainer.container == container) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7fdf466fbd8a243e662d03ff5a388b8a43c69903f2fa742b8e513da62da7ad84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2074, + "startColumn": 58, + "charOffset": 59196, + "charLength": 7, + "snippet": { + "text": "oldItem" + } + }, + "contextRegion": { + "startLine": 2072, + "startColumn": 58, + "charOffset": 59125, + "charLength": 7, + "snippet": { + "text": "\n// inventory\nvoid Player::onUpdateInventoryItem(std::shared_ptr oldItem, std::shared_ptr newItem) {\n\tif (oldItem != newItem) {\n\t\tonRemoveInventoryItem(oldItem);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc8250b3ce0b10c32833e5556efe202a6a4d031fc136b371e86ab652f2cdeeee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2074, + "startColumn": 89, + "charOffset": 59227, + "charLength": 7, + "snippet": { + "text": "newItem" + } + }, + "contextRegion": { + "startLine": 2072, + "startColumn": 89, + "charOffset": 59125, + "charLength": 7, + "snippet": { + "text": "\n// inventory\nvoid Player::onUpdateInventoryItem(std::shared_ptr oldItem, std::shared_ptr newItem) {\n\tif (oldItem != newItem) {\n\t\tonRemoveInventoryItem(oldItem);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d5db1782a0f9ecadb9d69cf47588001ab8db1b69404b774a958dd0746fc240f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2084, + "startColumn": 58, + "charOffset": 59431, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 2082, + "startColumn": 58, + "charOffset": 59371, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Player::onRemoveInventoryItem(std::shared_ptr item) {\n\tif (tradeState != TRADE_TRANSFER) {\n\t\tcheckTradeState(item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a6652ff5dad0ab5bfdd434b026eddcbec7d648fae10edd46f6a5621a1cafcd4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2099, + "startColumn": 52, + "charOffset": 59816, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 2097, + "startColumn": 52, + "charOffset": 59762, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Player::checkTradeState(std::shared_ptr item) {\n\tif (!tradeItem || tradeState == TRADE_TRANSFER) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94502efc4c2325baa7a9c401d349db414886c15bb87d1e51b7edff022dda09e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2100, + "startColumn": 6, + "charOffset": 59829, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2098, + "startColumn": 6, + "charOffset": 59764, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::checkTradeState(std::shared_ptr item) {\n\tif (!tradeItem || tradeState == TRADE_TRANSFER) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4b6adfe9e75444ff0207c3eb733d6de83b1dc0ca4e49cb9eea611ee13a468f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2108, + "startColumn": 3, + "charOffset": 60084, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 2106, + "startColumn": 3, + "charOffset": 59974, + "charLength": 5, + "snippet": { + "text": "\t} else {\n\t\tstd::shared_ptr container = std::dynamic_pointer_cast(item->getParent());\n\t\twhile (container) {\n\t\t\tif (container == tradeItem) {\n\t\t\t\tg_game().internalCloseTrade(static_self_cast());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74184263d31231b76e183321c0316026913fb60c29cecc5f364b94e48e2fd8f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'container' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2108, + "startColumn": 10, + "charOffset": 60091, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 2106, + "startColumn": 10, + "charOffset": 59974, + "charLength": 9, + "snippet": { + "text": "\t} else {\n\t\tstd::shared_ptr container = std::dynamic_pointer_cast(item->getParent());\n\t\twhile (container) {\n\t\t\tif (container == tradeItem) {\n\t\t\t\tg_game().internalCloseTrade(static_self_cast());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76ad939a8f203c23028c82e89c6b9db7f4b980340d0510f708f854ceec69e63c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'task' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2125, + "startColumn": 13, + "charOffset": 60474, + "charLength": 4, + "snippet": { + "text": "task" + } + }, + "contextRegion": { + "startLine": 2123, + "startColumn": 13, + "charOffset": 60458, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\twalkTask = task;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3cdbbd0fc1af869d23b284f5e1669fdd8db7727af8b663861bcfd609ed749a63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2128, + "startColumn": 52, + "charOffset": 60534, + "charLength": 4, + "snippet": { + "text": "task" + } + }, + "contextRegion": { + "startLine": 2126, + "startColumn": 52, + "charOffset": 60480, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Player::setNextWalkTask(std::shared_ptr task) {\n\tif (nextStepEvent != 0) {\n\t\tg_dispatcher().stopEvent(nextStepEvent);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9674fcf0be28c910d2313d32f5fdaa78ff70236ac12a7b5f382e9a44de4ae17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2135, + "startColumn": 19, + "charOffset": 60668, + "charLength": 12, + "snippet": { + "text": "g_dispatcher" + } + }, + "contextRegion": { + "startLine": 2133, + "startColumn": 19, + "charOffset": 60636, + "charLength": 12, + "snippet": { + "text": "\n\tif (task) {\n\t\tnextStepEvent = g_dispatcher().scheduleEvent(task);\n\t\tresetIdleTime();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b84811003c862c6595f8f153182afee02b5e48d83e23de869c7b41cb2fcb105" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2140, + "startColumn": 54, + "charOffset": 60782, + "charLength": 4, + "snippet": { + "text": "task" + } + }, + "contextRegion": { + "startLine": 2138, + "startColumn": 54, + "charOffset": 60726, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Player::setNextActionTask(std::shared_ptr task, bool resetIdleTime /*= true */) {\n\tif (actionTaskEvent != 0) {\n\t\tg_dispatcher().stopEvent(actionTaskEvent);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bdd6ef7b3d7d889b5f76b52b3f53c2b22b64a36c9f27ec458460e05902003e59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2151, + "startColumn": 21, + "charOffset": 61069, + "charLength": 12, + "snippet": { + "text": "g_dispatcher" + } + }, + "contextRegion": { + "startLine": 2149, + "startColumn": 21, + "charOffset": 61035, + "charLength": 12, + "snippet": { + "text": "\n\tif (task) {\n\t\tactionTaskEvent = g_dispatcher().scheduleEvent(task);\n\t\tif (resetIdleTime) {\n\t\t\tthis->resetIdleTime();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00584fd1ba97afb2f6d6432e9acfe3ac82a0778d904c794cf24c0b9b2865c562" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2158, + "startColumn": 58, + "charOffset": 61221, + "charLength": 4, + "snippet": { + "text": "task" + } + }, + "contextRegion": { + "startLine": 2156, + "startColumn": 58, + "charOffset": 61161, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Player::setNextActionPushTask(std::shared_ptr task) {\n\tif (actionTaskEventPush != 0) {\n\t\tg_dispatcher().stopEvent(actionTaskEventPush);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "729b1011e9b63e0ebba95eca6225744d58e6fce6d30307220bcea967dcbce14a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2165, + "startColumn": 25, + "charOffset": 61379, + "charLength": 12, + "snippet": { + "text": "g_dispatcher" + } + }, + "contextRegion": { + "startLine": 2163, + "startColumn": 25, + "charOffset": 61341, + "charLength": 12, + "snippet": { + "text": "\n\tif (task) {\n\t\tactionTaskEventPush = g_dispatcher().scheduleEvent(task);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59feb4bc2194c883749d5556b1db8f51764d120d80fbe6891e64a685d7e0dda4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2169, + "startColumn": 60, + "charOffset": 61480, + "charLength": 4, + "snippet": { + "text": "task" + } + }, + "contextRegion": { + "startLine": 2167, + "startColumn": 60, + "charOffset": 61418, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Player::setNextPotionActionTask(std::shared_ptr task) {\n\tif (actionPotionTaskEvent != 0) {\n\t\tg_dispatcher().stopEvent(actionPotionTaskEvent);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d3c94d9431acfc6558970c939f1b6ff07c86e78ee978df7113bb58cd143bf87" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2178, + "startColumn": 27, + "charOffset": 61662, + "charLength": 12, + "snippet": { + "text": "g_dispatcher" + } + }, + "contextRegion": { + "startLine": 2176, + "startColumn": 27, + "charOffset": 61622, + "charLength": 12, + "snippet": { + "text": "\n\tif (task) {\n\t\tactionPotionTaskEvent = g_dispatcher().scheduleEvent(task);\n\t\t// resetIdleTime();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e1bfbb9e13f28e9e5d90073d94371144090cab9055cc16a27228b3c5f050ac3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2184, + "startColumn": 9, + "charOffset": 61779, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 2182, + "startColumn": 9, + "charOffset": 61725, + "charLength": 3, + "snippet": { + "text": "\nuint32_t Player::getNextActionTime() const {\n\treturn std::max(SCHEDULER_MINTICKS, nextAction - OTSYS_TIME());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3634a83b6f99db4d3d50872a5b1980601be1e4a9270f3cd6bd6504d6fa07c6de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2188, + "startColumn": 9, + "charOffset": 61907, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 2186, + "startColumn": 9, + "charOffset": 61847, + "charLength": 3, + "snippet": { + "text": "\nuint32_t Player::getNextPotionActionTime() const {\n\treturn std::max(SCHEDULER_MINTICKS, nextPotionAction - OTSYS_TIME());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "849ec76eef15d4d9e75f87bee588b92af5421427509b3e0442a6639acb26bd73" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1500 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2205, + "startColumn": 28, + "charOffset": 62299, + "charLength": 4, + "snippet": { + "text": "1500" + } + }, + "contextRegion": { + "startLine": 2203, + "startColumn": 28, + "charOffset": 62238, + "charLength": 4, + "snippet": { + "text": "\n\tMessageBufferTicks += interval;\n\tif (MessageBufferTicks >= 1500) {\n\t\tMessageBufferTicks = 0;\n\t\taddMessageBuffer();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "441bed6d66f29fdc01197a3b792ac255f14dea1ad3fb5e09e8a02cb35df558cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2216, + "startColumn": 14, + "charOffset": 62614, + "charLength": 8, + "snippet": { + "text": "interval" + } + }, + "contextRegion": { + "startLine": 2214, + "startColumn": 14, + "charOffset": 62470, + "charLength": 8, + "snippet": { + "text": "\tauto playerTile = getTile();\n\tconst bool vipStaysOnline = isVip() && g_configManager().getBoolean(VIP_STAY_ONLINE, __FUNCTION__);\n\tidleTime += interval;\n\tif (playerTile && !playerTile->hasFlag(TILESTATE_NOLOGOUT) && !isAccessPlayer() && !isExerciseTraining() && !vipStaysOnline) {\n\t\tconst int32_t kickAfterMinutes = g_configManager().getNumber(KICK_AFTER_MINUTES, __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e96dc066ae6c557ad9f4f90ed59997fe10cb4fc8e67e26369f70d246fd17c0d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2219, + "startColumn": 3, + "charOffset": 62852, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2217, + "startColumn": 3, + "charOffset": 62624, + "charLength": 2, + "snippet": { + "text": "\tif (playerTile && !playerTile->hasFlag(TILESTATE_NOLOGOUT) && !isAccessPlayer() && !isExerciseTraining() && !vipStaysOnline) {\n\t\tconst int32_t kickAfterMinutes = g_configManager().getNumber(KICK_AFTER_MINUTES, __FUNCTION__);\n\t\tif (idleTime > (kickAfterMinutes * 60000) + 60000) {\n\t\t\tremovePlayer(true);\n\t\t} else if (client && idleTime == 60000 * kickAfterMinutes) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a638a378fd457fce59cc5fc10bc9aa289a22e410b9670b857e6a9973ef840ba9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2219, + "startColumn": 38, + "charOffset": 62887, + "charLength": 5, + "snippet": { + "text": "60000" + } + }, + "contextRegion": { + "startLine": 2217, + "startColumn": 38, + "charOffset": 62624, + "charLength": 5, + "snippet": { + "text": "\tif (playerTile && !playerTile->hasFlag(TILESTATE_NOLOGOUT) && !isAccessPlayer() && !isExerciseTraining() && !vipStaysOnline) {\n\t\tconst int32_t kickAfterMinutes = g_configManager().getNumber(KICK_AFTER_MINUTES, __FUNCTION__);\n\t\tif (idleTime > (kickAfterMinutes * 60000) + 60000) {\n\t\t\tremovePlayer(true);\n\t\t} else if (client && idleTime == 60000 * kickAfterMinutes) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc207c04cf630a72b35cba987dfcb9b97bacdbe27e0a694905bec9cbadc327ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2219, + "startColumn": 47, + "charOffset": 62896, + "charLength": 5, + "snippet": { + "text": "60000" + } + }, + "contextRegion": { + "startLine": 2217, + "startColumn": 47, + "charOffset": 62624, + "charLength": 5, + "snippet": { + "text": "\tif (playerTile && !playerTile->hasFlag(TILESTATE_NOLOGOUT) && !isAccessPlayer() && !isExerciseTraining() && !vipStaysOnline) {\n\t\tconst int32_t kickAfterMinutes = g_configManager().getNumber(KICK_AFTER_MINUTES, __FUNCTION__);\n\t\tif (idleTime > (kickAfterMinutes * 60000) + 60000) {\n\t\t\tremovePlayer(true);\n\t\t} else if (client && idleTime == 60000 * kickAfterMinutes) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1881bed98313282d16d022f9344c92016ecbb49e476b70403052819e0071af3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2221, + "startColumn": 36, + "charOffset": 62963, + "charLength": 5, + "snippet": { + "text": "60000" + } + }, + "contextRegion": { + "startLine": 2219, + "startColumn": 36, + "charOffset": 62850, + "charLength": 5, + "snippet": { + "text": "\t\tif (idleTime > (kickAfterMinutes * 60000) + 60000) {\n\t\t\tremovePlayer(true);\n\t\t} else if (client && idleTime == 60000 * kickAfterMinutes) {\n\t\t\tstd::ostringstream ss;\n\t\t\tss << \"There was no variation in your behaviour for \" << kickAfterMinutes << \" minutes. You will be disconnected in one minute if there is no change in your actions until then.\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3b54513eaab09b7d0d4964766fca9269287d396683ec465824cfb23e38845dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2229, + "startColumn": 30, + "charOffset": 63369, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 2227, + "startColumn": 30, + "charOffset": 63280, + "charLength": 4, + "snippet": { + "text": "\n\tif (g_game().getWorldType() != WORLD_TYPE_PVP_ENFORCED) {\n\t\tcheckSkullTicks(interval / 1000);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "875b3c543ae9bbfa31e6df5bc5c5084c5228a029e54b1186d7e4e20a5ac56262" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2232, + "startColumn": 25, + "charOffset": 63404, + "charLength": 8, + "snippet": { + "text": "interval" + } + }, + "contextRegion": { + "startLine": 2230, + "startColumn": 25, + "charOffset": 63376, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\taddOfflineTrainingTime(interval);\n\tif (lastStatsTrainingTime != getOfflineTrainingTime() / 60 / 1000) {\n\t\tsendStats();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad57b99e2e9288c8a04455b1ad0157ff8c36227621f0c105a6d6ad1432922f29" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2233, + "startColumn": 58, + "charOffset": 63472, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 2231, + "startColumn": 58, + "charOffset": 63379, + "charLength": 2, + "snippet": { + "text": "\n\taddOfflineTrainingTime(interval);\n\tif (lastStatsTrainingTime != getOfflineTrainingTime() / 60 / 1000) {\n\t\tsendStats();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5934e03abee29538f836ab13a4d79423d6f8556b4d4f0c9f758baaba8c914553" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2233, + "startColumn": 63, + "charOffset": 63477, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 2231, + "startColumn": 63, + "charOffset": 63379, + "charLength": 4, + "snippet": { + "text": "\n\taddOfflineTrainingTime(interval);\n\tif (lastStatsTrainingTime != getOfflineTrainingTime() / 60 / 1000) {\n\t\tsendStats();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "409c374b026739054a3ac22f5dfaa5691f2cfbec9922b60dca306ce21c40e78a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2247, + "startColumn": 2, + "charOffset": 63684, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2245, + "startColumn": 2, + "charOffset": 63658, + "charLength": 3, + "snippet": { + "text": "\n\tint32_t muteTicks = 0;\n\tfor (const std::shared_ptr &condition : conditions) {\n\t\tif (condition->getType() == CONDITION_MUTED && condition->getTicks() > muteTicks) {\n\t\t\tmuteTicks = condition->getTicks();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b0c823c31efdff5b941b25e223d143e7f2a1f0341697b2150e26d21198eef2b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2252, + "startColumn": 44, + "charOffset": 63923, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 2250, + "startColumn": 44, + "charOffset": 63873, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t}\n\treturn static_cast(muteTicks) / 1000;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2324b768ae2c2ef3caa99234afaca35e3a3baf558ac419eb6dc85d25c38781dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2275, + "startColumn": 24, + "charOffset": 64613, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2273, + "startColumn": 24, + "charOffset": 64584, + "charLength": 1, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tuint32_t muteTime = 5 * muteCount * muteCount;\n\t\t\tmuteCountMap[guid] = muteCount + 1;\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_MUTED, muteTime * 1000, 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26dd4a4929a44f2e20ea3a90868113e456770e93271a3419cf2b6faf9dfea90c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2277, + "startColumn": 108, + "charOffset": 64786, + "charLength": 8, + "snippet": { + "text": "muteTime" + } + }, + "contextRegion": { + "startLine": 2275, + "startColumn": 108, + "charOffset": 64590, + "charLength": 8, + "snippet": { + "text": "\t\t\tuint32_t muteTime = 5 * muteCount * muteCount;\n\t\t\tmuteCountMap[guid] = muteCount + 1;\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_MUTED, muteTime * 1000, 0);\n\t\t\taddCondition(condition);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca6f3f1b4c9d42439fae69e195effa68ce8fdc01cfd8b056650d06c06edde697" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2277, + "startColumn": 119, + "charOffset": 64797, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 2275, + "startColumn": 119, + "charOffset": 64590, + "charLength": 4, + "snippet": { + "text": "\t\t\tuint32_t muteTime = 5 * muteCount * muteCount;\n\t\t\tmuteCountMap[guid] = muteCount + 1;\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_MUTED, muteTime * 1000, 0);\n\t\t\taddCondition(condition);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95b9a946d3aa0ccb908a55070687c5e3940239c26f57f09cafcec0bc8f466404" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2278, + "startColumn": 4, + "charOffset": 64810, + "charLength": 12, + "snippet": { + "text": "addCondition" + } + }, + "contextRegion": { + "startLine": 2276, + "startColumn": 4, + "charOffset": 64640, + "charLength": 12, + "snippet": { + "text": "\t\t\tmuteCountMap[guid] = muteCount + 1;\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_MUTED, muteTime * 1000, 0);\n\t\t\taddCondition(condition);\n\n\t\t\tstd::ostringstream ss;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78acf1c2a09308460c937c20cdb670d7af50271b2c54279680d740de51a45d57" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2288, + "startColumn": 76, + "charOffset": 65131, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2286, + "startColumn": 76, + "charOffset": 64976, + "charLength": 3, + "snippet": { + "text": "\nvoid Player::drainHealth(std::shared_ptr attacker, int32_t damage) {\n\tif (PLAYER_SOUND_HEALTH_CHANGE >= static_cast(uniform_random(1, 100))) {\n\t\tg_game().sendSingleSoundEffect(static_self_cast()->getPosition(), sex == PLAYERSEX_FEMALE ? SoundEffect_t::HUMAN_FEMALE_BARK : SoundEffect_t::HUMAN_MALE_BARK, getPlayer());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1dec39c586fb81fdb335c7c4d0c6e2d092edb34c818e9645de33e092d668f437" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2320, + "startColumn": 2, + "charOffset": 66141, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 2318, + "startColumn": 2, + "charOffset": 66108, + "charLength": 5, + "snippet": { + "text": "\n\tbool sendUpdateStats = false;\n\twhile ((manaSpent + amount) >= nextReqMana) {\n\t\tamount -= nextReqMana - manaSpent;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f365ff295d488eb409125612b8509afaa265fd9d0acf4fdf2a0c2cfcdf1ff2a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'amount' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2320, + "startColumn": 9, + "charOffset": 66148, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 2318, + "startColumn": 9, + "charOffset": 66108, + "charLength": 1, + "snippet": { + "text": "\n\tbool sendUpdateStats = false;\n\twhile ((manaSpent + amount) >= nextReqMana) {\n\t\tamount -= nextReqMana - manaSpent;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31c35aeacc6f2ca11fffc169ba48f50e8c5aecd5e7d77bbee80a911a69c57d4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2331, + "startColumn": 22, + "charOffset": 66462, + "charLength": 13, + "snippet": { + "text": "playerAdvance" + } + }, + "contextRegion": { + "startLine": 2329, + "startColumn": 22, + "charOffset": 66393, + "charLength": 13, + "snippet": { + "text": "\t\tsendTakeScreenshot(SCREENSHOT_TYPE_SKILLUP);\n\n\t\tg_creatureEvents().playerAdvance(static_self_cast(), SKILL_MAGLEVEL, magLevel - 1, magLevel);\n\t\tsendTakeScreenshot(SCREENSHOT_TYPE_SKILLUP);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "540994bc02ca79759bd05f4e29ce5c3a0c3da5b27a12a71aea42eea6e9c0495b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-12", + "ruleIndex": 424, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-12: signed char and unsigned char type shall only be used for the storage and use of numeric values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2344, + "startColumn": 10, + "charOffset": 66787, + "charLength": 10, + "snippet": { + "text": "oldPercent" + } + }, + "contextRegion": { + "startLine": 2342, + "startColumn": 10, + "charOffset": 66755, + "charLength": 10, + "snippet": { + "text": "\tmanaSpent += amount;\n\n\tuint8_t oldPercent = magLevelPercent;\n\tif (nextReqMana > currReqMana) {\n\t\tmagLevelPercent = Player::getPercentLevel(manaSpent, nextReqMana);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e22f329ddef36559bcdd06165da4e46178c685d196c9d060b56950c34931200" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2344, + "startColumn": 23, + "charOffset": 66800, + "charLength": 15, + "snippet": { + "text": "magLevelPercent" + } + }, + "contextRegion": { + "startLine": 2342, + "startColumn": 23, + "charOffset": 66755, + "charLength": 15, + "snippet": { + "text": "\tmanaSpent += amount;\n\n\tuint8_t oldPercent = magLevelPercent;\n\tif (nextReqMana > currReqMana) {\n\t\tmagLevelPercent = Player::getPercentLevel(manaSpent, nextReqMana);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de2525c1b5533dfecd69f9eee5ac4dff177b54e0823a040b2fe4c276a80ef2eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2344, + "startColumn": 23, + "charOffset": 66800, + "charLength": 15, + "snippet": { + "text": "magLevelPercent" + } + }, + "contextRegion": { + "startLine": 2342, + "startColumn": 23, + "charOffset": 66755, + "charLength": 15, + "snippet": { + "text": "\tmanaSpent += amount;\n\n\tuint8_t oldPercent = magLevelPercent;\n\tif (nextReqMana > currReqMana) {\n\t\tmagLevelPercent = Player::getPercentLevel(manaSpent, nextReqMana);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a8c92380e528cc16e161a73328810d6c742ff0afdaf7a408750c0deb6dd6b72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2348, + "startColumn": 21, + "charOffset": 66950, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 2346, + "startColumn": 21, + "charOffset": 66851, + "charLength": 1, + "snippet": { + "text": "\t\tmagLevelPercent = Player::getPercentLevel(manaSpent, nextReqMana);\n\t} else {\n\t\tmagLevelPercent = 0;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d7f2ee880eb5166f2820863bd8ce06d02fcdbcba61c8da806f0fe5be7fbc5fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2351, + "startColumn": 6, + "charOffset": 66962, + "charLength": 10, + "snippet": { + "text": "oldPercent" + } + }, + "contextRegion": { + "startLine": 2349, + "startColumn": 6, + "charOffset": 66953, + "charLength": 10, + "snippet": { + "text": "\t}\n\n\tif (oldPercent != magLevelPercent) {\n\t\tsendUpdateStats = true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d56b4adc3779bebe042fe8158c1a9b0bec714cac84e99c90cd1b24bb816a05d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'addExperience' has cognitive complexity of 39 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2361, + "startColumn": 14, + "charOffset": 67099, + "charLength": 13, + "snippet": { + "text": "addExperience" + } + }, + "contextRegion": { + "startLine": 2359, + "startColumn": 14, + "charOffset": 67083, + "charLength": 13, + "snippet": { + "text": "}\n\nvoid Player::addExperience(std::shared_ptr target, uint64_t exp, bool sendText /* = false*/) {\n\tuint64_t currLevelExp = Player::getExpForLevel(level);\n\tuint64_t nextLevelExp = Player::getExpForLevel(level + 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3bce732009e585dbeafe9be244a7077d38b64ae3c6058881bc740abb53f81722" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2361, + "startColumn": 54, + "charOffset": 67139, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 2359, + "startColumn": 54, + "charOffset": 67083, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Player::addExperience(std::shared_ptr target, uint64_t exp, bool sendText /* = false*/) {\n\tuint64_t currLevelExp = Player::getExpForLevel(level);\n\tuint64_t nextLevelExp = Player::getExpForLevel(level + 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "595695454890ff3ea4ee856bc41c4686e12cade81d90ebad45319232dca4406b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2382, + "startColumn": 51, + "charOffset": 67961, + "charLength": 6, + "snippet": { + "text": "rawExp" + } + }, + "contextRegion": { + "startLine": 2380, + "startColumn": 51, + "charOffset": 67747, + "charLength": 6, + "snippet": { + "text": "\tstd::map attrs({ { \"player\", getName() }, { \"level\", std::to_string(getLevel()) }, { \"rate\", std::to_string(rate) } });\n\tif (sendText) {\n\t\tg_metrics().addCounter(\"player_experience_raw\", rawExp, attrs);\n\t\tg_metrics().addCounter(\"player_experience_actual\", exp, attrs);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13107b2405487f7c71b14e49666d62fe8c4470a44ac48c5dfeaef2c2f93ec793" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2382, + "startColumn": 51, + "charOffset": 67961, + "charLength": 6, + "snippet": { + "text": "rawExp" + } + }, + "contextRegion": { + "startLine": 2380, + "startColumn": 51, + "charOffset": 67747, + "charLength": 6, + "snippet": { + "text": "\tstd::map attrs({ { \"player\", getName() }, { \"level\", std::to_string(getLevel()) }, { \"rate\", std::to_string(rate) } });\n\tif (sendText) {\n\t\tg_metrics().addCounter(\"player_experience_raw\", rawExp, attrs);\n\t\tg_metrics().addCounter(\"player_experience_actual\", exp, attrs);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "059720de8a1ee356bd31eb18f206a714e959b35435b0ed276064089fb474d33c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2383, + "startColumn": 54, + "charOffset": 68030, + "charLength": 3, + "snippet": { + "text": "exp" + } + }, + "contextRegion": { + "startLine": 2381, + "startColumn": 54, + "charOffset": 67894, + "charLength": 3, + "snippet": { + "text": "\tif (sendText) {\n\t\tg_metrics().addCounter(\"player_experience_raw\", rawExp, attrs);\n\t\tg_metrics().addCounter(\"player_experience_actual\", exp, attrs);\n\t} else {\n\t\tg_metrics().addCounter(\"player_experience_bonus_raw\", rawExp, attrs);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2c627fa5ac3d83e0523b2c0f30cb9f0bf8bfcebf86e826f0d120159cfd59c8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2383, + "startColumn": 54, + "charOffset": 68030, + "charLength": 3, + "snippet": { + "text": "exp" + } + }, + "contextRegion": { + "startLine": 2381, + "startColumn": 54, + "charOffset": 67894, + "charLength": 3, + "snippet": { + "text": "\tif (sendText) {\n\t\tg_metrics().addCounter(\"player_experience_raw\", rawExp, attrs);\n\t\tg_metrics().addCounter(\"player_experience_actual\", exp, attrs);\n\t} else {\n\t\tg_metrics().addCounter(\"player_experience_bonus_raw\", rawExp, attrs);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c08795053d524b83d0fb5ec36cb9f3e8c713643f62a0823fdd98d182c67bfdfc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2385, + "startColumn": 57, + "charOffset": 68109, + "charLength": 6, + "snippet": { + "text": "rawExp" + } + }, + "contextRegion": { + "startLine": 2383, + "startColumn": 57, + "charOffset": 67977, + "charLength": 6, + "snippet": { + "text": "\t\tg_metrics().addCounter(\"player_experience_actual\", exp, attrs);\n\t} else {\n\t\tg_metrics().addCounter(\"player_experience_bonus_raw\", rawExp, attrs);\n\t\tg_metrics().addCounter(\"player_experience_bonus_actual\", exp, attrs);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a95fad7f54c974a29d87841cd2bd3525d7e8fc2aadba4aca1f38774fd927f330" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2385, + "startColumn": 57, + "charOffset": 68109, + "charLength": 6, + "snippet": { + "text": "rawExp" + } + }, + "contextRegion": { + "startLine": 2383, + "startColumn": 57, + "charOffset": 67977, + "charLength": 6, + "snippet": { + "text": "\t\tg_metrics().addCounter(\"player_experience_actual\", exp, attrs);\n\t} else {\n\t\tg_metrics().addCounter(\"player_experience_bonus_raw\", rawExp, attrs);\n\t\tg_metrics().addCounter(\"player_experience_bonus_actual\", exp, attrs);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c29375b25b53ed43cebe16ca5a1d879b23ad0706bb1c00c4b4ff24e0ec71e49a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2386, + "startColumn": 60, + "charOffset": 68184, + "charLength": 3, + "snippet": { + "text": "exp" + } + }, + "contextRegion": { + "startLine": 2384, + "startColumn": 60, + "charOffset": 68043, + "charLength": 3, + "snippet": { + "text": "\t} else {\n\t\tg_metrics().addCounter(\"player_experience_bonus_raw\", rawExp, attrs);\n\t\tg_metrics().addCounter(\"player_experience_bonus_actual\", exp, attrs);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86323d314aa6dc5205f8558c44fef26cf455f3eeb947f83fc6b00196b1a4de79" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2386, + "startColumn": 60, + "charOffset": 68184, + "charLength": 3, + "snippet": { + "text": "exp" + } + }, + "contextRegion": { + "startLine": 2384, + "startColumn": 60, + "charOffset": 68043, + "charLength": 3, + "snippet": { + "text": "\t} else {\n\t\tg_metrics().addCounter(\"player_experience_bonus_raw\", rawExp, attrs);\n\t\tg_metrics().addCounter(\"player_experience_bonus_actual\", exp, attrs);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3bbdffd2726667e3a582178bf4b827f1ba5ecf43967453f473b73eb8ead787a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'uint64_t' (aka 'unsigned long')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2393, + "startColumn": 10, + "charOffset": 68466, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 2391, + "startColumn": 10, + "charOffset": 68331, + "charLength": 1, + "snippet": { + "text": "\tbool handleHazardExperience = monster && monster->getHazard() && getHazardSystemPoints() > 0;\n\tif (handleHazardExperience) {\n\t\texp += (exp * (1.75 * getHazardSystemPoints() * g_configManager().getFloat(HAZARD_EXP_BONUS_MULTIPLIER, __FUNCTION__))) / 100.;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db88cf11cc8256541ba02da7916d948ade612c95c945fdafa4810b88ae1afc64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2393, + "startColumn": 11, + "charOffset": 68467, + "charLength": 3, + "snippet": { + "text": "exp" + } + }, + "contextRegion": { + "startLine": 2391, + "startColumn": 11, + "charOffset": 68331, + "charLength": 3, + "snippet": { + "text": "\tbool handleHazardExperience = monster && monster->getHazard() && getHazardSystemPoints() > 0;\n\tif (handleHazardExperience) {\n\t\texp += (exp * (1.75 * getHazardSystemPoints() * g_configManager().getFloat(HAZARD_EXP_BONUS_MULTIPLIER, __FUNCTION__))) / 100.;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0fa9b279978b2e8d64d322ba83da7905bce4666840044e5eb6a54cf88392d7e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2393, + "startColumn": 11, + "charOffset": 68467, + "charLength": 3, + "snippet": { + "text": "exp" + } + }, + "contextRegion": { + "startLine": 2391, + "startColumn": 11, + "charOffset": 68331, + "charLength": 3, + "snippet": { + "text": "\tbool handleHazardExperience = monster && monster->getHazard() && getHazardSystemPoints() > 0;\n\tif (handleHazardExperience) {\n\t\texp += (exp * (1.75 * getHazardSystemPoints() * g_configManager().getFloat(HAZARD_EXP_BONUS_MULTIPLIER, __FUNCTION__))) / 100.;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0f8c428e66e9029abef186a48d5be4ed0fd4b57a1da951c25348d226d1dc338" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1.75 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2393, + "startColumn": 18, + "charOffset": 68474, + "charLength": 4, + "snippet": { + "text": "1.75" + } + }, + "contextRegion": { + "startLine": 2391, + "startColumn": 18, + "charOffset": 68331, + "charLength": 4, + "snippet": { + "text": "\tbool handleHazardExperience = monster && monster->getHazard() && getHazardSystemPoints() > 0;\n\tif (handleHazardExperience) {\n\t\texp += (exp * (1.75 * getHazardSystemPoints() * g_configManager().getFloat(HAZARD_EXP_BONUS_MULTIPLIER, __FUNCTION__))) / 100.;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e769d81316f19fac04a16081ddc8fbeadbdc05848892ce0d79a8da1970173a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2393, + "startColumn": 25, + "charOffset": 68481, + "charLength": 21, + "snippet": { + "text": "getHazardSystemPoints" + } + }, + "contextRegion": { + "startLine": 2391, + "startColumn": 25, + "charOffset": 68331, + "charLength": 21, + "snippet": { + "text": "\tbool handleHazardExperience = monster && monster->getHazard() && getHazardSystemPoints() > 0;\n\tif (handleHazardExperience) {\n\t\texp += (exp * (1.75 * getHazardSystemPoints() * g_configManager().getFloat(HAZARD_EXP_BONUS_MULTIPLIER, __FUNCTION__))) / 100.;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e46fa24164699208a4582263144aa9999ddf96d63993e5fcb37dc2192766a83" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2401, + "startColumn": 25, + "charOffset": 68763, + "charLength": 15, + "snippet": { + "text": "g_configManager" + } + }, + "contextRegion": { + "startLine": 2399, + "startColumn": 25, + "charOffset": 68629, + "charLength": 15, + "snippet": { + "text": "\t\tstd::string expString = fmt::format(\"{} experience point{}.\", exp, (exp != 1 ? \"s\" : \"\"));\n\t\tif (isVip()) {\n\t\t\tuint8_t expPercent = g_configManager().getNumber(VIP_BONUS_EXP, __FUNCTION__);\n\t\t\tif (expPercent > 0) {\n\t\t\t\texpString = expString + fmt::format(\" (VIP bonus {}%)\", expPercent > 100 ? 100 : expPercent);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8889695959a340bf4c5b30af00841e7bc44ce8870e3b16c8db3e9b463a1f6667" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2403, + "startColumn": 74, + "charOffset": 68919, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2401, + "startColumn": 74, + "charOffset": 68739, + "charLength": 3, + "snippet": { + "text": "\t\t\tuint8_t expPercent = g_configManager().getNumber(VIP_BONUS_EXP, __FUNCTION__);\n\t\t\tif (expPercent > 0) {\n\t\t\t\texpString = expString + fmt::format(\" (VIP bonus {}%)\", expPercent > 100 ? 100 : expPercent);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d08f171bac08891f3caef2006f8e8e7f79dfc769820870d9144a57daf3d1db75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2403, + "startColumn": 80, + "charOffset": 68925, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2401, + "startColumn": 80, + "charOffset": 68739, + "charLength": 3, + "snippet": { + "text": "\t\t\tuint8_t expPercent = g_configManager().getNumber(VIP_BONUS_EXP, __FUNCTION__);\n\t\t\tif (expPercent > 0) {\n\t\t\t\texpString = expString + fmt::format(\" (VIP bonus {}%)\", expPercent > 100 ? 100 : expPercent);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9030dfb2379a316696b4d04c112ed83580d11462daeb72b1ab28a4ce81dbde6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2409, + "startColumn": 27, + "charOffset": 69127, + "charLength": 3, + "snippet": { + "text": "exp" + } + }, + "contextRegion": { + "startLine": 2407, + "startColumn": 27, + "charOffset": 68954, + "charLength": 3, + "snippet": { + "text": "\t\tTextMessage message(MESSAGE_EXPERIENCE, \"You gained \" + expString + (handleHazardExperience ? \" (Hazard)\" : \"\"));\n\t\tmessage.position = position;\n\t\tmessage.primary.value = exp;\n\t\tmessage.primary.color = TEXTCOLOR_WHITE_EXP;\n\t\tsendTextMessage(message);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5378412eb0335ab33040e23c95275543b86d84004ada0eb7e6ea307ddba20d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2409, + "startColumn": 27, + "charOffset": 69127, + "charLength": 3, + "snippet": { + "text": "exp" + } + }, + "contextRegion": { + "startLine": 2407, + "startColumn": 27, + "charOffset": 68954, + "charLength": 3, + "snippet": { + "text": "\t\tTextMessage message(MESSAGE_EXPERIENCE, \"You gained \" + expString + (handleHazardExperience ? \" (Hazard)\" : \"\"));\n\t\tmessage.position = position;\n\t\tmessage.primary.value = exp;\n\t\tmessage.primary.color = TEXTCOLOR_WHITE_EXP;\n\t\tsendTextMessage(message);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc98be4fd9c8d7807ef462f9caef2f70f0310a429fadaa3468ba86d15b1eacaa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2414, + "startColumn": 14, + "charOffset": 69278, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 2412, + "startColumn": 14, + "charOffset": 69207, + "charLength": 5, + "snippet": { + "text": "\n\t\tauto spectators = Spectators().find(position);\n\t\tspectators.erase(static_self_cast());\n\t\tif (!spectators.empty()) {\n\t\t\tmessage.type = MESSAGE_EXPERIENCE_OTHERS;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "540994bc02ca79759bd05f4e29ce5c3a0c3da5b27a12a71aea42eea6e9c0495b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2418, + "startColumn": 4, + "charOffset": 69444, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2416, + "startColumn": 4, + "charOffset": 69342, + "charLength": 3, + "snippet": { + "text": "\t\t\tmessage.type = MESSAGE_EXPERIENCE_OTHERS;\n\t\t\tmessage.text = getName() + \" gained \" + expString;\n\t\t\tfor (const std::shared_ptr &spectator : spectators) {\n\t\t\t\tspectator->getPlayer()->sendTextMessage(message);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42fbb347e9a4d5621544e73550471d727f1b2f0b801dec331e73411ada56b0c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2425, + "startColumn": 2, + "charOffset": 69605, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 2423, + "startColumn": 2, + "charOffset": 69574, + "charLength": 5, + "snippet": { + "text": "\n\tuint32_t prevLevel = level;\n\twhile (experience >= nextLevelExp) {\n\t\t++level;\n\t\t// Player stats gain for vocations level <= 8" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f59772bae0fef00c44af137aa70a453159b0c9e500b79a04807b67528613cfd0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'nextLevelExp' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2425, + "startColumn": 9, + "charOffset": 69612, + "charLength": 10, + "snippet": { + "text": "experience" + } + }, + "contextRegion": { + "startLine": 2423, + "startColumn": 9, + "charOffset": 69574, + "charLength": 10, + "snippet": { + "text": "\n\tuint32_t prevLevel = level;\n\twhile (experience >= nextLevelExp) {\n\t\t++level;\n\t\t// Player stats gain for vocations level <= 8" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60452bc4a501f0a9ca339d9493188ec80dff2d57c4e880e27874c954e9f2c6ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2428, + "startColumn": 54, + "charOffset": 69754, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2426, + "startColumn": 54, + "charOffset": 69642, + "charLength": 1, + "snippet": { + "text": "\t\t++level;\n\t\t// Player stats gain for vocations level <= 8\n\t\tif (vocation->getId() != VOCATION_NONE && level <= 8) {\n\t\t\tconst auto &noneVocation = g_vocations().getVocation(VOCATION_NONE);\n\t\t\thealthMax += noneVocation->getHPGain();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75f20319870ab9c8638fd553076c6f173ff6415115420cbc5cd3029fb1fb7d31" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2430, + "startColumn": 17, + "charOffset": 69847, + "charLength": 12, + "snippet": { + "text": "noneVocation" + } + }, + "contextRegion": { + "startLine": 2428, + "startColumn": 17, + "charOffset": 69701, + "charLength": 12, + "snippet": { + "text": "\t\tif (vocation->getId() != VOCATION_NONE && level <= 8) {\n\t\t\tconst auto &noneVocation = g_vocations().getVocation(VOCATION_NONE);\n\t\t\thealthMax += noneVocation->getHPGain();\n\t\t\thealth += noneVocation->getHPGain();\n\t\t\tmanaMax += noneVocation->getManaGain();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "edcb7a4fb68a37709fff5b2dbdca46081ff8a5cea226752292f0e383dd2db20b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2431, + "startColumn": 14, + "charOffset": 69887, + "charLength": 12, + "snippet": { + "text": "noneVocation" + } + }, + "contextRegion": { + "startLine": 2429, + "startColumn": 14, + "charOffset": 69759, + "charLength": 12, + "snippet": { + "text": "\t\t\tconst auto &noneVocation = g_vocations().getVocation(VOCATION_NONE);\n\t\t\thealthMax += noneVocation->getHPGain();\n\t\t\thealth += noneVocation->getHPGain();\n\t\t\tmanaMax += noneVocation->getManaGain();\n\t\t\tmana += noneVocation->getManaGain();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc84195a401aed78a4bfb69e02170f843aa71ca279b1f3ad7cd3a73f18361e12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2436, + "startColumn": 17, + "charOffset": 70067, + "charLength": 8, + "snippet": { + "text": "vocation" + } + }, + "contextRegion": { + "startLine": 2434, + "startColumn": 17, + "charOffset": 69997, + "charLength": 8, + "snippet": { + "text": "\t\t\tcapacity += noneVocation->getCapGain();\n\t\t} else {\n\t\t\thealthMax += vocation->getHPGain();\n\t\t\thealth += vocation->getHPGain();\n\t\t\tmanaMax += vocation->getManaGain();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afd8f09d40496bf125b98f2f71f060bb8d1468ed6dd79e9f272d8b149bc7ffc9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2437, + "startColumn": 14, + "charOffset": 70103, + "charLength": 8, + "snippet": { + "text": "vocation" + } + }, + "contextRegion": { + "startLine": 2435, + "startColumn": 14, + "charOffset": 70040, + "charLength": 8, + "snippet": { + "text": "\t\t} else {\n\t\t\thealthMax += vocation->getHPGain();\n\t\t\thealth += vocation->getHPGain();\n\t\t\tmanaMax += vocation->getManaGain();\n\t\t\tmana += vocation->getManaGain();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "edcb7a4fb68a37709fff5b2dbdca46081ff8a5cea226752292f0e383dd2db20b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2465, + "startColumn": 22, + "charOffset": 70789, + "charLength": 13, + "snippet": { + "text": "playerAdvance" + } + }, + "contextRegion": { + "startLine": 2463, + "startColumn": 22, + "charOffset": 70763, + "charLength": 13, + "snippet": { + "text": "\t\t}\n\n\t\tg_creatureEvents().playerAdvance(static_self_cast(), SKILL_LEVEL, prevLevel, level);\n\n\t\tstd::ostringstream ss;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f408b154f6448739d91bc4a66cb11ff6b544195c9548b4823b7634b33af6662" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-12", + "ruleIndex": 424, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-12: signed char and unsigned char type shall only be used for the storage and use of numeric values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2474, + "startColumn": 3, + "charOffset": 71111, + "charLength": 12, + "snippet": { + "text": "levelPercent" + } + }, + "contextRegion": { + "startLine": 2472, + "startColumn": 3, + "charOffset": 71072, + "charLength": 12, + "snippet": { + "text": "\n\tif (nextLevelExp > currLevelExp) {\n\t\tlevelPercent = Player::getPercentLevel(experience - currLevelExp, nextLevelExp - currLevelExp);\n\t} else {\n\t\tlevelPercent = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a5ab0eaf9d4b54529d838c60720e8f7fc9b43e9dfe028b9e99068eefd207914a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2474, + "startColumn": 18, + "charOffset": 71126, + "charLength": 6, + "snippet": { + "text": "Player" + } + }, + "contextRegion": { + "startLine": 2472, + "startColumn": 18, + "charOffset": 71072, + "charLength": 6, + "snippet": { + "text": "\n\tif (nextLevelExp > currLevelExp) {\n\t\tlevelPercent = Player::getPercentLevel(experience - currLevelExp, nextLevelExp - currLevelExp);\n\t} else {\n\t\tlevelPercent = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90b068bdeecf2aa37bc8ef38ca78b98f5bbcb86ee0f4e395528415b6b7d8fb88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2474, + "startColumn": 18, + "charOffset": 71126, + "charLength": 6, + "snippet": { + "text": "Player" + } + }, + "contextRegion": { + "startLine": 2472, + "startColumn": 18, + "charOffset": 71072, + "charLength": 6, + "snippet": { + "text": "\n\tif (nextLevelExp > currLevelExp) {\n\t\tlevelPercent = Player::getPercentLevel(experience - currLevelExp, nextLevelExp - currLevelExp);\n\t} else {\n\t\tlevelPercent = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65cd03fb168bd646f0a9dd9f75cbfc9fde3b19b2834f2d25c68a4959f3f64b77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to signed type 'int64_t' (aka 'long') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2479, + "startColumn": 24, + "charOffset": 71277, + "charLength": 6, + "snippet": { + "text": "rawExp" + } + }, + "contextRegion": { + "startLine": 2477, + "startColumn": 24, + "charOffset": 71237, + "charLength": 6, + "snippet": { + "text": "\t}\n\tsendStats();\n\tsendExperienceTracker(rawExp, exp);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "485ad881cbd9530cccf1e7434254b2199ec784f44862ad711f974b2b100fe442" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to signed type 'int64_t' (aka 'long') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2479, + "startColumn": 32, + "charOffset": 71285, + "charLength": 3, + "snippet": { + "text": "exp" + } + }, + "contextRegion": { + "startLine": 2477, + "startColumn": 32, + "charOffset": 71237, + "charLength": 3, + "snippet": { + "text": "\t}\n\tsendStats();\n\tsendExperienceTracker(rawExp, exp);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "455ac2950c281d59bc198520f8de0036f8834df3308d49f820fdcaaf26c01d9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to signed type 'long' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2494, + "startColumn": 36, + "charOffset": 71721, + "charLength": 10, + "snippet": { + "text": "experience" + } + }, + "contextRegion": { + "startLine": 2492, + "startColumn": 36, + "charOffset": 71653, + "charLength": 10, + "snippet": { + "text": "\n\tuint64_t lostExp = experience;\n\texperience = std::max(0, experience - exp);\n\n\tif (sendText) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1366e07d1e585f45ec150663a0d2f903891e779990b9dd11fea3307963b91d35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2503, + "startColumn": 27, + "charOffset": 72006, + "charLength": 7, + "snippet": { + "text": "lostExp" + } + }, + "contextRegion": { + "startLine": 2501, + "startColumn": 27, + "charOffset": 71895, + "charLength": 7, + "snippet": { + "text": "\t\tTextMessage message(MESSAGE_EXPERIENCE, expString);\n\t\tmessage.position = position;\n\t\tmessage.primary.value = lostExp;\n\t\tmessage.primary.color = TEXTCOLOR_RED;\n\t\tsendTextMessage(message);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5c13f6d9a5297638a447dacd8e9d6d27a5c765d707599ace2889e59ac6ed71e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2503, + "startColumn": 27, + "charOffset": 72006, + "charLength": 7, + "snippet": { + "text": "lostExp" + } + }, + "contextRegion": { + "startLine": 2501, + "startColumn": 27, + "charOffset": 71895, + "charLength": 7, + "snippet": { + "text": "\t\tTextMessage message(MESSAGE_EXPERIENCE, expString);\n\t\tmessage.position = position;\n\t\tmessage.primary.value = lostExp;\n\t\tmessage.primary.color = TEXTCOLOR_RED;\n\t\tsendTextMessage(message);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d8c325fb08b00117e68495b979067b42f2e46144310e3bf32c6da15bcab7ddf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2508, + "startColumn": 14, + "charOffset": 72155, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 2506, + "startColumn": 14, + "charOffset": 72084, + "charLength": 5, + "snippet": { + "text": "\n\t\tauto spectators = Spectators().find(position);\n\t\tspectators.erase(static_self_cast());\n\t\tif (!spectators.empty()) {\n\t\t\tmessage.type = MESSAGE_EXPERIENCE_OTHERS;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b99db630054143ade07567cb7d6f1c3e05958887a3d8046ffcefd085376b52e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2512, + "startColumn": 4, + "charOffset": 72319, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2510, + "startColumn": 4, + "charOffset": 72219, + "charLength": 3, + "snippet": { + "text": "\t\t\tmessage.type = MESSAGE_EXPERIENCE_OTHERS;\n\t\t\tmessage.text = getName() + \" lost \" + expString;\n\t\t\tfor (const std::shared_ptr &spectator : spectators) {\n\t\t\t\tspectator->getPlayer()->sendTextMessage(message);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "849eb464cda31f9dbe5d0f5f1c87ac266c2093b18c84f7536102189199bd7320" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2521, + "startColumn": 2, + "charOffset": 72536, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 2519, + "startColumn": 2, + "charOffset": 72478, + "charLength": 5, + "snippet": { + "text": "\tuint64_t currLevelExp = Player::getExpForLevel(level);\n\n\twhile (level > 1 && experience < currLevelExp) {\n\t\t--level;\n\t\t// Player stats loss for vocations level <= 8" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69e8e6044ef539061207251544e5fc02f8caae6686182f92d5479dd7db98be41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'currLevelExp' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2521, + "startColumn": 9, + "charOffset": 72543, + "charLength": 5, + "snippet": { + "text": "level" + } + }, + "contextRegion": { + "startLine": 2519, + "startColumn": 9, + "charOffset": 72478, + "charLength": 5, + "snippet": { + "text": "\tuint64_t currLevelExp = Player::getExpForLevel(level);\n\n\twhile (level > 1 && experience < currLevelExp) {\n\t\t--level;\n\t\t// Player stats loss for vocations level <= 8" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6806eb16cd21e05a3f9ae3e87ce0ceb353403d9717f1d07a2e316d826c579551" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2524, + "startColumn": 54, + "charOffset": 72697, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2522, + "startColumn": 54, + "charOffset": 72585, + "charLength": 1, + "snippet": { + "text": "\t\t--level;\n\t\t// Player stats loss for vocations level <= 8\n\t\tif (vocation->getId() != VOCATION_NONE && level <= 8) {\n\t\t\tconst auto &noneVocation = g_vocations().getVocation(VOCATION_NONE);\n\t\t\thealthMax = std::max(0, healthMax - noneVocation->getHPGain());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9695549c453eb2b7041ab3082434f8329d4000bfcadfb486bd0ca0674c14bc7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2526, + "startColumn": 37, + "charOffset": 72810, + "charLength": 9, + "snippet": { + "text": "healthMax" + } + }, + "contextRegion": { + "startLine": 2524, + "startColumn": 37, + "charOffset": 72644, + "charLength": 9, + "snippet": { + "text": "\t\tif (vocation->getId() != VOCATION_NONE && level <= 8) {\n\t\t\tconst auto &noneVocation = g_vocations().getVocation(VOCATION_NONE);\n\t\t\thealthMax = std::max(0, healthMax - noneVocation->getHPGain());\n\t\t\tmanaMax = std::max(0, manaMax - noneVocation->getManaGain());\n\t\t\tcapacity = std::max(0, capacity - noneVocation->getCapGain());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a9ded20f0c34d891c6cc5534f374a8bb60a74a46234a5e5248c6f02098c2fdc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2527, + "startColumn": 35, + "charOffset": 72884, + "charLength": 7, + "snippet": { + "text": "manaMax" + } + }, + "contextRegion": { + "startLine": 2525, + "startColumn": 35, + "charOffset": 72702, + "charLength": 7, + "snippet": { + "text": "\t\t\tconst auto &noneVocation = g_vocations().getVocation(VOCATION_NONE);\n\t\t\thealthMax = std::max(0, healthMax - noneVocation->getHPGain());\n\t\t\tmanaMax = std::max(0, manaMax - noneVocation->getManaGain());\n\t\t\tcapacity = std::max(0, capacity - noneVocation->getCapGain());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b390dbbf26383904b232e65092747948b0d4c2eabe0263922b129ec0737ed3fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2528, + "startColumn": 36, + "charOffset": 72959, + "charLength": 8, + "snippet": { + "text": "capacity" + } + }, + "contextRegion": { + "startLine": 2526, + "startColumn": 36, + "charOffset": 72774, + "charLength": 8, + "snippet": { + "text": "\t\t\thealthMax = std::max(0, healthMax - noneVocation->getHPGain());\n\t\t\tmanaMax = std::max(0, manaMax - noneVocation->getManaGain());\n\t\t\tcapacity = std::max(0, capacity - noneVocation->getCapGain());\n\t\t} else {\n\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65d23119ec2ecd16ca5f9e3efe279263b7469d75dc8e8e51dcb48dc3ab8e4136" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2530, + "startColumn": 37, + "charOffset": 73046, + "charLength": 9, + "snippet": { + "text": "healthMax" + } + }, + "contextRegion": { + "startLine": 2528, + "startColumn": 37, + "charOffset": 72924, + "charLength": 9, + "snippet": { + "text": "\t\t\tcapacity = std::max(0, capacity - noneVocation->getCapGain());\n\t\t} else {\n\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\n\t\t\tmanaMax = std::max(0, manaMax - vocation->getManaGain());\n\t\t\tcapacity = std::max(0, capacity - vocation->getCapGain());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8805f06f30a714b37ac4c513fe12338ce2b1e264f560772bb26499c8dc6bdbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2531, + "startColumn": 35, + "charOffset": 73116, + "charLength": 7, + "snippet": { + "text": "manaMax" + } + }, + "contextRegion": { + "startLine": 2529, + "startColumn": 35, + "charOffset": 72999, + "charLength": 7, + "snippet": { + "text": "\t\t} else {\n\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\n\t\t\tmanaMax = std::max(0, manaMax - vocation->getManaGain());\n\t\t\tcapacity = std::max(0, capacity - vocation->getCapGain());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "097e07741d47b2fe748f3cef7d0ffe15612a5860cb6605924972a56273b88689" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2532, + "startColumn": 36, + "charOffset": 73187, + "charLength": 8, + "snippet": { + "text": "capacity" + } + }, + "contextRegion": { + "startLine": 2530, + "startColumn": 36, + "charOffset": 73010, + "charLength": 8, + "snippet": { + "text": "\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\n\t\t\tmanaMax = std::max(0, manaMax - vocation->getManaGain());\n\t\t\tcapacity = std::max(0, capacity - vocation->getCapGain());\n\t\t}\n\t\tcurrLevelExp = Player::getExpForLevel(level);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea068fd7e10b46b834232db98dc4e6e372ce9c70045e37603fee08e02eaf2c8b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-12", + "ruleIndex": 424, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-12: signed char and unsigned char type shall only be used for the storage and use of numeric values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2559, + "startColumn": 3, + "charOffset": 73894, + "charLength": 12, + "snippet": { + "text": "levelPercent" + } + }, + "contextRegion": { + "startLine": 2557, + "startColumn": 3, + "charOffset": 73796, + "charLength": 12, + "snippet": { + "text": "\tuint64_t nextLevelExp = Player::getExpForLevel(level + 1);\n\tif (nextLevelExp > currLevelExp) {\n\t\tlevelPercent = Player::getPercentLevel(experience - currLevelExp, nextLevelExp - currLevelExp);\n\t} else {\n\t\tlevelPercent = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fa4904da1ca533675726311495bda95d3c4545b1206960fc8d8b2111e4d7da9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2559, + "startColumn": 18, + "charOffset": 73909, + "charLength": 6, + "snippet": { + "text": "Player" + } + }, + "contextRegion": { + "startLine": 2557, + "startColumn": 18, + "charOffset": 73796, + "charLength": 6, + "snippet": { + "text": "\tuint64_t nextLevelExp = Player::getExpForLevel(level + 1);\n\tif (nextLevelExp > currLevelExp) {\n\t\tlevelPercent = Player::getPercentLevel(experience - currLevelExp, nextLevelExp - currLevelExp);\n\t} else {\n\t\tlevelPercent = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c50df584aa4790cd56d90e033fe0e902106d9de985a98e905b2619d5e2f988d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2559, + "startColumn": 18, + "charOffset": 73909, + "charLength": 6, + "snippet": { + "text": "Player" + } + }, + "contextRegion": { + "startLine": 2557, + "startColumn": 18, + "charOffset": 73796, + "charLength": 6, + "snippet": { + "text": "\tuint64_t nextLevelExp = Player::getExpForLevel(level + 1);\n\tif (nextLevelExp > currLevelExp) {\n\t\tlevelPercent = Player::getPercentLevel(experience - currLevelExp, nextLevelExp - currLevelExp);\n\t} else {\n\t\tlevelPercent = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "731970d5c7961e108092976b600a81bf4a0a087e250174e8689737f28debdce0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2569, + "startColumn": 10, + "charOffset": 74208, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 2567, + "startColumn": 10, + "charOffset": 74095, + "charLength": 1, + "snippet": { + "text": "double_t Player::getPercentLevel(uint64_t count, uint64_t nextLevelCount) {\n\tif (nextLevelCount == 0) {\n\t\treturn 0;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8e6e71a8d461aac282d1832b46e639ce0a9131f08f0d4d8cc8df3a8f3796ca5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2572, + "startColumn": 28, + "charOffset": 74242, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 2570, + "startColumn": 28, + "charOffset": 74211, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tdouble_t result = round(((count * 100.) / nextLevelCount) * 100.) / 100.;\n\tif (result > 100) {\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51f78ca0b85ae98c55daded825188be2d0cc9419cac60bcfda1acadf39dbc013" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2572, + "startColumn": 28, + "charOffset": 74242, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 2570, + "startColumn": 28, + "charOffset": 74211, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tdouble_t result = round(((count * 100.) / nextLevelCount) * 100.) / 100.;\n\tif (result > 100) {\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7270ece5ab016c40897e609d96e9764b21b5895bb43b3b84adeadab11e4ddf9b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2572, + "startColumn": 44, + "charOffset": 74258, + "charLength": 14, + "snippet": { + "text": "nextLevelCount" + } + }, + "contextRegion": { + "startLine": 2570, + "startColumn": 44, + "charOffset": 74211, + "charLength": 14, + "snippet": { + "text": "\t}\n\n\tdouble_t result = round(((count * 100.) / nextLevelCount) * 100.) / 100.;\n\tif (result > 100) {\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "123f991d67bd9d863568917a2325bf581babeb9c95249ddee5387d1b5ae07b75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2572, + "startColumn": 44, + "charOffset": 74258, + "charLength": 14, + "snippet": { + "text": "nextLevelCount" + } + }, + "contextRegion": { + "startLine": 2570, + "startColumn": 44, + "charOffset": 74211, + "charLength": 14, + "snippet": { + "text": "\t}\n\n\tdouble_t result = round(((count * 100.) / nextLevelCount) * 100.) / 100.;\n\tif (result > 100) {\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f94842886ce2bb2229742224fa803503e51b97672b347e36ba38d45c3c56d73" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2573, + "startColumn": 15, + "charOffset": 74304, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2571, + "startColumn": 15, + "charOffset": 74214, + "charLength": 3, + "snippet": { + "text": "\n\tdouble_t result = round(((count * 100.) / nextLevelCount) * 100.) / 100.;\n\tif (result > 100) {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80ca59b590167ac024bcb726907b3dfc675ad12f4aafd991deb8544bd809b6e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2573, + "startColumn": 15, + "charOffset": 74304, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2571, + "startColumn": 15, + "charOffset": 74214, + "charLength": 3, + "snippet": { + "text": "\n\tdouble_t result = round(((count * 100.) / nextLevelCount) * 100.) / 100.;\n\tif (result > 100) {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1cfaf2cea3532fc25258d98150d85be22866d9139c1574840a3a55d1178a36e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2574, + "startColumn": 10, + "charOffset": 74320, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 2572, + "startColumn": 10, + "charOffset": 74215, + "charLength": 1, + "snippet": { + "text": "\tdouble_t result = round(((count * 100.) / nextLevelCount) * 100.) / 100.;\n\tif (result > 100) {\n\t\treturn 0;\n\t}\n\treturn result;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "845d3ebb3726f695f998fcae9682a075bc6501eb0bb16a0ef0e943005b7df119" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2599, + "startColumn": 20, + "charOffset": 74790, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 2597, + "startColumn": 20, + "charOffset": 74719, + "charLength": 2, + "snippet": { + "text": "\t\tcase BLOCK_NONE: {\n\t\t\taddAttackSkillPoint = true;\n\t\t\tbloodHitCount = 30;\n\t\t\tshieldBlockCount = 30;\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64507189c4d16dce7dfcb4d91a69e26a24bb47a81299fa754b3d6a045fd13de5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2600, + "startColumn": 23, + "charOffset": 74816, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 2598, + "startColumn": 23, + "charOffset": 74740, + "charLength": 2, + "snippet": { + "text": "\t\t\taddAttackSkillPoint = true;\n\t\t\tbloodHitCount = 30;\n\t\t\tshieldBlockCount = 30;\n\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e0167d370878abd036b4223063f0480911f2b919102a83edc80e5f3ad30855f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2605, + "startColumn": 3, + "charOffset": 74859, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 2603, + "startColumn": 3, + "charOffset": 74834, + "charLength": 4, + "snippet": { + "text": "\n\t\tcase BLOCK_DEFENSE:\n\t\tcase BLOCK_ARMOR: {\n\t\t\t// need to draw blood every 30 hits\n\t\t\tif (bloodHitCount > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a5f967df2df7cdacaea89cf83bdac616c8591c385faa917912a5164dd4dba34d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in conditional return statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2631, + "startColumn": 10, + "charOffset": 75395, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 2629, + "startColumn": 10, + "charOffset": 75294, + "charLength": 4, + "snippet": { + "text": "\titem = inventory[CONST_SLOT_RIGHT];\n\tif (item && item->getWeaponType() == WEAPON_SHIELD) {\n\t\treturn true;\n\t}\n\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee1bf2d2c84b5d37d3cc4e6d0d5b9e32f041a57466130c171d3123e641e5a7c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2636, + "startColumn": 21, + "charOffset": 75442, + "charLength": 8, + "snippet": { + "text": "blockHit" + } + }, + "contextRegion": { + "startLine": 2634, + "startColumn": 21, + "charOffset": 75419, + "charLength": 8, + "snippet": { + "text": "}\n\nBlockType_t Player::blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense /* = false*/, bool checkArmor /* = false*/, bool field /* = false*/) {\n\tBlockType_t blockType = Creature::blockHit(attacker, combatType, damage, checkDefense, checkArmor, field);\n\tif (attacker) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79f3d8db0b4fcaf2b3b7ee8f49d95c10860fc297e03da20451a1d71f821a82a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'blockHit' has cognitive complexity of 51 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2636, + "startColumn": 21, + "charOffset": 75442, + "charLength": 8, + "snippet": { + "text": "blockHit" + } + }, + "contextRegion": { + "startLine": 2634, + "startColumn": 21, + "charOffset": 75419, + "charLength": 8, + "snippet": { + "text": "}\n\nBlockType_t Player::blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense /* = false*/, bool checkArmor /* = false*/, bool field /* = false*/) {\n\tBlockType_t blockType = Creature::blockHit(attacker, combatType, damage, checkDefense, checkArmor, field);\n\tif (attacker) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "102db57c7316e7d903aab7dea8fb4a46acdaf062865f0f2f5ced7c2689b5f2bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2652, + "startColumn": 33, + "charOffset": 76057, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 2650, + "startColumn": 33, + "charOffset": 76019, + "charLength": 9, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tstd::shared_ptr item = inventory[slot];\n\t\t\tif (!item) {\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70efd781b7dd6e4813b5b3be48fd9a5c6e216928bdad19b122590516a95ff50e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2653, + "startColumn": 8, + "charOffset": 76081, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2651, + "startColumn": 8, + "charOffset": 76024, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tstd::shared_ptr item = inventory[slot];\n\t\t\tif (!item) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d262840920ba1e09bf0cf0eef731816ca1fa3769926c24207df452af32925a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2659, + "startColumn": 36, + "charOffset": 76220, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2657, + "startColumn": 36, + "charOffset": 76110, + "charLength": 2, + "snippet": { + "text": "\t\t\tconst ItemType &it = Item::items[item->getID()];\n\t\t\tif (it.abilities) {\n\t\t\t\tconst int16_t &absorbPercent = it.abilities->absorbPercent[combatTypeToIndex(combatType)];\n\t\t\t\tauto charges = item->getAttribute(ItemAttribute_t::CHARGES);\n\t\t\t\tif (absorbPercent != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f938895f433d729b58e9e16be933fb43a90aefcbec0092fac50d7c4d723de99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2662, + "startColumn": 16, + "charOffset": 76400, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 2660, + "startColumn": 16, + "charOffset": 76280, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tauto charges = item->getAttribute(ItemAttribute_t::CHARGES);\n\t\t\t\tif (absorbPercent != 0) {\n\t\t\t\t\tdamage -= std::round(damage * (absorbPercent / 100.));\n\t\t\t\t\tif (charges != 0) {\n\t\t\t\t\t\tg_game().transformItem(item, item->getID(), charges - 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de186e185853d966cd20057fd12e6a99e3be4a7839e1fbd976eb8405fcd28603" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2662, + "startColumn": 27, + "charOffset": 76411, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 2660, + "startColumn": 27, + "charOffset": 76280, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tauto charges = item->getAttribute(ItemAttribute_t::CHARGES);\n\t\t\t\tif (absorbPercent != 0) {\n\t\t\t\t\tdamage -= std::round(damage * (absorbPercent / 100.));\n\t\t\t\t\tif (charges != 0) {\n\t\t\t\t\t\tg_game().transformItem(item, item->getID(), charges - 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59e74ccc13180f3407e1f94a11c4202db0e4a846d21334f2ca4a77a46b0dcd37" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2662, + "startColumn": 37, + "charOffset": 76421, + "charLength": 13, + "snippet": { + "text": "absorbPercent" + } + }, + "contextRegion": { + "startLine": 2660, + "startColumn": 37, + "charOffset": 76280, + "charLength": 13, + "snippet": { + "text": "\t\t\t\tauto charges = item->getAttribute(ItemAttribute_t::CHARGES);\n\t\t\t\tif (absorbPercent != 0) {\n\t\t\t\t\tdamage -= std::round(damage * (absorbPercent / 100.));\n\t\t\t\t\tif (charges != 0) {\n\t\t\t\t\t\tg_game().transformItem(item, item->getID(), charges - 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42643003af2717f0966de265dee5422fa11bf22ce2891235c915a08b5ca617d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2664, + "startColumn": 16, + "charOffset": 76485, + "charLength": 13, + "snippet": { + "text": "transformItem" + } + }, + "contextRegion": { + "startLine": 2662, + "startColumn": 16, + "charOffset": 76385, + "charLength": 13, + "snippet": { + "text": "\t\t\t\t\tdamage -= std::round(damage * (absorbPercent / 100.));\n\t\t\t\t\tif (charges != 0) {\n\t\t\t\t\t\tg_game().transformItem(item, item->getID(), charges - 1);\n\t\t\t\t\t}\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cfbc674a2f848a022b00d89c2deb1ffb6106f36dbc854515ca21034adb6afba7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2669, + "startColumn": 42, + "charOffset": 76606, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2667, + "startColumn": 42, + "charOffset": 76547, + "charLength": 2, + "snippet": { + "text": "\n\t\t\t\tif (field) {\n\t\t\t\t\tconst int16_t &fieldAbsorbPercent = it.abilities->fieldAbsorbPercent[combatTypeToIndex(combatType)];\n\t\t\t\t\tif (fieldAbsorbPercent != 0) {\n\t\t\t\t\t\tdamage -= std::round(damage * (fieldAbsorbPercent / 100.));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56f44423af8a781ed3a96426f04aa06513a47be6d488117fee49ed7216e016ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2671, + "startColumn": 17, + "charOffset": 76723, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 2669, + "startColumn": 17, + "charOffset": 76565, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tconst int16_t &fieldAbsorbPercent = it.abilities->fieldAbsorbPercent[combatTypeToIndex(combatType)];\n\t\t\t\t\tif (fieldAbsorbPercent != 0) {\n\t\t\t\t\t\tdamage -= std::round(damage * (fieldAbsorbPercent / 100.));\n\t\t\t\t\t\tif (charges != 0) {\n\t\t\t\t\t\t\tg_game().transformItem(item, item->getID(), charges - 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c4a9fb352e9d937afc9321035468a1da9da7b353e04014f2d77bf9c7379b5ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2671, + "startColumn": 28, + "charOffset": 76734, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 2669, + "startColumn": 28, + "charOffset": 76565, + "charLength": 6, + "snippet": { + "text": "\t\t\t\t\tconst int16_t &fieldAbsorbPercent = it.abilities->fieldAbsorbPercent[combatTypeToIndex(combatType)];\n\t\t\t\t\tif (fieldAbsorbPercent != 0) {\n\t\t\t\t\t\tdamage -= std::round(damage * (fieldAbsorbPercent / 100.));\n\t\t\t\t\t\tif (charges != 0) {\n\t\t\t\t\t\t\tg_game().transformItem(item, item->getID(), charges - 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c08795053d524b83d0fb5ec36cb9f3e8c713643f62a0823fdd98d182c67bfdfc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2671, + "startColumn": 38, + "charOffset": 76744, + "charLength": 18, + "snippet": { + "text": "fieldAbsorbPercent" + } + }, + "contextRegion": { + "startLine": 2669, + "startColumn": 38, + "charOffset": 76565, + "charLength": 18, + "snippet": { + "text": "\t\t\t\t\tconst int16_t &fieldAbsorbPercent = it.abilities->fieldAbsorbPercent[combatTypeToIndex(combatType)];\n\t\t\t\t\tif (fieldAbsorbPercent != 0) {\n\t\t\t\t\t\tdamage -= std::round(damage * (fieldAbsorbPercent / 100.));\n\t\t\t\t\t\tif (charges != 0) {\n\t\t\t\t\t\t\tg_game().transformItem(item, item->getID(), charges - 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8bd68364fb98b057e1771b99c0072b811979c8aa6ffa7c1c6921aafc86be0453" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2673, + "startColumn": 17, + "charOffset": 76815, + "charLength": 13, + "snippet": { + "text": "transformItem" + } + }, + "contextRegion": { + "startLine": 2671, + "startColumn": 17, + "charOffset": 76707, + "charLength": 13, + "snippet": { + "text": "\t\t\t\t\t\tdamage -= std::round(damage * (fieldAbsorbPercent / 100.));\n\t\t\t\t\t\tif (charges != 0) {\n\t\t\t\t\t\t\tg_game().transformItem(item, item->getID(), charges - 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12ac6b6555422106eb44a7a5f91c5d7e964a6571c7086cb7e82d7a09073f0bb2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2679, + "startColumn": 4, + "charOffset": 76894, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2677, + "startColumn": 4, + "charOffset": 76885, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (uint8_t slotid = 0; slotid < item->getImbuementSlot(); slotid++) {\n\t\t\t\tImbuementInfo imbuementInfo;\n\t\t\t\tif (!item->getImbuementInfo(slotid, &imbuementInfo)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4107be684e78de1f3eca3891bf227f1360cb2c358a00b2571bae92b0b944baa4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'item' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2679, + "startColumn": 29, + "charOffset": 76919, + "charLength": 6, + "snippet": { + "text": "slotid" + } + }, + "contextRegion": { + "startLine": 2677, + "startColumn": 29, + "charOffset": 76885, + "charLength": 6, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (uint8_t slotid = 0; slotid < item->getImbuementSlot(); slotid++) {\n\t\t\t\tImbuementInfo imbuementInfo;\n\t\t\t\tif (!item->getImbuementInfo(slotid, &imbuementInfo)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "993f4579d32dee973edfba9e23668278865ef093e385dfcbd76765948c30fe74" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2685, + "startColumn": 45, + "charOffset": 77124, + "charLength": 13, + "snippet": { + "text": "imbuementInfo" + } + }, + "contextRegion": { + "startLine": 2683, + "startColumn": 45, + "charOffset": 77073, + "charLength": 13, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tconst int16_t &imbuementAbsorbPercent = imbuementInfo.imbuement->absorbPercent[combatTypeToIndex(combatType)];\n\n\t\t\t\tif (imbuementAbsorbPercent != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed917941ff8852b404e7a275a553f8a096a09b6cdef52e8a45b1a34a9b292802" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2688, + "startColumn": 26, + "charOffset": 77260, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 2686, + "startColumn": 26, + "charOffset": 77195, + "charLength": 6, + "snippet": { + "text": "\n\t\t\t\tif (imbuementAbsorbPercent != 0) {\n\t\t\t\t\tdamage -= std::ceil(damage * (imbuementAbsorbPercent / 100.));\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2003dcee51d1e5a684cefb3c5ec560f19d4047f116e79cdb3f6533c6f8d81021" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2688, + "startColumn": 36, + "charOffset": 77270, + "charLength": 22, + "snippet": { + "text": "imbuementAbsorbPercent" + } + }, + "contextRegion": { + "startLine": 2686, + "startColumn": 36, + "charOffset": 77195, + "charLength": 22, + "snippet": { + "text": "\n\t\t\t\tif (imbuementAbsorbPercent != 0) {\n\t\t\t\t\tdamage -= std::ceil(damage * (imbuementAbsorbPercent / 100.));\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65cd03fb168bd646f0a9dd9f75cbfc9fde3b19b2834f2d25c68a4959f3f64b77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'death' has cognitive complexity of 105 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2705, + "startColumn": 14, + "charOffset": 77538, + "charLength": 5, + "snippet": { + "text": "death" + } + }, + "contextRegion": { + "startLine": 2703, + "startColumn": 14, + "charOffset": 77522, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid Player::death(std::shared_ptr lastHitCreature) {\n\tif (!g_configManager().getBoolean(TOGGLE_MOUNT_IN_PZ, __FUNCTION__) && isMounted()) {\n\t\tdismount();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04f2ee31aece99db5c1ce24c3a6fb33a4c60f8b7bf3f824a7efc36db540b3f5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2715, + "startColumn": 34, + "charOffset": 78043, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2713, + "startColumn": 34, + "charOffset": 77808, + "charLength": 3, + "snippet": { + "text": "\tg_game().sendSingleSoundEffect(static_self_cast()->getPosition(), sex == PLAYERSEX_FEMALE ? SoundEffect_t::HUMAN_FEMALE_DEATH : SoundEffect_t::HUMAN_MALE_DEATH, getPlayer());\n\tif (skillLoss) {\n\t\tuint8_t unfairFightReduction = 100;\n\t\tint playerDmg = 0;\n\t\tint othersDmg = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f0a8533900efa1d6c75d307645e4cf7209dcf32f6c624a7746121e19e59af4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2719, + "startColumn": 27, + "charOffset": 78142, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2717, + "startColumn": 27, + "charOffset": 78069, + "charLength": 1, + "snippet": { + "text": "\t\tint othersDmg = 0;\n\t\tuint32_t sumLevels = 0;\n\t\tuint32_t inFightTicks = 5 * 60 * 1000;\n\t\tfor (const auto &it : damageMap) {\n\t\t\tCountBlock_t cb = it.second;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd27d89fd452c78484a0771e6d843037a93504afd8de210e726d4e99126ebefa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2719, + "startColumn": 31, + "charOffset": 78146, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 2717, + "startColumn": 31, + "charOffset": 78069, + "charLength": 2, + "snippet": { + "text": "\t\tint othersDmg = 0;\n\t\tuint32_t sumLevels = 0;\n\t\tuint32_t inFightTicks = 5 * 60 * 1000;\n\t\tfor (const auto &it : damageMap) {\n\t\t\tCountBlock_t cb = it.second;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e6efba8253af8d0ad208ac8ed37d048ac987dd6c4da31568af2b81645e6383a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2719, + "startColumn": 36, + "charOffset": 78151, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 2717, + "startColumn": 36, + "charOffset": 78069, + "charLength": 4, + "snippet": { + "text": "\t\tint othersDmg = 0;\n\t\tuint32_t sumLevels = 0;\n\t\tuint32_t inFightTicks = 5 * 60 * 1000;\n\t\tfor (const auto &it : damageMap) {\n\t\t\tCountBlock_t cb = it.second;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a87cb5bd780ca1e8bb4ccb2108a56aa49d1aeb613083e33a3586adaefb5e06a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2720, + "startColumn": 3, + "charOffset": 78159, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2718, + "startColumn": 3, + "charOffset": 78090, + "charLength": 3, + "snippet": { + "text": "\t\tuint32_t sumLevels = 0;\n\t\tuint32_t inFightTicks = 5 * 60 * 1000;\n\t\tfor (const auto &it : damageMap) {\n\t\t\tCountBlock_t cb = it.second;\n\t\t\tif ((OTSYS_TIME() - cb.ticks) <= inFightTicks) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ebfeee39816a4ad0d0dbfa0fe03a0caa31ef8c4b4020c15d19a5c5a44bc0e686" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2734, + "startColumn": 60, + "charOffset": 78631, + "charLength": 9, + "snippet": { + "text": "playerDmg" + } + }, + "contextRegion": { + "startLine": 2732, + "startColumn": 60, + "charOffset": 78507, + "charLength": 9, + "snippet": { + "text": "\t\tbool pvpDeath = false;\n\t\tif (playerDmg > 0 || othersDmg > 0) {\n\t\t\tpvpDeath = (Player::lastHitIsPlayer(lastHitCreature) || playerDmg / (playerDmg + static_cast(othersDmg)) >= 0.05);\n\t\t}\n\t\tif (pvpDeath && sumLevels > level) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e77b5a425e4bf80c7c880f95f70d463a8a53e2442da60f8b26297e95cb2ee50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2734, + "startColumn": 73, + "charOffset": 78644, + "charLength": 9, + "snippet": { + "text": "playerDmg" + } + }, + "contextRegion": { + "startLine": 2732, + "startColumn": 73, + "charOffset": 78507, + "charLength": 9, + "snippet": { + "text": "\t\tbool pvpDeath = false;\n\t\tif (playerDmg > 0 || othersDmg > 0) {\n\t\t\tpvpDeath = (Player::lastHitIsPlayer(lastHitCreature) || playerDmg / (playerDmg + static_cast(othersDmg)) >= 0.05);\n\t\t}\n\t\tif (pvpDeath && sumLevels > level) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9f3138e7d41ec14a7b629e4d842aa722599afe227942bb4747f12159e544b7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.05 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2734, + "startColumn": 120, + "charOffset": 78691, + "charLength": 4, + "snippet": { + "text": "0.05" + } + }, + "contextRegion": { + "startLine": 2732, + "startColumn": 120, + "charOffset": 78507, + "charLength": 4, + "snippet": { + "text": "\t\tbool pvpDeath = false;\n\t\tif (playerDmg > 0 || othersDmg > 0) {\n\t\t\tpvpDeath = (Player::lastHitIsPlayer(lastHitCreature) || playerDmg / (playerDmg + static_cast(othersDmg)) >= 0.05);\n\t\t}\n\t\tif (pvpDeath && sumLevels > level) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbb8853b2d0d282983609410cf079895b5c797bb99e836e656d35b7302369756" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2737, + "startColumn": 20, + "charOffset": 78760, + "charLength": 5, + "snippet": { + "text": "level" + } + }, + "contextRegion": { + "startLine": 2735, + "startColumn": 20, + "charOffset": 78698, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\t\tif (pvpDeath && sumLevels > level) {\n\t\t\tdouble reduce = level / static_cast(sumLevels);\n\t\t\tunfairFightReduction = std::max(20, std::floor((reduce * 100) + 0.5));\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e53b692d391b0823c22011e6d024c72ae3344287ac8ef30aeac0a9d869797a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2738, + "startColumn": 45, + "charOffset": 78844, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 2736, + "startColumn": 45, + "charOffset": 78702, + "charLength": 2, + "snippet": { + "text": "\t\tif (pvpDeath && sumLevels > level) {\n\t\t\tdouble reduce = level / static_cast(sumLevels);\n\t\t\tunfairFightReduction = std::max(20, std::floor((reduce * 100) + 0.5));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0aca4cf7c6d945fa02669a565730327485505d23bc71988650c3c509258b5429" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2738, + "startColumn": 49, + "charOffset": 78848, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 2736, + "startColumn": 49, + "charOffset": 78702, + "charLength": 3, + "snippet": { + "text": "\t\tif (pvpDeath && sumLevels > level) {\n\t\t\tdouble reduce = level / static_cast(sumLevels);\n\t\t\tunfairFightReduction = std::max(20, std::floor((reduce * 100) + 0.5));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30dc1b403b2b2df717373e43d091fdb8cd76a47e71bab02ac1de7aacf42a80f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2738, + "startColumn": 70, + "charOffset": 78869, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2736, + "startColumn": 70, + "charOffset": 78702, + "charLength": 3, + "snippet": { + "text": "\t\tif (pvpDeath && sumLevels > level) {\n\t\t\tdouble reduce = level / static_cast(sumLevels);\n\t\t\tunfairFightReduction = std::max(20, std::floor((reduce * 100) + 0.5));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3f55133203fa6f82f530d856ec82b9ce205c40d642e29000cddbfa6743816d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2738, + "startColumn": 77, + "charOffset": 78876, + "charLength": 3, + "snippet": { + "text": "0.5" + } + }, + "contextRegion": { + "startLine": 2736, + "startColumn": 77, + "charOffset": 78702, + "charLength": 3, + "snippet": { + "text": "\t\tif (pvpDeath && sumLevels > level) {\n\t\t\tdouble reduce = level / static_cast(sumLevels);\n\t\t\tunfairFightReduction = std::max(20, std::floor((reduce * 100) + 0.5));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93db95fd95c7dd2da5cc01674184d88cab45c7253968965ef6a0c4cfbdf591d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2746, + "startColumn": 3, + "charOffset": 78987, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2744, + "startColumn": 3, + "charOffset": 78959, + "charLength": 3, + "snippet": { + "text": "\n\t\t// sum up all the mana\n\t\tfor (uint32_t i = 1; i <= magLevel; ++i) {\n\t\t\tsumMana += vocation->getReqMana(i);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a03ccaee99da4e31db2c63f8e784647085d3f5768a17edd747bb7953cdaa30f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2752, + "startColumn": 49, + "charOffset": 79147, + "charLength": 20, + "snippet": { + "text": "unfairFightReduction" + } + }, + "contextRegion": { + "startLine": 2750, + "startColumn": 49, + "charOffset": 79074, + "charLength": 20, + "snippet": { + "text": "\t\tsumMana += manaSpent;\n\n\t\tdouble deathLossPercent = getLostPercent() * (unfairFightReduction / 100.);\n\n\t\t// Charm bless bestiary" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7cea64fbaeaaf033bdf50a3539fd9a21572854485f47fbba11a097107f6a618" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2759, + "startColumn": 45, + "charOffset": 79473, + "charLength": 2, + "snippet": { + "text": "90" + } + }, + "contextRegion": { + "startLine": 2757, + "startColumn": 45, + "charOffset": 79292, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tconst auto mType = g_monsters().getMonsterType(lastHitCreature->getName());\n\t\t\t\tif (mType && mType->info.raceid == charmRuneBless) {\n\t\t\t\t\tdeathLossPercent = (deathLossPercent * 90) / 100;\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29c41b29ce6c4889eb1d298660e120ade34af5ee8a05b07c13e3afb0cc9d9de1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "90 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2759, + "startColumn": 45, + "charOffset": 79473, + "charLength": 2, + "snippet": { + "text": "90" + } + }, + "contextRegion": { + "startLine": 2757, + "startColumn": 45, + "charOffset": 79292, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tconst auto mType = g_monsters().getMonsterType(lastHitCreature->getName());\n\t\t\t\tif (mType && mType->info.raceid == charmRuneBless) {\n\t\t\t\t\tdeathLossPercent = (deathLossPercent * 90) / 100;\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fdc53cfda98326b0fdb4aa90e301f03c27b683caa8a7320ff432200512538806" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2759, + "startColumn": 51, + "charOffset": 79479, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2757, + "startColumn": 51, + "charOffset": 79292, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tconst auto mType = g_monsters().getMonsterType(lastHitCreature->getName());\n\t\t\t\tif (mType && mType->info.raceid == charmRuneBless) {\n\t\t\t\t\tdeathLossPercent = (deathLossPercent * 90) / 100;\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a17dd64c6f4867e4f3c79f63b7a2bef93ba0a59563498d0a2222fd1f32025e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2759, + "startColumn": 51, + "charOffset": 79479, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2757, + "startColumn": 51, + "charOffset": 79292, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tconst auto mType = g_monsters().getMonsterType(lastHitCreature->getName());\n\t\t\t\tif (mType && mType->info.raceid == charmRuneBless) {\n\t\t\t\t\tdeathLossPercent = (deathLossPercent * 90) / 100;\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8530d31a3d1bd2763558b617d63195de8e0a7c4623f45fea48a32649ddbe0e7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2764, + "startColumn": 36, + "charOffset": 79535, + "charLength": 7, + "snippet": { + "text": "sumMana" + } + }, + "contextRegion": { + "startLine": 2762, + "startColumn": 36, + "charOffset": 79495, + "charLength": 7, + "snippet": { + "text": "\t\t}\n\n\t\tlostMana = static_cast(sumMana * deathLossPercent);\n\n\t\twhile (lostMana > manaSpent && magLevel > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "276269b04e2cdf9c7ca60269b73c65f5810893f20f7612c28df25b9c838b43c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2764, + "startColumn": 36, + "charOffset": 79535, + "charLength": 7, + "snippet": { + "text": "sumMana" + } + }, + "contextRegion": { + "startLine": 2762, + "startColumn": 36, + "charOffset": 79495, + "charLength": 7, + "snippet": { + "text": "\t\t}\n\n\t\tlostMana = static_cast(sumMana * deathLossPercent);\n\n\t\twhile (lostMana > manaSpent && magLevel > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43e0b60d31d8f9f08022bae79f1a827b0628ec9284eafbb7e90c3f81fc85a005" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2766, + "startColumn": 3, + "charOffset": 79567, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 2764, + "startColumn": 3, + "charOffset": 79500, + "charLength": 5, + "snippet": { + "text": "\t\tlostMana = static_cast(sumMana * deathLossPercent);\n\n\t\twhile (lostMana > manaSpent && magLevel > 0) {\n\t\t\tlostMana -= manaSpent;\n\t\t\tmanaSpent = vocation->getReqMana(magLevel);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0dd4e35d694e76cf9d053c603a76b79705cedcb5a178e3e40c7a34450e252adc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'lostMana' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2766, + "startColumn": 10, + "charOffset": 79574, + "charLength": 8, + "snippet": { + "text": "lostMana" + } + }, + "contextRegion": { + "startLine": 2764, + "startColumn": 10, + "charOffset": 79500, + "charLength": 8, + "snippet": { + "text": "\t\tlostMana = static_cast(sumMana * deathLossPercent);\n\n\t\twhile (lostMana > manaSpent && magLevel > 0) {\n\t\t\tlostMana -= manaSpent;\n\t\t\tmanaSpent = vocation->getReqMana(magLevel);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7235d4e4202a9c13906680eb36daeed1cd00c789a3dd1b7dcfdf14e5a4b02a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2778, + "startColumn": 22, + "charOffset": 79950, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 2776, + "startColumn": 22, + "charOffset": 79848, + "charLength": 1, + "snippet": { + "text": "\t\t\tmagLevelPercent = Player::getPercentLevel(manaSpent, nextReqMana);\n\t\t} else {\n\t\t\tmagLevelPercent = 0;\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b66ec5f38bbb6479226ed85833d8c7bfea6d32a529ac305a27975e52b177557f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2782, + "startColumn": 3, + "charOffset": 79976, + "charLength": 8, + "snippet": { + "text": "uint64_t" + } + }, + "contextRegion": { + "startLine": 2780, + "startColumn": 3, + "charOffset": 79957, + "charLength": 8, + "snippet": { + "text": "\n\t\t// Level loss\n\t\tuint64_t expLoss = static_cast(experience * deathLossPercent);\n\t\tg_events().eventPlayerOnLoseExperience(static_self_cast(), expLoss);\n\t\tg_callbacks().executeCallback(EventCallback_t::playerOnLoseExperience, &EventCallback::playerOnLoseExperience, getPlayer(), expLoss);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72ad5bd6fe904307be61b71cf0d2187de89f9fc1f1fc36c59eb84a7b86c39fbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2782, + "startColumn": 44, + "charOffset": 80017, + "charLength": 10, + "snippet": { + "text": "experience" + } + }, + "contextRegion": { + "startLine": 2780, + "startColumn": 44, + "charOffset": 79957, + "charLength": 10, + "snippet": { + "text": "\n\t\t// Level loss\n\t\tuint64_t expLoss = static_cast(experience * deathLossPercent);\n\t\tg_events().eventPlayerOnLoseExperience(static_self_cast(), expLoss);\n\t\tg_callbacks().executeCallback(EventCallback_t::playerOnLoseExperience, &EventCallback::playerOnLoseExperience, getPlayer(), expLoss);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e262e43a65644e45f502032aef88b414b0f04a197545609b13524a9e63bb02bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2782, + "startColumn": 44, + "charOffset": 80017, + "charLength": 10, + "snippet": { + "text": "experience" + } + }, + "contextRegion": { + "startLine": 2780, + "startColumn": 44, + "charOffset": 79957, + "charLength": 10, + "snippet": { + "text": "\n\t\t// Level loss\n\t\tuint64_t expLoss = static_cast(experience * deathLossPercent);\n\t\tg_events().eventPlayerOnLoseExperience(static_self_cast(), expLoss);\n\t\tg_callbacks().executeCallback(EventCallback_t::playerOnLoseExperience, &EventCallback::playerOnLoseExperience, getPlayer(), expLoss);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59105677899b4043fce06d2cd49400ca7ce84a1c3e689136f2e6cf30dd67ecc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2793, + "startColumn": 4, + "charOffset": 80534, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2791, + "startColumn": 4, + "charOffset": 80426, + "charLength": 3, + "snippet": { + "text": "\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) { // for each skill\n\t\t\tuint64_t sumSkillTries = 0;\n\t\t\tfor (uint16_t c = 11; c <= skills[i].level; ++c) { // sum up all required tries for all skill levels\n\t\t\t\tsumSkillTries += vocation->getReqSkillTries(i, c);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8cd4ae70312b04be55ec302f861baaf6b637e3436acb974d3cdeac4f7aa6c5e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "11 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2793, + "startColumn": 22, + "charOffset": 80552, + "charLength": 2, + "snippet": { + "text": "11" + } + }, + "contextRegion": { + "startLine": 2791, + "startColumn": 22, + "charOffset": 80426, + "charLength": 2, + "snippet": { + "text": "\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) { // for each skill\n\t\t\tuint64_t sumSkillTries = 0;\n\t\t\tfor (uint16_t c = 11; c <= skills[i].level; ++c) { // sum up all required tries for all skill levels\n\t\t\t\tsumSkillTries += vocation->getReqSkillTries(i, c);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c50584767c0ba2617462c4ba362876bceea5949aac100869b707a3e7fdc45b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2793, + "startColumn": 31, + "charOffset": 80561, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 2791, + "startColumn": 31, + "charOffset": 80426, + "charLength": 6, + "snippet": { + "text": "\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) { // for each skill\n\t\t\tuint64_t sumSkillTries = 0;\n\t\t\tfor (uint16_t c = 11; c <= skills[i].level; ++c) { // sum up all required tries for all skill levels\n\t\t\t\tsumSkillTries += vocation->getReqSkillTries(i, c);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6bc338272f0b543ef27dd7faf2cc90f1c3816b776333ca6f0aa724ff2d804383" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2797, + "startColumn": 21, + "charOffset": 80716, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 2795, + "startColumn": 21, + "charOffset": 80690, + "charLength": 6, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tsumSkillTries += skills[i].tries;\n\n\t\t\tuint32_t lostSkillTries = static_cast(sumSkillTries * deathLossPercent);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c8ca36de8e0b4d62e7ee28384e419aaa97bb24d8737216febc501e6c07f395e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2799, + "startColumn": 4, + "charOffset": 80737, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 2797, + "startColumn": 4, + "charOffset": 80696, + "charLength": 8, + "snippet": { + "text": "\t\t\tsumSkillTries += skills[i].tries;\n\n\t\t\tuint32_t lostSkillTries = static_cast(sumSkillTries * deathLossPercent);\n\t\t\twhile (lostSkillTries > skills[i].tries) {\n\t\t\t\tlostSkillTries -= skills[i].tries;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "104fdd11e8cb25f25aa926c1c7cda75f0d9e5414507ce4076830469ae3a4bf5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2799, + "startColumn": 52, + "charOffset": 80785, + "charLength": 13, + "snippet": { + "text": "sumSkillTries" + } + }, + "contextRegion": { + "startLine": 2797, + "startColumn": 52, + "charOffset": 80696, + "charLength": 13, + "snippet": { + "text": "\t\t\tsumSkillTries += skills[i].tries;\n\n\t\t\tuint32_t lostSkillTries = static_cast(sumSkillTries * deathLossPercent);\n\t\t\twhile (lostSkillTries > skills[i].tries) {\n\t\t\t\tlostSkillTries -= skills[i].tries;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e262e43a65644e45f502032aef88b414b0f04a197545609b13524a9e63bb02bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2799, + "startColumn": 52, + "charOffset": 80785, + "charLength": 13, + "snippet": { + "text": "sumSkillTries" + } + }, + "contextRegion": { + "startLine": 2797, + "startColumn": 52, + "charOffset": 80696, + "charLength": 13, + "snippet": { + "text": "\t\t\tsumSkillTries += skills[i].tries;\n\n\t\t\tuint32_t lostSkillTries = static_cast(sumSkillTries * deathLossPercent);\n\t\t\twhile (lostSkillTries > skills[i].tries) {\n\t\t\t\tlostSkillTries -= skills[i].tries;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59105677899b4043fce06d2cd49400ca7ce84a1c3e689136f2e6cf30dd67ecc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2800, + "startColumn": 4, + "charOffset": 80823, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 2798, + "startColumn": 4, + "charOffset": 80733, + "charLength": 5, + "snippet": { + "text": "\n\t\t\tuint32_t lostSkillTries = static_cast(sumSkillTries * deathLossPercent);\n\t\t\twhile (lostSkillTries > skills[i].tries) {\n\t\t\t\tlostSkillTries -= skills[i].tries;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1829b0c8eabb4f9d87f259015000ca9e8d8a4354f301def8136da726eb084620" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'lostSkillTries' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2800, + "startColumn": 11, + "charOffset": 80830, + "charLength": 14, + "snippet": { + "text": "lostSkillTries" + } + }, + "contextRegion": { + "startLine": 2798, + "startColumn": 11, + "charOffset": 80733, + "charLength": 14, + "snippet": { + "text": "\n\t\t\tuint32_t lostSkillTries = static_cast(sumSkillTries * deathLossPercent);\n\t\t\twhile (lostSkillTries > skills[i].tries) {\n\t\t\t\tlostSkillTries -= skills[i].tries;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3d1f744567e5efb48bc920b2582de52d74002b2e7456180257942c8f0f37292" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2800, + "startColumn": 28, + "charOffset": 80847, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 2798, + "startColumn": 28, + "charOffset": 80733, + "charLength": 6, + "snippet": { + "text": "\n\t\t\tuint32_t lostSkillTries = static_cast(sumSkillTries * deathLossPercent);\n\t\t\twhile (lostSkillTries > skills[i].tries) {\n\t\t\t\tlostSkillTries -= skills[i].tries;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2028383aba7c164f0c7e36a00631d29acb8f69f7cba0c04dd4f28d2a3737d5fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2801, + "startColumn": 23, + "charOffset": 80888, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 2799, + "startColumn": 23, + "charOffset": 80734, + "charLength": 6, + "snippet": { + "text": "\t\t\tuint32_t lostSkillTries = static_cast(sumSkillTries * deathLossPercent);\n\t\t\twhile (lostSkillTries > skills[i].tries) {\n\t\t\t\tlostSkillTries -= skills[i].tries;\n\n\t\t\t\tif (skills[i].level <= 10) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "145950b5e258818ac2b61ffc7d3e6f8904e8e9123a9157638c98f076f0d4c351" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2803, + "startColumn": 9, + "charOffset": 80914, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 2801, + "startColumn": 9, + "charOffset": 80866, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tlostSkillTries -= skills[i].tries;\n\n\t\t\t\tif (skills[i].level <= 10) {\n\t\t\t\t\tskills[i].level = 10;\n\t\t\t\t\tskills[i].tries = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e046f23f9da1646d13e4ae25feaddb9125740e9fa5a5996e0189a51d78867d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2803, + "startColumn": 28, + "charOffset": 80933, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 2801, + "startColumn": 28, + "charOffset": 80866, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tlostSkillTries -= skills[i].tries;\n\n\t\t\t\tif (skills[i].level <= 10) {\n\t\t\t\t\tskills[i].level = 10;\n\t\t\t\t\tskills[i].tries = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd337c877b321aa0d9d241301afdabeeb488a5be9e8323cf44b532bbfc5fd90b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2804, + "startColumn": 6, + "charOffset": 80944, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 2802, + "startColumn": 6, + "charOffset": 80905, + "charLength": 6, + "snippet": { + "text": "\n\t\t\t\tif (skills[i].level <= 10) {\n\t\t\t\t\tskills[i].level = 10;\n\t\t\t\t\tskills[i].tries = 0;\n\t\t\t\t\tlostSkillTries = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a40237f252ee602443d029dec31a5d91fd855c2eee5f1aeaad5e13c84159591" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2804, + "startColumn": 24, + "charOffset": 80962, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 2802, + "startColumn": 24, + "charOffset": 80905, + "charLength": 2, + "snippet": { + "text": "\n\t\t\t\tif (skills[i].level <= 10) {\n\t\t\t\t\tskills[i].level = 10;\n\t\t\t\t\tskills[i].tries = 0;\n\t\t\t\t\tlostSkillTries = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39b7dbc3e6aeac9245bd3349adeff0055de6470065d7f923af6f73f51f78ead3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2805, + "startColumn": 6, + "charOffset": 80971, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 2803, + "startColumn": 6, + "charOffset": 80906, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tif (skills[i].level <= 10) {\n\t\t\t\t\tskills[i].level = 10;\n\t\t\t\t\tskills[i].tries = 0;\n\t\t\t\t\tlostSkillTries = 0;\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "113d0b23c491dbc313ea734ad2e19d6e8ba2492cfca9c66493535558028f32e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2810, + "startColumn": 5, + "charOffset": 81040, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 2808, + "startColumn": 5, + "charOffset": 81029, + "charLength": 6, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tskills[i].tries = vocation->getReqSkillTries(i, skills[i].level);\n\t\t\t\tskills[i].level--;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "854214a96f97678cbfeb16f5d95ead56034c13feef1e766eb509a267dd99c971" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2810, + "startColumn": 53, + "charOffset": 81088, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 2808, + "startColumn": 53, + "charOffset": 81029, + "charLength": 6, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tskills[i].tries = vocation->getReqSkillTries(i, skills[i].level);\n\t\t\t\tskills[i].level--;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "57edd16eb768d4b6280bf17204ef1130d7bb577f66affe6ed672e3f61118fca7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2811, + "startColumn": 5, + "charOffset": 81110, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 2809, + "startColumn": 5, + "charOffset": 81035, + "charLength": 6, + "snippet": { + "text": "\n\t\t\t\tskills[i].tries = vocation->getReqSkillTries(i, skills[i].level);\n\t\t\t\tskills[i].level--;\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60eada0dd25cdf4e6c0acc451accc7723584b2fc5957111f3fc409ca08a0cb97" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2814, + "startColumn": 4, + "charOffset": 81138, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 2812, + "startColumn": 4, + "charOffset": 81129, + "charLength": 6, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tskills[i].tries = std::max(0, skills[i].tries - lostSkillTries);\n\t\t\tskills[i].percent = Player::getPercentLevel(skills[i].tries, vocation->getReqSkillTries(i, skills[i].level));\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1ddd025941cf3db457f4bc3940ac957d3d9839ff2ba50f06196b2bfbf6f607e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2814, + "startColumn": 43, + "charOffset": 81177, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 2812, + "startColumn": 43, + "charOffset": 81129, + "charLength": 6, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tskills[i].tries = std::max(0, skills[i].tries - lostSkillTries);\n\t\t\tskills[i].percent = Player::getPercentLevel(skills[i].tries, vocation->getReqSkillTries(i, skills[i].level));\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e87b4435d20aca0af815f85fd53b07eb4f2a0f4fa9041788267ceaa4a01f4c99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2814, + "startColumn": 43, + "charOffset": 81177, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 2812, + "startColumn": 43, + "charOffset": 81129, + "charLength": 6, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tskills[i].tries = std::max(0, skills[i].tries - lostSkillTries);\n\t\t\tskills[i].percent = Player::getPercentLevel(skills[i].tries, vocation->getReqSkillTries(i, skills[i].level));\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ac0d04c632dbd68eac0ec5e018d069cd2ccc3950d531eb3ed0a14e181baef15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2814, + "startColumn": 43, + "charOffset": 81177, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 2812, + "startColumn": 43, + "charOffset": 81129, + "charLength": 6, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tskills[i].tries = std::max(0, skills[i].tries - lostSkillTries);\n\t\t\tskills[i].percent = Player::getPercentLevel(skills[i].tries, vocation->getReqSkillTries(i, skills[i].level));\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70efd781b7dd6e4813b5b3be48fd9a5c6e216928bdad19b122590516a95ff50e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2815, + "startColumn": 4, + "charOffset": 81215, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 2813, + "startColumn": 4, + "charOffset": 81134, + "charLength": 6, + "snippet": { + "text": "\n\t\t\tskills[i].tries = std::max(0, skills[i].tries - lostSkillTries);\n\t\t\tskills[i].percent = Player::getPercentLevel(skills[i].tries, vocation->getReqSkillTries(i, skills[i].level));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2334b7d33cfd1489ccb306189ce6a69e85f38f7b727416f27ceea393cddbf8ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2815, + "startColumn": 48, + "charOffset": 81259, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 2813, + "startColumn": 48, + "charOffset": 81134, + "charLength": 6, + "snippet": { + "text": "\n\t\t\tskills[i].tries = std::max(0, skills[i].tries - lostSkillTries);\n\t\t\tskills[i].percent = Player::getPercentLevel(skills[i].tries, vocation->getReqSkillTries(i, skills[i].level));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7415da602ab7ce7867d293e524a92cea781e921eadfe88f726743915cf812449" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2815, + "startColumn": 95, + "charOffset": 81306, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 2813, + "startColumn": 95, + "charOffset": 81134, + "charLength": 6, + "snippet": { + "text": "\n\t\t\tskills[i].tries = std::max(0, skills[i].tries - lostSkillTries);\n\t\t\tskills[i].percent = Player::getPercentLevel(skills[i].tries, vocation->getReqSkillTries(i, skills[i].level));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07db5a3e206d3b502c529870abf2c2c55e4004cc67dd19a52944b4294c699270" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2823, + "startColumn": 54, + "charOffset": 81494, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 2821, + "startColumn": 54, + "charOffset": 81410, + "charLength": 1, + "snippet": { + "text": "\t\t\tuint32_t oldLevel = level;\n\n\t\t\tif (vocation->getId() == VOCATION_NONE || level > 7) {\n\t\t\t\texperience -= expLoss;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95ec98d9ac1a250c4d908e8f0b18edd31edffa8e28b8c164165d5d5c5d865df6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2827, + "startColumn": 4, + "charOffset": 81535, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 2825, + "startColumn": 4, + "charOffset": 81526, + "charLength": 5, + "snippet": { + "text": "\t\t\t}\n\n\t\t\twhile (level > 1 && experience < Player::getExpForLevel(level)) {\n\t\t\t\t--level;\n\t\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "849eb464cda31f9dbe5d0f5f1c87ac266c2093b18c84f7536102189199bd7320" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to member reference to 'experience' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2827, + "startColumn": 11, + "charOffset": 81542, + "charLength": 5, + "snippet": { + "text": "level" + } + }, + "contextRegion": { + "startLine": 2825, + "startColumn": 11, + "charOffset": 81526, + "charLength": 5, + "snippet": { + "text": "\t\t\t}\n\n\t\t\twhile (level > 1 && experience < Player::getExpForLevel(level)) {\n\t\t\t\t--level;\n\t\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ebbe0df1b9a76f609cc79d822c58776a8e7b00a52d29056629926d5b3b666fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2829, + "startColumn": 38, + "charOffset": 81651, + "charLength": 9, + "snippet": { + "text": "healthMax" + } + }, + "contextRegion": { + "startLine": 2827, + "startColumn": 38, + "charOffset": 81532, + "charLength": 9, + "snippet": { + "text": "\t\t\twhile (level > 1 && experience < Player::getExpForLevel(level)) {\n\t\t\t\t--level;\n\t\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\n\t\t\t\tmanaMax = std::max(0, manaMax - vocation->getManaGain());\n\t\t\t\tcapacity = std::max(0, capacity - vocation->getCapGain());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "602bbbd6f87ad74a9581a92556e4b11c80a40a8815fd792424fa3036b5c7beda" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2830, + "startColumn": 36, + "charOffset": 81722, + "charLength": 7, + "snippet": { + "text": "manaMax" + } + }, + "contextRegion": { + "startLine": 2828, + "startColumn": 36, + "charOffset": 81601, + "charLength": 7, + "snippet": { + "text": "\t\t\t\t--level;\n\t\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\n\t\t\t\tmanaMax = std::max(0, manaMax - vocation->getManaGain());\n\t\t\t\tcapacity = std::max(0, capacity - vocation->getCapGain());\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b81d6238b570b339558cc48f0bde53c8ac7e61972e2add18cf1ef5a1c22fd4b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2831, + "startColumn": 37, + "charOffset": 81794, + "charLength": 8, + "snippet": { + "text": "capacity" + } + }, + "contextRegion": { + "startLine": 2829, + "startColumn": 37, + "charOffset": 81614, + "charLength": 8, + "snippet": { + "text": "\t\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\n\t\t\t\tmanaMax = std::max(0, manaMax - vocation->getManaGain());\n\t\t\t\tcapacity = std::max(0, capacity - vocation->getCapGain());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0fc807031664ae4f4c274d7bbb3fadf96ec67964847e4ee41cef43328ba546fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-12", + "ruleIndex": 424, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-12: signed char and unsigned char type shall only be used for the storage and use of numeric values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2843, + "startColumn": 5, + "charOffset": 82202, + "charLength": 12, + "snippet": { + "text": "levelPercent" + } + }, + "contextRegion": { + "startLine": 2841, + "startColumn": 5, + "charOffset": 82098, + "charLength": 12, + "snippet": { + "text": "\t\t\tuint64_t nextLevelExp = Player::getExpForLevel(level + 1);\n\t\t\tif (nextLevelExp > currLevelExp) {\n\t\t\t\tlevelPercent = Player::getPercentLevel(experience - currLevelExp, nextLevelExp - currLevelExp);\n\t\t\t} else {\n\t\t\t\tlevelPercent = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56fa2024f4da0bf1a672efe1188ae22b3f99415e188c6d56557504e1d670fc8f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2843, + "startColumn": 20, + "charOffset": 82217, + "charLength": 6, + "snippet": { + "text": "Player" + } + }, + "contextRegion": { + "startLine": 2841, + "startColumn": 20, + "charOffset": 82098, + "charLength": 6, + "snippet": { + "text": "\t\t\tuint64_t nextLevelExp = Player::getExpForLevel(level + 1);\n\t\t\tif (nextLevelExp > currLevelExp) {\n\t\t\t\tlevelPercent = Player::getPercentLevel(experience - currLevelExp, nextLevelExp - currLevelExp);\n\t\t\t} else {\n\t\t\t\tlevelPercent = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad30b4d1cd2c6a31d4b58c67b4f863d80fa3985a38055a89d02ae2cdff36a82e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2843, + "startColumn": 20, + "charOffset": 82217, + "charLength": 6, + "snippet": { + "text": "Player" + } + }, + "contextRegion": { + "startLine": 2841, + "startColumn": 20, + "charOffset": 82098, + "charLength": 6, + "snippet": { + "text": "\t\t\tuint64_t nextLevelExp = Player::getExpForLevel(level + 1);\n\t\t\tif (nextLevelExp > currLevelExp) {\n\t\t\t\tlevelPercent = Player::getPercentLevel(experience - currLevelExp, nextLevelExp - currLevelExp);\n\t\t\t} else {\n\t\t\t\tlevelPercent = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "741a9b034a80a1f6286de8d2d1795f87ee4ed63fb3e6df8a3065db916834b63e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2866, + "startColumn": 10, + "charOffset": 83003, + "charLength": 5, + "snippet": { + "text": "empty" + } + }, + "contextRegion": { + "startLine": 2864, + "startColumn": 10, + "charOffset": 82855, + "charLength": 5, + "snippet": { + "text": "\t\t\tblessOutput << fmt::format(\"You still have adventurer's blessings for being level lower than {}!\", adventurerBlessingLevel);\n\t\t} else {\n\t\t\tbless.empty() ? blessOutput << \"You weren't protected with any blessings.\"\n\t\t\t\t\t\t : blessOutput << \"You were blessed with \" << bless;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e12ce0f6e4b75f9b081440c851024c51fe8c2a5e198023e5591d9a4acc365e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2870, + "startColumn": 26, + "charOffset": 83187, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2868, + "startColumn": 26, + "charOffset": 83132, + "charLength": 1, + "snippet": { + "text": "\n\t\t\t// Make player lose bless\n\t\t\tuint8_t maxBlessing = 8;\n\t\t\tif (pvpDeath && hasBlessing(1)) {\n\t\t\t\tremoveBlessing(1, 1); // Remove TOF only" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90cd1a25800d24d3fa535a6478361ce47c2b795bf984b9aa4dc86353f8ffa140" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2874, + "startColumn": 5, + "charOffset": 83288, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2872, + "startColumn": 5, + "charOffset": 83227, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tremoveBlessing(1, 1); // Remove TOF only\n\t\t\t} else {\n\t\t\t\tfor (int i = 2; i <= maxBlessing; i++) {\n\t\t\t\t\tremoveBlessing(i, 1);\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69e8e6044ef539061207251544e5fc02f8caae6686182f92d5479dd7db98be41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2875, + "startColumn": 21, + "charOffset": 83349, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 2873, + "startColumn": 21, + "charOffset": 83272, + "charLength": 1, + "snippet": { + "text": "\t\t\t} else {\n\t\t\t\tfor (int i = 2; i <= maxBlessing; i++) {\n\t\t\t\t\tremoveBlessing(i, 1);\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15b04cd659bed1fd3d493881c051a193d9177d3397b2d811c88073c804f547ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2886, + "startColumn": 13, + "charOffset": 83575, + "charLength": 2, + "snippet": { + "text": "40" + } + }, + "contextRegion": { + "startLine": 2884, + "startColumn": 13, + "charOffset": 83507, + "charLength": 2, + "snippet": { + "text": "\t\tsendBlessStatus();\n\t\tif (getSkull() == SKULL_BLACK) {\n\t\t\thealth = 40;\n\t\t\tmana = 0;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a443c64743d0861109be7ed399155a26406cfe4873439755b435acf1e27e0bfe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2893, + "startColumn": 3, + "charOffset": 83652, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 2891, + "startColumn": 3, + "charOffset": 83645, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tauto it = conditions.begin(), end = conditions.end();\n\t\twhile (it != end) {\n\t\t\tstd::shared_ptr condition = *it;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4f106e6aeb8d64d7e5dd3dfc7d3212c209789e7d8e75914bfa7e5c6d60fd9a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2893, + "startColumn": 3, + "charOffset": 83652, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 2891, + "startColumn": 3, + "charOffset": 83645, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tauto it = conditions.begin(), end = conditions.end();\n\t\twhile (it != end) {\n\t\t\tstd::shared_ptr condition = *it;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ed28988bce298e9d6da405a87774d56c037bff685535df882e8698a0ffd0f58" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2894, + "startColumn": 3, + "charOffset": 83708, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 2892, + "startColumn": 3, + "charOffset": 83649, + "charLength": 5, + "snippet": { + "text": "\n\t\tauto it = conditions.begin(), end = conditions.end();\n\t\twhile (it != end) {\n\t\t\tstd::shared_ptr condition = *it;\n\t\t\t// isSupress block to delete spells conditions (ensures that the player cannot, for example, reset the cooldown time of the familiar and summon several)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8348aba8cb8a0ccfa50cffb25471760386dc19356a71f1b297b75f4b9ac1aff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2894, + "startColumn": 10, + "charOffset": 83715, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2892, + "startColumn": 10, + "charOffset": 83649, + "charLength": 2, + "snippet": { + "text": "\n\t\tauto it = conditions.begin(), end = conditions.end();\n\t\twhile (it != end) {\n\t\t\tstd::shared_ptr condition = *it;\n\t\t\t// isSupress block to delete spells conditions (ensures that the player cannot, for example, reset the cooldown time of the familiar and summon several)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d352098d138958236d89a82540db5bee6a57546f4c9e0cc81cd6ca26883e4be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2909, + "startColumn": 3, + "charOffset": 84199, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 2907, + "startColumn": 3, + "charOffset": 84174, + "charLength": 4, + "snippet": { + "text": "\t\tsetSkillLoss(true);\n\n\t\tauto it = conditions.begin(), end = conditions.end();\n\t\twhile (it != end) {\n\t\t\tstd::shared_ptr condition = *it;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "157b15b9904783fa0b986e1a8e6a43eb29a0195225c760e30a31bb5fa42ae521" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2909, + "startColumn": 3, + "charOffset": 84199, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 2907, + "startColumn": 3, + "charOffset": 84174, + "charLength": 4, + "snippet": { + "text": "\t\tsetSkillLoss(true);\n\n\t\tauto it = conditions.begin(), end = conditions.end();\n\t\twhile (it != end) {\n\t\t\tstd::shared_ptr condition = *it;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4c38f140196965679b7e7e926c1332f48d7a4d68e7b1ae32252f82a28e00cef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2910, + "startColumn": 3, + "charOffset": 84255, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 2908, + "startColumn": 3, + "charOffset": 84196, + "charLength": 5, + "snippet": { + "text": "\n\t\tauto it = conditions.begin(), end = conditions.end();\n\t\twhile (it != end) {\n\t\t\tstd::shared_ptr condition = *it;\n\t\t\tif (condition->isPersistent()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d04ab07b6dfd5253e18ed58e1c079d384e6ec525aee3f5a29128216ef5d18f65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2910, + "startColumn": 10, + "charOffset": 84262, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2908, + "startColumn": 10, + "charOffset": 84196, + "charLength": 2, + "snippet": { + "text": "\n\t\tauto it = conditions.begin(), end = conditions.end();\n\t\twhile (it != end) {\n\t\t\tstd::shared_ptr condition = *it;\n\t\t\tif (condition->isPersistent()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c39f56cab7c170907dcf4930784f9e134bf10baa49be4f6caf3121462b6986d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2923, + "startColumn": 12, + "charOffset": 84554, + "charLength": 16, + "snippet": { + "text": "internalTeleport" + } + }, + "contextRegion": { + "startLine": 2921, + "startColumn": 12, + "charOffset": 84520, + "charLength": 16, + "snippet": { + "text": "\n\t\thealth = healthMax;\n\t\tg_game().internalTeleport(static_self_cast(), getTemplePosition(), true);\n\t\tg_game().addCreatureHealth(static_self_cast());\n\t\tg_game().addPlayerMana(static_self_cast());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d3645bc8a876b9bb25682636367fd4d9196b0fc47ba75c0e577e30722a55d98" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2944, + "startColumn": 2, + "charOffset": 85070, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2942, + "startColumn": 2, + "charOffset": 85004, + "charLength": 3, + "snippet": { + "text": "\n\tauto spectators = Spectators().find(position, true);\n\tfor (const auto &spectator : spectators) {\n\t\tif (const auto &tmpPlayer = spectator->getPlayer()) {\n\t\t\ttmpPlayer->sendCreatureAppear(static_self_cast(), pos, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5faf88b4599f33646e615a5264dd36af18ed82fe53578e8e9e78901c9f093dbb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2976, + "startColumn": 6, + "charOffset": 86035, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2974, + "startColumn": 6, + "charOffset": 85969, + "charLength": 1, + "snippet": { + "text": "\t// remove from map\n\tstd::shared_ptr tile = getTile();\n\tif (!tile) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "416468d114e4093a305ef8f41ef0b95ac6e37dcc3e09ee3a7ef9296850fed105" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 2984, + "startColumn": 2, + "charOffset": 86191, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2982, + "startColumn": 2, + "charOffset": 86100, + "charLength": 3, + "snippet": { + "text": "\tauto spectators = Spectators().find(tile->getPosition(), true);\n\tsize_t i = 0;\n\tfor (const auto &spectator : spectators) {\n\t\tif (const auto &player = spectator->getPlayer()) {\n\t\t\toldStackPosVector.push_back(player->canSeeCreature(static_self_cast()) ? tile->getStackposOfCreature(player, getPlayer()) : -1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75bee2e54fe08e3251b8d6730086f711662019dbca89961cd83778860a0a1403" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3002, + "startColumn": 2, + "charOffset": 86848, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3000, + "startColumn": 2, + "charOffset": 86819, + "charLength": 3, + "snippet": { + "text": "\n\t// show player as pending\n\tfor (const auto &[key, player] : g_game().getPlayers()) {\n\t\tplayer->vip()->notifyStatusChange(static_self_cast(), VipStatus_t::Pending, false);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9eedc32e88a34e2b14d055d442dfa90ce63f3d44f55b705b70ffd5b0b50b3caa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3050, + "startColumn": 2, + "charOffset": 88555, + "charLength": 12, + "snippet": { + "text": "addCondition" + } + }, + "contextRegion": { + "startLine": 3048, + "startColumn": 2, + "charOffset": 88388, + "charLength": 12, + "snippet": { + "text": "\n\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_INFIGHT, g_configManager().getNumber(PZ_LOCKED, __FUNCTION__), 0);\n\taddCondition(condition);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8bdd80d6211da188a0d60c4b83c075b75eee12212458d599c262cd3228d24b75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3056, + "startColumn": 2, + "charOffset": 88665, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3054, + "startColumn": 2, + "charOffset": 88611, + "charLength": 3, + "snippet": { + "text": "\tg_game().removePlayer(static_self_cast());\n\n\tfor (const auto &[key, player] : g_game().getPlayers()) {\n\t\tplayer->vip()->notifyStatusChange(static_self_cast(), VipStatus_t::Offline);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e978b7cc6a8a39294006df2d5e7dedb1ab369c368906d6601d41651776a4b04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3062, + "startColumn": 2, + "charOffset": 88842, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3060, + "startColumn": 2, + "charOffset": 88815, + "charLength": 3, + "snippet": { + "text": "\nvoid Player::addList() {\n\tfor (const auto &[key, player] : g_game().getPlayers()) {\n\t\tplayer->vip()->notifyStatusChange(static_self_cast(), vip()->getStatus());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7be26955d50a4197d3ec58d5ac3f4027d5b225ce35084d294269231e78c2357" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3070, + "startColumn": 21, + "charOffset": 89133, + "charLength": 12, + "snippet": { + "text": "playerLogout" + } + }, + "contextRegion": { + "startLine": 3068, + "startColumn": 21, + "charOffset": 89040, + "charLength": 12, + "snippet": { + "text": "\nvoid Player::removePlayer(bool displayEffect, bool forced /*= true*/) {\n\tg_creatureEvents().playerLogout(static_self_cast());\n\tif (client) {\n\t\tclient->logout(displayEffect, forced);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37c047e371c66c7d587d1828d7b96e53d5a408e0d35316764d1187ff910268a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3074, + "startColumn": 12, + "charOffset": 89252, + "charLength": 14, + "snippet": { + "text": "removeCreature" + } + }, + "contextRegion": { + "startLine": 3072, + "startColumn": 12, + "charOffset": 89190, + "charLength": 14, + "snippet": { + "text": "\t\tclient->logout(displayEffect, forced);\n\t} else {\n\t\tg_game().removeCreature(static_self_cast());\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43158f253e8c9047f8489e0faef2a0f45d5e7c86b857fae3d94d6a6dafb0271d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3079, + "startColumn": 61, + "charOffset": 89406, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 3077, + "startColumn": 61, + "charOffset": 89301, + "charLength": 9, + "snippet": { + "text": "\n// close container and its child containers\nvoid Player::autoCloseContainers(std::shared_ptr container) {\n\tstd::vector closeList;\n\tfor (const auto &it : openContainers) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0bb00b8262cde7345b8de7c743edeafd9f559c4184f70c01d96c2de6e3797299" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3083, + "startColumn": 3, + "charOffset": 89561, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 3081, + "startColumn": 3, + "charOffset": 89453, + "charLength": 5, + "snippet": { + "text": "\tfor (const auto &it : openContainers) {\n\t\tstd::shared_ptr tmpContainer = it.second.container;\n\t\twhile (tmpContainer) {\n\t\t\tif (tmpContainer->isRemoved() || tmpContainer == container) {\n\t\t\t\tcloseList.push_back(it.first);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae951eaa9f4bb05a781f0e37c33de76af1cd18801894721fccfb49f18b0a4d65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'tmpContainer' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3083, + "startColumn": 10, + "charOffset": 89568, + "charLength": 12, + "snippet": { + "text": "tmpContainer" + } + }, + "contextRegion": { + "startLine": 3081, + "startColumn": 10, + "charOffset": 89453, + "charLength": 12, + "snippet": { + "text": "\tfor (const auto &it : openContainers) {\n\t\tstd::shared_ptr tmpContainer = it.second.container;\n\t\twhile (tmpContainer) {\n\t\t\tif (tmpContainer->isRemoved() || tmpContainer == container) {\n\t\t\t\tcloseList.push_back(it.first);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fbc50185948168f837f0a4a6880b46a48c91789139e3743967055084f382535" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3093, + "startColumn": 2, + "charOffset": 89793, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3091, + "startColumn": 2, + "charOffset": 89788, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (uint32_t containerId : closeList) {\n\t\tcloseContainer(containerId);\n\t\tif (client) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d77ebe860ae2cfce28a46875c7a22a50e6cb8f7d6bc8b46af22e83118204314" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3094, + "startColumn": 18, + "charOffset": 89851, + "charLength": 11, + "snippet": { + "text": "containerId" + } + }, + "contextRegion": { + "startLine": 3092, + "startColumn": 18, + "charOffset": 89791, + "charLength": 11, + "snippet": { + "text": "\n\tfor (uint32_t containerId : closeList) {\n\t\tcloseContainer(containerId);\n\t\tif (client) {\n\t\t\tclient->sendCloseContainer(containerId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8fef7d7b307401e0df5a4171c95b8e7d44fc58d1bf89b2b42b4b25183de9c04d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3096, + "startColumn": 31, + "charOffset": 89911, + "charLength": 11, + "snippet": { + "text": "containerId" + } + }, + "contextRegion": { + "startLine": 3094, + "startColumn": 31, + "charOffset": 89834, + "charLength": 11, + "snippet": { + "text": "\t\tcloseContainer(containerId);\n\t\tif (client) {\n\t\t\tclient->sendCloseContainer(containerId);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8317b4367b08e8b48f528f767c78741454239c72b760f4e683739df2abbac55b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3101, + "startColumn": 48, + "charOffset": 89982, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 3099, + "startColumn": 48, + "charOffset": 89932, + "charLength": 4, + "snippet": { + "text": "}\n\nbool Player::hasCapacity(std::shared_ptr item, uint32_t count) const {\n\tif (hasFlag(PlayerFlags_t::CannotPickupItem)) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90ed6567ea1244f8b1822a3fd981a5bb727e9dafae53749df61304f2edc04d68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3117, + "startColumn": 21, + "charOffset": 90408, + "charLength": 8, + "snippet": { + "text": "queryAdd" + } + }, + "contextRegion": { + "startLine": 3115, + "startColumn": 21, + "charOffset": 90385, + "charLength": 8, + "snippet": { + "text": "}\n\nReturnValue Player::queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr) {\n\tstd::shared_ptr item = thing->getItem();\n\tif (item == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "228e0f456d21495e83322acdb0cdd9204af133b95eb36ae48e1ea471c33ab6a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'queryAdd' has cognitive complexity of 118 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3117, + "startColumn": 21, + "charOffset": 90408, + "charLength": 8, + "snippet": { + "text": "queryAdd" + } + }, + "contextRegion": { + "startLine": 3115, + "startColumn": 21, + "charOffset": 90385, + "charLength": 8, + "snippet": { + "text": "}\n\nReturnValue Player::queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr) {\n\tstd::shared_ptr item = thing->getItem();\n\tif (item == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2257246050ae24fd170ef003733213acb5c1ed0ce5a8d2c1e5951b2a8029cc46" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'queryAdd' of similar type ('uint32_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3117, + "startColumn": 82, + "charOffset": 90469, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 3115, + "startColumn": 82, + "charOffset": 90385, + "charLength": 8, + "snippet": { + "text": "}\n\nReturnValue Player::queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr) {\n\tstd::shared_ptr item = thing->getItem();\n\tif (item == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b898ba7d82834ed351bd5da63a8edc7a2aa6ec26e5ccbebcd92de80dd301026c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3117, + "startColumn": 139, + "charOffset": 90526, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 3115, + "startColumn": 139, + "charOffset": 90385, + "charLength": 1, + "snippet": { + "text": "}\n\nReturnValue Player::queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr) {\n\tstd::shared_ptr item = thing->getItem();\n\tif (item == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ca6b513e001e7e4525027a4d6a44bc228fab5fafb25a76e2917d832ffe7082f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3149, + "startColumn": 3, + "charOffset": 91510, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 3, + "charOffset": 91469, + "charLength": 2, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\n\t} else {\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8e656bc17a32e3815e92c5be43a08857b7db4b07e62fc7050754ba8150a70ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3149, + "startColumn": 7, + "charOffset": 91514, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 7, + "charOffset": 91469, + "charLength": 1, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\n\t} else {\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3256130d4432f494101a1709a6bfb3ab4d0426de0331149ff60001c47df68e48" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3149, + "startColumn": 7, + "charOffset": 91514, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 7, + "charOffset": 91469, + "charLength": 1, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\n\t} else {\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40b8ac49ff541c75d866b76fa1cc0fb722220fbf385b6cdc1ac41468e6b1b7fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3149, + "startColumn": 8, + "charOffset": 91515, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 8, + "charOffset": 91469, + "charLength": 12, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\n\t} else {\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d8579cd690b55129bc2861786e44193f1ecf394afeef9b654b3aed383ee19ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3149, + "startColumn": 21, + "charOffset": 91528, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 21, + "charOffset": 91469, + "charLength": 1, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\n\t} else {\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0fe300a7bfd5ca9409ed50c190004454863e5e22da1bb277c6dc4d15cfed4c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3149, + "startColumn": 38, + "charOffset": 91545, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 38, + "charOffset": 91469, + "charLength": 1, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\n\t} else {\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "898d378da62c88474fc814a006f5987064455affa32a534529adeb810e65fe4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3149, + "startColumn": 39, + "charOffset": 91546, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 39, + "charOffset": 91469, + "charLength": 12, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\n\t} else {\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b126b3355bbb26357dde4bc57308819883f6d3b12f922e31eb1309c177dace8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3149, + "startColumn": 52, + "charOffset": 91559, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 52, + "charOffset": 91469, + "charLength": 1, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\n\t} else {\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21bb14f3f7b4308f92a32f8f8af82c23cda92befa6b0336f2468eb9630b760df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3149, + "startColumn": 73, + "charOffset": 91580, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 73, + "charOffset": 91469, + "charLength": 1, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\n\t} else {\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "017870aab18b94f742d92accf0855af030b627eb7c35e2a19ce68b1c828e9de9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3149, + "startColumn": 74, + "charOffset": 91581, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 74, + "charOffset": 91469, + "charLength": 12, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\n\t} else {\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c810a029cd18812013941931b870dfe4d1425aef279f0fdea0abb18cef1727e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3149, + "startColumn": 87, + "charOffset": 91594, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 87, + "charOffset": 91469, + "charLength": 1, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\n\t} else {\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db310a2e3d785b36b1ff834bf7f1599ae6b1bb2338540a0479152b6e83f580b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3149, + "startColumn": 108, + "charOffset": 91615, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 108, + "charOffset": 91469, + "charLength": 1, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\n\t} else {\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b32b2921c0881f6d05dc30cae423bb8e939670dbcc111707108b20011abe7c5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3149, + "startColumn": 109, + "charOffset": 91616, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 109, + "charOffset": 91469, + "charLength": 12, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\n\t} else {\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6537960c10d85eadca6c54014c097fc2405c85d7067e25baa29106c81b1d1332" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3149, + "startColumn": 122, + "charOffset": 91629, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 122, + "charOffset": 91469, + "charLength": 1, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\n\t} else {\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "297f54e8dc913119769f062803b114cab806fae32706250be7a637d2b283e889" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3149, + "startColumn": 140, + "charOffset": 91647, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 140, + "charOffset": 91469, + "charLength": 1, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\n\t} else {\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77324e2086b6dec4c1ddee576a82edb015bd1fdb63c2c5c1f8e4374edf44027c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3149, + "startColumn": 141, + "charOffset": 91648, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 141, + "charOffset": 91469, + "charLength": 12, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\n\t} else {\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbe938ed388faa1893bc09701b2b630c2d423c849fce075f64e7fa9bca01882e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3149, + "startColumn": 154, + "charOffset": 91661, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 154, + "charOffset": 91469, + "charLength": 1, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\n\t} else {\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e662a8317bc23db84b78ce9faa9e221b13bc113f191d5e2d5057e92ea1d20948" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3149, + "startColumn": 171, + "charOffset": 91678, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 171, + "charOffset": 91469, + "charLength": 1, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\n\t} else {\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a006712d0ce74493089ff0d0032a8ada21ab044db2f3c6d9e7ba8015431dada1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3149, + "startColumn": 172, + "charOffset": 91679, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 172, + "charOffset": 91469, + "charLength": 12, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\n\t} else {\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2682dd9405fd8aec090a11be53d1bfb62ba4588c7b1c9b281338a0afb97ad76" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3149, + "startColumn": 185, + "charOffset": 91692, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 185, + "charOffset": 91469, + "charLength": 1, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\n\t} else {\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b03afedcc7a91c5cb87d4e59f1182311f68d43c60b0433cf08f39cec8a67f5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3149, + "startColumn": 199, + "charOffset": 91706, + "charLength": 2, + "snippet": { + "text": "||" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 199, + "charOffset": 91469, + "charLength": 2, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\n\t} else {\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a389bdba9f07509fa882cae2d08fa96a32ba2d43b8aa5a02f31bcec5eca10dcd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3149, + "startColumn": 202, + "charOffset": 91709, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 202, + "charOffset": 91469, + "charLength": 1, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\n\t} else {\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f1355780f6bb4cc94ca6a11ce47461d2254e7b8ffe32b54c35a7c7cfa8125e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3149, + "startColumn": 203, + "charOffset": 91710, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 203, + "charOffset": 91469, + "charLength": 12, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\n\t} else {\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9fec51f9ae9bd3a76dff74047ea81c2e8b97b1b96780e37713eb3a927fc12d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3149, + "startColumn": 216, + "charOffset": 91723, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 216, + "charOffset": 91469, + "charLength": 1, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\n\t} else {\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de1ca0622dd625d8ce1ef04609ac8812db62979fe7c78c0218d56623a45b9a0e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3149, + "startColumn": 231, + "charOffset": 91738, + "charLength": 1, + "snippet": { + "text": "{" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 231, + "charOffset": 91469, + "charLength": 1, + "snippet": { + "text": "\t\tret = RETURNVALUE_NOERROR;\n\t} else {\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d7fc7b9d529e7d0b0cb488b05016efdbb175f0e5265bfdfae8c83053e300a35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3151, + "startColumn": 14, + "charOffset": 91791, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3149, + "startColumn": 14, + "charOffset": 91508, + "charLength": 12, + "snippet": { + "text": "\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {\n\t\t\tret = RETURNVALUE_PUTTHISOBJECTINBOTHHANDS;\n\t\t} else if ((slotPosition & SLOTP_RIGHT) || (slotPosition & SLOTP_LEFT)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff1c922484028fd1acba99058536d1df784e1c871fa531f54dba7ba765f12092" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3151, + "startColumn": 14, + "charOffset": 91791, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3149, + "startColumn": 14, + "charOffset": 91508, + "charLength": 12, + "snippet": { + "text": "\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {\n\t\t\tret = RETURNVALUE_PUTTHISOBJECTINBOTHHANDS;\n\t\t} else if ((slotPosition & SLOTP_RIGHT) || (slotPosition & SLOTP_LEFT)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1e202a3ce618ac052ca2046880ceb79606b29f190458fdcf2f8af904862cca5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3151, + "startColumn": 14, + "charOffset": 91791, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3149, + "startColumn": 14, + "charOffset": 91508, + "charLength": 12, + "snippet": { + "text": "\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {\n\t\t\tret = RETURNVALUE_PUTTHISOBJECTINBOTHHANDS;\n\t\t} else if ((slotPosition & SLOTP_RIGHT) || (slotPosition & SLOTP_LEFT)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f2950fd3c47c28452aebc60a12c9f7e3e50a41dcabf40d4409853e467b199a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3151, + "startColumn": 27, + "charOffset": 91804, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3149, + "startColumn": 27, + "charOffset": 91508, + "charLength": 1, + "snippet": { + "text": "\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {\n\t\t\tret = RETURNVALUE_PUTTHISOBJECTINBOTHHANDS;\n\t\t} else if ((slotPosition & SLOTP_RIGHT) || (slotPosition & SLOTP_LEFT)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5771469ffcd8e2dc047875ceab4394a52b3991f43949ed13bb167c0bc9a50fc0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3153, + "startColumn": 14, + "charOffset": 91884, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 3151, + "startColumn": 14, + "charOffset": 91778, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_TWO_HAND) {\n\t\t\tret = RETURNVALUE_PUTTHISOBJECTINBOTHHANDS;\n\t\t} else if ((slotPosition & SLOTP_RIGHT) || (slotPosition & SLOTP_LEFT)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ebe869b8b0612d6176647a4893499ea7c6a5358c16888106a1342e4f3b6946d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3153, + "startColumn": 14, + "charOffset": 91884, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 3151, + "startColumn": 14, + "charOffset": 91778, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_TWO_HAND) {\n\t\t\tret = RETURNVALUE_PUTTHISOBJECTINBOTHHANDS;\n\t\t} else if ((slotPosition & SLOTP_RIGHT) || (slotPosition & SLOTP_LEFT)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa142f81a8eaa7c742ac15311543490bc4b83d3e5f28a4f623dc16a121ed93fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3153, + "startColumn": 15, + "charOffset": 91885, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3151, + "startColumn": 15, + "charOffset": 91778, + "charLength": 12, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_TWO_HAND) {\n\t\t\tret = RETURNVALUE_PUTTHISOBJECTINBOTHHANDS;\n\t\t} else if ((slotPosition & SLOTP_RIGHT) || (slotPosition & SLOTP_LEFT)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63bb406d9bd40d6f569abc03070bbf3df4d9f52b69c74813e1617fae7b77d61c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3153, + "startColumn": 28, + "charOffset": 91898, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3151, + "startColumn": 28, + "charOffset": 91778, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_TWO_HAND) {\n\t\t\tret = RETURNVALUE_PUTTHISOBJECTINBOTHHANDS;\n\t\t} else if ((slotPosition & SLOTP_RIGHT) || (slotPosition & SLOTP_LEFT)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d2ee8d83f8cdd3bd61ecc86160f6c6953125ff0e84bf88a6ebee59d1a739d7d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3153, + "startColumn": 43, + "charOffset": 91913, + "charLength": 2, + "snippet": { + "text": "||" + } + }, + "contextRegion": { + "startLine": 3151, + "startColumn": 43, + "charOffset": 91778, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_TWO_HAND) {\n\t\t\tret = RETURNVALUE_PUTTHISOBJECTINBOTHHANDS;\n\t\t} else if ((slotPosition & SLOTP_RIGHT) || (slotPosition & SLOTP_LEFT)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f18e1228aedf1b4d1eac1ef8ae895b37a705a98cce220e915ef5ed54bafcd04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3153, + "startColumn": 46, + "charOffset": 91916, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 3151, + "startColumn": 46, + "charOffset": 91778, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_TWO_HAND) {\n\t\t\tret = RETURNVALUE_PUTTHISOBJECTINBOTHHANDS;\n\t\t} else if ((slotPosition & SLOTP_RIGHT) || (slotPosition & SLOTP_LEFT)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24c4c2ff375e12ef542a6fc4f02ef294c332fe0d2024198acd641a4bcfa9b7e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3153, + "startColumn": 47, + "charOffset": 91917, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3151, + "startColumn": 47, + "charOffset": 91778, + "charLength": 12, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_TWO_HAND) {\n\t\t\tret = RETURNVALUE_PUTTHISOBJECTINBOTHHANDS;\n\t\t} else if ((slotPosition & SLOTP_RIGHT) || (slotPosition & SLOTP_LEFT)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d1c548d808bb47b6c1c78f049babc2dc83df07beb99cc591d0eb8582d5d1919" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3153, + "startColumn": 60, + "charOffset": 91930, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3151, + "startColumn": 60, + "charOffset": 91778, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_TWO_HAND) {\n\t\t\tret = RETURNVALUE_PUTTHISOBJECTINBOTHHANDS;\n\t\t} else if ((slotPosition & SLOTP_RIGHT) || (slotPosition & SLOTP_LEFT)) {\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8244eadfa0e607d73fe10b867077c1837e7c94bcde213cef4489b4f1bedfb351" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3160, + "startColumn": 8, + "charOffset": 92044, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3158, + "startColumn": 8, + "charOffset": 91993, + "charLength": 12, + "snippet": { + "text": "\tswitch (index) {\n\t\tcase CONST_SLOT_HEAD: {\n\t\t\tif (slotPosition & SLOTP_HEAD) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1c1ed956a1cc55b6d7637af3ae8a9f772c636e80d105dac0bedc81abfde06cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3160, + "startColumn": 8, + "charOffset": 92044, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3158, + "startColumn": 8, + "charOffset": 91993, + "charLength": 12, + "snippet": { + "text": "\tswitch (index) {\n\t\tcase CONST_SLOT_HEAD: {\n\t\t\tif (slotPosition & SLOTP_HEAD) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d75f37d327baf3036f2b3a8637b68d6d4948df70c4d525fcadda546cc973209a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3160, + "startColumn": 8, + "charOffset": 92044, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3158, + "startColumn": 8, + "charOffset": 91993, + "charLength": 12, + "snippet": { + "text": "\tswitch (index) {\n\t\tcase CONST_SLOT_HEAD: {\n\t\t\tif (slotPosition & SLOTP_HEAD) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "715e68f7a4a9e57aea3fd9bb1bbe974ffb0f4fcee1a4fb7a2fc0f4d943d1d37a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3160, + "startColumn": 21, + "charOffset": 92057, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3158, + "startColumn": 21, + "charOffset": 91993, + "charLength": 1, + "snippet": { + "text": "\tswitch (index) {\n\t\tcase CONST_SLOT_HEAD: {\n\t\t\tif (slotPosition & SLOTP_HEAD) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "733746dabf68e3c661b0abd5869c1ac85471d84854778bdc7a6aa3b926bcb97a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3167, + "startColumn": 8, + "charOffset": 92161, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3165, + "startColumn": 8, + "charOffset": 92123, + "charLength": 12, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_NECKLACE: {\n\t\t\tif (slotPosition & SLOTP_NECKLACE) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5d9eb78cd5d38046a1296fc3540f247d863b768990e7e1ea07e1c079c0e9d76" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3167, + "startColumn": 8, + "charOffset": 92161, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3165, + "startColumn": 8, + "charOffset": 92123, + "charLength": 12, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_NECKLACE: {\n\t\t\tif (slotPosition & SLOTP_NECKLACE) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1fad546262e2cfa6426febe0f3dfd4534e6e3bd8391335a5ba5642696d25e089" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3167, + "startColumn": 8, + "charOffset": 92161, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3165, + "startColumn": 8, + "charOffset": 92123, + "charLength": 12, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_NECKLACE: {\n\t\t\tif (slotPosition & SLOTP_NECKLACE) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32ad8b3722d5362a7d679c45d1c3a5deb061c12d13148493c81a02a6cd079f59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3167, + "startColumn": 21, + "charOffset": 92174, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3165, + "startColumn": 21, + "charOffset": 92123, + "charLength": 1, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_NECKLACE: {\n\t\t\tif (slotPosition & SLOTP_NECKLACE) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17faf5734060c09a012d1700eabd8789cfa8ff4c1fa22d95e63e6062bcdac887" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3174, + "startColumn": 8, + "charOffset": 92282, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3172, + "startColumn": 8, + "charOffset": 92244, + "charLength": 12, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_BACKPACK: {\n\t\t\tif (slotPosition & SLOTP_BACKPACK) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f6538a42bc6f1ebae7eacea178d2219f67ba4fdca2f46c03e3d5b1f9b8965a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3174, + "startColumn": 8, + "charOffset": 92282, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3172, + "startColumn": 8, + "charOffset": 92244, + "charLength": 12, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_BACKPACK: {\n\t\t\tif (slotPosition & SLOTP_BACKPACK) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7820185e068108500941dc0b98b198b858af3aab8ab7b1fae85978b98b1e15c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3174, + "startColumn": 8, + "charOffset": 92282, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3172, + "startColumn": 8, + "charOffset": 92244, + "charLength": 12, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_BACKPACK: {\n\t\t\tif (slotPosition & SLOTP_BACKPACK) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40b8ac49ff541c75d866b76fa1cc0fb722220fbf385b6cdc1ac41468e6b1b7fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3174, + "startColumn": 21, + "charOffset": 92295, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3172, + "startColumn": 21, + "charOffset": 92244, + "charLength": 1, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_BACKPACK: {\n\t\t\tif (slotPosition & SLOTP_BACKPACK) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25f2f5c5a77548cf55d7c979e7d9e41f9c8f0ddd09f6e5650d88bba25325718c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3181, + "startColumn": 8, + "charOffset": 92400, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3179, + "startColumn": 8, + "charOffset": 92365, + "charLength": 12, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_ARMOR: {\n\t\t\tif (slotPosition & SLOTP_ARMOR) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c521cc1e2ddb43a7a61dd10aacbcb6a8542d97117205aa77398fd6bd815c5ce1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3181, + "startColumn": 8, + "charOffset": 92400, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3179, + "startColumn": 8, + "charOffset": 92365, + "charLength": 12, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_ARMOR: {\n\t\t\tif (slotPosition & SLOTP_ARMOR) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4c5cf8436e6d7dc7a44754493a13c0509957b509719fb0f2e5ee7e041d80693" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3181, + "startColumn": 8, + "charOffset": 92400, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3179, + "startColumn": 8, + "charOffset": 92365, + "charLength": 12, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_ARMOR: {\n\t\t\tif (slotPosition & SLOTP_ARMOR) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "910ec1d70778713dfa7f701dc1116a941e3056fc987d401334579c03fb7a842a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3181, + "startColumn": 21, + "charOffset": 92413, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3179, + "startColumn": 21, + "charOffset": 92365, + "charLength": 1, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_ARMOR: {\n\t\t\tif (slotPosition & SLOTP_ARMOR) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f0033fe08be66ccf38dcfd3494e31b99eb6c8f26e86cfdd6b70b01494dff5d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3188, + "startColumn": 8, + "charOffset": 92515, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3186, + "startColumn": 8, + "charOffset": 92480, + "charLength": 12, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_RIGHT: {\n\t\t\tif (slotPosition & SLOTP_RIGHT) {\n\t\t\t\tif (item->getWeaponType() != WEAPON_SHIELD && !item->isQuiver()) {\n\t\t\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8df8e17fcb8de5f75a00556879b9e0fec66c1f332e87a164a76f102c1fb3064" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3188, + "startColumn": 8, + "charOffset": 92515, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3186, + "startColumn": 8, + "charOffset": 92480, + "charLength": 12, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_RIGHT: {\n\t\t\tif (slotPosition & SLOTP_RIGHT) {\n\t\t\t\tif (item->getWeaponType() != WEAPON_SHIELD && !item->isQuiver()) {\n\t\t\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7bc932528f48fbbb008e6ad2283df7b49635c685dbae8664b0b2667de9863903" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3188, + "startColumn": 8, + "charOffset": 92515, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3186, + "startColumn": 8, + "charOffset": 92480, + "charLength": 12, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_RIGHT: {\n\t\t\tif (slotPosition & SLOTP_RIGHT) {\n\t\t\t\tif (item->getWeaponType() != WEAPON_SHIELD && !item->isQuiver()) {\n\t\t\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83602470365e17f705e218971f3ae0c238ab4be0f4f597c74771dc4431ea7292" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3188, + "startColumn": 21, + "charOffset": 92528, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3186, + "startColumn": 21, + "charOffset": 92480, + "charLength": 1, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_RIGHT: {\n\t\t\tif (slotPosition & SLOTP_RIGHT) {\n\t\t\t\tif (item->getWeaponType() != WEAPON_SHIELD && !item->isQuiver()) {\n\t\t\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36e9226c83955227d584a8fa115f4b431d7ba075ef1dd40069ded34799efd50e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3194, + "startColumn": 11, + "charOffset": 92766, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 3192, + "startColumn": 11, + "charOffset": 92669, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\tstd::shared_ptr leftItem = inventory[CONST_SLOT_LEFT];\n\t\t\t\t\tif (leftItem) {\n\t\t\t\t\t\tif ((leftItem->getSlotPosition() | slotPosition) & SLOTP_TWO_HAND) {\n\t\t\t\t\t\t\tif (item->isQuiver() && leftItem->getWeaponType() == WEAPON_DISTANCE) {\n\t\t\t\t\t\t\t\tret = RETURNVALUE_NOERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1daa4c5a9f6ac004422b88b4c36183aafe3183e05096dee00b46df53f3e6de9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3194, + "startColumn": 11, + "charOffset": 92766, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 3192, + "startColumn": 11, + "charOffset": 92669, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\tstd::shared_ptr leftItem = inventory[CONST_SLOT_LEFT];\n\t\t\t\t\tif (leftItem) {\n\t\t\t\t\t\tif ((leftItem->getSlotPosition() | slotPosition) & SLOTP_TWO_HAND) {\n\t\t\t\t\t\t\tif (item->isQuiver() && leftItem->getWeaponType() == WEAPON_DISTANCE) {\n\t\t\t\t\t\t\t\tret = RETURNVALUE_NOERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbd225988c52d9ebed90bd718c912b8c104330ad841d06c85915478136f146da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3194, + "startColumn": 11, + "charOffset": 92766, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 3192, + "startColumn": 11, + "charOffset": 92669, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\tstd::shared_ptr leftItem = inventory[CONST_SLOT_LEFT];\n\t\t\t\t\tif (leftItem) {\n\t\t\t\t\t\tif ((leftItem->getSlotPosition() | slotPosition) & SLOTP_TWO_HAND) {\n\t\t\t\t\t\t\tif (item->isQuiver() && leftItem->getWeaponType() == WEAPON_DISTANCE) {\n\t\t\t\t\t\t\t\tret = RETURNVALUE_NOERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44a0299b433604d57a4cc5971090a8b5ee4831483099b22cc7bee083f6d61681" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3194, + "startColumn": 12, + "charOffset": 92767, + "charLength": 8, + "snippet": { + "text": "leftItem" + } + }, + "contextRegion": { + "startLine": 3192, + "startColumn": 12, + "charOffset": 92669, + "charLength": 8, + "snippet": { + "text": "\t\t\t\t\tstd::shared_ptr leftItem = inventory[CONST_SLOT_LEFT];\n\t\t\t\t\tif (leftItem) {\n\t\t\t\t\t\tif ((leftItem->getSlotPosition() | slotPosition) & SLOTP_TWO_HAND) {\n\t\t\t\t\t\t\tif (item->isQuiver() && leftItem->getWeaponType() == WEAPON_DISTANCE) {\n\t\t\t\t\t\t\t\tret = RETURNVALUE_NOERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7988aacb97eb827f8f0064252998499642618ea2ab9e61f9a8431cddf8c62a30" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3194, + "startColumn": 56, + "charOffset": 92811, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3192, + "startColumn": 56, + "charOffset": 92669, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\tstd::shared_ptr leftItem = inventory[CONST_SLOT_LEFT];\n\t\t\t\t\tif (leftItem) {\n\t\t\t\t\t\tif ((leftItem->getSlotPosition() | slotPosition) & SLOTP_TWO_HAND) {\n\t\t\t\t\t\t\tif (item->isQuiver() && leftItem->getWeaponType() == WEAPON_DISTANCE) {\n\t\t\t\t\t\t\t\tret = RETURNVALUE_NOERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92d4a52ec09fa41174ad4501eaf9c81b1a754145949d15cbf2f99c8e09bf59f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3207, + "startColumn": 15, + "charOffset": 93150, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3205, + "startColumn": 15, + "charOffset": 93123, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (slotPosition & SLOTP_TWO_HAND) {\n\t\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t\t} else if (inventory[CONST_SLOT_LEFT]) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "338a405cea98e28d9f40b727522ac16d3d0834a474e0b87f0a404d291b178135" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3207, + "startColumn": 15, + "charOffset": 93150, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3205, + "startColumn": 15, + "charOffset": 93123, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (slotPosition & SLOTP_TWO_HAND) {\n\t\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t\t} else if (inventory[CONST_SLOT_LEFT]) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b88e94b7a2e98c994446358fdd42dc173f8df98bdb6c273b69c076f3acbe0af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3207, + "startColumn": 15, + "charOffset": 93150, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3205, + "startColumn": 15, + "charOffset": 93123, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (slotPosition & SLOTP_TWO_HAND) {\n\t\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t\t} else if (inventory[CONST_SLOT_LEFT]) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7048eb1eca86dab8afb22ca67e6f3286689a7224b0b2c5b03e64420b1ac9ca7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3207, + "startColumn": 28, + "charOffset": 93163, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3205, + "startColumn": 28, + "charOffset": 93123, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (slotPosition & SLOTP_TWO_HAND) {\n\t\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t\t} else if (inventory[CONST_SLOT_LEFT]) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10d503660a5e6d654a81e129b5f5ffeb98e7630b251a5c8262471bfcd44ef802" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3211, + "startColumn": 5, + "charOffset": 93335, + "charLength": 12, + "snippet": { + "text": "WeaponType_t" + } + }, + "contextRegion": { + "startLine": 3209, + "startColumn": 5, + "charOffset": 93222, + "charLength": 12, + "snippet": { + "text": "\t\t\t} else if (inventory[CONST_SLOT_LEFT]) {\n\t\t\t\tstd::shared_ptr leftItem = inventory[CONST_SLOT_LEFT];\n\t\t\t\tWeaponType_t type = item->getWeaponType(), leftType = leftItem->getWeaponType();\n\n\t\t\t\tif (leftItem->getSlotPosition() & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e68e2fbdb3c2967ce5d9b633bee0568623ded1c16a4906e11f616e5737c63f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3211, + "startColumn": 5, + "charOffset": 93335, + "charLength": 12, + "snippet": { + "text": "WeaponType_t" + } + }, + "contextRegion": { + "startLine": 3209, + "startColumn": 5, + "charOffset": 93222, + "charLength": 12, + "snippet": { + "text": "\t\t\t} else if (inventory[CONST_SLOT_LEFT]) {\n\t\t\t\tstd::shared_ptr leftItem = inventory[CONST_SLOT_LEFT];\n\t\t\t\tWeaponType_t type = item->getWeaponType(), leftType = leftItem->getWeaponType();\n\n\t\t\t\tif (leftItem->getSlotPosition() & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92657e24a2a05571c9f53e5f2d6d99eeed106976c6d165adf661cae4b7adc35e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3213, + "startColumn": 9, + "charOffset": 93425, + "charLength": 8, + "snippet": { + "text": "leftItem" + } + }, + "contextRegion": { + "startLine": 3211, + "startColumn": 9, + "charOffset": 93331, + "charLength": 8, + "snippet": { + "text": "\t\t\t\tWeaponType_t type = item->getWeaponType(), leftType = leftItem->getWeaponType();\n\n\t\t\t\tif (leftItem->getSlotPosition() & SLOTP_TWO_HAND) {\n\t\t\t\t\tret = RETURNVALUE_DROPTWOHANDEDITEM;\n\t\t\t\t} else if (item == leftItem && count == item->getItemCount()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "406ca5dc0ccafbd833909ca6aca42ad4e12f073c628a8e439e1c76740d8dd97c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3213, + "startColumn": 9, + "charOffset": 93425, + "charLength": 8, + "snippet": { + "text": "leftItem" + } + }, + "contextRegion": { + "startLine": 3211, + "startColumn": 9, + "charOffset": 93331, + "charLength": 8, + "snippet": { + "text": "\t\t\t\tWeaponType_t type = item->getWeaponType(), leftType = leftItem->getWeaponType();\n\n\t\t\t\tif (leftItem->getSlotPosition() & SLOTP_TWO_HAND) {\n\t\t\t\t\tret = RETURNVALUE_DROPTWOHANDEDITEM;\n\t\t\t\t} else if (item == leftItem && count == item->getItemCount()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14b5a3c1e4cf21689ee0c2cb334208849ec2b9a83e37b42ef5dc6eb33b2ddafd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3213, + "startColumn": 9, + "charOffset": 93425, + "charLength": 8, + "snippet": { + "text": "leftItem" + } + }, + "contextRegion": { + "startLine": 3211, + "startColumn": 9, + "charOffset": 93331, + "charLength": 8, + "snippet": { + "text": "\t\t\t\tWeaponType_t type = item->getWeaponType(), leftType = leftItem->getWeaponType();\n\n\t\t\t\tif (leftItem->getSlotPosition() & SLOTP_TWO_HAND) {\n\t\t\t\t\tret = RETURNVALUE_DROPTWOHANDEDITEM;\n\t\t\t\t} else if (item == leftItem && count == item->getItemCount()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f9d3fc0e691801ea44d54a00a42b59c05e29901a018e0621dff17ffe969b04b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3213, + "startColumn": 37, + "charOffset": 93453, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3211, + "startColumn": 37, + "charOffset": 93331, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tWeaponType_t type = item->getWeaponType(), leftType = leftItem->getWeaponType();\n\n\t\t\t\tif (leftItem->getSlotPosition() & SLOTP_TWO_HAND) {\n\t\t\t\t\tret = RETURNVALUE_DROPTWOHANDEDITEM;\n\t\t\t\t} else if (item == leftItem && count == item->getItemCount()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e662a8317bc23db84b78ce9faa9e221b13bc113f191d5e2d5057e92ea1d20948" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3215, + "startColumn": 67, + "charOffset": 93581, + "charLength": 1, + "snippet": { + "text": "{" + } + }, + "contextRegion": { + "startLine": 3213, + "startColumn": 67, + "charOffset": 93417, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tif (leftItem->getSlotPosition() & SLOTP_TWO_HAND) {\n\t\t\t\t\tret = RETURNVALUE_DROPTWOHANDEDITEM;\n\t\t\t\t} else if (item == leftItem && count == item->getItemCount()) {\n\t\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t\t} else if (leftType == WEAPON_SHIELD && type == WEAPON_SHIELD) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c584f0b5b82df08c8eaa3ad80c1e156f8f8cb8dc4c5bc804fe2c35f66cf917e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3233, + "startColumn": 15, + "charOffset": 94161, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3231, + "startColumn": 15, + "charOffset": 94081, + "charLength": 12, + "snippet": { + "text": "\t\t\tif (item->isQuiver()) {\n\t\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t\t} else if (slotPosition & SLOTP_TWO_HAND) {\n\t\t\t\tif (inventory[CONST_SLOT_RIGHT]) {\n\t\t\t\t\tWeaponType_t type = item->getWeaponType();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c4d064a83e3d519bdf6ddcbd769adca807551120d6efd2014c0a68623810c74" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3233, + "startColumn": 15, + "charOffset": 94161, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3231, + "startColumn": 15, + "charOffset": 94081, + "charLength": 12, + "snippet": { + "text": "\t\t\tif (item->isQuiver()) {\n\t\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t\t} else if (slotPosition & SLOTP_TWO_HAND) {\n\t\t\t\tif (inventory[CONST_SLOT_RIGHT]) {\n\t\t\t\t\tWeaponType_t type = item->getWeaponType();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30019abd1506df0540bcfb8cff97a942ef8e3781b199106d3b7a514212ab6d4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3233, + "startColumn": 15, + "charOffset": 94161, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3231, + "startColumn": 15, + "charOffset": 94081, + "charLength": 12, + "snippet": { + "text": "\t\t\tif (item->isQuiver()) {\n\t\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t\t} else if (slotPosition & SLOTP_TWO_HAND) {\n\t\t\t\tif (inventory[CONST_SLOT_RIGHT]) {\n\t\t\t\t\tWeaponType_t type = item->getWeaponType();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5dd469b60be9b0986ac8f0a10676e6194a5fba427d96985f332b19757aac8840" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3233, + "startColumn": 28, + "charOffset": 94174, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3231, + "startColumn": 28, + "charOffset": 94081, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (item->isQuiver()) {\n\t\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\n\t\t\t} else if (slotPosition & SLOTP_TWO_HAND) {\n\t\t\t\tif (inventory[CONST_SLOT_RIGHT]) {\n\t\t\t\t\tWeaponType_t type = item->getWeaponType();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ad4c7d26959464e2a9c26a1eda706f34c6c6b9cf5e5eb5a6b4faee71a66b970" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3245, + "startColumn": 15, + "charOffset": 94579, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3243, + "startColumn": 15, + "charOffset": 94527, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t\t}\n\t\t\t} else if (slotPosition & SLOTP_LEFT) {\n\t\t\t\tWeaponType_t type = item->getWeaponType();\n\t\t\t\tif (type == WEAPON_NONE || type == WEAPON_SHIELD || type == WEAPON_AMMO) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c39d339d777172a6d8fde703a95847cac26d307ab6dfbaee3af92f3a14deffff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3245, + "startColumn": 15, + "charOffset": 94579, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3243, + "startColumn": 15, + "charOffset": 94527, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t\t}\n\t\t\t} else if (slotPosition & SLOTP_LEFT) {\n\t\t\t\tWeaponType_t type = item->getWeaponType();\n\t\t\t\tif (type == WEAPON_NONE || type == WEAPON_SHIELD || type == WEAPON_AMMO) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a2ad5894a89be25496b2398d33d86c9febaafbee0597f16d775608e9fc7440b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3245, + "startColumn": 15, + "charOffset": 94579, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3243, + "startColumn": 15, + "charOffset": 94527, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t\t}\n\t\t\t} else if (slotPosition & SLOTP_LEFT) {\n\t\t\t\tWeaponType_t type = item->getWeaponType();\n\t\t\t\tif (type == WEAPON_NONE || type == WEAPON_SHIELD || type == WEAPON_AMMO) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ceaedba0a7ffd2b0f528e3b96d4061437e2b06e976d4e00356e2a5e0f6d16c76" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3245, + "startColumn": 28, + "charOffset": 94592, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3243, + "startColumn": 28, + "charOffset": 94527, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t\t}\n\t\t\t} else if (slotPosition & SLOTP_LEFT) {\n\t\t\t\tWeaponType_t type = item->getWeaponType();\n\t\t\t\tif (type == WEAPON_NONE || type == WEAPON_SHIELD || type == WEAPON_AMMO) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1d8cf265da38a82af60d648a152539f91c8fdce479eab25c7c9c43c08d33033" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3254, + "startColumn": 5, + "charOffset": 94941, + "charLength": 12, + "snippet": { + "text": "WeaponType_t" + } + }, + "contextRegion": { + "startLine": 3252, + "startColumn": 5, + "charOffset": 94825, + "charLength": 12, + "snippet": { + "text": "\t\t\t} else if (inventory[CONST_SLOT_RIGHT]) {\n\t\t\t\tstd::shared_ptr rightItem = inventory[CONST_SLOT_RIGHT];\n\t\t\t\tWeaponType_t type = item->getWeaponType(), rightType = rightItem->getWeaponType();\n\n\t\t\t\tif (rightItem->getSlotPosition() & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f4b6025de46749d7a67bc8d584ae93e03fa4524a8c8c782fe7f0748f41e566a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3254, + "startColumn": 5, + "charOffset": 94941, + "charLength": 12, + "snippet": { + "text": "WeaponType_t" + } + }, + "contextRegion": { + "startLine": 3252, + "startColumn": 5, + "charOffset": 94825, + "charLength": 12, + "snippet": { + "text": "\t\t\t} else if (inventory[CONST_SLOT_RIGHT]) {\n\t\t\t\tstd::shared_ptr rightItem = inventory[CONST_SLOT_RIGHT];\n\t\t\t\tWeaponType_t type = item->getWeaponType(), rightType = rightItem->getWeaponType();\n\n\t\t\t\tif (rightItem->getSlotPosition() & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "602dbbbc8b3b64616a5e2ae23b67ca22e34bf453b61e2b1b077e2e28c9b7852a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3256, + "startColumn": 9, + "charOffset": 95033, + "charLength": 9, + "snippet": { + "text": "rightItem" + } + }, + "contextRegion": { + "startLine": 3254, + "startColumn": 9, + "charOffset": 94937, + "charLength": 9, + "snippet": { + "text": "\t\t\t\tWeaponType_t type = item->getWeaponType(), rightType = rightItem->getWeaponType();\n\n\t\t\t\tif (rightItem->getSlotPosition() & SLOTP_TWO_HAND) {\n\t\t\t\t\tret = RETURNVALUE_DROPTWOHANDEDITEM;\n\t\t\t\t} else if (item == rightItem && count == item->getItemCount()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a94e033808d91b1bcb615132e086bd0caf08a06daa7c5c16684c8700bb7b059a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3256, + "startColumn": 9, + "charOffset": 95033, + "charLength": 9, + "snippet": { + "text": "rightItem" + } + }, + "contextRegion": { + "startLine": 3254, + "startColumn": 9, + "charOffset": 94937, + "charLength": 9, + "snippet": { + "text": "\t\t\t\tWeaponType_t type = item->getWeaponType(), rightType = rightItem->getWeaponType();\n\n\t\t\t\tif (rightItem->getSlotPosition() & SLOTP_TWO_HAND) {\n\t\t\t\t\tret = RETURNVALUE_DROPTWOHANDEDITEM;\n\t\t\t\t} else if (item == rightItem && count == item->getItemCount()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf849e4a9b916266cbcb97f56f1ec3dffc7368f1f705fa657835b6ff7b56c3b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3256, + "startColumn": 9, + "charOffset": 95033, + "charLength": 9, + "snippet": { + "text": "rightItem" + } + }, + "contextRegion": { + "startLine": 3254, + "startColumn": 9, + "charOffset": 94937, + "charLength": 9, + "snippet": { + "text": "\t\t\t\tWeaponType_t type = item->getWeaponType(), rightType = rightItem->getWeaponType();\n\n\t\t\t\tif (rightItem->getSlotPosition() & SLOTP_TWO_HAND) {\n\t\t\t\t\tret = RETURNVALUE_DROPTWOHANDEDITEM;\n\t\t\t\t} else if (item == rightItem && count == item->getItemCount()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9d7409f441841a3a7841409bfce1db5d2d90994c7612284223991b0a1f29871" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3256, + "startColumn": 38, + "charOffset": 95062, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3254, + "startColumn": 38, + "charOffset": 94937, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tWeaponType_t type = item->getWeaponType(), rightType = rightItem->getWeaponType();\n\n\t\t\t\tif (rightItem->getSlotPosition() & SLOTP_TWO_HAND) {\n\t\t\t\t\tret = RETURNVALUE_DROPTWOHANDEDITEM;\n\t\t\t\t} else if (item == rightItem && count == item->getItemCount()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c46178d7c5b643f337cbd6be225ab02e2c1d66ff54d1e48517e2082650c9545" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3258, + "startColumn": 68, + "charOffset": 95191, + "charLength": 1, + "snippet": { + "text": "{" + } + }, + "contextRegion": { + "startLine": 3256, + "startColumn": 68, + "charOffset": 95025, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tif (rightItem->getSlotPosition() & SLOTP_TWO_HAND) {\n\t\t\t\t\tret = RETURNVALUE_DROPTWOHANDEDITEM;\n\t\t\t\t} else if (item == rightItem && count == item->getItemCount()) {\n\t\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t\t} else if (rightType == WEAPON_SHIELD && type == WEAPON_SHIELD) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83d1104b3950efb56ee2108f1c211f971725c5ac0a25065b9312ddab0c915b5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3274, + "startColumn": 8, + "charOffset": 95702, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3272, + "startColumn": 8, + "charOffset": 95668, + "charLength": 12, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_LEGS: {\n\t\t\tif (slotPosition & SLOTP_LEGS) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08f482af5f2a81a432a40f2122bc6e31df3b25e53d95dfb9675d64ca8acab8a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3274, + "startColumn": 8, + "charOffset": 95702, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3272, + "startColumn": 8, + "charOffset": 95668, + "charLength": 12, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_LEGS: {\n\t\t\tif (slotPosition & SLOTP_LEGS) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97234be7ddc934d267a9261fdb659e1ef899a10707d5ae1a3ac88f9c795b0229" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3274, + "startColumn": 8, + "charOffset": 95702, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3272, + "startColumn": 8, + "charOffset": 95668, + "charLength": 12, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_LEGS: {\n\t\t\tif (slotPosition & SLOTP_LEGS) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "160c8a7696256dee66cec771de86f0d41ab12dd842ba3f9375b8548c654c58fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3274, + "startColumn": 21, + "charOffset": 95715, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3272, + "startColumn": 21, + "charOffset": 95668, + "charLength": 1, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_LEGS: {\n\t\t\tif (slotPosition & SLOTP_LEGS) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66bbd3f343cb84b1874ecf824a256998f03dec2a0460f29ff937a3392da1948c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3281, + "startColumn": 8, + "charOffset": 95815, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3279, + "startColumn": 8, + "charOffset": 95781, + "charLength": 12, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_FEET: {\n\t\t\tif (slotPosition & SLOTP_FEET) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7da7b61b85764e02bac3b4f272e591934c6b628b72acef37b9cfa841683dfd7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3281, + "startColumn": 8, + "charOffset": 95815, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3279, + "startColumn": 8, + "charOffset": 95781, + "charLength": 12, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_FEET: {\n\t\t\tif (slotPosition & SLOTP_FEET) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06936f22f43cee0b1627e6221a0666bc7babc6a655d06f57da9e08e466a1006e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3281, + "startColumn": 8, + "charOffset": 95815, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3279, + "startColumn": 8, + "charOffset": 95781, + "charLength": 12, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_FEET: {\n\t\t\tif (slotPosition & SLOTP_FEET) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4146deb093d2c6271ddf5e6799c05d0dc90a766481b3526b193fb9b10202d6e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3281, + "startColumn": 21, + "charOffset": 95828, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3279, + "startColumn": 21, + "charOffset": 95781, + "charLength": 1, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_FEET: {\n\t\t\tif (slotPosition & SLOTP_FEET) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f8e6a66f58681f1c9407b8fd012d832d71f3e8ba2aab4dfd20e3fc8a407bd4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3288, + "startColumn": 8, + "charOffset": 95928, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3286, + "startColumn": 8, + "charOffset": 95894, + "charLength": 12, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_RING: {\n\t\t\tif (slotPosition & SLOTP_RING) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c66370cf696c9dfc5b35044bde6f3a218b0fadb85c7b96204bbbc8c2733621b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3288, + "startColumn": 8, + "charOffset": 95928, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3286, + "startColumn": 8, + "charOffset": 95894, + "charLength": 12, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_RING: {\n\t\t\tif (slotPosition & SLOTP_RING) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a92241e82d3d09ca2c393dde734243f03ec18654d7d76330225abc574f320c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3288, + "startColumn": 8, + "charOffset": 95928, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3286, + "startColumn": 8, + "charOffset": 95894, + "charLength": 12, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_RING: {\n\t\t\tif (slotPosition & SLOTP_RING) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7dcc94ed6b35451631513f67767158e74f508f042e7a82146e2d6ed44367295c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3288, + "startColumn": 21, + "charOffset": 95941, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3286, + "startColumn": 21, + "charOffset": 95894, + "charLength": 1, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_RING: {\n\t\t\tif (slotPosition & SLOTP_RING) {\n\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2e0a097a5357ee7948de93909606f8ffdfc432f7ae1eeb7e180073805738108" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3298, + "startColumn": 9, + "charOffset": 96119, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 3296, + "startColumn": 9, + "charOffset": 96068, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t} else {\n\t\t\t\tif ((slotPosition & SLOTP_AMMO)) {\n\t\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4946efd15b90f513644d25d76a5da3b2dc3e1abb47a3ac41e8ffdc19a159e7a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3298, + "startColumn": 9, + "charOffset": 96119, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 3296, + "startColumn": 9, + "charOffset": 96068, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t} else {\n\t\t\t\tif ((slotPosition & SLOTP_AMMO)) {\n\t\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6ea29ff542517d92293cefe75228b6cb9d5920f3d41aa4cacbdf0a70bed84b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3298, + "startColumn": 10, + "charOffset": 96120, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3296, + "startColumn": 10, + "charOffset": 96068, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t} else {\n\t\t\t\tif ((slotPosition & SLOTP_AMMO)) {\n\t\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9171fd782e9119f327667b80a03108316b567ff31fc17bfd2368bd5bfcb8ebb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3298, + "startColumn": 23, + "charOffset": 96133, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3296, + "startColumn": 23, + "charOffset": 96068, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t} else {\n\t\t\t\tif ((slotPosition & SLOTP_AMMO)) {\n\t\t\t\t\tret = RETURNVALUE_NOERROR;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e09d771b7c57ced6ebb3de7dfb0da895b19dbbe8033412189034634a80efe471" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3306, + "startColumn": 3, + "charOffset": 96239, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 3304, + "startColumn": 3, + "charOffset": 96207, + "charLength": 4, + "snippet": { + "text": "\n\t\tcase CONST_SLOT_WHEREEVER:\n\t\tcase -1:\n\t\t\tret = RETURNVALUE_NOTENOUGHROOM;\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "951ee53e59c4bf9bb9557a477b7572494e5a7c5105629c9d07ae0efeed1ca77a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3327, + "startColumn": 7, + "charOffset": 96806, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3325, + "startColumn": 7, + "charOffset": 96795, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif (!g_moveEvents().onPlayerEquip(getPlayer(), item, static_cast(index), true)) {\n\t\t\treturn RETURNVALUE_CANNOTBEDRESSED;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5f99680c2ca8256eda586f5366d9900bd7f34f54e26540c0ff0f7f38cf8e4f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3327, + "startColumn": 8, + "charOffset": 96807, + "charLength": 12, + "snippet": { + "text": "g_moveEvents" + } + }, + "contextRegion": { + "startLine": 3325, + "startColumn": 8, + "charOffset": 96795, + "charLength": 12, + "snippet": { + "text": "\t\t}\n\n\t\tif (!g_moveEvents().onPlayerEquip(getPlayer(), item, static_cast(index), true)) {\n\t\t\treturn RETURNVALUE_CANNOTBEDRESSED;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c22888d242da09364a1ef5c17f40e696acf08636c419533c942ec235430ee199" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'queryMaxCount' has cognitive complexity of 52 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3335, + "startColumn": 21, + "charOffset": 96976, + "charLength": 13, + "snippet": { + "text": "queryMaxCount" + } + }, + "contextRegion": { + "startLine": 3333, + "startColumn": 21, + "charOffset": 96953, + "charLength": 13, + "snippet": { + "text": "}\n\nReturnValue Player::queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) {\n\tauto item = thing->getItem();\n\tif (item == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb8cafb9c5830900afb5786eab6e260d28ef0ebcd2effe450b5107e2fb2e48d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3345, + "startColumn": 42, + "charOffset": 97397, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 3343, + "startColumn": 42, + "charOffset": 97248, + "charLength": 9, + "snippet": { + "text": "\t\tuint32_t n = 0;\n\t\tfor (int32_t slotIndex = CONST_SLOT_FIRST; slotIndex <= CONST_SLOT_LAST; ++slotIndex) {\n\t\t\tstd::shared_ptr inventoryItem = inventory[slotIndex];\n\t\t\tif (inventoryItem) {\n\t\t\t\tif (std::shared_ptr subContainer = inventoryItem->getContainer()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f05ba6319d6fc942098a83f4a2d2a7859e0e843d1661c20a776b8eadc43814e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3346, + "startColumn": 4, + "charOffset": 97422, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 3344, + "startColumn": 4, + "charOffset": 97266, + "charLength": 2, + "snippet": { + "text": "\t\tfor (int32_t slotIndex = CONST_SLOT_FIRST; slotIndex <= CONST_SLOT_LAST; ++slotIndex) {\n\t\t\tstd::shared_ptr inventoryItem = inventory[slotIndex];\n\t\t\tif (inventoryItem) {\n\t\t\t\tif (std::shared_ptr subContainer = inventoryItem->getContainer()) {\n\t\t\t\t\tuint32_t queryCount = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "635d741d4d0ebfe6d56b2fd1dfbaab24df918580e300ebb44124eff621e6ace2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3347, + "startColumn": 5, + "charOffset": 97447, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 3345, + "startColumn": 5, + "charOffset": 97356, + "charLength": 2, + "snippet": { + "text": "\t\t\tstd::shared_ptr inventoryItem = inventory[slotIndex];\n\t\t\tif (inventoryItem) {\n\t\t\t\tif (std::shared_ptr subContainer = inventoryItem->getContainer()) {\n\t\t\t\t\tuint32_t queryCount = 0;\n\t\t\t\t\tsubContainer->queryMaxCount(INDEX_WHEREEVER, item, item->getItemCount(), queryCount, flags);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "984bf5dccbffcec348925db4c7fb761d1e5f13dded927171aeabeb15907dc69c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3349, + "startColumn": 20, + "charOffset": 97575, + "charLength": 13, + "snippet": { + "text": "queryMaxCount" + } + }, + "contextRegion": { + "startLine": 3347, + "startColumn": 20, + "charOffset": 97443, + "charLength": 13, + "snippet": { + "text": "\t\t\t\tif (std::shared_ptr subContainer = inventoryItem->getContainer()) {\n\t\t\t\t\tuint32_t queryCount = 0;\n\t\t\t\t\tsubContainer->queryMaxCount(INDEX_WHEREEVER, item, item->getItemCount(), queryCount, flags);\n\t\t\t\t\tn += queryCount;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94c6637b8ace401ea45395975503ebb6c6ebb29e103cda6c7491868219c87eb0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3353, + "startColumn": 6, + "charOffset": 97756, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3351, + "startColumn": 6, + "charOffset": 97676, + "charLength": 3, + "snippet": { + "text": "\n\t\t\t\t\t// iterate through all items, including sub-containers (deep search)\n\t\t\t\t\tfor (ContainerIterator it = subContainer->iterator(); it.hasNext(); it.advance()) {\n\t\t\t\t\t\tif (std::shared_ptr tmpContainer = (*it)->getContainer()) {\n\t\t\t\t\t\t\tqueryCount = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa8258fcbf88493edcc4944a7dd87b06fb56a3939ca058dc8c4542b85260ad72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3353, + "startColumn": 6, + "charOffset": 97756, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3351, + "startColumn": 6, + "charOffset": 97676, + "charLength": 3, + "snippet": { + "text": "\n\t\t\t\t\t// iterate through all items, including sub-containers (deep search)\n\t\t\t\t\tfor (ContainerIterator it = subContainer->iterator(); it.hasNext(); it.advance()) {\n\t\t\t\t\t\tif (std::shared_ptr tmpContainer = (*it)->getContainer()) {\n\t\t\t\t\t\t\tqueryCount = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fec27e6e3b3e61100427e5589ecaef5dc9b17f8bbcc20658128b608f42701f2b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3353, + "startColumn": 60, + "charOffset": 97810, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 3351, + "startColumn": 60, + "charOffset": 97676, + "charLength": 2, + "snippet": { + "text": "\n\t\t\t\t\t// iterate through all items, including sub-containers (deep search)\n\t\t\t\t\tfor (ContainerIterator it = subContainer->iterator(); it.hasNext(); it.advance()) {\n\t\t\t\t\t\tif (std::shared_ptr tmpContainer = (*it)->getContainer()) {\n\t\t\t\t\t\t\tqueryCount = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7040e9caea4e404a6d2275781c0d704bc0fa778dbb584130a557880ab7d023e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3356, + "startColumn": 22, + "charOffset": 97961, + "charLength": 13, + "snippet": { + "text": "queryMaxCount" + } + }, + "contextRegion": { + "startLine": 3354, + "startColumn": 22, + "charOffset": 97840, + "charLength": 13, + "snippet": { + "text": "\t\t\t\t\t\tif (std::shared_ptr tmpContainer = (*it)->getContainer()) {\n\t\t\t\t\t\t\tqueryCount = 0;\n\t\t\t\t\t\t\ttmpContainer->queryMaxCount(INDEX_WHEREEVER, item, item->getItemCount(), queryCount, flags);\n\t\t\t\t\t\t\tn += queryCount;\n\t\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cefeab5a06e349b1512709efc838f898d91052c6cb356c3677fc16c7e9ac5b63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3385, + "startColumn": 3, + "charOffset": 98831, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 3383, + "startColumn": 3, + "charOffset": 98824, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (destItem) {\n\t\t\tif (destItem->isStackable() && item->equals(destItem) && destItem->getItemCount() < destItem->getStackSize()) {\n\t\t\t\tmaxQueryCount = destItem->getStackSize() - destItem->getItemCount();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b43795408a68f3a03304f07d7568d1b1acce63bef2af601ee9dcb937f62b21e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3404, + "startColumn": 4, + "charOffset": 99385, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 3402, + "startColumn": 4, + "charOffset": 99316, + "charLength": 4, + "snippet": { + "text": "\tif (maxQueryCount < count) {\n\t\treturn RETURNVALUE_NOTENOUGHROOM;\n\t} else {\n\t\treturn RETURNVALUE_NOERROR;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7bbb0328fb88f58d8a8700931a3b80a68ec18154cf92c7484e287d7f223a686" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3409, + "startColumn": 21, + "charOffset": 99448, + "charLength": 11, + "snippet": { + "text": "queryRemove" + } + }, + "contextRegion": { + "startLine": 3407, + "startColumn": 21, + "charOffset": 99425, + "charLength": 11, + "snippet": { + "text": "}\n\nReturnValue Player::queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr /*= nullptr*/) {\n\tint32_t index = getThingIndex(thing);\n\tif (index == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c4d4d8303565ea8ee8d86169125214b4ce856e94ecdb3dac97fec7cfb3d1da7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'queryRemove' of similar type ('uint32_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3409, + "startColumn": 70, + "charOffset": 99497, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 3407, + "startColumn": 70, + "charOffset": 99425, + "charLength": 8, + "snippet": { + "text": "}\n\nReturnValue Player::queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr /*= nullptr*/) {\n\tint32_t index = getThingIndex(thing);\n\tif (index == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ef3dd880ed3846edb3808dc1704506fdd331ff55702ed4c83ef7f9fc0bc63fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'queryDestination' has cognitive complexity of 95 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3431, + "startColumn": 35, + "charOffset": 100067, + "charLength": 16, + "snippet": { + "text": "queryDestination" + } + }, + "contextRegion": { + "startLine": 3429, + "startColumn": 35, + "charOffset": 100030, + "charLength": 16, + "snippet": { + "text": "}\n\nstd::shared_ptr Player::queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) {\n\tif (index == 0 /*drop to capacity window*/ || index == INDEX_WHEREEVER) {\n\t\t*destItem = nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c01a8ac71b933f99388ffe1ceb975f2648b16d6d5d20bfd3b7d0abf94ac0966" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Expression can be simplified" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3440, + "startColumn": 20, + "charOffset": 100409, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3438, + "startColumn": 20, + "charOffset": 100385, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tbool autoStack = !((flags & FLAG_IGNOREAUTOSTACK) == FLAG_IGNOREAUTOSTACK);\n\t\tbool isStackable = item->isStackable();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c20c6ed3faee4320b67744c9a80d372273c0133237dee0254c69f5e02813eaef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3440, + "startColumn": 29, + "charOffset": 100418, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3438, + "startColumn": 29, + "charOffset": 100385, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tbool autoStack = !((flags & FLAG_IGNOREAUTOSTACK) == FLAG_IGNOREAUTOSTACK);\n\t\tbool isStackable = item->isStackable();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ed90830444607c3a3302e695bf8c722da4f4d6f7759643ad41e77ec55934169" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3445, + "startColumn": 3, + "charOffset": 100568, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3443, + "startColumn": 3, + "charOffset": 100511, + "charLength": 3, + "snippet": { + "text": "\t\tstd::vector> containers;\n\n\t\tfor (uint32_t slotIndex = CONST_SLOT_FIRST; slotIndex <= CONST_SLOT_AMMO; ++slotIndex) {\n\t\t\tstd::shared_ptr inventoryItem = inventory[slotIndex];\n\t\t\tif (inventoryItem) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3073ff4f3535da7f1df89b8b976d241ede026cca176f152cb56ba92c8e726e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3446, + "startColumn": 42, + "charOffset": 100698, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 3444, + "startColumn": 42, + "charOffset": 100565, + "charLength": 9, + "snippet": { + "text": "\n\t\tfor (uint32_t slotIndex = CONST_SLOT_FIRST; slotIndex <= CONST_SLOT_AMMO; ++slotIndex) {\n\t\t\tstd::shared_ptr inventoryItem = inventory[slotIndex];\n\t\t\tif (inventoryItem) {\n\t\t\t\tif (inventoryItem == tradeItem) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "954fc2d5427aad31980e5f317f7185f45ecee156c47524ddd16b5e8e0f3d2a3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3447, + "startColumn": 4, + "charOffset": 100723, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 3445, + "startColumn": 4, + "charOffset": 100566, + "charLength": 2, + "snippet": { + "text": "\t\tfor (uint32_t slotIndex = CONST_SLOT_FIRST; slotIndex <= CONST_SLOT_AMMO; ++slotIndex) {\n\t\t\tstd::shared_ptr inventoryItem = inventory[slotIndex];\n\t\t\tif (inventoryItem) {\n\t\t\t\tif (inventoryItem == tradeItem) {\n\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "beb5ede4bc71318e9bdf5687a06d2d47c4f950b6935970381514649136cdf5e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3456, + "startColumn": 5, + "charOffset": 100863, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 3454, + "startColumn": 5, + "charOffset": 100852, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (autoStack && isStackable) {\n\t\t\t\t\t// try find an already existing item to stack with\n\t\t\t\t\tif (queryAdd(slotIndex, item, item->getItemCount(), 0) == RETURNVALUE_NOERROR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d48afdb696db06ae2a4eda3be1a71aff4acc3a6cdad35590c5d1f48ae4eeabca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3458, + "startColumn": 19, + "charOffset": 100969, + "charLength": 9, + "snippet": { + "text": "slotIndex" + } + }, + "contextRegion": { + "startLine": 3456, + "startColumn": 19, + "charOffset": 100859, + "charLength": 9, + "snippet": { + "text": "\t\t\t\tif (autoStack && isStackable) {\n\t\t\t\t\t// try find an already existing item to stack with\n\t\t\t\t\tif (queryAdd(slotIndex, item, item->getItemCount(), 0) == RETURNVALUE_NOERROR) {\n\t\t\t\t\t\tif (inventoryItem->equals(item) && inventoryItem->getItemCount() < inventoryItem->getStackSize()) {\n\t\t\t\t\t\t\tindex = slotIndex;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "198c55f480d3a7f13e1e3a7c4555cd77495f8172b4abb4335bab62bbcc23a7a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3460, + "startColumn": 16, + "charOffset": 101158, + "charLength": 9, + "snippet": { + "text": "slotIndex" + } + }, + "contextRegion": { + "startLine": 3458, + "startColumn": 16, + "charOffset": 100951, + "charLength": 9, + "snippet": { + "text": "\t\t\t\t\tif (queryAdd(slotIndex, item, item->getItemCount(), 0) == RETURNVALUE_NOERROR) {\n\t\t\t\t\t\tif (inventoryItem->equals(item) && inventoryItem->getItemCount() < inventoryItem->getStackSize()) {\n\t\t\t\t\t\t\tindex = slotIndex;\n\t\t\t\t\t\t\t*destItem = inventoryItem;\n\t\t\t\t\t\t\treturn getPlayer();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ccafb42cc2ec20516ffa82d5775dbe09cd510844119515691ddc305a198dbb2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3472, + "startColumn": 24, + "charOffset": 101539, + "charLength": 9, + "snippet": { + "text": "slotIndex" + } + }, + "contextRegion": { + "startLine": 3470, + "startColumn": 24, + "charOffset": 101469, + "charLength": 9, + "snippet": { + "text": "\t\t\t\t\tcontainers.push_back(subContainer);\n\t\t\t\t}\n\t\t\t} else if (queryAdd(slotIndex, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) { // empty slot\n\t\t\t\tindex = slotIndex;\n\t\t\t\t*destItem = nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27195eeb4331088d74d5c375781db3feae84a6f2c71a8fba98e675f00f6740de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3473, + "startColumn": 13, + "charOffset": 101637, + "charLength": 9, + "snippet": { + "text": "slotIndex" + } + }, + "contextRegion": { + "startLine": 3471, + "startColumn": 13, + "charOffset": 101510, + "charLength": 9, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t} else if (queryAdd(slotIndex, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) { // empty slot\n\t\t\t\tindex = slotIndex;\n\t\t\t\t*destItem = nullptr;\n\t\t\t\treturn getPlayer();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74d4ab591fb6a94232c549acd16795b20264015c0c719c29e4b1bf30a3060717" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3484, + "startColumn": 18, + "charOffset": 101960, + "charLength": 12, + "snippet": { + "text": "tmpContainer" + } + }, + "contextRegion": { + "startLine": 3482, + "startColumn": 18, + "charOffset": 101819, + "charLength": 12, + "snippet": { + "text": "\t\t\tif (!autoStack || !isStackable) {\n\t\t\t\t// we need to find first empty container as fast as we can for non-stackable items\n\t\t\t\tuint32_t n = tmpContainer->capacity() - tmpContainer->size();\n\t\t\t\twhile (n) {\n\t\t\t\t\tif (tmpContainer->queryAdd(tmpContainer->capacity() - n, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8795cabe79689702b01aacf1f9574257bde450769061944560918cad5e0a85e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3485, + "startColumn": 5, + "charOffset": 102013, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 3483, + "startColumn": 5, + "charOffset": 101856, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t// we need to find first empty container as fast as we can for non-stackable items\n\t\t\t\tuint32_t n = tmpContainer->capacity() - tmpContainer->size();\n\t\t\t\twhile (n) {\n\t\t\t\t\tif (tmpContainer->queryAdd(tmpContainer->capacity() - n, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) {\n\t\t\t\t\t\tindex = tmpContainer->capacity() - n;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1c09518a160f78358283d37ea92e89d13c05077d9c4fd33f995671142a7fe12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'n' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3485, + "startColumn": 12, + "charOffset": 102020, + "charLength": 1, + "snippet": { + "text": "n" + } + }, + "contextRegion": { + "startLine": 3483, + "startColumn": 12, + "charOffset": 101856, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t// we need to find first empty container as fast as we can for non-stackable items\n\t\t\t\tuint32_t n = tmpContainer->capacity() - tmpContainer->size();\n\t\t\t\twhile (n) {\n\t\t\t\t\tif (tmpContainer->queryAdd(tmpContainer->capacity() - n, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) {\n\t\t\t\t\t\tindex = tmpContainer->capacity() - n;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba74744cc06cc6c0cc9f7a8ebb27b04bdd71a7389df45717ad0b36e8a3bf2cb0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3485, + "startColumn": 12, + "charOffset": 102020, + "charLength": 1, + "snippet": { + "text": "n" + } + }, + "contextRegion": { + "startLine": 3483, + "startColumn": 12, + "charOffset": 101856, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t// we need to find first empty container as fast as we can for non-stackable items\n\t\t\t\tuint32_t n = tmpContainer->capacity() - tmpContainer->size();\n\t\t\t\twhile (n) {\n\t\t\t\t\tif (tmpContainer->queryAdd(tmpContainer->capacity() - n, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) {\n\t\t\t\t\t\tindex = tmpContainer->capacity() - n;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8094ad6126db242cad4514a38ae5702bf59c81c7d5fea631199bcdc5c9a086df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3485, + "startColumn": 12, + "charOffset": 102020, + "charLength": 1, + "snippet": { + "text": "n" + } + }, + "contextRegion": { + "startLine": 3483, + "startColumn": 12, + "charOffset": 101856, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t// we need to find first empty container as fast as we can for non-stackable items\n\t\t\t\tuint32_t n = tmpContainer->capacity() - tmpContainer->size();\n\t\t\t\twhile (n) {\n\t\t\t\t\tif (tmpContainer->queryAdd(tmpContainer->capacity() - n, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) {\n\t\t\t\t\t\tindex = tmpContainer->capacity() - n;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cdc7d84b23f467b3ac26dbe99d11c57ff96d336480afe4cca49da85722c7b6b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3486, + "startColumn": 33, + "charOffset": 102057, + "charLength": 12, + "snippet": { + "text": "tmpContainer" + } + }, + "contextRegion": { + "startLine": 3484, + "startColumn": 33, + "charOffset": 101943, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tuint32_t n = tmpContainer->capacity() - tmpContainer->size();\n\t\t\t\twhile (n) {\n\t\t\t\t\tif (tmpContainer->queryAdd(tmpContainer->capacity() - n, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) {\n\t\t\t\t\t\tindex = tmpContainer->capacity() - n;\n\t\t\t\t\t\t*destItem = nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ce8b9eafafc19dee662e91966a93bfe40d3668a9e06ce598b74645090efcacc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3487, + "startColumn": 15, + "charOffset": 102162, + "charLength": 12, + "snippet": { + "text": "tmpContainer" + } + }, + "contextRegion": { + "startLine": 3485, + "startColumn": 15, + "charOffset": 102009, + "charLength": 12, + "snippet": { + "text": "\t\t\t\twhile (n) {\n\t\t\t\t\tif (tmpContainer->queryAdd(tmpContainer->capacity() - n, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) {\n\t\t\t\t\t\tindex = tmpContainer->capacity() - n;\n\t\t\t\t\t\t*destItem = nullptr;\n\t\t\t\t\t\treturn tmpContainer;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca6f3f1b4c9d42439fae69e195effa68ce8fdc01cfd8b056650d06c06edde697" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3495, + "startColumn": 5, + "charOffset": 102275, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3493, + "startColumn": 5, + "charOffset": 102264, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tfor (const std::shared_ptr &tmpContainerItem : tmpContainer->getItemList()) {\n\t\t\t\t\tif (std::shared_ptr subContainer = tmpContainerItem->getContainer()) {\n\t\t\t\t\t\tcontainers.push_back(subContainer);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c52df2f2872dd440c621792d45dd054a18d02994d6856af0eb3b34bbb8f5850" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3506, + "startColumn": 4, + "charOffset": 102545, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3504, + "startColumn": 4, + "charOffset": 102522, + "charLength": 3, + "snippet": { + "text": "\t\t\tuint32_t n = 0;\n\n\t\t\tfor (const std::shared_ptr &tmpItem : tmpContainer->getItemList()) {\n\t\t\t\tif (tmpItem == tradeItem) {\n\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "778aa67f1b721cb7c318e56d7c854c1dd93aa6f37a9c4c9a29c99fd5a0484c74" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3517, + "startColumn": 14, + "charOffset": 102877, + "charLength": 1, + "snippet": { + "text": "n" + } + }, + "contextRegion": { + "startLine": 3515, + "startColumn": 14, + "charOffset": 102723, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t// try find an already existing item to stack with\n\t\t\t\tif (tmpItem->equals(item) && tmpItem->getItemCount() < tmpItem->getStackSize()) {\n\t\t\t\t\tindex = n;\n\t\t\t\t\t*destItem = tmpItem;\n\t\t\t\t\treturn tmpContainer;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1239c0f440dd56af90e37a6f3128e83bc242ec537f2f4cf2546450e31d2fbb09" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3529, + "startColumn": 63, + "charOffset": 103141, + "charLength": 1, + "snippet": { + "text": "n" + } + }, + "contextRegion": { + "startLine": 3527, + "startColumn": 63, + "charOffset": 103073, + "charLength": 1, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (n < tmpContainer->capacity() && tmpContainer->queryAdd(n, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) {\n\t\t\t\tindex = n;\n\t\t\t\t*destItem = nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8204975d4ca96c9478bb4a1289657f26cd72d2c1dc7f10868b64fc1c14db3d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3530, + "startColumn": 13, + "charOffset": 103217, + "charLength": 1, + "snippet": { + "text": "n" + } + }, + "contextRegion": { + "startLine": 3528, + "startColumn": 13, + "charOffset": 103078, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tif (n < tmpContainer->capacity() && tmpContainer->queryAdd(n, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) {\n\t\t\t\tindex = n;\n\t\t\t\t*destItem = nullptr;\n\t\t\t\treturn tmpContainer;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b217202c9a03eb8e2fc65b9504b153d2085e886f64e50de08a7147e43fd3233" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3556, + "startColumn": 4, + "charOffset": 103874, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 3554, + "startColumn": 4, + "charOffset": 103826, + "charLength": 4, + "snippet": { + "text": "\t\t*destItem = nullptr;\n\t\treturn subCylinder;\n\t} else {\n\t\treturn getPlayer();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a54266fbb432cc3ab0705f74cb4c793eb0565066d1eec1a810e4b86bf76d4bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3562, + "startColumn": 6, + "charOffset": 103983, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3560, + "startColumn": 6, + "charOffset": 103908, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::addThing(int32_t index, std::shared_ptr thing) {\n\tif (!thing) {\n\t\treturn /*RETURNVALUE_NOTPOSSIBLE*/;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c2270fe262de7b3b3bb6b63f37419639fbfa8506a4e03c901e876779377a662" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3571, + "startColumn": 6, + "charOffset": 104190, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3569, + "startColumn": 6, + "charOffset": 104136, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = thing->getItem();\n\tif (!item) {\n\t\treturn /*RETURNVALUE_NOTPOSSIBLE*/;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70a70e41c623f83a93af9b482183a488ba372e86df25bb541478714097812870" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3576, + "startColumn": 2, + "charOffset": 104288, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 3574, + "startColumn": 2, + "charOffset": 104240, + "charLength": 9, + "snippet": { + "text": "\n\titem->setParent(static_self_cast());\n\tinventory[index] = item;\n\n\t// send to client" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05d3c9e35791d484aaf297945582a2e04ce80a5063921e926a7ac00842108289" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'updateThing' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3582, + "startColumn": 56, + "charOffset": 104446, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 3580, + "startColumn": 56, + "charOffset": 104388, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Player::updateThing(std::shared_ptr thing, uint16_t itemId, uint32_t count) {\n\tint32_t index = getThingIndex(thing);\n\tif (index == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94a7642a0dc306939666d26b693edd5db2f80318f0f5476189aab9e1f6cfdf36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3589, + "startColumn": 6, + "charOffset": 104635, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3587, + "startColumn": 6, + "charOffset": 104581, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = thing->getItem();\n\tif (!item) {\n\t\treturn /*RETURNVALUE_NOTPOSSIBLE*/;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df1b531e39ae4431cee438ee135b62b254df43278c6f5d83a21693d21ac7b7e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3594, + "startColumn": 19, + "charOffset": 104726, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 3592, + "startColumn": 19, + "charOffset": 104685, + "charLength": 5, + "snippet": { + "text": "\n\titem->setID(itemId);\n\titem->setSubType(count);\n\n\t// send to client" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "006e3ec41e2325d34490a5a3f5baa8e423593a447de3388f1fe97dd91cf59201" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3609, + "startColumn": 6, + "charOffset": 105100, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3607, + "startColumn": 6, + "charOffset": 105014, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr oldItem = getInventoryItem(static_cast(index));\n\tif (!oldItem) {\n\t\treturn /*RETURNVALUE_NOTPOSSIBLE*/;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8038362b213da413207afdf8f0d74f99815c08c1424015965862aa7351c24767" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3614, + "startColumn": 6, + "charOffset": 105207, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3612, + "startColumn": 6, + "charOffset": 105153, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = thing->getItem();\n\tif (!item) {\n\t\treturn /*RETURNVALUE_NOTPOSSIBLE*/;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67901b28ac9cdc3b83f876acb038eccfa39ca17b21bdca8aa7c9e503780e2fdd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3626, + "startColumn": 2, + "charOffset": 105439, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 3624, + "startColumn": 2, + "charOffset": 105391, + "charLength": 9, + "snippet": { + "text": "\titem->setParent(static_self_cast());\n\n\tinventory[index] = item;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a8514914b03783088cce6059b3979e588ac9456881d66eb3497367a3cb2384f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3631, + "startColumn": 6, + "charOffset": 105593, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3629, + "startColumn": 6, + "charOffset": 105467, + "charLength": 1, + "snippet": { + "text": "void Player::removeThing(std::shared_ptr thing, uint32_t count) {\n\tstd::shared_ptr item = thing->getItem();\n\tif (!item) {\n\t\treturn /*RETURNVALUE_NOTPOSSIBLE*/;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7e354537a3b91c8c0b0a0f856d0c7775516b597fd34c1d6e9b2ec85f87a5116" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3649, + "startColumn": 4, + "charOffset": 105981, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 3647, + "startColumn": 4, + "charOffset": 105953, + "charLength": 9, + "snippet": { + "text": "\n\t\t\titem->resetParent();\n\t\t\tinventory[index] = nullptr;\n\t\t} else {\n\t\t\tuint8_t newCount = static_cast(std::max(0, item->getItemCount() - count));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14bcb88cdadd07b36d4b61da8bf10a012e8bae50384d32767ec32bcffcb9dfc5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3651, + "startColumn": 65, + "charOffset": 106084, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 3649, + "startColumn": 65, + "charOffset": 105978, + "charLength": 4, + "snippet": { + "text": "\t\t\tinventory[index] = nullptr;\n\t\t} else {\n\t\t\tuint8_t newCount = static_cast(std::max(0, item->getItemCount() - count));\n\t\t\titem->setItemCount(newCount);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ca5ab21691c96f3cf3ac7415dcc5533f548cea4b8936b1f7b70acb0e2ebb862" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3668, + "startColumn": 3, + "charOffset": 106471, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 3666, + "startColumn": 3, + "charOffset": 106445, + "charLength": 9, + "snippet": { + "text": "\n\t\titem->resetParent();\n\t\tinventory[index] = nullptr;\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2bd3725d105ebe4f88ff1ec19fa86b8a59776e9b3f0a6b580803ca82a9a7e330" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3673, + "startColumn": 2, + "charOffset": 106574, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3671, + "startColumn": 2, + "charOffset": 106504, + "charLength": 3, + "snippet": { + "text": "\nint32_t Player::getThingIndex(std::shared_ptr thing) const {\n\tfor (uint8_t i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; ++i) {\n\t\tif (inventory[i] == thing) {\n\t\t\treturn i;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5faf88b4599f33646e615a5264dd36af18ed82fe53578e8e9e78901c9f093dbb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3674, + "startColumn": 7, + "charOffset": 106644, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 3672, + "startColumn": 7, + "charOffset": 106505, + "charLength": 9, + "snippet": { + "text": "int32_t Player::getThingIndex(std::shared_ptr thing) const {\n\tfor (uint8_t i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; ++i) {\n\t\tif (inventory[i] == thing) {\n\t\t\treturn i;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a36cc8fe22ff55596b19094d333d6be69753300fbda24c4ff115589232a0d64b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3686, + "startColumn": 25, + "charOffset": 106834, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 3684, + "startColumn": 25, + "charOffset": 106771, + "charLength": 1, + "snippet": { + "text": "\nsize_t Player::getLastIndex() const {\n\treturn CONST_SLOT_LAST + 1;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb8c435094b8ef1bf19c1d78f9719dab8fb02a415450b55082a8f3fe75cded96" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3689, + "startColumn": 18, + "charOffset": 106859, + "charLength": 16, + "snippet": { + "text": "getItemTypeCount" + } + }, + "contextRegion": { + "startLine": 3687, + "startColumn": 18, + "charOffset": 106839, + "charLength": 16, + "snippet": { + "text": "}\n\nuint32_t Player::getItemTypeCount(uint16_t itemId, int32_t subType /*= -1*/) const {\n\tuint32_t count = 0;\n\tfor (int32_t i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; i++) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0bff571f8bacee0d9e6bf8929b8c7d850a78804eaedb18848cea944d026471af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'getItemTypeCount' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3689, + "startColumn": 35, + "charOffset": 106876, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 3687, + "startColumn": 35, + "charOffset": 106839, + "charLength": 8, + "snippet": { + "text": "}\n\nuint32_t Player::getItemTypeCount(uint16_t itemId, int32_t subType /*= -1*/) const {\n\tuint32_t count = 0;\n\tfor (int32_t i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; i++) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a8f89ffb5abbb23f129d2a7d7b3619819d8a7f9b306369111923a27e1a0a243" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3692, + "startColumn": 32, + "charOffset": 107044, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 3690, + "startColumn": 32, + "charOffset": 106927, + "charLength": 9, + "snippet": { + "text": "\tuint32_t count = 0;\n\tfor (int32_t i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; i++) {\n\t\tstd::shared_ptr item = inventory[i];\n\t\tif (!item) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0fba3c7e1d10c1247e3acf0116c8124f7e5821cc651ac0bc2377f343cf696e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3693, + "startColumn": 7, + "charOffset": 107064, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3691, + "startColumn": 7, + "charOffset": 106948, + "charLength": 1, + "snippet": { + "text": "\tfor (int32_t i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; i++) {\n\t\tstd::shared_ptr item = inventory[i];\n\t\tif (!item) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cee2d15234bd33c66ee18382a05a5559e31311b95aa68ccf12c0c1fb16bff6df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3702, + "startColumn": 4, + "charOffset": 107247, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3700, + "startColumn": 4, + "charOffset": 107174, + "charLength": 3, + "snippet": { + "text": "\n\t\tif (std::shared_ptr container = item->getContainer()) {\n\t\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\t\tif ((*it)->getID() == itemId) {\n\t\t\t\t\tcount += Item::countByType(*it, subType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eca0b90e34d959f81ae036d6e92f66e3d2cc4840eba3be170927670e9bddf351" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3702, + "startColumn": 4, + "charOffset": 107247, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3700, + "startColumn": 4, + "charOffset": 107174, + "charLength": 3, + "snippet": { + "text": "\n\t\tif (std::shared_ptr container = item->getContainer()) {\n\t\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\t\tif ((*it)->getID() == itemId) {\n\t\t\t\t\tcount += Item::countByType(*it, subType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "318abe1a940345ea394ac9f349ef4456cbd787aec9535e8941c3d18e9976dd82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3702, + "startColumn": 55, + "charOffset": 107298, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 3700, + "startColumn": 55, + "charOffset": 107174, + "charLength": 2, + "snippet": { + "text": "\n\t\tif (std::shared_ptr container = item->getContainer()) {\n\t\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\t\tif ((*it)->getID() == itemId) {\n\t\t\t\t\tcount += Item::countByType(*it, subType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d70b3ab781a3b3dec7276409f4df593b7f28ed285aea2a668e99665c828c9d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'itemDict' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3712, + "startColumn": 48, + "charOffset": 107494, + "charLength": 8, + "snippet": { + "text": "itemDict" + } + }, + "contextRegion": { + "startLine": 3710, + "startColumn": 48, + "charOffset": 107444, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Player::stashContainer(StashContainerList itemDict) {\n\tStashItemList stashItemDict; // ItemID - Count\n\tfor (const auto &it_dict : itemDict) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d656645aa84405d6012361eb30e420ca365b3d06eda35aebb56a01f991ba2ea7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3714, + "startColumn": 2, + "charOffset": 107555, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3712, + "startColumn": 2, + "charOffset": 107447, + "charLength": 3, + "snippet": { + "text": "void Player::stashContainer(StashContainerList itemDict) {\n\tStashItemList stashItemDict; // ItemID - Count\n\tfor (const auto &it_dict : itemDict) {\n\t\tstashItemDict[(it_dict.first)->getID()] = it_dict.second;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0d79fc258adb6e83884df63cf809ce8b3e5a222850bf6ead2556c5ba90ff644" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3718, + "startColumn": 2, + "charOffset": 107659, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3716, + "startColumn": 2, + "charOffset": 107654, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (auto it : stashItems) {\n\t\tif (!stashItemDict[it.first]) {\n\t\t\tstashItemDict[it.first] = it.second;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a03ccaee99da4e31db2c63f8e784647085d3f5768a17edd747bb7953cdaa30f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3719, + "startColumn": 7, + "charOffset": 107694, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3717, + "startColumn": 7, + "charOffset": 107657, + "charLength": 1, + "snippet": { + "text": "\n\tfor (auto it : stashItems) {\n\t\tif (!stashItemDict[it.first]) {\n\t\t\tstashItemDict[it.first] = it.second;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "abe267184198005e6450a6769f2304a09809b4abf5f6f078c39c18a6347f1f98" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'mapped_type' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3719, + "startColumn": 8, + "charOffset": 107695, + "charLength": 13, + "snippet": { + "text": "stashItemDict" + } + }, + "contextRegion": { + "startLine": 3717, + "startColumn": 8, + "charOffset": 107657, + "charLength": 13, + "snippet": { + "text": "\n\tfor (auto it : stashItems) {\n\t\tif (!stashItemDict[it.first]) {\n\t\t\tstashItemDict[it.first] = it.second;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e606eee3bb6a6a89d23dba193ae239eb63fa2c01f93816b5fe806941c840c9df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3734, + "startColumn": 2, + "charOffset": 108120, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3732, + "startColumn": 2, + "charOffset": 108048, + "charLength": 3, + "snippet": { + "text": "\tstd::ostringstream retString;\n\tuint16_t refreshDepotSearchOnItem = 0;\n\tfor (const auto &stashIterator : itemDict) {\n\t\tuint16_t iteratorCID = (stashIterator.first)->getID();\n\t\tif (g_game().internalRemoveItem(stashIterator.first, stashIterator.second) == RETURNVALUE_NOERROR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69e8e6044ef539061207251544e5fc02f8caae6686182f92d5479dd7db98be41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3736, + "startColumn": 56, + "charOffset": 108277, + "charLength": 13, + "snippet": { + "text": "stashIterator" + } + }, + "contextRegion": { + "startLine": 3734, + "startColumn": 56, + "charOffset": 108119, + "charLength": 13, + "snippet": { + "text": "\tfor (const auto &stashIterator : itemDict) {\n\t\tuint16_t iteratorCID = (stashIterator.first)->getID();\n\t\tif (g_game().internalRemoveItem(stashIterator.first, stashIterator.second) == RETURNVALUE_NOERROR) {\n\t\t\taddItemOnStash(iteratorCID, stashIterator.second);\n\t\t\ttotalStowed += stashIterator.second;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "234a5dc845ad548eb0a62533b44b9d2667fa49550db54a82fc7e8fff4d926c46" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'removeItemOfType' has cognitive complexity of 31 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3763, + "startColumn": 14, + "charOffset": 109024, + "charLength": 16, + "snippet": { + "text": "removeItemOfType" + } + }, + "contextRegion": { + "startLine": 3761, + "startColumn": 14, + "charOffset": 109008, + "charLength": 16, + "snippet": { + "text": "}\n\nbool Player::removeItemOfType(uint16_t itemId, uint32_t amount, int32_t subType, bool ignoreEquipped /* = false*/) {\n\tif (amount == 0) {\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74a831ade9128eae865eb9ee868faf500e6279455a7be3976da72463dcc6b8b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'removeItemOfType' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3763, + "startColumn": 48, + "charOffset": 109058, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 3761, + "startColumn": 48, + "charOffset": 109008, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Player::removeItemOfType(uint16_t itemId, uint32_t amount, int32_t subType, bool ignoreEquipped /* = false*/) {\n\tif (amount == 0) {\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "205bf9eae6cb2de3fb0cf13b5498a692cdeafff1fd1dddc68e79b69b42a238b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3772, + "startColumn": 32, + "charOffset": 109331, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 3770, + "startColumn": 32, + "charOffset": 109214, + "charLength": 9, + "snippet": { + "text": "\tuint32_t count = 0;\n\tfor (int32_t i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; i++) {\n\t\tstd::shared_ptr item = inventory[i];\n\t\tif (!item) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ffa9abe8c59af15ca5dc7ddbb728fd3f3cee2de3e0c3cc987a55fc6e34d0aead" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3773, + "startColumn": 7, + "charOffset": 109351, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3771, + "startColumn": 7, + "charOffset": 109235, + "charLength": 1, + "snippet": { + "text": "\tfor (int32_t i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; i++) {\n\t\tstd::shared_ptr item = inventory[i];\n\t\tif (!item) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e655edeef3f3f0c283cee9beceb4da7aeee28dc3098ae353957c69d72aa32f38" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3777, + "startColumn": 3, + "charOffset": 109380, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 3775, + "startColumn": 3, + "charOffset": 109373, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (!ignoreEquipped && item->getID() == itemId) {\n\t\t\tuint32_t itemCount = Item::countByType(item, subType);\n\t\t\tif (itemCount == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "068359ee4c9c39bab05c4ee94ea9629b32405e3750aa795ebf2fc869a71bd788" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-move-const-arg", + "ruleIndex": 559, + "kind": "fail", + "level": "warning", + "message": { + "text": "passing result of std::move() as a const reference argument; no move will actually happen" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3787, + "startColumn": 34, + "charOffset": 109645, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 3785, + "startColumn": 34, + "charOffset": 109563, + "charLength": 3, + "snippet": { + "text": "\t\t\tcount += itemCount;\n\t\t\tif (count >= amount) {\n\t\t\t\tg_game().internalRemoveItems(std::move(itemList), amount, Item::items[itemId].stackable);\n\t\t\t\treturn true;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "951459b913b103dcf8bb0abde7f3a7dda6b141991beec14a5f0b6462fa5f099b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3791, + "startColumn": 4, + "charOffset": 109807, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3789, + "startColumn": 4, + "charOffset": 109723, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\t\t} else if (std::shared_ptr container = item->getContainer()) {\n\t\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\t\tstd::shared_ptr containerItem = *it;\n\t\t\t\tif (containerItem->getID() == itemId) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eca0b90e34d959f81ae036d6e92f66e3d2cc4840eba3be170927670e9bddf351" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3791, + "startColumn": 4, + "charOffset": 109807, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3789, + "startColumn": 4, + "charOffset": 109723, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\t\t} else if (std::shared_ptr container = item->getContainer()) {\n\t\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\t\tstd::shared_ptr containerItem = *it;\n\t\t\t\tif (containerItem->getID() == itemId) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "318abe1a940345ea394ac9f349ef4456cbd787aec9535e8941c3d18e9976dd82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3791, + "startColumn": 55, + "charOffset": 109858, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 3789, + "startColumn": 55, + "charOffset": 109723, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\t\t} else if (std::shared_ptr container = item->getContainer()) {\n\t\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\t\tstd::shared_ptr containerItem = *it;\n\t\t\t\tif (containerItem->getID() == itemId) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d70b3ab781a3b3dec7276409f4df593b7f28ed285aea2a668e99665c828c9d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-move-const-arg", + "ruleIndex": 559, + "kind": "fail", + "level": "warning", + "message": { + "text": "passing result of std::move() as a const reference argument; no move will actually happen" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3806, + "startColumn": 36, + "charOffset": 110419, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 3804, + "startColumn": 36, + "charOffset": 110304, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\t// It will remove items and stop the iteration\n\t\t\t\t\tif (count >= amount) {\n\t\t\t\t\t\tg_game().internalRemoveItems(std::move(itemList), amount, stackable);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9537866507b1f60ee56f2ea7b8c8668fcac0f508f79fff0eadbfb5135d194f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'hasItemCountById' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3817, + "startColumn": 31, + "charOffset": 110553, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 3815, + "startColumn": 31, + "charOffset": 110520, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Player::hasItemCountById(uint16_t itemId, uint32_t itemAmount, bool checkStash) const {\n\tuint32_t newCount = 0;\n\t// Check items from inventory" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2871a84115980b2e8c42562718b5c7788adec9c550206d60260a042c941d0c51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3820, + "startColumn": 2, + "charOffset": 110672, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3818, + "startColumn": 2, + "charOffset": 110616, + "charLength": 3, + "snippet": { + "text": "\tuint32_t newCount = 0;\n\t// Check items from inventory\n\tfor (const auto &item : getAllInventoryItems()) {\n\t\tif (!item || item->getID() != itemId) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0113aee585df52ff70af7a83e4c10f159ac7f700091d996d1c7aa6cc9d77ffff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3821, + "startColumn": 7, + "charOffset": 110728, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3819, + "startColumn": 7, + "charOffset": 110640, + "charLength": 1, + "snippet": { + "text": "\t// Check items from inventory\n\tfor (const auto &item : getAllInventoryItems()) {\n\t\tif (!item || item->getID() != itemId) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63bf0b601211341407bc9d83672ad9d60c7bce1760bf5914fceed2fb26b30d82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3829, + "startColumn": 2, + "charOffset": 110850, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3827, + "startColumn": 2, + "charOffset": 110821, + "charLength": 3, + "snippet": { + "text": "\n\t// Check items from stash\n\tfor (StashItemList stashToSend = getStashItems();\n\t auto [stashItemId, itemCount] : stashToSend) {\n\t\tif (!checkStash) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9db7600134122273494c963033e70f58abd46e30a03fbba4dafb2471a7e2f1e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3851, + "startColumn": 2, + "charOffset": 111459, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3849, + "startColumn": 2, + "charOffset": 111388, + "charLength": 3, + "snippet": { + "text": "\tuint32_t amountToRemove = itemAmount;\n\t// Check items from inventory\n\tfor (const auto &item : getAllInventoryItems()) {\n\t\tif (!item || item->getID() != itemId) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69a4fbe8109f6959ab3bd80cb734983b657af543c1baeb08f103c9a53fd5d7ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3852, + "startColumn": 7, + "charOffset": 111515, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3850, + "startColumn": 7, + "charOffset": 111427, + "charLength": 1, + "snippet": { + "text": "\t// Check items from inventory\n\tfor (const auto &item : getAllInventoryItems()) {\n\t\tif (!item || item->getID() != itemId) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68a62099aadc1f165522f4d3fe8433032dd6566c5eb732a7c47c89d60cc78870" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3858, + "startColumn": 13, + "charOffset": 111713, + "charLength": 18, + "snippet": { + "text": "internalRemoveItem" + } + }, + "contextRegion": { + "startLine": 3856, + "startColumn": 13, + "charOffset": 111569, + "charLength": 18, + "snippet": { + "text": "\t\t// If the item quantity is already needed, remove the quantity and stop the loop\n\t\tif (item->getItemAmount() >= amountToRemove) {\n\t\t\tg_game().internalRemoveItem(item, amountToRemove);\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89d0d0b110bc070605460578215487e4d5eae3eba093614f7b866ca15365b005" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3858, + "startColumn": 38, + "charOffset": 111738, + "charLength": 14, + "snippet": { + "text": "amountToRemove" + } + }, + "contextRegion": { + "startLine": 3856, + "startColumn": 38, + "charOffset": 111569, + "charLength": 14, + "snippet": { + "text": "\t\t// If the item quantity is already needed, remove the quantity and stop the loop\n\t\tif (item->getItemAmount() >= amountToRemove) {\n\t\t\tg_game().internalRemoveItem(item, amountToRemove);\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d06b9ff32f4374562cacec22387ed9129a102ce689f30198d8203b3d839d8284" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3863, + "startColumn": 12, + "charOffset": 111855, + "charLength": 18, + "snippet": { + "text": "internalRemoveItem" + } + }, + "contextRegion": { + "startLine": 3861, + "startColumn": 12, + "charOffset": 111775, + "charLength": 18, + "snippet": { + "text": "\n\t\t// If not, we continue removing items and checking the next slot.\n\t\tg_game().internalRemoveItem(item);\n\t\tamountToRemove -= item->getItemAmount();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f3f5ac98e1d19dea4cdcb35694c22eb7b76f477a5d4c78706f5e9a32a248386" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in conditional return statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3869, + "startColumn": 10, + "charOffset": 112115, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 3867, + "startColumn": 10, + "charOffset": 111928, + "charLength": 4, + "snippet": { + "text": "\t// If there are not enough items in the inventory, we will remove the remaining from stash\n\tif (removeFromStash && amountToRemove > 0 && withdrawItem(itemId, amountToRemove)) {\n\t\treturn true;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eee9bb52569106ccbc7150b4e8b30d67935b6a48a819ed0a2a2626c4f637132e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3878, + "startColumn": 32, + "charOffset": 112358, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 3876, + "startColumn": 32, + "charOffset": 112233, + "charLength": 9, + "snippet": { + "text": "\tItemsTierCountList itemMap;\n\tfor (int32_t i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; i++) {\n\t\tstd::shared_ptr item = inventory[i];\n\t\tif (!item) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac3c6d542edaffe77ca9d0dd2286dba8645167fd210988a78d972beec1bf6d52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3879, + "startColumn": 7, + "charOffset": 112378, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3877, + "startColumn": 7, + "charOffset": 112262, + "charLength": 1, + "snippet": { + "text": "\tfor (int32_t i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; i++) {\n\t\tstd::shared_ptr item = inventory[i];\n\t\tif (!item) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c01925e6d8de8b18404c942e433e089cdbb6e992c65d2407f616aec132698a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3891, + "startColumn": 4, + "charOffset": 112684, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3889, + "startColumn": 4, + "charOffset": 112574, + "charLength": 3, + "snippet": { + "text": "\t\tconst auto &container = item->getContainer();\n\t\tif (container && (!isStoreInbox || !ignoreStoreInbox)) {\n\t\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\t\tauto containerItem = *it;\n\t\t\t\t(itemMap[containerItem->getID()])[containerItem->getTier()] += Item::countByType(containerItem, -1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cff961c739e1e6b5db2c00d6f3c74b6af5bc68d162313f0e2ac3f70ec7d8f242" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3891, + "startColumn": 4, + "charOffset": 112684, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3889, + "startColumn": 4, + "charOffset": 112574, + "charLength": 3, + "snippet": { + "text": "\t\tconst auto &container = item->getContainer();\n\t\tif (container && (!isStoreInbox || !ignoreStoreInbox)) {\n\t\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\t\tauto containerItem = *it;\n\t\t\t\t(itemMap[containerItem->getID()])[containerItem->getTier()] += Item::countByType(containerItem, -1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "566ffc7aea74bd532731efbaee4967b5acddf2e612285cb17983931e889a23cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3891, + "startColumn": 55, + "charOffset": 112735, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 3889, + "startColumn": 55, + "charOffset": 112574, + "charLength": 2, + "snippet": { + "text": "\t\tconst auto &container = item->getContainer();\n\t\tif (container && (!isStoreInbox || !ignoreStoreInbox)) {\n\t\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\t\tauto containerItem = *it;\n\t\t\t\t(itemMap[containerItem->getID()])[containerItem->getTier()] += Item::countByType(containerItem, -1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f90871752e14a1c98938d410aaa311f844dbffaed814ff038129188d1516b4e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3903, + "startColumn": 32, + "charOffset": 113188, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 3901, + "startColumn": 32, + "charOffset": 113048, + "charLength": 9, + "snippet": { + "text": "\tstd::vector> itemVector;\n\tfor (int i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; ++i) {\n\t\tstd::shared_ptr item = inventory[i];\n\t\tif (!item) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0fba3c7e1d10c1247e3acf0116c8124f7e5821cc651ac0bc2377f343cf696e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3904, + "startColumn": 7, + "charOffset": 113208, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3902, + "startColumn": 7, + "charOffset": 113096, + "charLength": 1, + "snippet": { + "text": "\tfor (int i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; ++i) {\n\t\tstd::shared_ptr item = inventory[i];\n\t\tif (!item) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cee2d15234bd33c66ee18382a05a5559e31311b95aa68ccf12c0c1fb16bff6df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3913, + "startColumn": 4, + "charOffset": 113387, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3911, + "startColumn": 4, + "charOffset": 113314, + "charLength": 3, + "snippet": { + "text": "\n\t\tif (std::shared_ptr container = item->getContainer()) {\n\t\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\t\tauto containerItem = *it;\n\t\t\t\tif (containerItem->getID() == itemId) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "282ed124ede4f94f5e8229a98ab3dedd1fe7447acdee636376c1acdb3d19b7f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3913, + "startColumn": 4, + "charOffset": 113387, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3911, + "startColumn": 4, + "charOffset": 113314, + "charLength": 3, + "snippet": { + "text": "\n\t\tif (std::shared_ptr container = item->getContainer()) {\n\t\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\t\tauto containerItem = *it;\n\t\t\t\tif (containerItem->getID() == itemId) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4e0cb8280124561b1d9021e73bff4a4fe039064a7593558a63b0e214bc5c679" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3913, + "startColumn": 55, + "charOffset": 113438, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 3911, + "startColumn": 55, + "charOffset": 113314, + "charLength": 2, + "snippet": { + "text": "\n\t\tif (std::shared_ptr container = item->getContainer()) {\n\t\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\t\tauto containerItem = *it;\n\t\t\t\tif (containerItem->getID() == itemId) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "473da910d6e4d806e2073c17eb2b9f4b1f0e68316b22e17bf8f654c31356b2d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-member-init", + "ruleIndex": 510, + "kind": "fail", + "level": "warning", + "message": { + "text": "uninitialized record type: 'combatReductionArray'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3926, + "startColumn": 2, + "charOffset": 113704, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 3924, + "startColumn": 2, + "charOffset": 113625, + "charLength": 3, + "snippet": { + "text": "\nstd::array Player::getFinalDamageReduction() const {\n\tstd::array combatReductionArray;\n\tcombatReductionArray.fill(0);\n\tcalculateDamageReductionFromEquipedItems(combatReductionArray);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c5924a935d5667a63b6ddc74d453e8645df736f150ecbd9986dbdbf93e9311b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3927, + "startColumn": 28, + "charOffset": 113788, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 3925, + "startColumn": 28, + "charOffset": 113626, + "charLength": 1, + "snippet": { + "text": "std::array Player::getFinalDamageReduction() const {\n\tstd::array combatReductionArray;\n\tcombatReductionArray.fill(0);\n\tcalculateDamageReductionFromEquipedItems(combatReductionArray);\n\tfor (int combatTypeIndex = 0; combatTypeIndex < COMBAT_COUNT; combatTypeIndex++) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3c044b166707ffe9e5ba14b2d69e5a69e38a7f1ecb7b3097ec7a424d2d6a466" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3929, + "startColumn": 2, + "charOffset": 113858, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3927, + "startColumn": 2, + "charOffset": 113761, + "charLength": 3, + "snippet": { + "text": "\tcombatReductionArray.fill(0);\n\tcalculateDamageReductionFromEquipedItems(combatReductionArray);\n\tfor (int combatTypeIndex = 0; combatTypeIndex < COMBAT_COUNT; combatTypeIndex++) {\n\t\tcombatReductionArray[combatTypeIndex] = std::clamp(\n\t\t\tstd::floor(combatReductionArray[combatTypeIndex])," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "faa9f0e4d239fb62f9d90161601ee1bce440081b189675e00d1136c33116d554" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3930, + "startColumn": 3, + "charOffset": 113943, + "charLength": 20, + "snippet": { + "text": "combatReductionArray" + } + }, + "contextRegion": { + "startLine": 3928, + "startColumn": 3, + "charOffset": 113792, + "charLength": 20, + "snippet": { + "text": "\tcalculateDamageReductionFromEquipedItems(combatReductionArray);\n\tfor (int combatTypeIndex = 0; combatTypeIndex < COMBAT_COUNT; combatTypeIndex++) {\n\t\tcombatReductionArray[combatTypeIndex] = std::clamp(\n\t\t\tstd::floor(combatReductionArray[combatTypeIndex]),\n\t\t\t-100.," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4992aea2f05ab3c24d3804e7beb5c3ee3bdfa4752754f67ac8ca7ea0f648e580" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3931, + "startColumn": 15, + "charOffset": 114019, + "charLength": 20, + "snippet": { + "text": "combatReductionArray" + } + }, + "contextRegion": { + "startLine": 3929, + "startColumn": 15, + "charOffset": 113857, + "charLength": 20, + "snippet": { + "text": "\tfor (int combatTypeIndex = 0; combatTypeIndex < COMBAT_COUNT; combatTypeIndex++) {\n\t\tcombatReductionArray[combatTypeIndex] = std::clamp(\n\t\t\tstd::floor(combatReductionArray[combatTypeIndex]),\n\t\t\t-100.,\n\t\t\t100." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "572f3b2dc1456d4043829505b332aa8164b981ead3f688ee02b36a0770f0becd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3940, + "startColumn": 2, + "charOffset": 114239, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3938, + "startColumn": 2, + "charOffset": 114117, + "charLength": 3, + "snippet": { + "text": "\nvoid Player::calculateDamageReductionFromEquipedItems(std::array &combatReductionArray) const {\n\tfor (uint8_t slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; ++slot) {\n\t\tstd::shared_ptr item = inventory[slot];\n\t\tif (item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8d80092c2a344c1b48f0fee895d9dd0fb3c1a82cc51a14b711a3769043d8bee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3941, + "startColumn": 32, + "charOffset": 114343, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 3939, + "startColumn": 32, + "charOffset": 114118, + "charLength": 9, + "snippet": { + "text": "void Player::calculateDamageReductionFromEquipedItems(std::array &combatReductionArray) const {\n\tfor (uint8_t slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; ++slot) {\n\t\tstd::shared_ptr item = inventory[slot];\n\t\tif (item) {\n\t\t\tcalculateDamageReductionFromItem(combatReductionArray, item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c095127c428788b6b92788ef71d9f80676f3d04ab51d2031cadbda33c2c6dd6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3948, + "startColumn": 127, + "charOffset": 114575, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 3946, + "startColumn": 127, + "charOffset": 114446, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Player::calculateDamageReductionFromItem(std::array &combatReductionArray, std::shared_ptr item) const {\n\tfor (uint16_t combatTypeIndex = 0; combatTypeIndex < COMBAT_COUNT; combatTypeIndex++) {\n\t\tupdateDamageReductionFromItemImbuement(combatReductionArray, item, combatTypeIndex);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "157455deb74c6520bf352a69c0795904267e1dbc4e68786ae1601c21cf5f5804" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3949, + "startColumn": 2, + "charOffset": 114590, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3947, + "startColumn": 2, + "charOffset": 114448, + "charLength": 3, + "snippet": { + "text": "\nvoid Player::calculateDamageReductionFromItem(std::array &combatReductionArray, std::shared_ptr item) const {\n\tfor (uint16_t combatTypeIndex = 0; combatTypeIndex < COMBAT_COUNT; combatTypeIndex++) {\n\t\tupdateDamageReductionFromItemImbuement(combatReductionArray, item, combatTypeIndex);\n\t\tupdateDamageReductionFromItemAbility(combatReductionArray, item, combatTypeIndex);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5866a76b60e6862f4c1d6320751001a7ef1c23e334882e2f29e3676aa898ee1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3956, + "startColumn": 82, + "charOffset": 114990, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 3954, + "startColumn": 82, + "charOffset": 114855, + "charLength": 4, + "snippet": { + "text": "\nvoid Player::updateDamageReductionFromItemImbuement(\n\tstd::array &combatReductionArray, std::shared_ptr item, uint16_t combatTypeIndex\n) const {\n\tfor (uint8_t imbueSlotId = 0; imbueSlotId < item->getImbuementSlot(); imbueSlotId++) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f82a53962fdc7f98470381562658a726f98f45b3c459959c12a357b2ca51226" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3958, + "startColumn": 2, + "charOffset": 115032, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3956, + "startColumn": 2, + "charOffset": 114909, + "charLength": 3, + "snippet": { + "text": "\tstd::array &combatReductionArray, std::shared_ptr item, uint16_t combatTypeIndex\n) const {\n\tfor (uint8_t imbueSlotId = 0; imbueSlotId < item->getImbuementSlot(); imbueSlotId++) {\n\t\tImbuementInfo imbuementInfo;\n\t\tif (item->getImbuementInfo(imbueSlotId, &imbuementInfo) && imbuementInfo.imbuement) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69e8e6044ef539061207251544e5fc02f8caae6686182f92d5479dd7db98be41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3960, + "startColumn": 7, + "charOffset": 115156, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 3958, + "startColumn": 7, + "charOffset": 115031, + "charLength": 4, + "snippet": { + "text": "\tfor (uint8_t imbueSlotId = 0; imbueSlotId < item->getImbuementSlot(); imbueSlotId++) {\n\t\tImbuementInfo imbuementInfo;\n\t\tif (item->getImbuementInfo(imbueSlotId, &imbuementInfo) && imbuementInfo.imbuement) {\n\t\t\tint16_t imbuementAbsorption = imbuementInfo.imbuement->absorbPercent[combatTypeIndex];\n\t\t\tif (imbuementAbsorption != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ceb29515705b46fbaf936bf721808964ef117c55c5c841a7f4b9fd2257a99195" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3960, + "startColumn": 59, + "charOffset": 115208, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 3958, + "startColumn": 59, + "charOffset": 115031, + "charLength": 2, + "snippet": { + "text": "\tfor (uint8_t imbueSlotId = 0; imbueSlotId < item->getImbuementSlot(); imbueSlotId++) {\n\t\tImbuementInfo imbuementInfo;\n\t\tif (item->getImbuementInfo(imbueSlotId, &imbuementInfo) && imbuementInfo.imbuement) {\n\t\t\tint16_t imbuementAbsorption = imbuementInfo.imbuement->absorbPercent[combatTypeIndex];\n\t\t\tif (imbuementAbsorption != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2d986f323e593d9f7a17be3a769cc469a131dae74c36266c9821737d993c478" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'Imbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3960, + "startColumn": 62, + "charOffset": 115211, + "charLength": 13, + "snippet": { + "text": "imbuementInfo" + } + }, + "contextRegion": { + "startLine": 3958, + "startColumn": 62, + "charOffset": 115031, + "charLength": 13, + "snippet": { + "text": "\tfor (uint8_t imbueSlotId = 0; imbueSlotId < item->getImbuementSlot(); imbueSlotId++) {\n\t\tImbuementInfo imbuementInfo;\n\t\tif (item->getImbuementInfo(imbueSlotId, &imbuementInfo) && imbuementInfo.imbuement) {\n\t\t\tint16_t imbuementAbsorption = imbuementInfo.imbuement->absorbPercent[combatTypeIndex];\n\t\t\tif (imbuementAbsorption != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23a9037e61b0c3943a677d6813fc9d0bfc32492273356ff4082b82f6c1066773" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3961, + "startColumn": 34, + "charOffset": 115271, + "charLength": 13, + "snippet": { + "text": "imbuementInfo" + } + }, + "contextRegion": { + "startLine": 3959, + "startColumn": 34, + "charOffset": 115119, + "charLength": 13, + "snippet": { + "text": "\t\tImbuementInfo imbuementInfo;\n\t\tif (item->getImbuementInfo(imbueSlotId, &imbuementInfo) && imbuementInfo.imbuement) {\n\t\t\tint16_t imbuementAbsorption = imbuementInfo.imbuement->absorbPercent[combatTypeIndex];\n\t\t\tif (imbuementAbsorption != 0) {\n\t\t\t\tcombatReductionArray[combatTypeIndex] = calculateDamageReduction(combatReductionArray[combatTypeIndex], imbuementAbsorption);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72ef571f9aeb5fbd949e13971aaecaf9472751e941c3eb08535d3f62959fd78d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3963, + "startColumn": 5, + "charOffset": 115367, + "charLength": 20, + "snippet": { + "text": "combatReductionArray" + } + }, + "contextRegion": { + "startLine": 3961, + "startColumn": 5, + "charOffset": 115238, + "charLength": 20, + "snippet": { + "text": "\t\t\tint16_t imbuementAbsorption = imbuementInfo.imbuement->absorbPercent[combatTypeIndex];\n\t\t\tif (imbuementAbsorption != 0) {\n\t\t\t\tcombatReductionArray[combatTypeIndex] = calculateDamageReduction(combatReductionArray[combatTypeIndex], imbuementAbsorption);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c095127c428788b6b92788ef71d9f80676f3d04ab51d2031cadbda33c2c6dd6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3963, + "startColumn": 70, + "charOffset": 115432, + "charLength": 20, + "snippet": { + "text": "combatReductionArray" + } + }, + "contextRegion": { + "startLine": 3961, + "startColumn": 70, + "charOffset": 115238, + "charLength": 20, + "snippet": { + "text": "\t\t\tint16_t imbuementAbsorption = imbuementInfo.imbuement->absorbPercent[combatTypeIndex];\n\t\t\tif (imbuementAbsorption != 0) {\n\t\t\t\tcombatReductionArray[combatTypeIndex] = calculateDamageReduction(combatReductionArray[combatTypeIndex], imbuementAbsorption);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8f6ee488d5cb9d4016aca693e3a80e09b63c13dc81a30ae6bcf18db37b0a202" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3970, + "startColumn": 82, + "charOffset": 115640, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 3968, + "startColumn": 82, + "charOffset": 115507, + "charLength": 4, + "snippet": { + "text": "\nvoid Player::updateDamageReductionFromItemAbility(\n\tstd::array &combatReductionArray, std::shared_ptr item, uint16_t combatTypeIndex\n) const {\n\tif (!item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2997d97a15db568e83041660442eed632ad6b1cde4e71fdf6cf495556b3e3382" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3972, + "startColumn": 6, + "charOffset": 115686, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3970, + "startColumn": 6, + "charOffset": 115559, + "charLength": 1, + "snippet": { + "text": "\tstd::array &combatReductionArray, std::shared_ptr item, uint16_t combatTypeIndex\n) const {\n\tif (!item) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a05fbb89a2c5912714e29e418889138eaf2322bef296ccb956c92d090f88fc6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3978, + "startColumn": 30, + "charOffset": 115821, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 3976, + "startColumn": 30, + "charOffset": 115709, + "charLength": 8, + "snippet": { + "text": "\tconst ItemType &itemType = Item::items[item->getID()];\n\tif (itemType.abilities) {\n\t\tint16_t elementReduction = itemType.abilities->absorbPercent[combatTypeIndex];\n\t\tif (elementReduction != 0) {\n\t\t\tcombatReductionArray[combatTypeIndex] = calculateDamageReduction(combatReductionArray[combatTypeIndex], elementReduction);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0bd2629aa32ffff9ee0e1aef1a93fb888a6114cf13331aa7f05e051911e3dbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3980, + "startColumn": 4, + "charOffset": 115907, + "charLength": 20, + "snippet": { + "text": "combatReductionArray" + } + }, + "contextRegion": { + "startLine": 3978, + "startColumn": 4, + "charOffset": 115792, + "charLength": 20, + "snippet": { + "text": "\t\tint16_t elementReduction = itemType.abilities->absorbPercent[combatTypeIndex];\n\t\tif (elementReduction != 0) {\n\t\t\tcombatReductionArray[combatTypeIndex] = calculateDamageReduction(combatReductionArray[combatTypeIndex], elementReduction);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8491d7f4eaed052cedffd254aeb1b9e9d24639f2376907085dfdd66297c72ba6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3980, + "startColumn": 69, + "charOffset": 115972, + "charLength": 20, + "snippet": { + "text": "combatReductionArray" + } + }, + "contextRegion": { + "startLine": 3978, + "startColumn": 69, + "charOffset": 115792, + "charLength": 20, + "snippet": { + "text": "\t\tint16_t elementReduction = itemType.abilities->absorbPercent[combatTypeIndex];\n\t\tif (elementReduction != 0) {\n\t\t\tcombatReductionArray[combatTypeIndex] = calculateDamageReduction(combatReductionArray[combatTypeIndex], elementReduction);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01ec9997addf11203e7c8543a0043b426341cd47a92cd35e00dc78ea5991cfab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'calculateDamageReduction' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3985, + "startColumn": 18, + "charOffset": 116057, + "charLength": 24, + "snippet": { + "text": "calculateDamageReduction" + } + }, + "contextRegion": { + "startLine": 3983, + "startColumn": 18, + "charOffset": 116037, + "charLength": 24, + "snippet": { + "text": "}\n\ndouble_t Player::calculateDamageReduction(double_t currentTotal, int16_t resistance) const {\n\treturn (100 - currentTotal) / 100.0 * resistance + currentTotal;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ceccb478a571131477642867b6d7fe6a02e7bced545e2fbbd66a1c14b2ff0573" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3986, + "startColumn": 10, + "charOffset": 116142, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 3984, + "startColumn": 10, + "charOffset": 116039, + "charLength": 3, + "snippet": { + "text": "\ndouble_t Player::calculateDamageReduction(double_t currentTotal, int16_t resistance) const {\n\treturn (100 - currentTotal) / 100.0 * resistance + currentTotal;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d64b8c9aa322d26d4ac7e33a26b2bfe0633845fb6b6ef520b2431081773d01d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3986, + "startColumn": 10, + "charOffset": 116142, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 3984, + "startColumn": 10, + "charOffset": 116039, + "charLength": 3, + "snippet": { + "text": "\ndouble_t Player::calculateDamageReduction(double_t currentTotal, int16_t resistance) const {\n\treturn (100 - currentTotal) / 100.0 * resistance + currentTotal;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "423771ab108dfbec7b60974e2ab44c490288b08fbc722b6aa8f7f5fa58afed47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3986, + "startColumn": 40, + "charOffset": 116172, + "charLength": 10, + "snippet": { + "text": "resistance" + } + }, + "contextRegion": { + "startLine": 3984, + "startColumn": 40, + "charOffset": 116039, + "charLength": 10, + "snippet": { + "text": "\ndouble_t Player::calculateDamageReduction(double_t currentTotal, int16_t resistance) const {\n\treturn (100 - currentTotal) / 100.0 * resistance + currentTotal;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2003dcee51d1e5a684cefb3c5ec560f19d4047f116e79cdb3f6533c6f8d81021" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3993, + "startColumn": 3, + "charOffset": 116351, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3991, + "startColumn": 3, + "charOffset": 116289, + "charLength": 3, + "snippet": { + "text": "\tconst auto &container = getStoreInbox();\n\tif (container) {\n\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\tstd::shared_ptr item = *it;\n\t\t\t(itemMap[item->getID()])[item->getTier()] += Item::countByType(item, -1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "849eb464cda31f9dbe5d0f5f1c87ac266c2093b18c84f7536102189199bd7320" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3993, + "startColumn": 3, + "charOffset": 116351, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3991, + "startColumn": 3, + "charOffset": 116289, + "charLength": 3, + "snippet": { + "text": "\tconst auto &container = getStoreInbox();\n\tif (container) {\n\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\tstd::shared_ptr item = *it;\n\t\t\t(itemMap[item->getID()])[item->getTier()] += Item::countByType(item, -1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7583675e5e1fa3a881d890e9e6e4214be0c5ab82e675dae936bef023ed6a93c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 3993, + "startColumn": 54, + "charOffset": 116402, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 3991, + "startColumn": 54, + "charOffset": 116289, + "charLength": 2, + "snippet": { + "text": "\tconst auto &container = getStoreInbox();\n\tif (container) {\n\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\tstd::shared_ptr item = *it;\n\t\t\t(itemMap[item->getID()])[item->getTier()] += Item::countByType(item, -1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56677672dd706a08bb1dac739d4a2706720571f4c91e6bb26caaa0bd2f0108d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4007, + "startColumn": 3, + "charOffset": 116785, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4005, + "startColumn": 3, + "charOffset": 116662, + "charLength": 3, + "snippet": { + "text": "\tfor (const auto &[index, depot] : depotChests) {\n\t\tconst std::shared_ptr &container = depot->getContainer();\n\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\tstd::shared_ptr item = *it;\n\t\t\t(itemMap[item->getID()])[item->getTier()] += Item::countByType(item, -1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3330864b1cf7c2468b456c0aafa9c5fd612e4600074ec74a6e47c1ed69d0384" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4007, + "startColumn": 3, + "charOffset": 116785, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4005, + "startColumn": 3, + "charOffset": 116662, + "charLength": 3, + "snippet": { + "text": "\tfor (const auto &[index, depot] : depotChests) {\n\t\tconst std::shared_ptr &container = depot->getContainer();\n\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\tstd::shared_ptr item = *it;\n\t\t\t(itemMap[item->getID()])[item->getTier()] += Item::countByType(item, -1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6c3acba75e1ba112ef2e63ca6175c7f069f5677fd324bc66e8b2fd7d249c8f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4007, + "startColumn": 54, + "charOffset": 116836, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 4005, + "startColumn": 54, + "charOffset": 116662, + "charLength": 2, + "snippet": { + "text": "\tfor (const auto &[index, depot] : depotChests) {\n\t\tconst std::shared_ptr &container = depot->getContainer();\n\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\tstd::shared_ptr item = *it;\n\t\t\t(itemMap[item->getID()])[item->getTier()] += Item::countByType(item, -1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ff31cd57e10bd2d65bb2ed2f2ac0db32c83ef9e01ccaa24dbdf64568ae97018" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4022, + "startColumn": 3, + "charOffset": 117237, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4020, + "startColumn": 3, + "charOffset": 117147, + "charLength": 3, + "snippet": { + "text": "\tconst std::shared_ptr &container = inbox->getContainer();\n\tif (container) {\n\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\tconst auto &item = *it;\n\t\t\t(itemMap[item->getID()])[item->getTier()] += Item::countByType(item, -1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b50d5abc64bb0e5e0bf0ade8e1c88dfca96b83a1be70f68ec21c320e5c5016d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4022, + "startColumn": 3, + "charOffset": 117237, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4020, + "startColumn": 3, + "charOffset": 117147, + "charLength": 3, + "snippet": { + "text": "\tconst std::shared_ptr &container = inbox->getContainer();\n\tif (container) {\n\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\tconst auto &item = *it;\n\t\t\t(itemMap[item->getID()])[item->getTier()] += Item::countByType(item, -1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f36b193818da70b3b8359b3c4bfb4ab3a6c398bb359e0f578ed5a42a4b89f44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4022, + "startColumn": 54, + "charOffset": 117288, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 4020, + "startColumn": 54, + "charOffset": 117147, + "charLength": 2, + "snippet": { + "text": "\tconst std::shared_ptr &container = inbox->getContainer();\n\tif (container) {\n\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\tconst auto &item = *it;\n\t\t\t(itemMap[item->getID()])[item->getTier()] += Item::countByType(item, -1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d977b1a37b2098b7024d0bc57a8617d99d487498ffe6c803f8eff9df35315ac6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4034, + "startColumn": 32, + "charOffset": 117730, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 4032, + "startColumn": 32, + "charOffset": 117590, + "charLength": 9, + "snippet": { + "text": "\tstd::vector> itemVector;\n\tfor (int i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; ++i) {\n\t\tstd::shared_ptr item = inventory[i];\n\t\tif (!item) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad8257929e1950fb3f89fc2ddf900c605b1daa53ae897207e6ea57413828fd7f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4035, + "startColumn": 7, + "charOffset": 117750, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4033, + "startColumn": 7, + "charOffset": 117638, + "charLength": 1, + "snippet": { + "text": "\tfor (int i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; ++i) {\n\t\tstd::shared_ptr item = inventory[i];\n\t\tif (!item) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7344a1b8342f4003bf020edecb04342aa2393597788a6ebcf54672295175a217" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4044, + "startColumn": 4, + "charOffset": 117965, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4042, + "startColumn": 4, + "charOffset": 117889, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t\tif (std::shared_ptr container = item->getContainer()) {\n\t\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\t\tif (ignoreItemWithTier && (*it)->getTier() > 0) {\n\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56c49da6369ba6ac66ec978dd2f2a1324f9c06028a8d57965712047f0c083525" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4044, + "startColumn": 4, + "charOffset": 117965, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4042, + "startColumn": 4, + "charOffset": 117889, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t\tif (std::shared_ptr container = item->getContainer()) {\n\t\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\t\tif (ignoreItemWithTier && (*it)->getTier() > 0) {\n\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71fd160ad7e9cccadeb3e7c22c0f9ed40220bcf4c9b4370f13c4f84c293c8f4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4044, + "startColumn": 55, + "charOffset": 118016, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 4042, + "startColumn": 55, + "charOffset": 117889, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\t\tif (std::shared_ptr container = item->getContainer()) {\n\t\t\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\t\t\tif (ignoreItemWithTier && (*it)->getTier() > 0) {\n\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7a1ba9d4903c784b935dbeeb97aa60635920bbe253b2ea912782973fc27eff5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4062, + "startColumn": 3, + "charOffset": 118464, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4060, + "startColumn": 3, + "charOffset": 118412, + "charLength": 3, + "snippet": { + "text": "\n\tfor (const auto &item : equippedAugmentItems) {\n\t\tfor (auto &augment : item->getAugments()) {\n\t\t\tif (augment->type == augmentType) {\n\t\t\t\tequippedAugmentItemsByType.push_back(item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4d10eea93d9eb7720c64fe60f52bd85c273590235a7f11969358d754038e3cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4076, + "startColumn": 2, + "charOffset": 118832, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4074, + "startColumn": 2, + "charOffset": 118782, + "charLength": 3, + "snippet": { + "text": "\tconst auto equippedItems = getEquippedItems();\n\n\tfor (const auto &item : equippedItems) {\n\t\tif (item->getAugments().size() < 1) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d0634e8dbdf0c2029bd1e53fcbefaf5b5f0528974e0883ab33c72e647d0d299" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-container-size-empty", + "ruleIndex": 695, + "kind": "fail", + "level": "warning", + "message": { + "text": "the 'empty' method should be used to check for emptiness instead of 'size'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4077, + "startColumn": 7, + "charOffset": 118879, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 4075, + "startColumn": 7, + "charOffset": 118830, + "charLength": 4, + "snippet": { + "text": "\n\tfor (const auto &item : equippedItems) {\n\t\tif (item->getAugments().size() < 1) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f976dd068c3e13161d88adb462851329f24de599ac687564dc59d36fbd36764" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4100, + "startColumn": 2, + "charOffset": 119349, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4098, + "startColumn": 2, + "charOffset": 119298, + "charLength": 3, + "snippet": { + "text": "\n\tstd::vector> valid_items;\n\tfor (const auto &slot : valid_slots) {\n\t\tstd::shared_ptr item = inventory[slot];\n\t\tif (!item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55f635f996c016d351db07e7ed7b6320beb0ca389dcae315b0b04fe2374bf018" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4101, + "startColumn": 32, + "charOffset": 119419, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 4099, + "startColumn": 32, + "charOffset": 119299, + "charLength": 9, + "snippet": { + "text": "\tstd::vector> valid_items;\n\tfor (const auto &slot : valid_slots) {\n\t\tstd::shared_ptr item = inventory[slot];\n\t\tif (!item) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "139904585a4f790ae39c10c9110552d9f533f57e39dbf78d09dff694a61b9c50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4102, + "startColumn": 7, + "charOffset": 119442, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4100, + "startColumn": 7, + "charOffset": 119348, + "charLength": 1, + "snippet": { + "text": "\tfor (const auto &slot : valid_slots) {\n\t\tstd::shared_ptr item = inventory[slot];\n\t\tif (!item) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "708b1d5d63d233f5e6ba3089943fdc0e1e4ea1f755e43dfb94f56afa08b5e41e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4113, + "startColumn": 2, + "charOffset": 119635, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4111, + "startColumn": 2, + "charOffset": 119527, + "charLength": 3, + "snippet": { + "text": "\nstd::map &Player::getAllItemTypeCount(std::map &countMap) const {\n\tfor (const auto &item : getAllInventoryItems()) {\n\t\tcountMap[static_cast(item->getID())] += Item::countByType(item, -1);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "075ab09a15780333c9634f1a1d3891eb0ad5f739b178aeb34c22824d1b2d803f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4120, + "startColumn": 2, + "charOffset": 119902, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4118, + "startColumn": 2, + "charOffset": 119789, + "charLength": 3, + "snippet": { + "text": "\nstd::map &Player::getAllSaleItemIdAndCount(std::map &countMap) const {\n\tfor (const auto &item : getAllInventoryItems(false, true)) {\n\t\tcountMap[item->getID()] += item->getItemCount();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4107be684e78de1f3eca3891bf227f1360cb2c358a00b2571bae92b0b944baa4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4128, + "startColumn": 2, + "charOffset": 120131, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4126, + "startColumn": 2, + "charOffset": 120038, + "charLength": 3, + "snippet": { + "text": "\nvoid Player::getAllItemTypeCountAndSubtype(std::map &countMap) const {\n\tfor (const auto &item : getAllInventoryItems()) {\n\t\tuint16_t itemId = item->getID();\n\t\tif (Item::items[itemId].isFluidContainer()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8fef855489d58edcee07e37c6c8af6e7210c35f42d30a47e113455ab58d9b183" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4131, + "startColumn": 107, + "charOffset": 120370, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 4129, + "startColumn": 107, + "charOffset": 120181, + "charLength": 2, + "snippet": { + "text": "\t\tuint16_t itemId = item->getID();\n\t\tif (Item::items[itemId].isFluidContainer()) {\n\t\t\tcountMap[static_cast(itemId) | (item->getAttribute(ItemAttribute_t::FLUIDTYPE)) << 16] += item->getItemCount();\n\t\t} else {\n\t\t\tcountMap[static_cast(itemId)] += item->getItemCount();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92ded1394f9fc130157181fe9dc428a4a521cd1e1414cf5950880c299f5e3e54" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4131, + "startColumn": 107, + "charOffset": 120370, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 4129, + "startColumn": 107, + "charOffset": 120181, + "charLength": 2, + "snippet": { + "text": "\t\tuint16_t itemId = item->getID();\n\t\tif (Item::items[itemId].isFluidContainer()) {\n\t\t\tcountMap[static_cast(itemId) | (item->getAttribute(ItemAttribute_t::FLUIDTYPE)) << 16] += item->getItemCount();\n\t\t} else {\n\t\t\tcountMap[static_cast(itemId)] += item->getItemCount();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "333079c0bf0040e7cddac885fddc256196d5e9ce4797cb5f98154ea2fff982a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-make-member-function-const", + "ruleIndex": 708, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getForgeItemFromId' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4138, + "startColumn": 31, + "charOffset": 120518, + "charLength": 18, + "snippet": { + "text": "getForgeItemFromId" + } + }, + "contextRegion": { + "startLine": 4136, + "startColumn": 31, + "charOffset": 120485, + "charLength": 18, + "snippet": { + "text": "}\n\nstd::shared_ptr Player::getForgeItemFromId(uint16_t itemId, uint8_t tier) {\n\tfor (auto item : getAllInventoryItems(true)) {\n\t\tif (item->hasImbuements()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce2ba580c6a24b38bdac796a1c908dd2ef7288ae2061f208a111ede4b92a393a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4139, + "startColumn": 2, + "charOffset": 120571, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4137, + "startColumn": 2, + "charOffset": 120487, + "charLength": 3, + "snippet": { + "text": "\nstd::shared_ptr Player::getForgeItemFromId(uint16_t itemId, uint8_t tier) {\n\tfor (auto item : getAllInventoryItems(true)) {\n\t\tif (item->hasImbuements()) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ee7b5fa43b6401f1d24b154933d3bd764d048b7de3c80df8b78001fa45eb490" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4154, + "startColumn": 10, + "charOffset": 120904, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 4152, + "startColumn": 10, + "charOffset": 120771, + "charLength": 9, + "snippet": { + "text": "std::shared_ptr Player::getThing(size_t index) const {\n\tif (index >= CONST_SLOT_FIRST && index <= CONST_SLOT_LAST) {\n\t\treturn inventory[index];\n\t}\n\treturn nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82f770708560630afa00f3b10860980ff2e4084c54797c04e3deb1aeb241c932" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4159, + "startColumn": 14, + "charOffset": 120958, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + } + }, + "contextRegion": { + "startLine": 4157, + "startColumn": 14, + "charOffset": 120942, + "charLength": 19, + "snippet": { + "text": "}\n\nvoid Player::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link /*= LINK_OWNER*/) {\n\tif (link == LINK_OWNER) {\n\t\t// calling movement scripts" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e617ae4a11c7640f67198d98ea0081a9579a9102a6c21dcdc799c22b1d2c312" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'postAddNotification' has cognitive complexity of 33 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4159, + "startColumn": 14, + "charOffset": 120958, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + } + }, + "contextRegion": { + "startLine": 4157, + "startColumn": 14, + "charOffset": 120942, + "charLength": 19, + "snippet": { + "text": "}\n\nvoid Player::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link /*= LINK_OWNER*/) {\n\tif (link == LINK_OWNER) {\n\t\t// calling movement scripts" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4970113499f7daf149e883da187594547fa3c914c5935d394e934a50b687177" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4162, + "startColumn": 18, + "charOffset": 121174, + "charLength": 13, + "snippet": { + "text": "onPlayerEquip" + } + }, + "contextRegion": { + "startLine": 4160, + "startColumn": 18, + "charOffset": 121100, + "charLength": 13, + "snippet": { + "text": "\tif (link == LINK_OWNER) {\n\t\t// calling movement scripts\n\t\tg_moveEvents().onPlayerEquip(getPlayer(), thing->getItem(), static_cast(index), false);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "edd0a82a614b7b4ab4c18ea608aed292828dbd6c7de96bdaf99ecbf5aa560f30" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4181, + "startColumn": 2, + "charOffset": 121722, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 4179, + "startColumn": 2, + "charOffset": 121717, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (std::shared_ptr item = thing->getItem()) {\n\t\tif (std::shared_ptr container = item->getContainer()) {\n\t\t\tonSendContainer(container);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37f5d9efa6e3cc2da3759f0ba2df448ec7b8d3a470fa72a0ac7bd4f81a2a6aa2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4187, + "startColumn": 4, + "charOffset": 121947, + "charLength": 18, + "snippet": { + "text": "updateSaleShopList" + } + }, + "contextRegion": { + "startLine": 4185, + "startColumn": 4, + "charOffset": 121879, + "charLength": 18, + "snippet": { + "text": "\n\t\tif (shopOwner && !scheduledSaleUpdate && requireListUpdate) {\n\t\t\tupdateSaleShopList(item);\n\t\t}\n\t} else if (std::shared_ptr creature = thing->getCreature()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "267fb8198c2036abd04b9c5a2a710a7228629f8de17d075aa5697e6632ca36ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4194, + "startColumn": 4, + "charOffset": 122165, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4192, + "startColumn": 4, + "charOffset": 122106, + "charLength": 3, + "snippet": { + "text": "\t\t\tstd::vector> containers;\n\n\t\t\tfor (const auto &it : openContainers) {\n\t\t\t\tstd::shared_ptr container = it.second.container;\n\t\t\t\tif (container == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55f635f996c016d351db07e7ed7b6320beb0ca389dcae315b0b04fe2374bf018" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4205, + "startColumn": 4, + "charOffset": 122459, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4203, + "startColumn": 4, + "charOffset": 122450, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (const std::shared_ptr &container : containers) {\n\t\t\t\tautoCloseContainers(container);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "770bec99d0f9ca83cc43b2ecf454cf263f599a22dcc986a76c146b1a51489c17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4212, + "startColumn": 14, + "charOffset": 122588, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + } + }, + "contextRegion": { + "startLine": 4210, + "startColumn": 14, + "charOffset": 122572, + "charLength": 22, + "snippet": { + "text": "}\n\nvoid Player::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link /*= LINK_OWNER*/) {\n\tif (link == LINK_OWNER) {\n\t\t// calling movement scripts" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72d8e5552147b3e4a57dcbfa67d9435b53b59bb0ce0d02b0b8324f0d53ae032f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'postRemoveNotification' has cognitive complexity of 47 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4212, + "startColumn": 14, + "charOffset": 122588, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + } + }, + "contextRegion": { + "startLine": 4210, + "startColumn": 14, + "charOffset": 122572, + "charLength": 22, + "snippet": { + "text": "}\n\nvoid Player::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link /*= LINK_OWNER*/) {\n\tif (link == LINK_OWNER) {\n\t\t// calling movement scripts" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92f665b7992906563a490d27ebdf52b4e5ad99cdd55efc4f2acb7054c9a60172" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4215, + "startColumn": 18, + "charOffset": 122807, + "charLength": 15, + "snippet": { + "text": "onPlayerDeEquip" + } + }, + "contextRegion": { + "startLine": 4213, + "startColumn": 18, + "charOffset": 122733, + "charLength": 15, + "snippet": { + "text": "\tif (link == LINK_OWNER) {\n\t\t// calling movement scripts\n\t\tg_moveEvents().onPlayerDeEquip(getPlayer(), thing->getItem(), static_cast(index));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e9a91c31f933034277e7a54195d9c5b7937d5660a64d8c1e44710030973e26b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4239, + "startColumn": 107, + "charOffset": 123615, + "charLength": 1, + "snippet": { + "text": "{" + } + }, + "contextRegion": { + "startLine": 4237, + "startColumn": 107, + "charOffset": 123473, + "charLength": 1, + "snippet": { + "text": "\t\t\tcheckLootContainers(container);\n\n\t\t\tif (container->isRemoved() || !Position::areInRange<1, 1, 0>(getPosition(), container->getPosition())) {\n\t\t\t\tautoCloseContainers(container);\n\t\t\t} else if (container->getTopParent() == getPlayer()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63e696aa5e1ac08d48dcb49890b4d034849afb2947e31c93b15038a646ecfb95" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4247, + "startColumn": 6, + "charOffset": 124003, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4245, + "startColumn": 6, + "charOffset": 123970, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbool isOwner = false;\n\n\t\t\t\t\tfor (const auto &it : depotChests) {\n\t\t\t\t\t\tif (it.second == depotChest) {\n\t\t\t\t\t\t\tisOwner = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69a4fbe8109f6959ab3bd80cb734983b657af543c1baeb08f103c9a53fd5d7ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4272, + "startColumn": 4, + "charOffset": 124556, + "charLength": 18, + "snippet": { + "text": "updateSaleShopList" + } + }, + "contextRegion": { + "startLine": 4270, + "startColumn": 4, + "charOffset": 124488, + "charLength": 18, + "snippet": { + "text": "\n\t\tif (shopOwner && !scheduledSaleUpdate && requireListUpdate) {\n\t\t\tupdateSaleShopList(item);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0100b8205187216d146b81e446b180610463f03730cabb87affc765faa6b5ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4278, + "startColumn": 55, + "charOffset": 124697, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 4276, + "startColumn": 55, + "charOffset": 124591, + "charLength": 4, + "snippet": { + "text": "\n// i will keep this function so it can be reviewed\nbool Player::updateSaleShopList(std::shared_ptr item) {\n\tuint16_t itemId = item->getID();\n\tif (!itemId || !item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "740928e1bffcf2b3dea4fe77379b16c0921e3029ed554b29575dc2e51ff6dabf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4280, + "startColumn": 6, + "charOffset": 124744, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4278, + "startColumn": 6, + "charOffset": 124643, + "charLength": 1, + "snippet": { + "text": "bool Player::updateSaleShopList(std::shared_ptr item) {\n\tuint16_t itemId = item->getID();\n\tif (!itemId || !item) {\n\t\treturn true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "feef1d625fde5dc08f3c5e46331c957af30c67fb2e991a22acebfb6c9b4f93c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint16_t' (aka 'unsigned short') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4280, + "startColumn": 7, + "charOffset": 124745, + "charLength": 6, + "snippet": { + "text": "itemId" + } + }, + "contextRegion": { + "startLine": 4278, + "startColumn": 7, + "charOffset": 124643, + "charLength": 6, + "snippet": { + "text": "bool Player::updateSaleShopList(std::shared_ptr item) {\n\tuint16_t itemId = item->getID();\n\tif (!itemId || !item) {\n\t\treturn true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7c5a06865a8735d1d248631e796a6b4d3e7054f86929af5ce997fd2dfb816c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4280, + "startColumn": 17, + "charOffset": 124755, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4278, + "startColumn": 17, + "charOffset": 124643, + "charLength": 1, + "snippet": { + "text": "bool Player::updateSaleShopList(std::shared_ptr item) {\n\tuint16_t itemId = item->getID();\n\tif (!itemId || !item) {\n\t\treturn true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b46b0888ee2d5be6638bfe94adb8297b27e479362fde7c3f118186d695346f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4290, + "startColumn": 6, + "charOffset": 125037, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4288, + "startColumn": 6, + "charOffset": 124957, + "charLength": 1, + "snippet": { + "text": "\nbool Player::hasShopItemForSale(uint16_t itemId, uint8_t subType) const {\n\tif (!shopOwner) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7094e360afa414b4fe2430817f57d37d96a03a1f1b362d5c403c6aed2f5abaf1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4306, + "startColumn": 6, + "charOffset": 125596, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4304, + "startColumn": 6, + "charOffset": 125512, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::internalAddThing(uint32_t index, std::shared_ptr thing) {\n\tif (!thing) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92f2f47d4f4ffc9ff3b05accbc36e6d8ac84d78ffd3f383113540a812ab1f9a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4311, + "startColumn": 6, + "charOffset": 125673, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4309, + "startColumn": 6, + "charOffset": 125619, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = thing->getItem();\n\tif (!item) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80d1a2110b17d97a7aaf8b3de421f37694331279924cbd25a19ea07de142d1e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4317, + "startColumn": 7, + "charOffset": 125865, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 4315, + "startColumn": 7, + "charOffset": 125696, + "charLength": 9, + "snippet": { + "text": "\t// index == 0 means we should equip this item at the most appropiate slot (no action required here)\n\tif (index >= CONST_SLOT_FIRST && index <= CONST_SLOT_LAST) {\n\t\tif (inventory[index]) {\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "634bf6734d76d27267059a6859314d9ec3dc77688021279f1d8cbe18e9657aa9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4321, + "startColumn": 3, + "charOffset": 125903, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 4319, + "startColumn": 3, + "charOffset": 125896, + "charLength": 9, + "snippet": { + "text": "\t\t}\n\n\t\tinventory[index] = item;\n\t\titem->setParent(static_self_cast());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2028383aba7c164f0c7e36a00631d29acb8f69f7cba0c04dd4f28d2a3737d5fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'setFollowCreature' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4326, + "startColumn": 14, + "charOffset": 125994, + "charLength": 17, + "snippet": { + "text": "setFollowCreature" + } + }, + "contextRegion": { + "startLine": 4324, + "startColumn": 14, + "charOffset": 125978, + "charLength": 17, + "snippet": { + "text": "}\n\nbool Player::setFollowCreature(std::shared_ptr creature) {\n\tif (!Creature::setFollowCreature(creature)) {\n\t\tsetFollowCreature(nullptr);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "551655c276ab590fb0ee24ee7006fb6c4f73115e1ed1f4e244c9690242b68d00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4328, + "startColumn": 3, + "charOffset": 126099, + "charLength": 17, + "snippet": { + "text": "setFollowCreature" + } + }, + "contextRegion": { + "startLine": 4326, + "startColumn": 3, + "charOffset": 125981, + "charLength": 17, + "snippet": { + "text": "bool Player::setFollowCreature(std::shared_ptr creature) {\n\tif (!Creature::setFollowCreature(creature)) {\n\t\tsetFollowCreature(nullptr);\n\t\tsetAttackedCreature(nullptr);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c71a05ec5870155d76239017ada16a02d2dde5c09e737f3620e6ce041f16f2d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4329, + "startColumn": 3, + "charOffset": 126129, + "charLength": 19, + "snippet": { + "text": "setAttackedCreature" + } + }, + "contextRegion": { + "startLine": 4327, + "startColumn": 3, + "charOffset": 126050, + "charLength": 19, + "snippet": { + "text": "\tif (!Creature::setFollowCreature(creature)) {\n\t\tsetFollowCreature(nullptr);\n\t\tsetAttackedCreature(nullptr);\n\n\t\tsendCancelMessage(RETURNVALUE_THEREISNOWAY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b95c2776a94f6533e4bd29d712ffdc7e80c4f1c7d687abb5a1fc03c28217736" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'setAttackedCreature' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4339, + "startColumn": 14, + "charOffset": 126292, + "charLength": 19, + "snippet": { + "text": "setAttackedCreature" + } + }, + "contextRegion": { + "startLine": 4337, + "startColumn": 14, + "charOffset": 126276, + "charLength": 19, + "snippet": { + "text": "}\n\nbool Player::setAttackedCreature(std::shared_ptr creature) {\n\tif (!Creature::setAttackedCreature(creature)) {\n\t\tsendCancelTarget();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6b4ca0363d25a4ad25c39c0a9dbdc549d7f37feb4087ac225b2a2bdcd492dc3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4346, + "startColumn": 2, + "charOffset": 126486, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 4344, + "startColumn": 2, + "charOffset": 126440, + "charLength": 2, + "snippet": { + "text": "\n\tauto followCreature = getFollowCreature();\n\tif (chaseMode && creature) {\n\t\tif (followCreature != creature) {\n\t\t\tsetFollowCreature(creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7addf3819ffc04caf5119d6d18fdc53dd6569ca9fe6a64d2d0b7f12db5b8cd52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4348, + "startColumn": 4, + "charOffset": 126554, + "charLength": 17, + "snippet": { + "text": "setFollowCreature" + } + }, + "contextRegion": { + "startLine": 4346, + "startColumn": 4, + "charOffset": 126485, + "charLength": 17, + "snippet": { + "text": "\tif (chaseMode && creature) {\n\t\tif (followCreature != creature) {\n\t\t\tsetFollowCreature(creature);\n\t\t}\n\t} else if (followCreature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0334ab4d1a5c538622e486cae102ae9f607d1530d5fc4007a83d56aa76949703" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4351, + "startColumn": 3, + "charOffset": 126619, + "charLength": 17, + "snippet": { + "text": "setFollowCreature" + } + }, + "contextRegion": { + "startLine": 4349, + "startColumn": 3, + "charOffset": 126583, + "charLength": 17, + "snippet": { + "text": "\t\t}\n\t} else if (followCreature) {\n\t\tsetFollowCreature(nullptr);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41302fac59a1d3333223333c4ffafbedc8b31ee1e940260aff3d5e1c2c0c729c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4361, + "startColumn": 6, + "charOffset": 126855, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4359, + "startColumn": 6, + "charOffset": 126813, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::goToFollowCreature() {\n\tif (!walkTask) {\n\t\tif ((OTSYS_TIME() - lastFailedFollow) < 2000) {\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e19f84a26247a1734470894449e9551a510f1c69b1e8d66432cc58ad3fd1dc27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4362, + "startColumn": 43, + "charOffset": 126910, + "charLength": 4, + "snippet": { + "text": "2000" + } + }, + "contextRegion": { + "startLine": 4360, + "startColumn": 43, + "charOffset": 126814, + "charLength": 4, + "snippet": { + "text": "void Player::goToFollowCreature() {\n\tif (!walkTask) {\n\t\tif ((OTSYS_TIME() - lastFailedFollow) < 2000) {\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24484b0905b40ece68bc7f05658c8d0c8c6618a313be0fe50f288ec4fecb9c0c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4379, + "startColumn": 34, + "charOffset": 127272, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 4377, + "startColumn": 34, + "charOffset": 127236, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Player::doAttacking(uint32_t) {\n\tif (lastAttack == 0) {\n\t\tlastAttack = OTSYS_TIME() - getAttackSpeed() - 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6aa5320e3e034dd94b92b6065d8a4be5eb5ce74e23644a60e61392e807a7e826" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4389, + "startColumn": 6, + "charOffset": 127464, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4387, + "startColumn": 6, + "charOffset": 127410, + "charLength": 1, + "snippet": { + "text": "\n\tauto attackedCreature = getAttackedCreature();\n\tif (!attackedCreature) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98993713cc84542fec42bc51986801861bb7f8a174c23d0acbeae1ee5def99c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4402, + "startColumn": 35, + "charOffset": 127862, + "charLength": 1, + "snippet": { + "text": "{" + } + }, + "contextRegion": { + "startLine": 4400, + "startColumn": 35, + "charOffset": 127811, + "charLength": 1, + "snippet": { + "text": "\n\t\tif (weapon) {\n\t\t\tif (!weapon->interruptSwing()) {\n\t\t\t\tresult = weapon->useWeapon(static_self_cast(), tool, attackedCreature);\n\t\t\t} else if (!classicSpeed && !canDoAction()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "304a9b012530731f06cc8c6eed63b2d920f382f59f58005c90722a8d632a5a71" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4423, + "startColumn": 19, + "charOffset": 128556, + "charLength": 13, + "snippet": { + "text": "scheduleEvent" + } + }, + "contextRegion": { + "startLine": 4421, + "startColumn": 19, + "charOffset": 128492, + "charLength": 13, + "snippet": { + "text": "\t\t\tsetNextActionTask(task, false);\n\t\t} else {\n\t\t\tg_dispatcher().scheduleEvent(task);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f64d9bfc15dd70f12d2e8e86a1021a9df3c567f3e601449a3b5c3173deaf68f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4437, + "startColumn": 33, + "charOffset": 129114, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 4435, + "startColumn": 33, + "charOffset": 128821, + "charLength": 3, + "snippet": { + "text": "\t\tauto attackerPlayer = attacker->getPlayer();\n\t\tif (attackerPlayer && attackerPlayer.get() != this && skillLoss && std::abs(static_cast(attackerPlayer->getLevel() - level)) <= g_configManager().getNumber(EXP_FROM_PLAYERS_LEVEL_RANGE, __FUNCTION__)) {\n\t\t\treturn std::max(0, std::floor(getLostExperience() * getDamageRatio(attacker) * 0.75));\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "038a0dbe7642a3e42877d3201b19ad77f557c6c447a14b7b5aa63edfe5dfd003" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4437, + "startColumn": 44, + "charOffset": 129125, + "charLength": 17, + "snippet": { + "text": "getLostExperience" + } + }, + "contextRegion": { + "startLine": 4435, + "startColumn": 44, + "charOffset": 128821, + "charLength": 17, + "snippet": { + "text": "\t\tauto attackerPlayer = attacker->getPlayer();\n\t\tif (attackerPlayer && attackerPlayer.get() != this && skillLoss && std::abs(static_cast(attackerPlayer->getLevel() - level)) <= g_configManager().getNumber(EXP_FROM_PLAYERS_LEVEL_RANGE, __FUNCTION__)) {\n\t\t\treturn std::max(0, std::floor(getLostExperience() * getDamageRatio(attacker) * 0.75));\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0b0ac2826ce6dee0495a476278564638d01bc309bdc7ac2d16e20239d91995e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.75 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4437, + "startColumn": 93, + "charOffset": 129174, + "charLength": 4, + "snippet": { + "text": "0.75" + } + }, + "contextRegion": { + "startLine": 4435, + "startColumn": 93, + "charOffset": 128821, + "charLength": 4, + "snippet": { + "text": "\t\tauto attackerPlayer = attacker->getPlayer();\n\t\tif (attackerPlayer && attackerPlayer.get() != this && skillLoss && std::abs(static_cast(attackerPlayer->getLevel() - level)) <= g_configManager().getNumber(EXP_FROM_PLAYERS_LEVEL_RANGE, __FUNCTION__)) {\n\t\t\treturn std::max(0, std::floor(getLostExperience() * getDamageRatio(attacker) * 0.75));\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c3d8dfed12b8a5d8fcfff45ce65105cc71f2c1931d449b2c662e02f7a80460c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4444, + "startColumn": 6, + "charOffset": 129283, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4442, + "startColumn": 6, + "charOffset": 129202, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::onFollowCreature(const std::shared_ptr &creature) {\n\tif (!creature) {\n\t\tstopWalk();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24ce144856b8da604645286e417456a455322131f7677d8f0ceb2a6dd9a50f16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4456, + "startColumn": 3, + "charOffset": 129537, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 4454, + "startColumn": 3, + "charOffset": 129499, + "charLength": 2, + "snippet": { + "text": "\n\tif (prevChaseMode != chaseMode) {\n\t\tif (chaseMode) {\n\t\t\tif (!followCreature && attackedCreature) {\n\t\t\t\t// chase opponent" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9931e57d493fd78da005af84a37bb79f70eb97ac5342d727c049e04ea08793dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4457, + "startColumn": 8, + "charOffset": 129561, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4455, + "startColumn": 8, + "charOffset": 129500, + "charLength": 1, + "snippet": { + "text": "\tif (prevChaseMode != chaseMode) {\n\t\tif (chaseMode) {\n\t\t\tif (!followCreature && attackedCreature) {\n\t\t\t\t// chase opponent\n\t\t\t\tsetFollowCreature(attackedCreature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9058655b3f0f90f648615e064ca6b2d221078a2cb812992ea80c78717d4ec519" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4459, + "startColumn": 5, + "charOffset": 129626, + "charLength": 17, + "snippet": { + "text": "setFollowCreature" + } + }, + "contextRegion": { + "startLine": 4457, + "startColumn": 5, + "charOffset": 129554, + "charLength": 17, + "snippet": { + "text": "\t\t\tif (!followCreature && attackedCreature) {\n\t\t\t\t// chase opponent\n\t\t\t\tsetFollowCreature(attackedCreature);\n\t\t\t}\n\t\t} else if (attackedCreature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0334ab4d1a5c538622e486cae102ae9f607d1530d5fc4007a83d56aa76949703" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4462, + "startColumn": 4, + "charOffset": 129704, + "charLength": 17, + "snippet": { + "text": "setFollowCreature" + } + }, + "contextRegion": { + "startLine": 4460, + "startColumn": 4, + "charOffset": 129663, + "charLength": 17, + "snippet": { + "text": "\t\t\t}\n\t\t} else if (attackedCreature) {\n\t\t\tsetFollowCreature(nullptr);\n\t\t\tcancelNextWalk = true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24b4f6b0f14df64472da17c7913349825aee8946363d835bce6af9cf5e8c9441" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4483, + "startColumn": 6, + "charOffset": 130326, + "charLength": 16, + "snippet": { + "text": "executeCondition" + } + }, + "contextRegion": { + "startLine": 4481, + "startColumn": 6, + "charOffset": 130148, + "charLength": 16, + "snippet": { + "text": "\t\tg_logger().debug(\"[Player::onWalkComplete] Executing feared conditions as players completed it's walk.\");\n\t\tstd::shared_ptr f = getCondition(CONDITION_FEARED);\n\t\tf->executeCondition(static_self_cast(), 0);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5731090f19a121c0def37cd81c1e343cf2d00931a5afd764701aef51cedc2425" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4487, + "startColumn": 19, + "charOffset": 130414, + "charLength": 12, + "snippet": { + "text": "g_dispatcher" + } + }, + "contextRegion": { + "startLine": 4485, + "startColumn": 19, + "charOffset": 130378, + "charLength": 12, + "snippet": { + "text": "\n\tif (walkTask) {\n\t\twalkTaskEvent = g_dispatcher().scheduleEvent(walkTask);\n\t\twalkTask = nullptr;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d664d1b6c32db1bcb1da4e47a121d000209959d580ec3a324f84ae0af7439aff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4506, + "startColumn": 2, + "charOffset": 130758, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4504, + "startColumn": 2, + "charOffset": 130735, + "charLength": 3, + "snippet": { + "text": "\tLightInfo maxLight;\n\n\tfor (int32_t i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; ++i) {\n\t\tstd::shared_ptr item = inventory[i];\n\t\tif (item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2da93c1013cf06e1c249bcefb5dd9bd58e75043b7d77e1acac1126d07da90f16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4507, + "startColumn": 32, + "charOffset": 130853, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 4505, + "startColumn": 32, + "charOffset": 130756, + "charLength": 9, + "snippet": { + "text": "\n\tfor (int32_t i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; ++i) {\n\t\tstd::shared_ptr item = inventory[i];\n\t\tif (item) {\n\t\t\tLightInfo curLight = item->getLightInfo();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b410b43d3ed6afcdded7099005bdffee11c3540cd1f91f63ca8ef43da2bc2b73" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4560, + "startColumn": 3, + "charOffset": 131941, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 4558, + "startColumn": 3, + "charOffset": 131910, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONDITION_LESSERHEX:\n\n\t\tcase CONDITION_INTENSEHEX:\n\n\t\tcase CONDITION_GREATERHEX:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ee0216858b8e0b2bd019348e8f45bb6798818e8b1faa7c6f62449711cbc0457" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4562, + "startColumn": 3, + "charOffset": 131971, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 4560, + "startColumn": 3, + "charOffset": 131939, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONDITION_INTENSEHEX:\n\n\t\tcase CONDITION_GREATERHEX:\n\n\t\t\tsendTextMessage(MESSAGE_FAILURE, \"You are hexed.\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "124b07ddff72c662f071ead955c2a97562b98a50e23a073911fef19f4cd20749" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4609, + "startColumn": 3, + "charOffset": 132975, + "charLength": 11, + "snippet": { + "text": "toggleMount" + } + }, + "contextRegion": { + "startLine": 4607, + "startColumn": 3, + "charOffset": 132925, + "charLength": 11, + "snippet": { + "text": "\n\tif (type == CONDITION_OUTFIT && wasMounted) {\n\t\ttoggleMount(true);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2dbe3faeee0df2791a7e55a4e3e4101b0029f7819ef427ad2b833b7974c6a44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4623, + "startColumn": 9, + "charOffset": 133439, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 4621, + "startColumn": 9, + "charOffset": 133378, + "charLength": 2, + "snippet": { + "text": "\t\t\tif (item) {\n\t\t\t\t// 25% chance to destroy the item\n\t\t\t\tif (25 >= uniform_random(1, 100)) {\n\t\t\t\t\tg_game().internalRemoveItem(item);\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e26ea00c4c69656adae0b941cc01eae3a35b4035006f9ed22c2de7e82c1f4682" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4623, + "startColumn": 33, + "charOffset": 133463, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 4621, + "startColumn": 33, + "charOffset": 133378, + "charLength": 3, + "snippet": { + "text": "\t\t\tif (item) {\n\t\t\t\t// 25% chance to destroy the item\n\t\t\t\tif (25 >= uniform_random(1, 100)) {\n\t\t\t\t\tg_game().internalRemoveItem(item);\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a456079974a173d6d8bc825ca6b0c03b6207c50a45de4df061ee2a61cdb112a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4624, + "startColumn": 15, + "charOffset": 133485, + "charLength": 18, + "snippet": { + "text": "internalRemoveItem" + } + }, + "contextRegion": { + "startLine": 4622, + "startColumn": 15, + "charOffset": 133393, + "charLength": 18, + "snippet": { + "text": "\t\t\t\t// 25% chance to destroy the item\n\t\t\t\tif (25 >= uniform_random(1, 100)) {\n\t\t\t\t\tg_game().internalRemoveItem(item);\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dcbf721fd7f1afd12dd906fd8714f128e90748b26b82cbb736dea4c143ce1fec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4631, + "startColumn": 26, + "charOffset": 133632, + "charLength": 5, + "snippet": { + "text": "delay" + } + }, + "contextRegion": { + "startLine": 4629, + "startColumn": 26, + "charOffset": 133536, + "charLength": 5, + "snippet": { + "text": "\t\tif (!canDoAction()) {\n\t\t\tconst uint32_t delay = getNextActionTime();\n\t\t\tconst int32_t ticks = delay - (delay % EVENT_CREATURE_THINK_INTERVAL);\n\t\t\tif (ticks < 0 || condition->getType() == CONDITION_PARALYZE) {\n\t\t\t\tremoveCondition(condition);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b74546c367f9b9331ff2bfb7fa951d0b9f5895cb04d596af41c1b4e9e53d9d65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'onAttackedCreature' has cognitive complexity of 28 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4643, + "startColumn": 14, + "charOffset": 133893, + "charLength": 18, + "snippet": { + "text": "onAttackedCreature" + } + }, + "contextRegion": { + "startLine": 4641, + "startColumn": 14, + "charOffset": 133877, + "charLength": 18, + "snippet": { + "text": "}\n\nvoid Player::onAttackedCreature(std::shared_ptr target) {\n\tCreature::onAttackedCreature(target);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48a8f3cc84e7c885a0f6126b027a3d65d84fd22bbb8582268be98208389a8d98" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4666, + "startColumn": 3, + "charOffset": 134407, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 4664, + "startColumn": 3, + "charOffset": 134400, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (getSkull() == SKULL_NONE && getSkullClient(targetPlayer) == SKULL_YELLOW) {\n\t\t\taddAttacked(targetPlayer);\n\t\t\ttargetPlayer->sendCreatureSkull(static_self_cast());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8407af80d7e21a1d5957913ea697eb50cacd6f0444b8d235fd3862962c32db8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4735, + "startColumn": 3, + "charOffset": 136229, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 4733, + "startColumn": 3, + "charOffset": 136179, + "charLength": 2, + "snippet": { + "text": "\t\tstd::shared_ptr tmpPlayer = nullptr;\n\n\t\tif (isPartner(tmpPlayer) && (tmpPlayer != getPlayer())) {\n\t\t\ttmpPlayer = target->getPlayer();\n\t\t} else if (std::shared_ptr targetMaster = target->getMaster()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22de00c7f7a9f68d30cc469b6ac24f20d4f89e28176a7e66c9a3caf9f4f72010" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4751, + "startColumn": 2, + "charOffset": 136745, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 4749, + "startColumn": 2, + "charOffset": 136634, + "charLength": 2, + "snippet": { + "text": "bool Player::onKilledPlayer(const std::shared_ptr &target, bool lastHit) {\n\tbool unjustified = false;\n\tif (target->getZoneType() == ZONE_PVP) {\n\t\ttarget->setDropLoot(false);\n\t\ttarget->setSkillLoss(false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6fd598455978f84ca36201d5caddc82d49896464fd12bb924c388015a25e9351" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4756, + "startColumn": 4, + "charOffset": 137087, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 4754, + "startColumn": 4, + "charOffset": 136847, + "charLength": 2, + "snippet": { + "text": "\t} else if (!hasFlag(PlayerFlags_t::NotGainInFight) && !isPartner(target)) {\n\t\tif (!Combat::isInPvpZone(getPlayer(), target) && hasAttacked(target) && !target->hasAttacked(getPlayer()) && !isGuildMate(target) && target != getPlayer()) {\n\t\t\tif (target->hasKilled(getPlayer())) {\n\t\t\t\tfor (auto &kill : target->unjustifiedKills) {\n\t\t\t\t\tif (kill.target == getGUID() && kill.unavenged) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "734fef7806a73a68051a7a6cbf5de2dd679fcb088e357a2f88216fcea09e367a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4757, + "startColumn": 5, + "charOffset": 137129, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4755, + "startColumn": 5, + "charOffset": 136924, + "charLength": 3, + "snippet": { + "text": "\t\tif (!Combat::isInPvpZone(getPlayer(), target) && hasAttacked(target) && !target->hasAttacked(getPlayer()) && !isGuildMate(target) && target != getPlayer()) {\n\t\t\tif (target->hasKilled(getPlayer())) {\n\t\t\t\tfor (auto &kill : target->unjustifiedKills) {\n\t\t\t\t\tif (kill.target == getGUID() && kill.unavenged) {\n\t\t\t\t\t\tkill.unavenged = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95922a1d70a8140330663f06e3263a3963bcf5f2e9bbcec83a6fde5e1dae5993" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4760, + "startColumn": 19, + "charOffset": 137278, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 4758, + "startColumn": 19, + "charOffset": 137175, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tif (kill.target == getGUID() && kill.unavenged) {\n\t\t\t\t\t\tkill.unavenged = false;\n\t\t\t\t\t\tattackedSet.erase(target->guid);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "104a522ceb2897334a4f5ec6a8dc563fd6c2934d5000c032faafe975092fc696" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4772, + "startColumn": 5, + "charOffset": 137710, + "charLength": 12, + "snippet": { + "text": "addCondition" + } + }, + "contextRegion": { + "startLine": 4770, + "startColumn": 5, + "charOffset": 137510, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tpzLocked = true;\n\t\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_INFIGHT, g_configManager().getNumber(WHITE_SKULL_TIME, __FUNCTION__), 0);\n\t\t\t\taddCondition(condition);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c99fca5a3ca9dcc5d8eb943ed6f416fb9eb4a55f79b663284cae195a3dd29a61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4781, + "startColumn": 6, + "charOffset": 137925, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4779, + "startColumn": 6, + "charOffset": 137771, + "charLength": 1, + "snippet": { + "text": "void Player::addHuntingTaskKill(const std::shared_ptr &mType) {\n\tconst auto &taskSlot = getTaskHuntingWithCreature(mType->info.raceid);\n\tif (!taskSlot) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2c0324621f3661dcaa2a5fd823efca9e356b4892390e4d6598aaf02d81eb755" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4837, + "startColumn": 16, + "charOffset": 139746, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 4835, + "startColumn": 16, + "charOffset": 139727, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\taddExperience(target, gainExp, true);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed7d01a1e75f84bc22c88fa9dd63779d122fe129ee30e62eacfd72e0ade1b48e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4845, + "startColumn": 16, + "charOffset": 139936, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4843, + "startColumn": 16, + "charOffset": 139917, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (target && !target->getPlayer() && m_party && m_party->isSharedExperienceActive() && m_party->isSharedExperienceEnabled()) {\n\t\tm_party->shareExperience(gainExp, target);\n\t\t// We will get a share of the experience through the sharing mechanism" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f67ba2f49dc2ddb499401e1f557f171829bc60dbf36af1398de5ad43a76caf9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4856, + "startColumn": 26, + "charOffset": 140380, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 4854, + "startColumn": 26, + "charOffset": 140264, + "charLength": 6, + "snippet": { + "text": "\nvoid Player::onGainSharedExperience(uint64_t gainExp, std::shared_ptr target) {\n\tgainExperience(gainExp, target);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eab79a58def139fc8cc4db76a002c0938771570266c013a41925559d755879eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'lastHitCreature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4878, + "startColumn": 56, + "charOffset": 140871, + "charLength": 15, + "snippet": { + "text": "lastHitCreature" + } + }, + "contextRegion": { + "startLine": 4876, + "startColumn": 56, + "charOffset": 140813, + "charLength": 15, + "snippet": { + "text": "}\n\nbool Player::lastHitIsPlayer(std::shared_ptr lastHitCreature) {\n\tif (!lastHitCreature) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08c2bc7356e0d0fb0fefebe5cf4f9e02ca3f34cf1c0e26e9071a35a8f30f0e72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4879, + "startColumn": 6, + "charOffset": 140895, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4877, + "startColumn": 6, + "charOffset": 140815, + "charLength": 1, + "snippet": { + "text": "\nbool Player::lastHitIsPlayer(std::shared_ptr lastHitCreature) {\n\tif (!lastHitCreature) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a7c4eb4a02b40dc0dd774cf0a720de8fef3a66354a6cdc72c6fe7f4b8254c26" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4891, + "startColumn": 14, + "charOffset": 141133, + "charLength": 12, + "snippet": { + "text": "changeHealth" + } + }, + "contextRegion": { + "startLine": 4889, + "startColumn": 14, + "charOffset": 141117, + "charLength": 12, + "snippet": { + "text": "}\n\nvoid Player::changeHealth(int32_t healthChange, bool sendHealthChange /* = true*/) {\n\tCreature::changeHealth(healthChange, sendHealthChange);\n\tsendStats();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ba8164d74ac015687aab90b53bb6c8167215fb0ad82a050b06776dd7fb4d268" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4906, + "startColumn": 29, + "charOffset": 141580, + "charLength": 10, + "snippet": { + "text": "soulChange" + } + }, + "contextRegion": { + "startLine": 4904, + "startColumn": 29, + "charOffset": 141483, + "charLength": 10, + "snippet": { + "text": "void Player::changeSoul(int32_t soulChange) {\n\tif (soulChange > 0) {\n\t\tsoul += std::min(soulChange * g_configManager().getFloat(RATE_SOUL_REGEN, __FUNCTION__), vocation->getSoulMax() - soul);\n\t} else {\n\t\tsoul = std::max(0, soul + soulChange);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "944c574ffaf7fed4d0adb45ec5a5fe0b2eb76eeebee1ded9149e87649af4e817" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4906, + "startColumn": 29, + "charOffset": 141580, + "charLength": 10, + "snippet": { + "text": "soulChange" + } + }, + "contextRegion": { + "startLine": 4904, + "startColumn": 29, + "charOffset": 141483, + "charLength": 10, + "snippet": { + "text": "void Player::changeSoul(int32_t soulChange) {\n\tif (soulChange > 0) {\n\t\tsoul += std::min(soulChange * g_configManager().getFloat(RATE_SOUL_REGEN, __FUNCTION__), vocation->getSoulMax() - soul);\n\t} else {\n\t\tsoul = std::max(0, soul + soulChange);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17d7a725a1a6b97f1075ff7f029de3c98cad268eca0eefcc9e5670c2f00b8964" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4906, + "startColumn": 29, + "charOffset": 141580, + "charLength": 10, + "snippet": { + "text": "soulChange" + } + }, + "contextRegion": { + "startLine": 4904, + "startColumn": 29, + "charOffset": 141483, + "charLength": 10, + "snippet": { + "text": "void Player::changeSoul(int32_t soulChange) {\n\tif (soulChange > 0) {\n\t\tsoul += std::min(soulChange * g_configManager().getFloat(RATE_SOUL_REGEN, __FUNCTION__), vocation->getSoulMax() - soul);\n\t} else {\n\t\tsoul = std::max(0, soul + soulChange);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec8a6fee1fe35044c317da27ebb6b9d317430578cf4461f0b0229abe0d5975f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4908, + "startColumn": 10, + "charOffset": 141703, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 4906, + "startColumn": 10, + "charOffset": 141552, + "charLength": 3, + "snippet": { + "text": "\t\tsoul += std::min(soulChange * g_configManager().getFloat(RATE_SOUL_REGEN, __FUNCTION__), vocation->getSoulMax() - soul);\n\t} else {\n\t\tsoul = std::max(0, soul + soulChange);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef9a0622267771bf4311317bab26de468398c948dff8395e77fdf9f8ae3c684f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'canWear' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4914, + "startColumn": 22, + "charOffset": 141786, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 4912, + "startColumn": 22, + "charOffset": 141762, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Player::canWear(uint16_t lookType, uint8_t addons) const {\n\tif (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS, __FUNCTION__) && lookType != 0 && !g_game().isLookTypeRegistered(lookType)) {\n\t\tg_logger().warn(\"[Player::canWear] An unregistered creature looktype type with id '{}' was blocked to prevent client crash.\", lookType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0219d5b0d5bcb5333ccdf73d85d0f096d5d1b7542385837c9479cc954a190d6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4925, + "startColumn": 6, + "charOffset": 142256, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4923, + "startColumn": 6, + "charOffset": 142161, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto &outfit = Outfits::getInstance().getOutfitByLookType(getPlayer(), lookType);\n\tif (!outfit) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2ea500275b9482804379f4d9987f6eff41f41b060d9f44eedf8202dfd7929bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4937, + "startColumn": 2, + "charOffset": 142407, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4935, + "startColumn": 2, + "charOffset": 142402, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const OutfitEntry &outfitEntry : outfits) {\n\t\tif (outfitEntry.lookType != lookType) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "113b27dbeb0ab9a5d9198fcc138e870b27375d9391994ab8452e6708ee856d11" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4952, + "startColumn": 6, + "charOffset": 142683, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4950, + "startColumn": 6, + "charOffset": 142653, + "charLength": 1, + "snippet": { + "text": "\n\tauto tile = getTile();\n\tif (!tile) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23dbeded63e2672b03b59e73412f8d4c54b98cdfc7485c97e71288a04e6d5e44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4970, + "startColumn": 2, + "charOffset": 143023, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4968, + "startColumn": 2, + "charOffset": 142944, + "charLength": 3, + "snippet": { + "text": "\t// generate outfits range\n\tuint32_t outfits_key = PSTRG_OUTFITS_RANGE_START;\n\tfor (const OutfitEntry &entry : outfits) {\n\t\tstorageMap[++outfits_key] = (entry.lookType << 16) | entry.addons;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75bee2e54fe08e3251b8d6730086f711662019dbca89961cd83778860a0a1403" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4971, + "startColumn": 31, + "charOffset": 143096, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 4969, + "startColumn": 31, + "charOffset": 142971, + "charLength": 1, + "snippet": { + "text": "\tuint32_t outfits_key = PSTRG_OUTFITS_RANGE_START;\n\tfor (const OutfitEntry &entry : outfits) {\n\t\tstorageMap[++outfits_key] = (entry.lookType << 16) | entry.addons;\n\t}\n\t// generate familiars range" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c975248c445933dd086fa9eabff366c547ad2e0ebdefef9154078a00b7e58eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-8-1", + "ruleIndex": 446, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-8-1: The right hand operand of a shift operator shall lie between zero and one less than the width in bits of the underlying type of the left hand operand" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4971, + "startColumn": 50, + "charOffset": 143115, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 4969, + "startColumn": 50, + "charOffset": 142971, + "charLength": 2, + "snippet": { + "text": "\tuint32_t outfits_key = PSTRG_OUTFITS_RANGE_START;\n\tfor (const OutfitEntry &entry : outfits) {\n\t\tstorageMap[++outfits_key] = (entry.lookType << 16) | entry.addons;\n\t}\n\t// generate familiars range" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ab529fd10021420ac9c4fb2f1071684e06b286364e18704137e49aff41a7f0a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4971, + "startColumn": 50, + "charOffset": 143115, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 4969, + "startColumn": 50, + "charOffset": 142971, + "charLength": 2, + "snippet": { + "text": "\tuint32_t outfits_key = PSTRG_OUTFITS_RANGE_START;\n\tfor (const OutfitEntry &entry : outfits) {\n\t\tstorageMap[++outfits_key] = (entry.lookType << 16) | entry.addons;\n\t}\n\t// generate familiars range" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a58ebfa987f6c0682c0990e08f287d91b39e1ddaa51bf521b113332330700538" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4971, + "startColumn": 50, + "charOffset": 143115, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 4969, + "startColumn": 50, + "charOffset": 142971, + "charLength": 2, + "snippet": { + "text": "\tuint32_t outfits_key = PSTRG_OUTFITS_RANGE_START;\n\tfor (const OutfitEntry &entry : outfits) {\n\t\tstorageMap[++outfits_key] = (entry.lookType << 16) | entry.addons;\n\t}\n\t// generate familiars range" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3195d191bec7478c127ddde90ab45a67645e001a557dbcf3c50ebd386bd9428f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4975, + "startColumn": 2, + "charOffset": 143222, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4973, + "startColumn": 2, + "charOffset": 143138, + "charLength": 3, + "snippet": { + "text": "\t// generate familiars range\n\tuint32_t familiar_key = PSTRG_FAMILIARS_RANGE_START;\n\tfor (const FamiliarEntry &entry : familiars) {\n\t\tstorageMap[++familiar_key] = (entry.lookType << 16);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c07076e5fa2464b22c062d836bdbe37aa1e4dde31a472661661c302b530947a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-8-1", + "ruleIndex": 446, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-8-1: The right hand operand of a shift operator shall lie between zero and one less than the width in bits of the underlying type of the left hand operand" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4976, + "startColumn": 51, + "charOffset": 143319, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 4974, + "startColumn": 51, + "charOffset": 143167, + "charLength": 2, + "snippet": { + "text": "\tuint32_t familiar_key = PSTRG_FAMILIARS_RANGE_START;\n\tfor (const FamiliarEntry &entry : familiars) {\n\t\tstorageMap[++familiar_key] = (entry.lookType << 16);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7953770cc90d5305e0315aa19d3a2c12657f2316fe906f7959d4ae38353d5494" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4976, + "startColumn": 51, + "charOffset": 143319, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 4974, + "startColumn": 51, + "charOffset": 143167, + "charLength": 2, + "snippet": { + "text": "\tuint32_t familiar_key = PSTRG_FAMILIARS_RANGE_START;\n\tfor (const FamiliarEntry &entry : familiars) {\n\t\tstorageMap[++familiar_key] = (entry.lookType << 16);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eff14ce7574696baa2c3d037aaa25d9347f1fa0334e0a96fd210426ea30720e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4976, + "startColumn": 51, + "charOffset": 143319, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 4974, + "startColumn": 51, + "charOffset": 143167, + "charLength": 2, + "snippet": { + "text": "\tuint32_t familiar_key = PSTRG_FAMILIARS_RANGE_START;\n\tfor (const FamiliarEntry &entry : familiars) {\n\t\tstorageMap[++familiar_key] = (entry.lookType << 16);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e44aa843253c1bf6f0c4818408f77f5be26d69eeb08ccb74a5bec775c6929164" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4981, + "startColumn": 2, + "charOffset": 143391, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4979, + "startColumn": 2, + "charOffset": 143329, + "charLength": 3, + "snippet": { + "text": "\nvoid Player::addOutfit(uint16_t lookType, uint8_t addons) {\n\tfor (OutfitEntry &outfitEntry : outfits) {\n\t\tif (outfitEntry.lookType == lookType) {\n\t\t\toutfitEntry.addons |= addons;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d04ab07b6dfd5253e18ed58e1c079d384e6ec525aee3f5a29128216ef5d18f65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4987, + "startColumn": 10, + "charOffset": 143536, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 4985, + "startColumn": 10, + "charOffset": 143520, + "charLength": 12, + "snippet": { + "text": "\t\t}\n\t}\n\toutfits.emplace_back(lookType, addons);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c562844ddc952619ec86e040b8971c457e69d4e38084464503f9c8808bfa497" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4991, + "startColumn": 2, + "charOffset": 143619, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4989, + "startColumn": 2, + "charOffset": 143570, + "charLength": 3, + "snippet": { + "text": "\nbool Player::removeOutfit(uint16_t lookType) {\n\tfor (auto it = outfits.begin(), end = outfits.end(); it != end; ++it) {\n\t\tOutfitEntry &entry = *it;\n\t\tif (entry.lookType == lookType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4939daa51e0a980224a7530274b6891f0d141de9550d5ae3287960706832a5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4991, + "startColumn": 2, + "charOffset": 143619, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 4989, + "startColumn": 2, + "charOffset": 143570, + "charLength": 3, + "snippet": { + "text": "\nbool Player::removeOutfit(uint16_t lookType) {\n\tfor (auto it = outfits.begin(), end = outfits.end(); it != end; ++it) {\n\t\tOutfitEntry &entry = *it;\n\t\tif (entry.lookType == lookType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e2eda600a0715d9a550183c1f0a307a192130d4d5ad884eeef7169c7c8d4469" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4991, + "startColumn": 7, + "charOffset": 143624, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 4989, + "startColumn": 7, + "charOffset": 143570, + "charLength": 4, + "snippet": { + "text": "\nbool Player::removeOutfit(uint16_t lookType) {\n\tfor (auto it = outfits.begin(), end = outfits.end(); it != end; ++it) {\n\t\tOutfitEntry &entry = *it;\n\t\tif (entry.lookType == lookType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79cb7a081e5651b3adfb4b9ef27b4254da538cca97877e538aa4a164a69691ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4991, + "startColumn": 55, + "charOffset": 143672, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 4989, + "startColumn": 55, + "charOffset": 143570, + "charLength": 2, + "snippet": { + "text": "\nbool Player::removeOutfit(uint16_t lookType) {\n\tfor (auto it = outfits.begin(), end = outfits.end(); it != end; ++it) {\n\t\tOutfitEntry &entry = *it;\n\t\tif (entry.lookType == lookType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44edcfa8505ada17cb62c160dc0eacca7d15efb935e40683c7ded0f2acd98402" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 4994, + "startColumn": 12, + "charOffset": 143766, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 4992, + "startColumn": 12, + "charOffset": 143691, + "charLength": 5, + "snippet": { + "text": "\t\tOutfitEntry &entry = *it;\n\t\tif (entry.lookType == lookType) {\n\t\t\toutfits.erase(it);\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f2836bf19fffef26382a697ed9838b158d580212f1c7349dc1403e80ba2a343" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'removeOutfitAddon' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5001, + "startColumn": 32, + "charOffset": 143849, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 4999, + "startColumn": 32, + "charOffset": 143815, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Player::removeOutfitAddon(uint16_t lookType, uint8_t addons) {\n\tfor (OutfitEntry &outfitEntry : outfits) {\n\t\tif (outfitEntry.lookType == lookType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f53a06dd21f094f443a319bd19b049aef51974bc213f9db3c57afdbe05a7feac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5002, + "startColumn": 2, + "charOffset": 143887, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5000, + "startColumn": 2, + "charOffset": 143817, + "charLength": 3, + "snippet": { + "text": "\nbool Player::removeOutfitAddon(uint16_t lookType, uint8_t addons) {\n\tfor (OutfitEntry &outfitEntry : outfits) {\n\t\tif (outfitEntry.lookType == lookType) {\n\t\t\toutfitEntry.addons &= ~addons;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf4524c6d06ddd44e6dfa31b31506a3af9ea06b26d6037eefc59fbeb92d97ca5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5004, + "startColumn": 26, + "charOffset": 143997, + "charLength": 1, + "snippet": { + "text": "~" + } + }, + "contextRegion": { + "startLine": 5002, + "startColumn": 26, + "charOffset": 143886, + "charLength": 1, + "snippet": { + "text": "\tfor (OutfitEntry &outfitEntry : outfits) {\n\t\tif (outfitEntry.lookType == lookType) {\n\t\t\toutfitEntry.addons &= ~addons;\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24de64fda18f2a3baad5256f4ca9c1be257cb14b30911af8ed8b891c7de13d58" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5021, + "startColumn": 2, + "charOffset": 144256, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5019, + "startColumn": 2, + "charOffset": 144251, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const OutfitEntry &outfitEntry : outfits) {\n\t\tif (outfitEntry.lookType != outfit->lookType) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "900fcb62462082e0c3dd2ceb817c827308359ea3d7800f3b2fff96db3190eba3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5044, + "startColumn": 6, + "charOffset": 144696, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5042, + "startColumn": 6, + "charOffset": 144591, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto &familiar = Familiars::getInstance().getFamiliarByLookType(getVocationId(), lookType);\n\tif (!familiar) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cee2d15234bd33c66ee18382a05a5559e31311b95aa68ccf12c0c1fb16bff6df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5056, + "startColumn": 2, + "charOffset": 144838, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5054, + "startColumn": 2, + "charOffset": 144833, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const FamiliarEntry &familiarEntry : familiars) {\n\t\tif (familiarEntry.lookType == lookType) {\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2da93c1013cf06e1c249bcefb5dd9bd58e75043b7d77e1acac1126d07da90f16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-anyofallof", + "ruleIndex": 735, + "kind": "fail", + "level": "warning", + "message": { + "text": "replace loop by 'std::ranges::any_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5056, + "startColumn": 2, + "charOffset": 144838, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5054, + "startColumn": 2, + "charOffset": 144833, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const FamiliarEntry &familiarEntry : familiars) {\n\t\tif (familiarEntry.lookType == lookType) {\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0975ff3d4450fe5a08d489535fd14ba12369638f8dd07a00a6b78c43675ccd0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5065, + "startColumn": 2, + "charOffset": 145025, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5063, + "startColumn": 2, + "charOffset": 144977, + "charLength": 3, + "snippet": { + "text": "\nvoid Player::addFamiliar(uint16_t lookType) {\n\tfor (FamiliarEntry &familiarEntry : familiars) {\n\t\tif (familiarEntry.lookType == lookType) {\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff5e9d5e33aac22eee8db7bd7d1ea8b728eabe7bcbb1df28f39d0d2a8458eaaf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5070, + "startColumn": 12, + "charOffset": 145147, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 5068, + "startColumn": 12, + "charOffset": 145129, + "charLength": 12, + "snippet": { + "text": "\t\t}\n\t}\n\tfamiliars.emplace_back(lookType);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1bae6e9640e449027fa108c39487075844e28a980550fb52d9ddd3fab9576293" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5074, + "startColumn": 2, + "charOffset": 145224, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5072, + "startColumn": 2, + "charOffset": 145173, + "charLength": 3, + "snippet": { + "text": "\nbool Player::removeFamiliar(uint16_t lookType) {\n\tfor (auto it = familiars.begin(), end = familiars.end(); it != end; ++it) {\n\t\tFamiliarEntry &entry = *it;\n\t\tif (entry.lookType == lookType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "775352ffb3b5570f333d317cc8080fd4743f45e98f06e52fb35b2a75f6eb2875" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5074, + "startColumn": 2, + "charOffset": 145224, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5072, + "startColumn": 2, + "charOffset": 145173, + "charLength": 3, + "snippet": { + "text": "\nbool Player::removeFamiliar(uint16_t lookType) {\n\tfor (auto it = familiars.begin(), end = familiars.end(); it != end; ++it) {\n\t\tFamiliarEntry &entry = *it;\n\t\tif (entry.lookType == lookType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ff19d307b26917718ffe5407ed6d382d72df34ee79ec1ef80c6ed7b6bb8dc0e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5074, + "startColumn": 7, + "charOffset": 145229, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 5072, + "startColumn": 7, + "charOffset": 145173, + "charLength": 4, + "snippet": { + "text": "\nbool Player::removeFamiliar(uint16_t lookType) {\n\tfor (auto it = familiars.begin(), end = familiars.end(); it != end; ++it) {\n\t\tFamiliarEntry &entry = *it;\n\t\tif (entry.lookType == lookType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ab8dba4001350c2bfd54a95fadd46dc4be71089660147931cbe46380330b617" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5074, + "startColumn": 59, + "charOffset": 145281, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 5072, + "startColumn": 59, + "charOffset": 145173, + "charLength": 2, + "snippet": { + "text": "\nbool Player::removeFamiliar(uint16_t lookType) {\n\tfor (auto it = familiars.begin(), end = familiars.end(); it != end; ++it) {\n\t\tFamiliarEntry &entry = *it;\n\t\tif (entry.lookType == lookType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee8cdb2fede7576ec0bb3cb9f10f68e4b7eeb473437b42bd5fe01302d645bb62" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5077, + "startColumn": 14, + "charOffset": 145379, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 5075, + "startColumn": 14, + "charOffset": 145300, + "charLength": 5, + "snippet": { + "text": "\t\tFamiliarEntry &entry = *it;\n\t\tif (entry.lookType == lookType) {\n\t\t\tfamiliars.erase(it);\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "798b5dd1eb9aca7dbc9eec3f489362b0868fbb73124c4083c232993b7249585b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5093, + "startColumn": 2, + "charOffset": 145611, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5091, + "startColumn": 2, + "charOffset": 145606, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const FamiliarEntry &familiarEntry : familiars) {\n\t\tif (familiarEntry.lookType != familiar->lookType) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c3cf2dc04f0a285645fdb712badb6e3e7d270623ac65e5291c660ef1ae17250" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in conditional return statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5102, + "startColumn": 10, + "charOffset": 145794, + "charLength": 5, + "snippet": { + "text": "false" + } + }, + "contextRegion": { + "startLine": 5100, + "startColumn": 10, + "charOffset": 145756, + "charLength": 5, + "snippet": { + "text": "\n\tif (!familiar->unlocked) {\n\t\treturn false;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9c24b267fc5ad48d722feab47eeae97b4e5b10f1a4b777011fd6251b160e45d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5124, + "startColumn": 6, + "charOffset": 146162, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5122, + "startColumn": 6, + "charOffset": 146086, + "charLength": 1, + "snippet": { + "text": "\nSkulls_t Player::getSkullClient(std::shared_ptr creature) {\n\tif (!creature || g_game().getWorldType() != WORLD_TYPE_PVP) {\n\t\treturn SKULL_NONE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed57ae08380d0f7dc8b6ebfead8888eb566b28935a58b98c13bde6f561d5ad0f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5131, + "startColumn": 4, + "charOffset": 146386, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5129, + "startColumn": 4, + "charOffset": 146302, + "charLength": 3, + "snippet": { + "text": "\tif (player && player->getSkull() == SKULL_NONE) {\n\t\tif (player.get() == this) {\n\t\t\tfor (const auto &kill : unjustifiedKills) {\n\t\t\t\tif (kill.unavenged && (time(nullptr) - kill.time) < g_configManager().getNumber(ORANGE_SKULL_DURATION, __FUNCTION__) * 24 * 60 * 60) {\n\t\t\t\t\treturn SKULL_ORANGE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7411e9b2d2db04d37584046840e910307d7dad8ab59f59c62b1adf4a2c6bea71" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5132, + "startColumn": 28, + "charOffset": 146457, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 5130, + "startColumn": 28, + "charOffset": 146353, + "charLength": 4, + "snippet": { + "text": "\t\tif (player.get() == this) {\n\t\t\tfor (const auto &kill : unjustifiedKills) {\n\t\t\t\tif (kill.unavenged && (time(nullptr) - kill.time) < g_configManager().getNumber(ORANGE_SKULL_DURATION, __FUNCTION__) * 24 * 60 * 60) {\n\t\t\t\t\treturn SKULL_ORANGE;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32e2fde80ce7e7cce4c75e29eea964642c2e313641996b964c8492c0c7cc3140" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'time_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5132, + "startColumn": 57, + "charOffset": 146486, + "charLength": 15, + "snippet": { + "text": "g_configManager" + } + }, + "contextRegion": { + "startLine": 5130, + "startColumn": 57, + "charOffset": 146353, + "charLength": 15, + "snippet": { + "text": "\t\tif (player.get() == this) {\n\t\t\tfor (const auto &kill : unjustifiedKills) {\n\t\t\t\tif (kill.unavenged && (time(nullptr) - kill.time) < g_configManager().getNumber(ORANGE_SKULL_DURATION, __FUNCTION__) * 24 * 60 * 60) {\n\t\t\t\t\treturn SKULL_ORANGE;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75f728ac44e0f054cf27db207251e3d09e9f71b2aaa97a162c5abfd509840650" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5132, + "startColumn": 124, + "charOffset": 146553, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 5130, + "startColumn": 124, + "charOffset": 146353, + "charLength": 2, + "snippet": { + "text": "\t\tif (player.get() == this) {\n\t\t\tfor (const auto &kill : unjustifiedKills) {\n\t\t\t\tif (kill.unavenged && (time(nullptr) - kill.time) < g_configManager().getNumber(ORANGE_SKULL_DURATION, __FUNCTION__) * 24 * 60 * 60) {\n\t\t\t\t\treturn SKULL_ORANGE;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3e1be43a6a03e446942cb9e5031d77a100c7a267e8f540fd6b3895203cf44cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5132, + "startColumn": 129, + "charOffset": 146558, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 5130, + "startColumn": 129, + "charOffset": 146353, + "charLength": 2, + "snippet": { + "text": "\t\tif (player.get() == this) {\n\t\t\tfor (const auto &kill : unjustifiedKills) {\n\t\t\t\tif (kill.unavenged && (time(nullptr) - kill.time) < g_configManager().getNumber(ORANGE_SKULL_DURATION, __FUNCTION__) * 24 * 60 * 60) {\n\t\t\t\t\treturn SKULL_ORANGE;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e404ccea733e79eed3f10d47483e2ea91839838f7659acbf4cd567aee5e61ef6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5132, + "startColumn": 134, + "charOffset": 146563, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 5130, + "startColumn": 134, + "charOffset": 146353, + "charLength": 2, + "snippet": { + "text": "\t\tif (player.get() == this) {\n\t\t\tfor (const auto &kill : unjustifiedKills) {\n\t\t\t\tif (kill.unavenged && (time(nullptr) - kill.time) < g_configManager().getNumber(ORANGE_SKULL_DURATION, __FUNCTION__) * 24 * 60 * 60) {\n\t\t\t\t\treturn SKULL_ORANGE;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d272f304a9ee1a3e8f9fa4cc7b01dd092a60fdb893e05948414d9df1f587e50a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5153, + "startColumn": 48, + "charOffset": 146922, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 5151, + "startColumn": 48, + "charOffset": 146872, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Player::hasKilled(std::shared_ptr player) const {\n\tfor (const auto &kill : unjustifiedKills) {\n\t\tif (kill.target == player->getGUID() && (time(nullptr) - kill.time) < g_configManager().getNumber(ORANGE_SKULL_DURATION, __FUNCTION__) * 24 * 60 * 60 && kill.unavenged) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "221d727a597c77a61076b9cd49f5ac41de1f280677a90c40264f7f2d6bb26599" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5154, + "startColumn": 2, + "charOffset": 146939, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5152, + "startColumn": 2, + "charOffset": 146874, + "charLength": 3, + "snippet": { + "text": "\nbool Player::hasKilled(std::shared_ptr player) const {\n\tfor (const auto &kill : unjustifiedKills) {\n\t\tif (kill.target == player->getGUID() && (time(nullptr) - kill.time) < g_configManager().getNumber(ORANGE_SKULL_DURATION, __FUNCTION__) * 24 * 60 * 60 && kill.unavenged) {\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ee7b5fa43b6401f1d24b154933d3bd764d048b7de3c80df8b78001fa45eb490" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-anyofallof", + "ruleIndex": 735, + "kind": "fail", + "level": "warning", + "message": { + "text": "replace loop by 'std::ranges::any_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5154, + "startColumn": 2, + "charOffset": 146939, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5152, + "startColumn": 2, + "charOffset": 146874, + "charLength": 3, + "snippet": { + "text": "\nbool Player::hasKilled(std::shared_ptr player) const {\n\tfor (const auto &kill : unjustifiedKills) {\n\t\tif (kill.target == player->getGUID() && (time(nullptr) - kill.time) < g_configManager().getNumber(ORANGE_SKULL_DURATION, __FUNCTION__) * 24 * 60 * 60 && kill.unavenged) {\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "067b9d61e37fea114c545445774c96a3898c983198ed0da73ff91a7260078aca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5155, + "startColumn": 44, + "charOffset": 147026, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 5153, + "startColumn": 44, + "charOffset": 146875, + "charLength": 4, + "snippet": { + "text": "bool Player::hasKilled(std::shared_ptr player) const {\n\tfor (const auto &kill : unjustifiedKills) {\n\t\tif (kill.target == player->getGUID() && (time(nullptr) - kill.time) < g_configManager().getNumber(ORANGE_SKULL_DURATION, __FUNCTION__) * 24 * 60 * 60 && kill.unavenged) {\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc98954a30f143627691719714f6d6f5297f8931cad16f667de3797ae8f29200" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'time_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5155, + "startColumn": 73, + "charOffset": 147055, + "charLength": 15, + "snippet": { + "text": "g_configManager" + } + }, + "contextRegion": { + "startLine": 5153, + "startColumn": 73, + "charOffset": 146875, + "charLength": 15, + "snippet": { + "text": "bool Player::hasKilled(std::shared_ptr player) const {\n\tfor (const auto &kill : unjustifiedKills) {\n\t\tif (kill.target == player->getGUID() && (time(nullptr) - kill.time) < g_configManager().getNumber(ORANGE_SKULL_DURATION, __FUNCTION__) * 24 * 60 * 60 && kill.unavenged) {\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bc598a09a3b35d8c3b5b1f005dee1ae6d8749b7b58c149abb719f119007a278" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5155, + "startColumn": 140, + "charOffset": 147122, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 5153, + "startColumn": 140, + "charOffset": 146875, + "charLength": 2, + "snippet": { + "text": "bool Player::hasKilled(std::shared_ptr player) const {\n\tfor (const auto &kill : unjustifiedKills) {\n\t\tif (kill.target == player->getGUID() && (time(nullptr) - kill.time) < g_configManager().getNumber(ORANGE_SKULL_DURATION, __FUNCTION__) * 24 * 60 * 60 && kill.unavenged) {\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b34f1f1d1664c199e212d3ef6bfc0d940798b65e4e025ff4a188386ce034ef74" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5155, + "startColumn": 145, + "charOffset": 147127, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 5153, + "startColumn": 145, + "charOffset": 146875, + "charLength": 2, + "snippet": { + "text": "bool Player::hasKilled(std::shared_ptr player) const {\n\tfor (const auto &kill : unjustifiedKills) {\n\t\tif (kill.target == player->getGUID() && (time(nullptr) - kill.time) < g_configManager().getNumber(ORANGE_SKULL_DURATION, __FUNCTION__) * 24 * 60 * 60 && kill.unavenged) {\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c154cca358421d4d1d696d310ed20e89c0b104acf5aeb19f67aeec0ef5fce8b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5155, + "startColumn": 150, + "charOffset": 147132, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 5153, + "startColumn": 150, + "charOffset": 146875, + "charLength": 2, + "snippet": { + "text": "bool Player::hasKilled(std::shared_ptr player) const {\n\tfor (const auto &kill : unjustifiedKills) {\n\t\tif (kill.target == player->getGUID() && (time(nullptr) - kill.time) < g_configManager().getNumber(ORANGE_SKULL_DURATION, __FUNCTION__) * 24 * 60 * 60 && kill.unavenged) {\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c14b2677b5a139f36c04d8bc39de98b0fdf8d10eb1661ef8b069d60333ef1ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5163, + "startColumn": 50, + "charOffset": 147247, + "charLength": 8, + "snippet": { + "text": "attacked" + } + }, + "contextRegion": { + "startLine": 5161, + "startColumn": 50, + "charOffset": 147195, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Player::hasAttacked(std::shared_ptr attacked) const {\n\tif (hasFlag(PlayerFlags_t::NotGainInFight) || !attacked) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "452fa0665bee12dfa496a076c1132163fd51fdb8a7adf814a322346713b42674" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5164, + "startColumn": 48, + "charOffset": 147312, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5162, + "startColumn": 48, + "charOffset": 147197, + "charLength": 1, + "snippet": { + "text": "\nbool Player::hasAttacked(std::shared_ptr attacked) const {\n\tif (hasFlag(PlayerFlags_t::NotGainInFight) || !attacked) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32ff6e6c844a32a6c8b5c80a44356c7e1aed921db7ce6ca32d1804b537961e9a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5171, + "startColumn": 50, + "charOffset": 147443, + "charLength": 8, + "snippet": { + "text": "attacked" + } + }, + "contextRegion": { + "startLine": 5169, + "startColumn": 50, + "charOffset": 147391, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Player::addAttacked(std::shared_ptr attacked) {\n\tif (hasFlag(PlayerFlags_t::NotGainInFight) || !attacked || attacked == getPlayer()) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4c0e57ea7aee94f8fa329032236dfb51d06bb6f14fea096bc5273cbe94fbc97" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5172, + "startColumn": 48, + "charOffset": 147502, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5170, + "startColumn": 48, + "charOffset": 147393, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::addAttacked(std::shared_ptr attacked) {\n\tif (hasFlag(PlayerFlags_t::NotGainInFight) || !attacked || attacked == getPlayer()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28319948e9d8cd81bb801abfbc019c0d6725a7642aac497b1823cbc6e4c7a9d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5176, + "startColumn": 14, + "charOffset": 147569, + "charLength": 7, + "snippet": { + "text": "emplace" + } + }, + "contextRegion": { + "startLine": 5174, + "startColumn": 14, + "charOffset": 147552, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tattackedSet.emplace(attacked->guid);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c697fc1b876291e5a64ff13815a95c59afb3eabaddc1eae21e3746ae27852644" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5179, + "startColumn": 53, + "charOffset": 147649, + "charLength": 8, + "snippet": { + "text": "attacked" + } + }, + "contextRegion": { + "startLine": 5177, + "startColumn": 53, + "charOffset": 147594, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Player::removeAttacked(std::shared_ptr attacked) {\n\tif (!attacked || attacked == getPlayer()) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7bddecb4c31f87ee2a75d4eedba0a364be214e56b66fc3d52fd997e611b40778" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5180, + "startColumn": 6, + "charOffset": 147666, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5178, + "startColumn": 6, + "charOffset": 147596, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::removeAttacked(std::shared_ptr attacked) {\n\tif (!attacked || attacked == getPlayer()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8317ec4a6760dc1d391f546d64916909e323c3992de7e2f4194160aa4c55a8b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5184, + "startColumn": 14, + "charOffset": 147733, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 5182, + "startColumn": 14, + "charOffset": 147716, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tattackedSet.erase(attacked->guid);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b099e5dbc5a14eacf8b04fa2cdd24c97f39947ea972a02c22ae4fb29dc826342" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5191, + "startColumn": 57, + "charOffset": 147871, + "charLength": 8, + "snippet": { + "text": "attacked" + } + }, + "contextRegion": { + "startLine": 5189, + "startColumn": 57, + "charOffset": 147812, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Player::addUnjustifiedDead(std::shared_ptr attacked) {\n\tif (hasFlag(PlayerFlags_t::NotGainInFight) || attacked == getPlayer() || g_game().getWorldType() == WORLD_TYPE_PVP_ENFORCED) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a2f2e008a45fe1441f60468c91fd18c8519347f574b484077a43e6424a0c7ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5198, + "startColumn": 19, + "charOffset": 148158, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 5196, + "startColumn": 19, + "charOffset": 148025, + "charLength": 12, + "snippet": { + "text": "\tsendTextMessage(MESSAGE_EVENT_ADVANCE, \"Warning! The murder of \" + attacked->getName() + \" was not justified.\");\n\n\tunjustifiedKills.emplace_back(attacked->getGUID(), time(nullptr), true);\n\n\tuint8_t dayKills = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6d220ee7e9e96d60462d83454f923924b6859bf6b376893f82efc46174b69aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5198, + "startColumn": 53, + "charOffset": 148192, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 5196, + "startColumn": 53, + "charOffset": 148025, + "charLength": 4, + "snippet": { + "text": "\tsendTextMessage(MESSAGE_EVENT_ADVANCE, \"Warning! The murder of \" + attacked->getName() + \" was not justified.\");\n\n\tunjustifiedKills.emplace_back(attacked->getGUID(), time(nullptr), true);\n\n\tuint8_t dayKills = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4898aec2ee9e09f72cbb03f9d2fda30e7d0ca26f519cc7a3f928cf58af79b5b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5204, + "startColumn": 2, + "charOffset": 148289, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5202, + "startColumn": 2, + "charOffset": 148262, + "charLength": 3, + "snippet": { + "text": "\tuint8_t monthKills = 0;\n\n\tfor (const auto &kill : unjustifiedKills) {\n\t\tconst auto diff = time(nullptr) - kill.time;\n\t\tif (diff <= 4 * 60 * 60) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa853f5037eb9a47437c54002e1a0e9e54927ce7d331ffefacce889b6a095fac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5205, + "startColumn": 21, + "charOffset": 148353, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 5203, + "startColumn": 21, + "charOffset": 148287, + "charLength": 4, + "snippet": { + "text": "\n\tfor (const auto &kill : unjustifiedKills) {\n\t\tconst auto diff = time(nullptr) - kill.time;\n\t\tif (diff <= 4 * 60 * 60) {\n\t\t\tdayKills += 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a33292149a21b4480e47fcd08e2a6009ba3a2a203549da6b77d7c5cdc0c74d3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'time_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5206, + "startColumn": 15, + "charOffset": 148394, + "charLength": 1, + "snippet": { + "text": "4" + } + }, + "contextRegion": { + "startLine": 5204, + "startColumn": 15, + "charOffset": 148288, + "charLength": 1, + "snippet": { + "text": "\tfor (const auto &kill : unjustifiedKills) {\n\t\tconst auto diff = time(nullptr) - kill.time;\n\t\tif (diff <= 4 * 60 * 60) {\n\t\t\tdayKills += 1;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7158733296f047fe778e73532dd0b2235c389f98a6db3eeb9bbca1d1a6c7b29" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5206, + "startColumn": 19, + "charOffset": 148398, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 5204, + "startColumn": 19, + "charOffset": 148288, + "charLength": 2, + "snippet": { + "text": "\tfor (const auto &kill : unjustifiedKills) {\n\t\tconst auto diff = time(nullptr) - kill.time;\n\t\tif (diff <= 4 * 60 * 60) {\n\t\t\tdayKills += 1;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1d35e54ec6396c28ffa2f3eba13354a7ea1f419f4cdffae9943803b9170301a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5206, + "startColumn": 24, + "charOffset": 148403, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 5204, + "startColumn": 24, + "charOffset": 148288, + "charLength": 2, + "snippet": { + "text": "\tfor (const auto &kill : unjustifiedKills) {\n\t\tconst auto diff = time(nullptr) - kill.time;\n\t\tif (diff <= 4 * 60 * 60) {\n\t\t\tdayKills += 1;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3d235e9e94f86c582e0f9bb6e3239b78d1bf98f38e3f3103515c4f37904a1b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'time_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5209, + "startColumn": 15, + "charOffset": 148445, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 5207, + "startColumn": 15, + "charOffset": 148409, + "charLength": 1, + "snippet": { + "text": "\t\t\tdayKills += 1;\n\t\t}\n\t\tif (diff <= 7 * 24 * 60 * 60) {\n\t\t\tweekKills += 1;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d9d2ae9e7cdcf700aef740dd253ff457a0a833702fff753fc87d9c2006fd1fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5209, + "startColumn": 15, + "charOffset": 148445, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 5207, + "startColumn": 15, + "charOffset": 148409, + "charLength": 1, + "snippet": { + "text": "\t\t\tdayKills += 1;\n\t\t}\n\t\tif (diff <= 7 * 24 * 60 * 60) {\n\t\t\tweekKills += 1;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3482c224c93934efae19d95b6979d3e8e6ff15a6dba857d91eb17f31cd24e3df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5209, + "startColumn": 19, + "charOffset": 148449, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 5207, + "startColumn": 19, + "charOffset": 148409, + "charLength": 2, + "snippet": { + "text": "\t\t\tdayKills += 1;\n\t\t}\n\t\tif (diff <= 7 * 24 * 60 * 60) {\n\t\t\tweekKills += 1;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d544f69aa9ba7e52683936328d28358980672f2d91343b0dbd7e0a7fd040a2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5209, + "startColumn": 24, + "charOffset": 148454, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 5207, + "startColumn": 24, + "charOffset": 148409, + "charLength": 2, + "snippet": { + "text": "\t\t\tdayKills += 1;\n\t\t}\n\t\tif (diff <= 7 * 24 * 60 * 60) {\n\t\t\tweekKills += 1;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e65f5b716ba24819242513664539175d2f0ebd1db4454097ccd0d8a4625bfa96" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5209, + "startColumn": 29, + "charOffset": 148459, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 5207, + "startColumn": 29, + "charOffset": 148409, + "charLength": 2, + "snippet": { + "text": "\t\t\tdayKills += 1;\n\t\t}\n\t\tif (diff <= 7 * 24 * 60 * 60) {\n\t\t\tweekKills += 1;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2eb44c45f386cd08ff48abf53be15cda5850d80419f66f72b8452dc77a53365" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'time_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5212, + "startColumn": 15, + "charOffset": 148502, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 5210, + "startColumn": 15, + "charOffset": 148465, + "charLength": 2, + "snippet": { + "text": "\t\t\tweekKills += 1;\n\t\t}\n\t\tif (diff <= 30 * 24 * 60 * 60) {\n\t\t\tmonthKills += 1;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4dc77e2914475faaa2be5de6945b5b177bb186d7e6eec8ecd7ab6a44f8a0b12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5212, + "startColumn": 15, + "charOffset": 148502, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 5210, + "startColumn": 15, + "charOffset": 148465, + "charLength": 2, + "snippet": { + "text": "\t\t\tweekKills += 1;\n\t\t}\n\t\tif (diff <= 30 * 24 * 60 * 60) {\n\t\t\tmonthKills += 1;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4016c9c951e21266b5360742e7e757ed6372be2daa1b032d2dd177bf5a72c941" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5212, + "startColumn": 20, + "charOffset": 148507, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 5210, + "startColumn": 20, + "charOffset": 148465, + "charLength": 2, + "snippet": { + "text": "\t\t\tweekKills += 1;\n\t\t}\n\t\tif (diff <= 30 * 24 * 60 * 60) {\n\t\t\tmonthKills += 1;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3027e288a3c325a5a60a1d01fa836828d60320ff55841817f7a7da2e889e6ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5212, + "startColumn": 25, + "charOffset": 148512, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 5210, + "startColumn": 25, + "charOffset": 148465, + "charLength": 2, + "snippet": { + "text": "\t\t\tweekKills += 1;\n\t\t}\n\t\tif (diff <= 30 * 24 * 60 * 60) {\n\t\t\tmonthKills += 1;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "430305a614fc63dfecc767449cfe562f0a2cbe29fd0840f6a032694b22fdda48" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5212, + "startColumn": 30, + "charOffset": 148517, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 5210, + "startColumn": 30, + "charOffset": 148465, + "charLength": 2, + "snippet": { + "text": "\t\t\tweekKills += 1;\n\t\t}\n\t\tif (diff <= 30 * 24 * 60 * 60) {\n\t\t\tmonthKills += 1;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3016b921f9d6811f41e653d326a886223139d774d09215bc5ea26f4fe14846f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5218, + "startColumn": 3, + "charOffset": 148587, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 5216, + "startColumn": 3, + "charOffset": 148550, + "charLength": 2, + "snippet": { + "text": "\n\tif (getSkull() != SKULL_BLACK) {\n\t\tif (dayKills >= 2 * g_configManager().getNumber(DAY_KILLS_TO_RED, __FUNCTION__) || weekKills >= 2 * g_configManager().getNumber(WEEK_KILLS_TO_RED, __FUNCTION__) || monthKills >= 2 * g_configManager().getNumber(MONTH_KILLS_TO_RED, __FUNCTION__)) {\n\t\t\tsetSkull(SKULL_BLACK);\n\t\t\t// start black skull time" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a44c83de93fb81f00d04d9674ae20b423eed3269d1f181909108dd3cc545cb7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5221, + "startColumn": 105, + "charOffset": 148993, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 5219, + "startColumn": 105, + "charOffset": 148834, + "charLength": 2, + "snippet": { + "text": "\t\t\tsetSkull(SKULL_BLACK);\n\t\t\t// start black skull time\n\t\t\tskullTicks = static_cast(g_configManager().getNumber(BLACK_SKULL_DURATION, __FUNCTION__)) * 24 * 60 * 60;\n\t\t} else if (dayKills >= g_configManager().getNumber(DAY_KILLS_TO_RED, __FUNCTION__) || weekKills >= g_configManager().getNumber(WEEK_KILLS_TO_RED, __FUNCTION__) || monthKills >= g_configManager().getNumber(MONTH_KILLS_TO_RED, __FUNCTION__)) {\n\t\t\tsetSkull(SKULL_RED);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d89a0c67814c29eed4562893022e0bf318c93d653a437131ebfffb444df7008" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5221, + "startColumn": 110, + "charOffset": 148998, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 5219, + "startColumn": 110, + "charOffset": 148834, + "charLength": 2, + "snippet": { + "text": "\t\t\tsetSkull(SKULL_BLACK);\n\t\t\t// start black skull time\n\t\t\tskullTicks = static_cast(g_configManager().getNumber(BLACK_SKULL_DURATION, __FUNCTION__)) * 24 * 60 * 60;\n\t\t} else if (dayKills >= g_configManager().getNumber(DAY_KILLS_TO_RED, __FUNCTION__) || weekKills >= g_configManager().getNumber(WEEK_KILLS_TO_RED, __FUNCTION__) || monthKills >= g_configManager().getNumber(MONTH_KILLS_TO_RED, __FUNCTION__)) {\n\t\t\tsetSkull(SKULL_RED);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52effb1e9f4191ae79d729c9c26a747c39a83d568776e5a7a9d843d842cee680" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5221, + "startColumn": 115, + "charOffset": 149003, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 5219, + "startColumn": 115, + "charOffset": 148834, + "charLength": 2, + "snippet": { + "text": "\t\t\tsetSkull(SKULL_BLACK);\n\t\t\t// start black skull time\n\t\t\tskullTicks = static_cast(g_configManager().getNumber(BLACK_SKULL_DURATION, __FUNCTION__)) * 24 * 60 * 60;\n\t\t} else if (dayKills >= g_configManager().getNumber(DAY_KILLS_TO_RED, __FUNCTION__) || weekKills >= g_configManager().getNumber(WEEK_KILLS_TO_RED, __FUNCTION__) || monthKills >= g_configManager().getNumber(MONTH_KILLS_TO_RED, __FUNCTION__)) {\n\t\t\tsetSkull(SKULL_RED);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "368f5c36e604f4df720291d7c457fc67ed47e05cb293db8fde75e6ab7556c93e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5225, + "startColumn": 103, + "charOffset": 149404, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 5223, + "startColumn": 103, + "charOffset": 149251, + "charLength": 2, + "snippet": { + "text": "\t\t\tsetSkull(SKULL_RED);\n\t\t\t// reset red skull time\n\t\t\tskullTicks = static_cast(g_configManager().getNumber(RED_SKULL_DURATION, __FUNCTION__)) * 24 * 60 * 60;\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6be05dfc9cd270cbf1b476f409a3073006b7820bad78a6632967109c9dbc0ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5225, + "startColumn": 108, + "charOffset": 149409, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 5223, + "startColumn": 108, + "charOffset": 149251, + "charLength": 2, + "snippet": { + "text": "\t\t\tsetSkull(SKULL_RED);\n\t\t\t// reset red skull time\n\t\t\tskullTicks = static_cast(g_configManager().getNumber(RED_SKULL_DURATION, __FUNCTION__)) * 24 * 60 * 60;\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99515fc32bc8e724ca5574d312f1bd507c1c102c01fefc4d9fe2868857d29616" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5225, + "startColumn": 113, + "charOffset": 149414, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 5223, + "startColumn": 113, + "charOffset": 149251, + "charLength": 2, + "snippet": { + "text": "\t\t\tsetSkull(SKULL_RED);\n\t\t\t// reset red skull time\n\t\t\tskullTicks = static_cast(g_configManager().getNumber(RED_SKULL_DURATION, __FUNCTION__)) * 24 * 60 * 60;\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58412d4c58ab2f7ac7221ebd2a621c208aa765f4b0d3ccc7b2d95130664855df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5252, + "startColumn": 107, + "charOffset": 150134, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 5250, + "startColumn": 107, + "charOffset": 149960, + "charLength": 1, + "snippet": { + "text": "double Player::getLostPercent() const {\n\tint32_t blessingCount = 0;\n\tuint8_t maxBlessing = (operatingSystem == CLIENTOS_NEW_WINDOWS || operatingSystem == CLIENTOS_NEW_MAC) ? 8 : 6;\n\tfor (int i = 2; i <= maxBlessing; i++) {\n\t\tif (hasBlessing(i)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f743c2553faf825a9d85c54e532e9b5634c4fb0e0cf4e932b9daded628fa4ccd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5252, + "startColumn": 111, + "charOffset": 150138, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 5250, + "startColumn": 111, + "charOffset": 149960, + "charLength": 1, + "snippet": { + "text": "double Player::getLostPercent() const {\n\tint32_t blessingCount = 0;\n\tuint8_t maxBlessing = (operatingSystem == CLIENTOS_NEW_WINDOWS || operatingSystem == CLIENTOS_NEW_MAC) ? 8 : 6;\n\tfor (int i = 2; i <= maxBlessing; i++) {\n\t\tif (hasBlessing(i)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12b38584513be1e97f02d91fc15f7b4d3ab9b8b7a9d8b5a0d08b864459387517" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5253, + "startColumn": 2, + "charOffset": 150142, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5251, + "startColumn": 2, + "charOffset": 150000, + "charLength": 3, + "snippet": { + "text": "\tint32_t blessingCount = 0;\n\tuint8_t maxBlessing = (operatingSystem == CLIENTOS_NEW_WINDOWS || operatingSystem == CLIENTOS_NEW_MAC) ? 8 : 6;\n\tfor (int i = 2; i <= maxBlessing; i++) {\n\t\tif (hasBlessing(i)) {\n\t\t\tblessingCount++;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9421e94c8620e7f587ec73eec1fd4b78c4e9d48dc4828d0732dc0183dd7341f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'maxBlessing' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5253, + "startColumn": 18, + "charOffset": 150158, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 5251, + "startColumn": 18, + "charOffset": 150000, + "charLength": 1, + "snippet": { + "text": "\tint32_t blessingCount = 0;\n\tuint8_t maxBlessing = (operatingSystem == CLIENTOS_NEW_WINDOWS || operatingSystem == CLIENTOS_NEW_MAC) ? 8 : 6;\n\tfor (int i = 2; i <= maxBlessing; i++) {\n\t\tif (hasBlessing(i)) {\n\t\t\tblessingCount++;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ee0ce3b672049a2a659f18c61b7a1b2f6cbbe614ded69ea9e6606e36cf9ec1c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5254, + "startColumn": 19, + "charOffset": 150201, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 5252, + "startColumn": 19, + "charOffset": 150028, + "charLength": 1, + "snippet": { + "text": "\tuint8_t maxBlessing = (operatingSystem == CLIENTOS_NEW_WINDOWS || operatingSystem == CLIENTOS_NEW_MAC) ? 8 : 6;\n\tfor (int i = 2; i <= maxBlessing; i++) {\n\t\tif (hasBlessing(i)) {\n\t\t\tblessingCount++;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f0f80f2456a8bbad0e90d9edb2c0d3135f7e55fe386d63c1a60145e44359dd9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5266, + "startColumn": 10, + "charOffset": 150456, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 5264, + "startColumn": 10, + "charOffset": 150409, + "charLength": 3, + "snippet": { + "text": "\n\t\tdeathLosePercent -= blessingCount;\n\t\treturn std::max(0, deathLosePercent) / 100.;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bd95303c51583b4e2df91dd2884b1a960e32189083d8fa103de7c58f4a66462" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'lossPercent' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5269, + "startColumn": 9, + "charOffset": 150515, + "charLength": 11, + "snippet": { + "text": "lossPercent" + } + }, + "contextRegion": { + "startLine": 5267, + "startColumn": 9, + "charOffset": 150503, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\tdouble lossPercent;\n\tif (level >= 24) {\n\t\tdouble tmpLevel = level + (levelPercent / 100.);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0edc7b30f24464eb079b6f64785e71e0ba8673227103525e45f6229f313bfdee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5270, + "startColumn": 15, + "charOffset": 150542, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 5268, + "startColumn": 15, + "charOffset": 150506, + "charLength": 2, + "snippet": { + "text": "\n\tdouble lossPercent;\n\tif (level >= 24) {\n\t\tdouble tmpLevel = level + (levelPercent / 100.);\n\t\tlossPercent = ((tmpLevel + 50) * 50 * ((tmpLevel * tmpLevel) - (5 * tmpLevel) + 8)) / experience;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f21b69f0e30601ee1f22798631edd8c65cfc76440fb227984e687570f9a11de9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5271, + "startColumn": 21, + "charOffset": 150568, + "charLength": 5, + "snippet": { + "text": "level" + } + }, + "contextRegion": { + "startLine": 5269, + "startColumn": 21, + "charOffset": 150507, + "charLength": 5, + "snippet": { + "text": "\tdouble lossPercent;\n\tif (level >= 24) {\n\t\tdouble tmpLevel = level + (levelPercent / 100.);\n\t\tlossPercent = ((tmpLevel + 50) * 50 * ((tmpLevel * tmpLevel) - (5 * tmpLevel) + 8)) / experience;\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a88cc18a8ae2e30821c229ab4f5fcbb834926f6532973cf4006c3c08f2919b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5271, + "startColumn": 30, + "charOffset": 150577, + "charLength": 12, + "snippet": { + "text": "levelPercent" + } + }, + "contextRegion": { + "startLine": 5269, + "startColumn": 30, + "charOffset": 150507, + "charLength": 12, + "snippet": { + "text": "\tdouble lossPercent;\n\tif (level >= 24) {\n\t\tdouble tmpLevel = level + (levelPercent / 100.);\n\t\tlossPercent = ((tmpLevel + 50) * 50 * ((tmpLevel * tmpLevel) - (5 * tmpLevel) + 8)) / experience;\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd2a10f91b3d5981bd542412380cad6a838249e5bb4bba2660a8900eb73598b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5272, + "startColumn": 30, + "charOffset": 150628, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 5270, + "startColumn": 30, + "charOffset": 150528, + "charLength": 2, + "snippet": { + "text": "\tif (level >= 24) {\n\t\tdouble tmpLevel = level + (levelPercent / 100.);\n\t\tlossPercent = ((tmpLevel + 50) * 50 * ((tmpLevel * tmpLevel) - (5 * tmpLevel) + 8)) / experience;\n\t} else {\n\t\tlossPercent = 5;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7de3137f077f068ade5fb9d659576fc7fbfd0a26ec55ddd215d2fc8b4ed5b051" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5272, + "startColumn": 30, + "charOffset": 150628, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 5270, + "startColumn": 30, + "charOffset": 150528, + "charLength": 2, + "snippet": { + "text": "\tif (level >= 24) {\n\t\tdouble tmpLevel = level + (levelPercent / 100.);\n\t\tlossPercent = ((tmpLevel + 50) * 50 * ((tmpLevel * tmpLevel) - (5 * tmpLevel) + 8)) / experience;\n\t} else {\n\t\tlossPercent = 5;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5054b9c625de91eb54e92794dfe1b64d8266f8863255b7dff5532328ec8707ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5272, + "startColumn": 36, + "charOffset": 150634, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 5270, + "startColumn": 36, + "charOffset": 150528, + "charLength": 2, + "snippet": { + "text": "\tif (level >= 24) {\n\t\tdouble tmpLevel = level + (levelPercent / 100.);\n\t\tlossPercent = ((tmpLevel + 50) * 50 * ((tmpLevel * tmpLevel) - (5 * tmpLevel) + 8)) / experience;\n\t} else {\n\t\tlossPercent = 5;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb83ad5019c37c5c7b56af5c3bbacbe683aa7e91787a004464e748aa4c273232" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5272, + "startColumn": 36, + "charOffset": 150634, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 5270, + "startColumn": 36, + "charOffset": 150528, + "charLength": 2, + "snippet": { + "text": "\tif (level >= 24) {\n\t\tdouble tmpLevel = level + (levelPercent / 100.);\n\t\tlossPercent = ((tmpLevel + 50) * 50 * ((tmpLevel * tmpLevel) - (5 * tmpLevel) + 8)) / experience;\n\t} else {\n\t\tlossPercent = 5;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9910c9e3b70f37c390bb78744ecd127efde4e5882c68c0f90c96b934062f0e65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5272, + "startColumn": 67, + "charOffset": 150665, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 5270, + "startColumn": 67, + "charOffset": 150528, + "charLength": 1, + "snippet": { + "text": "\tif (level >= 24) {\n\t\tdouble tmpLevel = level + (levelPercent / 100.);\n\t\tlossPercent = ((tmpLevel + 50) * 50 * ((tmpLevel * tmpLevel) - (5 * tmpLevel) + 8)) / experience;\n\t} else {\n\t\tlossPercent = 5;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6030feb9202fe0bd1758b6233c7f16c127be76f9084e2aadb539989363fae92c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5272, + "startColumn": 67, + "charOffset": 150665, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 5270, + "startColumn": 67, + "charOffset": 150528, + "charLength": 1, + "snippet": { + "text": "\tif (level >= 24) {\n\t\tdouble tmpLevel = level + (levelPercent / 100.);\n\t\tlossPercent = ((tmpLevel + 50) * 50 * ((tmpLevel * tmpLevel) - (5 * tmpLevel) + 8)) / experience;\n\t} else {\n\t\tlossPercent = 5;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb1afc0b6a67070908c0d8a69dac09fe64f4b24737328ac887d918276bc734ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5272, + "startColumn": 83, + "charOffset": 150681, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 5270, + "startColumn": 83, + "charOffset": 150528, + "charLength": 1, + "snippet": { + "text": "\tif (level >= 24) {\n\t\tdouble tmpLevel = level + (levelPercent / 100.);\n\t\tlossPercent = ((tmpLevel + 50) * 50 * ((tmpLevel * tmpLevel) - (5 * tmpLevel) + 8)) / experience;\n\t} else {\n\t\tlossPercent = 5;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "696c60f01fdc9ea391ab437129d43468b193ade6b7b193a1ad251622fadd781a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5272, + "startColumn": 83, + "charOffset": 150681, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 5270, + "startColumn": 83, + "charOffset": 150528, + "charLength": 1, + "snippet": { + "text": "\tif (level >= 24) {\n\t\tdouble tmpLevel = level + (levelPercent / 100.);\n\t\tlossPercent = ((tmpLevel + 50) * 50 * ((tmpLevel * tmpLevel) - (5 * tmpLevel) + 8)) / experience;\n\t} else {\n\t\tlossPercent = 5;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69b8e9a8711958fe45d70bbfd1aef3b606324bb525f2d48cd83c4c497fa09ccf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5272, + "startColumn": 89, + "charOffset": 150687, + "charLength": 10, + "snippet": { + "text": "experience" + } + }, + "contextRegion": { + "startLine": 5270, + "startColumn": 89, + "charOffset": 150528, + "charLength": 10, + "snippet": { + "text": "\tif (level >= 24) {\n\t\tdouble tmpLevel = level + (levelPercent / 100.);\n\t\tlossPercent = ((tmpLevel + 50) * 50 * ((tmpLevel * tmpLevel) - (5 * tmpLevel) + 8)) / experience;\n\t} else {\n\t\tlossPercent = 5;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "615a38fb18cdff48642ecaa6fad82090d72e421e5aec61de8a0d4c25c56fb0cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5272, + "startColumn": 89, + "charOffset": 150687, + "charLength": 10, + "snippet": { + "text": "experience" + } + }, + "contextRegion": { + "startLine": 5270, + "startColumn": 89, + "charOffset": 150528, + "charLength": 10, + "snippet": { + "text": "\tif (level >= 24) {\n\t\tdouble tmpLevel = level + (levelPercent / 100.);\n\t\tlossPercent = ((tmpLevel + 50) * 50 * ((tmpLevel * tmpLevel) - (5 * tmpLevel) + 8)) / experience;\n\t} else {\n\t\tlossPercent = 5;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "955dcf76793bda1231da8cb2220ff44e98efb896505143b35627ed2a6de547dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5274, + "startColumn": 17, + "charOffset": 150725, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 5272, + "startColumn": 17, + "charOffset": 150599, + "charLength": 1, + "snippet": { + "text": "\t\tlossPercent = ((tmpLevel + 50) * 50 * ((tmpLevel * tmpLevel) - (5 * tmpLevel) + 8)) / experience;\n\t} else {\n\t\tlossPercent = 5;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "892b9e1f3e20b28fd6c3fe97c439a44e8a1342e256e2cdf5e7bcc702c72e6e3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5274, + "startColumn": 17, + "charOffset": 150725, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 5272, + "startColumn": 17, + "charOffset": 150599, + "charLength": 1, + "snippet": { + "text": "\t\tlossPercent = ((tmpLevel + 50) * 50 * ((tmpLevel * tmpLevel) - (5 * tmpLevel) + 8)) / experience;\n\t} else {\n\t\tlossPercent = 5;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ce323a8e562d1ee89a3aa9f3d325bbf9f85396a24477b5db0ce79d9cd6bab2b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5277, + "startColumn": 28, + "charOffset": 150759, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 5275, + "startColumn": 28, + "charOffset": 150728, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tdouble percentReduction = 0;\n\tif (isPromoted()) {\n\t\tpercentReduction += 30;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04f2517f72bce66be3c2248ed510bf83eebd1e58d02f2e9546990a0a62ee9fc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5279, + "startColumn": 23, + "charOffset": 150805, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 5277, + "startColumn": 23, + "charOffset": 150732, + "charLength": 2, + "snippet": { + "text": "\tdouble percentReduction = 0;\n\tif (isPromoted()) {\n\t\tpercentReduction += 30;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08a7bcec6285465c70269ad70ba1e3e8dff60a8a0acc4d9b738ea98e8e777c74" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5279, + "startColumn": 23, + "charOffset": 150805, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 5277, + "startColumn": 23, + "charOffset": 150732, + "charLength": 2, + "snippet": { + "text": "\tdouble percentReduction = 0;\n\tif (isPromoted()) {\n\t\tpercentReduction += 30;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f647cf9f774bc88ecda5ae6aa41c1d5562c94ac26eb33a28f68adee3485d1e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5282, + "startColumn": 22, + "charOffset": 150834, + "charLength": 13, + "snippet": { + "text": "blessingCount" + } + }, + "contextRegion": { + "startLine": 5280, + "startColumn": 22, + "charOffset": 150809, + "charLength": 13, + "snippet": { + "text": "\t}\n\n\tpercentReduction += blessingCount * 8;\n\treturn lossPercent * (1 - (percentReduction / 100.)) / 100.;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cdb5a9b325c6fc7fa658a9da94d96b4c42fa84644079c467e7d179e2ddab89a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5282, + "startColumn": 38, + "charOffset": 150850, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 5280, + "startColumn": 38, + "charOffset": 150809, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tpercentReduction += blessingCount * 8;\n\treturn lossPercent * (1 - (percentReduction / 100.)) / 100.;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6b4876a6c4698dc28ce8db2e53547cda35a7a2be7a271d34d693ef8403ceb3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5283, + "startColumn": 24, + "charOffset": 150876, + "charLength": 1, + "snippet": { + "text": "1" + } + }, + "contextRegion": { + "startLine": 5281, + "startColumn": 24, + "charOffset": 150812, + "charLength": 1, + "snippet": { + "text": "\n\tpercentReduction += blessingCount * 8;\n\treturn lossPercent * (1 - (percentReduction / 100.)) / 100.;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fdd1315c594079ab142caddc31decc236aa5a1b70d37ebd39211b5305d58e830" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5288, + "startColumn": 27, + "charOffset": 151050, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 5286, + "startColumn": 27, + "charOffset": 150918, + "charLength": 12, + "snippet": { + "text": "void Player::learnInstantSpell(const std::string &spellName) {\n\tif (!hasLearnedInstantSpell(spellName)) {\n\t\tlearnedInstantSpellList.emplace_back(spellName);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d552c1d483194e667e6fba88e5fa922e5604d76a86b6f099704ff9ce21a1f182" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5293, + "startColumn": 2, + "charOffset": 151146, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 5291, + "startColumn": 2, + "charOffset": 151080, + "charLength": 3, + "snippet": { + "text": "\nvoid Player::forgetInstantSpell(const std::string &spellName) {\n\tstd::erase(learnedInstantSpellList, spellName);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce2ae358d6d22dc1b2910af9d3436e148cbd165a6aaf94d81b940a6a100ed1c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5305, + "startColumn": 2, + "charOffset": 151408, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5303, + "startColumn": 2, + "charOffset": 151403, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &learnedSpellName : learnedInstantSpellList) {\n\t\tif (strcasecmp(learnedSpellName.c_str(), spellName.c_str()) == 0) {\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38bf731472c597a267c159c9e461bfab092ef30aa4531518063764f58a43d414" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-anyofallof", + "ruleIndex": 735, + "kind": "fail", + "level": "warning", + "message": { + "text": "replace loop by 'std::ranges::any_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5305, + "startColumn": 2, + "charOffset": 151408, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5303, + "startColumn": 2, + "charOffset": 151403, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &learnedSpellName : learnedInstantSpellList) {\n\t\tif (strcasecmp(learnedSpellName.c_str(), spellName.c_str()) == 0) {\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "404eaffe2396f4ef47b6af9dc996c2a9b11228f100f16bd659086ec47f0bfb5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5313, + "startColumn": 46, + "charOffset": 151627, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 5311, + "startColumn": 46, + "charOffset": 151579, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Player::isInWar(std::shared_ptr player) const {\n\tif (!player || !guild) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d0c2a476d7ff15d3b08738b2afca0b03e6200cd9e30678d82f933c49d61abc8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5314, + "startColumn": 6, + "charOffset": 151648, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5312, + "startColumn": 6, + "charOffset": 151581, + "charLength": 1, + "snippet": { + "text": "\nbool Player::isInWar(std::shared_ptr player) const {\n\tif (!player || !guild) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e23b51ad108c38e542a70d5025d3235421e51f26c677ff48b4bfdd2307ee294b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5314, + "startColumn": 17, + "charOffset": 151659, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5312, + "startColumn": 17, + "charOffset": 151581, + "charLength": 1, + "snippet": { + "text": "\nbool Player::isInWar(std::shared_ptr player) const {\n\tif (!player || !guild) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e4fdb9dbe8245d360a469e9b342f791df393b13f6e917755c75e0a78ad12f4d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5319, + "startColumn": 6, + "charOffset": 151740, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5317, + "startColumn": 6, + "charOffset": 151688, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto playerGuild = player->getGuild();\n\tif (!playerGuild) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23674e46c2e5f4517bc66741ec95f4d3e9849db0f9037f70e6ea53adaec96acb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5331, + "startColumn": 40, + "charOffset": 152093, + "charLength": 20, + "snippet": { + "text": "getLoyaltyMagicLevel" + } + }, + "contextRegion": { + "startLine": 5329, + "startColumn": 40, + "charOffset": 152012, + "charLength": 20, + "snippet": { + "text": "\nuint32_t Player::getMagicLevel() const {\n\tuint32_t magic = std::max(0, getLoyaltyMagicLevel() + varStats[STAT_MAGICPOINTS]);\n\t// Wheel of destiny magic bonus\n\tmagic += m_wheelPlayer->getStat(WheelStat_t::MAGIC); // Regular bonus" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "faa9260bdaaaefdecd9ebed49afb1de94543560553f2c1973863961809439df4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5349, + "startColumn": 64, + "charOffset": 152846, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 5347, + "startColumn": 64, + "charOffset": 152683, + "charLength": 3, + "snippet": { + "text": "\tabsl::uint128 spent = manaSpent;\n\tabsl::uint128 totalMana = vocation->getTotalMana(level) + spent;\n\tabsl::uint128 loyaltyMana = (totalMana * getLoyaltyBonus()) / 100;\n\twhile ((spent + loyaltyMana) >= nextReqMana) {\n\t\tloyaltyMana -= nextReqMana - spent;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "538040fe6f47e5c3f6b9dc8c68bac8d59997b83dab7ae97685ed56d7b3ac3e69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5350, + "startColumn": 2, + "charOffset": 152852, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 5348, + "startColumn": 2, + "charOffset": 152717, + "charLength": 5, + "snippet": { + "text": "\tabsl::uint128 totalMana = vocation->getTotalMana(level) + spent;\n\tabsl::uint128 loyaltyMana = (totalMana * getLoyaltyBonus()) / 100;\n\twhile ((spent + loyaltyMana) >= nextReqMana) {\n\t\tloyaltyMana -= nextReqMana - spent;\n\t\tlevel++;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e951b47fb46dc6bd04783d991927c24f0a996c0ec5288aa542316447f1d3d74a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'spent' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5350, + "startColumn": 9, + "charOffset": 152859, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 5348, + "startColumn": 9, + "charOffset": 152717, + "charLength": 1, + "snippet": { + "text": "\tabsl::uint128 totalMana = vocation->getTotalMana(level) + spent;\n\tabsl::uint128 loyaltyMana = (totalMana * getLoyaltyBonus()) / 100;\n\twhile ((spent + loyaltyMana) >= nextReqMana) {\n\t\tloyaltyMana -= nextReqMana - spent;\n\t\tlevel++;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3460acc0deea3da6ecacafe73cd9f98b76a0083bb82488628de2e1fcb5c7ed08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5366, + "startColumn": 2, + "charOffset": 153171, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 5364, + "startColumn": 2, + "charOffset": 153130, + "charLength": 2, + "snippet": { + "text": "\nuint32_t Player::getCapacity() const {\n\tif (hasFlag(PlayerFlags_t::CannotPickupItem)) {\n\t\treturn 0;\n\t} else if (hasFlag(PlayerFlags_t::HasInfiniteCapacity)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a69cc7ec93e6bcf6ea7a5d33fa1f1ca1f592dca8b0b8d60532c88d53b093aa9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5368, + "startColumn": 4, + "charOffset": 153234, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 5366, + "startColumn": 4, + "charOffset": 153170, + "charLength": 4, + "snippet": { + "text": "\tif (hasFlag(PlayerFlags_t::CannotPickupItem)) {\n\t\treturn 0;\n\t} else if (hasFlag(PlayerFlags_t::HasInfiniteCapacity)) {\n\t\treturn std::numeric_limits::max();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98c7bc3ee1a1483eaba67e5666a703920db9abf6cd0b2525e86b953bdc01e320" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5379, + "startColumn": 30, + "charOffset": 153677, + "charLength": 7, + "snippet": { + "text": "manaMax" + } + }, + "contextRegion": { + "startLine": 5377, + "startColumn": 30, + "charOffset": 153609, + "charLength": 7, + "snippet": { + "text": "\nuint32_t Player::getMaxMana() const {\n\treturn std::max(0, manaMax + varStats[STAT_MAXMANAPOINTS] + m_wheelPlayer->getStat(WheelStat_t::MANA));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6bd7918522f124ac95b29c65ac887ee4ca35305c831a77d8e5f51c5507fd6fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5384, + "startColumn": 15, + "charOffset": 153877, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 5382, + "startColumn": 15, + "charOffset": 153765, + "charLength": 3, + "snippet": { + "text": "uint16_t Player::getSkillLevel(skills_t skill) const {\n\tauto skillLevel = getLoyaltySkill(skill);\n\tskillLevel = std::max(0, skillLevel + varSkills[skill]);\n\n\tif (auto it = maxValuePerSkill.find(skill);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69f8a4dbeb842e11427f6fa2af252657004b4219ee06aec01bfa02dfc42db213" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5384, + "startColumn": 49, + "charOffset": 153911, + "charLength": 9, + "snippet": { + "text": "varSkills" + } + }, + "contextRegion": { + "startLine": 5382, + "startColumn": 49, + "charOffset": 153765, + "charLength": 9, + "snippet": { + "text": "uint16_t Player::getSkillLevel(skills_t skill) const {\n\tauto skillLevel = getLoyaltySkill(skill);\n\tskillLevel = std::max(0, skillLevel + varSkills[skill]);\n\n\tif (auto it = maxValuePerSkill.find(skill);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f380b98e8479bc7695794c36e8b7ceb64f8380de6d6dd2963b7fd689609ef0cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5388, + "startColumn": 16, + "charOffset": 154028, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 5386, + "startColumn": 16, + "charOffset": 153931, + "charLength": 3, + "snippet": { + "text": "\tif (auto it = maxValuePerSkill.find(skill);\n\t it != maxValuePerSkill.end()) {\n\t\tskillLevel = std::min(it->second, skillLevel);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f83acb5b6f11a72f98c7b69c143723be07689aee4d3129cb2a1c005ceb2031ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5392, + "startColumn": 2, + "charOffset": 154097, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 5390, + "startColumn": 2, + "charOffset": 154074, + "charLength": 2, + "snippet": { + "text": "\n\t// Wheel of destiny\n\tif (skill >= SKILL_CLUB && skill <= SKILL_AXE) {\n\t\tskillLevel += m_wheelPlayer->getStat(WheelStat_t::MELEE);\n\t\tskillLevel += m_wheelPlayer->getMajorStatConditional(\"Battle Instinct\", WheelMajor_t::MELEE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ddbaa527e1fe0b83a2ab7b026d4f00d66a9b19a8ca1fc2882901992d60fe7c9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5416, + "startColumn": 16, + "charOffset": 155661, + "charLength": 16, + "snippet": { + "text": "avatarCritChance" + } + }, + "contextRegion": { + "startLine": 5414, + "startColumn": 16, + "charOffset": 155481, + "charLength": 16, + "snippet": { + "text": "\tint32_t avatarCritChance = m_wheelPlayer->checkAvatarSkill(WheelAvatarSkill_t::CRITICAL_CHANCE);\n\tif (skill == SKILL_CRITICAL_HIT_CHANCE && avatarCritChance > 0) {\n\t\tskillLevel = avatarCritChance; // 100%\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4400e9456e129fc977842c22bd18d3bb675cb354dad020ea38b82a0d8e699541" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-redundant-casting", + "ruleIndex": 716, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant explicit casting to the same type 'uint16_t' (aka 'unsigned short') as the sub-expression, remove this casting" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5419, + "startColumn": 88, + "charOffset": 155778, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 5417, + "startColumn": 88, + "charOffset": 155687, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\treturn std::min(std::numeric_limits::max(), std::max(0, static_cast(skillLevel)));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86e06081ccffb98be380f21db2906039dc6660a74b50f53f6229a80a8be6e5c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5435, + "startColumn": 6, + "charOffset": 156132, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5433, + "startColumn": 6, + "charOffset": 156123, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!account) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4e197a308f32dc243e7db872118ff62d7fdb2beff341a5e4663caf0f538726d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5456, + "startColumn": 2, + "charOffset": 156588, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5454, + "startColumn": 2, + "charOffset": 156496, + "charLength": 3, + "snippet": { + "text": "int32_t Player::getCleavePercent(bool useCharges) const {\n\tint32_t result = cleavePercent;\n\tfor (const auto &item : getEquippedItems()) {\n\t\tconst ItemType &it = Item::items[item->getID()];\n\t\tif (!it.abilities) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c626b30fc4566b37b25ee98bcb11641cb1a78807f6bf6674812788e0b1cba8a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5458, + "startColumn": 7, + "charOffset": 156691, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5456, + "startColumn": 7, + "charOffset": 156587, + "charLength": 1, + "snippet": { + "text": "\tfor (const auto &item : getEquippedItems()) {\n\t\tconst ItemType &it = Item::items[item->getID()];\n\t\tif (!it.abilities) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "416468d114e4093a305ef8f41ef0b95ac6e37dcc3e09ee3a7ef9296850fed105" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5467, + "startColumn": 14, + "charOffset": 156939, + "charLength": 13, + "snippet": { + "text": "transformItem" + } + }, + "contextRegion": { + "startLine": 5465, + "startColumn": 14, + "charOffset": 156847, + "charLength": 13, + "snippet": { + "text": "\t\t\tuint16_t charges = item->getCharges();\n\t\t\tif (useCharges && charges != 0) {\n\t\t\t\tg_game().transformItem(item, item->getID(), charges - 1);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cca5c755653633c8ea31fbbef0e340bd2805001a8111290426f7ee07a651eaf9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5482, + "startColumn": 2, + "charOffset": 157214, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5480, + "startColumn": 2, + "charOffset": 157209, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &item : getEquippedItems()) {\n\t\tconst ItemType &itemType = Item::items[item->getID()];\n\t\tif (!itemType.abilities) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5cd6a342be58eb805b0fe94f99a406cec958616e98206a8acbd19c351a6e7149" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5484, + "startColumn": 7, + "charOffset": 157323, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5482, + "startColumn": 7, + "charOffset": 157213, + "charLength": 1, + "snippet": { + "text": "\tfor (const auto &item : getEquippedItems()) {\n\t\tconst ItemType &itemType = Item::items[item->getID()];\n\t\tif (!itemType.abilities) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a9f645f15e24b25491231e12875a5f4bc1e684907e60de7b9f8f6a94f388289" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5488, + "startColumn": 7, + "charOffset": 157370, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5486, + "startColumn": 7, + "charOffset": 157359, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif (!itemType.abilities->perfectShotRange) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35f3093b32e0d6c20a1cb14a1796b8004701c1f415c6ce2506470eaf52e67d37" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5488, + "startColumn": 8, + "charOffset": 157371, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 5486, + "startColumn": 8, + "charOffset": 157359, + "charLength": 8, + "snippet": { + "text": "\t\t}\n\n\t\tif (!itemType.abilities->perfectShotRange) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3e1ca216ce1c134732eda4f4105fb7610814e2aa1b87dd6598d63360284c5bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5496, + "startColumn": 14, + "charOffset": 157628, + "charLength": 13, + "snippet": { + "text": "transformItem" + } + }, + "contextRegion": { + "startLine": 5494, + "startColumn": 14, + "charOffset": 157536, + "charLength": 13, + "snippet": { + "text": "\t\t\tuint16_t charges = item->getCharges();\n\t\t\tif (useCharges && charges != 0) {\n\t\t\t\tg_game().transformItem(item, item->getID(), charges - 1);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b07cba0df0409ecb5d225ba1657d48dcff0c1fa68be513d6b66fc3ddf79736f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5505, + "startColumn": 19, + "charOffset": 157814, + "charLength": 21, + "snippet": { + "text": "specializedMagicLevel" + } + }, + "contextRegion": { + "startLine": 5503, + "startColumn": 19, + "charOffset": 157708, + "charLength": 21, + "snippet": { + "text": "\nint32_t Player::getSpecializedMagicLevel(CombatType_t combat, bool useCharges) const {\n\tint32_t result = specializedMagicLevel[combatTypeToIndex(combat)];\n\tfor (const auto &item : getEquippedItems()) {\n\t\tconst ItemType &itemType = Item::items[item->getID()];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b13cee772c5157df72d212418f6cdb18909fcc4106c92c6b88ef09539172523e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5506, + "startColumn": 2, + "charOffset": 157865, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5504, + "startColumn": 2, + "charOffset": 157709, + "charLength": 3, + "snippet": { + "text": "int32_t Player::getSpecializedMagicLevel(CombatType_t combat, bool useCharges) const {\n\tint32_t result = specializedMagicLevel[combatTypeToIndex(combat)];\n\tfor (const auto &item : getEquippedItems()) {\n\t\tconst ItemType &itemType = Item::items[item->getID()];\n\t\tif (!itemType.abilities) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95922a1d70a8140330663f06e3263a3963bcf5f2e9bbcec83a6fde5e1dae5993" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5508, + "startColumn": 7, + "charOffset": 157974, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5506, + "startColumn": 7, + "charOffset": 157864, + "charLength": 1, + "snippet": { + "text": "\tfor (const auto &item : getEquippedItems()) {\n\t\tconst ItemType &itemType = Item::items[item->getID()];\n\t\tif (!itemType.abilities) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db243006d3820722014f5fd09049cf50defc86da9a04ccb309e79a46172f8d88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5512, + "startColumn": 37, + "charOffset": 158051, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 5510, + "startColumn": 37, + "charOffset": 158010, + "charLength": 8, + "snippet": { + "text": "\t\t}\n\n\t\tint32_t specialized_magic_level = itemType.abilities->specializedMagicLevel[combatTypeToIndex(combat)];\n\t\tif (specialized_magic_level > 0) {\n\t\t\tresult += specialized_magic_level;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "572f3b2dc1456d4043829505b332aa8164b981ead3f688ee02b36a0770f0becd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5517, + "startColumn": 14, + "charOffset": 158288, + "charLength": 13, + "snippet": { + "text": "transformItem" + } + }, + "contextRegion": { + "startLine": 5515, + "startColumn": 14, + "charOffset": 158196, + "charLength": 13, + "snippet": { + "text": "\t\t\tuint16_t charges = item->getCharges();\n\t\t\tif (useCharges && charges != 0) {\n\t\t\t\tg_game().transformItem(item, item->getID(), charges - 1);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82a6f1523d04373438a7c076787224b05c79074c73a6542b4118d57321e6a82a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5527, + "startColumn": 2, + "charOffset": 158481, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5525, + "startColumn": 2, + "charOffset": 158369, + "charLength": 3, + "snippet": { + "text": "int32_t Player::getMagicShieldCapacityFlat(bool useCharges) const {\n\tint32_t result = magicShieldCapacityFlat;\n\tfor (const auto &item : getEquippedItems()) {\n\t\tconst ItemType &itemType = Item::items[item->getID()];\n\t\tif (!itemType.abilities) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33a6d13ca660e5779ffd1a4a16021b3f66196769afd8396f127261f90aaeb48b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5529, + "startColumn": 7, + "charOffset": 158590, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5527, + "startColumn": 7, + "charOffset": 158480, + "charLength": 1, + "snippet": { + "text": "\tfor (const auto &item : getEquippedItems()) {\n\t\tconst ItemType &itemType = Item::items[item->getID()];\n\t\tif (!itemType.abilities) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f8b4599a40c5bc74ecc6eeb21f77a6cae9fea2ffdd28065f1bc638d795ef859" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5538, + "startColumn": 14, + "charOffset": 158850, + "charLength": 13, + "snippet": { + "text": "transformItem" + } + }, + "contextRegion": { + "startLine": 5536, + "startColumn": 14, + "charOffset": 158758, + "charLength": 13, + "snippet": { + "text": "\t\t\tuint16_t charges = item->getCharges();\n\t\t\tif (useCharges && charges != 0) {\n\t\t\t\tg_game().transformItem(item, item->getID(), charges - 1);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83277bb3ae87b2776fecf8b33dc351a4bd1ee9a424f2af79c868a5b555d72b92" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5548, + "startColumn": 2, + "charOffset": 159049, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5546, + "startColumn": 2, + "charOffset": 158931, + "charLength": 3, + "snippet": { + "text": "int32_t Player::getMagicShieldCapacityPercent(bool useCharges) const {\n\tint32_t result = magicShieldCapacityPercent;\n\tfor (const auto &item : getEquippedItems()) {\n\t\tconst ItemType &itemType = Item::items[item->getID()];\n\t\tif (!itemType.abilities) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a260bea99c9218301c19a394be352a994792fa19395154143fcdf42f253d2d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5550, + "startColumn": 7, + "charOffset": 159158, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5548, + "startColumn": 7, + "charOffset": 159048, + "charLength": 1, + "snippet": { + "text": "\tfor (const auto &item : getEquippedItems()) {\n\t\tconst ItemType &itemType = Item::items[item->getID()];\n\t\tif (!itemType.abilities) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8834bff27aebe36b544e7df17d2ac677b6df44a38b9561876c89b631935cdc40" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5559, + "startColumn": 14, + "charOffset": 159418, + "charLength": 13, + "snippet": { + "text": "transformItem" + } + }, + "contextRegion": { + "startLine": 5557, + "startColumn": 14, + "charOffset": 159326, + "charLength": 13, + "snippet": { + "text": "\t\t\tuint16_t charges = item->getCharges();\n\t\t\tif (useCharges && charges != 0) {\n\t\t\t\tg_game().transformItem(item, item->getID(), charges - 1);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2260bd3b53020ede1b237fb130646a7ce9770e6328827d2a1fb452fa12a94225" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5567, + "startColumn": 17, + "charOffset": 159515, + "charLength": 17, + "snippet": { + "text": "getReflectPercent" + } + }, + "contextRegion": { + "startLine": 5565, + "startColumn": 17, + "charOffset": 159496, + "charLength": 17, + "snippet": { + "text": "}\n\nint32_t Player::getReflectPercent(CombatType_t combat, bool useCharges) const {\n\tint32_t result = reflectPercent[combatTypeToIndex(combat)];\n\tfor (const auto &item : getEquippedItems()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b8cb8f51fd6f35175a5c2b490dea4e4ca462522ab636e6d5b14c0e6bea9a42c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5568, + "startColumn": 19, + "charOffset": 159597, + "charLength": 14, + "snippet": { + "text": "reflectPercent" + } + }, + "contextRegion": { + "startLine": 5566, + "startColumn": 19, + "charOffset": 159498, + "charLength": 14, + "snippet": { + "text": "\nint32_t Player::getReflectPercent(CombatType_t combat, bool useCharges) const {\n\tint32_t result = reflectPercent[combatTypeToIndex(combat)];\n\tfor (const auto &item : getEquippedItems()) {\n\t\tconst ItemType &itemType = Item::items[item->getID()];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0bd2629aa32ffff9ee0e1aef1a93fb888a6114cf13331aa7f05e051911e3dbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5569, + "startColumn": 2, + "charOffset": 159641, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5567, + "startColumn": 2, + "charOffset": 159499, + "charLength": 3, + "snippet": { + "text": "int32_t Player::getReflectPercent(CombatType_t combat, bool useCharges) const {\n\tint32_t result = reflectPercent[combatTypeToIndex(combat)];\n\tfor (const auto &item : getEquippedItems()) {\n\t\tconst ItemType &itemType = Item::items[item->getID()];\n\t\tif (!itemType.abilities) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7fe3d6b2ee15960d5ca957fee2e34b01c3741c0f00321d5bbe6f03ce975a7baa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5571, + "startColumn": 7, + "charOffset": 159750, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5569, + "startColumn": 7, + "charOffset": 159640, + "charLength": 1, + "snippet": { + "text": "\tfor (const auto &item : getEquippedItems()) {\n\t\tconst ItemType &itemType = Item::items[item->getID()];\n\t\tif (!itemType.abilities) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "208e32bd610d74dabaef1c4f05308a19a9520bb77ad3a73ed33005073bf974a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5575, + "startColumn": 28, + "charOffset": 159818, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 5573, + "startColumn": 28, + "charOffset": 159786, + "charLength": 8, + "snippet": { + "text": "\t\t}\n\n\t\tint32_t reflectPercent = itemType.abilities->reflectPercent[combatTypeToIndex(combat)];\n\t\tif (reflectPercent != 0) {\n\t\t\tresult += reflectPercent;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1112213c6efc32f20c33eaddbf5a3197355770e26a99bc8579770ced30d6f007" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5580, + "startColumn": 14, + "charOffset": 160031, + "charLength": 13, + "snippet": { + "text": "transformItem" + } + }, + "contextRegion": { + "startLine": 5578, + "startColumn": 14, + "charOffset": 159939, + "charLength": 13, + "snippet": { + "text": "\t\t\tuint16_t charges = item->getCharges();\n\t\t\tif (useCharges && charges != 0) {\n\t\t\t\tg_game().transformItem(item, item->getID(), charges - 1);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "524f897ce19aa9ad62de4bcfca916a20ecebd86f0dd904ae84ecc444ab5744f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5588, + "startColumn": 17, + "charOffset": 160128, + "charLength": 14, + "snippet": { + "text": "getReflectFlat" + } + }, + "contextRegion": { + "startLine": 5586, + "startColumn": 17, + "charOffset": 160109, + "charLength": 14, + "snippet": { + "text": "}\n\nint32_t Player::getReflectFlat(CombatType_t combat, bool useCharges) const {\n\tint32_t result = reflectFlat[combatTypeToIndex(combat)];\n\tfor (const auto &item : getEquippedItems()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49c0c35744de8bc3ad903427be85a5b4afd9cf9e53dfaf4e317cdbb162854c0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5589, + "startColumn": 19, + "charOffset": 160207, + "charLength": 11, + "snippet": { + "text": "reflectFlat" + } + }, + "contextRegion": { + "startLine": 5587, + "startColumn": 19, + "charOffset": 160111, + "charLength": 11, + "snippet": { + "text": "\nint32_t Player::getReflectFlat(CombatType_t combat, bool useCharges) const {\n\tint32_t result = reflectFlat[combatTypeToIndex(combat)];\n\tfor (const auto &item : getEquippedItems()) {\n\t\tconst ItemType &itemType = Item::items[item->getID()];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2028383aba7c164f0c7e36a00631d29acb8f69f7cba0c04dd4f28d2a3737d5fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5590, + "startColumn": 2, + "charOffset": 160248, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5588, + "startColumn": 2, + "charOffset": 160112, + "charLength": 3, + "snippet": { + "text": "int32_t Player::getReflectFlat(CombatType_t combat, bool useCharges) const {\n\tint32_t result = reflectFlat[combatTypeToIndex(combat)];\n\tfor (const auto &item : getEquippedItems()) {\n\t\tconst ItemType &itemType = Item::items[item->getID()];\n\t\tif (!itemType.abilities) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ab9f48fa001e9a5e697c5b460f0737503e0adeaee93223a3288c8807d5ad3ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5592, + "startColumn": 7, + "charOffset": 160357, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5590, + "startColumn": 7, + "charOffset": 160247, + "charLength": 1, + "snippet": { + "text": "\tfor (const auto &item : getEquippedItems()) {\n\t\tconst ItemType &itemType = Item::items[item->getID()];\n\t\tif (!itemType.abilities) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7331519ef3ec07b73f4378cbbe0174fffdebdc8ef9f38d4757d6181d60f9062" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5596, + "startColumn": 25, + "charOffset": 160422, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 5594, + "startColumn": 25, + "charOffset": 160393, + "charLength": 8, + "snippet": { + "text": "\t\t}\n\n\t\tint32_t reflectFlat = itemType.abilities->reflectFlat[combatTypeToIndex(combat)];\n\t\tif (reflectFlat != 0) {\n\t\t\tresult += reflectFlat;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a399f1ed533ed059660bea9776afff0348c02dc52f7111a8367f8d3f663b1d88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5601, + "startColumn": 14, + "charOffset": 160626, + "charLength": 13, + "snippet": { + "text": "transformItem" + } + }, + "contextRegion": { + "startLine": 5599, + "startColumn": 14, + "charOffset": 160534, + "charLength": 13, + "snippet": { + "text": "\t\t\tuint16_t charges = item->getCharges();\n\t\t\tif (useCharges && charges != 0) {\n\t\t\t\tg_game().transformItem(item, item->getID(), charges - 1);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca726f579dbaaa58baac9539941947fab53c00ee04273cb6f9c648dc5ac565f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'getPartyShield' has cognitive complexity of 32 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5613, + "startColumn": 24, + "charOffset": 160815, + "charLength": 14, + "snippet": { + "text": "getPartyShield" + } + }, + "contextRegion": { + "startLine": 5611, + "startColumn": 24, + "charOffset": 160789, + "charLength": 14, + "snippet": { + "text": "}\n\nPartyShields_t Player::getPartyShield(std::shared_ptr player) {\n\tif (!player) {\n\t\treturn SHIELD_NONE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6cb8d31160e4ecc91de63766bb9c8268959d0d78a2fbd088cc6a500d69ced7c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5613, + "startColumn": 63, + "charOffset": 160854, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 5611, + "startColumn": 63, + "charOffset": 160789, + "charLength": 6, + "snippet": { + "text": "}\n\nPartyShields_t Player::getPartyShield(std::shared_ptr player) {\n\tif (!player) {\n\t\treturn SHIELD_NONE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81820f11276e178830fcb620c0fe03fff2e32db57590ca54b48ab23e0440a769" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5614, + "startColumn": 6, + "charOffset": 160869, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5612, + "startColumn": 6, + "charOffset": 160791, + "charLength": 1, + "snippet": { + "text": "\nPartyShields_t Player::getPartyShield(std::shared_ptr player) {\n\tif (!player) {\n\t\treturn SHIELD_NONE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7331519ef3ec07b73f4378cbbe0174fffdebdc8ef9f38d4757d6181d60f9062" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5667, + "startColumn": 49, + "charOffset": 161879, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 5665, + "startColumn": 49, + "charOffset": 161828, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Player::isInviting(std::shared_ptr player) const {\n\tif (!player || !m_party || m_party->getLeader().get() != this) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bbcbda92b69f6b05cb69a6a8797f26fc977935e9157221744e11a03beb1a6956" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5668, + "startColumn": 6, + "charOffset": 161900, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5666, + "startColumn": 6, + "charOffset": 161830, + "charLength": 1, + "snippet": { + "text": "\nbool Player::isInviting(std::shared_ptr player) const {\n\tif (!player || !m_party || m_party->getLeader().get() != this) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e1d177a542d5a1185643b1283e393ae228ff72cc2d236d2aba2fa5c3ef17ce2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5668, + "startColumn": 17, + "charOffset": 161911, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5666, + "startColumn": 17, + "charOffset": 161830, + "charLength": 1, + "snippet": { + "text": "\nbool Player::isInviting(std::shared_ptr player) const {\n\tif (!player || !m_party || m_party->getLeader().get() != this) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7931ef8d570ad2557d91a61184a45ca2a764fd97944ff8c7a28628ea5bd592d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5674, + "startColumn": 48, + "charOffset": 162072, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 5672, + "startColumn": 48, + "charOffset": 162022, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Player::isPartner(std::shared_ptr player) const {\n\tif (!player || !m_party || player.get() == this) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b9787ebffdda11175ca0c662c57ca69065e9bb39beebf5b221f03119730923c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5675, + "startColumn": 6, + "charOffset": 162093, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5673, + "startColumn": 6, + "charOffset": 162024, + "charLength": 1, + "snippet": { + "text": "\nbool Player::isPartner(std::shared_ptr player) const {\n\tif (!player || !m_party || player.get() == this) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e105b3ada8498c30621f1c984d575f4715b09a1b2f21b8186d702f6b5ed926e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5675, + "startColumn": 17, + "charOffset": 162104, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5673, + "startColumn": 17, + "charOffset": 162024, + "charLength": 1, + "snippet": { + "text": "\nbool Player::isPartner(std::shared_ptr player) const {\n\tif (!player || !m_party || player.get() == this) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cee2d15234bd33c66ee18382a05a5559e31311b95aa68ccf12c0c1fb16bff6df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5681, + "startColumn": 50, + "charOffset": 162247, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 5679, + "startColumn": 50, + "charOffset": 162195, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Player::isGuildMate(std::shared_ptr player) const {\n\tif (!player || !guild) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bafb16e152ebd040eced1f0ed80fdfd389080ce6bc0d96b4a4019b4d19accb63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5682, + "startColumn": 6, + "charOffset": 162268, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5680, + "startColumn": 6, + "charOffset": 162197, + "charLength": 1, + "snippet": { + "text": "\nbool Player::isGuildMate(std::shared_ptr player) const {\n\tif (!player || !guild) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47c0088fcfdb0527964c9ed3cd807aeb928e2691a3f7aabf04d5e78bdaabb969" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5682, + "startColumn": 17, + "charOffset": 162279, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5680, + "startColumn": 17, + "charOffset": 162197, + "charLength": 1, + "snippet": { + "text": "\nbool Player::isGuildMate(std::shared_ptr player) const {\n\tif (!player || !guild) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d5bd56e001ccdd588dfa75a6f6dc8c460fd5734919edae8d770089c740e1d5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-make-member-function-const", + "ruleIndex": 708, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'sendPlayerPartyIcons' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5688, + "startColumn": 14, + "charOffset": 162356, + "charLength": 20, + "snippet": { + "text": "sendPlayerPartyIcons" + } + }, + "contextRegion": { + "startLine": 5686, + "startColumn": 14, + "charOffset": 162340, + "charLength": 20, + "snippet": { + "text": "}\n\nvoid Player::sendPlayerPartyIcons(std::shared_ptr player) {\n\tsendPartyCreatureShield(player);\n\tsendPartyCreatureSkull(player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30af8b8ffbf4eec94b34be52e59bfba303d9e965cc605256dda2cbb9a63c31ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5688, + "startColumn": 59, + "charOffset": 162401, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 5686, + "startColumn": 59, + "charOffset": 162340, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Player::sendPlayerPartyIcons(std::shared_ptr player) {\n\tsendPartyCreatureShield(player);\n\tsendPartyCreatureSkull(player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0cca6c04efa46c73c33b96ac29d069c902115d9264196baa1762544b39a72e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'newParty' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5693, + "startColumn": 56, + "charOffset": 162536, + "charLength": 8, + "snippet": { + "text": "newParty" + } + }, + "contextRegion": { + "startLine": 5691, + "startColumn": 56, + "charOffset": 162478, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Player::addPartyInvitation(std::shared_ptr newParty) {\n\tauto it = std::find(invitePartyList.begin(), invitePartyList.end(), newParty);\n\tif (it != invitePartyList.end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86825285a3a45c33c1fc59d635b8734bce9823112d0cd3811b3d2a99da1d5381" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5699, + "startColumn": 18, + "charOffset": 162701, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 5697, + "startColumn": 18, + "charOffset": 162680, + "charLength": 12, + "snippet": { + "text": "\t}\n\n\tinvitePartyList.emplace_back(newParty);\n\treturn true;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46a3ff1b873f947b5843022dccc0a6ae9608e49fe1c3708c3b4edcc2a144dc67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'remParty' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5703, + "startColumn": 59, + "charOffset": 162800, + "charLength": 8, + "snippet": { + "text": "remParty" + } + }, + "contextRegion": { + "startLine": 5701, + "startColumn": 59, + "charOffset": 162739, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Player::removePartyInvitation(std::shared_ptr remParty) {\n\tstd::erase(invitePartyList, remParty);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9d3747baaf0712df647a4cf1488a5873490dfa9543df9d89819255c0f542ab9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5704, + "startColumn": 2, + "charOffset": 162813, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 5702, + "startColumn": 2, + "charOffset": 162741, + "charLength": 3, + "snippet": { + "text": "\nvoid Player::removePartyInvitation(std::shared_ptr remParty) {\n\tstd::erase(invitePartyList, remParty);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5386a5fac3a63366cc4190a4c50d18003e9e5feb0e291cb6a360d20c805fb4b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5708, + "startColumn": 2, + "charOffset": 162895, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5706, + "startColumn": 2, + "charOffset": 162854, + "charLength": 3, + "snippet": { + "text": "\nvoid Player::clearPartyInvitations() {\n\tfor (const auto &invitingParty : invitePartyList) {\n\t\tinvitingParty->removeInvite(getPlayer(), false);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ebfeee39816a4ad0d0dbfa0fe03a0caa31ef8c4b4020c15d19a5c5a44bc0e686" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5709, + "startColumn": 18, + "charOffset": 162964, + "charLength": 12, + "snippet": { + "text": "removeInvite" + } + }, + "contextRegion": { + "startLine": 5707, + "startColumn": 18, + "charOffset": 162855, + "charLength": 12, + "snippet": { + "text": "void Player::clearPartyInvitations() {\n\tfor (const auto &invitingParty : invitePartyList) {\n\t\tinvitingParty->removeInvite(getPlayer(), false);\n\t}\n\tinvitePartyList.clear();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6d5bce27f2fe85a8a7fe39488afca323db1d1c5b224c45f9dbd4a3ef06ef879" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5714, + "startColumn": 63, + "charOffset": 163092, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 5712, + "startColumn": 63, + "charOffset": 163027, + "charLength": 6, + "snippet": { + "text": "}\n\nGuildEmblems_t Player::getGuildEmblem(std::shared_ptr player) const {\n\tif (!player) {\n\t\treturn GUILDEMBLEM_NONE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc92b6ef4aec0dbb0b836a99a8f4e47c266937f6ebda1c031491f8d536b54a0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5715, + "startColumn": 6, + "charOffset": 163113, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5713, + "startColumn": 6, + "charOffset": 163029, + "charLength": 1, + "snippet": { + "text": "\nGuildEmblems_t Player::getGuildEmblem(std::shared_ptr player) const {\n\tif (!player) {\n\t\treturn GUILDEMBLEM_NONE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e099af69a6e9eb9eec2d2586c823bea9947433d490ade1c996c42adfd8c0503" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5720, + "startColumn": 6, + "charOffset": 163206, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5718, + "startColumn": 6, + "charOffset": 163154, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto playerGuild = player->getGuild();\n\tif (!playerGuild) {\n\t\treturn GUILDEMBLEM_NONE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2e96db10a9eccb20070c9188635fd220fa101040614f889d0e6e3b8c1fb3ed7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5724, + "startColumn": 2, + "charOffset": 163254, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 5722, + "startColumn": 2, + "charOffset": 163249, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (player->getGuildWarVector().empty()) {\n\t\tif (guild == playerGuild) {\n\t\t\treturn GUILDEMBLEM_MEMBER;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "046d108d22a4167af04f1d1bb700b4c5cb57f12841c057a0537e423901da4e2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5727, + "startColumn": 5, + "charOffset": 163361, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 5725, + "startColumn": 5, + "charOffset": 163297, + "charLength": 4, + "snippet": { + "text": "\t\tif (guild == playerGuild) {\n\t\t\treturn GUILDEMBLEM_MEMBER;\n\t\t} else {\n\t\t\treturn GUILDEMBLEM_OTHER;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "226af6b88b37bd9c990886e70d85460eb3f9b2d074c31869459eb32f975cdf99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5741, + "startColumn": 21, + "charOffset": 163633, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 5739, + "startColumn": 21, + "charOffset": 163559, + "charLength": 1, + "snippet": { + "text": "void Player::sendUnjustifiedPoints() {\n\tif (client) {\n\t\tdouble dayKills = 0;\n\t\tdouble weekKills = 0;\n\t\tdouble monthKills = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd2a10f91b3d5981bd542412380cad6a838249e5bb4bba2660a8900eb73598b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5742, + "startColumn": 22, + "charOffset": 163657, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 5740, + "startColumn": 22, + "charOffset": 163598, + "charLength": 1, + "snippet": { + "text": "\tif (client) {\n\t\tdouble dayKills = 0;\n\t\tdouble weekKills = 0;\n\t\tdouble monthKills = 0;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea131500af4d6dbaaf1aad2994c6f2b102010534bbad3d09b5694c9ee3b0ab8f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5743, + "startColumn": 23, + "charOffset": 163682, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 5741, + "startColumn": 23, + "charOffset": 163613, + "charLength": 1, + "snippet": { + "text": "\t\tdouble dayKills = 0;\n\t\tdouble weekKills = 0;\n\t\tdouble monthKills = 0;\n\n\t\tfor (const auto &kill : unjustifiedKills) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "648a790c7244621184ff8db457505b8e43dc39abda93704e1a17b83969dde6cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5745, + "startColumn": 3, + "charOffset": 163688, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5743, + "startColumn": 3, + "charOffset": 163660, + "charLength": 3, + "snippet": { + "text": "\t\tdouble monthKills = 0;\n\n\t\tfor (const auto &kill : unjustifiedKills) {\n\t\t\tconst auto diff = time(nullptr) - kill.time;\n\t\t\tif (diff <= 24 * 60 * 60) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df239f009053e640aa16c0de4e5a1994752c52774b971cf1c70efde972ba9e86" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5746, + "startColumn": 22, + "charOffset": 163753, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 5744, + "startColumn": 22, + "charOffset": 163685, + "charLength": 4, + "snippet": { + "text": "\n\t\tfor (const auto &kill : unjustifiedKills) {\n\t\t\tconst auto diff = time(nullptr) - kill.time;\n\t\t\tif (diff <= 24 * 60 * 60) {\n\t\t\t\tdayKills += 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "520588a9e68f7a8d38ece390906acd23040d76891f65486f918315eb77bb2fdd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'time_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5747, + "startColumn": 16, + "charOffset": 163795, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 5745, + "startColumn": 16, + "charOffset": 163686, + "charLength": 2, + "snippet": { + "text": "\t\tfor (const auto &kill : unjustifiedKills) {\n\t\t\tconst auto diff = time(nullptr) - kill.time;\n\t\t\tif (diff <= 24 * 60 * 60) {\n\t\t\t\tdayKills += 1;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9c2e8ff5f83fde5c8e66bcd78034da58acd48e0464d5a2e453232f83abd4750" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5747, + "startColumn": 16, + "charOffset": 163795, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 5745, + "startColumn": 16, + "charOffset": 163686, + "charLength": 2, + "snippet": { + "text": "\t\tfor (const auto &kill : unjustifiedKills) {\n\t\t\tconst auto diff = time(nullptr) - kill.time;\n\t\t\tif (diff <= 24 * 60 * 60) {\n\t\t\t\tdayKills += 1;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9eb5d06774835fbf70f7df724ebf864b4fd1eecf9cb62374098b45bc59b89d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5747, + "startColumn": 21, + "charOffset": 163800, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 5745, + "startColumn": 21, + "charOffset": 163686, + "charLength": 2, + "snippet": { + "text": "\t\tfor (const auto &kill : unjustifiedKills) {\n\t\t\tconst auto diff = time(nullptr) - kill.time;\n\t\t\tif (diff <= 24 * 60 * 60) {\n\t\t\t\tdayKills += 1;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fbcb23be551b9585e4c9b4eb7c17640f04b49f31b4bcb2cb4adff1371c73fcb0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5747, + "startColumn": 26, + "charOffset": 163805, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 5745, + "startColumn": 26, + "charOffset": 163686, + "charLength": 2, + "snippet": { + "text": "\t\tfor (const auto &kill : unjustifiedKills) {\n\t\t\tconst auto diff = time(nullptr) - kill.time;\n\t\t\tif (diff <= 24 * 60 * 60) {\n\t\t\t\tdayKills += 1;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d34b12fcd6156be3254c1888ec56e7faac1bdecce937f2348bf2b9842dc0fd5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5748, + "startColumn": 17, + "charOffset": 163827, + "charLength": 1, + "snippet": { + "text": "1" + } + }, + "contextRegion": { + "startLine": 5746, + "startColumn": 17, + "charOffset": 163732, + "charLength": 1, + "snippet": { + "text": "\t\t\tconst auto diff = time(nullptr) - kill.time;\n\t\t\tif (diff <= 24 * 60 * 60) {\n\t\t\t\tdayKills += 1;\n\t\t\t}\n\t\t\tif (diff <= 7 * 24 * 60 * 60) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "789e8d2513a806478e39839b1e96611b5d412c9077d4163cea0af8ac659cc695" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'time_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5750, + "startColumn": 16, + "charOffset": 163850, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 5748, + "startColumn": 16, + "charOffset": 163811, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tdayKills += 1;\n\t\t\t}\n\t\t\tif (diff <= 7 * 24 * 60 * 60) {\n\t\t\t\tweekKills += 1;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c02c80de97f40ed2efe0f7d05a92ecd44002e642b97b615993de1d98d845983" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5750, + "startColumn": 16, + "charOffset": 163850, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 5748, + "startColumn": 16, + "charOffset": 163811, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tdayKills += 1;\n\t\t\t}\n\t\t\tif (diff <= 7 * 24 * 60 * 60) {\n\t\t\t\tweekKills += 1;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ed7369c8c2727b2b736c97aaf234e201faa526f134329baf090bf9c34a547a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5750, + "startColumn": 20, + "charOffset": 163854, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 5748, + "startColumn": 20, + "charOffset": 163811, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tdayKills += 1;\n\t\t\t}\n\t\t\tif (diff <= 7 * 24 * 60 * 60) {\n\t\t\t\tweekKills += 1;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f21b69f0e30601ee1f22798631edd8c65cfc76440fb227984e687570f9a11de9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5750, + "startColumn": 25, + "charOffset": 163859, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 5748, + "startColumn": 25, + "charOffset": 163811, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tdayKills += 1;\n\t\t\t}\n\t\t\tif (diff <= 7 * 24 * 60 * 60) {\n\t\t\t\tweekKills += 1;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d536a7cf2a1dc9acff398da757e28bd6ddb5c72d1a1c69a66072b4fafc5e81bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5750, + "startColumn": 30, + "charOffset": 163864, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 5748, + "startColumn": 30, + "charOffset": 163811, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tdayKills += 1;\n\t\t\t}\n\t\t\tif (diff <= 7 * 24 * 60 * 60) {\n\t\t\t\tweekKills += 1;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aac32dbf2aa0f6c5f3f9c095b5ed44a000354f61b69e4877aa2880f80b3a516d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5751, + "startColumn": 18, + "charOffset": 163887, + "charLength": 1, + "snippet": { + "text": "1" + } + }, + "contextRegion": { + "startLine": 5749, + "startColumn": 18, + "charOffset": 163830, + "charLength": 1, + "snippet": { + "text": "\t\t\t}\n\t\t\tif (diff <= 7 * 24 * 60 * 60) {\n\t\t\t\tweekKills += 1;\n\t\t\t}\n\t\t\tif (diff <= 30 * 24 * 60 * 60) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ad791bfa286cd8e7fb44ccd429d0ddae9536f469743f312bae19e758685ed0e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'time_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5753, + "startColumn": 16, + "charOffset": 163910, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 5751, + "startColumn": 16, + "charOffset": 163870, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tweekKills += 1;\n\t\t\t}\n\t\t\tif (diff <= 30 * 24 * 60 * 60) {\n\t\t\t\tmonthKills += 1;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d5a936ecac027b4a4743d66230f7e54f571cf6a8dfda1718abb32edd5a8d98e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5753, + "startColumn": 16, + "charOffset": 163910, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 5751, + "startColumn": 16, + "charOffset": 163870, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tweekKills += 1;\n\t\t\t}\n\t\t\tif (diff <= 30 * 24 * 60 * 60) {\n\t\t\t\tmonthKills += 1;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd867fc4b4f2b7e516865edf1436da75bb6e3727d87d76f424dd3a20e306f995" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5753, + "startColumn": 21, + "charOffset": 163915, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 5751, + "startColumn": 21, + "charOffset": 163870, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tweekKills += 1;\n\t\t\t}\n\t\t\tif (diff <= 30 * 24 * 60 * 60) {\n\t\t\t\tmonthKills += 1;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f53ac28f6eb53fad7d87d52d18b3babeb6d5c34d19bc44546ba5278fe2ed368" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5753, + "startColumn": 26, + "charOffset": 163920, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 5751, + "startColumn": 26, + "charOffset": 163870, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tweekKills += 1;\n\t\t\t}\n\t\t\tif (diff <= 30 * 24 * 60 * 60) {\n\t\t\t\tmonthKills += 1;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31cf0312c4504e4113b2972ef9a49416fd517e29ce699fdf9b65f822974a1a55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5753, + "startColumn": 31, + "charOffset": 163925, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 5751, + "startColumn": 31, + "charOffset": 163870, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tweekKills += 1;\n\t\t\t}\n\t\t\tif (diff <= 30 * 24 * 60 * 60) {\n\t\t\t\tmonthKills += 1;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "218d633dde8c3b9c1bd5c5a0fb8a48403a443cf7debceb984d8ede9d4a1f522f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5754, + "startColumn": 19, + "charOffset": 163949, + "charLength": 1, + "snippet": { + "text": "1" + } + }, + "contextRegion": { + "startLine": 5752, + "startColumn": 19, + "charOffset": 163890, + "charLength": 1, + "snippet": { + "text": "\t\t\t}\n\t\t\tif (diff <= 30 * 24 * 60 * 60) {\n\t\t\t\tmonthKills += 1;\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d38ae18d9db20a3e5e468555f96caafbcdaaeff0e6ede314aa852effa900c6cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-12", + "ruleIndex": 424, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-12: signed char and unsigned char type shall only be used for the storage and use of numeric values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5764, + "startColumn": 11, + "charOffset": 164311, + "charLength": 11, + "snippet": { + "text": "dayProgress" + } + }, + "contextRegion": { + "startLine": 5762, + "startColumn": 11, + "charOffset": 164199, + "charLength": 11, + "snippet": { + "text": "\t\tauto monthMax = ((isRed ? 2 : 1) * g_configManager().getNumber(MONTH_KILLS_TO_RED, __FUNCTION__));\n\n\t\tuint8_t dayProgress = std::min(std::round(dayKills / dayMax * 100), 100.0);\n\t\tuint8_t weekProgress = std::min(std::round(weekKills / weekMax * 100), 100.0);\n\t\tuint8_t monthProgress = std::min(std::round(monthKills / monthMax * 100), 100.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f5b444069f1be7b7ffdcf202f57ba1b0a2f5a8b34fd386bf2d15aa4ba21671d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5764, + "startColumn": 25, + "charOffset": 164325, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 5762, + "startColumn": 25, + "charOffset": 164199, + "charLength": 3, + "snippet": { + "text": "\t\tauto monthMax = ((isRed ? 2 : 1) * g_configManager().getNumber(MONTH_KILLS_TO_RED, __FUNCTION__));\n\n\t\tuint8_t dayProgress = std::min(std::round(dayKills / dayMax * 100), 100.0);\n\t\tuint8_t weekProgress = std::min(std::round(weekKills / weekMax * 100), 100.0);\n\t\tuint8_t monthProgress = std::min(std::round(monthKills / monthMax * 100), 100.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7cf526fffe16441656664c6795fbcd19ebdd71aa7f9ffda25f8b68a2da617af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5764, + "startColumn": 25, + "charOffset": 164325, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 5762, + "startColumn": 25, + "charOffset": 164199, + "charLength": 3, + "snippet": { + "text": "\t\tauto monthMax = ((isRed ? 2 : 1) * g_configManager().getNumber(MONTH_KILLS_TO_RED, __FUNCTION__));\n\n\t\tuint8_t dayProgress = std::min(std::round(dayKills / dayMax * 100), 100.0);\n\t\tuint8_t weekProgress = std::min(std::round(weekKills / weekMax * 100), 100.0);\n\t\tuint8_t monthProgress = std::min(std::round(monthKills / monthMax * 100), 100.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01379acc126754510d4d3db60a2613d3942504708865a2e1296fff58a6771bd2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5764, + "startColumn": 65, + "charOffset": 164365, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 5762, + "startColumn": 65, + "charOffset": 164199, + "charLength": 3, + "snippet": { + "text": "\t\tauto monthMax = ((isRed ? 2 : 1) * g_configManager().getNumber(MONTH_KILLS_TO_RED, __FUNCTION__));\n\n\t\tuint8_t dayProgress = std::min(std::round(dayKills / dayMax * 100), 100.0);\n\t\tuint8_t weekProgress = std::min(std::round(weekKills / weekMax * 100), 100.0);\n\t\tuint8_t monthProgress = std::min(std::round(monthKills / monthMax * 100), 100.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae9afafe57528de04950fdae1aad9ab50ea8ae4d45c70b7aadcb2e54970165e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-12", + "ruleIndex": 424, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-12: signed char and unsigned char type shall only be used for the storage and use of numeric values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5765, + "startColumn": 11, + "charOffset": 164389, + "charLength": 12, + "snippet": { + "text": "weekProgress" + } + }, + "contextRegion": { + "startLine": 5763, + "startColumn": 11, + "charOffset": 164300, + "charLength": 12, + "snippet": { + "text": "\n\t\tuint8_t dayProgress = std::min(std::round(dayKills / dayMax * 100), 100.0);\n\t\tuint8_t weekProgress = std::min(std::round(weekKills / weekMax * 100), 100.0);\n\t\tuint8_t monthProgress = std::min(std::round(monthKills / monthMax * 100), 100.0);\n\t\tuint8_t skullDuration = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "646a8acdc5b673affef5444e5c5ab2e024a4c85120aabfdb0787630546580c57" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5765, + "startColumn": 26, + "charOffset": 164404, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 5763, + "startColumn": 26, + "charOffset": 164300, + "charLength": 3, + "snippet": { + "text": "\n\t\tuint8_t dayProgress = std::min(std::round(dayKills / dayMax * 100), 100.0);\n\t\tuint8_t weekProgress = std::min(std::round(weekKills / weekMax * 100), 100.0);\n\t\tuint8_t monthProgress = std::min(std::round(monthKills / monthMax * 100), 100.0);\n\t\tuint8_t skullDuration = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec4b937b6011f3d42e18efe9b75e051ea4b179c07a266fae7aabcdc403db5284" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5765, + "startColumn": 26, + "charOffset": 164404, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 5763, + "startColumn": 26, + "charOffset": 164300, + "charLength": 3, + "snippet": { + "text": "\n\t\tuint8_t dayProgress = std::min(std::round(dayKills / dayMax * 100), 100.0);\n\t\tuint8_t weekProgress = std::min(std::round(weekKills / weekMax * 100), 100.0);\n\t\tuint8_t monthProgress = std::min(std::round(monthKills / monthMax * 100), 100.0);\n\t\tuint8_t skullDuration = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9f3138e7d41ec14a7b629e4d842aa722599afe227942bb4747f12159e544b7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5765, + "startColumn": 68, + "charOffset": 164446, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 5763, + "startColumn": 68, + "charOffset": 164300, + "charLength": 3, + "snippet": { + "text": "\n\t\tuint8_t dayProgress = std::min(std::round(dayKills / dayMax * 100), 100.0);\n\t\tuint8_t weekProgress = std::min(std::round(weekKills / weekMax * 100), 100.0);\n\t\tuint8_t monthProgress = std::min(std::round(monthKills / monthMax * 100), 100.0);\n\t\tuint8_t skullDuration = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0b0cf62641d6b7b63d54ccac603da42b4ef9c0fb50289a2821e0b2d860ebd2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-12", + "ruleIndex": 424, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-12: signed char and unsigned char type shall only be used for the storage and use of numeric values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5766, + "startColumn": 11, + "charOffset": 164470, + "charLength": 13, + "snippet": { + "text": "monthProgress" + } + }, + "contextRegion": { + "startLine": 5764, + "startColumn": 11, + "charOffset": 164301, + "charLength": 13, + "snippet": { + "text": "\t\tuint8_t dayProgress = std::min(std::round(dayKills / dayMax * 100), 100.0);\n\t\tuint8_t weekProgress = std::min(std::round(weekKills / weekMax * 100), 100.0);\n\t\tuint8_t monthProgress = std::min(std::round(monthKills / monthMax * 100), 100.0);\n\t\tuint8_t skullDuration = 0;\n\t\tif (skullTicks != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2fd6ed018c8c3fefbfa4a10f3897239ff6730ec26baaa2504290b104a8f5c1e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5766, + "startColumn": 27, + "charOffset": 164486, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 5764, + "startColumn": 27, + "charOffset": 164301, + "charLength": 3, + "snippet": { + "text": "\t\tuint8_t dayProgress = std::min(std::round(dayKills / dayMax * 100), 100.0);\n\t\tuint8_t weekProgress = std::min(std::round(weekKills / weekMax * 100), 100.0);\n\t\tuint8_t monthProgress = std::min(std::round(monthKills / monthMax * 100), 100.0);\n\t\tuint8_t skullDuration = 0;\n\t\tif (skullTicks != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c84acabed3b9608986dee150ec54b6ec23bf22679a6bf5b2a2b547d3e931a5b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5766, + "startColumn": 27, + "charOffset": 164486, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 5764, + "startColumn": 27, + "charOffset": 164301, + "charLength": 3, + "snippet": { + "text": "\t\tuint8_t dayProgress = std::min(std::round(dayKills / dayMax * 100), 100.0);\n\t\tuint8_t weekProgress = std::min(std::round(weekKills / weekMax * 100), 100.0);\n\t\tuint8_t monthProgress = std::min(std::round(monthKills / monthMax * 100), 100.0);\n\t\tuint8_t skullDuration = 0;\n\t\tif (skullTicks != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d7f2ee880eb5166f2820863bd8ce06d02fcdbcba61c8da806f0fe5be7fbc5fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5766, + "startColumn": 71, + "charOffset": 164530, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 5764, + "startColumn": 71, + "charOffset": 164301, + "charLength": 3, + "snippet": { + "text": "\t\tuint8_t dayProgress = std::min(std::round(dayKills / dayMax * 100), 100.0);\n\t\tuint8_t weekProgress = std::min(std::round(weekKills / weekMax * 100), 100.0);\n\t\tuint8_t monthProgress = std::min(std::round(monthKills / monthMax * 100), 100.0);\n\t\tuint8_t skullDuration = 0;\n\t\tif (skullTicks != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e40094a0392a4339ee67a577578b198526f32dcd4dd69b3b3500333cc1e9c61a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-12", + "ruleIndex": 424, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-12: signed char and unsigned char type shall only be used for the storage and use of numeric values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5769, + "startColumn": 4, + "charOffset": 164601, + "charLength": 13, + "snippet": { + "text": "skullDuration" + } + }, + "contextRegion": { + "startLine": 5767, + "startColumn": 4, + "charOffset": 164544, + "charLength": 13, + "snippet": { + "text": "\t\tuint8_t skullDuration = 0;\n\t\tif (skullTicks != 0) {\n\t\t\tskullDuration = std::floor(skullTicks / (24 * 60 * 60 * 1000));\n\t\t}\n\t\tclient->sendUnjustifiedPoints(dayProgress, std::max(dayMax - dayKills, 0.0), weekProgress, std::max(weekMax - weekKills, 0.0), monthProgress, std::max(monthMax - monthKills, 0.0), skullDuration);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7064038ff4f8775c9c74e52a42407a240b45d15d0fe66436320687b4cdd03ee4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5769, + "startColumn": 20, + "charOffset": 164617, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 5767, + "startColumn": 20, + "charOffset": 164544, + "charLength": 3, + "snippet": { + "text": "\t\tuint8_t skullDuration = 0;\n\t\tif (skullTicks != 0) {\n\t\t\tskullDuration = std::floor(skullTicks / (24 * 60 * 60 * 1000));\n\t\t}\n\t\tclient->sendUnjustifiedPoints(dayProgress, std::max(dayMax - dayKills, 0.0), weekProgress, std::max(weekMax - weekKills, 0.0), monthProgress, std::max(monthMax - monthKills, 0.0), skullDuration);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "650c20c2d56e120e2a655c01f4affd3a67de7ae6f5dc7f1a48213a0dfd58c8a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5769, + "startColumn": 40, + "charOffset": 164637, + "charLength": 10, + "snippet": { + "text": "skullTicks" + } + }, + "contextRegion": { + "startLine": 5767, + "startColumn": 40, + "charOffset": 164544, + "charLength": 10, + "snippet": { + "text": "\t\tuint8_t skullDuration = 0;\n\t\tif (skullTicks != 0) {\n\t\t\tskullDuration = std::floor(skullTicks / (24 * 60 * 60 * 1000));\n\t\t}\n\t\tclient->sendUnjustifiedPoints(dayProgress, std::max(dayMax - dayKills, 0.0), weekProgress, std::max(weekMax - weekKills, 0.0), monthProgress, std::max(monthMax - monthKills, 0.0), skullDuration);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "307c9fe7ca9002d3209f17edfad2dc7ee246ff103dc691372d2058e5e2798ea5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'int64_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5769, + "startColumn": 54, + "charOffset": 164651, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 5767, + "startColumn": 54, + "charOffset": 164544, + "charLength": 2, + "snippet": { + "text": "\t\tuint8_t skullDuration = 0;\n\t\tif (skullTicks != 0) {\n\t\t\tskullDuration = std::floor(skullTicks / (24 * 60 * 60 * 1000));\n\t\t}\n\t\tclient->sendUnjustifiedPoints(dayProgress, std::max(dayMax - dayKills, 0.0), weekProgress, std::max(weekMax - weekKills, 0.0), monthProgress, std::max(monthMax - monthKills, 0.0), skullDuration);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b01e3f4a11b48ce06988062014fa038dca8fc8d42684b2adea84c39976083eb4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5769, + "startColumn": 54, + "charOffset": 164651, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 5767, + "startColumn": 54, + "charOffset": 164544, + "charLength": 2, + "snippet": { + "text": "\t\tuint8_t skullDuration = 0;\n\t\tif (skullTicks != 0) {\n\t\t\tskullDuration = std::floor(skullTicks / (24 * 60 * 60 * 1000));\n\t\t}\n\t\tclient->sendUnjustifiedPoints(dayProgress, std::max(dayMax - dayKills, 0.0), weekProgress, std::max(weekMax - weekKills, 0.0), monthProgress, std::max(monthMax - monthKills, 0.0), skullDuration);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f692c6d8d2bfafc120f813581495d4e51b60dfd235534f1c225e48c6b67c0e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5769, + "startColumn": 59, + "charOffset": 164656, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 5767, + "startColumn": 59, + "charOffset": 164544, + "charLength": 2, + "snippet": { + "text": "\t\tuint8_t skullDuration = 0;\n\t\tif (skullTicks != 0) {\n\t\t\tskullDuration = std::floor(skullTicks / (24 * 60 * 60 * 1000));\n\t\t}\n\t\tclient->sendUnjustifiedPoints(dayProgress, std::max(dayMax - dayKills, 0.0), weekProgress, std::max(weekMax - weekKills, 0.0), monthProgress, std::max(monthMax - monthKills, 0.0), skullDuration);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28776af677756c5027c3a0c3a32211bcee194e6865a9e67b2e65b4fc82691f01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5769, + "startColumn": 64, + "charOffset": 164661, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 5767, + "startColumn": 64, + "charOffset": 164544, + "charLength": 2, + "snippet": { + "text": "\t\tuint8_t skullDuration = 0;\n\t\tif (skullTicks != 0) {\n\t\t\tskullDuration = std::floor(skullTicks / (24 * 60 * 60 * 1000));\n\t\t}\n\t\tclient->sendUnjustifiedPoints(dayProgress, std::max(dayMax - dayKills, 0.0), weekProgress, std::max(weekMax - weekKills, 0.0), monthProgress, std::max(monthMax - monthKills, 0.0), skullDuration);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "985184c1bcb6e60402f0de3754a1f7bb7979f69a2374726dec2ff262d1315180" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5769, + "startColumn": 69, + "charOffset": 164666, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 5767, + "startColumn": 69, + "charOffset": 164544, + "charLength": 4, + "snippet": { + "text": "\t\tuint8_t skullDuration = 0;\n\t\tif (skullTicks != 0) {\n\t\t\tskullDuration = std::floor(skullTicks / (24 * 60 * 60 * 1000));\n\t\t}\n\t\tclient->sendUnjustifiedPoints(dayProgress, std::max(dayMax - dayKills, 0.0), weekProgress, std::max(weekMax - weekKills, 0.0), monthProgress, std::max(monthMax - monthKills, 0.0), skullDuration);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bbcb34a1938390ec27ef2d9b22a838c0ebf1ac69c31f746d8901bb264a89b5d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5771, + "startColumn": 46, + "charOffset": 164723, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 5769, + "startColumn": 46, + "charOffset": 164598, + "charLength": 3, + "snippet": { + "text": "\t\t\tskullDuration = std::floor(skullTicks / (24 * 60 * 60 * 1000));\n\t\t}\n\t\tclient->sendUnjustifiedPoints(dayProgress, std::max(dayMax - dayKills, 0.0), weekProgress, std::max(weekMax - weekKills, 0.0), monthProgress, std::max(monthMax - monthKills, 0.0), skullDuration);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d1cf96e81860fc115f4f0cb13de693437ea6f47b0dadd8f91b3d7f57d13931b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5771, + "startColumn": 46, + "charOffset": 164723, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 5769, + "startColumn": 46, + "charOffset": 164598, + "charLength": 3, + "snippet": { + "text": "\t\t\tskullDuration = std::floor(skullTicks / (24 * 60 * 60 * 1000));\n\t\t}\n\t\tclient->sendUnjustifiedPoints(dayProgress, std::max(dayMax - dayKills, 0.0), weekProgress, std::max(weekMax - weekKills, 0.0), monthProgress, std::max(monthMax - monthKills, 0.0), skullDuration);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0f8c428e66e9029abef186a48d5be4ed0fd4b57a1da951c25348d226d1dc338" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5771, + "startColumn": 94, + "charOffset": 164771, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 5769, + "startColumn": 94, + "charOffset": 164598, + "charLength": 3, + "snippet": { + "text": "\t\t\tskullDuration = std::floor(skullTicks / (24 * 60 * 60 * 1000));\n\t\t}\n\t\tclient->sendUnjustifiedPoints(dayProgress, std::max(dayMax - dayKills, 0.0), weekProgress, std::max(weekMax - weekKills, 0.0), monthProgress, std::max(monthMax - monthKills, 0.0), skullDuration);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd3500aaef9cf9a83591a88db6929fa021b57da84c32a6b6b20e29ba624f721c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5771, + "startColumn": 94, + "charOffset": 164771, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 5769, + "startColumn": 94, + "charOffset": 164598, + "charLength": 3, + "snippet": { + "text": "\t\t\tskullDuration = std::floor(skullTicks / (24 * 60 * 60 * 1000));\n\t\t}\n\t\tclient->sendUnjustifiedPoints(dayProgress, std::max(dayMax - dayKills, 0.0), weekProgress, std::max(weekMax - weekKills, 0.0), monthProgress, std::max(monthMax - monthKills, 0.0), skullDuration);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "715c75141de7ca5dcd587aac3906a443debefdbb6d82febd844e5ed6c4b222ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5771, + "startColumn": 145, + "charOffset": 164822, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 5769, + "startColumn": 145, + "charOffset": 164598, + "charLength": 3, + "snippet": { + "text": "\t\t\tskullDuration = std::floor(skullTicks / (24 * 60 * 60 * 1000));\n\t\t}\n\t\tclient->sendUnjustifiedPoints(dayProgress, std::max(dayMax - dayKills, 0.0), weekProgress, std::max(weekMax - weekKills, 0.0), monthProgress, std::max(monthMax - monthKills, 0.0), skullDuration);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6dac127809c1cf4070d1e0123167419e1a9c594389e83434a7aa8093529ddf36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5771, + "startColumn": 145, + "charOffset": 164822, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 5769, + "startColumn": 145, + "charOffset": 164598, + "charLength": 3, + "snippet": { + "text": "\t\t\tskullDuration = std::floor(skullTicks / (24 * 60 * 60 * 1000));\n\t\t}\n\t\tclient->sendUnjustifiedPoints(dayProgress, std::max(dayMax - dayKills, 0.0), weekProgress, std::max(weekMax - weekKills, 0.0), monthProgress, std::max(monthMax - monthKills, 0.0), skullDuration);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65cd03fb168bd646f0a9dd9f75cbfc9fde3b19b2834f2d25c68a4959f3f64b77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5778, + "startColumn": 10, + "charOffset": 165009, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 5776, + "startColumn": 10, + "charOffset": 164921, + "charLength": 5, + "snippet": { + "text": "\tint32_t value = getStorageValue(PSTRG_MOUNTS_CURRENTMOUNT);\n\tif (value > 0) {\n\t\treturn value;\n\t}\n\treturn static_cast(kv()->get(\"last-mount\")->get());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70642fbbd3cf22f525ee49c298b206b5b07ba325bdff4c1088447cfa4a661d53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5786, + "startColumn": 10, + "charOffset": 165219, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 5784, + "startColumn": 10, + "charOffset": 165131, + "charLength": 5, + "snippet": { + "text": "\tint32_t value = getStorageValue(PSTRG_MOUNTS_CURRENTMOUNT);\n\tif (value > 0) {\n\t\treturn value;\n\t}\n\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10fd38232b34511abe4c8fb5e3e4f63a2e08d0384d383b57519eaf9316486968" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5797, + "startColumn": 2, + "charOffset": 165430, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5795, + "startColumn": 2, + "charOffset": 165344, + "charLength": 3, + "snippet": { + "text": "bool Player::hasAnyMount() const {\n\tconst auto mounts = g_game().mounts.getMounts();\n\tfor (const auto &mount : mounts) {\n\t\tif (hasMount(mount)) {\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb8376fff4c3443334fb3e2aa4b24a074dbb09063a7d348f50e2afff250b4dbf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-anyofallof", + "ruleIndex": 735, + "kind": "fail", + "level": "warning", + "message": { + "text": "replace loop by 'std::ranges::any_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5797, + "startColumn": 2, + "charOffset": 165430, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5795, + "startColumn": 2, + "charOffset": 165344, + "charLength": 3, + "snippet": { + "text": "bool Player::hasAnyMount() const {\n\tconst auto mounts = g_game().mounts.getMounts();\n\tfor (const auto &mount : mounts) {\n\t\tif (hasMount(mount)) {\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1df605c917892ec72f3d0a2ac70c9e24d21b6b2d4978051eea77178f7fd238c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5808, + "startColumn": 2, + "charOffset": 165661, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 5806, + "startColumn": 2, + "charOffset": 165574, + "charLength": 3, + "snippet": { + "text": "\tstd::vector playerMounts;\n\tconst auto mounts = g_game().mounts.getMounts();\n\tfor (const auto &mount : mounts) {\n\t\tif (hasMount(mount)) {\n\t\t\tplayerMounts.push_back(mount->id);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8847407949f1730ea5d2a3c1da07854eff271045deb9330bacbef32aceca259" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'toggleMount' has cognitive complexity of 29 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5819, + "startColumn": 14, + "charOffset": 165972, + "charLength": 11, + "snippet": { + "text": "toggleMount" + } + }, + "contextRegion": { + "startLine": 5817, + "startColumn": 14, + "charOffset": 165956, + "charLength": 11, + "snippet": { + "text": "}\n\nbool Player::toggleMount(bool mount) {\n\tif ((OTSYS_TIME() - lastToggleMount) < 3000 && !wasMounted) {\n\t\tsendCancelMessage(RETURNVALUE_YOUAREEXHAUSTED);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "813dc7b60bbefe23aed593f5a176643976775bb7033ed3d7c6265b2e0d7c56d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "3000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5820, + "startColumn": 41, + "charOffset": 166038, + "charLength": 4, + "snippet": { + "text": "3000" + } + }, + "contextRegion": { + "startLine": 5818, + "startColumn": 41, + "charOffset": 165958, + "charLength": 4, + "snippet": { + "text": "\nbool Player::toggleMount(bool mount) {\n\tif ((OTSYS_TIME() - lastToggleMount) < 3000 && !wasMounted) {\n\t\tsendCancelMessage(RETURNVALUE_YOUAREEXHAUSTED);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "abeec342aa66b7e9bb4e79fca606920673603fceb0683b6c5823d3a7beed922d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5841, + "startColumn": 7, + "charOffset": 166616, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5839, + "startColumn": 7, + "charOffset": 166499, + "charLength": 1, + "snippet": { + "text": "\n\t\tconst auto &playerOutfit = Outfits::getInstance().getOutfitByLookType(getPlayer(), defaultOutfit.lookType);\n\t\tif (!playerOutfit) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53b3cf7a02a21ad50ad11e5eaf7cb9e5ba0b52209b9430f79550afcd465b0fdc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5851, + "startColumn": 7, + "charOffset": 166778, + "charLength": 15, + "snippet": { + "text": "isRandomMounted" + } + }, + "contextRegion": { + "startLine": 5849, + "startColumn": 7, + "charOffset": 166767, + "charLength": 15, + "snippet": { + "text": "\t\t}\n\n\t\tif (isRandomMounted()) {\n\t\t\tcurrentMountId = getRandomMountId();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f6538a42bc6f1ebae7eacea178d2219f67ba4fdca2f46c03e3d5b1f9b8965a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5851, + "startColumn": 7, + "charOffset": 166778, + "charLength": 15, + "snippet": { + "text": "isRandomMounted" + } + }, + "contextRegion": { + "startLine": 5849, + "startColumn": 7, + "charOffset": 166767, + "charLength": 15, + "snippet": { + "text": "\t\t}\n\n\t\tif (isRandomMounted()) {\n\t\t\tcurrentMountId = getRandomMountId();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6cd77a23e7476b98454c004b86e3d597e2de28d1a990fb89f3124c8fd72047b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5856, + "startColumn": 7, + "charOffset": 166924, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5854, + "startColumn": 7, + "charOffset": 166843, + "charLength": 1, + "snippet": { + "text": "\n\t\tconst auto currentMount = g_game().mounts.getMountByID(currentMountId);\n\t\tif (!currentMount) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f82ccec260382a9762817403c42b0c412e1808523286a7bced903fae5e7cfd19" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5898, + "startColumn": 6, + "charOffset": 167829, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5896, + "startColumn": 6, + "charOffset": 167781, + "charLength": 1, + "snippet": { + "text": "\nbool Player::tameMount(uint8_t mountId) {\n\tif (!g_game().mounts.getMountByID(mountId)) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9f7d407ac014fbf985f04927b127094ad34335b25f7a187b861abbbbc47a8f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5907, + "startColumn": 3, + "charOffset": 168062, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 5905, + "startColumn": 3, + "charOffset": 168001, + "charLength": 5, + "snippet": { + "text": "\tint32_t value = getStorageValue(key);\n\tif (value != -1) {\n\t\tvalue |= (1 << (tmpMountId % 31));\n\t} else {\n\t\tvalue = (1 << (tmpMountId % 31));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2acb613a8d7be925e1786a26a200635a915abc3c99542bd90f41845720e71d26" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5907, + "startColumn": 13, + "charOffset": 168072, + "charLength": 1, + "snippet": { + "text": "1" + } + }, + "contextRegion": { + "startLine": 5905, + "startColumn": 13, + "charOffset": 168001, + "charLength": 1, + "snippet": { + "text": "\tint32_t value = getStorageValue(key);\n\tif (value != -1) {\n\t\tvalue |= (1 << (tmpMountId % 31));\n\t} else {\n\t\tvalue = (1 << (tmpMountId % 31));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef9b9f4dc7c251be3e41aeb0ed2c20ceaea21d9b47725fe696c26272a7eb0c42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "31 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5907, + "startColumn": 32, + "charOffset": 168091, + "charLength": 2, + "snippet": { + "text": "31" + } + }, + "contextRegion": { + "startLine": 5905, + "startColumn": 32, + "charOffset": 168001, + "charLength": 2, + "snippet": { + "text": "\tint32_t value = getStorageValue(key);\n\tif (value != -1) {\n\t\tvalue |= (1 << (tmpMountId % 31));\n\t} else {\n\t\tvalue = (1 << (tmpMountId % 31));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "330495fcdabe70d5dbf8081d2b5c95dfe5c853c452f2b77a8a9b34d9b4c4bbb6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5909, + "startColumn": 12, + "charOffset": 168118, + "charLength": 1, + "snippet": { + "text": "1" + } + }, + "contextRegion": { + "startLine": 5907, + "startColumn": 12, + "charOffset": 168060, + "charLength": 1, + "snippet": { + "text": "\t\tvalue |= (1 << (tmpMountId % 31));\n\t} else {\n\t\tvalue = (1 << (tmpMountId % 31));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26308c093f9ea2f188c23f83d34adb81de988136e30c4704c2060fccd394f21f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "31 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5909, + "startColumn": 31, + "charOffset": 168137, + "charLength": 2, + "snippet": { + "text": "31" + } + }, + "contextRegion": { + "startLine": 5907, + "startColumn": 31, + "charOffset": 168060, + "charLength": 2, + "snippet": { + "text": "\t\tvalue |= (1 << (tmpMountId % 31));\n\t} else {\n\t\tvalue = (1 << (tmpMountId % 31));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9369690b9e0a23642ebef8daa66355bd68da41c076fbf3896ed14de73dd87af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5917, + "startColumn": 6, + "charOffset": 168243, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5915, + "startColumn": 6, + "charOffset": 168193, + "charLength": 1, + "snippet": { + "text": "\nbool Player::untameMount(uint8_t mountId) {\n\tif (!g_game().mounts.getMountByID(mountId)) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e318d10065f9d3aa7f78da5eb12f943936228fe1d99838b170128837634c3fc3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5929, + "startColumn": 2, + "charOffset": 168494, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 5927, + "startColumn": 2, + "charOffset": 168489, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tvalue &= ~(1 << (tmpMountId % 31));\n\taddStorageValue(key, value);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c29d00c7e4841e559ac86ce706afe7db11b2a73d860b9f8b7397a944ccf9acf4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a unary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5929, + "startColumn": 12, + "charOffset": 168504, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 5927, + "startColumn": 12, + "charOffset": 168489, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tvalue &= ~(1 << (tmpMountId % 31));\n\taddStorageValue(key, value);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6b810916ce1b2603d5a7115869a01377efdd35a066c5960b52a95fce2b46547" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5929, + "startColumn": 13, + "charOffset": 168505, + "charLength": 1, + "snippet": { + "text": "1" + } + }, + "contextRegion": { + "startLine": 5927, + "startColumn": 13, + "charOffset": 168489, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tvalue &= ~(1 << (tmpMountId % 31));\n\taddStorageValue(key, value);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf849e4a9b916266cbcb97f56f1ec3dffc7368f1f705fa657835b6ff7b56c3b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "31 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5929, + "startColumn": 32, + "charOffset": 168524, + "charLength": 2, + "snippet": { + "text": "31" + } + }, + "contextRegion": { + "startLine": 5927, + "startColumn": 32, + "charOffset": 168489, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tvalue &= ~(1 << (tmpMountId % 31));\n\taddStorageValue(key, value);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ddb6de453df9a13b5da424999234df38e3ff125c96986131b4095a58b39d6b18" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'mount' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5945, + "startColumn": 52, + "charOffset": 168848, + "charLength": 5, + "snippet": { + "text": "mount" + } + }, + "contextRegion": { + "startLine": 5943, + "startColumn": 52, + "charOffset": 168794, + "charLength": 5, + "snippet": { + "text": "}\n\nbool Player::hasMount(const std::shared_ptr mount) const {\n\tif (isAccessPlayer()) {\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76e065010f1bf9a8f1c3634c442f1d17687353912410cfb69593d4cc65c40f44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "31 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5956, + "startColumn": 75, + "charOffset": 169084, + "charLength": 2, + "snippet": { + "text": "31" + } + }, + "contextRegion": { + "startLine": 5954, + "startColumn": 75, + "charOffset": 168966, + "charLength": 2, + "snippet": { + "text": "\tconst uint8_t tmpMountId = mount->id - 1;\n\n\tint32_t value = getStorageValue(PSTRG_MOUNTS_RANGE_START + (tmpMountId / 31));\n\tif (value == -1) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0678f8e04a6e8ba42cd9307fdb879a980ff5d6eb37d3f0e76ab7758f5e3e0c05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5961, + "startColumn": 10, + "charOffset": 169139, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 5959, + "startColumn": 10, + "charOffset": 169126, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\treturn ((1 << (tmpMountId % 31)) & value) != 0;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9ca6dafb6994a7e69099149d64012167ca874510cba8ddd10e5f79b6963b4e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5961, + "startColumn": 11, + "charOffset": 169140, + "charLength": 1, + "snippet": { + "text": "1" + } + }, + "contextRegion": { + "startLine": 5959, + "startColumn": 11, + "charOffset": 169126, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\treturn ((1 << (tmpMountId % 31)) & value) != 0;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b494c170d23090c3f5c0d6ccd82d9f5a9bb311da9a05810cb3881752c3c0f38e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "31 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5961, + "startColumn": 30, + "charOffset": 169159, + "charLength": 2, + "snippet": { + "text": "31" + } + }, + "contextRegion": { + "startLine": 5959, + "startColumn": 30, + "charOffset": 169126, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\treturn ((1 << (tmpMountId % 31)) & value) != 0;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ec92d708cbc8e427a9098409e1f93692ce3e2300b7d12f2cb1b5ce101ab740b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'addOfflineTrainingTries' has cognitive complexity of 37 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5973, + "startColumn": 14, + "charOffset": 169428, + "charLength": 23, + "snippet": { + "text": "addOfflineTrainingTries" + } + }, + "contextRegion": { + "startLine": 5971, + "startColumn": 14, + "charOffset": 169412, + "charLength": 23, + "snippet": { + "text": "}\n\nbool Player::addOfflineTrainingTries(skills_t skill, uint64_t tries) {\n\tif (tries == 0 || skill == SKILL_LEVEL) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d35e8529090315ec61e42126d201941c64cdafd05e1b5697ba5c55d71206c8ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5979, + "startColumn": 2, + "charOffset": 169576, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 5977, + "startColumn": 2, + "charOffset": 169548, + "charLength": 8, + "snippet": { + "text": "\n\tbool sendUpdate = false;\n\tuint32_t oldSkillValue, newSkillValue;\n\tlong double oldPercentToNextLevel, newPercentToNextLevel;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eaac0f08be9e3b65b1b1376a78a6e0a83180fccf2912e50ff0d328141fc5705e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5979, + "startColumn": 2, + "charOffset": 169576, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 5977, + "startColumn": 2, + "charOffset": 169548, + "charLength": 8, + "snippet": { + "text": "\n\tbool sendUpdate = false;\n\tuint32_t oldSkillValue, newSkillValue;\n\tlong double oldPercentToNextLevel, newPercentToNextLevel;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "692b8db81b2f4150961044a9a97f8c56646ee17808e59d9f0de1d76ddc415f03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'oldSkillValue' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5979, + "startColumn": 11, + "charOffset": 169585, + "charLength": 13, + "snippet": { + "text": "oldSkillValue" + } + }, + "contextRegion": { + "startLine": 5977, + "startColumn": 11, + "charOffset": 169548, + "charLength": 13, + "snippet": { + "text": "\n\tbool sendUpdate = false;\n\tuint32_t oldSkillValue, newSkillValue;\n\tlong double oldPercentToNextLevel, newPercentToNextLevel;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66f7110657894402d60237e50b0e775a4d26679ecbfa71850122ac77692880b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'newSkillValue' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5979, + "startColumn": 26, + "charOffset": 169600, + "charLength": 13, + "snippet": { + "text": "newSkillValue" + } + }, + "contextRegion": { + "startLine": 5977, + "startColumn": 26, + "charOffset": 169548, + "charLength": 13, + "snippet": { + "text": "\n\tbool sendUpdate = false;\n\tuint32_t oldSkillValue, newSkillValue;\n\tlong double oldPercentToNextLevel, newPercentToNextLevel;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1bbee27d52fe27f8936bd769379c8017c96b07a18effe2e57dbc3797d4967cef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5980, + "startColumn": 2, + "charOffset": 169616, + "charLength": 4, + "snippet": { + "text": "long" + } + }, + "contextRegion": { + "startLine": 5978, + "startColumn": 2, + "charOffset": 169549, + "charLength": 4, + "snippet": { + "text": "\tbool sendUpdate = false;\n\tuint32_t oldSkillValue, newSkillValue;\n\tlong double oldPercentToNextLevel, newPercentToNextLevel;\n\n\tif (skill == SKILL_MAGLEVEL) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8f0fe5fcaa779053ef21458721efeb66af68e8f0ecae63750edca4631c6bf4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5980, + "startColumn": 2, + "charOffset": 169616, + "charLength": 4, + "snippet": { + "text": "long" + } + }, + "contextRegion": { + "startLine": 5978, + "startColumn": 2, + "charOffset": 169549, + "charLength": 4, + "snippet": { + "text": "\tbool sendUpdate = false;\n\tuint32_t oldSkillValue, newSkillValue;\n\tlong double oldPercentToNextLevel, newPercentToNextLevel;\n\n\tif (skill == SKILL_MAGLEVEL) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fbdf23f32560d9b183c600bc8b38af8de42eaf0b655be415b8628536d51087e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'oldPercentToNextLevel' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5980, + "startColumn": 14, + "charOffset": 169628, + "charLength": 21, + "snippet": { + "text": "oldPercentToNextLevel" + } + }, + "contextRegion": { + "startLine": 5978, + "startColumn": 14, + "charOffset": 169549, + "charLength": 21, + "snippet": { + "text": "\tbool sendUpdate = false;\n\tuint32_t oldSkillValue, newSkillValue;\n\tlong double oldPercentToNextLevel, newPercentToNextLevel;\n\n\tif (skill == SKILL_MAGLEVEL) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad0796d3b8da2a7d2f645cd1b04c73d5b48821308e0753f68d94d9c4aae7917d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'newPercentToNextLevel' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5980, + "startColumn": 37, + "charOffset": 169651, + "charLength": 21, + "snippet": { + "text": "newPercentToNextLevel" + } + }, + "contextRegion": { + "startLine": 5978, + "startColumn": 37, + "charOffset": 169549, + "charLength": 21, + "snippet": { + "text": "\tbool sendUpdate = false;\n\tuint32_t oldSkillValue, newSkillValue;\n\tlong double oldPercentToNextLevel, newPercentToNextLevel;\n\n\tif (skill == SKILL_MAGLEVEL) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2a2bdd6e09aca6ec3cd33480241020bc219ae2733d3cc2dee7fde871f4e048a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5991, + "startColumn": 64, + "charOffset": 169975, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 5989, + "startColumn": 64, + "charOffset": 169883, + "charLength": 3, + "snippet": { + "text": "\n\t\toldSkillValue = magLevel;\n\t\toldPercentToNextLevel = static_cast(manaSpent * 100) / nextReqMana;\n\n\t\tg_events().eventPlayerOnGainSkillTries(static_self_cast(), SKILL_MAGLEVEL, tries);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "267fc93dc8ddabdc47875c8e989dbc842f266fc3ad1f389afbcfcf5b8319c82c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5991, + "startColumn": 71, + "charOffset": 169982, + "charLength": 11, + "snippet": { + "text": "nextReqMana" + } + }, + "contextRegion": { + "startLine": 5989, + "startColumn": 71, + "charOffset": 169883, + "charLength": 11, + "snippet": { + "text": "\n\t\toldSkillValue = magLevel;\n\t\toldPercentToNextLevel = static_cast(manaSpent * 100) / nextReqMana;\n\n\t\tg_events().eventPlayerOnGainSkillTries(static_self_cast(), SKILL_MAGLEVEL, tries);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a7028ad521bec69e132ac9228bd964b495bc77945665d67a362e2ba9454a020" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5997, + "startColumn": 3, + "charOffset": 170278, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 5995, + "startColumn": 3, + "charOffset": 170239, + "charLength": 5, + "snippet": { + "text": "\n\t\tuint32_t currMagLevel = magLevel;\n\t\twhile ((manaSpent + tries) >= nextReqMana) {\n\t\t\ttries -= nextReqMana - manaSpent;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2234e1266560c64e05c4ee84887a63ee24810856bcb52c84745f942a44fcfa18" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'tries' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 5997, + "startColumn": 10, + "charOffset": 170285, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 5995, + "startColumn": 10, + "charOffset": 170239, + "charLength": 1, + "snippet": { + "text": "\n\t\tuint32_t currMagLevel = magLevel;\n\t\twhile ((manaSpent + tries) >= nextReqMana) {\n\t\t\ttries -= nextReqMana - manaSpent;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64c08ed32c25339a433d54676ecd65e16d85e8915889bd58e5402947bf0fb75d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6003, + "startColumn": 23, + "charOffset": 170417, + "charLength": 13, + "snippet": { + "text": "playerAdvance" + } + }, + "contextRegion": { + "startLine": 6001, + "startColumn": 23, + "charOffset": 170376, + "charLength": 13, + "snippet": { + "text": "\t\t\tmanaSpent = 0;\n\n\t\t\tg_creatureEvents().playerAdvance(static_self_cast(), SKILL_MAGLEVEL, magLevel - 1, magLevel);\n\n\t\t\tsendUpdate = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b95c2776a94f6533e4bd29d712ffdc7e80c4f1c7d687abb5a1fc03c28217736" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'newPercent' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6024, + "startColumn": 11, + "charOffset": 170939, + "charLength": 10, + "snippet": { + "text": "newPercent" + } + }, + "contextRegion": { + "startLine": 6022, + "startColumn": 11, + "charOffset": 170924, + "charLength": 10, + "snippet": { + "text": "\t\t}\n\n\t\tuint8_t newPercent;\n\t\tif (nextReqMana > currReqMana) {\n\t\t\tnewPercent = Player::getPercentLevel(manaSpent, nextReqMana);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c7ad05de6793b01f8dbe88fb3a6151cff0c6375bf4d5ddfe189bb3ef49c885b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-12", + "ruleIndex": 424, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-12: signed char and unsigned char type shall only be used for the storage and use of numeric values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6026, + "startColumn": 4, + "charOffset": 170989, + "charLength": 10, + "snippet": { + "text": "newPercent" + } + }, + "contextRegion": { + "startLine": 6024, + "startColumn": 4, + "charOffset": 170929, + "charLength": 10, + "snippet": { + "text": "\t\tuint8_t newPercent;\n\t\tif (nextReqMana > currReqMana) {\n\t\t\tnewPercent = Player::getPercentLevel(manaSpent, nextReqMana);\n\t\t\tnewPercentToNextLevel = static_cast(manaSpent * 100) / nextReqMana;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbcdb90f6458b3c483c5a705e724725032ff8a8f762a3d9681510b4274e40e71" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6026, + "startColumn": 17, + "charOffset": 171002, + "charLength": 6, + "snippet": { + "text": "Player" + } + }, + "contextRegion": { + "startLine": 6024, + "startColumn": 17, + "charOffset": 170929, + "charLength": 6, + "snippet": { + "text": "\t\tuint8_t newPercent;\n\t\tif (nextReqMana > currReqMana) {\n\t\t\tnewPercent = Player::getPercentLevel(manaSpent, nextReqMana);\n\t\t\tnewPercentToNextLevel = static_cast(manaSpent * 100) / nextReqMana;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd5132f33072f2211418c8cab466c8e3ef6275abf5d50e03aee0be99e589bf64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6026, + "startColumn": 17, + "charOffset": 171002, + "charLength": 6, + "snippet": { + "text": "Player" + } + }, + "contextRegion": { + "startLine": 6024, + "startColumn": 17, + "charOffset": 170929, + "charLength": 6, + "snippet": { + "text": "\t\tuint8_t newPercent;\n\t\tif (nextReqMana > currReqMana) {\n\t\t\tnewPercent = Player::getPercentLevel(manaSpent, nextReqMana);\n\t\t\tnewPercentToNextLevel = static_cast(manaSpent * 100) / nextReqMana;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2343cc88f50d13a7ac258a53c201de6621cf56593ce2ac184cb76652c8a4c55e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6027, + "startColumn": 65, + "charOffset": 171115, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 6025, + "startColumn": 65, + "charOffset": 170951, + "charLength": 3, + "snippet": { + "text": "\t\tif (nextReqMana > currReqMana) {\n\t\t\tnewPercent = Player::getPercentLevel(manaSpent, nextReqMana);\n\t\t\tnewPercentToNextLevel = static_cast(manaSpent * 100) / nextReqMana;\n\t\t} else {\n\t\t\tnewPercent = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1dec39c586fb81fdb335c7c4d0c6e2d092edb34c818e9645de33e092d668f437" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6027, + "startColumn": 72, + "charOffset": 171122, + "charLength": 11, + "snippet": { + "text": "nextReqMana" + } + }, + "contextRegion": { + "startLine": 6025, + "startColumn": 72, + "charOffset": 170951, + "charLength": 11, + "snippet": { + "text": "\t\tif (nextReqMana > currReqMana) {\n\t\t\tnewPercent = Player::getPercentLevel(manaSpent, nextReqMana);\n\t\t\tnewPercentToNextLevel = static_cast(manaSpent * 100) / nextReqMana;\n\t\t} else {\n\t\t\tnewPercent = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fbb7fdb852026a58567fb5b7b1a0d7bdf2968f3390b1e666b6f82bf9041381eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6030, + "startColumn": 28, + "charOffset": 171192, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 6028, + "startColumn": 28, + "charOffset": 171135, + "charLength": 1, + "snippet": { + "text": "\t\t} else {\n\t\t\tnewPercent = 0;\n\t\t\tnewPercentToNextLevel = 0;\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bd95303c51583b4e2df91dd2884b1a960e32189083d8fa103de7c58f4a66462" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6033, + "startColumn": 7, + "charOffset": 171206, + "charLength": 10, + "snippet": { + "text": "newPercent" + } + }, + "contextRegion": { + "startLine": 6031, + "startColumn": 7, + "charOffset": 171195, + "charLength": 10, + "snippet": { + "text": "\t\t}\n\n\t\tif (newPercent != magLevelPercent) {\n\t\t\tmagLevelPercent = newPercent;\n\t\t\tsendUpdate = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd200a92f610f3d15f98ab00a0309420d83de941f10c7b664a613eccc7002b37" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6034, + "startColumn": 22, + "charOffset": 171260, + "charLength": 10, + "snippet": { + "text": "newPercent" + } + }, + "contextRegion": { + "startLine": 6032, + "startColumn": 22, + "charOffset": 171199, + "charLength": 10, + "snippet": { + "text": "\n\t\tif (newPercent != magLevelPercent) {\n\t\t\tmagLevelPercent = newPercent;\n\t\t\tsendUpdate = true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb3263b99e5f86bff0919d43d8ea8babd7399f54d60e3492441493cb7a8fcca3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6040, + "startColumn": 61, + "charOffset": 171397, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 6038, + "startColumn": 61, + "charOffset": 171299, + "charLength": 6, + "snippet": { + "text": "\t\tnewSkillValue = magLevel;\n\t} else {\n\t\tuint64_t currReqTries = vocation->getReqSkillTries(skill, skills[skill].level);\n\t\tuint64_t nextReqTries = vocation->getReqSkillTries(skill, skills[skill].level + 1);\n\t\tif (currReqTries >= nextReqTries) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6980fd29a1e77efbd889d0ced50e1ea9bd563bf35064e06aaf9b05fecd5a187c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6041, + "startColumn": 61, + "charOffset": 171479, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 6039, + "startColumn": 61, + "charOffset": 171327, + "charLength": 6, + "snippet": { + "text": "\t} else {\n\t\tuint64_t currReqTries = vocation->getReqSkillTries(skill, skills[skill].level);\n\t\tuint64_t nextReqTries = vocation->getReqSkillTries(skill, skills[skill].level + 1);\n\t\tif (currReqTries >= nextReqTries) {\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3014f41d5cd9c47d9579efab8d85a654f62be98589328957a8c505f355788d97" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6046, + "startColumn": 19, + "charOffset": 171583, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 6044, + "startColumn": 19, + "charOffset": 171560, + "charLength": 6, + "snippet": { + "text": "\t\t}\n\n\t\toldSkillValue = skills[skill].level;\n\t\toldPercentToNextLevel = static_cast(skills[skill].tries * 100) / nextReqTries;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2334b7d33cfd1489ccb306189ce6a69e85f38f7b727416f27ceea393cddbf8ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6047, + "startColumn": 52, + "charOffset": 171655, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 6045, + "startColumn": 52, + "charOffset": 171564, + "charLength": 6, + "snippet": { + "text": "\n\t\toldSkillValue = skills[skill].level;\n\t\toldPercentToNextLevel = static_cast(skills[skill].tries * 100) / nextReqTries;\n\n\t\tg_events().eventPlayerOnGainSkillTries(static_self_cast(), skill, tries);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b50fb1babced34503d1862cf727c1a8549ef86f959c8fed95b11369dfdb6d010" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6047, + "startColumn": 74, + "charOffset": 171677, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 6045, + "startColumn": 74, + "charOffset": 171564, + "charLength": 3, + "snippet": { + "text": "\n\t\toldSkillValue = skills[skill].level;\n\t\toldPercentToNextLevel = static_cast(skills[skill].tries * 100) / nextReqTries;\n\n\t\tg_events().eventPlayerOnGainSkillTries(static_self_cast(), skill, tries);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26e513c21e94ef4379ab1792c08101b9401b46e291f6ce3581d25da0bea140f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6047, + "startColumn": 81, + "charOffset": 171684, + "charLength": 12, + "snippet": { + "text": "nextReqTries" + } + }, + "contextRegion": { + "startLine": 6045, + "startColumn": 81, + "charOffset": 171564, + "charLength": 12, + "snippet": { + "text": "\n\t\toldSkillValue = skills[skill].level;\n\t\toldPercentToNextLevel = static_cast(skills[skill].tries * 100) / nextReqTries;\n\n\t\tg_events().eventPlayerOnGainSkillTries(static_self_cast(), skill, tries);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e67a7ac00b9ba32b0b9e0bc67aaca3738ffa135e729601bcb250cb0df315b45" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6051, + "startColumn": 29, + "charOffset": 171952, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 6049, + "startColumn": 29, + "charOffset": 171699, + "charLength": 6, + "snippet": { + "text": "\t\tg_events().eventPlayerOnGainSkillTries(static_self_cast(), skill, tries);\n\t\tg_callbacks().executeCallback(EventCallback_t::playerOnGainSkillTries, &EventCallback::playerOnGainSkillTries, getPlayer(), skill, tries);\n\t\tuint32_t currSkillLevel = skills[skill].level;\n\n\t\twhile ((skills[skill].tries + tries) >= nextReqTries) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9327e1576f5d4797c55a4361d957373c899d62242cdb632993eb51c26d4e456" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6053, + "startColumn": 3, + "charOffset": 171976, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 6051, + "startColumn": 3, + "charOffset": 171924, + "charLength": 5, + "snippet": { + "text": "\t\tuint32_t currSkillLevel = skills[skill].level;\n\n\t\twhile ((skills[skill].tries + tries) >= nextReqTries) {\n\t\t\ttries -= nextReqTries - skills[skill].tries;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa0127e2cb35c250965348ff7696fd1dcba4824e7e578e43adcd78bff7d4d996" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'tries' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6053, + "startColumn": 10, + "charOffset": 171983, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 6051, + "startColumn": 10, + "charOffset": 171924, + "charLength": 1, + "snippet": { + "text": "\t\tuint32_t currSkillLevel = skills[skill].level;\n\n\t\twhile ((skills[skill].tries + tries) >= nextReqTries) {\n\t\t\ttries -= nextReqTries - skills[skill].tries;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0dcb34291e20a24c51517283b10d637da3a7eb7f92306313241f990e8e84fccc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6053, + "startColumn": 11, + "charOffset": 171984, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 6051, + "startColumn": 11, + "charOffset": 171924, + "charLength": 6, + "snippet": { + "text": "\t\tuint32_t currSkillLevel = skills[skill].level;\n\n\t\twhile ((skills[skill].tries + tries) >= nextReqTries) {\n\t\t\ttries -= nextReqTries - skills[skill].tries;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a832b7a9361d6fd616ad11f569f233f7e6a622d48f400a53ec410e43581bf66b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6054, + "startColumn": 28, + "charOffset": 172059, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 6052, + "startColumn": 28, + "charOffset": 171973, + "charLength": 6, + "snippet": { + "text": "\n\t\twhile ((skills[skill].tries + tries) >= nextReqTries) {\n\t\t\ttries -= nextReqTries - skills[skill].tries;\n\n\t\t\tskills[skill].level++;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "187ac175462dfbfe8fc9904f9b22133d029d88a9ad80d0b92c5f0c140d9e636c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6056, + "startColumn": 4, + "charOffset": 172084, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 6054, + "startColumn": 4, + "charOffset": 172032, + "charLength": 6, + "snippet": { + "text": "\t\t\ttries -= nextReqTries - skills[skill].tries;\n\n\t\t\tskills[skill].level++;\n\t\t\tskills[skill].tries = 0;\n\t\t\tskills[skill].percent = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d582cb678d8a64e9ba0944377c5af92577cfde430d9448e2d3b5a924cd8fe203" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6057, + "startColumn": 4, + "charOffset": 172110, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 6055, + "startColumn": 4, + "charOffset": 172080, + "charLength": 6, + "snippet": { + "text": "\n\t\t\tskills[skill].level++;\n\t\t\tskills[skill].tries = 0;\n\t\t\tskills[skill].percent = 0;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f676f8b8e14c5a6288ca0135fe7321928c43be932e4dd7148af21c7f0d8f14a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6058, + "startColumn": 4, + "charOffset": 172138, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 6056, + "startColumn": 4, + "charOffset": 172081, + "charLength": 6, + "snippet": { + "text": "\t\t\tskills[skill].level++;\n\t\t\tskills[skill].tries = 0;\n\t\t\tskills[skill].percent = 0;\n\n\t\t\tg_creatureEvents().playerAdvance(static_self_cast(), skill, (skills[skill].level - 1), skills[skill].level);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98812b58bbc68ec5256f05c347946064d3f77ba348710fe69fee280b2e7cad13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6058, + "startColumn": 28, + "charOffset": 172162, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 6056, + "startColumn": 28, + "charOffset": 172081, + "charLength": 1, + "snippet": { + "text": "\t\t\tskills[skill].level++;\n\t\t\tskills[skill].tries = 0;\n\t\t\tskills[skill].percent = 0;\n\n\t\t\tg_creatureEvents().playerAdvance(static_self_cast(), skill, (skills[skill].level - 1), skills[skill].level);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0402888ac28c703f0d66218105e438d2d1eea3caeefa877171aec8a4eef22083" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6060, + "startColumn": 23, + "charOffset": 172188, + "charLength": 13, + "snippet": { + "text": "playerAdvance" + } + }, + "contextRegion": { + "startLine": 6058, + "startColumn": 23, + "charOffset": 172135, + "charLength": 13, + "snippet": { + "text": "\t\t\tskills[skill].percent = 0;\n\n\t\t\tg_creatureEvents().playerAdvance(static_self_cast(), skill, (skills[skill].level - 1), skills[skill].level);\n\n\t\t\tsendUpdate = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45272fe151fdcb92742c268028975a30afbe2a3774361ac80c7e8968c8db1eba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6060, + "startColumn": 73, + "charOffset": 172238, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 6058, + "startColumn": 73, + "charOffset": 172135, + "charLength": 6, + "snippet": { + "text": "\t\t\tskills[skill].percent = 0;\n\n\t\t\tg_creatureEvents().playerAdvance(static_self_cast(), skill, (skills[skill].level - 1), skills[skill].level);\n\n\t\t\tsendUpdate = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d3117f5d4c52a45a4efff307129fefbf2bde465f6c526e8b46f248c593cf80f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6060, + "startColumn": 99, + "charOffset": 172264, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 6058, + "startColumn": 99, + "charOffset": 172135, + "charLength": 6, + "snippet": { + "text": "\t\t\tskills[skill].percent = 0;\n\n\t\t\tg_creatureEvents().playerAdvance(static_self_cast(), skill, (skills[skill].level - 1), skills[skill].level);\n\n\t\t\tsendUpdate = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8f6ee488d5cb9d4016aca693e3a80e09b63c13dc81a30ae6bcf18db37b0a202" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6064, + "startColumn": 53, + "charOffset": 172393, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 6062, + "startColumn": 53, + "charOffset": 172287, + "charLength": 6, + "snippet": { + "text": "\t\t\tsendUpdate = true;\n\t\t\tcurrReqTries = nextReqTries;\n\t\t\tnextReqTries = vocation->getReqSkillTries(skill, skills[skill].level + 1);\n\n\t\t\tif (currReqTries >= nextReqTries) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "203786851a5112b1814203b41c58ddd48dacbe21f35c873346ba652b51a15654" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6072, + "startColumn": 3, + "charOffset": 172497, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 6070, + "startColumn": 3, + "charOffset": 172490, + "charLength": 6, + "snippet": { + "text": "\t\t}\n\n\t\tskills[skill].tries += tries;\n\n\t\tif (currSkillLevel != skills[skill].level) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49ad6cbae2bc2e19426a09cfeb42ca95a3b42c71c1209188c83edcd561f810dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6074, + "startColumn": 25, + "charOffset": 172552, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 6072, + "startColumn": 25, + "charOffset": 172495, + "charLength": 6, + "snippet": { + "text": "\t\tskills[skill].tries += tries;\n\n\t\tif (currSkillLevel != skills[skill].level) {\n\t\t\tstd::ostringstream ss;\n\t\t\tss << \"You advanced to \" << getSkillName(skill) << \" level \" << skills[skill].level << '.';" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc22d1c49c1b5db7a80dfa95e98f90617a617ca6809b2f8a6451fa09ca38ab8f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6076, + "startColumn": 68, + "charOffset": 172668, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 6074, + "startColumn": 68, + "charOffset": 172528, + "charLength": 6, + "snippet": { + "text": "\t\tif (currSkillLevel != skills[skill].level) {\n\t\t\tstd::ostringstream ss;\n\t\t\tss << \"You advanced to \" << getSkillName(skill) << \" level \" << skills[skill].level << '.';\n\t\t\tsendTextMessage(MESSAGE_EVENT_ADVANCE, ss.str());\n\t\t\tif (skill == SKILL_LEVEL) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aae5f589ce7019374fdc2f9178cb3233d731321eb5c0d0fd8b61b2f4019c5424" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'newPercent' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6085, + "startColumn": 11, + "charOffset": 172910, + "charLength": 10, + "snippet": { + "text": "newPercent" + } + }, + "contextRegion": { + "startLine": 6083, + "startColumn": 11, + "charOffset": 172895, + "charLength": 10, + "snippet": { + "text": "\t\t}\n\n\t\tuint8_t newPercent;\n\t\tif (nextReqTries > currReqTries) {\n\t\t\tnewPercent = Player::getPercentLevel(skills[skill].tries, nextReqTries);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e8fda8824b929a4d06bf8ef6082fbb7bd51d3e932fc0753d7c935ad93454860" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-12", + "ruleIndex": 424, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-12: signed char and unsigned char type shall only be used for the storage and use of numeric values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6087, + "startColumn": 4, + "charOffset": 172962, + "charLength": 10, + "snippet": { + "text": "newPercent" + } + }, + "contextRegion": { + "startLine": 6085, + "startColumn": 4, + "charOffset": 172900, + "charLength": 10, + "snippet": { + "text": "\t\tuint8_t newPercent;\n\t\tif (nextReqTries > currReqTries) {\n\t\t\tnewPercent = Player::getPercentLevel(skills[skill].tries, nextReqTries);\n\t\t\tnewPercentToNextLevel = static_cast(skills[skill].tries * 100) / nextReqTries;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db48f55a1730a3f5d54059daf14c74f2e9a60cbe9900ff20a9d88e38dc0663fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6087, + "startColumn": 17, + "charOffset": 172975, + "charLength": 6, + "snippet": { + "text": "Player" + } + }, + "contextRegion": { + "startLine": 6085, + "startColumn": 17, + "charOffset": 172900, + "charLength": 6, + "snippet": { + "text": "\t\tuint8_t newPercent;\n\t\tif (nextReqTries > currReqTries) {\n\t\t\tnewPercent = Player::getPercentLevel(skills[skill].tries, nextReqTries);\n\t\t\tnewPercentToNextLevel = static_cast(skills[skill].tries * 100) / nextReqTries;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8f658c27912a93d2486f228da68d7b928a56788b404a2099f3d14260bed4d16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6087, + "startColumn": 17, + "charOffset": 172975, + "charLength": 6, + "snippet": { + "text": "Player" + } + }, + "contextRegion": { + "startLine": 6085, + "startColumn": 17, + "charOffset": 172900, + "charLength": 6, + "snippet": { + "text": "\t\tuint8_t newPercent;\n\t\tif (nextReqTries > currReqTries) {\n\t\t\tnewPercent = Player::getPercentLevel(skills[skill].tries, nextReqTries);\n\t\t\tnewPercentToNextLevel = static_cast(skills[skill].tries * 100) / nextReqTries;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43e0b60d31d8f9f08022bae79f1a827b0628ec9284eafbb7e90c3f81fc85a005" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6087, + "startColumn": 41, + "charOffset": 172999, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 6085, + "startColumn": 41, + "charOffset": 172900, + "charLength": 6, + "snippet": { + "text": "\t\tuint8_t newPercent;\n\t\tif (nextReqTries > currReqTries) {\n\t\t\tnewPercent = Player::getPercentLevel(skills[skill].tries, nextReqTries);\n\t\t\tnewPercentToNextLevel = static_cast(skills[skill].tries * 100) / nextReqTries;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08fd1c691fd55d4f14a08b13e1e30ff09c844344cbe2ebea4e5a1fe5b8c18734" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6088, + "startColumn": 53, + "charOffset": 173087, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 6086, + "startColumn": 53, + "charOffset": 172922, + "charLength": 6, + "snippet": { + "text": "\t\tif (nextReqTries > currReqTries) {\n\t\t\tnewPercent = Player::getPercentLevel(skills[skill].tries, nextReqTries);\n\t\t\tnewPercentToNextLevel = static_cast(skills[skill].tries * 100) / nextReqTries;\n\t\t} else {\n\t\t\tnewPercent = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4568e5f98000ad4287bb83a18468828072bfd8df08ffa1abe9fc22f5fb096c13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6088, + "startColumn": 75, + "charOffset": 173109, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 6086, + "startColumn": 75, + "charOffset": 172922, + "charLength": 3, + "snippet": { + "text": "\t\tif (nextReqTries > currReqTries) {\n\t\t\tnewPercent = Player::getPercentLevel(skills[skill].tries, nextReqTries);\n\t\t\tnewPercentToNextLevel = static_cast(skills[skill].tries * 100) / nextReqTries;\n\t\t} else {\n\t\t\tnewPercent = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd73f7a9390c4b7dd9004f7588fb6d43512c54d75d94a1b7c592dfbf0d24f9f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6088, + "startColumn": 82, + "charOffset": 173116, + "charLength": 12, + "snippet": { + "text": "nextReqTries" + } + }, + "contextRegion": { + "startLine": 6086, + "startColumn": 82, + "charOffset": 172922, + "charLength": 12, + "snippet": { + "text": "\t\tif (nextReqTries > currReqTries) {\n\t\t\tnewPercent = Player::getPercentLevel(skills[skill].tries, nextReqTries);\n\t\t\tnewPercentToNextLevel = static_cast(skills[skill].tries * 100) / nextReqTries;\n\t\t} else {\n\t\t\tnewPercent = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a63e0649df383372fd5fa47c6844242d062de94eb727c2c73e124f0c14f1d0da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6091, + "startColumn": 28, + "charOffset": 173187, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 6089, + "startColumn": 28, + "charOffset": 173130, + "charLength": 1, + "snippet": { + "text": "\t\t} else {\n\t\t\tnewPercent = 0;\n\t\t\tnewPercentToNextLevel = 0;\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b4f78f6c40a82f2388383ff3b7de52603ce54956a75dd9ef4d672fdb6ec01e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6094, + "startColumn": 7, + "charOffset": 173201, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 6092, + "startColumn": 7, + "charOffset": 173190, + "charLength": 6, + "snippet": { + "text": "\t\t}\n\n\t\tif (skills[skill].percent != newPercent) {\n\t\t\tskills[skill].percent = newPercent;\n\t\t\tsendUpdate = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03671f513e2ce7d6359c9b5d289be3ba3efb705132bd99899c1fc45ade3bd5aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6094, + "startColumn": 32, + "charOffset": 173226, + "charLength": 10, + "snippet": { + "text": "newPercent" + } + }, + "contextRegion": { + "startLine": 6092, + "startColumn": 32, + "charOffset": 173190, + "charLength": 10, + "snippet": { + "text": "\t\t}\n\n\t\tif (skills[skill].percent != newPercent) {\n\t\t\tskills[skill].percent = newPercent;\n\t\t\tsendUpdate = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b56c3ac93386e6004461769b2d78128d395849e05c7f4e89a97b206461d44c63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6095, + "startColumn": 4, + "charOffset": 173243, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 6093, + "startColumn": 4, + "charOffset": 173194, + "charLength": 6, + "snippet": { + "text": "\n\t\tif (skills[skill].percent != newPercent) {\n\t\t\tskills[skill].percent = newPercent;\n\t\t\tsendUpdate = true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f866e197610c1f98e935f7c27832670ff5532f4f73a6d4a404d2e955a40e2b07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6095, + "startColumn": 28, + "charOffset": 173267, + "charLength": 10, + "snippet": { + "text": "newPercent" + } + }, + "contextRegion": { + "startLine": 6093, + "startColumn": 28, + "charOffset": 173194, + "charLength": 10, + "snippet": { + "text": "\n\t\tif (skills[skill].percent != newPercent) {\n\t\t\tskills[skill].percent = newPercent;\n\t\t\tsendUpdate = true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f94b21db0d15b5e8f0e7714268b9b453ed3c996bfcda427ff5f44c8b8073c08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6099, + "startColumn": 19, + "charOffset": 173324, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 6097, + "startColumn": 19, + "charOffset": 173301, + "charLength": 6, + "snippet": { + "text": "\t\t}\n\n\t\tnewSkillValue = skills[skill].level;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "120ab136ea9d1dcfcf00e5cc76f8d382353bda7eb08ba4cdb93edf8bdd867d6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6127, + "startColumn": 2, + "charOffset": 174030, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 6125, + "startColumn": 2, + "charOffset": 173968, + "charLength": 3, + "snippet": { + "text": "\nvoid Player::onModalWindowHandled(uint32_t modalWindowId) {\n\tstd::erase(modalWindows, modalWindowId);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "adeff3250671ebe5aa43a0af09c4ec19785415437347e2f8cf4aa4dec829f1f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6131, + "startColumn": 6, + "charOffset": 174142, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6129, + "startColumn": 6, + "charOffset": 174073, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::sendModalWindow(const ModalWindow &modalWindow) {\n\tif (!client) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "acd2836cab20765dec654f1cd6c2589b0ecd44e8ee1ec9e374485c70a716fdd9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6135, + "startColumn": 15, + "charOffset": 174181, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 6133, + "startColumn": 15, + "charOffset": 174163, + "charLength": 12, + "snippet": { + "text": "\t}\n\n\tmodalWindows.emplace_back(modalWindow.id);\n\tclient->sendModalWindow(modalWindow);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be21f5c8edb3dbd9720678497b6c1239aa218d8156e6357d5dc5321c07ca1022" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6148, + "startColumn": 13, + "charOffset": 174503, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 6146, + "startColumn": 13, + "charOffset": 174433, + "charLength": 6, + "snippet": { + "text": "\n\t\tstdext::vector_set> helperSet;\n\t\thelperSet.insert(helperSet.end(), guildMembers.begin(), guildMembers.end());\n\t\thelperSet.insertAll(m_party->getMembers());\n\t\thelperSet.insertAll(m_party->getInvitees());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed2bd31783d8de3d5cf3967b4be8c6e43f5e48f357de4615fbb05ae5089a17d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6149, + "startColumn": 13, + "charOffset": 174582, + "charLength": 9, + "snippet": { + "text": "insertAll" + } + }, + "contextRegion": { + "startLine": 6147, + "startColumn": 13, + "charOffset": 174434, + "charLength": 9, + "snippet": { + "text": "\t\tstdext::vector_set> helperSet;\n\t\thelperSet.insert(helperSet.end(), guildMembers.begin(), guildMembers.end());\n\t\thelperSet.insertAll(m_party->getMembers());\n\t\thelperSet.insertAll(m_party->getInvitees());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f93c37a70f7a91c165c7bf4c4db75a4bf851c437eff9b3399a821c78df049b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6150, + "startColumn": 13, + "charOffset": 174628, + "charLength": 9, + "snippet": { + "text": "insertAll" + } + }, + "contextRegion": { + "startLine": 6148, + "startColumn": 13, + "charOffset": 174491, + "charLength": 9, + "snippet": { + "text": "\t\thelperSet.insert(helperSet.end(), guildMembers.begin(), guildMembers.end());\n\t\thelperSet.insertAll(m_party->getMembers());\n\t\thelperSet.insertAll(m_party->getInvitees());\n\n\t\thelperSet.emplace(m_party->getLeader());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8093a5b2092f642bd0de20c6ec61a6869af3caacf8f814862d476a9bf282040" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6152, + "startColumn": 13, + "charOffset": 174676, + "charLength": 7, + "snippet": { + "text": "emplace" + } + }, + "contextRegion": { + "startLine": 6150, + "startColumn": 13, + "charOffset": 174616, + "charLength": 7, + "snippet": { + "text": "\t\thelperSet.insertAll(m_party->getInvitees());\n\n\t\thelperSet.emplace(m_party->getLeader());\n\n\t\treturn static_cast(helperSet.size());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9a3697aaed03defbed1105f60b3105393faa9b7002f4cf93095cf4fece8d401" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6165, + "startColumn": 9, + "charOffset": 174966, + "charLength": 2, + "snippet": { + "text": "0u" + } + }, + "contextRegion": { + "startLine": 6163, + "startColumn": 9, + "charOffset": 174954, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\treturn 0u;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e83f1a2f5c8e2598c2dd92129ec797f6dfba61bb98d2de0a5a3d7e3b09378b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "integer literal has suffix 'u', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6165, + "startColumn": 9, + "charOffset": 174966, + "charLength": 2, + "snippet": { + "text": "0u" + } + }, + "contextRegion": { + "startLine": 6163, + "startColumn": 9, + "charOffset": 174954, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\treturn 0u;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd61c6100feb4d3cc6a07392b2b8e3b81438c3536e3600ae3e98ec7c01588f8d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6170, + "startColumn": 12, + "charOffset": 175101, + "charLength": 21, + "snippet": { + "text": "removeUserFromChannel" + } + }, + "contextRegion": { + "startLine": 6168, + "startColumn": 12, + "charOffset": 174973, + "charLength": 21, + "snippet": { + "text": "void Player::sendClosePrivate(uint16_t channelId) {\n\tif (channelId == CHANNEL_GUILD || channelId == CHANNEL_PARTY) {\n\t\tg_chat().removeUserFromChannel(getPlayer(), channelId);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5386a5fac3a63366cc4190a4c50d18003e9e5feb0e291cb6a360d20c805fb4b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6179, + "startColumn": 6, + "charOffset": 175244, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6177, + "startColumn": 6, + "charOffset": 175211, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::sendIcons() {\n\tif (!client) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8038362b213da413207afdf8f0d74f99815c08c1424015965862aa7351c24767" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6185, + "startColumn": 2, + "charOffset": 175391, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6183, + "startColumn": 2, + "charOffset": 175269, + "charLength": 3, + "snippet": { + "text": "\t// Iterates over the Bakragore icons to check if the player has any\n\tIconBakragore iconBakragore = IconBakragore::None;\n\tfor (auto icon : magic_enum::enum_values()) {\n\t\tif (icon == IconBakragore::None) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d04ab07b6dfd5253e18ed58e1c079d384e6ec525aee3f5a29128216ef5d18f65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6199, + "startColumn": 24, + "charOffset": 175906, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 6197, + "startColumn": 24, + "charOffset": 175795, + "charLength": 1, + "snippet": { + "text": "\t// Remove the last icon so that Bakragore's is added\n\tauto iconSet = getClientIcons();\n\tif (iconSet.size() >= 9 && iconBakragore != IconBakragore::None) {\n\t\ticonSet.erase(std::prev(iconSet.end()));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58680f59fdbf6cdf9777915f326e86775f29ea081ff1375271ca3f93eda329d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6200, + "startColumn": 11, + "charOffset": 175961, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 6198, + "startColumn": 11, + "charOffset": 175849, + "charLength": 5, + "snippet": { + "text": "\tauto iconSet = getClientIcons();\n\tif (iconSet.size() >= 9 && iconBakragore != IconBakragore::None) {\n\t\ticonSet.erase(std::prev(iconSet.end()));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5b9653456e94e5c638ba93aaf8d299ff90d4e02661de6dd05dda926c3e53817" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'achievementsUnlocked' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6214, + "startColumn": 64, + "charOffset": 176383, + "charLength": 20, + "snippet": { + "text": "achievementsUnlocked" + } + }, + "contextRegion": { + "startLine": 6212, + "startColumn": 64, + "charOffset": 176160, + "charLength": 20, + "snippet": { + "text": "void Player::sendCyclopediaCharacterAchievements(uint16_t secretsUnlocked, std::vector> achievementsUnlocked) {\n\tif (client) {\n\t\tclient->sendCyclopediaCharacterAchievements(secretsUnlocked, achievementsUnlocked);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "935ef676dfcac633bd472150e0548745c4c9a9b0fb8b3bbb306720105f09d8cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6222, + "startColumn": 2, + "charOffset": 176529, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6220, + "startColumn": 2, + "charOffset": 176501, + "charLength": 3, + "snippet": { + "text": "\tuint64_t moneyCount = 0;\n\n\tfor (int32_t i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; ++i) {\n\t\tstd::shared_ptr item = inventory[i];\n\t\tif (!item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "778aa67f1b721cb7c318e56d7c854c1dd93aa6f37a9c4c9a29c99fd5a0484c74" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6223, + "startColumn": 32, + "charOffset": 176624, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 6221, + "startColumn": 32, + "charOffset": 176527, + "charLength": 9, + "snippet": { + "text": "\n\tfor (int32_t i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; ++i) {\n\t\tstd::shared_ptr item = inventory[i];\n\t\tif (!item) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0a479b6bd63a61c360481fb78d7cb52eb3ae34a102a4938919e0d6bc510447e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6224, + "startColumn": 7, + "charOffset": 176644, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6222, + "startColumn": 7, + "charOffset": 176528, + "charLength": 1, + "snippet": { + "text": "\tfor (int32_t i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; ++i) {\n\t\tstd::shared_ptr item = inventory[i];\n\t\tif (!item) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13510e4a2bfd51023e5ec6470b8b01b14c6faf25d63b8e18d4df985ec84bec1a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6239, + "startColumn": 3, + "charOffset": 176951, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6237, + "startColumn": 3, + "charOffset": 176858, + "charLength": 3, + "snippet": { + "text": "\twhile (i < containers.size()) {\n\t\tstd::shared_ptr container = containers[i++];\n\t\tfor (const std::shared_ptr &item : container->getItemList()) {\n\t\t\tstd::shared_ptr tmpContainer = item->getContainer();\n\t\t\tif (tmpContainer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "782facb4dfa0ecf6a416ca4a0490a168131b659d5875b31156244401416df335" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6256, + "startColumn": 2, + "charOffset": 177390, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6254, + "startColumn": 2, + "charOffset": 177357, + "charLength": 3, + "snippet": { + "text": "\n\t// Check items from inventory\n\tfor (const auto &item : getAllInventoryItems()) {\n\t\tif (!item) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1073b52dc0d074d5e223de72d50e874b780f589a96dbfa089a414bb1dffe35a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6257, + "startColumn": 7, + "charOffset": 177446, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6255, + "startColumn": 7, + "charOffset": 177358, + "charLength": 1, + "snippet": { + "text": "\t// Check items from inventory\n\tfor (const auto &item : getAllInventoryItems()) {\n\t\tif (!item) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5f99680c2ca8256eda586f5366d9900bd7f34f54e26540c0ff0f7f38cf8e4f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6266, + "startColumn": 2, + "charOffset": 177585, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6264, + "startColumn": 2, + "charOffset": 177556, + "charLength": 3, + "snippet": { + "text": "\n\t// Check items from stash\n\tfor (StashItemList stashToSend = getStashItems();\n\t auto [itemId, itemCount] : stashToSend) {\n\t\tif (itemId == ITEM_FORGE_SLIVER) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eebad8d6a8bf1c423ef5e73b9cbaf28d87999312a4d6fccb5b84ddf867aff296" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6280, + "startColumn": 2, + "charOffset": 177917, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 6278, + "startColumn": 2, + "charOffset": 177873, + "charLength": 2, + "snippet": { + "text": "\nsize_t Player::getMaxDepotItems() const {\n\tif (group->maxDepotItems != 0) {\n\t\treturn group->maxDepotItems;\n\t} else if (isPremium()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c260fce66dda4dd69449a01ab8461cc72e78bcfdf2045824840cb7fa3b61986" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6282, + "startColumn": 4, + "charOffset": 177984, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 6280, + "startColumn": 4, + "charOffset": 177916, + "charLength": 4, + "snippet": { + "text": "\tif (group->maxDepotItems != 0) {\n\t\treturn group->maxDepotItems;\n\t} else if (isPremium()) {\n\t\treturn g_configManager().getNumber(PREMIUM_DEPOT_LIMIT, __FUNCTION__);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27079fff43913e5c84718a2048488a19c3b1d2606e6e8e7b0df61af0a7b99a22" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6292, + "startColumn": 2, + "charOffset": 178335, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6290, + "startColumn": 2, + "charOffset": 178289, + "charLength": 3, + "snippet": { + "text": "\tmuteConditions.reserve(conditions.size());\n\n\tfor (const std::shared_ptr &condition : conditions) {\n\t\tif (condition->getTicks() <= 0) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7002ccf49bc949b75b078bb9f04512fecf171fe7e3661003d5f689cfd556444f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6302, + "startColumn": 18, + "charOffset": 178639, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 6300, + "startColumn": 18, + "charOffset": 178617, + "charLength": 12, + "snippet": { + "text": "\t\t}\n\n\t\tmuteConditions.emplace_back(condition);\n\t}\n\treturn muteConditions;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31d02d18412fa825d5df3a208ce0d1801c3057710c1fe4441a517f93c5831239" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'newGuild' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6307, + "startColumn": 52, + "charOffset": 178745, + "charLength": 8, + "snippet": { + "text": "newGuild" + } + }, + "contextRegion": { + "startLine": 6305, + "startColumn": 52, + "charOffset": 178691, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Player::setGuild(const std::shared_ptr newGuild) {\n\tif (newGuild == guild) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5059e2d9ca95cac28488acbe1acbd5c96c0175fe84543fde54622491fcc5ee4b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6322, + "startColumn": 7, + "charOffset": 179000, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6320, + "startColumn": 7, + "charOffset": 178928, + "charLength": 1, + "snippet": { + "text": "\tif (newGuild) {\n\t\tconst auto rank = newGuild->getRankByLevel(1);\n\t\tif (!rank) {\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cee2d15234bd33c66ee18382a05a5559e31311b95aa68ccf12c0c1fb16bff6df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6333, + "startColumn": 6, + "charOffset": 179163, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6331, + "startColumn": 6, + "charOffset": 179121, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::updateRegeneration() {\n\tif (!vocation) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38d9e59c64b1af13c12014ee212d0d6d5575f114b65be8d47a7709c1d90dc057" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6339, + "startColumn": 14, + "charOffset": 179320, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 6337, + "startColumn": 14, + "charOffset": 179190, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr condition = getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT);\n\tif (condition) {\n\t\tcondition->setParam(CONDITION_PARAM_HEALTHGAIN, vocation->getHealthGainAmount());\n\t\tcondition->setParam(CONDITION_PARAM_HEALTHTICKS, vocation->getHealthGainTicks());\n\t\tcondition->setParam(CONDITION_PARAM_MANAGAIN, vocation->getManaGainAmount());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72e9397893e281acdd8832f845f8b6685a1292ce2aaf5bf744afe08b7741a1f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6339, + "startColumn": 51, + "charOffset": 179357, + "charLength": 8, + "snippet": { + "text": "vocation" + } + }, + "contextRegion": { + "startLine": 6337, + "startColumn": 51, + "charOffset": 179190, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr condition = getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT);\n\tif (condition) {\n\t\tcondition->setParam(CONDITION_PARAM_HEALTHGAIN, vocation->getHealthGainAmount());\n\t\tcondition->setParam(CONDITION_PARAM_HEALTHTICKS, vocation->getHealthGainTicks());\n\t\tcondition->setParam(CONDITION_PARAM_MANAGAIN, vocation->getManaGainAmount());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c0943b8785edc5baf34a2d127565e36c8135402fa535a0b0a7c08afc2820967" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6340, + "startColumn": 14, + "charOffset": 179404, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 6338, + "startColumn": 14, + "charOffset": 179289, + "charLength": 8, + "snippet": { + "text": "\tif (condition) {\n\t\tcondition->setParam(CONDITION_PARAM_HEALTHGAIN, vocation->getHealthGainAmount());\n\t\tcondition->setParam(CONDITION_PARAM_HEALTHTICKS, vocation->getHealthGainTicks());\n\t\tcondition->setParam(CONDITION_PARAM_MANAGAIN, vocation->getManaGainAmount());\n\t\tcondition->setParam(CONDITION_PARAM_MANATICKS, vocation->getManaGainTicks());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b127b69747bf17cd0c6314d1d663c2bdb4460cf8004998b9cde19050a98171e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6340, + "startColumn": 52, + "charOffset": 179442, + "charLength": 8, + "snippet": { + "text": "vocation" + } + }, + "contextRegion": { + "startLine": 6338, + "startColumn": 52, + "charOffset": 179289, + "charLength": 8, + "snippet": { + "text": "\tif (condition) {\n\t\tcondition->setParam(CONDITION_PARAM_HEALTHGAIN, vocation->getHealthGainAmount());\n\t\tcondition->setParam(CONDITION_PARAM_HEALTHTICKS, vocation->getHealthGainTicks());\n\t\tcondition->setParam(CONDITION_PARAM_MANAGAIN, vocation->getManaGainAmount());\n\t\tcondition->setParam(CONDITION_PARAM_MANATICKS, vocation->getManaGainTicks());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea3a6e39bbf69a30c4326f4795c041a0a1bb0d191f1809098456534acf3188ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6341, + "startColumn": 14, + "charOffset": 179488, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 6339, + "startColumn": 14, + "charOffset": 179307, + "charLength": 8, + "snippet": { + "text": "\t\tcondition->setParam(CONDITION_PARAM_HEALTHGAIN, vocation->getHealthGainAmount());\n\t\tcondition->setParam(CONDITION_PARAM_HEALTHTICKS, vocation->getHealthGainTicks());\n\t\tcondition->setParam(CONDITION_PARAM_MANAGAIN, vocation->getManaGainAmount());\n\t\tcondition->setParam(CONDITION_PARAM_MANATICKS, vocation->getManaGainTicks());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eea50e5b60dd9ea47722f58deadfb73707d5814bc2edaf4b21768c0e0f5ec2c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6341, + "startColumn": 49, + "charOffset": 179523, + "charLength": 8, + "snippet": { + "text": "vocation" + } + }, + "contextRegion": { + "startLine": 6339, + "startColumn": 49, + "charOffset": 179307, + "charLength": 8, + "snippet": { + "text": "\t\tcondition->setParam(CONDITION_PARAM_HEALTHGAIN, vocation->getHealthGainAmount());\n\t\tcondition->setParam(CONDITION_PARAM_HEALTHTICKS, vocation->getHealthGainTicks());\n\t\tcondition->setParam(CONDITION_PARAM_MANAGAIN, vocation->getManaGainAmount());\n\t\tcondition->setParam(CONDITION_PARAM_MANATICKS, vocation->getManaGainTicks());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f1d2bebee472c4ba65d6ebdf3080b32cb0fe32fa5e8730692b03cf0e751c0cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6342, + "startColumn": 14, + "charOffset": 179568, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 6340, + "startColumn": 14, + "charOffset": 179391, + "charLength": 8, + "snippet": { + "text": "\t\tcondition->setParam(CONDITION_PARAM_HEALTHTICKS, vocation->getHealthGainTicks());\n\t\tcondition->setParam(CONDITION_PARAM_MANAGAIN, vocation->getManaGainAmount());\n\t\tcondition->setParam(CONDITION_PARAM_MANATICKS, vocation->getManaGainTicks());\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b86f7fa14e5bf7e0dc7c393b3d084ca3f9540b46d8031a10690cc836030a384f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6342, + "startColumn": 50, + "charOffset": 179604, + "charLength": 8, + "snippet": { + "text": "vocation" + } + }, + "contextRegion": { + "startLine": 6340, + "startColumn": 50, + "charOffset": 179391, + "charLength": 8, + "snippet": { + "text": "\t\tcondition->setParam(CONDITION_PARAM_HEALTHTICKS, vocation->getHealthGainTicks());\n\t\tcondition->setParam(CONDITION_PARAM_MANAGAIN, vocation->getManaGainAmount());\n\t\tcondition->setParam(CONDITION_PARAM_MANATICKS, vocation->getManaGainTicks());\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da5a20065af97955a7ccc930370f91b1055ccadd13e9c2f51c3117f97de6797d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6357, + "startColumn": 42, + "charOffset": 179999, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 6355, + "startColumn": 42, + "charOffset": 179884, + "charLength": 5, + "snippet": { + "text": "void Player::setImmuneFear() {\n\tm_fearCondition.first = CONDITION_FEARED;\n\tm_fearCondition.second = OTSYS_TIME() + 10000;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8df4edea27ee43a71bd64939f58db16c43e5e8eef73a8bf50247e60e934de533" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6377, + "startColumn": 6, + "charOffset": 180591, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6375, + "startColumn": 6, + "charOffset": 180475, + "charLength": 1, + "snippet": { + "text": "uint16_t Player::getFreeBackpackSlots() const {\n\tstd::shared_ptr thing = getThing(CONST_SLOT_BACKPACK);\n\tif (!thing) {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf6023b9eb38c68c58ddfefbeb43feaf2ec3854fd2d8d925915d82e48ada46c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6382, + "startColumn": 6, + "charOffset": 180684, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6380, + "startColumn": 6, + "charOffset": 180616, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr backpack = thing->getContainer();\n\tif (!backpack) {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a188bd075e284f2bcc0a1356deb4a78939a571572fab1809edc2073d2fd469f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6394, + "startColumn": 2, + "charOffset": 180925, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6392, + "startColumn": 2, + "charOffset": 180868, + "charLength": 3, + "snippet": { + "text": "\tbool requestUpdate = false;\n\t// Check imbuement skills\n\tfor (int32_t skill = SKILL_FIRST; skill <= SKILL_LAST; ++skill) {\n\t\tif (imbuement->skills[skill]) {\n\t\t\trequestUpdate = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea30442d7f04408222db8edadb5d6efd82077353368dff05580ce057fe4fc174" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6395, + "startColumn": 7, + "charOffset": 180997, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 6393, + "startColumn": 7, + "charOffset": 180897, + "charLength": 9, + "snippet": { + "text": "\t// Check imbuement skills\n\tfor (int32_t skill = SKILL_FIRST; skill <= SKILL_LAST; ++skill) {\n\t\tif (imbuement->skills[skill]) {\n\t\t\trequestUpdate = true;\n\t\t\tsetVarSkill(static_cast(skill), imbuement->skills[skill]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1674d985d7eccaac5d5f8e2c5755a2dd3bf504c5460eeaa86222e5bfff9205f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6395, + "startColumn": 7, + "charOffset": 180997, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 6393, + "startColumn": 7, + "charOffset": 180897, + "charLength": 9, + "snippet": { + "text": "\t// Check imbuement skills\n\tfor (int32_t skill = SKILL_FIRST; skill <= SKILL_LAST; ++skill) {\n\t\tif (imbuement->skills[skill]) {\n\t\t\trequestUpdate = true;\n\t\t\tsetVarSkill(static_cast(skill), imbuement->skills[skill]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4da9f74c109d5aa51a868b1b57a30047b1ac84089b8f6ea676e29d19fd731d36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6395, + "startColumn": 7, + "charOffset": 180997, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 6393, + "startColumn": 7, + "charOffset": 180897, + "charLength": 9, + "snippet": { + "text": "\t// Check imbuement skills\n\tfor (int32_t skill = SKILL_FIRST; skill <= SKILL_LAST; ++skill) {\n\t\tif (imbuement->skills[skill]) {\n\t\t\trequestUpdate = true;\n\t\t\tsetVarSkill(static_cast(skill), imbuement->skills[skill]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8bf93a1a1991b6a6fa1312ec1ea4a8f464e466c8f8b3c1b56c925ac21e01a8c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6397, + "startColumn": 46, + "charOffset": 181095, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 6395, + "startColumn": 46, + "charOffset": 180991, + "charLength": 9, + "snippet": { + "text": "\t\tif (imbuement->skills[skill]) {\n\t\t\trequestUpdate = true;\n\t\t\tsetVarSkill(static_cast(skill), imbuement->skills[skill]);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1c67e0d8c707c893419c1c7459f3cbcdfecbf56ec00c839f460b60fa2034f1e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6402, + "startColumn": 2, + "charOffset": 181163, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6400, + "startColumn": 2, + "charOffset": 181129, + "charLength": 3, + "snippet": { + "text": "\n\t// Check imbuement magic level\n\tfor (int32_t stat = STAT_FIRST; stat <= STAT_LAST; ++stat) {\n\t\tif (imbuement->stats[stat]) {\n\t\t\trequestUpdate = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27c5b50e2ff7932b70ec0f8368600e262ba67ba9a15e0ec51984d615041a6591" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6403, + "startColumn": 7, + "charOffset": 181230, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 6401, + "startColumn": 7, + "charOffset": 181130, + "charLength": 9, + "snippet": { + "text": "\t// Check imbuement magic level\n\tfor (int32_t stat = STAT_FIRST; stat <= STAT_LAST; ++stat) {\n\t\tif (imbuement->stats[stat]) {\n\t\t\trequestUpdate = true;\n\t\t\tsetVarStats(static_cast(stat), imbuement->stats[stat]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60c6a4ce90da1ac773987f42de73026922f72cbd386df5b0bd7e8d640ba2d4dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6403, + "startColumn": 7, + "charOffset": 181230, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 6401, + "startColumn": 7, + "charOffset": 181130, + "charLength": 9, + "snippet": { + "text": "\t// Check imbuement magic level\n\tfor (int32_t stat = STAT_FIRST; stat <= STAT_LAST; ++stat) {\n\t\tif (imbuement->stats[stat]) {\n\t\t\trequestUpdate = true;\n\t\t\tsetVarStats(static_cast(stat), imbuement->stats[stat]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61e01a53595663d0bb4a9ea9b1008653fc33d52be7772c37ef9c1b6867d2ac8d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6403, + "startColumn": 7, + "charOffset": 181230, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 6401, + "startColumn": 7, + "charOffset": 181130, + "charLength": 9, + "snippet": { + "text": "\t// Check imbuement magic level\n\tfor (int32_t stat = STAT_FIRST; stat <= STAT_LAST; ++stat) {\n\t\tif (imbuement->stats[stat]) {\n\t\t\trequestUpdate = true;\n\t\t\tsetVarStats(static_cast(stat), imbuement->stats[stat]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae0dfb59c1d2ee106c51a54c438dc1bf0ed6ce0a1be40d1c3db190634e4279a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6405, + "startColumn": 44, + "charOffset": 181324, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 6403, + "startColumn": 44, + "charOffset": 181224, + "charLength": 9, + "snippet": { + "text": "\t\tif (imbuement->stats[stat]) {\n\t\t\trequestUpdate = true;\n\t\t\tsetVarStats(static_cast(stat), imbuement->stats[stat]);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c8ca36de8e0b4d62e7ee28384e419aaa97bb24d8737216febc501e6c07f395e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6417, + "startColumn": 54, + "charOffset": 181622, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 6415, + "startColumn": 54, + "charOffset": 181512, + "charLength": 3, + "snippet": { + "text": "\tif (imbuement->capacity != 0) {\n\t\trequestUpdate = true;\n\t\tbonusCapacity = (capacity * imbuement->capacity) / 100;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08e707306d37f5e4799b3bb3cf128953141c671275427ed3e980b256b4c7c183" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6427, + "startColumn": 6, + "charOffset": 181763, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6425, + "startColumn": 6, + "charOffset": 181689, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::removeItemImbuementStats(const Imbuement* imbuement) {\n\tif (!imbuement) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24ce144856b8da604645286e417456a455322131f7677d8f0ceb2a6dd9a50f16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const Imbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6427, + "startColumn": 7, + "charOffset": 181764, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 6425, + "startColumn": 7, + "charOffset": 181689, + "charLength": 9, + "snippet": { + "text": "\nvoid Player::removeItemImbuementStats(const Imbuement* imbuement) {\n\tif (!imbuement) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e327e73164467e1fdd812ff443aa77efaafcc2123ee6a7b22b5ea061fc6f2b4b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6433, + "startColumn": 2, + "charOffset": 181822, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6431, + "startColumn": 2, + "charOffset": 181791, + "charLength": 3, + "snippet": { + "text": "\tbool requestUpdate = false;\n\n\tfor (int32_t skill = SKILL_FIRST; skill <= SKILL_LAST; ++skill) {\n\t\tif (imbuement->skills[skill]) {\n\t\t\trequestUpdate = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3b17de89d25bf5c499817bbaf33e5754dcff2c5a8504027cf20587fd02b409b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6434, + "startColumn": 7, + "charOffset": 181894, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 6432, + "startColumn": 7, + "charOffset": 181820, + "charLength": 9, + "snippet": { + "text": "\n\tfor (int32_t skill = SKILL_FIRST; skill <= SKILL_LAST; ++skill) {\n\t\tif (imbuement->skills[skill]) {\n\t\t\trequestUpdate = true;\n\t\t\tsetVarSkill(static_cast(skill), -imbuement->skills[skill]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6dcf29185169d8af736afd8454956f8825ff9d043c55fd364efbd1ca13286426" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6434, + "startColumn": 7, + "charOffset": 181894, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 6432, + "startColumn": 7, + "charOffset": 181820, + "charLength": 9, + "snippet": { + "text": "\n\tfor (int32_t skill = SKILL_FIRST; skill <= SKILL_LAST; ++skill) {\n\t\tif (imbuement->skills[skill]) {\n\t\t\trequestUpdate = true;\n\t\t\tsetVarSkill(static_cast(skill), -imbuement->skills[skill]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b576b9738f18a097a36efa030455b36032a053b4dbbb0e2d8d909fe410e5ed6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6434, + "startColumn": 7, + "charOffset": 181894, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 6432, + "startColumn": 7, + "charOffset": 181820, + "charLength": 9, + "snippet": { + "text": "\n\tfor (int32_t skill = SKILL_FIRST; skill <= SKILL_LAST; ++skill) {\n\t\tif (imbuement->skills[skill]) {\n\t\t\trequestUpdate = true;\n\t\t\tsetVarSkill(static_cast(skill), -imbuement->skills[skill]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a05e1fb17846c3646cd866a941d1a298d725017cdb919f3b71143b11c2969bb2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6436, + "startColumn": 47, + "charOffset": 181993, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 6434, + "startColumn": 47, + "charOffset": 181888, + "charLength": 9, + "snippet": { + "text": "\t\tif (imbuement->skills[skill]) {\n\t\t\trequestUpdate = true;\n\t\t\tsetVarSkill(static_cast(skill), -imbuement->skills[skill]);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b453c2c3f92e657cc4c09b64d626b649c052fd3b9e069e41046c4c3eb55ad31f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6441, + "startColumn": 2, + "charOffset": 182061, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6439, + "startColumn": 2, + "charOffset": 182027, + "charLength": 3, + "snippet": { + "text": "\n\t// Check imbuement magic level\n\tfor (int32_t stat = STAT_FIRST; stat <= STAT_LAST; ++stat) {\n\t\tif (imbuement->stats[stat]) {\n\t\t\trequestUpdate = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30a9b7b8116f5ebaf0477f1d55b0bf06f44afce9a2dd8a7c7a81216d62e31080" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6442, + "startColumn": 7, + "charOffset": 182128, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 6440, + "startColumn": 7, + "charOffset": 182028, + "charLength": 9, + "snippet": { + "text": "\t// Check imbuement magic level\n\tfor (int32_t stat = STAT_FIRST; stat <= STAT_LAST; ++stat) {\n\t\tif (imbuement->stats[stat]) {\n\t\t\trequestUpdate = true;\n\t\t\tsetVarStats(static_cast(stat), -imbuement->stats[stat]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f731132047fd7289168b7a4008a7eade4b279739799fe2503434855237e30a4d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6442, + "startColumn": 7, + "charOffset": 182128, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 6440, + "startColumn": 7, + "charOffset": 182028, + "charLength": 9, + "snippet": { + "text": "\t// Check imbuement magic level\n\tfor (int32_t stat = STAT_FIRST; stat <= STAT_LAST; ++stat) {\n\t\tif (imbuement->stats[stat]) {\n\t\t\trequestUpdate = true;\n\t\t\tsetVarStats(static_cast(stat), -imbuement->stats[stat]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d62531f9f0f3bdfebd1321e0e002815daf284491d81a45d6875d776a5999befe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6442, + "startColumn": 7, + "charOffset": 182128, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 6440, + "startColumn": 7, + "charOffset": 182028, + "charLength": 9, + "snippet": { + "text": "\t// Check imbuement magic level\n\tfor (int32_t stat = STAT_FIRST; stat <= STAT_LAST; ++stat) {\n\t\tif (imbuement->stats[stat]) {\n\t\t\trequestUpdate = true;\n\t\t\tsetVarStats(static_cast(stat), -imbuement->stats[stat]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce2957f59725e752a1ebcad4453d552dbfcae861ca6a1e91c0d12f4c7adcca5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6444, + "startColumn": 45, + "charOffset": 182223, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 6442, + "startColumn": 45, + "charOffset": 182122, + "charLength": 9, + "snippet": { + "text": "\t\tif (imbuement->stats[stat]) {\n\t\t\trequestUpdate = true;\n\t\t\tsetVarStats(static_cast(stat), -imbuement->stats[stat]);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2028383aba7c164f0c7e36a00631d29acb8f69f7cba0c04dd4f28d2a3737d5fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'addItemFromStash' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6471, + "startColumn": 31, + "charOffset": 182741, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 6469, + "startColumn": 31, + "charOffset": 182708, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Player::addItemFromStash(uint16_t itemId, uint32_t itemCount) {\n\tuint32_t stackCount = 100u;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a100323ead141eb37daff28c08ddcaa7db3cc2784ea7567b29afdaaeabd47a44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6472, + "startColumn": 24, + "charOffset": 182803, + "charLength": 4, + "snippet": { + "text": "100u" + } + }, + "contextRegion": { + "startLine": 6470, + "startColumn": 24, + "charOffset": 182710, + "charLength": 4, + "snippet": { + "text": "\nbool Player::addItemFromStash(uint16_t itemId, uint32_t itemCount) {\n\tuint32_t stackCount = 100u;\n\n\twhile (itemCount > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd701169d0598f0ff0fd8e63037aeaa589def4487a883b6777566b26f9ae9a1a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "integer literal has suffix 'u', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6472, + "startColumn": 24, + "charOffset": 182803, + "charLength": 4, + "snippet": { + "text": "100u" + } + }, + "contextRegion": { + "startLine": 6470, + "startColumn": 24, + "charOffset": 182710, + "charLength": 4, + "snippet": { + "text": "\nbool Player::addItemFromStash(uint16_t itemId, uint32_t itemCount) {\n\tuint32_t stackCount = 100u;\n\n\twhile (itemCount > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9910b647cfa0f3c4a103dcdc8b93082963bf01137221ec4ebdf6872d0bd8ee07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100u is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6472, + "startColumn": 24, + "charOffset": 182803, + "charLength": 4, + "snippet": { + "text": "100u" + } + }, + "contextRegion": { + "startLine": 6470, + "startColumn": 24, + "charOffset": 182710, + "charLength": 4, + "snippet": { + "text": "\nbool Player::addItemFromStash(uint16_t itemId, uint32_t itemCount) {\n\tuint32_t stackCount = 100u;\n\n\twhile (itemCount > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa4256e8e26eb8fbc4e5796fee5d0e08b7ff55d9b37139dfb1db8a70a4e75bc2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6474, + "startColumn": 2, + "charOffset": 182811, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 6472, + "startColumn": 2, + "charOffset": 182780, + "charLength": 5, + "snippet": { + "text": "\tuint32_t stackCount = 100u;\n\n\twhile (itemCount > 0) {\n\t\tauto addValue = itemCount > stackCount ? stackCount : itemCount;\n\t\titemCount -= addValue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6850e00c900582461a92b912c7bfb7f0a6826672b4d9ff867b4adf4e21946d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'itemCount' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6474, + "startColumn": 9, + "charOffset": 182818, + "charLength": 9, + "snippet": { + "text": "itemCount" + } + }, + "contextRegion": { + "startLine": 6472, + "startColumn": 9, + "charOffset": 182780, + "charLength": 9, + "snippet": { + "text": "\tuint32_t stackCount = 100u;\n\n\twhile (itemCount > 0) {\n\t\tauto addValue = itemCount > stackCount ? stackCount : itemCount;\n\t\titemCount -= addValue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3a9f1e2e582c1934e63fb2b2a25cd3e6e615b3791d5ff779dbaed93f5f51d32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6477, + "startColumn": 60, + "charOffset": 182986, + "charLength": 8, + "snippet": { + "text": "addValue" + } + }, + "contextRegion": { + "startLine": 6475, + "startColumn": 60, + "charOffset": 182835, + "charLength": 8, + "snippet": { + "text": "\t\tauto addValue = itemCount > stackCount ? stackCount : itemCount;\n\t\titemCount -= addValue;\n\t\tstd::shared_ptr newItem = Item::CreateItem(itemId, addValue);\n\n\t\tif (!g_game().tryRetrieveStashItems(static_self_cast(), newItem)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "589a8b708ae4e591ffd5648e0aeec808d8468e790bd3564838573f7f27c17abe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6480, + "startColumn": 13, + "charOffset": 183088, + "charLength": 21, + "snippet": { + "text": "internalPlayerAddItem" + } + }, + "contextRegion": { + "startLine": 6478, + "startColumn": 13, + "charOffset": 182997, + "charLength": 21, + "snippet": { + "text": "\n\t\tif (!g_game().tryRetrieveStashItems(static_self_cast(), newItem)) {\n\t\t\tg_game().internalPlayerAddItem(static_self_cast(), newItem, true);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a3f9c922e7f638ee4582226b97838bc4868f5763d148e68ba12678429f1247c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-emplace", + "ruleIndex": 573, + "kind": "fail", + "level": "warning", + "message": { + "text": "use emplace_back instead of push_back" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6494, + "startColumn": 12, + "charOffset": 183522, + "charLength": 9, + "snippet": { + "text": "push_back" + } + }, + "contextRegion": { + "startLine": 6492, + "startColumn": 12, + "charOffset": 183343, + "charLength": 9, + "snippet": { + "text": "void sendStowItems(const std::shared_ptr &item, const std::shared_ptr &stowItem, StashContainerList &itemDict) {\n\tif (stowItem->getID() == item->getID()) {\n\t\titemDict.push_back(std::pair, uint32_t>(stowItem, stowItem->getItemCount()));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4effed2c35ee98e329ed592136ee2053423a30003a7187c1d8e21339a474c152" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6498, + "startColumn": 3, + "charOffset": 183669, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6496, + "startColumn": 3, + "charOffset": 183616, + "charLength": 3, + "snippet": { + "text": "\n\tif (auto container = stowItem->getContainer()) {\n\t\tfor (const auto &stowable_it : container->getStowableItems()) {\n\t\t\tif ((stowable_it.first)->getID() == item->getID()) {\n\t\t\t\titemDict.push_back(stowable_it);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc064cbbae27b02ddf56b7754a9c8f563c0913e959802e69e4c9a82c1ee966a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'stowItem' has cognitive complexity of 30 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6506, + "startColumn": 14, + "charOffset": 183854, + "charLength": 8, + "snippet": { + "text": "stowItem" + } + }, + "contextRegion": { + "startLine": 6504, + "startColumn": 14, + "charOffset": 183838, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Player::stowItem(std::shared_ptr item, uint32_t count, bool allItems) {\n\tif (!item || !item->isItemStorable()) {\n\t\tsendCancelMessage(\"This item cannot be stowed here.\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ffcb53686e35fa1fa55c92f12e5e732f7af6c960fe39bd67d65a086ec0535a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6506, + "startColumn": 45, + "charOffset": 183885, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 6504, + "startColumn": 45, + "charOffset": 183838, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Player::stowItem(std::shared_ptr item, uint32_t count, bool allItems) {\n\tif (!item || !item->isItemStorable()) {\n\t\tsendCancelMessage(\"This item cannot be stowed here.\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "227c60b50a0c4b454ec3d4174f3ffe039d79c310f434aaf207424db74be799b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6507, + "startColumn": 6, + "charOffset": 183929, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6505, + "startColumn": 6, + "charOffset": 183840, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::stowItem(std::shared_ptr item, uint32_t count, bool allItems) {\n\tif (!item || !item->isItemStorable()) {\n\t\tsendCancelMessage(\"This item cannot be stowed here.\");\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7e354537a3b91c8c0b0a0f856d0c7775516b597fd34c1d6e9b2ec85f87a5116" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6531, + "startColumn": 3, + "charOffset": 184699, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6529, + "startColumn": 3, + "charOffset": 184554, + "charLength": 3, + "snippet": { + "text": "\t\tstd::shared_ptr depotLocker = getDepotLocker(getLastDepotId());\n\t\tauto [itemVector, itemMap] = requestLockerItems(depotLocker);\n\t\tfor (const auto &lockerItem : itemVector) {\n\t\t\tif (lockerItem == nullptr) {\n\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f56e87ce5ca891ab4ab688f75486d4ed8d41773911b87449d0d9013a3dbe49c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6542, + "startColumn": 3, + "charOffset": 184977, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6540, + "startColumn": 3, + "charOffset": 184884, + "charLength": 3, + "snippet": { + "text": "\t} else if (item->getContainer()) {\n\t\titemDict = item->getContainer()->getStowableItems();\n\t\tfor (const std::shared_ptr &containerItem : item->getContainer()->getItems(true)) {\n\t\t\tuint32_t depotChest = g_configManager().getNumber(DEPOTCHEST, __FUNCTION__);\n\t\t\tbool validDepot = depotChest > 0 && depotChest < 21;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "778aa67f1b721cb7c318e56d7c854c1dd93aa6f37a9c4c9a29c99fd5a0484c74" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "21 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6544, + "startColumn": 53, + "charOffset": 185199, + "charLength": 2, + "snippet": { + "text": "21" + } + }, + "contextRegion": { + "startLine": 6542, + "startColumn": 53, + "charOffset": 184975, + "charLength": 2, + "snippet": { + "text": "\t\tfor (const std::shared_ptr &containerItem : item->getContainer()->getItems(true)) {\n\t\t\tuint32_t depotChest = g_configManager().getNumber(DEPOTCHEST, __FUNCTION__);\n\t\t\tbool validDepot = depotChest > 0 && depotChest < 21;\n\t\t\tif (g_configManager().getBoolean(STASH_MOVING, __FUNCTION__) && containerItem && !containerItem->isStackable() && validDepot) {\n\t\t\t\tg_game().internalMoveItem(containerItem->getParent(), getDepotChest(depotChest, true), INDEX_WHEREEVER, containerItem, containerItem->getItemCount(), nullptr);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96521dfdd33fe3ba0b233962b69c1e8761e263c8707bf8ad04e9c66f59bb92d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6546, + "startColumn": 14, + "charOffset": 185347, + "charLength": 16, + "snippet": { + "text": "internalMoveItem" + } + }, + "contextRegion": { + "startLine": 6544, + "startColumn": 14, + "charOffset": 185147, + "charLength": 16, + "snippet": { + "text": "\t\t\tbool validDepot = depotChest > 0 && depotChest < 21;\n\t\t\tif (g_configManager().getBoolean(STASH_MOVING, __FUNCTION__) && containerItem && !containerItem->isStackable() && validDepot) {\n\t\t\t\tg_game().internalMoveItem(containerItem->getParent(), getDepotChest(depotChest, true), INDEX_WHEREEVER, containerItem, containerItem->getItemCount(), nullptr);\n\t\t\t\tmovedItems++;\n\t\t\t\tmoved = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb642997bfbd588d2b670385c33469e24e5af5ab811062185c9c2219f2aa6c44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6552, + "startColumn": 12, + "charOffset": 185564, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 6550, + "startColumn": 12, + "charOffset": 185539, + "charLength": 12, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\titemDict.emplace_back(item, count);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f80b3e7bc908fddbdf9727e1aba324310217194977e5564a5a76847e7b888198" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6567, + "startColumn": 32, + "charOffset": 185950, + "charLength": 9, + "snippet": { + "text": "inventory" + } + }, + "contextRegion": { + "startLine": 6565, + "startColumn": 32, + "charOffset": 185853, + "charLength": 9, + "snippet": { + "text": "\n\tfor (int32_t i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; i++) {\n\t\tstd::shared_ptr item = inventory[i];\n\t\tif (!item) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf0bce7c9f526990709b5b24c27af5889f5b31116095f1c141d51d99322a28df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6568, + "startColumn": 7, + "charOffset": 185970, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6566, + "startColumn": 7, + "charOffset": 185854, + "charLength": 1, + "snippet": { + "text": "\tfor (int32_t i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; i++) {\n\t\tstd::shared_ptr item = inventory[i];\n\t\tif (!item) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4857cd21472dafb620a4163a1f291c00deb4cfccc8036da8bc633d00b3a30323" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6576, + "startColumn": 24, + "charOffset": 186203, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 6574, + "startColumn": 24, + "charOffset": 186087, + "charLength": 12, + "snippet": { + "text": "\t\t\tauto cid = item->getAttribute(ItemAttribute_t::OPENCONTAINER);\n\t\t\tif (cid > 0) {\n\t\t\t\topenContainersList.emplace_back(cid, itemContainer);\n\t\t\t}\n\t\t\tfor (ContainerIterator it = itemContainer->iterator(); it.hasNext(); it.advance()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "267fb8198c2036abd04b9c5a2a710a7228629f8de17d075aa5697e6632ca36ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6578, + "startColumn": 4, + "charOffset": 186245, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6576, + "startColumn": 4, + "charOffset": 186180, + "charLength": 3, + "snippet": { + "text": "\t\t\t\topenContainersList.emplace_back(cid, itemContainer);\n\t\t\t}\n\t\t\tfor (ContainerIterator it = itemContainer->iterator(); it.hasNext(); it.advance()) {\n\t\t\t\tstd::shared_ptr subContainer = (*it)->getContainer();\n\t\t\t\tif (subContainer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11d39d4a6b4cb42de0dbee098289419ba02f0f826b3660b3bdeb22f646b3a987" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6578, + "startColumn": 4, + "charOffset": 186245, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6576, + "startColumn": 4, + "charOffset": 186180, + "charLength": 3, + "snippet": { + "text": "\t\t\t\topenContainersList.emplace_back(cid, itemContainer);\n\t\t\t}\n\t\t\tfor (ContainerIterator it = itemContainer->iterator(); it.hasNext(); it.advance()) {\n\t\t\t\tstd::shared_ptr subContainer = (*it)->getContainer();\n\t\t\t\tif (subContainer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7cdeb0045a30429c78ade4c27dd29aa7f950ba2e03ae13b8d53226dfb74fc831" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6578, + "startColumn": 59, + "charOffset": 186300, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 6576, + "startColumn": 59, + "charOffset": 186180, + "charLength": 2, + "snippet": { + "text": "\t\t\t\topenContainersList.emplace_back(cid, itemContainer);\n\t\t\t}\n\t\t\tfor (ContainerIterator it = itemContainer->iterator(); it.hasNext(); it.advance()) {\n\t\t\t\tstd::shared_ptr subContainer = (*it)->getContainer();\n\t\t\t\tif (subContainer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26639d974de9652be0086fbfaac995209065df8e7d20e1c9d639253f8772fe65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6583, + "startColumn": 26, + "charOffset": 186552, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 6581, + "startColumn": 26, + "charOffset": 186423, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t\tauto subcid = (*it)->getAttribute(ItemAttribute_t::OPENCONTAINER);\n\t\t\t\t\tif (subcid > 0) {\n\t\t\t\t\t\topenContainersList.emplace_back(subcid, subContainer);\n\t\t\t\t\t}\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5d6db57f460b7a7bb16e09674dfa06c649f322567454e6163fea4a149b9b2fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6594, + "startColumn": 2, + "charOffset": 186847, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6592, + "startColumn": 2, + "charOffset": 186840, + "charLength": 3, + "snippet": { + "text": "\t});\n\n\tfor (auto &it : openContainersList) {\n\t\taddContainer(it.first - 1, it.second);\n\t\tonSendContainer(it.second);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "207eca982ac120cd911394532ee659d6a20f0972ffc8499b2719df35132626db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6602, + "startColumn": 3, + "charOffset": 187018, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6600, + "startColumn": 3, + "charOffset": 186962, + "charLength": 3, + "snippet": { + "text": "void Player::initializePrey() {\n\tif (preys.empty()) {\n\t\tfor (uint8_t slotId = PreySlot_First; slotId <= PreySlot_Last; slotId++) {\n\t\t\tauto slot = std::make_unique(static_cast(slotId));\n\t\t\tif (!g_configManager().getBoolean(PREY_ENABLED, __FUNCTION__)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec27715228eec0786458a37543e436c14a2b025981cf523d3df52fae72a35b68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-3", + "ruleIndex": 458, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-3: The loop-counter shall not be modified within condition or statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6602, + "startColumn": 3, + "charOffset": 187018, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6600, + "startColumn": 3, + "charOffset": 186962, + "charLength": 3, + "snippet": { + "text": "void Player::initializePrey() {\n\tif (preys.empty()) {\n\t\tfor (uint8_t slotId = PreySlot_First; slotId <= PreySlot_Last; slotId++) {\n\t\t\tauto slot = std::make_unique(static_cast(slotId));\n\t\t\tif (!g_configManager().getBoolean(PREY_ENABLED, __FUNCTION__)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b030a8dbab1d8b468a2eec205c149f28879e772d9eb72b323a1f78a69675ba4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6606, + "startColumn": 112, + "charOffset": 187390, + "charLength": 1, + "snippet": { + "text": "{" + } + }, + "contextRegion": { + "startLine": 6604, + "startColumn": 112, + "charOffset": 187169, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (!g_configManager().getBoolean(PREY_ENABLED, __FUNCTION__)) {\n\t\t\t\tslot->state = PreyDataState_Inactive;\n\t\t\t} else if (slot->id == PreySlot_Three && !g_configManager().getBoolean(PREY_FREE_THIRD_SLOT, __FUNCTION__)) {\n\t\t\t\tslot->state = PreyDataState_Locked;\n\t\t\t} else if (slot->id == PreySlot_Two && !isPremium()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "963baef2a5fb93706d258791b788f7703cd03dbe2aea0c3cb05b172a023a31f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6615, + "startColumn": 4, + "charOffset": 187655, + "charLength": 16, + "snippet": { + "text": "setPreySlotClass" + } + }, + "contextRegion": { + "startLine": 6613, + "startColumn": 4, + "charOffset": 187646, + "charLength": 16, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tsetPreySlotClass(slot);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9a7fb5ec56488965617b41982f66323e3909c50b18ee809d79177383a07f194" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6625, + "startColumn": 8, + "charOffset": 187892, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 6623, + "startColumn": 8, + "charOffset": 187879, + "charLength": 5, + "snippet": { + "text": "\t});\n\n\tpreys.erase(it, preys.end());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0dc479eb3a152c7d1952c227c0819a94e30b2ba6bcc8b0ad8f3231fab82773e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6630, + "startColumn": 3, + "charOffset": 187988, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6628, + "startColumn": 3, + "charOffset": 187919, + "charLength": 3, + "snippet": { + "text": "void Player::initializeTaskHunting() {\n\tif (taskHunting.empty()) {\n\t\tfor (uint8_t slotId = PreySlot_First; slotId <= PreySlot_Last; slotId++) {\n\t\t\tauto slot = std::make_unique(static_cast(slotId));\n\t\t\tif (!g_configManager().getBoolean(TASK_HUNTING_ENABLED, __FUNCTION__)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a215b6c6e3bde71921d7cea54039ac7180a13ebb5653f632f530fa0b48611d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-3", + "ruleIndex": 458, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-3: The loop-counter shall not be modified within condition or statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6630, + "startColumn": 3, + "charOffset": 187988, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6628, + "startColumn": 3, + "charOffset": 187919, + "charLength": 3, + "snippet": { + "text": "void Player::initializeTaskHunting() {\n\tif (taskHunting.empty()) {\n\t\tfor (uint8_t slotId = PreySlot_First; slotId <= PreySlot_Last; slotId++) {\n\t\t\tauto slot = std::make_unique(static_cast(slotId));\n\t\t\tif (!g_configManager().getBoolean(TASK_HUNTING_ENABLED, __FUNCTION__)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6114326be1cd7993aeaec2401f4a34300960c6463c662e1c666d79972faf910c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6634, + "startColumn": 120, + "charOffset": 188387, + "charLength": 1, + "snippet": { + "text": "{" + } + }, + "contextRegion": { + "startLine": 6632, + "startColumn": 120, + "charOffset": 188146, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (!g_configManager().getBoolean(TASK_HUNTING_ENABLED, __FUNCTION__)) {\n\t\t\t\tslot->state = PreyTaskDataState_Inactive;\n\t\t\t} else if (slot->id == PreySlot_Three && !g_configManager().getBoolean(TASK_HUNTING_FREE_THIRD_SLOT, __FUNCTION__)) {\n\t\t\t\tslot->state = PreyTaskDataState_Locked;\n\t\t\t} else if (slot->id == PreySlot_Two && !isPremium()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68ba22f7be574cdaaf5aea96a5db78e612be12a624fe5194d052fc125883e2c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6643, + "startColumn": 4, + "charOffset": 188671, + "charLength": 23, + "snippet": { + "text": "setTaskHuntingSlotClass" + } + }, + "contextRegion": { + "startLine": 6641, + "startColumn": 4, + "charOffset": 188662, + "charLength": 23, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tsetTaskHuntingSlotClass(slot);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb4c5fb381f666551061357506de0704779542f2b626a7a067d2d15ad6052c7d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6654, + "startColumn": 2, + "charOffset": 188980, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6652, + "startColumn": 2, + "charOffset": 188891, + "charLength": 3, + "snippet": { + "text": "std::string Player::getBlessingsName() const {\n\tstd::vector blessingNames;\n\tfor (auto bless : magic_enum::enum_values()) {\n\t\tif (hasBlessing(enumToValue(bless))) {\n\t\t\tstd::string name = toStartCaseWithSpace(magic_enum::enum_name(bless).data());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49b6279b6d3277b2de5326f9fab59aa930f9271b9ab5024d881ed754dfc18dfb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6657, + "startColumn": 18, + "charOffset": 189177, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 6655, + "startColumn": 18, + "charOffset": 189038, + "charLength": 12, + "snippet": { + "text": "\t\tif (hasBlessing(enumToValue(bless))) {\n\t\t\tstd::string name = toStartCaseWithSpace(magic_enum::enum_name(bless).data());\n\t\t\tblessingNames.emplace_back(name);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ae9eaf09845d9482789d3fbd687fdc7e73e3b1c4d411e29e2da7a53091d9c5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6664, + "startColumn": 3, + "charOffset": 189342, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6662, + "startColumn": 3, + "charOffset": 189229, + "charLength": 3, + "snippet": { + "text": "\tif (!blessingNames.empty()) {\n\t\t// Join all elements but the last with \", \" and add the last one with \" and \"\n\t\tfor (size_t i = 0; i < blessingNames.size() - 1; ++i) {\n\t\t\tos << blessingNames[i] << \", \";\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5866a76b60e6862f4c1d6320751001a7ef1c23e334882e2f29e3676aa898ee1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'mtype' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6676, + "startColumn": 81, + "charOffset": 189634, + "charLength": 5, + "snippet": { + "text": "mtype" + } + }, + "contextRegion": { + "startLine": 6674, + "startColumn": 81, + "charOffset": 189551, + "charLength": 5, + "snippet": { + "text": "}\n\nbool Player::isCreatureUnlockedOnTaskHunting(const std::shared_ptr mtype) const {\n\tif (!mtype) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c7c773d95239265658960c3ce1e0981a8190cffdf2da85cc0192c81f489855e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6677, + "startColumn": 6, + "charOffset": 189654, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6675, + "startColumn": 6, + "charOffset": 189553, + "charLength": 1, + "snippet": { + "text": "\nbool Player::isCreatureUnlockedOnTaskHunting(const std::shared_ptr mtype) const {\n\tif (!mtype) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea22c0a29c3b9667f455d903675a9eafb72d1142d82c1937c9493258755c0967" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6691, + "startColumn": 26, + "charOffset": 189959, + "charLength": 14, + "snippet": { + "text": "uniform_random" + } + }, + "contextRegion": { + "startLine": 6689, + "startColumn": 26, + "charOffset": 189887, + "charLength": 14, + "snippet": { + "text": "\n\tdouble_t chance = item->getMomentumChance();\n\tdouble_t randomChance = uniform_random(0, 10000) / 100.;\n\tif (getZoneType() != ZONE_PROTECTION && hasCondition(CONDITION_INFIGHT) && ((OTSYS_TIME() / 1000) % 2) == 0 && chance > 0 && randomChance < chance) {\n\t\tbool triggered = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a67d2b0b3b9dfdfb8fb1f1d98a5f4f854085b052715c0a6c9d2843d1580473a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6691, + "startColumn": 44, + "charOffset": 189977, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 6689, + "startColumn": 44, + "charOffset": 189887, + "charLength": 5, + "snippet": { + "text": "\n\tdouble_t chance = item->getMomentumChance();\n\tdouble_t randomChance = uniform_random(0, 10000) / 100.;\n\tif (getZoneType() != ZONE_PROTECTION && hasCondition(CONDITION_INFIGHT) && ((OTSYS_TIME() / 1000) % 2) == 0 && chance > 0 && randomChance < chance) {\n\t\tbool triggered = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9478bdb4b086e41636ef7c8b74e75c900da2251b6b101d23c36fb26bab1449aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6692, + "startColumn": 94, + "charOffset": 190085, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 6690, + "startColumn": 94, + "charOffset": 189888, + "charLength": 4, + "snippet": { + "text": "\tdouble_t chance = item->getMomentumChance();\n\tdouble_t randomChance = uniform_random(0, 10000) / 100.;\n\tif (getZoneType() != ZONE_PROTECTION && hasCondition(CONDITION_INFIGHT) && ((OTSYS_TIME() / 1000) % 2) == 0 && chance > 0 && randomChance < chance) {\n\t\tbool triggered = false;\n\t\tauto it = conditions.begin();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00c8c4bc00fd0fea5796850e110a263d81ea7f0a62c8f5990cc5bfb0217f82db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6692, + "startColumn": 122, + "charOffset": 190113, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 6690, + "startColumn": 122, + "charOffset": 189888, + "charLength": 1, + "snippet": { + "text": "\tdouble_t chance = item->getMomentumChance();\n\tdouble_t randomChance = uniform_random(0, 10000) / 100.;\n\tif (getZoneType() != ZONE_PROTECTION && hasCondition(CONDITION_INFIGHT) && ((OTSYS_TIME() / 1000) % 2) == 0 && chance > 0 && randomChance < chance) {\n\t\tbool triggered = false;\n\t\tauto it = conditions.begin();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f585f749aa016bd3018a4a35de79bb8a1bbab0c463ba676e4a549d9e56834ef6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6695, + "startColumn": 3, + "charOffset": 190203, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 6693, + "startColumn": 3, + "charOffset": 190143, + "charLength": 5, + "snippet": { + "text": "\t\tbool triggered = false;\n\t\tauto it = conditions.begin();\n\t\twhile (it != conditions.end()) {\n\t\t\tauto condItem = *it;\n\t\t\tConditionType_t type = condItem->getType();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ee7b5fa43b6401f1d24b154933d3bd764d048b7de3c80df8b78001fa45eb490" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6695, + "startColumn": 10, + "charOffset": 190210, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 6693, + "startColumn": 10, + "charOffset": 190143, + "charLength": 2, + "snippet": { + "text": "\t\tbool triggered = false;\n\t\tauto it = conditions.begin();\n\t\twhile (it != conditions.end()) {\n\t\t\tauto condItem = *it;\n\t\t\tConditionType_t type = condItem->getType();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "996477262bf47d52ffc9d9e2e3678c1c619904e2da9f5c8fa2035819cd214711" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6700, + "startColumn": 43, + "charOffset": 190449, + "charLength": 2, + "snippet": { + "text": "0u" + } + }, + "contextRegion": { + "startLine": 6698, + "startColumn": 43, + "charOffset": 190307, + "charLength": 2, + "snippet": { + "text": "\t\t\tauto maxu16 = std::numeric_limits::max();\n\t\t\tauto checkSpellId = condItem->getSubId();\n\t\t\tauto spellId = checkSpellId > maxu16 ? 0u : static_cast(checkSpellId);\n\t\t\tint32_t ticks = condItem->getTicks();\n\t\t\tint32_t newTicks = (ticks <= 2000) ? 0 : ticks - 2000;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0fbb149a94bb94f0a96ede2056c477452bed138aa4dc1fff23e1c905e22402e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "integer literal has suffix 'u', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6700, + "startColumn": 43, + "charOffset": 190449, + "charLength": 2, + "snippet": { + "text": "0u" + } + }, + "contextRegion": { + "startLine": 6698, + "startColumn": 43, + "charOffset": 190307, + "charLength": 2, + "snippet": { + "text": "\t\t\tauto maxu16 = std::numeric_limits::max();\n\t\t\tauto checkSpellId = condItem->getSubId();\n\t\t\tauto spellId = checkSpellId > maxu16 ? 0u : static_cast(checkSpellId);\n\t\t\tint32_t ticks = condItem->getTicks();\n\t\t\tint32_t newTicks = (ticks <= 2000) ? 0 : ticks - 2000;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ce13bd07a711bcc09c21f039451b07c37de3200c212871d1481f0002075f572" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6702, + "startColumn": 33, + "charOffset": 190564, + "charLength": 4, + "snippet": { + "text": "2000" + } + }, + "contextRegion": { + "startLine": 6700, + "startColumn": 33, + "charOffset": 190407, + "charLength": 4, + "snippet": { + "text": "\t\t\tauto spellId = checkSpellId > maxu16 ? 0u : static_cast(checkSpellId);\n\t\t\tint32_t ticks = condItem->getTicks();\n\t\t\tint32_t newTicks = (ticks <= 2000) ? 0 : ticks - 2000;\n\t\t\ttriggered = true;\n\t\t\tif (type == CONDITION_SPELLCOOLDOWN || (type == CONDITION_SPELLGROUPCOOLDOWN && spellId > SPELLGROUP_SUPPORT)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa11d2e1485e79c654eb80aa68fadd2ef06c86384557dff8dcb2f684d573070e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6702, + "startColumn": 53, + "charOffset": 190584, + "charLength": 4, + "snippet": { + "text": "2000" + } + }, + "contextRegion": { + "startLine": 6700, + "startColumn": 53, + "charOffset": 190407, + "charLength": 4, + "snippet": { + "text": "\t\t\tauto spellId = checkSpellId > maxu16 ? 0u : static_cast(checkSpellId);\n\t\t\tint32_t ticks = condItem->getTicks();\n\t\t\tint32_t newTicks = (ticks <= 2000) ? 0 : ticks - 2000;\n\t\t\ttriggered = true;\n\t\t\tif (type == CONDITION_SPELLCOOLDOWN || (type == CONDITION_SPELLGROUPCOOLDOWN && spellId > SPELLGROUP_SUPPORT)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c322c48d588f88ee2951331dc9a4966beae8f32df66a92921ca0c2527a2bcf7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6706, + "startColumn": 133, + "charOffset": 190893, + "charLength": 7, + "snippet": { + "text": "spellId" + } + }, + "contextRegion": { + "startLine": 6704, + "startColumn": 133, + "charOffset": 190611, + "charLength": 7, + "snippet": { + "text": "\t\t\tif (type == CONDITION_SPELLCOOLDOWN || (type == CONDITION_SPELLGROUPCOOLDOWN && spellId > SPELLGROUP_SUPPORT)) {\n\t\t\t\tcondItem->setTicks(newTicks);\n\t\t\t\ttype == CONDITION_SPELLGROUPCOOLDOWN ? sendSpellGroupCooldown(static_cast(spellId), newTicks) : sendSpellCooldown(spellId, newTicks);\n\t\t\t}\n\t\t\t++it;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1638fc90a222c5babe0cac413e469826e9aaaca51a7ddd21d2a8146d48d43f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6719, + "startColumn": 2, + "charOffset": 191153, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 6717, + "startColumn": 2, + "charOffset": 191089, + "charLength": 5, + "snippet": { + "text": "void Player::clearCooldowns() {\n\tauto it = conditions.begin();\n\twhile (it != conditions.end()) {\n\t\tauto condItem = *it;\n\t\tConditionType_t type = condItem->getType();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eebad8d6a8bf1c423ef5e73b9cbaf28d87999312a4d6fccb5b84ddf867aff296" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6719, + "startColumn": 9, + "charOffset": 191160, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 6717, + "startColumn": 9, + "charOffset": 191089, + "charLength": 2, + "snippet": { + "text": "void Player::clearCooldowns() {\n\tauto it = conditions.begin();\n\twhile (it != conditions.end()) {\n\t\tauto condItem = *it;\n\t\tConditionType_t type = condItem->getType();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c40e6f72b1f451df89664892c0cbbc04d8d3c5d9d71a382af3e9232cfb1df2f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6724, + "startColumn": 42, + "charOffset": 191394, + "charLength": 2, + "snippet": { + "text": "0u" + } + }, + "contextRegion": { + "startLine": 6722, + "startColumn": 42, + "charOffset": 191255, + "charLength": 2, + "snippet": { + "text": "\t\tauto maxu16 = std::numeric_limits::max();\n\t\tauto checkSpellId = condItem->getSubId();\n\t\tauto spellId = checkSpellId > maxu16 ? 0u : static_cast(checkSpellId);\n\t\tif (type == CONDITION_SPELLCOOLDOWN || type == CONDITION_SPELLGROUPCOOLDOWN) {\n\t\t\tcondItem->setTicks(0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92522ec88051c2db52f5bd78a3e7bc33127321ee1fd9ca40f30fa24fe3f42b98" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "integer literal has suffix 'u', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6724, + "startColumn": 42, + "charOffset": 191394, + "charLength": 2, + "snippet": { + "text": "0u" + } + }, + "contextRegion": { + "startLine": 6722, + "startColumn": 42, + "charOffset": 191255, + "charLength": 2, + "snippet": { + "text": "\t\tauto maxu16 = std::numeric_limits::max();\n\t\tauto checkSpellId = condItem->getSubId();\n\t\tauto spellId = checkSpellId > maxu16 ? 0u : static_cast(checkSpellId);\n\t\tif (type == CONDITION_SPELLCOOLDOWN || type == CONDITION_SPELLGROUPCOOLDOWN) {\n\t\t\tcondItem->setTicks(0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4ec4750433babc5fc999709ebd5eb304d8caa4dc10e76da93799d473d981679" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6727, + "startColumn": 125, + "charOffset": 191667, + "charLength": 7, + "snippet": { + "text": "spellId" + } + }, + "contextRegion": { + "startLine": 6725, + "startColumn": 125, + "charOffset": 191436, + "charLength": 7, + "snippet": { + "text": "\t\tif (type == CONDITION_SPELLCOOLDOWN || type == CONDITION_SPELLGROUPCOOLDOWN) {\n\t\t\tcondItem->setTicks(0);\n\t\t\ttype == CONDITION_SPELLGROUPCOOLDOWN ? sendSpellGroupCooldown(static_cast(spellId), 0) : sendSpellCooldown(spellId, 0);\n\t\t}\n\t\t++it;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65fbbbee6897444ccc4fa1583b3d8a1328b2d20049dfd7bac152d6904a05cfae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6744, + "startColumn": 26, + "charOffset": 191990, + "charLength": 14, + "snippet": { + "text": "uniform_random" + } + }, + "contextRegion": { + "startLine": 6742, + "startColumn": 26, + "charOffset": 191913, + "charLength": 14, + "snippet": { + "text": "\n\tdouble_t chance = item->getTranscendenceChance();\n\tdouble_t randomChance = uniform_random(0, 10000) / 100.;\n\tif (getZoneType() != ZONE_PROTECTION && checkLastAggressiveActionWithin(2000) && ((OTSYS_TIME() / 1000) % 2) == 0 && chance > 0 && randomChance < chance) {\n\t\tint64_t duration = g_configManager().getNumber(TRANSCENDANCE_AVATAR_DURATION, __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20668ca37f88dc2614bd3b00acbdb50623da65fb965020191ee9a41b1d5e9fbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6744, + "startColumn": 44, + "charOffset": 192008, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 6742, + "startColumn": 44, + "charOffset": 191913, + "charLength": 5, + "snippet": { + "text": "\n\tdouble_t chance = item->getTranscendenceChance();\n\tdouble_t randomChance = uniform_random(0, 10000) / 100.;\n\tif (getZoneType() != ZONE_PROTECTION && checkLastAggressiveActionWithin(2000) && ((OTSYS_TIME() / 1000) % 2) == 0 && chance > 0 && randomChance < chance) {\n\t\tint64_t duration = g_configManager().getNumber(TRANSCENDANCE_AVATAR_DURATION, __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0b30b807aa0b47d676b2129fa4a8f713b710aecfe758646018148d7ae13b262" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6745, + "startColumn": 74, + "charOffset": 192096, + "charLength": 4, + "snippet": { + "text": "2000" + } + }, + "contextRegion": { + "startLine": 6743, + "startColumn": 74, + "charOffset": 191914, + "charLength": 4, + "snippet": { + "text": "\tdouble_t chance = item->getTranscendenceChance();\n\tdouble_t randomChance = uniform_random(0, 10000) / 100.;\n\tif (getZoneType() != ZONE_PROTECTION && checkLastAggressiveActionWithin(2000) && ((OTSYS_TIME() / 1000) % 2) == 0 && chance > 0 && randomChance < chance) {\n\t\tint64_t duration = g_configManager().getNumber(TRANSCENDANCE_AVATAR_DURATION, __FUNCTION__);\n\t\tauto outfitCondition = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_OUTFIT, duration, 0)->static_self_cast();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b4f203ee4c69e03c5f54da0b1bc335c472384695e199b6af158905ee1941c943" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6745, + "startColumn": 100, + "charOffset": 192122, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 6743, + "startColumn": 100, + "charOffset": 191914, + "charLength": 4, + "snippet": { + "text": "\tdouble_t chance = item->getTranscendenceChance();\n\tdouble_t randomChance = uniform_random(0, 10000) / 100.;\n\tif (getZoneType() != ZONE_PROTECTION && checkLastAggressiveActionWithin(2000) && ((OTSYS_TIME() / 1000) % 2) == 0 && chance > 0 && randomChance < chance) {\n\t\tint64_t duration = g_configManager().getNumber(TRANSCENDANCE_AVATAR_DURATION, __FUNCTION__);\n\t\tauto outfitCondition = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_OUTFIT, duration, 0)->static_self_cast();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa94957b3102a49fde3ce43a8f0aa3ba95e7611ffe2ca5bbd6b6ee7b4eb8cf7b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6745, + "startColumn": 128, + "charOffset": 192150, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 6743, + "startColumn": 128, + "charOffset": 191914, + "charLength": 1, + "snippet": { + "text": "\tdouble_t chance = item->getTranscendenceChance();\n\tdouble_t randomChance = uniform_random(0, 10000) / 100.;\n\tif (getZoneType() != ZONE_PROTECTION && checkLastAggressiveActionWithin(2000) && ((OTSYS_TIME() / 1000) % 2) == 0 && chance > 0 && randomChance < chance) {\n\t\tint64_t duration = g_configManager().getNumber(TRANSCENDANCE_AVATAR_DURATION, __FUNCTION__);\n\t\tauto outfitCondition = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_OUTFIT, duration, 0)->static_self_cast();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f81a8defa3507214b77fe505466625c8a43f479152b95c1354b388fc132f7c2d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int64_t' (aka 'long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6747, + "startColumn": 91, + "charOffset": 192365, + "charLength": 8, + "snippet": { + "text": "duration" + } + }, + "contextRegion": { + "startLine": 6745, + "startColumn": 91, + "charOffset": 192023, + "charLength": 8, + "snippet": { + "text": "\tif (getZoneType() != ZONE_PROTECTION && checkLastAggressiveActionWithin(2000) && ((OTSYS_TIME() / 1000) % 2) == 0 && chance > 0 && randomChance < chance) {\n\t\tint64_t duration = g_configManager().getNumber(TRANSCENDANCE_AVATAR_DURATION, __FUNCTION__);\n\t\tauto outfitCondition = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_OUTFIT, duration, 0)->static_self_cast();\n\t\tOutfit_t outfit;\n\t\toutfit.lookType = getVocation()->getAvatarLookType();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61a4102375313b695f6d454fc18f82ed47312e848109e8e423e3b390cc9d5782" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6747, + "startColumn": 91, + "charOffset": 192365, + "charLength": 8, + "snippet": { + "text": "duration" + } + }, + "contextRegion": { + "startLine": 6745, + "startColumn": 91, + "charOffset": 192023, + "charLength": 8, + "snippet": { + "text": "\tif (getZoneType() != ZONE_PROTECTION && checkLastAggressiveActionWithin(2000) && ((OTSYS_TIME() / 1000) % 2) == 0 && chance > 0 && randomChance < chance) {\n\t\tint64_t duration = g_configManager().getNumber(TRANSCENDANCE_AVATAR_DURATION, __FUNCTION__);\n\t\tauto outfitCondition = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_OUTFIT, duration, 0)->static_self_cast();\n\t\tOutfit_t outfit;\n\t\toutfit.lookType = getVocation()->getAvatarLookType();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6124150eab71a04ec3c6065f7468f609f8519207c91a9dc1a94424813def3072" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6751, + "startColumn": 3, + "charOffset": 192531, + "charLength": 12, + "snippet": { + "text": "addCondition" + } + }, + "contextRegion": { + "startLine": 6749, + "startColumn": 3, + "charOffset": 192435, + "charLength": 12, + "snippet": { + "text": "\t\toutfit.lookType = getVocation()->getAvatarLookType();\n\t\toutfitCondition->setOutfit(outfit);\n\t\taddCondition(outfitCondition);\n\t\twheel()->setOnThinkTimer(WheelOnThink_t::AVATAR_FORGE, OTSYS_TIME() + duration);\n\t\tg_game().addMagicEffect(getPosition(), CONST_ME_AVATAR_APPEAR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ead3c6fe103581e8f9677128337aedf346d75b4ac61d69bfe62deefb43ccda9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6763, + "startColumn": 43, + "charOffset": 192970, + "charLength": 8, + "snippet": { + "text": "duration" + } + }, + "contextRegion": { + "startLine": 6761, + "startColumn": 43, + "charOffset": 192834, + "charLength": 8, + "snippet": { + "text": "\t\t// Send player data after transcendance timer expire\n\t\tconst auto &task = createPlayerTask(\n\t\t\tstd::max(SCHEDULER_MINTICKS, duration),\n\t\t\t[playerId = getID()] {\n\t\t\t\tauto player = g_game().getPlayerByID(playerId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "589a8b708ae4e591ffd5648e0aeec808d8468e790bd3564838573f7f27c17abe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6774, + "startColumn": 18, + "charOffset": 193228, + "charLength": 13, + "snippet": { + "text": "scheduleEvent" + } + }, + "contextRegion": { + "startLine": 6772, + "startColumn": 18, + "charOffset": 193172, + "charLength": 13, + "snippet": { + "text": "\t\t\t\"Player::triggerTranscendance\"\n\t\t);\n\t\tg_dispatcher().scheduleEvent(task);\n\n\t\twheel()->sendGiftOfLifeCooldown();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b127b69747bf17cd0c6314d1d663c2bdb4460cf8004998b9cde19050a98171e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6788, + "startColumn": 6, + "charOffset": 193686, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6786, + "startColumn": 6, + "charOffset": 193582, + "charLength": 1, + "snippet": { + "text": "\tuint16_t count = 0;\n\tstd::shared_ptr depotLocker = getDepotLocker(getLastDepotId());\n\tif (!depotLocker) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2dd755eda6a8e373007338ef5d3b6d848e8af2028d525e7ca710ce0eee7de6c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6794, + "startColumn": 7, + "charOffset": 193853, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6792, + "startColumn": 7, + "charOffset": 193716, + "charLength": 1, + "snippet": { + "text": "\tfor (const std::shared_ptr &locker : depotLocker->getItemList()) {\n\t\tstd::shared_ptr c = locker->getContainer();\n\t\tif (!c || c->empty()) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bab2edf4a747ec0ed2d13de63f0885539052d9f2d497bad3378c06ab4d73fff1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6798, + "startColumn": 3, + "charOffset": 193893, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6796, + "startColumn": 3, + "charOffset": 193886, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfor (ContainerIterator it = c->iterator(); it.hasNext(); it.advance()) {\n\t\t\tauto itemMap_it = itemMap.find((*it)->getID());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f76825f620eee19a09739f1b7cb24aa59dc960c015bd0d4434763fd8e1340654" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6798, + "startColumn": 3, + "charOffset": 193893, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6796, + "startColumn": 3, + "charOffset": 193886, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfor (ContainerIterator it = c->iterator(); it.hasNext(); it.advance()) {\n\t\t\tauto itemMap_it = itemMap.find((*it)->getID());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33800d6bfcaa0130e109e9498d15c1061877068a27f61a8ef42edc17fa88c958" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6798, + "startColumn": 46, + "charOffset": 193936, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 6796, + "startColumn": 46, + "charOffset": 193886, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tfor (ContainerIterator it = c->iterator(); it.hasNext(); it.advance()) {\n\t\t\tauto itemMap_it = itemMap.find((*it)->getID());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0dc7e9b391bbe1951d8634699796ecd057c7675324dcf74f94df12fcc283db60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6816, + "startColumn": 2, + "charOffset": 194620, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6814, + "startColumn": 2, + "charOffset": 194615, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &[itemId, itemCount] : getStashItems()) {\n\t\tauto itemMap_it = itemMap.find(itemId);\n\t\t// Stackable items not have upgrade classification" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb3215a1860b4e1c8ebf37493ebf9022a00950964c1ad0cd588d81acc026e69b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6854, + "startColumn": 6, + "charOffset": 195823, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6852, + "startColumn": 6, + "charOffset": 195739, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr depotLocker = getDepotLocker(getLastDepotId());\n\tif (!depotLocker) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11df3193ddda027a3d5d05675525a9e34ec79f2ad5cdd2d1a90aab40d506539c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6860, + "startColumn": 7, + "charOffset": 195990, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6858, + "startColumn": 7, + "charOffset": 195853, + "charLength": 1, + "snippet": { + "text": "\tfor (const std::shared_ptr &locker : depotLocker->getItemList()) {\n\t\tstd::shared_ptr c = locker->getContainer();\n\t\tif (!c || c->empty()) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2dd755eda6a8e373007338ef5d3b6d848e8af2028d525e7ca710ce0eee7de6c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6864, + "startColumn": 3, + "charOffset": 196030, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6862, + "startColumn": 3, + "charOffset": 196023, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfor (ContainerIterator it = c->iterator(); it.hasNext(); it.advance()) {\n\t\t\tstd::shared_ptr item = *it;\n\t\t\tif (!item || item->getID() != itemId || item->getTier() != tier) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8107e233eb21c0ddb54acedf35ad2d1e5f9bc7f2bfb70c72b4ddf6cb1bdc76b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6864, + "startColumn": 3, + "charOffset": 196030, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6862, + "startColumn": 3, + "charOffset": 196023, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfor (ContainerIterator it = c->iterator(); it.hasNext(); it.advance()) {\n\t\t\tstd::shared_ptr item = *it;\n\t\t\tif (!item || item->getID() != itemId || item->getTier() != tier) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54fda6aaabfab30616cbf58f8aa7921675660b8f14a2c41a2af1984d2087aa7b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6864, + "startColumn": 46, + "charOffset": 196073, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 6862, + "startColumn": 46, + "charOffset": 196023, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tfor (ContainerIterator it = c->iterator(); it.hasNext(); it.advance()) {\n\t\t\tstd::shared_ptr item = *it;\n\t\t\tif (!item || item->getID() != itemId || item->getTier() != tier) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe52f9088e97bc6753aa70c451ab295c0927eed8060a6b0c7c0047f96b52f4cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6866, + "startColumn": 8, + "charOffset": 196147, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6864, + "startColumn": 8, + "charOffset": 196028, + "charLength": 1, + "snippet": { + "text": "\t\tfor (ContainerIterator it = c->iterator(); it.hasNext(); it.advance()) {\n\t\t\tstd::shared_ptr item = *it;\n\t\t\tif (!item || item->getID() != itemId || item->getTier() != tier) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e318d10065f9d3aa7f78da5eb12f943936228fe1d99838b170128837634c3fc3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "255 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6871, + "startColumn": 29, + "charOffset": 196281, + "charLength": 3, + "snippet": { + "text": "255" + } + }, + "contextRegion": { + "startLine": 6869, + "startColumn": 29, + "charOffset": 196229, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tif (c->isInbox()) {\n\t\t\t\tif (inboxItems.size() < 255) {\n\t\t\t\t\tinboxItems.push_back(item);\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6129c985f402fb32dff679b67f1b92b658933075f45322438de9dd9c8f71e626" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "255 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6876, + "startColumn": 29, + "charOffset": 196414, + "charLength": 3, + "snippet": { + "text": "255" + } + }, + "contextRegion": { + "startLine": 6874, + "startColumn": 29, + "charOffset": 196327, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tinboxCount += Item::countByType(item, -1);\n\t\t\t} else {\n\t\t\t\tif (depotItems.size() < 255) {\n\t\t\t\t\tdepotItems.push_back(item);\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86c443f7c8ec031529171e8f414b91af1ee36d455d0093f1b75d36c5a15f62dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6890, + "startColumn": 6, + "charOffset": 196839, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6888, + "startColumn": 6, + "charOffset": 196664, + "charLength": 1, + "snippet": { + "text": "void Player::retrieveAllItemsFromDepotSearch(uint16_t itemId, uint8_t tier, bool isDepot) {\n\tstd::shared_ptr depotLocker = getDepotLocker(getLastDepotId());\n\tif (!depotLocker) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d5bd56e001ccdd588dfa75a6f6dc8c460fd5734919edae8d770089c740e1d5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6897, + "startColumn": 7, + "charOffset": 197055, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6895, + "startColumn": 7, + "charOffset": 196918, + "charLength": 1, + "snippet": { + "text": "\tfor (const std::shared_ptr &locker : depotLocker->getItemList()) {\n\t\tstd::shared_ptr c = locker->getContainer();\n\t\tif (!c || c->empty() ||\n\t\t // Retrieve from inbox.\n\t\t (c->isInbox() && isDepot) ||" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a7371903751e3245543df01bc982c7e540d5e619e76ad7de30943ac250187c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6905, + "startColumn": 3, + "charOffset": 197227, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6903, + "startColumn": 3, + "charOffset": 197220, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfor (ContainerIterator it = c->iterator(); it.hasNext(); it.advance()) {\n\t\t\tstd::shared_ptr item = *it;\n\t\t\tif (!item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "057d5ba488d707a8ccbce630124079d5a021160094df9422a7b89cb6fc26474f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6905, + "startColumn": 3, + "charOffset": 197227, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6903, + "startColumn": 3, + "charOffset": 197220, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfor (ContainerIterator it = c->iterator(); it.hasNext(); it.advance()) {\n\t\t\tstd::shared_ptr item = *it;\n\t\t\tif (!item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5947557082aa6258bb138d38f547dae9c102d1839506ae07bb20bcfe12741f2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6905, + "startColumn": 46, + "charOffset": 197270, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 6903, + "startColumn": 46, + "charOffset": 197220, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tfor (ContainerIterator it = c->iterator(); it.hasNext(); it.advance()) {\n\t\t\tstd::shared_ptr item = *it;\n\t\t\tif (!item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0220b97c264a19002cfd79a7be13fbdbee6a7f7610fd7b76d597ab6d873d6ccf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6907, + "startColumn": 8, + "charOffset": 197344, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6905, + "startColumn": 8, + "charOffset": 197225, + "charLength": 1, + "snippet": { + "text": "\t\tfor (ContainerIterator it = c->iterator(); it.hasNext(); it.advance()) {\n\t\t\tstd::shared_ptr item = *it;\n\t\t\tif (!item) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c50f4998e9c62a9c62d330aded78fff44a5813cff314744bceaddbec5afeecf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6918, + "startColumn": 2, + "charOffset": 197541, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6916, + "startColumn": 2, + "charOffset": 197499, + "charLength": 3, + "snippet": { + "text": "\n\tReturnValue ret = RETURNVALUE_NOERROR;\n\tfor (const std::shared_ptr &item : itemsVector) {\n\t\t// First lets try to retrieve the item to the stash retrieve container.\n\t\tif (g_game().tryRetrieveStashItems(static_self_cast(), item)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04032989a3da4d06c159d677e9c989256f3332db95e469d5573d3964834a45a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6943, + "startColumn": 6, + "charOffset": 198367, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6941, + "startColumn": 6, + "charOffset": 198277, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = getItemFromDepotSearch(depotSearchOnItem.first, pos);\n\tif (!item) {\n\t\tsendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9eba8e43be8bbd36e8e7b0a56dc55274fc3fd41c989fd4ec98476d02849bd9d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6949, + "startColumn": 6, + "charOffset": 198546, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6947, + "startColumn": 6, + "charOffset": 198435, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr container = item->getParent() ? item->getParent()->getContainer() : nullptr;\n\tif (!container) {\n\t\tsendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "708b1d5d63d233f5e6ba3089943fdc0e1e4ea1f755e43dfb94f56afa08b5e41e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6954, + "startColumn": 14, + "charOffset": 198633, + "charLength": 7, + "snippet": { + "text": "useItem" + } + }, + "contextRegion": { + "startLine": 6952, + "startColumn": 14, + "charOffset": 198616, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tg_actions().useItem(static_self_cast(), pos, 0, container, false);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7da7364eef9d2d5cad841544d9dc22204c281cedca4c33c997c3571fb1d7c7ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6959, + "startColumn": 6, + "charOffset": 198875, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6957, + "startColumn": 6, + "charOffset": 198699, + "charLength": 1, + "snippet": { + "text": "std::shared_ptr Player::getItemFromDepotSearch(uint16_t itemId, const Position &pos) {\n\tstd::shared_ptr depotLocker = getDepotLocker(getLastDepotId());\n\tif (!depotLocker) {\n\t\treturn nullptr;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38d9e59c64b1af13c12014ee212d0d6d5575f114b65be8d47a7709c1d90dc057" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6966, + "startColumn": 7, + "charOffset": 199070, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6964, + "startColumn": 7, + "charOffset": 198933, + "charLength": 1, + "snippet": { + "text": "\tfor (const std::shared_ptr &locker : depotLocker->getItemList()) {\n\t\tstd::shared_ptr c = locker->getContainer();\n\t\tif (!c || c->empty() || (c->isInbox() && pos.y != 0x21) || // From inbox.\n\t\t (!c->isInbox() && pos.y != 0x20)) { // From depot.\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8cbbe2f5879f2e8048b212a4143e8728001581c6daf379fce738112e3d2d43cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x21 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6966, + "startColumn": 53, + "charOffset": 199116, + "charLength": 4, + "snippet": { + "text": "0x21" + } + }, + "contextRegion": { + "startLine": 6964, + "startColumn": 53, + "charOffset": 198933, + "charLength": 4, + "snippet": { + "text": "\tfor (const std::shared_ptr &locker : depotLocker->getItemList()) {\n\t\tstd::shared_ptr c = locker->getContainer();\n\t\tif (!c || c->empty() || (c->isInbox() && pos.y != 0x21) || // From inbox.\n\t\t (!c->isInbox() && pos.y != 0x20)) { // From depot.\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4c922c397e505bd4b64d5115061a5a69a438296a5d90f1f118b7ae787ccb18b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6967, + "startColumn": 34, + "charOffset": 199173, + "charLength": 4, + "snippet": { + "text": "0x20" + } + }, + "contextRegion": { + "startLine": 6965, + "startColumn": 34, + "charOffset": 199007, + "charLength": 4, + "snippet": { + "text": "\t\tstd::shared_ptr c = locker->getContainer();\n\t\tif (!c || c->empty() || (c->isInbox() && pos.y != 0x21) || // From inbox.\n\t\t (!c->isInbox() && pos.y != 0x20)) { // From depot.\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca2bc257b62651489daf07090c8f8f8e47c34976e18ac497948b314c5c1bb2a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6971, + "startColumn": 3, + "charOffset": 199217, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6969, + "startColumn": 3, + "charOffset": 199210, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfor (ContainerIterator it = c->iterator(); it.hasNext(); it.advance()) {\n\t\t\tstd::shared_ptr item = *it;\n\t\t\tif (!item || item->getID() != itemId || item->getTier() != depotSearchOnItem.second) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3330864b1cf7c2468b456c0aafa9c5fd612e4600074ec74a6e47c1ed69d0384" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6971, + "startColumn": 3, + "charOffset": 199217, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6969, + "startColumn": 3, + "charOffset": 199210, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfor (ContainerIterator it = c->iterator(); it.hasNext(); it.advance()) {\n\t\t\tstd::shared_ptr item = *it;\n\t\t\tif (!item || item->getID() != itemId || item->getTier() != depotSearchOnItem.second) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6c3acba75e1ba112ef2e63ca6175c7f069f5677fd324bc66e8b2fd7d249c8f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6971, + "startColumn": 46, + "charOffset": 199260, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 6969, + "startColumn": 46, + "charOffset": 199210, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tfor (ContainerIterator it = c->iterator(); it.hasNext(); it.advance()) {\n\t\t\tstd::shared_ptr item = *it;\n\t\t\tif (!item || item->getID() != itemId || item->getTier() != depotSearchOnItem.second) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46f5d76075ba6e0347d527603a3b102c7a14a4af5534cff795d8eab30a0ee84d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6973, + "startColumn": 8, + "charOffset": 199334, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6971, + "startColumn": 8, + "charOffset": 199215, + "charLength": 1, + "snippet": { + "text": "\t\tfor (ContainerIterator it = c->iterator(); it.hasNext(); it.advance()) {\n\t\t\tstd::shared_ptr item = *it;\n\t\t\tif (!item || item->getID() != itemId || item->getTier() != depotSearchOnItem.second) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d13cd932dc2a2e03ef2a6dd0569866e1706a2235145b25f75dc2bf2cfee7ad8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'depotLocker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6988, + "startColumn": 57, + "charOffset": 199675, + "charLength": 11, + "snippet": { + "text": "depotLocker" + } + }, + "contextRegion": { + "startLine": 6986, + "startColumn": 57, + "charOffset": 199523, + "charLength": 11, + "snippet": { + "text": "\nstd::pair>, std::map>>\nPlayer::requestLockerItems(std::shared_ptr depotLocker, bool sendToClient /*= false*/, uint8_t tier /*= 0*/) const {\n\tif (!depotLocker) {\n\t\tg_logger().error(\"{} - Depot locker is nullptr\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8dbaa3bca230fe8b6054d8ec4d3a5476f727508d75c4a462953fb33fccdf10e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6989, + "startColumn": 6, + "charOffset": 199754, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6987, + "startColumn": 6, + "charOffset": 199524, + "charLength": 1, + "snippet": { + "text": "std::pair>, std::map>>\nPlayer::requestLockerItems(std::shared_ptr depotLocker, bool sendToClient /*= false*/, uint8_t tier /*= 0*/) const {\n\tif (!depotLocker) {\n\t\tg_logger().error(\"{} - Depot locker is nullptr\", __FUNCTION__);\n\t\treturn {};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0741f5f29a268bf7d7ac78ae5c1d4830299f0d0396523e390b9618b13fe4032d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'containers' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 6998, + "startColumn": 21, + "charOffset": 200053, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 6996, + "startColumn": 21, + "charOffset": 199963, + "charLength": 1, + "snippet": { + "text": "\tstd::vector> containers { depotLocker };\n\n\tfor (size_t i = 0; i < containers.size(); ++i) {\n\t\tstd::shared_ptr container = containers[i];\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f2b691623471b0ddc63bf8c195a14191aebba8856ad1ce467f67002803f136c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7001, + "startColumn": 3, + "charOffset": 200142, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 6999, + "startColumn": 3, + "charOffset": 200083, + "charLength": 3, + "snippet": { + "text": "\t\tstd::shared_ptr container = containers[i];\n\n\t\tfor (const auto &item : container->getItemList()) {\n\t\t\tstd::shared_ptr lockerContainers = item->getContainer();\n\t\t\tif (lockerContainers && !lockerContainers->empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22f204be440e32c01f066720f660a0f83878094f40cb323621a03c72583fbbe4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7027, + "startColumn": 2, + "charOffset": 200919, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7025, + "startColumn": 2, + "charOffset": 200871, + "charLength": 3, + "snippet": { + "text": "\n\tStashItemList stashToSend = getStashItems();\n\tfor (const auto &[itemId, itemCount] : stashToSend) {\n\t\tconst ItemType &itemType = Item::items[itemId];\n\t\tif (itemType.wareId != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02a2c7d28476d9c72fdbd9df73b806eb229588eb0d299f7e63f0e335b1d7cfa6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-make-member-function-const", + "ruleIndex": 708, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getLockerItemsAndCountById' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7037, + "startColumn": 65, + "charOffset": 201214, + "charLength": 26, + "snippet": { + "text": "getLockerItemsAndCountById" + } + }, + "contextRegion": { + "startLine": 7035, + "startColumn": 65, + "charOffset": 201147, + "charLength": 26, + "snippet": { + "text": "}\n\nstd::pair>, uint16_t> Player::getLockerItemsAndCountById(const std::shared_ptr &depotLocker, uint8_t tier, uint16_t itemId) {\n\tstd::vector> lockerItems;\n\tauto [itemVector, itemMap] = requestLockerItems(depotLocker, false, tier);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "121a9fa589eace151a6613fb19b44c881191cd095fcc09cfcfe80e7d68355db9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'getLockerItemsAndCountById' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7037, + "startColumn": 141, + "charOffset": 201290, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 7035, + "startColumn": 141, + "charOffset": 201147, + "charLength": 7, + "snippet": { + "text": "}\n\nstd::pair>, uint16_t> Player::getLockerItemsAndCountById(const std::shared_ptr &depotLocker, uint8_t tier, uint16_t itemId) {\n\tstd::vector> lockerItems;\n\tauto [itemVector, itemMap] = requestLockerItems(depotLocker, false, tier);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec5f02ef1987126c4e98a278359638e7d4edb54d0a07d7f9010779c7e3cac2fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7041, + "startColumn": 2, + "charOffset": 201475, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7039, + "startColumn": 2, + "charOffset": 201372, + "charLength": 3, + "snippet": { + "text": "\tauto [itemVector, itemMap] = requestLockerItems(depotLocker, false, tier);\n\tuint16_t totalCount = 0;\n\tfor (const auto &item : itemVector) {\n\t\tif (!item || item->getID() != itemId) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4939daa51e0a980224a7530274b6891f0d141de9550d5ae3287960706832a5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7042, + "startColumn": 7, + "charOffset": 201519, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7040, + "startColumn": 7, + "charOffset": 201448, + "charLength": 1, + "snippet": { + "text": "\tuint16_t totalCount = 0;\n\tfor (const auto &item : itemVector) {\n\t\tif (!item || item->getID() != itemId) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c2270fe262de7b3b3bb6b63f37419639fbfa8506a4e03c901e876779377a662" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'saySpell' has cognitive complexity of 29 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7053, + "startColumn": 14, + "charOffset": 201689, + "charLength": 8, + "snippet": { + "text": "saySpell" + } + }, + "contextRegion": { + "startLine": 7051, + "startColumn": 14, + "charOffset": 201673, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Player::saySpell(\n\tSpeakClasses type,\n\tconst std::string &text," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea1aad7279bc3e160a24b22f6bfd31b520dd24673b209aab69b759d683e62593" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7065, + "startColumn": 6, + "charOffset": 201978, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7063, + "startColumn": 6, + "charOffset": 201969, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!pos) {\n\t\tpos = &getPosition();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c01925e6d8de8b18404c942e433e089cdbb6e992c65d2407f616aec132698a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const Position *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7065, + "startColumn": 7, + "charOffset": 201979, + "charLength": 3, + "snippet": { + "text": "pos" + } + }, + "contextRegion": { + "startLine": 7063, + "startColumn": 7, + "charOffset": 201969, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tif (!pos) {\n\t\tpos = &getPosition();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6aa58f3498733c5787bc8455d9e53ffe77cabc7ace5a8e1108eb94df5a87d032" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7071, + "startColumn": 6, + "charOffset": 202044, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7069, + "startColumn": 6, + "charOffset": 202014, + "charLength": 1, + "snippet": { + "text": "\tSpectators spectators;\n\n\tif (!spectatorsPtr || spectatorsPtr->empty()) {\n\t\t// This somewhat complex construct ensures that the cached Spectators\n\t\t// is used if available and if it can be used, else a local vector is" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e100bba68cb1657c0dccf0045f95cb4bb85db97338fa4b12187afa0e18c0d2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'Spectators *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7071, + "startColumn": 7, + "charOffset": 202045, + "charLength": 13, + "snippet": { + "text": "spectatorsPtr" + } + }, + "contextRegion": { + "startLine": 7069, + "startColumn": 7, + "charOffset": 202014, + "charLength": 13, + "snippet": { + "text": "\tSpectators spectators;\n\n\tif (!spectatorsPtr || spectatorsPtr->empty()) {\n\t\t// This somewhat complex construct ensures that the cached Spectators\n\t\t// is used if available and if it can be used, else a local vector is" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b306e484daa648613001837fc89d9c1cc1d00349532d669fd155f48b67a2537" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7077, + "startColumn": 15, + "charOffset": 202423, + "charLength": 4, + "snippet": { + "text": "find" + } + }, + "contextRegion": { + "startLine": 7075, + "startColumn": 15, + "charOffset": 202305, + "charLength": 4, + "snippet": { + "text": "\t\t// the temporary when it's not used).\n\t\tif (type != TALKTYPE_YELL && type != TALKTYPE_MONSTER_YELL) {\n\t\t\tspectators.find(*pos, false, MAP_MAX_CLIENT_VIEW_PORT_X, MAP_MAX_CLIENT_VIEW_PORT_X, MAP_MAX_CLIENT_VIEW_PORT_Y, MAP_MAX_CLIENT_VIEW_PORT_Y);\n\t\t} else {\n\t\t\tspectators.find(*pos, true, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e9a91c31f933034277e7a54195d9c5b7937d5660a64d8c1e44710030973e26b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7079, + "startColumn": 15, + "charOffset": 202589, + "charLength": 4, + "snippet": { + "text": "find" + } + }, + "contextRegion": { + "startLine": 7077, + "startColumn": 15, + "charOffset": 202409, + "charLength": 4, + "snippet": { + "text": "\t\t\tspectators.find(*pos, false, MAP_MAX_CLIENT_VIEW_PORT_X, MAP_MAX_CLIENT_VIEW_PORT_X, MAP_MAX_CLIENT_VIEW_PORT_Y, MAP_MAX_CLIENT_VIEW_PORT_Y);\n\t\t} else {\n\t\t\tspectators.find(*pos, true, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_X + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2, (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) * 2);\n\t\t}\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e454f9ede4c23e39da2e2e374c98be51553e39f19855a0cde495daa8fbb5018" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7087, + "startColumn": 2, + "charOffset": 202865, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7085, + "startColumn": 2, + "charOffset": 202820, + "charLength": 3, + "snippet": { + "text": "\tint32_t valueEmote = 0;\n\t// Send to client\n\tfor (const std::shared_ptr &spectator : spectators) {\n\t\tif (std::shared_ptr tmpPlayer = spectator->getPlayer()) {\n\t\t\tif (g_configManager().getBoolean(EMOTE_SPELLS, __FUNCTION__)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f18922c8b5bd9b31ebdbbe184da4599a356e9401c66228c013218b867a4ad03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7103, + "startColumn": 2, + "charOffset": 203487, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7101, + "startColumn": 2, + "charOffset": 203456, + "charLength": 3, + "snippet": { + "text": "\n\t// Execute lua event method\n\tfor (const std::shared_ptr &spectator : spectators) {\n\t\tauto tmpPlayer = spectator->getPlayer();\n\t\tif (!tmpPlayer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "207eca982ac120cd911394532ee659d6a20f0972ffc8499b2719df35132626db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7105, + "startColumn": 7, + "charOffset": 203600, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7103, + "startColumn": 7, + "charOffset": 203486, + "charLength": 1, + "snippet": { + "text": "\tfor (const std::shared_ptr &spectator : spectators) {\n\t\tauto tmpPlayer = spectator->getPlayer();\n\t\tif (!tmpPlayer) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d6417cce9c1b2adcd0eb69ecef10bf8f26cdae7ddd8a4a1079c77f3cfc92549" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'forgeFuseItems' has cognitive complexity of 125 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7119, + "startColumn": 14, + "charOffset": 204008, + "charLength": 14, + "snippet": { + "text": "forgeFuseItems" + } + }, + "contextRegion": { + "startLine": 7117, + "startColumn": 14, + "charOffset": 203978, + "charLength": 14, + "snippet": { + "text": "\n// Forge system\nvoid Player::forgeFuseItems(ForgeAction_t actionType, uint16_t firstItemId, uint8_t tier, uint16_t secondItemId, bool success, bool reduceTierLoss, bool convergence, uint8_t bonus, uint8_t coreCount) {\n\tif (getFreeBackpackSlots() == 0) {\n\t\tsendCancelMessage(RETURNVALUE_NOTENOUGHROOM);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "948bdfcb99bffda3235cf00047e0c2804ab692bc5ebab0137a7c45e0fc5840f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7132, + "startColumn": 6, + "charOffset": 204508, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7130, + "startColumn": 6, + "charOffset": 204438, + "charLength": 1, + "snippet": { + "text": "\n\tauto firstForgingItem = getForgeItemFromId(firstItemId, tier);\n\tif (!firstForgingItem) {\n\t\tg_logger().error(\"[Log 1] Player with name {} failed to fuse item with id {}\", getName(), firstItemId);\n\t\tsendForgeError(RETURNVALUE_CONTACTADMINISTRATOR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47c0088fcfdb0527964c9ed3cd807aeb928e2691a3f7aabf04d5e78bdaabb969" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7145, + "startColumn": 6, + "charOffset": 205112, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7143, + "startColumn": 6, + "charOffset": 205038, + "charLength": 1, + "snippet": { + "text": "\t}\n\tauto secondForgingItem = getForgeItemFromId(secondItemId, tier);\n\tif (!secondForgingItem) {\n\t\tg_logger().error(\"[Log 2] Player with name {} failed to fuse item with id {}\", getName(), secondItemId);\n\t\tsendForgeError(RETURNVALUE_CONTACTADMINISTRATOR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cee2d15234bd33c66ee18382a05a5559e31311b95aa68ccf12c0c1fb16bff6df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7159, + "startColumn": 6, + "charOffset": 205722, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7157, + "startColumn": 6, + "charOffset": 205648, + "charLength": 1, + "snippet": { + "text": "\n\tauto exaltationChest = Item::CreateItem(ITEM_EXALTATION_CHEST, 1);\n\tif (!exaltationChest) {\n\t\tg_logger().error(\"Failed to create exaltation chest\");\n\t\tsendForgeError(RETURNVALUE_CONTACTADMINISTRATOR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e3a4586191d75fbd52f3801ff37c479232a0ba58b78300663d2d361373f0b85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7165, + "startColumn": 6, + "charOffset": 205930, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7163, + "startColumn": 6, + "charOffset": 205861, + "charLength": 1, + "snippet": { + "text": "\t}\n\tauto exaltationContainer = exaltationChest->getContainer();\n\tif (!exaltationContainer) {\n\t\tg_logger().error(\"Failed to create exaltation container\");\n\t\tsendForgeError(RETURNVALUE_CONTACTADMINISTRATOR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e49948a0a01f19f928b6565a4883650c6ee8bf11a83ece764bce3ef45b36a38" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7172, + "startColumn": 6, + "charOffset": 206161, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7170, + "startColumn": 6, + "charOffset": 206080, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr firstForgedItem = Item::CreateItem(firstItemId, 1);\n\tif (!firstForgedItem) {\n\t\tg_logger().error(\"[Log 3] Player with name {} failed to fuse item with id {}\", getName(), firstItemId);\n\t\tsendForgeError(RETURNVALUE_CONTACTADMINISTRATOR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3bb4114918f71060cf55921d6d55c0c9cefaf335c4b2c05ce21cd3d80b9858d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7198, + "startColumn": 4, + "charOffset": 207235, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7196, + "startColumn": 4, + "charOffset": 207226, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (const auto &[mapTier, mapPrice] : itemClassification->tiers) {\n\t\t\t\tif (mapTier == firstForgingItem->getTier()) {\n\t\t\t\t\tcost = mapPrice.convergenceFusionPrice;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c52df2f2872dd440c621792d45dd054a18d02994d6856af0eb3b34bbb8f5850" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7211, + "startColumn": 46, + "charOffset": 207732, + "charLength": 4, + "snippet": { + "text": "cost" + } + }, + "contextRegion": { + "startLine": 7209, + "startColumn": 46, + "charOffset": 207672, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn;\n\t\t}\n\t\tg_metrics().addCounter(\"balance_decrease\", cost, { { \"player\", getName() }, { \"context\", \"forge_convergence_fuse\" } });\n\t\thistory.cost = cost;\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae8a8fd24e4ad0c2da5d8850fe5ab4c92b4a1fa711185679224f8c648799ba57" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7211, + "startColumn": 46, + "charOffset": 207732, + "charLength": 4, + "snippet": { + "text": "cost" + } + }, + "contextRegion": { + "startLine": 7209, + "startColumn": 46, + "charOffset": 207672, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn;\n\t\t}\n\t\tg_metrics().addCounter(\"balance_decrease\", cost, { { \"player\", getName() }, { \"context\", \"forge_convergence_fuse\" } });\n\t\thistory.cost = cost;\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e01caa540e365380a32b9fc4144d1a621a7ca71ce412e13ab8b5ea31b0642b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7216, + "startColumn": 7, + "charOffset": 207960, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7214, + "startColumn": 7, + "charOffset": 207842, + "charLength": 1, + "snippet": { + "text": "\t\tfirstForgedItem->setTier(tier);\n\t\tstd::shared_ptr secondForgedItem = Item::CreateItem(secondItemId, 1);\n\t\tif (!secondForgedItem) {\n\t\t\tg_logger().error(\"[Log 4] Player with name {} failed to fuse item with id {}\", getName(), secondItemId);\n\t\t\tsendForgeError(RETURNVALUE_CONTACTADMINISTRATOR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b669b95f77542d24cd81f4c5749d23a5965880200e87ecfc01fd998089b6405c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7248, + "startColumn": 5, + "charOffset": 209155, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7246, + "startColumn": 5, + "charOffset": 209107, + "charLength": 3, + "snippet": { + "text": "\t\t\tif (bonus != 3) {\n\t\t\t\tuint64_t cost = 0;\n\t\t\t\tfor (const auto* itemClassification : g_game().getItemsClassifications()) {\n\t\t\t\t\tif (itemClassification->id != firstForgedItem->getClassification()) {\n\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4939daa51e0a980224a7530274b6891f0d141de9550d5ae3287960706832a5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-6-4", + "ruleIndex": 461, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-6-4: For any iteration statement there shall be no more than one break or goto statement used for loop termination" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7258, + "startColumn": 6, + "charOffset": 209761, + "charLength": 5, + "snippet": { + "text": "break" + } + }, + "contextRegion": { + "startLine": 7256, + "startColumn": 6, + "charOffset": 209666, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\t}\n\t\t\t\t\tcost = itemClassification->tiers.at(firstForgedItem->getTier()).regularPrice;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (!g_game().removeMoney(static_self_cast(), cost, 0, true)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0184e6a83e2ad4be9381ef77cd09502c6339a178afb7f26d39c00ad9cae3b7e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7265, + "startColumn": 48, + "charOffset": 210083, + "charLength": 4, + "snippet": { + "text": "cost" + } + }, + "contextRegion": { + "startLine": 7263, + "startColumn": 48, + "charOffset": 210017, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tg_metrics().addCounter(\"balance_decrease\", cost, { { \"player\", getName() }, { \"context\", \"forge_fuse\" } });\n\t\t\t\thistory.cost = cost;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c95105541ee897dfcae198da44953e364905747b6c322fc4ed36a9d2300c65f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7265, + "startColumn": 48, + "charOffset": 210083, + "charLength": 4, + "snippet": { + "text": "cost" + } + }, + "contextRegion": { + "startLine": 7263, + "startColumn": 48, + "charOffset": 210017, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tg_metrics().addCounter(\"balance_decrease\", cost, { { \"player\", getName() }, { \"context\", \"forge_fuse\" } });\n\t\t\t\thistory.cost = cost;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "715c75141de7ca5dcd587aac3906a443debefdbb6d82febd844e5ed6c4b222ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7269, + "startColumn": 4, + "charOffset": 210182, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 7267, + "startColumn": 4, + "charOffset": 210173, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (bonus == 4) {\n\t\t\t\tif (tier > 0) {\n\t\t\t\t\tsecondForgedItem->setTier(tier - 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5825af3f2059bde6798b81edff2fa913e721d92e25962aacf8ecfa2712c8c1fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7273, + "startColumn": 24, + "charOffset": 210291, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 7271, + "startColumn": 24, + "charOffset": 210220, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\tsecondForgedItem->setTier(tier - 1);\n\t\t\t\t}\n\t\t\t} else if (bonus == 6) {\n\t\t\t\tsecondForgedItem->setTier(tier + 1);\n\t\t\t} else if (bonus == 7 && tier + 2 <= firstForgedItem->getClassification()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "acd88db58d4235aaf969f00edf6ef350793a88d84a2eb72c213083afb69c7d60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7275, + "startColumn": 24, + "charOffset": 210360, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 7273, + "startColumn": 24, + "charOffset": 210268, + "charLength": 1, + "snippet": { + "text": "\t\t\t} else if (bonus == 6) {\n\t\t\t\tsecondForgedItem->setTier(tier + 1);\n\t\t\t} else if (bonus == 7 && tier + 2 <= firstForgedItem->getClassification()) {\n\t\t\t\tfirstForgedItem->setTier(tier + 2);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83f3a494520d0283ba5cc456b3dd6e7cf1be9c173953a72e0d5de1ae7db353ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7279, + "startColumn": 31, + "charOffset": 210493, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 7277, + "startColumn": 31, + "charOffset": 210457, + "charLength": 1, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (bonus != 4 && bonus != 5 && bonus != 6 && bonus != 8) {\n\t\t\t\treturnValue = g_game().internalRemoveItem(secondForgedItem, 1);\n\t\t\t\tif (returnValue != RETURNVALUE_NOERROR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3270bf67fe14b2bac37f9ba6e7cb7152decf55c14465507a6ed11f632bd6e8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7279, + "startColumn": 45, + "charOffset": 210507, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 7277, + "startColumn": 45, + "charOffset": 210457, + "charLength": 1, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (bonus != 4 && bonus != 5 && bonus != 6 && bonus != 8) {\n\t\t\t\treturnValue = g_game().internalRemoveItem(secondForgedItem, 1);\n\t\t\t\tif (returnValue != RETURNVALUE_NOERROR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c178f91a9ba8f8bf464a6977bd212ed8b0a3bb733c04506b8e8f8c382ec1aca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7279, + "startColumn": 59, + "charOffset": 210521, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 7277, + "startColumn": 59, + "charOffset": 210457, + "charLength": 1, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (bonus != 4 && bonus != 5 && bonus != 6 && bonus != 8) {\n\t\t\t\treturnValue = g_game().internalRemoveItem(secondForgedItem, 1);\n\t\t\t\tif (returnValue != RETURNVALUE_NOERROR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c1a261d16904f1f76add903b0e82bb68c748fe3e80c440d642ac61f40b4b7d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7289, + "startColumn": 40, + "charOffset": 210939, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 7287, + "startColumn": 40, + "charOffset": 210884, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\t\t} else {\n\t\t\tauto isTierLost = uniform_random(1, 100) <= (reduceTierLoss ? g_configManager().getNumber(FORGE_TIER_LOSS_REDUCTION, __FUNCTION__) : 100);\n\t\t\tif (isTierLost) {\n\t\t\t\tif (secondForgedItem->getTier() >= 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6535c38d6b83498ea45968064a49d11a614f03d32c5942b8bde30d00c1c7e93" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7289, + "startColumn": 137, + "charOffset": 211036, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 7287, + "startColumn": 137, + "charOffset": 210884, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\t\t} else {\n\t\t\tauto isTierLost = uniform_random(1, 100) <= (reduceTierLoss ? g_configManager().getNumber(FORGE_TIER_LOSS_REDUCTION, __FUNCTION__) : 100);\n\t\t\tif (isTierLost) {\n\t\t\t\tif (secondForgedItem->getTier() >= 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6da180235da1ff40a0364f4820355d1a8cf627e0e84ce3a44ee29c4bf55ea1a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7303, + "startColumn": 30, + "charOffset": 211567, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 7301, + "startColumn": 30, + "charOffset": 211527, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t}\n\t\t\tbonus = (isTierLost ? 0 : 8);\n\t\t\thistory.coresCost = coreCount;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc2dfe5fd08d59413dee4d15794bce232face50222c75b79a1e165543a9ea84f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7310, + "startColumn": 6, + "charOffset": 211811, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 7308, + "startColumn": 6, + "charOffset": 211740, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tsendForgeError(RETURNVALUE_CONTACTADMINISTRATOR);\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tsetForgeDusts(getForgeDusts() - dustCost);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39170d9e77397318bf9ec503cf9d822d10ee37950d7f3e29d4d8136cdeb72b7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7321, + "startColumn": 4, + "charOffset": 212209, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7319, + "startColumn": 4, + "charOffset": 212183, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tuint64_t cost = 0;\n\t\t\tfor (const auto* itemClassification : g_game().getItemsClassifications()) {\n\t\t\t\tif (itemClassification->id != firstForgingItem->getClassification()) {\n\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89e0eb8ed13e0d2d20d209c87c0e5561988a946df5ed20b05bf7498598c74cb1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-6-4", + "ruleIndex": 461, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-6-4: For any iteration statement there shall be no more than one break or goto statement used for loop termination" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7331, + "startColumn": 5, + "charOffset": 212822, + "charLength": 5, + "snippet": { + "text": "break" + } + }, + "contextRegion": { + "startLine": 7329, + "startColumn": 5, + "charOffset": 212725, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t\tcost = itemClassification->tiers.at(firstForgingItem->getTier() + 1).regularPrice;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (!g_game().removeMoney(static_self_cast(), cost, 0, true)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0168db865e1caa32bb8da6cdba77918678b33f155df9a985a3a161cf6be0e7dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7338, + "startColumn": 47, + "charOffset": 213137, + "charLength": 4, + "snippet": { + "text": "cost" + } + }, + "contextRegion": { + "startLine": 7336, + "startColumn": 47, + "charOffset": 213074, + "charLength": 4, + "snippet": { + "text": "\t\t\t\treturn;\n\t\t\t}\n\t\t\tg_metrics().addCounter(\"balance_decrease\", cost, { { \"player\", getName() }, { \"context\", \"forge_fuse\" } });\n\n\t\t\thistory.cost = cost;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e262e43a65644e45f502032aef88b414b0f04a197545609b13524a9e63bb02bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7338, + "startColumn": 47, + "charOffset": 213137, + "charLength": 4, + "snippet": { + "text": "cost" + } + }, + "contextRegion": { + "startLine": 7336, + "startColumn": 47, + "charOffset": 213074, + "charLength": 4, + "snippet": { + "text": "\t\t\t\treturn;\n\t\t\t}\n\t\t\tg_metrics().addCounter(\"balance_decrease\", cost, { { \"player\", getName() }, { \"context\", \"forge_fuse\" } });\n\n\t\t\thistory.cost = cost;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59105677899b4043fce06d2cd49400ca7ce84a1c3e689136f2e6cf30dd67ecc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-suspicious-call-argument", + "ruleIndex": 732, + "kind": "fail", + "level": "warning", + "message": { + "text": "2nd argument 'firstItemId' (passed to 'leftItemId') looks like it might be swapped with the 4th, 'secondItemId' (passed to 'rightItemId')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7359, + "startColumn": 2, + "charOffset": 213881, + "charLength": 15, + "snippet": { + "text": "sendForgeResult" + } + }, + "contextRegion": { + "startLine": 7357, + "startColumn": 2, + "charOffset": 213836, + "charLength": 15, + "snippet": { + "text": "\tregisterForgeHistoryDescription(history);\n\n\tsendForgeResult(actionType, firstItemId, tier, secondItemId, tier + 1, success, bonus, coreCount, convergence);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c1a4143152be4953ac7e32d1bbc456709cd75fc1268c91fadf7020506a324be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7374, + "startColumn": 6, + "charOffset": 214402, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7372, + "startColumn": 6, + "charOffset": 214339, + "charLength": 1, + "snippet": { + "text": "\n\tauto donorItem = getForgeItemFromId(donorItemId, tier);\n\tif (!donorItem) {\n\t\tg_logger().error(\"[Log 1] Player with name {} failed to transfer item with id {}\", getName(), donorItemId);\n\t\tsendForgeError(RETURNVALUE_CONTACTADMINISTRATOR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65982aa22eeb250a9b98bffb53e36666b77af38c35d1b509f9b95d9ebd34c91e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7388, + "startColumn": 6, + "charOffset": 214992, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7386, + "startColumn": 6, + "charOffset": 214928, + "charLength": 1, + "snippet": { + "text": "\n\tauto receiveItem = getForgeItemFromId(receiveItemId, 0);\n\tif (!receiveItem) {\n\t\tg_logger().error(\"[Log 2] Player with name {} failed to transfer item with id {}\", getName(), receiveItemId);\n\t\tsendForgeError(RETURNVALUE_CONTACTADMINISTRATOR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0d021fe8ff3a5c86e4a933ea4f6363c2960103c99aafcab0b9e16e2ba789898" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7402, + "startColumn": 6, + "charOffset": 215599, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7400, + "startColumn": 6, + "charOffset": 215525, + "charLength": 1, + "snippet": { + "text": "\n\tauto exaltationChest = Item::CreateItem(ITEM_EXALTATION_CHEST, 1);\n\tif (!exaltationChest) {\n\t\tg_logger().error(\"Exaltation chest is nullptr\");\n\t\tsendForgeError(RETURNVALUE_CONTACTADMINISTRATOR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c2270fe262de7b3b3bb6b63f37419639fbfa8506a4e03c901e876779377a662" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7408, + "startColumn": 6, + "charOffset": 215801, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7406, + "startColumn": 6, + "charOffset": 215732, + "charLength": 1, + "snippet": { + "text": "\t}\n\tauto exaltationContainer = exaltationChest->getContainer();\n\tif (!exaltationContainer) {\n\t\tg_logger().error(\"Exaltation container is nullptr\");\n\t\tsendForgeError(RETURNVALUE_CONTACTADMINISTRATOR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d3eff5e1f51cad98d9e692ddef39b4276c526c6a34d92eb93d68626efcbce12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7415, + "startColumn": 6, + "charOffset": 216027, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7413, + "startColumn": 6, + "charOffset": 215945, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr newReceiveItem = Item::CreateItem(receiveItemId, 1);\n\tif (!newReceiveItem) {\n\t\tg_logger().error(\"[Log 6] Player with name {} failed to fuse item with id {}\", getName(), receiveItemId);\n\t\tsendForgeError(RETURNVALUE_CONTACTADMINISTRATOR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38d9e59c64b1af13c12014ee212d0d6d5575f114b65be8d47a7709c1d90dc057" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7426, + "startColumn": 4, + "charOffset": 216560, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 7424, + "startColumn": 4, + "charOffset": 216495, + "charLength": 4, + "snippet": { + "text": "\t\tsendForgeError(RETURNVALUE_CONTACTADMINISTRATOR);\n\t\treturn;\n\t} else {\n\t\tsetForgeDusts(getForgeDusts() - g_configManager().getNumber(configKey, __FUNCTION__));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9430f1924acafecafed3b40d0537c5d0ecb6f59aa35d960376607e30a9a9199" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7445, + "startColumn": 2, + "charOffset": 217176, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7443, + "startColumn": 2, + "charOffset": 217129, + "charLength": 3, + "snippet": { + "text": "\tuint8_t coresAmount = 0;\n\tuint64_t cost = 0;\n\tfor (const auto &itemClassification : g_game().getItemsClassifications()) {\n\t\tif (itemClassification->id != donorItem->getClassification()) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69e8e6044ef539061207251544e5fc02f8caae6686182f92d5479dd7db98be41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-6-4", + "ruleIndex": 461, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-6-4: For any iteration statement there shall be no more than one break or goto statement used for loop termination" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7457, + "startColumn": 3, + "charOffset": 217844, + "charLength": 5, + "snippet": { + "text": "break" + } + }, + "contextRegion": { + "startLine": 7455, + "startColumn": 3, + "charOffset": 217718, + "charLength": 5, + "snippet": { + "text": "\t\tcost = convergence ? tierPriecs.convergenceTransferPrice : tierPriecs.regularPrice;\n\t\tcoresAmount = tierPriecs.corePrice;\n\t\tbreak;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8dc66a2dbb61c2c7ad741831f79494d63bc16b471eebb3f753fc2f3ab11fdd07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7472, + "startColumn": 45, + "charOffset": 218440, + "charLength": 4, + "snippet": { + "text": "cost" + } + }, + "contextRegion": { + "startLine": 7470, + "startColumn": 45, + "charOffset": 218371, + "charLength": 4, + "snippet": { + "text": "\t}\n\thistory.cost = cost;\n\tg_metrics().addCounter(\"balance_decrease\", cost, { { \"player\", getName() }, { \"context\", \"forge_transfer\" } });\n\n\treturnValue = g_game().internalAddItem(static_self_cast(), exaltationContainer, INDEX_WHEREEVER);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e33d6e89c741dc03a3d21ec76668f05e98fa8260d9af887bf1caadab65f0fcdd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7472, + "startColumn": 45, + "charOffset": 218440, + "charLength": 4, + "snippet": { + "text": "cost" + } + }, + "contextRegion": { + "startLine": 7470, + "startColumn": 45, + "charOffset": 218371, + "charLength": 4, + "snippet": { + "text": "\t}\n\thistory.cost = cost;\n\tg_metrics().addCounter(\"balance_decrease\", cost, { { \"player\", getName() }, { \"context\", \"forge_transfer\" } });\n\n\treturnValue = g_game().internalAddItem(static_self_cast(), exaltationContainer, INDEX_WHEREEVER);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f602c17bdaa89fdfba930f82420ba4b9dcfab229b2d65df6fd34988007091ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7488, + "startColumn": 64, + "charOffset": 219201, + "charLength": 11, + "snippet": { + "text": "convergence" + } + }, + "contextRegion": { + "startLine": 7486, + "startColumn": 64, + "charOffset": 219094, + "charLength": 11, + "snippet": { + "text": "\tregisterForgeHistoryDescription(history);\n\n\tsendForgeResult(actionType, donorItemId, tier, receiveItemId, convergence ? tier : tier - 1, true, 0, 0, convergence);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66c4e08fdd02f917b8bf15e05c239cfe5c4db22bdecd6f939dd32ef999b0d363" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "75 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7554, + "startColumn": 34, + "charOffset": 221874, + "charLength": 2, + "snippet": { + "text": "75" + } + }, + "contextRegion": { + "startLine": 7552, + "startColumn": 34, + "charOffset": 221836, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tauto upgradeCost = dustLevel - 75;\n\t\tif (auto dusts = getForgeDusts();\n\t\t upgradeCost > dusts) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3075ba090bfe0dd66e82ca155a8e2dd010778d37f6b9a9bafda47d324ed01f98" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'registerForgeHistoryDescription' has cognitive complexity of 26 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7577, + "startColumn": 14, + "charOffset": 222382, + "charLength": 31, + "snippet": { + "text": "registerForgeHistoryDescription" + } + }, + "contextRegion": { + "startLine": 7575, + "startColumn": 14, + "charOffset": 222366, + "charLength": 31, + "snippet": { + "text": "}\n\nvoid Player::registerForgeHistoryDescription(ForgeHistory history) {\n\tstd::string successfulString = history.success ? \"Successful\" : \"Unsuccessful\";\n\tstd::string historyTierString = history.tier > 0 ? \"tier - 1\" : \"consumed\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67744afeba654e19c54f5e77da0c427a26bdb301f265812f48efef233cca16ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7624, + "startColumn": 22, + "charOffset": 223694, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 7622, + "startColumn": 22, + "charOffset": 223539, + "charLength": 1, + "snippet": { + "text": "\t\t\t\titemType.article, itemType.name, std::to_string(history.tier),\n\t\t\t\titemType.article, itemType.name, std::to_string(history.tier),\n\t\t\t\thistory.bonus == 8 ? \"unchanged\" : \"consumed\",\n\t\t\t\thistory.coresCost, history.dustCost, price\n\t\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce53fca689275ec61aa2b12bbfb6f0b17fabf3efabba0c7c682224523cec716a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7666, + "startColumn": 22, + "charOffset": 224560, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 7664, + "startColumn": 22, + "charOffset": 224405, + "charLength": 1, + "snippet": { + "text": "\t\t\t\titemType.article, itemType.name, std::to_string(history.tier),\n\t\t\t\titemType.article, itemType.name, std::to_string(history.tier),\n\t\t\t\thistory.bonus == 8 ? \"unchanged\" : historyTierString,\n\t\t\t\thistory.coresCost, price\n\t\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1cdb3e51e9997de271259a64123dac44cf8dd441637664f61ea121f41d3f37a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7736, + "startColumn": 2, + "charOffset": 226495, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7734, + "startColumn": 2, + "charOffset": 226434, + "charLength": 3, + "snippet": { + "text": "\n\tstd::vector> containerToClose;\n\tfor (const auto &it : openContainers) {\n\t\tstd::shared_ptr container = it.second.container;\n\t\tif (!container) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "212be7fafa74d6fd3e92377801f6538c399e80a26abb038b93a269a9c06ef7fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7738, + "startColumn": 7, + "charOffset": 226603, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7736, + "startColumn": 7, + "charOffset": 226494, + "charLength": 1, + "snippet": { + "text": "\tfor (const auto &it : openContainers) {\n\t\tstd::shared_ptr container = it.second.container;\n\t\tif (!container) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3c439c1ee6ffba62ecf39391201b2560b602fc9a12b43b9cae8152c54e95ff7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7747, + "startColumn": 2, + "charOffset": 226740, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7745, + "startColumn": 2, + "charOffset": 226735, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const std::shared_ptr &container : containerToClose) {\n\t\tautoCloseContainers(container);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74184263d31231b76e183321c0316026913fb60c29cecc5f364b94e48e2fd8f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7760, + "startColumn": 3, + "charOffset": 227105, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 7758, + "startColumn": 3, + "charOffset": 227031, + "charLength": 4, + "snippet": { + "text": "\n\tswitch (const auto &it = Item::items[tool->getID()]; it.weaponType) {\n\t\tcase WEAPON_AMMO: {\n\t\t\tif (it.ammoType == AMMO_BOLT) {\n\t\t\t\treturn SoundEffect_t::DIST_ATK_CROSSBOW_SHOT;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9b5370485bfcb98db8439872454062f0cbbf106d9daea6a338ce5c3ea0695d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7763, + "startColumn": 6, + "charOffset": 227215, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 7761, + "startColumn": 6, + "charOffset": 227125, + "charLength": 4, + "snippet": { + "text": "\t\t\tif (it.ammoType == AMMO_BOLT) {\n\t\t\t\treturn SoundEffect_t::DIST_ATK_CROSSBOW_SHOT;\n\t\t\t} else if (it.ammoType == AMMO_ARROW) {\n\t\t\t\tif (it.shootType == CONST_ANI_BURSTARROW) {\n\t\t\t\t\treturn SoundEffect_t::BURST_ARROW_EFFECT;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c5149bd3d1eae84b85b15e0d2cf771c3d23222c2a116af982c6bd2eab48a148" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7764, + "startColumn": 5, + "charOffset": 227257, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 7762, + "startColumn": 5, + "charOffset": 227160, + "charLength": 2, + "snippet": { + "text": "\t\t\t\treturn SoundEffect_t::DIST_ATK_CROSSBOW_SHOT;\n\t\t\t} else if (it.ammoType == AMMO_ARROW) {\n\t\t\t\tif (it.shootType == CONST_ANI_BURSTARROW) {\n\t\t\t\t\treturn SoundEffect_t::BURST_ARROW_EFFECT;\n\t\t\t\t} else if (it.shootType == CONST_ANI_DIAMONDARROW) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc42345049b2f8262870a3eb99380d486887d7169c4fcf9903c2ebd18b8a342c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7766, + "startColumn": 7, + "charOffset": 227354, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 7764, + "startColumn": 7, + "charOffset": 227253, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tif (it.shootType == CONST_ANI_BURSTARROW) {\n\t\t\t\t\treturn SoundEffect_t::BURST_ARROW_EFFECT;\n\t\t\t\t} else if (it.shootType == CONST_ANI_DIAMONDARROW) {\n\t\t\t\t\treturn SoundEffect_t::DIAMOND_ARROW_EFFECT;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d00fae329b6a0a1041295e1161e545d36e14a365c152baa9c7223b9f957b9a4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7773, + "startColumn": 3, + "charOffset": 227530, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 7771, + "startColumn": 3, + "charOffset": 227519, + "charLength": 4, + "snippet": { + "text": "\t\t\t}\n\t\t}\n\t\tcase WEAPON_DISTANCE: {\n\t\t\tif (tool->getAmmoType() == AMMO_BOLT) {\n\t\t\t\treturn SoundEffect_t::DIST_ATK_CROSSBOW_SHOT;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bbfabb690a12886ddeca68f232ebe9359e0bc1d9bbb35785a0790812fd6051d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7776, + "startColumn": 6, + "charOffset": 227652, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 7774, + "startColumn": 6, + "charOffset": 227554, + "charLength": 4, + "snippet": { + "text": "\t\t\tif (tool->getAmmoType() == AMMO_BOLT) {\n\t\t\t\treturn SoundEffect_t::DIST_ATK_CROSSBOW_SHOT;\n\t\t\t} else if (tool->getAmmoType() == AMMO_ARROW) {\n\t\t\t\treturn SoundEffect_t::DIST_ATK_BOW_SHOT;\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32febb53f433507abf0ce460796e9f9a3dad55c564cd7144704d8f3626d1c485" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7782, + "startColumn": 3, + "charOffset": 227813, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 7780, + "startColumn": 3, + "charOffset": 227802, + "charLength": 4, + "snippet": { + "text": "\t\t\t}\n\t\t}\n\t\tcase WEAPON_WAND: {\n\t\t\t// Separate between wand and rod here\n\t\t\t// return SoundEffect_t::DIST_ATK_ROD_SHOT;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb10281beb48ee7e47178cf2d5ec04753a950f7c8158a5d6f637747127775d64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7787, + "startColumn": 3, + "charOffset": 227972, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 7785, + "startColumn": 3, + "charOffset": 227921, + "charLength": 7, + "snippet": { + "text": "\t\t\treturn SoundEffect_t::DIST_ATK_WAND_SHOT;\n\t\t}\n\t\tdefault: {\n\t\t\treturn SoundEffect_t::SILENCE;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b808f84de557415090af044d958bff889f0f503dc88d77442b69410e73870185" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7807, + "startColumn": 3, + "charOffset": 228439, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 7805, + "startColumn": 3, + "charOffset": 228410, + "charLength": 4, + "snippet": { + "text": "\n\tswitch (it.weaponType) {\n\t\tcase WEAPON_AXE: {\n\t\t\treturn SoundEffect_t::MELEE_ATK_AXE;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98978eb214ed95e8f62a36e91de4fb82013ff14b0699cbb94cfcf937dbc4d0e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7810, + "startColumn": 3, + "charOffset": 228504, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 7808, + "startColumn": 3, + "charOffset": 228458, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn SoundEffect_t::MELEE_ATK_AXE;\n\t\t}\n\t\tcase WEAPON_SWORD: {\n\t\t\treturn SoundEffect_t::MELEE_ATK_SWORD;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34fb02f58e35bb7b40cfdc13827db164e50d96c44dfadd2fdd88f8b38920d83c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7813, + "startColumn": 3, + "charOffset": 228573, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 7811, + "startColumn": 3, + "charOffset": 228525, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn SoundEffect_t::MELEE_ATK_SWORD;\n\t\t}\n\t\tcase WEAPON_CLUB: {\n\t\t\treturn SoundEffect_t::MELEE_ATK_CLUB;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbb0b31204a85ef00d32188d6e00db7678dc9df8e13604dd2480e114638e6e9a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7817, + "startColumn": 3, + "charOffset": 228660, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 7815, + "startColumn": 3, + "charOffset": 228634, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t\tcase WEAPON_AMMO:\n\t\tcase WEAPON_DISTANCE: {\n\t\t\tif (tool->getAmmoType() == AMMO_BOLT) {\n\t\t\t\treturn SoundEffect_t::DIST_ATK_CROSSBOW;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4e7d780bf2d015a2c5a3224e5941eef2d2a47b2eec36df2b962d9e30ebf6550" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7820, + "startColumn": 6, + "charOffset": 228777, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 7818, + "startColumn": 6, + "charOffset": 228684, + "charLength": 4, + "snippet": { + "text": "\t\t\tif (tool->getAmmoType() == AMMO_BOLT) {\n\t\t\t\treturn SoundEffect_t::DIST_ATK_CROSSBOW;\n\t\t\t} else if (tool->getAmmoType() == AMMO_ARROW) {\n\t\t\t\treturn SoundEffect_t::DIST_ATK_BOW;\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03fd96d87a74e93510a6bfe2e1e4309b9f3d6bdeec286540f3608ee71106da0e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7828, + "startColumn": 3, + "charOffset": 228939, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 7826, + "startColumn": 3, + "charOffset": 228923, + "charLength": 4, + "snippet": { + "text": "\t\t\tbreak;\n\t\t}\n\t\tcase WEAPON_WAND: {\n\t\t\treturn SoundEffect_t::MAGICAL_RANGE_ATK;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d3d38d9caa2c60623ff2a02794083f9fb13210690e0322170dccdef20976418" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7831, + "startColumn": 3, + "charOffset": 229009, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 7829, + "startColumn": 3, + "charOffset": 228959, + "charLength": 7, + "snippet": { + "text": "\t\t\treturn SoundEffect_t::MAGICAL_RANGE_ATK;\n\t\t}\n\t\tdefault: {\n\t\t\treturn SoundEffect_t::SILENCE;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31bebb5ac842bfdff9356d359b4da26ae468a755b5cf3c78ac6e7459cb728ee0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7849, + "startColumn": 5, + "charOffset": 229704, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 7847, + "startColumn": 5, + "charOffset": 229652, + "charLength": 4, + "snippet": { + "text": "\t\t\tsetNextWalkActionTask(task);\n\t\t\treturn true;\n\t\t} else {\n\t\t\tsendCancelMessage(RETURNVALUE_THEREISNOWAY);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77f13f10783031566bbca76508622e1e557b1625edf16a58d1b36786b56613cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-redundant-casting", + "ruleIndex": 716, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant explicit casting to the same type 'uint8_t' (aka 'unsigned char') as the sub-expression, remove this casting" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7868, + "startColumn": 9, + "charOffset": 230104, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 7866, + "startColumn": 9, + "charOffset": 230054, + "charLength": 11, + "snippet": { + "text": "\nuint8_t Player::getAccountType() const {\n\treturn static_cast(account ? account->getAccountType() : static_cast(AccountType::ACCOUNT_TYPE_NORMAL));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c18d006d40863b923fae17501e26ff869b5b85ab9c7c7385c9f6c8efc9630e55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7887, + "startColumn": 83, + "charOffset": 230780, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 7885, + "startColumn": 83, + "charOffset": 230685, + "charLength": 6, + "snippet": { + "text": "\t\treturn;\n\t}\n\taddStorageValue(STORAGEVALUE_HAZARDCOUNT, std::max(0, std::min(0xFFFF, count)), true);\n\treloadHazardSystemPointsCounter = true;\n\tif (count > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b0b181251796c4b2aad6661c4dfcfd4d8ebb830348749ae1c3ae850c5394cd5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7890, + "startColumn": 64, + "charOffset": 230926, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 7888, + "startColumn": 64, + "charOffset": 230804, + "charLength": 5, + "snippet": { + "text": "\treloadHazardSystemPointsCounter = true;\n\tif (count > 0) {\n\t\tsetIcon(\"hazard\", CreatureIcon(CreatureIconQuests_t::Hazard, count));\n\t} else {\n\t\tremoveIcon(\"hazard\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4b7d79c3b907d4c101243c28fdccf666ba1c7f6270f2a552a5d2665f820dc6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7896, + "startColumn": 89, + "charOffset": 231063, + "charLength": 7, + "snippet": { + "text": "monster" + } + }, + "contextRegion": { + "startLine": 7894, + "startColumn": 89, + "charOffset": 230972, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid Player::parseAttackRecvHazardSystem(CombatDamage &damage, std::shared_ptr monster) {\n\tif (!monster || !monster->getHazard()) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b49eb4ad34c2507c6ca870052174f108442d2f445c2c9ad6f3c29563c273b425" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7897, + "startColumn": 6, + "charOffset": 231079, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7895, + "startColumn": 6, + "charOffset": 230974, + "charLength": 1, + "snippet": { + "text": "\nvoid Player::parseAttackRecvHazardSystem(CombatDamage &damage, std::shared_ptr monster) {\n\tif (!monster || !monster->getHazard()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbe5a5ecbbeef00aed1030d7981cd0b965655c400dd22520f4ec644e52421b24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7911, + "startColumn": 3, + "charOffset": 231335, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7909, + "startColumn": 3, + "charOffset": 231277, + "charLength": 3, + "snippet": { + "text": "\tauto points = getHazardSystemPoints();\n\tif (m_party) {\n\t\tfor (const auto &partyMember : m_party->getMembers()) {\n\t\t\tif (partyMember && partyMember->getHazardSystemPoints() < points) {\n\t\t\t\tpoints = partyMember->getHazardSystemPoints();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "faaa101a7d2f3f0a70001b813f239bc490a613dd024fc76653f55ce9205c2860" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7927, + "startColumn": 55, + "charOffset": 231787, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 7925, + "startColumn": 55, + "charOffset": 231711, + "charLength": 5, + "snippet": { + "text": "\n\tuint16_t stage = 0;\n\tauto chance = static_cast(normal_random(1, 10000));\n\tauto critChance = g_configManager().getNumber(HAZARD_CRITICAL_CHANCE, __FUNCTION__);\n\t// Critical chance" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ceff450cfd235aae23e873a9c2bb260c38198a26ea20592474020290487740fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7935, + "startColumn": 11, + "charOffset": 232200, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 7933, + "startColumn": 11, + "charOffset": 232157, + "charLength": 1, + "snippet": { + "text": "\t\tdamage.exString = \"(Hazard)\";\n\n\t\tstage = (points - 1) * static_cast(g_configManager().getNumber(HAZARD_CRITICAL_MULTIPLIER, __FUNCTION__));\n\t\tdamage.primary.value += static_cast(std::ceil((static_cast(damage.primary.value) * (5000 + stage)) / 10000));\n\t\tdamage.secondary.value += static_cast(std::ceil((static_cast(damage.secondary.value) * (5000 + stage)) / 10000));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d2d631dea2bd7899a401ee98d30f1c58c4c0885c95091bce8266751d9b925a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7936, + "startColumn": 103, + "charOffset": 232411, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 7934, + "startColumn": 103, + "charOffset": 232189, + "charLength": 1, + "snippet": { + "text": "\n\t\tstage = (points - 1) * static_cast(g_configManager().getNumber(HAZARD_CRITICAL_MULTIPLIER, __FUNCTION__));\n\t\tdamage.primary.value += static_cast(std::ceil((static_cast(damage.primary.value) * (5000 + stage)) / 10000));\n\t\tdamage.secondary.value += static_cast(std::ceil((static_cast(damage.secondary.value) * (5000 + stage)) / 10000));\n\t\tlastHazardSystemCriticalHit = OTSYS_TIME();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab7c7a7abce714f4971fbfc6b7625c43e840e0a977b7bb1e5f5e58dd658b667b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7936, + "startColumn": 104, + "charOffset": 232412, + "charLength": 4, + "snippet": { + "text": "5000" + } + }, + "contextRegion": { + "startLine": 7934, + "startColumn": 104, + "charOffset": 232189, + "charLength": 4, + "snippet": { + "text": "\n\t\tstage = (points - 1) * static_cast(g_configManager().getNumber(HAZARD_CRITICAL_MULTIPLIER, __FUNCTION__));\n\t\tdamage.primary.value += static_cast(std::ceil((static_cast(damage.primary.value) * (5000 + stage)) / 10000));\n\t\tdamage.secondary.value += static_cast(std::ceil((static_cast(damage.secondary.value) * (5000 + stage)) / 10000));\n\t\tlastHazardSystemCriticalHit = OTSYS_TIME();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "311558c4f784ee9d58dfb78970aabf3535b076fceb47171fca99921356a61be5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7936, + "startColumn": 121, + "charOffset": 232429, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 7934, + "startColumn": 121, + "charOffset": 232189, + "charLength": 5, + "snippet": { + "text": "\n\t\tstage = (points - 1) * static_cast(g_configManager().getNumber(HAZARD_CRITICAL_MULTIPLIER, __FUNCTION__));\n\t\tdamage.primary.value += static_cast(std::ceil((static_cast(damage.primary.value) * (5000 + stage)) / 10000));\n\t\tdamage.secondary.value += static_cast(std::ceil((static_cast(damage.secondary.value) * (5000 + stage)) / 10000));\n\t\tlastHazardSystemCriticalHit = OTSYS_TIME();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d64907f72b15ac2c8e71965bbcad5f7b50e3a6f7f3d06fc6e7baf1b00753ea4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7936, + "startColumn": 121, + "charOffset": 232429, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 7934, + "startColumn": 121, + "charOffset": 232189, + "charLength": 5, + "snippet": { + "text": "\n\t\tstage = (points - 1) * static_cast(g_configManager().getNumber(HAZARD_CRITICAL_MULTIPLIER, __FUNCTION__));\n\t\tdamage.primary.value += static_cast(std::ceil((static_cast(damage.primary.value) * (5000 + stage)) / 10000));\n\t\tdamage.secondary.value += static_cast(std::ceil((static_cast(damage.secondary.value) * (5000 + stage)) / 10000));\n\t\tlastHazardSystemCriticalHit = OTSYS_TIME();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a8b5558d40f48f41cbeb884368600ae9c2f630c2cf089f7929cf7132f8c9aa3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7937, + "startColumn": 107, + "charOffset": 232544, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 7935, + "startColumn": 107, + "charOffset": 232190, + "charLength": 1, + "snippet": { + "text": "\t\tstage = (points - 1) * static_cast(g_configManager().getNumber(HAZARD_CRITICAL_MULTIPLIER, __FUNCTION__));\n\t\tdamage.primary.value += static_cast(std::ceil((static_cast(damage.primary.value) * (5000 + stage)) / 10000));\n\t\tdamage.secondary.value += static_cast(std::ceil((static_cast(damage.secondary.value) * (5000 + stage)) / 10000));\n\t\tlastHazardSystemCriticalHit = OTSYS_TIME();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c2a72fc55fac83ce5e19674fea83c520f586ee508933fe090611e450b8681571" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7937, + "startColumn": 108, + "charOffset": 232545, + "charLength": 4, + "snippet": { + "text": "5000" + } + }, + "contextRegion": { + "startLine": 7935, + "startColumn": 108, + "charOffset": 232190, + "charLength": 4, + "snippet": { + "text": "\t\tstage = (points - 1) * static_cast(g_configManager().getNumber(HAZARD_CRITICAL_MULTIPLIER, __FUNCTION__));\n\t\tdamage.primary.value += static_cast(std::ceil((static_cast(damage.primary.value) * (5000 + stage)) / 10000));\n\t\tdamage.secondary.value += static_cast(std::ceil((static_cast(damage.secondary.value) * (5000 + stage)) / 10000));\n\t\tlastHazardSystemCriticalHit = OTSYS_TIME();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4888e79aea70fd94c59a59dd769385403e74a71e2842dd5c0a04bf4b310a7fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7937, + "startColumn": 125, + "charOffset": 232562, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 7935, + "startColumn": 125, + "charOffset": 232190, + "charLength": 5, + "snippet": { + "text": "\t\tstage = (points - 1) * static_cast(g_configManager().getNumber(HAZARD_CRITICAL_MULTIPLIER, __FUNCTION__));\n\t\tdamage.primary.value += static_cast(std::ceil((static_cast(damage.primary.value) * (5000 + stage)) / 10000));\n\t\tdamage.secondary.value += static_cast(std::ceil((static_cast(damage.secondary.value) * (5000 + stage)) / 10000));\n\t\tlastHazardSystemCriticalHit = OTSYS_TIME();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fbb7fdb852026a58567fb5b7b1a0d7bdf2968f3390b1e666b6f82bf9041381eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7937, + "startColumn": 125, + "charOffset": 232562, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 7935, + "startColumn": 125, + "charOffset": 232190, + "charLength": 5, + "snippet": { + "text": "\t\tstage = (points - 1) * static_cast(g_configManager().getNumber(HAZARD_CRITICAL_MULTIPLIER, __FUNCTION__));\n\t\tdamage.primary.value += static_cast(std::ceil((static_cast(damage.primary.value) * (5000 + stage)) / 10000));\n\t\tdamage.secondary.value += static_cast(std::ceil((static_cast(damage.secondary.value) * (5000 + stage)) / 10000));\n\t\tlastHazardSystemCriticalHit = OTSYS_TIME();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5dc8cf05d9fdbfce2984cf5c2772a637454726b85b253e084852fb7bb82d97d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7943, + "startColumn": 11, + "charOffset": 232808, + "charLength": 6, + "snippet": { + "text": "points" + } + }, + "contextRegion": { + "startLine": 7941, + "startColumn": 11, + "charOffset": 232621, + "charLength": 6, + "snippet": { + "text": "\t// To prevent from punish the player twice with critical + damage boost, just uncomment code from the if\n\tif (monster->getHazardSystemDamageBoost() /* && !damage.critical*/) {\n\t\tstage = points * static_cast(g_configManager().getNumber(HAZARD_DAMAGE_MULTIPLIER, __FUNCTION__));\n\t\tif (stage != 0) {\n\t\t\tdamage.extension = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a74d67928fab3894a6becf14c89094cb3841862bc5eb9fb1ad65477ee6cc6638" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7947, + "startColumn": 104, + "charOffset": 233093, + "charLength": 5, + "snippet": { + "text": "stage" + } + }, + "contextRegion": { + "startLine": 7945, + "startColumn": 104, + "charOffset": 232929, + "charLength": 5, + "snippet": { + "text": "\t\t\tdamage.extension = true;\n\t\t\tdamage.exString = \"(Hazard)\";\n\t\t\tdamage.primary.value += static_cast(std::ceil((static_cast(damage.primary.value) * stage) / 10000));\n\t\t\tif (damage.secondary.value != 0) {\n\t\t\t\tdamage.secondary.value += static_cast(std::ceil((static_cast(damage.secondary.value) * stage) / 10000));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42643003af2717f0966de265dee5422fa11bf22ce2891235c915a08b5ca617d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7947, + "startColumn": 113, + "charOffset": 233102, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 7945, + "startColumn": 113, + "charOffset": 232929, + "charLength": 5, + "snippet": { + "text": "\t\t\tdamage.extension = true;\n\t\t\tdamage.exString = \"(Hazard)\";\n\t\t\tdamage.primary.value += static_cast(std::ceil((static_cast(damage.primary.value) * stage) / 10000));\n\t\t\tif (damage.secondary.value != 0) {\n\t\t\t\tdamage.secondary.value += static_cast(std::ceil((static_cast(damage.secondary.value) * stage) / 10000));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff97e7f6f44be087cc1c85b337d3d2b765e4e13d26f045f14815f448939dfa3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7947, + "startColumn": 113, + "charOffset": 233102, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 7945, + "startColumn": 113, + "charOffset": 232929, + "charLength": 5, + "snippet": { + "text": "\t\t\tdamage.extension = true;\n\t\t\tdamage.exString = \"(Hazard)\";\n\t\t\tdamage.primary.value += static_cast(std::ceil((static_cast(damage.primary.value) * stage) / 10000));\n\t\t\tif (damage.secondary.value != 0) {\n\t\t\t\tdamage.secondary.value += static_cast(std::ceil((static_cast(damage.secondary.value) * stage) / 10000));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68b24d42b9ec9e88c946de7d9ffd2b19652c51bf8f8c521c4be7734bfba47225" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7949, + "startColumn": 109, + "charOffset": 233257, + "charLength": 5, + "snippet": { + "text": "stage" + } + }, + "contextRegion": { + "startLine": 7947, + "startColumn": 109, + "charOffset": 232990, + "charLength": 5, + "snippet": { + "text": "\t\t\tdamage.primary.value += static_cast(std::ceil((static_cast(damage.primary.value) * stage) / 10000));\n\t\t\tif (damage.secondary.value != 0) {\n\t\t\t\tdamage.secondary.value += static_cast(std::ceil((static_cast(damage.secondary.value) * stage) / 10000));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "741a9b034a80a1f6286de8d2d1795f87ee4ed63fb3e6df8a3065db916834b63e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7949, + "startColumn": 118, + "charOffset": 233266, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 7947, + "startColumn": 118, + "charOffset": 232990, + "charLength": 5, + "snippet": { + "text": "\t\t\tdamage.primary.value += static_cast(std::ceil((static_cast(damage.primary.value) * stage) / 10000));\n\t\t\tif (damage.secondary.value != 0) {\n\t\t\t\tdamage.secondary.value += static_cast(std::ceil((static_cast(damage.secondary.value) * stage) / 10000));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cdb5a9b325c6fc7fa658a9da94d96b4c42fa84644079c467e7d179e2ddab89a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7949, + "startColumn": 118, + "charOffset": 233266, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 7947, + "startColumn": 118, + "charOffset": 232990, + "charLength": 5, + "snippet": { + "text": "\t\t\tdamage.primary.value += static_cast(std::ceil((static_cast(damage.primary.value) * stage) / 10000));\n\t\t\tif (damage.secondary.value != 0) {\n\t\t\t\tdamage.secondary.value += static_cast(std::ceil((static_cast(damage.secondary.value) * stage) / 10000));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbf5455d40ce50bf63c468806c8ac1224ebb7ac6bda8665a21a12d443fcdb8d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7955, + "startColumn": 90, + "charOffset": 233379, + "charLength": 7, + "snippet": { + "text": "monster" + } + }, + "contextRegion": { + "startLine": 7953, + "startColumn": 90, + "charOffset": 233287, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid Player::parseAttackDealtHazardSystem(CombatDamage &damage, std::shared_ptr monster) {\n\tif (!g_configManager().getBoolean(TOGGLE_HAZARDSYSTEM, __FUNCTION__)) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf723a70293e75b35ece96d2911eb0a9c1290900862a79000f75c4146613d00e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7960, + "startColumn": 6, + "charOffset": 233482, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7958, + "startColumn": 6, + "charOffset": 233473, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!monster || !monster->getHazard()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "049cfe71ae1745faf44ff090ea52e67fb0e9eefbb06cd3df937c36b3e7bca328" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7970, + "startColumn": 3, + "charOffset": 233651, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 7968, + "startColumn": 3, + "charOffset": 233593, + "charLength": 3, + "snippet": { + "text": "\tauto points = getHazardSystemPoints();\n\tif (m_party) {\n\t\tfor (const auto &partyMember : m_party->getMembers()) {\n\t\t\tif (partyMember && partyMember->getHazardSystemPoints() < points) {\n\t\t\t\tpoints = partyMember->getHazardSystemPoints();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30f4b65e031ed9ea8b8968d64eee7ec7f2c254a450fed86aafdaae67b5cb4b2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'stage' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7986, + "startColumn": 11, + "charOffset": 234055, + "charLength": 5, + "snippet": { + "text": "stage" + } + }, + "contextRegion": { + "startLine": 7984, + "startColumn": 11, + "charOffset": 234027, + "charLength": 5, + "snippet": { + "text": "\n\t// Dodge chance\n\tuint16_t stage;\n\tif (monster->getHazardSystemDodge()) {\n\t\tstage = points * g_configManager().getNumber(HAZARD_DODGE_MULTIPLIER, __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ba7e407b98e70559526b250637d3690c6606ba83efb6246bbe69c82fc416ea6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7988, + "startColumn": 11, + "charOffset": 234112, + "charLength": 6, + "snippet": { + "text": "points" + } + }, + "contextRegion": { + "startLine": 7986, + "startColumn": 11, + "charOffset": 234045, + "charLength": 6, + "snippet": { + "text": "\tuint16_t stage;\n\tif (monster->getHazardSystemDodge()) {\n\t\tstage = points * g_configManager().getNumber(HAZARD_DODGE_MULTIPLIER, __FUNCTION__);\n\t\tauto chance = static_cast(normal_random(1, 10000));\n\t\tif (chance <= stage) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8d95e7749da32a1ee950288971099050ba8226bd1bce91316f6cd5d8a39c86f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7989, + "startColumn": 56, + "charOffset": 234244, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 7987, + "startColumn": 56, + "charOffset": 234062, + "charLength": 5, + "snippet": { + "text": "\tif (monster->getHazardSystemDodge()) {\n\t\tstage = points * g_configManager().getNumber(HAZARD_DODGE_MULTIPLIER, __FUNCTION__);\n\t\tauto chance = static_cast(normal_random(1, 10000));\n\t\tif (chance <= stage) {\n\t\t\tdamage.primary.value = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ddb401576155a02f9928a933341e83de4fd7258178fbb119f89144a16f68d490" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7997, + "startColumn": 11, + "charOffset": 234413, + "charLength": 6, + "snippet": { + "text": "points" + } + }, + "contextRegion": { + "startLine": 7995, + "startColumn": 11, + "charOffset": 234353, + "charLength": 6, + "snippet": { + "text": "\t}\n\tif (monster->getHazardSystemDefenseBoost()) {\n\t\tstage = points * static_cast(g_configManager().getNumber(HAZARD_DEFENSE_MULTIPLIER, __FUNCTION__));\n\t\tif (stage != 0) {\n\t\t\tdamage.exString = fmt::format(\"(hazard -{}%)\", stage / 100.);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1638fc90a222c5babe0cac413e469826e9aaaca51a7ddd21d2a8146d48d43f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 7999, + "startColumn": 51, + "charOffset": 234585, + "charLength": 5, + "snippet": { + "text": "stage" + } + }, + "contextRegion": { + "startLine": 7997, + "startColumn": 51, + "charOffset": 234403, + "charLength": 5, + "snippet": { + "text": "\t\tstage = points * static_cast(g_configManager().getNumber(HAZARD_DEFENSE_MULTIPLIER, __FUNCTION__));\n\t\tif (stage != 0) {\n\t\t\tdamage.exString = fmt::format(\"(hazard -{}%)\", stage / 100.);\n\t\t\tdamage.primary.value -= static_cast(std::ceil((static_cast(damage.primary.value) * stage) / 10000));\n\t\t\tif (damage.secondary.value != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1aa78c602cd2bcabf4154e9d38605eb24c44bc8be344dc4b465d7b5ffde1f8ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8000, + "startColumn": 104, + "charOffset": 234703, + "charLength": 5, + "snippet": { + "text": "stage" + } + }, + "contextRegion": { + "startLine": 7998, + "startColumn": 104, + "charOffset": 234515, + "charLength": 5, + "snippet": { + "text": "\t\tif (stage != 0) {\n\t\t\tdamage.exString = fmt::format(\"(hazard -{}%)\", stage / 100.);\n\t\t\tdamage.primary.value -= static_cast(std::ceil((static_cast(damage.primary.value) * stage) / 10000));\n\t\t\tif (damage.secondary.value != 0) {\n\t\t\t\tdamage.secondary.value -= static_cast(std::ceil((static_cast(damage.secondary.value) * stage) / 10000));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29ca5aec0156dadd4d83820a03f4a8a224ca04a41cf8f7bcfdc35e661618b1fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8000, + "startColumn": 113, + "charOffset": 234712, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 7998, + "startColumn": 113, + "charOffset": 234515, + "charLength": 5, + "snippet": { + "text": "\t\tif (stage != 0) {\n\t\t\tdamage.exString = fmt::format(\"(hazard -{}%)\", stage / 100.);\n\t\t\tdamage.primary.value -= static_cast(std::ceil((static_cast(damage.primary.value) * stage) / 10000));\n\t\t\tif (damage.secondary.value != 0) {\n\t\t\t\tdamage.secondary.value -= static_cast(std::ceil((static_cast(damage.secondary.value) * stage) / 10000));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a55d9e89adeb39b9ef14708c3957bec8dc552b16849cb011f224b1208c43efa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8000, + "startColumn": 113, + "charOffset": 234712, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 7998, + "startColumn": 113, + "charOffset": 234515, + "charLength": 5, + "snippet": { + "text": "\t\tif (stage != 0) {\n\t\t\tdamage.exString = fmt::format(\"(hazard -{}%)\", stage / 100.);\n\t\t\tdamage.primary.value -= static_cast(std::ceil((static_cast(damage.primary.value) * stage) / 10000));\n\t\t\tif (damage.secondary.value != 0) {\n\t\t\t\tdamage.secondary.value -= static_cast(std::ceil((static_cast(damage.secondary.value) * stage) / 10000));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6a241b027616e3992004b70c1b84045be6914f04a9abdf796d9c13ea2d4977f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8002, + "startColumn": 109, + "charOffset": 234867, + "charLength": 5, + "snippet": { + "text": "stage" + } + }, + "contextRegion": { + "startLine": 8000, + "startColumn": 109, + "charOffset": 234600, + "charLength": 5, + "snippet": { + "text": "\t\t\tdamage.primary.value -= static_cast(std::ceil((static_cast(damage.primary.value) * stage) / 10000));\n\t\t\tif (damage.secondary.value != 0) {\n\t\t\t\tdamage.secondary.value -= static_cast(std::ceil((static_cast(damage.secondary.value) * stage) / 10000));\n\t\t\t}\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0f8c428e66e9029abef186a48d5be4ed0fd4b57a1da951c25348d226d1dc338" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8002, + "startColumn": 118, + "charOffset": 234876, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 8000, + "startColumn": 118, + "charOffset": 234600, + "charLength": 5, + "snippet": { + "text": "\t\t\tdamage.primary.value -= static_cast(std::ceil((static_cast(damage.primary.value) * stage) / 10000));\n\t\t\tif (damage.secondary.value != 0) {\n\t\t\t\tdamage.secondary.value -= static_cast(std::ceil((static_cast(damage.secondary.value) * stage) / 10000));\n\t\t\t}\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3c044b166707ffe9e5ba14b2d69e5a69e38a7f1ecb7b3097ec7a424d2d6a466" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8002, + "startColumn": 118, + "charOffset": 234876, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 8000, + "startColumn": 118, + "charOffset": 234600, + "charLength": 5, + "snippet": { + "text": "\t\t\tdamage.primary.value -= static_cast(std::ceil((static_cast(damage.primary.value) * stage) / 10000));\n\t\t\tif (damage.secondary.value != 0) {\n\t\t\t\tdamage.secondary.value -= static_cast(std::ceil((static_cast(damage.secondary.value) * stage) / 10000));\n\t\t\t}\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d58fa58aeacf1bc0853339ab14fc9f91ca8c4cdf173e975599debc820498ef8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8069, + "startColumn": 6, + "charOffset": 236301, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8067, + "startColumn": 6, + "charOffset": 236205, + "charLength": 1, + "snippet": { + "text": "void Player::sendLootMessage(const std::string &message) const {\n\tauto party = getParty();\n\tif (!party) {\n\t\tsendTextMessage(MESSAGE_LOOT, message);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53e75c5eba97672cca09819cdf7804f992d52417909bd07ef7e8d49590c2b4d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8077, + "startColumn": 2, + "charOffset": 236472, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 8075, + "startColumn": 2, + "charOffset": 236413, + "charLength": 3, + "snippet": { + "text": "\t\tpartyLeader->sendTextMessage(MESSAGE_LOOT, message);\n\t}\n\tfor (const auto &partyMember : party->getMembers()) {\n\t\tif (partyMember) {\n\t\t\tpartyMember->sendTextMessage(MESSAGE_LOOT, message);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eafe949b06ea7fae30476e103853ab09df95a0cc90231940cd3e3a03a82177d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8096, + "startColumn": 6, + "charOffset": 237075, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8094, + "startColumn": 6, + "charOffset": 237021, + "charLength": 1, + "snippet": { + "text": "\t}\n\tauto containerItem = inventoryItems.front();\n\tif (!containerItem) {\n\t\treturn nullptr;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "416468d114e4093a305ef8f41ef0b95ac6e37dcc3e09ee3a7ef9296850fed105" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8100, + "startColumn": 6, + "charOffset": 237168, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8098, + "startColumn": 6, + "charOffset": 237111, + "charLength": 1, + "snippet": { + "text": "\t}\n\tauto container = containerItem->getContainer();\n\tif (!container) {\n\t\treturn nullptr;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32ff6e6c844a32a6c8b5c80a44356c7e1aed921db7ce6ca32d1804b537961e9a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8109, + "startColumn": 6, + "charOffset": 237338, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8107, + "startColumn": 6, + "charOffset": 237226, + "charLength": 1, + "snippet": { + "text": "std::shared_ptr Player::getStoreInbox() const {\n\tauto thing = getThing(CONST_SLOT_STORE_INBOX);\n\tif (!thing) {\n\t\treturn nullptr;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "591d731ffc72a516e85a21632472a2bee80bd11f8db362ffa77091bc5e86b879" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8128, + "startColumn": 2, + "charOffset": 237742, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 8126, + "startColumn": 2, + "charOffset": 237703, + "charLength": 3, + "snippet": { + "text": "\n\tbool hasPermittedCondition = false;\n\tfor (auto condition : allowedConditions) {\n\t\tif (getCondition(condition)) {\n\t\t\thasPermittedCondition = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b49ec719e8dc728d77dbbd4bd78ff49754bc59411a91d980cc1774f3bc4605c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8141, + "startColumn": 6, + "charOffset": 238032, + "charLength": 11, + "snippet": { + "text": "playerArmor" + } + }, + "contextRegion": { + "startLine": 8139, + "startColumn": 6, + "charOffset": 237945, + "charLength": 11, + "snippet": { + "text": "\tuint16_t chance = 0;\n\tif (auto playerArmor = getInventoryItem(CONST_SLOT_ARMOR);\n\t playerArmor != nullptr && playerArmor->getTier()) {\n\t\tchance += static_cast(playerArmor->getDodgeChance() * 100);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0d021fe8ff3a5c86e4a933ea4f6363c2960103c99aafcab0b9e16e2ba789898" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8141, + "startColumn": 29, + "charOffset": 238055, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 8139, + "startColumn": 29, + "charOffset": 237945, + "charLength": 2, + "snippet": { + "text": "\tuint16_t chance = 0;\n\tif (auto playerArmor = getInventoryItem(CONST_SLOT_ARMOR);\n\t playerArmor != nullptr && playerArmor->getTier()) {\n\t\tchance += static_cast(playerArmor->getDodgeChance() * 100);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea8df7f63441315004632d4fb2ce6ff59ba7a5ca25b04498480568152747407f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8141, + "startColumn": 32, + "charOffset": 238058, + "charLength": 11, + "snippet": { + "text": "playerArmor" + } + }, + "contextRegion": { + "startLine": 8139, + "startColumn": 32, + "charOffset": 237945, + "charLength": 11, + "snippet": { + "text": "\tuint16_t chance = 0;\n\tif (auto playerArmor = getInventoryItem(CONST_SLOT_ARMOR);\n\t playerArmor != nullptr && playerArmor->getTier()) {\n\t\tchance += static_cast(playerArmor->getDodgeChance() * 100);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f7967bbfbca6f0f29705110ca702d1d7852a2d1dad9c7f3547b0d4bed275862" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8142, + "startColumn": 67, + "charOffset": 238150, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 8140, + "startColumn": 67, + "charOffset": 237967, + "charLength": 3, + "snippet": { + "text": "\tif (auto playerArmor = getInventoryItem(CONST_SLOT_ARMOR);\n\t playerArmor != nullptr && playerArmor->getTier()) {\n\t\tchance += static_cast(playerArmor->getDodgeChance() * 100);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e1e8a81d8460f0b4f549561c29b51d8ea548ffccee5fb73dcd9e2087dfbc9dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8142, + "startColumn": 67, + "charOffset": 238150, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 8140, + "startColumn": 67, + "charOffset": 237967, + "charLength": 3, + "snippet": { + "text": "\tif (auto playerArmor = getInventoryItem(CONST_SLOT_ARMOR);\n\t playerArmor != nullptr && playerArmor->getTier()) {\n\t\tchance += static_cast(playerArmor->getDodgeChance() * 100);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96c7388ffe1e6a9a89731eec69550096ed7760870fea3e756cfe943c4a2f8174" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8158, + "startColumn": 3, + "charOffset": 238609, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 8156, + "startColumn": 3, + "charOffset": 238555, + "charLength": 3, + "snippet": { + "text": "\tif (willNotLoseBless) {\n\t\tauto addedBless = false;\n\t\tfor (uint8_t i = 2; i <= 6; i++) {\n\t\t\tif (!hasBlessing(i)) {\n\t\t\t\taddBlessing(i, 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33a6d13ca660e5779ffd1a4a16021b3f66196769afd8396f127261f90aaeb48b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8158, + "startColumn": 28, + "charOffset": 238634, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 8156, + "startColumn": 28, + "charOffset": 238555, + "charLength": 1, + "snippet": { + "text": "\tif (willNotLoseBless) {\n\t\tauto addedBless = false;\n\t\tfor (uint8_t i = 2; i <= 6; i++) {\n\t\t\tif (!hasBlessing(i)) {\n\t\t\t\taddBlessing(i, 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43201aaa3a31ade5b8a6051d068b6cda2568a2a3328e3c814fba8fb2187bbb5c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8169, + "startColumn": 9, + "charOffset": 238957, + "charLength": 5, + "snippet": { + "text": "empty" + } + }, + "contextRegion": { + "startLine": 8167, + "startColumn": 9, + "charOffset": 238935, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\tbless.empty() ? blessOutput << \"You lost all your blessings.\" : blessOutput << \"You are still blessed with \" << bless;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dcbf721fd7f1afd12dd906fd8714f128e90748b26b82cbb736dea4c143ce1fec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8180, + "startColumn": 48, + "charOffset": 239386, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8178, + "startColumn": 48, + "charOffset": 239234, + "charLength": 1, + "snippet": { + "text": "\tconst auto &playerTile = getTile();\n\tconst auto &house = playerTile ? playerTile->getHouse() : nullptr;\n\tif (speechbubble == SPEECHBUBBLE_HIRELING && (!house || house->getHouseAccessLevel(static_self_cast()) == HOUSE_NOT_INVITED)) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "591d731ffc72a516e85a21632472a2bee80bd11f8db362ffa77091bc5e86b879" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in conditional return statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8181, + "startColumn": 10, + "charOffset": 239485, + "charLength": 5, + "snippet": { + "text": "false" + } + }, + "contextRegion": { + "startLine": 8179, + "startColumn": 10, + "charOffset": 239271, + "charLength": 5, + "snippet": { + "text": "\tconst auto &house = playerTile ? playerTile->getHouse() : nullptr;\n\tif (speechbubble == SPEECHBUBBLE_HIRELING && (!house || house->getHouseAccessLevel(static_self_cast()) == HOUSE_NOT_INVITED)) {\n\t\treturn false;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "57e97be7ca0596fb5f8739321ed3f412f3095037828d3e928b52d84926cb482e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8189, + "startColumn": 2, + "charOffset": 239611, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 8187, + "startColumn": 2, + "charOffset": 239513, + "charLength": 2, + "snippet": { + "text": "uint16_t Player::getPlayerVocationEnum() const {\n\tint cipTibiaId = getVocation()->getClientId();\n\tif (cipTibiaId == 1 || cipTibiaId == 11) {\n\t\treturn Vocation_t::VOCATION_KNIGHT_CIP; // Knight\n\t} else if (cipTibiaId == 2 || cipTibiaId == 12) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2362b191c2f84ff28ea4c471afec26f1b0cca71c82059aa4fd6fbced7e4ed1b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "11 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8189, + "startColumn": 39, + "charOffset": 239648, + "charLength": 2, + "snippet": { + "text": "11" + } + }, + "contextRegion": { + "startLine": 8187, + "startColumn": 39, + "charOffset": 239513, + "charLength": 2, + "snippet": { + "text": "uint16_t Player::getPlayerVocationEnum() const {\n\tint cipTibiaId = getVocation()->getClientId();\n\tif (cipTibiaId == 1 || cipTibiaId == 11) {\n\t\treturn Vocation_t::VOCATION_KNIGHT_CIP; // Knight\n\t} else if (cipTibiaId == 2 || cipTibiaId == 12) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f74e5f05fee1687ef7c227895d95b4fbb4653bdd1578a2608ddb5a7d3123a18" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8191, + "startColumn": 4, + "charOffset": 239709, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 8189, + "startColumn": 4, + "charOffset": 239610, + "charLength": 4, + "snippet": { + "text": "\tif (cipTibiaId == 1 || cipTibiaId == 11) {\n\t\treturn Vocation_t::VOCATION_KNIGHT_CIP; // Knight\n\t} else if (cipTibiaId == 2 || cipTibiaId == 12) {\n\t\treturn Vocation_t::VOCATION_PALADIN_CIP; // Paladin\n\t} else if (cipTibiaId == 3 || cipTibiaId == 13) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc9ba57becd542ca1271180f714c32da5d751b5c3dcc4e2c90569b48a0529d57" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "12 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8191, + "startColumn": 46, + "charOffset": 239751, + "charLength": 2, + "snippet": { + "text": "12" + } + }, + "contextRegion": { + "startLine": 8189, + "startColumn": 46, + "charOffset": 239610, + "charLength": 2, + "snippet": { + "text": "\tif (cipTibiaId == 1 || cipTibiaId == 11) {\n\t\treturn Vocation_t::VOCATION_KNIGHT_CIP; // Knight\n\t} else if (cipTibiaId == 2 || cipTibiaId == 12) {\n\t\treturn Vocation_t::VOCATION_PALADIN_CIP; // Paladin\n\t} else if (cipTibiaId == 3 || cipTibiaId == 13) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80073f5759f7ab975a83786e428578d907a2c9953c90f63d1518514487663e19" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "13 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8193, + "startColumn": 46, + "charOffset": 239856, + "charLength": 2, + "snippet": { + "text": "13" + } + }, + "contextRegion": { + "startLine": 8191, + "startColumn": 46, + "charOffset": 239706, + "charLength": 2, + "snippet": { + "text": "\t} else if (cipTibiaId == 2 || cipTibiaId == 12) {\n\t\treturn Vocation_t::VOCATION_PALADIN_CIP; // Paladin\n\t} else if (cipTibiaId == 3 || cipTibiaId == 13) {\n\t\treturn Vocation_t::VOCATION_SORCERER_CIP; // Sorcerer\n\t} else if (cipTibiaId == 4 || cipTibiaId == 14) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2974ce12019eae1126684bcf0b26ab8925767ddd0c94ee9734676c509f3f714e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "14 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.cpp", + "index": 3 + }, + "region": { + "startLine": 8195, + "startColumn": 46, + "charOffset": 239963, + "charLength": 2, + "snippet": { + "text": "14" + } + }, + "contextRegion": { + "startLine": 8193, + "startColumn": 46, + "charOffset": 239811, + "charLength": 2, + "snippet": { + "text": "\t} else if (cipTibiaId == 3 || cipTibiaId == 13) {\n\t\treturn Vocation_t::VOCATION_SORCERER_CIP; // Sorcerer\n\t} else if (cipTibiaId == 4 || cipTibiaId == 14) {\n\t\treturn Vocation_t::VOCATION_DRUID_CIP; // Druid\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db973bbfbc44d80d628eda5ffa559e9f62659ae913d102ff79dce25f16437fae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Player::isInWarList' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "index": 4 + }, + "region": { + "startLine": 304, + "startColumn": 7, + "charOffset": 7605, + "charLength": 11, + "snippet": { + "text": "isInWarList" + } + }, + "contextRegion": { + "startLine": 302, + "startColumn": 7, + "charOffset": 7545, + "charLength": 11, + "snippet": { + "text": "\n\tbool isInWar(std::shared_ptr player) const;\n\tbool isInWarList(uint32_t guild_id) const;\n\n\tvoid setLastWalkthroughAttempt(int64_t walkthroughAttempt) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a622eca31398be0212d542f64ecc079495f25ecfb3114874fb252e746505cf23" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Player::hasItemCountById' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "index": 4 + }, + "region": { + "startLine": 709, + "startColumn": 7, + "charOffset": 18352, + "charLength": 16, + "snippet": { + "text": "hasItemCountById" + } + }, + "contextRegion": { + "startLine": 707, + "startColumn": 7, + "charOffset": 18272, + "charLength": 16, + "snippet": { + "text": "\t * @param itemAmount is uint32_t because stash item is uint32_t max\n\t */\n\tbool hasItemCountById(uint16_t itemId, uint32_t itemCount, bool checkStash) const;\n\t/**\n\t * @param itemAmount is uint32_t because stash item is uint32_t max" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c1bcde14ab71d3ed165c20db65b034681cd1cf4dd8fb07c81cf995d69e6c087" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Player::onKilledMonster' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "index": 4 + }, + "region": { + "startLine": 1004, + "startColumn": 7, + "charOffset": 27690, + "charLength": 15, + "snippet": { + "text": "onKilledMonster" + } + }, + "contextRegion": { + "startLine": 1002, + "startColumn": 7, + "charOffset": 27507, + "charLength": 15, + "snippet": { + "text": "\tvoid onTargetCreatureGainHealth(std::shared_ptr target, int32_t points) override;\n\tbool onKilledPlayer(const std::shared_ptr &target, bool lastHit) override;\n\tbool onKilledMonster(const std::shared_ptr &target) override;\n\tvoid onGainExperience(uint64_t gainExp, std::shared_ptr target) override;\n\tvoid onGainSharedExperience(uint64_t gainExp, std::shared_ptr target);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "117785c727196abd86135d63f94bee53d16aee048c8c098f32d4ffabd220be8f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Player::setHazardSystemPoints' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "index": 4 + }, + "region": { + "startLine": 2538, + "startColumn": 7, + "charOffset": 71328, + "charLength": 21, + "snippet": { + "text": "setHazardSystemPoints" + } + }, + "contextRegion": { + "startLine": 2536, + "startColumn": 7, + "charOffset": 71209, + "charLength": 21, + "snippet": { + "text": "\tvoid parseAttackDealtHazardSystem(CombatDamage &damage, std::shared_ptr monster);\n\t// Points increase:\n\tvoid setHazardSystemPoints(int32_t amount);\n\t// Points get:\n\tuint16_t getHazardSystemPoints() const {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1ac1120124d0b06c6b95818e461413b5a2f6da08067e28d79a70a332d2c34b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Player::checkLootContainers' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "index": 4 + }, + "region": { + "startLine": 2670, + "startColumn": 7, + "charOffset": 75572, + "charLength": 19, + "snippet": { + "text": "checkLootContainers" + } + }, + "contextRegion": { + "startLine": 2668, + "startColumn": 7, + "charOffset": 75496, + "charLength": 19, + "snippet": { + "text": "\tbool hasCapacity(std::shared_ptr item, uint32_t count) const;\n\n\tvoid checkLootContainers(std::shared_ptr item);\n\n\tvoid gainExperience(uint64_t exp, std::shared_ptr target);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a9e8e63578b7c184d795c2fe0fd086b5f7618b1792093411d610506ab9000a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Player::calculateDamageReductionFromEquipedItems' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "index": 4 + }, + "region": { + "startLine": 3064, + "startColumn": 7, + "charOffset": 89615, + "charLength": 40, + "snippet": { + "text": "calculateDamageReductionFromEquipedItems" + } + }, + "contextRegion": { + "startLine": 3062, + "startColumn": 7, + "charOffset": 89539, + "charLength": 40, + "snippet": { + "text": "\n\tstd::array getFinalDamageReduction() const;\n\tvoid calculateDamageReductionFromEquipedItems(std::array &combatReductionMap) const;\n\tvoid calculateDamageReductionFromItem(std::array &combatReductionMap, std::shared_ptr item) const;\n\tvoid updateDamageReductionFromItemImbuement(std::array &combatReductionMap, std::shared_ptr item, uint16_t combatTypeIndex) const;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3439e2da498c997884ff8d7c5119f41cf666277cb866056a909c980f720ba528" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Player::calculateDamageReductionFromItem' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "index": 4 + }, + "region": { + "startLine": 3065, + "startColumn": 7, + "charOffset": 89725, + "charLength": 32, + "snippet": { + "text": "calculateDamageReductionFromItem" + } + }, + "contextRegion": { + "startLine": 3063, + "startColumn": 7, + "charOffset": 89540, + "charLength": 32, + "snippet": { + "text": "\tstd::array getFinalDamageReduction() const;\n\tvoid calculateDamageReductionFromEquipedItems(std::array &combatReductionMap) const;\n\tvoid calculateDamageReductionFromItem(std::array &combatReductionMap, std::shared_ptr item) const;\n\tvoid updateDamageReductionFromItemImbuement(std::array &combatReductionMap, std::shared_ptr item, uint16_t combatTypeIndex) const;\n\tvoid updateDamageReductionFromItemAbility(std::array &combatReductionMap, std::shared_ptr item, uint16_t combatTypeIndex) const;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a797f584d359125e5322831f0f57cc45fbfa7e5a9394c26cf718f0a8d9c3681d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Player::updateDamageReductionFromItemImbuement' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "index": 4 + }, + "region": { + "startLine": 3066, + "startColumn": 7, + "charOffset": 89855, + "charLength": 38, + "snippet": { + "text": "updateDamageReductionFromItemImbuement" + } + }, + "contextRegion": { + "startLine": 3064, + "startColumn": 7, + "charOffset": 89609, + "charLength": 38, + "snippet": { + "text": "\tvoid calculateDamageReductionFromEquipedItems(std::array &combatReductionMap) const;\n\tvoid calculateDamageReductionFromItem(std::array &combatReductionMap, std::shared_ptr item) const;\n\tvoid updateDamageReductionFromItemImbuement(std::array &combatReductionMap, std::shared_ptr item, uint16_t combatTypeIndex) const;\n\tvoid updateDamageReductionFromItemAbility(std::array &combatReductionMap, std::shared_ptr item, uint16_t combatTypeIndex) const;\n\tdouble_t calculateDamageReduction(double_t currentTotal, int16_t resistance) const;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c0b326f3d65ff604769e185710aa5d9883ea132430bd59aaf318ebbb050fbf6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Player::updateDamageReductionFromItemAbility' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/player.hpp", + "index": 4 + }, + "region": { + "startLine": 3067, + "startColumn": 7, + "charOffset": 90017, + "charLength": 36, + "snippet": { + "text": "updateDamageReductionFromItemAbility" + } + }, + "contextRegion": { + "startLine": 3065, + "startColumn": 7, + "charOffset": 89719, + "charLength": 36, + "snippet": { + "text": "\tvoid calculateDamageReductionFromItem(std::array &combatReductionMap, std::shared_ptr item) const;\n\tvoid updateDamageReductionFromItemImbuement(std::array &combatReductionMap, std::shared_ptr item, uint16_t combatTypeIndex) const;\n\tvoid updateDamageReductionFromItemAbility(std::array &combatReductionMap, std::shared_ptr item, uint16_t combatTypeIndex) const;\n\tdouble_t calculateDamageReduction(double_t currentTotal, int16_t resistance) const;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a93f1f667c11c5e9f97af5f282efeb334956754d3a9eb0e26e4355869d961c9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.hpp" + }, + "region": { + "startLine": 13, + "startColumn": 10, + "charOffset": 429, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 11, + "startColumn": 10, + "charOffset": 384, + "charLength": 30, + "snippet": { + "text": "\n#include \"creatures/npcs/npcs.hpp\"\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"items/tile.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f69d6cfec9be0f6769310fd1d031cff4d88ef48385f012190be0fe563d15e4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/achievement/player_achievement.cpp", + "index": 1 + }, + "region": { + "startLine": 36, + "startColumn": 24, + "charOffset": 1055, + "charLength": 9, + "snippet": { + "text": "timestamp" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 24, + "charOffset": 999, + "charLength": 9, + "snippet": { + "text": "\n\taddPoints(achievement.points);\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\n\tgetUnlockedKV()->set(achievement.name, toSaveTimeStamp);\n\tm_achievementsUnlocked.emplace_back(achievement.id, toSaveTimeStamp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d951e8e64db5cee9f620e66719a9742887819d9ba4d87614bb1da018d78a32e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int64_t' (aka 'long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/achievement/player_achievement.cpp", + "index": 1 + }, + "region": { + "startLine": 36, + "startColumn": 41, + "charOffset": 1072, + "charLength": 9, + "snippet": { + "text": "timestamp" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 41, + "charOffset": 999, + "charLength": 9, + "snippet": { + "text": "\n\taddPoints(achievement.points);\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\n\tgetUnlockedKV()->set(achievement.name, toSaveTimeStamp);\n\tm_achievementsUnlocked.emplace_back(achievement.id, toSaveTimeStamp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df97d5327f8d16cf29db98a886008c436c35d255ce68152c9f9cc85c835d3e68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int64_t' (aka 'long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/achievement/player_achievement.cpp", + "index": 1 + }, + "region": { + "startLine": 36, + "startColumn": 53, + "charOffset": 1084, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 53, + "charOffset": 999, + "charLength": 1, + "snippet": { + "text": "\n\taddPoints(achievement.points);\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\n\tgetUnlockedKV()->set(achievement.name, toSaveTimeStamp);\n\tm_achievementsUnlocked.emplace_back(achievement.id, toSaveTimeStamp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00761ab51aa437a9dc815cbbc014e6060228dea52d93f638ba7cbd24aec0f031" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/achievement/player_achievement.cpp", + "index": 1 + }, + "region": { + "startLine": 36, + "startColumn": 69, + "charOffset": 1100, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 69, + "charOffset": 999, + "charLength": 4, + "snippet": { + "text": "\n\taddPoints(achievement.points);\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\n\tgetUnlockedKV()->set(achievement.name, toSaveTimeStamp);\n\tm_achievementsUnlocked.emplace_back(achievement.id, toSaveTimeStamp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "723e306d9e04bf29878f9c09036c3f9213b24f153832e054487783ffe4fac088" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/achievement/player_achievement.cpp", + "index": 1 + }, + "region": { + "startLine": 38, + "startColumn": 25, + "charOffset": 1189, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 25, + "charOffset": 1032, + "charLength": 12, + "snippet": { + "text": "\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\n\tgetUnlockedKV()->set(achievement.name, toSaveTimeStamp);\n\tm_achievementsUnlocked.emplace_back(achievement.id, toSaveTimeStamp);\n\tm_achievementsUnlocked.shrink_to_fit();\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ced760d9d05e4f1f600708b57629ec94973137417118b44df81883c93d9ba60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/achievement/player_achievement.cpp", + "index": 1 + }, + "region": { + "startLine": 58, + "startColumn": 26, + "charOffset": 1767, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 56, + "startColumn": 26, + "charOffset": 1654, + "charLength": 5, + "snippet": { + "text": "\t it != m_achievementsUnlocked.end()) {\n\t\tgetUnlockedKV()->remove(achievement.name);\n\t\tm_achievementsUnlocked.erase(it);\n\t\tremovePoints(achievement.points);\n\t\tm_achievementsUnlocked.shrink_to_fit();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aaf7a4a807bedf4d85802dd1331a8eb8af07e17d73b282d98a51691fe4b89f10" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/achievement/player_achievement.cpp", + "index": 1 + }, + "region": { + "startLine": 84, + "startColumn": 9, + "charOffset": 2354, + "charLength": 8, + "snippet": { + "text": "kvScoped" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 9, + "charOffset": 2227, + "charLength": 8, + "snippet": { + "text": "uint16_t PlayerAchievement::getPoints() const {\n\tauto kvScoped = m_player.kv()->scoped(\"achievements\")->get(\"points\");\n\treturn kvScoped ? static_cast(kvScoped->getNumber()) : 0;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b77a066fb99b27c56fc3b2dcedad25aaf805d09c84be9f76f1baabc37cde060" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/achievement/player_achievement.cpp", + "index": 1 + }, + "region": { + "startLine": 104, + "startColumn": 2, + "charOffset": 3138, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 102, + "startColumn": 2, + "charOffset": 2970, + "charLength": 3, + "snippet": { + "text": "\tconst auto &unlockedAchievements = getUnlockedKV()->keys();\n\tg_logger().debug(\"[{}] - Loading unlocked achievements: {}\", __FUNCTION__, unlockedAchievements.size());\n\tfor (const auto &achievementName : unlockedAchievements) {\n\t\tconst Achievement &achievement = g_game().getAchievementByName(achievementName);\n\t\tif (achievement.id == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ca075356a4c7d159e42c10013d553b8ae9c239b23dbf83a5da71139bf8c09ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/achievement/player_achievement.cpp", + "index": 1 + }, + "region": { + "startLine": 113, + "startColumn": 26, + "charOffset": 3558, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 111, + "startColumn": 26, + "charOffset": 3415, + "charLength": 12, + "snippet": { + "text": "\t\tg_logger().debug(\"[{}] - Achievement {} found for player {}.\", __FUNCTION__, achievementName, m_player.getName());\n\n\t\tm_achievementsUnlocked.emplace_back(achievement.id, getUnlockedKV()->get(achievementName)->getNumber());\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98ec5a448095f2808312823bdcc38e33db39fee3ac321ed8936e1ffd427804d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/achievement/player_achievement.cpp", + "index": 1 + }, + "region": { + "startLine": 120, + "startColumn": 2, + "charOffset": 3805, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 2, + "charOffset": 3705, + "charLength": 3, + "snippet": { + "text": "\tstd::vector> achievementsUnlocked;\n\tuint16_t unlockedSecret = 0;\n\tfor (const auto &[achievId, achievCreatedTime] : getUnlockedAchievements()) {\n\t\tAchievement achievement = g_game().getAchievementById(achievId);\n\t\tif (achievement.id == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a4f063a7a2d55ce2fd0ccb73821a4963b436116a805387b7d970e7fe036c2a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/achievement/player_achievement.cpp", + "index": 1 + }, + "region": { + "startLine": 130, + "startColumn": 24, + "charOffset": 4074, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 128, + "startColumn": 24, + "charOffset": 4046, + "charLength": 12, + "snippet": { + "text": "\t\t}\n\n\t\tachievementsUnlocked.emplace_back(achievement, achievCreatedTime);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cdb85de4786381ccdde90068f3f7e9acd9870376f6c3692bcf5205fd0ca5bd7d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.hpp", + "index": 2 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"creatures/monsters/monsters.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e45483e1912ecf8c717a48f913562d9a9cf501f9947625dad361d43acc28406" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.hpp", + "index": 3 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a2b3a997037594f8bab93e08d9b46935593069da5e9def3fec147ea485ffc36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.hpp" + }, + "region": { + "startLine": 13, + "startColumn": 10, + "charOffset": 429, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 11, + "startColumn": 10, + "charOffset": 384, + "charLength": 30, + "snippet": { + "text": "\n#include \"creatures/npcs/npcs.hpp\"\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"items/tile.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f69d6cfec9be0f6769310fd1d031cff4d88ef48385f012190be0fe563d15e4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'add' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 36, + "startColumn": 23, + "charOffset": 895, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 23, + "charOffset": 870, + "charLength": 7, + "snippet": { + "text": "}\n\nbool PlayerBadge::add(uint8_t id, uint32_t timestamp /* = 0*/) {\n\tif (hasBadge(id)) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22fba0da042de1907620c276f13fff49273de675f926abf4eca566c0f28cc558" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 46, + "startColumn": 24, + "charOffset": 1095, + "charLength": 9, + "snippet": { + "text": "timestamp" + } + }, + "contextRegion": { + "startLine": 44, + "startColumn": 24, + "charOffset": 1068, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\n\tgetUnlockedKV()->set(badge.m_name, toSaveTimeStamp);\n\tm_badgesUnlocked.emplace_back(badge, toSaveTimeStamp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23d7403f84a290f1dd8ade0440ca1fc0997589d3b8a538457b237100ffc2f431" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int64_t' (aka 'long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 46, + "startColumn": 41, + "charOffset": 1112, + "charLength": 9, + "snippet": { + "text": "timestamp" + } + }, + "contextRegion": { + "startLine": 44, + "startColumn": 41, + "charOffset": 1068, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\n\tgetUnlockedKV()->set(badge.m_name, toSaveTimeStamp);\n\tm_badgesUnlocked.emplace_back(badge, toSaveTimeStamp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba8c1acd894665029f2704a34a296b1e54ef42d7959baa5e55d30d203aa9e450" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int64_t' (aka 'long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 46, + "startColumn": 53, + "charOffset": 1124, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 44, + "startColumn": 53, + "charOffset": 1068, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\n\tgetUnlockedKV()->set(badge.m_name, toSaveTimeStamp);\n\tm_badgesUnlocked.emplace_back(badge, toSaveTimeStamp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0af253eba9600af802a53c23f70411ba18f4941475f8049136b700994ed7b366" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 46, + "startColumn": 69, + "charOffset": 1140, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 44, + "startColumn": 69, + "charOffset": 1068, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\n\tgetUnlockedKV()->set(badge.m_name, toSaveTimeStamp);\n\tm_badgesUnlocked.emplace_back(badge, toSaveTimeStamp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "122b2b9497b680089ba5a82d63e2c523a611bfeac7aff2326a54d72fcbbab591" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 48, + "startColumn": 19, + "charOffset": 1219, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 19, + "charOffset": 1072, + "charLength": 12, + "snippet": { + "text": "\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\n\tgetUnlockedKV()->set(badge.m_name, toSaveTimeStamp);\n\tm_badgesUnlocked.emplace_back(badge, toSaveTimeStamp);\n\tm_badgesUnlocked.shrink_to_fit();\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1c2cda569f4e9fbf11ba85e76eab7d5905e4e6fae9574453d784b0172fd48a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 54, + "startColumn": 2, + "charOffset": 1356, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 52, + "startColumn": 2, + "charOffset": 1308, + "charLength": 3, + "snippet": { + "text": "\nvoid PlayerBadge::checkAndUpdateNewBadges() {\n\tfor (const auto &badge : g_game().getBadges()) {\n\t\tswitch (badge.m_type) {\n\t\t\tcase CyclopediaBadge_t::ACCOUNT_AGE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "519a0d71bf87b7a8ee19b3a37af0f63d4fcce3c0f9f7c04af5353783a561ab6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 57, + "startColumn": 20, + "charOffset": 1490, + "charLength": 5, + "snippet": { + "text": "badge" + } + }, + "contextRegion": { + "startLine": 55, + "startColumn": 20, + "charOffset": 1405, + "charLength": 5, + "snippet": { + "text": "\t\tswitch (badge.m_type) {\n\t\t\tcase CyclopediaBadge_t::ACCOUNT_AGE:\n\t\t\t\tif (accountAge(badge.m_amount)) {\n\t\t\t\t\tadd(badge.m_id);\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8192b5a278d8ae0a3d1825f984921e5d297eee9889f94273a0a01587b1e59f41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 58, + "startColumn": 6, + "charOffset": 1514, + "charLength": 3, + "snippet": { + "text": "add" + } + }, + "contextRegion": { + "startLine": 56, + "startColumn": 6, + "charOffset": 1431, + "charLength": 3, + "snippet": { + "text": "\t\t\tcase CyclopediaBadge_t::ACCOUNT_AGE:\n\t\t\t\tif (accountAge(badge.m_amount)) {\n\t\t\t\t\tadd(badge.m_id);\n\t\t\t\t}\n\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2feaefe7fa9ec765e9b5601439583b29fbb51bf332fe42da7939959a31ecd9f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 62, + "startColumn": 17, + "charOffset": 1600, + "charLength": 5, + "snippet": { + "text": "badge" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 17, + "charOffset": 1537, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\tcase CyclopediaBadge_t::LOYALTY:\n\t\t\t\tif (loyalty(badge.m_amount)) {\n\t\t\t\t\tadd(badge.m_id);\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f7329e2089a0b3341ca9b1e5795cc369976276f4aa5e9ca5b85d104523869c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 63, + "startColumn": 6, + "charOffset": 1624, + "charLength": 3, + "snippet": { + "text": "add" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 6, + "charOffset": 1548, + "charLength": 3, + "snippet": { + "text": "\t\t\tcase CyclopediaBadge_t::LOYALTY:\n\t\t\t\tif (loyalty(badge.m_amount)) {\n\t\t\t\t\tadd(badge.m_id);\n\t\t\t\t}\n\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "041bbed2afe85f6a6e9745e49dd3cb277cbb9beaff73ef0a5b8c087c9c3826a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 67, + "startColumn": 25, + "charOffset": 1728, + "charLength": 5, + "snippet": { + "text": "badge" + } + }, + "contextRegion": { + "startLine": 65, + "startColumn": 25, + "charOffset": 1647, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\tcase CyclopediaBadge_t::ACCOUNT_ALL_LEVEL:\n\t\t\t\tif (accountAllLevel(badge.m_amount)) {\n\t\t\t\t\tadd(badge.m_id);\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80d6ef52ba0175025a40c1f2f279e6fe462141930520e0d2a967401b192b6574" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 68, + "startColumn": 6, + "charOffset": 1752, + "charLength": 3, + "snippet": { + "text": "add" + } + }, + "contextRegion": { + "startLine": 66, + "startColumn": 6, + "charOffset": 1658, + "charLength": 3, + "snippet": { + "text": "\t\t\tcase CyclopediaBadge_t::ACCOUNT_ALL_LEVEL:\n\t\t\t\tif (accountAllLevel(badge.m_amount)) {\n\t\t\t\t\tadd(badge.m_id);\n\t\t\t\t}\n\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92bedf340c5e408357e4028e24a81019594f7e8332cf2e402820b65c7d8608f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 72, + "startColumn": 29, + "charOffset": 1864, + "charLength": 5, + "snippet": { + "text": "badge" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 29, + "charOffset": 1775, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\tcase CyclopediaBadge_t::ACCOUNT_ALL_VOCATIONS:\n\t\t\t\tif (accountAllVocations(badge.m_amount)) {\n\t\t\t\t\tadd(badge.m_id);\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "128ae8d3f452b3242c7c1735235396c474e97542c3082dca8b5d75b4132a4b39" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 73, + "startColumn": 6, + "charOffset": 1888, + "charLength": 3, + "snippet": { + "text": "add" + } + }, + "contextRegion": { + "startLine": 71, + "startColumn": 6, + "charOffset": 1786, + "charLength": 3, + "snippet": { + "text": "\t\t\tcase CyclopediaBadge_t::ACCOUNT_ALL_VOCATIONS:\n\t\t\t\tif (accountAllVocations(badge.m_amount)) {\n\t\t\t\t\tadd(badge.m_id);\n\t\t\t\t}\n\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d157104d4025f9ac51749c668415ab004b0e7834ad6d6e51d9fd8f862737a42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 77, + "startColumn": 4, + "charOffset": 1978, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 75, + "startColumn": 4, + "charOffset": 1911, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\tcase CyclopediaBadge_t::TOURNAMENT_PARTICIPATION:\n\t\t\tcase CyclopediaBadge_t::TOURNAMENT_POINTS:\n\t\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c0aeca7e19a96b50244ecee4609402814dc29853df40efb226b4a92ed8f81df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 88, + "startColumn": 2, + "charOffset": 2257, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 86, + "startColumn": 2, + "charOffset": 2107, + "charLength": 3, + "snippet": { + "text": "\tconst auto &unlockedBadges = getUnlockedKV()->keys();\n\tg_logger().debug(\"[{}] - Loading unlocked badges: {}\", __FUNCTION__, unlockedBadges.size());\n\tfor (const auto &badgeName : unlockedBadges) {\n\t\tconst Badge &badge = g_game().getBadgeByName(badgeName);\n\t\tif (badge.m_id == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7449713b2a1536c8a560eae1a095683769e69503662d85f14d36f11b533c879b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 97, + "startColumn": 20, + "charOffset": 2610, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 95, + "startColumn": 20, + "charOffset": 2482, + "charLength": 12, + "snippet": { + "text": "\t\tg_logger().debug(\"[{}] - Badge {} found for player {}.\", __FUNCTION__, badge.m_name, m_player.getName());\n\n\t\tm_badgesUnlocked.emplace_back(badge, getUnlockedKV()->get(badgeName)->getNumber());\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7f2c15fc0277d203133f0f5ca0e9550f4fa0848ede4e49a21f811b469b04ddc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "365 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 111, + "startColumn": 50, + "charOffset": 3012, + "charLength": 3, + "snippet": { + "text": "365" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 50, + "charOffset": 2887, + "charLength": 3, + "snippet": { + "text": "// Badge Calculate Functions\nbool PlayerBadge::accountAge(uint8_t amount) {\n\treturn std::floor(m_player.getLoyaltyPoints() / 365) >= amount;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6473901c6c987cd6972c93679ed918dfe9907772959861f5caaa73d375c9a692" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 111, + "startColumn": 58, + "charOffset": 3020, + "charLength": 6, + "snippet": { + "text": "amount" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 58, + "charOffset": 2887, + "charLength": 6, + "snippet": { + "text": "// Badge Calculate Functions\nbool PlayerBadge::accountAge(uint8_t amount) {\n\treturn std::floor(m_player.getLoyaltyPoints() / 365) >= amount;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e2efa6010362cfafd1b05facb38335724a678863f56d46c79a41c43682c3472" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 120, + "startColumn": 19, + "charOffset": 3277, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 19, + "charOffset": 3125, + "charLength": 3, + "snippet": { + "text": "bool PlayerBadge::accountAllLevel(uint8_t amount) {\n\tconst auto &players = g_game().getPlayersByAccount(m_player.getAccount(), true);\n\tuint16_t total = std::accumulate(players.begin(), players.end(), 0, [](uint16_t sum, const std::shared_ptr &player) {\n\t\treturn sum + player->getLevel();\n\t});" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13f29e14418ab5992f16bc24e3254100c4b51e5424eb09e1cc4ed465b01f9a9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 131, + "startColumn": 2, + "charOffset": 3601, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 129, + "startColumn": 2, + "charOffset": 3555, + "charLength": 3, + "snippet": { + "text": "\tauto druid = false;\n\tauto sorcerer = false;\n\tfor (const auto &player : g_game().getPlayersByAccount(m_player.getAccount(), true)) {\n\t\tif (player->getLevel() >= amount) {\n\t\t\tauto vocationEnum = player->getPlayerVocationEnum();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43289df96a6b666725de46ff9ac21e5e7dedb4058c8ac6245c92de35a3724d64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 134, + "startColumn": 4, + "charOffset": 3785, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 4, + "charOffset": 3688, + "charLength": 2, + "snippet": { + "text": "\t\tif (player->getLevel() >= amount) {\n\t\t\tauto vocationEnum = player->getPlayerVocationEnum();\n\t\t\tif (vocationEnum == Vocation_t::VOCATION_KNIGHT_CIP) {\n\t\t\t\tknight = true;\n\t\t\t} else if (vocationEnum == Vocation_t::VOCATION_SORCERER_CIP) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68a9276e3776a608c18b1bfa2e3f139b5c2198377fcec75fafe5dfc398408289" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'tournamentParticipation' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 148, + "startColumn": 19, + "charOffset": 4196, + "charLength": 23, + "snippet": { + "text": "tournamentParticipation" + } + }, + "contextRegion": { + "startLine": 146, + "startColumn": 19, + "charOffset": 4175, + "charLength": 23, + "snippet": { + "text": "}\n\nbool PlayerBadge::tournamentParticipation(uint8_t skill) {\n\t// todo check if is used\n\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f4ed797227733ff99b5d0fed79c309ac80f480c1306ca89bc88ba69518b8158" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-unused-parameters", + "ruleIndex": 612, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'skill' is unused" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 148, + "startColumn": 51, + "charOffset": 4228, + "charLength": 5, + "snippet": { + "text": "skill" + } + }, + "contextRegion": { + "startLine": 146, + "startColumn": 51, + "charOffset": 4175, + "charLength": 5, + "snippet": { + "text": "}\n\nbool PlayerBadge::tournamentParticipation(uint8_t skill) {\n\t// todo check if is used\n\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef06e0afae662c3ed5ce0d048caf786e55938327bbda5e4ff54d13bfdb62e4bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'tournamentPoints' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 153, + "startColumn": 19, + "charOffset": 4299, + "charLength": 16, + "snippet": { + "text": "tournamentPoints" + } + }, + "contextRegion": { + "startLine": 151, + "startColumn": 19, + "charOffset": 4278, + "charLength": 16, + "snippet": { + "text": "}\n\nbool PlayerBadge::tournamentPoints(uint8_t race) {\n\t// todo check if is used\n\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "016d7958a1a485f2770c46db3b678586976d519e0d40e26c23b08b1dc0573e52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-unused-parameters", + "ruleIndex": 612, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'race' is unused" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_badge.cpp", + "index": 1 + }, + "region": { + "startLine": 153, + "startColumn": 44, + "charOffset": 4324, + "charLength": 4, + "snippet": { + "text": "race" + } + }, + "contextRegion": { + "startLine": 151, + "startColumn": 44, + "charOffset": 4278, + "charLength": 4, + "snippet": { + "text": "}\n\nbool PlayerBadge::tournamentPoints(uint8_t race) {\n\t// todo check if is used\n\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f5eae4a40170e2f85957c87322595601c865ace7443f8f5e2fb18f4e7d1df85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.hpp", + "index": 2 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"creatures/monsters/monsters.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e45483e1912ecf8c717a48f913562d9a9cf501f9947625dad361d43acc28406" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.hpp", + "index": 3 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a2b3a997037594f8bab93e08d9b46935593069da5e9def3fec147ea485ffc36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.hpp" + }, + "region": { + "startLine": 13, + "startColumn": 10, + "charOffset": 429, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 11, + "startColumn": 10, + "charOffset": 384, + "charLength": 30, + "snippet": { + "text": "\n#include \"creatures/npcs/npcs.hpp\"\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"items/tile.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f69d6cfec9be0f6769310fd1d031cff4d88ef48385f012190be0fe563d15e4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_cyclopedia.cpp", + "index": 1 + }, + "region": { + "startLine": 46, + "startColumn": 7, + "charOffset": 2072, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 44, + "startColumn": 7, + "charOffset": 1876, + "charLength": 1, + "snippet": { + "text": "\tstd::function callback = [playerID, page, entriesPerPage](const DBResult_ptr &result, bool) {\n\t\tstd::shared_ptr player = g_game().getPlayerByID(playerID);\n\t\tif (!player) {\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3010e0e145a8bbd008da5d509fc55ba14ddfe1aa289b9dfe8de35b71d04ed5b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_cyclopedia.cpp", + "index": 1 + }, + "region": { + "startLine": 51, + "startColumn": 7, + "charOffset": 2168, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 49, + "startColumn": 7, + "charOffset": 2098, + "charLength": 1, + "snippet": { + "text": "\n\t\tplayer->resetAsyncOngoingTask(PlayerAsyncTask_RecentDeaths);\n\t\tif (!result) {\n\t\t\tplayer->sendCyclopediaCharacterRecentDeaths(0, 0, {});\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2bcd4371a15f1f43230e9725122662c3dfc0a9ed680a38734aabc0685acffecc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_cyclopedia.cpp", + "index": 1 + }, + "region": { + "startLine": 62, + "startColumn": 3, + "charOffset": 2453, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 3, + "charOffset": 2367, + "charLength": 2, + "snippet": { + "text": "\t\tstd::vector entries;\n\t\tentries.reserve(result->countResults());\n\t\tdo {\n\t\t\tstd::string killed_by = result->getString(\"killed_by\");\n\t\t\tstd::string mostdamage_by = result->getString(\"mostdamage_by\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a285a0144b03598120d4c036b4f5fc43c2901c10081023c0c9d7483fd40ccce7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_cyclopedia.cpp", + "index": 1 + }, + "region": { + "startLine": 62, + "startColumn": 3, + "charOffset": 2453, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 3, + "charOffset": 2367, + "charLength": 2, + "snippet": { + "text": "\t\tstd::vector entries;\n\t\tentries.reserve(result->countResults());\n\t\tdo {\n\t\t\tstd::string killed_by = result->getString(\"killed_by\");\n\t\t\tstd::string mostdamage_by = result->getString(\"mostdamage_by\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f938173ae4f19b412ed467d66d5cfd7ed1161588f5bbdfca04d1038e88d3de89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_cyclopedia.cpp", + "index": 1 + }, + "region": { + "startLine": 69, + "startColumn": 11, + "charOffset": 2719, + "charLength": 6, + "snippet": { + "text": "append" + } + }, + "contextRegion": { + "startLine": 67, + "startColumn": 11, + "charOffset": 2679, + "charLength": 6, + "snippet": { + "text": "\n\t\t\tif (!killed_by.empty()) {\n\t\t\t\tcause.append(fmt::format(\" by{}\", formatWithArticle(killed_by)));\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "366f782027cdef0b7572992ac5dd4a3265e0e4cd645d4a18b5cbcf33aefd5eda" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_cyclopedia.cpp", + "index": 1 + }, + "region": { + "startLine": 73, + "startColumn": 11, + "charOffset": 2828, + "charLength": 6, + "snippet": { + "text": "append" + } + }, + "contextRegion": { + "startLine": 71, + "startColumn": 11, + "charOffset": 2784, + "charLength": 6, + "snippet": { + "text": "\n\t\t\tif (!mostdamage_by.empty()) {\n\t\t\t\tcause.append(fmt::format(\"{}{}\", !killed_by.empty() ? \" and\" : \"\", formatWithArticle(mostdamage_by)));\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96ecd92611aaca5fd897a9644922f897dd1fbb1b29eb5cd940bf5efc9183a1b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_cyclopedia.cpp", + "index": 1 + }, + "region": { + "startLine": 76, + "startColumn": 12, + "charOffset": 2942, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 12, + "charOffset": 2925, + "charLength": 12, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tentries.emplace_back(cause, result->getNumber(\"time\"));\n\t\t} while (result->next());\n\t\tplayer->sendCyclopediaCharacterRecentDeaths(page, static_cast(pages), entries);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02a53e82e53863ca566272c1fa874f68453a9d2c690e86d9de4a64072bbb8ba3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_cyclopedia.cpp", + "index": 1 + }, + "region": { + "startLine": 77, + "startColumn": 20, + "charOffset": 3019, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 75, + "startColumn": 20, + "charOffset": 2930, + "charLength": 4, + "snippet": { + "text": "\n\t\t\tentries.emplace_back(cause, result->getNumber(\"time\"));\n\t\t} while (result->next());\n\t\tplayer->sendCyclopediaCharacterRecentDeaths(page, static_cast(pages), entries);\n\t};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d30d0460f08544f7648b0b9229146de67898d55fd38131d52ee002233eb79ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_cyclopedia.cpp", + "index": 1 + }, + "region": { + "startLine": 96, + "startColumn": 7, + "charOffset": 4530, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 7, + "charOffset": 4334, + "charLength": 1, + "snippet": { + "text": "\tstd::function callback = [playerID, page, entriesPerPage](const DBResult_ptr &result, bool) {\n\t\tstd::shared_ptr player = g_game().getPlayerByID(playerID);\n\t\tif (!player) {\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65087dccf6cb47035519b1911d237ec977ab12732399e42730d3afb1e0741143" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_cyclopedia.cpp", + "index": 1 + }, + "region": { + "startLine": 101, + "startColumn": 7, + "charOffset": 4628, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 99, + "startColumn": 7, + "charOffset": 4556, + "charLength": 1, + "snippet": { + "text": "\n\t\tplayer->resetAsyncOngoingTask(PlayerAsyncTask_RecentPvPKills);\n\t\tif (!result) {\n\t\t\tplayer->sendCyclopediaCharacterRecentPvPKills(0, 0, {});\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09b36545cb3c8afa08262e9bf942ac89fcb64e2944b2423f9bda3f9abec6dd0e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_cyclopedia.cpp", + "index": 1 + }, + "region": { + "startLine": 112, + "startColumn": 3, + "charOffset": 4917, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 110, + "startColumn": 3, + "charOffset": 4829, + "charLength": 2, + "snippet": { + "text": "\t\tstd::vector entries;\n\t\tentries.reserve(result->countResults());\n\t\tdo {\n\t\t\tstd::string cause1 = result->getString(\"killed_by\");\n\t\t\tstd::string cause2 = result->getString(\"mostdamage_by\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eba25cddf33e74090fee649d0bc1a6bc2ca2652e5ee27602ef4952ffb82bbabd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_cyclopedia.cpp", + "index": 1 + }, + "region": { + "startLine": 112, + "startColumn": 3, + "charOffset": 4917, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 110, + "startColumn": 3, + "charOffset": 4829, + "charLength": 2, + "snippet": { + "text": "\t\tstd::vector entries;\n\t\tentries.reserve(result->countResults());\n\t\tdo {\n\t\t\tstd::string cause1 = result->getString(\"killed_by\");\n\t\t\tstd::string cause2 = result->getString(\"mostdamage_by\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d88b71eef431f2ee94b7fba9d8b12152e0d5cd1015fd2e9a97c9810fd89622dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_cyclopedia.cpp", + "index": 1 + }, + "region": { + "startLine": 118, + "startColumn": 4, + "charOffset": 5164, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 116, + "startColumn": 4, + "charOffset": 5087, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tuint8_t status = CYCLOPEDIA_CHARACTERINFO_RECENTKILLSTATUS_JUSTIFIED;\n\t\t\tif (player->getName() == cause1) {\n\t\t\t\tif (result->getNumber(\"unjustified\") == 1) {\n\t\t\t\t\tstatus = CYCLOPEDIA_CHARACTERINFO_RECENTKILLSTATUS_UNJUSTIFIED;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "789150b469900e2ffd6e93dcc315970f0be87eea540226defd80f254bc6a1067" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_cyclopedia.cpp", + "index": 1 + }, + "region": { + "startLine": 128, + "startColumn": 12, + "charOffset": 5540, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 126, + "startColumn": 12, + "charOffset": 5523, + "charLength": 12, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tentries.emplace_back(fmt::format(\"Killed {}.\", name), result->getNumber(\"time\"), status);\n\t\t} while (result->next());\n\t\tplayer->sendCyclopediaCharacterRecentPvPKills(page, static_cast(pages), entries);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "562af303a814c34d4bef62b3a3ec5d31d67d52e853081e244c0cebd4eb469090" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_cyclopedia.cpp", + "index": 1 + }, + "region": { + "startLine": 129, + "startColumn": 20, + "charOffset": 5651, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 127, + "startColumn": 20, + "charOffset": 5528, + "charLength": 4, + "snippet": { + "text": "\n\t\t\tentries.emplace_back(fmt::format(\"Killed {}.\", name), result->getNumber(\"time\"), status);\n\t\t} while (result->next());\n\t\tplayer->sendCyclopediaCharacterRecentPvPKills(page, static_cast(pages), entries);\n\t};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "627d8fc8c65ed3af3cd7ed7ba01ba85b9fb4698194829e65e26a67a3266fafc0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_cyclopedia.cpp", + "index": 1 + }, + "region": { + "startLine": 141, + "startColumn": 3, + "charOffset": 6141, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 139, + "startColumn": 3, + "charOffset": 6091, + "charLength": 4, + "snippet": { + "text": "\tswitch (type) {\n\t\tcase Summary_t::HOUSE_ITEMS:\n\t\tcase Summary_t::BLESSINGS:\n\t\t\tinsertValue(type, amount, id);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e9ea82e9bd30dd7fce8a111c8efb0accc22830a0776b89c46d4c767825cbde9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_cyclopedia.cpp", + "index": 1 + }, + "region": { + "startLine": 145, + "startColumn": 4, + "charOffset": 6248, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 143, + "startColumn": 4, + "charOffset": 6202, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase Summary_t::ALL_BLESSINGS:\n\t\t\tfor (auto blessIt : magic_enum::enum_values()) {\n\t\t\t\tinsertValue(static_cast(Summary_t::BLESSINGS), amount, fmt::format(\"{}\", blessIt));\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3d2f9f02daa6176d9712357f3d3ccc25060636e0f04848a07f6164413351186" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_cyclopedia.cpp", + "index": 1 + }, + "region": { + "startLine": 157, + "startColumn": 64, + "charOffset": 6703, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 64, + "charOffset": 6478, + "charLength": 1, + "snippet": { + "text": "uint16_t PlayerCyclopedia::getAmount(uint8_t type) {\n\tauto kvScope = m_player.kv()->scoped(\"summary\")->scoped(g_game().getSummaryKeyByType(type))->get(\"amount\");\n\treturn static_cast(kvScope ? kvScope->getNumber() : 0);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d46b53a884f78cb27e5afc0e1cb42970498ca659c24ced12358819d0d77c3b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_cyclopedia.cpp", + "index": 1 + }, + "region": { + "startLine": 168, + "startColumn": 2, + "charOffset": 7157, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 166, + "startColumn": 2, + "charOffset": 7010, + "charLength": 3, + "snippet": { + "text": "\tauto kvScope = m_player.kv()->scoped(\"summary\")->scoped(g_game().getSummaryKeyByType(type));\n\tstd::map result; // ID, amount\n\tfor (const auto &scope : kvScope->keys()) {\n\t\tsize_t pos = scope.find('.');\n\t\tif (pos == std::string::npos) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80ddedfeeb09b7d6fd28c40f7d5dd56f40230780041293a49c58dd337ca5622c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_cyclopedia.cpp", + "index": 1 + }, + "region": { + "startLine": 176, + "startColumn": 10, + "charOffset": 7459, + "charLength": 7, + "snippet": { + "text": "emplace" + } + }, + "contextRegion": { + "startLine": 174, + "startColumn": 10, + "charOffset": 7357, + "charLength": 7, + "snippet": { + "text": "\t\tstd::string id = scope.substr(0, pos);\n\t\tauto amount = kvScope->scoped(id)->get(\"amount\");\n\t\tresult.emplace(std::stoll(id), static_cast(amount ? amount->getNumber() : 0));\n\t}\n\treturn result;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dab4783aad1807ce1b6b43286706aaf1d30daba6977a0ded5450a5a93f290d01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_cyclopedia.cpp", + "index": 1 + }, + "region": { + "startLine": 176, + "startColumn": 87, + "charOffset": 7536, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 174, + "startColumn": 87, + "charOffset": 7357, + "charLength": 1, + "snippet": { + "text": "\t\tstd::string id = scope.substr(0, pos);\n\t\tauto amount = kvScope->scoped(id)->get(\"amount\");\n\t\tresult.emplace(std::stoll(id), static_cast(amount ? amount->getNumber() : 0));\n\t}\n\treturn result;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85a8cdeb27148d072cbd7bb5d1eaf7a065471c6332aae5f02bb627da00e8fa99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_cyclopedia.cpp", + "index": 1 + }, + "region": { + "startLine": 183, + "startColumn": 24, + "charOffset": 7709, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 181, + "startColumn": 24, + "charOffset": 7563, + "charLength": 3, + "snippet": { + "text": "void PlayerCyclopedia::insertValue(uint8_t type, uint16_t amount, const std::string &id) {\n\tauto result = getResult(type);\n\tauto it = result.find(std::stoll(id));\n\tauto oldAmount = (it != result.end() ? it->second : 0);\n\tauto newAmount = oldAmount + amount;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "419601fdc14c6318b6e7932a6997bd0f3b6de40dd5aed03e6303dfcb2ce4a42b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.hpp", + "index": 2 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"creatures/monsters/monsters.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e45483e1912ecf8c717a48f913562d9a9cf501f9947625dad361d43acc28406" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.hpp", + "index": 3 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a2b3a997037594f8bab93e08d9b46935593069da5e9def3fec147ea485ffc36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-empty-decl-or-stmt", + "ruleIndex": 331, + "kind": "fail", + "level": "warning", + "message": { + "text": "Empty declaration" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account_repository_db.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 2, + "charOffset": 1169, + "charLength": 1, + "snippet": { + "text": ";" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 2, + "charOffset": 983, + "charLength": 1, + "snippet": { + "text": "\tauto query = fmt::format(\"SELECT `id`, `type`, `premdays`, `lastday`, `creation`, `premdays_purchased`, 0 AS `expires` FROM `accounts` WHERE `id` = {}\", id);\n\treturn load(query, acc);\n};\n\nbool AccountRepositoryDB::loadByEmailOrName(bool oldProtocol, const std::string &emailOrName, AccountInfo &acc) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "249ecec423d707059525626761a972509d5f0e8a6ac54254455a1c84c703557f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto identifier' can be declared as 'const auto *identifier'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account_repository_db.cpp" + }, + "region": { + "startLine": 31, + "startColumn": 2, + "charOffset": 1287, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 29, + "startColumn": 2, + "charOffset": 1171, + "charLength": 4, + "snippet": { + "text": "\nbool AccountRepositoryDB::loadByEmailOrName(bool oldProtocol, const std::string &emailOrName, AccountInfo &acc) {\n\tauto identifier = oldProtocol ? \"name\" : \"email\";\n\tauto query = fmt::format(\"SELECT `id`, `type`, `premdays`, `lastday`, `creation`, `premdays_purchased`, 0 AS `expires` FROM `accounts` WHERE `{}` = {}\", identifier, g_database().escapeString(emailOrName));\n\treturn load(query, acc);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1190c249e1c21d823089cd1bda02c1c633f4371584e06565e74efa406397a282" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-empty-decl-or-stmt", + "ruleIndex": 331, + "kind": "fail", + "level": "warning", + "message": { + "text": "Empty declaration" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account_repository_db.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 2, + "charOffset": 1571, + "charLength": 1, + "snippet": { + "text": ";" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 2, + "charOffset": 1337, + "charLength": 1, + "snippet": { + "text": "\tauto query = fmt::format(\"SELECT `id`, `type`, `premdays`, `lastday`, `creation`, `premdays_purchased`, 0 AS `expires` FROM `accounts` WHERE `{}` = {}\", identifier, g_database().escapeString(emailOrName));\n\treturn load(query, acc);\n};\n\nbool AccountRepositoryDB::loadBySession(const std::string &sessionKey, AccountInfo &acc) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ff2ebc47c83bbf7e02eb81edf8198809c30edb4fdc13dc22921e02ef4a52951" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-empty-decl-or-stmt", + "ruleIndex": 331, + "kind": "fail", + "level": "warning", + "message": { + "text": "Empty declaration" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account_repository_db.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 2, + "charOffset": 2052, + "charLength": 1, + "snippet": { + "text": ";" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 2, + "charOffset": 2021, + "charLength": 1, + "snippet": { + "text": "\t);\n\treturn load(query, acc);\n};\n\nbool AccountRepositoryDB::save(const AccountInfo &accInfo) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a3cb6464ead1f21856d5a9b532b6843ed6096d01d905d3a11e267fe35b9b46c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-empty-decl-or-stmt", + "ruleIndex": 331, + "kind": "fail", + "level": "warning", + "message": { + "text": "Empty declaration" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account_repository_db.cpp" + }, + "region": { + "startLine": 65, + "startColumn": 2, + "charOffset": 2583, + "charLength": 1, + "snippet": { + "text": ";" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 2, + "charOffset": 2561, + "charLength": 1, + "snippet": { + "text": "\n\treturn successful;\n};\n\nbool AccountRepositoryDB::getPassword(const uint32_t &id, std::string &password) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7558fe7f817564f25a4e3be4351c0d72e0a2694b05200a7bc4add99850314593" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account_repository_db.cpp" + }, + "region": { + "startLine": 69, + "startColumn": 6, + "charOffset": 2775, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 67, + "startColumn": 6, + "charOffset": 2586, + "charLength": 1, + "snippet": { + "text": "bool AccountRepositoryDB::getPassword(const uint32_t &id, std::string &password) {\n\tauto result = g_database().storeQuery(fmt::format(\"SELECT * FROM `accounts` WHERE `id` = {}\", id));\n\tif (!result) {\n\t\tg_logger().error(\"Failed to get account:[{}] password!\", id);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2b5ea68ca5a68766fcb17eba621d74c0c0428d951d93e249e35bf85c58c3300" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-empty-decl-or-stmt", + "ruleIndex": 331, + "kind": "fail", + "level": "warning", + "message": { + "text": "Empty declaration" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account_repository_db.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 2, + "charOffset": 2928, + "charLength": 1, + "snippet": { + "text": ";" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 2, + "charOffset": 2870, + "charLength": 1, + "snippet": { + "text": "\tpassword = result->getString(\"password\");\n\treturn true;\n};\n\nbool AccountRepositoryDB::getCoins(const uint32_t &id, const uint8_t &type, uint32_t &coins) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1da6c5065776a83158a2d1231664a6dfe613c7c082d1de47563767c9f8aaf114" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account_repository_db.cpp" + }, + "region": { + "startLine": 90, + "startColumn": 6, + "charOffset": 3326, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 88, + "startColumn": 6, + "charOffset": 3315, + "charLength": 1, + "snippet": { + "text": "\t));\n\n\tif (!result) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efce13c4812d0d7ad83e31026815757fea6d0f0e3732b2f10f018a08fc851480" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-empty-decl-or-stmt", + "ruleIndex": 331, + "kind": "fail", + "level": "warning", + "message": { + "text": "Empty declaration" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account_repository_db.cpp" + }, + "region": { + "startLine": 97, + "startColumn": 2, + "charOffset": 3438, + "charLength": 1, + "snippet": { + "text": ";" + } + }, + "contextRegion": { + "startLine": 95, + "startColumn": 2, + "charOffset": 3422, + "charLength": 1, + "snippet": { + "text": "\n\treturn true;\n};\n\nbool AccountRepositoryDB::setCoins(const uint32_t &id, const uint8_t &type, const uint32_t &amount) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6add583760fdd57175a5fc7e1c4897b171e2025510acfb665adca35cacdfd9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-empty-decl-or-stmt", + "ruleIndex": 331, + "kind": "fail", + "level": "warning", + "message": { + "text": "Empty declaration" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account_repository_db.cpp" + }, + "region": { + "startLine": 117, + "startColumn": 2, + "charOffset": 3978, + "charLength": 1, + "snippet": { + "text": ";" + } + }, + "contextRegion": { + "startLine": 115, + "startColumn": 2, + "charOffset": 3956, + "charLength": 1, + "snippet": { + "text": "\n\treturn successful;\n};\n\nbool AccountRepositoryDB::registerCoinsTransaction(" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93df74fc89d4d032fe69916bd779f72c47fdea1db1c363c0411cab9e06050195" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-empty-decl-or-stmt", + "ruleIndex": 331, + "kind": "fail", + "level": "warning", + "message": { + "text": "Empty declaration" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account_repository_db.cpp" + }, + "region": { + "startLine": 149, + "startColumn": 2, + "charOffset": 4693, + "charLength": 1, + "snippet": { + "text": ";" + } + }, + "contextRegion": { + "startLine": 147, + "startColumn": 2, + "charOffset": 4671, + "charLength": 1, + "snippet": { + "text": "\n\treturn successful;\n};\n\nbool AccountRepositoryDB::loadAccountPlayers(AccountInfo &acc) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca042dcab1cceaa982d45060edd23e279402e05d280ead7f4b466a812c629db4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'loadAccountPlayers' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account_repository_db.cpp" + }, + "region": { + "startLine": 151, + "startColumn": 27, + "charOffset": 4722, + "charLength": 18, + "snippet": { + "text": "loadAccountPlayers" + } + }, + "contextRegion": { + "startLine": 149, + "startColumn": 27, + "charOffset": 4692, + "charLength": 18, + "snippet": { + "text": "};\n\nbool AccountRepositoryDB::loadAccountPlayers(AccountInfo &acc) {\n\tauto result = g_database().storeQuery(\n\t\tfmt::format(\"SELECT `name`, `deletion` FROM `players` WHERE `account_id` = {} ORDER BY `name` ASC\", acc.id)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22e0a8248641df4621252f85d05021ac223bdb0852ef0de95f9971e0ea3f4199" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account_repository_db.cpp" + }, + "region": { + "startLine": 156, + "startColumn": 6, + "charOffset": 4921, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 154, + "startColumn": 6, + "charOffset": 4911, + "charLength": 1, + "snippet": { + "text": "\t);\n\n\tif (!result) {\n\t\tg_logger().error(\"Failed to load account[{}] players!\", acc.id);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40332c23df6b000f2c13ed254ae9f909e8b793f52abee34e2a89bca0fe853808" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account_repository_db.cpp" + }, + "region": { + "startLine": 161, + "startColumn": 2, + "charOffset": 5020, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 159, + "startColumn": 2, + "charOffset": 5015, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tdo {\n\t\tif (result->getNumber(\"deletion\") != 0) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9309cecca4316dd31acda4f4edd40418d1ac4f1c273d788841152526e9088e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account_repository_db.cpp" + }, + "region": { + "startLine": 161, + "startColumn": 2, + "charOffset": 5020, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 159, + "startColumn": 2, + "charOffset": 5015, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tdo {\n\t\tif (result->getNumber(\"deletion\") != 0) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa47a4beb4892f484e6f1c3a6b1b538e9aa36d89d53e7afa1421f1998a5f6938" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account_repository_db.cpp" + }, + "region": { + "startLine": 166, + "startColumn": 15, + "charOffset": 5111, + "charLength": 11, + "snippet": { + "text": "try_emplace" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 15, + "charOffset": 5092, + "charLength": 11, + "snippet": { + "text": "\t\t}\n\n\t\tacc.players.try_emplace({ result->getString(\"name\"), result->getNumber(\"deletion\") });\n\t} while (result->next());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "820db43140b4af2ddf225af633d375dd83b4119d7e295059a2d1d1d94cca3674" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (do loop) is ID-dependent due to variable reference to 'result' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account_repository_db.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 11, + "charOffset": 5206, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 11, + "charOffset": 5096, + "charLength": 6, + "snippet": { + "text": "\n\t\tacc.players.try_emplace({ result->getString(\"name\"), result->getNumber(\"deletion\") });\n\t} while (result->next());\n\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33b9a9d7fe063e9f6bccf6cadfd04b3642f6b01fa9eb964176695d694eb5c543" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account_repository_db.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 19, + "charOffset": 5214, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 19, + "charOffset": 5096, + "charLength": 4, + "snippet": { + "text": "\n\t\tacc.players.try_emplace({ result->getString(\"name\"), result->getNumber(\"deletion\") });\n\t} while (result->next());\n\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1eb2f0a4c918261645bbdf6de096349ace6ddaf1d225ad998db45e4c009acfbd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account_repository_db.cpp" + }, + "region": { + "startLine": 180, + "startColumn": 20, + "charOffset": 5476, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 178, + "startColumn": 20, + "charOffset": 5411, + "charLength": 6, + "snippet": { + "text": "\n\tacc.id = result->getNumber(\"id\");\n\tacc.accountType = result->getNumber(\"type\");\n\tacc.premiumLastDay = result->getNumber(\"lastday\");\n\tacc.sessionExpires = result->getNumber(\"expires\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d282d93426aefd99bbf6f855036f96868464f53f94f976cf3e0ed2f2179ece52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account_repository_db.cpp" + }, + "region": { + "startLine": 185, + "startColumn": 29, + "charOffset": 5801, + "charLength": 3, + "snippet": { + "text": "acc" + } + }, + "contextRegion": { + "startLine": 183, + "startColumn": 29, + "charOffset": 5633, + "charLength": 3, + "snippet": { + "text": "\tacc.premiumDaysPurchased = result->getNumber(\"premdays_purchased\");\n\tacc.creationTime = result->getNumber(\"creation\");\n\tacc.premiumRemainingDays = acc.premiumLastDay > getTimeNow() ? (acc.premiumLastDay - getTimeNow()) / 86400 : 0;\n\n\tsetupLoyaltyInfo(acc);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b2a5cb7759aa95feb5b1d89b4a7fd477a0da618ccd8dc5f454e8b91073b8243" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "86400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account_repository_db.cpp" + }, + "region": { + "startLine": 185, + "startColumn": 103, + "charOffset": 5875, + "charLength": 5, + "snippet": { + "text": "86400" + } + }, + "contextRegion": { + "startLine": 183, + "startColumn": 103, + "charOffset": 5633, + "charLength": 5, + "snippet": { + "text": "\tacc.premiumDaysPurchased = result->getNumber(\"premdays_purchased\");\n\tacc.creationTime = result->getNumber(\"creation\");\n\tacc.premiumRemainingDays = acc.premiumLastDay > getTimeNow() ? (acc.premiumLastDay - getTimeNow()) / 86400 : 0;\n\n\tsetupLoyaltyInfo(acc);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "778f7f8e1fa4095e75390e3cf8c06560e760e155f4ffde2b3fad2e15729cd60b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-std-min-max", + "ruleIndex": 736, + "kind": "fail", + "level": "warning", + "message": { + "text": "use `std::max` instead of `<`" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account_repository_db.cpp" + }, + "region": { + "startLine": 197, + "startColumn": 2, + "charOffset": 6112, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 195, + "startColumn": 2, + "charOffset": 6107, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (acc.premiumDaysPurchased < acc.premiumRemainingDays) {\n\t\tacc.premiumDaysPurchased = acc.premiumRemainingDays;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a88c29e1a9f3470fcb07cf91976312a53c8a525d356b92447d7ac37e4435649" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account_repository_db.cpp" + }, + "region": { + "startLine": 202, + "startColumn": 22, + "charOffset": 6281, + "charLength": 10, + "snippet": { + "text": "getTimeNow" + } + }, + "contextRegion": { + "startLine": 200, + "startColumn": 22, + "charOffset": 6229, + "charLength": 10, + "snippet": { + "text": "\n\tif (acc.creationTime == 0) {\n\t\tacc.creationTime = getTimeNow();\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83813fae53982fad7d47739f4758c22588b33e2873bbf7d5aef89fde0c777af2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account_repository_db.cpp" + }, + "region": { + "startLine": 205, + "startColumn": 2, + "charOffset": 6300, + "charLength": 4, + "snippet": { + "text": "save" + } + }, + "contextRegion": { + "startLine": 203, + "startColumn": 2, + "charOffset": 6295, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tsave(acc);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "645a16c5a025d5b8c3bf92bee6cb6f4106dbbb0fda636436d134323ff9adda69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'AccountRepositoryDB::loadBySession' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/account/account_repository_db.hpp", + "index": 1 + }, + "region": { + "startLine": 20, + "startColumn": 7, + "charOffset": 693, + "charLength": 13, + "snippet": { + "text": "loadBySession" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 7, + "charOffset": 522, + "charLength": 13, + "snippet": { + "text": "\tbool loadByID(const uint32_t &id, AccountInfo &acc) override;\n\tbool loadByEmailOrName(bool oldProtocol, const std::string &emailOrName, AccountInfo &acc) override;\n\tbool loadBySession(const std::string &esseionKey, AccountInfo &acc) override;\n\tbool save(const AccountInfo &accInfo) override;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe5ae78e8708bf2b4ca076807d52f2caac40b56001bc3b0d0d711c236db16e71" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.hpp" + }, + "region": { + "startLine": 13, + "startColumn": 10, + "charOffset": 429, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 11, + "startColumn": 10, + "charOffset": 384, + "charLength": 30, + "snippet": { + "text": "\n#include \"creatures/npcs/npcs.hpp\"\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"items/tile.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f69d6cfec9be0f6769310fd1d031cff4d88ef48385f012190be0fe563d15e4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'manage' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 36, + "startColumn": 39, + "charOffset": 918, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 39, + "charOffset": 877, + "charLength": 7, + "snippet": { + "text": "}\n\nbool PlayerTitle::manage(bool canAdd, uint8_t id, uint32_t timestamp /* = 0*/) {\n\tconst Title &title = g_game().getTitleById(id);\n\tif (title.m_id == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3aae2285c81b6f86435f77f3798c4fe168e0eb48d3bbe8c83d43626d5a1c60a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 53, + "startColumn": 24, + "charOffset": 1211, + "charLength": 9, + "snippet": { + "text": "timestamp" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 24, + "charOffset": 1184, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\n\tgetUnlockedKV()->set(title.m_maleName, toSaveTimeStamp);\n\tm_titlesUnlocked.emplace_back(title, toSaveTimeStamp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8edbdc91db7c00a64858d912d40d7897ea518c06e6ad9a7858fd791ad6d947dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int64_t' (aka 'long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 53, + "startColumn": 41, + "charOffset": 1228, + "charLength": 9, + "snippet": { + "text": "timestamp" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 41, + "charOffset": 1184, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\n\tgetUnlockedKV()->set(title.m_maleName, toSaveTimeStamp);\n\tm_titlesUnlocked.emplace_back(title, toSaveTimeStamp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f32031000c9754d817075a9cb8a57870c43fd6ecfc9f52150c0be6daec32e57e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int64_t' (aka 'long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 53, + "startColumn": 53, + "charOffset": 1240, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 53, + "charOffset": 1184, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\n\tgetUnlockedKV()->set(title.m_maleName, toSaveTimeStamp);\n\tm_titlesUnlocked.emplace_back(title, toSaveTimeStamp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "971a1c799b6bb257e1f59fb553aad7764a64a1eaa1cdf669ff5c476ca93889b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 53, + "startColumn": 69, + "charOffset": 1256, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 69, + "charOffset": 1184, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\n\tgetUnlockedKV()->set(title.m_maleName, toSaveTimeStamp);\n\tm_titlesUnlocked.emplace_back(title, toSaveTimeStamp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a672c536f4c6c9e660c2e0a37dea3fc844dad8168a5dc14cb00d6b8e24946b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 55, + "startColumn": 19, + "charOffset": 1339, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 19, + "charOffset": 1188, + "charLength": 12, + "snippet": { + "text": "\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\n\tgetUnlockedKV()->set(title.m_maleName, toSaveTimeStamp);\n\tm_titlesUnlocked.emplace_back(title, toSaveTimeStamp);\n\tm_titlesUnlocked.shrink_to_fit();\n\tg_logger().debug(\"[{}] - Added title: {}\", __FUNCTION__, title.m_maleName);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f235ce0cf24b6bdf55035114bdb6e29fc232cbcf807390fdc542230b016fec2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 77, + "startColumn": 19, + "charOffset": 1871, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 75, + "startColumn": 19, + "charOffset": 1808, + "charLength": 5, + "snippet": { + "text": "\n\tgetUnlockedKV()->remove(title.m_maleName);\n\tm_titlesUnlocked.erase(it);\n\tm_titlesUnlocked.shrink_to_fit();\n\tg_logger().debug(\"[{}] - Removed title: {}\", __FUNCTION__, title.m_maleName);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d368d2ebab5c09fb1a5678db150d0e3d90a3dc8ed89394dc7fb3e417c27f3b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 88, + "startColumn": 9, + "charOffset": 2234, + "charLength": 5, + "snippet": { + "text": "title" + } + }, + "contextRegion": { + "startLine": 86, + "startColumn": 9, + "charOffset": 2110, + "charLength": 5, + "snippet": { + "text": "uint8_t PlayerTitle::getCurrentTitle() const {\n\tauto title = m_player.kv()->scoped(\"titles\")->get(\"current-title\");\n\treturn title ? static_cast(title->getNumber()) : 0;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "103cc58d8df4591f648438a1b8ea0f15f3850276ec88c0ee48eac16113127492" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 115, + "startColumn": 2, + "charOffset": 3006, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 113, + "startColumn": 2, + "charOffset": 2932, + "charLength": 3, + "snippet": { + "text": "void PlayerTitle::checkAndUpdateNewTitles() {\n\tBenchmark bm_checkTitles;\n\tfor (const auto &title : g_game().getTitles()) {\n\t\tswitch (title.m_type) {\n\t\t\tcase CyclopediaTitle_t::NOTHING:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1a3eabf8b6d4ebd6b0590a98580286f9d303b1121cb26583960a83007bef734" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 120, + "startColumn": 5, + "charOffset": 3165, + "charLength": 6, + "snippet": { + "text": "manage" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 5, + "charOffset": 3117, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\tcase CyclopediaTitle_t::GOLD:\n\t\t\t\tmanage(checkGold(title.m_amount), title.m_id);\n\t\t\t\tbreak;\n\t\t\tcase CyclopediaTitle_t::MOUNTS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc68e57f693a61e6ca724e77eead549bf66a28fdc945e7ed0c66999dd5b89173" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 123, + "startColumn": 5, + "charOffset": 3262, + "charLength": 6, + "snippet": { + "text": "manage" + } + }, + "contextRegion": { + "startLine": 121, + "startColumn": 5, + "charOffset": 3212, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\tcase CyclopediaTitle_t::MOUNTS:\n\t\t\t\tmanage(checkMount(title.m_amount), title.m_id);\n\t\t\t\tbreak;\n\t\t\tcase CyclopediaTitle_t::OUTFITS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "076aa61361830bd6853ebe25cac53c66007f4d846e06bace89d7e1e2f019c0d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 126, + "startColumn": 5, + "charOffset": 3361, + "charLength": 6, + "snippet": { + "text": "manage" + } + }, + "contextRegion": { + "startLine": 124, + "startColumn": 5, + "charOffset": 3310, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\tcase CyclopediaTitle_t::OUTFITS:\n\t\t\t\tmanage(checkOutfit(title.m_amount), title.m_id);\n\t\t\t\tbreak;\n\t\t\tcase CyclopediaTitle_t::LEVEL:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f80d7cd234083422b08aa0ba95557a5476085aed1f0491f852d716fc402d6bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 129, + "startColumn": 5, + "charOffset": 3459, + "charLength": 6, + "snippet": { + "text": "manage" + } + }, + "contextRegion": { + "startLine": 127, + "startColumn": 5, + "charOffset": 3410, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\tcase CyclopediaTitle_t::LEVEL:\n\t\t\t\tmanage(checkLevel(title.m_amount), title.m_id);\n\t\t\t\tbreak;\n\t\t\tcase CyclopediaTitle_t::HIGHSCORES:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4407d9747a5008db49e6933eb3bd3537d5642c93a6127b26d7b635cbe2316ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 132, + "startColumn": 5, + "charOffset": 3561, + "charLength": 6, + "snippet": { + "text": "manage" + } + }, + "contextRegion": { + "startLine": 130, + "startColumn": 5, + "charOffset": 3507, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\tcase CyclopediaTitle_t::HIGHSCORES:\n\t\t\t\tmanage(checkHighscore(title.m_skill), title.m_id);\n\t\t\t\tbreak;\n\t\t\tcase CyclopediaTitle_t::BESTIARY:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "029f63bb3725a102042e791e03b072f5831017336ededa2658fa20639d1d050d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 135, + "startColumn": 4, + "charOffset": 3663, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 133, + "startColumn": 4, + "charOffset": 3612, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\tcase CyclopediaTitle_t::BESTIARY:\n\t\t\tcase CyclopediaTitle_t::BOSSTIARY:\n\t\t\t\tmanage(checkBestiary(title.m_maleName, title.m_race, title.m_type == CyclopediaTitle_t::BOSSTIARY, title.m_amount), title.m_id);\n\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a73a35adb303b78ff303e928f733d341a5b25a52bb2895c209faa08deb0980d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 136, + "startColumn": 5, + "charOffset": 3702, + "charLength": 6, + "snippet": { + "text": "manage" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 5, + "charOffset": 3623, + "charLength": 6, + "snippet": { + "text": "\t\t\tcase CyclopediaTitle_t::BESTIARY:\n\t\t\tcase CyclopediaTitle_t::BOSSTIARY:\n\t\t\t\tmanage(checkBestiary(title.m_maleName, title.m_race, title.m_type == CyclopediaTitle_t::BOSSTIARY, title.m_amount), title.m_id);\n\t\t\t\tbreak;\n\t\t\tcase CyclopediaTitle_t::DAILY_REWARD:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46ed07ad8573eb075c96990060795b18ee50b160f3f277fcff3f109dee664311" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 139, + "startColumn": 5, + "charOffset": 3887, + "charLength": 6, + "snippet": { + "text": "manage" + } + }, + "contextRegion": { + "startLine": 137, + "startColumn": 5, + "charOffset": 3831, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\tcase CyclopediaTitle_t::DAILY_REWARD:\n\t\t\t\tmanage(checkLoginStreak(title.m_amount), title.m_id);\n\t\t\t\tbreak;\n\t\t\tcase CyclopediaTitle_t::TASK:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "036db70f67a0c41d021cf0c9b68dc945aec3bc22dd7d253cbf34f7d0735e5ce1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 142, + "startColumn": 5, + "charOffset": 3989, + "charLength": 6, + "snippet": { + "text": "manage" + } + }, + "contextRegion": { + "startLine": 140, + "startColumn": 5, + "charOffset": 3941, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\tcase CyclopediaTitle_t::TASK:\n\t\t\t\tmanage(checkTask(title.m_amount), title.m_id);\n\t\t\t\tbreak;\n\t\t\tcase CyclopediaTitle_t::MAP:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59b1d3aa41cf8f21fe2a694a1681356b624a3dc856abe71df715dfb6900262b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 148, + "startColumn": 5, + "charOffset": 4182, + "charLength": 6, + "snippet": { + "text": "manage" + } + }, + "contextRegion": { + "startLine": 146, + "startColumn": 5, + "charOffset": 4132, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\tcase CyclopediaTitle_t::OTHERS:\n\t\t\t\tmanage(checkOther(title.m_maleName), title.m_id);\n\t\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8db088156fe5164c45399e4e694672ced55c0b767083af0bb4a8a572bad12ea0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 161, + "startColumn": 2, + "charOffset": 4602, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 159, + "startColumn": 2, + "charOffset": 4452, + "charLength": 3, + "snippet": { + "text": "\tconst auto &unlockedTitles = getUnlockedKV()->keys();\n\tg_logger().debug(\"[{}] - Loading unlocked titles: {}\", __FUNCTION__, unlockedTitles.size());\n\tfor (const auto &titleName : unlockedTitles) {\n\t\tconst Title &title = g_game().getTitleByName(titleName);\n\t\tif (title.m_id == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d786f72523e9c461d5df5b0f6bbe73872832ff58dce0a20648af2816b2701fe9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 168, + "startColumn": 20, + "charOffset": 4846, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 166, + "startColumn": 20, + "charOffset": 4822, + "charLength": 12, + "snippet": { + "text": "\t\t}\n\n\t\tm_titlesUnlocked.emplace_back(title, getUnlockedKV()->get(titleName)->getNumber());\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4704169663676c1f12f194b1515b747615ca43aff9a1c628ce88ba529ea49791" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 187, + "startColumn": 2, + "charOffset": 5316, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 185, + "startColumn": 2, + "charOffset": 5247, + "charLength": 3, + "snippet": { + "text": "bool PlayerTitle::checkMount(uint32_t amount) {\n\tuint8_t total = 0;\n\tfor (const auto &mount : g_game().mounts.getMounts()) {\n\t\tif (m_player.hasMount(mount)) {\n\t\t\ttotal++;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "364d9a9f668a9e3e5af86755f2ad11c7edc84874c64400f7828ead90f7137b8d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 209, + "startColumn": 3, + "charOffset": 5838, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 207, + "startColumn": 3, + "charOffset": 5781, + "charLength": 4, + "snippet": { + "text": "\n\tswitch (static_cast(skill)) {\n\t\tcase HighscoreCategories_t::CHARMS:\n\t\t\tquery = fmt::format(\n\t\t\t\t\"SELECT `pc`.`player_guid`, `pc`.`charm_points`, `p`.`group_id` FROM `player_charms` pc JOIN `players` p ON `pc`.`player_guid` = `p`.`id` WHERE `p`.`group_id` < {} ORDER BY `pc`.`charm_points` DESC LIMIT 1\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de1e1634d9d1013a43f643257ed1d93d1b631d28e43b66e8cfd7644f865d52e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "switch has 2 consecutive identical branches" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 216, + "startColumn": 3, + "charOffset": 6203, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 214, + "startColumn": 3, + "charOffset": 6160, + "charLength": 4, + "snippet": { + "text": "\t\t\tfieldCheck = \"player_guid\";\n\t\t\tbreak;\n\t\tcase HighscoreCategories_t::DROME:\n\t\t\t// todo check if player is in the top 5 for the previous rota of the Tibiadrome.\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4af12166e3d708f2b3c3426c9de163576ac60a088ace36f7a8302815eb65bd8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 216, + "startColumn": 3, + "charOffset": 6203, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 214, + "startColumn": 3, + "charOffset": 6160, + "charLength": 4, + "snippet": { + "text": "\t\t\tfieldCheck = \"player_guid\";\n\t\t\tbreak;\n\t\tcase HighscoreCategories_t::DROME:\n\t\t\t// todo check if player is in the top 5 for the previous rota of the Tibiadrome.\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f547afd36a650a5e8dcdf2dee6d1d05fdffa54e45d3cea1dace5a1aac7a5bf4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 219, + "startColumn": 3, + "charOffset": 6341, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 217, + "startColumn": 3, + "charOffset": 6238, + "charLength": 4, + "snippet": { + "text": "\t\t\t// todo check if player is in the top 5 for the previous rota of the Tibiadrome.\n\t\t\treturn false;\n\t\tcase HighscoreCategories_t::GOSHNAR:\n\t\t\t// todo check if player is the most killer of Goshnar and his aspects.\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97255adb5545c2cd798d8ffefc72b3695a44f7a3b35b76fd41dfb8fc22b3b109" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 222, + "startColumn": 3, + "charOffset": 6471, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 220, + "startColumn": 3, + "charOffset": 6378, + "charLength": 7, + "snippet": { + "text": "\t\t\t// todo check if player is the most killer of Goshnar and his aspects.\n\t\t\treturn false;\n\t\tdefault:\n\t\t\tstd::string skillName = g_game().getSkillNameById(skill);\n\t\t\tquery = fmt::format(" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "409cc44bf227ee7b7b2e55a3b26254358d623f2bd6936f956c33626e861ade5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 223, + "startColumn": 28, + "charOffset": 6507, + "charLength": 6, + "snippet": { + "text": "g_game" + } + }, + "contextRegion": { + "startLine": 221, + "startColumn": 28, + "charOffset": 6452, + "charLength": 6, + "snippet": { + "text": "\t\t\treturn false;\n\t\tdefault:\n\t\t\tstd::string skillName = g_game().getSkillNameById(skill);\n\t\t\tquery = fmt::format(\n\t\t\t\t\"SELECT * FROM `players` WHERE `group_id` < {} AND `{}` > 10 ORDER BY `{}` DESC LIMIT 1\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b8b1063613f962be2a809e3c022bceb6132b19049a14a7ca0d3d79a2d3d25b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 232, + "startColumn": 6, + "charOffset": 6795, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 230, + "startColumn": 6, + "charOffset": 6744, + "charLength": 1, + "snippet": { + "text": "\n\tDBResult_ptr result = db.storeQuery(query);\n\tif (!result) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c39019edde50915814abd6fb890a161896a3ab51fd06995695155766f30a9c6e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 244, + "startColumn": 3, + "charOffset": 7152, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 3, + "charOffset": 7015, + "charLength": 2, + "snippet": { + "text": "bool PlayerTitle::checkBestiary(const std::string &name, uint16_t race, bool isBoss /* = false*/, uint32_t amount) {\n\tif (race == 0) {\n\t\tif (name == \"Executioner\") {\n\t\t\t// todo check if player has unlocked all bestiary\n\t\t} else if (name == \"Boss Executioner\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09be62de4968bea8b5fb85ccabfe3835c7074836699ef22e37def836686820df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 244, + "startColumn": 30, + "charOffset": 7179, + "charLength": 1, + "snippet": { + "text": "{" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 30, + "charOffset": 7015, + "charLength": 1, + "snippet": { + "text": "bool PlayerTitle::checkBestiary(const std::string &name, uint16_t race, bool isBoss /* = false*/, uint32_t amount) {\n\tif (race == 0) {\n\t\tif (name == \"Executioner\") {\n\t\t\t// todo check if player has unlocked all bestiary\n\t\t} else if (name == \"Boss Executioner\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a815985ca10fa73ea3b8fc124aca4ae548c479b485a59bc2bec60bb63a170d44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'checkMap' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 267, + "startColumn": 19, + "charOffset": 7946, + "charLength": 8, + "snippet": { + "text": "checkMap" + } + }, + "contextRegion": { + "startLine": 265, + "startColumn": 19, + "charOffset": 7925, + "charLength": 8, + "snippet": { + "text": "}\n\nbool PlayerTitle::checkMap(uint32_t amount) {\n\t// todo cyclopledia\n\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c496ed86a6fa6d6dacd41903146e687e299185c4d2dd2e1752ec1698b7d5701b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-unused-parameters", + "ruleIndex": 612, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'amount' is unused" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 267, + "startColumn": 37, + "charOffset": 7964, + "charLength": 6, + "snippet": { + "text": "amount" + } + }, + "contextRegion": { + "startLine": 265, + "startColumn": 37, + "charOffset": 7925, + "charLength": 6, + "snippet": { + "text": "}\n\nbool PlayerTitle::checkMap(uint32_t amount) {\n\t// todo cyclopledia\n\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67273dd687d2a8e7eb6fadd00e0d4a566897909706f9d7eba7a7bfd33df6a4ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 273, + "startColumn": 2, + "charOffset": 8070, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 271, + "startColumn": 2, + "charOffset": 8012, + "charLength": 2, + "snippet": { + "text": "\nbool PlayerTitle::checkOther(const std::string &name) {\n\tif (name == \"Guild Leader\") {\n\t\tauto rank = m_player.getGuildRank();\n\t\treturn rank && rank->level == 3;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b7815a05b840a7fe776868d4a8a520e5806bbc1889e62529247b1620aec6c76" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 276, + "startColumn": 4, + "charOffset": 8177, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 274, + "startColumn": 4, + "charOffset": 8100, + "charLength": 4, + "snippet": { + "text": "\t\tauto rank = m_player.getGuildRank();\n\t\treturn rank && rank->level == 3;\n\t} else if (name == \"Proconsul of Iksupan\") {\n\t\t// Win Ancient Aucar Outfits complete so fight with Atab and be teleported to the arena.\n\t} else if (name == \"Admirer of the Crown\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85fa632c0628bfc1940e8474b488907edecbc84e97159ad34c303655ffb03c3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 276, + "startColumn": 45, + "charOffset": 8218, + "charLength": 1, + "snippet": { + "text": "{" + } + }, + "contextRegion": { + "startLine": 274, + "startColumn": 45, + "charOffset": 8100, + "charLength": 1, + "snippet": { + "text": "\t\tauto rank = m_player.getGuildRank();\n\t\treturn rank && rank->level == 3;\n\t} else if (name == \"Proconsul of Iksupan\") {\n\t\t// Win Ancient Aucar Outfits complete so fight with Atab and be teleported to the arena.\n\t} else if (name == \"Admirer of the Crown\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a3aee1a4757096f3750cd88c476a4377874e6b633b114e99cee92ac85d6521b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1457 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 280, + "startColumn": 27, + "charOffset": 8424, + "charLength": 4, + "snippet": { + "text": "1457" + } + }, + "contextRegion": { + "startLine": 278, + "startColumn": 27, + "charOffset": 8311, + "charLength": 4, + "snippet": { + "text": "\t} else if (name == \"Admirer of the Crown\") {\n\t\t// Complete the Royal Costume Outfits.\n\t\treturn m_player.canWear(1457, 3) && m_player.canWear(1456, 3);\n\t} else if (name == \"Big Spender\") {\n\t\t// Unlocked the full Golden Outfit." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a532f75bbbc61e8bf3795635847bdb034c85a67ad5565ba5c85b909dbcf5dd1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1456 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 280, + "startColumn": 56, + "charOffset": 8453, + "charLength": 4, + "snippet": { + "text": "1456" + } + }, + "contextRegion": { + "startLine": 278, + "startColumn": 56, + "charOffset": 8311, + "charLength": 4, + "snippet": { + "text": "\t} else if (name == \"Admirer of the Crown\") {\n\t\t// Complete the Royal Costume Outfits.\n\t\treturn m_player.canWear(1457, 3) && m_player.canWear(1456, 3);\n\t} else if (name == \"Big Spender\") {\n\t\t// Unlocked the full Golden Outfit." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d2e203a3e2e64ebb74a04c9bfb0c6ce85c3aad59d9d4af9ffe0820d96055f0a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1211 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 283, + "startColumn": 27, + "charOffset": 8564, + "charLength": 4, + "snippet": { + "text": "1211" + } + }, + "contextRegion": { + "startLine": 281, + "startColumn": 27, + "charOffset": 8463, + "charLength": 4, + "snippet": { + "text": "\t} else if (name == \"Big Spender\") {\n\t\t// Unlocked the full Golden Outfit.\n\t\treturn m_player.canWear(1211, 3) && m_player.canWear(1210, 3);\n\t} else if (name == \"Challenger of the Iks\") {\n\t\t// Defeat Ahau while equipping a Broken Iks Headpiece, a Broken Iks Cuirass, some Broken Iks Faulds and Broken Iks Sandals" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f13e01a8ce6b9f8a9b1c6f3380a718311126a315fd3003ac14658cf6560d134" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1210 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 283, + "startColumn": 56, + "charOffset": 8593, + "charLength": 4, + "snippet": { + "text": "1210" + } + }, + "contextRegion": { + "startLine": 281, + "startColumn": 56, + "charOffset": 8463, + "charLength": 4, + "snippet": { + "text": "\t} else if (name == \"Big Spender\") {\n\t\t// Unlocked the full Golden Outfit.\n\t\treturn m_player.canWear(1211, 3) && m_player.canWear(1210, 3);\n\t} else if (name == \"Challenger of the Iks\") {\n\t\t// Defeat Ahau while equipping a Broken Iks Headpiece, a Broken Iks Cuirass, some Broken Iks Faulds and Broken Iks Sandals" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa95aea0657831fbe65f14c486032e596ad48a19b1c9e425b0fa38e3d7ed392e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2346 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 286, + "startColumn": 40, + "charOffset": 8814, + "charLength": 4, + "snippet": { + "text": "2346" + } + }, + "contextRegion": { + "startLine": 284, + "startColumn": 40, + "charOffset": 8603, + "charLength": 4, + "snippet": { + "text": "\t} else if (name == \"Challenger of the Iks\") {\n\t\t// Defeat Ahau while equipping a Broken Iks Headpiece, a Broken Iks Cuirass, some Broken Iks Faulds and Broken Iks Sandals\n\t\treturn m_player.getBestiaryKillCount(2346) >= 1;\n\t} else if (name == \"Royal Bounacean Advisor\") {\n\t\t// Complete the Galthen and the Lost Queen quest line" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "754f68b81bfa7fe0de4786c1317ab899fdb0cc410feacb25b7b400b78fe0a21d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1437 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 290, + "startColumn": 27, + "charOffset": 8989, + "charLength": 4, + "snippet": { + "text": "1437" + } + }, + "contextRegion": { + "startLine": 288, + "startColumn": 27, + "charOffset": 8875, + "charLength": 4, + "snippet": { + "text": "\t\t// Complete the Galthen and the Lost Queen quest line\n\t\t// Win Royal Bounacean Outfit\n\t\treturn m_player.canWear(1437, 3) && m_player.canWear(1436, 3);\n\t} else if (name == \"Aeternal\") {\n\t\t// Unlocked by 10-year-old characters." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c48586af0a1b35e66158b693c4b6de987c92914d0cacb64d1ef02ab90422ad35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1436 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 290, + "startColumn": 56, + "charOffset": 9018, + "charLength": 4, + "snippet": { + "text": "1436" + } + }, + "contextRegion": { + "startLine": 288, + "startColumn": 56, + "charOffset": 8875, + "charLength": 4, + "snippet": { + "text": "\t\t// Complete the Galthen and the Lost Queen quest line\n\t\t// Win Royal Bounacean Outfit\n\t\treturn m_player.canWear(1437, 3) && m_player.canWear(1436, 3);\n\t} else if (name == \"Aeternal\") {\n\t\t// Unlocked by 10-year-old characters." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2352970d20e48e60618749392290c083652c7f216aa6e601adb58e2c53ee107" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 301, + "startColumn": 39, + "charOffset": 9459, + "charLength": 4, + "snippet": { + "text": "2000" + } + }, + "contextRegion": { + "startLine": 299, + "startColumn": 39, + "charOffset": 9357, + "charLength": 4, + "snippet": { + "text": "\t} else if (name == \"Beastly\") {\n\t\t// Reached 2000 charm points\n\t\treturn m_player.getCharmPoints() >= 2000;\n\t} else if (name == \"Midnight Hunter\") {\n\t\t// Kill a certain amount of Midnight Panthers." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b2041842d39bd19b67b6ba59333e1f980c8df597261df2ae0bceaaa52f7482f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "698 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 305, + "startColumn": 40, + "charOffset": 9685, + "charLength": 3, + "snippet": { + "text": "698" + } + }, + "contextRegion": { + "startLine": 303, + "startColumn": 40, + "charOffset": 9506, + "charLength": 3, + "snippet": { + "text": "\t\t// Kill a certain amount of Midnight Panthers.\n\t\t// (The exact number is yet to be confirmed but is at least 21 and at most 28 panthers.)\n\t\treturn m_player.getBestiaryKillCount(698) >= 25;\n\t} else if (name == \"Ratinator\") {\n\t\t// Kill 10,000 Cave Rats." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3e15fca9a5093706d6c8345232e8f9492fe561711a2df42429649a1b211d9ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 305, + "startColumn": 48, + "charOffset": 9693, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 303, + "startColumn": 48, + "charOffset": 9506, + "charLength": 2, + "snippet": { + "text": "\t\t// Kill a certain amount of Midnight Panthers.\n\t\t// (The exact number is yet to be confirmed but is at least 21 and at most 28 panthers.)\n\t\treturn m_player.getBestiaryKillCount(698) >= 25;\n\t} else if (name == \"Ratinator\") {\n\t\t// Kill 10,000 Cave Rats." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90664191ed073f6a6abdc2b85bd14ccf908a93d4fc52b1d6b3726d7d5e986328" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "56 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 308, + "startColumn": 40, + "charOffset": 9799, + "charLength": 2, + "snippet": { + "text": "56" + } + }, + "contextRegion": { + "startLine": 306, + "startColumn": 40, + "charOffset": 9697, + "charLength": 2, + "snippet": { + "text": "\t} else if (name == \"Ratinator\") {\n\t\t// Kill 10,000 Cave Rats.\n\t\treturn m_player.getBestiaryKillCount(56) >= 10000;\n\t} else if (name == \"Doomsday Nemesis\") {\n\t\t// Kill Gaz'haragoth one time." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9371213540484c4226345f7f6f5af67e3e117be66b7ab8b7091bed11a536f9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 308, + "startColumn": 47, + "charOffset": 9806, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 306, + "startColumn": 47, + "charOffset": 9697, + "charLength": 5, + "snippet": { + "text": "\t} else if (name == \"Ratinator\") {\n\t\t// Kill 10,000 Cave Rats.\n\t\treturn m_player.getBestiaryKillCount(56) >= 10000;\n\t} else if (name == \"Doomsday Nemesis\") {\n\t\t// Kill Gaz'haragoth one time." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f2eb29a82fb3eeefcd9f10739517083f80af5e900d9105a61e8e6109681c1cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1003 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 311, + "startColumn": 40, + "charOffset": 9927, + "charLength": 4, + "snippet": { + "text": "1003" + } + }, + "contextRegion": { + "startLine": 309, + "startColumn": 40, + "charOffset": 9813, + "charLength": 4, + "snippet": { + "text": "\t} else if (name == \"Doomsday Nemesis\") {\n\t\t// Kill Gaz'haragoth one time.\n\t\treturn m_player.getBestiaryKillCount(1003) >= 1;\n\t} else if (name == \"Hero of Bounac\") {\n\t\t// Complete The Order of the Lion Quest." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d11c6aa50c5ae43919ab882d9c22c74843da22a5b38ba6ecbbbb85e299eb7fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2118 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 316, + "startColumn": 40, + "charOffset": 10132, + "charLength": 4, + "snippet": { + "text": "2118" + } + }, + "contextRegion": { + "startLine": 314, + "startColumn": 40, + "charOffset": 10022, + "charLength": 4, + "snippet": { + "text": "\t} else if (name == \"King of Demon\") {\n\t\t// Defeat Morshabaal 5 times.\n\t\treturn m_player.getBestiaryKillCount(2118) >= 5;\n\t} else if (name == \"Planegazer\") {\n\t\t// Kill Planestrider in Opticording Sphere Quest." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3d26328689b999c00ddb67f6106a2c6d8354ef13604f9f717ba858b43ca454d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 316, + "startColumn": 49, + "charOffset": 10141, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 314, + "startColumn": 49, + "charOffset": 10022, + "charLength": 1, + "snippet": { + "text": "\t} else if (name == \"King of Demon\") {\n\t\t// Defeat Morshabaal 5 times.\n\t\treturn m_player.getBestiaryKillCount(2118) >= 5;\n\t} else if (name == \"Planegazer\") {\n\t\t// Kill Planestrider in Opticording Sphere Quest." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0aeedb3d9e6719497bf660de214c1e3598321c2b8d7dd7e3ad608bd02d502204" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "15000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/cyclopedia/player_title.cpp", + "index": 1 + }, + "region": { + "startLine": 322, + "startColumn": 38, + "charOffset": 10384, + "charLength": 5, + "snippet": { + "text": "15000" + } + }, + "contextRegion": { + "startLine": 320, + "startColumn": 38, + "charOffset": 10272, + "charLength": 5, + "snippet": { + "text": "\t\t// Complete 25 Years of Tibia Quest.\n\t} else if (name == \"Truly Boss\") {\n\t\treturn m_player.getBossPoints() >= 15000;\n\t}\n\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ca9cba6bd6fcd1f9161dc7ddea56a07bfa5b7226168513d411d9c76c8a105c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.hpp", + "index": 2 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"creatures/monsters/monsters.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e45483e1912ecf8c717a48f913562d9a9cf501f9947625dad361d43acc28406" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.hpp", + "index": 3 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a2b3a997037594f8bab93e08d9b46935593069da5e9def3fec147ea485ffc36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 22, + "startColumn": 1, + "charOffset": 614, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 577, + "charLength": 5, + "snippet": { + "text": "#include \"config/configmanager.hpp\"\n\nconst static std::vector wheelGemBasicSlot1Allowed = {\n\tWheelGemBasicModifier_t::General_FireResistance,\n\tWheelGemBasicModifier_t::General_IceResistance," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8695fc4442983e0df03b82300f5a53192e52bf17f0f155da9151767cdb90e576" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'wheelGemBasicSlot1Allowed' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 22, + "startColumn": 51, + "charOffset": 664, + "charLength": 25, + "snippet": { + "text": "wheelGemBasicSlot1Allowed" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 51, + "charOffset": 577, + "charLength": 25, + "snippet": { + "text": "#include \"config/configmanager.hpp\"\n\nconst static std::vector wheelGemBasicSlot1Allowed = {\n\tWheelGemBasicModifier_t::General_FireResistance,\n\tWheelGemBasicModifier_t::General_IceResistance," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a60b187e228428a6cc2c1feb0cf143af9f7f6ec2226dd46355c7079e97c3b240" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 1, + "charOffset": 1789, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 1, + "charOffset": 1785, + "charLength": 5, + "snippet": { + "text": "};\n\nconst static std::vector wheelGemBasicSlot2Allowed = {\n\tWheelGemBasicModifier_t::General_FireResistance,\n\tWheelGemBasicModifier_t::General_IceResistance," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "454862688606d597fe493278b5dc91860a0ba6589cee05b25b1de437f4f7ebef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'wheelGemBasicSlot2Allowed' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 51, + "charOffset": 1839, + "charLength": 25, + "snippet": { + "text": "wheelGemBasicSlot2Allowed" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 51, + "charOffset": 1785, + "charLength": 25, + "snippet": { + "text": "};\n\nconst static std::vector wheelGemBasicSlot2Allowed = {\n\tWheelGemBasicModifier_t::General_FireResistance,\n\tWheelGemBasicModifier_t::General_IceResistance," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e5e5130c27f6ab97a837e70700273b5452d93b569715805fe80cb170c5082bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 82, + "startColumn": 50, + "charOffset": 3923, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 50, + "charOffset": 3831, + "charLength": 1, + "snippet": { + "text": "namespace {\n\ttemplate \n\tbool checkSpellArea(const std::array &spellsTable, const std::string &spellName, uint8_t stage) {\n\t\tfor (const auto &spellTable : spellsTable) {\n\t\t\tauto size = std::ssize(spellTable.grade);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb37ecb62755af79aa27dbfa2c6d1fe15c1892edce8047c216fb6ab4374fe09e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 83, + "startColumn": 3, + "charOffset": 3989, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 81, + "startColumn": 3, + "charOffset": 3843, + "charLength": 3, + "snippet": { + "text": "\ttemplate \n\tbool checkSpellArea(const std::array &spellsTable, const std::string &spellName, uint8_t stage) {\n\t\tfor (const auto &spellTable : spellsTable) {\n\t\t\tauto size = std::ssize(spellTable.grade);\n\t\t\tg_logger().debug(\"spell area stage {}, grade {}\", stage, size);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f9fcddb89f87621092380d3a215b4d5f32d3acfeefe8ff7bb31c61378f07e41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 29, + "charOffset": 4251, + "charLength": 10, + "snippet": { + "text": "spellTable" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 29, + "charOffset": 4079, + "charLength": 10, + "snippet": { + "text": "\t\t\tg_logger().debug(\"spell area stage {}, grade {}\", stage, size);\n\t\t\tif (spellTable.name == spellName && stage < static_cast(size)) {\n\t\t\t\tconst auto &spellData = spellTable.grade[stage];\n\t\t\t\tif (spellData.increase.area) {\n\t\t\t\t\tg_logger().debug(\"[{}] spell with name {}, and stage {} has increase area\", __FUNCTION__, spellName, stage);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09491f745a69168a04bf8f1bd9b7c5290d582bba5b90ab4c4f4c56c368b9aec9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 100, + "startColumn": 61, + "charOffset": 4571, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 98, + "startColumn": 61, + "charOffset": 4479, + "charLength": 1, + "snippet": { + "text": "\n\ttemplate \n\tint checkSpellAdditionalTarget(const std::array &spellsTable, const std::string_view &spellName, uint8_t stage) {\n\t\tfor (const auto &spellTable : spellsTable) {\n\t\t\tauto size = std::ssize(spellTable.grade);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f36e3845302744900c5623428f58b25cf5d832e975639a34ba9b11e8cc502d97" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 101, + "startColumn": 3, + "charOffset": 4642, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 99, + "startColumn": 3, + "charOffset": 4480, + "charLength": 3, + "snippet": { + "text": "\ttemplate \n\tint checkSpellAdditionalTarget(const std::array &spellsTable, const std::string_view &spellName, uint8_t stage) {\n\t\tfor (const auto &spellTable : spellsTable) {\n\t\t\tauto size = std::ssize(spellTable.grade);\n\t\t\tg_logger().debug(\"spell target stage {}, grade {}\", stage, size);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a2e95de6b6539e1498964c5394e3573656450dfa9852d63c495138aa213af83" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 105, + "startColumn": 29, + "charOffset": 4906, + "charLength": 10, + "snippet": { + "text": "spellTable" + } + }, + "contextRegion": { + "startLine": 103, + "startColumn": 29, + "charOffset": 4732, + "charLength": 10, + "snippet": { + "text": "\t\t\tg_logger().debug(\"spell target stage {}, grade {}\", stage, size);\n\t\t\tif (spellTable.name == spellName && stage < static_cast(size)) {\n\t\t\t\tconst auto &spellData = spellTable.grade[stage];\n\t\t\t\tif (spellData.increase.aditionalTarget) {\n\t\t\t\t\treturn spellData.increase.aditionalTarget;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73d731234ea103489779c18d9e9d125bc31e26976d943de26149157eae503526" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 106, + "startColumn": 9, + "charOffset": 4939, + "charLength": 9, + "snippet": { + "text": "spellData" + } + }, + "contextRegion": { + "startLine": 104, + "startColumn": 9, + "charOffset": 4801, + "charLength": 9, + "snippet": { + "text": "\t\t\tif (spellTable.name == spellName && stage < static_cast(size)) {\n\t\t\t\tconst auto &spellData = spellTable.grade[stage];\n\t\t\t\tif (spellData.increase.aditionalTarget) {\n\t\t\t\t\treturn spellData.increase.aditionalTarget;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87d1460ee7e328d653c5c00db2ca39c0a90011915895e46284100982eb896e56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 116, + "startColumn": 63, + "charOffset": 5150, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 114, + "startColumn": 63, + "charOffset": 5056, + "charLength": 1, + "snippet": { + "text": "\n\ttemplate \n\tint checkSpellAdditionalDuration(const std::array &spellsTable, const std::string_view &spellName, uint8_t stage) {\n\t\tfor (const auto &spellTable : spellsTable) {\n\t\t\tauto size = std::ssize(spellTable.grade);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "020387b78f3367b9616d07859b30a6e0fe845686968eb7beccfaa54674410dd3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 117, + "startColumn": 3, + "charOffset": 5221, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 115, + "startColumn": 3, + "charOffset": 5057, + "charLength": 3, + "snippet": { + "text": "\ttemplate \n\tint checkSpellAdditionalDuration(const std::array &spellsTable, const std::string_view &spellName, uint8_t stage) {\n\t\tfor (const auto &spellTable : spellsTable) {\n\t\t\tauto size = std::ssize(spellTable.grade);\n\t\t\tg_logger().debug(\"spell duration stage {}, grade {}\", stage, size);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa217510938258574175a5f0fe64397d18f86d4084cb08b9af208827383950b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 121, + "startColumn": 29, + "charOffset": 5487, + "charLength": 10, + "snippet": { + "text": "spellTable" + } + }, + "contextRegion": { + "startLine": 119, + "startColumn": 29, + "charOffset": 5311, + "charLength": 10, + "snippet": { + "text": "\t\t\tg_logger().debug(\"spell duration stage {}, grade {}\", stage, size);\n\t\t\tif (spellTable.name == spellName && stage < static_cast(size)) {\n\t\t\t\tconst auto &spellData = spellTable.grade[stage];\n\t\t\t\tif (spellData.increase.duration > 0) {\n\t\t\t\t\treturn spellData.increase.duration;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0eb98b9f008644509801009980a711caa842583ad0f0c09df979024aaacd89d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-struct-pack-align", + "ruleIndex": 22, + "kind": "fail", + "level": "warning", + "message": { + "text": "accessing fields in struct 'PromotionScroll' is inefficient due to padding; only needs 35 bytes but is using 48 bytes" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 131, + "startColumn": 9, + "charOffset": 5636, + "charLength": 15, + "snippet": { + "text": "PromotionScroll" + } + }, + "contextRegion": { + "startLine": 129, + "startColumn": 9, + "charOffset": 5624, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tstruct PromotionScroll {\n\t\tuint16_t itemId;\n\t\tstd::string name;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "300273334857dcd4ee08d932657d4e384864ff12e1a70cfab70658504a09faa1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-struct-pack-align", + "ruleIndex": 22, + "kind": "fail", + "level": "warning", + "message": { + "text": "accessing fields in struct 'PromotionScroll' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 64 bytes" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 131, + "startColumn": 9, + "charOffset": 5636, + "charLength": 15, + "snippet": { + "text": "PromotionScroll" + } + }, + "contextRegion": { + "startLine": 129, + "startColumn": 9, + "charOffset": 5624, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tstruct PromotionScroll {\n\t\tuint16_t itemId;\n\t\tstd::string name;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b19e5f3c70a34c03fb272ca0a18b89dd4e3e33b6dd32313b6b7940979f4fbf99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-11-0-1", + "ruleIndex": 399, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 11-0-1: Member data in non-POD class types shall be private" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 132, + "startColumn": 12, + "charOffset": 5665, + "charLength": 6, + "snippet": { + "text": "itemId" + } + }, + "contextRegion": { + "startLine": 130, + "startColumn": 12, + "charOffset": 5627, + "charLength": 6, + "snippet": { + "text": "\n\tstruct PromotionScroll {\n\t\tuint16_t itemId;\n\t\tstd::string name;\n\t\tuint8_t extraPoints;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8fd93c1ce0ed169db35d4fca7fc8fb5aae4fbe3fa9f880ec329eb5c480ce699a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-11-0-1", + "ruleIndex": 399, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 11-0-1: Member data in non-POD class types shall be private" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 133, + "startColumn": 15, + "charOffset": 5687, + "charLength": 4, + "snippet": { + "text": "name" + } + }, + "contextRegion": { + "startLine": 131, + "startColumn": 15, + "charOffset": 5628, + "charLength": 4, + "snippet": { + "text": "\tstruct PromotionScroll {\n\t\tuint16_t itemId;\n\t\tstd::string name;\n\t\tuint8_t extraPoints;\n\t};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c518f649704fbb9a2dbac6145b2827a8d27dfc0caaa5d5e98254297f90bbf75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-11-0-1", + "ruleIndex": 399, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 11-0-1: Member data in non-POD class types shall be private" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 11, + "charOffset": 5703, + "charLength": 11, + "snippet": { + "text": "extraPoints" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 11, + "charOffset": 5654, + "charLength": 11, + "snippet": { + "text": "\t\tuint16_t itemId;\n\t\tstd::string name;\n\t\tuint8_t extraPoints;\n\t};\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a97917f3645d58e2a37b056aef8183b5e3e5b0e48f603d4adacb43d27106f20c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 137, + "startColumn": 2, + "charOffset": 5722, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 135, + "startColumn": 2, + "charOffset": 5716, + "charLength": 3, + "snippet": { + "text": "\t};\n\n\tstd::vector WheelOfDestinyPromotionScrolls = {\n\t\t{ 43946, \"abridged\", 3 },\n\t\t{ 43947, \"basic\", 5 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81bdf09f2319ff25c0011177653995eee3c329a62f555e3557f0545e423f92e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'WheelOfDestinyPromotionScrolls' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 137, + "startColumn": 31, + "charOffset": 5751, + "charLength": 30, + "snippet": { + "text": "WheelOfDestinyPromotionScrolls" + } + }, + "contextRegion": { + "startLine": 135, + "startColumn": 31, + "charOffset": 5716, + "charLength": 30, + "snippet": { + "text": "\t};\n\n\tstd::vector WheelOfDestinyPromotionScrolls = {\n\t\t{ 43946, \"abridged\", 3 },\n\t\t{ 43947, \"basic\", 5 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5367242e6f640a0081d6c57378f65bfe82dfca5ed08c5e3652dd91d3fc462907" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-non-const-global-variables", + "ruleIndex": 486, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'WheelOfDestinyPromotionScrolls' is non-const and globally accessible, consider making it const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 137, + "startColumn": 31, + "charOffset": 5751, + "charLength": 30, + "snippet": { + "text": "WheelOfDestinyPromotionScrolls" + } + }, + "contextRegion": { + "startLine": 135, + "startColumn": 31, + "charOffset": 5716, + "charLength": 30, + "snippet": { + "text": "\t};\n\n\tstd::vector WheelOfDestinyPromotionScrolls = {\n\t\t{ 43946, \"abridged\", 3 },\n\t\t{ 43947, \"basic\", 5 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d9139cef3f6d94f8fe3bf9b68a6e7d12da6d0236502345b4bef7426fa708801" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "43946 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 138, + "startColumn": 5, + "charOffset": 5790, + "charLength": 5, + "snippet": { + "text": "43946" + } + }, + "contextRegion": { + "startLine": 136, + "startColumn": 5, + "charOffset": 5720, + "charLength": 5, + "snippet": { + "text": "\n\tstd::vector WheelOfDestinyPromotionScrolls = {\n\t\t{ 43946, \"abridged\", 3 },\n\t\t{ 43947, \"basic\", 5 },\n\t\t{ 43948, \"revised\", 9 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8868f07a497676c23746d0fb87544f03b87603672e48321a2e79527baf4c2225" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "43947 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 139, + "startColumn": 5, + "charOffset": 5818, + "charLength": 5, + "snippet": { + "text": "43947" + } + }, + "contextRegion": { + "startLine": 137, + "startColumn": 5, + "charOffset": 5721, + "charLength": 5, + "snippet": { + "text": "\tstd::vector WheelOfDestinyPromotionScrolls = {\n\t\t{ 43946, \"abridged\", 3 },\n\t\t{ 43947, \"basic\", 5 },\n\t\t{ 43948, \"revised\", 9 },\n\t\t{ 43949, \"extended\", 13 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84300f2995cddbad81610daeabea7359e122ee14a20d14de407569f0b518500a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 139, + "startColumn": 21, + "charOffset": 5834, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 137, + "startColumn": 21, + "charOffset": 5721, + "charLength": 1, + "snippet": { + "text": "\tstd::vector WheelOfDestinyPromotionScrolls = {\n\t\t{ 43946, \"abridged\", 3 },\n\t\t{ 43947, \"basic\", 5 },\n\t\t{ 43948, \"revised\", 9 },\n\t\t{ 43949, \"extended\", 13 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97c0977122938feb33b986da80fc343d242b4ce3b169e6f5efddd86aa80a3547" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "43948 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 140, + "startColumn": 5, + "charOffset": 5843, + "charLength": 5, + "snippet": { + "text": "43948" + } + }, + "contextRegion": { + "startLine": 138, + "startColumn": 5, + "charOffset": 5786, + "charLength": 5, + "snippet": { + "text": "\t\t{ 43946, \"abridged\", 3 },\n\t\t{ 43947, \"basic\", 5 },\n\t\t{ 43948, \"revised\", 9 },\n\t\t{ 43949, \"extended\", 13 },\n\t\t{ 43950, \"advanced\", 20 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43c81e2bf0e4df818ac28ea3cd5cb4901d14e98b9b8ac3e847c012e72224ab8b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 140, + "startColumn": 23, + "charOffset": 5861, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 138, + "startColumn": 23, + "charOffset": 5786, + "charLength": 1, + "snippet": { + "text": "\t\t{ 43946, \"abridged\", 3 },\n\t\t{ 43947, \"basic\", 5 },\n\t\t{ 43948, \"revised\", 9 },\n\t\t{ 43949, \"extended\", 13 },\n\t\t{ 43950, \"advanced\", 20 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59f42fda55021d02eec31a8e64018618563a84f2223f1a39ae82fd64ba42da1a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "43949 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 141, + "startColumn": 5, + "charOffset": 5870, + "charLength": 5, + "snippet": { + "text": "43949" + } + }, + "contextRegion": { + "startLine": 139, + "startColumn": 5, + "charOffset": 5814, + "charLength": 5, + "snippet": { + "text": "\t\t{ 43947, \"basic\", 5 },\n\t\t{ 43948, \"revised\", 9 },\n\t\t{ 43949, \"extended\", 13 },\n\t\t{ 43950, \"advanced\", 20 },\n\t};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68703f1f3e1864c38139b67c9e4b0547f2ade06807ae9fc49d0c7f899747f395" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "13 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 141, + "startColumn": 24, + "charOffset": 5889, + "charLength": 2, + "snippet": { + "text": "13" + } + }, + "contextRegion": { + "startLine": 139, + "startColumn": 24, + "charOffset": 5814, + "charLength": 2, + "snippet": { + "text": "\t\t{ 43947, \"basic\", 5 },\n\t\t{ 43948, \"revised\", 9 },\n\t\t{ 43949, \"extended\", 13 },\n\t\t{ 43950, \"advanced\", 20 },\n\t};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0049a4462ff40dfd84f5c0b73f0200f3732fdbf944ed54f4fd97dcf53f50d6f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "43950 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 142, + "startColumn": 5, + "charOffset": 5899, + "charLength": 5, + "snippet": { + "text": "43950" + } + }, + "contextRegion": { + "startLine": 140, + "startColumn": 5, + "charOffset": 5839, + "charLength": 5, + "snippet": { + "text": "\t\t{ 43948, \"revised\", 9 },\n\t\t{ 43949, \"extended\", 13 },\n\t\t{ 43950, \"advanced\", 20 },\n\t};\n} // namespace" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afc481b37bed10b6cdcd930a07bc6fb361be5a91ee223d2146b4748a0fc62988" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 142, + "startColumn": 24, + "charOffset": 5918, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 140, + "startColumn": 24, + "charOffset": 5839, + "charLength": 2, + "snippet": { + "text": "\t\t{ 43948, \"revised\", 9 },\n\t\t{ 43949, \"extended\", 13 },\n\t\t{ 43950, \"advanced\", 20 },\n\t};\n} // namespace" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30916c6ccbd5a96945c0634fa98635c43e747588921380b27467020fe1f4209c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 148, + "startColumn": 24, + "charOffset": 6038, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 146, + "startColumn": 24, + "charOffset": 5944, + "charLength": 1, + "snippet": { + "text": "PlayerWheel::PlayerWheel(Player &initPlayer) :\n\tm_player(initPlayer) {\n\tauto pointsPerLevel = (uint16_t)g_configManager().getNumber(WHEEL_POINTS_PER_LEVEL, __FUNCTION__);\n\tm_pointsPerLevel = pointsPerLevel > 0 ? pointsPerLevel : 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f6f21dddde82661fdf58ae054d2e5b6bda94e630459f2fd018c2d405a3d9448" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 149, + "startColumn": 21, + "charOffset": 6135, + "charLength": 14, + "snippet": { + "text": "pointsPerLevel" + } + }, + "contextRegion": { + "startLine": 147, + "startColumn": 21, + "charOffset": 5991, + "charLength": 14, + "snippet": { + "text": "\tm_player(initPlayer) {\n\tauto pointsPerLevel = (uint16_t)g_configManager().getNumber(WHEEL_POINTS_PER_LEVEL, __FUNCTION__);\n\tm_pointsPerLevel = pointsPerLevel > 0 ? pointsPerLevel : 1;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc23255eabadbaa6daa6a52d8ae1cdf655aa7d75fd933a89974e7b1cdf54714b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'canPlayerSelectPointOnSlot' has cognitive complexity of 348 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 152, + "startColumn": 19, + "charOffset": 6197, + "charLength": 26, + "snippet": { + "text": "canPlayerSelectPointOnSlot" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 19, + "charOffset": 6176, + "charLength": 26, + "snippet": { + "text": "}\n\nbool PlayerWheel::canPlayerSelectPointOnSlot(WheelSlots_t slot, bool recursive) const {\n\tauto playerPoints = getWheelPoints();\n\t// Green quadrant" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52d61654bf72b700aa80b4ac237fea2fd2ceed25188a0d70f744dffaee97a7d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 155, + "startColumn": 2, + "charOffset": 6326, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 153, + "startColumn": 2, + "charOffset": 6267, + "charLength": 2, + "snippet": { + "text": "\tauto playerPoints = getWheelPoints();\n\t// Green quadrant\n\tif (slot == WheelSlots_t::SLOT_GREEN_200) {\n\t\tif (playerPoints < 375u) {\n\t\t\tg_logger().debug(\"Player {} trying to manipulate byte on green slot 200 {}\", m_player.getName(), fmt::underlying(slot));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2fe4b8d2c416ebb2112dff2615b46df3d4a437e291d9e0f542e386a989e291e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 156, + "startColumn": 22, + "charOffset": 6391, + "charLength": 4, + "snippet": { + "text": "375u" + } + }, + "contextRegion": { + "startLine": 154, + "startColumn": 22, + "charOffset": 6306, + "charLength": 4, + "snippet": { + "text": "\t// Green quadrant\n\tif (slot == WheelSlots_t::SLOT_GREEN_200) {\n\t\tif (playerPoints < 375u) {\n\t\t\tg_logger().debug(\"Player {} trying to manipulate byte on green slot 200 {}\", m_player.getName(), fmt::underlying(slot));\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5061f4eb41571201047df07590337d592b71f4a47ed40b9f984974fc4e063b28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "integer literal has suffix 'u', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 156, + "startColumn": 22, + "charOffset": 6391, + "charLength": 4, + "snippet": { + "text": "375u" + } + }, + "contextRegion": { + "startLine": 154, + "startColumn": 22, + "charOffset": 6306, + "charLength": 4, + "snippet": { + "text": "\t// Green quadrant\n\tif (slot == WheelSlots_t::SLOT_GREEN_200) {\n\t\tif (playerPoints < 375u) {\n\t\t\tg_logger().debug(\"Player {} trying to manipulate byte on green slot 200 {}\", m_player.getName(), fmt::underlying(slot));\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1a70904d54dce67d15a5438c5fbe48dab78fc8670672ec387b1e62e3284a36e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "375u is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 156, + "startColumn": 22, + "charOffset": 6391, + "charLength": 4, + "snippet": { + "text": "375u" + } + }, + "contextRegion": { + "startLine": 154, + "startColumn": 22, + "charOffset": 6306, + "charLength": 4, + "snippet": { + "text": "\t// Green quadrant\n\tif (slot == WheelSlots_t::SLOT_GREEN_200) {\n\t\tif (playerPoints < 375u) {\n\t\t\tg_logger().debug(\"Player {} trying to manipulate byte on green slot 200 {}\", m_player.getName(), fmt::underlying(slot));\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9643c9292f47c5e103f30e3db065f85d402e63eac1ac590a81cc62f3da30d25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 22, + "charOffset": 6804, + "charLength": 4, + "snippet": { + "text": "225u" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 22, + "charOffset": 6723, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_GREEN_TOP_150) {\n\t\tif (playerPoints < 225u) {\n\t\t\tg_logger().debug(\"Player {} trying to manipulate byte to SLOT_GREEN_TOP_150: {}\", m_player.getName(), fmt::underlying(slot));\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54b7ff37528c2601402a757a9a0a9d9fa8935e19bfedcc915f038a88ddd557b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "integer literal has suffix 'u', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 22, + "charOffset": 6804, + "charLength": 4, + "snippet": { + "text": "225u" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 22, + "charOffset": 6723, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_GREEN_TOP_150) {\n\t\tif (playerPoints < 225u) {\n\t\t\tg_logger().debug(\"Player {} trying to manipulate byte to SLOT_GREEN_TOP_150: {}\", m_player.getName(), fmt::underlying(slot));\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aef5280f62d81434e12d230ddf25f3ff840c109d7a29f5ce4dc7727d5f3892b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "225u is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 22, + "charOffset": 6804, + "charLength": 4, + "snippet": { + "text": "225u" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 22, + "charOffset": 6723, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_GREEN_TOP_150) {\n\t\tif (playerPoints < 225u) {\n\t\t\tg_logger().debug(\"Player {} trying to manipulate byte to SLOT_GREEN_TOP_150: {}\", m_player.getName(), fmt::underlying(slot));\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3ec73ad755099cb41abbe1c1734520a9ae35a44df15ba3da5447dd0890cf9b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 181, + "startColumn": 22, + "charOffset": 7318, + "charLength": 4, + "snippet": { + "text": "225u" + } + }, + "contextRegion": { + "startLine": 179, + "startColumn": 22, + "charOffset": 7234, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_GREEN_BOTTOM_150) {\n\t\tif (playerPoints < 225u) {\n\t\t\tg_logger().debug(\"Player {} trying to manipulate byte to SLOT_GREEN_BOTTOM_150: {}\", m_player.getName(), fmt::underlying(slot));\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1345342f8c8a1218a40a05e2c362a6adb2ce68cdd8577acf7e6d37205e968405" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "integer literal has suffix 'u', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 181, + "startColumn": 22, + "charOffset": 7318, + "charLength": 4, + "snippet": { + "text": "225u" + } + }, + "contextRegion": { + "startLine": 179, + "startColumn": 22, + "charOffset": 7234, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_GREEN_BOTTOM_150) {\n\t\tif (playerPoints < 225u) {\n\t\t\tg_logger().debug(\"Player {} trying to manipulate byte to SLOT_GREEN_BOTTOM_150: {}\", m_player.getName(), fmt::underlying(slot));\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d16719826d6eef1f655ea018fcb5e45caa76dc02eb13f527d89e2bfad94155cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "225u is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 181, + "startColumn": 22, + "charOffset": 7318, + "charLength": 4, + "snippet": { + "text": "225u" + } + }, + "contextRegion": { + "startLine": 179, + "startColumn": 22, + "charOffset": 7234, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_GREEN_BOTTOM_150) {\n\t\tif (playerPoints < 225u) {\n\t\t\tg_logger().debug(\"Player {} trying to manipulate byte to SLOT_GREEN_BOTTOM_150: {}\", m_player.getName(), fmt::underlying(slot));\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83615c60b5f30c10840a539fe186a229bd68a126b68de747d911119ed950d41c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 195, + "startColumn": 22, + "charOffset": 7832, + "charLength": 4, + "snippet": { + "text": "125u" + } + }, + "contextRegion": { + "startLine": 193, + "startColumn": 22, + "charOffset": 7751, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_GREEN_TOP_100) {\n\t\tif (playerPoints < 125u) {\n\t\t\tg_logger().debug(\"Player {} trying to manipulate byte to SLOT_GREEN_TOP_100: {}\", m_player.getName(), fmt::underlying(slot));\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a890aa06d2938cf894f8e0470a5df5fec388be05a09a734ba442fcebd09841af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "integer literal has suffix 'u', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 195, + "startColumn": 22, + "charOffset": 7832, + "charLength": 4, + "snippet": { + "text": "125u" + } + }, + "contextRegion": { + "startLine": 193, + "startColumn": 22, + "charOffset": 7751, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_GREEN_TOP_100) {\n\t\tif (playerPoints < 125u) {\n\t\t\tg_logger().debug(\"Player {} trying to manipulate byte to SLOT_GREEN_TOP_100: {}\", m_player.getName(), fmt::underlying(slot));\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7fde19a6117f65e86a3a5d35e5f6fc6c7c898d86cb711af6a42046ee2d32d42a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "125u is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 195, + "startColumn": 22, + "charOffset": 7832, + "charLength": 4, + "snippet": { + "text": "125u" + } + }, + "contextRegion": { + "startLine": 193, + "startColumn": 22, + "charOffset": 7751, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_GREEN_TOP_100) {\n\t\tif (playerPoints < 125u) {\n\t\t\tg_logger().debug(\"Player {} trying to manipulate byte to SLOT_GREEN_TOP_100: {}\", m_player.getName(), fmt::underlying(slot));\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "459a55994023f82dd170d0e30fc969d5587d6f111e68ba67bca85811c93a63e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 212, + "startColumn": 22, + "charOffset": 8433, + "charLength": 4, + "snippet": { + "text": "125u" + } + }, + "contextRegion": { + "startLine": 210, + "startColumn": 22, + "charOffset": 8349, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_GREEN_MIDDLE_100) {\n\t\tif (playerPoints < 125u) {\n\t\t\tg_logger().debug(\"Player {} trying to manipulate byte to SLOT_GREEN_MIDDLE_100: {}\", m_player.getName(), fmt::underlying(slot));\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04f804a964b348a8d22ae444acce8131a5b2d56b85e6978ba7c1f441f562fde4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "integer literal has suffix 'u', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 212, + "startColumn": 22, + "charOffset": 8433, + "charLength": 4, + "snippet": { + "text": "125u" + } + }, + "contextRegion": { + "startLine": 210, + "startColumn": 22, + "charOffset": 8349, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_GREEN_MIDDLE_100) {\n\t\tif (playerPoints < 125u) {\n\t\t\tg_logger().debug(\"Player {} trying to manipulate byte to SLOT_GREEN_MIDDLE_100: {}\", m_player.getName(), fmt::underlying(slot));\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7811b0a59cab86aff0e9420801df1987220b19508565181b7bd45c8bd27f6ae8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "125u is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 212, + "startColumn": 22, + "charOffset": 8433, + "charLength": 4, + "snippet": { + "text": "125u" + } + }, + "contextRegion": { + "startLine": 210, + "startColumn": 22, + "charOffset": 8349, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_GREEN_MIDDLE_100) {\n\t\tif (playerPoints < 125u) {\n\t\t\tg_logger().debug(\"Player {} trying to manipulate byte to SLOT_GREEN_MIDDLE_100: {}\", m_player.getName(), fmt::underlying(slot));\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd362c69008781381dddfc41681e68aae65f7cc1c0c78624fa2a4cf3c9c6a6b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 229, + "startColumn": 22, + "charOffset": 9038, + "charLength": 4, + "snippet": { + "text": "125u" + } + }, + "contextRegion": { + "startLine": 227, + "startColumn": 22, + "charOffset": 8954, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_GREEN_BOTTOM_100) {\n\t\tif (playerPoints < 125u) {\n\t\t\tg_logger().debug(\"Player {} trying to manipulate byte to SLOT_GREEN_BOTTOM_100: {}\", m_player.getName(), fmt::underlying(slot));\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b860d66739826d39522f7871bbb397f95f9c6d4e4045ebea09e3e146c6b8978" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "integer literal has suffix 'u', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 229, + "startColumn": 22, + "charOffset": 9038, + "charLength": 4, + "snippet": { + "text": "125u" + } + }, + "contextRegion": { + "startLine": 227, + "startColumn": 22, + "charOffset": 8954, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_GREEN_BOTTOM_100) {\n\t\tif (playerPoints < 125u) {\n\t\t\tg_logger().debug(\"Player {} trying to manipulate byte to SLOT_GREEN_BOTTOM_100: {}\", m_player.getName(), fmt::underlying(slot));\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5a3a570b633d2798f302fdeb4d7776e5183ee887388a7c7d24ade955b20ff79" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "125u is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 229, + "startColumn": 22, + "charOffset": 9038, + "charLength": 4, + "snippet": { + "text": "125u" + } + }, + "contextRegion": { + "startLine": 227, + "startColumn": 22, + "charOffset": 8954, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_GREEN_BOTTOM_100) {\n\t\tif (playerPoints < 125u) {\n\t\t\tg_logger().debug(\"Player {} trying to manipulate byte to SLOT_GREEN_BOTTOM_100: {}\", m_player.getName(), fmt::underlying(slot));\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb4d93c8a73cac14816b72b844a85155e08be47acc07cc85b9abeb1413edb8ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 246, + "startColumn": 22, + "charOffset": 9642, + "charLength": 3, + "snippet": { + "text": "50u" + } + }, + "contextRegion": { + "startLine": 244, + "startColumn": 22, + "charOffset": 9562, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_GREEN_TOP_75) {\n\t\tif (playerPoints < 50u) {\n\t\t\tg_logger().debug(\"Player {} trying to manipulate byte to SLOT_GREEN_TOP_75: {}\", m_player.getName(), fmt::underlying(slot));\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "feda03208f1fcb377a8a2ac8a5b8e0aceabf60e4562456f52a3258618f670f45" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "integer literal has suffix 'u', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 246, + "startColumn": 22, + "charOffset": 9642, + "charLength": 3, + "snippet": { + "text": "50u" + } + }, + "contextRegion": { + "startLine": 244, + "startColumn": 22, + "charOffset": 9562, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_GREEN_TOP_75) {\n\t\tif (playerPoints < 50u) {\n\t\t\tg_logger().debug(\"Player {} trying to manipulate byte to SLOT_GREEN_TOP_75: {}\", m_player.getName(), fmt::underlying(slot));\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a3536cf4caa049fe9347f6ce0e305b8ebb9f544a262951b012f3e2b5d3778de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50u is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 246, + "startColumn": 22, + "charOffset": 9642, + "charLength": 3, + "snippet": { + "text": "50u" + } + }, + "contextRegion": { + "startLine": 244, + "startColumn": 22, + "charOffset": 9562, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_GREEN_TOP_75) {\n\t\tif (playerPoints < 50u) {\n\t\t\tg_logger().debug(\"Player {} trying to manipulate byte to SLOT_GREEN_TOP_75: {}\", m_player.getName(), fmt::underlying(slot));\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d2aeae20cd3a8d90a112bb1c1034b52143fa97d7731e8c9d528644e9ee60404" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 266, + "startColumn": 22, + "charOffset": 10324, + "charLength": 3, + "snippet": { + "text": "50u" + } + }, + "contextRegion": { + "startLine": 264, + "startColumn": 22, + "charOffset": 10241, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_GREEN_BOTTOM_75) {\n\t\tif (playerPoints < 50u) {\n\t\t\tg_logger().debug(\"Player {} trying to manipulate byte to SLOT_GREEN_BOTTOM_75: {}\", m_player.getName(), fmt::underlying(slot));\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac036fd0ec022c74d4263b448f0c9e00dda741c07fbef5fd82a595b3359c1e84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "integer literal has suffix 'u', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 266, + "startColumn": 22, + "charOffset": 10324, + "charLength": 3, + "snippet": { + "text": "50u" + } + }, + "contextRegion": { + "startLine": 264, + "startColumn": 22, + "charOffset": 10241, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_GREEN_BOTTOM_75) {\n\t\tif (playerPoints < 50u) {\n\t\t\tg_logger().debug(\"Player {} trying to manipulate byte to SLOT_GREEN_BOTTOM_75: {}\", m_player.getName(), fmt::underlying(slot));\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b980ab15f061c40b6df8a53db62d5c5505e7908e91d4563917d783ca1c0f9ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50u is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 266, + "startColumn": 22, + "charOffset": 10324, + "charLength": 3, + "snippet": { + "text": "50u" + } + }, + "contextRegion": { + "startLine": 264, + "startColumn": 22, + "charOffset": 10241, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_GREEN_BOTTOM_75) {\n\t\tif (playerPoints < 50u) {\n\t\t\tg_logger().debug(\"Player {} trying to manipulate byte to SLOT_GREEN_BOTTOM_75: {}\", m_player.getName(), fmt::underlying(slot));\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8597a5e9e5da4a669586e9dbc2b811ace5a2fac9c52b00494c703e66d5067d55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal supplied to boolean operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 286, + "startColumn": 85, + "charOffset": 11066, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 284, + "startColumn": 85, + "charOffset": 10927, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_GREEN_50) {\n\t\treturn (recursive && (getPointsBySlotType(slot) == getMaxPointsPerSlot(slot))) || true;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a825866dc81b39176be8391e8800bd1e7a76a7a00a4c816886befd5448ea900" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 290, + "startColumn": 2, + "charOffset": 11094, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 288, + "startColumn": 2, + "charOffset": 11075, + "charLength": 2, + "snippet": { + "text": "\n\t// Red quadrant\n\tif (slot == WheelSlots_t::SLOT_RED_200) {\n\t\tif (playerPoints < 375u) {\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9dd4c588119b312d188199e2f7128dee32120211044b884bba53ce665e2de7c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 291, + "startColumn": 22, + "charOffset": 11157, + "charLength": 4, + "snippet": { + "text": "375u" + } + }, + "contextRegion": { + "startLine": 289, + "startColumn": 22, + "charOffset": 11076, + "charLength": 4, + "snippet": { + "text": "\t// Red quadrant\n\tif (slot == WheelSlots_t::SLOT_RED_200) {\n\t\tif (playerPoints < 375u) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b4b1759cb9812e74ade832f2ef7a81c7ff4a464cde3046e18d351a9178215e90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "integer literal has suffix 'u', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 291, + "startColumn": 22, + "charOffset": 11157, + "charLength": 4, + "snippet": { + "text": "375u" + } + }, + "contextRegion": { + "startLine": 289, + "startColumn": 22, + "charOffset": 11076, + "charLength": 4, + "snippet": { + "text": "\t// Red quadrant\n\tif (slot == WheelSlots_t::SLOT_RED_200) {\n\t\tif (playerPoints < 375u) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0931d7afcac76b1a1cf091384550b42c31c2138aae169ad0ac82c38e3b731e8b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "375u is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 291, + "startColumn": 22, + "charOffset": 11157, + "charLength": 4, + "snippet": { + "text": "375u" + } + }, + "contextRegion": { + "startLine": 289, + "startColumn": 22, + "charOffset": 11076, + "charLength": 4, + "snippet": { + "text": "\t// Red quadrant\n\tif (slot == WheelSlots_t::SLOT_RED_200) {\n\t\tif (playerPoints < 375u) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5cc33790234a14d9c52bae0512d40e21c27baed8ca7b859e319d59198bb7184e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "225 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 301, + "startColumn": 22, + "charOffset": 11440, + "charLength": 3, + "snippet": { + "text": "225" + } + }, + "contextRegion": { + "startLine": 299, + "startColumn": 22, + "charOffset": 11361, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_RED_TOP_150) {\n\t\tif (playerPoints < 225) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3aeb3247c69e8b38817aeac41c423bbe0daefd4c081b653e39f225d1e0f38eca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "225 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 314, + "startColumn": 22, + "charOffset": 11816, + "charLength": 3, + "snippet": { + "text": "225" + } + }, + "contextRegion": { + "startLine": 312, + "startColumn": 22, + "charOffset": 11734, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_RED_BOTTOM_150) {\n\t\tif (playerPoints < 225) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b6a3e7aa6898b69eb384c74d8ed904d7c62c56a2a2d6533f6cd334bb3064616" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "125 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 327, + "startColumn": 22, + "charOffset": 12189, + "charLength": 3, + "snippet": { + "text": "125" + } + }, + "contextRegion": { + "startLine": 325, + "startColumn": 22, + "charOffset": 12110, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_RED_TOP_100) {\n\t\tif (playerPoints < 125) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1e60c02a34274c73c01c1a190a1ed2b26888f3ce1ad65ea7cc1de32a12197d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "125 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 343, + "startColumn": 22, + "charOffset": 12651, + "charLength": 3, + "snippet": { + "text": "125" + } + }, + "contextRegion": { + "startLine": 341, + "startColumn": 22, + "charOffset": 12569, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_RED_MIDDLE_100) {\n\t\tif (playerPoints < 125) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c510172bf96e7571abb40bdd3a1b63ab259b43c74dc241ec86c48094ffe0394f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "125 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 359, + "startColumn": 22, + "charOffset": 13113, + "charLength": 3, + "snippet": { + "text": "125" + } + }, + "contextRegion": { + "startLine": 357, + "startColumn": 22, + "charOffset": 13031, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_RED_BOTTOM_100) {\n\t\tif (playerPoints < 125) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5377c737071ce9bd3fe7db574921cb386785f4f87fe355d73c3c2d4fa3bd080a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 375, + "startColumn": 22, + "charOffset": 13578, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 373, + "startColumn": 22, + "charOffset": 13500, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_RED_TOP_75) {\n\t\tif (playerPoints < 50) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41f84013100ff0e86226b8f8ff8066dd0ba5e127a485529e16c89b92672febce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 394, + "startColumn": 22, + "charOffset": 14123, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 392, + "startColumn": 22, + "charOffset": 14042, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_RED_BOTTOM_75) {\n\t\tif (playerPoints < 50) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c470acff13a6c200807214c8d8ce83d68150365d4d8ce234aafe47893da0103" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal supplied to boolean operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 413, + "startColumn": 85, + "charOffset": 14725, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 411, + "startColumn": 85, + "charOffset": 14588, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_RED_50) {\n\t\treturn (recursive && (getPointsBySlotType(slot) == getMaxPointsPerSlot(slot))) || true;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9245ec755e6ad7d35da63acd45443c38dee18da41d5e2b02ef55a154141e4028" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 417, + "startColumn": 2, + "charOffset": 14756, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 415, + "startColumn": 2, + "charOffset": 14734, + "charLength": 2, + "snippet": { + "text": "\n\t// Purple quadrant\n\tif (slot == WheelSlots_t::SLOT_PURPLE_200) {\n\t\tif (playerPoints < 375) {\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e1b4a6f99b74888d6893d0213013105d1f2659954176b6175418e9c71ac483c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "375 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 418, + "startColumn": 22, + "charOffset": 14822, + "charLength": 3, + "snippet": { + "text": "375" + } + }, + "contextRegion": { + "startLine": 416, + "startColumn": 22, + "charOffset": 14735, + "charLength": 3, + "snippet": { + "text": "\t// Purple quadrant\n\tif (slot == WheelSlots_t::SLOT_PURPLE_200) {\n\t\tif (playerPoints < 375) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6482986dae8c5364bd46f364ea88062d1317dab3da760572b36bc025527af8ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "225 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 428, + "startColumn": 22, + "charOffset": 15113, + "charLength": 3, + "snippet": { + "text": "225" + } + }, + "contextRegion": { + "startLine": 426, + "startColumn": 22, + "charOffset": 15031, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_PURPLE_TOP_150) {\n\t\tif (playerPoints < 225) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a100ef852e33c1fb85fb78a1d7f202b7aab6b5782df8d12c3559063f5df0caff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "225 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 441, + "startColumn": 22, + "charOffset": 15501, + "charLength": 3, + "snippet": { + "text": "225" + } + }, + "contextRegion": { + "startLine": 439, + "startColumn": 22, + "charOffset": 15416, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_PURPLE_BOTTOM_150) {\n\t\tif (playerPoints < 225) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94cf1bbdec991b97b917c0d77a60d9624b4102801052fa401da07211a32ac5f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "125 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 454, + "startColumn": 22, + "charOffset": 15886, + "charLength": 3, + "snippet": { + "text": "125" + } + }, + "contextRegion": { + "startLine": 452, + "startColumn": 22, + "charOffset": 15804, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_PURPLE_TOP_100) {\n\t\tif (playerPoints < 125) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "397fe3a659136019ead20aa6c1467848bf26b625e4aa75968776c4653eed6f69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "125 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 470, + "startColumn": 22, + "charOffset": 16361, + "charLength": 3, + "snippet": { + "text": "125" + } + }, + "contextRegion": { + "startLine": 468, + "startColumn": 22, + "charOffset": 16276, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_PURPLE_MIDDLE_100) {\n\t\tif (playerPoints < 125) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c10193c053e64211cce519701413b245078c9ac0e65460673cbabc0b7ac0134" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "125 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 486, + "startColumn": 22, + "charOffset": 16838, + "charLength": 3, + "snippet": { + "text": "125" + } + }, + "contextRegion": { + "startLine": 484, + "startColumn": 22, + "charOffset": 16753, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_PURPLE_BOTTOM_100) {\n\t\tif (playerPoints < 125) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b8e429125b907d6ca55ecd7b82dbd8d2227ec345231f16dadd16cb39419329a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 502, + "startColumn": 22, + "charOffset": 17316, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 500, + "startColumn": 22, + "charOffset": 17235, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_PURPLE_TOP_75) {\n\t\tif (playerPoints < 50) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70fc3e85f402356751c7fbea7204878f6da3b6bf1b315aaf4c356c93734fcd6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 521, + "startColumn": 22, + "charOffset": 17877, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 519, + "startColumn": 22, + "charOffset": 17793, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_PURPLE_BOTTOM_75) {\n\t\tif (playerPoints < 50) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32624be1435071781fc595e72e0ff40e51f97ebd94ac3a58231a5b1d44b434d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal supplied to boolean operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 540, + "startColumn": 85, + "charOffset": 18495, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 538, + "startColumn": 85, + "charOffset": 18355, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_PURPLE_50) {\n\t\treturn (recursive && (getPointsBySlotType(slot) == getMaxPointsPerSlot(slot))) || true;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94a4d8f5ea4cd6404ca5805970abcfd479cfa9d89f37ffa996f1e6fc5ec8f9e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 544, + "startColumn": 2, + "charOffset": 18524, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 542, + "startColumn": 2, + "charOffset": 18504, + "charLength": 2, + "snippet": { + "text": "\n\t// Blue quadrant\n\tif (slot == WheelSlots_t::SLOT_BLUE_200) {\n\t\tif (playerPoints < 375) {\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d62380779870c0307bb76996e7c5ece68423fd16f0d8fc31d66734c1124b185" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "375 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 545, + "startColumn": 22, + "charOffset": 18588, + "charLength": 3, + "snippet": { + "text": "375" + } + }, + "contextRegion": { + "startLine": 543, + "startColumn": 22, + "charOffset": 18505, + "charLength": 3, + "snippet": { + "text": "\t// Blue quadrant\n\tif (slot == WheelSlots_t::SLOT_BLUE_200) {\n\t\tif (playerPoints < 375) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b30e7108d2c7d6cb3c8c4a4c876c5e915104ee65d3146e500809b72c1cb56113" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "225 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 555, + "startColumn": 22, + "charOffset": 18873, + "charLength": 3, + "snippet": { + "text": "225" + } + }, + "contextRegion": { + "startLine": 553, + "startColumn": 22, + "charOffset": 18793, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_BLUE_TOP_150) {\n\t\tif (playerPoints < 225) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68a9bfab7f7e0d0959d2e3797ec0d742e03490c645a7e33379353ea30fd05066" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "225 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 568, + "startColumn": 22, + "charOffset": 19253, + "charLength": 3, + "snippet": { + "text": "225" + } + }, + "contextRegion": { + "startLine": 566, + "startColumn": 22, + "charOffset": 19170, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_BLUE_BOTTOM_150) {\n\t\tif (playerPoints < 225) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2247000a6904b298ef4262829fed04b3fc58e8168aac76b5577d5cf117abd25e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "125 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 581, + "startColumn": 22, + "charOffset": 19630, + "charLength": 3, + "snippet": { + "text": "125" + } + }, + "contextRegion": { + "startLine": 579, + "startColumn": 22, + "charOffset": 19550, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_BLUE_TOP_100) {\n\t\tif (playerPoints < 125) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4dd81a3fd815aeba4cde2d26dbebafd02084b4d70f166653fef56d6f693fd200" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "125 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 597, + "startColumn": 22, + "charOffset": 20099, + "charLength": 3, + "snippet": { + "text": "125" + } + }, + "contextRegion": { + "startLine": 595, + "startColumn": 22, + "charOffset": 20016, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_BLUE_MIDDLE_100) {\n\t\tif (playerPoints < 125) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ac4d39a4a63341a339a2b5c743e6c8477d42f5aa09a39eb78ccc85f4c2ee1e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "125 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 613, + "startColumn": 22, + "charOffset": 20566, + "charLength": 3, + "snippet": { + "text": "125" + } + }, + "contextRegion": { + "startLine": 611, + "startColumn": 22, + "charOffset": 20483, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_BLUE_BOTTOM_100) {\n\t\tif (playerPoints < 125) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ec94b44fd3da9c054139ecba7b4fbc81cb2a2648ce65cc62be2043dccfaca4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 629, + "startColumn": 22, + "charOffset": 21038, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 627, + "startColumn": 22, + "charOffset": 20959, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_BLUE_TOP_75) {\n\t\tif (playerPoints < 50) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3b5dd13d3766fae964d10d59789f03d89fa2e90b10acecba693199ac7122bd1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 648, + "startColumn": 22, + "charOffset": 21591, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 646, + "startColumn": 22, + "charOffset": 21509, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_BLUE_BOTTOM_75) {\n\t\tif (playerPoints < 50) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "557e6318c53e86cad77c55f5da2f69ef58695b1a12c67c004d896880fbd6a7bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal supplied to boolean operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 667, + "startColumn": 85, + "charOffset": 22201, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 665, + "startColumn": 85, + "charOffset": 22063, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else if (slot == WheelSlots_t::SLOT_BLUE_50) {\n\t\treturn (recursive && (getPointsBySlotType(slot) == getMaxPointsPerSlot(slot))) || true;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ba20a1a8b0208a404f5eb88f295b418619d1c715e2ba51bcabfc43a54133967" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 679, + "startColumn": 2, + "charOffset": 22357, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 677, + "startColumn": 2, + "charOffset": 22352, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (uint8_t i = WheelSlots_t::SLOT_FIRST; i <= WheelSlots_t::SLOT_LAST; ++i) {\n\t\ttotalPoints -= getPointsBySlotType(static_cast(i));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0db6a6e15c003cb25a568e3c575005d900d99b0a86287e74e2dceca7b1955026" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 693, + "startColumn": 2, + "charOffset": 22771, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 691, + "startColumn": 2, + "charOffset": 22714, + "charLength": 2, + "snippet": { + "text": "\n\tauto vocationEnum = m_player.getPlayerVocationEnum();\n\tif (vocationEnum == Vocation_t::VOCATION_KNIGHT_CIP) {\n\t\treturn checkSpellArea(g_game().getIOWheel()->getWheelBonusData().spells.knight, spellName, stage);\n\t} else if (vocationEnum == Vocation_t::VOCATION_PALADIN_CIP) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0d34a2d91489147bc589a4925b10c4e88b7802f9bc7cd3bf121f545981ccd8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 695, + "startColumn": 4, + "charOffset": 22930, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 693, + "startColumn": 4, + "charOffset": 22770, + "charLength": 4, + "snippet": { + "text": "\tif (vocationEnum == Vocation_t::VOCATION_KNIGHT_CIP) {\n\t\treturn checkSpellArea(g_game().getIOWheel()->getWheelBonusData().spells.knight, spellName, stage);\n\t} else if (vocationEnum == Vocation_t::VOCATION_PALADIN_CIP) {\n\t\treturn checkSpellArea(g_game().getIOWheel()->getWheelBonusData().spells.paladin, spellName, stage);\n\t} else if (vocationEnum == Vocation_t::VOCATION_DRUID_CIP) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b064b1083585ec1627a2fbf1c8e100cc2e8f136df57c790fe644bd54fcd5b924" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 713, + "startColumn": 2, + "charOffset": 23680, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 711, + "startColumn": 2, + "charOffset": 23623, + "charLength": 2, + "snippet": { + "text": "\n\tauto vocationEnum = m_player.getPlayerVocationEnum();\n\tif (vocationEnum == Vocation_t::VOCATION_KNIGHT_CIP) {\n\t\treturn checkSpellAdditionalTarget(g_game().getIOWheel()->getWheelBonusData().spells.knight, spellName, stage);\n\t} else if (vocationEnum == Vocation_t::VOCATION_PALADIN_CIP) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e91a2edaba72cc2cbdc72b554b3928c4a04ba1a52e6c56c6fd70494ef57c069" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 715, + "startColumn": 4, + "charOffset": 23851, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 713, + "startColumn": 4, + "charOffset": 23679, + "charLength": 4, + "snippet": { + "text": "\tif (vocationEnum == Vocation_t::VOCATION_KNIGHT_CIP) {\n\t\treturn checkSpellAdditionalTarget(g_game().getIOWheel()->getWheelBonusData().spells.knight, spellName, stage);\n\t} else if (vocationEnum == Vocation_t::VOCATION_PALADIN_CIP) {\n\t\treturn checkSpellAdditionalTarget(g_game().getIOWheel()->getWheelBonusData().spells.paladin, spellName, stage);\n\t} else if (vocationEnum == Vocation_t::VOCATION_DRUID_CIP) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7875486f9b79b406f96471f19728e093871050616c7a94dce82d465b8fae5a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 733, + "startColumn": 2, + "charOffset": 24635, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 731, + "startColumn": 2, + "charOffset": 24578, + "charLength": 2, + "snippet": { + "text": "\n\tauto vocationEnum = m_player.getPlayerVocationEnum();\n\tif (vocationEnum == Vocation_t::VOCATION_KNIGHT_CIP) {\n\t\treturn checkSpellAdditionalDuration(g_game().getIOWheel()->getWheelBonusData().spells.knight, spellName, stage);\n\t} else if (vocationEnum == Vocation_t::VOCATION_PALADIN_CIP) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0077d8b6af68f6153a4ac7f12a1f61f197a102f855429850ef883e0f4e7a6e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 735, + "startColumn": 4, + "charOffset": 24808, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 733, + "startColumn": 4, + "charOffset": 24634, + "charLength": 4, + "snippet": { + "text": "\tif (vocationEnum == Vocation_t::VOCATION_KNIGHT_CIP) {\n\t\treturn checkSpellAdditionalDuration(g_game().getIOWheel()->getWheelBonusData().spells.knight, spellName, stage);\n\t} else if (vocationEnum == Vocation_t::VOCATION_PALADIN_CIP) {\n\t\treturn checkSpellAdditionalDuration(g_game().getIOWheel()->getWheelBonusData().spells.paladin, spellName, stage);\n\t} else if (vocationEnum == Vocation_t::VOCATION_DRUID_CIP) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7254e6b729c865e4582117f5c0364ac81b99272bc8520c9fc18626851b65162" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 749, + "startColumn": 2, + "charOffset": 25470, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 747, + "startColumn": 2, + "charOffset": 25428, + "charLength": 3, + "snippet": { + "text": "\tstd::vector unlockedScrolls;\n\n\tfor (const auto &scroll : WheelOfDestinyPromotionScrolls) {\n\t\tconst auto &scrollKv = m_player.kv()->scoped(\"wheel-of-destiny\")->scoped(\"scrolls\");\n\t\tif (!scrollKv) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f5f654f4b221f8a629b38bbe724fe9733642f5fea530872bbaa9ed27dd19a26" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 751, + "startColumn": 7, + "charOffset": 25623, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 749, + "startColumn": 7, + "charOffset": 25469, + "charLength": 1, + "snippet": { + "text": "\tfor (const auto &scroll : WheelOfDestinyPromotionScrolls) {\n\t\tconst auto &scrollKv = m_player.kv()->scoped(\"wheel-of-destiny\")->scoped(\"scrolls\");\n\t\tif (!scrollKv) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ac3e8f397275d65b6758c22d5fc24a7ecabe7bc9ba88fcf37556e9aa68db85e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 761, + "startColumn": 20, + "charOffset": 25818, + "charLength": 15, + "snippet": { + "text": "unlockedScrolls" + } + }, + "contextRegion": { + "startLine": 759, + "startColumn": 20, + "charOffset": 25795, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tmsg.add(unlockedScrolls.size());\n\tfor (const auto &itemId : unlockedScrolls) {\n\t\tmsg.add(itemId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e153ca5dbb4fd548a46a583068a751bd2d93ae78e7a56e877492c5511d204a16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 762, + "startColumn": 2, + "charOffset": 25844, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 760, + "startColumn": 2, + "charOffset": 25798, + "charLength": 3, + "snippet": { + "text": "\n\tmsg.add(unlockedScrolls.size());\n\tfor (const auto &itemId : unlockedScrolls) {\n\t\tmsg.add(itemId);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fedd899d058c4164793732b161308fdbea370881015417545b952b8c2fe15666" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 778, + "startColumn": 2, + "charOffset": 26327, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 776, + "startColumn": 2, + "charOffset": 26273, + "charLength": 3, + "snippet": { + "text": "\t}\n\tstd::vector sortedUnlockedGemGUIDs;\n\tfor (const auto &uuid : unlockedGemUUIDs) {\n\t\tsortedUnlockedGemGUIDs.push_back(uuid);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d980f910b9a8401936de4ae3a832a0ab911942ae96741394c4b8771c6157ca3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 785, + "startColumn": 2, + "charOffset": 26587, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 783, + "startColumn": 2, + "charOffset": 26580, + "charLength": 3, + "snippet": { + "text": "\t});\n\n\tfor (const auto &uuid : sortedUnlockedGemGUIDs) {\n\t\tauto gem = PlayerWheelGem::load(gemsKV(), uuid);\n\t\tif (gem.uuid.empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab7be7e0e2a6452c1b749582d7183463b46d35f6946efffae20a4b2c6c789a6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 797, + "startColumn": 2, + "charOffset": 26897, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 795, + "startColumn": 2, + "charOffset": 26790, + "charLength": 3, + "snippet": { + "text": "std::vector PlayerWheel::getActiveGems() const {\n\tstd::vector activeGems;\n\tfor (auto affinity : magic_enum::enum_values()) {\n\t\tstd::string key(magic_enum::enum_name(affinity));\n\t\tauto uuidKV = gemsKV()->scoped(\"active\")->get(key);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0259c847ea61976232128bb9ac9c6f3d914a802aa7eb9122c46dcc95497a01d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'key' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 818, + "startColumn": 14, + "charOffset": 27430, + "charLength": 3, + "snippet": { + "text": "key" + } + }, + "contextRegion": { + "startLine": 816, + "startColumn": 14, + "charOffset": 27348, + "charLength": 3, + "snippet": { + "text": "\nuint64_t PlayerWheel::getGemRotateCost(WheelGemQuality_t quality) {\n\tConfigKey_t key;\n\tswitch (quality) {\n\t\tcase WheelGemQuality_t::Lesser:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ed53ba6021abde5463a4d0b6c2ab5d3b412be2f4216efa92fd53a8538a55ee6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 829, + "startColumn": 3, + "charOffset": 27722, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 827, + "startColumn": 3, + "charOffset": 27666, + "charLength": 7, + "snippet": { + "text": "\t\t\tkey = WHEEL_ATELIER_ROTATE_GREATER_COST;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1410c4e044c97ae93a3af981d7fb2f5fc744a64f4f1bcc3efda36c2903726f21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'key' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 836, + "startColumn": 14, + "charOffset": 27910, + "charLength": 3, + "snippet": { + "text": "key" + } + }, + "contextRegion": { + "startLine": 834, + "startColumn": 14, + "charOffset": 27828, + "charLength": 3, + "snippet": { + "text": "\nuint64_t PlayerWheel::getGemRevealCost(WheelGemQuality_t quality) {\n\tConfigKey_t key;\n\tswitch (quality) {\n\t\tcase WheelGemQuality_t::Lesser:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34023d794a10b1a2b8b5d4261c93ce5c438298aeff025a872eda914f91eaed75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 847, + "startColumn": 3, + "charOffset": 28202, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 845, + "startColumn": 3, + "charOffset": 28146, + "charLength": 7, + "snippet": { + "text": "\t\t\tkey = WHEEL_ATELIER_REVEAL_GREATER_COST;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ddb8a44fc60530426f0ed2ef597d50422b99f1666639df3f86301bb314e8f979" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 878, + "startColumn": 67, + "charOffset": 29549, + "charLength": 25, + "snippet": { + "text": "wheelGemBasicSlot1Allowed" + } + }, + "contextRegion": { + "startLine": 876, + "startColumn": 67, + "charOffset": 29388, + "charLength": 25, + "snippet": { + "text": "\tgem.affinity = static_cast(uniform_random(0, 3));\n\tgem.quality = quality;\n\tgem.basicModifier1 = wheelGemBasicSlot1Allowed[uniform_random(0, wheelGemBasicSlot1Allowed.size() - 1)];\n\tgem.basicModifier2 = {};\n\tgem.supremeModifier = {};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2265b0c96e57fe01c43e17a5a2c536e067375253aad028e924b0422dae4e8e93" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 878, + "startColumn": 67, + "charOffset": 29549, + "charLength": 25, + "snippet": { + "text": "wheelGemBasicSlot1Allowed" + } + }, + "contextRegion": { + "startLine": 876, + "startColumn": 67, + "charOffset": 29388, + "charLength": 25, + "snippet": { + "text": "\tgem.affinity = static_cast(uniform_random(0, 3));\n\tgem.quality = quality;\n\tgem.basicModifier1 = wheelGemBasicSlot1Allowed[uniform_random(0, wheelGemBasicSlot1Allowed.size() - 1)];\n\tgem.basicModifier2 = {};\n\tgem.supremeModifier = {};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97655fa36b358f6387f1e3ed42e4e8361b54a7eac789ce5c60a25f8537bc6a87" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 885, + "startColumn": 60, + "charOffset": 29890, + "charLength": 16, + "snippet": { + "text": "supremeModifiers" + } + }, + "contextRegion": { + "startLine": 883, + "startColumn": 60, + "charOffset": 29753, + "charLength": 16, + "snippet": { + "text": "\t}\n\tif (quality >= WheelGemQuality_t::Greater && !supremeModifiers.empty()) {\n\t\tgem.supremeModifier = supremeModifiers[uniform_random(0, supremeModifiers.size() - 1)];\n\t}\n\tg_logger().debug(\"[{}] {}\", __FUNCTION__, gem.toString());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f889c7a700702905cf73f0c2cc7e3abed58efa5dff4b088f264f45a619ce18d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 885, + "startColumn": 60, + "charOffset": 29890, + "charLength": 16, + "snippet": { + "text": "supremeModifiers" + } + }, + "contextRegion": { + "startLine": 883, + "startColumn": 60, + "charOffset": 29753, + "charLength": 16, + "snippet": { + "text": "\t}\n\tif (quality >= WheelGemQuality_t::Greater && !supremeModifiers.empty()) {\n\t\tgem.supremeModifier = supremeModifiers[uniform_random(0, supremeModifiers.size() - 1)];\n\t}\n\tg_logger().debug(\"[{}] {}\", __FUNCTION__, gem.toString());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a068210617746260ee32f640302d64f66c3cf63e3738f7b1840650e8a190fb8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 912, + "startColumn": 2, + "charOffset": 30708, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 910, + "startColumn": 2, + "charOffset": 30608, + "charLength": 3, + "snippet": { + "text": "uint16_t PlayerWheel::getGemIndex(const std::string &uuid) const {\n\tauto gems = getRevealedGems();\n\tfor (uint16_t i = 0; i < gems.size(); ++i) {\n\t\tif (gems[i].uuid == uuid) {\n\t\t\treturn i;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fedd899d058c4164793732b161308fdbea370881015417545b952b8c2fe15666" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-too-small-loop-variable", + "ruleIndex": 107, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable has narrower type 'uint16_t' than iteration's upper bound 'size_type'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 912, + "startColumn": 23, + "charOffset": 30729, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 910, + "startColumn": 23, + "charOffset": 30608, + "charLength": 1, + "snippet": { + "text": "uint16_t PlayerWheel::getGemIndex(const std::string &uuid) const {\n\tauto gems = getRevealedGems();\n\tfor (uint16_t i = 0; i < gems.size(); ++i) {\n\t\tif (gems[i].uuid == uuid) {\n\t\t\treturn i;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5063f77ec369e3cbbacd6f024295c005fd865beea9cefd58432475412ba0014b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 918, + "startColumn": 9, + "charOffset": 30890, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 916, + "startColumn": 9, + "charOffset": 30800, + "charLength": 4, + "snippet": { + "text": "\t}\n\tg_logger().error(\"[{}] Failed to find gem with uuid {}\", __FUNCTION__, uuid);\n\treturn 0xFF;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6668ddb4cd1929e6e0b3042167fff1a2aa030fc76783eb8d64d9ff616d846c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 918, + "startColumn": 9, + "charOffset": 30890, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 916, + "startColumn": 9, + "charOffset": 30800, + "charLength": 4, + "snippet": { + "text": "\t}\n\tg_logger().error(\"[{}] Failed to find gem with uuid {}\", __FUNCTION__, uuid);\n\treturn 0xFF;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "044267a333f79cf4c69d0d666ae19e7961363d5dab16dda302c5d8fe3a7e58c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 977, + "startColumn": 14, + "charOffset": 32871, + "charLength": 10, + "snippet": { + "text": "activeGems" + } + }, + "contextRegion": { + "startLine": 975, + "startColumn": 14, + "charOffset": 32767, + "charLength": 10, + "snippet": { + "text": "void PlayerWheel::addGems(NetworkMessage &msg) const {\n\tauto activeGems = getActiveGems();\n\tmsg.addByte(activeGems.size());\n\tg_logger().debug(\"[{}] Player {} has {} active gems\", __FUNCTION__, m_player.getName(), activeGems.size());\n\tfor (const auto &gem : activeGems) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26a7693cd37e0caea53e5393e16088c268e3bdd2eadce6a5986c51b174814473" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 979, + "startColumn": 2, + "charOffset": 33001, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 977, + "startColumn": 2, + "charOffset": 32858, + "charLength": 3, + "snippet": { + "text": "\tmsg.addByte(activeGems.size());\n\tg_logger().debug(\"[{}] Player {} has {} active gems\", __FUNCTION__, m_player.getName(), activeGems.size());\n\tfor (const auto &gem : activeGems) {\n\t\tauto index = getGemIndex(gem.uuid);\n\t\tg_logger().debug(\"[{}] Adding active gem: {} with index {}\", __FUNCTION__, gem.toString(), index);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2efa8e3031bedf232171bd835c2a7d0457526926037e4119a798a5a6208f2db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 986, + "startColumn": 20, + "charOffset": 33284, + "charLength": 12, + "snippet": { + "text": "revealedGems" + } + }, + "contextRegion": { + "startLine": 984, + "startColumn": 20, + "charOffset": 33224, + "charLength": 12, + "snippet": { + "text": "\n\tauto revealedGems = getRevealedGems();\n\tmsg.add(revealedGems.size());\n\tuint16_t index = 0;\n\tfor (const auto &gem : revealedGems) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28ce6e8b91d9e5f3243e51eef78a25c8ee6e66048eab0b21f53ded3b037744e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 988, + "startColumn": 2, + "charOffset": 33328, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 986, + "startColumn": 2, + "charOffset": 33265, + "charLength": 3, + "snippet": { + "text": "\tmsg.add(revealedGems.size());\n\tuint16_t index = 0;\n\tfor (const auto &gem : revealedGems) {\n\t\tg_logger().debug(\"[{}] Adding revealed gem: {}\", __FUNCTION__, gem.toString());\n\t\tmsg.add(index++);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d91ecdaff903eb43319688a9d8e6f766e47920a9bc5bcfd4ec5e2e0e8827c2a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 991, + "startColumn": 15, + "charOffset": 33493, + "charLength": 3, + "snippet": { + "text": "gem" + } + }, + "contextRegion": { + "startLine": 989, + "startColumn": 15, + "charOffset": 33367, + "charLength": 3, + "snippet": { + "text": "\t\tg_logger().debug(\"[{}] Adding revealed gem: {}\", __FUNCTION__, gem.toString());\n\t\tmsg.add(index++);\n\t\tmsg.addByte(gem.locked);\n\t\tmsg.addByte(static_cast(gem.affinity));\n\t\tmsg.addByte(static_cast(gem.quality));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f42029a8cb7cd4fd4d49d89c615b325326d5f84f8031483276fc3b5ef9c740b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1012, + "startColumn": 14, + "charOffset": 34131, + "charLength": 4, + "snippet": { + "text": "0x5F" + } + }, + "contextRegion": { + "startLine": 1010, + "startColumn": 14, + "charOffset": 34114, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tmsg.addByte(0x5F);\n\tbool canUse = canOpenWheel();\n\tmsg.add(ownerId); // Player ID" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3854b38a418dc94d506e7cb20d34e277f9ae251bf2838fb6f633353b6437d920" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x5F is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1012, + "startColumn": 14, + "charOffset": 34131, + "charLength": 4, + "snippet": { + "text": "0x5F" + } + }, + "contextRegion": { + "startLine": 1010, + "startColumn": 14, + "charOffset": 34114, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tmsg.addByte(0x5F);\n\tbool canUse = canOpenWheel();\n\tmsg.add(ownerId); // Player ID" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aea725ae0d3498e27dd1a66ed547cb491255e0c535e8f65feb7acfbb7e72e71a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1021, + "startColumn": 14, + "charOffset": 34341, + "charLength": 8, + "snippet": { + "text": "m_player" + } + }, + "contextRegion": { + "startLine": 1019, + "startColumn": 14, + "charOffset": 34281, + "charLength": 8, + "snippet": { + "text": "\n\tmsg.addByte(getOptions(ownerId)); // Options\n\tmsg.addByte(m_player.getPlayerVocationEnum()); // Vocation id\n\n\tmsg.add(getWheelPoints(false)); // Points (false param for not send extra points)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e857eaceb5d345c99ca5981f20bed87e721e67f9689d1973d1b5b77014ec5dc4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1025, + "startColumn": 2, + "charOffset": 34540, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1023, + "startColumn": 2, + "charOffset": 34392, + "charLength": 3, + "snippet": { + "text": "\tmsg.add(getWheelPoints(false)); // Points (false param for not send extra points)\n\tmsg.add(getExtraPoints()); // Extra points\n\tfor (uint8_t i = WheelSlots_t::SLOT_FIRST; i <= WheelSlots_t::SLOT_LAST; ++i) {\n\t\tmsg.add(getPointsBySlotType(i));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3939aa25ae8bc6d03ee68f7affff93c34185a5207ed24ffe61a26a6bce13456d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-todo", + "ruleIndex": 545, + "kind": "fail", + "level": "warning", + "message": { + "text": "missing username/bug in TODO" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1030, + "startColumn": 2, + "charOffset": 34711, + "charLength": 34, + "snippet": { + "text": "// TODO: read items from inventory" + } + }, + "contextRegion": { + "startLine": 1028, + "startColumn": 2, + "charOffset": 34668, + "charLength": 34, + "snippet": { + "text": "\taddPromotionScrolls(msg);\n\taddGems(msg);\n\t// TODO: read items from inventory\n\tauto voc = m_player.getVocation();\n\tm_player.client->sendResourceBalance(RESOURCE_BANK, m_player.getBankBalance());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "941e350e81786d6dcb6ad253094347a608f9300e967bb1c79c6b41f0658fc835" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1040, + "startColumn": 6, + "charOffset": 35417, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1038, + "startColumn": 6, + "charOffset": 35360, + "charLength": 1, + "snippet": { + "text": "\nvoid PlayerWheel::sendGiftOfLifeCooldown() const {\n\tif (!m_player.client || m_player.client->oldProtocol) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ab44893e92069d5efa037c2daeed176a3b4de677c0d1c0c1d4b96fd3de89d31" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1045, + "startColumn": 14, + "charOffset": 35517, + "charLength": 4, + "snippet": { + "text": "0x5E" + } + }, + "contextRegion": { + "startLine": 1043, + "startColumn": 14, + "charOffset": 35482, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x5E);\n\tmsg.addByte(0x01); // Gift of life ID\n\tmsg.addByte(0x00); // Cooldown ENUM" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f31c01a20b2d9019cd6c0c49a99e92b8ab0c4e0a97cf5c5b27540c7b153a001" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x5E is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1045, + "startColumn": 14, + "charOffset": 35517, + "charLength": 4, + "snippet": { + "text": "0x5E" + } + }, + "contextRegion": { + "startLine": 1043, + "startColumn": 14, + "charOffset": 35482, + "charLength": 4, + "snippet": { + "text": "\n\tNetworkMessage msg;\n\tmsg.addByte(0x5E);\n\tmsg.addByte(0x01); // Gift of life ID\n\tmsg.addByte(0x00); // Cooldown ENUM" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e78876fd07d679bd2732ffb87c0fcd1254b9d228f8f453a7d02c584eeb8332c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1046, + "startColumn": 14, + "charOffset": 35537, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 1044, + "startColumn": 14, + "charOffset": 35483, + "charLength": 4, + "snippet": { + "text": "\tNetworkMessage msg;\n\tmsg.addByte(0x5E);\n\tmsg.addByte(0x01); // Gift of life ID\n\tmsg.addByte(0x00); // Cooldown ENUM\n\tmsg.add(getGiftOfCooldown());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b5af0da96d4be50ac307faefa45d9680cd22c9c30ed6a04825316dd0f80e41d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1047, + "startColumn": 14, + "charOffset": 35576, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 1045, + "startColumn": 14, + "charOffset": 35504, + "charLength": 4, + "snippet": { + "text": "\tmsg.addByte(0x5E);\n\tmsg.addByte(0x01); // Gift of life ID\n\tmsg.addByte(0x00); // Cooldown ENUM\n\tmsg.add(getGiftOfCooldown());\n\tmsg.add(getGiftOfLifeTotalCooldown());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8630eb0d5593efc62791b1d63b8130fbada582feda632cd515dae0621a737ca9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1052, + "startColumn": 15, + "charOffset": 35858, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 1050, + "startColumn": 15, + "charOffset": 35691, + "charLength": 4, + "snippet": { + "text": "\t// Checking if the cooldown if decreasing or it's stopped\n\tif (m_player.getZoneType() != ZONE_PROTECTION && m_player.hasCondition(CONDITION_INFIGHT)) {\n\t\tmsg.addByte(0x01);\n\t} else {\n\t\tmsg.addByte(0x00);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "024d84f0a7ede0c4a567982dbdd56f44822c246617f35af59cf9445e1e980ce1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1054, + "startColumn": 15, + "charOffset": 35889, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 1052, + "startColumn": 15, + "charOffset": 35844, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.addByte(0x01);\n\t} else {\n\t\tmsg.addByte(0x00);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "acb52996881ceb6963d782a71e0a9343187cba6389c96bb6ec2bc4292d6d4b55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1079, + "startColumn": 2, + "charOffset": 36604, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1077, + "startColumn": 2, + "charOffset": 36464, + "charLength": 3, + "snippet": { + "text": "void PlayerWheel::saveSlotPointsHandleRetryErrors(std::vector &retryTable, int &errors) {\n\tstd::vector temporaryTable;\n\tfor (const auto &data : retryTable) {\n\t\tauto saved = checkSavePointsBySlotType(static_cast(data.slot), data.points);\n\t\tif (saved) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13cd5b0350a85a9c11a14d8a49c2a4912bddd189aa2c59b01eb24ebafafdd0a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1084, + "startColumn": 19, + "charOffset": 36792, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1082, + "startColumn": 19, + "charOffset": 36750, + "charLength": 12, + "snippet": { + "text": "\t\t\terrors--;\n\t\t} else {\n\t\t\ttemporaryTable.emplace_back(data);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "138ff436e605cc72fa0a458bac96c0377c02bd42035f4898a641ff5378bd05e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1104, + "startColumn": 2, + "charOffset": 37258, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1102, + "startColumn": 2, + "charOffset": 37115, + "charLength": 3, + "snippet": { + "text": "\tstd::vector sortedTable;\n\t// Iterates over all slots, getting the points for each slot from the message. If the slot points exceed\n\tfor (uint8_t slot = WheelSlots_t::SLOT_FIRST; slot <= WheelSlots_t::SLOT_LAST; ++slot) {\n\t\tauto slotPoints = msg.get(); // Points per Slot\n\t\tauto maxPointsPerSlot = getMaxPointsPerSlot(static_cast(slot));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07745d5612afb8de665f9d9e3644c76655feaf8e977ae15763c53b862fc19882" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-3", + "ruleIndex": 458, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-3: The loop-counter shall not be modified within condition or statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1104, + "startColumn": 2, + "charOffset": 37258, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1102, + "startColumn": 2, + "charOffset": 37115, + "charLength": 3, + "snippet": { + "text": "\tstd::vector sortedTable;\n\t// Iterates over all slots, getting the points for each slot from the message. If the slot points exceed\n\tfor (uint8_t slot = WheelSlots_t::SLOT_FIRST; slot <= WheelSlots_t::SLOT_LAST; ++slot) {\n\t\tauto slotPoints = msg.get(); // Points per Slot\n\t\tauto maxPointsPerSlot = getMaxPointsPerSlot(static_cast(slot));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2a9bb941abcdbff8af8e3c4750a6181545d7d96d9a7972d8eb0ca16fcb3d49a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1132, + "startColumn": 2, + "charOffset": 38554, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1130, + "startColumn": 2, + "charOffset": 38456, + "charLength": 3, + "snippet": { + "text": "\n\t// Processes the vector in the correct order. If it is not possible to save points for a slot,\n\tfor (const auto &data : sortedTable) {\n\t\tauto canSave = checkSavePointsBySlotType(static_cast(data.slot), data.points);\n\t\tif (!canSave) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4248002417e1aec6c3606c3e80251d0fd8e0bdaa82d6c5f6e0e8360e8a0ae15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1135, + "startColumn": 21, + "charOffset": 38726, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1133, + "startColumn": 21, + "charOffset": 38593, + "charLength": 12, + "snippet": { + "text": "\t\tauto canSave = checkSavePointsBySlotType(static_cast(data.slot), data.points);\n\t\tif (!canSave) {\n\t\t\tsortedTableRetry.emplace_back(data);\n\t\t\terrors++;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60f46f955fd7ef527eb566094632f7f41751b1c9ec2405510b4cbd37b8f5cc72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1144, + "startColumn": 3, + "charOffset": 38992, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 1142, + "startColumn": 3, + "charOffset": 38884, + "charLength": 5, + "snippet": { + "text": "\t\tint maxLoop = 0;\n\t\t// The function then enters an error loop to handle possible errors in the slot tree\n\t\twhile (maxLoop <= 5) {\n\t\t\tmaxLoop++;\n\t\t\tsaveSlotPointsHandleRetryErrors(sortedTableRetry, errors);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c13caa7afffe212b3125e9e26a3f0f647ba39fe2e561b3465f89ed526e0dbf3a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1144, + "startColumn": 21, + "charOffset": 39010, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 1142, + "startColumn": 21, + "charOffset": 38884, + "charLength": 1, + "snippet": { + "text": "\t\tint maxLoop = 0;\n\t\t// The function then enters an error loop to handle possible errors in the slot tree\n\t\twhile (maxLoop <= 5) {\n\t\t\tmaxLoop++;\n\t\t\tsaveSlotPointsHandleRetryErrors(sortedTableRetry, errors);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "336f18de1ce33102d1e9abb7b01343c343f8e43692e7e7e5ffbd9f0033030e72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1157, + "startColumn": 2, + "charOffset": 39485, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1155, + "startColumn": 2, + "charOffset": 39467, + "charLength": 3, + "snippet": { + "text": "\n\t// Gem Vessels\n\tfor (auto affinity : magic_enum::enum_values()) {\n\t\tbool hasGem = msg.getByte();\n\t\tif (!hasGem) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e283c21e9d49cbd8e9a84d6f78521b6e27a24d5c4a67c6c3f5accca26b88a07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1158, + "startColumn": 17, + "charOffset": 39571, + "charLength": 3, + "snippet": { + "text": "msg" + } + }, + "contextRegion": { + "startLine": 1156, + "startColumn": 17, + "charOffset": 39468, + "charLength": 3, + "snippet": { + "text": "\t// Gem Vessels\n\tfor (auto affinity : magic_enum::enum_values()) {\n\t\tbool hasGem = msg.getByte();\n\t\tif (!hasGem) {\n\t\t\tremoveActiveGem(affinity);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa7d362d046c0d260a9ea1ab5f2e4c26ca4a893c5fe6108e895e30cd68d8401c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1163, + "startColumn": 3, + "charOffset": 39652, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 1161, + "startColumn": 3, + "charOffset": 39633, + "charLength": 8, + "snippet": { + "text": "\t\t\tcontinue;\n\t\t}\n\t\tuint16_t gemIndex = msg.get();\n\t\tsetActiveGem(affinity, gemIndex);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d8043ca6fbd3710711dd0e27777a520816de86fdea0e895f174dd88d31793fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1182, + "startColumn": 6, + "charOffset": 40400, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1180, + "startColumn": 6, + "charOffset": 40262, + "charLength": 1, + "snippet": { + "text": "\tDBResult_ptr result = Database::getInstance().storeQuery(resultString);\n\t// Ignore if player not have nothing inserted in the table\n\tif (!result) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71d8a5a4a7412fc4167f14fb138a7276a2434e6b7a6ac8372d882094c51b1a05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-runtime-int", + "ruleIndex": 546, + "kind": "fail", + "level": "warning", + "message": { + "text": "consider replacing 'unsigned long' with 'uint64'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1186, + "startColumn": 2, + "charOffset": 40426, + "charLength": 8, + "snippet": { + "text": "unsigned" + } + }, + "contextRegion": { + "startLine": 1184, + "startColumn": 2, + "charOffset": 40421, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tunsigned long size;\n\tauto attribute = result->getStream(\"slot\", size);\n\tPropStream propStream;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfc5754fd43878f58b6c5b0d602e19bfc9051e39d0f72ebf5bcfd76f7168b6be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'size' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1186, + "startColumn": 16, + "charOffset": 40440, + "charLength": 4, + "snippet": { + "text": "size" + } + }, + "contextRegion": { + "startLine": 1184, + "startColumn": 16, + "charOffset": 40421, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tunsigned long size;\n\tauto attribute = result->getStream(\"slot\", size);\n\tPropStream propStream;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1bdc7fdb4e785e44872c6d728f9451f39fdfeea17a76e31fc3dcdc019da5f979" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto attribute' can be declared as 'const auto *attribute'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1187, + "startColumn": 2, + "charOffset": 40447, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1185, + "startColumn": 2, + "charOffset": 40424, + "charLength": 4, + "snippet": { + "text": "\n\tunsigned long size;\n\tauto attribute = result->getStream(\"slot\", size);\n\tPropStream propStream;\n\tpropStream.init(attribute, size);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f3cc1e217895ae03d1e78af64db7ba3ebc087edd883403cf1dcc8d597428c58" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1190, + "startColumn": 2, + "charOffset": 40557, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1188, + "startColumn": 2, + "charOffset": 40497, + "charLength": 3, + "snippet": { + "text": "\tPropStream propStream;\n\tpropStream.init(attribute, size);\n\tfor (size_t i = 0; i < size; i++) {\n\t\tuint8_t slot;\n\t\tuint16_t points;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6016ce091464b9b498d2cb70f381dce0c89b135333755b44749b2a975bf1551f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'slot' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1191, + "startColumn": 11, + "charOffset": 40603, + "charLength": 4, + "snippet": { + "text": "slot" + } + }, + "contextRegion": { + "startLine": 1189, + "startColumn": 11, + "charOffset": 40521, + "charLength": 4, + "snippet": { + "text": "\tpropStream.init(attribute, size);\n\tfor (size_t i = 0; i < size; i++) {\n\t\tuint8_t slot;\n\t\tuint16_t points;\n\t\tif (propStream.read(slot) && propStream.read(points)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b450e71a4dd820e9fa42f00d39d5e9890ee751b4f70934eba056bf49740fecf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'points' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1192, + "startColumn": 12, + "charOffset": 40620, + "charLength": 6, + "snippet": { + "text": "points" + } + }, + "contextRegion": { + "startLine": 1190, + "startColumn": 12, + "charOffset": 40556, + "charLength": 6, + "snippet": { + "text": "\tfor (size_t i = 0; i < size; i++) {\n\t\tuint8_t slot;\n\t\tuint16_t points;\n\t\tif (propStream.read(slot) && propStream.read(points)) {\n\t\t\tsetPointsBySlotType(slot, points);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f34d52e8e9aed56feefd76a2a2e3592e07b74c793429da56d771659f02893f82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1207, + "startColumn": 2, + "charOffset": 41169, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1205, + "startColumn": 2, + "charOffset": 41106, + "charLength": 3, + "snippet": { + "text": "\tPropWriteStream stream;\n\tconst auto wheelSlots = getSlots();\n\tfor (uint8_t i = 1; i < wheelSlots.size(); ++i) {\n\t\tauto value = wheelSlots[i];\n\t\tif (value == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc2ea1949f6fd0392e28ede34a9f0d7617fb2b05b653a069d4c3868b85f5d1ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-3", + "ruleIndex": 458, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-3: The loop-counter shall not be modified within condition or statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1207, + "startColumn": 2, + "charOffset": 41169, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1205, + "startColumn": 2, + "charOffset": 41106, + "charLength": 3, + "snippet": { + "text": "\tPropWriteStream stream;\n\tconst auto wheelSlots = getSlots();\n\tfor (uint8_t i = 1; i < wheelSlots.size(); ++i) {\n\t\tauto value = wheelSlots[i];\n\t\tif (value == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "615845742a8ea649faae9743b3286f5ef6f9ba0d88414c12d22d86517bf4a496" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-too-small-loop-variable", + "ruleIndex": 107, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable has narrower type 'uint8_t' than iteration's upper bound 'size_type'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1207, + "startColumn": 22, + "charOffset": 41189, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1205, + "startColumn": 22, + "charOffset": 41106, + "charLength": 1, + "snippet": { + "text": "\tPropWriteStream stream;\n\tconst auto wheelSlots = getSlots();\n\tfor (uint8_t i = 1; i < wheelSlots.size(); ++i) {\n\t\tauto value = wheelSlots[i];\n\t\tif (value == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea861ea47a4ab6468d949c1cf8416ced42e8f9e44ca005bf98f9957c0e68dfde" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1208, + "startColumn": 16, + "charOffset": 41234, + "charLength": 10, + "snippet": { + "text": "wheelSlots" + } + }, + "contextRegion": { + "startLine": 1206, + "startColumn": 16, + "charOffset": 41131, + "charLength": 10, + "snippet": { + "text": "\tconst auto wheelSlots = getSlots();\n\tfor (uint8_t i = 1; i < wheelSlots.size(); ++i) {\n\t\tauto value = wheelSlots[i];\n\t\tif (value == 0) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fcb78a1d54dccfe6e9c8a7cec3b39c0fc528a772d44ffc6d68317d3a69a07a19" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'attributesSize' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1218, + "startColumn": 9, + "charOffset": 41452, + "charLength": 14, + "snippet": { + "text": "attributesSize" + } + }, + "contextRegion": { + "startLine": 1216, + "startColumn": 9, + "charOffset": 41440, + "charLength": 14, + "snippet": { + "text": "\t}\n\n\tsize_t attributesSize;\n\tconst char* attributes = stream.getStream(attributesSize);\n\tif (attributesSize > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1596653072947cba2bdd555cef3bf252838f9e9c6b349dedee2a481eba184164" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1221, + "startColumn": 67, + "charOffset": 41621, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1219, + "startColumn": 67, + "charOffset": 41468, + "charLength": 1, + "snippet": { + "text": "\tconst char* attributes = stream.getStream(attributesSize);\n\tif (attributesSize > 0) {\n\t\tquery << m_player.getGUID() << ',' << db.escapeBlob(attributes, (uint32_t)attributesSize);\n\t\tif (!insertWheelData.addRow(query)) {\n\t\t\tg_logger().debug(\"[{}] failed to insert row data\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "893e36b6b331dfc7533c51bc19f5d321f4f05a059e82fbd71a6e27bb901a58a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "51 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1237, + "startColumn": 28, + "charOffset": 42004, + "charLength": 2, + "snippet": { + "text": "51" + } + }, + "contextRegion": { + "startLine": 1235, + "startColumn": 28, + "charOffset": 41929, + "charLength": 2, + "snippet": { + "text": "\nuint16_t PlayerWheel::getExtraPoints() const {\n\tif (m_player.getLevel() < 51) {\n\t\tg_logger().error(\"Character level must be above 50.\");\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52431b8114ba0e8272bac68738f351270f2397d0f27a7ae6656b50d77a65c6d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1243, + "startColumn": 2, + "charOffset": 42110, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1241, + "startColumn": 2, + "charOffset": 42082, + "charLength": 3, + "snippet": { + "text": "\n\tuint16_t totalBonus = 0;\n\tfor (const auto &scroll : WheelOfDestinyPromotionScrolls) {\n\t\tconst auto &scrollKv = m_player.kv()->scoped(\"wheel-of-destiny\")->scoped(\"scrolls\");\n\t\tif (!scrollKv) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f5f654f4b221f8a629b38bbe724fe9733642f5fea530872bbaa9ed27dd19a26" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1245, + "startColumn": 7, + "charOffset": 42263, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1243, + "startColumn": 7, + "charOffset": 42109, + "charLength": 1, + "snippet": { + "text": "\tfor (const auto &scroll : WheelOfDestinyPromotionScrolls) {\n\t\tconst auto &scrollKv = m_player.kv()->scoped(\"wheel-of-destiny\")->scoped(\"scrolls\");\n\t\tif (!scrollKv) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ac3e8f397275d65b6758c22d5fc24a7ecabe7bc9ba88fcf37556e9aa68db85e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1260, + "startColumn": 30, + "charOffset": 42601, + "charLength": 2, + "snippet": { + "text": "0u" + } + }, + "contextRegion": { + "startLine": 1258, + "startColumn": 30, + "charOffset": 42451, + "charLength": 2, + "snippet": { + "text": "uint16_t PlayerWheel::getWheelPoints(bool includeExtraPoints /* = true*/) const {\n\tuint32_t level = m_player.getLevel();\n\tauto totalPoints = std::max(0u, (level - m_minLevelToStartCountPoints)) * m_pointsPerLevel;\n\n\tif (includeExtraPoints) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be93d91e988996083215b1475e7b58f482c6e6740a23c4d2d4a3e53e1e9fd3ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "integer literal has suffix 'u', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1260, + "startColumn": 30, + "charOffset": 42601, + "charLength": 2, + "snippet": { + "text": "0u" + } + }, + "contextRegion": { + "startLine": 1258, + "startColumn": 30, + "charOffset": 42451, + "charLength": 2, + "snippet": { + "text": "uint16_t PlayerWheel::getWheelPoints(bool includeExtraPoints /* = true*/) const {\n\tuint32_t level = m_player.getLevel();\n\tauto totalPoints = std::max(0u, (level - m_minLevelToStartCountPoints)) * m_pointsPerLevel;\n\n\tif (includeExtraPoints) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e01327315cf8b34c23f91c0975fc3c8e5381a24e82d5cab16dae9c22500827d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1267, + "startColumn": 9, + "charOffset": 42780, + "charLength": 11, + "snippet": { + "text": "totalPoints" + } + }, + "contextRegion": { + "startLine": 1265, + "startColumn": 9, + "charOffset": 42768, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\treturn totalPoints;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34f814aaaf4c8bf79f90de651ee8a7c9954660bf1c4b4db37596d583dc1b37dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1277, + "startColumn": 29, + "charOffset": 43042, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 1275, + "startColumn": 29, + "charOffset": 42945, + "charLength": 2, + "snippet": { + "text": "\n\t// Level check, This is hardcoded on the client, cannot be changed\n\tif (m_player.getLevel() <= 50) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "228a69c8222e458a1cd059b94124383ac6f09bcb05178bb148c4a72522414a21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1304, + "startColumn": 3, + "charOffset": 43586, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1302, + "startColumn": 3, + "charOffset": 43444, + "charLength": 3, + "snippet": { + "text": "\t// Check if is in the temple range (we assume the temple is within the range of 10 sqms)\n\tif (m_player.getZoneType() == ZONE_PROTECTION) {\n\t\tfor (auto [townid, town] : g_game().map.towns.getTowns()) {\n\t\t\tif (Position::areInRange<1, 10>(town->getTemplePosition(), m_player.getPosition())) {\n\t\t\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cdd95e8c8bb4b96c84b9b22bd745744cbfce85659b55ef413352cdc944d16295" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1304, + "startColumn": 13, + "charOffset": 43596, + "charLength": 1, + "snippet": { + "text": "[" + } + }, + "contextRegion": { + "startLine": 1302, + "startColumn": 13, + "charOffset": 43444, + "charLength": 1, + "snippet": { + "text": "\t// Check if is in the temple range (we assume the temple is within the range of 10 sqms)\n\tif (m_player.getZoneType() == ZONE_PROTECTION) {\n\t\tfor (auto [townid, town] : g_game().map.towns.getTowns()) {\n\t\t\tif (Position::areInRange<1, 10>(town->getTemplePosition(), m_player.getPosition())) {\n\t\t\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3605b749be861532c5038ba57aaee3cbab8147096d479bcb43f15930de6d84b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1305, + "startColumn": 32, + "charOffset": 43677, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 1303, + "startColumn": 32, + "charOffset": 43534, + "charLength": 2, + "snippet": { + "text": "\tif (m_player.getZoneType() == ZONE_PROTECTION) {\n\t\tfor (auto [townid, town] : g_game().map.towns.getTowns()) {\n\t\t\tif (Position::areInRange<1, 10>(town->getTemplePosition(), m_player.getPosition())) {\n\t\t\t\treturn 1;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "357571cd9b193e4046231a525df962fb8fe3da8bfaef51775d967ac3bde3d691" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1325, + "startColumn": 10, + "charOffset": 44396, + "charLength": 3, + "snippet": { + "text": "50u" + } + }, + "contextRegion": { + "startLine": 1323, + "startColumn": 10, + "charOffset": 44160, + "charLength": 3, + "snippet": { + "text": "uint8_t PlayerWheel::getMaxPointsPerSlot(WheelSlots_t slot) const {\n\tif (slot == WheelSlots_t::SLOT_BLUE_50 || slot == WheelSlots_t::SLOT_RED_50 || slot == WheelSlots_t::SLOT_PURPLE_50 || slot == WheelSlots_t::SLOT_GREEN_50) {\n\t\treturn 50u;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0601740431e5e52c3bdfb8230abb1863319975373f688eadfaa9b8ae522854b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "integer literal has suffix 'u', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1325, + "startColumn": 10, + "charOffset": 44396, + "charLength": 3, + "snippet": { + "text": "50u" + } + }, + "contextRegion": { + "startLine": 1323, + "startColumn": 10, + "charOffset": 44160, + "charLength": 3, + "snippet": { + "text": "uint8_t PlayerWheel::getMaxPointsPerSlot(WheelSlots_t slot) const {\n\tif (slot == WheelSlots_t::SLOT_BLUE_50 || slot == WheelSlots_t::SLOT_RED_50 || slot == WheelSlots_t::SLOT_PURPLE_50 || slot == WheelSlots_t::SLOT_GREEN_50) {\n\t\treturn 50u;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c92f531f577ce03a2022eb966898e182b045eab17f725ffa94002485ef83b83d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50u is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1325, + "startColumn": 10, + "charOffset": 44396, + "charLength": 3, + "snippet": { + "text": "50u" + } + }, + "contextRegion": { + "startLine": 1323, + "startColumn": 10, + "charOffset": 44160, + "charLength": 3, + "snippet": { + "text": "uint8_t PlayerWheel::getMaxPointsPerSlot(WheelSlots_t slot) const {\n\tif (slot == WheelSlots_t::SLOT_BLUE_50 || slot == WheelSlots_t::SLOT_RED_50 || slot == WheelSlots_t::SLOT_PURPLE_50 || slot == WheelSlots_t::SLOT_GREEN_50) {\n\t\treturn 50u;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1ccbcea9a22bb8b1eac6e0365cbfc1c003f76cc633bb3eef6cef5aa73aa2c7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1329, + "startColumn": 10, + "charOffset": 44771, + "charLength": 3, + "snippet": { + "text": "75u" + } + }, + "contextRegion": { + "startLine": 1327, + "startColumn": 10, + "charOffset": 44404, + "charLength": 3, + "snippet": { + "text": "\n\tif (slot == WheelSlots_t::SLOT_GREEN_TOP_75 || slot == WheelSlots_t::SLOT_GREEN_BOTTOM_75 || slot == WheelSlots_t::SLOT_RED_TOP_75 || slot == WheelSlots_t::SLOT_RED_BOTTOM_75 || slot == WheelSlots_t::SLOT_PURPLE_TOP_75 || slot == WheelSlots_t::SLOT_PURPLE_BOTTOM_75 || slot == WheelSlots_t::SLOT_BLUE_TOP_75 || slot == WheelSlots_t::SLOT_BLUE_BOTTOM_75) {\n\t\treturn 75u;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9a53948a20707433a69d5ae84c86bc647d1f9e2d7d3ea1ac0325f5bb6267003" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "integer literal has suffix 'u', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1329, + "startColumn": 10, + "charOffset": 44771, + "charLength": 3, + "snippet": { + "text": "75u" + } + }, + "contextRegion": { + "startLine": 1327, + "startColumn": 10, + "charOffset": 44404, + "charLength": 3, + "snippet": { + "text": "\n\tif (slot == WheelSlots_t::SLOT_GREEN_TOP_75 || slot == WheelSlots_t::SLOT_GREEN_BOTTOM_75 || slot == WheelSlots_t::SLOT_RED_TOP_75 || slot == WheelSlots_t::SLOT_RED_BOTTOM_75 || slot == WheelSlots_t::SLOT_PURPLE_TOP_75 || slot == WheelSlots_t::SLOT_PURPLE_BOTTOM_75 || slot == WheelSlots_t::SLOT_BLUE_TOP_75 || slot == WheelSlots_t::SLOT_BLUE_BOTTOM_75) {\n\t\treturn 75u;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aacbe87b4abefba66d67308030a3aa5bc88242b1f98f5706aab7dd22abfd8514" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "75u is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1329, + "startColumn": 10, + "charOffset": 44771, + "charLength": 3, + "snippet": { + "text": "75u" + } + }, + "contextRegion": { + "startLine": 1327, + "startColumn": 10, + "charOffset": 44404, + "charLength": 3, + "snippet": { + "text": "\n\tif (slot == WheelSlots_t::SLOT_GREEN_TOP_75 || slot == WheelSlots_t::SLOT_GREEN_BOTTOM_75 || slot == WheelSlots_t::SLOT_RED_TOP_75 || slot == WheelSlots_t::SLOT_RED_BOTTOM_75 || slot == WheelSlots_t::SLOT_PURPLE_TOP_75 || slot == WheelSlots_t::SLOT_PURPLE_BOTTOM_75 || slot == WheelSlots_t::SLOT_BLUE_TOP_75 || slot == WheelSlots_t::SLOT_BLUE_BOTTOM_75) {\n\t\treturn 75u;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84ee281eed584fc441939ca03cc72c0880e9c7821971e91a0659c756ebf69cb4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1333, + "startColumn": 10, + "charOffset": 45340, + "charLength": 4, + "snippet": { + "text": "100u" + } + }, + "contextRegion": { + "startLine": 1331, + "startColumn": 10, + "charOffset": 44779, + "charLength": 4, + "snippet": { + "text": "\n\tif (slot == WheelSlots_t::SLOT_GREEN_BOTTOM_100 || slot == WheelSlots_t::SLOT_GREEN_MIDDLE_100 || slot == WheelSlots_t::SLOT_GREEN_TOP_100 || slot == WheelSlots_t::SLOT_RED_BOTTOM_100 || slot == WheelSlots_t::SLOT_RED_MIDDLE_100 || slot == WheelSlots_t::SLOT_RED_TOP_100 || slot == WheelSlots_t::SLOT_PURPLE_BOTTOM_100 || slot == WheelSlots_t::SLOT_PURPLE_MIDDLE_100 || slot == WheelSlots_t::SLOT_PURPLE_TOP_100 || slot == WheelSlots_t::SLOT_BLUE_BOTTOM_100 || slot == WheelSlots_t::SLOT_BLUE_MIDDLE_100 || slot == WheelSlots_t::SLOT_BLUE_TOP_100) {\n\t\treturn 100u;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80c7ef6100cdaf0a4a7be725dc437e73156ce824c576b88c47d8e3cdf53883b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "integer literal has suffix 'u', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1333, + "startColumn": 10, + "charOffset": 45340, + "charLength": 4, + "snippet": { + "text": "100u" + } + }, + "contextRegion": { + "startLine": 1331, + "startColumn": 10, + "charOffset": 44779, + "charLength": 4, + "snippet": { + "text": "\n\tif (slot == WheelSlots_t::SLOT_GREEN_BOTTOM_100 || slot == WheelSlots_t::SLOT_GREEN_MIDDLE_100 || slot == WheelSlots_t::SLOT_GREEN_TOP_100 || slot == WheelSlots_t::SLOT_RED_BOTTOM_100 || slot == WheelSlots_t::SLOT_RED_MIDDLE_100 || slot == WheelSlots_t::SLOT_RED_TOP_100 || slot == WheelSlots_t::SLOT_PURPLE_BOTTOM_100 || slot == WheelSlots_t::SLOT_PURPLE_MIDDLE_100 || slot == WheelSlots_t::SLOT_PURPLE_TOP_100 || slot == WheelSlots_t::SLOT_BLUE_BOTTOM_100 || slot == WheelSlots_t::SLOT_BLUE_MIDDLE_100 || slot == WheelSlots_t::SLOT_BLUE_TOP_100) {\n\t\treturn 100u;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "165d2a93d7fd4b19c7b29fd695722a4750b156570b21f66b8d01af0e0fc0b8af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100u is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1333, + "startColumn": 10, + "charOffset": 45340, + "charLength": 4, + "snippet": { + "text": "100u" + } + }, + "contextRegion": { + "startLine": 1331, + "startColumn": 10, + "charOffset": 44779, + "charLength": 4, + "snippet": { + "text": "\n\tif (slot == WheelSlots_t::SLOT_GREEN_BOTTOM_100 || slot == WheelSlots_t::SLOT_GREEN_MIDDLE_100 || slot == WheelSlots_t::SLOT_GREEN_TOP_100 || slot == WheelSlots_t::SLOT_RED_BOTTOM_100 || slot == WheelSlots_t::SLOT_RED_MIDDLE_100 || slot == WheelSlots_t::SLOT_RED_TOP_100 || slot == WheelSlots_t::SLOT_PURPLE_BOTTOM_100 || slot == WheelSlots_t::SLOT_PURPLE_MIDDLE_100 || slot == WheelSlots_t::SLOT_PURPLE_TOP_100 || slot == WheelSlots_t::SLOT_BLUE_BOTTOM_100 || slot == WheelSlots_t::SLOT_BLUE_MIDDLE_100 || slot == WheelSlots_t::SLOT_BLUE_TOP_100) {\n\t\treturn 100u;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec1f9108464840fb2d3e24eb7c16831705e13105ee4cf526c5e0c5c176bc4851" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1337, + "startColumn": 10, + "charOffset": 45724, + "charLength": 4, + "snippet": { + "text": "150u" + } + }, + "contextRegion": { + "startLine": 1335, + "startColumn": 10, + "charOffset": 45349, + "charLength": 4, + "snippet": { + "text": "\n\tif (slot == WheelSlots_t::SLOT_GREEN_TOP_150 || slot == WheelSlots_t::SLOT_GREEN_BOTTOM_150 || slot == WheelSlots_t::SLOT_RED_TOP_150 || slot == WheelSlots_t::SLOT_RED_BOTTOM_150 || slot == WheelSlots_t::SLOT_PURPLE_TOP_150 || slot == WheelSlots_t::SLOT_PURPLE_BOTTOM_150 || slot == WheelSlots_t::SLOT_BLUE_TOP_150 || slot == WheelSlots_t::SLOT_BLUE_BOTTOM_150) {\n\t\treturn 150u;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b885cc3332b10977b810fd3620f839b9093481e45ec8babb8337f9db1cd39cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "integer literal has suffix 'u', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1337, + "startColumn": 10, + "charOffset": 45724, + "charLength": 4, + "snippet": { + "text": "150u" + } + }, + "contextRegion": { + "startLine": 1335, + "startColumn": 10, + "charOffset": 45349, + "charLength": 4, + "snippet": { + "text": "\n\tif (slot == WheelSlots_t::SLOT_GREEN_TOP_150 || slot == WheelSlots_t::SLOT_GREEN_BOTTOM_150 || slot == WheelSlots_t::SLOT_RED_TOP_150 || slot == WheelSlots_t::SLOT_RED_BOTTOM_150 || slot == WheelSlots_t::SLOT_PURPLE_TOP_150 || slot == WheelSlots_t::SLOT_PURPLE_BOTTOM_150 || slot == WheelSlots_t::SLOT_BLUE_TOP_150 || slot == WheelSlots_t::SLOT_BLUE_BOTTOM_150) {\n\t\treturn 150u;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d08df46913ef19187bf37a04f0bbfba8ac495da7abc8def6ebd419c0140a446" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "150u is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1337, + "startColumn": 10, + "charOffset": 45724, + "charLength": 4, + "snippet": { + "text": "150u" + } + }, + "contextRegion": { + "startLine": 1335, + "startColumn": 10, + "charOffset": 45349, + "charLength": 4, + "snippet": { + "text": "\n\tif (slot == WheelSlots_t::SLOT_GREEN_TOP_150 || slot == WheelSlots_t::SLOT_GREEN_BOTTOM_150 || slot == WheelSlots_t::SLOT_RED_TOP_150 || slot == WheelSlots_t::SLOT_RED_BOTTOM_150 || slot == WheelSlots_t::SLOT_PURPLE_TOP_150 || slot == WheelSlots_t::SLOT_PURPLE_BOTTOM_150 || slot == WheelSlots_t::SLOT_BLUE_TOP_150 || slot == WheelSlots_t::SLOT_BLUE_BOTTOM_150) {\n\t\treturn 150u;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "395d84c5e550cc10c2de3b607e18786f24c50f2d19a765841b1dd5be29189a27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1341, + "startColumn": 10, + "charOffset": 45906, + "charLength": 4, + "snippet": { + "text": "200u" + } + }, + "contextRegion": { + "startLine": 1339, + "startColumn": 10, + "charOffset": 45733, + "charLength": 4, + "snippet": { + "text": "\n\tif (slot == WheelSlots_t::SLOT_GREEN_200 || slot == WheelSlots_t::SLOT_RED_200 || slot == WheelSlots_t::SLOT_PURPLE_200 || slot == WheelSlots_t::SLOT_BLUE_200) {\n\t\treturn 200u;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c36ff59e2379b6c9bdf191f584b4941bac28e1a0ced442df6d4c90193519a350" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "integer literal has suffix 'u', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1341, + "startColumn": 10, + "charOffset": 45906, + "charLength": 4, + "snippet": { + "text": "200u" + } + }, + "contextRegion": { + "startLine": 1339, + "startColumn": 10, + "charOffset": 45733, + "charLength": 4, + "snippet": { + "text": "\n\tif (slot == WheelSlots_t::SLOT_GREEN_200 || slot == WheelSlots_t::SLOT_RED_200 || slot == WheelSlots_t::SLOT_PURPLE_200 || slot == WheelSlots_t::SLOT_BLUE_200) {\n\t\treturn 200u;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7cca5bf3dc42edde9fb30fd0c946d09f7923b65cf8b4cda6fe97f72672906e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200u is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1341, + "startColumn": 10, + "charOffset": 45906, + "charLength": 4, + "snippet": { + "text": "200u" + } + }, + "contextRegion": { + "startLine": 1339, + "startColumn": 10, + "charOffset": 45733, + "charLength": 4, + "snippet": { + "text": "\n\tif (slot == WheelSlots_t::SLOT_GREEN_200 || slot == WheelSlots_t::SLOT_RED_200 || slot == WheelSlots_t::SLOT_PURPLE_200 || slot == WheelSlots_t::SLOT_BLUE_200) {\n\t\treturn 200u;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1c937802e04ba8bf892d1cd61cfd59f5be7618e1e977ca6de73382532276054" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1345, + "startColumn": 9, + "charOffset": 46054, + "charLength": 2, + "snippet": { + "text": "0u" + } + }, + "contextRegion": { + "startLine": 1343, + "startColumn": 9, + "charOffset": 45915, + "charLength": 2, + "snippet": { + "text": "\n\tg_logger().error(\"[{}] player: {}, is trying to use unknown slot: {}\", __FUNCTION__, m_player.getName(), fmt::underlying(slot));\n\treturn 0u;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8485112cece4cbf48845829cf1299efe2920c6dbb4dfbed17f727d3df6a97571" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "integer literal has suffix 'u', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1345, + "startColumn": 9, + "charOffset": 46054, + "charLength": 2, + "snippet": { + "text": "0u" + } + }, + "contextRegion": { + "startLine": 1343, + "startColumn": 9, + "charOffset": 45915, + "charLength": 2, + "snippet": { + "text": "\n\tg_logger().error(\"[{}] player: {}, is trying to use unknown slot: {}\", __FUNCTION__, m_player.getName(), fmt::underlying(slot));\n\treturn 0u;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae397ee03a866ae557d9563e2c8ae6d95d67781d6e153b8bdd62982e6a6044d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1362, + "startColumn": 2, + "charOffset": 46406, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1360, + "startColumn": 2, + "charOffset": 46323, + "charLength": 2, + "snippet": { + "text": "\nvoid PlayerWheel::setPlayerCombatStats(CombatType_t type, int32_t leechAmount) {\n\tif (type == COMBAT_LIFEDRAIN) {\n\t\tif (leechAmount > 0) {\n\t\t\taddStat(WheelStat_t::LIFE_LEECH, leechAmount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb5fb564a65fb2a4673499598c79a3fd4e96e33efc4387cd2d0435995b66665b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1379, + "startColumn": 6, + "charOffset": 46857, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1377, + "startColumn": 6, + "charOffset": 46744, + "charLength": 1, + "snippet": { + "text": "void PlayerWheel::reloadPlayerData() {\n\t// Maybe it's not really necessary, but it doesn't hurt to validate\n\tif (!m_player.getTile()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2035e25e99954638c88924b4f931ef68eede998e317f09b413ecd4605a4a1ccd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'registerPlayerBonusData' has cognitive complexity of 89 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1390, + "startColumn": 19, + "charOffset": 47064, + "charLength": 23, + "snippet": { + "text": "registerPlayerBonusData" + } + }, + "contextRegion": { + "startLine": 1388, + "startColumn": 19, + "charOffset": 47043, + "charLength": 23, + "snippet": { + "text": "}\n\nvoid PlayerWheel::registerPlayerBonusData() {\n\tresetUpgradedSpells();\n\tresetResistance();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79bd2938d17d1e9492c68cfbba40c5982fa870cc26e70f18d6a9e6125070df9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1395, + "startColumn": 6, + "charOffset": 47181, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1393, + "startColumn": 6, + "charOffset": 47136, + "charLength": 1, + "snippet": { + "text": "\tresetStats();\n\tresetRevelationBonus();\n\tif (!m_modifierContext) {\n\t\tm_modifierContext = std::make_unique(*this, static_cast(m_player.getVocation()->getBaseId()));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4aa132ded013cf149400e3a5493c81bcd5963bba1641966117787d42f08554c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1403, + "startColumn": 68, + "charOffset": 47592, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 1401, + "startColumn": 68, + "charOffset": 47403, + "charLength": 3, + "snippet": { + "text": "\taddStat(WheelStat_t::HEALTH, m_playerBonusData.stats.health);\n\taddStat(WheelStat_t::MANA, m_playerBonusData.stats.mana);\n\taddStat(WheelStat_t::CAPACITY, m_playerBonusData.stats.capacity * 100);\n\taddStat(WheelStat_t::MITIGATION, m_playerBonusData.mitigation * 100);\n\taddStat(WheelStat_t::DAMAGE, m_playerBonusData.stats.damage);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b97fc0d6e942d784185fe3372cb05c84dba2b4e7cd255a2778b4008ade3f9cbf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1404, + "startColumn": 35, + "charOffset": 47632, + "charLength": 17, + "snippet": { + "text": "m_playerBonusData" + } + }, + "contextRegion": { + "startLine": 1402, + "startColumn": 35, + "charOffset": 47466, + "charLength": 17, + "snippet": { + "text": "\taddStat(WheelStat_t::MANA, m_playerBonusData.stats.mana);\n\taddStat(WheelStat_t::CAPACITY, m_playerBonusData.stats.capacity * 100);\n\taddStat(WheelStat_t::MITIGATION, m_playerBonusData.mitigation * 100);\n\taddStat(WheelStat_t::DAMAGE, m_playerBonusData.stats.damage);\n\taddStat(WheelStat_t::HEALING, m_playerBonusData.stats.healing);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "762150bd36c319c8f06559848e4f2dc5a63e262d6a5b416987800f588ee61ce8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1404, + "startColumn": 35, + "charOffset": 47632, + "charLength": 17, + "snippet": { + "text": "m_playerBonusData" + } + }, + "contextRegion": { + "startLine": 1402, + "startColumn": 35, + "charOffset": 47466, + "charLength": 17, + "snippet": { + "text": "\taddStat(WheelStat_t::MANA, m_playerBonusData.stats.mana);\n\taddStat(WheelStat_t::CAPACITY, m_playerBonusData.stats.capacity * 100);\n\taddStat(WheelStat_t::MITIGATION, m_playerBonusData.mitigation * 100);\n\taddStat(WheelStat_t::DAMAGE, m_playerBonusData.stats.damage);\n\taddStat(WheelStat_t::HEALING, m_playerBonusData.stats.healing);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6f98514d22bc00939b482dccbeed9a697fdbd73e800bb9eec147b9e809b7f75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1404, + "startColumn": 66, + "charOffset": 47663, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 1402, + "startColumn": 66, + "charOffset": 47466, + "charLength": 3, + "snippet": { + "text": "\taddStat(WheelStat_t::MANA, m_playerBonusData.stats.mana);\n\taddStat(WheelStat_t::CAPACITY, m_playerBonusData.stats.capacity * 100);\n\taddStat(WheelStat_t::MITIGATION, m_playerBonusData.mitigation * 100);\n\taddStat(WheelStat_t::DAMAGE, m_playerBonusData.stats.damage);\n\taddStat(WheelStat_t::HEALING, m_playerBonusData.stats.healing);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11f0fcda0cea75074de113e5449f14909568037b55de59427982accf8395f7c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1410, + "startColumn": 2, + "charOffset": 47881, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1408, + "startColumn": 2, + "charOffset": 47798, + "charLength": 3, + "snippet": { + "text": "\tauto activeGems = getActiveGems();\n\tstd::string playerName = m_player.getName();\n\tfor (const auto &gem : activeGems) {\n\t\tauto count = m_playerBonusData.unlockedVesselResonances[static_cast(gem.affinity)];\n\t\tif (count >= 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17199246be60214aef6c6be9367f80b4586851c965c3c38a216c644d70e5d281" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1411, + "startColumn": 16, + "charOffset": 47933, + "charLength": 17, + "snippet": { + "text": "m_playerBonusData" + } + }, + "contextRegion": { + "startLine": 1409, + "startColumn": 16, + "charOffset": 47834, + "charLength": 17, + "snippet": { + "text": "\tstd::string playerName = m_player.getName();\n\tfor (const auto &gem : activeGems) {\n\t\tauto count = m_playerBonusData.unlockedVesselResonances[static_cast(gem.affinity)];\n\t\tif (count >= 1) {\n\t\t\tstd::string modifierName(magic_enum::enum_name(gem.basicModifier1));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ae40de8cc1a11ef2d35e4fbbf2b4d030c5036f531139d0a5183f86afef48a32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1436, + "startColumn": 41, + "charOffset": 49481, + "charLength": 17, + "snippet": { + "text": "m_playerBonusData" + } + }, + "contextRegion": { + "startLine": 1434, + "startColumn": 41, + "charOffset": 49430, + "charLength": 17, + "snippet": { + "text": "\n\t// Leech\n\tsetPlayerCombatStats(COMBAT_LIFEDRAIN, m_playerBonusData.leech.lifeLeech * 100);\n\tsetPlayerCombatStats(COMBAT_MANADRAIN, m_playerBonusData.leech.manaLeech * 100);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2b740b25d2ccbca57975a5cb12f3b5c4e9f405af239b582d6f5f25672e6a067" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1436, + "startColumn": 41, + "charOffset": 49481, + "charLength": 17, + "snippet": { + "text": "m_playerBonusData" + } + }, + "contextRegion": { + "startLine": 1434, + "startColumn": 41, + "charOffset": 49430, + "charLength": 17, + "snippet": { + "text": "\n\t// Leech\n\tsetPlayerCombatStats(COMBAT_LIFEDRAIN, m_playerBonusData.leech.lifeLeech * 100);\n\tsetPlayerCombatStats(COMBAT_MANADRAIN, m_playerBonusData.leech.manaLeech * 100);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b01232b03ab15cb7b17ccb6873aa6f5200b43ffb20b57f1a89e93afe531ed6c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1436, + "startColumn": 77, + "charOffset": 49517, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 1434, + "startColumn": 77, + "charOffset": 49430, + "charLength": 3, + "snippet": { + "text": "\n\t// Leech\n\tsetPlayerCombatStats(COMBAT_LIFEDRAIN, m_playerBonusData.leech.lifeLeech * 100);\n\tsetPlayerCombatStats(COMBAT_MANADRAIN, m_playerBonusData.leech.manaLeech * 100);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c6e6b38a1f9a8c6268340adb1bb739e945425e146fc45f8423d5c7e43a3fb53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1437, + "startColumn": 41, + "charOffset": 49563, + "charLength": 17, + "snippet": { + "text": "m_playerBonusData" + } + }, + "contextRegion": { + "startLine": 1435, + "startColumn": 41, + "charOffset": 49431, + "charLength": 17, + "snippet": { + "text": "\t// Leech\n\tsetPlayerCombatStats(COMBAT_LIFEDRAIN, m_playerBonusData.leech.lifeLeech * 100);\n\tsetPlayerCombatStats(COMBAT_MANADRAIN, m_playerBonusData.leech.manaLeech * 100);\n\n\t// Instant" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13c551db054bd9c88671f5a8072e0bb5d9e53d4307e88dbcbb7765b4e50b6b1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1437, + "startColumn": 41, + "charOffset": 49563, + "charLength": 17, + "snippet": { + "text": "m_playerBonusData" + } + }, + "contextRegion": { + "startLine": 1435, + "startColumn": 41, + "charOffset": 49431, + "charLength": 17, + "snippet": { + "text": "\t// Leech\n\tsetPlayerCombatStats(COMBAT_LIFEDRAIN, m_playerBonusData.leech.lifeLeech * 100);\n\tsetPlayerCombatStats(COMBAT_MANADRAIN, m_playerBonusData.leech.manaLeech * 100);\n\n\t// Instant" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82ade7c573eeac614ee0f226d329983c4e78b5ec31bfa1ac10daae8e60b61e46" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1437, + "startColumn": 77, + "charOffset": 49599, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 1435, + "startColumn": 77, + "charOffset": 49431, + "charLength": 3, + "snippet": { + "text": "\t// Leech\n\tsetPlayerCombatStats(COMBAT_LIFEDRAIN, m_playerBonusData.leech.lifeLeech * 100);\n\tsetPlayerCombatStats(COMBAT_MANADRAIN, m_playerBonusData.leech.manaLeech * 100);\n\n\t// Instant" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e4fe2f97cffe6d7baf873be1511614870eebdcc4c8d0fd4cdf664cd8cb59cd8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1450, + "startColumn": 3, + "charOffset": 50241, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1448, + "startColumn": 3, + "charOffset": 50164, + "charLength": 3, + "snippet": { + "text": "\t// Stages (Revelation)\n\tif (m_playerBonusData.stages.combatMastery > 0) {\n\t\tfor (int i = 0; i < m_playerBonusData.stages.combatMastery; ++i) {\n\t\t\tsetSpellInstant(\"Combat Mastery\", true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f8d74695680a1c0e83a70825ba26c604de58927e2f5c2884f64ba6dadbaf4e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to member reference to 'combatMastery' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1450, + "startColumn": 19, + "charOffset": 50257, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1448, + "startColumn": 19, + "charOffset": 50164, + "charLength": 1, + "snippet": { + "text": "\t// Stages (Revelation)\n\tif (m_playerBonusData.stages.combatMastery > 0) {\n\t\tfor (int i = 0; i < m_playerBonusData.stages.combatMastery; ++i) {\n\t\t\tsetSpellInstant(\"Combat Mastery\", true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f0d7e7c617dbed8c6fd3667452700c3035d91071b5acf531e378d15c4e50ec3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1458, + "startColumn": 3, + "charOffset": 50464, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1456, + "startColumn": 3, + "charOffset": 50413, + "charLength": 3, + "snippet": { + "text": "\n\tif (m_playerBonusData.stages.giftOfLife > 0) {\n\t\tfor (int i = 0; i < m_playerBonusData.stages.giftOfLife; ++i) {\n\t\t\tsetSpellInstant(\"Gift of Life\", true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "637dde13e0316979fffe7079bf7f998b8c75ec7fe0360e543e0cd3118ecee96a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to member reference to 'giftOfLife' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1458, + "startColumn": 19, + "charOffset": 50480, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1456, + "startColumn": 19, + "charOffset": 50413, + "charLength": 1, + "snippet": { + "text": "\n\tif (m_playerBonusData.stages.giftOfLife > 0) {\n\t\tfor (int i = 0; i < m_playerBonusData.stages.giftOfLife; ++i) {\n\t\t\tsetSpellInstant(\"Gift of Life\", true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3a6e88a4805c2d72926f64037f85bacde515f7f11e7bf5af2e9c8c3e30c3070" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1466, + "startColumn": 3, + "charOffset": 50688, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1464, + "startColumn": 3, + "charOffset": 50629, + "charLength": 3, + "snippet": { + "text": "\n\tif (m_playerBonusData.stages.blessingOfTheGrove > 0) {\n\t\tfor (int i = 0; i < m_playerBonusData.stages.blessingOfTheGrove; ++i) {\n\t\t\tsetSpellInstant(\"Blessing of the Grove\", true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a208a896b83022095cf54c0e5c9cac635cea57b908f0e7728eaa9aa1bbffaaf7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to member reference to 'blessingOfTheGrove' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1466, + "startColumn": 19, + "charOffset": 50704, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1464, + "startColumn": 19, + "charOffset": 50629, + "charLength": 1, + "snippet": { + "text": "\n\tif (m_playerBonusData.stages.blessingOfTheGrove > 0) {\n\t\tfor (int i = 0; i < m_playerBonusData.stages.blessingOfTheGrove; ++i) {\n\t\t\tsetSpellInstant(\"Blessing of the Grove\", true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8cbcdda7b588cc3b45ff205ef3ede579257f09ba25a5bed15093d2ab0cf873cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1474, + "startColumn": 3, + "charOffset": 50937, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1472, + "startColumn": 3, + "charOffset": 50879, + "charLength": 3, + "snippet": { + "text": "\n\tif (m_playerBonusData.stages.divineEmpowerment > 0) {\n\t\tfor (int i = 0; i < m_playerBonusData.stages.divineEmpowerment; ++i) {\n\t\t\tsetSpellInstant(\"Divine Empowerment\", true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e7d5999964adfa7e1e803f37c6c9087a73ea0c349fc3cb2b2590ea61e4b0fcc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to member reference to 'divineEmpowerment' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1474, + "startColumn": 19, + "charOffset": 50953, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1472, + "startColumn": 19, + "charOffset": 50879, + "charLength": 1, + "snippet": { + "text": "\n\tif (m_playerBonusData.stages.divineEmpowerment > 0) {\n\t\tfor (int i = 0; i < m_playerBonusData.stages.divineEmpowerment; ++i) {\n\t\t\tsetSpellInstant(\"Divine Empowerment\", true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0cbf8f202a90143f103fa2118317e5316b55f9f86ea491ff2059bfb89d5d1c33" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "4000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1479, + "startColumn": 30, + "charOffset": 51175, + "charLength": 4, + "snippet": { + "text": "4000" + } + }, + "contextRegion": { + "startLine": 1477, + "startColumn": 30, + "charOffset": 51060, + "charLength": 4, + "snippet": { + "text": "\t\tif (m_playerBonusData.stages.divineEmpowerment >= 2) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 4000;\n\t\t\taddSpellBonus(\"Divine Empowerment\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "160cd51e34fe8ee30eb00f16a86e95fbe4c4da6551593ca4c738f95a386c6cbb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "4000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1484, + "startColumn": 30, + "charOffset": 51347, + "charLength": 4, + "snippet": { + "text": "4000" + } + }, + "contextRegion": { + "startLine": 1482, + "startColumn": 30, + "charOffset": 51232, + "charLength": 4, + "snippet": { + "text": "\t\tif (m_playerBonusData.stages.divineEmpowerment >= 3) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 4000;\n\t\t\taddSpellBonus(\"Divine Empowerment\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28802fd3ef13606356b99728fa56e8be491ea0db41709d5628f914819440e9ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1492, + "startColumn": 3, + "charOffset": 51519, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1490, + "startColumn": 3, + "charOffset": 51465, + "charLength": 3, + "snippet": { + "text": "\n\tif (m_playerBonusData.stages.divineGrenade > 0) {\n\t\tfor (int i = 0; i < m_playerBonusData.stages.divineGrenade; ++i) {\n\t\t\tsetSpellInstant(\"Divine Grenade\", true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "013c376f85cd35f6603519b7588bac6e3bf6754559b8654d3a644d9e44285f9a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to member reference to 'divineGrenade' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1492, + "startColumn": 19, + "charOffset": 51535, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1490, + "startColumn": 19, + "charOffset": 51465, + "charLength": 1, + "snippet": { + "text": "\n\tif (m_playerBonusData.stages.divineGrenade > 0) {\n\t\tfor (int i = 0; i < m_playerBonusData.stages.divineGrenade; ++i) {\n\t\t\tsetSpellInstant(\"Divine Grenade\", true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0320728edbf0887df026c216bf73c7a8b2353d938d1299261792987a78dbd6c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "4000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1497, + "startColumn": 30, + "charOffset": 51745, + "charLength": 4, + "snippet": { + "text": "4000" + } + }, + "contextRegion": { + "startLine": 1495, + "startColumn": 30, + "charOffset": 51634, + "charLength": 4, + "snippet": { + "text": "\t\tif (m_playerBonusData.stages.divineGrenade >= 2) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 4000;\n\t\t\taddSpellBonus(\"Divine Grenade\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a359c407329d7401b43d9a18ba817a1942f4f8bc4cf2ebda12fd2f6ebfbb198f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1502, + "startColumn": 30, + "charOffset": 51909, + "charLength": 4, + "snippet": { + "text": "6000" + } + }, + "contextRegion": { + "startLine": 1500, + "startColumn": 30, + "charOffset": 51798, + "charLength": 4, + "snippet": { + "text": "\t\tif (m_playerBonusData.stages.divineGrenade >= 3) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 6000;\n\t\t\taddSpellBonus(\"Divine Grenade\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2213f9a20afb6cb4aa53a280edadf1216bd64fd71c9dd15614779c5db955043" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1510, + "startColumn": 3, + "charOffset": 52069, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1508, + "startColumn": 3, + "charOffset": 52019, + "charLength": 3, + "snippet": { + "text": "\n\tif (m_playerBonusData.stages.drainBody > 0) {\n\t\tfor (int i = 0; i < m_playerBonusData.stages.drainBody; ++i) {\n\t\t\tsetSpellInstant(\"Drain Body\", true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa217510938258574175a5f0fe64397d18f86d4084cb08b9af208827383950b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to member reference to 'drainBody' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1510, + "startColumn": 19, + "charOffset": 52085, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1508, + "startColumn": 19, + "charOffset": 52019, + "charLength": 1, + "snippet": { + "text": "\n\tif (m_playerBonusData.stages.drainBody > 0) {\n\t\tfor (int i = 0; i < m_playerBonusData.stages.drainBody; ++i) {\n\t\t\tsetSpellInstant(\"Drain Body\", true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e2f05ddcf6e14e2b40e23a8e357228794f21ee9596abc8f78b5e125d75e910f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1517, + "startColumn": 3, + "charOffset": 52280, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1515, + "startColumn": 3, + "charOffset": 52226, + "charLength": 3, + "snippet": { + "text": "\t}\n\tif (m_playerBonusData.stages.beamMastery > 0) {\n\t\tfor (int i = 0; i < m_playerBonusData.stages.beamMastery; ++i) {\n\t\t\tsetSpellInstant(\"Beam Mastery\", true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e688709c438dff3a42b591eb117f9ae92ac0e017f6fb6058dd934eb4f867f685" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to member reference to 'beamMastery' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1517, + "startColumn": 19, + "charOffset": 52296, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1515, + "startColumn": 19, + "charOffset": 52226, + "charLength": 1, + "snippet": { + "text": "\t}\n\tif (m_playerBonusData.stages.beamMastery > 0) {\n\t\tfor (int i = 0; i < m_playerBonusData.stages.beamMastery; ++i) {\n\t\t\tsetSpellInstant(\"Beam Mastery\", true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e75f7dae85f5568d1533dfb41dfcea3432eaaea83d19be2e0d918587a3d12cad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1525, + "startColumn": 3, + "charOffset": 52496, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1523, + "startColumn": 3, + "charOffset": 52446, + "charLength": 3, + "snippet": { + "text": "\n\tif (m_playerBonusData.stages.twinBurst > 0) {\n\t\tfor (int i = 0; i < m_playerBonusData.stages.twinBurst; ++i) {\n\t\t\tsetSpellInstant(\"Twin Burst\", true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d903e6d8583dae78c9e66abe4aa61945f3dcdc95ec6a4f8833f3ae7de7414c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to member reference to 'twinBurst' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1525, + "startColumn": 19, + "charOffset": 52512, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1523, + "startColumn": 19, + "charOffset": 52446, + "charLength": 1, + "snippet": { + "text": "\n\tif (m_playerBonusData.stages.twinBurst > 0) {\n\t\tfor (int i = 0; i < m_playerBonusData.stages.twinBurst; ++i) {\n\t\t\tsetSpellInstant(\"Twin Burst\", true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32afe362e3938227a6c6cdd6f5e0d5d09b2b2ec03da48a77ce30ee0537873a59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1533, + "startColumn": 3, + "charOffset": 52714, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1531, + "startColumn": 3, + "charOffset": 52656, + "charLength": 3, + "snippet": { + "text": "\n\tif (m_playerBonusData.stages.executionersThrow > 0) {\n\t\tfor (int i = 0; i < m_playerBonusData.stages.executionersThrow; ++i) {\n\t\t\tsetSpellInstant(\"Executioner's Throw\", true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f4076516c89bf8c54759492456e6f422c02ca93d47e1ba77fa54316fd539032" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to member reference to 'executionersThrow' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1533, + "startColumn": 19, + "charOffset": 52730, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1531, + "startColumn": 19, + "charOffset": 52656, + "charLength": 1, + "snippet": { + "text": "\n\tif (m_playerBonusData.stages.executionersThrow > 0) {\n\t\tfor (int i = 0; i < m_playerBonusData.stages.executionersThrow; ++i) {\n\t\t\tsetSpellInstant(\"Executioner's Throw\", true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3f07231c65ad97dd7c203a0497f7419217aff3971ddd09b5701ea16209c1234" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1542, + "startColumn": 3, + "charOffset": 52957, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1540, + "startColumn": 3, + "charOffset": 52901, + "charLength": 3, + "snippet": { + "text": "\t// Avatar\n\tif (m_playerBonusData.avatar.light > 0) {\n\t\tfor (int i = 0; i < m_playerBonusData.avatar.light; ++i) {\n\t\t\tsetSpellInstant(\"Avatar of Light\", true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "520633d172c737dbcf17e424280736d74f41f4e73ec4e79fac0c8ffcec05b959" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to member reference to 'light' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1542, + "startColumn": 19, + "charOffset": 52973, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1540, + "startColumn": 19, + "charOffset": 52901, + "charLength": 1, + "snippet": { + "text": "\t// Avatar\n\tif (m_playerBonusData.avatar.light > 0) {\n\t\tfor (int i = 0; i < m_playerBonusData.avatar.light; ++i) {\n\t\t\tsetSpellInstant(\"Avatar of Light\", true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75d033ce968deca018451e767fac4315772f4cd729db4aceb2ac7c09d52463b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1547, + "startColumn": 30, + "charOffset": 53168, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 1545, + "startColumn": 30, + "charOffset": 53065, + "charLength": 2, + "snippet": { + "text": "\t\tif (m_playerBonusData.avatar.light >= 2) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes\n\t\t\taddSpellBonus(\"Avatar of Light\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "787037a3527cb01005549f125837285a85895b7fc243732d728d0f43de8910d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1547, + "startColumn": 35, + "charOffset": 53173, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 1545, + "startColumn": 35, + "charOffset": 53065, + "charLength": 2, + "snippet": { + "text": "\t\tif (m_playerBonusData.avatar.light >= 2) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes\n\t\t\taddSpellBonus(\"Avatar of Light\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "842c5b656b0b4ec2493ba2e3e40d8c9305b5ef4849ba73195179f759646a1108" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1547, + "startColumn": 40, + "charOffset": 53178, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 1545, + "startColumn": 40, + "charOffset": 53065, + "charLength": 4, + "snippet": { + "text": "\t\tif (m_playerBonusData.avatar.light >= 2) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes\n\t\t\taddSpellBonus(\"Avatar of Light\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db56f3e3d59f173a472361149fb1aeab3484f7c1df51212e8faad9edcd24640a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1552, + "startColumn": 30, + "charOffset": 53349, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 1550, + "startColumn": 30, + "charOffset": 53246, + "charLength": 2, + "snippet": { + "text": "\t\tif (m_playerBonusData.avatar.light >= 3) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes\n\t\t\taddSpellBonus(\"Avatar of Light\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62f45f74b6b0d28d90acf3bff26405bcb6e25d64983828b5430d7db3faf7c863" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1552, + "startColumn": 35, + "charOffset": 53354, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 1550, + "startColumn": 35, + "charOffset": 53246, + "charLength": 2, + "snippet": { + "text": "\t\tif (m_playerBonusData.avatar.light >= 3) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes\n\t\t\taddSpellBonus(\"Avatar of Light\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d644c1a6535707449ce3e18733603e8309014436ff1e532db41263fb6fc5c51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1552, + "startColumn": 40, + "charOffset": 53359, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 1550, + "startColumn": 40, + "charOffset": 53246, + "charLength": 4, + "snippet": { + "text": "\t\tif (m_playerBonusData.avatar.light >= 3) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes\n\t\t\taddSpellBonus(\"Avatar of Light\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6808cf4eda1235c1b9d7ba233588adc50825299fa329706c6160c49be87860ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1560, + "startColumn": 3, + "charOffset": 53532, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1558, + "startColumn": 3, + "charOffset": 53485, + "charLength": 3, + "snippet": { + "text": "\n\tif (m_playerBonusData.avatar.nature > 0) {\n\t\tfor (int i = 0; i < m_playerBonusData.avatar.nature; ++i) {\n\t\t\tsetSpellInstant(\"Avatar of Nature\", true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c276fa2ba8c9c80aaa82eae2735cb01c0460d207772fc6215ba3e4201a6a26c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to member reference to 'nature' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1560, + "startColumn": 19, + "charOffset": 53548, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1558, + "startColumn": 19, + "charOffset": 53485, + "charLength": 1, + "snippet": { + "text": "\n\tif (m_playerBonusData.avatar.nature > 0) {\n\t\tfor (int i = 0; i < m_playerBonusData.avatar.nature; ++i) {\n\t\t\tsetSpellInstant(\"Avatar of Nature\", true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9675f741fc69089e75182977e4f1c92414f874c1f6eab57dbe3c953b0ff54ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1565, + "startColumn": 30, + "charOffset": 53746, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 1563, + "startColumn": 30, + "charOffset": 53642, + "charLength": 2, + "snippet": { + "text": "\t\tif (m_playerBonusData.avatar.nature >= 2) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes\n\t\t\taddSpellBonus(\"Avatar of Nature\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c72c0bf0cf020de0cf51af3a63dee89ce426a7fbbc6468d17dc3cbefc179ddfe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1565, + "startColumn": 35, + "charOffset": 53751, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 1563, + "startColumn": 35, + "charOffset": 53642, + "charLength": 2, + "snippet": { + "text": "\t\tif (m_playerBonusData.avatar.nature >= 2) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes\n\t\t\taddSpellBonus(\"Avatar of Nature\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d1c340798a59907a30c119c788df7c6f8e3c12125ebee16600dc40b04ad4e8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1565, + "startColumn": 40, + "charOffset": 53756, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 1563, + "startColumn": 40, + "charOffset": 53642, + "charLength": 4, + "snippet": { + "text": "\t\tif (m_playerBonusData.avatar.nature >= 2) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes\n\t\t\taddSpellBonus(\"Avatar of Nature\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc8cc3331c56749074f7ca90416dde54cf3645a17e890334fba0ad7f7af438a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1570, + "startColumn": 30, + "charOffset": 53929, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 1568, + "startColumn": 30, + "charOffset": 53825, + "charLength": 2, + "snippet": { + "text": "\t\tif (m_playerBonusData.avatar.nature >= 3) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes\n\t\t\taddSpellBonus(\"Avatar of Nature\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b17cb9d611d31d0ea2307cf638c8988291b646d466169bad1b35f61def4b83c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1570, + "startColumn": 35, + "charOffset": 53934, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 1568, + "startColumn": 35, + "charOffset": 53825, + "charLength": 2, + "snippet": { + "text": "\t\tif (m_playerBonusData.avatar.nature >= 3) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes\n\t\t\taddSpellBonus(\"Avatar of Nature\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11063b125908671a606202889ef03f63587fcffd47173c461d229acab2605068" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1570, + "startColumn": 40, + "charOffset": 53939, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 1568, + "startColumn": 40, + "charOffset": 53825, + "charLength": 4, + "snippet": { + "text": "\t\tif (m_playerBonusData.avatar.nature >= 3) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes\n\t\t\taddSpellBonus(\"Avatar of Nature\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c42c9206aef21c4fbe0176bbd95bf6028b76fd8991c4d140e454ffb64d1dece9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1578, + "startColumn": 3, + "charOffset": 54113, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1576, + "startColumn": 3, + "charOffset": 54067, + "charLength": 3, + "snippet": { + "text": "\n\tif (m_playerBonusData.avatar.steel > 0) {\n\t\tfor (int i = 0; i < m_playerBonusData.avatar.steel; ++i) {\n\t\t\tsetSpellInstant(\"Avatar of Steel\", true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5c0510d017415cb5af1ec54a84c13efd39b131ab360eea414a867a16344d23e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to member reference to 'steel' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1578, + "startColumn": 19, + "charOffset": 54129, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1576, + "startColumn": 19, + "charOffset": 54067, + "charLength": 1, + "snippet": { + "text": "\n\tif (m_playerBonusData.avatar.steel > 0) {\n\t\tfor (int i = 0; i < m_playerBonusData.avatar.steel; ++i) {\n\t\t\tsetSpellInstant(\"Avatar of Steel\", true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a259ec24f2fe8166a1695fe368dcfb0e3519dfdfd36f88a32658cdd1d6633b0f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1583, + "startColumn": 30, + "charOffset": 54324, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 1581, + "startColumn": 30, + "charOffset": 54221, + "charLength": 2, + "snippet": { + "text": "\t\tif (m_playerBonusData.avatar.steel >= 2) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes\n\t\t\taddSpellBonus(\"Avatar of Steel\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8786233b21a9ad608284a8c96b9327a508136ece2a05bae6604995d2d7a3018a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1583, + "startColumn": 35, + "charOffset": 54329, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 1581, + "startColumn": 35, + "charOffset": 54221, + "charLength": 2, + "snippet": { + "text": "\t\tif (m_playerBonusData.avatar.steel >= 2) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes\n\t\t\taddSpellBonus(\"Avatar of Steel\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4800782038d197937fb6a67e29d166806fe952d39d732522c6bbba840ea5a528" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1583, + "startColumn": 40, + "charOffset": 54334, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 1581, + "startColumn": 40, + "charOffset": 54221, + "charLength": 4, + "snippet": { + "text": "\t\tif (m_playerBonusData.avatar.steel >= 2) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes\n\t\t\taddSpellBonus(\"Avatar of Steel\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f1b0670cef82b476272e0fcf8ed04bdf68575a48c728d32c773117fddf65c06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1588, + "startColumn": 30, + "charOffset": 54505, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 1586, + "startColumn": 30, + "charOffset": 54402, + "charLength": 2, + "snippet": { + "text": "\t\tif (m_playerBonusData.avatar.steel >= 3) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes\n\t\t\taddSpellBonus(\"Avatar of Steel\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1728c03c55e28dcccbc416b2e61c44188f7618475580b2984eaeb039c31c9395" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1588, + "startColumn": 35, + "charOffset": 54510, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 1586, + "startColumn": 35, + "charOffset": 54402, + "charLength": 2, + "snippet": { + "text": "\t\tif (m_playerBonusData.avatar.steel >= 3) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes\n\t\t\taddSpellBonus(\"Avatar of Steel\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69ae18f284185470fea70770b3d1d81bd0f7acd875a71f12241382e43b102952" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1588, + "startColumn": 40, + "charOffset": 54515, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 1586, + "startColumn": 40, + "charOffset": 54402, + "charLength": 4, + "snippet": { + "text": "\t\tif (m_playerBonusData.avatar.steel >= 3) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes\n\t\t\taddSpellBonus(\"Avatar of Steel\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9b68d92c06dd23ce70886638c8a96e5f542ddde55c42544c66c34f1af858280" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1596, + "startColumn": 3, + "charOffset": 54687, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1594, + "startColumn": 3, + "charOffset": 54641, + "charLength": 3, + "snippet": { + "text": "\n\tif (m_playerBonusData.avatar.storm > 0) {\n\t\tfor (int i = 0; i < m_playerBonusData.avatar.storm; ++i) {\n\t\t\tsetSpellInstant(\"Avatar of Storm\", true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "439ffad8a862b77abe83c038b81b9e100de3870b3ba61d99aadbcca7cb68eb96" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to member reference to 'storm' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1596, + "startColumn": 19, + "charOffset": 54703, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1594, + "startColumn": 19, + "charOffset": 54641, + "charLength": 1, + "snippet": { + "text": "\n\tif (m_playerBonusData.avatar.storm > 0) {\n\t\tfor (int i = 0; i < m_playerBonusData.avatar.storm; ++i) {\n\t\t\tsetSpellInstant(\"Avatar of Storm\", true);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14470c563957dc0c7a6252c30c6c5dcdad7660068da56054cb013d92daff7b7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1601, + "startColumn": 30, + "charOffset": 54898, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 1599, + "startColumn": 30, + "charOffset": 54795, + "charLength": 2, + "snippet": { + "text": "\t\tif (m_playerBonusData.avatar.storm >= 2) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes\n\t\t\taddSpellBonus(\"Avatar of Storm\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1aaf2e87dfb6268dc5096c227be8622a11d7e7c84b12b618cd556bc7b1cbf2d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1601, + "startColumn": 35, + "charOffset": 54903, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 1599, + "startColumn": 35, + "charOffset": 54795, + "charLength": 2, + "snippet": { + "text": "\t\tif (m_playerBonusData.avatar.storm >= 2) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes\n\t\t\taddSpellBonus(\"Avatar of Storm\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "294e0e948eca0381398bfeac6b725331da419a0a5d20e418cb7dbfed86ea2868" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1601, + "startColumn": 40, + "charOffset": 54908, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 1599, + "startColumn": 40, + "charOffset": 54795, + "charLength": 4, + "snippet": { + "text": "\t\tif (m_playerBonusData.avatar.storm >= 2) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes\n\t\t\taddSpellBonus(\"Avatar of Storm\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47d97b679063d0cbb51eb739701e235e271d6a6940af79ac9c397af5b2d3f2c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1606, + "startColumn": 30, + "charOffset": 55079, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 1604, + "startColumn": 30, + "charOffset": 54976, + "charLength": 2, + "snippet": { + "text": "\t\tif (m_playerBonusData.avatar.storm >= 3) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes\n\t\t\taddSpellBonus(\"Avatar of Storm\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74878241c7b9fc82c43db998de8e1e0291a8ca74a86f5e68bdaa76224d627814" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1606, + "startColumn": 35, + "charOffset": 55084, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 1604, + "startColumn": 35, + "charOffset": 54976, + "charLength": 2, + "snippet": { + "text": "\t\tif (m_playerBonusData.avatar.storm >= 3) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes\n\t\t\taddSpellBonus(\"Avatar of Storm\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e04d4aaf9936afcc7a5d9f978391ae9600eeb254865f906ac260cdf2df5def83" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1606, + "startColumn": 40, + "charOffset": 55089, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 1604, + "startColumn": 40, + "charOffset": 54976, + "charLength": 4, + "snippet": { + "text": "\t\tif (m_playerBonusData.avatar.storm >= 3) {\n\t\t\tWheelSpells::Bonus bonus;\n\t\t\tbonus.decrease.cooldown = 30 * 60 * 1000; // 30 minutes\n\t\t\taddSpellBonus(\"Avatar of Storm\", bonus);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e69455de6b7faf9a7d9fb6fba15afc0e1654e39817c3dcf7983311ffd368b64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1613, + "startColumn": 2, + "charOffset": 55217, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1611, + "startColumn": 2, + "charOffset": 55212, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &spell : m_playerBonusData.spells) {\n\t\tupgradeSpell(spell);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cff7307e436b8c26d23c74001fd4dee77d6e1400a2376627b98e7594999112a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1623, + "startColumn": 24, + "charOffset": 55566, + "charLength": 8, + "snippet": { + "text": "m_player" + } + }, + "contextRegion": { + "startLine": 1621, + "startColumn": 24, + "charOffset": 55491, + "charLength": 8, + "snippet": { + "text": "\n\tif (m_player.getMana() > m_player.getMaxMana()) {\n\t\tint32_t difference = m_player.getMana() - m_player.getMaxMana();\n\t\tm_player.changeMana(-difference);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a14848c7621727ba45af1b12b7d27af4b846ba8581c66098b5dec3e5cd8a1212" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'printPlayerWheelMethodsBonusData' has cognitive complexity of 37 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1645, + "startColumn": 19, + "charOffset": 56064, + "charLength": 32, + "snippet": { + "text": "printPlayerWheelMethodsBonusData" + } + }, + "contextRegion": { + "startLine": 1643, + "startColumn": 19, + "charOffset": 56043, + "charLength": 32, + "snippet": { + "text": "}\n\nvoid PlayerWheel::printPlayerWheelMethodsBonusData(const PlayerWheelMethodsBonusData &bonusData) const {\n\tg_logger().debug(\"Initializing print of WhelPlayerBonusData informations for player {}\", m_player.getName());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3795fe4ac745f2171fb93160da19a73174085f5925b15cbd3190fffd2e1d965c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1666, + "startColumn": 2, + "charOffset": 56827, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1664, + "startColumn": 2, + "charOffset": 56785, + "charLength": 3, + "snippet": { + "text": "\n\tg_logger().debug(\"Vessel Resonance:\");\n\tfor (size_t i = 0; i < bonusData.unlockedVesselResonances.size(); ++i) {\n\t\tauto count = bonusData.unlockedVesselResonances[i];\n\t\tif (count == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9198b50081c0f0fb93175176ed6e2ffc6a66f7aaf5b91b1546def0a11decc03a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1667, + "startColumn": 16, + "charOffset": 56915, + "charLength": 9, + "snippet": { + "text": "bonusData" + } + }, + "contextRegion": { + "startLine": 1665, + "startColumn": 16, + "charOffset": 56786, + "charLength": 9, + "snippet": { + "text": "\tg_logger().debug(\"Vessel Resonance:\");\n\tfor (size_t i = 0; i < bonusData.unlockedVesselResonances.size(); ++i) {\n\t\tauto count = bonusData.unlockedVesselResonances[i];\n\t\tif (count == 0) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ced57d9821724877ad7eb570d9887d186b027bbcfd9752bd844a6c96378ff90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1672, + "startColumn": 3, + "charOffset": 56994, + "charLength": 18, + "snippet": { + "text": "WheelGemAffinity_t" + } + }, + "contextRegion": { + "startLine": 1670, + "startColumn": 3, + "charOffset": 56987, + "charLength": 18, + "snippet": { + "text": "\t\t}\n\n\t\tWheelGemAffinity_t affinity = static_cast(i);\n\t\tstd::string affinityName(magic_enum::enum_name(affinity));\n\t\tg_logger().debug(\" Affinity: {} count: {}\", affinityName, bonusData.unlockedVesselResonances[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ba7833abb7269b9bfbcc2da51e022fff8a3563e3e33e23ee7872cc13b9fda21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1674, + "startColumn": 62, + "charOffset": 57182, + "charLength": 9, + "snippet": { + "text": "bonusData" + } + }, + "contextRegion": { + "startLine": 1672, + "startColumn": 62, + "charOffset": 56992, + "charLength": 9, + "snippet": { + "text": "\t\tWheelGemAffinity_t affinity = static_cast(i);\n\t\tstd::string affinityName(magic_enum::enum_name(affinity));\n\t\tg_logger().debug(\" Affinity: {} count: {}\", affinityName, bonusData.unlockedVesselResonances[i]);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97c70a8606d6d9b3d93e6023977a5c4c3cbfc5ff45365736d09afcf838bf46b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1689, + "startColumn": 34, + "charOffset": 57619, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 1687, + "startColumn": 34, + "charOffset": 57556, + "charLength": 1, + "snippet": { + "text": "\n\tg_logger().debug(\"Leech:\");\n\tif (bonusData.leech.manaLeech > 0) {\n\t\tg_logger().debug(\" manaLeech: {}\", bonusData.leech.manaLeech);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efb10dbb1e95a0899fff71eaadcddad44851b52d86d1954ce76b07de0b8f8ed0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1692, + "startColumn": 34, + "charOffset": 57726, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 1690, + "startColumn": 34, + "charOffset": 57624, + "charLength": 1, + "snippet": { + "text": "\t\tg_logger().debug(\" manaLeech: {}\", bonusData.leech.manaLeech);\n\t}\n\tif (bonusData.leech.lifeLeech > 0) {\n\t\tg_logger().debug(\" lifeLeech: {}\", bonusData.leech.lifeLeech);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ede229771176b2359f0a27c9183649d3247b668931d7c92e1052a95c9baa0a03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1762, + "startColumn": 29, + "charOffset": 60245, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 1760, + "startColumn": 29, + "charOffset": 60213, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (bonusData.mitigation > 0) {\n\t\tg_logger().debug(\"mitigation: {}\", bonusData.mitigation);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3de1e17ac3175dd0dd97439a7474520d0efbe9f842b354e98a2edb14b6a108e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &spellsVector' can be declared as 'const auto &spellsVector'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1766, + "startColumn": 2, + "charOffset": 60315, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1764, + "startColumn": 2, + "charOffset": 60310, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tauto &spellsVector = bonusData.spells;\n\tif (!spellsVector.empty()) {\n\t\tg_logger().debug(\"Spells:\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1d66336c952be474f2bd586b3fed0910521e07c39a62dd889d19165bef84c14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1769, + "startColumn": 3, + "charOffset": 60417, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1767, + "startColumn": 3, + "charOffset": 60354, + "charLength": 3, + "snippet": { + "text": "\tif (!spellsVector.empty()) {\n\t\tg_logger().debug(\"Spells:\");\n\t\tfor (const auto &spell : bonusData.spells) {\n\t\t\tg_logger().debug(\" {}\", spell);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee55e007c6b5eed98d674f5c743f78bf1b9920f5278d66b8c3ec98a344817c18" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1785, + "startColumn": 2, + "charOffset": 60975, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1783, + "startColumn": 2, + "charOffset": 60970, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (uint8_t i = WheelSlots_t::SLOT_FIRST; i <= WheelSlots_t::SLOT_LAST; ++i) {\n\t\tuint16_t points = getPointsBySlotType(static_cast(i));\n\t\tif (points > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06f40ecb90f56af99b0a504afdda86c69c542df316813933de1b3405b86e8897" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1794, + "startColumn": 48, + "charOffset": 61402, + "charLength": 13, + "snippet": { + "text": "vocationCipId" + } + }, + "contextRegion": { + "startLine": 1792, + "startColumn": 48, + "charOffset": 61327, + "charLength": 13, + "snippet": { + "text": "\t\t\t}\n\t\t\tif (internalData) {\n\t\t\t\tinternalData(m_player.getPlayer(), points, vocationCipId, m_playerBonusData);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e153ca5dbb4fd548a46a583068a751bd2d93ae78e7a56e877492c5511d204a16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1801, + "startColumn": 27, + "charOffset": 61545, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1799, + "startColumn": 27, + "charOffset": 61451, + "charLength": 12, + "snippet": { + "text": "\nvoid PlayerWheel::addSpellToVector(const std::string &spellName) {\n\tm_playerBonusData.spells.emplace_back(spellName);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "487dda1f3547dbb66ff65cc1bb4f1e7f4ac3d55fd34597965991c990b830d176" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'loadRevelationPerks' has cognitive complexity of 49 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1804, + "startColumn": 19, + "charOffset": 61591, + "charLength": 19, + "snippet": { + "text": "loadRevelationPerks" + } + }, + "contextRegion": { + "startLine": 1802, + "startColumn": 19, + "charOffset": 61570, + "charLength": 19, + "snippet": { + "text": "}\n\nvoid PlayerWheel::loadRevelationPerks() {\n\t// Stats (Damage and Healing)\n\tWheelStageEnum_t greenStage = getPlayerSliceStage(\"green\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c802a907354002e232da17f47b384368fec2c35d89c64e71f853f83f93d697a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1822, + "startColumn": 3, + "charOffset": 62450, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1820, + "startColumn": 3, + "charOffset": 62333, + "charLength": 2, + "snippet": { + "text": "\t\tauto redStageValue = static_cast(redStageEnum);\n\t\tauto vocationEnum = m_player.getPlayerVocationEnum();\n\t\tif (vocationEnum == Vocation_t::VOCATION_DRUID_CIP) {\n\t\t\tm_playerBonusData.stages.blessingOfTheGrove = redStageValue;\n\t\t} else if (vocationEnum == Vocation_t::VOCATION_KNIGHT_CIP) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f178c4d6fee8574b7c8a4e3f569b832dbf6e977ed89706d42e55429b6032a972" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1826, + "startColumn": 4, + "charOffset": 62698, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1824, + "startColumn": 4, + "charOffset": 62568, + "charLength": 3, + "snippet": { + "text": "\t\t} else if (vocationEnum == Vocation_t::VOCATION_KNIGHT_CIP) {\n\t\t\tm_playerBonusData.stages.executionersThrow = redStageValue;\n\t\t\tfor (uint8_t i = 0; i < redStageValue; ++i) {\n\t\t\t\taddSpellToVector(\"Executioner's Throw\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f4076516c89bf8c54759492456e6f422c02ca93d47e1ba77fa54316fd539032" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'redStageValue' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1826, + "startColumn": 24, + "charOffset": 62718, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1824, + "startColumn": 24, + "charOffset": 62568, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (vocationEnum == Vocation_t::VOCATION_KNIGHT_CIP) {\n\t\t\tm_playerBonusData.stages.executionersThrow = redStageValue;\n\t\t\tfor (uint8_t i = 0; i < redStageValue; ++i) {\n\t\t\t\taddSpellToVector(\"Executioner's Throw\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5244d7883b95dc109cc116290ea24ca7544ae3a7258d35c232dc837a26b1b4e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1831, + "startColumn": 4, + "charOffset": 62920, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1829, + "startColumn": 4, + "charOffset": 62794, + "charLength": 3, + "snippet": { + "text": "\t\t} else if (vocationEnum == Vocation_t::VOCATION_SORCERER_CIP) {\n\t\t\tm_playerBonusData.stages.beamMastery = redStageValue;\n\t\t\tfor (uint8_t i = 0; i < redStageValue; ++i) {\n\t\t\t\taddSpellToVector(\"Great Death Beam\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d2eeb290912aea950f06f9e21f2cb069806c98781cd43bc02f16ece8c00576e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'redStageValue' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1831, + "startColumn": 24, + "charOffset": 62940, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1829, + "startColumn": 24, + "charOffset": 62794, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (vocationEnum == Vocation_t::VOCATION_SORCERER_CIP) {\n\t\t\tm_playerBonusData.stages.beamMastery = redStageValue;\n\t\t\tfor (uint8_t i = 0; i < redStageValue; ++i) {\n\t\t\t\taddSpellToVector(\"Great Death Beam\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ecff6098ebbfcb308123ac7cb76590441c92f29c931c999e16758d7e8677281c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1836, + "startColumn": 4, + "charOffset": 63140, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1834, + "startColumn": 4, + "charOffset": 63013, + "charLength": 3, + "snippet": { + "text": "\t\t} else if (vocationEnum == Vocation_t::VOCATION_PALADIN_CIP) {\n\t\t\tm_playerBonusData.stages.divineGrenade = redStageValue;\n\t\t\tfor (uint8_t i = 0; i < redStageValue; ++i) {\n\t\t\t\taddSpellToVector(\"Divine Grenade\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d67f24d372f6c987a600609ac531b4e045a671244bb321de0cbd709c08cab43d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'redStageValue' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1836, + "startColumn": 24, + "charOffset": 63160, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1834, + "startColumn": 24, + "charOffset": 63013, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (vocationEnum == Vocation_t::VOCATION_PALADIN_CIP) {\n\t\t\tm_playerBonusData.stages.divineGrenade = redStageValue;\n\t\t\tfor (uint8_t i = 0; i < redStageValue; ++i) {\n\t\t\t\taddSpellToVector(\"Divine Grenade\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53045634d475babf2390eec13615881f6ac9251cb3091340463f6f31bac97ab0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1850, + "startColumn": 3, + "charOffset": 63678, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1848, + "startColumn": 3, + "charOffset": 63560, + "charLength": 2, + "snippet": { + "text": "\t\tauto purpleStage = static_cast(purpleStageEnum);\n\t\tauto vocationEnum = m_player.getPlayerVocationEnum();\n\t\tif (vocationEnum == Vocation_t::VOCATION_KNIGHT_CIP) {\n\t\t\tm_playerBonusData.avatar.steel = purpleStage;\n\t\t\tfor (uint8_t i = 0; i < purpleStage; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cba04275a0b3e5e81451ebce1f55337fb410e284d6d968d21dbdd1869f9ae1dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1852, + "startColumn": 4, + "charOffset": 63785, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1850, + "startColumn": 4, + "charOffset": 63676, + "charLength": 3, + "snippet": { + "text": "\t\tif (vocationEnum == Vocation_t::VOCATION_KNIGHT_CIP) {\n\t\t\tm_playerBonusData.avatar.steel = purpleStage;\n\t\t\tfor (uint8_t i = 0; i < purpleStage; ++i) {\n\t\t\t\taddSpellToVector(\"Avatar of Steel\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97c70aca50531865ee6faef90519c4de90ebe6f631a9d36bcdd76db46bfaa091" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'purpleStage' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1852, + "startColumn": 24, + "charOffset": 63805, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1850, + "startColumn": 24, + "charOffset": 63676, + "charLength": 1, + "snippet": { + "text": "\t\tif (vocationEnum == Vocation_t::VOCATION_KNIGHT_CIP) {\n\t\t\tm_playerBonusData.avatar.steel = purpleStage;\n\t\t\tfor (uint8_t i = 0; i < purpleStage; ++i) {\n\t\t\t\taddSpellToVector(\"Avatar of Steel\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c94d27a8d85c9fe60eb56f7c1a47362a364f660b7347d57b14cffbd1e1f0aeeb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1857, + "startColumn": 4, + "charOffset": 63992, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1855, + "startColumn": 4, + "charOffset": 63875, + "charLength": 3, + "snippet": { + "text": "\t\t} else if (vocationEnum == Vocation_t::VOCATION_PALADIN_CIP) {\n\t\t\tm_playerBonusData.avatar.light = purpleStage;\n\t\t\tfor (uint8_t i = 0; i < purpleStage; ++i) {\n\t\t\t\taddSpellToVector(\"Avatar of Light\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b511b9ac2d01bc7af6157c7b710076322af2508bc6c0ea033046ec91eff0fb1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'purpleStage' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1857, + "startColumn": 24, + "charOffset": 64012, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1855, + "startColumn": 24, + "charOffset": 63875, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (vocationEnum == Vocation_t::VOCATION_PALADIN_CIP) {\n\t\t\tm_playerBonusData.avatar.light = purpleStage;\n\t\t\tfor (uint8_t i = 0; i < purpleStage; ++i) {\n\t\t\t\taddSpellToVector(\"Avatar of Light\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77e4e7a9c90b998988e7304d9b6264c2facc937bb71c4cf75366874910339ee1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1862, + "startColumn": 4, + "charOffset": 64198, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1860, + "startColumn": 4, + "charOffset": 64082, + "charLength": 3, + "snippet": { + "text": "\t\t} else if (vocationEnum == Vocation_t::VOCATION_DRUID_CIP) {\n\t\t\tm_playerBonusData.avatar.nature = purpleStage;\n\t\t\tfor (uint8_t i = 0; i < purpleStage; ++i) {\n\t\t\t\taddSpellToVector(\"Avatar of Nature\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a06a9778eac6368e1a6bc89e7561bd0e318a1ae06917b57dc0b05bc96123628" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'purpleStage' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1862, + "startColumn": 24, + "charOffset": 64218, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1860, + "startColumn": 24, + "charOffset": 64082, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (vocationEnum == Vocation_t::VOCATION_DRUID_CIP) {\n\t\t\tm_playerBonusData.avatar.nature = purpleStage;\n\t\t\tfor (uint8_t i = 0; i < purpleStage; ++i) {\n\t\t\t\taddSpellToVector(\"Avatar of Nature\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0b158de075b8006103b947465b5953bef174bcfc0fb704c5c59eb2eb9339c84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1867, + "startColumn": 4, + "charOffset": 64407, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1865, + "startColumn": 4, + "charOffset": 64289, + "charLength": 3, + "snippet": { + "text": "\t\t} else if (vocationEnum == Vocation_t::VOCATION_SORCERER_CIP) {\n\t\t\tm_playerBonusData.avatar.storm = purpleStage;\n\t\t\tfor (uint8_t i = 0; i < purpleStage; ++i) {\n\t\t\t\taddSpellToVector(\"Avatar of Storm\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30e8075f988451d6f4903b31f470ec63336b9da8f0bf93b2f83bdb7ad1278d27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'purpleStage' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1867, + "startColumn": 24, + "charOffset": 64427, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1865, + "startColumn": 24, + "charOffset": 64289, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (vocationEnum == Vocation_t::VOCATION_SORCERER_CIP) {\n\t\t\tm_playerBonusData.avatar.storm = purpleStage;\n\t\t\tfor (uint8_t i = 0; i < purpleStage; ++i) {\n\t\t\t\taddSpellToVector(\"Avatar of Storm\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c1ac50681a8748ec13f02c0425a92abed5568caee53b0c53881fad4ced2ab1a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1881, + "startColumn": 3, + "charOffset": 64932, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1879, + "startColumn": 3, + "charOffset": 64818, + "charLength": 2, + "snippet": { + "text": "\t\tauto blueStage = static_cast(blueStageEnum);\n\t\tauto vocationEnum = m_player.getPlayerVocationEnum();\n\t\tif (vocationEnum == Vocation_t::VOCATION_KNIGHT_CIP) {\n\t\t\tm_playerBonusData.stages.combatMastery = blueStage;\n\t\t} else if (vocationEnum == Vocation_t::VOCATION_SORCERER_CIP) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e1b4a6f99b74888d6893d0213013105d1f2659954176b6175418e9c71ac483c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1885, + "startColumn": 4, + "charOffset": 65162, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1883, + "startColumn": 4, + "charOffset": 65042, + "charLength": 3, + "snippet": { + "text": "\t\t} else if (vocationEnum == Vocation_t::VOCATION_SORCERER_CIP) {\n\t\t\tm_playerBonusData.stages.drainBody = blueStage;\n\t\t\tfor (uint8_t i = 0; i <= blueStage; ++i) {\n\t\t\t\taddSpellToVector(\"Drain_Body_Spells\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07745d5612afb8de665f9d9e3644c76655feaf8e977ae15763c53b862fc19882" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'blueStage' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1885, + "startColumn": 24, + "charOffset": 65182, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1883, + "startColumn": 24, + "charOffset": 65042, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (vocationEnum == Vocation_t::VOCATION_SORCERER_CIP) {\n\t\t\tm_playerBonusData.stages.drainBody = blueStage;\n\t\t\tfor (uint8_t i = 0; i <= blueStage; ++i) {\n\t\t\t\taddSpellToVector(\"Drain_Body_Spells\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9116a5797eb29e1843e56f6895f5f1cf0df012dd187a123041f128e3963aeccc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1890, + "startColumn": 4, + "charOffset": 65380, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1888, + "startColumn": 4, + "charOffset": 65253, + "charLength": 3, + "snippet": { + "text": "\t\t} else if (vocationEnum == Vocation_t::VOCATION_PALADIN_CIP) {\n\t\t\tm_playerBonusData.stages.divineEmpowerment = blueStage;\n\t\t\tfor (uint8_t i = 0; i <= blueStage; ++i) {\n\t\t\t\taddSpellToVector(\"Divine Empowerment\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1bce1e3d4b72950b493c1013231a81918202892277869a5d78866710f6f6cbda" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'blueStage' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1890, + "startColumn": 24, + "charOffset": 65400, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1888, + "startColumn": 24, + "charOffset": 65253, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (vocationEnum == Vocation_t::VOCATION_PALADIN_CIP) {\n\t\t\tm_playerBonusData.stages.divineEmpowerment = blueStage;\n\t\t\tfor (uint8_t i = 0; i <= blueStage; ++i) {\n\t\t\t\taddSpellToVector(\"Divine Empowerment\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5846851fcba0f8dd609043eec383714c32f7bcabb715baaffa8873148f7196df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1895, + "startColumn": 4, + "charOffset": 65589, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1893, + "startColumn": 4, + "charOffset": 65472, + "charLength": 3, + "snippet": { + "text": "\t\t} else if (vocationEnum == Vocation_t::VOCATION_DRUID_CIP) {\n\t\t\tm_playerBonusData.stages.twinBurst = blueStage;\n\t\t\tfor (uint8_t i = 1; i <= blueStage; ++i) {\n\t\t\t\taddSpellToVector(\"Twin Burst\");\n\t\t\t\taddSpellToVector(\"Terra Burst\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ace22e6e5dbcc0fca0d9e8b1ddfc247ec77d63aaccf050ca9972019bd5cdb963" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'blueStage' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1895, + "startColumn": 24, + "charOffset": 65609, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1893, + "startColumn": 24, + "charOffset": 65472, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (vocationEnum == Vocation_t::VOCATION_DRUID_CIP) {\n\t\t\tm_playerBonusData.stages.twinBurst = blueStage;\n\t\t\tfor (uint8_t i = 1; i <= blueStage; ++i) {\n\t\t\t\taddSpellToVector(\"Twin Burst\");\n\t\t\t\taddSpellToVector(\"Terra Burst\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb01ef986b92a669504442900b6bb1f2df8e396d962c7b7e3a5f225fa2603225" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1964, + "startColumn": 2, + "charOffset": 67773, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1962, + "startColumn": 2, + "charOffset": 67749, + "charLength": 3, + "snippet": { + "text": "\n\tint totalPoints = 0;\n\tfor (const auto &slot : slots) {\n\t\ttotalPoints += getPointsBySlotType(slot);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a795af6b4d6112f441b78b5857fafd42a74f2db180782f2352d262ba3d491ca9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1967, + "startColumn": 17, + "charOffset": 67869, + "charLength": 23, + "snippet": { + "text": "m_bonusRevelationPoints" + } + }, + "contextRegion": { + "startLine": 1965, + "startColumn": 17, + "charOffset": 67806, + "charLength": 23, + "snippet": { + "text": "\t\ttotalPoints += getPointsBySlotType(slot);\n\t}\n\ttotalPoints += m_bonusRevelationPoints[static_cast(affinity)];\n\n\tif (totalPoints >= static_cast(WheelStagePointsEnum_t::THREE)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c48988ef9bda8a2b29a1cd21800ca35798a7a14ade2c5eaab797ab968a20573" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1969, + "startColumn": 2, + "charOffset": 67928, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1967, + "startColumn": 2, + "charOffset": 67853, + "charLength": 2, + "snippet": { + "text": "\ttotalPoints += m_bonusRevelationPoints[static_cast(affinity)];\n\n\tif (totalPoints >= static_cast(WheelStagePointsEnum_t::THREE)) {\n\t\treturn WheelStageEnum_t::THREE;\n\t} else if (totalPoints >= static_cast(WheelStagePointsEnum_t::TWO)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7b195cc9c5192587c064e4ae559367119069c270203f1cf63b9543fafd2c41c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 1971, + "startColumn": 4, + "charOffset": 68035, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1969, + "startColumn": 4, + "charOffset": 67927, + "charLength": 4, + "snippet": { + "text": "\tif (totalPoints >= static_cast(WheelStagePointsEnum_t::THREE)) {\n\t\treturn WheelStageEnum_t::THREE;\n\t} else if (totalPoints >= static_cast(WheelStagePointsEnum_t::TWO)) {\n\t\treturn WheelStageEnum_t::TWO;\n\t} else if (totalPoints >= static_cast(WheelStagePointsEnum_t::ONE)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4906bdffde01e5c332864590f176adbe9f2b6ec93fc4264dc6b5c0300da4c884" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2002, + "startColumn": 66, + "charOffset": 69065, + "charLength": 4, + "snippet": { + "text": "2000" + } + }, + "contextRegion": { + "startLine": 2000, + "startColumn": 66, + "charOffset": 68957, + "charLength": 4, + "snippet": { + "text": "\nbool PlayerWheel::checkBattleInstinct() {\n\tsetOnThinkTimer(WheelOnThink_t::BATTLE_INSTINCT, OTSYS_TIME() + 2000);\n\tbool updateClient = false;\n\tm_creaturesNearby = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d66566d5f7e482fe72a9829dd4d96c2bf189216c68b582c46be85acadf8e96b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2007, + "startColumn": 26, + "charOffset": 69231, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2005, + "startColumn": 26, + "charOffset": 69124, + "charLength": 1, + "snippet": { + "text": "\tuint16_t creaturesNearby = 0;\n\tfor (int offsetX = -1; offsetX <= 1; offsetX++) {\n\t\tif (creaturesNearby >= 8) {\n\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4705fd2764afc89ab16b0e849f957adca2f76a611047ba509f87c584e8069af5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2010, + "startColumn": 3, + "charOffset": 69252, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2008, + "startColumn": 3, + "charOffset": 69236, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\t}\n\t\tfor (int offsetY = -1; offsetY <= 1; offsetY++) {\n\t\t\tif (creaturesNearby >= 8) {\n\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88a9d0a9bbc88e0a581ef9dc38a5ee0596631f71899981bba30c0335e63b2c1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2011, + "startColumn": 27, + "charOffset": 69328, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2009, + "startColumn": 27, + "charOffset": 69246, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\t\tfor (int offsetY = -1; offsetY <= 1; offsetY++) {\n\t\t\tif (creaturesNearby >= 8) {\n\t\t\t\tbreak;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "721f2303ca049a8fda5928292f9e0d8d58fa15f79474edf2e96329bc8b309199" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2016, + "startColumn": 5, + "charOffset": 69401, + "charLength": 8, + "snippet": { + "text": "m_player" + } + }, + "contextRegion": { + "startLine": 2014, + "startColumn": 5, + "charOffset": 69349, + "charLength": 8, + "snippet": { + "text": "\n\t\t\tconst auto playerPositionOffSet = Position(\n\t\t\t\tm_player.getPosition().x + offsetX,\n\t\t\t\tm_player.getPosition().y + offsetY,\n\t\t\t\tm_player.getPosition().z" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c685fe8257cf6217072fcd470eebca4921839fe6f4fece544165c96b5f18c7b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2017, + "startColumn": 5, + "charOffset": 69441, + "charLength": 8, + "snippet": { + "text": "m_player" + } + }, + "contextRegion": { + "startLine": 2015, + "startColumn": 5, + "charOffset": 69350, + "charLength": 8, + "snippet": { + "text": "\t\t\tconst auto playerPositionOffSet = Position(\n\t\t\t\tm_player.getPosition().x + offsetX,\n\t\t\t\tm_player.getPosition().y + offsetY,\n\t\t\t\tm_player.getPosition().z\n\t\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4d5265caf2fc17c0ec4ff5b7408f04063e8371c4d7b1f955524a70892cae846" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2021, + "startColumn": 8, + "charOffset": 69595, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2019, + "startColumn": 8, + "charOffset": 69506, + "charLength": 1, + "snippet": { + "text": "\t\t\t);\n\t\t\tstd::shared_ptr tile = g_game().map.getTile(playerPositionOffSet);\n\t\t\tif (!tile) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "607bc51016db470cab1dc3143618a279285d7e4a0da0b90e377599aa798423db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2026, + "startColumn": 8, + "charOffset": 69722, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2024, + "startColumn": 8, + "charOffset": 69623, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tstd::shared_ptr creature = tile->getTopVisibleCreature(m_player.getPlayer());\n\t\t\tif (!creature || creature == m_player.getPlayer() || (creature->getMaster() && creature->getMaster()->getPlayer() == m_player.getPlayer())) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "533d05da88a8904859d6503035ae04b2837229f975c03fd9c32da30088a768c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2034, + "startColumn": 2, + "charOffset": 69911, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2032, + "startColumn": 2, + "charOffset": 69906, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (creaturesNearby >= 5) {\n\t\tm_creaturesNearby = creaturesNearby;\n\t\tcreaturesNearby -= 4;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aafaddba9086835de593046a335b870e6ec5ab67d71dab430eb5e7c6d7258d83" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2034, + "startColumn": 25, + "charOffset": 69934, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2032, + "startColumn": 25, + "charOffset": 69906, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (creaturesNearby >= 5) {\n\t\tm_creaturesNearby = creaturesNearby;\n\t\tcreaturesNearby -= 4;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "debd37d3f725f465c9097ec1dc355c9ce191db5b76d06115d4c65bec9ec3dd8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2037, + "startColumn": 25, + "charOffset": 70026, + "charLength": 1, + "snippet": { + "text": "1" + } + }, + "contextRegion": { + "startLine": 2035, + "startColumn": 25, + "charOffset": 69939, + "charLength": 1, + "snippet": { + "text": "\t\tm_creaturesNearby = creaturesNearby;\n\t\tcreaturesNearby -= 4;\n\t\tuint16_t meleeSkill = 1 * creaturesNearby;\n\t\tuint16_t shieldSkill = 6 * creaturesNearby;\n\t\tif (getMajorStat(WheelMajor_t::MELEE) != meleeSkill || getMajorStat(WheelMajor_t::SHIELD) != shieldSkill) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d45fb76f9647fd2aad1c781780167e71f205f808004a98c3e7f3bd0ba928179" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2038, + "startColumn": 26, + "charOffset": 70072, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 2036, + "startColumn": 26, + "charOffset": 69978, + "charLength": 1, + "snippet": { + "text": "\t\tcreaturesNearby -= 4;\n\t\tuint16_t meleeSkill = 1 * creaturesNearby;\n\t\tuint16_t shieldSkill = 6 * creaturesNearby;\n\t\tif (getMajorStat(WheelMajor_t::MELEE) != meleeSkill || getMajorStat(WheelMajor_t::SHIELD) != shieldSkill) {\n\t\t\tsetMajorStat(WheelMajor_t::MELEE, meleeSkill);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73af357209c36c0f1b1eb92228b558bc3446a8d566a310aa01e26b342de30042" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2038, + "startColumn": 26, + "charOffset": 70072, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 2036, + "startColumn": 26, + "charOffset": 69978, + "charLength": 1, + "snippet": { + "text": "\t\tcreaturesNearby -= 4;\n\t\tuint16_t meleeSkill = 1 * creaturesNearby;\n\t\tuint16_t shieldSkill = 6 * creaturesNearby;\n\t\tif (getMajorStat(WheelMajor_t::MELEE) != meleeSkill || getMajorStat(WheelMajor_t::SHIELD) != shieldSkill) {\n\t\t\tsetMajorStat(WheelMajor_t::MELEE, meleeSkill);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51559e83ae9509e8e57ccabfe19160086392c19fd6626f86a32e3bbe0ebb0261" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2054, + "startColumn": 68, + "charOffset": 70674, + "charLength": 4, + "snippet": { + "text": "2000" + } + }, + "contextRegion": { + "startLine": 2052, + "startColumn": 68, + "charOffset": 70562, + "charLength": 4, + "snippet": { + "text": "\nbool PlayerWheel::checkPositionalTatics() {\n\tsetOnThinkTimer(WheelOnThink_t::POSITIONAL_TATICS, OTSYS_TIME() + 2000);\n\tm_creaturesNearby = 0;\n\tbool updateClient = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0eade15d1add61215c17e23f20a8e2457c237665e02992a0439ee045c50fdd78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2062, + "startColumn": 3, + "charOffset": 70860, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2060, + "startColumn": 3, + "charOffset": 70844, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\t}\n\t\tfor (int offsetY = -1; offsetY <= 1; offsetY++) {\n\t\t\tconst auto playerPositionOffSet = Position(\n\t\t\t\tm_player.getPosition().x + offsetX," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7dc36dcff913dbe1d50069f4a10ebf3b607d733ac1436e35a6b830a8b7b800f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2064, + "startColumn": 5, + "charOffset": 70961, + "charLength": 8, + "snippet": { + "text": "m_player" + } + }, + "contextRegion": { + "startLine": 2062, + "startColumn": 5, + "charOffset": 70858, + "charLength": 8, + "snippet": { + "text": "\t\tfor (int offsetY = -1; offsetY <= 1; offsetY++) {\n\t\t\tconst auto playerPositionOffSet = Position(\n\t\t\t\tm_player.getPosition().x + offsetX,\n\t\t\t\tm_player.getPosition().y + offsetY,\n\t\t\t\tm_player.getPosition().z" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e58b7cd637e073712aa1848c9f16b92aefba04745fd07f2bbf0f98a9e8efa20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2065, + "startColumn": 5, + "charOffset": 71001, + "charLength": 8, + "snippet": { + "text": "m_player" + } + }, + "contextRegion": { + "startLine": 2063, + "startColumn": 5, + "charOffset": 70910, + "charLength": 8, + "snippet": { + "text": "\t\t\tconst auto playerPositionOffSet = Position(\n\t\t\t\tm_player.getPosition().x + offsetX,\n\t\t\t\tm_player.getPosition().y + offsetY,\n\t\t\t\tm_player.getPosition().z\n\t\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d808803706ae3ab6d14df1cf3405fdb63ff6813c55754c29eff6cb257719192d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2069, + "startColumn": 8, + "charOffset": 71155, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2067, + "startColumn": 8, + "charOffset": 71066, + "charLength": 1, + "snippet": { + "text": "\t\t\t);\n\t\t\tstd::shared_ptr tile = g_game().map.getTile(playerPositionOffSet);\n\t\t\tif (!tile) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8d46099f5ec6960f412f76fe5efaa9cd697376ff6611760a42fcb557718ee86" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2074, + "startColumn": 8, + "charOffset": 71282, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2072, + "startColumn": 8, + "charOffset": 71183, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tstd::shared_ptr creature = tile->getTopVisibleCreature(m_player.getPlayer());\n\t\t\tif (!creature || creature == m_player.getPlayer() || !creature->getMonster() || (creature->getMaster() && creature->getMaster()->getPlayer())) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1caa017c8bcb60d965e95924808190c07d33a6c86c19c2dd0b5a56d69accd26c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2074, + "startColumn": 57, + "charOffset": 71331, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2072, + "startColumn": 57, + "charOffset": 71183, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tstd::shared_ptr creature = tile->getTopVisibleCreature(m_player.getPlayer());\n\t\t\tif (!creature || creature == m_player.getPlayer() || !creature->getMonster() || (creature->getMaster() && creature->getMaster()->getPlayer())) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "778c2764b672259a9edd6b1d9cc84601257ff99c5addbda8ed21e0290867b198" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2109, + "startColumn": 68, + "charOffset": 72277, + "charLength": 4, + "snippet": { + "text": "2000" + } + }, + "contextRegion": { + "startLine": 2107, + "startColumn": 68, + "charOffset": 72165, + "charLength": 4, + "snippet": { + "text": "\nbool PlayerWheel::checkBallisticMastery() {\n\tsetOnThinkTimer(WheelOnThink_t::BALLISTIC_MASTERY, OTSYS_TIME() + 2000);\n\tbool updateClient = false;\n\tint32_t newCritical = 1000;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f7ca23d1a8d7ce7971f44a0a9ee402e70a13a5c86451920b8947374b284e853" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2111, + "startColumn": 24, + "charOffset": 72335, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 2109, + "startColumn": 24, + "charOffset": 72210, + "charLength": 4, + "snippet": { + "text": "\tsetOnThinkTimer(WheelOnThink_t::BALLISTIC_MASTERY, OTSYS_TIME() + 2000);\n\tbool updateClient = false;\n\tint32_t newCritical = 1000;\n\tuint16_t newHolyBonus = 2; // 2%\n\tuint16_t newPhysicalBonus = 2; // 2%" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b801c75c963813ee607e3ba86e92016cf9390653458bb8a393cec9481eb67af4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2152, + "startColumn": 65, + "charOffset": 73841, + "charLength": 4, + "snippet": { + "text": "2000" + } + }, + "contextRegion": { + "startLine": 2150, + "startColumn": 65, + "charOffset": 73735, + "charLength": 4, + "snippet": { + "text": "\nbool PlayerWheel::checkCombatMastery() {\n\tsetOnThinkTimer(WheelOnThink_t::COMBAT_MASTERY, OTSYS_TIME() + 2000);\n\tbool updateClient = false;\n\tuint8_t stage = getStage(WheelStage_t::COMBAT_MASTERY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7bedbaa22cb075e97e3441ecb63979d5d280df69b9a1410e2ee571f25d6823e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2157, + "startColumn": 6, + "charOffset": 73991, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 2155, + "startColumn": 6, + "charOffset": 73933, + "charLength": 4, + "snippet": { + "text": "\n\tstd::shared_ptr item = m_player.getWeapon();\n\tif (item && item->getSlotPosition() & SLOTP_TWO_HAND) {\n\t\tint32_t criticalSkill = 0;\n\t\tif (stage >= 3) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2cecc35cbd6b8670fcbb98788f5f90fd3b39bfdb8bc1b298579c89b032cd8b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2157, + "startColumn": 11, + "charOffset": 73996, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 2155, + "startColumn": 11, + "charOffset": 73933, + "charLength": 2, + "snippet": { + "text": "\n\tstd::shared_ptr item = m_player.getWeapon();\n\tif (item && item->getSlotPosition() & SLOTP_TWO_HAND) {\n\t\tint32_t criticalSkill = 0;\n\t\tif (stage >= 3) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a7636800f7c68378799eb564723240cc556a45d096bb27fd9e98027f3a330f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2157, + "startColumn": 14, + "charOffset": 73999, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 2155, + "startColumn": 14, + "charOffset": 73933, + "charLength": 4, + "snippet": { + "text": "\n\tstd::shared_ptr item = m_player.getWeapon();\n\tif (item && item->getSlotPosition() & SLOTP_TWO_HAND) {\n\t\tint32_t criticalSkill = 0;\n\t\tif (stage >= 3) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f5d17a4c23f2dc340fea4d888cdf02cb64438d4c94466387317605512fccf0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2157, + "startColumn": 14, + "charOffset": 73999, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 2155, + "startColumn": 14, + "charOffset": 73933, + "charLength": 4, + "snippet": { + "text": "\n\tstd::shared_ptr item = m_player.getWeapon();\n\tif (item && item->getSlotPosition() & SLOTP_TWO_HAND) {\n\t\tint32_t criticalSkill = 0;\n\t\tif (stage >= 3) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b5fe250b2ee3cb8af0554eb01bcf490b3454dd3608978cd7b125363c93e3459" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2157, + "startColumn": 38, + "charOffset": 74023, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 2155, + "startColumn": 38, + "charOffset": 73933, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = m_player.getWeapon();\n\tif (item && item->getSlotPosition() & SLOTP_TWO_HAND) {\n\t\tint32_t criticalSkill = 0;\n\t\tif (stage >= 3) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af6ef6bb5b0009843da9f4bb62bdf9baa5525168812ba0a6a34aad5f70c8bcaa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2159, + "startColumn": 3, + "charOffset": 74074, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2157, + "startColumn": 3, + "charOffset": 73986, + "charLength": 2, + "snippet": { + "text": "\tif (item && item->getSlotPosition() & SLOTP_TWO_HAND) {\n\t\tint32_t criticalSkill = 0;\n\t\tif (stage >= 3) {\n\t\t\tcriticalSkill = 1200;\n\t\t} else if (stage >= 2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d96e8d21cf8a1d882c2f6dda6005b558aea7b774242b6ff7cf32ee46118b67fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2160, + "startColumn": 20, + "charOffset": 74111, + "charLength": 4, + "snippet": { + "text": "1200" + } + }, + "contextRegion": { + "startLine": 2158, + "startColumn": 20, + "charOffset": 74043, + "charLength": 4, + "snippet": { + "text": "\t\tint32_t criticalSkill = 0;\n\t\tif (stage >= 3) {\n\t\t\tcriticalSkill = 1200;\n\t\t} else if (stage >= 2) {\n\t\t\tcriticalSkill = 800;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1058f33b1d0df4346ea6bfc91cb87880429f451ac79b56954daf8c97b9be43b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "800 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2162, + "startColumn": 20, + "charOffset": 74163, + "charLength": 3, + "snippet": { + "text": "800" + } + }, + "contextRegion": { + "startLine": 2160, + "startColumn": 20, + "charOffset": 74092, + "charLength": 3, + "snippet": { + "text": "\t\t\tcriticalSkill = 1200;\n\t\t} else if (stage >= 2) {\n\t\t\tcriticalSkill = 800;\n\t\t} else if (stage >= 1) {\n\t\t\tcriticalSkill = 400;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38459136193b159d710f4c6a08a36859a68c296b4216dbd62211a362225831fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2164, + "startColumn": 20, + "charOffset": 74214, + "charLength": 3, + "snippet": { + "text": "400" + } + }, + "contextRegion": { + "startLine": 2162, + "startColumn": 20, + "charOffset": 74144, + "charLength": 3, + "snippet": { + "text": "\t\t\tcriticalSkill = 800;\n\t\t} else if (stage >= 1) {\n\t\t\tcriticalSkill = 400;\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32ce8db5d04b233b32243340c0c676adb2a877b84402710296972e77c6328411" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2182, + "startColumn": 4, + "charOffset": 74730, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2180, + "startColumn": 4, + "charOffset": 74649, + "charLength": 2, + "snippet": { + "text": "\t\tif (getMajorStat(WheelMajor_t::DEFENSE) == 0) {\n\t\t\tint32_t shieldSkill = 0;\n\t\t\tif (stage >= 3) {\n\t\t\t\tshieldSkill = 30;\n\t\t\t} else if (stage >= 2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "edf4e81e0fe6868ebd56755ac4a6a54b542a17a35bb05069df71b89fa5dd1085" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2183, + "startColumn": 19, + "charOffset": 74766, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 2181, + "startColumn": 19, + "charOffset": 74699, + "charLength": 2, + "snippet": { + "text": "\t\t\tint32_t shieldSkill = 0;\n\t\t\tif (stage >= 3) {\n\t\t\t\tshieldSkill = 30;\n\t\t\t} else if (stage >= 2) {\n\t\t\t\tshieldSkill = 20;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ffe3073c6a7fb564d2124c0328b1ecd908582638ac28cd96657549cf41148562" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2185, + "startColumn": 19, + "charOffset": 74816, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 2183, + "startColumn": 19, + "charOffset": 74748, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tshieldSkill = 30;\n\t\t\t} else if (stage >= 2) {\n\t\t\t\tshieldSkill = 20;\n\t\t\t} else if (stage >= 1) {\n\t\t\t\tshieldSkill = 10;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80ee85dc325816b976381d92b657dcb808aa601619b3169546535f702c2ab271" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2187, + "startColumn": 19, + "charOffset": 74866, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 2185, + "startColumn": 19, + "charOffset": 74798, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tshieldSkill = 20;\n\t\t\t} else if (stage >= 1) {\n\t\t\t\tshieldSkill = 10;\n\t\t\t}\n\t\t\tsetMajorStat(WheelMajor_t::DEFENSE, shieldSkill);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6ed3d39c0f8ce9680c7b5d62baa061ca4205beb81d4f6e4290661723759c54f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2199, + "startColumn": 69, + "charOffset": 75126, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 2197, + "startColumn": 69, + "charOffset": 74985, + "charLength": 4, + "snippet": { + "text": "bool PlayerWheel::checkDivineEmpowerment() {\n\tbool updateClient = false;\n\tsetOnThinkTimer(WheelOnThink_t::DIVINE_EMPOWERMENT, OTSYS_TIME() + 1000);\n\n\tconst auto tile = m_player.getTile();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a2a1f752b1c9fc0190996081eff9b7cc3a343f95dc2f8d6dea6f514045e29ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2202, + "startColumn": 6, + "charOffset": 75178, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2200, + "startColumn": 6, + "charOffset": 75133, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto tile = m_player.getTile();\n\tif (!tile) {\n\t\treturn updateClient;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ddd3e986e6ba0ddf5e2f40c055201d1dedb533f29599b0872a0a84d16dfbf5da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto items' can be declared as 'auto *const items'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2206, + "startColumn": 2, + "charOffset": 75215, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 2204, + "startColumn": 2, + "charOffset": 75210, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tconst auto items = tile->getItemList();\n\tif (!items) {\n\t\treturn updateClient;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78ade1331eafd41d9479a4563b037dd20909e7b2096f94948cc77b5adae08812" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2207, + "startColumn": 6, + "charOffset": 75260, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2205, + "startColumn": 6, + "charOffset": 75213, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto items = tile->getItemList();\n\tif (!items) {\n\t\treturn updateClient;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc0332dbd6b0bf122bd7faf1db90d8b212b6d81d887fda12b8f0406848a5baae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2207, + "startColumn": 7, + "charOffset": 75261, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 2205, + "startColumn": 7, + "charOffset": 75213, + "charLength": 5, + "snippet": { + "text": "\n\tconst auto items = tile->getItemList();\n\tif (!items) {\n\t\treturn updateClient;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe5e6f1b8f8c7a009dede1e98a8c58979f0bccbbcc3fa3871d1efd7e0416d8d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2213, + "startColumn": 2, + "charOffset": 75347, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2211, + "startColumn": 2, + "charOffset": 75297, + "charLength": 3, + "snippet": { + "text": "\tint32_t damageBonus = 0;\n\tbool isOwner = false;\n\tfor (const auto &item : *items) {\n\t\tif (item->getID() == ITEM_DIVINE_EMPOWERMENT && item->isOwner(m_player.getGUID())) {\n\t\t\tisOwner = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f6f7f8546191f9041a4c9b7c9ddbd9e6b1caae737860d3732b10f68819186cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2222, + "startColumn": 3, + "charOffset": 75585, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2220, + "startColumn": 3, + "charOffset": 75505, + "charLength": 2, + "snippet": { + "text": "\tif (isOwner) {\n\t\tuint8_t stage = getStage(WheelStage_t::DIVINE_EMPOWERMENT);\n\t\tif (stage >= 3) {\n\t\t\tdamageBonus = 7;\n\t\t} else if (stage >= 2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc6585b94d77402bb0bc82f25e9f1d7fda804bbbf88ed6f6f72b1eea2ef3eefe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2223, + "startColumn": 18, + "charOffset": 75620, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 2221, + "startColumn": 18, + "charOffset": 75521, + "charLength": 1, + "snippet": { + "text": "\t\tuint8_t stage = getStage(WheelStage_t::DIVINE_EMPOWERMENT);\n\t\tif (stage >= 3) {\n\t\t\tdamageBonus = 7;\n\t\t} else if (stage >= 2) {\n\t\t\tdamageBonus = 5;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "072c80d4e6ca2e93b364a41999eeb8a9f66c2411b80d55a8dbb8325c1a3c3dab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2225, + "startColumn": 18, + "charOffset": 75667, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2223, + "startColumn": 18, + "charOffset": 75603, + "charLength": 1, + "snippet": { + "text": "\t\t\tdamageBonus = 7;\n\t\t} else if (stage >= 2) {\n\t\t\tdamageBonus = 5;\n\t\t} else if (stage >= 1) {\n\t\t\tdamageBonus = 3;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23f42d77e189403865165af706785f285905945241bb20f41eb092d0363a0e48" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2239, + "startColumn": 67, + "charOffset": 75952, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 2237, + "startColumn": 67, + "charOffset": 75883, + "charLength": 6, + "snippet": { + "text": "}\n\nint32_t PlayerWheel::checkDivineGrenade(std::shared_ptr target) const {\n\tif (!target || target == m_player.getPlayer()) {\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e7399d6c7d48bc7205b4e1e5d91eba748f2aae3201718fc9396a35b15eac454" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2240, + "startColumn": 6, + "charOffset": 75973, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2238, + "startColumn": 6, + "charOffset": 75885, + "charLength": 1, + "snippet": { + "text": "\nint32_t PlayerWheel::checkDivineGrenade(std::shared_ptr target) const {\n\tif (!target || target == m_player.getPlayer()) {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b19e7d101a6fe20fae4e6c580c7c7bc1f3e493f7860a3d864a38f57a98ad9bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2247, + "startColumn": 2, + "charOffset": 76119, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2245, + "startColumn": 2, + "charOffset": 76060, + "charLength": 2, + "snippet": { + "text": "\tuint8_t stage = getStage(WheelStage_t::DIVINE_GRENADE);\n\n\tif (stage >= 3) {\n\t\tdamageBonus = 100;\n\t} else if (stage >= 2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88d8677f1656e19bc7fb8b86303aee6fbd920dcc190f450e4fa4ca2a3521a5ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2248, + "startColumn": 17, + "charOffset": 76153, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2246, + "startColumn": 17, + "charOffset": 76117, + "charLength": 3, + "snippet": { + "text": "\n\tif (stage >= 3) {\n\t\tdamageBonus = 100;\n\t} else if (stage >= 2) {\n\t\tdamageBonus = 60;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c80278582cfbd3006742b215ddff8a019461f13983648d60f498331056e621e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2250, + "startColumn": 17, + "charOffset": 76200, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 2248, + "startColumn": 17, + "charOffset": 76137, + "charLength": 2, + "snippet": { + "text": "\t\tdamageBonus = 100;\n\t} else if (stage >= 2) {\n\t\tdamageBonus = 60;\n\t} else if (stage >= 1) {\n\t\tdamageBonus = 30;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7e46738f8d0ebeaa696862c47b71ff5d41f9733b6255648555d0a4a0ad4a371" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2252, + "startColumn": 17, + "charOffset": 76246, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 2250, + "startColumn": 17, + "charOffset": 76184, + "charLength": 2, + "snippet": { + "text": "\t\tdamageBonus = 60;\n\t} else if (stage >= 1) {\n\t\tdamageBonus = 30;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ac3a90edaffeaae491125391fa30276f854b58a7a3a2ae9aeb69b7abb3ebc75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2261, + "startColumn": 80, + "charOffset": 76433, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2259, + "startColumn": 80, + "charOffset": 76316, + "charLength": 3, + "snippet": { + "text": "\t// Healing\n\tCombatDamage giftDamage;\n\tgiftDamage.primary.value = (m_player.getMaxHealth() * getGiftOfLifeValue()) / 100;\n\tgiftDamage.primary.type = COMBAT_HEALING;\n\tm_player.sendTextMessage(MESSAGE_EVENT_ADVANCE, \"That was close! Fortunately, your were saved by the Gift of Life.\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f71c7af8db10c5aa5723beb24ec21aed890e1ea5d4e56b42cef52fc24498efda" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2265, + "startColumn": 11, + "charOffset": 76681, + "charLength": 18, + "snippet": { + "text": "combatChangeHealth" + } + }, + "contextRegion": { + "startLine": 2263, + "startColumn": 11, + "charOffset": 76481, + "charLength": 18, + "snippet": { + "text": "\tm_player.sendTextMessage(MESSAGE_EVENT_ADVANCE, \"That was close! Fortunately, your were saved by the Gift of Life.\");\n\tg_game().addMagicEffect(m_player.getPosition(), CONST_ME_WATER_DROP);\n\tg_game().combatChangeHealth(m_player.getPlayer(), m_player.getPlayer(), giftDamage);\n\t// Condition cooldown reduction\n\tuint16_t reductionTimer = 60000;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa5e7dc3921ad85c30c3270d47dc9905e81a31890f553a04b26c5986ffec6a0f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2267, + "startColumn": 28, + "charOffset": 76817, + "charLength": 5, + "snippet": { + "text": "60000" + } + }, + "contextRegion": { + "startLine": 2265, + "startColumn": 28, + "charOffset": 76671, + "charLength": 5, + "snippet": { + "text": "\tg_game().combatChangeHealth(m_player.getPlayer(), m_player.getPlayer(), giftDamage);\n\t// Condition cooldown reduction\n\tuint16_t reductionTimer = 60000;\n\treduceAllSpellsCooldownTimer(reductionTimer);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ecd942e071df48485996bf15c8f4e9cdbffc1a8d8c030e613decd897fdc2e9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2271, + "startColumn": 20, + "charOffset": 76908, + "charLength": 26, + "snippet": { + "text": "getGiftOfLifeTotalCooldown" + } + }, + "contextRegion": { + "startLine": 2269, + "startColumn": 20, + "charOffset": 76871, + "charLength": 26, + "snippet": { + "text": "\n\t// Set cooldown\n\tsetGiftOfCooldown(getGiftOfLifeTotalCooldown(), false);\n\tsendGiftOfLifeCooldown();\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "91760d872f0d073395cb780d17ff1859088962eb94641fab2e229ea30f3a44c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2275, + "startColumn": 82, + "charOffset": 77057, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 2273, + "startColumn": 82, + "charOffset": 76973, + "charLength": 6, + "snippet": { + "text": "}\n\nint32_t PlayerWheel::checkBlessingGroveHealingByTarget(std::shared_ptr target) const {\n\tif (!target || target == m_player.getPlayer()) {\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "100471f748a3a5ca23521cbeab00c3171de5fbd8c9653faddeb75e1cf0f31985" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2276, + "startColumn": 6, + "charOffset": 77078, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2274, + "startColumn": 6, + "charOffset": 76975, + "charLength": 1, + "snippet": { + "text": "\nint32_t PlayerWheel::checkBlessingGroveHealingByTarget(std::shared_ptr target) const {\n\tif (!target || target == m_player.getPlayer()) {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fda2eae6a59ecceffbfe8ea316fb1d16129a1b8f73accbfd0aa3cb67811c92d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2282, + "startColumn": 26, + "charOffset": 77255, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 2280, + "startColumn": 26, + "charOffset": 77139, + "charLength": 3, + "snippet": { + "text": "\tint32_t healingBonus = 0;\n\tuint8_t stage = getStage(WheelStage_t::BLESSING_OF_THE_GROVE);\n\tint32_t healthPercent = std::round((static_cast(target->getHealth()) * 100) / static_cast(target->getMaxHealth()));\n\tif (healthPercent <= 30) {\n\t\tif (stage >= 3) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23bfb84cf3df3b15f6992b0915e8a445078de9bae0982114eacff4d44ac55eed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2282, + "startColumn": 26, + "charOffset": 77255, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 2280, + "startColumn": 26, + "charOffset": 77139, + "charLength": 3, + "snippet": { + "text": "\tint32_t healingBonus = 0;\n\tuint8_t stage = getStage(WheelStage_t::BLESSING_OF_THE_GROVE);\n\tint32_t healthPercent = std::round((static_cast(target->getHealth()) * 100) / static_cast(target->getMaxHealth()));\n\tif (healthPercent <= 30) {\n\t\tif (stage >= 3) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94a69a888ecc23e56abd116acb91407069408978e38b443ab91621048cedba8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2282, + "startColumn": 81, + "charOffset": 77310, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2280, + "startColumn": 81, + "charOffset": 77139, + "charLength": 3, + "snippet": { + "text": "\tint32_t healingBonus = 0;\n\tuint8_t stage = getStage(WheelStage_t::BLESSING_OF_THE_GROVE);\n\tint32_t healthPercent = std::round((static_cast(target->getHealth()) * 100) / static_cast(target->getMaxHealth()));\n\tif (healthPercent <= 30) {\n\t\tif (stage >= 3) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e4828b426ba67f21fafe8e13c43d97d67ba2a3c1ceaca80d9aff8823b6662f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2283, + "startColumn": 2, + "charOffset": 77364, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2281, + "startColumn": 2, + "charOffset": 77166, + "charLength": 2, + "snippet": { + "text": "\tuint8_t stage = getStage(WheelStage_t::BLESSING_OF_THE_GROVE);\n\tint32_t healthPercent = std::round((static_cast(target->getHealth()) * 100) / static_cast(target->getMaxHealth()));\n\tif (healthPercent <= 30) {\n\t\tif (stage >= 3) {\n\t\t\thealingBonus = 24;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf5c74e8daa4b36da1478a588353e902a50012016223e34e0dc4f1da0d1d439d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2283, + "startColumn": 23, + "charOffset": 77385, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 2281, + "startColumn": 23, + "charOffset": 77166, + "charLength": 2, + "snippet": { + "text": "\tuint8_t stage = getStage(WheelStage_t::BLESSING_OF_THE_GROVE);\n\tint32_t healthPercent = std::round((static_cast(target->getHealth()) * 100) / static_cast(target->getMaxHealth()));\n\tif (healthPercent <= 30) {\n\t\tif (stage >= 3) {\n\t\t\thealingBonus = 24;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1fb20a425adba7d8ec96ffaece16b2f9b62642f9df0b0f5c7592cf22b3de889c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2284, + "startColumn": 3, + "charOffset": 77393, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2282, + "startColumn": 3, + "charOffset": 77230, + "charLength": 2, + "snippet": { + "text": "\tint32_t healthPercent = std::round((static_cast(target->getHealth()) * 100) / static_cast(target->getMaxHealth()));\n\tif (healthPercent <= 30) {\n\t\tif (stage >= 3) {\n\t\t\thealingBonus = 24;\n\t\t} else if (stage >= 2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4cc1930ccc4e3123b6085a7c3558492e49427bb88890889311d65e7d44111933" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2285, + "startColumn": 19, + "charOffset": 77429, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 2283, + "startColumn": 19, + "charOffset": 77363, + "charLength": 2, + "snippet": { + "text": "\tif (healthPercent <= 30) {\n\t\tif (stage >= 3) {\n\t\t\thealingBonus = 24;\n\t\t} else if (stage >= 2) {\n\t\t\thealingBonus = 18;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "701d40d136e4a0310d95d63c9859f821cb97ce5ad247ae63b8362c131d673286" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "18 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2287, + "startColumn": 19, + "charOffset": 77478, + "charLength": 2, + "snippet": { + "text": "18" + } + }, + "contextRegion": { + "startLine": 2285, + "startColumn": 19, + "charOffset": 77411, + "charLength": 2, + "snippet": { + "text": "\t\t\thealingBonus = 24;\n\t\t} else if (stage >= 2) {\n\t\t\thealingBonus = 18;\n\t\t} else if (stage >= 1) {\n\t\t\thealingBonus = 12;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef1802cd49e4e3259a6c3d915e2f841f21f0b058ab4c128ee863ddf89114c4b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "12 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2289, + "startColumn": 19, + "charOffset": 77527, + "charLength": 2, + "snippet": { + "text": "12" + } + }, + "contextRegion": { + "startLine": 2287, + "startColumn": 19, + "charOffset": 77460, + "charLength": 2, + "snippet": { + "text": "\t\t\thealingBonus = 18;\n\t\t} else if (stage >= 1) {\n\t\t\thealingBonus = 12;\n\t\t}\n\t} else if (healthPercent <= 60) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53ace23594dd2662d327364e88ce49c29e67a9235b743d042b39d39879c61b19" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2291, + "startColumn": 30, + "charOffset": 77564, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 2289, + "startColumn": 30, + "charOffset": 77509, + "charLength": 2, + "snippet": { + "text": "\t\t\thealingBonus = 12;\n\t\t}\n\t} else if (healthPercent <= 60) {\n\t\tif (stage >= 3) {\n\t\t\thealingBonus = 12;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "323ffc3b4eb1d890ba2d3438ec6c738b41526567e4e7708eb1515ebbf7bb58ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2292, + "startColumn": 3, + "charOffset": 77572, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2290, + "startColumn": 3, + "charOffset": 77531, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\t} else if (healthPercent <= 60) {\n\t\tif (stage >= 3) {\n\t\t\thealingBonus = 12;\n\t\t} else if (stage >= 2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd105c530a3e0e5cf1c2875c3805548b83fd1015b57d087116f5af4b24557963" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "12 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2293, + "startColumn": 19, + "charOffset": 77608, + "charLength": 2, + "snippet": { + "text": "12" + } + }, + "contextRegion": { + "startLine": 2291, + "startColumn": 19, + "charOffset": 77535, + "charLength": 2, + "snippet": { + "text": "\t} else if (healthPercent <= 60) {\n\t\tif (stage >= 3) {\n\t\t\thealingBonus = 12;\n\t\t} else if (stage >= 2) {\n\t\t\thealingBonus = 9;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c591dd0abb7b3b345dd5da221165be3ee0485457f93df994735d45b52a6fac8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2295, + "startColumn": 19, + "charOffset": 77657, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 2293, + "startColumn": 19, + "charOffset": 77590, + "charLength": 1, + "snippet": { + "text": "\t\t\thealingBonus = 12;\n\t\t} else if (stage >= 2) {\n\t\t\thealingBonus = 9;\n\t\t} else if (stage >= 1) {\n\t\t\thealingBonus = 6;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d813554eda5a17b4aa116d6a852e227cf36b3917607676a7e54cf74b47ca442e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2297, + "startColumn": 19, + "charOffset": 77705, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 2295, + "startColumn": 19, + "charOffset": 77639, + "charLength": 1, + "snippet": { + "text": "\t\t\thealingBonus = 9;\n\t\t} else if (stage >= 1) {\n\t\t\thealingBonus = 6;\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e73336e0dd3cf6dc1f4657818304ee1935de23d68defb0d313302123878fb9eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2304, + "startColumn": 71, + "charOffset": 77811, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 2302, + "startColumn": 71, + "charOffset": 77738, + "charLength": 6, + "snippet": { + "text": "}\n\nint32_t PlayerWheel::checkTwinBurstByTarget(std::shared_ptr target) const {\n\tif (!target || target == m_player.getPlayer()) {\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2931b824ce7a5e304817e34947432a760cf40639fbdb4438381590520cd8c00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2305, + "startColumn": 6, + "charOffset": 77832, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2303, + "startColumn": 6, + "charOffset": 77740, + "charLength": 1, + "snippet": { + "text": "\nint32_t PlayerWheel::checkTwinBurstByTarget(std::shared_ptr target) const {\n\tif (!target || target == m_player.getPlayer()) {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07fa140f1a0bfb52eeee09854fe9bcd63b7d11c859fe71e28638b0e643ac970c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2311, + "startColumn": 26, + "charOffset": 77997, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 2309, + "startColumn": 26, + "charOffset": 77893, + "charLength": 3, + "snippet": { + "text": "\tint32_t damageBonus = 0;\n\tuint8_t stage = getStage(WheelStage_t::TWIN_BURST);\n\tint32_t healthPercent = std::round((static_cast(target->getHealth()) * 100) / static_cast(target->getMaxHealth()));\n\tif (healthPercent > 60) {\n\t\tif (stage >= 3) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e29115a5e772f6c92647b94b74a1035d1f479ee116314986ccd67e94d8b982d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2311, + "startColumn": 26, + "charOffset": 77997, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 2309, + "startColumn": 26, + "charOffset": 77893, + "charLength": 3, + "snippet": { + "text": "\tint32_t damageBonus = 0;\n\tuint8_t stage = getStage(WheelStage_t::TWIN_BURST);\n\tint32_t healthPercent = std::round((static_cast(target->getHealth()) * 100) / static_cast(target->getMaxHealth()));\n\tif (healthPercent > 60) {\n\t\tif (stage >= 3) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3abd6e92a9b413bf2915584c1cc5119629ceec3da179d6864b451b5badea6dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2311, + "startColumn": 81, + "charOffset": 78052, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2309, + "startColumn": 81, + "charOffset": 77893, + "charLength": 3, + "snippet": { + "text": "\tint32_t damageBonus = 0;\n\tuint8_t stage = getStage(WheelStage_t::TWIN_BURST);\n\tint32_t healthPercent = std::round((static_cast(target->getHealth()) * 100) / static_cast(target->getMaxHealth()));\n\tif (healthPercent > 60) {\n\t\tif (stage >= 3) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df20eab233d710885d4174319d1ece93d1d172fc5c4756c8235f80293de4e725" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2312, + "startColumn": 22, + "charOffset": 78126, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 2310, + "startColumn": 22, + "charOffset": 77919, + "charLength": 2, + "snippet": { + "text": "\tuint8_t stage = getStage(WheelStage_t::TWIN_BURST);\n\tint32_t healthPercent = std::round((static_cast(target->getHealth()) * 100) / static_cast(target->getMaxHealth()));\n\tif (healthPercent > 60) {\n\t\tif (stage >= 3) {\n\t\t\tdamageBonus = 60;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "137882e4162cd3245d7face84313cf20e8c259d35a91ed26796bb0e8c396be97" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2313, + "startColumn": 3, + "charOffset": 78134, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2311, + "startColumn": 3, + "charOffset": 77972, + "charLength": 2, + "snippet": { + "text": "\tint32_t healthPercent = std::round((static_cast(target->getHealth()) * 100) / static_cast(target->getMaxHealth()));\n\tif (healthPercent > 60) {\n\t\tif (stage >= 3) {\n\t\t\tdamageBonus = 60;\n\t\t} else if (stage >= 2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfc160c046a5cfb2d3ef5458f0d2536abb6be4984595aea3149539acfc9f1853" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2314, + "startColumn": 18, + "charOffset": 78169, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 2312, + "startColumn": 18, + "charOffset": 78105, + "charLength": 2, + "snippet": { + "text": "\tif (healthPercent > 60) {\n\t\tif (stage >= 3) {\n\t\t\tdamageBonus = 60;\n\t\t} else if (stage >= 2) {\n\t\t\tdamageBonus = 40;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29e3ac222002ecca042f50663f86739c1a31237a7753d78cb16e45b3e4a30c75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2316, + "startColumn": 18, + "charOffset": 78217, + "charLength": 2, + "snippet": { + "text": "40" + } + }, + "contextRegion": { + "startLine": 2314, + "startColumn": 18, + "charOffset": 78152, + "charLength": 2, + "snippet": { + "text": "\t\t\tdamageBonus = 60;\n\t\t} else if (stage >= 2) {\n\t\t\tdamageBonus = 40;\n\t\t} else if (stage >= 1) {\n\t\t\tdamageBonus = 20;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4301c026555313fe9d8be37d2a0c711173418023fb240e3d68fb4f1bbaa45c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2318, + "startColumn": 18, + "charOffset": 78265, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 2316, + "startColumn": 18, + "charOffset": 78200, + "charLength": 2, + "snippet": { + "text": "\t\t\tdamageBonus = 40;\n\t\t} else if (stage >= 1) {\n\t\t\tdamageBonus = 20;\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "965df8896ac653191423d1429ff5f74850efa8be7db9c70bc68fb6609d194e96" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2325, + "startColumn": 71, + "charOffset": 78371, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 2323, + "startColumn": 71, + "charOffset": 78298, + "charLength": 6, + "snippet": { + "text": "}\n\nint32_t PlayerWheel::checkExecutionersThrow(std::shared_ptr target) const {\n\tif (!target || target == m_player.getPlayer()) {\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4d95063b84a3a7c5a67e9707ab2eacc49bcbd19dfced1098edec326efbb4b8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2326, + "startColumn": 6, + "charOffset": 78392, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2324, + "startColumn": 6, + "charOffset": 78300, + "charLength": 1, + "snippet": { + "text": "\nint32_t PlayerWheel::checkExecutionersThrow(std::shared_ptr target) const {\n\tif (!target || target == m_player.getPlayer()) {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af8ed326c6f741f88baa6e7eecb5c35e7fd19040d75651fe7a64cce3bb2b19a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2332, + "startColumn": 26, + "charOffset": 78565, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 2330, + "startColumn": 26, + "charOffset": 78453, + "charLength": 3, + "snippet": { + "text": "\tint32_t damageBonus = 0;\n\tuint8_t stage = getStage(WheelStage_t::EXECUTIONERS_THROW);\n\tint32_t healthPercent = std::round((static_cast(target->getHealth()) * 100) / static_cast(target->getMaxHealth()));\n\tif (healthPercent <= 30) {\n\t\tif (stage >= 3) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39508dc3b7d5400aa2eeb6327f868f8161286a960a18d6e13b6563989e93ea94" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2332, + "startColumn": 26, + "charOffset": 78565, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 2330, + "startColumn": 26, + "charOffset": 78453, + "charLength": 3, + "snippet": { + "text": "\tint32_t damageBonus = 0;\n\tuint8_t stage = getStage(WheelStage_t::EXECUTIONERS_THROW);\n\tint32_t healthPercent = std::round((static_cast(target->getHealth()) * 100) / static_cast(target->getMaxHealth()));\n\tif (healthPercent <= 30) {\n\t\tif (stage >= 3) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51f758245ccd40374328ffa39887639a5812a048ec22bfaa01b28be48c9e3b47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2332, + "startColumn": 81, + "charOffset": 78620, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2330, + "startColumn": 81, + "charOffset": 78453, + "charLength": 3, + "snippet": { + "text": "\tint32_t damageBonus = 0;\n\tuint8_t stage = getStage(WheelStage_t::EXECUTIONERS_THROW);\n\tint32_t healthPercent = std::round((static_cast(target->getHealth()) * 100) / static_cast(target->getMaxHealth()));\n\tif (healthPercent <= 30) {\n\t\tif (stage >= 3) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e7ed4d64f74f10c5c5102199f8d5cb1afd8e57df4aa3d053ee8b601d02a88a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2333, + "startColumn": 23, + "charOffset": 78695, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 2331, + "startColumn": 23, + "charOffset": 78479, + "charLength": 2, + "snippet": { + "text": "\tuint8_t stage = getStage(WheelStage_t::EXECUTIONERS_THROW);\n\tint32_t healthPercent = std::round((static_cast(target->getHealth()) * 100) / static_cast(target->getMaxHealth()));\n\tif (healthPercent <= 30) {\n\t\tif (stage >= 3) {\n\t\t\tdamageBonus = 150;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b55e03405a16e3dfc4600d802bf2a172cb8b5185b3b0dfd65ffc9a6bcc4b4cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2334, + "startColumn": 3, + "charOffset": 78703, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2332, + "startColumn": 3, + "charOffset": 78540, + "charLength": 2, + "snippet": { + "text": "\tint32_t healthPercent = std::round((static_cast(target->getHealth()) * 100) / static_cast(target->getMaxHealth()));\n\tif (healthPercent <= 30) {\n\t\tif (stage >= 3) {\n\t\t\tdamageBonus = 150;\n\t\t} else if (stage >= 2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7514dcae7e8638590d0d4c216792952aeaf3017f92a1f50b0a0ed7d9e57c24d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "150 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2335, + "startColumn": 18, + "charOffset": 78738, + "charLength": 3, + "snippet": { + "text": "150" + } + }, + "contextRegion": { + "startLine": 2333, + "startColumn": 18, + "charOffset": 78673, + "charLength": 3, + "snippet": { + "text": "\tif (healthPercent <= 30) {\n\t\tif (stage >= 3) {\n\t\t\tdamageBonus = 150;\n\t\t} else if (stage >= 2) {\n\t\t\tdamageBonus = 125;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "abd7991a239352d46ccfc2b344c003ca8052d3d45d06fa03879cf888c2eec995" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "125 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2337, + "startColumn": 18, + "charOffset": 78787, + "charLength": 3, + "snippet": { + "text": "125" + } + }, + "contextRegion": { + "startLine": 2335, + "startColumn": 18, + "charOffset": 78721, + "charLength": 3, + "snippet": { + "text": "\t\t\tdamageBonus = 150;\n\t\t} else if (stage >= 2) {\n\t\t\tdamageBonus = 125;\n\t\t} else if (stage >= 1) {\n\t\t\tdamageBonus = 100;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d10b1d4f0759731f226f1f3ec501b1429a2005fbc2d2b9ad8cea8e632f05a3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2339, + "startColumn": 18, + "charOffset": 78836, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2337, + "startColumn": 18, + "charOffset": 78770, + "charLength": 3, + "snippet": { + "text": "\t\t\tdamageBonus = 125;\n\t\t} else if (stage >= 1) {\n\t\t\tdamageBonus = 100;\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb6e1623e46c02aa0f4ef6971a8b7a7b17a414bce5bf9ab747740298ff57ef5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2349, + "startColumn": 2, + "charOffset": 79009, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2347, + "startColumn": 2, + "charOffset": 78927, + "charLength": 2, + "snippet": { + "text": "\tint32_t damageBoost = 0;\n\tuint8_t stage = getStage(WheelStage_t::BEAM_MASTERY);\n\tif (stage >= 3) {\n\t\tdamageBoost = 14;\n\t} else if (stage >= 2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37f0d9f4c17ecbbbb536e093b0c05978050a1763d75f0f1c855a4238ea20bb87" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "14 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2350, + "startColumn": 17, + "charOffset": 79043, + "charLength": 2, + "snippet": { + "text": "14" + } + }, + "contextRegion": { + "startLine": 2348, + "startColumn": 17, + "charOffset": 78953, + "charLength": 2, + "snippet": { + "text": "\tuint8_t stage = getStage(WheelStage_t::BEAM_MASTERY);\n\tif (stage >= 3) {\n\t\tdamageBoost = 14;\n\t} else if (stage >= 2) {\n\t\tdamageBoost = 12;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a4fc98a219b977a6488641ddccb089c22f69b3c16950ad2daada3aefa150880" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "12 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2352, + "startColumn": 17, + "charOffset": 79089, + "charLength": 2, + "snippet": { + "text": "12" + } + }, + "contextRegion": { + "startLine": 2350, + "startColumn": 17, + "charOffset": 79027, + "charLength": 2, + "snippet": { + "text": "\t\tdamageBoost = 14;\n\t} else if (stage >= 2) {\n\t\tdamageBoost = 12;\n\t} else if (stage >= 1) {\n\t\tdamageBoost = 10;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ebe859fca07c9b2829cbafd87b762a4e1f71f5e2e795009a6dde8fdb1ebea709" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2354, + "startColumn": 17, + "charOffset": 79135, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 2352, + "startColumn": 17, + "charOffset": 79073, + "charLength": 2, + "snippet": { + "text": "\t\tdamageBoost = 12;\n\t} else if (stage >= 1) {\n\t\tdamageBoost = 10;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a22daf3245bd850ecb5f07e7290d4f614eb265dd4d6e42716d6f6d62c5d7469" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'checkDrainBodyLeech' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2360, + "startColumn": 22, + "charOffset": 79188, + "charLength": 19, + "snippet": { + "text": "checkDrainBodyLeech" + } + }, + "contextRegion": { + "startLine": 2358, + "startColumn": 22, + "charOffset": 79164, + "charLength": 19, + "snippet": { + "text": "}\n\nint32_t PlayerWheel::checkDrainBodyLeech(std::shared_ptr target, skills_t skill) const {\n\tif (!target || !target->getMonster() || target->getWheelOfDestinyDrainBodyDebuff() == 0) {\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "630f6280f2f264995255b2156f7722c5bee351e0daa8cbb53a00679cbb0921c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2360, + "startColumn": 68, + "charOffset": 79234, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 2358, + "startColumn": 68, + "charOffset": 79164, + "charLength": 6, + "snippet": { + "text": "}\n\nint32_t PlayerWheel::checkDrainBodyLeech(std::shared_ptr target, skills_t skill) const {\n\tif (!target || !target->getMonster() || target->getWheelOfDestinyDrainBodyDebuff() == 0) {\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26a415c79759082dfce5da9890f3f2075d6afd3956a5c7e33c0d2649906ab56d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2361, + "startColumn": 6, + "charOffset": 79271, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2359, + "startColumn": 6, + "charOffset": 79166, + "charLength": 1, + "snippet": { + "text": "\nint32_t PlayerWheel::checkDrainBodyLeech(std::shared_ptr target, skills_t skill) const {\n\tif (!target || !target->getMonster() || target->getWheelOfDestinyDrainBodyDebuff() == 0) {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66eb9facc51bda65fddf46990229613dd71d15519df9e587573b20f22e66ef83" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2361, + "startColumn": 17, + "charOffset": 79282, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2359, + "startColumn": 17, + "charOffset": 79166, + "charLength": 1, + "snippet": { + "text": "\nint32_t PlayerWheel::checkDrainBodyLeech(std::shared_ptr target, skills_t skill) const {\n\tif (!target || !target->getMonster() || target->getWheelOfDestinyDrainBodyDebuff() == 0) {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d45c52286eeca09ce4feecee5e5e661ed7c869947451bd5b3717ad7a63d9bd9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2366, + "startColumn": 45, + "charOffset": 79479, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2364, + "startColumn": 45, + "charOffset": 79373, + "charLength": 3, + "snippet": { + "text": "\n\tuint8_t stage = target->getWheelOfDestinyDrainBodyDebuff();\n\tif (target->getBuff(BUFF_DAMAGERECEIVED) > 100 && skill == SKILL_MANA_LEECH_AMOUNT) {\n\t\tint32_t manaLeechSkill = 0;\n\t\tif (stage >= 3) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba7c7f6057df0eb332d9b86462151e75cb257ba667409c20b3fc790b7ef96da4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2368, + "startColumn": 3, + "charOffset": 79554, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2366, + "startColumn": 3, + "charOffset": 79435, + "charLength": 2, + "snippet": { + "text": "\tif (target->getBuff(BUFF_DAMAGERECEIVED) > 100 && skill == SKILL_MANA_LEECH_AMOUNT) {\n\t\tint32_t manaLeechSkill = 0;\n\t\tif (stage >= 3) {\n\t\t\tmanaLeechSkill = 400;\n\t\t} else if (stage >= 2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "097fa83554dd3aef6963e12dd8432d07d8b7839f60e72a79d19840a0559e8a39" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2369, + "startColumn": 21, + "charOffset": 79592, + "charLength": 3, + "snippet": { + "text": "400" + } + }, + "contextRegion": { + "startLine": 2367, + "startColumn": 21, + "charOffset": 79522, + "charLength": 3, + "snippet": { + "text": "\t\tint32_t manaLeechSkill = 0;\n\t\tif (stage >= 3) {\n\t\t\tmanaLeechSkill = 400;\n\t\t} else if (stage >= 2) {\n\t\t\tmanaLeechSkill = 300;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa1bfe072a9c60123077e4df03bcbaeaaef8014bbe387374072f551565dcc7df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2371, + "startColumn": 21, + "charOffset": 79644, + "charLength": 3, + "snippet": { + "text": "300" + } + }, + "contextRegion": { + "startLine": 2369, + "startColumn": 21, + "charOffset": 79572, + "charLength": 3, + "snippet": { + "text": "\t\t\tmanaLeechSkill = 400;\n\t\t} else if (stage >= 2) {\n\t\t\tmanaLeechSkill = 300;\n\t\t} else if (stage >= 1) {\n\t\t\tmanaLeechSkill = 200;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85a530204a8f2fb2bcdd1693abe39b5aaab5c1b3a55c79e95b7ab4e2876a585e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2373, + "startColumn": 21, + "charOffset": 79696, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 2371, + "startColumn": 21, + "charOffset": 79624, + "charLength": 3, + "snippet": { + "text": "\t\t\tmanaLeechSkill = 300;\n\t\t} else if (stage >= 1) {\n\t\t\tmanaLeechSkill = 200;\n\t\t}\n\t\treturn manaLeechSkill;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bcbf11e2ca3d51dbba358f5474a9da7ca50438800857c088c3e8793d7cffad99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2378, + "startColumn": 42, + "charOffset": 79775, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2376, + "startColumn": 42, + "charOffset": 79730, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tif (target->getBuff(BUFF_DAMAGEDEALT) < 100 && skill == SKILL_LIFE_LEECH_AMOUNT) {\n\t\tint32_t lifeLeechSkill = 0;\n\t\tif (stage >= 3) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f07af1e6c83544d73e7bd35783f4600b4acb92e529125e105ad81e3f15f3888" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2380, + "startColumn": 3, + "charOffset": 79850, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2378, + "startColumn": 3, + "charOffset": 79734, + "charLength": 2, + "snippet": { + "text": "\tif (target->getBuff(BUFF_DAMAGEDEALT) < 100 && skill == SKILL_LIFE_LEECH_AMOUNT) {\n\t\tint32_t lifeLeechSkill = 0;\n\t\tif (stage >= 3) {\n\t\t\tlifeLeechSkill = 500;\n\t\t} else if (stage >= 2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "edf4e81e0fe6868ebd56755ac4a6a54b542a17a35bb05069df71b89fa5dd1085" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "500 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2381, + "startColumn": 21, + "charOffset": 79888, + "charLength": 3, + "snippet": { + "text": "500" + } + }, + "contextRegion": { + "startLine": 2379, + "startColumn": 21, + "charOffset": 79818, + "charLength": 3, + "snippet": { + "text": "\t\tint32_t lifeLeechSkill = 0;\n\t\tif (stage >= 3) {\n\t\t\tlifeLeechSkill = 500;\n\t\t} else if (stage >= 2) {\n\t\t\tlifeLeechSkill = 400;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb8b52075567139b7b2cb0e5c6a0b35f8e1f07547f377e376ed01f2b7eb7496b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2383, + "startColumn": 21, + "charOffset": 79940, + "charLength": 3, + "snippet": { + "text": "400" + } + }, + "contextRegion": { + "startLine": 2381, + "startColumn": 21, + "charOffset": 79868, + "charLength": 3, + "snippet": { + "text": "\t\t\tlifeLeechSkill = 500;\n\t\t} else if (stage >= 2) {\n\t\t\tlifeLeechSkill = 400;\n\t\t} else if (stage >= 1) {\n\t\t\tlifeLeechSkill = 300;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58b4d866710137738363567362ec24cefbec734292d7869c941201748e08eca0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2385, + "startColumn": 21, + "charOffset": 79992, + "charLength": 3, + "snippet": { + "text": "300" + } + }, + "contextRegion": { + "startLine": 2383, + "startColumn": 21, + "charOffset": 79920, + "charLength": 3, + "snippet": { + "text": "\t\t\tlifeLeechSkill = 400;\n\t\t} else if (stage >= 1) {\n\t\t\tlifeLeechSkill = 300;\n\t\t}\n\t\treturn lifeLeechSkill;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "377062f71bd9087b271d46ce38a6da898c5f19c8c7a149752d51c4f963353df1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2394, + "startColumn": 18, + "charOffset": 80117, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 2392, + "startColumn": 18, + "charOffset": 80043, + "charLength": 1, + "snippet": { + "text": "\nint32_t PlayerWheel::checkBattleHealingAmount() const {\n\tdouble amount = (double)m_player.getSkillLevel(SKILL_SHIELD) * 0.2;\n\tuint8_t healthPercent = (m_player.getHealth() * 100) / m_player.getMaxHealth();\n\tif (healthPercent <= 30) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e9542a894c67c03c7f9cf74207d52d6ded55198a364cdca691e7983b14e2b58" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.2 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2394, + "startColumn": 65, + "charOffset": 80164, + "charLength": 3, + "snippet": { + "text": "0.2" + } + }, + "contextRegion": { + "startLine": 2392, + "startColumn": 65, + "charOffset": 80043, + "charLength": 3, + "snippet": { + "text": "\nint32_t PlayerWheel::checkBattleHealingAmount() const {\n\tdouble amount = (double)m_player.getSkillLevel(SKILL_SHIELD) * 0.2;\n\tuint8_t healthPercent = (m_player.getHealth() * 100) / m_player.getMaxHealth();\n\tif (healthPercent <= 30) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ed7953220ca6bcf99dad02037abe540ea81ecc015e210f5189d72855a9164b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2395, + "startColumn": 26, + "charOffset": 80194, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 2393, + "startColumn": 26, + "charOffset": 80044, + "charLength": 1, + "snippet": { + "text": "int32_t PlayerWheel::checkBattleHealingAmount() const {\n\tdouble amount = (double)m_player.getSkillLevel(SKILL_SHIELD) * 0.2;\n\tuint8_t healthPercent = (m_player.getHealth() * 100) / m_player.getMaxHealth();\n\tif (healthPercent <= 30) {\n\t\tamount *= 3;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d472a3c6404e760eb488a63245ed60342ea675ec54141b9724b706ee8341493e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2395, + "startColumn": 50, + "charOffset": 80218, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2393, + "startColumn": 50, + "charOffset": 80044, + "charLength": 3, + "snippet": { + "text": "int32_t PlayerWheel::checkBattleHealingAmount() const {\n\tdouble amount = (double)m_player.getSkillLevel(SKILL_SHIELD) * 0.2;\n\tuint8_t healthPercent = (m_player.getHealth() * 100) / m_player.getMaxHealth();\n\tif (healthPercent <= 30) {\n\t\tamount *= 3;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f75c8930f4a37f68e45b90dce5c5849bd28708bb621deed53ebe77f1a665c41f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2396, + "startColumn": 2, + "charOffset": 80251, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2394, + "startColumn": 2, + "charOffset": 80100, + "charLength": 2, + "snippet": { + "text": "\tdouble amount = (double)m_player.getSkillLevel(SKILL_SHIELD) * 0.2;\n\tuint8_t healthPercent = (m_player.getHealth() * 100) / m_player.getMaxHealth();\n\tif (healthPercent <= 30) {\n\t\tamount *= 3;\n\t} else if (healthPercent <= 60) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "91eead7a0db6fe5d754875d911337d5240ad2ca3fd51e83ec82f06d2d99f5dd6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2396, + "startColumn": 23, + "charOffset": 80272, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 2394, + "startColumn": 23, + "charOffset": 80100, + "charLength": 2, + "snippet": { + "text": "\tdouble amount = (double)m_player.getSkillLevel(SKILL_SHIELD) * 0.2;\n\tuint8_t healthPercent = (m_player.getHealth() * 100) / m_player.getMaxHealth();\n\tif (healthPercent <= 30) {\n\t\tamount *= 3;\n\t} else if (healthPercent <= 60) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6251ffc290a481ee389965a594b3d1880cfee96ffa76ed6e18164f0c409aa769" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2397, + "startColumn": 13, + "charOffset": 80290, + "charLength": 1, + "snippet": { + "text": "3" + } + }, + "contextRegion": { + "startLine": 2395, + "startColumn": 13, + "charOffset": 80169, + "charLength": 1, + "snippet": { + "text": "\tuint8_t healthPercent = (m_player.getHealth() * 100) / m_player.getMaxHealth();\n\tif (healthPercent <= 30) {\n\t\tamount *= 3;\n\t} else if (healthPercent <= 60) {\n\t\tamount *= 2;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "145198b934f5b81dffbaf07514ed7448fe8a54bb49381ed7e14af05766ebbeeb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2398, + "startColumn": 30, + "charOffset": 80322, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 2396, + "startColumn": 30, + "charOffset": 80250, + "charLength": 2, + "snippet": { + "text": "\tif (healthPercent <= 30) {\n\t\tamount *= 3;\n\t} else if (healthPercent <= 60) {\n\t\tamount *= 2;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6517a539786176f7611bd23b1c0c528cd7f8c99dcd954874822fd0ebab2ddba5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2399, + "startColumn": 13, + "charOffset": 80340, + "charLength": 1, + "snippet": { + "text": "2" + } + }, + "contextRegion": { + "startLine": 2397, + "startColumn": 13, + "charOffset": 80278, + "charLength": 1, + "snippet": { + "text": "\t\tamount *= 3;\n\t} else if (healthPercent <= 60) {\n\t\tamount *= 2;\n\t}\n\treturn (int32_t)amount;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "244477ffe0f5ad93413c18e7a2c083460d5f658baabb79dc43869f697f6b4e16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2401, + "startColumn": 9, + "charOffset": 80354, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 2399, + "startColumn": 9, + "charOffset": 80328, + "charLength": 1, + "snippet": { + "text": "\t\tamount *= 2;\n\t}\n\treturn (int32_t)amount;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b92e23dd99d1651c5c6902753ee4ffc26ac8378ce723fa3f96854038fc1dd78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2426, + "startColumn": 2, + "charOffset": 81168, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2424, + "startColumn": 2, + "charOffset": 81163, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (skill == WheelAvatarSkill_t::DAMAGE_REDUCTION) {\n\t\tif (stage >= 3) {\n\t\t\treturn 15;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd67ea17fd6f7065a2c67082e8f676be04f8fb9d49059cf4276a72a6bed8e9f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2427, + "startColumn": 3, + "charOffset": 81223, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2425, + "startColumn": 3, + "charOffset": 81166, + "charLength": 2, + "snippet": { + "text": "\n\tif (skill == WheelAvatarSkill_t::DAMAGE_REDUCTION) {\n\t\tif (stage >= 3) {\n\t\t\treturn 15;\n\t\t} else if (stage >= 2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe82ea92d230469d271697d70c69e345459d7f1e038748d52aeb8217a2356b77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "15 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2428, + "startColumn": 11, + "charOffset": 81251, + "charLength": 2, + "snippet": { + "text": "15" + } + }, + "contextRegion": { + "startLine": 2426, + "startColumn": 11, + "charOffset": 81167, + "charLength": 2, + "snippet": { + "text": "\tif (skill == WheelAvatarSkill_t::DAMAGE_REDUCTION) {\n\t\tif (stage >= 3) {\n\t\t\treturn 15;\n\t\t} else if (stage >= 2) {\n\t\t\treturn 10;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c97499b5268e688c246ec03215158154bd40a80a242277ab54922b6cb5df1ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2429, + "startColumn": 5, + "charOffset": 81259, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 2427, + "startColumn": 5, + "charOffset": 81221, + "charLength": 4, + "snippet": { + "text": "\t\tif (stage >= 3) {\n\t\t\treturn 15;\n\t\t} else if (stage >= 2) {\n\t\t\treturn 10;\n\t\t} else if (stage >= 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b4bde57cb6679796b96826c65f45437cb107c047836d66eca867d889763862c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2430, + "startColumn": 11, + "charOffset": 81292, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 2428, + "startColumn": 11, + "charOffset": 81241, + "charLength": 2, + "snippet": { + "text": "\t\t\treturn 15;\n\t\t} else if (stage >= 2) {\n\t\t\treturn 10;\n\t\t} else if (stage >= 1) {\n\t\t\treturn 5;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "579dc50556ab01c371c237d492b10cab4d96110d13692af0b465974f73a77ec9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2432, + "startColumn": 11, + "charOffset": 81333, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2430, + "startColumn": 11, + "charOffset": 81282, + "charLength": 1, + "snippet": { + "text": "\t\t\treturn 10;\n\t\t} else if (stage >= 1) {\n\t\t\treturn 5;\n\t\t}\n\t} else if (skill == WheelAvatarSkill_t::CRITICAL_CHANCE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48c58a4be9ee4575c4f7d03868b6eddffc4ba554565c411295bae77280f5fb5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2435, + "startColumn": 10, + "charOffset": 81409, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 2433, + "startColumn": 10, + "charOffset": 81336, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\t} else if (skill == WheelAvatarSkill_t::CRITICAL_CHANCE) {\n\t\treturn 10000;\n\t} else if (skill == WheelAvatarSkill_t::CRITICAL_DAMAGE) {\n\t\tif (stage >= 3) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5843bac6fef4561e8d632a3931e76d46b0b353a66c4522a1848c1687edb6af69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2437, + "startColumn": 3, + "charOffset": 81478, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2435, + "startColumn": 3, + "charOffset": 81400, + "charLength": 2, + "snippet": { + "text": "\t\treturn 10000;\n\t} else if (skill == WheelAvatarSkill_t::CRITICAL_DAMAGE) {\n\t\tif (stage >= 3) {\n\t\t\treturn 1500;\n\t\t} else if (stage >= 2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb5fb564a65fb2a4673499598c79a3fd4e96e33efc4387cd2d0435995b66665b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1500 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2438, + "startColumn": 11, + "charOffset": 81506, + "charLength": 4, + "snippet": { + "text": "1500" + } + }, + "contextRegion": { + "startLine": 2436, + "startColumn": 11, + "charOffset": 81416, + "charLength": 4, + "snippet": { + "text": "\t} else if (skill == WheelAvatarSkill_t::CRITICAL_DAMAGE) {\n\t\tif (stage >= 3) {\n\t\t\treturn 1500;\n\t\t} else if (stage >= 2) {\n\t\t\treturn 1000;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7a0b01591a01693e739434033f0b533aa9da0b0ea48e1d67c709825598fac15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2439, + "startColumn": 5, + "charOffset": 81516, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 2437, + "startColumn": 5, + "charOffset": 81476, + "charLength": 4, + "snippet": { + "text": "\t\tif (stage >= 3) {\n\t\t\treturn 1500;\n\t\t} else if (stage >= 2) {\n\t\t\treturn 1000;\n\t\t} else if (stage >= 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb51595fdea8de3a7a1ae895052e06fdb0daaf9063d2b575573bf83ea44bb5b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2440, + "startColumn": 11, + "charOffset": 81549, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 2438, + "startColumn": 11, + "charOffset": 81496, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn 1500;\n\t\t} else if (stage >= 2) {\n\t\t\treturn 1000;\n\t\t} else if (stage >= 1) {\n\t\t\treturn 500;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed3106ce22ecfc8042aa77639157f6e7856f5f4028b5af3fd7331743d57b60af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "500 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2442, + "startColumn": 11, + "charOffset": 81592, + "charLength": 3, + "snippet": { + "text": "500" + } + }, + "contextRegion": { + "startLine": 2440, + "startColumn": 11, + "charOffset": 81539, + "charLength": 3, + "snippet": { + "text": "\t\t\treturn 1000;\n\t\t} else if (stage >= 1) {\n\t\t\treturn 500;\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77995c7dcb68bbbd004c6660ce032a0f9d057cb3aeaf2273a9201e696669925d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "35 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2452, + "startColumn": 10, + "charOffset": 81846, + "charLength": 2, + "snippet": { + "text": "35" + } + }, + "contextRegion": { + "startLine": 2450, + "startColumn": 10, + "charOffset": 81668, + "charLength": 2, + "snippet": { + "text": "\tif (getInstant(WheelInstant_t::FOCUS_MASTERY) && getOnThinkTimer(WheelOnThink_t::FOCUS_MASTERY) >= OTSYS_TIME()) {\n\t\tsetOnThinkTimer(WheelOnThink_t::FOCUS_MASTERY, 0);\n\t\treturn 35;\n\t}\n\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ea5f1c84d8d12a22184ed36aa1b755ed8d8fca3d54fe9b2c57a90497c55c9f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2458, + "startColumn": 2, + "charOffset": 81963, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2456, + "startColumn": 2, + "charOffset": 81866, + "charLength": 2, + "snippet": { + "text": "int32_t PlayerWheel::checkElementSensitiveReduction(CombatType_t type) const {\n\tint32_t rt = 0;\n\tif (type == COMBAT_PHYSICALDAMAGE) {\n\t\trt += getMajorStatConditional(\"Ballistic Mastery\", WheelMajor_t::PHYSICAL_DMG);\n\t} else if (type == COMBAT_HOLYDAMAGE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab92f336fe07241697c296f5d203bfb470b7ca8e20ed397ed1519f531671bba0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'onThink' has cognitive complexity of 33 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2466, + "startColumn": 19, + "charOffset": 82237, + "charLength": 7, + "snippet": { + "text": "onThink" + } + }, + "contextRegion": { + "startLine": 2464, + "startColumn": 19, + "charOffset": 82216, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid PlayerWheel::onThink(bool force /* = false*/) {\n\tbool updateClient = false;\n\tm_creaturesNearby = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d319955c3e95a265062ae718508cf565c4a5934427662d192c121ccbb0ee4df3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2475, + "startColumn": 3, + "charOffset": 82872, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2473, + "startColumn": 3, + "charOffset": 82512, + "charLength": 3, + "snippet": { + "text": "\tif (!m_player.hasCondition(CONDITION_INFIGHT) || m_player.getZoneType() == ZONE_PROTECTION || (!getInstant(\"Battle Instinct\") && !getInstant(\"Positional Tatics\") && !getInstant(\"Ballistic Mastery\") && !getInstant(\"Gift of Life\") && !getInstant(\"Combat Mastery\") && !getInstant(\"Divine Empowerment\") && getGiftOfCooldown() == 0)) {\n\t\tbool mustReset = false;\n\t\tfor (int i = 0; i < static_cast(WheelMajor_t::TOTAL_COUNT); i++) {\n\t\t\tif (getMajorStat(static_cast(i)) != 0) {\n\t\t\t\tmustReset = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d778b21a5f1031f8a5ce191618e3cc38a67075ababe29be0dceac256d06c3db4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2483, + "startColumn": 4, + "charOffset": 83067, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2481, + "startColumn": 4, + "charOffset": 83044, + "charLength": 3, + "snippet": { + "text": "\n\t\tif (mustReset) {\n\t\t\tfor (int i = 0; i < static_cast(WheelMajor_t::TOTAL_COUNT); i++) {\n\t\t\t\tsetMajorStat(static_cast(i), 0);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7d82c42fde571e02e247237192f2230ffb9f17073c7c9203aef10c1fadc1c8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2521, + "startColumn": 2, + "charOffset": 84434, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2519, + "startColumn": 2, + "charOffset": 84368, + "charLength": 3, + "snippet": { + "text": "\nvoid PlayerWheel::reduceAllSpellsCooldownTimer(int32_t value) {\n\tfor (const auto &condition : m_player.getConditionsByType(CONDITION_SPELLCOOLDOWN)) {\n\t\tif (condition->getTicks() <= value) {\n\t\t\tm_player.sendSpellCooldown(condition->getSubId(), 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d92e3489f423e474dc90c2d0b88a2a44f05faf7fc062f5479963685c14959cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2523, + "startColumn": 31, + "charOffset": 84590, + "charLength": 9, + "snippet": { + "text": "condition" + } + }, + "contextRegion": { + "startLine": 2521, + "startColumn": 31, + "charOffset": 84433, + "charLength": 9, + "snippet": { + "text": "\tfor (const auto &condition : m_player.getConditionsByType(CONDITION_SPELLCOOLDOWN)) {\n\t\tif (condition->getTicks() <= value) {\n\t\t\tm_player.sendSpellCooldown(condition->getSubId(), 0);\n\t\t\tcondition->endCondition(m_player.getPlayer());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f998af78a727cbf8ddcc28bf95f413674ea94598fe2d761d579926e252fd002" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2527, + "startColumn": 31, + "charOffset": 84763, + "charLength": 9, + "snippet": { + "text": "condition" + } + }, + "contextRegion": { + "startLine": 2525, + "startColumn": 31, + "charOffset": 84667, + "charLength": 9, + "snippet": { + "text": "\t\t} else {\n\t\t\tcondition->setTicks(condition->getTicks() - value);\n\t\t\tm_player.sendSpellCooldown(condition->getSubId(), condition->getTicks());\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c3bf260df66300ee418d5a0a7caaf6e1db579f4e9fbc0605f642c61108b0a2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2533, + "startColumn": 2, + "charOffset": 84863, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2531, + "startColumn": 2, + "charOffset": 84819, + "charLength": 3, + "snippet": { + "text": "\nvoid PlayerWheel::resetUpgradedSpells() {\n\tfor (const auto &spell : m_learnedSpellsSelected) {\n\t\tif (m_player.hasLearnedInstantSpell(spell)) {\n\t\t\tm_player.forgetInstantSpell(spell);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a26027be699f73f2f1922ea9aaac140b57224ce3c3b9095c1132668152cbabee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2541, + "startColumn": 2, + "charOffset": 85095, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2539, + "startColumn": 2, + "charOffset": 85033, + "charLength": 3, + "snippet": { + "text": "\tm_spellsSelected.clear();\n\tm_learnedSpellsSelected.clear();\n\tfor (int i = 0; i < static_cast(WheelMajor_t::TOTAL_COUNT); i++) {\n\t\tsetMajorStat(static_cast(i), 0);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73f97eb178ca522eb554fc166d694da60a7bbaed393759a3de4574646e40040a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2544, + "startColumn": 2, + "charOffset": 85220, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2542, + "startColumn": 2, + "charOffset": 85167, + "charLength": 3, + "snippet": { + "text": "\t\tsetMajorStat(static_cast(i), 0);\n\t}\n\tfor (int i = 0; i < static_cast(WheelStage_t::TOTAL_COUNT); i++) {\n\t\tsetStage(static_cast(i), 0);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e156c75b6ee744362266355433d3c77e8119b0a5d7ebcca638864ded3776f96f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2552, + "startColumn": 27, + "charOffset": 85526, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 2550, + "startColumn": 27, + "charOffset": 85395, + "charLength": 12, + "snippet": { + "text": "void PlayerWheel::upgradeSpell(const std::string &name) {\n\tif (!m_player.hasLearnedInstantSpell(name)) {\n\t\tm_learnedSpellsSelected.emplace_back(name);\n\t\tm_player.learnInstantSpell(name);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cce53388f4dfc9f450b7b34f9c868d5605a1efd886e88037693a123c4171b09d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2555, + "startColumn": 2, + "charOffset": 85586, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2553, + "startColumn": 2, + "charOffset": 85546, + "charLength": 2, + "snippet": { + "text": "\t\tm_player.learnInstantSpell(name);\n\t}\n\tif (m_spellsSelected[name] == WheelSpellGrade_t::NONE) {\n\t\tm_spellsSelected[name] = WheelSpellGrade_t::REGULAR;\n\t} else if (m_spellsSelected[name] == WheelSpellGrade_t::REGULAR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed7f719b159b448784c1e4046817573f50c7e2b4f06bf98bf4ec8b5ae7063d6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2565, + "startColumn": 2, + "charOffset": 86009, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2563, + "startColumn": 2, + "charOffset": 85947, + "charLength": 2, + "snippet": { + "text": "\nvoid PlayerWheel::downgradeSpell(const std::string &name) {\n\tif (m_spellsSelected[name] == WheelSpellGrade_t::NONE || m_spellsSelected[name] == WheelSpellGrade_t::REGULAR) {\n\t\tm_spellsSelected.erase(name);\n\t} else if (m_spellsSelected[name] == WheelSpellGrade_t::UPGRADED) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6db73f49f6cef283630906d3238edf0bbe948dcd02a034b47095558ea12f5521" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2566, + "startColumn": 20, + "charOffset": 86141, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 2564, + "startColumn": 20, + "charOffset": 85948, + "charLength": 5, + "snippet": { + "text": "void PlayerWheel::downgradeSpell(const std::string &name) {\n\tif (m_spellsSelected[name] == WheelSpellGrade_t::NONE || m_spellsSelected[name] == WheelSpellGrade_t::REGULAR) {\n\t\tm_spellsSelected.erase(name);\n\t} else if (m_spellsSelected[name] == WheelSpellGrade_t::UPGRADED) {\n\t\tm_spellsSelected[name] = WheelSpellGrade_t::REGULAR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7aa60cfcae9090f551eca296e2760fa0f0b2e9a7af1fdab9bb4bb223e06846a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2577, + "startColumn": 2, + "charOffset": 86582, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2575, + "startColumn": 2, + "charOffset": 86483, + "charLength": 2, + "snippet": { + "text": "\tstd::shared_ptr spell = nullptr;\n\tWheelSpellGrade_t spellGrade = WheelSpellGrade_t::NONE;\n\tif (!(damage.instantSpellName).empty()) {\n\t\tspellGrade = getSpellUpgrade(damage.instantSpellName);\n\t\tspell = g_spells().getInstantSpellByName(damage.instantSpellName);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfc160c046a5cfb2d3ef5458f0d2536abb6be4984595aea3149539acfc9f1853" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2586, + "startColumn": 26, + "charOffset": 87007, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 2584, + "startColumn": 26, + "charOffset": 86877, + "charLength": 2, + "snippet": { + "text": "\t\tdamage.damageMultiplier += checkFocusMasteryDamage();\n\t\tif (getHealingLinkUpgrade(spell->getName())) {\n\t\t\tdamage.healingLink += 10;\n\t\t}\n\t\tif (spell->getSecondaryGroup() == SPELLGROUP_FOCUS && getInstant(\"Focus Mastery\")) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ac9f37fad6efc27a72651f5d71802d5044c82ce53b165bb1b08467d8f430aa9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "12000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2589, + "startColumn": 67, + "charOffset": 87168, + "charLength": 5, + "snippet": { + "text": "12000" + } + }, + "contextRegion": { + "startLine": 2587, + "startColumn": 67, + "charOffset": 87011, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\t\tif (spell->getSecondaryGroup() == SPELLGROUP_FOCUS && getInstant(\"Focus Mastery\")) {\n\t\t\tsetOnThinkTimer(WheelOnThink_t::FOCUS_MASTERY, (OTSYS_TIME() + 12000));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7930b276e11d847a4b23fccc3f451dcbbc1967ade17c1f635a7748cac714210f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2651, + "startColumn": 2, + "charOffset": 90447, + "charLength": 7, + "snippet": { + "text": "m_stats" + } + }, + "contextRegion": { + "startLine": 2649, + "startColumn": 2, + "charOffset": 90433, + "charLength": 7, + "snippet": { + "text": "\t\treturn;\n\t}\n\tm_stats[enumValue] += value;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53655ed50c4a94864bc2cbd300c2691d8d52386c9860237c57ad71277d18b0ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2660, + "startColumn": 2, + "charOffset": 90804, + "charLength": 12, + "snippet": { + "text": "m_resistance" + } + }, + "contextRegion": { + "startLine": 2658, + "startColumn": 2, + "charOffset": 90790, + "charLength": 12, + "snippet": { + "text": "\t\treturn;\n\t}\n\tm_resistance[index] += value;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b176cf48cbff8660ebc2cfd41b59abf4663521d1561502808b4e4c11be1dbe6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'setSpellInstant' has cognitive complexity of 67 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2663, + "startColumn": 19, + "charOffset": 90855, + "charLength": 15, + "snippet": { + "text": "setSpellInstant" + } + }, + "contextRegion": { + "startLine": 2661, + "startColumn": 19, + "charOffset": 90834, + "charLength": 15, + "snippet": { + "text": "}\n\nvoid PlayerWheel::setSpellInstant(const std::string &name, bool value) {\n\tif (name == \"Battle Instinct\") {\n\t\tsetInstant(WheelInstant_t::BATTLE_INSTINCT, value);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f0e685f2187a5bd055f05fd23802ba0e0735bd02190b6082404e68e49e99304" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2664, + "startColumn": 2, + "charOffset": 90911, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2662, + "startColumn": 2, + "charOffset": 90836, + "charLength": 2, + "snippet": { + "text": "\nvoid PlayerWheel::setSpellInstant(const std::string &name, bool value) {\n\tif (name == \"Battle Instinct\") {\n\t\tsetInstant(WheelInstant_t::BATTLE_INSTINCT, value);\n\t\tif (!getInstant(WheelInstant_t::BATTLE_INSTINCT)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da78442587ae2fe770b45cbe82e3ccdb6993a1cb46c0f88456d87c955cf91ba7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2776, + "startColumn": 2, + "charOffset": 94880, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2774, + "startColumn": 2, + "charOffset": 94840, + "charLength": 3, + "snippet": { + "text": "\nvoid PlayerWheel::resetResistance() {\n\tfor (int32_t i = 0; i < COMBAT_COUNT; i++) {\n\t\tm_resistance[i] = 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ac149a77164a5f31788e328d268f0a8395cd7be782039aff42faccf56da7985" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2777, + "startColumn": 3, + "charOffset": 94927, + "charLength": 12, + "snippet": { + "text": "m_resistance" + } + }, + "contextRegion": { + "startLine": 2775, + "startColumn": 3, + "charOffset": 94841, + "charLength": 12, + "snippet": { + "text": "void PlayerWheel::resetResistance() {\n\tfor (int32_t i = 0; i < COMBAT_COUNT; i++) {\n\t\tm_resistance[i] = 0;\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "443d7fa3d795248058e1e9a4fa31a7df54cb2684d768ddd3b0373dcafdb32bd1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2782, + "startColumn": 2, + "charOffset": 94988, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2780, + "startColumn": 2, + "charOffset": 94953, + "charLength": 3, + "snippet": { + "text": "\nvoid PlayerWheel::resetStats() {\n\tfor (int32_t i = 0; i < static_cast(WheelStat_t::TOTAL_COUNT); i++) {\n\t\tm_stats[i] = 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2bcd8482aad87568d043cd4a6e0c597330761ac5f38fc3098b0f3cf0198816cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2783, + "startColumn": 3, + "charOffset": 95065, + "charLength": 7, + "snippet": { + "text": "m_stats" + } + }, + "contextRegion": { + "startLine": 2781, + "startColumn": 3, + "charOffset": 94954, + "charLength": 7, + "snippet": { + "text": "void PlayerWheel::resetStats() {\n\tfor (int32_t i = 0; i < static_cast(WheelStat_t::TOTAL_COUNT); i++) {\n\t\tm_stats[i] = 0;\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a7fbbbd5b2c38a308f9daa5debacf314b3a9e04f6018307629d88bd8b1dfd9a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'name' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2798, + "startColumn": 49, + "charOffset": 95474, + "charLength": 4, + "snippet": { + "text": "name" + } + }, + "contextRegion": { + "startLine": 2796, + "startColumn": 49, + "charOffset": 95423, + "charLength": 4, + "snippet": { + "text": "}\n\nuint8_t PlayerWheel::getStage(const std::string name) const {\n\tif (name == \"Battle Instinct\") {\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::BATTLE_INSTINCT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9a33341c41f2728c3d07d592c7122725dfdd859435f7250b60019948113f677" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2799, + "startColumn": 2, + "charOffset": 95489, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2797, + "startColumn": 2, + "charOffset": 95425, + "charLength": 2, + "snippet": { + "text": "\nuint8_t PlayerWheel::getStage(const std::string name) const {\n\tif (name == \"Battle Instinct\") {\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::BATTLE_INSTINCT);\n\t} else if (name == \"Battle Healing\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a5caa149608eb7f128f06bb8357372ffe3bba32c5ef33843fec51adf1bf5f75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2800, + "startColumn": 10, + "charOffset": 95531, + "charLength": 11, + "snippet": { + "text": "PlayerWheel" + } + }, + "contextRegion": { + "startLine": 2798, + "startColumn": 10, + "charOffset": 95426, + "charLength": 11, + "snippet": { + "text": "uint8_t PlayerWheel::getStage(const std::string name) const {\n\tif (name == \"Battle Instinct\") {\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::BATTLE_INSTINCT);\n\t} else if (name == \"Battle Healing\") {\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::BATTLE_HEALING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bc9f61ad3c094bce90030fe2f262e7d6b177f67dcf76e16adfc0fd75221fb04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2801, + "startColumn": 4, + "charOffset": 95592, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 2799, + "startColumn": 4, + "charOffset": 95488, + "charLength": 4, + "snippet": { + "text": "\tif (name == \"Battle Instinct\") {\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::BATTLE_INSTINCT);\n\t} else if (name == \"Battle Healing\") {\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::BATTLE_HEALING);\n\t} else if (name == \"Positional Tatics\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20309622eccee5f96cfccc8510eae17696b3f6dad4d083a5b4aabb0931dbeeba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2802, + "startColumn": 10, + "charOffset": 95638, + "charLength": 11, + "snippet": { + "text": "PlayerWheel" + } + }, + "contextRegion": { + "startLine": 2800, + "startColumn": 10, + "charOffset": 95522, + "charLength": 11, + "snippet": { + "text": "\t\treturn PlayerWheel::getInstant(WheelInstant_t::BATTLE_INSTINCT);\n\t} else if (name == \"Battle Healing\") {\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::BATTLE_HEALING);\n\t} else if (name == \"Positional Tatics\") {\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::POSITIONAL_TATICS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81ada3b9eae14a5492d2ed935f465d9fa3e2e2390500db55c4d75d111fe5fcf1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2804, + "startColumn": 10, + "charOffset": 95747, + "charLength": 11, + "snippet": { + "text": "PlayerWheel" + } + }, + "contextRegion": { + "startLine": 2802, + "startColumn": 10, + "charOffset": 95629, + "charLength": 11, + "snippet": { + "text": "\t\treturn PlayerWheel::getInstant(WheelInstant_t::BATTLE_HEALING);\n\t} else if (name == \"Positional Tatics\") {\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::POSITIONAL_TATICS);\n\t} else if (name == \"Ballistic Mastery\") {\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::BALLISTIC_MASTERY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7962ab214247ca8cb108ff882e2503c0eeb584229291136a0c3faa362a8af465" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2806, + "startColumn": 10, + "charOffset": 95859, + "charLength": 11, + "snippet": { + "text": "PlayerWheel" + } + }, + "contextRegion": { + "startLine": 2804, + "startColumn": 10, + "charOffset": 95738, + "charLength": 11, + "snippet": { + "text": "\t\treturn PlayerWheel::getInstant(WheelInstant_t::POSITIONAL_TATICS);\n\t} else if (name == \"Ballistic Mastery\") {\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::BALLISTIC_MASTERY);\n\t} else if (name == \"Healing Link\") {\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::HEALING_LINK);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99f5df625e25f486615945595e12d3a613e7fea7f9d4d98fb38d6da015c45462" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2808, + "startColumn": 10, + "charOffset": 95966, + "charLength": 11, + "snippet": { + "text": "PlayerWheel" + } + }, + "contextRegion": { + "startLine": 2806, + "startColumn": 10, + "charOffset": 95850, + "charLength": 11, + "snippet": { + "text": "\t\treturn PlayerWheel::getInstant(WheelInstant_t::BALLISTIC_MASTERY);\n\t} else if (name == \"Healing Link\") {\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::HEALING_LINK);\n\t} else if (name == \"Runic Mastery\") {\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::RUNIC_MASTERY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c2caea984affbc3619ddd09ba04b21fed12db18c99077d27f69f6edf35dcf8d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2810, + "startColumn": 10, + "charOffset": 96069, + "charLength": 11, + "snippet": { + "text": "PlayerWheel" + } + }, + "contextRegion": { + "startLine": 2808, + "startColumn": 10, + "charOffset": 95957, + "charLength": 11, + "snippet": { + "text": "\t\treturn PlayerWheel::getInstant(WheelInstant_t::HEALING_LINK);\n\t} else if (name == \"Runic Mastery\") {\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::RUNIC_MASTERY);\n\t} else if (name == \"Focus Mastery\") {\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::FOCUS_MASTERY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d9e4290af0ccfc61ac607f46e89de72e2f061ca7ac92e165e288697df99c079" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2812, + "startColumn": 10, + "charOffset": 96173, + "charLength": 11, + "snippet": { + "text": "PlayerWheel" + } + }, + "contextRegion": { + "startLine": 2810, + "startColumn": 10, + "charOffset": 96060, + "charLength": 11, + "snippet": { + "text": "\t\treturn PlayerWheel::getInstant(WheelInstant_t::RUNIC_MASTERY);\n\t} else if (name == \"Focus Mastery\") {\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::FOCUS_MASTERY);\n\t} else if (name == \"Beam Mastery\") {\n\t\treturn PlayerWheel::getStage(WheelStage_t::BEAM_MASTERY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d823e64dd425dbcb8e759d13bfef4636e41f36ab1f7fec5d0697da5e289ea7c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'uint8_t' (aka 'unsigned char')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2841, + "startColumn": 9, + "charOffset": 97584, + "charLength": 5, + "snippet": { + "text": "false" + } + }, + "contextRegion": { + "startLine": 2839, + "startColumn": 9, + "charOffset": 97572, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\treturn false;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "affd1bc69e42823e29ea0323504c4adb9cd380401f1fd4045ba026a99ecd6aeb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2885, + "startColumn": 2, + "charOffset": 98870, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2883, + "startColumn": 2, + "charOffset": 98788, + "charLength": 3, + "snippet": { + "text": "\nWheelSpellGrade_t PlayerWheel::getSpellUpgrade(const std::string &name) const {\n\tfor (const auto &[name_it, grade_it] : m_spellsSelected) {\n\t\tif (name_it == name) {\n\t\t\treturn grade_it;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f84414137889f185ec7eca150d4cbf72d0cb37afd225914152b8f5f07c0411ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'name' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2922, + "startColumn": 48, + "charOffset": 99921, + "charLength": 4, + "snippet": { + "text": "name" + } + }, + "contextRegion": { + "startLine": 2920, + "startColumn": 48, + "charOffset": 99871, + "charLength": 4, + "snippet": { + "text": "}\n\nbool PlayerWheel::getInstant(const std::string name) const {\n\tif (name == \"Battle Instinct\") {\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::BATTLE_INSTINCT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a7fc01f310b3ac39f66cb5d3a1c62740c20af9ecf048bb0e77adac7b5265fa5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2923, + "startColumn": 2, + "charOffset": 99936, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2921, + "startColumn": 2, + "charOffset": 99873, + "charLength": 2, + "snippet": { + "text": "\nbool PlayerWheel::getInstant(const std::string name) const {\n\tif (name == \"Battle Instinct\") {\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::BATTLE_INSTINCT);\n\t} else if (name == \"Battle Healing\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70c8e994983212d22dfacccf08e6149b0ba1d3647b0a69d809fb390230ca5522" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2925, + "startColumn": 4, + "charOffset": 100039, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 2923, + "startColumn": 4, + "charOffset": 99935, + "charLength": 4, + "snippet": { + "text": "\tif (name == \"Battle Instinct\") {\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::BATTLE_INSTINCT);\n\t} else if (name == \"Battle Healing\") {\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::BATTLE_HEALING);\n\t} else if (name == \"Positional Tatics\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53b67b9a08e6fd87b05c8457d43df2ec1d24277a5441707c523129ec8b87be90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2938, + "startColumn": 10, + "charOffset": 100723, + "charLength": 11, + "snippet": { + "text": "PlayerWheel" + } + }, + "contextRegion": { + "startLine": 2936, + "startColumn": 10, + "charOffset": 100611, + "charLength": 11, + "snippet": { + "text": "\t\treturn PlayerWheel::getInstant(WheelInstant_t::FOCUS_MASTERY);\n\t} else if (name == \"Beam Mastery\") {\n\t\treturn PlayerWheel::getStage(WheelStage_t::BEAM_MASTERY);\n\t} else if (name == \"Combat Mastery\") {\n\t\treturn PlayerWheel::getStage(WheelStage_t::COMBAT_MASTERY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3bab0ebf0c0e7c8387456602fa5b88d109ec1e214a4a12727b3aed4409a2dda0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2940, + "startColumn": 10, + "charOffset": 100823, + "charLength": 11, + "snippet": { + "text": "PlayerWheel" + } + }, + "contextRegion": { + "startLine": 2938, + "startColumn": 10, + "charOffset": 100714, + "charLength": 11, + "snippet": { + "text": "\t\treturn PlayerWheel::getStage(WheelStage_t::BEAM_MASTERY);\n\t} else if (name == \"Combat Mastery\") {\n\t\treturn PlayerWheel::getStage(WheelStage_t::COMBAT_MASTERY);\n\t} else if (name == \"Gift of Life\") {\n\t\treturn PlayerWheel::getStage(WheelStage_t::GIFT_OF_LIFE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01bf6a2e5898af9ddf3081c6dfeb8ff4461ddcc6305a334ceb263539811c4630" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2942, + "startColumn": 10, + "charOffset": 100923, + "charLength": 11, + "snippet": { + "text": "PlayerWheel" + } + }, + "contextRegion": { + "startLine": 2940, + "startColumn": 10, + "charOffset": 100814, + "charLength": 11, + "snippet": { + "text": "\t\treturn PlayerWheel::getStage(WheelStage_t::COMBAT_MASTERY);\n\t} else if (name == \"Gift of Life\") {\n\t\treturn PlayerWheel::getStage(WheelStage_t::GIFT_OF_LIFE);\n\t} else if (name == \"Blessing of the Grove\") {\n\t\treturn PlayerWheel::getStage(WheelStage_t::BLESSING_OF_THE_GROVE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "776e2cfefac1d5f439f1a14fb43b2d42eb436a45ccd46c5dfe8635f8c122dda0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2944, + "startColumn": 10, + "charOffset": 101030, + "charLength": 11, + "snippet": { + "text": "PlayerWheel" + } + }, + "contextRegion": { + "startLine": 2942, + "startColumn": 10, + "charOffset": 100914, + "charLength": 11, + "snippet": { + "text": "\t\treturn PlayerWheel::getStage(WheelStage_t::GIFT_OF_LIFE);\n\t} else if (name == \"Blessing of the Grove\") {\n\t\treturn PlayerWheel::getStage(WheelStage_t::BLESSING_OF_THE_GROVE);\n\t} else if (name == \"Drain Body\") {\n\t\treturn PlayerWheel::getStage(WheelStage_t::DRAIN_BODY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bbcbb90c0b94aa61737d3f030779ce5db769717a861c63c0a729c739e8cc2bfc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2946, + "startColumn": 10, + "charOffset": 101135, + "charLength": 11, + "snippet": { + "text": "PlayerWheel" + } + }, + "contextRegion": { + "startLine": 2944, + "startColumn": 10, + "charOffset": 101021, + "charLength": 11, + "snippet": { + "text": "\t\treturn PlayerWheel::getStage(WheelStage_t::BLESSING_OF_THE_GROVE);\n\t} else if (name == \"Drain Body\") {\n\t\treturn PlayerWheel::getStage(WheelStage_t::DRAIN_BODY);\n\t} else if (name == \"Divine Empowerment\") {\n\t\treturn PlayerWheel::getStage(WheelStage_t::DIVINE_EMPOWERMENT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e49791b9b68e8483d3b9b4c325e30e03de5e1df455d7a9c7986130899af2ca0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2948, + "startColumn": 10, + "charOffset": 101237, + "charLength": 11, + "snippet": { + "text": "PlayerWheel" + } + }, + "contextRegion": { + "startLine": 2946, + "startColumn": 10, + "charOffset": 101126, + "charLength": 11, + "snippet": { + "text": "\t\treturn PlayerWheel::getStage(WheelStage_t::DRAIN_BODY);\n\t} else if (name == \"Divine Empowerment\") {\n\t\treturn PlayerWheel::getStage(WheelStage_t::DIVINE_EMPOWERMENT);\n\t} else if (name == \"Divine Grenade\") {\n\t\treturn PlayerWheel::getStage(WheelStage_t::DIVINE_GRENADE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "baca00103a88e9a49f1a13f27d49fdcfeea1b15a75ecd6a2818a257ec9c9ef32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2950, + "startColumn": 10, + "charOffset": 101343, + "charLength": 11, + "snippet": { + "text": "PlayerWheel" + } + }, + "contextRegion": { + "startLine": 2948, + "startColumn": 10, + "charOffset": 101228, + "charLength": 11, + "snippet": { + "text": "\t\treturn PlayerWheel::getStage(WheelStage_t::DIVINE_EMPOWERMENT);\n\t} else if (name == \"Divine Grenade\") {\n\t\treturn PlayerWheel::getStage(WheelStage_t::DIVINE_GRENADE);\n\t} else if (name == \"Twin Burst\") {\n\t\treturn PlayerWheel::getStage(WheelStage_t::TWIN_BURST);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e4d4980924c311063ed1ed64bf1590575f2b08a012cd1bce5576b91529fa0ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2952, + "startColumn": 10, + "charOffset": 101441, + "charLength": 11, + "snippet": { + "text": "PlayerWheel" + } + }, + "contextRegion": { + "startLine": 2950, + "startColumn": 10, + "charOffset": 101334, + "charLength": 11, + "snippet": { + "text": "\t\treturn PlayerWheel::getStage(WheelStage_t::DIVINE_GRENADE);\n\t} else if (name == \"Twin Burst\") {\n\t\treturn PlayerWheel::getStage(WheelStage_t::TWIN_BURST);\n\t} else if (name == \"Executioner's Throw\") {\n\t\treturn PlayerWheel::getStage(WheelStage_t::EXECUTIONERS_THROW);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0400ac39f1926aaa50e40d33e800be66be9d7a9dbdf95dc1d5203edd25956598" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2954, + "startColumn": 10, + "charOffset": 101544, + "charLength": 11, + "snippet": { + "text": "PlayerWheel" + } + }, + "contextRegion": { + "startLine": 2952, + "startColumn": 10, + "charOffset": 101432, + "charLength": 11, + "snippet": { + "text": "\t\treturn PlayerWheel::getStage(WheelStage_t::TWIN_BURST);\n\t} else if (name == \"Executioner's Throw\") {\n\t\treturn PlayerWheel::getStage(WheelStage_t::EXECUTIONERS_THROW);\n\t} else if (name == \"Avatar of Light\") {\n\t\treturn PlayerWheel::getStage(WheelStage_t::AVATAR_OF_LIGHT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d671bd531be121befcbe64de0a949cd2f5c6cb23c6a5dd203a6a430dd4e08e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2956, + "startColumn": 10, + "charOffset": 101651, + "charLength": 11, + "snippet": { + "text": "PlayerWheel" + } + }, + "contextRegion": { + "startLine": 2954, + "startColumn": 10, + "charOffset": 101535, + "charLength": 11, + "snippet": { + "text": "\t\treturn PlayerWheel::getStage(WheelStage_t::EXECUTIONERS_THROW);\n\t} else if (name == \"Avatar of Light\") {\n\t\treturn PlayerWheel::getStage(WheelStage_t::AVATAR_OF_LIGHT);\n\t} else if (name == \"Avatar of Nature\") {\n\t\treturn PlayerWheel::getStage(WheelStage_t::AVATAR_OF_NATURE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a0d7203bb9214ea9f475df80014a2830df1ffa10f0bd2cc0d83722d71690c45" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2958, + "startColumn": 10, + "charOffset": 101756, + "charLength": 11, + "snippet": { + "text": "PlayerWheel" + } + }, + "contextRegion": { + "startLine": 2956, + "startColumn": 10, + "charOffset": 101642, + "charLength": 11, + "snippet": { + "text": "\t\treturn PlayerWheel::getStage(WheelStage_t::AVATAR_OF_LIGHT);\n\t} else if (name == \"Avatar of Nature\") {\n\t\treturn PlayerWheel::getStage(WheelStage_t::AVATAR_OF_NATURE);\n\t} else if (name == \"Avatar of Steel\") {\n\t\treturn PlayerWheel::getStage(WheelStage_t::AVATAR_OF_STEEL);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd96ddf1422198bf9a3e14a61925c23b9b09f3ff21c5f3a5578e75ca6ec5e197" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2960, + "startColumn": 10, + "charOffset": 101861, + "charLength": 11, + "snippet": { + "text": "PlayerWheel" + } + }, + "contextRegion": { + "startLine": 2958, + "startColumn": 10, + "charOffset": 101747, + "charLength": 11, + "snippet": { + "text": "\t\treturn PlayerWheel::getStage(WheelStage_t::AVATAR_OF_NATURE);\n\t} else if (name == \"Avatar of Steel\") {\n\t\treturn PlayerWheel::getStage(WheelStage_t::AVATAR_OF_STEEL);\n\t} else if (name == \"Avatar of Storm\") {\n\t\treturn PlayerWheel::getStage(WheelStage_t::AVATAR_OF_STORM);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c56bdfe5ba63041395e8e8a79a9824fbd5f7c8a844d0685de740b6379211e434" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2962, + "startColumn": 10, + "charOffset": 101965, + "charLength": 11, + "snippet": { + "text": "PlayerWheel" + } + }, + "contextRegion": { + "startLine": 2960, + "startColumn": 10, + "charOffset": 101852, + "charLength": 11, + "snippet": { + "text": "\t\treturn PlayerWheel::getStage(WheelStage_t::AVATAR_OF_STEEL);\n\t} else if (name == \"Avatar of Storm\") {\n\t\treturn PlayerWheel::getStage(WheelStage_t::AVATAR_OF_STORM);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0de0016ac46098bbf6a68511f82015bdf5eb1c01acf1a0262a903af6c7bc873d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2970, + "startColumn": 2, + "charOffset": 102142, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2968, + "startColumn": 2, + "charOffset": 102041, + "charLength": 2, + "snippet": { + "text": "// Wheel of destiny - Specific functions\nuint32_t PlayerWheel::getGiftOfLifeTotalCooldown() const {\n\tif (getStage(WheelStage_t::GIFT_OF_LIFE) == 1) {\n\t\treturn 1 * 60 * 60 * 30;\n\t} else if (getStage(WheelStage_t::GIFT_OF_LIFE) == 2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "597824d6bfdf3af66a29f9e19ada2262b656f402e161e705f22f55d48f0cfe58" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2971, + "startColumn": 14, + "charOffset": 102204, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 2969, + "startColumn": 14, + "charOffset": 102082, + "charLength": 2, + "snippet": { + "text": "uint32_t PlayerWheel::getGiftOfLifeTotalCooldown() const {\n\tif (getStage(WheelStage_t::GIFT_OF_LIFE) == 1) {\n\t\treturn 1 * 60 * 60 * 30;\n\t} else if (getStage(WheelStage_t::GIFT_OF_LIFE) == 2) {\n\t\treturn 1 * 60 * 60 * 20;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e60234c30d144257e216b4a31cf27da485120953234ffae101aab699d0012330" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2971, + "startColumn": 19, + "charOffset": 102209, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 2969, + "startColumn": 19, + "charOffset": 102082, + "charLength": 2, + "snippet": { + "text": "uint32_t PlayerWheel::getGiftOfLifeTotalCooldown() const {\n\tif (getStage(WheelStage_t::GIFT_OF_LIFE) == 1) {\n\t\treturn 1 * 60 * 60 * 30;\n\t} else if (getStage(WheelStage_t::GIFT_OF_LIFE) == 2) {\n\t\treturn 1 * 60 * 60 * 20;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4025444123bd77c9a35149129a35e285846e6d135bc4fb227adcac8c6295f55c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2971, + "startColumn": 24, + "charOffset": 102214, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 2969, + "startColumn": 24, + "charOffset": 102082, + "charLength": 2, + "snippet": { + "text": "uint32_t PlayerWheel::getGiftOfLifeTotalCooldown() const {\n\tif (getStage(WheelStage_t::GIFT_OF_LIFE) == 1) {\n\t\treturn 1 * 60 * 60 * 30;\n\t} else if (getStage(WheelStage_t::GIFT_OF_LIFE) == 2) {\n\t\treturn 1 * 60 * 60 * 20;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9a51efd888dd29621707e1e1792e1895f2916bf0e98eb37cf9255c4875336ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2972, + "startColumn": 4, + "charOffset": 102221, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 2970, + "startColumn": 4, + "charOffset": 102141, + "charLength": 4, + "snippet": { + "text": "\tif (getStage(WheelStage_t::GIFT_OF_LIFE) == 1) {\n\t\treturn 1 * 60 * 60 * 30;\n\t} else if (getStage(WheelStage_t::GIFT_OF_LIFE) == 2) {\n\t\treturn 1 * 60 * 60 * 20;\n\t} else if (getStage(WheelStage_t::GIFT_OF_LIFE) == 3) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da9a21efcf4754349b40cdc48a503ec9b82f7df9cb10e41c2edfa14fe54ecff5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2973, + "startColumn": 14, + "charOffset": 102288, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 2971, + "startColumn": 14, + "charOffset": 102191, + "charLength": 2, + "snippet": { + "text": "\t\treturn 1 * 60 * 60 * 30;\n\t} else if (getStage(WheelStage_t::GIFT_OF_LIFE) == 2) {\n\t\treturn 1 * 60 * 60 * 20;\n\t} else if (getStage(WheelStage_t::GIFT_OF_LIFE) == 3) {\n\t\treturn 1 * 60 * 60 * 10;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "417b627887c8608575d9d18e1b946a41dceb1841e6aa280775f61524159e28bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2973, + "startColumn": 19, + "charOffset": 102293, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 2971, + "startColumn": 19, + "charOffset": 102191, + "charLength": 2, + "snippet": { + "text": "\t\treturn 1 * 60 * 60 * 30;\n\t} else if (getStage(WheelStage_t::GIFT_OF_LIFE) == 2) {\n\t\treturn 1 * 60 * 60 * 20;\n\t} else if (getStage(WheelStage_t::GIFT_OF_LIFE) == 3) {\n\t\treturn 1 * 60 * 60 * 10;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7067f7a66e988cd1bf31f27a795d66d7fa1bf5ae9a4170887a841ad042394604" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2973, + "startColumn": 24, + "charOffset": 102298, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 2971, + "startColumn": 24, + "charOffset": 102191, + "charLength": 2, + "snippet": { + "text": "\t\treturn 1 * 60 * 60 * 30;\n\t} else if (getStage(WheelStage_t::GIFT_OF_LIFE) == 2) {\n\t\treturn 1 * 60 * 60 * 20;\n\t} else if (getStage(WheelStage_t::GIFT_OF_LIFE) == 3) {\n\t\treturn 1 * 60 * 60 * 10;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4af748b2616b86e52484198f616edf13eb73e26e1cbc61b7712a699e472f803" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2975, + "startColumn": 14, + "charOffset": 102372, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 2973, + "startColumn": 14, + "charOffset": 102275, + "charLength": 2, + "snippet": { + "text": "\t\treturn 1 * 60 * 60 * 20;\n\t} else if (getStage(WheelStage_t::GIFT_OF_LIFE) == 3) {\n\t\treturn 1 * 60 * 60 * 10;\n\t}\n\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b821f844c4fe18d343c71a9f4e32a19da46448a6a877c36640f8d583f765957a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2975, + "startColumn": 19, + "charOffset": 102377, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 2973, + "startColumn": 19, + "charOffset": 102275, + "charLength": 2, + "snippet": { + "text": "\t\treturn 1 * 60 * 60 * 20;\n\t} else if (getStage(WheelStage_t::GIFT_OF_LIFE) == 3) {\n\t\treturn 1 * 60 * 60 * 10;\n\t}\n\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a56e2b375043931b22570ef954dde759e09c865bde68f2b90a60cbc118ae58f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2975, + "startColumn": 24, + "charOffset": 102382, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 2973, + "startColumn": 24, + "charOffset": 102275, + "charLength": 2, + "snippet": { + "text": "\t\treturn 1 * 60 * 60 * 20;\n\t} else if (getStage(WheelStage_t::GIFT_OF_LIFE) == 3) {\n\t\treturn 1 * 60 * 60 * 10;\n\t}\n\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2549979b9d9f68f6bdc5b5cfe7fbc586d6979a9259ab3405f3469b70928e7049" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2981, + "startColumn": 2, + "charOffset": 102454, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2979, + "startColumn": 2, + "charOffset": 102402, + "charLength": 2, + "snippet": { + "text": "\nuint8_t PlayerWheel::getGiftOfLifeValue() const {\n\tif (getStage(WheelStage_t::GIFT_OF_LIFE) == 1) {\n\t\treturn 20;\n\t} else if (getStage(WheelStage_t::GIFT_OF_LIFE) == 2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfc160c046a5cfb2d3ef5458f0d2536abb6be4984595aea3149539acfc9f1853" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2982, + "startColumn": 10, + "charOffset": 102512, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 2980, + "startColumn": 10, + "charOffset": 102403, + "charLength": 2, + "snippet": { + "text": "uint8_t PlayerWheel::getGiftOfLifeValue() const {\n\tif (getStage(WheelStage_t::GIFT_OF_LIFE) == 1) {\n\t\treturn 20;\n\t} else if (getStage(WheelStage_t::GIFT_OF_LIFE) == 2) {\n\t\treturn 25;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "990e7c8ede696aae2d32b03076589831a0c6f1490b5c06aa060495229b547c52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2983, + "startColumn": 4, + "charOffset": 102519, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 2981, + "startColumn": 4, + "charOffset": 102453, + "charLength": 4, + "snippet": { + "text": "\tif (getStage(WheelStage_t::GIFT_OF_LIFE) == 1) {\n\t\treturn 20;\n\t} else if (getStage(WheelStage_t::GIFT_OF_LIFE) == 2) {\n\t\treturn 25;\n\t} else if (getStage(WheelStage_t::GIFT_OF_LIFE) == 3) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7dd84b2033faa6c0d1750c6df27827bca617f219d2f83b22c57a3c7b4aba51e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2984, + "startColumn": 10, + "charOffset": 102582, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 2982, + "startColumn": 10, + "charOffset": 102503, + "charLength": 2, + "snippet": { + "text": "\t\treturn 20;\n\t} else if (getStage(WheelStage_t::GIFT_OF_LIFE) == 2) {\n\t\treturn 25;\n\t} else if (getStage(WheelStage_t::GIFT_OF_LIFE) == 3) {\n\t\treturn 30;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3390ad63cefdc340acfc912c6cb130df0a5f4d47479a56f605cd4e1eb2181db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 2986, + "startColumn": 10, + "charOffset": 102652, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 2984, + "startColumn": 10, + "charOffset": 102573, + "charLength": 2, + "snippet": { + "text": "\t\treturn 25;\n\t} else if (getStage(WheelStage_t::GIFT_OF_LIFE) == 3) {\n\t\treturn 30;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2ff66d80a7ee0abe1c5df17086a3b2cf374a8346e17fc8d987a7a6a78393e1a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3003, + "startColumn": 64, + "charOffset": 103089, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 3001, + "startColumn": 64, + "charOffset": 102927, + "charLength": 4, + "snippet": { + "text": "\tm_player.addStorageValue(STORAGEVALUE_GIFT_OF_LIFE_COOLDOWN_WOD, value, true);\n\tif (!isOnThink) {\n\t\tsetOnThinkTimer(WheelOnThink_t::GIFT_OF_LIFE, OTSYS_TIME() + 1000);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd904cbf0cf0620707c8bf98a92d2b31132c26220ba39385a3804f39214f3d35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "3600000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3010, + "startColumn": 64, + "charOffset": 103294, + "charLength": 7, + "snippet": { + "text": "3600000" + } + }, + "contextRegion": { + "startLine": 3008, + "startColumn": 64, + "charOffset": 103160, + "charLength": 7, + "snippet": { + "text": "\tint32_t cooldown = getGiftOfCooldown() - value;\n\tif (cooldown <= 0) {\n\t\tsetOnThinkTimer(WheelOnThink_t::GIFT_OF_LIFE, OTSYS_TIME() + 3600000);\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fe9c4c29c06e45f0cebaad93cb015f5296e48ebc77b70bbbf33eea31e1f7afa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'int64_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3013, + "startColumn": 64, + "charOffset": 103380, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 3011, + "startColumn": 64, + "charOffset": 103304, + "charLength": 5, + "snippet": { + "text": "\t\treturn;\n\t}\n\tsetOnThinkTimer(WheelOnThink_t::GIFT_OF_LIFE, OTSYS_TIME() + (value * 1000));\n\tsetGiftOfCooldown(cooldown, true);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b449385a6620afbe2debd0d88a9f1ef8ac424a1453e2e9bee5f419c1974d822c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3013, + "startColumn": 72, + "charOffset": 103388, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 3011, + "startColumn": 72, + "charOffset": 103304, + "charLength": 4, + "snippet": { + "text": "\t\treturn;\n\t}\n\tsetOnThinkTimer(WheelOnThink_t::GIFT_OF_LIFE, OTSYS_TIME() + (value * 1000));\n\tsetGiftOfCooldown(cooldown, true);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "115cd23ce2ce1396efe4b74d849e6a90c7819daaeb54149975fe38e07e1ee9ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "37 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3032, + "startColumn": 28, + "charOffset": 103900, + "charLength": 2, + "snippet": { + "text": "37" + } + }, + "contextRegion": { + "startLine": 3030, + "startColumn": 28, + "charOffset": 103870, + "charLength": 2, + "snippet": { + "text": "}\n\nconst std::array &PlayerWheel::getSlots() const {\n\treturn m_wheelSlots;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa14bbe62a52474b334d2971ee169475f4ce2c46c46eaba0d1d83e5ceb45f18a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'updateBeamMasteryDamage' of similar type ('uint8_t &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3065, + "startColumn": 68, + "charOffset": 104939, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 3063, + "startColumn": 68, + "charOffset": 104869, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid PlayerWheel::updateBeamMasteryDamage(CombatDamage &tmpDamage, uint8_t &beamAffectedTotal, uint8_t &beamAffectedCurrent) const {\n\tif (beamAffectedTotal > 0) {\n\t\ttmpDamage.damageMultiplier += checkBeamMasteryDamage();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f973c947d239398682991ccdd1824228c5d1b83f04b37ca01743cd6222df553" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3078, + "startColumn": 12, + "charOffset": 105365, + "charLength": 18, + "snippet": { + "text": "combatChangeHealth" + } + }, + "contextRegion": { + "startLine": 3076, + "startColumn": 12, + "charOffset": 105261, + "charLength": 18, + "snippet": { + "text": "\t\tdamage.primary.value = checkBattleHealingAmount();\n\t\tdamage.primary.type = COMBAT_HEALING;\n\t\tg_game().combatChangeHealth(m_player.getPlayer(), m_player.getPlayer(), damage);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74702908abcbe5d098ef93c2ed022b362abaec7db3e43805ee7bc4253e1f7c3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3085, + "startColumn": 23, + "charOffset": 105677, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 3083, + "startColumn": 23, + "charOffset": 105549, + "charLength": 1, + "snippet": { + "text": "\tint32_t wheelOfDestinyElementAbsorb = getResistance(combatType);\n\tif (wheelOfDestinyElementAbsorb > 0) {\n\t\tdamage -= std::ceil((damage * wheelOfDestinyElementAbsorb) / 10000.);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fde94fc6aaba2b627babe28bfd1d0b17987cc5b2e89acd611cfc9311ea42193d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000. is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3085, + "startColumn": 64, + "charOffset": 105718, + "charLength": 6, + "snippet": { + "text": "10000." + } + }, + "contextRegion": { + "startLine": 3083, + "startColumn": 64, + "charOffset": 105549, + "charLength": 6, + "snippet": { + "text": "\tint32_t wheelOfDestinyElementAbsorb = getResistance(combatType);\n\tif (wheelOfDestinyElementAbsorb > 0) {\n\t\tdamage -= std::ceil((damage * wheelOfDestinyElementAbsorb) / 10000.);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5eb6c282eb80b9baf87df9b598678acd0dd7cdfa3a0d9f13371975ab97f2dbf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3088, + "startColumn": 22, + "charOffset": 105752, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 3086, + "startColumn": 22, + "charOffset": 105727, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tdamage -= std::ceil((damage * checkAvatarSkill(WheelAvatarSkill_t::DAMAGE_REDUCTION)) / 100.);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e577005d0da4ea688356543570adfee44177b53945f46b4de0eeb3d16f313a9c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3097, + "startColumn": 22, + "charOffset": 106122, + "charLength": 4, + "snippet": { + "text": "1.0f" + } + }, + "contextRegion": { + "startLine": 3095, + "startColumn": 22, + "charOffset": 106030, + "charLength": 4, + "snippet": { + "text": "\tstd::shared_ptr shield = m_player.inventory[CONST_SLOT_RIGHT];\n\n\tfloat fightFactor = 1.0f;\n\tfloat shieldFactor = 1.0f;\n\tfloat distanceFactor = 1.0f;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6685fcb3d63d81b50a84be2a86a647a7234eb0bf9152206136cd1d523fde935" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3097, + "startColumn": 22, + "charOffset": 106122, + "charLength": 4, + "snippet": { + "text": "1.0f" + } + }, + "contextRegion": { + "startLine": 3095, + "startColumn": 22, + "charOffset": 106030, + "charLength": 4, + "snippet": { + "text": "\tstd::shared_ptr shield = m_player.inventory[CONST_SLOT_RIGHT];\n\n\tfloat fightFactor = 1.0f;\n\tfloat shieldFactor = 1.0f;\n\tfloat distanceFactor = 1.0f;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9bb3b9ece50d664c8ec5a0cca1960526c34d42d8e480e5c2f49ebbf90e923f9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3098, + "startColumn": 23, + "charOffset": 106150, + "charLength": 4, + "snippet": { + "text": "1.0f" + } + }, + "contextRegion": { + "startLine": 3096, + "startColumn": 23, + "charOffset": 106100, + "charLength": 4, + "snippet": { + "text": "\n\tfloat fightFactor = 1.0f;\n\tfloat shieldFactor = 1.0f;\n\tfloat distanceFactor = 1.0f;\n\tswitch (m_player.fightMode) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4df38003dcaa05f491858f8b586cb48fd07c524f05649eec3936f6e1169da670" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3098, + "startColumn": 23, + "charOffset": 106150, + "charLength": 4, + "snippet": { + "text": "1.0f" + } + }, + "contextRegion": { + "startLine": 3096, + "startColumn": 23, + "charOffset": 106100, + "charLength": 4, + "snippet": { + "text": "\n\tfloat fightFactor = 1.0f;\n\tfloat shieldFactor = 1.0f;\n\tfloat distanceFactor = 1.0f;\n\tswitch (m_player.fightMode) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30582d1dffa32d6731b7c0f4b78fb6b8c2f1972e9c58cb0d9db721caf3191aa2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3099, + "startColumn": 25, + "charOffset": 106180, + "charLength": 4, + "snippet": { + "text": "1.0f" + } + }, + "contextRegion": { + "startLine": 3097, + "startColumn": 25, + "charOffset": 106101, + "charLength": 4, + "snippet": { + "text": "\tfloat fightFactor = 1.0f;\n\tfloat shieldFactor = 1.0f;\n\tfloat distanceFactor = 1.0f;\n\tswitch (m_player.fightMode) {\n\t\tcase FIGHTMODE_ATTACK: {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8adbc69e8742c73b0e950f358fcfd616585b422782c0e18e067d44d8a2203352" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3099, + "startColumn": 25, + "charOffset": 106180, + "charLength": 4, + "snippet": { + "text": "1.0f" + } + }, + "contextRegion": { + "startLine": 3097, + "startColumn": 25, + "charOffset": 106101, + "charLength": 4, + "snippet": { + "text": "\tfloat fightFactor = 1.0f;\n\tfloat shieldFactor = 1.0f;\n\tfloat distanceFactor = 1.0f;\n\tswitch (m_player.fightMode) {\n\t\tcase FIGHTMODE_ATTACK: {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9cb205bc502c168b453dc62c37b23d998ce168a0ef5a47a4b29d8e22eff8c14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3102, + "startColumn": 18, + "charOffset": 106261, + "charLength": 5, + "snippet": { + "text": "0.67f" + } + }, + "contextRegion": { + "startLine": 3100, + "startColumn": 18, + "charOffset": 106186, + "charLength": 5, + "snippet": { + "text": "\tswitch (m_player.fightMode) {\n\t\tcase FIGHTMODE_ATTACK: {\n\t\t\tfightFactor = 0.67f;\n\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f5def68129a74005c35c57b027731825070d7154be203819fa09cb413a3aa3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3102, + "startColumn": 18, + "charOffset": 106261, + "charLength": 5, + "snippet": { + "text": "0.67f" + } + }, + "contextRegion": { + "startLine": 3100, + "startColumn": 18, + "charOffset": 106186, + "charLength": 5, + "snippet": { + "text": "\tswitch (m_player.fightMode) {\n\t\tcase FIGHTMODE_ATTACK: {\n\t\t\tfightFactor = 0.67f;\n\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56b57ec34ee65f14a523858a7aa4a5abb661138f8b750f6922c99bd743df2efc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.67f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3102, + "startColumn": 18, + "charOffset": 106261, + "charLength": 5, + "snippet": { + "text": "0.67f" + } + }, + "contextRegion": { + "startLine": 3100, + "startColumn": 18, + "charOffset": 106186, + "charLength": 5, + "snippet": { + "text": "\tswitch (m_player.fightMode) {\n\t\tcase FIGHTMODE_ATTACK: {\n\t\t\tfightFactor = 0.67f;\n\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8762f0ea40f75f23808d475824933643f796ac98717e65725cd01b3ddf8d09fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3106, + "startColumn": 18, + "charOffset": 106328, + "charLength": 5, + "snippet": { + "text": "0.84f" + } + }, + "contextRegion": { + "startLine": 3104, + "startColumn": 18, + "charOffset": 106278, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\t\tcase FIGHTMODE_BALANCED: {\n\t\t\tfightFactor = 0.84f;\n\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fea0510e8d973d1d18c04606fe404928424f7dccc4efbd88da579b4e2f8c5b95" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3106, + "startColumn": 18, + "charOffset": 106328, + "charLength": 5, + "snippet": { + "text": "0.84f" + } + }, + "contextRegion": { + "startLine": 3104, + "startColumn": 18, + "charOffset": 106278, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\t\tcase FIGHTMODE_BALANCED: {\n\t\t\tfightFactor = 0.84f;\n\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ba3938171dc6e23aed75a783e4f3bc911e089877ab3ae1162348cb248662f88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.84f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3106, + "startColumn": 18, + "charOffset": 106328, + "charLength": 5, + "snippet": { + "text": "0.84f" + } + }, + "contextRegion": { + "startLine": 3104, + "startColumn": 18, + "charOffset": 106278, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\t\tcase FIGHTMODE_BALANCED: {\n\t\t\tfightFactor = 0.84f;\n\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f2c504b6f292224d18aab6a05b26c53d7d93ccdb6905160835cbe1d07331c99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3110, + "startColumn": 18, + "charOffset": 106394, + "charLength": 4, + "snippet": { + "text": "1.0f" + } + }, + "contextRegion": { + "startLine": 3108, + "startColumn": 18, + "charOffset": 106345, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t\tcase FIGHTMODE_DEFENSE: {\n\t\t\tfightFactor = 1.0f;\n\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee2a6d92a17d0c9507a1f15fece9ad1e9dca8450d03bae380aba090d79c21790" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3110, + "startColumn": 18, + "charOffset": 106394, + "charLength": 4, + "snippet": { + "text": "1.0f" + } + }, + "contextRegion": { + "startLine": 3108, + "startColumn": 18, + "charOffset": 106345, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t\tcase FIGHTMODE_DEFENSE: {\n\t\t\tfightFactor = 1.0f;\n\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef75795e6407123264e6084bf396a08bcdb830792122208481c4e10a3ab90ba9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3133, + "startColumn": 14, + "charOffset": 107015, + "charLength": 6, + "snippet": { + "text": "weapon" + } + }, + "contextRegion": { + "startLine": 3131, + "startColumn": 14, + "charOffset": 106853, + "charLength": 6, + "snippet": { + "text": "\t\tif (weapon->getAmmoType() == AMMO_BOLT || weapon->getAmmoType() == AMMO_ARROW) {\n\t\t\tdistanceFactor = m_player.vocation->mitigationSecondaryShield;\n\t\t} else if (weapon->getSlotPosition() & SLOTP_TWO_HAND) {\n\t\t\tdefenseValue = weapon->getDefense() + weapon->getExtraDefense();\n\t\t\tshieldFactor = m_player.vocation->mitigationSecondaryShield;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c31d3c6161d9f81e198cf8312e4c9fe339b1a17eac486d8baa25dcf4cb5e849c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3133, + "startColumn": 14, + "charOffset": 107015, + "charLength": 6, + "snippet": { + "text": "weapon" + } + }, + "contextRegion": { + "startLine": 3131, + "startColumn": 14, + "charOffset": 106853, + "charLength": 6, + "snippet": { + "text": "\t\tif (weapon->getAmmoType() == AMMO_BOLT || weapon->getAmmoType() == AMMO_ARROW) {\n\t\t\tdistanceFactor = m_player.vocation->mitigationSecondaryShield;\n\t\t} else if (weapon->getSlotPosition() & SLOTP_TWO_HAND) {\n\t\t\tdefenseValue = weapon->getDefense() + weapon->getExtraDefense();\n\t\t\tshieldFactor = m_player.vocation->mitigationSecondaryShield;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fdd8b183b25fd0a28a19bfff3a85d8b2575a49c3a5e1566ca06f96786e74b952" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3133, + "startColumn": 14, + "charOffset": 107015, + "charLength": 6, + "snippet": { + "text": "weapon" + } + }, + "contextRegion": { + "startLine": 3131, + "startColumn": 14, + "charOffset": 106853, + "charLength": 6, + "snippet": { + "text": "\t\tif (weapon->getAmmoType() == AMMO_BOLT || weapon->getAmmoType() == AMMO_ARROW) {\n\t\t\tdistanceFactor = m_player.vocation->mitigationSecondaryShield;\n\t\t} else if (weapon->getSlotPosition() & SLOTP_TWO_HAND) {\n\t\t\tdefenseValue = weapon->getDefense() + weapon->getExtraDefense();\n\t\t\tshieldFactor = m_player.vocation->mitigationSecondaryShield;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2ae2bd83fdabb3b07bc1b13c8fcfbf4de80df6c8f20f1aab6fb11a418e22b7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3133, + "startColumn": 40, + "charOffset": 107041, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3131, + "startColumn": 40, + "charOffset": 106853, + "charLength": 1, + "snippet": { + "text": "\t\tif (weapon->getAmmoType() == AMMO_BOLT || weapon->getAmmoType() == AMMO_ARROW) {\n\t\t\tdistanceFactor = m_player.vocation->mitigationSecondaryShield;\n\t\t} else if (weapon->getSlotPosition() & SLOTP_TWO_HAND) {\n\t\t\tdefenseValue = weapon->getDefense() + weapon->getExtraDefense();\n\t\t\tshieldFactor = m_player.vocation->mitigationSecondaryShield;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44375e72c6b0bf34c6db3cffe18b7e0fff584908980cbcef1b6cbcb449e797cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3142, + "startColumn": 35, + "charOffset": 107354, + "charLength": 5, + "snippet": { + "text": "skill" + } + }, + "contextRegion": { + "startLine": 3140, + "startColumn": 35, + "charOffset": 107316, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tfloat mitigation = std::ceil(((((skill * m_player.vocation->mitigationFactor) + (shieldFactor * (float)defenseValue)) / 100.0f) * fightFactor * distanceFactor) * 100.0f) / 100.0f;\n\tmitigation += (mitigation * (float)getMitigationMultiplier()) / 100.f;\n\treturn mitigation;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8454f77b0ea032fd4132f8ac504d7380c72f09ca9fbf280bf9a503c8d8d3fba0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3142, + "startColumn": 35, + "charOffset": 107354, + "charLength": 5, + "snippet": { + "text": "skill" + } + }, + "contextRegion": { + "startLine": 3140, + "startColumn": 35, + "charOffset": 107316, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tfloat mitigation = std::ceil(((((skill * m_player.vocation->mitigationFactor) + (shieldFactor * (float)defenseValue)) / 100.0f) * fightFactor * distanceFactor) * 100.0f) / 100.0f;\n\tmitigation += (mitigation * (float)getMitigationMultiplier()) / 100.f;\n\treturn mitigation;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d43211c8458339b5e6a2a2d52e98503dccb15c652ac67177335ab840f6741229" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3142, + "startColumn": 98, + "charOffset": 107417, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 3140, + "startColumn": 98, + "charOffset": 107316, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tfloat mitigation = std::ceil(((((skill * m_player.vocation->mitigationFactor) + (shieldFactor * (float)defenseValue)) / 100.0f) * fightFactor * distanceFactor) * 100.0f) / 100.0f;\n\tmitigation += (mitigation * (float)getMitigationMultiplier()) / 100.f;\n\treturn mitigation;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14f9dc962dfb8b251cd4d2c495d448b126ec9c5662f04ef9153bc12c08bccd1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3142, + "startColumn": 122, + "charOffset": 107441, + "charLength": 6, + "snippet": { + "text": "100.0f" + } + }, + "contextRegion": { + "startLine": 3140, + "startColumn": 122, + "charOffset": 107316, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tfloat mitigation = std::ceil(((((skill * m_player.vocation->mitigationFactor) + (shieldFactor * (float)defenseValue)) / 100.0f) * fightFactor * distanceFactor) * 100.0f) / 100.0f;\n\tmitigation += (mitigation * (float)getMitigationMultiplier()) / 100.f;\n\treturn mitigation;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d8a7e8f05ac4b5e686a1f4f7d1253b4da94c99a0efb9e6e81cbf2c6dacc3411" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3142, + "startColumn": 122, + "charOffset": 107441, + "charLength": 6, + "snippet": { + "text": "100.0f" + } + }, + "contextRegion": { + "startLine": 3140, + "startColumn": 122, + "charOffset": 107316, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tfloat mitigation = std::ceil(((((skill * m_player.vocation->mitigationFactor) + (shieldFactor * (float)defenseValue)) / 100.0f) * fightFactor * distanceFactor) * 100.0f) / 100.0f;\n\tmitigation += (mitigation * (float)getMitigationMultiplier()) / 100.f;\n\treturn mitigation;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a29e532d136214e95ee8064fbbe34f9885313ed013db8c34c23c8ffab7f13bbb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3142, + "startColumn": 164, + "charOffset": 107483, + "charLength": 6, + "snippet": { + "text": "100.0f" + } + }, + "contextRegion": { + "startLine": 3140, + "startColumn": 164, + "charOffset": 107316, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tfloat mitigation = std::ceil(((((skill * m_player.vocation->mitigationFactor) + (shieldFactor * (float)defenseValue)) / 100.0f) * fightFactor * distanceFactor) * 100.0f) / 100.0f;\n\tmitigation += (mitigation * (float)getMitigationMultiplier()) / 100.f;\n\treturn mitigation;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b1557523592a35bc3df67fbbbfa6979a4ae5e9168c2dc93ed51e8dce142574c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3142, + "startColumn": 164, + "charOffset": 107483, + "charLength": 6, + "snippet": { + "text": "100.0f" + } + }, + "contextRegion": { + "startLine": 3140, + "startColumn": 164, + "charOffset": 107316, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tfloat mitigation = std::ceil(((((skill * m_player.vocation->mitigationFactor) + (shieldFactor * (float)defenseValue)) / 100.0f) * fightFactor * distanceFactor) * 100.0f) / 100.0f;\n\tmitigation += (mitigation * (float)getMitigationMultiplier()) / 100.f;\n\treturn mitigation;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6b6c2c9adb1c2210cbad1d9619884b1f2710d93217bd477f760db477f4981e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3142, + "startColumn": 174, + "charOffset": 107493, + "charLength": 6, + "snippet": { + "text": "100.0f" + } + }, + "contextRegion": { + "startLine": 3140, + "startColumn": 174, + "charOffset": 107316, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tfloat mitigation = std::ceil(((((skill * m_player.vocation->mitigationFactor) + (shieldFactor * (float)defenseValue)) / 100.0f) * fightFactor * distanceFactor) * 100.0f) / 100.0f;\n\tmitigation += (mitigation * (float)getMitigationMultiplier()) / 100.f;\n\treturn mitigation;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6a55324306217f326c534acc8682588a3a1df21519755d849dfa3ebc38efade" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3142, + "startColumn": 174, + "charOffset": 107493, + "charLength": 6, + "snippet": { + "text": "100.0f" + } + }, + "contextRegion": { + "startLine": 3140, + "startColumn": 174, + "charOffset": 107316, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tfloat mitigation = std::ceil(((((skill * m_player.vocation->mitigationFactor) + (shieldFactor * (float)defenseValue)) / 100.0f) * fightFactor * distanceFactor) * 100.0f) / 100.0f;\n\tmitigation += (mitigation * (float)getMitigationMultiplier()) / 100.f;\n\treturn mitigation;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "962e37c61ae1094dd4b603c3ffe2e103e564eb6312d19b32d27ab2562402c65a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3143, + "startColumn": 30, + "charOffset": 107530, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 3141, + "startColumn": 30, + "charOffset": 107319, + "charLength": 1, + "snippet": { + "text": "\n\tfloat mitigation = std::ceil(((((skill * m_player.vocation->mitigationFactor) + (shieldFactor * (float)defenseValue)) / 100.0f) * fightFactor * distanceFactor) * 100.0f) / 100.0f;\n\tmitigation += (mitigation * (float)getMitigationMultiplier()) / 100.f;\n\treturn mitigation;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ca732cd9f7720497b3b1aeb1b43613d4ede50637de9558171c429cfd453cb54" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3143, + "startColumn": 66, + "charOffset": 107566, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 3141, + "startColumn": 66, + "charOffset": 107319, + "charLength": 5, + "snippet": { + "text": "\n\tfloat mitigation = std::ceil(((((skill * m_player.vocation->mitigationFactor) + (shieldFactor * (float)defenseValue)) / 100.0f) * fightFactor * distanceFactor) * 100.0f) / 100.0f;\n\tmitigation += (mitigation * (float)getMitigationMultiplier()) / 100.f;\n\treturn mitigation;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e711ccce87da3df224f7455a1d46cf609a09c7d2a7db216b643e03c2975a4ca1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3143, + "startColumn": 66, + "charOffset": 107566, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 3141, + "startColumn": 66, + "charOffset": 107319, + "charLength": 5, + "snippet": { + "text": "\n\tfloat mitigation = std::ceil(((((skill * m_player.vocation->mitigationFactor) + (shieldFactor * (float)defenseValue)) / 100.0f) * fightFactor * distanceFactor) * 100.0f) / 100.0f;\n\tmitigation += (mitigation * (float)getMitigationMultiplier()) / 100.f;\n\treturn mitigation;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dceb35c4f54ab571666c3316cd1cbf70544e33d0fdd79e9da4b0fe41dc4553d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'selectBasicModifier2' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3147, + "startColumn": 38, + "charOffset": 107633, + "charLength": 20, + "snippet": { + "text": "selectBasicModifier2" + } + }, + "contextRegion": { + "startLine": 3145, + "startColumn": 38, + "charOffset": 107593, + "charLength": 20, + "snippet": { + "text": "}\n\nWheelGemBasicModifier_t PlayerWheel::selectBasicModifier2(WheelGemBasicModifier_t modifier1) const {\n\tWheelGemBasicModifier_t modifier = modifier1;\n\twhile (modifier == modifier1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ecfca6779c48a766a79475953271352b6fb6dbb804769f644112e7d012a638c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3149, + "startColumn": 2, + "charOffset": 107745, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 2, + "charOffset": 107596, + "charLength": 5, + "snippet": { + "text": "WheelGemBasicModifier_t PlayerWheel::selectBasicModifier2(WheelGemBasicModifier_t modifier1) const {\n\tWheelGemBasicModifier_t modifier = modifier1;\n\twhile (modifier == modifier1) {\n\t\tmodifier = wheelGemBasicSlot2Allowed[uniform_random(0, wheelGemBasicSlot2Allowed.size() - 1)];\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14e7694bf9bdf32fe091b5125312cb112f85554de690e0a1ca889d197d793a39" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'modifier' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3149, + "startColumn": 9, + "charOffset": 107752, + "charLength": 8, + "snippet": { + "text": "modifier" + } + }, + "contextRegion": { + "startLine": 3147, + "startColumn": 9, + "charOffset": 107596, + "charLength": 8, + "snippet": { + "text": "WheelGemBasicModifier_t PlayerWheel::selectBasicModifier2(WheelGemBasicModifier_t modifier1) const {\n\tWheelGemBasicModifier_t modifier = modifier1;\n\twhile (modifier == modifier1) {\n\t\tmodifier = wheelGemBasicSlot2Allowed[uniform_random(0, wheelGemBasicSlot2Allowed.size() - 1)];\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9264652768498782b48fc396c822512c9441b7afa1bceb2a94041694725f4ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3150, + "startColumn": 58, + "charOffset": 107834, + "charLength": 25, + "snippet": { + "text": "wheelGemBasicSlot2Allowed" + } + }, + "contextRegion": { + "startLine": 3148, + "startColumn": 58, + "charOffset": 107697, + "charLength": 25, + "snippet": { + "text": "\tWheelGemBasicModifier_t modifier = modifier1;\n\twhile (modifier == modifier1) {\n\t\tmodifier = wheelGemBasicSlot2Allowed[uniform_random(0, wheelGemBasicSlot2Allowed.size() - 1)];\n\t}\n\treturn modifier;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4307b5fbefb34cda53ec3b45e44a49223951129c37f81a2feab4ac47d3160810" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/player_wheel.cpp" + }, + "region": { + "startLine": 3150, + "startColumn": 58, + "charOffset": 107834, + "charLength": 25, + "snippet": { + "text": "wheelGemBasicSlot2Allowed" + } + }, + "contextRegion": { + "startLine": 3148, + "startColumn": 58, + "charOffset": 107697, + "charLength": 25, + "snippet": { + "text": "\tWheelGemBasicModifier_t modifier = modifier1;\n\twhile (modifier == modifier1) {\n\t\tmodifier = wheelGemBasicSlot2Allowed[uniform_random(0, wheelGemBasicSlot2Allowed.size() - 1)];\n\t}\n\treturn modifier;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55183510b2727dbce8a20249ca7b2bd93643cf1b5e0e29752bb1ca7f527aa67b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 121, + "charOffset": 1103, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 121, + "charOffset": 902, + "charLength": 3, + "snippet": { + "text": "\tswitch (modifier) {\n\t\tcase WheelGemBasicModifier_t::General_PhysicalResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_PHYSICALDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_HolyResistance:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc774bfdc42226d91ae4a3dfbb035f4ed4e15944317c098d27f8ede0133c3bd1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 36, + "startColumn": 117, + "charOffset": 1292, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 117, + "charOffset": 1110, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_HolyResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_HOLYDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_DeathResistance:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76f06ebd9aa783455338a092b4b9a1a35871ac4c1d795c7d810bd60df2b643dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 39, + "startColumn": 118, + "charOffset": 1483, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 37, + "startColumn": 118, + "charOffset": 1299, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_DeathResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_DEATHDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_FireResistance:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26f293893ea888758e376fd6cf005d5df4b6ecb3e7f2ff6f39a4f6643394db82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 117, + "charOffset": 1672, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 117, + "charOffset": 1490, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_FireResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EarthResistance:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69b5b9871141ef7f6d34a8e1e02ddb5d4c930a174b394a764f32c227b8cd62c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 118, + "charOffset": 1863, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 118, + "charOffset": 1679, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EarthResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_IceResistance:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb6111674daf07e2c1f7285a005a805d67aa7ae94b8cca891796bf3bea7abf53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 48, + "startColumn": 116, + "charOffset": 2050, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 116, + "charOffset": 1870, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_IceResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EnergyResistance:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63ed598d6b85f5eda7ca74e1d062245f57f430fd1ffb3b56730a93e0986d669b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 51, + "startColumn": 119, + "charOffset": 2243, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 49, + "startColumn": 119, + "charOffset": 2057, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EnergyResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_HolyResistance_DeathWeakness:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d34184543b94ebfe073257a628e7356ba1dab3a3a31e97669156115c7c7e470" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 53, + "startColumn": 3, + "charOffset": 2262, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 3, + "charOffset": 2125, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_HolyResistance_DeathWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_HOLYDAMAGE, 150));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_DEATHDAMAGE, -100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5456d764bdddf0e4332295b61690690da14135720dbd76a50730b38251e8b47d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "150 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 54, + "startColumn": 117, + "charOffset": 2446, + "charLength": 3, + "snippet": { + "text": "150" + } + }, + "contextRegion": { + "startLine": 52, + "startColumn": 117, + "charOffset": 2250, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_HolyResistance_DeathWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_HOLYDAMAGE, 150));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_DEATHDAMAGE, -100));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "790919b4ebf2ba9130edd206cd25afdb0424e3a05e0f843629c76889f931774a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 55, + "startColumn": 119, + "charOffset": 2571, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 119, + "charOffset": 2260, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::General_HolyResistance_DeathWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_HOLYDAMAGE, 150));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_DEATHDAMAGE, -100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_DeathResistance_HolyWeakness:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a78613f45619fa096d4a966fe7c8f327111802bd2a8d4b81007596a57f01061" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 57, + "startColumn": 3, + "charOffset": 2590, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 55, + "startColumn": 3, + "charOffset": 2453, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_DEATHDAMAGE, -100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_DeathResistance_HolyWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_DEATHDAMAGE, 150));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_HOLYDAMAGE, -100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e96a0e5fdd2291d698ca88b8a1527c6940aff15c786e620618c35aa24660453f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "150 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 58, + "startColumn": 118, + "charOffset": 2775, + "charLength": 3, + "snippet": { + "text": "150" + } + }, + "contextRegion": { + "startLine": 56, + "startColumn": 118, + "charOffset": 2578, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_DeathResistance_HolyWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_DEATHDAMAGE, 150));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_HOLYDAMAGE, -100));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ce149510f67dc55ca4ed0c9c94babf45a13cb736cbbbce88426963faf414baf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 118, + "charOffset": 2899, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 118, + "charOffset": 2588, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::General_DeathResistance_HolyWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_DEATHDAMAGE, 150));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_HOLYDAMAGE, -100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_FireResistance_EarthResistance:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7624544c2cc050bdd2869b9257b336050c6ceec4449a4a123c9b734ff67a5e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 61, + "startColumn": 3, + "charOffset": 2918, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 59, + "startColumn": 3, + "charOffset": 2782, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_HOLYDAMAGE, -100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_FireResistance_EarthResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 100));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47ffef4aaf0eab14e07958e759a00cecbef1007d7475b97002b275f15a70a459" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 62, + "startColumn": 117, + "charOffset": 3104, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 117, + "charOffset": 2906, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_FireResistance_EarthResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 100));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 100));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e3287f9627a2511508f5cdf43df5ea7db0c40e4713359266a35016c7c7cc3ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 63, + "startColumn": 118, + "charOffset": 3228, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 118, + "charOffset": 2916, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::General_FireResistance_EarthResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 100));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_FireResistance_IceResistance:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "959be3acac036f21e322648a0792ca4d7008e4cd7652bbc7dd3804d308021e4d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 65, + "startColumn": 3, + "charOffset": 3247, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 3, + "charOffset": 3111, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_FireResistance_IceResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 100));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19bde64786be2da445f1a180d68576f0b89afe30275918d349007fba58081b62" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 117, + "charOffset": 3431, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 117, + "charOffset": 3235, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_FireResistance_IceResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 100));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 100));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "420ca793c27447ed8e7050b5325f569352145b74ebd2e0618e1e0f7e7463749f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 67, + "startColumn": 116, + "charOffset": 3553, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 65, + "startColumn": 116, + "charOffset": 3245, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::General_FireResistance_IceResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 100));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_FireResistance_EnergyResistance:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63f152e4c07d232455dd6d5a2b9da9b13f0228468dba9f5553d1960b4e7fcfe4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 69, + "startColumn": 3, + "charOffset": 3572, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 67, + "startColumn": 3, + "charOffset": 3438, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_FireResistance_EnergyResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 100));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84390a99e2a87b9a18ca998e86a972a794e902fed2ac0df4b2828d25b128963b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 117, + "charOffset": 3759, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 117, + "charOffset": 3560, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_FireResistance_EnergyResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 100));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 100));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6665e4c8a6548832cbcbb9597e356b1fd49462878195b4d5d67037b4c34735ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 71, + "startColumn": 119, + "charOffset": 3884, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 69, + "startColumn": 119, + "charOffset": 3570, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::General_FireResistance_EnergyResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 100));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EarthResistance_IceResistance:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1953a6fe1b03ac61c4b60d37b9619222229687ab0bbd34e197834805024f35d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 73, + "startColumn": 3, + "charOffset": 3903, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 71, + "startColumn": 3, + "charOffset": 3766, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EarthResistance_IceResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 100));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a21e69bc0dc05fb9f5c4cceda1019e5870a19e6e3776c312757f39cbcdef7012" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 118, + "charOffset": 4089, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 118, + "charOffset": 3891, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EarthResistance_IceResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 100));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 100));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab73915dc0cee1a7c250065bf800fcf0a81466a8cb2a0fcced388d8d3da14d5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 75, + "startColumn": 116, + "charOffset": 4211, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 73, + "startColumn": 116, + "charOffset": 3901, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::General_EarthResistance_IceResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 100));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EarthResistance_EnergyResistance:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f52625c141f2959084fa89785af5e5581f36152d2a43591cd3226d7bfa0adb3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 77, + "startColumn": 3, + "charOffset": 4230, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 75, + "startColumn": 3, + "charOffset": 4096, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EarthResistance_EnergyResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 100));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1c765fbf6844bfb968b1aa1fee726b29cc57c628deae1009efbc62b57cd14bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 118, + "charOffset": 4419, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 118, + "charOffset": 4218, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EarthResistance_EnergyResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 100));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 100));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4db5fa30d43cda6509cbf28c5f7e815134ed0ad9362175f61dfb446340aaccc3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 79, + "startColumn": 119, + "charOffset": 4544, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 77, + "startColumn": 119, + "charOffset": 4228, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::General_EarthResistance_EnergyResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 100));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_IceResistance_EnergyResistance:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73500cd0cec035a27dd12da1da3e2bc33c15847c40a2f0dd18231434a5538fd5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 81, + "startColumn": 3, + "charOffset": 4563, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 79, + "startColumn": 3, + "charOffset": 4426, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_IceResistance_EnergyResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 100));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a84da951875abc6a26b5da1553e73bcf10efeae6be511a3957b935f8b22abae0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 82, + "startColumn": 116, + "charOffset": 4748, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 116, + "charOffset": 4551, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_IceResistance_EnergyResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 100));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 100));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29f6d1090289c437c78f3cb90b069211b1c4219aa2c676b254a7251614cdda24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 83, + "startColumn": 119, + "charOffset": 4873, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 81, + "startColumn": 119, + "charOffset": 4561, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::General_IceResistance_EnergyResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 100));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_FireResistance_EarthWeakness:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7f1c178da00cc49f392eb34ab1783a3219299b753c075db91a40c60fe0fe1ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 85, + "startColumn": 3, + "charOffset": 4892, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 3, + "charOffset": 4755, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_FireResistance_EarthWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, -200));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "016b3f415521a368cabd2603528883215b9914638228ab46f9e17b1253460d65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 86, + "startColumn": 117, + "charOffset": 5076, + "charLength": 3, + "snippet": { + "text": "300" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 117, + "charOffset": 4880, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_FireResistance_EarthWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, -200));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c45cd0ab38327005c640be0f942dd8f87192d164b2694c0961cce5a306e7aad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 119, + "charOffset": 5201, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 119, + "charOffset": 4890, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::General_FireResistance_EarthWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, -200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_FireResistance_IceWeakness:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d745718b811fdda625c18e88c0d91631516805162604878d2a573a670784e24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 89, + "startColumn": 3, + "charOffset": 5220, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 87, + "startColumn": 3, + "charOffset": 5083, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, -200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_FireResistance_IceWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, -200));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69dc71e78972645a35b795192b8c7db8d4c183d2bfc792eacd69af753b1582ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 90, + "startColumn": 117, + "charOffset": 5402, + "charLength": 3, + "snippet": { + "text": "300" + } + }, + "contextRegion": { + "startLine": 88, + "startColumn": 117, + "charOffset": 5208, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_FireResistance_IceWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, -200));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "168f07ddbe504a4fd3df1743e2d24555ac79991461b284a85a025f5b025de373" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 117, + "charOffset": 5525, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 117, + "charOffset": 5218, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::General_FireResistance_IceWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, -200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_FireResistance_EnergyWeakness:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72c884f692631bb9a96e782aaf58b171deabd3f3a910bfa6534cea1f8132f174" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 93, + "startColumn": 3, + "charOffset": 5544, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 91, + "startColumn": 3, + "charOffset": 5409, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, -200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_FireResistance_EnergyWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, -200));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "525f1d3cc2a1b06c62fb7a8c317871b02cc2b56f238e74a95c9626b4ca590189" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 94, + "startColumn": 117, + "charOffset": 5729, + "charLength": 3, + "snippet": { + "text": "300" + } + }, + "contextRegion": { + "startLine": 92, + "startColumn": 117, + "charOffset": 5532, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_FireResistance_EnergyWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, -200));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c329aaa6d368e516d31d4373edfa3f8734799380b86d6d76dfd4405f8668232b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 95, + "startColumn": 120, + "charOffset": 5855, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 93, + "startColumn": 120, + "charOffset": 5542, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::General_FireResistance_EnergyWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, -200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EarthResistance_FireWeakness:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c87cd8eb251461f70c87525596a1830cb27e450c2ec38ab99d79ce734ad68c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 97, + "startColumn": 3, + "charOffset": 5874, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 95, + "startColumn": 3, + "charOffset": 5736, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, -200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EarthResistance_FireWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, -200));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8637952022fe4dd8953eed7c690f70842df29c5455caf9341edf5a0a4f0a2388" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 118, + "charOffset": 6059, + "charLength": 3, + "snippet": { + "text": "300" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 118, + "charOffset": 5862, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EarthResistance_FireWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, -200));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "119576c002b169313935943c13bdf6596610d6f8bcf981abac96f42aae3d259b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 99, + "startColumn": 118, + "charOffset": 6183, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 97, + "startColumn": 118, + "charOffset": 5872, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::General_EarthResistance_FireWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, -200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EarthResistance_IceWeakness:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8a6c4f82fd88a725ce53aa1a27c4210348d75e651320cb92e762d41450a04a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 101, + "startColumn": 3, + "charOffset": 6202, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 99, + "startColumn": 3, + "charOffset": 6066, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, -200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EarthResistance_IceWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, -200));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc43ff9acea17de0653291c0b4fec2d811df2d7d339f0725b78d30e68b036fcb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 102, + "startColumn": 118, + "charOffset": 6386, + "charLength": 3, + "snippet": { + "text": "300" + } + }, + "contextRegion": { + "startLine": 100, + "startColumn": 118, + "charOffset": 6190, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EarthResistance_IceWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, -200));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b2d2eb9f15827b9cac01b6e90a060f81dae381a380f6b987498421636fb1904" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 103, + "startColumn": 117, + "charOffset": 6509, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 101, + "startColumn": 117, + "charOffset": 6200, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::General_EarthResistance_IceWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, -200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EarthResistance_EnergyWeakness:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c180e4ade150208d97fd78cedd56986780143fec7da0ed28ff078785eea722e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 105, + "startColumn": 3, + "charOffset": 6528, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 103, + "startColumn": 3, + "charOffset": 6393, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, -200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EarthResistance_EnergyWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, -200));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66e13a621b9c34cd2f2ff8b9ca98ac492fb81561bc37f722241d39713c53db59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 106, + "startColumn": 118, + "charOffset": 6715, + "charLength": 3, + "snippet": { + "text": "300" + } + }, + "contextRegion": { + "startLine": 104, + "startColumn": 118, + "charOffset": 6516, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EarthResistance_EnergyWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, -200));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70fd2292559680021caa640719e528bdfaea06f1e1af72d401862ee13474de87" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 107, + "startColumn": 120, + "charOffset": 6841, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 105, + "startColumn": 120, + "charOffset": 6526, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::General_EarthResistance_EnergyWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, -200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_IceResistance_EarthWeakness:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d50baffdab5e454f7d912e36bdb0983bb96fcf126a60da59a57a7b3d90d6f99a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 109, + "startColumn": 3, + "charOffset": 6860, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 107, + "startColumn": 3, + "charOffset": 6722, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, -200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_IceResistance_EarthWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, -200));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f559dfa0abc75c728e453f80d2d3b5cfae69228e83b9e4534bccd033d924bfb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 110, + "startColumn": 116, + "charOffset": 7042, + "charLength": 3, + "snippet": { + "text": "300" + } + }, + "contextRegion": { + "startLine": 108, + "startColumn": 116, + "charOffset": 6848, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_IceResistance_EarthWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, -200));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ff180152f7f54daf37dac07211c016b35d6ea408cae4da6d438d851b5039f94" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 119, + "charOffset": 7167, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 119, + "charOffset": 6858, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::General_IceResistance_EarthWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, -200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_IceResistance_FireWeakness:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9292038c8c70a5673fa262c45ac6acdbcb2bc0ae3e9a4ddb09b66bef8b5d7650" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 113, + "startColumn": 3, + "charOffset": 7186, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 111, + "startColumn": 3, + "charOffset": 7049, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, -200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_IceResistance_FireWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, -200));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09c6c0958cb07412713bde9d274935ec2db3b9361fcbee293d9d847901a84029" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 114, + "startColumn": 116, + "charOffset": 7367, + "charLength": 3, + "snippet": { + "text": "300" + } + }, + "contextRegion": { + "startLine": 112, + "startColumn": 116, + "charOffset": 7174, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_IceResistance_FireWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, -200));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8316fd7b0930c98421fbb70b4b4bae58d913de5d692c510eecb190a8a6422ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 115, + "startColumn": 118, + "charOffset": 7491, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 113, + "startColumn": 118, + "charOffset": 7184, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::General_IceResistance_FireWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, -200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_IceResistance_EnergyWeakness:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c41afbaffc7749524776e447b618099f08b303fbf71a04015c15b99a328264f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 117, + "startColumn": 3, + "charOffset": 7510, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 115, + "startColumn": 3, + "charOffset": 7374, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, -200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_IceResistance_EnergyWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, -200));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b66daacba5ac013c2be114485f9da31f259007416acdddea711c16e7d51ff73e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 118, + "startColumn": 116, + "charOffset": 7693, + "charLength": 3, + "snippet": { + "text": "300" + } + }, + "contextRegion": { + "startLine": 116, + "startColumn": 116, + "charOffset": 7498, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_IceResistance_EnergyWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, -200));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6fa7c98e8ab817a6174fe877c40b2c829d77b595ada6f0a34577c2af09610fbf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 119, + "startColumn": 120, + "charOffset": 7819, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 117, + "startColumn": 120, + "charOffset": 7508, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::General_IceResistance_EnergyWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, -200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EnergyResistance_EarthWeakness:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7198895de442172c808261dbb4d6937ebc55e6fdffc28cd3de49299fac104ca7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 121, + "startColumn": 3, + "charOffset": 7838, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 119, + "startColumn": 3, + "charOffset": 7700, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, -200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EnergyResistance_EarthWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, -200));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d479a29472825a772474c3cd32dc601bc81add27d1c60b7213dc4c976d8b3cf9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 122, + "startColumn": 119, + "charOffset": 8026, + "charLength": 3, + "snippet": { + "text": "300" + } + }, + "contextRegion": { + "startLine": 120, + "startColumn": 119, + "charOffset": 7826, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EnergyResistance_EarthWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, -200));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2627f7211a560199b3bebb929c141c6e669dbe49e42d7e4481b0f36e9bb62e27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 123, + "startColumn": 119, + "charOffset": 8151, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 121, + "startColumn": 119, + "charOffset": 7836, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::General_EnergyResistance_EarthWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, -200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EnergyResistance_IceWeakness:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2c4e2c839bf778ca48ee437e98dc06576ce02541d75f61526d0fa9eb8482cf6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 125, + "startColumn": 3, + "charOffset": 8170, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 123, + "startColumn": 3, + "charOffset": 8033, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, -200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EnergyResistance_IceWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, -200));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9289292ef46e78fd7ffcbb33ff7c0b1c06667872eff807eb516af6ca20b2e3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 126, + "startColumn": 119, + "charOffset": 8356, + "charLength": 3, + "snippet": { + "text": "300" + } + }, + "contextRegion": { + "startLine": 124, + "startColumn": 119, + "charOffset": 8158, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EnergyResistance_IceWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, -200));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "972fdf6d058879dee5ae5de0933f4939d4b186aa7c2a0f2779969316cf12e416" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 127, + "startColumn": 117, + "charOffset": 8479, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 125, + "startColumn": 117, + "charOffset": 8168, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::General_EnergyResistance_IceWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, -200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EnergyResistance_FireWeakness:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da1c8b8e2bca502622ca691bae67c242df03c604ff15df0fd8d3411fee3da309" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 129, + "startColumn": 3, + "charOffset": 8498, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 127, + "startColumn": 3, + "charOffset": 8363, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, -200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EnergyResistance_FireWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, -200));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "481e9ea3525e131ceac0096e8b7a8b324b8002ec19c8e18a4ad2bf9db4615399" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 130, + "startColumn": 119, + "charOffset": 8685, + "charLength": 3, + "snippet": { + "text": "300" + } + }, + "contextRegion": { + "startLine": 128, + "startColumn": 119, + "charOffset": 8486, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_EnergyResistance_FireWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, -200));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b75b72a8d17c7f2006b22aaf13ef12f5feabe6eeb802dceac1aee70bef12f47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 131, + "startColumn": 118, + "charOffset": 8809, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 129, + "startColumn": 118, + "charOffset": 8496, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::General_EnergyResistance_FireWeakness:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 300));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, -200));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_ManaDrainResistance:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6bb7acb8322ec07cd80c07616ecaae958b144f2839e8af588d3e273094fb4f60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 116, + "charOffset": 9002, + "charLength": 3, + "snippet": { + "text": "300" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 116, + "charOffset": 8816, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_ManaDrainResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_MANADRAIN, 300));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_LifeDrainResistance:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ed5bea060fa748c149787cd4e08a7a78f498edc655e3f6b609abd3fdce7ca6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 137, + "startColumn": 116, + "charOffset": 9195, + "charLength": 3, + "snippet": { + "text": "300" + } + }, + "contextRegion": { + "startLine": 135, + "startColumn": 116, + "charOffset": 9009, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_LifeDrainResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_LIFEDRAIN, 300));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_ManaDrainResistance_LifeDrainResistance:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e3183ee98c2269726ed7a544b4ab07de45943c05574c754e7a50e57f9ab7355" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 139, + "startColumn": 3, + "charOffset": 9214, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 137, + "startColumn": 3, + "charOffset": 9080, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_LIFEDRAIN, 300));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_ManaDrainResistance_LifeDrainResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_MANADRAIN, 150));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_LIFEDRAIN, 150));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f85610b4d217283f0a23ba7bf4f79fe614f6300cde8d3395dfc36e21c5a0782a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "150 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 140, + "startColumn": 116, + "charOffset": 9408, + "charLength": 3, + "snippet": { + "text": "150" + } + }, + "contextRegion": { + "startLine": 138, + "startColumn": 116, + "charOffset": 9202, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_ManaDrainResistance_LifeDrainResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_MANADRAIN, 150));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_LIFEDRAIN, 150));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "988ac40d898ac137b7b42591785d30e10b2b1a5101f911768a1d680c195ab3c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "150 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 141, + "startColumn": 116, + "charOffset": 9530, + "charLength": 3, + "snippet": { + "text": "150" + } + }, + "contextRegion": { + "startLine": 139, + "startColumn": 116, + "charOffset": 9212, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::General_ManaDrainResistance_LifeDrainResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_MANADRAIN, 150));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_LIFEDRAIN, 150));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_MitigationMultiplier:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d8a31e2f109bcdc2fb3084b1ee2e03bfbdcb9f145e87242f79876921db08283" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "500 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 144, + "startColumn": 103, + "charOffset": 9711, + "charLength": 3, + "snippet": { + "text": "500" + } + }, + "contextRegion": { + "startLine": 142, + "startColumn": 103, + "charOffset": 9537, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::General_MitigationMultiplier:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::MITIGATION, 500));\n\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "440b932b4bfb39e0c3d6c80cdf1fe7fd55fc0e797e1319507215d9d1f53066a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 150, + "startColumn": 3, + "charOffset": 9928, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 148, + "startColumn": 3, + "charOffset": 9778, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::HEALTH, getHealthValue(m_vocation, modifier)));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::Vocation_Mana_FireResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::MANA, getManaValue(m_vocation, modifier)));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c2a46aa7395babac2bab8e3a8167752aaa8b6ed578734068229ec7f9a4df1a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 152, + "startColumn": 117, + "charOffset": 10238, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 117, + "charOffset": 9926, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::Vocation_Mana_FireResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::MANA, getManaValue(m_vocation, modifier)));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::Vocation_Mana_EnergyResistance:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15c3b6cea37490f608c3dcc2e284d8474facd20b7e65a1df1e144070252e053c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 154, + "startColumn": 3, + "charOffset": 10257, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 3, + "charOffset": 10122, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::Vocation_Mana_EnergyResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::MANA, getManaValue(m_vocation, modifier)));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad645a2a3415762721d1395f142efb896ffbb29ce78272cb18daaf914b244def" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 156, + "startColumn": 119, + "charOffset": 10571, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 154, + "startColumn": 119, + "charOffset": 10255, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::Vocation_Mana_EnergyResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::MANA, getManaValue(m_vocation, modifier)));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::Vocation_Mana_Earth_Resistance:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f645528cb5c428df4370735b4d931830f09492c97d1fa3d11cb8fc09ec237ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 158, + "startColumn": 3, + "charOffset": 10590, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 156, + "startColumn": 3, + "charOffset": 10453, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::Vocation_Mana_Earth_Resistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::MANA, getManaValue(m_vocation, modifier)));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90c559088e7c9387544800299de84b9321f347662af33f9a4f3457b6d26e1ea6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 160, + "startColumn": 118, + "charOffset": 10903, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 118, + "charOffset": 10588, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::Vocation_Mana_Earth_Resistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::MANA, getManaValue(m_vocation, modifier)));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::Vocation_Mana_Ice_Resistance:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16d49c83fd2e7c0c4f45f0f88cd86d2a53353083a43f5118bf7608520ddd29af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 162, + "startColumn": 3, + "charOffset": 10922, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 160, + "startColumn": 3, + "charOffset": 10786, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::Vocation_Mana_Ice_Resistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::MANA, getManaValue(m_vocation, modifier)));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3fd5130d77ba1a231163ad966b6044d5ac0e6f66c6343a886dfc2f2049d8c89f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 164, + "startColumn": 116, + "charOffset": 11231, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 162, + "startColumn": 116, + "charOffset": 10920, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::Vocation_Mana_Ice_Resistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::MANA, getManaValue(m_vocation, modifier)));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::Vocation_Mana:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e4345c58e3e096565cb3d8f225be686ca560f9aead59f04e5e09d49edd3ca13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 169, + "startColumn": 3, + "charOffset": 11441, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 167, + "startColumn": 3, + "charOffset": 11295, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::MANA, getManaValue(m_vocation, modifier)));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::Vocation_Health_FireResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::HEALTH, getHealthValue(m_vocation, modifier)));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bdb1b104c83ed770be44a65e3bd6b46d242265f8d1e45d925e88590547aa8dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 171, + "startColumn": 117, + "charOffset": 11757, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 169, + "startColumn": 117, + "charOffset": 11439, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::Vocation_Health_FireResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::HEALTH, getHealthValue(m_vocation, modifier)));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::Vocation_Health_EnergyResistance:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a666665242da0698d2ec909df37ccb90a09c67c2653855242d2c9d1b20af4314" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 173, + "startColumn": 3, + "charOffset": 11776, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 171, + "startColumn": 3, + "charOffset": 11641, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::Vocation_Health_EnergyResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::HEALTH, getHealthValue(m_vocation, modifier)));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1c61464a3e2432cc81b5a2fb1d09dddf5c405b39d4c1e3d8b3202bff1db8d74" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 175, + "startColumn": 119, + "charOffset": 12096, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 173, + "startColumn": 119, + "charOffset": 11774, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::Vocation_Health_EnergyResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::HEALTH, getHealthValue(m_vocation, modifier)));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::Vocation_Health_EarthResistance:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e06e70623bd57b0700c8466621ba143bf9c60e28bd4078399505b209eee9ab5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 177, + "startColumn": 3, + "charOffset": 12115, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 175, + "startColumn": 3, + "charOffset": 11978, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::Vocation_Health_EarthResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::HEALTH, getHealthValue(m_vocation, modifier)));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8925562712360757e1cf9174de138d7d51f31af39b5061703dcfc598fcef0085" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 179, + "startColumn": 118, + "charOffset": 12433, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 177, + "startColumn": 118, + "charOffset": 12113, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::Vocation_Health_EarthResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::HEALTH, getHealthValue(m_vocation, modifier)));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::Vocation_Health_IceResistance:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ebf95cd37af8088a766e72f68c52002879003320bf38d2e941b628752d9ac743" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 181, + "startColumn": 3, + "charOffset": 12452, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 179, + "startColumn": 3, + "charOffset": 12316, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::Vocation_Health_IceResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::HEALTH, getHealthValue(m_vocation, modifier)));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "321fb4c81585bcf29a8e494fd4ab0bbc8e666040952bd610afa42e9203ec59f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 183, + "startColumn": 116, + "charOffset": 12766, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 181, + "startColumn": 116, + "charOffset": 12450, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::Vocation_Health_IceResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::HEALTH, getHealthValue(m_vocation, modifier)));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::Vocation_Mixed:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6694682d5814fbe00e0cd6299162ec44afe63f71e3550ecd12b5f0e8c4b4c2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 185, + "startColumn": 3, + "charOffset": 12785, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 183, + "startColumn": 3, + "charOffset": 12651, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::Vocation_Mixed:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::HEALTH, getHealthValue(m_vocation, modifier)));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::MANA, getManaValue(m_vocation, modifier)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13284487216c7836bb9a6afe7b31464c9960bca5b05d0019a3da8e353c482935" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 190, + "startColumn": 3, + "charOffset": 13257, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 188, + "startColumn": 3, + "charOffset": 13103, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::CAPACITY, getCapacityValue(m_vocation, modifier)));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::Vocation_Capacity_FireResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::CAPACITY, getCapacityValue(m_vocation, modifier)));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "529256b5fa3f238e23a060734f4fe1a8ca4c530cffa59a89f13271951bfa719e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 192, + "startColumn": 117, + "charOffset": 13579, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 190, + "startColumn": 117, + "charOffset": 13255, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::Vocation_Capacity_FireResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::CAPACITY, getCapacityValue(m_vocation, modifier)));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::Vocation_Capacity_EnergyResistance:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a78613f45619fa096d4a966fe7c8f327111802bd2a8d4b81007596a57f01061" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 194, + "startColumn": 3, + "charOffset": 13598, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 192, + "startColumn": 3, + "charOffset": 13463, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_FIREDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::Vocation_Capacity_EnergyResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::CAPACITY, getCapacityValue(m_vocation, modifier)));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e96a0e5fdd2291d698ca88b8a1527c6940aff15c786e620618c35aa24660453f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 196, + "startColumn": 119, + "charOffset": 13924, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 194, + "startColumn": 119, + "charOffset": 13596, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::Vocation_Capacity_EnergyResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::CAPACITY, getCapacityValue(m_vocation, modifier)));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::Vocation_Capacity_EarthResistance:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db28588adb259fe39aee61ca8546792bb700a67e3a789dd9b0ce2b56c28da1f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 198, + "startColumn": 3, + "charOffset": 13943, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 196, + "startColumn": 3, + "charOffset": 13806, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ENERGYDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::Vocation_Capacity_EarthResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::CAPACITY, getCapacityValue(m_vocation, modifier)));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44a73c9c86483e157c0ffd53fc4446b946d301d69f665416aad4365aacb6deb7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 200, + "startColumn": 118, + "charOffset": 14267, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 198, + "startColumn": 118, + "charOffset": 13941, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::Vocation_Capacity_EarthResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::CAPACITY, getCapacityValue(m_vocation, modifier)));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::Vocation_Capacity_IceResistance:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e397a30232d3bfb248c1ea2c2960b749b6db3287206963b48bfd3742f90a0cbd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 202, + "startColumn": 3, + "charOffset": 14286, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 200, + "startColumn": 3, + "charOffset": 14150, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_EARTHDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::Vocation_Capacity_IceResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::CAPACITY, getCapacityValue(m_vocation, modifier)));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6daa392c51f6edfe21680e3d2eeff9293b81e337d5dc2b9c200cd325930cc92" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 204, + "startColumn": 116, + "charOffset": 14606, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 202, + "startColumn": 116, + "charOffset": 14284, + "charLength": 3, + "snippet": { + "text": "\t\tcase WheelGemBasicModifier_t::Vocation_Capacity_IceResistance:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::CAPACITY, getCapacityValue(m_vocation, modifier)));\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, CombatType_t::COMBAT_ICEDAMAGE, 100));\n\t\t\tbreak;\n\t\tcase WheelGemBasicModifier_t::Vocation_Capacity:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "decb3dc0beeeddccece5b255bab1c283faf861d881885d405a439c6b9c040690" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 210, + "startColumn": 3, + "charOffset": 14829, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 208, + "startColumn": 3, + "charOffset": 14816, + "charLength": 7, + "snippet": { + "text": "\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tg_logger().error(\"WheelModifierContext::setStrategy: Invalid basic modifier: {}\", static_cast(modifier));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa818a3e4760457dfc2bed7a5494484d87183f2206c512c661fbe47e629bfa8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 220, + "startColumn": 98, + "charOffset": 15236, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 218, + "startColumn": 98, + "charOffset": 15069, + "charLength": 2, + "snippet": { + "text": "\tswitch (modifier) {\n\t\tcase WheelGemSupremeModifier_t::General_Dodge:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::DODGE, 25));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::General_LifeLeech:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2d8f7c50e340ef69b5290d4fbb68fd360666d07a752b73463d3fb584ca81e33" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "120 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 223, + "startColumn": 103, + "charOffset": 15407, + "charLength": 3, + "snippet": { + "text": "120" + } + }, + "contextRegion": { + "startLine": 221, + "startColumn": 103, + "charOffset": 15242, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::General_LifeLeech:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::LIFE_LEECH, 120));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::General_ManaLeech:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b66505e9d3a9b5f2a7c81f9586a4ea82c035be7bb64e6cf5cf0fe9d865ac0cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 103, + "charOffset": 15579, + "charLength": 2, + "snippet": { + "text": "40" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 103, + "charOffset": 15414, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::General_ManaLeech:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::MANA_LEECH, 40));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::General_CriticalDamage:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77cead79cf7913313061f38b4cb200f59f0fbe6a87ef02151b8354056e9df907" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "150 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 229, + "startColumn": 108, + "charOffset": 15760, + "charLength": 3, + "snippet": { + "text": "150" + } + }, + "contextRegion": { + "startLine": 227, + "startColumn": 108, + "charOffset": 15585, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::General_CriticalDamage:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelStat_t::CRITICAL_DAMAGE, 150));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::General_RevelationMastery_GiftOfLife:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78114a4390f8dcd45f9123d62fb7cdeac614e90805317b28eaac6c79c86a8608" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "150 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 232, + "startColumn": 111, + "charOffset": 15959, + "charLength": 3, + "snippet": { + "text": "150" + } + }, + "contextRegion": { + "startLine": 230, + "startColumn": 111, + "charOffset": 15767, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::General_RevelationMastery_GiftOfLife:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelGemAffinity_t::Green, 150));\n\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b287499ff620a5e8bdcf85e97bcf7d3a6e0de782d4e392d345ff788bd5f1ee6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 235, + "startColumn": 3, + "charOffset": 15979, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 233, + "startColumn": 3, + "charOffset": 15966, + "charLength": 4, + "snippet": { + "text": "\t\t\tbreak;\n\n\t\tcase WheelGemSupremeModifier_t::SorcererDruid_UltimateHealing:\n\t\t\tbonus.increase.heal = 10;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Ultimate Healing\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03af4265aefb5713fc5780192a0116b2e74b3c909c3c3e04da3d547e8375f740" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 236, + "startColumn": 26, + "charOffset": 16067, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 234, + "startColumn": 26, + "charOffset": 15976, + "charLength": 2, + "snippet": { + "text": "\n\t\tcase WheelGemSupremeModifier_t::SorcererDruid_UltimateHealing:\n\t\t\tbonus.increase.heal = 10;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Ultimate Healing\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0eaad9fc4af587b0b2484cacb524f39d4da032bf69065ddd71638461cfdd244" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "150 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 241, + "startColumn": 109, + "charOffset": 16380, + "charLength": 3, + "snippet": { + "text": "150" + } + }, + "contextRegion": { + "startLine": 239, + "startColumn": 109, + "charOffset": 16193, + "charLength": 3, + "snippet": { + "text": "\n\t\tcase WheelGemSupremeModifier_t::Knight_RevelationMastery_ExecutionersThrow:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelGemAffinity_t::Red, 150));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_RevelationMastery_AvatarOfSteel:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21b1fbab4cbf3f2be6e56ded2fe27d57eb026dc501aa87bf063484ddef210f52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "150 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 244, + "startColumn": 112, + "charOffset": 16582, + "charLength": 3, + "snippet": { + "text": "150" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 112, + "charOffset": 16387, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_RevelationMastery_AvatarOfSteel:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelGemAffinity_t::Purple, 150));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_RevelationMastery_CombatMastery:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "888c55b1bc1d65ee8705d106cd8e76c46c8a97ecae8d2ed13b49dbe56cfce53c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "150 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 247, + "startColumn": 110, + "charOffset": 16782, + "charLength": 3, + "snippet": { + "text": "150" + } + }, + "contextRegion": { + "startLine": 245, + "startColumn": 110, + "charOffset": 16589, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_RevelationMastery_CombatMastery:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelGemAffinity_t::Blue, 150));\n\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "790919b4ebf2ba9130edd206cd25afdb0424e3a05e0f843629c76889f931774a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "150 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 251, + "startColumn": 109, + "charOffset": 16983, + "charLength": 3, + "snippet": { + "text": "150" + } + }, + "contextRegion": { + "startLine": 249, + "startColumn": 109, + "charOffset": 16799, + "charLength": 3, + "snippet": { + "text": "\n\t\tcase WheelGemSupremeModifier_t::Paladin_RevelationMastery_DivineGrenade:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelGemAffinity_t::Red, 150));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_RevelationMastery_AvatarOfLight:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b287499ff620a5e8bdcf85e97bcf7d3a6e0de782d4e392d345ff788bd5f1ee6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "150 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 254, + "startColumn": 112, + "charOffset": 17186, + "charLength": 3, + "snippet": { + "text": "150" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 112, + "charOffset": 16990, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_RevelationMastery_AvatarOfLight:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelGemAffinity_t::Purple, 150));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_RevelationMastery_DivineEmpowerment:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b543d6a5bbf2a247f5792cf372d123beb01c0f856f772ddc90013077905491c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "150 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 257, + "startColumn": 110, + "charOffset": 17391, + "charLength": 3, + "snippet": { + "text": "150" + } + }, + "contextRegion": { + "startLine": 255, + "startColumn": 110, + "charOffset": 17193, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_RevelationMastery_DivineEmpowerment:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelGemAffinity_t::Blue, 150));\n\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52c964a4ccdaa62081ae3d89adad3e8816c412b5569af4d8e44e1d08d36b7bb9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "150 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 261, + "startColumn": 109, + "charOffset": 17595, + "charLength": 3, + "snippet": { + "text": "150" + } + }, + "contextRegion": { + "startLine": 259, + "startColumn": 109, + "charOffset": 17408, + "charLength": 3, + "snippet": { + "text": "\n\t\tcase WheelGemSupremeModifier_t::Druid_RevelationMastery_BlessingOfTheGrove:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelGemAffinity_t::Red, 150));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_RevelationMastery_AvatarOfNature:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9dadd8409ca1533a8bffbe4f721177fba14524ba1586c9970375eebf775f7bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "150 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 264, + "startColumn": 112, + "charOffset": 17797, + "charLength": 3, + "snippet": { + "text": "150" + } + }, + "contextRegion": { + "startLine": 262, + "startColumn": 112, + "charOffset": 17602, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_RevelationMastery_AvatarOfNature:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelGemAffinity_t::Purple, 150));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_RevelationMastery_TwinBursts:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a526a2396077f1e197781740d2af981127e92c69865bd957562ecbfb1ae69b22" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "150 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 267, + "startColumn": 110, + "charOffset": 17993, + "charLength": 3, + "snippet": { + "text": "150" + } + }, + "contextRegion": { + "startLine": 265, + "startColumn": 110, + "charOffset": 17804, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_RevelationMastery_TwinBursts:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelGemAffinity_t::Blue, 150));\n\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "072d4fa15de52b3d2a20bbcb7bae3f3ecebe7864992224510e9afaf37e2be885" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "150 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 271, + "startColumn": 109, + "charOffset": 18193, + "charLength": 3, + "snippet": { + "text": "150" + } + }, + "contextRegion": { + "startLine": 269, + "startColumn": 109, + "charOffset": 18010, + "charLength": 3, + "snippet": { + "text": "\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_RevelationMastery_BeamMastery:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelGemAffinity_t::Red, 150));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_RevelationMastery_AvatarOfStorm:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b38d74366505aaa91834f188be506a3e92d55289afd3a6879a514955ad5314c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "150 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 274, + "startColumn": 112, + "charOffset": 18397, + "charLength": 3, + "snippet": { + "text": "150" + } + }, + "contextRegion": { + "startLine": 272, + "startColumn": 112, + "charOffset": 18200, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_RevelationMastery_AvatarOfStorm:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelGemAffinity_t::Purple, 150));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_RevelationMastery_DrainBody:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf3ed174b923f592a47bc1543f8fc3d631c5fe97acd45671abcab2c402129ba1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "150 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 277, + "startColumn": 110, + "charOffset": 18595, + "charLength": 3, + "snippet": { + "text": "150" + } + }, + "contextRegion": { + "startLine": 275, + "startColumn": 110, + "charOffset": 18404, + "charLength": 3, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_RevelationMastery_DrainBody:\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, WheelGemAffinity_t::Blue, 150));\n\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "269556444880c6a82ff7accfbcab76a8ad2494e7d7df1c073ceee32b180009bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 280, + "startColumn": 3, + "charOffset": 18615, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 278, + "startColumn": 3, + "charOffset": 18602, + "charLength": 4, + "snippet": { + "text": "\t\t\tbreak;\n\n\t\tcase WheelGemSupremeModifier_t::Knight_AvatarOfSteel_Cooldown:\n\t\t\tbonus.decrease.cooldown = 300 * 1000;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Avatar of Steel\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0f44739d619c0d42b997d5ec5f1bdd01944763b26eee9ddb7f69c54b62825b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 281, + "startColumn": 30, + "charOffset": 18707, + "charLength": 3, + "snippet": { + "text": "300" + } + }, + "contextRegion": { + "startLine": 279, + "startColumn": 30, + "charOffset": 18612, + "charLength": 3, + "snippet": { + "text": "\n\t\tcase WheelGemSupremeModifier_t::Knight_AvatarOfSteel_Cooldown:\n\t\t\tbonus.decrease.cooldown = 300 * 1000;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Avatar of Steel\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a696ce2fb03d00b68d3e69fc7b58bff22fd11c2fb72473f4bd4e8ec020a0b713" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 281, + "startColumn": 36, + "charOffset": 18713, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 279, + "startColumn": 36, + "charOffset": 18612, + "charLength": 4, + "snippet": { + "text": "\n\t\tcase WheelGemSupremeModifier_t::Knight_AvatarOfSteel_Cooldown:\n\t\t\tbonus.decrease.cooldown = 300 * 1000;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Avatar of Steel\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb54a933dc63eba77fe3aa3b7359934302c35d75c3357995c5802b4a99bc8756" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 284, + "startColumn": 3, + "charOffset": 18842, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 282, + "startColumn": 3, + "charOffset": 18719, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Avatar of Steel\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_ExecutionersThrow_Cooldown:\n\t\t\tbonus.decrease.cooldown = 1 * 1000;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Executioner's Throw\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c99debf0854f825d4f8409e8d33bde8b0ecd00a1cb93abc9ccbec90b931f7d36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 285, + "startColumn": 34, + "charOffset": 18942, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 283, + "startColumn": 34, + "charOffset": 18830, + "charLength": 4, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_ExecutionersThrow_Cooldown:\n\t\t\tbonus.decrease.cooldown = 1 * 1000;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Executioner's Throw\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6817ce757d12a4ae28013d670d7c5156dc14af38be06dc932c2b54b919fa499" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 288, + "startColumn": 3, + "charOffset": 19075, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 286, + "startColumn": 3, + "charOffset": 18948, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Executioner's Throw\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_ExecutionersThrow_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Executioner's Throw\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efb430247dfedf80e9a29950e509e8307fcced58064d8122f867e3ba085e7e5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 289, + "startColumn": 28, + "charOffset": 19175, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 287, + "startColumn": 28, + "charOffset": 19063, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_ExecutionersThrow_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Executioner's Throw\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dac650c986dea04d1430accc32556e00da9292dad91394e055f2606caf748ae1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 292, + "startColumn": 3, + "charOffset": 19306, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 290, + "startColumn": 3, + "charOffset": 19179, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Executioner's Throw\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_ExecutionersThrow_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Executioner's Throw\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6dda36463040d78afaa0ede75854b6d87942e0eee16bca7b52970067f21bff6c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 293, + "startColumn": 36, + "charOffset": 19419, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 291, + "startColumn": 36, + "charOffset": 19294, + "charLength": 1, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_ExecutionersThrow_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Executioner's Throw\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d051f91283252aa5302057ad406ac196c579bf5cbd06cb72ff7f1ded9bf61e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 296, + "startColumn": 3, + "charOffset": 19549, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 294, + "startColumn": 3, + "charOffset": 19422, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Executioner's Throw\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_Fierce_Berserk_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Fierce Berserk\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f95564f5cc79253cb0026d46a401cd6ec347ca0c0a7e6f1cf3801d96ad90736" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 297, + "startColumn": 28, + "charOffset": 19646, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 295, + "startColumn": 28, + "charOffset": 19537, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_Fierce_Berserk_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Fierce Berserk\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "169a43a643a4561b85127f0ce7f0f4640584828f4e285f4fe7c3dc9da9ff3c8f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 300, + "startColumn": 3, + "charOffset": 19772, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 298, + "startColumn": 3, + "charOffset": 19650, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Fierce Berserk\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_Fierce_Berserk_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Fierce Berserk\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bcf50f98b68ce31e36549a845d49bdfb6d089c5979747218ab22de2c1b38cffa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 301, + "startColumn": 36, + "charOffset": 19882, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 299, + "startColumn": 36, + "charOffset": 19760, + "charLength": 1, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_Fierce_Berserk_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Fierce Berserk\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52b4de7a6a85e11bf44061710d3dc722fcb22bec863bc53ecdfc879df1283fb8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 304, + "startColumn": 3, + "charOffset": 20007, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 302, + "startColumn": 3, + "charOffset": 19885, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Fierce Berserk\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_Berserk_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Berserk\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f546f23d49dc5152235dd65597821f699a662d47e52fa3ae5e42cb7029e38b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 305, + "startColumn": 28, + "charOffset": 20097, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 303, + "startColumn": 28, + "charOffset": 19995, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_Berserk_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Berserk\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ecd4362eaff9df3e3eb7587864a939817135c5f2559abf7e387afae17af9da86" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 308, + "startColumn": 3, + "charOffset": 20216, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 306, + "startColumn": 3, + "charOffset": 20101, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Berserk\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_Berserk_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Berserk\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6c14aa153e54301b9a5dfdeeddcaae31c20b5c63099eb74b7c7009683f6b6b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 309, + "startColumn": 36, + "charOffset": 20319, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 307, + "startColumn": 36, + "charOffset": 20204, + "charLength": 1, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_Berserk_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Berserk\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d64726dc1bd8469d0a035830d0062bb1ea62a8fa91f4d0f78ae3762ce151cc0c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 312, + "startColumn": 3, + "charOffset": 20437, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 310, + "startColumn": 3, + "charOffset": 20322, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Berserk\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_Front_Sweep_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Front Sweep\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e6ccd4105819e0a1b63d1266471861a327862ccb55fafdf112f140ce0d5c509" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 313, + "startColumn": 36, + "charOffset": 20544, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 311, + "startColumn": 36, + "charOffset": 20425, + "charLength": 1, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_Front_Sweep_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Front Sweep\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8eae8143836f7a113bf34c5a23e41236e30ad61635a53460d3aca074dbcb708c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 316, + "startColumn": 3, + "charOffset": 20666, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 314, + "startColumn": 3, + "charOffset": 20547, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Front Sweep\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_Front_Sweep_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Front Sweep\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77f46a2ca1400e38bb11f7a514cfe76b990d18f9dbdaa4b6bfb925196b393cbf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 317, + "startColumn": 28, + "charOffset": 20760, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 315, + "startColumn": 28, + "charOffset": 20654, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_Front_Sweep_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Front Sweep\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86909d035c24f6d5de51889991a34fc30c79a445b03873465fee92f728146beb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 320, + "startColumn": 3, + "charOffset": 20883, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 318, + "startColumn": 3, + "charOffset": 20764, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Front Sweep\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_Groundshaker_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Groundshaker\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6637648304b3d9ae3a8cbd6e756ce80ee176afc5654849661ea617cbc55c9fa6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 321, + "startColumn": 28, + "charOffset": 20978, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 319, + "startColumn": 28, + "charOffset": 20871, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_Groundshaker_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Groundshaker\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35b0aeb21225d7d0227d5403d7a679abeed24f45354369ee26b8f82dab8972f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 324, + "startColumn": 3, + "charOffset": 21102, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 322, + "startColumn": 3, + "charOffset": 20982, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Groundshaker\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_Groundshaker_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Groundshaker\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "caaecc9eceed2efe79eb345db25141e3dd1477f9b23bfdf2689ac34d8e1e787f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 325, + "startColumn": 36, + "charOffset": 21210, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 323, + "startColumn": 36, + "charOffset": 21090, + "charLength": 1, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_Groundshaker_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Groundshaker\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b0794603c511011b24980f415d40ceb5fb10075b3355eae6d990b8ab9b8c39e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 328, + "startColumn": 3, + "charOffset": 21333, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 326, + "startColumn": 3, + "charOffset": 21213, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Groundshaker\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_Annihilation_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Annihilation\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88235c4811a0d2bb0a612dba300b70c85b576b4e8147ae82139e2c2c80b4f56e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 329, + "startColumn": 36, + "charOffset": 21441, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 327, + "startColumn": 36, + "charOffset": 21321, + "charLength": 1, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_Annihilation_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Annihilation\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "030a0386893f7fc74286ba53aabe29f0f3ab4fffbff2abcd5bc33020c8a9c25f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 332, + "startColumn": 3, + "charOffset": 21564, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 330, + "startColumn": 3, + "charOffset": 21444, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Annihilation\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_Annihilation_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Annihilation\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bcf50f98b68ce31e36549a845d49bdfb6d089c5979747218ab22de2c1b38cffa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 333, + "startColumn": 28, + "charOffset": 21659, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 331, + "startColumn": 28, + "charOffset": 21552, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_Annihilation_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Annihilation\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87da48e0266de8f9262d5d1b9cf5688ff78fd6104fb2b4ef60db641ab26bba4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 336, + "startColumn": 3, + "charOffset": 21783, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 334, + "startColumn": 3, + "charOffset": 21663, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Annihilation\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_FairWoundCleansing_HealingIncrease:\n\t\t\tbonus.increase.heal = 10;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Fair Wound Cleansing\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0282b6b0ef7c28179d16b0d512c68ab28997388a80a72189e73ba90d2e304298" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 337, + "startColumn": 26, + "charOffset": 21883, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 335, + "startColumn": 26, + "charOffset": 21771, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Knight_FairWoundCleansing_HealingIncrease:\n\t\t\tbonus.increase.heal = 10;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Fair Wound Cleansing\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea3ab2065e288f364eb6bb87693efcbad92e06567d0d19d2ed74d43135559fcf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 341, + "startColumn": 3, + "charOffset": 22016, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 339, + "startColumn": 3, + "charOffset": 22003, + "charLength": 4, + "snippet": { + "text": "\t\t\tbreak;\n\n\t\tcase WheelGemSupremeModifier_t::Paladin_AvatarOfLight_Cooldown:\n\t\t\tbonus.decrease.cooldown = 300 * 1000;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Avatar of Light\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1c61464a3e2432cc81b5a2fb1d09dddf5c405b39d4c1e3d8b3202bff1db8d74" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 342, + "startColumn": 30, + "charOffset": 22109, + "charLength": 3, + "snippet": { + "text": "300" + } + }, + "contextRegion": { + "startLine": 340, + "startColumn": 30, + "charOffset": 22013, + "charLength": 3, + "snippet": { + "text": "\n\t\tcase WheelGemSupremeModifier_t::Paladin_AvatarOfLight_Cooldown:\n\t\t\tbonus.decrease.cooldown = 300 * 1000;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Avatar of Light\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11735619498e70f54c0a0cd2e644d353a1ceb8150460a7236c940e6f43b7b3b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 342, + "startColumn": 36, + "charOffset": 22115, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 340, + "startColumn": 36, + "charOffset": 22013, + "charLength": 4, + "snippet": { + "text": "\n\t\tcase WheelGemSupremeModifier_t::Paladin_AvatarOfLight_Cooldown:\n\t\t\tbonus.decrease.cooldown = 300 * 1000;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Avatar of Light\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49a174054725bd077f65e47ae84d8aa3a00bc3c28782cceffb25bec246d2f3a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 345, + "startColumn": 3, + "charOffset": 22244, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 343, + "startColumn": 3, + "charOffset": 22121, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Avatar of Light\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_DivineDazzle_Cooldown:\n\t\t\tbonus.decrease.cooldown = 2 * 1000;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Dazzle\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d5e9d337f7f8485bc24be7c916ac46acf1ca674e72573d14d832739cdd99d1d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 346, + "startColumn": 34, + "charOffset": 22340, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 344, + "startColumn": 34, + "charOffset": 22232, + "charLength": 4, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_DivineDazzle_Cooldown:\n\t\t\tbonus.decrease.cooldown = 2 * 1000;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Dazzle\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1652b125dac7e027c7f3e773202ef45180b76761caf126ae04d1083bf514169d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 349, + "startColumn": 3, + "charOffset": 22467, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 347, + "startColumn": 3, + "charOffset": 22346, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Dazzle\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_DivineGrenade_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Grenade\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae186fa9d18787b3e21e44f6da261fee7cf899ef79a388c4c2d642c77685db99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 350, + "startColumn": 28, + "charOffset": 22564, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 348, + "startColumn": 28, + "charOffset": 22455, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_DivineGrenade_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Grenade\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "691d08f347c96bfa38cca22884a6ecbdb5d32984f5c5963ae4dc3e6d658e4ee6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 353, + "startColumn": 3, + "charOffset": 22690, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 351, + "startColumn": 3, + "charOffset": 22568, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Grenade\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_DivineGrenade_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Grenade\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9feaeb7bfb5e2589c9238d50787658d266e5924592736781e0a288ff0e9c215" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 354, + "startColumn": 36, + "charOffset": 22800, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 352, + "startColumn": 36, + "charOffset": 22678, + "charLength": 1, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_DivineGrenade_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Grenade\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08c3bdef95d1f33ef2a04696c538892a45048d2db712120cef8abc917082d8d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 357, + "startColumn": 3, + "charOffset": 22925, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 355, + "startColumn": 3, + "charOffset": 22803, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Grenade\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_DivineCaldera_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Caldera\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c424e6d590e48295c457f19d353b81f438d1b92720e66ba003c75a1d04dc0d08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 358, + "startColumn": 28, + "charOffset": 23022, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 356, + "startColumn": 28, + "charOffset": 22913, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_DivineCaldera_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Caldera\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70c122eb9fe90c6fff0f4d301f85fc0f7e3fdf8ba2ad265fd8d3eb454ee3476f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 361, + "startColumn": 3, + "charOffset": 23148, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 359, + "startColumn": 3, + "charOffset": 23026, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Caldera\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_DivineCaldera_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Caldera\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c2e6dafe71d40a94081660fc968fcaa18935f9572c594a7e30b6a3d59acf845" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 362, + "startColumn": 36, + "charOffset": 23258, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 360, + "startColumn": 36, + "charOffset": 23136, + "charLength": 1, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_DivineCaldera_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Caldera\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b0794603c511011b24980f415d40ceb5fb10075b3355eae6d990b8ab9b8c39e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 365, + "startColumn": 3, + "charOffset": 23383, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 363, + "startColumn": 3, + "charOffset": 23261, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Caldera\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_DivineMissile_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Missile\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52fc3b5cf6f92abbc286fa43a7ce68a76c9b584ed7a61ac14e8597d08adcb593" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 366, + "startColumn": 28, + "charOffset": 23480, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 364, + "startColumn": 28, + "charOffset": 23371, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_DivineMissile_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Missile\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6812924845692092f35ff88d6b5e5109ede1ff83d10c428f904c3700b7b9a0b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 369, + "startColumn": 3, + "charOffset": 23606, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 367, + "startColumn": 3, + "charOffset": 23484, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Missile\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_DivineMissile_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Missile\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf108cc7ca1cc9e065c57116f4e4f219f6035bea778d011cc24ee356749f9f42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 370, + "startColumn": 36, + "charOffset": 23716, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 368, + "startColumn": 36, + "charOffset": 23594, + "charLength": 1, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_DivineMissile_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Missile\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74c80059c68cfeb76eaa50d2800fc6c43d1e9ef0b4b0a370e4793b8d1a17a579" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 373, + "startColumn": 3, + "charOffset": 23841, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 371, + "startColumn": 3, + "charOffset": 23719, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Missile\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_EtherealSpear_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Ethereal Spear\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35ca18cb0705da0a1f8a4640a20f47941899bc9d6b616569689620b7adea28d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 374, + "startColumn": 28, + "charOffset": 23938, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 372, + "startColumn": 28, + "charOffset": 23829, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_EtherealSpear_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Ethereal Spear\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89e7996b968e5af3d1b2d9df986e2b0a65aad95b78512a959946b6ec40d0dc6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 377, + "startColumn": 3, + "charOffset": 24064, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 375, + "startColumn": 3, + "charOffset": 23942, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Ethereal Spear\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_EtherealSpear_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Ethereal Spear\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1c61464a3e2432cc81b5a2fb1d09dddf5c405b39d4c1e3d8b3202bff1db8d74" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 378, + "startColumn": 36, + "charOffset": 24174, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 376, + "startColumn": 36, + "charOffset": 24052, + "charLength": 1, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_EtherealSpear_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Ethereal Spear\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0355e0b4566d763f89a0402365dca84826fc1f9e1b469eca49d29c5d3ecb15ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 381, + "startColumn": 3, + "charOffset": 24299, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 379, + "startColumn": 3, + "charOffset": 24177, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Ethereal Spear\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_StrongEtherealSpear_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Strong Ethereal Spear\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e711207e825a7632555fe9dd67d2d433b0565688aad51f56df82c37b0dd6efe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 382, + "startColumn": 28, + "charOffset": 24402, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 380, + "startColumn": 28, + "charOffset": 24287, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_StrongEtherealSpear_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Strong Ethereal Spear\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aba204b17072327abd3f6a0430ccfaccaf0aac7090fc527a024ea129801b2862" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 385, + "startColumn": 3, + "charOffset": 24535, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 383, + "startColumn": 3, + "charOffset": 24406, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Strong Ethereal Spear\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_StrongEtherealSpear_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Strong Ethereal Spear\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfe23adb7b0c36663a981c15a6e93a9203d31aa47fd0863804336d1a11832b9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 386, + "startColumn": 36, + "charOffset": 24651, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 384, + "startColumn": 36, + "charOffset": 24523, + "charLength": 1, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_StrongEtherealSpear_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Strong Ethereal Spear\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6fda95476a35ed3a54d40ed582bdb31fa0adf79da81795beaa3b51146b66036b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 389, + "startColumn": 3, + "charOffset": 24783, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 387, + "startColumn": 3, + "charOffset": 24654, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Strong Ethereal Spear\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_DivineEmpowerment_Cooldown:\n\t\t\tbonus.decrease.cooldown = 3 * 1000;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Empowerment\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6cf73a8e197aa2f71c872dc82b0373803560126e5784a906ed901d5ae3c49a68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 390, + "startColumn": 34, + "charOffset": 24884, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 388, + "startColumn": 34, + "charOffset": 24771, + "charLength": 4, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_DivineEmpowerment_Cooldown:\n\t\t\tbonus.decrease.cooldown = 3 * 1000;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Empowerment\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec60521d9a2a3e577e8c1f18af578d1390ada8cb68679a88916a6aacc06e73d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 393, + "startColumn": 3, + "charOffset": 25016, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 391, + "startColumn": 3, + "charOffset": 24890, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Empowerment\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_DivineGrenade_Cooldown:\n\t\t\tbonus.decrease.cooldown = 1 * 1000;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Grenade\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "543221a8e03086ef4e6b701b4a60dbb4519858d3b4aced9dc3e1ce0a3b297582" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 394, + "startColumn": 34, + "charOffset": 25113, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 392, + "startColumn": 34, + "charOffset": 25004, + "charLength": 4, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_DivineGrenade_Cooldown:\n\t\t\tbonus.decrease.cooldown = 1 * 1000;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Grenade\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb54a933dc63eba77fe3aa3b7359934302c35d75c3357995c5802b4a99bc8756" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 397, + "startColumn": 3, + "charOffset": 25241, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 395, + "startColumn": 3, + "charOffset": 25119, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Divine Grenade\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_Salvation_HealingIncrease:\n\t\t\tbonus.increase.heal = 10;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Salvation\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad7722813074cb915341f0e4141c421414861a10e009a548b062f7ce5feccd1f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 398, + "startColumn": 26, + "charOffset": 25333, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 396, + "startColumn": 26, + "charOffset": 25229, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Paladin_Salvation_HealingIncrease:\n\t\t\tbonus.increase.heal = 10;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Salvation\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd90532a1869931396824366e94943dfb733ddfb359d5440e3d0ed06d9292e73" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 402, + "startColumn": 3, + "charOffset": 25455, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 400, + "startColumn": 3, + "charOffset": 25442, + "charLength": 4, + "snippet": { + "text": "\t\t\tbreak;\n\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_AvatarOfStorm_Cooldown:\n\t\t\tbonus.decrease.cooldown = 300 * 1000;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Avatar of Storm\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d6d147c63ac161cf2021a4eefcb1500cdc55a58f24d730bfec54b9be784cdb6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 403, + "startColumn": 30, + "charOffset": 25549, + "charLength": 3, + "snippet": { + "text": "300" + } + }, + "contextRegion": { + "startLine": 401, + "startColumn": 30, + "charOffset": 25452, + "charLength": 3, + "snippet": { + "text": "\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_AvatarOfStorm_Cooldown:\n\t\t\tbonus.decrease.cooldown = 300 * 1000;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Avatar of Storm\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f847ad81a2940e98977c9632ab25bcd06e046c1fa1eec70bf75245115f791b1c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 403, + "startColumn": 36, + "charOffset": 25555, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 401, + "startColumn": 36, + "charOffset": 25452, + "charLength": 4, + "snippet": { + "text": "\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_AvatarOfStorm_Cooldown:\n\t\t\tbonus.decrease.cooldown = 300 * 1000;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Avatar of Storm\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da7ad8bc73e22e9ab2676925764ecf762b5fd88ec4d7526f6f012124d10fa5cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 406, + "startColumn": 3, + "charOffset": 25684, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 404, + "startColumn": 3, + "charOffset": 25561, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Avatar of Storm\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_EnergyWave_Cooldown:\n\t\t\tbonus.decrease.cooldown = 1 * 1000;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Energy Wave\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ad032260771c17830fcabf6d9b2c6c61fe42c5390167ed3a8daaa272aa869ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 407, + "startColumn": 34, + "charOffset": 25779, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 405, + "startColumn": 34, + "charOffset": 25672, + "charLength": 4, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_EnergyWave_Cooldown:\n\t\t\tbonus.decrease.cooldown = 1 * 1000;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Energy Wave\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38a93a316fdd35270ef8efd40fe0a9ea0d38d5ae0c6566d70faf8734bec9547a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 410, + "startColumn": 3, + "charOffset": 25904, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 408, + "startColumn": 3, + "charOffset": 25785, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Energy Wave\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_GreatDeathBeam_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Great Death Beam\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd64a8c92c139ddf407f6d6cc9f1408de04a39c90442f89ef1ea5fd18558849c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 411, + "startColumn": 28, + "charOffset": 26003, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 409, + "startColumn": 28, + "charOffset": 25892, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_GreatDeathBeam_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Great Death Beam\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62ac32e30095beddb81712441d0d343987cfd62f07c89842aa19d621879c7aef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 414, + "startColumn": 3, + "charOffset": 26131, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 412, + "startColumn": 3, + "charOffset": 26007, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Great Death Beam\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_GreatDeathBeam_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Great Death Beam\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "525e4de222d703b65a67282d2ae5c4a07ce9664280c1f76df9a3d0039bfd291e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 415, + "startColumn": 36, + "charOffset": 26243, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 413, + "startColumn": 36, + "charOffset": 26119, + "charLength": 1, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_GreatDeathBeam_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Great Death Beam\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bef4d6b12ff4eba40e0f7e4389035a7f5bd989c24b3e264ade59db202b67ab00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 418, + "startColumn": 3, + "charOffset": 26370, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 416, + "startColumn": 3, + "charOffset": 26246, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Great Death Beam\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_HellsCore_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Hell's Core\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d95e0e947ea52ef283d09103213c2ce6e1ee7c95546547ab0a9573e5051e82a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 419, + "startColumn": 28, + "charOffset": 26464, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 417, + "startColumn": 28, + "charOffset": 26358, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_HellsCore_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Hell's Core\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a53c5c0ef1f3856b039eed4ef94d05a1d07936855107422fca777f2a801eea4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 422, + "startColumn": 3, + "charOffset": 26587, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 420, + "startColumn": 3, + "charOffset": 26468, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Hell's Core\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_HellsCore_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Hell's Core\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8033b35a145bd1e1346d50b07466f0fdd4fe6583bab6ce9aae505ad213d22249" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 423, + "startColumn": 36, + "charOffset": 26694, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 421, + "startColumn": 36, + "charOffset": 26575, + "charLength": 1, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_HellsCore_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Hell's Core\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06fcd013a1db290b3a37a6487d3257d7f8a4c99ee97b999be33cfc289750f70e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 426, + "startColumn": 3, + "charOffset": 26816, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 424, + "startColumn": 3, + "charOffset": 26697, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Hell's Core\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_EnergyWave_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Energy Wave\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ba46beefcdb67bf43309ef7d0b5f74b38417eac5e318276b09df72e687472c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 427, + "startColumn": 28, + "charOffset": 26911, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 425, + "startColumn": 28, + "charOffset": 26804, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_EnergyWave_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Energy Wave\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "876a610117f8991f27d4a9350c11f1f03a4d457be71f01e93ea5930f43808883" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 430, + "startColumn": 3, + "charOffset": 27034, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 428, + "startColumn": 3, + "charOffset": 26915, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Energy Wave\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_EnergyWave_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Energy Wave\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c99debf0854f825d4f8409e8d33bde8b0ecd00a1cb93abc9ccbec90b931f7d36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 431, + "startColumn": 36, + "charOffset": 27142, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 429, + "startColumn": 36, + "charOffset": 27022, + "charLength": 1, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_EnergyWave_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Energy Wave\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "996c6ff4ab256d994f63937fde2ec2c052257f89e750428ca5e677a06abf3f81" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 434, + "startColumn": 3, + "charOffset": 27264, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 432, + "startColumn": 3, + "charOffset": 27145, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Energy Wave\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_GreatFireWave_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Great Fire Wave\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66e13a621b9c34cd2f2ff8b9ca98ac492fb81561bc37f722241d39713c53db59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 435, + "startColumn": 28, + "charOffset": 27362, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 433, + "startColumn": 28, + "charOffset": 27252, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_GreatFireWave_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Great Fire Wave\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce387a6d29bbbfd7b19636ded25f36ba66b90ef849d4eae715258e921fcdb63c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 438, + "startColumn": 3, + "charOffset": 27489, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 436, + "startColumn": 3, + "charOffset": 27366, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Great Fire Wave\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_GreatFireWave_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Great Fire Wave\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c3aa85a2b47cbc6a687aff65429bd70c6c3e1b78208a0d94f11af3954226133" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 439, + "startColumn": 36, + "charOffset": 27600, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 437, + "startColumn": 36, + "charOffset": 27477, + "charLength": 1, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_GreatFireWave_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Great Fire Wave\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7f24300abeba5f49e138eee61b0e141902b61492ca89a131fec165ff9c1ab32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 442, + "startColumn": 3, + "charOffset": 27726, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 440, + "startColumn": 3, + "charOffset": 27603, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Great Fire Wave\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_RageOfTheSkies_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Rage of the Skies\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec63aa83e9aa3aa69c2aa3496c4410e90c29c7f19e112f6e284e1d520a54ae3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 443, + "startColumn": 28, + "charOffset": 27825, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 441, + "startColumn": 28, + "charOffset": 27714, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_RageOfTheSkies_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Rage of the Skies\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97348734ccb5ed2a3871c2e94048e9b257a8b77a3e4be14fbf8e05b4e924938a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 446, + "startColumn": 3, + "charOffset": 27954, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 444, + "startColumn": 3, + "charOffset": 27829, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Rage of the Skies\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_RageOfTheSkies_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Rage of the Skies\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "481e9ea3525e131ceac0096e8b7a8b324b8002ec19c8e18a4ad2bf9db4615399" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 447, + "startColumn": 36, + "charOffset": 28066, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 445, + "startColumn": 36, + "charOffset": 27942, + "charLength": 1, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_RageOfTheSkies_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Rage of the Skies\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd3bf2f4e3f8b1a9863885fa917d037775459d0e11844655aa9350864338422b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 450, + "startColumn": 3, + "charOffset": 28194, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 448, + "startColumn": 3, + "charOffset": 28069, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Rage of the Skies\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_GreatEnergyBeam_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Great Energy Beam\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "257af124ff5bbb5e3c5fe90745f1e7f9157a41cec89c3e75a824ac8c48969dae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 451, + "startColumn": 28, + "charOffset": 28294, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 449, + "startColumn": 28, + "charOffset": 28182, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_GreatEnergyBeam_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Great Energy Beam\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e364c8d614f6bc245aaf2742831aa4abd9bf963359cf1ec6ee1640973ba137a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 454, + "startColumn": 3, + "charOffset": 28423, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 452, + "startColumn": 3, + "charOffset": 28298, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Great Energy Beam\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_GreatEnergyBeam_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Great Energy Beam\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e49b5ed3f5e22d0dfdbb0b0d6d78eb7085235ec5d6e79a04075d1b5c59224db2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 455, + "startColumn": 36, + "charOffset": 28536, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 453, + "startColumn": 36, + "charOffset": 28411, + "charLength": 1, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Sorcerer_GreatEnergyBeam_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Great Energy Beam\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27b468fe4531de466c6abac94fcbba4c8f89a665dc62cdd732d0f05248669405" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 459, + "startColumn": 3, + "charOffset": 28665, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 457, + "startColumn": 3, + "charOffset": 28652, + "charLength": 4, + "snippet": { + "text": "\t\t\tbreak;\n\n\t\tcase WheelGemSupremeModifier_t::Druid_AvatarOfNature_Cooldown:\n\t\t\tbonus.decrease.cooldown = 300 * 1000;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Avatar of Nature\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f67441e3a92f180f69999fc824049f9ddd706a5d2a140568db885d4c5495da4d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 460, + "startColumn": 30, + "charOffset": 28757, + "charLength": 3, + "snippet": { + "text": "300" + } + }, + "contextRegion": { + "startLine": 458, + "startColumn": 30, + "charOffset": 28662, + "charLength": 3, + "snippet": { + "text": "\n\t\tcase WheelGemSupremeModifier_t::Druid_AvatarOfNature_Cooldown:\n\t\t\tbonus.decrease.cooldown = 300 * 1000;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Avatar of Nature\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ab5dc356e3d08f6bc5732472d1c7ec0ec1066adb2782fc237332a38ff05e35b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 460, + "startColumn": 36, + "charOffset": 28763, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 458, + "startColumn": 36, + "charOffset": 28662, + "charLength": 4, + "snippet": { + "text": "\n\t\tcase WheelGemSupremeModifier_t::Druid_AvatarOfNature_Cooldown:\n\t\t\tbonus.decrease.cooldown = 300 * 1000;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Avatar of Nature\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e36bc9dbe8b7b784c22a30708344acfff9fe0c63dea2eaa3f5168611c1dfb47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 463, + "startColumn": 3, + "charOffset": 28893, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 461, + "startColumn": 3, + "charOffset": 28769, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Avatar of Nature\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_NaturesEmbrace_Cooldown:\n\t\t\tbonus.decrease.cooldown = 5 * 1000;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Nature's Embrace\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3895f0a0f1a7f8a87af575705e82574a4f6372d6461d2c67b222685e2a1ed736" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 464, + "startColumn": 30, + "charOffset": 28985, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 462, + "startColumn": 30, + "charOffset": 28881, + "charLength": 1, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_NaturesEmbrace_Cooldown:\n\t\t\tbonus.decrease.cooldown = 5 * 1000;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Nature's Embrace\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa3e35f97cc32e49ac3bb0df655306a03b80797caf5b44f1695ac4493aa4d6db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 464, + "startColumn": 34, + "charOffset": 28989, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 462, + "startColumn": 34, + "charOffset": 28881, + "charLength": 4, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_NaturesEmbrace_Cooldown:\n\t\t\tbonus.decrease.cooldown = 5 * 1000;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Nature's Embrace\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df260503c68b1553f1e5f956efd24522ddb8007ef4fd55f5692a4c4e1305bc52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 467, + "startColumn": 3, + "charOffset": 29119, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 465, + "startColumn": 3, + "charOffset": 28995, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Nature's Embrace\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_TerraBurst_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Terra Burst\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3225fb4e067b8b2b76f4e060cf047a93243fc59651b065b4f6169edcf5bcd099" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 468, + "startColumn": 28, + "charOffset": 29211, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 466, + "startColumn": 28, + "charOffset": 29107, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_TerraBurst_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Terra Burst\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21a47be52e00d90fda3ce39ddb2dbef659db1ca429cf0b332f782e16538d4629" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 471, + "startColumn": 3, + "charOffset": 29334, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 469, + "startColumn": 3, + "charOffset": 29215, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Terra Burst\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_TerraBurst_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Terra Burst\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efbfefa1a9142c5734931e95bf4e9bcd7e94b3a50e284b51196da1c78392dbdf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 472, + "startColumn": 36, + "charOffset": 29439, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 470, + "startColumn": 36, + "charOffset": 29322, + "charLength": 1, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_TerraBurst_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Terra Burst\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8c5e490dcefaf02475f8f8c2fb80f00d5b7dd7aeae4603277a64a33302966f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 475, + "startColumn": 3, + "charOffset": 29561, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 473, + "startColumn": 3, + "charOffset": 29442, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Terra Burst\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_IceBurst_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Ice Burst\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12fe03d3469e9e45580bd4cb02bc667d610df1c4317a2d3df3519528489bf500" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 476, + "startColumn": 28, + "charOffset": 29651, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 474, + "startColumn": 28, + "charOffset": 29549, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_IceBurst_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Ice Burst\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05f89ad38803c20e2226c0acd20cc0fc2142a3184d3ea48588a4efa220184b54" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 479, + "startColumn": 3, + "charOffset": 29772, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 477, + "startColumn": 3, + "charOffset": 29655, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Ice Burst\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_IceBurst_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Ice Burst\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52ca2d3401bf58c3bcb16a25f90ecfc7ba7179dd6e825237a426a88af74aa507" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 480, + "startColumn": 36, + "charOffset": 29875, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 478, + "startColumn": 36, + "charOffset": 29760, + "charLength": 1, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_IceBurst_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Ice Burst\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4acbc6b12baec2ddbaab3e64a20f59c9c46d7e0cda49779de4c28b49008c36aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 483, + "startColumn": 3, + "charOffset": 29995, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 481, + "startColumn": 3, + "charOffset": 29878, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Ice Burst\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_EternalWinter_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Eternal Winter\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38f4ec4cbd266b0bb7945d70db8803f1ad4764bc5689c2e97bbdef8c2255dc4b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 484, + "startColumn": 36, + "charOffset": 30103, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 482, + "startColumn": 36, + "charOffset": 29983, + "charLength": 1, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_EternalWinter_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Eternal Winter\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a89e998c71f7ebfb0cceb14fa6cc8988a87109691ff93a1aeaa6ae61667a9558" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 487, + "startColumn": 3, + "charOffset": 30228, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 485, + "startColumn": 3, + "charOffset": 30106, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Eternal Winter\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_EternalWinter_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Eternal Winter\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32d9978a6e65dcd74b1196da2536e76ea63da7e41e3231852ead0eb1c7750da8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 488, + "startColumn": 28, + "charOffset": 30323, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 486, + "startColumn": 28, + "charOffset": 30216, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_EternalWinter_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Eternal Winter\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1be1e36354c27b668dd0c4f7af6c78c5ac6ef8020659104d57f375bf5613f856" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 491, + "startColumn": 3, + "charOffset": 30449, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 489, + "startColumn": 3, + "charOffset": 30327, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Eternal Winter\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_TerraWave_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Terra Wave\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13284487216c7836bb9a6afe7b31464c9960bca5b05d0019a3da8e353c482935" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 492, + "startColumn": 28, + "charOffset": 30540, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 490, + "startColumn": 28, + "charOffset": 30437, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_TerraWave_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Terra Wave\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a089b03120b7d79c207689d9f73d803ed4e4a14f3d3cbed1a79ca53e19e08482" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 495, + "startColumn": 3, + "charOffset": 30662, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 493, + "startColumn": 3, + "charOffset": 30544, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Terra Wave\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_TerraWave_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Terra Wave\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "926a97e46af8d71c9278a6cc1ae375cede3ae9a795a33dbfa0c217a119aedd42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 496, + "startColumn": 36, + "charOffset": 30766, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 494, + "startColumn": 36, + "charOffset": 30650, + "charLength": 1, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_TerraWave_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Terra Wave\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c968ea32b2c27bb43d634b10b6d48098673727678c33d3d485e16a2648310476" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 499, + "startColumn": 3, + "charOffset": 30887, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 497, + "startColumn": 3, + "charOffset": 30769, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Terra Wave\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_StrongIceWave_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Strong Ice Wave\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "024199bc4c0e06e2cad724544f7a2009c58120eaf06e349b5510bd2cc4025492" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 500, + "startColumn": 28, + "charOffset": 30982, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 498, + "startColumn": 28, + "charOffset": 30875, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_StrongIceWave_DamageIncrease:\n\t\t\tbonus.increase.damage = 25;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Strong Ice Wave\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c37347917fffa27aaad68628c79ed362735a0fa721fe0d3db12f163475fa6496" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 503, + "startColumn": 3, + "charOffset": 31109, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 501, + "startColumn": 3, + "charOffset": 30986, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Strong Ice Wave\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_StrongIceWave_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Strong Ice Wave\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "737c59dbe7d964b3f99c29bccc624f1ab26d251175aa9e30ba1057196a6e3436" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 504, + "startColumn": 36, + "charOffset": 31217, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 502, + "startColumn": 36, + "charOffset": 31097, + "charLength": 1, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_StrongIceWave_CriticalExtraDamage:\n\t\t\tbonus.increase.criticalDamage = 8;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Strong Ice Wave\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0bfe799b27e50a9baeb7a7987fbb75efe2c0b5c59dcbf2c9b44201731c18cbf8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 507, + "startColumn": 3, + "charOffset": 31343, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 505, + "startColumn": 3, + "charOffset": 31220, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Strong Ice Wave\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_HealFriend_HealingIncrease:\n\t\t\tbonus.increase.heal = 10;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Heal Friend\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d6d147c63ac161cf2021a4eefcb1500cdc55a58f24d730bfec54b9be784cdb6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 508, + "startColumn": 26, + "charOffset": 31434, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 506, + "startColumn": 26, + "charOffset": 31331, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_HealFriend_HealingIncrease:\n\t\t\tbonus.increase.heal = 10;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Heal Friend\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f3a64d96a09596fe541b33d01ffefc919d38aba953bb9a1475f5e65bbba8248" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 511, + "startColumn": 3, + "charOffset": 31557, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 509, + "startColumn": 3, + "charOffset": 31438, + "charLength": 4, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Heal Friend\", bonus));\n\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_MassHealing_HealingIncrease:\n\t\t\tbonus.increase.heal = 10;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Mass Healing\", bonus));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "428e8f2b274137bb245435017b3e87b9f6327def8749a92b129cca640b7c8f04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 512, + "startColumn": 26, + "charOffset": 31649, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 510, + "startColumn": 26, + "charOffset": 31545, + "charLength": 2, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase WheelGemSupremeModifier_t::Druid_MassHealing_HealingIncrease:\n\t\t\tbonus.increase.heal = 10;\n\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Mass Healing\", bonus));\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9cd5ea9c38b6c64ec9741311c7edd6a7913b121304da776a690894db733506e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 515, + "startColumn": 3, + "charOffset": 31773, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 513, + "startColumn": 3, + "charOffset": 31653, + "charLength": 7, + "snippet": { + "text": "\t\t\tm_strategies.push_back(std::make_unique(m_wheel, \"Mass Healing\", bonus));\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tg_logger().error(\"WheelModifierContext::setStrategy: Invalid supreme modifier: {}\", static_cast(modifier));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d92e73a7de3afa40ceb3e23854c7165cce69a806b05e89c3168211225fcf4eae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/wheel/wheel_gems.cpp" + }, + "region": { + "startLine": 521, + "startColumn": 2, + "charOffset": 31958, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 519, + "startColumn": 2, + "charOffset": 31907, + "charLength": 3, + "snippet": { + "text": "\nvoid WheelModifierContext::executeStrategies() {\n\tfor (auto &strategy : m_strategies) {\n\t\tstrategy->execute();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c633898f9f7cfe327461fbd1b3f02e33ee9bf805ae1093dcf1afa8202f474ea3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'loadFromXml' has cognitive complexity of 100 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 22, + "startColumn": 17, + "charOffset": 594, + "charLength": 11, + "snippet": { + "text": "loadFromXml" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 17, + "charOffset": 575, + "charLength": 11, + "snippet": { + "text": "}\n\nbool Vocations::loadFromXml() {\n\tpugi::xml_document doc;\n\tauto folder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + \"/XML/vocations.xml\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5ec71460e08e8dc057eff0be261a403390bc666fcbc2463e45f962e578aba75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 6, + "charOffset": 801, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 6, + "charOffset": 635, + "charLength": 1, + "snippet": { + "text": "\tauto folder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + \"/XML/vocations.xml\";\n\tpugi::xml_parse_result result = doc.load_file(folder.c_str());\n\tif (!result) {\n\t\tprintXMLError(__FUNCTION__, folder, result);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff836488702880228b28ae123fa1e7fdc769046ac8ee21b8f2bbbeefc1863a6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 7, + "charOffset": 976, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 7, + "charOffset": 879, + "charLength": 1, + "snippet": { + "text": "\tfor (auto vocationNode : doc.child(\"vocations\").children()) {\n\t\tpugi::xml_attribute attr;\n\t\tif (!(attr = vocationNode.attribute(\"id\"))) {\n\t\t\tg_logger().warn(\"[{}] - Missing vocation id\", __FUNCTION__);\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f783ab46613ffae5977db4565f1b0fbfcaaab14ce0be05954ca9f8fca9fcee5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 14, + "charOffset": 983, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 14, + "charOffset": 879, + "charLength": 1, + "snippet": { + "text": "\tfor (auto vocationNode : doc.child(\"vocations\").children()) {\n\t\tpugi::xml_attribute attr;\n\t\tif (!(attr = vocationNode.attribute(\"id\"))) {\n\t\t\tg_logger().warn(\"[{}] - Missing vocation id\", __FUNCTION__);\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11a229da86f2d4385b6398916bd4cc0884391ff1a4c3abba1273d42b1e9c064e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 3, + "charOffset": 1102, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 3, + "charOffset": 1095, + "charLength": 8, + "snippet": { + "text": "\t\t}\n\n\t\tuint16_t id = pugi::cast(attr.value());\n\n\t\tauto res = vocationsMap.emplace(std::piecewise_construct, std::forward_as_tuple(id), std::forward_as_tuple(std::make_shared(id)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84f771ac4bb5c24c898ca372fc51159cfc9d3da8d9ff666e5ff3cb4597df121f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 7, + "charOffset": 1335, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 7, + "charOffset": 1296, + "charLength": 1, + "snippet": { + "text": "\t\tauto voc = res.first->second;\n\n\t\tif ((attr = vocationNode.attribute(\"name\"))) {\n\t\t\tvoc->name = attr.as_string();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84dd467cd42ba5129dfa725ecd1f7a2e75f453cf6816a3fcffeb4711a7de6392" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 7, + "charOffset": 1335, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 7, + "charOffset": 1296, + "charLength": 1, + "snippet": { + "text": "\t\tauto voc = res.first->second;\n\n\t\tif ((attr = vocationNode.attribute(\"name\"))) {\n\t\t\tvoc->name = attr.as_string();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06f4616bd01626c14926fb045d7f86300137d09cea3b0623bcca0fa5fb7e5f68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 13, + "charOffset": 1341, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 13, + "charOffset": 1296, + "charLength": 1, + "snippet": { + "text": "\t\tauto voc = res.first->second;\n\n\t\tif ((attr = vocationNode.attribute(\"name\"))) {\n\t\t\tvoc->name = attr.as_string();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "991b16ea961584274e564c8a7511887fcfb3b554df0db868b883490cd138ae73" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 47, + "startColumn": 7, + "charOffset": 1422, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 45, + "startColumn": 7, + "charOffset": 1411, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"clientid\"))) {\n\t\t\tvoc->clientId = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b57d855323c9d4a23bc4cb0962480a6e5ed2f9a00eff43b4151afc16555d57da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 47, + "startColumn": 7, + "charOffset": 1422, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 45, + "startColumn": 7, + "charOffset": 1411, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"clientid\"))) {\n\t\t\tvoc->clientId = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b9bc83a50ff9a5bf729860617b1ed023250f33e1ccb32223f632fe7d1528d10" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 47, + "startColumn": 13, + "charOffset": 1428, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 45, + "startColumn": 13, + "charOffset": 1411, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"clientid\"))) {\n\t\t\tvoc->clientId = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da16dab9a571aa0f1f023769141d6e919b181c55da92dbc8a70419e606a525b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 48, + "startColumn": 20, + "charOffset": 1488, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 20, + "charOffset": 1415, + "charLength": 4, + "snippet": { + "text": "\n\t\tif ((attr = vocationNode.attribute(\"clientid\"))) {\n\t\t\tvoc->clientId = pugi::cast(attr.value());\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd2aa116b6a806edfbc4c0c78f940714fe9cd5926e0a9c40f74fa6ef79d7b0b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 51, + "startColumn": 7, + "charOffset": 1535, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 49, + "startColumn": 7, + "charOffset": 1524, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"baseid\"))) {\n\t\t\tvoc->baseId = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "674986754eea41b86c05c3befcaffe2371cdf4f6376c90b673e0bcb8b7d4c4ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 51, + "startColumn": 7, + "charOffset": 1535, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 49, + "startColumn": 7, + "charOffset": 1524, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"baseid\"))) {\n\t\t\tvoc->baseId = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "272b5d6925d3dea2167f9afd60b658e1b613d8bfd0ede40a6d8a32a09741ece3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 51, + "startColumn": 13, + "charOffset": 1541, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 49, + "startColumn": 13, + "charOffset": 1524, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"baseid\"))) {\n\t\t\tvoc->baseId = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b77572a0130bbd8ebcc1e936bce180fbe28dfea4c9da6743b50a7febdd390c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 52, + "startColumn": 18, + "charOffset": 1597, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 50, + "startColumn": 18, + "charOffset": 1528, + "charLength": 4, + "snippet": { + "text": "\n\t\tif ((attr = vocationNode.attribute(\"baseid\"))) {\n\t\t\tvoc->baseId = pugi::cast(attr.value());\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "811c76d10d3d3dbfd3eba64823bc2ed918878d2ea19a96588c3f005cbd162697" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 55, + "startColumn": 7, + "charOffset": 1644, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 7, + "charOffset": 1633, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"description\"))) {\n\t\t\tvoc->description = attr.as_string();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc4576fadf9fb52598e81cbdf9be293bf9dfd96d3200fbb76310e6774f8a204b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 55, + "startColumn": 7, + "charOffset": 1644, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 7, + "charOffset": 1633, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"description\"))) {\n\t\t\tvoc->description = attr.as_string();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78cee32239eba59210fc50ca03889b86cff0f4709b63a6320437c36ad85a6491" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 55, + "startColumn": 13, + "charOffset": 1650, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 13, + "charOffset": 1633, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"description\"))) {\n\t\t\tvoc->description = attr.as_string();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4dca3c7993e7ce0a241ddeb2207fcc315d279e983367a434e6ee24a369917fbc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 7, + "charOffset": 1745, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 7, + "charOffset": 1734, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"magicshield\"))) {\n\t\t\tvoc->magicShield = attr.as_bool();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff8bbfa2bb5176d7472d7caa51d2bc9a54a4293cdb42d11c4b6c249b85716812" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 7, + "charOffset": 1745, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 7, + "charOffset": 1734, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"magicshield\"))) {\n\t\t\tvoc->magicShield = attr.as_bool();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4fff4fdf71595a74a580db8db35b42b0e04e72c506a012c45a48e11db557e0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 13, + "charOffset": 1751, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 13, + "charOffset": 1734, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"magicshield\"))) {\n\t\t\tvoc->magicShield = attr.as_bool();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11a229da86f2d4385b6398916bd4cc0884391ff1a4c3abba1273d42b1e9c064e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 63, + "startColumn": 7, + "charOffset": 1844, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 7, + "charOffset": 1833, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"gaincap\"))) {\n\t\t\tvoc->gainCap = pugi::cast(attr.value()) * 100;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "baecc99ce7aa1d166cdeb458c16dd9d4f394c2f5092859f10751700be9fca5e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 63, + "startColumn": 7, + "charOffset": 1844, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 7, + "charOffset": 1833, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"gaincap\"))) {\n\t\t\tvoc->gainCap = pugi::cast(attr.value()) * 100;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "052090cd8f6de6560fd16150d0148d37d97bf77f9df89294274f7ae89c16fc79" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 63, + "startColumn": 13, + "charOffset": 1850, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 13, + "charOffset": 1833, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"gaincap\"))) {\n\t\t\tvoc->gainCap = pugi::cast(attr.value()) * 100;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5bdb6236a1ab8c658ec01e638024887e285d9e78fc03e45e9b501e7547907b37" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 64, + "startColumn": 56, + "charOffset": 1945, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 62, + "startColumn": 56, + "charOffset": 1837, + "charLength": 3, + "snippet": { + "text": "\n\t\tif ((attr = vocationNode.attribute(\"gaincap\"))) {\n\t\t\tvoc->gainCap = pugi::cast(attr.value()) * 100;\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed804117ffd4353bc30cb9d04450ac1dce492f69b8ac3ffd0cb2f2828e89b5f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 67, + "startColumn": 7, + "charOffset": 1961, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 65, + "startColumn": 7, + "charOffset": 1950, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"gainhp\"))) {\n\t\t\tvoc->gainHP = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "366af4cdc99b8581f8263f3e340e615640749bf9c43dd1853556b880edaf7f9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 67, + "startColumn": 7, + "charOffset": 1961, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 65, + "startColumn": 7, + "charOffset": 1950, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"gainhp\"))) {\n\t\t\tvoc->gainHP = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f95b409ba47eda0dfe2d7c60982ae0f315c7b21ce5d2158ff7ac149dfce88b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 67, + "startColumn": 13, + "charOffset": 1967, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 65, + "startColumn": 13, + "charOffset": 1950, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"gainhp\"))) {\n\t\t\tvoc->gainHP = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e8cbff961edb8238303bcaf2d2b177dbea0b302966340f8a8c22f4ce2bfc7e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 71, + "startColumn": 7, + "charOffset": 2070, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 69, + "startColumn": 7, + "charOffset": 2059, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"gainmana\"))) {\n\t\t\tvoc->gainMana = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44f958672f8fe7ec7f5068b506ac8d6819268be09ee93315a125d6dc6a0818d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 71, + "startColumn": 7, + "charOffset": 2070, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 69, + "startColumn": 7, + "charOffset": 2059, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"gainmana\"))) {\n\t\t\tvoc->gainMana = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2fe2b78d7b6e9f6ab9a578affab54c0dfa6d19ae21befd38ebb2efba71e4f7fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 71, + "startColumn": 13, + "charOffset": 2076, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 69, + "startColumn": 13, + "charOffset": 2059, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"gainmana\"))) {\n\t\t\tvoc->gainMana = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "969b9a25f6100675e7b055b1fb21dfa7b629bc0df1e9c77687b56965c0487052" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 75, + "startColumn": 7, + "charOffset": 2183, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 73, + "startColumn": 7, + "charOffset": 2172, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"gainhpticks\"))) {\n\t\t\tvoc->gainHealthTicks = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4dc117dc9f22ec27412bc31a579052e0766b116e59d94d2b7fcb47040b1cc4f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 75, + "startColumn": 7, + "charOffset": 2183, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 73, + "startColumn": 7, + "charOffset": 2172, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"gainhpticks\"))) {\n\t\t\tvoc->gainHealthTicks = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7a8e347240c0c789dafee6a55202789ff982fcbb0f88ceab440f0d186d0b1c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 75, + "startColumn": 13, + "charOffset": 2189, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 73, + "startColumn": 13, + "charOffset": 2172, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"gainhpticks\"))) {\n\t\t\tvoc->gainHealthTicks = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf422ba93c8e1ae307831663bf266f258110c86edb664187b5d2fc07373b21fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 79, + "startColumn": 7, + "charOffset": 2306, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 77, + "startColumn": 7, + "charOffset": 2295, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"gainhpamount\"))) {\n\t\t\tvoc->gainHealthAmount = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40990fd4b04124197cc2c2cf51112d9950f03002860e781d78f6a915d3f8b961" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 79, + "startColumn": 7, + "charOffset": 2306, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 77, + "startColumn": 7, + "charOffset": 2295, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"gainhpamount\"))) {\n\t\t\tvoc->gainHealthAmount = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec03cb07a3ad3eb423530d6e71386ac52fcce92e87d3cf7559a181b8754adeb5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 79, + "startColumn": 13, + "charOffset": 2312, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 77, + "startColumn": 13, + "charOffset": 2295, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"gainhpamount\"))) {\n\t\t\tvoc->gainHealthAmount = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc572e84b1479db2c168d5b69951b0b35b35d8d3baabd3485aed0ea46756eb3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 83, + "startColumn": 7, + "charOffset": 2431, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 81, + "startColumn": 7, + "charOffset": 2420, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"gainmanaticks\"))) {\n\t\t\tvoc->gainManaTicks = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "595bda7347205f47b06a550fe80b1ff4aac8b813d253503c2dd85fb32b483015" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 83, + "startColumn": 7, + "charOffset": 2431, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 81, + "startColumn": 7, + "charOffset": 2420, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"gainmanaticks\"))) {\n\t\t\tvoc->gainManaTicks = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8fb2bdc4727f53eff74be96f84684bb71be1f204f41810bf64391c26a27add52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 83, + "startColumn": 13, + "charOffset": 2437, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 81, + "startColumn": 13, + "charOffset": 2420, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"gainmanaticks\"))) {\n\t\t\tvoc->gainManaTicks = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f63d7d2014bdcd162db6cedb180f70bfb842779b4fe2aae27f4633c2e37e9ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 7, + "charOffset": 2554, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 7, + "charOffset": 2543, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"gainmanaamount\"))) {\n\t\t\tvoc->gainManaAmount = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17b4d4e025a99495b13c4d794b8ffa5f36aec44fdb9023f60e7676142d50b4cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 7, + "charOffset": 2554, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 7, + "charOffset": 2543, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"gainmanaamount\"))) {\n\t\t\tvoc->gainManaAmount = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "abf7b54bb3d8cd388376c0730bec540dad53352269090d6777165a5b56130843" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 13, + "charOffset": 2560, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 13, + "charOffset": 2543, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"gainmanaamount\"))) {\n\t\t\tvoc->gainManaAmount = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3599c1602eb1c44908d2ca671d4f1924212fac92018253f88660bab2f26dbfab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 7, + "charOffset": 2679, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 7, + "charOffset": 2668, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"manamultiplier\"))) {\n\t\t\tvoc->manaMultiplier = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e54e6fc31f092711012330fbdedaecd8bc0dde7535e65f06a908206e07b9102" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 7, + "charOffset": 2679, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 7, + "charOffset": 2668, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"manamultiplier\"))) {\n\t\t\tvoc->manaMultiplier = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa438919d36cb3895a70c1dc77aa17b56c5778b58c3819e459ba3e656764d824" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 13, + "charOffset": 2685, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 13, + "charOffset": 2668, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"manamultiplier\"))) {\n\t\t\tvoc->manaMultiplier = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4e54c48ebb90c51b6d66a5c418b9194a1af9549a886088ae494ad227e3117de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 95, + "startColumn": 7, + "charOffset": 2801, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 93, + "startColumn": 7, + "charOffset": 2790, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"attackspeed\"))) {\n\t\t\tvoc->attackSpeed = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1b88d549ecdd9e90ab42a8a14103464c9bc2e599057a9d1df3be4aba1c467aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 95, + "startColumn": 7, + "charOffset": 2801, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 93, + "startColumn": 7, + "charOffset": 2790, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"attackspeed\"))) {\n\t\t\tvoc->attackSpeed = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85fdf831da9ef47699fae8a0e7eab35c6d85b2ba84350243790e73525e1914b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 95, + "startColumn": 13, + "charOffset": 2807, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 93, + "startColumn": 13, + "charOffset": 2790, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"attackspeed\"))) {\n\t\t\tvoc->attackSpeed = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a83af5171f1d87c23a27e829245f9726804fd8247f5e5daf6579494dbef6cc6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 99, + "startColumn": 7, + "charOffset": 2920, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 97, + "startColumn": 7, + "charOffset": 2909, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"basespeed\"))) {\n\t\t\tvoc->baseSpeed = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e64994b7ae808eb66a67d5ab9fb8047687c23ba06a6a0843dfb929fd3ffa89ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 99, + "startColumn": 7, + "charOffset": 2920, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 97, + "startColumn": 7, + "charOffset": 2909, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"basespeed\"))) {\n\t\t\tvoc->baseSpeed = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90f25ecc483facea81b6005d46c515f7832e71c6f66bca64219c859e44b75d8d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 99, + "startColumn": 13, + "charOffset": 2926, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 97, + "startColumn": 13, + "charOffset": 2909, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"basespeed\"))) {\n\t\t\tvoc->baseSpeed = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29156554a9f08fa5a7f7c5be0d6ff770a56b365a6f9399a1c9b87228c9700209" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 103, + "startColumn": 7, + "charOffset": 3035, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 101, + "startColumn": 7, + "charOffset": 3024, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"soulmax\"))) {\n\t\t\tvoc->soulMax = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce66d540ce1e332e6472ad6a9c29d024bbe91c967f8aed103f1da77c39893004" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 103, + "startColumn": 7, + "charOffset": 3035, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 101, + "startColumn": 7, + "charOffset": 3024, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"soulmax\"))) {\n\t\t\tvoc->soulMax = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26b738346ec501849f4111b0c9be64e47859024e9334eeb1adf8a208ddef650b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 103, + "startColumn": 13, + "charOffset": 3041, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 101, + "startColumn": 13, + "charOffset": 3024, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"soulmax\"))) {\n\t\t\tvoc->soulMax = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4578d715b4581d62a34dc70264a2f575d1d87334749a832753584037eb5bd8ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 104, + "startColumn": 19, + "charOffset": 3099, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 102, + "startColumn": 19, + "charOffset": 3028, + "charLength": 4, + "snippet": { + "text": "\n\t\tif ((attr = vocationNode.attribute(\"soulmax\"))) {\n\t\t\tvoc->soulMax = pugi::cast(attr.value());\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84bc98cd0c92328fca51444b18bfc25fe4b8a87611ccebaf567ed79f758ed78e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 107, + "startColumn": 7, + "charOffset": 3146, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 105, + "startColumn": 7, + "charOffset": 3135, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"gainsoulticks\"))) {\n\t\t\tvoc->gainSoulTicks = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4765665619e4deaa1b4911e2b78c194268baf5bd09a6c9a2adb4b55f5bf071b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 107, + "startColumn": 7, + "charOffset": 3146, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 105, + "startColumn": 7, + "charOffset": 3135, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"gainsoulticks\"))) {\n\t\t\tvoc->gainSoulTicks = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98dbda8540012b0306b5f10dacc84935ff2a136e169f7b708353ceb02885a837" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 107, + "startColumn": 13, + "charOffset": 3152, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 105, + "startColumn": 13, + "charOffset": 3135, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"gainsoulticks\"))) {\n\t\t\tvoc->gainSoulTicks = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05b087fd1bbb9b335f7ffaccec5aaf93866a8712dc2abbbad62c49f92996a08d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 7, + "charOffset": 3269, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 7, + "charOffset": 3258, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"fromvoc\"))) {\n\t\t\tvoc->fromVocation = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd6545e221c8f01152213c0431e1d93e0e592c7c067cd0302f9c876bc3fa7309" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 7, + "charOffset": 3269, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 7, + "charOffset": 3258, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"fromvoc\"))) {\n\t\t\tvoc->fromVocation = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09250627c9ace74db71a370dbe6a18928c4748bfadcdb10c1f7b78690cbafc55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 13, + "charOffset": 3275, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 13, + "charOffset": 3258, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"fromvoc\"))) {\n\t\t\tvoc->fromVocation = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11f3c46210761a777dcf38723369be5d9df1f49b75f3519c39683f28f44bdada" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 115, + "startColumn": 7, + "charOffset": 3385, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 113, + "startColumn": 7, + "charOffset": 3374, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"canCombat\"))) {\n\t\t\tvoc->combat = attr.as_bool();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2003378ca5df90445c140b57ca639ce13779e12b5343b7618815926be88d0674" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 115, + "startColumn": 7, + "charOffset": 3385, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 113, + "startColumn": 7, + "charOffset": 3374, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"canCombat\"))) {\n\t\t\tvoc->combat = attr.as_bool();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc58c26078f4cb170a43056d44d36e3673a3a39c9de87ba18207f095c709aed6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 115, + "startColumn": 13, + "charOffset": 3391, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 113, + "startColumn": 13, + "charOffset": 3374, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"canCombat\"))) {\n\t\t\tvoc->combat = attr.as_bool();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba76ba7c9d85526d67ab8b34a79289f51a8a3da95aa854de4c3554abeeff28d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 119, + "startColumn": 7, + "charOffset": 3477, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 117, + "startColumn": 7, + "charOffset": 3466, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"avatarlooktype\"))) {\n\t\t\tvoc->avatarLookType = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d02779ec85041727f653394e124dc7bf34b851054b5d63ee37f284bd7abc9e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 119, + "startColumn": 7, + "charOffset": 3477, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 117, + "startColumn": 7, + "charOffset": 3466, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"avatarlooktype\"))) {\n\t\t\tvoc->avatarLookType = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab2f095b1eb0fe728a8cec2fc365485087e76b7e100ff2aa9f3f31e2f2b2b5fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 119, + "startColumn": 13, + "charOffset": 3483, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 117, + "startColumn": 13, + "charOffset": 3466, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = vocationNode.attribute(\"avatarlooktype\"))) {\n\t\t\tvoc->avatarLookType = pugi::cast(attr.value());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e1ee28f8161976064d61e780c2c42793ab54c0f5830dd4788eb79bc248252bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 123, + "startColumn": 3, + "charOffset": 3598, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 121, + "startColumn": 3, + "charOffset": 3591, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfor (auto childNode : vocationNode.children()) {\n\t\t\tif (strcasecmp(childNode.name(), \"skill\") == 0) {\n\t\t\t\tpugi::xml_attribute skillIdAttribute = childNode.attribute(\"id\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "412cd782f8cc737a3c3eb9158d933061a946354c4bd547ce2b4d65c6d2afcb76" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 124, + "startColumn": 4, + "charOffset": 3650, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 122, + "startColumn": 4, + "charOffset": 3595, + "charLength": 2, + "snippet": { + "text": "\n\t\tfor (auto childNode : vocationNode.children()) {\n\t\t\tif (strcasecmp(childNode.name(), \"skill\") == 0) {\n\t\t\t\tpugi::xml_attribute skillIdAttribute = childNode.attribute(\"id\");\n\t\t\t\tif (skillIdAttribute) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81664cb22fd8f5aae3f3d288d07144e3f1da736423c8249ab93b0367fed8a66a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 126, + "startColumn": 9, + "charOffset": 3778, + "charLength": 16, + "snippet": { + "text": "skillIdAttribute" + } + }, + "contextRegion": { + "startLine": 124, + "startColumn": 9, + "charOffset": 3647, + "charLength": 16, + "snippet": { + "text": "\t\t\tif (strcasecmp(childNode.name(), \"skill\") == 0) {\n\t\t\t\tpugi::xml_attribute skillIdAttribute = childNode.attribute(\"id\");\n\t\t\t\tif (skillIdAttribute) {\n\t\t\t\t\tuint16_t skill_id = pugi::cast(skillIdAttribute.value());\n\t\t\t\t\tif (skill_id <= SKILL_LAST) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "003058235e2bdcdefd3c8f139ed30bd8f41eebfb4fa77f0ad78f05e784e88db7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 126, + "startColumn": 9, + "charOffset": 3778, + "charLength": 16, + "snippet": { + "text": "skillIdAttribute" + } + }, + "contextRegion": { + "startLine": 124, + "startColumn": 9, + "charOffset": 3647, + "charLength": 16, + "snippet": { + "text": "\t\t\tif (strcasecmp(childNode.name(), \"skill\") == 0) {\n\t\t\t\tpugi::xml_attribute skillIdAttribute = childNode.attribute(\"id\");\n\t\t\t\tif (skillIdAttribute) {\n\t\t\t\t\tuint16_t skill_id = pugi::cast(skillIdAttribute.value());\n\t\t\t\t\tif (skill_id <= SKILL_LAST) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b823b73053a9da3be741b70090ce5407be34ca56560d496dba08ff02e898e975" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 127, + "startColumn": 6, + "charOffset": 3803, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 125, + "startColumn": 6, + "charOffset": 3700, + "charLength": 8, + "snippet": { + "text": "\t\t\t\tpugi::xml_attribute skillIdAttribute = childNode.attribute(\"id\");\n\t\t\t\tif (skillIdAttribute) {\n\t\t\t\t\tuint16_t skill_id = pugi::cast(skillIdAttribute.value());\n\t\t\t\t\tif (skill_id <= SKILL_LAST) {\n\t\t\t\t\t\tvoc->skillMultipliers[skill_id] = pugi::cast(childNode.attribute(\"multiplier\").value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8d92257a8ad7cbdb652c68ef38cddb3f351cefdf38e2f71c5b940ec5aef05d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 129, + "startColumn": 7, + "charOffset": 3912, + "charLength": 3, + "snippet": { + "text": "voc" + } + }, + "contextRegion": { + "startLine": 127, + "startColumn": 7, + "charOffset": 3798, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tuint16_t skill_id = pugi::cast(skillIdAttribute.value());\n\t\t\t\t\tif (skill_id <= SKILL_LAST) {\n\t\t\t\t\t\tvoc->skillMultipliers[skill_id] = pugi::cast(childNode.attribute(\"multiplier\").value());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tg_logger().warn(\"[Vocations::loadFromXml] - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "368ff28ff32e247d18a26098896d66c9d0aa836785f798f86aafc11d6be0e79c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 142, + "startColumn": 9, + "charOffset": 4496, + "charLength": 15, + "snippet": { + "text": "factorAttribute" + } + }, + "contextRegion": { + "startLine": 140, + "startColumn": 9, + "charOffset": 4346, + "charLength": 15, + "snippet": { + "text": "\t\t\t} else if (strcasecmp(childNode.name(), \"mitigation\") == 0) {\n\t\t\t\tpugi::xml_attribute factorAttribute = childNode.attribute(\"multiplier\");\n\t\t\t\tif (factorAttribute) {\n\t\t\t\t\tvoc->mitigationFactor = pugi::cast(factorAttribute.value());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc3808d868f3d429bee1c16508df0dba8e5d4e9917e31e5e07037de4d8f4e20e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 142, + "startColumn": 9, + "charOffset": 4496, + "charLength": 15, + "snippet": { + "text": "factorAttribute" + } + }, + "contextRegion": { + "startLine": 140, + "startColumn": 9, + "charOffset": 4346, + "charLength": 15, + "snippet": { + "text": "\t\t\t} else if (strcasecmp(childNode.name(), \"mitigation\") == 0) {\n\t\t\t\tpugi::xml_attribute factorAttribute = childNode.attribute(\"multiplier\");\n\t\t\t\tif (factorAttribute) {\n\t\t\t\t\tvoc->mitigationFactor = pugi::cast(factorAttribute.value());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74533f8911f33ebd3b641dfc61606e0a16b0d469d5e7923c4514188bf93b3802" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 147, + "startColumn": 9, + "charOffset": 4690, + "charLength": 22, + "snippet": { + "text": "primaryShieldAttribute" + } + }, + "contextRegion": { + "startLine": 145, + "startColumn": 9, + "charOffset": 4594, + "charLength": 22, + "snippet": { + "text": "\n\t\t\t\tpugi::xml_attribute primaryShieldAttribute = childNode.attribute(\"primaryShield\");\n\t\t\t\tif (primaryShieldAttribute) {\n\t\t\t\t\tvoc->mitigationPrimaryShield = pugi::cast(primaryShieldAttribute.value());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47e6990f0ce5945563a4c4f4ed1724f40ea255f05347dc5ecfe2767dd691cba6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 147, + "startColumn": 9, + "charOffset": 4690, + "charLength": 22, + "snippet": { + "text": "primaryShieldAttribute" + } + }, + "contextRegion": { + "startLine": 145, + "startColumn": 9, + "charOffset": 4594, + "charLength": 22, + "snippet": { + "text": "\n\t\t\t\tpugi::xml_attribute primaryShieldAttribute = childNode.attribute(\"primaryShield\");\n\t\t\t\tif (primaryShieldAttribute) {\n\t\t\t\t\tvoc->mitigationPrimaryShield = pugi::cast(primaryShieldAttribute.value());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "679e747714ecea87c8ec3fd8d7e7168979cbcdd314b2590a81df17517c56ec05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 152, + "startColumn": 9, + "charOffset": 4909, + "charLength": 24, + "snippet": { + "text": "secondaryShieldAttribute" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 9, + "charOffset": 4809, + "charLength": 24, + "snippet": { + "text": "\n\t\t\t\tpugi::xml_attribute secondaryShieldAttribute = childNode.attribute(\"secondaryShield\");\n\t\t\t\tif (secondaryShieldAttribute) {\n\t\t\t\t\tvoc->mitigationSecondaryShield = pugi::cast(secondaryShieldAttribute.value());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "427d68c0fa1837e4eb06c429f1524240098102a1b158cdc6578ed340bcf03772" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 152, + "startColumn": 9, + "charOffset": 4909, + "charLength": 24, + "snippet": { + "text": "secondaryShieldAttribute" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 9, + "charOffset": 4809, + "charLength": 24, + "snippet": { + "text": "\n\t\t\t\tpugi::xml_attribute secondaryShieldAttribute = childNode.attribute(\"secondaryShield\");\n\t\t\t\tif (secondaryShieldAttribute) {\n\t\t\t\t\tvoc->mitigationSecondaryShield = pugi::cast(secondaryShieldAttribute.value());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c220ece5005931651adb5723397707d50da5535db6366f83bc17e2f13b05078" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 9, + "charOffset": 5187, + "charLength": 20, + "snippet": { + "text": "meleeDamageAttribute" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 9, + "charOffset": 5034, + "charLength": 20, + "snippet": { + "text": "\t\t\t} else if (strcasecmp(childNode.name(), \"formula\") == 0) {\n\t\t\t\tpugi::xml_attribute meleeDamageAttribute = childNode.attribute(\"meleeDamage\");\n\t\t\t\tif (meleeDamageAttribute) {\n\t\t\t\t\tvoc->meleeDamageMultiplier = pugi::cast(meleeDamageAttribute.value());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be18d0c17037fb724d16dd82544eec002af8965ea981f15c5645e23464901004" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 9, + "charOffset": 5187, + "charLength": 20, + "snippet": { + "text": "meleeDamageAttribute" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 9, + "charOffset": 5034, + "charLength": 20, + "snippet": { + "text": "\t\t\t} else if (strcasecmp(childNode.name(), \"formula\") == 0) {\n\t\t\t\tpugi::xml_attribute meleeDamageAttribute = childNode.attribute(\"meleeDamage\");\n\t\t\t\tif (meleeDamageAttribute) {\n\t\t\t\t\tvoc->meleeDamageMultiplier = pugi::cast(meleeDamageAttribute.value());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62c86072531beba708cb334b0e297ecd757e55bed2c514530eb14f77a42a7673" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 162, + "startColumn": 9, + "charOffset": 5390, + "charLength": 19, + "snippet": { + "text": "distDamageAttribute" + } + }, + "contextRegion": { + "startLine": 160, + "startColumn": 9, + "charOffset": 5300, + "charLength": 19, + "snippet": { + "text": "\n\t\t\t\tpugi::xml_attribute distDamageAttribute = childNode.attribute(\"distDamage\");\n\t\t\t\tif (distDamageAttribute) {\n\t\t\t\t\tvoc->distDamageMultiplier = pugi::cast(distDamageAttribute.value());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5124f09c2256508b9aafc830da994d2fe71148030c9bb2e0619fbe86ec82105d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 162, + "startColumn": 9, + "charOffset": 5390, + "charLength": 19, + "snippet": { + "text": "distDamageAttribute" + } + }, + "contextRegion": { + "startLine": 160, + "startColumn": 9, + "charOffset": 5300, + "charLength": 19, + "snippet": { + "text": "\n\t\t\t\tpugi::xml_attribute distDamageAttribute = childNode.attribute(\"distDamage\");\n\t\t\t\tif (distDamageAttribute) {\n\t\t\t\t\tvoc->distDamageMultiplier = pugi::cast(distDamageAttribute.value());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d07f1e9131312644cd489a9cda758492f109ac4f6149b5df4c19f1020429b2a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 9, + "charOffset": 5584, + "charLength": 16, + "snippet": { + "text": "defenseAttribute" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 9, + "charOffset": 5500, + "charLength": 16, + "snippet": { + "text": "\n\t\t\t\tpugi::xml_attribute defenseAttribute = childNode.attribute(\"defense\");\n\t\t\t\tif (defenseAttribute) {\n\t\t\t\t\tvoc->defenseMultiplier = pugi::cast(defenseAttribute.value());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b51f16dfe9f8aec4ca29a15a818f5295c7039e4491a945f0222564565f27cc25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 9, + "charOffset": 5584, + "charLength": 16, + "snippet": { + "text": "defenseAttribute" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 9, + "charOffset": 5500, + "charLength": 16, + "snippet": { + "text": "\n\t\t\t\tpugi::xml_attribute defenseAttribute = childNode.attribute(\"defense\");\n\t\t\t\tif (defenseAttribute) {\n\t\t\t\t\tvoc->defenseMultiplier = pugi::cast(defenseAttribute.value());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb29da0af24616e0d5646f02f38064583495d2087983de22f67d7911fb6f0518" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 9, + "charOffset": 5765, + "charLength": 14, + "snippet": { + "text": "armorAttribute" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 9, + "charOffset": 5685, + "charLength": 14, + "snippet": { + "text": "\n\t\t\t\tpugi::xml_attribute armorAttribute = childNode.attribute(\"armor\");\n\t\t\t\tif (armorAttribute) {\n\t\t\t\t\tvoc->armorMultiplier = pugi::cast(armorAttribute.value());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "523afa6b790d521c8964e7ee73f6c51927deeeaa0b529f5c1bf02a943d91eae6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 9, + "charOffset": 5765, + "charLength": 14, + "snippet": { + "text": "armorAttribute" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 9, + "charOffset": 5685, + "charLength": 14, + "snippet": { + "text": "\n\t\t\t\tpugi::xml_attribute armorAttribute = childNode.attribute(\"armor\");\n\t\t\t\tif (armorAttribute) {\n\t\t\t\t\tvoc->armorMultiplier = pugi::cast(armorAttribute.value());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbbd6a9218c0f9ea9aab122268496d6d1ae1736615be7aeef992cf06cf0e4440" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 177, + "startColumn": 9, + "charOffset": 6029, + "charLength": 27, + "snippet": { + "text": "pvpDamageReceivedMultiplier" + } + }, + "contextRegion": { + "startLine": 175, + "startColumn": 9, + "charOffset": 5860, + "charLength": 27, + "snippet": { + "text": "\t\t\t} else if (strcasecmp(childNode.name(), \"pvp\") == 0) {\n\t\t\t\tpugi::xml_attribute pvpDamageReceivedMultiplier = childNode.attribute(\"damageReceivedMultiplier\");\n\t\t\t\tif (pvpDamageReceivedMultiplier) {\n\t\t\t\t\tvoc->pvpDamageReceivedMultiplier = pugi::cast(pvpDamageReceivedMultiplier.value());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99e074a6bdf3a5b2025c0377b62ced53eed8209b638c0d7217a4ea5884c5dd9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 177, + "startColumn": 9, + "charOffset": 6029, + "charLength": 27, + "snippet": { + "text": "pvpDamageReceivedMultiplier" + } + }, + "contextRegion": { + "startLine": 175, + "startColumn": 9, + "charOffset": 5860, + "charLength": 27, + "snippet": { + "text": "\t\t\t} else if (strcasecmp(childNode.name(), \"pvp\") == 0) {\n\t\t\t\tpugi::xml_attribute pvpDamageReceivedMultiplier = childNode.attribute(\"damageReceivedMultiplier\");\n\t\t\t\tif (pvpDamageReceivedMultiplier) {\n\t\t\t\t\tvoc->pvpDamageReceivedMultiplier = pugi::cast(pvpDamageReceivedMultiplier.value());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1e5cdd6cd9d3e13c22e0204c4d24896a9d08ec8fa39808a42bb7782342f0443" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 182, + "startColumn": 9, + "charOffset": 6268, + "charLength": 24, + "snippet": { + "text": "pvpDamageDealtMultiplier" + } + }, + "contextRegion": { + "startLine": 180, + "startColumn": 9, + "charOffset": 6162, + "charLength": 24, + "snippet": { + "text": "\n\t\t\t\tpugi::xml_attribute pvpDamageDealtMultiplier = childNode.attribute(\"damageDealtMultiplier\");\n\t\t\t\tif (pvpDamageDealtMultiplier) {\n\t\t\t\t\tvoc->pvpDamageDealtMultiplier = pugi::cast(pvpDamageDealtMultiplier.value());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb54f7fb3d8683b912218c81ad97a412fc91bc0d4e7ec931f35116e25e3cc117" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 182, + "startColumn": 9, + "charOffset": 6268, + "charLength": 24, + "snippet": { + "text": "pvpDamageDealtMultiplier" + } + }, + "contextRegion": { + "startLine": 180, + "startColumn": 9, + "charOffset": 6162, + "charLength": 24, + "snippet": { + "text": "\n\t\t\t\tpugi::xml_attribute pvpDamageDealtMultiplier = childNode.attribute(\"damageDealtMultiplier\");\n\t\t\t\tif (pvpDamageDealtMultiplier) {\n\t\t\t\t\tvoc->pvpDamageDealtMultiplier = pugi::cast(pvpDamageDealtMultiplier.value());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a6bb5807aede263deb35a6e3804a74c937b43c2f04c8307a65db1a04b8e73bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto name' can be declared as 'const auto *name'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 189, + "startColumn": 5, + "charOffset": 6649, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 187, + "startColumn": 5, + "charOffset": 6520, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tpugi::xml_attribute nameAttr = childNode.attribute(\"name\");\n\t\t\t\tauto quality = pugi::cast(qualityAttr.value());\n\t\t\t\tauto name = nameAttr.as_string();\n\t\t\t\tvoc->wheelGems[static_cast(quality)] = name;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8da9791201f0439cbc50ea47f78fda57066ca1c49b29e56f80bae761a71dbc2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 209, + "startColumn": 2, + "charOffset": 7137, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 207, + "startColumn": 2, + "charOffset": 7068, + "charLength": 3, + "snippet": { + "text": "\nuint16_t Vocations::getVocationId(const std::string &name) const {\n\tfor (const auto &it : vocationsMap) {\n\t\tif (strcasecmp(it.second->name.c_str(), name.c_str()) == 0) {\n\t\t\treturn it.first;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8a06f03a8880c370bcf070f2ed140a7ee922d33f47fb8986666c7ecf3334082" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 218, + "startColumn": 2, + "charOffset": 7351, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 216, + "startColumn": 2, + "charOffset": 7280, + "charLength": 3, + "snippet": { + "text": "\nuint16_t Vocations::getPromotedVocation(uint16_t vocationId) const {\n\tfor (const auto &it : vocationsMap) {\n\t\tif (it.second->fromVocation == vocationId && it.first != vocationId) {\n\t\t\treturn it.first;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f40058c4535ee360e4aea594377ab9b557f8839c18c166756f8e19a5b6986f79" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-c-arrays", + "ruleIndex": 480, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not declare C-style arrays, use std::array<> instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 1, + "charOffset": 7515, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 1, + "charOffset": 7512, + "charLength": 8, + "snippet": { + "text": "}\n\nuint32_t Vocation::skillBase[SKILL_LAST + 1] = { 50, 50, 50, 50, 30, 100, 20 };\nconst uint16_t minSkillLevel = 10;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c53f812d5927395439048b57e53644ce9377a38b6980884bfd2a1d035019225" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 41, + "charOffset": 7555, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 41, + "charOffset": 7512, + "charLength": 1, + "snippet": { + "text": "}\n\nuint32_t Vocation::skillBase[SKILL_LAST + 1] = { 50, 50, 50, 50, 30, 100, 20 };\nconst uint16_t minSkillLevel = 10;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24e46d925e7cabb9a27c4ea659418c1f2e1d2c639689b8cc681bad55e84b2b89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 50, + "charOffset": 7564, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 50, + "charOffset": 7512, + "charLength": 2, + "snippet": { + "text": "}\n\nuint32_t Vocation::skillBase[SKILL_LAST + 1] = { 50, 50, 50, 50, 30, 100, 20 };\nconst uint16_t minSkillLevel = 10;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0afa726365bd2a70e6321ce42b798d57e9ebeaad9b2d3228f6547da44aa39a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 54, + "charOffset": 7568, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 54, + "charOffset": 7512, + "charLength": 2, + "snippet": { + "text": "}\n\nuint32_t Vocation::skillBase[SKILL_LAST + 1] = { 50, 50, 50, 50, 30, 100, 20 };\nconst uint16_t minSkillLevel = 10;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4313b106c2b038fe0b3f185a4aebe6c6761d170534c433199dfc086e66873f77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 58, + "charOffset": 7572, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 58, + "charOffset": 7512, + "charLength": 2, + "snippet": { + "text": "}\n\nuint32_t Vocation::skillBase[SKILL_LAST + 1] = { 50, 50, 50, 50, 30, 100, 20 };\nconst uint16_t minSkillLevel = 10;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69da030abf64555796fd1748c2239ee3bf8d16b65e27b72c23504db84c325d86" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 62, + "charOffset": 7576, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 62, + "charOffset": 7512, + "charLength": 2, + "snippet": { + "text": "}\n\nuint32_t Vocation::skillBase[SKILL_LAST + 1] = { 50, 50, 50, 50, 30, 100, 20 };\nconst uint16_t minSkillLevel = 10;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee278fe595c573c3ea330ffcaa84bde2e4acbc7fbd0e2f69628bece41cef9860" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 66, + "charOffset": 7580, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 66, + "charOffset": 7512, + "charLength": 2, + "snippet": { + "text": "}\n\nuint32_t Vocation::skillBase[SKILL_LAST + 1] = { 50, 50, 50, 50, 30, 100, 20 };\nconst uint16_t minSkillLevel = 10;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05606e4534a9bc37618cb81739095b7aac60bebbcb64671e4cec4a2eb9705378" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 70, + "charOffset": 7584, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 70, + "charOffset": 7512, + "charLength": 3, + "snippet": { + "text": "}\n\nuint32_t Vocation::skillBase[SKILL_LAST + 1] = { 50, 50, 50, 50, 30, 100, 20 };\nconst uint16_t minSkillLevel = 10;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfbc4fcd357e12fee37b73a4b49841e0f261bcdf443ea982fc2263490ec75ab0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 75, + "charOffset": 7589, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 75, + "charOffset": 7512, + "charLength": 2, + "snippet": { + "text": "}\n\nuint32_t Vocation::skillBase[SKILL_LAST + 1] = { 50, 50, 50, 50, 30, 100, 20 };\nconst uint16_t minSkillLevel = 10;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "670759703d5033a03da244078606b3378dac79517fb0b3169e979aad9a148c70" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 234, + "startColumn": 12, + "charOffset": 7761, + "charLength": 15, + "snippet": { + "text": "cacheSkillTotal" + } + }, + "contextRegion": { + "startLine": 232, + "startColumn": 12, + "charOffset": 7746, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tauto it = cacheSkillTotal[skill].find(level);\n\tif (it != cacheSkillTotal[skill].end()) {\n\t\treturn it->second;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75a3848379a63cc84626cd4e00502399db0d64c72f4bf83534d9f2847421d5c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 235, + "startColumn": 12, + "charOffset": 7808, + "charLength": 15, + "snippet": { + "text": "cacheSkillTotal" + } + }, + "contextRegion": { + "startLine": 233, + "startColumn": 12, + "charOffset": 7749, + "charLength": 15, + "snippet": { + "text": "\n\tauto it = cacheSkillTotal[skill].find(level);\n\tif (it != cacheSkillTotal[skill].end()) {\n\t\treturn it->second;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a17b129fb92177610c47731a2499374f07e300e9b838270565c76fe20dbfc5a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 240, + "startColumn": 2, + "charOffset": 7897, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 238, + "startColumn": 2, + "charOffset": 7864, + "charLength": 3, + "snippet": { + "text": "\n\tabsl::uint128 totalTries = 0;\n\tfor (uint16_t i = minSkillLevel; i <= level; ++i) {\n\t\ttotalTries += getReqSkillTries(skill, i);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e97cd38083f1acefd84b19fcf6b8dc56e0f53c5fe784e5f2b3ab8d54ac4874cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'i' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 240, + "startColumn": 35, + "charOffset": 7930, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 238, + "startColumn": 35, + "charOffset": 7864, + "charLength": 1, + "snippet": { + "text": "\n\tabsl::uint128 totalTries = 0;\n\tfor (uint16_t i = minSkillLevel; i <= level; ++i) {\n\t\ttotalTries += getReqSkillTries(skill, i);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4248c5e2b5bbfde0027ce69771914a6f537ee142ac13c71f3b82726c75aa60d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 243, + "startColumn": 2, + "charOffset": 7997, + "charLength": 15, + "snippet": { + "text": "cacheSkillTotal" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 2, + "charOffset": 7949, + "charLength": 15, + "snippet": { + "text": "\t\ttotalTries += getReqSkillTries(skill, i);\n\t}\n\tcacheSkillTotal[skill][level] = totalTries;\n\treturn totalTries;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8aa48f615e4f025fa862a1b87ed1bf836f172a3677a9ab309b6d503db5a08b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 252, + "startColumn": 12, + "charOffset": 8213, + "charLength": 10, + "snippet": { + "text": "cacheSkill" + } + }, + "contextRegion": { + "startLine": 250, + "startColumn": 12, + "charOffset": 8198, + "charLength": 10, + "snippet": { + "text": "\t}\n\n\tauto it = cacheSkill[skill].find(level);\n\tif (it != cacheSkill[skill].end()) {\n\t\treturn it->second;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "490440f3ffb0dd7d03592787b96fe52f4614ec29bad07de6b4e27ed0c512a63a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 253, + "startColumn": 12, + "charOffset": 8255, + "charLength": 10, + "snippet": { + "text": "cacheSkill" + } + }, + "contextRegion": { + "startLine": 251, + "startColumn": 12, + "charOffset": 8201, + "charLength": 10, + "snippet": { + "text": "\n\tauto it = cacheSkill[skill].find(level);\n\tif (it != cacheSkill[skill].end()) {\n\t\treturn it->second;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d6f8139113180f507c45254d3e083770b0b99ad0753ff01c244f03ce0851a02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 257, + "startColumn": 2, + "charOffset": 8308, + "charLength": 8, + "snippet": { + "text": "uint64_t" + } + }, + "contextRegion": { + "startLine": 255, + "startColumn": 2, + "charOffset": 8303, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tuint64_t tries = static_cast(skillBase[skill] * std::pow(static_cast(skillMultipliers[skill]), level - (minSkillLevel + 1)));\n\tcacheSkill[skill][level] = tries;\n\treturn tries;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41594b22237af90cad63b32b01a9b4fd6cbf1a5bd55534b52c55d681af0024da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 257, + "startColumn": 41, + "charOffset": 8347, + "charLength": 9, + "snippet": { + "text": "skillBase" + } + }, + "contextRegion": { + "startLine": 255, + "startColumn": 41, + "charOffset": 8303, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tuint64_t tries = static_cast(skillBase[skill] * std::pow(static_cast(skillMultipliers[skill]), level - (minSkillLevel + 1)));\n\tcacheSkill[skill][level] = tries;\n\treturn tries;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c2a25c9651a322430368c975f5578a173e89bcbbe22f4beba74d1878e57a3b67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 257, + "startColumn": 41, + "charOffset": 8347, + "charLength": 9, + "snippet": { + "text": "skillBase" + } + }, + "contextRegion": { + "startLine": 255, + "startColumn": 41, + "charOffset": 8303, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tuint64_t tries = static_cast(skillBase[skill] * std::pow(static_cast(skillMultipliers[skill]), level - (minSkillLevel + 1)));\n\tcacheSkill[skill][level] = tries;\n\treturn tries;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee226f1a668c6e93be4c89c8944a159ca2b8d46da2f06f3e90b7fc6c6f09e86a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 257, + "startColumn": 89, + "charOffset": 8395, + "charLength": 16, + "snippet": { + "text": "skillMultipliers" + } + }, + "contextRegion": { + "startLine": 255, + "startColumn": 89, + "charOffset": 8303, + "charLength": 16, + "snippet": { + "text": "\t}\n\n\tuint64_t tries = static_cast(skillBase[skill] * std::pow(static_cast(skillMultipliers[skill]), level - (minSkillLevel + 1)));\n\tcacheSkill[skill][level] = tries;\n\treturn tries;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e05fc42f8794bbcedcfe1f4045ec5e2ddb6e5d9c393ba4e4246535ea9d46bc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 258, + "startColumn": 2, + "charOffset": 8453, + "charLength": 10, + "snippet": { + "text": "cacheSkill" + } + }, + "contextRegion": { + "startLine": 256, + "startColumn": 2, + "charOffset": 8306, + "charLength": 10, + "snippet": { + "text": "\n\tuint64_t tries = static_cast(skillBase[skill] * std::pow(static_cast(skillMultipliers[skill]), level - (minSkillLevel + 1)));\n\tcacheSkill[skill][level] = tries;\n\treturn tries;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f721c9d78750ba1523d11c1767a76fdfc93da0ba5daaa39fab279122af659885" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 258, + "startColumn": 29, + "charOffset": 8480, + "charLength": 5, + "snippet": { + "text": "tries" + } + }, + "contextRegion": { + "startLine": 256, + "startColumn": 29, + "charOffset": 8306, + "charLength": 5, + "snippet": { + "text": "\n\tuint64_t tries = static_cast(skillBase[skill] * std::pow(static_cast(skillMultipliers[skill]), level - (minSkillLevel + 1)));\n\tcacheSkill[skill][level] = tries;\n\treturn tries;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb1a96e28bf994e66080797b20f433dd69cb6627ec82fea5e73e2279e37c1e48" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 271, + "startColumn": 2, + "charOffset": 8732, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 269, + "startColumn": 2, + "charOffset": 8698, + "charLength": 3, + "snippet": { + "text": "\t}\n\tabsl::uint128 totalMana = 0;\n\tfor (uint32_t i = 1; i <= magLevel; ++i) {\n\t\ttotalMana += getReqMana(i);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5261039ffc628651a5c8c67919ece85a1c6da164ea24d8045fbc97c667a34f39" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 286, + "startColumn": 21, + "charOffset": 9030, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 284, + "startColumn": 21, + "charOffset": 9006, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tuint64_t reqMana = std::floor(1600 * std::pow(manaMultiplier, static_cast(magLevel) - 1));\n\tcacheMana[magLevel] = reqMana;\n\treturn reqMana;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c0c9b2c0557326d3ee681f05672a562052d425287fb7aa252e0d04d1565c5a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'typename __gnu_cxx::__promote_2::__type' (aka 'double') to 'unsigned long'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 286, + "startColumn": 42, + "charOffset": 9051, + "charLength": 4, + "snippet": { + "text": "1600" + } + }, + "contextRegion": { + "startLine": 284, + "startColumn": 42, + "charOffset": 9006, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tuint64_t reqMana = std::floor(1600 * std::pow(manaMultiplier, static_cast(magLevel) - 1));\n\tcacheMana[magLevel] = reqMana;\n\treturn reqMana;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f56bdbaf46c46728eae36bb8fa2e75d7acb855bacbaada2bcf18bd8c4e4b3902" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1600 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 286, + "startColumn": 42, + "charOffset": 9051, + "charLength": 4, + "snippet": { + "text": "1600" + } + }, + "contextRegion": { + "startLine": 284, + "startColumn": 42, + "charOffset": 9006, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tuint64_t reqMana = std::floor(1600 * std::pow(manaMultiplier, static_cast(magLevel) - 1));\n\tcacheMana[magLevel] = reqMana;\n\treturn reqMana;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e59cf2a7c2bb865ef570d759c4088033d02ad811d79fbc234ed989ccc8ca2c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vocations/vocation.cpp" + }, + "region": { + "startLine": 299, + "startColumn": 2, + "charOffset": 9620, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 297, + "startColumn": 2, + "charOffset": 9460, + "charLength": 3, + "snippet": { + "text": "\tauto allModifiers = magic_enum::enum_entries();\n\tg_logger().debug(\"Loading supreme gem modifiers for vocation: {}\", vocationName);\n\tfor (const auto &[value, modifierName] : allModifiers) {\n\t\tstd::string targetVocation(modifierName.substr(0, modifierName.find('_')));\n\t\ttoLowerCaseString(targetVocation);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77757738201d1764876b0c9f1b7ec4117087ee7172f2126093778e495075eab7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 2, + "charOffset": 718, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 2, + "charOffset": 674, + "charLength": 2, + "snippet": { + "text": "\nsize_t PlayerVIP::getMaxEntries() const {\n\tif (m_player.group && m_player.group->maxVipEntries != 0) {\n\t\treturn m_player.group->maxVipEntries;\n\t} else if (m_player.isPremium()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93b2d17241825537fd1d71cc96be1c29b440a6baea12abf464a947749ffbbeee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 4, + "charOffset": 821, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 4, + "charOffset": 717, + "charLength": 4, + "snippet": { + "text": "\tif (m_player.group && m_player.group->maxVipEntries != 0) {\n\t\treturn m_player.group->maxVipEntries;\n\t} else if (m_player.isPremium()) {\n\t\treturn 100;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "587421895b1c8cf69f619ae50b043d9b95dc61b000a63d0338b5554d05025c58" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 29, + "startColumn": 10, + "charOffset": 863, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 27, + "startColumn": 10, + "charOffset": 778, + "charLength": 3, + "snippet": { + "text": "\t\treturn m_player.group->maxVipEntries;\n\t} else if (m_player.isPremium()) {\n\t\treturn 100;\n\t}\n\treturn 20;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c322eaf5cf03ea8c78a117ad762d45bfc83d821266e454a98044b6e45eb6c6ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 31, + "startColumn": 9, + "charOffset": 879, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 29, + "startColumn": 9, + "charOffset": 854, + "charLength": 2, + "snippet": { + "text": "\t\treturn 100;\n\t}\n\treturn 20;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05fd40eb4ebdec2d77f73bf29da6876c17c4232512fd06f5b28de8c0fb9ed94b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 36, + "startColumn": 10, + "charOffset": 972, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 10, + "charOffset": 886, + "charLength": 1, + "snippet": { + "text": "uint8_t PlayerVIP::getMaxGroupEntries() const {\n\tif (m_player.isPremium()) {\n\t\treturn 8; // max number of groups is 8 (5 custom and 3 default)\n\t}\n\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "855d5a3fa5099872879ef14159c039003a675d33a581e8a200538fbcca8a85e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'loginPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 60, + "charOffset": 1105, + "charLength": 11, + "snippet": { + "text": "loginPlayer" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 60, + "charOffset": 1043, + "charLength": 11, + "snippet": { + "text": "}\n\nvoid PlayerVIP::notifyStatusChange(std::shared_ptr loginPlayer, VipStatus_t status, bool message) const {\n\tif (!m_player.client) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8e953cb39985e7389cb8d261a58a4a0bb0998c49c761b9303299035587a56a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 6, + "charOffset": 1165, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 6, + "charOffset": 1045, + "charLength": 1, + "snippet": { + "text": "\nvoid PlayerVIP::notifyStatusChange(std::shared_ptr loginPlayer, VipStatus_t status, bool message) const {\n\tif (!m_player.client) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "baf68f2b5aa48ce67e1146a7a6d47656044bb659724edf8eb5ec57a772a9873f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 53, + "startColumn": 3, + "charOffset": 1355, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 3, + "charOffset": 1336, + "charLength": 2, + "snippet": { + "text": "\n\tif (message) {\n\t\tif (status == VipStatus_t::Online) {\n\t\t\tm_player.sendTextMessage(TextMessage(MESSAGE_FAILURE, fmt::format(\"{} has logged in.\", loginPlayer->getName())));\n\t\t} else if (status == VipStatus_t::Offline) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b197e70bdb55f55dbd70d97379ec3cf72537cc69ff9889d6401293ce72b5ec62" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 62, + "startColumn": 6, + "charOffset": 1732, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 6, + "charOffset": 1683, + "charLength": 1, + "snippet": { + "text": "\nbool PlayerVIP::remove(uint32_t vipGuid) {\n\tif (!vipGuids.erase(vipGuid)) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2533c59850ce290664884c1ed529f5f521683d90eac49096f75ea0ae91967a23" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'size_type' (aka 'unsigned long') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 62, + "startColumn": 7, + "charOffset": 1733, + "charLength": 8, + "snippet": { + "text": "vipGuids" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 7, + "charOffset": 1683, + "charLength": 8, + "snippet": { + "text": "\nbool PlayerVIP::remove(uint32_t vipGuid) {\n\tif (!vipGuids.erase(vipGuid)) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29710725e3cd60e2d74505a89a0feec4ffa91cafd1496c31e2dc99c7803140f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 11, + "charOffset": 1790, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 11, + "charOffset": 1776, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tvipGuids.erase(vipGuid);\n\tif (m_player.account) {\n\t\tIOLoginData::removeVIPEntry(m_player.account->getID(), vipGuid);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b4b51b889dababebb5ded5ccc5938d5e0369c2209358e01152c948b6bc5fe81e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 75, + "startColumn": 63, + "charOffset": 2069, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 73, + "startColumn": 63, + "charOffset": 1918, + "charLength": 3, + "snippet": { + "text": "\nbool PlayerVIP::add(uint32_t vipGuid, const std::string &vipName, VipStatus_t status) {\n\tif (vipGuids.size() >= getMaxEntries() || vipGuids.size() == 200) { // max number of buddies is 200 in 9.53\n\t\tm_player.sendTextMessage(MESSAGE_FAILURE, \"You cannot add more buddies.\");\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0305f6617b61124ddc7c39613d50bf56e4f130ed89a8ab5415b2f022ec017731" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 97, + "startColumn": 63, + "charOffset": 2689, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 95, + "startColumn": 63, + "charOffset": 2578, + "charLength": 3, + "snippet": { + "text": "\nbool PlayerVIP::addInternal(uint32_t vipGuid) {\n\tif (vipGuids.size() >= getMaxEntries() || vipGuids.size() == 200) { // max number of buddies is 200 in 9.53\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9320b34ef14df2cf862bf6f368db1a67498bd9ae03a269274bf15a38640ae0c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'groupsId' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 104, + "startColumn": 121, + "charOffset": 2920, + "charLength": 8, + "snippet": { + "text": "groupsId" + } + }, + "contextRegion": { + "startLine": 102, + "startColumn": 121, + "charOffset": 2797, + "charLength": 8, + "snippet": { + "text": "}\n\nbool PlayerVIP::edit(uint32_t vipGuid, const std::string &description, uint32_t icon, bool notify, std::vector groupsId) const {\n\tconst auto it = vipGuids.find(vipGuid);\n\tif (it == vipGuids.end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b68ee39dee0aebb4fba0e5486720f3abe3f61839656affc6f52526a355f8eb9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 116, + "startColumn": 2, + "charOffset": 3250, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 114, + "startColumn": 2, + "charOffset": 3173, + "charLength": 3, + "snippet": { + "text": "\tIOLoginData::removeGuidVIPGroupEntry(m_player.account->getID(), vipGuid);\n\n\tfor (const auto groupId : groupsId) {\n\t\tconst auto &group = getGroupByID(groupId);\n\t\tif (group) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6eb10c63cb9737dc63df7f2d8e44edb66dea4feae3c9edfdf0e024f6d6d1f5f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 119, + "startColumn": 25, + "charOffset": 3372, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 117, + "startColumn": 25, + "charOffset": 3288, + "charLength": 6, + "snippet": { + "text": "\t\tconst auto &group = getGroupByID(groupId);\n\t\tif (group) {\n\t\t\tgroup->vipGroupGuids.insert(vipGuid);\n\t\t\tIOLoginData::addGuidVIPGroupEntry(group->id, m_player.account->getID(), vipGuid);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afb29611b5a273d8f53c970b2a23ebf847cafde5e748890fd3eb71cfbf5a9ed8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'vipGroup' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 128, + "startColumn": 103, + "charOffset": 3676, + "charLength": 8, + "snippet": { + "text": "vipGroup" + } + }, + "contextRegion": { + "startLine": 126, + "startColumn": 103, + "charOffset": 3498, + "charLength": 8, + "snippet": { + "text": "\nstd::shared_ptr PlayerVIP::getGroupByID(uint8_t groupId) const {\n\tauto it = std::find_if(vipGroups.begin(), vipGroups.end(), [groupId](const std::shared_ptr vipGroup) {\n\t\treturn vipGroup->id == groupId;\n\t});" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95373bef786aade81abfbc5849d415b33863a22c016985c459044ce8dc0df084" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto groupName' can be declared as 'const auto *const groupName'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 136, + "startColumn": 2, + "charOffset": 3864, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 2, + "charOffset": 3777, + "charLength": 5, + "snippet": { + "text": "\nstd::shared_ptr PlayerVIP::getGroupByName(const std::string &name) const {\n\tconst auto groupName = name.c_str();\n\tauto it = std::find_if(vipGroups.begin(), vipGroups.end(), [groupName](const std::shared_ptr vipGroup) {\n\t\treturn strcmp(groupName, vipGroup->name.c_str()) == 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9410f250b14d39256b5e3eca80cbf442048158b8fe3b3acf79673c59d0cce828" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'vipGroup' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 137, + "startColumn": 105, + "charOffset": 4005, + "charLength": 8, + "snippet": { + "text": "vipGroup" + } + }, + "contextRegion": { + "startLine": 135, + "startColumn": 105, + "charOffset": 3778, + "charLength": 8, + "snippet": { + "text": "std::shared_ptr PlayerVIP::getGroupByName(const std::string &name) const {\n\tconst auto groupName = name.c_str();\n\tauto it = std::find_if(vipGroups.begin(), vipGroups.end(), [groupName](const std::shared_ptr vipGroup) {\n\t\treturn strcmp(groupName, vipGroup->name.c_str()) == 0;\n\t});" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53a9db32506165981f2fd1def0c87324337c080333ef6a7cdea5018a225f8831" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-unused-parameters", + "ruleIndex": 612, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'groupId' is unused" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 144, + "startColumn": 42, + "charOffset": 4171, + "charLength": 7, + "snippet": { + "text": "groupId" + } + }, + "contextRegion": { + "startLine": 142, + "startColumn": 42, + "charOffset": 4127, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid PlayerVIP::addGroupInternal(uint8_t groupId, const std::string &name, bool customizable) {\n\tif (getGroupByName(name) != nullptr) {\n\t\tg_logger().debug(\"{} - Group name already exists.\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08a945f067b6b6fc6854fd4a10185c5bea9bdf80ed2c24e93b4d1f11d86e1f33" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 156, + "startColumn": 12, + "charOffset": 4487, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 154, + "startColumn": 12, + "charOffset": 4472, + "charLength": 12, + "snippet": { + "text": "\t}\n\n\tvipGroups.emplace_back(std::make_shared(freeId, name, customizable));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3fb63bdb4ae1bf00c2f70b5839fa9cfeedddcf5b4ca78516a578b81ae5b9d37f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'vipGroup' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 160, + "startColumn": 103, + "charOffset": 4709, + "charLength": 8, + "snippet": { + "text": "vipGroup" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 103, + "charOffset": 4559, + "charLength": 8, + "snippet": { + "text": "\nvoid PlayerVIP::removeGroup(uint8_t groupId) {\n\tauto it = std::find_if(vipGroups.begin(), vipGroups.end(), [groupId](const std::shared_ptr vipGroup) {\n\t\treturn vipGroup->id == groupId;\n\t});" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e1e972322d04d044b0bda17470b7a770429f5e99922175896cb08d13b5727a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 168, + "startColumn": 12, + "charOffset": 4816, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 166, + "startColumn": 12, + "charOffset": 4801, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tvipGroups.erase(it);\n\n\tif (m_player.account) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ebb8e9324b018a67e5d68c4e92992444464309dc167aa2ed81aa9b9ea825cd4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 192, + "startColumn": 12, + "charOffset": 5463, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 190, + "startColumn": 12, + "charOffset": 5357, + "charLength": 12, + "snippet": { + "text": "\n\tstd::shared_ptr vipGroup = std::make_shared(freeId, name, customizable);\n\tvipGroups.emplace_back(vipGroup);\n\n\tif (m_player.account) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b0c4a2c8ac1e8e11b2cbb7e1ef3df7b141bfbb68c47869475bb7a2a62acebc9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 223, + "startColumn": 2, + "charOffset": 6322, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 221, + "startColumn": 2, + "charOffset": 6281, + "charLength": 3, + "snippet": { + "text": "\nuint8_t PlayerVIP::getFreeId() const {\n\tfor (uint8_t i = firstID; i <= lastID; ++i) {\n\t\tif (getGroupByID(i) == nullptr) {\n\t\t\treturn i;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6eb10c63cb9737dc63df7f2d8e44edb66dea4feae3c9edfdf0e024f6d6d1f5f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'i' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 223, + "startColumn": 28, + "charOffset": 6348, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 221, + "startColumn": 28, + "charOffset": 6281, + "charLength": 1, + "snippet": { + "text": "\nuint8_t PlayerVIP::getFreeId() const {\n\tfor (uint8_t i = firstID; i <= lastID; ++i) {\n\t\tif (getGroupByID(i) == nullptr) {\n\t\t\treturn i;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3f116948e01da21dece5c8e7ea9f6f2d1b74041f78b9e3703dc3c230c090ffe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-const-return-type", + "ruleIndex": 692, + "kind": "fail", + "level": "warning", + "message": { + "text": "return type 'const std::vector' (aka 'const vector') is 'const'-qualified at the top level, which may reduce code readability without improving const correctness" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 232, + "startColumn": 1, + "charOffset": 6439, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 230, + "startColumn": 1, + "charOffset": 6436, + "charLength": 5, + "snippet": { + "text": "}\n\nconst std::vector PlayerVIP::getGroupsIdGuidBelongs(uint32_t guid) {\n\tstd::vector guidBelongs;\n\tfor (const auto &vipGroup : vipGroups) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c86828ba7850bc1f8630e6f6329c02d99c0cab8d00cb54a85cd3fb10264c126b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 234, + "startColumn": 2, + "charOffset": 6553, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 232, + "startColumn": 2, + "charOffset": 6439, + "charLength": 3, + "snippet": { + "text": "const std::vector PlayerVIP::getGroupsIdGuidBelongs(uint32_t guid) {\n\tstd::vector guidBelongs;\n\tfor (const auto &vipGroup : vipGroups) {\n\t\tif (vipGroup->vipGroupGuids.contains(guid)) {\n\t\t\tguidBelongs.emplace_back(vipGroup->id);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52c6dfba6a21f79fd0d8d47f7686725635509dcc2dcdc95447f13be8215d289c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 236, + "startColumn": 16, + "charOffset": 6657, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 234, + "startColumn": 16, + "charOffset": 6552, + "charLength": 12, + "snippet": { + "text": "\tfor (const auto &vipGroup : vipGroups) {\n\t\tif (vipGroup->vipGroupGuids.contains(guid)) {\n\t\t\tguidBelongs.emplace_back(vipGroup->id);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e2d8e74aaf1b30579194823255e13fe3c3670c63790902aa830d2ca6ad56430" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-make-member-function-const", + "ruleIndex": 708, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'addGuidToGroupInternal' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 17, + "charOffset": 6732, + "charLength": 22, + "snippet": { + "text": "addGuidToGroupInternal" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 17, + "charOffset": 6713, + "charLength": 22, + "snippet": { + "text": "}\n\nvoid PlayerVIP::addGuidToGroupInternal(uint8_t groupId, uint32_t guid) {\n\tconst auto &group = getGroupByID(groupId);\n\tif (group) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c2297bcad5baec04ac5967524ec4518d4a05cf89adec8e769ede021cbc76d55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'addGuidToGroupInternal' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 40, + "charOffset": 6755, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 40, + "charOffset": 6713, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid PlayerVIP::addGuidToGroupInternal(uint8_t groupId, uint32_t guid) {\n\tconst auto &group = getGroupByID(groupId);\n\tif (group) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59c26d8d8e611a7375bcee598f4220a8a6584762b95b788526cd7a6741950dc4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/vip/player_vip.cpp" + }, + "region": { + "startLine": 245, + "startColumn": 24, + "charOffset": 6870, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 243, + "startColumn": 24, + "charOffset": 6789, + "charLength": 6, + "snippet": { + "text": "\tconst auto &group = getGroupByID(groupId);\n\tif (group) {\n\t\tgroup->vipGroupGuids.insert(guid);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9d58a6fb0aac52bb65d07a2f081d47e6f19cc842afcecaeb2a82a7391157130" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 6, + "charOffset": 1298, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 6, + "charOffset": 1225, + "charLength": 1, + "snippet": { + "text": "\t// connection handle initialization\n\thandle = mysql_init(nullptr);\n\tif (!handle) {\n\t\tg_logger().error(\"Failed to initialize MySQL connection handle.\");\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38539c3165aac5c4b6732965fa4de754686cc93e9acc483602bce3d2b2888df4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'MYSQL *' (aka 'st_mysql *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 7, + "charOffset": 1299, + "charLength": 6, + "snippet": { + "text": "handle" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 7, + "charOffset": 1225, + "charLength": 6, + "snippet": { + "text": "\t// connection handle initialization\n\thandle = mysql_init(nullptr);\n\tif (!handle) {\n\t\tg_logger().error(\"Failed to initialize MySQL connection handle.\");\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c3bd04c8a94aaf5dca50a6e04d7535d5b389ee8715294dbd43dabacb4c9a30b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 2, + "charOffset": 1625, + "charLength": 13, + "snippet": { + "text": "mysql_options" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 2, + "charOffset": 1576, + "charLength": 13, + "snippet": { + "text": "\t// automatic reconnect\n\tbool reconnect = true;\n\tmysql_options(handle, MYSQL_OPT_RECONNECT, &reconnect);\n\n\t// connects to database" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc2b37a03ac161c9bf6271d29b18e273f842fda0a90520e257a114114f39140d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 48, + "startColumn": 6, + "charOffset": 1712, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 6, + "charOffset": 1681, + "charLength": 1, + "snippet": { + "text": "\n\t// connects to database\n\tif (!mysql_real_connect(handle, host->c_str(), user->c_str(), password->c_str(), database->c_str(), port, sock->c_str(), 0)) {\n\t\tg_logger().error(\"MySQL Error Message: {}\", mysql_error(handle));\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "630ac8891901255d897e7a70f1b3a93fa05c88ea1a8f47797f262cf9cbef7848" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'MYSQL *' (aka 'st_mysql *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 48, + "startColumn": 7, + "charOffset": 1713, + "charLength": 18, + "snippet": { + "text": "mysql_real_connect" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 7, + "charOffset": 1681, + "charLength": 18, + "snippet": { + "text": "\n\t// connects to database\n\tif (!mysql_real_connect(handle, host->c_str(), user->c_str(), password->c_str(), database->c_str(), port, sock->c_str(), 0)) {\n\t\tg_logger().error(\"MySQL Error Message: {}\", mysql_error(handle));\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47fa807c11421af765a92dca25274358dde135980696c9fa0404852d8929573f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 6, + "charOffset": 2321, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 6, + "charOffset": 2287, + "charLength": 1, + "snippet": { + "text": "\nbool Database::rollback() {\n\tif (!handle) {\n\t\tg_logger().error(\"Database not initialized!\");\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3280ad99909964868e5123f8f4cffae0e9ea79bf17f29b3f3f827e01a795a2f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'MYSQL *' (aka 'st_mysql *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 7, + "charOffset": 2322, + "charLength": 6, + "snippet": { + "text": "handle" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 7, + "charOffset": 2287, + "charLength": 6, + "snippet": { + "text": "\nbool Database::rollback() {\n\tif (!handle) {\n\t\tg_logger().error(\"Database not initialized!\");\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9c157331be431cd082a4e17f0d469b2a527ed374c9a296431647a2380000d58" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 88, + "startColumn": 6, + "charOffset": 2610, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 86, + "startColumn": 6, + "charOffset": 2578, + "charLength": 1, + "snippet": { + "text": "\nbool Database::commit() {\n\tif (!handle) {\n\t\tg_logger().error(\"Database not initialized!\");\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4538edf5b81c29f26794a45a60d1ffd1ffe654d3b9b6a3bb8d510a516042b1c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'MYSQL *' (aka 'st_mysql *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 88, + "startColumn": 7, + "charOffset": 2611, + "charLength": 6, + "snippet": { + "text": "handle" + } + }, + "contextRegion": { + "startLine": 86, + "startColumn": 7, + "charOffset": 2578, + "charLength": 6, + "snippet": { + "text": "\nbool Database::commit() {\n\tif (!handle) {\n\t\tg_logger().error(\"Database not initialized!\");\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1fa365cb41676b734476502fe60e0504442067182704f7ffe7967f350f051db5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'isRecoverableError' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 102, + "startColumn": 16, + "charOffset": 2880, + "charLength": 18, + "snippet": { + "text": "isRecoverableError" + } + }, + "contextRegion": { + "startLine": 100, + "startColumn": 16, + "charOffset": 2862, + "charLength": 18, + "snippet": { + "text": "}\n\nbool Database::isRecoverableError(unsigned int error) const {\n\treturn error == CR_SERVER_LOST || error == CR_SERVER_GONE_ERROR || error == CR_CONN_HOST_ERROR || error == 1053 /*ER_SERVER_SHUTDOWN*/ || error == CR_CONNECTION_ERROR;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38c722aa8f813b2b646ac3dbb3460e8710377d011f1ebbb683c331d9026a40ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 103, + "startColumn": 18, + "charOffset": 2944, + "charLength": 14, + "snippet": { + "text": "CR_SERVER_LOST" + } + }, + "contextRegion": { + "startLine": 101, + "startColumn": 18, + "charOffset": 2864, + "charLength": 14, + "snippet": { + "text": "\nbool Database::isRecoverableError(unsigned int error) const {\n\treturn error == CR_SERVER_LOST || error == CR_SERVER_GONE_ERROR || error == CR_CONN_HOST_ERROR || error == 1053 /*ER_SERVER_SHUTDOWN*/ || error == CR_CONNECTION_ERROR;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0031aeab162e4ea6b21847fcd401adab144ff0855803e2c6ccb46662750f3d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1053 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 103, + "startColumn": 109, + "charOffset": 3035, + "charLength": 4, + "snippet": { + "text": "1053" + } + }, + "contextRegion": { + "startLine": 101, + "startColumn": 109, + "charOffset": 2864, + "charLength": 4, + "snippet": { + "text": "\nbool Database::isRecoverableError(unsigned int error) const {\n\treturn error == CR_SERVER_LOST || error == CR_SERVER_GONE_ERROR || error == CR_CONN_HOST_ERROR || error == 1053 /*ER_SERVER_SHUTDOWN*/ || error == CR_CONNECTION_ERROR;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d68f919c4fea37f20451e6da3782baed361481924c53a7b494ed4a05b95f3582" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 107, + "startColumn": 2, + "charOffset": 3172, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 105, + "startColumn": 2, + "charOffset": 3098, + "charLength": 5, + "snippet": { + "text": "\nbool Database::retryQuery(const std::string_view &query, int retries) {\n\twhile (retries > 0 && mysql_query(handle, query.data()) != 0) {\n\t\tg_logger().error(\"Query: {}\", query.substr(0, 256));\n\t\tg_logger().error(\"MySQL error [{}]: {}\", mysql_errno(handle), mysql_error(handle));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00b56fe9d296e763e3554e135b44176eb984a1cb78918e75fe3b2773da487ce0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "256 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 108, + "startColumn": 49, + "charOffset": 3284, + "charLength": 3, + "snippet": { + "text": "256" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 49, + "charOffset": 3099, + "charLength": 3, + "snippet": { + "text": "bool Database::retryQuery(const std::string_view &query, int retries) {\n\twhile (retries > 0 && mysql_query(handle, query.data()) != 0) {\n\t\tg_logger().error(\"Query: {}\", query.substr(0, 256));\n\t\tg_logger().error(\"MySQL error [{}]: {}\", mysql_errno(handle), mysql_error(handle));\n\t\tif (!isRecoverableError(mysql_errno(handle))) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29e9c9e424aba639b55269fb76115ad7cfdd1e025f31be179734a17bd69ab1f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 117, + "startColumn": 64, + "charOffset": 3604, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 115, + "startColumn": 64, + "charOffset": 3517, + "charLength": 2, + "snippet": { + "text": "\t}\n\tif (retries == 0) {\n\t\tg_logger().error(\"Query {} failed after {} retries.\", query, 10);\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f22f0c49d3d2965bf93246716655357921f7f9195ede56a8f0125e900244990b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 125, + "startColumn": 6, + "charOffset": 3712, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 123, + "startColumn": 6, + "charOffset": 3645, + "charLength": 1, + "snippet": { + "text": "\nbool Database::executeQuery(const std::string_view &query) {\n\tif (!handle) {\n\t\tg_logger().error(\"Database not initialized!\");\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "554b330b2006350ea6a0a29f2a5defa63802e3cecf276ab0b8e3c5bab9c1cad6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'MYSQL *' (aka 'st_mysql *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 125, + "startColumn": 7, + "charOffset": 3713, + "charLength": 6, + "snippet": { + "text": "handle" + } + }, + "contextRegion": { + "startLine": 123, + "startColumn": 7, + "charOffset": 3645, + "charLength": 6, + "snippet": { + "text": "\nbool Database::executeQuery(const std::string_view &query) {\n\tif (!handle) {\n\t\tg_logger().error(\"Database not initialized!\");\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c187b394d2605253649bd3d2169477b054455e54249214330ff9e5af7fd07869" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 136, + "startColumn": 49, + "charOffset": 4001, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 49, + "charOffset": 3931, + "charLength": 2, + "snippet": { + "text": "\tmeasureLock.stop();\n\n\tmetrics::query_latency measure(query.substr(0, 50));\n\tbool success = retryQuery(query, 10);\n\tmysql_free_result(mysql_store_result(handle));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a6b9c55bf93279418138e3e0b1f522de8ed816df9ba6be724406cc4805c77cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 137, + "startColumn": 35, + "charOffset": 4041, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 135, + "startColumn": 35, + "charOffset": 3952, + "charLength": 2, + "snippet": { + "text": "\n\tmetrics::query_latency measure(query.substr(0, 50));\n\tbool success = retryQuery(query, 10);\n\tmysql_free_result(mysql_store_result(handle));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27850005d1c670461176b527a96e4d9ac0808f641c470dc5e6f291c0135d051a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 144, + "startColumn": 6, + "charOffset": 4187, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 142, + "startColumn": 6, + "charOffset": 4114, + "charLength": 1, + "snippet": { + "text": "\nDBResult_ptr Database::storeQuery(const std::string_view &query) {\n\tif (!handle) {\n\t\tg_logger().error(\"Database not initialized!\");\n\t\treturn nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f96ab5358a4e229959102ea8070b029921b3d05f45385d892a0e63c84f78d38c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'MYSQL *' (aka 'st_mysql *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 144, + "startColumn": 7, + "charOffset": 4188, + "charLength": 6, + "snippet": { + "text": "handle" + } + }, + "contextRegion": { + "startLine": 142, + "startColumn": 7, + "charOffset": 4114, + "charLength": 6, + "snippet": { + "text": "\nDBResult_ptr Database::storeQuery(const std::string_view &query) {\n\tif (!handle) {\n\t\tg_logger().error(\"Database not initialized!\");\n\t\treturn nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fdeb8fa93cb5a2593f594b6d29dab041e073d4e8d0bbeeb9efa313ff2b34a5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 154, + "startColumn": 49, + "charOffset": 4475, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 49, + "charOffset": 4405, + "charLength": 2, + "snippet": { + "text": "\tmeasureLock.stop();\n\n\tmetrics::query_latency measure(query.substr(0, 50));\nretry:\n\tif (mysql_query(handle, query.data()) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ffc1b272252ec468c6b870ec9cb7f4f6f0ccf633155502b7a614ef12114c1763" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-6-2", + "ruleIndex": 460, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-6-2: The goto statement shall jump to a label declared later in the same function body" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 163, + "startColumn": 3, + "charOffset": 4762, + "charLength": 4, + "snippet": { + "text": "goto" + } + }, + "contextRegion": { + "startLine": 161, + "startColumn": 3, + "charOffset": 4700, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t\tstd::this_thread::sleep_for(std::chrono::seconds(1));\n\t\tgoto retry;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31877496bb102e9b57a637385634f90f8076731102b19dff5373b441462407c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-goto", + "ruleIndex": 484, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid using 'goto' for flow control" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 163, + "startColumn": 3, + "charOffset": 4762, + "charLength": 4, + "snippet": { + "text": "goto" + } + }, + "contextRegion": { + "startLine": 161, + "startColumn": 3, + "charOffset": 4700, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t\tstd::this_thread::sleep_for(std::chrono::seconds(1));\n\t\tgoto retry;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfe7bd790c53406b332a388724541376504c54f43436185c9a0cbbc356219f4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-container-data-pointer", + "ruleIndex": 694, + "kind": "fail", + "level": "warning", + "message": { + "text": "'data' should be used for accessing the data pointer instead of taking the address of the 0-th element" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 197, + "startColumn": 59, + "charOffset": 5633, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 195, + "startColumn": 59, + "charOffset": 5516, + "charLength": 1, + "snippet": { + "text": "\tif (length != 0) {\n\t\tstd::string output(maxLength, '\\0');\n\t\tsize_t escapedLength = mysql_real_escape_string(handle, &output[0], s, length);\n\t\toutput.resize(escapedLength);\n\t\tescaped.append(output);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3af6f296e72f7fb22187c756c236e8808ba33850246141a9477480fcd3215783" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 199, + "startColumn": 11, + "charOffset": 5699, + "charLength": 6, + "snippet": { + "text": "append" + } + }, + "contextRegion": { + "startLine": 197, + "startColumn": 11, + "charOffset": 5575, + "charLength": 6, + "snippet": { + "text": "\t\tsize_t escapedLength = mysql_real_escape_string(handle, &output[0], s, length);\n\t\toutput.resize(escapedLength);\n\t\tescaped.append(output);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d13fb13e4b3b8b11b713dcef382594a1aee15cc202ee50f4b23c2a516786aed1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-prefer-member-initializer", + "ruleIndex": 504, + "kind": "fail", + "level": "warning", + "message": { + "text": "'handle' should be initialized in a member initializer of the constructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 207, + "startColumn": 2, + "charOffset": 5803, + "charLength": 6, + "snippet": { + "text": "handle" + } + }, + "contextRegion": { + "startLine": 205, + "startColumn": 2, + "charOffset": 5764, + "charLength": 6, + "snippet": { + "text": "\nDBResult::DBResult(MYSQL_RES* res) {\n\thandle = res;\n\n\tint num_fields = mysql_num_fields(handle);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3f3f5451c1e26dc39100f7e2eb2f3440bbe6d1f9e077d41ebf2ea3e9669fd73" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 209, + "startColumn": 19, + "charOffset": 5836, + "charLength": 16, + "snippet": { + "text": "mysql_num_fields" + } + }, + "contextRegion": { + "startLine": 207, + "startColumn": 19, + "charOffset": 5802, + "charLength": 16, + "snippet": { + "text": "\thandle = res;\n\n\tint num_fields = mysql_num_fields(handle);\n\n\tconst MYSQL_FIELD* fields = mysql_fetch_fields(handle);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4310bbb66a8141c1a12043e366ef6eb66a26e70d33d5c8d8262d1415e4cac455" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 212, + "startColumn": 2, + "charOffset": 5921, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 210, + "startColumn": 2, + "charOffset": 5862, + "charLength": 3, + "snippet": { + "text": "\n\tconst MYSQL_FIELD* fields = mysql_fetch_fields(handle);\n\tfor (size_t i = 0; i < num_fields; i++) {\n\t\tlistNames[fields[i].name] = i;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50cde4b0dc0721fb3a4044d1dcc10e7e196d99b73b49f038bb8d9126cbca3d98" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'num_fields' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 212, + "startColumn": 21, + "charOffset": 5940, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 210, + "startColumn": 21, + "charOffset": 5862, + "charLength": 1, + "snippet": { + "text": "\n\tconst MYSQL_FIELD* fields = mysql_fetch_fields(handle);\n\tfor (size_t i = 0; i < num_fields; i++) {\n\t\tlistNames[fields[i].name] = i;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5e7c54807dfe76f970f5e3cc92db6dafa4cca46797a95458d395bef70458f99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 213, + "startColumn": 13, + "charOffset": 5975, + "charLength": 6, + "snippet": { + "text": "fields" + } + }, + "contextRegion": { + "startLine": 211, + "startColumn": 13, + "charOffset": 5863, + "charLength": 6, + "snippet": { + "text": "\tconst MYSQL_FIELD* fields = mysql_fetch_fields(handle);\n\tfor (size_t i = 0; i < num_fields; i++) {\n\t\tlistNames[fields[i].name] = i;\n\t}\n\trow = mysql_fetch_row(handle);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1cdd3f718ceff64cbc1bd7366330880b8134a0f36e32d8ce0f165b6dbabaca6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-return-braced-init-list", + "ruleIndex": 630, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 10, + "charOffset": 6287, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 10, + "charOffset": 6181, + "charLength": 3, + "snippet": { + "text": "\tif (it == listNames.end()) {\n\t\tg_logger().error(\"Column '{}' does not exist in result set\", s);\n\t\treturn std::string();\n\t}\n\tif (row[it->second] == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbfd61cd4d5b06157caeff70da97f2e07650ef32fade9a601df583012bc87c46" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-return-braced-init-list", + "ruleIndex": 630, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 229, + "startColumn": 10, + "charOffset": 6349, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 227, + "startColumn": 10, + "charOffset": 6302, + "charLength": 3, + "snippet": { + "text": "\t}\n\tif (row[it->second] == nullptr) {\n\t\treturn std::string();\n\t}\n\treturn std::string(row[it->second]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ff57c9ac5c3dab301acee24a66d29903df2c91141c3ec47497ad5dc9b572fd4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-return-braced-init-list", + "ruleIndex": 630, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 231, + "startColumn": 9, + "charOffset": 6375, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 229, + "startColumn": 9, + "charOffset": 6340, + "charLength": 3, + "snippet": { + "text": "\t\treturn std::string();\n\t}\n\treturn std::string(row[it->second]);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40dbcd15c1d0ed91d827943acf304048e8db263616438e120d4fdb4459624faa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-runtime-int", + "ruleIndex": 546, + "kind": "fail", + "level": "warning", + "message": { + "text": "consider replacing 'unsigned long' with 'uint64'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 234, + "startColumn": 55, + "charOffset": 6462, + "charLength": 8, + "snippet": { + "text": "unsigned" + } + }, + "contextRegion": { + "startLine": 232, + "startColumn": 55, + "charOffset": 6405, + "charLength": 8, + "snippet": { + "text": "}\n\nconst char* DBResult::getStream(const std::string &s, unsigned long &size) const {\n\tauto it = listNames.find(s);\n\tif (it == listNames.end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62684f5ab78f4f055b27984c24e530c2dfd8d281b82bc512f2ffcdb48d7d447a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 247, + "startColumn": 9, + "charOffset": 6732, + "charLength": 19, + "snippet": { + "text": "mysql_fetch_lengths" + } + }, + "contextRegion": { + "startLine": 245, + "startColumn": 9, + "charOffset": 6720, + "charLength": 19, + "snippet": { + "text": "\t}\n\n\tsize = mysql_fetch_lengths(handle)[it->second];\n\treturn row[it->second];\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "831cd398f9167309f0363682dd4398901fb6a4a851dea20eb9ecf68eb209d01b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getU8FromString' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 251, + "startColumn": 19, + "charOffset": 6819, + "charLength": 15, + "snippet": { + "text": "getU8FromString" + } + }, + "contextRegion": { + "startLine": 249, + "startColumn": 19, + "charOffset": 6798, + "charLength": 15, + "snippet": { + "text": "}\n\nuint8_t DBResult::getU8FromString(const std::string &string, const std::string &function) const {\n\tauto result = static_cast(std::atoi(string.c_str()));\n\tif (result > std::numeric_limits::max()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "810a6410ff39455222b794ac2e1858315c8d553c2c1d2409b96920791cb6b647" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'getU8FromString' of similar type ('const std::string &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 251, + "startColumn": 35, + "charOffset": 6835, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 249, + "startColumn": 35, + "charOffset": 6798, + "charLength": 5, + "snippet": { + "text": "}\n\nuint8_t DBResult::getU8FromString(const std::string &string, const std::string &function) const {\n\tauto result = static_cast(std::atoi(string.c_str()));\n\tif (result > std::numeric_limits::max()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "423877abaa9f12c51261199d41fe36452deb0caa53c18abe4ea609daee301f25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err34-c", + "ruleIndex": 133, + "kind": "fail", + "level": "warning", + "message": { + "text": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 252, + "startColumn": 37, + "charOffset": 6935, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 250, + "startColumn": 37, + "charOffset": 6800, + "charLength": 3, + "snippet": { + "text": "\nuint8_t DBResult::getU8FromString(const std::string &string, const std::string &function) const {\n\tauto result = static_cast(std::atoi(string.c_str()));\n\tif (result > std::numeric_limits::max()) {\n\t\tg_logger().error(\"[{}] Failed to get number value {} for tier table result, on function call: {}\", __FUNCTION__, result, function);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "847e1ae957921089d81807d8110fb382f4c392adad0d953fb93628acec1f1617" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-2", + "ruleIndex": 408, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-2: The library functions atof, atoi and atol from library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 252, + "startColumn": 37, + "charOffset": 6935, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 250, + "startColumn": 37, + "charOffset": 6800, + "charLength": 3, + "snippet": { + "text": "\nuint8_t DBResult::getU8FromString(const std::string &string, const std::string &function) const {\n\tauto result = static_cast(std::atoi(string.c_str()));\n\tif (result > std::numeric_limits::max()) {\n\t\tg_logger().error(\"[{}] Failed to get number value {} for tier table result, on function call: {}\", __FUNCTION__, result, function);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7712ceb2d5e937fe08d4ac220d32029d486e5cc3c453b2543fe11112fb2c51eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getInt8FromString' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 261, + "startColumn": 18, + "charOffset": 7202, + "charLength": 17, + "snippet": { + "text": "getInt8FromString" + } + }, + "contextRegion": { + "startLine": 259, + "startColumn": 18, + "charOffset": 7182, + "charLength": 17, + "snippet": { + "text": "}\n\nint8_t DBResult::getInt8FromString(const std::string &string, const std::string &function) const {\n\tauto result = static_cast(std::atoi(string.c_str()));\n\tif (result > std::numeric_limits::max()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f33c4afb974531b6c57f2a24bd83b2f5344af37c7dd699c4ce761a4e9947d4e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'getInt8FromString' of similar type ('const std::string &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 261, + "startColumn": 36, + "charOffset": 7220, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 259, + "startColumn": 36, + "charOffset": 7182, + "charLength": 5, + "snippet": { + "text": "}\n\nint8_t DBResult::getInt8FromString(const std::string &string, const std::string &function) const {\n\tauto result = static_cast(std::atoi(string.c_str()));\n\tif (result > std::numeric_limits::max()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3642c950bbff7c85656e39e2d40539d65c881f6b6390a3afdc75dd43d7c4034" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err34-c", + "ruleIndex": 133, + "kind": "fail", + "level": "warning", + "message": { + "text": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 262, + "startColumn": 36, + "charOffset": 7319, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 260, + "startColumn": 36, + "charOffset": 7184, + "charLength": 3, + "snippet": { + "text": "\nint8_t DBResult::getInt8FromString(const std::string &string, const std::string &function) const {\n\tauto result = static_cast(std::atoi(string.c_str()));\n\tif (result > std::numeric_limits::max()) {\n\t\tg_logger().error(\"[{}] Failed to get number value {} for tier table result, on function call: {}\", __FUNCTION__, result, function);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e0b7baeb67d2d48faaafcf8c654171bd7ecf46b5e740e49c048c577550b240a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-2", + "ruleIndex": 408, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-2: The library functions atof, atoi and atol from library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 262, + "startColumn": 36, + "charOffset": 7319, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 260, + "startColumn": 36, + "charOffset": 7184, + "charLength": 3, + "snippet": { + "text": "\nint8_t DBResult::getInt8FromString(const std::string &string, const std::string &function) const {\n\tauto result = static_cast(std::atoi(string.c_str()));\n\tif (result > std::numeric_limits::max()) {\n\t\tg_logger().error(\"[{}] Failed to get number value {} for tier table result, on function call: {}\", __FUNCTION__, result, function);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "279e5be2a4522c33705d92b42ddcc9eb0201626ee2b5b90f1febacd0479c55e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 280, + "startColumn": 6, + "charOffset": 7753, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 278, + "startColumn": 6, + "charOffset": 7723, + "charLength": 1, + "snippet": { + "text": "\nbool DBResult::next() {\n\tif (!handle) {\n\t\tg_logger().error(\"Database not initialized!\");\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f6c67524eba028e2c307b1b8b9882adfad58f4029892ec6573fdd4717d6b79a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'MYSQL_RES *' (aka 'st_mysql_res *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 280, + "startColumn": 7, + "charOffset": 7754, + "charLength": 6, + "snippet": { + "text": "handle" + } + }, + "contextRegion": { + "startLine": 278, + "startColumn": 7, + "charOffset": 7723, + "charLength": 6, + "snippet": { + "text": "\nbool DBResult::next() {\n\tif (!handle) {\n\t\tg_logger().error(\"Database not initialized!\");\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa3729eb74002d846652c8507e1e4f4d63c46531e66f355fc45885afa7c9e3fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-prefer-member-initializer", + "ruleIndex": 504, + "kind": "fail", + "level": "warning", + "message": { + "text": "'length' should be initialized in a member initializer of the constructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 290, + "startColumn": 2, + "charOffset": 7971, + "charLength": 4, + "snippet": { + "text": "this" + } + }, + "contextRegion": { + "startLine": 288, + "startColumn": 2, + "charOffset": 7891, + "charLength": 4, + "snippet": { + "text": "DBInsert::DBInsert(std::string insertQuery) :\n\tquery(std::move(insertQuery)) {\n\tthis->length = this->query.length();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "322a9d1031537fdd18c1052dcaa63ec43db7424e492af7f45c8bafebca9fb428" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 305, + "startColumn": 10, + "charOffset": 8345, + "charLength": 6, + "snippet": { + "text": "append" + } + }, + "contextRegion": { + "startLine": 303, + "startColumn": 10, + "charOffset": 8278, + "charLength": 6, + "snippet": { + "text": "\t\tvalues.reserve(rowLength + 2);\n\t\tvalues.push_back('(');\n\t\tvalues.append(row);\n\t\tvalues.push_back(')');\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8137ba0f4b636c12dc5920586bae606cab2ff9b6dd8360392610f255b3e43ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 311, + "startColumn": 10, + "charOffset": 8503, + "charLength": 6, + "snippet": { + "text": "append" + } + }, + "contextRegion": { + "startLine": 309, + "startColumn": 10, + "charOffset": 8444, + "charLength": 6, + "snippet": { + "text": "\t\tvalues.push_back(',');\n\t\tvalues.push_back('(');\n\t\tvalues.append(row);\n\t\tvalues.push_back(')');\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "932d52531f5055bdf6d5c5ec49cd25e429f488e4df140c85c41c63b04a1ab52e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 338, + "startColumn": 3, + "charOffset": 9025, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 336, + "startColumn": 3, + "charOffset": 8941, + "charLength": 3, + "snippet": { + "text": "\t\tstd::ostringstream upsertStream;\n\t\tupsertStream << \" ON DUPLICATE KEY UPDATE \";\n\t\tfor (size_t i = 0; i < upsertColumns.size(); ++i) {\n\t\t\tupsertStream << \"`\" << upsertColumns[i] << \"` = VALUES(`\" << upsertColumns[i] << \"`)\";\n\t\t\tif (i < upsertColumns.size() - 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44f2536e01697b321e6f68c443ae5c996fdd88644d4d1ffc80f7dd04eecebaad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 348, + "startColumn": 2, + "charOffset": 9318, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 346, + "startColumn": 2, + "charOffset": 9280, + "charLength": 5, + "snippet": { + "text": "\n\tstd::string currentBatch = values;\n\twhile (!currentBatch.empty()) {\n\t\tsize_t cutPos = Database::MAX_QUERY_SIZE - baseQuery.size() - upsertQuery.size();\n\t\tif (cutPos < currentBatch.size()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b3951cc5923b9c94fb20d13dbcf0398adb9108b2375acda922031fb23656494" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'currentBatch' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/database.cpp" + }, + "region": { + "startLine": 348, + "startColumn": 9, + "charOffset": 9325, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 346, + "startColumn": 9, + "charOffset": 9280, + "charLength": 1, + "snippet": { + "text": "\n\tstd::string currentBatch = values;\n\twhile (!currentBatch.empty()) {\n\t\tsize_t cutPos = Database::MAX_QUERY_SIZE - baseQuery.size() - upsertQuery.size();\n\t\tif (cutPos < currentBatch.size()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5f9fbac08c01b305fb03f796962611639be55f9cb8127bffed4205046faa5bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasemanager.cpp" + }, + "region": { + "startLine": 23, + "startColumn": 6, + "charOffset": 920, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 21, + "startColumn": 6, + "charOffset": 674, + "charLength": 1, + "snippet": { + "text": "\tquery << \"SELECT `TABLE_NAME` FROM `information_schema`.`TABLES` WHERE `TABLE_SCHEMA` = \" << db.escapeString(g_configManager().getString(MYSQL_DB, __FUNCTION__)) << \" AND `DATA_FREE` > 0\";\n\tDBResult_ptr result = db.storeQuery(query.str());\n\tif (!result) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e42d98dc28308ada2e65038e392e50af142d3e5ffe490aa320ffe8fc06dead61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasemanager.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 2, + "charOffset": 952, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 2, + "charOffset": 947, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tdo {\n\t\tstd::string tableName = result->getString(\"TABLE_NAME\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc4f362d8e82023a3425a0f3276f7bef08f196ce5e1f1ec1a956ea756f24db82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasemanager.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 2, + "charOffset": 952, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 2, + "charOffset": 947, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tdo {\n\t\tstd::string tableName = result->getString(\"TABLE_NAME\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df89cfe7e8d1031339b7ce1bf645c7e81af05a0a97e363319ca8bf71e1bddf0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (do loop) is ID-dependent due to variable reference to 'result' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasemanager.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 11, + "charOffset": 1319, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 11, + "charOffset": 1236, + "charLength": 6, + "snippet": { + "text": "\n\t\tg_logger().info(\"Optimizing table {}... {}\", tableName, tableResult);\n\t} while (result->next());\n\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ba04b255a5a21a1f1e355972f6256e8fd7a667acd48ec0ac3d47fefae03bff1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasemanager.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 19, + "charOffset": 1327, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 19, + "charOffset": 1236, + "charLength": 4, + "snippet": { + "text": "\n\t\tg_logger().info(\"Optimizing table {}... {}\", tableName, tableResult);\n\t} while (result->next());\n\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62fe4033cc6c39d840d270a24e88cc97685aefc7e5c8db53db03f46c7d6c38a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasemanager.cpp" + }, + "region": { + "startLine": 64, + "startColumn": 6, + "charOffset": 2242, + "charLength": 12, + "snippet": { + "text": "executeQuery" + } + }, + "contextRegion": { + "startLine": 62, + "startColumn": 6, + "charOffset": 2157, + "charLength": 12, + "snippet": { + "text": "\tif (!tableExists(\"server_config\")) {\n\t\tDatabase &db = Database::getInstance();\n\t\tdb.executeQuery(\"CREATE TABLE `server_config` (`config` VARCHAR(50) NOT NULL, `value` VARCHAR(256) NOT NULL DEFAULT '', UNIQUE(`config`)) ENGINE = InnoDB\");\n\t\tdb.executeQuery(\"INSERT INTO `server_config` VALUES ('db_version', 0)\");\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "410bc43205cfb0acddcb50f25d0999fafc816e0b52ea34f515a918cafb959b12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasemanager.cpp" + }, + "region": { + "startLine": 65, + "startColumn": 6, + "charOffset": 2401, + "charLength": 12, + "snippet": { + "text": "executeQuery" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 6, + "charOffset": 2195, + "charLength": 12, + "snippet": { + "text": "\t\tDatabase &db = Database::getInstance();\n\t\tdb.executeQuery(\"CREATE TABLE `server_config` (`config` VARCHAR(50) NOT NULL, `value` VARCHAR(256) NOT NULL DEFAULT '', UNIQUE(`config`)) ENGINE = InnoDB\");\n\t\tdb.executeQuery(\"INSERT INTO `server_config` VALUES ('db_version', 0)\");\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8669fde34a772d4bc6edda8bd4a64e46756f85785eb2af7df8a0d34c7fe39306" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasemanager.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 6, + "charOffset": 2673, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 6, + "charOffset": 2594, + "charLength": 1, + "snippet": { + "text": "void DatabaseManager::updateDatabase() {\n\tlua_State* L = luaL_newstate();\n\tif (!L) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "907b358d7f1e6dc8a0508440f11429c9987f1e32ce3b34b440ab9d2429b16bfb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'lua_State *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasemanager.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 7, + "charOffset": 2674, + "charLength": 1, + "snippet": { + "text": "L" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 7, + "charOffset": 2594, + "charLength": 1, + "snippet": { + "text": "void DatabaseManager::updateDatabase() {\n\tlua_State* L = luaL_newstate();\n\tif (!L) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6ad50e2528559cbf562f6f75640be92f800c9158d751ca98e2796dd42d1251a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasemanager.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 2, + "charOffset": 2785, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 2, + "charOffset": 2742, + "charLength": 2, + "snippet": { + "text": "\n\tint32_t version = getDatabaseVersion();\n\tdo {\n\t\tstd::ostringstream ss;\n\t\tss << g_configManager().getString(DATA_DIRECTORY, __FUNCTION__) + \"/migrations/\" << version << \".lua\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3c8d6d1d7b04e66535bff72dc0b9878fc29f8c06cdf1926e525e7f085939963" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasemanager.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 2, + "charOffset": 2785, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 2, + "charOffset": 2742, + "charLength": 2, + "snippet": { + "text": "\n\tint32_t version = getDatabaseVersion();\n\tdo {\n\t\tstd::ostringstream ss;\n\t\tss << g_configManager().getString(DATA_DIRECTORY, __FUNCTION__) + \"/migrations/\" << version << \".lua\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21d9d9bab11822dcedbdadb8b6e8669aa471d959bb7f10a70817a63a00d2b235" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasemanager.cpp" + }, + "region": { + "startLine": 90, + "startColumn": 7, + "charOffset": 2926, + "charLength": 11, + "snippet": { + "text": "luaL_dofile" + } + }, + "contextRegion": { + "startLine": 88, + "startColumn": 7, + "charOffset": 2790, + "charLength": 11, + "snippet": { + "text": "\t\tstd::ostringstream ss;\n\t\tss << g_configManager().getString(DATA_DIRECTORY, __FUNCTION__) + \"/migrations/\" << version << \".lua\";\n\t\tif (luaL_dofile(L, ss.str().c_str()) != 0) {\n\t\t\tg_logger().error(\"DatabaseManager::updateDatabase - Version: {}\"\n\t\t\t \"] {}\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f569f47ecf3711c70578fea7c577600ac06619f0a3ecbcfc3ae7ed18ae21457" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasemanager.cpp" + }, + "region": { + "startLine": 90, + "startColumn": 7, + "charOffset": 2926, + "charLength": 11, + "snippet": { + "text": "luaL_dofile" + } + }, + "contextRegion": { + "startLine": 88, + "startColumn": 7, + "charOffset": 2790, + "charLength": 11, + "snippet": { + "text": "\t\tstd::ostringstream ss;\n\t\tss << g_configManager().getString(DATA_DIRECTORY, __FUNCTION__) + \"/migrations/\" << version << \".lua\";\n\t\tif (luaL_dofile(L, ss.str().c_str()) != 0) {\n\t\t\tg_logger().error(\"DatabaseManager::updateDatabase - Version: {}\"\n\t\t\t \"] {}\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53011b592f606f4ed1a424221590ff5d18069be5ada744e4b28f3616aa82d1c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-6-4", + "ruleIndex": 461, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-6-4: For any iteration statement there shall be no more than one break or goto statement used for loop termination" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasemanager.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 4, + "charOffset": 3181, + "charLength": 5, + "snippet": { + "text": "break" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 4, + "charOffset": 3128, + "charLength": 5, + "snippet": { + "text": "\n\t\tif (!LuaScriptInterface::reserveScriptEnv()) {\n\t\t\tbreak;\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24ecac794acd4bb6acc0b4506327f7aaa8734680424f7e5a3cccedf8a6877826" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-6-4", + "ruleIndex": 461, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-6-4: For any iteration statement there shall be no more than one break or goto statement used for loop termination" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasemanager.cpp" + }, + "region": { + "startLine": 105, + "startColumn": 4, + "charOffset": 3417, + "charLength": 5, + "snippet": { + "text": "break" + } + }, + "contextRegion": { + "startLine": 103, + "startColumn": 4, + "charOffset": 3269, + "charLength": 5, + "snippet": { + "text": "\t\t\tLuaScriptInterface::resetScriptEnv();\n\t\t\tg_logger().warn(\"[DatabaseManager::updateDatabase - Version: {}] {}\", version, lua_tostring(L, -1));\n\t\t\tbreak;\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "797d077b31eb3c3985bbe2a6aec066155bccea89278dd33d788dd27973f205fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-6-4", + "ruleIndex": 461, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-6-4: For any iteration statement there shall be no more than one break or goto statement used for loop termination" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasemanager.cpp" + }, + "region": { + "startLine": 110, + "startColumn": 4, + "charOffset": 3528, + "charLength": 5, + "snippet": { + "text": "break" + } + }, + "contextRegion": { + "startLine": 108, + "startColumn": 4, + "charOffset": 3429, + "charLength": 5, + "snippet": { + "text": "\t\tif (!LuaScriptInterface::getBoolean(L, -1, false)) {\n\t\t\tLuaScriptInterface::resetScriptEnv();\n\t\t\tbreak;\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4ac810e4325b6237dd89994a5cae3ce149fa0f5fd3fa43c091a560b708f98c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Condition is always true" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasemanager.cpp" + }, + "region": { + "startLine": 118, + "startColumn": 11, + "charOffset": 3724, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 116, + "startColumn": 11, + "charOffset": 3673, + "charLength": 4, + "snippet": { + "text": "\n\t\tLuaScriptInterface::resetScriptEnv();\n\t} while (true);\n\tlua_close(L);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d52054fd51c4e0e13bab600e86cb87502b7cae2d0f785016999d3a6645c823b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasemanager.cpp" + }, + "region": { + "startLine": 128, + "startColumn": 6, + "charOffset": 4053, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 126, + "startColumn": 6, + "charOffset": 3996, + "charLength": 1, + "snippet": { + "text": "\n\tDBResult_ptr result = db.storeQuery(query.str());\n\tif (!result) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7b20d57f70a2937e6a57dd6f6dcfce8e439100eed45fa53e576df10a77576a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'tmp' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasemanager.cpp" + }, + "region": { + "startLine": 140, + "startColumn": 10, + "charOffset": 4314, + "charLength": 3, + "snippet": { + "text": "tmp" + } + }, + "contextRegion": { + "startLine": 138, + "startColumn": 10, + "charOffset": 4277, + "charLength": 3, + "snippet": { + "text": "\tstd::ostringstream query;\n\n\tint32_t tmp;\n\n\tif (!getDatabaseConfig(config, tmp)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f118475466ee3ac82783332e3f2eb0f8f1d21a068057915d1570129b2f62487e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasemanager.cpp" + }, + "region": { + "startLine": 148, + "startColumn": 5, + "charOffset": 4596, + "charLength": 12, + "snippet": { + "text": "executeQuery" + } + }, + "contextRegion": { + "startLine": 146, + "startColumn": 5, + "charOffset": 4588, + "charLength": 12, + "snippet": { + "text": "\t}\n\n\tdb.executeQuery(query.str());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79bde9108d752906dc81ffc85d90c4cf725f1e7b0d7b3c723015f07504e64349" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'callback' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasetasks.cpp" + }, + "region": { + "startLine": 25, + "startColumn": 95, + "charOffset": 824, + "charLength": 8, + "snippet": { + "text": "callback" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 95, + "charOffset": 727, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid DatabaseTasks::execute(const std::string &query, std::function callback /* nullptr */) {\n\tthreadPool.detach_task([this, query, callback]() {\n\t\tbool success = db.executeQuery(query);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ecc9f56bd0a3aad739f89c3ab589cfa5507f219545343623f4ac6c6eb1dab5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'callback' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/database/databasetasks.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 93, + "charOffset": 1185, + "charLength": 8, + "snippet": { + "text": "callback" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 93, + "charOffset": 1090, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid DatabaseTasks::store(const std::string &query, std::function callback /* nullptr */) {\n\tthreadPool.detach_task([this, query, callback]() {\n\t\tDBResult_ptr result = db.storeQuery(query);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36ffc729b64c48f8584f07c2659b0fb9fa52a6974baefe04544f7a09be55ac01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'init' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 25, + "startColumn": 18, + "charOffset": 796, + "charLength": 4, + "snippet": { + "text": "init" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 18, + "charOffset": 741, + "charLength": 4, + "snippet": { + "text": "GameReload::~GameReload() = default;\n\nbool GameReload::init(Reload_t reloadTypes) {\n\tswitch (reloadTypes) {\n\t\tcase Reload_t::RELOAD_TYPE_ALL:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a3de079d4046813f53d34b8e6ede35735091dac7cf88749ec8d18024e17956d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 3, + "charOffset": 851, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 3, + "charOffset": 779, + "charLength": 4, + "snippet": { + "text": "bool GameReload::init(Reload_t reloadTypes) {\n\tswitch (reloadTypes) {\n\t\tcase Reload_t::RELOAD_TYPE_ALL:\n\t\t\treturn reloadAll();\n\t\tcase Reload_t::RELOAD_TYPE_CHAT:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fdb4b310d389eb9be376c2eb3c3532de01cc5b8f90095daee3412f20e982ab2b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 29, + "startColumn": 3, + "charOffset": 908, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 27, + "startColumn": 3, + "charOffset": 849, + "charLength": 4, + "snippet": { + "text": "\t\tcase Reload_t::RELOAD_TYPE_ALL:\n\t\t\treturn reloadAll();\n\t\tcase Reload_t::RELOAD_TYPE_CHAT:\n\t\t\treturn reloadChat();\n\t\tcase Reload_t::RELOAD_TYPE_CONFIG:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3668e054ddc3867bd9080a07c5ec0ab299022bc1357cc7f45921621237289d23" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 31, + "startColumn": 3, + "charOffset": 967, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 29, + "startColumn": 3, + "charOffset": 906, + "charLength": 4, + "snippet": { + "text": "\t\tcase Reload_t::RELOAD_TYPE_CHAT:\n\t\t\treturn reloadChat();\n\t\tcase Reload_t::RELOAD_TYPE_CONFIG:\n\t\t\treturn reloadConfig();\n\t\tcase Reload_t::RELOAD_TYPE_EVENTS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67b5e92f1c57581d5440b143460dadde2a1ff7b3c9f88f5a49827db68a437e7b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 3, + "charOffset": 1030, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 3, + "charOffset": 965, + "charLength": 4, + "snippet": { + "text": "\t\tcase Reload_t::RELOAD_TYPE_CONFIG:\n\t\t\treturn reloadConfig();\n\t\tcase Reload_t::RELOAD_TYPE_EVENTS:\n\t\t\treturn reloadEvents();\n\t\tcase Reload_t::RELOAD_TYPE_MODULES:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "054d0080ec6db95961bac75ef462827c015e534b34329a9b2fea673c844f42d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 35, + "startColumn": 3, + "charOffset": 1093, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 33, + "startColumn": 3, + "charOffset": 1028, + "charLength": 4, + "snippet": { + "text": "\t\tcase Reload_t::RELOAD_TYPE_EVENTS:\n\t\t\treturn reloadEvents();\n\t\tcase Reload_t::RELOAD_TYPE_MODULES:\n\t\t\treturn reloadModules();\n\t\tcase Reload_t::RELOAD_TYPE_OUTFITS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c2d2466a8dada973c941433ab355c12626a28cfd89961e4801d132981125ecf8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 37, + "startColumn": 3, + "charOffset": 1158, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 35, + "startColumn": 3, + "charOffset": 1091, + "charLength": 4, + "snippet": { + "text": "\t\tcase Reload_t::RELOAD_TYPE_MODULES:\n\t\t\treturn reloadModules();\n\t\tcase Reload_t::RELOAD_TYPE_OUTFITS:\n\t\t\treturn reloadOutfits();\n\t\tcase Reload_t::RELOAD_TYPE_MOUNTS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c783f83ca29e42b787d5e6a1fe364056743430161c37cf065430e34f1776441" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 39, + "startColumn": 3, + "charOffset": 1223, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 37, + "startColumn": 3, + "charOffset": 1156, + "charLength": 4, + "snippet": { + "text": "\t\tcase Reload_t::RELOAD_TYPE_OUTFITS:\n\t\t\treturn reloadOutfits();\n\t\tcase Reload_t::RELOAD_TYPE_MOUNTS:\n\t\t\treturn reloadMounts();\n\t\tcase Reload_t::RELOAD_TYPE_FAMILIARS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67b5e92f1c57581d5440b143460dadde2a1ff7b3c9f88f5a49827db68a437e7b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 3, + "charOffset": 1286, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 3, + "charOffset": 1221, + "charLength": 4, + "snippet": { + "text": "\t\tcase Reload_t::RELOAD_TYPE_MOUNTS:\n\t\t\treturn reloadMounts();\n\t\tcase Reload_t::RELOAD_TYPE_FAMILIARS:\n\t\t\treturn reloadFamiliars();\n\t\tcase Reload_t::RELOAD_TYPE_IMBUEMENTS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "054d0080ec6db95961bac75ef462827c015e534b34329a9b2fea673c844f42d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 3, + "charOffset": 1355, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 3, + "charOffset": 1284, + "charLength": 4, + "snippet": { + "text": "\t\tcase Reload_t::RELOAD_TYPE_FAMILIARS:\n\t\t\treturn reloadFamiliars();\n\t\tcase Reload_t::RELOAD_TYPE_IMBUEMENTS:\n\t\t\treturn reloadImbuements();\n\t\tcase Reload_t::RELOAD_TYPE_VOCATIONS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6e149e3b44301b16f48e742328d36592ef4ace493baae572da520b4af7c20e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 3, + "charOffset": 1426, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 3, + "charOffset": 1353, + "charLength": 4, + "snippet": { + "text": "\t\tcase Reload_t::RELOAD_TYPE_IMBUEMENTS:\n\t\t\treturn reloadImbuements();\n\t\tcase Reload_t::RELOAD_TYPE_VOCATIONS:\n\t\t\treturn reloadVocations();\n\t\tcase Reload_t::RELOAD_TYPE_CORE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58a3e3b20ac5775645155cfe3862b02b298aad6bcac3c8d1baf48b115b3081dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 47, + "startColumn": 3, + "charOffset": 1495, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 45, + "startColumn": 3, + "charOffset": 1424, + "charLength": 4, + "snippet": { + "text": "\t\tcase Reload_t::RELOAD_TYPE_VOCATIONS:\n\t\t\treturn reloadVocations();\n\t\tcase Reload_t::RELOAD_TYPE_CORE:\n\t\t\treturn reloadCore();\n\t\tcase Reload_t::RELOAD_TYPE_GROUPS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "419db9e1403d89d5bd792a969ca4a4a4db59f5db2b30e108fdf30cd041a028f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 49, + "startColumn": 3, + "charOffset": 1554, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 47, + "startColumn": 3, + "charOffset": 1493, + "charLength": 4, + "snippet": { + "text": "\t\tcase Reload_t::RELOAD_TYPE_CORE:\n\t\t\treturn reloadCore();\n\t\tcase Reload_t::RELOAD_TYPE_GROUPS:\n\t\t\treturn reloadGroups();\n\t\tcase Reload_t::RELOAD_TYPE_SCRIPTS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29bb95c68b375e1e5795ed64c40b458676b05ed8e3f77d731647c0a847c0f5ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 51, + "startColumn": 3, + "charOffset": 1617, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 49, + "startColumn": 3, + "charOffset": 1552, + "charLength": 4, + "snippet": { + "text": "\t\tcase Reload_t::RELOAD_TYPE_GROUPS:\n\t\t\treturn reloadGroups();\n\t\tcase Reload_t::RELOAD_TYPE_SCRIPTS:\n\t\t\treturn reloadScripts();\n\t\tcase Reload_t::RELOAD_TYPE_ITEMS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e3dfb0298fed57a57496a5a14655d1818959b729dff474ed06881bc627a9bc6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 53, + "startColumn": 3, + "charOffset": 1682, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 3, + "charOffset": 1615, + "charLength": 4, + "snippet": { + "text": "\t\tcase Reload_t::RELOAD_TYPE_SCRIPTS:\n\t\t\treturn reloadScripts();\n\t\tcase Reload_t::RELOAD_TYPE_ITEMS:\n\t\t\treturn reloadItems();\n\t\tcase Reload_t::RELOAD_TYPE_MONSTERS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58a3e3b20ac5775645155cfe3862b02b298aad6bcac3c8d1baf48b115b3081dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 55, + "startColumn": 3, + "charOffset": 1743, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 3, + "charOffset": 1680, + "charLength": 4, + "snippet": { + "text": "\t\tcase Reload_t::RELOAD_TYPE_ITEMS:\n\t\t\treturn reloadItems();\n\t\tcase Reload_t::RELOAD_TYPE_MONSTERS:\n\t\t\treturn reloadMonsters();\n\t\tcase Reload_t::RELOAD_TYPE_NPCS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13e2f74fb172503c8c432053ed7c3f0fc3168f12e08188eee78c13222604284e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 57, + "startColumn": 3, + "charOffset": 1810, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 55, + "startColumn": 3, + "charOffset": 1741, + "charLength": 4, + "snippet": { + "text": "\t\tcase Reload_t::RELOAD_TYPE_MONSTERS:\n\t\t\treturn reloadMonsters();\n\t\tcase Reload_t::RELOAD_TYPE_NPCS:\n\t\t\treturn reloadNpcs();\n\t\tcase Reload_t::RELOAD_TYPE_RAIDS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29bb95c68b375e1e5795ed64c40b458676b05ed8e3f77d731647c0a847c0f5ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 3, + "charOffset": 1869, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 3, + "charOffset": 1808, + "charLength": 4, + "snippet": { + "text": "\t\tcase Reload_t::RELOAD_TYPE_NPCS:\n\t\t\treturn reloadNpcs();\n\t\tcase Reload_t::RELOAD_TYPE_RAIDS:\n\t\t\treturn reloadRaids();\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b61bbd54acaf98787715b7254aafd07158f63754aadeff24d49b82a885733c69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 61, + "startColumn": 3, + "charOffset": 1930, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 59, + "startColumn": 3, + "charOffset": 1867, + "charLength": 7, + "snippet": { + "text": "\t\tcase Reload_t::RELOAD_TYPE_RAIDS:\n\t\t\treturn reloadRaids();\n\t\tdefault:\n\t\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc81d40c14c9ec24563b8bff3afbd193dacdf5f1217b00a5516b250d475accc7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'reloadAll' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 85, + "startColumn": 18, + "charOffset": 2598, + "charLength": 9, + "snippet": { + "text": "reloadAll" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 18, + "charOffset": 2508, + "charLength": 9, + "snippet": { + "text": " * Changing this to public may cause some unexpected behavior or bug\n */\nbool GameReload::reloadAll() {\n\tstd::vector reloadResults;\n\treloadResults.reserve(magic_enum::enum_count());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62d3cc443a3814a5a0ed0623517e652a509d30867f1757b719b2f4be47575592" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 89, + "startColumn": 2, + "charOffset": 2708, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 87, + "startColumn": 2, + "charOffset": 2646, + "charLength": 3, + "snippet": { + "text": "\treloadResults.reserve(magic_enum::enum_count());\n\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tconst auto name = magic_enum::enum_name(value);\n\t\tg_logger().info(\"Reloading: {}\", name);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b8a6f1c46889a2a37f9b796f045b1c0e2691c6e8b2f3af0652e747884e1cc59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 150, + "startColumn": 2, + "charOffset": 4210, + "charLength": 13, + "snippet": { + "text": "reloadScripts" + } + }, + "contextRegion": { + "startLine": 148, + "startColumn": 2, + "charOffset": 4127, + "charLength": 13, + "snippet": { + "text": "bool GameReload::reloadVocations() {\n\tconst bool result = g_vocations().reload();\n\treloadScripts();\n\tlogReloadStatus(\"Vocations\", result);\n\treturn result;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9159e7bfe243e0a7de013fdb6bb52bdd9dd6c2088a72660b526b9791467a9ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 171, + "startColumn": 22, + "charOffset": 4768, + "charLength": 6, + "snippet": { + "text": "g_game" + } + }, + "contextRegion": { + "startLine": 169, + "startColumn": 22, + "charOffset": 4712, + "charLength": 6, + "snippet": { + "text": "\nbool GameReload::reloadGroups() {\n\tconst bool result = g_game().groups.reload();\n\tlogReloadStatus(\"Groups\", result);\n\treturn result;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8a28114c26a2ee1ae05ce4e484e2f54c326a56ec3d5431ffb4feef69a21a2dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 183, + "startColumn": 14, + "charOffset": 5126, + "charLength": 11, + "snippet": { + "text": "loadScripts" + } + }, + "contextRegion": { + "startLine": 181, + "startColumn": 14, + "charOffset": 5027, + "charLength": 11, + "snippet": { + "text": "\tconst auto &coreFolder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__);\n\n\tg_scripts().loadScripts(coreFolder + \"/scripts/lib\", true, false);\n\tg_scripts().loadScripts(datapackFolder + \"/scripts\", false, true);\n\tg_scripts().loadScripts(coreFolder + \"/scripts\", false, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72f7ffdec437bc931ac7d2205f14c91741ed5bb0ec01b17adffdd47715f89957" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 184, + "startColumn": 14, + "charOffset": 5194, + "charLength": 11, + "snippet": { + "text": "loadScripts" + } + }, + "contextRegion": { + "startLine": 182, + "startColumn": 14, + "charOffset": 5112, + "charLength": 11, + "snippet": { + "text": "\n\tg_scripts().loadScripts(coreFolder + \"/scripts/lib\", true, false);\n\tg_scripts().loadScripts(datapackFolder + \"/scripts\", false, true);\n\tg_scripts().loadScripts(coreFolder + \"/scripts\", false, true);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "479c9ab8ee678b23bd48982dc27efda0821168eb989ddfa0b9c145af4ee67f64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 185, + "startColumn": 14, + "charOffset": 5262, + "charLength": 11, + "snippet": { + "text": "loadScripts" + } + }, + "contextRegion": { + "startLine": 183, + "startColumn": 14, + "charOffset": 5113, + "charLength": 11, + "snippet": { + "text": "\tg_scripts().loadScripts(coreFolder + \"/scripts/lib\", true, false);\n\tg_scripts().loadScripts(datapackFolder + \"/scripts\", false, true);\n\tg_scripts().loadScripts(coreFolder + \"/scripts\", false, true);\n\n\t// It should come last, after everything else has been cleaned up." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8daf6c11f580e87de104de1c460269aa42569482c9ceccd363499428064c4bfb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 188, + "startColumn": 2, + "charOffset": 5383, + "charLength": 14, + "snippet": { + "text": "reloadMonsters" + } + }, + "contextRegion": { + "startLine": 186, + "startColumn": 2, + "charOffset": 5313, + "charLength": 14, + "snippet": { + "text": "\n\t// It should come last, after everything else has been cleaned up.\n\treloadMonsters();\n\treloadNpcs();\n\treloadItems();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0b1a1cf0f427dd2ce6467a83937b3f06446df645acca9e30fc57e854a589cbf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 189, + "startColumn": 2, + "charOffset": 5402, + "charLength": 10, + "snippet": { + "text": "reloadNpcs" + } + }, + "contextRegion": { + "startLine": 187, + "startColumn": 2, + "charOffset": 5314, + "charLength": 10, + "snippet": { + "text": "\t// It should come last, after everything else has been cleaned up.\n\treloadMonsters();\n\treloadNpcs();\n\treloadItems();\n\tlogReloadStatus(\"Scripts\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e58ee0fa9756e04eea850901905dbbedcf2bd9fb60c1355eb317ca2988529ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 190, + "startColumn": 2, + "charOffset": 5417, + "charLength": 11, + "snippet": { + "text": "reloadItems" + } + }, + "contextRegion": { + "startLine": 188, + "startColumn": 2, + "charOffset": 5382, + "charLength": 11, + "snippet": { + "text": "\treloadMonsters();\n\treloadNpcs();\n\treloadItems();\n\tlogReloadStatus(\"Scripts\", true);\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23c4553bb0ed952cfde0219cdb65b4ad267db3490079023f13138b9a564593cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/functions/game_reload.cpp" + }, + "region": { + "startLine": 212, + "startColumn": 4, + "charOffset": 6147, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 210, + "startColumn": 4, + "charOffset": 6092, + "charLength": 4, + "snippet": { + "text": "\t\tlogReloadStatus(\"Monsters\", true);\n\t\treturn true;\n\t} else {\n\t\tlogReloadStatus(\"Monsters\", false);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b497ee4c928f2c6c678930a9bb877a9de72e61915881741e10a2d824f4ab0ccc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'source' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 61, + "startColumn": 124, + "charOffset": 2270, + "charLength": 6, + "snippet": { + "text": "source" + } + }, + "contextRegion": { + "startLine": 59, + "startColumn": 124, + "charOffset": 2121, + "charLength": 6, + "snippet": { + "text": "\nnamespace InternalGame {\n\tvoid sendBlockEffect(BlockType_t blockType, CombatType_t combatType, const Position &targetPos, std::shared_ptr source) {\n\t\tif (blockType == BLOCK_DEFENSE) {\n\t\t\tg_game().addMagicEffect(targetPos, CONST_ME_POFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d541f680e593a402ebb0c4c49ed18cce387f64afc867da32ea3ca7b32b0f7497" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 62, + "startColumn": 3, + "charOffset": 2282, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 3, + "charOffset": 2122, + "charLength": 2, + "snippet": { + "text": "namespace InternalGame {\n\tvoid sendBlockEffect(BlockType_t blockType, CombatType_t combatType, const Position &targetPos, std::shared_ptr source) {\n\t\tif (blockType == BLOCK_DEFENSE) {\n\t\t\tg_game().addMagicEffect(targetPos, CONST_ME_POFF);\n\t\t} else if (blockType == BLOCK_ARMOR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5542acacc8b0b2fd85732796248b4e1abd5caf08dcd2519e8d0b3aaa68d240f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 71, + "startColumn": 5, + "charOffset": 2664, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 69, + "startColumn": 5, + "charOffset": 2609, + "charLength": 4, + "snippet": { + "text": "\t\t\tuint8_t hitEffect = 0;\n\t\t\tswitch (combatType) {\n\t\t\t\tcase COMBAT_UNDEFINEDDAMAGE: {\n\t\t\t\t\treturn;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b9a3c8b422e78b00073172364da9608d245b11d994fb2fc104b1d2eec9d5a12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 75, + "startColumn": 5, + "charOffset": 2748, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 73, + "startColumn": 5, + "charOffset": 2708, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t\tcase COMBAT_ENERGYDAMAGE:\n\t\t\t\tcase COMBAT_FIREDAMAGE:\n\t\t\t\tcase COMBAT_PHYSICALDAMAGE:\n\t\t\t\tcase COMBAT_ICEDAMAGE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89485fda8116acacdf2330bbc81550e2a36dcb07de6f7b99c6f28d56dced8696" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 5, + "charOffset": 2776, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 5, + "charOffset": 2714, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tcase COMBAT_ENERGYDAMAGE:\n\t\t\t\tcase COMBAT_FIREDAMAGE:\n\t\t\t\tcase COMBAT_PHYSICALDAMAGE:\n\t\t\t\tcase COMBAT_ICEDAMAGE:\n\t\t\t\tcase COMBAT_DEATHDAMAGE: {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1847124116cf7cc42f11be9e52155d862b0eb3577371faac1355e78ad9f7163e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 77, + "startColumn": 5, + "charOffset": 2808, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 75, + "startColumn": 5, + "charOffset": 2744, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tcase COMBAT_FIREDAMAGE:\n\t\t\t\tcase COMBAT_PHYSICALDAMAGE:\n\t\t\t\tcase COMBAT_ICEDAMAGE:\n\t\t\t\tcase COMBAT_DEATHDAMAGE: {\n\t\t\t\t\thitEffect = CONST_ME_BLOCKHIT;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7f01e2ec8e8cb49defb20f79a78b3a5047db0995ea27958eb102842c5039612" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 5, + "charOffset": 2835, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 5, + "charOffset": 2772, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tcase COMBAT_PHYSICALDAMAGE:\n\t\t\t\tcase COMBAT_ICEDAMAGE:\n\t\t\t\tcase COMBAT_DEATHDAMAGE: {\n\t\t\t\t\thitEffect = CONST_ME_BLOCKHIT;\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f35c6f3a445e097af539ecc2388c0c9bc4be05310f041400fc3296da43ed7b0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 79, + "startColumn": 18, + "charOffset": 2879, + "charLength": 17, + "snippet": { + "text": "CONST_ME_BLOCKHIT" + } + }, + "contextRegion": { + "startLine": 77, + "startColumn": 18, + "charOffset": 2804, + "charLength": 17, + "snippet": { + "text": "\t\t\t\tcase COMBAT_ICEDAMAGE:\n\t\t\t\tcase COMBAT_DEATHDAMAGE: {\n\t\t\t\t\thitEffect = CONST_ME_BLOCKHIT;\n\t\t\t\t\tbreak;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2861adf525bf5e73d4c5e00b4cc417765777cae9ea625d20a585e84295df124d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 83, + "startColumn": 18, + "charOffset": 2964, + "charLength": 20, + "snippet": { + "text": "CONST_ME_GREEN_RINGS" + } + }, + "contextRegion": { + "startLine": 81, + "startColumn": 18, + "charOffset": 2910, + "charLength": 20, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t\tcase COMBAT_EARTHDAMAGE: {\n\t\t\t\t\thitEffect = CONST_ME_GREEN_RINGS;\n\t\t\t\t\tbreak;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "91b65e0dc3edc52a942d58a521cdfb38f395355d4bb63fb9f8363ed8b3b234d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 18, + "charOffset": 3051, + "charLength": 19, + "snippet": { + "text": "CONST_ME_HOLYDAMAGE" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 18, + "charOffset": 2998, + "charLength": 19, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t\tcase COMBAT_HOLYDAMAGE: {\n\t\t\t\t\thitEffect = CONST_ME_HOLYDAMAGE;\n\t\t\t\t\tbreak;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fde17cf49088c39f31a6e240fcbeb9923ff1f5def389a2f1c709ca6f0f4ee9a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 18, + "charOffset": 3122, + "charLength": 13, + "snippet": { + "text": "CONST_ME_POFF" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 18, + "charOffset": 3084, + "charLength": 13, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\thitEffect = CONST_ME_POFF;\n\t\t\t\t\tbreak;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09717d2263d307b96e729e06a906ed4b11c5b59ff349702ace4240589ef02309" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 103, + "startColumn": 89, + "charOffset": 3435, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 101, + "startColumn": 89, + "charOffset": 3343, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tbool playerCanUseItemOnHouseTile(std::shared_ptr player, std::shared_ptr item) {\n\t\tif (!player || !item) {\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "57f6742d43a5d7d39455de3c1c13a07493a04837435afe9e0ee3e4ba79f712de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 104, + "startColumn": 7, + "charOffset": 3449, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 102, + "startColumn": 7, + "charOffset": 3346, + "charLength": 1, + "snippet": { + "text": "\n\tbool playerCanUseItemOnHouseTile(std::shared_ptr player, std::shared_ptr item) {\n\t\tif (!player || !item) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7acb06caf1652ff0dd605b115b6b238c40e744bfd455d2bf158102c75d188edd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 104, + "startColumn": 18, + "charOffset": 3460, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 102, + "startColumn": 18, + "charOffset": 3346, + "charLength": 1, + "snippet": { + "text": "\n\tbool playerCanUseItemOnHouseTile(std::shared_ptr player, std::shared_ptr item) {\n\t\tif (!player || !item) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "056fbdd85ebf8d628f7d8f894fd6edfaf7b2a952938446f6d72abdc9513214f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 109, + "startColumn": 7, + "charOffset": 3532, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 107, + "startColumn": 7, + "charOffset": 3490, + "charLength": 1, + "snippet": { + "text": "\n\t\tauto itemTile = item->getTile();\n\t\tif (!itemTile) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "936e26009ae148b7779609d9924c9000486efb8a9141729c14fbcb09f56c9aca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 115, + "startColumn": 8, + "charOffset": 3715, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 113, + "startColumn": 8, + "charOffset": 3567, + "charLength": 1, + "snippet": { + "text": "\t\tif (std::shared_ptr houseTile = std::dynamic_pointer_cast(itemTile)) {\n\t\t\tconst auto &house = houseTile->getHouse();\n\t\t\tif (!house || !house->isInvited(player)) {\n\t\t\t\treturn false;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb464928d11fa91d5a4796a061d47337387052fc0a003213fb50dec190dd5b84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 115, + "startColumn": 18, + "charOffset": 3725, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 113, + "startColumn": 18, + "charOffset": 3567, + "charLength": 1, + "snippet": { + "text": "\t\tif (std::shared_ptr houseTile = std::dynamic_pointer_cast(itemTile)) {\n\t\t\tconst auto &house = houseTile->getHouse();\n\t\t\tif (!house || !house->isInvited(player)) {\n\t\t\t\treturn false;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40ecca6f08db610726281a0644a6bac919645897a3e3399101d3db33c93dcd61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 127, + "startColumn": 34, + "charOffset": 4217, + "charLength": 14, + "snippet": { + "text": "realItemParent" + } + }, + "contextRegion": { + "startLine": 125, + "startColumn": 34, + "charOffset": 4135, + "charLength": 14, + "snippet": { + "text": "\n\t\t\tauto realItemParent = item->getRealParent();\n\t\t\tauto isItemInGuestInventory = realItemParent && (realItemParent == player || realItemParent->getContainer());\n\t\t\tif (isGuest && !isItemInGuestInventory && !item->isLadder() && !item->canBeUsedByGuests()) {\n\t\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7acb06caf1652ff0dd605b115b6b238c40e744bfd455d2bf158102c75d188edd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 127, + "startColumn": 53, + "charOffset": 4236, + "charLength": 14, + "snippet": { + "text": "realItemParent" + } + }, + "contextRegion": { + "startLine": 125, + "startColumn": 53, + "charOffset": 4135, + "charLength": 14, + "snippet": { + "text": "\n\t\t\tauto realItemParent = item->getRealParent();\n\t\t\tauto isItemInGuestInventory = realItemParent && (realItemParent == player || realItemParent->getContainer());\n\t\t\tif (isGuest && !isItemInGuestInventory && !item->isLadder() && !item->canBeUsedByGuests()) {\n\t\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa5fea6fe5b989302e1e3d89bd7dd13b652a0dee75d336ff0b1b9393709674a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 128, + "startColumn": 19, + "charOffset": 4315, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 126, + "startColumn": 19, + "charOffset": 4136, + "charLength": 1, + "snippet": { + "text": "\t\t\tauto realItemParent = item->getRealParent();\n\t\t\tauto isItemInGuestInventory = realItemParent && (realItemParent == player || realItemParent->getContainer());\n\t\t\tif (isGuest && !isItemInGuestInventory && !item->isLadder() && !item->canBeUsedByGuests()) {\n\t\t\t\treturn false;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33cf40f347290b875ebebe42ec531cbd91973a9163d7b826e1c41fb8d9816339" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 140, + "startColumn": 93, + "charOffset": 4593, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 138, + "startColumn": 93, + "charOffset": 4497, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tbool playerCanUseItemWithOnHouseTile(std::shared_ptr player, std::shared_ptr item, const Position &toPos, int toStackPos, int toItemId) {\n\t\tif (!player || !item) {\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e76cc1ad0b9eee087344c3f4239686691e4f36b43c7ff4053052900d42412c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 141, + "startColumn": 7, + "charOffset": 4660, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 139, + "startColumn": 7, + "charOffset": 4500, + "charLength": 1, + "snippet": { + "text": "\n\tbool playerCanUseItemWithOnHouseTile(std::shared_ptr player, std::shared_ptr item, const Position &toPos, int toStackPos, int toItemId) {\n\t\tif (!player || !item) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dda7b09f628324f609a6c40834322c1f4ff944448f9317b956d90790bec80901" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 141, + "startColumn": 18, + "charOffset": 4671, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 139, + "startColumn": 18, + "charOffset": 4500, + "charLength": 1, + "snippet": { + "text": "\n\tbool playerCanUseItemWithOnHouseTile(std::shared_ptr player, std::shared_ptr item, const Position &toPos, int toStackPos, int toItemId) {\n\t\tif (!player || !item) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e800fbed030b3fe2b152fb39796efe4acca49922c4a3ffbb164cc2be30b6ef4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 146, + "startColumn": 7, + "charOffset": 4743, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 144, + "startColumn": 7, + "charOffset": 4701, + "charLength": 1, + "snippet": { + "text": "\n\t\tauto itemTile = item->getTile();\n\t\tif (!itemTile) {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e45dc766bdbdc70a1045eafd8c31587eb3e3a32fe254ac65449e41d4a0fb922e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 155, + "startColumn": 25, + "charOffset": 5228, + "charLength": 10, + "snippet": { + "text": "targetItem" + } + }, + "contextRegion": { + "startLine": 153, + "startColumn": 25, + "charOffset": 5008, + "charLength": 10, + "snippet": { + "text": "\t\t\t\tstd::shared_ptr targetThing = g_game().internalGetThing(player, toPos, toStackPos, toItemId, STACKPOS_FIND_THING);\n\t\t\t\tauto targetItem = targetThing ? targetThing->getItem() : nullptr;\n\t\t\t\tuint16_t targetId = targetItem ? targetItem->getID() : 0;\n\t\t\t\tauto invitedCheckUseWith = house && item->getRealParent() && item->getRealParent() != player && (!house->isInvited(player) || house->getHouseAccessLevel(player) == HOUSE_GUEST);\n\t\t\t\tif (targetId != 0 && targetItem && !targetItem->isDummy() && invitedCheckUseWith && !item->canBeUsedByGuests()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "765747f42b6c1d054904bc436b1be66068a0787db6794d464086ea106ed9f908" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 156, + "startColumn": 32, + "charOffset": 5297, + "charLength": 5, + "snippet": { + "text": "house" + } + }, + "contextRegion": { + "startLine": 154, + "startColumn": 32, + "charOffset": 5134, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tauto targetItem = targetThing ? targetThing->getItem() : nullptr;\n\t\t\t\tuint16_t targetId = targetItem ? targetItem->getID() : 0;\n\t\t\t\tauto invitedCheckUseWith = house && item->getRealParent() && item->getRealParent() != player && (!house->isInvited(player) || house->getHouseAccessLevel(player) == HOUSE_GUEST);\n\t\t\t\tif (targetId != 0 && targetItem && !targetItem->isDummy() && invitedCheckUseWith && !item->canBeUsedByGuests()) {\n\t\t\t\t\tplayer->sendCancelMessage(RETURNVALUE_CANNOTUSETHISOBJECT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8724080d3801f16c70e48c85c9e95140ad8b1b02533f620764f07cead72c8074" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 156, + "startColumn": 102, + "charOffset": 5367, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 154, + "startColumn": 102, + "charOffset": 5134, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tauto targetItem = targetThing ? targetThing->getItem() : nullptr;\n\t\t\t\tuint16_t targetId = targetItem ? targetItem->getID() : 0;\n\t\t\t\tauto invitedCheckUseWith = house && item->getRealParent() && item->getRealParent() != player && (!house->isInvited(player) || house->getHouseAccessLevel(player) == HOUSE_GUEST);\n\t\t\t\tif (targetId != 0 && targetItem && !targetItem->isDummy() && invitedCheckUseWith && !item->canBeUsedByGuests()) {\n\t\t\t\t\tplayer->sendCancelMessage(RETURNVALUE_CANNOTUSETHISOBJECT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0bdaf7558204378913059a3fcf5254f99c8025639c64e155f8231215447b1dd9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 168, + "startColumn": 50, + "charOffset": 5757, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 166, + "startColumn": 50, + "charOffset": 5684, + "charLength": 4, + "snippet": { + "text": "\n\ttemplate \n\tT getCustomAttributeValue(std::shared_ptr item, const std::string &attributeName) {\n\t\tstatic_assert(std::is_integral::value, \"T must be an integral type\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7e7696f27eec891a92d46d645369a99b9a0edfbd3e59e128fe1054e3f09b1a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-type-traits", + "ruleIndex": 632, + "kind": "fail", + "level": "warning", + "message": { + "text": "use c++17 style variable templates" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 169, + "startColumn": 17, + "charOffset": 5815, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 167, + "startColumn": 17, + "charOffset": 5685, + "charLength": 3, + "snippet": { + "text": "\ttemplate \n\tT getCustomAttributeValue(std::shared_ptr item, const std::string &attributeName) {\n\t\tstatic_assert(std::is_integral::value, \"T must be an integral type\");\n\n\t\tauto attribute = item->getCustomAttribute(attributeName);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2eb9b202a974e76ea63d84c0fd90e021aceca6836c1fa87f6b38cf13c70457dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto attribute' can be declared as 'const auto *attribute'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 171, + "startColumn": 3, + "charOffset": 5877, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 169, + "startColumn": 3, + "charOffset": 5799, + "charLength": 4, + "snippet": { + "text": "\t\tstatic_assert(std::is_integral::value, \"T must be an integral type\");\n\n\t\tauto attribute = item->getCustomAttribute(attributeName);\n\t\tif (!attribute) {\n\t\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19847d2dc2c3e7a505e9a0c595561eb086f1bea39702ef7a6932a2c82e41b093" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 7, + "charOffset": 5941, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 7, + "charOffset": 5874, + "charLength": 1, + "snippet": { + "text": "\n\t\tauto attribute = item->getCustomAttribute(attributeName);\n\t\tif (!attribute) {\n\t\t\treturn 0;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b301038ed560c18a2683d1d38fb9144da47266329d82cf69beea8d4b90af052" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-prefer-member-initializer", + "ruleIndex": 504, + "kind": "fail", + "level": "warning", + "message": { + "text": "'m_IOWheel' should be initialized in a member initializer of the constructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 199, + "startColumn": 2, + "charOffset": 7035, + "charLength": 9, + "snippet": { + "text": "m_IOWheel" + } + }, + "contextRegion": { + "startLine": 197, + "startColumn": 2, + "charOffset": 6988, + "charLength": 9, + "snippet": { + "text": "\n\t// Create instance of IOWheel to Game class\n\tm_IOWheel = std::make_unique();\n\n\twildcardTree = std::make_shared(false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d57733c8681dd26e7a4838216465b26b0ce45c6d240f4d294dc3f42f87f244ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-prefer-member-initializer", + "ruleIndex": 504, + "kind": "fail", + "level": "warning", + "message": { + "text": "'wildcardTree' should be initialized in a member initializer of the constructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 201, + "startColumn": 2, + "charOffset": 7078, + "charLength": 12, + "snippet": { + "text": "wildcardTree" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 2, + "charOffset": 7034, + "charLength": 12, + "snippet": { + "text": "\tm_IOWheel = std::make_unique();\n\n\twildcardTree = std::make_shared(false);\n\n\tm_badges = {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "058833a7f7231d309442abd95966985b598d001bfa09284386eef92fb6537337" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 205, + "startColumn": 60, + "charOffset": 7277, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 203, + "startColumn": 60, + "charOffset": 7137, + "charLength": 1, + "snippet": { + "text": "\tm_badges = {\n\t\tBadge(1, CyclopediaBadge_t::ACCOUNT_AGE, \"Fledegeling Hero\", 1),\n\t\tBadge(2, CyclopediaBadge_t::ACCOUNT_AGE, \"Veteran Hero\", 5),\n\t\tBadge(3, CyclopediaBadge_t::ACCOUNT_AGE, \"Senior Hero\", 10),\n\t\tBadge(4, CyclopediaBadge_t::ACCOUNT_AGE, \"Ancient Hero\", 15)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60ed51ad2e0384ba9bd2a4c47af24b4ace0717485e7e8d7648b9d53ab97f6fe1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 206, + "startColumn": 59, + "charOffset": 7339, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 204, + "startColumn": 59, + "charOffset": 7151, + "charLength": 2, + "snippet": { + "text": "\t\tBadge(1, CyclopediaBadge_t::ACCOUNT_AGE, \"Fledegeling Hero\", 1),\n\t\tBadge(2, CyclopediaBadge_t::ACCOUNT_AGE, \"Veteran Hero\", 5),\n\t\tBadge(3, CyclopediaBadge_t::ACCOUNT_AGE, \"Senior Hero\", 10),\n\t\tBadge(4, CyclopediaBadge_t::ACCOUNT_AGE, \"Ancient Hero\", 15),\n\t\tBadge(5, CyclopediaBadge_t::ACCOUNT_AGE, \"Exalted Hero\", 20)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c7cb0c343d9c1f87dedd5dbc02e19212965f81d3ba9d3994df9eed95ff60303" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "15 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 207, + "startColumn": 60, + "charOffset": 7403, + "charLength": 2, + "snippet": { + "text": "15" + } + }, + "contextRegion": { + "startLine": 205, + "startColumn": 60, + "charOffset": 7218, + "charLength": 2, + "snippet": { + "text": "\t\tBadge(2, CyclopediaBadge_t::ACCOUNT_AGE, \"Veteran Hero\", 5),\n\t\tBadge(3, CyclopediaBadge_t::ACCOUNT_AGE, \"Senior Hero\", 10),\n\t\tBadge(4, CyclopediaBadge_t::ACCOUNT_AGE, \"Ancient Hero\", 15),\n\t\tBadge(5, CyclopediaBadge_t::ACCOUNT_AGE, \"Exalted Hero\", 20),\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4000ab1a081b8cd80ee2f187e06e9c10a18483bf31e0c74356864edd473301de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 208, + "startColumn": 9, + "charOffset": 7416, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 206, + "startColumn": 9, + "charOffset": 7281, + "charLength": 1, + "snippet": { + "text": "\t\tBadge(3, CyclopediaBadge_t::ACCOUNT_AGE, \"Senior Hero\", 10),\n\t\tBadge(4, CyclopediaBadge_t::ACCOUNT_AGE, \"Ancient Hero\", 15),\n\t\tBadge(5, CyclopediaBadge_t::ACCOUNT_AGE, \"Exalted Hero\", 20),\n\n\t\tBadge(6, CyclopediaBadge_t::LOYALTY, \"Tibia Loyalist (Grade 1)\", 100)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7917be0b51f871b6962e3979f6aea0815a0ad97b04fa80aab2cf00c86a85a08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 208, + "startColumn": 60, + "charOffset": 7467, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 206, + "startColumn": 60, + "charOffset": 7281, + "charLength": 2, + "snippet": { + "text": "\t\tBadge(3, CyclopediaBadge_t::ACCOUNT_AGE, \"Senior Hero\", 10),\n\t\tBadge(4, CyclopediaBadge_t::ACCOUNT_AGE, \"Ancient Hero\", 15),\n\t\tBadge(5, CyclopediaBadge_t::ACCOUNT_AGE, \"Exalted Hero\", 20),\n\n\t\tBadge(6, CyclopediaBadge_t::LOYALTY, \"Tibia Loyalist (Grade 1)\", 100)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "362ab9433a2470af7d6052de340acb4eef15dc3ec20f6101225ff829a6b302ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 210, + "startColumn": 9, + "charOffset": 7481, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 208, + "startColumn": 9, + "charOffset": 7408, + "charLength": 1, + "snippet": { + "text": "\t\tBadge(5, CyclopediaBadge_t::ACCOUNT_AGE, \"Exalted Hero\", 20),\n\n\t\tBadge(6, CyclopediaBadge_t::LOYALTY, \"Tibia Loyalist (Grade 1)\", 100),\n\t\tBadge(7, CyclopediaBadge_t::LOYALTY, \"Tibia Loyalist (Grade 2)\", 1000),\n\t\tBadge(8, CyclopediaBadge_t::LOYALTY, \"Tibia Loyalist (Grade 3)\", 5000)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb8fee44a138d40b6c278c1c86a90020db9dc6fe53ee4860814716ccc51bf7fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 210, + "startColumn": 68, + "charOffset": 7540, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 208, + "startColumn": 68, + "charOffset": 7408, + "charLength": 3, + "snippet": { + "text": "\t\tBadge(5, CyclopediaBadge_t::ACCOUNT_AGE, \"Exalted Hero\", 20),\n\n\t\tBadge(6, CyclopediaBadge_t::LOYALTY, \"Tibia Loyalist (Grade 1)\", 100),\n\t\tBadge(7, CyclopediaBadge_t::LOYALTY, \"Tibia Loyalist (Grade 2)\", 1000),\n\t\tBadge(8, CyclopediaBadge_t::LOYALTY, \"Tibia Loyalist (Grade 3)\", 5000)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8389c126f575c9dd506bb1dfcf30571ecd7eca1f365bf4337f96f0971bd3222b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 211, + "startColumn": 9, + "charOffset": 7554, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 209, + "startColumn": 9, + "charOffset": 7472, + "charLength": 1, + "snippet": { + "text": "\n\t\tBadge(6, CyclopediaBadge_t::LOYALTY, \"Tibia Loyalist (Grade 1)\", 100),\n\t\tBadge(7, CyclopediaBadge_t::LOYALTY, \"Tibia Loyalist (Grade 2)\", 1000),\n\t\tBadge(8, CyclopediaBadge_t::LOYALTY, \"Tibia Loyalist (Grade 3)\", 5000),\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad9ee43fbf7832cd07a13f6fe780118689f5f1c8acb116527c6eec4e2ff1093c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 211, + "startColumn": 68, + "charOffset": 7613, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 209, + "startColumn": 68, + "charOffset": 7472, + "charLength": 4, + "snippet": { + "text": "\n\t\tBadge(6, CyclopediaBadge_t::LOYALTY, \"Tibia Loyalist (Grade 1)\", 100),\n\t\tBadge(7, CyclopediaBadge_t::LOYALTY, \"Tibia Loyalist (Grade 2)\", 1000),\n\t\tBadge(8, CyclopediaBadge_t::LOYALTY, \"Tibia Loyalist (Grade 3)\", 5000),\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b081faf1b0dca4e2aa1068fd862b78005038740cd649b87740cb445bbbd77590" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 212, + "startColumn": 9, + "charOffset": 7628, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 210, + "startColumn": 9, + "charOffset": 7473, + "charLength": 1, + "snippet": { + "text": "\t\tBadge(6, CyclopediaBadge_t::LOYALTY, \"Tibia Loyalist (Grade 1)\", 100),\n\t\tBadge(7, CyclopediaBadge_t::LOYALTY, \"Tibia Loyalist (Grade 2)\", 1000),\n\t\tBadge(8, CyclopediaBadge_t::LOYALTY, \"Tibia Loyalist (Grade 3)\", 5000),\n\n\t\tBadge(9, CyclopediaBadge_t::ACCOUNT_ALL_LEVEL, \"Global Player (Grade 1)\", 500)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4cef74e2a7f4f969d4abc58f534f81e904803645f662a60c30d763f5bd9170da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 212, + "startColumn": 68, + "charOffset": 7687, + "charLength": 4, + "snippet": { + "text": "5000" + } + }, + "contextRegion": { + "startLine": 210, + "startColumn": 68, + "charOffset": 7473, + "charLength": 4, + "snippet": { + "text": "\t\tBadge(6, CyclopediaBadge_t::LOYALTY, \"Tibia Loyalist (Grade 1)\", 100),\n\t\tBadge(7, CyclopediaBadge_t::LOYALTY, \"Tibia Loyalist (Grade 2)\", 1000),\n\t\tBadge(8, CyclopediaBadge_t::LOYALTY, \"Tibia Loyalist (Grade 3)\", 5000),\n\n\t\tBadge(9, CyclopediaBadge_t::ACCOUNT_ALL_LEVEL, \"Global Player (Grade 1)\", 500)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35c7aec905f9564b2418f00a2f80f88252b696c065387d21e03762c5fcd7c5ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 214, + "startColumn": 9, + "charOffset": 7703, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 9, + "charOffset": 7620, + "charLength": 1, + "snippet": { + "text": "\t\tBadge(8, CyclopediaBadge_t::LOYALTY, \"Tibia Loyalist (Grade 3)\", 5000),\n\n\t\tBadge(9, CyclopediaBadge_t::ACCOUNT_ALL_LEVEL, \"Global Player (Grade 1)\", 500),\n\t\tBadge(10, CyclopediaBadge_t::ACCOUNT_ALL_LEVEL, \"Global Player (Grade 2)\", 1000),\n\t\tBadge(11, CyclopediaBadge_t::ACCOUNT_ALL_LEVEL, \"Global Player (Grade 3)\", 2000)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "576684f4a376d4557e7671f3b02dc771a364494129ea98574a74488830f3349e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "500 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 214, + "startColumn": 77, + "charOffset": 7771, + "charLength": 3, + "snippet": { + "text": "500" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 77, + "charOffset": 7620, + "charLength": 3, + "snippet": { + "text": "\t\tBadge(8, CyclopediaBadge_t::LOYALTY, \"Tibia Loyalist (Grade 3)\", 5000),\n\n\t\tBadge(9, CyclopediaBadge_t::ACCOUNT_ALL_LEVEL, \"Global Player (Grade 1)\", 500),\n\t\tBadge(10, CyclopediaBadge_t::ACCOUNT_ALL_LEVEL, \"Global Player (Grade 2)\", 1000),\n\t\tBadge(11, CyclopediaBadge_t::ACCOUNT_ALL_LEVEL, \"Global Player (Grade 3)\", 2000)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8e4ab58a08c0dd501b872dc6937da48c778620716f0214ac933603d841f052b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 215, + "startColumn": 9, + "charOffset": 7785, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 213, + "startColumn": 9, + "charOffset": 7694, + "charLength": 2, + "snippet": { + "text": "\n\t\tBadge(9, CyclopediaBadge_t::ACCOUNT_ALL_LEVEL, \"Global Player (Grade 1)\", 500),\n\t\tBadge(10, CyclopediaBadge_t::ACCOUNT_ALL_LEVEL, \"Global Player (Grade 2)\", 1000),\n\t\tBadge(11, CyclopediaBadge_t::ACCOUNT_ALL_LEVEL, \"Global Player (Grade 3)\", 2000),\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4fe8522cd575271e568be75350fe0cce581d47c74d98fe5d866db6616bdae515" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 215, + "startColumn": 78, + "charOffset": 7854, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 213, + "startColumn": 78, + "charOffset": 7694, + "charLength": 4, + "snippet": { + "text": "\n\t\tBadge(9, CyclopediaBadge_t::ACCOUNT_ALL_LEVEL, \"Global Player (Grade 1)\", 500),\n\t\tBadge(10, CyclopediaBadge_t::ACCOUNT_ALL_LEVEL, \"Global Player (Grade 2)\", 1000),\n\t\tBadge(11, CyclopediaBadge_t::ACCOUNT_ALL_LEVEL, \"Global Player (Grade 3)\", 2000),\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6eab5666dd1ebd14b51b9f729de0954cd265e917ddfac5db50505aaacff7f950" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "11 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 216, + "startColumn": 9, + "charOffset": 7869, + "charLength": 2, + "snippet": { + "text": "11" + } + }, + "contextRegion": { + "startLine": 214, + "startColumn": 9, + "charOffset": 7695, + "charLength": 2, + "snippet": { + "text": "\t\tBadge(9, CyclopediaBadge_t::ACCOUNT_ALL_LEVEL, \"Global Player (Grade 1)\", 500),\n\t\tBadge(10, CyclopediaBadge_t::ACCOUNT_ALL_LEVEL, \"Global Player (Grade 2)\", 1000),\n\t\tBadge(11, CyclopediaBadge_t::ACCOUNT_ALL_LEVEL, \"Global Player (Grade 3)\", 2000),\n\n\t\tBadge(12, CyclopediaBadge_t::ACCOUNT_ALL_VOCATIONS, \"Master Class (Grade 1)\", 100)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92ac649adb713a6524092da92c18b10334f35f930dbc78839ad30edc9ca39c95" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 216, + "startColumn": 78, + "charOffset": 7938, + "charLength": 4, + "snippet": { + "text": "2000" + } + }, + "contextRegion": { + "startLine": 214, + "startColumn": 78, + "charOffset": 7695, + "charLength": 4, + "snippet": { + "text": "\t\tBadge(9, CyclopediaBadge_t::ACCOUNT_ALL_LEVEL, \"Global Player (Grade 1)\", 500),\n\t\tBadge(10, CyclopediaBadge_t::ACCOUNT_ALL_LEVEL, \"Global Player (Grade 2)\", 1000),\n\t\tBadge(11, CyclopediaBadge_t::ACCOUNT_ALL_LEVEL, \"Global Player (Grade 3)\", 2000),\n\n\t\tBadge(12, CyclopediaBadge_t::ACCOUNT_ALL_VOCATIONS, \"Master Class (Grade 1)\", 100)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce343b3344efb63b8c3ccfd379907a422bc0fb1a963e0ab521bbb49003b566eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "12 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 218, + "startColumn": 9, + "charOffset": 7954, + "charLength": 2, + "snippet": { + "text": "12" + } + }, + "contextRegion": { + "startLine": 216, + "startColumn": 9, + "charOffset": 7861, + "charLength": 2, + "snippet": { + "text": "\t\tBadge(11, CyclopediaBadge_t::ACCOUNT_ALL_LEVEL, \"Global Player (Grade 3)\", 2000),\n\n\t\tBadge(12, CyclopediaBadge_t::ACCOUNT_ALL_VOCATIONS, \"Master Class (Grade 1)\", 100),\n\t\tBadge(13, CyclopediaBadge_t::ACCOUNT_ALL_VOCATIONS, \"Master Class (Grade 2)\", 250),\n\t\tBadge(14, CyclopediaBadge_t::ACCOUNT_ALL_VOCATIONS, \"Master Class (Grade 3)\", 500)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d3ec11492bbe18ebb6fa5d7657911cba87c759398dcc2d1a417c3f03359064f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 218, + "startColumn": 81, + "charOffset": 8026, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 216, + "startColumn": 81, + "charOffset": 7861, + "charLength": 3, + "snippet": { + "text": "\t\tBadge(11, CyclopediaBadge_t::ACCOUNT_ALL_LEVEL, \"Global Player (Grade 3)\", 2000),\n\n\t\tBadge(12, CyclopediaBadge_t::ACCOUNT_ALL_VOCATIONS, \"Master Class (Grade 1)\", 100),\n\t\tBadge(13, CyclopediaBadge_t::ACCOUNT_ALL_VOCATIONS, \"Master Class (Grade 2)\", 250),\n\t\tBadge(14, CyclopediaBadge_t::ACCOUNT_ALL_VOCATIONS, \"Master Class (Grade 3)\", 500)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba04850421b010178b51b9077dea3ceae25ee146cdf46fa705554467f7e9c17a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "13 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 219, + "startColumn": 9, + "charOffset": 8040, + "charLength": 2, + "snippet": { + "text": "13" + } + }, + "contextRegion": { + "startLine": 217, + "startColumn": 9, + "charOffset": 7945, + "charLength": 2, + "snippet": { + "text": "\n\t\tBadge(12, CyclopediaBadge_t::ACCOUNT_ALL_VOCATIONS, \"Master Class (Grade 1)\", 100),\n\t\tBadge(13, CyclopediaBadge_t::ACCOUNT_ALL_VOCATIONS, \"Master Class (Grade 2)\", 250),\n\t\tBadge(14, CyclopediaBadge_t::ACCOUNT_ALL_VOCATIONS, \"Master Class (Grade 3)\", 500),\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c48c0bd73b6a2470c3e1cf942b85b94a97f3614567a9197eb18bd3fbdfa5085" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "250 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 219, + "startColumn": 81, + "charOffset": 8112, + "charLength": 3, + "snippet": { + "text": "250" + } + }, + "contextRegion": { + "startLine": 217, + "startColumn": 81, + "charOffset": 7945, + "charLength": 3, + "snippet": { + "text": "\n\t\tBadge(12, CyclopediaBadge_t::ACCOUNT_ALL_VOCATIONS, \"Master Class (Grade 1)\", 100),\n\t\tBadge(13, CyclopediaBadge_t::ACCOUNT_ALL_VOCATIONS, \"Master Class (Grade 2)\", 250),\n\t\tBadge(14, CyclopediaBadge_t::ACCOUNT_ALL_VOCATIONS, \"Master Class (Grade 3)\", 500),\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a3c7290f5ef18719c59a7ea74606a8aa1cb15784b953c23c1048dba00ae3078" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "14 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 220, + "startColumn": 9, + "charOffset": 8126, + "charLength": 2, + "snippet": { + "text": "14" + } + }, + "contextRegion": { + "startLine": 218, + "startColumn": 9, + "charOffset": 7946, + "charLength": 2, + "snippet": { + "text": "\t\tBadge(12, CyclopediaBadge_t::ACCOUNT_ALL_VOCATIONS, \"Master Class (Grade 1)\", 100),\n\t\tBadge(13, CyclopediaBadge_t::ACCOUNT_ALL_VOCATIONS, \"Master Class (Grade 2)\", 250),\n\t\tBadge(14, CyclopediaBadge_t::ACCOUNT_ALL_VOCATIONS, \"Master Class (Grade 3)\", 500),\n\n\t\tBadge(15, CyclopediaBadge_t::TOURNAMENT_PARTICIPATION, \"Freshman of the Tournament\", 1)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72005d3ed2936daeb301f823c0f1735e0f45c76547a4a1fe2fdc6a6411e8c520" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "500 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 220, + "startColumn": 81, + "charOffset": 8198, + "charLength": 3, + "snippet": { + "text": "500" + } + }, + "contextRegion": { + "startLine": 218, + "startColumn": 81, + "charOffset": 7946, + "charLength": 3, + "snippet": { + "text": "\t\tBadge(12, CyclopediaBadge_t::ACCOUNT_ALL_VOCATIONS, \"Master Class (Grade 1)\", 100),\n\t\tBadge(13, CyclopediaBadge_t::ACCOUNT_ALL_VOCATIONS, \"Master Class (Grade 2)\", 250),\n\t\tBadge(14, CyclopediaBadge_t::ACCOUNT_ALL_VOCATIONS, \"Master Class (Grade 3)\", 500),\n\n\t\tBadge(15, CyclopediaBadge_t::TOURNAMENT_PARTICIPATION, \"Freshman of the Tournament\", 1)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce5dafa5f6299659a603d89389ef53b94be37906ab9669eaf61fcec08db9715d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "15 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 222, + "startColumn": 9, + "charOffset": 8213, + "charLength": 2, + "snippet": { + "text": "15" + } + }, + "contextRegion": { + "startLine": 220, + "startColumn": 9, + "charOffset": 8118, + "charLength": 2, + "snippet": { + "text": "\t\tBadge(14, CyclopediaBadge_t::ACCOUNT_ALL_VOCATIONS, \"Master Class (Grade 3)\", 500),\n\n\t\tBadge(15, CyclopediaBadge_t::TOURNAMENT_PARTICIPATION, \"Freshman of the Tournament\", 1),\n\t\tBadge(16, CyclopediaBadge_t::TOURNAMENT_PARTICIPATION, \"Regular of the Tournament\", 5),\n\t\tBadge(17, CyclopediaBadge_t::TOURNAMENT_PARTICIPATION, \"Hero of the Tournament\", 10)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76555cd6d6121bbb148ebbab4a0eda95ef97d5680789ad54b25b55bd1de273b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 223, + "startColumn": 9, + "charOffset": 8304, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 221, + "startColumn": 9, + "charOffset": 8204, + "charLength": 2, + "snippet": { + "text": "\n\t\tBadge(15, CyclopediaBadge_t::TOURNAMENT_PARTICIPATION, \"Freshman of the Tournament\", 1),\n\t\tBadge(16, CyclopediaBadge_t::TOURNAMENT_PARTICIPATION, \"Regular of the Tournament\", 5),\n\t\tBadge(17, CyclopediaBadge_t::TOURNAMENT_PARTICIPATION, \"Hero of the Tournament\", 10),\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1246598789b10116491ec8b3adfe838c7e44f0a562707c7e7dbb851480df15ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 223, + "startColumn": 87, + "charOffset": 8382, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 221, + "startColumn": 87, + "charOffset": 8204, + "charLength": 1, + "snippet": { + "text": "\n\t\tBadge(15, CyclopediaBadge_t::TOURNAMENT_PARTICIPATION, \"Freshman of the Tournament\", 1),\n\t\tBadge(16, CyclopediaBadge_t::TOURNAMENT_PARTICIPATION, \"Regular of the Tournament\", 5),\n\t\tBadge(17, CyclopediaBadge_t::TOURNAMENT_PARTICIPATION, \"Hero of the Tournament\", 10),\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a7302fccdea2f86bc5fd701ff4d6c08e746740ecb120a72a1a7763146573578" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "17 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 224, + "startColumn": 9, + "charOffset": 8394, + "charLength": 2, + "snippet": { + "text": "17" + } + }, + "contextRegion": { + "startLine": 222, + "startColumn": 9, + "charOffset": 8205, + "charLength": 2, + "snippet": { + "text": "\t\tBadge(15, CyclopediaBadge_t::TOURNAMENT_PARTICIPATION, \"Freshman of the Tournament\", 1),\n\t\tBadge(16, CyclopediaBadge_t::TOURNAMENT_PARTICIPATION, \"Regular of the Tournament\", 5),\n\t\tBadge(17, CyclopediaBadge_t::TOURNAMENT_PARTICIPATION, \"Hero of the Tournament\", 10),\n\n\t\tBadge(18, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Competitor\", 1000)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15d77d0bff48b6e22dcb105fa1409677538a9f65d83886f225bdc74cdf401504" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 224, + "startColumn": 84, + "charOffset": 8469, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 222, + "startColumn": 84, + "charOffset": 8205, + "charLength": 2, + "snippet": { + "text": "\t\tBadge(15, CyclopediaBadge_t::TOURNAMENT_PARTICIPATION, \"Freshman of the Tournament\", 1),\n\t\tBadge(16, CyclopediaBadge_t::TOURNAMENT_PARTICIPATION, \"Regular of the Tournament\", 5),\n\t\tBadge(17, CyclopediaBadge_t::TOURNAMENT_PARTICIPATION, \"Hero of the Tournament\", 10),\n\n\t\tBadge(18, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Competitor\", 1000)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bbcd1e141aa47d0ac44a4c85aad0af30cea14c6983b599420047b0b896db1d02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "18 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 9, + "charOffset": 8483, + "charLength": 2, + "snippet": { + "text": "18" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 9, + "charOffset": 8386, + "charLength": 2, + "snippet": { + "text": "\t\tBadge(17, CyclopediaBadge_t::TOURNAMENT_PARTICIPATION, \"Hero of the Tournament\", 10),\n\n\t\tBadge(18, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Competitor\", 1000),\n\t\tBadge(19, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Challenger\", 2500),\n\t\tBadge(20, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Master\", 5000)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0c11617bc091cf2e82a9d9c43f2f5a7e3397148d7ba2d828a19c9a39161bb4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 76, + "charOffset": 8550, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 76, + "charOffset": 8386, + "charLength": 4, + "snippet": { + "text": "\t\tBadge(17, CyclopediaBadge_t::TOURNAMENT_PARTICIPATION, \"Hero of the Tournament\", 10),\n\n\t\tBadge(18, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Competitor\", 1000),\n\t\tBadge(19, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Challenger\", 2500),\n\t\tBadge(20, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Master\", 5000)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5830ecfcb7f3d008695de796b3ddfa1f4548bd3743ade1f8ebe7a8f7d48673fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "19 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 227, + "startColumn": 9, + "charOffset": 8565, + "charLength": 2, + "snippet": { + "text": "19" + } + }, + "contextRegion": { + "startLine": 225, + "startColumn": 9, + "charOffset": 8474, + "charLength": 2, + "snippet": { + "text": "\n\t\tBadge(18, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Competitor\", 1000),\n\t\tBadge(19, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Challenger\", 2500),\n\t\tBadge(20, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Master\", 5000),\n\t\tBadge(21, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Champion\", 10000)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11a6e8043e49f56190d3e50ba2ef08ba6ca0893d1c9169eeed3a302694af1920" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2500 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 227, + "startColumn": 76, + "charOffset": 8632, + "charLength": 4, + "snippet": { + "text": "2500" + } + }, + "contextRegion": { + "startLine": 225, + "startColumn": 76, + "charOffset": 8474, + "charLength": 4, + "snippet": { + "text": "\n\t\tBadge(18, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Competitor\", 1000),\n\t\tBadge(19, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Challenger\", 2500),\n\t\tBadge(20, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Master\", 5000),\n\t\tBadge(21, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Champion\", 10000)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b2191a5545f24294015abc860a75b80f33b6614be4d6694ed04c0cad6027505" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 228, + "startColumn": 9, + "charOffset": 8647, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 226, + "startColumn": 9, + "charOffset": 8475, + "charLength": 2, + "snippet": { + "text": "\t\tBadge(18, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Competitor\", 1000),\n\t\tBadge(19, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Challenger\", 2500),\n\t\tBadge(20, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Master\", 5000),\n\t\tBadge(21, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Champion\", 10000),\n\t};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a30fe570172f860b1a4409d250bd116d7e1de1b1aef03e76cab901ea0055f800" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 228, + "startColumn": 72, + "charOffset": 8710, + "charLength": 4, + "snippet": { + "text": "5000" + } + }, + "contextRegion": { + "startLine": 226, + "startColumn": 72, + "charOffset": 8475, + "charLength": 4, + "snippet": { + "text": "\t\tBadge(18, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Competitor\", 1000),\n\t\tBadge(19, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Challenger\", 2500),\n\t\tBadge(20, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Master\", 5000),\n\t\tBadge(21, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Champion\", 10000),\n\t};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d56495575d624e2e65ffb738b723b6262d11911914127773d23c59d519be1769" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "21 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 229, + "startColumn": 9, + "charOffset": 8725, + "charLength": 2, + "snippet": { + "text": "21" + } + }, + "contextRegion": { + "startLine": 227, + "startColumn": 9, + "charOffset": 8557, + "charLength": 2, + "snippet": { + "text": "\t\tBadge(19, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Challenger\", 2500),\n\t\tBadge(20, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Master\", 5000),\n\t\tBadge(21, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Champion\", 10000),\n\t};\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b030445762d7c38323e9e9cf535102ce52b82d7f5c3a879dfedbf3fa481839f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 229, + "startColumn": 74, + "charOffset": 8790, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 227, + "startColumn": 74, + "charOffset": 8557, + "charLength": 5, + "snippet": { + "text": "\t\tBadge(19, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Challenger\", 2500),\n\t\tBadge(20, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Master\", 5000),\n\t\tBadge(21, CyclopediaBadge_t::TOURNAMENT_POINTS, \"Tournament Champion\", 10000),\n\t};\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "191ae0b825ccca604a30493c4dc5f0d2586c04f57924801daf5fb594b92acd00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 233, + "startColumn": 88, + "charOffset": 8904, + "charLength": 7, + "snippet": { + "text": "1000000" + } + }, + "contextRegion": { + "startLine": 231, + "startColumn": 88, + "charOffset": 8802, + "charLength": 7, + "snippet": { + "text": "\n\tm_titles = {\n\t\tTitle(1, CyclopediaTitle_t::GOLD, \"Gold Hoarder\", \"Earned at least 1,000,000 gold.\", 1000000, false),\n\t\tTitle(2, CyclopediaTitle_t::GOLD, \"Platinum Hoarder\", \"Earned at least 10,000,000 gold.\", 10000000, false),\n\t\tTitle(3, CyclopediaTitle_t::GOLD, \"Crystal Hoarder\", \"Earned at least 100,000,000 gold.\", 100000000, false)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92a6609bcf8c47580f525f31ae58655b0ea162b3c56336107aee60200272ce66" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 234, + "startColumn": 93, + "charOffset": 9013, + "charLength": 8, + "snippet": { + "text": "10000000" + } + }, + "contextRegion": { + "startLine": 232, + "startColumn": 93, + "charOffset": 8803, + "charLength": 8, + "snippet": { + "text": "\tm_titles = {\n\t\tTitle(1, CyclopediaTitle_t::GOLD, \"Gold Hoarder\", \"Earned at least 1,000,000 gold.\", 1000000, false),\n\t\tTitle(2, CyclopediaTitle_t::GOLD, \"Platinum Hoarder\", \"Earned at least 10,000,000 gold.\", 10000000, false),\n\t\tTitle(3, CyclopediaTitle_t::GOLD, \"Crystal Hoarder\", \"Earned at least 100,000,000 gold.\", 100000000, false),\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e02c3e5f103f87a981a4465bc4bd33bcdffe131ee1e1175831602856b7af33d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100000000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 235, + "startColumn": 93, + "charOffset": 9123, + "charLength": 9, + "snippet": { + "text": "100000000" + } + }, + "contextRegion": { + "startLine": 233, + "startColumn": 93, + "charOffset": 8817, + "charLength": 9, + "snippet": { + "text": "\t\tTitle(1, CyclopediaTitle_t::GOLD, \"Gold Hoarder\", \"Earned at least 1,000,000 gold.\", 1000000, false),\n\t\tTitle(2, CyclopediaTitle_t::GOLD, \"Platinum Hoarder\", \"Earned at least 10,000,000 gold.\", 10000000, false),\n\t\tTitle(3, CyclopediaTitle_t::GOLD, \"Crystal Hoarder\", \"Earned at least 100,000,000 gold.\", 100000000, false),\n\n\t\tTitle(4, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 1)\", \"Unlocked 10 or more Mounts.\", 10, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "587f70fd25877a93d885eb4de1ad5a5421eb815293fbb6c57ad24ccb9a2a8d79" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 237, + "startColumn": 96, + "charOffset": 9238, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 235, + "startColumn": 96, + "charOffset": 9031, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(3, CyclopediaTitle_t::GOLD, \"Crystal Hoarder\", \"Earned at least 100,000,000 gold.\", 100000000, false),\n\n\t\tTitle(4, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 1)\", \"Unlocked 10 or more Mounts.\", 10, true),\n\t\tTitle(5, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 2)\", \"Unlocked 20 or more Mounts.\", 20, true),\n\t\tTitle(6, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 3)\", \"Unlocked 30 or more Mounts.\", 30, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fbee61353ebf21b14a3e8bc375b3c6bacd469f8c758069a065bdf34ccdad5135" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 238, + "startColumn": 9, + "charOffset": 9257, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 236, + "startColumn": 9, + "charOffset": 9142, + "charLength": 1, + "snippet": { + "text": "\n\t\tTitle(4, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 1)\", \"Unlocked 10 or more Mounts.\", 10, true),\n\t\tTitle(5, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 2)\", \"Unlocked 20 or more Mounts.\", 20, true),\n\t\tTitle(6, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 3)\", \"Unlocked 30 or more Mounts.\", 30, true),\n\t\tTitle(7, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 4)\", \"Unlocked 40 or more Mounts.\", 40, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d657241837f94b7971e388d9e29f603b56de5a0dcf0a5c68bda567df0f23ba2a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 238, + "startColumn": 96, + "charOffset": 9344, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 236, + "startColumn": 96, + "charOffset": 9142, + "charLength": 2, + "snippet": { + "text": "\n\t\tTitle(4, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 1)\", \"Unlocked 10 or more Mounts.\", 10, true),\n\t\tTitle(5, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 2)\", \"Unlocked 20 or more Mounts.\", 20, true),\n\t\tTitle(6, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 3)\", \"Unlocked 30 or more Mounts.\", 30, true),\n\t\tTitle(7, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 4)\", \"Unlocked 40 or more Mounts.\", 40, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8771bbcf0a6be70e9fbca9432f20dc67730b5517cec0db1a9b2fcbce33fc443b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 239, + "startColumn": 9, + "charOffset": 9363, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 237, + "startColumn": 9, + "charOffset": 9143, + "charLength": 1, + "snippet": { + "text": "\t\tTitle(4, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 1)\", \"Unlocked 10 or more Mounts.\", 10, true),\n\t\tTitle(5, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 2)\", \"Unlocked 20 or more Mounts.\", 20, true),\n\t\tTitle(6, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 3)\", \"Unlocked 30 or more Mounts.\", 30, true),\n\t\tTitle(7, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 4)\", \"Unlocked 40 or more Mounts.\", 40, true),\n\t\tTitle(8, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 5)\", \"Unlocked 50 or more Mounts.\", 50, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72a129714e87c3e029584ab9dc9b149f078cb1dac3533993bfcb78cf8c199223" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 239, + "startColumn": 96, + "charOffset": 9450, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 237, + "startColumn": 96, + "charOffset": 9143, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(4, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 1)\", \"Unlocked 10 or more Mounts.\", 10, true),\n\t\tTitle(5, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 2)\", \"Unlocked 20 or more Mounts.\", 20, true),\n\t\tTitle(6, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 3)\", \"Unlocked 30 or more Mounts.\", 30, true),\n\t\tTitle(7, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 4)\", \"Unlocked 40 or more Mounts.\", 40, true),\n\t\tTitle(8, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 5)\", \"Unlocked 50 or more Mounts.\", 50, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9630dcd9fd228f6281096bd9d4f7e82f2273e8f9f2bb809a364965e5cbf68ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 240, + "startColumn": 9, + "charOffset": 9469, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 238, + "startColumn": 9, + "charOffset": 9249, + "charLength": 1, + "snippet": { + "text": "\t\tTitle(5, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 2)\", \"Unlocked 20 or more Mounts.\", 20, true),\n\t\tTitle(6, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 3)\", \"Unlocked 30 or more Mounts.\", 30, true),\n\t\tTitle(7, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 4)\", \"Unlocked 40 or more Mounts.\", 40, true),\n\t\tTitle(8, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 5)\", \"Unlocked 50 or more Mounts.\", 50, true),\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c17b5ba5e76f2020fe34145f305150915a0ea0932842c33385b99e9adaf68925" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 240, + "startColumn": 96, + "charOffset": 9556, + "charLength": 2, + "snippet": { + "text": "40" + } + }, + "contextRegion": { + "startLine": 238, + "startColumn": 96, + "charOffset": 9249, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(5, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 2)\", \"Unlocked 20 or more Mounts.\", 20, true),\n\t\tTitle(6, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 3)\", \"Unlocked 30 or more Mounts.\", 30, true),\n\t\tTitle(7, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 4)\", \"Unlocked 40 or more Mounts.\", 40, true),\n\t\tTitle(8, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 5)\", \"Unlocked 50 or more Mounts.\", 50, true),\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fad0ee7ec9d3e6b55fc4f77e6a146b958b40638ef66fd786c026ac5ebefe6bb0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 241, + "startColumn": 9, + "charOffset": 9575, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 239, + "startColumn": 9, + "charOffset": 9355, + "charLength": 1, + "snippet": { + "text": "\t\tTitle(6, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 3)\", \"Unlocked 30 or more Mounts.\", 30, true),\n\t\tTitle(7, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 4)\", \"Unlocked 40 or more Mounts.\", 40, true),\n\t\tTitle(8, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 5)\", \"Unlocked 50 or more Mounts.\", 50, true),\n\n\t\tTitle(9, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 1)\", \"Unlocked 10 or more Outfits.\", 10, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "722e17ca9a38cfdcd971e7d760b763506571889e5033daf67eae4aea2af44e0f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 241, + "startColumn": 96, + "charOffset": 9662, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 239, + "startColumn": 96, + "charOffset": 9355, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(6, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 3)\", \"Unlocked 30 or more Mounts.\", 30, true),\n\t\tTitle(7, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 4)\", \"Unlocked 40 or more Mounts.\", 40, true),\n\t\tTitle(8, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 5)\", \"Unlocked 50 or more Mounts.\", 50, true),\n\n\t\tTitle(9, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 1)\", \"Unlocked 10 or more Outfits.\", 10, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c732e6c36370fbec818e220091d78610e968600dfb2b8b695e6437e58d5394db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 243, + "startColumn": 9, + "charOffset": 9682, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 9, + "charOffset": 9567, + "charLength": 1, + "snippet": { + "text": "\t\tTitle(8, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 5)\", \"Unlocked 50 or more Mounts.\", 50, true),\n\n\t\tTitle(9, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 1)\", \"Unlocked 10 or more Outfits.\", 10, true),\n\t\tTitle(10, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 2)\", \"Unlocked 20 or more Outfits.\", 20, true),\n\t\tTitle(11, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 3)\", \"Unlocked 30 or more Outfits.\", 30, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "197e4661fd3d21dd37896a96aa3f180bcf1f5c4a4ada7ea16b59fc1e6ad64928" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 243, + "startColumn": 102, + "charOffset": 9775, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 102, + "charOffset": 9567, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(8, CyclopediaTitle_t::MOUNTS, \"Beaststrider (Grade 5)\", \"Unlocked 50 or more Mounts.\", 50, true),\n\n\t\tTitle(9, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 1)\", \"Unlocked 10 or more Outfits.\", 10, true),\n\t\tTitle(10, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 2)\", \"Unlocked 20 or more Outfits.\", 20, true),\n\t\tTitle(11, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 3)\", \"Unlocked 30 or more Outfits.\", 30, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d5f601dbf40d816a6296a1fb3aadcd93f3482563c79155f0fa18ec5d7b63825" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 244, + "startColumn": 9, + "charOffset": 9794, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 9, + "charOffset": 9673, + "charLength": 2, + "snippet": { + "text": "\n\t\tTitle(9, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 1)\", \"Unlocked 10 or more Outfits.\", 10, true),\n\t\tTitle(10, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 2)\", \"Unlocked 20 or more Outfits.\", 20, true),\n\t\tTitle(11, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 3)\", \"Unlocked 30 or more Outfits.\", 30, true),\n\t\tTitle(12, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 4)\", \"Unlocked 40 or more Outfits.\", 40, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "068b4a3c14a401777586427bd4f9bbf63deb164f35d748d3d96d9773eda06ef7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 244, + "startColumn": 103, + "charOffset": 9888, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 103, + "charOffset": 9673, + "charLength": 2, + "snippet": { + "text": "\n\t\tTitle(9, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 1)\", \"Unlocked 10 or more Outfits.\", 10, true),\n\t\tTitle(10, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 2)\", \"Unlocked 20 or more Outfits.\", 20, true),\n\t\tTitle(11, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 3)\", \"Unlocked 30 or more Outfits.\", 30, true),\n\t\tTitle(12, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 4)\", \"Unlocked 40 or more Outfits.\", 40, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce9deea3272fc2674de9e0944c7351671ca1786899ecb524d64b4af957883978" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "11 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 245, + "startColumn": 9, + "charOffset": 9907, + "charLength": 2, + "snippet": { + "text": "11" + } + }, + "contextRegion": { + "startLine": 243, + "startColumn": 9, + "charOffset": 9674, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(9, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 1)\", \"Unlocked 10 or more Outfits.\", 10, true),\n\t\tTitle(10, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 2)\", \"Unlocked 20 or more Outfits.\", 20, true),\n\t\tTitle(11, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 3)\", \"Unlocked 30 or more Outfits.\", 30, true),\n\t\tTitle(12, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 4)\", \"Unlocked 40 or more Outfits.\", 40, true),\n\t\tTitle(13, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 5)\", \"Unlocked 50 or more Outfits.\", 50, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f001b97cd4bcf188eb219918c0747c70346972ef5c38c09660946097e97a2cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 245, + "startColumn": 103, + "charOffset": 10001, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 243, + "startColumn": 103, + "charOffset": 9674, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(9, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 1)\", \"Unlocked 10 or more Outfits.\", 10, true),\n\t\tTitle(10, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 2)\", \"Unlocked 20 or more Outfits.\", 20, true),\n\t\tTitle(11, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 3)\", \"Unlocked 30 or more Outfits.\", 30, true),\n\t\tTitle(12, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 4)\", \"Unlocked 40 or more Outfits.\", 40, true),\n\t\tTitle(13, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 5)\", \"Unlocked 50 or more Outfits.\", 50, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d7c548452669d8dcebc11b0321ca9b2f725371cf283e5e79b10aa4fea4975f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "12 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 246, + "startColumn": 9, + "charOffset": 10020, + "charLength": 2, + "snippet": { + "text": "12" + } + }, + "contextRegion": { + "startLine": 244, + "startColumn": 9, + "charOffset": 9786, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(10, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 2)\", \"Unlocked 20 or more Outfits.\", 20, true),\n\t\tTitle(11, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 3)\", \"Unlocked 30 or more Outfits.\", 30, true),\n\t\tTitle(12, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 4)\", \"Unlocked 40 or more Outfits.\", 40, true),\n\t\tTitle(13, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 5)\", \"Unlocked 50 or more Outfits.\", 50, true),\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbbe527020fbd99581ee2c5d8768139dd0ed39ce6fcd6db83cc50c83304bb7a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 246, + "startColumn": 103, + "charOffset": 10114, + "charLength": 2, + "snippet": { + "text": "40" + } + }, + "contextRegion": { + "startLine": 244, + "startColumn": 103, + "charOffset": 9786, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(10, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 2)\", \"Unlocked 20 or more Outfits.\", 20, true),\n\t\tTitle(11, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 3)\", \"Unlocked 30 or more Outfits.\", 30, true),\n\t\tTitle(12, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 4)\", \"Unlocked 40 or more Outfits.\", 40, true),\n\t\tTitle(13, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 5)\", \"Unlocked 50 or more Outfits.\", 50, true),\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9452980ad3bac916e0e2663a547c9fb2eb1daa8d52e89471e11cfaf8b6633cb2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "13 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 247, + "startColumn": 9, + "charOffset": 10133, + "charLength": 2, + "snippet": { + "text": "13" + } + }, + "contextRegion": { + "startLine": 245, + "startColumn": 9, + "charOffset": 9899, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(11, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 3)\", \"Unlocked 30 or more Outfits.\", 30, true),\n\t\tTitle(12, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 4)\", \"Unlocked 40 or more Outfits.\", 40, true),\n\t\tTitle(13, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 5)\", \"Unlocked 50 or more Outfits.\", 50, true),\n\n\t\tTitle(14, CyclopediaTitle_t::LEVEL, \"Trolltrasher\", \"Reached level 50.\", 50, false)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc885d49f7b97da570e25232f0394361d8badbc7047d578049409c7422d43309" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 247, + "startColumn": 103, + "charOffset": 10227, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 245, + "startColumn": 103, + "charOffset": 9899, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(11, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 3)\", \"Unlocked 30 or more Outfits.\", 30, true),\n\t\tTitle(12, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 4)\", \"Unlocked 40 or more Outfits.\", 40, true),\n\t\tTitle(13, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 5)\", \"Unlocked 50 or more Outfits.\", 50, true),\n\n\t\tTitle(14, CyclopediaTitle_t::LEVEL, \"Trolltrasher\", \"Reached level 50.\", 50, false)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9465b4984582ca2d2b519abf09a48088900e38c5ed65deb7e0bec1c414237dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "14 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 249, + "startColumn": 9, + "charOffset": 10247, + "charLength": 2, + "snippet": { + "text": "14" + } + }, + "contextRegion": { + "startLine": 247, + "startColumn": 9, + "charOffset": 10125, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(13, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 5)\", \"Unlocked 50 or more Outfits.\", 50, true),\n\n\t\tTitle(14, CyclopediaTitle_t::LEVEL, \"Trolltrasher\", \"Reached level 50.\", 50, false),\n\t\tTitle(15, CyclopediaTitle_t::LEVEL, \"Cyclopscamper\", \"Reached level 100.\", 100, false),\n\t\tTitle(16, CyclopediaTitle_t::LEVEL, \"Dragondouser\", \"Reached level 200.\", 200, false)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a77b89987e35c5def1e1a9efd4f95f3b134cea864eed7ed4d96ea2980548b3c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 249, + "startColumn": 76, + "charOffset": 10314, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 247, + "startColumn": 76, + "charOffset": 10125, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(13, CyclopediaTitle_t::OUTFITS, \"Tibia's Topmodel (Grade 5)\", \"Unlocked 50 or more Outfits.\", 50, true),\n\n\t\tTitle(14, CyclopediaTitle_t::LEVEL, \"Trolltrasher\", \"Reached level 50.\", 50, false),\n\t\tTitle(15, CyclopediaTitle_t::LEVEL, \"Cyclopscamper\", \"Reached level 100.\", 100, false),\n\t\tTitle(16, CyclopediaTitle_t::LEVEL, \"Dragondouser\", \"Reached level 200.\", 200, false)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6634bf0a935c3777b6c046c219fa2016f1ba6b6c9dc10f346c83597a64eef270" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "15 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 250, + "startColumn": 9, + "charOffset": 10334, + "charLength": 2, + "snippet": { + "text": "15" + } + }, + "contextRegion": { + "startLine": 248, + "startColumn": 9, + "charOffset": 10238, + "charLength": 2, + "snippet": { + "text": "\n\t\tTitle(14, CyclopediaTitle_t::LEVEL, \"Trolltrasher\", \"Reached level 50.\", 50, false),\n\t\tTitle(15, CyclopediaTitle_t::LEVEL, \"Cyclopscamper\", \"Reached level 100.\", 100, false),\n\t\tTitle(16, CyclopediaTitle_t::LEVEL, \"Dragondouser\", \"Reached level 200.\", 200, false),\n\t\tTitle(17, CyclopediaTitle_t::LEVEL, \"Demondoom\", \"Reached level 300.\", 300, false)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d60b10af971a3b83206fa4f6a8d1ab6325f2d7b252af4d4eca44c855423a0ce4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 250, + "startColumn": 78, + "charOffset": 10403, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 248, + "startColumn": 78, + "charOffset": 10238, + "charLength": 3, + "snippet": { + "text": "\n\t\tTitle(14, CyclopediaTitle_t::LEVEL, \"Trolltrasher\", \"Reached level 50.\", 50, false),\n\t\tTitle(15, CyclopediaTitle_t::LEVEL, \"Cyclopscamper\", \"Reached level 100.\", 100, false),\n\t\tTitle(16, CyclopediaTitle_t::LEVEL, \"Dragondouser\", \"Reached level 200.\", 200, false),\n\t\tTitle(17, CyclopediaTitle_t::LEVEL, \"Demondoom\", \"Reached level 300.\", 300, false)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d276255529667af8e568a5f3cbcde4a5a3d2a1c899d3c37eee865f83e296b3aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "16 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 251, + "startColumn": 9, + "charOffset": 10424, + "charLength": 2, + "snippet": { + "text": "16" + } + }, + "contextRegion": { + "startLine": 249, + "startColumn": 9, + "charOffset": 10239, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(14, CyclopediaTitle_t::LEVEL, \"Trolltrasher\", \"Reached level 50.\", 50, false),\n\t\tTitle(15, CyclopediaTitle_t::LEVEL, \"Cyclopscamper\", \"Reached level 100.\", 100, false),\n\t\tTitle(16, CyclopediaTitle_t::LEVEL, \"Dragondouser\", \"Reached level 200.\", 200, false),\n\t\tTitle(17, CyclopediaTitle_t::LEVEL, \"Demondoom\", \"Reached level 300.\", 300, false),\n\t\tTitle(18, CyclopediaTitle_t::LEVEL, \"Drakenbane\", \"Reached level 400.\", 400, false)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa54eb7c04181047f8b2b79864a32fdfa7a5d255c466895203fcd5c3d30d4600" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 251, + "startColumn": 77, + "charOffset": 10492, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 249, + "startColumn": 77, + "charOffset": 10239, + "charLength": 3, + "snippet": { + "text": "\t\tTitle(14, CyclopediaTitle_t::LEVEL, \"Trolltrasher\", \"Reached level 50.\", 50, false),\n\t\tTitle(15, CyclopediaTitle_t::LEVEL, \"Cyclopscamper\", \"Reached level 100.\", 100, false),\n\t\tTitle(16, CyclopediaTitle_t::LEVEL, \"Dragondouser\", \"Reached level 200.\", 200, false),\n\t\tTitle(17, CyclopediaTitle_t::LEVEL, \"Demondoom\", \"Reached level 300.\", 300, false),\n\t\tTitle(18, CyclopediaTitle_t::LEVEL, \"Drakenbane\", \"Reached level 400.\", 400, false)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d62c92e83c880ac6c0b8662e9d38df202b4e4dc6fcd496fbd2b2c14143c9c53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "17 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 252, + "startColumn": 9, + "charOffset": 10513, + "charLength": 2, + "snippet": { + "text": "17" + } + }, + "contextRegion": { + "startLine": 250, + "startColumn": 9, + "charOffset": 10326, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(15, CyclopediaTitle_t::LEVEL, \"Cyclopscamper\", \"Reached level 100.\", 100, false),\n\t\tTitle(16, CyclopediaTitle_t::LEVEL, \"Dragondouser\", \"Reached level 200.\", 200, false),\n\t\tTitle(17, CyclopediaTitle_t::LEVEL, \"Demondoom\", \"Reached level 300.\", 300, false),\n\t\tTitle(18, CyclopediaTitle_t::LEVEL, \"Drakenbane\", \"Reached level 400.\", 400, false),\n\t\tTitle(19, CyclopediaTitle_t::LEVEL, \"Silencer\", \"Reached level 500.\", 500, false)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ca398fab6b5b4e7d72cb59856fa8c556d82a2b52131e119e36ca552e97854e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 252, + "startColumn": 74, + "charOffset": 10578, + "charLength": 3, + "snippet": { + "text": "300" + } + }, + "contextRegion": { + "startLine": 250, + "startColumn": 74, + "charOffset": 10326, + "charLength": 3, + "snippet": { + "text": "\t\tTitle(15, CyclopediaTitle_t::LEVEL, \"Cyclopscamper\", \"Reached level 100.\", 100, false),\n\t\tTitle(16, CyclopediaTitle_t::LEVEL, \"Dragondouser\", \"Reached level 200.\", 200, false),\n\t\tTitle(17, CyclopediaTitle_t::LEVEL, \"Demondoom\", \"Reached level 300.\", 300, false),\n\t\tTitle(18, CyclopediaTitle_t::LEVEL, \"Drakenbane\", \"Reached level 400.\", 400, false),\n\t\tTitle(19, CyclopediaTitle_t::LEVEL, \"Silencer\", \"Reached level 500.\", 500, false)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "614f745e52829d04ad70f282bc5996b3a1715cdcff85146b2f35b47b85eef0a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "18 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 253, + "startColumn": 9, + "charOffset": 10599, + "charLength": 2, + "snippet": { + "text": "18" + } + }, + "contextRegion": { + "startLine": 251, + "startColumn": 9, + "charOffset": 10416, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(16, CyclopediaTitle_t::LEVEL, \"Dragondouser\", \"Reached level 200.\", 200, false),\n\t\tTitle(17, CyclopediaTitle_t::LEVEL, \"Demondoom\", \"Reached level 300.\", 300, false),\n\t\tTitle(18, CyclopediaTitle_t::LEVEL, \"Drakenbane\", \"Reached level 400.\", 400, false),\n\t\tTitle(19, CyclopediaTitle_t::LEVEL, \"Silencer\", \"Reached level 500.\", 500, false),\n\t\tTitle(20, CyclopediaTitle_t::LEVEL, \"Exalted\", \"Reached level 1000.\", 1000, false)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "892e0df1ea9e4b538e1e46c2e827f65c80e996d9033ebe983f3e82652bd5f02d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 253, + "startColumn": 75, + "charOffset": 10665, + "charLength": 3, + "snippet": { + "text": "400" + } + }, + "contextRegion": { + "startLine": 251, + "startColumn": 75, + "charOffset": 10416, + "charLength": 3, + "snippet": { + "text": "\t\tTitle(16, CyclopediaTitle_t::LEVEL, \"Dragondouser\", \"Reached level 200.\", 200, false),\n\t\tTitle(17, CyclopediaTitle_t::LEVEL, \"Demondoom\", \"Reached level 300.\", 300, false),\n\t\tTitle(18, CyclopediaTitle_t::LEVEL, \"Drakenbane\", \"Reached level 400.\", 400, false),\n\t\tTitle(19, CyclopediaTitle_t::LEVEL, \"Silencer\", \"Reached level 500.\", 500, false),\n\t\tTitle(20, CyclopediaTitle_t::LEVEL, \"Exalted\", \"Reached level 1000.\", 1000, false)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90613314c705e9cdef79165559fd9b0d021b480d98af7aae74637f0c88ad12eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "19 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 254, + "startColumn": 9, + "charOffset": 10686, + "charLength": 2, + "snippet": { + "text": "19" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 9, + "charOffset": 10505, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(17, CyclopediaTitle_t::LEVEL, \"Demondoom\", \"Reached level 300.\", 300, false),\n\t\tTitle(18, CyclopediaTitle_t::LEVEL, \"Drakenbane\", \"Reached level 400.\", 400, false),\n\t\tTitle(19, CyclopediaTitle_t::LEVEL, \"Silencer\", \"Reached level 500.\", 500, false),\n\t\tTitle(20, CyclopediaTitle_t::LEVEL, \"Exalted\", \"Reached level 1000.\", 1000, false),\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1beef82dc5d93196a74fba3a307cac7b122cc505f50a7d1a4c8eae85dee75d2b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "500 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 254, + "startColumn": 73, + "charOffset": 10750, + "charLength": 3, + "snippet": { + "text": "500" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 73, + "charOffset": 10505, + "charLength": 3, + "snippet": { + "text": "\t\tTitle(17, CyclopediaTitle_t::LEVEL, \"Demondoom\", \"Reached level 300.\", 300, false),\n\t\tTitle(18, CyclopediaTitle_t::LEVEL, \"Drakenbane\", \"Reached level 400.\", 400, false),\n\t\tTitle(19, CyclopediaTitle_t::LEVEL, \"Silencer\", \"Reached level 500.\", 500, false),\n\t\tTitle(20, CyclopediaTitle_t::LEVEL, \"Exalted\", \"Reached level 1000.\", 1000, false),\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "889ac2fea661e63a256cda3b3d277a5a1398d7dd55ccc62a8dd1fd567d5d1047" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 255, + "startColumn": 9, + "charOffset": 10771, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 253, + "startColumn": 9, + "charOffset": 10591, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(18, CyclopediaTitle_t::LEVEL, \"Drakenbane\", \"Reached level 400.\", 400, false),\n\t\tTitle(19, CyclopediaTitle_t::LEVEL, \"Silencer\", \"Reached level 500.\", 500, false),\n\t\tTitle(20, CyclopediaTitle_t::LEVEL, \"Exalted\", \"Reached level 1000.\", 1000, false),\n\n\t\tTitle(21, CyclopediaTitle_t::HIGHSCORES, \"Apex Predator\", \"\", \"Highest Level on character's world.\", static_cast(HighscoreCategories_t::EXPERIENCE))," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b748e708cc92a7f31d5826ba6fd8e97fe40f9d05f7f96f959b68025c251b80c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 255, + "startColumn": 73, + "charOffset": 10835, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 253, + "startColumn": 73, + "charOffset": 10591, + "charLength": 4, + "snippet": { + "text": "\t\tTitle(18, CyclopediaTitle_t::LEVEL, \"Drakenbane\", \"Reached level 400.\", 400, false),\n\t\tTitle(19, CyclopediaTitle_t::LEVEL, \"Silencer\", \"Reached level 500.\", 500, false),\n\t\tTitle(20, CyclopediaTitle_t::LEVEL, \"Exalted\", \"Reached level 1000.\", 1000, false),\n\n\t\tTitle(21, CyclopediaTitle_t::HIGHSCORES, \"Apex Predator\", \"\", \"Highest Level on character's world.\", static_cast(HighscoreCategories_t::EXPERIENCE))," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15a2f8b83a7f1c442212ec385f5fda8e0f77f398b70db2e880c9d8efbe59ea44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "21 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 257, + "startColumn": 9, + "charOffset": 10858, + "charLength": 2, + "snippet": { + "text": "21" + } + }, + "contextRegion": { + "startLine": 255, + "startColumn": 9, + "charOffset": 10763, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(20, CyclopediaTitle_t::LEVEL, \"Exalted\", \"Reached level 1000.\", 1000, false),\n\n\t\tTitle(21, CyclopediaTitle_t::HIGHSCORES, \"Apex Predator\", \"\", \"Highest Level on character's world.\", static_cast(HighscoreCategories_t::EXPERIENCE)),\n\t\tTitle(22, CyclopediaTitle_t::HIGHSCORES, \"Big Boss\", \"\", \"Highest score of accumulated boss points on character's world.\", static_cast(HighscoreCategories_t::BOSS_POINTS)),\n\t\tTitle(23, CyclopediaTitle_t::HIGHSCORES, \"Jack of all Taints\", \"\", \"Highest score for killing Goshnar and his aspects on character's world.\", static_cast(HighscoreCategories_t::GOSHNAR))," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84a539e2e3f047508ad8429a567b1b16d472d208931598d701f89e32dfddb70e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "22 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 258, + "startColumn": 9, + "charOffset": 11019, + "charLength": 2, + "snippet": { + "text": "22" + } + }, + "contextRegion": { + "startLine": 256, + "startColumn": 9, + "charOffset": 10849, + "charLength": 2, + "snippet": { + "text": "\n\t\tTitle(21, CyclopediaTitle_t::HIGHSCORES, \"Apex Predator\", \"\", \"Highest Level on character's world.\", static_cast(HighscoreCategories_t::EXPERIENCE)),\n\t\tTitle(22, CyclopediaTitle_t::HIGHSCORES, \"Big Boss\", \"\", \"Highest score of accumulated boss points on character's world.\", static_cast(HighscoreCategories_t::BOSS_POINTS)),\n\t\tTitle(23, CyclopediaTitle_t::HIGHSCORES, \"Jack of all Taints\", \"\", \"Highest score for killing Goshnar and his aspects on character's world.\", static_cast(HighscoreCategories_t::GOSHNAR)),\n\t\tTitle(24, CyclopediaTitle_t::HIGHSCORES, \"Legend of Fishing\", \"\", \"Highest fishing level on character's world.\", static_cast(HighscoreCategories_t::FISHING))," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c961a95269ce86b76ef46d1719cba77fc24e4ed7aea1641cfcc6eeb59d4aff0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "23 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 259, + "startColumn": 9, + "charOffset": 11203, + "charLength": 2, + "snippet": { + "text": "23" + } + }, + "contextRegion": { + "startLine": 257, + "startColumn": 9, + "charOffset": 10850, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(21, CyclopediaTitle_t::HIGHSCORES, \"Apex Predator\", \"\", \"Highest Level on character's world.\", static_cast(HighscoreCategories_t::EXPERIENCE)),\n\t\tTitle(22, CyclopediaTitle_t::HIGHSCORES, \"Big Boss\", \"\", \"Highest score of accumulated boss points on character's world.\", static_cast(HighscoreCategories_t::BOSS_POINTS)),\n\t\tTitle(23, CyclopediaTitle_t::HIGHSCORES, \"Jack of all Taints\", \"\", \"Highest score for killing Goshnar and his aspects on character's world.\", static_cast(HighscoreCategories_t::GOSHNAR)),\n\t\tTitle(24, CyclopediaTitle_t::HIGHSCORES, \"Legend of Fishing\", \"\", \"Highest fishing level on character's world.\", static_cast(HighscoreCategories_t::FISHING)),\n\t\tTitle(25, CyclopediaTitle_t::HIGHSCORES, \"Legend of Magic\", \"\", \"Highest magic level on character's world.\", static_cast(HighscoreCategories_t::MAGIC_LEVEL))," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb3de1f100e6d630d3f6f13bdc2d087464870af31c1923ed420913eb3be673b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 260, + "startColumn": 9, + "charOffset": 11402, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 258, + "startColumn": 9, + "charOffset": 11011, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(22, CyclopediaTitle_t::HIGHSCORES, \"Big Boss\", \"\", \"Highest score of accumulated boss points on character's world.\", static_cast(HighscoreCategories_t::BOSS_POINTS)),\n\t\tTitle(23, CyclopediaTitle_t::HIGHSCORES, \"Jack of all Taints\", \"\", \"Highest score for killing Goshnar and his aspects on character's world.\", static_cast(HighscoreCategories_t::GOSHNAR)),\n\t\tTitle(24, CyclopediaTitle_t::HIGHSCORES, \"Legend of Fishing\", \"\", \"Highest fishing level on character's world.\", static_cast(HighscoreCategories_t::FISHING)),\n\t\tTitle(25, CyclopediaTitle_t::HIGHSCORES, \"Legend of Magic\", \"\", \"Highest magic level on character's world.\", static_cast(HighscoreCategories_t::MAGIC_LEVEL)),\n\t\tTitle(26, CyclopediaTitle_t::HIGHSCORES, \"Legend of Marksmanship\", \"\", \"Highest distance level on character's world.\", static_cast(HighscoreCategories_t::DISTANCE_FIGHTING))," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2c049e264cda105097d0cb96446e33fac78791e7b232ff7c394b1601b27e9a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 261, + "startColumn": 9, + "charOffset": 11572, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 259, + "startColumn": 9, + "charOffset": 11195, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(23, CyclopediaTitle_t::HIGHSCORES, \"Jack of all Taints\", \"\", \"Highest score for killing Goshnar and his aspects on character's world.\", static_cast(HighscoreCategories_t::GOSHNAR)),\n\t\tTitle(24, CyclopediaTitle_t::HIGHSCORES, \"Legend of Fishing\", \"\", \"Highest fishing level on character's world.\", static_cast(HighscoreCategories_t::FISHING)),\n\t\tTitle(25, CyclopediaTitle_t::HIGHSCORES, \"Legend of Magic\", \"\", \"Highest magic level on character's world.\", static_cast(HighscoreCategories_t::MAGIC_LEVEL)),\n\t\tTitle(26, CyclopediaTitle_t::HIGHSCORES, \"Legend of Marksmanship\", \"\", \"Highest distance level on character's world.\", static_cast(HighscoreCategories_t::DISTANCE_FIGHTING)),\n\t\tTitle(27, CyclopediaTitle_t::HIGHSCORES, \"Legend of the Axe\", \"\", \"Highest axe level on character's world.\", static_cast(HighscoreCategories_t::AXE_FIGHTING))," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb01d4a0571d72573ea25bdf072435f1a8ba3653a7308358a799adcfcbecfc29" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "26 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 262, + "startColumn": 9, + "charOffset": 11742, + "charLength": 2, + "snippet": { + "text": "26" + } + }, + "contextRegion": { + "startLine": 260, + "startColumn": 9, + "charOffset": 11394, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(24, CyclopediaTitle_t::HIGHSCORES, \"Legend of Fishing\", \"\", \"Highest fishing level on character's world.\", static_cast(HighscoreCategories_t::FISHING)),\n\t\tTitle(25, CyclopediaTitle_t::HIGHSCORES, \"Legend of Magic\", \"\", \"Highest magic level on character's world.\", static_cast(HighscoreCategories_t::MAGIC_LEVEL)),\n\t\tTitle(26, CyclopediaTitle_t::HIGHSCORES, \"Legend of Marksmanship\", \"\", \"Highest distance level on character's world.\", static_cast(HighscoreCategories_t::DISTANCE_FIGHTING)),\n\t\tTitle(27, CyclopediaTitle_t::HIGHSCORES, \"Legend of the Axe\", \"\", \"Highest axe level on character's world.\", static_cast(HighscoreCategories_t::AXE_FIGHTING)),\n\t\tTitle(28, CyclopediaTitle_t::HIGHSCORES, \"Legend of the Club\", \"\", \"Highest club level on character's world.\", static_cast(HighscoreCategories_t::CLUB_FIGHTING))," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca23250445d2012cc9cbfa5e0362c688d590984d3c17399091f2222f06563382" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "27 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 263, + "startColumn": 9, + "charOffset": 11928, + "charLength": 2, + "snippet": { + "text": "27" + } + }, + "contextRegion": { + "startLine": 261, + "startColumn": 9, + "charOffset": 11564, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(25, CyclopediaTitle_t::HIGHSCORES, \"Legend of Magic\", \"\", \"Highest magic level on character's world.\", static_cast(HighscoreCategories_t::MAGIC_LEVEL)),\n\t\tTitle(26, CyclopediaTitle_t::HIGHSCORES, \"Legend of Marksmanship\", \"\", \"Highest distance level on character's world.\", static_cast(HighscoreCategories_t::DISTANCE_FIGHTING)),\n\t\tTitle(27, CyclopediaTitle_t::HIGHSCORES, \"Legend of the Axe\", \"\", \"Highest axe level on character's world.\", static_cast(HighscoreCategories_t::AXE_FIGHTING)),\n\t\tTitle(28, CyclopediaTitle_t::HIGHSCORES, \"Legend of the Club\", \"\", \"Highest club level on character's world.\", static_cast(HighscoreCategories_t::CLUB_FIGHTING)),\n\t\tTitle(29, CyclopediaTitle_t::HIGHSCORES, \"Legend of the Fist\", \"\", \"Highest fist level on character's world.\", static_cast(HighscoreCategories_t::FIST_FIGHTING))," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7fd8bc4d89c91953a582c8246b2b0fa8074cfdc8992e8e6b106c8f8167d2b49" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "28 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 264, + "startColumn": 9, + "charOffset": 12099, + "charLength": 2, + "snippet": { + "text": "28" + } + }, + "contextRegion": { + "startLine": 262, + "startColumn": 9, + "charOffset": 11734, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(26, CyclopediaTitle_t::HIGHSCORES, \"Legend of Marksmanship\", \"\", \"Highest distance level on character's world.\", static_cast(HighscoreCategories_t::DISTANCE_FIGHTING)),\n\t\tTitle(27, CyclopediaTitle_t::HIGHSCORES, \"Legend of the Axe\", \"\", \"Highest axe level on character's world.\", static_cast(HighscoreCategories_t::AXE_FIGHTING)),\n\t\tTitle(28, CyclopediaTitle_t::HIGHSCORES, \"Legend of the Club\", \"\", \"Highest club level on character's world.\", static_cast(HighscoreCategories_t::CLUB_FIGHTING)),\n\t\tTitle(29, CyclopediaTitle_t::HIGHSCORES, \"Legend of the Fist\", \"\", \"Highest fist level on character's world.\", static_cast(HighscoreCategories_t::FIST_FIGHTING)),\n\t\tTitle(30, CyclopediaTitle_t::HIGHSCORES, \"Legend of the Shield\", \"\", \"Highest shielding level on character's world.\", static_cast(HighscoreCategories_t::SHIELDING))," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b9bee9a98c74b851d61920e02b5c7933677215190468ead9bc66d94f7a4fcf6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "29 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 265, + "startColumn": 9, + "charOffset": 12273, + "charLength": 2, + "snippet": { + "text": "29" + } + }, + "contextRegion": { + "startLine": 263, + "startColumn": 9, + "charOffset": 11920, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(27, CyclopediaTitle_t::HIGHSCORES, \"Legend of the Axe\", \"\", \"Highest axe level on character's world.\", static_cast(HighscoreCategories_t::AXE_FIGHTING)),\n\t\tTitle(28, CyclopediaTitle_t::HIGHSCORES, \"Legend of the Club\", \"\", \"Highest club level on character's world.\", static_cast(HighscoreCategories_t::CLUB_FIGHTING)),\n\t\tTitle(29, CyclopediaTitle_t::HIGHSCORES, \"Legend of the Fist\", \"\", \"Highest fist level on character's world.\", static_cast(HighscoreCategories_t::FIST_FIGHTING)),\n\t\tTitle(30, CyclopediaTitle_t::HIGHSCORES, \"Legend of the Shield\", \"\", \"Highest shielding level on character's world.\", static_cast(HighscoreCategories_t::SHIELDING)),\n\t\tTitle(31, CyclopediaTitle_t::HIGHSCORES, \"Legend of the Sword\", \"\", \"Highest sword level on character's world.\", static_cast(HighscoreCategories_t::SWORD_FIGHTING))," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "911262fc6ceda4385255bb5d9906b85d67982d4b953783c43d91668c4aa29b8f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 266, + "startColumn": 9, + "charOffset": 12447, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 264, + "startColumn": 9, + "charOffset": 12091, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(28, CyclopediaTitle_t::HIGHSCORES, \"Legend of the Club\", \"\", \"Highest club level on character's world.\", static_cast(HighscoreCategories_t::CLUB_FIGHTING)),\n\t\tTitle(29, CyclopediaTitle_t::HIGHSCORES, \"Legend of the Fist\", \"\", \"Highest fist level on character's world.\", static_cast(HighscoreCategories_t::FIST_FIGHTING)),\n\t\tTitle(30, CyclopediaTitle_t::HIGHSCORES, \"Legend of the Shield\", \"\", \"Highest shielding level on character's world.\", static_cast(HighscoreCategories_t::SHIELDING)),\n\t\tTitle(31, CyclopediaTitle_t::HIGHSCORES, \"Legend of the Sword\", \"\", \"Highest sword level on character's world.\", static_cast(HighscoreCategories_t::SWORD_FIGHTING)),\n\t\tTitle(32, CyclopediaTitle_t::HIGHSCORES, \"Prince Charming\", \"Princess Charming\", \"Highest score of accumulated charm points on character's world.\", static_cast(HighscoreCategories_t::CHARMS))," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4edb3135fe40d5659cac5ef9e2759b136e2696861bb413c860efc561a665d1e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "31 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 267, + "startColumn": 9, + "charOffset": 12624, + "charLength": 2, + "snippet": { + "text": "31" + } + }, + "contextRegion": { + "startLine": 265, + "startColumn": 9, + "charOffset": 12265, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(29, CyclopediaTitle_t::HIGHSCORES, \"Legend of the Fist\", \"\", \"Highest fist level on character's world.\", static_cast(HighscoreCategories_t::FIST_FIGHTING)),\n\t\tTitle(30, CyclopediaTitle_t::HIGHSCORES, \"Legend of the Shield\", \"\", \"Highest shielding level on character's world.\", static_cast(HighscoreCategories_t::SHIELDING)),\n\t\tTitle(31, CyclopediaTitle_t::HIGHSCORES, \"Legend of the Sword\", \"\", \"Highest sword level on character's world.\", static_cast(HighscoreCategories_t::SWORD_FIGHTING)),\n\t\tTitle(32, CyclopediaTitle_t::HIGHSCORES, \"Prince Charming\", \"Princess Charming\", \"Highest score of accumulated charm points on character's world.\", static_cast(HighscoreCategories_t::CHARMS)),\n\t\tTitle(33, CyclopediaTitle_t::HIGHSCORES, \"Reigning Drome Champion\", \"\", \"Finished most recent Tibiadrome rota ranked in the top 5.\", static_cast(HighscoreCategories_t::DROME))," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a5177eb6f20f673311de29ba88b323b4a2a019f9d1810b2ad93961347707eb0e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "32 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 268, + "startColumn": 9, + "charOffset": 12801, + "charLength": 2, + "snippet": { + "text": "32" + } + }, + "contextRegion": { + "startLine": 266, + "startColumn": 9, + "charOffset": 12439, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(30, CyclopediaTitle_t::HIGHSCORES, \"Legend of the Shield\", \"\", \"Highest shielding level on character's world.\", static_cast(HighscoreCategories_t::SHIELDING)),\n\t\tTitle(31, CyclopediaTitle_t::HIGHSCORES, \"Legend of the Sword\", \"\", \"Highest sword level on character's world.\", static_cast(HighscoreCategories_t::SWORD_FIGHTING)),\n\t\tTitle(32, CyclopediaTitle_t::HIGHSCORES, \"Prince Charming\", \"Princess Charming\", \"Highest score of accumulated charm points on character's world.\", static_cast(HighscoreCategories_t::CHARMS)),\n\t\tTitle(33, CyclopediaTitle_t::HIGHSCORES, \"Reigning Drome Champion\", \"\", \"Finished most recent Tibiadrome rota ranked in the top 5.\", static_cast(HighscoreCategories_t::DROME)),\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0488d103b3e4aa802bf03c65511d9040d652d4449be2337458e2bec506f6e069" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "33 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 269, + "startColumn": 9, + "charOffset": 13005, + "charLength": 2, + "snippet": { + "text": "33" + } + }, + "contextRegion": { + "startLine": 267, + "startColumn": 9, + "charOffset": 12616, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(31, CyclopediaTitle_t::HIGHSCORES, \"Legend of the Sword\", \"\", \"Highest sword level on character's world.\", static_cast(HighscoreCategories_t::SWORD_FIGHTING)),\n\t\tTitle(32, CyclopediaTitle_t::HIGHSCORES, \"Prince Charming\", \"Princess Charming\", \"Highest score of accumulated charm points on character's world.\", static_cast(HighscoreCategories_t::CHARMS)),\n\t\tTitle(33, CyclopediaTitle_t::HIGHSCORES, \"Reigning Drome Champion\", \"\", \"Finished most recent Tibiadrome rota ranked in the top 5.\", static_cast(HighscoreCategories_t::DROME)),\n\n\t\tTitle(34, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_HUMANOID), \"Bipedantic\", \"\", \"Unlocked All Humanoid Bestiary entries.\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f2f6ed1ca95aba9f64fe18fe47d0f2b3df9594138dc98934e753011679f6937" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "34 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 271, + "startColumn": 9, + "charOffset": 13194, + "charLength": 2, + "snippet": { + "text": "34" + } + }, + "contextRegion": { + "startLine": 269, + "startColumn": 9, + "charOffset": 12997, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(33, CyclopediaTitle_t::HIGHSCORES, \"Reigning Drome Champion\", \"\", \"Finished most recent Tibiadrome rota ranked in the top 5.\", static_cast(HighscoreCategories_t::DROME)),\n\n\t\tTitle(34, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_HUMANOID), \"Bipedantic\", \"\", \"Unlocked All Humanoid Bestiary entries.\"),\n\t\tTitle(35, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_LYCANTHROPE), \"Blood Moon Hunter\", \"Blood Moon Huntress\", \"Unlocked All Lycanthrope Bestiary entries.\"),\n\t\tTitle(36, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_AMPHIBIC), \"Coldblooded\", \"\", \"Unlocked All Amphibic Bestiary entries.\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4766a5f3d3c58b84b145e6ec36ae049023404417280c528d34be3d6981f41902" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "35 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 272, + "startColumn": 9, + "charOffset": 13357, + "charLength": 2, + "snippet": { + "text": "35" + } + }, + "contextRegion": { + "startLine": 270, + "startColumn": 9, + "charOffset": 13185, + "charLength": 2, + "snippet": { + "text": "\n\t\tTitle(34, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_HUMANOID), \"Bipedantic\", \"\", \"Unlocked All Humanoid Bestiary entries.\"),\n\t\tTitle(35, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_LYCANTHROPE), \"Blood Moon Hunter\", \"Blood Moon Huntress\", \"Unlocked All Lycanthrope Bestiary entries.\"),\n\t\tTitle(36, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_AMPHIBIC), \"Coldblooded\", \"\", \"Unlocked All Amphibic Bestiary entries.\"),\n\t\tTitle(37, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_BIRD), \"Death from Below\", \"\", \"Unlocked all Bird Bestiary entries.\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8eb83d974afad657bb14320401552668cb1180b32a4255062bcdb15a506999a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "36 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 273, + "startColumn": 9, + "charOffset": 13552, + "charLength": 2, + "snippet": { + "text": "36" + } + }, + "contextRegion": { + "startLine": 271, + "startColumn": 9, + "charOffset": 13186, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(34, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_HUMANOID), \"Bipedantic\", \"\", \"Unlocked All Humanoid Bestiary entries.\"),\n\t\tTitle(35, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_LYCANTHROPE), \"Blood Moon Hunter\", \"Blood Moon Huntress\", \"Unlocked All Lycanthrope Bestiary entries.\"),\n\t\tTitle(36, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_AMPHIBIC), \"Coldblooded\", \"\", \"Unlocked All Amphibic Bestiary entries.\"),\n\t\tTitle(37, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_BIRD), \"Death from Below\", \"\", \"Unlocked all Bird Bestiary entries.\"),\n\t\tTitle(38, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_DEMON), \"Demonator\", \"\", \"Unlocked all Demon Bestiary entries.\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "904979bea30ff22042bb69bd17c3d579e86309631f1a3a3c398c06374774c5d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "37 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 274, + "startColumn": 9, + "charOffset": 13716, + "charLength": 2, + "snippet": { + "text": "37" + } + }, + "contextRegion": { + "startLine": 272, + "startColumn": 9, + "charOffset": 13349, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(35, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_LYCANTHROPE), \"Blood Moon Hunter\", \"Blood Moon Huntress\", \"Unlocked All Lycanthrope Bestiary entries.\"),\n\t\tTitle(36, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_AMPHIBIC), \"Coldblooded\", \"\", \"Unlocked All Amphibic Bestiary entries.\"),\n\t\tTitle(37, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_BIRD), \"Death from Below\", \"\", \"Unlocked all Bird Bestiary entries.\"),\n\t\tTitle(38, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_DEMON), \"Demonator\", \"\", \"Unlocked all Demon Bestiary entries.\"),\n\t\tTitle(39, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_DRAGON), \"Dragonslayer\", \"\", \"Unlocked all Dragon Bestiary entries.\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ff017bb9d2fa6344faf7c9492e380e6b0677e5765c5b967654c0e1751a5e4f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "38 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 275, + "startColumn": 9, + "charOffset": 13877, + "charLength": 2, + "snippet": { + "text": "38" + } + }, + "contextRegion": { + "startLine": 273, + "startColumn": 9, + "charOffset": 13544, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(36, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_AMPHIBIC), \"Coldblooded\", \"\", \"Unlocked All Amphibic Bestiary entries.\"),\n\t\tTitle(37, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_BIRD), \"Death from Below\", \"\", \"Unlocked all Bird Bestiary entries.\"),\n\t\tTitle(38, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_DEMON), \"Demonator\", \"\", \"Unlocked all Demon Bestiary entries.\"),\n\t\tTitle(39, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_DRAGON), \"Dragonslayer\", \"\", \"Unlocked all Dragon Bestiary entries.\"),\n\t\tTitle(40, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_ELEMENTAL), \"Elementalist\", \"\", \"Unlocked all Elemental Bestiary entries.\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7722bad0dd486f80b863ebaa4da79bbc94c2f9c90c1a27714777636a8fbd60c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "39 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 276, + "startColumn": 9, + "charOffset": 14033, + "charLength": 2, + "snippet": { + "text": "39" + } + }, + "contextRegion": { + "startLine": 274, + "startColumn": 9, + "charOffset": 13708, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(37, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_BIRD), \"Death from Below\", \"\", \"Unlocked all Bird Bestiary entries.\"),\n\t\tTitle(38, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_DEMON), \"Demonator\", \"\", \"Unlocked all Demon Bestiary entries.\"),\n\t\tTitle(39, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_DRAGON), \"Dragonslayer\", \"\", \"Unlocked all Dragon Bestiary entries.\"),\n\t\tTitle(40, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_ELEMENTAL), \"Elementalist\", \"\", \"Unlocked all Elemental Bestiary entries.\"),\n\t\tTitle(41, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_VERMIN), \"Exterminator\", \"\", \"Unlocked all Vermin Bestiary entries.\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab806a35350436b168d15517fa09523c4fd3fc267005f37b3a30766048f48821" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 277, + "startColumn": 9, + "charOffset": 14194, + "charLength": 2, + "snippet": { + "text": "40" + } + }, + "contextRegion": { + "startLine": 275, + "startColumn": 9, + "charOffset": 13869, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(38, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_DEMON), \"Demonator\", \"\", \"Unlocked all Demon Bestiary entries.\"),\n\t\tTitle(39, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_DRAGON), \"Dragonslayer\", \"\", \"Unlocked all Dragon Bestiary entries.\"),\n\t\tTitle(40, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_ELEMENTAL), \"Elementalist\", \"\", \"Unlocked all Elemental Bestiary entries.\"),\n\t\tTitle(41, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_VERMIN), \"Exterminator\", \"\", \"Unlocked all Vermin Bestiary entries.\"),\n\t\tTitle(42, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_FEY), \"Fey Swatter\", \"\", \"Unlocked all Fey Bestiary entries.\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21de8e96d6f407274025e18940aafc42066d5b8f3021a6899855d248b4e0a6e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "41 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 278, + "startColumn": 9, + "charOffset": 14361, + "charLength": 2, + "snippet": { + "text": "41" + } + }, + "contextRegion": { + "startLine": 276, + "startColumn": 9, + "charOffset": 14025, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(39, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_DRAGON), \"Dragonslayer\", \"\", \"Unlocked all Dragon Bestiary entries.\"),\n\t\tTitle(40, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_ELEMENTAL), \"Elementalist\", \"\", \"Unlocked all Elemental Bestiary entries.\"),\n\t\tTitle(41, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_VERMIN), \"Exterminator\", \"\", \"Unlocked all Vermin Bestiary entries.\"),\n\t\tTitle(42, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_FEY), \"Fey Swatter\", \"\", \"Unlocked all Fey Bestiary entries.\"),\n\t\tTitle(43, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_UNDEAD), \"Ghosthunter\", \"Ghosthuntress\", \"Unlocked all Undead Bestiary entries.\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cdfdfd1baa0a2b643843081590ca4e1af1c99dfe492012cb17733175d5ebf49f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "42 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 279, + "startColumn": 9, + "charOffset": 14522, + "charLength": 2, + "snippet": { + "text": "42" + } + }, + "contextRegion": { + "startLine": 277, + "startColumn": 9, + "charOffset": 14186, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(40, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_ELEMENTAL), \"Elementalist\", \"\", \"Unlocked all Elemental Bestiary entries.\"),\n\t\tTitle(41, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_VERMIN), \"Exterminator\", \"\", \"Unlocked all Vermin Bestiary entries.\"),\n\t\tTitle(42, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_FEY), \"Fey Swatter\", \"\", \"Unlocked all Fey Bestiary entries.\"),\n\t\tTitle(43, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_UNDEAD), \"Ghosthunter\", \"Ghosthuntress\", \"Unlocked all Undead Bestiary entries.\"),\n\t\tTitle(44, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_CONSTRUCT), \"Handyman\", \"Handywoman\", \"Unlocked all Construct Bestiary entries.\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "008394a0302130d06cb751f4a76244aee4b95c353df91db0d71fa41f6989681d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "43 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 280, + "startColumn": 9, + "charOffset": 14676, + "charLength": 2, + "snippet": { + "text": "43" + } + }, + "contextRegion": { + "startLine": 278, + "startColumn": 9, + "charOffset": 14353, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(41, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_VERMIN), \"Exterminator\", \"\", \"Unlocked all Vermin Bestiary entries.\"),\n\t\tTitle(42, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_FEY), \"Fey Swatter\", \"\", \"Unlocked all Fey Bestiary entries.\"),\n\t\tTitle(43, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_UNDEAD), \"Ghosthunter\", \"Ghosthuntress\", \"Unlocked all Undead Bestiary entries.\"),\n\t\tTitle(44, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_CONSTRUCT), \"Handyman\", \"Handywoman\", \"Unlocked all Construct Bestiary entries.\"),\n\t\tTitle(45, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_MAMMAL), \"Huntsman\", \"Huntress\", \"Unlocked all Mammal Bestiary entries.\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09fd17034b15d621e44f7d2e71f4dbbf0834f5f8dd0ce148934355183473b09b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "44 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 281, + "startColumn": 9, + "charOffset": 14849, + "charLength": 2, + "snippet": { + "text": "44" + } + }, + "contextRegion": { + "startLine": 279, + "startColumn": 9, + "charOffset": 14514, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(42, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_FEY), \"Fey Swatter\", \"\", \"Unlocked all Fey Bestiary entries.\"),\n\t\tTitle(43, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_UNDEAD), \"Ghosthunter\", \"Ghosthuntress\", \"Unlocked all Undead Bestiary entries.\"),\n\t\tTitle(44, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_CONSTRUCT), \"Handyman\", \"Handywoman\", \"Unlocked all Construct Bestiary entries.\"),\n\t\tTitle(45, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_MAMMAL), \"Huntsman\", \"Huntress\", \"Unlocked all Mammal Bestiary entries.\"),\n\t\tTitle(46, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_EXTRA_DIMENSIONAL), \"Interdimensional Destroyer\", \"\", \"Unlocked all Extra Dimensional Bestiary entries.\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "730b9e664b61f7ec973ce51a7a75b3261fda2f854ab61b06b8b65c8274a09009" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "45 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 282, + "startColumn": 9, + "charOffset": 15022, + "charLength": 2, + "snippet": { + "text": "45" + } + }, + "contextRegion": { + "startLine": 280, + "startColumn": 9, + "charOffset": 14668, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(43, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_UNDEAD), \"Ghosthunter\", \"Ghosthuntress\", \"Unlocked all Undead Bestiary entries.\"),\n\t\tTitle(44, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_CONSTRUCT), \"Handyman\", \"Handywoman\", \"Unlocked all Construct Bestiary entries.\"),\n\t\tTitle(45, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_MAMMAL), \"Huntsman\", \"Huntress\", \"Unlocked all Mammal Bestiary entries.\"),\n\t\tTitle(46, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_EXTRA_DIMENSIONAL), \"Interdimensional Destroyer\", \"\", \"Unlocked all Extra Dimensional Bestiary entries.\"),\n\t\tTitle(47, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_HUMAN), \"Manhunter\", \"Manhuntress\", \"Unlocked all Human Bestiary entries.\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "068c944508a8d980a2c4654fa0b329fc50b563ccc4c9df1236fca413d3b8f900" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "46 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 283, + "startColumn": 9, + "charOffset": 15187, + "charLength": 2, + "snippet": { + "text": "46" + } + }, + "contextRegion": { + "startLine": 281, + "startColumn": 9, + "charOffset": 14841, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(44, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_CONSTRUCT), \"Handyman\", \"Handywoman\", \"Unlocked all Construct Bestiary entries.\"),\n\t\tTitle(45, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_MAMMAL), \"Huntsman\", \"Huntress\", \"Unlocked all Mammal Bestiary entries.\"),\n\t\tTitle(46, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_EXTRA_DIMENSIONAL), \"Interdimensional Destroyer\", \"\", \"Unlocked all Extra Dimensional Bestiary entries.\"),\n\t\tTitle(47, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_HUMAN), \"Manhunter\", \"Manhuntress\", \"Unlocked all Human Bestiary entries.\"),\n\t\tTitle(48, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_MAGICAL), \"Master of Illusion\", \"Mistress of Illusion\", \"Unlocked all Magical Bestiary entries.\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b85a7199aedc72914c6c9587860f520510c8ba24f230af71f869707b9cea1a96" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "47 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 284, + "startColumn": 9, + "charOffset": 15384, + "charLength": 2, + "snippet": { + "text": "47" + } + }, + "contextRegion": { + "startLine": 282, + "startColumn": 9, + "charOffset": 15014, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(45, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_MAMMAL), \"Huntsman\", \"Huntress\", \"Unlocked all Mammal Bestiary entries.\"),\n\t\tTitle(46, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_EXTRA_DIMENSIONAL), \"Interdimensional Destroyer\", \"\", \"Unlocked all Extra Dimensional Bestiary entries.\"),\n\t\tTitle(47, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_HUMAN), \"Manhunter\", \"Manhuntress\", \"Unlocked all Human Bestiary entries.\"),\n\t\tTitle(48, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_MAGICAL), \"Master of Illusion\", \"Mistress of Illusion\", \"Unlocked all Magical Bestiary entries.\"),\n\t\tTitle(49, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_SLIME), \"Ooze Blues\", \"\", \"Unlocked all Slime Bestiary entries.\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2062531eb3d353a60c9e5fe1cff1e2b4e6d7a75a691da411f16b1245e2b2ae39" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "48 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 285, + "startColumn": 9, + "charOffset": 15551, + "charLength": 2, + "snippet": { + "text": "48" + } + }, + "contextRegion": { + "startLine": 283, + "startColumn": 9, + "charOffset": 15179, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(46, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_EXTRA_DIMENSIONAL), \"Interdimensional Destroyer\", \"\", \"Unlocked all Extra Dimensional Bestiary entries.\"),\n\t\tTitle(47, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_HUMAN), \"Manhunter\", \"Manhuntress\", \"Unlocked all Human Bestiary entries.\"),\n\t\tTitle(48, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_MAGICAL), \"Master of Illusion\", \"Mistress of Illusion\", \"Unlocked all Magical Bestiary entries.\"),\n\t\tTitle(49, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_SLIME), \"Ooze Blues\", \"\", \"Unlocked all Slime Bestiary entries.\"),\n\t\tTitle(50, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_AQUATIC), \"Sea Bane\", \"\", \"Unlocked all Aquatic Bestiary entries.\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "063c47a740e158987747633e98207c992dbc4af4f57bc4767cbfc7fb2cbdc132" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "49 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 286, + "startColumn": 9, + "charOffset": 15740, + "charLength": 2, + "snippet": { + "text": "49" + } + }, + "contextRegion": { + "startLine": 284, + "startColumn": 9, + "charOffset": 15376, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(47, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_HUMAN), \"Manhunter\", \"Manhuntress\", \"Unlocked all Human Bestiary entries.\"),\n\t\tTitle(48, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_MAGICAL), \"Master of Illusion\", \"Mistress of Illusion\", \"Unlocked all Magical Bestiary entries.\"),\n\t\tTitle(49, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_SLIME), \"Ooze Blues\", \"\", \"Unlocked all Slime Bestiary entries.\"),\n\t\tTitle(50, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_AQUATIC), \"Sea Bane\", \"\", \"Unlocked all Aquatic Bestiary entries.\"),\n\t\tTitle(51, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_REPTILE), \"Snake Charmer\", \"\", \"Unlocked all Reptile Bestiary entries.\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0895a5ef8e3bf961dc03d26a08cc911fb79f10fd97d543bace652c1c1290ddf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 287, + "startColumn": 9, + "charOffset": 15897, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 285, + "startColumn": 9, + "charOffset": 15543, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(48, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_MAGICAL), \"Master of Illusion\", \"Mistress of Illusion\", \"Unlocked all Magical Bestiary entries.\"),\n\t\tTitle(49, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_SLIME), \"Ooze Blues\", \"\", \"Unlocked all Slime Bestiary entries.\"),\n\t\tTitle(50, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_AQUATIC), \"Sea Bane\", \"\", \"Unlocked all Aquatic Bestiary entries.\"),\n\t\tTitle(51, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_REPTILE), \"Snake Charmer\", \"\", \"Unlocked all Reptile Bestiary entries.\"),\n\t\tTitle(52, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_GIANT), \"Tumbler\", \"\", \"Unlocked all Giant Bestiary entries.\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb45ad73d50e1a52f8dfd34e1e40ace794de7e8039aacb16b899cda458892781" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "51 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 288, + "startColumn": 9, + "charOffset": 16056, + "charLength": 2, + "snippet": { + "text": "51" + } + }, + "contextRegion": { + "startLine": 286, + "startColumn": 9, + "charOffset": 15732, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(49, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_SLIME), \"Ooze Blues\", \"\", \"Unlocked all Slime Bestiary entries.\"),\n\t\tTitle(50, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_AQUATIC), \"Sea Bane\", \"\", \"Unlocked all Aquatic Bestiary entries.\"),\n\t\tTitle(51, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_REPTILE), \"Snake Charmer\", \"\", \"Unlocked all Reptile Bestiary entries.\"),\n\t\tTitle(52, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_GIANT), \"Tumbler\", \"\", \"Unlocked all Giant Bestiary entries.\"),\n\t\tTitle(53, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_PLANT), \"Weedkiller\", \"\", \"Unlocked all Plant Bestiary entries.\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "475058ae6390936bda5d33a73ccd92dfd4fe548e2d47d8db0b926e1dcd8e23ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "52 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 289, + "startColumn": 9, + "charOffset": 16220, + "charLength": 2, + "snippet": { + "text": "52" + } + }, + "contextRegion": { + "startLine": 287, + "startColumn": 9, + "charOffset": 15889, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(50, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_AQUATIC), \"Sea Bane\", \"\", \"Unlocked all Aquatic Bestiary entries.\"),\n\t\tTitle(51, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_REPTILE), \"Snake Charmer\", \"\", \"Unlocked all Reptile Bestiary entries.\"),\n\t\tTitle(52, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_GIANT), \"Tumbler\", \"\", \"Unlocked all Giant Bestiary entries.\"),\n\t\tTitle(53, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_PLANT), \"Weedkiller\", \"\", \"Unlocked all Plant Bestiary entries.\"),\n\t\tTitle(54, CyclopediaTitle_t::BESTIARY, 0, \"Executioner\", \"\", \"Unlocked all Bestiary entries.\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a912f8ab6311515f85308c3b3e8d63c98f90599991d51c74d2bdea04708ce7b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "53 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 290, + "startColumn": 9, + "charOffset": 16374, + "charLength": 2, + "snippet": { + "text": "53" + } + }, + "contextRegion": { + "startLine": 288, + "startColumn": 9, + "charOffset": 16048, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(51, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_REPTILE), \"Snake Charmer\", \"\", \"Unlocked all Reptile Bestiary entries.\"),\n\t\tTitle(52, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_GIANT), \"Tumbler\", \"\", \"Unlocked all Giant Bestiary entries.\"),\n\t\tTitle(53, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_PLANT), \"Weedkiller\", \"\", \"Unlocked all Plant Bestiary entries.\"),\n\t\tTitle(54, CyclopediaTitle_t::BESTIARY, 0, \"Executioner\", \"\", \"Unlocked all Bestiary entries.\"),\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be85961f79556a62ecae222ed694e59a9bef12259421060c18fe185e20359d72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "54 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 291, + "startColumn": 9, + "charOffset": 16531, + "charLength": 2, + "snippet": { + "text": "54" + } + }, + "contextRegion": { + "startLine": 289, + "startColumn": 9, + "charOffset": 16212, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(52, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_GIANT), \"Tumbler\", \"\", \"Unlocked all Giant Bestiary entries.\"),\n\t\tTitle(53, CyclopediaTitle_t::BESTIARY, static_cast(BestiaryType_t::BESTY_RACE_PLANT), \"Weedkiller\", \"\", \"Unlocked all Plant Bestiary entries.\"),\n\t\tTitle(54, CyclopediaTitle_t::BESTIARY, 0, \"Executioner\", \"\", \"Unlocked all Bestiary entries.\"),\n\n\t\tTitle(55, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_NEMESIS), \"Boss Annihilator\", \"\", \"Unlocked all Nemesis bosses.\", 0, false)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a973873afc6d4119b86010632106ab311c8672cf0457fcc06b172a7f0e39fe13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "55 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 293, + "startColumn": 9, + "charOffset": 16630, + "charLength": 2, + "snippet": { + "text": "55" + } + }, + "contextRegion": { + "startLine": 291, + "startColumn": 9, + "charOffset": 16523, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(54, CyclopediaTitle_t::BESTIARY, 0, \"Executioner\", \"\", \"Unlocked all Bestiary entries.\"),\n\n\t\tTitle(55, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_NEMESIS), \"Boss Annihilator\", \"\", \"Unlocked all Nemesis bosses.\", 0, false),\n\t\tTitle(56, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_ARCHFOE), \"Boss Destroyer\", \"\", \"Unlocked 10 or more Archfoe bosses.\", 10, true),\n\t\tTitle(57, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_NEMESIS), \"Boss Devastator\", \"\", \"Unlocked 10 or more Nemesis bosses.\", 10, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c0b177b16cde2de1b2cd59a3755d87d4c1e16f025a124ced1ce7265aebfc996" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "56 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 294, + "startColumn": 9, + "charOffset": 16797, + "charLength": 2, + "snippet": { + "text": "56" + } + }, + "contextRegion": { + "startLine": 292, + "startColumn": 9, + "charOffset": 16621, + "charLength": 2, + "snippet": { + "text": "\n\t\tTitle(55, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_NEMESIS), \"Boss Annihilator\", \"\", \"Unlocked all Nemesis bosses.\", 0, false),\n\t\tTitle(56, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_ARCHFOE), \"Boss Destroyer\", \"\", \"Unlocked 10 or more Archfoe bosses.\", 10, true),\n\t\tTitle(57, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_NEMESIS), \"Boss Devastator\", \"\", \"Unlocked 10 or more Nemesis bosses.\", 10, true),\n\t\tTitle(58, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_ARCHFOE), \"Boss Eraser\", \"\", \"Unlocked all Archfoe bosses.\", 0, false)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b12c5bfaf8d8e70aa6a73c2d7647ec6fc1151665c5be55951acfbf352c5fe2a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 294, + "startColumn": 162, + "charOffset": 16950, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 292, + "startColumn": 162, + "charOffset": 16621, + "charLength": 2, + "snippet": { + "text": "\n\t\tTitle(55, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_NEMESIS), \"Boss Annihilator\", \"\", \"Unlocked all Nemesis bosses.\", 0, false),\n\t\tTitle(56, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_ARCHFOE), \"Boss Destroyer\", \"\", \"Unlocked 10 or more Archfoe bosses.\", 10, true),\n\t\tTitle(57, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_NEMESIS), \"Boss Devastator\", \"\", \"Unlocked 10 or more Nemesis bosses.\", 10, true),\n\t\tTitle(58, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_ARCHFOE), \"Boss Eraser\", \"\", \"Unlocked all Archfoe bosses.\", 0, false)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00de139830dea726aa228b039bfae77e3738ab9eef41138edb0885ab0421dd5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "57 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 295, + "startColumn": 9, + "charOffset": 16969, + "charLength": 2, + "snippet": { + "text": "57" + } + }, + "contextRegion": { + "startLine": 293, + "startColumn": 9, + "charOffset": 16622, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(55, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_NEMESIS), \"Boss Annihilator\", \"\", \"Unlocked all Nemesis bosses.\", 0, false),\n\t\tTitle(56, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_ARCHFOE), \"Boss Destroyer\", \"\", \"Unlocked 10 or more Archfoe bosses.\", 10, true),\n\t\tTitle(57, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_NEMESIS), \"Boss Devastator\", \"\", \"Unlocked 10 or more Nemesis bosses.\", 10, true),\n\t\tTitle(58, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_ARCHFOE), \"Boss Eraser\", \"\", \"Unlocked all Archfoe bosses.\", 0, false),\n\t\tTitle(59, CyclopediaTitle_t::BOSSTIARY, 0, \"Boss Executioner\", \"\", \"Unlocked all bosses.\", 0, false)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0bd53cabb4fdbc41aeffb307f67e7ffcc4a88f985a420da8050c49e57d55720" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 295, + "startColumn": 163, + "charOffset": 17123, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 293, + "startColumn": 163, + "charOffset": 16622, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(55, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_NEMESIS), \"Boss Annihilator\", \"\", \"Unlocked all Nemesis bosses.\", 0, false),\n\t\tTitle(56, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_ARCHFOE), \"Boss Destroyer\", \"\", \"Unlocked 10 or more Archfoe bosses.\", 10, true),\n\t\tTitle(57, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_NEMESIS), \"Boss Devastator\", \"\", \"Unlocked 10 or more Nemesis bosses.\", 10, true),\n\t\tTitle(58, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_ARCHFOE), \"Boss Eraser\", \"\", \"Unlocked all Archfoe bosses.\", 0, false),\n\t\tTitle(59, CyclopediaTitle_t::BOSSTIARY, 0, \"Boss Executioner\", \"\", \"Unlocked all bosses.\", 0, false)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f28f5ca4a634b3de8974b44b6606b5bb2226fbc829bd82aa4ee8cfe57409ece" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "58 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 296, + "startColumn": 9, + "charOffset": 17142, + "charLength": 2, + "snippet": { + "text": "58" + } + }, + "contextRegion": { + "startLine": 294, + "startColumn": 9, + "charOffset": 16789, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(56, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_ARCHFOE), \"Boss Destroyer\", \"\", \"Unlocked 10 or more Archfoe bosses.\", 10, true),\n\t\tTitle(57, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_NEMESIS), \"Boss Devastator\", \"\", \"Unlocked 10 or more Nemesis bosses.\", 10, true),\n\t\tTitle(58, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_ARCHFOE), \"Boss Eraser\", \"\", \"Unlocked all Archfoe bosses.\", 0, false),\n\t\tTitle(59, CyclopediaTitle_t::BOSSTIARY, 0, \"Boss Executioner\", \"\", \"Unlocked all bosses.\", 0, false),\n\t\tTitle(60, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_BANE), \"Boss Hunter\", \"\", \"Unlocked 10 or more Bane bosses.\", 10, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b783a91b9f80a235e85aa0df11cafea018902ac6438d87030486f7034a95cd2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "59 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 297, + "startColumn": 9, + "charOffset": 17304, + "charLength": 2, + "snippet": { + "text": "59" + } + }, + "contextRegion": { + "startLine": 295, + "startColumn": 9, + "charOffset": 16961, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(57, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_NEMESIS), \"Boss Devastator\", \"\", \"Unlocked 10 or more Nemesis bosses.\", 10, true),\n\t\tTitle(58, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_ARCHFOE), \"Boss Eraser\", \"\", \"Unlocked all Archfoe bosses.\", 0, false),\n\t\tTitle(59, CyclopediaTitle_t::BOSSTIARY, 0, \"Boss Executioner\", \"\", \"Unlocked all bosses.\", 0, false),\n\t\tTitle(60, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_BANE), \"Boss Hunter\", \"\", \"Unlocked 10 or more Bane bosses.\", 10, true),\n\t\tTitle(61, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_NEMESIS), \"Boss Obliterator\", \"\", \"Unlocked 40 or more Nemesis bosses.\", 40, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d77abd12edd1ee80b73db4d4457f3344f5ca8afdffa05946755948c2dbad3528" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 298, + "startColumn": 9, + "charOffset": 17408, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 296, + "startColumn": 9, + "charOffset": 17134, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(58, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_ARCHFOE), \"Boss Eraser\", \"\", \"Unlocked all Archfoe bosses.\", 0, false),\n\t\tTitle(59, CyclopediaTitle_t::BOSSTIARY, 0, \"Boss Executioner\", \"\", \"Unlocked all bosses.\", 0, false),\n\t\tTitle(60, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_BANE), \"Boss Hunter\", \"\", \"Unlocked 10 or more Bane bosses.\", 10, true),\n\t\tTitle(61, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_NEMESIS), \"Boss Obliterator\", \"\", \"Unlocked 40 or more Nemesis bosses.\", 40, true),\n\t\tTitle(62, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_BANE), \"Boss Slayer\", \"\", \"Unlocked all Bane bosses.\", 0, false)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7bbda91da98016c79ddce678a6772b5a99dd9f3b7cdfcd3c614c5139f934d623" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 298, + "startColumn": 153, + "charOffset": 17552, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 296, + "startColumn": 153, + "charOffset": 17134, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(58, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_ARCHFOE), \"Boss Eraser\", \"\", \"Unlocked all Archfoe bosses.\", 0, false),\n\t\tTitle(59, CyclopediaTitle_t::BOSSTIARY, 0, \"Boss Executioner\", \"\", \"Unlocked all bosses.\", 0, false),\n\t\tTitle(60, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_BANE), \"Boss Hunter\", \"\", \"Unlocked 10 or more Bane bosses.\", 10, true),\n\t\tTitle(61, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_NEMESIS), \"Boss Obliterator\", \"\", \"Unlocked 40 or more Nemesis bosses.\", 40, true),\n\t\tTitle(62, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_BANE), \"Boss Slayer\", \"\", \"Unlocked all Bane bosses.\", 0, false)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3da69408c7aa9d0ce54b6acdc0d434daf0c6f0d18b05ff5bc1ac2c0954e03e77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "61 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 299, + "startColumn": 9, + "charOffset": 17571, + "charLength": 2, + "snippet": { + "text": "61" + } + }, + "contextRegion": { + "startLine": 297, + "startColumn": 9, + "charOffset": 17296, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(59, CyclopediaTitle_t::BOSSTIARY, 0, \"Boss Executioner\", \"\", \"Unlocked all bosses.\", 0, false),\n\t\tTitle(60, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_BANE), \"Boss Hunter\", \"\", \"Unlocked 10 or more Bane bosses.\", 10, true),\n\t\tTitle(61, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_NEMESIS), \"Boss Obliterator\", \"\", \"Unlocked 40 or more Nemesis bosses.\", 40, true),\n\t\tTitle(62, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_BANE), \"Boss Slayer\", \"\", \"Unlocked all Bane bosses.\", 0, false),\n\t\tTitle(63, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_ARCHFOE), \"Boss Smiter\", \"\", \"Unlocked 40 or more Archfoe bosses.\", 40, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "57e6605c62fd57de3a2d8f218227b0e9a8fa5fa0e3f35327f0a92f4a4304b06d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 299, + "startColumn": 164, + "charOffset": 17726, + "charLength": 2, + "snippet": { + "text": "40" + } + }, + "contextRegion": { + "startLine": 297, + "startColumn": 164, + "charOffset": 17296, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(59, CyclopediaTitle_t::BOSSTIARY, 0, \"Boss Executioner\", \"\", \"Unlocked all bosses.\", 0, false),\n\t\tTitle(60, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_BANE), \"Boss Hunter\", \"\", \"Unlocked 10 or more Bane bosses.\", 10, true),\n\t\tTitle(61, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_NEMESIS), \"Boss Obliterator\", \"\", \"Unlocked 40 or more Nemesis bosses.\", 40, true),\n\t\tTitle(62, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_BANE), \"Boss Slayer\", \"\", \"Unlocked all Bane bosses.\", 0, false),\n\t\tTitle(63, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_ARCHFOE), \"Boss Smiter\", \"\", \"Unlocked 40 or more Archfoe bosses.\", 40, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03e49983f4877bc7525a2b9c5c04cd494e2316125805e88c8278ff6a18458974" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "62 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 300, + "startColumn": 9, + "charOffset": 17745, + "charLength": 2, + "snippet": { + "text": "62" + } + }, + "contextRegion": { + "startLine": 298, + "startColumn": 9, + "charOffset": 17400, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(60, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_BANE), \"Boss Hunter\", \"\", \"Unlocked 10 or more Bane bosses.\", 10, true),\n\t\tTitle(61, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_NEMESIS), \"Boss Obliterator\", \"\", \"Unlocked 40 or more Nemesis bosses.\", 40, true),\n\t\tTitle(62, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_BANE), \"Boss Slayer\", \"\", \"Unlocked all Bane bosses.\", 0, false),\n\t\tTitle(63, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_ARCHFOE), \"Boss Smiter\", \"\", \"Unlocked 40 or more Archfoe bosses.\", 40, true),\n\t\tTitle(64, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_BANE), \"Boss Veteran\", \"\", \"Unlocked 40 or more Bane bosses.\", 40, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb766456d237f9d5f05da1da5fd11a5a0829ad9299d6f2e24d03b8170dc05b75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "63 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 301, + "startColumn": 9, + "charOffset": 17901, + "charLength": 2, + "snippet": { + "text": "63" + } + }, + "contextRegion": { + "startLine": 299, + "startColumn": 9, + "charOffset": 17563, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(61, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_NEMESIS), \"Boss Obliterator\", \"\", \"Unlocked 40 or more Nemesis bosses.\", 40, true),\n\t\tTitle(62, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_BANE), \"Boss Slayer\", \"\", \"Unlocked all Bane bosses.\", 0, false),\n\t\tTitle(63, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_ARCHFOE), \"Boss Smiter\", \"\", \"Unlocked 40 or more Archfoe bosses.\", 40, true),\n\t\tTitle(64, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_BANE), \"Boss Veteran\", \"\", \"Unlocked 40 or more Bane bosses.\", 40, true),\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9cfd2bb2618fa22915d0c23ede97dcf05e439f697bb8b5da265929549d8a24ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 301, + "startColumn": 159, + "charOffset": 18051, + "charLength": 2, + "snippet": { + "text": "40" + } + }, + "contextRegion": { + "startLine": 299, + "startColumn": 159, + "charOffset": 17563, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(61, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_NEMESIS), \"Boss Obliterator\", \"\", \"Unlocked 40 or more Nemesis bosses.\", 40, true),\n\t\tTitle(62, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_BANE), \"Boss Slayer\", \"\", \"Unlocked all Bane bosses.\", 0, false),\n\t\tTitle(63, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_ARCHFOE), \"Boss Smiter\", \"\", \"Unlocked 40 or more Archfoe bosses.\", 40, true),\n\t\tTitle(64, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_BANE), \"Boss Veteran\", \"\", \"Unlocked 40 or more Bane bosses.\", 40, true),\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5844572e10c5608d2a774f3badb3a7e5353c0c432700c31b5e9f74e872ecb6c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "64 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 302, + "startColumn": 9, + "charOffset": 18070, + "charLength": 2, + "snippet": { + "text": "64" + } + }, + "contextRegion": { + "startLine": 300, + "startColumn": 9, + "charOffset": 17737, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(62, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_BANE), \"Boss Slayer\", \"\", \"Unlocked all Bane bosses.\", 0, false),\n\t\tTitle(63, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_ARCHFOE), \"Boss Smiter\", \"\", \"Unlocked 40 or more Archfoe bosses.\", 40, true),\n\t\tTitle(64, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_BANE), \"Boss Veteran\", \"\", \"Unlocked 40 or more Bane bosses.\", 40, true),\n\n\t\tTitle(65, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 1)\", \"Reward Streak of at least 7 days of consecutive logins.\", 7, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f06cad2a7630c82b5f47eea4bd06abb237089bd6c217176b5cbebbb9212456c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 302, + "startColumn": 154, + "charOffset": 18215, + "charLength": 2, + "snippet": { + "text": "40" + } + }, + "contextRegion": { + "startLine": 300, + "startColumn": 154, + "charOffset": 17737, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(62, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_BANE), \"Boss Slayer\", \"\", \"Unlocked all Bane bosses.\", 0, false),\n\t\tTitle(63, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_ARCHFOE), \"Boss Smiter\", \"\", \"Unlocked 40 or more Archfoe bosses.\", 40, true),\n\t\tTitle(64, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_BANE), \"Boss Veteran\", \"\", \"Unlocked 40 or more Bane bosses.\", 40, true),\n\n\t\tTitle(65, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 1)\", \"Reward Streak of at least 7 days of consecutive logins.\", 7, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afe41c73d694b7a5f5b079d45d938d028d00d7e05479ac2110f6f36da1e6b313" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "65 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 304, + "startColumn": 9, + "charOffset": 18235, + "charLength": 2, + "snippet": { + "text": "65" + } + }, + "contextRegion": { + "startLine": 302, + "startColumn": 9, + "charOffset": 18062, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(64, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_BANE), \"Boss Veteran\", \"\", \"Unlocked 40 or more Bane bosses.\", 40, true),\n\n\t\tTitle(65, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 1)\", \"Reward Streak of at least 7 days of consecutive logins.\", 7, true),\n\t\tTitle(66, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 2)\", \"Reward Streak of at least 30 days of consecutive logins.\", 30, true),\n\t\tTitle(67, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 3)\", \"Reward Streak of at least 90 days of consecutive logins.\", 90, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "821387bf0207ba5831b3a1a74abf7e5f1d2737a53b1480d2e1dcb8ce98c037f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 304, + "startColumn": 136, + "charOffset": 18362, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 302, + "startColumn": 136, + "charOffset": 18062, + "charLength": 1, + "snippet": { + "text": "\t\tTitle(64, CyclopediaTitle_t::BOSSTIARY, static_cast(BosstiaryRarity_t::RARITY_BANE), \"Boss Veteran\", \"\", \"Unlocked 40 or more Bane bosses.\", 40, true),\n\n\t\tTitle(65, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 1)\", \"Reward Streak of at least 7 days of consecutive logins.\", 7, true),\n\t\tTitle(66, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 2)\", \"Reward Streak of at least 30 days of consecutive logins.\", 30, true),\n\t\tTitle(67, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 3)\", \"Reward Streak of at least 90 days of consecutive logins.\", 90, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e193c67653f6633789b0335b971618b229f69e546129ed11398526184037d91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "66 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 305, + "startColumn": 9, + "charOffset": 18380, + "charLength": 2, + "snippet": { + "text": "66" + } + }, + "contextRegion": { + "startLine": 303, + "startColumn": 9, + "charOffset": 18226, + "charLength": 2, + "snippet": { + "text": "\n\t\tTitle(65, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 1)\", \"Reward Streak of at least 7 days of consecutive logins.\", 7, true),\n\t\tTitle(66, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 2)\", \"Reward Streak of at least 30 days of consecutive logins.\", 30, true),\n\t\tTitle(67, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 3)\", \"Reward Streak of at least 90 days of consecutive logins.\", 90, true),\n\t\tTitle(68, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 4)\", \"Reward Streak of at least 180 days of consecutive logins.\", 180, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22a60b0420f1178aebf4dd2f14b72238d0abbfc6fb68eba44edd14f58724164e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 305, + "startColumn": 137, + "charOffset": 18508, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 303, + "startColumn": 137, + "charOffset": 18226, + "charLength": 2, + "snippet": { + "text": "\n\t\tTitle(65, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 1)\", \"Reward Streak of at least 7 days of consecutive logins.\", 7, true),\n\t\tTitle(66, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 2)\", \"Reward Streak of at least 30 days of consecutive logins.\", 30, true),\n\t\tTitle(67, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 3)\", \"Reward Streak of at least 90 days of consecutive logins.\", 90, true),\n\t\tTitle(68, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 4)\", \"Reward Streak of at least 180 days of consecutive logins.\", 180, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5069936cb980fe46732dae275966c78df0f7eebb16baa8a65a0bdffd5348dc8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "67 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 306, + "startColumn": 9, + "charOffset": 18527, + "charLength": 2, + "snippet": { + "text": "67" + } + }, + "contextRegion": { + "startLine": 304, + "startColumn": 9, + "charOffset": 18227, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(65, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 1)\", \"Reward Streak of at least 7 days of consecutive logins.\", 7, true),\n\t\tTitle(66, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 2)\", \"Reward Streak of at least 30 days of consecutive logins.\", 30, true),\n\t\tTitle(67, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 3)\", \"Reward Streak of at least 90 days of consecutive logins.\", 90, true),\n\t\tTitle(68, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 4)\", \"Reward Streak of at least 180 days of consecutive logins.\", 180, true),\n\t\tTitle(69, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 5)\", \"Reward Streak of at least 365 days of consecutive logins.\", 365, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56c173681975ffd63b35764af8359b0411bc1a6d896638fc112fd1b5341e2d78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "90 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 306, + "startColumn": 137, + "charOffset": 18655, + "charLength": 2, + "snippet": { + "text": "90" + } + }, + "contextRegion": { + "startLine": 304, + "startColumn": 137, + "charOffset": 18227, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(65, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 1)\", \"Reward Streak of at least 7 days of consecutive logins.\", 7, true),\n\t\tTitle(66, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 2)\", \"Reward Streak of at least 30 days of consecutive logins.\", 30, true),\n\t\tTitle(67, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 3)\", \"Reward Streak of at least 90 days of consecutive logins.\", 90, true),\n\t\tTitle(68, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 4)\", \"Reward Streak of at least 180 days of consecutive logins.\", 180, true),\n\t\tTitle(69, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 5)\", \"Reward Streak of at least 365 days of consecutive logins.\", 365, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6b1d878f200ff8a36d04a3ba4e6d880300f2ec73e070b6acc736887a3552eb9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "68 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 307, + "startColumn": 9, + "charOffset": 18674, + "charLength": 2, + "snippet": { + "text": "68" + } + }, + "contextRegion": { + "startLine": 305, + "startColumn": 9, + "charOffset": 18372, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(66, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 2)\", \"Reward Streak of at least 30 days of consecutive logins.\", 30, true),\n\t\tTitle(67, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 3)\", \"Reward Streak of at least 90 days of consecutive logins.\", 90, true),\n\t\tTitle(68, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 4)\", \"Reward Streak of at least 180 days of consecutive logins.\", 180, true),\n\t\tTitle(69, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 5)\", \"Reward Streak of at least 365 days of consecutive logins.\", 365, true),\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f52ff0101a4772dba6c5a11d59b228fce302a0be1d7ebc6f4dee6a8f65fc080" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "180 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 307, + "startColumn": 138, + "charOffset": 18803, + "charLength": 3, + "snippet": { + "text": "180" + } + }, + "contextRegion": { + "startLine": 305, + "startColumn": 138, + "charOffset": 18372, + "charLength": 3, + "snippet": { + "text": "\t\tTitle(66, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 2)\", \"Reward Streak of at least 30 days of consecutive logins.\", 30, true),\n\t\tTitle(67, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 3)\", \"Reward Streak of at least 90 days of consecutive logins.\", 90, true),\n\t\tTitle(68, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 4)\", \"Reward Streak of at least 180 days of consecutive logins.\", 180, true),\n\t\tTitle(69, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 5)\", \"Reward Streak of at least 365 days of consecutive logins.\", 365, true),\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25b6dea15908377c094914546b2d70c8d28dab2304546c041fbc23818e3dcf16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "69 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 308, + "startColumn": 9, + "charOffset": 18823, + "charLength": 2, + "snippet": { + "text": "69" + } + }, + "contextRegion": { + "startLine": 306, + "startColumn": 9, + "charOffset": 18519, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(67, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 3)\", \"Reward Streak of at least 90 days of consecutive logins.\", 90, true),\n\t\tTitle(68, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 4)\", \"Reward Streak of at least 180 days of consecutive logins.\", 180, true),\n\t\tTitle(69, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 5)\", \"Reward Streak of at least 365 days of consecutive logins.\", 365, true),\n\n\t\tTitle(70, CyclopediaTitle_t::TASK, \"Aspiring Huntsman\", \"Invested 160,000 tasks points.\", 160000, true, \"Aspiring Huntswoman\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5bf414bc6a667a65b95c59ababc109e4a1a860d972aaf31b51a5bd3b7e42b86f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "365 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 308, + "startColumn": 138, + "charOffset": 18952, + "charLength": 3, + "snippet": { + "text": "365" + } + }, + "contextRegion": { + "startLine": 306, + "startColumn": 138, + "charOffset": 18519, + "charLength": 3, + "snippet": { + "text": "\t\tTitle(67, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 3)\", \"Reward Streak of at least 90 days of consecutive logins.\", 90, true),\n\t\tTitle(68, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 4)\", \"Reward Streak of at least 180 days of consecutive logins.\", 180, true),\n\t\tTitle(69, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 5)\", \"Reward Streak of at least 365 days of consecutive logins.\", 365, true),\n\n\t\tTitle(70, CyclopediaTitle_t::TASK, \"Aspiring Huntsman\", \"Invested 160,000 tasks points.\", 160000, true, \"Aspiring Huntswoman\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "457c6c3a1b6f1a9090f0ce7df34bd6ee452c761809b12bb4acf063c1d74cccc6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "70 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 310, + "startColumn": 9, + "charOffset": 18973, + "charLength": 2, + "snippet": { + "text": "70" + } + }, + "contextRegion": { + "startLine": 308, + "startColumn": 9, + "charOffset": 18815, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(69, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 5)\", \"Reward Streak of at least 365 days of consecutive logins.\", 365, true),\n\n\t\tTitle(70, CyclopediaTitle_t::TASK, \"Aspiring Huntsman\", \"Invested 160,000 tasks points.\", 160000, true, \"Aspiring Huntswoman\"),\n\t\tTitle(71, CyclopediaTitle_t::TASK, \"Competent Beastslayer\", \"Invested 320,000 tasks points.\", 320000, true),\n\t\tTitle(72, CyclopediaTitle_t::TASK, \"Feared Bountyhunter\", \"Invested 430,000 tasks points.\", 430000, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9e5eee98898f9d81b6bbc94f25c5f46bfd4550bb92ed122248adc2cd4064f20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "160000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 310, + "startColumn": 93, + "charOffset": 19057, + "charLength": 6, + "snippet": { + "text": "160000" + } + }, + "contextRegion": { + "startLine": 308, + "startColumn": 93, + "charOffset": 18815, + "charLength": 6, + "snippet": { + "text": "\t\tTitle(69, CyclopediaTitle_t::DAILY_REWARD, \"Creature of Habit (Grade 5)\", \"Reward Streak of at least 365 days of consecutive logins.\", 365, true),\n\n\t\tTitle(70, CyclopediaTitle_t::TASK, \"Aspiring Huntsman\", \"Invested 160,000 tasks points.\", 160000, true, \"Aspiring Huntswoman\"),\n\t\tTitle(71, CyclopediaTitle_t::TASK, \"Competent Beastslayer\", \"Invested 320,000 tasks points.\", 320000, true),\n\t\tTitle(72, CyclopediaTitle_t::TASK, \"Feared Bountyhunter\", \"Invested 430,000 tasks points.\", 430000, true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2291f23932f7250f5bda5ce678a1f712fc37c5267e44f7c623b461a718a19a50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "71 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 311, + "startColumn": 9, + "charOffset": 19103, + "charLength": 2, + "snippet": { + "text": "71" + } + }, + "contextRegion": { + "startLine": 309, + "startColumn": 9, + "charOffset": 18964, + "charLength": 2, + "snippet": { + "text": "\n\t\tTitle(70, CyclopediaTitle_t::TASK, \"Aspiring Huntsman\", \"Invested 160,000 tasks points.\", 160000, true, \"Aspiring Huntswoman\"),\n\t\tTitle(71, CyclopediaTitle_t::TASK, \"Competent Beastslayer\", \"Invested 320,000 tasks points.\", 320000, true),\n\t\tTitle(72, CyclopediaTitle_t::TASK, \"Feared Bountyhunter\", \"Invested 430,000 tasks points.\", 430000, true),\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41470c539c1b7a3d8252f55194befd615c38001ab6671d1204b2d3964a05d010" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "320000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 311, + "startColumn": 97, + "charOffset": 19191, + "charLength": 6, + "snippet": { + "text": "320000" + } + }, + "contextRegion": { + "startLine": 309, + "startColumn": 97, + "charOffset": 18964, + "charLength": 6, + "snippet": { + "text": "\n\t\tTitle(70, CyclopediaTitle_t::TASK, \"Aspiring Huntsman\", \"Invested 160,000 tasks points.\", 160000, true, \"Aspiring Huntswoman\"),\n\t\tTitle(71, CyclopediaTitle_t::TASK, \"Competent Beastslayer\", \"Invested 320,000 tasks points.\", 320000, true),\n\t\tTitle(72, CyclopediaTitle_t::TASK, \"Feared Bountyhunter\", \"Invested 430,000 tasks points.\", 430000, true),\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d69d42ef6ac116e93017c564db3ebb50a6ecaef0de35583ff64a141de603c048" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "72 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 312, + "startColumn": 9, + "charOffset": 19214, + "charLength": 2, + "snippet": { + "text": "72" + } + }, + "contextRegion": { + "startLine": 310, + "startColumn": 9, + "charOffset": 18965, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(70, CyclopediaTitle_t::TASK, \"Aspiring Huntsman\", \"Invested 160,000 tasks points.\", 160000, true, \"Aspiring Huntswoman\"),\n\t\tTitle(71, CyclopediaTitle_t::TASK, \"Competent Beastslayer\", \"Invested 320,000 tasks points.\", 320000, true),\n\t\tTitle(72, CyclopediaTitle_t::TASK, \"Feared Bountyhunter\", \"Invested 430,000 tasks points.\", 430000, true),\n\n\t\tTitle(73, CyclopediaTitle_t::MAP, \"Dedicated Entrepreneur\", \"Explored 50% of all the map areas.\", 50, false)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8cb11eb45e538b0757682c33158d955aaff99ef7c5049cbcbabf85c027a023bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "430000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 312, + "startColumn": 95, + "charOffset": 19300, + "charLength": 6, + "snippet": { + "text": "430000" + } + }, + "contextRegion": { + "startLine": 310, + "startColumn": 95, + "charOffset": 18965, + "charLength": 6, + "snippet": { + "text": "\t\tTitle(70, CyclopediaTitle_t::TASK, \"Aspiring Huntsman\", \"Invested 160,000 tasks points.\", 160000, true, \"Aspiring Huntswoman\"),\n\t\tTitle(71, CyclopediaTitle_t::TASK, \"Competent Beastslayer\", \"Invested 320,000 tasks points.\", 320000, true),\n\t\tTitle(72, CyclopediaTitle_t::TASK, \"Feared Bountyhunter\", \"Invested 430,000 tasks points.\", 430000, true),\n\n\t\tTitle(73, CyclopediaTitle_t::MAP, \"Dedicated Entrepreneur\", \"Explored 50% of all the map areas.\", 50, false)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21761bc70c63756c55200187be533a35c9fafa24d8679056edc992a895e74f84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "73 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 314, + "startColumn": 9, + "charOffset": 19324, + "charLength": 2, + "snippet": { + "text": "73" + } + }, + "contextRegion": { + "startLine": 312, + "startColumn": 9, + "charOffset": 19206, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(72, CyclopediaTitle_t::TASK, \"Feared Bountyhunter\", \"Invested 430,000 tasks points.\", 430000, true),\n\n\t\tTitle(73, CyclopediaTitle_t::MAP, \"Dedicated Entrepreneur\", \"Explored 50% of all the map areas.\", 50, false),\n\t\tTitle(74, CyclopediaTitle_t::MAP, \"Globetrotter\", \"Explored all map areas.\", 100, false),\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3bef6ce6c0e4dfd7ac3e15c0409ac298a7d302c6cedf6b499d0971f11ca67598" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 314, + "startColumn": 101, + "charOffset": 19416, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 312, + "startColumn": 101, + "charOffset": 19206, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(72, CyclopediaTitle_t::TASK, \"Feared Bountyhunter\", \"Invested 430,000 tasks points.\", 430000, true),\n\n\t\tTitle(73, CyclopediaTitle_t::MAP, \"Dedicated Entrepreneur\", \"Explored 50% of all the map areas.\", 50, false),\n\t\tTitle(74, CyclopediaTitle_t::MAP, \"Globetrotter\", \"Explored all map areas.\", 100, false),\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1abb3db71f0590e912cac48230d934860a986d834f1cae574c44adb533753278" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "74 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 315, + "startColumn": 9, + "charOffset": 19436, + "charLength": 2, + "snippet": { + "text": "74" + } + }, + "contextRegion": { + "startLine": 313, + "startColumn": 9, + "charOffset": 19315, + "charLength": 2, + "snippet": { + "text": "\n\t\tTitle(73, CyclopediaTitle_t::MAP, \"Dedicated Entrepreneur\", \"Explored 50% of all the map areas.\", 50, false),\n\t\tTitle(74, CyclopediaTitle_t::MAP, \"Globetrotter\", \"Explored all map areas.\", 100, false),\n\n\t\tTitle(75, CyclopediaTitle_t::OTHERS, \"Guild Leader\", \"Leading a Guild.\", false)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2041a64fe80337945babb3b7e4709bd905280580d2fd7a2c00cf621b85f3244b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 315, + "startColumn": 80, + "charOffset": 19507, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 313, + "startColumn": 80, + "charOffset": 19315, + "charLength": 3, + "snippet": { + "text": "\n\t\tTitle(73, CyclopediaTitle_t::MAP, \"Dedicated Entrepreneur\", \"Explored 50% of all the map areas.\", 50, false),\n\t\tTitle(74, CyclopediaTitle_t::MAP, \"Globetrotter\", \"Explored all map areas.\", 100, false),\n\n\t\tTitle(75, CyclopediaTitle_t::OTHERS, \"Guild Leader\", \"Leading a Guild.\", false)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2fdf7daee6b17692fd9731a704093155d8a659cdcc3de51d622b45e5e6728e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "75 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 317, + "startColumn": 9, + "charOffset": 19529, + "charLength": 2, + "snippet": { + "text": "75" + } + }, + "contextRegion": { + "startLine": 315, + "startColumn": 9, + "charOffset": 19428, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(74, CyclopediaTitle_t::MAP, \"Globetrotter\", \"Explored all map areas.\", 100, false),\n\n\t\tTitle(75, CyclopediaTitle_t::OTHERS, \"Guild Leader\", \"Leading a Guild.\", false),\n\t\tTitle(76, CyclopediaTitle_t::OTHERS, \"Proconsul of Iksupan\", \"Only a true devotee to the cause of the ancient Iks and their lost legacy may step up to the rank of proconsul.\", true),\n\t\tTitle(77, CyclopediaTitle_t::OTHERS, \"Admirer of the Crown\", \"Adjust your crown and handle it.\", true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63eed740ff119d144e1e2075f1fe6394518e8512425d40673fcaab4826bb0a51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "76 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 318, + "startColumn": 9, + "charOffset": 19612, + "charLength": 2, + "snippet": { + "text": "76" + } + }, + "contextRegion": { + "startLine": 316, + "startColumn": 9, + "charOffset": 19520, + "charLength": 2, + "snippet": { + "text": "\n\t\tTitle(75, CyclopediaTitle_t::OTHERS, \"Guild Leader\", \"Leading a Guild.\", false),\n\t\tTitle(76, CyclopediaTitle_t::OTHERS, \"Proconsul of Iksupan\", \"Only a true devotee to the cause of the ancient Iks and their lost legacy may step up to the rank of proconsul.\", true),\n\t\tTitle(77, CyclopediaTitle_t::OTHERS, \"Admirer of the Crown\", \"Adjust your crown and handle it.\", true),\n\t\tTitle(78, CyclopediaTitle_t::OTHERS, \"Big Spender\", \"Unlocked the full Golden Outfit.\", true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46577f1624f78509da7d9836311b0964261aff27782e2163952ebca3d092ba53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "77 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 319, + "startColumn": 9, + "charOffset": 19797, + "charLength": 2, + "snippet": { + "text": "77" + } + }, + "contextRegion": { + "startLine": 317, + "startColumn": 9, + "charOffset": 19521, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(75, CyclopediaTitle_t::OTHERS, \"Guild Leader\", \"Leading a Guild.\", false),\n\t\tTitle(76, CyclopediaTitle_t::OTHERS, \"Proconsul of Iksupan\", \"Only a true devotee to the cause of the ancient Iks and their lost legacy may step up to the rank of proconsul.\", true),\n\t\tTitle(77, CyclopediaTitle_t::OTHERS, \"Admirer of the Crown\", \"Adjust your crown and handle it.\", true),\n\t\tTitle(78, CyclopediaTitle_t::OTHERS, \"Big Spender\", \"Unlocked the full Golden Outfit.\", true),\n\t\tTitle(79, CyclopediaTitle_t::OTHERS, \"Challenger of the Iks\", \"Challenged Ahau, guardian of Iksupan, in traditional Iks warrior attire.\", true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2eb39a26f8212567f3beca985446049a4481cf61193040f9b15348e693685c9a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "78 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 320, + "startColumn": 9, + "charOffset": 19903, + "charLength": 2, + "snippet": { + "text": "78" + } + }, + "contextRegion": { + "startLine": 318, + "startColumn": 9, + "charOffset": 19604, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(76, CyclopediaTitle_t::OTHERS, \"Proconsul of Iksupan\", \"Only a true devotee to the cause of the ancient Iks and their lost legacy may step up to the rank of proconsul.\", true),\n\t\tTitle(77, CyclopediaTitle_t::OTHERS, \"Admirer of the Crown\", \"Adjust your crown and handle it.\", true),\n\t\tTitle(78, CyclopediaTitle_t::OTHERS, \"Big Spender\", \"Unlocked the full Golden Outfit.\", true),\n\t\tTitle(79, CyclopediaTitle_t::OTHERS, \"Challenger of the Iks\", \"Challenged Ahau, guardian of Iksupan, in traditional Iks warrior attire.\", true),\n\t\tTitle(80, CyclopediaTitle_t::OTHERS, \"Royal Bounacean Advisor\", \"Called to the court of Bounac by Kesar the Younger himself.\", true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41b7914c46bb46998279e7c653faf4c921d2adaaf4092d1cdbf1bf1e7be0a934" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "79 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 321, + "startColumn": 9, + "charOffset": 20000, + "charLength": 2, + "snippet": { + "text": "79" + } + }, + "contextRegion": { + "startLine": 319, + "startColumn": 9, + "charOffset": 19789, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(77, CyclopediaTitle_t::OTHERS, \"Admirer of the Crown\", \"Adjust your crown and handle it.\", true),\n\t\tTitle(78, CyclopediaTitle_t::OTHERS, \"Big Spender\", \"Unlocked the full Golden Outfit.\", true),\n\t\tTitle(79, CyclopediaTitle_t::OTHERS, \"Challenger of the Iks\", \"Challenged Ahau, guardian of Iksupan, in traditional Iks warrior attire.\", true),\n\t\tTitle(80, CyclopediaTitle_t::OTHERS, \"Royal Bounacean Advisor\", \"Called to the court of Bounac by Kesar the Younger himself.\", true),\n\t\tTitle(81, CyclopediaTitle_t::OTHERS, \"Aeternal\", \"Awarded exclusively to stalwart heroes keeping the faith under all circumstances.\", true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4618968550afae65f55def09849daec4e4ea851f98bcaf689908e9ee7b7ac117" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "80 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 322, + "startColumn": 9, + "charOffset": 20147, + "charLength": 2, + "snippet": { + "text": "80" + } + }, + "contextRegion": { + "startLine": 320, + "startColumn": 9, + "charOffset": 19895, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(78, CyclopediaTitle_t::OTHERS, \"Big Spender\", \"Unlocked the full Golden Outfit.\", true),\n\t\tTitle(79, CyclopediaTitle_t::OTHERS, \"Challenger of the Iks\", \"Challenged Ahau, guardian of Iksupan, in traditional Iks warrior attire.\", true),\n\t\tTitle(80, CyclopediaTitle_t::OTHERS, \"Royal Bounacean Advisor\", \"Called to the court of Bounac by Kesar the Younger himself.\", true),\n\t\tTitle(81, CyclopediaTitle_t::OTHERS, \"Aeternal\", \"Awarded exclusively to stalwart heroes keeping the faith under all circumstances.\", true),\n\t\tTitle(82, CyclopediaTitle_t::OTHERS, \"Robinson Crusoe\", \"Some discoveries are reserved to only the most experienced adventurers. Until the next frontier opens on the horizon.\", true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7edffb9dd5508682854d01f6446aeb07971cc2437087425b4db956072471fb8f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "81 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 323, + "startColumn": 9, + "charOffset": 20283, + "charLength": 2, + "snippet": { + "text": "81" + } + }, + "contextRegion": { + "startLine": 321, + "startColumn": 9, + "charOffset": 19992, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(79, CyclopediaTitle_t::OTHERS, \"Challenger of the Iks\", \"Challenged Ahau, guardian of Iksupan, in traditional Iks warrior attire.\", true),\n\t\tTitle(80, CyclopediaTitle_t::OTHERS, \"Royal Bounacean Advisor\", \"Called to the court of Bounac by Kesar the Younger himself.\", true),\n\t\tTitle(81, CyclopediaTitle_t::OTHERS, \"Aeternal\", \"Awarded exclusively to stalwart heroes keeping the faith under all circumstances.\", true),\n\t\tTitle(82, CyclopediaTitle_t::OTHERS, \"Robinson Crusoe\", \"Some discoveries are reserved to only the most experienced adventurers. Until the next frontier opens on the horizon.\", true),\n\t\tTitle(83, CyclopediaTitle_t::OTHERS, \"Chompmeister\", \"Awarded only to true connoisseurs undertaking even the most exotic culinary escapades.\", true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45414b15b43985467211e4f7adc741884d26b3b214247a89e1073c6885fc6d90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "82 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 324, + "startColumn": 9, + "charOffset": 20426, + "charLength": 2, + "snippet": { + "text": "82" + } + }, + "contextRegion": { + "startLine": 322, + "startColumn": 9, + "charOffset": 20139, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(80, CyclopediaTitle_t::OTHERS, \"Royal Bounacean Advisor\", \"Called to the court of Bounac by Kesar the Younger himself.\", true),\n\t\tTitle(81, CyclopediaTitle_t::OTHERS, \"Aeternal\", \"Awarded exclusively to stalwart heroes keeping the faith under all circumstances.\", true),\n\t\tTitle(82, CyclopediaTitle_t::OTHERS, \"Robinson Crusoe\", \"Some discoveries are reserved to only the most experienced adventurers. Until the next frontier opens on the horizon.\", true),\n\t\tTitle(83, CyclopediaTitle_t::OTHERS, \"Chompmeister\", \"Awarded only to true connoisseurs undertaking even the most exotic culinary escapades.\", true),\n\t\tTitle(84, CyclopediaTitle_t::OTHERS, \"Bringer of Rain\", \"Forging through battle after battle like a true gladiator.\", true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4302722effb4e8a92ddafe933a3622ed1594321d702f1312d6327e5fba217fa6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "83 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 325, + "startColumn": 9, + "charOffset": 20612, + "charLength": 2, + "snippet": { + "text": "83" + } + }, + "contextRegion": { + "startLine": 323, + "startColumn": 9, + "charOffset": 20275, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(81, CyclopediaTitle_t::OTHERS, \"Aeternal\", \"Awarded exclusively to stalwart heroes keeping the faith under all circumstances.\", true),\n\t\tTitle(82, CyclopediaTitle_t::OTHERS, \"Robinson Crusoe\", \"Some discoveries are reserved to only the most experienced adventurers. Until the next frontier opens on the horizon.\", true),\n\t\tTitle(83, CyclopediaTitle_t::OTHERS, \"Chompmeister\", \"Awarded only to true connoisseurs undertaking even the most exotic culinary escapades.\", true),\n\t\tTitle(84, CyclopediaTitle_t::OTHERS, \"Bringer of Rain\", \"Forging through battle after battle like a true gladiator.\", true),\n\t\tTitle(85, CyclopediaTitle_t::OTHERS, \"Beastly\", \"Reached 2000 charm points. Quite beastly!\", true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94b9957d7f26bebe4b420161b6af4ed97dc013451f26aa9ad9fb13d9390493a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "84 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 326, + "startColumn": 9, + "charOffset": 20764, + "charLength": 2, + "snippet": { + "text": "84" + } + }, + "contextRegion": { + "startLine": 324, + "startColumn": 9, + "charOffset": 20418, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(82, CyclopediaTitle_t::OTHERS, \"Robinson Crusoe\", \"Some discoveries are reserved to only the most experienced adventurers. Until the next frontier opens on the horizon.\", true),\n\t\tTitle(83, CyclopediaTitle_t::OTHERS, \"Chompmeister\", \"Awarded only to true connoisseurs undertaking even the most exotic culinary escapades.\", true),\n\t\tTitle(84, CyclopediaTitle_t::OTHERS, \"Bringer of Rain\", \"Forging through battle after battle like a true gladiator.\", true),\n\t\tTitle(85, CyclopediaTitle_t::OTHERS, \"Beastly\", \"Reached 2000 charm points. Quite beastly!\", true),\n\t\tTitle(86, CyclopediaTitle_t::OTHERS, \"Midnight Hunter\", \"When the hunter becomes the hunted, perseverance decides the game.\", true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6df1062e935cf869d637ae864f8e1912c70e4c1a5ce3a20cb7d0ebd31dae9ae8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "85 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 327, + "startColumn": 9, + "charOffset": 20891, + "charLength": 2, + "snippet": { + "text": "85" + } + }, + "contextRegion": { + "startLine": 325, + "startColumn": 9, + "charOffset": 20604, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(83, CyclopediaTitle_t::OTHERS, \"Chompmeister\", \"Awarded only to true connoisseurs undertaking even the most exotic culinary escapades.\", true),\n\t\tTitle(84, CyclopediaTitle_t::OTHERS, \"Bringer of Rain\", \"Forging through battle after battle like a true gladiator.\", true),\n\t\tTitle(85, CyclopediaTitle_t::OTHERS, \"Beastly\", \"Reached 2000 charm points. Quite beastly!\", true),\n\t\tTitle(86, CyclopediaTitle_t::OTHERS, \"Midnight Hunter\", \"When the hunter becomes the hunted, perseverance decides the game.\", true),\n\t\tTitle(87, CyclopediaTitle_t::OTHERS, \"Ratinator\", \"Killing some snarky cave rats is helpful, killing over ten thousand of them is a statement.\", true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72803ae5da521254c02e036dec87f1da5a1d2ec4ffec7ff40adc38ffb97d1e52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "86 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 328, + "startColumn": 9, + "charOffset": 20993, + "charLength": 2, + "snippet": { + "text": "86" + } + }, + "contextRegion": { + "startLine": 326, + "startColumn": 9, + "charOffset": 20756, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(84, CyclopediaTitle_t::OTHERS, \"Bringer of Rain\", \"Forging through battle after battle like a true gladiator.\", true),\n\t\tTitle(85, CyclopediaTitle_t::OTHERS, \"Beastly\", \"Reached 2000 charm points. Quite beastly!\", true),\n\t\tTitle(86, CyclopediaTitle_t::OTHERS, \"Midnight Hunter\", \"When the hunter becomes the hunted, perseverance decides the game.\", true),\n\t\tTitle(87, CyclopediaTitle_t::OTHERS, \"Ratinator\", \"Killing some snarky cave rats is helpful, killing over ten thousand of them is a statement.\", true),\n\t\tTitle(88, CyclopediaTitle_t::OTHERS, \"Doomsday Nemesis\", \"Awarded for great help in the battle against Gaz'haragoth.\", true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "654694f319b0bff25acbe76fe0951bbbfab7f705c618157238da31aa4f9b9bab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "87 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 329, + "startColumn": 9, + "charOffset": 21128, + "charLength": 2, + "snippet": { + "text": "87" + } + }, + "contextRegion": { + "startLine": 327, + "startColumn": 9, + "charOffset": 20883, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(85, CyclopediaTitle_t::OTHERS, \"Beastly\", \"Reached 2000 charm points. Quite beastly!\", true),\n\t\tTitle(86, CyclopediaTitle_t::OTHERS, \"Midnight Hunter\", \"When the hunter becomes the hunted, perseverance decides the game.\", true),\n\t\tTitle(87, CyclopediaTitle_t::OTHERS, \"Ratinator\", \"Killing some snarky cave rats is helpful, killing over ten thousand of them is a statement.\", true),\n\t\tTitle(88, CyclopediaTitle_t::OTHERS, \"Doomsday Nemesis\", \"Awarded for great help in the battle against Gaz'haragoth.\", true),\n\t\tTitle(89, CyclopediaTitle_t::OTHERS, \"Hero of Bounac\", \"You prevailed during the battle of Bounac and broke the siege that held Bounac's people in its firm grasp.\", true), // Derrotar o boss Drume." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "041aafa72c38a4c8477b2af308f69ad089a251991e2643268478ca2ce9b312e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "88 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 330, + "startColumn": 9, + "charOffset": 21282, + "charLength": 2, + "snippet": { + "text": "88" + } + }, + "contextRegion": { + "startLine": 328, + "startColumn": 9, + "charOffset": 20985, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(86, CyclopediaTitle_t::OTHERS, \"Midnight Hunter\", \"When the hunter becomes the hunted, perseverance decides the game.\", true),\n\t\tTitle(87, CyclopediaTitle_t::OTHERS, \"Ratinator\", \"Killing some snarky cave rats is helpful, killing over ten thousand of them is a statement.\", true),\n\t\tTitle(88, CyclopediaTitle_t::OTHERS, \"Doomsday Nemesis\", \"Awarded for great help in the battle against Gaz'haragoth.\", true),\n\t\tTitle(89, CyclopediaTitle_t::OTHERS, \"Hero of Bounac\", \"You prevailed during the battle of Bounac and broke the siege that held Bounac's people in its firm grasp.\", true), // Derrotar o boss Drume.\n\t\tTitle(90, CyclopediaTitle_t::OTHERS, \"King of Demon\", \"Defeat Morshabaal 5 times.\", 0, true, \"Queen of Demon\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4427c0eea71d1c85931fb36ba40907b8b6fa2e4cddc735082b2b0b1eade4be20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "89 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 331, + "startColumn": 9, + "charOffset": 21410, + "charLength": 2, + "snippet": { + "text": "89" + } + }, + "contextRegion": { + "startLine": 329, + "startColumn": 9, + "charOffset": 21120, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(87, CyclopediaTitle_t::OTHERS, \"Ratinator\", \"Killing some snarky cave rats is helpful, killing over ten thousand of them is a statement.\", true),\n\t\tTitle(88, CyclopediaTitle_t::OTHERS, \"Doomsday Nemesis\", \"Awarded for great help in the battle against Gaz'haragoth.\", true),\n\t\tTitle(89, CyclopediaTitle_t::OTHERS, \"Hero of Bounac\", \"You prevailed during the battle of Bounac and broke the siege that held Bounac's people in its firm grasp.\", true), // Derrotar o boss Drume.\n\t\tTitle(90, CyclopediaTitle_t::OTHERS, \"King of Demon\", \"Defeat Morshabaal 5 times.\", 0, true, \"Queen of Demon\"),\n\t\tTitle(91, CyclopediaTitle_t::OTHERS, \"Planegazer\", \"Followed the trail of the Planestrider to the end.\", true), // Derrotar o boss Planestrider" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b455344140c5ebd58f631cf51abc5113430b672d8d6ff4fc83aed717bec74a88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "90 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 332, + "startColumn": 9, + "charOffset": 21610, + "charLength": 2, + "snippet": { + "text": "90" + } + }, + "contextRegion": { + "startLine": 330, + "startColumn": 9, + "charOffset": 21274, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(88, CyclopediaTitle_t::OTHERS, \"Doomsday Nemesis\", \"Awarded for great help in the battle against Gaz'haragoth.\", true),\n\t\tTitle(89, CyclopediaTitle_t::OTHERS, \"Hero of Bounac\", \"You prevailed during the battle of Bounac and broke the siege that held Bounac's people in its firm grasp.\", true), // Derrotar o boss Drume.\n\t\tTitle(90, CyclopediaTitle_t::OTHERS, \"King of Demon\", \"Defeat Morshabaal 5 times.\", 0, true, \"Queen of Demon\"),\n\t\tTitle(91, CyclopediaTitle_t::OTHERS, \"Planegazer\", \"Followed the trail of the Planestrider to the end.\", true), // Derrotar o boss Planestrider\n\t\tTitle(92, CyclopediaTitle_t::OTHERS, \"Time Traveller\", \"Anywhere in time or space.\", true), // Derrotar o boss Lord Retro" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4be57ed7b1e47c4bc86b690d78d893b04bb5929c7308068310e26e062c2512b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "91 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 333, + "startColumn": 9, + "charOffset": 21724, + "charLength": 2, + "snippet": { + "text": "91" + } + }, + "contextRegion": { + "startLine": 331, + "startColumn": 9, + "charOffset": 21402, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(89, CyclopediaTitle_t::OTHERS, \"Hero of Bounac\", \"You prevailed during the battle of Bounac and broke the siege that held Bounac's people in its firm grasp.\", true), // Derrotar o boss Drume.\n\t\tTitle(90, CyclopediaTitle_t::OTHERS, \"King of Demon\", \"Defeat Morshabaal 5 times.\", 0, true, \"Queen of Demon\"),\n\t\tTitle(91, CyclopediaTitle_t::OTHERS, \"Planegazer\", \"Followed the trail of the Planestrider to the end.\", true), // Derrotar o boss Planestrider\n\t\tTitle(92, CyclopediaTitle_t::OTHERS, \"Time Traveller\", \"Anywhere in time or space.\", true), // Derrotar o boss Lord Retro\n\t\tTitle(93, CyclopediaTitle_t::OTHERS, \"Truly Boss\", \"Reach 15,000 boss points.\", true)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1bd6aef88016d3cf252c460989b1396a3dbd681f573e6f8904e8061db0b9dc4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "92 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 334, + "startColumn": 9, + "charOffset": 21870, + "charLength": 2, + "snippet": { + "text": "92" + } + }, + "contextRegion": { + "startLine": 332, + "startColumn": 9, + "charOffset": 21602, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(90, CyclopediaTitle_t::OTHERS, \"King of Demon\", \"Defeat Morshabaal 5 times.\", 0, true, \"Queen of Demon\"),\n\t\tTitle(91, CyclopediaTitle_t::OTHERS, \"Planegazer\", \"Followed the trail of the Planestrider to the end.\", true), // Derrotar o boss Planestrider\n\t\tTitle(92, CyclopediaTitle_t::OTHERS, \"Time Traveller\", \"Anywhere in time or space.\", true), // Derrotar o boss Lord Retro\n\t\tTitle(93, CyclopediaTitle_t::OTHERS, \"Truly Boss\", \"Reach 15,000 boss points.\", true),\n\t};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7c54623dd4f319501a3dc833e955eeb0a4feb2753da97210b6a533fa9aa30b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "93 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 335, + "startColumn": 9, + "charOffset": 21994, + "charLength": 2, + "snippet": { + "text": "93" + } + }, + "contextRegion": { + "startLine": 333, + "startColumn": 9, + "charOffset": 21716, + "charLength": 2, + "snippet": { + "text": "\t\tTitle(91, CyclopediaTitle_t::OTHERS, \"Planegazer\", \"Followed the trail of the Planestrider to the end.\", true), // Derrotar o boss Planestrider\n\t\tTitle(92, CyclopediaTitle_t::OTHERS, \"Time Traveller\", \"Anywhere in time or space.\", true), // Derrotar o boss Lord Retro\n\t\tTitle(93, CyclopediaTitle_t::OTHERS, \"Truly Boss\", \"Reach 15,000 boss points.\", true),\n\t};\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb37eadccf0683c8abbf2c95f0e7dee3a9d0ba7541502462ec9cd403fb8c6a4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1001 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 378, + "startColumn": 5, + "charOffset": 24667, + "charLength": 4, + "snippet": { + "text": "1001" + } + }, + "contextRegion": { + "startLine": 376, + "startColumn": 5, + "charOffset": 24640, + "charLength": 4, + "snippet": { + "text": "\n\tm_hirelingSkills = {\n\t\t{ 1001, \"banker\" },\n\t\t{ 1002, \"cooker\" },\n\t\t{ 1003, \"steward\" }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9883947fc9d66fbe5ad4d4f18360d9ced4b268f064fe0ddd09d68d85789f8e86" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1002 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 379, + "startColumn": 5, + "charOffset": 24689, + "charLength": 4, + "snippet": { + "text": "1002" + } + }, + "contextRegion": { + "startLine": 377, + "startColumn": 5, + "charOffset": 24641, + "charLength": 4, + "snippet": { + "text": "\tm_hirelingSkills = {\n\t\t{ 1001, \"banker\" },\n\t\t{ 1002, \"cooker\" },\n\t\t{ 1003, \"steward\" },\n\t\t{ 1004, \"trader\" }" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f4360edac9c24f038d1dd2427fe430854e2674fdb8f15d05008ca15394f1c15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1003 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 380, + "startColumn": 5, + "charOffset": 24711, + "charLength": 4, + "snippet": { + "text": "1003" + } + }, + "contextRegion": { + "startLine": 378, + "startColumn": 5, + "charOffset": 24663, + "charLength": 4, + "snippet": { + "text": "\t\t{ 1001, \"banker\" },\n\t\t{ 1002, \"cooker\" },\n\t\t{ 1003, \"steward\" },\n\t\t{ 1004, \"trader\" }\n\t};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "605a0b6aa689c9161b228f8aa80281e6be206a6c824b96a469ba0facd346df15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1004 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 381, + "startColumn": 5, + "charOffset": 24734, + "charLength": 4, + "snippet": { + "text": "1004" + } + }, + "contextRegion": { + "startLine": 379, + "startColumn": 5, + "charOffset": 24685, + "charLength": 4, + "snippet": { + "text": "\t\t{ 1002, \"cooker\" },\n\t\t{ 1003, \"steward\" },\n\t\t{ 1004, \"trader\" }\n\t};\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83abc0bf9e46539efc53f2a68dd4eddfdb759451ef0c1aea5e6882a545c6463d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2001 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 385, + "startColumn": 5, + "charOffset": 24783, + "charLength": 4, + "snippet": { + "text": "2001" + } + }, + "contextRegion": { + "startLine": 383, + "startColumn": 5, + "charOffset": 24755, + "charLength": 4, + "snippet": { + "text": "\n\tm_hirelingOutfits = {\n\t\t{ 2001, \"banker\" },\n\t\t{ 2002, \"cooker\" },\n\t\t{ 2003, \"steward\" }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a66b6abc268896c1da608c3a8fdf2d6c2dbf6d26a1ea9856d06a608c74aa55bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2002 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 386, + "startColumn": 5, + "charOffset": 24805, + "charLength": 4, + "snippet": { + "text": "2002" + } + }, + "contextRegion": { + "startLine": 384, + "startColumn": 5, + "charOffset": 24756, + "charLength": 4, + "snippet": { + "text": "\tm_hirelingOutfits = {\n\t\t{ 2001, \"banker\" },\n\t\t{ 2002, \"cooker\" },\n\t\t{ 2003, \"steward\" },\n\t\t{ 2004, \"trader\" }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5165d6bdda082822767fec8fe7eecb838dc32aec19d43ef793300ec68dfe11b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2003 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 387, + "startColumn": 5, + "charOffset": 24827, + "charLength": 4, + "snippet": { + "text": "2003" + } + }, + "contextRegion": { + "startLine": 385, + "startColumn": 5, + "charOffset": 24779, + "charLength": 4, + "snippet": { + "text": "\t\t{ 2001, \"banker\" },\n\t\t{ 2002, \"cooker\" },\n\t\t{ 2003, \"steward\" },\n\t\t{ 2004, \"trader\" },\n\t\t{ 2005, \"servant\" }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d013c323a8215130323f9348e743b0dea4bd827be52fd9801c21eb77a34c3cbd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2004 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 388, + "startColumn": 5, + "charOffset": 24850, + "charLength": 4, + "snippet": { + "text": "2004" + } + }, + "contextRegion": { + "startLine": 386, + "startColumn": 5, + "charOffset": 24801, + "charLength": 4, + "snippet": { + "text": "\t\t{ 2002, \"cooker\" },\n\t\t{ 2003, \"steward\" },\n\t\t{ 2004, \"trader\" },\n\t\t{ 2005, \"servant\" },\n\t\t{ 2006, \"hydra\" }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d6828f16cd496075a6b05057e5904ef3d512940da99afc2e2ac6888273c3d65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2005 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 389, + "startColumn": 5, + "charOffset": 24872, + "charLength": 4, + "snippet": { + "text": "2005" + } + }, + "contextRegion": { + "startLine": 387, + "startColumn": 5, + "charOffset": 24823, + "charLength": 4, + "snippet": { + "text": "\t\t{ 2003, \"steward\" },\n\t\t{ 2004, \"trader\" },\n\t\t{ 2005, \"servant\" },\n\t\t{ 2006, \"hydra\" },\n\t\t{ 2007, \"ferumbras\" }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d02a0545dd4195c244d38e68ed2e3490bff910e79f2c5952e05be8c9261c78e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2006 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 390, + "startColumn": 5, + "charOffset": 24895, + "charLength": 4, + "snippet": { + "text": "2006" + } + }, + "contextRegion": { + "startLine": 388, + "startColumn": 5, + "charOffset": 24846, + "charLength": 4, + "snippet": { + "text": "\t\t{ 2004, \"trader\" },\n\t\t{ 2005, \"servant\" },\n\t\t{ 2006, \"hydra\" },\n\t\t{ 2007, \"ferumbras\" },\n\t\t{ 2008, \"bonelord\" }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06fa9bdedd14f214acd7bf90c656ca7a3913bd5412c5e77773d1d57543a9e222" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2007 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 391, + "startColumn": 5, + "charOffset": 24916, + "charLength": 4, + "snippet": { + "text": "2007" + } + }, + "contextRegion": { + "startLine": 389, + "startColumn": 5, + "charOffset": 24868, + "charLength": 4, + "snippet": { + "text": "\t\t{ 2005, \"servant\" },\n\t\t{ 2006, \"hydra\" },\n\t\t{ 2007, \"ferumbras\" },\n\t\t{ 2008, \"bonelord\" },\n\t\t{ 2009, \"dragon\" }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dca5a70d0e3ea989cc88856603f0dd3adfab4994d0af75bbae104c9e9618d34d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2008 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 392, + "startColumn": 5, + "charOffset": 24941, + "charLength": 4, + "snippet": { + "text": "2008" + } + }, + "contextRegion": { + "startLine": 390, + "startColumn": 5, + "charOffset": 24891, + "charLength": 4, + "snippet": { + "text": "\t\t{ 2006, \"hydra\" },\n\t\t{ 2007, \"ferumbras\" },\n\t\t{ 2008, \"bonelord\" },\n\t\t{ 2009, \"dragon\" },\n\t};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd0da110b45b1b4ee1c0e12ac98be9e875d0b0d7a7f9edeb4c5746a1c0d7733b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2009 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 393, + "startColumn": 5, + "charOffset": 24965, + "charLength": 4, + "snippet": { + "text": "2009" + } + }, + "contextRegion": { + "startLine": 391, + "startColumn": 5, + "charOffset": 24912, + "charLength": 4, + "snippet": { + "text": "\t\t{ 2007, \"ferumbras\" },\n\t\t{ 2008, \"bonelord\" },\n\t\t{ 2009, \"dragon\" },\n\t};\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6176cc7ec8e1c7f7c5dc85971a76ad33973ebd00ca38c6d362c1b4a625dbb508" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 417, + "startColumn": 6, + "charOffset": 25535, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 415, + "startColumn": 6, + "charOffset": 25421, + "charLength": 1, + "snippet": { + "text": "\tauto &db = Database::getInstance();\n\tconst auto result = db.storeQuery(\"SELECT * FROM `boosted_creature`\");\n\tif (!result) {\n\t\tg_logger().warn(\"[Game::loadBoostedCreature] - \"\n\t\t \"Failed to detect boosted creature database. (CODE 01)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d9f8424933b1f9a729c6a239ef714732274d0789ee685f44cf91d9859abbc1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 424, + "startColumn": 21, + "charOffset": 25767, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 422, + "startColumn": 21, + "charOffset": 25686, + "charLength": 4, + "snippet": { + "text": "\n\tconst uint16_t date = result->getNumber(\"date\");\n\tconst time_t now = time(0);\n\ttm* ltm = localtime(&now);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df8bf84009d49f2c15cc9a851b335efdd0d8ecefa874b561a6ae7f44f85c280f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-10-2", + "ruleIndex": 420, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-10-2: Literal zero (0) shall not be used as the null-pointer-constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 424, + "startColumn": 26, + "charOffset": 25772, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 422, + "startColumn": 26, + "charOffset": 25686, + "charLength": 1, + "snippet": { + "text": "\n\tconst uint16_t date = result->getNumber(\"date\");\n\tconst time_t now = time(0);\n\ttm* ltm = localtime(&now);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10f6f79f473e4773597a129b7d59812e4e3b90e44b3648aa02d4516ad447623f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-nullptr", + "ruleIndex": 577, + "kind": "fail", + "level": "warning", + "message": { + "text": "use nullptr" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 424, + "startColumn": 26, + "charOffset": 25772, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 422, + "startColumn": 26, + "charOffset": 25686, + "charLength": 1, + "snippet": { + "text": "\n\tconst uint16_t date = result->getNumber(\"date\");\n\tconst time_t now = time(0);\n\ttm* ltm = localtime(&now);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "716073284723044886fc695136cefba5a004d63928ca72e5816c0212087c7fce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 425, + "startColumn": 12, + "charOffset": 25787, + "charLength": 9, + "snippet": { + "text": "localtime" + } + }, + "contextRegion": { + "startLine": 423, + "startColumn": 12, + "charOffset": 25687, + "charLength": 9, + "snippet": { + "text": "\tconst uint16_t date = result->getNumber(\"date\");\n\tconst time_t now = time(0);\n\ttm* ltm = localtime(&now);\n\n\tif (date == ltm->tm_mday) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7effbf57859820c14acb0e7ec17c00bdf1cc4046dcf7405f94bb4bc93c7803ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "concurrency-mt-unsafe", + "ruleIndex": 478, + "kind": "fail", + "level": "warning", + "message": { + "text": "function is not thread safe" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 425, + "startColumn": 12, + "charOffset": 25787, + "charLength": 9, + "snippet": { + "text": "localtime" + } + }, + "contextRegion": { + "startLine": 423, + "startColumn": 12, + "charOffset": 25687, + "charLength": 9, + "snippet": { + "text": "\tconst uint16_t date = result->getNumber(\"date\");\n\tconst time_t now = time(0);\n\ttm* ltm = localtime(&now);\n\n\tif (date == ltm->tm_mday) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1308d8a99c3e4ae5ddda5d299ac7861329c1d47bda9082887d147b9e29fd30a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-struct-pack-align", + "ruleIndex": 22, + "kind": "fail", + "level": "warning", + "message": { + "text": "accessing fields in struct 'MonsterRace' is inefficient due to padding; only needs 34 bytes but is using 40 bytes" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 435, + "startColumn": 9, + "charOffset": 26017, + "charLength": 11, + "snippet": { + "text": "MonsterRace" + } + }, + "contextRegion": { + "startLine": 433, + "startColumn": 9, + "charOffset": 25963, + "charLength": 11, + "snippet": { + "text": "\tconst auto monsterlist = getBestiaryList();\n\n\tstruct MonsterRace {\n\t\tuint16_t raceId { 0 };\n\t\tstd::string name;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "811f877b2079fe3f21c646b403763cb3baafd140edeef5e4934e5f29e070449e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-struct-pack-align", + "ruleIndex": 22, + "kind": "fail", + "level": "warning", + "message": { + "text": "accessing fields in struct 'MonsterRace' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 64 bytes" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 435, + "startColumn": 9, + "charOffset": 26017, + "charLength": 11, + "snippet": { + "text": "MonsterRace" + } + }, + "contextRegion": { + "startLine": 433, + "startColumn": 9, + "charOffset": 25963, + "charLength": 11, + "snippet": { + "text": "\tconst auto monsterlist = getBestiaryList();\n\n\tstruct MonsterRace {\n\t\tuint16_t raceId { 0 };\n\t\tstd::string name;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4683f8ff493f9c641d8a747d93a8ad2e0776e512b28469dc2f64f60a50af912b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-11-0-1", + "ruleIndex": 399, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 11-0-1: Member data in non-POD class types shall be private" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 436, + "startColumn": 12, + "charOffset": 26042, + "charLength": 6, + "snippet": { + "text": "raceId" + } + }, + "contextRegion": { + "startLine": 434, + "startColumn": 12, + "charOffset": 26008, + "charLength": 6, + "snippet": { + "text": "\n\tstruct MonsterRace {\n\t\tuint16_t raceId { 0 };\n\t\tstd::string name;\n\t};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6555f59782763d612ddf074c631e3814d498b6a85fa402471ad583ba4850c38a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-11-0-1", + "ruleIndex": 399, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 11-0-1: Member data in non-POD class types shall be private" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 437, + "startColumn": 15, + "charOffset": 26070, + "charLength": 4, + "snippet": { + "text": "name" + } + }, + "contextRegion": { + "startLine": 435, + "startColumn": 15, + "charOffset": 26009, + "charLength": 4, + "snippet": { + "text": "\tstruct MonsterRace {\n\t\tuint16_t raceId { 0 };\n\t\tstd::string name;\n\t};\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "351e313dcb28213f1af20e57817b3c26e4d1668f2e857497c6433f8da71cc330" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 449, + "startColumn": 7, + "charOffset": 26320, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 447, + "startColumn": 7, + "charOffset": 26309, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif (!m_monsters.empty()) {\n\t\t\tselectedMonster = m_monsters[normal_random(0, m_monsters.size() - 1)];\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "592a668384bd8941709f1c579abd0e304369fa3460859b5c184b06769d46ed37" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 461, + "startColumn": 6, + "charOffset": 26687, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 459, + "startColumn": 6, + "charOffset": 26604, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto monsterType = g_monsters().getMonsterType(selectedMonster.name);\n\tif (!monsterType) {\n\t\tg_logger().warn(\"[Game::loadBoostedCreature] - \"\n\t\t \"It was not possible to generate a new boosted creature-> Monster '{}' not found.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e800fbed030b3fe2b152fb39796efe4acca49922c4a3ffbb164cc2be30b6ef4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 482, + "startColumn": 6, + "charOffset": 27758, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 480, + "startColumn": 6, + "charOffset": 27685, + "charLength": 1, + "snippet": { + "text": "\t\t+ \"`raceid` = '\" + std::to_string(selectedMonster.raceId) + \"'\";\n\n\tif (!db.executeQuery(query)) {\n\t\tg_logger().warn(\"[Game::loadBoostedCreature] - \"\n\t\t \"Failed to detect boosted creature database. (CODE 02)\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23524ff940dd20d8c0856171573c480a0f377cb806e1f194fef9a4b240fa25f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 490, + "startColumn": 69, + "charOffset": 28056, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 488, + "startColumn": 69, + "charOffset": 27918, + "charLength": 9, + "snippet": { + "text": "void Game::start(ServiceManager* manager) {\n\t// Game client protocols\n\tmanager->add(static_cast(g_configManager().getNumber(GAME_PORT, __FUNCTION__)));\n\tmanager->add(static_cast(g_configManager().getNumber(LOGIN_PORT, __FUNCTION__)));\n\t// OT protocols" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ccf7e09922f5fb9c7c7eaa91c43873f28fa2cacf106d48acfbba6f1c669997b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 491, + "startColumn": 70, + "charOffset": 28163, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 489, + "startColumn": 70, + "charOffset": 27962, + "charLength": 9, + "snippet": { + "text": "\t// Game client protocols\n\tmanager->add(static_cast(g_configManager().getNumber(GAME_PORT, __FUNCTION__)));\n\tmanager->add(static_cast(g_configManager().getNumber(LOGIN_PORT, __FUNCTION__)));\n\t// OT protocols\n\tmanager->add(static_cast(g_configManager().getNumber(STATUS_PORT, __FUNCTION__)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67201b38bef4d1a5cdd3c40872084d2ed6d6719e3505bff2fa8d0101fed17a67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 493, + "startColumn": 71, + "charOffset": 28289, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 491, + "startColumn": 71, + "charOffset": 28094, + "charLength": 9, + "snippet": { + "text": "\tmanager->add(static_cast(g_configManager().getNumber(LOGIN_PORT, __FUNCTION__)));\n\t// OT protocols\n\tmanager->add(static_cast(g_configManager().getNumber(STATUS_PORT, __FUNCTION__)));\n\n\tserviceManager = manager;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47975bfed30fa2baed1b657520c8f9c19b07bb5c47e35ee0c02681fc26c60970" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 497, + "startColumn": 15, + "charOffset": 28372, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 495, + "startColumn": 15, + "charOffset": 28330, + "charLength": 4, + "snippet": { + "text": "\tserviceManager = manager;\n\n\ttime_t now = time(0);\n\tconst tm* tms = localtime(&now);\n\tint minutes = tms->tm_min;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b70240894a3234e91dde5bb1ffb98ff6d0139e20db4e255f76ccc3cc9be156f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-10-2", + "ruleIndex": 420, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-10-2: Literal zero (0) shall not be used as the null-pointer-constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 497, + "startColumn": 20, + "charOffset": 28377, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 495, + "startColumn": 20, + "charOffset": 28330, + "charLength": 1, + "snippet": { + "text": "\tserviceManager = manager;\n\n\ttime_t now = time(0);\n\tconst tm* tms = localtime(&now);\n\tint minutes = tms->tm_min;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e6920ad2ebb8f160b65b92961409501c18fb338ed93037579becf7fa237f338" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-nullptr", + "ruleIndex": 577, + "kind": "fail", + "level": "warning", + "message": { + "text": "use nullptr" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 497, + "startColumn": 20, + "charOffset": 28377, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 495, + "startColumn": 20, + "charOffset": 28330, + "charLength": 1, + "snippet": { + "text": "\tserviceManager = manager;\n\n\ttime_t now = time(0);\n\tconst tm* tms = localtime(&now);\n\tint minutes = tms->tm_min;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7ed5e272e0341672568b5f292db3c94e98fb975dcc384e70cc7e4586fe946c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 498, + "startColumn": 18, + "charOffset": 28398, + "charLength": 9, + "snippet": { + "text": "localtime" + } + }, + "contextRegion": { + "startLine": 496, + "startColumn": 18, + "charOffset": 28357, + "charLength": 9, + "snippet": { + "text": "\n\ttime_t now = time(0);\n\tconst tm* tms = localtime(&now);\n\tint minutes = tms->tm_min;\n\tlightHour = (minutes * LIGHT_DAY_LENGTH) / 60;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b88632fec94c272a1edaf7fd982f45498672d4fbdc3b8b00c94e6dea3ab13b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "concurrency-mt-unsafe", + "ruleIndex": 478, + "kind": "fail", + "level": "warning", + "message": { + "text": "function is not thread safe" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 498, + "startColumn": 18, + "charOffset": 28398, + "charLength": 9, + "snippet": { + "text": "localtime" + } + }, + "contextRegion": { + "startLine": 496, + "startColumn": 18, + "charOffset": 28357, + "charLength": 9, + "snippet": { + "text": "\n\ttime_t now = time(0);\n\tconst tm* tms = localtime(&now);\n\tint minutes = tms->tm_min;\n\tlightHour = (minutes * LIGHT_DAY_LENGTH) / 60;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32e5bf855829ab21509f2ad6ac6533bfe1b1eabc97ebb081a4646c13be604a4f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 500, + "startColumn": 45, + "charOffset": 28487, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 498, + "startColumn": 45, + "charOffset": 28381, + "charLength": 2, + "snippet": { + "text": "\tconst tm* tms = localtime(&now);\n\tint minutes = tms->tm_min;\n\tlightHour = (minutes * LIGHT_DAY_LENGTH) / 60;\n\n\tg_dispatcher().scheduleEvent(" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27539d8f5d967dac8212a961902bdb3abf22f454430ec746fd7e56042c40fc32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 503, + "startColumn": 14, + "charOffset": 28536, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 501, + "startColumn": 14, + "charOffset": 28491, + "charLength": 4, + "snippet": { + "text": "\n\tg_dispatcher().scheduleEvent(\n\t\tEVENT_MS + 1000, [this] { createFiendishMonsters(); }, \"Game::createFiendishMonsters\"\n\t);\n\tg_dispatcher().scheduleEvent(" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da001fa17784fd51f2147fae955b0b93ced2c635bd7d7c9741edc6f5f2782d25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 506, + "startColumn": 14, + "charOffset": 28659, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 504, + "startColumn": 14, + "charOffset": 28611, + "charLength": 4, + "snippet": { + "text": "\t);\n\tg_dispatcher().scheduleEvent(\n\t\tEVENT_MS + 1000, [this] { createInfluencedMonsters(); }, \"Game::createInfluencedMonsters\"\n\t);\n\tg_dispatcher().cycleEvent(" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19570aaadeb9168eb3ce77bebd8d2d1aea17a4c1c861f23bb42e279b28fc8f60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 525, + "startColumn": 71, + "charOffset": 29539, + "charLength": 5, + "snippet": { + "text": "60000" + } + }, + "contextRegion": { + "startLine": 523, + "startColumn": 71, + "charOffset": 29319, + "charLength": 5, + "snippet": { + "text": "\tauto marketItemsPriceIntervalMinutes = g_configManager().getNumber(MARKET_REFRESH_PRICES, __FUNCTION__);\n\tif (marketItemsPriceIntervalMinutes > 0) {\n\t\tauto marketItemsPriceIntervalMS = marketItemsPriceIntervalMinutes * 60000;\n\t\tif (marketItemsPriceIntervalMS < 60000) {\n\t\t\tmarketItemsPriceIntervalMS = 60000;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c06ac1c1d90a7ca2f9e2062b46640a1df76bdb53aa21e4793df35dd6ad93fc9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-std-min-max", + "ruleIndex": 736, + "kind": "fail", + "level": "warning", + "message": { + "text": "use `std::max` instead of `<`" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 526, + "startColumn": 3, + "charOffset": 29548, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 524, + "startColumn": 3, + "charOffset": 29425, + "charLength": 2, + "snippet": { + "text": "\tif (marketItemsPriceIntervalMinutes > 0) {\n\t\tauto marketItemsPriceIntervalMS = marketItemsPriceIntervalMinutes * 60000;\n\t\tif (marketItemsPriceIntervalMS < 60000) {\n\t\t\tmarketItemsPriceIntervalMS = 60000;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b36013a4e4c0f35e522d4526f7aa4774e985da5583cd064a4fd15073a69a649" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 526, + "startColumn": 36, + "charOffset": 29581, + "charLength": 5, + "snippet": { + "text": "60000" + } + }, + "contextRegion": { + "startLine": 524, + "startColumn": 36, + "charOffset": 29425, + "charLength": 5, + "snippet": { + "text": "\tif (marketItemsPriceIntervalMinutes > 0) {\n\t\tauto marketItemsPriceIntervalMS = marketItemsPriceIntervalMinutes * 60000;\n\t\tif (marketItemsPriceIntervalMS < 60000) {\n\t\t\tmarketItemsPriceIntervalMS = 60000;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f34a3bb4b3adb32c155bc8347df8675d71a3a23b9a5b2f96088489f5635ea28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 527, + "startColumn": 33, + "charOffset": 29622, + "charLength": 5, + "snippet": { + "text": "60000" + } + }, + "contextRegion": { + "startLine": 525, + "startColumn": 33, + "charOffset": 29469, + "charLength": 5, + "snippet": { + "text": "\t\tauto marketItemsPriceIntervalMS = marketItemsPriceIntervalMinutes * 60000;\n\t\tif (marketItemsPriceIntervalMS < 60000) {\n\t\t\tmarketItemsPriceIntervalMS = 60000;\n\t\t}\n\t\tg_dispatcher().cycleEvent(" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a19c3d1f77f0ddfa44d5b1cdde383504e8e11230e00361503ba58129c7ce222" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 557, + "startColumn": 11, + "charOffset": 30161, + "charLength": 4, + "snippet": { + "text": "load" + } + }, + "contextRegion": { + "startLine": 555, + "startColumn": 11, + "charOffset": 30129, + "charLength": 4, + "snippet": { + "text": "\t\t\tloadItemsPrice();\n\n\t\t\tgroups.load();\n\t\t\tg_chat().load();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0bbd3b9b8f5f07977ffc61bdddef2c8bdb98b9d42e1d52924adfb85576e96f42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 558, + "startColumn": 13, + "charOffset": 30181, + "charLength": 4, + "snippet": { + "text": "load" + } + }, + "contextRegion": { + "startLine": 556, + "startColumn": 13, + "charOffset": 30150, + "charLength": 4, + "snippet": { + "text": "\n\t\t\tgroups.load();\n\t\t\tg_chat().load();\n\n\t\t\t// Load monsters and npcs stored by the \"loadFromXML\" function" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cba125037b6dc27b1dedb3d7d85504edc46e7c71e1efcd18ba9f98a20fd851c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 565, + "startColumn": 4, + "charOffset": 30393, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 563, + "startColumn": 4, + "charOffset": 30316, + "charLength": 3, + "snippet": { + "text": "\n\t\t\t// Load monsters and npcs custom stored by the \"loadFromXML\" function\n\t\t\tfor (int i = 0; i < 50; i++) {\n\t\t\t\tmap.spawnsNpcCustomMaps[i].startup();\n\t\t\t\tmap.spawnsMonsterCustomMaps[i].startup();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99f6a6d3c9f96bc46e394e555b52d061545aa80cb82e2ed1390fbef8d291434b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 565, + "startColumn": 24, + "charOffset": 30413, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 563, + "startColumn": 24, + "charOffset": 30316, + "charLength": 2, + "snippet": { + "text": "\n\t\t\t// Load monsters and npcs custom stored by the \"loadFromXML\" function\n\t\t\tfor (int i = 0; i < 50; i++) {\n\t\t\t\tmap.spawnsNpcCustomMaps[i].startup();\n\t\t\t\tmap.spawnsMonsterCustomMaps[i].startup();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3cf7cd290d5cd95a890eda1fb573b26672145cb36fea385c920944c9bfc818d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 566, + "startColumn": 5, + "charOffset": 30428, + "charLength": 3, + "snippet": { + "text": "map" + } + }, + "contextRegion": { + "startLine": 564, + "startColumn": 5, + "charOffset": 30317, + "charLength": 3, + "snippet": { + "text": "\t\t\t// Load monsters and npcs custom stored by the \"loadFromXML\" function\n\t\t\tfor (int i = 0; i < 50; i++) {\n\t\t\t\tmap.spawnsNpcCustomMaps[i].startup();\n\t\t\t\tmap.spawnsMonsterCustomMaps[i].startup();\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c042b8013f7df20a272ddffaf32b38af3358a971ebf1ad673a0ab5771a4beece" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 567, + "startColumn": 5, + "charOffset": 30470, + "charLength": 3, + "snippet": { + "text": "map" + } + }, + "contextRegion": { + "startLine": 565, + "startColumn": 5, + "charOffset": 30390, + "charLength": 3, + "snippet": { + "text": "\t\t\tfor (int i = 0; i < 50; i++) {\n\t\t\t\tmap.spawnsNpcCustomMaps[i].startup();\n\t\t\t\tmap.spawnsMonsterCustomMaps[i].startup();\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33b7b8437b0381a2dc8e89c6e0fb98cb27fe38932be0d0db95040e70429579be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 570, + "startColumn": 10, + "charOffset": 30527, + "charLength": 11, + "snippet": { + "text": "loadFromXml" + } + }, + "contextRegion": { + "startLine": 568, + "startColumn": 10, + "charOffset": 30512, + "charLength": 11, + "snippet": { + "text": "\t\t\t}\n\n\t\t\traids.loadFromXml();\n\t\t\traids.startup();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "864d1bc60beacd01a9efcae5c6a488720bc80101ac868f3c851bcba423a3082b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 571, + "startColumn": 10, + "charOffset": 30551, + "charLength": 7, + "snippet": { + "text": "startup" + } + }, + "contextRegion": { + "startLine": 569, + "startColumn": 10, + "charOffset": 30517, + "charLength": 7, + "snippet": { + "text": "\n\t\t\traids.loadFromXml();\n\t\t\traids.startup();\n\n\t\t\tmounts.loadFromXml();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22f8820df1133b3c13d5bd67b18e26f6ce57fb9210271c2728a3b5c97d970a48" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 573, + "startColumn": 11, + "charOffset": 30573, + "charLength": 11, + "snippet": { + "text": "loadFromXml" + } + }, + "contextRegion": { + "startLine": 571, + "startColumn": 11, + "charOffset": 30542, + "charLength": 11, + "snippet": { + "text": "\t\t\traids.startup();\n\n\t\t\tmounts.loadFromXml();\n\n\t\t\tloadMotdNum();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b56aad5e92c824c87cae339343fd9ac7d0579af44017b778b3f93ddf276302ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 581, + "startColumn": 15, + "charOffset": 30706, + "charLength": 20, + "snippet": { + "text": "initializeGlobalData" + } + }, + "contextRegion": { + "startLine": 579, + "startColumn": 15, + "charOffset": 30663, + "charLength": 20, + "snippet": { + "text": "\n\t\t\t// Initialize wheel data\n\t\t\tm_IOWheel->initializeGlobalData();\n\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4058432ebd5f7c290fb5663201a59684e0bc270b51c3702a9db6854f0a9fa56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 591, + "startColumn": 4, + "charOffset": 30914, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 589, + "startColumn": 4, + "charOffset": 30836, + "charLength": 5, + "snippet": { + "text": "\t\t\t// kick all players that are still online\n\t\t\tauto it = players.begin();\n\t\t\twhile (it != players.end()) {\n\t\t\t\tit->second->removePlayer(true);\n\t\t\t\tit = players.begin();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d4f2e46518151ad2a68709017c87fdd053b9082d2db16e53f02a99070540fbf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 591, + "startColumn": 11, + "charOffset": 30921, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 589, + "startColumn": 11, + "charOffset": 30836, + "charLength": 2, + "snippet": { + "text": "\t\t\t// kick all players that are still online\n\t\t\tauto it = players.begin();\n\t\t\twhile (it != players.end()) {\n\t\t\t\tit->second->removePlayer(true);\n\t\t\t\tit = players.begin();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72610c173901c49750467712c7b4c61d8c2c6e23e74f8aad7c72d62c5106f794" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 609, + "startColumn": 4, + "charOffset": 31295, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 607, + "startColumn": 4, + "charOffset": 31204, + "charLength": 5, + "snippet": { + "text": "\t\t\t/* kick all players without the CanAlwaysLogin flag */\n\t\t\tauto it = players.begin();\n\t\t\twhile (it != players.end()) {\n\t\t\t\tif (!it->second->hasFlag(PlayerFlags_t::CanAlwaysLogin)) {\n\t\t\t\t\tit->second->removePlayer(true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "57a5b544f41ba22cb5ef3bf2f7a08d200df4eb43be7030e404e84947d1eb9bc0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 609, + "startColumn": 11, + "charOffset": 31302, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 607, + "startColumn": 11, + "charOffset": 31204, + "charLength": 2, + "snippet": { + "text": "\t\t\t/* kick all players without the CanAlwaysLogin flag */\n\t\t\tauto it = players.begin();\n\t\t\twhile (it != players.end()) {\n\t\t\t\tif (!it->second->hasFlag(PlayerFlags_t::CanAlwaysLogin)) {\n\t\t\t\t\tit->second->removePlayer(true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e98acb0c6bb492f2629fd31efefcc6c0d5a0b25878ccae353970857295fe382b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 610, + "startColumn": 9, + "charOffset": 31333, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 608, + "startColumn": 9, + "charOffset": 31262, + "charLength": 1, + "snippet": { + "text": "\t\t\tauto it = players.begin();\n\t\t\twhile (it != players.end()) {\n\t\t\t\tif (!it->second->hasFlag(PlayerFlags_t::CanAlwaysLogin)) {\n\t\t\t\t\tit->second->removePlayer(true);\n\t\t\t\t\tit = players.begin();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7667c4b9aab1e055fa864e66249dc4eef3c4e136e6928ace062ab87ebb56953d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'loadItemsPrice' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 627, + "startColumn": 12, + "charOffset": 31571, + "charLength": 14, + "snippet": { + "text": "loadItemsPrice" + } + }, + "contextRegion": { + "startLine": 625, + "startColumn": 12, + "charOffset": 31557, + "charLength": 14, + "snippet": { + "text": "}\n\nvoid Game::loadItemsPrice() {\n\tIOMarket::getInstance().updateStatistics();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ccaaeada7517b501961f6f4c563eacb54883ea9e2f849e897e50cf49b98e2b2d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 661, + "startColumn": 102, + "charOffset": 33161, + "charLength": 6, + "snippet": { + "text": "string" + } + }, + "contextRegion": { + "startLine": 659, + "startColumn": 102, + "charOffset": 32984, + "charLength": 6, + "snippet": { + "text": "\n\tif (!fs::exists(customMapPath) && !fs::create_directory(customMapPath)) {\n\t\tthrow std::ios_base::failure(fmt::format(\"Failed to create custom map directory {}\", customMapPath.string()));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "112d4b24da4be5eebb250f2ae56ff4dddbdab87d92f57f0fb692980d2a9141f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 665, + "startColumn": 2, + "charOffset": 33203, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 663, + "startColumn": 2, + "charOffset": 33176, + "charLength": 3, + "snippet": { + "text": "\n\tint customMapIndex = 0;\n\tfor (const auto &entry : fs::directory_iterator(customMapPath)) {\n\t\tconst auto &realPath = entry.path();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3ed84cd58307b8aacce9f920afd48dfd2e85a6486950155ca8558d8cae72e4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 675, + "startColumn": 25, + "charOffset": 33485, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 673, + "startColumn": 25, + "charOffset": 33419, + "charLength": 2, + "snippet": { + "text": "\n\t\t// Do not load more maps than possible\n\t\tif (customMapIndex >= 50) {\n\t\t\tg_logger().warn(\"Maximum number of custom maps loaded. Custom map {} [ignored]\", filename);\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3cf7cd290d5cd95a890eda1fb573b26672145cb36fea385c920944c9bfc818d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 705, + "startColumn": 77, + "charOffset": 34320, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 703, + "startColumn": 77, + "charOffset": 34241, + "charLength": 6, + "snippet": { + "text": "}\n\nstd::shared_ptr Game::internalGetCylinder(std::shared_ptr player, const Position &pos) {\n\tif (pos.x != 0xFFFF) {\n\t\treturn map.getTile(pos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f0fe64e883e8af885504fbc4ed6389e0b6b595892c750a00212aafae7badabc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 706, + "startColumn": 15, + "charOffset": 34365, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 704, + "startColumn": 15, + "charOffset": 34243, + "charLength": 6, + "snippet": { + "text": "\nstd::shared_ptr Game::internalGetCylinder(std::shared_ptr player, const Position &pos) {\n\tif (pos.x != 0xFFFF) {\n\t\treturn map.getTile(pos);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4aae0bc08d489d8f3d725ae5bc38f7296222e2615912523fc33c557f3594a30" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 711, + "startColumn": 6, + "charOffset": 34425, + "charLength": 3, + "snippet": { + "text": "pos" + } + }, + "contextRegion": { + "startLine": 709, + "startColumn": 6, + "charOffset": 34405, + "charLength": 3, + "snippet": { + "text": "\n\t// container\n\tif (pos.y & 0x40) {\n\t\tuint8_t from_cid = pos.y & 0x0F;\n\t\treturn player->getContainerByID(from_cid);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30170a99772dd697d0561c91713dc7a9c1cf425270d239e3976f18688e5854b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 711, + "startColumn": 6, + "charOffset": 34425, + "charLength": 3, + "snippet": { + "text": "pos" + } + }, + "contextRegion": { + "startLine": 709, + "startColumn": 6, + "charOffset": 34405, + "charLength": 3, + "snippet": { + "text": "\n\t// container\n\tif (pos.y & 0x40) {\n\t\tuint8_t from_cid = pos.y & 0x0F;\n\t\treturn player->getContainerByID(from_cid);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6fa2041a3f75b35388fc5a919a5c9904bb276812134a03f2d9d5604f27356411" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 711, + "startColumn": 14, + "charOffset": 34433, + "charLength": 4, + "snippet": { + "text": "0x40" + } + }, + "contextRegion": { + "startLine": 709, + "startColumn": 14, + "charOffset": 34405, + "charLength": 4, + "snippet": { + "text": "\n\t// container\n\tif (pos.y & 0x40) {\n\t\tuint8_t from_cid = pos.y & 0x0F;\n\t\treturn player->getContainerByID(from_cid);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3c40bf358eea5aab03104a46c1c2fb25d5aac20865646aefec9f587bf79a5d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 711, + "startColumn": 14, + "charOffset": 34433, + "charLength": 4, + "snippet": { + "text": "0x40" + } + }, + "contextRegion": { + "startLine": 709, + "startColumn": 14, + "charOffset": 34405, + "charLength": 4, + "snippet": { + "text": "\n\t// container\n\tif (pos.y & 0x40) {\n\t\tuint8_t from_cid = pos.y & 0x0F;\n\t\treturn player->getContainerByID(from_cid);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1a2169712898376a17d93366153eb4f2f020c1d048f289a0e889b939e9af0ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 711, + "startColumn": 14, + "charOffset": 34433, + "charLength": 4, + "snippet": { + "text": "0x40" + } + }, + "contextRegion": { + "startLine": 709, + "startColumn": 14, + "charOffset": 34405, + "charLength": 4, + "snippet": { + "text": "\n\t// container\n\tif (pos.y & 0x40) {\n\t\tuint8_t from_cid = pos.y & 0x0F;\n\t\treturn player->getContainerByID(from_cid);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1fa07075e4a392078492929c23a3ac12610d45052cbe3c44c3a4f2307e967a3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 712, + "startColumn": 22, + "charOffset": 34462, + "charLength": 3, + "snippet": { + "text": "pos" + } + }, + "contextRegion": { + "startLine": 710, + "startColumn": 22, + "charOffset": 34406, + "charLength": 3, + "snippet": { + "text": "\t// container\n\tif (pos.y & 0x40) {\n\t\tuint8_t from_cid = pos.y & 0x0F;\n\t\treturn player->getContainerByID(from_cid);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3498e80ed2a01040e06f565c91b0a2245828dfeba6c7a5228c4ab424be39d326" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 712, + "startColumn": 30, + "charOffset": 34470, + "charLength": 4, + "snippet": { + "text": "0x0F" + } + }, + "contextRegion": { + "startLine": 710, + "startColumn": 30, + "charOffset": 34406, + "charLength": 4, + "snippet": { + "text": "\t// container\n\tif (pos.y & 0x40) {\n\t\tuint8_t from_cid = pos.y & 0x0F;\n\t\treturn player->getContainerByID(from_cid);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "585e405a5e27c4b224cb4c65b95abbe953e1940e8c72cd499677e783b500dbf2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 712, + "startColumn": 30, + "charOffset": 34470, + "charLength": 4, + "snippet": { + "text": "0x0F" + } + }, + "contextRegion": { + "startLine": 710, + "startColumn": 30, + "charOffset": 34406, + "charLength": 4, + "snippet": { + "text": "\t// container\n\tif (pos.y & 0x40) {\n\t\tuint8_t from_cid = pos.y & 0x0F;\n\t\treturn player->getContainerByID(from_cid);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74f7dfb968076f86aab201012e828a2daa953af8a5ded7e6e22170dcb80af2ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x0F is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 712, + "startColumn": 30, + "charOffset": 34470, + "charLength": 4, + "snippet": { + "text": "0x0F" + } + }, + "contextRegion": { + "startLine": 710, + "startColumn": 30, + "charOffset": 34406, + "charLength": 4, + "snippet": { + "text": "\t// container\n\tif (pos.y & 0x40) {\n\t\tuint8_t from_cid = pos.y & 0x0F;\n\t\treturn player->getContainerByID(from_cid);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f57b8d948ed3b6b77dec32cbc8821412fbd4a4e2268415ae4133ee4737d9d7d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'internalGetThing' has cognitive complexity of 80 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 720, + "startColumn": 30, + "charOffset": 34587, + "charLength": 16, + "snippet": { + "text": "internalGetThing" + } + }, + "contextRegion": { + "startLine": 718, + "startColumn": 30, + "charOffset": 34555, + "charLength": 16, + "snippet": { + "text": "}\n\nstd::shared_ptr Game::internalGetThing(std::shared_ptr player, const Position &pos, int32_t index, uint32_t itemId, StackPosType_t type) {\n\tif (pos.x != 0xFFFF) {\n\t\tstd::shared_ptr tile = map.getTile(pos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e56335573d165ff1d9907a5e07769503129b5112cda3e424a77e48f5db499276" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 720, + "startColumn": 71, + "charOffset": 34628, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 718, + "startColumn": 71, + "charOffset": 34555, + "charLength": 6, + "snippet": { + "text": "}\n\nstd::shared_ptr Game::internalGetThing(std::shared_ptr player, const Position &pos, int32_t index, uint32_t itemId, StackPosType_t type) {\n\tif (pos.x != 0xFFFF) {\n\t\tstd::shared_ptr tile = map.getTile(pos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee70e847d50d88c8310341bcb6016169d6ea777d9602f9ba6ffa4e223d4d177d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'internalGetThing' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 720, + "startColumn": 100, + "charOffset": 34657, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 718, + "startColumn": 100, + "charOffset": 34555, + "charLength": 7, + "snippet": { + "text": "}\n\nstd::shared_ptr Game::internalGetThing(std::shared_ptr player, const Position &pos, int32_t index, uint32_t itemId, StackPosType_t type) {\n\tif (pos.x != 0xFFFF) {\n\t\tstd::shared_ptr tile = map.getTile(pos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a94cd2ab8e9a39f68affe3ae4574d37732cd31bf19f0e66665be1a71024f2b64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 721, + "startColumn": 15, + "charOffset": 34726, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 719, + "startColumn": 15, + "charOffset": 34557, + "charLength": 6, + "snippet": { + "text": "\nstd::shared_ptr Game::internalGetThing(std::shared_ptr player, const Position &pos, int32_t index, uint32_t itemId, StackPosType_t type) {\n\tif (pos.x != 0xFFFF) {\n\t\tstd::shared_ptr tile = map.getTile(pos);\n\t\tif (!tile) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9bf7bb9e1c906c817f29c1f27c7966b19a8dd15dabb56ef807403d82480cdd11" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 723, + "startColumn": 7, + "charOffset": 34791, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 721, + "startColumn": 7, + "charOffset": 34712, + "charLength": 1, + "snippet": { + "text": "\tif (pos.x != 0xFFFF) {\n\t\tstd::shared_ptr tile = map.getTile(pos);\n\t\tif (!tile) {\n\t\t\treturn nullptr;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f6e0d07d61d1e0b428a45163cb4b4fb06924d6d48183128d8497ead960204d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 729, + "startColumn": 4, + "charOffset": 34877, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 727, + "startColumn": 4, + "charOffset": 34824, + "charLength": 4, + "snippet": { + "text": "\t\tstd::shared_ptr thing;\n\t\tswitch (type) {\n\t\t\tcase STACKPOS_LOOK: {\n\t\t\t\treturn tile->getTopVisibleThing(player);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb0fd2e5eba78a622f12d852344a8a1f2d6dbd60e462e7f170880263adb18f68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 744, + "startColumn": 19, + "charOffset": 35220, + "charLength": 10, + "snippet": { + "text": "getUseItem" + } + }, + "contextRegion": { + "startLine": 742, + "startColumn": 19, + "charOffset": 35173, + "charLength": 10, + "snippet": { + "text": "\n\t\t\tcase STACKPOS_USEITEM: {\n\t\t\t\tthing = tile->getUseItem(index);\n\t\t\t\tbreak;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a478a782aaf6ca851760e8891be33bb5410681292d48830464ccf2e207e4ec25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 749, + "startColumn": 19, + "charOffset": 35307, + "charLength": 14, + "snippet": { + "text": "getTopDownItem" + } + }, + "contextRegion": { + "startLine": 747, + "startColumn": 19, + "charOffset": 35255, + "charLength": 14, + "snippet": { + "text": "\n\t\t\tcase STACKPOS_TOPDOWN_ITEM: {\n\t\t\t\tthing = tile->getTopDownItem();\n\t\t\t\tbreak;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d227f79719e846e40af018a9ea4f572b9ec175c49d7b160fb9f5304e032ee716" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 755, + "startColumn": 9, + "charOffset": 35429, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 753, + "startColumn": 9, + "charOffset": 35342, + "charLength": 1, + "snippet": { + "text": "\t\t\tcase STACKPOS_USETARGET: {\n\t\t\t\tthing = tile->getTopVisibleCreature(player);\n\t\t\t\tif (!thing) {\n\t\t\t\t\tthing = tile->getUseItem(index);\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7667c4b9aab1e055fa864e66249dc4eef3c4e136e6928ace062ab87ebb56953d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 756, + "startColumn": 20, + "charOffset": 35458, + "charLength": 10, + "snippet": { + "text": "getUseItem" + } + }, + "contextRegion": { + "startLine": 754, + "startColumn": 20, + "charOffset": 35372, + "charLength": 10, + "snippet": { + "text": "\t\t\t\tthing = tile->getTopVisibleCreature(player);\n\t\t\t\tif (!thing) {\n\t\t\t\t\tthing = tile->getUseItem(index);\n\t\t\t\t}\n\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3ecb5e6c189af0452cfa3c6a0bb218695a8ebd688d7a4b1367baf14ae3b1910" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 762, + "startColumn": 19, + "charOffset": 35549, + "charLength": 10, + "snippet": { + "text": "getUseItem" + } + }, + "contextRegion": { + "startLine": 760, + "startColumn": 19, + "charOffset": 35499, + "charLength": 10, + "snippet": { + "text": "\n\t\t\tcase STACKPOS_FIND_THING: {\n\t\t\t\tthing = tile->getUseItem(index);\n\t\t\t\tif (!thing) {\n\t\t\t\t\tthing = tile->getDoorItem();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1cf3078c1b49a8ee68881f1dbf731329a575cdb79de56de0bc9e6fbb82979c77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 763, + "startColumn": 9, + "charOffset": 35576, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 761, + "startColumn": 9, + "charOffset": 35500, + "charLength": 1, + "snippet": { + "text": "\t\t\tcase STACKPOS_FIND_THING: {\n\t\t\t\tthing = tile->getUseItem(index);\n\t\t\t\tif (!thing) {\n\t\t\t\t\tthing = tile->getDoorItem();\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c0dc42006be5db99e5e7fe4a93a1aaa94a93a5f279af6b53ec2d230cd364c5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 764, + "startColumn": 20, + "charOffset": 35605, + "charLength": 11, + "snippet": { + "text": "getDoorItem" + } + }, + "contextRegion": { + "startLine": 762, + "startColumn": 20, + "charOffset": 35531, + "charLength": 11, + "snippet": { + "text": "\t\t\t\tthing = tile->getUseItem(index);\n\t\t\t\tif (!thing) {\n\t\t\t\t\tthing = tile->getDoorItem();\n\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c95b4b5c856cd98e7bee7515cc37c48bca252c8c63dbbb3f0aafd6e172a0d07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 767, + "startColumn": 9, + "charOffset": 35635, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 765, + "startColumn": 9, + "charOffset": 35620, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (!thing) {\n\t\t\t\t\tthing = tile->getTopDownItem();\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2319ed60e0a2fc7d3b43483bc229bff9bdddef2577d215e865992fd80f251ea4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 768, + "startColumn": 20, + "charOffset": 35664, + "charLength": 14, + "snippet": { + "text": "getTopDownItem" + } + }, + "contextRegion": { + "startLine": 766, + "startColumn": 20, + "charOffset": 35626, + "charLength": 14, + "snippet": { + "text": "\n\t\t\t\tif (!thing) {\n\t\t\t\t\tthing = tile->getTopDownItem();\n\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86db450ca9fd6a11da15eb4442843fa072c07ab938d74574e90cbd15e7d649b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 798, + "startColumn": 2, + "charOffset": 36301, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 796, + "startColumn": 2, + "charOffset": 36285, + "charLength": 2, + "snippet": { + "text": "\n\t// container\n\tif (pos.y & 0x40) {\n\t\tuint8_t fromCid = pos.y & 0x0F;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4130682e18b500c68d4243b137b0ef65750d644428d6d352459e3ac8f9c1304e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 798, + "startColumn": 6, + "charOffset": 36305, + "charLength": 3, + "snippet": { + "text": "pos" + } + }, + "contextRegion": { + "startLine": 796, + "startColumn": 6, + "charOffset": 36285, + "charLength": 3, + "snippet": { + "text": "\n\t// container\n\tif (pos.y & 0x40) {\n\t\tuint8_t fromCid = pos.y & 0x0F;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5760df7b34de664e5e1a3b017e5770e7cfe4fa7966ee31e5ff41dd6134e289ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 798, + "startColumn": 6, + "charOffset": 36305, + "charLength": 3, + "snippet": { + "text": "pos" + } + }, + "contextRegion": { + "startLine": 796, + "startColumn": 6, + "charOffset": 36285, + "charLength": 3, + "snippet": { + "text": "\n\t// container\n\tif (pos.y & 0x40) {\n\t\tuint8_t fromCid = pos.y & 0x0F;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0350ad088309d86edd90eb111a89f926e7d17339f4d066ee34e6f0c33779aeea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 798, + "startColumn": 14, + "charOffset": 36313, + "charLength": 4, + "snippet": { + "text": "0x40" + } + }, + "contextRegion": { + "startLine": 796, + "startColumn": 14, + "charOffset": 36285, + "charLength": 4, + "snippet": { + "text": "\n\t// container\n\tif (pos.y & 0x40) {\n\t\tuint8_t fromCid = pos.y & 0x0F;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b723907faaed436a63829434db0da2d532bd7a19c36b80b9f1d0ec4c7d3373a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 798, + "startColumn": 14, + "charOffset": 36313, + "charLength": 4, + "snippet": { + "text": "0x40" + } + }, + "contextRegion": { + "startLine": 796, + "startColumn": 14, + "charOffset": 36285, + "charLength": 4, + "snippet": { + "text": "\n\t// container\n\tif (pos.y & 0x40) {\n\t\tuint8_t fromCid = pos.y & 0x0F;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bcd880266f496d522443bcce23f429d6c5aaf28dc68f5d3f185ac0bbfed7c28c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 798, + "startColumn": 14, + "charOffset": 36313, + "charLength": 4, + "snippet": { + "text": "0x40" + } + }, + "contextRegion": { + "startLine": 796, + "startColumn": 14, + "charOffset": 36285, + "charLength": 4, + "snippet": { + "text": "\n\t// container\n\tif (pos.y & 0x40) {\n\t\tuint8_t fromCid = pos.y & 0x0F;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74285818ac94fa2f430ada234c9f2328c6b2fb18a8834e51be8680aa1fe5f7ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 799, + "startColumn": 21, + "charOffset": 36341, + "charLength": 3, + "snippet": { + "text": "pos" + } + }, + "contextRegion": { + "startLine": 797, + "startColumn": 21, + "charOffset": 36286, + "charLength": 3, + "snippet": { + "text": "\t// container\n\tif (pos.y & 0x40) {\n\t\tuint8_t fromCid = pos.y & 0x0F;\n\n\t\tstd::shared_ptr parentContainer = player->getContainerByID(fromCid);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a3d23d880cb64f08ca9a6518b56442eeaf08e82f50d64f9dea2d851ee4a29fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 799, + "startColumn": 29, + "charOffset": 36349, + "charLength": 4, + "snippet": { + "text": "0x0F" + } + }, + "contextRegion": { + "startLine": 797, + "startColumn": 29, + "charOffset": 36286, + "charLength": 4, + "snippet": { + "text": "\t// container\n\tif (pos.y & 0x40) {\n\t\tuint8_t fromCid = pos.y & 0x0F;\n\n\t\tstd::shared_ptr parentContainer = player->getContainerByID(fromCid);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6ffb44c3b4020b8f3aac1b3cba1ef4f47a60613e2a5ead090c37033d361ee1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 799, + "startColumn": 29, + "charOffset": 36349, + "charLength": 4, + "snippet": { + "text": "0x0F" + } + }, + "contextRegion": { + "startLine": 797, + "startColumn": 29, + "charOffset": 36286, + "charLength": 4, + "snippet": { + "text": "\t// container\n\tif (pos.y & 0x40) {\n\t\tuint8_t fromCid = pos.y & 0x0F;\n\n\t\tstd::shared_ptr parentContainer = player->getContainerByID(fromCid);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "189ee0fcd629fa006fd328649854aa45c452f84b86a8d7711307ed0ec1744fd2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x0F is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 799, + "startColumn": 29, + "charOffset": 36349, + "charLength": 4, + "snippet": { + "text": "0x0F" + } + }, + "contextRegion": { + "startLine": 797, + "startColumn": 29, + "charOffset": 36286, + "charLength": 4, + "snippet": { + "text": "\t// container\n\tif (pos.y & 0x40) {\n\t\tuint8_t fromCid = pos.y & 0x0F;\n\n\t\tstd::shared_ptr parentContainer = player->getContainerByID(fromCid);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0147d91627d9a1911ae1670059b0b24123f5a4bdda11068d977f09d70fd967cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 802, + "startColumn": 7, + "charOffset": 36444, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 800, + "startColumn": 7, + "charOffset": 36355, + "charLength": 1, + "snippet": { + "text": "\n\t\tstd::shared_ptr parentContainer = player->getContainerByID(fromCid);\n\t\tif (!parentContainer) {\n\t\t\treturn nullptr;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83b1f627c44ce426aaefa9d8a8363add496de8bb149f87cfed11d84320ca73ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 828, + "startColumn": 4, + "charOffset": 37219, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 826, + "startColumn": 4, + "charOffset": 37157, + "charLength": 4, + "snippet": { + "text": "\n\t\treturn parentContainer->getItemByIndex(containerIndex);\n\t} else if (pos.y == 0x20 || pos.y == 0x21) {\n\t\t// '0x20' -> From depot.\n\t\t// '0x21' -> From inbox." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99de5d8fa08c47de976089e7859e9a84eeb4af271506ca6568e440e24c617b80" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 828, + "startColumn": 22, + "charOffset": 37237, + "charLength": 4, + "snippet": { + "text": "0x20" + } + }, + "contextRegion": { + "startLine": 826, + "startColumn": 22, + "charOffset": 37157, + "charLength": 4, + "snippet": { + "text": "\n\t\treturn parentContainer->getItemByIndex(containerIndex);\n\t} else if (pos.y == 0x20 || pos.y == 0x21) {\n\t\t// '0x20' -> From depot.\n\t\t// '0x21' -> From inbox." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a96a9e7d588f2f4e21d364f9b9614b46a6639c08fdd1466555c8b76a8c49ceb1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x21 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 828, + "startColumn": 39, + "charOffset": 37254, + "charLength": 4, + "snippet": { + "text": "0x21" + } + }, + "contextRegion": { + "startLine": 826, + "startColumn": 39, + "charOffset": 37157, + "charLength": 4, + "snippet": { + "text": "\n\t\treturn parentContainer->getItemByIndex(containerIndex);\n\t} else if (pos.y == 0x20 || pos.y == 0x21) {\n\t\t// '0x20' -> From depot.\n\t\t// '0x21' -> From inbox." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae2eebb723432c3ae13eb146187ce4e362e904634c253c0c8e5e1a91455c9535" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'subType' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 844, + "startColumn": 11, + "charOffset": 37741, + "charLength": 7, + "snippet": { + "text": "subType" + } + }, + "contextRegion": { + "startLine": 842, + "startColumn": 11, + "charOffset": 37726, + "charLength": 7, + "snippet": { + "text": "\t\t}\n\n\t\tint32_t subType;\n\t\tif (it.isFluidContainer()) {\n\t\t\tsubType = index;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3be9f54ce237b7f7362cafa55a730ad648cf65f71060a5e76d8acc5aef5cc5d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 855, + "startColumn": 2, + "charOffset": 37908, + "charLength": 7, + "snippet": { + "text": "Slots_t" + } + }, + "contextRegion": { + "startLine": 853, + "startColumn": 2, + "charOffset": 37892, + "charLength": 7, + "snippet": { + "text": "\n\t// inventory\n\tSlots_t slot = static_cast(pos.y);\n\treturn player->getInventoryItem(slot);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "926b7ae6935abcda12a052a9ae28eb694279affa0b1d33a9d2dadd1b92dcfcec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 859, + "startColumn": 54, + "charOffset": 38048, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 857, + "startColumn": 54, + "charOffset": 37992, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Game::internalGetPosition(std::shared_ptr item, Position &pos, uint8_t &stackpos) {\n\tpos.x = 0;\n\tpos.y = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "919d3a6908cdfa1ed40416e8925f9ef119f0e201dc6e5af939843752bbaf0be1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 867, + "startColumn": 3, + "charOffset": 38223, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 865, + "startColumn": 3, + "charOffset": 38142, + "charLength": 2, + "snippet": { + "text": "\tstd::shared_ptr topParent = item->getTopParent();\n\tif (topParent) {\n\t\tif (std::shared_ptr player = std::dynamic_pointer_cast(topParent)) {\n\t\t\tpos.x = 0xFFFF;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e10e9a1aecf78f0f1ae6672029a55a86805f6b533a42f600e4dcaef662a515b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 868, + "startColumn": 12, + "charOffset": 38319, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 866, + "startColumn": 12, + "charOffset": 38203, + "charLength": 6, + "snippet": { + "text": "\tif (topParent) {\n\t\tif (std::shared_ptr player = std::dynamic_pointer_cast(topParent)) {\n\t\t\tpos.x = 0xFFFF;\n\n\t\t\tstd::shared_ptr container = std::dynamic_pointer_cast(item->getParent());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df47bb6e640c8ceec40bb2bdc029b515e8805ab7b966ebbeccbc0b19ace68b13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 868, + "startColumn": 12, + "charOffset": 38319, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 866, + "startColumn": 12, + "charOffset": 38203, + "charLength": 6, + "snippet": { + "text": "\tif (topParent) {\n\t\tif (std::shared_ptr player = std::dynamic_pointer_cast(topParent)) {\n\t\t\tpos.x = 0xFFFF;\n\n\t\t\tstd::shared_ptr container = std::dynamic_pointer_cast(item->getParent());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "333e643361716c890e1cd896bb2e99aaccb02cd345547323073cdfba98b1bc47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 872, + "startColumn": 13, + "charOffset": 38459, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 870, + "startColumn": 13, + "charOffset": 38328, + "charLength": 11, + "snippet": { + "text": "\t\t\tstd::shared_ptr container = std::dynamic_pointer_cast(item->getParent());\n\t\t\tif (container) {\n\t\t\t\tpos.y = static_cast(0x40) | static_cast(player->getContainerID(container));\n\t\t\t\tpos.z = container->getThingIndex(item);\n\t\t\t\tstackpos = pos.z;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce5769fbe2b1f07a9e305d1657378c5011bbed8ecc50b2356eb198f1f9727f8b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 872, + "startColumn": 35, + "charOffset": 38481, + "charLength": 4, + "snippet": { + "text": "0x40" + } + }, + "contextRegion": { + "startLine": 870, + "startColumn": 35, + "charOffset": 38328, + "charLength": 4, + "snippet": { + "text": "\t\t\tstd::shared_ptr container = std::dynamic_pointer_cast(item->getParent());\n\t\t\tif (container) {\n\t\t\t\tpos.y = static_cast(0x40) | static_cast(player->getContainerID(container));\n\t\t\t\tpos.z = container->getThingIndex(item);\n\t\t\t\tstackpos = pos.z;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06a1eea8427c3fb2b648fafbb1583dc3159133f60938c596bffc19efd5f4980e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 872, + "startColumn": 35, + "charOffset": 38481, + "charLength": 4, + "snippet": { + "text": "0x40" + } + }, + "contextRegion": { + "startLine": 870, + "startColumn": 35, + "charOffset": 38328, + "charLength": 4, + "snippet": { + "text": "\t\t\tstd::shared_ptr container = std::dynamic_pointer_cast(item->getParent());\n\t\t\tif (container) {\n\t\t\t\tpos.y = static_cast(0x40) | static_cast(player->getContainerID(container));\n\t\t\t\tpos.z = container->getThingIndex(item);\n\t\t\t\tstackpos = pos.z;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0288686746032779f303985ae158659974c927c992bc33813e87b560203a5124" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 873, + "startColumn": 13, + "charOffset": 38559, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 871, + "startColumn": 13, + "charOffset": 38427, + "charLength": 9, + "snippet": { + "text": "\t\t\tif (container) {\n\t\t\t\tpos.y = static_cast(0x40) | static_cast(player->getContainerID(container));\n\t\t\t\tpos.z = container->getThingIndex(item);\n\t\t\t\tstackpos = pos.z;\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43a2bdf6b62aa5bdff5238ea2953b16858e9e289739492bc1759db5e456e680e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 876, + "startColumn": 13, + "charOffset": 38637, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 874, + "startColumn": 13, + "charOffset": 38591, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tstackpos = pos.z;\n\t\t\t} else {\n\t\t\t\tpos.y = player->getThingIndex(item);\n\t\t\t\tstackpos = pos.y;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8af3e251f50d3887e2eb7b47debe4a16d29a129714392f74f7517f5310b64c4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 877, + "startColumn": 16, + "charOffset": 38681, + "charLength": 3, + "snippet": { + "text": "pos" + } + }, + "contextRegion": { + "startLine": 875, + "startColumn": 16, + "charOffset": 38613, + "charLength": 3, + "snippet": { + "text": "\t\t\t} else {\n\t\t\t\tpos.y = player->getThingIndex(item);\n\t\t\t\tstackpos = pos.y;\n\t\t\t}\n\t\t} else if (std::shared_ptr tile = topParent->getTile()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "695a217ee2abb49e4b1f54ff07db7412677e1bcf10056419509aa3c5dfa7cb08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 881, + "startColumn": 15, + "charOffset": 38803, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 879, + "startColumn": 15, + "charOffset": 38693, + "charLength": 4, + "snippet": { + "text": "\t\t} else if (std::shared_ptr tile = topParent->getTile()) {\n\t\t\tpos = tile->getPosition();\n\t\t\tstackpos = tile->getThingIndex(item);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "656b65fa6f45add34a477850305c3472adb864a425e9acf6c3cdaed9d8094053" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 889, + "startColumn": 4, + "charOffset": 38998, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 887, + "startColumn": 4, + "charOffset": 38903, + "charLength": 4, + "snippet": { + "text": "\tif (id >= Player::getFirstID() && id <= Player::getLastID()) {\n\t\treturn getPlayerByID(id);\n\t} else if (id <= Monster::monsterAutoID) {\n\t\treturn getMonsterByID(id);\n\t} else if (id <= Npc::npcAutoID) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "112f3ba10f4db1025a8b332668002d47421c5ab94b4dbb3eb2a56e6ca78136fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getNpcByName' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 966, + "startColumn": 28, + "charOffset": 40639, + "charLength": 12, + "snippet": { + "text": "getNpcByName" + } + }, + "contextRegion": { + "startLine": 964, + "startColumn": 28, + "charOffset": 40609, + "charLength": 12, + "snippet": { + "text": "}\n\nstd::shared_ptr Game::getNpcByName(const std::string &s) {\n\tif (s.empty()) {\n\t\treturn nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b48feda27406d832639d1abd39e809c6af9ec7d6c590ee416f4aacd933617338" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getPlayerByGUID' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1005, + "startColumn": 31, + "charOffset": 41652, + "charLength": 15, + "snippet": { + "text": "getPlayerByGUID" + } + }, + "contextRegion": { + "startLine": 1003, + "startColumn": 31, + "charOffset": 41619, + "charLength": 15, + "snippet": { + "text": "}\n\nstd::shared_ptr Game::getPlayerByGUID(const uint32_t &guid, bool allowOffline /* = false */) {\n\tif (guid == 0) {\n\t\treturn nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35d363470c25e6e49ec2c7d9c884e39ccaeff911c853d9696bc2ca1d52a4f994" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1034, + "startColumn": 6, + "charOffset": 42378, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1032, + "startColumn": 6, + "charOffset": 42283, + "charLength": 1, + "snippet": { + "text": "\tauto player = getPlayerByGUID(guid, true);\n\tauto name = player ? player->getName() : \"\";\n\tif (!name.empty()) {\n\t\tm_playerNameCache[guid] = name;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a2f374a55554afb616017f6027a850e6778e8bff22f97cf1fc9be04f00b3454" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1042, + "startColumn": 30, + "charOffset": 42606, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 1040, + "startColumn": 30, + "charOffset": 42449, + "charLength": 2, + "snippet": { + "text": "ReturnValue Game::getPlayerByNameWildcard(const std::string &s, std::shared_ptr &player) {\n\tsize_t strlen = s.length();\n\tif (strlen == 0 || strlen > 20) {\n\t\treturn RETURNVALUE_PLAYERWITHTHISNAMEISNOTONLINE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9323a1f3f7fe38e6c7eeec725f0ca419014b09b9ac32e71edc6427cbb8975e67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1059, + "startColumn": 6, + "charOffset": 42987, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1057, + "startColumn": 6, + "charOffset": 42978, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!player) {\n\t\treturn RETURNVALUE_PLAYERWITHTHISNAMEISNOTONLINE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca3d3facb50843e43fc367fe7910e387ea338e39b8902b908258d88e8bbf189a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getPlayersByAccount' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1066, + "startColumn": 44, + "charOffset": 43129, + "charLength": 19, + "snippet": { + "text": "getPlayersByAccount" + } + }, + "contextRegion": { + "startLine": 1064, + "startColumn": 44, + "charOffset": 43083, + "charLength": 19, + "snippet": { + "text": "}\n\nstd::vector> Game::getPlayersByAccount(std::shared_ptr acc, bool allowOffline /* = false */) {\n\tauto [accountPlayers, error] = acc->getAccountPlayers();\n\tif (error != enumToValue(AccountErrors_t::Ok)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb8649e893bdc4b0aaf771d0f9b2cda3839d865f358b8403207fc30385097d04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'acc' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1066, + "startColumn": 89, + "charOffset": 43174, + "charLength": 3, + "snippet": { + "text": "acc" + } + }, + "contextRegion": { + "startLine": 1064, + "startColumn": 89, + "charOffset": 43083, + "charLength": 3, + "snippet": { + "text": "}\n\nstd::vector> Game::getPlayersByAccount(std::shared_ptr acc, bool allowOffline /* = false */) {\n\tauto [accountPlayers, error] = acc->getAccountPlayers();\n\tif (error != enumToValue(AccountErrors_t::Ok)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d99497010ac725f9dc94e5f522f71f55b35a232a38159e4c24793dea4e2b16da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1081, + "startColumn": 60, + "charOffset": 43606, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1079, + "startColumn": 60, + "charOffset": 43544, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Game::internalPlaceCreature(std::shared_ptr creature, const Position &pos, bool extendedPos /*=false*/, bool forced /*= false*/, bool creatureCheck /*= false*/) {\n\tif (creature->getParent() != nullptr) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cdb38ba4fa2524de8c143f9987fed8b05a2012e170d3f5d39fcf833e580c176a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1086, + "startColumn": 6, + "charOffset": 43828, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1084, + "startColumn": 6, + "charOffset": 43782, + "charLength": 1, + "snippet": { + "text": "\t}\n\tconst auto &tile = map.getTile(pos);\n\tif (!tile) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dda7b09f628324f609a6c40834322c1f4ff944448f9317b956d90790bec80901" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1110, + "startColumn": 52, + "charOffset": 44375, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1108, + "startColumn": 52, + "charOffset": 44321, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Game::placeCreature(std::shared_ptr creature, const Position &pos, bool extendedPos /*=false*/, bool forced /*= false*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (!internalPlaceCreature(creature, pos, extendedPos, forced)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5aeed1d27bd21695910b46a5689e265fbec6da3f97fd57ceeb0d974334704041" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1111, + "startColumn": 34, + "charOffset": 44495, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1109, + "startColumn": 34, + "charOffset": 44323, + "charLength": 15, + "snippet": { + "text": "\nbool Game::placeCreature(std::shared_ptr creature, const Position &pos, bool extendedPos /*=false*/, bool forced /*= false*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (!internalPlaceCreature(creature, pos, extendedPos, forced)) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8bd5d9d86557deff69fed274b0a8a518bc49854025fbecc40d6eccf78397ac22" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1137, + "startColumn": 53, + "charOffset": 45215, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1135, + "startColumn": 53, + "charOffset": 45160, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Game::removeCreature(std::shared_ptr creature, bool isLogout /* = true*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (!creature || creature->isRemoved()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1621700473dbc19a21d8d0b44a15ea2cd83e2bb89a41ad315b0fd0703de4f374" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1138, + "startColumn": 34, + "charOffset": 45287, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1136, + "startColumn": 34, + "charOffset": 45162, + "charLength": 15, + "snippet": { + "text": "\nbool Game::removeCreature(std::shared_ptr creature, bool isLogout /* = true*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (!creature || creature->isRemoved()) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad3f408ab4d83b80b22dfaf43787e09f2e230364ed217d97e0de09f1a4cbe589" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1139, + "startColumn": 6, + "charOffset": 45310, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1137, + "startColumn": 6, + "charOffset": 45163, + "charLength": 1, + "snippet": { + "text": "bool Game::removeCreature(std::shared_ptr creature, bool isLogout /* = true*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (!creature || creature->isRemoved()) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20fe484e670a2c574454f917329078b2c4f3911c59736476173989b7b6765bc0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1144, + "startColumn": 6, + "charOffset": 45424, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1142, + "startColumn": 6, + "charOffset": 45367, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr tile = creature->getTile();\n\tif (!tile) {\n\t\tg_logger().error(\"[{}] tile on position '{}' for creature '{}' not exist\", __FUNCTION__, creature->getPosition().toString(), creature->getName());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3404d61a4cefc4523d6a3402ba1f73b9acd6761d1eaa2a051a48ade544cfaf77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1145, + "startColumn": 116, + "charOffset": 45548, + "charLength": 8, + "snippet": { + "text": "toString" + } + }, + "contextRegion": { + "startLine": 1143, + "startColumn": 116, + "charOffset": 45368, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr tile = creature->getTile();\n\tif (!tile) {\n\t\tg_logger().error(\"[{}] tile on position '{}' for creature '{}' not exist\", __FUNCTION__, creature->getPosition().toString(), creature->getName());\n\t}\n\tauto fromZones = creature->getZones();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86a9779d529ade36d480d6b1573414eff95706551d07e6c83c0961250b3f401c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1145, + "startColumn": 138, + "charOffset": 45570, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 1143, + "startColumn": 138, + "charOffset": 45368, + "charLength": 7, + "snippet": { + "text": "\tstd::shared_ptr tile = creature->getTile();\n\tif (!tile) {\n\t\tg_logger().error(\"[{}] tile on position '{}' for creature '{}' not exist\", __FUNCTION__, creature->getPosition().toString(), creature->getName());\n\t}\n\tauto fromZones = creature->getZones();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82405ab104ec8f3017cc61857438bd80a19d9c931e27d86fcf9a548041a01083" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1179, + "startColumn": 13, + "charOffset": 46567, + "charLength": 9, + "snippet": { + "text": "setMaster" + } + }, + "contextRegion": { + "startLine": 1177, + "startColumn": 13, + "charOffset": 46485, + "charLength": 9, + "snippet": { + "text": "\n\tif (creature->getMaster() && !creature->getMaster()->isRemoved()) {\n\t\tcreature->setMaster(nullptr);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f70e3520f86d33481bcedf331f78a2e1c5a32c8f3653c2909f3918c98df1ef83" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1198, + "startColumn": 18, + "charOffset": 47071, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 1196, + "startColumn": 18, + "charOffset": 46953, + "charLength": 5, + "snippet": { + "text": "\t\tauto it = teamFinderMap.find(creature->getPlayer()->getGUID());\n\t\tif (it != teamFinderMap.end()) {\n\t\t\tteamFinderMap.erase(it);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf2629d04695c490ba079f3c1870c548441ccf172c44b6049412f988537197ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1206, + "startColumn": 34, + "charOffset": 47187, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1204, + "startColumn": 34, + "charOffset": 47106, + "charLength": 15, + "snippet": { + "text": "\nvoid Game::executeDeath(uint32_t creatureId) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tstd::shared_ptr creature = getCreatureByID(creatureId);\n\tif (creature && !creature->isRemoved()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "240c1795e66a72ca9f861fbc7a2c34669f1a24be45db8b27da2eb4ecd5128a70" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1215, + "startColumn": 34, + "charOffset": 47516, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1213, + "startColumn": 34, + "charOffset": 47406, + "charLength": 15, + "snippet": { + "text": "\nvoid Game::playerTeleport(uint32_t playerId, const Position &newPosition) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || !player->hasFlag(PlayerFlags_t::CanMapClickTeleport)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf692fb764f6e11d59727114019329c410c87afbc2e9e8173b859230d0605fb5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1217, + "startColumn": 6, + "charOffset": 47598, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1215, + "startColumn": 6, + "charOffset": 47483, + "charLength": 1, + "snippet": { + "text": "\tmetrics::method_latency measure(__METHOD_NAME__);\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || !player->hasFlag(PlayerFlags_t::CanMapClickTeleport)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7916e8b6684c442e63ca0bf07e169a255be54611a745c54c88a867d91bf5741" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1227, + "startColumn": 54, + "charOffset": 47905, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1225, + "startColumn": 54, + "charOffset": 47849, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::playerInspectItem(std::shared_ptr player, const Position &pos) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tstd::shared_ptr thing = internalGetThing(player, pos, 0, 0, STACKPOS_TOPDOWN_ITEM);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f3fe2d5647d7eab28f87ea6ab4c9e9f653c3a29a8f83b27f76b6cd34e11f0bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1228, + "startColumn": 34, + "charOffset": 47969, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1226, + "startColumn": 34, + "charOffset": 47851, + "charLength": 15, + "snippet": { + "text": "\nvoid Game::playerInspectItem(std::shared_ptr player, const Position &pos) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tstd::shared_ptr thing = internalGetThing(player, pos, 0, 0, STACKPOS_TOPDOWN_ITEM);\n\tif (!thing) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2565ca3f36fefb781a2c6bb3512e208c6af8b6212adf60bf94c82a1259ee20fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1230, + "startColumn": 6, + "charOffset": 48084, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1228, + "startColumn": 6, + "charOffset": 47936, + "charLength": 1, + "snippet": { + "text": "\tmetrics::method_latency measure(__METHOD_NAME__);\n\tstd::shared_ptr thing = internalGetThing(player, pos, 0, 0, STACKPOS_TOPDOWN_ITEM);\n\tif (!thing) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "458568a8be4f4cc900f63a3aa533a74f62430963341975b9dbc7515e7914cb6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1236, + "startColumn": 6, + "charOffset": 48215, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1234, + "startColumn": 6, + "charOffset": 48161, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = thing->getItem();\n\tif (!item) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ecdd5c4317a2741f51bb67e18ff222791fa39b28f80ca5339702306ad26ce7b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'playerInspectItem' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1244, + "startColumn": 12, + "charOffset": 48407, + "charLength": 17, + "snippet": { + "text": "playerInspectItem" + } + }, + "contextRegion": { + "startLine": 1242, + "startColumn": 12, + "charOffset": 48393, + "charLength": 17, + "snippet": { + "text": "}\n\nvoid Game::playerInspectItem(std::shared_ptr player, uint16_t itemId, uint8_t itemCount, bool cyclopedia) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tplayer->sendItemInspection(itemId, itemCount, nullptr, cyclopedia);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d9ea07c55905fdb0f02d81b9e3ae64ccdbc1a14a8a082b676875d2a1a6d752f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1244, + "startColumn": 54, + "charOffset": 48449, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1242, + "startColumn": 54, + "charOffset": 48393, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::playerInspectItem(std::shared_ptr player, uint16_t itemId, uint8_t itemCount, bool cyclopedia) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tplayer->sendItemInspection(itemId, itemCount, nullptr, cyclopedia);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2cb6b1a5ec9cef833d964fe35d5ea2c1fe1e5187a3cc3321ef026d7ab61583d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1245, + "startColumn": 34, + "charOffset": 48545, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1243, + "startColumn": 34, + "charOffset": 48395, + "charLength": 15, + "snippet": { + "text": "\nvoid Game::playerInspectItem(std::shared_ptr player, uint16_t itemId, uint8_t itemCount, bool cyclopedia) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tplayer->sendItemInspection(itemId, itemCount, nullptr, cyclopedia);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dcba2176db3c144820c28598903bfd1dda3c49ffad5522c256d573cc34cd8eac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-7-3-4", + "ruleIndex": 464, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 7-3-4: using-directives shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1250, + "startColumn": 2, + "charOffset": 48710, + "charLength": 5, + "snippet": { + "text": "using" + } + }, + "contextRegion": { + "startLine": 1248, + "startColumn": 2, + "charOffset": 48634, + "charLength": 5, + "snippet": { + "text": "\nFILELOADER_ERRORS Game::loadAppearanceProtobuf(const std::string &file) {\n\tusing namespace Canary::protobuf::appearances;\n\n\tstd::fstream fileStream(file, std::ios::in | std::ios::binary);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b0f0242898ba0b2ba18ad182da06b737301ea433efcda497bd8ae52512a502c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-build-using-namespace", + "ruleIndex": 532, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use namespace using-directives; use using-declarations instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1250, + "startColumn": 2, + "charOffset": 48710, + "charLength": 5, + "snippet": { + "text": "using" + } + }, + "contextRegion": { + "startLine": 1248, + "startColumn": 2, + "charOffset": 48634, + "charLength": 5, + "snippet": { + "text": "\nFILELOADER_ERRORS Game::loadAppearanceProtobuf(const std::string &file) {\n\tusing namespace Canary::protobuf::appearances;\n\n\tstd::fstream fileStream(file, std::ios::in | std::ios::binary);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05abec0520c0efcef0ab3aa47a968b10a50c80a743bfe4d75f8c7a8fa9c85b14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1263, + "startColumn": 6, + "charOffset": 49236, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1261, + "startColumn": 6, + "charOffset": 49145, + "charLength": 1, + "snippet": { + "text": "\tGOOGLE_PROTOBUF_VERIFY_VERSION;\n\tm_appearancesPtr = std::make_unique();\n\tif (!m_appearancesPtr->ParseFromIstream(&fileStream)) {\n\t\tg_logger().error(\"[Game::loadAppearanceProtobuf] - Failed to parse binary file {}, file is invalid\", file);\n\t\tfileStream.close();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15560d1c21db7edbcdaf9bd662078b0c304fdfba905282f97c8088eb20527443" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1275, + "startColumn": 3, + "charOffset": 49671, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1273, + "startColumn": 3, + "charOffset": 49563, + "charLength": 3, + "snippet": { + "text": "\tif (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS, __FUNCTION__)) {\n\t\t// Registering distance effects\n\t\tfor (uint32_t it = 0; it < m_appearancesPtr->effect_size(); it++) {\n\t\t\tregisteredMagicEffects.push_back(static_cast(m_appearancesPtr->effect(it).id()));\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76b4abc2cb236cf91fe86378f3bdd32fce675be10fbb994f25613d5cd342e925" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1280, + "startColumn": 3, + "charOffset": 49874, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1278, + "startColumn": 3, + "charOffset": 49838, + "charLength": 3, + "snippet": { + "text": "\n\t\t// Registering missile effects\n\t\tfor (uint32_t it = 0; it < m_appearancesPtr->missile_size(); it++) {\n\t\t\tregisteredDistanceEffects.push_back(static_cast(m_appearancesPtr->missile(it).id()));\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79086077483ed95e1427c68572557543774aab0d13308eba3bdc58d5f00b19ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1285, + "startColumn": 3, + "charOffset": 50074, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1283, + "startColumn": 3, + "charOffset": 50046, + "charLength": 3, + "snippet": { + "text": "\n\t\t// Registering outfits\n\t\tfor (uint32_t it = 0; it < m_appearancesPtr->outfit_size(); it++) {\n\t\t\tregisteredLookTypes.push_back(static_cast(m_appearancesPtr->outfit(it).id()));\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e98c1dc695a0817ac4fa2ff296b385a7094b68f2a059afaa936d88c51faa544" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1299, + "startColumn": 34, + "charOffset": 50550, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1297, + "startColumn": 34, + "charOffset": 50366, + "charLength": 15, + "snippet": { + "text": "\nvoid Game::playerMoveThing(uint32_t playerId, const Position &fromPos, uint16_t itemId, uint8_t fromStackPos, const Position &toPos, uint8_t count) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "435869d70c1ed5eef3a8461c6eda4a4b8d0a95b555b43c27d2235a512102b7ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1301, + "startColumn": 6, + "charOffset": 50632, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1299, + "startColumn": 6, + "charOffset": 50517, + "charLength": 1, + "snippet": { + "text": "\tmetrics::method_latency measure(__METHOD_NAME__);\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "787f0579cbafc9727320eb87db3f8d6adf5d8e5ba709c6090e20ea2752874162" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1311, + "startColumn": 19, + "charOffset": 50830, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 1309, + "startColumn": 19, + "charOffset": 50787, + "charLength": 6, + "snippet": { + "text": "\n\tuint8_t fromIndex = 0;\n\tif (fromPos.x == 0xFFFF) {\n\t\tif (fromPos.y & 0x40) {\n\t\t\tfromIndex = fromPos.z;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a813baa3657b44f9f5b175957bd9755d200e2830ca530904ab27ac521544a19" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1312, + "startColumn": 7, + "charOffset": 50846, + "charLength": 7, + "snippet": { + "text": "fromPos" + } + }, + "contextRegion": { + "startLine": 1310, + "startColumn": 7, + "charOffset": 50788, + "charLength": 7, + "snippet": { + "text": "\tuint8_t fromIndex = 0;\n\tif (fromPos.x == 0xFFFF) {\n\t\tif (fromPos.y & 0x40) {\n\t\t\tfromIndex = fromPos.z;\n\t\t} else if ((fromPos.y == 0x20 || fromPos.y == 0x21) && !player->isDepotSearchOpenOnItem(itemId)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba6d4cf278b27a7cb4f8e106d395134f1bd7b9c36825aa6b2ed4a93a98458632" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1312, + "startColumn": 7, + "charOffset": 50846, + "charLength": 7, + "snippet": { + "text": "fromPos" + } + }, + "contextRegion": { + "startLine": 1310, + "startColumn": 7, + "charOffset": 50788, + "charLength": 7, + "snippet": { + "text": "\tuint8_t fromIndex = 0;\n\tif (fromPos.x == 0xFFFF) {\n\t\tif (fromPos.y & 0x40) {\n\t\t\tfromIndex = fromPos.z;\n\t\t} else if ((fromPos.y == 0x20 || fromPos.y == 0x21) && !player->isDepotSearchOpenOnItem(itemId)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "641a4d1ba2a2e01f7198402c1f62c7df154a88046112f3f7190fd49a9a36e312" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1312, + "startColumn": 19, + "charOffset": 50858, + "charLength": 4, + "snippet": { + "text": "0x40" + } + }, + "contextRegion": { + "startLine": 1310, + "startColumn": 19, + "charOffset": 50788, + "charLength": 4, + "snippet": { + "text": "\tuint8_t fromIndex = 0;\n\tif (fromPos.x == 0xFFFF) {\n\t\tif (fromPos.y & 0x40) {\n\t\t\tfromIndex = fromPos.z;\n\t\t} else if ((fromPos.y == 0x20 || fromPos.y == 0x21) && !player->isDepotSearchOpenOnItem(itemId)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb31b4de88230677811419b3408eebec6b7d7ec67723b932241603f7aad951e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1312, + "startColumn": 19, + "charOffset": 50858, + "charLength": 4, + "snippet": { + "text": "0x40" + } + }, + "contextRegion": { + "startLine": 1310, + "startColumn": 19, + "charOffset": 50788, + "charLength": 4, + "snippet": { + "text": "\tuint8_t fromIndex = 0;\n\tif (fromPos.x == 0xFFFF) {\n\t\tif (fromPos.y & 0x40) {\n\t\t\tfromIndex = fromPos.z;\n\t\t} else if ((fromPos.y == 0x20 || fromPos.y == 0x21) && !player->isDepotSearchOpenOnItem(itemId)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9b2c33fd5d5a2957cc87e1827c2148aa7be152c415a4cd3b92b8d6d56d79e9c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1312, + "startColumn": 19, + "charOffset": 50858, + "charLength": 4, + "snippet": { + "text": "0x40" + } + }, + "contextRegion": { + "startLine": 1310, + "startColumn": 19, + "charOffset": 50788, + "charLength": 4, + "snippet": { + "text": "\tuint8_t fromIndex = 0;\n\tif (fromPos.x == 0xFFFF) {\n\t\tif (fromPos.y & 0x40) {\n\t\t\tfromIndex = fromPos.z;\n\t\t} else if ((fromPos.y == 0x20 || fromPos.y == 0x21) && !player->isDepotSearchOpenOnItem(itemId)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9042284199c32efdfa397c9744c7430009664db245630594bd2f3f7691a8c452" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1314, + "startColumn": 28, + "charOffset": 50919, + "charLength": 4, + "snippet": { + "text": "0x20" + } + }, + "contextRegion": { + "startLine": 1312, + "startColumn": 28, + "charOffset": 50840, + "charLength": 4, + "snippet": { + "text": "\t\tif (fromPos.y & 0x40) {\n\t\t\tfromIndex = fromPos.z;\n\t\t} else if ((fromPos.y == 0x20 || fromPos.y == 0x21) && !player->isDepotSearchOpenOnItem(itemId)) {\n\t\t\t// '0x20' -> From depot.\n\t\t\t// '0x21' -> From inbox." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6475fa5d651d4e626f2a72fa2bd45feceb48fdfb4664efeb3e8bd1227711a43d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x21 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1314, + "startColumn": 49, + "charOffset": 50940, + "charLength": 4, + "snippet": { + "text": "0x21" + } + }, + "contextRegion": { + "startLine": 1312, + "startColumn": 49, + "charOffset": 50840, + "charLength": 4, + "snippet": { + "text": "\t\tif (fromPos.y & 0x40) {\n\t\t\tfromIndex = fromPos.z;\n\t\t} else if ((fromPos.y == 0x20 || fromPos.y == 0x21) && !player->isDepotSearchOpenOnItem(itemId)) {\n\t\t\t// '0x20' -> From depot.\n\t\t\t// '0x21' -> From inbox." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e45de7960c56dcd30a54d3f13c6ff0f95d0d60cb3a674f9131daa7d9652141a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1328, + "startColumn": 6, + "charOffset": 51397, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1326, + "startColumn": 6, + "charOffset": 51290, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr thing = internalGetThing(player, fromPos, fromIndex, itemId, STACKPOS_MOVE);\n\tif (!thing) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e7d88f64cb12f9438c4f6d238ae9aec12482c72e5c2ad8b38cfd0c25f6d87e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1333, + "startColumn": 2, + "charOffset": 51476, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1331, + "startColumn": 2, + "charOffset": 51471, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (std::shared_ptr movingCreature = thing->getCreature()) {\n\t\tstd::shared_ptr tile = map.getTile(toPos);\n\t\tif (!tile) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94620253f4afe1582ca6bacbb6cc5ba7ab6291972b63cc0c401af46ece3ae366" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1335, + "startColumn": 7, + "charOffset": 51604, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1333, + "startColumn": 7, + "charOffset": 51475, + "charLength": 1, + "snippet": { + "text": "\tif (std::shared_ptr movingCreature = thing->getCreature()) {\n\t\tstd::shared_ptr tile = map.getTile(toPos);\n\t\tif (!tile) {\n\t\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e37cdc182d1e78586bfebcd5719b5533eedcc91bcae079015676098a6353c9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1354, + "startColumn": 7, + "charOffset": 52344, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1352, + "startColumn": 7, + "charOffset": 52229, + "charLength": 1, + "snippet": { + "text": "\t} else if (thing->getItem()) {\n\t\tstd::shared_ptr toCylinder = internalGetCylinder(player, toPos);\n\t\tif (!toCylinder) {\n\t\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c472087613841fe94d1342c40d39365355bc151068f91b9b76854bccf13bd78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerMoveCreatureByID' of similar type ('uint32_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1363, + "startColumn": 35, + "charOffset": 52571, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 1361, + "startColumn": 35, + "charOffset": 52534, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerMoveCreatureByID(uint32_t playerId, uint32_t movingCreatureId, const Position &movingCreatureOrigPos, const Position &toPos) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96c02f91ca60c47979d2b908753ca64f047f5924e02d2f11a17a9853764978ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerMoveCreatureByID' of similar type ('const Position &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1363, + "startColumn": 81, + "charOffset": 52617, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 1361, + "startColumn": 81, + "charOffset": 52534, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid Game::playerMoveCreatureByID(uint32_t playerId, uint32_t movingCreatureId, const Position &movingCreatureOrigPos, const Position &toPos) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a513dd47a3283906790d93e5fb3fd9d44c9c08f959dd2c8a7b4c5ccaddb5a56e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1365, + "startColumn": 6, + "charOffset": 52745, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1363, + "startColumn": 6, + "charOffset": 52537, + "charLength": 1, + "snippet": { + "text": "void Game::playerMoveCreatureByID(uint32_t playerId, uint32_t movingCreatureId, const Position &movingCreatureOrigPos, const Position &toPos) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16b77dcbd9a7b114b431c3ee37a3f2e23612b119b952c92d1b1c0eef1a0a0f96" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1370, + "startColumn": 6, + "charOffset": 52854, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1368, + "startColumn": 6, + "charOffset": 52769, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr movingCreature = getCreatureByID(movingCreatureId);\n\tif (!movingCreature) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "faf69603393764027811d8477b7f705430bd25474a653d00b5fd5baa2c66810d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1375, + "startColumn": 6, + "charOffset": 52944, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1373, + "startColumn": 6, + "charOffset": 52886, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr toTile = map.getTile(toPos);\n\tif (!toTile) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "592a668384bd8941709f1c579abd0e304369fa3460859b5c184b06769d46ed37" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'playerMoveCreature' has cognitive complexity of 31 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1383, + "startColumn": 12, + "charOffset": 53113, + "charLength": 18, + "snippet": { + "text": "playerMoveCreature" + } + }, + "contextRegion": { + "startLine": 1381, + "startColumn": 12, + "charOffset": 53099, + "charLength": 18, + "snippet": { + "text": "}\n\nvoid Game::playerMoveCreature(std::shared_ptr player, std::shared_ptr movingCreature, const Position &movingCreatureOrigPos, std::shared_ptr toTile) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (!player->canDoAction()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c2cc91c6a922bee13b653bb4a484fd3083c99757d63632f9539bb4fa244187f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1383, + "startColumn": 55, + "charOffset": 53156, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1381, + "startColumn": 55, + "charOffset": 53099, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::playerMoveCreature(std::shared_ptr player, std::shared_ptr movingCreature, const Position &movingCreatureOrigPos, std::shared_ptr toTile) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (!player->canDoAction()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fcdc23df15d2563862e4b6cc0bb10194c1f0b153bb88ff0888afeca8ad6162f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'movingCreature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1383, + "startColumn": 89, + "charOffset": 53190, + "charLength": 14, + "snippet": { + "text": "movingCreature" + } + }, + "contextRegion": { + "startLine": 1381, + "startColumn": 89, + "charOffset": 53099, + "charLength": 14, + "snippet": { + "text": "}\n\nvoid Game::playerMoveCreature(std::shared_ptr player, std::shared_ptr movingCreature, const Position &movingCreatureOrigPos, std::shared_ptr toTile) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (!player->canDoAction()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49de2d40c268cd4a4ab2a8db01db50534ad3313db26440df99629ff261f409ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'toTile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1383, + "startColumn": 166, + "charOffset": 53267, + "charLength": 6, + "snippet": { + "text": "toTile" + } + }, + "contextRegion": { + "startLine": 1381, + "startColumn": 166, + "charOffset": 53099, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::playerMoveCreature(std::shared_ptr player, std::shared_ptr movingCreature, const Position &movingCreatureOrigPos, std::shared_ptr toTile) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (!player->canDoAction()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e5719a6c39755f231b2eaa0e5cc89201c0aca1cfedfaa54cbcbbba1d22ea1f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1384, + "startColumn": 34, + "charOffset": 53310, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1382, + "startColumn": 34, + "charOffset": 53101, + "charLength": 15, + "snippet": { + "text": "\nvoid Game::playerMoveCreature(std::shared_ptr player, std::shared_ptr movingCreature, const Position &movingCreatureOrigPos, std::shared_ptr toTile) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (!player->canDoAction()) {\n\t\tconst auto &task = createPlayerTask(" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ecb0fb35f0f6de03c4a938948f5a4fa7679a27ce9dc09b5cbe565c727e6d4078" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "600 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1387, + "startColumn": 4, + "charOffset": 53401, + "charLength": 3, + "snippet": { + "text": "600" + } + }, + "contextRegion": { + "startLine": 1385, + "startColumn": 4, + "charOffset": 53328, + "charLength": 3, + "snippet": { + "text": "\tif (!player->canDoAction()) {\n\t\tconst auto &task = createPlayerTask(\n\t\t\t600, [this, player, movingCreature, toTile, movingCreatureOrigPos] { playerMoveCreatureByID(player->getID(), movingCreature->getID(), movingCreatureOrigPos, toTile->getPosition()); }, \"Game::playerMoveCreatureByID\"\n\t\t);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b316a67189b4501c5648195ec98427f491a31d2edc3f44a9064d710e1d69acf3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "600 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1402, + "startColumn": 5, + "charOffset": 54146, + "charLength": 3, + "snippet": { + "text": "600" + } + }, + "contextRegion": { + "startLine": 1400, + "startColumn": 5, + "charOffset": 53966, + "charLength": 3, + "snippet": { + "text": "\t\t\tg_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, \"Game::playerAutoWalk\");\n\t\t\tconst auto &task = createPlayerTask(\n\t\t\t\t600, [this, player, movingCreature, toTile, movingCreatureOrigPos] { playerMoveCreatureByID(player->getID(), movingCreature->getID(), movingCreatureOrigPos, toTile->getPosition()); }, \"Game::playerMoveCreatureByID\"\n\t\t\t);\n\t\t\tplayer->pushEvent(true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b85ca475541523b038c551f8697eef04ed346e36ff25e773fb7bb57c7fab7a3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1436, + "startColumn": 5, + "charOffset": 55586, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1434, + "startColumn": 5, + "charOffset": 55514, + "charLength": 4, + "snippet": { + "text": "\t\t\tplayer->sendCancelMessage(RETURNVALUE_NOTENOUGHROOM);\n\t\t\treturn;\n\t\t} else if ((movingCreature->getZoneType() == ZONE_PROTECTION && !toTile->hasFlag(TILESTATE_PROTECTIONZONE)) || (movingCreature->getZoneType() == ZONE_NOPVP && !toTile->hasFlag(TILESTATE_NOPVPZONE))) {\n\t\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1bcda6ba7a79c4311da1e8caaebcc3078a21cc4856e50c281eb1bf30997c6e04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'internalMoveCreature' has cognitive complexity of 35 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1474, + "startColumn": 19, + "charOffset": 56855, + "charLength": 20, + "snippet": { + "text": "internalMoveCreature" + } + }, + "contextRegion": { + "startLine": 1472, + "startColumn": 19, + "charOffset": 56834, + "charLength": 20, + "snippet": { + "text": "}\n\nReturnValue Game::internalMoveCreature(std::shared_ptr creature, Direction direction, uint32_t flags /*= 0*/) {\n\tif (!creature) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "228e57f2a6ef299e4a1691cd960272defd26ba8d3a7d46203af69e2846e5e78d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1474, + "startColumn": 66, + "charOffset": 56902, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1472, + "startColumn": 66, + "charOffset": 56834, + "charLength": 8, + "snippet": { + "text": "}\n\nReturnValue Game::internalMoveCreature(std::shared_ptr creature, Direction direction, uint32_t flags /*= 0*/) {\n\tif (!creature) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a851d57d2c3aa353756b9b4ebb1d6057f0cc28337dfe9d88602bd7ffe38e71d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1475, + "startColumn": 6, + "charOffset": 56964, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1473, + "startColumn": 6, + "charOffset": 56836, + "charLength": 1, + "snippet": { + "text": "\nReturnValue Game::internalMoveCreature(std::shared_ptr creature, Direction direction, uint32_t flags /*= 0*/) {\n\tif (!creature) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "056fbdd85ebf8d628f7d8f894fd6edfaf7b2a952938446f6d72abdc9513214f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1484, + "startColumn": 37, + "charOffset": 57277, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1482, + "startColumn": 37, + "charOffset": 57183, + "charLength": 1, + "snippet": { + "text": "\tstd::shared_ptr player = creature->getPlayer();\n\n\tbool diagonalMovement = (direction & DIRECTION_DIAGONAL_MASK) != 0;\n\tif (player && !diagonalMovement) {\n\t\t// try go up" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b57b7ee45da7c31ceeddfcfe35218f9dcf290064ef9793505c31ee9b100594a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1488, + "startColumn": 23, + "charOffset": 57418, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 1486, + "startColumn": 23, + "charOffset": 57346, + "charLength": 1, + "snippet": { + "text": "\t\t// try go up\n\t\tauto tile = creature->getTile();\n\t\tif (currentPos.z != 8 && tile && tile->hasHeight(3)) {\n\t\t\tstd::shared_ptr tmpTile = map.getTile(currentPos.x, currentPos.y, currentPos.getZ() - 1);\n\t\t\tif (tmpTile == nullptr || (tmpTile->getGround() == nullptr && !tmpTile->hasFlag(TILESTATE_BLOCKSOLID))) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88425be30999bbfacc22ac6d37bc57bf073c42742dcc909d786df09adcae6a8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1489, + "startColumn": 76, + "charOffset": 57528, + "charLength": 10, + "snippet": { + "text": "currentPos" + } + }, + "contextRegion": { + "startLine": 1487, + "startColumn": 76, + "charOffset": 57361, + "charLength": 10, + "snippet": { + "text": "\t\tauto tile = creature->getTile();\n\t\tif (currentPos.z != 8 && tile && tile->hasHeight(3)) {\n\t\t\tstd::shared_ptr tmpTile = map.getTile(currentPos.x, currentPos.y, currentPos.getZ() - 1);\n\t\t\tif (tmpTile == nullptr || (tmpTile->getGround() == nullptr && !tmpTile->hasFlag(TILESTATE_BLOCKSOLID))) {\n\t\t\t\ttmpTile = map.getTile(destPos.x, destPos.y, destPos.getZ() - 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68b1c5e8eac0da97ad6226fb3d6ef39c80250d995dc1ce0c6706a679a742fecd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1491, + "startColumn": 49, + "charOffset": 57709, + "charLength": 7, + "snippet": { + "text": "destPos" + } + }, + "contextRegion": { + "startLine": 1489, + "startColumn": 49, + "charOffset": 57453, + "charLength": 7, + "snippet": { + "text": "\t\t\tstd::shared_ptr tmpTile = map.getTile(currentPos.x, currentPos.y, currentPos.getZ() - 1);\n\t\t\tif (tmpTile == nullptr || (tmpTile->getGround() == nullptr && !tmpTile->hasFlag(TILESTATE_BLOCKSOLID))) {\n\t\t\t\ttmpTile = map.getTile(destPos.x, destPos.y, destPos.getZ() - 1);\n\t\t\t\tif (tmpTile && tmpTile->getGround() && !tmpTile->hasFlag(TILESTATE_BLOCKSOLID)) {\n\t\t\t\t\tflags |= FLAG_IGNOREBLOCKITEM | FLAG_IGNOREBLOCKCREATURE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11666e603a31712362d2f1ac6d37c71e0358fec8e9e17b8144c1dbacd076a058" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1493, + "startColumn": 15, + "charOffset": 57830, + "charLength": 20, + "snippet": { + "text": "FLAG_IGNOREBLOCKITEM" + } + }, + "contextRegion": { + "startLine": 1491, + "startColumn": 15, + "charOffset": 57661, + "charLength": 20, + "snippet": { + "text": "\t\t\t\ttmpTile = map.getTile(destPos.x, destPos.y, destPos.getZ() - 1);\n\t\t\t\tif (tmpTile && tmpTile->getGround() && !tmpTile->hasFlag(TILESTATE_BLOCKSOLID)) {\n\t\t\t\t\tflags |= FLAG_IGNOREBLOCKITEM | FLAG_IGNOREBLOCKCREATURE;\n\n\t\t\t\t\tif (!tmpTile->hasFlag(TILESTATE_FLOORCHANGE)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd1d94e03b2199da5c1016fa9932c8b6c77784287d035dd9d1a3d24142b30dca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1493, + "startColumn": 36, + "charOffset": 57851, + "charLength": 1, + "snippet": { + "text": "|" + } + }, + "contextRegion": { + "startLine": 1491, + "startColumn": 36, + "charOffset": 57661, + "charLength": 1, + "snippet": { + "text": "\t\t\t\ttmpTile = map.getTile(destPos.x, destPos.y, destPos.getZ() - 1);\n\t\t\t\tif (tmpTile && tmpTile->getGround() && !tmpTile->hasFlag(TILESTATE_BLOCKSOLID)) {\n\t\t\t\t\tflags |= FLAG_IGNOREBLOCKITEM | FLAG_IGNOREBLOCKCREATURE;\n\n\t\t\t\t\tif (!tmpTile->hasFlag(TILESTATE_FLOORCHANGE)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a13d5077a815a8cac55686608a4c2bf64c380b070ddfea74545f21fc5d9d2457" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1504, + "startColumn": 23, + "charOffset": 58053, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 1502, + "startColumn": 23, + "charOffset": 58013, + "charLength": 1, + "snippet": { + "text": "\n\t\t// try go down\n\t\tif (currentPos.z != 7 && currentPos.z == destPos.z) {\n\t\t\tstd::shared_ptr tmpTile = map.getTile(destPos.x, destPos.y, destPos.z);\n\t\t\tif (tmpTile == nullptr || (tmpTile->getGround() == nullptr && !tmpTile->hasFlag(TILESTATE_BLOCKSOLID))) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70ed998060900b395173f3e66f13381389f0bc923f60bccae970602c9f611493" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1509, + "startColumn": 15, + "charOffset": 58399, + "charLength": 20, + "snippet": { + "text": "FLAG_IGNOREBLOCKITEM" + } + }, + "contextRegion": { + "startLine": 1507, + "startColumn": 15, + "charOffset": 58277, + "charLength": 20, + "snippet": { + "text": "\t\t\t\ttmpTile = map.getTile(destPos.x, destPos.y, destPos.z + 1);\n\t\t\t\tif (tmpTile && tmpTile->hasHeight(3)) {\n\t\t\t\t\tflags |= FLAG_IGNOREBLOCKITEM | FLAG_IGNOREBLOCKCREATURE;\n\t\t\t\t\tplayer->setDirection(direction);\n\t\t\t\t\tdestPos.z++;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "594cea5233b16db6ed9a85c90d976ae06105dc3623fb5afc37e4e8765868e273" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1509, + "startColumn": 36, + "charOffset": 58420, + "charLength": 1, + "snippet": { + "text": "|" + } + }, + "contextRegion": { + "startLine": 1507, + "startColumn": 36, + "charOffset": 58277, + "charLength": 1, + "snippet": { + "text": "\t\t\t\ttmpTile = map.getTile(destPos.x, destPos.y, destPos.z + 1);\n\t\t\t\tif (tmpTile && tmpTile->hasHeight(3)) {\n\t\t\t\t\tflags |= FLAG_IGNOREBLOCKITEM | FLAG_IGNOREBLOCKCREATURE;\n\t\t\t\t\tplayer->setDirection(direction);\n\t\t\t\t\tdestPos.z++;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55b9342abd1a82ce6ba2c76f6f306bc44fa1aa93c30b2332744126a3513c864f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1518, + "startColumn": 6, + "charOffset": 58582, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1516, + "startColumn": 6, + "charOffset": 58522, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr toTile = map.getTile(destPos);\n\tif (!toTile) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b89f19ccfc8b8008e218ed0f98b7f0e568d2ab97b165adc8bfff6421be5d5dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1525, + "startColumn": 34, + "charOffset": 58866, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1523, + "startColumn": 34, + "charOffset": 58687, + "charLength": 15, + "snippet": { + "text": "\nReturnValue Game::internalMoveCreature(const std::shared_ptr &creature, const std::shared_ptr &toTile, uint32_t flags /*= 0*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (creature->hasCondition(CONDITION_ROOTED)) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40fc23ca99b63397bd24f4e59cf4c28bf464f0eceb31652b9e8941f57cf0897e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1555, + "startColumn": 2, + "charOffset": 59689, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 1553, + "startColumn": 2, + "charOffset": 59670, + "charLength": 5, + "snippet": { + "text": "\tuint32_t n = 0;\n\n\twhile ((subCylinder = toCylinder->queryDestination(index, creature, &toItem, flags)->getTile()) != toCylinder) {\n\t\tmap.moveCreature(creature, subCylinder);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc4b34c8e76bb49c6fec8b89b8eab5dac990eb0bb5c70bdc0dfc540cc1bcce9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'toCylinder' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1555, + "startColumn": 9, + "charOffset": 59696, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1553, + "startColumn": 9, + "charOffset": 59670, + "charLength": 1, + "snippet": { + "text": "\tuint32_t n = 0;\n\n\twhile ((subCylinder = toCylinder->queryDestination(index, creature, &toItem, flags)->getTile()) != toCylinder) {\n\t\tmap.moveCreature(creature, subCylinder);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da25506a8a8780289cf7e7ba32a5d1450543c56162a4d06767dce11954277710" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-6-4", + "ruleIndex": 461, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-6-4: For any iteration statement there shall be no more than one break or goto statement used for loop termination" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1570, + "startColumn": 4, + "charOffset": 60118, + "charLength": 5, + "snippet": { + "text": "break" + } + }, + "contextRegion": { + "startLine": 1568, + "startColumn": 4, + "charOffset": 60054, + "charLength": 5, + "snippet": { + "text": "\t\t// to prevent infinite loop\n\t\tif (++n >= MAP_MAX_LAYERS) {\n\t\t\tbreak;\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30757f95e12e3ebbed901cacb8d6bd1e7b9f870e3e9254d5d680319be17a21ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1579, + "startColumn": 13, + "charOffset": 60457, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1577, + "startColumn": 13, + "charOffset": 60274, + "charLength": 1, + "snippet": { + "text": "\t\tif (fromPosition.z != toPosition.z && (fromPosition.x != toPosition.x || fromPosition.y != toPosition.y)) {\n\t\t\tDirection dir = getDirectionTo(fromPosition, toPosition);\n\t\t\tif ((dir & DIRECTION_DIAGONAL_MASK) == 0) {\n\t\t\t\tinternalCreatureTurn(creature, dir);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff4fb2cd0d4a9248f575a5d5a8312b99ec8bdc46347a22bde1cb103c503c90f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1580, + "startColumn": 5, + "charOffset": 60496, + "charLength": 20, + "snippet": { + "text": "internalCreatureTurn" + } + }, + "contextRegion": { + "startLine": 1578, + "startColumn": 5, + "charOffset": 60384, + "charLength": 20, + "snippet": { + "text": "\t\t\tDirection dir = getDirectionTo(fromPosition, toPosition);\n\t\t\tif ((dir & DIRECTION_DIAGONAL_MASK) == 0) {\n\t\t\t\tinternalCreatureTurn(creature, dir);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86db450ca9fd6a11da15eb4442843fa072c07ab938d74574e90cbd15e7d649b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1590, + "startColumn": 6, + "charOffset": 60801, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1588, + "startColumn": 6, + "charOffset": 60578, + "charLength": 1, + "snippet": { + "text": "void Game::playerMoveItemByPlayerID(uint32_t playerId, const Position &fromPos, uint16_t itemId, uint8_t fromStackPos, const Position &toPos, uint8_t count) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc96578323e42e8e3eb0ec3d1099aaa9c4cb33d6613fbaddda89e4f1bd7cd725" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'playerMoveItem' has cognitive complexity of 86 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1596, + "startColumn": 12, + "charOffset": 60927, + "charLength": 14, + "snippet": { + "text": "playerMoveItem" + } + }, + "contextRegion": { + "startLine": 1594, + "startColumn": 12, + "charOffset": 60913, + "charLength": 14, + "snippet": { + "text": "}\n\nvoid Game::playerMoveItem(std::shared_ptr player, const Position &fromPos, uint16_t itemId, uint8_t fromStackPos, const Position &toPos, uint8_t count, std::shared_ptr item, std::shared_ptr toCylinder) {\n\tif (!player->canDoAction()) {\n\t\tuint32_t delay = player->getNextActionTime();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78b71904b490186b704400d9bba987015ba22f4f942a908e0af25f8a118c818b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1596, + "startColumn": 51, + "charOffset": 60966, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1594, + "startColumn": 51, + "charOffset": 60913, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::playerMoveItem(std::shared_ptr player, const Position &fromPos, uint16_t itemId, uint8_t fromStackPos, const Position &toPos, uint8_t count, std::shared_ptr item, std::shared_ptr toCylinder) {\n\tif (!player->canDoAction()) {\n\t\tuint32_t delay = player->getNextActionTime();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d93be19019c48a707779c0a6ca00e962e1218a25524a2579a095194be20b2835" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1613, + "startColumn": 20, + "charOffset": 61651, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 1611, + "startColumn": 20, + "charOffset": 61583, + "charLength": 6, + "snippet": { + "text": "\tif (item == nullptr) {\n\t\tuint8_t fromIndex = 0;\n\t\tif (fromPos.x == 0xFFFF) {\n\t\t\tif (fromPos.y & 0x40) {\n\t\t\t\tfromIndex = fromPos.z;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d12bf2f389b6a2280c3779fec633ca8762c42d806805f74556181be42db6a76" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1614, + "startColumn": 8, + "charOffset": 61668, + "charLength": 7, + "snippet": { + "text": "fromPos" + } + }, + "contextRegion": { + "startLine": 1612, + "startColumn": 8, + "charOffset": 61607, + "charLength": 7, + "snippet": { + "text": "\t\tuint8_t fromIndex = 0;\n\t\tif (fromPos.x == 0xFFFF) {\n\t\t\tif (fromPos.y & 0x40) {\n\t\t\t\tfromIndex = fromPos.z;\n\t\t\t} else if ((fromPos.y == 0x20 || fromPos.y == 0x21) && !player->isDepotSearchOpenOnItem(itemId)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0af517287755eed76871105e4ce1c2ef6e04cad3bdb065a750ad3e9f4e27ca75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1614, + "startColumn": 8, + "charOffset": 61668, + "charLength": 7, + "snippet": { + "text": "fromPos" + } + }, + "contextRegion": { + "startLine": 1612, + "startColumn": 8, + "charOffset": 61607, + "charLength": 7, + "snippet": { + "text": "\t\tuint8_t fromIndex = 0;\n\t\tif (fromPos.x == 0xFFFF) {\n\t\t\tif (fromPos.y & 0x40) {\n\t\t\t\tfromIndex = fromPos.z;\n\t\t\t} else if ((fromPos.y == 0x20 || fromPos.y == 0x21) && !player->isDepotSearchOpenOnItem(itemId)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "271ab4948bfcf1fbe79129d37bb9388e13bcedc384cbf69364f05d2dc614f7ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1614, + "startColumn": 20, + "charOffset": 61680, + "charLength": 4, + "snippet": { + "text": "0x40" + } + }, + "contextRegion": { + "startLine": 1612, + "startColumn": 20, + "charOffset": 61607, + "charLength": 4, + "snippet": { + "text": "\t\tuint8_t fromIndex = 0;\n\t\tif (fromPos.x == 0xFFFF) {\n\t\t\tif (fromPos.y & 0x40) {\n\t\t\t\tfromIndex = fromPos.z;\n\t\t\t} else if ((fromPos.y == 0x20 || fromPos.y == 0x21) && !player->isDepotSearchOpenOnItem(itemId)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07a3478b8168631446d2e81f54ef4df3d312c9c9bee06fe00ce6172235d78db6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1614, + "startColumn": 20, + "charOffset": 61680, + "charLength": 4, + "snippet": { + "text": "0x40" + } + }, + "contextRegion": { + "startLine": 1612, + "startColumn": 20, + "charOffset": 61607, + "charLength": 4, + "snippet": { + "text": "\t\tuint8_t fromIndex = 0;\n\t\tif (fromPos.x == 0xFFFF) {\n\t\t\tif (fromPos.y & 0x40) {\n\t\t\t\tfromIndex = fromPos.z;\n\t\t\t} else if ((fromPos.y == 0x20 || fromPos.y == 0x21) && !player->isDepotSearchOpenOnItem(itemId)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e75612f42e2b881bc1e8d7144eed87482c1f00d7809d80daad4de142fa0cdf1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1614, + "startColumn": 20, + "charOffset": 61680, + "charLength": 4, + "snippet": { + "text": "0x40" + } + }, + "contextRegion": { + "startLine": 1612, + "startColumn": 20, + "charOffset": 61607, + "charLength": 4, + "snippet": { + "text": "\t\tuint8_t fromIndex = 0;\n\t\tif (fromPos.x == 0xFFFF) {\n\t\t\tif (fromPos.y & 0x40) {\n\t\t\t\tfromIndex = fromPos.z;\n\t\t\t} else if ((fromPos.y == 0x20 || fromPos.y == 0x21) && !player->isDepotSearchOpenOnItem(itemId)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e9c3ef3422153b34e173fc504cdba8d5180078b029b60f3fe0d4ddd175f06f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1616, + "startColumn": 29, + "charOffset": 61743, + "charLength": 4, + "snippet": { + "text": "0x20" + } + }, + "contextRegion": { + "startLine": 1614, + "startColumn": 29, + "charOffset": 61661, + "charLength": 4, + "snippet": { + "text": "\t\t\tif (fromPos.y & 0x40) {\n\t\t\t\tfromIndex = fromPos.z;\n\t\t\t} else if ((fromPos.y == 0x20 || fromPos.y == 0x21) && !player->isDepotSearchOpenOnItem(itemId)) {\n\t\t\t\t// '0x20' -> From depot.\n\t\t\t\t// '0x21' -> From inbox." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0382771fd6b8cfda8ffbfaf9c777b1244950730a0534d3da2ad4f3eaf82164a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x21 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1616, + "startColumn": 50, + "charOffset": 61764, + "charLength": 4, + "snippet": { + "text": "0x21" + } + }, + "contextRegion": { + "startLine": 1614, + "startColumn": 50, + "charOffset": 61661, + "charLength": 4, + "snippet": { + "text": "\t\t\tif (fromPos.y & 0x40) {\n\t\t\t\tfromIndex = fromPos.z;\n\t\t\t} else if ((fromPos.y == 0x20 || fromPos.y == 0x21) && !player->isDepotSearchOpenOnItem(itemId)) {\n\t\t\t\t// '0x20' -> From depot.\n\t\t\t\t// '0x21' -> From inbox." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a4b22400f39900b7678c74811ddb84013252bdd334451dc34cf3838d1a3225d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1630, + "startColumn": 7, + "charOffset": 62234, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1628, + "startColumn": 7, + "charOffset": 62125, + "charLength": 1, + "snippet": { + "text": "\n\t\tstd::shared_ptr thing = internalGetThing(player, fromPos, fromIndex, itemId, STACKPOS_MOVE);\n\t\tif (!thing || !thing->getItem()) {\n\t\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ddc67c78c8a7ce8591654ade7ab837adc79e4d826dc28171cd0a2d19f93dfef5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1630, + "startColumn": 17, + "charOffset": 62244, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1628, + "startColumn": 17, + "charOffset": 62125, + "charLength": 1, + "snippet": { + "text": "\n\t\tstd::shared_ptr thing = internalGetThing(player, fromPos, fromIndex, itemId, STACKPOS_MOVE);\n\t\tif (!thing || !thing->getItem()) {\n\t\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "778780994d56808a95497fec9241661f780c7e63c92f61267146e497819d39a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1644, + "startColumn": 19, + "charOffset": 62536, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 1642, + "startColumn": 19, + "charOffset": 62466, + "charLength": 6, + "snippet": { + "text": "\n\tstd::shared_ptr fromCylinder = nullptr;\n\tif (fromPos.x == 0xFFFF && (fromPos.y == 0x20 || fromPos.y == 0x21)) {\n\t\t// '0x20' -> From depot.\n\t\t// '0x21' -> From inbox." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb17287f58922dbccb62c7a26446ebdcd8e86994e7648b317d608a9d30cf38ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1644, + "startColumn": 43, + "charOffset": 62560, + "charLength": 4, + "snippet": { + "text": "0x20" + } + }, + "contextRegion": { + "startLine": 1642, + "startColumn": 43, + "charOffset": 62466, + "charLength": 4, + "snippet": { + "text": "\n\tstd::shared_ptr fromCylinder = nullptr;\n\tif (fromPos.x == 0xFFFF && (fromPos.y == 0x20 || fromPos.y == 0x21)) {\n\t\t// '0x20' -> From depot.\n\t\t// '0x21' -> From inbox." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e4d7e60b4666fd5e1c471f661bf3b96dec83450db88e9ed2ce809f4aab2ccb1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x21 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1644, + "startColumn": 64, + "charOffset": 62581, + "charLength": 4, + "snippet": { + "text": "0x21" + } + }, + "contextRegion": { + "startLine": 1642, + "startColumn": 64, + "charOffset": 62466, + "charLength": 4, + "snippet": { + "text": "\n\tstd::shared_ptr fromCylinder = nullptr;\n\tif (fromPos.x == 0xFFFF && (fromPos.y == 0x20 || fromPos.y == 0x21)) {\n\t\t// '0x20' -> From depot.\n\t\t// '0x21' -> From inbox." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "943cb26d6e26ca33eb974652af7d0be6a72d900dedcdf2fb95c811e9eff2c793" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1692, + "startColumn": 5, + "charOffset": 64208, + "charLength": 3, + "snippet": { + "text": "400" + } + }, + "contextRegion": { + "startLine": 1690, + "startColumn": 5, + "charOffset": 64153, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tstd::shared_ptr task = createPlayerTask(\n\t\t\t\t400, [this, playerId = player->getID(), fromPos, itemId, fromStackPos, toPos, count] {\n\t\t\t\t\tplayerMoveItemByPlayerID(playerId, fromPos, itemId, fromStackPos, toPos, count);\n\t\t\t\t}," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2501e7a0bb5cb1df9fd926ffd9782ac73821bc3f2ae27ab45af8cdff11a27a1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1734, + "startColumn": 21, + "charOffset": 65465, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 1732, + "startColumn": 21, + "charOffset": 65404, + "charLength": 6, + "snippet": { + "text": "\t\t\tuint8_t itemStackPos = fromStackPos;\n\n\t\t\tif (fromPos.x != 0xFFFF && Position::areInRange<1, 1>(mapFromPos, playerPos)\n\t\t\t && !Position::areInRange<1, 1, 0>(mapFromPos, walkPos)) {\n\t\t\t\t// need to pickup the item first" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba7ed57dfd35a48a66a8e9fa396efa04fb33b0dd8aa2733c88265c0afc0f5974" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1754, + "startColumn": 6, + "charOffset": 66303, + "charLength": 3, + "snippet": { + "text": "400" + } + }, + "contextRegion": { + "startLine": 1752, + "startColumn": 6, + "charOffset": 66246, + "charLength": 3, + "snippet": { + "text": "\n\t\t\t\tstd::shared_ptr task = createPlayerTask(\n\t\t\t\t\t400, [this, playerId = player->getID(), itemPos, itemId, itemStackPos, toPos, count] {\n\t\t\t\t\t\tplayerMoveItemByPlayerID(playerId, itemPos, itemId, itemStackPos, toPos, count);\n\t\t\t\t\t}," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6af254c3406edef239a12c748fd05b1f3017c0d00d06790c035f83064793b31a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1787, + "startColumn": 17, + "charOffset": 67436, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 1785, + "startColumn": 17, + "charOffset": 67397, + "charLength": 6, + "snippet": { + "text": "\n\tuint8_t toIndex = 0;\n\tif (toPos.x == 0xFFFF) {\n\t\tif (toPos.y & 0x40) {\n\t\t\ttoIndex = toPos.z;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84452b46ed7237c597e9a980f2214826d2ffffb91ac74188b84b1b9e1911acdb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1788, + "startColumn": 7, + "charOffset": 67452, + "charLength": 5, + "snippet": { + "text": "toPos" + } + }, + "contextRegion": { + "startLine": 1786, + "startColumn": 7, + "charOffset": 67398, + "charLength": 5, + "snippet": { + "text": "\tuint8_t toIndex = 0;\n\tif (toPos.x == 0xFFFF) {\n\t\tif (toPos.y & 0x40) {\n\t\t\ttoIndex = toPos.z;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5cd74566c047ebf5d40d241d17c1f822e4a231778617b746d8a7e1a2b0bfc6fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1788, + "startColumn": 7, + "charOffset": 67452, + "charLength": 5, + "snippet": { + "text": "toPos" + } + }, + "contextRegion": { + "startLine": 1786, + "startColumn": 7, + "charOffset": 67398, + "charLength": 5, + "snippet": { + "text": "\tuint8_t toIndex = 0;\n\tif (toPos.x == 0xFFFF) {\n\t\tif (toPos.y & 0x40) {\n\t\t\ttoIndex = toPos.z;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7bcd8d63a49accf1cca4aaee66263082df2e8ce42fa59222298f1f989565063f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1788, + "startColumn": 17, + "charOffset": 67462, + "charLength": 4, + "snippet": { + "text": "0x40" + } + }, + "contextRegion": { + "startLine": 1786, + "startColumn": 17, + "charOffset": 67398, + "charLength": 4, + "snippet": { + "text": "\tuint8_t toIndex = 0;\n\tif (toPos.x == 0xFFFF) {\n\t\tif (toPos.y & 0x40) {\n\t\t\ttoIndex = toPos.z;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a06e7ffd20f1e125ddc74c719bade1dd07a6abd68abbe6f00acf4d7f42282379" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1788, + "startColumn": 17, + "charOffset": 67462, + "charLength": 4, + "snippet": { + "text": "0x40" + } + }, + "contextRegion": { + "startLine": 1786, + "startColumn": 17, + "charOffset": 67398, + "charLength": 4, + "snippet": { + "text": "\tuint8_t toIndex = 0;\n\tif (toPos.x == 0xFFFF) {\n\t\tif (toPos.y & 0x40) {\n\t\t\ttoIndex = toPos.z;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87ada5c4d6823ae3277e714e458aadc72af2533574f56e95a2cae39998bf3300" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1788, + "startColumn": 17, + "charOffset": 67462, + "charLength": 4, + "snippet": { + "text": "0x40" + } + }, + "contextRegion": { + "startLine": 1786, + "startColumn": 17, + "charOffset": 67398, + "charLength": 4, + "snippet": { + "text": "\tuint8_t toIndex = 0;\n\tif (toPos.x == 0xFFFF) {\n\t\tif (toPos.y & 0x40) {\n\t\t\ttoIndex = toPos.z;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dded617af3bf1fb088d0e721456ba995b45fa821039df815d5a5c4a531958b23" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1798, + "startColumn": 25, + "charOffset": 67833, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1796, + "startColumn": 25, + "charOffset": 67653, + "charLength": 1, + "snippet": { + "text": "\t\tauto toHouseTile = map.getTile(mapToPos)->dynamic_self_cast();\n\t\tauto fromHouseTile = map.getTile(mapFromPos)->dynamic_self_cast();\n\t\tif (fromHouseTile && (!toHouseTile || toHouseTile->getHouse()->getId() != fromHouseTile->getHouse()->getId())) {\n\t\t\tplayer->sendCancelMessage(\"You cannot move this item out of this house.\");\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3e8be3aedc35748190a5959155741fa0b137b3f87c29027ae5cc90fb651c0d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1813, + "startColumn": 2, + "charOffset": 68365, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1811, + "startColumn": 2, + "charOffset": 68256, + "charLength": 2, + "snippet": { + "text": "\t}\n\tReturnValue ret = internalMoveItem(fromCylinder, toCylinder, toIndex, item, count, nullptr, 0, player);\n\tif (ret != RETURNVALUE_NOERROR) {\n\t\tplayer->sendCancelMessage(ret);\n\t} else if (toCylinder->getContainer() && fromCylinder->getContainer() && fromCylinder->getContainer()->countsToLootAnalyzerBalance() && toCylinder->getContainer()->getTopParent() == player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b79f8584546f41fbf968cb370d13449b07a3c8da14da7559e9c8006a2af954cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'isTryingToStow' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1826, + "startColumn": 12, + "charOffset": 69005, + "charLength": 14, + "snippet": { + "text": "isTryingToStow" + } + }, + "contextRegion": { + "startLine": 1824, + "startColumn": 12, + "charOffset": 68991, + "charLength": 14, + "snippet": { + "text": "}\n\nbool Game::isTryingToStow(const Position &toPos, std::shared_ptr toCylinder) const {\n\treturn toCylinder->getContainer() && toCylinder->getItem()->getID() == ITEM_LOCKER && toPos.getZ() == ITEM_SUPPLY_STASH_INDEX;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25e017650ae88331232474e0ac6bd4cde12217569feec38a536c31e2647a1fd4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'toCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1826, + "startColumn": 76, + "charOffset": 69069, + "charLength": 10, + "snippet": { + "text": "toCylinder" + } + }, + "contextRegion": { + "startLine": 1824, + "startColumn": 76, + "charOffset": 68991, + "charLength": 10, + "snippet": { + "text": "}\n\nbool Game::isTryingToStow(const Position &toPos, std::shared_ptr toCylinder) const {\n\treturn toCylinder->getContainer() && toCylinder->getItem()->getID() == ITEM_LOCKER && toPos.getZ() == ITEM_SUPPLY_STASH_INDEX;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d0f3f7eeddf3773885fbd798bb959218c3625213f44cfe079152405bb0066f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'checkMoveItemToCylinder' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1830, + "startColumn": 19, + "charOffset": 69238, + "charLength": 23, + "snippet": { + "text": "checkMoveItemToCylinder" + } + }, + "contextRegion": { + "startLine": 1828, + "startColumn": 19, + "charOffset": 69217, + "charLength": 23, + "snippet": { + "text": "}\n\nReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::shared_ptr fromCylinder, std::shared_ptr toCylinder, std::shared_ptr item, Position toPos) {\n\tif (!player || !toCylinder || !item) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "612b89a01f5ed0cb3bd1b9cd276dad1cf7535abbd838779323ee9045e3e1f969" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'checkMoveItemToCylinder' has cognitive complexity of 81 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1830, + "startColumn": 19, + "charOffset": 69238, + "charLength": 23, + "snippet": { + "text": "checkMoveItemToCylinder" + } + }, + "contextRegion": { + "startLine": 1828, + "startColumn": 19, + "charOffset": 69217, + "charLength": 23, + "snippet": { + "text": "}\n\nReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::shared_ptr fromCylinder, std::shared_ptr toCylinder, std::shared_ptr item, Position toPos) {\n\tif (!player || !toCylinder || !item) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6d227319bccbe3efbd9e8aca45caee6b9be53e61a7dccc520904cab072781d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1830, + "startColumn": 67, + "charOffset": 69286, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1828, + "startColumn": 67, + "charOffset": 69217, + "charLength": 6, + "snippet": { + "text": "}\n\nReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::shared_ptr fromCylinder, std::shared_ptr toCylinder, std::shared_ptr item, Position toPos) {\n\tif (!player || !toCylinder || !item) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03cfbb62850ad665833e28fc3f8f19cd15c7b776d9c3d9a5403e710fc79dca59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'checkMoveItemToCylinder' of similar type ('std::shared_ptr') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1830, + "startColumn": 75, + "charOffset": 69294, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1828, + "startColumn": 75, + "charOffset": 69217, + "charLength": 3, + "snippet": { + "text": "}\n\nReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::shared_ptr fromCylinder, std::shared_ptr toCylinder, std::shared_ptr item, Position toPos) {\n\tif (!player || !toCylinder || !item) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fddac2b10bdd5e13b787ae1005d86ef5f76637191dad2f20dca56b47ae2080db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'fromCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1830, + "startColumn": 101, + "charOffset": 69320, + "charLength": 12, + "snippet": { + "text": "fromCylinder" + } + }, + "contextRegion": { + "startLine": 1828, + "startColumn": 101, + "charOffset": 69217, + "charLength": 12, + "snippet": { + "text": "}\n\nReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::shared_ptr fromCylinder, std::shared_ptr toCylinder, std::shared_ptr item, Position toPos) {\n\tif (!player || !toCylinder || !item) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eada92e3fa1737351be3c43d4d30e6d64165520a1f7e16145490d8a44a53ba5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'toCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1830, + "startColumn": 141, + "charOffset": 69360, + "charLength": 10, + "snippet": { + "text": "toCylinder" + } + }, + "contextRegion": { + "startLine": 1828, + "startColumn": 141, + "charOffset": 69217, + "charLength": 10, + "snippet": { + "text": "}\n\nReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::shared_ptr fromCylinder, std::shared_ptr toCylinder, std::shared_ptr item, Position toPos) {\n\tif (!player || !toCylinder || !item) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1341ed2c8253760e6f406e0bc7b6f8a23678a954fbf67a8300e354f8ea51493b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1830, + "startColumn": 175, + "charOffset": 69394, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 1828, + "startColumn": 175, + "charOffset": 69217, + "charLength": 4, + "snippet": { + "text": "}\n\nReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::shared_ptr fromCylinder, std::shared_ptr toCylinder, std::shared_ptr item, Position toPos) {\n\tif (!player || !toCylinder || !item) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0fc2221fb736eaa78f7ab8fc05a4bc5f92fd0a475e944127530e5b214ae85d07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1831, + "startColumn": 6, + "charOffset": 69423, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1829, + "startColumn": 6, + "charOffset": 69219, + "charLength": 1, + "snippet": { + "text": "\nReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::shared_ptr fromCylinder, std::shared_ptr toCylinder, std::shared_ptr item, Position toPos) {\n\tif (!player || !toCylinder || !item) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a49e417a9c6ce919d419f16f7343b83ea003238321cbfedb8b43604a12a16292" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1831, + "startColumn": 17, + "charOffset": 69434, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1829, + "startColumn": 17, + "charOffset": 69219, + "charLength": 1, + "snippet": { + "text": "\nReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::shared_ptr fromCylinder, std::shared_ptr toCylinder, std::shared_ptr item, Position toPos) {\n\tif (!player || !toCylinder || !item) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59e264ca0f9b5a3a131f6e86ff5884ddea9cb82f1dfe2be04fb2b651232b835c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1831, + "startColumn": 32, + "charOffset": 69449, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1829, + "startColumn": 32, + "charOffset": 69219, + "charLength": 1, + "snippet": { + "text": "\nReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::shared_ptr fromCylinder, std::shared_ptr toCylinder, std::shared_ptr item, Position toPos) {\n\tif (!player || !toCylinder || !item) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf678869fa5fd48e647a1aed099717c171704b4a430e1374b7e48ee0268cf6cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1835, + "startColumn": 2, + "charOffset": 69497, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1833, + "startColumn": 2, + "charOffset": 69492, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (std::shared_ptr toCylinderContainer = toCylinder->getContainer()) {\n\t\tauto containerID = toCylinderContainer->getID();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3d0117a199666a28bef394ef4ed140b26b3b498b34739e84171dc5a4364f771" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1925, + "startColumn": 31, + "charOffset": 73086, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1923, + "startColumn": 31, + "charOffset": 73050, + "charLength": 1, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (item->isStoreItem() && !house) {\n\t\t\t\treturn RETURNVALUE_ITEMCANNOTBEMOVEDTHERE;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68671d98d659b78f936d91c6c8c5b50b3f622602dc6673a04cd8af2b0ef1c392" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'internalMoveItem' has cognitive complexity of 109 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1934, + "startColumn": 19, + "charOffset": 73206, + "charLength": 16, + "snippet": { + "text": "internalMoveItem" + } + }, + "contextRegion": { + "startLine": 1932, + "startColumn": 19, + "charOffset": 73185, + "charLength": 16, + "snippet": { + "text": "}\n\nReturnValue Game::internalMoveItem(std::shared_ptr fromCylinder, std::shared_ptr toCylinder, int32_t index, std::shared_ptr item, uint32_t count, std::shared_ptr* movedItem, uint32_t flags /*= 0*/, std::shared_ptr actor /*=nullptr*/, std::shared_ptr tradeItem /* = nullptr*/, bool checkTile /* = true*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (fromCylinder == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1488ae827925fe7cd9694f58862b3381a52820aa9c0a150940f8222b37d7bc4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'fromCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1934, + "startColumn": 62, + "charOffset": 73249, + "charLength": 12, + "snippet": { + "text": "fromCylinder" + } + }, + "contextRegion": { + "startLine": 1932, + "startColumn": 62, + "charOffset": 73185, + "charLength": 12, + "snippet": { + "text": "}\n\nReturnValue Game::internalMoveItem(std::shared_ptr fromCylinder, std::shared_ptr toCylinder, int32_t index, std::shared_ptr item, uint32_t count, std::shared_ptr* movedItem, uint32_t flags /*= 0*/, std::shared_ptr actor /*=nullptr*/, std::shared_ptr tradeItem /* = nullptr*/, bool checkTile /* = true*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (fromCylinder == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8a95f1ce4a21267f1da4fc2641909d21c7877bc56d1982224912d7d39198da3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1934, + "startColumn": 151, + "charOffset": 73338, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 1932, + "startColumn": 151, + "charOffset": 73185, + "charLength": 4, + "snippet": { + "text": "}\n\nReturnValue Game::internalMoveItem(std::shared_ptr fromCylinder, std::shared_ptr toCylinder, int32_t index, std::shared_ptr item, uint32_t count, std::shared_ptr* movedItem, uint32_t flags /*= 0*/, std::shared_ptr actor /*=nullptr*/, std::shared_ptr tradeItem /* = nullptr*/, bool checkTile /* = true*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (fromCylinder == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7307c39c07888bc67d401c6cbca5ce84794361839bd05f73d2ad54c49f97770" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'actor' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1934, + "startColumn": 257, + "charOffset": 73444, + "charLength": 5, + "snippet": { + "text": "actor" + } + }, + "contextRegion": { + "startLine": 1932, + "startColumn": 257, + "charOffset": 73185, + "charLength": 5, + "snippet": { + "text": "}\n\nReturnValue Game::internalMoveItem(std::shared_ptr fromCylinder, std::shared_ptr toCylinder, int32_t index, std::shared_ptr item, uint32_t count, std::shared_ptr* movedItem, uint32_t flags /*= 0*/, std::shared_ptr actor /*=nullptr*/, std::shared_ptr tradeItem /* = nullptr*/, bool checkTile /* = true*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (fromCylinder == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "053a06194ef2fd21120020566707231350fe560acdce97f220849a4924d426db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'tradeItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1934, + "startColumn": 299, + "charOffset": 73486, + "charLength": 9, + "snippet": { + "text": "tradeItem" + } + }, + "contextRegion": { + "startLine": 1932, + "startColumn": 299, + "charOffset": 73185, + "charLength": 9, + "snippet": { + "text": "}\n\nReturnValue Game::internalMoveItem(std::shared_ptr fromCylinder, std::shared_ptr toCylinder, int32_t index, std::shared_ptr item, uint32_t count, std::shared_ptr* movedItem, uint32_t flags /*= 0*/, std::shared_ptr actor /*=nullptr*/, std::shared_ptr tradeItem /* = nullptr*/, bool checkTile /* = true*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (fromCylinder == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a78ff0840d25c71eccf6cb20df24bda74cb28193f0029281fbdcb28586f5736" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1935, + "startColumn": 34, + "charOffset": 73575, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1933, + "startColumn": 34, + "charOffset": 73187, + "charLength": 15, + "snippet": { + "text": "\nReturnValue Game::internalMoveItem(std::shared_ptr fromCylinder, std::shared_ptr toCylinder, int32_t index, std::shared_ptr item, uint32_t count, std::shared_ptr* movedItem, uint32_t flags /*= 0*/, std::shared_ptr actor /*=nullptr*/, std::shared_ptr tradeItem /* = nullptr*/, bool checkTile /* = true*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (fromCylinder == nullptr) {\n\t\tg_logger().error(\"[{}] fromCylinder is nullptr\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cfc8cbd05b378b7fb85354a8183bcc7b4cfe36c4e7ccf2e092b210fe80ab972f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1958, + "startColumn": 2, + "charOffset": 74190, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 1956, + "startColumn": 2, + "charOffset": 74171, + "charLength": 5, + "snippet": { + "text": "\tint floorN = 0;\n\n\twhile ((subCylinder = toCylinder->queryDestination(index, item, &toItem, flags)) != toCylinder) {\n\t\ttoCylinder = subCylinder;\n\t\tflags = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c32cd07d576c8b56c2b9488e7edc250ccab92270234066c3c530297ac37b4b08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "255 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 1975, + "startColumn": 38, + "charOffset": 74696, + "charLength": 3, + "snippet": { + "text": "255" + } + }, + "contextRegion": { + "startLine": 1973, + "startColumn": 38, + "charOffset": 74538, + "charLength": 3, + "snippet": { + "text": "\t// 'Move up' stackable items fix\n\t// Cip's client never sends the count of stackables when using \"Move up\" menu option\n\tif (item->isStackable() && count == 255 && fromCylinder->getParent() == toCylinder) {\n\t\tcount = item->getItemCount();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8e16b9bae7c747a1f8d504cf44f52308246a49541c5ade9d0ce2ae16f808826" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2002, + "startColumn": 45, + "charOffset": 75877, + "charLength": 12, + "snippet": { + "text": "getItemCount" + } + }, + "contextRegion": { + "startLine": 2000, + "startColumn": 45, + "charOffset": 75666, + "charLength": 12, + "snippet": { + "text": "\t\t\tif (toCylinder->queryRemove(toItem, toItem->getItemCount(), flags, actor) == RETURNVALUE_NOERROR) {\n\t\t\t\tint32_t oldToItemIndex = toCylinder->getThingIndex(toItem);\n\t\t\t\ttoCylinder->removeThing(toItem, toItem->getItemCount());\n\t\t\t\tfromCylinder->addThing(toItem);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "620612d22912c6251f2c46596b89d23e0c6a0151f0aa973c6569446de076eb05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'm' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2031, + "startColumn": 11, + "charOffset": 76634, + "charLength": 1, + "snippet": { + "text": "m" + } + }, + "contextRegion": { + "startLine": 2029, + "startColumn": 11, + "charOffset": 76620, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tuint32_t m;\n\tif (item->isStackable()) {\n\t\tm = std::min(count, maxQueryCount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2904d8aba5f3add96504d18f950a562f5faba17681e9a7459b03e1045978c1a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2051, + "startColumn": 3, + "charOffset": 77108, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 2049, + "startColumn": 3, + "charOffset": 77038, + "charLength": 5, + "snippet": { + "text": "\n\t\tstd::shared_ptr tmpCylinder = toCylinder->getParent();\n\t\twhile (tmpCylinder) {\n\t\t\tif (tmpCylinder->getItem() == tradeItem) {\n\t\t\t\treturn RETURNVALUE_NOTENOUGHROOM;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f4f15b33d3827ae4d6162bbe896163b367f79d7f38fe48a85de929b227392c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'tmpCylinder' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2051, + "startColumn": 10, + "charOffset": 77115, + "charLength": 11, + "snippet": { + "text": "tmpCylinder" + } + }, + "contextRegion": { + "startLine": 2049, + "startColumn": 10, + "charOffset": 77038, + "charLength": 11, + "snippet": { + "text": "\n\t\tstd::shared_ptr tmpCylinder = toCylinder->getParent();\n\t\twhile (tmpCylinder) {\n\t\t\tif (tmpCylinder->getItem() == tradeItem) {\n\t\t\t\treturn RETURNVALUE_NOTENOUGHROOM;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "463ad04d00964a0b1424a52cb0aa2c3a0fe95b0936cdaabe16bde5b1d1a2805f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'n' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2067, + "startColumn": 12, + "charOffset": 77488, + "charLength": 1, + "snippet": { + "text": "n" + } + }, + "contextRegion": { + "startLine": 2065, + "startColumn": 12, + "charOffset": 77430, + "charLength": 1, + "snippet": { + "text": "\t// update item(s)\n\tif (item->isStackable()) {\n\t\tuint32_t n;\n\n\t\tif (toItem && item->equals(toItem)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70d0b58f82e16ce02b943d89550379ac93c78eb06095bbdd7921eeedd05dc02f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2071, + "startColumn": 44, + "charOffset": 77654, + "charLength": 5, + "snippet": { + "text": "getID" + } + }, + "contextRegion": { + "startLine": 2069, + "startColumn": 44, + "charOffset": 77492, + "charLength": 5, + "snippet": { + "text": "\t\tif (toItem && item->equals(toItem)) {\n\t\t\tn = std::min(toItem->getStackSize() - toItem->getItemCount(), m);\n\t\t\ttoCylinder->updateThing(toItem, toItem->getID(), toItem->getItemCount() + n);\n\t\t\tupdateItem = toItem;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d63dbf3fc4b3e01370fe8d2dd7fa3ec79c79e7b9780f6d733cd5f999b36aa84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2077, + "startColumn": 22, + "charOffset": 77763, + "charLength": 1, + "snippet": { + "text": "m" + } + }, + "contextRegion": { + "startLine": 2075, + "startColumn": 22, + "charOffset": 77737, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tint32_t newCount = m - n;\n\t\tif (newCount > 0) {\n\t\t\tmoveItem = item->clone();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f345de40d879605208ef576830c04cc9dedde32aada68132c1a58bd123755d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2080, + "startColumn": 27, + "charOffset": 77847, + "charLength": 8, + "snippet": { + "text": "newCount" + } + }, + "contextRegion": { + "startLine": 2078, + "startColumn": 27, + "charOffset": 77770, + "charLength": 8, + "snippet": { + "text": "\t\tif (newCount > 0) {\n\t\t\tmoveItem = item->clone();\n\t\t\tmoveItem->setItemCount(newCount);\n\t\t} else {\n\t\t\tmoveItem = nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b417f442ab29a8ba1d588538b499bae92a86c4aed8df290720cc2e9be6cbd1e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2115, + "startColumn": 6, + "charOffset": 78604, + "charLength": 9, + "snippet": { + "text": "movedItem" + } + }, + "contextRegion": { + "startLine": 2113, + "startColumn": 6, + "charOffset": 78595, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tif (movedItem) {\n\t\tif (moveItem) {\n\t\t\t*movedItem = moveItem;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "130b50ef3b17e10c5a1c56e2a5aee4c5da1b93aee367304b4c24e6e5c268cc0c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'std::shared_ptr *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2115, + "startColumn": 6, + "charOffset": 78604, + "charLength": 9, + "snippet": { + "text": "movedItem" + } + }, + "contextRegion": { + "startLine": 2113, + "startColumn": 6, + "charOffset": 78595, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tif (movedItem) {\n\t\tif (moveItem) {\n\t\t\t*movedItem = moveItem;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b938b79f9d50c80df30015de4ab393765ed5642cae8619126ce3e10d44356f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2162, + "startColumn": 7, + "charOffset": 80278, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2160, + "startColumn": 7, + "charOffset": 80202, + "charLength": 1, + "snippet": { + "text": "\t// Actor related actions\n\tif (fromCylinder && actor && toCylinder) {\n\t\tif (!fromContainer || !toContainer || !player) {\n\t\t\treturn ret;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "403bf515ccaf486cbdb98e0ff3fed69b72e2d9eeda91d24d34a06a6b7a33f3b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2162, + "startColumn": 25, + "charOffset": 80296, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2160, + "startColumn": 25, + "charOffset": 80202, + "charLength": 1, + "snippet": { + "text": "\t// Actor related actions\n\tif (fromCylinder && actor && toCylinder) {\n\t\tif (!fromContainer || !toContainer || !player) {\n\t\t\treturn ret;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "828b0a581a89b5378ced28d8d3896391423425b9816650d3b23e11607b266d44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2162, + "startColumn": 41, + "charOffset": 80312, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2160, + "startColumn": 41, + "charOffset": 80202, + "charLength": 1, + "snippet": { + "text": "\t// Actor related actions\n\tif (fromCylinder && actor && toCylinder) {\n\t\tif (!fromContainer || !toContainer || !player) {\n\t\t\treturn ret;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3a9d21bab282b2942060e41844b00b7e61a2e10e0346caf30f73daddd947d5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'internalAddItem' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2187, + "startColumn": 19, + "charOffset": 81089, + "charLength": 15, + "snippet": { + "text": "internalAddItem" + } + }, + "contextRegion": { + "startLine": 2185, + "startColumn": 19, + "charOffset": 81068, + "charLength": 15, + "snippet": { + "text": "}\n\nReturnValue Game::internalAddItem(std::shared_ptr toCylinder, std::shared_ptr item, int32_t index /*= INDEX_WHEREEVER*/, uint32_t flags /* = 0*/, bool test /* = false*/) {\n\tuint32_t remainderCount = 0;\n\treturn internalAddItem(std::move(toCylinder), std::move(item), index, flags, test, remainderCount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c06db55b1c4b7a9e428627ed9df76df752e0a0f8e49313385d3bb00fd0136ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'toCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2187, + "startColumn": 61, + "charOffset": 81131, + "charLength": 10, + "snippet": { + "text": "toCylinder" + } + }, + "contextRegion": { + "startLine": 2185, + "startColumn": 61, + "charOffset": 81068, + "charLength": 10, + "snippet": { + "text": "}\n\nReturnValue Game::internalAddItem(std::shared_ptr toCylinder, std::shared_ptr item, int32_t index /*= INDEX_WHEREEVER*/, uint32_t flags /* = 0*/, bool test /* = false*/) {\n\tuint32_t remainderCount = 0;\n\treturn internalAddItem(std::move(toCylinder), std::move(item), index, flags, test, remainderCount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83fbc3d8f4dedb7b09ae321f5661241eb7564c0a0993b735eb7ee4751ce9c493" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2187, + "startColumn": 95, + "charOffset": 81165, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 2185, + "startColumn": 95, + "charOffset": 81068, + "charLength": 4, + "snippet": { + "text": "}\n\nReturnValue Game::internalAddItem(std::shared_ptr toCylinder, std::shared_ptr item, int32_t index /*= INDEX_WHEREEVER*/, uint32_t flags /* = 0*/, bool test /* = false*/) {\n\tuint32_t remainderCount = 0;\n\treturn internalAddItem(std::move(toCylinder), std::move(item), index, flags, test, remainderCount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4157be0aceab1b45ddaf369459b427246367dc08c4389554eb857c7627ebf359" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'internalAddItem' has cognitive complexity of 31 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2192, + "startColumn": 19, + "charOffset": 81411, + "charLength": 15, + "snippet": { + "text": "internalAddItem" + } + }, + "contextRegion": { + "startLine": 2190, + "startColumn": 19, + "charOffset": 81390, + "charLength": 15, + "snippet": { + "text": "}\n\nReturnValue Game::internalAddItem(std::shared_ptr toCylinder, std::shared_ptr item, int32_t index, uint32_t flags, bool test, uint32_t &remainderCount) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (toCylinder == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d3a094244e8d1bf1bcef492f27dcd88a0b21019b902e7b8269968901caef9c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2192, + "startColumn": 95, + "charOffset": 81487, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 2190, + "startColumn": 95, + "charOffset": 81390, + "charLength": 4, + "snippet": { + "text": "}\n\nReturnValue Game::internalAddItem(std::shared_ptr toCylinder, std::shared_ptr item, int32_t index, uint32_t flags, bool test, uint32_t &remainderCount) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (toCylinder == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e18d18cfad812c499af5334185a06d7961e7b65063b01bfbe6f054c9393ef2e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2193, + "startColumn": 34, + "charOffset": 81596, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 2191, + "startColumn": 34, + "charOffset": 81392, + "charLength": 15, + "snippet": { + "text": "\nReturnValue Game::internalAddItem(std::shared_ptr toCylinder, std::shared_ptr item, int32_t index, uint32_t flags, bool test, uint32_t &remainderCount) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (toCylinder == nullptr) {\n\t\tg_logger().error(\"[{}] fromCylinder is nullptr\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf53d1fb3b9e6b7f3bfea294bd1fdcbc140aa78e450627fa5fc1200964a3fa1f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2234, + "startColumn": 43, + "charOffset": 82999, + "charLength": 5, + "snippet": { + "text": "getID" + } + }, + "contextRegion": { + "startLine": 2232, + "startColumn": 43, + "charOffset": 82869, + "charLength": 5, + "snippet": { + "text": "\t\tuint32_t n = std::min(toItem->getStackSize() - toItem->getItemCount(), m);\n\n\t\ttoCylinder->updateThing(toItem, toItem->getID(), toItem->getItemCount() + n);\n\n\t\tint32_t count = m - n;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24461144147813c90f85a9300f11661f30aaad3fe4ac8fce2a4181fcae0d9675" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2236, + "startColumn": 19, + "charOffset": 83056, + "charLength": 1, + "snippet": { + "text": "m" + } + }, + "contextRegion": { + "startLine": 2234, + "startColumn": 19, + "charOffset": 82957, + "charLength": 1, + "snippet": { + "text": "\t\ttoCylinder->updateThing(toItem, toItem->getID(), toItem->getItemCount() + n);\n\n\t\tint32_t count = m - n;\n\t\tif (count > 0) {\n\t\t\tif (item->getItemCount() != count) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d5964926f6f04c55a98707fade508d82f1e41694ad4e4acf5b851f7b8181b92" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2240, + "startColumn": 33, + "charOffset": 83211, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 2238, + "startColumn": 33, + "charOffset": 83082, + "charLength": 5, + "snippet": { + "text": "\t\t\tif (item->getItemCount() != count) {\n\t\t\t\tstd::shared_ptr remainderItem = item->clone();\n\t\t\t\tremainderItem->setItemCount(count);\n\t\t\t\tif (internalAddItem(destCylinder, remainderItem, INDEX_WHEREEVER, flags, false) != RETURNVALUE_NOERROR) {\n\t\t\t\t\tremainderCount = count;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc770b952b93fa3b695f387e63a07b4f6d0583432be7a314407afce8b48878cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'internalRemoveItem' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2279, + "startColumn": 19, + "charOffset": 84315, + "charLength": 18, + "snippet": { + "text": "internalRemoveItem" + } + }, + "contextRegion": { + "startLine": 2277, + "startColumn": 19, + "charOffset": 84294, + "charLength": 18, + "snippet": { + "text": "}\n\nReturnValue Game::internalRemoveItem(std::shared_ptr item, int32_t count /*= -1*/, bool test /*= false*/, uint32_t flags /*= 0*/, bool force /*= false*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (item == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "faa48d883c8da8d6195e63b2aca4b13489713f2fd68c02cc19a8849ac07aa937" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2279, + "startColumn": 60, + "charOffset": 84356, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 2277, + "startColumn": 60, + "charOffset": 84294, + "charLength": 4, + "snippet": { + "text": "}\n\nReturnValue Game::internalRemoveItem(std::shared_ptr item, int32_t count /*= -1*/, bool test /*= false*/, uint32_t flags /*= 0*/, bool force /*= false*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (item == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef03b7a3cba122638de684de20cc823636da26a99a4da3d60c0408d58626dcf6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2280, + "startColumn": 34, + "charOffset": 84492, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 2278, + "startColumn": 34, + "charOffset": 84296, + "charLength": 15, + "snippet": { + "text": "\nReturnValue Game::internalRemoveItem(std::shared_ptr item, int32_t count /*= -1*/, bool test /*= false*/, uint32_t flags /*= 0*/, bool force /*= false*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (item == nullptr) {\n\t\tg_logger().debug(\"{} - Item is nullptr\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30422ce5997720732f6830618c05bd5a49768e58f5b285a463d5cae2572ae2fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2300, + "startColumn": 61, + "charOffset": 85130, + "charLength": 1, + "snippet": { + "text": "|" + } + }, + "contextRegion": { + "startLine": 2298, + "startColumn": 61, + "charOffset": 85066, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tReturnValue ret = cylinder->queryRemove(item, count, flags | FLAG_IGNORENOTMOVABLE);\n\tif (!force && ret != RETURNVALUE_NOERROR) {\n\t\tg_logger().debug(\"{} - Failed to execute query remove\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "767baad821d4d157c1e0659de0a6633ec63e91c11590f018b1e632926c1d5a2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2312, + "startColumn": 84, + "charOffset": 85645, + "charLength": 5, + "snippet": { + "text": "getID" + } + }, + "contextRegion": { + "startLine": 2310, + "startColumn": 84, + "charOffset": 85430, + "charLength": 5, + "snippet": { + "text": "\t// Not remove item with decay loaded from map\n\tif (!force && item->canDecay() && cylinder->getTile() && item->isLoadedFromMap()) {\n\t\tg_logger().debug(\"Cannot remove item with id {}, name {}, on position {}\", item->getID(), item->getName(), cylinder->getPosition().toString());\n\t\titem->stopDecaying();\n\t\treturn RETURNVALUE_THISISIMPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1dfe745c9f22175efcfe9af12c4ea6be7f321800deb3544f7f62bb8795e71fd6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2312, + "startColumn": 99, + "charOffset": 85660, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 2310, + "startColumn": 99, + "charOffset": 85430, + "charLength": 7, + "snippet": { + "text": "\t// Not remove item with decay loaded from map\n\tif (!force && item->canDecay() && cylinder->getTile() && item->isLoadedFromMap()) {\n\t\tg_logger().debug(\"Cannot remove item with id {}, name {}, on position {}\", item->getID(), item->getName(), cylinder->getPosition().toString());\n\t\titem->stopDecaying();\n\t\treturn RETURNVALUE_THISISIMPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e8b04374f13a451261e2e1c9d9f48c9590274102109656401355e2b00ea5c67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2312, + "startColumn": 134, + "charOffset": 85695, + "charLength": 8, + "snippet": { + "text": "toString" + } + }, + "contextRegion": { + "startLine": 2310, + "startColumn": 134, + "charOffset": 85430, + "charLength": 8, + "snippet": { + "text": "\t// Not remove item with decay loaded from map\n\tif (!force && item->canDecay() && cylinder->getTile() && item->isLoadedFromMap()) {\n\t\tg_logger().debug(\"Cannot remove item with id {}, name {}, on position {}\", item->getID(), item->getName(), cylinder->getPosition().toString());\n\t\titem->stopDecaying();\n\t\treturn RETURNVALUE_THISISIMPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12ddfc366740f0228bf4a45345f602f758dd4d5f96f69600695af2eb968bde57" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'addItemBatch' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2340, + "startColumn": 109, + "charOffset": 86456, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 2338, + "startColumn": 109, + "charOffset": 86345, + "charLength": 5, + "snippet": { + "text": "}\n\nstd::tuple Game::addItemBatch(const std::shared_ptr &toCylinder, const std::vector> &items, uint32_t flags /* = 0 */, bool dropOnMap /* = true */, uint32_t autoContainerId /* = 0 */) {\n\tuint32_t totalAdded = 0;\n\tuint32_t containersCreated = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3549cced0bc7f785f8f8991cda63fded937e8e7db92b946c2d09175d21acb76e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2360, + "startColumn": 34, + "charOffset": 87134, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 2358, + "startColumn": 34, + "charOffset": 87097, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tconst auto player = toCylinder->getPlayer();\n\tbool dropping = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5afe9cbea2db8a8be099a790f4b60cd02a013e12b77c3362e9e9a61ea6b9cd8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2367, + "startColumn": 41, + "charOffset": 87380, + "charLength": 15, + "snippet": { + "text": "autoContainerId" + } + }, + "contextRegion": { + "startLine": 2365, + "startColumn": 41, + "charOffset": 87314, + "charLength": 15, + "snippet": { + "text": "\t\t\treturn toCylinder;\n\t\t}\n\t\tauto autoContainer = Item::CreateItem(autoContainerId);\n\t\tif (!autoContainer) {\n\t\t\tg_logger().error(\"[{}] Failed to create auto container\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d321fa6fd8068e88244a47ac4c166536c6eec6d27ac346a9d7b59d28a40ff63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2368, + "startColumn": 7, + "charOffset": 87404, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2366, + "startColumn": 7, + "charOffset": 87336, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\t\tauto autoContainer = Item::CreateItem(autoContainerId);\n\t\tif (!autoContainer) {\n\t\t\tg_logger().error(\"[{}] Failed to create auto container\", __FUNCTION__);\n\t\t\treturn toCylinder;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55301a0e77a6c8d1be561adce21515a21bcb42711d367017beda280f0fe80252" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2379, + "startColumn": 7, + "charOffset": 87906, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2377, + "startColumn": 7, + "charOffset": 87846, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\t\tauto container = autoContainer->getContainer();\n\t\tif (!container) {\n\t\t\tg_logger().error(\"[{}] Failed to get auto container\", __FUNCTION__);\n\t\t\treturn toCylinder;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b045224ce1029ca9d24bfafad719c3d80d05f1461358b5b05a005844915917a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'createItemBatch' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2439, + "startColumn": 112, + "charOffset": 89989, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 2437, + "startColumn": 112, + "charOffset": 89875, + "charLength": 5, + "snippet": { + "text": "}\n\nstd::tuple Game::createItemBatch(const std::shared_ptr &toCylinder, const std::vector> &itemCounts, uint32_t flags /* = 0 */, bool dropOnMap /* = true */, uint32_t autoContainerId /* = 0 */) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tstd::vector> items;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ad2ad44f6523fe2411d01b09d495b46ad87263e8b39039ed5c691fac57e2ffe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2440, + "startColumn": 34, + "charOffset": 90188, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 2438, + "startColumn": 34, + "charOffset": 89877, + "charLength": 15, + "snippet": { + "text": "\nstd::tuple Game::createItemBatch(const std::shared_ptr &toCylinder, const std::vector> &itemCounts, uint32_t flags /* = 0 */, bool dropOnMap /* = true */, uint32_t autoContainerId /* = 0 */) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tstd::vector> items;\n\tfor (const auto &[itemId, count, subType] : itemCounts) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8b22913f13606dd3a9e2554c272f9b20190f7a922c38c990215220ea3af3c7f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2473, + "startColumn": 65, + "charOffset": 91595, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 2471, + "startColumn": 65, + "charOffset": 91528, + "charLength": 6, + "snippet": { + "text": "}\n\nReturnValue Game::internalPlayerAddItem(std::shared_ptr player, std::shared_ptr item, bool dropOnMap /*= true*/, Slots_t slot /*= CONST_SLOT_WHEREEVER*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tuint32_t remainderCount = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "953e08558324583624dcf156c13fc49fdf69c8649e8d5a53fc35dff2990e1fb2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2473, + "startColumn": 95, + "charOffset": 91625, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 2471, + "startColumn": 95, + "charOffset": 91528, + "charLength": 4, + "snippet": { + "text": "}\n\nReturnValue Game::internalPlayerAddItem(std::shared_ptr player, std::shared_ptr item, bool dropOnMap /*= true*/, Slots_t slot /*= CONST_SLOT_WHEREEVER*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tuint32_t remainderCount = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc642d79e93e069a60dafcba664c3ba5be561ff275539c7e521fadfbaca54689" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2474, + "startColumn": 34, + "charOffset": 91734, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 2472, + "startColumn": 34, + "charOffset": 91530, + "charLength": 15, + "snippet": { + "text": "\nReturnValue Game::internalPlayerAddItem(std::shared_ptr player, std::shared_ptr item, bool dropOnMap /*= true*/, Slots_t slot /*= CONST_SLOT_WHEREEVER*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tuint32_t remainderCount = 0;\n\tReturnValue ret;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1923742486323a40bb42e8169b96dad22b3decde18cfb77b585a85855c056474" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'ret' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2476, + "startColumn": 14, + "charOffset": 91795, + "charLength": 3, + "snippet": { + "text": "ret" + } + }, + "contextRegion": { + "startLine": 2474, + "startColumn": 14, + "charOffset": 91701, + "charLength": 3, + "snippet": { + "text": "\tmetrics::method_latency measure(__METHOD_NAME__);\n\tuint32_t remainderCount = 0;\n\tReturnValue ret;\n\tif (slot == CONST_SLOT_WHEREEVER) {\n\t\tret = internalCollectManagedItems(player, item, getObjectCategory(item), false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f66b38cd62d81ecc5d9f0f4aaaf74fc49ff0a6760a6d046418a09b26e16d91ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2487, + "startColumn": 73, + "charOffset": 92287, + "charLength": 14, + "snippet": { + "text": "remainderCount" + } + }, + "contextRegion": { + "startLine": 2485, + "startColumn": 73, + "charOffset": 92184, + "charLength": 14, + "snippet": { + "text": "\t}\n\tif (remainderCount != 0) {\n\t\tstd::shared_ptr remainderItem = Item::CreateItem(item->getID(), remainderCount);\n\t\tReturnValue remaindRet = internalAddItem(player->getTile(), remainderItem, INDEX_WHEREEVER, FLAG_NOLIMIT);\n\t\tif (remaindRet != RETURNVALUE_NOERROR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e75da88bd74242f1996a21d316140d518602c89f323abd2255c45616a26c5b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'findItemOfType' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2505, + "startColumn": 29, + "charOffset": 92785, + "charLength": 14, + "snippet": { + "text": "findItemOfType" + } + }, + "contextRegion": { + "startLine": 2503, + "startColumn": 29, + "charOffset": 92754, + "charLength": 14, + "snippet": { + "text": "}\n\nstd::shared_ptr Game::findItemOfType(std::shared_ptr cylinder, uint16_t itemId, bool depthSearch /*= true*/, int32_t subType /*= -1*/) const {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (cylinder == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9766ef42c1dec418dd9b355cbe9a70c97174fe843bef27f9321811137c00d466" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2505, + "startColumn": 70, + "charOffset": 92826, + "charLength": 8, + "snippet": { + "text": "cylinder" + } + }, + "contextRegion": { + "startLine": 2503, + "startColumn": 70, + "charOffset": 92754, + "charLength": 8, + "snippet": { + "text": "}\n\nstd::shared_ptr Game::findItemOfType(std::shared_ptr cylinder, uint16_t itemId, bool depthSearch /*= true*/, int32_t subType /*= -1*/) const {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (cylinder == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f80e1c228257f3e4d1c270c07404efe11f0c05755df3bb7e2bfe373093c8a7fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2506, + "startColumn": 34, + "charOffset": 92949, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 2504, + "startColumn": 34, + "charOffset": 92756, + "charLength": 15, + "snippet": { + "text": "\nstd::shared_ptr Game::findItemOfType(std::shared_ptr cylinder, uint16_t itemId, bool depthSearch /*= true*/, int32_t subType /*= -1*/) const {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (cylinder == nullptr) {\n\t\tg_logger().error(\"[{}] Cylinder is nullptr\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c47ba65b9f0b39b705bb47f7a30955bf4592f029e57796a56d6de0921d61495" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2513, + "startColumn": 2, + "charOffset": 93133, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2511, + "startColumn": 2, + "charOffset": 93078, + "charLength": 3, + "snippet": { + "text": "\n\tstd::vector> containers;\n\tfor (size_t i = cylinder->getFirstIndex(), j = cylinder->getLastIndex(); i < j; ++i) {\n\t\tstd::shared_ptr thing = cylinder->getThing(i);\n\t\tif (!thing) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a405b1ca64db0ab0ffbd0fa27f871648b486ae1dd996671da8e4ac5b7d7d74af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2513, + "startColumn": 7, + "charOffset": 93138, + "charLength": 6, + "snippet": { + "text": "size_t" + } + }, + "contextRegion": { + "startLine": 2511, + "startColumn": 7, + "charOffset": 93078, + "charLength": 6, + "snippet": { + "text": "\n\tstd::vector> containers;\n\tfor (size_t i = cylinder->getFirstIndex(), j = cylinder->getLastIndex(); i < j; ++i) {\n\t\tstd::shared_ptr thing = cylinder->getThing(i);\n\t\tif (!thing) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd07a561fde7f7691e064c1c7d2e4bab4b64bbdc5f12a84f0b990b76cb744dfc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'i' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2513, + "startColumn": 75, + "charOffset": 93206, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 2511, + "startColumn": 75, + "charOffset": 93078, + "charLength": 1, + "snippet": { + "text": "\n\tstd::vector> containers;\n\tfor (size_t i = cylinder->getFirstIndex(), j = cylinder->getLastIndex(); i < j; ++i) {\n\t\tstd::shared_ptr thing = cylinder->getThing(i);\n\t\tif (!thing) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88ba3ff88e879e8bcb8a934dcbb3299b244ef2da7655c0c36ea6283a9c6e673b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2515, + "startColumn": 7, + "charOffset": 93282, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2513, + "startColumn": 7, + "charOffset": 93132, + "charLength": 1, + "snippet": { + "text": "\tfor (size_t i = cylinder->getFirstIndex(), j = cylinder->getLastIndex(); i < j; ++i) {\n\t\tstd::shared_ptr thing = cylinder->getThing(i);\n\t\tif (!thing) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b045224ce1029ca9d24bfafad719c3d80d05f1461358b5b05a005844915917a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2520, + "startColumn": 7, + "charOffset": 93365, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2518, + "startColumn": 7, + "charOffset": 93309, + "charLength": 1, + "snippet": { + "text": "\n\t\tstd::shared_ptr item = thing->getItem();\n\t\tif (!item) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af55f0c1c7dbd9b6ae71c8951568e2f1a50a49468c8857806bcdf5efcd91026b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2537, + "startColumn": 2, + "charOffset": 93669, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 2535, + "startColumn": 2, + "charOffset": 93652, + "charLength": 5, + "snippet": { + "text": "\n\tsize_t i = 0;\n\twhile (i < containers.size()) {\n\t\tstd::shared_ptr container = containers[i++];\n\t\tfor (std::shared_ptr item : container->getItemList()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa937d2d8a31b55fae924abffb70a94a0619daada06dc7a5a89484c20753359d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'removeMoney' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2553, + "startColumn": 12, + "charOffset": 94105, + "charLength": 11, + "snippet": { + "text": "removeMoney" + } + }, + "contextRegion": { + "startLine": 2551, + "startColumn": 12, + "charOffset": 94091, + "charLength": 11, + "snippet": { + "text": "}\n\nbool Game::removeMoney(std::shared_ptr cylinder, uint64_t money, uint32_t flags /*= 0*/, bool useBalance /*= false*/) {\n\tif (cylinder == nullptr) {\n\t\tg_logger().error(\"[{}] cylinder is nullptr\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae153e71cd5f2cc82dc991875bb46fcf2392e53caedf70dfa4aee1076061fbfe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2553, + "startColumn": 50, + "charOffset": 94143, + "charLength": 8, + "snippet": { + "text": "cylinder" + } + }, + "contextRegion": { + "startLine": 2551, + "startColumn": 50, + "charOffset": 94091, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Game::removeMoney(std::shared_ptr cylinder, uint64_t money, uint32_t flags /*= 0*/, bool useBalance /*= false*/) {\n\tif (cylinder == nullptr) {\n\t\tg_logger().error(\"[{}] cylinder is nullptr\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90f26787b7defb884c3117f48a3e7bed03eadd5ef9d3000d92103fad2b8c30ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'removeMoney' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2553, + "startColumn": 60, + "charOffset": 94153, + "charLength": 8, + "snippet": { + "text": "uint64_t" + } + }, + "contextRegion": { + "startLine": 2551, + "startColumn": 60, + "charOffset": 94091, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Game::removeMoney(std::shared_ptr cylinder, uint64_t money, uint32_t flags /*= 0*/, bool useBalance /*= false*/) {\n\tif (cylinder == nullptr) {\n\t\tg_logger().error(\"[{}] cylinder is nullptr\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f2ddf5e0889c97db457bb8dd62e7a2a5c427ec547abc8553fe251eda5e6c2de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2564, + "startColumn": 2, + "charOffset": 94508, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2562, + "startColumn": 2, + "charOffset": 94423, + "charLength": 3, + "snippet": { + "text": "\tstd::multimap> moneyMap;\n\tuint64_t moneyCount = 0;\n\tfor (size_t i = cylinder->getFirstIndex(), j = cylinder->getLastIndex(); i < j; ++i) {\n\t\tstd::shared_ptr thing = cylinder->getThing(i);\n\t\tif (!thing) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b472112969b55232c8602bee060bb225a2c102656859fc28c9f098c9524eac5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2564, + "startColumn": 7, + "charOffset": 94513, + "charLength": 6, + "snippet": { + "text": "size_t" + } + }, + "contextRegion": { + "startLine": 2562, + "startColumn": 7, + "charOffset": 94423, + "charLength": 6, + "snippet": { + "text": "\tstd::multimap> moneyMap;\n\tuint64_t moneyCount = 0;\n\tfor (size_t i = cylinder->getFirstIndex(), j = cylinder->getLastIndex(); i < j; ++i) {\n\t\tstd::shared_ptr thing = cylinder->getThing(i);\n\t\tif (!thing) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1b3e32839187482438eeeec016e269f078fdd6ec12ad2ece8276aaec360bd9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'i' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2564, + "startColumn": 75, + "charOffset": 94581, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 2562, + "startColumn": 75, + "charOffset": 94423, + "charLength": 1, + "snippet": { + "text": "\tstd::multimap> moneyMap;\n\tuint64_t moneyCount = 0;\n\tfor (size_t i = cylinder->getFirstIndex(), j = cylinder->getLastIndex(); i < j; ++i) {\n\t\tstd::shared_ptr thing = cylinder->getThing(i);\n\t\tif (!thing) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "762f001950cb1b421a9128ec0de0b9598247d95bdb58c0ea440d41d8d303e315" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2566, + "startColumn": 7, + "charOffset": 94657, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2564, + "startColumn": 7, + "charOffset": 94507, + "charLength": 1, + "snippet": { + "text": "\tfor (size_t i = cylinder->getFirstIndex(), j = cylinder->getLastIndex(); i < j; ++i) {\n\t\tstd::shared_ptr thing = cylinder->getThing(i);\n\t\tif (!thing) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5957fcdd9e9e0d6b88f08d437969d938842370c204cd1062d788b21bb714bb0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2570, + "startColumn": 7, + "charOffset": 94739, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2568, + "startColumn": 7, + "charOffset": 94680, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\t\tstd::shared_ptr item = thing->getItem();\n\t\tif (!item) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b90030825ac44eef7e6fd6d60d909fe963041f78907202533d89074b47b338ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2585, + "startColumn": 2, + "charOffset": 95047, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 2583, + "startColumn": 2, + "charOffset": 95028, + "charLength": 5, + "snippet": { + "text": "\t}\n\tsize_t i = 0;\n\twhile (i < containers.size()) {\n\t\tstd::shared_ptr container = containers[i++];\n\t\tfor (const std::shared_ptr &item : container->getItemList()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71606958a187b48af983bacf6f66764983a9b749f19cc65108cf9ab9442dcd88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2635, + "startColumn": 47, + "charOffset": 96500, + "charLength": 8, + "snippet": { + "text": "cylinder" + } + }, + "contextRegion": { + "startLine": 2633, + "startColumn": 47, + "charOffset": 96451, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::addMoney(std::shared_ptr cylinder, uint64_t money, uint32_t flags /*= 0*/) {\n\tif (cylinder == nullptr) {\n\t\tg_logger().error(\"[{}] cylinder is nullptr\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bef4cb04a8394e10bf45f1dd54675d5840e5b2e0f889545b912d366a85c3a7ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'addMoney' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2635, + "startColumn": 57, + "charOffset": 96510, + "charLength": 8, + "snippet": { + "text": "uint64_t" + } + }, + "contextRegion": { + "startLine": 2633, + "startColumn": 57, + "charOffset": 96451, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::addMoney(std::shared_ptr cylinder, uint64_t money, uint32_t flags /*= 0*/) {\n\tif (cylinder == nullptr) {\n\t\tg_logger().error(\"[{}] cylinder is nullptr\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42c54f0ca8cf3179e35c9e34b452bd9d03d9294370f5b3038e0dc36a3d508c34" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2644, + "startColumn": 26, + "charOffset": 96713, + "charLength": 5, + "snippet": { + "text": "money" + } + }, + "contextRegion": { + "startLine": 2642, + "startColumn": 26, + "charOffset": 96684, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tuint32_t crystalCoins = money / 10000;\n\tmoney -= crystalCoins * 10000;\n\twhile (crystalCoins > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4aa32643a1b0c37151c90a043aa2576a049fd02f81169766d2387d924fcbd437" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2644, + "startColumn": 34, + "charOffset": 96721, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 2642, + "startColumn": 34, + "charOffset": 96684, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tuint32_t crystalCoins = money / 10000;\n\tmoney -= crystalCoins * 10000;\n\twhile (crystalCoins > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee54430946f73e90038d701d78754e7f07bef2452a6ab922d94a99e291289f4b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'uint64_t' (aka 'unsigned long') of a multiplication performed in type 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2645, + "startColumn": 11, + "charOffset": 96738, + "charLength": 12, + "snippet": { + "text": "crystalCoins" + } + }, + "contextRegion": { + "startLine": 2643, + "startColumn": 11, + "charOffset": 96687, + "charLength": 12, + "snippet": { + "text": "\n\tuint32_t crystalCoins = money / 10000;\n\tmoney -= crystalCoins * 10000;\n\twhile (crystalCoins > 0) {\n\t\tconst uint16_t count = std::min(100, crystalCoins);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96408cfbfbed6d74d39810c9f053874985b1e090e258096acae49cc622e18bd0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2645, + "startColumn": 26, + "charOffset": 96753, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 2643, + "startColumn": 26, + "charOffset": 96687, + "charLength": 5, + "snippet": { + "text": "\n\tuint32_t crystalCoins = money / 10000;\n\tmoney -= crystalCoins * 10000;\n\twhile (crystalCoins > 0) {\n\t\tconst uint16_t count = std::min(100, crystalCoins);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e476d5efa8bc9ce7d14608e472e387fadaa696a034fded221b1dc0b86024283" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2646, + "startColumn": 2, + "charOffset": 96761, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 2644, + "startColumn": 2, + "charOffset": 96688, + "charLength": 5, + "snippet": { + "text": "\tuint32_t crystalCoins = money / 10000;\n\tmoney -= crystalCoins * 10000;\n\twhile (crystalCoins > 0) {\n\t\tconst uint16_t count = std::min(100, crystalCoins);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7dc6b1f3cc741f26d334bdddc2efd019b4fad5787a4dd120e661276e18111a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'crystalCoins' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2646, + "startColumn": 9, + "charOffset": 96768, + "charLength": 12, + "snippet": { + "text": "crystalCoins" + } + }, + "contextRegion": { + "startLine": 2644, + "startColumn": 9, + "charOffset": 96688, + "charLength": 12, + "snippet": { + "text": "\tuint32_t crystalCoins = money / 10000;\n\tmoney -= crystalCoins * 10000;\n\twhile (crystalCoins > 0) {\n\t\tconst uint16_t count = std::min(100, crystalCoins);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e9150fdf3d4747c485527ab723e42ad951e8bedae3142a4b2cdf43e66258f05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2653, + "startColumn": 30, + "charOffset": 97085, + "charLength": 7, + "snippet": { + "text": "getTile" + } + }, + "contextRegion": { + "startLine": 2651, + "startColumn": 30, + "charOffset": 96936, + "charLength": 7, + "snippet": { + "text": "\t\tReturnValue ret = internalAddItem(cylinder, remaindItem, INDEX_WHEREEVER, flags);\n\t\tif (ret != RETURNVALUE_NOERROR) {\n\t\t\tinternalAddItem(cylinder->getTile(), remaindItem, INDEX_WHEREEVER, FLAG_NOLIMIT);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6376f4103bbe1eb676bbed182832dda647469c3ba4b8d9eee1b7387183bd6892" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2659, + "startColumn": 27, + "charOffset": 97201, + "charLength": 5, + "snippet": { + "text": "money" + } + }, + "contextRegion": { + "startLine": 2657, + "startColumn": 27, + "charOffset": 97171, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tuint16_t platinumCoins = money / 100;\n\tif (platinumCoins != 0) {\n\t\tstd::shared_ptr remaindItem = Item::CreateItem(ITEM_PLATINUM_COIN, platinumCoins);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f4f5fedf28f51d4af6a82e06eca0796ff3aed05aab43e1a0ef8db755594d9af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2659, + "startColumn": 35, + "charOffset": 97209, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2657, + "startColumn": 35, + "charOffset": 97171, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tuint16_t platinumCoins = money / 100;\n\tif (platinumCoins != 0) {\n\t\tstd::shared_ptr remaindItem = Item::CreateItem(ITEM_PLATINUM_COIN, platinumCoins);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc9725544b95fd290e4fa857fed879f141be789077655a2f519f5b053ea7508c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2665, + "startColumn": 30, + "charOffset": 97482, + "charLength": 7, + "snippet": { + "text": "getTile" + } + }, + "contextRegion": { + "startLine": 2663, + "startColumn": 30, + "charOffset": 97333, + "charLength": 7, + "snippet": { + "text": "\t\tReturnValue ret = internalAddItem(cylinder, remaindItem, INDEX_WHEREEVER, flags);\n\t\tif (ret != RETURNVALUE_NOERROR) {\n\t\t\tinternalAddItem(cylinder->getTile(), remaindItem, INDEX_WHEREEVER, FLAG_NOLIMIT);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81b1962f1cc1d18a074d6e3b158cfad1751afc6e0ceea65f025f352df8fc7f04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'uint64_t' (aka 'unsigned long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2668, + "startColumn": 12, + "charOffset": 97554, + "charLength": 13, + "snippet": { + "text": "platinumCoins" + } + }, + "contextRegion": { + "startLine": 2666, + "startColumn": 12, + "charOffset": 97538, + "charLength": 13, + "snippet": { + "text": "\t\t}\n\n\t\tmoney -= platinumCoins * 100;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1270937828c8b63ee9c3d7ccb2afd0cbd7ca664d0c7bb3a95c4075a5ab2fde5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2668, + "startColumn": 28, + "charOffset": 97570, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2666, + "startColumn": 28, + "charOffset": 97538, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tmoney -= platinumCoins * 100;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2baaa6c485ce74621e1f86c664445de011ebd5fa744c59cb50d5f340f5a6ba9b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2672, + "startColumn": 72, + "charOffset": 97669, + "charLength": 5, + "snippet": { + "text": "money" + } + }, + "contextRegion": { + "startLine": 2670, + "startColumn": 72, + "charOffset": 97578, + "charLength": 5, + "snippet": { + "text": "\n\tif (money != 0) {\n\t\tstd::shared_ptr remaindItem = Item::CreateItem(ITEM_GOLD_COIN, money);\n\n\t\tReturnValue ret = internalAddItem(cylinder, remaindItem, INDEX_WHEREEVER, flags);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f07f06b07416d2ac4c9266c96b84f8507f87bd52c554571130b9795597a7ae2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2676, + "startColumn": 30, + "charOffset": 97827, + "charLength": 7, + "snippet": { + "text": "getTile" + } + }, + "contextRegion": { + "startLine": 2674, + "startColumn": 30, + "charOffset": 97678, + "charLength": 7, + "snippet": { + "text": "\t\tReturnValue ret = internalAddItem(cylinder, remaindItem, INDEX_WHEREEVER, flags);\n\t\tif (ret != RETURNVALUE_NOERROR) {\n\t\t\tinternalAddItem(cylinder->getTile(), remaindItem, INDEX_WHEREEVER, FLAG_NOLIMIT);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b541f2ef8b29e4b45cd14fcc7fb64380e21d534ebc39770b60b0c46124f92c63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'transformItem' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2681, + "startColumn": 29, + "charOffset": 97921, + "charLength": 13, + "snippet": { + "text": "transformItem" + } + }, + "contextRegion": { + "startLine": 2679, + "startColumn": 29, + "charOffset": 97890, + "charLength": 13, + "snippet": { + "text": "}\n\nstd::shared_ptr Game::transformItem(std::shared_ptr item, uint16_t newId, int32_t newCount /*= -1*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (item->getID() == newId && (newCount == -1 || (newCount == item->getSubType() && newCount != 0))) { // chargeless item placed on map = infinite" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba3436d21793eaeeb1e0589d9a651cb803bcf03f0fbb7b992e739b6aebeba096" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'transformItem' has cognitive complexity of 59 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2681, + "startColumn": 29, + "charOffset": 97921, + "charLength": 13, + "snippet": { + "text": "transformItem" + } + }, + "contextRegion": { + "startLine": 2679, + "startColumn": 29, + "charOffset": 97890, + "charLength": 13, + "snippet": { + "text": "}\n\nstd::shared_ptr Game::transformItem(std::shared_ptr item, uint16_t newId, int32_t newCount /*= -1*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (item->getID() == newId && (newCount == -1 || (newCount == item->getSubType() && newCount != 0))) { // chargeless item placed on map = infinite" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c285265adb07cd31abe77130b2da3e57060867dbc1046802f84c4b6915324f1e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2682, + "startColumn": 34, + "charOffset": 98041, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 2680, + "startColumn": 34, + "charOffset": 97892, + "charLength": 15, + "snippet": { + "text": "\nstd::shared_ptr Game::transformItem(std::shared_ptr item, uint16_t newId, int32_t newCount /*= -1*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (item->getID() == newId && (newCount == -1 || (newCount == item->getSubType() && newCount != 0))) { // chargeless item placed on map = infinite\n\t\treturn item;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51b29ac3cbaea3ea89c9d9ab3abbafd7c06139ff925f4d67263ecc4a44c71695" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2715, + "startColumn": 37, + "charOffset": 99040, + "charLength": 12, + "snippet": { + "text": "getItemCount" + } + }, + "contextRegion": { + "startLine": 2713, + "startColumn": 37, + "charOffset": 98866, + "charLength": 12, + "snippet": { + "text": "\t\t// This only occurs when you transform items on tiles from a downItem to a topItem (or vice versa)\n\t\t// Remove the old, and add the new\n\t\tcylinder->removeThing(item, item->getItemCount());\n\t\tcylinder->postRemoveNotification(item, cylinder, itemIndex);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23336114066deb83c68cdc780e58ee3e9d75e137f972373909199985edae6496" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2720, + "startColumn": 21, + "charOffset": 99187, + "charLength": 8, + "snippet": { + "text": "newCount" + } + }, + "contextRegion": { + "startLine": 2718, + "startColumn": 21, + "charOffset": 99121, + "charLength": 8, + "snippet": { + "text": "\t\titem->setID(newId);\n\t\tif (newCount != -1) {\n\t\t\titem->setSubType(newCount);\n\t\t}\n\t\tcylinder->addThing(item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63e2200ec9ed55fe13655d7da0256db313e58d11a0602420232e34e9191f9117" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2740, + "startColumn": 5, + "charOffset": 99732, + "charLength": 18, + "snippet": { + "text": "internalRemoveItem" + } + }, + "contextRegion": { + "startLine": 2738, + "startColumn": 5, + "charOffset": 99602, + "charLength": 18, + "snippet": { + "text": "\t\tif (newCount == 0 && (item->isStackable() || item->hasAttribute(ItemAttribute_t::CHARGES))) {\n\t\t\tif (item->isStackable()) {\n\t\t\t\tinternalRemoveItem(item);\n\t\t\t\treturn nullptr;\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a478a782aaf6ca851760e8891be33bb5410681292d48830464ccf2e207e4ec25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2742, + "startColumn": 6, + "charOffset": 99783, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 2740, + "startColumn": 6, + "charOffset": 99728, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tinternalRemoveItem(item);\n\t\t\t\treturn nullptr;\n\t\t\t} else {\n\t\t\t\tint32_t newItemId = newId;\n\t\t\t\tif (curType.id == newType.id) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f750a15cdde0e4a493e734c131a6f54c8acb02f7a0178e48c285ae52d3fe1ced" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2749, + "startColumn": 6, + "charOffset": 99928, + "charLength": 18, + "snippet": { + "text": "internalRemoveItem" + } + }, + "contextRegion": { + "startLine": 2747, + "startColumn": 6, + "charOffset": 99897, + "charLength": 18, + "snippet": { + "text": "\n\t\t\t\tif (newItemId < 0) {\n\t\t\t\t\tinternalRemoveItem(item);\n\t\t\t\t\treturn nullptr;\n\t\t\t\t} else if (newItemId != newId) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b54222305b96f7c241c37faf36ec88e0b4a2a31289166407014ae975b182e98f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2751, + "startColumn": 7, + "charOffset": 99981, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 2749, + "startColumn": 7, + "charOffset": 99923, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\tinternalRemoveItem(item);\n\t\t\t\t\treturn nullptr;\n\t\t\t\t} else if (newItemId != newId) {\n\t\t\t\t\t// Replacing the the old item with the std::make_shared< while> maintaining the old position\n\t\t\t\t\tauto newItem = item->transform(newItemId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a9a10be5047f2c52ab1a96556942e72a6e423a41bd59389afd5316974997f4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2753, + "startColumn": 37, + "charOffset": 100146, + "charLength": 9, + "snippet": { + "text": "newItemId" + } + }, + "contextRegion": { + "startLine": 2751, + "startColumn": 37, + "charOffset": 99975, + "charLength": 9, + "snippet": { + "text": "\t\t\t\t} else if (newItemId != newId) {\n\t\t\t\t\t// Replacing the the old item with the std::make_shared< while> maintaining the old position\n\t\t\t\t\tauto newItem = item->transform(newItemId);\n\t\t\t\t\tif (newItem == nullptr) {\n\t\t\t\t\t\tg_logger().error(\"[{}] new item with id {} is nullptr, (ERROR CODE: 01)\", __FUNCTION__, newItemId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09717d2263d307b96e729e06a906ed4b11c5b59ff349702ace4240589ef02309" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2761, + "startColumn": 33, + "charOffset": 100391, + "charLength": 9, + "snippet": { + "text": "newItemId" + } + }, + "contextRegion": { + "startLine": 2759, + "startColumn": 33, + "charOffset": 100325, + "charLength": 9, + "snippet": { + "text": "\t\t\t\t\treturn newItem;\n\t\t\t\t} else {\n\t\t\t\t\treturn transformItem(item, newItemId);\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d85baf988e2ecfc31b1a0ce23a3fc996560dfe61c13dab7db21d26d534f287a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2771, + "startColumn": 4, + "charOffset": 100679, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2769, + "startColumn": 4, + "charOffset": 100565, + "charLength": 2, + "snippet": { + "text": "\t\t\tauto decaying = item->getDecaying();\n\t\t\t// If the item is decaying, we need to transform it to the new item\n\t\t\tif (decaying > DECAYING_FALSE && item->getDuration() <= 1 && newType.decayTo) {\n\t\t\t\tg_logger().debug(\"Decay duration old type {}, transformEquipTo {}, transformDeEquipTo {}\", curType.decayTo, curType.transformEquipTo, curType.transformDeEquipTo);\n\t\t\t\tg_logger().debug(\"Decay duration new type decayTo {}, transformEquipTo {}, transformDeEquipTo {}\", newType.decayTo, newType.transformEquipTo, newType.transformDeEquipTo);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68e00a849cb07ef8393aeb296526a49552f13444a36ddd5fabbbb86a778a6d17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2771, + "startColumn": 8, + "charOffset": 100683, + "charLength": 8, + "snippet": { + "text": "decaying" + } + }, + "contextRegion": { + "startLine": 2769, + "startColumn": 8, + "charOffset": 100565, + "charLength": 8, + "snippet": { + "text": "\t\t\tauto decaying = item->getDecaying();\n\t\t\t// If the item is decaying, we need to transform it to the new item\n\t\t\tif (decaying > DECAYING_FALSE && item->getDuration() <= 1 && newType.decayTo) {\n\t\t\t\tg_logger().debug(\"Decay duration old type {}, transformEquipTo {}, transformDeEquipTo {}\", curType.decayTo, curType.transformEquipTo, curType.transformDeEquipTo);\n\t\t\t\tg_logger().debug(\"Decay duration new type decayTo {}, transformEquipTo {}, transformDeEquipTo {}\", newType.decayTo, newType.transformEquipTo, newType.transformDeEquipTo);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4c5c47b7ed0a50de1c3ca3870f461a25bbb72ddeffaef25fca4b32bcb2535ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2771, + "startColumn": 62, + "charOffset": 100737, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 2769, + "startColumn": 62, + "charOffset": 100565, + "charLength": 2, + "snippet": { + "text": "\t\t\tauto decaying = item->getDecaying();\n\t\t\t// If the item is decaying, we need to transform it to the new item\n\t\t\tif (decaying > DECAYING_FALSE && item->getDuration() <= 1 && newType.decayTo) {\n\t\t\t\tg_logger().debug(\"Decay duration old type {}, transformEquipTo {}, transformDeEquipTo {}\", curType.decayTo, curType.transformEquipTo, curType.transformDeEquipTo);\n\t\t\t\tg_logger().debug(\"Decay duration new type decayTo {}, transformEquipTo {}, transformDeEquipTo {}\", newType.decayTo, newType.transformEquipTo, newType.transformDeEquipTo);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7226a4b65ae5b3cd152b4bf83d5c3353f80eedf4a955196b91925addcae3321a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2771, + "startColumn": 65, + "charOffset": 100740, + "charLength": 7, + "snippet": { + "text": "newType" + } + }, + "contextRegion": { + "startLine": 2769, + "startColumn": 65, + "charOffset": 100565, + "charLength": 7, + "snippet": { + "text": "\t\t\tauto decaying = item->getDecaying();\n\t\t\t// If the item is decaying, we need to transform it to the new item\n\t\t\tif (decaying > DECAYING_FALSE && item->getDuration() <= 1 && newType.decayTo) {\n\t\t\t\tg_logger().debug(\"Decay duration old type {}, transformEquipTo {}, transformDeEquipTo {}\", curType.decayTo, curType.transformEquipTo, curType.transformDeEquipTo);\n\t\t\t\tg_logger().debug(\"Decay duration new type decayTo {}, transformEquipTo {}, transformDeEquipTo {}\", newType.decayTo, newType.transformEquipTo, newType.transformDeEquipTo);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11842466c3379ed52d7b8338a22352cca7498d6cbb2ac13ccb1a3e60e9b6b22f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2774, + "startColumn": 14, + "charOffset": 101114, + "charLength": 7, + "snippet": { + "text": "newType" + } + }, + "contextRegion": { + "startLine": 2772, + "startColumn": 14, + "charOffset": 100759, + "charLength": 7, + "snippet": { + "text": "\t\t\t\tg_logger().debug(\"Decay duration old type {}, transformEquipTo {}, transformDeEquipTo {}\", curType.decayTo, curType.transformEquipTo, curType.transformDeEquipTo);\n\t\t\t\tg_logger().debug(\"Decay duration new type decayTo {}, transformEquipTo {}, transformDeEquipTo {}\", newType.decayTo, newType.transformEquipTo, newType.transformDeEquipTo);\n\t\t\t\titemId = newType.decayTo;\n\t\t\t} else if (curType.id != newType.id) {\n\t\t\t\tif (newType.group != curType.group) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3f4ca739b8fe62b106dc74056bb2c324c0bbeda11714b95ed1daf05744f1945" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2810, + "startColumn": 40, + "charOffset": 102200, + "charLength": 8, + "snippet": { + "text": "newCount" + } + }, + "contextRegion": { + "startLine": 2808, + "startColumn": 40, + "charOffset": 102081, + "charLength": 8, + "snippet": { + "text": "\n\t// Replacing the the old item with the new while maintaining the old position\n\tauto newItem = item->transform(newId, newCount);\n\tif (newItem == nullptr) {\n\t\tg_logger().error(\"[{}] new item with id {} is nullptr (ERROR CODE: 02)\", __FUNCTION__, newId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0eaa91b37c0f128133dc3087226576baf30fa77a9e7078c59431a1cacaf73c8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2820, + "startColumn": 34, + "charOffset": 102559, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 2818, + "startColumn": 34, + "charOffset": 102376, + "charLength": 15, + "snippet": { + "text": "\nReturnValue Game::internalTeleport(const std::shared_ptr &thing, const Position &newPos, bool pushMove /* = true*/, uint32_t flags /*= 0*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (thing == nullptr) {\n\t\tg_logger().error(\"[{}] thing is nullptr\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f73c17a735ce7728592197183f5c50821c7386ac2bb85a7b138efcc3584d3025" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2826, + "startColumn": 2, + "charOffset": 102700, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2824, + "startColumn": 2, + "charOffset": 102695, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (newPos == thing->getPosition()) {\n\t\treturn RETURNVALUE_CONTACTADMINISTRATOR;\n\t} else if (thing->isRemoved()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a85d2b63ceeb804521be1aaad3f5e17d0ef86b1a26164c4c5385d201a581cb88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2828, + "startColumn": 4, + "charOffset": 102784, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 2826, + "startColumn": 4, + "charOffset": 102699, + "charLength": 4, + "snippet": { + "text": "\tif (newPos == thing->getPosition()) {\n\t\treturn RETURNVALUE_CONTACTADMINISTRATOR;\n\t} else if (thing->isRemoved()) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28956b9b9f31620d9160d08effc5acdbdc8fc9d9a592b9f4cb90ab4db908e1e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2833, + "startColumn": 6, + "charOffset": 102911, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2831, + "startColumn": 6, + "charOffset": 102852, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr toTile = map.getTile(newPos);\n\tif (!toTile) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9bb7100512e05332246c753ffa9decac5f0d95707bfbbe47e8483d73b31c7a20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2837, + "startColumn": 2, + "charOffset": 102961, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2835, + "startColumn": 2, + "charOffset": 102956, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (std::shared_ptr creature = thing->getCreature()) {\n\t\tReturnValue ret = toTile->queryAdd(0, creature, 1, FLAG_NOLIMIT);\n\t\tif (ret != RETURNVALUE_NOERROR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b1ad7458ab22fc3ffac0d73d3e26efdaeafce28e3e08453009832ab3ae1aa67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2845, + "startColumn": 4, + "charOffset": 103232, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 2843, + "startColumn": 4, + "charOffset": 103150, + "charLength": 4, + "snippet": { + "text": "\t\tmap.moveCreature(creature, toTile, !pushMove);\n\t\treturn RETURNVALUE_NOERROR;\n\t} else if (std::shared_ptr item = thing->getItem()) {\n\t\treturn internalMoveItem(item->getParent(), toTile, INDEX_WHEREEVER, item, item->getItemCount(), nullptr, flags);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24337b62b3e102b35328068008416ad45aaee2fc49d6b32f3795960c7b19581a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'playerQuickLootCorpse' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2851, + "startColumn": 12, + "charOffset": 103455, + "charLength": 21, + "snippet": { + "text": "playerQuickLootCorpse" + } + }, + "contextRegion": { + "startLine": 2849, + "startColumn": 12, + "charOffset": 103441, + "charLength": 21, + "snippet": { + "text": "}\n\nvoid Game::playerQuickLootCorpse(std::shared_ptr player, std::shared_ptr corpse, const Position &position) {\n\tif (!player || !corpse) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eca6f2ac90236c46580c8c96ed516515750ba23e79b2ac6ce0c1fe22b7f755bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'playerQuickLootCorpse' has cognitive complexity of 60 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2851, + "startColumn": 12, + "charOffset": 103455, + "charLength": 21, + "snippet": { + "text": "playerQuickLootCorpse" + } + }, + "contextRegion": { + "startLine": 2849, + "startColumn": 12, + "charOffset": 103441, + "charLength": 21, + "snippet": { + "text": "}\n\nvoid Game::playerQuickLootCorpse(std::shared_ptr player, std::shared_ptr corpse, const Position &position) {\n\tif (!player || !corpse) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b8c05dd0232c15714fb362bfb5071a46c7891773045139086672a71c5af3752" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2851, + "startColumn": 58, + "charOffset": 103501, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 2849, + "startColumn": 58, + "charOffset": 103441, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::playerQuickLootCorpse(std::shared_ptr player, std::shared_ptr corpse, const Position &position) {\n\tif (!player || !corpse) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a933b7b72815e265c00543b6eab68b55294993e8722bdbdc0854286ea7cc803a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2851, + "startColumn": 93, + "charOffset": 103536, + "charLength": 6, + "snippet": { + "text": "corpse" + } + }, + "contextRegion": { + "startLine": 2849, + "startColumn": 93, + "charOffset": 103441, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::playerQuickLootCorpse(std::shared_ptr player, std::shared_ptr corpse, const Position &position) {\n\tif (!player || !corpse) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd2895bff831a48713f7c58f32b335b502ce605cf0122ccfc2da90a478550b07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-unused-parameters", + "ruleIndex": 612, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'position' is unused" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2851, + "startColumn": 117, + "charOffset": 103560, + "charLength": 8, + "snippet": { + "text": "position" + } + }, + "contextRegion": { + "startLine": 2849, + "startColumn": 117, + "charOffset": 103441, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerQuickLootCorpse(std::shared_ptr player, std::shared_ptr corpse, const Position &position) {\n\tif (!player || !corpse) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a96732b9f0f631ba8b0e63615777b5155f52b5c20246f4c1768c8ddf981c840" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2852, + "startColumn": 6, + "charOffset": 103577, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2850, + "startColumn": 6, + "charOffset": 103443, + "charLength": 1, + "snippet": { + "text": "\nvoid Game::playerQuickLootCorpse(std::shared_ptr player, std::shared_ptr corpse, const Position &position) {\n\tif (!player || !corpse) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e51addee264abcffe1411855064cdb5d1715f9df6a3d9e5d98e834d6e5bbb0b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2852, + "startColumn": 17, + "charOffset": 103588, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2850, + "startColumn": 17, + "charOffset": 103443, + "charLength": 1, + "snippet": { + "text": "\nvoid Game::playerQuickLootCorpse(std::shared_ptr player, std::shared_ptr corpse, const Position &position) {\n\tif (!player || !corpse) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fcbadfc3489abaa234b28616b29669da9116ce7c67876554b75953ee6ebb3f77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2862, + "startColumn": 2, + "charOffset": 103802, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2860, + "startColumn": 2, + "charOffset": 103771, + "charLength": 3, + "snippet": { + "text": "\tbool missedAnyItem = false;\n\n\tfor (ContainerIterator it = corpse->iterator(); it.hasNext(); it.advance()) {\n\t\tstd::shared_ptr item = *it;\n\t\tbool listed = player->isQuickLootListedItem(item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d1e683cba294fec0bbf5d40febbcd7c5469740cc521025c2558dcaad9fe52aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2862, + "startColumn": 2, + "charOffset": 103802, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2860, + "startColumn": 2, + "charOffset": 103771, + "charLength": 3, + "snippet": { + "text": "\tbool missedAnyItem = false;\n\n\tfor (ContainerIterator it = corpse->iterator(); it.hasNext(); it.advance()) {\n\t\tstd::shared_ptr item = *it;\n\t\tbool listed = player->isQuickLootListedItem(item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f90ecb97c5284c5e0a4e8d8f7f4877df06c5971b19cb2cff74f99397590ed61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2862, + "startColumn": 50, + "charOffset": 103850, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2860, + "startColumn": 50, + "charOffset": 103771, + "charLength": 2, + "snippet": { + "text": "\tbool missedAnyItem = false;\n\n\tfor (ContainerIterator it = corpse->iterator(); it.hasNext(); it.advance()) {\n\t\tstd::shared_ptr item = *it;\n\t\tbool listed = player->isQuickLootListedItem(item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f37d3c08801cab7bd1b60c31db702a78f378119980f02dd57df3467e242b134d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2917, + "startColumn": 3, + "charOffset": 105554, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2915, + "startColumn": 3, + "charOffset": 105424, + "charLength": 2, + "snippet": { + "text": "\t\tbool lootedAllGold = totalLootedGold != 0 && !missedAnyGold;\n\t\tbool lootedAllItems = totalLootedItems != 0 && !missedAnyItem;\n\t\tif (lootedAllGold) {\n\t\t\tif (totalLootedItems != 0 || missedAnyItem) {\n\t\t\t\tss << \"You looted the complete \" << totalLootedGold << \" gold\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2118b9ea71f8369938dce93ccaef14d1ea770037ea86ee8edd78af66b36f7327" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2921, + "startColumn": 5, + "charOffset": 105697, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2919, + "startColumn": 5, + "charOffset": 105624, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tss << \"You looted the complete \" << totalLootedGold << \" gold\";\n\n\t\t\t\tif (lootedAllItems) {\n\t\t\t\t\tss << \" and all dropped items\";\n\t\t\t\t} else if (totalLootedItems != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "340f70359b22bc5dd4b9bc1edf9bc009aa94334d819d79829d3cd051d50f5229" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2940, + "startColumn": 4, + "charOffset": 106258, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2938, + "startColumn": 4, + "charOffset": 106249, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (totalLootedGold != 0) {\n\t\t\t\tss << \", but you only looted \" << totalLootedGold << \" of the dropped gold\";\n\t\t\t} else if (missedAnyGold) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7567f5e62663ed01f75a082569eda522c7fe742dfbbfb704a185aabf489e0f1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2947, + "startColumn": 4, + "charOffset": 106560, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2945, + "startColumn": 4, + "charOffset": 106446, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (totalLootedGold != 0) {\n\t\t\tss << \"You only looted \" << totalLootedGold << \" of the dropped gold\";\n\t\t\tif (totalLootedItems != 0) {\n\t\t\t\tss << \" and some of the dropped items\";\n\t\t\t} else if (missedAnyItem) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0fb464b5cf051ca786a06196b3d1819d6287a719b2142b5853acfcb746d714ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "15000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2981, + "startColumn": 42, + "charOffset": 107616, + "charLength": 5, + "snippet": { + "text": "15000" + } + }, + "contextRegion": { + "startLine": 2979, + "startColumn": 42, + "charOffset": 107571, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tif (player->lastQuickLootNotification + 15000 < OTSYS_TIME()) {\n\t\tplayer->sendTextMessage(MESSAGE_GAME_HIGHLIGHT, ss.str());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9de0368666a68756ceea2c88ed6fb2168b3c2165b7f19c12fbfa5064e9654f6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'findManagedContainer' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2990, + "startColumn": 34, + "charOffset": 107862, + "charLength": 20, + "snippet": { + "text": "findManagedContainer" + } + }, + "contextRegion": { + "startLine": 2988, + "startColumn": 34, + "charOffset": 107826, + "charLength": 20, + "snippet": { + "text": "}\n\nstd::shared_ptr Game::findManagedContainer(std::shared_ptr player, bool &fallbackConsumed, ObjectCategory_t category, bool isLootContainer) {\n\tauto lootContainer = player->getManagedContainer(category, isLootContainer);\n\tif (!lootContainer && player->quickLootFallbackToMainContainer && !fallbackConsumed) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5cd02af6e3fb96472ebae55121561b8a4504886eb60290d47d8f9d4481d27785" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2990, + "startColumn": 79, + "charOffset": 107907, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 2988, + "startColumn": 79, + "charOffset": 107826, + "charLength": 6, + "snippet": { + "text": "}\n\nstd::shared_ptr Game::findManagedContainer(std::shared_ptr player, bool &fallbackConsumed, ObjectCategory_t category, bool isLootContainer) {\n\tauto lootContainer = player->getManagedContainer(category, isLootContainer);\n\tif (!lootContainer && player->quickLootFallbackToMainContainer && !fallbackConsumed) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6755c0846371b11302f76005894ea8e529c879c82d388b3ae7e4f52d452f428e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2992, + "startColumn": 6, + "charOffset": 108073, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2990, + "startColumn": 6, + "charOffset": 107829, + "charLength": 1, + "snippet": { + "text": "std::shared_ptr Game::findManagedContainer(std::shared_ptr player, bool &fallbackConsumed, ObjectCategory_t category, bool isLootContainer) {\n\tauto lootContainer = player->getManagedContainer(category, isLootContainer);\n\tif (!lootContainer && player->quickLootFallbackToMainContainer && !fallbackConsumed) {\n\t\tauto fallbackItem = player->getInventoryItem(CONST_SLOT_BACKPACK);\n\t\tauto mainBackpack = fallbackItem ? fallbackItem->getContainer() : nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7805f730f5ba26443458d539c0d4a417339ca7836f7fa494530e36f7795b248" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 2997, + "startColumn": 12, + "charOffset": 108336, + "charLength": 23, + "snippet": { + "text": "refreshManagedContainer" + } + }, + "contextRegion": { + "startLine": 2995, + "startColumn": 12, + "charOffset": 108302, + "charLength": 23, + "snippet": { + "text": "\n\t\tif (mainBackpack) {\n\t\t\tplayer->refreshManagedContainer(OBJECTCATEGORY_DEFAULT, mainBackpack, isLootContainer);\n\t\t\tplayer->sendInventoryItem(CONST_SLOT_BACKPACK, player->getInventoryItem(CONST_SLOT_BACKPACK));\n\t\t\tlootContainer = mainBackpack;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "316de7cc5647f8eb1a234c65605bbb70118b8b620aeb50598c754a465bf40940" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'findNextAvailableContainer' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3007, + "startColumn": 34, + "charOffset": 108642, + "charLength": 26, + "snippet": { + "text": "findNextAvailableContainer" + } + }, + "contextRegion": { + "startLine": 3005, + "startColumn": 34, + "charOffset": 108606, + "charLength": 26, + "snippet": { + "text": "}\n\nstd::shared_ptr Game::findNextAvailableContainer(ContainerIterator &containerIterator, std::shared_ptr &lootContainer, std::shared_ptr &lastSubContainer) {\n\twhile (containerIterator.hasNext()) {\n\t\tstd::shared_ptr cur = *containerIterator;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8bfb9332fcb91e0ee5e4bad3f6a5c81e812733f33911a655a1ed2fb711e21037" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'findNextAvailableContainer' of similar type ('std::shared_ptr &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3007, + "startColumn": 99, + "charOffset": 108707, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 3005, + "startColumn": 99, + "charOffset": 108606, + "charLength": 3, + "snippet": { + "text": "}\n\nstd::shared_ptr Game::findNextAvailableContainer(ContainerIterator &containerIterator, std::shared_ptr &lootContainer, std::shared_ptr &lastSubContainer) {\n\twhile (containerIterator.hasNext()) {\n\t\tstd::shared_ptr cur = *containerIterator;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d33c17b6e2e7d3ef4d4e58e07db9b024c70d9fd81ff901548f441f6dde4df2b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3008, + "startColumn": 2, + "charOffset": 108799, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 3006, + "startColumn": 2, + "charOffset": 108608, + "charLength": 5, + "snippet": { + "text": "\nstd::shared_ptr Game::findNextAvailableContainer(ContainerIterator &containerIterator, std::shared_ptr &lootContainer, std::shared_ptr &lastSubContainer) {\n\twhile (containerIterator.hasNext()) {\n\t\tstd::shared_ptr cur = *containerIterator;\n\t\tstd::shared_ptr subContainer = cur ? cur->getContainer() : nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26f1ab408264c8da308b730fe981c71cb85532c82b24f4fce108d7607fabf44f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'handleFallbackLogic' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3031, + "startColumn": 12, + "charOffset": 109433, + "charLength": 19, + "snippet": { + "text": "handleFallbackLogic" + } + }, + "contextRegion": { + "startLine": 3029, + "startColumn": 12, + "charOffset": 109419, + "charLength": 19, + "snippet": { + "text": "}\n\nbool Game::handleFallbackLogic(std::shared_ptr player, std::shared_ptr &lootContainer, ContainerIterator &containerIterator, const bool &fallbackConsumed) {\n\tif (fallbackConsumed || !player->quickLootFallbackToMainContainer) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad69d15ecfb125290524b429b2dd52f2abd75803f197673db7a928a8060a3f69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3031, + "startColumn": 56, + "charOffset": 109477, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3029, + "startColumn": 56, + "charOffset": 109419, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Game::handleFallbackLogic(std::shared_ptr player, std::shared_ptr &lootContainer, ContainerIterator &containerIterator, const bool &fallbackConsumed) {\n\tif (fallbackConsumed || !player->quickLootFallbackToMainContainer) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "183cccc72965acc0d2836ed30b683715829d3bb7431b2d76a4f810188a39076f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3037, + "startColumn": 6, + "charOffset": 109778, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3035, + "startColumn": 6, + "charOffset": 109687, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr fallbackItem = player->getInventoryItem(CONST_SLOT_BACKPACK);\n\tif (!fallbackItem || !fallbackItem->getContainer()) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e01cfff5b1dd3ef3f24e073f066f5c2c16596c6a34616f87f5b09b4a01a5db25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3037, + "startColumn": 23, + "charOffset": 109795, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3035, + "startColumn": 23, + "charOffset": 109687, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr fallbackItem = player->getInventoryItem(CONST_SLOT_BACKPACK);\n\tif (!fallbackItem || !fallbackItem->getContainer()) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e14cfb30f9ac5b81a411c2882d08ab285177360846f33914af6c44a7e08b77b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3047, + "startColumn": 77, + "charOffset": 110037, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 3045, + "startColumn": 77, + "charOffset": 109958, + "charLength": 4, + "snippet": { + "text": "}\n\nReturnValue Game::processMoveOrAddItemToLootContainer(std::shared_ptr item, std::shared_ptr lootContainer, uint32_t &remainderCount, std::shared_ptr player) {\n\tstd::shared_ptr moveItem = nullptr;\n\tReturnValue ret;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc054e283d0c81955d0e1abb40b379fbda855cbac6a070e3b1b69992aa39cdf7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'lootContainer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3047, + "startColumn": 110, + "charOffset": 110070, + "charLength": 13, + "snippet": { + "text": "lootContainer" + } + }, + "contextRegion": { + "startLine": 3045, + "startColumn": 110, + "charOffset": 109958, + "charLength": 13, + "snippet": { + "text": "}\n\nReturnValue Game::processMoveOrAddItemToLootContainer(std::shared_ptr item, std::shared_ptr lootContainer, uint32_t &remainderCount, std::shared_ptr player) {\n\tstd::shared_ptr moveItem = nullptr;\n\tReturnValue ret;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "632759fcb439cad3e25d4d16ec86b8e6eda8ee1ad5690183549451fba864e253" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3047, + "startColumn": 175, + "charOffset": 110135, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3045, + "startColumn": 175, + "charOffset": 109958, + "charLength": 6, + "snippet": { + "text": "}\n\nReturnValue Game::processMoveOrAddItemToLootContainer(std::shared_ptr item, std::shared_ptr lootContainer, uint32_t &remainderCount, std::shared_ptr player) {\n\tstd::shared_ptr moveItem = nullptr;\n\tReturnValue ret;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f866b387d55371e01136d4ecf067d047a0db7b07a4f7b433f188cc57b5ccebe9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'ret' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3049, + "startColumn": 14, + "charOffset": 110201, + "charLength": 3, + "snippet": { + "text": "ret" + } + }, + "contextRegion": { + "startLine": 3047, + "startColumn": 14, + "charOffset": 109961, + "charLength": 3, + "snippet": { + "text": "ReturnValue Game::processMoveOrAddItemToLootContainer(std::shared_ptr item, std::shared_ptr lootContainer, uint32_t &remainderCount, std::shared_ptr player) {\n\tstd::shared_ptr moveItem = nullptr;\n\tReturnValue ret;\n\tif (item->getParent()) {\n\t\tret = internalMoveItem(item->getParent(), lootContainer, INDEX_WHEREEVER, item, item->getItemCount(), &moveItem, 0, player, nullptr, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c80233888aae03f6a707e42cc48b276e54000d23dd6598a8cfc143d5f31c9bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3061, + "startColumn": 60, + "charOffset": 110592, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3059, + "startColumn": 60, + "charOffset": 110530, + "charLength": 6, + "snippet": { + "text": "}\n\nReturnValue Game::processLootItems(std::shared_ptr player, std::shared_ptr lootContainer, std::shared_ptr item, bool &fallbackConsumed) {\n\tstd::shared_ptr lastSubContainer = nullptr;\n\tuint32_t remainderCount = item->getItemCount();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf0721d0e55dff25eb5ca1e4fcff9a211f709a58ac055832decaa29a93669e08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3061, + "startColumn": 132, + "charOffset": 110664, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 3059, + "startColumn": 132, + "charOffset": 110530, + "charLength": 4, + "snippet": { + "text": "}\n\nReturnValue Game::processLootItems(std::shared_ptr player, std::shared_ptr lootContainer, std::shared_ptr item, bool &fallbackConsumed) {\n\tstd::shared_ptr lastSubContainer = nullptr;\n\tuint32_t remainderCount = item->getItemCount();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd342cea5fc62f2809a2898192081f0342b0f5e0b05cc59887b6381904697dc8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'ret' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3066, + "startColumn": 14, + "charOffset": 110881, + "charLength": 3, + "snippet": { + "text": "ret" + } + }, + "contextRegion": { + "startLine": 3064, + "startColumn": 14, + "charOffset": 110801, + "charLength": 3, + "snippet": { + "text": "\tContainerIterator containerIterator = lootContainer->iterator();\n\n\tReturnValue ret;\n\tdo {\n\t\tret = processMoveOrAddItemToLootContainer(item, lootContainer, remainderCount, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a45c44293ed9e4e0231841e7e0ca59dfcb37f1a9021b198bd0681805874d26f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3067, + "startColumn": 2, + "charOffset": 110887, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 3065, + "startColumn": 2, + "charOffset": 110867, + "charLength": 2, + "snippet": { + "text": "\n\tReturnValue ret;\n\tdo {\n\t\tret = processMoveOrAddItemToLootContainer(item, lootContainer, remainderCount, player);\n\t\tif (ret != RETURNVALUE_CONTAINERNOTENOUGHROOM) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47632a13e3423dacaef5dda321be337b282d1fc02b0a4faf4e03fa19aa87b197" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3067, + "startColumn": 2, + "charOffset": 110887, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 3065, + "startColumn": 2, + "charOffset": 110867, + "charLength": 2, + "snippet": { + "text": "\n\tReturnValue ret;\n\tdo {\n\t\tret = processMoveOrAddItemToLootContainer(item, lootContainer, remainderCount, player);\n\t\tif (ret != RETURNVALUE_CONTAINERNOTENOUGHROOM) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f98d70ed5daf14e73268f5bcd554dd01fcf55d22b665a9c53df7a1728fa64d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3074, + "startColumn": 7, + "charOffset": 111184, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3072, + "startColumn": 7, + "charOffset": 111052, + "charLength": 1, + "snippet": { + "text": "\n\t\tstd::shared_ptr nextContainer = findNextAvailableContainer(containerIterator, lootContainer, lastSubContainer);\n\t\tif (!nextContainer && !handleFallbackLogic(player, lootContainer, containerIterator, fallbackConsumed)) {\n\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e17aa662c356a9ae8caf6a6d3f05b93b5c46004cb27a81d1822bbc883a0d6e68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (do loop) is ID-dependent due to variable reference to 'remainderCount' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3078, + "startColumn": 11, + "charOffset": 111379, + "charLength": 14, + "snippet": { + "text": "remainderCount" + } + }, + "contextRegion": { + "startLine": 3076, + "startColumn": 11, + "charOffset": 111296, + "charLength": 14, + "snippet": { + "text": "\t\t}\n\t\tfallbackConsumed = fallbackConsumed || (nextContainer == nullptr);\n\t} while (remainderCount != 0);\n\n\treturn ret;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e57ca07d7c43a5dbbfaa355793fbe33cded8a3c0a873f9fd8cf6034a3cfaa3eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3083, + "startColumn": 71, + "charOffset": 111488, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3081, + "startColumn": 71, + "charOffset": 111415, + "charLength": 6, + "snippet": { + "text": "}\n\nReturnValue Game::internalCollectManagedItems(std::shared_ptr player, std::shared_ptr item, ObjectCategory_t category /* = OBJECTCATEGORY_DEFAULT*/, bool isLootContainer /* = true*/) {\n\tif (!player || !item) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2be2090d8cf8c1753038c8cb4ff51ab80073ea3a579971022abfc82d63ac084" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3083, + "startColumn": 101, + "charOffset": 111518, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 3081, + "startColumn": 101, + "charOffset": 111415, + "charLength": 4, + "snippet": { + "text": "}\n\nReturnValue Game::internalCollectManagedItems(std::shared_ptr player, std::shared_ptr item, ObjectCategory_t category /* = OBJECTCATEGORY_DEFAULT*/, bool isLootContainer /* = true*/) {\n\tif (!player || !item) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf43e3109c27a3e8879d6f62bbf3e4e8429a47149a58c05d5e14129fa440a64a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3084, + "startColumn": 6, + "charOffset": 111622, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3082, + "startColumn": 6, + "charOffset": 111417, + "charLength": 1, + "snippet": { + "text": "\nReturnValue Game::internalCollectManagedItems(std::shared_ptr player, std::shared_ptr item, ObjectCategory_t category /* = OBJECTCATEGORY_DEFAULT*/, bool isLootContainer /* = true*/) {\n\tif (!player || !item) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a06756fa80d162c3df510cc2726bbc700b93904b1162886d0d5120b4ef7eb99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3084, + "startColumn": 17, + "charOffset": 111633, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3082, + "startColumn": 17, + "charOffset": 111417, + "charLength": 1, + "snippet": { + "text": "\nReturnValue Game::internalCollectManagedItems(std::shared_ptr player, std::shared_ptr item, ObjectCategory_t category /* = OBJECTCATEGORY_DEFAULT*/, bool isLootContainer /* = true*/) {\n\tif (!player || !item) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aeef599f5207cd7b92e3b21b798c50daf29f459db59f0623987b055d7c8c8bda" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'uint64_t' (aka 'unsigned long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3093, + "startColumn": 13, + "charOffset": 111967, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 3091, + "startColumn": 13, + "charOffset": 111886, + "charLength": 4, + "snippet": { + "text": "\t\t\tuint64_t money = 0;\n\t\t\tif (item->getID() == ITEM_PLATINUM_COIN) {\n\t\t\t\tmoney = item->getItemCount() * 100;\n\t\t\t} else if (item->getID() == ITEM_CRYSTAL_COIN) {\n\t\t\t\tmoney = item->getItemCount() * 10000;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9638b77ebd5e00cc48bcd70c4aee999850bf620336218e225157b65f05c61ebe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3093, + "startColumn": 36, + "charOffset": 111990, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 3091, + "startColumn": 36, + "charOffset": 111886, + "charLength": 3, + "snippet": { + "text": "\t\t\tuint64_t money = 0;\n\t\t\tif (item->getID() == ITEM_PLATINUM_COIN) {\n\t\t\t\tmoney = item->getItemCount() * 100;\n\t\t\t} else if (item->getID() == ITEM_CRYSTAL_COIN) {\n\t\t\t\tmoney = item->getItemCount() * 10000;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45928db96d3991bb7c36bc0e60188c3fa18a5dcbc50702c2edd82068edc0aab7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'uint64_t' (aka 'unsigned long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3095, + "startColumn": 13, + "charOffset": 112059, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 3093, + "startColumn": 13, + "charOffset": 111955, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tmoney = item->getItemCount() * 100;\n\t\t\t} else if (item->getID() == ITEM_CRYSTAL_COIN) {\n\t\t\t\tmoney = item->getItemCount() * 10000;\n\t\t\t} else {\n\t\t\t\tmoney = item->getItemCount();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2aa204c9cdaf1a90e22647ff7ec422550213a482948a9a094ce4e9ca990ae414" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3095, + "startColumn": 36, + "charOffset": 112082, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 3093, + "startColumn": 36, + "charOffset": 111955, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tmoney = item->getItemCount() * 100;\n\t\t\t} else if (item->getID() == ITEM_CRYSTAL_COIN) {\n\t\t\t\tmoney = item->getItemCount() * 10000;\n\t\t\t} else {\n\t\t\t\tmoney = item->getItemCount();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eed9b221a8411af044cf898c41db9f8d8ebfcf0d2c1f7b3d424db617150cf9b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3101, + "startColumn": 37, + "charOffset": 112229, + "charLength": 12, + "snippet": { + "text": "getItemCount" + } + }, + "contextRegion": { + "startLine": 3099, + "startColumn": 37, + "charOffset": 112140, + "charLength": 12, + "snippet": { + "text": "\t\t\tauto parent = item->getParent();\n\t\t\tif (parent) {\n\t\t\t\tparent->removeThing(item, item->getItemCount());\n\t\t\t} else {\n\t\t\t\tg_logger().debug(\"Item has no parent\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "620612d22912c6251f2c46596b89d23e0c6a0151f0aa973c6569446de076eb05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3107, + "startColumn": 76, + "charOffset": 112479, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 3105, + "startColumn": 76, + "charOffset": 112338, + "charLength": 7, + "snippet": { + "text": "\t\t\t}\n\t\t\tplayer->setBankBalance(player->getBankBalance() + money);\n\t\t\tg_metrics().addCounter(\"balance_increase\", money, { { \"player\", player->getName() }, { \"context\", \"loot\" } });\n\t\t\treturn RETURNVALUE_NOERROR;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ccc2ecfc0d424ccd83281d7440af4d734703661eeb170223502bd2540103b483" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3114, + "startColumn": 6, + "charOffset": 112713, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3112, + "startColumn": 6, + "charOffset": 112557, + "charLength": 1, + "snippet": { + "text": "\tbool fallbackConsumed = false;\n\tstd::shared_ptr lootContainer = findManagedContainer(player, fallbackConsumed, category, isLootContainer);\n\tif (!lootContainer) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf678869fa5fd48e647a1aed099717c171704b4a430e1374b7e48ee0268cf6cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'collectRewardChestItems' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3121, + "startColumn": 19, + "charOffset": 112863, + "charLength": 23, + "snippet": { + "text": "collectRewardChestItems" + } + }, + "contextRegion": { + "startLine": 3119, + "startColumn": 19, + "charOffset": 112842, + "charLength": 23, + "snippet": { + "text": "}\n\nReturnValue Game::collectRewardChestItems(std::shared_ptr player, uint32_t maxMoveItems /* = 0*/) {\n\t// Check if have item on player reward chest\n\tstd::shared_ptr rewardChest = player->getRewardChest();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "756fd305bffea29d93cc47645984b0385ecd184ab1df4c14de75886d33740a8b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3121, + "startColumn": 67, + "charOffset": 112911, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3119, + "startColumn": 67, + "charOffset": 112842, + "charLength": 6, + "snippet": { + "text": "}\n\nReturnValue Game::collectRewardChestItems(std::shared_ptr player, uint32_t maxMoveItems /* = 0*/) {\n\t// Check if have item on player reward chest\n\tstd::shared_ptr rewardChest = player->getRewardChest();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4579dfbe8d2036705f7498966f27aea865ceccdafca1da4c91ca07766c8b5db4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3164, + "startColumn": 64, + "charOffset": 114537, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 3162, + "startColumn": 64, + "charOffset": 114471, + "charLength": 4, + "snippet": { + "text": "}\n\nObjectCategory_t Game::getObjectCategory(std::shared_ptr item) {\n\tObjectCategory_t category = OBJECTCATEGORY_DEFAULT;\n\tif (!item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40dd3d7cb7295aa3c72dab8178c1af43e96c18095ed3863a56a3f54e14764d5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3166, + "startColumn": 6, + "charOffset": 114603, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3164, + "startColumn": 6, + "charOffset": 114474, + "charLength": 1, + "snippet": { + "text": "ObjectCategory_t Game::getObjectCategory(std::shared_ptr item) {\n\tObjectCategory_t category = OBJECTCATEGORY_DEFAULT;\n\tif (!item) {\n\t\treturn OBJECTCATEGORY_NONE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e8e1bee6c819542ed22e270f96d594991957d5528ae06ae4581ac5f5c82d1e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getObjectCategory' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3180, + "startColumn": 24, + "charOffset": 114854, + "charLength": 17, + "snippet": { + "text": "getObjectCategory" + } + }, + "contextRegion": { + "startLine": 3178, + "startColumn": 24, + "charOffset": 114828, + "charLength": 17, + "snippet": { + "text": "}\n\nObjectCategory_t Game::getObjectCategory(const ItemType &it) {\n\tObjectCategory_t category = OBJECTCATEGORY_DEFAULT;\n\tif (it.weaponType != WEAPON_NONE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b12bace1dc6d88d3e9f16b24f8c7b3199590e7fe26c9beae9ad94c63908ea55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3197, + "startColumn": 4, + "charOffset": 115318, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 3195, + "startColumn": 4, + "charOffset": 115280, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\tcase WEAPON_MISSILE:\n\t\t\tcase WEAPON_DISTANCE:\n\t\t\t\tcategory = OBJECTCATEGORY_DISTANCEWEAPONS;\n\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0c04a1a6dc78740083a8c383a6f9931ef8d3a2a8b526731a6fd51f339fa339b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3210, + "startColumn": 3, + "charOffset": 115668, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 3208, + "startColumn": 3, + "charOffset": 115558, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\t} else if (it.slotPosition != SLOTP_HAND) { // if it's a weapon/shield should have been parsed earlier\n\t\tif ((it.slotPosition & SLOTP_HEAD) != 0) {\n\t\t\tcategory = OBJECTCATEGORY_HELMETS;\n\t\t} else if ((it.slotPosition & SLOTP_NECKLACE) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5e17422f52f00075d2f746db4bec1db12f6e6a3b13e6c40ebdfec6fc68ab058" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3210, + "startColumn": 24, + "charOffset": 115689, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3208, + "startColumn": 24, + "charOffset": 115558, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\t} else if (it.slotPosition != SLOTP_HAND) { // if it's a weapon/shield should have been parsed earlier\n\t\tif ((it.slotPosition & SLOTP_HEAD) != 0) {\n\t\t\tcategory = OBJECTCATEGORY_HELMETS;\n\t\t} else if ((it.slotPosition & SLOTP_NECKLACE) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fbf2867511d207afd3178acee75dfbd81a4f9a9160e69db7a511fd610a70b2c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3212, + "startColumn": 31, + "charOffset": 115779, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3210, + "startColumn": 31, + "charOffset": 115666, + "charLength": 1, + "snippet": { + "text": "\t\tif ((it.slotPosition & SLOTP_HEAD) != 0) {\n\t\t\tcategory = OBJECTCATEGORY_HELMETS;\n\t\t} else if ((it.slotPosition & SLOTP_NECKLACE) != 0) {\n\t\t\tcategory = OBJECTCATEGORY_NECKLACES;\n\t\t} else if ((it.slotPosition & SLOTP_BACKPACK) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2161e69a2d94521cb24972d3692964e1a3624e60c9dca06ec03c575670126449" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3214, + "startColumn": 31, + "charOffset": 115875, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3212, + "startColumn": 31, + "charOffset": 115749, + "charLength": 1, + "snippet": { + "text": "\t\t} else if ((it.slotPosition & SLOTP_NECKLACE) != 0) {\n\t\t\tcategory = OBJECTCATEGORY_NECKLACES;\n\t\t} else if ((it.slotPosition & SLOTP_BACKPACK) != 0) {\n\t\t\tcategory = OBJECTCATEGORY_CONTAINERS;\n\t\t} else if ((it.slotPosition & SLOTP_ARMOR) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b49d039c8609a7ff6e39ea3a160ef9699843d4f95da09dbb71bf218378f304d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3216, + "startColumn": 31, + "charOffset": 115972, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3214, + "startColumn": 31, + "charOffset": 115845, + "charLength": 1, + "snippet": { + "text": "\t\t} else if ((it.slotPosition & SLOTP_BACKPACK) != 0) {\n\t\t\tcategory = OBJECTCATEGORY_CONTAINERS;\n\t\t} else if ((it.slotPosition & SLOTP_ARMOR) != 0) {\n\t\t\tcategory = OBJECTCATEGORY_ARMORS;\n\t\t} else if ((it.slotPosition & SLOTP_LEGS) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4e637289b97f6ed43acdfd46aedfa171f714c2488421f2c8f52440e8f6e7d06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3218, + "startColumn": 31, + "charOffset": 116062, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3216, + "startColumn": 31, + "charOffset": 115942, + "charLength": 1, + "snippet": { + "text": "\t\t} else if ((it.slotPosition & SLOTP_ARMOR) != 0) {\n\t\t\tcategory = OBJECTCATEGORY_ARMORS;\n\t\t} else if ((it.slotPosition & SLOTP_LEGS) != 0) {\n\t\t\tcategory = OBJECTCATEGORY_LEGS;\n\t\t} else if ((it.slotPosition & SLOTP_FEET) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f75cbbc917c55fb9c1a444358ecfb17e990388dcb0e23d32c2c451e13f8fd3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3220, + "startColumn": 31, + "charOffset": 116149, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3218, + "startColumn": 31, + "charOffset": 116032, + "charLength": 1, + "snippet": { + "text": "\t\t} else if ((it.slotPosition & SLOTP_LEGS) != 0) {\n\t\t\tcategory = OBJECTCATEGORY_LEGS;\n\t\t} else if ((it.slotPosition & SLOTP_FEET) != 0) {\n\t\t\tcategory = OBJECTCATEGORY_BOOTS;\n\t\t} else if ((it.slotPosition & SLOTP_RING) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17a5e7214deb5ac6bb89cf4695c1736c34b66a6d97b97a70f3ec34b19db073de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3222, + "startColumn": 31, + "charOffset": 116237, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3220, + "startColumn": 31, + "charOffset": 116119, + "charLength": 1, + "snippet": { + "text": "\t\t} else if ((it.slotPosition & SLOTP_FEET) != 0) {\n\t\t\tcategory = OBJECTCATEGORY_BOOTS;\n\t\t} else if ((it.slotPosition & SLOTP_RING) != 0) {\n\t\t\tcategory = OBJECTCATEGORY_RINGS;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac2dbfaddda6e378e9f88bb415671d2256b45495797853be91ee6af78f4f33dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getItemMarketPrice' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3242, + "startColumn": 16, + "charOffset": 116798, + "charLength": 18, + "snippet": { + "text": "getItemMarketPrice" + } + }, + "contextRegion": { + "startLine": 3240, + "startColumn": 16, + "charOffset": 116780, + "charLength": 18, + "snippet": { + "text": "}\n\nuint64_t Game::getItemMarketPrice(const std::map &itemMap, bool buyPrice) const {\n\tuint64_t total = 0;\n\tfor (const auto &it : itemMap) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84687726352cb942e03db2d12207621f18de52553f573ac29f78691666bdc5a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3267, + "startColumn": 64, + "charOffset": 117575, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 3265, + "startColumn": 64, + "charOffset": 117509, + "charLength": 9, + "snippet": { + "text": "}\n\nstd::shared_ptr searchForItem(std::shared_ptr container, uint16_t itemId, bool hasTier /* = false*/, uint8_t tier /* = 0*/) {\n\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\tif ((*it)->getID() == itemId && (!hasTier || (*it)->getTier() == tier)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1dcd8fd34e6969f505afce58d8ff040fc9787ac4031b36d1991f759a9a6a1be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3268, + "startColumn": 2, + "charOffset": 117656, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3266, + "startColumn": 2, + "charOffset": 117511, + "charLength": 3, + "snippet": { + "text": "\nstd::shared_ptr searchForItem(std::shared_ptr container, uint16_t itemId, bool hasTier /* = false*/, uint8_t tier /* = 0*/) {\n\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\tif ((*it)->getID() == itemId && (!hasTier || (*it)->getTier() == tier)) {\n\t\t\treturn *it;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afce261bfffedcdcfb834776c46a679c41975d00c61e24e0514d34e8262d74b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3268, + "startColumn": 2, + "charOffset": 117656, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3266, + "startColumn": 2, + "charOffset": 117511, + "charLength": 3, + "snippet": { + "text": "\nstd::shared_ptr searchForItem(std::shared_ptr container, uint16_t itemId, bool hasTier /* = false*/, uint8_t tier /* = 0*/) {\n\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\tif ((*it)->getID() == itemId && (!hasTier || (*it)->getTier() == tier)) {\n\t\t\treturn *it;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "701b069331fbd17a2432d3d6bb9a69098d2abb67ab5489291b6b10ef4989deb2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3268, + "startColumn": 53, + "charOffset": 117707, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 3266, + "startColumn": 53, + "charOffset": 117511, + "charLength": 2, + "snippet": { + "text": "\nstd::shared_ptr searchForItem(std::shared_ptr container, uint16_t itemId, bool hasTier /* = false*/, uint8_t tier /* = 0*/) {\n\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\n\t\tif ((*it)->getID() == itemId && (!hasTier || (*it)->getTier() == tier)) {\n\t\t\treturn *it;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3face7a5b376da1f4149aa149e915956187aa821c228070ff83a01d47a7038f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3282, + "startColumn": 3, + "charOffset": 118030, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 3280, + "startColumn": 3, + "charOffset": 117985, + "charLength": 2, + "snippet": { + "text": "\t\tint32_t slotPosition = it.slotPosition;\n\n\t\tif (slotPosition & SLOTP_HEAD) {\n\t\t\tslot = CONST_SLOT_HEAD;\n\t\t} else if (slotPosition & SLOTP_NECKLACE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94dec47e5194be8ceafd587a3d4ebf97a5b02a76a9b5d2aaeb1ad0fb9328f916" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3282, + "startColumn": 7, + "charOffset": 118034, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3280, + "startColumn": 7, + "charOffset": 117985, + "charLength": 12, + "snippet": { + "text": "\t\tint32_t slotPosition = it.slotPosition;\n\n\t\tif (slotPosition & SLOTP_HEAD) {\n\t\t\tslot = CONST_SLOT_HEAD;\n\t\t} else if (slotPosition & SLOTP_NECKLACE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d69ea2a3b71fb1c8de1aaff3eee4dcbe2e448024e2b405416d9d5fab42c9003d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3282, + "startColumn": 7, + "charOffset": 118034, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3280, + "startColumn": 7, + "charOffset": 117985, + "charLength": 12, + "snippet": { + "text": "\t\tint32_t slotPosition = it.slotPosition;\n\n\t\tif (slotPosition & SLOTP_HEAD) {\n\t\t\tslot = CONST_SLOT_HEAD;\n\t\t} else if (slotPosition & SLOTP_NECKLACE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd34379aa1720b72c7cd75403569f17c482fa29b2b30cfa4379a3f320bd41b62" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3282, + "startColumn": 7, + "charOffset": 118034, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3280, + "startColumn": 7, + "charOffset": 117985, + "charLength": 12, + "snippet": { + "text": "\t\tint32_t slotPosition = it.slotPosition;\n\n\t\tif (slotPosition & SLOTP_HEAD) {\n\t\t\tslot = CONST_SLOT_HEAD;\n\t\t} else if (slotPosition & SLOTP_NECKLACE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eebc3ad883c5fb9875e9668385a0e4705cede950e81fbc9a1161f75e39c4c507" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3282, + "startColumn": 20, + "charOffset": 118047, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3280, + "startColumn": 20, + "charOffset": 117985, + "charLength": 1, + "snippet": { + "text": "\t\tint32_t slotPosition = it.slotPosition;\n\n\t\tif (slotPosition & SLOTP_HEAD) {\n\t\t\tslot = CONST_SLOT_HEAD;\n\t\t} else if (slotPosition & SLOTP_NECKLACE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3094bb1e51e1452fbd01379b7f1713cda479feed2a93ad9408c90ef9571b44fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3284, + "startColumn": 14, + "charOffset": 118103, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3282, + "startColumn": 14, + "charOffset": 118028, + "charLength": 12, + "snippet": { + "text": "\t\tif (slotPosition & SLOTP_HEAD) {\n\t\t\tslot = CONST_SLOT_HEAD;\n\t\t} else if (slotPosition & SLOTP_NECKLACE) {\n\t\t\tslot = CONST_SLOT_NECKLACE;\n\t\t} else if (slotPosition & SLOTP_ARMOR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68f1ae4f888bdbcdabc5676b1f7867c0496671256ba6c880923d0d50c028e2d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3284, + "startColumn": 14, + "charOffset": 118103, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3282, + "startColumn": 14, + "charOffset": 118028, + "charLength": 12, + "snippet": { + "text": "\t\tif (slotPosition & SLOTP_HEAD) {\n\t\t\tslot = CONST_SLOT_HEAD;\n\t\t} else if (slotPosition & SLOTP_NECKLACE) {\n\t\t\tslot = CONST_SLOT_NECKLACE;\n\t\t} else if (slotPosition & SLOTP_ARMOR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ef2c3120a2e0a696de6ead144a56c8ad82f047e25de3a68bef35534a599449a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3284, + "startColumn": 14, + "charOffset": 118103, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3282, + "startColumn": 14, + "charOffset": 118028, + "charLength": 12, + "snippet": { + "text": "\t\tif (slotPosition & SLOTP_HEAD) {\n\t\t\tslot = CONST_SLOT_HEAD;\n\t\t} else if (slotPosition & SLOTP_NECKLACE) {\n\t\t\tslot = CONST_SLOT_NECKLACE;\n\t\t} else if (slotPosition & SLOTP_ARMOR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e82734f831ac59aab640dda98b473725f24685d03954c1c9f4bae16ab89aaee4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3284, + "startColumn": 27, + "charOffset": 118116, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3282, + "startColumn": 27, + "charOffset": 118028, + "charLength": 1, + "snippet": { + "text": "\t\tif (slotPosition & SLOTP_HEAD) {\n\t\t\tslot = CONST_SLOT_HEAD;\n\t\t} else if (slotPosition & SLOTP_NECKLACE) {\n\t\t\tslot = CONST_SLOT_NECKLACE;\n\t\t} else if (slotPosition & SLOTP_ARMOR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a34a2603f149f4d2d45a0c46f196c9379ad3e3c498c6038faae402a0629bb47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3286, + "startColumn": 14, + "charOffset": 118180, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3284, + "startColumn": 14, + "charOffset": 118090, + "charLength": 12, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_NECKLACE) {\n\t\t\tslot = CONST_SLOT_NECKLACE;\n\t\t} else if (slotPosition & SLOTP_ARMOR) {\n\t\t\tslot = CONST_SLOT_ARMOR;\n\t\t} else if (slotPosition & SLOTP_LEGS) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94a4259bd435a3fd1be7951be2acd054726e79e3bc21a9c6a3422e7a156467e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3286, + "startColumn": 14, + "charOffset": 118180, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3284, + "startColumn": 14, + "charOffset": 118090, + "charLength": 12, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_NECKLACE) {\n\t\t\tslot = CONST_SLOT_NECKLACE;\n\t\t} else if (slotPosition & SLOTP_ARMOR) {\n\t\t\tslot = CONST_SLOT_ARMOR;\n\t\t} else if (slotPosition & SLOTP_LEGS) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ea4326967e8fc9dba832c61be87101e143bbf7f633b0db62ced83f1c3060d52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3286, + "startColumn": 14, + "charOffset": 118180, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3284, + "startColumn": 14, + "charOffset": 118090, + "charLength": 12, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_NECKLACE) {\n\t\t\tslot = CONST_SLOT_NECKLACE;\n\t\t} else if (slotPosition & SLOTP_ARMOR) {\n\t\t\tslot = CONST_SLOT_ARMOR;\n\t\t} else if (slotPosition & SLOTP_LEGS) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27a194e4ad4f64e19fccec65c6be983d09a8406e7d0d77d72c81a44e9a8e80d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3286, + "startColumn": 27, + "charOffset": 118193, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3284, + "startColumn": 27, + "charOffset": 118090, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_NECKLACE) {\n\t\t\tslot = CONST_SLOT_NECKLACE;\n\t\t} else if (slotPosition & SLOTP_ARMOR) {\n\t\t\tslot = CONST_SLOT_ARMOR;\n\t\t} else if (slotPosition & SLOTP_LEGS) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48f1ae2ff9cc1969d578db7173df2aef6609069e6042b020960d670903da94e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3288, + "startColumn": 14, + "charOffset": 118251, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3286, + "startColumn": 14, + "charOffset": 118167, + "charLength": 12, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_ARMOR) {\n\t\t\tslot = CONST_SLOT_ARMOR;\n\t\t} else if (slotPosition & SLOTP_LEGS) {\n\t\t\tslot = CONST_SLOT_LEGS;\n\t\t} else if (slotPosition & SLOTP_FEET) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8140850cdb640cabfacdf3acb277a96370461329b55dbb57b7bdb1a100af8960" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3288, + "startColumn": 14, + "charOffset": 118251, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3286, + "startColumn": 14, + "charOffset": 118167, + "charLength": 12, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_ARMOR) {\n\t\t\tslot = CONST_SLOT_ARMOR;\n\t\t} else if (slotPosition & SLOTP_LEGS) {\n\t\t\tslot = CONST_SLOT_LEGS;\n\t\t} else if (slotPosition & SLOTP_FEET) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1bb5ae0b16b4696f43c0d53ec599f387e346af35792d38cc57467cdd5302181b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3288, + "startColumn": 14, + "charOffset": 118251, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3286, + "startColumn": 14, + "charOffset": 118167, + "charLength": 12, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_ARMOR) {\n\t\t\tslot = CONST_SLOT_ARMOR;\n\t\t} else if (slotPosition & SLOTP_LEGS) {\n\t\t\tslot = CONST_SLOT_LEGS;\n\t\t} else if (slotPosition & SLOTP_FEET) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2601322cf1de3f2fd1fd8f4f3cff6bd2b43392e3798b2c172042f8a8fe320a33" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3288, + "startColumn": 27, + "charOffset": 118264, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3286, + "startColumn": 27, + "charOffset": 118167, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_ARMOR) {\n\t\t\tslot = CONST_SLOT_ARMOR;\n\t\t} else if (slotPosition & SLOTP_LEGS) {\n\t\t\tslot = CONST_SLOT_LEGS;\n\t\t} else if (slotPosition & SLOTP_FEET) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7bd4ee8ca5767bca3c191d2bf9532d4cc12fc18049d69414f9909a5791c374fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3290, + "startColumn": 14, + "charOffset": 118320, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3288, + "startColumn": 14, + "charOffset": 118238, + "charLength": 12, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_LEGS) {\n\t\t\tslot = CONST_SLOT_LEGS;\n\t\t} else if (slotPosition & SLOTP_FEET) {\n\t\t\tslot = CONST_SLOT_FEET;\n\t\t} else if (slotPosition & SLOTP_RING) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf41618ad4fe8c0252a99c4f4050734bf5fef742d4aca0026cd6976ec0d099db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3290, + "startColumn": 14, + "charOffset": 118320, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3288, + "startColumn": 14, + "charOffset": 118238, + "charLength": 12, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_LEGS) {\n\t\t\tslot = CONST_SLOT_LEGS;\n\t\t} else if (slotPosition & SLOTP_FEET) {\n\t\t\tslot = CONST_SLOT_FEET;\n\t\t} else if (slotPosition & SLOTP_RING) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e89908bf90f37623078655936c1941a3f02fd2cdfaee969c7e486fe44b31fe76" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3290, + "startColumn": 14, + "charOffset": 118320, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3288, + "startColumn": 14, + "charOffset": 118238, + "charLength": 12, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_LEGS) {\n\t\t\tslot = CONST_SLOT_LEGS;\n\t\t} else if (slotPosition & SLOTP_FEET) {\n\t\t\tslot = CONST_SLOT_FEET;\n\t\t} else if (slotPosition & SLOTP_RING) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "838c1a333aca1166a0909ebebf29c62bdde464b1e7275ce6ca8a8c43bb5024de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3290, + "startColumn": 27, + "charOffset": 118333, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3288, + "startColumn": 27, + "charOffset": 118238, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_LEGS) {\n\t\t\tslot = CONST_SLOT_LEGS;\n\t\t} else if (slotPosition & SLOTP_FEET) {\n\t\t\tslot = CONST_SLOT_FEET;\n\t\t} else if (slotPosition & SLOTP_RING) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "709545ad9ca48e3a3420bd48b7a38092b3f0ff7b7d234d9667567f7f389de4c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3292, + "startColumn": 14, + "charOffset": 118389, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3290, + "startColumn": 14, + "charOffset": 118307, + "charLength": 12, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_FEET) {\n\t\t\tslot = CONST_SLOT_FEET;\n\t\t} else if (slotPosition & SLOTP_RING) {\n\t\t\tslot = CONST_SLOT_RING;\n\t\t} else if (slotPosition & SLOTP_AMMO) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3031dde769fe45f6018523eafd75ee001d2473f0c951be50eade850d440284a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3292, + "startColumn": 14, + "charOffset": 118389, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3290, + "startColumn": 14, + "charOffset": 118307, + "charLength": 12, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_FEET) {\n\t\t\tslot = CONST_SLOT_FEET;\n\t\t} else if (slotPosition & SLOTP_RING) {\n\t\t\tslot = CONST_SLOT_RING;\n\t\t} else if (slotPosition & SLOTP_AMMO) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3736ce68f8304d633c4f8b00871a3e9f0d4d79fffcdada4b82993c554fd1fc9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3292, + "startColumn": 14, + "charOffset": 118389, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3290, + "startColumn": 14, + "charOffset": 118307, + "charLength": 12, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_FEET) {\n\t\t\tslot = CONST_SLOT_FEET;\n\t\t} else if (slotPosition & SLOTP_RING) {\n\t\t\tslot = CONST_SLOT_RING;\n\t\t} else if (slotPosition & SLOTP_AMMO) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1317c8e7c5a0e77c75bbb1fae13434b05907568fec85689f9d3f83b129b1bd44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3292, + "startColumn": 27, + "charOffset": 118402, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3290, + "startColumn": 27, + "charOffset": 118307, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_FEET) {\n\t\t\tslot = CONST_SLOT_FEET;\n\t\t} else if (slotPosition & SLOTP_RING) {\n\t\t\tslot = CONST_SLOT_RING;\n\t\t} else if (slotPosition & SLOTP_AMMO) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8954355f02a6aeee38793a0c9ce497dd3fdc152721a8155860a112fd124eba3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3294, + "startColumn": 14, + "charOffset": 118458, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3292, + "startColumn": 14, + "charOffset": 118376, + "charLength": 12, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_RING) {\n\t\t\tslot = CONST_SLOT_RING;\n\t\t} else if (slotPosition & SLOTP_AMMO) {\n\t\t\tslot = CONST_SLOT_AMMO;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND || slotPosition & SLOTP_LEFT) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1466e4c0944fcbd708086d7948b37a18bb02f0cc766d8f5711998cef7344ca52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3294, + "startColumn": 14, + "charOffset": 118458, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3292, + "startColumn": 14, + "charOffset": 118376, + "charLength": 12, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_RING) {\n\t\t\tslot = CONST_SLOT_RING;\n\t\t} else if (slotPosition & SLOTP_AMMO) {\n\t\t\tslot = CONST_SLOT_AMMO;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND || slotPosition & SLOTP_LEFT) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf1fabfb3c08e96e433ff01cd76db19ddd861cc5870afd0a9d1c0c63efeda880" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3294, + "startColumn": 14, + "charOffset": 118458, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3292, + "startColumn": 14, + "charOffset": 118376, + "charLength": 12, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_RING) {\n\t\t\tslot = CONST_SLOT_RING;\n\t\t} else if (slotPosition & SLOTP_AMMO) {\n\t\t\tslot = CONST_SLOT_AMMO;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND || slotPosition & SLOTP_LEFT) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "656f0d0dfb075fb2804f30b96145d7dbbeaffe98a545419b813041c45803f278" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3294, + "startColumn": 27, + "charOffset": 118471, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3292, + "startColumn": 27, + "charOffset": 118376, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_RING) {\n\t\t\tslot = CONST_SLOT_RING;\n\t\t} else if (slotPosition & SLOTP_AMMO) {\n\t\t\tslot = CONST_SLOT_AMMO;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND || slotPosition & SLOTP_LEFT) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71f4687b779a6759ceebeef446ba9278981f96629652758d635077615a8216a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3296, + "startColumn": 14, + "charOffset": 118527, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3294, + "startColumn": 14, + "charOffset": 118445, + "charLength": 12, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_AMMO) {\n\t\t\tslot = CONST_SLOT_AMMO;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND || slotPosition & SLOTP_LEFT) {\n\t\t\tslot = CONST_SLOT_LEFT;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9bb7100512e05332246c753ffa9decac5f0d95707bfbbe47e8483d73b31c7a20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3296, + "startColumn": 14, + "charOffset": 118527, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3294, + "startColumn": 14, + "charOffset": 118445, + "charLength": 12, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_AMMO) {\n\t\t\tslot = CONST_SLOT_AMMO;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND || slotPosition & SLOTP_LEFT) {\n\t\t\tslot = CONST_SLOT_LEFT;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0f6671fc4454939feb14fddaa0b2f099700ad4698b0d965cd389d1538ded108" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3296, + "startColumn": 14, + "charOffset": 118527, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3294, + "startColumn": 14, + "charOffset": 118445, + "charLength": 12, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_AMMO) {\n\t\t\tslot = CONST_SLOT_AMMO;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND || slotPosition & SLOTP_LEFT) {\n\t\t\tslot = CONST_SLOT_LEFT;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88dc9d30869c1633d8c8ba686edcae3caa9d095129633554408f3441ec33ad67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3296, + "startColumn": 27, + "charOffset": 118540, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3294, + "startColumn": 27, + "charOffset": 118445, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_AMMO) {\n\t\t\tslot = CONST_SLOT_AMMO;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND || slotPosition & SLOTP_LEFT) {\n\t\t\tslot = CONST_SLOT_LEFT;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3661a89146eb46b2342d257b8f4fb3a89bf4480f3c164f3dc55c9c39e0720c1f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3296, + "startColumn": 44, + "charOffset": 118557, + "charLength": 2, + "snippet": { + "text": "||" + } + }, + "contextRegion": { + "startLine": 3294, + "startColumn": 44, + "charOffset": 118445, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_AMMO) {\n\t\t\tslot = CONST_SLOT_AMMO;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND || slotPosition & SLOTP_LEFT) {\n\t\t\tslot = CONST_SLOT_LEFT;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84352d30972904acc4e7a3ca6dfa38f5a9d1b904f9fa9c0e3891c73238a345af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3296, + "startColumn": 47, + "charOffset": 118560, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3294, + "startColumn": 47, + "charOffset": 118445, + "charLength": 12, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_AMMO) {\n\t\t\tslot = CONST_SLOT_AMMO;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND || slotPosition & SLOTP_LEFT) {\n\t\t\tslot = CONST_SLOT_LEFT;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "953c33de4c7d8eda33bc9234fdb7cf0ab7aa5c6c764620313fe0186a1a602592" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3296, + "startColumn": 47, + "charOffset": 118560, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3294, + "startColumn": 47, + "charOffset": 118445, + "charLength": 12, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_AMMO) {\n\t\t\tslot = CONST_SLOT_AMMO;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND || slotPosition & SLOTP_LEFT) {\n\t\t\tslot = CONST_SLOT_LEFT;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e8dc0183b8dc798bf7d3801583678e05439d7fe9b473003db4aa96ab76c9496" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3296, + "startColumn": 60, + "charOffset": 118573, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3294, + "startColumn": 60, + "charOffset": 118445, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (slotPosition & SLOTP_AMMO) {\n\t\t\tslot = CONST_SLOT_AMMO;\n\t\t} else if (slotPosition & SLOTP_TWO_HAND || slotPosition & SLOTP_LEFT) {\n\t\t\tslot = CONST_SLOT_LEFT;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "062d3ab68b0ba2ef2c6489b4c416f09d3946905486a8e03f95c8a26884ae48a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'playerEquipItem' has cognitive complexity of 27 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3305, + "startColumn": 12, + "charOffset": 118695, + "charLength": 15, + "snippet": { + "text": "playerEquipItem" + } + }, + "contextRegion": { + "startLine": 3303, + "startColumn": 12, + "charOffset": 118640, + "charLength": 15, + "snippet": { + "text": "\n// Implementation of player invoked events\nvoid Game::playerEquipItem(uint32_t playerId, uint16_t itemId, bool hasTier /* = false*/, uint8_t tier /* = 0*/) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "246cd683ced0907647a3f2ac7ca00de7551acccf7be0c54c53c8f859632be9c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerEquipItem' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3305, + "startColumn": 28, + "charOffset": 118711, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 3303, + "startColumn": 28, + "charOffset": 118640, + "charLength": 8, + "snippet": { + "text": "\n// Implementation of player invoked events\nvoid Game::playerEquipItem(uint32_t playerId, uint16_t itemId, bool hasTier /* = false*/, uint8_t tier /* = 0*/) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ebdc613a69563d204976cf61b681529b122d2b1cc77fd979857f9a1fcf1e59ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3307, + "startColumn": 6, + "charOffset": 118863, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3305, + "startColumn": 6, + "charOffset": 118684, + "charLength": 1, + "snippet": { + "text": "void Game::playerEquipItem(uint32_t playerId, uint16_t itemId, bool hasTier /* = false*/, uint8_t tier /* = 0*/) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3f21aba18b9d8e649f4a09cfad44526f51ad5615ddf470b43e8bfc8da52b9ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3320, + "startColumn": 6, + "charOffset": 119167, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3318, + "startColumn": 6, + "charOffset": 119084, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = player->getInventoryItem(CONST_SLOT_BACKPACK);\n\tif (!item) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0e55c9fba39867be149bf9685feb1208228a75a8ecf4a4038fc76b624c964f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3325, + "startColumn": 6, + "charOffset": 119256, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3323, + "startColumn": 6, + "charOffset": 119189, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr backpack = item->getContainer();\n\tif (!backpack) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd581a312b7f7c54a52749bfd077fc2217d32ae975d8978df566f9ab7c08d5aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3340, + "startColumn": 2, + "charOffset": 119629, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 3338, + "startColumn": 2, + "charOffset": 119523, + "charLength": 2, + "snippet": { + "text": "\tauto equipItem = searchForItem(backpack, it.id, hasTier, tier);\n\tReturnValue ret = RETURNVALUE_NOERROR;\n\tif (slotItem && slotItem->getID() == it.id && (!it.stackable || slotItem->getItemCount() == slotItem->getStackSize() || !equipItem)) {\n\t\tret = internalMoveItem(slotItem->getParent(), player, CONST_SLOT_WHEREEVER, slotItem, slotItem->getItemCount(), nullptr);\n\t\tg_logger().debug(\"Item {} was unequipped\", slotItem->getName());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee5fa2ceff38b0e9dd1bd2906b9a5bdf66b54bec807298c2a6f66f324eacce2b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3340, + "startColumn": 122, + "charOffset": 119749, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3338, + "startColumn": 122, + "charOffset": 119523, + "charLength": 1, + "snippet": { + "text": "\tauto equipItem = searchForItem(backpack, it.id, hasTier, tier);\n\tReturnValue ret = RETURNVALUE_NOERROR;\n\tif (slotItem && slotItem->getID() == it.id && (!it.stackable || slotItem->getItemCount() == slotItem->getStackSize() || !equipItem)) {\n\t\tret = internalMoveItem(slotItem->getParent(), player, CONST_SLOT_WHEREEVER, slotItem, slotItem->getItemCount(), nullptr);\n\t\tg_logger().debug(\"Item {} was unequipped\", slotItem->getName());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e7d88f64cb12f9438c4f6d238ae9aec12482c72e5c2ad8b38cfd0c25f6d87e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3342, + "startColumn": 56, + "charOffset": 119943, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 3340, + "startColumn": 56, + "charOffset": 119628, + "charLength": 7, + "snippet": { + "text": "\tif (slotItem && slotItem->getID() == it.id && (!it.stackable || slotItem->getItemCount() == slotItem->getStackSize() || !equipItem)) {\n\t\tret = internalMoveItem(slotItem->getParent(), player, CONST_SLOT_WHEREEVER, slotItem, slotItem->getItemCount(), nullptr);\n\t\tg_logger().debug(\"Item {} was unequipped\", slotItem->getName());\n\t} else if (equipItem) {\n\t\t// Shield slot item" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "745b225338a6eb2ec78d16a71ce265307de6e43ef4c69a045b38b237f7d21af0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3355, + "startColumn": 5, + "charOffset": 120526, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 3353, + "startColumn": 5, + "charOffset": 120384, + "charLength": 1, + "snippet": { + "text": "\t\t\t// Checks if a two-handed item is being equipped in the left slot when the right slot is already occupied and move to backpack\n\t\t\tif (\n\t\t\t\t(slotPosition & SLOTP_LEFT)\n\t\t\t\t&& (slotPosition & SLOTP_TWO_HAND)\n\t\t\t\t&& rightItem" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6dd6151c0776a619a3c30fbc43f088838c8d2d18d5ed137dd7c22ae5278a351d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3355, + "startColumn": 5, + "charOffset": 120526, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 3353, + "startColumn": 5, + "charOffset": 120384, + "charLength": 1, + "snippet": { + "text": "\t\t\t// Checks if a two-handed item is being equipped in the left slot when the right slot is already occupied and move to backpack\n\t\t\tif (\n\t\t\t\t(slotPosition & SLOTP_LEFT)\n\t\t\t\t&& (slotPosition & SLOTP_TWO_HAND)\n\t\t\t\t&& rightItem" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5760003a3481ab8aa643ab0c6d6150169244c378a34adcf3bc75c821abd718be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3355, + "startColumn": 6, + "charOffset": 120527, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3353, + "startColumn": 6, + "charOffset": 120384, + "charLength": 12, + "snippet": { + "text": "\t\t\t// Checks if a two-handed item is being equipped in the left slot when the right slot is already occupied and move to backpack\n\t\t\tif (\n\t\t\t\t(slotPosition & SLOTP_LEFT)\n\t\t\t\t&& (slotPosition & SLOTP_TWO_HAND)\n\t\t\t\t&& rightItem" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cda07c247e683bf457fa0a19e0ed4917da41eaa905b015919bdaa057fe95ffa4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3355, + "startColumn": 19, + "charOffset": 120540, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3353, + "startColumn": 19, + "charOffset": 120384, + "charLength": 1, + "snippet": { + "text": "\t\t\t// Checks if a two-handed item is being equipped in the left slot when the right slot is already occupied and move to backpack\n\t\t\tif (\n\t\t\t\t(slotPosition & SLOTP_LEFT)\n\t\t\t\t&& (slotPosition & SLOTP_TWO_HAND)\n\t\t\t\t&& rightItem" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b1f74b44f3faaacb87036e99ce9a2217c56ba630b765bf29dc166d215fc8d1f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3356, + "startColumn": 8, + "charOffset": 120561, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 3354, + "startColumn": 8, + "charOffset": 120514, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (\n\t\t\t\t(slotPosition & SLOTP_LEFT)\n\t\t\t\t&& (slotPosition & SLOTP_TWO_HAND)\n\t\t\t\t&& rightItem\n\t\t\t\t&& !(it.weaponType == WEAPON_DISTANCE)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "192e2a37f99e0a99ea709bc63652b110ff96398e37e558eacbdf08aea06372ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3356, + "startColumn": 9, + "charOffset": 120562, + "charLength": 12, + "snippet": { + "text": "slotPosition" + } + }, + "contextRegion": { + "startLine": 3354, + "startColumn": 9, + "charOffset": 120514, + "charLength": 12, + "snippet": { + "text": "\t\t\tif (\n\t\t\t\t(slotPosition & SLOTP_LEFT)\n\t\t\t\t&& (slotPosition & SLOTP_TWO_HAND)\n\t\t\t\t&& rightItem\n\t\t\t\t&& !(it.weaponType == WEAPON_DISTANCE)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52ef0d4e3d031b7e831fc5ab6375949c326200c5e254d953df8c43fc8ad4882f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3356, + "startColumn": 22, + "charOffset": 120575, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3354, + "startColumn": 22, + "charOffset": 120514, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (\n\t\t\t\t(slotPosition & SLOTP_LEFT)\n\t\t\t\t&& (slotPosition & SLOTP_TWO_HAND)\n\t\t\t\t&& rightItem\n\t\t\t\t&& !(it.weaponType == WEAPON_DISTANCE)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6fbccae13a77301108d4d797e3593982db294ad9efcfebbe6eed44db483793f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Expression can be simplified" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3358, + "startColumn": 8, + "charOffset": 120617, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3356, + "startColumn": 8, + "charOffset": 120554, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t&& (slotPosition & SLOTP_TWO_HAND)\n\t\t\t\t&& rightItem\n\t\t\t\t&& !(it.weaponType == WEAPON_DISTANCE)\n\t\t\t\t&& !rightItem->isQuiver()\n\t\t\t) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5817d5308d85797e3e9ae91d415ef2dc480ef4b151b8bec6cbb3bf523e26bfa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3359, + "startColumn": 5, + "charOffset": 120657, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 3357, + "startColumn": 5, + "charOffset": 120593, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t&& rightItem\n\t\t\t\t&& !(it.weaponType == WEAPON_DISTANCE)\n\t\t\t\t&& !rightItem->isQuiver()\n\t\t\t) {\n\t\t\t\tret = internalCollectManagedItems(player, rightItem, getObjectCategory(rightItem), false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff05e47dc03b0117cc809ae77d1cd274a34d2cd2d6efa5af43946484de5683a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3366, + "startColumn": 68, + "charOffset": 120998, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 3364, + "startColumn": 68, + "charOffset": 120791, + "charLength": 7, + "snippet": { + "text": "\t\t\tif (slotItem) {\n\t\t\t\tret = internalMoveItem(slotItem->getParent(), player, INDEX_WHEREEVER, slotItem, slotItem->getItemCount(), nullptr);\n\t\t\t\tg_logger().debug(\"Item {} was moved back to player\", slotItem->getName());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4db25235f787c55e54fabbad608590587b5cbea5122a1ea388f96cd2f91c030e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3371, + "startColumn": 57, + "charOffset": 121221, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 3369, + "startColumn": 57, + "charOffset": 121016, + "charLength": 7, + "snippet": { + "text": "\t\t\tret = internalMoveItem(equipItem->getParent(), player, slot, equipItem, equipItem->getItemCount(), nullptr);\n\t\t\tif (ret == RETURNVALUE_NOERROR) {\n\t\t\t\tg_logger().debug(\"Item {} was equipped\", equipItem->getName());\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0afe53f2aac8e720b257dfc944c6a93025cd26edd0b944edf694ab028b04f345" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3383, + "startColumn": 6, + "charOffset": 121449, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3381, + "startColumn": 6, + "charOffset": 121321, + "charLength": 1, + "snippet": { + "text": "void Game::playerMove(uint32_t playerId, Direction direction) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25c2350649208d9d7b3188ab43e1a7edb9b4ae6f2ab30d514016c9157174708c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3396, + "startColumn": 6, + "charOffset": 121770, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3394, + "startColumn": 6, + "charOffset": 121637, + "charLength": 1, + "snippet": { + "text": "void Game::forcePlayerMove(uint32_t playerId, Direction direction) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4da0ed592e5c6f1c5c283ce93bc0fe15c35376d9afebaa6a11266195004747b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'playerBroadcastMessage' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3407, + "startColumn": 12, + "charOffset": 121968, + "charLength": 22, + "snippet": { + "text": "playerBroadcastMessage" + } + }, + "contextRegion": { + "startLine": 3405, + "startColumn": 12, + "charOffset": 121954, + "charLength": 22, + "snippet": { + "text": "}\n\nbool Game::playerBroadcastMessage(std::shared_ptr player, const std::string &text) const {\n\tif (!player->hasFlag(PlayerFlags_t::CanBroadcast)) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c69637f272a551795e8e1ee75fa3afe380700e02c93379f03e09d04e30c66c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3407, + "startColumn": 59, + "charOffset": 122015, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 3405, + "startColumn": 59, + "charOffset": 121954, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Game::playerBroadcastMessage(std::shared_ptr player, const std::string &text) const {\n\tif (!player->hasFlag(PlayerFlags_t::CanBroadcast)) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52b288085f878391ce59a6e24a4e1726bd867f24cb6680fdf15115ace79c7413" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3412, + "startColumn": 48, + "charOffset": 122177, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 3410, + "startColumn": 48, + "charOffset": 122126, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tg_logger().info(\"{} broadcasted: {}\", player->getName(), text);\n\n\tfor (const auto &it : players) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c15154a2bc1b08367ccfc4310b7f721ad43bc6cd2074c027f390154bdd9d3f5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3423, + "startColumn": 6, + "charOffset": 122441, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3421, + "startColumn": 6, + "charOffset": 122318, + "charLength": 1, + "snippet": { + "text": "void Game::playerCreatePrivateChannel(uint32_t playerId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || !player->isPremium()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf678869fa5fd48e647a1aed099717c171704b4a430e1374b7e48ee0268cf6cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3428, + "startColumn": 6, + "charOffset": 122567, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3426, + "startColumn": 6, + "charOffset": 122489, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto &channel = g_chat().createChannel(player, CHANNEL_PRIVATE);\n\tif (!channel || !channel->addUser(player)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eac2c3f6d9d2484a9ec1703256bff4a7a90b9bf4972bd7732b86957901910b42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3428, + "startColumn": 18, + "charOffset": 122579, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3426, + "startColumn": 18, + "charOffset": 122489, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto &channel = g_chat().createChannel(player, CHANNEL_PRIVATE);\n\tif (!channel || !channel->addUser(player)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62cfea2eaf087f105f3f0f617409409f742f84dc11ed0d3222631d012c2fbd70" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3437, + "startColumn": 6, + "charOffset": 122839, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3435, + "startColumn": 6, + "charOffset": 122698, + "charLength": 1, + "snippet": { + "text": "void Game::playerChannelInvite(uint32_t playerId, const std::string &name) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61f74bd474b8f7dc49f3ef10d15e0cc8061208e1d5aaccc7ce42f8c4259f3e91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3442, + "startColumn": 6, + "charOffset": 122928, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3440, + "startColumn": 6, + "charOffset": 122863, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto &channel = g_chat().getPrivateChannel(player);\n\tif (!channel) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "278f249c0d5d44a8de94915be732a9f458045b989499cf47822eb19a7975f0b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3447, + "startColumn": 6, + "charOffset": 123022, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3445, + "startColumn": 6, + "charOffset": 122953, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr invitePlayer = getPlayerByName(name);\n\tif (!invitePlayer) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42fcc18530a77eced2911553e09fd6fc35e7561998afbd821a4108d025dd843a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3460, + "startColumn": 6, + "charOffset": 123289, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3458, + "startColumn": 6, + "charOffset": 123147, + "charLength": 1, + "snippet": { + "text": "void Game::playerChannelExclude(uint32_t playerId, const std::string &name) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e51addee264abcffe1411855064cdb5d1715f9df6a3d9e5d98e834d6e5bbb0b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3465, + "startColumn": 6, + "charOffset": 123378, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3463, + "startColumn": 6, + "charOffset": 123313, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto &channel = g_chat().getPrivateChannel(player);\n\tif (!channel) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98ee060ac05aa5329faa6de435e050976b656fd4ea79a369464561f634427bfb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3470, + "startColumn": 6, + "charOffset": 123473, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3468, + "startColumn": 6, + "charOffset": 123403, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr excludePlayer = getPlayerByName(name);\n\tif (!excludePlayer) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79e6ddff163b560642fd4d9493fcc36b80c1cb7b50c39af2ba5371393224c44e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3483, + "startColumn": 6, + "charOffset": 123720, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3481, + "startColumn": 6, + "charOffset": 123602, + "charLength": 1, + "snippet": { + "text": "void Game::playerRequestChannels(uint32_t playerId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8764002b1f3ebe46e29696daadc0b05683cb99cd48e64b53e40d77ff02ec7da1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerOpenChannel' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3490, + "startColumn": 30, + "charOffset": 123808, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 3488, + "startColumn": 30, + "charOffset": 123776, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerOpenChannel(uint32_t playerId, uint16_t channelId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b647941ebb1bb69e2fc4642f86d1a487cb1e8a083becd00615abf55c063fff2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3492, + "startColumn": 6, + "charOffset": 123913, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3490, + "startColumn": 6, + "charOffset": 123779, + "charLength": 1, + "snippet": { + "text": "void Game::playerOpenChannel(uint32_t playerId, uint16_t channelId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16b77dcbd9a7b114b431c3ee37a3f2e23612b119b952c92d1b1c0eef1a0a0f96" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3497, + "startColumn": 6, + "charOffset": 124012, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3495, + "startColumn": 6, + "charOffset": 123937, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto &channel = g_chat().addUserToChannel(player, channelId);\n\tif (!channel) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55301a0e77a6c8d1be561adce21515a21bcb42711d367017beda280f0fe80252" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'users' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3502, + "startColumn": 18, + "charOffset": 124117, + "charLength": 5, + "snippet": { + "text": "users" + } + }, + "contextRegion": { + "startLine": 3500, + "startColumn": 18, + "charOffset": 124037, + "charLength": 5, + "snippet": { + "text": "\n\tconst InvitedMap* invitedUsers = channel->getInvitedUsers();\n\tconst UsersMap* users;\n\tif (!channel->isPublicChannel()) {\n\t\tusers = &channel->getUsers();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f41ac514233b8e149b778ab589a23ac24b528def3e0ce3150c0e0c30f15e9e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3503, + "startColumn": 6, + "charOffset": 124129, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3501, + "startColumn": 6, + "charOffset": 124038, + "charLength": 1, + "snippet": { + "text": "\tconst InvitedMap* invitedUsers = channel->getInvitedUsers();\n\tconst UsersMap* users;\n\tif (!channel->isPublicChannel()) {\n\t\tusers = &channel->getUsers();\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09b51d754b45baae57088cf4c227a2c4f70fd8769c4e86063d6925f2d52cc958" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerCloseChannel' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3512, + "startColumn": 31, + "charOffset": 124339, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 3510, + "startColumn": 31, + "charOffset": 124306, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerCloseChannel(uint32_t playerId, uint16_t channelId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b414de2680ee308d2576916e775c6bb387123dc3039c4f49cab39ab7d6a80aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3514, + "startColumn": 6, + "charOffset": 124444, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3512, + "startColumn": 6, + "charOffset": 124309, + "charLength": 1, + "snippet": { + "text": "void Game::playerCloseChannel(uint32_t playerId, uint16_t channelId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "197d1943bb19b845eb5bbc5e879e305f0387d6971f9f6a093dba536102fe128d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3518, + "startColumn": 11, + "charOffset": 124479, + "charLength": 21, + "snippet": { + "text": "removeUserFromChannel" + } + }, + "contextRegion": { + "startLine": 3516, + "startColumn": 11, + "charOffset": 124465, + "charLength": 21, + "snippet": { + "text": "\t}\n\n\tg_chat().removeUserFromChannel(player, channelId);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "864d1bc60beacd01a9efcae5c6a488720bc80101ac868f3c851bcba423a3082b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3523, + "startColumn": 6, + "charOffset": 124668, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3521, + "startColumn": 6, + "charOffset": 124524, + "charLength": 1, + "snippet": { + "text": "void Game::playerOpenPrivateChannel(uint32_t playerId, std::string &receiver) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1bd0ea20c070ffc84ea604635fb4f5c83983b73ab33c8bcdcfb9eb8db9f3dc0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3542, + "startColumn": 6, + "charOffset": 125123, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3540, + "startColumn": 6, + "charOffset": 125017, + "charLength": 1, + "snippet": { + "text": "void Game::playerCloseNpcChannel(uint32_t playerId) {\n\tconst auto &player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "577269ffca2f01df056fbffa02f3aa1d4038bb83975f1b02ade43546f12a185a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3553, + "startColumn": 6, + "charOffset": 125419, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3551, + "startColumn": 6, + "charOffset": 125305, + "charLength": 1, + "snippet": { + "text": "void Game::playerReceivePing(uint32_t playerId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca3d3facb50843e43fc367fe7910e387ea338e39b8902b908258d88e8bbf189a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3562, + "startColumn": 6, + "charOffset": 125589, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3560, + "startColumn": 6, + "charOffset": 125471, + "charLength": 1, + "snippet": { + "text": "void Game::playerReceivePingBack(uint32_t playerId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ccc06374efccd668969284a78bacbe273e54be6804d8bf02ea30ac586e4f4e9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerAutoWalk' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3569, + "startColumn": 27, + "charOffset": 125668, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 3567, + "startColumn": 27, + "charOffset": 125639, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerAutoWalk(uint32_t playerId, const std::vector &listDir) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b00a2077530d57f79b255bb9ecde0934718be335b578e4f194a60c11e0c0e9d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3571, + "startColumn": 6, + "charOffset": 125792, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3569, + "startColumn": 6, + "charOffset": 125642, + "charLength": 1, + "snippet": { + "text": "void Game::playerAutoWalk(uint32_t playerId, const std::vector &listDir) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9be44861485a6fcd663f9289f0f8a9fb1b4b32c1a270fa0935f70059fc88184a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'forcePlayerAutoWalk' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3580, + "startColumn": 32, + "charOffset": 125952, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 3578, + "startColumn": 32, + "charOffset": 125918, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::forcePlayerAutoWalk(uint32_t playerId, const std::vector &listDir) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c24afa8f1aee6f58089811242d2ee7d182e1086d4eea3a43fdde95138a0bd50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3582, + "startColumn": 6, + "charOffset": 126076, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3580, + "startColumn": 6, + "charOffset": 125921, + "charLength": 1, + "snippet": { + "text": "void Game::forcePlayerAutoWalk(uint32_t playerId, const std::vector &listDir) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9875deb24f697f8f800186916d75f6225eab7657554524cb57c328cb200b2014" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3589, + "startColumn": 10, + "charOffset": 126166, + "charLength": 17, + "snippet": { + "text": "setFollowCreature" + } + }, + "contextRegion": { + "startLine": 3587, + "startColumn": 10, + "charOffset": 126127, + "charLength": 17, + "snippet": { + "text": "\n\tplayer->sendCancelTarget();\n\tplayer->setFollowCreature(nullptr);\n\n\tplayer->resetIdleTime();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac0fe522a16492f98b1b83533e626b960bf07e06517102ca517ac06dbc1016e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3599, + "startColumn": 6, + "charOffset": 126414, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3597, + "startColumn": 6, + "charOffset": 126299, + "charLength": 1, + "snippet": { + "text": "void Game::playerStopAutoWalk(uint32_t playerId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6dd6151c0776a619a3c30fbc43f088838c8d2d18d5ed137dd7c22ae5278a351d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'playerUseItemEx' has cognitive complexity of 61 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3606, + "startColumn": 12, + "charOffset": 126474, + "charLength": 15, + "snippet": { + "text": "playerUseItemEx" + } + }, + "contextRegion": { + "startLine": 3604, + "startColumn": 12, + "charOffset": 126460, + "charLength": 15, + "snippet": { + "text": "}\n\nvoid Game::playerUseItemEx(uint32_t playerId, const Position &fromPos, uint8_t fromStackPos, uint16_t fromItemId, const Position &toPos, uint8_t toStackPos, uint16_t toItemId) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tstd::shared_ptr player = getPlayerByID(playerId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3879913f9d6ecf8d8efaf7848a2c40ee19abc6aa2c2bfe9cc0f4f8d863bd3a9b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3607, + "startColumn": 34, + "charOffset": 126674, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 3605, + "startColumn": 34, + "charOffset": 126462, + "charLength": 15, + "snippet": { + "text": "\nvoid Game::playerUseItemEx(uint32_t playerId, const Position &fromPos, uint8_t fromStackPos, uint16_t fromItemId, const Position &toPos, uint8_t toStackPos, uint16_t toItemId) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3decc0c37dc0762e5a9721234625ac30741cfd0663ca6ec2645eb4baeee77af4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3609, + "startColumn": 6, + "charOffset": 126756, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3607, + "startColumn": 6, + "charOffset": 126641, + "charLength": 1, + "snippet": { + "text": "\tmetrics::method_latency measure(__METHOD_NAME__);\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "778780994d56808a95497fec9241661f780c7e63c92f61267146e497819d39a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3613, + "startColumn": 32, + "charOffset": 126812, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 3611, + "startColumn": 32, + "charOffset": 126777, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tbool isHotkey = (fromPos.x == 0xFFFF && fromPos.y == 0 && fromPos.z == 0);\n\tif (isHotkey && !g_configManager().getBoolean(AIMBOT_HOTKEY_ENABLED, __FUNCTION__)) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86e0847ef2bf20f97683ad4ff3790727476728f85e99d815d4d291c6df5afeff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3619, + "startColumn": 6, + "charOffset": 127077, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3617, + "startColumn": 6, + "charOffset": 126957, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr thing = internalGetThing(player, fromPos, fromStackPos, fromItemId, STACKPOS_FIND_THING);\n\tif (!thing) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7667c4b9aab1e055fa864e66249dc4eef3c4e136e6928ace062ab87ebb56953d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3625, + "startColumn": 6, + "charOffset": 127208, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3623, + "startColumn": 6, + "charOffset": 127154, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = thing->getItem();\n\tif (!item || !item->isMultiUse() || item->getID() != fromItemId) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_CANNOTUSETHISOBJECT);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4818148e712544cbc4bfdd48fdfe9d55ad87039a85faa891592199696850e588" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3631, + "startColumn": 2, + "charOffset": 127511, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 3629, + "startColumn": 2, + "charOffset": 127346, + "charLength": 2, + "snippet": { + "text": "\n\tbool canUseHouseItem = !g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, __FUNCTION__) || InternalGame::playerCanUseItemOnHouseTile(player, item);\n\tif (!canUseHouseItem && item->hasOwner() && !item->isOwner(player)) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_ITEMISNOTYOURS);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a68b3982f85aa1d58f8d61b3915b8d1f7260bb8fd4c097ea3dbf2ff67dbe6a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3634, + "startColumn": 4, + "charOffset": 127651, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 3632, + "startColumn": 4, + "charOffset": 127581, + "charLength": 4, + "snippet": { + "text": "\t\tplayer->sendCancelMessage(RETURNVALUE_ITEMISNOTYOURS);\n\t\treturn;\n\t} else if (!canUseHouseItem) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_CANNOTUSETHISOBJECT);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1559a322a492b1773d248fa2749505b5cfe1e8b58afa4326e8bec704622f3c17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3661, + "startColumn": 21, + "charOffset": 128374, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 3659, + "startColumn": 21, + "charOffset": 128313, + "charLength": 6, + "snippet": { + "text": "\t\t\tuint8_t itemStackPos = fromStackPos;\n\n\t\t\tif (fromPos.x != 0xFFFF && toPos.x != 0xFFFF && Position::areInRange<1, 1, 0>(fromPos, player->getPosition()) && !Position::areInRange<1, 1, 0>(fromPos, toPos)) {\n\t\t\t\tstd::shared_ptr moveItem = nullptr;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59605c773e4a0b782f325b22d44dfbed7418136390589ec0b2221959a91fbc02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3661, + "startColumn": 42, + "charOffset": 128395, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 3659, + "startColumn": 42, + "charOffset": 128313, + "charLength": 6, + "snippet": { + "text": "\t\t\tuint8_t itemStackPos = fromStackPos;\n\n\t\t\tif (fromPos.x != 0xFFFF && toPos.x != 0xFFFF && Position::areInRange<1, 1, 0>(fromPos, player->getPosition()) && !Position::areInRange<1, 1, 0>(fromPos, toPos)) {\n\t\t\t\tstd::shared_ptr moveItem = nullptr;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75e5e0e5494a06d2809fe4fa3e2e74ca56339de80585373c880a70afa3d13279" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3679, + "startColumn": 6, + "charOffset": 129206, + "charLength": 3, + "snippet": { + "text": "400" + } + }, + "contextRegion": { + "startLine": 3677, + "startColumn": 6, + "charOffset": 129149, + "charLength": 3, + "snippet": { + "text": "\n\t\t\t\tstd::shared_ptr task = createPlayerTask(\n\t\t\t\t\t400, [this, playerId, itemPos, itemStackPos, fromItemId, toPos, toStackPos, toItemId] { playerUseItemEx(playerId, itemPos, itemStackPos, fromItemId, toPos, toStackPos, toItemId); }, \"Game::playerUseItemEx\"\n\t\t\t\t);\n\t\t\t\tif (it.isRune() || it.type == ITEM_TYPE_POTION) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "341596dab583024f52671a6d5bce2c99aa11dca453755a0f2490e6238201e57f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3737, + "startColumn": 14, + "charOffset": 131097, + "charLength": 9, + "snippet": { + "text": "useItemEx" + } + }, + "contextRegion": { + "startLine": 3735, + "startColumn": 14, + "charOffset": 131080, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tg_actions().useItemEx(player, fromPos, toPos, toStackPos, item, isHotkey);\n\n\tif (mustReloadDepotSearch) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6735bb77bdacd66d7433077c421690cf9d89c949bfccce08ead48aed97949213" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'playerUseItem' has cognitive complexity of 40 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3744, + "startColumn": 12, + "charOffset": 131268, + "charLength": 13, + "snippet": { + "text": "playerUseItem" + } + }, + "contextRegion": { + "startLine": 3742, + "startColumn": 12, + "charOffset": 131254, + "charLength": 13, + "snippet": { + "text": "}\n\nvoid Game::playerUseItem(uint32_t playerId, const Position &pos, uint8_t stackPos, uint8_t index, uint16_t itemId) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tstd::shared_ptr player = getPlayerByID(playerId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47034815359f06de2afd1f1e94dd532d423d9822a5ef891d32f0d3a2db57a1fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3745, + "startColumn": 34, + "charOffset": 131407, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 3743, + "startColumn": 34, + "charOffset": 131256, + "charLength": 15, + "snippet": { + "text": "\nvoid Game::playerUseItem(uint32_t playerId, const Position &pos, uint8_t stackPos, uint8_t index, uint16_t itemId) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a835e6863f5e249e464f72efb6a0f09853336d3a5b08684e2241970398a6b3dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3747, + "startColumn": 6, + "charOffset": 131489, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3745, + "startColumn": 6, + "charOffset": 131374, + "charLength": 1, + "snippet": { + "text": "\tmetrics::method_latency measure(__METHOD_NAME__);\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad7c56645858af14006be38ac39cde5afcd6d0aa8c284ea49826a31afd13a0cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3751, + "startColumn": 28, + "charOffset": 131541, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 3749, + "startColumn": 28, + "charOffset": 131510, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tbool isHotkey = (pos.x == 0xFFFF && pos.y == 0 && pos.z == 0);\n\tif (isHotkey && !g_configManager().getBoolean(AIMBOT_HOTKEY_ENABLED, __FUNCTION__)) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09f27d29d4e3d15aac9bf5cde29334f521891d25a73823af2156e13bda033ebf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3757, + "startColumn": 6, + "charOffset": 131786, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3755, + "startColumn": 6, + "charOffset": 131678, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr thing = internalGetThing(player, pos, stackPos, itemId, STACKPOS_FIND_THING);\n\tif (!thing) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efd67df7333f27fbadcc870674894656630d03fc62752ed1bb655a837e0579c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3763, + "startColumn": 6, + "charOffset": 131917, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3761, + "startColumn": 6, + "charOffset": 131863, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = thing->getItem();\n\tif (!item || item->isMultiUse() || item->getID() != itemId) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_CANNOTUSETHISOBJECT);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6bb0f6891503d25b5592eb6972686ccfabdcabaad17f8ee002ccab7168fb9a64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3769, + "startColumn": 2, + "charOffset": 132215, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 3767, + "startColumn": 2, + "charOffset": 132050, + "charLength": 2, + "snippet": { + "text": "\n\tbool canUseHouseItem = !g_configManager().getBoolean(ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, __FUNCTION__) || InternalGame::playerCanUseItemOnHouseTile(player, item);\n\tif (!canUseHouseItem && item->hasOwner() && !item->isOwner(player)) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_ITEMISNOTYOURS);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d141e89314a1153b2a20911d6c292d7cbaac7b4d69de872fe195c31ce47d9d95" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3772, + "startColumn": 4, + "charOffset": 132355, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 3770, + "startColumn": 4, + "charOffset": 132285, + "charLength": 4, + "snippet": { + "text": "\t\tplayer->sendCancelMessage(RETURNVALUE_ITEMISNOTYOURS);\n\t\treturn;\n\t} else if (!canUseHouseItem) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_CANNOTUSETHISOBJECT);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89dc535dd20716d6002ec69e28672fda5cbe0e9ef66f0c6458948a45c1cb80aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3793, + "startColumn": 6, + "charOffset": 133087, + "charLength": 3, + "snippet": { + "text": "400" + } + }, + "contextRegion": { + "startLine": 3791, + "startColumn": 6, + "charOffset": 133030, + "charLength": 3, + "snippet": { + "text": "\n\t\t\t\tstd::shared_ptr task = createPlayerTask(\n\t\t\t\t\t400, [this, playerId, pos, stackPos, index, itemId] { playerUseItem(playerId, pos, stackPos, index, itemId); }, \"Game::playerUseItem\"\n\t\t\t\t);\n\t\t\t\tif (it.isRune() || it.type == ITEM_TYPE_POTION) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fde8b5194010e64bb9d71a277a96e029a4a358f692e1b186c626ad65f7f9abba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3840, + "startColumn": 14, + "charOffset": 134425, + "charLength": 7, + "snippet": { + "text": "useItem" + } + }, + "contextRegion": { + "startLine": 3838, + "startColumn": 14, + "charOffset": 134408, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tg_actions().useItem(player, pos, index, item, isHotkey);\n\n\tif (refreshDepotSearch) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6735bb77bdacd66d7433077c421690cf9d89c949bfccce08ead48aed97949213" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'playerUseWithCreature' has cognitive complexity of 67 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3847, + "startColumn": 12, + "charOffset": 134567, + "charLength": 21, + "snippet": { + "text": "playerUseWithCreature" + } + }, + "contextRegion": { + "startLine": 3845, + "startColumn": 12, + "charOffset": 134553, + "charLength": 21, + "snippet": { + "text": "}\n\nvoid Game::playerUseWithCreature(uint32_t playerId, const Position &fromPos, uint8_t fromStackPos, uint32_t creatureId, uint16_t itemId) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tstd::shared_ptr player = getPlayerByID(playerId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "443aefea28c8ad76e0cf1e76b75e2c754a3fa2b4222765a319281f8450302bd2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3848, + "startColumn": 34, + "charOffset": 134728, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 3846, + "startColumn": 34, + "charOffset": 134555, + "charLength": 15, + "snippet": { + "text": "\nvoid Game::playerUseWithCreature(uint32_t playerId, const Position &fromPos, uint8_t fromStackPos, uint32_t creatureId, uint16_t itemId) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ffcb4e0b22ce8383bdc05bb1ad8e7443b30405e94077c2e04e39f83b4275be9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3850, + "startColumn": 6, + "charOffset": 134810, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3848, + "startColumn": 6, + "charOffset": 134695, + "charLength": 1, + "snippet": { + "text": "\tmetrics::method_latency measure(__METHOD_NAME__);\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4828ab0aeed9ffe708dbb19312345a690c59af2aad5a197fb1b7b0ea4a1676e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3855, + "startColumn": 6, + "charOffset": 134907, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3853, + "startColumn": 6, + "charOffset": 134834, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr creature = getCreatureByID(creatureId);\n\tif (!creature) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3e8d865d1ad32aa694fd52b028a5a2daa30265f0701578b87ec026b25b0077f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3859, + "startColumn": 28, + "charOffset": 134961, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 3857, + "startColumn": 28, + "charOffset": 134930, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!Position::areInRange<7, 5, 0>(creature->getPosition(), player->getPosition())) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "befeaa4f8fd621c7147fa14c4450ed22f857b11b491c5fe8bd5288548a9544dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3859, + "startColumn": 31, + "charOffset": 134964, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 3857, + "startColumn": 31, + "charOffset": 134930, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!Position::areInRange<7, 5, 0>(creature->getPosition(), player->getPosition())) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8576bbc045bc206d6ce5c4c0efbc15587e4cc516d51676cf48203694ae66208" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3863, + "startColumn": 32, + "charOffset": 135066, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 3861, + "startColumn": 32, + "charOffset": 135031, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tbool isHotkey = (fromPos.x == 0xFFFF && fromPos.y == 0 && fromPos.z == 0);\n\tif (!g_configManager().getBoolean(AIMBOT_HOTKEY_ENABLED, __FUNCTION__)) {\n\t\tif (creature->getPlayer() || isHotkey) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e517142bcb7a49f9bfb92db5847d3fd1d0470f0a5cedd6c1ea065206e3c78ff4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3872, + "startColumn": 6, + "charOffset": 135424, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3870, + "startColumn": 6, + "charOffset": 135308, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr thing = internalGetThing(player, fromPos, fromStackPos, itemId, STACKPOS_FIND_THING);\n\tif (!thing) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5082011314ae9ba1c24192b96ec1873ff2b1035f47aa9ec33cb68aee1c29d769" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3878, + "startColumn": 6, + "charOffset": 135555, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3876, + "startColumn": 6, + "charOffset": 135501, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = thing->getItem();\n\tif (!item || !item->isMultiUse() || item->getID() != itemId) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_CANNOTUSETHISOBJECT);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb464928d11fa91d5a4796a061d47337387052fc0a003213fb50dec190dd5b84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3891, + "startColumn": 8, + "charOffset": 136053, + "charLength": 5, + "snippet": { + "text": "house" + } + }, + "contextRegion": { + "startLine": 3889, + "startColumn": 8, + "charOffset": 135898, + "charLength": 5, + "snippet": { + "text": "\t\tif (std::shared_ptr houseTile = std::dynamic_pointer_cast(item->getTile())) {\n\t\t\tconst auto &house = houseTile->getHouse();\n\t\t\tif (house && item->getRealParent() && item->getRealParent() != player && (!house->isInvited(player) || house->getHouseAccessLevel(player) == HOUSE_GUEST)) {\n\t\t\t\tplayer->sendCancelMessage(RETURNVALUE_CANNOTUSETHISOBJECT);\n\t\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f90768d6d1e0aaa3c32c2a9a9599fddb9ade4160a7490c6baad669b547023a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3891, + "startColumn": 78, + "charOffset": 136123, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3889, + "startColumn": 78, + "charOffset": 135898, + "charLength": 1, + "snippet": { + "text": "\t\tif (std::shared_ptr houseTile = std::dynamic_pointer_cast(item->getTile())) {\n\t\t\tconst auto &house = houseTile->getHouse();\n\t\t\tif (house && item->getRealParent() && item->getRealParent() != player && (!house->isInvited(player) || house->getHouseAccessLevel(player) == HOUSE_GUEST)) {\n\t\t\t\tplayer->sendCancelMessage(RETURNVALUE_CANNOTUSETHISOBJECT);\n\t\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "594417e816fa2c739bd09617658601343366eafd71d95c3ee3012072102d729b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3933, + "startColumn": 21, + "charOffset": 137484, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 3931, + "startColumn": 21, + "charOffset": 137423, + "charLength": 6, + "snippet": { + "text": "\t\t\tuint8_t itemStackPos = fromStackPos;\n\n\t\t\tif (fromPos.x != 0xFFFF && Position::areInRange<1, 1, 0>(fromPos, player->getPosition()) && !Position::areInRange<1, 1, 0>(fromPos, toPos)) {\n\t\t\t\tstd::shared_ptr moveItem = nullptr;\n\t\t\t\tret = internalMoveItem(item->getParent(), player, INDEX_WHEREEVER, item, item->getItemCount(), &moveItem);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5dcba670d78beaec42245d62582c8bfd17355f9714286411b222e76ef2d3bd76" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3950, + "startColumn": 6, + "charOffset": 138294, + "charLength": 3, + "snippet": { + "text": "400" + } + }, + "contextRegion": { + "startLine": 3948, + "startColumn": 6, + "charOffset": 138237, + "charLength": 3, + "snippet": { + "text": "\n\t\t\t\tstd::shared_ptr task = createPlayerTask(\n\t\t\t\t\t400, [this, playerId, itemPos, itemStackPos, creatureId, itemId] {\n\t\t\t\t\t\tplayerUseWithCreature(playerId, itemPos, itemStackPos, creatureId, itemId);\n\t\t\t\t\t}," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b7b08343523f49652db8e6ce655319f516434e0df722cf5d6fe3b3db19aad5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3999, + "startColumn": 14, + "charOffset": 139685, + "charLength": 9, + "snippet": { + "text": "useItemEx" + } + }, + "contextRegion": { + "startLine": 3997, + "startColumn": 14, + "charOffset": 139668, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tg_actions().useItemEx(player, fromPos, creature->getPosition(), creature->getParent()->getThingIndex(creature), item, isHotkey, creature);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db012c59559622c3711fbcb43cf7227c90ad0134c6a4975bea1b6e1065b02d07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 3999, + "startColumn": 66, + "charOffset": 139737, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 3997, + "startColumn": 66, + "charOffset": 139668, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tg_actions().useItemEx(player, fromPos, creature->getPosition(), creature->getParent()->getThingIndex(creature), item, isHotkey, creature);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e95b979debc46bf7c3faafb6806e73742a933425ef9c0c7d720e39576918d98" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerCloseContainer' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4002, + "startColumn": 33, + "charOffset": 139847, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 4000, + "startColumn": 33, + "charOffset": 139812, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerCloseContainer(uint32_t playerId, uint8_t cid) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cff4faa68d74b44e4134e30f1bc74074f00de8e9e29e823c16184a62324c81ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4004, + "startColumn": 6, + "charOffset": 139945, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4002, + "startColumn": 6, + "charOffset": 139815, + "charLength": 1, + "snippet": { + "text": "void Game::playerCloseContainer(uint32_t playerId, uint8_t cid) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6ae7881b217fb2b0fdd1cb75658b2481e99a96533c4d236dcff4b1c66d3125a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerMoveUpContainer' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4012, + "startColumn": 34, + "charOffset": 140070, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 4010, + "startColumn": 34, + "charOffset": 140034, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerMoveUpContainer(uint32_t playerId, uint8_t cid) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77149a174a8e00563d20c43ca82248cdae120bacefe09405a64ccb5bc511872a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4014, + "startColumn": 6, + "charOffset": 140168, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4012, + "startColumn": 6, + "charOffset": 140037, + "charLength": 1, + "snippet": { + "text": "void Game::playerMoveUpContainer(uint32_t playerId, uint8_t cid) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3cec47036b12def59aee5f435820bc4e362419385ccadb91fd32b20a1ad87e47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4019, + "startColumn": 6, + "charOffset": 140269, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4017, + "startColumn": 6, + "charOffset": 140192, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr container = player->getContainerByID(cid);\n\tif (!container) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9699bd964f1e8eb319aadc67fd37fe4e6578aa8d8b9f76a55f5833bf855f3bc6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4024, + "startColumn": 6, + "charOffset": 140414, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4022, + "startColumn": 6, + "charOffset": 140296, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr parentContainer = std::dynamic_pointer_cast(container->getRealParent());\n\tif (!parentContainer) {\n\t\tstd::shared_ptr tile = container->getTile();\n\t\tif (!tile) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68671d98d659b78f936d91c6c8c5b50b3f622602dc6673a04cd8af2b0ef1c392" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4026, + "startColumn": 7, + "charOffset": 140493, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4024, + "startColumn": 7, + "charOffset": 140409, + "charLength": 1, + "snippet": { + "text": "\tif (!parentContainer) {\n\t\tstd::shared_ptr tile = container->getTile();\n\t\tif (!tile) {\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d0b513e541c74c2f5d3a33e25d372430c54fa76dc4391ec744f6a42183429cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerUpdateContainer' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4064, + "startColumn": 34, + "charOffset": 141762, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 4062, + "startColumn": 34, + "charOffset": 141726, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerUpdateContainer(uint32_t playerId, uint8_t cid) {\n\tstd::shared_ptr player = getPlayerByGUID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "895dd6208cda7395edb870f8c16701183302b06a8544642add8aeec2ee000f3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4066, + "startColumn": 6, + "charOffset": 141862, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4064, + "startColumn": 6, + "charOffset": 141729, + "charLength": 1, + "snippet": { + "text": "void Game::playerUpdateContainer(uint32_t playerId, uint8_t cid) {\n\tstd::shared_ptr player = getPlayerByGUID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c2c09e265145a5a5072322b39436f545d86c486e3f6dd3b201887107b452457" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4071, + "startColumn": 6, + "charOffset": 141963, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4069, + "startColumn": 6, + "charOffset": 141886, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr container = player->getContainerByID(cid);\n\tif (!container) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d4d8c1348d0a277a2ef4b7eda070d26f8f93d5a8cf2fd0db04911af7622e388" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4080, + "startColumn": 6, + "charOffset": 142265, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4078, + "startColumn": 6, + "charOffset": 142090, + "charLength": 1, + "snippet": { + "text": "void Game::playerRotateItem(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "676184696726a8d518a76affe22571af0c6cee901ada473cfaf530cee78492d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4085, + "startColumn": 6, + "charOffset": 142399, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4083, + "startColumn": 6, + "charOffset": 142289, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr thing = internalGetThing(player, pos, stackPos, itemId, STACKPOS_TOPDOWN_ITEM);\n\tif (!thing) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e800fbed030b3fe2b152fb39796efe4acca49922c4a3ffbb164cc2be30b6ef4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4090, + "startColumn": 6, + "charOffset": 142476, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4088, + "startColumn": 6, + "charOffset": 142422, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = thing->getItem();\n\tif (!item || item->getID() != itemId || !item->isRotatable() || item->hasAttribute(ItemAttribute_t::UNIQUEID)) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa5fea6fe5b989302e1e3d89bd7dd13b652a0dee75d336ff0b1b9393709674a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4105, + "startColumn": 15, + "charOffset": 143011, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 4103, + "startColumn": 15, + "charOffset": 142993, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tif (pos.x != 0xFFFF && !Position::areInRange<1, 1, 0>(pos, player->getPosition())) {\n\t\tstd::vector listDir;\n\t\tif (player->getPathTo(pos, listDir, 0, 1, true, true)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b71baef8245a1b1b513cb9b80a5261cdbb04a80e986f3a56ef298b263ab16de0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4111, + "startColumn": 5, + "charOffset": 143367, + "charLength": 3, + "snippet": { + "text": "400" + } + }, + "contextRegion": { + "startLine": 4109, + "startColumn": 5, + "charOffset": 143312, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tstd::shared_ptr task = createPlayerTask(\n\t\t\t\t400, [this, playerId, pos, stackPos, itemId] {\n\t\t\t\t\tplayerRotateItem(playerId, pos, stackPos, itemId);\n\t\t\t\t}," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1aa4fbcf1805ca998cc3fe2c5858d51c46df785aa688f77b16dd3980fb23730b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4127, + "startColumn": 19, + "charOffset": 143798, + "charLength": 4, + "snippet": { + "text": "Item" + } + }, + "contextRegion": { + "startLine": 4125, + "startColumn": 19, + "charOffset": 143776, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tuint16_t newId = Item::items[item->getID()].rotateTo;\n\tif (newId != 0) {\n\t\ttransformItem(item, newId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38e2bfcce43f23f5bec2e1b52bca992646e9976c61dcb8d5edb8535b1ec559b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4129, + "startColumn": 3, + "charOffset": 143856, + "charLength": 13, + "snippet": { + "text": "transformItem" + } + }, + "contextRegion": { + "startLine": 4127, + "startColumn": 3, + "charOffset": 143780, + "charLength": 13, + "snippet": { + "text": "\tuint16_t newId = Item::items[item->getID()].rotateTo;\n\tif (newId != 0) {\n\t\ttransformItem(item, newId);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6eef8ae1ccc02631cf1510e264238d1ebfdc823e743b99edc6b90894faffc388" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4135, + "startColumn": 6, + "charOffset": 144077, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4133, + "startColumn": 6, + "charOffset": 143890, + "charLength": 1, + "snippet": { + "text": "void Game::playerConfigureShowOffSocket(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || pos.x == 0xFFFF) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d0b513e541c74c2f5d3a33e25d372430c54fa76dc4391ec744f6a42183429cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4135, + "startColumn": 26, + "charOffset": 144097, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 4133, + "startColumn": 26, + "charOffset": 143890, + "charLength": 6, + "snippet": { + "text": "void Game::playerConfigureShowOffSocket(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || pos.x == 0xFFFF) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e910295ac02cd49586a3453b52bed1c97f25971cc39c1993a4e4d3a2b4e21750" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4140, + "startColumn": 6, + "charOffset": 144230, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4138, + "startColumn": 6, + "charOffset": 144120, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr thing = internalGetThing(player, pos, stackPos, itemId, STACKPOS_TOPDOWN_ITEM);\n\tif (!thing) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38511a339a43d7f1af42e041488a984a2028719091054ec1c22bd9b201f1eed7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4145, + "startColumn": 6, + "charOffset": 144307, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4143, + "startColumn": 6, + "charOffset": 144253, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = thing->getItem();\n\tif (!item || item->getID() != itemId || !item->isPodium() || item->hasAttribute(ItemAttribute_t::UNIQUEID)) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd2783d15884bec26d037670d5bc866f93b0f054276cbf2593001d49cd4ac415" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4168, + "startColumn": 6, + "charOffset": 145309, + "charLength": 3, + "snippet": { + "text": "400" + } + }, + "contextRegion": { + "startLine": 4166, + "startColumn": 6, + "charOffset": 145248, + "charLength": 3, + "snippet": { + "text": "\t\t\tif (isPodiumOfRenown) {\n\t\t\t\ttask = createPlayerTask(\n\t\t\t\t\t400, [player, item, pos, itemId, stackPos] { player->sendPodiumWindow(item, pos, itemId, stackPos); }, \"Game::playerConfigureShowOffSocket\"\n\t\t\t\t);\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e1d8ca3012afb7127c51490841d9fab6e2d6b96a2a6beabd951800f617a1884" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4172, + "startColumn": 6, + "charOffset": 145502, + "charLength": 3, + "snippet": { + "text": "400" + } + }, + "contextRegion": { + "startLine": 4170, + "startColumn": 6, + "charOffset": 145456, + "charLength": 3, + "snippet": { + "text": "\t\t\t} else {\n\t\t\t\ttask = createPlayerTask(\n\t\t\t\t\t400, [player, item, pos, itemId, stackPos] { player->sendMonsterPodiumWindow(item, pos, itemId, stackPos); }, \"Game::playerConfigureShowOffSocket\"\n\t\t\t\t);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50da1c3ea9fa72634c5fb08a4600dcf3fb834a76f67cd2b24bc29831ef5017f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'playerSetShowOffSocket' has cognitive complexity of 41 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4189, + "startColumn": 12, + "charOffset": 145959, + "charLength": 22, + "snippet": { + "text": "playerSetShowOffSocket" + } + }, + "contextRegion": { + "startLine": 4187, + "startColumn": 12, + "charOffset": 145945, + "charLength": 22, + "snippet": { + "text": "}\n\nvoid Game::playerSetShowOffSocket(uint32_t playerId, Outfit_t &outfit, const Position &pos, uint8_t stackPos, const uint16_t itemId, uint8_t podiumVisible, uint8_t direction) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || pos.x == 0xFFFF) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e3a1c9263ee2e2e05cec5ecbe97419d5c98de4e1c545eee6e22465f70a8c4f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerSetShowOffSocket' of similar type ('uint8_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4189, + "startColumn": 134, + "charOffset": 146081, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 4187, + "startColumn": 134, + "charOffset": 145945, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid Game::playerSetShowOffSocket(uint32_t playerId, Outfit_t &outfit, const Position &pos, uint8_t stackPos, const uint16_t itemId, uint8_t podiumVisible, uint8_t direction) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || pos.x == 0xFFFF) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8cba348a736dfaea14ef5649e80beab295a0a6a0cb02f050fed5254bf87cf055" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4191, + "startColumn": 6, + "charOffset": 146189, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4189, + "startColumn": 6, + "charOffset": 145948, + "charLength": 1, + "snippet": { + "text": "void Game::playerSetShowOffSocket(uint32_t playerId, Outfit_t &outfit, const Position &pos, uint8_t stackPos, const uint16_t itemId, uint8_t podiumVisible, uint8_t direction) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || pos.x == 0xFFFF) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45a870bbfaf5d1f5d3d9ef5b3a17f1345ca3115650c79f75b5fa920e166d7095" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4191, + "startColumn": 26, + "charOffset": 146209, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 4189, + "startColumn": 26, + "charOffset": 145948, + "charLength": 6, + "snippet": { + "text": "void Game::playerSetShowOffSocket(uint32_t playerId, Outfit_t &outfit, const Position &pos, uint8_t stackPos, const uint16_t itemId, uint8_t podiumVisible, uint8_t direction) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || pos.x == 0xFFFF) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ecc25a85146e0afb7330f06a8eabe056f16658f30eeec0e551b5d8d391b01032" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4196, + "startColumn": 6, + "charOffset": 146342, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4194, + "startColumn": 6, + "charOffset": 146232, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr thing = internalGetThing(player, pos, stackPos, itemId, STACKPOS_TOPDOWN_ITEM);\n\tif (!thing) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a23aac8008d98216c103ca0a6f6373f1c24c1e15083b9718b31c6a9bb3f31312" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4201, + "startColumn": 6, + "charOffset": 146419, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4199, + "startColumn": 6, + "charOffset": 146365, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = thing->getItem();\n\tif (!item || item->getID() != itemId || !item->isPodium() || item->hasAttribute(ItemAttribute_t::UNIQUEID)) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff4d8529a0eb8f6a7e876f3e16216ee0db25cb06a97d6332d4ec0ac1f4e7e5de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4217, + "startColumn": 6, + "charOffset": 147021, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4215, + "startColumn": 6, + "charOffset": 146936, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto tile = item->getParent() ? item->getParent()->getTile() : nullptr;\n\tif (!tile) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6bb0f6891503d25b5592eb6972686ccfabdcabaad17f8ee002ccab7168fb9a64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4227, + "startColumn": 5, + "charOffset": 147449, + "charLength": 3, + "snippet": { + "text": "400" + } + }, + "contextRegion": { + "startLine": 4225, + "startColumn": 5, + "charOffset": 147259, + "charLength": 3, + "snippet": { + "text": "\t\t\tg_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, \"Game::playerAutoWalk\");\n\t\t\tstd::shared_ptr task = createPlayerTask(\n\t\t\t\t400, [this, playerId, pos] { playerBrowseField(playerId, pos); }, \"Game::playerBrowseField\"\n\t\t\t);\n\t\t\tplayer->setNextWalkActionTask(task);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0da2f05b90b9e94587943ab1bb4f6a2d75dbd70e0446fba382d96de9ee5ac7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4255, + "startColumn": 6, + "charOffset": 148304, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4253, + "startColumn": 6, + "charOffset": 148233, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto mount = mounts.getMountByClientID(outfit.lookMount);\n\tif (!mount || !player->hasMount(mount) || player->isWearingSupportOutfit()) {\n\t\toutfit.lookMount = 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e17aa662c356a9ae8caf6a6d3f05b93b5c46004cb27a81d1822bbc883a0d6e68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4255, + "startColumn": 16, + "charOffset": 148314, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4253, + "startColumn": 16, + "charOffset": 148233, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto mount = mounts.getMountByClientID(outfit.lookMount);\n\tif (!mount || !player->hasMount(mount) || player->isWearingSupportOutfit()) {\n\t\toutfit.lookMount = 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df292581f78b20da1a74153a8dde6287fbdcda57cdedf6eade3ddf0098565522" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4259, + "startColumn": 2, + "charOffset": 148407, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 4257, + "startColumn": 2, + "charOffset": 148402, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (outfit.lookType != 0) {\n\t\titem->setCustomAttribute(\"LookType\", static_cast(outfit.lookType));\n\t\titem->setCustomAttribute(\"LookHead\", static_cast(outfit.lookHead));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "831056d841f736febd15490b8101241fdb60096088babdde686bed2ee9108905" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4272, + "startColumn": 2, + "charOffset": 149144, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 4270, + "startColumn": 2, + "charOffset": 149139, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (outfit.lookMount != 0) {\n\t\titem->setCustomAttribute(\"LookMount\", static_cast(outfit.lookMount));\n\t\titem->setCustomAttribute(\"LookMountHead\", static_cast(outfit.lookMountHead));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "065c3c81b1a6dee5ce576549f13c247deac508cdf044b83ee6693103e16fbb4b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4294, + "startColumn": 8, + "charOffset": 150317, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4292, + "startColumn": 8, + "charOffset": 150183, + "charLength": 1, + "snippet": { + "text": "\t\tif (outfit.lookType != 0) {\n\t\t\tconst auto &outfitInfo = Outfits::getInstance().getOutfitByLookType(player, outfit.lookType);\n\t\t\tif (!outfitInfo) {\n\t\t\t\treturn;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6328ac751f1a9bd8ecd10db2d19b072b2395af6300e2d82161bb7ea9f52e4eca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4308, + "startColumn": 50, + "charOffset": 150585, + "charLength": 3, + "snippet": { + "text": "str" + } + }, + "contextRegion": { + "startLine": 4306, + "startColumn": 50, + "charOffset": 150496, + "charLength": 3, + "snippet": { + "text": "\t\t\tname << mount->name << \" mount\";\n\t\t}\n\t\titem->setAttribute(ItemAttribute_t::NAME, name.str());\n\t} else {\n\t\titem->removeAttribute(ItemAttribute_t::NAME);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce67f477faf7b961a78a2a0dee9add45eabc46c53e3434c43c107625556c43b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'playerWrapableItem' has cognitive complexity of 30 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4319, + "startColumn": 12, + "charOffset": 150824, + "charLength": 18, + "snippet": { + "text": "playerWrapableItem" + } + }, + "contextRegion": { + "startLine": 4317, + "startColumn": 12, + "charOffset": 150810, + "charLength": 18, + "snippet": { + "text": "}\n\nvoid Game::playerWrapableItem(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31a14d90685a184cdce4edfe4295b58275b376b554a9ffb15c4edf69e8042c39" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4321, + "startColumn": 6, + "charOffset": 150990, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4319, + "startColumn": 6, + "charOffset": 150813, + "charLength": 1, + "snippet": { + "text": "void Game::playerWrapableItem(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6dd6151c0776a619a3c30fbc43f088838c8d2d18d5ed137dd7c22ae5278a351d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4326, + "startColumn": 6, + "charOffset": 151122, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4324, + "startColumn": 6, + "charOffset": 151014, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr thing = internalGetThing(player, pos, stackPos, itemId, STACKPOS_FIND_THING);\n\tif (!thing) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b183f8920ecdf99ba5a204445c94dc550a61167293ea37e8c95717a452ccb5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4333, + "startColumn": 50, + "charOffset": 151347, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4331, + "startColumn": 50, + "charOffset": 151183, + "charLength": 1, + "snippet": { + "text": "\tconst auto tile = map.getTile(item->getPosition());\n\tconst auto houseTile = tile->dynamic_self_cast();\n\tif (!tile->hasFlag(TILESTATE_PROTECTIONZONE) || !houseTile) {\n\t\tplayer->sendCancelMessage(\"You may construct this only inside a house.\");\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2319ed60e0a2fc7d3b43483bc229bff9bdddef2577d215e865992fd80f251ea4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4338, + "startColumn": 6, + "charOffset": 151498, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4336, + "startColumn": 6, + "charOffset": 151447, + "charLength": 1, + "snippet": { + "text": "\t}\n\tconst auto house = houseTile->getHouse();\n\tif (!house) {\n\t\tplayer->sendCancelMessage(\"You may construct this only inside a house.\");\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efd67df7333f27fbadcc870674894656630d03fc62752ed1bb655a837e0579c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4348, + "startColumn": 6, + "charOffset": 151750, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4346, + "startColumn": 6, + "charOffset": 151741, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!item || item->getID() != itemId || item->hasAttribute(ItemAttribute_t::UNIQUEID) || (!item->isWrapable() && item->getID() != ITEM_DECORATION_KIT)) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74b86a71f2171084a91a06f65a02474f36b42281532fe6679ce5febe6e61eba2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4363, + "startColumn": 15, + "charOffset": 152326, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 4361, + "startColumn": 15, + "charOffset": 152308, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tif (pos.x != 0xFFFF && !Position::areInRange<1, 1, 0>(pos, player->getPosition())) {\n\t\tstd::vector listDir;\n\t\tif (player->getPathTo(pos, listDir, 0, 1, true, true)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "708ccf44f376e186fdf34090b243a181f7a8dfa9dcd200767d71590fc13f21d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4369, + "startColumn": 5, + "charOffset": 152682, + "charLength": 3, + "snippet": { + "text": "400" + } + }, + "contextRegion": { + "startLine": 4367, + "startColumn": 5, + "charOffset": 152627, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tstd::shared_ptr task = createPlayerTask(\n\t\t\t\t400, [this, playerId, pos, stackPos, itemId] { playerWrapableItem(playerId, pos, stackPos, itemId); }, \"Game::playerWrapableItem\"\n\t\t\t);\n\t\t\tplayer->setNextWalkActionTask(task);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ad31807ca110c963ae6a3f6ef3a52de067c27cbe8213581e76fcfbdaebcdff7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-unused-local-non-trivial-variable", + "ruleIndex": 115, + "kind": "fail", + "level": "warning", + "message": { + "text": "unused local variable 'itemName' of type 'std::string' (aka 'basic_string')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4393, + "startColumn": 14, + "charOffset": 153512, + "charLength": 8, + "snippet": { + "text": "itemName" + } + }, + "contextRegion": { + "startLine": 4391, + "startColumn": 14, + "charOffset": 153495, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tstd::string itemName = item->getName();\n\tauto unWrapAttribute = item->getCustomAttribute(\"unWrapId\");\n\tuint16_t unWrapId = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "007db3ee1e6256236238570b77a1ca84beffc808bb90988849f34fbad2840d5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4406, + "startColumn": 2, + "charOffset": 153887, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 4404, + "startColumn": 2, + "charOffset": 153882, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (item->isWrapable() && item->getID() != ITEM_DECORATION_KIT) {\n\t\twrapItem(item, houseTile->getHouse());\n\t} else if (item->getID() == ITEM_DECORATION_KIT && unWrapId != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7a9741af041ca125ea583441c974b0a314133d0f31a9c318bd6684f5c200342" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4407, + "startColumn": 3, + "charOffset": 153955, + "charLength": 8, + "snippet": { + "text": "wrapItem" + } + }, + "contextRegion": { + "startLine": 4405, + "startColumn": 3, + "charOffset": 153885, + "charLength": 8, + "snippet": { + "text": "\n\tif (item->isWrapable() && item->getID() != ITEM_DECORATION_KIT) {\n\t\twrapItem(item, houseTile->getHouse());\n\t} else if (item->getID() == ITEM_DECORATION_KIT && unWrapId != 0) {\n\t\tunwrapItem(item, unWrapId, houseTile->getHouse(), player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7af90346023eb87273cc73fea0ac426b64a9ea0a9c9c9bae1f5f6e8a4e37fde8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4414, + "startColumn": 60, + "charOffset": 154226, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 4412, + "startColumn": 60, + "charOffset": 154164, + "charLength": 4, + "snippet": { + "text": "}\n\nstd::shared_ptr Game::wrapItem(std::shared_ptr item, std::shared_ptr house) {\n\tuint16_t hiddenCharges = 0;\n\tuint16_t amount = item->getItemCount();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06129cf5fcfdb020068e4f94d7073cdaedf62a7cce63532e207300b759634e51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4414, + "startColumn": 89, + "charOffset": 154255, + "charLength": 5, + "snippet": { + "text": "house" + } + }, + "contextRegion": { + "startLine": 4412, + "startColumn": 89, + "charOffset": 154164, + "charLength": 5, + "snippet": { + "text": "}\n\nstd::shared_ptr Game::wrapItem(std::shared_ptr item, std::shared_ptr house) {\n\tuint16_t hiddenCharges = 0;\n\tuint16_t amount = item->getItemCount();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1422bacf920ee4e4ee6eb5e7801e258cac1ef174bf2eba9eb1638a528af2a9d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4439, + "startColumn": 45, + "charOffset": 155125, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 4437, + "startColumn": 45, + "charOffset": 155078, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Game::unwrapItem(std::shared_ptr item, uint16_t unWrapId, std::shared_ptr house, std::shared_ptr player) {\n\tif (item->hasOwner() && !item->isOwner(player)) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_ITEMISNOTYOURS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dccd6de9c5e34d347b6be98765c25c7ab8d24730bdc38be7ecc7358abf04bf95" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4439, + "startColumn": 93, + "charOffset": 155173, + "charLength": 5, + "snippet": { + "text": "house" + } + }, + "contextRegion": { + "startLine": 4437, + "startColumn": 93, + "charOffset": 155078, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid Game::unwrapItem(std::shared_ptr item, uint16_t unWrapId, std::shared_ptr house, std::shared_ptr player) {\n\tif (item->hasOwner() && !item->isOwner(player)) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_ITEMISNOTYOURS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "144fcd499ea93ceace9d6f32c686431826231d380431042e5f7654f34b2d9a8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4439, + "startColumn": 124, + "charOffset": 155204, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 4437, + "startColumn": 124, + "charOffset": 155078, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::unwrapItem(std::shared_ptr item, uint16_t unWrapId, std::shared_ptr house, std::shared_ptr player) {\n\tif (item->hasOwner() && !item->isOwner(player)) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_ITEMISNOTYOURS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee70e847d50d88c8310341bcb6016169d6ea777d9602f9ba6ffa4e223d4d177d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4451, + "startColumn": 6, + "charOffset": 155743, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4449, + "startColumn": 6, + "charOffset": 155682, + "charLength": 1, + "snippet": { + "text": "\t}\n\tauto amount = item->getAttribute(AMOUNT);\n\tif (!amount) {\n\t\tamount = 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c28b0af33ba5e2e61c6ff5af28a5df2711576bc84994cddf854af6470a788090" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerWriteItem' of similar type ('uint32_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4468, + "startColumn": 28, + "charOffset": 156174, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 4466, + "startColumn": 28, + "charOffset": 156144, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerWriteItem(uint32_t playerId, uint32_t windowTextId, const std::string &text) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d2a28825b9da0543190e4c6b30e63997578c7e0c4dcb7d3942e0a314a05b16a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4470, + "startColumn": 6, + "charOffset": 156307, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4468, + "startColumn": 6, + "charOffset": 156147, + "charLength": 1, + "snippet": { + "text": "void Game::playerWriteItem(uint32_t playerId, uint32_t windowTextId, const std::string &text) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb337b5e155bbbb98a816eaf103fd8398a77eb204ac2a58823be5fd58ce095f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4482, + "startColumn": 6, + "charOffset": 156589, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4480, + "startColumn": 6, + "charOffset": 156580, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!writeItem || writeItem->isRemoved()) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0556ca2c17dc4e98e40bae2be8ab807e289dd11fc4640001fcfb2863926d5fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4495, + "startColumn": 6, + "charOffset": 156980, + "charLength": 5, + "snippet": { + "text": "owner" + } + }, + "contextRegion": { + "startLine": 4493, + "startColumn": 6, + "charOffset": 156895, + "charLength": 5, + "snippet": { + "text": "\n\tstd::shared_ptr owner = std::dynamic_pointer_cast(topParent);\n\tif (owner && owner != player) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dda7b09f628324f609a6c40834322c1f4ff944448f9317b956d90790bec80901" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4515, + "startColumn": 61, + "charOffset": 157655, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 4513, + "startColumn": 61, + "charOffset": 157461, + "charLength": 7, + "snippet": { + "text": "\t\tif (writeItem->getAttribute(ItemAttribute_t::TEXT) != text) {\n\t\t\twriteItem->setAttribute(ItemAttribute_t::TEXT, text);\n\t\t\twriteItem->setAttribute(ItemAttribute_t::WRITER, player->getName());\n\t\t\twriteItem->setAttribute(ItemAttribute_t::DATE, getTimeNow());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac85900b8c1258260cc9aeff7c129e8a84da8b5ec259b979b81169498ca1018a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4516, + "startColumn": 51, + "charOffset": 157717, + "charLength": 10, + "snippet": { + "text": "getTimeNow" + } + }, + "contextRegion": { + "startLine": 4514, + "startColumn": 51, + "charOffset": 157538, + "charLength": 10, + "snippet": { + "text": "\t\t\twriteItem->setAttribute(ItemAttribute_t::TEXT, text);\n\t\t\twriteItem->setAttribute(ItemAttribute_t::WRITER, player->getName());\n\t\t\twriteItem->setAttribute(ItemAttribute_t::DATE, getTimeNow());\n\t\t}\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c95b4b5c856cd98e7bee7515cc37c48bca252c8c63dbbb3f0aafd6e172a0d07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4526, + "startColumn": 3, + "charOffset": 157999, + "charLength": 13, + "snippet": { + "text": "transformItem" + } + }, + "contextRegion": { + "startLine": 4524, + "startColumn": 3, + "charOffset": 157911, + "charLength": 13, + "snippet": { + "text": "\tuint16_t newId = Item::items[writeItem->getID()].writeOnceItemId;\n\tif (newId != 0) {\n\t\ttransformItem(writeItem, newId);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "528c0458a411b3dee0ddfbc9742664de09af6c8669936716f34fd7ce65c2d5f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4534, + "startColumn": 6, + "charOffset": 158206, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4532, + "startColumn": 6, + "charOffset": 158071, + "charLength": 1, + "snippet": { + "text": "void Game::playerBrowseField(uint32_t playerId, const Position &pos) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20fe484e670a2c574454f917329078b2c4f3911c59736476173989b7b6765bc0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4549, + "startColumn": 5, + "charOffset": 158773, + "charLength": 3, + "snippet": { + "text": "400" + } + }, + "contextRegion": { + "startLine": 4547, + "startColumn": 5, + "charOffset": 158583, + "charLength": 3, + "snippet": { + "text": "\t\t\tg_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, \"Game::playerAutoWalk\");\n\t\t\tstd::shared_ptr task = createPlayerTask(\n\t\t\t\t400, [this, playerId, pos] { playerBrowseField(playerId, pos); }, \"Game::playerBrowseField\"\n\t\t\t);\n\t\t\tplayer->setNextWalkActionTask(task);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "196f96036614bb10f60a1b3df6efea4bf6c8098b90ab6005fbffba83227a1460" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4559, + "startColumn": 6, + "charOffset": 159049, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4557, + "startColumn": 6, + "charOffset": 158995, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr tile = map.getTile(pos);\n\tif (!tile) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf678869fa5fd48e647a1aed099717c171704b4a430e1374b7e48ee0268cf6cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4581, + "startColumn": 29, + "charOffset": 159580, + "charLength": 3, + "snippet": { + "text": "0xF" + } + }, + "contextRegion": { + "startLine": 4579, + "startColumn": 29, + "charOffset": 159548, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tuint8_t dummyContainerId = 0xF - ((pos.x % 3) * 3 + (pos.y % 3));\n\tstd::shared_ptr openContainer = player->getContainerByID(dummyContainerId);\n\tif (openContainer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5549cbadfc7e230f4f51b89952bbd6e67682cffeb662ca8bd177fe533fc69252" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4581, + "startColumn": 29, + "charOffset": 159580, + "charLength": 3, + "snippet": { + "text": "0xF" + } + }, + "contextRegion": { + "startLine": 4579, + "startColumn": 29, + "charOffset": 159548, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tuint8_t dummyContainerId = 0xF - ((pos.x % 3) * 3 + (pos.y % 3));\n\tstd::shared_ptr openContainer = player->getContainerByID(dummyContainerId);\n\tif (openContainer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1f67445e79a92a44cda0a1bf80a3f2248496d3d38793fbf2bd3a186fcbbd347" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4581, + "startColumn": 29, + "charOffset": 159580, + "charLength": 3, + "snippet": { + "text": "0xF" + } + }, + "contextRegion": { + "startLine": 4579, + "startColumn": 29, + "charOffset": 159548, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tuint8_t dummyContainerId = 0xF - ((pos.x % 3) * 3 + (pos.y % 3));\n\tstd::shared_ptr openContainer = player->getContainerByID(dummyContainerId);\n\tif (openContainer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7fea52c4f5647157ca33f3c73be9705de933627f75670eafd97fc8b01530fa6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerStowItem' of similar type ('uint8_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4592, + "startColumn": 84, + "charOffset": 160032, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 4590, + "startColumn": 84, + "charOffset": 159946, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid Game::playerStowItem(uint32_t playerId, const Position &pos, uint16_t itemId, uint8_t stackpos, uint8_t count, bool allItems) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "749799f84c9d7398694ae8d907585ff274f1ab4b474ffe1b3a557171647397ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4594, + "startColumn": 6, + "charOffset": 160146, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4592, + "startColumn": 6, + "charOffset": 159949, + "charLength": 1, + "snippet": { + "text": "void Game::playerStowItem(uint32_t playerId, const Position &pos, uint16_t itemId, uint8_t stackpos, uint8_t count, bool allItems) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "333a8d2f772f6ca5b013f3ada94c8385dc408183aef2ac7af5401dc5d255db51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4604, + "startColumn": 6, + "charOffset": 160387, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4602, + "startColumn": 6, + "charOffset": 160277, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr thing = internalGetThing(player, pos, stackpos, itemId, STACKPOS_TOPDOWN_ITEM);\n\tif (!thing) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb464928d11fa91d5a4796a061d47337387052fc0a003213fb50dec190dd5b84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4609, + "startColumn": 6, + "charOffset": 160464, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4607, + "startColumn": 6, + "charOffset": 160410, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = thing->getItem();\n\tif (!item || item->getID() != itemId || item->getItemCount() < count || item->isStoreItem()) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "592a668384bd8941709f1c579abd0e304369fa3460859b5c184b06769d46ed37" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4619, + "startColumn": 15, + "charOffset": 160759, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 4617, + "startColumn": 15, + "charOffset": 160741, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tif (pos.x != 0xFFFF && !Position::areInRange<1, 1, 0>(pos, player->getPosition())) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ee2d52cad5c5c7e9878516788da382e84a9fc2ee6338f8e8dd7f2a491b7d96a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "3 adjacent parameters of 'playerStashWithdraw' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4633, + "startColumn": 32, + "charOffset": 161151, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 4631, + "startColumn": 32, + "charOffset": 161117, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerStashWithdraw(uint32_t playerId, uint16_t itemId, uint32_t count, uint8_t) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3be3e0073297c0574776b8cae1fef763e03a0211b13a8392d3c9615e007441a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4633, + "startColumn": 91, + "charOffset": 161210, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 4631, + "startColumn": 91, + "charOffset": 161117, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Game::playerStashWithdraw(uint32_t playerId, uint16_t itemId, uint32_t count, uint8_t) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f313fba7e22501c003c33e2281ad368262f27f162487618a3b7fefdbf7e0c6e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4635, + "startColumn": 6, + "charOffset": 161278, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4633, + "startColumn": 6, + "charOffset": 161120, + "charLength": 1, + "snippet": { + "text": "void Game::playerStashWithdraw(uint32_t playerId, uint16_t itemId, uint32_t count, uint8_t) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20fe484e670a2c574454f917329078b2c4f3911c59736476173989b7b6765bc0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4659, + "startColumn": 34, + "charOffset": 161846, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 4657, + "startColumn": 34, + "charOffset": 161809, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tif (player->getFreeCapacity() < 100) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTENOUGHCAPACITY);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfa72b77bf34a58aec9ed669a9c7aa2de11966e927b35bc8288f9dc82b92c741" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4664, + "startColumn": 20, + "charOffset": 161946, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 4662, + "startColumn": 20, + "charOffset": 161923, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tint32_t NDSlots = ((freeSlots) - (count < it.stackSize ? 1 : (count / it.stackSize)));\n\tuint32_t SlotsWith = count;\n\tuint32_t noSlotsWith = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff4d6d7b8d4e4116e833bb20efc311af3818876819ad46ffeac29056616d27e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4695, + "startColumn": 11, + "charOffset": 163035, + "charLength": 16, + "snippet": { + "text": "addItemFromStash" + } + }, + "contextRegion": { + "startLine": 4693, + "startColumn": 11, + "charOffset": 162972, + "charLength": 16, + "snippet": { + "text": "\n\tif (player->withdrawItem(itemId, WithdrawCount)) {\n\t\tplayer->addItemFromStash(it.id, WithdrawCount);\n\t} else {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "712a2f6767a95655e2dd088c7987204e599e58f75ebfce5d21e214cf18ec98b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerSeekInContainer' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4708, + "startColumn": 34, + "charOffset": 163351, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 4706, + "startColumn": 34, + "charOffset": 163315, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerSeekInContainer(uint32_t playerId, uint8_t containerId, uint16_t index, uint8_t containerCategory) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55a1093e99f7a85b3df89c0ecc4796ea2da7720a9b571775c0c0eac1db961084" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerSeekInContainer' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4708, + "startColumn": 74, + "charOffset": 163391, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 4706, + "startColumn": 74, + "charOffset": 163315, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerSeekInContainer(uint32_t playerId, uint8_t containerId, uint16_t index, uint8_t containerCategory) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c9689e1c698ab277a837a89b39396b4a2e568b2e16dedf1ea803ad40387a725" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4710, + "startColumn": 6, + "charOffset": 163500, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4708, + "startColumn": 6, + "charOffset": 163318, + "charLength": 1, + "snippet": { + "text": "void Game::playerSeekInContainer(uint32_t playerId, uint8_t containerId, uint16_t index, uint8_t containerCategory) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba7b076459dc941a6753a1301dddbfbd9d3e803353ac79379546a6b2c7a2798f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4715, + "startColumn": 6, + "charOffset": 163609, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4713, + "startColumn": 6, + "charOffset": 163524, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr container = player->getContainerByID(containerId);\n\tif (!container || !container->hasPagination()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50bd2d711d89244ba073e7d3b5f72b9714fecdaf6d7ba586e0db2a17d58b8925" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerUpdateHouseWindow' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4733, + "startColumn": 36, + "charOffset": 164226, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 4731, + "startColumn": 36, + "charOffset": 164188, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerUpdateHouseWindow(uint32_t playerId, uint8_t listId, uint32_t windowTextId, const std::string &text) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ede8097fac835a3e442bed326b109e617eaa5511771baa6c1f56689c4d8ed76d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4735, + "startColumn": 6, + "charOffset": 164375, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4733, + "startColumn": 6, + "charOffset": 164191, + "charLength": 1, + "snippet": { + "text": "void Game::playerUpdateHouseWindow(uint32_t playerId, uint8_t listId, uint32_t windowTextId, const std::string &text) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c008f58135875a09ef7317df39c2d3ab7d64a9878c9f0d0f193b511fd71aac2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'internalWindowTextId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4739, + "startColumn": 11, + "charOffset": 164410, + "charLength": 20, + "snippet": { + "text": "internalWindowTextId" + } + }, + "contextRegion": { + "startLine": 4737, + "startColumn": 11, + "charOffset": 164396, + "charLength": 20, + "snippet": { + "text": "\t}\n\n\tuint32_t internalWindowTextId;\n\tuint32_t internalListId;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a1da0272bd78df0a5b4df74abc743906cb5d66b6c91504db307094d9a45dd65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'internalListId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4740, + "startColumn": 11, + "charOffset": 164442, + "charLength": 14, + "snippet": { + "text": "internalListId" + } + }, + "contextRegion": { + "startLine": 4738, + "startColumn": 11, + "charOffset": 164399, + "charLength": 14, + "snippet": { + "text": "\n\tuint32_t internalWindowTextId;\n\tuint32_t internalListId;\n\n\tconst auto &house = player->getEditHouse(internalWindowTextId, internalListId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76a1147611a8fb15757d1a7aed2985b21d129a12216feff2ed8dc2c1c2b6b81e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'playerRequestTrade' has cognitive complexity of 33 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4750, + "startColumn": 12, + "charOffset": 164757, + "charLength": 18, + "snippet": { + "text": "playerRequestTrade" + } + }, + "contextRegion": { + "startLine": 4748, + "startColumn": 12, + "charOffset": 164743, + "charLength": 18, + "snippet": { + "text": "}\n\nvoid Game::playerRequestTrade(uint32_t playerId, const Position &pos, uint8_t stackPos, uint32_t tradePlayerId, uint16_t itemId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3a87370b2bde84badde5f625a36dd729213064497b4beece9b7cd9b39a360f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4752, + "startColumn": 6, + "charOffset": 164941, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4750, + "startColumn": 6, + "charOffset": 164746, + "charLength": 1, + "snippet": { + "text": "void Game::playerRequestTrade(uint32_t playerId, const Position &pos, uint8_t stackPos, uint32_t tradePlayerId, uint16_t itemId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6bb0f6891503d25b5592eb6972686ccfabdcabaad17f8ee002ccab7168fb9a64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4757, + "startColumn": 6, + "charOffset": 165041, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4755, + "startColumn": 6, + "charOffset": 164965, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr tradePartner = getPlayerByID(tradePlayerId);\n\tif (!tradePartner || tradePartner == player) {\n\t\tplayer->sendTextMessage(MESSAGE_FAILURE, \"Sorry, not possible.\");\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8724080d3801f16c70e48c85c9e95140ad8b1b02533f620764f07cead72c8074" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4775, + "startColumn": 6, + "charOffset": 165718, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4773, + "startColumn": 6, + "charOffset": 165603, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr tradeThing = internalGetThing(player, pos, stackPos, itemId, STACKPOS_TOPDOWN_ITEM);\n\tif (!tradeThing) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f364d9f9080db6cfc76995c1b30c23783f6c785b34b063a1375aa3aa6195ac62" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4793, + "startColumn": 58, + "charOffset": 166473, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4791, + "startColumn": 58, + "charOffset": 166263, + "charLength": 1, + "snippet": { + "text": "\t\tif (std::shared_ptr houseTile = std::dynamic_pointer_cast(tradeItem->getTile())) {\n\t\t\tconst auto &house = houseTile->getHouse();\n\t\t\tif (house && tradeItem->getRealParent() != player && (!house->isInvited(player) || house->getHouseAccessLevel(player) == HOUSE_GUEST)) {\n\t\t\t\tplayer->sendCancelMessage(RETURNVALUE_NOTMOVABLE);\n\t\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf678869fa5fd48e647a1aed099717c171704b4a430e1374b7e48ee0268cf6cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4813, + "startColumn": 5, + "charOffset": 167304, + "charLength": 3, + "snippet": { + "text": "400" + } + }, + "contextRegion": { + "startLine": 4811, + "startColumn": 5, + "charOffset": 167249, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tstd::shared_ptr task = createPlayerTask(\n\t\t\t\t400, [this, playerId, pos, stackPos, tradePlayerId, itemId] { playerRequestTrade(playerId, pos, stackPos, tradePlayerId, itemId); }, \"Game::playerRequestTrade\"\n\t\t\t);\n\t\t\tplayer->setNextWalkActionTask(task);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d55a31426fc407c0fbe695ff3d6d7773f36521f06265dcfd8365bc5399a5916" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "if with identical then and else branches" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4823, + "startColumn": 2, + "charOffset": 167672, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 4821, + "startColumn": 2, + "charOffset": 167594, + "charLength": 2, + "snippet": { + "text": "\n\tstd::shared_ptr tradeItemContainer = tradeItem->getContainer();\n\tif (tradeItemContainer) {\n\t\tfor (const auto &it : tradeItems) {\n\t\t\tstd::shared_ptr item = it.first;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c06b84f9fff3cfba23429c6a07a0f928f37f9f540aefbe01aa5ddd2f583011c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4859, + "startColumn": 68, + "charOffset": 168847, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 4857, + "startColumn": 68, + "charOffset": 168729, + "charLength": 3, + "snippet": { + "text": "\n\tauto tradeContainer = tradeItem->getContainer();\n\tif (tradeContainer && tradeContainer->getItemHoldingCount() + 1 > 100) {\n\t\tplayer->sendTextMessage(MESSAGE_TRADE, \"You can not trade more than 100 items.\");\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75e5a02afa326f60b1f8f70ac5a56fe0b8dd4e8c822b2be44860b6bf04d371f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4886, + "startColumn": 2, + "charOffset": 169581, + "charLength": 18, + "snippet": { + "text": "internalStartTrade" + } + }, + "contextRegion": { + "startLine": 4884, + "startColumn": 2, + "charOffset": 169576, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tinternalStartTrade(player, tradePartner, tradeItem);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b56aad5e92c824c87cae339343fd9ac7d0579af44017b778b3f93ddf276302ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4889, + "startColumn": 55, + "charOffset": 169691, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 4887, + "startColumn": 55, + "charOffset": 169634, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Game::internalStartTrade(std::shared_ptr player, std::shared_ptr tradePartner, std::shared_ptr tradeItem) {\n\tif (player->tradeState != TRADE_NONE && !(player->tradeState == TRADE_ACKNOWLEDGE && player->tradePartner == tradePartner)) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_YOUAREALREADYTRADING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a5038f104915b563ad3ec63644d5b34e4de9cabe12ea2abcff7c755aeb6cd0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'tradePartner' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4889, + "startColumn": 87, + "charOffset": 169723, + "charLength": 12, + "snippet": { + "text": "tradePartner" + } + }, + "contextRegion": { + "startLine": 4887, + "startColumn": 87, + "charOffset": 169634, + "charLength": 12, + "snippet": { + "text": "}\n\nbool Game::internalStartTrade(std::shared_ptr player, std::shared_ptr tradePartner, std::shared_ptr tradeItem) {\n\tif (player->tradeState != TRADE_NONE && !(player->tradeState == TRADE_ACKNOWLEDGE && player->tradePartner == tradePartner)) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_YOUAREALREADYTRADING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1ce4214e941f877fd8aca0bf72253357874c29faa787bc44743bf0c61a7d7bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'tradeItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4889, + "startColumn": 123, + "charOffset": 169759, + "charLength": 9, + "snippet": { + "text": "tradeItem" + } + }, + "contextRegion": { + "startLine": 4887, + "startColumn": 123, + "charOffset": 169634, + "charLength": 9, + "snippet": { + "text": "}\n\nbool Game::internalStartTrade(std::shared_ptr player, std::shared_ptr tradePartner, std::shared_ptr tradeItem) {\n\tif (player->tradeState != TRADE_NONE && !(player->tradeState == TRADE_ACKNOWLEDGE && player->tradePartner == tradePartner)) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_YOUAREALREADYTRADING);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c027d7f84ef714eff5782dd420382880709b0d7a6bc6cfd1315fca92901cfbc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4890, + "startColumn": 2, + "charOffset": 169773, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 4888, + "startColumn": 2, + "charOffset": 169636, + "charLength": 2, + "snippet": { + "text": "\nbool Game::internalStartTrade(std::shared_ptr player, std::shared_ptr tradePartner, std::shared_ptr tradeItem) {\n\tif (player->tradeState != TRADE_NONE && !(player->tradeState == TRADE_ACKNOWLEDGE && player->tradePartner == tradePartner)) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_YOUAREALREADYTRADING);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39d921c16adcee598da39f3222209b72cbf13d5b8c97f6174fabb36dbbec6fd7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4890, + "startColumn": 42, + "charOffset": 169813, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4888, + "startColumn": 42, + "charOffset": 169636, + "charLength": 1, + "snippet": { + "text": "\nbool Game::internalStartTrade(std::shared_ptr player, std::shared_ptr tradePartner, std::shared_ptr tradeItem) {\n\tif (player->tradeState != TRADE_NONE && !(player->tradeState == TRADE_ACKNOWLEDGE && player->tradePartner == tradePartner)) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_YOUAREALREADYTRADING);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "166b9577a94bcc9b0f58ad76b18ae098757a8439f46b1aaef212abbd606e9d8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4893, + "startColumn": 4, + "charOffset": 169981, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 4891, + "startColumn": 4, + "charOffset": 169899, + "charLength": 4, + "snippet": { + "text": "\t\tplayer->sendCancelMessage(RETURNVALUE_YOUAREALREADYTRADING);\n\t\treturn false;\n\t} else if (tradePartner->tradeState != TRADE_NONE && tradePartner->tradePartner != player) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_THISPLAYERISALREADYTRADING);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "455692f8afdca70ca7eca5048bc5b983c562a0dae686d20c77767502984e9e3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'playerAcceptTrade' has cognitive complexity of 33 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4924, + "startColumn": 12, + "charOffset": 171064, + "charLength": 17, + "snippet": { + "text": "playerAcceptTrade" + } + }, + "contextRegion": { + "startLine": 4922, + "startColumn": 12, + "charOffset": 171050, + "charLength": 17, + "snippet": { + "text": "}\n\nvoid Game::playerAcceptTrade(uint32_t playerId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d68516d833ee639f57998bd94c7188976f65237070f40f32013274c6af01341e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4926, + "startColumn": 6, + "charOffset": 171167, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4924, + "startColumn": 6, + "charOffset": 171053, + "charLength": 1, + "snippet": { + "text": "void Game::playerAcceptTrade(uint32_t playerId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5203fba1082668adce4492ab589642bcc0130a7927c83d6965bc6cbdabda0447" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "boolean expression can be simplified by DeMorgan's theorem" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4930, + "startColumn": 6, + "charOffset": 171197, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4928, + "startColumn": 6, + "charOffset": 171188, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!(player->getTradeState() == TRADE_ACKNOWLEDGE || player->getTradeState() == TRADE_INITIATED)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "722bbaa1c6e0ef159a71d880cb191feaf294c81acfd425b90ccc8b8b4019eab5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 4935, + "startColumn": 6, + "charOffset": 171375, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 4933, + "startColumn": 6, + "charOffset": 171307, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr tradePartner = player->tradePartner;\n\tif (!tradePartner) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "894cf6e232aeceb7d01a519551ef84f5adbdcb2fd82c03a7523947ed7227468b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5026, + "startColumn": 83, + "charOffset": 174541, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 5024, + "startColumn": 83, + "charOffset": 174456, + "charLength": 4, + "snippet": { + "text": "}\n\nstd::string Game::getTradeErrorDescription(ReturnValue ret, std::shared_ptr item) {\n\tif (item) {\n\t\tif (ret == RETURNVALUE_NOTENOUGHCAPACITY) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f265821b7647ab4bfba2086b36a3ae203ecc7c85e7f4924989ea27be11bfedf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5028, + "startColumn": 3, + "charOffset": 174564, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 5026, + "startColumn": 3, + "charOffset": 174459, + "charLength": 2, + "snippet": { + "text": "std::string Game::getTradeErrorDescription(ReturnValue ret, std::shared_ptr item) {\n\tif (item) {\n\t\tif (ret == RETURNVALUE_NOTENOUGHCAPACITY) {\n\t\t\tstd::ostringstream ss;\n\t\t\tss << \"You do not have enough capacity to carry\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0b6c00bd167affe0e14e156d597f418f14291cb57a84ed8ffa1e3260af36a9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5041, + "startColumn": 5, + "charOffset": 174909, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 5039, + "startColumn": 5, + "charOffset": 174839, + "charLength": 4, + "snippet": { + "text": "\t\t\t << ' ' << item->getWeightDescription();\n\t\t\treturn ss.str();\n\t\t} else if (ret == RETURNVALUE_NOTENOUGHROOM || ret == RETURNVALUE_CONTAINERNOTENOUGHROOM) {\n\t\t\tstd::ostringstream ss;\n\t\t\tss << \"You do not have enough room to carry\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd12cda50c393d9a416ed5814385861e3d9a90ab0ea5ed0709dd589d7baecc04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5059, + "startColumn": 6, + "charOffset": 175432, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5057, + "startColumn": 6, + "charOffset": 175278, + "charLength": 1, + "snippet": { + "text": "void Game::playerLookInTrade(uint32_t playerId, bool lookAtCounterOffer, uint8_t index) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8764002b1f3ebe46e29696daadc0b05683cb99cd48e64b53e40d77ff02ec7da1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5064, + "startColumn": 6, + "charOffset": 175524, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5062, + "startColumn": 6, + "charOffset": 175456, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr tradePartner = player->tradePartner;\n\tif (!tradePartner) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fcbadfc3489abaa234b28616b29669da9116ce7c67876554b75953ee6ebb3f77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5075, + "startColumn": 6, + "charOffset": 175717, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5073, + "startColumn": 6, + "charOffset": 175708, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!tradeItem) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7667c4b9aab1e055fa864e66249dc4eef3c4e136e6928ace062ab87ebb56953d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5093, + "startColumn": 6, + "charOffset": 176385, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5091, + "startColumn": 6, + "charOffset": 176307, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr tradeContainer = tradeItem->getContainer();\n\tif (!tradeContainer) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8a0f8e6e36b8dedc17fa8dc7faaf7610897c9cfa8d0b6712d157328816ba49c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5099, + "startColumn": 2, + "charOffset": 176506, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 5097, + "startColumn": 2, + "charOffset": 176418, + "charLength": 5, + "snippet": { + "text": "\tstd::vector> containers { tradeContainer };\n\tsize_t i = 0;\n\twhile (i < containers.size()) {\n\t\tstd::shared_ptr container = containers[i++];\n\t\tfor (const std::shared_ptr &item : container->getItemList()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d1e683cba294fec0bbf5d40febbcd7c5469740cc521025c2558dcaad9fe52aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5118, + "startColumn": 6, + "charOffset": 177201, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5116, + "startColumn": 6, + "charOffset": 177088, + "charLength": 1, + "snippet": { + "text": "void Game::playerCloseTrade(uint32_t playerId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08bd7152a911f72a453e74c779cd0912ce3992614efd0931bf8a9edb1846dac0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5125, + "startColumn": 55, + "charOffset": 177312, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 5123, + "startColumn": 55, + "charOffset": 177255, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::internalCloseTrade(std::shared_ptr player) {\n\tstd::shared_ptr tradePartner = player->tradePartner;\n\tif ((tradePartner && tradePartner->getTradeState() == TRADE_TRANSFER) || player->getTradeState() == TRADE_TRANSFER) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29b04b46fa07c2a662c65f47d7ff8159ab97350d27fe56e6d1b47d2b830fc088" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "3 adjacent parameters of 'playerBuyItem' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5166, + "startColumn": 26, + "charOffset": 178438, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 5164, + "startColumn": 26, + "charOffset": 178410, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerBuyItem(uint32_t playerId, uint16_t itemId, uint8_t count, uint16_t amount, bool ignoreCap /* = false*/, bool inBackpacks /* = false*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (amount == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3442e654845ba4286227199930fa232df0c47300b2daf7c15436c83aaa0a037f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5167, + "startColumn": 34, + "charOffset": 178601, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 5165, + "startColumn": 34, + "charOffset": 178412, + "charLength": 15, + "snippet": { + "text": "\nvoid Game::playerBuyItem(uint32_t playerId, uint16_t itemId, uint8_t count, uint16_t amount, bool ignoreCap /* = false*/, bool inBackpacks /* = false*/) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (amount == 0) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f985b54cc09178c6678d692e7f496b5f748bb007f9b5a3748aa3a85c167c27e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5173, + "startColumn": 6, + "charOffset": 178717, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5171, + "startColumn": 6, + "charOffset": 178652, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73fa127a78cdaee27411e75cb0f0ff803a8070a9fd86a7a0a02ad307b5a8d302" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5178, + "startColumn": 6, + "charOffset": 178804, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5176, + "startColumn": 6, + "charOffset": 178741, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr merchant = player->getShopOwner();\n\tif (!merchant) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aea714879afba4908bdab2e40b93264f425d4615e014690e194557088d521dcd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5187, + "startColumn": 32, + "charOffset": 178938, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 5185, + "startColumn": 32, + "charOffset": 178903, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tif ((it.stackable && amount > 10000) || (!it.stackable && amount > 100)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3bc3b2141c37385020b4cdc1759db57f2054a114be2a9d8fffc3eb52b48bc630" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5187, + "startColumn": 69, + "charOffset": 178975, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 5185, + "startColumn": 69, + "charOffset": 178903, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tif ((it.stackable && amount > 10000) || (!it.stackable && amount > 100)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0682d1ce0bbb504129d3d57c735cc53211474773ccc0f324466d3e3c29a8da0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5212, + "startColumn": 39, + "charOffset": 179720, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 5210, + "startColumn": 39, + "charOffset": 179631, + "charLength": 2, + "snippet": { + "text": "\n\t\tstd::shared_ptr tile = player->getTile();\n\t\tif (tile && tile->getItemCount() >= 20) {\n\t\t\tplayer->sendCancelMessage(RETURNVALUE_CONTAINERISFULL);\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb87639c7e62d26612e76cc8b9585108b4f2391887f97bbf5ef451ed9ce6e0fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "3 adjacent parameters of 'playerSellItem' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5222, + "startColumn": 27, + "charOffset": 179945, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 5220, + "startColumn": 27, + "charOffset": 179916, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerSellItem(uint32_t playerId, uint16_t itemId, uint8_t count, uint16_t amount, bool ignoreEquipped) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (amount == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73e7eeac7118bad7383f0920e066303866b18b2a4d1fbd8b6a1ad1e7059c3c94" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5223, + "startColumn": 34, + "charOffset": 180069, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 5221, + "startColumn": 34, + "charOffset": 179918, + "charLength": 15, + "snippet": { + "text": "\nvoid Game::playerSellItem(uint32_t playerId, uint16_t itemId, uint8_t count, uint16_t amount, bool ignoreEquipped) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (amount == 0) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17004d99a5b95a9d5ec2de9dc6a9fa06f97e05b2c7388104686552efaf9a704c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5229, + "startColumn": 6, + "charOffset": 180185, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5227, + "startColumn": 6, + "charOffset": 180120, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a7c252260675eb45ffb535f829a53a87d9372504c1009bad8fabc13d4df13f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5234, + "startColumn": 6, + "charOffset": 180272, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5232, + "startColumn": 6, + "charOffset": 180209, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr merchant = player->getShopOwner();\n\tif (!merchant) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "278f249c0d5d44a8de94915be732a9f458045b989499cf47822eb19a7975f0b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5243, + "startColumn": 32, + "charOffset": 180406, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 5241, + "startColumn": 32, + "charOffset": 180371, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tif ((it.stackable && amount > 10000) || (!it.stackable && amount > 100)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df9a778f41fe5ab0ffdc6c1d8043470e02d00f5bd476f911ece348eee00e7dd4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5243, + "startColumn": 69, + "charOffset": 180443, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 5241, + "startColumn": 69, + "charOffset": 180371, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tif ((it.stackable && amount > 10000) || (!it.stackable && amount > 100)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c08bcc105fcd9b02e92e58a2e24b3f25c8981cb21ec29dac349313be9a78430" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5259, + "startColumn": 6, + "charOffset": 180817, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5257, + "startColumn": 6, + "charOffset": 180705, + "charLength": 1, + "snippet": { + "text": "void Game::playerCloseShop(uint32_t playerId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79e6ddff163b560642fd4d9493fcc36b80c1cb7b50c39af2ba5371393224c44e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5263, + "startColumn": 10, + "charOffset": 180851, + "charLength": 15, + "snippet": { + "text": "closeShopWindow" + } + }, + "contextRegion": { + "startLine": 5261, + "startColumn": 10, + "charOffset": 180838, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tplayer->closeShopWindow();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3a46d3248d7da71762f18bb753c5568bcc31e35364de0441ae1c6e4d8c0a99f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "3 adjacent parameters of 'playerLookInShop' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5266, + "startColumn": 29, + "charOffset": 180901, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 5264, + "startColumn": 29, + "charOffset": 180870, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerLookInShop(uint32_t playerId, uint16_t itemId, uint8_t count) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ef3be0a2009a233d78fe4b29170c38bf46d70313ec2b096af04b0953fbe46f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5268, + "startColumn": 6, + "charOffset": 181018, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5266, + "startColumn": 6, + "charOffset": 180873, + "charLength": 1, + "snippet": { + "text": "void Game::playerLookInShop(uint32_t playerId, uint16_t itemId, uint8_t count) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ddc67c78c8a7ce8591654ade7ab837adc79e4d826dc28171cd0a2d19f93dfef5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5273, + "startColumn": 6, + "charOffset": 181105, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5271, + "startColumn": 6, + "charOffset": 181042, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr merchant = player->getShopOwner();\n\tif (!merchant) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b2b3af8eb93dc95c5a38460de444683c3544453fa898602e9ff5823434bc0d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerLookAt' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5296, + "startColumn": 25, + "charOffset": 181649, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 5294, + "startColumn": 25, + "charOffset": 181622, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerLookAt(uint32_t playerId, uint16_t itemId, const Position &pos, uint8_t stackPos) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4a53a4da661f783f547351091e9c54a03de5f721ada1c7f9a637ef198ff79f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5298, + "startColumn": 6, + "charOffset": 181790, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5296, + "startColumn": 6, + "charOffset": 181625, + "charLength": 1, + "snippet": { + "text": "void Game::playerLookAt(uint32_t playerId, uint16_t itemId, const Position &pos, uint8_t stackPos) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "308cb73aa4804875f6030020a37af1224a7d50288615a8ae316113f32c58efeb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5303, + "startColumn": 6, + "charOffset": 181916, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5301, + "startColumn": 6, + "charOffset": 181814, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr thing = internalGetThing(player, pos, stackPos, itemId, STACKPOS_LOOK);\n\tif (!thing) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "730e1180905a23b2df7eff833ca40b770f8890baf3252a2ac5a8398417140ace" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'lookDistance' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5316, + "startColumn": 10, + "charOffset": 182194, + "charLength": 12, + "snippet": { + "text": "lookDistance" + } + }, + "contextRegion": { + "startLine": 5314, + "startColumn": 10, + "charOffset": 182139, + "charLength": 12, + "snippet": { + "text": "\tPosition playerPos = player->getPosition();\n\n\tint32_t lookDistance;\n\tif (thing != player) {\n\t\tlookDistance = std::max(Position::getDistanceX(playerPos, thingPos), Position::getDistanceY(playerPos, thingPos));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e68e5008b391128454bd200ed23b48b1213b7f85ca5e990a78c1a08a68b1ad21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "15 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5320, + "startColumn": 20, + "charOffset": 182412, + "charLength": 2, + "snippet": { + "text": "15" + } + }, + "contextRegion": { + "startLine": 5318, + "startColumn": 20, + "charOffset": 182232, + "charLength": 2, + "snippet": { + "text": "\t\tlookDistance = std::max(Position::getDistanceX(playerPos, thingPos), Position::getDistanceY(playerPos, thingPos));\n\t\tif (playerPos.z != thingPos.z) {\n\t\t\tlookDistance += 15;\n\t\t}\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba933ee170f64753d78c7261485e8bbd28f9afb609d201da730500ac98a9c4c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerLookInBattleList' of similar type ('uint32_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5331, + "startColumn": 35, + "charOffset": 182739, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 5329, + "startColumn": 35, + "charOffset": 182702, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerLookInBattleList(uint32_t playerId, uint32_t creatureId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24ff19f319cb612a964982998e385511241cf486c572bd0b346e27ff910e36ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5333, + "startColumn": 6, + "charOffset": 182845, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5331, + "startColumn": 6, + "charOffset": 182705, + "charLength": 1, + "snippet": { + "text": "void Game::playerLookInBattleList(uint32_t playerId, uint32_t creatureId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0f776cb8864207680a0113277a277fd35c5c9f93a15d5c4733a85c9cbad218a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5338, + "startColumn": 6, + "charOffset": 182942, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5336, + "startColumn": 6, + "charOffset": 182869, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr creature = getCreatureByID(creatureId);\n\tif (!creature) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76e28a8c5cf529d6412deda33ea3c805f99fa936c8bc93c38a21c425736bc645" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'lookDistance' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5351, + "startColumn": 10, + "charOffset": 183141, + "charLength": 12, + "snippet": { + "text": "lookDistance" + } + }, + "contextRegion": { + "startLine": 5349, + "startColumn": 10, + "charOffset": 183128, + "charLength": 12, + "snippet": { + "text": "\t}\n\n\tint32_t lookDistance;\n\tif (creature != player) {\n\t\tconst Position &playerPos = player->getPosition();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08c47d790557b59b9a80ce6b4b18e650e6006130a2b4d31fc6e79c43498389d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "15 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5356, + "startColumn": 20, + "charOffset": 183424, + "charLength": 2, + "snippet": { + "text": "15" + } + }, + "contextRegion": { + "startLine": 5354, + "startColumn": 20, + "charOffset": 183235, + "charLength": 2, + "snippet": { + "text": "\t\tlookDistance = std::max(Position::getDistanceX(playerPos, creaturePos), Position::getDistanceY(playerPos, creaturePos));\n\t\tif (playerPos.z != creaturePos.z) {\n\t\t\tlookDistance += 15;\n\t\t}\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "570991906c16a077cf2a6614c2001dd7a49077df306a978800afd7c4101141b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'playerQuickLoot' has cognitive complexity of 58 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5366, + "startColumn": 12, + "charOffset": 183705, + "charLength": 15, + "snippet": { + "text": "playerQuickLoot" + } + }, + "contextRegion": { + "startLine": 5364, + "startColumn": 12, + "charOffset": 183691, + "charLength": 15, + "snippet": { + "text": "}\n\nvoid Game::playerQuickLoot(uint32_t playerId, const Position &pos, uint16_t itemId, uint8_t stackPos, std::shared_ptr defaultItem, bool lootAllCorpses, bool autoLoot) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3effbde2d07da68f5a41322d983fa2ea826e695a5e1be0b5789a5228df3d1de2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'defaultItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5366, + "startColumn": 125, + "charOffset": 183818, + "charLength": 11, + "snippet": { + "text": "defaultItem" + } + }, + "contextRegion": { + "startLine": 5364, + "startColumn": 125, + "charOffset": 183691, + "charLength": 11, + "snippet": { + "text": "}\n\nvoid Game::playerQuickLoot(uint32_t playerId, const Position &pos, uint16_t itemId, uint8_t stackPos, std::shared_ptr defaultItem, bool lootAllCorpses, bool autoLoot) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b34309d2a468efaab3339fb1ea2340d333a6cdfd01d8b24b569937d1261625a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5368, + "startColumn": 6, + "charOffset": 183933, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5366, + "startColumn": 6, + "charOffset": 183694, + "charLength": 1, + "snippet": { + "text": "void Game::playerQuickLoot(uint32_t playerId, const Position &pos, uint16_t itemId, uint8_t stackPos, std::shared_ptr defaultItem, bool lootAllCorpses, bool autoLoot) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "317bdb3b5eedc8f76affe086f992c53ade4b34314a556f492e18a4323745d10f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5384, + "startColumn": 2, + "charOffset": 184389, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 5382, + "startColumn": 2, + "charOffset": 184384, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (!autoLoot && pos.x != 0xffff) {\n\t\tif (!Position::areInRange<1, 1, 0>(pos, player->getPosition())) {\n\t\t\t// need to walk to the corpse first before looting it" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5d372f52774e474f2bf907dbed70c256a7e31062e5a9223b46e6cfd6f6a9c5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xffff is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5384, + "startColumn": 28, + "charOffset": 184415, + "charLength": 6, + "snippet": { + "text": "0xffff" + } + }, + "contextRegion": { + "startLine": 5382, + "startColumn": 28, + "charOffset": 184384, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tif (!autoLoot && pos.x != 0xffff) {\n\t\tif (!Position::areInRange<1, 1, 0>(pos, player->getPosition())) {\n\t\t\t// need to walk to the corpse first before looting it" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "807715a24f99ee8df730185455d928a729e8b6e0a797cd41e697b68127a228d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5414, + "startColumn": 6, + "charOffset": 185451, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5412, + "startColumn": 6, + "charOffset": 185406, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = nullptr;\n\tif (!defaultItem) {\n\t\tstd::shared_ptr thing = internalGetThing(player, pos, stackPos, itemId, STACKPOS_FIND_THING);\n\t\tif (!thing) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec0b29013948c21eb782f6d0face054a2e3d9582d6aefea2083da31341a7f395" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5416, + "startColumn": 7, + "charOffset": 185576, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5414, + "startColumn": 7, + "charOffset": 185446, + "charLength": 1, + "snippet": { + "text": "\tif (!defaultItem) {\n\t\tstd::shared_ptr thing = internalGetThing(player, pos, stackPos, itemId, STACKPOS_FIND_THING);\n\t\tif (!thing) {\n\t\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4818148e712544cbc4bfdd48fdfe9d55ad87039a85faa891592199696850e588" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5426, + "startColumn": 6, + "charOffset": 185725, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5424, + "startColumn": 6, + "charOffset": 185716, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!item || !item->getParent()) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "317bdb3b5eedc8f76affe086f992c53ade4b34314a556f492e18a4323745d10f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5426, + "startColumn": 15, + "charOffset": 185734, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5424, + "startColumn": 15, + "charOffset": 185716, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!item || !item->getParent()) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16a062f4060a9ef059589e6a5b2ce6a8e0da1344d434c1ce681616953c64b0cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xffff is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5432, + "startColumn": 15, + "charOffset": 185884, + "charLength": 6, + "snippet": { + "text": "0xffff" + } + }, + "contextRegion": { + "startLine": 5430, + "startColumn": 15, + "charOffset": 185823, + "charLength": 6, + "snippet": { + "text": "\n\tstd::shared_ptr corpse = nullptr;\n\tif (pos.x == 0xffff) {\n\t\tcorpse = item->getParent()->getContainer();\n\t\tif (corpse && corpse->getID() == ITEM_BROWSEFIELD) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85fd6d46e6498341a2ac9042246bf86795d51d8a3ada4a000dd1afc9fba4bc51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5442, + "startColumn": 6, + "charOffset": 186108, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5440, + "startColumn": 6, + "charOffset": 186099, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!corpse || corpse->hasAttribute(ItemAttribute_t::UNIQUEID) || corpse->hasAttribute(ItemAttribute_t::ACTIONID)) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1bd0ea20c070ffc84ea604635fb4f5c83983b73ab33c8bcdcfb9eb8db9f3dc0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xffff is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5455, + "startColumn": 15, + "charOffset": 186527, + "charLength": 6, + "snippet": { + "text": "0xffff" + } + }, + "contextRegion": { + "startLine": 5453, + "startColumn": 15, + "charOffset": 186509, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tif (pos.x == 0xffff && !browseField && !corpse->isRewardCorpse()) {\n\t\tuint32_t worth = item->getWorth();\n\t\tObjectCategory_t category = getObjectCategory(item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39dcb25cb8012e429f11c28db712762e9975ddae37f18e9eaf210de54e6bbd15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5467, + "startColumn": 33, + "charOffset": 187137, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 5465, + "startColumn": 33, + "charOffset": 187057, + "charLength": 4, + "snippet": { + "text": "\t\t} else {\n\t\t\tif (ret == RETURNVALUE_NOERROR) {\n\t\t\t\tplayer->sendLootStats(item, item->getItemCount());\n\t\t\t\tss << \"You looted \";\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82923ab12f66cab80166f69062b5a6399d47f8b98debc9df314352c2d9c82c12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "15000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5483, + "startColumn": 43, + "charOffset": 187435, + "charLength": 5, + "snippet": { + "text": "15000" + } + }, + "contextRegion": { + "startLine": 5481, + "startColumn": 43, + "charOffset": 187388, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\n\t\tif (player->lastQuickLootNotification + 15000 < OTSYS_TIME()) {\n\t\t\tplayer->sendTextMessage(MESSAGE_GAME_HIGHLIGHT, ss.str());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e665b7bbde8f18b244bb74eebbe381eda8cd714c03fdfcb7addb744464f2bc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5507, + "startColumn": 57, + "charOffset": 188164, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 5505, + "startColumn": 57, + "charOffset": 188105, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::playerLootAllCorpses(std::shared_ptr player, const Position &pos, bool lootAllCorpses) {\n\tif (lootAllCorpses) {\n\t\tstd::shared_ptr tile = g_game().map.getTile(pos.x, pos.y, pos.z);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c94c32794e51ec74177414a9bf4e0f2ef2895ad3e4c926bf37a8b0e214c9738" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5510, + "startColumn": 7, + "charOffset": 188319, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5508, + "startColumn": 7, + "charOffset": 188216, + "charLength": 1, + "snippet": { + "text": "\tif (lootAllCorpses) {\n\t\tstd::shared_ptr tile = g_game().map.getTile(pos.x, pos.y, pos.z);\n\t\tif (!tile) {\n\t\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5203fba1082668adce4492ab589642bcc0130a7927c83d6965bc6cbdabda0447" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5558, + "startColumn": 6, + "charOffset": 189779, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5556, + "startColumn": 6, + "charOffset": 189552, + "charLength": 1, + "snippet": { + "text": "void Game::playerSetManagedContainer(uint32_t playerId, ObjectCategory_t category, const Position &pos, uint16_t itemId, uint8_t stackPos, bool isLootContainer) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || pos.x != 0xffff) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac1eb96d97c164db4fe6948802dccb0eab4fcd966fa9dafedf0e90f29dc562a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xffff is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5558, + "startColumn": 26, + "charOffset": 189799, + "charLength": 6, + "snippet": { + "text": "0xffff" + } + }, + "contextRegion": { + "startLine": 5556, + "startColumn": 26, + "charOffset": 189552, + "charLength": 6, + "snippet": { + "text": "void Game::playerSetManagedContainer(uint32_t playerId, ObjectCategory_t category, const Position &pos, uint16_t itemId, uint8_t stackPos, bool isLootContainer) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || pos.x != 0xffff) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "540155ef19ee48be131bca4dcea9d8f75af44baa13774a75e2894db700977552" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5563, + "startColumn": 6, + "charOffset": 189927, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5561, + "startColumn": 6, + "charOffset": 189822, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr thing = internalGetThing(player, pos, stackPos, itemId, STACKPOS_USEITEM);\n\tif (!thing) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f6e0d07d61d1e0b428a45163cb4b4fb06924d6d48183128d8497ead960204d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5570, + "startColumn": 6, + "charOffset": 190251, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5568, + "startColumn": 6, + "charOffset": 190005, + "charLength": 1, + "snippet": { + "text": "\tstd::shared_ptr container = thing->getContainer();\n\tauto allowConfig = g_configManager().getBoolean(TOGGLE_GOLD_POUCH_ALLOW_ANYTHING, __FUNCTION__) || g_configManager().getBoolean(TOGGLE_GOLD_POUCH_QUICKLOOT_ONLY, __FUNCTION__);\n\tif (!container || ((container->getID() == ITEM_GOLD_POUCH && category != OBJECTCATEGORY_GOLD) && !allowConfig)) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98bc6319e117250944ff6753c77c6f8ad136bdb84f4e55f16b89f0e5d19cbb5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5590, + "startColumn": 45, + "charOffset": 191038, + "charLength": 5, + "snippet": { + "text": "getID" + } + }, + "contextRegion": { + "startLine": 5588, + "startColumn": 45, + "charOffset": 190919, + "charLength": 5, + "snippet": { + "text": "\tstd::shared_ptr parent = container->getParent();\n\tif (parent) {\n\t\tparent->updateThing(container, container->getID(), container->getItemCount());\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5106ec6b648f7ee05cb6585fa3427977174fe641b38cf89ccb4395abacc8440c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5590, + "startColumn": 65, + "charOffset": 191058, + "charLength": 12, + "snippet": { + "text": "getItemCount" + } + }, + "contextRegion": { + "startLine": 5588, + "startColumn": 65, + "charOffset": 190919, + "charLength": 12, + "snippet": { + "text": "\tstd::shared_ptr parent = container->getParent();\n\tif (parent) {\n\t\tparent->updateThing(container, container->getID(), container->getItemCount());\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7304bab3673ad8999acc260da1345e9c3158e49a9138283f57b5b926b8e5be69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5596, + "startColumn": 62, + "charOffset": 191236, + "charLength": 5, + "snippet": { + "text": "getID" + } + }, + "contextRegion": { + "startLine": 5594, + "startColumn": 62, + "charOffset": 191116, + "charLength": 5, + "snippet": { + "text": "\t\tparent = previousContainer->getParent();\n\t\tif (parent) {\n\t\t\tparent->updateThing(previousContainer, previousContainer->getID(), previousContainer->getItemCount());\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90ecf24b863b50f7ca9a0b10ea6af3080f1f0f9ae6cbe8db521c7f46481e728c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5596, + "startColumn": 90, + "charOffset": 191264, + "charLength": 12, + "snippet": { + "text": "getItemCount" + } + }, + "contextRegion": { + "startLine": 5594, + "startColumn": 90, + "charOffset": 191116, + "charLength": 12, + "snippet": { + "text": "\t\tparent = previousContainer->getParent();\n\t\tif (parent) {\n\t\t\tparent->updateThing(previousContainer, previousContainer->getID(), previousContainer->getItemCount());\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3eba8dda40261ad923d2ef46907f06b57d5d223861164ed612269a30ce00243b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5603, + "startColumn": 6, + "charOffset": 191464, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5601, + "startColumn": 6, + "charOffset": 191291, + "charLength": 1, + "snippet": { + "text": "void Game::playerClearManagedContainer(uint32_t playerId, ObjectCategory_t category, bool isLootContainer) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4818148e712544cbc4bfdd48fdfe9d55ad87039a85faa891592199696850e588" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5613, + "startColumn": 62, + "charOffset": 191821, + "charLength": 5, + "snippet": { + "text": "getID" + } + }, + "contextRegion": { + "startLine": 5611, + "startColumn": 62, + "charOffset": 191675, + "charLength": 5, + "snippet": { + "text": "\t\tstd::shared_ptr parent = previousContainer->getParent();\n\t\tif (parent) {\n\t\t\tparent->updateThing(previousContainer, previousContainer->getID(), previousContainer->getItemCount());\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b0772f5ee6429c0c8af11a4ac86f5eeabf25489ba02f9b4b885203eeab02051" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5613, + "startColumn": 90, + "charOffset": 191849, + "charLength": 12, + "snippet": { + "text": "getItemCount" + } + }, + "contextRegion": { + "startLine": 5611, + "startColumn": 90, + "charOffset": 191675, + "charLength": 12, + "snippet": { + "text": "\t\tstd::shared_ptr parent = previousContainer->getParent();\n\t\tif (parent) {\n\t\t\tparent->updateThing(previousContainer, previousContainer->getID(), previousContainer->getItemCount());\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "093d8c6ee61c029dc4712c0c2bbe48321b06d89b49c061557400140c2e011e3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5620, + "startColumn": 6, + "charOffset": 192048, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5618, + "startColumn": 6, + "charOffset": 191876, + "charLength": 1, + "snippet": { + "text": "void Game::playerOpenManagedContainer(uint32_t playerId, ObjectCategory_t category, bool isLootContainer) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "278f249c0d5d44a8de94915be732a9f458045b989499cf47822eb19a7975f0b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5625, + "startColumn": 6, + "charOffset": 192174, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5623, + "startColumn": 6, + "charOffset": 192072, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr container = player->getManagedContainer(category, isLootContainer);\n\tif (!container) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e84e060de76ed8502fa99f89e35766156c454daf495af73bd02247ef9b509ab7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5634, + "startColumn": 6, + "charOffset": 192447, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5632, + "startColumn": 6, + "charOffset": 192309, + "charLength": 1, + "snippet": { + "text": "void Game::playerSetQuickLootFallback(uint32_t playerId, bool fallback) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d9f8424933b1f9a729c6a239ef714732274d0789ee685f44cf91d9859abbc1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5643, + "startColumn": 6, + "charOffset": 192718, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5641, + "startColumn": 6, + "charOffset": 192529, + "charLength": 1, + "snippet": { + "text": "void Game::playerQuickLootBlackWhitelist(uint32_t playerId, QuickLootFilter_t filter, const std::vector itemIds) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6dd6151c0776a619a3c30fbc43f088838c8d2d18d5ed137dd7c22ae5278a351d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5656, + "startColumn": 6, + "charOffset": 193127, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5654, + "startColumn": 6, + "charOffset": 193007, + "charLength": 1, + "snippet": { + "text": "void Game::playerRequestDepotItems(uint32_t playerId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || !player->isDepotSearchAvailable()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba0c5ad01929bf4a9ba3e012e4330d3ba21fcb46a14b2bc26c21f2553d2aa039" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "500 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5660, + "startColumn": 28, + "charOffset": 193216, + "charLength": 3, + "snippet": { + "text": "500" + } + }, + "contextRegion": { + "startLine": 5658, + "startColumn": 28, + "charOffset": 193185, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tif (player->isUIExhausted(500)) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_YOUAREEXHAUSTED);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74f50963950d53b7c60016ac69ea568a1fbac2262bd604b34b2252b1a86b6458" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5671, + "startColumn": 6, + "charOffset": 193485, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5669, + "startColumn": 6, + "charOffset": 193359, + "charLength": 1, + "snippet": { + "text": "void Game::playerRequestCloseDepotSearch(uint32_t playerId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || !player->isDepotSearchOpen()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d0b513e541c74c2f5d3a33e25d372430c54fa76dc4391ec744f6a42183429cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerRequestDepotSearchItem' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5679, + "startColumn": 41, + "charOffset": 193655, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 5677, + "startColumn": 41, + "charOffset": 193612, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerRequestDepotSearchItem(uint32_t playerId, uint16_t itemId, uint8_t tier) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || !player->isDepotSearchOpen()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff3f53cb4b3f31c7b215cf81fba90ddbeab068c1731af97af6d22b0579ba9453" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5681, + "startColumn": 6, + "charOffset": 193771, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5679, + "startColumn": 6, + "charOffset": 193615, + "charLength": 1, + "snippet": { + "text": "void Game::playerRequestDepotSearchItem(uint32_t playerId, uint16_t itemId, uint8_t tier) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || !player->isDepotSearchOpen()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca3d3facb50843e43fc367fe7910e387ea338e39b8902b908258d88e8bbf189a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "500 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5685, + "startColumn": 28, + "charOffset": 193855, + "charLength": 3, + "snippet": { + "text": "500" + } + }, + "contextRegion": { + "startLine": 5683, + "startColumn": 28, + "charOffset": 193824, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tif (player->isUIExhausted(500)) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_YOUAREEXHAUSTED);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08b14f0fe25f4eed96adf84798be88929d33dbf1da2d4bb10b2e25149db3dda7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerRequestDepotSearchRetrieve' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5694, + "startColumn": 45, + "charOffset": 194059, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 5692, + "startColumn": 45, + "charOffset": 194012, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerRequestDepotSearchRetrieve(uint32_t playerId, uint16_t itemId, uint8_t tier, uint8_t type) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || !player->isDepotSearchOpenOnItem(itemId)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3f65a82724dac41da90a28974e162a97d1f95bd045b9b59cab3eaec1d7e60f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5696, + "startColumn": 6, + "charOffset": 194189, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5694, + "startColumn": 6, + "charOffset": 194015, + "charLength": 1, + "snippet": { + "text": "void Game::playerRequestDepotSearchRetrieve(uint32_t playerId, uint16_t itemId, uint8_t tier, uint8_t type) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || !player->isDepotSearchOpenOnItem(itemId)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40ecca6f08db610726281a0644a6bac919645897a3e3399101d3db33c93dcd61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "500 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5700, + "startColumn": 28, + "charOffset": 194285, + "charLength": 3, + "snippet": { + "text": "500" + } + }, + "contextRegion": { + "startLine": 5698, + "startColumn": 28, + "charOffset": 194254, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tif (player->isUIExhausted(500)) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_YOUAREEXHAUSTED);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "435718aff3733ad70955ec0eccfbef185981b723f7b042b41b8ba95882059ecc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5711, + "startColumn": 6, + "charOffset": 194624, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5709, + "startColumn": 6, + "charOffset": 194465, + "charLength": 1, + "snippet": { + "text": "void Game::playerRequestOpenContainerFromDepotSearch(uint32_t playerId, const Position &pos) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || !player->isDepotSearchOpen()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "873c756e6cce60f379e3da69dba8272a95fa473f6ae0504710467c0e1e185011" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "500 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5715, + "startColumn": 28, + "charOffset": 194708, + "charLength": 3, + "snippet": { + "text": "500" + } + }, + "contextRegion": { + "startLine": 5713, + "startColumn": 28, + "charOffset": 194677, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tif (player->isUIExhausted(500)) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_YOUAREEXHAUSTED);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d3892b2ba828be8ac12486ad9510c1735107480a1b5931e2721023828fd7f1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5726, + "startColumn": 6, + "charOffset": 194989, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5724, + "startColumn": 6, + "charOffset": 194865, + "charLength": 1, + "snippet": { + "text": "void Game::playerCancelAttackAndFollow(uint32_t playerId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0556ca2c17dc4e98e40bae2be8ab807e289dd11fc4640001fcfb2863926d5fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerSetAttackedCreature' of similar type ('uint32_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5735, + "startColumn": 38, + "charOffset": 195152, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 5733, + "startColumn": 38, + "charOffset": 195112, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerSetAttackedCreature(uint32_t playerId, uint32_t creatureId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd8281267e040e78abe6ff93af7afb89cb2eeaf3c2a0ca4c7eb3a015cdb3446a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5737, + "startColumn": 6, + "charOffset": 195258, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5735, + "startColumn": 6, + "charOffset": 195115, + "charLength": 1, + "snippet": { + "text": "void Game::playerSetAttackedCreature(uint32_t playerId, uint32_t creatureId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7b436ee8fe8f60d3ea886f046e34043e7b7dabf76428d9d1928fdad6b3c9685" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5742, + "startColumn": 11, + "charOffset": 195350, + "charLength": 19, + "snippet": { + "text": "setAttackedCreature" + } + }, + "contextRegion": { + "startLine": 5740, + "startColumn": 11, + "charOffset": 195282, + "charLength": 19, + "snippet": { + "text": "\n\tif (player->getAttackedCreature() && creatureId == 0) {\n\t\tplayer->setAttackedCreature(nullptr);\n\t\tplayer->sendCancelTarget();\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81ddca74bd2a8a6b2903ac8af4ecfb786c4f528fb3d694abd011adca61806d6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5748, + "startColumn": 6, + "charOffset": 195502, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5746, + "startColumn": 6, + "charOffset": 195423, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr attackCreature = getCreatureByID(creatureId);\n\tif (!attackCreature) {\n\t\tplayer->setAttackedCreature(nullptr);\n\t\tplayer->sendCancelTarget();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e84e060de76ed8502fa99f89e35766156c454daf495af73bd02247ef9b509ab7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5749, + "startColumn": 11, + "charOffset": 195531, + "charLength": 19, + "snippet": { + "text": "setAttackedCreature" + } + }, + "contextRegion": { + "startLine": 5747, + "startColumn": 11, + "charOffset": 195424, + "charLength": 19, + "snippet": { + "text": "\tstd::shared_ptr attackCreature = getCreatureByID(creatureId);\n\tif (!attackCreature) {\n\t\tplayer->setAttackedCreature(nullptr);\n\t\tplayer->sendCancelTarget();\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32b2f3fc2f6c77eb19a6d63fc4673ce263512fcf583944d826177d0f023d34a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5758, + "startColumn": 11, + "charOffset": 195784, + "charLength": 19, + "snippet": { + "text": "setAttackedCreature" + } + }, + "contextRegion": { + "startLine": 5756, + "startColumn": 11, + "charOffset": 195710, + "charLength": 19, + "snippet": { + "text": "\t\tplayer->sendCancelMessage(ret);\n\t\tplayer->sendCancelTarget();\n\t\tplayer->setAttackedCreature(nullptr);\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a3a1405697e55dd950ba3c5b86d068ffac2e3cb1fd50d70476d79183b6c9dc9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5762, + "startColumn": 10, + "charOffset": 195837, + "charLength": 19, + "snippet": { + "text": "setAttackedCreature" + } + }, + "contextRegion": { + "startLine": 5760, + "startColumn": 10, + "charOffset": 195824, + "charLength": 19, + "snippet": { + "text": "\t}\n\n\tplayer->setAttackedCreature(attackCreature);\n\tg_dispatcher().addEvent([this, plyerId = player->getID()] { updateCreatureWalk(plyerId); }, \"Game::updateCreatureWalk\");\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53a036081567505fb06c781ac9bbbe84a0dba75655fe46593fc195d4d867585d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerFollowCreature' of similar type ('uint32_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5766, + "startColumn": 33, + "charOffset": 196031, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 5764, + "startColumn": 33, + "charOffset": 195996, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerFollowCreature(uint32_t playerId, uint32_t creatureId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1494f900d5be37062a798b2e5be59fef2de574638892ebae42bf0a23713142e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5768, + "startColumn": 6, + "charOffset": 196137, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5766, + "startColumn": 6, + "charOffset": 195999, + "charLength": 1, + "snippet": { + "text": "void Game::playerFollowCreature(uint32_t playerId, uint32_t creatureId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7805f730f5ba26443458d539c0d4a417339ca7836f7fa494530e36f7795b248" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5772, + "startColumn": 10, + "charOffset": 196171, + "charLength": 19, + "snippet": { + "text": "setAttackedCreature" + } + }, + "contextRegion": { + "startLine": 5770, + "startColumn": 10, + "charOffset": 196158, + "charLength": 19, + "snippet": { + "text": "\t}\n\n\tplayer->setAttackedCreature(nullptr);\n\tg_dispatcher().addEvent([this, plyerId = player->getID()] { updateCreatureWalk(plyerId); }, \"Game::updateCreatureWalk\");\n\tplayer->setFollowCreature(getCreatureByID(creatureId));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b66dc0f7aca31cc7ea1c351762de734b9040f618e9df1a8a149a50a5b7108a2d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5774, + "startColumn": 10, + "charOffset": 196332, + "charLength": 17, + "snippet": { + "text": "setFollowCreature" + } + }, + "contextRegion": { + "startLine": 5772, + "startColumn": 10, + "charOffset": 196162, + "charLength": 17, + "snippet": { + "text": "\tplayer->setAttackedCreature(nullptr);\n\tg_dispatcher().addEvent([this, plyerId = player->getID()] { updateCreatureWalk(plyerId); }, \"Game::updateCreatureWalk\");\n\tplayer->setFollowCreature(getCreatureByID(creatureId));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86a9779d529ade36d480d6b1573414eff95706551d07e6c83c0961250b3f401c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5779, + "startColumn": 6, + "charOffset": 196555, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5777, + "startColumn": 6, + "charOffset": 196383, + "charLength": 1, + "snippet": { + "text": "void Game::playerSetFightModes(uint32_t playerId, FightMode_t fightMode, bool chaseMode, bool secureMode) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d76652e789e3d4825580686de070dc363e0f31fc8d3b92a74b12370e4e1cd456" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5789, + "startColumn": 22, + "charOffset": 196785, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 5787, + "startColumn": 22, + "charOffset": 196686, + "charLength": 2, + "snippet": { + "text": "\nvoid Game::playerRequestAddVip(uint32_t playerId, const std::string &name) {\n\tif (name.length() > 25) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d987418e94d286e9b081ea915a262b5528b85a5ae48159908177fc9a89f8dd4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5794, + "startColumn": 6, + "charOffset": 196869, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5792, + "startColumn": 6, + "charOffset": 196804, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a9e6a84948b3dcb6ff8cb76aff3be0555a65483f92eb849255cc2819e536eef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5799, + "startColumn": 6, + "charOffset": 196959, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5797, + "startColumn": 6, + "charOffset": 196893, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr vipPlayer = getPlayerByName(name);\n\tif (!vipPlayer) {\n\t\tuint32_t guid;\n\t\tbool specialVip;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c28b0af33ba5e2e61c6ff5af28a5df2711576bc84994cddf854af6470a788090" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'guid' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5800, + "startColumn": 12, + "charOffset": 196984, + "charLength": 4, + "snippet": { + "text": "guid" + } + }, + "contextRegion": { + "startLine": 5798, + "startColumn": 12, + "charOffset": 196894, + "charLength": 4, + "snippet": { + "text": "\tstd::shared_ptr vipPlayer = getPlayerByName(name);\n\tif (!vipPlayer) {\n\t\tuint32_t guid;\n\t\tbool specialVip;\n\t\tstd::string formattedName = name;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "985b70921939a0f2b9c845b4e7b9db143de5e26a536cbdc05e426fe66eb83c49" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'specialVip' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5801, + "startColumn": 8, + "charOffset": 196997, + "charLength": 10, + "snippet": { + "text": "specialVip" + } + }, + "contextRegion": { + "startLine": 5799, + "startColumn": 8, + "charOffset": 196954, + "charLength": 10, + "snippet": { + "text": "\tif (!vipPlayer) {\n\t\tuint32_t guid;\n\t\tbool specialVip;\n\t\tstd::string formattedName = name;\n\t\tif (!IOLoginData::getGuidByNameEx(guid, specialVip, formattedName)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81af4d1a7354c138e16b03dc8cc48668677fc334494d891653401ca4f0360394" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5813, + "startColumn": 18, + "charOffset": 197397, + "charLength": 3, + "snippet": { + "text": "add" + } + }, + "contextRegion": { + "startLine": 5811, + "startColumn": 18, + "charOffset": 197375, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tplayer->vip()->add(guid, formattedName, VipStatus_t::Offline);\n\t} else {\n\t\tif (vipPlayer->hasFlag(PlayerFlags_t::SpecialVIP) && !player->hasFlag(PlayerFlags_t::SpecialVIP)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c95b4b5c856cd98e7bee7515cc37c48bca252c8c63dbbb3f0aafd6e172a0d07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5821, + "startColumn": 19, + "charOffset": 197732, + "charLength": 3, + "snippet": { + "text": "add" + } + }, + "contextRegion": { + "startLine": 5819, + "startColumn": 19, + "charOffset": 197648, + "charLength": 3, + "snippet": { + "text": "\n\t\tif (!vipPlayer->isInGhostMode() || player->isAccessPlayer()) {\n\t\t\tplayer->vip()->add(vipPlayer->getGUID(), vipPlayer->getName(), vipPlayer->vip()->getStatus());\n\t\t} else {\n\t\t\tplayer->vip()->add(vipPlayer->getGUID(), vipPlayer->getName(), VipStatus_t::Offline);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3cbf45f1472aed082fbfd164b3beb3665b1c07c2541d5cdb75f4b04c833602ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5823, + "startColumn": 19, + "charOffset": 197841, + "charLength": 3, + "snippet": { + "text": "add" + } + }, + "contextRegion": { + "startLine": 5821, + "startColumn": 19, + "charOffset": 197714, + "charLength": 3, + "snippet": { + "text": "\t\t\tplayer->vip()->add(vipPlayer->getGUID(), vipPlayer->getName(), vipPlayer->vip()->getStatus());\n\t\t} else {\n\t\t\tplayer->vip()->add(vipPlayer->getGUID(), vipPlayer->getName(), VipStatus_t::Offline);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0bbd3b9b8f5f07977ffc61bdddef2c8bdb98b9d42e1d52924adfb85576e96f42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerRequestRemoveVip' of similar type ('uint32_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5828, + "startColumn": 35, + "charOffset": 197956, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 5826, + "startColumn": 35, + "charOffset": 197919, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerRequestRemoveVip(uint32_t playerId, uint32_t guid) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68e42dc5e831a9586dce753f9ef16af67fa1e08fa14603a4a5b91614291c0745" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5830, + "startColumn": 6, + "charOffset": 198056, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5828, + "startColumn": 6, + "charOffset": 197922, + "charLength": 1, + "snippet": { + "text": "void Game::playerRequestRemoveVip(uint32_t playerId, uint32_t guid) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "828b0a581a89b5378ced28d8d3896391423425b9816650d3b23e11607b266d44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5834, + "startColumn": 17, + "charOffset": 198097, + "charLength": 6, + "snippet": { + "text": "remove" + } + }, + "contextRegion": { + "startLine": 5832, + "startColumn": 17, + "charOffset": 198077, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tplayer->vip()->remove(guid);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0bbd3b9b8f5f07977ffc61bdddef2c8bdb98b9d42e1d52924adfb85576e96f42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerRequestEditVip' of similar type ('uint32_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5837, + "startColumn": 33, + "charOffset": 198146, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 5835, + "startColumn": 33, + "charOffset": 198111, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerRequestEditVip(uint32_t playerId, uint32_t guid, const std::string &description, uint32_t icon, bool notify, std::vector vipGroupsId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "977ba22f313868119f421911d32e2c74b94ff0c83f01a69df92b342802605df0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5839, + "startColumn": 6, + "charOffset": 198340, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5837, + "startColumn": 6, + "charOffset": 198114, + "charLength": 1, + "snippet": { + "text": "void Game::playerRequestEditVip(uint32_t playerId, uint32_t guid, const std::string &description, uint32_t icon, bool notify, std::vector vipGroupsId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "544e12bdf0b6a977a2d50dd586e3e854706442717339c65b8a7c1629d3e9a546" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5843, + "startColumn": 17, + "charOffset": 198381, + "charLength": 4, + "snippet": { + "text": "edit" + } + }, + "contextRegion": { + "startLine": 5841, + "startColumn": 17, + "charOffset": 198361, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tplayer->vip()->edit(guid, description, icon, notify, vipGroupsId);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45ba6c50754fbb3e798fa81eb33c407d27a3aa58de9fd7653916b0956e0e645e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "3 adjacent parameters of 'playerApplyImbuement' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5846, + "startColumn": 33, + "charOffset": 198468, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 5844, + "startColumn": 33, + "charOffset": 198433, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerApplyImbuement(uint32_t playerId, uint16_t imbuementid, uint8_t slot, bool protectionCharm) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4456235fa390267216e28719171f0b698a08d8517da444188671a4b9fbb8dd85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5848, + "startColumn": 6, + "charOffset": 198611, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5846, + "startColumn": 6, + "charOffset": 198436, + "charLength": 1, + "snippet": { + "text": "void Game::playerApplyImbuement(uint32_t playerId, uint16_t imbuementid, uint8_t slot, bool protectionCharm) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62cfea2eaf087f105f3f0f617409409f742f84dc11ed0d3222631d012c2fbd70" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5857, + "startColumn": 6, + "charOffset": 198755, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5855, + "startColumn": 6, + "charOffset": 198683, + "charLength": 1, + "snippet": { + "text": "\n\tImbuement* imbuement = g_imbuements().getImbuement(imbuementid);\n\tif (!imbuement) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "146a3e8edeb70f2a850226caf4e7d309aa26a05dee1a3fbbfa84fe5118686468" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'Imbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5857, + "startColumn": 7, + "charOffset": 198756, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 5855, + "startColumn": 7, + "charOffset": 198683, + "charLength": 9, + "snippet": { + "text": "\n\tImbuement* imbuement = g_imbuements().getImbuement(imbuementid);\n\tif (!imbuement) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95d07becd26e770bc7448192a5f7559f1ba186e2c0b1cd8af2478cec07593a32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5862, + "startColumn": 6, + "charOffset": 198839, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5860, + "startColumn": 6, + "charOffset": 198782, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = player->imbuingItem;\n\tif (!item) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e7158d868ad8cc8674a2e489ba8a7df2fd59503fb698a8dd1372248b6416f8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5867, + "startColumn": 129, + "charOffset": 199029, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 5865, + "startColumn": 129, + "charOffset": 198861, + "charLength": 7, + "snippet": { + "text": "\n\tif (item->getTopParent() != player) {\n\t\tg_logger().error(\"[Game::playerApplyImbuement] - An error occurred while player with name {} try to apply imbuement\", player->getName());\n\t\tplayer->sendImbuementResult(\"An error has occurred, reopen the imbuement window. If the problem persists, contact your administrator.\");\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ac816029543d41feb403165b3aeee39c812b4ae627b3b9233f3ba784ee726a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerClearImbuement' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5875, + "startColumn": 33, + "charOffset": 199296, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 5873, + "startColumn": 33, + "charOffset": 199261, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerClearImbuement(uint32_t playerid, uint8_t slot) {\n\tstd::shared_ptr player = getPlayerByID(playerid);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a26558bac6dbaf785ed2d0446b08a8571ee4f2024e22960907db72bc9ee04d18" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5877, + "startColumn": 6, + "charOffset": 199395, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5875, + "startColumn": 6, + "charOffset": 199264, + "charLength": 1, + "snippet": { + "text": "void Game::playerClearImbuement(uint32_t playerid, uint8_t slot) {\n\tstd::shared_ptr player = getPlayerByID(playerid);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e14cfb30f9ac5b81a411c2882d08ab285177360846f33914af6c44a7e08b77b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5886, + "startColumn": 6, + "charOffset": 199524, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5884, + "startColumn": 6, + "charOffset": 199467, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = player->imbuingItem;\n\tif (!item) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "441e3a051571dba24ac3b5416e5edca78ef48fec55968edda64743ba1f3863e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5895, + "startColumn": 6, + "charOffset": 199712, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5893, + "startColumn": 6, + "charOffset": 199589, + "charLength": 1, + "snippet": { + "text": "void Game::playerCloseImbuementWindow(uint32_t playerid) {\n\tstd::shared_ptr player = getPlayerByID(playerid);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1bab9eb67010025f552ee6b445db5910d11b3471b07a4e1b34806ff0799ff7ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5904, + "startColumn": 6, + "charOffset": 199896, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5902, + "startColumn": 6, + "charOffset": 199774, + "charLength": 1, + "snippet": { + "text": "void Game::playerTurn(uint32_t playerId, Direction dir) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd581a312b7f7c54a52749bfd077fc2217d32ae975d8978df566f9ab7c08d5aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5926, + "startColumn": 6, + "charOffset": 200378, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5924, + "startColumn": 6, + "charOffset": 200313, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7b436ee8fe8f60d3ea886f046e34043e7b7dabf76428d9d1928fdad6b3c9685" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5935, + "startColumn": 6, + "charOffset": 200561, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5933, + "startColumn": 6, + "charOffset": 200435, + "charLength": 1, + "snippet": { + "text": "void Game::playerToggleMount(uint32_t playerId, bool mount) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b2b3af8eb93dc95c5a38460de444683c3544453fa898602e9ff5823434bc0d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5939, + "startColumn": 10, + "charOffset": 200595, + "charLength": 11, + "snippet": { + "text": "toggleMount" + } + }, + "contextRegion": { + "startLine": 5937, + "startColumn": 10, + "charOffset": 200582, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\tplayer->toggleMount(mount);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74ee49646f2bbd2acc878f3dfd7f4ee2db2c2b84b7ed3497592e321e5d3c13ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5948, + "startColumn": 6, + "charOffset": 200872, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5946, + "startColumn": 6, + "charOffset": 200807, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "828b0a581a89b5378ced28d8d3896391423425b9816650d3b23e11607b266d44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5959, + "startColumn": 6, + "charOffset": 201041, + "charLength": 17, + "snippet": { + "text": "isMountRandomized" + } + }, + "contextRegion": { + "startLine": 5957, + "startColumn": 6, + "charOffset": 200991, + "charLength": 17, + "snippet": { + "text": "\tplayer->setRandomMount(isMountRandomized);\n\n\tif (isMountRandomized && outfit.lookMount != 0 && player->hasAnyMount()) {\n\t\tauto randomMount = mounts.getMountByID(player->getRandomMountId());\n\t\toutfit.lookMount = randomMount->clientId;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79e6ddff163b560642fd4d9493fcc36b80c1cb7b50c39af2ba5371393224c44e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5959, + "startColumn": 6, + "charOffset": 201041, + "charLength": 17, + "snippet": { + "text": "isMountRandomized" + } + }, + "contextRegion": { + "startLine": 5957, + "startColumn": 6, + "charOffset": 200991, + "charLength": 17, + "snippet": { + "text": "\tplayer->setRandomMount(isMountRandomized);\n\n\tif (isMountRandomized && outfit.lookMount != 0 && player->hasAnyMount()) {\n\t\tauto randomMount = mounts.getMountByID(player->getRandomMountId());\n\t\toutfit.lookMount = randomMount->clientId;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb0f5e43d692420b2e82a736254a51e7b42633714c5c5f00efca5776080066df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5959, + "startColumn": 49, + "charOffset": 201084, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 5957, + "startColumn": 49, + "charOffset": 200991, + "charLength": 2, + "snippet": { + "text": "\tplayer->setRandomMount(isMountRandomized);\n\n\tif (isMountRandomized && outfit.lookMount != 0 && player->hasAnyMount()) {\n\t\tauto randomMount = mounts.getMountByID(player->getRandomMountId());\n\t\toutfit.lookMount = randomMount->clientId;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5cd74566c047ebf5d40d241d17c1f822e4a231778617b746d8a7e1a2b0bfc6fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5965, + "startColumn": 6, + "charOffset": 201331, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5963, + "startColumn": 6, + "charOffset": 201229, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto playerOutfit = Outfits::getInstance().getOutfitByLookType(player, outfit.lookType);\n\tif (!playerOutfit) {\n\t\toutfit.lookMount = 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "175bf3a6253b31b425f17b61945972af4ae12b7bf4b45aa3487c3d813bf8db41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5969, + "startColumn": 2, + "charOffset": 201377, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 5967, + "startColumn": 2, + "charOffset": 201372, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (outfit.lookMount != 0) {\n\t\tconst auto mount = mounts.getMountByClientID(outfit.lookMount);\n\t\tif (!mount) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e49d1f174b5758a60f327267f1ea716a58018a0542509dc59c27a64d31a6de3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5971, + "startColumn": 7, + "charOffset": 201478, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5969, + "startColumn": 7, + "charOffset": 201376, + "charLength": 1, + "snippet": { + "text": "\tif (outfit.lookMount != 0) {\n\t\tconst auto mount = mounts.getMountByClientID(outfit.lookMount);\n\t\tif (!mount) {\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a06756fa80d162c3df510cc2726bbc700b93904b1162886d0d5120b4ef7eb99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5975, + "startColumn": 7, + "charOffset": 201510, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5973, + "startColumn": 7, + "charOffset": 201499, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif (!player->hasMount(mount)) {\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c2c09e265145a5a5072322b39436f545d86c486e3f6dd3b201887107b452457" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 5980, + "startColumn": 7, + "charOffset": 201616, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 5978, + "startColumn": 7, + "charOffset": 201553, + "charLength": 1, + "snippet": { + "text": "\n\t\tstd::shared_ptr playerTile = player->getTile();\n\t\tif (!playerTile) {\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1db298bc6cc91eaf813906570f4994eca63a949c32213b35271c3a7353ccc940" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6015, + "startColumn": 6, + "charOffset": 202479, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6013, + "startColumn": 6, + "charOffset": 202364, + "charLength": 1, + "snippet": { + "text": "void Game::playerShowQuestLog(uint32_t playerId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e4b90af1150ccd15cfdeebf621566353d5f4860e736663a72f9ac55f5009f0a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerShowQuestLine' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6023, + "startColumn": 32, + "charOffset": 202711, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 6021, + "startColumn": 32, + "charOffset": 202677, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerShowQuestLine(uint32_t playerId, uint16_t questId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "abcfcbf37a8849e68a058fd2c0e34b1668abd24962a5f534de059dc11dc4a47f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6025, + "startColumn": 6, + "charOffset": 202814, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6023, + "startColumn": 6, + "charOffset": 202680, + "charLength": 1, + "snippet": { + "text": "void Game::playerShowQuestLine(uint32_t playerId, uint16_t questId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7080b8ade6f538776565822dd37148f755ed29578286b8ff353c20539be6829" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerSay' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6033, + "startColumn": 22, + "charOffset": 203057, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 6031, + "startColumn": 22, + "charOffset": 203033, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerSay(uint32_t playerId, uint16_t channelId, SpeakClasses type, const std::string &receiver, const std::string &text) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da41a56bb30813fb64d774ad17899e88c6709dfa0ae70de2318af8c4bd4a4f07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6035, + "startColumn": 6, + "charOffset": 203235, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6033, + "startColumn": 6, + "charOffset": 203036, + "charLength": 1, + "snippet": { + "text": "void Game::playerSay(uint32_t playerId, uint16_t channelId, SpeakClasses type, const std::string &receiver, const std::string &text) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e14cfb30f9ac5b81a411c2882d08ab285177360846f33914af6c44a7e08b77b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6071, + "startColumn": 4, + "charOffset": 203922, + "charLength": 10, + "snippet": { + "text": "playerYell" + } + }, + "contextRegion": { + "startLine": 6069, + "startColumn": 4, + "charOffset": 203896, + "charLength": 10, + "snippet": { + "text": "\n\t\tcase TALKTYPE_YELL:\n\t\t\tplayerYell(player, text);\n\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ec12206aca291b8c2af13dba10d9d58758b5f65d673ed3a50305ca1ef480db4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6075, + "startColumn": 3, + "charOffset": 203989, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 6073, + "startColumn": 3, + "charOffset": 203958, + "charLength": 4, + "snippet": { + "text": "\n\t\tcase TALKTYPE_PRIVATE_TO:\n\t\tcase TALKTYPE_PRIVATE_RED_TO:\n\t\t\tplayerSpeakTo(player, type, receiver, text);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e146071be2ef413334f64805ba114c9f81332da910e270f483d05aa49ba66b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6076, + "startColumn": 4, + "charOffset": 204022, + "charLength": 13, + "snippet": { + "text": "playerSpeakTo" + } + }, + "contextRegion": { + "startLine": 6074, + "startColumn": 4, + "charOffset": 203959, + "charLength": 13, + "snippet": { + "text": "\t\tcase TALKTYPE_PRIVATE_TO:\n\t\tcase TALKTYPE_PRIVATE_RED_TO:\n\t\t\tplayerSpeakTo(player, type, receiver, text);\n\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78db6252fd8eea11bf6e278267cd729059c6dc22fcf3aafb3a33ea3faeb6eb41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6080, + "startColumn": 3, + "charOffset": 204107, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 6078, + "startColumn": 3, + "charOffset": 204077, + "charLength": 4, + "snippet": { + "text": "\n\t\tcase TALKTYPE_CHANNEL_O:\n\t\tcase TALKTYPE_CHANNEL_Y:\n\t\tcase TALKTYPE_CHANNEL_R1:\n\t\t\tg_chat().talkToChannel(player, type, text, channelId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e163356156fb1232a0dc023bbee8f6ddff0d0f0b181652f04d5a7fe606c371d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6081, + "startColumn": 3, + "charOffset": 204134, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 6079, + "startColumn": 3, + "charOffset": 204078, + "charLength": 4, + "snippet": { + "text": "\t\tcase TALKTYPE_CHANNEL_O:\n\t\tcase TALKTYPE_CHANNEL_Y:\n\t\tcase TALKTYPE_CHANNEL_R1:\n\t\t\tg_chat().talkToChannel(player, type, text, channelId);\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41c8d2e69130c858b4032e16f22dacc4be3a6b18c0acb6c5f137333de0b58915" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6082, + "startColumn": 13, + "charOffset": 204172, + "charLength": 13, + "snippet": { + "text": "talkToChannel" + } + }, + "contextRegion": { + "startLine": 6080, + "startColumn": 13, + "charOffset": 204105, + "charLength": 13, + "snippet": { + "text": "\t\tcase TALKTYPE_CHANNEL_Y:\n\t\tcase TALKTYPE_CHANNEL_R1:\n\t\t\tg_chat().talkToChannel(player, type, text, channelId);\n\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3944c1ef4d113930f871731a03fc351c1e08b9e278e1c7a7f0fbf5b3a643d28d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6090, + "startColumn": 4, + "charOffset": 204333, + "charLength": 22, + "snippet": { + "text": "playerBroadcastMessage" + } + }, + "contextRegion": { + "startLine": 6088, + "startColumn": 4, + "charOffset": 204302, + "charLength": 22, + "snippet": { + "text": "\n\t\tcase TALKTYPE_BROADCAST:\n\t\t\tplayerBroadcastMessage(player, text);\n\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ffa35e03f86ef0bab9f0759e77c12612f8f39af29224374f23df35b0e108c4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'playerSaySpell' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6098, + "startColumn": 12, + "charOffset": 204420, + "charLength": 14, + "snippet": { + "text": "playerSaySpell" + } + }, + "contextRegion": { + "startLine": 6096, + "startColumn": 12, + "charOffset": 204406, + "charLength": 14, + "snippet": { + "text": "}\n\nbool Game::playerSaySpell(std::shared_ptr player, SpeakClasses type, const std::string &text) {\n\tif (player->walkExhausted()) {\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76005b489f01d845431864fae6379ccf5dc242a7d78feb88aeee3eb5a8e4a506" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6098, + "startColumn": 51, + "charOffset": 204459, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 6096, + "startColumn": 51, + "charOffset": 204406, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Game::playerSaySpell(std::shared_ptr player, SpeakClasses type, const std::string &text) {\n\tif (player->walkExhausted()) {\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01770293e28006edd50978e0a0336bf87a84c1af913a2bfa4616ebb79f226b35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6110, + "startColumn": 2, + "charOffset": 204793, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 6108, + "startColumn": 2, + "charOffset": 204739, + "charLength": 2, + "snippet": { + "text": "\n\tresult = g_spells().playerSaySpell(player, words);\n\tif (result == TALKACTION_BREAK) {\n\t\tif (!g_configManager().getBoolean(PUSH_WHEN_ATTACKING, __FUNCTION__)) {\n\t\t\tplayer->cancelPush();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "294bcf2aed0773d62558a423e7b4fab552bfdb9b6523853a697fd4a156fc8e0c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6115, + "startColumn": 4, + "charOffset": 204980, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 6113, + "startColumn": 4, + "charOffset": 204926, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t\treturn player->saySpell(type, words, false);\n\t} else if (result == TALKACTION_FAILED) {\n\t\treturn true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4b5b2fbb5b83e487137b7f1be06f1705c4978c573e80b207a529dff1f50b7f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'playerWhisper' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6122, + "startColumn": 12, + "charOffset": 205068, + "charLength": 13, + "snippet": { + "text": "playerWhisper" + } + }, + "contextRegion": { + "startLine": 6120, + "startColumn": 12, + "charOffset": 205054, + "charLength": 13, + "snippet": { + "text": "}\n\nvoid Game::playerWhisper(std::shared_ptr player, const std::string &text) {\n\tauto spectators = Spectators().find(player->getPosition(), false, MAP_MAX_CLIENT_VIEW_PORT_X, MAP_MAX_CLIENT_VIEW_PORT_X, MAP_MAX_CLIENT_VIEW_PORT_Y, MAP_MAX_CLIENT_VIEW_PORT_Y);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2154a5afc21c6e2a83476cfbd0fbb325af2b88e1c3f82ac202609dbc4f87bafb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6122, + "startColumn": 50, + "charOffset": 205106, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 6120, + "startColumn": 50, + "charOffset": 205054, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::playerWhisper(std::shared_ptr player, const std::string &text) {\n\tauto spectators = Spectators().find(player->getPosition(), false, MAP_MAX_CLIENT_VIEW_PORT_X, MAP_MAX_CLIENT_VIEW_PORT_X, MAP_MAX_CLIENT_VIEW_PORT_Y, MAP_MAX_CLIENT_VIEW_PORT_Y);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3959b436139a7834dd2c6678b2080b9685bc1509b50da1e38f78a730decb033a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6142, + "startColumn": 47, + "charOffset": 205890, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 6140, + "startColumn": 47, + "charOffset": 205841, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Game::playerYell(std::shared_ptr player, const std::string &text) {\n\tif (player->getLevel() == 1) {\n\t\tplayer->sendTextMessage(MESSAGE_FAILURE, \"You may not yell as long as you are on level 1.\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ed541c4d4cd6a3a1099822ad76b70b27eacadf9314d7fb61c7876a7441da990" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6154, + "startColumn": 89, + "charOffset": 206360, + "charLength": 5, + "snippet": { + "text": "30000" + } + }, + "contextRegion": { + "startLine": 6152, + "startColumn": 89, + "charOffset": 206199, + "charLength": 5, + "snippet": { + "text": "\n\tif (player->getAccountType() < AccountType::ACCOUNT_TYPE_GAMEMASTER) {\n\t\tauto condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_YELLTICKS, 30000, 0);\n\t\tplayer->addCondition(condition);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06d6f3444764335abbcc74ef215f87ae35749757dcb8cea33492f3b661481043" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6155, + "startColumn": 11, + "charOffset": 206381, + "charLength": 12, + "snippet": { + "text": "addCondition" + } + }, + "contextRegion": { + "startLine": 6153, + "startColumn": 11, + "charOffset": 206200, + "charLength": 12, + "snippet": { + "text": "\tif (player->getAccountType() < AccountType::ACCOUNT_TYPE_GAMEMASTER) {\n\t\tauto condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_YELLTICKS, 30000, 0);\n\t\tplayer->addCondition(condition);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ffa35e03f86ef0bab9f0759e77c12612f8f39af29224374f23df35b0e108c4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6158, + "startColumn": 45, + "charOffset": 206454, + "charLength": 17, + "snippet": { + "text": "asUpperCaseString" + } + }, + "contextRegion": { + "startLine": 6156, + "startColumn": 45, + "charOffset": 206406, + "charLength": 17, + "snippet": { + "text": "\t}\n\n\tinternalCreatureSay(player, TALKTYPE_YELL, asUpperCaseString(text), false);\n\treturn true;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "726b447f47274f7357d7c26c9c07b5a0cfe36bcab3f655f35bf8bd20c119baf5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6162, + "startColumn": 50, + "charOffset": 206553, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 6160, + "startColumn": 50, + "charOffset": 206501, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Game::playerSpeakTo(std::shared_ptr player, SpeakClasses type, const std::string &receiver, const std::string &text) {\n\tstd::shared_ptr toPlayer = getPlayerByName(receiver);\n\tif (!toPlayer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89ba2ded4a12ffd8be7af0a6c31ccd60aa58bc15216d56fdc23d379990fef2ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerSpeakTo' of similar type ('const std::string &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6162, + "startColumn": 77, + "charOffset": 206580, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 6160, + "startColumn": 77, + "charOffset": 206501, + "charLength": 5, + "snippet": { + "text": "}\n\nbool Game::playerSpeakTo(std::shared_ptr player, SpeakClasses type, const std::string &receiver, const std::string &text) {\n\tstd::shared_ptr toPlayer = getPlayerByName(receiver);\n\tif (!toPlayer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f05dd2f9b47ca95a552c2a473422ea9172717810351fc0e85d43656094fe02b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6164, + "startColumn": 6, + "charOffset": 206704, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6162, + "startColumn": 6, + "charOffset": 206504, + "charLength": 1, + "snippet": { + "text": "bool Game::playerSpeakTo(std::shared_ptr player, SpeakClasses type, const std::string &receiver, const std::string &text) {\n\tstd::shared_ptr toPlayer = getPlayerByName(receiver);\n\tif (!toPlayer) {\n\t\tplayer->sendTextMessage(MESSAGE_FAILURE, \"A player with this name is not online.\");\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3404d61a4cefc4523d6a3402ba1f73b9acd6761d1eaa2a051a48ade544cfaf77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'playerSpeakToNpc' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6188, + "startColumn": 12, + "charOffset": 207493, + "charLength": 16, + "snippet": { + "text": "playerSpeakToNpc" + } + }, + "contextRegion": { + "startLine": 6186, + "startColumn": 12, + "charOffset": 207479, + "charLength": 16, + "snippet": { + "text": "}\n\nvoid Game::playerSpeakToNpc(std::shared_ptr player, const std::string &text) {\n\tif (player == nullptr) {\n\t\tg_logger().error(\"[Game::playerSpeakToNpc] - Player is nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4680861ad7b374a6e88113ce32ade5c9e39344f101f6f27e0441d4bc33abd955" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6188, + "startColumn": 53, + "charOffset": 207534, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 6186, + "startColumn": 53, + "charOffset": 207479, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::playerSpeakToNpc(std::shared_ptr player, const std::string &text) {\n\tif (player == nullptr) {\n\t\tg_logger().error(\"[Game::playerSpeakToNpc] - Player is nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4cddcea039e7c33a178af356d8d5b4a32e59215bc933cf2bf228f39ab79fae7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'createPlayerTask' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6211, + "startColumn": 29, + "charOffset": 208142, + "charLength": 16, + "snippet": { + "text": "createPlayerTask" + } + }, + "contextRegion": { + "startLine": 6209, + "startColumn": 29, + "charOffset": 208111, + "charLength": 16, + "snippet": { + "text": "}\n\nstd::shared_ptr Game::createPlayerTask(uint32_t delay, std::function f, std::string context) const {\n\treturn Player::createPlayerTask(delay, std::move(f), std::move(context));\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2939e9316a2bbc972f772146390f258452755fa354175a972fe7cdfe564fde9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'f' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6211, + "startColumn": 88, + "charOffset": 208201, + "charLength": 1, + "snippet": { + "text": "f" + } + }, + "contextRegion": { + "startLine": 6209, + "startColumn": 88, + "charOffset": 208111, + "charLength": 1, + "snippet": { + "text": "}\n\nstd::shared_ptr Game::createPlayerTask(uint32_t delay, std::function f, std::string context) const {\n\treturn Player::createPlayerTask(delay, std::move(f), std::move(context));\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76a3d91516420c4dfc127d33cebb0d3cea1a9549390f591cf1ef145b2d09f054" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'context' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6211, + "startColumn": 103, + "charOffset": 208216, + "charLength": 7, + "snippet": { + "text": "context" + } + }, + "contextRegion": { + "startLine": 6209, + "startColumn": 103, + "charOffset": 208111, + "charLength": 7, + "snippet": { + "text": "}\n\nstd::shared_ptr Game::createPlayerTask(uint32_t delay, std::function f, std::string context) const {\n\treturn Player::createPlayerTask(delay, std::move(f), std::move(context));\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "198136bbe9eaa841a97329fcab99e8056b017a8596121c71335c06756fd60187" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'internalCreatureTurn' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6224, + "startColumn": 12, + "charOffset": 208798, + "charLength": 20, + "snippet": { + "text": "internalCreatureTurn" + } + }, + "contextRegion": { + "startLine": 6222, + "startColumn": 12, + "charOffset": 208784, + "charLength": 20, + "snippet": { + "text": "}\n\nbool Game::internalCreatureTurn(std::shared_ptr creature, Direction dir) {\n\tif (creature->getDirection() == dir) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "faaf6eadb949636f1612d4983a613d73f5357152a2e26635262d9d32675bd208" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6224, + "startColumn": 59, + "charOffset": 208845, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 6222, + "startColumn": 59, + "charOffset": 208784, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Game::internalCreatureTurn(std::shared_ptr creature, Direction dir) {\n\tif (creature->getDirection() == dir) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7b2a34d6c40863e0de5902bc78ab1e70e4cfa0c06b80fe1f50bc840cf2dcf8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'internalCreatureSay' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6243, + "startColumn": 12, + "charOffset": 209260, + "charLength": 19, + "snippet": { + "text": "internalCreatureSay" + } + }, + "contextRegion": { + "startLine": 6241, + "startColumn": 12, + "charOffset": 209246, + "charLength": 19, + "snippet": { + "text": "}\n\nbool Game::internalCreatureSay(std::shared_ptr creature, SpeakClasses type, const std::string &text, bool ghostMode, Spectators* spectatorsPtr /* = nullptr*/, const Position* pos /* = nullptr*/) {\n\tif (text.empty()) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2eb3a1863efd824f51433b0b3f868a38eac951224b2945c3304c224f1c5c26e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6243, + "startColumn": 58, + "charOffset": 209306, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 6241, + "startColumn": 58, + "charOffset": 209246, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Game::internalCreatureSay(std::shared_ptr creature, SpeakClasses type, const std::string &text, bool ghostMode, Spectators* spectatorsPtr /* = nullptr*/, const Position* pos /* = nullptr*/) {\n\tif (text.empty()) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d84c463d3d0ba0a879c31ab56ab1d2f4bedef637ee213f2263bce4e0d4cd9a17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6248, + "startColumn": 6, + "charOffset": 209502, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6246, + "startColumn": 6, + "charOffset": 209493, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!pos) {\n\t\tpos = &creature->getPosition();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19df5b3aff1e39f44706165e5a5b84e659261275f19b906d4be23ba6a218612a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const Position *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6248, + "startColumn": 7, + "charOffset": 209503, + "charLength": 3, + "snippet": { + "text": "pos" + } + }, + "contextRegion": { + "startLine": 6246, + "startColumn": 7, + "charOffset": 209493, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tif (!pos) {\n\t\tpos = &creature->getPosition();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "679c46128d692b06fa78a2e0db1008b5d7124b6f0c9832cda87bd17dc5cd2270" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6254, + "startColumn": 6, + "charOffset": 209578, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6252, + "startColumn": 6, + "charOffset": 209548, + "charLength": 1, + "snippet": { + "text": "\tSpectators spectators;\n\n\tif (!spectatorsPtr || spectatorsPtr->empty()) {\n\t\t// This somewhat complex construct ensures that the cached Spectators\n\t\t// is used if available and if it can be used, else a local vector is" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4da0ed592e5c6f1c5c283ce93bc0fe15c35376d9afebaa6a11266195004747b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'Spectators *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6254, + "startColumn": 7, + "charOffset": 209579, + "charLength": 13, + "snippet": { + "text": "spectatorsPtr" + } + }, + "contextRegion": { + "startLine": 6252, + "startColumn": 7, + "charOffset": 209548, + "charLength": 13, + "snippet": { + "text": "\tSpectators spectators;\n\n\tif (!spectatorsPtr || spectatorsPtr->empty()) {\n\t\t// This somewhat complex construct ensures that the cached Spectators\n\t\t// is used if available and if it can be used, else a local vector is" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65e22a1f7d663889ee40d50b7a26495dd3de9cd93a5024ee1421fe3b9267bc8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6318, + "startColumn": 2, + "charOffset": 211773, + "charLength": 18, + "snippet": { + "text": "checkCreatureLists" + } + }, + "contextRegion": { + "startLine": 6316, + "startColumn": 2, + "charOffset": 211729, + "charLength": 18, + "snippet": { + "text": "\n\tcreature->inCheckCreaturesVector = true;\n\tcheckCreatureLists[uniform_random(0, EVENT_CREATURECOUNT - 1)].emplace_back(creature);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79cd2768818a2f8d6ea90d20af12d547a7da7b3f75e506904b274c74d370ea20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6318, + "startColumn": 21, + "charOffset": 211792, + "charLength": 14, + "snippet": { + "text": "uniform_random" + } + }, + "contextRegion": { + "startLine": 6316, + "startColumn": 21, + "charOffset": 211729, + "charLength": 14, + "snippet": { + "text": "\n\tcreature->inCheckCreaturesVector = true;\n\tcheckCreatureLists[uniform_random(0, EVENT_CREATURECOUNT - 1)].emplace_back(creature);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86db450ca9fd6a11da15eb4442843fa072c07ab938d74574e90cbd15e7d649b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6322, + "startColumn": 34, + "charOffset": 211972, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 6320, + "startColumn": 34, + "charOffset": 211862, + "charLength": 15, + "snippet": { + "text": "\nvoid Game::removeCreatureCheck(const std::shared_ptr &creature) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (creature->inCheckCreaturesVector) {\n\t\tcreature->creatureCheck = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58a543ca0b58db9cb16ab202c146e4cd0a1ebc25b4f819ef4d57867a104dcc9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6329, + "startColumn": 34, + "charOffset": 212135, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 6327, + "startColumn": 34, + "charOffset": 212071, + "charLength": 15, + "snippet": { + "text": "\nvoid Game::checkCreatures() {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tstatic size_t index = 0;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f71c382d89d334ff761f3dfdac6971f39cfce0cd6828fd69c6f48214f20174c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6332, + "startColumn": 28, + "charOffset": 212207, + "charLength": 18, + "snippet": { + "text": "checkCreatureLists" + } + }, + "contextRegion": { + "startLine": 6330, + "startColumn": 28, + "charOffset": 212153, + "charLength": 18, + "snippet": { + "text": "\tstatic size_t index = 0;\n\n\tauto &checkCreatureList = checkCreatureLists[index];\n\tsize_t it = 0, end = checkCreatureList.size();\n\twhile (it < end) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "077c423eb57c9702d4576f4719d660739420a55fe2649710712a1c847a20444e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6333, + "startColumn": 2, + "charOffset": 212235, + "charLength": 6, + "snippet": { + "text": "size_t" + } + }, + "contextRegion": { + "startLine": 6331, + "startColumn": 2, + "charOffset": 212179, + "charLength": 6, + "snippet": { + "text": "\n\tauto &checkCreatureList = checkCreatureLists[index];\n\tsize_t it = 0, end = checkCreatureList.size();\n\twhile (it < end) {\n\t\tauto creature = checkCreatureList[it];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "177b1bf81132e699c82f9bc63d6cd6f36fb75a5863b98e981b6fd36c5203509a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6333, + "startColumn": 2, + "charOffset": 212235, + "charLength": 6, + "snippet": { + "text": "size_t" + } + }, + "contextRegion": { + "startLine": 6331, + "startColumn": 2, + "charOffset": 212179, + "charLength": 6, + "snippet": { + "text": "\n\tauto &checkCreatureList = checkCreatureLists[index];\n\tsize_t it = 0, end = checkCreatureList.size();\n\twhile (it < end) {\n\t\tauto creature = checkCreatureList[it];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fec4d9e4084e0a7e5e3dcdb93989e26a004217456a575f4ba49f5a97bd2e5102" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6334, + "startColumn": 2, + "charOffset": 212283, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 6332, + "startColumn": 2, + "charOffset": 212180, + "charLength": 5, + "snippet": { + "text": "\tauto &checkCreatureList = checkCreatureLists[index];\n\tsize_t it = 0, end = checkCreatureList.size();\n\twhile (it < end) {\n\t\tauto creature = checkCreatureList[it];\n\t\tif (creature && creature->creatureCheck) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db2b7057cea6eda131dd5325145ddeae518fdec5be31490256345ff5c5e1333b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'end' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6334, + "startColumn": 9, + "charOffset": 212290, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 6332, + "startColumn": 9, + "charOffset": 212180, + "charLength": 2, + "snippet": { + "text": "\tauto &checkCreatureList = checkCreatureLists[index];\n\tsize_t it = 0, end = checkCreatureList.size();\n\twhile (it < end) {\n\t\tauto creature = checkCreatureList[it];\n\t\tif (creature && creature->creatureCheck) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2acba0fc0692c61a3f578e1d89230c4b8654a19da813f944a45f903fd3983227" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'changeSpeed' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6358, + "startColumn": 12, + "charOffset": 212935, + "charLength": 11, + "snippet": { + "text": "changeSpeed" + } + }, + "contextRegion": { + "startLine": 6356, + "startColumn": 12, + "charOffset": 212921, + "charLength": 11, + "snippet": { + "text": "}\n\nvoid Game::changeSpeed(std::shared_ptr creature, int32_t varSpeedDelta) {\n\tint32_t varSpeed = creature->getSpeed() - creature->getBaseSpeed();\n\tvarSpeed += varSpeedDelta;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ba95f5ae35ba4a223debc6fae634211f76677a2b78c14b47e8094ec2c462140" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6358, + "startColumn": 50, + "charOffset": 212973, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 6356, + "startColumn": 50, + "charOffset": 212921, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::changeSpeed(std::shared_ptr creature, int32_t varSpeedDelta) {\n\tint32_t varSpeed = creature->getSpeed() - creature->getBaseSpeed();\n\tvarSpeed += varSpeedDelta;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa6ffad4c8f7d3c0cf364d291db76cadd2dfb0da406dd85bdd1c80a2b8e92819" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'setCreatureSpeed' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6370, + "startColumn": 12, + "charOffset": 213338, + "charLength": 16, + "snippet": { + "text": "setCreatureSpeed" + } + }, + "contextRegion": { + "startLine": 6368, + "startColumn": 12, + "charOffset": 213324, + "charLength": 16, + "snippet": { + "text": "}\n\nvoid Game::setCreatureSpeed(std::shared_ptr creature, int32_t speed) {\n\tcreature->setBaseSpeed(static_cast(speed));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a38ff33b6fb3aab3b25d3479a935fb99bba6a71836ce14035d9c993b69a40da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6370, + "startColumn": 55, + "charOffset": 213381, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 6368, + "startColumn": 55, + "charOffset": 213324, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::setCreatureSpeed(std::shared_ptr creature, int32_t speed) {\n\tcreature->setBaseSpeed(static_cast(speed));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ff6efa2a7048418ca96afc7b2b21fb3e9d20a0f0c334bbce7ee3c46afabfc56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'changePlayerSpeed' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6379, + "startColumn": 12, + "charOffset": 213678, + "charLength": 17, + "snippet": { + "text": "changePlayerSpeed" + } + }, + "contextRegion": { + "startLine": 6377, + "startColumn": 12, + "charOffset": 213664, + "charLength": 17, + "snippet": { + "text": "}\n\nvoid Game::changePlayerSpeed(const std::shared_ptr &player, int32_t varSpeedDelta) {\n\tint32_t varSpeed = player->getSpeed() - player->getBaseSpeed();\n\tvarSpeed += varSpeedDelta;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93f7962d83c13176fb53f16f83c3d5ac2fb1875e8f15be10184be577b2254eb1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'internalCreatureChangeOutfit' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6391, + "startColumn": 12, + "charOffset": 214118, + "charLength": 28, + "snippet": { + "text": "internalCreatureChangeOutfit" + } + }, + "contextRegion": { + "startLine": 6389, + "startColumn": 12, + "charOffset": 214104, + "charLength": 28, + "snippet": { + "text": "}\n\nvoid Game::internalCreatureChangeOutfit(std::shared_ptr creature, const Outfit_t &outfit) {\n\tif (!g_events().eventCreatureOnChangeOutfit(creature, outfit)) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc023b43810e131920ed4ad8f668e551b9ba702cef1dce01104b8eb6b5046ba8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6391, + "startColumn": 67, + "charOffset": 214173, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 6389, + "startColumn": 67, + "charOffset": 214104, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::internalCreatureChangeOutfit(std::shared_ptr creature, const Outfit_t &outfit) {\n\tif (!g_events().eventCreatureOnChangeOutfit(creature, outfit)) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "571df5eb720e90905e00b4d5ed947c7083c352a6060e7f82f16b8cf015308374" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6412, + "startColumn": 68, + "charOffset": 214776, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 6410, + "startColumn": 68, + "charOffset": 214706, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::internalCreatureChangeVisible(std::shared_ptr creature, bool visible) {\n\t// Send to clients\n\tfor (const auto &spectator : Spectators().find(creature->getPosition(), true)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75f27da6da7e7a86d12e6e9dfafffe4994dbf74fd4996bbdcbd9a58c8b1e3f53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6419, + "startColumn": 50, + "charOffset": 215039, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 6417, + "startColumn": 50, + "charOffset": 214987, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::changeLight(std::shared_ptr creature) {\n\t// Send to clients\n\tfor (const auto &spectator : Spectators().find(creature->getPosition(), true)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "201120f9f80bbba561532792173583f52e279fb5a73a16b0300303e5d1b3efe2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6426, + "startColumn": 57, + "charOffset": 215278, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 6424, + "startColumn": 57, + "charOffset": 215219, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::updateCreatureIcon(std::shared_ptr creature) {\n\t// Send to clients\n\tfor (const auto &spectator : Spectators().find(creature->getPosition(), true)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5707737546df873856248b0518a6a266762c9cc630b679fc3a2b8a552af45598" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'reloadCreature' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6433, + "startColumn": 12, + "charOffset": 215471, + "charLength": 14, + "snippet": { + "text": "reloadCreature" + } + }, + "contextRegion": { + "startLine": 6431, + "startColumn": 12, + "charOffset": 215457, + "charLength": 14, + "snippet": { + "text": "}\n\nvoid Game::reloadCreature(std::shared_ptr creature) {\n\tif (!creature) {\n\t\tg_logger().error(\"[{}] Creature is nullptr\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41e592bd4ca266eb82c95967707b734d42873486e5bbe3660d0eec2e80c8cff3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6433, + "startColumn": 53, + "charOffset": 215512, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 6431, + "startColumn": 53, + "charOffset": 215457, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::reloadCreature(std::shared_ptr creature) {\n\tif (!creature) {\n\t\tg_logger().error(\"[{}] Creature is nullptr\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ffe54fe78de5d8c39387f6bb467cdf20c288da508688b93203c1b466a0228a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6434, + "startColumn": 6, + "charOffset": 215529, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 6432, + "startColumn": 6, + "charOffset": 215459, + "charLength": 1, + "snippet": { + "text": "\nvoid Game::reloadCreature(std::shared_ptr creature) {\n\tif (!creature) {\n\t\tg_logger().error(\"[{}] Creature is nullptr\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb04f625867570552565899cbe36ffd3b55914f46e9ca9356a215923b10ecf24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'sendSingleSoundEffect' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6444, + "startColumn": 12, + "charOffset": 215771, + "charLength": 21, + "snippet": { + "text": "sendSingleSoundEffect" + } + }, + "contextRegion": { + "startLine": 6442, + "startColumn": 12, + "charOffset": 215757, + "charLength": 21, + "snippet": { + "text": "}\n\nvoid Game::sendSingleSoundEffect(const Position &pos, SoundEffect_t soundId, std::shared_ptr actor /* = nullptr*/) {\n\tif (soundId == SoundEffect_t::SILENCE) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a662169ac4839989939902950c8217fb27d4b6381796f7f820d520c7f452873" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'actor' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6444, + "startColumn": 104, + "charOffset": 215863, + "charLength": 5, + "snippet": { + "text": "actor" + } + }, + "contextRegion": { + "startLine": 6442, + "startColumn": 104, + "charOffset": 215757, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid Game::sendSingleSoundEffect(const Position &pos, SoundEffect_t soundId, std::shared_ptr actor /* = nullptr*/) {\n\tif (soundId == SoundEffect_t::SILENCE) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee5e46dfeaf666c4256d918d46faa329b15269b8205495baaf2af630c457648b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'sendDoubleSoundEffect' of similar type ('SoundEffect_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6464, + "startColumn": 55, + "charOffset": 216370, + "charLength": 13, + "snippet": { + "text": "SoundEffect_t" + } + }, + "contextRegion": { + "startLine": 6462, + "startColumn": 55, + "charOffset": 216313, + "charLength": 13, + "snippet": { + "text": "}\n\nvoid Game::sendDoubleSoundEffect(const Position &pos, SoundEffect_t mainSoundEffect, SoundEffect_t secondarySoundEffect, std::shared_ptr actor /* = nullptr*/) {\n\tif (secondarySoundEffect == SoundEffect_t::SILENCE) {\n\t\tsendSingleSoundEffect(pos, mainSoundEffect, actor);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36b9eecb68e58e6d821f72449e19de4b5539b795c3ea5dcfb73e1c0a6efeb0ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'actor' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6466, + "startColumn": 47, + "charOffset": 216588, + "charLength": 5, + "snippet": { + "text": "actor" + } + }, + "contextRegion": { + "startLine": 6464, + "startColumn": 47, + "charOffset": 216316, + "charLength": 5, + "snippet": { + "text": "void Game::sendDoubleSoundEffect(const Position &pos, SoundEffect_t mainSoundEffect, SoundEffect_t secondarySoundEffect, std::shared_ptr actor /* = nullptr*/) {\n\tif (secondarySoundEffect == SoundEffect_t::SILENCE) {\n\t\tsendSingleSoundEffect(pos, mainSoundEffect, actor);\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e921f9d878afb88cae5aae3f42b732b2e6e4ec5fbb5fd624dc9585c3d36b7436" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'combatBlockHit' has cognitive complexity of 115 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6485, + "startColumn": 12, + "charOffset": 217032, + "charLength": 14, + "snippet": { + "text": "combatBlockHit" + } + }, + "contextRegion": { + "startLine": 6483, + "startColumn": 12, + "charOffset": 217018, + "charLength": 14, + "snippet": { + "text": "}\n\nbool Game::combatBlockHit(CombatDamage &damage, std::shared_ptr attacker, std::shared_ptr target, bool checkDefense, bool checkArmor, bool field) {\n\tif (damage.primary.type == COMBAT_NONE && damage.secondary.type == COMBAT_NONE) {\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8912c3e35198905b8f9f5283e97249a2765636c70a696374ac71a1ea3e2dcc5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6485, + "startColumn": 75, + "charOffset": 217095, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 6483, + "startColumn": 75, + "charOffset": 217018, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Game::combatBlockHit(CombatDamage &damage, std::shared_ptr attacker, std::shared_ptr target, bool checkDefense, bool checkArmor, bool field) {\n\tif (damage.primary.type == COMBAT_NONE && damage.secondary.type == COMBAT_NONE) {\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "175d2135cb4424d8a1c092b2fdcb25a82c01797979c8251dad2b1b9025f8ae60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6485, + "startColumn": 111, + "charOffset": 217131, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 6483, + "startColumn": 111, + "charOffset": 217018, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Game::combatBlockHit(CombatDamage &damage, std::shared_ptr attacker, std::shared_ptr target, bool checkDefense, bool checkArmor, bool field) {\n\tif (damage.primary.type == COMBAT_NONE && damage.secondary.type == COMBAT_NONE) {\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d4416d23021a251bef5669977a92b5efe091c4e36f20b4b7e81d64c7bcd773f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6501, + "startColumn": 39, + "charOffset": 217639, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 6499, + "startColumn": 39, + "charOffset": 217486, + "charLength": 5, + "snippet": { + "text": "\tif (std::shared_ptr targetPlayer = target->getPlayer()) {\n\t\tauto chance = targetPlayer->getDodgeChance();\n\t\tif (chance > 0 && uniform_random(0, 10000) < chance) {\n\t\t\tInternalGame::sendBlockEffect(BLOCK_DODGE, damage.primary.type, target->getPosition(), attacker);\n\t\t\ttargetPlayer->sendTextMessage(MESSAGE_ATTENTION, \"You dodged an attack.\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f9b4e96eea1de7fbc2c26171a6a5aba4621fb65cd409b8627d560339051726f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6519, + "startColumn": 2, + "charOffset": 218123, + "charLength": 11, + "snippet": { + "text": "BlockType_t" + } + }, + "contextRegion": { + "startLine": 6517, + "startColumn": 2, + "charOffset": 218084, + "charLength": 11, + "snippet": { + "text": "\tCombatParams damageReflectedParams;\n\n\tBlockType_t primaryBlockType, secondaryBlockType;\n\tstd::shared_ptr targetPlayer = target->getPlayer();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "177b1bf81132e699c82f9bc63d6cd6f36fb75a5863b98e981b6fd36c5203509a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6519, + "startColumn": 2, + "charOffset": 218123, + "charLength": 11, + "snippet": { + "text": "BlockType_t" + } + }, + "contextRegion": { + "startLine": 6517, + "startColumn": 2, + "charOffset": 218084, + "charLength": 11, + "snippet": { + "text": "\tCombatParams damageReflectedParams;\n\n\tBlockType_t primaryBlockType, secondaryBlockType;\n\tstd::shared_ptr targetPlayer = target->getPlayer();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fec4d9e4084e0a7e5e3dcdb93989e26a004217456a575f4ba49f5a97bd2e5102" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'primaryBlockType' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6519, + "startColumn": 14, + "charOffset": 218135, + "charLength": 16, + "snippet": { + "text": "primaryBlockType" + } + }, + "contextRegion": { + "startLine": 6517, + "startColumn": 14, + "charOffset": 218084, + "charLength": 16, + "snippet": { + "text": "\tCombatParams damageReflectedParams;\n\n\tBlockType_t primaryBlockType, secondaryBlockType;\n\tstd::shared_ptr targetPlayer = target->getPlayer();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2358949ec401159cda801b52e6dbba2512c3afbc590416c8da319d3bc5e014e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'secondaryBlockType' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6519, + "startColumn": 32, + "charOffset": 218153, + "charLength": 18, + "snippet": { + "text": "secondaryBlockType" + } + }, + "contextRegion": { + "startLine": 6517, + "startColumn": 32, + "charOffset": 218084, + "charLength": 18, + "snippet": { + "text": "\tCombatParams damageReflectedParams;\n\n\tBlockType_t primaryBlockType, secondaryBlockType;\n\tstd::shared_ptr targetPlayer = target->getPlayer();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b8937481f5dc51ffb7264020a257ec0989693bf15b0d9214d0367572148b28f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6529, + "startColumn": 33, + "charOffset": 218561, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 6527, + "startColumn": 33, + "charOffset": 218403, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tuint32_t primaryHealing = target->getMonster()->getHealingCombatValue(damage.primary.type);\n\t\t\t\tif (primaryHealing > 0) {\n\t\t\t\t\tdamageHeal.primary.value = std::ceil((damage.primary.value) * (primaryHealing / 100.));\n\t\t\t\t\tcanHeal = true;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b788e7917cd6521104e88722e61984bcf05a332740985fbd8aa2ede4d7b3cda6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6539, + "startColumn": 28, + "charOffset": 218926, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 6537, + "startColumn": 28, + "charOffset": 218860, + "charLength": 8, + "snippet": { + "text": "\t\t\t\tdamageIncreaseMessage = true;\n\t\t\t}\n\t\t\tdamage.primary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\n\t\t}\n\t\tdamage.primary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08c64ea0c83ec9972e3fdce1633d7440d35b11b3e8beb179a8f77096f4025ead" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6539, + "startColumn": 28, + "charOffset": 218926, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 6537, + "startColumn": 28, + "charOffset": 218860, + "charLength": 8, + "snippet": { + "text": "\t\t\t\tdamageIncreaseMessage = true;\n\t\t\t}\n\t\t\tdamage.primary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\n\t\t}\n\t\tdamage.primary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af3cec67a9e171553a38f50471c7a93f7320463c699276683414c658d2f60d77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6541, + "startColumn": 27, + "charOffset": 219000, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 6539, + "startColumn": 27, + "charOffset": 218899, + "charLength": 6, + "snippet": { + "text": "\t\t\tdamage.primary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\n\t\t}\n\t\tdamage.primary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\n\n\t\tprimaryBlockType = target->blockHit(attacker, damage.primary.type, damage.primary.value, checkDefense, checkArmor, field);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "654d46b069de69bc692dc9d5c3d1d22e616206c869211e4539199c00c78f5341" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6541, + "startColumn": 27, + "charOffset": 219000, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 6539, + "startColumn": 27, + "charOffset": 218899, + "charLength": 6, + "snippet": { + "text": "\t\t\tdamage.primary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\n\t\t}\n\t\tdamage.primary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\n\n\t\tprimaryBlockType = target->blockHit(attacker, damage.primary.type, damage.primary.value, checkDefense, checkArmor, field);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4381573ff9bb9ba75a38465e909ebeccfe1773be07374f9627e2170e79e9f8ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6557, + "startColumn": 88, + "charOffset": 219945, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 6555, + "startColumn": 88, + "charOffset": 219748, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tif (activeCharm == CHARM_PARRY) {\n\t\t\t\t\t\tconst auto charm = g_iobestiary().getBestiaryCharm(activeCharm);\n\t\t\t\t\t\tif (charm && charm->type == CHARM_DEFENSIVE && (charm->chance > normal_random(0, 100))) {\n\t\t\t\t\t\t\tg_iobestiary().parseCharmCombat(charm, targetPlayer, attacker, (damage.primary.value + damage.secondary.value));\n\t\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be8dc23f2f6ffba80e622ad49e12485ab105199bd6560f54e4e7f673770b0917" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6558, + "startColumn": 23, + "charOffset": 219976, + "charLength": 16, + "snippet": { + "text": "parseCharmCombat" + } + }, + "contextRegion": { + "startLine": 6556, + "startColumn": 23, + "charOffset": 219787, + "charLength": 16, + "snippet": { + "text": "\t\t\t\t\t\tconst auto charm = g_iobestiary().getBestiaryCharm(activeCharm);\n\t\t\t\t\t\tif (charm && charm->type == CHARM_DEFENSIVE && (charm->chance > normal_random(0, 100))) {\n\t\t\t\t\t\t\tg_iobestiary().parseCharmCombat(charm, targetPlayer, attacker, (damage.primary.value + damage.secondary.value));\n\t\t\t\t\t\t}\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9e0bab98984fda5ed8355c0946ed7161b71100ab266cf3972e37bbc547fbaf5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6563, + "startColumn": 37, + "charOffset": 220136, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 6561, + "startColumn": 37, + "charOffset": 220089, + "charLength": 6, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t}\n\t\t\tdouble_t primaryReflectPercent = target->getReflectPercent(damage.primary.type, true);\n\t\t\tint32_t primaryReflectFlat = target->getReflectFlat(damage.primary.type, true);\n\t\t\tif (primaryReflectPercent > 0 || primaryReflectFlat > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "129d9ea9bfba1dad9421388e035912c26f3d7465fcd3982e4413f2454d0bb90d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6565, + "startColumn": 32, + "charOffset": 220304, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 6563, + "startColumn": 32, + "charOffset": 220100, + "charLength": 1, + "snippet": { + "text": "\t\t\tdouble_t primaryReflectPercent = target->getReflectPercent(damage.primary.type, true);\n\t\t\tint32_t primaryReflectFlat = target->getReflectFlat(damage.primary.type, true);\n\t\t\tif (primaryReflectPercent > 0 || primaryReflectFlat > 0) {\n\t\t\t\tint32_t distanceX = Position::getDistanceX(target->getPosition(), attacker->getPosition());\n\t\t\t\tint32_t distanceY = Position::getDistanceY(target->getPosition(), attacker->getPosition());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d50c56c7b4c5e432f2fc589a115da745fe8bfcaae73f80f36aac42c607d2b097" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6568, + "startColumn": 105, + "charOffset": 220631, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 6566, + "startColumn": 105, + "charOffset": 220335, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tint32_t distanceX = Position::getDistanceX(target->getPosition(), attacker->getPosition());\n\t\t\t\tint32_t distanceY = Position::getDistanceY(target->getPosition(), attacker->getPosition());\n\t\t\t\tif (target->getMonster() || damage.primary.type != COMBAT_PHYSICALDAMAGE || primaryReflectPercent > 0 || std::max(distanceX, distanceY) < 2) {\n\t\t\t\t\tint32_t reflectFlat = -static_cast(primaryReflectFlat);\n\t\t\t\t\tint32_t reflectPercent = std::ceil(damage.primary.value * primaryReflectPercent / 100.);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33d9ab8d533af8db303083d6591ba3a03ce8d9d57ad301197143086bacc7b19a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-redundant-casting", + "ruleIndex": 716, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant explicit casting to the same type 'int32_t' (aka 'int') as the sub-expression, remove this casting" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6569, + "startColumn": 29, + "charOffset": 220702, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 6567, + "startColumn": 29, + "charOffset": 220431, + "charLength": 11, + "snippet": { + "text": "\t\t\t\tint32_t distanceY = Position::getDistanceY(target->getPosition(), attacker->getPosition());\n\t\t\t\tif (target->getMonster() || damage.primary.type != COMBAT_PHYSICALDAMAGE || primaryReflectPercent > 0 || std::max(distanceX, distanceY) < 2) {\n\t\t\t\t\tint32_t reflectFlat = -static_cast(primaryReflectFlat);\n\t\t\t\t\tint32_t reflectPercent = std::ceil(damage.primary.value * primaryReflectPercent / 100.);\n\t\t\t\t\tint32_t reflectLimit = std::ceil(attacker->getMaxHealth() * 0.01);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7fd2ac356cb5d95a0e0300a08115454f2f9f2c436fc67ae49bb268c7707ebadd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6570, + "startColumn": 31, + "charOffset": 220774, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 6568, + "startColumn": 31, + "charOffset": 220527, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tif (target->getMonster() || damage.primary.type != COMBAT_PHYSICALDAMAGE || primaryReflectPercent > 0 || std::max(distanceX, distanceY) < 2) {\n\t\t\t\t\tint32_t reflectFlat = -static_cast(primaryReflectFlat);\n\t\t\t\t\tint32_t reflectPercent = std::ceil(damage.primary.value * primaryReflectPercent / 100.);\n\t\t\t\t\tint32_t reflectLimit = std::ceil(attacker->getMaxHealth() * 0.01);\n\t\t\t\t\tdamageReflected.primary.value = std::max(-reflectLimit, reflectFlat + reflectPercent);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3985eeab014e4cea2fac2deec7fdd769c6d0b59d2a596aeacb87c99035b86fcd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6571, + "startColumn": 29, + "charOffset": 220866, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 6569, + "startColumn": 29, + "charOffset": 220674, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tint32_t reflectFlat = -static_cast(primaryReflectFlat);\n\t\t\t\t\tint32_t reflectPercent = std::ceil(damage.primary.value * primaryReflectPercent / 100.);\n\t\t\t\t\tint32_t reflectLimit = std::ceil(attacker->getMaxHealth() * 0.01);\n\t\t\t\t\tdamageReflected.primary.value = std::max(-reflectLimit, reflectFlat + reflectPercent);\n\t\t\t\t\tif (targetPlayer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3fcc97eb3de7a0505dbc731a30fb2a88726719cecdfd53414d782e76abf248b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.01 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6571, + "startColumn": 66, + "charOffset": 220903, + "charLength": 4, + "snippet": { + "text": "0.01" + } + }, + "contextRegion": { + "startLine": 6569, + "startColumn": 66, + "charOffset": 220674, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\tint32_t reflectFlat = -static_cast(primaryReflectFlat);\n\t\t\t\t\tint32_t reflectPercent = std::ceil(damage.primary.value * primaryReflectPercent / 100.);\n\t\t\t\t\tint32_t reflectLimit = std::ceil(attacker->getMaxHealth() * 0.01);\n\t\t\t\t\tdamageReflected.primary.value = std::max(-reflectLimit, reflectFlat + reflectPercent);\n\t\t\t\t\tif (targetPlayer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95aba7a10415d345f0d639c383b8b0fe714e1aef3412311a9520835488138e25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6599, + "startColumn": 43, + "charOffset": 221888, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 6597, + "startColumn": 43, + "charOffset": 221716, + "charLength": 1, + "snippet": { + "text": "\t\t\tuint32_t secondaryHealing = target->getMonster()->getHealingCombatValue(damage.secondary.type);\n\t\t\tif (secondaryHealing > 0) {\n\t\t\t\tdamageHeal.primary.value += std::ceil((damage.secondary.value) * (secondaryHealing / 100.));\n\t\t\t\tcanHeal = true;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33df1ab090f8dc9c457034aaeae524028252afc932b0f7308c7c76bb3e871cd3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6599, + "startColumn": 71, + "charOffset": 221916, + "charLength": 16, + "snippet": { + "text": "secondaryHealing" + } + }, + "contextRegion": { + "startLine": 6597, + "startColumn": 71, + "charOffset": 221716, + "charLength": 16, + "snippet": { + "text": "\t\t\tuint32_t secondaryHealing = target->getMonster()->getHealingCombatValue(damage.secondary.type);\n\t\t\tif (secondaryHealing > 0) {\n\t\t\t\tdamageHeal.primary.value += std::ceil((damage.secondary.value) * (secondaryHealing / 100.));\n\t\t\t\tcanHeal = true;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b87bb139406c21c377f4f26081999ac975b6a2e80f434f112b2c7d5888dccd1c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6608, + "startColumn": 30, + "charOffset": 222246, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 6606, + "startColumn": 30, + "charOffset": 222178, + "charLength": 8, + "snippet": { + "text": "\t\t\t\tdamageIncreaseMessage = true;\n\t\t\t}\n\t\t\tdamage.secondary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\n\t\t}\n\t\tdamage.secondary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f819fc9c85353bf5565e12df4f81c684e21e3b635a573311e6c25b21478e9ae0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6608, + "startColumn": 30, + "charOffset": 222246, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 6606, + "startColumn": 30, + "charOffset": 222178, + "charLength": 8, + "snippet": { + "text": "\t\t\t\tdamageIncreaseMessage = true;\n\t\t\t}\n\t\t\tdamage.secondary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\n\t\t}\n\t\tdamage.secondary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e227503abdc023cb85e55caec1906ea147bbae2ad828d0338fbd00766d53dc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6610, + "startColumn": 29, + "charOffset": 222322, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 6608, + "startColumn": 29, + "charOffset": 222217, + "charLength": 6, + "snippet": { + "text": "\t\t\tdamage.secondary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\n\t\t}\n\t\tdamage.secondary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\n\n\t\tsecondaryBlockType = target->blockHit(attacker, damage.secondary.type, damage.secondary.value, false, false, field);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e434dccf756d10b6711e54d059a0e1e37e4188d8c7fb3c3c62c39b9cde0af34d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6610, + "startColumn": 29, + "charOffset": 222322, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 6608, + "startColumn": 29, + "charOffset": 222217, + "charLength": 6, + "snippet": { + "text": "\t\t\tdamage.secondary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\n\t\t}\n\t\tdamage.secondary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\n\n\t\tsecondaryBlockType = target->blockHit(attacker, damage.secondary.type, damage.secondary.value, false, false, field);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a15b248de2c6788d5ef96128e1784c803e203d9bf53369d06075d1f82826863" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-redundant-casting", + "ruleIndex": 716, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant explicit casting to the same type 'int32_t' (aka 'int') as the sub-expression, remove this casting" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6622, + "startColumn": 29, + "charOffset": 223010, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 6620, + "startColumn": 29, + "charOffset": 222893, + "charLength": 11, + "snippet": { + "text": "\t\t\tif (secondaryReflectPercent > 0 || secondaryReflectFlat > 0) {\n\t\t\t\tif (!canReflect) {\n\t\t\t\t\tint32_t reflectFlat = -static_cast(secondaryReflectFlat);\n\t\t\t\t\tint32_t reflectPercent = std::ceil(damage.primary.value * secondaryReflectPercent / 100.);\n\t\t\t\t\tint32_t reflectLimit = std::ceil(attacker->getMaxHealth() * 0.01);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3ca313fefa0fc489646a8975cc670e11a1654571df00bd7cecb5aa76315d633" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6623, + "startColumn": 31, + "charOffset": 223084, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 6621, + "startColumn": 31, + "charOffset": 222959, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tif (!canReflect) {\n\t\t\t\t\tint32_t reflectFlat = -static_cast(secondaryReflectFlat);\n\t\t\t\t\tint32_t reflectPercent = std::ceil(damage.primary.value * secondaryReflectPercent / 100.);\n\t\t\t\t\tint32_t reflectLimit = std::ceil(attacker->getMaxHealth() * 0.01);\n\t\t\t\t\tdamageReflected.primary.value = std::max(-reflectLimit, reflectFlat + reflectPercent);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc65e6e04ddf8cded0a907a07034a04d746995b6117057d9a1b8df404492bdca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6624, + "startColumn": 29, + "charOffset": 223178, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 6622, + "startColumn": 29, + "charOffset": 222982, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tint32_t reflectFlat = -static_cast(secondaryReflectFlat);\n\t\t\t\t\tint32_t reflectPercent = std::ceil(damage.primary.value * secondaryReflectPercent / 100.);\n\t\t\t\t\tint32_t reflectLimit = std::ceil(attacker->getMaxHealth() * 0.01);\n\t\t\t\t\tdamageReflected.primary.value = std::max(-reflectLimit, reflectFlat + reflectPercent);\n\t\t\t\t\tdamageReflected.primary.type = damage.secondary.type;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bac09ef69aa830f9adbd2bd3055ea6a15ec618a7dd8b458efae665accdc1bf9c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.01 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6624, + "startColumn": 66, + "charOffset": 223215, + "charLength": 4, + "snippet": { + "text": "0.01" + } + }, + "contextRegion": { + "startLine": 6622, + "startColumn": 66, + "charOffset": 222982, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\tint32_t reflectFlat = -static_cast(secondaryReflectFlat);\n\t\t\t\t\tint32_t reflectPercent = std::ceil(damage.primary.value * secondaryReflectPercent / 100.);\n\t\t\t\t\tint32_t reflectLimit = std::ceil(attacker->getMaxHealth() * 0.01);\n\t\t\t\t\tdamageReflected.primary.value = std::max(-reflectLimit, reflectFlat + reflectPercent);\n\t\t\t\t\tdamageReflected.primary.type = damage.secondary.type;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2200fc60aa88bbaf85eb54a74b7cc0b249a5cbe2eac83f7f6abc94a670f59c71" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6637, + "startColumn": 48, + "charOffset": 223814, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 6635, + "startColumn": 48, + "charOffset": 223693, + "charLength": 6, + "snippet": { + "text": "\t\t\t\t} else {\n\t\t\t\t\tdamageReflected.secondary.type = damage.secondary.type;\n\t\t\t\t\tdamageReflected.primary.value = std::ceil(damage.secondary.value * secondaryReflectPercent / 100.) + std::max(-static_cast(std::ceil(attacker->getMaxHealth() * 0.01)), std::max(damage.secondary.value, -(static_cast(secondaryReflectFlat))));\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "369e475dfd7b4b755315c9fe8558d62fd445f3354a5a47d91356e102f6ba160a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6637, + "startColumn": 148, + "charOffset": 223914, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 6635, + "startColumn": 148, + "charOffset": 223693, + "charLength": 8, + "snippet": { + "text": "\t\t\t\t} else {\n\t\t\t\t\tdamageReflected.secondary.type = damage.secondary.type;\n\t\t\t\t\tdamageReflected.primary.value = std::ceil(damage.secondary.value * secondaryReflectPercent / 100.) + std::max(-static_cast(std::ceil(attacker->getMaxHealth() * 0.01)), std::max(damage.secondary.value, -(static_cast(secondaryReflectFlat))));\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7865732acb23e30d0334d4efdddf0e07b95a9ba1eab552eb9ed7aec8f06b8c7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.01 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6637, + "startColumn": 175, + "charOffset": 223941, + "charLength": 4, + "snippet": { + "text": "0.01" + } + }, + "contextRegion": { + "startLine": 6635, + "startColumn": 175, + "charOffset": 223693, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t} else {\n\t\t\t\t\tdamageReflected.secondary.type = damage.secondary.type;\n\t\t\t\t\tdamageReflected.primary.value = std::ceil(damage.secondary.value * secondaryReflectPercent / 100.) + std::max(-static_cast(std::ceil(attacker->getMaxHealth() * 0.01)), std::max(damage.secondary.value, -(static_cast(secondaryReflectFlat))));\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc82ce7b1335914b8355515b6db454bd5f58fef4e5cd079e2fd330d8866d0125" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-redundant-casting", + "ruleIndex": 716, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant explicit casting to the same type 'int32_t' (aka 'int') as the sub-expression, remove this casting" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6637, + "startColumn": 218, + "charOffset": 223984, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 6635, + "startColumn": 218, + "charOffset": 223693, + "charLength": 11, + "snippet": { + "text": "\t\t\t\t} else {\n\t\t\t\t\tdamageReflected.secondary.type = damage.secondary.type;\n\t\t\t\t\tdamageReflected.primary.value = std::ceil(damage.secondary.value * secondaryReflectPercent / 100.) + std::max(-static_cast(std::ceil(attacker->getMaxHealth() * 0.01)), std::max(damage.secondary.value, -(static_cast(secondaryReflectFlat))));\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d61e36fe2c98ab499679c494f83792a5d8e1aabe7a0041e4e9f84ae676211a02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6647, + "startColumn": 27, + "charOffset": 224199, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 6645, + "startColumn": 27, + "charOffset": 224126, + "charLength": 6, + "snippet": { + "text": "\n\tif (damage.primary.type == COMBAT_HEALING) {\n\t\tdamage.primary.value *= target->getBuff(BUFF_HEALINGRECEIVED) / 100.;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ad49f3bc284fbb883bac507e1389a8a66ed1c4b23d3858726714f290087020a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6647, + "startColumn": 27, + "charOffset": 224199, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 6645, + "startColumn": 27, + "charOffset": 224126, + "charLength": 6, + "snippet": { + "text": "\n\tif (damage.primary.type == COMBAT_HEALING) {\n\t\tdamage.primary.value *= target->getBuff(BUFF_HEALINGRECEIVED) / 100.;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65cf3a8e58c48ccdfc889bd5d8a2a2d1a3e3b88d378a294e695ccd26ea4f5a33" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-suspicious-call-argument", + "ruleIndex": 732, + "kind": "fail", + "level": "warning", + "message": { + "text": "1st argument 'target' (passed to 'caster') looks like it might be swapped with the 2nd, 'attacker' (passed to 'target')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6665, + "startColumn": 3, + "charOffset": 224575, + "charLength": 6, + "snippet": { + "text": "Combat" + } + }, + "contextRegion": { + "startLine": 6663, + "startColumn": 3, + "charOffset": 224553, + "charLength": 6, + "snippet": { + "text": "\n\tif (canReflect) {\n\t\tCombat::doCombatHealth(target, attacker, damageReflected, damageReflectedParams);\n\t}\n\tif (canHeal) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60fb9ee7ebaf5e866d0cd6af449d65c2ed0c96b27e2ab24efbbb72a458293bcb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6668, + "startColumn": 3, + "charOffset": 224678, + "charLength": 18, + "snippet": { + "text": "combatChangeHealth" + } + }, + "contextRegion": { + "startLine": 6666, + "startColumn": 3, + "charOffset": 224657, + "charLength": 18, + "snippet": { + "text": "\t}\n\tif (canHeal) {\n\t\tcombatChangeHealth(nullptr, target, damageHeal);\n\t}\n\treturn (primaryBlockType != BLOCK_NONE) && (secondaryBlockType != BLOCK_NONE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4db25235f787c55e54fabbad608590587b5cbea5122a1ea388f96cd2f91c030e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'combatGetTypeInfo' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6673, + "startColumn": 12, + "charOffset": 224824, + "charLength": 17, + "snippet": { + "text": "combatGetTypeInfo" + } + }, + "contextRegion": { + "startLine": 6671, + "startColumn": 12, + "charOffset": 224810, + "charLength": 17, + "snippet": { + "text": "}\n\nvoid Game::combatGetTypeInfo(CombatType_t combatType, std::shared_ptr target, TextColor_t &color, uint16_t &effect) {\n\tswitch (combatType) {\n\t\tcase COMBAT_PHYSICALDAMAGE: {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1e56eb48bec9c1b05c2574bde29e48c4e30f4d37c9e279b3223756c3aa06842" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6673, + "startColumn": 81, + "charOffset": 224893, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 6671, + "startColumn": 81, + "charOffset": 224810, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::combatGetTypeInfo(CombatType_t combatType, std::shared_ptr target, TextColor_t &color, uint16_t &effect) {\n\tswitch (combatType) {\n\t\tcase COMBAT_PHYSICALDAMAGE: {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f73187a26a54b8dc3876df7754da53e757cbbca551b580039c1f41616c44ff99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6678, + "startColumn": 5, + "charOffset": 225075, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 6676, + "startColumn": 5, + "charOffset": 224996, + "charLength": 4, + "snippet": { + "text": "\t\t\tstd::shared_ptr splash = nullptr;\n\t\t\tswitch (target->getRace()) {\n\t\t\t\tcase RACE_VENOM:\n\t\t\t\t\tcolor = TEXTCOLOR_LIGHTGREEN;\n\t\t\t\t\teffect = CONST_ME_HITBYPOISON;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52b2b989a8578db949e2c9ff6e48e190e6e46688c08fa781f8427db999413cea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6683, + "startColumn": 5, + "charOffset": 225242, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 6681, + "startColumn": 5, + "charOffset": 225163, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\tsplash = Item::CreateItem(ITEM_SMALLSPLASH, FLUID_SLIME);\n\t\t\t\t\tbreak;\n\t\t\t\tcase RACE_BLOOD:\n\t\t\t\t\tcolor = TEXTCOLOR_RED;\n\t\t\t\t\teffect = CONST_ME_DRAWBLOOD;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "069f08b7869321dfa944ec51348f3a283e3fe3ccb9435b7553be52c332224154" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6692, + "startColumn": 5, + "charOffset": 225530, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 6690, + "startColumn": 5, + "charOffset": 225507, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase RACE_INK:\n\t\t\t\t\tcolor = TEXTCOLOR_LIGHTGREY;\n\t\t\t\t\teffect = CONST_ME_HITAREA;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab3357d8e86a551e584f71835d5428873b63477966f10e645e1e5fada78fd42f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6697, + "startColumn": 5, + "charOffset": 225688, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 6695, + "startColumn": 5, + "charOffset": 225611, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\tsplash = Item::CreateItem(ITEM_SMALLSPLASH, FLUID_INK);\n\t\t\t\t\tbreak;\n\t\t\t\tcase RACE_UNDEAD:\n\t\t\t\t\tcolor = TEXTCOLOR_LIGHTGREY;\n\t\t\t\t\teffect = CONST_ME_HITAREA;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "939490704ebe558dbbeae8516dde6ccc92597c786531397024ac853aa7380474" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6701, + "startColumn": 5, + "charOffset": 225788, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 6699, + "startColumn": 5, + "charOffset": 225740, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\teffect = CONST_ME_HITAREA;\n\t\t\t\t\tbreak;\n\t\t\t\tcase RACE_FIRE:\n\t\t\t\t\tcolor = TEXTCOLOR_ORANGE;\n\t\t\t\t\teffect = CONST_ME_DRAWBLOOD;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e415973d66574267b3102ac01fb84e1bca17bd21c476f62f8719cbff64b03540" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6705, + "startColumn": 5, + "charOffset": 225885, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 6703, + "startColumn": 5, + "charOffset": 225835, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\teffect = CONST_ME_DRAWBLOOD;\n\t\t\t\t\tbreak;\n\t\t\t\tcase RACE_ENERGY:\n\t\t\t\t\tcolor = TEXTCOLOR_PURPLE;\n\t\t\t\t\teffect = CONST_ME_ENERGYHIT;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c0e79b94fc4dc751d45748703574f98197d99ca442c0b10c4afa28b09e76ffd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6709, + "startColumn": 5, + "charOffset": 225984, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 6707, + "startColumn": 5, + "charOffset": 225934, + "charLength": 7, + "snippet": { + "text": "\t\t\t\t\teffect = CONST_ME_ENERGYHIT;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tcolor = TEXTCOLOR_NONE;\n\t\t\t\t\teffect = CONST_ME_NONE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53d975f7caeead55af70a752ce4c96cdc1731a5083de467426b89461b6b8be9b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6716, + "startColumn": 29, + "charOffset": 226114, + "charLength": 7, + "snippet": { + "text": "getTile" + } + }, + "contextRegion": { + "startLine": 6714, + "startColumn": 29, + "charOffset": 226068, + "charLength": 7, + "snippet": { + "text": "\n\t\t\tif (splash) {\n\t\t\t\tinternalAddItem(target->getTile(), splash, INDEX_WHEREEVER, FLAG_NOLIMIT);\n\t\t\t\tsplash->startDecaying();\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eda20116ac4733a3bf41c81abdbd0bf98cd894dde02542f8da37ad1ce9779ba0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'handleHazardSystemAttack' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6784, + "startColumn": 12, + "charOffset": 227394, + "charLength": 24, + "snippet": { + "text": "handleHazardSystemAttack" + } + }, + "contextRegion": { + "startLine": 6782, + "startColumn": 12, + "charOffset": 227357, + "charLength": 24, + "snippet": { + "text": "\n// Hazard combat helpers\nvoid Game::handleHazardSystemAttack(CombatDamage &damage, std::shared_ptr player, std::shared_ptr monster, bool isPlayerAttacker) {\n\tif (damage.primary.value != 0 && monster->getHazard()) {\n\t\tif (isPlayerAttacker) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8bde58c5dff7bcd3f752cd79a4637348be21ae27b5ea76752740de1a987dd2bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6784, + "startColumn": 83, + "charOffset": 227465, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 6782, + "startColumn": 83, + "charOffset": 227357, + "charLength": 6, + "snippet": { + "text": "\n// Hazard combat helpers\nvoid Game::handleHazardSystemAttack(CombatDamage &damage, std::shared_ptr player, std::shared_ptr monster, bool isPlayerAttacker) {\n\tif (damage.primary.value != 0 && monster->getHazard()) {\n\t\tif (isPlayerAttacker) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e534d3937544725f27fef5f654f8f8256e17340f95965f8d935d3f681351dd0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6784, + "startColumn": 116, + "charOffset": 227498, + "charLength": 7, + "snippet": { + "text": "monster" + } + }, + "contextRegion": { + "startLine": 6782, + "startColumn": 116, + "charOffset": 227357, + "charLength": 7, + "snippet": { + "text": "\n// Hazard combat helpers\nvoid Game::handleHazardSystemAttack(CombatDamage &damage, std::shared_ptr player, std::shared_ptr monster, bool isPlayerAttacker) {\n\tif (damage.primary.value != 0 && monster->getHazard()) {\n\t\tif (isPlayerAttacker) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1af5e1d4bed6c0bd08f91804d2e2df470f588f084cae979dc4303af26007f3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6794, + "startColumn": 114, + "charOffset": 227865, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + } + }, + "contextRegion": { + "startLine": 6792, + "startColumn": 114, + "charOffset": 227749, + "charLength": 14, + "snippet": { + "text": "}\n\nvoid Game::notifySpectators(const CreatureVector &spectators, const Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetMonster) {\n\tif (!spectators.empty()) {\n\t\tfor (const auto &spectator : spectators) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0f8276065e0b180ad2bcbb67aaa05d703e4280fe260550024905e6210cec4cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6794, + "startColumn": 155, + "charOffset": 227906, + "charLength": 13, + "snippet": { + "text": "targetMonster" + } + }, + "contextRegion": { + "startLine": 6792, + "startColumn": 155, + "charOffset": 227749, + "charLength": 13, + "snippet": { + "text": "}\n\nvoid Game::notifySpectators(const CreatureVector &spectators, const Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetMonster) {\n\tif (!spectators.empty()) {\n\t\tfor (const auto &spectator : spectators) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4e040cf17a4ea66e757f8d2176930db2fe7d5b71b83eb02bb909440822e275a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6823, + "startColumn": 73, + "charOffset": 228795, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 6821, + "startColumn": 73, + "charOffset": 228686, + "charLength": 8, + "snippet": { + "text": "\n// Custom PvP System combat helpers\nvoid Game::applyPvPDamage(CombatDamage &damage, std::shared_ptr attacker, std::shared_ptr target) {\n\tfloat targetDamageReceivedMultiplier = target->vocation->pvpDamageReceivedMultiplier;\n\tfloat attackerDamageDealtMultiplier = attacker->vocation->pvpDamageDealtMultiplier;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fea21ef5c25ca2b0940ef84972fb0a4edc3fe7a44e66b93e72bd3af048b5120d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6823, + "startColumn": 107, + "charOffset": 228829, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 6821, + "startColumn": 107, + "charOffset": 228686, + "charLength": 6, + "snippet": { + "text": "\n// Custom PvP System combat helpers\nvoid Game::applyPvPDamage(CombatDamage &damage, std::shared_ptr attacker, std::shared_ptr target) {\n\tfloat targetDamageReceivedMultiplier = target->vocation->pvpDamageReceivedMultiplier;\n\tfloat attackerDamageDealtMultiplier = attacker->vocation->pvpDamageDealtMultiplier;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3fa3edf5ec70a886ad9b1ee3f957fc794e5262a5989a366d50f2f2901ff3f57" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6830, + "startColumn": 25, + "charOffset": 229265, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 6828, + "startColumn": 25, + "charOffset": 229113, + "charLength": 3, + "snippet": { + "text": "\tfloat pvpDamageMultiplier = targetDamageReceivedMultiplier * attackerDamageDealtMultiplier * levelDifferenceDamageMultiplier;\n\n\tdamage.primary.value = std::round(damage.primary.value * pvpDamageMultiplier);\n\tdamage.secondary.value = std::round(damage.secondary.value * pvpDamageMultiplier);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97137f1d60169b7215d9448bd87b9dadb9f54517fb1acb48d211c752034cb9b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6830, + "startColumn": 25, + "charOffset": 229265, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 6828, + "startColumn": 25, + "charOffset": 229113, + "charLength": 3, + "snippet": { + "text": "\tfloat pvpDamageMultiplier = targetDamageReceivedMultiplier * attackerDamageDealtMultiplier * levelDifferenceDamageMultiplier;\n\n\tdamage.primary.value = std::round(damage.primary.value * pvpDamageMultiplier);\n\tdamage.secondary.value = std::round(damage.secondary.value * pvpDamageMultiplier);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2433694987a27415ba58a3b207af0d0647317b509b66b29b2744a398b08544ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6830, + "startColumn": 36, + "charOffset": 229276, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 6828, + "startColumn": 36, + "charOffset": 229113, + "charLength": 6, + "snippet": { + "text": "\tfloat pvpDamageMultiplier = targetDamageReceivedMultiplier * attackerDamageDealtMultiplier * levelDifferenceDamageMultiplier;\n\n\tdamage.primary.value = std::round(damage.primary.value * pvpDamageMultiplier);\n\tdamage.secondary.value = std::round(damage.secondary.value * pvpDamageMultiplier);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "884f4c1913bada2000701eab73d29733079d81d98dfc7fd3e1987d4b09b9870a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6831, + "startColumn": 27, + "charOffset": 229347, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 6829, + "startColumn": 27, + "charOffset": 229240, + "charLength": 3, + "snippet": { + "text": "\n\tdamage.primary.value = std::round(damage.primary.value * pvpDamageMultiplier);\n\tdamage.secondary.value = std::round(damage.secondary.value * pvpDamageMultiplier);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e84eb78559ed558ab88f64ee487ac7e4624d6b5f961c383cfb63bad20ee7258" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6831, + "startColumn": 27, + "charOffset": 229347, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 6829, + "startColumn": 27, + "charOffset": 229240, + "charLength": 3, + "snippet": { + "text": "\n\tdamage.primary.value = std::round(damage.primary.value * pvpDamageMultiplier);\n\tdamage.secondary.value = std::round(damage.secondary.value * pvpDamageMultiplier);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e939c67d2abd86c14b0772b81a1e1d559065032fb871caff3c53cc47364063e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6831, + "startColumn": 38, + "charOffset": 229358, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 6829, + "startColumn": 38, + "charOffset": 229240, + "charLength": 6, + "snippet": { + "text": "\n\tdamage.primary.value = std::round(damage.primary.value * pvpDamageMultiplier);\n\tdamage.secondary.value = std::round(damage.secondary.value * pvpDamageMultiplier);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63403f3be18e6592aa0f1d238ec2225472db59f5936d1e06bd8a87f260512726" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'pvpLevelDifferenceDamageMultiplier' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6834, + "startColumn": 13, + "charOffset": 229420, + "charLength": 34, + "snippet": { + "text": "pvpLevelDifferenceDamageMultiplier" + } + }, + "contextRegion": { + "startLine": 6832, + "startColumn": 13, + "charOffset": 229405, + "charLength": 34, + "snippet": { + "text": "}\n\nfloat Game::pvpLevelDifferenceDamageMultiplier(std::shared_ptr attacker, std::shared_ptr target) {\n\tint32_t levelDifference = target->getLevel() - attacker->getLevel();\n\tlevelDifference = std::abs(levelDifference);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a25744f1b27fa4cf239a19bf738c2fa52d4dcba2512a1913043063c38406f22" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6834, + "startColumn": 72, + "charOffset": 229479, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 6832, + "startColumn": 72, + "charOffset": 229405, + "charLength": 8, + "snippet": { + "text": "}\n\nfloat Game::pvpLevelDifferenceDamageMultiplier(std::shared_ptr attacker, std::shared_ptr target) {\n\tint32_t levelDifference = target->getLevel() - attacker->getLevel();\n\tlevelDifference = std::abs(levelDifference);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3afbe9624e560c55a1d43b29872b606bb716e5fcb82f512ef2725e9943b1691f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6834, + "startColumn": 106, + "charOffset": 229513, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 6832, + "startColumn": 106, + "charOffset": 229405, + "charLength": 6, + "snippet": { + "text": "}\n\nfloat Game::pvpLevelDifferenceDamageMultiplier(std::shared_ptr attacker, std::shared_ptr target) {\n\tint32_t levelDifference = target->getLevel() - attacker->getLevel();\n\tlevelDifference = std::abs(levelDifference);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5cca68f224e7bc11b60335d0dca156b2de7e65bde10baf163cfa4f363a27e07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6835, + "startColumn": 28, + "charOffset": 229550, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 6833, + "startColumn": 28, + "charOffset": 229407, + "charLength": 6, + "snippet": { + "text": "\nfloat Game::pvpLevelDifferenceDamageMultiplier(std::shared_ptr attacker, std::shared_ptr target) {\n\tint32_t levelDifference = target->getLevel() - attacker->getLevel();\n\tlevelDifference = std::abs(levelDifference);\n\tbool isLowerLevel = target->getLevel() < attacker->getLevel();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65c42e32f0e12c5febf86d14571c06cd21e01dcc6b4467b58b6c4ade00b4d6c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6842, + "startColumn": 24, + "charOffset": 229893, + "charLength": 3, + "snippet": { + "text": "1.0" + } + }, + "contextRegion": { + "startLine": 6840, + "startColumn": 24, + "charOffset": 229803, + "charLength": 3, + "snippet": { + "text": "\tlevelDifference = std::min(levelDifference, maxLevelDifference);\n\n\tfloat levelDiffRate = 1.0;\n\tif (isLowerLevel) {\n\t\tfloat rateDamageTakenByLevel = g_configManager().getFloat(PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, __FUNCTION__) / 100;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a249b704e92c3b819668ffac321e97f02a7d39fc23a25cf2f2100d4abd92097" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6844, + "startColumn": 110, + "charOffset": 230028, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 6842, + "startColumn": 110, + "charOffset": 229870, + "charLength": 3, + "snippet": { + "text": "\tfloat levelDiffRate = 1.0;\n\tif (isLowerLevel) {\n\t\tfloat rateDamageTakenByLevel = g_configManager().getFloat(PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, __FUNCTION__) / 100;\n\t\tlevelDiffRate += levelDifference * rateDamageTakenByLevel;\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74e677b867a22ae8876510302a3491653e6f18bdcf837fe2e008acd98d63143a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6844, + "startColumn": 110, + "charOffset": 230028, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 6842, + "startColumn": 110, + "charOffset": 229870, + "charLength": 3, + "snippet": { + "text": "\tfloat levelDiffRate = 1.0;\n\tif (isLowerLevel) {\n\t\tfloat rateDamageTakenByLevel = g_configManager().getFloat(PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, __FUNCTION__) / 100;\n\t\tlevelDiffRate += levelDifference * rateDamageTakenByLevel;\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de5786ea5d2a3c63a36ea634e166e6cd0eb69bb423501216369acfef766580b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6845, + "startColumn": 20, + "charOffset": 230052, + "charLength": 15, + "snippet": { + "text": "levelDifference" + } + }, + "contextRegion": { + "startLine": 6843, + "startColumn": 20, + "charOffset": 229898, + "charLength": 15, + "snippet": { + "text": "\tif (isLowerLevel) {\n\t\tfloat rateDamageTakenByLevel = g_configManager().getFloat(PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, __FUNCTION__) / 100;\n\t\tlevelDiffRate += levelDifference * rateDamageTakenByLevel;\n\t} else {\n\t\tfloat rateDamageReductionByLevel = g_configManager().getFloat(PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, __FUNCTION__) / 100;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0d9ab9c1666b5b4972deffb203d175b595e9ef539148f6dc3a2c930868d7964" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6845, + "startColumn": 20, + "charOffset": 230052, + "charLength": 15, + "snippet": { + "text": "levelDifference" + } + }, + "contextRegion": { + "startLine": 6843, + "startColumn": 20, + "charOffset": 229898, + "charLength": 15, + "snippet": { + "text": "\tif (isLowerLevel) {\n\t\tfloat rateDamageTakenByLevel = g_configManager().getFloat(PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, __FUNCTION__) / 100;\n\t\tlevelDiffRate += levelDifference * rateDamageTakenByLevel;\n\t} else {\n\t\tfloat rateDamageReductionByLevel = g_configManager().getFloat(PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, __FUNCTION__) / 100;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a2f8f914f86cc7eb21ccc68d9b43632d35beb12ed293de05eb2012e557d5a00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6847, + "startColumn": 118, + "charOffset": 230221, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 6845, + "startColumn": 118, + "charOffset": 230033, + "charLength": 3, + "snippet": { + "text": "\t\tlevelDiffRate += levelDifference * rateDamageTakenByLevel;\n\t} else {\n\t\tfloat rateDamageReductionByLevel = g_configManager().getFloat(PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, __FUNCTION__) / 100;\n\t\tlevelDiffRate -= levelDifference * rateDamageReductionByLevel;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd1a94fc7dc37996faee074aa76b66d4c9d615d0a7001bb9f702a493e87d61a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6847, + "startColumn": 118, + "charOffset": 230221, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 6845, + "startColumn": 118, + "charOffset": 230033, + "charLength": 3, + "snippet": { + "text": "\t\tlevelDiffRate += levelDifference * rateDamageTakenByLevel;\n\t} else {\n\t\tfloat rateDamageReductionByLevel = g_configManager().getFloat(PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, __FUNCTION__) / 100;\n\t\tlevelDiffRate -= levelDifference * rateDamageReductionByLevel;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "660e56f293a1603aea919b5af1867d77651817229d30dbb097f5bdb904ebc624" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6848, + "startColumn": 20, + "charOffset": 230245, + "charLength": 15, + "snippet": { + "text": "levelDifference" + } + }, + "contextRegion": { + "startLine": 6846, + "startColumn": 20, + "charOffset": 230094, + "charLength": 15, + "snippet": { + "text": "\t} else {\n\t\tfloat rateDamageReductionByLevel = g_configManager().getFloat(PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, __FUNCTION__) / 100;\n\t\tlevelDiffRate -= levelDifference * rateDamageReductionByLevel;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59057f51c1f5cd27a7df864279e9baa93a287f0f2662e8823fc78de3dd485240" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6848, + "startColumn": 20, + "charOffset": 230245, + "charLength": 15, + "snippet": { + "text": "levelDifference" + } + }, + "contextRegion": { + "startLine": 6846, + "startColumn": 20, + "charOffset": 230094, + "charLength": 15, + "snippet": { + "text": "\t} else {\n\t\tfloat rateDamageReductionByLevel = g_configManager().getFloat(PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, __FUNCTION__) / 100;\n\t\tlevelDiffRate -= levelDifference * rateDamageReductionByLevel;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eea5f861b8fc64ea15d91bf2beb8b740cff9486ce3e3641883360a5286019fb3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6855, + "startColumn": 85, + "charOffset": 230440, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + } + }, + "contextRegion": { + "startLine": 6853, + "startColumn": 85, + "charOffset": 230320, + "charLength": 14, + "snippet": { + "text": "\n// Wheel of destiny combat helpers\nvoid Game::applyWheelOfDestinyHealing(CombatDamage &damage, std::shared_ptr attackerPlayer, std::shared_ptr target) {\n\tdamage.primary.value += (damage.primary.value * damage.healingMultiplier) / 100.;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4444882c704f68a458bc9d56913b00cd016e64022c9367fccd2012047b46eebc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6856, + "startColumn": 26, + "charOffset": 230517, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 6854, + "startColumn": 26, + "charOffset": 230321, + "charLength": 1, + "snippet": { + "text": "// Wheel of destiny combat helpers\nvoid Game::applyWheelOfDestinyHealing(CombatDamage &damage, std::shared_ptr attackerPlayer, std::shared_ptr target) {\n\tdamage.primary.value += (damage.primary.value * damage.healingMultiplier) / 100.;\n\n\tif (attackerPlayer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd2a17b2def517809da05e46027823d5599969df6b443f95fd3fe568a7f8f7e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6856, + "startColumn": 26, + "charOffset": 230517, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 6854, + "startColumn": 26, + "charOffset": 230321, + "charLength": 1, + "snippet": { + "text": "// Wheel of destiny combat helpers\nvoid Game::applyWheelOfDestinyHealing(CombatDamage &damage, std::shared_ptr attackerPlayer, std::shared_ptr target) {\n\tdamage.primary.value += (damage.primary.value * damage.healingMultiplier) / 100.;\n\n\tif (attackerPlayer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72c4a416465bc2fff6191cf79fdb9d4512ce28d537b92a74b6a0cb0a546b3f6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6867, + "startColumn": 76, + "charOffset": 230943, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 6865, + "startColumn": 76, + "charOffset": 230809, + "charLength": 3, + "snippet": { + "text": "\t\tif (damage.healingLink > 0) {\n\t\t\tCombatDamage tmpDamage;\n\t\t\ttmpDamage.primary.value = (damage.primary.value * damage.healingLink) / 100;\n\t\t\ttmpDamage.primary.type = COMBAT_HEALING;\n\t\t\tcombatChangeHealth(attackerPlayer, attackerPlayer, tmpDamage);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0682d1ce0bbb504129d3d57c735cc53211474773ccc0f324466d3e3c29a8da0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6873, + "startColumn": 28, + "charOffset": 231160, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 6871, + "startColumn": 28, + "charOffset": 231062, + "charLength": 1, + "snippet": { + "text": "\n\t\tif (attackerPlayer->wheel()->getInstant(\"Blessing of the Grove\")) {\n\t\t\tdamage.primary.value += (damage.primary.value * attackerPlayer->wheel()->checkBlessingGroveHealingByTarget(target)) / 100.;\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "913b86f134e5c71fda9e78cbf3e50bdb2bc0fb5ddae9a9abfe9fa28b1a531867" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6873, + "startColumn": 28, + "charOffset": 231160, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 6871, + "startColumn": 28, + "charOffset": 231062, + "charLength": 1, + "snippet": { + "text": "\n\t\tif (attackerPlayer->wheel()->getInstant(\"Blessing of the Grove\")) {\n\t\t\tdamage.primary.value += (damage.primary.value * attackerPlayer->wheel()->checkBlessingGroveHealingByTarget(target)) / 100.;\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4195d74195f518a05aea9e1f5187815d606d05d4fe495f62f7a683da1a337f75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6873, + "startColumn": 111, + "charOffset": 231243, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 6871, + "startColumn": 111, + "charOffset": 231062, + "charLength": 6, + "snippet": { + "text": "\n\t\tif (attackerPlayer->wheel()->getInstant(\"Blessing of the Grove\")) {\n\t\t\tdamage.primary.value += (damage.primary.value * attackerPlayer->wheel()->checkBlessingGroveHealingByTarget(target)) / 100.;\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93bf1c3a6cec82cd552b2f5c0143b3700f1759b4909d02b7c001769e659c4c1a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'applyWheelOfDestinyEffectsToDamage' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6878, + "startColumn": 12, + "charOffset": 231281, + "charLength": 34, + "snippet": { + "text": "applyWheelOfDestinyEffectsToDamage" + } + }, + "contextRegion": { + "startLine": 6876, + "startColumn": 12, + "charOffset": 231267, + "charLength": 34, + "snippet": { + "text": "}\n\nvoid Game::applyWheelOfDestinyEffectsToDamage(CombatDamage &damage, std::shared_ptr attackerPlayer, std::shared_ptr target) const {\n\t// If damage is 0, it means the target is immune to the damage type, or that we missed.\n\tif (damage.primary.value == 0 && damage.secondary.value == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6eeed93aa8a266d1e954a9c37509382fe0b79c84a9881ac90d068d3cfbacd9fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6878, + "startColumn": 93, + "charOffset": 231362, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + } + }, + "contextRegion": { + "startLine": 6876, + "startColumn": 93, + "charOffset": 231267, + "charLength": 14, + "snippet": { + "text": "}\n\nvoid Game::applyWheelOfDestinyEffectsToDamage(CombatDamage &damage, std::shared_ptr attackerPlayer, std::shared_ptr target) const {\n\t// If damage is 0, it means the target is immune to the damage type, or that we missed.\n\tif (damage.primary.value == 0 && damage.secondary.value == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40ac90704f05ebb480087e7eed91925f169210c48f2d5408a287a2f06dd9a513" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6878, + "startColumn": 135, + "charOffset": 231404, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 6876, + "startColumn": 135, + "charOffset": 231267, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::applyWheelOfDestinyEffectsToDamage(CombatDamage &damage, std::shared_ptr attackerPlayer, std::shared_ptr target) const {\n\t// If damage is 0, it means the target is immune to the damage type, or that we missed.\n\tif (damage.primary.value == 0 && damage.secondary.value == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a673b09883aec9eed7f74847243d1fe3c5d7ecd23273f56f491df7051f0aabb2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6885, + "startColumn": 27, + "charOffset": 231650, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 6883, + "startColumn": 27, + "charOffset": 231587, + "charLength": 1, + "snippet": { + "text": "\n\tif (damage.damageMultiplier > 0) {\n\t\tdamage.primary.value += (damage.primary.value * (damage.damageMultiplier)) / 100.;\n\t\tdamage.secondary.value += (damage.secondary.value * (damage.damageMultiplier)) / 100.;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e4ed29d9af313bb8f4fb2abcf223f53f3b8747b7bdbf92b5f5b0cb11311cff7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6885, + "startColumn": 27, + "charOffset": 231650, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 6883, + "startColumn": 27, + "charOffset": 231587, + "charLength": 1, + "snippet": { + "text": "\n\tif (damage.damageMultiplier > 0) {\n\t\tdamage.primary.value += (damage.primary.value * (damage.damageMultiplier)) / 100.;\n\t\tdamage.secondary.value += (damage.secondary.value * (damage.damageMultiplier)) / 100.;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c615a2985d55479da2fccfe2450267718fe5a6c9a6b6570ee8274d4f44f389e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6886, + "startColumn": 29, + "charOffset": 231737, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 6884, + "startColumn": 29, + "charOffset": 231588, + "charLength": 1, + "snippet": { + "text": "\tif (damage.damageMultiplier > 0) {\n\t\tdamage.primary.value += (damage.primary.value * (damage.damageMultiplier)) / 100.;\n\t\tdamage.secondary.value += (damage.secondary.value * (damage.damageMultiplier)) / 100.;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d46c7d883d712cb5ea257f35ef3d477377727fe0dcc30f8c0905ebd2dd0e0eff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6886, + "startColumn": 29, + "charOffset": 231737, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 6884, + "startColumn": 29, + "charOffset": 231588, + "charLength": 1, + "snippet": { + "text": "\tif (damage.damageMultiplier > 0) {\n\t\tdamage.primary.value += (damage.primary.value * (damage.damageMultiplier)) / 100.;\n\t\tdamage.secondary.value += (damage.secondary.value * (damage.damageMultiplier)) / 100.;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48e3cf9d5cfa99aea4a8278e48a7dcaadf739fc1fb8403ccab4f0aeba64f8044" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6897, + "startColumn": 29, + "charOffset": 232217, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 6895, + "startColumn": 29, + "charOffset": 232080, + "charLength": 1, + "snippet": { + "text": "\t\t\tint32_t damageBonus = attackerPlayer->wheel()->checkTwinBurstByTarget(target);\n\t\t\tif (damageBonus != 0) {\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25261d0630bdcb37bdd8d9c877954b5ce0dd1cae40b0d20ff82f361965abb390" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6897, + "startColumn": 29, + "charOffset": 232217, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 6895, + "startColumn": 29, + "charOffset": 232080, + "charLength": 1, + "snippet": { + "text": "\t\t\tint32_t damageBonus = attackerPlayer->wheel()->checkTwinBurstByTarget(target);\n\t\t\tif (damageBonus != 0) {\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15acd8565a419f66edf9f8cc5ff5e4cf369de6d4fbfd870c8aad8fc129cb998b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6898, + "startColumn": 31, + "charOffset": 232292, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 6896, + "startColumn": 31, + "charOffset": 232162, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (damageBonus != 0) {\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5bd2c27f40057705bb3894537318b87ab245cbfe0263879d98df85cef2ad569c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6898, + "startColumn": 31, + "charOffset": 232292, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 6896, + "startColumn": 31, + "charOffset": 232162, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (damageBonus != 0) {\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "935306e7483d0c94f2c9813db303718078744994ae48b2e1f530c9d9121f6248" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6904, + "startColumn": 29, + "charOffset": 232543, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 6902, + "startColumn": 29, + "charOffset": 232406, + "charLength": 1, + "snippet": { + "text": "\t\t\tint32_t damageBonus = attackerPlayer->wheel()->checkExecutionersThrow(target);\n\t\t\tif (damageBonus != 0) {\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b6eb5940c03f1fa4b37705d1f0d93ba1042783f026af952df82c3a307c7d2a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6904, + "startColumn": 29, + "charOffset": 232543, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 6902, + "startColumn": 29, + "charOffset": 232406, + "charLength": 1, + "snippet": { + "text": "\t\t\tint32_t damageBonus = attackerPlayer->wheel()->checkExecutionersThrow(target);\n\t\t\tif (damageBonus != 0) {\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7231b91467ed1a5868fc72a037a6c531f410174b7b9f4d8e9e61b85f0482a0bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6905, + "startColumn": 31, + "charOffset": 232618, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 6903, + "startColumn": 31, + "charOffset": 232488, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (damageBonus != 0) {\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4aaaeb673f30413bf9c9c7ca0e483117086f581fcd49116fdc6aeb024a6354c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6905, + "startColumn": 31, + "charOffset": 232618, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 6903, + "startColumn": 31, + "charOffset": 232488, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (damageBonus != 0) {\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7865732acb23e30d0334d4efdddf0e07b95a9ba1eab552eb9ed7aec8f06b8c7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6911, + "startColumn": 29, + "charOffset": 232860, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 6909, + "startColumn": 29, + "charOffset": 232727, + "charLength": 1, + "snippet": { + "text": "\t\t\tint32_t damageBonus = attackerPlayer->wheel()->checkDivineGrenade(target);\n\t\t\tif (damageBonus != 0) {\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0f83da226726b47bb213c9acd4218c2af401921bd20dcf2fa5257ac0a48f8f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6911, + "startColumn": 29, + "charOffset": 232860, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 6909, + "startColumn": 29, + "charOffset": 232727, + "charLength": 1, + "snippet": { + "text": "\t\t\tint32_t damageBonus = attackerPlayer->wheel()->checkDivineGrenade(target);\n\t\t\tif (damageBonus != 0) {\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61becb949cbeca294ab597c2c897d8a47b3acdc7743495d9347050a20352a7b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6912, + "startColumn": 31, + "charOffset": 232935, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 6910, + "startColumn": 31, + "charOffset": 232805, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (damageBonus != 0) {\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d7a2fd99f568ec8d4ac19aac16590509c5baa8eb2e47c21aebf8aad89f44ad9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6912, + "startColumn": 31, + "charOffset": 232935, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 6910, + "startColumn": 31, + "charOffset": 232805, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (damageBonus != 0) {\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0dee024c8e1ada8ca1aaaf7996f388573a319ed3aa76ea01407288b94e781cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'applyHealthChange' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6918, + "startColumn": 15, + "charOffset": 233011, + "charLength": 17, + "snippet": { + "text": "applyHealthChange" + } + }, + "contextRegion": { + "startLine": 6916, + "startColumn": 15, + "charOffset": 232994, + "charLength": 17, + "snippet": { + "text": "}\n\nint32_t Game::applyHealthChange(CombatDamage &damage, std::shared_ptr target) const {\n\tint32_t targetHealth = target->getHealth();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54dba993eeaebc9418c8382b700b57e10497b5c74ce85612760fd0bb50cdd66b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6918, + "startColumn": 81, + "charOffset": 233077, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 6916, + "startColumn": 81, + "charOffset": 232994, + "charLength": 6, + "snippet": { + "text": "}\n\nint32_t Game::applyHealthChange(CombatDamage &damage, std::shared_ptr target) const {\n\tint32_t targetHealth = target->getHealth();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "806751684085c349fff5a4ce94d0ab87bc5e5583d62cf043a031a019bccc6ef5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6925, + "startColumn": 47, + "charOffset": 233561, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 6923, + "startColumn": 47, + "charOffset": 233242, + "charLength": 3, + "snippet": { + "text": "\t\tif (targetPlayer->wheel()->getInstant(\"Gift of Life\") && targetPlayer->wheel()->getGiftOfCooldown() == 0 && (damage.primary.value + damage.secondary.value) >= targetHealth) {\n\t\t\tint32_t overkillMultiplier = (damage.primary.value + damage.secondary.value) - targetHealth;\n\t\t\toverkillMultiplier = (overkillMultiplier * 100) / targetPlayer->getMaxHealth();\n\t\t\tif (overkillMultiplier <= targetPlayer->wheel()->getGiftOfLifeValue()) {\n\t\t\t\ttargetPlayer->wheel()->checkGiftOfLife();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13ce5ac72418853558f5d15a5aebe7093fa412bed6c4fa93a22c4eb8df59df9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'combatChangeHealth' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6935, + "startColumn": 12, + "charOffset": 233808, + "charLength": 18, + "snippet": { + "text": "combatChangeHealth" + } + }, + "contextRegion": { + "startLine": 6933, + "startColumn": 12, + "charOffset": 233794, + "charLength": 18, + "snippet": { + "text": "}\n\nbool Game::combatChangeHealth(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage, bool isEvent /*= false*/) {\n\tusing namespace std;\n\tconst Position &targetPos = target->getPosition();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7858d1564bcf17d908ad57b071c44f9b7be451038125364b3051f7e249dd830e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'combatChangeHealth' has cognitive complexity of 210 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6935, + "startColumn": 12, + "charOffset": 233808, + "charLength": 18, + "snippet": { + "text": "combatChangeHealth" + } + }, + "contextRegion": { + "startLine": 6933, + "startColumn": 12, + "charOffset": 233794, + "charLength": 18, + "snippet": { + "text": "}\n\nbool Game::combatChangeHealth(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage, bool isEvent /*= false*/) {\n\tusing namespace std;\n\tconst Position &targetPos = target->getPosition();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0193a0f55037f486b38383f5623b99faa70686d1f5b46186d280b7653038b4b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6935, + "startColumn": 57, + "charOffset": 233853, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 6933, + "startColumn": 57, + "charOffset": 233794, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Game::combatChangeHealth(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage, bool isEvent /*= false*/) {\n\tusing namespace std;\n\tconst Position &targetPos = target->getPosition();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2500164402b1706fde2c53e40e0178bb7c37de6987c7c5a9b4ea81eeb3efa41e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-7-3-4", + "ruleIndex": 464, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 7-3-4: using-directives shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6936, + "startColumn": 2, + "charOffset": 233948, + "charLength": 5, + "snippet": { + "text": "using" + } + }, + "contextRegion": { + "startLine": 6934, + "startColumn": 2, + "charOffset": 233796, + "charLength": 5, + "snippet": { + "text": "\nbool Game::combatChangeHealth(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage, bool isEvent /*= false*/) {\n\tusing namespace std;\n\tconst Position &targetPos = target->getPosition();\n\tif (damage.primary.value > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7132a825a99f8d924fa28bde2fee0c0811e513864f28d74420c9046ad4a2b4cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-build-using-namespace", + "ruleIndex": 532, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use namespace using-directives; use using-declarations instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 6936, + "startColumn": 2, + "charOffset": 233948, + "charLength": 5, + "snippet": { + "text": "using" + } + }, + "contextRegion": { + "startLine": 6934, + "startColumn": 2, + "charOffset": 233796, + "charLength": 5, + "snippet": { + "text": "\nbool Game::combatChangeHealth(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage, bool isEvent /*= false*/) {\n\tusing namespace std;\n\tconst Position &targetPos = target->getPosition();\n\tif (damage.primary.value > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "379fa4e6025dbf4f24c67e31b62d4266bac4af98ddc24553a098c07148e7af00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Expression can be simplified" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7075, + "startColumn": 54, + "charOffset": 238286, + "charLength": 2, + "snippet": { + "text": "==" + } + }, + "contextRegion": { + "startLine": 7073, + "startColumn": 54, + "charOffset": 238228, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (attacker && attackerPlayer && damage.extension == false && damage.origin == ORIGIN_RANGED && target == attackerPlayer->getAttackedCreature()) {\n\t\t\tconst Position &attackerPos = attacker->getPosition();\n\t\t\tif (targetPos.z == attackerPos.z) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e325eb47adf1e43cbfb864e5692d81c89caf08f8ed218b29c5aa47bbef71fb61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal supplied to boolean operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7075, + "startColumn": 57, + "charOffset": 238289, + "charLength": 5, + "snippet": { + "text": "false" + } + }, + "contextRegion": { + "startLine": 7073, + "startColumn": 57, + "charOffset": 238228, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\n\t\tif (attacker && attackerPlayer && damage.extension == false && damage.origin == ORIGIN_RANGED && target == attackerPlayer->getAttackedCreature()) {\n\t\t\tconst Position &attackerPos = attacker->getPosition();\n\t\t\tif (targetPos.z == attackerPos.z) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d5c3d6caf8e1ef1dff6c7ca39af1d4a8a801a075da972fb9153eaa7b8bef01e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7080, + "startColumn": 60, + "charOffset": 238683, + "charLength": 9, + "snippet": { + "text": "distanceX" + } + }, + "contextRegion": { + "startLine": 7078, + "startColumn": 60, + "charOffset": 238480, + "charLength": 9, + "snippet": { + "text": "\t\t\t\tint32_t distanceX = Position::getDistanceX(targetPos, attackerPos);\n\t\t\t\tint32_t distanceY = Position::getDistanceY(targetPos, attackerPos);\n\t\t\t\tint32_t damageX = attackerPlayer->getPerfectShotDamage(distanceX, true);\n\t\t\t\tint32_t damageY = attackerPlayer->getPerfectShotDamage(distanceY, true);\n\t\t\t\tstd::shared_ptr item = attackerPlayer->getWeapon();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d78857f74c9e5fb104acdec815176f72af47e1bcef5c505da6486eb583c2417" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7081, + "startColumn": 60, + "charOffset": 238760, + "charLength": 9, + "snippet": { + "text": "distanceY" + } + }, + "contextRegion": { + "startLine": 7079, + "startColumn": 60, + "charOffset": 238552, + "charLength": 9, + "snippet": { + "text": "\t\t\t\tint32_t distanceY = Position::getDistanceY(targetPos, attackerPos);\n\t\t\t\tint32_t damageX = attackerPlayer->getPerfectShotDamage(distanceX, true);\n\t\t\t\tint32_t damageY = attackerPlayer->getPerfectShotDamage(distanceY, true);\n\t\t\t\tstd::shared_ptr item = attackerPlayer->getWeapon();\n\t\t\t\tif (item && item->getWeaponType() == WEAPON_DISTANCE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c6bd4d2f4dfc9cdd86892c13d1902709226b69ddc201dbd3fa480f7641aa714" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7085, + "startColumn": 10, + "charOffset": 238997, + "charLength": 6, + "snippet": { + "text": "quiver" + } + }, + "contextRegion": { + "startLine": 7083, + "startColumn": 10, + "charOffset": 238840, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tif (item && item->getWeaponType() == WEAPON_DISTANCE) {\n\t\t\t\t\tstd::shared_ptr quiver = attackerPlayer->getInventoryItem(CONST_SLOT_RIGHT);\n\t\t\t\t\tif (quiver && quiver->getWeaponType()) {\n\t\t\t\t\t\tif (quiver->getPerfectShotRange() == distanceX) {\n\t\t\t\t\t\t\tdamageX -= quiver->getPerfectShotDamage();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ccc06374efccd668969284a78bacbe273e54be6804d8bf02ea30ac586e4f4e9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7085, + "startColumn": 17, + "charOffset": 239004, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 7083, + "startColumn": 17, + "charOffset": 238840, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tif (item && item->getWeaponType() == WEAPON_DISTANCE) {\n\t\t\t\t\tstd::shared_ptr quiver = attackerPlayer->getInventoryItem(CONST_SLOT_RIGHT);\n\t\t\t\t\tif (quiver && quiver->getWeaponType()) {\n\t\t\t\t\t\tif (quiver->getPerfectShotRange() == distanceX) {\n\t\t\t\t\t\t\tdamageX -= quiver->getPerfectShotDamage();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44e8203c7ecd0e8cfdb2b119c34e66e10a6a39417cc7cd781d906dff96af863b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7085, + "startColumn": 17, + "charOffset": 239004, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 7083, + "startColumn": 17, + "charOffset": 238840, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tif (item && item->getWeaponType() == WEAPON_DISTANCE) {\n\t\t\t\t\tstd::shared_ptr quiver = attackerPlayer->getInventoryItem(CONST_SLOT_RIGHT);\n\t\t\t\t\tif (quiver && quiver->getWeaponType()) {\n\t\t\t\t\t\tif (quiver->getPerfectShotRange() == distanceX) {\n\t\t\t\t\t\t\tdamageX -= quiver->getPerfectShotDamage();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65b54eb9d3db013eca9387aff9b0083a84fc4f078f87b5f8a0e8f60a620abe57" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'WeaponType_t' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7085, + "startColumn": 20, + "charOffset": 239007, + "charLength": 6, + "snippet": { + "text": "quiver" + } + }, + "contextRegion": { + "startLine": 7083, + "startColumn": 20, + "charOffset": 238840, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tif (item && item->getWeaponType() == WEAPON_DISTANCE) {\n\t\t\t\t\tstd::shared_ptr quiver = attackerPlayer->getInventoryItem(CONST_SLOT_RIGHT);\n\t\t\t\t\tif (quiver && quiver->getWeaponType()) {\n\t\t\t\t\t\tif (quiver->getPerfectShotRange() == distanceX) {\n\t\t\t\t\t\t\tdamageX -= quiver->getPerfectShotDamage();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ad3be2d1bbb856df804c43c60075a6d1f077156af3104a88d104f442732485f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7086, + "startColumn": 7, + "charOffset": 239040, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 7084, + "startColumn": 7, + "charOffset": 238900, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tstd::shared_ptr quiver = attackerPlayer->getInventoryItem(CONST_SLOT_RIGHT);\n\t\t\t\t\tif (quiver && quiver->getWeaponType()) {\n\t\t\t\t\t\tif (quiver->getPerfectShotRange() == distanceX) {\n\t\t\t\t\t\t\tdamageX -= quiver->getPerfectShotDamage();\n\t\t\t\t\t\t} else if (quiver->getPerfectShotRange() == distanceY) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "016abd7cd5b0ba5e355d57a2ce917af7c3513957cfa258cfca039138539dd0fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7115, + "startColumn": 28, + "charOffset": 240258, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 7113, + "startColumn": 28, + "charOffset": 240136, + "charLength": 8, + "snippet": { + "text": "\t\t}\n\t\tif (damage.origin != ORIGIN_NONE && attacker && damage.primary.type != COMBAT_HEALING) {\n\t\t\tdamage.primary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\n\t\t\tdamage.secondary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "614ec20d9a3e2525070a24963a82387ba67d380dac0866d82cea5358355a1c2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7115, + "startColumn": 28, + "charOffset": 240258, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 7113, + "startColumn": 28, + "charOffset": 240136, + "charLength": 8, + "snippet": { + "text": "\t\t}\n\t\tif (damage.origin != ORIGIN_NONE && attacker && damage.primary.type != COMBAT_HEALING) {\n\t\t\tdamage.primary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\n\t\t\tdamage.secondary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1b6818f4dd22746ba8318c7d045e91be51f3e217edb333e7eb518d2544f07c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7116, + "startColumn": 30, + "charOffset": 240331, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 7114, + "startColumn": 30, + "charOffset": 240140, + "charLength": 8, + "snippet": { + "text": "\t\tif (damage.origin != ORIGIN_NONE && attacker && damage.primary.type != COMBAT_HEALING) {\n\t\t\tdamage.primary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\n\t\t\tdamage.secondary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\n\t\t}\n\t\tif (damage.origin != ORIGIN_NONE && target && damage.primary.type != COMBAT_HEALING) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c758bc1db13befd021b6ebdd575b6a284e4af246814467df39f302fedc9da1d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7116, + "startColumn": 30, + "charOffset": 240331, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 7114, + "startColumn": 30, + "charOffset": 240140, + "charLength": 8, + "snippet": { + "text": "\t\tif (damage.origin != ORIGIN_NONE && attacker && damage.primary.type != COMBAT_HEALING) {\n\t\t\tdamage.primary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\n\t\t\tdamage.secondary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\n\t\t}\n\t\tif (damage.origin != ORIGIN_NONE && target && damage.primary.type != COMBAT_HEALING) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0434090b42ca04839f22216d20dd78de159356e6fb0ea11d955ccfd128fe3157" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7119, + "startColumn": 28, + "charOffset": 240495, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 7117, + "startColumn": 28, + "charOffset": 240375, + "charLength": 6, + "snippet": { + "text": "\t\t}\n\t\tif (damage.origin != ORIGIN_NONE && target && damage.primary.type != COMBAT_HEALING) {\n\t\t\tdamage.primary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\n\t\t\tdamage.secondary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0f6536ef9ca16d5a3caf76f06280aab644ce7b0aca4d43662984b699639fba6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7119, + "startColumn": 28, + "charOffset": 240495, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 7117, + "startColumn": 28, + "charOffset": 240375, + "charLength": 6, + "snippet": { + "text": "\t\t}\n\t\tif (damage.origin != ORIGIN_NONE && target && damage.primary.type != COMBAT_HEALING) {\n\t\t\tdamage.primary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\n\t\t\tdamage.secondary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2da68fc975ce5ce3d4d135d57eb966d4c046c361a6214031b52f6ae342ecd4ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7120, + "startColumn": 30, + "charOffset": 240569, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 7118, + "startColumn": 30, + "charOffset": 240379, + "charLength": 6, + "snippet": { + "text": "\t\tif (damage.origin != ORIGIN_NONE && target && damage.primary.type != COMBAT_HEALING) {\n\t\t\tdamage.primary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\n\t\t\tdamage.secondary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\n\t\t}\n\t\tauto healthChange = damage.primary.value + damage.secondary.value;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d04fa45f62a12e8c3c5bd6f24c6dd078561ad11a5859519216d1f719cc449185" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7120, + "startColumn": 30, + "charOffset": 240569, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 7118, + "startColumn": 30, + "charOffset": 240379, + "charLength": 6, + "snippet": { + "text": "\t\tif (damage.origin != ORIGIN_NONE && target && damage.primary.type != COMBAT_HEALING) {\n\t\t\tdamage.primary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\n\t\t\tdamage.secondary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\n\t\t}\n\t\tauto healthChange = damage.primary.value + damage.secondary.value;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "238081d2756f2b2a0fe289c3bca713b57c448e6a3c8aaf900df2c713c8acbb04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7129, + "startColumn": 3, + "charOffset": 240802, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 7127, + "startColumn": 3, + "charOffset": 240735, + "charLength": 2, + "snippet": { + "text": "\t\tauto spectators = Spectators().find(targetPos, true);\n\n\t\tif (targetPlayer && attackerMonster) {\n\t\t\thandleHazardSystemAttack(damage, targetPlayer, attackerMonster, false);\n\t\t} else if (attackerPlayer && targetMonster) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ccda87759dbf5ac48113064db23117a2c1e7eb354f9d260d4bddbcc51c6b7b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7140, + "startColumn": 3, + "charOffset": 241218, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 7138, + "startColumn": 3, + "charOffset": 241211, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (damage.fatal) {\n\t\t\taddMagicEffect(spectators.data(), targetPos, CONST_ME_FATAL);\n\t\t} else if (damage.critical) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6920ea5cd351d6c299bbcc99a724489dc0e093fe1c973a324eb1dd20402999b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7151, + "startColumn": 76, + "charOffset": 241878, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 7149, + "startColumn": 76, + "charOffset": 241662, + "charLength": 3, + "snippet": { + "text": "\t\t\t activeCharm != CHARM_NONE && activeCharm != CHARM_CLEANSE) {\n\t\t\t\tif (const auto charm = g_iobestiary().getBestiaryCharm(activeCharm);\n\t\t\t\t charm->type == CHARM_DEFENSIVE && charm->chance > normal_random(0, 100) && g_iobestiary().parseCharmCombat(charm, targetPlayer, attacker, (damage.primary.value + damage.secondary.value))) {\n\t\t\t\t\treturn false; // Dodge charm\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "013221789ad8c2dc7ffc92783b3cf357104bff4ef0618a55d94ed49085ffff53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7168, + "startColumn": 19, + "charOffset": 242579, + "charLength": 10, + "snippet": { + "text": "manaShield" + } + }, + "contextRegion": { + "startLine": 7166, + "startColumn": 19, + "charOffset": 242505, + "charLength": 10, + "snippet": { + "text": "\t\t\t\t\tmanaShield = manaShield - manaDamage;\n\t\t\t\t} else {\n\t\t\t\t\tmanaDamage = manaShield;\n\t\t\t\t\ttarget->removeCondition(CONDITION_MANASHIELD);\n\t\t\t\t\tmanaShield = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8273edb5a8bc3aeff16483849917dc26565b84d83da945a728b9c7092abf47d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7296, + "startColumn": 3, + "charOffset": 246770, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 7294, + "startColumn": 3, + "charOffset": 246663, + "charLength": 2, + "snippet": { + "text": "\t\tauto targetHealth = target->getHealth();\n\t\trealDamage = damage.primary.value + damage.secondary.value;\n\t\tif (realDamage == 0) {\n\t\t\treturn true;\n\t\t} else if (realDamage >= targetHealth) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b5552163282fa6552944930d33cd5dd4a7514f1b713befc197c1ecef2a7bfdf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7298, + "startColumn": 5, + "charOffset": 246813, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 7296, + "startColumn": 5, + "charOffset": 246768, + "charLength": 4, + "snippet": { + "text": "\t\tif (realDamage == 0) {\n\t\t\treturn true;\n\t\t} else if (realDamage >= targetHealth) {\n\t\t\tfor (const auto &creatureEvent : target->getCreatureEvents(CREATURE_EVENT_PREPAREDEATH)) {\n\t\t\t\tif (!creatureEvent->executeOnPrepareDeath(target, attacker)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "823348a715977c9da657a3e601d7ebb2c8535c60f70143b4328c982402f82c7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7307, + "startColumn": 3, + "charOffset": 247102, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 7305, + "startColumn": 3, + "charOffset": 247047, + "charLength": 2, + "snippet": { + "text": "\n\t\ttargetHealth = applyHealthChange(damage, target);\n\t\tif (damage.primary.value >= targetHealth) {\n\t\t\tdamage.primary.value = targetHealth;\n\t\t\tdamage.secondary.value = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71a413e6f645e9c93e569ccf44ed1aeea8ae4bfa3563328c3098e498b275cbc5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7310, + "startColumn": 14, + "charOffset": 247230, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 7308, + "startColumn": 14, + "charOffset": 247146, + "charLength": 6, + "snippet": { + "text": "\t\t\tdamage.primary.value = targetHealth;\n\t\t\tdamage.secondary.value = 0;\n\t\t} else if (damage.secondary.value) {\n\t\t\tdamage.secondary.value = std::min(damage.secondary.value, targetHealth - damage.primary.value);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22670d9e837ddb6156fb139dc51cc04993aa127b46e130872b377448a0ded20c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7310, + "startColumn": 14, + "charOffset": 247230, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 7308, + "startColumn": 14, + "charOffset": 247146, + "charLength": 6, + "snippet": { + "text": "\t\t\tdamage.primary.value = targetHealth;\n\t\t\tdamage.secondary.value = 0;\n\t\t} else if (damage.secondary.value) {\n\t\t\tdamage.secondary.value = std::min(damage.secondary.value, targetHealth - damage.primary.value);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "687af68d01d1fd7ce5ae1c5be32b4a9efc43cdb50d711416910e3ca0fb7cd843" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'updatePlayerPartyHuntAnalyzer' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7357, + "startColumn": 12, + "charOffset": 248457, + "charLength": 29, + "snippet": { + "text": "updatePlayerPartyHuntAnalyzer" + } + }, + "contextRegion": { + "startLine": 7355, + "startColumn": 12, + "charOffset": 248443, + "charLength": 29, + "snippet": { + "text": "}\n\nvoid Game::updatePlayerPartyHuntAnalyzer(const CombatDamage &damage, std::shared_ptr player) const {\n\tif (!player) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ebae2ddc24eb7335f37f14b29204cbc0e89f6b866a11e698ff7e5b2b35fa517f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7357, + "startColumn": 94, + "charOffset": 248539, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 7355, + "startColumn": 94, + "charOffset": 248443, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::updatePlayerPartyHuntAnalyzer(const CombatDamage &damage, std::shared_ptr player) const {\n\tif (!player) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a5038f104915b563ad3ec63644d5b34e4de9cabe12ea2abcff7c755aeb6cd0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7358, + "startColumn": 6, + "charOffset": 248560, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7356, + "startColumn": 6, + "charOffset": 248445, + "charLength": 1, + "snippet": { + "text": "\nvoid Game::updatePlayerPartyHuntAnalyzer(const CombatDamage &damage, std::shared_ptr player) const {\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a284fec06980c4c7796c4183964420655f531f7757c10d4bc089a3c661c05bab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7373, + "startColumn": 28, + "charOffset": 248894, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 7371, + "startColumn": 28, + "charOffset": 248826, + "charLength": 8, + "snippet": { + "text": "\nvoid Game::sendDamageMessageAndEffects(\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\n\tconst Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetPlayer,\n\tTextMessage &message, const CreatureVector &spectators, int32_t realDamage" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8120cef1f229f3df5977618d0697c3d62103e1adda869c9e3997f2dc8cf337f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7373, + "startColumn": 64, + "charOffset": 248930, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 7371, + "startColumn": 64, + "charOffset": 248826, + "charLength": 6, + "snippet": { + "text": "\nvoid Game::sendDamageMessageAndEffects(\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\n\tconst Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetPlayer,\n\tTextMessage &message, const CreatureVector &spectators, int32_t realDamage" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a85b4df27ccb01f4a8becc523caf63a916ff3cc5a3c690d7f9c22ac279e0c186" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7374, + "startColumn": 53, + "charOffset": 249018, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + } + }, + "contextRegion": { + "startLine": 7372, + "startColumn": 53, + "charOffset": 248827, + "charLength": 14, + "snippet": { + "text": "void Game::sendDamageMessageAndEffects(\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\n\tconst Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetPlayer,\n\tTextMessage &message, const CreatureVector &spectators, int32_t realDamage\n) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70d1d95c53bd517abb6f1d0197e4eb469e1b7fc16480e2a59bbe328f0c652301" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'targetPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7374, + "startColumn": 93, + "charOffset": 249058, + "charLength": 12, + "snippet": { + "text": "targetPlayer" + } + }, + "contextRegion": { + "startLine": 7372, + "startColumn": 93, + "charOffset": 248827, + "charLength": 12, + "snippet": { + "text": "void Game::sendDamageMessageAndEffects(\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\n\tconst Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetPlayer,\n\tTextMessage &message, const CreatureVector &spectators, int32_t realDamage\n) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a374c45cd2444290a4b189c0b05156fa4b382dcf054c22198525d148b7a50e1a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'shouldSendMessage' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7387, + "startColumn": 12, + "charOffset": 249515, + "charLength": 17, + "snippet": { + "text": "shouldSendMessage" + } + }, + "contextRegion": { + "startLine": 7385, + "startColumn": 12, + "charOffset": 249501, + "charLength": 17, + "snippet": { + "text": "}\n\nbool Game::shouldSendMessage(const TextMessage &message) const {\n\treturn message.primary.color != TEXTCOLOR_NONE || message.secondary.color != TEXTCOLOR_NONE;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "517353188750239bfe32ce3d3506c19fdff0769cf0b857616fa4f4a8ffee48a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'sendMessages' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7391, + "startColumn": 12, + "charOffset": 249677, + "charLength": 12, + "snippet": { + "text": "sendMessages" + } + }, + "contextRegion": { + "startLine": 7389, + "startColumn": 12, + "charOffset": 249663, + "charLength": 12, + "snippet": { + "text": "}\n\nvoid Game::sendMessages(\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\n\tconst Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetPlayer," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3c29bd6da2400ae84b1fea736681977729cc0287cbd4d3a19074cd2cd5403ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'sendMessages' of similar type ('std::shared_ptr') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7392, + "startColumn": 2, + "charOffset": 249692, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 7390, + "startColumn": 2, + "charOffset": 249665, + "charLength": 3, + "snippet": { + "text": "\nvoid Game::sendMessages(\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\n\tconst Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetPlayer,\n\tTextMessage &message, const CreatureVector &spectators, int32_t realDamage" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e728d72ee2d72c2e9bde8511dc6a295204cc3ade48b18b6ef7e19a9122cff163" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7392, + "startColumn": 28, + "charOffset": 249718, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 7390, + "startColumn": 28, + "charOffset": 249665, + "charLength": 8, + "snippet": { + "text": "\nvoid Game::sendMessages(\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\n\tconst Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetPlayer,\n\tTextMessage &message, const CreatureVector &spectators, int32_t realDamage" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c37f920ece2b3e9bca4c49a7a5f45568ad8a8a93ab20c5e5686623cfac1629df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7392, + "startColumn": 64, + "charOffset": 249754, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 7390, + "startColumn": 64, + "charOffset": 249665, + "charLength": 6, + "snippet": { + "text": "\nvoid Game::sendMessages(\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\n\tconst Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetPlayer,\n\tTextMessage &message, const CreatureVector &spectators, int32_t realDamage" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "759bbcffe35248aabd0077b20e20bb71918c56567da804422601b896eeb8ebd0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7393, + "startColumn": 53, + "charOffset": 249842, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + } + }, + "contextRegion": { + "startLine": 7391, + "startColumn": 53, + "charOffset": 249666, + "charLength": 14, + "snippet": { + "text": "void Game::sendMessages(\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\n\tconst Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetPlayer,\n\tTextMessage &message, const CreatureVector &spectators, int32_t realDamage\n) const {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3c50b600b020b9f877bccab48c60113a5cb20745d75ec2a2c23f3b265c9dfed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'targetPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7393, + "startColumn": 93, + "charOffset": 249882, + "charLength": 12, + "snippet": { + "text": "targetPlayer" + } + }, + "contextRegion": { + "startLine": 7391, + "startColumn": 93, + "charOffset": 249666, + "charLength": 12, + "snippet": { + "text": "void Game::sendMessages(\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\n\tconst Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetPlayer,\n\tTextMessage &message, const CreatureVector &spectators, int32_t realDamage\n) const {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aee56343d3b41f68d6b5113788b2c9a40ebfa9260306682288d599691b107aa1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'buildMessageAsSpectator' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7439, + "startColumn": 12, + "charOffset": 251442, + "charLength": 23, + "snippet": { + "text": "buildMessageAsSpectator" + } + }, + "contextRegion": { + "startLine": 7437, + "startColumn": 12, + "charOffset": 251428, + "charLength": 23, + "snippet": { + "text": "}\n\nvoid Game::buildMessageAsSpectator(\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\n\tstd::shared_ptr targetPlayer, TextMessage &message, std::stringstream &ss," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "768567cee6c85b2dcebcf97416de9ffe061ebca077b52b4cf576b58c9376c11c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7440, + "startColumn": 28, + "charOffset": 251494, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 7438, + "startColumn": 28, + "charOffset": 251430, + "charLength": 8, + "snippet": { + "text": "\nvoid Game::buildMessageAsSpectator(\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\n\tstd::shared_ptr targetPlayer, TextMessage &message, std::stringstream &ss,\n\tconst std::string &damageString, std::string &spectatorMessage" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bcd73e57519dfc7e0442bb1693b4087a9e966dd8cff5b55806a4b0cde81dcd6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7440, + "startColumn": 64, + "charOffset": 251530, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 7438, + "startColumn": 64, + "charOffset": 251430, + "charLength": 6, + "snippet": { + "text": "\nvoid Game::buildMessageAsSpectator(\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\n\tstd::shared_ptr targetPlayer, TextMessage &message, std::stringstream &ss,\n\tconst std::string &damageString, std::string &spectatorMessage" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f84a0568ced2f4cb5f5ca0e01facd4d5c5c697aeeeacfa55250af65b52f79525" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'targetPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7441, + "startColumn": 26, + "charOffset": 251591, + "charLength": 12, + "snippet": { + "text": "targetPlayer" + } + }, + "contextRegion": { + "startLine": 7439, + "startColumn": 26, + "charOffset": 251431, + "charLength": 12, + "snippet": { + "text": "void Game::buildMessageAsSpectator(\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\n\tstd::shared_ptr targetPlayer, TextMessage &message, std::stringstream &ss,\n\tconst std::string &damageString, std::string &spectatorMessage\n) const {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a84c526eb14a70cc7d616e151600a6afbbe74b0d820a0ad734b781f5bdef0ffb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto attackMsg' can be declared as 'const auto *attackMsg'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7446, + "startColumn": 3, + "charOffset": 251773, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 7444, + "startColumn": 3, + "charOffset": 251724, + "charLength": 4, + "snippet": { + "text": "\tif (spectatorMessage.empty()) {\n\t\tss.str({});\n\t\tauto attackMsg = damage.critical ? \"critical \" : \"\";\n\t\tauto article = damage.critical ? \"a\" : \"an\";\n\t\tss << ucfirst(target->getNameDescription()) << \" loses \" << damageString;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d28f6fb953fe8e40c3c30db679202bbcbb98cb09b6b4a0f2069181f06e6012b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto article' can be declared as 'const auto *article'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7447, + "startColumn": 3, + "charOffset": 251828, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 7445, + "startColumn": 3, + "charOffset": 251757, + "charLength": 4, + "snippet": { + "text": "\t\tss.str({});\n\t\tauto attackMsg = damage.critical ? \"critical \" : \"\";\n\t\tauto article = damage.critical ? \"a\" : \"an\";\n\t\tss << ucfirst(target->getNameDescription()) << \" loses \" << damageString;\n\t\tif (attacker) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfa0e55738d630f66372242fc2dec36390ed03befe9c3d593d7bce2a7badfd41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'buildMessageAsTarget' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7472, + "startColumn": 12, + "charOffset": 252501, + "charLength": 20, + "snippet": { + "text": "buildMessageAsTarget" + } + }, + "contextRegion": { + "startLine": 7470, + "startColumn": 12, + "charOffset": 252487, + "charLength": 20, + "snippet": { + "text": "}\n\nvoid Game::buildMessageAsTarget(\n\tstd::shared_ptr attacker, const CombatDamage &damage, std::shared_ptr attackerPlayer,\n\tstd::shared_ptr targetPlayer, TextMessage &message, std::stringstream &ss," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8fb3122c201403a8147ba56d8fa9f37251bb3fdf51553a90e51afe2ab191718" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7473, + "startColumn": 28, + "charOffset": 252550, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 7471, + "startColumn": 28, + "charOffset": 252489, + "charLength": 8, + "snippet": { + "text": "\nvoid Game::buildMessageAsTarget(\n\tstd::shared_ptr attacker, const CombatDamage &damage, std::shared_ptr attackerPlayer,\n\tstd::shared_ptr targetPlayer, TextMessage &message, std::stringstream &ss,\n\tconst std::string &damageString" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e3761fb8d0d70bd391688eb838823161e609940682532ac4f69135c83d3c1c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7473, + "startColumn": 90, + "charOffset": 252612, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + } + }, + "contextRegion": { + "startLine": 7471, + "startColumn": 90, + "charOffset": 252489, + "charLength": 14, + "snippet": { + "text": "\nvoid Game::buildMessageAsTarget(\n\tstd::shared_ptr attacker, const CombatDamage &damage, std::shared_ptr attackerPlayer,\n\tstd::shared_ptr targetPlayer, TextMessage &message, std::stringstream &ss,\n\tconst std::string &damageString" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ef0cbdc79ed05602f323a5f2699584e054b86dbc58e09baf30846f917e287b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'targetPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7474, + "startColumn": 26, + "charOffset": 252653, + "charLength": 12, + "snippet": { + "text": "targetPlayer" + } + }, + "contextRegion": { + "startLine": 7472, + "startColumn": 26, + "charOffset": 252490, + "charLength": 12, + "snippet": { + "text": "void Game::buildMessageAsTarget(\n\tstd::shared_ptr attacker, const CombatDamage &damage, std::shared_ptr attackerPlayer,\n\tstd::shared_ptr targetPlayer, TextMessage &message, std::stringstream &ss,\n\tconst std::string &damageString\n) const {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "509cd6ff6d8880bbf7e3b1ee7c13de512972ab4c32e3aadcc7868a5c0f68cb0e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto attackMsg' can be declared as 'const auto *attackMsg'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7478, + "startColumn": 2, + "charOffset": 252769, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 7476, + "startColumn": 2, + "charOffset": 252745, + "charLength": 4, + "snippet": { + "text": ") const {\n\tss.str({});\n\tauto attackMsg = damage.critical ? \"critical \" : \"\";\n\tauto article = damage.critical ? \"a\" : \"an\";\n\tss << \"You lose \" << damageString;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c0adc9eb58c5bcab3c905a71d3c49e1649c260a18f5be6794dee549f0608f74" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto article' can be declared as 'const auto *article'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7479, + "startColumn": 2, + "charOffset": 252823, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 7477, + "startColumn": 2, + "charOffset": 252755, + "charLength": 4, + "snippet": { + "text": "\tss.str({});\n\tauto attackMsg = damage.critical ? \"critical \" : \"\";\n\tauto article = damage.critical ? \"a\" : \"an\";\n\tss << \"You lose \" << damageString;\n\tif (!attacker) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d37551ef28932bb5ebe8642118e02050a5434a83d707696c6243f88b2b54a982" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7481, + "startColumn": 6, + "charOffset": 252909, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7479, + "startColumn": 6, + "charOffset": 252822, + "charLength": 1, + "snippet": { + "text": "\tauto article = damage.critical ? \"a\" : \"an\";\n\tss << \"You lose \" << damageString;\n\tif (!attacker) {\n\t\tss << '.';\n\t} else if (targetPlayer == attackerPlayer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9699bd964f1e8eb319aadc67fd37fe4e6578aa8d8b9f76a55f5833bf855f3bc6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'buildMessageAsAttacker' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7495, + "startColumn": 12, + "charOffset": 253298, + "charLength": 22, + "snippet": { + "text": "buildMessageAsAttacker" + } + }, + "contextRegion": { + "startLine": 7493, + "startColumn": 12, + "charOffset": 253284, + "charLength": 22, + "snippet": { + "text": "}\n\nvoid Game::buildMessageAsAttacker(\n\tstd::shared_ptr target, const CombatDamage &damage, TextMessage &message,\n\tstd::stringstream &ss, const std::string &damageString" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "542b3813df9ced5b17681df47a337f03ae5ef9f3f77cd0cd8bffebad90da67a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7496, + "startColumn": 28, + "charOffset": 253349, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 7494, + "startColumn": 28, + "charOffset": 253286, + "charLength": 6, + "snippet": { + "text": "\nvoid Game::buildMessageAsAttacker(\n\tstd::shared_ptr target, const CombatDamage &damage, TextMessage &message,\n\tstd::stringstream &ss, const std::string &damageString\n) const {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "910702854f9a4fe00898c8971f8cd7c207e40b47ca3cbcc24856309453858bf2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7512, + "startColumn": 28, + "charOffset": 253860, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 7510, + "startColumn": 28, + "charOffset": 253808, + "charLength": 6, + "snippet": { + "text": "\nvoid Game::sendEffects(\n\tstd::shared_ptr target, const CombatDamage &damage, const Position &targetPos, TextMessage &message,\n\tconst CreatureVector &spectators\n) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37345614203f750c388b21ed5692f08991b82ee04f08ce6ee096afc9fc502453" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'hitEffect' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7515, + "startColumn": 11, + "charOffset": 253993, + "charLength": 9, + "snippet": { + "text": "hitEffect" + } + }, + "contextRegion": { + "startLine": 7513, + "startColumn": 11, + "charOffset": 253945, + "charLength": 9, + "snippet": { + "text": "\tconst CreatureVector &spectators\n) {\n\tuint16_t hitEffect;\n\tif (message.primary.value) {\n\t\tcombatGetTypeInfo(damage.primary.type, target, message.primary.color, hitEffect);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c98e436cb6cfa93bddacef9e16b1744d3ce8b2e4459d2201a05b55f4509e7e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7516, + "startColumn": 6, + "charOffset": 254009, + "charLength": 7, + "snippet": { + "text": "message" + } + }, + "contextRegion": { + "startLine": 7514, + "startColumn": 6, + "charOffset": 253979, + "charLength": 7, + "snippet": { + "text": ") {\n\tuint16_t hitEffect;\n\tif (message.primary.value) {\n\t\tcombatGetTypeInfo(damage.primary.type, target, message.primary.color, hitEffect);\n\t\tif (hitEffect != CONST_ME_NONE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb7c65ac72002a9a92386a3431dae04f2acbef0060ddf3a2c4e79ff4421e82bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7516, + "startColumn": 6, + "charOffset": 254009, + "charLength": 7, + "snippet": { + "text": "message" + } + }, + "contextRegion": { + "startLine": 7514, + "startColumn": 6, + "charOffset": 253979, + "charLength": 7, + "snippet": { + "text": ") {\n\tuint16_t hitEffect;\n\tif (message.primary.value) {\n\t\tcombatGetTypeInfo(damage.primary.type, target, message.primary.color, hitEffect);\n\t\tif (hitEffect != CONST_ME_NONE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2508d88714eb6b870561c557efaba86496a6735095b201888e70c0036484dfa6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7523, + "startColumn": 6, + "charOffset": 254220, + "charLength": 7, + "snippet": { + "text": "message" + } + }, + "contextRegion": { + "startLine": 7521, + "startColumn": 6, + "charOffset": 254211, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tif (message.secondary.value) {\n\t\tcombatGetTypeInfo(damage.secondary.type, target, message.secondary.color, hitEffect);\n\t\tif (hitEffect != CONST_ME_NONE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "130b50ef3b17e10c5a1c56e2a5aee4c5da1b93aee367304b4c24e6e5c268cc0c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7523, + "startColumn": 6, + "charOffset": 254220, + "charLength": 7, + "snippet": { + "text": "message" + } + }, + "contextRegion": { + "startLine": 7521, + "startColumn": 6, + "charOffset": 254211, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tif (message.secondary.value) {\n\t\tcombatGetTypeInfo(damage.secondary.type, target, message.secondary.color, hitEffect);\n\t\tif (hitEffect != CONST_ME_NONE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "068ff2e8399be6a8ba781b218bf3c11349a4dd417ec75bd067394e7934825f8b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'applyCharmRune' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7531, + "startColumn": 12, + "charOffset": 254445, + "charLength": 14, + "snippet": { + "text": "applyCharmRune" + } + }, + "contextRegion": { + "startLine": 7529, + "startColumn": 12, + "charOffset": 254431, + "charLength": 14, + "snippet": { + "text": "}\n\nvoid Game::applyCharmRune(\n\tstd::shared_ptr targetMonster, std::shared_ptr attackerPlayer, std::shared_ptr target, const int32_t &realDamage\n) const {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7994361325ee6b4fd126fc98f17fb2a3238df16ab8609e91e59a2bc35a4fb05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7532, + "startColumn": 27, + "charOffset": 254487, + "charLength": 13, + "snippet": { + "text": "targetMonster" + } + }, + "contextRegion": { + "startLine": 7530, + "startColumn": 27, + "charOffset": 254433, + "charLength": 13, + "snippet": { + "text": "\nvoid Game::applyCharmRune(\n\tstd::shared_ptr targetMonster, std::shared_ptr attackerPlayer, std::shared_ptr target, const int32_t &realDamage\n) const {\n\tif (!targetMonster || !attackerPlayer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6083d7f53b6ecd6e6a3b4f6ca9cfef2b7a3a09bcedfa88c96a8f22c2c1e1efe8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7532, + "startColumn": 66, + "charOffset": 254526, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + } + }, + "contextRegion": { + "startLine": 7530, + "startColumn": 66, + "charOffset": 254433, + "charLength": 14, + "snippet": { + "text": "\nvoid Game::applyCharmRune(\n\tstd::shared_ptr targetMonster, std::shared_ptr attackerPlayer, std::shared_ptr target, const int32_t &realDamage\n) const {\n\tif (!targetMonster || !attackerPlayer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "260f4e72f039a3f323395dfbc8d5f4ddc945da671c5d08432dfa368b8bd126eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7532, + "startColumn": 108, + "charOffset": 254568, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 7530, + "startColumn": 108, + "charOffset": 254433, + "charLength": 6, + "snippet": { + "text": "\nvoid Game::applyCharmRune(\n\tstd::shared_ptr targetMonster, std::shared_ptr attackerPlayer, std::shared_ptr target, const int32_t &realDamage\n) const {\n\tif (!targetMonster || !attackerPlayer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22a5bd6e083eaf47a32d72d81a672f46b77828e3830fc3a24028eb4d2f026665" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7534, + "startColumn": 6, + "charOffset": 254617, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7532, + "startColumn": 6, + "charOffset": 254461, + "charLength": 1, + "snippet": { + "text": "\tstd::shared_ptr targetMonster, std::shared_ptr attackerPlayer, std::shared_ptr target, const int32_t &realDamage\n) const {\n\tif (!targetMonster || !attackerPlayer) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e51addee264abcffe1411855064cdb5d1715f9df6a3d9e5d98e834d6e5bbb0b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7534, + "startColumn": 24, + "charOffset": 254635, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7532, + "startColumn": 24, + "charOffset": 254461, + "charLength": 1, + "snippet": { + "text": "\tstd::shared_ptr targetMonster, std::shared_ptr attackerPlayer, std::shared_ptr target, const int32_t &realDamage\n) const {\n\tif (!targetMonster || !attackerPlayer) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e8e1bee6c819542ed22e270f96d594991957d5528ae06ae4581ac5f5c82d1e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7540, + "startColumn": 19, + "charOffset": 254933, + "charLength": 5, + "snippet": { + "text": "charm" + } + }, + "contextRegion": { + "startLine": 7538, + "startColumn": 19, + "charOffset": 254814, + "charLength": 5, + "snippet": { + "text": "\t activeCharm != CHARM_NONE) {\n\t\tconst auto charm = g_iobestiary().getBestiaryCharm(activeCharm);\n\t\tint8_t chance = charm->id == CHARM_CRIPPLE ? charm->chance : charm->chance + attackerPlayer->getCharmChanceModifier();\n\t\tg_logger().debug(\"charm chance: {}, base: {}, bonus: {}\", chance, charm->chance, attackerPlayer->getCharmChanceModifier());\n\t\tif (charm->type == CHARM_OFFENSIVE && (chance >= normal_random(0, 100))) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a0c258270314a26401bde3f0b90ba040211cf5632e65f7b07e43eb471af1098" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7540, + "startColumn": 48, + "charOffset": 254962, + "charLength": 5, + "snippet": { + "text": "charm" + } + }, + "contextRegion": { + "startLine": 7538, + "startColumn": 48, + "charOffset": 254814, + "charLength": 5, + "snippet": { + "text": "\t activeCharm != CHARM_NONE) {\n\t\tconst auto charm = g_iobestiary().getBestiaryCharm(activeCharm);\n\t\tint8_t chance = charm->id == CHARM_CRIPPLE ? charm->chance : charm->chance + attackerPlayer->getCharmChanceModifier();\n\t\tg_logger().debug(\"charm chance: {}, base: {}, bonus: {}\", chance, charm->chance, attackerPlayer->getCharmChanceModifier());\n\t\tif (charm->type == CHARM_OFFENSIVE && (chance >= normal_random(0, 100))) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34d4809c82841add43d901fa9a9a357e1458ddcb3d8ac5440d7e9686c8003807" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7540, + "startColumn": 78, + "charOffset": 254992, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 7538, + "startColumn": 78, + "charOffset": 254814, + "charLength": 1, + "snippet": { + "text": "\t activeCharm != CHARM_NONE) {\n\t\tconst auto charm = g_iobestiary().getBestiaryCharm(activeCharm);\n\t\tint8_t chance = charm->id == CHARM_CRIPPLE ? charm->chance : charm->chance + attackerPlayer->getCharmChanceModifier();\n\t\tg_logger().debug(\"charm chance: {}, base: {}, bonus: {}\", chance, charm->chance, attackerPlayer->getCharmChanceModifier());\n\t\tif (charm->type == CHARM_OFFENSIVE && (chance >= normal_random(0, 100))) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73b1ce3583f0f2a654233bf18ffcbbd134e351c755774c21ff63a7dd8702ab3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7541, + "startColumn": 100, + "charOffset": 255135, + "charLength": 22, + "snippet": { + "text": "getCharmChanceModifier" + } + }, + "contextRegion": { + "startLine": 7539, + "startColumn": 100, + "charOffset": 254848, + "charLength": 22, + "snippet": { + "text": "\t\tconst auto charm = g_iobestiary().getBestiaryCharm(activeCharm);\n\t\tint8_t chance = charm->id == CHARM_CRIPPLE ? charm->chance : charm->chance + attackerPlayer->getCharmChanceModifier();\n\t\tg_logger().debug(\"charm chance: {}, base: {}, bonus: {}\", chance, charm->chance, attackerPlayer->getCharmChanceModifier());\n\t\tif (charm->type == CHARM_OFFENSIVE && (chance >= normal_random(0, 100))) {\n\t\t\tg_iobestiary().parseCharmCombat(charm, attackerPlayer, std::move(target), realDamage);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9bc0f3a3ece2a669aff0a7e6002a2044b47568fd407a8c1dd7bd660ff03da002" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7542, + "startColumn": 69, + "charOffset": 255230, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 7540, + "startColumn": 69, + "charOffset": 254915, + "charLength": 3, + "snippet": { + "text": "\t\tint8_t chance = charm->id == CHARM_CRIPPLE ? charm->chance : charm->chance + attackerPlayer->getCharmChanceModifier();\n\t\tg_logger().debug(\"charm chance: {}, base: {}, bonus: {}\", chance, charm->chance, attackerPlayer->getCharmChanceModifier());\n\t\tif (charm->type == CHARM_OFFENSIVE && (chance >= normal_random(0, 100))) {\n\t\t\tg_iobestiary().parseCharmCombat(charm, attackerPlayer, std::move(target), realDamage);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4fbe30fa670b13769229ca7d46c34a4c83fb32475d2f4ffd784f029c0f617155" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7543, + "startColumn": 19, + "charOffset": 255257, + "charLength": 16, + "snippet": { + "text": "parseCharmCombat" + } + }, + "contextRegion": { + "startLine": 7541, + "startColumn": 19, + "charOffset": 255036, + "charLength": 16, + "snippet": { + "text": "\t\tg_logger().debug(\"charm chance: {}, base: {}, bonus: {}\", chance, charm->chance, attackerPlayer->getCharmChanceModifier());\n\t\tif (charm->type == CHARM_OFFENSIVE && (chance >= normal_random(0, 100))) {\n\t\t\tg_iobestiary().parseCharmCombat(charm, attackerPlayer, std::move(target), realDamage);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6735bb77bdacd66d7433077c421690cf9d89c949bfccce08ead48aed97949213" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7550, + "startColumn": 26, + "charOffset": 255405, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + } + }, + "contextRegion": { + "startLine": 7548, + "startColumn": 26, + "charOffset": 255339, + "charLength": 14, + "snippet": { + "text": "// Mana leech\nvoid Game::applyManaLeech(\n\tstd::shared_ptr attackerPlayer, std::shared_ptr targetMonster, std::shared_ptr target, const CombatDamage &damage, const int32_t &realDamage\n) const {\n\t// Wheel of destiny bonus - mana leech chance and amount" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a28d76f725d721a8435af0d9d8cc669058fd8c234e3014794ea09f652b35a833" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7550, + "startColumn": 67, + "charOffset": 255446, + "charLength": 13, + "snippet": { + "text": "targetMonster" + } + }, + "contextRegion": { + "startLine": 7548, + "startColumn": 67, + "charOffset": 255339, + "charLength": 13, + "snippet": { + "text": "// Mana leech\nvoid Game::applyManaLeech(\n\tstd::shared_ptr attackerPlayer, std::shared_ptr targetMonster, std::shared_ptr target, const CombatDamage &damage, const int32_t &realDamage\n) const {\n\t// Wheel of destiny bonus - mana leech chance and amount" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc107832afd03f4417e8c97b11da1d7bbc1bcf092e242c26088a002712f9001c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7550, + "startColumn": 108, + "charOffset": 255487, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 7548, + "startColumn": 108, + "charOffset": 255339, + "charLength": 6, + "snippet": { + "text": "// Mana leech\nvoid Game::applyManaLeech(\n\tstd::shared_ptr attackerPlayer, std::shared_ptr targetMonster, std::shared_ptr target, const CombatDamage &damage, const int32_t &realDamage\n) const {\n\t// Wheel of destiny bonus - mana leech chance and amount" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5bfc04bbb369c632caf73852fbe418e02a5b22a6da286bd9da536d322f6a312" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7556, + "startColumn": 24, + "charOffset": 255849, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + } + }, + "contextRegion": { + "startLine": 7554, + "startColumn": 24, + "charOffset": 255721, + "charLength": 14, + "snippet": { + "text": "\tauto wheelLeechAmount = attackerPlayer->wheel()->checkDrainBodyLeech(target, SKILL_MANA_LEECH_AMOUNT);\n\n\tuint16_t manaChance = attackerPlayer->getSkillLevel(SKILL_MANA_LEECH_CHANCE) + wheelLeechChance + damage.manaLeechChance;\n\tuint16_t manaSkill = attackerPlayer->getSkillLevel(SKILL_MANA_LEECH_AMOUNT) + wheelLeechAmount + damage.manaLeech;\n\tif (normal_random(0, 100) >= manaChance) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de7e1e6ee67199b8738a64be06fbbd70ed51cd44c046d9c0057b1c7816270b62" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7557, + "startColumn": 23, + "charOffset": 255971, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + } + }, + "contextRegion": { + "startLine": 7555, + "startColumn": 23, + "charOffset": 255825, + "charLength": 14, + "snippet": { + "text": "\n\tuint16_t manaChance = attackerPlayer->getSkillLevel(SKILL_MANA_LEECH_CHANCE) + wheelLeechChance + damage.manaLeechChance;\n\tuint16_t manaSkill = attackerPlayer->getSkillLevel(SKILL_MANA_LEECH_AMOUNT) + wheelLeechAmount + damage.manaLeech;\n\tif (normal_random(0, 100) >= manaChance) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c63ab84be2a98ccca52f4bfd42beda48e6f709f8148f8e5948ba855f0c54415e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7558, + "startColumn": 23, + "charOffset": 256087, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 7556, + "startColumn": 23, + "charOffset": 255826, + "charLength": 3, + "snippet": { + "text": "\tuint16_t manaChance = attackerPlayer->getSkillLevel(SKILL_MANA_LEECH_CHANCE) + wheelLeechChance + damage.manaLeechChance;\n\tuint16_t manaSkill = attackerPlayer->getSkillLevel(SKILL_MANA_LEECH_AMOUNT) + wheelLeechAmount + damage.manaLeech;\n\tif (normal_random(0, 100) >= manaChance) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "988ace7eace8ea9cfa10d922051fc1608ad8f0b3cce4811215eee64af772f753" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7583, + "startColumn": 26, + "charOffset": 256850, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + } + }, + "contextRegion": { + "startLine": 7581, + "startColumn": 26, + "charOffset": 256784, + "charLength": 14, + "snippet": { + "text": "// Life leech\nvoid Game::applyLifeLeech(\n\tstd::shared_ptr attackerPlayer, std::shared_ptr targetMonster, std::shared_ptr target, const CombatDamage &damage, const int32_t &realDamage\n) const {\n\t// Wheel of destiny bonus - life leech chance and amount" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7790bfe0a6d203be6205aec3a222b890b626c03d349f1e2e47418dc27f5cf9ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7583, + "startColumn": 67, + "charOffset": 256891, + "charLength": 13, + "snippet": { + "text": "targetMonster" + } + }, + "contextRegion": { + "startLine": 7581, + "startColumn": 67, + "charOffset": 256784, + "charLength": 13, + "snippet": { + "text": "// Life leech\nvoid Game::applyLifeLeech(\n\tstd::shared_ptr attackerPlayer, std::shared_ptr targetMonster, std::shared_ptr target, const CombatDamage &damage, const int32_t &realDamage\n) const {\n\t// Wheel of destiny bonus - life leech chance and amount" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d940517f9267da4ca57364ca7e1544cb18c3c2b6d6749c8a43dd8fa1a5d004b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7583, + "startColumn": 108, + "charOffset": 256932, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 7581, + "startColumn": 108, + "charOffset": 256784, + "charLength": 6, + "snippet": { + "text": "// Life leech\nvoid Game::applyLifeLeech(\n\tstd::shared_ptr attackerPlayer, std::shared_ptr targetMonster, std::shared_ptr target, const CombatDamage &damage, const int32_t &realDamage\n) const {\n\t// Wheel of destiny bonus - life leech chance and amount" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37345614203f750c388b21ed5692f08991b82ee04f08ce6ee096afc9fc502453" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7588, + "startColumn": 24, + "charOffset": 257293, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + } + }, + "contextRegion": { + "startLine": 7586, + "startColumn": 24, + "charOffset": 257062, + "charLength": 14, + "snippet": { + "text": "\tauto wheelLeechChance = attackerPlayer->wheel()->checkDrainBodyLeech(target, SKILL_LIFE_LEECH_CHANCE);\n\tauto wheelLeechAmount = attackerPlayer->wheel()->checkDrainBodyLeech(target, SKILL_LIFE_LEECH_AMOUNT);\n\tuint16_t lifeChance = attackerPlayer->getSkillLevel(SKILL_LIFE_LEECH_CHANCE) + wheelLeechChance + damage.lifeLeechChance;\n\tuint16_t lifeSkill = attackerPlayer->getSkillLevel(SKILL_LIFE_LEECH_AMOUNT) + wheelLeechAmount + damage.lifeLeech;\n\tif (normal_random(0, 100) >= lifeChance) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df261682486f11541a8e061c0bd25c6fb20a7425082c124a550dc0f8f8188cac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7589, + "startColumn": 23, + "charOffset": 257415, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + } + }, + "contextRegion": { + "startLine": 7587, + "startColumn": 23, + "charOffset": 257166, + "charLength": 14, + "snippet": { + "text": "\tauto wheelLeechAmount = attackerPlayer->wheel()->checkDrainBodyLeech(target, SKILL_LIFE_LEECH_AMOUNT);\n\tuint16_t lifeChance = attackerPlayer->getSkillLevel(SKILL_LIFE_LEECH_CHANCE) + wheelLeechChance + damage.lifeLeechChance;\n\tuint16_t lifeSkill = attackerPlayer->getSkillLevel(SKILL_LIFE_LEECH_AMOUNT) + wheelLeechAmount + damage.lifeLeech;\n\tif (normal_random(0, 100) >= lifeChance) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53204bd974076bdaacd6264da75ae15b1f4ff652be134374c2eb1feb2dd857f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7590, + "startColumn": 23, + "charOffset": 257531, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 7588, + "startColumn": 23, + "charOffset": 257270, + "charLength": 3, + "snippet": { + "text": "\tuint16_t lifeChance = attackerPlayer->getSkillLevel(SKILL_LIFE_LEECH_CHANCE) + wheelLeechChance + damage.lifeLeechChance;\n\tuint16_t lifeSkill = attackerPlayer->getSkillLevel(SKILL_LIFE_LEECH_AMOUNT) + wheelLeechAmount + damage.lifeLeech;\n\tif (normal_random(0, 100) >= lifeChance) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efbc45393e1e38313512211c353d4302bc805a08c56ed87abf1853199d365e09" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'calculateLeechAmount' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7612, + "startColumn": 15, + "charOffset": 258224, + "charLength": 20, + "snippet": { + "text": "calculateLeechAmount" + } + }, + "contextRegion": { + "startLine": 7610, + "startColumn": 15, + "charOffset": 258207, + "charLength": 20, + "snippet": { + "text": "}\n\nint32_t Game::calculateLeechAmount(const int32_t &realDamage, const uint16_t &skillAmount, int targetsAffected) const {\n\tauto intermediateResult = realDamage * (skillAmount / 10000.0) * (0.1 * targetsAffected + 0.9) / targetsAffected;\n\treturn std::clamp(static_cast(std::lround(intermediateResult)), 0, realDamage);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "358ffc9d0b8373ae7afd295108b9c14dcda243015d5dc99c8dec1c860c6e3e19" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7613, + "startColumn": 28, + "charOffset": 258357, + "charLength": 10, + "snippet": { + "text": "realDamage" + } + }, + "contextRegion": { + "startLine": 7611, + "startColumn": 28, + "charOffset": 258209, + "charLength": 10, + "snippet": { + "text": "\nint32_t Game::calculateLeechAmount(const int32_t &realDamage, const uint16_t &skillAmount, int targetsAffected) const {\n\tauto intermediateResult = realDamage * (skillAmount / 10000.0) * (0.1 * targetsAffected + 0.9) / targetsAffected;\n\treturn std::clamp(static_cast(std::lround(intermediateResult)), 0, realDamage);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74789cb4338c512ddb56e5eda2d8595c5e63cce54ba6bd4a89f6bb6eb9cc3d31" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7613, + "startColumn": 42, + "charOffset": 258371, + "charLength": 11, + "snippet": { + "text": "skillAmount" + } + }, + "contextRegion": { + "startLine": 7611, + "startColumn": 42, + "charOffset": 258209, + "charLength": 11, + "snippet": { + "text": "\nint32_t Game::calculateLeechAmount(const int32_t &realDamage, const uint16_t &skillAmount, int targetsAffected) const {\n\tauto intermediateResult = realDamage * (skillAmount / 10000.0) * (0.1 * targetsAffected + 0.9) / targetsAffected;\n\treturn std::clamp(static_cast(std::lround(intermediateResult)), 0, realDamage);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a926325c29b95190685c6675e6f36d7855d8c0519c6c57fdda5d94678ed78c20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000.0 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7613, + "startColumn": 56, + "charOffset": 258385, + "charLength": 7, + "snippet": { + "text": "10000.0" + } + }, + "contextRegion": { + "startLine": 7611, + "startColumn": 56, + "charOffset": 258209, + "charLength": 7, + "snippet": { + "text": "\nint32_t Game::calculateLeechAmount(const int32_t &realDamage, const uint16_t &skillAmount, int targetsAffected) const {\n\tauto intermediateResult = realDamage * (skillAmount / 10000.0) * (0.1 * targetsAffected + 0.9) / targetsAffected;\n\treturn std::clamp(static_cast(std::lround(intermediateResult)), 0, realDamage);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36cec3f5298571667cfdfa4bfcf12548a447e6f4906291836c864f0fa724b18a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.1 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7613, + "startColumn": 68, + "charOffset": 258397, + "charLength": 3, + "snippet": { + "text": "0.1" + } + }, + "contextRegion": { + "startLine": 7611, + "startColumn": 68, + "charOffset": 258209, + "charLength": 3, + "snippet": { + "text": "\nint32_t Game::calculateLeechAmount(const int32_t &realDamage, const uint16_t &skillAmount, int targetsAffected) const {\n\tauto intermediateResult = realDamage * (skillAmount / 10000.0) * (0.1 * targetsAffected + 0.9) / targetsAffected;\n\treturn std::clamp(static_cast(std::lround(intermediateResult)), 0, realDamage);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "546bf8118f19c4db09cf05d9da06246f2926b84a14b139dd26d54a157ccf7b6c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7613, + "startColumn": 74, + "charOffset": 258403, + "charLength": 15, + "snippet": { + "text": "targetsAffected" + } + }, + "contextRegion": { + "startLine": 7611, + "startColumn": 74, + "charOffset": 258209, + "charLength": 15, + "snippet": { + "text": "\nint32_t Game::calculateLeechAmount(const int32_t &realDamage, const uint16_t &skillAmount, int targetsAffected) const {\n\tauto intermediateResult = realDamage * (skillAmount / 10000.0) * (0.1 * targetsAffected + 0.9) / targetsAffected;\n\treturn std::clamp(static_cast(std::lround(intermediateResult)), 0, realDamage);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94bd88efd7bc64d0eb53261cdd04cf8458ce914211aa9bbf8d8195ce0f00be26" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7613, + "startColumn": 92, + "charOffset": 258421, + "charLength": 3, + "snippet": { + "text": "0.9" + } + }, + "contextRegion": { + "startLine": 7611, + "startColumn": 92, + "charOffset": 258209, + "charLength": 3, + "snippet": { + "text": "\nint32_t Game::calculateLeechAmount(const int32_t &realDamage, const uint16_t &skillAmount, int targetsAffected) const {\n\tauto intermediateResult = realDamage * (skillAmount / 10000.0) * (0.1 * targetsAffected + 0.9) / targetsAffected;\n\treturn std::clamp(static_cast(std::lround(intermediateResult)), 0, realDamage);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6cd1813b37d9cb23587272c8a947b03b0008b6452304efccd5b05c430d63c50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7613, + "startColumn": 99, + "charOffset": 258428, + "charLength": 15, + "snippet": { + "text": "targetsAffected" + } + }, + "contextRegion": { + "startLine": 7611, + "startColumn": 99, + "charOffset": 258209, + "charLength": 15, + "snippet": { + "text": "\nint32_t Game::calculateLeechAmount(const int32_t &realDamage, const uint16_t &skillAmount, int targetsAffected) const {\n\tauto intermediateResult = realDamage * (skillAmount / 10000.0) * (0.1 * targetsAffected + 0.9) / targetsAffected;\n\treturn std::clamp(static_cast(std::lround(intermediateResult)), 0, realDamage);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3fdcacb39730fde54509f1db0bd603ecda70c8113961907816ddd53027da18c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'combatChangeMana' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7617, + "startColumn": 12, + "charOffset": 258558, + "charLength": 16, + "snippet": { + "text": "combatChangeMana" + } + }, + "contextRegion": { + "startLine": 7615, + "startColumn": 12, + "charOffset": 258544, + "charLength": 16, + "snippet": { + "text": "}\n\nbool Game::combatChangeMana(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage) {\n\tconst Position &targetPos = target->getPosition();\n\tauto manaChange = damage.primary.value + damage.secondary.value;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a7ff754d831d28b11540f56465f7ada686ea86e48e43892b5b843807f0caeac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'combatChangeMana' has cognitive complexity of 68 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7617, + "startColumn": 12, + "charOffset": 258558, + "charLength": 16, + "snippet": { + "text": "combatChangeMana" + } + }, + "contextRegion": { + "startLine": 7615, + "startColumn": 12, + "charOffset": 258544, + "charLength": 16, + "snippet": { + "text": "}\n\nbool Game::combatChangeMana(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage) {\n\tconst Position &targetPos = target->getPosition();\n\tauto manaChange = damage.primary.value + damage.secondary.value;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48c86b3240b8bf5bbffc38e920948797f7158ec2d29493daec665ffbfd4ac648" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7617, + "startColumn": 55, + "charOffset": 258601, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 7615, + "startColumn": 55, + "charOffset": 258544, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Game::combatChangeMana(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage) {\n\tconst Position &targetPos = target->getPosition();\n\tauto manaChange = damage.primary.value + damage.secondary.value;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7361a046e4afae4df4292bbe6a255c6c8cfb378238bd241a722febc36bdac57c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7617, + "startColumn": 91, + "charOffset": 258637, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 7615, + "startColumn": 91, + "charOffset": 258544, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Game::combatChangeMana(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage) {\n\tconst Position &targetPos = target->getPosition();\n\tauto manaChange = damage.primary.value + damage.secondary.value;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0de10706d708537e44a74b57e153364775fa833b798bd75bf558856b393a4841" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7652, + "startColumn": 8, + "charOffset": 259827, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 7650, + "startColumn": 8, + "charOffset": 259786, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tstd::string spectatorMessage;\n\t\t\tif (!attacker) {\n\t\t\t\tspectatorMessage += ucfirst(target->getNameDescription());\n\t\t\t\tspectatorMessage += \" was restored for \" + damageString;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff4d8529a0eb8f6a7e876f3e16216ee0db25cb06a97d6332d4ec0ac1f4e7e5de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7668, + "startColumn": 28, + "charOffset": 260411, + "charLength": 14, + "snippet": { + "text": "realManaChange" + } + }, + "contextRegion": { + "startLine": 7666, + "startColumn": 28, + "charOffset": 260327, + "charLength": 14, + "snippet": { + "text": "\t\t\tTextMessage message;\n\t\t\tmessage.position = targetPos;\n\t\t\tmessage.primary.value = realManaChange;\n\t\t\tmessage.primary.color = TEXTCOLOR_MAYABLUE;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0d5923b29bf8594c8945765b0d19b224cfda5682bbcfa0839c548a274d46164" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7745, + "startColumn": 87, + "charOffset": 263057, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 7743, + "startColumn": 87, + "charOffset": 262832, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tif (activeCharm != CHARM_NONE && activeCharm != CHARM_CLEANSE) {\n\t\t\t\t\tconst auto charm = g_iobestiary().getBestiaryCharm(activeCharm);\n\t\t\t\t\tif (charm && charm->type == CHARM_DEFENSIVE && (charm->chance > normal_random(0, 100))) {\n\t\t\t\t\t\tif (g_iobestiary().parseCharmCombat(charm, targetPlayer, attacker, manaChange)) {\n\t\t\t\t\t\t\tsendDoubleSoundEffect(targetPlayer->getPosition(), charm->soundCastEffect, charm->soundImpactEffect, targetPlayer);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "582215bbd498b66064331c103620e79af2d8355db2245d62afdf618c99ccfc6e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7747, + "startColumn": 44, + "charOffset": 263197, + "charLength": 11, + "snippet": { + "text": "getPosition" + } + }, + "contextRegion": { + "startLine": 7745, + "startColumn": 44, + "charOffset": 262971, + "charLength": 11, + "snippet": { + "text": "\t\t\t\t\tif (charm && charm->type == CHARM_DEFENSIVE && (charm->chance > normal_random(0, 100))) {\n\t\t\t\t\t\tif (g_iobestiary().parseCharmCombat(charm, targetPlayer, attacker, manaChange)) {\n\t\t\t\t\t\t\tsendDoubleSoundEffect(targetPlayer->getPosition(), charm->soundCastEffect, charm->soundImpactEffect, targetPlayer);\n\t\t\t\t\t\t\treturn false; // Dodge charm\n\t\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c4919ac109190bdc1329a6716bc6882a267f50b19dc9917e6bb04eda52b2899" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'addCreatureHealth' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7816, + "startColumn": 12, + "charOffset": 265107, + "charLength": 17, + "snippet": { + "text": "addCreatureHealth" + } + }, + "contextRegion": { + "startLine": 7814, + "startColumn": 12, + "charOffset": 265093, + "charLength": 17, + "snippet": { + "text": "}\n\nvoid Game::addCreatureHealth(std::shared_ptr target) {\n\tauto spectators = Spectators().find(target->getPosition(), true);\n\taddCreatureHealth(spectators.data(), target);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bfc906cb1b663844d74e08ef335f7c8d5f24a139aa9ded324511ef802fe7fb8d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7821, + "startColumn": 90, + "charOffset": 265375, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 7819, + "startColumn": 90, + "charOffset": 265283, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::addCreatureHealth(const CreatureVector &spectators, std::shared_ptr target) {\n\tuint8_t healthPercent = std::ceil((static_cast(target->getHealth()) / std::max(target->getMaxHealth(), 1)) * 100);\n\tif (const auto &targetPlayer = target->getPlayer()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93217236649feb4a6ace75dff814928bc7405cdb6a88a4b5599606b072e99e79" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-12", + "ruleIndex": 424, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-12: signed char and unsigned char type shall only be used for the storage and use of numeric values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7822, + "startColumn": 10, + "charOffset": 265394, + "charLength": 13, + "snippet": { + "text": "healthPercent" + } + }, + "contextRegion": { + "startLine": 7820, + "startColumn": 10, + "charOffset": 265285, + "charLength": 13, + "snippet": { + "text": "\nvoid Game::addCreatureHealth(const CreatureVector &spectators, std::shared_ptr target) {\n\tuint8_t healthPercent = std::ceil((static_cast(target->getHealth()) / std::max(target->getMaxHealth(), 1)) * 100);\n\tif (const auto &targetPlayer = target->getPlayer()) {\n\t\tif (const auto &party = targetPlayer->getParty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da209618b738259b12ddbb0382fef89e5e34c80b286dc4a95b1094296288b239" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7822, + "startColumn": 128, + "charOffset": 265512, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 7820, + "startColumn": 128, + "charOffset": 265285, + "charLength": 3, + "snippet": { + "text": "\nvoid Game::addCreatureHealth(const CreatureVector &spectators, std::shared_ptr target) {\n\tuint8_t healthPercent = std::ceil((static_cast(target->getHealth()) / std::max(target->getMaxHealth(), 1)) * 100);\n\tif (const auto &targetPlayer = target->getPlayer()) {\n\t\tif (const auto &party = targetPlayer->getParty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eac61e4a0838b1f03f5b242c076cf1e718c470be9e08d9f2cec118795d3be71c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7823, + "startColumn": 2, + "charOffset": 265519, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 7821, + "startColumn": 2, + "charOffset": 265286, + "charLength": 2, + "snippet": { + "text": "void Game::addCreatureHealth(const CreatureVector &spectators, std::shared_ptr target) {\n\tuint8_t healthPercent = std::ceil((static_cast(target->getHealth()) / std::max(target->getMaxHealth(), 1)) * 100);\n\tif (const auto &targetPlayer = target->getPlayer()) {\n\t\tif (const auto &party = targetPlayer->getParty()) {\n\t\t\tparty->updatePlayerHealth(targetPlayer, target, healthPercent);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea2d22057aa01e2e5841e180fcbaa25af8c215c67f891317d657d1d2b660be9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'addPlayerMana' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7841, + "startColumn": 12, + "charOffset": 266108, + "charLength": 13, + "snippet": { + "text": "addPlayerMana" + } + }, + "contextRegion": { + "startLine": 7839, + "startColumn": 12, + "charOffset": 266094, + "charLength": 13, + "snippet": { + "text": "}\n\nvoid Game::addPlayerMana(std::shared_ptr target) {\n\tif (const auto &party = target->getParty()) {\n\t\tuint8_t manaPercent = std::ceil((static_cast(target->getMana()) / std::max(target->getMaxMana(), 1)) * 100);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a14912479e8ad2e8e83aafa72866b284c1c166889777230cf62f15596e2cb72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7841, + "startColumn": 50, + "charOffset": 266146, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 7839, + "startColumn": 50, + "charOffset": 266094, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::addPlayerMana(std::shared_ptr target) {\n\tif (const auto &party = target->getParty()) {\n\t\tuint8_t manaPercent = std::ceil((static_cast(target->getMana()) / std::max(target->getMaxMana(), 1)) * 100);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c053b32c9314a06fca761cbe5b7856ee280baf14c38e25fc561ea8fad4395f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-12", + "ruleIndex": 424, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-12: signed char and unsigned char type shall only be used for the storage and use of numeric values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7843, + "startColumn": 11, + "charOffset": 266213, + "charLength": 11, + "snippet": { + "text": "manaPercent" + } + }, + "contextRegion": { + "startLine": 7841, + "startColumn": 11, + "charOffset": 266097, + "charLength": 11, + "snippet": { + "text": "void Game::addPlayerMana(std::shared_ptr target) {\n\tif (const auto &party = target->getParty()) {\n\t\tuint8_t manaPercent = std::ceil((static_cast(target->getMana()) / std::max(target->getMaxMana(), 1)) * 100);\n\t\tparty->updatePlayerMana(target, manaPercent);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1cf601e43a61b9d988b64fcf6cf50421c61507301f234c3b5334c9f9ef13109d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7843, + "startColumn": 123, + "charOffset": 266325, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 7841, + "startColumn": 123, + "charOffset": 266097, + "charLength": 3, + "snippet": { + "text": "void Game::addPlayerMana(std::shared_ptr target) {\n\tif (const auto &party = target->getParty()) {\n\t\tuint8_t manaPercent = std::ceil((static_cast(target->getMana()) / std::max(target->getMaxMana(), 1)) * 100);\n\t\tparty->updatePlayerMana(target, manaPercent);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "015c3371edf4e2e9eda28d0efe9c62ce44f5dad723fa0a662d0294eade90f079" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'addPlayerVocation' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7848, + "startColumn": 12, + "charOffset": 266396, + "charLength": 17, + "snippet": { + "text": "addPlayerVocation" + } + }, + "contextRegion": { + "startLine": 7846, + "startColumn": 12, + "charOffset": 266382, + "charLength": 17, + "snippet": { + "text": "}\n\nvoid Game::addPlayerVocation(std::shared_ptr target) {\n\tif (const auto &party = target->getParty()) {\n\t\tparty->updatePlayerVocation(target);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19362d7a2df6d176395560c7d347e029db3ce7a8869c4de5d5de3bef057b63eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7848, + "startColumn": 54, + "charOffset": 266438, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 7846, + "startColumn": 54, + "charOffset": 266382, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::addPlayerVocation(std::shared_ptr target) {\n\tif (const auto &party = target->getParty()) {\n\t\tparty->updatePlayerVocation(target);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2632652623eb7970dec5b7940a137b03763d5073693c6f667f2c45871e892ecd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'addMagicEffect' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7858, + "startColumn": 12, + "charOffset": 266697, + "charLength": 14, + "snippet": { + "text": "addMagicEffect" + } + }, + "contextRegion": { + "startLine": 7856, + "startColumn": 12, + "charOffset": 266683, + "charLength": 14, + "snippet": { + "text": "}\n\nvoid Game::addMagicEffect(const Position &pos, uint16_t effect) {\n\tauto spectators = Spectators().find(pos, true);\n\taddMagicEffect(spectators.data(), pos, effect);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8180ffa9a5d41a5e1256b70f9c6927e2c6f77930851d40b8de5e14993d52a28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'removeMagicEffect' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7871, + "startColumn": 12, + "charOffset": 267126, + "charLength": 17, + "snippet": { + "text": "removeMagicEffect" + } + }, + "contextRegion": { + "startLine": 7869, + "startColumn": 12, + "charOffset": 267112, + "charLength": 17, + "snippet": { + "text": "}\n\nvoid Game::removeMagicEffect(const Position &pos, uint16_t effect) {\n\tauto spectators = Spectators().find(pos, true);\n\tremoveMagicEffect(spectators.data(), pos, effect);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a5806c224b6302faec0ac46fba7b7017bd416eac9b60a601b4e5f752a42917ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'addDistanceEffect' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7884, + "startColumn": 12, + "charOffset": 267566, + "charLength": 17, + "snippet": { + "text": "addDistanceEffect" + } + }, + "contextRegion": { + "startLine": 7882, + "startColumn": 12, + "charOffset": 267552, + "charLength": 17, + "snippet": { + "text": "}\n\nvoid Game::addDistanceEffect(const Position &fromPos, const Position &toPos, uint16_t effect) {\n\tauto spectators = Spectators().find(fromPos).find(toPos);\n\taddDistanceEffect(spectators.data(), fromPos, toPos, effect);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69bb36fb6b06f9d775aa9be3accbecc7049c1a699fcf1283bee4b0598787902c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'addDistanceEffect' of similar type ('const Position &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7889, + "startColumn": 64, + "charOffset": 267855, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 7887, + "startColumn": 64, + "charOffset": 267789, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid Game::addDistanceEffect(const CreatureVector &spectators, const Position &fromPos, const Position &toPos, uint16_t effect) {\n\tfor (const auto &spectator : spectators) {\n\t\tif (const auto &tmpPlayer = spectator->getPlayer()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50f26534bec75e9135277413ca113a614b0998c79a47e60e8df5a3cc049e1d74" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7914, + "startColumn": 2, + "charOffset": 268398, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 7912, + "startColumn": 2, + "charOffset": 268393, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (std::abs(lightHour - SUNRISE) < 2 * lightHourDelta) {\n\t\tlightState = LIGHT_STATE_SUNRISE;\n\t} else if (std::abs(lightHour - SUNSET) < 2 * lightHourDelta) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a42632ea6dd28a69c12b73ac153f4ffe7a668d45f77f14d99355b80258a4bf6e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7925, + "startColumn": 61, + "charOffset": 268774, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 7923, + "startColumn": 61, + "charOffset": 268661, + "charLength": 2, + "snippet": { + "text": "\tswitch (lightState) {\n\t\tcase LIGHT_STATE_SUNRISE: {\n\t\t\tnewLightLevel += (LIGHT_LEVEL_DAY - LIGHT_LEVEL_NIGHT) / 30;\n\t\t\tlightChange = true;\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee0672c942bd049bbac4bfbacc1e086288637911ebd5a83f4a948b942ef357d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7930, + "startColumn": 61, + "charOffset": 268904, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 7928, + "startColumn": 61, + "charOffset": 268811, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\t\tcase LIGHT_STATE_SUNSET: {\n\t\t\tnewLightLevel -= (LIGHT_LEVEL_DAY - LIGHT_LEVEL_NIGHT) / 30;\n\t\t\tlightChange = true;\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eadcc3966ea41261275f3b97041cba5f64a5ccd61aef3a9ca0daaa0c4c69fa9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7939, + "startColumn": 16, + "charOffset": 269028, + "charLength": 17, + "snippet": { + "text": "LIGHT_LEVEL_NIGHT" + } + }, + "contextRegion": { + "startLine": 7937, + "startColumn": 16, + "charOffset": 268969, + "charLength": 17, + "snippet": { + "text": "\n\tif (newLightLevel <= LIGHT_LEVEL_NIGHT) {\n\t\tlightLevel = LIGHT_LEVEL_NIGHT;\n\t\tlightState = LIGHT_STATE_NIGHT;\n\t} else if (newLightLevel >= LIGHT_LEVEL_DAY) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36055a63225e3f2252700490d82fe86a9d72f477dc888d558373c6e9f8c7ca13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7942, + "startColumn": 16, + "charOffset": 269144, + "charLength": 15, + "snippet": { + "text": "LIGHT_LEVEL_DAY" + } + }, + "contextRegion": { + "startLine": 7940, + "startColumn": 16, + "charOffset": 269047, + "charLength": 15, + "snippet": { + "text": "\t\tlightState = LIGHT_STATE_NIGHT;\n\t} else if (newLightLevel >= LIGHT_LEVEL_DAY) {\n\t\tlightLevel = LIGHT_LEVEL_DAY;\n\t\tlightState = LIGHT_STATE_DAY;\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34993bed50e18e842b7aaf161003d214e1552e0c0b86cedcde2c1ce0fc2f012f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7945, + "startColumn": 16, + "charOffset": 269218, + "charLength": 13, + "snippet": { + "text": "newLightLevel" + } + }, + "contextRegion": { + "startLine": 7943, + "startColumn": 16, + "charOffset": 269161, + "charLength": 13, + "snippet": { + "text": "\t\tlightState = LIGHT_STATE_DAY;\n\t} else {\n\t\tlightLevel = newLightLevel;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9a2564645def7b4c01cc8a8fb1d926791edf47b30894edf5178f96288bb6bad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "if with identical then and else branches" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7950, + "startColumn": 2, + "charOffset": 269283, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 7948, + "startColumn": 2, + "charOffset": 269237, + "charLength": 2, + "snippet": { + "text": "\tLightInfo lightInfo = getWorldLightInfo();\n\n\tif (lightChange) {\n\t\tfor ([[maybe_unused]] const auto &[mapPlayerId, mapPlayer] : getPlayers()) {\n\t\t\tmapPlayer->sendWorldLight(lightInfo);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef4146dbc35aee252131d031cc848edc91542190e9b9e579b1083f66bd49700b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7969, + "startColumn": 23, + "charOffset": 269916, + "charLength": 4, + "snippet": { + "text": "0xD7" + } + }, + "contextRegion": { + "startLine": 7967, + "startColumn": 23, + "charOffset": 269849, + "charLength": 4, + "snippet": { + "text": "\nLightInfo Game::getWorldLightInfo() const {\n\treturn { lightLevel, 0xD7 };\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5549cbadfc7e230f4f51b89952bbd6e67682cffeb662ca8bd177fe533fc69252" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xD7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7969, + "startColumn": 23, + "charOffset": 269916, + "charLength": 4, + "snippet": { + "text": "0xD7" + } + }, + "contextRegion": { + "startLine": 7967, + "startColumn": 23, + "charOffset": 269849, + "charLength": 4, + "snippet": { + "text": "\nLightInfo Game::getWorldLightInfo() const {\n\treturn { lightLevel, 0xD7 };\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8ca7d0fae5d8f5c4b456b2d93e6731b6827b6e94ba554b0e721ba68b200f476" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7973, + "startColumn": 20, + "charOffset": 269971, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 7971, + "startColumn": 20, + "charOffset": 269926, + "charLength": 1, + "snippet": { + "text": "\nbool Game::gameIsDay() {\n\tif (lightHour >= (6 * 60) && lightHour <= (18 * 60)) {\n\t\tisDay = true;\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72a129714e87c3e029584ab9dc9b149f078cb1dac3533993bfcb78cf8c199223" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7973, + "startColumn": 24, + "charOffset": 269975, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 7971, + "startColumn": 24, + "charOffset": 269926, + "charLength": 2, + "snippet": { + "text": "\nbool Game::gameIsDay() {\n\tif (lightHour >= (6 * 60) && lightHour <= (18 * 60)) {\n\t\tisDay = true;\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4acc306a98f2e16eb75f086959f4462067563854045f9261d45d3171c9b90911" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "18 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7973, + "startColumn": 45, + "charOffset": 269996, + "charLength": 2, + "snippet": { + "text": "18" + } + }, + "contextRegion": { + "startLine": 7971, + "startColumn": 45, + "charOffset": 269926, + "charLength": 2, + "snippet": { + "text": "\nbool Game::gameIsDay() {\n\tif (lightHour >= (6 * 60) && lightHour <= (18 * 60)) {\n\t\tisDay = true;\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a04398b659a6bb7c57718c82e50e7b8849d1e81b6f20458a0550a3f9fc7fc0c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7973, + "startColumn": 50, + "charOffset": 270001, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 7971, + "startColumn": 50, + "charOffset": 269926, + "charLength": 2, + "snippet": { + "text": "\nbool Game::gameIsDay() {\n\tif (lightHour >= (6 * 60) && lightHour <= (18 * 60)) {\n\t\tisDay = true;\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84b118d80890390e310b5bf73bfb7075c96ebd10e9a1fe8084147b3af6b8bedd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in conditional assignment" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7974, + "startColumn": 11, + "charOffset": 270018, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 7972, + "startColumn": 11, + "charOffset": 269927, + "charLength": 4, + "snippet": { + "text": "bool Game::gameIsDay() {\n\tif (lightHour >= (6 * 60) && lightHour <= (18 * 60)) {\n\t\tisDay = true;\n\t} else {\n\t\tisDay = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3011356b74e10b4b67b931aa01b71957628fb46cab4becd059aef8d700455b63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7995, + "startColumn": 6, + "charOffset": 270387, + "charLength": 14, + "snippet": { + "text": "serviceManager" + } + }, + "contextRegion": { + "startLine": 7993, + "startColumn": 6, + "charOffset": 270365, + "charLength": 14, + "snippet": { + "text": "\traids.clear();\n\n\tif (serviceManager) {\n\t\tserviceManager->stop();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bd462fcf10ed92f0e8771fd7bab909e6b10a076515654d81937517e9539ecc2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'ServiceManager *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 7995, + "startColumn": 6, + "charOffset": 270387, + "charLength": 14, + "snippet": { + "text": "serviceManager" + } + }, + "contextRegion": { + "startLine": 7993, + "startColumn": 6, + "charOffset": 270365, + "charLength": 14, + "snippet": { + "text": "\traids.clear();\n\n\tif (serviceManager) {\n\t\tserviceManager->stop();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "607513ee35a9b3fd357ef7389a30774de42acc435e17e988f554151bedf05a3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8006, + "startColumn": 57, + "charOffset": 270607, + "charLength": 4, + "snippet": { + "text": "name" + } + }, + "contextRegion": { + "startLine": 8004, + "startColumn": 57, + "charOffset": 270548, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Game::addBestiaryList(uint16_t raceid, std::string name) {\n\tauto it = BestiaryList.find(raceid);\n\tif (it != BestiaryList.end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1fae87779bad254f973b8c1c631a0d127b6e38ddeca8dbcc456f4798e3f65a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'broadcastMessage' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8015, + "startColumn": 12, + "charOffset": 270784, + "charLength": 16, + "snippet": { + "text": "broadcastMessage" + } + }, + "contextRegion": { + "startLine": 8013, + "startColumn": 12, + "charOffset": 270770, + "charLength": 16, + "snippet": { + "text": "}\n\nvoid Game::broadcastMessage(const std::string &text, MessageClasses type) const {\n\tif (!text.empty()) {\n\t\tg_logger().info(\"Broadcasted message: {}\", text);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52ecb034a430343b5d93ed96a2ed82f1893e3e8f3d256dff07512cea55398c6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8024, + "startColumn": 64, + "charOffset": 271080, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 8022, + "startColumn": 64, + "charOffset": 271014, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::updateCreatureWalkthrough(std::shared_ptr creature) {\n\t// Send to clients\n\tfor (const auto &spectator : Spectators().find(creature->getPosition(), true)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a468ea5fdeae2aef6330aedb9d9fad0a53d44398930c47723ac2edcb6ad757f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-make-member-function-const", + "ruleIndex": 708, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'updateCreatureSkull' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8032, + "startColumn": 12, + "charOffset": 271356, + "charLength": 19, + "snippet": { + "text": "updateCreatureSkull" + } + }, + "contextRegion": { + "startLine": 8030, + "startColumn": 12, + "charOffset": 271342, + "charLength": 19, + "snippet": { + "text": "}\n\nvoid Game::updateCreatureSkull(std::shared_ptr creature) {\n\tif (getWorldType() != WORLD_TYPE_PVP) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5234d979660272214b2ef1f796e8bd2794ffab75a34ec0f1a6aabace4f32f0be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8032, + "startColumn": 58, + "charOffset": 271402, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 8030, + "startColumn": 58, + "charOffset": 271342, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::updateCreatureSkull(std::shared_ptr creature) {\n\tif (getWorldType() != WORLD_TYPE_PVP) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c7318b2fb5cf8c95b3794b67476cd9b0e0a32a85e2d5c2cd9279bc4ede4deea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8042, + "startColumn": 55, + "charOffset": 271674, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 8040, + "startColumn": 55, + "charOffset": 271617, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::updatePlayerShield(std::shared_ptr player) {\n\tfor (const auto &spectator : Spectators().find(player->getPosition(), true)) {\n\t\tspectator->getPlayer()->sendCreatureShield(player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2039dff4dbdf7240d984a3c5294c81da964a64b723b7ffa64d44472ecb927ff5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'updateCreatureType' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8048, + "startColumn": 12, + "charOffset": 271843, + "charLength": 18, + "snippet": { + "text": "updateCreatureType" + } + }, + "contextRegion": { + "startLine": 8046, + "startColumn": 12, + "charOffset": 271829, + "charLength": 18, + "snippet": { + "text": "}\n\nvoid Game::updateCreatureType(std::shared_ptr creature) {\n\tif (!creature) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bdcd54c7a4ae420fadf3b6bdf0fc14909ba867190d14f6e7b55bc2007030b41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8048, + "startColumn": 57, + "charOffset": 271888, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 8046, + "startColumn": 57, + "charOffset": 271829, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::updateCreatureType(std::shared_ptr creature) {\n\tif (!creature) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff32580ced187250955c7a4e9bf104f341f203c33e6c8db7aaead3e723c86b7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8049, + "startColumn": 6, + "charOffset": 271905, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8047, + "startColumn": 6, + "charOffset": 271831, + "charLength": 1, + "snippet": { + "text": "\nvoid Game::updateCreatureType(std::shared_ptr creature) {\n\tif (!creature) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28fac27920b4d00c7f53deb56193176ef31da31d814d30786f22f062a3255c23" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "if with identical then and else branches" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8070, + "startColumn": 2, + "charOffset": 272450, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 8068, + "startColumn": 2, + "charOffset": 272352, + "charLength": 2, + "snippet": { + "text": "\t// Send to clients\n\tauto spectators = Spectators().find(creature->getPosition(), true);\n\tif (creatureType == CREATURETYPE_SUMMON_OTHERS) {\n\t\tfor (const auto &spectator : spectators) {\n\t\t\tspectator->getPlayer()->sendCreatureType(creature, masterPlayer == spectator ? CREATURETYPE_SUMMON_PLAYER : creatureType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae6b169e2886541bae99879be578da4a21d25f3d2259448efecfc279cb218d9a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8088, + "startColumn": 6, + "charOffset": 273063, + "charLength": 12, + "snippet": { + "text": "executeQuery" + } + }, + "contextRegion": { + "startLine": 8086, + "startColumn": 6, + "charOffset": 272998, + "charLength": 12, + "snippet": { + "text": "\t\tmotdNum = result->getNumber(\"value\");\n\t} else {\n\t\tdb.executeQuery(\"INSERT INTO `server_config` (`config`, `value`) VALUES ('motd_num', '0')\");\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e11d888a04dd6b689ff0563f7d44e54928e10c120e5dc075975630e93dea8b73" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8098, + "startColumn": 6, + "charOffset": 273432, + "charLength": 12, + "snippet": { + "text": "executeQuery" + } + }, + "contextRegion": { + "startLine": 8096, + "startColumn": 6, + "charOffset": 273413, + "charLength": 12, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\tdb.executeQuery(\"INSERT INTO `server_config` (`config`, `value`) VALUES ('motd_hash', '')\");\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1b5c1375d4472d5fccf0e06f594258397fa9663c764a912c4afff91ea0b18c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8107, + "startColumn": 5, + "charOffset": 273732, + "charLength": 12, + "snippet": { + "text": "executeQuery" + } + }, + "contextRegion": { + "startLine": 8105, + "startColumn": 5, + "charOffset": 273603, + "charLength": 12, + "snippet": { + "text": "\tstd::ostringstream query;\n\tquery << \"UPDATE `server_config` SET `value` = '\" << motdNum << \"' WHERE `config` = 'motd_num'\";\n\tdb.executeQuery(query.str());\n\n\tquery.str(std::string());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2792620fe7eab39e02c29b92570307b0c32e86796eec848f5567420b25034ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8111, + "startColumn": 5, + "charOffset": 273954, + "charLength": 12, + "snippet": { + "text": "executeQuery" + } + }, + "contextRegion": { + "startLine": 8109, + "startColumn": 5, + "charOffset": 273760, + "charLength": 12, + "snippet": { + "text": "\tquery.str(std::string());\n\tquery << \"UPDATE `server_config` SET `value` = '\" << transformToSHA1(g_configManager().getString(SERVER_MOTD, __FUNCTION__)) << \"' WHERE `config` = 'motd_hash'\";\n\tdb.executeQuery(query.str());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "542eecf98ab412fe67e43ee4d7daba68ec48d3132eea14d855d5c7e9443c58cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8118, + "startColumn": 19, + "charOffset": 274167, + "charLength": 13, + "snippet": { + "text": "playersOnline" + } + }, + "contextRegion": { + "startLine": 8116, + "startColumn": 19, + "charOffset": 274068, + "charLength": 13, + "snippet": { + "text": "\tif (playersOnline > playersRecord) {\n\t\tuint32_t previousRecord = playersRecord;\n\t\tplayersRecord = playersOnline;\n\n\t\tfor (auto &[key, it] : g_globalEvents().getEventMap(GLOBALEVENT_RECORD)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60ef41b5469b537fa4c56e0d78466d9ea3a76b7e0d5ebabba42cb0ac1ba23a3a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8132, + "startColumn": 5, + "charOffset": 274572, + "charLength": 12, + "snippet": { + "text": "executeQuery" + } + }, + "contextRegion": { + "startLine": 8130, + "startColumn": 5, + "charOffset": 274431, + "charLength": 12, + "snippet": { + "text": "\tstd::ostringstream query;\n\tquery << \"UPDATE `server_config` SET `value` = '\" << playersRecord << \"' WHERE `config` = 'players_record'\";\n\tdb.executeQuery(query.str());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3944c1ef4d113930f871731a03fc351c1e08b9e278e1c7a7f0fbf5b3a643d28d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8142, + "startColumn": 6, + "charOffset": 274874, + "charLength": 12, + "snippet": { + "text": "executeQuery" + } + }, + "contextRegion": { + "startLine": 8140, + "startColumn": 6, + "charOffset": 274803, + "charLength": 12, + "snippet": { + "text": "\t\tplayersRecord = result->getNumber(\"value\");\n\t} else {\n\t\tdb.executeQuery(\"INSERT INTO `server_config` (`config`, `value`) VALUES ('players_record', '0')\");\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c2a946555b232553143bfdee97b578992e141ebe8f37af1e8423747d0a27d0f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8153, + "startColumn": 6, + "charOffset": 275233, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8151, + "startColumn": 6, + "charOffset": 275168, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28fac27920b4d00c7f53deb56193176ef31da31d814d30786f22f062a3255c23" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8158, + "startColumn": 6, + "charOffset": 275330, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8156, + "startColumn": 6, + "charOffset": 275257, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr invitedPlayer = getPlayerByID(invitedId);\n\tif (!invitedPlayer || invitedPlayer->isInviting(player)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3dad9db70c4dcac5561c3ebb05d78720cb2a927cb8e50359eec90975304555e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8170, + "startColumn": 2, + "charOffset": 275651, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 8168, + "startColumn": 2, + "charOffset": 275597, + "charLength": 2, + "snippet": { + "text": "\n\tstd::shared_ptr party = player->getParty();\n\tif (!party) {\n\t\tparty = Party::create(player);\n\t} else if (party->getLeader() != player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b946cc1a41414be2984dfc1216d7756d540ad276832882da1861ff869cdf619" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8170, + "startColumn": 6, + "charOffset": 275655, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8168, + "startColumn": 6, + "charOffset": 275597, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr party = player->getParty();\n\tif (!party) {\n\t\tparty = Party::create(player);\n\t} else if (party->getLeader() != player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eac2c3f6d9d2484a9ec1703256bff4a7a90b9bf4972bd7732b86957901910b42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8176, + "startColumn": 9, + "charOffset": 275764, + "charLength": 12, + "snippet": { + "text": "invitePlayer" + } + }, + "contextRegion": { + "startLine": 8174, + "startColumn": 9, + "charOffset": 275752, + "charLength": 12, + "snippet": { + "text": "\t}\n\n\tparty->invitePlayer(invitedPlayer);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79bdb1ece986be654b1ce80504501c709f888a116f61cefcbb7752d8d4433444" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'updatePlayerHelpers' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8179, + "startColumn": 12, + "charOffset": 275807, + "charLength": 19, + "snippet": { + "text": "updatePlayerHelpers" + } + }, + "contextRegion": { + "startLine": 8177, + "startColumn": 12, + "charOffset": 275793, + "charLength": 19, + "snippet": { + "text": "}\n\nvoid Game::updatePlayerHelpers(std::shared_ptr player) {\n\tif (!player) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fff932eb7b519672c708c00e429f502f5e7b42cbaa629219dd3a8dc7dd4b00a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8179, + "startColumn": 56, + "charOffset": 275851, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 8177, + "startColumn": 56, + "charOffset": 275793, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::updatePlayerHelpers(std::shared_ptr player) {\n\tif (!player) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b484810a4a28f121b51fcf4e9f9e0e793169023d96574228848d7b35a8ea3e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8180, + "startColumn": 6, + "charOffset": 275866, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8178, + "startColumn": 6, + "charOffset": 275795, + "charLength": 1, + "snippet": { + "text": "\nvoid Game::updatePlayerHelpers(std::shared_ptr player) {\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4828ab0aeed9ffe708dbb19312345a690c59af2aad5a197fb1b7b0ea4a1676e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8192, + "startColumn": 6, + "charOffset": 276237, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8190, + "startColumn": 6, + "charOffset": 276106, + "charLength": 1, + "snippet": { + "text": "void Game::playerJoinParty(uint32_t playerId, uint32_t leaderId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45a870bbfaf5d1f5d3d9ef5b3a17f1345ca3115650c79f75b5fa920e166d7095" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8197, + "startColumn": 6, + "charOffset": 276326, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8195, + "startColumn": 6, + "charOffset": 276261, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr leader = getPlayerByID(leaderId);\n\tif (!leader || !leader->isInviting(player)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38511a339a43d7f1af42e041488a984a2028719091054ec1c22bd9b201f1eed7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8202, + "startColumn": 6, + "charOffset": 276421, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8200, + "startColumn": 6, + "charOffset": 276381, + "charLength": 1, + "snippet": { + "text": "\n\tauto party = leader->getParty();\n\tif (!party || party->getLeader() != leader) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e7d88f64cb12f9438c4f6d238ae9aec12482c72e5c2ad8b38cfd0c25f6d87e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8211, + "startColumn": 9, + "charOffset": 276610, + "charLength": 9, + "snippet": { + "text": "joinParty" + } + }, + "contextRegion": { + "startLine": 8209, + "startColumn": 9, + "charOffset": 276598, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tparty->joinParty(player);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3ecb5e6c189af0452cfa3c6a0bb218695a8ebd688d7a4b1367baf14ae3b1910" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8216, + "startColumn": 6, + "charOffset": 276776, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8214, + "startColumn": 6, + "charOffset": 276632, + "charLength": 1, + "snippet": { + "text": "void Game::playerRevokePartyInvitation(uint32_t playerId, uint32_t invitedId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70f9b9a7caa7f3ddc245b86a07c286892e2a992f34ca4bd048a6f996439cb9e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8221, + "startColumn": 6, + "charOffset": 276858, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8219, + "startColumn": 6, + "charOffset": 276800, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr party = player->getParty();\n\tif (!party || party->getLeader() != player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f6da6ba9da93f4344cdf4b13f14595ee7b691ca672dc2acf71721f69881cf8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8226, + "startColumn": 6, + "charOffset": 276986, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8224, + "startColumn": 6, + "charOffset": 276913, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr invitedPlayer = getPlayerByID(invitedId);\n\tif (!invitedPlayer || !player->isInviting(invitedPlayer)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7ba453bdf47699f451852234ab474dead2dc19e48b95ad534fd9740d78cdeec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8235, + "startColumn": 6, + "charOffset": 277244, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8233, + "startColumn": 6, + "charOffset": 277100, + "charLength": 1, + "snippet": { + "text": "void Game::playerPassPartyLeadership(uint32_t playerId, uint32_t newLeaderId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1bd0ea20c070ffc84ea604635fb4f5c83983b73ab33c8bcdcfb9eb8db9f3dc0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8240, + "startColumn": 6, + "charOffset": 277326, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8238, + "startColumn": 6, + "charOffset": 277268, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr party = player->getParty();\n\tif (!party || party->getLeader() != player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e43a7a784a7931fafc4fc4d06d8afa16c8667f083b337286ff661f502b847ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8245, + "startColumn": 6, + "charOffset": 277452, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8243, + "startColumn": 6, + "charOffset": 277381, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr newLeader = getPlayerByID(newLeaderId);\n\tif (!newLeader || !player->isPartner(newLeader)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "936e26009ae148b7779609d9924c9000486efb8a9141729c14fbcb09f56c9aca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8249, + "startColumn": 9, + "charOffset": 277521, + "charLength": 19, + "snippet": { + "text": "passPartyLeadership" + } + }, + "contextRegion": { + "startLine": 8247, + "startColumn": 9, + "charOffset": 277509, + "charLength": 19, + "snippet": { + "text": "\t}\n\n\tparty->passPartyLeadership(newLeader);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b3755b49a66f4cbe712c3ac9ff80bf84cee12365b36ce0ced87e0e57806d972" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8254, + "startColumn": 6, + "charOffset": 277669, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8252, + "startColumn": 6, + "charOffset": 277556, + "charLength": 1, + "snippet": { + "text": "void Game::playerLeaveParty(uint32_t playerId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84d14baaafc970a85d357c976faeeadf6431b8329fcbd561ae67046d6992f6d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8259, + "startColumn": 6, + "charOffset": 277751, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8257, + "startColumn": 6, + "charOffset": 277693, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr party = player->getParty();\n\tif (!party || (player->hasCondition(CONDITION_INFIGHT) && !player->getZoneType() == ZONE_PROTECTION)) {\n\t\tplayer->sendTextMessage(TextMessage(MESSAGE_FAILURE, \"You cannot leave party, contact the administrator.\"));\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0bdaf7558204378913059a3fcf5254f99c8025639c64e155f8231215447b1dd9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8259, + "startColumn": 60, + "charOffset": 277805, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8257, + "startColumn": 60, + "charOffset": 277693, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr party = player->getParty();\n\tif (!party || (player->hasCondition(CONDITION_INFIGHT) && !player->getZoneType() == ZONE_PROTECTION)) {\n\t\tplayer->sendTextMessage(TextMessage(MESSAGE_FAILURE, \"You cannot leave party, contact the administrator.\"));\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "062d3ab68b0ba2ef2c6489b4c416f09d3946905486a8e03f95c8a26884ae48a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8259, + "startColumn": 60, + "charOffset": 277805, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8257, + "startColumn": 60, + "charOffset": 277693, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr party = player->getParty();\n\tif (!party || (player->hasCondition(CONDITION_INFIGHT) && !player->getZoneType() == ZONE_PROTECTION)) {\n\t\tplayer->sendTextMessage(TextMessage(MESSAGE_FAILURE, \"You cannot leave party, contact the administrator.\"));\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6328ac751f1a9bd8ecd10db2d19b072b2395af6300e2d82161bb7ea9f52e4eca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8259, + "startColumn": 60, + "charOffset": 277805, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8257, + "startColumn": 60, + "charOffset": 277693, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr party = player->getParty();\n\tif (!party || (player->hasCondition(CONDITION_INFIGHT) && !player->getZoneType() == ZONE_PROTECTION)) {\n\t\tplayer->sendTextMessage(TextMessage(MESSAGE_FAILURE, \"You cannot leave party, contact the administrator.\"));\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "365892248e78b171480d1f1a0aaa29a96908764fc2d1968199961c24a2826cbb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'ZoneType_t' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8259, + "startColumn": 61, + "charOffset": 277806, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 8257, + "startColumn": 61, + "charOffset": 277693, + "charLength": 6, + "snippet": { + "text": "\n\tstd::shared_ptr party = player->getParty();\n\tif (!party || (player->hasCondition(CONDITION_INFIGHT) && !player->getZoneType() == ZONE_PROTECTION)) {\n\t\tplayer->sendTextMessage(TextMessage(MESSAGE_FAILURE, \"You cannot leave party, contact the administrator.\"));\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4aef3d43973e11c2c713d681958169842c346ddaf32ce4c3811f8f65202c0ba4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8264, + "startColumn": 9, + "charOffset": 277984, + "charLength": 10, + "snippet": { + "text": "leaveParty" + } + }, + "contextRegion": { + "startLine": 8262, + "startColumn": 9, + "charOffset": 277972, + "charLength": 10, + "snippet": { + "text": "\t}\n\n\tparty->leaveParty(player);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23336114066deb83c68cdc780e58ee3e9d75e137f972373909199985edae6496" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8269, + "startColumn": 6, + "charOffset": 278159, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8267, + "startColumn": 6, + "charOffset": 278007, + "charLength": 1, + "snippet": { + "text": "void Game::playerEnableSharedPartyExperience(uint32_t playerId, bool sharedExpActive) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0362c25ff6a8034796f3e2bbf94216615bef4e8a57e2c2172c7cd5996ef5d19" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8275, + "startColumn": 6, + "charOffset": 278261, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8273, + "startColumn": 6, + "charOffset": 278184, + "charLength": 1, + "snippet": { + "text": "\tauto party = player->getParty();\n\tauto playerTile = player->getTile();\n\tif (!party || (player->hasCondition(CONDITION_INFIGHT) && playerTile && !playerTile->hasFlag(TILESTATE_PROTECTIONZONE))) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78f0e51cb1e00f1ce3657613a1ed6619bca732313f459b2291d456407be24642" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8279, + "startColumn": 9, + "charOffset": 278402, + "charLength": 19, + "snippet": { + "text": "setSharedExperience" + } + }, + "contextRegion": { + "startLine": 8277, + "startColumn": 9, + "charOffset": 278390, + "charLength": 19, + "snippet": { + "text": "\t}\n\n\tparty->setSharedExperience(player, sharedExpActive);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3ecb5e6c189af0452cfa3c6a0bb218695a8ebd688d7a4b1367baf14ae3b1910" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8284, + "startColumn": 6, + "charOffset": 278561, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8282, + "startColumn": 6, + "charOffset": 278451, + "charLength": 1, + "snippet": { + "text": "void Game::sendGuildMotd(uint32_t playerId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28fac27920b4d00c7f53deb56193176ef31da31d814d30786f22f062a3255c23" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8290, + "startColumn": 59, + "charOffset": 278698, + "charLength": 7, + "snippet": { + "text": "getMotd" + } + }, + "contextRegion": { + "startLine": 8288, + "startColumn": 59, + "charOffset": 278586, + "charLength": 7, + "snippet": { + "text": "\tconst auto guild = player->getGuild();\n\tif (guild) {\n\t\tplayer->sendChannelMessage(\"Message of the Day\", guild->getMotd(), TALKTYPE_CHANNEL_R1, CHANNEL_GUILD);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7176759766918d5aad4e46a2a3c1eb837d9aa35dde86be6754ead39abab0958b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8296, + "startColumn": 6, + "charOffset": 278879, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8294, + "startColumn": 6, + "charOffset": 278752, + "charLength": 1, + "snippet": { + "text": "void Game::kickPlayer(uint32_t playerId, bool displayEffect) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c28b0af33ba5e2e61c6ff5af28a5df2711576bc84994cddf854af6470a788090" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'playerFriendSystemAction' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8303, + "startColumn": 12, + "charOffset": 278956, + "charLength": 24, + "snippet": { + "text": "playerFriendSystemAction" + } + }, + "contextRegion": { + "startLine": 8301, + "startColumn": 12, + "charOffset": 278942, + "charLength": 24, + "snippet": { + "text": "}\n\nvoid Game::playerFriendSystemAction(std::shared_ptr player, uint8_t type, uint8_t titleId) {\n\tif (type == 0x0E) {\n\t\tplayer->title()->setCurrentTitle(titleId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02ced7d8ab36c5dc0236ceea5a1ee572ba0bfa6c4841afc1c24621bc44bd33f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8303, + "startColumn": 61, + "charOffset": 279005, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 8301, + "startColumn": 61, + "charOffset": 278942, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::playerFriendSystemAction(std::shared_ptr player, uint8_t type, uint8_t titleId) {\n\tif (type == 0x0E) {\n\t\tplayer->title()->setCurrentTitle(titleId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87a9817ce88715d2137ce8b844a6b160c653ad3f378d90ea582333f306869f14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerFriendSystemAction' of similar type ('uint8_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8303, + "startColumn": 69, + "charOffset": 279013, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 8301, + "startColumn": 69, + "charOffset": 278942, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid Game::playerFriendSystemAction(std::shared_ptr player, uint8_t type, uint8_t titleId) {\n\tif (type == 0x0E) {\n\t\tplayer->title()->setCurrentTitle(titleId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ccd6213cb2412c674ed148e463fb1a5210cc37a5074c92d470cf2a25102ebf1a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x0E is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8304, + "startColumn": 14, + "charOffset": 279059, + "charLength": 4, + "snippet": { + "text": "0x0E" + } + }, + "contextRegion": { + "startLine": 8302, + "startColumn": 14, + "charOffset": 278944, + "charLength": 4, + "snippet": { + "text": "\nvoid Game::playerFriendSystemAction(std::shared_ptr player, uint8_t type, uint8_t titleId) {\n\tif (type == 0x0E) {\n\t\tplayer->title()->setCurrentTitle(titleId);\n\t\tplayer->sendCyclopediaCharacterBaseInformation();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a62951f8a65ed0c6dd6bdb65d45bf6f0d4e5680bd4ba34dddf5b5cd40d97692" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'playerCyclopediaCharacterInfo' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8312, + "startColumn": 12, + "charOffset": 279234, + "charLength": 29, + "snippet": { + "text": "playerCyclopediaCharacterInfo" + } + }, + "contextRegion": { + "startLine": 8310, + "startColumn": 12, + "charOffset": 279220, + "charLength": 29, + "snippet": { + "text": "}\n\nvoid Game::playerCyclopediaCharacterInfo(std::shared_ptr player, uint32_t characterID, CyclopediaCharacterInfoType_t characterInfoType, uint16_t entriesPerPage, uint16_t page) {\n\tuint32_t playerGUID = player->getGUID();\n\tif (characterID != playerGUID) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "359bdfc7460f12d25addda8e175bffb8007ae1fc07ddee38a0718eccd5362fc7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8312, + "startColumn": 66, + "charOffset": 279288, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 8310, + "startColumn": 66, + "charOffset": 279220, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::playerCyclopediaCharacterInfo(std::shared_ptr player, uint32_t characterID, CyclopediaCharacterInfoType_t characterInfoType, uint16_t entriesPerPage, uint16_t page) {\n\tuint32_t playerGUID = player->getGUID();\n\tif (characterID != playerGUID) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f4460fd0a48834f2723a1c0a1d6085861963be1b57ea4c2206d1fa4c974c815" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'generateHighscoreQueryForEntries' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8370, + "startColumn": 100, + "charOffset": 281616, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 8368, + "startColumn": 100, + "charOffset": 281514, + "charLength": 7, + "snippet": { + "text": "}\n\nstd::string Game::generateHighscoreQueryForEntries(const std::string &categoryName, uint32_t page, uint8_t entriesPerPage, uint32_t vocation) {\n\tstd::ostringstream query;\n\tuint32_t startPage = (static_cast(page - 1) * static_cast(entriesPerPage));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76c103e1994db8c06ff3d18f10559a205aba633ba3fb245a1e937023dc660714" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFFFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8380, + "startColumn": 18, + "charOffset": 282417, + "charLength": 10, + "snippet": { + "text": "0xFFFFFFFF" + } + }, + "contextRegion": { + "startLine": 8378, + "startColumn": 18, + "charOffset": 282301, + "charLength": 10, + "snippet": { + "text": "\t\t << static_cast(GROUP_TYPE_GAMEMASTER) << \" ORDER BY `\" << categoryName << \"` DESC) `t`\";\n\n\tif (vocation != 0xFFFFFFFF) {\n\t\tquery << generateVocationConditionHighscore(vocation);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a5c91ff711c89cff34a0e181eda1158ebd41ee78549d8135fa8ab8b7aae28f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "3 adjacent parameters of 'generateHighscoreQueryForOurRank' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8388, + "startColumn": 85, + "charOffset": 282676, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 8386, + "startColumn": 85, + "charOffset": 282589, + "charLength": 7, + "snippet": { + "text": "}\n\nstd::string Game::generateHighscoreQueryForOurRank(const std::string &categoryName, uint8_t entriesPerPage, uint32_t playerGUID, uint32_t vocation) {\n\tstd::ostringstream query;\n\tstd::string entriesStr = std::to_string(entriesPerPage);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b11ee2ac8a06b3cb2602fb4797ff08af1b1cba0a38d388fa8a412d97045200b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFFFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8397, + "startColumn": 18, + "charOffset": 283497, + "charLength": 10, + "snippet": { + "text": "0xFFFFFFFF" + } + }, + "contextRegion": { + "startLine": 8395, + "startColumn": 18, + "charOffset": 283381, + "charLength": 10, + "snippet": { + "text": "\t\t << static_cast(GROUP_TYPE_GAMEMASTER) << \" ORDER BY `\" << categoryName << \"` DESC) `t`\";\n\n\tif (vocation != 0xFFFFFFFF) {\n\t\tquery << generateVocationConditionHighscore(vocation);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65b57c2188f1c77ce51868b312bfd08512dcf4f64b5f6c6d6c4d073d750a6601" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'generateVocationConditionHighscore' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8405, + "startColumn": 19, + "charOffset": 283803, + "charLength": 34, + "snippet": { + "text": "generateVocationConditionHighscore" + } + }, + "contextRegion": { + "startLine": 8403, + "startColumn": 19, + "charOffset": 283782, + "charLength": 34, + "snippet": { + "text": "}\n\nstd::string Game::generateVocationConditionHighscore(uint32_t vocation) {\n\tstd::ostringstream queryPart;\n\tbool firstVocation = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d52fdc37959e9f837ef6d36beea79617c361205f53b5d4eecf8dfce8bbd6a038" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'processHighscoreResults' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8425, + "startColumn": 57, + "charOffset": 284361, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 8423, + "startColumn": 57, + "charOffset": 284302, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::processHighscoreResults(DBResult_ptr result, uint32_t playerID, uint8_t category, uint32_t vocation, uint8_t entriesPerPage) {\n\tstd::shared_ptr player = g_game().getPlayerByID(playerID);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f9c120d1c87870039a0bae6d12d27a3336c0bf2ba3d2926b1b4def22fd1c3bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8427, + "startColumn": 6, + "charOffset": 284516, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8425, + "startColumn": 6, + "charOffset": 284305, + "charLength": 1, + "snippet": { + "text": "void Game::processHighscoreResults(DBResult_ptr result, uint32_t playerID, uint8_t category, uint32_t vocation, uint8_t entriesPerPage) {\n\tstd::shared_ptr player = g_game().getPlayerByID(playerID);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "441e3a051571dba24ac3b5416e5edca78ef48fec55968edda64743ba1f3863e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8433, + "startColumn": 6, + "charOffset": 284606, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8431, + "startColumn": 6, + "charOffset": 284541, + "charLength": 1, + "snippet": { + "text": "\tplayer->resetAsyncOngoingTask(PlayerAsyncTask_Highscore);\n\n\tif (!result) {\n\t\tplayer->sendHighscoresNoData();\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76589ebc6d0e381ea67146902978b5df921dbd8182c5616685f490817284c9f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8460, + "startColumn": 4, + "charOffset": 285836, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 8458, + "startColumn": 4, + "charOffset": 285771, + "charLength": 2, + "snippet": { + "text": "\t\tcharacters.reserve(result->countResults());\n\t\tif (result) {\n\t\t\tdo {\n\t\t\t\tconst auto &voc = g_vocations().getVocation(result->getNumber(\"vocation\"));\n\t\t\t\tuint8_t characterVocation = voc ? voc->getClientId() : 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f32a53f61b89a9c01d318d40b5ee7946046417e8150b99ee62de02ee9fb33800" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8460, + "startColumn": 4, + "charOffset": 285836, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 8458, + "startColumn": 4, + "charOffset": 285771, + "charLength": 2, + "snippet": { + "text": "\t\tcharacters.reserve(result->countResults());\n\t\tif (result) {\n\t\t\tdo {\n\t\t\t\tconst auto &voc = g_vocations().getVocation(result->getNumber(\"vocation\"));\n\t\t\t\tuint8_t characterVocation = voc ? voc->getClientId() : 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33257f8f14dfe95f2ee7749480a809dc6fdabce0ad924680fc44e31990a5c759" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-12", + "ruleIndex": 424, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-12: signed char and unsigned char type shall only be used for the storage and use of numeric values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8462, + "startColumn": 13, + "charOffset": 285943, + "charLength": 17, + "snippet": { + "text": "characterVocation" + } + }, + "contextRegion": { + "startLine": 8460, + "startColumn": 13, + "charOffset": 285833, + "charLength": 17, + "snippet": { + "text": "\t\t\tdo {\n\t\t\t\tconst auto &voc = g_vocations().getVocation(result->getNumber(\"vocation\"));\n\t\t\t\tuint8_t characterVocation = voc ? voc->getClientId() : 0;\n\t\t\t\tstd::string loyaltyTitle = \"\"; // todo get loyalty title from player\n\t\t\t\tcharacters.emplace_back(std::move(result->getString(\"name\")), result->getNumber(\"points\"), result->getNumber(\"id\"), result->getNumber(\"rank\"), result->getNumber(\"level\"), characterVocation, loyaltyTitle);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d19c285ed5b67956cc88a01de959b979e904eae1b486c8179b12920628408a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'cacheQueryHighscore' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8473, + "startColumn": 12, + "charOffset": 286537, + "charLength": 19, + "snippet": { + "text": "cacheQueryHighscore" + } + }, + "contextRegion": { + "startLine": 8471, + "startColumn": 12, + "charOffset": 286523, + "charLength": 19, + "snippet": { + "text": "}\n\nvoid Game::cacheQueryHighscore(const std::string &key, const std::string &query, uint32_t page, uint8_t entriesPerPage) {\n\tQueryHighscoreCacheEntry queryEntry { query, page, entriesPerPage, std::chrono::steady_clock::now() };\n\tqueryCache[key] = queryEntry;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b79b341061613d06b8388f275bafffa71ba759361e4ddcef6abc15aa1dacc40c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'cacheQueryHighscore' of similar type ('const std::string &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8473, + "startColumn": 32, + "charOffset": 286557, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 8471, + "startColumn": 32, + "charOffset": 286523, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid Game::cacheQueryHighscore(const std::string &key, const std::string &query, uint32_t page, uint8_t entriesPerPage) {\n\tQueryHighscoreCacheEntry queryEntry { query, page, entriesPerPage, std::chrono::steady_clock::now() };\n\tqueryCache[key] = queryEntry;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50767cfb8af18839355700b53aef9ece70a427cc78c3fec183a0d0d741dd5c35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8514, + "startColumn": 53, + "charOffset": 288370, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 8512, + "startColumn": 53, + "charOffset": 288315, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::playerHighscores(std::shared_ptr player, HighscoreType_t type, uint8_t category, uint32_t vocation, const std::string &, uint16_t page, uint8_t entriesPerPage) {\n\tif (player->hasAsyncOngoingTask(PlayerAsyncTask_Highscore)) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7aa6da8177e33f74f90e41eccaa575e562e96685ce27283ac8040e269eb6be8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8514, + "startColumn": 139, + "charOffset": 288456, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 8512, + "startColumn": 139, + "charOffset": 288315, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Game::playerHighscores(std::shared_ptr player, HighscoreType_t type, uint8_t category, uint32_t vocation, const std::string &, uint16_t page, uint8_t entriesPerPage) {\n\tif (player->hasAsyncOngoingTask(PlayerAsyncTask_Highscore)) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c44e8ffba3bab735cc866a638c79cf8e0410311532c0cfbe44f4d2285382ecc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8522, + "startColumn": 2, + "charOffset": 288654, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 8520, + "startColumn": 2, + "charOffset": 288632, + "charLength": 2, + "snippet": { + "text": "\n\tstd::string query;\n\tif (type == HIGHSCORE_GETENTRIES) {\n\t\tquery = generateHighscoreOrGetCachedQueryForEntries(categoryName, page, entriesPerPage, vocation);\n\t} else if (type == HIGHSCORE_OURRANK) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f46423df16d601d8bccdf8a90a4c7701b4b952faa6c31fd1da4509f505f5b61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8539, + "startColumn": 3, + "charOffset": 289431, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 8537, + "startColumn": 3, + "charOffset": 289322, + "charLength": 4, + "snippet": { + "text": "std::string Game::getSkillNameById(uint8_t &skill) {\n\tswitch (static_cast(skill)) {\n\t\tcase HighscoreCategories_t::FIST_FIGHTING:\n\t\t\treturn \"skill_fist\";\n\t\tcase HighscoreCategories_t::CLUB_FIGHTING:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a76ccf9dd87f70be4af3486c2c1bb2fcff4280822bbf78bcf409fafe2210bcc7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8541, + "startColumn": 3, + "charOffset": 289500, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 8539, + "startColumn": 3, + "charOffset": 289429, + "charLength": 4, + "snippet": { + "text": "\t\tcase HighscoreCategories_t::FIST_FIGHTING:\n\t\t\treturn \"skill_fist\";\n\t\tcase HighscoreCategories_t::CLUB_FIGHTING:\n\t\t\treturn \"skill_club\";\n\t\tcase HighscoreCategories_t::SWORD_FIGHTING:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db6cbf24d52bad58d1ef4610369d786fbd76b8152893c9cfce8e0e1f4ecd73c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8543, + "startColumn": 3, + "charOffset": 289569, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 8541, + "startColumn": 3, + "charOffset": 289498, + "charLength": 4, + "snippet": { + "text": "\t\tcase HighscoreCategories_t::CLUB_FIGHTING:\n\t\t\treturn \"skill_club\";\n\t\tcase HighscoreCategories_t::SWORD_FIGHTING:\n\t\t\treturn \"skill_sword\";\n\t\tcase HighscoreCategories_t::AXE_FIGHTING:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "616c903c455f529d145fa8c355b2a52f1d9b3a9f111b36165849f28697484864" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8545, + "startColumn": 3, + "charOffset": 289640, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 8543, + "startColumn": 3, + "charOffset": 289567, + "charLength": 4, + "snippet": { + "text": "\t\tcase HighscoreCategories_t::SWORD_FIGHTING:\n\t\t\treturn \"skill_sword\";\n\t\tcase HighscoreCategories_t::AXE_FIGHTING:\n\t\t\treturn \"skill_axe\";\n\t\tcase HighscoreCategories_t::DISTANCE_FIGHTING:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b9a3c8b422e78b00073172364da9608d245b11d994fb2fc104b1d2eec9d5a12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8547, + "startColumn": 3, + "charOffset": 289707, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 8545, + "startColumn": 3, + "charOffset": 289638, + "charLength": 4, + "snippet": { + "text": "\t\tcase HighscoreCategories_t::AXE_FIGHTING:\n\t\t\treturn \"skill_axe\";\n\t\tcase HighscoreCategories_t::DISTANCE_FIGHTING:\n\t\t\treturn \"skill_dist\";\n\t\tcase HighscoreCategories_t::SHIELDING:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2744b5822dc681275b310bfd38612dcd5bd8bc85d9cccdd8651253863080d50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8549, + "startColumn": 3, + "charOffset": 289780, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 8547, + "startColumn": 3, + "charOffset": 289705, + "charLength": 4, + "snippet": { + "text": "\t\tcase HighscoreCategories_t::DISTANCE_FIGHTING:\n\t\t\treturn \"skill_dist\";\n\t\tcase HighscoreCategories_t::SHIELDING:\n\t\t\treturn \"skill_shielding\";\n\t\tcase HighscoreCategories_t::FISHING:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65c325406c50d5205243c5738bd9cce26b956acc5f09a18f3eab8d02bce3b7ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8551, + "startColumn": 3, + "charOffset": 289850, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 8549, + "startColumn": 3, + "charOffset": 289778, + "charLength": 4, + "snippet": { + "text": "\t\tcase HighscoreCategories_t::SHIELDING:\n\t\t\treturn \"skill_shielding\";\n\t\tcase HighscoreCategories_t::FISHING:\n\t\t\treturn \"skill_fishing\";\n\t\tcase HighscoreCategories_t::MAGIC_LEVEL:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ee23f894a269879877bdeaeb5c7326419796611809a470019eb4ac8959177e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8553, + "startColumn": 3, + "charOffset": 289916, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 8551, + "startColumn": 3, + "charOffset": 289848, + "charLength": 4, + "snippet": { + "text": "\t\tcase HighscoreCategories_t::FISHING:\n\t\t\treturn \"skill_fishing\";\n\t\tcase HighscoreCategories_t::MAGIC_LEVEL:\n\t\t\treturn \"maglevel\";\n\t\tcase HighscoreCategories_t::BOSS_POINTS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f98cf22c9b90ad78f7b00c4e57c97f006a9f9d55c1743c681fa96832ad82a236" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8555, + "startColumn": 3, + "charOffset": 289981, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 8553, + "startColumn": 3, + "charOffset": 289914, + "charLength": 4, + "snippet": { + "text": "\t\tcase HighscoreCategories_t::MAGIC_LEVEL:\n\t\t\treturn \"maglevel\";\n\t\tcase HighscoreCategories_t::BOSS_POINTS:\n\t\t\treturn \"boss_points\";\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca88d59784b988febbdc30d091ed69bf539f78b1f35e086b5264adcceba2e42f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8557, + "startColumn": 3, + "charOffset": 290049, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 8555, + "startColumn": 3, + "charOffset": 289979, + "charLength": 7, + "snippet": { + "text": "\t\tcase HighscoreCategories_t::BOSS_POINTS:\n\t\t\treturn \"boss_points\";\n\t\tdefault:\n\t\t\tskill = static_cast(HighscoreCategories_t::EXPERIENCE);\n\t\t\treturn \"experience\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12bfb667b0ac2cdd31f8b9c3b4c538fa54df543e447c59f67f3b77a83ba98e1c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8565, + "startColumn": 6, + "charOffset": 290417, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8563, + "startColumn": 6, + "charOffset": 290156, + "charLength": 1, + "snippet": { + "text": "void Game::playerReportRuleViolationReport(uint32_t playerId, const std::string &targetName, uint8_t reportType, uint8_t reportReason, const std::string &comment, const std::string &translation) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b2b3af8eb93dc95c5a38460de444683c3544453fa898602e9ff5823434bc0d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8575, + "startColumn": 6, + "charOffset": 290934, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8573, + "startColumn": 6, + "charOffset": 290750, + "charLength": 1, + "snippet": { + "text": "void Game::playerReportBug(uint32_t playerId, const std::string &message, const Position &position, uint8_t category) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "faf69603393764027811d8477b7f705430bd25474a653d00b5fd5baa2c66810d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8579, + "startColumn": 13, + "charOffset": 290971, + "charLength": 22, + "snippet": { + "text": "eventPlayerOnReportBug" + } + }, + "contextRegion": { + "startLine": 8577, + "startColumn": 13, + "charOffset": 290955, + "charLength": 22, + "snippet": { + "text": "\t}\n\n\tg_events().eventPlayerOnReportBug(player, message, position, category);\n\tg_callbacks().executeCallback(EventCallback_t::playerOnReportBug, &EventCallback::playerOnReportBug, player, message, position, category);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8b6854968ba433b4f0e7c01fd4db1b9213aa61191e665c51e4dc103e8b0f5ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8585, + "startColumn": 6, + "charOffset": 291405, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8583, + "startColumn": 6, + "charOffset": 291175, + "charLength": 1, + "snippet": { + "text": "void Game::playerDebugAssert(uint32_t playerId, const std::string &assertLine, const std::string &date, const std::string &description, const std::string &comment) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6bb0f6891503d25b5592eb6972686ccfabdcabaad17f8ee002ccab7168fb9a64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-todo", + "ruleIndex": 545, + "kind": "fail", + "level": "warning", + "message": { + "text": "missing username/bug in TODO" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8589, + "startColumn": 2, + "charOffset": 291431, + "charLength": 42, + "snippet": { + "text": "// TODO: move debug assertions to database" + } + }, + "contextRegion": { + "startLine": 8587, + "startColumn": 2, + "charOffset": 291426, + "charLength": 42, + "snippet": { + "text": "\t}\n\n\t// TODO: move debug assertions to database\n\tFILE* file = fopen(\"client_assertions.txt\", \"a\");\n\tif (file) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1132d8c22a234ce0cfc9af61176e6365d3397e33a0a607d31fff51e41a3ad198" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-owning-memory", + "ruleIndex": 503, + "kind": "fail", + "level": "warning", + "message": { + "text": "initializing non-owner 'FILE *' (aka '_IO_FILE *') with a newly created 'gsl::owner<>'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8590, + "startColumn": 2, + "charOffset": 291475, + "charLength": 4, + "snippet": { + "text": "FILE" + } + }, + "contextRegion": { + "startLine": 8588, + "startColumn": 2, + "charOffset": 291429, + "charLength": 4, + "snippet": { + "text": "\n\t// TODO: move debug assertions to database\n\tFILE* file = fopen(\"client_assertions.txt\", \"a\");\n\tif (file) {\n\t\tfprintf(file, \"----- %s - %s (%s) -----\\n\", formatDate(time(nullptr)).c_str(), player->getName().c_str(), convertIPToString(player->getIP()).c_str());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81c20f0202ad6b5785d8470590395b7ea9496d1f4b0e54ce2aa8442b23d84264" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "android-cloexec-fopen", + "ruleIndex": 30, + "kind": "fail", + "level": "warning", + "message": { + "text": "use 'fopen' mode 'e' to set O_CLOEXEC" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8590, + "startColumn": 46, + "charOffset": 291519, + "charLength": 3, + "snippet": { + "text": "\"a\"" + } + }, + "contextRegion": { + "startLine": 8588, + "startColumn": 46, + "charOffset": 291429, + "charLength": 3, + "snippet": { + "text": "\n\t// TODO: move debug assertions to database\n\tFILE* file = fopen(\"client_assertions.txt\", \"a\");\n\tif (file) {\n\t\tfprintf(file, \"----- %s - %s (%s) -----\\n\", formatDate(time(nullptr)).c_str(), player->getName().c_str(), convertIPToString(player->getIP()).c_str());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7be83055ecfebd8ea52d42a2147ce1fcc84ce30b3d4d29f17542a8e07434445" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8591, + "startColumn": 6, + "charOffset": 291530, + "charLength": 4, + "snippet": { + "text": "file" + } + }, + "contextRegion": { + "startLine": 8589, + "startColumn": 6, + "charOffset": 291430, + "charLength": 4, + "snippet": { + "text": "\t// TODO: move debug assertions to database\n\tFILE* file = fopen(\"client_assertions.txt\", \"a\");\n\tif (file) {\n\t\tfprintf(file, \"----- %s - %s (%s) -----\\n\", formatDate(time(nullptr)).c_str(), player->getName().c_str(), convertIPToString(player->getIP()).c_str());\n\t\tfprintf(file, \"%s\\n%s\\n%s\\n%s\\n\", assertLine.c_str(), date.c_str(), description.c_str(), comment.c_str());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0536bab7f21aa2928aee9e525d5e27477a1162ec6a0fa68b2a9420d468e9db3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'FILE *' (aka '_IO_FILE *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8591, + "startColumn": 6, + "charOffset": 291530, + "charLength": 4, + "snippet": { + "text": "file" + } + }, + "contextRegion": { + "startLine": 8589, + "startColumn": 6, + "charOffset": 291430, + "charLength": 4, + "snippet": { + "text": "\t// TODO: move debug assertions to database\n\tFILE* file = fopen(\"client_assertions.txt\", \"a\");\n\tif (file) {\n\t\tfprintf(file, \"----- %s - %s (%s) -----\\n\", formatDate(time(nullptr)).c_str(), player->getName().c_str(), convertIPToString(player->getIP()).c_str());\n\t\tfprintf(file, \"%s\\n%s\\n%s\\n%s\\n\", assertLine.c_str(), date.c_str(), description.c_str(), comment.c_str());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2025a0fdba325d6caf87dd1847ff8c30fcf0b8e4fdcccd66c96fbda4e1c323ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err33-c", + "ruleIndex": 132, + "kind": "fail", + "level": "warning", + "message": { + "text": "the value returned by this function should not be disregarded; neglecting it may lead to errors" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8592, + "startColumn": 3, + "charOffset": 291540, + "charLength": 7, + "snippet": { + "text": "fprintf" + } + }, + "contextRegion": { + "startLine": 8590, + "startColumn": 3, + "charOffset": 291474, + "charLength": 7, + "snippet": { + "text": "\tFILE* file = fopen(\"client_assertions.txt\", \"a\");\n\tif (file) {\n\t\tfprintf(file, \"----- %s - %s (%s) -----\\n\", formatDate(time(nullptr)).c_str(), player->getName().c_str(), convertIPToString(player->getIP()).c_str());\n\t\tfprintf(file, \"%s\\n%s\\n%s\\n%s\\n\", assertLine.c_str(), date.c_str(), description.c_str(), comment.c_str());\n\t\tfclose(file);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "023da9dea0f80095183bf53439860d386ef2fe75df91089a1c40b08db30ad347" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8592, + "startColumn": 3, + "charOffset": 291540, + "charLength": 7, + "snippet": { + "text": "fprintf" + } + }, + "contextRegion": { + "startLine": 8590, + "startColumn": 3, + "charOffset": 291474, + "charLength": 7, + "snippet": { + "text": "\tFILE* file = fopen(\"client_assertions.txt\", \"a\");\n\tif (file) {\n\t\tfprintf(file, \"----- %s - %s (%s) -----\\n\", formatDate(time(nullptr)).c_str(), player->getName().c_str(), convertIPToString(player->getIP()).c_str());\n\t\tfprintf(file, \"%s\\n%s\\n%s\\n%s\\n\", assertLine.c_str(), date.c_str(), description.c_str(), comment.c_str());\n\t\tfclose(file);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc60aceae9392ebd99f6f31faebab267dd4050cf07c049302d8dec8d395c3764" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-vararg", + "ruleIndex": 514, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not call c-style vararg functions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8592, + "startColumn": 3, + "charOffset": 291540, + "charLength": 7, + "snippet": { + "text": "fprintf" + } + }, + "contextRegion": { + "startLine": 8590, + "startColumn": 3, + "charOffset": 291474, + "charLength": 7, + "snippet": { + "text": "\tFILE* file = fopen(\"client_assertions.txt\", \"a\");\n\tif (file) {\n\t\tfprintf(file, \"----- %s - %s (%s) -----\\n\", formatDate(time(nullptr)).c_str(), player->getName().c_str(), convertIPToString(player->getIP()).c_str());\n\t\tfprintf(file, \"%s\\n%s\\n%s\\n%s\\n\", assertLine.c_str(), date.c_str(), description.c_str(), comment.c_str());\n\t\tfclose(file);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98b0f2f134b8638198ecb799fbaf6138752541d74341525e0dd2656d9628cd9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8592, + "startColumn": 58, + "charOffset": 291595, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 8590, + "startColumn": 58, + "charOffset": 291474, + "charLength": 4, + "snippet": { + "text": "\tFILE* file = fopen(\"client_assertions.txt\", \"a\");\n\tif (file) {\n\t\tfprintf(file, \"----- %s - %s (%s) -----\\n\", formatDate(time(nullptr)).c_str(), player->getName().c_str(), convertIPToString(player->getIP()).c_str());\n\t\tfprintf(file, \"%s\\n%s\\n%s\\n%s\\n\", assertLine.c_str(), date.c_str(), description.c_str(), comment.c_str());\n\t\tfclose(file);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58ecceb1e59c2ae0eacab125d891319267ef32a186e216d3d571e295ed3f532d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err33-c", + "ruleIndex": 132, + "kind": "fail", + "level": "warning", + "message": { + "text": "the value returned by this function should not be disregarded; neglecting it may lead to errors" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8593, + "startColumn": 3, + "charOffset": 291693, + "charLength": 7, + "snippet": { + "text": "fprintf" + } + }, + "contextRegion": { + "startLine": 8591, + "startColumn": 3, + "charOffset": 291525, + "charLength": 7, + "snippet": { + "text": "\tif (file) {\n\t\tfprintf(file, \"----- %s - %s (%s) -----\\n\", formatDate(time(nullptr)).c_str(), player->getName().c_str(), convertIPToString(player->getIP()).c_str());\n\t\tfprintf(file, \"%s\\n%s\\n%s\\n%s\\n\", assertLine.c_str(), date.c_str(), description.c_str(), comment.c_str());\n\t\tfclose(file);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31d902e0cc363cc5ce28910fef6376dbaef88fc9293ebdcc22a204b9c203482a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8593, + "startColumn": 3, + "charOffset": 291693, + "charLength": 7, + "snippet": { + "text": "fprintf" + } + }, + "contextRegion": { + "startLine": 8591, + "startColumn": 3, + "charOffset": 291525, + "charLength": 7, + "snippet": { + "text": "\tif (file) {\n\t\tfprintf(file, \"----- %s - %s (%s) -----\\n\", formatDate(time(nullptr)).c_str(), player->getName().c_str(), convertIPToString(player->getIP()).c_str());\n\t\tfprintf(file, \"%s\\n%s\\n%s\\n%s\\n\", assertLine.c_str(), date.c_str(), description.c_str(), comment.c_str());\n\t\tfclose(file);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b56aad5e92c824c87cae339343fd9ac7d0579af44017b778b3f93ddf276302ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-vararg", + "ruleIndex": 514, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not call c-style vararg functions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8593, + "startColumn": 3, + "charOffset": 291693, + "charLength": 7, + "snippet": { + "text": "fprintf" + } + }, + "contextRegion": { + "startLine": 8591, + "startColumn": 3, + "charOffset": 291525, + "charLength": 7, + "snippet": { + "text": "\tif (file) {\n\t\tfprintf(file, \"----- %s - %s (%s) -----\\n\", formatDate(time(nullptr)).c_str(), player->getName().c_str(), convertIPToString(player->getIP()).c_str());\n\t\tfprintf(file, \"%s\\n%s\\n%s\\n%s\\n\", assertLine.c_str(), date.c_str(), description.c_str(), comment.c_str());\n\t\tfclose(file);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "678b9e80b8a16c366648abe91842ce7dd1796d86e36c11c8924c22bd45a971db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err33-c", + "ruleIndex": 132, + "kind": "fail", + "level": "warning", + "message": { + "text": "the value returned by this function should not be disregarded; neglecting it may lead to errors" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8594, + "startColumn": 3, + "charOffset": 291802, + "charLength": 6, + "snippet": { + "text": "fclose" + } + }, + "contextRegion": { + "startLine": 8592, + "startColumn": 3, + "charOffset": 291538, + "charLength": 6, + "snippet": { + "text": "\t\tfprintf(file, \"----- %s - %s (%s) -----\\n\", formatDate(time(nullptr)).c_str(), player->getName().c_str(), convertIPToString(player->getIP()).c_str());\n\t\tfprintf(file, \"%s\\n%s\\n%s\\n%s\\n\", assertLine.c_str(), date.c_str(), description.c_str(), comment.c_str());\n\t\tfclose(file);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbd477501f3faf72033962a87f68fcade01394c7001d4aaa9ccad296a1d309c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8594, + "startColumn": 3, + "charOffset": 291802, + "charLength": 6, + "snippet": { + "text": "fclose" + } + }, + "contextRegion": { + "startLine": 8592, + "startColumn": 3, + "charOffset": 291538, + "charLength": 6, + "snippet": { + "text": "\t\tfprintf(file, \"----- %s - %s (%s) -----\\n\", formatDate(time(nullptr)).c_str(), player->getName().c_str(), convertIPToString(player->getIP()).c_str());\n\t\tfprintf(file, \"%s\\n%s\\n%s\\n%s\\n\", assertLine.c_str(), date.c_str(), description.c_str(), comment.c_str());\n\t\tfclose(file);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "569a72649ef95bfefb8295b66bd0d47bacf513957bdc4c17203cfea154dc019e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-owning-memory", + "ruleIndex": 503, + "kind": "fail", + "level": "warning", + "message": { + "text": "calling legacy resource function without passing a 'gsl::owner<>'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8594, + "startColumn": 3, + "charOffset": 291802, + "charLength": 6, + "snippet": { + "text": "fclose" + } + }, + "contextRegion": { + "startLine": 8592, + "startColumn": 3, + "charOffset": 291538, + "charLength": 6, + "snippet": { + "text": "\t\tfprintf(file, \"----- %s - %s (%s) -----\\n\", formatDate(time(nullptr)).c_str(), player->getName().c_str(), convertIPToString(player->getIP()).c_str());\n\t\tfprintf(file, \"%s\\n%s\\n%s\\n%s\\n\", assertLine.c_str(), date.c_str(), description.c_str(), comment.c_str());\n\t\tfclose(file);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "364c0904c4698eddfe577fb588abacc0c16c568e4ed5aa7cd3b333fb57c86d15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerPreyAction' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8598, + "startColumn": 29, + "charOffset": 291850, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 8596, + "startColumn": 29, + "charOffset": 291819, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerPreyAction(uint32_t playerId, uint8_t slot, uint8_t action, uint8_t option, int8_t index, uint16_t raceId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "768f25d300e8bdde644f775b255aed582da979330ad3569a5e0ae966377b6d84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8600, + "startColumn": 6, + "charOffset": 292012, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8598, + "startColumn": 6, + "charOffset": 291822, + "charLength": 1, + "snippet": { + "text": "void Game::playerPreyAction(uint32_t playerId, uint8_t slot, uint8_t action, uint8_t option, int8_t index, uint16_t raceId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba7b076459dc941a6753a1301dddbfbd9d3e803353ac79379546a6b2c7a2798f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerTaskHuntingAction' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8607, + "startColumn": 36, + "charOffset": 292228, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 8605, + "startColumn": 36, + "charOffset": 292190, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerTaskHuntingAction(uint32_t playerId, uint8_t slot, uint8_t action, bool upgrade, uint16_t raceId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be0e7e2e74e9934202db4e065079b7974ccfc1acb8aed2affe7f9b96b14387d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8609, + "startColumn": 6, + "charOffset": 292374, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8607, + "startColumn": 6, + "charOffset": 292193, + "charLength": 1, + "snippet": { + "text": "void Game::playerTaskHuntingAction(uint32_t playerId, uint8_t slot, uint8_t action, bool upgrade, uint16_t raceId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "061faeac2c741c139b1ed8cd6191bb2c36f444b53c5d6a213aa1a7f73acce51f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerNpcGreet' of similar type ('uint32_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8616, + "startColumn": 27, + "charOffset": 292559, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 8614, + "startColumn": 27, + "charOffset": 292530, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerNpcGreet(uint32_t playerId, uint32_t npcId) {\n\tconst auto &player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "250d38c5765b248f487c32ac429f3d713ff75b29cf6ca1af7d839be009bcd2b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8618, + "startColumn": 6, + "charOffset": 292648, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8616, + "startColumn": 6, + "charOffset": 292533, + "charLength": 1, + "snippet": { + "text": "void Game::playerNpcGreet(uint32_t playerId, uint32_t npcId) {\n\tconst auto &player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70f9b9a7caa7f3ddc245b86a07c286892e2a992f34ca4bd048a6f996439cb9e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8623, + "startColumn": 6, + "charOffset": 292716, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8621, + "startColumn": 6, + "charOffset": 292672, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto &npc = getNpcByID(npcId);\n\tif (!npc) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55301a0e77a6c8d1be561adce21515a21bcb42711d367017beda280f0fe80252" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8639, + "startColumn": 2, + "charOffset": 293047, + "charLength": 19, + "snippet": { + "text": "internalCreatureSay" + } + }, + "contextRegion": { + "startLine": 8637, + "startColumn": 2, + "charOffset": 292946, + "charLength": 19, + "snippet": { + "text": "\tauto spectators = Spectators().find(player->getPosition(), true);\n\tspectators.insert(npc);\n\tinternalCreatureSay(player, TALKTYPE_SAY, \"hi\", false, &spectators);\n\n\tauto npcsSpectators = spectators.filter();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2758a5e9e7d6212ef58ac2aa60e738d82bcffa528ce42b83dcf08fe1eb11c727" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8644, + "startColumn": 3, + "charOffset": 293222, + "charLength": 19, + "snippet": { + "text": "internalCreatureSay" + } + }, + "contextRegion": { + "startLine": 8642, + "startColumn": 3, + "charOffset": 293166, + "charLength": 19, + "snippet": { + "text": "\n\tif (npc->getSpeechBubble() == SPEECHBUBBLE_TRADE) {\n\t\tinternalCreatureSay(player, TALKTYPE_PRIVATE_PN, \"trade\", false, &npcsSpectators);\n\t} else {\n\t\tinternalCreatureSay(player, TALKTYPE_PRIVATE_PN, \"sail\", false, &npcsSpectators);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0baadabeb4cb3d50050ca36d777c5f3fe0d9309856c44877d50d2967dfdad2d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8646, + "startColumn": 3, + "charOffset": 293317, + "charLength": 19, + "snippet": { + "text": "internalCreatureSay" + } + }, + "contextRegion": { + "startLine": 8644, + "startColumn": 3, + "charOffset": 293220, + "charLength": 19, + "snippet": { + "text": "\t\tinternalCreatureSay(player, TALKTYPE_PRIVATE_PN, \"trade\", false, &npcsSpectators);\n\t} else {\n\t\tinternalCreatureSay(player, TALKTYPE_PRIVATE_PN, \"sail\", false, &npcsSpectators);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3744196f50bcc5a6c1204ea34dbec73dea1fb475907a9e34d3ae64b709ffae32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8654, + "startColumn": 6, + "charOffset": 293550, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8652, + "startColumn": 6, + "charOffset": 293436, + "charLength": 1, + "snippet": { + "text": "void Game::playerLeaveMarket(uint32_t playerId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e84e060de76ed8502fa99f89e35766156c454daf495af73bd02247ef9b509ab7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "3 adjacent parameters of 'playerBrowseMarket' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8661, + "startColumn": 31, + "charOffset": 293637, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 8659, + "startColumn": 31, + "charOffset": 293604, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerBrowseMarket(uint32_t playerId, uint16_t itemId, uint8_t tier) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd4fa04c88f84f64f9702fc83db16d913f0a138227e624cb1820645b5d4a7c13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8663, + "startColumn": 6, + "charOffset": 293753, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8661, + "startColumn": 6, + "charOffset": 293607, + "charLength": 1, + "snippet": { + "text": "void Game::playerBrowseMarket(uint32_t playerId, uint16_t itemId, uint8_t tier) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7acb06caf1652ff0dd605b115b6b238c40e744bfd455d2bf158102c75d188edd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8688, + "startColumn": 6, + "charOffset": 294359, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8686, + "startColumn": 6, + "charOffset": 294235, + "charLength": 1, + "snippet": { + "text": "void Game::playerBrowseMarketOwnOffers(uint32_t playerId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61f74bd474b8f7dc49f3ef10d15e0cc8061208e1d5aaccc7ce42f8c4259f3e91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8703, + "startColumn": 6, + "charOffset": 294811, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8701, + "startColumn": 6, + "charOffset": 294686, + "charLength": 1, + "snippet": { + "text": "void Game::playerBrowseMarketOwnHistory(uint32_t playerId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa7c816ca082ba69054c7d01eb6a6ce833c31dd20ab2caae548b04ae356ccc1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'removeOfferItems' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8717, + "startColumn": 138, + "charOffset": 295304, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 8715, + "startColumn": 138, + "charOffset": 295154, + "charLength": 8, + "snippet": { + "text": "\nnamespace {\n\tbool removeOfferItems(const std::shared_ptr &player, const std::shared_ptr &depotLocker, const ItemType &itemType, uint16_t amount, uint8_t tier, std::ostringstream &offerStatus) {\n\t\tuint16_t removeAmount = amount;\n\t\tif (" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eedc85f67e8c3bf9b2206373662ca55c2f0ac9a9078d13d7c47a5f6d9b8b738c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8780, + "startColumn": 98, + "charOffset": 297308, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 8778, + "startColumn": 98, + "charOffset": 297181, + "charLength": 7, + "snippet": { + "text": "\t\t}\n\t\tif (removeAmount > 0) {\n\t\t\tg_logger().error(\"Player {} tried to sell an item {} without this item\", itemType.id, player->getName());\n\t\t\tofferStatus << \"The item you tried to market is not correct. Check the item again.\";\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8cbda059229d121eb4052a878ad82ba2fcb9ac71aa42ce0a7c969973b42fb1ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8788, + "startColumn": 60, + "charOffset": 297522, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 8786, + "startColumn": 60, + "charOffset": 297447, + "charLength": 6, + "snippet": { + "text": "} // namespace\n\nbool checkCanInitCreateMarketOffer(std::shared_ptr player, uint8_t type, const ItemType &it, uint16_t amount, uint64_t price, std::ostringstream &offerStatus) {\n\tif (!player) {\n\t\tofferStatus << \"Failed to load player\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3959b436139a7834dd2c6678b2080b9685bc1509b50da1e38f78a730decb033a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'checkCanInitCreateMarketOffer' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8788, + "startColumn": 102, + "charOffset": 297564, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 8786, + "startColumn": 102, + "charOffset": 297447, + "charLength": 8, + "snippet": { + "text": "} // namespace\n\nbool checkCanInitCreateMarketOffer(std::shared_ptr player, uint8_t type, const ItemType &it, uint16_t amount, uint64_t price, std::ostringstream &offerStatus) {\n\tif (!player) {\n\t\tofferStatus << \"Failed to load player\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d255d168b5a1b25a7932c5be60432b39f05c831eeb2d7da9cd2c58ba5bd31d12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8789, + "startColumn": 6, + "charOffset": 297637, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8787, + "startColumn": 6, + "charOffset": 297462, + "charLength": 1, + "snippet": { + "text": "\nbool checkCanInitCreateMarketOffer(std::shared_ptr player, uint8_t type, const ItemType &it, uint16_t amount, uint64_t price, std::ostringstream &offerStatus) {\n\tif (!player) {\n\t\tofferStatus << \"Failed to load player\";\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84d14baaafc970a85d357c976faeeadf6431b8329fcbd561ae67046d6992f6d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8794, + "startColumn": 6, + "charOffset": 297715, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8792, + "startColumn": 6, + "charOffset": 297706, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!player->getAccount()) {\n\t\tofferStatus << \"Failed to load player account\";\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff4d8529a0eb8f6a7e876f3e16216ee0db25cb06a97d6332d4ec0ac1f4e7e5de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "999999999999 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8809, + "startColumn": 14, + "charOffset": 298064, + "charLength": 12, + "snippet": { + "text": "999999999999" + } + }, + "contextRegion": { + "startLine": 8807, + "startColumn": 14, + "charOffset": 298047, + "charLength": 12, + "snippet": { + "text": "\t}\n\n\tif (price > 999999999999) {\n\t\tofferStatus << \"Player \" << player->getName() << \" is trying to sell an item with a higher than allowed value\";\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aeb83dfb7c208362391fdb9113c5d6840906a7a6ef1b2cb6eaf1f3582f5711a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8819, + "startColumn": 28, + "charOffset": 298413, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 8817, + "startColumn": 28, + "charOffset": 298382, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tif (player->isUIExhausted(1000)) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_YOUAREEXHAUSTED);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8eaee54e6aa5af845d090e925a785f0fae12b8f7fa8e4ded8980d7c569e8e7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8829, + "startColumn": 48, + "charOffset": 298656, + "charLength": 4, + "snippet": { + "text": "2000" + } + }, + "contextRegion": { + "startLine": 8827, + "startColumn": 48, + "charOffset": 298605, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tif (amount == 0 || (!it.stackable && amount > 2000) || (it.stackable && amount > 64000)) {\n\t\tofferStatus << \"Failed to load amount \" << amount << \" for player \" << player->getName();\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8467b86ee2d0742b04f74b6783e0c44c59efa967521ce324bdc77cec25426a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "64000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8829, + "startColumn": 83, + "charOffset": 298691, + "charLength": 5, + "snippet": { + "text": "64000" + } + }, + "contextRegion": { + "startLine": 8827, + "startColumn": 83, + "charOffset": 298605, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tif (amount == 0 || (!it.stackable && amount > 2000) || (it.stackable && amount > 64000)) {\n\t\tofferStatus << \"Failed to load amount \" << amount << \" for player \" << player->getName();\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf0d7f125eec7bf9d6b812eaf97246c10c23052b38336669ddb49aaa2aeb021c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "3 adjacent parameters of 'playerCreateMarketOffer' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8850, + "startColumn": 36, + "charOffset": 299474, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 8848, + "startColumn": 36, + "charOffset": 299436, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerCreateMarketOffer(uint32_t playerId, uint8_t type, uint16_t itemId, uint16_t amount, uint64_t price, uint8_t tier, bool anonymous) {\n\t// Initialize variables\n\t// Before creating the offer we will compare it with the RETURN VALUE ERROR" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce4cae6fe53934b7394aa61bec173b6f78d68d322471397d445fbb3017d1c877" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8859, + "startColumn": 117, + "charOffset": 300097, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 8857, + "startColumn": 117, + "charOffset": 299827, + "charLength": 7, + "snippet": { + "text": "\t// Make sure everything is ok before the create market offer starts\n\tif (!checkCanInitCreateMarketOffer(player, type, it, amount, price, offerStatus)) {\n\t\tg_logger().error(\"{} - Player {} had an error on init offer on the market, error code: {}\", __FUNCTION__, player->getName(), offerStatus.str());\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c15154a2bc1b08367ccfc4310b7f721ad43bc6cd2074c027f390154bdd9d3f5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8859, + "startColumn": 140, + "charOffset": 300120, + "charLength": 3, + "snippet": { + "text": "str" + } + }, + "contextRegion": { + "startLine": 8857, + "startColumn": 140, + "charOffset": 299827, + "charLength": 3, + "snippet": { + "text": "\t// Make sure everything is ok before the create market offer starts\n\tif (!checkCanInitCreateMarketOffer(player, type, it, amount, price, offerStatus)) {\n\t\tg_logger().error(\"{} - Player {} had an error on init offer on the market, error code: {}\", __FUNCTION__, player->getName(), offerStatus.str());\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b54222305b96f7c241c37faf36ec88e0b4a2a31289166407014ae975b182e98f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8863, + "startColumn": 30, + "charOffset": 300171, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 8861, + "startColumn": 30, + "charOffset": 300138, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tuint64_t calcFee = (price / 100) * amount;\n\tuint64_t minFee = std::min(100000, calcFee);\n\tuint64_t fee = std::max(20, minFee);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fee477bf3fb763dd6a3374187675814ce0d2d4237987da8ae0b3d1989171bad6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8864, + "startColumn": 39, + "charOffset": 300224, + "charLength": 6, + "snippet": { + "text": "100000" + } + }, + "contextRegion": { + "startLine": 8862, + "startColumn": 39, + "charOffset": 300141, + "charLength": 6, + "snippet": { + "text": "\n\tuint64_t calcFee = (price / 100) * amount;\n\tuint64_t minFee = std::min(100000, calcFee);\n\tuint64_t fee = std::max(20, minFee);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c87af0caa5c85988ff5edc551eb631607716d5f47d6068aadcd47fd7fe9e6613" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8865, + "startColumn": 36, + "charOffset": 300277, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 8863, + "startColumn": 36, + "charOffset": 300142, + "charLength": 2, + "snippet": { + "text": "\tuint64_t calcFee = (price / 100) * amount;\n\tuint64_t minFee = std::min(100000, calcFee);\n\tuint64_t fee = std::max(20, minFee);\n\n\tif (type == MARKETACTION_SELL) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "461e793e82e9e91520fa1350a4c9e073c48835bb893900142ce429e25e6dc5f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8888, + "startColumn": 26, + "charOffset": 301049, + "charLength": 11, + "snippet": { + "text": "removeCoins" + } + }, + "contextRegion": { + "startLine": 8886, + "startColumn": 26, + "charOffset": 300959, + "charLength": 11, + "snippet": { + "text": "\n\t\t\t// Do not register a transaction for coins creating an offer\n\t\t\tplayer->getAccount()->removeCoins(enumToValue(CoinType::Transferable), static_cast(amount), \"\");\n\t\t} else {\n\t\t\tif (!removeOfferItems(player, depotLocker, it, amount, tier, offerStatus)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0fa918d8194886d405e151854ffae31be1bb640d6773195b42771030bf980dc8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8891, + "startColumn": 123, + "charOffset": 301347, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 8889, + "startColumn": 123, + "charOffset": 301134, + "charLength": 7, + "snippet": { + "text": "\t\t} else {\n\t\t\tif (!removeOfferItems(player, depotLocker, it, amount, tier, offerStatus)) {\n\t\t\t\tg_logger().error(\"[{}] failed to remove item with id {}, from player {}, errorcode: {}\", __FUNCTION__, it.id, player->getName(), offerStatus.str());\n\t\t\t\treturn;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b541f2ef8b29e4b45cd14fcc7fb64380e21d534ebc39770b60b0c46124f92c63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8891, + "startColumn": 146, + "charOffset": 301370, + "charLength": 3, + "snippet": { + "text": "str" + } + }, + "contextRegion": { + "startLine": 8889, + "startColumn": 146, + "charOffset": 301134, + "charLength": 3, + "snippet": { + "text": "\t\t} else {\n\t\t\tif (!removeOfferItems(player, depotLocker, it, amount, tier, offerStatus)) {\n\t\t\t\tg_logger().error(\"[{}] failed to remove item with id {}, from player {}, errorcode: {}\", __FUNCTION__, it.id, player->getName(), offerStatus.str());\n\t\t\t\treturn;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db5fd1f6d93b1f8b5d25e4821336a58d9937d495dea0620cef77434490757965" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8897, + "startColumn": 73, + "charOffset": 301518, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 8895, + "startColumn": 73, + "charOffset": 301399, + "charLength": 7, + "snippet": { + "text": "\n\t\tg_game().removeMoney(player, fee, 0, true);\n\t\tg_metrics().addCounter(\"balance_decrease\", fee, { { \"player\", player->getName() }, { \"context\", \"market_fee\" } });\n\t} else {\n\t\tuint64_t totalPrice = price * amount;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b4824ce3b486969d9c7712d87ae33aaa32bc322dbdacec1343841c83e20aab54" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8907, + "startColumn": 80, + "charOffset": 301918, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 8905, + "startColumn": 80, + "charOffset": 301785, + "charLength": 7, + "snippet": { + "text": "\n\t\tg_game().removeMoney(player, totalPrice, 0, true);\n\t\tg_metrics().addCounter(\"balance_decrease\", totalPrice, { { \"player\", player->getName() }, { \"context\", \"market_offer\" } });\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e3e84d1f7f3f86e1b7f97433eac7a0ff2eb4e28b15a4870e25be1e460de2fcc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8921, + "startColumn": 121, + "charOffset": 302752, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 8919, + "startColumn": 121, + "charOffset": 302505, + "charLength": 7, + "snippet": { + "text": "\t\t\tplayer->sendTextMessage(MESSAGE_MARKET, \"There was an error processing your offer, please contact the administrator.\");\n\t\t}\n\t\tg_logger().error(\"{} - Player {} had an error creating an offer on the market, error code: {}\", __FUNCTION__, player->getName(), offerStatus.str());\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4187b99606d4a7e70ea5018699f491d8e7aa30f0a259b6a7cd7df257cbfbe9a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8921, + "startColumn": 144, + "charOffset": 302775, + "charLength": 3, + "snippet": { + "text": "str" + } + }, + "contextRegion": { + "startLine": 8919, + "startColumn": 144, + "charOffset": 302505, + "charLength": 3, + "snippet": { + "text": "\t\t\tplayer->sendTextMessage(MESSAGE_MARKET, \"There was an error processing your offer, please contact the administrator.\");\n\t\t}\n\t\tg_logger().error(\"{} - Player {} had an error creating an offer on the market, error code: {}\", __FUNCTION__, player->getName(), offerStatus.str());\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2758a5e9e7d6212ef58ac2aa60e738d82bcffa528ce42b83dcf08fe1eb11c727" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8933, + "startColumn": 18, + "charOffset": 303266, + "charLength": 10, + "snippet": { + "text": "savePlayer" + } + }, + "contextRegion": { + "startLine": 8931, + "startColumn": 18, + "charOffset": 303173, + "charLength": 10, + "snippet": { + "text": "\t// Exhausted for create offert in the market\n\tplayer->updateUIExhausted();\n\tg_saveManager().savePlayer(player);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a04d327f1119ded2635437b0877b6c7c7d2f049774bb54805dcaa3690afe8d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'playerCancelMarketOffer' has cognitive complexity of 40 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8936, + "startColumn": 12, + "charOffset": 303300, + "charLength": 23, + "snippet": { + "text": "playerCancelMarketOffer" + } + }, + "contextRegion": { + "startLine": 8934, + "startColumn": 12, + "charOffset": 303286, + "charLength": 23, + "snippet": { + "text": "}\n\nvoid Game::playerCancelMarketOffer(uint32_t playerId, uint32_t timestamp, uint16_t counter) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || !player->getAccount()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc236d863295fa3c8818effe72f46431588fdd953f12a3ae94b9b88a5ce1167a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerCancelMarketOffer' of similar type ('uint32_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8936, + "startColumn": 36, + "charOffset": 303324, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 8934, + "startColumn": 36, + "charOffset": 303286, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerCancelMarketOffer(uint32_t playerId, uint32_t timestamp, uint16_t counter) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || !player->getAccount()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00d5dae3e7dbde71884d063b23b8210b8299b23baaed4b1105bca5fd94970f02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8938, + "startColumn": 6, + "charOffset": 303447, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8936, + "startColumn": 6, + "charOffset": 303289, + "charLength": 1, + "snippet": { + "text": "void Game::playerCancelMarketOffer(uint32_t playerId, uint32_t timestamp, uint16_t counter) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || !player->getAccount()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ecdd5c4317a2741f51bb67e18ff222791fa39b28f80ca5339702306ad26ce7b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8938, + "startColumn": 17, + "charOffset": 303458, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 8936, + "startColumn": 17, + "charOffset": 303289, + "charLength": 1, + "snippet": { + "text": "void Game::playerCancelMarketOffer(uint32_t playerId, uint32_t timestamp, uint16_t counter) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || !player->getAccount()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b045224ce1029ca9d24bfafad719c3d80d05f1461358b5b05a005844915917a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8946, + "startColumn": 28, + "charOffset": 303568, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 8944, + "startColumn": 28, + "charOffset": 303537, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tif (player->isUIExhausted(1000)) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_YOUAREEXHAUSTED);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4008375dd626cdb44b2be6a831e3b54969713cc05f758ef91d4913ff42b8cef6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8958, + "startColumn": 96, + "charOffset": 304011, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 8956, + "startColumn": 96, + "charOffset": 303796, + "charLength": 7, + "snippet": { + "text": "\tif (offer.type == MARKETACTION_BUY) {\n\t\tplayer->setBankBalance(player->getBankBalance() + offer.price * offer.amount);\n\t\tg_metrics().addCounter(\"balance_decrease\", offer.price * offer.amount, { { \"player\", player->getName() }, { \"context\", \"market_purchase\" } });\n\t\t// Send market window again for update stats\n\t\tplayer->sendMarketEnter(player->getLastDepotId());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "907e6e8a6bc1648a9b42ca6e54645d6dc881af0b2daa8832bf70cfcdd692d4dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8969, + "startColumn": 26, + "charOffset": 304380, + "charLength": 8, + "snippet": { + "text": "addCoins" + } + }, + "contextRegion": { + "startLine": 8967, + "startColumn": 26, + "charOffset": 304257, + "charLength": 8, + "snippet": { + "text": "\t\tif (it.id == ITEM_STORE_COIN) {\n\t\t\t// Do not register a transaction for coins upon cancellation\n\t\t\tplayer->getAccount()->addCoins(enumToValue(CoinType::Transferable), offer.amount, \"\");\n\t\t} else if (it.stackable) {\n\t\t\tuint16_t tmpAmount = offer.amount;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ac4f34dd4cdfedee98369f1441b428899527a8668543dcf67e8988b19f5ae10" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8972, + "startColumn": 4, + "charOffset": 304515, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 8970, + "startColumn": 4, + "charOffset": 304445, + "charLength": 5, + "snippet": { + "text": "\t\t} else if (it.stackable) {\n\t\t\tuint16_t tmpAmount = offer.amount;\n\t\t\twhile (tmpAmount > 0) {\n\t\t\t\tint32_t stackCount = std::min(it.stackSize, tmpAmount);\n\t\t\t\tstd::shared_ptr item = Item::CreateItem(it.id, stackCount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28d896d9f6a7981508601afcab0c8a546a508c82f15e66000d14403c3f1db62c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'tmpAmount' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8972, + "startColumn": 11, + "charOffset": 304522, + "charLength": 9, + "snippet": { + "text": "tmpAmount" + } + }, + "contextRegion": { + "startLine": 8970, + "startColumn": 11, + "charOffset": 304445, + "charLength": 9, + "snippet": { + "text": "\t\t} else if (it.stackable) {\n\t\t\tuint16_t tmpAmount = offer.amount;\n\t\t\twhile (tmpAmount > 0) {\n\t\t\t\tint32_t stackCount = std::min(it.stackSize, tmpAmount);\n\t\t\t\tstd::shared_ptr item = Item::CreateItem(it.id, stackCount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "700414e4b86b3313151edfd93f087aeaa9e0381f5769d4363ee251bf212294b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8974, + "startColumn": 58, + "charOffset": 304665, + "charLength": 10, + "snippet": { + "text": "stackCount" + } + }, + "contextRegion": { + "startLine": 8972, + "startColumn": 58, + "charOffset": 304512, + "charLength": 10, + "snippet": { + "text": "\t\t\twhile (tmpAmount > 0) {\n\t\t\t\tint32_t stackCount = std::min(it.stackSize, tmpAmount);\n\t\t\t\tstd::shared_ptr item = Item::CreateItem(it.id, stackCount);\n\t\t\t\tif (internalAddItem(player->getInbox(), item, INDEX_WHEREEVER, FLAG_NOLIMIT) != RETURNVALUE_NOERROR) {\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "695a217ee2abb49e4b1f54ff07db7412677e1bcf10056419509aa3c5dfa7cb08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'subType' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8986, + "startColumn": 12, + "charOffset": 304953, + "charLength": 7, + "snippet": { + "text": "subType" + } + }, + "contextRegion": { + "startLine": 8984, + "startColumn": 12, + "charOffset": 304926, + "charLength": 7, + "snippet": { + "text": "\t\t\t}\n\t\t} else {\n\t\t\tint32_t subType;\n\t\t\tif (it.charges != 0) {\n\t\t\t\tsubType = it.charges;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b92d825df05dcaf050124fa111e63ee764afddbb766f4e06ba90fbb27616733" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8988, + "startColumn": 15, + "charOffset": 305002, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 8986, + "startColumn": 15, + "charOffset": 304942, + "charLength": 2, + "snippet": { + "text": "\t\t\tint32_t subType;\n\t\t\tif (it.charges != 0) {\n\t\t\t\tsubType = it.charges;\n\t\t\t} else {\n\t\t\t\tsubType = -1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70616c369cd98c0140d82fb76a4a2eca0f1af58d143d0acf936b320b273d91c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8993, + "startColumn": 4, + "charOffset": 305053, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 8991, + "startColumn": 4, + "charOffset": 305044, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (uint16_t i = 0; i < offer.amount; ++i) {\n\t\t\t\tstd::shared_ptr item = Item::CreateItem(it.id, subType);\n\t\t\t\tif (internalAddItem(player->getInbox(), item, INDEX_WHEREEVER, FLAG_NOLIMIT) != RETURNVALUE_NOERROR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "884134a8d7e6e7c0992d0c2082ec4dfddbc75beaa6c1bc1f01654fb51a118c3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'offer' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8993, + "startColumn": 25, + "charOffset": 305074, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 8991, + "startColumn": 25, + "charOffset": 305044, + "charLength": 1, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (uint16_t i = 0; i < offer.amount; ++i) {\n\t\t\t\tstd::shared_ptr item = Item::CreateItem(it.id, subType);\n\t\t\t\tif (internalAddItem(player->getInbox(), item, INDEX_WHEREEVER, FLAG_NOLIMIT) != RETURNVALUE_NOERROR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62559ee1eb09dc17b5ee1ced606d20eb1a67feeb34ca967fe23bdc9b5c7a692b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 8994, + "startColumn": 58, + "charOffset": 305156, + "charLength": 7, + "snippet": { + "text": "subType" + } + }, + "contextRegion": { + "startLine": 8992, + "startColumn": 58, + "charOffset": 305049, + "charLength": 7, + "snippet": { + "text": "\n\t\t\tfor (uint16_t i = 0; i < offer.amount; ++i) {\n\t\t\t\tstd::shared_ptr item = Item::CreateItem(it.id, subType);\n\t\t\t\tif (internalAddItem(player->getInbox(), item, INDEX_WHEREEVER, FLAG_NOLIMIT) != RETURNVALUE_NOERROR) {\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb0e29543d7221ee0d7ba00c5573656c8571d57b965d9a2f87fa6d89f9753042" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9006, + "startColumn": 2, + "charOffset": 305398, + "charLength": 8, + "snippet": { + "text": "IOMarket" + } + }, + "contextRegion": { + "startLine": 9004, + "startColumn": 2, + "charOffset": 305393, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tIOMarket::moveOfferToHistory(offer.id, OFFERSTATE_CANCELLED);\n\n\toffer.amount = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78db6252fd8eea11bf6e278267cd729059c6dc22fcf3aafb3a33ea3faeb6eb41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9015, + "startColumn": 18, + "charOffset": 305795, + "charLength": 10, + "snippet": { + "text": "savePlayer" + } + }, + "contextRegion": { + "startLine": 9013, + "startColumn": 18, + "charOffset": 305703, + "charLength": 10, + "snippet": { + "text": "\t// Exhausted for cancel offer in the market\n\tplayer->updateUIExhausted();\n\tg_saveManager().savePlayer(player);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96b3ee2bd06a54bd558eb1f902482fc044f11d43900e47027e3255433cfc496e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'playerAcceptMarketOffer' has cognitive complexity of 121 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9018, + "startColumn": 12, + "charOffset": 305829, + "charLength": 23, + "snippet": { + "text": "playerAcceptMarketOffer" + } + }, + "contextRegion": { + "startLine": 9016, + "startColumn": 12, + "charOffset": 305815, + "charLength": 23, + "snippet": { + "text": "}\n\nvoid Game::playerAcceptMarketOffer(uint32_t playerId, uint32_t timestamp, uint16_t counter, uint16_t amount) {\n\tstd::ostringstream offerStatus;\n\tstd::shared_ptr player = getPlayerByID(playerId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "054b58f992e6554cd1b0bb012745c2556b1a92669c67f060abfdd9ed3fed1c39" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerAcceptMarketOffer' of similar type ('uint32_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9018, + "startColumn": 36, + "charOffset": 305853, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 9016, + "startColumn": 36, + "charOffset": 305815, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerAcceptMarketOffer(uint32_t playerId, uint32_t timestamp, uint16_t counter, uint16_t amount) {\n\tstd::ostringstream offerStatus;\n\tstd::shared_ptr player = getPlayerByID(playerId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ba214e7b2ac63ca8a1a1df8f4e289bfa7738876a89e7cc668deb14af6275709" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerAcceptMarketOffer' of similar type ('uint16_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9018, + "startColumn": 75, + "charOffset": 305892, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 9016, + "startColumn": 75, + "charOffset": 305815, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerAcceptMarketOffer(uint32_t playerId, uint32_t timestamp, uint16_t counter, uint16_t amount) {\n\tstd::ostringstream offerStatus;\n\tstd::shared_ptr player = getPlayerByID(playerId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5edd2c170528e88cf82dfb30b69da29610ffd4ecba0240ca7fcf64fab2bd3878" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9021, + "startColumn": 6, + "charOffset": 306026, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9019, + "startColumn": 6, + "charOffset": 305929, + "charLength": 1, + "snippet": { + "text": "\tstd::ostringstream offerStatus;\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || !player->getAccount()) {\n\t\tofferStatus << \"Failed to load player\";\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97363427c8d2ab74e9e147cb46b0c4a390ba119c57160c11c456b4980eca9483" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9021, + "startColumn": 17, + "charOffset": 306037, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9019, + "startColumn": 17, + "charOffset": 305929, + "charLength": 1, + "snippet": { + "text": "\tstd::ostringstream offerStatus;\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || !player->getAccount()) {\n\t\tofferStatus << \"Failed to load player\";\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f90768d6d1e0aaa3c32c2a9a9599fddb9ade4160a7490c6baad669b547023a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9031, + "startColumn": 28, + "charOffset": 306231, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 9029, + "startColumn": 28, + "charOffset": 306200, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tif (player->isUIExhausted(1000)) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_YOUAREEXHAUSTED);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3625a027c0a3a2b4f6f0d28a3f5bb9af610cd4b81e287f3557b693d13401d04f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9048, + "startColumn": 48, + "charOffset": 306636, + "charLength": 4, + "snippet": { + "text": "2000" + } + }, + "contextRegion": { + "startLine": 9046, + "startColumn": 48, + "charOffset": 306585, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tif (amount == 0 || (!it.stackable && amount > 2000) || (it.stackable && amount > 64000) || amount > offer.amount) {\n\t\tofferStatus << \"Invalid offer amount \" << amount << \" for player \" << player->getName();\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9420f1c04eedf1ef47a7d32cc16817359c797b789e1f04340868d0cd40b63295" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "64000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9048, + "startColumn": 83, + "charOffset": 306671, + "charLength": 5, + "snippet": { + "text": "64000" + } + }, + "contextRegion": { + "startLine": 9046, + "startColumn": 83, + "charOffset": 306585, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tif (amount == 0 || (!it.stackable && amount > 2000) || (it.stackable && amount > 64000) || amount > offer.amount) {\n\t\tofferStatus << \"Invalid offer amount \" << amount << \" for player \" << player->getName();\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cdb17f6ee2b8e8391b25e3d6b4c61d0700f12f68af36e2440fcf8ca4bd68827f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9057, + "startColumn": 2, + "charOffset": 307014, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 9055, + "startColumn": 2, + "charOffset": 306857, + "charLength": 2, + "snippet": { + "text": "\t// The player has an offer to by something and someone is going to sell to item type\n\t// so the market action is 'buy' as who created the offer is buying.\n\tif (offer.type == MARKETACTION_BUY) {\n\t\tstd::shared_ptr depotLocker = player->getDepotLocker(player->getLastDepotId());\n\t\tif (depotLocker == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5154199fecf91368b9d365c09d991f07d1212867dec6ae1efe73a3b918d9aacc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9065, + "startColumn": 7, + "charOffset": 307325, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9063, + "startColumn": 7, + "charOffset": 307239, + "charLength": 1, + "snippet": { + "text": "\n\t\tstd::shared_ptr buyerPlayer = getPlayerByGUID(offer.playerId, true);\n\t\tif (!buyerPlayer) {\n\t\t\tofferStatus << \"Failed to load buyer player \" << player->getName();\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "317bdb3b5eedc8f76affe086f992c53ade4b34314a556f492e18a4323745d10f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9070, + "startColumn": 7, + "charOffset": 307434, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9068, + "startColumn": 7, + "charOffset": 307423, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif (!buyerPlayer->getAccount()) {\n\t\t\tplayer->sendTextMessage(MESSAGE_MARKET, \"Cannot accept offer.\");\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65dfcae7265d8672b7e2eb222d61260b22a43c065988aa14523101d8172070a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9093, + "startColumn": 26, + "charOffset": 308160, + "charLength": 11, + "snippet": { + "text": "removeCoins" + } + }, + "contextRegion": { + "startLine": 9091, + "startColumn": 26, + "charOffset": 308129, + "charLength": 11, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tplayer->getAccount()->removeCoins(\n\t\t\t\tenumToValue(CoinType::Transferable),\n\t\t\t\tamount," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44fc0de6e0a2d6cc12c205ade256ce928ef722fc87ebdea261de005cae6e78a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9100, + "startColumn": 123, + "charOffset": 308472, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 9098, + "startColumn": 123, + "charOffset": 308253, + "charLength": 7, + "snippet": { + "text": "\t\t} else {\n\t\t\tif (!removeOfferItems(player, depotLocker, it, amount, offer.tier, offerStatus)) {\n\t\t\t\tg_logger().error(\"[{}] failed to remove item with id {}, from player {}, errorcode: {}\", __FUNCTION__, it.id, player->getName(), offerStatus.str());\n\t\t\t\treturn;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67fdae56f262256f636670b6eb89a96a8887a7fc3526b2d4508ceb4a3b3d980f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9100, + "startColumn": 146, + "charOffset": 308495, + "charLength": 3, + "snippet": { + "text": "str" + } + }, + "contextRegion": { + "startLine": 9098, + "startColumn": 146, + "charOffset": 308253, + "charLength": 3, + "snippet": { + "text": "\t\t} else {\n\t\t\tif (!removeOfferItems(player, depotLocker, it, amount, offer.tier, offerStatus)) {\n\t\t\t\tg_logger().error(\"[{}] failed to remove item with id {}, from player {}, errorcode: {}\", __FUNCTION__, it.id, player->getName(), offerStatus.str());\n\t\t\t\treturn;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a02c2005115516baa85d988a34671e231881fc799a43a90a6c233a0727c9d0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9113, + "startColumn": 122, + "charOffset": 309192, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 9111, + "startColumn": 122, + "charOffset": 308942, + "charLength": 7, + "snippet": { + "text": "\t\t\t\tplayer->sendTextMessage(MESSAGE_MARKET, \"There was an error processing your offer, please contact the administrator.\");\n\t\t\t}\n\t\t\tg_logger().error(\"{} - Player {} had an error creating an offer on the market, error code: {}\", __FUNCTION__, player->getName(), offerStatus.str());\n\t\t\tplayer->sendMarketEnter(player->getLastDepotId());\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a3a1405697e55dd950ba3c5b86d068ffac2e3cb1fd50d70476d79183b6c9dc9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9113, + "startColumn": 145, + "charOffset": 309215, + "charLength": 3, + "snippet": { + "text": "str" + } + }, + "contextRegion": { + "startLine": 9111, + "startColumn": 145, + "charOffset": 308942, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tplayer->sendTextMessage(MESSAGE_MARKET, \"There was an error processing your offer, please contact the administrator.\");\n\t\t\t}\n\t\t\tg_logger().error(\"{} - Player {} had an error creating an offer on the market, error code: {}\", __FUNCTION__, player->getName(), offerStatus.str());\n\t\t\tplayer->sendMarketEnter(player->getLastDepotId());\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf2629d04695c490ba079f3c1870c548441ccf172c44b6049412f988537197ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9119, + "startColumn": 80, + "charOffset": 309437, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 9117, + "startColumn": 80, + "charOffset": 309292, + "charLength": 7, + "snippet": { + "text": "\n\t\tplayer->setBankBalance(player->getBankBalance() + totalPrice);\n\t\tg_metrics().addCounter(\"balance_increase\", totalPrice, { { \"player\", player->getName() }, { \"context\", \"market_sale\" } });\n\n\t\tif (it.id == ITEM_STORE_COIN) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9a88f78386bf186d9d5cad7dab2066dfb3d1f0c3bf21534a630b95f897630f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9122, + "startColumn": 31, + "charOffset": 309548, + "charLength": 8, + "snippet": { + "text": "addCoins" + } + }, + "contextRegion": { + "startLine": 9120, + "startColumn": 31, + "charOffset": 309483, + "charLength": 8, + "snippet": { + "text": "\n\t\tif (it.id == ITEM_STORE_COIN) {\n\t\t\tbuyerPlayer->getAccount()->addCoins(enumToValue(CoinType::Transferable), amount, \"Purchased on Market\");\n\t\t} else if (it.stackable) {\n\t\t\tuint16_t tmpAmount = amount;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bead6464201b7f93ba87af69263d469f6322b791511bd3edf7f26a6809ca9c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9125, + "startColumn": 4, + "charOffset": 309690, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 9123, + "startColumn": 4, + "charOffset": 309626, + "charLength": 5, + "snippet": { + "text": "\t\t} else if (it.stackable) {\n\t\t\tuint16_t tmpAmount = amount;\n\t\t\twhile (tmpAmount > 0) {\n\t\t\t\tuint16_t stackCount = std::min(it.stackSize, tmpAmount);\n\t\t\t\tstd::shared_ptr item = Item::CreateItem(it.id, stackCount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c59306ebd901d46756e929c40150b2ee1defedea53521cd029ad90c5a6a90866" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'tmpAmount' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9125, + "startColumn": 11, + "charOffset": 309697, + "charLength": 9, + "snippet": { + "text": "tmpAmount" + } + }, + "contextRegion": { + "startLine": 9123, + "startColumn": 11, + "charOffset": 309626, + "charLength": 9, + "snippet": { + "text": "\t\t} else if (it.stackable) {\n\t\t\tuint16_t tmpAmount = amount;\n\t\t\twhile (tmpAmount > 0) {\n\t\t\t\tuint16_t stackCount = std::min(it.stackSize, tmpAmount);\n\t\t\t\tstd::shared_ptr item = Item::CreateItem(it.id, stackCount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cace3fe2a4b4284a47e2038e952b529602b4191a1bf8b02ca5a45922cf117fb9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'subType' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9141, + "startColumn": 12, + "charOffset": 310248, + "charLength": 7, + "snippet": { + "text": "subType" + } + }, + "contextRegion": { + "startLine": 9139, + "startColumn": 12, + "charOffset": 310221, + "charLength": 7, + "snippet": { + "text": "\t\t\t}\n\t\t} else {\n\t\t\tint32_t subType;\n\t\t\tif (it.charges != 0) {\n\t\t\t\tsubType = it.charges;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a586ad606ec91c9b5a53e75b26a62fc86c6d80fb2c0be26196ecd832756170ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9143, + "startColumn": 15, + "charOffset": 310297, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 9141, + "startColumn": 15, + "charOffset": 310237, + "charLength": 2, + "snippet": { + "text": "\t\t\tint32_t subType;\n\t\t\tif (it.charges != 0) {\n\t\t\t\tsubType = it.charges;\n\t\t\t} else {\n\t\t\t\tsubType = -1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ab0f5d5a02cecc4142a2587e5d0fe3161a3601abb82ff82f7dc2292765048fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9148, + "startColumn": 4, + "charOffset": 310348, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 9146, + "startColumn": 4, + "charOffset": 310339, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (uint16_t i = 0; i < amount; ++i) {\n\t\t\t\tstd::shared_ptr item = Item::CreateItem(it.id, subType);\n\t\t\t\tif (internalAddItem(buyerPlayer->getInbox(), item, INDEX_WHEREEVER, FLAG_NOLIMIT) != RETURNVALUE_NOERROR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "879ab5b2dd0d28e2c5d093299f534d6a3d20ee17349102bcc320b5b10b9bd480" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9149, + "startColumn": 58, + "charOffset": 310445, + "charLength": 7, + "snippet": { + "text": "subType" + } + }, + "contextRegion": { + "startLine": 9147, + "startColumn": 58, + "charOffset": 310344, + "charLength": 7, + "snippet": { + "text": "\n\t\t\tfor (uint16_t i = 0; i < amount; ++i) {\n\t\t\t\tstd::shared_ptr item = Item::CreateItem(it.id, subType);\n\t\t\t\tif (internalAddItem(buyerPlayer->getInbox(), item, INDEX_WHEREEVER, FLAG_NOLIMIT) != RETURNVALUE_NOERROR) {\n\t\t\t\t\tofferStatus << \"Failed to add player inbox item for buy offer for player \" << player->getName();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5146eff9e1ddada8c130355ea1ace6350b9516931d9b2b43e991531ec24b189a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9163, + "startColumn": 20, + "charOffset": 310844, + "charLength": 10, + "snippet": { + "text": "savePlayer" + } + }, + "contextRegion": { + "startLine": 9161, + "startColumn": 20, + "charOffset": 310790, + "charLength": 10, + "snippet": { + "text": "\n\t\tif (buyerPlayer->isOffline()) {\n\t\t\tg_saveManager().savePlayer(buyerPlayer);\n\t\t}\n\t} else if (offer.type == MARKETACTION_SELL) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da454f9d7c83f9a0c80009a1d646a0dbd68f540f94f47360f23c6d87c88e7cb7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9167, + "startColumn": 7, + "charOffset": 311006, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9165, + "startColumn": 7, + "charOffset": 310873, + "charLength": 1, + "snippet": { + "text": "\t} else if (offer.type == MARKETACTION_SELL) {\n\t\tstd::shared_ptr sellerPlayer = getPlayerByGUID(offer.playerId, true);\n\t\tif (!sellerPlayer) {\n\t\t\tofferStatus << \"Failed to load seller player\";\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a0f8eb43134cd6899d6dd59918665a98c75c45213285405ff134ea978e4c434" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9190, + "startColumn": 80, + "charOffset": 311765, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 9188, + "startColumn": 80, + "charOffset": 311635, + "charLength": 7, + "snippet": { + "text": "\t\t\tg_game().removeMoney(player, remainsPrice);\n\t\t}\n\t\tg_metrics().addCounter(\"balance_decrease\", totalPrice, { { \"player\", player->getName() }, { \"context\", \"market_purchase\" } });\n\n\t\tif (it.id == ITEM_STORE_COIN) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ef6ed419c284d611942393f64ee1ed22a9d3a87efc6f37595d34f8e9918cf8f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9193, + "startColumn": 26, + "charOffset": 311875, + "charLength": 8, + "snippet": { + "text": "addCoins" + } + }, + "contextRegion": { + "startLine": 9191, + "startColumn": 26, + "charOffset": 311815, + "charLength": 8, + "snippet": { + "text": "\n\t\tif (it.id == ITEM_STORE_COIN) {\n\t\t\tplayer->getAccount()->addCoins(enumToValue(CoinType::Transferable), amount, \"Purchased on Market\");\n\t\t} else if (it.stackable) {\n\t\t\tuint16_t tmpAmount = amount;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc2f723901f0e9b960b2633c3fa12784e22b934f25affe797dac7e802e36b3e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9196, + "startColumn": 4, + "charOffset": 312017, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 9194, + "startColumn": 4, + "charOffset": 311953, + "charLength": 5, + "snippet": { + "text": "\t\t} else if (it.stackable) {\n\t\t\tuint16_t tmpAmount = amount;\n\t\t\twhile (tmpAmount > 0) {\n\t\t\t\tuint16_t stackCount = std::min(it.stackSize, tmpAmount);\n\t\t\t\tstd::shared_ptr item = Item::CreateItem(it.id, stackCount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "139ea37f266f9a4c3cce168a011fcdf50f1274ef7653d7945d4aa52140da7846" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'tmpAmount' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9196, + "startColumn": 11, + "charOffset": 312024, + "charLength": 9, + "snippet": { + "text": "tmpAmount" + } + }, + "contextRegion": { + "startLine": 9194, + "startColumn": 11, + "charOffset": 311953, + "charLength": 9, + "snippet": { + "text": "\t\t} else if (it.stackable) {\n\t\t\tuint16_t tmpAmount = amount;\n\t\t\twhile (tmpAmount > 0) {\n\t\t\t\tuint16_t stackCount = std::min(it.stackSize, tmpAmount);\n\t\t\t\tstd::shared_ptr item = Item::CreateItem(it.id, stackCount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b31f6ded18102d56e85d6101d4227d54534752230baf310b97031fcf749d8399" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'subType' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9218, + "startColumn": 12, + "charOffset": 312751, + "charLength": 7, + "snippet": { + "text": "subType" + } + }, + "contextRegion": { + "startLine": 9216, + "startColumn": 12, + "charOffset": 312724, + "charLength": 7, + "snippet": { + "text": "\t\t\t}\n\t\t} else {\n\t\t\tint32_t subType;\n\t\t\tif (it.charges != 0) {\n\t\t\t\tsubType = it.charges;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3d3a5d416fb916c9c58efa19aed5254f6b065186396fb094bf93ddc240dd6e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9220, + "startColumn": 15, + "charOffset": 312800, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 9218, + "startColumn": 15, + "charOffset": 312740, + "charLength": 2, + "snippet": { + "text": "\t\t\tint32_t subType;\n\t\t\tif (it.charges != 0) {\n\t\t\t\tsubType = it.charges;\n\t\t\t} else {\n\t\t\t\tsubType = -1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c886438f7ded9c00b885454285a378f01d1745d4602b7160fc10117f661b5f3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9225, + "startColumn": 4, + "charOffset": 312851, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 9223, + "startColumn": 4, + "charOffset": 312842, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (uint16_t i = 0; i < amount; ++i) {\n\t\t\t\tstd::shared_ptr item = Item::CreateItem(it.id, subType);\n\t\t\t\tif (" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51942da22bfd5cc5fd471b6e3350b0d3e18b52f0d363b7578af4aa978f83d525" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9226, + "startColumn": 58, + "charOffset": 312948, + "charLength": 7, + "snippet": { + "text": "subType" + } + }, + "contextRegion": { + "startLine": 9224, + "startColumn": 58, + "charOffset": 312847, + "charLength": 7, + "snippet": { + "text": "\n\t\t\tfor (uint16_t i = 0; i < amount; ++i) {\n\t\t\t\tstd::shared_ptr item = Item::CreateItem(it.id, subType);\n\t\t\t\tif (\n\t\t\t\t\t// Init-statement" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0aafc2899fd2692c44179c20f858dccb19b09dcd2ed916abda35c5741e9ffdd6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9245, + "startColumn": 86, + "charOffset": 313518, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 9243, + "startColumn": 86, + "charOffset": 313355, + "charLength": 7, + "snippet": { + "text": "\n\t\tsellerPlayer->setBankBalance(sellerPlayer->getBankBalance() + totalPrice);\n\t\tg_metrics().addCounter(\"balance_increase\", totalPrice, { { \"player\", sellerPlayer->getName() }, { \"context\", \"market_sale\" } });\n\t\tif (it.id == ITEM_STORE_COIN) {\n\t\t\tconst auto &tranferable = enumToValue(CoinType::Transferable);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20e6966c364132132c3cf1c8f980775320069d481a8c118546b3ded310da7f3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9257, + "startColumn": 20, + "charOffset": 313967, + "charLength": 10, + "snippet": { + "text": "savePlayer" + } + }, + "contextRegion": { + "startLine": 9255, + "startColumn": 20, + "charOffset": 313912, + "charLength": 10, + "snippet": { + "text": "\n\t\tif (sellerPlayer->isOffline()) {\n\t\t\tg_saveManager().savePlayer(sellerPlayer);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "155bada666f0d3066ab5a31d52366c00d3b5f4bd8defae1bbb4575d71ad8ba03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9266, + "startColumn": 122, + "charOffset": 314404, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 9264, + "startColumn": 122, + "charOffset": 314126, + "charLength": 7, + "snippet": { + "text": "\tif (!offerStatus.str().empty()) {\n\t\tplayer->sendTextMessage(MESSAGE_MARKET, \"There was an error processing your offer, please contact the administrator.\");\n\t\tg_logger().error(\"{} - Player {} had an error accepting an offer on the market, error code: {}\", __FUNCTION__, player->getName(), offerStatus.str());\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f058feafa351e512603cf5776f58d137e25170453574e19ac4590ef3381415fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9266, + "startColumn": 145, + "charOffset": 314427, + "charLength": 3, + "snippet": { + "text": "str" + } + }, + "contextRegion": { + "startLine": 9264, + "startColumn": 145, + "charOffset": 314126, + "charLength": 3, + "snippet": { + "text": "\tif (!offerStatus.str().empty()) {\n\t\tplayer->sendTextMessage(MESSAGE_MARKET, \"There was an error processing your offer, please contact the administrator.\");\n\t\tg_logger().error(\"{} - Player {} had an error accepting an offer on the market, error code: {}\", __FUNCTION__, player->getName(), offerStatus.str());\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3278550e31cb158695b53b2ac9c48a5cdfd08f7224a7689fa069477ee8f23da0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9272, + "startColumn": 153, + "charOffset": 314705, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 9270, + "startColumn": 153, + "charOffset": 314449, + "charLength": 4, + "snippet": { + "text": "\tconst int32_t marketOfferDuration = g_configManager().getNumber(MARKET_OFFER_DURATION, __FUNCTION__);\n\n\tIOMarket::appendHistory(player->getGUID(), (offer.type == MARKETACTION_BUY ? MARKETACTION_SELL : MARKETACTION_BUY), offer.itemId, amount, offer.price, time(nullptr), offer.tier, OFFERSTATE_ACCEPTEDEX);\n\n\tIOMarket::appendHistory(offer.playerId, offer.type, offer.itemId, amount, offer.price, time(nullptr), offer.tier, OFFERSTATE_ACCEPTED);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9e9d623b8bc79db7f09ffa92d073431c6d1268b113f39194983c4708ff35c6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9274, + "startColumn": 89, + "charOffset": 314845, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 9272, + "startColumn": 89, + "charOffset": 314553, + "charLength": 4, + "snippet": { + "text": "\tIOMarket::appendHistory(player->getGUID(), (offer.type == MARKETACTION_BUY ? MARKETACTION_SELL : MARKETACTION_BUY), offer.itemId, amount, offer.price, time(nullptr), offer.tier, OFFERSTATE_ACCEPTEDEX);\n\n\tIOMarket::appendHistory(offer.playerId, offer.type, offer.itemId, amount, offer.price, time(nullptr), offer.tier, OFFERSTATE_ACCEPTED);\n\n\toffer.amount -= amount;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90d77abfc602a691967fb34a3d2b39d1de1b0d690f3160a70e610e49fa565434" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9288, + "startColumn": 18, + "charOffset": 315211, + "charLength": 10, + "snippet": { + "text": "savePlayer" + } + }, + "contextRegion": { + "startLine": 9286, + "startColumn": 18, + "charOffset": 315119, + "charLength": 10, + "snippet": { + "text": "\t// Exhausted for accept offer in the market\n\tplayer->updateUIExhausted();\n\tg_saveManager().savePlayer(player);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b66dc0f7aca31cc7ea1c351762de734b9040f618e9df1a8a149a50a5b7108a2d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'parsePlayerExtendedOpcode' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9291, + "startColumn": 38, + "charOffset": 315271, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 9289, + "startColumn": 38, + "charOffset": 315231, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::parsePlayerExtendedOpcode(uint32_t playerId, uint8_t opcode, const std::string &buffer) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f4a74d0920d3f634a630fa81392898eb6f4d4f426d36b009a7d1f03a1107db7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9293, + "startColumn": 6, + "charOffset": 315399, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9291, + "startColumn": 6, + "charOffset": 315234, + "charLength": 1, + "snippet": { + "text": "void Game::parsePlayerExtendedOpcode(uint32_t playerId, uint8_t opcode, const std::string &buffer) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c337639a4b4b7db145955e3f268d26c52e7215373fca3c0143ca808983248163" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9304, + "startColumn": 6, + "charOffset": 315774, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9302, + "startColumn": 6, + "charOffset": 315589, + "charLength": 1, + "snippet": { + "text": "void Game::forceRemoveCondition(uint32_t creatureId, ConditionType_t conditionType, ConditionId_t conditionId) {\n\tstd::shared_ptr creature = getCreatureByID(creatureId);\n\tif (!creature) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68671d98d659b78f936d91c6c8c5b50b3f622602dc6673a04cd8af2b0ef1c392" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9311, + "startColumn": 62, + "charOffset": 315927, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 9309, + "startColumn": 62, + "charOffset": 315863, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::sendOfflineTrainingDialog(std::shared_ptr player) {\n\tif (!player) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7f8b3d34dee05bc761f7f0e2f9f78aab78a71cb6703a1d25cb963087f4514f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9312, + "startColumn": 6, + "charOffset": 315942, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9310, + "startColumn": 6, + "charOffset": 315865, + "charLength": 1, + "snippet": { + "text": "\nvoid Game::sendOfflineTrainingDialog(std::shared_ptr player) {\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c2c09e265145a5a5072322b39436f545d86c486e3f6dd3b201887107b452457" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "4 adjacent parameters of 'playerAnswerModalWindow' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9321, + "startColumn": 36, + "charOffset": 316120, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 9319, + "startColumn": 36, + "charOffset": 316082, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerAnswerModalWindow(uint32_t playerId, uint32_t modalWindowId, uint8_t button, uint8_t choice) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "daf1411865ea998f48a5b11e2d1130342be326ada97c4a493d473f78308d9090" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9323, + "startColumn": 6, + "charOffset": 316261, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9321, + "startColumn": 6, + "charOffset": 316085, + "charLength": 1, + "snippet": { + "text": "void Game::playerAnswerModalWindow(uint32_t playerId, uint32_t modalWindowId, uint8_t button, uint8_t choice) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7667c4b9aab1e055fa864e66249dc4eef3c4e136e6928ace062ab87ebb56953d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9356, + "startColumn": 34, + "charOffset": 317366, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 9354, + "startColumn": 34, + "charOffset": 317140, + "charLength": 15, + "snippet": { + "text": "\nvoid Game::playerForgeFuseItems(uint32_t playerId, ForgeAction_t actionType, uint16_t firstItemId, uint8_t tier, uint16_t secondItemId, bool usedCore, bool reduceTierLoss, bool convergence) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3d13424dfa4dca7f07b7a32de1306b10934a8fdee26b79215fc65437fb5f0fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9358, + "startColumn": 6, + "charOffset": 317448, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9356, + "startColumn": 6, + "charOffset": 317333, + "charLength": 1, + "snippet": { + "text": "\tmetrics::method_latency measure(__METHOD_NAME__);\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35893b65f9012e0ea35568764fee372dcd5f8edbcf0f377ac233b3183d0ee832" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9373, + "startColumn": 53, + "charOffset": 317987, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 9371, + "startColumn": 53, + "charOffset": 317786, + "charLength": 3, + "snippet": { + "text": "\tauto coreSuccess = usedCore ? g_configManager().getNumber(FORGE_BONUS_SUCCESS_RATE, __FUNCTION__) : 0;\n\tauto finalRate = baseSuccess + coreSuccess;\n\tauto roll = static_cast(uniform_random(1, 100)) <= finalRate;\n\n\tbool success = roll ? true : false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a55ea9ccbd46dba282c9b886e21ba36483b2d5c8f4186e0c0ce4ba8c3884eaf4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in ternary expression result" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9375, + "startColumn": 24, + "charOffset": 318031, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 9373, + "startColumn": 24, + "charOffset": 317935, + "charLength": 4, + "snippet": { + "text": "\tauto roll = static_cast(uniform_random(1, 100)) <= finalRate;\n\n\tbool success = roll ? true : false;\n\n\tauto chance = uniform_random(0, 10000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7e05763c2341a09f935df49a26451cc436ffd11aed2a3e0ee104a675f377d7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Expression can be simplified" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9375, + "startColumn": 29, + "charOffset": 318036, + "charLength": 1, + "snippet": { + "text": ":" + } + }, + "contextRegion": { + "startLine": 9373, + "startColumn": 29, + "charOffset": 317935, + "charLength": 1, + "snippet": { + "text": "\tauto roll = static_cast(uniform_random(1, 100)) <= finalRate;\n\n\tbool success = roll ? true : false;\n\n\tauto chance = uniform_random(0, 10000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92c20e93432991504f25a9916d70286e279cbd9867db110d51e6b2687100d3e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9377, + "startColumn": 34, + "charOffset": 318079, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 9375, + "startColumn": 34, + "charOffset": 318008, + "charLength": 5, + "snippet": { + "text": "\tbool success = roll ? true : false;\n\n\tauto chance = uniform_random(0, 10000);\n\tuint8_t bonus = convergence ? 0 : forgeBonus(chance);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d2903fa62df1d88fa030f1dcd0c53d7690467549d4c2ce6d2f054e08cc3dbed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9378, + "startColumn": 18, + "charOffset": 318104, + "charLength": 11, + "snippet": { + "text": "convergence" + } + }, + "contextRegion": { + "startLine": 9376, + "startColumn": 18, + "charOffset": 318045, + "charLength": 11, + "snippet": { + "text": "\n\tauto chance = uniform_random(0, 10000);\n\tuint8_t bonus = convergence ? 0 : forgeBonus(chance);\n\n\tplayer->forgeFuseItems(actionType, firstItemId, tier, secondItemId, success, reduceTierLoss, convergence, bonus, coreCount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a30e61679a78006993552738dcd9b9aa92308fb85d835259609ba66181cc570b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9385, + "startColumn": 6, + "charOffset": 318500, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9383, + "startColumn": 6, + "charOffset": 318272, + "charLength": 1, + "snippet": { + "text": "void Game::playerForgeTransferItemTier(uint32_t playerId, ForgeAction_t actionType, uint16_t donorItemId, uint8_t tier, uint16_t receiveItemId, bool convergence) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "778780994d56808a95497fec9241661f780c7e63c92f61267146e497819d39a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9400, + "startColumn": 6, + "charOffset": 318905, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9398, + "startColumn": 6, + "charOffset": 318753, + "charLength": 1, + "snippet": { + "text": "void Game::playerForgeResourceConversion(uint32_t playerId, ForgeAction_t actionType) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "676184696726a8d518a76affe22571af0c6cee901ada473cfaf530cee78492d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerBrowseForgeHistory' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9413, + "startColumn": 37, + "charOffset": 319149, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 9411, + "startColumn": 37, + "charOffset": 319110, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerBrowseForgeHistory(uint32_t playerId, uint8_t page) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4921bcbc5802c8fe8bbbc76cd5b30c0f40341b584337e43ab9eb9a6b15e0a470" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9415, + "startColumn": 6, + "charOffset": 319248, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9413, + "startColumn": 6, + "charOffset": 319113, + "charLength": 1, + "snippet": { + "text": "void Game::playerBrowseForgeHistory(uint32_t playerId, uint8_t page) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9939727e701fea421d8d3a6a60e5936bddf386d58b34d14ecceaae20f7c96546" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerBosstiarySlot' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9428, + "startColumn": 32, + "charOffset": 319470, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 9426, + "startColumn": 32, + "charOffset": 319436, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerBosstiarySlot(uint32_t playerId, uint8_t slotId, uint32_t selectedBossId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b239140453ed8f45f978cff89d8c2bc3259d57558821173a6feebc6b4beed1ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9430, + "startColumn": 6, + "charOffset": 319596, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9428, + "startColumn": 6, + "charOffset": 319439, + "charLength": 1, + "snippet": { + "text": "void Game::playerBosstiarySlot(uint32_t playerId, uint8_t slotId, uint32_t selectedBossId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55301a0e77a6c8d1be561adce21515a21bcb42711d367017beda280f0fe80252" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9448, + "startColumn": 81, + "charOffset": 320194, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 9446, + "startColumn": 81, + "charOffset": 319986, + "charLength": 7, + "snippet": { + "text": "\t\tuint32_t removePrice = g_ioBosstiary().calculteRemoveBoss(removeTimes);\n\t\tg_game().removeMoney(player, removePrice, 0, true);\n\t\tg_metrics().addCounter(\"balance_decrease\", removePrice, { { \"player\", player->getName() }, { \"context\", \"bosstiary_remove\" } });\n\t\tplayer->addRemoveTime();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e9342560f59e13e0737ac09f674efae8b2cfa305d738e077098ae0596b55566" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'playerSetMonsterPodium' has cognitive complexity of 28 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9455, + "startColumn": 12, + "charOffset": 320338, + "charLength": 22, + "snippet": { + "text": "playerSetMonsterPodium" + } + }, + "contextRegion": { + "startLine": 9453, + "startColumn": 12, + "charOffset": 320324, + "charLength": 22, + "snippet": { + "text": "}\n\nvoid Game::playerSetMonsterPodium(uint32_t playerId, uint32_t monsterRaceId, const Position &pos, uint8_t stackPos, const uint16_t itemId, uint8_t direction, const std::pair &podiumAndMonsterVisible) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || pos.x == 0xFFFF) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64083f4b11f0f15791678f37fe25312ac3812e8a1fba74c55b994484f114d11d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerSetMonsterPodium' of similar type ('uint32_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9455, + "startColumn": 35, + "charOffset": 320361, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 9453, + "startColumn": 35, + "charOffset": 320324, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::playerSetMonsterPodium(uint32_t playerId, uint32_t monsterRaceId, const Position &pos, uint8_t stackPos, const uint16_t itemId, uint8_t direction, const std::pair &podiumAndMonsterVisible) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || pos.x == 0xFFFF) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2350d9fc723f60dea8ffe5fbd57a0cdcd9436f93f587959bb123c2b1e6681384" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9457, + "startColumn": 6, + "charOffset": 320611, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9455, + "startColumn": 6, + "charOffset": 320327, + "charLength": 1, + "snippet": { + "text": "void Game::playerSetMonsterPodium(uint32_t playerId, uint32_t monsterRaceId, const Position &pos, uint8_t stackPos, const uint16_t itemId, uint8_t direction, const std::pair &podiumAndMonsterVisible) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || pos.x == 0xFFFF) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "146a3e8edeb70f2a850226caf4e7d309aa26a05dee1a3fbbfa84fe5118686468" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9457, + "startColumn": 26, + "charOffset": 320631, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 9455, + "startColumn": 26, + "charOffset": 320327, + "charLength": 6, + "snippet": { + "text": "void Game::playerSetMonsterPodium(uint32_t playerId, uint32_t monsterRaceId, const Position &pos, uint8_t stackPos, const uint16_t itemId, uint8_t direction, const std::pair &podiumAndMonsterVisible) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || pos.x == 0xFFFF) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "048013036f5c3fdab72c907f6a563ca37bbebbcd7ac2ef683261025a4d821a37" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9462, + "startColumn": 6, + "charOffset": 320764, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9460, + "startColumn": 6, + "charOffset": 320654, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr thing = internalGetThing(player, pos, stackPos, itemId, STACKPOS_TOPDOWN_ITEM);\n\tif (!thing) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1bd0ea20c070ffc84ea604635fb4f5c83983b73ab33c8bcdcfb9eb8db9f3dc0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9467, + "startColumn": 6, + "charOffset": 320841, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9465, + "startColumn": 6, + "charOffset": 320787, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = thing->getItem();\n\tif (!item || item->getID() != itemId || !item->isPodium() || item->hasAttribute(ItemAttribute_t::UNIQUEID)) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf678869fa5fd48e647a1aed099717c171704b4a430e1374b7e48ee0268cf6cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9473, + "startColumn": 6, + "charOffset": 321099, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9471, + "startColumn": 6, + "charOffset": 321014, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto tile = item->getParent() ? item->getParent()->getTile() : nullptr;\n\tif (!tile) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4c5c47b7ed0a50de1c3ca3870f461a25bbb72ddeffaef25fca4b32bcb2535ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9483, + "startColumn": 5, + "charOffset": 321531, + "charLength": 3, + "snippet": { + "text": "400" + } + }, + "contextRegion": { + "startLine": 9481, + "startColumn": 5, + "charOffset": 321341, + "charLength": 3, + "snippet": { + "text": "\t\t\tg_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, \"Game::playerAutoWalk\");\n\t\t\tstd::shared_ptr task = createPlayerTask(\n\t\t\t\t400, [this, playerId, pos] { playerBrowseField(playerId, pos); }, \"Game::playerBrowseField\"\n\t\t\t);\n\t\t\tplayer->setNextWalkActionTask(task);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a9df8876ec289d1ebf3f6e197089c30780107b88548f7f8d16bc519d618d000" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9502, + "startColumn": 2, + "charOffset": 322073, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 9500, + "startColumn": 2, + "charOffset": 322068, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (monsterRaceId != 0) {\n\t\titem->setCustomAttribute(\"PodiumMonsterRaceId\", static_cast(monsterRaceId));\n\t} else if (auto podiumMonsterRace = item->getCustomAttribute(\"PodiumMonsterRaceId\")) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b71535e15dc530285f61cf2a9ecd19061bf02c7dfd4912e9d702fb94b536e3bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9509, + "startColumn": 6, + "charOffset": 322486, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9507, + "startColumn": 6, + "charOffset": 322352, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto mType = g_monsters().getMonsterTypeByRaceId(static_cast(monsterRaceId), itemId == ITEM_PODIUM_OF_VIGOUR);\n\tif (!mType) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\tg_logger().debug(\"[{}] player {} is trying to add invalid monster to podium {}\", __FUNCTION__, player->getName(), item->getName());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc7b57b46ef250bac5abd957c2a889f025a17d60fec40515c42abb9c27df16c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9511, + "startColumn": 106, + "charOffset": 322655, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 9509, + "startColumn": 106, + "charOffset": 322481, + "charLength": 7, + "snippet": { + "text": "\tif (!mType) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\tg_logger().debug(\"[{}] player {} is trying to add invalid monster to podium {}\", __FUNCTION__, player->getName(), item->getName());\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ccc2ecfc0d424ccd83281d7440af4d734703661eeb170223502bd2540103b483" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9511, + "startColumn": 123, + "charOffset": 322672, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 9509, + "startColumn": 123, + "charOffset": 322481, + "charLength": 7, + "snippet": { + "text": "\tif (!mType) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\tg_logger().debug(\"[{}] player {} is trying to add invalid monster to podium {}\", __FUNCTION__, player->getName(), item->getName());\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dce4b1f8da130aa87e9cfa034fb9153d0fe5678094ba3b0035ae51b955c4e7c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "35105 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9520, + "startColumn": 35, + "charOffset": 323042, + "charLength": 5, + "snippet": { + "text": "35105" + } + }, + "contextRegion": { + "startLine": 9518, + "startColumn": 35, + "charOffset": 322849, + "charLength": 5, + "snippet": { + "text": "\t (monsterOutfit.lookType != 0 || monsterOutfit.lookTypeEx != 0) && monsterVisible) {\n\t\t// \"Tantugly's Head\" boss have to send other looktype to the podium\n\t\tif (monsterOutfit.lookTypeEx == 35105) {\n\t\t\tmonsterOutfit.lookTypeEx = 39003;\n\t\t\tchangeTentuglyName = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a5f0a4a913f901342f79003b274472fc8f30d485f9d8519a9dc3c3064a9f69b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "39003 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9521, + "startColumn": 31, + "charOffset": 323081, + "charLength": 5, + "snippet": { + "text": "39003" + } + }, + "contextRegion": { + "startLine": 9519, + "startColumn": 31, + "charOffset": 322938, + "charLength": 5, + "snippet": { + "text": "\t\t// \"Tantugly's Head\" boss have to send other looktype to the podium\n\t\tif (monsterOutfit.lookTypeEx == 35105) {\n\t\t\tmonsterOutfit.lookTypeEx = 39003;\n\t\t\tchangeTentuglyName = true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab42f95390c4ad728db938b21f915e669b10a872d12f09a8afab786554f3a85d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9549, + "startColumn": 50, + "charOffset": 324336, + "charLength": 3, + "snippet": { + "text": "str" + } + }, + "contextRegion": { + "startLine": 9547, + "startColumn": 50, + "charOffset": 324259, + "charLength": 3, + "snippet": { + "text": "\t\t\tname << mType->name;\n\t\t}\n\t\titem->setAttribute(ItemAttribute_t::NAME, name.str());\n\t} else {\n\t\titem->removeAttribute(ItemAttribute_t::NAME);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6eef8ae1ccc02631cf1510e264238d1ebfdc823e743b99edc6b90894faffc388" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'playerRotatePodium' has cognitive complexity of 26 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9561, + "startColumn": 12, + "charOffset": 324587, + "charLength": 18, + "snippet": { + "text": "playerRotatePodium" + } + }, + "contextRegion": { + "startLine": 9559, + "startColumn": 12, + "charOffset": 324573, + "charLength": 18, + "snippet": { + "text": "}\n\nvoid Game::playerRotatePodium(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1faab19b7c92dc78f39ce4f6104bf29f232bbc06327ec0dbbc2f9b84cf41f5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9563, + "startColumn": 6, + "charOffset": 324753, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9561, + "startColumn": 6, + "charOffset": 324576, + "charLength": 1, + "snippet": { + "text": "void Game::playerRotatePodium(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0937325df64f2457e675c3efdeaa8784ce7ff05bcf2473a41950795068db4012" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9568, + "startColumn": 6, + "charOffset": 324887, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9566, + "startColumn": 6, + "charOffset": 324777, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr thing = internalGetThing(player, pos, stackPos, itemId, STACKPOS_TOPDOWN_ITEM);\n\tif (!thing) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c008f58135875a09ef7317df39c2d3ab7d64a9878c9f0d0f193b511fd71aac2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9573, + "startColumn": 6, + "charOffset": 324964, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9571, + "startColumn": 6, + "charOffset": 324910, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = thing->getItem();\n\tif (!item || item->getID() != itemId || item->hasAttribute(ItemAttribute_t::UNIQUEID)) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "441e3a051571dba24ac3b5416e5edca78ef48fec55968edda64743ba1f3863e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9578, + "startColumn": 15, + "charOffset": 325131, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 9576, + "startColumn": 15, + "charOffset": 325113, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tif (pos.x != 0xFFFF && !Position::areInRange<1, 1, 0>(pos, player->getPosition())) {\n\t\tif (std::vector listDir;\n\t\t player->getPathTo(pos, listDir, 0, 1, true, true)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d585f5e6682a4fb065261fb4bc758a840e4788a203f0c41ed554855a354b38d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9583, + "startColumn": 5, + "charOffset": 325490, + "charLength": 3, + "snippet": { + "text": "400" + } + }, + "contextRegion": { + "startLine": 9581, + "startColumn": 5, + "charOffset": 325300, + "charLength": 3, + "snippet": { + "text": "\t\t\tg_dispatcher().addEvent([this, playerId = player->getID(), listDir] { playerAutoWalk(playerId, listDir); }, \"Game::playerAutoWalk\");\n\t\t\tstd::shared_ptr task = createPlayerTask(\n\t\t\t\t400, [this, playerId, pos, stackPos, itemId] {\n\t\t\t\t\tplayerRotatePodium(playerId, pos, stackPos, itemId);\n\t\t\t\t}," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db83ec0acf4cb2098e40ae3ad9b4795f9da3de253b0e12fa3a25af3f4af0bc76" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'directionValue' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9606, + "startColumn": 10, + "charOffset": 326373, + "charLength": 14, + "snippet": { + "text": "directionValue" + } + }, + "contextRegion": { + "startLine": 9604, + "startColumn": 10, + "charOffset": 326254, + "charLength": 14, + "snippet": { + "text": "\n\tauto podiumRaceId = podiumRaceIdAttribute ? static_cast(podiumRaceIdAttribute->getInteger()) : 0;\n\tuint8_t directionValue;\n\tif (lookDirection) {\n\t\tdirectionValue = static_cast(lookDirection->getInteger() >= 3 ? 0 : lookDirection->getInteger() + 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0e28947f283eccb533e026634d73277bc77bf6431e88d2bdfdad763b408d8f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Expression can be simplified" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9612, + "startColumn": 88, + "charOffset": 326646, + "charLength": 1, + "snippet": { + "text": ":" + } + }, + "contextRegion": { + "startLine": 9610, + "startColumn": 88, + "charOffset": 326534, + "charLength": 1, + "snippet": { + "text": "\t\tdirectionValue = 2;\n\t}\n\tauto isPodiumVisible = podiumVisible ? static_cast(podiumVisible->getInteger()) : false;\n\tbool isMonsterVisible = monsterVisible ? static_cast(monsterVisible->getInteger()) : false;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a414640a5f67cde970414f71c5153830a1afff2bb5d885a6b59ce80406d82c5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Expression can be simplified" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9613, + "startColumn": 91, + "charOffset": 326745, + "charLength": 1, + "snippet": { + "text": ":" + } + }, + "contextRegion": { + "startLine": 9611, + "startColumn": 91, + "charOffset": 326556, + "charLength": 1, + "snippet": { + "text": "\t}\n\tauto isPodiumVisible = podiumVisible ? static_cast(podiumVisible->getInteger()) : false;\n\tbool isMonsterVisible = monsterVisible ? static_cast(monsterVisible->getInteger()) : false;\n\n\t// Rotate monster podium (bestiary or bosstiary) to the new direction" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78be692effe8b82d931ebef1717e36199d63511f9f8c159cc00786eb8062c03a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "39003 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9619, + "startColumn": 110, + "charOffset": 327125, + "charLength": 5, + "snippet": { + "text": "39003" + } + }, + "contextRegion": { + "startLine": 9617, + "startColumn": 110, + "charOffset": 326921, + "charLength": 5, + "snippet": { + "text": "\tif (!isPodiumOfRenown) {\n\t\tauto lookTypeExAttribute = item->getCustomAttribute(\"LookTypeEx\");\n\t\tif (!isMonsterVisible || podiumRaceId == 0 || (lookTypeExAttribute && lookTypeExAttribute->getInteger() == 39003)) {\n\t\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b23c6612e8d480a084713aaa1ed50d1717cb713bfc1125d90b265da7e791dba9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-12", + "ruleIndex": 424, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-12: signed char and unsigned char type shall only be used for the storage and use of numeric values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9631, + "startColumn": 12, + "charOffset": 327583, + "charLength": 10, + "snippet": { + "text": "lookAddons" + } + }, + "contextRegion": { + "startLine": 9629, + "startColumn": 12, + "charOffset": 327462, + "charLength": 10, + "snippet": { + "text": "\tOutfit_t newOutfit;\n\tnewOutfit.lookType = InternalGame::getCustomAttributeValue(item, \"LookType\");\n\tnewOutfit.lookAddons = InternalGame::getCustomAttributeValue(item, \"LookAddons\");\n\tnewOutfit.lookHead = InternalGame::getCustomAttributeValue(item, \"LookHead\");\n\tnewOutfit.lookBody = InternalGame::getCustomAttributeValue(item, \"LookBody\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e0eafdef6725e5cec0ab22d07651ea7af33cf8f85a7a262c675de56e0686125" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-12", + "ruleIndex": 424, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-12: signed char and unsigned char type shall only be used for the storage and use of numeric values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9632, + "startColumn": 12, + "charOffset": 327675, + "charLength": 8, + "snippet": { + "text": "lookHead" + } + }, + "contextRegion": { + "startLine": 9630, + "startColumn": 12, + "charOffset": 327483, + "charLength": 8, + "snippet": { + "text": "\tnewOutfit.lookType = InternalGame::getCustomAttributeValue(item, \"LookType\");\n\tnewOutfit.lookAddons = InternalGame::getCustomAttributeValue(item, \"LookAddons\");\n\tnewOutfit.lookHead = InternalGame::getCustomAttributeValue(item, \"LookHead\");\n\tnewOutfit.lookBody = InternalGame::getCustomAttributeValue(item, \"LookBody\");\n\tnewOutfit.lookLegs = InternalGame::getCustomAttributeValue(item, \"LookLegs\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd4eedc1e6039368db2193ba24febbf1ebd082c9a173ec54317a39517b04edc8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-12", + "ruleIndex": 424, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-12: signed char and unsigned char type shall only be used for the storage and use of numeric values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9633, + "startColumn": 12, + "charOffset": 327763, + "charLength": 8, + "snippet": { + "text": "lookBody" + } + }, + "contextRegion": { + "startLine": 9631, + "startColumn": 12, + "charOffset": 327572, + "charLength": 8, + "snippet": { + "text": "\tnewOutfit.lookAddons = InternalGame::getCustomAttributeValue(item, \"LookAddons\");\n\tnewOutfit.lookHead = InternalGame::getCustomAttributeValue(item, \"LookHead\");\n\tnewOutfit.lookBody = InternalGame::getCustomAttributeValue(item, \"LookBody\");\n\tnewOutfit.lookLegs = InternalGame::getCustomAttributeValue(item, \"LookLegs\");\n\tnewOutfit.lookFeet = InternalGame::getCustomAttributeValue(item, \"LookFeet\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4fd339301f8e502853dd216c40e77fb751eb4e58dfa9c975e74a81ab877632be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-12", + "ruleIndex": 424, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-12: signed char and unsigned char type shall only be used for the storage and use of numeric values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9634, + "startColumn": 12, + "charOffset": 327851, + "charLength": 8, + "snippet": { + "text": "lookLegs" + } + }, + "contextRegion": { + "startLine": 9632, + "startColumn": 12, + "charOffset": 327664, + "charLength": 8, + "snippet": { + "text": "\tnewOutfit.lookHead = InternalGame::getCustomAttributeValue(item, \"LookHead\");\n\tnewOutfit.lookBody = InternalGame::getCustomAttributeValue(item, \"LookBody\");\n\tnewOutfit.lookLegs = InternalGame::getCustomAttributeValue(item, \"LookLegs\");\n\tnewOutfit.lookFeet = InternalGame::getCustomAttributeValue(item, \"LookFeet\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e95ddc9ee6a5ff308fc5a5f8faf8154a3ddb611f3c4df761e4b222c951a51daa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-12", + "ruleIndex": 424, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-12: signed char and unsigned char type shall only be used for the storage and use of numeric values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9635, + "startColumn": 12, + "charOffset": 327939, + "charLength": 8, + "snippet": { + "text": "lookFeet" + } + }, + "contextRegion": { + "startLine": 9633, + "startColumn": 12, + "charOffset": 327752, + "charLength": 8, + "snippet": { + "text": "\tnewOutfit.lookBody = InternalGame::getCustomAttributeValue(item, \"LookBody\");\n\tnewOutfit.lookLegs = InternalGame::getCustomAttributeValue(item, \"LookLegs\");\n\tnewOutfit.lookFeet = InternalGame::getCustomAttributeValue(item, \"LookFeet\");\n\n\tnewOutfit.lookMount = InternalGame::getCustomAttributeValue(item, \"LookMount\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e741c5481080897995f031a39bcb36207fc0e97c479a0f4f2ae7db815d411b3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-12", + "ruleIndex": 424, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-12: signed char and unsigned char type shall only be used for the storage and use of numeric values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9638, + "startColumn": 12, + "charOffset": 328119, + "charLength": 13, + "snippet": { + "text": "lookMountHead" + } + }, + "contextRegion": { + "startLine": 9636, + "startColumn": 12, + "charOffset": 328016, + "charLength": 13, + "snippet": { + "text": "\n\tnewOutfit.lookMount = InternalGame::getCustomAttributeValue(item, \"LookMount\");\n\tnewOutfit.lookMountHead = InternalGame::getCustomAttributeValue(item, \"LookMountHead\");\n\tnewOutfit.lookMountBody = InternalGame::getCustomAttributeValue(item, \"LookMountBody\");\n\tnewOutfit.lookMountLegs = InternalGame::getCustomAttributeValue(item, \"LookMountLegs\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a94019754b9c6d80d0b515b932cbd3d6059f1186e360a97e6f9432887ee0e56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-12", + "ruleIndex": 424, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-12: signed char and unsigned char type shall only be used for the storage and use of numeric values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9639, + "startColumn": 12, + "charOffset": 328217, + "charLength": 13, + "snippet": { + "text": "lookMountBody" + } + }, + "contextRegion": { + "startLine": 9637, + "startColumn": 12, + "charOffset": 328017, + "charLength": 13, + "snippet": { + "text": "\tnewOutfit.lookMount = InternalGame::getCustomAttributeValue(item, \"LookMount\");\n\tnewOutfit.lookMountHead = InternalGame::getCustomAttributeValue(item, \"LookMountHead\");\n\tnewOutfit.lookMountBody = InternalGame::getCustomAttributeValue(item, \"LookMountBody\");\n\tnewOutfit.lookMountLegs = InternalGame::getCustomAttributeValue(item, \"LookMountLegs\");\n\tnewOutfit.lookMountFeet = InternalGame::getCustomAttributeValue(item, \"LookMountFeet\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2476785169208a67cd4291924886be8cae7ce45f2ca9d36ce4d5a2367c0feeb6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-12", + "ruleIndex": 424, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-12: signed char and unsigned char type shall only be used for the storage and use of numeric values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9640, + "startColumn": 12, + "charOffset": 328315, + "charLength": 13, + "snippet": { + "text": "lookMountLegs" + } + }, + "contextRegion": { + "startLine": 9638, + "startColumn": 12, + "charOffset": 328108, + "charLength": 13, + "snippet": { + "text": "\tnewOutfit.lookMountHead = InternalGame::getCustomAttributeValue(item, \"LookMountHead\");\n\tnewOutfit.lookMountBody = InternalGame::getCustomAttributeValue(item, \"LookMountBody\");\n\tnewOutfit.lookMountLegs = InternalGame::getCustomAttributeValue(item, \"LookMountLegs\");\n\tnewOutfit.lookMountFeet = InternalGame::getCustomAttributeValue(item, \"LookMountFeet\");\n\tif (newOutfit.lookType == 0 && newOutfit.lookMount == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3629352feb46d9a5ba0cbbed230fe334f1262b69d443a2e827c300a0c3eafe58" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-12", + "ruleIndex": 424, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-12: signed char and unsigned char type shall only be used for the storage and use of numeric values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9641, + "startColumn": 12, + "charOffset": 328413, + "charLength": 13, + "snippet": { + "text": "lookMountFeet" + } + }, + "contextRegion": { + "startLine": 9639, + "startColumn": 12, + "charOffset": 328206, + "charLength": 13, + "snippet": { + "text": "\tnewOutfit.lookMountBody = InternalGame::getCustomAttributeValue(item, \"LookMountBody\");\n\tnewOutfit.lookMountLegs = InternalGame::getCustomAttributeValue(item, \"LookMountLegs\");\n\tnewOutfit.lookMountFeet = InternalGame::getCustomAttributeValue(item, \"LookMountFeet\");\n\tif (newOutfit.lookType == 0 && newOutfit.lookMount == 0) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e063a8360c970493999ceb016e018e85f32fc3c39f20993245706a95f868a919" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9652, + "startColumn": 6, + "charOffset": 328889, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9650, + "startColumn": 6, + "charOffset": 328740, + "charLength": 1, + "snippet": { + "text": "void Game::playerRequestInventoryImbuements(uint32_t playerId, bool isTrackerOpen) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player || player->isRemoved()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "676184696726a8d518a76affe22571af0c6cee901ada473cfaf530cee78492d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9664, + "startColumn": 7, + "charOffset": 329297, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9662, + "startColumn": 7, + "charOffset": 329113, + "charLength": 1, + "snippet": { + "text": "\tfor (uint8_t inventorySlot = CONST_SLOT_FIRST; inventorySlot <= CONST_SLOT_LAST; ++inventorySlot) {\n\t\tauto item = player->getInventoryItem(static_cast(inventorySlot));\n\t\tif (!item) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79e6ddff163b560642fd4d9493fcc36b80c1cb7b50c39af2ba5371393224c44e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9669, + "startColumn": 3, + "charOffset": 329378, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 9667, + "startColumn": 3, + "charOffset": 329323, + "charLength": 3, + "snippet": { + "text": "\n\t\tuint8_t imbuementSlot = item->getImbuementSlot();\n\t\tfor (uint8_t slot = 0; slot < imbuementSlot; slot++) {\n\t\t\tImbuementInfo imbuementInfo;\n\t\t\tif (!item->getImbuementInfo(slot, &imbuementInfo)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf410a4ab7768ad60bbe52117e62bdc68c410b2ede27e169a9afcdd03d544f48" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'imbuementSlot' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9669, + "startColumn": 26, + "charOffset": 329401, + "charLength": 4, + "snippet": { + "text": "slot" + } + }, + "contextRegion": { + "startLine": 9667, + "startColumn": 26, + "charOffset": 329323, + "charLength": 4, + "snippet": { + "text": "\n\t\tuint8_t imbuementSlot = item->getImbuementSlot();\n\t\tfor (uint8_t slot = 0; slot < imbuementSlot; slot++) {\n\t\t\tImbuementInfo imbuementInfo;\n\t\t\tif (!item->getImbuementInfo(slot, &imbuementInfo)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5eb45cc7d1144397ca1d743b4e652c11311cfbe785e2f25fffd07b5dd43a210" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9684, + "startColumn": 6, + "charOffset": 329808, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9682, + "startColumn": 6, + "charOffset": 329678, + "charLength": 1, + "snippet": { + "text": "void Game::playerOpenWheel(uint32_t playerId, uint32_t ownerId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e17aa662c356a9ae8caf6a6d3f05b93b5c46004cb27a81d1822bbc883a0d6e68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9689, + "startColumn": 102, + "charOffset": 329962, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 9687, + "startColumn": 102, + "charOffset": 329832, + "charLength": 7, + "snippet": { + "text": "\n\tif (playerId != ownerId) {\n\t\tg_logger().error(\"[{}] player {} is trying to open wheel of another player\", __FUNCTION__, player->getName());\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8448f6c0119f93d4a584ffa17722dd30198d49d245ad3261fa32432496aefdd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9704, + "startColumn": 6, + "charOffset": 330306, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9702, + "startColumn": 6, + "charOffset": 330173, + "charLength": 1, + "snippet": { + "text": "void Game::playerSaveWheel(uint32_t playerId, NetworkMessage &msg) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d29ff09e3008a38dbb38944bda0304e3fb8dc27370d3199a70b27684cb6ba70f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9719, + "startColumn": 6, + "charOffset": 330662, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9717, + "startColumn": 6, + "charOffset": 330524, + "charLength": 1, + "snippet": { + "text": "void Game::playerWheelGemAction(uint32_t playerId, NetworkMessage &msg) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a23aac8008d98216c103ca0a6f6373f1c24c1e15083b9718b31c6a9bb3f31312" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9756, + "startColumn": 6, + "charOffset": 331632, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9754, + "startColumn": 6, + "charOffset": 331514, + "charLength": 1, + "snippet": { + "text": "void Game::updatePlayerSaleItems(uint32_t playerId) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3404d61a4cefc4523d6a3402ba1f73b9acd6761d1eaa2a051a48ade544cfaf77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9765, + "startColumn": 46, + "charOffset": 331864, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 9763, + "startColumn": 46, + "charOffset": 331816, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::addPlayer(std::shared_ptr player) {\n\tconst std::string &lowercase_name = asLowerCaseString(player->getName());\n\tmappedPlayerNames[lowercase_name] = player;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e06c3397276427e7781ce056eb70871198e0878cf930c0b71aec021a89487c6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9772, + "startColumn": 49, + "charOffset": 332120, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 9770, + "startColumn": 49, + "charOffset": 332069, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::removePlayer(std::shared_ptr player) {\n\tconst std::string &lowercase_name = asLowerCaseString(player->getName());\n\tmappedPlayerNames.erase(lowercase_name);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e06c3397276427e7781ce056eb70871198e0878cf930c0b71aec021a89487c6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9776, + "startColumn": 24, + "charOffset": 332309, + "charLength": 5, + "snippet": { + "text": "getID" + } + }, + "contextRegion": { + "startLine": 9774, + "startColumn": 24, + "charOffset": 332205, + "charLength": 5, + "snippet": { + "text": "\tmappedPlayerNames.erase(lowercase_name);\n\twildcardTree->remove(lowercase_name);\n\tplayers.erase(player->getID());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c95b4b5c856cd98e7bee7515cc37c48bca252c8c63dbbb3f0aafd6e172a0d07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9779, + "startColumn": 40, + "charOffset": 332361, + "charLength": 3, + "snippet": { + "text": "npc" + } + }, + "contextRegion": { + "startLine": 9777, + "startColumn": 40, + "charOffset": 332319, + "charLength": 3, + "snippet": { + "text": "}\n\nvoid Game::addNpc(std::shared_ptr npc) {\n\tnpcs[npc->getID()] = npc;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e25eef228bf60746515fcab10de881780bf418a2a0e76c3a4c98b6924b6ade6c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9783, + "startColumn": 43, + "charOffset": 332440, + "charLength": 3, + "snippet": { + "text": "npc" + } + }, + "contextRegion": { + "startLine": 9781, + "startColumn": 43, + "charOffset": 332395, + "charLength": 3, + "snippet": { + "text": "}\n\nvoid Game::removeNpc(std::shared_ptr npc) {\n\tnpcs.erase(npc->getID());\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e6d6fd65be29034b9198e4984f822c54f2e8f688165bef06ead8263b0df112c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9784, + "startColumn": 7, + "charOffset": 332453, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 9782, + "startColumn": 7, + "charOffset": 332397, + "charLength": 5, + "snippet": { + "text": "\nvoid Game::removeNpc(std::shared_ptr npc) {\n\tnpcs.erase(npc->getID());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db012c59559622c3711fbcb43cf7227c90ad0134c6a4975bea1b6e1065b02d07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9787, + "startColumn": 48, + "charOffset": 332524, + "charLength": 7, + "snippet": { + "text": "monster" + } + }, + "contextRegion": { + "startLine": 9785, + "startColumn": 48, + "charOffset": 332474, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid Game::addMonster(std::shared_ptr monster) {\n\tmonsters[monster->getID()] = monster;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3501d9dbc2075d8aec80fa75902d9a241c1f21cb18361b16244d8ae0990e0411" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9791, + "startColumn": 51, + "charOffset": 332627, + "charLength": 7, + "snippet": { + "text": "monster" + } + }, + "contextRegion": { + "startLine": 9789, + "startColumn": 51, + "charOffset": 332574, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid Game::removeMonster(std::shared_ptr monster) {\n\tmonsters.erase(monster->getID());\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "505a274d5685a8ab4fadaa7c3ca7eaacf407f3a7fc104de7bf704a4c5c698622" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9792, + "startColumn": 11, + "charOffset": 332648, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 9790, + "startColumn": 11, + "charOffset": 332576, + "charLength": 5, + "snippet": { + "text": "\nvoid Game::removeMonster(std::shared_ptr monster) {\n\tmonsters.erase(monster->getID());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e1b3f828e3c24a220de7c074c14d585a928122e376d0a45a5b97d11eee5464f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'addGuild' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9818, + "startColumn": 12, + "charOffset": 333251, + "charLength": 8, + "snippet": { + "text": "addGuild" + } + }, + "contextRegion": { + "startLine": 9816, + "startColumn": 12, + "charOffset": 333237, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::addGuild(const std::shared_ptr guild) {\n\tif (!guild) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69e1a45c87db24789c31ea5e5a24e657355d41d6822cfa994c77b66f47659976" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'guild' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9818, + "startColumn": 50, + "charOffset": 333289, + "charLength": 5, + "snippet": { + "text": "guild" + } + }, + "contextRegion": { + "startLine": 9816, + "startColumn": 50, + "charOffset": 333237, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid Game::addGuild(const std::shared_ptr guild) {\n\tif (!guild) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e864f9686e9e9e98df7440b9f7db84c60ecb3ebef714741ea6d7e2df4396dc06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9819, + "startColumn": 6, + "charOffset": 333303, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9817, + "startColumn": 6, + "charOffset": 333239, + "charLength": 1, + "snippet": { + "text": "\nvoid Game::addGuild(const std::shared_ptr guild) {\n\tif (!guild) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0bdaf7558204378913059a3fcf5254f99c8025639c64e155f8231215447b1dd9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'internalRemoveItems' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9833, + "startColumn": 12, + "charOffset": 333547, + "charLength": 19, + "snippet": { + "text": "internalRemoveItems" + } + }, + "contextRegion": { + "startLine": 9831, + "startColumn": 12, + "charOffset": 333533, + "charLength": 19, + "snippet": { + "text": "}\n\nvoid Game::internalRemoveItems(const std::vector> &itemVector, uint32_t amount, bool stackable) {\n\tif (stackable) {\n\t\tfor (const std::shared_ptr &item : itemVector) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b45d28fea5b7960f30360d768e91ced1b1176eeddfb1148a84b4937048afdc8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'internalRemoveItems' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9833, + "startColumn": 32, + "charOffset": 333567, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 9831, + "startColumn": 32, + "charOffset": 333533, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid Game::internalRemoveItems(const std::vector> &itemVector, uint32_t amount, bool stackable) {\n\tif (stackable) {\n\t\tfor (const std::shared_ptr &item : itemVector) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82eea8f0fab020384b1f201375e90cb86f6e75ce42980c4ae45d87ae23dd445c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "if with identical then and else branches" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9834, + "startColumn": 2, + "charOffset": 333657, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 9832, + "startColumn": 2, + "charOffset": 333535, + "charLength": 2, + "snippet": { + "text": "\nvoid Game::internalRemoveItems(const std::vector> &itemVector, uint32_t amount, bool stackable) {\n\tif (stackable) {\n\t\tfor (const std::shared_ptr &item : itemVector) {\n\t\t\tif (item->getItemCount() > amount) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cec4bc636ea9b118c1fd54d3fb799b7ad6eb64f65f93927427a414a890567790" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'bed' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9859, + "startColumn": 51, + "charOffset": 334250, + "charLength": 3, + "snippet": { + "text": "bed" + } + }, + "contextRegion": { + "startLine": 9857, + "startColumn": 51, + "charOffset": 334197, + "charLength": 3, + "snippet": { + "text": "}\n\nvoid Game::setBedSleeper(std::shared_ptr bed, uint32_t guid) {\n\tbedSleepersMap[guid] = std::move(bed);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0513b7a0dd90c8ed7adf146dab8d68e97312de9d9b974e5a350dc54cc6fc658f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9878, + "startColumn": 67, + "charOffset": 334711, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 9876, + "startColumn": 67, + "charOffset": 334642, + "charLength": 4, + "snippet": { + "text": "}\n\nbool Game::addUniqueItem(uint16_t uniqueId, std::shared_ptr item) {\n\tauto result = uniqueItems.emplace(uniqueId, item);\n\tif (!result.second) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1f37a763635c7df4376cc65538f18d311a1acaac0414fd021321ac8deb2bbf6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9880, + "startColumn": 6, + "charOffset": 334776, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9878, + "startColumn": 6, + "charOffset": 334645, + "charLength": 1, + "snippet": { + "text": "bool Game::addUniqueItem(uint16_t uniqueId, std::shared_ptr item) {\n\tauto result = uniqueItems.emplace(uniqueId, item);\n\tif (!result.second) {\n\t\tg_logger().warn(\"Duplicate unique id: {}\", uniqueId);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3a9d21bab282b2942060e41844b00b7e61a2e10e0346caf30f73daddd947d5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'hasEffect' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9893, + "startColumn": 12, + "charOffset": 335041, + "charLength": 9, + "snippet": { + "text": "hasEffect" + } + }, + "contextRegion": { + "startLine": 9891, + "startColumn": 12, + "charOffset": 335027, + "charLength": 9, + "snippet": { + "text": "}\n\nbool Game::hasEffect(uint16_t effectId) {\n\tfor (uint16_t i = CONST_ME_NONE; i < CONST_ME_LAST; i++) {\n\t\tMagicEffectClasses effect = static_cast(i);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8126ae26abab089e34d9b1b5f89cf48e9204baaf5de5cd7c7b48ea9ab74bfc91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9894, + "startColumn": 2, + "charOffset": 335073, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 9892, + "startColumn": 2, + "charOffset": 335029, + "charLength": 3, + "snippet": { + "text": "\nbool Game::hasEffect(uint16_t effectId) {\n\tfor (uint16_t i = CONST_ME_NONE; i < CONST_ME_LAST; i++) {\n\t\tMagicEffectClasses effect = static_cast(i);\n\t\tif (effect == effectId) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69921deb6d3c10b238e2efcce73284d95a4bce554a6b3645a78c2224df71bd4f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9895, + "startColumn": 3, + "charOffset": 335134, + "charLength": 18, + "snippet": { + "text": "MagicEffectClasses" + } + }, + "contextRegion": { + "startLine": 9893, + "startColumn": 3, + "charOffset": 335030, + "charLength": 18, + "snippet": { + "text": "bool Game::hasEffect(uint16_t effectId) {\n\tfor (uint16_t i = CONST_ME_NONE; i < CONST_ME_LAST; i++) {\n\t\tMagicEffectClasses effect = static_cast(i);\n\t\tif (effect == effectId) {\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "799f2558d33e5e5db5785e012e0aa22c717fae1e35f4f27cd2252d98fbf3d999" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'hasDistanceEffect' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9903, + "startColumn": 12, + "charOffset": 335278, + "charLength": 17, + "snippet": { + "text": "hasDistanceEffect" + } + }, + "contextRegion": { + "startLine": 9901, + "startColumn": 12, + "charOffset": 335264, + "charLength": 17, + "snippet": { + "text": "}\n\nbool Game::hasDistanceEffect(uint16_t effectId) {\n\tfor (uint16_t i = CONST_ANI_NONE; i <= CONST_ANI_LAST; i++) {\n\t\tShootType_t effect = static_cast(i);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7bde7d39f1753d9019ebeb202aa5518aa835757999add351ca2f62416c364c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9904, + "startColumn": 2, + "charOffset": 335318, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 9902, + "startColumn": 2, + "charOffset": 335266, + "charLength": 3, + "snippet": { + "text": "\nbool Game::hasDistanceEffect(uint16_t effectId) {\n\tfor (uint16_t i = CONST_ANI_NONE; i <= CONST_ANI_LAST; i++) {\n\t\tShootType_t effect = static_cast(i);\n\t\tif (effect == effectId) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6d034d0c5fd67c4df666766fefd5009121b4b081fdca4cbfdcad5a696e05d59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9905, + "startColumn": 3, + "charOffset": 335382, + "charLength": 11, + "snippet": { + "text": "ShootType_t" + } + }, + "contextRegion": { + "startLine": 9903, + "startColumn": 3, + "charOffset": 335267, + "charLength": 11, + "snippet": { + "text": "bool Game::hasDistanceEffect(uint16_t effectId) {\n\tfor (uint16_t i = CONST_ANI_NONE; i <= CONST_ANI_LAST; i++) {\n\t\tShootType_t effect = static_cast(i);\n\t\tif (effect == effectId) {\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "170a3f1ea9995fe6665986a0b5a7a261df9e0d868c873ee0588375df83eeb845" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'sendUpdateCreature' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9940, + "startColumn": 12, + "charOffset": 336418, + "charLength": 18, + "snippet": { + "text": "sendUpdateCreature" + } + }, + "contextRegion": { + "startLine": 9938, + "startColumn": 12, + "charOffset": 336404, + "charLength": 18, + "snippet": { + "text": "}\n\nvoid Game::sendUpdateCreature(std::shared_ptr creature) {\n\tif (!creature) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af4aac484e09c84d4f4e041f938aea76ce52f80dbb00d29020040dd1fbdd2934" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9940, + "startColumn": 57, + "charOffset": 336463, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 9938, + "startColumn": 57, + "charOffset": 336404, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::sendUpdateCreature(std::shared_ptr creature) {\n\tif (!creature) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c4cf2c4ea38ad1e41be95d91a21851e7873911090f024810a7d31a2cce9fd59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9941, + "startColumn": 6, + "charOffset": 336480, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 9939, + "startColumn": 6, + "charOffset": 336406, + "charLength": 1, + "snippet": { + "text": "\nvoid Game::sendUpdateCreature(std::shared_ptr creature) {\n\tif (!creature) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9be44861485a6fcd663f9289f0f8a9fb1b4b32c1a270fa0935f70059fc88184a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9964, + "startColumn": 2, + "charOffset": 337081, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 9962, + "startColumn": 2, + "charOffset": 337014, + "charLength": 5, + "snippet": { + "text": "\tuint16_t tries = 0;\n\tstd::shared_ptr monster = nullptr;\n\twhile (true) {\n\t\tif (tries == maxTries) {\n\t\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99f6a6d3c9f96bc46e394e555b52d061545aa80cb82e2ed1390fbef8d291434b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Condition is always true" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9964, + "startColumn": 9, + "charOffset": 337088, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 9962, + "startColumn": 9, + "charOffset": 337014, + "charLength": 4, + "snippet": { + "text": "\tuint16_t tries = 0;\n\tstd::shared_ptr monster = nullptr;\n\twhile (true) {\n\t\tif (tries == maxTries) {\n\t\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c66889ec09ad317b7ead258ce0fe29958317f4d14503ee22c955c5008d06992e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 9993, + "startColumn": 38, + "charOffset": 337927, + "charLength": 5, + "snippet": { + "text": "getID" + } + }, + "contextRegion": { + "startLine": 9991, + "startColumn": 38, + "charOffset": 337763, + "charLength": 5, + "snippet": { + "text": "\t\tmonster->setMonsterForgeClassification(ForgeClassifications_t::FORGE_INFLUENCED_MONSTER);\n\t\tmonster->configureForgeSystem();\n\t\tinfluencedMonsters.insert(monster->getID());\n\t\treturn monster->getID();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b673092fe4ac6a97d46e9dcf6e93712799e8d3d09dac75a97414c2db8c55ecb7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10041, + "startColumn": 2, + "charOffset": 339411, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 10039, + "startColumn": 2, + "charOffset": 339344, + "charLength": 5, + "snippet": { + "text": "\tuint16_t tries = 0;\n\tstd::shared_ptr monster = nullptr;\n\twhile (true) {\n\t\tif (tries == maxTries) {\n\t\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d2f52689c20c527f48e267d39ae1222e3ccc74b85f627acf581ccd5e4e12f09" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Condition is always true" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10041, + "startColumn": 9, + "charOffset": 339418, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 10039, + "startColumn": 9, + "charOffset": 339344, + "charLength": 4, + "snippet": { + "text": "\tuint16_t tries = 0;\n\tstd::shared_ptr monster = nullptr;\n\twhile (true) {\n\t\tif (tries == maxTries) {\n\t\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d2c80c9f7b3d322dc56e6ec1f301ec53a8e43139006e046aff0dcea8a56fe00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err34-c", + "ruleIndex": 133, + "kind": "fail", + "level": "warning", + "message": { + "text": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10072, + "startColumn": 32, + "charOffset": 340315, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 10070, + "startColumn": 32, + "charOffset": 340145, + "charLength": 3, + "snippet": { + "text": "\t// Get interval time to fiendish\n\tstd::string saveIntervalType = g_configManager().getString(FORGE_FIENDISH_INTERVAL_TYPE, __FUNCTION__);\n\tauto saveIntervalConfigTime = std::atoi(g_configManager().getString(FORGE_FIENDISH_INTERVAL_TIME, __FUNCTION__).c_str());\n\tint intervalTime = 0;\n\ttime_t timeToChangeFiendish;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5cae326f3035fe1e5420a6ba674b990b985405309288e4ccfa51c2cfeacb05e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-2", + "ruleIndex": 408, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-2: The library functions atof, atoi and atol from library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10072, + "startColumn": 32, + "charOffset": 340315, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 10070, + "startColumn": 32, + "charOffset": 340145, + "charLength": 3, + "snippet": { + "text": "\t// Get interval time to fiendish\n\tstd::string saveIntervalType = g_configManager().getString(FORGE_FIENDISH_INTERVAL_TYPE, __FUNCTION__);\n\tauto saveIntervalConfigTime = std::atoi(g_configManager().getString(FORGE_FIENDISH_INTERVAL_TIME, __FUNCTION__).c_str());\n\tint intervalTime = 0;\n\ttime_t timeToChangeFiendish;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a33f330439197d5304ced5ab8213d2a1a54c27c75d61397bde44971df67e781" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'timeToChangeFiendish' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10074, + "startColumn": 9, + "charOffset": 340438, + "charLength": 20, + "snippet": { + "text": "timeToChangeFiendish" + } + }, + "contextRegion": { + "startLine": 10072, + "startColumn": 9, + "charOffset": 340284, + "charLength": 20, + "snippet": { + "text": "\tauto saveIntervalConfigTime = std::atoi(g_configManager().getString(FORGE_FIENDISH_INTERVAL_TIME, __FUNCTION__).c_str());\n\tint intervalTime = 0;\n\ttime_t timeToChangeFiendish;\n\tif (saveIntervalType == \"second\") {\n\t\tintervalTime = 1000;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fcac3ff24175141d8063a51ac9b540a3cf27177fd82bc30cd6ae21e13c2044a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10076, + "startColumn": 18, + "charOffset": 340514, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 10074, + "startColumn": 18, + "charOffset": 340430, + "charLength": 4, + "snippet": { + "text": "\ttime_t timeToChangeFiendish;\n\tif (saveIntervalType == \"second\") {\n\t\tintervalTime = 1000;\n\t\ttimeToChangeFiendish = 1;\n\t} else if (saveIntervalType == \"minute\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "609a84a5fb09d30cd8550a74e0b3f62a5bebcadbf03172cd525a1b51dcafdba0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10079, + "startColumn": 18, + "charOffset": 340609, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 10077, + "startColumn": 18, + "charOffset": 340520, + "charLength": 2, + "snippet": { + "text": "\t\ttimeToChangeFiendish = 1;\n\t} else if (saveIntervalType == \"minute\") {\n\t\tintervalTime = 60 * 1000;\n\t\ttimeToChangeFiendish = 60;\n\t} else if (saveIntervalType == \"hour\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f0b37aa7002f7e9d13b45141b6d35d2082fd6ef57a137d4a17cf8ff530346f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10079, + "startColumn": 23, + "charOffset": 340614, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 10077, + "startColumn": 23, + "charOffset": 340520, + "charLength": 4, + "snippet": { + "text": "\t\ttimeToChangeFiendish = 1;\n\t} else if (saveIntervalType == \"minute\") {\n\t\tintervalTime = 60 * 1000;\n\t\ttimeToChangeFiendish = 60;\n\t} else if (saveIntervalType == \"hour\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7dd96ead96ad49f7d1a052703786aed0de34d51bde24532cd3985a86e287cf6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10080, + "startColumn": 26, + "charOffset": 340645, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 10078, + "startColumn": 26, + "charOffset": 340548, + "charLength": 2, + "snippet": { + "text": "\t} else if (saveIntervalType == \"minute\") {\n\t\tintervalTime = 60 * 1000;\n\t\ttimeToChangeFiendish = 60;\n\t} else if (saveIntervalType == \"hour\") {\n\t\tintervalTime = 60 * 60 * 1000;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3f9ce06ff4155682d0a5c0173e4009ca9d4c217905872422bf973ab43824fc7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10082, + "startColumn": 18, + "charOffset": 340708, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 10080, + "startColumn": 18, + "charOffset": 340620, + "charLength": 2, + "snippet": { + "text": "\t\ttimeToChangeFiendish = 60;\n\t} else if (saveIntervalType == \"hour\") {\n\t\tintervalTime = 60 * 60 * 1000;\n\t\ttimeToChangeFiendish = 3600;\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc15d2f40a187a88e7a5a27d09e1e1a9ddeca846c153083fc56b671437934ab6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10082, + "startColumn": 23, + "charOffset": 340713, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 10080, + "startColumn": 23, + "charOffset": 340620, + "charLength": 2, + "snippet": { + "text": "\t\ttimeToChangeFiendish = 60;\n\t} else if (saveIntervalType == \"hour\") {\n\t\tintervalTime = 60 * 60 * 1000;\n\t\ttimeToChangeFiendish = 3600;\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b5f47a173e67043b5e8d11e8f1552a87a33f2e6b7ed9d6b079d80b671206826" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10082, + "startColumn": 28, + "charOffset": 340718, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 10080, + "startColumn": 28, + "charOffset": 340620, + "charLength": 4, + "snippet": { + "text": "\t\ttimeToChangeFiendish = 60;\n\t} else if (saveIntervalType == \"hour\") {\n\t\tintervalTime = 60 * 60 * 1000;\n\t\ttimeToChangeFiendish = 3600;\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51908ad027e1ef964fe016d50a2654851c68cd6b85b8e1725251e6b4fbf88910" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "3600 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10083, + "startColumn": 26, + "charOffset": 340749, + "charLength": 4, + "snippet": { + "text": "3600" + } + }, + "contextRegion": { + "startLine": 10081, + "startColumn": 26, + "charOffset": 340649, + "charLength": 4, + "snippet": { + "text": "\t} else if (saveIntervalType == \"hour\") {\n\t\tintervalTime = 60 * 60 * 1000;\n\t\ttimeToChangeFiendish = 3600;\n\t} else {\n\t\ttimeToChangeFiendish = 3600;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3aa4779bf88a548ca2d3f90fe13a2f55def4931811afda9b91fce2de56e7b792" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "3600 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10085, + "startColumn": 26, + "charOffset": 340790, + "charLength": 4, + "snippet": { + "text": "3600" + } + }, + "contextRegion": { + "startLine": 10083, + "startColumn": 26, + "charOffset": 340724, + "charLength": 4, + "snippet": { + "text": "\t\ttimeToChangeFiendish = 3600;\n\t} else {\n\t\ttimeToChangeFiendish = 3600;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6a12223a11d0f4353a2d5cc2b38c8c1e2087849ecef82a261d132de770bceca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "3600 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10091, + "startColumn": 15, + "charOffset": 340947, + "charLength": 4, + "snippet": { + "text": "3600" + } + }, + "contextRegion": { + "startLine": 10089, + "startColumn": 15, + "charOffset": 340825, + "charLength": 4, + "snippet": { + "text": "\tif (intervalTime == 0) {\n\t\tg_logger().warn(\"Fiendish interval type is wrong, setting default time to 1h\");\n\t\tfinalTime = 3600 * 1000;\n\t} else {\n\t\tfinalTime = static_cast(saveIntervalConfigTime * intervalTime);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e9b1b3595a374b677548b908eebf1bda58093866f5ee0170c8af85c48c5ca83" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10091, + "startColumn": 22, + "charOffset": 340954, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 10089, + "startColumn": 22, + "charOffset": 340825, + "charLength": 4, + "snippet": { + "text": "\tif (intervalTime == 0) {\n\t\tg_logger().warn(\"Fiendish interval type is wrong, setting default time to 1h\");\n\t\tfinalTime = 3600 * 1000;\n\t} else {\n\t\tfinalTime = static_cast(saveIntervalConfigTime * intervalTime);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a827c73046f411b6e8160fb9a1505be81e51a2650f31969ccaf40fbaf40c8d5c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10100, + "startColumn": 36, + "charOffset": 341331, + "charLength": 5, + "snippet": { + "text": "getID" + } + }, + "contextRegion": { + "startLine": 10098, + "startColumn": 36, + "charOffset": 341188, + "charLength": 5, + "snippet": { + "text": "\t\tmonster->configureForgeSystem();\n\t\tmonster->setTimeToChangeFiendish(timeToChangeFiendish + getTimeNow());\n\t\tfiendishMonsters.insert(monster->getID());\n\n\t\tauto schedulerTask = createPlayerTask(" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf7629ac53c25adb079e2c9e3104e0ad188e381047c559f2198382593694e4a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10116, + "startColumn": 6, + "charOffset": 341826, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 10114, + "startColumn": 6, + "charOffset": 341665, + "charLength": 1, + "snippet": { + "text": "void Game::updateFiendishMonsterStatus(uint32_t monsterId, const std::string &monsterName) {\n\tstd::shared_ptr monster = getMonsterByID(monsterId);\n\tif (!monster) {\n\t\tg_logger().warn(\"[{}] Failed to update monster with id {} and name {}, monster not found\", __FUNCTION__, monsterId, monsterName);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d29ff09e3008a38dbb38944bda0304e3fb8dc27370d3199a70b27684cb6ba70f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10122, + "startColumn": 2, + "charOffset": 342018, + "charLength": 21, + "snippet": { + "text": "removeFiendishMonster" + } + }, + "contextRegion": { + "startLine": 10120, + "startColumn": 2, + "charOffset": 341983, + "charLength": 21, + "snippet": { + "text": "\n\tmonster->clearFiendishStatus();\n\tremoveFiendishMonster(monsterId, false);\n\tmakeFiendishMonster();\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82405ab104ec8f3017cc61857438bd80a19d9c931e27d86fcf9a548041a01083" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10123, + "startColumn": 2, + "charOffset": 342060, + "charLength": 19, + "snippet": { + "text": "makeFiendishMonster" + } + }, + "contextRegion": { + "startLine": 10121, + "startColumn": 2, + "charOffset": 341984, + "charLength": 19, + "snippet": { + "text": "\tmonster->clearFiendishStatus();\n\tremoveFiendishMonster(monsterId, false);\n\tmakeFiendishMonster();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bead6464201b7f93ba87af69263d469f6322b791511bd3edf7f26a6809ca9c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10127, + "startColumn": 2, + "charOffset": 342196, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 10125, + "startColumn": 2, + "charOffset": 342085, + "charLength": 2, + "snippet": { + "text": "\nbool Game::removeForgeMonster(uint32_t id, ForgeClassifications_t monsterForgeClassification, bool create) {\n\tif (monsterForgeClassification == ForgeClassifications_t::FORGE_FIENDISH_MONSTER) {\n\t\tremoveFiendishMonster(id, create);\n\t} else if (monsterForgeClassification == ForgeClassifications_t::FORGE_INFLUENCED_MONSTER) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e0493b018004d6b6f265f3f98bc497971095fb9bb6f1c52670e5cbcd851db7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10128, + "startColumn": 3, + "charOffset": 342282, + "charLength": 21, + "snippet": { + "text": "removeFiendishMonster" + } + }, + "contextRegion": { + "startLine": 10126, + "startColumn": 3, + "charOffset": 342086, + "charLength": 21, + "snippet": { + "text": "bool Game::removeForgeMonster(uint32_t id, ForgeClassifications_t monsterForgeClassification, bool create) {\n\tif (monsterForgeClassification == ForgeClassifications_t::FORGE_FIENDISH_MONSTER) {\n\t\tremoveFiendishMonster(id, create);\n\t} else if (monsterForgeClassification == ForgeClassifications_t::FORGE_INFLUENCED_MONSTER) {\n\t\tremoveInfluencedMonster(id, create);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b59e40c44c7aa1f3008a90274c09c155fc38547eec29b55b1c2ca9c8b41cd813" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10130, + "startColumn": 3, + "charOffset": 342413, + "charLength": 23, + "snippet": { + "text": "removeInfluencedMonster" + } + }, + "contextRegion": { + "startLine": 10128, + "startColumn": 3, + "charOffset": 342280, + "charLength": 23, + "snippet": { + "text": "\t\tremoveFiendishMonster(id, create);\n\t} else if (monsterForgeClassification == ForgeClassifications_t::FORGE_INFLUENCED_MONSTER) {\n\t\tremoveInfluencedMonster(id, create);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1dfe745c9f22175efcfe9af12c4ea6be7f321800deb3544f7f62bb8795e71fd6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10144, + "startColumn": 5, + "charOffset": 342740, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 10142, + "startColumn": 5, + "charOffset": 342687, + "charLength": 3, + "snippet": { + "text": "\t\tif (create) {\n\t\t\tg_dispatcher().scheduleEvent(\n\t\t\t\t200 * 1000, [this] { makeInfluencedMonster(); }, \"Game::makeInfluencedMonster\"\n\t\t\t);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c12a83099917c80f93859ecf51ee388a26187481aad38e8002d59617da645aab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10144, + "startColumn": 11, + "charOffset": 342746, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 10142, + "startColumn": 11, + "charOffset": 342687, + "charLength": 4, + "snippet": { + "text": "\t\tif (create) {\n\t\t\tg_dispatcher().scheduleEvent(\n\t\t\t\t200 * 1000, [this] { makeInfluencedMonster(); }, \"Game::makeInfluencedMonster\"\n\t\t\t);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a827c73046f411b6e8160fb9a1505be81e51a2650f31969ccaf40fbaf40c8d5c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10144, + "startColumn": 26, + "charOffset": 342761, + "charLength": 21, + "snippet": { + "text": "makeInfluencedMonster" + } + }, + "contextRegion": { + "startLine": 10142, + "startColumn": 26, + "charOffset": 342687, + "charLength": 21, + "snippet": { + "text": "\t\tif (create) {\n\t\t\tg_dispatcher().scheduleEvent(\n\t\t\t\t200 * 1000, [this] { makeInfluencedMonster(); }, \"Game::makeInfluencedMonster\"\n\t\t\t);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "481de73e5f83f05be7afd8e065d371fb706030940dc8e1deccb51ec8aa93a589" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10162, + "startColumn": 5, + "charOffset": 343304, + "charLength": 3, + "snippet": { + "text": "300" + } + }, + "contextRegion": { + "startLine": 10160, + "startColumn": 5, + "charOffset": 343251, + "charLength": 3, + "snippet": { + "text": "\t\tif (create) {\n\t\t\tg_dispatcher().scheduleEvent(\n\t\t\t\t300 * 1000, [this] { makeFiendishMonster(0, false); }, \"Game::makeFiendishMonster\"\n\t\t\t);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d720b716010d2b9c92726ab149717bc4061cff3456e1c0871001cbb5d47d4657" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10162, + "startColumn": 11, + "charOffset": 343310, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 10160, + "startColumn": 11, + "charOffset": 343251, + "charLength": 4, + "snippet": { + "text": "\t\tif (create) {\n\t\t\tg_dispatcher().scheduleEvent(\n\t\t\t\t300 * 1000, [this] { makeFiendishMonster(0, false); }, \"Game::makeFiendishMonster\"\n\t\t\t);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f7ce0e1fb00f91d02daa7b06d12d0b65e92eb21618c88ae649607ec8c01fdfd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10162, + "startColumn": 26, + "charOffset": 343325, + "charLength": 19, + "snippet": { + "text": "makeFiendishMonster" + } + }, + "contextRegion": { + "startLine": 10160, + "startColumn": 26, + "charOffset": 343251, + "charLength": 19, + "snippet": { + "text": "\t\tif (create) {\n\t\t\tg_dispatcher().scheduleEvent(\n\t\t\t\t300 * 1000, [this] { makeFiendishMonster(0, false); }, \"Game::makeFiendishMonster\"\n\t\t\t);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c4919ac109190bdc1329a6716bc6882a267f50b19dc9917e6bb04eda52b2899" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10200, + "startColumn": 2, + "charOffset": 344454, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 10198, + "startColumn": 2, + "charOffset": 344301, + "charLength": 5, + "snippet": { + "text": "\tuint32_t created = 0;\n\tuint32_t fiendishLimit = g_configManager().getNumber(FORGE_FIENDISH_CREATURES_LIMIT, __FUNCTION__); // Fiendish Creatures limit\n\twhile (fiendishMonsters.size() < fiendishLimit) {\n\t\tif (fiendishMonsters.size() >= fiendishLimit) {\n\t\t\tg_logger().warn(\"[{}] - Returning in creation of Fiendish, size: {}, max is: {}.\", __FUNCTION__, fiendishMonsters.size(), fiendishLimit);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "749c94d741dcb15df28118a1519d10834ac940ec4a350dd87e4a20ec3c18a874" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'fiendishLimit' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10200, + "startColumn": 9, + "charOffset": 344461, + "charLength": 16, + "snippet": { + "text": "fiendishMonsters" + } + }, + "contextRegion": { + "startLine": 10198, + "startColumn": 9, + "charOffset": 344301, + "charLength": 16, + "snippet": { + "text": "\tuint32_t created = 0;\n\tuint32_t fiendishLimit = g_configManager().getNumber(FORGE_FIENDISH_CREATURES_LIMIT, __FUNCTION__); // Fiendish Creatures limit\n\twhile (fiendishMonsters.size() < fiendishLimit) {\n\t\tif (fiendishMonsters.size() >= fiendishLimit) {\n\t\t\tg_logger().warn(\"[{}] - Returning in creation of Fiendish, size: {}, max is: {}.\", __FUNCTION__, fiendishMonsters.size(), fiendishLimit);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f28f26515753d8303ce1a19f88de30e96c8b057f41dfbe523c1d6ffb2fa13832" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10202, + "startColumn": 118, + "charOffset": 344671, + "charLength": 4, + "snippet": { + "text": "size" + } + }, + "contextRegion": { + "startLine": 10200, + "startColumn": 118, + "charOffset": 344453, + "charLength": 4, + "snippet": { + "text": "\twhile (fiendishMonsters.size() < fiendishLimit) {\n\t\tif (fiendishMonsters.size() >= fiendishLimit) {\n\t\t\tg_logger().warn(\"[{}] - Returning in creation of Fiendish, size: {}, max is: {}.\", __FUNCTION__, fiendishMonsters.size(), fiendishLimit);\n\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ccc2ecfc0d424ccd83281d7440af4d734703661eeb170223502bd2540103b483" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10219, + "startColumn": 2, + "charOffset": 344991, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 10217, + "startColumn": 2, + "charOffset": 344862, + "charLength": 5, + "snippet": { + "text": "\tuint32_t created = 0;\n\tuint32_t influencedLimit = g_configManager().getNumber(FORGE_INFLUENCED_CREATURES_LIMIT, __FUNCTION__);\n\twhile (created < influencedLimit) {\n\t\tif (influencedMonsters.size() >= influencedLimit) {\n\t\t\tg_logger().warn(\"[{}] - Returning in creation of Influenced, size: {}, max is: {}.\", __FUNCTION__, influencedMonsters.size(), influencedLimit);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26c36c94826a2e2509c40dd081998cba81f7c8d86765c5a004874a3f2aaa76ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'influencedLimit' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10219, + "startColumn": 9, + "charOffset": 344998, + "charLength": 7, + "snippet": { + "text": "created" + } + }, + "contextRegion": { + "startLine": 10217, + "startColumn": 9, + "charOffset": 344862, + "charLength": 7, + "snippet": { + "text": "\tuint32_t created = 0;\n\tuint32_t influencedLimit = g_configManager().getNumber(FORGE_INFLUENCED_CREATURES_LIMIT, __FUNCTION__);\n\twhile (created < influencedLimit) {\n\t\tif (influencedMonsters.size() >= influencedLimit) {\n\t\t\tg_logger().warn(\"[{}] - Returning in creation of Influenced, size: {}, max is: {}.\", __FUNCTION__, influencedMonsters.size(), influencedLimit);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77ea7c9f0e772cb65a2d527e7c352aa677af7c46c8094abd77283b13931ff12e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10221, + "startColumn": 122, + "charOffset": 345202, + "charLength": 4, + "snippet": { + "text": "size" + } + }, + "contextRegion": { + "startLine": 10219, + "startColumn": 122, + "charOffset": 344990, + "charLength": 4, + "snippet": { + "text": "\twhile (created < influencedLimit) {\n\t\tif (influencedMonsters.size() >= influencedLimit) {\n\t\t\tg_logger().warn(\"[{}] - Returning in creation of Influenced, size: {}, max is: {}.\", __FUNCTION__, influencedMonsters.size(), influencedLimit);\n\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bce2d1167f8f3f0298a2e63da4ac71ec3f29360bc56780726f68ed8209fa44a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10243, + "startColumn": 58, + "charOffset": 345646, + "charLength": 7, + "snippet": { + "text": "monster" + } + }, + "contextRegion": { + "startLine": 10241, + "startColumn": 58, + "charOffset": 345586, + "charLength": 7, + "snippet": { + "text": "}\n\nbool Game::addInfluencedMonster(std::shared_ptr monster) {\n\tif (monster && monster->canBeForgeMonster()) {\n\t\tif (auto maxInfluencedMonsters = static_cast(g_configManager().getNumber(FORGE_INFLUENCED_CREATURES_LIMIT, __FUNCTION__));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82726efb53c150afdffaabc78035d7887867547add206e62abba31993049e403" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10253, + "startColumn": 38, + "charOffset": 346113, + "charLength": 5, + "snippet": { + "text": "getID" + } + }, + "contextRegion": { + "startLine": 10251, + "startColumn": 38, + "charOffset": 345949, + "charLength": 5, + "snippet": { + "text": "\t\tmonster->setMonsterForgeClassification(ForgeClassifications_t::FORGE_INFLUENCED_MONSTER);\n\t\tmonster->configureForgeSystem();\n\t\tinfluencedMonsters.insert(monster->getID());\n\t\treturn true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72c3ba89c59129bbb8a9a7400d38e3cb9892c7a7652bdf64a4bfd4d4164c8253" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'addItemStoreInbox' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10259, + "startColumn": 12, + "charOffset": 346170, + "charLength": 17, + "snippet": { + "text": "addItemStoreInbox" + } + }, + "contextRegion": { + "startLine": 10257, + "startColumn": 12, + "charOffset": 346156, + "charLength": 17, + "snippet": { + "text": "}\n\nbool Game::addItemStoreInbox(std::shared_ptr player, uint32_t itemId) {\n\tstd::shared_ptr decoKit = Item::CreateItem(ITEM_DECORATION_KIT, 1);\n\tif (!decoKit) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "abfd5a0b414a444eeebb8c761477c82abde53bb9e27eb7d02d4d85353f4b942c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10259, + "startColumn": 54, + "charOffset": 346212, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 10257, + "startColumn": 54, + "charOffset": 346156, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Game::addItemStoreInbox(std::shared_ptr player, uint32_t itemId) {\n\tstd::shared_ptr decoKit = Item::CreateItem(ITEM_DECORATION_KIT, 1);\n\tif (!decoKit) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2aa96bfb9a45c68d851fc2bbeca1cb73bf502028a79925601ae15b6c97f8caa7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10261, + "startColumn": 6, + "charOffset": 346319, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 10259, + "startColumn": 6, + "charOffset": 346159, + "charLength": 1, + "snippet": { + "text": "bool Game::addItemStoreInbox(std::shared_ptr player, uint32_t itemId) {\n\tstd::shared_ptr decoKit = Item::CreateItem(ITEM_DECORATION_KIT, 1);\n\tif (!decoKit) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f82ab125d778fd58608fa5f4570e67568ebba362d0d68246e3765d246018b00d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10270, + "startColumn": 6, + "charOffset": 346722, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 10268, + "startColumn": 6, + "charOffset": 346642, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr thing = player->getThing(CONST_SLOT_STORE_INBOX);\n\tif (!thing) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b045224ce1029ca9d24bfafad719c3d80d05f1461358b5b05a005844915917a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10275, + "startColumn": 6, + "charOffset": 346810, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 10273, + "startColumn": 6, + "charOffset": 346751, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr inboxItem = thing->getItem();\n\tif (!inboxItem) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7b436ee8fe8f60d3ea886f046e34043e7b7dabf76428d9d1928fdad6b3c9685" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10280, + "startColumn": 6, + "charOffset": 346921, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 10278, + "startColumn": 6, + "charOffset": 346843, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr inboxContainer = inboxItem->getContainer();\n\tif (!inboxContainer) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7805f730f5ba26443458d539c0d4a417339ca7836f7fa494530e36f7795b248" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'addPlayerUniqueLogin' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10291, + "startColumn": 12, + "charOffset": 347109, + "charLength": 20, + "snippet": { + "text": "addPlayerUniqueLogin" + } + }, + "contextRegion": { + "startLine": 10289, + "startColumn": 12, + "charOffset": 347095, + "charLength": 20, + "snippet": { + "text": "}\n\nvoid Game::addPlayerUniqueLogin(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().error(\"Attempted to add null player to unique player names list\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3245ce3366412b52a9c70590d9014f7c8effe79c5016232058ec3540d0d52e2d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10291, + "startColumn": 57, + "charOffset": 347154, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 10289, + "startColumn": 57, + "charOffset": 347095, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::addPlayerUniqueLogin(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().error(\"Attempted to add null player to unique player names list\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b90d523b708c1ddaa1b1e307291541fa27891f4fd961327c7955a64894aa9b09" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10292, + "startColumn": 6, + "charOffset": 347169, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 10290, + "startColumn": 6, + "charOffset": 347097, + "charLength": 1, + "snippet": { + "text": "\nvoid Game::addPlayerUniqueLogin(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().error(\"Attempted to add null player to unique player names list\");\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28fac27920b4d00c7f53deb56193176ef31da31d814d30786f22f062a3255c23" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10321, + "startColumn": 60, + "charOffset": 348158, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 10319, + "startColumn": 60, + "charOffset": 348096, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Game::removePlayerUniqueLogin(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().error(\"Attempted to remove null player from unique player names list.\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62ac4f975a749a13d5c10b413fe577ce4decfea45d7384be782bb523247481bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10322, + "startColumn": 6, + "charOffset": 348173, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 10320, + "startColumn": 6, + "charOffset": 348098, + "charLength": 1, + "snippet": { + "text": "\nvoid Game::removePlayerUniqueLogin(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().error(\"Attempted to remove null player from unique player names list.\");\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45a870bbfaf5d1f5d3d9ef5b3a17f1345ca3115650c79f75b5fa920e166d7095" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10333, + "startColumn": 6, + "charOffset": 348560, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 10331, + "startColumn": 6, + "charOffset": 348409, + "charLength": 1, + "snippet": { + "text": "void Game::playerCheckActivity(const std::string &playerName, int interval) {\n\tstd::shared_ptr player = getPlayerUniqueLogin(playerName);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1db298bc6cc91eaf813906570f4994eca63a949c32213b35271c3a7353ccc940" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10340, + "startColumn": 97, + "charOffset": 348814, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 10338, + "startColumn": 97, + "charOffset": 348614, + "charLength": 7, + "snippet": { + "text": "\t\tg_game().removePlayerUniqueLogin(playerName);\n\t\tIOLoginData::updateOnlineStatus(player->guid, false);\n\t\tg_logger().info(\"Player with name '{}' has logged out due to exited in death screen\", player->getName());\n\t\tplayer->disconnect();\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eab71ef86bf30c32a251ebacbbac40d3ec710b4ade675e8ac7d731fd14400c21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10352, + "startColumn": 49, + "charOffset": 349148, + "charLength": 5, + "snippet": { + "text": "60000" + } + }, + "contextRegion": { + "startLine": 10350, + "startColumn": 49, + "charOffset": 348967, + "charLength": 5, + "snippet": { + "text": "\t\tplayer->m_deathTime += interval;\n\t\tconst int32_t kickAfterMinutes = g_configManager().getNumber(KICK_AFTER_MINUTES, __FUNCTION__);\n\t\tif (player->m_deathTime > (kickAfterMinutes * 60000) + 60000) {\n\t\t\tg_logger().info(\"Player with name '{}' has logged out due to inactivity after death\", player->getName());\n\t\t\tg_game().removePlayerUniqueLogin(playerName);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7aba93713c3ef5c9c810957a0e4f0a1b95050ef896f22f1038796cf9f8d85e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10352, + "startColumn": 58, + "charOffset": 349157, + "charLength": 5, + "snippet": { + "text": "60000" + } + }, + "contextRegion": { + "startLine": 10350, + "startColumn": 58, + "charOffset": 348967, + "charLength": 5, + "snippet": { + "text": "\t\tplayer->m_deathTime += interval;\n\t\tconst int32_t kickAfterMinutes = g_configManager().getNumber(KICK_AFTER_MINUTES, __FUNCTION__);\n\t\tif (player->m_deathTime > (kickAfterMinutes * 60000) + 60000) {\n\t\t\tg_logger().info(\"Player with name '{}' has logged out due to inactivity after death\", player->getName());\n\t\t\tg_game().removePlayerUniqueLogin(playerName);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fec31adeb301b9388d8646d65ca27899efcd3d008c9930ae1969b5991a90393" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10353, + "startColumn": 98, + "charOffset": 349263, + "charLength": 7, + "snippet": { + "text": "getName" + } + }, + "contextRegion": { + "startLine": 10351, + "startColumn": 98, + "charOffset": 349002, + "charLength": 7, + "snippet": { + "text": "\t\tconst int32_t kickAfterMinutes = g_configManager().getNumber(KICK_AFTER_MINUTES, __FUNCTION__);\n\t\tif (player->m_deathTime > (kickAfterMinutes * 60000) + 60000) {\n\t\t\tg_logger().info(\"Player with name '{}' has logged out due to inactivity after death\", player->getName());\n\t\t\tg_game().removePlayerUniqueLogin(playerName);\n\t\t\tIOLoginData::updateOnlineStatus(player->guid, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "465a60dd4e1ee5449e1d7728d3745ed2d5dea541a4f30c54d99ff08e7725970f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10362, + "startColumn": 3, + "charOffset": 349458, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 10360, + "startColumn": 3, + "charOffset": 349424, + "charLength": 4, + "snippet": { + "text": "\n\tg_dispatcher().scheduleEvent(\n\t\t1000, [this, playerName, interval] { playerCheckActivity(playerName, interval); }, \"Game::playerCheckActivity\"\n\t);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3aa9fc43835b412887ccc868e2f84c8b142c619191c194999593a1d979cc27a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10368, + "startColumn": 6, + "charOffset": 349785, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 10366, + "startColumn": 6, + "charOffset": 349576, + "charLength": 1, + "snippet": { + "text": "void Game::playerRewardChestCollect(uint32_t playerId, const Position &pos, uint16_t itemId, uint8_t stackPos, uint32_t maxMoveItems /* = 0*/) {\n\tstd::shared_ptr player = getPlayerByID(playerId);\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "581be10f2dda381f00adf76d2a9c7c52ca051a40341f516a5b00147eb7c9f56e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10373, + "startColumn": 6, + "charOffset": 349917, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 10371, + "startColumn": 6, + "charOffset": 349809, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr thing = internalGetThing(player, pos, stackPos, itemId, STACKPOS_FIND_THING);\n\tif (!thing) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9db4edb4fc5516ccb409053a5fe184c117cf1421c9c9ad3f818649b1fcc18288" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10379, + "startColumn": 6, + "charOffset": 350031, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 10377, + "startColumn": 6, + "charOffset": 349994, + "charLength": 1, + "snippet": { + "text": "\n\tauto item = thing->getItem();\n\tif (!item || item->getID() != ITEM_REWARD_CHEST || !item->getContainer()) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3f21aba18b9d8e649f4a09cfad44526f51ad5615ddf470b43e8bfc8da52b9ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10379, + "startColumn": 53, + "charOffset": 350078, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 10377, + "startColumn": 53, + "charOffset": 349994, + "charLength": 1, + "snippet": { + "text": "\n\tauto item = thing->getItem();\n\tif (!item || item->getID() != ITEM_REWARD_CHEST || !item->getContainer()) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68671d98d659b78f936d91c6c8c5b50b3f622602dc6673a04cd8af2b0ef1c392" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10399, + "startColumn": 66, + "charOffset": 350772, + "charLength": 7, + "snippet": { + "text": "getTile" + } + }, + "contextRegion": { + "startLine": 10397, + "startColumn": 66, + "charOffset": 350703, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tplayerRewardChest->setParent(item->getContainer()->getParent()->getTile());\n\tfor (const auto &[mapRewardId, reward] : player->rewardMap) {\n\t\treward->setParent(playerRewardChest);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79bdb1ece986be654b1ce80504501c709f888a116f61cefcbb7752d8d4433444" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10412, + "startColumn": 58, + "charOffset": 351174, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 10410, + "startColumn": 58, + "charOffset": 351114, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Game::tryRetrieveStashItems(std::shared_ptr player, std::shared_ptr item) {\n\tObjectCategory_t category = getObjectCategory(item);\n\treturn internalCollectManagedItems(std::move(player), item, category, false) == RETURNVALUE_NOERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "495b45ca4b5d6012ed66a9a98e3bbfebe5fa92e5878345aa2e368a4010c9d066" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10412, + "startColumn": 88, + "charOffset": 351204, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 10410, + "startColumn": 88, + "charOffset": 351114, + "charLength": 4, + "snippet": { + "text": "}\n\nbool Game::tryRetrieveStashItems(std::shared_ptr player, std::shared_ptr item) {\n\tObjectCategory_t category = getObjectCategory(item);\n\treturn internalCollectManagedItems(std::move(player), item, category, false) == RETURNVALUE_NOERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb9eac1297a94776aa821f380e1035bc9346242c3b638a036a368e208bad58c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10457, + "startColumn": 3, + "charOffset": 352509, + "charLength": 3, + "snippet": { + "text": "Map" + } + }, + "contextRegion": { + "startLine": 10455, + "startColumn": 3, + "charOffset": 352382, + "charLength": 3, + "snippet": { + "text": "\t\tg_logger().info(\"Finished house transfer items from '{}' players\", transferSuccess);\n\t\ttransferHouseItemsToPlayer.clear();\n\t\tMap::save();\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53a036081567505fb06c781ac9bbbe84a0dba75655fe46593fc195d4d867585d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'beforeCreatureZoneChange' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10479, + "startColumn": 19, + "charOffset": 352986, + "charLength": 24, + "snippet": { + "text": "beforeCreatureZoneChange" + } + }, + "contextRegion": { + "startLine": 10477, + "startColumn": 19, + "charOffset": 352965, + "charLength": 24, + "snippet": { + "text": "}\n\nReturnValue Game::beforeCreatureZoneChange(std::shared_ptr creature, const std::unordered_set> &fromZones, const std::unordered_set> &toZones, bool force /* = false*/) const {\n\tif (!creature) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6cb237a24e2452ded4b877a0f3d742564acccb5715d6f0183fb5528aec5102ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10479, + "startColumn": 70, + "charOffset": 353037, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 10477, + "startColumn": 70, + "charOffset": 352965, + "charLength": 8, + "snippet": { + "text": "}\n\nReturnValue Game::beforeCreatureZoneChange(std::shared_ptr creature, const std::unordered_set> &fromZones, const std::unordered_set> &toZones, bool force /* = false*/) const {\n\tif (!creature) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2427124bab9aebb91a67358fd956c42ab61319133012f0464367a95e0640f7eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'beforeCreatureZoneChange' of similar type ('const int &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10479, + "startColumn": 80, + "charOffset": 353047, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 10477, + "startColumn": 80, + "charOffset": 352965, + "charLength": 5, + "snippet": { + "text": "}\n\nReturnValue Game::beforeCreatureZoneChange(std::shared_ptr creature, const std::unordered_set> &fromZones, const std::unordered_set> &toZones, bool force /* = false*/) const {\n\tif (!creature) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94bd246b9f5f6262e3be7c0448f67aa9ff5b8e54101c29eb33f5185ffb0f8d5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10480, + "startColumn": 6, + "charOffset": 353203, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 10478, + "startColumn": 6, + "charOffset": 352967, + "charLength": 1, + "snippet": { + "text": "\nReturnValue Game::beforeCreatureZoneChange(std::shared_ptr creature, const std::unordered_set> &fromZones, const std::unordered_set> &toZones, bool force /* = false*/) const {\n\tif (!creature) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd2783d15884bec26d037670d5bc866f93b0f054276cbf2593001d49cd4ac415" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'afterCreatureZoneChange' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10509, + "startColumn": 12, + "charOffset": 354132, + "charLength": 23, + "snippet": { + "text": "afterCreatureZoneChange" + } + }, + "contextRegion": { + "startLine": 10507, + "startColumn": 12, + "charOffset": 354118, + "charLength": 23, + "snippet": { + "text": "}\n\nvoid Game::afterCreatureZoneChange(std::shared_ptr creature, const std::unordered_set> &fromZones, const std::unordered_set> &toZones) const {\n\tif (!creature) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dff9b11d98e5917c1f47f9f4075dca17aa1b2760b1f7e10e024dadc4e436cfad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10509, + "startColumn": 62, + "charOffset": 354182, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 10507, + "startColumn": 62, + "charOffset": 354118, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Game::afterCreatureZoneChange(std::shared_ptr creature, const std::unordered_set> &fromZones, const std::unordered_set> &toZones) const {\n\tif (!creature) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c59a16ead256bc2aeeb4788b79643d90c6f48e355159c3195fdeba0a8487e10" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'afterCreatureZoneChange' of similar type ('const int &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10509, + "startColumn": 72, + "charOffset": 354192, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 10507, + "startColumn": 72, + "charOffset": 354118, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid Game::afterCreatureZoneChange(std::shared_ptr creature, const std::unordered_set> &fromZones, const std::unordered_set> &toZones) const {\n\tif (!creature) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89d1df6cefd0ff25d2e11550d4e8c749b4debf1739b070fa89af4c35ecb2beea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10510, + "startColumn": 6, + "charOffset": 354323, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 10508, + "startColumn": 6, + "charOffset": 354120, + "charLength": 1, + "snippet": { + "text": "\nvoid Game::afterCreatureZoneChange(std::shared_ptr creature, const std::unordered_set> &fromZones, const std::unordered_set> &toZones) const {\n\tif (!creature) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b90030825ac44eef7e6fd6d60d909fe963041f78907202533d89074b47b338ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'registerAchievement' of similar type ('std::string') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10542, + "startColumn": 45, + "charOffset": 355378, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 10540, + "startColumn": 45, + "charOffset": 355331, + "charLength": 3, + "snippet": { + "text": "}\n\nvoid Game::registerAchievement(uint16_t id, std::string name, std::string description, bool secret, uint8_t grade, uint8_t points) {\n\tm_achievements[id] = Achievement();\n\tm_achievements[id].id = id;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca105c64c88f44625cd35ca85fecae25192657b9443674a3567e97f987d88016" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10542, + "startColumn": 57, + "charOffset": 355390, + "charLength": 4, + "snippet": { + "text": "name" + } + }, + "contextRegion": { + "startLine": 10540, + "startColumn": 57, + "charOffset": 355331, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Game::registerAchievement(uint16_t id, std::string name, std::string description, bool secret, uint8_t grade, uint8_t points) {\n\tm_achievements[id] = Achievement();\n\tm_achievements[id].id = id;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6bf13a2b28521784cfd49454047b27b848b1568a2d6294a53f3e3ca08d4221a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'description' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10542, + "startColumn": 75, + "charOffset": 355408, + "charLength": 11, + "snippet": { + "text": "description" + } + }, + "contextRegion": { + "startLine": 10540, + "startColumn": 75, + "charOffset": 355331, + "charLength": 11, + "snippet": { + "text": "}\n\nvoid Game::registerAchievement(uint16_t id, std::string name, std::string description, bool secret, uint8_t grade, uint8_t points) {\n\tm_achievements[id] = Achievement();\n\tm_achievements[id].id = id;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82f425f26879dc803c9ec2df84c43639a1e17ab447c853a2a70f12bb9139da93" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'registerAchievement' of similar type ('uint8_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10542, + "startColumn": 101, + "charOffset": 355434, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 10540, + "startColumn": 101, + "charOffset": 355331, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid Game::registerAchievement(uint16_t id, std::string name, std::string description, bool secret, uint8_t grade, uint8_t points) {\n\tm_achievements[id] = Achievement();\n\tm_achievements[id].id = id;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c848693714601e02e92a12900a41213edba6970fffc393ed8265941e3b527be6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10558, + "startColumn": 52, + "charOffset": 355914, + "charLength": 4, + "snippet": { + "text": "name" + } + }, + "contextRegion": { + "startLine": 10556, + "startColumn": 52, + "charOffset": 355860, + "charLength": 4, + "snippet": { + "text": "}\n\nAchievement Game::getAchievementByName(std::string name) {\n\tauto it = m_achievementsNameToId.find(name);\n\tif (it != m_achievementsNameToId.end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6ead889312c176cc1bb054eae873d605cabeb089c438c0bcbdd8209f003bb0e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getSecretAchievements' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10566, + "startColumn": 32, + "charOffset": 356101, + "charLength": 21, + "snippet": { + "text": "getSecretAchievements" + } + }, + "contextRegion": { + "startLine": 10564, + "startColumn": 32, + "charOffset": 356067, + "charLength": 21, + "snippet": { + "text": "}\n\nstd::vector Game::getSecretAchievements() {\n\tstd::vector secrets;\n\tfor (const auto &achievement : m_achievements) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "004266039d9e65bfd72cf8604ddc5793c7773eb245f2a5e0cf8e2f8b51da4e28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getPublicAchievements' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10577, + "startColumn": 32, + "charOffset": 356351, + "charLength": 21, + "snippet": { + "text": "getPublicAchievements" + } + }, + "contextRegion": { + "startLine": 10575, + "startColumn": 32, + "charOffset": 356317, + "charLength": 21, + "snippet": { + "text": "}\n\nstd::vector Game::getPublicAchievements() {\n\tstd::vector publics;\n\tfor (const auto &achievement : m_achievements) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75884d3a73fdb2e5fc0caf5284351a210a865845d3698d14b00c8965f1f6bae7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10593, + "startColumn": 65, + "charOffset": 356754, + "charLength": 4, + "snippet": { + "text": "size" + } + }, + "contextRegion": { + "startLine": 10591, + "startColumn": 65, + "charOffset": 356655, + "charLength": 4, + "snippet": { + "text": "\nvoid Game::logCyclopediaStats() {\n\tg_logger().info(\"Loaded {} badges from Badge System\", m_badges.size());\n\tg_logger().info(\"Loaded {} titles from Title system\", m_titles.size());\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ec12206aca291b8c2af13dba10d9d58758b5f65d673ed3a50305ca1ef480db4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.cpp" + }, + "region": { + "startLine": 10594, + "startColumn": 65, + "charOffset": 356827, + "charLength": 4, + "snippet": { + "text": "size" + } + }, + "contextRegion": { + "startLine": 10592, + "startColumn": 65, + "charOffset": 356656, + "charLength": 4, + "snippet": { + "text": "void Game::logCyclopediaStats() {\n\tg_logger().info(\"Loaded {} badges from Badge System\", m_badges.size());\n\tg_logger().info(\"Loaded {} titles from Title system\", m_titles.size());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "712a2f6767a95655e2dd088c7987204e599e58f75ebfce5d21e214cf18ec98b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Game::removeMoney' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "index": 1 + }, + "region": { + "startLine": 247, + "startColumn": 7, + "charOffset": 9404, + "charLength": 11, + "snippet": { + "text": "removeMoney" + } + }, + "contextRegion": { + "startLine": 245, + "startColumn": 7, + "charOffset": 9368, + "charLength": 11, + "snippet": { + "text": "\tvoid createLuaItemsOnMap();\n\n\tbool removeMoney(std::shared_ptr cylinder, uint64_t money, uint32_t flags = 0, bool useBank = false);\n\n\tvoid addMoney(std::shared_ptr cylinder, uint64_t money, uint32_t flags = 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6fa56096e552981d76a60789e8a9fdd9776eef818b645d5e691ad386602cb7b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Game::playerTeleport' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "index": 1 + }, + "region": { + "startLine": 326, + "startColumn": 7, + "charOffset": 13822, + "charLength": 14, + "snippet": { + "text": "playerTeleport" + } + }, + "contextRegion": { + "startLine": 324, + "startColumn": 7, + "charOffset": 13771, + "charLength": 14, + "snippet": { + "text": "\n\t// Implementation of player invoked events\n\tvoid playerTeleport(uint32_t playerId, const Position &pos);\n\tvoid playerMoveThing(uint32_t playerId, const Position &fromPos, uint16_t itemId, uint8_t fromStackPos, const Position &toPos, uint8_t count);\n\tvoid playerMoveCreatureByID(uint32_t playerId, uint32_t movingCreatureId, const Position &movingCreatureOrigPos, const Position &toPos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea1d552eff2e4e1b63e06a4d363fcf77ef74822fdb7253b01e506a984ef646fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Game::isSightClear' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "index": 1 + }, + "region": { + "startLine": 446, + "startColumn": 7, + "charOffset": 23042, + "charLength": 12, + "snippet": { + "text": "isSightClear" + } + }, + "contextRegion": { + "startLine": 444, + "startColumn": 7, + "charOffset": 22820, + "charLength": 12, + "snippet": { + "text": "\n\tbool canThrowObjectTo(const Position &fromPos, const Position &toPos, SightLines_t lineOfSight = SightLine_CheckSightLine, int32_t rangex = MAP_MAX_CLIENT_VIEW_PORT_X, int32_t rangey = MAP_MAX_CLIENT_VIEW_PORT_Y);\n\tbool isSightClear(const Position &fromPos, const Position &toPos, bool sameFloor);\n\n\tvoid changeSpeed(std::shared_ptr creature, int32_t varSpeedDelta);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a309401af2a2172ccc174695052552bfb18a561c5f67901de02fc8065e99509" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Game::internalCreatureChangeOutfit' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "index": 1 + }, + "region": { + "startLine": 451, + "startColumn": 7, + "charOffset": 23387, + "charLength": 28, + "snippet": { + "text": "internalCreatureChangeOutfit" + } + }, + "contextRegion": { + "startLine": 449, + "startColumn": 7, + "charOffset": 23199, + "charLength": 28, + "snippet": { + "text": "\tvoid setCreatureSpeed(std::shared_ptr creature, int32_t speed); // setCreatureSpeed\n\tvoid changePlayerSpeed(const std::shared_ptr &player, int32_t varSpeedDelta);\n\tvoid internalCreatureChangeOutfit(std::shared_ptr creature, const Outfit_t &oufit);\n\tvoid internalCreatureChangeVisible(std::shared_ptr creature, bool visible);\n\tvoid changeLight(const std::shared_ptr creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "587b71e2fa8119bc1f8fb1241f9ed7b20e735e8df1486bda5fbbfd0679a27ddc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Game::updateCreatureSkull' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "index": 1 + }, + "region": { + "startLine": 456, + "startColumn": 7, + "charOffset": 23762, + "charLength": 19, + "snippet": { + "text": "updateCreatureSkull" + } + }, + "contextRegion": { + "startLine": 454, + "startColumn": 7, + "charOffset": 23624, + "charLength": 19, + "snippet": { + "text": "\tvoid updateCreatureIcon(const std::shared_ptr creature);\n\tvoid reloadCreature(const std::shared_ptr creature);\n\tvoid updateCreatureSkull(std::shared_ptr player);\n\tvoid updatePlayerShield(std::shared_ptr player);\n\tvoid updateCreatureType(std::shared_ptr creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a59d34694ab322310653dd2e7ccb9bd66eb220494ffec4731ae206af7a733398" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Game::addMonster' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "index": 1 + }, + "region": { + "startLine": 560, + "startColumn": 7, + "charOffset": 28687, + "charLength": 10, + "snippet": { + "text": "addMonster" + } + }, + "contextRegion": { + "startLine": 558, + "startColumn": 7, + "charOffset": 28637, + "charLength": 10, + "snippet": { + "text": "\tvoid removeNpc(std::shared_ptr npc);\n\n\tvoid addMonster(std::shared_ptr npc);\n\tvoid removeMonster(std::shared_ptr npc);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e131c024bb498de93ddb592afb15a98f4904370619eabf60355a449f7784b7b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Game::removeMonster' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "index": 1 + }, + "region": { + "startLine": 561, + "startColumn": 7, + "charOffset": 28735, + "charLength": 13, + "snippet": { + "text": "removeMonster" + } + }, + "contextRegion": { + "startLine": 559, + "startColumn": 7, + "charOffset": 28680, + "charLength": 13, + "snippet": { + "text": "\n\tvoid addMonster(std::shared_ptr npc);\n\tvoid removeMonster(std::shared_ptr npc);\n\n\tstd::shared_ptr getGuild(uint32_t id, bool allowOffline = false) const;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4cf5c983cd913a13b333cbdb0e9b90af0398df58b47fea675d1bb54ed1846783" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Game::findNextAvailableContainer' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/game.hpp", + "index": 1 + }, + "region": { + "startLine": 788, + "startColumn": 29, + "charOffset": 38448, + "charLength": 26, + "snippet": { + "text": "findNextAvailableContainer" + } + }, + "contextRegion": { + "startLine": 786, + "startColumn": 29, + "charOffset": 38338, + "charLength": 26, + "snippet": { + "text": "\t * @return Pointer to the next available container or nullptr if not found.\n\t */\n\tstd::shared_ptr findNextAvailableContainer(ContainerIterator &containerIterator, std::shared_ptr &lastSubContainer, std::shared_ptr &lootContainer);\n\n\t/**" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2005ad0b039e9134a5e3b6bbbac9f48fb7cf52b6333729d66114bfd10cb01d80" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 6, + "charOffset": 765, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 6, + "charOffset": 698, + "charLength": 1, + "snippet": { + "text": "bool ConfigManager::load() {\n\tlua_State* L = luaL_newstate();\n\tif (!L) {\n\t\tthrow std::ios_base::failure(\"Failed to allocate memory\");\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aceba10365209dfac58c40b427bb493015ee880a4852f60a94271c956876fc88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'lua_State *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 7, + "charOffset": 766, + "charLength": 1, + "snippet": { + "text": "L" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 7, + "charOffset": 698, + "charLength": 1, + "snippet": { + "text": "bool ConfigManager::load() {\n\tlua_State* L = luaL_newstate();\n\tif (!L) {\n\t\tthrow std::ios_base::failure(\"Failed to allocate memory\");\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf124272d1de1f9bd7aeb1d10a56cbd368c6ed2fa1a6b1398ae44886bebe513d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 6, + "charOffset": 861, + "charLength": 11, + "snippet": { + "text": "luaL_dofile" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 6, + "charOffset": 836, + "charLength": 11, + "snippet": { + "text": "\tluaL_openlibs(L);\n\n\tif (luaL_dofile(L, configFileLua.c_str())) {\n\t\tg_logger().error(\"[ConfigManager::load] - {}\", lua_tostring(L, -1));\n\t\tlua_close(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74bd70077c6b071809bf9e3f4e7a3700d7e4e490c3bc9b94dc7029fbae04095c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 6, + "charOffset": 861, + "charLength": 11, + "snippet": { + "text": "luaL_dofile" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 6, + "charOffset": 836, + "charLength": 11, + "snippet": { + "text": "\tluaL_openlibs(L);\n\n\tif (luaL_dofile(L, configFileLua.c_str())) {\n\t\tg_logger().error(\"[ConfigManager::load] - {}\", lua_tostring(L, -1));\n\t\tlua_close(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e67533680b8010851fcd541d79fa3f5d8df56e0c7e6db1e9261de5894141a070" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 47, + "startColumn": 3, + "charOffset": 1220, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 45, + "startColumn": 3, + "charOffset": 1125, + "charLength": 14, + "snippet": { + "text": "\t// Info that must be loaded one time (unless we reset the modules involved)\n\tif (!loaded) {\n\t\tloadBoolConfig(L, BIND_ONLY_GLOBAL_ADDRESS, \"bindOnlyGlobalAddress\", false);\n\t\tloadBoolConfig(L, DISABLE_LEGACY_RAIDS, \"disableLegacyRaids\", false);\n\t\tloadBoolConfig(L, OLD_PROTOCOL, \"allowOldProtocol\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c40eae302b8fe575e7863a234119f0db706ab252514d051d1cf422ea23a54738" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 48, + "startColumn": 3, + "charOffset": 1299, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 3, + "charOffset": 1202, + "charLength": 14, + "snippet": { + "text": "\tif (!loaded) {\n\t\tloadBoolConfig(L, BIND_ONLY_GLOBAL_ADDRESS, \"bindOnlyGlobalAddress\", false);\n\t\tloadBoolConfig(L, DISABLE_LEGACY_RAIDS, \"disableLegacyRaids\", false);\n\t\tloadBoolConfig(L, OLD_PROTOCOL, \"allowOldProtocol\", true);\n\t\tloadBoolConfig(L, OPTIMIZE_DATABASE, \"startupDatabaseOptimization\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6827e9e56420a306e6c2b07c715b1a9bebdb3d776c5631198c9dde533212d8b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 49, + "startColumn": 3, + "charOffset": 1371, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 47, + "startColumn": 3, + "charOffset": 1218, + "charLength": 14, + "snippet": { + "text": "\t\tloadBoolConfig(L, BIND_ONLY_GLOBAL_ADDRESS, \"bindOnlyGlobalAddress\", false);\n\t\tloadBoolConfig(L, DISABLE_LEGACY_RAIDS, \"disableLegacyRaids\", false);\n\t\tloadBoolConfig(L, OLD_PROTOCOL, \"allowOldProtocol\", true);\n\t\tloadBoolConfig(L, OPTIMIZE_DATABASE, \"startupDatabaseOptimization\", true);\n\t\tloadBoolConfig(L, RANDOM_MONSTER_SPAWN, \"randomMonsterSpawn\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e95d3bec7ff5fbb6e604935671e0d35f8578c558b90054190128fcf5e8c00cb9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 50, + "startColumn": 3, + "charOffset": 1432, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 48, + "startColumn": 3, + "charOffset": 1297, + "charLength": 14, + "snippet": { + "text": "\t\tloadBoolConfig(L, DISABLE_LEGACY_RAIDS, \"disableLegacyRaids\", false);\n\t\tloadBoolConfig(L, OLD_PROTOCOL, \"allowOldProtocol\", true);\n\t\tloadBoolConfig(L, OPTIMIZE_DATABASE, \"startupDatabaseOptimization\", true);\n\t\tloadBoolConfig(L, RANDOM_MONSTER_SPAWN, \"randomMonsterSpawn\", false);\n\t\tloadBoolConfig(L, RESET_SESSIONS_ON_STARTUP, \"resetSessionsOnStartup\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d65f27ca08212439053bdfbc4bb58265a098bf2a6bb63309853e434c05df9b61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 51, + "startColumn": 3, + "charOffset": 1509, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 49, + "startColumn": 3, + "charOffset": 1369, + "charLength": 14, + "snippet": { + "text": "\t\tloadBoolConfig(L, OLD_PROTOCOL, \"allowOldProtocol\", true);\n\t\tloadBoolConfig(L, OPTIMIZE_DATABASE, \"startupDatabaseOptimization\", true);\n\t\tloadBoolConfig(L, RANDOM_MONSTER_SPAWN, \"randomMonsterSpawn\", false);\n\t\tloadBoolConfig(L, RESET_SESSIONS_ON_STARTUP, \"resetSessionsOnStartup\", false);\n\t\tloadBoolConfig(L, TOGGLE_MAINTAIN_MODE, \"toggleMaintainMode\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e368647c05b2c8d029f161957539ee068030050428eaf70642aba2648339e36b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 52, + "startColumn": 3, + "charOffset": 1581, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 50, + "startColumn": 3, + "charOffset": 1430, + "charLength": 14, + "snippet": { + "text": "\t\tloadBoolConfig(L, OPTIMIZE_DATABASE, \"startupDatabaseOptimization\", true);\n\t\tloadBoolConfig(L, RANDOM_MONSTER_SPAWN, \"randomMonsterSpawn\", false);\n\t\tloadBoolConfig(L, RESET_SESSIONS_ON_STARTUP, \"resetSessionsOnStartup\", false);\n\t\tloadBoolConfig(L, TOGGLE_MAINTAIN_MODE, \"toggleMaintainMode\", false);\n\t\tloadBoolConfig(L, TOGGLE_MAP_CUSTOM, \"toggleMapCustom\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04a5bd262b6d5586942107832a22702a3de8724a588ebf6f356eb2dbb5b97721" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 53, + "startColumn": 3, + "charOffset": 1662, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 3, + "charOffset": 1507, + "charLength": 14, + "snippet": { + "text": "\t\tloadBoolConfig(L, RANDOM_MONSTER_SPAWN, \"randomMonsterSpawn\", false);\n\t\tloadBoolConfig(L, RESET_SESSIONS_ON_STARTUP, \"resetSessionsOnStartup\", false);\n\t\tloadBoolConfig(L, TOGGLE_MAINTAIN_MODE, \"toggleMaintainMode\", false);\n\t\tloadBoolConfig(L, TOGGLE_MAP_CUSTOM, \"toggleMapCustom\", true);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4332255572f2aff73d33d5b8402c1646a907816b511e636c99d48d651785095a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 54, + "startColumn": 3, + "charOffset": 1734, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 52, + "startColumn": 3, + "charOffset": 1579, + "charLength": 14, + "snippet": { + "text": "\t\tloadBoolConfig(L, RESET_SESSIONS_ON_STARTUP, \"resetSessionsOnStartup\", false);\n\t\tloadBoolConfig(L, TOGGLE_MAINTAIN_MODE, \"toggleMaintainMode\", false);\n\t\tloadBoolConfig(L, TOGGLE_MAP_CUSTOM, \"toggleMapCustom\", true);\n\n\t\tloadFloatConfig(L, HOUSE_PRICE_RENT_MULTIPLIER, \"housePriceRentMultiplier\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d70bdcd504af5c5a1d8e4917b04f84085743988f1a33c098119798e8bb7ced0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 56, + "startColumn": 3, + "charOffset": 1800, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 54, + "startColumn": 3, + "charOffset": 1732, + "charLength": 15, + "snippet": { + "text": "\t\tloadBoolConfig(L, TOGGLE_MAP_CUSTOM, \"toggleMapCustom\", true);\n\n\t\tloadFloatConfig(L, HOUSE_PRICE_RENT_MULTIPLIER, \"housePriceRentMultiplier\", 1.0);\n\t\tloadFloatConfig(L, HOUSE_RENT_RATE, \"houseRentRate\", 1.0);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "595e6b518a3e030ef53f8e4a84115da71cbea9ec2b8e98aa845310e1dfb2a8cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 56, + "startColumn": 79, + "charOffset": 1876, + "charLength": 3, + "snippet": { + "text": "1.0" + } + }, + "contextRegion": { + "startLine": 54, + "startColumn": 79, + "charOffset": 1732, + "charLength": 3, + "snippet": { + "text": "\t\tloadBoolConfig(L, TOGGLE_MAP_CUSTOM, \"toggleMapCustom\", true);\n\n\t\tloadFloatConfig(L, HOUSE_PRICE_RENT_MULTIPLIER, \"housePriceRentMultiplier\", 1.0);\n\t\tloadFloatConfig(L, HOUSE_RENT_RATE, \"houseRentRate\", 1.0);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c99f936c267532f7ed5ccb9ac9e0c122b0d69e415aea3e93624e9443dbc9563" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 57, + "startColumn": 3, + "charOffset": 1884, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 55, + "startColumn": 3, + "charOffset": 1797, + "charLength": 15, + "snippet": { + "text": "\n\t\tloadFloatConfig(L, HOUSE_PRICE_RENT_MULTIPLIER, \"housePriceRentMultiplier\", 1.0);\n\t\tloadFloatConfig(L, HOUSE_RENT_RATE, \"houseRentRate\", 1.0);\n\n\t\tloadIntConfig(L, DEPOT_BOXES, \"depotBoxes\", 20);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31a21dfbaa8ab80c251ed198a38a8360c304ced63be80cd43812afe671308912" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 57, + "startColumn": 56, + "charOffset": 1937, + "charLength": 3, + "snippet": { + "text": "1.0" + } + }, + "contextRegion": { + "startLine": 55, + "startColumn": 56, + "charOffset": 1797, + "charLength": 3, + "snippet": { + "text": "\n\t\tloadFloatConfig(L, HOUSE_PRICE_RENT_MULTIPLIER, \"housePriceRentMultiplier\", 1.0);\n\t\tloadFloatConfig(L, HOUSE_RENT_RATE, \"houseRentRate\", 1.0);\n\n\t\tloadIntConfig(L, DEPOT_BOXES, \"depotBoxes\", 20);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7978f7552d920ac7c7926d40c7de25b36d02d69fa8f29700728d524d60477d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 3, + "charOffset": 1946, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 3, + "charOffset": 1882, + "charLength": 13, + "snippet": { + "text": "\t\tloadFloatConfig(L, HOUSE_RENT_RATE, \"houseRentRate\", 1.0);\n\n\t\tloadIntConfig(L, DEPOT_BOXES, \"depotBoxes\", 20);\n\t\tloadIntConfig(L, FREE_DEPOT_LIMIT, \"freeDepotLimit\", 2000);\n\t\tloadIntConfig(L, GAME_PORT, \"gameProtocolPort\", 7172);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "660927c727a3c91fa2f89f184d786a338c3d9076fd7aa14c763e50d9b35442f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 47, + "charOffset": 1990, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 47, + "charOffset": 1882, + "charLength": 2, + "snippet": { + "text": "\t\tloadFloatConfig(L, HOUSE_RENT_RATE, \"houseRentRate\", 1.0);\n\n\t\tloadIntConfig(L, DEPOT_BOXES, \"depotBoxes\", 20);\n\t\tloadIntConfig(L, FREE_DEPOT_LIMIT, \"freeDepotLimit\", 2000);\n\t\tloadIntConfig(L, GAME_PORT, \"gameProtocolPort\", 7172);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f42bd9b4ac4f9882c07976fb680c3c9778a56febf0462e26c9d7379b4a9bc51c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 60, + "startColumn": 3, + "charOffset": 1997, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 3, + "charOffset": 1943, + "charLength": 13, + "snippet": { + "text": "\n\t\tloadIntConfig(L, DEPOT_BOXES, \"depotBoxes\", 20);\n\t\tloadIntConfig(L, FREE_DEPOT_LIMIT, \"freeDepotLimit\", 2000);\n\t\tloadIntConfig(L, GAME_PORT, \"gameProtocolPort\", 7172);\n\t\tloadIntConfig(L, LOGIN_PORT, \"loginProtocolPort\", 7171);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21a1815c3339b3a17ad23666580b9262004160d1544b514e7f8429a9a4851f5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 60, + "startColumn": 56, + "charOffset": 2050, + "charLength": 4, + "snippet": { + "text": "2000" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 56, + "charOffset": 1943, + "charLength": 4, + "snippet": { + "text": "\n\t\tloadIntConfig(L, DEPOT_BOXES, \"depotBoxes\", 20);\n\t\tloadIntConfig(L, FREE_DEPOT_LIMIT, \"freeDepotLimit\", 2000);\n\t\tloadIntConfig(L, GAME_PORT, \"gameProtocolPort\", 7172);\n\t\tloadIntConfig(L, LOGIN_PORT, \"loginProtocolPort\", 7171);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c6eeb6de000b18d2dc5dc9699b289029c7f3bcbf38fcd4a94995514cc147aa5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 61, + "startColumn": 3, + "charOffset": 2059, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 59, + "startColumn": 3, + "charOffset": 1944, + "charLength": 13, + "snippet": { + "text": "\t\tloadIntConfig(L, DEPOT_BOXES, \"depotBoxes\", 20);\n\t\tloadIntConfig(L, FREE_DEPOT_LIMIT, \"freeDepotLimit\", 2000);\n\t\tloadIntConfig(L, GAME_PORT, \"gameProtocolPort\", 7172);\n\t\tloadIntConfig(L, LOGIN_PORT, \"loginProtocolPort\", 7171);\n\t\tloadIntConfig(L, MARKET_OFFER_DURATION, \"marketOfferDuration\", 30 * 24 * 60 * 60);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4e5aabd3a2ba91f8f487cca94aeaeb39235dfb2b0533e453a2b7ff86f068d8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7172 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 61, + "startColumn": 51, + "charOffset": 2107, + "charLength": 4, + "snippet": { + "text": "7172" + } + }, + "contextRegion": { + "startLine": 59, + "startColumn": 51, + "charOffset": 1944, + "charLength": 4, + "snippet": { + "text": "\t\tloadIntConfig(L, DEPOT_BOXES, \"depotBoxes\", 20);\n\t\tloadIntConfig(L, FREE_DEPOT_LIMIT, \"freeDepotLimit\", 2000);\n\t\tloadIntConfig(L, GAME_PORT, \"gameProtocolPort\", 7172);\n\t\tloadIntConfig(L, LOGIN_PORT, \"loginProtocolPort\", 7171);\n\t\tloadIntConfig(L, MARKET_OFFER_DURATION, \"marketOfferDuration\", 30 * 24 * 60 * 60);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c5515eebfd1b865269f5c1a65206519ca1388861507888a709fa1d35fb5dd27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 62, + "startColumn": 3, + "charOffset": 2116, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 3, + "charOffset": 1995, + "charLength": 13, + "snippet": { + "text": "\t\tloadIntConfig(L, FREE_DEPOT_LIMIT, \"freeDepotLimit\", 2000);\n\t\tloadIntConfig(L, GAME_PORT, \"gameProtocolPort\", 7172);\n\t\tloadIntConfig(L, LOGIN_PORT, \"loginProtocolPort\", 7171);\n\t\tloadIntConfig(L, MARKET_OFFER_DURATION, \"marketOfferDuration\", 30 * 24 * 60 * 60);\n\t\tloadIntConfig(L, MARKET_REFRESH_PRICES, \"marketRefreshPricesInterval\", 30);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "162a44fc83244ebce5cbb53125d6512fe158cde1437ce1b8ffc1c8f40ea1b5e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7171 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 62, + "startColumn": 53, + "charOffset": 2166, + "charLength": 4, + "snippet": { + "text": "7171" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 53, + "charOffset": 1995, + "charLength": 4, + "snippet": { + "text": "\t\tloadIntConfig(L, FREE_DEPOT_LIMIT, \"freeDepotLimit\", 2000);\n\t\tloadIntConfig(L, GAME_PORT, \"gameProtocolPort\", 7172);\n\t\tloadIntConfig(L, LOGIN_PORT, \"loginProtocolPort\", 7171);\n\t\tloadIntConfig(L, MARKET_OFFER_DURATION, \"marketOfferDuration\", 30 * 24 * 60 * 60);\n\t\tloadIntConfig(L, MARKET_REFRESH_PRICES, \"marketRefreshPricesInterval\", 30);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9267caa05a52547d4e383cfe4a5a259c2ac6697da71c13504b7c4d9c442aa2a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 63, + "startColumn": 3, + "charOffset": 2175, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 3, + "charOffset": 2057, + "charLength": 13, + "snippet": { + "text": "\t\tloadIntConfig(L, GAME_PORT, \"gameProtocolPort\", 7172);\n\t\tloadIntConfig(L, LOGIN_PORT, \"loginProtocolPort\", 7171);\n\t\tloadIntConfig(L, MARKET_OFFER_DURATION, \"marketOfferDuration\", 30 * 24 * 60 * 60);\n\t\tloadIntConfig(L, MARKET_REFRESH_PRICES, \"marketRefreshPricesInterval\", 30);\n\t\tloadIntConfig(L, PREMIUM_DEPOT_LIMIT, \"premiumDepotLimit\", 8000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89ef00ac66d47e888048294b9ba43770e2396e8a90d754c4bf22757101d20896" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 63, + "startColumn": 66, + "charOffset": 2238, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 66, + "charOffset": 2057, + "charLength": 2, + "snippet": { + "text": "\t\tloadIntConfig(L, GAME_PORT, \"gameProtocolPort\", 7172);\n\t\tloadIntConfig(L, LOGIN_PORT, \"loginProtocolPort\", 7171);\n\t\tloadIntConfig(L, MARKET_OFFER_DURATION, \"marketOfferDuration\", 30 * 24 * 60 * 60);\n\t\tloadIntConfig(L, MARKET_REFRESH_PRICES, \"marketRefreshPricesInterval\", 30);\n\t\tloadIntConfig(L, PREMIUM_DEPOT_LIMIT, \"premiumDepotLimit\", 8000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06c9e9bcbf7ca05e87ece97c82f0c2d9b7aefff972639481b68f3b07c5b9f965" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 63, + "startColumn": 71, + "charOffset": 2243, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 71, + "charOffset": 2057, + "charLength": 2, + "snippet": { + "text": "\t\tloadIntConfig(L, GAME_PORT, \"gameProtocolPort\", 7172);\n\t\tloadIntConfig(L, LOGIN_PORT, \"loginProtocolPort\", 7171);\n\t\tloadIntConfig(L, MARKET_OFFER_DURATION, \"marketOfferDuration\", 30 * 24 * 60 * 60);\n\t\tloadIntConfig(L, MARKET_REFRESH_PRICES, \"marketRefreshPricesInterval\", 30);\n\t\tloadIntConfig(L, PREMIUM_DEPOT_LIMIT, \"premiumDepotLimit\", 8000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb04b529e067d15f35a2133023bff190dbbb6d8f9838b1b51de26debea58fe1e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 63, + "startColumn": 76, + "charOffset": 2248, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 76, + "charOffset": 2057, + "charLength": 2, + "snippet": { + "text": "\t\tloadIntConfig(L, GAME_PORT, \"gameProtocolPort\", 7172);\n\t\tloadIntConfig(L, LOGIN_PORT, \"loginProtocolPort\", 7171);\n\t\tloadIntConfig(L, MARKET_OFFER_DURATION, \"marketOfferDuration\", 30 * 24 * 60 * 60);\n\t\tloadIntConfig(L, MARKET_REFRESH_PRICES, \"marketRefreshPricesInterval\", 30);\n\t\tloadIntConfig(L, PREMIUM_DEPOT_LIMIT, \"premiumDepotLimit\", 8000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77c859584d7e5b7f9e3177f5b7f43e3f40344c810f48038fb6848c4acbe2a6b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 63, + "startColumn": 81, + "charOffset": 2253, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 81, + "charOffset": 2057, + "charLength": 2, + "snippet": { + "text": "\t\tloadIntConfig(L, GAME_PORT, \"gameProtocolPort\", 7172);\n\t\tloadIntConfig(L, LOGIN_PORT, \"loginProtocolPort\", 7171);\n\t\tloadIntConfig(L, MARKET_OFFER_DURATION, \"marketOfferDuration\", 30 * 24 * 60 * 60);\n\t\tloadIntConfig(L, MARKET_REFRESH_PRICES, \"marketRefreshPricesInterval\", 30);\n\t\tloadIntConfig(L, PREMIUM_DEPOT_LIMIT, \"premiumDepotLimit\", 8000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b99082fca0eff919ff8f800fea31047e32357b3162a4515966ead06309d7385b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 64, + "startColumn": 3, + "charOffset": 2260, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 62, + "startColumn": 3, + "charOffset": 2114, + "charLength": 13, + "snippet": { + "text": "\t\tloadIntConfig(L, LOGIN_PORT, \"loginProtocolPort\", 7171);\n\t\tloadIntConfig(L, MARKET_OFFER_DURATION, \"marketOfferDuration\", 30 * 24 * 60 * 60);\n\t\tloadIntConfig(L, MARKET_REFRESH_PRICES, \"marketRefreshPricesInterval\", 30);\n\t\tloadIntConfig(L, PREMIUM_DEPOT_LIMIT, \"premiumDepotLimit\", 8000);\n\t\tloadIntConfig(L, SQL_PORT, \"mysqlPort\", 3306);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9eb3b1d4adab1ec2b13abbd2de8c57860978c447885e0a4df80d95cbf591311e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 64, + "startColumn": 74, + "charOffset": 2331, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 62, + "startColumn": 74, + "charOffset": 2114, + "charLength": 2, + "snippet": { + "text": "\t\tloadIntConfig(L, LOGIN_PORT, \"loginProtocolPort\", 7171);\n\t\tloadIntConfig(L, MARKET_OFFER_DURATION, \"marketOfferDuration\", 30 * 24 * 60 * 60);\n\t\tloadIntConfig(L, MARKET_REFRESH_PRICES, \"marketRefreshPricesInterval\", 30);\n\t\tloadIntConfig(L, PREMIUM_DEPOT_LIMIT, \"premiumDepotLimit\", 8000);\n\t\tloadIntConfig(L, SQL_PORT, \"mysqlPort\", 3306);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37bbe80ee14a0df75cedf086556fad8c552e32d3611fa757503d8f084af1252b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 65, + "startColumn": 3, + "charOffset": 2338, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 3, + "charOffset": 2173, + "charLength": 13, + "snippet": { + "text": "\t\tloadIntConfig(L, MARKET_OFFER_DURATION, \"marketOfferDuration\", 30 * 24 * 60 * 60);\n\t\tloadIntConfig(L, MARKET_REFRESH_PRICES, \"marketRefreshPricesInterval\", 30);\n\t\tloadIntConfig(L, PREMIUM_DEPOT_LIMIT, \"premiumDepotLimit\", 8000);\n\t\tloadIntConfig(L, SQL_PORT, \"mysqlPort\", 3306);\n\t\tloadIntConfig(L, STASH_ITEMS, \"stashItemCount\", 5000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db2e1aa197e68c64a4575e2d09ce642fe0b226a77c4071f7f736da04110c231d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 65, + "startColumn": 62, + "charOffset": 2397, + "charLength": 4, + "snippet": { + "text": "8000" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 62, + "charOffset": 2173, + "charLength": 4, + "snippet": { + "text": "\t\tloadIntConfig(L, MARKET_OFFER_DURATION, \"marketOfferDuration\", 30 * 24 * 60 * 60);\n\t\tloadIntConfig(L, MARKET_REFRESH_PRICES, \"marketRefreshPricesInterval\", 30);\n\t\tloadIntConfig(L, PREMIUM_DEPOT_LIMIT, \"premiumDepotLimit\", 8000);\n\t\tloadIntConfig(L, SQL_PORT, \"mysqlPort\", 3306);\n\t\tloadIntConfig(L, STASH_ITEMS, \"stashItemCount\", 5000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4cf36cb1e8e3879752e82c3916ba1b2416d051db14cc7bc833332c5b30a8dd98" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 3, + "charOffset": 2406, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 3, + "charOffset": 2258, + "charLength": 13, + "snippet": { + "text": "\t\tloadIntConfig(L, MARKET_REFRESH_PRICES, \"marketRefreshPricesInterval\", 30);\n\t\tloadIntConfig(L, PREMIUM_DEPOT_LIMIT, \"premiumDepotLimit\", 8000);\n\t\tloadIntConfig(L, SQL_PORT, \"mysqlPort\", 3306);\n\t\tloadIntConfig(L, STASH_ITEMS, \"stashItemCount\", 5000);\n\t\tloadIntConfig(L, STATUS_PORT, \"statusProtocolPort\", 7171);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5aac5f2970b7c0a885f43e757890ef37ca3fea0447dbc827c6ea05b44d8df77c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "3306 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 43, + "charOffset": 2446, + "charLength": 4, + "snippet": { + "text": "3306" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 43, + "charOffset": 2258, + "charLength": 4, + "snippet": { + "text": "\t\tloadIntConfig(L, MARKET_REFRESH_PRICES, \"marketRefreshPricesInterval\", 30);\n\t\tloadIntConfig(L, PREMIUM_DEPOT_LIMIT, \"premiumDepotLimit\", 8000);\n\t\tloadIntConfig(L, SQL_PORT, \"mysqlPort\", 3306);\n\t\tloadIntConfig(L, STASH_ITEMS, \"stashItemCount\", 5000);\n\t\tloadIntConfig(L, STATUS_PORT, \"statusProtocolPort\", 7171);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4d3423f8a6aa204abe330bab596fc71595a1a0a4b74ddbc766d49ac445ede0f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 67, + "startColumn": 3, + "charOffset": 2455, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 65, + "startColumn": 3, + "charOffset": 2336, + "charLength": 13, + "snippet": { + "text": "\t\tloadIntConfig(L, PREMIUM_DEPOT_LIMIT, \"premiumDepotLimit\", 8000);\n\t\tloadIntConfig(L, SQL_PORT, \"mysqlPort\", 3306);\n\t\tloadIntConfig(L, STASH_ITEMS, \"stashItemCount\", 5000);\n\t\tloadIntConfig(L, STATUS_PORT, \"statusProtocolPort\", 7171);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73b1389d5635b929d184b9a4f71a25f313eb8643ccd1b1bac4463740f8924aef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 67, + "startColumn": 51, + "charOffset": 2503, + "charLength": 4, + "snippet": { + "text": "5000" + } + }, + "contextRegion": { + "startLine": 65, + "startColumn": 51, + "charOffset": 2336, + "charLength": 4, + "snippet": { + "text": "\t\tloadIntConfig(L, PREMIUM_DEPOT_LIMIT, \"premiumDepotLimit\", 8000);\n\t\tloadIntConfig(L, SQL_PORT, \"mysqlPort\", 3306);\n\t\tloadIntConfig(L, STASH_ITEMS, \"stashItemCount\", 5000);\n\t\tloadIntConfig(L, STATUS_PORT, \"statusProtocolPort\", 7171);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a131aad9c48d4e93d880646b1e2c222628c250f3385789d8308fa05bf928af13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 68, + "startColumn": 3, + "charOffset": 2512, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 66, + "startColumn": 3, + "charOffset": 2404, + "charLength": 13, + "snippet": { + "text": "\t\tloadIntConfig(L, SQL_PORT, \"mysqlPort\", 3306);\n\t\tloadIntConfig(L, STASH_ITEMS, \"stashItemCount\", 5000);\n\t\tloadIntConfig(L, STATUS_PORT, \"statusProtocolPort\", 7171);\n\n\t\tloadStringConfig(L, AUTH_TYPE, \"authType\", \"password\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99db9b7bd21e039a160fa0be3f0cc14a05c2a0266da589cbedbdb95c334b1a93" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7171 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 68, + "startColumn": 55, + "charOffset": 2564, + "charLength": 4, + "snippet": { + "text": "7171" + } + }, + "contextRegion": { + "startLine": 66, + "startColumn": 55, + "charOffset": 2404, + "charLength": 4, + "snippet": { + "text": "\t\tloadIntConfig(L, SQL_PORT, \"mysqlPort\", 3306);\n\t\tloadIntConfig(L, STASH_ITEMS, \"stashItemCount\", 5000);\n\t\tloadIntConfig(L, STATUS_PORT, \"statusProtocolPort\", 7171);\n\n\t\tloadStringConfig(L, AUTH_TYPE, \"authType\", \"password\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9314c97a1d5118e4bbd11364edce2dc22debd0d2066aa9c57bd31229a90f3275" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 3, + "charOffset": 2574, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 3, + "charOffset": 2510, + "charLength": 16, + "snippet": { + "text": "\t\tloadIntConfig(L, STATUS_PORT, \"statusProtocolPort\", 7171);\n\n\t\tloadStringConfig(L, AUTH_TYPE, \"authType\", \"password\");\n\t\tloadStringConfig(L, HOUSE_RENT_PERIOD, \"houseRentPeriod\", \"never\");\n\t\tloadStringConfig(L, IP, \"ip\", \"127.0.0.1\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "325042e60e07c22a118abb232dfdfaf5d4a60d9fb16ea7a22aee77f33a703b0f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 71, + "startColumn": 3, + "charOffset": 2632, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 69, + "startColumn": 3, + "charOffset": 2571, + "charLength": 16, + "snippet": { + "text": "\n\t\tloadStringConfig(L, AUTH_TYPE, \"authType\", \"password\");\n\t\tloadStringConfig(L, HOUSE_RENT_PERIOD, \"houseRentPeriod\", \"never\");\n\t\tloadStringConfig(L, IP, \"ip\", \"127.0.0.1\");\n\t\tloadStringConfig(L, MAINTAIN_MODE_MESSAGE, \"maintainModeMessage\", \"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1b2abe02ecb8442f94d0022881480d4084c90165caf80d86f8778ea49c40730" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 3, + "charOffset": 2702, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 3, + "charOffset": 2572, + "charLength": 16, + "snippet": { + "text": "\t\tloadStringConfig(L, AUTH_TYPE, \"authType\", \"password\");\n\t\tloadStringConfig(L, HOUSE_RENT_PERIOD, \"houseRentPeriod\", \"never\");\n\t\tloadStringConfig(L, IP, \"ip\", \"127.0.0.1\");\n\t\tloadStringConfig(L, MAINTAIN_MODE_MESSAGE, \"maintainModeMessage\", \"\");\n\t\tloadStringConfig(L, MAP_AUTHOR, \"mapAuthor\", \"Eduardo Dantas\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a348546304ec33948cad784d7f8269e77434cf1c193162bad8bc5b7da3449482" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 73, + "startColumn": 3, + "charOffset": 2748, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 71, + "startColumn": 3, + "charOffset": 2630, + "charLength": 16, + "snippet": { + "text": "\t\tloadStringConfig(L, HOUSE_RENT_PERIOD, \"houseRentPeriod\", \"never\");\n\t\tloadStringConfig(L, IP, \"ip\", \"127.0.0.1\");\n\t\tloadStringConfig(L, MAINTAIN_MODE_MESSAGE, \"maintainModeMessage\", \"\");\n\t\tloadStringConfig(L, MAP_AUTHOR, \"mapAuthor\", \"Eduardo Dantas\");\n\t\tloadStringConfig(L, MAP_DOWNLOAD_URL, \"mapDownloadUrl\", \"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eda2edf351f3b84c614628a9b5e97ef9a1cfacc6c95595c9ae5771f569b23ac5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 3, + "charOffset": 2821, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 3, + "charOffset": 2700, + "charLength": 16, + "snippet": { + "text": "\t\tloadStringConfig(L, IP, \"ip\", \"127.0.0.1\");\n\t\tloadStringConfig(L, MAINTAIN_MODE_MESSAGE, \"maintainModeMessage\", \"\");\n\t\tloadStringConfig(L, MAP_AUTHOR, \"mapAuthor\", \"Eduardo Dantas\");\n\t\tloadStringConfig(L, MAP_DOWNLOAD_URL, \"mapDownloadUrl\", \"\");\n\t\tloadStringConfig(L, MAP_NAME, \"mapName\", \"canary\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b7205470686882664c1bb4e584804fef8be30bc0132b45c3d5368812eac49ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 75, + "startColumn": 3, + "charOffset": 2887, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 73, + "startColumn": 3, + "charOffset": 2746, + "charLength": 16, + "snippet": { + "text": "\t\tloadStringConfig(L, MAINTAIN_MODE_MESSAGE, \"maintainModeMessage\", \"\");\n\t\tloadStringConfig(L, MAP_AUTHOR, \"mapAuthor\", \"Eduardo Dantas\");\n\t\tloadStringConfig(L, MAP_DOWNLOAD_URL, \"mapDownloadUrl\", \"\");\n\t\tloadStringConfig(L, MAP_NAME, \"mapName\", \"canary\");\n\t\tloadStringConfig(L, MYSQL_DB, \"mysqlDatabase\", \"canary\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04698fbfad560a91f42d618868f61374bc21bbb195752172916570cc77641e10" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 3, + "charOffset": 2950, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 3, + "charOffset": 2819, + "charLength": 16, + "snippet": { + "text": "\t\tloadStringConfig(L, MAP_AUTHOR, \"mapAuthor\", \"Eduardo Dantas\");\n\t\tloadStringConfig(L, MAP_DOWNLOAD_URL, \"mapDownloadUrl\", \"\");\n\t\tloadStringConfig(L, MAP_NAME, \"mapName\", \"canary\");\n\t\tloadStringConfig(L, MYSQL_DB, \"mysqlDatabase\", \"canary\");\n\t\tloadStringConfig(L, MYSQL_HOST, \"mysqlHost\", \"127.0.0.1\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d7374c83b7da0e7b75ac9bbdbe342b627dc2fa56a622ebd2beaafa6aa89ccb7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 77, + "startColumn": 3, + "charOffset": 3004, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 75, + "startColumn": 3, + "charOffset": 2885, + "charLength": 16, + "snippet": { + "text": "\t\tloadStringConfig(L, MAP_DOWNLOAD_URL, \"mapDownloadUrl\", \"\");\n\t\tloadStringConfig(L, MAP_NAME, \"mapName\", \"canary\");\n\t\tloadStringConfig(L, MYSQL_DB, \"mysqlDatabase\", \"canary\");\n\t\tloadStringConfig(L, MYSQL_HOST, \"mysqlHost\", \"127.0.0.1\");\n\t\tloadStringConfig(L, MYSQL_PASS, \"mysqlPass\", \"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eda2edf351f3b84c614628a9b5e97ef9a1cfacc6c95595c9ae5771f569b23ac5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 3, + "charOffset": 3064, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 3, + "charOffset": 2948, + "charLength": 16, + "snippet": { + "text": "\t\tloadStringConfig(L, MAP_NAME, \"mapName\", \"canary\");\n\t\tloadStringConfig(L, MYSQL_DB, \"mysqlDatabase\", \"canary\");\n\t\tloadStringConfig(L, MYSQL_HOST, \"mysqlHost\", \"127.0.0.1\");\n\t\tloadStringConfig(L, MYSQL_PASS, \"mysqlPass\", \"\");\n\t\tloadStringConfig(L, MYSQL_SOCK, \"mysqlSock\", \"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5316d4e725e225a67f484316bfaa90d9a011f170edb6c82bad98a5dbaaef7233" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 79, + "startColumn": 3, + "charOffset": 3125, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 77, + "startColumn": 3, + "charOffset": 3002, + "charLength": 16, + "snippet": { + "text": "\t\tloadStringConfig(L, MYSQL_DB, \"mysqlDatabase\", \"canary\");\n\t\tloadStringConfig(L, MYSQL_HOST, \"mysqlHost\", \"127.0.0.1\");\n\t\tloadStringConfig(L, MYSQL_PASS, \"mysqlPass\", \"\");\n\t\tloadStringConfig(L, MYSQL_SOCK, \"mysqlSock\", \"\");\n\t\tloadStringConfig(L, MYSQL_USER, \"mysqlUser\", \"root\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "326982a25c7e55d2a5dbb9101dcd1dbe494ef581161f857aa6d22c3e42509b28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 80, + "startColumn": 3, + "charOffset": 3177, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 78, + "startColumn": 3, + "charOffset": 3062, + "charLength": 16, + "snippet": { + "text": "\t\tloadStringConfig(L, MYSQL_HOST, \"mysqlHost\", \"127.0.0.1\");\n\t\tloadStringConfig(L, MYSQL_PASS, \"mysqlPass\", \"\");\n\t\tloadStringConfig(L, MYSQL_SOCK, \"mysqlSock\", \"\");\n\t\tloadStringConfig(L, MYSQL_USER, \"mysqlUser\", \"root\");\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ab0ada80fb7b4926e890912e6fc36eb526fe8990eb967fdb2a840fbd3b14e99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 81, + "startColumn": 3, + "charOffset": 3229, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 79, + "startColumn": 3, + "charOffset": 3123, + "charLength": 16, + "snippet": { + "text": "\t\tloadStringConfig(L, MYSQL_PASS, \"mysqlPass\", \"\");\n\t\tloadStringConfig(L, MYSQL_SOCK, \"mysqlSock\", \"\");\n\t\tloadStringConfig(L, MYSQL_USER, \"mysqlUser\", \"root\");\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ae953ac6196e832a5ddaa7daa26e91e3ae224b096928e856939b8857dfb698f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 84, + "startColumn": 2, + "charOffset": 3288, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 2, + "charOffset": 3283, + "charLength": 14, + "snippet": { + "text": "\t}\n\n\tloadBoolConfig(L, AIMBOT_HOTKEY_ENABLED, \"hotkeyAimbotEnabled\", true);\n\tloadBoolConfig(L, ALLOW_CHANGEOUTFIT, \"allowChangeOutfit\", true);\n\tloadBoolConfig(L, ALLOW_RELOAD, \"allowReload\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a64ae91b6d7668e0a9754c0a3ab11bc2572c7c984cc36f73b9fa35895d214d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 85, + "startColumn": 2, + "charOffset": 3360, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 2, + "charOffset": 3286, + "charLength": 14, + "snippet": { + "text": "\n\tloadBoolConfig(L, AIMBOT_HOTKEY_ENABLED, \"hotkeyAimbotEnabled\", true);\n\tloadBoolConfig(L, ALLOW_CHANGEOUTFIT, \"allowChangeOutfit\", true);\n\tloadBoolConfig(L, ALLOW_RELOAD, \"allowReload\", false);\n\tloadBoolConfig(L, AUTOBANK, \"autoBank\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b4898d2ca1bc4c7a3b5563a4f3694d8b83e723d6cd574c521cbdd220fb999b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 86, + "startColumn": 2, + "charOffset": 3427, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 2, + "charOffset": 3287, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, AIMBOT_HOTKEY_ENABLED, \"hotkeyAimbotEnabled\", true);\n\tloadBoolConfig(L, ALLOW_CHANGEOUTFIT, \"allowChangeOutfit\", true);\n\tloadBoolConfig(L, ALLOW_RELOAD, \"allowReload\", false);\n\tloadBoolConfig(L, AUTOBANK, \"autoBank\", false);\n\tloadBoolConfig(L, AUTOLOOT, \"autoLoot\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27fc9ee365c3e63ead3baf816f595ac162a7c6d12d48619214499f39b13731e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 2, + "charOffset": 3483, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 2, + "charOffset": 3359, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, ALLOW_CHANGEOUTFIT, \"allowChangeOutfit\", true);\n\tloadBoolConfig(L, ALLOW_RELOAD, \"allowReload\", false);\n\tloadBoolConfig(L, AUTOBANK, \"autoBank\", false);\n\tloadBoolConfig(L, AUTOLOOT, \"autoLoot\", false);\n\tloadBoolConfig(L, BOOSTED_BOSS_SLOT, \"boostedBossSlot\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3267d17f841e6332e3acf72007ea7d753bd2a9d3e19543bd9d3b3ef14f5791b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 88, + "startColumn": 2, + "charOffset": 3532, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 86, + "startColumn": 2, + "charOffset": 3426, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, ALLOW_RELOAD, \"allowReload\", false);\n\tloadBoolConfig(L, AUTOBANK, \"autoBank\", false);\n\tloadBoolConfig(L, AUTOLOOT, \"autoLoot\", false);\n\tloadBoolConfig(L, BOOSTED_BOSS_SLOT, \"boostedBossSlot\", true);\n\tloadBoolConfig(L, CLASSIC_ATTACK_SPEED, \"classicAttackSpeed\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "feb3649a4f5e0e83635a6c94f0a496a9462c0e95baf394569dc493121afeb175" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 89, + "startColumn": 2, + "charOffset": 3581, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 87, + "startColumn": 2, + "charOffset": 3482, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, AUTOBANK, \"autoBank\", false);\n\tloadBoolConfig(L, AUTOLOOT, \"autoLoot\", false);\n\tloadBoolConfig(L, BOOSTED_BOSS_SLOT, \"boostedBossSlot\", true);\n\tloadBoolConfig(L, CLASSIC_ATTACK_SPEED, \"classicAttackSpeed\", false);\n\tloadBoolConfig(L, CLEAN_PROTECTION_ZONES, \"cleanProtectionZones\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ee6c73cdbbe99a903e84b96e02b605221f1eaf5caaa317f8795eeafa7b8caaf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 90, + "startColumn": 2, + "charOffset": 3645, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 88, + "startColumn": 2, + "charOffset": 3531, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, AUTOLOOT, \"autoLoot\", false);\n\tloadBoolConfig(L, BOOSTED_BOSS_SLOT, \"boostedBossSlot\", true);\n\tloadBoolConfig(L, CLASSIC_ATTACK_SPEED, \"classicAttackSpeed\", false);\n\tloadBoolConfig(L, CLEAN_PROTECTION_ZONES, \"cleanProtectionZones\", false);\n\tloadBoolConfig(L, CONVERT_UNSAFE_SCRIPTS, \"convertUnsafeScripts\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d939f933fef5574a68efde233d3b03c40dfc6f2f5bcb2ce7a534ee4106a99356" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 2, + "charOffset": 3716, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 2, + "charOffset": 3580, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, BOOSTED_BOSS_SLOT, \"boostedBossSlot\", true);\n\tloadBoolConfig(L, CLASSIC_ATTACK_SPEED, \"classicAttackSpeed\", false);\n\tloadBoolConfig(L, CLEAN_PROTECTION_ZONES, \"cleanProtectionZones\", false);\n\tloadBoolConfig(L, CONVERT_UNSAFE_SCRIPTS, \"convertUnsafeScripts\", true);\n\tloadBoolConfig(L, DISABLE_MONSTER_ARMOR, \"disableMonsterArmor\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14977ef964b55c8a361a28523d3d86793562edf258c289d646a1b102d3c247b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 92, + "startColumn": 2, + "charOffset": 3791, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 90, + "startColumn": 2, + "charOffset": 3644, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, CLASSIC_ATTACK_SPEED, \"classicAttackSpeed\", false);\n\tloadBoolConfig(L, CLEAN_PROTECTION_ZONES, \"cleanProtectionZones\", false);\n\tloadBoolConfig(L, CONVERT_UNSAFE_SCRIPTS, \"convertUnsafeScripts\", true);\n\tloadBoolConfig(L, DISABLE_MONSTER_ARMOR, \"disableMonsterArmor\", false);\n\tloadBoolConfig(L, DISCORD_SEND_FOOTER, \"discordSendFooter\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50c9190eff55e6752364f9a0735d69865ee8de127d5bf6caed77f496035a6abe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 93, + "startColumn": 2, + "charOffset": 3865, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 91, + "startColumn": 2, + "charOffset": 3715, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, CLEAN_PROTECTION_ZONES, \"cleanProtectionZones\", false);\n\tloadBoolConfig(L, CONVERT_UNSAFE_SCRIPTS, \"convertUnsafeScripts\", true);\n\tloadBoolConfig(L, DISABLE_MONSTER_ARMOR, \"disableMonsterArmor\", false);\n\tloadBoolConfig(L, DISCORD_SEND_FOOTER, \"discordSendFooter\", true);\n\tloadBoolConfig(L, EMOTE_SPELLS, \"emoteSpells\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8bc0e2daee34a6e21de511b5a90fd257130136dc343f2feee0386168c530008c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 94, + "startColumn": 2, + "charOffset": 3938, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 92, + "startColumn": 2, + "charOffset": 3790, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, CONVERT_UNSAFE_SCRIPTS, \"convertUnsafeScripts\", true);\n\tloadBoolConfig(L, DISABLE_MONSTER_ARMOR, \"disableMonsterArmor\", false);\n\tloadBoolConfig(L, DISCORD_SEND_FOOTER, \"discordSendFooter\", true);\n\tloadBoolConfig(L, EMOTE_SPELLS, \"emoteSpells\", false);\n\tloadBoolConfig(L, ENABLE_PLAYER_PUT_ITEM_IN_AMMO_SLOT, \"enablePlayerPutItemInAmmoSlot\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a05be5e159862aa78b531c28a56f137e7d036ca7ff6462b53166f6cadc399006" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 95, + "startColumn": 2, + "charOffset": 4006, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 93, + "startColumn": 2, + "charOffset": 3864, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, DISABLE_MONSTER_ARMOR, \"disableMonsterArmor\", false);\n\tloadBoolConfig(L, DISCORD_SEND_FOOTER, \"discordSendFooter\", true);\n\tloadBoolConfig(L, EMOTE_SPELLS, \"emoteSpells\", false);\n\tloadBoolConfig(L, ENABLE_PLAYER_PUT_ITEM_IN_AMMO_SLOT, \"enablePlayerPutItemInAmmoSlot\", false);\n\tloadBoolConfig(L, ENABLE_SUPPORT_OUTFIT, \"enableSupportOutfit\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0840022c18a85c4d3c65aec4e06b25f09f9486789b7259828702cd49440e45f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 96, + "startColumn": 2, + "charOffset": 4062, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 2, + "charOffset": 3937, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, DISCORD_SEND_FOOTER, \"discordSendFooter\", true);\n\tloadBoolConfig(L, EMOTE_SPELLS, \"emoteSpells\", false);\n\tloadBoolConfig(L, ENABLE_PLAYER_PUT_ITEM_IN_AMMO_SLOT, \"enablePlayerPutItemInAmmoSlot\", false);\n\tloadBoolConfig(L, ENABLE_SUPPORT_OUTFIT, \"enableSupportOutfit\", true);\n\tloadBoolConfig(L, EXPERIENCE_FROM_PLAYERS, \"experienceByKillingPlayers\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ccda7907354cc3c5c2820dbc60c87debe44cec69d7c403c4f538071dd092cb7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 97, + "startColumn": 2, + "charOffset": 4159, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 95, + "startColumn": 2, + "charOffset": 4005, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, EMOTE_SPELLS, \"emoteSpells\", false);\n\tloadBoolConfig(L, ENABLE_PLAYER_PUT_ITEM_IN_AMMO_SLOT, \"enablePlayerPutItemInAmmoSlot\", false);\n\tloadBoolConfig(L, ENABLE_SUPPORT_OUTFIT, \"enableSupportOutfit\", true);\n\tloadBoolConfig(L, EXPERIENCE_FROM_PLAYERS, \"experienceByKillingPlayers\", false);\n\tloadBoolConfig(L, FREE_PREMIUM, \"freePremium\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2461f91d8ec29eca0af263ba98edd4924989f29ad6328782ae0f826f484a9d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 2, + "charOffset": 4231, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 2, + "charOffset": 4061, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, ENABLE_PLAYER_PUT_ITEM_IN_AMMO_SLOT, \"enablePlayerPutItemInAmmoSlot\", false);\n\tloadBoolConfig(L, ENABLE_SUPPORT_OUTFIT, \"enableSupportOutfit\", true);\n\tloadBoolConfig(L, EXPERIENCE_FROM_PLAYERS, \"experienceByKillingPlayers\", false);\n\tloadBoolConfig(L, FREE_PREMIUM, \"freePremium\", false);\n\tloadBoolConfig(L, GLOBAL_SERVER_SAVE_CLEAN_MAP, \"globalServerSaveCleanMap\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7c518901173777d8ff88688cf317c0ebf376d80fc4a32b9666ae21bf8732162" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 99, + "startColumn": 2, + "charOffset": 4313, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 97, + "startColumn": 2, + "charOffset": 4158, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, ENABLE_SUPPORT_OUTFIT, \"enableSupportOutfit\", true);\n\tloadBoolConfig(L, EXPERIENCE_FROM_PLAYERS, \"experienceByKillingPlayers\", false);\n\tloadBoolConfig(L, FREE_PREMIUM, \"freePremium\", false);\n\tloadBoolConfig(L, GLOBAL_SERVER_SAVE_CLEAN_MAP, \"globalServerSaveCleanMap\", false);\n\tloadBoolConfig(L, GLOBAL_SERVER_SAVE_CLOSE, \"globalServerSaveClose\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78289bc17d1658f56e6f0fb89e0ebee8f64eeb35c1432a5432ab435621a64250" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 100, + "startColumn": 2, + "charOffset": 4369, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 98, + "startColumn": 2, + "charOffset": 4230, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, EXPERIENCE_FROM_PLAYERS, \"experienceByKillingPlayers\", false);\n\tloadBoolConfig(L, FREE_PREMIUM, \"freePremium\", false);\n\tloadBoolConfig(L, GLOBAL_SERVER_SAVE_CLEAN_MAP, \"globalServerSaveCleanMap\", false);\n\tloadBoolConfig(L, GLOBAL_SERVER_SAVE_CLOSE, \"globalServerSaveClose\", false);\n\tloadBoolConfig(L, GLOBAL_SERVER_SAVE_NOTIFY_MESSAGE, \"globalServerSaveNotifyMessage\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c7763047ff47ec1e6f48585b341a15671642630e2cc41916698ac6169ee1a8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 101, + "startColumn": 2, + "charOffset": 4454, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 99, + "startColumn": 2, + "charOffset": 4312, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, FREE_PREMIUM, \"freePremium\", false);\n\tloadBoolConfig(L, GLOBAL_SERVER_SAVE_CLEAN_MAP, \"globalServerSaveCleanMap\", false);\n\tloadBoolConfig(L, GLOBAL_SERVER_SAVE_CLOSE, \"globalServerSaveClose\", false);\n\tloadBoolConfig(L, GLOBAL_SERVER_SAVE_NOTIFY_MESSAGE, \"globalServerSaveNotifyMessage\", true);\n\tloadBoolConfig(L, GLOBAL_SERVER_SAVE_SHUTDOWN, \"globalServerSaveShutdown\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5aac5f2970b7c0a885f43e757890ef37ca3fea0447dbc827c6ea05b44d8df77c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 102, + "startColumn": 2, + "charOffset": 4532, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 100, + "startColumn": 2, + "charOffset": 4368, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, GLOBAL_SERVER_SAVE_CLEAN_MAP, \"globalServerSaveCleanMap\", false);\n\tloadBoolConfig(L, GLOBAL_SERVER_SAVE_CLOSE, \"globalServerSaveClose\", false);\n\tloadBoolConfig(L, GLOBAL_SERVER_SAVE_NOTIFY_MESSAGE, \"globalServerSaveNotifyMessage\", true);\n\tloadBoolConfig(L, GLOBAL_SERVER_SAVE_SHUTDOWN, \"globalServerSaveShutdown\", true);\n\tloadBoolConfig(L, HOUSE_OWNED_BY_ACCOUNT, \"houseOwnedByAccount\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca6b0fa60a9257c4aa8863bfa25e1e647523e15fffc64836ef6e49b3bd27210d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 103, + "startColumn": 2, + "charOffset": 4626, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 101, + "startColumn": 2, + "charOffset": 4453, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, GLOBAL_SERVER_SAVE_CLOSE, \"globalServerSaveClose\", false);\n\tloadBoolConfig(L, GLOBAL_SERVER_SAVE_NOTIFY_MESSAGE, \"globalServerSaveNotifyMessage\", true);\n\tloadBoolConfig(L, GLOBAL_SERVER_SAVE_SHUTDOWN, \"globalServerSaveShutdown\", true);\n\tloadBoolConfig(L, HOUSE_OWNED_BY_ACCOUNT, \"houseOwnedByAccount\", false);\n\tloadBoolConfig(L, HOUSE_PURSHASED_SHOW_PRICE, \"housePurchasedShowPrice\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a9780589ca147e0edf249b3b8ef38646feae58d243630ea0a48816fca9117d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 104, + "startColumn": 2, + "charOffset": 4709, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 102, + "startColumn": 2, + "charOffset": 4531, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, GLOBAL_SERVER_SAVE_NOTIFY_MESSAGE, \"globalServerSaveNotifyMessage\", true);\n\tloadBoolConfig(L, GLOBAL_SERVER_SAVE_SHUTDOWN, \"globalServerSaveShutdown\", true);\n\tloadBoolConfig(L, HOUSE_OWNED_BY_ACCOUNT, \"houseOwnedByAccount\", false);\n\tloadBoolConfig(L, HOUSE_PURSHASED_SHOW_PRICE, \"housePurchasedShowPrice\", false);\n\tloadBoolConfig(L, INVENTORY_GLOW, \"inventoryGlowOnFiveBless\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0964f778727ed6a567a38c54a5774cd95a8e45ec2c6256485dcb2ae43cb96cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 105, + "startColumn": 2, + "charOffset": 4783, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 103, + "startColumn": 2, + "charOffset": 4625, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, GLOBAL_SERVER_SAVE_SHUTDOWN, \"globalServerSaveShutdown\", true);\n\tloadBoolConfig(L, HOUSE_OWNED_BY_ACCOUNT, \"houseOwnedByAccount\", false);\n\tloadBoolConfig(L, HOUSE_PURSHASED_SHOW_PRICE, \"housePurchasedShowPrice\", false);\n\tloadBoolConfig(L, INVENTORY_GLOW, \"inventoryGlowOnFiveBless\", false);\n\tloadBoolConfig(L, LOYALTY_ENABLED, \"loyaltyEnabled\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4cd9eb7a97afc681c9f0eab8833b44980147100a8a5ef645172a1fa2312c91d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 106, + "startColumn": 2, + "charOffset": 4865, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 104, + "startColumn": 2, + "charOffset": 4708, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, HOUSE_OWNED_BY_ACCOUNT, \"houseOwnedByAccount\", false);\n\tloadBoolConfig(L, HOUSE_PURSHASED_SHOW_PRICE, \"housePurchasedShowPrice\", false);\n\tloadBoolConfig(L, INVENTORY_GLOW, \"inventoryGlowOnFiveBless\", false);\n\tloadBoolConfig(L, LOYALTY_ENABLED, \"loyaltyEnabled\", true);\n\tloadBoolConfig(L, MARKET_PREMIUM, \"premiumToCreateMarketOffer\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3c777a381da640db843351ab9bd5b7b3dee231c49f4a6d05df30265c6e160e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 107, + "startColumn": 2, + "charOffset": 4936, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 105, + "startColumn": 2, + "charOffset": 4782, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, HOUSE_PURSHASED_SHOW_PRICE, \"housePurchasedShowPrice\", false);\n\tloadBoolConfig(L, INVENTORY_GLOW, \"inventoryGlowOnFiveBless\", false);\n\tloadBoolConfig(L, LOYALTY_ENABLED, \"loyaltyEnabled\", true);\n\tloadBoolConfig(L, MARKET_PREMIUM, \"premiumToCreateMarketOffer\", true);\n\tloadBoolConfig(L, METRICS_ENABLE_OSTREAM, \"metricsEnableOstream\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1b2abe02ecb8442f94d0022881480d4084c90165caf80d86f8778ea49c40730" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 108, + "startColumn": 2, + "charOffset": 4997, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 2, + "charOffset": 4864, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, INVENTORY_GLOW, \"inventoryGlowOnFiveBless\", false);\n\tloadBoolConfig(L, LOYALTY_ENABLED, \"loyaltyEnabled\", true);\n\tloadBoolConfig(L, MARKET_PREMIUM, \"premiumToCreateMarketOffer\", true);\n\tloadBoolConfig(L, METRICS_ENABLE_OSTREAM, \"metricsEnableOstream\", false);\n\tloadBoolConfig(L, METRICS_ENABLE_PROMETHEUS, \"metricsEnablePrometheus\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19f3fdcd859c02962e005be97465db7bc5ae90faa507b002a11487d802167a3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 109, + "startColumn": 2, + "charOffset": 5069, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 107, + "startColumn": 2, + "charOffset": 4935, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, LOYALTY_ENABLED, \"loyaltyEnabled\", true);\n\tloadBoolConfig(L, MARKET_PREMIUM, \"premiumToCreateMarketOffer\", true);\n\tloadBoolConfig(L, METRICS_ENABLE_OSTREAM, \"metricsEnableOstream\", false);\n\tloadBoolConfig(L, METRICS_ENABLE_PROMETHEUS, \"metricsEnablePrometheus\", false);\n\tloadBoolConfig(L, ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, \"onlyInvitedCanMoveHouseItems\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21a1815c3339b3a17ad23666580b9262004160d1544b514e7f8429a9a4851f5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 110, + "startColumn": 2, + "charOffset": 5144, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 108, + "startColumn": 2, + "charOffset": 4996, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, MARKET_PREMIUM, \"premiumToCreateMarketOffer\", true);\n\tloadBoolConfig(L, METRICS_ENABLE_OSTREAM, \"metricsEnableOstream\", false);\n\tloadBoolConfig(L, METRICS_ENABLE_PROMETHEUS, \"metricsEnablePrometheus\", false);\n\tloadBoolConfig(L, ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, \"onlyInvitedCanMoveHouseItems\", true);\n\tloadBoolConfig(L, ONLY_PREMIUM_ACCOUNT, \"onlyPremiumAccount\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa123017a59beaaf8a2d93d4c5f5079effe91b11ba0b5a9a411de33aa71f0e01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 2, + "charOffset": 5225, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 2, + "charOffset": 5068, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, METRICS_ENABLE_OSTREAM, \"metricsEnableOstream\", false);\n\tloadBoolConfig(L, METRICS_ENABLE_PROMETHEUS, \"metricsEnablePrometheus\", false);\n\tloadBoolConfig(L, ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, \"onlyInvitedCanMoveHouseItems\", true);\n\tloadBoolConfig(L, ONLY_PREMIUM_ACCOUNT, \"onlyPremiumAccount\", false);\n\tloadBoolConfig(L, PARTY_AUTO_SHARE_EXPERIENCE, \"partyAutoShareExperience\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ab0ada80fb7b4926e890912e6fc36eb526fe8990eb967fdb2a840fbd3b14e99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 112, + "startColumn": 2, + "charOffset": 5318, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 110, + "startColumn": 2, + "charOffset": 5143, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, METRICS_ENABLE_PROMETHEUS, \"metricsEnablePrometheus\", false);\n\tloadBoolConfig(L, ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, \"onlyInvitedCanMoveHouseItems\", true);\n\tloadBoolConfig(L, ONLY_PREMIUM_ACCOUNT, \"onlyPremiumAccount\", false);\n\tloadBoolConfig(L, PARTY_AUTO_SHARE_EXPERIENCE, \"partyAutoShareExperience\", true);\n\tloadBoolConfig(L, PARTY_SHARE_LOOT_BOOSTS, \"partyShareLootBoosts\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d70bdcd504af5c5a1d8e4917b04f84085743988f1a33c098119798e8bb7ced0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 113, + "startColumn": 2, + "charOffset": 5389, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 111, + "startColumn": 2, + "charOffset": 5224, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, \"onlyInvitedCanMoveHouseItems\", true);\n\tloadBoolConfig(L, ONLY_PREMIUM_ACCOUNT, \"onlyPremiumAccount\", false);\n\tloadBoolConfig(L, PARTY_AUTO_SHARE_EXPERIENCE, \"partyAutoShareExperience\", true);\n\tloadBoolConfig(L, PARTY_SHARE_LOOT_BOOSTS, \"partyShareLootBoosts\", true);\n\tloadBoolConfig(L, PREY_ENABLED, \"preySystemEnabled\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0f6d2c45aec371e68c6eeab509a00161b7098432198d73b7d1caa338314ad00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 114, + "startColumn": 2, + "charOffset": 5472, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 112, + "startColumn": 2, + "charOffset": 5317, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, ONLY_PREMIUM_ACCOUNT, \"onlyPremiumAccount\", false);\n\tloadBoolConfig(L, PARTY_AUTO_SHARE_EXPERIENCE, \"partyAutoShareExperience\", true);\n\tloadBoolConfig(L, PARTY_SHARE_LOOT_BOOSTS, \"partyShareLootBoosts\", true);\n\tloadBoolConfig(L, PREY_ENABLED, \"preySystemEnabled\", true);\n\tloadBoolConfig(L, PREY_FREE_THIRD_SLOT, \"preyFreeThirdSlot\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a08c8ff809b43892f1b0752e9f5e34a36c49aaf6f2e66716b737c3aecb30938" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 115, + "startColumn": 2, + "charOffset": 5547, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 113, + "startColumn": 2, + "charOffset": 5388, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, PARTY_AUTO_SHARE_EXPERIENCE, \"partyAutoShareExperience\", true);\n\tloadBoolConfig(L, PARTY_SHARE_LOOT_BOOSTS, \"partyShareLootBoosts\", true);\n\tloadBoolConfig(L, PREY_ENABLED, \"preySystemEnabled\", true);\n\tloadBoolConfig(L, PREY_FREE_THIRD_SLOT, \"preyFreeThirdSlot\", false);\n\tloadBoolConfig(L, PUSH_WHEN_ATTACKING, \"pushWhenAttacking\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbebbfb8bb970999de75078db2d51ac8fb36306848ae7d94ebe819dcfb4af3cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 116, + "startColumn": 2, + "charOffset": 5608, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 114, + "startColumn": 2, + "charOffset": 5471, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, PARTY_SHARE_LOOT_BOOSTS, \"partyShareLootBoosts\", true);\n\tloadBoolConfig(L, PREY_ENABLED, \"preySystemEnabled\", true);\n\tloadBoolConfig(L, PREY_FREE_THIRD_SLOT, \"preyFreeThirdSlot\", false);\n\tloadBoolConfig(L, PUSH_WHEN_ATTACKING, \"pushWhenAttacking\", false);\n\tloadBoolConfig(L, RATE_USE_STAGES, \"rateUseStages\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3757b3a444f4d127d526105b25ddcdc130fb2cdc5451df98d6a4881f7baeebb4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 117, + "startColumn": 2, + "charOffset": 5678, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 115, + "startColumn": 2, + "charOffset": 5546, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, PREY_ENABLED, \"preySystemEnabled\", true);\n\tloadBoolConfig(L, PREY_FREE_THIRD_SLOT, \"preyFreeThirdSlot\", false);\n\tloadBoolConfig(L, PUSH_WHEN_ATTACKING, \"pushWhenAttacking\", false);\n\tloadBoolConfig(L, RATE_USE_STAGES, \"rateUseStages\", false);\n\tloadBoolConfig(L, REFUND_BEGINNING_WEAPON_MANA, \"refundBeginningWeaponMana\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d1ddffd1dc7299e2d2cf95feb3f47381126dd6c785c15ea76863cfe8c57e11b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 118, + "startColumn": 2, + "charOffset": 5747, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 116, + "startColumn": 2, + "charOffset": 5607, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, PREY_FREE_THIRD_SLOT, \"preyFreeThirdSlot\", false);\n\tloadBoolConfig(L, PUSH_WHEN_ATTACKING, \"pushWhenAttacking\", false);\n\tloadBoolConfig(L, RATE_USE_STAGES, \"rateUseStages\", false);\n\tloadBoolConfig(L, REFUND_BEGINNING_WEAPON_MANA, \"refundBeginningWeaponMana\", false);\n\tloadBoolConfig(L, REMOVE_BEGINNING_WEAPON_AMMO, \"removeBeginningWeaponAmmunition\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42327fca246d92dc90bf749b9fc89bc1178a0d65b55baa86ccf9eed114120c8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 119, + "startColumn": 2, + "charOffset": 5808, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 117, + "startColumn": 2, + "charOffset": 5677, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, PUSH_WHEN_ATTACKING, \"pushWhenAttacking\", false);\n\tloadBoolConfig(L, RATE_USE_STAGES, \"rateUseStages\", false);\n\tloadBoolConfig(L, REFUND_BEGINNING_WEAPON_MANA, \"refundBeginningWeaponMana\", false);\n\tloadBoolConfig(L, REMOVE_BEGINNING_WEAPON_AMMO, \"removeBeginningWeaponAmmunition\", true);\n\tloadBoolConfig(L, REMOVE_POTION_CHARGES, \"removeChargesFromPotions\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5d47a7248383c1b9b6595c1ba4481b50634ac192be1eafbbea3d65f5a2d3df1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 120, + "startColumn": 2, + "charOffset": 5894, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 2, + "charOffset": 5746, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, RATE_USE_STAGES, \"rateUseStages\", false);\n\tloadBoolConfig(L, REFUND_BEGINNING_WEAPON_MANA, \"refundBeginningWeaponMana\", false);\n\tloadBoolConfig(L, REMOVE_BEGINNING_WEAPON_AMMO, \"removeBeginningWeaponAmmunition\", true);\n\tloadBoolConfig(L, REMOVE_POTION_CHARGES, \"removeChargesFromPotions\", true);\n\tloadBoolConfig(L, REMOVE_RUNE_CHARGES, \"removeChargesFromRunes\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "807c5e71dbd73a3f83880c00bdde5c4c9358a17566fbb3831ea392567f47d741" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 121, + "startColumn": 2, + "charOffset": 5985, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 119, + "startColumn": 2, + "charOffset": 5807, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, REFUND_BEGINNING_WEAPON_MANA, \"refundBeginningWeaponMana\", false);\n\tloadBoolConfig(L, REMOVE_BEGINNING_WEAPON_AMMO, \"removeBeginningWeaponAmmunition\", true);\n\tloadBoolConfig(L, REMOVE_POTION_CHARGES, \"removeChargesFromPotions\", true);\n\tloadBoolConfig(L, REMOVE_RUNE_CHARGES, \"removeChargesFromRunes\", true);\n\tloadBoolConfig(L, REMOVE_WEAPON_AMMO, \"removeWeaponAmmunition\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a67ab1b3661e9a6c2df4c4fd057d908c7dae9735d1ef61816714b14163794ae7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 122, + "startColumn": 2, + "charOffset": 6062, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 120, + "startColumn": 2, + "charOffset": 5893, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, REMOVE_BEGINNING_WEAPON_AMMO, \"removeBeginningWeaponAmmunition\", true);\n\tloadBoolConfig(L, REMOVE_POTION_CHARGES, \"removeChargesFromPotions\", true);\n\tloadBoolConfig(L, REMOVE_RUNE_CHARGES, \"removeChargesFromRunes\", true);\n\tloadBoolConfig(L, REMOVE_WEAPON_AMMO, \"removeWeaponAmmunition\", true);\n\tloadBoolConfig(L, REMOVE_WEAPON_CHARGES, \"removeWeaponCharges\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2158e8e01cd4a5f671da250c04bfbd6f6a01e264d9aabe11fea73cb9c9e309ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 123, + "startColumn": 2, + "charOffset": 6135, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 121, + "startColumn": 2, + "charOffset": 5984, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, REMOVE_POTION_CHARGES, \"removeChargesFromPotions\", true);\n\tloadBoolConfig(L, REMOVE_RUNE_CHARGES, \"removeChargesFromRunes\", true);\n\tloadBoolConfig(L, REMOVE_WEAPON_AMMO, \"removeWeaponAmmunition\", true);\n\tloadBoolConfig(L, REMOVE_WEAPON_CHARGES, \"removeWeaponCharges\", true);\n\tloadBoolConfig(L, REPLACE_KICK_ON_LOGIN, \"replaceKickOnLogin\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "459f5f0706b9abbace77c7b7fbf0dea6ef3606b984bab51d711f6214de793dcb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 124, + "startColumn": 2, + "charOffset": 6207, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 122, + "startColumn": 2, + "charOffset": 6061, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, REMOVE_RUNE_CHARGES, \"removeChargesFromRunes\", true);\n\tloadBoolConfig(L, REMOVE_WEAPON_AMMO, \"removeWeaponAmmunition\", true);\n\tloadBoolConfig(L, REMOVE_WEAPON_CHARGES, \"removeWeaponCharges\", true);\n\tloadBoolConfig(L, REPLACE_KICK_ON_LOGIN, \"replaceKickOnLogin\", true);\n\tloadBoolConfig(L, REWARD_CHEST_COLLECT_ENABLED, \"rewardChestCollectEnabled\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2461f91d8ec29eca0af263ba98edd4924989f29ad6328782ae0f826f484a9d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 125, + "startColumn": 2, + "charOffset": 6279, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 123, + "startColumn": 2, + "charOffset": 6134, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, REMOVE_WEAPON_AMMO, \"removeWeaponAmmunition\", true);\n\tloadBoolConfig(L, REMOVE_WEAPON_CHARGES, \"removeWeaponCharges\", true);\n\tloadBoolConfig(L, REPLACE_KICK_ON_LOGIN, \"replaceKickOnLogin\", true);\n\tloadBoolConfig(L, REWARD_CHEST_COLLECT_ENABLED, \"rewardChestCollectEnabled\", true);\n\tloadBoolConfig(L, SCRIPTS_CONSOLE_LOGS, \"showScriptsLogInConsole\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7c518901173777d8ff88688cf317c0ebf376d80fc4a32b9666ae21bf8732162" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 126, + "startColumn": 2, + "charOffset": 6350, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 124, + "startColumn": 2, + "charOffset": 6206, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, REMOVE_WEAPON_CHARGES, \"removeWeaponCharges\", true);\n\tloadBoolConfig(L, REPLACE_KICK_ON_LOGIN, \"replaceKickOnLogin\", true);\n\tloadBoolConfig(L, REWARD_CHEST_COLLECT_ENABLED, \"rewardChestCollectEnabled\", true);\n\tloadBoolConfig(L, SCRIPTS_CONSOLE_LOGS, \"showScriptsLogInConsole\", true);\n\tloadBoolConfig(L, SHOW_LOOTS_IN_BESTIARY, \"showLootsInBestiary\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5592adf44a00865616cc1be6e5ae5873e53c7bef107a06415a6b186ff2d4b2ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 127, + "startColumn": 2, + "charOffset": 6435, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 125, + "startColumn": 2, + "charOffset": 6278, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, REPLACE_KICK_ON_LOGIN, \"replaceKickOnLogin\", true);\n\tloadBoolConfig(L, REWARD_CHEST_COLLECT_ENABLED, \"rewardChestCollectEnabled\", true);\n\tloadBoolConfig(L, SCRIPTS_CONSOLE_LOGS, \"showScriptsLogInConsole\", true);\n\tloadBoolConfig(L, SHOW_LOOTS_IN_BESTIARY, \"showLootsInBestiary\", false);\n\tloadBoolConfig(L, SKULLED_DEATH_LOSE_STORE_ITEM, \"skulledDeathLoseStoreItem\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9af517a2c1e42126063f307879737d568f2f773d178d3162db688b0e7aec08f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 128, + "startColumn": 2, + "charOffset": 6510, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 126, + "startColumn": 2, + "charOffset": 6349, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, REWARD_CHEST_COLLECT_ENABLED, \"rewardChestCollectEnabled\", true);\n\tloadBoolConfig(L, SCRIPTS_CONSOLE_LOGS, \"showScriptsLogInConsole\", true);\n\tloadBoolConfig(L, SHOW_LOOTS_IN_BESTIARY, \"showLootsInBestiary\", false);\n\tloadBoolConfig(L, SKULLED_DEATH_LOSE_STORE_ITEM, \"skulledDeathLoseStoreItem\", false);\n\tloadBoolConfig(L, SORT_LOOT_BY_CHANCE, \"sortLootByChance\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a04345a861937196afed3e6e7ef352f4eb5c1ddc12fc5b3aaa4eb65e27d248e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 129, + "startColumn": 2, + "charOffset": 6584, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 127, + "startColumn": 2, + "charOffset": 6434, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, SCRIPTS_CONSOLE_LOGS, \"showScriptsLogInConsole\", true);\n\tloadBoolConfig(L, SHOW_LOOTS_IN_BESTIARY, \"showLootsInBestiary\", false);\n\tloadBoolConfig(L, SKULLED_DEATH_LOSE_STORE_ITEM, \"skulledDeathLoseStoreItem\", false);\n\tloadBoolConfig(L, SORT_LOOT_BY_CHANCE, \"sortLootByChance\", false);\n\tloadBoolConfig(L, STAMINA_PZ, \"staminaPz\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2d0a6da3b0be28f0b78a90bbf722bddff7a790f4997373eaa4f59a22cc6b571" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 130, + "startColumn": 2, + "charOffset": 6671, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 128, + "startColumn": 2, + "charOffset": 6509, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, SHOW_LOOTS_IN_BESTIARY, \"showLootsInBestiary\", false);\n\tloadBoolConfig(L, SKULLED_DEATH_LOSE_STORE_ITEM, \"skulledDeathLoseStoreItem\", false);\n\tloadBoolConfig(L, SORT_LOOT_BY_CHANCE, \"sortLootByChance\", false);\n\tloadBoolConfig(L, STAMINA_PZ, \"staminaPz\", false);\n\tloadBoolConfig(L, STAMINA_SYSTEM, \"staminaSystem\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c399fc90f9df58de6c30df696a255ca4cd8692083da1838db2253cc98701b0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 131, + "startColumn": 2, + "charOffset": 6739, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 129, + "startColumn": 2, + "charOffset": 6583, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, SKULLED_DEATH_LOSE_STORE_ITEM, \"skulledDeathLoseStoreItem\", false);\n\tloadBoolConfig(L, SORT_LOOT_BY_CHANCE, \"sortLootByChance\", false);\n\tloadBoolConfig(L, STAMINA_PZ, \"staminaPz\", false);\n\tloadBoolConfig(L, STAMINA_SYSTEM, \"staminaSystem\", true);\n\tloadBoolConfig(L, STAMINA_TRAINER, \"staminaTrainer\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67302702f76c2a08638768d887fb2f18f8a8b4f6e5870c621729c22b75ded4b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 132, + "startColumn": 2, + "charOffset": 6791, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 130, + "startColumn": 2, + "charOffset": 6670, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, SORT_LOOT_BY_CHANCE, \"sortLootByChance\", false);\n\tloadBoolConfig(L, STAMINA_PZ, \"staminaPz\", false);\n\tloadBoolConfig(L, STAMINA_SYSTEM, \"staminaSystem\", true);\n\tloadBoolConfig(L, STAMINA_TRAINER, \"staminaTrainer\", false);\n\tloadBoolConfig(L, STASH_MOVING, \"stashMoving\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7c518901173777d8ff88688cf317c0ebf376d80fc4a32b9666ae21bf8732162" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 133, + "startColumn": 2, + "charOffset": 6850, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 131, + "startColumn": 2, + "charOffset": 6738, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, STAMINA_PZ, \"staminaPz\", false);\n\tloadBoolConfig(L, STAMINA_SYSTEM, \"staminaSystem\", true);\n\tloadBoolConfig(L, STAMINA_TRAINER, \"staminaTrainer\", false);\n\tloadBoolConfig(L, STASH_MOVING, \"stashMoving\", false);\n\tloadBoolConfig(L, TASK_HUNTING_ENABLED, \"taskHuntingSystemEnabled\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "172fc2ea75e43105c4e730f77f19257c85da8caab5dd6ffd8352d3c7e9a0f203" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 2, + "charOffset": 6912, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 2, + "charOffset": 6790, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, STAMINA_SYSTEM, \"staminaSystem\", true);\n\tloadBoolConfig(L, STAMINA_TRAINER, \"staminaTrainer\", false);\n\tloadBoolConfig(L, STASH_MOVING, \"stashMoving\", false);\n\tloadBoolConfig(L, TASK_HUNTING_ENABLED, \"taskHuntingSystemEnabled\", true);\n\tloadBoolConfig(L, TASK_HUNTING_FREE_THIRD_SLOT, \"taskHuntingFreeThirdSlot\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bffe723d35a61f4e980e7242e20ea4b7f366e313249a8b8c56dff98318ca3fb7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 135, + "startColumn": 2, + "charOffset": 6968, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 133, + "startColumn": 2, + "charOffset": 6849, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, STAMINA_TRAINER, \"staminaTrainer\", false);\n\tloadBoolConfig(L, STASH_MOVING, \"stashMoving\", false);\n\tloadBoolConfig(L, TASK_HUNTING_ENABLED, \"taskHuntingSystemEnabled\", true);\n\tloadBoolConfig(L, TASK_HUNTING_FREE_THIRD_SLOT, \"taskHuntingFreeThirdSlot\", false);\n\tloadBoolConfig(L, TELEPORT_PLAYER_TO_VOCATION_ROOM, \"teleportPlayerToVocationRoom\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42838ab67062d894a956167bca684d8ae5ec53bb1d12becdffbf4e39966071bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 136, + "startColumn": 2, + "charOffset": 7044, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 2, + "charOffset": 6911, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, STASH_MOVING, \"stashMoving\", false);\n\tloadBoolConfig(L, TASK_HUNTING_ENABLED, \"taskHuntingSystemEnabled\", true);\n\tloadBoolConfig(L, TASK_HUNTING_FREE_THIRD_SLOT, \"taskHuntingFreeThirdSlot\", false);\n\tloadBoolConfig(L, TELEPORT_PLAYER_TO_VOCATION_ROOM, \"teleportPlayerToVocationRoom\", true);\n\tloadBoolConfig(L, TELEPORT_SUMMONS, \"teleportSummons\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14977ef964b55c8a361a28523d3d86793562edf258c289d646a1b102d3c247b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 137, + "startColumn": 2, + "charOffset": 7129, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 135, + "startColumn": 2, + "charOffset": 6967, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, TASK_HUNTING_ENABLED, \"taskHuntingSystemEnabled\", true);\n\tloadBoolConfig(L, TASK_HUNTING_FREE_THIRD_SLOT, \"taskHuntingFreeThirdSlot\", false);\n\tloadBoolConfig(L, TELEPORT_PLAYER_TO_VOCATION_ROOM, \"teleportPlayerToVocationRoom\", true);\n\tloadBoolConfig(L, TELEPORT_SUMMONS, \"teleportSummons\", false);\n\tloadBoolConfig(L, TOGGLE_ATTACK_SPEED_ONFIST, \"toggleAttackSpeedOnFist\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78289bc17d1658f56e6f0fb89e0ebee8f64eeb35c1432a5432ab435621a64250" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 138, + "startColumn": 2, + "charOffset": 7221, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 136, + "startColumn": 2, + "charOffset": 7043, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, TASK_HUNTING_FREE_THIRD_SLOT, \"taskHuntingFreeThirdSlot\", false);\n\tloadBoolConfig(L, TELEPORT_PLAYER_TO_VOCATION_ROOM, \"teleportPlayerToVocationRoom\", true);\n\tloadBoolConfig(L, TELEPORT_SUMMONS, \"teleportSummons\", false);\n\tloadBoolConfig(L, TOGGLE_ATTACK_SPEED_ONFIST, \"toggleAttackSpeedOnFist\", false);\n\tloadBoolConfig(L, TOGGLE_CHAIN_SYSTEM, \"toggleChainSystem\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "326982a25c7e55d2a5dbb9101dcd1dbe494ef581161f857aa6d22c3e42509b28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 139, + "startColumn": 2, + "charOffset": 7285, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 137, + "startColumn": 2, + "charOffset": 7128, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, TELEPORT_PLAYER_TO_VOCATION_ROOM, \"teleportPlayerToVocationRoom\", true);\n\tloadBoolConfig(L, TELEPORT_SUMMONS, \"teleportSummons\", false);\n\tloadBoolConfig(L, TOGGLE_ATTACK_SPEED_ONFIST, \"toggleAttackSpeedOnFist\", false);\n\tloadBoolConfig(L, TOGGLE_CHAIN_SYSTEM, \"toggleChainSystem\", true);\n\tloadBoolConfig(L, TOGGLE_DOWNLOAD_MAP, \"toggleDownloadMap\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "347236ecfcdcb038a3dbdfea3738b586a95eff8ecf713e38f5d892d50106efe0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 140, + "startColumn": 2, + "charOffset": 7367, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 138, + "startColumn": 2, + "charOffset": 7220, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, TELEPORT_SUMMONS, \"teleportSummons\", false);\n\tloadBoolConfig(L, TOGGLE_ATTACK_SPEED_ONFIST, \"toggleAttackSpeedOnFist\", false);\n\tloadBoolConfig(L, TOGGLE_CHAIN_SYSTEM, \"toggleChainSystem\", true);\n\tloadBoolConfig(L, TOGGLE_DOWNLOAD_MAP, \"toggleDownloadMap\", false);\n\tloadBoolConfig(L, TOGGLE_FREE_QUEST, \"toggleFreeQuest\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afee102c4561d739536406f75087fbcc89e9d5bd46bf277f12df2bfc6b9ce0e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 141, + "startColumn": 2, + "charOffset": 7435, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 139, + "startColumn": 2, + "charOffset": 7284, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, TOGGLE_ATTACK_SPEED_ONFIST, \"toggleAttackSpeedOnFist\", false);\n\tloadBoolConfig(L, TOGGLE_CHAIN_SYSTEM, \"toggleChainSystem\", true);\n\tloadBoolConfig(L, TOGGLE_DOWNLOAD_MAP, \"toggleDownloadMap\", false);\n\tloadBoolConfig(L, TOGGLE_FREE_QUEST, \"toggleFreeQuest\", true);\n\tloadBoolConfig(L, TOGGLE_GOLD_POUCH_ALLOW_ANYTHING, \"toggleGoldPouchAllowAnything\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4e5aabd3a2ba91f8f487cca94aeaeb39235dfb2b0533e453a2b7ff86f068d8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 142, + "startColumn": 2, + "charOffset": 7504, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 140, + "startColumn": 2, + "charOffset": 7366, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, TOGGLE_CHAIN_SYSTEM, \"toggleChainSystem\", true);\n\tloadBoolConfig(L, TOGGLE_DOWNLOAD_MAP, \"toggleDownloadMap\", false);\n\tloadBoolConfig(L, TOGGLE_FREE_QUEST, \"toggleFreeQuest\", true);\n\tloadBoolConfig(L, TOGGLE_GOLD_POUCH_ALLOW_ANYTHING, \"toggleGoldPouchAllowAnything\", false);\n\tloadBoolConfig(L, TOGGLE_GOLD_POUCH_QUICKLOOT_ONLY, \"toggleGoldPouchQuickLootOnly\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8fcda7b31bfe08e3f994e0cbbcae40343804bc26b93781058ff9ef138c446b34" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 143, + "startColumn": 2, + "charOffset": 7568, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 141, + "startColumn": 2, + "charOffset": 7434, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, TOGGLE_DOWNLOAD_MAP, \"toggleDownloadMap\", false);\n\tloadBoolConfig(L, TOGGLE_FREE_QUEST, \"toggleFreeQuest\", true);\n\tloadBoolConfig(L, TOGGLE_GOLD_POUCH_ALLOW_ANYTHING, \"toggleGoldPouchAllowAnything\", false);\n\tloadBoolConfig(L, TOGGLE_GOLD_POUCH_QUICKLOOT_ONLY, \"toggleGoldPouchQuickLootOnly\", false);\n\tloadBoolConfig(L, TOGGLE_HAZARDSYSTEM, \"toogleHazardSystem\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d6fde16021ec051b21dd4b349ce2d5c1df853bd1320131192e1dfeb5e6b8274" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 144, + "startColumn": 2, + "charOffset": 7661, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 142, + "startColumn": 2, + "charOffset": 7503, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, TOGGLE_FREE_QUEST, \"toggleFreeQuest\", true);\n\tloadBoolConfig(L, TOGGLE_GOLD_POUCH_ALLOW_ANYTHING, \"toggleGoldPouchAllowAnything\", false);\n\tloadBoolConfig(L, TOGGLE_GOLD_POUCH_QUICKLOOT_ONLY, \"toggleGoldPouchQuickLootOnly\", false);\n\tloadBoolConfig(L, TOGGLE_HAZARDSYSTEM, \"toogleHazardSystem\", true);\n\tloadBoolConfig(L, TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART, \"togglehouseTransferOnRestart\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06f184b3957822abc315792e4ce0f521ebee435216fcb3bde07999c41ccef24c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 145, + "startColumn": 2, + "charOffset": 7754, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 143, + "startColumn": 2, + "charOffset": 7567, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, TOGGLE_GOLD_POUCH_ALLOW_ANYTHING, \"toggleGoldPouchAllowAnything\", false);\n\tloadBoolConfig(L, TOGGLE_GOLD_POUCH_QUICKLOOT_ONLY, \"toggleGoldPouchQuickLootOnly\", false);\n\tloadBoolConfig(L, TOGGLE_HAZARDSYSTEM, \"toogleHazardSystem\", true);\n\tloadBoolConfig(L, TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART, \"togglehouseTransferOnRestart\", false);\n\tloadBoolConfig(L, TOGGLE_IMBUEMENT_NON_AGGRESSIVE_FIGHT_ONLY, \"toggleImbuementNonAggressiveFightOnly\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44b5f149b48aa32a2f9eec0e30364f62fe51a2bfac5f16363bd8d8d838250853" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 146, + "startColumn": 2, + "charOffset": 7823, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 144, + "startColumn": 2, + "charOffset": 7660, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, TOGGLE_GOLD_POUCH_QUICKLOOT_ONLY, \"toggleGoldPouchQuickLootOnly\", false);\n\tloadBoolConfig(L, TOGGLE_HAZARDSYSTEM, \"toogleHazardSystem\", true);\n\tloadBoolConfig(L, TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART, \"togglehouseTransferOnRestart\", false);\n\tloadBoolConfig(L, TOGGLE_IMBUEMENT_NON_AGGRESSIVE_FIGHT_ONLY, \"toggleImbuementNonAggressiveFightOnly\", false);\n\tloadBoolConfig(L, TOGGLE_IMBUEMENT_SHRINE_STORAGE, \"toggleImbuementShrineStorage\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "947c5a7ea2e9320cd43f2f4af4d85e0ecc8a56a0ba7331b5f7fbc30972c90ce5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 147, + "startColumn": 2, + "charOffset": 7923, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 145, + "startColumn": 2, + "charOffset": 7753, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, TOGGLE_HAZARDSYSTEM, \"toogleHazardSystem\", true);\n\tloadBoolConfig(L, TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART, \"togglehouseTransferOnRestart\", false);\n\tloadBoolConfig(L, TOGGLE_IMBUEMENT_NON_AGGRESSIVE_FIGHT_ONLY, \"toggleImbuementNonAggressiveFightOnly\", false);\n\tloadBoolConfig(L, TOGGLE_IMBUEMENT_SHRINE_STORAGE, \"toggleImbuementShrineStorage\", true);\n\tloadBoolConfig(L, TOGGLE_MOUNT_IN_PZ, \"toggleMountInProtectionZone\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c4e2fe7fc4886a0cdd2763e0180780bfc33b39fca40402a640dcf9071390b65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 148, + "startColumn": 2, + "charOffset": 8035, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 146, + "startColumn": 2, + "charOffset": 7822, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART, \"togglehouseTransferOnRestart\", false);\n\tloadBoolConfig(L, TOGGLE_IMBUEMENT_NON_AGGRESSIVE_FIGHT_ONLY, \"toggleImbuementNonAggressiveFightOnly\", false);\n\tloadBoolConfig(L, TOGGLE_IMBUEMENT_SHRINE_STORAGE, \"toggleImbuementShrineStorage\", true);\n\tloadBoolConfig(L, TOGGLE_MOUNT_IN_PZ, \"toggleMountInProtectionZone\", false);\n\tloadBoolConfig(L, TOGGLE_RECEIVE_REWARD, \"toggleReceiveReward\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27fc9ee365c3e63ead3baf816f595ac162a7c6d12d48619214499f39b13731e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 149, + "startColumn": 2, + "charOffset": 8126, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 147, + "startColumn": 2, + "charOffset": 7922, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, TOGGLE_IMBUEMENT_NON_AGGRESSIVE_FIGHT_ONLY, \"toggleImbuementNonAggressiveFightOnly\", false);\n\tloadBoolConfig(L, TOGGLE_IMBUEMENT_SHRINE_STORAGE, \"toggleImbuementShrineStorage\", true);\n\tloadBoolConfig(L, TOGGLE_MOUNT_IN_PZ, \"toggleMountInProtectionZone\", false);\n\tloadBoolConfig(L, TOGGLE_RECEIVE_REWARD, \"toggleReceiveReward\", false);\n\tloadBoolConfig(L, TOGGLE_SAVE_ASYNC, \"toggleSaveAsync\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b31e6cbd7682d4b816bdc0d47196feec5db3959d62d6eb751712bcd33a1ec0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 150, + "startColumn": 2, + "charOffset": 8204, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 148, + "startColumn": 2, + "charOffset": 8034, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, TOGGLE_IMBUEMENT_SHRINE_STORAGE, \"toggleImbuementShrineStorage\", true);\n\tloadBoolConfig(L, TOGGLE_MOUNT_IN_PZ, \"toggleMountInProtectionZone\", false);\n\tloadBoolConfig(L, TOGGLE_RECEIVE_REWARD, \"toggleReceiveReward\", false);\n\tloadBoolConfig(L, TOGGLE_SAVE_ASYNC, \"toggleSaveAsync\", false);\n\tloadBoolConfig(L, TOGGLE_SAVE_INTERVAL_CLEAN_MAP, \"toggleSaveIntervalCleanMap\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa5eadf449bc60bb73ed18b6aeaa733c0df0f9b7e399bf8ba609f0be57262bdf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 151, + "startColumn": 2, + "charOffset": 8277, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 149, + "startColumn": 2, + "charOffset": 8125, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, TOGGLE_MOUNT_IN_PZ, \"toggleMountInProtectionZone\", false);\n\tloadBoolConfig(L, TOGGLE_RECEIVE_REWARD, \"toggleReceiveReward\", false);\n\tloadBoolConfig(L, TOGGLE_SAVE_ASYNC, \"toggleSaveAsync\", false);\n\tloadBoolConfig(L, TOGGLE_SAVE_INTERVAL_CLEAN_MAP, \"toggleSaveIntervalCleanMap\", false);\n\tloadBoolConfig(L, TOGGLE_SAVE_INTERVAL, \"toggleSaveInterval\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16d96748d14c33bc973f44654a030946579fab5714c008392c47e24f82f75293" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 152, + "startColumn": 2, + "charOffset": 8342, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 2, + "charOffset": 8203, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, TOGGLE_RECEIVE_REWARD, \"toggleReceiveReward\", false);\n\tloadBoolConfig(L, TOGGLE_SAVE_ASYNC, \"toggleSaveAsync\", false);\n\tloadBoolConfig(L, TOGGLE_SAVE_INTERVAL_CLEAN_MAP, \"toggleSaveIntervalCleanMap\", false);\n\tloadBoolConfig(L, TOGGLE_SAVE_INTERVAL, \"toggleSaveInterval\", false);\n\tloadBoolConfig(L, TOGGLE_SERVER_IS_RETRO, \"toggleServerIsRetroPVP\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c5faf40baec74c809eb892f6d9874f06dbb7cd21a6a5b1d828a409419af394b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 153, + "startColumn": 2, + "charOffset": 8431, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 151, + "startColumn": 2, + "charOffset": 8276, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, TOGGLE_SAVE_ASYNC, \"toggleSaveAsync\", false);\n\tloadBoolConfig(L, TOGGLE_SAVE_INTERVAL_CLEAN_MAP, \"toggleSaveIntervalCleanMap\", false);\n\tloadBoolConfig(L, TOGGLE_SAVE_INTERVAL, \"toggleSaveInterval\", false);\n\tloadBoolConfig(L, TOGGLE_SERVER_IS_RETRO, \"toggleServerIsRetroPVP\", false);\n\tloadBoolConfig(L, TOGGLE_TRAVELS_FREE, \"toggleTravelsFree\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54f5534ef9291b1fc3ba9d0fb43e964c3554b828921da64925663a53e816c51f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 154, + "startColumn": 2, + "charOffset": 8502, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 2, + "charOffset": 8341, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, TOGGLE_SAVE_INTERVAL_CLEAN_MAP, \"toggleSaveIntervalCleanMap\", false);\n\tloadBoolConfig(L, TOGGLE_SAVE_INTERVAL, \"toggleSaveInterval\", false);\n\tloadBoolConfig(L, TOGGLE_SERVER_IS_RETRO, \"toggleServerIsRetroPVP\", false);\n\tloadBoolConfig(L, TOGGLE_TRAVELS_FREE, \"toggleTravelsFree\", false);\n\tloadBoolConfig(L, TOGGLE_WHEELSYSTEM, \"wheelSystemEnabled\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "755ddd72a34f1189162ffab444568bc2239f5b35aa7a7c01d58fbf299c979108" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 155, + "startColumn": 2, + "charOffset": 8579, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 153, + "startColumn": 2, + "charOffset": 8430, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, TOGGLE_SAVE_INTERVAL, \"toggleSaveInterval\", false);\n\tloadBoolConfig(L, TOGGLE_SERVER_IS_RETRO, \"toggleServerIsRetroPVP\", false);\n\tloadBoolConfig(L, TOGGLE_TRAVELS_FREE, \"toggleTravelsFree\", false);\n\tloadBoolConfig(L, TOGGLE_WHEELSYSTEM, \"wheelSystemEnabled\", true);\n\tloadBoolConfig(L, USE_ANY_DATAPACK_FOLDER, \"useAnyDatapackFolder\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92927868be24b5c84692345f870bbf991d8366af18ac9a83b22b87ce4f4be579" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 156, + "startColumn": 2, + "charOffset": 8648, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 154, + "startColumn": 2, + "charOffset": 8501, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, TOGGLE_SERVER_IS_RETRO, \"toggleServerIsRetroPVP\", false);\n\tloadBoolConfig(L, TOGGLE_TRAVELS_FREE, \"toggleTravelsFree\", false);\n\tloadBoolConfig(L, TOGGLE_WHEELSYSTEM, \"wheelSystemEnabled\", true);\n\tloadBoolConfig(L, USE_ANY_DATAPACK_FOLDER, \"useAnyDatapackFolder\", false);\n\tloadBoolConfig(L, VIP_AUTOLOOT_VIP_ONLY, \"vipAutoLootVipOnly\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d5c2048243fd812a7d3ed48de916affa8d9a4446bcd0bfda671c71db9681751" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 2, + "charOffset": 8716, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 2, + "charOffset": 8578, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, TOGGLE_TRAVELS_FREE, \"toggleTravelsFree\", false);\n\tloadBoolConfig(L, TOGGLE_WHEELSYSTEM, \"wheelSystemEnabled\", true);\n\tloadBoolConfig(L, USE_ANY_DATAPACK_FOLDER, \"useAnyDatapackFolder\", false);\n\tloadBoolConfig(L, VIP_AUTOLOOT_VIP_ONLY, \"vipAutoLootVipOnly\", false);\n\tloadBoolConfig(L, VIP_KEEP_HOUSE, \"vipKeepHouse\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa5eadf449bc60bb73ed18b6aeaa733c0df0f9b7e399bf8ba609f0be57262bdf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 158, + "startColumn": 2, + "charOffset": 8792, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 156, + "startColumn": 2, + "charOffset": 8647, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, TOGGLE_WHEELSYSTEM, \"wheelSystemEnabled\", true);\n\tloadBoolConfig(L, USE_ANY_DATAPACK_FOLDER, \"useAnyDatapackFolder\", false);\n\tloadBoolConfig(L, VIP_AUTOLOOT_VIP_ONLY, \"vipAutoLootVipOnly\", false);\n\tloadBoolConfig(L, VIP_KEEP_HOUSE, \"vipKeepHouse\", false);\n\tloadBoolConfig(L, VIP_STAY_ONLINE, \"vipStayOnline\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4320f879c29b33e7053575185c043a3bbfe0b07ea686481f923e858c61130d5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 159, + "startColumn": 2, + "charOffset": 8864, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 157, + "startColumn": 2, + "charOffset": 8715, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, USE_ANY_DATAPACK_FOLDER, \"useAnyDatapackFolder\", false);\n\tloadBoolConfig(L, VIP_AUTOLOOT_VIP_ONLY, \"vipAutoLootVipOnly\", false);\n\tloadBoolConfig(L, VIP_KEEP_HOUSE, \"vipKeepHouse\", false);\n\tloadBoolConfig(L, VIP_STAY_ONLINE, \"vipStayOnline\", false);\n\tloadBoolConfig(L, VIP_SYSTEM_ENABLED, \"vipSystemEnabled\", false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21742ce25735be992c9766bb65170514c16a44b7cac76a851f54547f9e088ab7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 160, + "startColumn": 2, + "charOffset": 8923, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 2, + "charOffset": 8791, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, VIP_AUTOLOOT_VIP_ONLY, \"vipAutoLootVipOnly\", false);\n\tloadBoolConfig(L, VIP_KEEP_HOUSE, \"vipKeepHouse\", false);\n\tloadBoolConfig(L, VIP_STAY_ONLINE, \"vipStayOnline\", false);\n\tloadBoolConfig(L, VIP_SYSTEM_ENABLED, \"vipSystemEnabled\", false);\n\tloadBoolConfig(L, WARN_UNSAFE_SCRIPTS, \"warnUnsafeScripts\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb11a85a48e8086779569e20da92681e35b17f636454a139fba3540ec99d75a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 161, + "startColumn": 2, + "charOffset": 8984, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 159, + "startColumn": 2, + "charOffset": 8863, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, VIP_KEEP_HOUSE, \"vipKeepHouse\", false);\n\tloadBoolConfig(L, VIP_STAY_ONLINE, \"vipStayOnline\", false);\n\tloadBoolConfig(L, VIP_SYSTEM_ENABLED, \"vipSystemEnabled\", false);\n\tloadBoolConfig(L, WARN_UNSAFE_SCRIPTS, \"warnUnsafeScripts\", true);\n\tloadBoolConfig(L, XP_DISPLAY_MODE, \"experienceDisplayRates\", true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa123017a59beaaf8a2d93d4c5f5079effe91b11ba0b5a9a411de33aa71f0e01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 162, + "startColumn": 2, + "charOffset": 9051, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 160, + "startColumn": 2, + "charOffset": 8922, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, VIP_STAY_ONLINE, \"vipStayOnline\", false);\n\tloadBoolConfig(L, VIP_SYSTEM_ENABLED, \"vipSystemEnabled\", false);\n\tloadBoolConfig(L, WARN_UNSAFE_SCRIPTS, \"warnUnsafeScripts\", true);\n\tloadBoolConfig(L, XP_DISPLAY_MODE, \"experienceDisplayRates\", true);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e95d3bec7ff5fbb6e604935671e0d35f8578c558b90054190128fcf5e8c00cb9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 163, + "startColumn": 2, + "charOffset": 9119, + "charLength": 14, + "snippet": { + "text": "loadBoolConfig" + } + }, + "contextRegion": { + "startLine": 161, + "startColumn": 2, + "charOffset": 8983, + "charLength": 14, + "snippet": { + "text": "\tloadBoolConfig(L, VIP_SYSTEM_ENABLED, \"vipSystemEnabled\", false);\n\tloadBoolConfig(L, WARN_UNSAFE_SCRIPTS, \"warnUnsafeScripts\", true);\n\tloadBoolConfig(L, XP_DISPLAY_MODE, \"experienceDisplayRates\", true);\n\n\tloadFloatConfig(L, BESTIARY_RATE_CHARM_SHOP_PRICE, \"bestiaryRateCharmShopPrice\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "450af88ec498d4945bed014a34b673287d630ea6aeefb7e4deaea5aef76ef3f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 165, + "startColumn": 2, + "charOffset": 9189, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 163, + "startColumn": 2, + "charOffset": 9118, + "charLength": 15, + "snippet": { + "text": "\tloadBoolConfig(L, XP_DISPLAY_MODE, \"experienceDisplayRates\", true);\n\n\tloadFloatConfig(L, BESTIARY_RATE_CHARM_SHOP_PRICE, \"bestiaryRateCharmShopPrice\", 1.0);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_AXE, \"combatChainSkillFormulaAxe\", 0.9);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_CLUB, \"combatChainSkillFormulaClub\", 0.7);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e368647c05b2c8d029f161957539ee068030050428eaf70642aba2648339e36b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 165, + "startColumn": 83, + "charOffset": 9270, + "charLength": 3, + "snippet": { + "text": "1.0" + } + }, + "contextRegion": { + "startLine": 163, + "startColumn": 83, + "charOffset": 9118, + "charLength": 3, + "snippet": { + "text": "\tloadBoolConfig(L, XP_DISPLAY_MODE, \"experienceDisplayRates\", true);\n\n\tloadFloatConfig(L, BESTIARY_RATE_CHARM_SHOP_PRICE, \"bestiaryRateCharmShopPrice\", 1.0);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_AXE, \"combatChainSkillFormulaAxe\", 0.9);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_CLUB, \"combatChainSkillFormulaClub\", 0.7);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e57750d6c1205dac93a25af4a382d4fff4c45d5d0aaaab0f0718d154e803d85c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 166, + "startColumn": 2, + "charOffset": 9277, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 2, + "charOffset": 9187, + "charLength": 15, + "snippet": { + "text": "\n\tloadFloatConfig(L, BESTIARY_RATE_CHARM_SHOP_PRICE, \"bestiaryRateCharmShopPrice\", 1.0);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_AXE, \"combatChainSkillFormulaAxe\", 0.9);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_CLUB, \"combatChainSkillFormulaClub\", 0.7);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_SWORD, \"combatChainSkillFormulaSword\", 1.1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d939f933fef5574a68efde233d3b03c40dfc6f2f5bcb2ce7a534ee4106a99356" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 166, + "startColumn": 83, + "charOffset": 9358, + "charLength": 3, + "snippet": { + "text": "0.9" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 83, + "charOffset": 9187, + "charLength": 3, + "snippet": { + "text": "\n\tloadFloatConfig(L, BESTIARY_RATE_CHARM_SHOP_PRICE, \"bestiaryRateCharmShopPrice\", 1.0);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_AXE, \"combatChainSkillFormulaAxe\", 0.9);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_CLUB, \"combatChainSkillFormulaClub\", 0.7);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_SWORD, \"combatChainSkillFormulaSword\", 1.1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4970ea2a67f12a45592d8c8407a747d012a54950d36bcbf446ff9808246a820e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 166, + "startColumn": 83, + "charOffset": 9358, + "charLength": 3, + "snippet": { + "text": "0.9" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 83, + "charOffset": 9187, + "charLength": 3, + "snippet": { + "text": "\n\tloadFloatConfig(L, BESTIARY_RATE_CHARM_SHOP_PRICE, \"bestiaryRateCharmShopPrice\", 1.0);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_AXE, \"combatChainSkillFormulaAxe\", 0.9);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_CLUB, \"combatChainSkillFormulaClub\", 0.7);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_SWORD, \"combatChainSkillFormulaSword\", 1.1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e3adeb39ad035e5cee436a07354795b1177c2b5045e32efeb2359740e02bc6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 2, + "charOffset": 9365, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 2, + "charOffset": 9188, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, BESTIARY_RATE_CHARM_SHOP_PRICE, \"bestiaryRateCharmShopPrice\", 1.0);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_AXE, \"combatChainSkillFormulaAxe\", 0.9);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_CLUB, \"combatChainSkillFormulaClub\", 0.7);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_SWORD, \"combatChainSkillFormulaSword\", 1.1);\n\tloadFloatConfig(L, FORGE_AMOUNT_MULTIPLIER, \"forgeAmountMultiplier\", 3.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5bb9feb3819563e427a922632c17f5b8d4babc67fe523e70a085d3060fa17f90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 85, + "charOffset": 9448, + "charLength": 3, + "snippet": { + "text": "0.7" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 85, + "charOffset": 9188, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, BESTIARY_RATE_CHARM_SHOP_PRICE, \"bestiaryRateCharmShopPrice\", 1.0);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_AXE, \"combatChainSkillFormulaAxe\", 0.9);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_CLUB, \"combatChainSkillFormulaClub\", 0.7);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_SWORD, \"combatChainSkillFormulaSword\", 1.1);\n\tloadFloatConfig(L, FORGE_AMOUNT_MULTIPLIER, \"forgeAmountMultiplier\", 3.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df4823cd064c6eeec819a00953438dae457aed55a48a7dd843fc8250d5a03b95" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 85, + "charOffset": 9448, + "charLength": 3, + "snippet": { + "text": "0.7" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 85, + "charOffset": 9188, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, BESTIARY_RATE_CHARM_SHOP_PRICE, \"bestiaryRateCharmShopPrice\", 1.0);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_AXE, \"combatChainSkillFormulaAxe\", 0.9);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_CLUB, \"combatChainSkillFormulaClub\", 0.7);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_SWORD, \"combatChainSkillFormulaSword\", 1.1);\n\tloadFloatConfig(L, FORGE_AMOUNT_MULTIPLIER, \"forgeAmountMultiplier\", 3.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da4b3941760806e77f7344551f546782cdadc27010a3023aab582da944bb50b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 168, + "startColumn": 2, + "charOffset": 9455, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 166, + "startColumn": 2, + "charOffset": 9276, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_AXE, \"combatChainSkillFormulaAxe\", 0.9);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_CLUB, \"combatChainSkillFormulaClub\", 0.7);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_SWORD, \"combatChainSkillFormulaSword\", 1.1);\n\tloadFloatConfig(L, FORGE_AMOUNT_MULTIPLIER, \"forgeAmountMultiplier\", 3.0);\n\tloadFloatConfig(L, HAZARD_EXP_BONUS_MULTIPLIER, \"hazardExpBonusMultiplier\", 2.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54f5534ef9291b1fc3ba9d0fb43e964c3554b828921da64925663a53e816c51f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 168, + "startColumn": 87, + "charOffset": 9540, + "charLength": 3, + "snippet": { + "text": "1.1" + } + }, + "contextRegion": { + "startLine": 166, + "startColumn": 87, + "charOffset": 9276, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_AXE, \"combatChainSkillFormulaAxe\", 0.9);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_CLUB, \"combatChainSkillFormulaClub\", 0.7);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_SWORD, \"combatChainSkillFormulaSword\", 1.1);\n\tloadFloatConfig(L, FORGE_AMOUNT_MULTIPLIER, \"forgeAmountMultiplier\", 3.0);\n\tloadFloatConfig(L, HAZARD_EXP_BONUS_MULTIPLIER, \"hazardExpBonusMultiplier\", 2.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b129e20696e6c4c987c382c99b1e738aa8b406a38b33b6c054ad350228af99f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1.1 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 168, + "startColumn": 87, + "charOffset": 9540, + "charLength": 3, + "snippet": { + "text": "1.1" + } + }, + "contextRegion": { + "startLine": 166, + "startColumn": 87, + "charOffset": 9276, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_AXE, \"combatChainSkillFormulaAxe\", 0.9);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_CLUB, \"combatChainSkillFormulaClub\", 0.7);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_SWORD, \"combatChainSkillFormulaSword\", 1.1);\n\tloadFloatConfig(L, FORGE_AMOUNT_MULTIPLIER, \"forgeAmountMultiplier\", 3.0);\n\tloadFloatConfig(L, HAZARD_EXP_BONUS_MULTIPLIER, \"hazardExpBonusMultiplier\", 2.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b676b838cb3f73627e98f778261d783bfb026a6f03cb277e41b02fe2c8b103a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 169, + "startColumn": 2, + "charOffset": 9547, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 167, + "startColumn": 2, + "charOffset": 9364, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_CLUB, \"combatChainSkillFormulaClub\", 0.7);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_SWORD, \"combatChainSkillFormulaSword\", 1.1);\n\tloadFloatConfig(L, FORGE_AMOUNT_MULTIPLIER, \"forgeAmountMultiplier\", 3.0);\n\tloadFloatConfig(L, HAZARD_EXP_BONUS_MULTIPLIER, \"hazardExpBonusMultiplier\", 2.0);\n\tloadFloatConfig(L, LOYALTY_BONUS_PERCENTAGE_MULTIPLIER, \"loyaltyBonusPercentageMultiplier\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "718e217b94a68c7ae55322006288e79dd6beaa4409059f5020da7eb06abff9f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 169, + "startColumn": 71, + "charOffset": 9616, + "charLength": 3, + "snippet": { + "text": "3.0" + } + }, + "contextRegion": { + "startLine": 167, + "startColumn": 71, + "charOffset": 9364, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_CLUB, \"combatChainSkillFormulaClub\", 0.7);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_SWORD, \"combatChainSkillFormulaSword\", 1.1);\n\tloadFloatConfig(L, FORGE_AMOUNT_MULTIPLIER, \"forgeAmountMultiplier\", 3.0);\n\tloadFloatConfig(L, HAZARD_EXP_BONUS_MULTIPLIER, \"hazardExpBonusMultiplier\", 2.0);\n\tloadFloatConfig(L, LOYALTY_BONUS_PERCENTAGE_MULTIPLIER, \"loyaltyBonusPercentageMultiplier\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7d66b65e481bb0a675c621da1fbe6748e3e3fbdfbe5ea1b89b033c563bdde69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "3.0 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 169, + "startColumn": 71, + "charOffset": 9616, + "charLength": 3, + "snippet": { + "text": "3.0" + } + }, + "contextRegion": { + "startLine": 167, + "startColumn": 71, + "charOffset": 9364, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_CLUB, \"combatChainSkillFormulaClub\", 0.7);\n\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_SWORD, \"combatChainSkillFormulaSword\", 1.1);\n\tloadFloatConfig(L, FORGE_AMOUNT_MULTIPLIER, \"forgeAmountMultiplier\", 3.0);\n\tloadFloatConfig(L, HAZARD_EXP_BONUS_MULTIPLIER, \"hazardExpBonusMultiplier\", 2.0);\n\tloadFloatConfig(L, LOYALTY_BONUS_PERCENTAGE_MULTIPLIER, \"loyaltyBonusPercentageMultiplier\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05366c6a74a61f091819bf0f04b723867ca05cdfcb3929949463034e0cdbae52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 170, + "startColumn": 2, + "charOffset": 9623, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 168, + "startColumn": 2, + "charOffset": 9454, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_SWORD, \"combatChainSkillFormulaSword\", 1.1);\n\tloadFloatConfig(L, FORGE_AMOUNT_MULTIPLIER, \"forgeAmountMultiplier\", 3.0);\n\tloadFloatConfig(L, HAZARD_EXP_BONUS_MULTIPLIER, \"hazardExpBonusMultiplier\", 2.0);\n\tloadFloatConfig(L, LOYALTY_BONUS_PERCENTAGE_MULTIPLIER, \"loyaltyBonusPercentageMultiplier\", 1.0);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_A, \"momentumChanceFormulaA\", 0.05);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73b1389d5635b929d184b9a4f71a25f313eb8643ccd1b1bac4463740f8924aef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 170, + "startColumn": 78, + "charOffset": 9699, + "charLength": 3, + "snippet": { + "text": "2.0" + } + }, + "contextRegion": { + "startLine": 168, + "startColumn": 78, + "charOffset": 9454, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_SWORD, \"combatChainSkillFormulaSword\", 1.1);\n\tloadFloatConfig(L, FORGE_AMOUNT_MULTIPLIER, \"forgeAmountMultiplier\", 3.0);\n\tloadFloatConfig(L, HAZARD_EXP_BONUS_MULTIPLIER, \"hazardExpBonusMultiplier\", 2.0);\n\tloadFloatConfig(L, LOYALTY_BONUS_PERCENTAGE_MULTIPLIER, \"loyaltyBonusPercentageMultiplier\", 1.0);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_A, \"momentumChanceFormulaA\", 0.05);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5dc8b3cdccba6fdeeefc30b0fb674b27a98adfb3a4f8f05e4e36a41f8a9b4204" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2.0 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 170, + "startColumn": 78, + "charOffset": 9699, + "charLength": 3, + "snippet": { + "text": "2.0" + } + }, + "contextRegion": { + "startLine": 168, + "startColumn": 78, + "charOffset": 9454, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_SWORD, \"combatChainSkillFormulaSword\", 1.1);\n\tloadFloatConfig(L, FORGE_AMOUNT_MULTIPLIER, \"forgeAmountMultiplier\", 3.0);\n\tloadFloatConfig(L, HAZARD_EXP_BONUS_MULTIPLIER, \"hazardExpBonusMultiplier\", 2.0);\n\tloadFloatConfig(L, LOYALTY_BONUS_PERCENTAGE_MULTIPLIER, \"loyaltyBonusPercentageMultiplier\", 1.0);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_A, \"momentumChanceFormulaA\", 0.05);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6b4c0e43f76c767b7a46e9772deaaf94faa8c643748d025836e511f3db4a536" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 171, + "startColumn": 2, + "charOffset": 9706, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 169, + "startColumn": 2, + "charOffset": 9546, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, FORGE_AMOUNT_MULTIPLIER, \"forgeAmountMultiplier\", 3.0);\n\tloadFloatConfig(L, HAZARD_EXP_BONUS_MULTIPLIER, \"hazardExpBonusMultiplier\", 2.0);\n\tloadFloatConfig(L, LOYALTY_BONUS_PERCENTAGE_MULTIPLIER, \"loyaltyBonusPercentageMultiplier\", 1.0);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_A, \"momentumChanceFormulaA\", 0.05);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_B, \"momentumChanceFormulaB\", 1.9);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b4d9853ecd603aaf17effafac057dbcb9e4500029a60545ee871aa467b031b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 171, + "startColumn": 94, + "charOffset": 9798, + "charLength": 3, + "snippet": { + "text": "1.0" + } + }, + "contextRegion": { + "startLine": 169, + "startColumn": 94, + "charOffset": 9546, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, FORGE_AMOUNT_MULTIPLIER, \"forgeAmountMultiplier\", 3.0);\n\tloadFloatConfig(L, HAZARD_EXP_BONUS_MULTIPLIER, \"hazardExpBonusMultiplier\", 2.0);\n\tloadFloatConfig(L, LOYALTY_BONUS_PERCENTAGE_MULTIPLIER, \"loyaltyBonusPercentageMultiplier\", 1.0);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_A, \"momentumChanceFormulaA\", 0.05);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_B, \"momentumChanceFormulaB\", 1.9);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "043a57013d1b0dd7fcb10e711bcf8a787928a6fe0ee1dc16b133ffc68c7214e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 2, + "charOffset": 9805, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 2, + "charOffset": 9622, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, HAZARD_EXP_BONUS_MULTIPLIER, \"hazardExpBonusMultiplier\", 2.0);\n\tloadFloatConfig(L, LOYALTY_BONUS_PERCENTAGE_MULTIPLIER, \"loyaltyBonusPercentageMultiplier\", 1.0);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_A, \"momentumChanceFormulaA\", 0.05);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_B, \"momentumChanceFormulaB\", 1.9);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_C, \"momentumChanceFormulaC\", 0.05);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3fee1abce4a90edff3c18a847351162eb3a22339a994bc88d50745e31a32f018" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 74, + "charOffset": 9877, + "charLength": 4, + "snippet": { + "text": "0.05" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 74, + "charOffset": 9622, + "charLength": 4, + "snippet": { + "text": "\tloadFloatConfig(L, HAZARD_EXP_BONUS_MULTIPLIER, \"hazardExpBonusMultiplier\", 2.0);\n\tloadFloatConfig(L, LOYALTY_BONUS_PERCENTAGE_MULTIPLIER, \"loyaltyBonusPercentageMultiplier\", 1.0);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_A, \"momentumChanceFormulaA\", 0.05);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_B, \"momentumChanceFormulaB\", 1.9);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_C, \"momentumChanceFormulaC\", 0.05);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba678fb0794a7e36370e9790223384b44d564d0d92fb1adaf7ef308fb6b83876" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.05 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 74, + "charOffset": 9877, + "charLength": 4, + "snippet": { + "text": "0.05" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 74, + "charOffset": 9622, + "charLength": 4, + "snippet": { + "text": "\tloadFloatConfig(L, HAZARD_EXP_BONUS_MULTIPLIER, \"hazardExpBonusMultiplier\", 2.0);\n\tloadFloatConfig(L, LOYALTY_BONUS_PERCENTAGE_MULTIPLIER, \"loyaltyBonusPercentageMultiplier\", 1.0);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_A, \"momentumChanceFormulaA\", 0.05);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_B, \"momentumChanceFormulaB\", 1.9);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_C, \"momentumChanceFormulaC\", 0.05);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0aafa02ac30917c93c6592e245bf1981b45db2b2fbe12f3a32fac5465ac29bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 173, + "startColumn": 2, + "charOffset": 9885, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 171, + "startColumn": 2, + "charOffset": 9705, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, LOYALTY_BONUS_PERCENTAGE_MULTIPLIER, \"loyaltyBonusPercentageMultiplier\", 1.0);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_A, \"momentumChanceFormulaA\", 0.05);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_B, \"momentumChanceFormulaB\", 1.9);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_C, \"momentumChanceFormulaC\", 0.05);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_A, \"onslaughtChanceFormulaA\", 0.05);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ae953ac6196e832a5ddaa7daa26e91e3ae224b096928e856939b8857dfb698f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 173, + "startColumn": 74, + "charOffset": 9957, + "charLength": 3, + "snippet": { + "text": "1.9" + } + }, + "contextRegion": { + "startLine": 171, + "startColumn": 74, + "charOffset": 9705, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, LOYALTY_BONUS_PERCENTAGE_MULTIPLIER, \"loyaltyBonusPercentageMultiplier\", 1.0);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_A, \"momentumChanceFormulaA\", 0.05);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_B, \"momentumChanceFormulaB\", 1.9);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_C, \"momentumChanceFormulaC\", 0.05);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_A, \"onslaughtChanceFormulaA\", 0.05);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f5a2d0da3b61b683ff21c15c3d5c6cc560f619fdf20d806dcfc7a94adbb2263" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1.9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 173, + "startColumn": 74, + "charOffset": 9957, + "charLength": 3, + "snippet": { + "text": "1.9" + } + }, + "contextRegion": { + "startLine": 171, + "startColumn": 74, + "charOffset": 9705, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, LOYALTY_BONUS_PERCENTAGE_MULTIPLIER, \"loyaltyBonusPercentageMultiplier\", 1.0);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_A, \"momentumChanceFormulaA\", 0.05);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_B, \"momentumChanceFormulaB\", 1.9);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_C, \"momentumChanceFormulaC\", 0.05);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_A, \"onslaughtChanceFormulaA\", 0.05);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba17a0b498f1c3c568e10d384b61bdea06dda80ced8609d3c4a832798b6903b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 174, + "startColumn": 2, + "charOffset": 9964, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 2, + "charOffset": 9804, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_A, \"momentumChanceFormulaA\", 0.05);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_B, \"momentumChanceFormulaB\", 1.9);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_C, \"momentumChanceFormulaC\", 0.05);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_A, \"onslaughtChanceFormulaA\", 0.05);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_B, \"onslaughtChanceFormulaB\", 0.4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4936aaf8f9cff6596d73984516d1653f832b7ee857bfecdaef8d7b8fde133632" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 174, + "startColumn": 74, + "charOffset": 10036, + "charLength": 4, + "snippet": { + "text": "0.05" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 74, + "charOffset": 9804, + "charLength": 4, + "snippet": { + "text": "\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_A, \"momentumChanceFormulaA\", 0.05);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_B, \"momentumChanceFormulaB\", 1.9);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_C, \"momentumChanceFormulaC\", 0.05);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_A, \"onslaughtChanceFormulaA\", 0.05);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_B, \"onslaughtChanceFormulaB\", 0.4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cdae7e87abda6f42667b8ef4ef7b47ad910cc7cc5dd6e59ef35a074e52c82e5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.05 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 174, + "startColumn": 74, + "charOffset": 10036, + "charLength": 4, + "snippet": { + "text": "0.05" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 74, + "charOffset": 9804, + "charLength": 4, + "snippet": { + "text": "\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_A, \"momentumChanceFormulaA\", 0.05);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_B, \"momentumChanceFormulaB\", 1.9);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_C, \"momentumChanceFormulaC\", 0.05);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_A, \"onslaughtChanceFormulaA\", 0.05);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_B, \"onslaughtChanceFormulaB\", 0.4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "949424abe55d310a82a184141b4ff3c048bade9f3c9657486670686fc0a3b051" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 175, + "startColumn": 2, + "charOffset": 10044, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 173, + "startColumn": 2, + "charOffset": 9884, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_B, \"momentumChanceFormulaB\", 1.9);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_C, \"momentumChanceFormulaC\", 0.05);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_A, \"onslaughtChanceFormulaA\", 0.05);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_B, \"onslaughtChanceFormulaB\", 0.4);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_C, \"onslaughtChanceFormulaC\", 0.05);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6a83fdba921d57f5e3a58eb07e777631ec9ee1fc8a7a5d1ac8b3586fead7dfe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 175, + "startColumn": 76, + "charOffset": 10118, + "charLength": 4, + "snippet": { + "text": "0.05" + } + }, + "contextRegion": { + "startLine": 173, + "startColumn": 76, + "charOffset": 9884, + "charLength": 4, + "snippet": { + "text": "\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_B, \"momentumChanceFormulaB\", 1.9);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_C, \"momentumChanceFormulaC\", 0.05);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_A, \"onslaughtChanceFormulaA\", 0.05);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_B, \"onslaughtChanceFormulaB\", 0.4);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_C, \"onslaughtChanceFormulaC\", 0.05);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f6e7aa27e8db73cdc9d8271a848066fa93c4557aa189caaa29cf7abcade06e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.05 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 175, + "startColumn": 76, + "charOffset": 10118, + "charLength": 4, + "snippet": { + "text": "0.05" + } + }, + "contextRegion": { + "startLine": 173, + "startColumn": 76, + "charOffset": 9884, + "charLength": 4, + "snippet": { + "text": "\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_B, \"momentumChanceFormulaB\", 1.9);\n\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_C, \"momentumChanceFormulaC\", 0.05);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_A, \"onslaughtChanceFormulaA\", 0.05);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_B, \"onslaughtChanceFormulaB\", 0.4);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_C, \"onslaughtChanceFormulaC\", 0.05);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b3738cb0fd641a7497794d42995b693c0e5b1653e8ed9fef074052009564577" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 176, + "startColumn": 2, + "charOffset": 10126, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 174, + "startColumn": 2, + "charOffset": 9963, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_C, \"momentumChanceFormulaC\", 0.05);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_A, \"onslaughtChanceFormulaA\", 0.05);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_B, \"onslaughtChanceFormulaB\", 0.4);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_C, \"onslaughtChanceFormulaC\", 0.05);\n\tloadFloatConfig(L, PARTY_SHARE_LOOT_BOOSTS_DIMINISHING_FACTOR, \"partyShareLootBoostsDimishingFactor\", 0.7f);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a348546304ec33948cad784d7f8269e77434cf1c193162bad8bc5b7da3449482" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 176, + "startColumn": 76, + "charOffset": 10200, + "charLength": 3, + "snippet": { + "text": "0.4" + } + }, + "contextRegion": { + "startLine": 174, + "startColumn": 76, + "charOffset": 9963, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_C, \"momentumChanceFormulaC\", 0.05);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_A, \"onslaughtChanceFormulaA\", 0.05);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_B, \"onslaughtChanceFormulaB\", 0.4);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_C, \"onslaughtChanceFormulaC\", 0.05);\n\tloadFloatConfig(L, PARTY_SHARE_LOOT_BOOSTS_DIMINISHING_FACTOR, \"partyShareLootBoostsDimishingFactor\", 0.7f);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "753fc953bf525d47c69afb17559e8fbdceb69e412c2a802f846a4692bce6cb84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.4 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 176, + "startColumn": 76, + "charOffset": 10200, + "charLength": 3, + "snippet": { + "text": "0.4" + } + }, + "contextRegion": { + "startLine": 174, + "startColumn": 76, + "charOffset": 9963, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_C, \"momentumChanceFormulaC\", 0.05);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_A, \"onslaughtChanceFormulaA\", 0.05);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_B, \"onslaughtChanceFormulaB\", 0.4);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_C, \"onslaughtChanceFormulaC\", 0.05);\n\tloadFloatConfig(L, PARTY_SHARE_LOOT_BOOSTS_DIMINISHING_FACTOR, \"partyShareLootBoostsDimishingFactor\", 0.7f);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ab8db87fed8d9ffece231c1bd89eb9e2e614f3b61d8b34014dd09749f9ac909" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 177, + "startColumn": 2, + "charOffset": 10207, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 175, + "startColumn": 2, + "charOffset": 10043, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_A, \"onslaughtChanceFormulaA\", 0.05);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_B, \"onslaughtChanceFormulaB\", 0.4);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_C, \"onslaughtChanceFormulaC\", 0.05);\n\tloadFloatConfig(L, PARTY_SHARE_LOOT_BOOSTS_DIMINISHING_FACTOR, \"partyShareLootBoostsDimishingFactor\", 0.7f);\n\tloadFloatConfig(L, PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, \"pvpRateDamageReductionPerLevel\", 0.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00af8f77ee31ecc18ea47b24cf608f38aa07b6f79f613ad761ec8180f87c4c34" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 177, + "startColumn": 76, + "charOffset": 10281, + "charLength": 4, + "snippet": { + "text": "0.05" + } + }, + "contextRegion": { + "startLine": 175, + "startColumn": 76, + "charOffset": 10043, + "charLength": 4, + "snippet": { + "text": "\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_A, \"onslaughtChanceFormulaA\", 0.05);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_B, \"onslaughtChanceFormulaB\", 0.4);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_C, \"onslaughtChanceFormulaC\", 0.05);\n\tloadFloatConfig(L, PARTY_SHARE_LOOT_BOOSTS_DIMINISHING_FACTOR, \"partyShareLootBoostsDimishingFactor\", 0.7f);\n\tloadFloatConfig(L, PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, \"pvpRateDamageReductionPerLevel\", 0.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31d56611b6cdccb1a88f3e787047755389dd742d33561e4838f1cf573544ecc4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.05 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 177, + "startColumn": 76, + "charOffset": 10281, + "charLength": 4, + "snippet": { + "text": "0.05" + } + }, + "contextRegion": { + "startLine": 175, + "startColumn": 76, + "charOffset": 10043, + "charLength": 4, + "snippet": { + "text": "\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_A, \"onslaughtChanceFormulaA\", 0.05);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_B, \"onslaughtChanceFormulaB\", 0.4);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_C, \"onslaughtChanceFormulaC\", 0.05);\n\tloadFloatConfig(L, PARTY_SHARE_LOOT_BOOSTS_DIMINISHING_FACTOR, \"partyShareLootBoostsDimishingFactor\", 0.7f);\n\tloadFloatConfig(L, PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, \"pvpRateDamageReductionPerLevel\", 0.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "003542e6abd5636585c6816947ef6b37b7e0796fc32408f054abed76a398d9a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 178, + "startColumn": 2, + "charOffset": 10289, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 176, + "startColumn": 2, + "charOffset": 10125, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_B, \"onslaughtChanceFormulaB\", 0.4);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_C, \"onslaughtChanceFormulaC\", 0.05);\n\tloadFloatConfig(L, PARTY_SHARE_LOOT_BOOSTS_DIMINISHING_FACTOR, \"partyShareLootBoostsDimishingFactor\", 0.7f);\n\tloadFloatConfig(L, PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, \"pvpRateDamageReductionPerLevel\", 0.0);\n\tloadFloatConfig(L, PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, \"pvpRateDamageTakenPerLevel\", 0.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f5f5dfffe7eb96f5ea87eea8af6ba0388a96f789476a036e7df208f9702de07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 178, + "startColumn": 104, + "charOffset": 10391, + "charLength": 4, + "snippet": { + "text": "0.7f" + } + }, + "contextRegion": { + "startLine": 176, + "startColumn": 104, + "charOffset": 10125, + "charLength": 4, + "snippet": { + "text": "\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_B, \"onslaughtChanceFormulaB\", 0.4);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_C, \"onslaughtChanceFormulaC\", 0.05);\n\tloadFloatConfig(L, PARTY_SHARE_LOOT_BOOSTS_DIMINISHING_FACTOR, \"partyShareLootBoostsDimishingFactor\", 0.7f);\n\tloadFloatConfig(L, PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, \"pvpRateDamageReductionPerLevel\", 0.0);\n\tloadFloatConfig(L, PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, \"pvpRateDamageTakenPerLevel\", 0.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16f7004b7198d4ca04075b904f6c64a3ff80564475402ddee9748fc9ecf7eac0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 178, + "startColumn": 104, + "charOffset": 10391, + "charLength": 4, + "snippet": { + "text": "0.7f" + } + }, + "contextRegion": { + "startLine": 176, + "startColumn": 104, + "charOffset": 10125, + "charLength": 4, + "snippet": { + "text": "\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_B, \"onslaughtChanceFormulaB\", 0.4);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_C, \"onslaughtChanceFormulaC\", 0.05);\n\tloadFloatConfig(L, PARTY_SHARE_LOOT_BOOSTS_DIMINISHING_FACTOR, \"partyShareLootBoostsDimishingFactor\", 0.7f);\n\tloadFloatConfig(L, PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, \"pvpRateDamageReductionPerLevel\", 0.0);\n\tloadFloatConfig(L, PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, \"pvpRateDamageTakenPerLevel\", 0.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d87af0a83f3befdfc4249edf928519d67e115b210bee904d2c0afe1621b1ecc0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.7f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 178, + "startColumn": 104, + "charOffset": 10391, + "charLength": 4, + "snippet": { + "text": "0.7f" + } + }, + "contextRegion": { + "startLine": 176, + "startColumn": 104, + "charOffset": 10125, + "charLength": 4, + "snippet": { + "text": "\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_B, \"onslaughtChanceFormulaB\", 0.4);\n\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_C, \"onslaughtChanceFormulaC\", 0.05);\n\tloadFloatConfig(L, PARTY_SHARE_LOOT_BOOSTS_DIMINISHING_FACTOR, \"partyShareLootBoostsDimishingFactor\", 0.7f);\n\tloadFloatConfig(L, PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, \"pvpRateDamageReductionPerLevel\", 0.0);\n\tloadFloatConfig(L, PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, \"pvpRateDamageTakenPerLevel\", 0.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6e76e5ba86572d640fbbfa1e1dccd32a7fc533a59aac0374a82a3613147c9b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 179, + "startColumn": 2, + "charOffset": 10399, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 177, + "startColumn": 2, + "charOffset": 10206, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_C, \"onslaughtChanceFormulaC\", 0.05);\n\tloadFloatConfig(L, PARTY_SHARE_LOOT_BOOSTS_DIMINISHING_FACTOR, \"partyShareLootBoostsDimishingFactor\", 0.7f);\n\tloadFloatConfig(L, PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, \"pvpRateDamageReductionPerLevel\", 0.0);\n\tloadFloatConfig(L, PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, \"pvpRateDamageTakenPerLevel\", 0.0);\n\tloadFloatConfig(L, RATE_ATTACK_SPEED, \"rateAttackSpeed\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "450af88ec498d4945bed014a34b673287d630ea6aeefb7e4deaea5aef76ef3f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 179, + "startColumn": 92, + "charOffset": 10489, + "charLength": 3, + "snippet": { + "text": "0.0" + } + }, + "contextRegion": { + "startLine": 177, + "startColumn": 92, + "charOffset": 10206, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_C, \"onslaughtChanceFormulaC\", 0.05);\n\tloadFloatConfig(L, PARTY_SHARE_LOOT_BOOSTS_DIMINISHING_FACTOR, \"partyShareLootBoostsDimishingFactor\", 0.7f);\n\tloadFloatConfig(L, PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, \"pvpRateDamageReductionPerLevel\", 0.0);\n\tloadFloatConfig(L, PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, \"pvpRateDamageTakenPerLevel\", 0.0);\n\tloadFloatConfig(L, RATE_ATTACK_SPEED, \"rateAttackSpeed\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e70e18c788007f1cf1cc25c4a05bb14f6c7fb8be1b767845c8869b60692afb0e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 180, + "startColumn": 2, + "charOffset": 10496, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 178, + "startColumn": 2, + "charOffset": 10288, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, PARTY_SHARE_LOOT_BOOSTS_DIMINISHING_FACTOR, \"partyShareLootBoostsDimishingFactor\", 0.7f);\n\tloadFloatConfig(L, PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, \"pvpRateDamageReductionPerLevel\", 0.0);\n\tloadFloatConfig(L, PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, \"pvpRateDamageTakenPerLevel\", 0.0);\n\tloadFloatConfig(L, RATE_ATTACK_SPEED, \"rateAttackSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_BOSS_ATTACK, \"rateBossAttack\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bffe723d35a61f4e980e7242e20ea4b7f366e313249a8b8c56dff98318ca3fb7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 180, + "startColumn": 84, + "charOffset": 10578, + "charLength": 3, + "snippet": { + "text": "0.0" + } + }, + "contextRegion": { + "startLine": 178, + "startColumn": 84, + "charOffset": 10288, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, PARTY_SHARE_LOOT_BOOSTS_DIMINISHING_FACTOR, \"partyShareLootBoostsDimishingFactor\", 0.7f);\n\tloadFloatConfig(L, PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, \"pvpRateDamageReductionPerLevel\", 0.0);\n\tloadFloatConfig(L, PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, \"pvpRateDamageTakenPerLevel\", 0.0);\n\tloadFloatConfig(L, RATE_ATTACK_SPEED, \"rateAttackSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_BOSS_ATTACK, \"rateBossAttack\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "407ec168f20f1473d8ff01f025602b741232b934b5e28f79f556c9a2443a5a19" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 181, + "startColumn": 2, + "charOffset": 10585, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 179, + "startColumn": 2, + "charOffset": 10398, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, \"pvpRateDamageReductionPerLevel\", 0.0);\n\tloadFloatConfig(L, PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, \"pvpRateDamageTakenPerLevel\", 0.0);\n\tloadFloatConfig(L, RATE_ATTACK_SPEED, \"rateAttackSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_BOSS_ATTACK, \"rateBossAttack\", 1.0);\n\tloadFloatConfig(L, RATE_BOSS_DEFENSE, \"rateBossDefense\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1a9173ba580c6a72d62ae00e680b5474d33afc745f852c4b312e30af5ca1e0e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 181, + "startColumn": 59, + "charOffset": 10642, + "charLength": 3, + "snippet": { + "text": "1.0" + } + }, + "contextRegion": { + "startLine": 179, + "startColumn": 59, + "charOffset": 10398, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, \"pvpRateDamageReductionPerLevel\", 0.0);\n\tloadFloatConfig(L, PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, \"pvpRateDamageTakenPerLevel\", 0.0);\n\tloadFloatConfig(L, RATE_ATTACK_SPEED, \"rateAttackSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_BOSS_ATTACK, \"rateBossAttack\", 1.0);\n\tloadFloatConfig(L, RATE_BOSS_DEFENSE, \"rateBossDefense\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eee438fcfe9b512fa3a29ab90840022af86ec331d1f7fa982c05022611cae30c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 182, + "startColumn": 2, + "charOffset": 10649, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 180, + "startColumn": 2, + "charOffset": 10495, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, \"pvpRateDamageTakenPerLevel\", 0.0);\n\tloadFloatConfig(L, RATE_ATTACK_SPEED, \"rateAttackSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_BOSS_ATTACK, \"rateBossAttack\", 1.0);\n\tloadFloatConfig(L, RATE_BOSS_DEFENSE, \"rateBossDefense\", 1.0);\n\tloadFloatConfig(L, RATE_BOSS_HEALTH, \"rateBossHealth\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8444bd9b781829ca094b3fb38f1377981049e892ed8b44aec75cc49c09e9f0d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 182, + "startColumn": 57, + "charOffset": 10704, + "charLength": 3, + "snippet": { + "text": "1.0" + } + }, + "contextRegion": { + "startLine": 180, + "startColumn": 57, + "charOffset": 10495, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, \"pvpRateDamageTakenPerLevel\", 0.0);\n\tloadFloatConfig(L, RATE_ATTACK_SPEED, \"rateAttackSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_BOSS_ATTACK, \"rateBossAttack\", 1.0);\n\tloadFloatConfig(L, RATE_BOSS_DEFENSE, \"rateBossDefense\", 1.0);\n\tloadFloatConfig(L, RATE_BOSS_HEALTH, \"rateBossHealth\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b8c1091137d639f013a9d74cbb00f0f9fcc1666ab98bfd48e5aa966f7d7ec2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 183, + "startColumn": 2, + "charOffset": 10711, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 181, + "startColumn": 2, + "charOffset": 10584, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_ATTACK_SPEED, \"rateAttackSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_BOSS_ATTACK, \"rateBossAttack\", 1.0);\n\tloadFloatConfig(L, RATE_BOSS_DEFENSE, \"rateBossDefense\", 1.0);\n\tloadFloatConfig(L, RATE_BOSS_HEALTH, \"rateBossHealth\", 1.0);\n\tloadFloatConfig(L, RATE_EXERCISE_TRAINING_SPEED, \"rateExerciseTrainingSpeed\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce32d43a4e737e6f90d7e9e4724ef0e9bb3ba8a3052bf55e2522097c816d7907" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 183, + "startColumn": 59, + "charOffset": 10768, + "charLength": 3, + "snippet": { + "text": "1.0" + } + }, + "contextRegion": { + "startLine": 181, + "startColumn": 59, + "charOffset": 10584, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_ATTACK_SPEED, \"rateAttackSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_BOSS_ATTACK, \"rateBossAttack\", 1.0);\n\tloadFloatConfig(L, RATE_BOSS_DEFENSE, \"rateBossDefense\", 1.0);\n\tloadFloatConfig(L, RATE_BOSS_HEALTH, \"rateBossHealth\", 1.0);\n\tloadFloatConfig(L, RATE_EXERCISE_TRAINING_SPEED, \"rateExerciseTrainingSpeed\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68c33375f804828921c071ccc0b2fd34c34ee3ae7045ded4e41969caf3f9533f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 184, + "startColumn": 2, + "charOffset": 10775, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 182, + "startColumn": 2, + "charOffset": 10648, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_BOSS_ATTACK, \"rateBossAttack\", 1.0);\n\tloadFloatConfig(L, RATE_BOSS_DEFENSE, \"rateBossDefense\", 1.0);\n\tloadFloatConfig(L, RATE_BOSS_HEALTH, \"rateBossHealth\", 1.0);\n\tloadFloatConfig(L, RATE_EXERCISE_TRAINING_SPEED, \"rateExerciseTrainingSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_HEALTH_REGEN_SPEED, \"rateHealthRegenSpeed\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "178a299152a586efe1865337dcecdfb1ba6792e0be44b9f083bf4614aeb9585a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 184, + "startColumn": 57, + "charOffset": 10830, + "charLength": 3, + "snippet": { + "text": "1.0" + } + }, + "contextRegion": { + "startLine": 182, + "startColumn": 57, + "charOffset": 10648, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_BOSS_ATTACK, \"rateBossAttack\", 1.0);\n\tloadFloatConfig(L, RATE_BOSS_DEFENSE, \"rateBossDefense\", 1.0);\n\tloadFloatConfig(L, RATE_BOSS_HEALTH, \"rateBossHealth\", 1.0);\n\tloadFloatConfig(L, RATE_EXERCISE_TRAINING_SPEED, \"rateExerciseTrainingSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_HEALTH_REGEN_SPEED, \"rateHealthRegenSpeed\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ed98a7074bdf395e63ae6a90c22e9ab9e5be8bd1285d052366a32ad637109cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 185, + "startColumn": 2, + "charOffset": 10837, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 183, + "startColumn": 2, + "charOffset": 10710, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_BOSS_DEFENSE, \"rateBossDefense\", 1.0);\n\tloadFloatConfig(L, RATE_BOSS_HEALTH, \"rateBossHealth\", 1.0);\n\tloadFloatConfig(L, RATE_EXERCISE_TRAINING_SPEED, \"rateExerciseTrainingSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_HEALTH_REGEN_SPEED, \"rateHealthRegenSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_HEALTH_REGEN, \"rateHealthRegen\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16d96748d14c33bc973f44654a030946579fab5714c008392c47e24f82f75293" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 185, + "startColumn": 80, + "charOffset": 10915, + "charLength": 3, + "snippet": { + "text": "1.0" + } + }, + "contextRegion": { + "startLine": 183, + "startColumn": 80, + "charOffset": 10710, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_BOSS_DEFENSE, \"rateBossDefense\", 1.0);\n\tloadFloatConfig(L, RATE_BOSS_HEALTH, \"rateBossHealth\", 1.0);\n\tloadFloatConfig(L, RATE_EXERCISE_TRAINING_SPEED, \"rateExerciseTrainingSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_HEALTH_REGEN_SPEED, \"rateHealthRegenSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_HEALTH_REGEN, \"rateHealthRegen\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6aa32bce08c3c70d684774dfcdcac32968db53967eb96de1a830b8a4f6e3c566" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 186, + "startColumn": 2, + "charOffset": 10922, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 184, + "startColumn": 2, + "charOffset": 10774, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_BOSS_HEALTH, \"rateBossHealth\", 1.0);\n\tloadFloatConfig(L, RATE_EXERCISE_TRAINING_SPEED, \"rateExerciseTrainingSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_HEALTH_REGEN_SPEED, \"rateHealthRegenSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_HEALTH_REGEN, \"rateHealthRegen\", 1.0);\n\tloadFloatConfig(L, RATE_MANA_REGEN_SPEED, \"rateManaRegenSpeed\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ddd68b452a43d71f120ad3c1903f441adb4c14a52e36eb1d10c1750d4fe7a289" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 186, + "startColumn": 70, + "charOffset": 10990, + "charLength": 3, + "snippet": { + "text": "1.0" + } + }, + "contextRegion": { + "startLine": 184, + "startColumn": 70, + "charOffset": 10774, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_BOSS_HEALTH, \"rateBossHealth\", 1.0);\n\tloadFloatConfig(L, RATE_EXERCISE_TRAINING_SPEED, \"rateExerciseTrainingSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_HEALTH_REGEN_SPEED, \"rateHealthRegenSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_HEALTH_REGEN, \"rateHealthRegen\", 1.0);\n\tloadFloatConfig(L, RATE_MANA_REGEN_SPEED, \"rateManaRegenSpeed\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b27e7fdc14012cf86da892a9927f804b9b52e37e7b6689ceffe0063d3cee24f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 187, + "startColumn": 2, + "charOffset": 10997, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 185, + "startColumn": 2, + "charOffset": 10836, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_EXERCISE_TRAINING_SPEED, \"rateExerciseTrainingSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_HEALTH_REGEN_SPEED, \"rateHealthRegenSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_HEALTH_REGEN, \"rateHealthRegen\", 1.0);\n\tloadFloatConfig(L, RATE_MANA_REGEN_SPEED, \"rateManaRegenSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_MANA_REGEN, \"rateManaRegen\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45b435f9f1aee04a2a62699a74d33cfef02c8856892ea5311109c82eecbb7316" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 187, + "startColumn": 59, + "charOffset": 11054, + "charLength": 3, + "snippet": { + "text": "1.0" + } + }, + "contextRegion": { + "startLine": 185, + "startColumn": 59, + "charOffset": 10836, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_EXERCISE_TRAINING_SPEED, \"rateExerciseTrainingSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_HEALTH_REGEN_SPEED, \"rateHealthRegenSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_HEALTH_REGEN, \"rateHealthRegen\", 1.0);\n\tloadFloatConfig(L, RATE_MANA_REGEN_SPEED, \"rateManaRegenSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_MANA_REGEN, \"rateManaRegen\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f79b6fc17ac0befd01bda08f85d35fa77c194cd7563a9c934ac3e56b78ca0d88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 188, + "startColumn": 2, + "charOffset": 11061, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 186, + "startColumn": 2, + "charOffset": 10921, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_HEALTH_REGEN_SPEED, \"rateHealthRegenSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_HEALTH_REGEN, \"rateHealthRegen\", 1.0);\n\tloadFloatConfig(L, RATE_MANA_REGEN_SPEED, \"rateManaRegenSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_MANA_REGEN, \"rateManaRegen\", 1.0);\n\tloadFloatConfig(L, RATE_MONSTER_ATTACK, \"rateMonsterAttack\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "326982a25c7e55d2a5dbb9101dcd1dbe494ef581161f857aa6d22c3e42509b28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 188, + "startColumn": 66, + "charOffset": 11125, + "charLength": 3, + "snippet": { + "text": "1.0" + } + }, + "contextRegion": { + "startLine": 186, + "startColumn": 66, + "charOffset": 10921, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_HEALTH_REGEN_SPEED, \"rateHealthRegenSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_HEALTH_REGEN, \"rateHealthRegen\", 1.0);\n\tloadFloatConfig(L, RATE_MANA_REGEN_SPEED, \"rateManaRegenSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_MANA_REGEN, \"rateManaRegen\", 1.0);\n\tloadFloatConfig(L, RATE_MONSTER_ATTACK, \"rateMonsterAttack\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb7217bfd71eb50f4ea1f5e12998157b592d6facec9464583c075bd0dc282661" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 189, + "startColumn": 2, + "charOffset": 11132, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 187, + "startColumn": 2, + "charOffset": 10996, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_HEALTH_REGEN, \"rateHealthRegen\", 1.0);\n\tloadFloatConfig(L, RATE_MANA_REGEN_SPEED, \"rateManaRegenSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_MANA_REGEN, \"rateManaRegen\", 1.0);\n\tloadFloatConfig(L, RATE_MONSTER_ATTACK, \"rateMonsterAttack\", 1.0);\n\tloadFloatConfig(L, RATE_MONSTER_DEFENSE, \"rateMonsterDefense\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77e7b86e78f296fd7828a46fb152ae5851d205d9ba899cb7401042cff03635ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 189, + "startColumn": 55, + "charOffset": 11185, + "charLength": 3, + "snippet": { + "text": "1.0" + } + }, + "contextRegion": { + "startLine": 187, + "startColumn": 55, + "charOffset": 10996, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_HEALTH_REGEN, \"rateHealthRegen\", 1.0);\n\tloadFloatConfig(L, RATE_MANA_REGEN_SPEED, \"rateManaRegenSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_MANA_REGEN, \"rateManaRegen\", 1.0);\n\tloadFloatConfig(L, RATE_MONSTER_ATTACK, \"rateMonsterAttack\", 1.0);\n\tloadFloatConfig(L, RATE_MONSTER_DEFENSE, \"rateMonsterDefense\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0eafc27b26b1d1e5193eefb5ff9a5787430ee403177e28597d47171f6c0f407f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 190, + "startColumn": 2, + "charOffset": 11192, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 188, + "startColumn": 2, + "charOffset": 11060, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_MANA_REGEN_SPEED, \"rateManaRegenSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_MANA_REGEN, \"rateManaRegen\", 1.0);\n\tloadFloatConfig(L, RATE_MONSTER_ATTACK, \"rateMonsterAttack\", 1.0);\n\tloadFloatConfig(L, RATE_MONSTER_DEFENSE, \"rateMonsterDefense\", 1.0);\n\tloadFloatConfig(L, RATE_MONSTER_HEALTH, \"rateMonsterHealth\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2d0a6da3b0be28f0b78a90bbf722bddff7a790f4997373eaa4f59a22cc6b571" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 190, + "startColumn": 63, + "charOffset": 11253, + "charLength": 3, + "snippet": { + "text": "1.0" + } + }, + "contextRegion": { + "startLine": 188, + "startColumn": 63, + "charOffset": 11060, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_MANA_REGEN_SPEED, \"rateManaRegenSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_MANA_REGEN, \"rateManaRegen\", 1.0);\n\tloadFloatConfig(L, RATE_MONSTER_ATTACK, \"rateMonsterAttack\", 1.0);\n\tloadFloatConfig(L, RATE_MONSTER_DEFENSE, \"rateMonsterDefense\", 1.0);\n\tloadFloatConfig(L, RATE_MONSTER_HEALTH, \"rateMonsterHealth\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19cadb69f053e6aa10b839e9c37646beaafc23aabd8616beb40c9761a1f7d7a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 191, + "startColumn": 2, + "charOffset": 11260, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 189, + "startColumn": 2, + "charOffset": 11131, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_MANA_REGEN, \"rateManaRegen\", 1.0);\n\tloadFloatConfig(L, RATE_MONSTER_ATTACK, \"rateMonsterAttack\", 1.0);\n\tloadFloatConfig(L, RATE_MONSTER_DEFENSE, \"rateMonsterDefense\", 1.0);\n\tloadFloatConfig(L, RATE_MONSTER_HEALTH, \"rateMonsterHealth\", 1.0);\n\tloadFloatConfig(L, RATE_NPC_HEALTH, \"rateNpcHealth\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73368414b3ad148c11af4ebc4a4a88aa8b99480b1feeef96316f6fb1ff171683" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 191, + "startColumn": 65, + "charOffset": 11323, + "charLength": 3, + "snippet": { + "text": "1.0" + } + }, + "contextRegion": { + "startLine": 189, + "startColumn": 65, + "charOffset": 11131, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_MANA_REGEN, \"rateManaRegen\", 1.0);\n\tloadFloatConfig(L, RATE_MONSTER_ATTACK, \"rateMonsterAttack\", 1.0);\n\tloadFloatConfig(L, RATE_MONSTER_DEFENSE, \"rateMonsterDefense\", 1.0);\n\tloadFloatConfig(L, RATE_MONSTER_HEALTH, \"rateMonsterHealth\", 1.0);\n\tloadFloatConfig(L, RATE_NPC_HEALTH, \"rateNpcHealth\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3125a0ca071ab066b713c46f7ef887606c1cac54a398f5dae5253a9685e41ad6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 192, + "startColumn": 2, + "charOffset": 11330, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 190, + "startColumn": 2, + "charOffset": 11191, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_MONSTER_ATTACK, \"rateMonsterAttack\", 1.0);\n\tloadFloatConfig(L, RATE_MONSTER_DEFENSE, \"rateMonsterDefense\", 1.0);\n\tloadFloatConfig(L, RATE_MONSTER_HEALTH, \"rateMonsterHealth\", 1.0);\n\tloadFloatConfig(L, RATE_NPC_HEALTH, \"rateNpcHealth\", 1.0);\n\tloadFloatConfig(L, RATE_OFFLINE_TRAINING_SPEED, \"rateOfflineTrainingSpeed\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a8a432e632dbd5cdd6393488ba9eed9b64b96dbe35db15b3fb3a39a8d8edeff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 192, + "startColumn": 63, + "charOffset": 11391, + "charLength": 3, + "snippet": { + "text": "1.0" + } + }, + "contextRegion": { + "startLine": 190, + "startColumn": 63, + "charOffset": 11191, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_MONSTER_ATTACK, \"rateMonsterAttack\", 1.0);\n\tloadFloatConfig(L, RATE_MONSTER_DEFENSE, \"rateMonsterDefense\", 1.0);\n\tloadFloatConfig(L, RATE_MONSTER_HEALTH, \"rateMonsterHealth\", 1.0);\n\tloadFloatConfig(L, RATE_NPC_HEALTH, \"rateNpcHealth\", 1.0);\n\tloadFloatConfig(L, RATE_OFFLINE_TRAINING_SPEED, \"rateOfflineTrainingSpeed\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbd2ef7eb17f7d465cbebbcae2dcf528f7fb3f8a749b7733a6cbded51c7a4958" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 193, + "startColumn": 2, + "charOffset": 11398, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 191, + "startColumn": 2, + "charOffset": 11259, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_MONSTER_DEFENSE, \"rateMonsterDefense\", 1.0);\n\tloadFloatConfig(L, RATE_MONSTER_HEALTH, \"rateMonsterHealth\", 1.0);\n\tloadFloatConfig(L, RATE_NPC_HEALTH, \"rateNpcHealth\", 1.0);\n\tloadFloatConfig(L, RATE_OFFLINE_TRAINING_SPEED, \"rateOfflineTrainingSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_SOUL_REGEN_SPEED, \"rateSoulRegenSpeed\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d7374c83b7da0e7b75ac9bbdbe342b627dc2fa56a622ebd2beaafa6aa89ccb7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 193, + "startColumn": 55, + "charOffset": 11451, + "charLength": 3, + "snippet": { + "text": "1.0" + } + }, + "contextRegion": { + "startLine": 191, + "startColumn": 55, + "charOffset": 11259, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_MONSTER_DEFENSE, \"rateMonsterDefense\", 1.0);\n\tloadFloatConfig(L, RATE_MONSTER_HEALTH, \"rateMonsterHealth\", 1.0);\n\tloadFloatConfig(L, RATE_NPC_HEALTH, \"rateNpcHealth\", 1.0);\n\tloadFloatConfig(L, RATE_OFFLINE_TRAINING_SPEED, \"rateOfflineTrainingSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_SOUL_REGEN_SPEED, \"rateSoulRegenSpeed\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6432865c5be4840dbefbb9087665cbb7a9c0bf03f7b4e7b99e93c1409cc93886" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 194, + "startColumn": 2, + "charOffset": 11458, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 192, + "startColumn": 2, + "charOffset": 11329, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_MONSTER_HEALTH, \"rateMonsterHealth\", 1.0);\n\tloadFloatConfig(L, RATE_NPC_HEALTH, \"rateNpcHealth\", 1.0);\n\tloadFloatConfig(L, RATE_OFFLINE_TRAINING_SPEED, \"rateOfflineTrainingSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_SOUL_REGEN_SPEED, \"rateSoulRegenSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_SOUL_REGEN, \"rateSoulRegen\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "172fc2ea75e43105c4e730f77f19257c85da8caab5dd6ffd8352d3c7e9a0f203" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 194, + "startColumn": 78, + "charOffset": 11534, + "charLength": 3, + "snippet": { + "text": "1.0" + } + }, + "contextRegion": { + "startLine": 192, + "startColumn": 78, + "charOffset": 11329, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_MONSTER_HEALTH, \"rateMonsterHealth\", 1.0);\n\tloadFloatConfig(L, RATE_NPC_HEALTH, \"rateNpcHealth\", 1.0);\n\tloadFloatConfig(L, RATE_OFFLINE_TRAINING_SPEED, \"rateOfflineTrainingSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_SOUL_REGEN_SPEED, \"rateSoulRegenSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_SOUL_REGEN, \"rateSoulRegen\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4d5d9d54fe796c89ba2d8fe8f421bbfa152d04065868c5b48c0e5837f151dfb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 195, + "startColumn": 2, + "charOffset": 11541, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 193, + "startColumn": 2, + "charOffset": 11397, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_NPC_HEALTH, \"rateNpcHealth\", 1.0);\n\tloadFloatConfig(L, RATE_OFFLINE_TRAINING_SPEED, \"rateOfflineTrainingSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_SOUL_REGEN_SPEED, \"rateSoulRegenSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_SOUL_REGEN, \"rateSoulRegen\", 1.0);\n\tloadFloatConfig(L, RATE_SPELL_COOLDOWN, \"rateSpellCooldown\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6128c7b0592656a4acd8009e50859c2604f363d6a530ca9a8ba3f08495020b10" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 195, + "startColumn": 66, + "charOffset": 11605, + "charLength": 3, + "snippet": { + "text": "1.0" + } + }, + "contextRegion": { + "startLine": 193, + "startColumn": 66, + "charOffset": 11397, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_NPC_HEALTH, \"rateNpcHealth\", 1.0);\n\tloadFloatConfig(L, RATE_OFFLINE_TRAINING_SPEED, \"rateOfflineTrainingSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_SOUL_REGEN_SPEED, \"rateSoulRegenSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_SOUL_REGEN, \"rateSoulRegen\", 1.0);\n\tloadFloatConfig(L, RATE_SPELL_COOLDOWN, \"rateSpellCooldown\", 1.0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59399c59cba277bd7871065430a9d8c84cbbaacd2560109864b4c34992c77daf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 196, + "startColumn": 2, + "charOffset": 11612, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 194, + "startColumn": 2, + "charOffset": 11457, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_OFFLINE_TRAINING_SPEED, \"rateOfflineTrainingSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_SOUL_REGEN_SPEED, \"rateSoulRegenSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_SOUL_REGEN, \"rateSoulRegen\", 1.0);\n\tloadFloatConfig(L, RATE_SPELL_COOLDOWN, \"rateSpellCooldown\", 1.0);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_A, \"ruseChanceFormulaA\", 0.0307576);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31a21dfbaa8ab80c251ed198a38a8360c304ced63be80cd43812afe671308912" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 196, + "startColumn": 55, + "charOffset": 11665, + "charLength": 3, + "snippet": { + "text": "1.0" + } + }, + "contextRegion": { + "startLine": 194, + "startColumn": 55, + "charOffset": 11457, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_OFFLINE_TRAINING_SPEED, \"rateOfflineTrainingSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_SOUL_REGEN_SPEED, \"rateSoulRegenSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_SOUL_REGEN, \"rateSoulRegen\", 1.0);\n\tloadFloatConfig(L, RATE_SPELL_COOLDOWN, \"rateSpellCooldown\", 1.0);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_A, \"ruseChanceFormulaA\", 0.0307576);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7978f7552d920ac7c7926d40c7de25b36d02d69fa8f29700728d524d60477d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 197, + "startColumn": 2, + "charOffset": 11672, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 195, + "startColumn": 2, + "charOffset": 11540, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_SOUL_REGEN_SPEED, \"rateSoulRegenSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_SOUL_REGEN, \"rateSoulRegen\", 1.0);\n\tloadFloatConfig(L, RATE_SPELL_COOLDOWN, \"rateSpellCooldown\", 1.0);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_A, \"ruseChanceFormulaA\", 0.0307576);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_B, \"ruseChanceFormulaB\", 0.440697);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d65f27ca08212439053bdfbc4bb58265a098bf2a6bb63309853e434c05df9b61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 197, + "startColumn": 63, + "charOffset": 11733, + "charLength": 3, + "snippet": { + "text": "1.0" + } + }, + "contextRegion": { + "startLine": 195, + "startColumn": 63, + "charOffset": 11540, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_SOUL_REGEN_SPEED, \"rateSoulRegenSpeed\", 1.0);\n\tloadFloatConfig(L, RATE_SOUL_REGEN, \"rateSoulRegen\", 1.0);\n\tloadFloatConfig(L, RATE_SPELL_COOLDOWN, \"rateSpellCooldown\", 1.0);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_A, \"ruseChanceFormulaA\", 0.0307576);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_B, \"ruseChanceFormulaB\", 0.440697);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b097f7e093206c397d8baceb21cc86c45aba9cc546025a6b6729c06860eb592" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 198, + "startColumn": 2, + "charOffset": 11740, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 196, + "startColumn": 2, + "charOffset": 11611, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_SOUL_REGEN, \"rateSoulRegen\", 1.0);\n\tloadFloatConfig(L, RATE_SPELL_COOLDOWN, \"rateSpellCooldown\", 1.0);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_A, \"ruseChanceFormulaA\", 0.0307576);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_B, \"ruseChanceFormulaB\", 0.440697);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_C, \"ruseChanceFormulaC\", 0.026);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3bbdc13ec7a15cb6047590830d73800bedb8a9d74ca63042bf3c1770b3f752db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 198, + "startColumn": 66, + "charOffset": 11804, + "charLength": 9, + "snippet": { + "text": "0.0307576" + } + }, + "contextRegion": { + "startLine": 196, + "startColumn": 66, + "charOffset": 11611, + "charLength": 9, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_SOUL_REGEN, \"rateSoulRegen\", 1.0);\n\tloadFloatConfig(L, RATE_SPELL_COOLDOWN, \"rateSpellCooldown\", 1.0);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_A, \"ruseChanceFormulaA\", 0.0307576);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_B, \"ruseChanceFormulaB\", 0.440697);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_C, \"ruseChanceFormulaC\", 0.026);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a92f94e38e64f05cf48c982039acb2c6f986360eb9488f0877e2d126840dd3e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.0307576 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 198, + "startColumn": 66, + "charOffset": 11804, + "charLength": 9, + "snippet": { + "text": "0.0307576" + } + }, + "contextRegion": { + "startLine": 196, + "startColumn": 66, + "charOffset": 11611, + "charLength": 9, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_SOUL_REGEN, \"rateSoulRegen\", 1.0);\n\tloadFloatConfig(L, RATE_SPELL_COOLDOWN, \"rateSpellCooldown\", 1.0);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_A, \"ruseChanceFormulaA\", 0.0307576);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_B, \"ruseChanceFormulaB\", 0.440697);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_C, \"ruseChanceFormulaC\", 0.026);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6de67054aa9a249a46942a99aabe842b9ad08dd6f93d113acdd928ce28dba139" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 199, + "startColumn": 2, + "charOffset": 11817, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 197, + "startColumn": 2, + "charOffset": 11671, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_SPELL_COOLDOWN, \"rateSpellCooldown\", 1.0);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_A, \"ruseChanceFormulaA\", 0.0307576);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_B, \"ruseChanceFormulaB\", 0.440697);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_C, \"ruseChanceFormulaC\", 0.026);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_A, \"transcendanceChanceFormulaA\", 0.0127);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f5192e92560ac99b18226fd27f70b6c87d76f32ed0c0bf65041135f026e2333" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 199, + "startColumn": 66, + "charOffset": 11881, + "charLength": 8, + "snippet": { + "text": "0.440697" + } + }, + "contextRegion": { + "startLine": 197, + "startColumn": 66, + "charOffset": 11671, + "charLength": 8, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_SPELL_COOLDOWN, \"rateSpellCooldown\", 1.0);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_A, \"ruseChanceFormulaA\", 0.0307576);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_B, \"ruseChanceFormulaB\", 0.440697);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_C, \"ruseChanceFormulaC\", 0.026);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_A, \"transcendanceChanceFormulaA\", 0.0127);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a01d416bb13375c37808230cdc15b82359f42e917a003e78054d1463680493bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.440697 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 199, + "startColumn": 66, + "charOffset": 11881, + "charLength": 8, + "snippet": { + "text": "0.440697" + } + }, + "contextRegion": { + "startLine": 197, + "startColumn": 66, + "charOffset": 11671, + "charLength": 8, + "snippet": { + "text": "\tloadFloatConfig(L, RATE_SPELL_COOLDOWN, \"rateSpellCooldown\", 1.0);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_A, \"ruseChanceFormulaA\", 0.0307576);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_B, \"ruseChanceFormulaB\", 0.440697);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_C, \"ruseChanceFormulaC\", 0.026);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_A, \"transcendanceChanceFormulaA\", 0.0127);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d403c792c174997add04c5df7605b0048a033449712032f463a82e6380c8adce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 200, + "startColumn": 2, + "charOffset": 11893, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 198, + "startColumn": 2, + "charOffset": 11739, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_A, \"ruseChanceFormulaA\", 0.0307576);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_B, \"ruseChanceFormulaB\", 0.440697);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_C, \"ruseChanceFormulaC\", 0.026);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_A, \"transcendanceChanceFormulaA\", 0.0127);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_B, \"transcendanceChanceFormulaB\", 0.1070);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "347236ecfcdcb038a3dbdfea3738b586a95eff8ecf713e38f5d892d50106efe0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 200, + "startColumn": 66, + "charOffset": 11957, + "charLength": 5, + "snippet": { + "text": "0.026" + } + }, + "contextRegion": { + "startLine": 198, + "startColumn": 66, + "charOffset": 11739, + "charLength": 5, + "snippet": { + "text": "\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_A, \"ruseChanceFormulaA\", 0.0307576);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_B, \"ruseChanceFormulaB\", 0.440697);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_C, \"ruseChanceFormulaC\", 0.026);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_A, \"transcendanceChanceFormulaA\", 0.0127);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_B, \"transcendanceChanceFormulaB\", 0.1070);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3fe9f1c69af30e8d91438d3d1650e142a2ad8c8efafaf6b02a02bcbeacaab74a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.026 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 200, + "startColumn": 66, + "charOffset": 11957, + "charLength": 5, + "snippet": { + "text": "0.026" + } + }, + "contextRegion": { + "startLine": 198, + "startColumn": 66, + "charOffset": 11739, + "charLength": 5, + "snippet": { + "text": "\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_A, \"ruseChanceFormulaA\", 0.0307576);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_B, \"ruseChanceFormulaB\", 0.440697);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_C, \"ruseChanceFormulaC\", 0.026);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_A, \"transcendanceChanceFormulaA\", 0.0127);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_B, \"transcendanceChanceFormulaB\", 0.1070);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f17a3837f7f32b50beb67b3bbd77e088b2babced0a8118ee01f6c5c212a4337" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 201, + "startColumn": 2, + "charOffset": 11966, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 2, + "charOffset": 11816, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_B, \"ruseChanceFormulaB\", 0.440697);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_C, \"ruseChanceFormulaC\", 0.026);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_A, \"transcendanceChanceFormulaA\", 0.0127);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_B, \"transcendanceChanceFormulaB\", 0.1070);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_C, \"transcendanceChanceFormulaC\", 0.0073);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b31e6cbd7682d4b816bdc0d47196feec5db3959d62d6eb751712bcd33a1ec0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 201, + "startColumn": 84, + "charOffset": 12048, + "charLength": 6, + "snippet": { + "text": "0.0127" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 84, + "charOffset": 11816, + "charLength": 6, + "snippet": { + "text": "\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_B, \"ruseChanceFormulaB\", 0.440697);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_C, \"ruseChanceFormulaC\", 0.026);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_A, \"transcendanceChanceFormulaA\", 0.0127);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_B, \"transcendanceChanceFormulaB\", 0.1070);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_C, \"transcendanceChanceFormulaC\", 0.0073);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68c33375f804828921c071ccc0b2fd34c34ee3ae7045ded4e41969caf3f9533f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.0127 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 201, + "startColumn": 84, + "charOffset": 12048, + "charLength": 6, + "snippet": { + "text": "0.0127" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 84, + "charOffset": 11816, + "charLength": 6, + "snippet": { + "text": "\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_B, \"ruseChanceFormulaB\", 0.440697);\n\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_C, \"ruseChanceFormulaC\", 0.026);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_A, \"transcendanceChanceFormulaA\", 0.0127);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_B, \"transcendanceChanceFormulaB\", 0.1070);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_C, \"transcendanceChanceFormulaC\", 0.0073);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "acc5d55feefadd513173c1819e1de9ed610bd92914e30d299fe52d4211401dce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 202, + "startColumn": 2, + "charOffset": 12058, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 200, + "startColumn": 2, + "charOffset": 11892, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_C, \"ruseChanceFormulaC\", 0.026);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_A, \"transcendanceChanceFormulaA\", 0.0127);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_B, \"transcendanceChanceFormulaB\", 0.1070);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_C, \"transcendanceChanceFormulaC\", 0.0073);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ec3d7af59b9b445021a05436b29e3c3da86e0e231e9ae0d41a38f2fe85035bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 202, + "startColumn": 84, + "charOffset": 12140, + "charLength": 6, + "snippet": { + "text": "0.1070" + } + }, + "contextRegion": { + "startLine": 200, + "startColumn": 84, + "charOffset": 11892, + "charLength": 6, + "snippet": { + "text": "\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_C, \"ruseChanceFormulaC\", 0.026);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_A, \"transcendanceChanceFormulaA\", 0.0127);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_B, \"transcendanceChanceFormulaB\", 0.1070);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_C, \"transcendanceChanceFormulaC\", 0.0073);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f24844331a58b1a2232a967398074caba55fbce6f0b93bc0e83d5e19d95cbbe9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.1070 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 202, + "startColumn": 84, + "charOffset": 12140, + "charLength": 6, + "snippet": { + "text": "0.1070" + } + }, + "contextRegion": { + "startLine": 200, + "startColumn": 84, + "charOffset": 11892, + "charLength": 6, + "snippet": { + "text": "\tloadFloatConfig(L, RUSE_CHANCE_FORMULA_C, \"ruseChanceFormulaC\", 0.026);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_A, \"transcendanceChanceFormulaA\", 0.0127);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_B, \"transcendanceChanceFormulaB\", 0.1070);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_C, \"transcendanceChanceFormulaC\", 0.0073);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b150d9c0b0b8f45e2cdf1c4423bf5190f312837e43d5719431b9ffdade7b042b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 203, + "startColumn": 2, + "charOffset": 12150, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 201, + "startColumn": 2, + "charOffset": 11965, + "charLength": 15, + "snippet": { + "text": "\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_A, \"transcendanceChanceFormulaA\", 0.0127);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_B, \"transcendanceChanceFormulaB\", 0.1070);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_C, \"transcendanceChanceFormulaC\", 0.0073);\n\n\tloadIntConfig(L, ACTIONS_DELAY_INTERVAL, \"timeBetweenActions\", 200);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "534aba4f0351c68eef177f4fbb9cbb78e32b258f15e80aa5f51c0361fbaf1144" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 203, + "startColumn": 84, + "charOffset": 12232, + "charLength": 6, + "snippet": { + "text": "0.0073" + } + }, + "contextRegion": { + "startLine": 201, + "startColumn": 84, + "charOffset": 11965, + "charLength": 6, + "snippet": { + "text": "\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_A, \"transcendanceChanceFormulaA\", 0.0127);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_B, \"transcendanceChanceFormulaB\", 0.1070);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_C, \"transcendanceChanceFormulaC\", 0.0073);\n\n\tloadIntConfig(L, ACTIONS_DELAY_INTERVAL, \"timeBetweenActions\", 200);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6e67c42af77f78f2509890138c8c8e688883fa2dacb18ee0bb7a8d7c13c5f4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.0073 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 203, + "startColumn": 84, + "charOffset": 12232, + "charLength": 6, + "snippet": { + "text": "0.0073" + } + }, + "contextRegion": { + "startLine": 201, + "startColumn": 84, + "charOffset": 11965, + "charLength": 6, + "snippet": { + "text": "\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_A, \"transcendanceChanceFormulaA\", 0.0127);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_B, \"transcendanceChanceFormulaB\", 0.1070);\n\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_C, \"transcendanceChanceFormulaC\", 0.0073);\n\n\tloadIntConfig(L, ACTIONS_DELAY_INTERVAL, \"timeBetweenActions\", 200);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "277e0554b7c854dab5d9eae7dd2b11c46125a1184035332166cf026c86052dae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 205, + "startColumn": 2, + "charOffset": 12243, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 203, + "startColumn": 2, + "charOffset": 12149, + "charLength": 13, + "snippet": { + "text": "\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_C, \"transcendanceChanceFormulaC\", 0.0073);\n\n\tloadIntConfig(L, ACTIONS_DELAY_INTERVAL, \"timeBetweenActions\", 200);\n\tloadIntConfig(L, ADVENTURERSBLESSING_LEVEL, \"adventurersBlessingLevel\", 21);\n\tloadIntConfig(L, BESTIARY_KILL_MULTIPLIER, \"bestiaryKillMultiplier\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "781cc4ee2d0bc60c9859b4c0f89b3048d8a3df6340d2b47988b14b8cbc008655" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 205, + "startColumn": 65, + "charOffset": 12306, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 203, + "startColumn": 65, + "charOffset": 12149, + "charLength": 3, + "snippet": { + "text": "\tloadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_C, \"transcendanceChanceFormulaC\", 0.0073);\n\n\tloadIntConfig(L, ACTIONS_DELAY_INTERVAL, \"timeBetweenActions\", 200);\n\tloadIntConfig(L, ADVENTURERSBLESSING_LEVEL, \"adventurersBlessingLevel\", 21);\n\tloadIntConfig(L, BESTIARY_KILL_MULTIPLIER, \"bestiaryKillMultiplier\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b738ffd9fc284840a9deb124c506968d32b733a6c8d29b515e4ad41c9151bda4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 206, + "startColumn": 2, + "charOffset": 12313, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 204, + "startColumn": 2, + "charOffset": 12241, + "charLength": 13, + "snippet": { + "text": "\n\tloadIntConfig(L, ACTIONS_DELAY_INTERVAL, \"timeBetweenActions\", 200);\n\tloadIntConfig(L, ADVENTURERSBLESSING_LEVEL, \"adventurersBlessingLevel\", 21);\n\tloadIntConfig(L, BESTIARY_KILL_MULTIPLIER, \"bestiaryKillMultiplier\", 1);\n\tloadIntConfig(L, BLACK_SKULL_DURATION, \"blackSkullDuration\", 45);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8bc0e2daee34a6e21de511b5a90fd257130136dc343f2feee0386168c530008c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "21 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 206, + "startColumn": 74, + "charOffset": 12385, + "charLength": 2, + "snippet": { + "text": "21" + } + }, + "contextRegion": { + "startLine": 204, + "startColumn": 74, + "charOffset": 12241, + "charLength": 2, + "snippet": { + "text": "\n\tloadIntConfig(L, ACTIONS_DELAY_INTERVAL, \"timeBetweenActions\", 200);\n\tloadIntConfig(L, ADVENTURERSBLESSING_LEVEL, \"adventurersBlessingLevel\", 21);\n\tloadIntConfig(L, BESTIARY_KILL_MULTIPLIER, \"bestiaryKillMultiplier\", 1);\n\tloadIntConfig(L, BLACK_SKULL_DURATION, \"blackSkullDuration\", 45);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f30783731d351a678c7aa01ae7f3c68d68bc413d04a8ec7e7b3f16a432b4e7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 207, + "startColumn": 2, + "charOffset": 12391, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 205, + "startColumn": 2, + "charOffset": 12242, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, ACTIONS_DELAY_INTERVAL, \"timeBetweenActions\", 200);\n\tloadIntConfig(L, ADVENTURERSBLESSING_LEVEL, \"adventurersBlessingLevel\", 21);\n\tloadIntConfig(L, BESTIARY_KILL_MULTIPLIER, \"bestiaryKillMultiplier\", 1);\n\tloadIntConfig(L, BLACK_SKULL_DURATION, \"blackSkullDuration\", 45);\n\tloadIntConfig(L, BOOSTED_BOSS_KILL_BONUS, \"boostedBossKillBonus\", 3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2118a10f9dcc2c970be56905057229d242c8a5336dfd7adca45c28337cec31e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 208, + "startColumn": 2, + "charOffset": 12465, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 206, + "startColumn": 2, + "charOffset": 12312, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, ADVENTURERSBLESSING_LEVEL, \"adventurersBlessingLevel\", 21);\n\tloadIntConfig(L, BESTIARY_KILL_MULTIPLIER, \"bestiaryKillMultiplier\", 1);\n\tloadIntConfig(L, BLACK_SKULL_DURATION, \"blackSkullDuration\", 45);\n\tloadIntConfig(L, BOOSTED_BOSS_KILL_BONUS, \"boostedBossKillBonus\", 3);\n\tloadIntConfig(L, BOOSTED_BOSS_LOOT_BONUS, \"boostedBossLootBonus\", 250);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2f90c7fd6c6c125c84ba94cf8fe2ee639d2f9d16d2fc04c394bca5ad55e4116" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "45 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 208, + "startColumn": 63, + "charOffset": 12526, + "charLength": 2, + "snippet": { + "text": "45" + } + }, + "contextRegion": { + "startLine": 206, + "startColumn": 63, + "charOffset": 12312, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, ADVENTURERSBLESSING_LEVEL, \"adventurersBlessingLevel\", 21);\n\tloadIntConfig(L, BESTIARY_KILL_MULTIPLIER, \"bestiaryKillMultiplier\", 1);\n\tloadIntConfig(L, BLACK_SKULL_DURATION, \"blackSkullDuration\", 45);\n\tloadIntConfig(L, BOOSTED_BOSS_KILL_BONUS, \"boostedBossKillBonus\", 3);\n\tloadIntConfig(L, BOOSTED_BOSS_LOOT_BONUS, \"boostedBossLootBonus\", 250);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7f44f609f77006d291ebe1ceb89ef60dcbd438363eb461b71ab05155f74e2ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 209, + "startColumn": 2, + "charOffset": 12532, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 207, + "startColumn": 2, + "charOffset": 12390, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, BESTIARY_KILL_MULTIPLIER, \"bestiaryKillMultiplier\", 1);\n\tloadIntConfig(L, BLACK_SKULL_DURATION, \"blackSkullDuration\", 45);\n\tloadIntConfig(L, BOOSTED_BOSS_KILL_BONUS, \"boostedBossKillBonus\", 3);\n\tloadIntConfig(L, BOOSTED_BOSS_LOOT_BONUS, \"boostedBossLootBonus\", 250);\n\tloadIntConfig(L, BOSS_DEFAULT_TIME_TO_DEFEAT, \"bossDefaultTimeToDefeat\", 20 * 60);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6444eb795e83f045c308b18f74dce71d3bc456d7dc68183592de11b8532e992" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 210, + "startColumn": 2, + "charOffset": 12603, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 208, + "startColumn": 2, + "charOffset": 12464, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, BLACK_SKULL_DURATION, \"blackSkullDuration\", 45);\n\tloadIntConfig(L, BOOSTED_BOSS_KILL_BONUS, \"boostedBossKillBonus\", 3);\n\tloadIntConfig(L, BOOSTED_BOSS_LOOT_BONUS, \"boostedBossLootBonus\", 250);\n\tloadIntConfig(L, BOSS_DEFAULT_TIME_TO_DEFEAT, \"bossDefaultTimeToDefeat\", 20 * 60);\n\tloadIntConfig(L, BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN, \"bossDefaultTimeToFightAgain\", 20 * 60 * 60);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c069b3792ee66e51e6b058d3ff000ec4c68c60431d4affb6927025d402767ef7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "250 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 210, + "startColumn": 68, + "charOffset": 12669, + "charLength": 3, + "snippet": { + "text": "250" + } + }, + "contextRegion": { + "startLine": 208, + "startColumn": 68, + "charOffset": 12464, + "charLength": 3, + "snippet": { + "text": "\tloadIntConfig(L, BLACK_SKULL_DURATION, \"blackSkullDuration\", 45);\n\tloadIntConfig(L, BOOSTED_BOSS_KILL_BONUS, \"boostedBossKillBonus\", 3);\n\tloadIntConfig(L, BOOSTED_BOSS_LOOT_BONUS, \"boostedBossLootBonus\", 250);\n\tloadIntConfig(L, BOSS_DEFAULT_TIME_TO_DEFEAT, \"bossDefaultTimeToDefeat\", 20 * 60);\n\tloadIntConfig(L, BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN, \"bossDefaultTimeToFightAgain\", 20 * 60 * 60);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9379cfeb9a50299949a0bc70f28bb29a45d3335c7a57e02d21fcdaf9282f8c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 211, + "startColumn": 2, + "charOffset": 12676, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 209, + "startColumn": 2, + "charOffset": 12531, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, BOOSTED_BOSS_KILL_BONUS, \"boostedBossKillBonus\", 3);\n\tloadIntConfig(L, BOOSTED_BOSS_LOOT_BONUS, \"boostedBossLootBonus\", 250);\n\tloadIntConfig(L, BOSS_DEFAULT_TIME_TO_DEFEAT, \"bossDefaultTimeToDefeat\", 20 * 60);\n\tloadIntConfig(L, BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN, \"bossDefaultTimeToFightAgain\", 20 * 60 * 60);\n\tloadIntConfig(L, BOSSTIARY_KILL_MULTIPLIER, \"bosstiaryKillMultiplier\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14977ef964b55c8a361a28523d3d86793562edf258c289d646a1b102d3c247b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 211, + "startColumn": 75, + "charOffset": 12749, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 209, + "startColumn": 75, + "charOffset": 12531, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, BOOSTED_BOSS_KILL_BONUS, \"boostedBossKillBonus\", 3);\n\tloadIntConfig(L, BOOSTED_BOSS_LOOT_BONUS, \"boostedBossLootBonus\", 250);\n\tloadIntConfig(L, BOSS_DEFAULT_TIME_TO_DEFEAT, \"bossDefaultTimeToDefeat\", 20 * 60);\n\tloadIntConfig(L, BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN, \"bossDefaultTimeToFightAgain\", 20 * 60 * 60);\n\tloadIntConfig(L, BOSSTIARY_KILL_MULTIPLIER, \"bosstiaryKillMultiplier\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f9356d80ee6a932ffa0492b52dca654aad3ad8a4fde354b79e3dbd3659df62e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 211, + "startColumn": 80, + "charOffset": 12754, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 209, + "startColumn": 80, + "charOffset": 12531, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, BOOSTED_BOSS_KILL_BONUS, \"boostedBossKillBonus\", 3);\n\tloadIntConfig(L, BOOSTED_BOSS_LOOT_BONUS, \"boostedBossLootBonus\", 250);\n\tloadIntConfig(L, BOSS_DEFAULT_TIME_TO_DEFEAT, \"bossDefaultTimeToDefeat\", 20 * 60);\n\tloadIntConfig(L, BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN, \"bossDefaultTimeToFightAgain\", 20 * 60 * 60);\n\tloadIntConfig(L, BOSSTIARY_KILL_MULTIPLIER, \"bosstiaryKillMultiplier\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01d40c997d94548861804ad5547eca8c200cebef3a38d74dd104ea1a972f5f62" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 212, + "startColumn": 2, + "charOffset": 12760, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 210, + "startColumn": 2, + "charOffset": 12602, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, BOOSTED_BOSS_LOOT_BONUS, \"boostedBossLootBonus\", 250);\n\tloadIntConfig(L, BOSS_DEFAULT_TIME_TO_DEFEAT, \"bossDefaultTimeToDefeat\", 20 * 60);\n\tloadIntConfig(L, BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN, \"bossDefaultTimeToFightAgain\", 20 * 60 * 60);\n\tloadIntConfig(L, BOSSTIARY_KILL_MULTIPLIER, \"bosstiaryKillMultiplier\", 1);\n\tloadIntConfig(L, BUY_AOL_COMMAND_FEE, \"buyAolCommandFee\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a64ae91b6d7668e0a9754c0a3ab11bc2572c7c984cc36f73b9fa35895d214d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 212, + "startColumn": 84, + "charOffset": 12842, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 210, + "startColumn": 84, + "charOffset": 12602, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, BOOSTED_BOSS_LOOT_BONUS, \"boostedBossLootBonus\", 250);\n\tloadIntConfig(L, BOSS_DEFAULT_TIME_TO_DEFEAT, \"bossDefaultTimeToDefeat\", 20 * 60);\n\tloadIntConfig(L, BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN, \"bossDefaultTimeToFightAgain\", 20 * 60 * 60);\n\tloadIntConfig(L, BOSSTIARY_KILL_MULTIPLIER, \"bosstiaryKillMultiplier\", 1);\n\tloadIntConfig(L, BUY_AOL_COMMAND_FEE, \"buyAolCommandFee\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "368137e62b54adef99359caae08c3e8e5b94a83b59d404bff5ff5fe0ec852c6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 212, + "startColumn": 89, + "charOffset": 12847, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 210, + "startColumn": 89, + "charOffset": 12602, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, BOOSTED_BOSS_LOOT_BONUS, \"boostedBossLootBonus\", 250);\n\tloadIntConfig(L, BOSS_DEFAULT_TIME_TO_DEFEAT, \"bossDefaultTimeToDefeat\", 20 * 60);\n\tloadIntConfig(L, BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN, \"bossDefaultTimeToFightAgain\", 20 * 60 * 60);\n\tloadIntConfig(L, BOSSTIARY_KILL_MULTIPLIER, \"bosstiaryKillMultiplier\", 1);\n\tloadIntConfig(L, BUY_AOL_COMMAND_FEE, \"buyAolCommandFee\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "976e0b94b894f887f6171d9d1813865aa2763888981701562d4b306d88346503" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 212, + "startColumn": 94, + "charOffset": 12852, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 210, + "startColumn": 94, + "charOffset": 12602, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, BOOSTED_BOSS_LOOT_BONUS, \"boostedBossLootBonus\", 250);\n\tloadIntConfig(L, BOSS_DEFAULT_TIME_TO_DEFEAT, \"bossDefaultTimeToDefeat\", 20 * 60);\n\tloadIntConfig(L, BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN, \"bossDefaultTimeToFightAgain\", 20 * 60 * 60);\n\tloadIntConfig(L, BOSSTIARY_KILL_MULTIPLIER, \"bosstiaryKillMultiplier\", 1);\n\tloadIntConfig(L, BUY_AOL_COMMAND_FEE, \"buyAolCommandFee\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96953399f15e2f982afe4e40c13f9d91eb0f56cda710c421f75268240662ac42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 213, + "startColumn": 2, + "charOffset": 12858, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 211, + "startColumn": 2, + "charOffset": 12675, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, BOSS_DEFAULT_TIME_TO_DEFEAT, \"bossDefaultTimeToDefeat\", 20 * 60);\n\tloadIntConfig(L, BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN, \"bossDefaultTimeToFightAgain\", 20 * 60 * 60);\n\tloadIntConfig(L, BOSSTIARY_KILL_MULTIPLIER, \"bosstiaryKillMultiplier\", 1);\n\tloadIntConfig(L, BUY_AOL_COMMAND_FEE, \"buyAolCommandFee\", 0);\n\tloadIntConfig(L, BUY_BLESS_COMMAND_FEE, \"buyBlessCommandFee\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54f79c01790c92d90e92b0d06ae458ce70fcdde5c786c141cfadb746157d0309" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 214, + "startColumn": 2, + "charOffset": 12934, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 2, + "charOffset": 12759, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN, \"bossDefaultTimeToFightAgain\", 20 * 60 * 60);\n\tloadIntConfig(L, BOSSTIARY_KILL_MULTIPLIER, \"bosstiaryKillMultiplier\", 1);\n\tloadIntConfig(L, BUY_AOL_COMMAND_FEE, \"buyAolCommandFee\", 0);\n\tloadIntConfig(L, BUY_BLESS_COMMAND_FEE, \"buyBlessCommandFee\", 0);\n\tloadIntConfig(L, CHECK_EXPIRED_MARKET_OFFERS_EACH_MINUTES, \"checkExpiredMarketOffersEachMinutes\", 60);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d7374c83b7da0e7b75ac9bbdbe342b627dc2fa56a622ebd2beaafa6aa89ccb7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 215, + "startColumn": 2, + "charOffset": 12997, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 213, + "startColumn": 2, + "charOffset": 12857, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, BOSSTIARY_KILL_MULTIPLIER, \"bosstiaryKillMultiplier\", 1);\n\tloadIntConfig(L, BUY_AOL_COMMAND_FEE, \"buyAolCommandFee\", 0);\n\tloadIntConfig(L, BUY_BLESS_COMMAND_FEE, \"buyBlessCommandFee\", 0);\n\tloadIntConfig(L, CHECK_EXPIRED_MARKET_OFFERS_EACH_MINUTES, \"checkExpiredMarketOffersEachMinutes\", 60);\n\tloadIntConfig(L, COMBAT_CHAIN_DELAY, \"combatChainDelay\", 50);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "192ab2655b498a2175c450101a31f502152fbde054f146883b42d1f29d9c05a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 216, + "startColumn": 2, + "charOffset": 13064, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 214, + "startColumn": 2, + "charOffset": 12933, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, BUY_AOL_COMMAND_FEE, \"buyAolCommandFee\", 0);\n\tloadIntConfig(L, BUY_BLESS_COMMAND_FEE, \"buyBlessCommandFee\", 0);\n\tloadIntConfig(L, CHECK_EXPIRED_MARKET_OFFERS_EACH_MINUTES, \"checkExpiredMarketOffersEachMinutes\", 60);\n\tloadIntConfig(L, COMBAT_CHAIN_DELAY, \"combatChainDelay\", 50);\n\tloadIntConfig(L, COMBAT_CHAIN_TARGETS, \"combatChainTargets\", 5);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "595e6b518a3e030ef53f8e4a84115da71cbea9ec2b8e98aa845310e1dfb2a8cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 216, + "startColumn": 100, + "charOffset": 13162, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 214, + "startColumn": 100, + "charOffset": 12933, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, BUY_AOL_COMMAND_FEE, \"buyAolCommandFee\", 0);\n\tloadIntConfig(L, BUY_BLESS_COMMAND_FEE, \"buyBlessCommandFee\", 0);\n\tloadIntConfig(L, CHECK_EXPIRED_MARKET_OFFERS_EACH_MINUTES, \"checkExpiredMarketOffersEachMinutes\", 60);\n\tloadIntConfig(L, COMBAT_CHAIN_DELAY, \"combatChainDelay\", 50);\n\tloadIntConfig(L, COMBAT_CHAIN_TARGETS, \"combatChainTargets\", 5);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f35e55de9f197c4a6d165e6ad0c7e21255f35c67915a05ce331dbaff1dd7584e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 217, + "startColumn": 2, + "charOffset": 13168, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 215, + "startColumn": 2, + "charOffset": 12996, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, BUY_BLESS_COMMAND_FEE, \"buyBlessCommandFee\", 0);\n\tloadIntConfig(L, CHECK_EXPIRED_MARKET_OFFERS_EACH_MINUTES, \"checkExpiredMarketOffersEachMinutes\", 60);\n\tloadIntConfig(L, COMBAT_CHAIN_DELAY, \"combatChainDelay\", 50);\n\tloadIntConfig(L, COMBAT_CHAIN_TARGETS, \"combatChainTargets\", 5);\n\tloadIntConfig(L, COMPRESSION_LEVEL, \"packetCompressionLevel\", 6);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3aa074b02e8d7fd3485d9f08d02e23d70e178f0fe7bf459107b4f816ced0fb78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 217, + "startColumn": 59, + "charOffset": 13225, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 215, + "startColumn": 59, + "charOffset": 12996, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, BUY_BLESS_COMMAND_FEE, \"buyBlessCommandFee\", 0);\n\tloadIntConfig(L, CHECK_EXPIRED_MARKET_OFFERS_EACH_MINUTES, \"checkExpiredMarketOffersEachMinutes\", 60);\n\tloadIntConfig(L, COMBAT_CHAIN_DELAY, \"combatChainDelay\", 50);\n\tloadIntConfig(L, COMBAT_CHAIN_TARGETS, \"combatChainTargets\", 5);\n\tloadIntConfig(L, COMPRESSION_LEVEL, \"packetCompressionLevel\", 6);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b32762d34b381bfd20c8e4ef56bc6ee3d909ea138e19fb88e73684485444091" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 218, + "startColumn": 2, + "charOffset": 13231, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 216, + "startColumn": 2, + "charOffset": 13063, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, CHECK_EXPIRED_MARKET_OFFERS_EACH_MINUTES, \"checkExpiredMarketOffersEachMinutes\", 60);\n\tloadIntConfig(L, COMBAT_CHAIN_DELAY, \"combatChainDelay\", 50);\n\tloadIntConfig(L, COMBAT_CHAIN_TARGETS, \"combatChainTargets\", 5);\n\tloadIntConfig(L, COMPRESSION_LEVEL, \"packetCompressionLevel\", 6);\n\tloadIntConfig(L, CRITICALCHANCE, \"criticalChance\", 10);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4cd9eb7a97afc681c9f0eab8833b44980147100a8a5ef645172a1fa2312c91d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 218, + "startColumn": 63, + "charOffset": 13292, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 216, + "startColumn": 63, + "charOffset": 13063, + "charLength": 1, + "snippet": { + "text": "\tloadIntConfig(L, CHECK_EXPIRED_MARKET_OFFERS_EACH_MINUTES, \"checkExpiredMarketOffersEachMinutes\", 60);\n\tloadIntConfig(L, COMBAT_CHAIN_DELAY, \"combatChainDelay\", 50);\n\tloadIntConfig(L, COMBAT_CHAIN_TARGETS, \"combatChainTargets\", 5);\n\tloadIntConfig(L, COMPRESSION_LEVEL, \"packetCompressionLevel\", 6);\n\tloadIntConfig(L, CRITICALCHANCE, \"criticalChance\", 10);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "236e0aef3502b2acb158e99142e723aef612ff9078f44d096bea8cd13a9b4078" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 219, + "startColumn": 2, + "charOffset": 13297, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 217, + "startColumn": 2, + "charOffset": 13167, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, COMBAT_CHAIN_DELAY, \"combatChainDelay\", 50);\n\tloadIntConfig(L, COMBAT_CHAIN_TARGETS, \"combatChainTargets\", 5);\n\tloadIntConfig(L, COMPRESSION_LEVEL, \"packetCompressionLevel\", 6);\n\tloadIntConfig(L, CRITICALCHANCE, \"criticalChance\", 10);\n\tloadIntConfig(L, DAY_KILLS_TO_RED, \"dayKillsToRedSkull\", 3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80258cd76abef8582090edbc37ca45bf861298579f437b4e9a8e75421bca7eb1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 219, + "startColumn": 64, + "charOffset": 13359, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 217, + "startColumn": 64, + "charOffset": 13167, + "charLength": 1, + "snippet": { + "text": "\tloadIntConfig(L, COMBAT_CHAIN_DELAY, \"combatChainDelay\", 50);\n\tloadIntConfig(L, COMBAT_CHAIN_TARGETS, \"combatChainTargets\", 5);\n\tloadIntConfig(L, COMPRESSION_LEVEL, \"packetCompressionLevel\", 6);\n\tloadIntConfig(L, CRITICALCHANCE, \"criticalChance\", 10);\n\tloadIntConfig(L, DAY_KILLS_TO_RED, \"dayKillsToRedSkull\", 3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "406e8f9dd0a7d67440e11bca3a176a92cfeac8ba829b299871908a1302c55956" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 220, + "startColumn": 2, + "charOffset": 13364, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 218, + "startColumn": 2, + "charOffset": 13230, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, COMBAT_CHAIN_TARGETS, \"combatChainTargets\", 5);\n\tloadIntConfig(L, COMPRESSION_LEVEL, \"packetCompressionLevel\", 6);\n\tloadIntConfig(L, CRITICALCHANCE, \"criticalChance\", 10);\n\tloadIntConfig(L, DAY_KILLS_TO_RED, \"dayKillsToRedSkull\", 3);\n\tloadIntConfig(L, DEATH_LOSE_PERCENT, \"deathLosePercent\", -1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c00e57cee39b612b4948428f789e2ee072edd5f69a5bafca727658adce9e7ddc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 220, + "startColumn": 53, + "charOffset": 13415, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 218, + "startColumn": 53, + "charOffset": 13230, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, COMBAT_CHAIN_TARGETS, \"combatChainTargets\", 5);\n\tloadIntConfig(L, COMPRESSION_LEVEL, \"packetCompressionLevel\", 6);\n\tloadIntConfig(L, CRITICALCHANCE, \"criticalChance\", 10);\n\tloadIntConfig(L, DAY_KILLS_TO_RED, \"dayKillsToRedSkull\", 3);\n\tloadIntConfig(L, DEATH_LOSE_PERCENT, \"deathLosePercent\", -1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "553301845c620cacde35012ad6751d94d318b5a399997b03e8fe9c6f03506c67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 221, + "startColumn": 2, + "charOffset": 13421, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 219, + "startColumn": 2, + "charOffset": 13296, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, COMPRESSION_LEVEL, \"packetCompressionLevel\", 6);\n\tloadIntConfig(L, CRITICALCHANCE, \"criticalChance\", 10);\n\tloadIntConfig(L, DAY_KILLS_TO_RED, \"dayKillsToRedSkull\", 3);\n\tloadIntConfig(L, DEATH_LOSE_PERCENT, \"deathLosePercent\", -1);\n\tloadIntConfig(L, DEFAULT_RESPAWN_TIME, \"defaultRespawnTime\", 60);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e108a3b3e84b9d0775154106f813b01fccb32ba7aafb61392093d319bd0c68db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 222, + "startColumn": 2, + "charOffset": 13483, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 220, + "startColumn": 2, + "charOffset": 13363, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, CRITICALCHANCE, \"criticalChance\", 10);\n\tloadIntConfig(L, DAY_KILLS_TO_RED, \"dayKillsToRedSkull\", 3);\n\tloadIntConfig(L, DEATH_LOSE_PERCENT, \"deathLosePercent\", -1);\n\tloadIntConfig(L, DEFAULT_RESPAWN_TIME, \"defaultRespawnTime\", 60);\n\tloadIntConfig(L, DEFAULT_DESPAWNRADIUS, \"deSpawnRadius\", 50);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbebbfb8bb970999de75078db2d51ac8fb36306848ae7d94ebe819dcfb4af3cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 223, + "startColumn": 2, + "charOffset": 13546, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 221, + "startColumn": 2, + "charOffset": 13420, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, DAY_KILLS_TO_RED, \"dayKillsToRedSkull\", 3);\n\tloadIntConfig(L, DEATH_LOSE_PERCENT, \"deathLosePercent\", -1);\n\tloadIntConfig(L, DEFAULT_RESPAWN_TIME, \"defaultRespawnTime\", 60);\n\tloadIntConfig(L, DEFAULT_DESPAWNRADIUS, \"deSpawnRadius\", 50);\n\tloadIntConfig(L, DEFAULT_DESPAWNRANGE, \"deSpawnRange\", 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b4d9853ecd603aaf17effafac057dbcb9e4500029a60545ee871aa467b031b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 223, + "startColumn": 63, + "charOffset": 13607, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 221, + "startColumn": 63, + "charOffset": 13420, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, DAY_KILLS_TO_RED, \"dayKillsToRedSkull\", 3);\n\tloadIntConfig(L, DEATH_LOSE_PERCENT, \"deathLosePercent\", -1);\n\tloadIntConfig(L, DEFAULT_RESPAWN_TIME, \"defaultRespawnTime\", 60);\n\tloadIntConfig(L, DEFAULT_DESPAWNRADIUS, \"deSpawnRadius\", 50);\n\tloadIntConfig(L, DEFAULT_DESPAWNRANGE, \"deSpawnRange\", 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d08ac2e9deca475905e9448261ad0dbb17587807723e65bc490a1441be14e4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 224, + "startColumn": 2, + "charOffset": 13613, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 222, + "startColumn": 2, + "charOffset": 13482, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, DEATH_LOSE_PERCENT, \"deathLosePercent\", -1);\n\tloadIntConfig(L, DEFAULT_RESPAWN_TIME, \"defaultRespawnTime\", 60);\n\tloadIntConfig(L, DEFAULT_DESPAWNRADIUS, \"deSpawnRadius\", 50);\n\tloadIntConfig(L, DEFAULT_DESPAWNRANGE, \"deSpawnRange\", 2);\n\tloadIntConfig(L, DEPOTCHEST, \"depotChest\", 4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04a5bd262b6d5586942107832a22702a3de8724a588ebf6f356eb2dbb5b97721" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 224, + "startColumn": 59, + "charOffset": 13670, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 222, + "startColumn": 59, + "charOffset": 13482, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, DEATH_LOSE_PERCENT, \"deathLosePercent\", -1);\n\tloadIntConfig(L, DEFAULT_RESPAWN_TIME, \"defaultRespawnTime\", 60);\n\tloadIntConfig(L, DEFAULT_DESPAWNRADIUS, \"deSpawnRadius\", 50);\n\tloadIntConfig(L, DEFAULT_DESPAWNRANGE, \"deSpawnRange\", 2);\n\tloadIntConfig(L, DEPOTCHEST, \"depotChest\", 4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0eba2fe93b498b83d528517604274c5df65c5a6b8a4d03b0d345a8a6e1cc36b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 225, + "startColumn": 2, + "charOffset": 13676, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 223, + "startColumn": 2, + "charOffset": 13545, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, DEFAULT_RESPAWN_TIME, \"defaultRespawnTime\", 60);\n\tloadIntConfig(L, DEFAULT_DESPAWNRADIUS, \"deSpawnRadius\", 50);\n\tloadIntConfig(L, DEFAULT_DESPAWNRANGE, \"deSpawnRange\", 2);\n\tloadIntConfig(L, DEPOTCHEST, \"depotChest\", 4);\n\tloadIntConfig(L, DISCORD_WEBHOOK_DELAY_MS, \"discordWebhookDelayMs\", Webhook::DEFAULT_DELAY_MS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fdd4a61e896761fb9c78a522eb9650f50f45eb4ec58d4987d26fc180e34b4357" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 2, + "charOffset": 13736, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 2, + "charOffset": 13612, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, DEFAULT_DESPAWNRADIUS, \"deSpawnRadius\", 50);\n\tloadIntConfig(L, DEFAULT_DESPAWNRANGE, \"deSpawnRange\", 2);\n\tloadIntConfig(L, DEPOTCHEST, \"depotChest\", 4);\n\tloadIntConfig(L, DISCORD_WEBHOOK_DELAY_MS, \"discordWebhookDelayMs\", Webhook::DEFAULT_DELAY_MS);\n\tloadIntConfig(L, EX_ACTIONS_DELAY_INTERVAL, \"timeBetweenExActions\", 1000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d271fa2071ac553682cad443b80b78a6be7d0fd88f777fe5bb284010d349ea99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 227, + "startColumn": 2, + "charOffset": 13784, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 225, + "startColumn": 2, + "charOffset": 13675, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, DEFAULT_DESPAWNRANGE, \"deSpawnRange\", 2);\n\tloadIntConfig(L, DEPOTCHEST, \"depotChest\", 4);\n\tloadIntConfig(L, DISCORD_WEBHOOK_DELAY_MS, \"discordWebhookDelayMs\", Webhook::DEFAULT_DELAY_MS);\n\tloadIntConfig(L, EX_ACTIONS_DELAY_INTERVAL, \"timeBetweenExActions\", 1000);\n\tloadIntConfig(L, EXP_FROM_PLAYERS_LEVEL_RANGE, \"expFromPlayersLevelRange\", 75);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a64ae91b6d7668e0a9754c0a3ab11bc2572c7c984cc36f73b9fa35895d214d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 227, + "startColumn": 70, + "charOffset": 13852, + "charLength": 7, + "snippet": { + "text": "Webhook" + } + }, + "contextRegion": { + "startLine": 225, + "startColumn": 70, + "charOffset": 13675, + "charLength": 7, + "snippet": { + "text": "\tloadIntConfig(L, DEFAULT_DESPAWNRANGE, \"deSpawnRange\", 2);\n\tloadIntConfig(L, DEPOTCHEST, \"depotChest\", 4);\n\tloadIntConfig(L, DISCORD_WEBHOOK_DELAY_MS, \"discordWebhookDelayMs\", Webhook::DEFAULT_DELAY_MS);\n\tloadIntConfig(L, EX_ACTIONS_DELAY_INTERVAL, \"timeBetweenExActions\", 1000);\n\tloadIntConfig(L, EXP_FROM_PLAYERS_LEVEL_RANGE, \"expFromPlayersLevelRange\", 75);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a92f94e38e64f05cf48c982039acb2c6f986360eb9488f0877e2d126840dd3e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 228, + "startColumn": 2, + "charOffset": 13881, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 226, + "startColumn": 2, + "charOffset": 13735, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, DEPOTCHEST, \"depotChest\", 4);\n\tloadIntConfig(L, DISCORD_WEBHOOK_DELAY_MS, \"discordWebhookDelayMs\", Webhook::DEFAULT_DELAY_MS);\n\tloadIntConfig(L, EX_ACTIONS_DELAY_INTERVAL, \"timeBetweenExActions\", 1000);\n\tloadIntConfig(L, EXP_FROM_PLAYERS_LEVEL_RANGE, \"expFromPlayersLevelRange\", 75);\n\tloadIntConfig(L, FAMILIAR_TIME, \"familiarTime\", 30);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2fe2dfc85c83155c70f15d37f55d90649a8ba70955df3c6b0af283a7d316ff3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 228, + "startColumn": 70, + "charOffset": 13949, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 226, + "startColumn": 70, + "charOffset": 13735, + "charLength": 4, + "snippet": { + "text": "\tloadIntConfig(L, DEPOTCHEST, \"depotChest\", 4);\n\tloadIntConfig(L, DISCORD_WEBHOOK_DELAY_MS, \"discordWebhookDelayMs\", Webhook::DEFAULT_DELAY_MS);\n\tloadIntConfig(L, EX_ACTIONS_DELAY_INTERVAL, \"timeBetweenExActions\", 1000);\n\tloadIntConfig(L, EXP_FROM_PLAYERS_LEVEL_RANGE, \"expFromPlayersLevelRange\", 75);\n\tloadIntConfig(L, FAMILIAR_TIME, \"familiarTime\", 30);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d934863b16f5e9151ee31d994732d3582bd7cc8115e3f3aeee162329c4489657" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 229, + "startColumn": 2, + "charOffset": 13957, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 227, + "startColumn": 2, + "charOffset": 13783, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, DISCORD_WEBHOOK_DELAY_MS, \"discordWebhookDelayMs\", Webhook::DEFAULT_DELAY_MS);\n\tloadIntConfig(L, EX_ACTIONS_DELAY_INTERVAL, \"timeBetweenExActions\", 1000);\n\tloadIntConfig(L, EXP_FROM_PLAYERS_LEVEL_RANGE, \"expFromPlayersLevelRange\", 75);\n\tloadIntConfig(L, FAMILIAR_TIME, \"familiarTime\", 30);\n\tloadIntConfig(L, FORGE_BASE_SUCCESS_RATE, \"forgeBaseSuccessRate\", 50);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19f3fdcd859c02962e005be97465db7bc5ae90faa507b002a11487d802167a3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "75 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 229, + "startColumn": 77, + "charOffset": 14032, + "charLength": 2, + "snippet": { + "text": "75" + } + }, + "contextRegion": { + "startLine": 227, + "startColumn": 77, + "charOffset": 13783, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, DISCORD_WEBHOOK_DELAY_MS, \"discordWebhookDelayMs\", Webhook::DEFAULT_DELAY_MS);\n\tloadIntConfig(L, EX_ACTIONS_DELAY_INTERVAL, \"timeBetweenExActions\", 1000);\n\tloadIntConfig(L, EXP_FROM_PLAYERS_LEVEL_RANGE, \"expFromPlayersLevelRange\", 75);\n\tloadIntConfig(L, FAMILIAR_TIME, \"familiarTime\", 30);\n\tloadIntConfig(L, FORGE_BASE_SUCCESS_RATE, \"forgeBaseSuccessRate\", 50);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ca930164147d4f858e48bc5dfd6e2f52c92ac6c13a048f33149ada088e1737c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 230, + "startColumn": 2, + "charOffset": 14038, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 228, + "startColumn": 2, + "charOffset": 13880, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, EX_ACTIONS_DELAY_INTERVAL, \"timeBetweenExActions\", 1000);\n\tloadIntConfig(L, EXP_FROM_PLAYERS_LEVEL_RANGE, \"expFromPlayersLevelRange\", 75);\n\tloadIntConfig(L, FAMILIAR_TIME, \"familiarTime\", 30);\n\tloadIntConfig(L, FORGE_BASE_SUCCESS_RATE, \"forgeBaseSuccessRate\", 50);\n\tloadIntConfig(L, FORGE_BONUS_SUCCESS_RATE, \"forgeBonusSuccessRate\", 15);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32c94d5b66ef00e448dd2788961bca5aaebaf0ba672e7dfdc17a7f0ef0af16be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 230, + "startColumn": 50, + "charOffset": 14086, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 228, + "startColumn": 50, + "charOffset": 13880, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, EX_ACTIONS_DELAY_INTERVAL, \"timeBetweenExActions\", 1000);\n\tloadIntConfig(L, EXP_FROM_PLAYERS_LEVEL_RANGE, \"expFromPlayersLevelRange\", 75);\n\tloadIntConfig(L, FAMILIAR_TIME, \"familiarTime\", 30);\n\tloadIntConfig(L, FORGE_BASE_SUCCESS_RATE, \"forgeBaseSuccessRate\", 50);\n\tloadIntConfig(L, FORGE_BONUS_SUCCESS_RATE, \"forgeBonusSuccessRate\", 15);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b5b56320c6b85e6ad3e8277eee6fbf878b6d3e2be8dcd6261956f4271c4d59c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 231, + "startColumn": 2, + "charOffset": 14092, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 229, + "startColumn": 2, + "charOffset": 13956, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, EXP_FROM_PLAYERS_LEVEL_RANGE, \"expFromPlayersLevelRange\", 75);\n\tloadIntConfig(L, FAMILIAR_TIME, \"familiarTime\", 30);\n\tloadIntConfig(L, FORGE_BASE_SUCCESS_RATE, \"forgeBaseSuccessRate\", 50);\n\tloadIntConfig(L, FORGE_BONUS_SUCCESS_RATE, \"forgeBonusSuccessRate\", 15);\n\tloadIntConfig(L, FORGE_CONVERGENCE_FUSION_DUST_COST, \"forgeConvergenceFusionDustCost\", 130);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa5eadf449bc60bb73ed18b6aeaa733c0df0f9b7e399bf8ba609f0be57262bdf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 231, + "startColumn": 68, + "charOffset": 14158, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 229, + "startColumn": 68, + "charOffset": 13956, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, EXP_FROM_PLAYERS_LEVEL_RANGE, \"expFromPlayersLevelRange\", 75);\n\tloadIntConfig(L, FAMILIAR_TIME, \"familiarTime\", 30);\n\tloadIntConfig(L, FORGE_BASE_SUCCESS_RATE, \"forgeBaseSuccessRate\", 50);\n\tloadIntConfig(L, FORGE_BONUS_SUCCESS_RATE, \"forgeBonusSuccessRate\", 15);\n\tloadIntConfig(L, FORGE_CONVERGENCE_FUSION_DUST_COST, \"forgeConvergenceFusionDustCost\", 130);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "abb94c144d2d8a56aacb855138b7cf91d772e020136bbe019891976a840d285c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 232, + "startColumn": 2, + "charOffset": 14164, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 230, + "startColumn": 2, + "charOffset": 14037, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, FAMILIAR_TIME, \"familiarTime\", 30);\n\tloadIntConfig(L, FORGE_BASE_SUCCESS_RATE, \"forgeBaseSuccessRate\", 50);\n\tloadIntConfig(L, FORGE_BONUS_SUCCESS_RATE, \"forgeBonusSuccessRate\", 15);\n\tloadIntConfig(L, FORGE_CONVERGENCE_FUSION_DUST_COST, \"forgeConvergenceFusionDustCost\", 130);\n\tloadIntConfig(L, FORGE_CONVERGENCE_TRANSFER_DUST_COST, \"forgeConvergenceTransferCost\", 160);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "427fd11912b35387252f5b6e3ef0173344202e08281208c76428213603c274e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "15 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 232, + "startColumn": 70, + "charOffset": 14232, + "charLength": 2, + "snippet": { + "text": "15" + } + }, + "contextRegion": { + "startLine": 230, + "startColumn": 70, + "charOffset": 14037, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, FAMILIAR_TIME, \"familiarTime\", 30);\n\tloadIntConfig(L, FORGE_BASE_SUCCESS_RATE, \"forgeBaseSuccessRate\", 50);\n\tloadIntConfig(L, FORGE_BONUS_SUCCESS_RATE, \"forgeBonusSuccessRate\", 15);\n\tloadIntConfig(L, FORGE_CONVERGENCE_FUSION_DUST_COST, \"forgeConvergenceFusionDustCost\", 130);\n\tloadIntConfig(L, FORGE_CONVERGENCE_TRANSFER_DUST_COST, \"forgeConvergenceTransferCost\", 160);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d7220c6e319161ff4b6f9d7662e959ffe1ef8744f6269bf0e5de7647d9b96dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 233, + "startColumn": 2, + "charOffset": 14238, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 231, + "startColumn": 2, + "charOffset": 14091, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_BASE_SUCCESS_RATE, \"forgeBaseSuccessRate\", 50);\n\tloadIntConfig(L, FORGE_BONUS_SUCCESS_RATE, \"forgeBonusSuccessRate\", 15);\n\tloadIntConfig(L, FORGE_CONVERGENCE_FUSION_DUST_COST, \"forgeConvergenceFusionDustCost\", 130);\n\tloadIntConfig(L, FORGE_CONVERGENCE_TRANSFER_DUST_COST, \"forgeConvergenceTransferCost\", 160);\n\tloadIntConfig(L, FORGE_CORE_COST, \"forgeCoreCost\", 50);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06b4d392da15877b335d3b1a838ed3b75cee049cb4637d835e3426623039f17c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "130 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 233, + "startColumn": 89, + "charOffset": 14325, + "charLength": 3, + "snippet": { + "text": "130" + } + }, + "contextRegion": { + "startLine": 231, + "startColumn": 89, + "charOffset": 14091, + "charLength": 3, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_BASE_SUCCESS_RATE, \"forgeBaseSuccessRate\", 50);\n\tloadIntConfig(L, FORGE_BONUS_SUCCESS_RATE, \"forgeBonusSuccessRate\", 15);\n\tloadIntConfig(L, FORGE_CONVERGENCE_FUSION_DUST_COST, \"forgeConvergenceFusionDustCost\", 130);\n\tloadIntConfig(L, FORGE_CONVERGENCE_TRANSFER_DUST_COST, \"forgeConvergenceTransferCost\", 160);\n\tloadIntConfig(L, FORGE_CORE_COST, \"forgeCoreCost\", 50);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0bf5152ea4e8965f454bf6bca3d23de790feb22291e8306fd9899a437e665ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 234, + "startColumn": 2, + "charOffset": 14332, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 232, + "startColumn": 2, + "charOffset": 14163, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_BONUS_SUCCESS_RATE, \"forgeBonusSuccessRate\", 15);\n\tloadIntConfig(L, FORGE_CONVERGENCE_FUSION_DUST_COST, \"forgeConvergenceFusionDustCost\", 130);\n\tloadIntConfig(L, FORGE_CONVERGENCE_TRANSFER_DUST_COST, \"forgeConvergenceTransferCost\", 160);\n\tloadIntConfig(L, FORGE_CORE_COST, \"forgeCoreCost\", 50);\n\tloadIntConfig(L, FORGE_COST_ONE_SLIVER, \"forgeCostOneSliver\", 20);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73368414b3ad148c11af4ebc4a4a88aa8b99480b1feeef96316f6fb1ff171683" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "160 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 234, + "startColumn": 89, + "charOffset": 14419, + "charLength": 3, + "snippet": { + "text": "160" + } + }, + "contextRegion": { + "startLine": 232, + "startColumn": 89, + "charOffset": 14163, + "charLength": 3, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_BONUS_SUCCESS_RATE, \"forgeBonusSuccessRate\", 15);\n\tloadIntConfig(L, FORGE_CONVERGENCE_FUSION_DUST_COST, \"forgeConvergenceFusionDustCost\", 130);\n\tloadIntConfig(L, FORGE_CONVERGENCE_TRANSFER_DUST_COST, \"forgeConvergenceTransferCost\", 160);\n\tloadIntConfig(L, FORGE_CORE_COST, \"forgeCoreCost\", 50);\n\tloadIntConfig(L, FORGE_COST_ONE_SLIVER, \"forgeCostOneSliver\", 20);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1329772d5164eb0baa430c8a0f39f8c6212d0bb0fd5e6bb63b964f8c54bebc0c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 235, + "startColumn": 2, + "charOffset": 14426, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 233, + "startColumn": 2, + "charOffset": 14237, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_CONVERGENCE_FUSION_DUST_COST, \"forgeConvergenceFusionDustCost\", 130);\n\tloadIntConfig(L, FORGE_CONVERGENCE_TRANSFER_DUST_COST, \"forgeConvergenceTransferCost\", 160);\n\tloadIntConfig(L, FORGE_CORE_COST, \"forgeCoreCost\", 50);\n\tloadIntConfig(L, FORGE_COST_ONE_SLIVER, \"forgeCostOneSliver\", 20);\n\tloadIntConfig(L, FORGE_FIENDISH_CREATURES_LIMIT, \"forgeFiendishLimit\", 3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9fc563d16040db2d5a89fa4b1cb2ad876ab53cf5906185262ddbb8dcca7c50c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 235, + "startColumn": 53, + "charOffset": 14477, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 233, + "startColumn": 53, + "charOffset": 14237, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_CONVERGENCE_FUSION_DUST_COST, \"forgeConvergenceFusionDustCost\", 130);\n\tloadIntConfig(L, FORGE_CONVERGENCE_TRANSFER_DUST_COST, \"forgeConvergenceTransferCost\", 160);\n\tloadIntConfig(L, FORGE_CORE_COST, \"forgeCoreCost\", 50);\n\tloadIntConfig(L, FORGE_COST_ONE_SLIVER, \"forgeCostOneSliver\", 20);\n\tloadIntConfig(L, FORGE_FIENDISH_CREATURES_LIMIT, \"forgeFiendishLimit\", 3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d64738197087bc5e2296cc37cfd4d6b453f6530e7093a6c4c7bb876b2d7a8a43" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 236, + "startColumn": 2, + "charOffset": 14483, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 234, + "startColumn": 2, + "charOffset": 14331, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_CONVERGENCE_TRANSFER_DUST_COST, \"forgeConvergenceTransferCost\", 160);\n\tloadIntConfig(L, FORGE_CORE_COST, \"forgeCoreCost\", 50);\n\tloadIntConfig(L, FORGE_COST_ONE_SLIVER, \"forgeCostOneSliver\", 20);\n\tloadIntConfig(L, FORGE_FIENDISH_CREATURES_LIMIT, \"forgeFiendishLimit\", 3);\n\tloadIntConfig(L, FORGE_FUSION_DUST_COST, \"forgeFusionDustCost\", 100);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "953e072b8a61f9921b76721a509972fada0ce64581c8efed7b6232f6c32fd4c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 236, + "startColumn": 64, + "charOffset": 14545, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 234, + "startColumn": 64, + "charOffset": 14331, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_CONVERGENCE_TRANSFER_DUST_COST, \"forgeConvergenceTransferCost\", 160);\n\tloadIntConfig(L, FORGE_CORE_COST, \"forgeCoreCost\", 50);\n\tloadIntConfig(L, FORGE_COST_ONE_SLIVER, \"forgeCostOneSliver\", 20);\n\tloadIntConfig(L, FORGE_FIENDISH_CREATURES_LIMIT, \"forgeFiendishLimit\", 3);\n\tloadIntConfig(L, FORGE_FUSION_DUST_COST, \"forgeFusionDustCost\", 100);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "753043c39e8f146f9da218d2053785c80a5b5c538079bd712f06de558482b5a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 237, + "startColumn": 2, + "charOffset": 14551, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 235, + "startColumn": 2, + "charOffset": 14425, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_CORE_COST, \"forgeCoreCost\", 50);\n\tloadIntConfig(L, FORGE_COST_ONE_SLIVER, \"forgeCostOneSliver\", 20);\n\tloadIntConfig(L, FORGE_FIENDISH_CREATURES_LIMIT, \"forgeFiendishLimit\", 3);\n\tloadIntConfig(L, FORGE_FUSION_DUST_COST, \"forgeFusionDustCost\", 100);\n\tloadIntConfig(L, FORGE_INFLUENCED_CREATURES_LIMIT, \"forgeInfluencedLimit\", 300);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce32d43a4e737e6f90d7e9e4724ef0e9bb3ba8a3052bf55e2522097c816d7907" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 238, + "startColumn": 2, + "charOffset": 14627, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 236, + "startColumn": 2, + "charOffset": 14482, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_COST_ONE_SLIVER, \"forgeCostOneSliver\", 20);\n\tloadIntConfig(L, FORGE_FIENDISH_CREATURES_LIMIT, \"forgeFiendishLimit\", 3);\n\tloadIntConfig(L, FORGE_FUSION_DUST_COST, \"forgeFusionDustCost\", 100);\n\tloadIntConfig(L, FORGE_INFLUENCED_CREATURES_LIMIT, \"forgeInfluencedLimit\", 300);\n\tloadIntConfig(L, FORGE_MAX_DUST, \"forgeMaxDust\", 225);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9af517a2c1e42126063f307879737d568f2f773d178d3162db688b0e7aec08f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 238, + "startColumn": 66, + "charOffset": 14691, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 236, + "startColumn": 66, + "charOffset": 14482, + "charLength": 3, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_COST_ONE_SLIVER, \"forgeCostOneSliver\", 20);\n\tloadIntConfig(L, FORGE_FIENDISH_CREATURES_LIMIT, \"forgeFiendishLimit\", 3);\n\tloadIntConfig(L, FORGE_FUSION_DUST_COST, \"forgeFusionDustCost\", 100);\n\tloadIntConfig(L, FORGE_INFLUENCED_CREATURES_LIMIT, \"forgeInfluencedLimit\", 300);\n\tloadIntConfig(L, FORGE_MAX_DUST, \"forgeMaxDust\", 225);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f53f2be3b9521af720337b03a58b02f25f56067e9383c23506af7b80c498ffe6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 239, + "startColumn": 2, + "charOffset": 14698, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 237, + "startColumn": 2, + "charOffset": 14550, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_FIENDISH_CREATURES_LIMIT, \"forgeFiendishLimit\", 3);\n\tloadIntConfig(L, FORGE_FUSION_DUST_COST, \"forgeFusionDustCost\", 100);\n\tloadIntConfig(L, FORGE_INFLUENCED_CREATURES_LIMIT, \"forgeInfluencedLimit\", 300);\n\tloadIntConfig(L, FORGE_MAX_DUST, \"forgeMaxDust\", 225);\n\tloadIntConfig(L, FORGE_MAX_ITEM_TIER, \"forgeMaxItemTier\", 10);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ec7643edbae41e2667f8c1f484de1261e070924380b3915cde1f6ff145f27bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 239, + "startColumn": 77, + "charOffset": 14773, + "charLength": 3, + "snippet": { + "text": "300" + } + }, + "contextRegion": { + "startLine": 237, + "startColumn": 77, + "charOffset": 14550, + "charLength": 3, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_FIENDISH_CREATURES_LIMIT, \"forgeFiendishLimit\", 3);\n\tloadIntConfig(L, FORGE_FUSION_DUST_COST, \"forgeFusionDustCost\", 100);\n\tloadIntConfig(L, FORGE_INFLUENCED_CREATURES_LIMIT, \"forgeInfluencedLimit\", 300);\n\tloadIntConfig(L, FORGE_MAX_DUST, \"forgeMaxDust\", 225);\n\tloadIntConfig(L, FORGE_MAX_ITEM_TIER, \"forgeMaxItemTier\", 10);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "746f4b1859b861bc3de8743b3878e069b5eb4ae7bc029beb68d55f9d67996ee7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 240, + "startColumn": 2, + "charOffset": 14780, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 238, + "startColumn": 2, + "charOffset": 14626, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_FUSION_DUST_COST, \"forgeFusionDustCost\", 100);\n\tloadIntConfig(L, FORGE_INFLUENCED_CREATURES_LIMIT, \"forgeInfluencedLimit\", 300);\n\tloadIntConfig(L, FORGE_MAX_DUST, \"forgeMaxDust\", 225);\n\tloadIntConfig(L, FORGE_MAX_ITEM_TIER, \"forgeMaxItemTier\", 10);\n\tloadIntConfig(L, FORGE_MAX_SLIVERS, \"forgeMaxSlivers\", 7);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eda2edf351f3b84c614628a9b5e97ef9a1cfacc6c95595c9ae5771f569b23ac5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "225 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 240, + "startColumn": 51, + "charOffset": 14829, + "charLength": 3, + "snippet": { + "text": "225" + } + }, + "contextRegion": { + "startLine": 238, + "startColumn": 51, + "charOffset": 14626, + "charLength": 3, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_FUSION_DUST_COST, \"forgeFusionDustCost\", 100);\n\tloadIntConfig(L, FORGE_INFLUENCED_CREATURES_LIMIT, \"forgeInfluencedLimit\", 300);\n\tloadIntConfig(L, FORGE_MAX_DUST, \"forgeMaxDust\", 225);\n\tloadIntConfig(L, FORGE_MAX_ITEM_TIER, \"forgeMaxItemTier\", 10);\n\tloadIntConfig(L, FORGE_MAX_SLIVERS, \"forgeMaxSlivers\", 7);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa2f59215e6234d8c3933c9cf93c59ab8600dfbe093d339d9b9509b430725702" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 241, + "startColumn": 2, + "charOffset": 14836, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 239, + "startColumn": 2, + "charOffset": 14697, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_INFLUENCED_CREATURES_LIMIT, \"forgeInfluencedLimit\", 300);\n\tloadIntConfig(L, FORGE_MAX_DUST, \"forgeMaxDust\", 225);\n\tloadIntConfig(L, FORGE_MAX_ITEM_TIER, \"forgeMaxItemTier\", 10);\n\tloadIntConfig(L, FORGE_MAX_SLIVERS, \"forgeMaxSlivers\", 7);\n\tloadIntConfig(L, FORGE_MIN_SLIVERS, \"forgeMinSlivers\", 3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6444eb795e83f045c308b18f74dce71d3bc456d7dc68183592de11b8532e992" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 241, + "startColumn": 60, + "charOffset": 14894, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 239, + "startColumn": 60, + "charOffset": 14697, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_INFLUENCED_CREATURES_LIMIT, \"forgeInfluencedLimit\", 300);\n\tloadIntConfig(L, FORGE_MAX_DUST, \"forgeMaxDust\", 225);\n\tloadIntConfig(L, FORGE_MAX_ITEM_TIER, \"forgeMaxItemTier\", 10);\n\tloadIntConfig(L, FORGE_MAX_SLIVERS, \"forgeMaxSlivers\", 7);\n\tloadIntConfig(L, FORGE_MIN_SLIVERS, \"forgeMinSlivers\", 3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "825195a9eeddfc4205279da65493f72d2259c6812331a20ca5cff42e1da69ad6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 2, + "charOffset": 14900, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 2, + "charOffset": 14779, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_MAX_DUST, \"forgeMaxDust\", 225);\n\tloadIntConfig(L, FORGE_MAX_ITEM_TIER, \"forgeMaxItemTier\", 10);\n\tloadIntConfig(L, FORGE_MAX_SLIVERS, \"forgeMaxSlivers\", 7);\n\tloadIntConfig(L, FORGE_MIN_SLIVERS, \"forgeMinSlivers\", 3);\n\tloadIntConfig(L, FORGE_SLIVER_AMOUNT, \"forgeSliverAmount\", 3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c00e57cee39b612b4948428f789e2ee072edd5f69a5bafca727658adce9e7ddc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 57, + "charOffset": 14955, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 57, + "charOffset": 14779, + "charLength": 1, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_MAX_DUST, \"forgeMaxDust\", 225);\n\tloadIntConfig(L, FORGE_MAX_ITEM_TIER, \"forgeMaxItemTier\", 10);\n\tloadIntConfig(L, FORGE_MAX_SLIVERS, \"forgeMaxSlivers\", 7);\n\tloadIntConfig(L, FORGE_MIN_SLIVERS, \"forgeMinSlivers\", 3);\n\tloadIntConfig(L, FORGE_SLIVER_AMOUNT, \"forgeSliverAmount\", 3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b91c7cb84fa7bcd79d9b2e9a9622593ccd496912ca0ac31b279039bef2ea341" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 243, + "startColumn": 2, + "charOffset": 14960, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 2, + "charOffset": 14835, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_MAX_ITEM_TIER, \"forgeMaxItemTier\", 10);\n\tloadIntConfig(L, FORGE_MAX_SLIVERS, \"forgeMaxSlivers\", 7);\n\tloadIntConfig(L, FORGE_MIN_SLIVERS, \"forgeMinSlivers\", 3);\n\tloadIntConfig(L, FORGE_SLIVER_AMOUNT, \"forgeSliverAmount\", 3);\n\tloadIntConfig(L, FORGE_TIER_LOSS_REDUCTION, \"forgeTierLossReduction\", 50);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3aa074b02e8d7fd3485d9f08d02e23d70e178f0fe7bf459107b4f816ced0fb78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 244, + "startColumn": 2, + "charOffset": 15020, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 2, + "charOffset": 14899, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_MAX_SLIVERS, \"forgeMaxSlivers\", 7);\n\tloadIntConfig(L, FORGE_MIN_SLIVERS, \"forgeMinSlivers\", 3);\n\tloadIntConfig(L, FORGE_SLIVER_AMOUNT, \"forgeSliverAmount\", 3);\n\tloadIntConfig(L, FORGE_TIER_LOSS_REDUCTION, \"forgeTierLossReduction\", 50);\n\tloadIntConfig(L, FORGE_TRANSFER_DUST_COST, \"forgeTransferDustCost\", 100);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29c051cb504713fb638babc8f3d68327750db3070549ccc2b7642aeb443c5e84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 245, + "startColumn": 2, + "charOffset": 15084, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 243, + "startColumn": 2, + "charOffset": 14959, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_MIN_SLIVERS, \"forgeMinSlivers\", 3);\n\tloadIntConfig(L, FORGE_SLIVER_AMOUNT, \"forgeSliverAmount\", 3);\n\tloadIntConfig(L, FORGE_TIER_LOSS_REDUCTION, \"forgeTierLossReduction\", 50);\n\tloadIntConfig(L, FORGE_TRANSFER_DUST_COST, \"forgeTransferDustCost\", 100);\n\tloadIntConfig(L, FRAG_TIME, \"timeToDecreaseFrags\", 24 * 60 * 60 * 1000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4936aaf8f9cff6596d73984516d1653f832b7ee857bfecdaef8d7b8fde133632" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 245, + "startColumn": 72, + "charOffset": 15154, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 243, + "startColumn": 72, + "charOffset": 14959, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_MIN_SLIVERS, \"forgeMinSlivers\", 3);\n\tloadIntConfig(L, FORGE_SLIVER_AMOUNT, \"forgeSliverAmount\", 3);\n\tloadIntConfig(L, FORGE_TIER_LOSS_REDUCTION, \"forgeTierLossReduction\", 50);\n\tloadIntConfig(L, FORGE_TRANSFER_DUST_COST, \"forgeTransferDustCost\", 100);\n\tloadIntConfig(L, FRAG_TIME, \"timeToDecreaseFrags\", 24 * 60 * 60 * 1000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40bdd5c13cb67c2049401d0257cf7f20fe7581c91c8f4ad4fa56ee54b8388d03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 246, + "startColumn": 2, + "charOffset": 15160, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 244, + "startColumn": 2, + "charOffset": 15019, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_SLIVER_AMOUNT, \"forgeSliverAmount\", 3);\n\tloadIntConfig(L, FORGE_TIER_LOSS_REDUCTION, \"forgeTierLossReduction\", 50);\n\tloadIntConfig(L, FORGE_TRANSFER_DUST_COST, \"forgeTransferDustCost\", 100);\n\tloadIntConfig(L, FRAG_TIME, \"timeToDecreaseFrags\", 24 * 60 * 60 * 1000);\n\tloadIntConfig(L, FREE_QUEST_STAGE, \"freeQuestStage\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42838ab67062d894a956167bca684d8ae5ec53bb1d12becdffbf4e39966071bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 246, + "startColumn": 70, + "charOffset": 15228, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 244, + "startColumn": 70, + "charOffset": 15019, + "charLength": 3, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_SLIVER_AMOUNT, \"forgeSliverAmount\", 3);\n\tloadIntConfig(L, FORGE_TIER_LOSS_REDUCTION, \"forgeTierLossReduction\", 50);\n\tloadIntConfig(L, FORGE_TRANSFER_DUST_COST, \"forgeTransferDustCost\", 100);\n\tloadIntConfig(L, FRAG_TIME, \"timeToDecreaseFrags\", 24 * 60 * 60 * 1000);\n\tloadIntConfig(L, FREE_QUEST_STAGE, \"freeQuestStage\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23a7a991f130c9d0c7e0cb499de4a17bf9c762292b30853c8efb0b7f2d579f23" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 247, + "startColumn": 2, + "charOffset": 15235, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 245, + "startColumn": 2, + "charOffset": 15083, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_TIER_LOSS_REDUCTION, \"forgeTierLossReduction\", 50);\n\tloadIntConfig(L, FORGE_TRANSFER_DUST_COST, \"forgeTransferDustCost\", 100);\n\tloadIntConfig(L, FRAG_TIME, \"timeToDecreaseFrags\", 24 * 60 * 60 * 1000);\n\tloadIntConfig(L, FREE_QUEST_STAGE, \"freeQuestStage\", 1);\n\tloadIntConfig(L, GLOBAL_SERVER_SAVE_NOTIFY_DURATION, \"globalServerSaveNotifyDuration\", 5);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92927868be24b5c84692345f870bbf991d8366af18ac9a83b22b87ce4f4be579" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 247, + "startColumn": 53, + "charOffset": 15286, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 245, + "startColumn": 53, + "charOffset": 15083, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_TIER_LOSS_REDUCTION, \"forgeTierLossReduction\", 50);\n\tloadIntConfig(L, FORGE_TRANSFER_DUST_COST, \"forgeTransferDustCost\", 100);\n\tloadIntConfig(L, FRAG_TIME, \"timeToDecreaseFrags\", 24 * 60 * 60 * 1000);\n\tloadIntConfig(L, FREE_QUEST_STAGE, \"freeQuestStage\", 1);\n\tloadIntConfig(L, GLOBAL_SERVER_SAVE_NOTIFY_DURATION, \"globalServerSaveNotifyDuration\", 5);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "630ca2537fa595ec99dfeba333bd9a02beffa8666c95c667334c96ef1313dcc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 247, + "startColumn": 58, + "charOffset": 15291, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 245, + "startColumn": 58, + "charOffset": 15083, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_TIER_LOSS_REDUCTION, \"forgeTierLossReduction\", 50);\n\tloadIntConfig(L, FORGE_TRANSFER_DUST_COST, \"forgeTransferDustCost\", 100);\n\tloadIntConfig(L, FRAG_TIME, \"timeToDecreaseFrags\", 24 * 60 * 60 * 1000);\n\tloadIntConfig(L, FREE_QUEST_STAGE, \"freeQuestStage\", 1);\n\tloadIntConfig(L, GLOBAL_SERVER_SAVE_NOTIFY_DURATION, \"globalServerSaveNotifyDuration\", 5);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af2ac0b837739ae9d885f08725f24db9f2029dc099db9e507c1f1c065c74303b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 247, + "startColumn": 63, + "charOffset": 15296, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 245, + "startColumn": 63, + "charOffset": 15083, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_TIER_LOSS_REDUCTION, \"forgeTierLossReduction\", 50);\n\tloadIntConfig(L, FORGE_TRANSFER_DUST_COST, \"forgeTransferDustCost\", 100);\n\tloadIntConfig(L, FRAG_TIME, \"timeToDecreaseFrags\", 24 * 60 * 60 * 1000);\n\tloadIntConfig(L, FREE_QUEST_STAGE, \"freeQuestStage\", 1);\n\tloadIntConfig(L, GLOBAL_SERVER_SAVE_NOTIFY_DURATION, \"globalServerSaveNotifyDuration\", 5);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "928d10ce85bb9ec2f6945421469518093aef0eb060bf8511da36c3eb21c84574" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 247, + "startColumn": 68, + "charOffset": 15301, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 245, + "startColumn": 68, + "charOffset": 15083, + "charLength": 4, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_TIER_LOSS_REDUCTION, \"forgeTierLossReduction\", 50);\n\tloadIntConfig(L, FORGE_TRANSFER_DUST_COST, \"forgeTransferDustCost\", 100);\n\tloadIntConfig(L, FRAG_TIME, \"timeToDecreaseFrags\", 24 * 60 * 60 * 1000);\n\tloadIntConfig(L, FREE_QUEST_STAGE, \"freeQuestStage\", 1);\n\tloadIntConfig(L, GLOBAL_SERVER_SAVE_NOTIFY_DURATION, \"globalServerSaveNotifyDuration\", 5);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b35b6d98392b87117b94325d0853d778a01495b4a8444cc39a25b1232b69dae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 248, + "startColumn": 2, + "charOffset": 15309, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 246, + "startColumn": 2, + "charOffset": 15159, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, FORGE_TRANSFER_DUST_COST, \"forgeTransferDustCost\", 100);\n\tloadIntConfig(L, FRAG_TIME, \"timeToDecreaseFrags\", 24 * 60 * 60 * 1000);\n\tloadIntConfig(L, FREE_QUEST_STAGE, \"freeQuestStage\", 1);\n\tloadIntConfig(L, GLOBAL_SERVER_SAVE_NOTIFY_DURATION, \"globalServerSaveNotifyDuration\", 5);\n\tloadIntConfig(L, HAZARD_CRITICAL_CHANCE, \"hazardCriticalChance\", 750);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21a1815c3339b3a17ad23666580b9262004160d1544b514e7f8429a9a4851f5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 249, + "startColumn": 2, + "charOffset": 15367, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 247, + "startColumn": 2, + "charOffset": 15234, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, FRAG_TIME, \"timeToDecreaseFrags\", 24 * 60 * 60 * 1000);\n\tloadIntConfig(L, FREE_QUEST_STAGE, \"freeQuestStage\", 1);\n\tloadIntConfig(L, GLOBAL_SERVER_SAVE_NOTIFY_DURATION, \"globalServerSaveNotifyDuration\", 5);\n\tloadIntConfig(L, HAZARD_CRITICAL_CHANCE, \"hazardCriticalChance\", 750);\n\tloadIntConfig(L, HAZARD_CRITICAL_INTERVAL, \"hazardCriticalInterval\", 2000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b9db25e7beba269308a5cbbdef778dd4485c40a4a0178b972cb3c02b13af25a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 249, + "startColumn": 89, + "charOffset": 15454, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 247, + "startColumn": 89, + "charOffset": 15234, + "charLength": 1, + "snippet": { + "text": "\tloadIntConfig(L, FRAG_TIME, \"timeToDecreaseFrags\", 24 * 60 * 60 * 1000);\n\tloadIntConfig(L, FREE_QUEST_STAGE, \"freeQuestStage\", 1);\n\tloadIntConfig(L, GLOBAL_SERVER_SAVE_NOTIFY_DURATION, \"globalServerSaveNotifyDuration\", 5);\n\tloadIntConfig(L, HAZARD_CRITICAL_CHANCE, \"hazardCriticalChance\", 750);\n\tloadIntConfig(L, HAZARD_CRITICAL_INTERVAL, \"hazardCriticalInterval\", 2000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9146e282a9b696f9c273e8c634a9a99f51862469671c0ee85b7007ae7315800b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 250, + "startColumn": 2, + "charOffset": 15459, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 248, + "startColumn": 2, + "charOffset": 15308, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, FREE_QUEST_STAGE, \"freeQuestStage\", 1);\n\tloadIntConfig(L, GLOBAL_SERVER_SAVE_NOTIFY_DURATION, \"globalServerSaveNotifyDuration\", 5);\n\tloadIntConfig(L, HAZARD_CRITICAL_CHANCE, \"hazardCriticalChance\", 750);\n\tloadIntConfig(L, HAZARD_CRITICAL_INTERVAL, \"hazardCriticalInterval\", 2000);\n\tloadIntConfig(L, HAZARD_CRITICAL_MULTIPLIER, \"hazardCriticalMultiplier\", 25);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27fc9ee365c3e63ead3baf816f595ac162a7c6d12d48619214499f39b13731e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "750 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 250, + "startColumn": 67, + "charOffset": 15524, + "charLength": 3, + "snippet": { + "text": "750" + } + }, + "contextRegion": { + "startLine": 248, + "startColumn": 67, + "charOffset": 15308, + "charLength": 3, + "snippet": { + "text": "\tloadIntConfig(L, FREE_QUEST_STAGE, \"freeQuestStage\", 1);\n\tloadIntConfig(L, GLOBAL_SERVER_SAVE_NOTIFY_DURATION, \"globalServerSaveNotifyDuration\", 5);\n\tloadIntConfig(L, HAZARD_CRITICAL_CHANCE, \"hazardCriticalChance\", 750);\n\tloadIntConfig(L, HAZARD_CRITICAL_INTERVAL, \"hazardCriticalInterval\", 2000);\n\tloadIntConfig(L, HAZARD_CRITICAL_MULTIPLIER, \"hazardCriticalMultiplier\", 25);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5cc12d3902385cab07fae3517c28bbbc2e9e11253eb7cfb8e902b3caf4efdeb6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 251, + "startColumn": 2, + "charOffset": 15531, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 249, + "startColumn": 2, + "charOffset": 15366, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, GLOBAL_SERVER_SAVE_NOTIFY_DURATION, \"globalServerSaveNotifyDuration\", 5);\n\tloadIntConfig(L, HAZARD_CRITICAL_CHANCE, \"hazardCriticalChance\", 750);\n\tloadIntConfig(L, HAZARD_CRITICAL_INTERVAL, \"hazardCriticalInterval\", 2000);\n\tloadIntConfig(L, HAZARD_CRITICAL_MULTIPLIER, \"hazardCriticalMultiplier\", 25);\n\tloadIntConfig(L, HAZARD_DAMAGE_MULTIPLIER, \"hazardDamageMultiplier\", 200);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbebbfb8bb970999de75078db2d51ac8fb36306848ae7d94ebe819dcfb4af3cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 251, + "startColumn": 71, + "charOffset": 15600, + "charLength": 4, + "snippet": { + "text": "2000" + } + }, + "contextRegion": { + "startLine": 249, + "startColumn": 71, + "charOffset": 15366, + "charLength": 4, + "snippet": { + "text": "\tloadIntConfig(L, GLOBAL_SERVER_SAVE_NOTIFY_DURATION, \"globalServerSaveNotifyDuration\", 5);\n\tloadIntConfig(L, HAZARD_CRITICAL_CHANCE, \"hazardCriticalChance\", 750);\n\tloadIntConfig(L, HAZARD_CRITICAL_INTERVAL, \"hazardCriticalInterval\", 2000);\n\tloadIntConfig(L, HAZARD_CRITICAL_MULTIPLIER, \"hazardCriticalMultiplier\", 25);\n\tloadIntConfig(L, HAZARD_DAMAGE_MULTIPLIER, \"hazardDamageMultiplier\", 200);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cff1200c011001efe198b374cf32e5d676316be98fdaee8e58934395b527c429" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 252, + "startColumn": 2, + "charOffset": 15608, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 250, + "startColumn": 2, + "charOffset": 15458, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, HAZARD_CRITICAL_CHANCE, \"hazardCriticalChance\", 750);\n\tloadIntConfig(L, HAZARD_CRITICAL_INTERVAL, \"hazardCriticalInterval\", 2000);\n\tloadIntConfig(L, HAZARD_CRITICAL_MULTIPLIER, \"hazardCriticalMultiplier\", 25);\n\tloadIntConfig(L, HAZARD_DAMAGE_MULTIPLIER, \"hazardDamageMultiplier\", 200);\n\tloadIntConfig(L, HAZARD_DEFENSE_MULTIPLIER, \"hazardDefenseMultiplier\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5316d4e725e225a67f484316bfaa90d9a011f170edb6c82bad98a5dbaaef7233" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 252, + "startColumn": 75, + "charOffset": 15681, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 250, + "startColumn": 75, + "charOffset": 15458, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, HAZARD_CRITICAL_CHANCE, \"hazardCriticalChance\", 750);\n\tloadIntConfig(L, HAZARD_CRITICAL_INTERVAL, \"hazardCriticalInterval\", 2000);\n\tloadIntConfig(L, HAZARD_CRITICAL_MULTIPLIER, \"hazardCriticalMultiplier\", 25);\n\tloadIntConfig(L, HAZARD_DAMAGE_MULTIPLIER, \"hazardDamageMultiplier\", 200);\n\tloadIntConfig(L, HAZARD_DEFENSE_MULTIPLIER, \"hazardDefenseMultiplier\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "033570f69ae84612c696730e75c06b3bdc6dc7c397dd3fc14ab96c6197140a46" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 253, + "startColumn": 2, + "charOffset": 15687, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 251, + "startColumn": 2, + "charOffset": 15530, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, HAZARD_CRITICAL_INTERVAL, \"hazardCriticalInterval\", 2000);\n\tloadIntConfig(L, HAZARD_CRITICAL_MULTIPLIER, \"hazardCriticalMultiplier\", 25);\n\tloadIntConfig(L, HAZARD_DAMAGE_MULTIPLIER, \"hazardDamageMultiplier\", 200);\n\tloadIntConfig(L, HAZARD_DEFENSE_MULTIPLIER, \"hazardDefenseMultiplier\", 0);\n\tloadIntConfig(L, HAZARD_DODGE_MULTIPLIER, \"hazardDodgeMultiplier\", 85);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04698fbfad560a91f42d618868f61374bc21bbb195752172916570cc77641e10" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 253, + "startColumn": 71, + "charOffset": 15756, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 251, + "startColumn": 71, + "charOffset": 15530, + "charLength": 3, + "snippet": { + "text": "\tloadIntConfig(L, HAZARD_CRITICAL_INTERVAL, \"hazardCriticalInterval\", 2000);\n\tloadIntConfig(L, HAZARD_CRITICAL_MULTIPLIER, \"hazardCriticalMultiplier\", 25);\n\tloadIntConfig(L, HAZARD_DAMAGE_MULTIPLIER, \"hazardDamageMultiplier\", 200);\n\tloadIntConfig(L, HAZARD_DEFENSE_MULTIPLIER, \"hazardDefenseMultiplier\", 0);\n\tloadIntConfig(L, HAZARD_DODGE_MULTIPLIER, \"hazardDodgeMultiplier\", 85);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22890e10d39510baadf89344fc0a55a51d45eafd9cbb309b0ca92b159d3e58ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 254, + "startColumn": 2, + "charOffset": 15763, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 2, + "charOffset": 15607, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, HAZARD_CRITICAL_MULTIPLIER, \"hazardCriticalMultiplier\", 25);\n\tloadIntConfig(L, HAZARD_DAMAGE_MULTIPLIER, \"hazardDamageMultiplier\", 200);\n\tloadIntConfig(L, HAZARD_DEFENSE_MULTIPLIER, \"hazardDefenseMultiplier\", 0);\n\tloadIntConfig(L, HAZARD_DODGE_MULTIPLIER, \"hazardDodgeMultiplier\", 85);\n\tloadIntConfig(L, HAZARD_LOOT_BONUS_MULTIPLIER, \"hazardLootBonusMultiplier\", 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "953e072b8a61f9921b76721a509972fada0ce64581c8efed7b6232f6c32fd4c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 255, + "startColumn": 2, + "charOffset": 15839, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 253, + "startColumn": 2, + "charOffset": 15686, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, HAZARD_DAMAGE_MULTIPLIER, \"hazardDamageMultiplier\", 200);\n\tloadIntConfig(L, HAZARD_DEFENSE_MULTIPLIER, \"hazardDefenseMultiplier\", 0);\n\tloadIntConfig(L, HAZARD_DODGE_MULTIPLIER, \"hazardDodgeMultiplier\", 85);\n\tloadIntConfig(L, HAZARD_LOOT_BONUS_MULTIPLIER, \"hazardLootBonusMultiplier\", 2);\n\tloadIntConfig(L, HAZARD_PODS_DAMAGE, \"hazardPodsDamage\", 5);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00af8f77ee31ecc18ea47b24cf608f38aa07b6f79f613ad761ec8180f87c4c34" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "85 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 255, + "startColumn": 69, + "charOffset": 15906, + "charLength": 2, + "snippet": { + "text": "85" + } + }, + "contextRegion": { + "startLine": 253, + "startColumn": 69, + "charOffset": 15686, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, HAZARD_DAMAGE_MULTIPLIER, \"hazardDamageMultiplier\", 200);\n\tloadIntConfig(L, HAZARD_DEFENSE_MULTIPLIER, \"hazardDefenseMultiplier\", 0);\n\tloadIntConfig(L, HAZARD_DODGE_MULTIPLIER, \"hazardDodgeMultiplier\", 85);\n\tloadIntConfig(L, HAZARD_LOOT_BONUS_MULTIPLIER, \"hazardLootBonusMultiplier\", 2);\n\tloadIntConfig(L, HAZARD_PODS_DAMAGE, \"hazardPodsDamage\", 5);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e90b271b7081dea17082a3da9a5c2f1a0b1ef5b3d4f390f4e97c84a69a49cab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 256, + "startColumn": 2, + "charOffset": 15912, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 254, + "startColumn": 2, + "charOffset": 15762, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, HAZARD_DEFENSE_MULTIPLIER, \"hazardDefenseMultiplier\", 0);\n\tloadIntConfig(L, HAZARD_DODGE_MULTIPLIER, \"hazardDodgeMultiplier\", 85);\n\tloadIntConfig(L, HAZARD_LOOT_BONUS_MULTIPLIER, \"hazardLootBonusMultiplier\", 2);\n\tloadIntConfig(L, HAZARD_PODS_DAMAGE, \"hazardPodsDamage\", 5);\n\tloadIntConfig(L, HAZARD_PODS_DROP_MULTIPLIER, \"hazardPodsDropMultiplier\", 87);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c461b4313b3989ae8fcf64d51fae7f2b9e0bbfbb1cc69c7a9aef31b0eeb9415" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 257, + "startColumn": 2, + "charOffset": 15993, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 255, + "startColumn": 2, + "charOffset": 15838, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, HAZARD_DODGE_MULTIPLIER, \"hazardDodgeMultiplier\", 85);\n\tloadIntConfig(L, HAZARD_LOOT_BONUS_MULTIPLIER, \"hazardLootBonusMultiplier\", 2);\n\tloadIntConfig(L, HAZARD_PODS_DAMAGE, \"hazardPodsDamage\", 5);\n\tloadIntConfig(L, HAZARD_PODS_DROP_MULTIPLIER, \"hazardPodsDropMultiplier\", 87);\n\tloadIntConfig(L, HAZARD_PODS_TIME_TO_DAMAGE, \"hazardPodsTimeToDamage\", 2000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70c8196caae6b0c1c638466315341d7dd0e8f2b99ff8eff720786eaa3b131fd5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 257, + "startColumn": 59, + "charOffset": 16050, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 255, + "startColumn": 59, + "charOffset": 15838, + "charLength": 1, + "snippet": { + "text": "\tloadIntConfig(L, HAZARD_DODGE_MULTIPLIER, \"hazardDodgeMultiplier\", 85);\n\tloadIntConfig(L, HAZARD_LOOT_BONUS_MULTIPLIER, \"hazardLootBonusMultiplier\", 2);\n\tloadIntConfig(L, HAZARD_PODS_DAMAGE, \"hazardPodsDamage\", 5);\n\tloadIntConfig(L, HAZARD_PODS_DROP_MULTIPLIER, \"hazardPodsDropMultiplier\", 87);\n\tloadIntConfig(L, HAZARD_PODS_TIME_TO_DAMAGE, \"hazardPodsTimeToDamage\", 2000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ded7e079e29b9ec4b916f8754e30f85f95559fc06b7eee51b9be4b70597c4a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 258, + "startColumn": 2, + "charOffset": 16055, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 256, + "startColumn": 2, + "charOffset": 15911, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, HAZARD_LOOT_BONUS_MULTIPLIER, \"hazardLootBonusMultiplier\", 2);\n\tloadIntConfig(L, HAZARD_PODS_DAMAGE, \"hazardPodsDamage\", 5);\n\tloadIntConfig(L, HAZARD_PODS_DROP_MULTIPLIER, \"hazardPodsDropMultiplier\", 87);\n\tloadIntConfig(L, HAZARD_PODS_TIME_TO_DAMAGE, \"hazardPodsTimeToDamage\", 2000);\n\tloadIntConfig(L, HAZARD_PODS_TIME_TO_SPAWN, \"hazardPodsTimeToSpawn\", 4000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca9f7a1d517e56c428792b877bce70dbd6794918af707f29030e4b50b11d5e23" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "87 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 258, + "startColumn": 76, + "charOffset": 16129, + "charLength": 2, + "snippet": { + "text": "87" + } + }, + "contextRegion": { + "startLine": 256, + "startColumn": 76, + "charOffset": 15911, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, HAZARD_LOOT_BONUS_MULTIPLIER, \"hazardLootBonusMultiplier\", 2);\n\tloadIntConfig(L, HAZARD_PODS_DAMAGE, \"hazardPodsDamage\", 5);\n\tloadIntConfig(L, HAZARD_PODS_DROP_MULTIPLIER, \"hazardPodsDropMultiplier\", 87);\n\tloadIntConfig(L, HAZARD_PODS_TIME_TO_DAMAGE, \"hazardPodsTimeToDamage\", 2000);\n\tloadIntConfig(L, HAZARD_PODS_TIME_TO_SPAWN, \"hazardPodsTimeToSpawn\", 4000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec0c3a2283e449b7d2fd9e4d2e6c8c5b257eef97123658bb4670dafc5bc6c3ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 259, + "startColumn": 2, + "charOffset": 16135, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 257, + "startColumn": 2, + "charOffset": 15992, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, HAZARD_PODS_DAMAGE, \"hazardPodsDamage\", 5);\n\tloadIntConfig(L, HAZARD_PODS_DROP_MULTIPLIER, \"hazardPodsDropMultiplier\", 87);\n\tloadIntConfig(L, HAZARD_PODS_TIME_TO_DAMAGE, \"hazardPodsTimeToDamage\", 2000);\n\tloadIntConfig(L, HAZARD_PODS_TIME_TO_SPAWN, \"hazardPodsTimeToSpawn\", 4000);\n\tloadIntConfig(L, HAZARD_SPAWN_PLUNDER_MULTIPLIER, \"hazardSpawnPlunderMultiplier\", 25);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b9db25e7beba269308a5cbbdef778dd4485c40a4a0178b972cb3c02b13af25a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 259, + "startColumn": 73, + "charOffset": 16206, + "charLength": 4, + "snippet": { + "text": "2000" + } + }, + "contextRegion": { + "startLine": 257, + "startColumn": 73, + "charOffset": 15992, + "charLength": 4, + "snippet": { + "text": "\tloadIntConfig(L, HAZARD_PODS_DAMAGE, \"hazardPodsDamage\", 5);\n\tloadIntConfig(L, HAZARD_PODS_DROP_MULTIPLIER, \"hazardPodsDropMultiplier\", 87);\n\tloadIntConfig(L, HAZARD_PODS_TIME_TO_DAMAGE, \"hazardPodsTimeToDamage\", 2000);\n\tloadIntConfig(L, HAZARD_PODS_TIME_TO_SPAWN, \"hazardPodsTimeToSpawn\", 4000);\n\tloadIntConfig(L, HAZARD_SPAWN_PLUNDER_MULTIPLIER, \"hazardSpawnPlunderMultiplier\", 25);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7aadc407d057aadda9c362cf3e8cbebcbf095f26285a3e6d2766036e0e2a7d4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 260, + "startColumn": 2, + "charOffset": 16214, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 258, + "startColumn": 2, + "charOffset": 16054, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, HAZARD_PODS_DROP_MULTIPLIER, \"hazardPodsDropMultiplier\", 87);\n\tloadIntConfig(L, HAZARD_PODS_TIME_TO_DAMAGE, \"hazardPodsTimeToDamage\", 2000);\n\tloadIntConfig(L, HAZARD_PODS_TIME_TO_SPAWN, \"hazardPodsTimeToSpawn\", 4000);\n\tloadIntConfig(L, HAZARD_SPAWN_PLUNDER_MULTIPLIER, \"hazardSpawnPlunderMultiplier\", 25);\n\tloadIntConfig(L, HOUSE_BUY_LEVEL, \"houseBuyLevel\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "57641f56278e7c1a3b2420e41142102f4fc9a6c1c71fc14dfa3981534099b375" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "4000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 260, + "startColumn": 71, + "charOffset": 16283, + "charLength": 4, + "snippet": { + "text": "4000" + } + }, + "contextRegion": { + "startLine": 258, + "startColumn": 71, + "charOffset": 16054, + "charLength": 4, + "snippet": { + "text": "\tloadIntConfig(L, HAZARD_PODS_DROP_MULTIPLIER, \"hazardPodsDropMultiplier\", 87);\n\tloadIntConfig(L, HAZARD_PODS_TIME_TO_DAMAGE, \"hazardPodsTimeToDamage\", 2000);\n\tloadIntConfig(L, HAZARD_PODS_TIME_TO_SPAWN, \"hazardPodsTimeToSpawn\", 4000);\n\tloadIntConfig(L, HAZARD_SPAWN_PLUNDER_MULTIPLIER, \"hazardSpawnPlunderMultiplier\", 25);\n\tloadIntConfig(L, HOUSE_BUY_LEVEL, \"houseBuyLevel\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0219900a58dba2795c47d3a137e43e5a71bf297836cd8b60755e16b9ccb77f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 261, + "startColumn": 2, + "charOffset": 16291, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 259, + "startColumn": 2, + "charOffset": 16134, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, HAZARD_PODS_TIME_TO_DAMAGE, \"hazardPodsTimeToDamage\", 2000);\n\tloadIntConfig(L, HAZARD_PODS_TIME_TO_SPAWN, \"hazardPodsTimeToSpawn\", 4000);\n\tloadIntConfig(L, HAZARD_SPAWN_PLUNDER_MULTIPLIER, \"hazardSpawnPlunderMultiplier\", 25);\n\tloadIntConfig(L, HOUSE_BUY_LEVEL, \"houseBuyLevel\", 0);\n\tloadIntConfig(L, HOUSE_LOSE_AFTER_INACTIVITY, \"houseLoseAfterInactivity\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b8ac4dd4812d17e4deee87e3a221a098d47a8cbe80d1677bb3896786d2ebd08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 261, + "startColumn": 84, + "charOffset": 16373, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 259, + "startColumn": 84, + "charOffset": 16134, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, HAZARD_PODS_TIME_TO_DAMAGE, \"hazardPodsTimeToDamage\", 2000);\n\tloadIntConfig(L, HAZARD_PODS_TIME_TO_SPAWN, \"hazardPodsTimeToSpawn\", 4000);\n\tloadIntConfig(L, HAZARD_SPAWN_PLUNDER_MULTIPLIER, \"hazardSpawnPlunderMultiplier\", 25);\n\tloadIntConfig(L, HOUSE_BUY_LEVEL, \"houseBuyLevel\", 0);\n\tloadIntConfig(L, HOUSE_LOSE_AFTER_INACTIVITY, \"houseLoseAfterInactivity\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70d04f297479b905679d2cff2ecb89bb85c25e71c64fe300c621d5dba8c0909c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 262, + "startColumn": 2, + "charOffset": 16379, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 260, + "startColumn": 2, + "charOffset": 16213, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, HAZARD_PODS_TIME_TO_SPAWN, \"hazardPodsTimeToSpawn\", 4000);\n\tloadIntConfig(L, HAZARD_SPAWN_PLUNDER_MULTIPLIER, \"hazardSpawnPlunderMultiplier\", 25);\n\tloadIntConfig(L, HOUSE_BUY_LEVEL, \"houseBuyLevel\", 0);\n\tloadIntConfig(L, HOUSE_LOSE_AFTER_INACTIVITY, \"houseLoseAfterInactivity\", 0);\n\tloadIntConfig(L, HOUSE_PRICE_PER_SQM, \"housePriceEachSQM\", 1000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "895bb57ae9fca9cca4ee43527340efb97ea06c99e6b247579f0adbf19266aa67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 263, + "startColumn": 2, + "charOffset": 16435, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 261, + "startColumn": 2, + "charOffset": 16290, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, HAZARD_SPAWN_PLUNDER_MULTIPLIER, \"hazardSpawnPlunderMultiplier\", 25);\n\tloadIntConfig(L, HOUSE_BUY_LEVEL, \"houseBuyLevel\", 0);\n\tloadIntConfig(L, HOUSE_LOSE_AFTER_INACTIVITY, \"houseLoseAfterInactivity\", 0);\n\tloadIntConfig(L, HOUSE_PRICE_PER_SQM, \"housePriceEachSQM\", 1000);\n\tloadIntConfig(L, KICK_AFTER_MINUTES, \"kickIdlePlayerAfterMinutes\", 15);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43cb3f911fa03c1e7a9cfbdb1d0369a724a6bde087778b42913fdf8f0be338d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 264, + "startColumn": 2, + "charOffset": 16514, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 262, + "startColumn": 2, + "charOffset": 16378, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, HOUSE_BUY_LEVEL, \"houseBuyLevel\", 0);\n\tloadIntConfig(L, HOUSE_LOSE_AFTER_INACTIVITY, \"houseLoseAfterInactivity\", 0);\n\tloadIntConfig(L, HOUSE_PRICE_PER_SQM, \"housePriceEachSQM\", 1000);\n\tloadIntConfig(L, KICK_AFTER_MINUTES, \"kickIdlePlayerAfterMinutes\", 15);\n\tloadIntConfig(L, LOOTPOUCH_MAXLIMIT, \"lootPouchMaxLimit\", 2000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb05d98274ce50e5b5678ac80bec8b7ef96bc95449ba578618d81d4d3ca4b6e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 264, + "startColumn": 61, + "charOffset": 16573, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 262, + "startColumn": 61, + "charOffset": 16378, + "charLength": 4, + "snippet": { + "text": "\tloadIntConfig(L, HOUSE_BUY_LEVEL, \"houseBuyLevel\", 0);\n\tloadIntConfig(L, HOUSE_LOSE_AFTER_INACTIVITY, \"houseLoseAfterInactivity\", 0);\n\tloadIntConfig(L, HOUSE_PRICE_PER_SQM, \"housePriceEachSQM\", 1000);\n\tloadIntConfig(L, KICK_AFTER_MINUTES, \"kickIdlePlayerAfterMinutes\", 15);\n\tloadIntConfig(L, LOOTPOUCH_MAXLIMIT, \"lootPouchMaxLimit\", 2000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af6f3b804f78612f8341d1ff09d7e25ab8eb51d5e0100c5f5669ce454da3c352" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 265, + "startColumn": 2, + "charOffset": 16581, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 263, + "startColumn": 2, + "charOffset": 16434, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, HOUSE_LOSE_AFTER_INACTIVITY, \"houseLoseAfterInactivity\", 0);\n\tloadIntConfig(L, HOUSE_PRICE_PER_SQM, \"housePriceEachSQM\", 1000);\n\tloadIntConfig(L, KICK_AFTER_MINUTES, \"kickIdlePlayerAfterMinutes\", 15);\n\tloadIntConfig(L, LOOTPOUCH_MAXLIMIT, \"lootPouchMaxLimit\", 2000);\n\tloadIntConfig(L, LOW_LEVEL_BONUS_EXP, \"lowLevelBonusExp\", 50);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "192ab2655b498a2175c450101a31f502152fbde054f146883b42d1f29d9c05a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "15 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 265, + "startColumn": 69, + "charOffset": 16648, + "charLength": 2, + "snippet": { + "text": "15" + } + }, + "contextRegion": { + "startLine": 263, + "startColumn": 69, + "charOffset": 16434, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, HOUSE_LOSE_AFTER_INACTIVITY, \"houseLoseAfterInactivity\", 0);\n\tloadIntConfig(L, HOUSE_PRICE_PER_SQM, \"housePriceEachSQM\", 1000);\n\tloadIntConfig(L, KICK_AFTER_MINUTES, \"kickIdlePlayerAfterMinutes\", 15);\n\tloadIntConfig(L, LOOTPOUCH_MAXLIMIT, \"lootPouchMaxLimit\", 2000);\n\tloadIntConfig(L, LOW_LEVEL_BONUS_EXP, \"lowLevelBonusExp\", 50);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ed75df399c1a812aa9aacf02ac6749453aa7321d5c9a867d6dae21ff115e7af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 266, + "startColumn": 2, + "charOffset": 16654, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 264, + "startColumn": 2, + "charOffset": 16513, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, HOUSE_PRICE_PER_SQM, \"housePriceEachSQM\", 1000);\n\tloadIntConfig(L, KICK_AFTER_MINUTES, \"kickIdlePlayerAfterMinutes\", 15);\n\tloadIntConfig(L, LOOTPOUCH_MAXLIMIT, \"lootPouchMaxLimit\", 2000);\n\tloadIntConfig(L, LOW_LEVEL_BONUS_EXP, \"lowLevelBonusExp\", 50);\n\tloadIntConfig(L, LOYALTY_POINTS_PER_CREATION_DAY, \"loyaltyPointsPerCreationDay\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "325042e60e07c22a118abb232dfdfaf5d4a60d9fb16ea7a22aee77f33a703b0f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 266, + "startColumn": 60, + "charOffset": 16712, + "charLength": 4, + "snippet": { + "text": "2000" + } + }, + "contextRegion": { + "startLine": 264, + "startColumn": 60, + "charOffset": 16513, + "charLength": 4, + "snippet": { + "text": "\tloadIntConfig(L, HOUSE_PRICE_PER_SQM, \"housePriceEachSQM\", 1000);\n\tloadIntConfig(L, KICK_AFTER_MINUTES, \"kickIdlePlayerAfterMinutes\", 15);\n\tloadIntConfig(L, LOOTPOUCH_MAXLIMIT, \"lootPouchMaxLimit\", 2000);\n\tloadIntConfig(L, LOW_LEVEL_BONUS_EXP, \"lowLevelBonusExp\", 50);\n\tloadIntConfig(L, LOYALTY_POINTS_PER_CREATION_DAY, \"loyaltyPointsPerCreationDay\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "57420b6da25d78aa32faa88275bde826034780735d04756e90d619595849ab36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 267, + "startColumn": 2, + "charOffset": 16720, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 265, + "startColumn": 2, + "charOffset": 16580, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, KICK_AFTER_MINUTES, \"kickIdlePlayerAfterMinutes\", 15);\n\tloadIntConfig(L, LOOTPOUCH_MAXLIMIT, \"lootPouchMaxLimit\", 2000);\n\tloadIntConfig(L, LOW_LEVEL_BONUS_EXP, \"lowLevelBonusExp\", 50);\n\tloadIntConfig(L, LOYALTY_POINTS_PER_CREATION_DAY, \"loyaltyPointsPerCreationDay\", 1);\n\tloadIntConfig(L, LOYALTY_POINTS_PER_PREMIUM_DAY_PURCHASED, \"loyaltyPointsPerPremiumDayPurchased\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8fcda7b31bfe08e3f994e0cbbcae40343804bc26b93781058ff9ef138c446b34" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 267, + "startColumn": 60, + "charOffset": 16778, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 265, + "startColumn": 60, + "charOffset": 16580, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, KICK_AFTER_MINUTES, \"kickIdlePlayerAfterMinutes\", 15);\n\tloadIntConfig(L, LOOTPOUCH_MAXLIMIT, \"lootPouchMaxLimit\", 2000);\n\tloadIntConfig(L, LOW_LEVEL_BONUS_EXP, \"lowLevelBonusExp\", 50);\n\tloadIntConfig(L, LOYALTY_POINTS_PER_CREATION_DAY, \"loyaltyPointsPerCreationDay\", 1);\n\tloadIntConfig(L, LOYALTY_POINTS_PER_PREMIUM_DAY_PURCHASED, \"loyaltyPointsPerPremiumDayPurchased\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ecdc0afd0feddd0b0c9236cec84c8accff8d6b2e97019db17802a5df8aaf8f3a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 268, + "startColumn": 2, + "charOffset": 16784, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 266, + "startColumn": 2, + "charOffset": 16653, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, LOOTPOUCH_MAXLIMIT, \"lootPouchMaxLimit\", 2000);\n\tloadIntConfig(L, LOW_LEVEL_BONUS_EXP, \"lowLevelBonusExp\", 50);\n\tloadIntConfig(L, LOYALTY_POINTS_PER_CREATION_DAY, \"loyaltyPointsPerCreationDay\", 1);\n\tloadIntConfig(L, LOYALTY_POINTS_PER_PREMIUM_DAY_PURCHASED, \"loyaltyPointsPerPremiumDayPurchased\", 0);\n\tloadIntConfig(L, LOYALTY_POINTS_PER_PREMIUM_DAY_SPENT, \"loyaltyPointsPerPremiumDaySpent\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d6fde16021ec051b21dd4b349ce2d5c1df853bd1320131192e1dfeb5e6b8274" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 269, + "startColumn": 2, + "charOffset": 16870, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 267, + "startColumn": 2, + "charOffset": 16719, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, LOW_LEVEL_BONUS_EXP, \"lowLevelBonusExp\", 50);\n\tloadIntConfig(L, LOYALTY_POINTS_PER_CREATION_DAY, \"loyaltyPointsPerCreationDay\", 1);\n\tloadIntConfig(L, LOYALTY_POINTS_PER_PREMIUM_DAY_PURCHASED, \"loyaltyPointsPerPremiumDayPurchased\", 0);\n\tloadIntConfig(L, LOYALTY_POINTS_PER_PREMIUM_DAY_SPENT, \"loyaltyPointsPerPremiumDaySpent\", 0);\n\tloadIntConfig(L, MAX_ALLOWED_ON_A_DUMMY, \"maxAllowedOnADummy\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fdfcf50788c67ca380eba28f597e3383e489c064bcbf839013f92d1079cadf41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 270, + "startColumn": 2, + "charOffset": 16973, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 268, + "startColumn": 2, + "charOffset": 16783, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, LOYALTY_POINTS_PER_CREATION_DAY, \"loyaltyPointsPerCreationDay\", 1);\n\tloadIntConfig(L, LOYALTY_POINTS_PER_PREMIUM_DAY_PURCHASED, \"loyaltyPointsPerPremiumDayPurchased\", 0);\n\tloadIntConfig(L, LOYALTY_POINTS_PER_PREMIUM_DAY_SPENT, \"loyaltyPointsPerPremiumDaySpent\", 0);\n\tloadIntConfig(L, MAX_ALLOWED_ON_A_DUMMY, \"maxAllowedOnADummy\", 1);\n\tloadIntConfig(L, MAX_CONTAINER_ITEM, \"maxItem\", 5000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3fee1abce4a90edff3c18a847351162eb3a22339a994bc88d50745e31a32f018" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 271, + "startColumn": 2, + "charOffset": 17068, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 269, + "startColumn": 2, + "charOffset": 16869, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, LOYALTY_POINTS_PER_PREMIUM_DAY_PURCHASED, \"loyaltyPointsPerPremiumDayPurchased\", 0);\n\tloadIntConfig(L, LOYALTY_POINTS_PER_PREMIUM_DAY_SPENT, \"loyaltyPointsPerPremiumDaySpent\", 0);\n\tloadIntConfig(L, MAX_ALLOWED_ON_A_DUMMY, \"maxAllowedOnADummy\", 1);\n\tloadIntConfig(L, MAX_CONTAINER_ITEM, \"maxItem\", 5000);\n\tloadIntConfig(L, MAX_CONTAINER, \"maxContainer\", 500);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29c051cb504713fb638babc8f3d68327750db3070549ccc2b7642aeb443c5e84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 272, + "startColumn": 2, + "charOffset": 17136, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 270, + "startColumn": 2, + "charOffset": 16972, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, LOYALTY_POINTS_PER_PREMIUM_DAY_SPENT, \"loyaltyPointsPerPremiumDaySpent\", 0);\n\tloadIntConfig(L, MAX_ALLOWED_ON_A_DUMMY, \"maxAllowedOnADummy\", 1);\n\tloadIntConfig(L, MAX_CONTAINER_ITEM, \"maxItem\", 5000);\n\tloadIntConfig(L, MAX_CONTAINER, \"maxContainer\", 500);\n\tloadIntConfig(L, MAX_DAMAGE_REFLECTION, \"maxDamageReflection\", 200);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca2e717ec9698b0485aa7ccebc17c3b3e3139f6a27b137afbbd4a57894f8e913" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 272, + "startColumn": 50, + "charOffset": 17184, + "charLength": 4, + "snippet": { + "text": "5000" + } + }, + "contextRegion": { + "startLine": 270, + "startColumn": 50, + "charOffset": 16972, + "charLength": 4, + "snippet": { + "text": "\tloadIntConfig(L, LOYALTY_POINTS_PER_PREMIUM_DAY_SPENT, \"loyaltyPointsPerPremiumDaySpent\", 0);\n\tloadIntConfig(L, MAX_ALLOWED_ON_A_DUMMY, \"maxAllowedOnADummy\", 1);\n\tloadIntConfig(L, MAX_CONTAINER_ITEM, \"maxItem\", 5000);\n\tloadIntConfig(L, MAX_CONTAINER, \"maxContainer\", 500);\n\tloadIntConfig(L, MAX_DAMAGE_REFLECTION, \"maxDamageReflection\", 200);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c4badd187e2ac9c4532572e98370d89309bcf4aaf7c4a387abe33455e5a8ab3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 273, + "startColumn": 2, + "charOffset": 17192, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 271, + "startColumn": 2, + "charOffset": 17067, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, MAX_ALLOWED_ON_A_DUMMY, \"maxAllowedOnADummy\", 1);\n\tloadIntConfig(L, MAX_CONTAINER_ITEM, \"maxItem\", 5000);\n\tloadIntConfig(L, MAX_CONTAINER, \"maxContainer\", 500);\n\tloadIntConfig(L, MAX_DAMAGE_REFLECTION, \"maxDamageReflection\", 200);\n\tloadIntConfig(L, MAX_ELEMENTAL_RESISTANCE, \"maxElementalResistance\", 200);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c461b4313b3989ae8fcf64d51fae7f2b9e0bbfbb1cc69c7a9aef31b0eeb9415" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "500 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 273, + "startColumn": 50, + "charOffset": 17240, + "charLength": 3, + "snippet": { + "text": "500" + } + }, + "contextRegion": { + "startLine": 271, + "startColumn": 50, + "charOffset": 17067, + "charLength": 3, + "snippet": { + "text": "\tloadIntConfig(L, MAX_ALLOWED_ON_A_DUMMY, \"maxAllowedOnADummy\", 1);\n\tloadIntConfig(L, MAX_CONTAINER_ITEM, \"maxItem\", 5000);\n\tloadIntConfig(L, MAX_CONTAINER, \"maxContainer\", 500);\n\tloadIntConfig(L, MAX_DAMAGE_REFLECTION, \"maxDamageReflection\", 200);\n\tloadIntConfig(L, MAX_ELEMENTAL_RESISTANCE, \"maxElementalResistance\", 200);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16912459153fe7324ad5f918b3aca225d11cddd0a5e4d5116b19b26b8d296f0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 274, + "startColumn": 2, + "charOffset": 17247, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 272, + "startColumn": 2, + "charOffset": 17135, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, MAX_CONTAINER_ITEM, \"maxItem\", 5000);\n\tloadIntConfig(L, MAX_CONTAINER, \"maxContainer\", 500);\n\tloadIntConfig(L, MAX_DAMAGE_REFLECTION, \"maxDamageReflection\", 200);\n\tloadIntConfig(L, MAX_ELEMENTAL_RESISTANCE, \"maxElementalResistance\", 200);\n\tloadIntConfig(L, MAX_MARKET_OFFERS_AT_A_TIME_PER_PLAYER, \"maxMarketOffersAtATimePerPlayer\", 100);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c510a0d2eb565f45b399f6a4f83396758e35db48ea7ee92dbac825483064a02f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 274, + "startColumn": 65, + "charOffset": 17310, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 272, + "startColumn": 65, + "charOffset": 17135, + "charLength": 3, + "snippet": { + "text": "\tloadIntConfig(L, MAX_CONTAINER_ITEM, \"maxItem\", 5000);\n\tloadIntConfig(L, MAX_CONTAINER, \"maxContainer\", 500);\n\tloadIntConfig(L, MAX_DAMAGE_REFLECTION, \"maxDamageReflection\", 200);\n\tloadIntConfig(L, MAX_ELEMENTAL_RESISTANCE, \"maxElementalResistance\", 200);\n\tloadIntConfig(L, MAX_MARKET_OFFERS_AT_A_TIME_PER_PLAYER, \"maxMarketOffersAtATimePerPlayer\", 100);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80cb49548b7e9740db41bac9aee9c1900857d1a512ad1b86589b9b6652bb95eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 275, + "startColumn": 2, + "charOffset": 17317, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 273, + "startColumn": 2, + "charOffset": 17191, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, MAX_CONTAINER, \"maxContainer\", 500);\n\tloadIntConfig(L, MAX_DAMAGE_REFLECTION, \"maxDamageReflection\", 200);\n\tloadIntConfig(L, MAX_ELEMENTAL_RESISTANCE, \"maxElementalResistance\", 200);\n\tloadIntConfig(L, MAX_MARKET_OFFERS_AT_A_TIME_PER_PLAYER, \"maxMarketOffersAtATimePerPlayer\", 100);\n\tloadIntConfig(L, MAX_MESSAGEBUFFER, \"maxMessageBuffer\", 4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51ea8342a357493c7e73da918d1545dcd690ea8c6add68a3c4668b1bbf9d1768" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 275, + "startColumn": 71, + "charOffset": 17386, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 273, + "startColumn": 71, + "charOffset": 17191, + "charLength": 3, + "snippet": { + "text": "\tloadIntConfig(L, MAX_CONTAINER, \"maxContainer\", 500);\n\tloadIntConfig(L, MAX_DAMAGE_REFLECTION, \"maxDamageReflection\", 200);\n\tloadIntConfig(L, MAX_ELEMENTAL_RESISTANCE, \"maxElementalResistance\", 200);\n\tloadIntConfig(L, MAX_MARKET_OFFERS_AT_A_TIME_PER_PLAYER, \"maxMarketOffersAtATimePerPlayer\", 100);\n\tloadIntConfig(L, MAX_MESSAGEBUFFER, \"maxMessageBuffer\", 4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eedf6fb15eedc9955ef9e52e21ab6d5762f8a990827038aef5374e6ea8145921" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 276, + "startColumn": 2, + "charOffset": 17393, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 274, + "startColumn": 2, + "charOffset": 17246, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, MAX_DAMAGE_REFLECTION, \"maxDamageReflection\", 200);\n\tloadIntConfig(L, MAX_ELEMENTAL_RESISTANCE, \"maxElementalResistance\", 200);\n\tloadIntConfig(L, MAX_MARKET_OFFERS_AT_A_TIME_PER_PLAYER, \"maxMarketOffersAtATimePerPlayer\", 100);\n\tloadIntConfig(L, MAX_MESSAGEBUFFER, \"maxMessageBuffer\", 4);\n\tloadIntConfig(L, MAX_PACKETS_PER_SECOND, \"maxPacketsPerSecond\", 25);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80258cd76abef8582090edbc37ca45bf861298579f437b4e9a8e75421bca7eb1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 276, + "startColumn": 94, + "charOffset": 17485, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 274, + "startColumn": 94, + "charOffset": 17246, + "charLength": 3, + "snippet": { + "text": "\tloadIntConfig(L, MAX_DAMAGE_REFLECTION, \"maxDamageReflection\", 200);\n\tloadIntConfig(L, MAX_ELEMENTAL_RESISTANCE, \"maxElementalResistance\", 200);\n\tloadIntConfig(L, MAX_MARKET_OFFERS_AT_A_TIME_PER_PLAYER, \"maxMarketOffersAtATimePerPlayer\", 100);\n\tloadIntConfig(L, MAX_MESSAGEBUFFER, \"maxMessageBuffer\", 4);\n\tloadIntConfig(L, MAX_PACKETS_PER_SECOND, \"maxPacketsPerSecond\", 25);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "57ca294d49170126c92eccd9cb1bae2b80a47a24ed1ee34df7b7883b11bf7ce2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 277, + "startColumn": 2, + "charOffset": 17492, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 275, + "startColumn": 2, + "charOffset": 17316, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, MAX_ELEMENTAL_RESISTANCE, \"maxElementalResistance\", 200);\n\tloadIntConfig(L, MAX_MARKET_OFFERS_AT_A_TIME_PER_PLAYER, \"maxMarketOffersAtATimePerPlayer\", 100);\n\tloadIntConfig(L, MAX_MESSAGEBUFFER, \"maxMessageBuffer\", 4);\n\tloadIntConfig(L, MAX_PACKETS_PER_SECOND, \"maxPacketsPerSecond\", 25);\n\tloadIntConfig(L, MAX_PLAYERS_OUTSIDE_PZ_PER_ACCOUNT, \"maxPlayersOutsidePZPerAccount\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "427fd11912b35387252f5b6e3ef0173344202e08281208c76428213603c274e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 278, + "startColumn": 2, + "charOffset": 17553, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 276, + "startColumn": 2, + "charOffset": 17392, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, MAX_MARKET_OFFERS_AT_A_TIME_PER_PLAYER, \"maxMarketOffersAtATimePerPlayer\", 100);\n\tloadIntConfig(L, MAX_MESSAGEBUFFER, \"maxMessageBuffer\", 4);\n\tloadIntConfig(L, MAX_PACKETS_PER_SECOND, \"maxPacketsPerSecond\", 25);\n\tloadIntConfig(L, MAX_PLAYERS_OUTSIDE_PZ_PER_ACCOUNT, \"maxPlayersOutsidePZPerAccount\", 1);\n\tloadIntConfig(L, MAX_PLAYERS_PER_ACCOUNT, \"maxPlayersOnlinePerAccount\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9573f6da3c086e15c39b46b4081eb4409b75f5dc5aedfb18254a8341f60aa0fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 278, + "startColumn": 66, + "charOffset": 17617, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 276, + "startColumn": 66, + "charOffset": 17392, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, MAX_MARKET_OFFERS_AT_A_TIME_PER_PLAYER, \"maxMarketOffersAtATimePerPlayer\", 100);\n\tloadIntConfig(L, MAX_MESSAGEBUFFER, \"maxMessageBuffer\", 4);\n\tloadIntConfig(L, MAX_PACKETS_PER_SECOND, \"maxPacketsPerSecond\", 25);\n\tloadIntConfig(L, MAX_PLAYERS_OUTSIDE_PZ_PER_ACCOUNT, \"maxPlayersOutsidePZPerAccount\", 1);\n\tloadIntConfig(L, MAX_PLAYERS_PER_ACCOUNT, \"maxPlayersOnlinePerAccount\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba2e54d7384c3d02b0dfc44e7ad7a29ce791592e7d5e74657a6a7db76751fead" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 279, + "startColumn": 2, + "charOffset": 17623, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 277, + "startColumn": 2, + "charOffset": 17491, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, MAX_MESSAGEBUFFER, \"maxMessageBuffer\", 4);\n\tloadIntConfig(L, MAX_PACKETS_PER_SECOND, \"maxPacketsPerSecond\", 25);\n\tloadIntConfig(L, MAX_PLAYERS_OUTSIDE_PZ_PER_ACCOUNT, \"maxPlayersOutsidePZPerAccount\", 1);\n\tloadIntConfig(L, MAX_PLAYERS_PER_ACCOUNT, \"maxPlayersOnlinePerAccount\", 1);\n\tloadIntConfig(L, MAX_PLAYERS, \"maxPlayers\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce32d43a4e737e6f90d7e9e4724ef0e9bb3ba8a3052bf55e2522097c816d7907" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 280, + "startColumn": 2, + "charOffset": 17714, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 278, + "startColumn": 2, + "charOffset": 17552, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, MAX_PACKETS_PER_SECOND, \"maxPacketsPerSecond\", 25);\n\tloadIntConfig(L, MAX_PLAYERS_OUTSIDE_PZ_PER_ACCOUNT, \"maxPlayersOutsidePZPerAccount\", 1);\n\tloadIntConfig(L, MAX_PLAYERS_PER_ACCOUNT, \"maxPlayersOnlinePerAccount\", 1);\n\tloadIntConfig(L, MAX_PLAYERS, \"maxPlayers\", 0);\n\tloadIntConfig(L, MAX_SPEED_ATTACKONFIST, \"maxSpeedOnFist\", 500);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1aa175c042eb59b7eb640768582c93e5d77a78159f31fb0243b7dc21d5bb4f3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 281, + "startColumn": 2, + "charOffset": 17791, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 279, + "startColumn": 2, + "charOffset": 17622, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, MAX_PLAYERS_OUTSIDE_PZ_PER_ACCOUNT, \"maxPlayersOutsidePZPerAccount\", 1);\n\tloadIntConfig(L, MAX_PLAYERS_PER_ACCOUNT, \"maxPlayersOnlinePerAccount\", 1);\n\tloadIntConfig(L, MAX_PLAYERS, \"maxPlayers\", 0);\n\tloadIntConfig(L, MAX_SPEED_ATTACKONFIST, \"maxSpeedOnFist\", 500);\n\tloadIntConfig(L, METRICS_OSTREAM_INTERVAL, \"metricsOstreamInterval\", 1000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89ef00ac66d47e888048294b9ba43770e2396e8a90d754c4bf22757101d20896" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 282, + "startColumn": 2, + "charOffset": 17840, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 280, + "startColumn": 2, + "charOffset": 17713, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, MAX_PLAYERS_PER_ACCOUNT, \"maxPlayersOnlinePerAccount\", 1);\n\tloadIntConfig(L, MAX_PLAYERS, \"maxPlayers\", 0);\n\tloadIntConfig(L, MAX_SPEED_ATTACKONFIST, \"maxSpeedOnFist\", 500);\n\tloadIntConfig(L, METRICS_OSTREAM_INTERVAL, \"metricsOstreamInterval\", 1000);\n\tloadIntConfig(L, MIN_DELAY_BETWEEN_CONDITIONS, \"minDelayBetweenConditions\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5d47a7248383c1b9b6595c1ba4481b50634ac192be1eafbbea3d65f5a2d3df1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "500 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 282, + "startColumn": 61, + "charOffset": 17899, + "charLength": 3, + "snippet": { + "text": "500" + } + }, + "contextRegion": { + "startLine": 280, + "startColumn": 61, + "charOffset": 17713, + "charLength": 3, + "snippet": { + "text": "\tloadIntConfig(L, MAX_PLAYERS_PER_ACCOUNT, \"maxPlayersOnlinePerAccount\", 1);\n\tloadIntConfig(L, MAX_PLAYERS, \"maxPlayers\", 0);\n\tloadIntConfig(L, MAX_SPEED_ATTACKONFIST, \"maxSpeedOnFist\", 500);\n\tloadIntConfig(L, METRICS_OSTREAM_INTERVAL, \"metricsOstreamInterval\", 1000);\n\tloadIntConfig(L, MIN_DELAY_BETWEEN_CONDITIONS, \"minDelayBetweenConditions\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8039b81c243af623fbba7ee1773dcc0fe759ad2f6c6d7218c1297abda258182" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 283, + "startColumn": 2, + "charOffset": 17906, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 281, + "startColumn": 2, + "charOffset": 17790, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, MAX_PLAYERS, \"maxPlayers\", 0);\n\tloadIntConfig(L, MAX_SPEED_ATTACKONFIST, \"maxSpeedOnFist\", 500);\n\tloadIntConfig(L, METRICS_OSTREAM_INTERVAL, \"metricsOstreamInterval\", 1000);\n\tloadIntConfig(L, MIN_DELAY_BETWEEN_CONDITIONS, \"minDelayBetweenConditions\", 0);\n\tloadIntConfig(L, MIN_ELEMENTAL_RESISTANCE, \"minElementalResistance\", -200);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60d84470035aad25adae84267b1585a4329dca09b2aeed2efd5cc4923f5b8996" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 283, + "startColumn": 71, + "charOffset": 17975, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 281, + "startColumn": 71, + "charOffset": 17790, + "charLength": 4, + "snippet": { + "text": "\tloadIntConfig(L, MAX_PLAYERS, \"maxPlayers\", 0);\n\tloadIntConfig(L, MAX_SPEED_ATTACKONFIST, \"maxSpeedOnFist\", 500);\n\tloadIntConfig(L, METRICS_OSTREAM_INTERVAL, \"metricsOstreamInterval\", 1000);\n\tloadIntConfig(L, MIN_DELAY_BETWEEN_CONDITIONS, \"minDelayBetweenConditions\", 0);\n\tloadIntConfig(L, MIN_ELEMENTAL_RESISTANCE, \"minElementalResistance\", -200);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb2343d30189d8f7cce42c239cfe70651874d0827f2024f18f0f8384b81d4e0c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 284, + "startColumn": 2, + "charOffset": 17983, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 282, + "startColumn": 2, + "charOffset": 17839, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, MAX_SPEED_ATTACKONFIST, \"maxSpeedOnFist\", 500);\n\tloadIntConfig(L, METRICS_OSTREAM_INTERVAL, \"metricsOstreamInterval\", 1000);\n\tloadIntConfig(L, MIN_DELAY_BETWEEN_CONDITIONS, \"minDelayBetweenConditions\", 0);\n\tloadIntConfig(L, MIN_ELEMENTAL_RESISTANCE, \"minElementalResistance\", -200);\n\tloadIntConfig(L, MIN_TOWN_ID_TO_BANK_TRANSFER, \"minTownIdToBankTransfer\", 3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2461f91d8ec29eca0af263ba98edd4924989f29ad6328782ae0f826f484a9d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 285, + "startColumn": 2, + "charOffset": 18064, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 283, + "startColumn": 2, + "charOffset": 17905, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, METRICS_OSTREAM_INTERVAL, \"metricsOstreamInterval\", 1000);\n\tloadIntConfig(L, MIN_DELAY_BETWEEN_CONDITIONS, \"minDelayBetweenConditions\", 0);\n\tloadIntConfig(L, MIN_ELEMENTAL_RESISTANCE, \"minElementalResistance\", -200);\n\tloadIntConfig(L, MIN_TOWN_ID_TO_BANK_TRANSFER, \"minTownIdToBankTransfer\", 3);\n\tloadIntConfig(L, MONTH_KILLS_TO_RED, \"monthKillsToRedSkull\", 10);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d6fde16021ec051b21dd4b349ce2d5c1df853bd1320131192e1dfeb5e6b8274" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 285, + "startColumn": 72, + "charOffset": 18134, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 283, + "startColumn": 72, + "charOffset": 17905, + "charLength": 3, + "snippet": { + "text": "\tloadIntConfig(L, METRICS_OSTREAM_INTERVAL, \"metricsOstreamInterval\", 1000);\n\tloadIntConfig(L, MIN_DELAY_BETWEEN_CONDITIONS, \"minDelayBetweenConditions\", 0);\n\tloadIntConfig(L, MIN_ELEMENTAL_RESISTANCE, \"minElementalResistance\", -200);\n\tloadIntConfig(L, MIN_TOWN_ID_TO_BANK_TRANSFER, \"minTownIdToBankTransfer\", 3);\n\tloadIntConfig(L, MONTH_KILLS_TO_RED, \"monthKillsToRedSkull\", 10);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a61b8511ba198880e2fa12b46af391f3e5215c855193d53176253c1a2a8a1a09" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 286, + "startColumn": 2, + "charOffset": 18141, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 284, + "startColumn": 2, + "charOffset": 17982, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, MIN_DELAY_BETWEEN_CONDITIONS, \"minDelayBetweenConditions\", 0);\n\tloadIntConfig(L, MIN_ELEMENTAL_RESISTANCE, \"minElementalResistance\", -200);\n\tloadIntConfig(L, MIN_TOWN_ID_TO_BANK_TRANSFER, \"minTownIdToBankTransfer\", 3);\n\tloadIntConfig(L, MONTH_KILLS_TO_RED, \"monthKillsToRedSkull\", 10);\n\tloadIntConfig(L, MULTIPLIER_ATTACKONFIST, \"multiplierSpeedOnFist\", 5);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ecba7970c90bd25165bdd6acd507b0fa6848f7d7b88695fa1e05da76ad03b875" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 287, + "startColumn": 2, + "charOffset": 18220, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 285, + "startColumn": 2, + "charOffset": 18063, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, MIN_ELEMENTAL_RESISTANCE, \"minElementalResistance\", -200);\n\tloadIntConfig(L, MIN_TOWN_ID_TO_BANK_TRANSFER, \"minTownIdToBankTransfer\", 3);\n\tloadIntConfig(L, MONTH_KILLS_TO_RED, \"monthKillsToRedSkull\", 10);\n\tloadIntConfig(L, MULTIPLIER_ATTACKONFIST, \"multiplierSpeedOnFist\", 5);\n\tloadIntConfig(L, ORANGE_SKULL_DURATION, \"orangeSkullDuration\", 7);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53b14644c80f4ad32628ac22df1296ef822bb89c4dd2002c936f48fff865b3ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 287, + "startColumn": 63, + "charOffset": 18281, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 285, + "startColumn": 63, + "charOffset": 18063, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, MIN_ELEMENTAL_RESISTANCE, \"minElementalResistance\", -200);\n\tloadIntConfig(L, MIN_TOWN_ID_TO_BANK_TRANSFER, \"minTownIdToBankTransfer\", 3);\n\tloadIntConfig(L, MONTH_KILLS_TO_RED, \"monthKillsToRedSkull\", 10);\n\tloadIntConfig(L, MULTIPLIER_ATTACKONFIST, \"multiplierSpeedOnFist\", 5);\n\tloadIntConfig(L, ORANGE_SKULL_DURATION, \"orangeSkullDuration\", 7);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "769485592df60956443c9bb1d9f201ff57e2671f969f95872df81a314c9bb27d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 288, + "startColumn": 2, + "charOffset": 18287, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 286, + "startColumn": 2, + "charOffset": 18140, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, MIN_TOWN_ID_TO_BANK_TRANSFER, \"minTownIdToBankTransfer\", 3);\n\tloadIntConfig(L, MONTH_KILLS_TO_RED, \"monthKillsToRedSkull\", 10);\n\tloadIntConfig(L, MULTIPLIER_ATTACKONFIST, \"multiplierSpeedOnFist\", 5);\n\tloadIntConfig(L, ORANGE_SKULL_DURATION, \"orangeSkullDuration\", 7);\n\tloadIntConfig(L, PARALLELISM, \"parallelism\", 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07225d848ace637805c31ec63c03ecdb7ee3cc88d174a98e9415f9e009321234" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 288, + "startColumn": 69, + "charOffset": 18354, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 286, + "startColumn": 69, + "charOffset": 18140, + "charLength": 1, + "snippet": { + "text": "\tloadIntConfig(L, MIN_TOWN_ID_TO_BANK_TRANSFER, \"minTownIdToBankTransfer\", 3);\n\tloadIntConfig(L, MONTH_KILLS_TO_RED, \"monthKillsToRedSkull\", 10);\n\tloadIntConfig(L, MULTIPLIER_ATTACKONFIST, \"multiplierSpeedOnFist\", 5);\n\tloadIntConfig(L, ORANGE_SKULL_DURATION, \"orangeSkullDuration\", 7);\n\tloadIntConfig(L, PARALLELISM, \"parallelism\", 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ded7e079e29b9ec4b916f8754e30f85f95559fc06b7eee51b9be4b70597c4a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 289, + "startColumn": 2, + "charOffset": 18359, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 287, + "startColumn": 2, + "charOffset": 18219, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, MONTH_KILLS_TO_RED, \"monthKillsToRedSkull\", 10);\n\tloadIntConfig(L, MULTIPLIER_ATTACKONFIST, \"multiplierSpeedOnFist\", 5);\n\tloadIntConfig(L, ORANGE_SKULL_DURATION, \"orangeSkullDuration\", 7);\n\tloadIntConfig(L, PARALLELISM, \"parallelism\", 2);\n\tloadIntConfig(L, PARTY_LIST_MAX_DISTANCE, \"partyListMaxDistance\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca9f7a1d517e56c428792b877bce70dbd6794918af707f29030e4b50b11d5e23" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 289, + "startColumn": 65, + "charOffset": 18422, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 287, + "startColumn": 65, + "charOffset": 18219, + "charLength": 1, + "snippet": { + "text": "\tloadIntConfig(L, MONTH_KILLS_TO_RED, \"monthKillsToRedSkull\", 10);\n\tloadIntConfig(L, MULTIPLIER_ATTACKONFIST, \"multiplierSpeedOnFist\", 5);\n\tloadIntConfig(L, ORANGE_SKULL_DURATION, \"orangeSkullDuration\", 7);\n\tloadIntConfig(L, PARALLELISM, \"parallelism\", 2);\n\tloadIntConfig(L, PARTY_LIST_MAX_DISTANCE, \"partyListMaxDistance\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ef80a9dd774db962aff06f98925449a93c960b6d035033fe1eac122a1de8ac4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 290, + "startColumn": 2, + "charOffset": 18427, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 288, + "startColumn": 2, + "charOffset": 18286, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, MULTIPLIER_ATTACKONFIST, \"multiplierSpeedOnFist\", 5);\n\tloadIntConfig(L, ORANGE_SKULL_DURATION, \"orangeSkullDuration\", 7);\n\tloadIntConfig(L, PARALLELISM, \"parallelism\", 2);\n\tloadIntConfig(L, PARTY_LIST_MAX_DISTANCE, \"partyListMaxDistance\", 0);\n\tloadIntConfig(L, PREY_BONUS_REROLL_PRICE, \"preyBonusRerollPrice\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "895bb57ae9fca9cca4ee43527340efb97ea06c99e6b247579f0adbf19266aa67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 291, + "startColumn": 2, + "charOffset": 18477, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 289, + "startColumn": 2, + "charOffset": 18358, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, ORANGE_SKULL_DURATION, \"orangeSkullDuration\", 7);\n\tloadIntConfig(L, PARALLELISM, \"parallelism\", 2);\n\tloadIntConfig(L, PARTY_LIST_MAX_DISTANCE, \"partyListMaxDistance\", 0);\n\tloadIntConfig(L, PREY_BONUS_REROLL_PRICE, \"preyBonusRerollPrice\", 1);\n\tloadIntConfig(L, PREY_BONUS_TIME, \"preyBonusTime\", 7200);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04a5bd262b6d5586942107832a22702a3de8724a588ebf6f356eb2dbb5b97721" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 292, + "startColumn": 2, + "charOffset": 18548, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 290, + "startColumn": 2, + "charOffset": 18426, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, PARALLELISM, \"parallelism\", 2);\n\tloadIntConfig(L, PARTY_LIST_MAX_DISTANCE, \"partyListMaxDistance\", 0);\n\tloadIntConfig(L, PREY_BONUS_REROLL_PRICE, \"preyBonusRerollPrice\", 1);\n\tloadIntConfig(L, PREY_BONUS_TIME, \"preyBonusTime\", 7200);\n\tloadIntConfig(L, PREY_FREE_REROLL_TIME, \"preyFreeRerollTime\", 72000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5e704dc03036884371ae570d8296c35c8f289f3f552ac9a65383e29f8c52e7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 293, + "startColumn": 2, + "charOffset": 18619, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 291, + "startColumn": 2, + "charOffset": 18476, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, PARTY_LIST_MAX_DISTANCE, \"partyListMaxDistance\", 0);\n\tloadIntConfig(L, PREY_BONUS_REROLL_PRICE, \"preyBonusRerollPrice\", 1);\n\tloadIntConfig(L, PREY_BONUS_TIME, \"preyBonusTime\", 7200);\n\tloadIntConfig(L, PREY_FREE_REROLL_TIME, \"preyFreeRerollTime\", 72000);\n\tloadIntConfig(L, PREY_REROLL_PRICE_LEVEL, \"preyRerollPricePerLevel\", 200);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19e744b1687861fec5b21a36c0a4da4ad741e033a7ba7bd3d4684b1ea4430db2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 293, + "startColumn": 53, + "charOffset": 18670, + "charLength": 4, + "snippet": { + "text": "7200" + } + }, + "contextRegion": { + "startLine": 291, + "startColumn": 53, + "charOffset": 18476, + "charLength": 4, + "snippet": { + "text": "\tloadIntConfig(L, PARTY_LIST_MAX_DISTANCE, \"partyListMaxDistance\", 0);\n\tloadIntConfig(L, PREY_BONUS_REROLL_PRICE, \"preyBonusRerollPrice\", 1);\n\tloadIntConfig(L, PREY_BONUS_TIME, \"preyBonusTime\", 7200);\n\tloadIntConfig(L, PREY_FREE_REROLL_TIME, \"preyFreeRerollTime\", 72000);\n\tloadIntConfig(L, PREY_REROLL_PRICE_LEVEL, \"preyRerollPricePerLevel\", 200);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "017e46569b20ee0bec902881a24cb9dd9e393e258080982e28961c778a999137" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 294, + "startColumn": 2, + "charOffset": 18678, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 292, + "startColumn": 2, + "charOffset": 18547, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, PREY_BONUS_REROLL_PRICE, \"preyBonusRerollPrice\", 1);\n\tloadIntConfig(L, PREY_BONUS_TIME, \"preyBonusTime\", 7200);\n\tloadIntConfig(L, PREY_FREE_REROLL_TIME, \"preyFreeRerollTime\", 72000);\n\tloadIntConfig(L, PREY_REROLL_PRICE_LEVEL, \"preyRerollPricePerLevel\", 200);\n\tloadIntConfig(L, PREY_SELECTION_LIST_PRICE, \"preySelectListPrice\", 5);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a00a9e71963e5cc22746d5e32f94619c2978657b8d2495cf1b999340b4dc72df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "72000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 294, + "startColumn": 64, + "charOffset": 18740, + "charLength": 5, + "snippet": { + "text": "72000" + } + }, + "contextRegion": { + "startLine": 292, + "startColumn": 64, + "charOffset": 18547, + "charLength": 5, + "snippet": { + "text": "\tloadIntConfig(L, PREY_BONUS_REROLL_PRICE, \"preyBonusRerollPrice\", 1);\n\tloadIntConfig(L, PREY_BONUS_TIME, \"preyBonusTime\", 7200);\n\tloadIntConfig(L, PREY_FREE_REROLL_TIME, \"preyFreeRerollTime\", 72000);\n\tloadIntConfig(L, PREY_REROLL_PRICE_LEVEL, \"preyRerollPricePerLevel\", 200);\n\tloadIntConfig(L, PREY_SELECTION_LIST_PRICE, \"preySelectListPrice\", 5);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d8af3ba608ef081b0fcd14b67b6c17ce7369a33ea6bd139f9b5e00e7b08ca7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 295, + "startColumn": 2, + "charOffset": 18749, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 293, + "startColumn": 2, + "charOffset": 18618, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, PREY_BONUS_TIME, \"preyBonusTime\", 7200);\n\tloadIntConfig(L, PREY_FREE_REROLL_TIME, \"preyFreeRerollTime\", 72000);\n\tloadIntConfig(L, PREY_REROLL_PRICE_LEVEL, \"preyRerollPricePerLevel\", 200);\n\tloadIntConfig(L, PREY_SELECTION_LIST_PRICE, \"preySelectListPrice\", 5);\n\tloadIntConfig(L, PROTECTION_LEVEL, \"protectionLevel\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d939f933fef5574a68efde233d3b03c40dfc6f2f5bcb2ce7a534ee4106a99356" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 295, + "startColumn": 71, + "charOffset": 18818, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 293, + "startColumn": 71, + "charOffset": 18618, + "charLength": 3, + "snippet": { + "text": "\tloadIntConfig(L, PREY_BONUS_TIME, \"preyBonusTime\", 7200);\n\tloadIntConfig(L, PREY_FREE_REROLL_TIME, \"preyFreeRerollTime\", 72000);\n\tloadIntConfig(L, PREY_REROLL_PRICE_LEVEL, \"preyRerollPricePerLevel\", 200);\n\tloadIntConfig(L, PREY_SELECTION_LIST_PRICE, \"preySelectListPrice\", 5);\n\tloadIntConfig(L, PROTECTION_LEVEL, \"protectionLevel\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "951eee400315cb5a2e295b23c33f1084b74eb3ecd9c1a2a2545c63ee14271f43" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 296, + "startColumn": 2, + "charOffset": 18825, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 294, + "startColumn": 2, + "charOffset": 18677, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, PREY_FREE_REROLL_TIME, \"preyFreeRerollTime\", 72000);\n\tloadIntConfig(L, PREY_REROLL_PRICE_LEVEL, \"preyRerollPricePerLevel\", 200);\n\tloadIntConfig(L, PREY_SELECTION_LIST_PRICE, \"preySelectListPrice\", 5);\n\tloadIntConfig(L, PROTECTION_LEVEL, \"protectionLevel\", 1);\n\tloadIntConfig(L, PUSH_DELAY, \"pushDelay\", 1000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f74aade7c299e181df6aae169f1a47614cca364fb51b8c4f671b2d325114548b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 296, + "startColumn": 69, + "charOffset": 18892, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 294, + "startColumn": 69, + "charOffset": 18677, + "charLength": 1, + "snippet": { + "text": "\tloadIntConfig(L, PREY_FREE_REROLL_TIME, \"preyFreeRerollTime\", 72000);\n\tloadIntConfig(L, PREY_REROLL_PRICE_LEVEL, \"preyRerollPricePerLevel\", 200);\n\tloadIntConfig(L, PREY_SELECTION_LIST_PRICE, \"preySelectListPrice\", 5);\n\tloadIntConfig(L, PROTECTION_LEVEL, \"protectionLevel\", 1);\n\tloadIntConfig(L, PUSH_DELAY, \"pushDelay\", 1000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31de0f16070b8369c2c194f3d30a5a726cf79b8a4e1169b86c8e8865c9acacae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 297, + "startColumn": 2, + "charOffset": 18897, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 295, + "startColumn": 2, + "charOffset": 18748, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, PREY_REROLL_PRICE_LEVEL, \"preyRerollPricePerLevel\", 200);\n\tloadIntConfig(L, PREY_SELECTION_LIST_PRICE, \"preySelectListPrice\", 5);\n\tloadIntConfig(L, PROTECTION_LEVEL, \"protectionLevel\", 1);\n\tloadIntConfig(L, PUSH_DELAY, \"pushDelay\", 1000);\n\tloadIntConfig(L, PUSH_DISTANCE_DELAY, \"pushDistanceDelay\", 1500);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b4e9a12039c442fea3301f13629a76773f20b7178de594e78dfb8d76e7799bfb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 298, + "startColumn": 2, + "charOffset": 18956, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 296, + "startColumn": 2, + "charOffset": 18824, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, PREY_SELECTION_LIST_PRICE, \"preySelectListPrice\", 5);\n\tloadIntConfig(L, PROTECTION_LEVEL, \"protectionLevel\", 1);\n\tloadIntConfig(L, PUSH_DELAY, \"pushDelay\", 1000);\n\tloadIntConfig(L, PUSH_DISTANCE_DELAY, \"pushDistanceDelay\", 1500);\n\tloadIntConfig(L, PVP_MAX_LEVEL_DIFFERENCE, \"pvpMaxLevelDifference\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa5eadf449bc60bb73ed18b6aeaa733c0df0f9b7e399bf8ba609f0be57262bdf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 298, + "startColumn": 44, + "charOffset": 18998, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 296, + "startColumn": 44, + "charOffset": 18824, + "charLength": 4, + "snippet": { + "text": "\tloadIntConfig(L, PREY_SELECTION_LIST_PRICE, \"preySelectListPrice\", 5);\n\tloadIntConfig(L, PROTECTION_LEVEL, \"protectionLevel\", 1);\n\tloadIntConfig(L, PUSH_DELAY, \"pushDelay\", 1000);\n\tloadIntConfig(L, PUSH_DISTANCE_DELAY, \"pushDistanceDelay\", 1500);\n\tloadIntConfig(L, PVP_MAX_LEVEL_DIFFERENCE, \"pvpMaxLevelDifference\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "930296b6605cb5bcbd9c2d1758eb1286b0f943d303bd0491d459f5ba0d1218b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 299, + "startColumn": 2, + "charOffset": 19006, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 297, + "startColumn": 2, + "charOffset": 18896, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, PROTECTION_LEVEL, \"protectionLevel\", 1);\n\tloadIntConfig(L, PUSH_DELAY, \"pushDelay\", 1000);\n\tloadIntConfig(L, PUSH_DISTANCE_DELAY, \"pushDistanceDelay\", 1500);\n\tloadIntConfig(L, PVP_MAX_LEVEL_DIFFERENCE, \"pvpMaxLevelDifference\", 0);\n\tloadIntConfig(L, PZ_LOCKED, \"pzLocked\", 60000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04e3fd6e8d8de5cb769f517e89d1fbec6448a1ed735a6b05cee8df9d7245a74c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1500 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 299, + "startColumn": 61, + "charOffset": 19065, + "charLength": 4, + "snippet": { + "text": "1500" + } + }, + "contextRegion": { + "startLine": 297, + "startColumn": 61, + "charOffset": 18896, + "charLength": 4, + "snippet": { + "text": "\tloadIntConfig(L, PROTECTION_LEVEL, \"protectionLevel\", 1);\n\tloadIntConfig(L, PUSH_DELAY, \"pushDelay\", 1000);\n\tloadIntConfig(L, PUSH_DISTANCE_DELAY, \"pushDistanceDelay\", 1500);\n\tloadIntConfig(L, PVP_MAX_LEVEL_DIFFERENCE, \"pvpMaxLevelDifference\", 0);\n\tloadIntConfig(L, PZ_LOCKED, \"pzLocked\", 60000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de5716731ae92288e4abc19d1886cd19fcfbdd3539343b10de349493efd12e2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 300, + "startColumn": 2, + "charOffset": 19073, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 298, + "startColumn": 2, + "charOffset": 18955, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, PUSH_DELAY, \"pushDelay\", 1000);\n\tloadIntConfig(L, PUSH_DISTANCE_DELAY, \"pushDistanceDelay\", 1500);\n\tloadIntConfig(L, PVP_MAX_LEVEL_DIFFERENCE, \"pvpMaxLevelDifference\", 0);\n\tloadIntConfig(L, PZ_LOCKED, \"pzLocked\", 60000);\n\tloadIntConfig(L, RATE_EXPERIENCE, \"rateExp\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e06b77516111d0596e389e0be7d3aeefff6b19a1ed75e9c18d475ad6d1ced46f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 301, + "startColumn": 2, + "charOffset": 19146, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 299, + "startColumn": 2, + "charOffset": 19005, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, PUSH_DISTANCE_DELAY, \"pushDistanceDelay\", 1500);\n\tloadIntConfig(L, PVP_MAX_LEVEL_DIFFERENCE, \"pvpMaxLevelDifference\", 0);\n\tloadIntConfig(L, PZ_LOCKED, \"pzLocked\", 60000);\n\tloadIntConfig(L, RATE_EXPERIENCE, \"rateExp\", 1);\n\tloadIntConfig(L, RATE_KILLING_IN_THE_NAME_OF_POINTS, \"rateKillingInTheNameOfPoints\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0cf26fdf33ec5cc6df7f67fe7c669d7e2ffca2be0e19a484f43240c3731b9c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 301, + "startColumn": 42, + "charOffset": 19186, + "charLength": 5, + "snippet": { + "text": "60000" + } + }, + "contextRegion": { + "startLine": 299, + "startColumn": 42, + "charOffset": 19005, + "charLength": 5, + "snippet": { + "text": "\tloadIntConfig(L, PUSH_DISTANCE_DELAY, \"pushDistanceDelay\", 1500);\n\tloadIntConfig(L, PVP_MAX_LEVEL_DIFFERENCE, \"pvpMaxLevelDifference\", 0);\n\tloadIntConfig(L, PZ_LOCKED, \"pzLocked\", 60000);\n\tloadIntConfig(L, RATE_EXPERIENCE, \"rateExp\", 1);\n\tloadIntConfig(L, RATE_KILLING_IN_THE_NAME_OF_POINTS, \"rateKillingInTheNameOfPoints\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20df6a947a5c65091770f908a2aa8a6e67c1b52625baa950df6410ef9d207b12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 302, + "startColumn": 2, + "charOffset": 19195, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 300, + "startColumn": 2, + "charOffset": 19072, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, PVP_MAX_LEVEL_DIFFERENCE, \"pvpMaxLevelDifference\", 0);\n\tloadIntConfig(L, PZ_LOCKED, \"pzLocked\", 60000);\n\tloadIntConfig(L, RATE_EXPERIENCE, \"rateExp\", 1);\n\tloadIntConfig(L, RATE_KILLING_IN_THE_NAME_OF_POINTS, \"rateKillingInTheNameOfPoints\", 1);\n\tloadIntConfig(L, RATE_LOOT, \"rateLoot\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "895bb57ae9fca9cca4ee43527340efb97ea06c99e6b247579f0adbf19266aa67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 303, + "startColumn": 2, + "charOffset": 19245, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 301, + "startColumn": 2, + "charOffset": 19145, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, PZ_LOCKED, \"pzLocked\", 60000);\n\tloadIntConfig(L, RATE_EXPERIENCE, \"rateExp\", 1);\n\tloadIntConfig(L, RATE_KILLING_IN_THE_NAME_OF_POINTS, \"rateKillingInTheNameOfPoints\", 1);\n\tloadIntConfig(L, RATE_LOOT, \"rateLoot\", 1);\n\tloadIntConfig(L, RATE_MAGIC, \"rateMagic\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04a5bd262b6d5586942107832a22702a3de8724a588ebf6f356eb2dbb5b97721" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 304, + "startColumn": 2, + "charOffset": 19335, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 302, + "startColumn": 2, + "charOffset": 19194, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, RATE_EXPERIENCE, \"rateExp\", 1);\n\tloadIntConfig(L, RATE_KILLING_IN_THE_NAME_OF_POINTS, \"rateKillingInTheNameOfPoints\", 1);\n\tloadIntConfig(L, RATE_LOOT, \"rateLoot\", 1);\n\tloadIntConfig(L, RATE_MAGIC, \"rateMagic\", 1);\n\tloadIntConfig(L, RATE_SKILL, \"rateSkill\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7c518901173777d8ff88688cf317c0ebf376d80fc4a32b9666ae21bf8732162" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 305, + "startColumn": 2, + "charOffset": 19380, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 303, + "startColumn": 2, + "charOffset": 19244, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, RATE_KILLING_IN_THE_NAME_OF_POINTS, \"rateKillingInTheNameOfPoints\", 1);\n\tloadIntConfig(L, RATE_LOOT, \"rateLoot\", 1);\n\tloadIntConfig(L, RATE_MAGIC, \"rateMagic\", 1);\n\tloadIntConfig(L, RATE_SKILL, \"rateSkill\", 1);\n\tloadIntConfig(L, RATE_SPAWN, \"rateSpawn\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca6b0fa60a9257c4aa8863bfa25e1e647523e15fffc64836ef6e49b3bd27210d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 306, + "startColumn": 2, + "charOffset": 19427, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 304, + "startColumn": 2, + "charOffset": 19334, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, RATE_LOOT, \"rateLoot\", 1);\n\tloadIntConfig(L, RATE_MAGIC, \"rateMagic\", 1);\n\tloadIntConfig(L, RATE_SKILL, \"rateSkill\", 1);\n\tloadIntConfig(L, RATE_SPAWN, \"rateSpawn\", 1);\n\tloadIntConfig(L, RED_SKULL_DURATION, \"redSkullDuration\", 30);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "946b43bfb3d974ca07897718c7b343f0e5360a060f936facf7227eabcd7e72f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 307, + "startColumn": 2, + "charOffset": 19474, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 305, + "startColumn": 2, + "charOffset": 19379, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, RATE_MAGIC, \"rateMagic\", 1);\n\tloadIntConfig(L, RATE_SKILL, \"rateSkill\", 1);\n\tloadIntConfig(L, RATE_SPAWN, \"rateSpawn\", 1);\n\tloadIntConfig(L, RED_SKULL_DURATION, \"redSkullDuration\", 30);\n\tloadIntConfig(L, REWARD_CHEST_MAX_COLLECT_ITEMS, \"rewardChestMaxCollectItems\", 200);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a9780589ca147e0edf249b3b8ef38646feae58d243630ea0a48816fca9117d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 308, + "startColumn": 2, + "charOffset": 19521, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 306, + "startColumn": 2, + "charOffset": 19426, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, RATE_SKILL, \"rateSkill\", 1);\n\tloadIntConfig(L, RATE_SPAWN, \"rateSpawn\", 1);\n\tloadIntConfig(L, RED_SKULL_DURATION, \"redSkullDuration\", 30);\n\tloadIntConfig(L, REWARD_CHEST_MAX_COLLECT_ITEMS, \"rewardChestMaxCollectItems\", 200);\n\tloadIntConfig(L, SAVE_INTERVAL_TIME, \"saveIntervalTime\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0855736ccd1904d9e5b34113b757e59b711ec3af7133544a3eebedc94b14bc8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 308, + "startColumn": 59, + "charOffset": 19578, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 306, + "startColumn": 59, + "charOffset": 19426, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, RATE_SKILL, \"rateSkill\", 1);\n\tloadIntConfig(L, RATE_SPAWN, \"rateSpawn\", 1);\n\tloadIntConfig(L, RED_SKULL_DURATION, \"redSkullDuration\", 30);\n\tloadIntConfig(L, REWARD_CHEST_MAX_COLLECT_ITEMS, \"rewardChestMaxCollectItems\", 200);\n\tloadIntConfig(L, SAVE_INTERVAL_TIME, \"saveIntervalTime\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc1332dfc3c3926a2703e5e6ebf30a23512017a6cb362c8ffd557c7cfe633882" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 309, + "startColumn": 2, + "charOffset": 19584, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 307, + "startColumn": 2, + "charOffset": 19473, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, RATE_SPAWN, \"rateSpawn\", 1);\n\tloadIntConfig(L, RED_SKULL_DURATION, \"redSkullDuration\", 30);\n\tloadIntConfig(L, REWARD_CHEST_MAX_COLLECT_ITEMS, \"rewardChestMaxCollectItems\", 200);\n\tloadIntConfig(L, SAVE_INTERVAL_TIME, \"saveIntervalTime\", 1);\n\tloadIntConfig(L, STAIRHOP_DELAY, \"stairJumpExhaustion\", 2000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0979267b4bf6441d3460b310dcb0d7d3e4befb484503205d6b52d7992d80234e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 309, + "startColumn": 81, + "charOffset": 19663, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 307, + "startColumn": 81, + "charOffset": 19473, + "charLength": 3, + "snippet": { + "text": "\tloadIntConfig(L, RATE_SPAWN, \"rateSpawn\", 1);\n\tloadIntConfig(L, RED_SKULL_DURATION, \"redSkullDuration\", 30);\n\tloadIntConfig(L, REWARD_CHEST_MAX_COLLECT_ITEMS, \"rewardChestMaxCollectItems\", 200);\n\tloadIntConfig(L, SAVE_INTERVAL_TIME, \"saveIntervalTime\", 1);\n\tloadIntConfig(L, STAIRHOP_DELAY, \"stairJumpExhaustion\", 2000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bcf1abf773f3a6ca67628b23c4e2fc3415696c570d5103ac0ec8089373cb99d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 310, + "startColumn": 2, + "charOffset": 19670, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 308, + "startColumn": 2, + "charOffset": 19520, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, RED_SKULL_DURATION, \"redSkullDuration\", 30);\n\tloadIntConfig(L, REWARD_CHEST_MAX_COLLECT_ITEMS, \"rewardChestMaxCollectItems\", 200);\n\tloadIntConfig(L, SAVE_INTERVAL_TIME, \"saveIntervalTime\", 1);\n\tloadIntConfig(L, STAIRHOP_DELAY, \"stairJumpExhaustion\", 2000);\n\tloadIntConfig(L, STAMINA_GREEN_DELAY, \"staminaGreenDelay\", 5);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32c94d5b66ef00e448dd2788961bca5aaebaf0ba672e7dfdc17a7f0ef0af16be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 311, + "startColumn": 2, + "charOffset": 19732, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 309, + "startColumn": 2, + "charOffset": 19583, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, REWARD_CHEST_MAX_COLLECT_ITEMS, \"rewardChestMaxCollectItems\", 200);\n\tloadIntConfig(L, SAVE_INTERVAL_TIME, \"saveIntervalTime\", 1);\n\tloadIntConfig(L, STAIRHOP_DELAY, \"stairJumpExhaustion\", 2000);\n\tloadIntConfig(L, STAMINA_GREEN_DELAY, \"staminaGreenDelay\", 5);\n\tloadIntConfig(L, STAMINA_ORANGE_DELAY, \"staminaOrangeDelay\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a4a9e7450d0a481a96f754b37e38b648760139fed3f0d0bb774f6043ba78949" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 311, + "startColumn": 58, + "charOffset": 19788, + "charLength": 4, + "snippet": { + "text": "2000" + } + }, + "contextRegion": { + "startLine": 309, + "startColumn": 58, + "charOffset": 19583, + "charLength": 4, + "snippet": { + "text": "\tloadIntConfig(L, REWARD_CHEST_MAX_COLLECT_ITEMS, \"rewardChestMaxCollectItems\", 200);\n\tloadIntConfig(L, SAVE_INTERVAL_TIME, \"saveIntervalTime\", 1);\n\tloadIntConfig(L, STAIRHOP_DELAY, \"stairJumpExhaustion\", 2000);\n\tloadIntConfig(L, STAMINA_GREEN_DELAY, \"staminaGreenDelay\", 5);\n\tloadIntConfig(L, STAMINA_ORANGE_DELAY, \"staminaOrangeDelay\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ba005b00fdd3ab6bfbdabd24c03dc940e6ea6a0e093f3997ce2616a5f1be245" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 312, + "startColumn": 2, + "charOffset": 19796, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 310, + "startColumn": 2, + "charOffset": 19669, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, SAVE_INTERVAL_TIME, \"saveIntervalTime\", 1);\n\tloadIntConfig(L, STAIRHOP_DELAY, \"stairJumpExhaustion\", 2000);\n\tloadIntConfig(L, STAMINA_GREEN_DELAY, \"staminaGreenDelay\", 5);\n\tloadIntConfig(L, STAMINA_ORANGE_DELAY, \"staminaOrangeDelay\", 1);\n\tloadIntConfig(L, STAMINA_PZ_GAIN, \"staminaPzGain\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "427fd11912b35387252f5b6e3ef0173344202e08281208c76428213603c274e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 312, + "startColumn": 61, + "charOffset": 19855, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 310, + "startColumn": 61, + "charOffset": 19669, + "charLength": 1, + "snippet": { + "text": "\tloadIntConfig(L, SAVE_INTERVAL_TIME, \"saveIntervalTime\", 1);\n\tloadIntConfig(L, STAIRHOP_DELAY, \"stairJumpExhaustion\", 2000);\n\tloadIntConfig(L, STAMINA_GREEN_DELAY, \"staminaGreenDelay\", 5);\n\tloadIntConfig(L, STAMINA_ORANGE_DELAY, \"staminaOrangeDelay\", 1);\n\tloadIntConfig(L, STAMINA_PZ_GAIN, \"staminaPzGain\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06e62395360d8034df0e997f163ec40b8769db2ca9f91822ee478ae25e3e2a4d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 313, + "startColumn": 2, + "charOffset": 19860, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 311, + "startColumn": 2, + "charOffset": 19731, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, STAIRHOP_DELAY, \"stairJumpExhaustion\", 2000);\n\tloadIntConfig(L, STAMINA_GREEN_DELAY, \"staminaGreenDelay\", 5);\n\tloadIntConfig(L, STAMINA_ORANGE_DELAY, \"staminaOrangeDelay\", 1);\n\tloadIntConfig(L, STAMINA_PZ_GAIN, \"staminaPzGain\", 1);\n\tloadIntConfig(L, STAMINA_TRAINER_DELAY, \"staminaTrainerDelay\", 5);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00f8266018709e0dae110a9db12659a46142fd2f6697f9cc69f56b64dd516b6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 314, + "startColumn": 2, + "charOffset": 19926, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 312, + "startColumn": 2, + "charOffset": 19795, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, STAMINA_GREEN_DELAY, \"staminaGreenDelay\", 5);\n\tloadIntConfig(L, STAMINA_ORANGE_DELAY, \"staminaOrangeDelay\", 1);\n\tloadIntConfig(L, STAMINA_PZ_GAIN, \"staminaPzGain\", 1);\n\tloadIntConfig(L, STAMINA_TRAINER_DELAY, \"staminaTrainerDelay\", 5);\n\tloadIntConfig(L, STAMINA_TRAINER_GAIN, \"staminaTrainerGain\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32c94d5b66ef00e448dd2788961bca5aaebaf0ba672e7dfdc17a7f0ef0af16be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 315, + "startColumn": 2, + "charOffset": 19982, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 313, + "startColumn": 2, + "charOffset": 19859, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, STAMINA_ORANGE_DELAY, \"staminaOrangeDelay\", 1);\n\tloadIntConfig(L, STAMINA_PZ_GAIN, \"staminaPzGain\", 1);\n\tloadIntConfig(L, STAMINA_TRAINER_DELAY, \"staminaTrainerDelay\", 5);\n\tloadIntConfig(L, STAMINA_TRAINER_GAIN, \"staminaTrainerGain\", 1);\n\tloadFloatConfig(L, PARTY_SHARE_RANGE_MULTIPLIER, \"partyShareRangeMultiplier\", 1.5f);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "325042e60e07c22a118abb232dfdfaf5d4a60d9fb16ea7a22aee77f33a703b0f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 315, + "startColumn": 65, + "charOffset": 20045, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 313, + "startColumn": 65, + "charOffset": 19859, + "charLength": 1, + "snippet": { + "text": "\tloadIntConfig(L, STAMINA_ORANGE_DELAY, \"staminaOrangeDelay\", 1);\n\tloadIntConfig(L, STAMINA_PZ_GAIN, \"staminaPzGain\", 1);\n\tloadIntConfig(L, STAMINA_TRAINER_DELAY, \"staminaTrainerDelay\", 5);\n\tloadIntConfig(L, STAMINA_TRAINER_GAIN, \"staminaTrainerGain\", 1);\n\tloadFloatConfig(L, PARTY_SHARE_RANGE_MULTIPLIER, \"partyShareRangeMultiplier\", 1.5f);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d779222cd2136d5e5f8e8f84aab29ef041296f7387f9d9d6ecb5ea5020660b2a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 316, + "startColumn": 2, + "charOffset": 20050, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 314, + "startColumn": 2, + "charOffset": 19925, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, STAMINA_PZ_GAIN, \"staminaPzGain\", 1);\n\tloadIntConfig(L, STAMINA_TRAINER_DELAY, \"staminaTrainerDelay\", 5);\n\tloadIntConfig(L, STAMINA_TRAINER_GAIN, \"staminaTrainerGain\", 1);\n\tloadFloatConfig(L, PARTY_SHARE_RANGE_MULTIPLIER, \"partyShareRangeMultiplier\", 1.5f);\n\tloadIntConfig(L, START_STREAK_LEVEL, \"startStreakLevel\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c28dd52acbc83a563813b3635ddd45063d37085d9cc5d05c5e59dacf5bcb5836" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 317, + "startColumn": 2, + "charOffset": 20116, + "charLength": 15, + "snippet": { + "text": "loadFloatConfig" + } + }, + "contextRegion": { + "startLine": 315, + "startColumn": 2, + "charOffset": 19981, + "charLength": 15, + "snippet": { + "text": "\tloadIntConfig(L, STAMINA_TRAINER_DELAY, \"staminaTrainerDelay\", 5);\n\tloadIntConfig(L, STAMINA_TRAINER_GAIN, \"staminaTrainerGain\", 1);\n\tloadFloatConfig(L, PARTY_SHARE_RANGE_MULTIPLIER, \"partyShareRangeMultiplier\", 1.5f);\n\tloadIntConfig(L, START_STREAK_LEVEL, \"startStreakLevel\", 0);\n\tloadIntConfig(L, STATUSQUERY_TIMEOUT, \"statusTimeout\", 5000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00f8266018709e0dae110a9db12659a46142fd2f6697f9cc69f56b64dd516b6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 317, + "startColumn": 80, + "charOffset": 20194, + "charLength": 4, + "snippet": { + "text": "1.5f" + } + }, + "contextRegion": { + "startLine": 315, + "startColumn": 80, + "charOffset": 19981, + "charLength": 4, + "snippet": { + "text": "\tloadIntConfig(L, STAMINA_TRAINER_DELAY, \"staminaTrainerDelay\", 5);\n\tloadIntConfig(L, STAMINA_TRAINER_GAIN, \"staminaTrainerGain\", 1);\n\tloadFloatConfig(L, PARTY_SHARE_RANGE_MULTIPLIER, \"partyShareRangeMultiplier\", 1.5f);\n\tloadIntConfig(L, START_STREAK_LEVEL, \"startStreakLevel\", 0);\n\tloadIntConfig(L, STATUSQUERY_TIMEOUT, \"statusTimeout\", 5000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82dc25cac5cbda2bb9049b9e990a81a3206d97dfb187dc7ca42c2d02177d3aeb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 317, + "startColumn": 80, + "charOffset": 20194, + "charLength": 4, + "snippet": { + "text": "1.5f" + } + }, + "contextRegion": { + "startLine": 315, + "startColumn": 80, + "charOffset": 19981, + "charLength": 4, + "snippet": { + "text": "\tloadIntConfig(L, STAMINA_TRAINER_DELAY, \"staminaTrainerDelay\", 5);\n\tloadIntConfig(L, STAMINA_TRAINER_GAIN, \"staminaTrainerGain\", 1);\n\tloadFloatConfig(L, PARTY_SHARE_RANGE_MULTIPLIER, \"partyShareRangeMultiplier\", 1.5f);\n\tloadIntConfig(L, START_STREAK_LEVEL, \"startStreakLevel\", 0);\n\tloadIntConfig(L, STATUSQUERY_TIMEOUT, \"statusTimeout\", 5000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48e8209517457e1f3199e90746e1cf52f50c0e6db84576b613f2cf3623395ac5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1.5f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 317, + "startColumn": 80, + "charOffset": 20194, + "charLength": 4, + "snippet": { + "text": "1.5f" + } + }, + "contextRegion": { + "startLine": 315, + "startColumn": 80, + "charOffset": 19981, + "charLength": 4, + "snippet": { + "text": "\tloadIntConfig(L, STAMINA_TRAINER_DELAY, \"staminaTrainerDelay\", 5);\n\tloadIntConfig(L, STAMINA_TRAINER_GAIN, \"staminaTrainerGain\", 1);\n\tloadFloatConfig(L, PARTY_SHARE_RANGE_MULTIPLIER, \"partyShareRangeMultiplier\", 1.5f);\n\tloadIntConfig(L, START_STREAK_LEVEL, \"startStreakLevel\", 0);\n\tloadIntConfig(L, STATUSQUERY_TIMEOUT, \"statusTimeout\", 5000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a4a3d25d629fb977bc89ca9fd92a1c390f292b934fa352fea70ff6106de9764" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 318, + "startColumn": 2, + "charOffset": 20202, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 316, + "startColumn": 2, + "charOffset": 20049, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, STAMINA_TRAINER_GAIN, \"staminaTrainerGain\", 1);\n\tloadFloatConfig(L, PARTY_SHARE_RANGE_MULTIPLIER, \"partyShareRangeMultiplier\", 1.5f);\n\tloadIntConfig(L, START_STREAK_LEVEL, \"startStreakLevel\", 0);\n\tloadIntConfig(L, STATUSQUERY_TIMEOUT, \"statusTimeout\", 5000);\n\tloadIntConfig(L, STORE_COIN_PACKET, \"coinPacketSize\", 25);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b4d9853ecd603aaf17effafac057dbcb9e4500029a60545ee871aa467b031b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 319, + "startColumn": 2, + "charOffset": 20264, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 317, + "startColumn": 2, + "charOffset": 20115, + "charLength": 13, + "snippet": { + "text": "\tloadFloatConfig(L, PARTY_SHARE_RANGE_MULTIPLIER, \"partyShareRangeMultiplier\", 1.5f);\n\tloadIntConfig(L, START_STREAK_LEVEL, \"startStreakLevel\", 0);\n\tloadIntConfig(L, STATUSQUERY_TIMEOUT, \"statusTimeout\", 5000);\n\tloadIntConfig(L, STORE_COIN_PACKET, \"coinPacketSize\", 25);\n\tloadIntConfig(L, STOREINBOX_MAXLIMIT, \"storeInboxMaxLimit\", 2000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c461b4313b3989ae8fcf64d51fae7f2b9e0bbfbb1cc69c7a9aef31b0eeb9415" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 319, + "startColumn": 57, + "charOffset": 20319, + "charLength": 4, + "snippet": { + "text": "5000" + } + }, + "contextRegion": { + "startLine": 317, + "startColumn": 57, + "charOffset": 20115, + "charLength": 4, + "snippet": { + "text": "\tloadFloatConfig(L, PARTY_SHARE_RANGE_MULTIPLIER, \"partyShareRangeMultiplier\", 1.5f);\n\tloadIntConfig(L, START_STREAK_LEVEL, \"startStreakLevel\", 0);\n\tloadIntConfig(L, STATUSQUERY_TIMEOUT, \"statusTimeout\", 5000);\n\tloadIntConfig(L, STORE_COIN_PACKET, \"coinPacketSize\", 25);\n\tloadIntConfig(L, STOREINBOX_MAXLIMIT, \"storeInboxMaxLimit\", 2000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0d4168c1a7acdb0b3c15c428dcf0100a1d3eac2d27744faaa503d4b452f2112" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 320, + "startColumn": 2, + "charOffset": 20327, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 318, + "startColumn": 2, + "charOffset": 20201, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, START_STREAK_LEVEL, \"startStreakLevel\", 0);\n\tloadIntConfig(L, STATUSQUERY_TIMEOUT, \"statusTimeout\", 5000);\n\tloadIntConfig(L, STORE_COIN_PACKET, \"coinPacketSize\", 25);\n\tloadIntConfig(L, STOREINBOX_MAXLIMIT, \"storeInboxMaxLimit\", 2000);\n\tloadIntConfig(L, T_CONST, \"temporaryConst\", 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2118a10f9dcc2c970be56905057229d242c8a5336dfd7adca45c28337cec31e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 320, + "startColumn": 56, + "charOffset": 20381, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 318, + "startColumn": 56, + "charOffset": 20201, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, START_STREAK_LEVEL, \"startStreakLevel\", 0);\n\tloadIntConfig(L, STATUSQUERY_TIMEOUT, \"statusTimeout\", 5000);\n\tloadIntConfig(L, STORE_COIN_PACKET, \"coinPacketSize\", 25);\n\tloadIntConfig(L, STOREINBOX_MAXLIMIT, \"storeInboxMaxLimit\", 2000);\n\tloadIntConfig(L, T_CONST, \"temporaryConst\", 2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54c5d73fce95d0ca8a9746d8f81717d97006bef948413a238b03b90a3750ea47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 321, + "startColumn": 2, + "charOffset": 20387, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 319, + "startColumn": 2, + "charOffset": 20263, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, STATUSQUERY_TIMEOUT, \"statusTimeout\", 5000);\n\tloadIntConfig(L, STORE_COIN_PACKET, \"coinPacketSize\", 25);\n\tloadIntConfig(L, STOREINBOX_MAXLIMIT, \"storeInboxMaxLimit\", 2000);\n\tloadIntConfig(L, T_CONST, \"temporaryConst\", 2);\n\tloadIntConfig(L, TASK_HUNTING_BONUS_REROLL_PRICE, \"taskHuntingBonusRerollPrice\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b8ac4dd4812d17e4deee87e3a221a098d47a8cbe80d1677bb3896786d2ebd08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 321, + "startColumn": 62, + "charOffset": 20447, + "charLength": 4, + "snippet": { + "text": "2000" + } + }, + "contextRegion": { + "startLine": 319, + "startColumn": 62, + "charOffset": 20263, + "charLength": 4, + "snippet": { + "text": "\tloadIntConfig(L, STATUSQUERY_TIMEOUT, \"statusTimeout\", 5000);\n\tloadIntConfig(L, STORE_COIN_PACKET, \"coinPacketSize\", 25);\n\tloadIntConfig(L, STOREINBOX_MAXLIMIT, \"storeInboxMaxLimit\", 2000);\n\tloadIntConfig(L, T_CONST, \"temporaryConst\", 2);\n\tloadIntConfig(L, TASK_HUNTING_BONUS_REROLL_PRICE, \"taskHuntingBonusRerollPrice\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "769e00356afc1c1287d01ebc8e7513b65163bc78665a913df91ff12d46922ce5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 322, + "startColumn": 2, + "charOffset": 20455, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 320, + "startColumn": 2, + "charOffset": 20326, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, STORE_COIN_PACKET, \"coinPacketSize\", 25);\n\tloadIntConfig(L, STOREINBOX_MAXLIMIT, \"storeInboxMaxLimit\", 2000);\n\tloadIntConfig(L, T_CONST, \"temporaryConst\", 2);\n\tloadIntConfig(L, TASK_HUNTING_BONUS_REROLL_PRICE, \"taskHuntingBonusRerollPrice\", 1);\n\tloadIntConfig(L, TASK_HUNTING_FREE_REROLL_TIME, \"taskHuntingFreeRerollTime\", 72000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8fa4f4d1bf1e8c9610bef409211a41efda91fd47b551f8342188e469b4af9472" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 323, + "startColumn": 2, + "charOffset": 20504, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 321, + "startColumn": 2, + "charOffset": 20386, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, STOREINBOX_MAXLIMIT, \"storeInboxMaxLimit\", 2000);\n\tloadIntConfig(L, T_CONST, \"temporaryConst\", 2);\n\tloadIntConfig(L, TASK_HUNTING_BONUS_REROLL_PRICE, \"taskHuntingBonusRerollPrice\", 1);\n\tloadIntConfig(L, TASK_HUNTING_FREE_REROLL_TIME, \"taskHuntingFreeRerollTime\", 72000);\n\tloadIntConfig(L, TASK_HUNTING_LIMIT_EXHAUST, \"taskHuntingLimitedTasksExhaust\", 72000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa123017a59beaaf8a2d93d4c5f5079effe91b11ba0b5a9a411de33aa71f0e01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 324, + "startColumn": 2, + "charOffset": 20590, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 322, + "startColumn": 2, + "charOffset": 20454, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, T_CONST, \"temporaryConst\", 2);\n\tloadIntConfig(L, TASK_HUNTING_BONUS_REROLL_PRICE, \"taskHuntingBonusRerollPrice\", 1);\n\tloadIntConfig(L, TASK_HUNTING_FREE_REROLL_TIME, \"taskHuntingFreeRerollTime\", 72000);\n\tloadIntConfig(L, TASK_HUNTING_LIMIT_EXHAUST, \"taskHuntingLimitedTasksExhaust\", 72000);\n\tloadIntConfig(L, TASK_HUNTING_REROLL_PRICE_LEVEL, \"taskHuntingRerollPricePerLevel\", 200);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a04345a861937196afed3e6e7ef352f4eb5c1ddc12fc5b3aaa4eb65e27d248e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "72000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 324, + "startColumn": 79, + "charOffset": 20667, + "charLength": 5, + "snippet": { + "text": "72000" + } + }, + "contextRegion": { + "startLine": 322, + "startColumn": 79, + "charOffset": 20454, + "charLength": 5, + "snippet": { + "text": "\tloadIntConfig(L, T_CONST, \"temporaryConst\", 2);\n\tloadIntConfig(L, TASK_HUNTING_BONUS_REROLL_PRICE, \"taskHuntingBonusRerollPrice\", 1);\n\tloadIntConfig(L, TASK_HUNTING_FREE_REROLL_TIME, \"taskHuntingFreeRerollTime\", 72000);\n\tloadIntConfig(L, TASK_HUNTING_LIMIT_EXHAUST, \"taskHuntingLimitedTasksExhaust\", 72000);\n\tloadIntConfig(L, TASK_HUNTING_REROLL_PRICE_LEVEL, \"taskHuntingRerollPricePerLevel\", 200);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a945b6d119053f5a78ac37c7f74e1762a715b41343feb8bb9bd46aa87f25eef6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 325, + "startColumn": 2, + "charOffset": 20676, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 323, + "startColumn": 2, + "charOffset": 20503, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, TASK_HUNTING_BONUS_REROLL_PRICE, \"taskHuntingBonusRerollPrice\", 1);\n\tloadIntConfig(L, TASK_HUNTING_FREE_REROLL_TIME, \"taskHuntingFreeRerollTime\", 72000);\n\tloadIntConfig(L, TASK_HUNTING_LIMIT_EXHAUST, \"taskHuntingLimitedTasksExhaust\", 72000);\n\tloadIntConfig(L, TASK_HUNTING_REROLL_PRICE_LEVEL, \"taskHuntingRerollPricePerLevel\", 200);\n\tloadIntConfig(L, TASK_HUNTING_SELECTION_LIST_PRICE, \"taskHuntingSelectListPrice\", 5);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c40eae302b8fe575e7863a234119f0db706ab252514d051d1cf422ea23a54738" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "72000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 325, + "startColumn": 81, + "charOffset": 20755, + "charLength": 5, + "snippet": { + "text": "72000" + } + }, + "contextRegion": { + "startLine": 323, + "startColumn": 81, + "charOffset": 20503, + "charLength": 5, + "snippet": { + "text": "\tloadIntConfig(L, TASK_HUNTING_BONUS_REROLL_PRICE, \"taskHuntingBonusRerollPrice\", 1);\n\tloadIntConfig(L, TASK_HUNTING_FREE_REROLL_TIME, \"taskHuntingFreeRerollTime\", 72000);\n\tloadIntConfig(L, TASK_HUNTING_LIMIT_EXHAUST, \"taskHuntingLimitedTasksExhaust\", 72000);\n\tloadIntConfig(L, TASK_HUNTING_REROLL_PRICE_LEVEL, \"taskHuntingRerollPricePerLevel\", 200);\n\tloadIntConfig(L, TASK_HUNTING_SELECTION_LIST_PRICE, \"taskHuntingSelectListPrice\", 5);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "216f501f26f2d3f846f3413fb15ba9a67c379dad76a640474c76bd4e373c0e1a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 326, + "startColumn": 2, + "charOffset": 20764, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 324, + "startColumn": 2, + "charOffset": 20589, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, TASK_HUNTING_FREE_REROLL_TIME, \"taskHuntingFreeRerollTime\", 72000);\n\tloadIntConfig(L, TASK_HUNTING_LIMIT_EXHAUST, \"taskHuntingLimitedTasksExhaust\", 72000);\n\tloadIntConfig(L, TASK_HUNTING_REROLL_PRICE_LEVEL, \"taskHuntingRerollPricePerLevel\", 200);\n\tloadIntConfig(L, TASK_HUNTING_SELECTION_LIST_PRICE, \"taskHuntingSelectListPrice\", 5);\n\tloadIntConfig(L, TIBIADROME_CONCOCTION_COOLDOWN, \"tibiadromeConcoctionCooldown\", 24 * 60 * 60);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58b04eba7e0ebee7568926968b2b9f1cd69c701d92fd1e485586020077e60568" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 326, + "startColumn": 86, + "charOffset": 20848, + "charLength": 3, + "snippet": { + "text": "200" + } + }, + "contextRegion": { + "startLine": 324, + "startColumn": 86, + "charOffset": 20589, + "charLength": 3, + "snippet": { + "text": "\tloadIntConfig(L, TASK_HUNTING_FREE_REROLL_TIME, \"taskHuntingFreeRerollTime\", 72000);\n\tloadIntConfig(L, TASK_HUNTING_LIMIT_EXHAUST, \"taskHuntingLimitedTasksExhaust\", 72000);\n\tloadIntConfig(L, TASK_HUNTING_REROLL_PRICE_LEVEL, \"taskHuntingRerollPricePerLevel\", 200);\n\tloadIntConfig(L, TASK_HUNTING_SELECTION_LIST_PRICE, \"taskHuntingSelectListPrice\", 5);\n\tloadIntConfig(L, TIBIADROME_CONCOCTION_COOLDOWN, \"tibiadromeConcoctionCooldown\", 24 * 60 * 60);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b328b23b17d7c54cf421be8e177a8cda89147429604b923b5d9315406c289b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 327, + "startColumn": 2, + "charOffset": 20855, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 325, + "startColumn": 2, + "charOffset": 20675, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, TASK_HUNTING_LIMIT_EXHAUST, \"taskHuntingLimitedTasksExhaust\", 72000);\n\tloadIntConfig(L, TASK_HUNTING_REROLL_PRICE_LEVEL, \"taskHuntingRerollPricePerLevel\", 200);\n\tloadIntConfig(L, TASK_HUNTING_SELECTION_LIST_PRICE, \"taskHuntingSelectListPrice\", 5);\n\tloadIntConfig(L, TIBIADROME_CONCOCTION_COOLDOWN, \"tibiadromeConcoctionCooldown\", 24 * 60 * 60);\n\tloadIntConfig(L, TIBIADROME_CONCOCTION_DURATION, \"tibiadromeConcoctionDuration\", 1 * 60 * 60);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb0963ab4bcce057831214d1460939f5217276807cc5e08a6b988e4cc7403a75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 327, + "startColumn": 84, + "charOffset": 20937, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 325, + "startColumn": 84, + "charOffset": 20675, + "charLength": 1, + "snippet": { + "text": "\tloadIntConfig(L, TASK_HUNTING_LIMIT_EXHAUST, \"taskHuntingLimitedTasksExhaust\", 72000);\n\tloadIntConfig(L, TASK_HUNTING_REROLL_PRICE_LEVEL, \"taskHuntingRerollPricePerLevel\", 200);\n\tloadIntConfig(L, TASK_HUNTING_SELECTION_LIST_PRICE, \"taskHuntingSelectListPrice\", 5);\n\tloadIntConfig(L, TIBIADROME_CONCOCTION_COOLDOWN, \"tibiadromeConcoctionCooldown\", 24 * 60 * 60);\n\tloadIntConfig(L, TIBIADROME_CONCOCTION_DURATION, \"tibiadromeConcoctionDuration\", 1 * 60 * 60);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8ae881a20093f26491afc8ee5c7c9ad139f7c2f8e7a2221b35914f1c85317f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 328, + "startColumn": 2, + "charOffset": 20942, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 326, + "startColumn": 2, + "charOffset": 20763, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, TASK_HUNTING_REROLL_PRICE_LEVEL, \"taskHuntingRerollPricePerLevel\", 200);\n\tloadIntConfig(L, TASK_HUNTING_SELECTION_LIST_PRICE, \"taskHuntingSelectListPrice\", 5);\n\tloadIntConfig(L, TIBIADROME_CONCOCTION_COOLDOWN, \"tibiadromeConcoctionCooldown\", 24 * 60 * 60);\n\tloadIntConfig(L, TIBIADROME_CONCOCTION_DURATION, \"tibiadromeConcoctionDuration\", 1 * 60 * 60);\n\tloadIntConfig(L, TRANSCENDANCE_AVATAR_DURATION, \"transcendanceAvatarDuration\", 7000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5592adf44a00865616cc1be6e5ae5873e53c7bef107a06415a6b186ff2d4b2ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 328, + "startColumn": 83, + "charOffset": 21023, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 326, + "startColumn": 83, + "charOffset": 20763, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, TASK_HUNTING_REROLL_PRICE_LEVEL, \"taskHuntingRerollPricePerLevel\", 200);\n\tloadIntConfig(L, TASK_HUNTING_SELECTION_LIST_PRICE, \"taskHuntingSelectListPrice\", 5);\n\tloadIntConfig(L, TIBIADROME_CONCOCTION_COOLDOWN, \"tibiadromeConcoctionCooldown\", 24 * 60 * 60);\n\tloadIntConfig(L, TIBIADROME_CONCOCTION_DURATION, \"tibiadromeConcoctionDuration\", 1 * 60 * 60);\n\tloadIntConfig(L, TRANSCENDANCE_AVATAR_DURATION, \"transcendanceAvatarDuration\", 7000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e52a638dbcc168df6ef19698d03df462921d1f9da4798ca502eb2f74ba90f4f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 328, + "startColumn": 88, + "charOffset": 21028, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 326, + "startColumn": 88, + "charOffset": 20763, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, TASK_HUNTING_REROLL_PRICE_LEVEL, \"taskHuntingRerollPricePerLevel\", 200);\n\tloadIntConfig(L, TASK_HUNTING_SELECTION_LIST_PRICE, \"taskHuntingSelectListPrice\", 5);\n\tloadIntConfig(L, TIBIADROME_CONCOCTION_COOLDOWN, \"tibiadromeConcoctionCooldown\", 24 * 60 * 60);\n\tloadIntConfig(L, TIBIADROME_CONCOCTION_DURATION, \"tibiadromeConcoctionDuration\", 1 * 60 * 60);\n\tloadIntConfig(L, TRANSCENDANCE_AVATAR_DURATION, \"transcendanceAvatarDuration\", 7000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a954f1a50090653842384cfb555ce76cb024f8dc2d204baadf3611b599725371" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 328, + "startColumn": 93, + "charOffset": 21033, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 326, + "startColumn": 93, + "charOffset": 20763, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, TASK_HUNTING_REROLL_PRICE_LEVEL, \"taskHuntingRerollPricePerLevel\", 200);\n\tloadIntConfig(L, TASK_HUNTING_SELECTION_LIST_PRICE, \"taskHuntingSelectListPrice\", 5);\n\tloadIntConfig(L, TIBIADROME_CONCOCTION_COOLDOWN, \"tibiadromeConcoctionCooldown\", 24 * 60 * 60);\n\tloadIntConfig(L, TIBIADROME_CONCOCTION_DURATION, \"tibiadromeConcoctionDuration\", 1 * 60 * 60);\n\tloadIntConfig(L, TRANSCENDANCE_AVATAR_DURATION, \"transcendanceAvatarDuration\", 7000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "827f5abb13be0ef6290506b8b36185db5178e85bc75ba0f13d1b0bbdd110f03b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 329, + "startColumn": 2, + "charOffset": 21039, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 327, + "startColumn": 2, + "charOffset": 20854, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, TASK_HUNTING_SELECTION_LIST_PRICE, \"taskHuntingSelectListPrice\", 5);\n\tloadIntConfig(L, TIBIADROME_CONCOCTION_COOLDOWN, \"tibiadromeConcoctionCooldown\", 24 * 60 * 60);\n\tloadIntConfig(L, TIBIADROME_CONCOCTION_DURATION, \"tibiadromeConcoctionDuration\", 1 * 60 * 60);\n\tloadIntConfig(L, TRANSCENDANCE_AVATAR_DURATION, \"transcendanceAvatarDuration\", 7000);\n\tloadIntConfig(L, VIP_BONUS_EXP, \"vipBonusExp\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3fafe099949f950c2d9ce1ee021d45aee642aee67ebccfc808845766e5a3621" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 329, + "startColumn": 87, + "charOffset": 21124, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 327, + "startColumn": 87, + "charOffset": 20854, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, TASK_HUNTING_SELECTION_LIST_PRICE, \"taskHuntingSelectListPrice\", 5);\n\tloadIntConfig(L, TIBIADROME_CONCOCTION_COOLDOWN, \"tibiadromeConcoctionCooldown\", 24 * 60 * 60);\n\tloadIntConfig(L, TIBIADROME_CONCOCTION_DURATION, \"tibiadromeConcoctionDuration\", 1 * 60 * 60);\n\tloadIntConfig(L, TRANSCENDANCE_AVATAR_DURATION, \"transcendanceAvatarDuration\", 7000);\n\tloadIntConfig(L, VIP_BONUS_EXP, \"vipBonusExp\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04aa364c616fe93a9bf0e40e7316f9f4cb1acf6bdaa08ce81060663000764a3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 329, + "startColumn": 92, + "charOffset": 21129, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 327, + "startColumn": 92, + "charOffset": 20854, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, TASK_HUNTING_SELECTION_LIST_PRICE, \"taskHuntingSelectListPrice\", 5);\n\tloadIntConfig(L, TIBIADROME_CONCOCTION_COOLDOWN, \"tibiadromeConcoctionCooldown\", 24 * 60 * 60);\n\tloadIntConfig(L, TIBIADROME_CONCOCTION_DURATION, \"tibiadromeConcoctionDuration\", 1 * 60 * 60);\n\tloadIntConfig(L, TRANSCENDANCE_AVATAR_DURATION, \"transcendanceAvatarDuration\", 7000);\n\tloadIntConfig(L, VIP_BONUS_EXP, \"vipBonusExp\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a30b59a969113761b2e3fb365f0f3f85d8b992847ed9f30315c4c4f8ddc6197a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 330, + "startColumn": 2, + "charOffset": 21135, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 328, + "startColumn": 2, + "charOffset": 20941, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, TIBIADROME_CONCOCTION_COOLDOWN, \"tibiadromeConcoctionCooldown\", 24 * 60 * 60);\n\tloadIntConfig(L, TIBIADROME_CONCOCTION_DURATION, \"tibiadromeConcoctionDuration\", 1 * 60 * 60);\n\tloadIntConfig(L, TRANSCENDANCE_AVATAR_DURATION, \"transcendanceAvatarDuration\", 7000);\n\tloadIntConfig(L, VIP_BONUS_EXP, \"vipBonusExp\", 0);\n\tloadIntConfig(L, VIP_BONUS_LOOT, \"vipBonusLoot\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "947c5a7ea2e9320cd43f2f4af4d85e0ecc8a56a0ba7331b5f7fbc30972c90ce5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 330, + "startColumn": 81, + "charOffset": 21214, + "charLength": 4, + "snippet": { + "text": "7000" + } + }, + "contextRegion": { + "startLine": 328, + "startColumn": 81, + "charOffset": 20941, + "charLength": 4, + "snippet": { + "text": "\tloadIntConfig(L, TIBIADROME_CONCOCTION_COOLDOWN, \"tibiadromeConcoctionCooldown\", 24 * 60 * 60);\n\tloadIntConfig(L, TIBIADROME_CONCOCTION_DURATION, \"tibiadromeConcoctionDuration\", 1 * 60 * 60);\n\tloadIntConfig(L, TRANSCENDANCE_AVATAR_DURATION, \"transcendanceAvatarDuration\", 7000);\n\tloadIntConfig(L, VIP_BONUS_EXP, \"vipBonusExp\", 0);\n\tloadIntConfig(L, VIP_BONUS_LOOT, \"vipBonusLoot\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80c485247a133f0b664afea91db3c66ecab6350f47e2b764ec5f6ec8ed09e2b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 331, + "startColumn": 2, + "charOffset": 21222, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 329, + "startColumn": 2, + "charOffset": 21038, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, TIBIADROME_CONCOCTION_DURATION, \"tibiadromeConcoctionDuration\", 1 * 60 * 60);\n\tloadIntConfig(L, TRANSCENDANCE_AVATAR_DURATION, \"transcendanceAvatarDuration\", 7000);\n\tloadIntConfig(L, VIP_BONUS_EXP, \"vipBonusExp\", 0);\n\tloadIntConfig(L, VIP_BONUS_LOOT, \"vipBonusLoot\", 0);\n\tloadIntConfig(L, VIP_BONUS_SKILL, \"vipBonusSkill\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fdfcf50788c67ca380eba28f597e3383e489c064bcbf839013f92d1079cadf41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 332, + "startColumn": 2, + "charOffset": 21274, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 330, + "startColumn": 2, + "charOffset": 21134, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, TRANSCENDANCE_AVATAR_DURATION, \"transcendanceAvatarDuration\", 7000);\n\tloadIntConfig(L, VIP_BONUS_EXP, \"vipBonusExp\", 0);\n\tloadIntConfig(L, VIP_BONUS_LOOT, \"vipBonusLoot\", 0);\n\tloadIntConfig(L, VIP_BONUS_SKILL, \"vipBonusSkill\", 0);\n\tloadIntConfig(L, VIP_FAMILIAR_TIME_COOLDOWN_REDUCTION, \"vipFamiliarTimeCooldownReduction\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ec3d7af59b9b445021a05436b29e3c3da86e0e231e9ae0d41a38f2fe85035bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 333, + "startColumn": 2, + "charOffset": 21328, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 331, + "startColumn": 2, + "charOffset": 21221, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, VIP_BONUS_EXP, \"vipBonusExp\", 0);\n\tloadIntConfig(L, VIP_BONUS_LOOT, \"vipBonusLoot\", 0);\n\tloadIntConfig(L, VIP_BONUS_SKILL, \"vipBonusSkill\", 0);\n\tloadIntConfig(L, VIP_FAMILIAR_TIME_COOLDOWN_REDUCTION, \"vipFamiliarTimeCooldownReduction\", 0);\n\tloadIntConfig(L, WEEK_KILLS_TO_RED, \"weekKillsToRedSkull\", 5);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8fcda7b31bfe08e3f994e0cbbcae40343804bc26b93781058ff9ef138c446b34" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 334, + "startColumn": 2, + "charOffset": 21384, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 332, + "startColumn": 2, + "charOffset": 21273, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, VIP_BONUS_LOOT, \"vipBonusLoot\", 0);\n\tloadIntConfig(L, VIP_BONUS_SKILL, \"vipBonusSkill\", 0);\n\tloadIntConfig(L, VIP_FAMILIAR_TIME_COOLDOWN_REDUCTION, \"vipFamiliarTimeCooldownReduction\", 0);\n\tloadIntConfig(L, WEEK_KILLS_TO_RED, \"weekKillsToRedSkull\", 5);\n\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_GREATER_COST, \"wheelAtelierRevealGreaterCost\", 6000000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63bbf467dceb07659d45627140a504848e8387077be4a512ebb856ac203f64fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 335, + "startColumn": 2, + "charOffset": 21480, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 333, + "startColumn": 2, + "charOffset": 21327, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, VIP_BONUS_SKILL, \"vipBonusSkill\", 0);\n\tloadIntConfig(L, VIP_FAMILIAR_TIME_COOLDOWN_REDUCTION, \"vipFamiliarTimeCooldownReduction\", 0);\n\tloadIntConfig(L, WEEK_KILLS_TO_RED, \"weekKillsToRedSkull\", 5);\n\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_GREATER_COST, \"wheelAtelierRevealGreaterCost\", 6000000);\n\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_LESSER_COST, \"wheelAtelierRevealLesserCost\", 125000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3757b3a444f4d127d526105b25ddcdc130fb2cdc5451df98d6a4881f7baeebb4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 335, + "startColumn": 61, + "charOffset": 21539, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 333, + "startColumn": 61, + "charOffset": 21327, + "charLength": 1, + "snippet": { + "text": "\tloadIntConfig(L, VIP_BONUS_SKILL, \"vipBonusSkill\", 0);\n\tloadIntConfig(L, VIP_FAMILIAR_TIME_COOLDOWN_REDUCTION, \"vipFamiliarTimeCooldownReduction\", 0);\n\tloadIntConfig(L, WEEK_KILLS_TO_RED, \"weekKillsToRedSkull\", 5);\n\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_GREATER_COST, \"wheelAtelierRevealGreaterCost\", 6000000);\n\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_LESSER_COST, \"wheelAtelierRevealLesserCost\", 125000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c09076751f93cea04cd843dde9c78c600250ca4497f1bb4135d2e2fca0d9903" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 336, + "startColumn": 2, + "charOffset": 21544, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 334, + "startColumn": 2, + "charOffset": 21383, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, VIP_FAMILIAR_TIME_COOLDOWN_REDUCTION, \"vipFamiliarTimeCooldownReduction\", 0);\n\tloadIntConfig(L, WEEK_KILLS_TO_RED, \"weekKillsToRedSkull\", 5);\n\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_GREATER_COST, \"wheelAtelierRevealGreaterCost\", 6000000);\n\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_LESSER_COST, \"wheelAtelierRevealLesserCost\", 125000);\n\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_REGULAR_COST, \"wheelAtelierRevealRegularCost\", 1000000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c461b4313b3989ae8fcf64d51fae7f2b9e0bbfbb1cc69c7a9aef31b0eeb9415" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6000000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 336, + "startColumn": 87, + "charOffset": 21629, + "charLength": 7, + "snippet": { + "text": "6000000" + } + }, + "contextRegion": { + "startLine": 334, + "startColumn": 87, + "charOffset": 21383, + "charLength": 7, + "snippet": { + "text": "\tloadIntConfig(L, VIP_FAMILIAR_TIME_COOLDOWN_REDUCTION, \"vipFamiliarTimeCooldownReduction\", 0);\n\tloadIntConfig(L, WEEK_KILLS_TO_RED, \"weekKillsToRedSkull\", 5);\n\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_GREATER_COST, \"wheelAtelierRevealGreaterCost\", 6000000);\n\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_LESSER_COST, \"wheelAtelierRevealLesserCost\", 125000);\n\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_REGULAR_COST, \"wheelAtelierRevealRegularCost\", 1000000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0014872f88916b4fb4a2af67cd3d3f12ce893aab5546ddd95930130a64c97219" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 337, + "startColumn": 2, + "charOffset": 21640, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 335, + "startColumn": 2, + "charOffset": 21479, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, WEEK_KILLS_TO_RED, \"weekKillsToRedSkull\", 5);\n\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_GREATER_COST, \"wheelAtelierRevealGreaterCost\", 6000000);\n\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_LESSER_COST, \"wheelAtelierRevealLesserCost\", 125000);\n\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_REGULAR_COST, \"wheelAtelierRevealRegularCost\", 1000000);\n\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_GREATER_COST, \"wheelAtelierRotateGreaterCost\", 500000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63bbf467dceb07659d45627140a504848e8387077be4a512ebb856ac203f64fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "125000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 337, + "startColumn": 85, + "charOffset": 21723, + "charLength": 6, + "snippet": { + "text": "125000" + } + }, + "contextRegion": { + "startLine": 335, + "startColumn": 85, + "charOffset": 21479, + "charLength": 6, + "snippet": { + "text": "\tloadIntConfig(L, WEEK_KILLS_TO_RED, \"weekKillsToRedSkull\", 5);\n\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_GREATER_COST, \"wheelAtelierRevealGreaterCost\", 6000000);\n\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_LESSER_COST, \"wheelAtelierRevealLesserCost\", 125000);\n\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_REGULAR_COST, \"wheelAtelierRevealRegularCost\", 1000000);\n\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_GREATER_COST, \"wheelAtelierRotateGreaterCost\", 500000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e474dc84e9c57f012e41fec6a707f57cd5a73f33bc00d130ac933c14bce0321" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 338, + "startColumn": 2, + "charOffset": 21733, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 336, + "startColumn": 2, + "charOffset": 21543, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_GREATER_COST, \"wheelAtelierRevealGreaterCost\", 6000000);\n\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_LESSER_COST, \"wheelAtelierRevealLesserCost\", 125000);\n\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_REGULAR_COST, \"wheelAtelierRevealRegularCost\", 1000000);\n\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_GREATER_COST, \"wheelAtelierRotateGreaterCost\", 500000);\n\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_LESSER_COST, \"wheelAtelierRotateLesserCost\", 125000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e368647c05b2c8d029f161957539ee068030050428eaf70642aba2648339e36b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 338, + "startColumn": 87, + "charOffset": 21818, + "charLength": 7, + "snippet": { + "text": "1000000" + } + }, + "contextRegion": { + "startLine": 336, + "startColumn": 87, + "charOffset": 21543, + "charLength": 7, + "snippet": { + "text": "\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_GREATER_COST, \"wheelAtelierRevealGreaterCost\", 6000000);\n\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_LESSER_COST, \"wheelAtelierRevealLesserCost\", 125000);\n\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_REGULAR_COST, \"wheelAtelierRevealRegularCost\", 1000000);\n\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_GREATER_COST, \"wheelAtelierRotateGreaterCost\", 500000);\n\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_LESSER_COST, \"wheelAtelierRotateLesserCost\", 125000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2e43451dc69642f72be94b83a506e1f0c08f97980ff3897d5db8b828d8b8611" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 339, + "startColumn": 2, + "charOffset": 21829, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 337, + "startColumn": 2, + "charOffset": 21639, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_LESSER_COST, \"wheelAtelierRevealLesserCost\", 125000);\n\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_REGULAR_COST, \"wheelAtelierRevealRegularCost\", 1000000);\n\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_GREATER_COST, \"wheelAtelierRotateGreaterCost\", 500000);\n\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_LESSER_COST, \"wheelAtelierRotateLesserCost\", 125000);\n\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_REGULAR_COST, \"wheelAtelierRotateRegularCost\", 250000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd15e6f937c2869d74bfce178317c601a0b92fd8cf7f2896f8fff03b2a50b3b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "500000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 339, + "startColumn": 87, + "charOffset": 21914, + "charLength": 6, + "snippet": { + "text": "500000" + } + }, + "contextRegion": { + "startLine": 337, + "startColumn": 87, + "charOffset": 21639, + "charLength": 6, + "snippet": { + "text": "\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_LESSER_COST, \"wheelAtelierRevealLesserCost\", 125000);\n\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_REGULAR_COST, \"wheelAtelierRevealRegularCost\", 1000000);\n\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_GREATER_COST, \"wheelAtelierRotateGreaterCost\", 500000);\n\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_LESSER_COST, \"wheelAtelierRotateLesserCost\", 125000);\n\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_REGULAR_COST, \"wheelAtelierRotateRegularCost\", 250000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6edf425ab3d2db12431afb9413a53bcc508eeb24fc313570bc7535b0a5fc76e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 340, + "startColumn": 2, + "charOffset": 21924, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 338, + "startColumn": 2, + "charOffset": 21732, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_REGULAR_COST, \"wheelAtelierRevealRegularCost\", 1000000);\n\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_GREATER_COST, \"wheelAtelierRotateGreaterCost\", 500000);\n\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_LESSER_COST, \"wheelAtelierRotateLesserCost\", 125000);\n\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_REGULAR_COST, \"wheelAtelierRotateRegularCost\", 250000);\n\tloadIntConfig(L, WHEEL_POINTS_PER_LEVEL, \"wheelPointsPerLevel\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35f3231dd26a3f456f3dca53cefd851eb661c719af6be1e36e3ed66b17adb49f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "125000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 340, + "startColumn": 85, + "charOffset": 22007, + "charLength": 6, + "snippet": { + "text": "125000" + } + }, + "contextRegion": { + "startLine": 338, + "startColumn": 85, + "charOffset": 21732, + "charLength": 6, + "snippet": { + "text": "\tloadIntConfig(L, WHEEL_ATELIER_REVEAL_REGULAR_COST, \"wheelAtelierRevealRegularCost\", 1000000);\n\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_GREATER_COST, \"wheelAtelierRotateGreaterCost\", 500000);\n\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_LESSER_COST, \"wheelAtelierRotateLesserCost\", 125000);\n\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_REGULAR_COST, \"wheelAtelierRotateRegularCost\", 250000);\n\tloadIntConfig(L, WHEEL_POINTS_PER_LEVEL, \"wheelPointsPerLevel\", 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2ecf0fa9132752c121a9156fea9e9e24b3cfb26df1dd982d694f5902cc4eca0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 341, + "startColumn": 2, + "charOffset": 22017, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 339, + "startColumn": 2, + "charOffset": 21828, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_GREATER_COST, \"wheelAtelierRotateGreaterCost\", 500000);\n\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_LESSER_COST, \"wheelAtelierRotateLesserCost\", 125000);\n\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_REGULAR_COST, \"wheelAtelierRotateRegularCost\", 250000);\n\tloadIntConfig(L, WHEEL_POINTS_PER_LEVEL, \"wheelPointsPerLevel\", 1);\n\tloadIntConfig(L, WHITE_SKULL_TIME, \"whiteSkullTime\", 15 * 60 * 1000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3c777a381da640db843351ab9bd5b7b3dee231c49f4a6d05df30265c6e160e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "250000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 341, + "startColumn": 87, + "charOffset": 22102, + "charLength": 6, + "snippet": { + "text": "250000" + } + }, + "contextRegion": { + "startLine": 339, + "startColumn": 87, + "charOffset": 21828, + "charLength": 6, + "snippet": { + "text": "\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_GREATER_COST, \"wheelAtelierRotateGreaterCost\", 500000);\n\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_LESSER_COST, \"wheelAtelierRotateLesserCost\", 125000);\n\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_REGULAR_COST, \"wheelAtelierRotateRegularCost\", 250000);\n\tloadIntConfig(L, WHEEL_POINTS_PER_LEVEL, \"wheelPointsPerLevel\", 1);\n\tloadIntConfig(L, WHITE_SKULL_TIME, \"whiteSkullTime\", 15 * 60 * 1000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a904f1ab8c2f695533ad848d77f36bd77fc98c4014a452856baaa09096dddae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 342, + "startColumn": 2, + "charOffset": 22112, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 340, + "startColumn": 2, + "charOffset": 21923, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_LESSER_COST, \"wheelAtelierRotateLesserCost\", 125000);\n\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_REGULAR_COST, \"wheelAtelierRotateRegularCost\", 250000);\n\tloadIntConfig(L, WHEEL_POINTS_PER_LEVEL, \"wheelPointsPerLevel\", 1);\n\tloadIntConfig(L, WHITE_SKULL_TIME, \"whiteSkullTime\", 15 * 60 * 1000);\n\tloadIntConfig(L, AUGMENT_INCREASED_DAMAGE_PERCENT, \"augmentIncreasedDamagePercent\", 5);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a08c8ff809b43892f1b0752e9f5e34a36c49aaf6f2e66716b737c3aecb30938" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 343, + "startColumn": 2, + "charOffset": 22181, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 341, + "startColumn": 2, + "charOffset": 22016, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_REGULAR_COST, \"wheelAtelierRotateRegularCost\", 250000);\n\tloadIntConfig(L, WHEEL_POINTS_PER_LEVEL, \"wheelPointsPerLevel\", 1);\n\tloadIntConfig(L, WHITE_SKULL_TIME, \"whiteSkullTime\", 15 * 60 * 1000);\n\tloadIntConfig(L, AUGMENT_INCREASED_DAMAGE_PERCENT, \"augmentIncreasedDamagePercent\", 5);\n\tloadIntConfig(L, AUGMENT_POWERFUL_IMPACT_PERCENT, \"augmentPowerfulImpactPercent\", 10);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51ea8342a357493c7e73da918d1545dcd690ea8c6add68a3c4668b1bbf9d1768" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "15 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 343, + "startColumn": 55, + "charOffset": 22234, + "charLength": 2, + "snippet": { + "text": "15" + } + }, + "contextRegion": { + "startLine": 341, + "startColumn": 55, + "charOffset": 22016, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_REGULAR_COST, \"wheelAtelierRotateRegularCost\", 250000);\n\tloadIntConfig(L, WHEEL_POINTS_PER_LEVEL, \"wheelPointsPerLevel\", 1);\n\tloadIntConfig(L, WHITE_SKULL_TIME, \"whiteSkullTime\", 15 * 60 * 1000);\n\tloadIntConfig(L, AUGMENT_INCREASED_DAMAGE_PERCENT, \"augmentIncreasedDamagePercent\", 5);\n\tloadIntConfig(L, AUGMENT_POWERFUL_IMPACT_PERCENT, \"augmentPowerfulImpactPercent\", 10);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "354aa7425f21776b9443fd10a889c936470999084f9efbcbc6975ce2c30ec4f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 343, + "startColumn": 60, + "charOffset": 22239, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 341, + "startColumn": 60, + "charOffset": 22016, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_REGULAR_COST, \"wheelAtelierRotateRegularCost\", 250000);\n\tloadIntConfig(L, WHEEL_POINTS_PER_LEVEL, \"wheelPointsPerLevel\", 1);\n\tloadIntConfig(L, WHITE_SKULL_TIME, \"whiteSkullTime\", 15 * 60 * 1000);\n\tloadIntConfig(L, AUGMENT_INCREASED_DAMAGE_PERCENT, \"augmentIncreasedDamagePercent\", 5);\n\tloadIntConfig(L, AUGMENT_POWERFUL_IMPACT_PERCENT, \"augmentPowerfulImpactPercent\", 10);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8eb9ff1fa8b1e729ec53fce869352d043ed7872486727929ba83bed80e2c308" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 343, + "startColumn": 65, + "charOffset": 22244, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 341, + "startColumn": 65, + "charOffset": 22016, + "charLength": 4, + "snippet": { + "text": "\tloadIntConfig(L, WHEEL_ATELIER_ROTATE_REGULAR_COST, \"wheelAtelierRotateRegularCost\", 250000);\n\tloadIntConfig(L, WHEEL_POINTS_PER_LEVEL, \"wheelPointsPerLevel\", 1);\n\tloadIntConfig(L, WHITE_SKULL_TIME, \"whiteSkullTime\", 15 * 60 * 1000);\n\tloadIntConfig(L, AUGMENT_INCREASED_DAMAGE_PERCENT, \"augmentIncreasedDamagePercent\", 5);\n\tloadIntConfig(L, AUGMENT_POWERFUL_IMPACT_PERCENT, \"augmentPowerfulImpactPercent\", 10);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c608fa4cce86840b1ff27eae5d55235fc233b9dd128a28aa2441525f08465bc3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 344, + "startColumn": 2, + "charOffset": 22252, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 342, + "startColumn": 2, + "charOffset": 22111, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, WHEEL_POINTS_PER_LEVEL, \"wheelPointsPerLevel\", 1);\n\tloadIntConfig(L, WHITE_SKULL_TIME, \"whiteSkullTime\", 15 * 60 * 1000);\n\tloadIntConfig(L, AUGMENT_INCREASED_DAMAGE_PERCENT, \"augmentIncreasedDamagePercent\", 5);\n\tloadIntConfig(L, AUGMENT_POWERFUL_IMPACT_PERCENT, \"augmentPowerfulImpactPercent\", 10);\n\tloadIntConfig(L, AUGMENT_STRONG_IMPACT_PERCENT, \"augmentStrongImpactPercent\", 7);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4936aaf8f9cff6596d73984516d1653f832b7ee857bfecdaef8d7b8fde133632" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 344, + "startColumn": 86, + "charOffset": 22336, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 342, + "startColumn": 86, + "charOffset": 22111, + "charLength": 1, + "snippet": { + "text": "\tloadIntConfig(L, WHEEL_POINTS_PER_LEVEL, \"wheelPointsPerLevel\", 1);\n\tloadIntConfig(L, WHITE_SKULL_TIME, \"whiteSkullTime\", 15 * 60 * 1000);\n\tloadIntConfig(L, AUGMENT_INCREASED_DAMAGE_PERCENT, \"augmentIncreasedDamagePercent\", 5);\n\tloadIntConfig(L, AUGMENT_POWERFUL_IMPACT_PERCENT, \"augmentPowerfulImpactPercent\", 10);\n\tloadIntConfig(L, AUGMENT_STRONG_IMPACT_PERCENT, \"augmentStrongImpactPercent\", 7);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a226553aa7b79baafc8015ac599656fe4c4c55a41d00a3f17feba258c6b6926" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 345, + "startColumn": 2, + "charOffset": 22341, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 343, + "startColumn": 2, + "charOffset": 22180, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, WHITE_SKULL_TIME, \"whiteSkullTime\", 15 * 60 * 1000);\n\tloadIntConfig(L, AUGMENT_INCREASED_DAMAGE_PERCENT, \"augmentIncreasedDamagePercent\", 5);\n\tloadIntConfig(L, AUGMENT_POWERFUL_IMPACT_PERCENT, \"augmentPowerfulImpactPercent\", 10);\n\tloadIntConfig(L, AUGMENT_STRONG_IMPACT_PERCENT, \"augmentStrongImpactPercent\", 7);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd15e6f937c2869d74bfce178317c601a0b92fd8cf7f2896f8fff03b2a50b3b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 345, + "startColumn": 84, + "charOffset": 22423, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 343, + "startColumn": 84, + "charOffset": 22180, + "charLength": 2, + "snippet": { + "text": "\tloadIntConfig(L, WHITE_SKULL_TIME, \"whiteSkullTime\", 15 * 60 * 1000);\n\tloadIntConfig(L, AUGMENT_INCREASED_DAMAGE_PERCENT, \"augmentIncreasedDamagePercent\", 5);\n\tloadIntConfig(L, AUGMENT_POWERFUL_IMPACT_PERCENT, \"augmentPowerfulImpactPercent\", 10);\n\tloadIntConfig(L, AUGMENT_STRONG_IMPACT_PERCENT, \"augmentStrongImpactPercent\", 7);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45cfcd588214aad2727ba652e3c42e6763131b739c239325891081c63f0ab117" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 346, + "startColumn": 2, + "charOffset": 22429, + "charLength": 13, + "snippet": { + "text": "loadIntConfig" + } + }, + "contextRegion": { + "startLine": 344, + "startColumn": 2, + "charOffset": 22251, + "charLength": 13, + "snippet": { + "text": "\tloadIntConfig(L, AUGMENT_INCREASED_DAMAGE_PERCENT, \"augmentIncreasedDamagePercent\", 5);\n\tloadIntConfig(L, AUGMENT_POWERFUL_IMPACT_PERCENT, \"augmentPowerfulImpactPercent\", 10);\n\tloadIntConfig(L, AUGMENT_STRONG_IMPACT_PERCENT, \"augmentStrongImpactPercent\", 7);\n\n\tloadStringConfig(L, CORE_DIRECTORY, \"coreDirectory\", \"data\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ae953ac6196e832a5ddaa7daa26e91e3ae224b096928e856939b8857dfb698f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 346, + "startColumn": 80, + "charOffset": 22507, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 344, + "startColumn": 80, + "charOffset": 22251, + "charLength": 1, + "snippet": { + "text": "\tloadIntConfig(L, AUGMENT_INCREASED_DAMAGE_PERCENT, \"augmentIncreasedDamagePercent\", 5);\n\tloadIntConfig(L, AUGMENT_POWERFUL_IMPACT_PERCENT, \"augmentPowerfulImpactPercent\", 10);\n\tloadIntConfig(L, AUGMENT_STRONG_IMPACT_PERCENT, \"augmentStrongImpactPercent\", 7);\n\n\tloadStringConfig(L, CORE_DIRECTORY, \"coreDirectory\", \"data\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bcd2fa4a2e8565b0e8d90f4e9879a9bcf6c440592b367e95ffb0d8a26659ba9c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 348, + "startColumn": 2, + "charOffset": 22513, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 346, + "startColumn": 2, + "charOffset": 22428, + "charLength": 16, + "snippet": { + "text": "\tloadIntConfig(L, AUGMENT_STRONG_IMPACT_PERCENT, \"augmentStrongImpactPercent\", 7);\n\n\tloadStringConfig(L, CORE_DIRECTORY, \"coreDirectory\", \"data\");\n\tloadStringConfig(L, DATA_DIRECTORY, \"dataPackDirectory\", \"data-otservbr-global\");\n\tloadStringConfig(L, DEFAULT_PRIORITY, \"defaultPriority\", \"high\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80258cd76abef8582090edbc37ca45bf861298579f437b4e9a8e75421bca7eb1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 349, + "startColumn": 2, + "charOffset": 22576, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 347, + "startColumn": 2, + "charOffset": 22511, + "charLength": 16, + "snippet": { + "text": "\n\tloadStringConfig(L, CORE_DIRECTORY, \"coreDirectory\", \"data\");\n\tloadStringConfig(L, DATA_DIRECTORY, \"dataPackDirectory\", \"data-otservbr-global\");\n\tloadStringConfig(L, DEFAULT_PRIORITY, \"defaultPriority\", \"high\");\n\tloadStringConfig(L, DISCORD_WEBHOOK_URL, \"discordWebhookURL\", \"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41873ef09da1aa35b9e9148e648b5b06472c7ccb7a876faa3b35f29bfbf0ba07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 350, + "startColumn": 2, + "charOffset": 22659, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 348, + "startColumn": 2, + "charOffset": 22512, + "charLength": 16, + "snippet": { + "text": "\tloadStringConfig(L, CORE_DIRECTORY, \"coreDirectory\", \"data\");\n\tloadStringConfig(L, DATA_DIRECTORY, \"dataPackDirectory\", \"data-otservbr-global\");\n\tloadStringConfig(L, DEFAULT_PRIORITY, \"defaultPriority\", \"high\");\n\tloadStringConfig(L, DISCORD_WEBHOOK_URL, \"discordWebhookURL\", \"\");\n\tloadStringConfig(L, FORGE_FIENDISH_INTERVAL_TIME, \"forgeFiendishIntervalTime\", \"1\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92927868be24b5c84692345f870bbf991d8366af18ac9a83b22b87ce4f4be579" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 351, + "startColumn": 2, + "charOffset": 22726, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 349, + "startColumn": 2, + "charOffset": 22575, + "charLength": 16, + "snippet": { + "text": "\tloadStringConfig(L, DATA_DIRECTORY, \"dataPackDirectory\", \"data-otservbr-global\");\n\tloadStringConfig(L, DEFAULT_PRIORITY, \"defaultPriority\", \"high\");\n\tloadStringConfig(L, DISCORD_WEBHOOK_URL, \"discordWebhookURL\", \"\");\n\tloadStringConfig(L, FORGE_FIENDISH_INTERVAL_TIME, \"forgeFiendishIntervalTime\", \"1\");\n\tloadStringConfig(L, FORGE_FIENDISH_INTERVAL_TYPE, \"forgeFiendishIntervalType\", \"hour\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d70bdcd504af5c5a1d8e4917b04f84085743988f1a33c098119798e8bb7ced0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 352, + "startColumn": 2, + "charOffset": 22794, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 350, + "startColumn": 2, + "charOffset": 22658, + "charLength": 16, + "snippet": { + "text": "\tloadStringConfig(L, DEFAULT_PRIORITY, \"defaultPriority\", \"high\");\n\tloadStringConfig(L, DISCORD_WEBHOOK_URL, \"discordWebhookURL\", \"\");\n\tloadStringConfig(L, FORGE_FIENDISH_INTERVAL_TIME, \"forgeFiendishIntervalTime\", \"1\");\n\tloadStringConfig(L, FORGE_FIENDISH_INTERVAL_TYPE, \"forgeFiendishIntervalType\", \"hour\");\n\tloadStringConfig(L, GLOBAL_SERVER_SAVE_TIME, \"globalServerSaveTime\", \"06:00\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1cbebead53cd2ed559a456eaadb550c7c8c1720fedde844132fae87f1864798" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 353, + "startColumn": 2, + "charOffset": 22880, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 351, + "startColumn": 2, + "charOffset": 22725, + "charLength": 16, + "snippet": { + "text": "\tloadStringConfig(L, DISCORD_WEBHOOK_URL, \"discordWebhookURL\", \"\");\n\tloadStringConfig(L, FORGE_FIENDISH_INTERVAL_TIME, \"forgeFiendishIntervalTime\", \"1\");\n\tloadStringConfig(L, FORGE_FIENDISH_INTERVAL_TYPE, \"forgeFiendishIntervalType\", \"hour\");\n\tloadStringConfig(L, GLOBAL_SERVER_SAVE_TIME, \"globalServerSaveTime\", \"06:00\");\n\tloadStringConfig(L, LOCATION, \"location\", \"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a08c8ff809b43892f1b0752e9f5e34a36c49aaf6f2e66716b737c3aecb30938" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 354, + "startColumn": 2, + "charOffset": 22969, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 352, + "startColumn": 2, + "charOffset": 22793, + "charLength": 16, + "snippet": { + "text": "\tloadStringConfig(L, FORGE_FIENDISH_INTERVAL_TIME, \"forgeFiendishIntervalTime\", \"1\");\n\tloadStringConfig(L, FORGE_FIENDISH_INTERVAL_TYPE, \"forgeFiendishIntervalType\", \"hour\");\n\tloadStringConfig(L, GLOBAL_SERVER_SAVE_TIME, \"globalServerSaveTime\", \"06:00\");\n\tloadStringConfig(L, LOCATION, \"location\", \"\");\n\tloadStringConfig(L, M_CONST, \"memoryConst\", \"1<<16\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff1a55075cf98272d7677fb02537f46873d599274bbd3a63c888f5dd4fc99682" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 355, + "startColumn": 2, + "charOffset": 23049, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 353, + "startColumn": 2, + "charOffset": 22879, + "charLength": 16, + "snippet": { + "text": "\tloadStringConfig(L, FORGE_FIENDISH_INTERVAL_TYPE, \"forgeFiendishIntervalType\", \"hour\");\n\tloadStringConfig(L, GLOBAL_SERVER_SAVE_TIME, \"globalServerSaveTime\", \"06:00\");\n\tloadStringConfig(L, LOCATION, \"location\", \"\");\n\tloadStringConfig(L, M_CONST, \"memoryConst\", \"1<<16\");\n\tloadStringConfig(L, METRICS_PROMETHEUS_ADDRESS, \"metricsPrometheusAddress\", \"localhost:9464\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "263a9701dd1c9ff06feabeda99d3125838bb940c24eae2b4b8e1fbdebde74c83" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 356, + "startColumn": 2, + "charOffset": 23097, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 354, + "startColumn": 2, + "charOffset": 22968, + "charLength": 16, + "snippet": { + "text": "\tloadStringConfig(L, GLOBAL_SERVER_SAVE_TIME, \"globalServerSaveTime\", \"06:00\");\n\tloadStringConfig(L, LOCATION, \"location\", \"\");\n\tloadStringConfig(L, M_CONST, \"memoryConst\", \"1<<16\");\n\tloadStringConfig(L, METRICS_PROMETHEUS_ADDRESS, \"metricsPrometheusAddress\", \"localhost:9464\");\n\tloadStringConfig(L, OWNER_EMAIL, \"ownerEmail\", \"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2fe2dfc85c83155c70f15d37f55d90649a8ba70955df3c6b0af283a7d316ff3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 357, + "startColumn": 2, + "charOffset": 23152, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 355, + "startColumn": 2, + "charOffset": 23048, + "charLength": 16, + "snippet": { + "text": "\tloadStringConfig(L, LOCATION, \"location\", \"\");\n\tloadStringConfig(L, M_CONST, \"memoryConst\", \"1<<16\");\n\tloadStringConfig(L, METRICS_PROMETHEUS_ADDRESS, \"metricsPrometheusAddress\", \"localhost:9464\");\n\tloadStringConfig(L, OWNER_EMAIL, \"ownerEmail\", \"\");\n\tloadStringConfig(L, OWNER_NAME, \"ownerName\", \"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3aa074b02e8d7fd3485d9f08d02e23d70e178f0fe7bf459107b4f816ced0fb78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 358, + "startColumn": 2, + "charOffset": 23248, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 356, + "startColumn": 2, + "charOffset": 23096, + "charLength": 16, + "snippet": { + "text": "\tloadStringConfig(L, M_CONST, \"memoryConst\", \"1<<16\");\n\tloadStringConfig(L, METRICS_PROMETHEUS_ADDRESS, \"metricsPrometheusAddress\", \"localhost:9464\");\n\tloadStringConfig(L, OWNER_EMAIL, \"ownerEmail\", \"\");\n\tloadStringConfig(L, OWNER_NAME, \"ownerName\", \"\");\n\tloadStringConfig(L, SAVE_INTERVAL_TYPE, \"saveIntervalType\", \"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99db9b7bd21e039a160fa0be3f0cc14a05c2a0266da589cbedbdb95c334b1a93" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 359, + "startColumn": 2, + "charOffset": 23301, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 357, + "startColumn": 2, + "charOffset": 23151, + "charLength": 16, + "snippet": { + "text": "\tloadStringConfig(L, METRICS_PROMETHEUS_ADDRESS, \"metricsPrometheusAddress\", \"localhost:9464\");\n\tloadStringConfig(L, OWNER_EMAIL, \"ownerEmail\", \"\");\n\tloadStringConfig(L, OWNER_NAME, \"ownerName\", \"\");\n\tloadStringConfig(L, SAVE_INTERVAL_TYPE, \"saveIntervalType\", \"\");\n\tloadStringConfig(L, SERVER_MOTD, \"serverMotd\", \"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b7205470686882664c1bb4e584804fef8be30bc0132b45c3d5368812eac49ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 360, + "startColumn": 2, + "charOffset": 23352, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 358, + "startColumn": 2, + "charOffset": 23247, + "charLength": 16, + "snippet": { + "text": "\tloadStringConfig(L, OWNER_EMAIL, \"ownerEmail\", \"\");\n\tloadStringConfig(L, OWNER_NAME, \"ownerName\", \"\");\n\tloadStringConfig(L, SAVE_INTERVAL_TYPE, \"saveIntervalType\", \"\");\n\tloadStringConfig(L, SERVER_MOTD, \"serverMotd\", \"\");\n\tloadStringConfig(L, SERVER_NAME, \"serverName\", \"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42838ab67062d894a956167bca684d8ae5ec53bb1d12becdffbf4e39966071bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 361, + "startColumn": 2, + "charOffset": 23418, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 359, + "startColumn": 2, + "charOffset": 23300, + "charLength": 16, + "snippet": { + "text": "\tloadStringConfig(L, OWNER_NAME, \"ownerName\", \"\");\n\tloadStringConfig(L, SAVE_INTERVAL_TYPE, \"saveIntervalType\", \"\");\n\tloadStringConfig(L, SERVER_MOTD, \"serverMotd\", \"\");\n\tloadStringConfig(L, SERVER_NAME, \"serverName\", \"\");\n\tloadStringConfig(L, STORE_IMAGES_URL, \"coinImagesURL\", \"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02bcc32bde5e7600dff7207a90e87cfd5bd02fd025f0f40dc7f85084970283d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 362, + "startColumn": 2, + "charOffset": 23471, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 360, + "startColumn": 2, + "charOffset": 23351, + "charLength": 16, + "snippet": { + "text": "\tloadStringConfig(L, SAVE_INTERVAL_TYPE, \"saveIntervalType\", \"\");\n\tloadStringConfig(L, SERVER_MOTD, \"serverMotd\", \"\");\n\tloadStringConfig(L, SERVER_NAME, \"serverName\", \"\");\n\tloadStringConfig(L, STORE_IMAGES_URL, \"coinImagesURL\", \"\");\n\tloadStringConfig(L, TIBIADROME_CONCOCTION_TICK_TYPE, \"tibiadromeConcoctionTickType\", \"online\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4cd9eb7a97afc681c9f0eab8833b44980147100a8a5ef645172a1fa2312c91d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 363, + "startColumn": 2, + "charOffset": 23524, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 361, + "startColumn": 2, + "charOffset": 23417, + "charLength": 16, + "snippet": { + "text": "\tloadStringConfig(L, SERVER_MOTD, \"serverMotd\", \"\");\n\tloadStringConfig(L, SERVER_NAME, \"serverName\", \"\");\n\tloadStringConfig(L, STORE_IMAGES_URL, \"coinImagesURL\", \"\");\n\tloadStringConfig(L, TIBIADROME_CONCOCTION_TICK_TYPE, \"tibiadromeConcoctionTickType\", \"online\");\n\tloadStringConfig(L, URL, \"url\", \"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ff9f8c7703b7a8e0cf519a623c040d373a035cf720eafef98819709caed6475" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 364, + "startColumn": 2, + "charOffset": 23585, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 362, + "startColumn": 2, + "charOffset": 23470, + "charLength": 16, + "snippet": { + "text": "\tloadStringConfig(L, SERVER_NAME, \"serverName\", \"\");\n\tloadStringConfig(L, STORE_IMAGES_URL, \"coinImagesURL\", \"\");\n\tloadStringConfig(L, TIBIADROME_CONCOCTION_TICK_TYPE, \"tibiadromeConcoctionTickType\", \"online\");\n\tloadStringConfig(L, URL, \"url\", \"\");\n\tloadStringConfig(L, WORLD_TYPE, \"worldType\", \"pvp\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "225022152110b3b56f3ee010cd64fdf353dd2a4acc6949a34bf0a80cdb800612" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 365, + "startColumn": 2, + "charOffset": 23682, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 363, + "startColumn": 2, + "charOffset": 23523, + "charLength": 16, + "snippet": { + "text": "\tloadStringConfig(L, STORE_IMAGES_URL, \"coinImagesURL\", \"\");\n\tloadStringConfig(L, TIBIADROME_CONCOCTION_TICK_TYPE, \"tibiadromeConcoctionTickType\", \"online\");\n\tloadStringConfig(L, URL, \"url\", \"\");\n\tloadStringConfig(L, WORLD_TYPE, \"worldType\", \"pvp\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb05d98274ce50e5b5678ac80bec8b7ef96bc95449ba578618d81d4d3ca4b6e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 366, + "startColumn": 2, + "charOffset": 23720, + "charLength": 16, + "snippet": { + "text": "loadStringConfig" + } + }, + "contextRegion": { + "startLine": 364, + "startColumn": 2, + "charOffset": 23584, + "charLength": 16, + "snippet": { + "text": "\tloadStringConfig(L, TIBIADROME_CONCOCTION_TICK_TYPE, \"tibiadromeConcoctionTickType\", \"online\");\n\tloadStringConfig(L, URL, \"url\", \"\");\n\tloadStringConfig(L, WORLD_TYPE, \"worldType\", \"pvp\");\n\n\tloaded = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d271fa2071ac553682cad443b80b78a6be7d0fd88f777fe5bb284010d349ea99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'missingConfigWarning' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 381, + "startColumn": 21, + "charOffset": 24043, + "charLength": 20, + "snippet": { + "text": "missingConfigWarning" + } + }, + "contextRegion": { + "startLine": 379, + "startColumn": 21, + "charOffset": 24020, + "charLength": 20, + "snippet": { + "text": "}\n\nvoid ConfigManager::missingConfigWarning(const char* identifier) {\n\tg_logger().warn(\"[{}]: Missing configuration for identifier: {}\", __FUNCTION__, identifier);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c2553c5265b229c44103d8387d014ce1dc525f7592f5f87acbe809be79f8050" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 388, + "startColumn": 6, + "charOffset": 24399, + "charLength": 12, + "snippet": { + "text": "lua_isstring" + } + }, + "contextRegion": { + "startLine": 386, + "startColumn": 6, + "charOffset": 24328, + "charLength": 12, + "snippet": { + "text": "\tstd::string value = defaultValue;\n\tlua_getglobal(L, identifier);\n\tif (lua_isstring(L, -1)) {\n\t\tvalue = lua_tostring(L, -1);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7e0a2debb19735c6556f74fd851b0aa7a4dfb256388dcfc6c81207fb182b1ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 388, + "startColumn": 6, + "charOffset": 24399, + "charLength": 12, + "snippet": { + "text": "lua_isstring" + } + }, + "contextRegion": { + "startLine": 386, + "startColumn": 6, + "charOffset": 24328, + "charLength": 12, + "snippet": { + "text": "\tstd::string value = defaultValue;\n\tlua_getglobal(L, identifier);\n\tif (lua_isstring(L, -1)) {\n\t\tvalue = lua_tostring(L, -1);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88e24adc5ff3830832790316b12e1fdb47fee895138a405c46016470d44e5dbb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 401, + "startColumn": 6, + "charOffset": 24756, + "charLength": 12, + "snippet": { + "text": "lua_isnumber" + } + }, + "contextRegion": { + "startLine": 399, + "startColumn": 6, + "charOffset": 24689, + "charLength": 12, + "snippet": { + "text": "\tint32_t value = defaultValue;\n\tlua_getglobal(L, identifier);\n\tif (lua_isnumber(L, -1)) {\n\t\tvalue = static_cast(lua_tointeger(L, -1));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8582c6c8b5e0395fb87a75d3a40eb49c7afa085d0e9c68c8b348c3de3ff566c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 401, + "startColumn": 6, + "charOffset": 24756, + "charLength": 12, + "snippet": { + "text": "lua_isnumber" + } + }, + "contextRegion": { + "startLine": 399, + "startColumn": 6, + "charOffset": 24689, + "charLength": 12, + "snippet": { + "text": "\tint32_t value = defaultValue;\n\tlua_getglobal(L, identifier);\n\tif (lua_isnumber(L, -1)) {\n\t\tvalue = static_cast(lua_tointeger(L, -1));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0f14cb9aac88cd473ca9e344456b55649666d760dfe3513cf98a2c7822edbb3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 427, + "startColumn": 6, + "charOffset": 25502, + "charLength": 12, + "snippet": { + "text": "lua_isnumber" + } + }, + "contextRegion": { + "startLine": 425, + "startColumn": 6, + "charOffset": 25437, + "charLength": 12, + "snippet": { + "text": "\tfloat value = defaultValue;\n\tlua_getglobal(L, identifier);\n\tif (lua_isnumber(L, -1)) {\n\t\tvalue = static_cast(lua_tonumber(L, -1));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b72f8ed1dad1ac1c4d25698771c419ed8fa10a7539a9496562663603c83c05cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 427, + "startColumn": 6, + "charOffset": 25502, + "charLength": 12, + "snippet": { + "text": "lua_isnumber" + } + }, + "contextRegion": { + "startLine": 425, + "startColumn": 6, + "charOffset": 25437, + "charLength": 12, + "snippet": { + "text": "\tfloat value = defaultValue;\n\tlua_getglobal(L, identifier);\n\tif (lua_isnumber(L, -1)) {\n\t\tvalue = static_cast(lua_tonumber(L, -1));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89d898645be939292a0ce6082d2dce8e54887ae469806dce06ee62a0d2432b23" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 467, + "startColumn": 9, + "charOffset": 27343, + "charLength": 4, + "snippet": { + "text": "0.0f" + } + }, + "contextRegion": { + "startLine": 465, + "startColumn": 9, + "charOffset": 27164, + "charLength": 4, + "snippet": { + "text": "\t}\n\tg_logger().warn(\"[ConfigManager::getFloat] - Accessing invalid or wrong type index: {}[{}], Function: {}\", magic_enum::enum_name(key), fmt::underlying(key), context);\n\treturn 0.0f;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f89d0bf63ebe8801c425ffbf9c9156f86020d45fe3d8adf59902732b23931dc7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/config/configmanager.cpp" + }, + "region": { + "startLine": 467, + "startColumn": 9, + "charOffset": 27343, + "charLength": 4, + "snippet": { + "text": "0.0f" + } + }, + "contextRegion": { + "startLine": 465, + "startColumn": 9, + "charOffset": 27164, + "charLength": 4, + "snippet": { + "text": "\t}\n\tg_logger().warn(\"[ConfigManager::getFloat] - Accessing invalid or wrong type index: {}[{}], Function: {}\", magic_enum::enum_name(key), fmt::underlying(key), context);\n\treturn 0.0f;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6867d306168f75e1aa87ed30efc7a01090ed2536f64f532b5bcb8e6052d499a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'bankable' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp" + }, + "region": { + "startLine": 19, + "startColumn": 44, + "charOffset": 629, + "charLength": 8, + "snippet": { + "text": "bankable" + } + }, + "contextRegion": { + "startLine": 17, + "startColumn": 44, + "charOffset": 550, + "charLength": 8, + "snippet": { + "text": "#include \"lib/metrics/metrics.hpp\"\n\nBank::Bank(const std::shared_ptr bankable) :\n\tm_bankable(bankable) {\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d29477b4e093440953752a69d26e178ab5a1e47d3bd53aae49cfcf31703fc8f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp" + }, + "region": { + "startLine": 30, + "startColumn": 19, + "charOffset": 894, + "charLength": 10, + "snippet": { + "text": "savePlayer" + } + }, + "contextRegion": { + "startLine": 28, + "startColumn": 19, + "charOffset": 781, + "charLength": 10, + "snippet": { + "text": "\tstd::shared_ptr player = bankable->getPlayer();\n\tif (player && !player->isOnline()) {\n\t\tg_saveManager().savePlayer(player);\n\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bcf0585cdc282dd9a40e8e8b1d43118e5ebf52e67ec09791a35180e90f3ddebd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp" + }, + "region": { + "startLine": 55, + "startColumn": 6, + "charOffset": 1377, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 6, + "charOffset": 1296, + "charLength": 1, + "snippet": { + "text": "bool Bank::balance(uint64_t amount) const {\n\tauto bankable = getBankable();\n\tif (!bankable) {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1be6e41017cf9089911597dfdf0bc9eb0510f8ec49f43648f1b81f872dd14bc8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-use-bool-literals", + "ruleIndex": 635, + "kind": "fail", + "level": "warning", + "message": { + "text": "converting integer literal to bool, use bool literal instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp" + }, + "region": { + "startLine": 56, + "startColumn": 10, + "charOffset": 1399, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 54, + "startColumn": 10, + "charOffset": 1340, + "charLength": 1, + "snippet": { + "text": "\tauto bankable = getBankable();\n\tif (!bankable) {\n\t\treturn 0;\n\t}\n\tbankable->setBankBalance(amount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "327a373d1e9a3e82116b5a4dfa92c7cb5aaa4d2ef535880bc93668ea874944b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp" + }, + "region": { + "startLine": 56, + "startColumn": 10, + "charOffset": 1399, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 54, + "startColumn": 10, + "charOffset": 1340, + "charLength": 1, + "snippet": { + "text": "\tauto bankable = getBankable();\n\tif (!bankable) {\n\t\treturn 0;\n\t}\n\tbankable->setBankBalance(amount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db99731470398c7fd7666c2325a18d47344a0c05d6dc04f17c254425287a0a47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp" + }, + "region": { + "startLine": 64, + "startColumn": 6, + "charOffset": 1521, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 62, + "startColumn": 6, + "charOffset": 1457, + "charLength": 1, + "snippet": { + "text": "uint64_t Bank::balance() {\n\tauto bankable = getBankable();\n\tif (!bankable) {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65059ee03673582add8ee34b848b28c872c7a75360cdea9002135cc6c0e0f025" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 1, + "charOffset": 1667, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 1, + "charOffset": 1664, + "charLength": 5, + "snippet": { + "text": "}\n\nconst std::set deniedNames = {\n\t\"accountmanager\",\n\t\"rooksample\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b550cb4609ae38a96d5cab378c80bea1b63f1b49ff59a9aeed277f8702395610" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'deniedNames' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 29, + "charOffset": 1695, + "charLength": 11, + "snippet": { + "text": "deniedNames" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 29, + "charOffset": 1664, + "charLength": 11, + "snippet": { + "text": "}\n\nconst std::set deniedNames = {\n\t\"accountmanager\",\n\t\"rooksample\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a96d44ffd3a32ad22511c844ebfcc800c89f01f10ab3647bb79dba6001b108dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'destination' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp" + }, + "region": { + "startLine": 83, + "startColumn": 51, + "charOffset": 1868, + "charLength": 11, + "snippet": { + "text": "destination" + } + }, + "contextRegion": { + "startLine": 81, + "startColumn": 51, + "charOffset": 1814, + "charLength": 11, + "snippet": { + "text": "};\n\nbool Bank::transferTo(const std::shared_ptr destination, uint64_t amount) {\n\tif (!destination) {\n\t\tg_logger().error(\"Bank::transferTo: destination is nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5697ced30e5614f861a06ef13d2a4481cd8ce3dc3a6c855550979ff6879278b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp" + }, + "region": { + "startLine": 84, + "startColumn": 6, + "charOffset": 1905, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 6, + "charOffset": 1817, + "charLength": 1, + "snippet": { + "text": "\nbool Bank::transferTo(const std::shared_ptr destination, uint64_t amount) {\n\tif (!destination) {\n\t\tg_logger().error(\"Bank::transferTo: destination is nullptr\");\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d30b205491eefd491802b42467c7a8776c34e87562b79e3f06fde822868fd528" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp" + }, + "region": { + "startLine": 90, + "startColumn": 6, + "charOffset": 2042, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 88, + "startColumn": 6, + "charOffset": 2004, + "charLength": 1, + "snippet": { + "text": "\n\tauto bankable = getBankable();\n\tif (!bankable) {\n\t\tg_logger().error(\"Bank::transferTo: bankable is nullptr\");\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69ad85832737fce6041a75cfa2e4952de8f0834419bf31ec3242204ad7703031" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp" + }, + "region": { + "startLine": 96, + "startColumn": 6, + "charOffset": 2197, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 6, + "charOffset": 2135, + "charLength": 1, + "snippet": { + "text": "\n\tauto destinationBankable = destination->getBankable();\n\tif (!destinationBankable) {\n\t\tg_logger().error(\"Bank::transferTo: destinationBankable is nullptr\");\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ee5fa6cc67f6f91d8af2447a2dd9b584c8d11e274b3a6e21365cee04863dab1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp" + }, + "region": { + "startLine": 122, + "startColumn": 46, + "charOffset": 3016, + "charLength": 6, + "snippet": { + "text": "amount" + } + }, + "contextRegion": { + "startLine": 120, + "startColumn": 46, + "charOffset": 2944, + "charLength": 6, + "snippet": { + "text": "\n\tif (destinationPlayer) {\n\t\tg_metrics().addCounter(\"balance_increase\", amount, { { \"player\", destinationPlayer->getName() }, { \"context\", \"bank_transfer\" } });\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "728223055f951a35c2c7e7b3dfb72ec09d87922640265927b574c2b25804a6d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp" + }, + "region": { + "startLine": 122, + "startColumn": 46, + "charOffset": 3016, + "charLength": 6, + "snippet": { + "text": "amount" + } + }, + "contextRegion": { + "startLine": 120, + "startColumn": 46, + "charOffset": 2944, + "charLength": 6, + "snippet": { + "text": "\n\tif (destinationPlayer) {\n\t\tg_metrics().addCounter(\"balance_increase\", amount, { { \"player\", destinationPlayer->getName() }, { \"context\", \"bank_transfer\" } });\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "18639ace92d989d33dfbb73e7d62614115442a63a81099183730f41b00ffbb9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp" + }, + "region": { + "startLine": 126, + "startColumn": 46, + "charOffset": 3184, + "charLength": 6, + "snippet": { + "text": "amount" + } + }, + "contextRegion": { + "startLine": 124, + "startColumn": 46, + "charOffset": 3108, + "charLength": 6, + "snippet": { + "text": "\n\tif (bankable->getPlayer()) {\n\t\tg_metrics().addCounter(\"balance_decrease\", amount, { { \"player\", bankable->getPlayer()->getName() }, { \"context\", \"bank_transfer\" } });\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49045a5756d9d02c4c7c3ccca177522ba3996fb88ea302635976e1e65eb928b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp" + }, + "region": { + "startLine": 126, + "startColumn": 46, + "charOffset": 3184, + "charLength": 6, + "snippet": { + "text": "amount" + } + }, + "contextRegion": { + "startLine": 124, + "startColumn": 46, + "charOffset": 3108, + "charLength": 6, + "snippet": { + "text": "\n\tif (bankable->getPlayer()) {\n\t\tg_metrics().addCounter(\"balance_decrease\", amount, { { \"player\", bankable->getPlayer()->getName() }, { \"context\", \"bank_transfer\" } });\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c13b587ae4ad93528a3e5ac130f0484948c54879ab97c63c8bff049c01b0815a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp" + }, + "region": { + "startLine": 132, + "startColumn": 45, + "charOffset": 3342, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 130, + "startColumn": 45, + "charOffset": 3295, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Bank::withdraw(std::shared_ptr player, uint64_t amount) {\n\tif (!debit(amount)) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86ef188566b1e47745a308e4ccc717784f7abf4b856e2254890fb2cac9d889a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp" + }, + "region": { + "startLine": 137, + "startColumn": 45, + "charOffset": 3491, + "charLength": 6, + "snippet": { + "text": "amount" + } + }, + "contextRegion": { + "startLine": 135, + "startColumn": 45, + "charOffset": 3408, + "charLength": 6, + "snippet": { + "text": "\t}\n\tg_game().addMoney(player, amount);\n\tg_metrics().addCounter(\"balance_decrease\", amount, { { \"player\", player->getName() }, { \"context\", \"bank_withdraw\" } });\n\treturn true;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "335018f82b20e6a80de22499d7e04c33888c6df4c6ade4046ab202726be7a98b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp" + }, + "region": { + "startLine": 137, + "startColumn": 45, + "charOffset": 3491, + "charLength": 6, + "snippet": { + "text": "amount" + } + }, + "contextRegion": { + "startLine": 135, + "startColumn": 45, + "charOffset": 3408, + "charLength": 6, + "snippet": { + "text": "\t}\n\tg_game().addMoney(player, amount);\n\tg_metrics().addCounter(\"balance_decrease\", amount, { { \"player\", player->getName() }, { \"context\", \"bank_withdraw\" } });\n\treturn true;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c43079422c20bca9695bb319e41f895454cacbda2d257085a683069fa2aa28bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'destination' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp" + }, + "region": { + "startLine": 141, + "startColumn": 48, + "charOffset": 3633, + "charLength": 11, + "snippet": { + "text": "destination" + } + }, + "contextRegion": { + "startLine": 139, + "startColumn": 48, + "charOffset": 3583, + "charLength": 11, + "snippet": { + "text": "}\n\nbool Bank::deposit(const std::shared_ptr destination) {\n\tauto bankable = getBankable();\n\tif (!bankable) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65ff3443ac90768fef0bf1c9fe278ae5e0fd4c0f81d8ce0f596c256c668c64e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp" + }, + "region": { + "startLine": 143, + "startColumn": 6, + "charOffset": 3685, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 141, + "startColumn": 6, + "charOffset": 3586, + "charLength": 1, + "snippet": { + "text": "bool Bank::deposit(const std::shared_ptr destination) {\n\tauto bankable = getBankable();\n\tif (!bankable) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a58d0c5ed60bae0c7b74d942dbe77f26247ffe60bac72a6c65b3c6e0a007d7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'destination' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp" + }, + "region": { + "startLine": 153, + "startColumn": 48, + "charOffset": 3915, + "charLength": 11, + "snippet": { + "text": "destination" + } + }, + "contextRegion": { + "startLine": 151, + "startColumn": 48, + "charOffset": 3865, + "charLength": 11, + "snippet": { + "text": "}\n\nbool Bank::deposit(const std::shared_ptr destination, uint64_t amount) {\n\tif (!destination) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3172cd0c32a5e33dcc34654a804ce9cfa9b6ebb4937bbfea474d667ee8789d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp" + }, + "region": { + "startLine": 154, + "startColumn": 6, + "charOffset": 3952, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 6, + "charOffset": 3867, + "charLength": 1, + "snippet": { + "text": "\nbool Bank::deposit(const std::shared_ptr destination, uint64_t amount) {\n\tif (!destination) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9663fbc803884b3dba47dcd1fd5a70e4a3afcc660a704c22edf89562c576f659" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp" + }, + "region": { + "startLine": 158, + "startColumn": 6, + "charOffset": 4024, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 156, + "startColumn": 6, + "charOffset": 3984, + "charLength": 1, + "snippet": { + "text": "\t}\n\tauto bankable = getBankable();\n\tif (!bankable) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c0370d876549cdab8e2ca3f69bb06f201e2f585de8f81fd76b8514409628a02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'double'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp" + }, + "region": { + "startLine": 165, + "startColumn": 46, + "charOffset": 4222, + "charLength": 6, + "snippet": { + "text": "amount" + } + }, + "contextRegion": { + "startLine": 163, + "startColumn": 46, + "charOffset": 4133, + "charLength": 6, + "snippet": { + "text": "\t}\n\tif (bankable->getPlayer() != nullptr) {\n\t\tg_metrics().addCounter(\"balance_decrease\", amount, { { \"player\", bankable->getPlayer()->getName() }, { \"context\", \"bank_deposit\" } });\n\t}\n\treturn destination->credit(amount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab0ff6c5b730bc99c83e1508999f765fd315aad3598ba1b4bfe6f0b96a23398f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/bank/bank.cpp" + }, + "region": { + "startLine": 165, + "startColumn": 46, + "charOffset": 4222, + "charLength": 6, + "snippet": { + "text": "amount" + } + }, + "contextRegion": { + "startLine": 163, + "startColumn": 46, + "charOffset": 4133, + "charLength": 6, + "snippet": { + "text": "\t}\n\tif (bankable->getPlayer() != nullptr) {\n\t\tg_metrics().addCounter(\"balance_decrease\", amount, { { \"player\", bankable->getPlayer()->getName() }, { \"context\", \"bank_deposit\" } });\n\t}\n\treturn destination->credit(amount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "acee0c89351b878fdeeb8972a70c188d31d93bc7eda7bef638ced4eed7e4d30f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-overloaded-operator", + "ruleIndex": 526, + "kind": "fail", + "level": "warning", + "message": { + "text": "overloading 'operator<<' is disallowed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/position.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 1, + "charOffset": 929, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 1, + "charOffset": 926, + "charLength": 3, + "snippet": { + "text": "}\n\nstd::ostream &operator<<(std::ostream &os, const Position &pos) {\n\treturn os << pos.toString();\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88f0d99cb1324e8f8b1677bc61367374529901d4869efcda54bd37038f9ed4e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-overloaded-operator", + "ruleIndex": 526, + "kind": "fail", + "level": "warning", + "message": { + "text": "overloading 'operator<<' is disallowed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/position.cpp" + }, + "region": { + "startLine": 37, + "startColumn": 1, + "charOffset": 1028, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 35, + "startColumn": 1, + "charOffset": 1025, + "charLength": 3, + "snippet": { + "text": "}\n\nstd::ostream &operator<<(std::ostream &os, const Direction &dir) {\n\tstatic const std::map directionStrings = {\n\t\t{ DIRECTION_NORTH, \"North\" }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e847fbc2e00bf77ee4e94b06e318ef96824565556da9e9da6a1d6fb96c4167e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 33, + "charOffset": 943, + "charLength": 14, + "snippet": { + "text": "ATTR_TELE_DEST" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 33, + "charOffset": 871, + "charLength": 14, + "snippet": { + "text": "\tItem::serializeAttr(propWriteStream);\n\n\tpropWriteStream.write(ATTR_TELE_DEST);\n\tpropWriteStream.write(destPos.x);\n\tpropWriteStream.write(destPos.y);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "081fc8cfc78f9033ce95262b7b2d671dfe4d028658eed6636ef7624bdea102cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 23, + "charOffset": 1119, + "charLength": 8, + "snippet": { + "text": "queryAdd" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 23, + "charOffset": 1094, + "charLength": 8, + "snippet": { + "text": "}\n\nReturnValue Teleport::queryAdd(int32_t, const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr) {\n\treturn RETURNVALUE_NOTPOSSIBLE;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7658046899940908860081bf9680e96f5c93022e430c1295f4c05e7dee2f8743" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 39, + "charOffset": 1135, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 39, + "charOffset": 1094, + "charLength": 1, + "snippet": { + "text": "}\n\nReturnValue Teleport::queryAdd(int32_t, const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr) {\n\treturn RETURNVALUE_NOTPOSSIBLE;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84c5761d703d82414987e1b3b80c6ca82bb401b8dc15bdb3187d6dcc8e1fea0e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 44, + "charOffset": 1297, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 44, + "charOffset": 1251, + "charLength": 1, + "snippet": { + "text": "}\n\nReturnValue Teleport::queryMaxCount(int32_t, const std::shared_ptr &, uint32_t, uint32_t &, uint32_t) {\n\treturn RETURNVALUE_NOTPOSSIBLE;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f088ede9fdf0a70d346b533c63ebfc35d61a4ceefb3eeb0623408a14126d821b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 23, + "charOffset": 1423, + "charLength": 11, + "snippet": { + "text": "queryRemove" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 23, + "charOffset": 1398, + "charLength": 11, + "snippet": { + "text": "}\n\nReturnValue Teleport::queryRemove(const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr /*= nullptr */) {\n\treturn RETURNVALUE_NOERROR;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "408ad16eae5fae9bd331d31f40d928924c7abb952d34430e3fff954fc137e599" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 65, + "charOffset": 1465, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 65, + "charOffset": 1398, + "charLength": 1, + "snippet": { + "text": "}\n\nReturnValue Teleport::queryRemove(const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr /*= nullptr */) {\n\treturn RETURNVALUE_NOERROR;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85656f35bfbeaef49d7a16d4ab1b2d890c244801afa9a560a42a5cabc88cfdab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp" + }, + "region": { + "startLine": 46, + "startColumn": 63, + "charOffset": 1625, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 44, + "startColumn": 63, + "charOffset": 1560, + "charLength": 1, + "snippet": { + "text": "}\n\nstd::shared_ptr Teleport::queryDestination(int32_t &, const std::shared_ptr &, std::shared_ptr*, uint32_t &) {\n\treturn getTeleport();\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b47c38166d804ce608ed178265c028b39c7d52556fcaaf0b1852366174a622f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'checkInfinityLoop' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp" + }, + "region": { + "startLine": 50, + "startColumn": 16, + "charOffset": 1738, + "charLength": 17, + "snippet": { + "text": "checkInfinityLoop" + } + }, + "contextRegion": { + "startLine": 48, + "startColumn": 16, + "charOffset": 1720, + "charLength": 17, + "snippet": { + "text": "}\n\nbool Teleport::checkInfinityLoop(std::shared_ptr destTile) {\n\tif (!destTile) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73759921ae57706c9c746cbb810118cbe5e5af29fe439bcad970bc7c717e0de9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'destTile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp" + }, + "region": { + "startLine": 50, + "startColumn": 56, + "charOffset": 1778, + "charLength": 8, + "snippet": { + "text": "destTile" + } + }, + "contextRegion": { + "startLine": 48, + "startColumn": 56, + "charOffset": 1720, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Teleport::checkInfinityLoop(std::shared_ptr destTile) {\n\tif (!destTile) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1ce01a62de2887c468dc49bb91219f3a0c49738300220d964ff368076f778eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp" + }, + "region": { + "startLine": 51, + "startColumn": 6, + "charOffset": 1795, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 49, + "startColumn": 6, + "charOffset": 1722, + "charLength": 1, + "snippet": { + "text": "\nbool Teleport::checkInfinityLoop(std::shared_ptr destTile) {\n\tif (!destTile) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39ac51c88fc35a1133440c546a0f30359833f9eeb62575324eaf0f7534848347" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-avoid-return-with-void-value", + "ruleIndex": 689, + "kind": "fail", + "level": "warning", + "message": { + "text": "return statement within a void function should not have a specified return value" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 2, + "charOffset": 2156, + "charLength": 6, + "snippet": { + "text": "return" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 2, + "charOffset": 2098, + "charLength": 6, + "snippet": { + "text": "\nvoid Teleport::addThing(std::shared_ptr thing) {\n\treturn addThing(0, thing);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67766d49baba631ff4524d4060fc7a503c12d0c35f393c880703a097377e47cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp" + }, + "region": { + "startLine": 69, + "startColumn": 32, + "charOffset": 2217, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 67, + "startColumn": 32, + "charOffset": 2183, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Teleport::addThing(int32_t, std::shared_ptr thing) {\n\tif (!thing) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44aff10eefbe317ce734f78b6340d2df0288c26163d46e2e718a840135bb2bca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 6, + "charOffset": 2256, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 6, + "charOffset": 2185, + "charLength": 1, + "snippet": { + "text": "\nvoid Teleport::addThing(int32_t, std::shared_ptr thing) {\n\tif (!thing) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3104bf032964bea7b938f7759beae7bd798b4f9cd1562af925626d68d8326a2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp" + }, + "region": { + "startLine": 75, + "startColumn": 6, + "charOffset": 2350, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 73, + "startColumn": 6, + "charOffset": 2279, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr destTile = g_game().map.getTile(destPos);\n\tif (!destTile) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86460ac53451ef535acc6c62af9fa90e891c340647f6213b9a8e0a3dcdd42666" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp" + }, + "region": { + "startLine": 90, + "startColumn": 2, + "charOffset": 2696, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 88, + "startColumn": 2, + "charOffset": 2630, + "charLength": 2, + "snippet": { + "text": "\tconst MagicEffectClasses effect = Item::items[id].magicEffect;\n\n\tif (std::shared_ptr creature = thing->getCreature()) {\n\t\tPosition origPos = creature->getPosition();\n\t\tg_game().internalCreatureTurn(creature, origPos.x > destPos.x ? DIRECTION_WEST : DIRECTION_EAST);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82c190c879dca5a8214f80b9ba9ab045e121bc994b02680389382d04f5cb5779" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp" + }, + "region": { + "startLine": 92, + "startColumn": 12, + "charOffset": 2818, + "charLength": 20, + "snippet": { + "text": "internalCreatureTurn" + } + }, + "contextRegion": { + "startLine": 90, + "startColumn": 12, + "charOffset": 2695, + "charLength": 20, + "snippet": { + "text": "\tif (std::shared_ptr creature = thing->getCreature()) {\n\t\tPosition origPos = creature->getPosition();\n\t\tg_game().internalCreatureTurn(creature, origPos.x > destPos.x ? DIRECTION_WEST : DIRECTION_EAST);\n\t\tg_game().map.moveCreature(creature, destTile);\n\t\tif (effect != CONST_ME_NONE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2949bd2e46dd624429b4f2a3c90250afacf5bcbfd25791dc56dbefeecbf485d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp" + }, + "region": { + "startLine": 103, + "startColumn": 12, + "charOffset": 3326, + "charLength": 16, + "snippet": { + "text": "internalMoveItem" + } + }, + "contextRegion": { + "startLine": 101, + "startColumn": 12, + "charOffset": 3254, + "charLength": 16, + "snippet": { + "text": "\t\t\tg_game().addMagicEffect(item->getPosition(), effect);\n\t\t}\n\t\tg_game().internalMoveItem(getTile(), destTile, INDEX_WHEREEVER, item, item->getItemCount(), nullptr);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e9c42bada0031e9f283e5a3f969c81594f2f4b03b58e84bef740b04b02d67e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp" + }, + "region": { + "startLine": 107, + "startColumn": 50, + "charOffset": 3474, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 105, + "startColumn": 50, + "charOffset": 3422, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Teleport::updateThing(std::shared_ptr, uint16_t, uint32_t) {\n\t//\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ee4796db74a9bba2b90a303a86a00fcbe9f9aaba4de492ac65c8b93c0b4bcaa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 37, + "charOffset": 3541, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 37, + "charOffset": 3502, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Teleport::replaceThing(uint32_t, std::shared_ptr) {\n\t//\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f06be3a0929c102ee90a4a2b999f8ebf3ee75e8d7ebeb2ac96932ad3ddc4ed01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp" + }, + "region": { + "startLine": 115, + "startColumn": 50, + "charOffset": 3625, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 113, + "startColumn": 50, + "charOffset": 3573, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Teleport::removeThing(std::shared_ptr, uint32_t) {\n\t//\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "350fd717bcb08b7cc2d4f8df961f5104c4102b701f1193557f0f9cb0bcff5e92" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp" + }, + "region": { + "startLine": 119, + "startColumn": 16, + "charOffset": 3661, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + } + }, + "contextRegion": { + "startLine": 117, + "startColumn": 16, + "charOffset": 3643, + "charLength": 19, + "snippet": { + "text": "}\n\nvoid Teleport::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\n\tgetParent()->postAddNotification(thing, oldParent, index, LINK_PARENT);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96956f2bd120e34baae4d734041c139cc89bb2159f35f48109233e4b2f032356" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp" + }, + "region": { + "startLine": 119, + "startColumn": 132, + "charOffset": 3777, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 117, + "startColumn": 132, + "charOffset": 3643, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Teleport::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\n\tgetParent()->postAddNotification(thing, oldParent, index, LINK_PARENT);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "884149b1cb2e8b724016934d7aa21d0082c06a45627477a818d9f34914f73f11" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp" + }, + "region": { + "startLine": 123, + "startColumn": 16, + "charOffset": 3872, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + } + }, + "contextRegion": { + "startLine": 121, + "startColumn": 16, + "charOffset": 3854, + "charLength": 22, + "snippet": { + "text": "}\n\nvoid Teleport::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\n\tgetParent()->postRemoveNotification(thing, newParent, index, LINK_PARENT);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "690a2f3ec88514b03649233e457f3985c7cc6af558554b50bb44e14b35e1d6c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/movement/teleport.cpp" + }, + "region": { + "startLine": 123, + "startColumn": 135, + "charOffset": 3991, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 121, + "startColumn": 135, + "charOffset": 3854, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Teleport::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\n\tgetParent()->postRemoveNotification(thing, newParent, index, LINK_PARENT);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5add637fb9d562397a99114d8899ae52b932f5e147571a3379b056e0f04d569" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'loadScheduleEventFromXml' has cognitive complexity of 57 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 16, + "startColumn": 23, + "charOffset": 533, + "charLength": 24, + "snippet": { + "text": "loadScheduleEventFromXml" + } + }, + "contextRegion": { + "startLine": 14, + "startColumn": 23, + "charOffset": 475, + "charLength": 24, + "snippet": { + "text": "#include \"lua/scripts/scripts.hpp\"\n\nbool EventsScheduler::loadScheduleEventFromXml() {\n\tpugi::xml_document doc;\n\tauto folder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + \"/XML/events.xml\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7cc18e5154528a8e7b493c0f7609945123e905e2ece0b00ab077ebcd63e1d1e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 19, + "startColumn": 6, + "charOffset": 686, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 17, + "startColumn": 6, + "charOffset": 562, + "charLength": 1, + "snippet": { + "text": "\tpugi::xml_document doc;\n\tauto folder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + \"/XML/events.xml\";\n\tif (!doc.load_file(folder.c_str())) {\n\t\tprintXMLError(__FUNCTION__, folder, doc.load_file(folder.c_str()));\n\t\tconsoleHandlerExit();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1677dfa6ac2ba64e15f61e1ab637e95b07fa2ee702f13c3def23f90fabb97871" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 25, + "startColumn": 13, + "charOffset": 846, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 13, + "charOffset": 830, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\ttime_t t = time(nullptr);\n\tconst tm* timePtr = localtime(&t);\n\tint daysMath = ((timePtr->tm_year + 1900) * 365) + ((timePtr->tm_mon + 1) * 30) + (timePtr->tm_mday);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8082255a5cab29c74a15c36bf269dfced5781dfd92e08823225a9cdebf0659f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 22, + "charOffset": 882, + "charLength": 9, + "snippet": { + "text": "localtime" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 22, + "charOffset": 833, + "charLength": 9, + "snippet": { + "text": "\n\ttime_t t = time(nullptr);\n\tconst tm* timePtr = localtime(&t);\n\tint daysMath = ((timePtr->tm_year + 1900) * 365) + ((timePtr->tm_mon + 1) * 30) + (timePtr->tm_mday);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89fc50be98b9f1c33bc842e282231078b7429f73c9d9ed34626aa3d70807b6fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "concurrency-mt-unsafe", + "ruleIndex": 478, + "kind": "fail", + "level": "warning", + "message": { + "text": "function is not thread safe" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 22, + "charOffset": 882, + "charLength": 9, + "snippet": { + "text": "localtime" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 22, + "charOffset": 833, + "charLength": 9, + "snippet": { + "text": "\n\ttime_t t = time(nullptr);\n\tconst tm* timePtr = localtime(&t);\n\tint daysMath = ((timePtr->tm_year + 1900) * 365) + ((timePtr->tm_mon + 1) * 30) + (timePtr->tm_mday);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "768d0b8fd365da85ce91b15703bdbed8a928f21bc162d17a4648c382749b9462" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1900 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 38, + "charOffset": 934, + "charLength": 4, + "snippet": { + "text": "1900" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 38, + "charOffset": 834, + "charLength": 4, + "snippet": { + "text": "\ttime_t t = time(nullptr);\n\tconst tm* timePtr = localtime(&t);\n\tint daysMath = ((timePtr->tm_year + 1900) * 365) + ((timePtr->tm_mon + 1) * 30) + (timePtr->tm_mday);\n\n\t// Keep track of loaded scripts to check for duplicates" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17370098ac3754e962c0606864cd4bef3e2c1380bba33c686f33e3fb8a63d163" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "365 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 46, + "charOffset": 942, + "charLength": 3, + "snippet": { + "text": "365" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 46, + "charOffset": 834, + "charLength": 3, + "snippet": { + "text": "\ttime_t t = time(nullptr);\n\tconst tm* timePtr = localtime(&t);\n\tint daysMath = ((timePtr->tm_year + 1900) * 365) + ((timePtr->tm_mon + 1) * 30) + (timePtr->tm_mday);\n\n\t// Keep track of loaded scripts to check for duplicates" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "18eb394604e820470617c85283a6ad162de37f12d17e6a2a75aeed1cb4952f74" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 78, + "charOffset": 974, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 78, + "charOffset": 834, + "charLength": 2, + "snippet": { + "text": "\ttime_t t = time(nullptr);\n\tconst tm* timePtr = localtime(&t);\n\tint daysMath = ((timePtr->tm_year + 1900) * 365) + ((timePtr->tm_mon + 1) * 30) + (timePtr->tm_mday);\n\n\t// Keep track of loaded scripts to check for duplicates" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35d34252818fdd18fcf619e28bd9249e3a5eff2a4249652883420fa12fbbe8d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'startYear' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 36, + "startColumn": 11, + "charOffset": 1378, + "charLength": 9, + "snippet": { + "text": "startYear" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 11, + "charOffset": 1300, + "charLength": 9, + "snippet": { + "text": "\t\tstd::string eventName = eventNode.attribute(\"name\").as_string();\n\n\t\tint16_t startYear;\n\t\tint16_t startMonth;\n\t\tint16_t startDay;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a2deea94dc146a0ae6a912c2d604b3646226d6e1d319e1ec39d50e5eb236023" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'startMonth' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 37, + "startColumn": 11, + "charOffset": 1399, + "charLength": 10, + "snippet": { + "text": "startMonth" + } + }, + "contextRegion": { + "startLine": 35, + "startColumn": 11, + "charOffset": 1367, + "charLength": 10, + "snippet": { + "text": "\n\t\tint16_t startYear;\n\t\tint16_t startMonth;\n\t\tint16_t startDay;\n\t\tint16_t endYear;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "858f144b0ff8c290ba3d5c88cc09030338a34eaac82c10efbd35694a06fe7c0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'startDay' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 11, + "charOffset": 1421, + "charLength": 8, + "snippet": { + "text": "startDay" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 11, + "charOffset": 1368, + "charLength": 8, + "snippet": { + "text": "\t\tint16_t startYear;\n\t\tint16_t startMonth;\n\t\tint16_t startDay;\n\t\tint16_t endYear;\n\t\tint16_t endMonth;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fca826c6c2309bb2390f73e9b8b01c84e97f3c6912d4f4fcf543ead1aeeebd31" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'endYear' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 39, + "startColumn": 11, + "charOffset": 1441, + "charLength": 7, + "snippet": { + "text": "endYear" + } + }, + "contextRegion": { + "startLine": 37, + "startColumn": 11, + "charOffset": 1389, + "charLength": 7, + "snippet": { + "text": "\t\tint16_t startMonth;\n\t\tint16_t startDay;\n\t\tint16_t endYear;\n\t\tint16_t endMonth;\n\t\tint16_t endDay;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "696543354140ae0f2bf0c04c50649105a5269167266dd7d62a42d90ee57c93c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'endMonth' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 40, + "startColumn": 11, + "charOffset": 1460, + "charLength": 8, + "snippet": { + "text": "endMonth" + } + }, + "contextRegion": { + "startLine": 38, + "startColumn": 11, + "charOffset": 1411, + "charLength": 8, + "snippet": { + "text": "\t\tint16_t startDay;\n\t\tint16_t endYear;\n\t\tint16_t endMonth;\n\t\tint16_t endDay;\n\t\tsscanf(eventNode.attribute(\"startdate\").as_string(), \"%hd/%hd/%hd\", &startMonth, &startDay, &startYear);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10b0135d075bef60038a5d170a44ccf9f8754d177ec93a4985e053aca2017ccc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'endDay' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 11, + "charOffset": 1480, + "charLength": 6, + "snippet": { + "text": "endDay" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 11, + "charOffset": 1431, + "charLength": 6, + "snippet": { + "text": "\t\tint16_t endYear;\n\t\tint16_t endMonth;\n\t\tint16_t endDay;\n\t\tsscanf(eventNode.attribute(\"startdate\").as_string(), \"%hd/%hd/%hd\", &startMonth, &startDay, &startYear);\n\t\tsscanf(eventNode.attribute(\"enddate\").as_string(), \"%hd/%hd/%hd\", &endMonth, &endDay, &endYear);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "894300de6fa34c238c0929032c5c6d4e4f0e0b064dfd5608e35ed6722660ef71" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err33-c", + "ruleIndex": 132, + "kind": "fail", + "level": "warning", + "message": { + "text": "the value returned by this function should not be disregarded; neglecting it may lead to errors" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 3, + "charOffset": 1490, + "charLength": 6, + "snippet": { + "text": "sscanf" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 3, + "charOffset": 1450, + "charLength": 6, + "snippet": { + "text": "\t\tint16_t endMonth;\n\t\tint16_t endDay;\n\t\tsscanf(eventNode.attribute(\"startdate\").as_string(), \"%hd/%hd/%hd\", &startMonth, &startDay, &startYear);\n\t\tsscanf(eventNode.attribute(\"enddate\").as_string(), \"%hd/%hd/%hd\", &endMonth, &endDay, &endYear);\n\t\tint startDays = ((startYear * 365) + (startMonth * 30) + startDay);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e34f1ab19edca34a86bc9878e0b56fca610bd21921d3d78e9dba39d7b9768a96" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err34-c", + "ruleIndex": 133, + "kind": "fail", + "level": "warning", + "message": { + "text": "'sscanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 3, + "charOffset": 1490, + "charLength": 6, + "snippet": { + "text": "sscanf" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 3, + "charOffset": 1450, + "charLength": 6, + "snippet": { + "text": "\t\tint16_t endMonth;\n\t\tint16_t endDay;\n\t\tsscanf(eventNode.attribute(\"startdate\").as_string(), \"%hd/%hd/%hd\", &startMonth, &startDay, &startYear);\n\t\tsscanf(eventNode.attribute(\"enddate\").as_string(), \"%hd/%hd/%hd\", &endMonth, &endDay, &endYear);\n\t\tint startDays = ((startYear * 365) + (startMonth * 30) + startDay);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd02162643477879f84072dd3478497e9b3c2b5670dce6378db0ddadfe94e02b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 3, + "charOffset": 1490, + "charLength": 6, + "snippet": { + "text": "sscanf" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 3, + "charOffset": 1450, + "charLength": 6, + "snippet": { + "text": "\t\tint16_t endMonth;\n\t\tint16_t endDay;\n\t\tsscanf(eventNode.attribute(\"startdate\").as_string(), \"%hd/%hd/%hd\", &startMonth, &startDay, &startYear);\n\t\tsscanf(eventNode.attribute(\"enddate\").as_string(), \"%hd/%hd/%hd\", &endMonth, &endDay, &endYear);\n\t\tint startDays = ((startYear * 365) + (startMonth * 30) + startDay);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13401c97e2a890941ee15693183093cf714a0fb1ced95b1519a3eb517e030839" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-vararg", + "ruleIndex": 514, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not call c-style vararg functions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 3, + "charOffset": 1490, + "charLength": 6, + "snippet": { + "text": "sscanf" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 3, + "charOffset": 1450, + "charLength": 6, + "snippet": { + "text": "\t\tint16_t endMonth;\n\t\tint16_t endDay;\n\t\tsscanf(eventNode.attribute(\"startdate\").as_string(), \"%hd/%hd/%hd\", &startMonth, &startDay, &startYear);\n\t\tsscanf(eventNode.attribute(\"enddate\").as_string(), \"%hd/%hd/%hd\", &endMonth, &endDay, &endYear);\n\t\tint startDays = ((startYear * 365) + (startMonth * 30) + startDay);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e15d9f69e5cae6d1fe8058eecd50804a400bd59864bdb285377795004771858" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err33-c", + "ruleIndex": 132, + "kind": "fail", + "level": "warning", + "message": { + "text": "the value returned by this function should not be disregarded; neglecting it may lead to errors" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 3, + "charOffset": 1597, + "charLength": 6, + "snippet": { + "text": "sscanf" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 3, + "charOffset": 1470, + "charLength": 6, + "snippet": { + "text": "\t\tint16_t endDay;\n\t\tsscanf(eventNode.attribute(\"startdate\").as_string(), \"%hd/%hd/%hd\", &startMonth, &startDay, &startYear);\n\t\tsscanf(eventNode.attribute(\"enddate\").as_string(), \"%hd/%hd/%hd\", &endMonth, &endDay, &endYear);\n\t\tint startDays = ((startYear * 365) + (startMonth * 30) + startDay);\n\t\tint endDays = ((endYear * 365) + (endMonth * 30) + endDay);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e57e9e33c0da3c359c3694523d176416b98efb5b5e334e9ebb83b02302513a06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err34-c", + "ruleIndex": 133, + "kind": "fail", + "level": "warning", + "message": { + "text": "'sscanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 3, + "charOffset": 1597, + "charLength": 6, + "snippet": { + "text": "sscanf" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 3, + "charOffset": 1470, + "charLength": 6, + "snippet": { + "text": "\t\tint16_t endDay;\n\t\tsscanf(eventNode.attribute(\"startdate\").as_string(), \"%hd/%hd/%hd\", &startMonth, &startDay, &startYear);\n\t\tsscanf(eventNode.attribute(\"enddate\").as_string(), \"%hd/%hd/%hd\", &endMonth, &endDay, &endYear);\n\t\tint startDays = ((startYear * 365) + (startMonth * 30) + startDay);\n\t\tint endDays = ((endYear * 365) + (endMonth * 30) + endDay);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc20363791bf1c2123b641010ecb6e9af748bcbfd068239b9144dcab006fe4ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 3, + "charOffset": 1597, + "charLength": 6, + "snippet": { + "text": "sscanf" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 3, + "charOffset": 1470, + "charLength": 6, + "snippet": { + "text": "\t\tint16_t endDay;\n\t\tsscanf(eventNode.attribute(\"startdate\").as_string(), \"%hd/%hd/%hd\", &startMonth, &startDay, &startYear);\n\t\tsscanf(eventNode.attribute(\"enddate\").as_string(), \"%hd/%hd/%hd\", &endMonth, &endDay, &endYear);\n\t\tint startDays = ((startYear * 365) + (startMonth * 30) + startDay);\n\t\tint endDays = ((endYear * 365) + (endMonth * 30) + endDay);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5b2b61a54da9613be65ece5b8ddfe6157af9c10edbf85fd0d2454967cd7c611" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-vararg", + "ruleIndex": 514, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not call c-style vararg functions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 3, + "charOffset": 1597, + "charLength": 6, + "snippet": { + "text": "sscanf" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 3, + "charOffset": 1470, + "charLength": 6, + "snippet": { + "text": "\t\tint16_t endDay;\n\t\tsscanf(eventNode.attribute(\"startdate\").as_string(), \"%hd/%hd/%hd\", &startMonth, &startDay, &startYear);\n\t\tsscanf(eventNode.attribute(\"enddate\").as_string(), \"%hd/%hd/%hd\", &endMonth, &endDay, &endYear);\n\t\tint startDays = ((startYear * 365) + (startMonth * 30) + startDay);\n\t\tint endDays = ((endYear * 365) + (endMonth * 30) + endDay);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "169b26311ecf94b5b2ce4c48be9e052c229b2e8c7dfa6c86a72403e3c99478e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "365 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 44, + "startColumn": 33, + "charOffset": 1726, + "charLength": 3, + "snippet": { + "text": "365" + } + }, + "contextRegion": { + "startLine": 42, + "startColumn": 33, + "charOffset": 1488, + "charLength": 3, + "snippet": { + "text": "\t\tsscanf(eventNode.attribute(\"startdate\").as_string(), \"%hd/%hd/%hd\", &startMonth, &startDay, &startYear);\n\t\tsscanf(eventNode.attribute(\"enddate\").as_string(), \"%hd/%hd/%hd\", &endMonth, &endDay, &endYear);\n\t\tint startDays = ((startYear * 365) + (startMonth * 30) + startDay);\n\t\tint endDays = ((endYear * 365) + (endMonth * 30) + endDay);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76d911703a936a18eb2312b05a7826710a07d4ed497d1b3989f4fcf81495ccc8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 44, + "startColumn": 54, + "charOffset": 1747, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 42, + "startColumn": 54, + "charOffset": 1488, + "charLength": 2, + "snippet": { + "text": "\t\tsscanf(eventNode.attribute(\"startdate\").as_string(), \"%hd/%hd/%hd\", &startMonth, &startDay, &startYear);\n\t\tsscanf(eventNode.attribute(\"enddate\").as_string(), \"%hd/%hd/%hd\", &endMonth, &endDay, &endYear);\n\t\tint startDays = ((startYear * 365) + (startMonth * 30) + startDay);\n\t\tint endDays = ((endYear * 365) + (endMonth * 30) + endDay);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a318516efc1905532d531be929cda05dc80313251f4f9e9675ce236ecb2811b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "365 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 29, + "charOffset": 1792, + "charLength": 3, + "snippet": { + "text": "365" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 29, + "charOffset": 1595, + "charLength": 3, + "snippet": { + "text": "\t\tsscanf(eventNode.attribute(\"enddate\").as_string(), \"%hd/%hd/%hd\", &endMonth, &endDay, &endYear);\n\t\tint startDays = ((startYear * 365) + (startMonth * 30) + startDay);\n\t\tint endDays = ((endYear * 365) + (endMonth * 30) + endDay);\n\n\t\tif (daysMath < startDays || daysMath > endDays) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6e67b31a18ec04f7aa6a01601ed6427ce8d0bf58ddac1399feb67ea551811f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 48, + "charOffset": 1811, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 48, + "charOffset": 1595, + "charLength": 2, + "snippet": { + "text": "\t\tsscanf(eventNode.attribute(\"enddate\").as_string(), \"%hd/%hd/%hd\", &endMonth, &endDay, &endYear);\n\t\tint startDays = ((startYear * 365) + (startMonth * 30) + startDay);\n\t\tint endDays = ((endYear * 365) + (endMonth * 30) + endDay);\n\n\t\tif (daysMath < startDays || daysMath > endDays) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35b18c1a470da0e545440e9866b6ecbd521b1145df7656d7b3dedd171bca7c8f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 56, + "startColumn": 17, + "charOffset": 2115, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 54, + "startColumn": 17, + "charOffset": 2094, + "charLength": 6, + "snippet": { + "text": "\t\t}\n\n\t\tloadedScripts.insert(eventScript);\n\t\tif (!eventScript.empty() && !g_scripts().loadEventSchedulerScripts(eventScript)) {\n\t\t\tg_logger().warn(\"{} - Can not load the file '{}' on '/events/scripts/scheduler/'\", __FUNCTION__, eventScript);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6446e0724f14b51a3d0eab159e0504d291b63970b7c13aba9e6e6d4d844f264" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 63, + "startColumn": 3, + "charOffset": 2391, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 3, + "charOffset": 2356, + "charLength": 3, + "snippet": { + "text": "\n\t\tEventRates currentEventRates;\n\t\tfor (const auto &ingameNode : eventNode.children()) {\n\t\t\tif (ingameNode.attribute(\"exprate\")) {\n\t\t\t\tuint16_t exprate = static_cast(ingameNode.attribute(\"exprate\").as_uint());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52f83930227c25bb24398bc55be0acd6fee81cbe81c4bd4611adfe9ad4ef9064" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 64, + "startColumn": 8, + "charOffset": 2452, + "charLength": 10, + "snippet": { + "text": "ingameNode" + } + }, + "contextRegion": { + "startLine": 62, + "startColumn": 8, + "charOffset": 2357, + "charLength": 10, + "snippet": { + "text": "\t\tEventRates currentEventRates;\n\t\tfor (const auto &ingameNode : eventNode.children()) {\n\t\t\tif (ingameNode.attribute(\"exprate\")) {\n\t\t\t\tuint16_t exprate = static_cast(ingameNode.attribute(\"exprate\").as_uint());\n\t\t\t\tcurrentEventRates.exprate = exprate;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "539bad05f6122b63144b5828391cfefd4c3c45a9b3aa2c04e8c2baaf92a7cd64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 64, + "startColumn": 8, + "charOffset": 2452, + "charLength": 10, + "snippet": { + "text": "ingameNode" + } + }, + "contextRegion": { + "startLine": 62, + "startColumn": 8, + "charOffset": 2357, + "charLength": 10, + "snippet": { + "text": "\t\tEventRates currentEventRates;\n\t\tfor (const auto &ingameNode : eventNode.children()) {\n\t\t\tif (ingameNode.attribute(\"exprate\")) {\n\t\t\t\tuint16_t exprate = static_cast(ingameNode.attribute(\"exprate\").as_uint());\n\t\t\t\tcurrentEventRates.exprate = exprate;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da0037dd5cc4a86a36e4895337fc101306f2e474b8950488a4aeea52a653d21f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 8, + "charOffset": 2679, + "charLength": 10, + "snippet": { + "text": "ingameNode" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 8, + "charOffset": 2666, + "charLength": 10, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (ingameNode.attribute(\"lootrate\")) {\n\t\t\t\tuint16_t lootrate = static_cast(ingameNode.attribute(\"lootrate\").as_uint());\n\t\t\t\tcurrentEventRates.lootrate = lootrate;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1f522d850c4ba459769928ebf830d8f908847068749670f86effeb30d8d7ae7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 8, + "charOffset": 2679, + "charLength": 10, + "snippet": { + "text": "ingameNode" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 8, + "charOffset": 2666, + "charLength": 10, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (ingameNode.attribute(\"lootrate\")) {\n\t\t\t\tuint16_t lootrate = static_cast(ingameNode.attribute(\"lootrate\").as_uint());\n\t\t\t\tcurrentEventRates.lootrate = lootrate;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bcadfdf2752cb5d9a656fd181c22f3abb54bea3467a9a834129993c7fb1fc0fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 8, + "charOffset": 2913, + "charLength": 10, + "snippet": { + "text": "ingameNode" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 8, + "charOffset": 2900, + "charLength": 10, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (ingameNode.attribute(\"bosslootrate\")) {\n\t\t\t\tuint16_t bosslootrate = static_cast(ingameNode.attribute(\"bosslootrate\").as_uint());\n\t\t\t\tcurrentEventRates.bosslootrate = bosslootrate;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efec054a068dc72788ff47f403d9f05f0e7328d5a5f9cd0f9d3fbad9497d6ffa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 8, + "charOffset": 2913, + "charLength": 10, + "snippet": { + "text": "ingameNode" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 8, + "charOffset": 2900, + "charLength": 10, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (ingameNode.attribute(\"bosslootrate\")) {\n\t\t\t\tuint16_t bosslootrate = static_cast(ingameNode.attribute(\"bosslootrate\").as_uint());\n\t\t\t\tcurrentEventRates.bosslootrate = bosslootrate;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c94bb4cb51f7a187290d0fff4523c7743a1a2004aa4a511d798fb5401755a4f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 82, + "startColumn": 8, + "charOffset": 3175, + "charLength": 10, + "snippet": { + "text": "ingameNode" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 8, + "charOffset": 3162, + "charLength": 10, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (ingameNode.attribute(\"spawnrate\")) {\n\t\t\t\tuint16_t spawnrate = static_cast(ingameNode.attribute(\"spawnrate\").as_uint());\n\t\t\t\tcurrentEventRates.spawnrate = spawnrate;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fce5f8f791d365388179a1259d56a9adde427ff67c3ed94fcdf8b0e22d4b02c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 82, + "startColumn": 8, + "charOffset": 3175, + "charLength": 10, + "snippet": { + "text": "ingameNode" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 8, + "charOffset": 3162, + "charLength": 10, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (ingameNode.attribute(\"spawnrate\")) {\n\t\t\t\tuint16_t spawnrate = static_cast(ingameNode.attribute(\"spawnrate\").as_uint());\n\t\t\t\tcurrentEventRates.spawnrate = spawnrate;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5f7559a88e784c30080e4ac844ed3208efe8b43a293e3f207efb904eb3a87f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 88, + "startColumn": 8, + "charOffset": 3423, + "charLength": 10, + "snippet": { + "text": "ingameNode" + } + }, + "contextRegion": { + "startLine": 86, + "startColumn": 8, + "charOffset": 3410, + "charLength": 10, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (ingameNode.attribute(\"skillrate\")) {\n\t\t\t\tuint16_t skillrate = static_cast(ingameNode.attribute(\"skillrate\").as_uint());\n\t\t\t\tcurrentEventRates.skillrate = skillrate;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ea16fe963df862e4fcfab80a550e98a75ec48bfb7831aa3ab90b7a8485a2d00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 88, + "startColumn": 8, + "charOffset": 3423, + "charLength": 10, + "snippet": { + "text": "ingameNode" + } + }, + "contextRegion": { + "startLine": 86, + "startColumn": 8, + "charOffset": 3410, + "charLength": 10, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (ingameNode.attribute(\"skillrate\")) {\n\t\t\t\tuint16_t skillrate = static_cast(ingameNode.attribute(\"skillrate\").as_uint());\n\t\t\t\tcurrentEventRates.skillrate = skillrate;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4638496f5d9f5f536a240bb445f6c4df47af838ebe8b35a23d67ac0409b6a220" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 95, + "startColumn": 3, + "charOffset": 3663, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 93, + "startColumn": 3, + "charOffset": 3656, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfor (const auto &[eventName, rates] : eventsOnSameDay) {\n\t\t\tstd::vector modifiedRates;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7fa721fa38fc70d4f7f7600c532ba8e249c1786d15e8ed178df558ca7cd3c6fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 25, + "charOffset": 3788, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 25, + "charOffset": 3720, + "charLength": 3, + "snippet": { + "text": "\t\t\tstd::vector modifiedRates;\n\n\t\t\tif (rates.exprate != 100 && currentEventRates.exprate != 100 && rates.exprate == currentEventRates.exprate) {\n\t\t\t\tmodifiedRates.emplace_back(\"exprate\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b29dafb632c4754ac253fd10bea87bf7d18581792f0f6833bf9cdd407b39633c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 61, + "charOffset": 3824, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 61, + "charOffset": 3720, + "charLength": 3, + "snippet": { + "text": "\t\t\tstd::vector modifiedRates;\n\n\t\t\tif (rates.exprate != 100 && currentEventRates.exprate != 100 && rates.exprate == currentEventRates.exprate) {\n\t\t\t\tmodifiedRates.emplace_back(\"exprate\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55800d232f64029297541a77fd238e69f8f295080d2ce235db9dc074dffaa80d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 99, + "startColumn": 19, + "charOffset": 3895, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 97, + "startColumn": 19, + "charOffset": 3763, + "charLength": 12, + "snippet": { + "text": "\n\t\t\tif (rates.exprate != 100 && currentEventRates.exprate != 100 && rates.exprate == currentEventRates.exprate) {\n\t\t\t\tmodifiedRates.emplace_back(\"exprate\");\n\t\t\t}\n\t\t\tif (rates.lootrate != 100 && currentEventRates.lootrate != 100 && rates.lootrate == currentEventRates.lootrate) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95bcea6ef97d4667087923ed6458f5b585abf29e26ac2393ffd24c8c59262fe8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 101, + "startColumn": 26, + "charOffset": 3950, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 99, + "startColumn": 26, + "charOffset": 3877, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tmodifiedRates.emplace_back(\"exprate\");\n\t\t\t}\n\t\t\tif (rates.lootrate != 100 && currentEventRates.lootrate != 100 && rates.lootrate == currentEventRates.lootrate) {\n\t\t\t\tmodifiedRates.emplace_back(\"lootrate\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbb40e1304806ece47dd81d688f3f43d2fca333644ee67ca3c4d7cabcb3080b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 101, + "startColumn": 63, + "charOffset": 3987, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 99, + "startColumn": 63, + "charOffset": 3877, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tmodifiedRates.emplace_back(\"exprate\");\n\t\t\t}\n\t\t\tif (rates.lootrate != 100 && currentEventRates.lootrate != 100 && rates.lootrate == currentEventRates.lootrate) {\n\t\t\t\tmodifiedRates.emplace_back(\"lootrate\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7451812ad5a149cca8e125706a6071cc3c01ca5feb2e090a42bdb728319921d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 102, + "startColumn": 19, + "charOffset": 4060, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 100, + "startColumn": 19, + "charOffset": 3920, + "charLength": 12, + "snippet": { + "text": "\t\t\t}\n\t\t\tif (rates.lootrate != 100 && currentEventRates.lootrate != 100 && rates.lootrate == currentEventRates.lootrate) {\n\t\t\t\tmodifiedRates.emplace_back(\"lootrate\");\n\t\t\t}\n\t\t\tif (rates.bosslootrate != 100 && currentEventRates.bosslootrate != 100 && rates.bosslootrate == currentEventRates.bosslootrate) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4bb7887dd237d2cb1b89e273a45af49002755ebed698aa3952c08b9c02c1a1d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 104, + "startColumn": 30, + "charOffset": 4120, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 102, + "startColumn": 30, + "charOffset": 4042, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tmodifiedRates.emplace_back(\"lootrate\");\n\t\t\t}\n\t\t\tif (rates.bosslootrate != 100 && currentEventRates.bosslootrate != 100 && rates.bosslootrate == currentEventRates.bosslootrate) {\n\t\t\t\tmodifiedRates.emplace_back(\"bosslootrate\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54e0fcce25344f045a70f2b4dd357c421ebfbefaf297b3092947695a28c7e02e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 104, + "startColumn": 71, + "charOffset": 4161, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 102, + "startColumn": 71, + "charOffset": 4042, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tmodifiedRates.emplace_back(\"lootrate\");\n\t\t\t}\n\t\t\tif (rates.bosslootrate != 100 && currentEventRates.bosslootrate != 100 && rates.bosslootrate == currentEventRates.bosslootrate) {\n\t\t\t\tmodifiedRates.emplace_back(\"bosslootrate\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "960f7dd2ecfd60488854058f81035623bf77ae372d597ac24e31c7acba75951e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 105, + "startColumn": 19, + "charOffset": 4242, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 103, + "startColumn": 19, + "charOffset": 4086, + "charLength": 12, + "snippet": { + "text": "\t\t\t}\n\t\t\tif (rates.bosslootrate != 100 && currentEventRates.bosslootrate != 100 && rates.bosslootrate == currentEventRates.bosslootrate) {\n\t\t\t\tmodifiedRates.emplace_back(\"bosslootrate\");\n\t\t\t}\n\t\t\tif (rates.spawnrate != 100 && currentEventRates.spawnrate != 100 && rates.spawnrate == currentEventRates.spawnrate) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5d6e0002690cac3c5ac5041aeb6e6184a367af0ed2f10c1c40ef7f13fb1deeb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 107, + "startColumn": 27, + "charOffset": 4303, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 105, + "startColumn": 27, + "charOffset": 4224, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tmodifiedRates.emplace_back(\"bosslootrate\");\n\t\t\t}\n\t\t\tif (rates.spawnrate != 100 && currentEventRates.spawnrate != 100 && rates.spawnrate == currentEventRates.spawnrate) {\n\t\t\t\tmodifiedRates.emplace_back(\"spawnrate\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1c403c27b0bc7e9c02ab288e5db52c76ab7551ff4a70196a0d0e88e1c761004" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 107, + "startColumn": 65, + "charOffset": 4341, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 105, + "startColumn": 65, + "charOffset": 4224, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tmodifiedRates.emplace_back(\"bosslootrate\");\n\t\t\t}\n\t\t\tif (rates.spawnrate != 100 && currentEventRates.spawnrate != 100 && rates.spawnrate == currentEventRates.spawnrate) {\n\t\t\t\tmodifiedRates.emplace_back(\"spawnrate\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "550c5c0e09cbda631011df764c5ba67abda7faceec36e40cb3d4ee43af73d99e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 108, + "startColumn": 19, + "charOffset": 4416, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 19, + "charOffset": 4272, + "charLength": 12, + "snippet": { + "text": "\t\t\t}\n\t\t\tif (rates.spawnrate != 100 && currentEventRates.spawnrate != 100 && rates.spawnrate == currentEventRates.spawnrate) {\n\t\t\t\tmodifiedRates.emplace_back(\"spawnrate\");\n\t\t\t}\n\t\t\tif (rates.skillrate != 100 && currentEventRates.skillrate != 100 && rates.skillrate == currentEventRates.skillrate) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a53925e8b97f2782c967fcdb8d8685d6a546ea33c7b2d40bd8f6482382f2c01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 110, + "startColumn": 27, + "charOffset": 4474, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 108, + "startColumn": 27, + "charOffset": 4398, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tmodifiedRates.emplace_back(\"spawnrate\");\n\t\t\t}\n\t\t\tif (rates.skillrate != 100 && currentEventRates.skillrate != 100 && rates.skillrate == currentEventRates.skillrate) {\n\t\t\t\tmodifiedRates.emplace_back(\"skillrate\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e419202deb0affeeb15a75e29b9ad2d9e9848a2abc595132a01980964258cc02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 110, + "startColumn": 65, + "charOffset": 4512, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 108, + "startColumn": 65, + "charOffset": 4398, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tmodifiedRates.emplace_back(\"spawnrate\");\n\t\t\t}\n\t\t\tif (rates.skillrate != 100 && currentEventRates.skillrate != 100 && rates.skillrate == currentEventRates.skillrate) {\n\t\t\t\tmodifiedRates.emplace_back(\"skillrate\");\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b642901722a2a9eaa945ed1e71d859911124ce8018b558d96ddbfe33afcde238" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 19, + "charOffset": 4587, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 19, + "charOffset": 4443, + "charLength": 12, + "snippet": { + "text": "\t\t\t}\n\t\t\tif (rates.skillrate != 100 && currentEventRates.skillrate != 100 && rates.skillrate == currentEventRates.skillrate) {\n\t\t\t\tmodifiedRates.emplace_back(\"skillrate\");\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98d900be6945f40fe1899f8cd3664c71963f7ecd154ce248db7a142bc4005168" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 121, + "startColumn": 18, + "charOffset": 4966, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 119, + "startColumn": 18, + "charOffset": 4898, + "charLength": 12, + "snippet": { + "text": "\n\t\teventsOnSameDay[eventName] = currentEventRates;\n\t\teventScheduler.emplace_back(EventScheduler(eventName, startDays, endDays));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab1913bd42ac220c359c360ad3e171c4a9b2b54a5349ea0ed3db86d07ea1f0fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 124, + "startColumn": 2, + "charOffset": 5032, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 122, + "startColumn": 2, + "charOffset": 5027, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &event : eventScheduler) {\n\t\tif (daysMath >= event.startDays && daysMath <= event.endDays) {\n\t\t\tg_logger().info(\"Active EventScheduler: {}\", event.name);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5359ba06c9725c6cb365b141044a7d297e5faabf9108387b730d82828492da43" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'join' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 132, + "startColumn": 30, + "charOffset": 5255, + "charLength": 4, + "snippet": { + "text": "join" + } + }, + "contextRegion": { + "startLine": 130, + "startColumn": 30, + "charOffset": 5223, + "charLength": 4, + "snippet": { + "text": "}\n\nstd::string EventsScheduler::join(const std::vector &vec, const std::string &delim) {\n\tstd::stringstream result;\n\tfor (size_t i = 0; i < vec.size(); ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cef97bef5384ba91f9a26ed71adf6fa6aa62f7bdc3babd206ce6cacfb4f753a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/events_scheduler.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 2, + "charOffset": 5353, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 2, + "charOffset": 5226, + "charLength": 3, + "snippet": { + "text": "std::string EventsScheduler::join(const std::vector &vec, const std::string &delim) {\n\tstd::stringstream result;\n\tfor (size_t i = 0; i < vec.size(); ++i) {\n\t\tresult << vec[i];\n\t\tif (i != vec.size() - 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1cb63776486aadf851e6af40f740316d5abd62d67fcad275b21028f0bdd2d481" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 29, + "startColumn": 3, + "charOffset": 793, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 27, + "startColumn": 3, + "charOffset": 748, + "charLength": 5, + "snippet": { + "text": "\t\tstd::unique_lock asyncLock(dummyMutex);\n\n\t\twhile (!threadPool.isStopped()) {\n\t\t\tUPDATE_OTSYS_TIME();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0828b32bdee3033eb1ed374e1ff2f6ee25e65dd941f48235ca8b17f91ffa02c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 36, + "startColumn": 8, + "charOffset": 927, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 8, + "charOffset": 901, + "charLength": 1, + "snippet": { + "text": "\t\t\tmergeEvents();\n\n\t\t\tif (!hasPendingTasks) {\n\t\t\t\tsignalSchedule.wait_for(asyncLock, timeUntilNextScheduledTask());\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80c4cc84feb824a1a42f08d5f8d33c8699d433ab8044c5b734779fb30e927c29" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 37, + "startColumn": 20, + "charOffset": 966, + "charLength": 8, + "snippet": { + "text": "wait_for" + } + }, + "contextRegion": { + "startLine": 35, + "startColumn": 20, + "charOffset": 919, + "charLength": 8, + "snippet": { + "text": "\n\t\t\tif (!hasPendingTasks) {\n\t\t\t\tsignalSchedule.wait_for(asyncLock, timeUntilNextScheduledTask());\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9cf0d76b3351219500c1bfacd45a2d207cc85c3002599a47df7ecf929ecb3c9a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 47, + "startColumn": 2, + "charOffset": 1194, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 45, + "startColumn": 2, + "charOffset": 1144, + "charLength": 3, + "snippet": { + "text": "\tdispacherContext.type = DispatcherType::Event;\n\n\tfor (const auto &task : tasks) {\n\t\tdispacherContext.taskName = task.getContext();\n\t\tif (task.execute()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "571b2cd8da0ecda94d425d3b9ba0ced37d6a12d7c58d226291bac9cafed4d6a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 62, + "startColumn": 12, + "charOffset": 1646, + "charLength": 7, + "snippet": { + "text": "execute" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 12, + "charOffset": 1521, + "charLength": 7, + "snippet": { + "text": "\t\tdispacherContext.type = DispatcherType::AsyncEvent;\n\t\tdispacherContext.group = static_cast(groupId);\n\t\ttasks[i].execute();\n\n\t\tdispacherContext.reset();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a50a5ab840458519b634dd57715eb181f0bb7f384fc771f2b72e19832b8b38f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-rvalue-reference-param-not-moved", + "ruleIndex": 515, + "kind": "fail", + "level": "warning", + "message": { + "text": "rvalue reference parameter 'f' is never moved from inside the function body" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 80, + "charOffset": 1790, + "charLength": 1, + "snippet": { + "text": "f" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 80, + "charOffset": 1708, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Dispatcher::asyncWait(size_t requestSize, std::function &&f) {\n\tif (requestSize == 0) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23088a2fbbd4692842550df443afbb45451f1b4ae3c49d014c0e1e1398869e76" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 77, + "startColumn": 3, + "charOffset": 1934, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 75, + "startColumn": 3, + "charOffset": 1834, + "charLength": 3, + "snippet": { + "text": "\t// This prevents an async call from running inside another async call.\n\tif (asyncWaitDisabled) {\n\t\tfor (uint_fast64_t i = 0; i < requestSize; ++i) {\n\t\t\tf(i);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9bb68231aeb125fd5184bdf60cb9f588d2bba0d3deffba668f4afc376fd01ad2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 96, + "startColumn": 2, + "charOffset": 2424, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 2, + "charOffset": 2381, + "charLength": 3, + "snippet": { + "text": "\n\tconst auto &[min, max] = partitions[0];\n\tfor (uint_fast64_t i = min; i < max; ++i) {\n\t\tf(i);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09efd7547c6dac7659e269fff426388aa3f7550a531aaa1b80b7cc2d3d85e20e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 107, + "startColumn": 2, + "charOffset": 2615, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 105, + "startColumn": 2, + "charOffset": 2552, + "charLength": 3, + "snippet": { + "text": "\nvoid Dispatcher::executeEvents(const TaskGroup startGroup) {\n\tfor (uint_fast8_t groupId = static_cast(startGroup); groupId < static_cast(TaskGroup::Last); ++groupId) {\n\t\tauto &tasks = m_tasks[groupId];\n\t\tif (tasks.empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c596f4b10f429b26b1c7f2015b9d9b9d351d5222d18ec4afc9b00a7916556f19" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 107, + "startColumn": 7, + "charOffset": 2620, + "charLength": 12, + "snippet": { + "text": "uint_fast8_t" + } + }, + "contextRegion": { + "startLine": 105, + "startColumn": 7, + "charOffset": 2552, + "charLength": 12, + "snippet": { + "text": "\nvoid Dispatcher::executeEvents(const TaskGroup startGroup) {\n\tfor (uint_fast8_t groupId = static_cast(startGroup); groupId < static_cast(TaskGroup::Last); ++groupId) {\n\t\tauto &tasks = m_tasks[groupId];\n\t\tif (tasks.empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81953d59b9248eb805bf9873862291428afd7242667081520068e1c2df72986f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'groupId' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 107, + "startColumn": 64, + "charOffset": 2677, + "charLength": 7, + "snippet": { + "text": "groupId" + } + }, + "contextRegion": { + "startLine": 105, + "startColumn": 64, + "charOffset": 2552, + "charLength": 7, + "snippet": { + "text": "\nvoid Dispatcher::executeEvents(const TaskGroup startGroup) {\n\tfor (uint_fast8_t groupId = static_cast(startGroup); groupId < static_cast(TaskGroup::Last); ++groupId) {\n\t\tauto &tasks = m_tasks[groupId];\n\t\tif (tasks.empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60a90eaa75288abc98bda6213a834cb3c2203f9d37ad6b4529b396dcbb26c83d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 108, + "startColumn": 17, + "charOffset": 2755, + "charLength": 7, + "snippet": { + "text": "m_tasks" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 17, + "charOffset": 2553, + "charLength": 7, + "snippet": { + "text": "void Dispatcher::executeEvents(const TaskGroup startGroup) {\n\tfor (uint_fast8_t groupId = static_cast(startGroup); groupId < static_cast(TaskGroup::Last); ++groupId) {\n\t\tauto &tasks = m_tasks[groupId];\n\t\tif (tasks.empty()) {\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0a12db756cc5c57c2a6a81a267f28de566dc6a46d7067114fa4bf126460d620" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 126, + "startColumn": 2, + "charOffset": 3133, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 124, + "startColumn": 2, + "charOffset": 3096, + "charLength": 5, + "snippet": { + "text": "\n\tauto it = scheduledTasks.begin();\n\twhile (it != scheduledTasks.end()) {\n\t\tconst auto &task = *it;\n\t\tif (task->getTime() > OTSYS_TIME()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "091e61c5c838c3a1b93495796b8f79f1439b24c145a1ba2a743b9a4373e240fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 126, + "startColumn": 9, + "charOffset": 3140, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 124, + "startColumn": 9, + "charOffset": 3096, + "charLength": 2, + "snippet": { + "text": "\n\tauto it = scheduledTasks.begin();\n\twhile (it != scheduledTasks.end()) {\n\t\tconst auto &task = *it;\n\t\tif (task->getTime() > OTSYS_TIME()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "438ecef42728701533f1e45024dc985bd5e3cf01adb8e8289fcc246818d1d12a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 138, + "startColumn": 25, + "charOffset": 3544, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 136, + "startColumn": 25, + "charOffset": 3453, + "charLength": 12, + "snippet": { + "text": "\t\tif (task->execute() && task->isCycle()) {\n\t\t\ttask->updateTime();\n\t\t\tthreadScheduledTasks.emplace_back(task);\n\t\t} else {\n\t\t\tscheduledTasksRef.erase(task->getId());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "250b9659eb81e76c07f6011596013893a66d2cc8bb2ddd7dde9028f969e05c02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 140, + "startColumn": 22, + "charOffset": 3596, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 138, + "startColumn": 22, + "charOffset": 3520, + "charLength": 5, + "snippet": { + "text": "\t\t\tthreadScheduledTasks.emplace_back(task);\n\t\t} else {\n\t\t\tscheduledTasksRef.erase(task->getId());\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "57bb3a32f8b815ae0501122c9d3ca6cd1d84ad8510ee10a0c597db1b7774cbf2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 147, + "startColumn": 18, + "charOffset": 3689, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 145, + "startColumn": 18, + "charOffset": 3634, + "charLength": 5, + "snippet": { + "text": "\n\tif (it != scheduledTasks.begin()) {\n\t\tscheduledTasks.erase(scheduledTasks.begin(), it);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c20df95180d27ff22e851e46fc9a6c94ecd303f1fd7a84a2baaa348878a1f2a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 158, + "startColumn": 12, + "charOffset": 4039, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 156, + "startColumn": 12, + "charOffset": 3930, + "charLength": 7, + "snippet": { + "text": "// Merge only async thread events with main dispatch events\nvoid Dispatcher::mergeAsyncEvents() {\n\tconstexpr uint8_t start = static_cast(TaskGroup::GenericParallel);\n\tconstexpr uint8_t end = static_cast(TaskGroup::Last);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "762e762ab3adc9e655780ce859b9ad74dad0ea202b7ec783c0b5eed56b73db0c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 159, + "startColumn": 12, + "charOffset": 4116, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 157, + "startColumn": 12, + "charOffset": 3990, + "charLength": 7, + "snippet": { + "text": "void Dispatcher::mergeAsyncEvents() {\n\tconstexpr uint8_t start = static_cast(TaskGroup::GenericParallel);\n\tconstexpr uint8_t end = static_cast(TaskGroup::Last);\n\n\tfor (const auto &thread : threads) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee664256d4c844349f545b664a449c8dca08b206acbef23d499752d0aeccc4c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 163, + "startColumn": 3, + "charOffset": 4250, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 161, + "startColumn": 3, + "charOffset": 4170, + "charLength": 3, + "snippet": { + "text": "\tfor (const auto &thread : threads) {\n\t\tstd::scoped_lock lock(thread->mutex);\n\t\tfor (uint_fast8_t i = start; i < end; ++i) {\n\t\t\tif (!thread->tasks[i].empty()) {\n\t\t\t\tm_tasks[i].insert(m_tasks[i].end(), make_move_iterator(thread->tasks[i].begin()), make_move_iterator(thread->tasks[i].end()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69dd7c24cc5658a279dcaa354d789090722ddfe6c33ac88ef462dd9902f19e27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'i' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 163, + "startColumn": 32, + "charOffset": 4279, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 161, + "startColumn": 32, + "charOffset": 4170, + "charLength": 1, + "snippet": { + "text": "\tfor (const auto &thread : threads) {\n\t\tstd::scoped_lock lock(thread->mutex);\n\t\tfor (uint_fast8_t i = start; i < end; ++i) {\n\t\t\tif (!thread->tasks[i].empty()) {\n\t\t\t\tm_tasks[i].insert(m_tasks[i].end(), make_move_iterator(thread->tasks[i].begin()), make_move_iterator(thread->tasks[i].end()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be182391c6c308dcadf3ed459a712d19503b3047628441409adce65aab393721" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 164, + "startColumn": 9, + "charOffset": 4303, + "charLength": 6, + "snippet": { + "text": "thread" + } + }, + "contextRegion": { + "startLine": 162, + "startColumn": 9, + "charOffset": 4208, + "charLength": 6, + "snippet": { + "text": "\t\tstd::scoped_lock lock(thread->mutex);\n\t\tfor (uint_fast8_t i = start; i < end; ++i) {\n\t\t\tif (!thread->tasks[i].empty()) {\n\t\t\t\tm_tasks[i].insert(m_tasks[i].end(), make_move_iterator(thread->tasks[i].begin()), make_move_iterator(thread->tasks[i].end()));\n\t\t\t\tthread->tasks[i].clear();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ae4ac8d3dd9635d104d9892f4c0c0cf38e473cf0fb2d0b8cd6cda461873a81d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 165, + "startColumn": 5, + "charOffset": 4335, + "charLength": 7, + "snippet": { + "text": "m_tasks" + } + }, + "contextRegion": { + "startLine": 163, + "startColumn": 5, + "charOffset": 4248, + "charLength": 7, + "snippet": { + "text": "\t\tfor (uint_fast8_t i = start; i < end; ++i) {\n\t\t\tif (!thread->tasks[i].empty()) {\n\t\t\t\tm_tasks[i].insert(m_tasks[i].end(), make_move_iterator(thread->tasks[i].begin()), make_move_iterator(thread->tasks[i].end()));\n\t\t\t\tthread->tasks[i].clear();\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad994e7b37fe0d7237af072c08bf26c0910cc744f02c5d9ce3f80d84b127232f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 165, + "startColumn": 16, + "charOffset": 4346, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 163, + "startColumn": 16, + "charOffset": 4248, + "charLength": 6, + "snippet": { + "text": "\t\tfor (uint_fast8_t i = start; i < end; ++i) {\n\t\t\tif (!thread->tasks[i].empty()) {\n\t\t\t\tm_tasks[i].insert(m_tasks[i].end(), make_move_iterator(thread->tasks[i].begin()), make_move_iterator(thread->tasks[i].end()));\n\t\t\t\tthread->tasks[i].clear();\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a3edb07292156cfe30469874c541323d7a29887b85337eaf58b767f2cbf9b5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 165, + "startColumn": 23, + "charOffset": 4353, + "charLength": 7, + "snippet": { + "text": "m_tasks" + } + }, + "contextRegion": { + "startLine": 163, + "startColumn": 23, + "charOffset": 4248, + "charLength": 7, + "snippet": { + "text": "\t\tfor (uint_fast8_t i = start; i < end; ++i) {\n\t\t\tif (!thread->tasks[i].empty()) {\n\t\t\t\tm_tasks[i].insert(m_tasks[i].end(), make_move_iterator(thread->tasks[i].begin()), make_move_iterator(thread->tasks[i].end()));\n\t\t\t\tthread->tasks[i].clear();\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58f6dc6b95e330d8d0c5f1f0dd3ef9edbc5cc5542e9de66279b6c01d9f2b901d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 165, + "startColumn": 60, + "charOffset": 4390, + "charLength": 6, + "snippet": { + "text": "thread" + } + }, + "contextRegion": { + "startLine": 163, + "startColumn": 60, + "charOffset": 4248, + "charLength": 6, + "snippet": { + "text": "\t\tfor (uint_fast8_t i = start; i < end; ++i) {\n\t\t\tif (!thread->tasks[i].empty()) {\n\t\t\t\tm_tasks[i].insert(m_tasks[i].end(), make_move_iterator(thread->tasks[i].begin()), make_move_iterator(thread->tasks[i].end()));\n\t\t\t\tthread->tasks[i].clear();\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75ec149c40551095b68e7585ca133f73b0d50df9d07c84d6e5c896de4ffa5677" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 165, + "startColumn": 106, + "charOffset": 4436, + "charLength": 6, + "snippet": { + "text": "thread" + } + }, + "contextRegion": { + "startLine": 163, + "startColumn": 106, + "charOffset": 4248, + "charLength": 6, + "snippet": { + "text": "\t\tfor (uint_fast8_t i = start; i < end; ++i) {\n\t\t\tif (!thread->tasks[i].empty()) {\n\t\t\t\tm_tasks[i].insert(m_tasks[i].end(), make_move_iterator(thread->tasks[i].begin()), make_move_iterator(thread->tasks[i].end()));\n\t\t\t\tthread->tasks[i].clear();\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03ae326062c99fb827ad33240122de1ba2fd0ad1ed8fc6f598d1f70371bc10aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 166, + "startColumn": 5, + "charOffset": 4466, + "charLength": 6, + "snippet": { + "text": "thread" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 5, + "charOffset": 4295, + "charLength": 6, + "snippet": { + "text": "\t\t\tif (!thread->tasks[i].empty()) {\n\t\t\t\tm_tasks[i].insert(m_tasks[i].end(), make_move_iterator(thread->tasks[i].begin()), make_move_iterator(thread->tasks[i].end()));\n\t\t\t\tthread->tasks[i].clear();\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61e96266ab20f01a83b60b40ca1e362831f7c6bd07455bc4ab18ea9b2d47d3a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 174, + "startColumn": 12, + "charOffset": 4600, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 12, + "charOffset": 4507, + "charLength": 7, + "snippet": { + "text": "// Merge thread events with main dispatch events\nvoid Dispatcher::mergeEvents() {\n\tconstexpr uint8_t serial = static_cast(TaskGroup::Serial);\n\n\tfor (const auto &thread : threads) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e9ee9025d2deb29e1cbe188fad6c20f6183d9424636fb5a04d3cd27edd81663" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 176, + "startColumn": 2, + "charOffset": 4660, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 174, + "startColumn": 2, + "charOffset": 4589, + "charLength": 3, + "snippet": { + "text": "\tconstexpr uint8_t serial = static_cast(TaskGroup::Serial);\n\n\tfor (const auto &thread : threads) {\n\t\tstd::scoped_lock lock(thread->mutex);\n\t\tif (!thread->tasks[serial].empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65aa93bf0f52cb35989fd977c3a33df66320dee2b4279da622820603a9d34486" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 179, + "startColumn": 20, + "charOffset": 4796, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 177, + "startColumn": 20, + "charOffset": 4697, + "charLength": 6, + "snippet": { + "text": "\t\tstd::scoped_lock lock(thread->mutex);\n\t\tif (!thread->tasks[serial].empty()) {\n\t\t\tm_tasks[serial].insert(m_tasks[serial].end(), make_move_iterator(thread->tasks[serial].begin()), make_move_iterator(thread->tasks[serial].end()));\n\t\t\tthread->tasks[serial].clear();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0faf0cf59e70e402a795c83a1d272135c32beda3ce2bc9d8a5049b0c2aca706" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 208, + "startColumn": 57, + "charOffset": 5914, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 206, + "startColumn": 57, + "charOffset": 5780, + "charLength": 12, + "snippet": { + "text": "\tconst auto &thread = getThreadTask();\n\tstd::scoped_lock lock(thread->mutex);\n\tthread->tasks[static_cast(TaskGroup::Serial)].emplace_back(expiresAfterMs, std::move(f), context);\n\tnotify();\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1d127a7dec90e1e3bd4e5c4042eb1655dcfb1d6ef99b261d2536159a3736c59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 227, + "startColumn": 2, + "charOffset": 6453, + "charLength": 6, + "snippet": { + "text": "thread" + } + }, + "contextRegion": { + "startLine": 225, + "startColumn": 2, + "charOffset": 6374, + "charLength": 6, + "snippet": { + "text": "\tconst auto &thread = getThreadTask();\n\tstd::scoped_lock lock(thread->mutex);\n\tthread->tasks[static_cast(group)].emplace_back(0, std::move(f), dispacherContext.taskName);\n\tnotify();\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a8796534ecd49f62e6b909883f74290882bbbed655c7d7b3910ad5d6e62f80cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 227, + "startColumn": 45, + "charOffset": 6496, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 225, + "startColumn": 45, + "charOffset": 6374, + "charLength": 12, + "snippet": { + "text": "\tconst auto &thread = getThreadTask();\n\tstd::scoped_lock lock(thread->mutex);\n\tthread->tasks[static_cast(group)].emplace_back(0, std::move(f), dispacherContext.taskName);\n\tnotify();\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a91bdee1cbe01fc8ab22ef4885e1b6340221b7478d4ed64524152540a5a4e45c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 235, + "startColumn": 21, + "charOffset": 6748, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 233, + "startColumn": 21, + "charOffset": 6666, + "charLength": 5, + "snippet": { + "text": "\tif (it != scheduledTasksRef.end()) {\n\t\tit->second->cancel();\n\t\tscheduledTasksRef.erase(it);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9e65b22cf8e69decb6541bef9e3783fbfb942ac6827709f330456ab97372aa1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/dispatcher.cpp" + }, + "region": { + "startLine": 244, + "startColumn": 6, + "charOffset": 6970, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 6, + "charOffset": 6889, + "charLength": 1, + "snippet": { + "text": "\nvoid DispatcherContext::tryAddEvent(std::function &&f) const {\n\tif (!f) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53d2f2875e5072a2cc91ab1a575844072bc0a5facd9d6fe766d38f8543923811" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/task.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 2, + "charOffset": 886, + "charLength": 6, + "snippet": { + "text": "assert" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 2, + "charOffset": 881, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tassert(!this->context.empty() && \"Context cannot be empty!\");\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f0f7c063ae00e59dc07c69017cdd781c5476075fe6adae16f0f2058734d4115" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/task.cpp" + }, + "region": { + "startLine": 36, + "startColumn": 2, + "charOffset": 1308, + "charLength": 6, + "snippet": { + "text": "assert" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 2, + "charOffset": 1303, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tassert(!this->context.empty() && \"Context cannot be empty!\");\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c37e820ae69c4f33aacc187d9fec76632476cceeb4622319e0cc4c2681543512" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/save_manager.cpp" + }, + "region": { + "startLine": 19, + "startColumn": 2, + "charOffset": 493, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 17, + "startColumn": 2, + "charOffset": 450, + "charLength": 3, + "snippet": { + "text": "\tconst auto players = game.getPlayers();\n\n\tfor (const auto &[_, player] : players) {\n\t\tplayer->loginPosition = player->getPosition();\n\t\tdoSavePlayer(player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4dd9ede3df025c0c5356101583c9dbf78b9aad552d9e86cb07d5554f5c0f9cdc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/save_manager.cpp" + }, + "region": { + "startLine": 21, + "startColumn": 3, + "charOffset": 586, + "charLength": 12, + "snippet": { + "text": "doSavePlayer" + } + }, + "contextRegion": { + "startLine": 19, + "startColumn": 3, + "charOffset": 492, + "charLength": 12, + "snippet": { + "text": "\tfor (const auto &[_, player] : players) {\n\t\tplayer->loginPosition = player->getPosition();\n\t\tdoSavePlayer(player);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2a95eb970b160e80c353f05ee1f08aed29b9eff00673ba74ca83b8b17e6ef9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/save_manager.cpp" + }, + "region": { + "startLine": 25, + "startColumn": 2, + "charOffset": 646, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 2, + "charOffset": 611, + "charLength": 3, + "snippet": { + "text": "\n\tauto guilds = game.getGuilds();\n\tfor (const auto &[_, guild] : guilds) {\n\t\tsaveGuild(guild);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "917fa8ef042564f9b9067b3d47dea9f08d137a9db38eb2ad37628585a557e571" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'playerPtr' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/save_manager.cpp" + }, + "region": { + "startLine": 53, + "startColumn": 56, + "charOffset": 1348, + "charLength": 9, + "snippet": { + "text": "playerPtr" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 56, + "charOffset": 1290, + "charLength": 9, + "snippet": { + "text": "}\n\nvoid SaveManager::schedulePlayer(std::weak_ptr playerPtr) {\n\tauto playerToSave = playerPtr.lock();\n\tif (!playerToSave) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "342b8812b74f93fb659f8168a4f21b479a5563b914e26cfc4a9ccce52382d15b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/save_manager.cpp" + }, + "region": { + "startLine": 55, + "startColumn": 6, + "charOffset": 1405, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 6, + "charOffset": 1293, + "charLength": 1, + "snippet": { + "text": "void SaveManager::schedulePlayer(std::weak_ptr playerPtr) {\n\tauto playerToSave = playerPtr.lock();\n\tif (!playerToSave) {\n\t\tlogger.debug(\"Skipping save for player because player is no longer online.\");\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43a88efa764a5b34f1d1717b91101fe6ecbf1fa990d8ee03d9972cd2b8ebb909" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/save_manager.cpp" + }, + "region": { + "startLine": 65, + "startColumn": 3, + "charOffset": 1763, + "charLength": 12, + "snippet": { + "text": "doSavePlayer" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 3, + "charOffset": 1694, + "charLength": 12, + "snippet": { + "text": "\t\t\tlogger.debug(\"Saving player {}.\", playerToSave->getName());\n\t\t}\n\t\tdoSavePlayer(playerToSave);\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3407d554833650365ec6229e1421654478766e739360c75c1c083f32535ea650" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/save_manager.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 7, + "charOffset": 2087, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 7, + "charOffset": 1988, + "charLength": 1, + "snippet": { + "text": "\tthreadPool.detach_task([this, playerPtr, scheduledAt]() {\n\t\tauto player = playerPtr.lock();\n\t\tif (!player) {\n\t\t\tlogger.debug(\"Skipping save for player because player is no longer online.\");\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6a109815e225f50ee66fd1d9e01c1b7114c3d19b9864dac091761ff472c21ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/save_manager.cpp" + }, + "region": { + "startLine": 82, + "startColumn": 3, + "charOffset": 2351, + "charLength": 12, + "snippet": { + "text": "doSavePlayer" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 3, + "charOffset": 2334, + "charLength": 12, + "snippet": { + "text": "\t\t\treturn;\n\t\t}\n\t\tdoSavePlayer(player);\n\t});\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4be7b2118d4e7639e3da08e48fc8a739367275e8896ef312d31849c47c05c2aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/save_manager.cpp" + }, + "region": { + "startLine": 86, + "startColumn": 56, + "charOffset": 2436, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 56, + "charOffset": 2378, + "charLength": 6, + "snippet": { + "text": "}\n\nbool SaveManager::doSavePlayer(std::shared_ptr player) {\n\tif (!player) {\n\t\tlogger.debug(\"Failed to save player because player is null.\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d47c39ad1f8406add847910292bd51668c210e3f1d57a3a0aedebd89237390e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/save_manager.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 6, + "charOffset": 2451, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 6, + "charOffset": 2380, + "charLength": 1, + "snippet": { + "text": "\nbool SaveManager::doSavePlayer(std::shared_ptr player) {\n\tif (!player) {\n\t\tlogger.debug(\"Failed to save player because player is null.\");\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "edf173c4afe5e2691d48391c2f9920327ccd7d68d00ab56852f07df12f92d4e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/save_manager.cpp" + }, + "region": { + "startLine": 94, + "startColumn": 14, + "charOffset": 2620, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 92, + "startColumn": 14, + "charOffset": 2547, + "charLength": 5, + "snippet": { + "text": "\tBenchmark bm_savePlayer;\n\tPlayer::PlayerLock lock(player);\n\tm_playerMap.erase(player->getGUID());\n\tif (g_game().getGameState() == GAME_STATE_NORMAL) {\n\t\tlogger.debug(\"Saving player {}.\", player->getName());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07935f17ca5ab33e958e4bacc77182676f02555f4bf972e1f36339de93447e0a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/save_manager.cpp" + }, + "region": { + "startLine": 109, + "startColumn": 54, + "charOffset": 3107, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 107, + "startColumn": 54, + "charOffset": 3051, + "charLength": 6, + "snippet": { + "text": "}\n\nbool SaveManager::savePlayer(std::shared_ptr player) {\n\tif (player->isOnline()) {\n\t\tschedulePlayer(player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da8eeaa444b07ced6a15add26fd231c049de882135ffbbf42d69ee480a78d106" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'guild' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/save_manager.cpp" + }, + "region": { + "startLine": 117, + "startColumn": 52, + "charOffset": 3272, + "charLength": 5, + "snippet": { + "text": "guild" + } + }, + "contextRegion": { + "startLine": 115, + "startColumn": 52, + "charOffset": 3218, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid SaveManager::saveGuild(std::shared_ptr guild) {\n\tif (!guild) {\n\t\tlogger.debug(\"Failed to save guild because guild is null.\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec842fe7140c7357763256d06cb9aa5c91a1647d96d800c1c25284b2abe50e30" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/scheduling/save_manager.cpp" + }, + "region": { + "startLine": 118, + "startColumn": 6, + "charOffset": 3286, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 116, + "startColumn": 6, + "charOffset": 3220, + "charLength": 1, + "snippet": { + "text": "\nvoid SaveManager::saveGuild(std::shared_ptr guild) {\n\tif (!guild) {\n\t\tlogger.debug(\"Failed to save guild because guild is null.\");\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7084817746d4d75420e57eb834f41fa1b36eafa93b9c4f497f91eb44eaa695ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 19, + "startColumn": 1, + "charOffset": 583, + "charLength": 5, + "snippet": { + "text": "phmap" + } + }, + "contextRegion": { + "startLine": 17, + "startColumn": 1, + "charOffset": 552, + "charLength": 5, + "snippet": { + "text": "#include \"utils/pugicast.hpp\"\n\nphmap::parallel_flat_hash_map> Zone::zones = {};\nphmap::parallel_flat_hash_map> Zone::zonesByID = {};\nconst static std::shared_ptr nullZone = nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ca2475d363133f2f1483d73cc773322f9ebb90aec276c24646b0efff2b6bf41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'zones' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 19, + "startColumn": 73, + "charOffset": 655, + "charLength": 5, + "snippet": { + "text": "zones" + } + }, + "contextRegion": { + "startLine": 17, + "startColumn": 73, + "charOffset": 552, + "charLength": 5, + "snippet": { + "text": "#include \"utils/pugicast.hpp\"\n\nphmap::parallel_flat_hash_map> Zone::zones = {};\nphmap::parallel_flat_hash_map> Zone::zonesByID = {};\nconst static std::shared_ptr nullZone = nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95a6948aca4d7edb5d749c5205462abe487af19e5b16413609de4974ae1868cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 20, + "startColumn": 1, + "charOffset": 667, + "charLength": 5, + "snippet": { + "text": "phmap" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 1, + "charOffset": 582, + "charLength": 5, + "snippet": { + "text": "\nphmap::parallel_flat_hash_map> Zone::zones = {};\nphmap::parallel_flat_hash_map> Zone::zonesByID = {};\nconst static std::shared_ptr nullZone = nullptr;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2fdbd1109b945eb7e2ae312846f4f13d15188b8f6016a27e5c3a372fae7bede" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'zonesByID' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 20, + "startColumn": 70, + "charOffset": 736, + "charLength": 9, + "snippet": { + "text": "zonesByID" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 70, + "charOffset": 582, + "charLength": 9, + "snippet": { + "text": "\nphmap::parallel_flat_hash_map> Zone::zones = {};\nphmap::parallel_flat_hash_map> Zone::zonesByID = {};\nconst static std::shared_ptr nullZone = nullptr;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6122fcb95b9a393d31df043e98a38c6c79a2092df301b4a3e8e02024070541df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 21, + "startColumn": 1, + "charOffset": 752, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 19, + "startColumn": 1, + "charOffset": 583, + "charLength": 5, + "snippet": { + "text": "phmap::parallel_flat_hash_map> Zone::zones = {};\nphmap::parallel_flat_hash_map> Zone::zonesByID = {};\nconst static std::shared_ptr nullZone = nullptr;\n\nstd::shared_ptr Zone::addZone(const std::string &name, uint32_t zoneID /* = 0 */) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "18c7195256ae3cc49debaf3026e90bdc7aaecb6d0612769120e82c09d333f3bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 48, + "startColumn": 2, + "charOffset": 1519, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 2, + "charOffset": 1485, + "charLength": 3, + "snippet": { + "text": "\nvoid Zone::addArea(Area area) {\n\tfor (const auto &pos : area) {\n\t\taddPosition(pos);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b953b605d2d0fc5bf804024a290baf7fb02b16245d609861b9804aa2989428cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 55, + "startColumn": 2, + "charOffset": 1626, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 2, + "charOffset": 1587, + "charLength": 3, + "snippet": { + "text": "\nvoid Zone::subtractArea(Area area) {\n\tfor (const auto &pos : area) {\n\t\tremovePosition(pos);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "575eaa428b31980f6512395c5abfa2cf00d1f560d6ead7283544c402808bb869" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 6, + "charOffset": 1891, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 6, + "charOffset": 1782, + "charLength": 1, + "snippet": { + "text": "\nPosition Zone::getRemoveDestination(const std::shared_ptr &creature /* = nullptr */) const {\n\tif (!creature || !creature->getPlayer()) {\n\t\treturn Position();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50a63b4a7976a8a5f09d1d53aa1ca69f19352d07c17ce970f675f88fd62abfaf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 19, + "charOffset": 1904, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 19, + "charOffset": 1782, + "charLength": 1, + "snippet": { + "text": "\nPosition Zone::getRemoveDestination(const std::shared_ptr &creature /* = nullptr */) const {\n\tif (!creature || !creature->getPlayer()) {\n\t\treturn Position();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbbf487f184ecd7109ce13a525185dedb0591855ab6de01f64606d30a509ac43" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-return-braced-init-list", + "ruleIndex": 630, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 67, + "startColumn": 10, + "charOffset": 1939, + "charLength": 8, + "snippet": { + "text": "Position" + } + }, + "contextRegion": { + "startLine": 65, + "startColumn": 10, + "charOffset": 1783, + "charLength": 8, + "snippet": { + "text": "Position Zone::getRemoveDestination(const std::shared_ptr &creature /* = nullptr */) const {\n\tif (!creature || !creature->getPlayer()) {\n\t\treturn Position();\n\t}\n\tif (removeDestination != Position()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cacb6856999c047da35b373180db7dd59ea4b6b3c0552cc32191f573c963d401" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-return-braced-init-list", + "ruleIndex": 630, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 75, + "startColumn": 9, + "charOffset": 2130, + "charLength": 8, + "snippet": { + "text": "Position" + } + }, + "contextRegion": { + "startLine": 73, + "startColumn": 9, + "charOffset": 2055, + "charLength": 8, + "snippet": { + "text": "\t\treturn creature->getPlayer()->getTown()->getTemplePosition();\n\t}\n\treturn Position();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be57e8638423bda77b7831bdfb72764b53ce0a2ed943fa5d84a0b786f1f1feb8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 96, + "startColumn": 2, + "charOffset": 2567, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 2, + "charOffset": 2484, + "charLength": 3, + "snippet": { + "text": "std::vector Zone::getPositions() const {\n\tstd::vector result;\n\tfor (const auto &pos : positions) {\n\t\tresult.push_back(pos);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "451a9816fe9a6d73e3d2853dacc2e03dc950e34a82f941076bfe276f773cf9ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 123, + "startColumn": 2, + "charOffset": 3149, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 121, + "startColumn": 2, + "charOffset": 3118, + "charLength": 3, + "snippet": { + "text": "\nvoid Zone::removePlayers() {\n\tfor (const auto &player : getPlayers()) {\n\t\tg_game().internalTeleport(player, getRemoveDestination(player));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8cb0b9488d143962b532f6782492e44136055a2432e532cfa6175c30c3bd224f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 124, + "startColumn": 12, + "charOffset": 3202, + "charLength": 16, + "snippet": { + "text": "internalTeleport" + } + }, + "contextRegion": { + "startLine": 122, + "startColumn": 12, + "charOffset": 3119, + "charLength": 16, + "snippet": { + "text": "void Zone::removePlayers() {\n\tfor (const auto &player : getPlayers()) {\n\t\tg_game().internalTeleport(player, getRemoveDestination(player));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "615570dff80cdb3a11b5245900f0052c2cd9181a6f7cc1c6bc65544fce1354de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 129, + "startColumn": 2, + "charOffset": 3295, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 127, + "startColumn": 2, + "charOffset": 3263, + "charLength": 3, + "snippet": { + "text": "\nvoid Zone::removeMonsters() {\n\tfor (const auto &monster : getMonsters()) {\n\t\tg_game().removeCreature(monster->getCreature());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3048c73dd910246f6ef04140dc2f423671354119ed94092c5819f179aa683506" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 130, + "startColumn": 12, + "charOffset": 3350, + "charLength": 14, + "snippet": { + "text": "removeCreature" + } + }, + "contextRegion": { + "startLine": 128, + "startColumn": 12, + "charOffset": 3264, + "charLength": 14, + "snippet": { + "text": "void Zone::removeMonsters() {\n\tfor (const auto &monster : getMonsters()) {\n\t\tg_game().removeCreature(monster->getCreature());\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d635efcbd36c71ccd9b76cf2b4288e2b39c7881b0ede9d60b25e86e00647d26" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 135, + "startColumn": 2, + "charOffset": 3423, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 133, + "startColumn": 2, + "charOffset": 3395, + "charLength": 3, + "snippet": { + "text": "\nvoid Zone::removeNpcs() {\n\tfor (const auto &npc : getNpcs()) {\n\t\tg_game().removeCreature(npc->getCreature());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb4026eb809ca4a34201db32da4317cbed14a55304f01ad96df81220ebb99647" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 136, + "startColumn": 12, + "charOffset": 3470, + "charLength": 14, + "snippet": { + "text": "removeCreature" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 12, + "charOffset": 3396, + "charLength": 14, + "snippet": { + "text": "void Zone::removeNpcs() {\n\tfor (const auto &npc : getNpcs()) {\n\t\tg_game().removeCreature(npc->getCreature());\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04375ec5d4982af02cde9b86f79663c020298e07f53b3040373c591a5dcae018" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 141, + "startColumn": 2, + "charOffset": 3539, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 139, + "startColumn": 2, + "charOffset": 3511, + "charLength": 3, + "snippet": { + "text": "\nvoid Zone::clearZones() {\n\tfor (const auto &[_, zone] : zones) {\n\t\t// do not clear zones loaded from the map (id > 0)\n\t\tif (!zone || zone->isStatic()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7e593c33b8e2964c37ac9284cb4cca1ac4b1f09fe0a48fe6ccd1af8ba9f8745" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 143, + "startColumn": 7, + "charOffset": 3636, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 141, + "startColumn": 7, + "charOffset": 3538, + "charLength": 1, + "snippet": { + "text": "\tfor (const auto &[_, zone] : zones) {\n\t\t// do not clear zones loaded from the map (id > 0)\n\t\tif (!zone || zone->isStatic()) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "886020e17245c2fc542db4e7b8966283be11188fb82646434ae162e4a8a4b372" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 149, + "startColumn": 2, + "charOffset": 3721, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 147, + "startColumn": 2, + "charOffset": 3701, + "charLength": 3, + "snippet": { + "text": "\t}\n\tzones.clear();\n\tfor (const auto &[_, zone] : zonesByID) {\n\t\tzones[zone->name] = zone;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea889d95ccaf02e89233f5925ba4a996bd0085771d10ca445bbb5c62e71bacbf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 2, + "charOffset": 3943, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 2, + "charOffset": 3874, + "charLength": 3, + "snippet": { + "text": "\tBenchmark bm_getZones;\n\tstd::vector> result;\n\tfor (const auto &[_, zone] : zones) {\n\t\tif (zone && zone->contains(position)) {\n\t\t\tresult.push_back(zone);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8dea513e928fc91961820a5031c87e27d9c99b2eac84bec7811af71ae6d58bf8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 163, + "startColumn": 17, + "charOffset": 4114, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 161, + "startColumn": 17, + "charOffset": 4054, + "charLength": 3, + "snippet": { + "text": "\t}\n\tauto duration = bm_getZones.duration();\n\tif (duration > 100) {\n\t\tg_logger().warn(\"Listed {} zones for position {} in {} milliseconds\", result.size(), position.toString(), duration);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00f4cc902d8d2b69730f5a99a9b81a5eb802a1b9ccb97926039572aadba4eadc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 163, + "startColumn": 17, + "charOffset": 4114, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 161, + "startColumn": 17, + "charOffset": 4054, + "charLength": 3, + "snippet": { + "text": "\t}\n\tauto duration = bm_getZones.duration();\n\tif (duration > 100) {\n\t\tg_logger().warn(\"Listed {} zones for position {} in {} milliseconds\", result.size(), position.toString(), duration);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67bff2a2c425b3a825f509f26fe438fb547ed37f2a39acb461fb7b987389308f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 2, + "charOffset": 4385, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 2, + "charOffset": 4316, + "charLength": 3, + "snippet": { + "text": "\tBenchmark bm_getZones;\n\tstd::vector> result;\n\tfor (const auto &[_, zone] : zones) {\n\t\tif (zone) {\n\t\t\tresult.push_back(zone);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ed06e9f94c2b9e8a7bb9422c87f25e72e974b17dae7967d1f6ce4c75949590e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 178, + "startColumn": 17, + "charOffset": 4528, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 176, + "startColumn": 17, + "charOffset": 4468, + "charLength": 3, + "snippet": { + "text": "\t}\n\tauto duration = bm_getZones.duration();\n\tif (duration > 100) {\n\t\tg_logger().warn(\"Listed {} zones in {} milliseconds\", result.size(), duration);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "499639350e4eb2a882eb68356faa41fface85847a6c3ddf4878cb87c7694f31c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 178, + "startColumn": 17, + "charOffset": 4528, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 176, + "startColumn": 17, + "charOffset": 4468, + "charLength": 3, + "snippet": { + "text": "\t}\n\tauto duration = bm_getZones.duration();\n\tif (duration > 100) {\n\t\tg_logger().warn(\"Listed {} zones in {} milliseconds\", result.size(), duration);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "abf4c8a41d84d961d0ac1b3ea87da666b527235647ba1d7b64f4364927a44f1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 185, + "startColumn": 6, + "charOffset": 4714, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 183, + "startColumn": 6, + "charOffset": 4638, + "charLength": 1, + "snippet": { + "text": "\nvoid Zone::creatureAdded(const std::shared_ptr &creature) {\n\tif (!creature) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03021c110cae850946743954d805c9ebaff3c77148cd29c786a0b0ef636685c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 189, + "startColumn": 2, + "charOffset": 4742, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 187, + "startColumn": 2, + "charOffset": 4737, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (const auto &player = creature->getPlayer()) {\n\t\tplayersCache.insert(player);\n\t} else if (const auto &monster = creature->getMonster()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d4fa5cfb006faafc8e2a08ad828bbd110717deef752dee499d797afb45e612f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 190, + "startColumn": 16, + "charOffset": 4807, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 188, + "startColumn": 16, + "charOffset": 4740, + "charLength": 6, + "snippet": { + "text": "\n\tif (const auto &player = creature->getPlayer()) {\n\t\tplayersCache.insert(player);\n\t} else if (const auto &monster = creature->getMonster()) {\n\t\tmonstersCache.insert(monster);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd1de218d68c6867819d773b62a31e05d24763784f1c338706bd6fb2fad19024" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 192, + "startColumn": 17, + "charOffset": 4899, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 190, + "startColumn": 17, + "charOffset": 4792, + "charLength": 6, + "snippet": { + "text": "\t\tplayersCache.insert(player);\n\t} else if (const auto &monster = creature->getMonster()) {\n\t\tmonstersCache.insert(monster);\n\t} else if (const auto &npc = creature->getNpc()) {\n\t\tnpcsCache.insert(npc);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a0bb870bcbfaa6b195c8ec5c34c4f49e0ef17ca8342aa6193d2c6656880aab5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 194, + "startColumn": 13, + "charOffset": 4980, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 192, + "startColumn": 13, + "charOffset": 4883, + "charLength": 6, + "snippet": { + "text": "\t\tmonstersCache.insert(monster);\n\t} else if (const auto &npc = creature->getNpc()) {\n\t\tnpcsCache.insert(npc);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35bb6a2708f0c547aba3af1355162539c0bc01c8dd1e83e463bff13c7d5b2a0e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 197, + "startColumn": 17, + "charOffset": 5013, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 195, + "startColumn": 17, + "charOffset": 4993, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tcreaturesCache.insert(creature);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81fd48bb59c477fc5f9bccd141fcf68620dfaf306e58b6006b15a33d200ca851" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 201, + "startColumn": 6, + "charOffset": 5111, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 6, + "charOffset": 5033, + "charLength": 1, + "snippet": { + "text": "\nvoid Zone::creatureRemoved(const std::shared_ptr &creature) {\n\tif (!creature) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "567cebb836e93016b95b1736ea51d14803e1bff5edc4c01a77bc81d5dd31d69a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 204, + "startColumn": 17, + "charOffset": 5153, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 202, + "startColumn": 17, + "charOffset": 5124, + "charLength": 5, + "snippet": { + "text": "\t\treturn;\n\t}\n\tcreaturesCache.erase(creature);\n\tplayersCache.erase(creature->getPlayer());\n\tmonstersCache.erase(creature->getMonster());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a79147fe991e14fb2e35340c9219a720f5e500089c5e34416f545b81766076a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 205, + "startColumn": 15, + "charOffset": 5184, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 203, + "startColumn": 15, + "charOffset": 5134, + "charLength": 5, + "snippet": { + "text": "\t}\n\tcreaturesCache.erase(creature);\n\tplayersCache.erase(creature->getPlayer());\n\tmonstersCache.erase(creature->getMonster());\n\tnpcsCache.erase(creature->getNpc());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16045acb224090c994408f5cd343d60845d5ce0297fdca9cd1cf26613aee1f3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 206, + "startColumn": 16, + "charOffset": 5229, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 204, + "startColumn": 16, + "charOffset": 5137, + "charLength": 5, + "snippet": { + "text": "\tcreaturesCache.erase(creature);\n\tplayersCache.erase(creature->getPlayer());\n\tmonstersCache.erase(creature->getMonster());\n\tnpcsCache.erase(creature->getNpc());\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "700437f6e79dbdf5aa5853af9407bb717cd1dda8b191cc4d25b3a8f5a0c3c441" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 207, + "startColumn": 12, + "charOffset": 5271, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 205, + "startColumn": 12, + "charOffset": 5170, + "charLength": 5, + "snippet": { + "text": "\tplayersCache.erase(creature->getPlayer());\n\tmonstersCache.erase(creature->getMonster());\n\tnpcsCache.erase(creature->getNpc());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eeaa9dfd4f4ce6a86b5877ec90e59c8bd683a30fe951c7bca6bbaedfeffdc1e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 211, + "startColumn": 6, + "charOffset": 5367, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 209, + "startColumn": 6, + "charOffset": 5300, + "charLength": 1, + "snippet": { + "text": "\nvoid Zone::thingAdded(const std::shared_ptr &thing) {\n\tif (!thing) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "567cebb836e93016b95b1736ea51d14803e1bff5edc4c01a77bc81d5dd31d69a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 215, + "startColumn": 2, + "charOffset": 5392, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 213, + "startColumn": 2, + "charOffset": 5387, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (const auto &item = thing->getItem()) {\n\t\titemAdded(item);\n\t} else if (const auto &creature = thing->getCreature()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d7ea982867b814628c10c7bafe0762c29dbbea53aef50aff4b34a93b4cbb207" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 223, + "startColumn": 6, + "charOffset": 5609, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 221, + "startColumn": 6, + "charOffset": 5545, + "charLength": 1, + "snippet": { + "text": "\nvoid Zone::itemAdded(const std::shared_ptr &item) {\n\tif (!item) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "636f7ac5c7daa51206cdbb97e6e1c1547cee17ad295b2a1885f3fe2e691d46aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 13, + "charOffset": 5643, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 13, + "charOffset": 5618, + "charLength": 6, + "snippet": { + "text": "\t\treturn;\n\t}\n\titemsCache.insert(item);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0c11d585c364c600016d887123ced57b4634d732be4a761f888c83bdb97d354" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 230, + "startColumn": 6, + "charOffset": 5725, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 228, + "startColumn": 6, + "charOffset": 5659, + "charLength": 1, + "snippet": { + "text": "\nvoid Zone::itemRemoved(const std::shared_ptr &item) {\n\tif (!item) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49b0f2e630ecac86278fde481d90e9de58ac874e04fb99470fee59244f66219d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 233, + "startColumn": 13, + "charOffset": 5759, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 231, + "startColumn": 13, + "charOffset": 5734, + "charLength": 5, + "snippet": { + "text": "\t\treturn;\n\t}\n\titemsCache.erase(item);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53fbf8c476d8c98fa2e7bca78e7a059a94f28948aa953752afe76a431434a21f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 244, + "startColumn": 2, + "charOffset": 5936, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 2, + "charOffset": 5913, + "charLength": 3, + "snippet": { + "text": "\titemsCache.clear();\n\n\tfor (const auto &position : getPositions()) {\n\t\tg_game().map.refreshZones(position);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7deba847b4534f4e59392e563c4b92f9ddfa9921ff93ba7246fb530394cd14c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 253, + "startColumn": 2, + "charOffset": 6275, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 251, + "startColumn": 2, + "charOffset": 6176, + "charLength": 3, + "snippet": { + "text": "\tmonsterVariant = variant;\n\tg_logger().debug(\"Zone {} monster variant set to {}\", name, variant);\n\tfor (auto &spawnMonster : g_game().map.spawnsMonster.getspawnMonsterList()) {\n\t\tif (!contains(spawnMonster.getCenterPos())) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "869f515eb273d3c9bb5969db2d06e5a8d6d427f548a9da66854dfd79b2d6eafa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 267, + "startColumn": 6, + "charOffset": 6719, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 265, + "startColumn": 6, + "charOffset": 6594, + "charLength": 1, + "snippet": { + "text": "\tg_logger().debug(\"Loading zones from {}\", fileName);\n\tpugi::xml_parse_result result = doc.load_file(fileName.c_str());\n\tif (!result) {\n\t\tprintXMLError(__FUNCTION__, fileName, result);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69547041420952e9f6457e296f793fb1d7b07f9b0eaaea22f5b61c77b4b3f8cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 272, + "startColumn": 2, + "charOffset": 6800, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 270, + "startColumn": 2, + "charOffset": 6795, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (auto zoneNode : doc.child(\"zones\").children()) {\n\t\tauto name = zoneNode.attribute(\"name\").value();\n\t\tauto zoneId = pugi::cast(zoneNode.attribute(\"zoneid\").value()) << shiftID;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9e77f6f6caa9699ffed8b330c4bddbe663f9f7ee4453e1e712cd7dcb6d90869" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto name' can be declared as 'const auto *name'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 273, + "startColumn": 3, + "charOffset": 6856, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 271, + "startColumn": 3, + "charOffset": 6798, + "charLength": 4, + "snippet": { + "text": "\n\tfor (auto zoneNode : doc.child(\"zones\").children()) {\n\t\tauto name = zoneNode.attribute(\"name\").value();\n\t\tauto zoneId = pugi::cast(zoneNode.attribute(\"zoneid\").value()) << shiftID;\n\t\taddZone(name, zoneId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b78df87a344b92074b464602fca1bf73c1e1062788892881bd1f559917a91e5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/game/zones/zone.cpp" + }, + "region": { + "startLine": 275, + "startColumn": 3, + "charOffset": 6993, + "charLength": 7, + "snippet": { + "text": "addZone" + } + }, + "contextRegion": { + "startLine": 273, + "startColumn": 3, + "charOffset": 6854, + "charLength": 7, + "snippet": { + "text": "\t\tauto name = zoneNode.attribute(\"name\").value();\n\t\tauto zoneId = pugi::cast(zoneNode.attribute(\"zoneid\").value()) << shiftID;\n\t\taddZone(name, zoneId);\n\t}\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d3990a1581df7c5461869371af05bcd79a8bda0439e71f2df65fde9a3dfe107" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/fileloader.cpp" + }, + "region": { + "startLine": 25, + "startColumn": 3, + "charOffset": 839, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 3, + "charOffset": 807, + "charLength": 3, + "snippet": { + "text": "\n\t\tIdentifier fileIdentifier;\n\t\tstd::copy(fileContents.begin(), fileContents.begin() + fileIdentifier.size(), fileIdentifier.begin());\n\t\tif (fileIdentifier != acceptedIdentifier && fileIdentifier != wildcard) {\n\t\t\tthrow InvalidOTBFormat {};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c18088649310b2ee5c2cba887d52624a40b47dcbb9a928d54c25759aeb0316e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-use-anonymous-namespace", + "ruleIndex": 614, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'getCurrentNode' declared 'static', move to anonymous namespace instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/fileloader.cpp" + }, + "region": { + "startLine": 32, + "startColumn": 15, + "charOffset": 1128, + "charLength": 14, + "snippet": { + "text": "getCurrentNode" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 15, + "charOffset": 1055, + "charLength": 14, + "snippet": { + "text": "\n\tusing NodeStack = std::stack>;\n\tstatic Node &getCurrentNode(const NodeStack &nodeStack) {\n\t\tif (nodeStack.empty()) {\n\t\t\tthrow InvalidOTBFormat {};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78e1f71ecddff32e2c2f130e37391098d36940937594219f44f6e319ce79843f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto it' can be declared as 'const auto *it'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/fileloader.cpp" + }, + "region": { + "startLine": 40, + "startColumn": 3, + "charOffset": 1302, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 38, + "startColumn": 3, + "charOffset": 1264, + "charLength": 4, + "snippet": { + "text": "\n\tconst Node &Loader::parseTree() {\n\t\tauto it = fileContents.begin() + sizeof(Identifier);\n\t\tif (static_cast(*it) != Node::START) {\n\t\t\tthrow InvalidOTBFormat {};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74e7939b293519c887a5e784ca4f705e659518d6b13719cabba129fb2d2f5fca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/fileloader.cpp" + }, + "region": { + "startLine": 49, + "startColumn": 3, + "charOffset": 1541, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 47, + "startColumn": 3, + "charOffset": 1512, + "charLength": 3, + "snippet": { + "text": "\t\tparseStack.push(&root);\n\n\t\tfor (; it != fileContents.end(); ++it) {\n\t\t\tswitch (static_cast(*it)) {\n\t\t\t\tcase Node::START: {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7fa01489978c5c8072280af72ae2f3cfa5a283bed84a965f8bbbdf7d0470964c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-3", + "ruleIndex": 458, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-3: The loop-counter shall not be modified within condition or statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/fileloader.cpp" + }, + "region": { + "startLine": 49, + "startColumn": 3, + "charOffset": 1541, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 47, + "startColumn": 3, + "charOffset": 1512, + "charLength": 3, + "snippet": { + "text": "\t\tparseStack.push(&root);\n\n\t\tfor (; it != fileContents.end(); ++it) {\n\t\t\tswitch (static_cast(*it)) {\n\t\t\t\tcase Node::START: {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7864a636444d04c8a934d8fd7c875c8cc6c091d989581bf21654de364443d39d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/fileloader.cpp" + }, + "region": { + "startLine": 49, + "startColumn": 10, + "charOffset": 1548, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 47, + "startColumn": 10, + "charOffset": 1512, + "charLength": 2, + "snippet": { + "text": "\t\tparseStack.push(&root);\n\n\t\tfor (; it != fileContents.end(); ++it) {\n\t\t\tswitch (static_cast(*it)) {\n\t\t\t\tcase Node::START: {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bbd9ffd5d24927dc31fdf4b72b4875a97db723cb584a35bd50ea4f30f5ea7b0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/fileloader.cpp" + }, + "region": { + "startLine": 56, + "startColumn": 27, + "charOffset": 1806, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 54, + "startColumn": 27, + "charOffset": 1740, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t\t\tcurrentNode.propsEnd = it;\n\t\t\t\t\t}\n\t\t\t\t\tcurrentNode.children.emplace_back();\n\t\t\t\t\tauto &child = currentNode.children.back();\n\t\t\t\t\tif (++it == fileContents.end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9a195a35dc7a806ee7e45e76761f901852eab554cdcd72eba1c28906348ca1a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/fileloader.cpp" + }, + "region": { + "startLine": 62, + "startColumn": 28, + "charOffset": 1999, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 28, + "charOffset": 1942, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\t}\n\t\t\t\t\tchild.type = *it;\n\t\t\t\t\tchild.propsBegin = it + sizeof(Node::type);\n\t\t\t\t\tparseStack.push(&child);\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bfd310459f9b8b29c3b70dd6486971846723aa3de0a4f3bbc13a55db8472c653" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-container-data-pointer", + "ruleIndex": 694, + "kind": "fail", + "level": "warning", + "message": { + "text": "'data' should be used for accessing the data pointer instead of taking the address of the 0-th element" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/fileloader.cpp" + }, + "region": { + "startLine": 104, + "startColumn": 14, + "charOffset": 2973, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 102, + "startColumn": 14, + "charOffset": 2930, + "charLength": 1, + "snippet": { + "text": "\t\t\treturn !lastEscaped;\n\t\t});\n\t\tprops.init(&propBuffer[0], std::distance(propBuffer.begin(), escapedPropEnd));\n\t\treturn true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a82e85b395ef3e225cec6792895bcdcb0290bc1bd85ea22476a66add7da2f1d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-member-init", + "ruleIndex": 510, + "kind": "fail", + "level": "warning", + "message": { + "text": "uninitialized record type: 'array'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/filestream.cpp" + }, + "region": { + "startLine": 48, + "startColumn": 2, + "charOffset": 1119, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 2, + "charOffset": 1114, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tstd::array array;\n\tif (escape) {\n\t\tfor (int_fast8_t i = -1; ++i < size;) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "027fd3bcaa3e71cf6fa3bd93e5e1a73fb339710e2e5683057365ffbcbd50cd0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/filestream.cpp" + }, + "region": { + "startLine": 50, + "startColumn": 3, + "charOffset": 1174, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 48, + "startColumn": 3, + "charOffset": 1118, + "charLength": 3, + "snippet": { + "text": "\tstd::array array;\n\tif (escape) {\n\t\tfor (int_fast8_t i = -1; ++i < size;) {\n\t\t\tif (m_data[m_pos] == OTB::Node::ESCAPE) {\n\t\t\t\t++m_pos;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ca9b0894e300fcfa6eb1124e0bab135c80979d15b8e463a592c0d9c4deb19be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/filestream.cpp" + }, + "region": { + "startLine": 50, + "startColumn": 3, + "charOffset": 1174, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 48, + "startColumn": 3, + "charOffset": 1118, + "charLength": 3, + "snippet": { + "text": "\tstd::array array;\n\tif (escape) {\n\t\tfor (int_fast8_t i = -1; ++i < size;) {\n\t\t\tif (m_data[m_pos] == OTB::Node::ESCAPE) {\n\t\t\t\t++m_pos;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "159e212088e13ca5db1835faa1d1cd3ed51d1bcde2969abe0b98cf0d54839e21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/filestream.cpp" + }, + "region": { + "startLine": 54, + "startColumn": 4, + "charOffset": 1280, + "charLength": 5, + "snippet": { + "text": "array" + } + }, + "contextRegion": { + "startLine": 52, + "startColumn": 4, + "charOffset": 1259, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t++m_pos;\n\t\t\t}\n\t\t\tarray[i] = m_data[m_pos];\n\t\t\t++m_pos;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92023b0a4f1b976195c20a9ee9caff064c57292efb48b290c1b484630add2600" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/filestream.cpp" + }, + "region": { + "startLine": 57, + "startColumn": 3, + "charOffset": 1324, + "charLength": 6, + "snippet": { + "text": "memcpy" + } + }, + "contextRegion": { + "startLine": 55, + "startColumn": 3, + "charOffset": 1306, + "charLength": 6, + "snippet": { + "text": "\t\t\t++m_pos;\n\t\t}\n\t\tmemcpy(&ret, array.data(), size);\n\t} else {\n\t\tmemcpy(&ret, &m_data[m_pos], size);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9b78a71409b8c393660994a60a32ec8fe197d1434aca4346c864d576c5dd76b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/filestream.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 3, + "charOffset": 1370, + "charLength": 6, + "snippet": { + "text": "memcpy" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 3, + "charOffset": 1322, + "charLength": 6, + "snippet": { + "text": "\t\tmemcpy(&ret, array.data(), size);\n\t} else {\n\t\tmemcpy(&ret, &m_data[m_pos], size);\n\t\tm_pos += size;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec9a493ec45a236688ce23db4d9609edfd51f1d8943c36caf44bae349362b1ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/filestream.cpp" + }, + "region": { + "startLine": 86, + "startColumn": 2, + "charOffset": 1768, + "charLength": 4, + "snippet": { + "text": "read" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 2, + "charOffset": 1718, + "charLength": 4, + "snippet": { + "text": "uint16_t FileStream::getU16() {\n\tuint16_t v = 0;\n\tread(v, m_nodes > 0);\n\treturn v;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be6580d47037bedddf9c67cb7c813c854e2c9c37e65c9f2648e64e71fd17f7b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/filestream.cpp" + }, + "region": { + "startLine": 92, + "startColumn": 2, + "charOffset": 1854, + "charLength": 4, + "snippet": { + "text": "read" + } + }, + "contextRegion": { + "startLine": 90, + "startColumn": 2, + "charOffset": 1804, + "charLength": 4, + "snippet": { + "text": "uint32_t FileStream::getU32() {\n\tuint32_t v = 0;\n\tread(v, m_nodes > 0);\n\treturn v;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6aaf671f1d7128e98987fea0bc4bbb9123cd5d43a4a317387c89034bb554b028" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/filestream.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 2, + "charOffset": 1940, + "charLength": 4, + "snippet": { + "text": "read" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 2, + "charOffset": 1890, + "charLength": 4, + "snippet": { + "text": "uint64_t FileStream::getU64() {\n\tuint64_t v = 0;\n\tread(v, m_nodes > 0);\n\treturn v;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "303038e3e5684a4efcef2fb78b27e0560d69920940b04f661d8fd7eefea8f2dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/filestream.cpp" + }, + "region": { + "startLine": 104, + "startColumn": 2, + "charOffset": 2033, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 102, + "startColumn": 2, + "charOffset": 1976, + "charLength": 2, + "snippet": { + "text": "std::string FileStream::getString() {\n\tstd::string str;\n\tif (const uint16_t len = getU16(); len > 0 && len < 8192) {\n\t\tif (m_pos + len > m_data.size()) {\n\t\t\tthrow std::ios_base::failure(\"[FileStream::getString] - Read failed\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38843fd41b8b8ba739fc45f6aa9e0be91314fe6810c295dacb6cd5c397ec60ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8192 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/filestream.cpp" + }, + "region": { + "startLine": 104, + "startColumn": 54, + "charOffset": 2085, + "charLength": 4, + "snippet": { + "text": "8192" + } + }, + "contextRegion": { + "startLine": 102, + "startColumn": 54, + "charOffset": 1976, + "charLength": 4, + "snippet": { + "text": "std::string FileStream::getString() {\n\tstd::string str;\n\tif (const uint16_t len = getU16(); len > 0 && len < 8192) {\n\t\tif (m_pos + len > m_data.size()) {\n\t\t\tthrow std::ios_base::failure(\"[FileStream::getString] - Read failed\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db22d30e1d30a5228c8949a272ba0ef6f6dc658371c1bff81a74f370484a49eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-cstyle-cast", + "ruleIndex": 509, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use C-style cast to convert between unrelated types" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/filestream.cpp" + }, + "region": { + "startLine": 109, + "startColumn": 11, + "charOffset": 2219, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 107, + "startColumn": 11, + "charOffset": 2204, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tstr = { (char*)&m_data[m_pos], len };\n\t\tm_pos += len;\n\t} else if (len != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1fb5f1a2dd38edd75684cefd0afd4c78203b2b56150103174c7f922581634da3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use reinterpret_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/filestream.cpp" + }, + "region": { + "startLine": 109, + "startColumn": 11, + "charOffset": 2219, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 107, + "startColumn": 11, + "charOffset": 2204, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tstr = { (char*)&m_data[m_pos], len };\n\t\tm_pos += len;\n\t} else if (len != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9f0427a30b96060d3c28f080065fd6a5443372971146ccb174e877c734cc8e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/appearance/mounts/mounts.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 6, + "charOffset": 808, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 6, + "charOffset": 645, + "charLength": 1, + "snippet": { + "text": "\tauto folder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + \"/XML/mounts.xml\";\n\tpugi::xml_parse_result result = doc.load_file(folder.c_str());\n\tif (!result) {\n\t\tprintXMLError(__FUNCTION__, folder, result);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc898165dcd556b0db77e20d80119ea5bcc894634e312e846f5895b7f9780972" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/appearance/mounts/mounts.cpp" + }, + "region": { + "startLine": 31, + "startColumn": 2, + "charOffset": 887, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 29, + "startColumn": 2, + "charOffset": 882, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (auto mountNode : doc.child(\"mounts\").children()) {\n\t\tauto lookType = pugi::cast(mountNode.attribute(\"clientid\").value());\n\t\tif (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS, __FUNCTION__) && lookType != 0 && !g_game().isLookTypeRegistered(lookType)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68648de78183a351b2486859345a38e3a3e20214054cbdccc678aa6b10414b16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/appearance/mounts/mounts.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 10, + "charOffset": 1318, + "charLength": 7, + "snippet": { + "text": "emplace" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 10, + "charOffset": 1304, + "charLength": 7, + "snippet": { + "text": "\t\t}\n\n\t\tmounts.emplace(std::make_shared(\n\t\t\tstatic_cast(pugi::cast(mountNode.attribute(\"id\").value())),\n\t\t\tlookType," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "642704242311fdb1a2a0adc8759fc752e1a9925e17fff73a1d92ab2d2a887c4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto mountName' can be declared as 'const auto *mountName'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/appearance/mounts/mounts.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 2, + "charOffset": 2096, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 2, + "charOffset": 2021, + "charLength": 4, + "snippet": { + "text": "\nstd::shared_ptr Mounts::getMountByName(const std::string &name) {\n\tauto mountName = name.c_str();\n\tauto it = std::find_if(mounts.begin(), mounts.end(), [mountName](const std::shared_ptr &mount) {\n\t\treturn strcasecmp(mountName, mount->name.c_str()) == 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "caed6d7c41a9a8a10aa6915cd09cec4bb69e6f87bfea6db971b393eca1927c17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.hpp" + }, + "region": { + "startLine": 13, + "startColumn": 10, + "charOffset": 429, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 11, + "startColumn": 10, + "charOffset": 384, + "charLength": 30, + "snippet": { + "text": "\n#include \"creatures/npcs/npcs.hpp\"\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"items/tile.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f69d6cfec9be0f6769310fd1d031cff4d88ef48385f012190be0fe563d15e4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.hpp", + "index": 1 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"creatures/monsters/monsters.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e45483e1912ecf8c717a48f913562d9a9cf501f9947625dad361d43acc28406" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.hpp", + "index": 2 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a2b3a997037594f8bab93e08d9b46935593069da5e9def3fec147ea485ffc36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-macro-usage", + "ruleIndex": 493, + "kind": "fail", + "level": "warning", + "message": { + "text": "macro 'MITIGATION_INCREASE' used to declare a constant; consider using a 'constexpr' constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 20, + "startColumn": 9, + "charOffset": 587, + "charLength": 19, + "snippet": { + "text": "MITIGATION_INCREASE" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 9, + "charOffset": 551, + "charLength": 19, + "snippet": { + "text": "#include \"utils/tools.hpp\"\n\n#define MITIGATION_INCREASE 0.03\n#define MANA_LEECH_INCREASE 0.25\n#define HEALTH_LEECH_INCREASE 0.75" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59cd49c5f7e02dd9d961637a81e31b6cb57a96e07bc444866c4de77821bdb067" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-macro-usage", + "ruleIndex": 493, + "kind": "fail", + "level": "warning", + "message": { + "text": "macro 'MANA_LEECH_INCREASE' used to declare a constant; consider using a 'constexpr' constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 21, + "startColumn": 9, + "charOffset": 620, + "charLength": 19, + "snippet": { + "text": "MANA_LEECH_INCREASE" + } + }, + "contextRegion": { + "startLine": 19, + "startColumn": 9, + "charOffset": 578, + "charLength": 19, + "snippet": { + "text": "\n#define MITIGATION_INCREASE 0.03\n#define MANA_LEECH_INCREASE 0.25\n#define HEALTH_LEECH_INCREASE 0.75\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b64f2b1aff4849f9840856a118070935c8f366b861656d260853a7bc6b7d275" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-macro-usage", + "ruleIndex": 493, + "kind": "fail", + "level": "warning", + "message": { + "text": "macro 'HEALTH_LEECH_INCREASE' used to declare a constant; consider using a 'constexpr' constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 22, + "startColumn": 9, + "charOffset": 653, + "charLength": 21, + "snippet": { + "text": "HEALTH_LEECH_INCREASE" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 9, + "charOffset": 579, + "charLength": 21, + "snippet": { + "text": "#define MITIGATION_INCREASE 0.03\n#define MANA_LEECH_INCREASE 0.25\n#define HEALTH_LEECH_INCREASE 0.75\n\n/**" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c1b48db10bc2183c6178a91c0b2a646731d6d9b9b476997031b912bbb1280df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 33, + "startColumn": 2, + "charOffset": 1362, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 2, + "charOffset": 1311, + "charLength": 3, + "snippet": { + "text": "namespace InternalPlayerWheel {\n\t// Spells vector\n\tstd::vector m_focusSpells {\n\t\t\"Eternal Winter\",\n\t\t\"Hell's Core\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a03e73869507512581a84224ff77f7061e2586d3882d1727fceef394453a2a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'm_focusSpells' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 33, + "startColumn": 27, + "charOffset": 1387, + "charLength": 13, + "snippet": { + "text": "m_focusSpells" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 27, + "charOffset": 1311, + "charLength": 13, + "snippet": { + "text": "namespace InternalPlayerWheel {\n\t// Spells vector\n\tstd::vector m_focusSpells {\n\t\t\"Eternal Winter\",\n\t\t\"Hell's Core\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e93c1b858e4c9be2743ac802685e0ea1662bb2df069d5df0893474f957bc90ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-non-const-global-variables", + "ruleIndex": 486, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'm_focusSpells' is non-const and globally accessible, consider making it const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 33, + "startColumn": 27, + "charOffset": 1387, + "charLength": 13, + "snippet": { + "text": "m_focusSpells" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 27, + "charOffset": 1311, + "charLength": 13, + "snippet": { + "text": "namespace InternalPlayerWheel {\n\t// Spells vector\n\tstd::vector m_focusSpells {\n\t\t\"Eternal Winter\",\n\t\t\"Hell's Core\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6eccc1e9c1fb34570ffe43c37c6f296e4d15d89a00342aa3232606fee2a3f2b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'registerWheelSpellTable' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 53, + "startColumn": 7, + "charOffset": 2100, + "charLength": 23, + "snippet": { + "text": "registerWheelSpellTable" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 7, + "charOffset": 2066, + "charLength": 23, + "snippet": { + "text": "\t */\n\ttemplate \n\tvoid registerWheelSpellTable(const T &spellData, const std::string &name, WheelSpellGrade_t gradeType) {\n\t\tif (name == \"Any_Focus_Mage_Spell\") {\n\t\t\tfor (const std::string &focusSpellName : m_focusSpells) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "514868ca75a27e151f14df3d107f8ffab2aa2c0e63a8b3e06e5c84f3338d11d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 55, + "startColumn": 4, + "charOffset": 2243, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 4, + "charOffset": 2094, + "charLength": 3, + "snippet": { + "text": "\tvoid registerWheelSpellTable(const T &spellData, const std::string &name, WheelSpellGrade_t gradeType) {\n\t\tif (name == \"Any_Focus_Mage_Spell\") {\n\t\t\tfor (const std::string &focusSpellName : m_focusSpells) {\n\t\t\t\tg_logger().trace(\"[{}] registered any spell: {}\", __FUNCTION__, focusSpellName);\n\t\t\t\tregisterWheelSpellTable(spellData, focusSpellName, gradeType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b4dba976212c5e156a06d8b53ea4f706673d44e3ff72399eaa6b7979a107a907" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 83, + "startColumn": 99, + "charOffset": 3493, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 81, + "startColumn": 99, + "charOffset": 3310, + "charLength": 4, + "snippet": { + "text": "\t\t\tconst auto decreaseData = spellData.decrease;\n\t\t\tif (decreaseData.cooldown > 0) {\n\t\t\t\tspell->setWheelOfDestinyBoost(WheelSpellBoost_t::COOLDOWN, gradeType, decreaseData.cooldown * 1000);\n\t\t\t}\n\t\t\tif (decreaseData.manaCost > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88e8de47dccc01f467bbae70bf8d1ee68bfdbaf151dc4e07ed0cb0f2af7d3c7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 89, + "startColumn": 129, + "charOffset": 3818, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 87, + "startColumn": 129, + "charOffset": 3635, + "charLength": 4, + "snippet": { + "text": "\t\t\t}\n\t\t\tif (decreaseData.secondaryGroupCooldown > 0) {\n\t\t\t\tspell->setWheelOfDestinyBoost(WheelSpellBoost_t::SECONDARY_GROUP_COOLDOWN, gradeType, decreaseData.secondaryGroupCooldown * 1000);\n\t\t\t}\n\t\t\t// Leech data" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f19b787f1880a14983a846aae25f24282d68260d04d8d1279a6b83a066744b7b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 94, + "startColumn": 94, + "charOffset": 4012, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 92, + "startColumn": 94, + "charOffset": 3847, + "charLength": 3, + "snippet": { + "text": "\t\t\tconst auto leechData = spellData.leech;\n\t\t\tif (leechData.mana > 0) {\n\t\t\t\tspell->setWheelOfDestinyBoost(WheelSpellBoost_t::MANA_LEECH, gradeType, leechData.mana * 100);\n\t\t\t}\n\t\t\tif (leechData.life > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8329ca9291e52911dc586308d596a84f381046c49bf4ea18661ba99d4c0c487" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 97, + "startColumn": 94, + "charOffset": 4145, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 95, + "startColumn": 94, + "charOffset": 4018, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\t\t\tif (leechData.life > 0) {\n\t\t\t\tspell->setWheelOfDestinyBoost(WheelSpellBoost_t::LIFE_LEECH, gradeType, leechData.life * 100);\n\t\t\t}\n\t\t\tspell->setWheelOfDestinyUpgraded(true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d09e88fca0ff0528b8867da81e55693948839bd5494520ef6f64ae9845cdbd5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-avoid-bind", + "ruleIndex": 615, + "kind": "fail", + "level": "warning", + "message": { + "text": "prefer a lambda to std::bind" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 119, + "startColumn": 10, + "charOffset": 4995, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 117, + "startColumn": 10, + "charOffset": 4881, + "charLength": 3, + "snippet": { + "text": "\ttemplate \n\tauto bindMapFunction(Object object, Function function) {\n\t\treturn std::bind(function, object, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b467973bbaf428b59509c8ddfc0902b22364b420938094c58f80f5a65652bc5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-namespace-comments", + "ruleIndex": 544, + "kind": "fail", + "level": "warning", + "message": { + "text": "namespace 'InternalPlayerWheel' ends with a comment that refers to a wrong namespace ''" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 122, + "startColumn": 2, + "charOffset": 5121, + "snippet": {} + }, + "contextRegion": { + "startLine": 120, + "startColumn": 2, + "charOffset": 5116, + "snippet": { + "text": "\t}\n\n} // End namespace\n\nbool IOWheel::initializeGlobalData(bool reload /* = false*/) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14622ff188340b21c730d0ae16872ce29b728b77664fe19bbb51aa632f5685e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 130, + "startColumn": 3, + "charOffset": 5372, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 128, + "startColumn": 3, + "charOffset": 5279, + "charLength": 3, + "snippet": { + "text": "\t// Register spells for druid\n\tfor (const auto &data : getWheelBonusData().spells.druid) {\n\t\tfor (size_t i = 1; i < 3; ++i) {\n\t\t\tconst auto grade = data.grade[i];\n\t\t\tInternalPlayerWheel::registerWheelSpellTable(grade, data.name, static_cast(i));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89e3815872539cabeadc5191eba6652647eab5663c36b76d8aa4f2a06570d96d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 131, + "startColumn": 23, + "charOffset": 5427, + "charLength": 4, + "snippet": { + "text": "data" + } + }, + "contextRegion": { + "startLine": 129, + "startColumn": 23, + "charOffset": 5309, + "charLength": 4, + "snippet": { + "text": "\tfor (const auto &data : getWheelBonusData().spells.druid) {\n\t\tfor (size_t i = 1; i < 3; ++i) {\n\t\t\tconst auto grade = data.grade[i];\n\t\t\tInternalPlayerWheel::registerWheelSpellTable(grade, data.name, static_cast(i));\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ebe4b6f110d418d4631679a3e57cdbb760716949609b0404508210a9e8f60c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 138, + "startColumn": 3, + "charOffset": 5647, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 136, + "startColumn": 3, + "charOffset": 5552, + "charLength": 3, + "snippet": { + "text": "\t// Register spells for knight\n\tfor (const auto &data : getWheelBonusData().spells.knight) {\n\t\tfor (size_t i = 1; i < 3; ++i) {\n\t\t\tconst auto &grade = data.grade[i];\n\t\t\tInternalPlayerWheel::registerWheelSpellTable(grade, data.name, static_cast(i));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ecab51a1b4f87d512d0099b8211e73a4b02235982a9deb54d8dd41d94a3f0800" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 139, + "startColumn": 24, + "charOffset": 5703, + "charLength": 4, + "snippet": { + "text": "data" + } + }, + "contextRegion": { + "startLine": 137, + "startColumn": 24, + "charOffset": 5583, + "charLength": 4, + "snippet": { + "text": "\tfor (const auto &data : getWheelBonusData().spells.knight) {\n\t\tfor (size_t i = 1; i < 3; ++i) {\n\t\t\tconst auto &grade = data.grade[i];\n\t\t\tInternalPlayerWheel::registerWheelSpellTable(grade, data.name, static_cast(i));\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "712db34df8215fb44ca293828a35a9b9e97c3dff1c1bd9eab8ba3bb599ac3fb9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 146, + "startColumn": 3, + "charOffset": 5925, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 144, + "startColumn": 3, + "charOffset": 5828, + "charLength": 3, + "snippet": { + "text": "\t// Register spells for paladin\n\tfor (const auto &data : getWheelBonusData().spells.paladin) {\n\t\tfor (size_t i = 1; i < 3; ++i) {\n\t\t\tconst auto &grade = data.grade[i];\n\t\t\tInternalPlayerWheel::registerWheelSpellTable(grade, data.name, static_cast(i));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45d0d4c3987a082bd9786e607c575474ca92e6070f934995c13c37c81606fb77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 147, + "startColumn": 24, + "charOffset": 5981, + "charLength": 4, + "snippet": { + "text": "data" + } + }, + "contextRegion": { + "startLine": 145, + "startColumn": 24, + "charOffset": 5860, + "charLength": 4, + "snippet": { + "text": "\tfor (const auto &data : getWheelBonusData().spells.paladin) {\n\t\tfor (size_t i = 1; i < 3; ++i) {\n\t\t\tconst auto &grade = data.grade[i];\n\t\t\tInternalPlayerWheel::registerWheelSpellTable(grade, data.name, static_cast(i));\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b9f601d2b6ab5c9680f1e597b941b7f2f552ef9d87e04aa1bfd35d4cb12333d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 154, + "startColumn": 3, + "charOffset": 6205, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 3, + "charOffset": 6106, + "charLength": 3, + "snippet": { + "text": "\t// Register spells for sorcerer\n\tfor (const auto &data : getWheelBonusData().spells.sorcerer) {\n\t\tfor (size_t i = 1; i < 3; ++i) {\n\t\t\tconst auto &grade = data.grade[i];\n\t\t\tInternalPlayerWheel::registerWheelSpellTable(grade, data.name, static_cast(i));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "958b4cce892c8f081be565218a30d63b7e943184fda89b706a02f35997309edc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 155, + "startColumn": 24, + "charOffset": 6261, + "charLength": 4, + "snippet": { + "text": "data" + } + }, + "contextRegion": { + "startLine": 153, + "startColumn": 24, + "charOffset": 6139, + "charLength": 4, + "snippet": { + "text": "\tfor (const auto &data : getWheelBonusData().spells.sorcerer) {\n\t\tfor (size_t i = 1; i < 3; ++i) {\n\t\t\tconst auto &grade = data.grade[i];\n\t\t\tInternalPlayerWheel::registerWheelSpellTable(grade, data.name, static_cast(i));\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6bf1c4d798bf424c9df865efa6b215b8d697cda33efef652980f4fad6f44409c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getFocusSpells' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 173, + "startColumn": 42, + "charOffset": 6754, + "charLength": 14, + "snippet": { + "text": "getFocusSpells" + } + }, + "contextRegion": { + "startLine": 171, + "startColumn": 42, + "charOffset": 6710, + "charLength": 14, + "snippet": { + "text": "}\n\nconst std::vector &IOWheel::getFocusSpells() const {\n\treturn InternalPlayerWheel::m_focusSpells;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0cb8c4634e394e55065d6edefe0418f058b179c5cbca7867023d06ae9d616cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 185, + "startColumn": 15, + "charOffset": 7312, + "charLength": 16, + "snippet": { + "text": "m_wheelBonusData" + } + }, + "contextRegion": { + "startLine": 183, + "startColumn": 15, + "charOffset": 7127, + "charLength": 16, + "snippet": { + "text": "std::pair IOWheel::getRevelationStatByStage(WheelStageEnum_t stageType) const {\n\t// Let's remove one, because the std::array starts with 0 and the stages with 1\n\tauto array = m_wheelBonusData.revelation.stats[static_cast(stageType) - 1];\n\treturn std::make_pair(array.damage, array.healing);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9be0cd44284e376d19e2da872329f8d7ddc7e689f71ed16befc7700de31a3a3a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getSlotPrioritaryOrder' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 189, + "startColumn": 17, + "charOffset": 7456, + "charLength": 22, + "snippet": { + "text": "getSlotPrioritaryOrder" + } + }, + "contextRegion": { + "startLine": 187, + "startColumn": 17, + "charOffset": 7437, + "charLength": 22, + "snippet": { + "text": "}\n\nint8_t IOWheel::getSlotPrioritaryOrder(WheelSlots_t slot) const {\n\tif (slot == WheelSlots_t::SLOT_BLUE_50 || slot == WheelSlots_t::SLOT_RED_50 || slot == WheelSlots_t::SLOT_PURPLE_50 || slot == WheelSlots_t::SLOT_GREEN_50) {\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7647469f096cf6a4137ad5bf9a2e603d9ba9ed31ecc22d44102cfb2632258ad7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 226, + "startColumn": 62, + "charOffset": 9690, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 62, + "charOffset": 9510, + "charLength": 2, + "snippet": { + "text": "\tm_wheelBonusData.spells.druid[0].name = \"Strong Ice Wave\";\n\tm_wheelBonusData.spells.druid[0].grade[1].leech.mana = 3;\n\tm_wheelBonusData.spells.druid[0].grade[2].increase.damage = 30;\n\n\tm_wheelBonusData.spells.druid[1].name = \"Mass Healing\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "881fb22fbfaf6246c10674642def591bdb71504173e28955c0568ec8c4942bf6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 229, + "startColumn": 60, + "charOffset": 9811, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 227, + "startColumn": 60, + "charOffset": 9694, + "charLength": 2, + "snippet": { + "text": "\n\tm_wheelBonusData.spells.druid[1].name = \"Mass Healing\";\n\tm_wheelBonusData.spells.druid[1].grade[1].increase.heal = 10;\n\tm_wheelBonusData.spells.druid[1].grade[2].increase.area = true;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "821dd863978181c522961cfada23a279286def89e6c45c5889a618de22e24e5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 233, + "startColumn": 60, + "charOffset": 10001, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 231, + "startColumn": 60, + "charOffset": 9880, + "charLength": 2, + "snippet": { + "text": "\n\tm_wheelBonusData.spells.druid[2].name = \"Nature's Embrace\";\n\tm_wheelBonusData.spells.druid[2].grade[1].increase.heal = 10;\n\tm_wheelBonusData.spells.druid[2].grade[2].decrease.cooldown = 10;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8cd1d45988003b39e652b904d2cc4b9805b5decfbfb3b2f565c2587afee3f24e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 234, + "startColumn": 64, + "charOffset": 10068, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 232, + "startColumn": 64, + "charOffset": 9881, + "charLength": 2, + "snippet": { + "text": "\tm_wheelBonusData.spells.druid[2].name = \"Nature's Embrace\";\n\tm_wheelBonusData.spells.druid[2].grade[1].increase.heal = 10;\n\tm_wheelBonusData.spells.druid[2].grade[2].decrease.cooldown = 10;\n\n\tm_wheelBonusData.spells.druid[3].name = \"Terra Wave\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83088c4e550e8d1df42ef08e5c4497c14d887f9f5bdfbcc10b18e4ead232b99e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 237, + "startColumn": 62, + "charOffset": 10189, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 235, + "startColumn": 62, + "charOffset": 10072, + "charLength": 2, + "snippet": { + "text": "\n\tm_wheelBonusData.spells.druid[3].name = \"Terra Wave\";\n\tm_wheelBonusData.spells.druid[3].grade[1].increase.damage = 25;\n\tm_wheelBonusData.spells.druid[3].grade[2].leech.life = 5;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a6c103802a114908656eeb09c5462915db00ee84f6fe4794b3b5032d95cf8e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 238, + "startColumn": 57, + "charOffset": 10249, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 236, + "startColumn": 57, + "charOffset": 10073, + "charLength": 1, + "snippet": { + "text": "\tm_wheelBonusData.spells.druid[3].name = \"Terra Wave\";\n\tm_wheelBonusData.spells.druid[3].grade[1].increase.damage = 25;\n\tm_wheelBonusData.spells.druid[3].grade[2].leech.life = 5;\n\n\tm_wheelBonusData.spells.druid[4].name = \"Heal Friend\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0f8403e2408f75018661424c800f503bbaef0317bd40d7b3bbfcae48610a238" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 241, + "startColumn": 64, + "charOffset": 10372, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 239, + "startColumn": 64, + "charOffset": 10252, + "charLength": 2, + "snippet": { + "text": "\n\tm_wheelBonusData.spells.druid[4].name = \"Heal Friend\";\n\tm_wheelBonusData.spells.druid[4].grade[1].decrease.manaCost = 10;\n\tm_wheelBonusData.spells.druid[4].grade[2].increase.heal = 10;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe7f2eabbd7060964d5454443d9f0ccfe4abb87c442f2b3d03f8a73e00a7fb06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 242, + "startColumn": 60, + "charOffset": 10435, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 60, + "charOffset": 10253, + "charLength": 2, + "snippet": { + "text": "\tm_wheelBonusData.spells.druid[4].name = \"Heal Friend\";\n\tm_wheelBonusData.spells.druid[4].grade[1].decrease.manaCost = 10;\n\tm_wheelBonusData.spells.druid[4].grade[2].increase.heal = 10;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1cf049f11ab3079b11b6d1768bb187500168e5379feef9f3156ae988a3392f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 247, + "startColumn": 58, + "charOffset": 10597, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 245, + "startColumn": 58, + "charOffset": 10442, + "charLength": 1, + "snippet": { + "text": "void IOWheel::initializeKnightSpells() {\n\tm_wheelBonusData.spells.knight[0].name = \"Front Sweep\";\n\tm_wheelBonusData.spells.knight[0].grade[1].leech.life = 5;\n\tm_wheelBonusData.spells.knight[0].grade[2].increase.damage = 30;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8b1727c70bc5b9349576430db05939aa9937139ad65f5d34556602c0997ba77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 248, + "startColumn": 63, + "charOffset": 10662, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 246, + "startColumn": 63, + "charOffset": 10483, + "charLength": 2, + "snippet": { + "text": "\tm_wheelBonusData.spells.knight[0].name = \"Front Sweep\";\n\tm_wheelBonusData.spells.knight[0].grade[1].leech.life = 5;\n\tm_wheelBonusData.spells.knight[0].grade[2].increase.damage = 30;\n\n\tm_wheelBonusData.spells.knight[1].name = \"Groundshaker\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6110c5a166798b07fb48456edf1012118c182c79d350f65289c2724c3e643cc0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 251, + "startColumn": 63, + "charOffset": 10787, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 249, + "startColumn": 63, + "charOffset": 10666, + "charLength": 2, + "snippet": { + "text": "\n\tm_wheelBonusData.spells.knight[1].name = \"Groundshaker\";\n\tm_wheelBonusData.spells.knight[1].grade[1].increase.damage = 25;\n\tm_wheelBonusData.spells.knight[1].grade[2].decrease.cooldown = 2;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a45025b0a6cc23febb7610cc08caa402214785aa3274bc326cf36b876c8427a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 255, + "startColumn": 65, + "charOffset": 10989, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 253, + "startColumn": 65, + "charOffset": 10858, + "charLength": 2, + "snippet": { + "text": "\n\tm_wheelBonusData.spells.knight[2].name = \"Chivalrous Challenge\";\n\tm_wheelBonusData.spells.knight[2].grade[1].decrease.manaCost = 20;\n\tm_wheelBonusData.spells.knight[2].grade[2].increase.aditionalTarget = 1;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "541baef6179f7c88ee8fa720e1dbe54acefacd5c0b91150c94639288d4f95558" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 259, + "startColumn": 61, + "charOffset": 11197, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 257, + "startColumn": 61, + "charOffset": 11067, + "charLength": 2, + "snippet": { + "text": "\n\tm_wheelBonusData.spells.knight[3].name = \"Intense Wound Cleansing\";\n\tm_wheelBonusData.spells.knight[3].grade[1].increase.heal = 10;\n\tm_wheelBonusData.spells.knight[3].grade[2].decrease.cooldown = 300;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2600c40615bc0233bc64d42ccae4649eec7be7e1da16540d6b7e8721ba94015f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 260, + "startColumn": 65, + "charOffset": 11265, + "charLength": 3, + "snippet": { + "text": "300" + } + }, + "contextRegion": { + "startLine": 258, + "startColumn": 65, + "charOffset": 11068, + "charLength": 3, + "snippet": { + "text": "\tm_wheelBonusData.spells.knight[3].name = \"Intense Wound Cleansing\";\n\tm_wheelBonusData.spells.knight[3].grade[1].increase.heal = 10;\n\tm_wheelBonusData.spells.knight[3].grade[2].decrease.cooldown = 300;\n\n\tm_wheelBonusData.spells.knight[4].name = \"Fierce Berserk\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8770995dc0ab06be353e8dae4f1ed5c0c94078590f600a709cea58350af4d179" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 263, + "startColumn": 65, + "charOffset": 11395, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 261, + "startColumn": 65, + "charOffset": 11270, + "charLength": 2, + "snippet": { + "text": "\n\tm_wheelBonusData.spells.knight[4].name = \"Fierce Berserk\";\n\tm_wheelBonusData.spells.knight[4].grade[1].decrease.manaCost = 30;\n\tm_wheelBonusData.spells.knight[4].grade[2].increase.damage = 25;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6ce5e5d39b2555ee281092c721f307ebb00eed41b0d5ffe19f8ccc73692f6d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 264, + "startColumn": 63, + "charOffset": 11461, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 262, + "startColumn": 63, + "charOffset": 11271, + "charLength": 2, + "snippet": { + "text": "\tm_wheelBonusData.spells.knight[4].name = \"Fierce Berserk\";\n\tm_wheelBonusData.spells.knight[4].grade[1].decrease.manaCost = 30;\n\tm_wheelBonusData.spells.knight[4].grade[2].increase.damage = 25;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "329bf309a997b9626ab98490c1c9cbcba616939931169b35f7b552fd0742c18f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 269, + "startColumn": 80, + "charOffset": 11648, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 267, + "startColumn": 80, + "charOffset": 11468, + "charLength": 1, + "snippet": { + "text": "void IOWheel::initializePaladinSpells() {\n\tm_wheelBonusData.spells.paladin[0].name = \"Sharpshooter\";\n\tm_wheelBonusData.spells.paladin[0].grade[1].decrease.secondaryGroupCooldown = 8;\n\tm_wheelBonusData.spells.paladin[0].grade[2].decrease.cooldown = 6;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a86c839425cbc83ceec69a06e3a9ea956bacc4222c3b36ba94413d1b5b52e61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 270, + "startColumn": 66, + "charOffset": 11716, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 268, + "startColumn": 66, + "charOffset": 11510, + "charLength": 1, + "snippet": { + "text": "\tm_wheelBonusData.spells.paladin[0].name = \"Sharpshooter\";\n\tm_wheelBonusData.spells.paladin[0].grade[1].decrease.secondaryGroupCooldown = 8;\n\tm_wheelBonusData.spells.paladin[0].grade[2].decrease.cooldown = 6;\n\n\tm_wheelBonusData.spells.paladin[1].name = \"Strong Ethereal Spear\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "556c4876b79de1e8c731e1835b6efb8c440a434ae5631a11a4771b3793986b32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 274, + "startColumn": 64, + "charOffset": 11919, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 272, + "startColumn": 64, + "charOffset": 11720, + "charLength": 2, + "snippet": { + "text": "\tm_wheelBonusData.spells.paladin[1].name = \"Strong Ethereal Spear\";\n\tm_wheelBonusData.spells.paladin[1].grade[1].decrease.cooldown = 2;\n\tm_wheelBonusData.spells.paladin[1].grade[2].increase.damage = 25;\n\n\tm_wheelBonusData.spells.paladin[2].name = \"Divine Dazzle\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09f129fb2c7805e4a57234d7ce5642dfc3e12fd8fef1def02952bac9012805c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 282, + "startColumn": 80, + "charOffset": 12332, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 280, + "startColumn": 80, + "charOffset": 12195, + "charLength": 1, + "snippet": { + "text": "\n\tm_wheelBonusData.spells.paladin[3].name = \"Swift Foot\";\n\tm_wheelBonusData.spells.paladin[3].grade[1].decrease.secondaryGroupCooldown = 8;\n\tm_wheelBonusData.spells.paladin[3].grade[2].decrease.cooldown = 6;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55e03e0d46fd73d2e193262d5b6a8547ee622d76032878b1d7aa718403f8037a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 283, + "startColumn": 66, + "charOffset": 12400, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 281, + "startColumn": 66, + "charOffset": 12196, + "charLength": 1, + "snippet": { + "text": "\tm_wheelBonusData.spells.paladin[3].name = \"Swift Foot\";\n\tm_wheelBonusData.spells.paladin[3].grade[1].decrease.secondaryGroupCooldown = 8;\n\tm_wheelBonusData.spells.paladin[3].grade[2].decrease.cooldown = 6;\n\n\tm_wheelBonusData.spells.paladin[4].name = \"Divine Caldera\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "830e38165606d487a4dc877865e1bca54db89b6812a1e2927a4696ab07807f2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 286, + "startColumn": 66, + "charOffset": 12530, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 284, + "startColumn": 66, + "charOffset": 12403, + "charLength": 2, + "snippet": { + "text": "\n\tm_wheelBonusData.spells.paladin[4].name = \"Divine Caldera\";\n\tm_wheelBonusData.spells.paladin[4].grade[1].decrease.manaCost = 20;\n\tm_wheelBonusData.spells.paladin[4].grade[2].increase.damage = 25;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf7ffbffe854ddf665de5cb29789fcdd27a8c86dc993fdce9b16d20a6215f962" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 287, + "startColumn": 64, + "charOffset": 12597, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 285, + "startColumn": 64, + "charOffset": 12404, + "charLength": 2, + "snippet": { + "text": "\tm_wheelBonusData.spells.paladin[4].name = \"Divine Caldera\";\n\tm_wheelBonusData.spells.paladin[4].grade[1].decrease.manaCost = 20;\n\tm_wheelBonusData.spells.paladin[4].grade[2].increase.damage = 25;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f579b016b359f449b20ae18daf4b3f8d83bd8d7747276bc6cc311e4167f3b009" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 292, + "startColumn": 67, + "charOffset": 12773, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 290, + "startColumn": 67, + "charOffset": 12604, + "charLength": 1, + "snippet": { + "text": "void IOWheel::initializeSorcererSpells() {\n\tm_wheelBonusData.spells.sorcerer[0].name = \"Magic Shield\";\n\tm_wheelBonusData.spells.sorcerer[0].grade[2].decrease.cooldown = 6;\n\n\tm_wheelBonusData.spells.sorcerer[1].name = \"Sap Strength\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed1c6db23fcaf5543a785c5cecaf01580ea882da0922f17a5f32bfc25e111d2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 296, + "startColumn": 74, + "charOffset": 12978, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 294, + "startColumn": 74, + "charOffset": 12777, + "charLength": 2, + "snippet": { + "text": "\tm_wheelBonusData.spells.sorcerer[1].name = \"Sap Strength\";\n\tm_wheelBonusData.spells.sorcerer[1].grade[1].increase.area = true;\n\tm_wheelBonusData.spells.sorcerer[1].grade[2].increase.damageReduction = 10;\n\n\tm_wheelBonusData.spells.sorcerer[2].name = \"Energy Wave\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a030462027db811fb5ca76fb0aaafc549e2a3dc9a28b164305c48c303acf65a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 299, + "startColumn": 65, + "charOffset": 13106, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 297, + "startColumn": 65, + "charOffset": 12982, + "charLength": 2, + "snippet": { + "text": "\n\tm_wheelBonusData.spells.sorcerer[2].name = \"Energy Wave\";\n\tm_wheelBonusData.spells.sorcerer[2].grade[1].increase.damage = 25;\n\tm_wheelBonusData.spells.sorcerer[2].grade[2].increase.area = true;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6cc38b0620bf2d2a00fc61225afa227d329372ef8917dc7202f235519489cd3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "15 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 303, + "startColumn": 73, + "charOffset": 13314, + "charLength": 2, + "snippet": { + "text": "15" + } + }, + "contextRegion": { + "startLine": 301, + "startColumn": 73, + "charOffset": 13178, + "charLength": 2, + "snippet": { + "text": "\n\tm_wheelBonusData.spells.sorcerer[3].name = \"Great Fire Wave\";\n\tm_wheelBonusData.spells.sorcerer[3].grade[1].increase.criticalDamage = 15;\n\tm_wheelBonusData.spells.sorcerer[3].grade[1].increase.criticalChance = 10;\n\tm_wheelBonusData.spells.sorcerer[3].grade[2].increase.damage = 25;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52b99906ff62cb2107a037df9345920781115feeb544c57cbc2bd0708e3fc213" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 304, + "startColumn": 73, + "charOffset": 13390, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 302, + "startColumn": 73, + "charOffset": 13179, + "charLength": 2, + "snippet": { + "text": "\tm_wheelBonusData.spells.sorcerer[3].name = \"Great Fire Wave\";\n\tm_wheelBonusData.spells.sorcerer[3].grade[1].increase.criticalDamage = 15;\n\tm_wheelBonusData.spells.sorcerer[3].grade[1].increase.criticalChance = 10;\n\tm_wheelBonusData.spells.sorcerer[3].grade[2].increase.damage = 25;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "545591eb09be98348acc418037707ffed75567aa8e437a5f53ec4b8033a48f56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 305, + "startColumn": 65, + "charOffset": 13458, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 303, + "startColumn": 65, + "charOffset": 13242, + "charLength": 2, + "snippet": { + "text": "\tm_wheelBonusData.spells.sorcerer[3].grade[1].increase.criticalDamage = 15;\n\tm_wheelBonusData.spells.sorcerer[3].grade[1].increase.criticalChance = 10;\n\tm_wheelBonusData.spells.sorcerer[3].grade[2].increase.damage = 25;\n\n\tm_wheelBonusData.spells.sorcerer[4].name = \"Any_Focus_Mage_Spell\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b7895ac15c6befba6bd6df4a1424ed172d3c990481b2128147e5644bfbf7614" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 308, + "startColumn": 65, + "charOffset": 13595, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 306, + "startColumn": 65, + "charOffset": 13462, + "charLength": 2, + "snippet": { + "text": "\n\tm_wheelBonusData.spells.sorcerer[4].name = \"Any_Focus_Mage_Spell\";\n\tm_wheelBonusData.spells.sorcerer[4].grade[1].increase.damage = 25;\n\tm_wheelBonusData.spells.sorcerer[4].grade[2].decrease.cooldown = 4;\n\tm_wheelBonusData.spells.sorcerer[4].grade[2].decrease.secondaryGroupCooldown = 4;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9dbd66ee728574a1242c4b41c16f084f9ddb558a8ce7c698f455c35a652fa6e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'isMaxPointAddedToSlot' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 313, + "startColumn": 15, + "charOffset": 13768, + "charLength": 21, + "snippet": { + "text": "isMaxPointAddedToSlot" + } + }, + "contextRegion": { + "startLine": 311, + "startColumn": 15, + "charOffset": 13751, + "charLength": 21, + "snippet": { + "text": "}\n\nbool IOWheel::isMaxPointAddedToSlot(const std::shared_ptr &player, uint16_t points, WheelSlots_t slotType) const {\n\treturn points == player->wheel()->getPointsBySlotType(slotType) && points == player->wheel()->getMaxPointsPerSlot(slotType);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f338cb684ac8a49268687b59a6bbf63117172fff581f5601e574622ec623f61c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'isKnight' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 317, + "startColumn": 15, + "charOffset": 14020, + "charLength": 8, + "snippet": { + "text": "isKnight" + } + }, + "contextRegion": { + "startLine": 315, + "startColumn": 15, + "charOffset": 14003, + "charLength": 8, + "snippet": { + "text": "}\n\nbool IOWheel::isKnight(uint8_t vocationId) const {\n\treturn vocationId == Vocation_t::VOCATION_KNIGHT_CIP;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55e3591640a34e141f9bfb8566c2ce80e8bff17b0a603b00d889837544de2c31" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'isPaladin' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 321, + "startColumn": 15, + "charOffset": 14129, + "charLength": 9, + "snippet": { + "text": "isPaladin" + } + }, + "contextRegion": { + "startLine": 319, + "startColumn": 15, + "charOffset": 14112, + "charLength": 9, + "snippet": { + "text": "}\n\nbool IOWheel::isPaladin(uint8_t vocationId) const {\n\treturn vocationId == Vocation_t::VOCATION_PALADIN_CIP;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a48067e487564831a6700ccfee610d062a2bed5bdbc3d2bd01c38ad366ae3285" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'isSorcerer' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 325, + "startColumn": 15, + "charOffset": 14240, + "charLength": 10, + "snippet": { + "text": "isSorcerer" + } + }, + "contextRegion": { + "startLine": 323, + "startColumn": 15, + "charOffset": 14223, + "charLength": 10, + "snippet": { + "text": "}\n\nbool IOWheel::isSorcerer(uint8_t vocationId) const {\n\treturn vocationId == Vocation_t::VOCATION_SORCERER_CIP;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76dc3fead836fad580c0ac58fa63c3b297895e6f456d1b140c572597c1cd12a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'isDruid' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 329, + "startColumn": 15, + "charOffset": 14353, + "charLength": 7, + "snippet": { + "text": "isDruid" + } + }, + "contextRegion": { + "startLine": 327, + "startColumn": 15, + "charOffset": 14336, + "charLength": 7, + "snippet": { + "text": "}\n\nbool IOWheel::isDruid(uint8_t vocationId) const {\n\treturn vocationId == Vocation_t::VOCATION_DRUID_CIP;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d989be3e36735db79b726349269c94bb4795d84ebd41488442ae5151874051af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 341, + "startColumn": 3, + "charOffset": 14976, + "charLength": 9, + "snippet": { + "text": "bonusData" + } + }, + "contextRegion": { + "startLine": 339, + "startColumn": 3, + "charOffset": 14729, + "charLength": 9, + "snippet": { + "text": "void IOWheel::addVesselResonance(const std::shared_ptr &player, PlayerWheelMethodsBonusData &bonusData, WheelSlots_t slotType, WheelGemAffinity_t affinity, uint16_t points) const {\n\tif (isMaxPointAddedToSlot(player, points, slotType)) {\n\t\tbonusData.unlockedVesselResonances[static_cast(affinity)]++;\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aaa2eaf4dfeb19ec2498957287f9bd9b934062546e005090592c7673afdb7799" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotGreen200' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 391, + "startColumn": 67, + "charOffset": 19356, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 389, + "startColumn": 67, + "charOffset": 19267, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_GREEN_200 = 1\nvoid IOWheel::slotGreen200(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tauto pointsInSlot = isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_GREEN_200);\n\tif (isKnight(vocationCipId)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "910d6f8dfc87149f9f2e1da10b0ce3bc39722c6852799a49bffef0dd42a51b35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 407, + "startColumn": 27, + "charOffset": 19980, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 405, + "startColumn": 27, + "charOffset": 19904, + "charLength": 1, + "snippet": { + "text": "\t} else {\n\t\tbonusData.stats.health += 1 * points;\n\t\tbonusData.stats.mana += 6 * points;\n\t\tif (pointsInSlot && isSorcerer(vocationCipId)) {\n\t\t\tbonusData.instant.runicMastery = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "002203e3b5b35ceed3f0bb72a12b95984aa375797a0e21a0a6ea5f7653026a86" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 408, + "startColumn": 3, + "charOffset": 19994, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 406, + "startColumn": 3, + "charOffset": 19914, + "charLength": 2, + "snippet": { + "text": "\t\tbonusData.stats.health += 1 * points;\n\t\tbonusData.stats.mana += 6 * points;\n\t\tif (pointsInSlot && isSorcerer(vocationCipId)) {\n\t\t\tbonusData.instant.runicMastery = true;\n\t\t} else if (pointsInSlot && isDruid(vocationCipId)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7482c56535148a8aa6a885a5eeecc27ca724ef12a2247f8470975d1184c15e5c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 417, + "startColumn": 94, + "charOffset": 20310, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 415, + "startColumn": 94, + "charOffset": 20190, + "charLength": 1, + "snippet": { + "text": "\n// SLOT_GREEN_TOP_150 = 2\nvoid IOWheel::slotGreenTop150(const std::shared_ptr &player, uint16_t points, uint8_t, PlayerWheelMethodsBonusData &bonusData) const {\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\n\tif (isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_GREEN_TOP_150)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "556c60c53c52811aafbb1b282d1fe1461065fe2b0bc6bc670c159fe4deddae99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 418, + "startColumn": 26, + "charOffset": 20385, + "charLength": 19, + "snippet": { + "text": "MITIGATION_INCREASE" + } + }, + "contextRegion": { + "startLine": 416, + "startColumn": 26, + "charOffset": 20191, + "charLength": 19, + "snippet": { + "text": "// SLOT_GREEN_TOP_150 = 2\nvoid IOWheel::slotGreenTop150(const std::shared_ptr &player, uint16_t points, uint8_t, PlayerWheelMethodsBonusData &bonusData) const {\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\n\tif (isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_GREEN_TOP_150)) {\n\t\tbonusData.leech.manaLeech += MANA_LEECH_INCREASE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b68845d817dfdccc478028fe16a350321e34c681139c2b8b80bcf801526e94f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 418, + "startColumn": 48, + "charOffset": 20407, + "charLength": 6, + "snippet": { + "text": "points" + } + }, + "contextRegion": { + "startLine": 416, + "startColumn": 48, + "charOffset": 20191, + "charLength": 6, + "snippet": { + "text": "// SLOT_GREEN_TOP_150 = 2\nvoid IOWheel::slotGreenTop150(const std::shared_ptr &player, uint16_t points, uint8_t, PlayerWheelMethodsBonusData &bonusData) const {\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\n\tif (isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_GREEN_TOP_150)) {\n\t\tbonusData.leech.manaLeech += MANA_LEECH_INCREASE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7c87208aadc18ca095fbbeb18d56089f50d4d9d172126d1efdf923663ffef88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotGreenTop100' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 425, + "startColumn": 70, + "charOffset": 20648, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 423, + "startColumn": 70, + "charOffset": 20552, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_GREEN_TOP_100 = 3\nvoid IOWheel::slotGreenTop100(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\tbonusData.stats.health += 3 * points;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "edc0965766502c314a98cd37a18b241850867be7944dd0deffdcd0f7737d0eda" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotRedTop100' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 437, + "startColumn": 68, + "charOffset": 21144, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 435, + "startColumn": 68, + "charOffset": 21052, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_RED_TOP_100 = 4\nvoid IOWheel::slotRedTop100(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tauto pointsInSlot = isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_RED_TOP_100);\n\tif (isKnight(vocationCipId)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "853a032d6db5384e76df4fe74280a75e437397fae7fd1580503b0dddefb523b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 450, + "startColumn": 27, + "charOffset": 21627, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 448, + "startColumn": 27, + "charOffset": 21587, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\tbonusData.stats.mana += 6 * points;\n\t\tif (pointsInSlot) {\n\t\t\tbonusData.skills.magic += 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a511a3fc209a6022601bb4d23f576ab51eecbf9632d4123fccd22c007de3ad7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotRedTop150' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 458, + "startColumn": 68, + "charOffset": 21794, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 456, + "startColumn": 68, + "charOffset": 21702, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_RED_TOP_150 = 5\nvoid IOWheel::slotRedTop150(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\tbonusData.stats.health += 3 * points;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ebf67633d59930640ca4224eb064f2de902d632847aa77e52d0ab09e92d1fdd8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotRed200' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 470, + "startColumn": 65, + "charOffset": 22279, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 468, + "startColumn": 65, + "charOffset": 22194, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_RED_200 = 6\nvoid IOWheel::slotRed200(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\taddSpell(player, bonusData, WheelSlots_t::SLOT_RED_200, points, \"Front Sweep\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1553db922bb8c2116fe644c4dc9c028d9796533d35f56c3271e8c4408532a55a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 481, + "startColumn": 4, + "charOffset": 22808, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 479, + "startColumn": 4, + "charOffset": 22760, + "charLength": 3, + "snippet": { + "text": "\t} else {\n\t\tif (isSorcerer(vocationCipId)) {\n\t\t\tfor (const std::string &focusSpellName : getFocusSpells()) {\n\t\t\t\taddSpell(player, bonusData, WheelSlots_t::SLOT_RED_200, points, focusSpellName);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "252b4c62bcf4f03905c8f4d77849907703831ae463a42dd110b6c6eadb3c9dfc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 488, + "startColumn": 27, + "charOffset": 23127, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 486, + "startColumn": 27, + "charOffset": 23057, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\t\tbonusData.stats.health += 1 * points;\n\t\tbonusData.stats.mana += 6 * points;\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ee5f6eca6b36b69c068c847e8b81446df3a8556479dbe7e17eec7c775f726a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 493, + "startColumn": 97, + "charOffset": 23270, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 491, + "startColumn": 97, + "charOffset": 23144, + "charLength": 1, + "snippet": { + "text": "\n// SLOT_GREEN_BOTTOM_150 = 7\nvoid IOWheel::slotGreenBottom150(const std::shared_ptr &player, uint16_t points, uint8_t, PlayerWheelMethodsBonusData &bonusData) const {\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\n\taddVesselResonance(player, bonusData, WheelSlots_t::SLOT_GREEN_BOTTOM_150, WheelGemAffinity_t::Green, points);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84c7f79285032dd8b1bea6012c26889817e1e7cc1a13500e0b15f0983e1b2cc8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 494, + "startColumn": 26, + "charOffset": 23345, + "charLength": 19, + "snippet": { + "text": "MITIGATION_INCREASE" + } + }, + "contextRegion": { + "startLine": 492, + "startColumn": 26, + "charOffset": 23145, + "charLength": 19, + "snippet": { + "text": "// SLOT_GREEN_BOTTOM_150 = 7\nvoid IOWheel::slotGreenBottom150(const std::shared_ptr &player, uint16_t points, uint8_t, PlayerWheelMethodsBonusData &bonusData) const {\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\n\taddVesselResonance(player, bonusData, WheelSlots_t::SLOT_GREEN_BOTTOM_150, WheelGemAffinity_t::Green, points);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df0126809a338c4e9263b32dfea56836695f252e1d108c00e348f85a1b89e016" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 494, + "startColumn": 48, + "charOffset": 23367, + "charLength": 6, + "snippet": { + "text": "points" + } + }, + "contextRegion": { + "startLine": 492, + "startColumn": 48, + "charOffset": 23145, + "charLength": 6, + "snippet": { + "text": "// SLOT_GREEN_BOTTOM_150 = 7\nvoid IOWheel::slotGreenBottom150(const std::shared_ptr &player, uint16_t points, uint8_t, PlayerWheelMethodsBonusData &bonusData) const {\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\n\taddVesselResonance(player, bonusData, WheelSlots_t::SLOT_GREEN_BOTTOM_150, WheelGemAffinity_t::Green, points);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4109f52195e38f492215ff958d14671959ea5ebd360e785e980c0c9dc6f420ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotGreenMiddle100' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 499, + "startColumn": 73, + "charOffset": 23591, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 497, + "startColumn": 73, + "charOffset": 23489, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_GREEN_MIDDLE_100 = 8\nvoid IOWheel::slotGreenMiddle100(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\taddSpell(player, bonusData, WheelSlots_t::SLOT_GREEN_MIDDLE_100, points, \"Groundshaker\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd0ad40957ea08391fb54f4913a916f52e8a5e2b73c2729f861bf88a796c1f69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotGreenTop75' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 517, + "startColumn": 69, + "charOffset": 24409, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 515, + "startColumn": 69, + "charOffset": 24315, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_GREEN_TOP_75 = 9\nvoid IOWheel::slotGreenTop75(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\tbonusData.stats.mana += 1 * points;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d05db5067448e4ea9d2c5e3566050e837169fbe5135207b2b4d7947b03a65984" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 523, + "startColumn": 27, + "charOffset": 24681, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 521, + "startColumn": 27, + "charOffset": 24607, + "charLength": 1, + "snippet": { + "text": "\t\tbonusData.stats.mana += 3 * points;\n\t} else {\n\t\tbonusData.stats.mana += 6 * points;\n\t}\n\tif (isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_GREEN_TOP_75)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64c4d3096d3cf84e303b839db8f08aa8a0664533b840fb6fdf8e68df1b241aa8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotRedTop75' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 531, + "startColumn": 67, + "charOffset": 24925, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 529, + "startColumn": 67, + "charOffset": 24834, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_RED_TOP_75 = 10\nvoid IOWheel::slotRedTop75(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\tbonusData.stats.capacity += 5 * points;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a14e28ff96142aad5faa5b1498e7439a212e45c22e1b15a2c46ca2e49304d58" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 533, + "startColumn": 31, + "charOffset": 25075, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 531, + "startColumn": 31, + "charOffset": 24859, + "charLength": 1, + "snippet": { + "text": "void IOWheel::slotRedTop75(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\tbonusData.stats.capacity += 5 * points;\n\t} else if (isPaladin(vocationCipId)) {\n\t\tbonusData.stats.capacity += 4 * points;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00e7a17acd1e25f5db43029b88eaf01573bb1b3b4ce9599cc171d65af5f23bfb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotRedMiddle100' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 543, + "startColumn": 71, + "charOffset": 25429, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 541, + "startColumn": 71, + "charOffset": 25330, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_RED_MIDDLE_100 = 11\nvoid IOWheel::slotRedMiddle100(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\taddSpell(player, bonusData, WheelSlots_t::SLOT_RED_MIDDLE_100, points, \"Chivalrous Challenge\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0784d83e380aa08b945f0de3ce2239e4f0e1de71fb2604a574f0034a5dc11ae0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 556, + "startColumn": 27, + "charOffset": 26126, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 554, + "startColumn": 27, + "charOffset": 26001, + "charLength": 1, + "snippet": { + "text": "\t\t\taddSpell(player, bonusData, WheelSlots_t::SLOT_RED_MIDDLE_100, points, \"Nature's Embrace\");\n\t\t}\n\t\tbonusData.stats.mana += 6 * points;\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47d1a8679132ce1970744d3c9c44b4815c8c119c785cd86668d6c0b985c177cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotRedBottom150' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 561, + "startColumn": 71, + "charOffset": 26242, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 559, + "startColumn": 71, + "charOffset": 26143, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_RED_BOTTOM_150 = 12\nvoid IOWheel::slotRedBottom150(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\tbonusData.stats.health += 3 * points;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b99bf5485cd4423063cdba4707e302825018216509d381ebb45aae2ccdee0436" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotGreenBottom100' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 575, + "startColumn": 73, + "charOffset": 26776, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 573, + "startColumn": 73, + "charOffset": 26673, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_GREEN_BOTTOM_100 = 13\nvoid IOWheel::slotGreenBottom100(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\taddSpell(player, bonusData, WheelSlots_t::SLOT_GREEN_BOTTOM_100, points, \"Intense Wound Cleansing\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "977d5351b7e6fc3e262beafff8e5a4050213edb844f21d39db08653268b7330e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotGreenBottom75' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 593, + "startColumn": 72, + "charOffset": 27598, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 591, + "startColumn": 72, + "charOffset": 27497, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_GREEN_BOTTOM_75 = 14\nvoid IOWheel::slotGreenBottom75(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tauto pointsInSlot = isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_GREEN_BOTTOM_75);\n\tif (isKnight(vocationCipId)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32584131cbbf15bb2a53dcb1e6458b38feba7fca1436657f6ff405b91e518afe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 606, + "startColumn": 27, + "charOffset": 28085, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 604, + "startColumn": 27, + "charOffset": 28045, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\tbonusData.stats.mana += 6 * points;\n\t\tif (pointsInSlot) {\n\t\t\tbonusData.skills.magic += 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a8421ee1e4b771466daff7361166ba46a58a6d4bcdee35798b8b8bcc932c6149" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotGreen50' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 614, + "startColumn": 66, + "charOffset": 28248, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 612, + "startColumn": 66, + "charOffset": 28160, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_GREEN_50 = 15\nvoid IOWheel::slotGreen50(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\tbonusData.stats.capacity += 5 * points;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "658baabc0bc6840a89b40b20d99aa450a2781737e97d157a25bc6a5e52f6d56a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 616, + "startColumn": 31, + "charOffset": 28398, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 614, + "startColumn": 31, + "charOffset": 28183, + "charLength": 1, + "snippet": { + "text": "void IOWheel::slotGreen50(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\tbonusData.stats.capacity += 5 * points;\n\t} else if (isPaladin(vocationCipId)) {\n\t\tbonusData.stats.capacity += 4 * points;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23a2d11e46e06a119ce456c835a41d76135fc94e3246a076f878b7e75a15bde1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotRed50' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 626, + "startColumn": 64, + "charOffset": 28737, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 624, + "startColumn": 64, + "charOffset": 28653, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_RED_50 = 16\nvoid IOWheel::slotRed50(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\n\tif (isKnight(vocationCipId)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cafb7b009f5e54f2349906029c6cbbf34245b96d58a48fae9e4b709ca0c56a4f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 627, + "startColumn": 26, + "charOffset": 28850, + "charLength": 19, + "snippet": { + "text": "MITIGATION_INCREASE" + } + }, + "contextRegion": { + "startLine": 625, + "startColumn": 26, + "charOffset": 28654, + "charLength": 19, + "snippet": { + "text": "// SLOT_RED_50 = 16\nvoid IOWheel::slotRed50(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\n\tif (isKnight(vocationCipId)) {\n\t\taddSpell(player, bonusData, WheelSlots_t::SLOT_RED_50, points, \"Fierce Berserk\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ba8f37494f806f9514fea33e472d11b7b1d8e25ea61039967bb2bad0962a9ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 627, + "startColumn": 48, + "charOffset": 28872, + "charLength": 6, + "snippet": { + "text": "points" + } + }, + "contextRegion": { + "startLine": 625, + "startColumn": 48, + "charOffset": 28654, + "charLength": 6, + "snippet": { + "text": "// SLOT_RED_50 = 16\nvoid IOWheel::slotRed50(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\n\tif (isKnight(vocationCipId)) {\n\t\taddSpell(player, bonusData, WheelSlots_t::SLOT_RED_50, points, \"Fierce Berserk\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f650191063d6262b66df14c67e50d359d4f1e7052b985407f6452c48e07e1fc6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotRedBottom75' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 640, + "startColumn": 70, + "charOffset": 29439, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 638, + "startColumn": 70, + "charOffset": 29342, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_RED_BOTTOM_75 = 17\nvoid IOWheel::slotRedBottom75(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\tbonusData.stats.capacity += 5 * points;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aadd43640a747d4a06dbc9ae2199715180c7d3bf3b15f5e0fcf8823b81137296" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 642, + "startColumn": 31, + "charOffset": 29589, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 640, + "startColumn": 31, + "charOffset": 29370, + "charLength": 1, + "snippet": { + "text": "void IOWheel::slotRedBottom75(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\tbonusData.stats.capacity += 5 * points;\n\t} else if (isPaladin(vocationCipId)) {\n\t\tbonusData.stats.capacity += 4 * points;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68ca4d633bbb9c128dcb1f183fedcee02daa178cd3f056441af0a54ca81d90ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotRedBottom100' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 654, + "startColumn": 71, + "charOffset": 29976, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 652, + "startColumn": 71, + "charOffset": 29877, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_RED_BOTTOM_100 = 18\nvoid IOWheel::slotRedBottom100(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\tbonusData.stats.mana += 1 * points;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f1165bd5efcfdd477336093c7e2140d7dda5c99d520aea743b66dafd4db0fcf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 660, + "startColumn": 27, + "charOffset": 30248, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 658, + "startColumn": 27, + "charOffset": 30174, + "charLength": 1, + "snippet": { + "text": "\t\tbonusData.stats.mana += 3 * points;\n\t} else {\n\t\tbonusData.stats.mana += 6 * points;\n\t}\n\taddVesselResonance(player, bonusData, WheelSlots_t::SLOT_RED_BOTTOM_100, WheelGemAffinity_t::Red, points);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da7eeaa8309b77051ac5ace42f959bf60ae9de5c88a34ce6aea28fa6cefddf97" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 666, + "startColumn": 93, + "charOffset": 30492, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 664, + "startColumn": 93, + "charOffset": 30373, + "charLength": 1, + "snippet": { + "text": "\n// SLOT_BLUE_TOP_100 = 19\nvoid IOWheel::slotBlueTop100(const std::shared_ptr &player, uint16_t points, uint8_t, PlayerWheelMethodsBonusData &bonusData) const {\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\n\taddVesselResonance(player, bonusData, WheelSlots_t::SLOT_BLUE_TOP_100, WheelGemAffinity_t::Blue, points);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f41245f4d27a85ced8f25a2ecba99b0bdc611623d3184f88451905e817d3b65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 667, + "startColumn": 26, + "charOffset": 30567, + "charLength": 19, + "snippet": { + "text": "MITIGATION_INCREASE" + } + }, + "contextRegion": { + "startLine": 665, + "startColumn": 26, + "charOffset": 30374, + "charLength": 19, + "snippet": { + "text": "// SLOT_BLUE_TOP_100 = 19\nvoid IOWheel::slotBlueTop100(const std::shared_ptr &player, uint16_t points, uint8_t, PlayerWheelMethodsBonusData &bonusData) const {\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\n\taddVesselResonance(player, bonusData, WheelSlots_t::SLOT_BLUE_TOP_100, WheelGemAffinity_t::Blue, points);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86b3fcc6dc069d96dcb35eee3c39927802ae2d2ff5f7a400315c13426bc3ea76" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 667, + "startColumn": 48, + "charOffset": 30589, + "charLength": 6, + "snippet": { + "text": "points" + } + }, + "contextRegion": { + "startLine": 665, + "startColumn": 48, + "charOffset": 30374, + "charLength": 6, + "snippet": { + "text": "// SLOT_BLUE_TOP_100 = 19\nvoid IOWheel::slotBlueTop100(const std::shared_ptr &player, uint16_t points, uint8_t, PlayerWheelMethodsBonusData &bonusData) const {\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\n\taddVesselResonance(player, bonusData, WheelSlots_t::SLOT_BLUE_TOP_100, WheelGemAffinity_t::Blue, points);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "120825dac98514314500663bc8abc70933734c17ebbf66fec34839a03b7bfa37" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotBlueTop75' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 672, + "startColumn": 68, + "charOffset": 30799, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 670, + "startColumn": 68, + "charOffset": 30706, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_BLUE_TOP_75 = 20\nvoid IOWheel::slotBlueTop75(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\tbonusData.stats.health += 3 * points;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64157ca9c94cfb18fc186962d7ff9de3ab53a080528f9940df9452e1dc7772d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotBlue50' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 686, + "startColumn": 65, + "charOffset": 31313, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 684, + "startColumn": 65, + "charOffset": 31227, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_BLUE_50 = 21\nvoid IOWheel::slotBlue50(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\taddSpell(player, bonusData, WheelSlots_t::SLOT_BLUE_50, points, \"Front Sweep\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1219cdce3031c4d885a00f6357c95116291513077947eea7b448cb6b5550776d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 695, + "startColumn": 4, + "charOffset": 31762, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 693, + "startColumn": 4, + "charOffset": 31714, + "charLength": 3, + "snippet": { + "text": "\t} else {\n\t\tif (isSorcerer(vocationCipId)) {\n\t\t\tfor (const std::string &focusSpellName : getFocusSpells()) {\n\t\t\t\taddSpell(player, bonusData, WheelSlots_t::SLOT_BLUE_50, points, focusSpellName);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aff23c1e6f256f0e6245c98e6126e0ee44d373242e7b495d1ad899def234f201" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 701, + "startColumn": 27, + "charOffset": 32041, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 699, + "startColumn": 27, + "charOffset": 31924, + "charLength": 1, + "snippet": { + "text": "\t\t\taddSpell(player, bonusData, WheelSlots_t::SLOT_BLUE_50, points, \"Strong Ice Wave\");\n\t\t}\n\t\tbonusData.stats.mana += 6 * points;\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d2f74de24f42afd02134e7cfae36bb2a14dc3f6f089b63709309d36f267cf0a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotPurple50' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 706, + "startColumn": 67, + "charOffset": 32148, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 704, + "startColumn": 67, + "charOffset": 32058, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_PURPLE_50 = 22\nvoid IOWheel::slotPurple50(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\tbonusData.stats.health += 3 * points;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47e7db1290fc49e7dc0906b93ac012c236c801251e50915b6192b6d07c8a5579" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotPurpleTop75' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 718, + "startColumn": 70, + "charOffset": 32646, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 716, + "startColumn": 70, + "charOffset": 32549, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_PURPLE_TOP_75 = 23\nvoid IOWheel::slotPurpleTop75(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\n\tauto pointsInSlot = isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_PURPLE_TOP_75);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e248cb03a4050fad0516e58a2df3246d5c96a69b9356eaced728cfe1779e38e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 719, + "startColumn": 26, + "charOffset": 32759, + "charLength": 19, + "snippet": { + "text": "MITIGATION_INCREASE" + } + }, + "contextRegion": { + "startLine": 717, + "startColumn": 26, + "charOffset": 32550, + "charLength": 19, + "snippet": { + "text": "// SLOT_PURPLE_TOP_75 = 23\nvoid IOWheel::slotPurpleTop75(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\n\tauto pointsInSlot = isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_PURPLE_TOP_75);\n\tif (isKnight(vocationCipId)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2dcf6fd64f9af81c576ac854e97bedb630997e86dadb15bef342f404c89ba28b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 719, + "startColumn": 48, + "charOffset": 32781, + "charLength": 6, + "snippet": { + "text": "points" + } + }, + "contextRegion": { + "startLine": 717, + "startColumn": 48, + "charOffset": 32550, + "charLength": 6, + "snippet": { + "text": "// SLOT_PURPLE_TOP_75 = 23\nvoid IOWheel::slotPurpleTop75(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\n\tauto pointsInSlot = isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_PURPLE_TOP_75);\n\tif (isKnight(vocationCipId)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60b11eb70bfd8fb8838f108ea3ba8b18ba1f902612d713862ad976309c0cc5fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotPurpleTop100' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 737, + "startColumn": 71, + "charOffset": 33246, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 735, + "startColumn": 71, + "charOffset": 33147, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_PURPLE_TOP_100 = 24\nvoid IOWheel::slotPurpleTop100(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\taddSpell(player, bonusData, WheelSlots_t::SLOT_PURPLE_TOP_100, points, \"Groundshaker\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50a213e0f9aa86fe8c11cc0adb39490ee2328cd2af7326f98a1897e3d091df2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 740, + "startColumn": 31, + "charOffset": 33486, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 738, + "startColumn": 31, + "charOffset": 33334, + "charLength": 1, + "snippet": { + "text": "\tif (isKnight(vocationCipId)) {\n\t\taddSpell(player, bonusData, WheelSlots_t::SLOT_PURPLE_TOP_100, points, \"Groundshaker\");\n\t\tbonusData.stats.capacity += 5 * points;\n\t} else if (isPaladin(vocationCipId)) {\n\t\taddSpell(player, bonusData, WheelSlots_t::SLOT_PURPLE_TOP_100, points, \"Strong Ethereal Spear\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4478db2c9d2e50835a6d244f3f7c62215b7493525bd89f5908e3598073bb89ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotBlueTop150' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 755, + "startColumn": 69, + "charOffset": 34063, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 753, + "startColumn": 69, + "charOffset": 33968, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_BLUE_TOP_150 = 25\nvoid IOWheel::slotBlueTop150(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\tbonusData.stats.capacity += 5 * points;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "694de8cdb3cdd48ebb791163f060ee8d64302e192efb4fb17e68f83fcedced57" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 757, + "startColumn": 31, + "charOffset": 34213, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 755, + "startColumn": 31, + "charOffset": 33995, + "charLength": 1, + "snippet": { + "text": "void IOWheel::slotBlueTop150(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\tbonusData.stats.capacity += 5 * points;\n\t} else if (isPaladin(vocationCipId)) {\n\t\tbonusData.stats.capacity += 4 * points;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b547c34c8a91412ccecf253a863383a25742aa6832fdfdf93c04610d151ecfc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotBlueMiddle100' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 769, + "startColumn": 72, + "charOffset": 34601, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 767, + "startColumn": 72, + "charOffset": 34500, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_BLUE_MIDDLE_100 = 26\nvoid IOWheel::slotBlueMiddle100(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\n\tif (isKnight(vocationCipId)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c2a47b9957af8147da564958bbbc0d343550b2f444437c8b84c7466ce832a28f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 770, + "startColumn": 26, + "charOffset": 34714, + "charLength": 19, + "snippet": { + "text": "MITIGATION_INCREASE" + } + }, + "contextRegion": { + "startLine": 768, + "startColumn": 26, + "charOffset": 34501, + "charLength": 19, + "snippet": { + "text": "// SLOT_BLUE_MIDDLE_100 = 26\nvoid IOWheel::slotBlueMiddle100(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\n\tif (isKnight(vocationCipId)) {\n\t\taddSpell(player, bonusData, WheelSlots_t::SLOT_BLUE_MIDDLE_100, points, \"Chivalrous Challenge\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bbed67206a4e0df96b2504f06c4c1514ac2091e8945738943bcba32c4a6e93a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 770, + "startColumn": 48, + "charOffset": 34736, + "charLength": 6, + "snippet": { + "text": "points" + } + }, + "contextRegion": { + "startLine": 768, + "startColumn": 48, + "charOffset": 34501, + "charLength": 6, + "snippet": { + "text": "// SLOT_BLUE_MIDDLE_100 = 26\nvoid IOWheel::slotBlueMiddle100(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\n\tif (isKnight(vocationCipId)) {\n\t\taddSpell(player, bonusData, WheelSlots_t::SLOT_BLUE_MIDDLE_100, points, \"Chivalrous Challenge\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ecff5b40a95fc958a2206b8102d7428857bdbfed9fddb89f3642863181f0a81" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotBlueBottom75' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 785, + "startColumn": 71, + "charOffset": 35359, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 783, + "startColumn": 71, + "charOffset": 35260, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_BLUE_BOTTOM_75 = 27\nvoid IOWheel::slotBlueBottom75(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\tbonusData.stats.health += 3 * points;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55d357669bee32fdf4860372cad670cd30b5f19807287a03806754258a1d775b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 797, + "startColumn": 97, + "charOffset": 35890, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 795, + "startColumn": 97, + "charOffset": 35763, + "charLength": 1, + "snippet": { + "text": "\n// SLOT_PURPLE_BOTTOM_75 = 28\nvoid IOWheel::slotPurpleBottom75(const std::shared_ptr &player, uint16_t points, uint8_t, PlayerWheelMethodsBonusData &bonusData) const {\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\n\tif (isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_PURPLE_BOTTOM_75)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3bd7643bc8376d30da52b107d52945013b9541244a72fee686f1ee619150755" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 798, + "startColumn": 26, + "charOffset": 35965, + "charLength": 19, + "snippet": { + "text": "MITIGATION_INCREASE" + } + }, + "contextRegion": { + "startLine": 796, + "startColumn": 26, + "charOffset": 35764, + "charLength": 19, + "snippet": { + "text": "// SLOT_PURPLE_BOTTOM_75 = 28\nvoid IOWheel::slotPurpleBottom75(const std::shared_ptr &player, uint16_t points, uint8_t, PlayerWheelMethodsBonusData &bonusData) const {\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\n\tif (isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_PURPLE_BOTTOM_75)) {\n\t\tbonusData.leech.manaLeech += MANA_LEECH_INCREASE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f92e73abffee28b532745ae20b1c1a6217715699096448a209f146b47e04eb2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 798, + "startColumn": 48, + "charOffset": 35987, + "charLength": 6, + "snippet": { + "text": "points" + } + }, + "contextRegion": { + "startLine": 796, + "startColumn": 48, + "charOffset": 35764, + "charLength": 6, + "snippet": { + "text": "// SLOT_PURPLE_BOTTOM_75 = 28\nvoid IOWheel::slotPurpleBottom75(const std::shared_ptr &player, uint16_t points, uint8_t, PlayerWheelMethodsBonusData &bonusData) const {\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\n\tif (isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_PURPLE_BOTTOM_75)) {\n\t\tbonusData.leech.manaLeech += MANA_LEECH_INCREASE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0532015db408516fe22fc936c15ba8ea2b945d59defe726c01675ba78a24f49" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotPurpleMiddle100' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 805, + "startColumn": 74, + "charOffset": 36240, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 803, + "startColumn": 74, + "charOffset": 36135, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_PURPLE_MIDDLE_100 = 29\nvoid IOWheel::slotPurpleMiddle100(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\taddSpell(player, bonusData, WheelSlots_t::SLOT_PURPLE_MIDDLE_100, points, \"Intense Wound Cleansing\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dcff4e9502b82e4103a75e1d99e4ad9d66600f12e0998e8ee48302127aca1328" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 808, + "startColumn": 31, + "charOffset": 36494, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 806, + "startColumn": 31, + "charOffset": 36328, + "charLength": 1, + "snippet": { + "text": "\tif (isKnight(vocationCipId)) {\n\t\taddSpell(player, bonusData, WheelSlots_t::SLOT_PURPLE_MIDDLE_100, points, \"Intense Wound Cleansing\");\n\t\tbonusData.stats.capacity += 5 * points;\n\t} else if (isPaladin(vocationCipId)) {\n\t\taddSpell(player, bonusData, WheelSlots_t::SLOT_PURPLE_MIDDLE_100, points, \"Swift Foot\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1fa69fb2abbe565550cfa38ee44f7316d0d780a7efd380ac87dae810fa426716" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotPurpleTop150' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 823, + "startColumn": 71, + "charOffset": 37070, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 821, + "startColumn": 71, + "charOffset": 36971, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_PURPLE_TOP_150 = 30\nvoid IOWheel::slotPurpleTop150(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\tbonusData.stats.mana += 1 * points;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0700abce2da9c27bc06db38c6b7d599b7d18de7796b47818d320c44d0da592c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 829, + "startColumn": 27, + "charOffset": 37342, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 827, + "startColumn": 27, + "charOffset": 37268, + "charLength": 1, + "snippet": { + "text": "\t\tbonusData.stats.mana += 3 * points;\n\t} else {\n\t\tbonusData.stats.mana += 6 * points;\n\t}\n\taddVesselResonance(player, bonusData, WheelSlots_t::SLOT_PURPLE_TOP_150, WheelGemAffinity_t::Purple, points);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ce91afea97ed94a509c548df5892a7469fce175dd91ddeb37fdab92bbed977e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotBlue200' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 835, + "startColumn": 66, + "charOffset": 37558, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 833, + "startColumn": 66, + "charOffset": 37470, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_BLUE_200 = 31\nvoid IOWheel::slotBlue200(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\taddSpell(player, bonusData, WheelSlots_t::SLOT_BLUE_200, points, \"Fierce Berserk\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de5cea72679f363271ad6b2ce4a8763ef4ff5fa0ef77e42a76f4d42736a2546b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 851, + "startColumn": 27, + "charOffset": 38344, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 849, + "startColumn": 27, + "charOffset": 38274, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\t\tbonusData.stats.health += 1 * points;\n\t\tbonusData.stats.mana += 6 * points;\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77f8a5f686938fc45a1a4daad340bc593202dd28cf2121adce4ed160f53b2110" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotBlueBottom150' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 856, + "startColumn": 72, + "charOffset": 38462, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 854, + "startColumn": 72, + "charOffset": 38361, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_BLUE_BOTTOM_150 = 32\nvoid IOWheel::slotBlueBottom150(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\tbonusData.stats.capacity += 5 * points;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5beee1b3399b68b41f68bbaf541fb5272de0ea26b90edf62771077b9106ac7d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 858, + "startColumn": 31, + "charOffset": 38612, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 856, + "startColumn": 31, + "charOffset": 38391, + "charLength": 1, + "snippet": { + "text": "void IOWheel::slotBlueBottom150(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\tbonusData.stats.capacity += 5 * points;\n\t} else if (isPaladin(vocationCipId)) {\n\t\tbonusData.stats.capacity += 4 * points;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da8c42a01d907d3604d65d1f1d84c234570ce9947a66c8677050ef1fd4907809" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotBlueBottom100' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 868, + "startColumn": 72, + "charOffset": 38974, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 866, + "startColumn": 72, + "charOffset": 38873, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_BLUE_BOTTOM_100 = 33\nvoid IOWheel::slotBlueBottom100(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\n\tbool onSlot = isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_BLUE_BOTTOM_100);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "321ef68168e450d1e8223c45e9fa274a043d1e241efdc3dda0812722e3de1564" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 869, + "startColumn": 26, + "charOffset": 39087, + "charLength": 19, + "snippet": { + "text": "MITIGATION_INCREASE" + } + }, + "contextRegion": { + "startLine": 867, + "startColumn": 26, + "charOffset": 38874, + "charLength": 19, + "snippet": { + "text": "// SLOT_BLUE_BOTTOM_100 = 33\nvoid IOWheel::slotBlueBottom100(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\n\tbool onSlot = isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_BLUE_BOTTOM_100);\n\tif (isKnight(vocationCipId) && onSlot) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e6c1dab76165817700d65a8548e626f767717a1e479ebe4c77d1790ad3d39f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 869, + "startColumn": 48, + "charOffset": 39109, + "charLength": 6, + "snippet": { + "text": "points" + } + }, + "contextRegion": { + "startLine": 867, + "startColumn": 48, + "charOffset": 38874, + "charLength": 6, + "snippet": { + "text": "// SLOT_BLUE_BOTTOM_100 = 33\nvoid IOWheel::slotBlueBottom100(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\n\tbool onSlot = isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_BLUE_BOTTOM_100);\n\tif (isKnight(vocationCipId) && onSlot) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "105cc4799004c4e5cde9b3a6d68d2f4e38216baf44bfb1f3050e40abbe16f2cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 871, + "startColumn": 2, + "charOffset": 39208, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 869, + "startColumn": 2, + "charOffset": 39062, + "charLength": 2, + "snippet": { + "text": "\tbonusData.mitigation += MITIGATION_INCREASE * points;\n\tbool onSlot = isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_BLUE_BOTTOM_100);\n\tif (isKnight(vocationCipId) && onSlot) {\n\t\tbonusData.skills.melee += 1;\n\t} else if (isPaladin(vocationCipId) && onSlot) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34a7badd82f94f5a6efb4fea9b72c363d85eb35aa8c825b369814714f0394d0f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotPurpleBottom100' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 881, + "startColumn": 74, + "charOffset": 39584, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 879, + "startColumn": 74, + "charOffset": 39479, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_PURPLE_BOTTOM_100 = 34\nvoid IOWheel::slotPurpleBottom100(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\tbonusData.stats.capacity += 5 * points;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a178eb71b1195d76a68f095e9b2ec94630d1142629c919f4bee4ffa10c94378" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 883, + "startColumn": 31, + "charOffset": 39734, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 881, + "startColumn": 31, + "charOffset": 39511, + "charLength": 1, + "snippet": { + "text": "void IOWheel::slotPurpleBottom100(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\tbonusData.stats.capacity += 5 * points;\n\t} else if (isPaladin(vocationCipId)) {\n\t\tbonusData.stats.capacity += 4 * points;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d780b36b96b38e33f0ad319da72328ec6bbee0e0e5bb273ff0157615516fe3a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotPurpleBottom150' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 893, + "startColumn": 74, + "charOffset": 40104, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 891, + "startColumn": 74, + "charOffset": 39999, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_PURPLE_BOTTOM_150 = 35\nvoid IOWheel::slotPurpleBottom150(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tif (isKnight(vocationCipId)) {\n\t\tbonusData.stats.mana += 1 * points;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01a11afb5d44d17576157c2c60baa598ff6d9a5054288cdb3e36eec45404e7c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 899, + "startColumn": 27, + "charOffset": 40376, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 897, + "startColumn": 27, + "charOffset": 40302, + "charLength": 1, + "snippet": { + "text": "\t\tbonusData.stats.mana += 3 * points;\n\t} else {\n\t\tbonusData.stats.mana += 6 * points;\n\t}\n\tif (isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_PURPLE_BOTTOM_150)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c7a209b9edeb551e90fcbcd4157b627016a1cc6036dcd0179563469dc16459f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'slotPurple200' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 907, + "startColumn": 68, + "charOffset": 40626, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 905, + "startColumn": 68, + "charOffset": 40534, + "charLength": 8, + "snippet": { + "text": "\n// SLOT_PURPLE_200 = 36\nvoid IOWheel::slotPurple200(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\n\tbool isPointsAtSlot = isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_PURPLE_200);\n\tif (isKnight(vocationCipId)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efee3d5d0aa6d18ca093616c5a220196d1626ef74e73d514bd110bf0384f1dc4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_wheel.cpp", + "index": 3 + }, + "region": { + "startLine": 923, + "startColumn": 27, + "charOffset": 41256, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 921, + "startColumn": 27, + "charOffset": 41180, + "charLength": 1, + "snippet": { + "text": "\t} else {\n\t\tbonusData.stats.health += 1 * points;\n\t\tbonusData.stats.mana += 6 * points;\n\t\tif (isPointsAtSlot) {\n\t\t\tif (isSorcerer(vocationCipId)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da7eeaa8309b77051ac5ace42f959bf60ae9de5c88a34ce6aea28fa6cefddf97" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 19, + "startColumn": 1, + "charOffset": 592, + "charLength": 13, + "snippet": { + "text": "SoftSingleton" + } + }, + "contextRegion": { + "startLine": 17, + "startColumn": 1, + "charOffset": 556, + "charLength": 13, + "snippet": { + "text": "#include \"lib/metrics/metrics.hpp\"\n\nSoftSingleton IOBestiary::instanceTracker(\"IOBestiary\");\n\nbool IOBestiary::parseCharmCombat(const std::shared_ptr charm, std::shared_ptr player, std::shared_ptr target, int32_t realDamage, bool dueToPotion, bool checkArmor) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f78acbb5dc22cf5078e297d6ea0a53326d0fdc4af0216c346ad5d3688bfcc307" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'instanceTracker' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 19, + "startColumn": 27, + "charOffset": 618, + "charLength": 15, + "snippet": { + "text": "instanceTracker" + } + }, + "contextRegion": { + "startLine": 17, + "startColumn": 27, + "charOffset": 556, + "charLength": 15, + "snippet": { + "text": "#include \"lib/metrics/metrics.hpp\"\n\nSoftSingleton IOBestiary::instanceTracker(\"IOBestiary\");\n\nbool IOBestiary::parseCharmCombat(const std::shared_ptr charm, std::shared_ptr player, std::shared_ptr target, int32_t realDamage, bool dueToPotion, bool checkArmor) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf33dfa203e8fae185f5fba5e140236e2a16bacb454fdfb85f1095faad91a704" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'parseCharmCombat' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 21, + "startColumn": 18, + "charOffset": 667, + "charLength": 16, + "snippet": { + "text": "parseCharmCombat" + } + }, + "contextRegion": { + "startLine": 19, + "startColumn": 18, + "charOffset": 592, + "charLength": 16, + "snippet": { + "text": "SoftSingleton IOBestiary::instanceTracker(\"IOBestiary\");\n\nbool IOBestiary::parseCharmCombat(const std::shared_ptr charm, std::shared_ptr player, std::shared_ptr target, int32_t realDamage, bool dueToPotion, bool checkArmor) {\n\tif (!charm || !player || !target) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "874f144d975c24f891402edc1da8cf8e1a7f19124676823f2e97d1e2eb604cd4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'charm' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 21, + "startColumn": 64, + "charOffset": 713, + "charLength": 5, + "snippet": { + "text": "charm" + } + }, + "contextRegion": { + "startLine": 19, + "startColumn": 64, + "charOffset": 592, + "charLength": 5, + "snippet": { + "text": "SoftSingleton IOBestiary::instanceTracker(\"IOBestiary\");\n\nbool IOBestiary::parseCharmCombat(const std::shared_ptr charm, std::shared_ptr player, std::shared_ptr target, int32_t realDamage, bool dueToPotion, bool checkArmor) {\n\tif (!charm || !player || !target) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d727991a04261aecd5688bf7aad3b19c6e76e5d4f6a1d883b2ff099a3c84f2d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 21, + "startColumn": 95, + "charOffset": 744, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 19, + "startColumn": 95, + "charOffset": 592, + "charLength": 6, + "snippet": { + "text": "SoftSingleton IOBestiary::instanceTracker(\"IOBestiary\");\n\nbool IOBestiary::parseCharmCombat(const std::shared_ptr charm, std::shared_ptr player, std::shared_ptr target, int32_t realDamage, bool dueToPotion, bool checkArmor) {\n\tif (!charm || !player || !target) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64016d9506f01f874384169272ec8aa52d6a1d16c689b7c10743fce33ee734cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 21, + "startColumn": 129, + "charOffset": 778, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 19, + "startColumn": 129, + "charOffset": 592, + "charLength": 6, + "snippet": { + "text": "SoftSingleton IOBestiary::instanceTracker(\"IOBestiary\");\n\nbool IOBestiary::parseCharmCombat(const std::shared_ptr charm, std::shared_ptr player, std::shared_ptr target, int32_t realDamage, bool dueToPotion, bool checkArmor) {\n\tif (!charm || !player || !target) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a2c0f65f0457834f6e446d2905f45614753c6f31ada3e9a3c8d6e5ad49ca1b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 22, + "startColumn": 6, + "charOffset": 848, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 6, + "charOffset": 649, + "charLength": 1, + "snippet": { + "text": "\nbool IOBestiary::parseCharmCombat(const std::shared_ptr charm, std::shared_ptr player, std::shared_ptr target, int32_t realDamage, bool dueToPotion, bool checkArmor) {\n\tif (!charm || !player || !target) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56fbc2e9f88dc219a0069636d97ce4eb37e38e2d82fc71859e371039d213dde7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 22, + "startColumn": 16, + "charOffset": 858, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 16, + "charOffset": 649, + "charLength": 1, + "snippet": { + "text": "\nbool IOBestiary::parseCharmCombat(const std::shared_ptr charm, std::shared_ptr player, std::shared_ptr target, int32_t realDamage, bool dueToPotion, bool checkArmor) {\n\tif (!charm || !player || !target) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a023bbf6b9b21720788fc48c54077ce53284e419e98f3d8fa6cd971dd1e571a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 22, + "startColumn": 27, + "charOffset": 869, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 27, + "charOffset": 649, + "charLength": 1, + "snippet": { + "text": "\nbool IOBestiary::parseCharmCombat(const std::shared_ptr charm, std::shared_ptr player, std::shared_ptr target, int32_t realDamage, bool dueToPotion, bool checkArmor) {\n\tif (!charm || !player || !target) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47c8264484050b99a17c2a4a37a59ce8908573538db73f4947b43733af9323d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 29, + "startColumn": 113, + "charOffset": 1140, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 27, + "startColumn": 113, + "charOffset": 953, + "charLength": 5, + "snippet": { + "text": "\tif (charm->type == CHARM_OFFENSIVE) {\n\t\tif (charm->id == CHARM_CRIPPLE) {\n\t\t\tstd::shared_ptr cripple = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_PARALYZE, 10000, 0)->static_self_cast();\n\t\t\tcripple->setFormulaVars(-1, 0, -1, 0);\n\t\t\ttarget->addCondition(cripple);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbce53264a12ac526f8d50ea079aadd7e665b1d36ff1adaa84aac8e3dbcf989f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 30, + "startColumn": 28, + "charOffset": 1214, + "charLength": 1, + "snippet": { + "text": "-" + } + }, + "contextRegion": { + "startLine": 28, + "startColumn": 28, + "charOffset": 992, + "charLength": 1, + "snippet": { + "text": "\t\tif (charm->id == CHARM_CRIPPLE) {\n\t\t\tstd::shared_ptr cripple = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_PARALYZE, 10000, 0)->static_self_cast();\n\t\t\tcripple->setFormulaVars(-1, 0, -1, 0);\n\t\t\ttarget->addCondition(cripple);\n\t\t\tplayer->sendCancelMessage(charm->cancelMsg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78c674e28848dcaf9192169589ede34ae2e904a312a17b776a64c875df5c0c3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 30, + "startColumn": 32, + "charOffset": 1218, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 28, + "startColumn": 32, + "charOffset": 992, + "charLength": 1, + "snippet": { + "text": "\t\tif (charm->id == CHARM_CRIPPLE) {\n\t\t\tstd::shared_ptr cripple = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_PARALYZE, 10000, 0)->static_self_cast();\n\t\t\tcripple->setFormulaVars(-1, 0, -1, 0);\n\t\t\ttarget->addCondition(cripple);\n\t\t\tplayer->sendCancelMessage(charm->cancelMsg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7ecb51cef9c547ed7677cc38f28032ca3d90a0df73c53ac9040676ed22c7476" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 30, + "startColumn": 35, + "charOffset": 1221, + "charLength": 1, + "snippet": { + "text": "-" + } + }, + "contextRegion": { + "startLine": 28, + "startColumn": 35, + "charOffset": 992, + "charLength": 1, + "snippet": { + "text": "\t\tif (charm->id == CHARM_CRIPPLE) {\n\t\t\tstd::shared_ptr cripple = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_PARALYZE, 10000, 0)->static_self_cast();\n\t\t\tcripple->setFormulaVars(-1, 0, -1, 0);\n\t\t\ttarget->addCondition(cripple);\n\t\t\tplayer->sendCancelMessage(charm->cancelMsg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e5dda18ee1363182d78926facc0f39c724a72e37842ce2e0bd702561ec56bfd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 30, + "startColumn": 39, + "charOffset": 1225, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 28, + "startColumn": 39, + "charOffset": 992, + "charLength": 1, + "snippet": { + "text": "\t\tif (charm->id == CHARM_CRIPPLE) {\n\t\t\tstd::shared_ptr cripple = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_PARALYZE, 10000, 0)->static_self_cast();\n\t\t\tcripple->setFormulaVars(-1, 0, -1, 0);\n\t\t\ttarget->addCondition(cripple);\n\t\t\tplayer->sendCancelMessage(charm->cancelMsg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3a2687c6f1de366e46bad55deb2360444a32eb6da2533b2a0735d92d032856f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 31, + "startColumn": 12, + "charOffset": 1240, + "charLength": 12, + "snippet": { + "text": "addCondition" + } + }, + "contextRegion": { + "startLine": 29, + "startColumn": 12, + "charOffset": 1028, + "charLength": 12, + "snippet": { + "text": "\t\t\tstd::shared_ptr cripple = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_PARALYZE, 10000, 0)->static_self_cast();\n\t\t\tcripple->setFormulaVars(-1, 0, -1, 0);\n\t\t\ttarget->addCondition(cripple);\n\t\t\tplayer->sendCancelMessage(charm->cancelMsg);\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99df3324c855360aefe4399ab3f78a71b53cf823aefb4cbd171fa88fa2e11b0e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 37, + "startColumn": 66, + "charOffset": 1488, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 35, + "startColumn": 66, + "charOffset": 1332, + "charLength": 3, + "snippet": { + "text": "\t\tint32_t maxHealth = target->getMaxHealth();\n\t\tcharmDamage.primary.type = charm->dmgtype;\n\t\tcharmDamage.primary.value = ((-maxHealth * (charm->percent)) / 100);\n\t\tcharmDamage.extension = true;\n\t\tif (!charmDamage.exString.empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc93c6e53cb4ad96d4b0e819eec4198e9da00079b8a7bc3f55a1dcdc7e36f3c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 4, + "charOffset": 2495, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 4, + "charOffset": 2476, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CHARM_DODGE: {\n\t\t\t\tconst Position &targetPos = target->getPosition();\n\t\t\t\tplayer->sendCancelMessage(charm->cancelMsg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e32c1215f526d151d644170e88242663583a8f5ddc49d258e13ae6f1be7461e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 4, + "charOffset": 2699, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 4, + "charOffset": 2674, + "charLength": 4, + "snippet": { + "text": "\t\t\t\treturn true;\n\t\t\t}\n\t\t\tcase CHARM_ADRENALINE: {\n\t\t\t\tstd::shared_ptr adrenaline = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_HASTE, 10000, 0)->static_self_cast();\n\t\t\t\tadrenaline->setFormulaVars(2.5, 40, 2.5, 40);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db20007b5a7a62c06744a3db36599a737ca764089eaf1c47853596457d060315" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 73, + "startColumn": 114, + "charOffset": 2837, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 71, + "startColumn": 114, + "charOffset": 2691, + "charLength": 5, + "snippet": { + "text": "\t\t\t}\n\t\t\tcase CHARM_ADRENALINE: {\n\t\t\t\tstd::shared_ptr adrenaline = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_HASTE, 10000, 0)->static_self_cast();\n\t\t\t\tadrenaline->setFormulaVars(2.5, 40, 2.5, 40);\n\t\t\t\tplayer->addCondition(adrenaline);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "082abff88d72cc57997082e3834c8abb47bd588dfbff28d4206d08d04f4f3dab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 32, + "charOffset": 2915, + "charLength": 3, + "snippet": { + "text": "2.5" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 32, + "charOffset": 2696, + "charLength": 3, + "snippet": { + "text": "\t\t\tcase CHARM_ADRENALINE: {\n\t\t\t\tstd::shared_ptr adrenaline = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_HASTE, 10000, 0)->static_self_cast();\n\t\t\t\tadrenaline->setFormulaVars(2.5, 40, 2.5, 40);\n\t\t\t\tplayer->addCondition(adrenaline);\n\t\t\t\tplayer->sendCancelMessage(charm->cancelMsg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a8fdc9e101365b401148ab34767c9b012cad9142e5dcc5ebe76b09239676d9ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2.5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 32, + "charOffset": 2915, + "charLength": 3, + "snippet": { + "text": "2.5" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 32, + "charOffset": 2696, + "charLength": 3, + "snippet": { + "text": "\t\t\tcase CHARM_ADRENALINE: {\n\t\t\t\tstd::shared_ptr adrenaline = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_HASTE, 10000, 0)->static_self_cast();\n\t\t\t\tadrenaline->setFormulaVars(2.5, 40, 2.5, 40);\n\t\t\t\tplayer->addCondition(adrenaline);\n\t\t\t\tplayer->sendCancelMessage(charm->cancelMsg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ce4b62b10a0d5b2f55d90e4a3f2da6834cdd50ed9703235a4527e8a1f196762" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 37, + "charOffset": 2920, + "charLength": 2, + "snippet": { + "text": "40" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 37, + "charOffset": 2696, + "charLength": 2, + "snippet": { + "text": "\t\t\tcase CHARM_ADRENALINE: {\n\t\t\t\tstd::shared_ptr adrenaline = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_HASTE, 10000, 0)->static_self_cast();\n\t\t\t\tadrenaline->setFormulaVars(2.5, 40, 2.5, 40);\n\t\t\t\tplayer->addCondition(adrenaline);\n\t\t\t\tplayer->sendCancelMessage(charm->cancelMsg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b788735fff69d6363d6f05b75f1a371027f2f5764fe40cf87fd8c1518a6cacf0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 37, + "charOffset": 2920, + "charLength": 2, + "snippet": { + "text": "40" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 37, + "charOffset": 2696, + "charLength": 2, + "snippet": { + "text": "\t\t\tcase CHARM_ADRENALINE: {\n\t\t\t\tstd::shared_ptr adrenaline = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_HASTE, 10000, 0)->static_self_cast();\n\t\t\t\tadrenaline->setFormulaVars(2.5, 40, 2.5, 40);\n\t\t\t\tplayer->addCondition(adrenaline);\n\t\t\t\tplayer->sendCancelMessage(charm->cancelMsg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "045e958ff99308a927bf2d57238713d9271d1542543809d22f5f2eb8988ef5fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 41, + "charOffset": 2924, + "charLength": 3, + "snippet": { + "text": "2.5" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 41, + "charOffset": 2696, + "charLength": 3, + "snippet": { + "text": "\t\t\tcase CHARM_ADRENALINE: {\n\t\t\t\tstd::shared_ptr adrenaline = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_HASTE, 10000, 0)->static_self_cast();\n\t\t\t\tadrenaline->setFormulaVars(2.5, 40, 2.5, 40);\n\t\t\t\tplayer->addCondition(adrenaline);\n\t\t\t\tplayer->sendCancelMessage(charm->cancelMsg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16782c00fc3997314e4efb5a7326afba83a0b3727bea4324133e364dc5b9498c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2.5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 41, + "charOffset": 2924, + "charLength": 3, + "snippet": { + "text": "2.5" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 41, + "charOffset": 2696, + "charLength": 3, + "snippet": { + "text": "\t\t\tcase CHARM_ADRENALINE: {\n\t\t\t\tstd::shared_ptr adrenaline = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_HASTE, 10000, 0)->static_self_cast();\n\t\t\t\tadrenaline->setFormulaVars(2.5, 40, 2.5, 40);\n\t\t\t\tplayer->addCondition(adrenaline);\n\t\t\t\tplayer->sendCancelMessage(charm->cancelMsg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7ab62164dc0a63d7ea4d05759c3fbff8bac8b9338083115e60f4dfea4298ab4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 46, + "charOffset": 2929, + "charLength": 2, + "snippet": { + "text": "40" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 46, + "charOffset": 2696, + "charLength": 2, + "snippet": { + "text": "\t\t\tcase CHARM_ADRENALINE: {\n\t\t\t\tstd::shared_ptr adrenaline = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_HASTE, 10000, 0)->static_self_cast();\n\t\t\t\tadrenaline->setFormulaVars(2.5, 40, 2.5, 40);\n\t\t\t\tplayer->addCondition(adrenaline);\n\t\t\t\tplayer->sendCancelMessage(charm->cancelMsg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2962b79deaea8dc3139525aa2a46c83c2cbe6c3f908ece8fff58043a292a8fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 46, + "charOffset": 2929, + "charLength": 2, + "snippet": { + "text": "40" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 46, + "charOffset": 2696, + "charLength": 2, + "snippet": { + "text": "\t\t\tcase CHARM_ADRENALINE: {\n\t\t\t\tstd::shared_ptr adrenaline = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_HASTE, 10000, 0)->static_self_cast();\n\t\t\t\tadrenaline->setFormulaVars(2.5, 40, 2.5, 40);\n\t\t\t\tplayer->addCondition(adrenaline);\n\t\t\t\tplayer->sendCancelMessage(charm->cancelMsg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9413e946d31176e89c0f132af0207dd930b973e46f5170865948a614247395be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 75, + "startColumn": 13, + "charOffset": 2946, + "charLength": 12, + "snippet": { + "text": "addCondition" + } + }, + "contextRegion": { + "startLine": 73, + "startColumn": 13, + "charOffset": 2724, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tstd::shared_ptr adrenaline = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_HASTE, 10000, 0)->static_self_cast();\n\t\t\t\tadrenaline->setFormulaVars(2.5, 40, 2.5, 40);\n\t\t\t\tplayer->addCondition(adrenaline);\n\t\t\t\tplayer->sendCancelMessage(charm->cancelMsg);\n\t\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31edd883108ed605967fa83df0bef3c3a9cfb7b9b99049e1243a7bc608b57bef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 79, + "startColumn": 4, + "charOffset": 3047, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 77, + "startColumn": 4, + "charOffset": 3021, + "charLength": 4, + "snippet": { + "text": "\t\t\t\treturn false;\n\t\t\t}\n\t\t\tcase CHARM_NUMB: {\n\t\t\t\tstd::shared_ptr numb = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_PARALYZE, 10000, 0)->static_self_cast();\n\t\t\t\tnumb->setFormulaVars(-1, 0, -1, 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e39a263cbaa44fb5181cca89905b16cf3f2939bdf0fb0269219a2869fcd669c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 80, + "startColumn": 111, + "charOffset": 3176, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 78, + "startColumn": 111, + "charOffset": 3039, + "charLength": 5, + "snippet": { + "text": "\t\t\t}\n\t\t\tcase CHARM_NUMB: {\n\t\t\t\tstd::shared_ptr numb = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_PARALYZE, 10000, 0)->static_self_cast();\n\t\t\t\tnumb->setFormulaVars(-1, 0, -1, 0);\n\t\t\t\ttarget->addCondition(numb);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "072931434622da833c3cac041093ab0bf17091450d0ca7ccd830f210f8cc4e64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 81, + "startColumn": 26, + "charOffset": 3248, + "charLength": 1, + "snippet": { + "text": "-" + } + }, + "contextRegion": { + "startLine": 79, + "startColumn": 26, + "charOffset": 3044, + "charLength": 1, + "snippet": { + "text": "\t\t\tcase CHARM_NUMB: {\n\t\t\t\tstd::shared_ptr numb = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_PARALYZE, 10000, 0)->static_self_cast();\n\t\t\t\tnumb->setFormulaVars(-1, 0, -1, 0);\n\t\t\t\ttarget->addCondition(numb);\n\t\t\t\tplayer->sendCancelMessage(charm->cancelMsg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e43c476277b48020fa1b22cba271111c792f167279cac5d251cfc9e76d028664" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 81, + "startColumn": 30, + "charOffset": 3252, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 79, + "startColumn": 30, + "charOffset": 3044, + "charLength": 1, + "snippet": { + "text": "\t\t\tcase CHARM_NUMB: {\n\t\t\t\tstd::shared_ptr numb = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_PARALYZE, 10000, 0)->static_self_cast();\n\t\t\t\tnumb->setFormulaVars(-1, 0, -1, 0);\n\t\t\t\ttarget->addCondition(numb);\n\t\t\t\tplayer->sendCancelMessage(charm->cancelMsg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae0db82958a550f8535ba6f92ec63b899a35110d6ef0824872d0db2eca39feb6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 81, + "startColumn": 33, + "charOffset": 3255, + "charLength": 1, + "snippet": { + "text": "-" + } + }, + "contextRegion": { + "startLine": 79, + "startColumn": 33, + "charOffset": 3044, + "charLength": 1, + "snippet": { + "text": "\t\t\tcase CHARM_NUMB: {\n\t\t\t\tstd::shared_ptr numb = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_PARALYZE, 10000, 0)->static_self_cast();\n\t\t\t\tnumb->setFormulaVars(-1, 0, -1, 0);\n\t\t\t\ttarget->addCondition(numb);\n\t\t\t\tplayer->sendCancelMessage(charm->cancelMsg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c13ad1490b348e8bdc72cd9475c2668817d6368a209c2ca731b7398b6f29e6a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 81, + "startColumn": 37, + "charOffset": 3259, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 79, + "startColumn": 37, + "charOffset": 3044, + "charLength": 1, + "snippet": { + "text": "\t\t\tcase CHARM_NUMB: {\n\t\t\t\tstd::shared_ptr numb = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_PARALYZE, 10000, 0)->static_self_cast();\n\t\t\t\tnumb->setFormulaVars(-1, 0, -1, 0);\n\t\t\t\ttarget->addCondition(numb);\n\t\t\t\tplayer->sendCancelMessage(charm->cancelMsg);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f6b8a2931e03983c4369b7546ef71bca454acfebb8880f959334dc62a9cd06a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 82, + "startColumn": 13, + "charOffset": 3275, + "charLength": 12, + "snippet": { + "text": "addCondition" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 13, + "charOffset": 3066, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tstd::shared_ptr numb = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_PARALYZE, 10000, 0)->static_self_cast();\n\t\t\t\tnumb->setFormulaVars(-1, 0, -1, 0);\n\t\t\t\ttarget->addCondition(numb);\n\t\t\t\tplayer->sendCancelMessage(charm->cancelMsg);\n\t\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1c5c16cc4670b11b4a521f384ffab58ba9714c41bb70968086fa048c9530951" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 4, + "charOffset": 3371, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 4, + "charOffset": 3362, + "charLength": 7, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f638c7ce76c1a454ed466f4fc1c45effd9ec28ce235e72c7ef627bccad44b522" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getBestiaryCharm' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 36, + "charOffset": 3598, + "charLength": 16, + "snippet": { + "text": "getBestiaryCharm" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 36, + "charOffset": 3560, + "charLength": 16, + "snippet": { + "text": "}\n\nstd::shared_ptr IOBestiary::getBestiaryCharm(charmRune_t activeCharm, bool force /*= false*/) const {\n\tconst auto charmInternal = g_game().getCharmList();\n\tfor (const auto &tmpCharm : charmInternal) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "805558829e5e15b0d202c4383deca8ee55fedf8fd72ae46217133ea7d532375c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 100, + "startColumn": 2, + "charOffset": 3726, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 98, + "startColumn": 2, + "charOffset": 3563, + "charLength": 3, + "snippet": { + "text": "std::shared_ptr IOBestiary::getBestiaryCharm(charmRune_t activeCharm, bool force /*= false*/) const {\n\tconst auto charmInternal = g_game().getCharmList();\n\tfor (const auto &tmpCharm : charmInternal) {\n\t\tif (tmpCharm->id == activeCharm) {\n\t\t\treturn tmpCharm;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b24487c11b0176e7d59c4ae773f1d7e6ef12508ea2bcbcf9c11d05a29f4dc423" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 109, + "startColumn": 19, + "charOffset": 3937, + "charLength": 1, + "snippet": { + "text": "1" + } + }, + "contextRegion": { + "startLine": 107, + "startColumn": 19, + "charOffset": 3850, + "charLength": 1, + "snippet": { + "text": "\t\tauto charm = std::make_shared();\n\t\tcharm->id = activeCharm;\n\t\tcharm->binary = 1 << activeCharm;\n\t\tg_game().addCharmRune(charm);\n\t\treturn charm;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1696137ab7b35ebb57e8b4320e24433abba1c28fad5afa8c7b8afd54225a9c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 109, + "startColumn": 21, + "charOffset": 3939, + "charLength": 2, + "snippet": { + "text": "<<" + } + }, + "contextRegion": { + "startLine": 107, + "startColumn": 21, + "charOffset": 3850, + "charLength": 2, + "snippet": { + "text": "\t\tauto charm = std::make_shared();\n\t\tcharm->id = activeCharm;\n\t\tcharm->binary = 1 << activeCharm;\n\t\tg_game().addCharmRune(charm);\n\t\treturn charm;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8fb1ffb29e1b4b80ffe3018a1944f3be50aeba8ed5a5b5b63f84c81796e3bf5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'findRaceByName' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 117, + "startColumn": 45, + "charOffset": 4071, + "charLength": 14, + "snippet": { + "text": "findRaceByName" + } + }, + "contextRegion": { + "startLine": 115, + "startColumn": 45, + "charOffset": 4024, + "charLength": 14, + "snippet": { + "text": "}\n\nstd::map IOBestiary::findRaceByName(const std::string &race, bool Onlystring /*= true*/, BestiaryType_t raceNumber /*= BESTY_RACE_NONE*/) const {\n\tstd::map best_list = g_game().getBestiaryList();\n\tstd::map race_list;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c026df2e0c078c8cc54c17e0bcdc10cbe42af7ef99d9007d21917ed11134c736" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 122, + "startColumn": 3, + "charOffset": 4335, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 120, + "startColumn": 3, + "charOffset": 4313, + "charLength": 3, + "snippet": { + "text": "\n\tif (Onlystring) {\n\t\tfor (const auto &it : best_list) {\n\t\t\tconst auto tmpType = g_monsters().getMonsterType(it.second);\n\t\t\tif (tmpType && tmpType->info.bestiaryClass == race) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf86809da87bf3c26b831a050fb67820b4e0006b8856ecacfdb4b7759c77c67f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 125, + "startColumn": 15, + "charOffset": 4505, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 123, + "startColumn": 15, + "charOffset": 4370, + "charLength": 6, + "snippet": { + "text": "\t\t\tconst auto tmpType = g_monsters().getMonsterType(it.second);\n\t\t\tif (tmpType && tmpType->info.bestiaryClass == race) {\n\t\t\t\trace_list.insert({ it.first, it.second });\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d518984a3bc0bc66b474a72584fe1595428812b16f4979950cf8b54126e60a9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 129, + "startColumn": 3, + "charOffset": 4559, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 127, + "startColumn": 3, + "charOffset": 4543, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\tfor (const auto &itn : best_list) {\n\t\t\tconst auto tmpType = g_monsters().getMonsterType(itn.second);\n\t\t\tif (tmpType && tmpType->info.bestiaryRace == raceNumber) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5545b3875d4f76bb1e38774140edabfdc0e7baf416cd338f428122a4aacab678" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 132, + "startColumn": 15, + "charOffset": 4736, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 130, + "startColumn": 15, + "charOffset": 4595, + "charLength": 6, + "snippet": { + "text": "\t\t\tconst auto tmpType = g_monsters().getMonsterType(itn.second);\n\t\t\tif (tmpType && tmpType->info.bestiaryRace == raceNumber) {\n\t\t\t\trace_list.insert({ itn.first, itn.second });\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75a22b2b5c91235dcc37f7f7b1530cb6976ce03775d2c7019205d5a8eabd78b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getKillStatus' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 139, + "startColumn": 21, + "charOffset": 4825, + "charLength": 13, + "snippet": { + "text": "getKillStatus" + } + }, + "contextRegion": { + "startLine": 137, + "startColumn": 21, + "charOffset": 4802, + "charLength": 13, + "snippet": { + "text": "}\n\nuint8_t IOBestiary::getKillStatus(const std::shared_ptr mtype, uint32_t killAmount) const {\n\tif (killAmount < mtype->info.bestiaryFirstUnlock) {\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e372a416d32cd12ba231bef8b60dd4d71dedc59aa717198a95e04ec34036b185" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'mtype' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 139, + "startColumn": 70, + "charOffset": 4874, + "charLength": 5, + "snippet": { + "text": "mtype" + } + }, + "contextRegion": { + "startLine": 137, + "startColumn": 70, + "charOffset": 4802, + "charLength": 5, + "snippet": { + "text": "}\n\nuint8_t IOBestiary::getKillStatus(const std::shared_ptr mtype, uint32_t killAmount) const {\n\tif (killAmount < mtype->info.bestiaryFirstUnlock) {\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7e47287e6b7c3580e61099a75d1da9fef13d4863abcb1fd8370f51a55c26352" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 140, + "startColumn": 2, + "charOffset": 4911, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 138, + "startColumn": 2, + "charOffset": 4804, + "charLength": 2, + "snippet": { + "text": "\nuint8_t IOBestiary::getKillStatus(const std::shared_ptr mtype, uint32_t killAmount) const {\n\tif (killAmount < mtype->info.bestiaryFirstUnlock) {\n\t\treturn 1;\n\t} else if (killAmount < mtype->info.bestiarySecondUnlock) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e354e4ecc208dd0ebff82a8f7e3b540d0ec57e1d7ab21ecf2e8bf25cfb58c5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 142, + "startColumn": 4, + "charOffset": 4978, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 140, + "startColumn": 4, + "charOffset": 4910, + "charLength": 4, + "snippet": { + "text": "\tif (killAmount < mtype->info.bestiaryFirstUnlock) {\n\t\treturn 1;\n\t} else if (killAmount < mtype->info.bestiarySecondUnlock) {\n\t\treturn 2;\n\t} else if (killAmount < mtype->info.bestiaryToUnlock) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b4fbcbc3ca62e645df56371b80299d8637ef45aa2bb079f3ddd5e33f215e25d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-make-member-function-const", + "ruleIndex": 708, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'resetCharmRuneCreature' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 150, + "startColumn": 18, + "charOffset": 5151, + "charLength": 22, + "snippet": { + "text": "resetCharmRuneCreature" + } + }, + "contextRegion": { + "startLine": 148, + "startColumn": 18, + "charOffset": 5131, + "charLength": 22, + "snippet": { + "text": "}\n\nvoid IOBestiary::resetCharmRuneCreature(std::shared_ptr player, const std::shared_ptr charm) {\n\tif (!player || !charm) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8515ee6ae98ca363b82ecc880734f90660331238904e0789d8bfe0d00d70a990" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 150, + "startColumn": 65, + "charOffset": 5198, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 148, + "startColumn": 65, + "charOffset": 5131, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOBestiary::resetCharmRuneCreature(std::shared_ptr player, const std::shared_ptr charm) {\n\tif (!player || !charm) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f779e03ccc7020d538d29fffe79fb228b44dc3b9dbb70689aadc7e2b0227df49" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'charm' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 150, + "startColumn": 102, + "charOffset": 5235, + "charLength": 5, + "snippet": { + "text": "charm" + } + }, + "contextRegion": { + "startLine": 148, + "startColumn": 102, + "charOffset": 5131, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid IOBestiary::resetCharmRuneCreature(std::shared_ptr player, const std::shared_ptr charm) {\n\tif (!player || !charm) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e0e758caf6128a31aa2d04c82c4371edb8fc8b3972ce294e806a49206e92bf8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 151, + "startColumn": 6, + "charOffset": 5249, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 149, + "startColumn": 6, + "charOffset": 5133, + "charLength": 1, + "snippet": { + "text": "\nvoid IOBestiary::resetCharmRuneCreature(std::shared_ptr player, const std::shared_ptr charm) {\n\tif (!player || !charm) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "932ac70fb8fcea48742f391aa2cface32f698293e6253c5639c4757cf0fed195" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 151, + "startColumn": 17, + "charOffset": 5260, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 149, + "startColumn": 17, + "charOffset": 5133, + "charLength": 1, + "snippet": { + "text": "\nvoid IOBestiary::resetCharmRuneCreature(std::shared_ptr player, const std::shared_ptr charm) {\n\tif (!player || !charm) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "adf4b32066e3c7eb13dfb4f0ddf2344d47d3c31672b7fecb980f9a58e8382c59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 10, + "charOffset": 5395, + "charLength": 16, + "snippet": { + "text": "parseRacebyCharm" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 10, + "charOffset": 5284, + "charLength": 16, + "snippet": { + "text": "\tint32_t value = bitToggle(player->getUsedRunesBit(), charm, false);\n\tplayer->setUsedRunesBit(value);\n\tplayer->parseRacebyCharm(charm->id, true, 0);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c81b1f098e46a9415d2e759110f8441106753a3beeebc0405ef9bc055f5ff125" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-make-member-function-const", + "ruleIndex": 708, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'setCharmRuneCreature' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 160, + "startColumn": 18, + "charOffset": 5453, + "charLength": 20, + "snippet": { + "text": "setCharmRuneCreature" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 18, + "charOffset": 5433, + "charLength": 20, + "snippet": { + "text": "}\n\nvoid IOBestiary::setCharmRuneCreature(std::shared_ptr player, const std::shared_ptr charm, uint16_t raceid) {\n\tif (!player || !charm) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a316e32a5343df8e5ae629d84c85f86a792f1e4a81408f6edfffc8f1f5b2eff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 160, + "startColumn": 63, + "charOffset": 5498, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 63, + "charOffset": 5433, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOBestiary::setCharmRuneCreature(std::shared_ptr player, const std::shared_ptr charm, uint16_t raceid) {\n\tif (!player || !charm) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3be8e6267f9f8533c8e8cc25defbb0ccd540d8fddc4d9a40c198329100e32cf3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'charm' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 160, + "startColumn": 100, + "charOffset": 5535, + "charLength": 5, + "snippet": { + "text": "charm" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 100, + "charOffset": 5433, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid IOBestiary::setCharmRuneCreature(std::shared_ptr player, const std::shared_ptr charm, uint16_t raceid) {\n\tif (!player || !charm) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bdbf0800a7ea3fc225997d22ae69b20a1674b3b1f5360ecb822c4314177314b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 161, + "startColumn": 6, + "charOffset": 5566, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 159, + "startColumn": 6, + "charOffset": 5435, + "charLength": 1, + "snippet": { + "text": "\nvoid IOBestiary::setCharmRuneCreature(std::shared_ptr player, const std::shared_ptr charm, uint16_t raceid) {\n\tif (!player || !charm) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ea33841eee7baf4d30bd5c55a6091cad89227dc8e68b9a0dab32464b702ef62" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 161, + "startColumn": 17, + "charOffset": 5577, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 159, + "startColumn": 17, + "charOffset": 5435, + "charLength": 1, + "snippet": { + "text": "\nvoid IOBestiary::setCharmRuneCreature(std::shared_ptr player, const std::shared_ptr charm, uint16_t raceid) {\n\tif (!player || !charm) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6451ccf93484b3ec58ecee733ecbf39482ca7bce6d0bbb594b138a0a520b7bc9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 165, + "startColumn": 10, + "charOffset": 5610, + "charLength": 16, + "snippet": { + "text": "parseRacebyCharm" + } + }, + "contextRegion": { + "startLine": 163, + "startColumn": 10, + "charOffset": 5597, + "charLength": 16, + "snippet": { + "text": "\t}\n\n\tplayer->parseRacebyCharm(charm->id, true, raceid);\n\tint32_t Toggle = bitToggle(player->getUsedRunesBit(), charm, true);\n\tplayer->setUsedRunesBit(Toggle);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ffd682373055348487c6804af9157dd108ebd803b651485ad0ca59b853d12ea1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getCharmUsedRuneBitAll' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 170, + "startColumn": 36, + "charOffset": 5794, + "charLength": 22, + "snippet": { + "text": "getCharmUsedRuneBitAll" + } + }, + "contextRegion": { + "startLine": 168, + "startColumn": 36, + "charOffset": 5756, + "charLength": 22, + "snippet": { + "text": "}\n\nstd::list IOBestiary::getCharmUsedRuneBitAll(std::shared_ptr player) {\n\tint32_t input = player->getUsedRunesBit();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "820f8bdab76f0a267e55696475fb2cd38f498638f8e588676b08fef8edbb7596" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 170, + "startColumn": 83, + "charOffset": 5841, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 168, + "startColumn": 83, + "charOffset": 5756, + "charLength": 6, + "snippet": { + "text": "}\n\nstd::list IOBestiary::getCharmUsedRuneBitAll(std::shared_ptr player) {\n\tint32_t input = player->getUsedRunesBit();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a61f9c1791fb696bf8a5f505b0f010b169562ebe66f15e28483fb76f0e6ef1a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 175, + "startColumn": 2, + "charOffset": 5941, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 173, + "startColumn": 2, + "charOffset": 5896, + "charLength": 5, + "snippet": { + "text": "\tint8_t i = 0;\n\tstd::list rtn;\n\twhile (input != 0) {\n\t\tif ((input & 1) == 1) {\n\t\t\tcharmRune_t tmpcharm = static_cast(i);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "864ecf562ccb762177e4d768941660cfffc8fa29d5f7da838f6b1abced46de49" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'input' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 175, + "startColumn": 9, + "charOffset": 5948, + "charLength": 5, + "snippet": { + "text": "input" + } + }, + "contextRegion": { + "startLine": 173, + "startColumn": 9, + "charOffset": 5896, + "charLength": 5, + "snippet": { + "text": "\tint8_t i = 0;\n\tstd::list rtn;\n\twhile (input != 0) {\n\t\tif ((input & 1) == 1) {\n\t\t\tcharmRune_t tmpcharm = static_cast(i);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26cacf778602ba1452e5a96e28d90fbf5f7631cc4f2cf1c2c0bfaeb5fca06f28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 176, + "startColumn": 8, + "charOffset": 5969, + "charLength": 5, + "snippet": { + "text": "input" + } + }, + "contextRegion": { + "startLine": 174, + "startColumn": 8, + "charOffset": 5911, + "charLength": 5, + "snippet": { + "text": "\tstd::list rtn;\n\twhile (input != 0) {\n\t\tif ((input & 1) == 1) {\n\t\t\tcharmRune_t tmpcharm = static_cast(i);\n\t\t\trtn.push_front(tmpcharm);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5fede44884275b434a9cdb7e0cc2096dde85b9afdedc28c1778b57befd203b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 177, + "startColumn": 4, + "charOffset": 5991, + "charLength": 11, + "snippet": { + "text": "charmRune_t" + } + }, + "contextRegion": { + "startLine": 175, + "startColumn": 4, + "charOffset": 5940, + "charLength": 11, + "snippet": { + "text": "\twhile (input != 0) {\n\t\tif ((input & 1) == 1) {\n\t\t\tcharmRune_t tmpcharm = static_cast(i);\n\t\t\trtn.push_front(tmpcharm);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7fb3d981ff96dafb62823e5db1bb5dda8e70f81caba4e0d1e864977982088955" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 180, + "startColumn": 11, + "charOffset": 6086, + "charLength": 5, + "snippet": { + "text": "input" + } + }, + "contextRegion": { + "startLine": 178, + "startColumn": 11, + "charOffset": 6043, + "charLength": 5, + "snippet": { + "text": "\t\t\trtn.push_front(tmpcharm);\n\t\t}\n\t\tinput = input >> 1;\n\t\ti += 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dceedd46e236bba436b757528840049858adde4ad6a2a83dc5ebe18b605b2a31" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getBestiaryRaceUnlocked' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 186, + "startColumn": 22, + "charOffset": 6148, + "charLength": 23, + "snippet": { + "text": "getBestiaryRaceUnlocked" + } + }, + "contextRegion": { + "startLine": 184, + "startColumn": 22, + "charOffset": 6124, + "charLength": 23, + "snippet": { + "text": "}\n\nuint16_t IOBestiary::getBestiaryRaceUnlocked(std::shared_ptr player, BestiaryType_t race) const {\n\tif (!player) {\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "496d427a100b8a4b9fa39b142e7db632e9dbc33ee130b361fc1db002c49d41d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 186, + "startColumn": 70, + "charOffset": 6196, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 184, + "startColumn": 70, + "charOffset": 6124, + "charLength": 6, + "snippet": { + "text": "}\n\nuint16_t IOBestiary::getBestiaryRaceUnlocked(std::shared_ptr player, BestiaryType_t race) const {\n\tif (!player) {\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2fa3b51dfbf244dc414c4a6e9b5204bc2dc8b8253ae71d75d3a48ac1394c722e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 187, + "startColumn": 6, + "charOffset": 6238, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 185, + "startColumn": 6, + "charOffset": 6126, + "charLength": 1, + "snippet": { + "text": "\nuint16_t IOBestiary::getBestiaryRaceUnlocked(std::shared_ptr player, BestiaryType_t race) const {\n\tif (!player) {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fce2652b9a51f51e9bc769a7abbe08a131a1f0e34f7f063e382a1d98910ce21c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 194, + "startColumn": 2, + "charOffset": 6359, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 192, + "startColumn": 2, + "charOffset": 6286, + "charLength": 3, + "snippet": { + "text": "\tstd::map besty_l = g_game().getBestiaryList();\n\n\tfor (const auto &it : besty_l) {\n\t\tconst auto mtype = g_monsters().getMonsterType(it.second);\n\t\tif (mtype && mtype->info.bestiaryRace == race && player->getBestiaryKillCount(mtype->info.raceid) > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e75067f1e213a85e6f4a68e35b3dc044d3cb3778bb800d14181b4df85bbfbfe8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'addCharmPoints' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 203, + "startColumn": 18, + "charOffset": 6614, + "charLength": 14, + "snippet": { + "text": "addCharmPoints" + } + }, + "contextRegion": { + "startLine": 201, + "startColumn": 18, + "charOffset": 6594, + "charLength": 14, + "snippet": { + "text": "}\n\nvoid IOBestiary::addCharmPoints(std::shared_ptr player, uint16_t amount, bool negative /*= false*/) {\n\tif (!player) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c5b43e98314f76becfb7c8c6d8289fd43ae59ad33c33429322d1928c59d9ac8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 203, + "startColumn": 57, + "charOffset": 6653, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 201, + "startColumn": 57, + "charOffset": 6594, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOBestiary::addCharmPoints(std::shared_ptr player, uint16_t amount, bool negative /*= false*/) {\n\tif (!player) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39a25ee074aae406a32ed88004d6f3e685b1e0a768420e191b47067989626d27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 204, + "startColumn": 6, + "charOffset": 6712, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 202, + "startColumn": 6, + "charOffset": 6596, + "charLength": 1, + "snippet": { + "text": "\nvoid IOBestiary::addCharmPoints(std::shared_ptr player, uint16_t amount, bool negative /*= false*/) {\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0194e3945fb70e6d8d203b98106d45fe72f774e86bf8d027bb0f956ec27685c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 217, + "startColumn": 58, + "charOffset": 6953, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 215, + "startColumn": 58, + "charOffset": 6893, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOBestiary::addBestiaryKill(std::shared_ptr player, const std::shared_ptr mtype, uint32_t amount /*= 1*/) {\n\tuint16_t raceid = mtype->info.raceid;\n\tif (raceid == 0 || !player || !mtype) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30a422dc28b5bbada303c4141424dffbd39b1a300e14df1807f1ff78b0ee5ba4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'mtype' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 217, + "startColumn": 101, + "charOffset": 6996, + "charLength": 5, + "snippet": { + "text": "mtype" + } + }, + "contextRegion": { + "startLine": 215, + "startColumn": 101, + "charOffset": 6893, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid IOBestiary::addBestiaryKill(std::shared_ptr player, const std::shared_ptr mtype, uint32_t amount /*= 1*/) {\n\tuint16_t raceid = mtype->info.raceid;\n\tif (raceid == 0 || !player || !mtype) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da21b852367f5046b439755799127176b302981385fbba661193641bf5549772" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 219, + "startColumn": 21, + "charOffset": 7089, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 217, + "startColumn": 21, + "charOffset": 6896, + "charLength": 1, + "snippet": { + "text": "void IOBestiary::addBestiaryKill(std::shared_ptr player, const std::shared_ptr mtype, uint32_t amount /*= 1*/) {\n\tuint16_t raceid = mtype->info.raceid;\n\tif (raceid == 0 || !player || !mtype) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2770eed18e3c2eccd7d255ec916e0cc48854f5b4855de6e9767c50ce3ac1c87c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 219, + "startColumn": 32, + "charOffset": 7100, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 217, + "startColumn": 32, + "charOffset": 6896, + "charLength": 1, + "snippet": { + "text": "void IOBestiary::addBestiaryKill(std::shared_ptr player, const std::shared_ptr mtype, uint32_t amount /*= 1*/) {\n\tuint16_t raceid = mtype->info.raceid;\n\tif (raceid == 0 || !player || !mtype) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b51d8d61610110778e05771a9385e86df06636d1c46759aabe8e01d2e0d54f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 244, + "startColumn": 68, + "charOffset": 8158, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 68, + "charOffset": 8088, + "charLength": 6, + "snippet": { + "text": "}\n\ncharmRune_t IOBestiary::getCharmFromTarget(std::shared_ptr player, const std::shared_ptr mtype) {\n\tif (!player || !mtype) {\n\t\treturn CHARM_NONE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "615f72b44a96f7af910da898829cca708eebf775ca65afc894b971842cc75654" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'mtype' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 244, + "startColumn": 111, + "charOffset": 8201, + "charLength": 5, + "snippet": { + "text": "mtype" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 111, + "charOffset": 8088, + "charLength": 5, + "snippet": { + "text": "}\n\ncharmRune_t IOBestiary::getCharmFromTarget(std::shared_ptr player, const std::shared_ptr mtype) {\n\tif (!player || !mtype) {\n\t\treturn CHARM_NONE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5c1445d207d640b456de8fbfb6b8e13799c7654e943071aa4666565df11ae9a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 245, + "startColumn": 6, + "charOffset": 8215, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 243, + "startColumn": 6, + "charOffset": 8090, + "charLength": 1, + "snippet": { + "text": "\ncharmRune_t IOBestiary::getCharmFromTarget(std::shared_ptr player, const std::shared_ptr mtype) {\n\tif (!player || !mtype) {\n\t\treturn CHARM_NONE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38129b9405bb7d6bb726f0efb7326760177953390db798fefb898e76391e6671" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 245, + "startColumn": 17, + "charOffset": 8226, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 243, + "startColumn": 17, + "charOffset": 8090, + "charLength": 1, + "snippet": { + "text": "\ncharmRune_t IOBestiary::getCharmFromTarget(std::shared_ptr player, const std::shared_ptr mtype) {\n\tif (!player || !mtype) {\n\t\treturn CHARM_NONE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e78bf0378f0680b07dd89547411033952215cac007b04427fe2ba3b009f4cd3a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 252, + "startColumn": 2, + "charOffset": 8377, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 250, + "startColumn": 2, + "charOffset": 8307, + "charLength": 3, + "snippet": { + "text": "\tstd::list usedRunes = getCharmUsedRuneBitAll(player);\n\n\tfor (charmRune_t it : usedRunes) {\n\t\tconst auto charm = getBestiaryCharm(it);\n\t\tif (bestiaryEntry == player->parseRacebyCharm(charm->id, false, 0)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48cf4da7ab99ba495ccc43fc405c862b483f61e2aa7d126f3f5de51e6789ae7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'hasCharmUnlockedRuneBit' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 261, + "startColumn": 18, + "charOffset": 8595, + "charLength": 23, + "snippet": { + "text": "hasCharmUnlockedRuneBit" + } + }, + "contextRegion": { + "startLine": 259, + "startColumn": 18, + "charOffset": 8575, + "charLength": 23, + "snippet": { + "text": "}\n\nbool IOBestiary::hasCharmUnlockedRuneBit(const std::shared_ptr charm, int32_t input) const {\n\tif (!charm) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1fa0519f1f9d12b5ae5fe39771486061da3185a07e588c6ce7f13fbec2dad467" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'charm' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 261, + "startColumn": 71, + "charOffset": 8648, + "charLength": 5, + "snippet": { + "text": "charm" + } + }, + "contextRegion": { + "startLine": 259, + "startColumn": 71, + "charOffset": 8575, + "charLength": 5, + "snippet": { + "text": "}\n\nbool IOBestiary::hasCharmUnlockedRuneBit(const std::shared_ptr charm, int32_t input) const {\n\tif (!charm) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ceb66713673d5f2ffdf331e3311566e8a4a950ca140d183780310a5108c8617b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 262, + "startColumn": 6, + "charOffset": 8683, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 260, + "startColumn": 6, + "charOffset": 8577, + "charLength": 1, + "snippet": { + "text": "\nbool IOBestiary::hasCharmUnlockedRuneBit(const std::shared_ptr charm, int32_t input) const {\n\tif (!charm) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a8933f09cf4a99798b5c0f4b2b2e4816ae686d1ce44972baf1508b55ce4b3f33" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 266, + "startColumn": 11, + "charOffset": 8723, + "charLength": 5, + "snippet": { + "text": "input" + } + }, + "contextRegion": { + "startLine": 264, + "startColumn": 11, + "charOffset": 8709, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\treturn ((input & charm->binary) != 0);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d336198bb8628a3d485be46a5efa4a96f4cfcfcd55e42e81fdcd1eab33e8a69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'bitToggle' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 269, + "startColumn": 21, + "charOffset": 8776, + "charLength": 9, + "snippet": { + "text": "bitToggle" + } + }, + "contextRegion": { + "startLine": 267, + "startColumn": 21, + "charOffset": 8753, + "charLength": 9, + "snippet": { + "text": "}\n\nint32_t IOBestiary::bitToggle(int32_t input, const std::shared_ptr charm, bool on) const {\n\tif (!charm) {\n\t\treturn CHARM_NONE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ae1703b97177e5eda344e928edf11c2a03aa99a1111b48b6e9bde0295ac30ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'charm' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 269, + "startColumn": 75, + "charOffset": 8830, + "charLength": 5, + "snippet": { + "text": "charm" + } + }, + "contextRegion": { + "startLine": 267, + "startColumn": 75, + "charOffset": 8753, + "charLength": 5, + "snippet": { + "text": "}\n\nint32_t IOBestiary::bitToggle(int32_t input, const std::shared_ptr charm, bool on) const {\n\tif (!charm) {\n\t\treturn CHARM_NONE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04308257fc21ea8548b9d557368954fe37f67f8a55c9ff7529da6cdd8bdcd650" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 270, + "startColumn": 6, + "charOffset": 8859, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 268, + "startColumn": 6, + "charOffset": 8755, + "charLength": 1, + "snippet": { + "text": "\nint32_t IOBestiary::bitToggle(int32_t input, const std::shared_ptr charm, bool on) const {\n\tif (!charm) {\n\t\treturn CHARM_NONE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56fa8d645502f11cbacac4681f488df49f8e125a4fb364fe463a995e1ebbcb3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'returnToggle' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 274, + "startColumn": 10, + "charOffset": 8903, + "charLength": 12, + "snippet": { + "text": "returnToggle" + } + }, + "contextRegion": { + "startLine": 272, + "startColumn": 10, + "charOffset": 8890, + "charLength": 12, + "snippet": { + "text": "\t}\n\n\tint32_t returnToggle;\n\tint32_t binary = charm->binary;\n\tif (on) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6cae4e661c9db41293d6402c516b5c833a0efae5a68b20ab8b2a905f9ec9e3b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 277, + "startColumn": 18, + "charOffset": 8978, + "charLength": 5, + "snippet": { + "text": "input" + } + }, + "contextRegion": { + "startLine": 275, + "startColumn": 18, + "charOffset": 8917, + "charLength": 5, + "snippet": { + "text": "\tint32_t binary = charm->binary;\n\tif (on) {\n\t\treturnToggle = input | binary;\n\t\treturn returnToggle;\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb5538ae989b095bbb27741474a8920cd163664ca2d00cc23f531086df07f29c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 279, + "startColumn": 4, + "charOffset": 9020, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 277, + "startColumn": 4, + "charOffset": 8961, + "charLength": 4, + "snippet": { + "text": "\t\treturnToggle = input | binary;\n\t\treturn returnToggle;\n\t} else {\n\t\tbinary = ~binary;\n\t\treturnToggle = input & binary;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa4c0fc84c9673d652c45744bf0aa0973852d4d8a447bea8959c7265605c6794" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a unary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 280, + "startColumn": 13, + "charOffset": 9039, + "charLength": 6, + "snippet": { + "text": "binary" + } + }, + "contextRegion": { + "startLine": 278, + "startColumn": 13, + "charOffset": 8994, + "charLength": 6, + "snippet": { + "text": "\t\treturn returnToggle;\n\t} else {\n\t\tbinary = ~binary;\n\t\treturnToggle = input & binary;\n\t\treturn returnToggle;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c33e8e91a04a1f29f7780c7d8cbfd325ae1145afa02e32bd2a4e047198b4ecf4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 281, + "startColumn": 18, + "charOffset": 9064, + "charLength": 5, + "snippet": { + "text": "input" + } + }, + "contextRegion": { + "startLine": 279, + "startColumn": 18, + "charOffset": 9017, + "charLength": 5, + "snippet": { + "text": "\t} else {\n\t\tbinary = ~binary;\n\t\treturnToggle = input & binary;\n\t\treturn returnToggle;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55c20654ea43721404c43e0f1d77db9a26c3819402098e0ea2a07818bd84e8b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 286, + "startColumn": 59, + "charOffset": 9167, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 284, + "startColumn": 59, + "charOffset": 9106, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOBestiary::sendBuyCharmRune(std::shared_ptr player, charmRune_t runeID, uint8_t action, uint16_t raceid) {\n\tconst auto charm = getBestiaryCharm(runeID);\n\tif (!player || !charm) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c2a91aeaa4e9bfd17a0c097343ea3867764a13fdd82c1cf7bc07bec3964b1b3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'sendBuyCharmRune' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 286, + "startColumn": 87, + "charOffset": 9195, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 284, + "startColumn": 87, + "charOffset": 9106, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid IOBestiary::sendBuyCharmRune(std::shared_ptr player, charmRune_t runeID, uint8_t action, uint16_t raceid) {\n\tconst auto charm = getBestiaryCharm(runeID);\n\tif (!player || !charm) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee396ea2ddb345d7450ba0a0e0053b9e78abedef122f0ba701ced010574acd4f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 288, + "startColumn": 6, + "charOffset": 9281, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 286, + "startColumn": 6, + "charOffset": 9109, + "charLength": 1, + "snippet": { + "text": "void IOBestiary::sendBuyCharmRune(std::shared_ptr player, charmRune_t runeID, uint8_t action, uint16_t raceid) {\n\tconst auto charm = getBestiaryCharm(runeID);\n\tif (!player || !charm) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "708f7a4cba7bd6fcba10c7c3eabb96c0c9deb3c616772b40f64ae6f87446f3d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 288, + "startColumn": 17, + "charOffset": 9292, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 286, + "startColumn": 17, + "charOffset": 9109, + "charLength": 1, + "snippet": { + "text": "void IOBestiary::sendBuyCharmRune(std::shared_ptr player, charmRune_t runeID, uint8_t action, uint16_t raceid) {\n\tconst auto charm = getBestiaryCharm(runeID);\n\tif (!player || !charm) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab3bbdd2b9b8d117b1dc0be8ff9ba8f6cf95d179125b93b8ad594a94ea8eb243" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 292, + "startColumn": 2, + "charOffset": 9317, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 290, + "startColumn": 2, + "charOffset": 9312, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (action == 0) {\n\t\tstd::ostringstream ss;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ddd082857a59225d9b06adba4fc9c91f032b99cd370de082e63524990d25cc2a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'limitRunes' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 310, + "startColumn": 12, + "charOffset": 9963, + "charLength": 10, + "snippet": { + "text": "limitRunes" + } + }, + "contextRegion": { + "startLine": 308, + "startColumn": 12, + "charOffset": 9856, + "charLength": 10, + "snippet": { + "text": "\t} else if (action == 1) {\n\t\tstd::list usedRunes = getCharmUsedRuneBitAll(player);\n\t\tuint16_t limitRunes;\n\n\t\tif (player->isPremium()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b50162e1c8cf2267d0fd74d7aa6566629aa4bf4e73faa30045d6b66cc7c41f42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 314, + "startColumn": 18, + "charOffset": 10060, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 312, + "startColumn": 18, + "charOffset": 9976, + "charLength": 3, + "snippet": { + "text": "\t\tif (player->isPremium()) {\n\t\t\tif (player->hasCharmExpansion()) {\n\t\t\t\tlimitRunes = 100;\n\t\t\t} else {\n\t\t\t\tlimitRunes = 6;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c3ec99bd7db8fadc7856c73b46780654ce78c24f74bf0cc8d70387e5cb3e8e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 316, + "startColumn": 18, + "charOffset": 10094, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 314, + "startColumn": 18, + "charOffset": 10043, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tlimitRunes = 100;\n\t\t\t} else {\n\t\t\t\tlimitRunes = 6;\n\t\t\t}\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0dc58d830e2293b4c39f2628bfb9bf3eac6094fe84e87b390a916f1bd6282bd4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 331, + "startColumn": 17, + "charOffset": 10556, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 329, + "startColumn": 17, + "charOffset": 10341, + "charLength": 6, + "snippet": { + "text": "\t\tplayer->sendFYIBox(\"Creature has been set! You are Premium player, so you benefit from up to 6 runes! Charm Expansion allow you to set creatures to all runes at once!\");\n\t} else if (action == 2) {\n\t\tint32_t fee = player->getLevel() * 100;\n\t\tif (player->hasCharmExpansion()) {\n\t\t\tfee = (fee * 75) / 100;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d7062dcc5bf888058f5b1465eeae8d4f4d01fbf43b711f0b4e8658d1226f65c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 331, + "startColumn": 38, + "charOffset": 10577, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 329, + "startColumn": 38, + "charOffset": 10341, + "charLength": 3, + "snippet": { + "text": "\t\tplayer->sendFYIBox(\"Creature has been set! You are Premium player, so you benefit from up to 6 runes! Charm Expansion allow you to set creatures to all runes at once!\");\n\t} else if (action == 2) {\n\t\tint32_t fee = player->getLevel() * 100;\n\t\tif (player->hasCharmExpansion()) {\n\t\t\tfee = (fee * 75) / 100;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20720b8946b448c09398d74bdbb6e52e44a2a3d3f08d5950e6a858e0f6100666" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "75 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 333, + "startColumn": 17, + "charOffset": 10635, + "charLength": 2, + "snippet": { + "text": "75" + } + }, + "contextRegion": { + "startLine": 331, + "startColumn": 17, + "charOffset": 10540, + "charLength": 2, + "snippet": { + "text": "\t\tint32_t fee = player->getLevel() * 100;\n\t\tif (player->hasCharmExpansion()) {\n\t\t\tfee = (fee * 75) / 100;\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a261fa71988ded113d1eddf1e6f7fb96f1eb86ed23c65900e914d3c1b9d1553f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 333, + "startColumn": 23, + "charOffset": 10641, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 331, + "startColumn": 23, + "charOffset": 10540, + "charLength": 3, + "snippet": { + "text": "\t\tint32_t fee = player->getLevel() * 100;\n\t\tif (player->hasCharmExpansion()) {\n\t\t\tfee = (fee * 75) / 100;\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afc5a44c43d2c9e3e41f7242d08dd65fd0773fd5c54e838e63154007b1ad54ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 340, + "startColumn": 47, + "charOffset": 10889, + "charLength": 3, + "snippet": { + "text": "fee" + } + }, + "contextRegion": { + "startLine": 338, + "startColumn": 47, + "charOffset": 10745, + "charLength": 3, + "snippet": { + "text": "\t\t\tplayer->sendFYIBox(\"You successfully removed the creature.\");\n\t\t\tplayer->BestiarysendCharms();\n\t\t\tg_metrics().addCounter(\"balance_decrease\", fee, { { \"player\", player->getName() }, { \"context\", \"charm_removal\" } });\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db27649c5a2e8448823a97cedcd3f3b7d5e2ca8d981f22855b54618826cbfd4f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getMonsterElements' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 348, + "startColumn": 40, + "charOffset": 11108, + "charLength": 18, + "snippet": { + "text": "getMonsterElements" + } + }, + "contextRegion": { + "startLine": 346, + "startColumn": 40, + "charOffset": 11066, + "charLength": 18, + "snippet": { + "text": "}\n\nstd::map IOBestiary::getMonsterElements(const std::shared_ptr mtype) const {\n\tstd::map defaultMap = {};\n\tfor (uint8_t i = 0; i <= 7; i++) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3adf6b30748b75d28ee4907aa45e86103f22fe16eed118c2e56bf3f3ab7e74f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'mtype' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 348, + "startColumn": 94, + "charOffset": 11162, + "charLength": 5, + "snippet": { + "text": "mtype" + } + }, + "contextRegion": { + "startLine": 346, + "startColumn": 94, + "charOffset": 11066, + "charLength": 5, + "snippet": { + "text": "}\n\nstd::map IOBestiary::getMonsterElements(const std::shared_ptr mtype) const {\n\tstd::map defaultMap = {};\n\tfor (uint8_t i = 0; i <= 7; i++) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c078d8e68b62c411507d40212d5ed67378bffecee1cea66e03d002e43429592" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 350, + "startColumn": 2, + "charOffset": 11223, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 348, + "startColumn": 2, + "charOffset": 11069, + "charLength": 3, + "snippet": { + "text": "std::map IOBestiary::getMonsterElements(const std::shared_ptr mtype) const {\n\tstd::map defaultMap = {};\n\tfor (uint8_t i = 0; i <= 7; i++) {\n\t\tdefaultMap[i] = 100;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e75067f1e213a85e6f4a68e35b3dc044d3cb3778bb800d14181b4df85bbfbfe8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 350, + "startColumn": 27, + "charOffset": 11248, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 348, + "startColumn": 27, + "charOffset": 11069, + "charLength": 1, + "snippet": { + "text": "std::map IOBestiary::getMonsterElements(const std::shared_ptr mtype) const {\n\tstd::map defaultMap = {};\n\tfor (uint8_t i = 0; i <= 7; i++) {\n\t\tdefaultMap[i] = 100;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c800a55f41c6f3f6f6891457043c91af5ad3f7c8cccd4f3df07ca7e5bf2adaf7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 351, + "startColumn": 19, + "charOffset": 11276, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 349, + "startColumn": 19, + "charOffset": 11177, + "charLength": 3, + "snippet": { + "text": "\tstd::map defaultMap = {};\n\tfor (uint8_t i = 0; i <= 7; i++) {\n\t\tdefaultMap[i] = 100;\n\t}\n\tfor (const auto &elementEntry : mtype->info.elementMap) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8628797e69c69431b1fa15f17de4f8a6fbe26e38fff2ac0a18a22101c0e2464e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 353, + "startColumn": 2, + "charOffset": 11285, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 351, + "startColumn": 2, + "charOffset": 11258, + "charLength": 3, + "snippet": { + "text": "\t\tdefaultMap[i] = 100;\n\t}\n\tfor (const auto &elementEntry : mtype->info.elementMap) {\n\t\tswitch (elementEntry.first) {\n\t\t\tcase COMBAT_PHYSICALDAMAGE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e87e22cb0eb0365b9a6718a3137e90e1958e0b2b853a202fcabc57cfa0f2b41a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'mapped_type' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 356, + "startColumn": 22, + "charOffset": 11427, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 354, + "startColumn": 22, + "charOffset": 11343, + "charLength": 11, + "snippet": { + "text": "\t\tswitch (elementEntry.first) {\n\t\t\tcase COMBAT_PHYSICALDAMAGE:\n\t\t\t\tdefaultMap[0] -= static_cast(elementEntry.second);\n\t\t\t\tbreak;\n\t\t\tcase COMBAT_FIREDAMAGE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8fe53caa0e3956321ec9938879749c465fffaf36afede5e34f6cd3f796168832" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'mapped_type' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 359, + "startColumn": 22, + "charOffset": 11529, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 357, + "startColumn": 22, + "charOffset": 11470, + "charLength": 11, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\tcase COMBAT_FIREDAMAGE:\n\t\t\t\tdefaultMap[1] -= static_cast(elementEntry.second);\n\t\t\t\tbreak;\n\t\t\tcase COMBAT_EARTHDAMAGE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85b794f652f46a1506429fcf029715e1073af99a1adeba6119872552e0472652" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'mapped_type' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 362, + "startColumn": 22, + "charOffset": 11632, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 360, + "startColumn": 22, + "charOffset": 11572, + "charLength": 11, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\tcase COMBAT_EARTHDAMAGE:\n\t\t\t\tdefaultMap[2] -= static_cast(elementEntry.second);\n\t\t\t\tbreak;\n\t\t\tcase COMBAT_ENERGYDAMAGE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa2e4076182087016c33af2085cc71bd57fa3caf55df4e620b4c5c8286408b5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'mapped_type' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 365, + "startColumn": 22, + "charOffset": 11736, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 363, + "startColumn": 22, + "charOffset": 11675, + "charLength": 11, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\tcase COMBAT_ENERGYDAMAGE:\n\t\t\t\tdefaultMap[3] -= static_cast(elementEntry.second);\n\t\t\t\tbreak;\n\t\t\tcase COMBAT_ICEDAMAGE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80893d3866cdb1bb93aed3f180be9d2a8abc0a0d910a7c25bcac91480fecfdd7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'mapped_type' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 368, + "startColumn": 22, + "charOffset": 11837, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 366, + "startColumn": 22, + "charOffset": 11779, + "charLength": 11, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\tcase COMBAT_ICEDAMAGE:\n\t\t\t\tdefaultMap[4] -= static_cast(elementEntry.second);\n\t\t\t\tbreak;\n\t\t\tcase COMBAT_HOLYDAMAGE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1692e7e377518d6e25aa094e8355241e80bc999bb9d0bafd3aa1476043da2f04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 371, + "startColumn": 16, + "charOffset": 11933, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 369, + "startColumn": 16, + "charOffset": 11880, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\tcase COMBAT_HOLYDAMAGE:\n\t\t\t\tdefaultMap[5] -= static_cast(elementEntry.second);\n\t\t\t\tbreak;\n\t\t\tcase COMBAT_DEATHDAMAGE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f9bbbc5e60ce13c9eb40aaa2e26a00feef07b33218ef4a007f991c74c626dbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'mapped_type' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 371, + "startColumn": 22, + "charOffset": 11939, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 369, + "startColumn": 22, + "charOffset": 11880, + "charLength": 11, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\tcase COMBAT_HOLYDAMAGE:\n\t\t\t\tdefaultMap[5] -= static_cast(elementEntry.second);\n\t\t\t\tbreak;\n\t\t\tcase COMBAT_DEATHDAMAGE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8fe53caa0e3956321ec9938879749c465fffaf36afede5e34f6cd3f796168832" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 374, + "startColumn": 16, + "charOffset": 12036, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 372, + "startColumn": 16, + "charOffset": 11982, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\tcase COMBAT_DEATHDAMAGE:\n\t\t\t\tdefaultMap[6] -= static_cast(elementEntry.second);\n\t\t\t\tbreak;\n\t\t\tcase COMBAT_HEALING:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7df767131f632b3c4f0a2c8ac799ff7f4bdf723a49302683232336e01e966c0a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'mapped_type' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 374, + "startColumn": 22, + "charOffset": 12042, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 372, + "startColumn": 22, + "charOffset": 11982, + "charLength": 11, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\tcase COMBAT_DEATHDAMAGE:\n\t\t\t\tdefaultMap[6] -= static_cast(elementEntry.second);\n\t\t\t\tbreak;\n\t\t\tcase COMBAT_HEALING:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6cc8f5452810853609fcfdd9a93156fb6e14363ffd5681a6899ea36f00db360" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 377, + "startColumn": 16, + "charOffset": 12135, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 375, + "startColumn": 16, + "charOffset": 12085, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\tcase COMBAT_HEALING:\n\t\t\t\tdefaultMap[7] -= static_cast(elementEntry.second);\n\t\t\t\tbreak;\n\t\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bce21df864c5b266c225a6bce5171ff0d7a820ae55f5bcf57b2e515f74a2ac62" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'mapped_type' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 377, + "startColumn": 22, + "charOffset": 12141, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 375, + "startColumn": 22, + "charOffset": 12085, + "charLength": 11, + "snippet": { + "text": "\t\t\t\tbreak;\n\t\t\tcase COMBAT_HEALING:\n\t\t\t\tdefaultMap[7] -= static_cast(elementEntry.second);\n\t\t\t\tbreak;\n\t\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c422995d6dc64911819801dac0179f95aaaf40b23aa2772c94a79f32b1b1ff5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getBestiaryKillCountByMonsterIDs' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 386, + "startColumn": 42, + "charOffset": 12289, + "charLength": 32, + "snippet": { + "text": "getBestiaryKillCountByMonsterIDs" + } + }, + "contextRegion": { + "startLine": 384, + "startColumn": 42, + "charOffset": 12245, + "charLength": 32, + "snippet": { + "text": "}\n\nstd::map IOBestiary::getBestiaryKillCountByMonsterIDs(std::shared_ptr player, std::map mtype_list) const {\n\tstd::map raceMonsters = {};\n\tfor (const auto &it : mtype_list) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82c00881fbc09f6ceed1e2a8768827341fd7e6714ce6907330fe303bcec274bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 386, + "startColumn": 99, + "charOffset": 12346, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 384, + "startColumn": 99, + "charOffset": 12245, + "charLength": 6, + "snippet": { + "text": "}\n\nstd::map IOBestiary::getBestiaryKillCountByMonsterIDs(std::shared_ptr player, std::map mtype_list) const {\n\tstd::map raceMonsters = {};\n\tfor (const auto &it : mtype_list) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7c8246a5da12d4d649e724b0cfba7570744215226ebe0c7efc5dc4d635a4f4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'mtype_list' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 386, + "startColumn": 139, + "charOffset": 12386, + "charLength": 10, + "snippet": { + "text": "mtype_list" + } + }, + "contextRegion": { + "startLine": 384, + "startColumn": 139, + "charOffset": 12245, + "charLength": 10, + "snippet": { + "text": "}\n\nstd::map IOBestiary::getBestiaryKillCountByMonsterIDs(std::shared_ptr player, std::map mtype_list) const {\n\tstd::map raceMonsters = {};\n\tfor (const auto &it : mtype_list) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4bf67fc46c9151f5e584b2112e3eab5e2a7fd0c19a652bd991530a75605c31f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 388, + "startColumn": 2, + "charOffset": 12456, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 386, + "startColumn": 2, + "charOffset": 12248, + "charLength": 3, + "snippet": { + "text": "std::map IOBestiary::getBestiaryKillCountByMonsterIDs(std::shared_ptr player, std::map mtype_list) const {\n\tstd::map raceMonsters = {};\n\tfor (const auto &it : mtype_list) {\n\t\tuint16_t raceid = it.first;\n\t\tuint32_t thisKilled = player->getBestiaryKillCount(raceid);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0635c946c18ab5a1fc7e9c94650ff5acd37e5f8c0b2550460f715f8c6db4dac3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getBestiaryFinished' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 398, + "startColumn": 35, + "charOffset": 12712, + "charLength": 19, + "snippet": { + "text": "getBestiaryFinished" + } + }, + "contextRegion": { + "startLine": 396, + "startColumn": 35, + "charOffset": 12675, + "charLength": 19, + "snippet": { + "text": "}\n\nstd::vector IOBestiary::getBestiaryFinished(const std::shared_ptr &player) const {\n\tconst auto &bestiaryMap = g_game().getBestiaryList();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba423d67cbb6dabae76c8103917d46fce1fbf98590ae9e8656355cb965d8848f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 404, + "startColumn": 2, + "charOffset": 12932, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 402, + "startColumn": 2, + "charOffset": 12883, + "charLength": 3, + "snippet": { + "text": "\tfinishedMonsters.reserve(bestiaryMap.size());\n\n\tfor (const auto &[monsterTypeRaceId, monsterTypeName] : bestiaryMap) {\n\t\tconst auto &mtype = g_monsters().getMonsterType(monsterTypeName);\n\t\tconst uint32_t thisKilled = player->getBestiaryKillCount(monsterTypeRaceId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a94e1e82e88f2c3ae905d84043d75fdcf738b14e22e6a291119931ef49b8580" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'calculateDifficult' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 415, + "startColumn": 20, + "charOffset": 13321, + "charLength": 18, + "snippet": { + "text": "calculateDifficult" + } + }, + "contextRegion": { + "startLine": 413, + "startColumn": 20, + "charOffset": 13299, + "charLength": 18, + "snippet": { + "text": "}\n\nint8_t IOBestiary::calculateDifficult(uint32_t chance) const {\n\tfloat chanceInPercent = chance / 1000;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5dcabd87b1f30cf8199ff08293b6fa2a0d585f1ca5d9af3282585ea560738cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-integer-division", + "ruleIndex": 64, + "kind": "fail", + "level": "warning", + "message": { + "text": "result of integer division used in a floating point context; possible loss of precision" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 416, + "startColumn": 26, + "charOffset": 13390, + "charLength": 6, + "snippet": { + "text": "chance" + } + }, + "contextRegion": { + "startLine": 414, + "startColumn": 26, + "charOffset": 13301, + "charLength": 6, + "snippet": { + "text": "\nint8_t IOBestiary::calculateDifficult(uint32_t chance) const {\n\tfloat chanceInPercent = chance / 1000;\n\n\tif (chanceInPercent < 0.2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7dca3ddcd781e6cade881502ad462c6fb8c719dc81ac6a0bf8f980edd8e2945e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 416, + "startColumn": 26, + "charOffset": 13390, + "charLength": 6, + "snippet": { + "text": "chance" + } + }, + "contextRegion": { + "startLine": 414, + "startColumn": 26, + "charOffset": 13301, + "charLength": 6, + "snippet": { + "text": "\nint8_t IOBestiary::calculateDifficult(uint32_t chance) const {\n\tfloat chanceInPercent = chance / 1000;\n\n\tif (chanceInPercent < 0.2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a8261073819e8b31933fbe265f0cfc8fac876d099ccd214f1159648d60623ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 416, + "startColumn": 26, + "charOffset": 13390, + "charLength": 6, + "snippet": { + "text": "chance" + } + }, + "contextRegion": { + "startLine": 414, + "startColumn": 26, + "charOffset": 13301, + "charLength": 6, + "snippet": { + "text": "\nint8_t IOBestiary::calculateDifficult(uint32_t chance) const {\n\tfloat chanceInPercent = chance / 1000;\n\n\tif (chanceInPercent < 0.2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09087d4311a8fe6920ba8914dde900b93a188ec9a12932b92f22568d288e1028" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 416, + "startColumn": 35, + "charOffset": 13399, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 414, + "startColumn": 35, + "charOffset": 13301, + "charLength": 4, + "snippet": { + "text": "\nint8_t IOBestiary::calculateDifficult(uint32_t chance) const {\n\tfloat chanceInPercent = chance / 1000;\n\n\tif (chanceInPercent < 0.2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3eba1b0050682140fe454d79c0f5844aa4bcfbdd6e4813718ae80e7662e77cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 418, + "startColumn": 2, + "charOffset": 13407, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 416, + "startColumn": 2, + "charOffset": 13365, + "charLength": 2, + "snippet": { + "text": "\tfloat chanceInPercent = chance / 1000;\n\n\tif (chanceInPercent < 0.2) {\n\t\treturn 4;\n\t} else if (chanceInPercent < 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa2e86c7aea95548ad492286ff69a07ebb28c2a3d2b3b35d87321bc086be622d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.2 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 418, + "startColumn": 24, + "charOffset": 13429, + "charLength": 3, + "snippet": { + "text": "0.2" + } + }, + "contextRegion": { + "startLine": 416, + "startColumn": 24, + "charOffset": 13365, + "charLength": 3, + "snippet": { + "text": "\tfloat chanceInPercent = chance / 1000;\n\n\tif (chanceInPercent < 0.2) {\n\t\treturn 4;\n\t} else if (chanceInPercent < 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7026b7269d496d742a6a38e380eb7ff35a27ef29702c86baac03c59cf148cb8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 420, + "startColumn": 4, + "charOffset": 13451, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 418, + "startColumn": 4, + "charOffset": 13406, + "charLength": 4, + "snippet": { + "text": "\tif (chanceInPercent < 0.2) {\n\t\treturn 4;\n\t} else if (chanceInPercent < 1) {\n\t\treturn 3;\n\t} else if (chanceInPercent < 5) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfc2c696421c44cf9b83228f3022a6d067f78e80e0f25e13f1a710d0461a66ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 420, + "startColumn": 31, + "charOffset": 13478, + "charLength": 1, + "snippet": { + "text": "1" + } + }, + "contextRegion": { + "startLine": 418, + "startColumn": 31, + "charOffset": 13406, + "charLength": 1, + "snippet": { + "text": "\tif (chanceInPercent < 0.2) {\n\t\treturn 4;\n\t} else if (chanceInPercent < 1) {\n\t\treturn 3;\n\t} else if (chanceInPercent < 5) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3bdc11d84ceef61108daa6592a276774a8ebec88732f3a58977e47114ebb0d47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 422, + "startColumn": 31, + "charOffset": 13525, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 420, + "startColumn": 31, + "charOffset": 13448, + "charLength": 1, + "snippet": { + "text": "\t} else if (chanceInPercent < 1) {\n\t\treturn 3;\n\t} else if (chanceInPercent < 5) {\n\t\treturn 2;\n\t} else if (chanceInPercent < 25) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efdff4eeb19bc269a89db17ddf6be7b15cf68272795cb36110f710ae2795fadd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 422, + "startColumn": 31, + "charOffset": 13525, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 420, + "startColumn": 31, + "charOffset": 13448, + "charLength": 1, + "snippet": { + "text": "\t} else if (chanceInPercent < 1) {\n\t\treturn 3;\n\t} else if (chanceInPercent < 5) {\n\t\treturn 2;\n\t} else if (chanceInPercent < 25) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb6f7fb79546054540d7e6f8282a4acf73b92362ef2772e3b43f4d56e16d7575" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 424, + "startColumn": 31, + "charOffset": 13572, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 422, + "startColumn": 31, + "charOffset": 13495, + "charLength": 2, + "snippet": { + "text": "\t} else if (chanceInPercent < 5) {\n\t\treturn 2;\n\t} else if (chanceInPercent < 25) {\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49dd33e239a74414165766273e3bc49787286036c007dcc6e9e104cbd12f3727" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iobestiary.cpp" + }, + "region": { + "startLine": 424, + "startColumn": 31, + "charOffset": 13572, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 422, + "startColumn": 31, + "charOffset": 13495, + "charLength": 2, + "snippet": { + "text": "\t} else if (chanceInPercent < 5) {\n\t\treturn 2;\n\t} else if (chanceInPercent < 25) {\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "684bacde165d9c45662a9b05f7f7ffb42c87c28ca438daab026dbb56609942d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.hpp" + }, + "region": { + "startLine": 13, + "startColumn": 10, + "charOffset": 429, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 11, + "startColumn": 10, + "charOffset": 384, + "charLength": 30, + "snippet": { + "text": "\n#include \"creatures/npcs/npcs.hpp\"\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"items/tile.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f69d6cfec9be0f6769310fd1d031cff4d88ef48385f012190be0fe563d15e4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.hpp", + "index": 1 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"creatures/monsters/monsters.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e45483e1912ecf8c717a48f913562d9a9cf501f9947625dad361d43acc28406" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.hpp", + "index": 2 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a2b3a997037594f8bab93e08d9b46935593069da5e9def3fec147ea485ffc36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 25, + "startColumn": 6, + "charOffset": 801, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 6, + "charOffset": 697, + "charLength": 1, + "snippet": { + "text": "\tquery << \"SELECT * FROM `boosted_boss`\";\n\tDBResult_ptr result = database.storeQuery(query.str());\n\tif (!result) {\n\t\tg_logger().error(\"[{}] Failed to detect boosted boss database. (CODE 01)\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49b8b99a2e1411d1c1efdeeb99bdb0fcbf5baf09d72c6fc29d3c0f4f50f27a24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 30, + "startColumn": 2, + "charOffset": 919, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 28, + "startColumn": 2, + "charOffset": 914, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tuint16_t date = result->getNumber(\"date\");\n\tauto timeNow = getTimeNow();\n\tauto time = localtime(&timeNow);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a05a0004ddd526a2de69006f3b2c53486eec605918164dc6fdd2834e74327296" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto time' can be declared as 'auto *time'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 32, + "startColumn": 2, + "charOffset": 1003, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 2, + "charOffset": 918, + "charLength": 4, + "snippet": { + "text": "\tuint16_t date = result->getNumber(\"date\");\n\tauto timeNow = getTimeNow();\n\tauto time = localtime(&timeNow);\n\tauto today = time->tm_mday;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1bf8426d5d4ee954a22856afd0031c0abcd56f6f077b11ab53322978d30a9c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 32, + "startColumn": 14, + "charOffset": 1015, + "charLength": 9, + "snippet": { + "text": "localtime" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 14, + "charOffset": 918, + "charLength": 9, + "snippet": { + "text": "\tuint16_t date = result->getNumber(\"date\");\n\tauto timeNow = getTimeNow();\n\tauto time = localtime(&timeNow);\n\tauto today = time->tm_mday;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc4802842f475be0b7d5d13e72e81c2ec54a4ac660a07d5ff884f1cd9c945dd4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "concurrency-mt-unsafe", + "ruleIndex": 478, + "kind": "fail", + "level": "warning", + "message": { + "text": "function is not thread safe" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 32, + "startColumn": 14, + "charOffset": 1015, + "charLength": 9, + "snippet": { + "text": "localtime" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 14, + "charOffset": 918, + "charLength": 9, + "snippet": { + "text": "\tuint16_t date = result->getNumber(\"date\");\n\tauto timeNow = getTimeNow();\n\tauto time = localtime(&timeNow);\n\tauto today = time->tm_mday;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e85f1a220f6426901dd0bb22639aa44c36c3a3538debd9ab7202822f692a6975" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 54, + "startColumn": 2, + "charOffset": 1630, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 52, + "startColumn": 2, + "charOffset": 1555, + "charLength": 3, + "snippet": { + "text": "\t// Filter only archfoe bosses\n\tstd::map bossInfo;\n\tfor (auto [infoBossRaceId, infoBossName] : bossMap) {\n\t\tconst auto mType = getMonsterTypeByBossRaceId(infoBossRaceId);\n\t\tif (!mType || mType->info.bosstiaryRace != BosstiaryRarity_t::RARITY_ARCHFOE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a16367761625e35b0b5724d777eeb2e6a1e57028a6e427e0bf9f2d5e9e44eb60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 56, + "startColumn": 7, + "charOffset": 1755, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 54, + "startColumn": 7, + "charOffset": 1629, + "charLength": 1, + "snippet": { + "text": "\tfor (auto [infoBossRaceId, infoBossName] : bossMap) {\n\t\tconst auto mType = getMonsterTypeByBossRaceId(infoBossRaceId);\n\t\tif (!mType || mType->info.bosstiaryRace != BosstiaryRarity_t::RARITY_ARCHFOE) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "741459a5af13a1c19ceb8bb94d89b0d948ebe2cc07ebae07ad02e2bf070b78d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 60, + "startColumn": 12, + "charOffset": 1860, + "charLength": 11, + "snippet": { + "text": "try_emplace" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 12, + "charOffset": 1844, + "charLength": 11, + "snippet": { + "text": "\t\t}\n\n\t\tbossInfo.try_emplace(infoBossRaceId, infoBossName);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6d633688854e053e64cde54f373ec18e83572e77a817e85a5787e85b4c33ea1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-container-size-empty", + "ruleIndex": 695, + "kind": "fail", + "level": "warning", + "message": { + "text": "the 'empty' method should be used to check for emptiness instead of 'size'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 64, + "startColumn": 6, + "charOffset": 1958, + "charLength": 8, + "snippet": { + "text": "bossInfo" + } + }, + "contextRegion": { + "startLine": 62, + "startColumn": 6, + "charOffset": 1906, + "charLength": 8, + "snippet": { + "text": "\n\t// Check if not have archfoe registered boss\n\tif (bossInfo.size() == 0) {\n\t\tg_logger().error(\"Failed to boost a boss. There is no boss registered with the Archfoe Rarity.\");\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4d4f3ba6540cf09a6532165ea134ee1ce4d43c92e9c93c30ac10dfeb51bb941" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 69, + "startColumn": 2, + "charOffset": 2097, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 67, + "startColumn": 2, + "charOffset": 2092, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tuint16_t oldBossRace = result->getNumber(\"raceid\");\n\twhile (true) {\n\t\tuint32_t randomIndex = uniform_random(0, static_cast(bossInfo.size()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0cd74e21a870250b69f3326ed561d35ac85e65047e7098ec1e461051660cd1de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 70, + "startColumn": 2, + "charOffset": 2160, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 2, + "charOffset": 2095, + "charLength": 5, + "snippet": { + "text": "\n\tuint16_t oldBossRace = result->getNumber(\"raceid\");\n\twhile (true) {\n\t\tuint32_t randomIndex = uniform_random(0, static_cast(bossInfo.size()));\n\t\tauto it = std::next(bossInfo.begin(), randomIndex);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5221723168d2048efde5a628c4c21239920cf08ea2884429ce093a04226a689e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Condition is always true" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 70, + "startColumn": 9, + "charOffset": 2167, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 9, + "charOffset": 2095, + "charLength": 4, + "snippet": { + "text": "\n\tuint16_t oldBossRace = result->getNumber(\"raceid\");\n\twhile (true) {\n\t\tuint32_t randomIndex = uniform_random(0, static_cast(bossInfo.size()));\n\t\tauto it = std::next(bossInfo.begin(), randomIndex);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "797b558a0b586cdd1ee79cd5743c6267b9039203ce49c1857cd50ff5ba791b4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-6-4", + "ruleIndex": 461, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-6-4: For any iteration statement there shall be no more than one break or goto statement used for loop termination" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 84, + "startColumn": 3, + "charOffset": 2520, + "charLength": 5, + "snippet": { + "text": "break" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 3, + "charOffset": 2464, + "charLength": 5, + "snippet": { + "text": "\t\tbossName = randomBossName;\n\t\tbossId = randomBossId;\n\t\tbreak;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb907462ff4513ccd67864e9eeb3ebd4936064c570cdf06a81a3750457f42fba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 131, + "startColumn": 15, + "charOffset": 4527, + "charLength": 11, + "snippet": { + "text": "try_emplace" + } + }, + "contextRegion": { + "startLine": 129, + "startColumn": 15, + "charOffset": 4509, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\tbosstiaryMap.try_emplace(raceId, name);\n\tauto boss = std::pair(raceId, name);\n\tbosstiaryMap.insert(boss);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b2a16490f38fee0c1dc3e5ce148739688101160140458796563696baf5c3b82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 133, + "startColumn": 15, + "charOffset": 4629, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 131, + "startColumn": 15, + "charOffset": 4513, + "charLength": 6, + "snippet": { + "text": "\tbosstiaryMap.try_emplace(raceId, name);\n\tauto boss = std::pair(raceId, name);\n\tbosstiaryMap.insert(boss);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a55004b7ba0dbfb8557f95132bb39ff17f908e8a3368037ac9b7e71336cac57" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 157, + "startColumn": 2, + "charOffset": 5172, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 2, + "charOffset": 5076, + "charLength": 3, + "snippet": { + "text": "\nstd::shared_ptr IOBosstiary::getMonsterTypeByBossRaceId(uint16_t raceId) const {\n\tfor ([[maybe_unused]] const auto &[bossRaceId, bossName] : getBosstiaryMap()) {\n\t\tif (bossRaceId == raceId) {\n\t\t\tconst auto monsterType = g_monsters().getMonsterType(bossName);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6d25a6ed2b01dc56e3447307680f195ebef0074c06d2673f9c7a16485443341" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 160, + "startColumn": 8, + "charOffset": 5356, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 8, + "charOffset": 5252, + "charLength": 1, + "snippet": { + "text": "\t\tif (bossRaceId == raceId) {\n\t\t\tconst auto monsterType = g_monsters().getMonsterType(bossName);\n\t\t\tif (!monsterType) {\n\t\t\t\tg_logger().error(\"[{}] Boss with id {} not found in boss map\", __FUNCTION__, raceId);\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a19b441933a95a6516617b88ab194074c568f92b4eeeee2e608532507ce37cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 172, + "startColumn": 60, + "charOffset": 5592, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 60, + "charOffset": 5530, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOBosstiary::addBosstiaryKill(std::shared_ptr player, const std::shared_ptr mtype, uint32_t amount /*= 1*/) const {\n\tif (!player || !mtype) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "821200b5f111ae5d936d970335f27140a44b0abb5b1f5f090a998ecf89c631ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'mtype' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 172, + "startColumn": 103, + "charOffset": 5635, + "charLength": 5, + "snippet": { + "text": "mtype" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 103, + "charOffset": 5530, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid IOBosstiary::addBosstiaryKill(std::shared_ptr player, const std::shared_ptr mtype, uint32_t amount /*= 1*/) const {\n\tif (!player || !mtype) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0126be0079d1db7c5b17cedfd10bb74d3535f285b58b4e34b34b617a88cdc74e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 173, + "startColumn": 6, + "charOffset": 5680, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 171, + "startColumn": 6, + "charOffset": 5532, + "charLength": 1, + "snippet": { + "text": "\nvoid IOBosstiary::addBosstiaryKill(std::shared_ptr player, const std::shared_ptr mtype, uint32_t amount /*= 1*/) const {\n\tif (!player || !mtype) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a182443eda7c45720d23531a9abb4d6e20559f3ba898546b173ea94706eca28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 173, + "startColumn": 17, + "charOffset": 5691, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 171, + "startColumn": 17, + "charOffset": 5532, + "charLength": 1, + "snippet": { + "text": "\nvoid IOBosstiary::addBosstiaryKill(std::shared_ptr player, const std::shared_ptr mtype, uint32_t amount /*= 1*/) const {\n\tif (!player || !mtype) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a86365232416189e9cb4f835cb201d18aa6750ee39b8a99e5274fea16378fbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'calculateLootBonus' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 214, + "startColumn": 23, + "charOffset": 7072, + "charLength": 18, + "snippet": { + "text": "calculateLootBonus" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 23, + "charOffset": 7047, + "charLength": 18, + "snippet": { + "text": "}\n\nuint16_t IOBosstiary::calculateLootBonus(uint32_t bossPoints) const {\n\t// Calculate Bonus based on Boss Points\n\tif (bossPoints <= 250) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ffb08d408677e0426a8394e8aeb1cd5502fd30b65a8bff0bcfd408457000199d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 216, + "startColumn": 2, + "charOffset": 7162, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 214, + "startColumn": 2, + "charOffset": 7050, + "charLength": 2, + "snippet": { + "text": "uint16_t IOBosstiary::calculateLootBonus(uint32_t bossPoints) const {\n\t// Calculate Bonus based on Boss Points\n\tif (bossPoints <= 250) {\n\t\treturn static_cast(25 + bossPoints / 10);\n\t} else if (bossPoints < 1250) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4051688b4817f0330ebd62c7e3c08a1b195594cc5bdf6b8f00e977fc7ed62fe1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "250 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 216, + "startColumn": 20, + "charOffset": 7180, + "charLength": 3, + "snippet": { + "text": "250" + } + }, + "contextRegion": { + "startLine": 214, + "startColumn": 20, + "charOffset": 7050, + "charLength": 3, + "snippet": { + "text": "uint16_t IOBosstiary::calculateLootBonus(uint32_t bossPoints) const {\n\t// Calculate Bonus based on Boss Points\n\tif (bossPoints <= 250) {\n\t\treturn static_cast(25 + bossPoints / 10);\n\t} else if (bossPoints < 1250) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf3931527d418d6f8bb5a6e94a3ffaa5394fbaf241644a5edf0b75ec8dd9f6c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 217, + "startColumn": 32, + "charOffset": 7218, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 215, + "startColumn": 32, + "charOffset": 7120, + "charLength": 2, + "snippet": { + "text": "\t// Calculate Bonus based on Boss Points\n\tif (bossPoints <= 250) {\n\t\treturn static_cast(25 + bossPoints / 10);\n\t} else if (bossPoints < 1250) {\n\t\treturn static_cast(37.5 + bossPoints / 20);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ffff606e31750f4c7446a29016f99d5851e1259f93c2b2e345ea510a212d703f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 217, + "startColumn": 50, + "charOffset": 7236, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 215, + "startColumn": 50, + "charOffset": 7120, + "charLength": 2, + "snippet": { + "text": "\t// Calculate Bonus based on Boss Points\n\tif (bossPoints <= 250) {\n\t\treturn static_cast(25 + bossPoints / 10);\n\t} else if (bossPoints < 1250) {\n\t\treturn static_cast(37.5 + bossPoints / 20);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3fcfd513f50a267f28d34d83cc68d0d6bac36629055329cf4f2501efb8c59f1d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 218, + "startColumn": 4, + "charOffset": 7244, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 216, + "startColumn": 4, + "charOffset": 7161, + "charLength": 4, + "snippet": { + "text": "\tif (bossPoints <= 250) {\n\t\treturn static_cast(25 + bossPoints / 10);\n\t} else if (bossPoints < 1250) {\n\t\treturn static_cast(37.5 + bossPoints / 20);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27fc5e0e482fdb9778dcc182af749b9cbb2844293e8d0deeb079cb51a6e500a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1250 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 218, + "startColumn": 26, + "charOffset": 7266, + "charLength": 4, + "snippet": { + "text": "1250" + } + }, + "contextRegion": { + "startLine": 216, + "startColumn": 26, + "charOffset": 7161, + "charLength": 4, + "snippet": { + "text": "\tif (bossPoints <= 250) {\n\t\treturn static_cast(25 + bossPoints / 10);\n\t} else if (bossPoints < 1250) {\n\t\treturn static_cast(37.5 + bossPoints / 20);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53d0b50411a0397ed2ea6c3e9863077a7d3106c61f966ceb8d4f4165c1be184c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "37.5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 219, + "startColumn": 32, + "charOffset": 7305, + "charLength": 4, + "snippet": { + "text": "37.5" + } + }, + "contextRegion": { + "startLine": 217, + "startColumn": 32, + "charOffset": 7187, + "charLength": 4, + "snippet": { + "text": "\t\treturn static_cast(25 + bossPoints / 10);\n\t} else if (bossPoints < 1250) {\n\t\treturn static_cast(37.5 + bossPoints / 20);\n\t}\n\treturn static_cast(100 + 0.5 * (sqrt(8 * ((bossPoints - 1250) / 5) + 81) - 9));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79cb1e3ec5ac64d3bf22c4b367264fad9cd6b17d2650e9ec406c0cb3664417b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-integer-division", + "ruleIndex": 64, + "kind": "fail", + "level": "warning", + "message": { + "text": "result of integer division used in a floating point context; possible loss of precision" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 219, + "startColumn": 39, + "charOffset": 7312, + "charLength": 10, + "snippet": { + "text": "bossPoints" + } + }, + "contextRegion": { + "startLine": 217, + "startColumn": 39, + "charOffset": 7187, + "charLength": 10, + "snippet": { + "text": "\t\treturn static_cast(25 + bossPoints / 10);\n\t} else if (bossPoints < 1250) {\n\t\treturn static_cast(37.5 + bossPoints / 20);\n\t}\n\treturn static_cast(100 + 0.5 * (sqrt(8 * ((bossPoints - 1250) / 5) + 81) - 9));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b3314f8416f6b01fad4fb2cada10b55f24b741e4581a0730f4d017c0d496da9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 219, + "startColumn": 39, + "charOffset": 7312, + "charLength": 10, + "snippet": { + "text": "bossPoints" + } + }, + "contextRegion": { + "startLine": 217, + "startColumn": 39, + "charOffset": 7187, + "charLength": 10, + "snippet": { + "text": "\t\treturn static_cast(25 + bossPoints / 10);\n\t} else if (bossPoints < 1250) {\n\t\treturn static_cast(37.5 + bossPoints / 20);\n\t}\n\treturn static_cast(100 + 0.5 * (sqrt(8 * ((bossPoints - 1250) / 5) + 81) - 9));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d2a79c034c46bc90fb4b34a0a61e307519f212e998f116edc4340892fe8e8d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 219, + "startColumn": 52, + "charOffset": 7325, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 217, + "startColumn": 52, + "charOffset": 7187, + "charLength": 2, + "snippet": { + "text": "\t\treturn static_cast(25 + bossPoints / 10);\n\t} else if (bossPoints < 1250) {\n\t\treturn static_cast(37.5 + bossPoints / 20);\n\t}\n\treturn static_cast(100 + 0.5 * (sqrt(8 * ((bossPoints - 1250) / 5) + 81) - 9));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "360d8a50cc57336fb055dd566e95958d6dfe3c114985de03c4152932161960e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 221, + "startColumn": 31, + "charOffset": 7363, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 219, + "startColumn": 31, + "charOffset": 7274, + "charLength": 3, + "snippet": { + "text": "\t\treturn static_cast(37.5 + bossPoints / 20);\n\t}\n\treturn static_cast(100 + 0.5 * (sqrt(8 * ((bossPoints - 1250) / 5) + 81) - 9));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fbda6304ce1740d96a3d218e97edf2b94aefb955a32eb579c6801b078ab3e91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 221, + "startColumn": 31, + "charOffset": 7363, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 219, + "startColumn": 31, + "charOffset": 7274, + "charLength": 3, + "snippet": { + "text": "\t\treturn static_cast(37.5 + bossPoints / 20);\n\t}\n\treturn static_cast(100 + 0.5 * (sqrt(8 * ((bossPoints - 1250) / 5) + 81) - 9));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ee77c5ceb2b4998aee18c7538ea9b16f5d8136c6636a0d3f22466a4bf4cee0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 221, + "startColumn": 37, + "charOffset": 7369, + "charLength": 3, + "snippet": { + "text": "0.5" + } + }, + "contextRegion": { + "startLine": 219, + "startColumn": 37, + "charOffset": 7274, + "charLength": 3, + "snippet": { + "text": "\t\treturn static_cast(37.5 + bossPoints / 20);\n\t}\n\treturn static_cast(100 + 0.5 * (sqrt(8 * ((bossPoints - 1250) / 5) + 81) - 9));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7afa37f0189eb8b8be57ce025ab10c716326cea2d8c18221ddf4b33b51699555" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 221, + "startColumn": 49, + "charOffset": 7381, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 219, + "startColumn": 49, + "charOffset": 7274, + "charLength": 1, + "snippet": { + "text": "\t\treturn static_cast(37.5 + bossPoints / 20);\n\t}\n\treturn static_cast(100 + 0.5 * (sqrt(8 * ((bossPoints - 1250) / 5) + 81) - 9));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bbe425137b6f2b43b1fd21440089a76a0c0b74245d5a9c3da72b80ad5b144dfe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 221, + "startColumn": 49, + "charOffset": 7381, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 219, + "startColumn": 49, + "charOffset": 7274, + "charLength": 1, + "snippet": { + "text": "\t\treturn static_cast(37.5 + bossPoints / 20);\n\t}\n\treturn static_cast(100 + 0.5 * (sqrt(8 * ((bossPoints - 1250) / 5) + 81) - 9));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "748deeae04d66266bad63541bd7bc8ca89b4ecfad7fc6ef2830d5e8bdebdcf74" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-integer-division", + "ruleIndex": 64, + "kind": "fail", + "level": "warning", + "message": { + "text": "result of integer division used in a floating point context; possible loss of precision" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 221, + "startColumn": 54, + "charOffset": 7386, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 219, + "startColumn": 54, + "charOffset": 7274, + "charLength": 1, + "snippet": { + "text": "\t\treturn static_cast(37.5 + bossPoints / 20);\n\t}\n\treturn static_cast(100 + 0.5 * (sqrt(8 * ((bossPoints - 1250) / 5) + 81) - 9));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2eaec9e1fa7c6381a3cbf3ec1a8a1a76fe469c9621620be66faf3c65b80517a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1250 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 221, + "startColumn": 68, + "charOffset": 7400, + "charLength": 4, + "snippet": { + "text": "1250" + } + }, + "contextRegion": { + "startLine": 219, + "startColumn": 68, + "charOffset": 7274, + "charLength": 4, + "snippet": { + "text": "\t\treturn static_cast(37.5 + bossPoints / 20);\n\t}\n\treturn static_cast(100 + 0.5 * (sqrt(8 * ((bossPoints - 1250) / 5) + 81) - 9));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b9d27aeeeaf239a8fe05f3f1f484c6b04fef30ea63f100f2e78b1743903af91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 221, + "startColumn": 76, + "charOffset": 7408, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 219, + "startColumn": 76, + "charOffset": 7274, + "charLength": 1, + "snippet": { + "text": "\t\treturn static_cast(37.5 + bossPoints / 20);\n\t}\n\treturn static_cast(100 + 0.5 * (sqrt(8 * ((bossPoints - 1250) / 5) + 81) - 9));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "705fa9b78567fe0fb154274a3d78a7d5d641340cf7a18a92718a2c4e633334af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "81 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 221, + "startColumn": 81, + "charOffset": 7413, + "charLength": 2, + "snippet": { + "text": "81" + } + }, + "contextRegion": { + "startLine": 219, + "startColumn": 81, + "charOffset": 7274, + "charLength": 2, + "snippet": { + "text": "\t\treturn static_cast(37.5 + bossPoints / 20);\n\t}\n\treturn static_cast(100 + 0.5 * (sqrt(8 * ((bossPoints - 1250) / 5) + 81) - 9));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e66958ad6befe46f3a5221ab70dc6c298b48539065fa38942382bc517e774cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 221, + "startColumn": 87, + "charOffset": 7419, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 219, + "startColumn": 87, + "charOffset": 7274, + "charLength": 1, + "snippet": { + "text": "\t\treturn static_cast(37.5 + bossPoints / 20);\n\t}\n\treturn static_cast(100 + 0.5 * (sqrt(8 * ((bossPoints - 1250) / 5) + 81) - 9));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "653b5074c84a0e2a8b661efc900426200a057b362c6d526ea37d116618d8cf1a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 221, + "startColumn": 87, + "charOffset": 7419, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 219, + "startColumn": 87, + "charOffset": 7274, + "charLength": 1, + "snippet": { + "text": "\t\treturn static_cast(37.5 + bossPoints / 20);\n\t}\n\treturn static_cast(100 + 0.5 * (sqrt(8 * ((bossPoints - 1250) / 5) + 81) - 9));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ad92dd8f318389430e27520d7906c62219811e2ad1cb0477e05facc6d19826f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'calculateBossPoints' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 224, + "startColumn": 23, + "charOffset": 7449, + "charLength": 19, + "snippet": { + "text": "calculateBossPoints" + } + }, + "contextRegion": { + "startLine": 222, + "startColumn": 23, + "charOffset": 7424, + "charLength": 19, + "snippet": { + "text": "}\n\nuint32_t IOBosstiary::calculateBossPoints(uint16_t lootBonus) const {\n\t// Calculate Boss Points based on Bonus\n\tif (lootBonus <= 25) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b282331e2d09720beda69806f671e21f19a967b3b2a80c1911daa863e5cb46e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 226, + "startColumn": 19, + "charOffset": 7556, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 19, + "charOffset": 7427, + "charLength": 2, + "snippet": { + "text": "uint32_t IOBosstiary::calculateBossPoints(uint16_t lootBonus) const {\n\t// Calculate Boss Points based on Bonus\n\tif (lootBonus <= 25) {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec33b7bc7e6af760a92eed2463b0583f8b18af58879834b65c2095711abaee47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 230, + "startColumn": 2, + "charOffset": 7579, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 228, + "startColumn": 2, + "charOffset": 7574, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (lootBonus <= 50) {\n\t\treturn 10 * lootBonus - 250;\n\t} else if (lootBonus <= 100) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc520a2310b5f05f320dc1733d2a43fbb906ae8fd52e7bc56c036e3119b9cd79" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 230, + "startColumn": 19, + "charOffset": 7596, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 228, + "startColumn": 19, + "charOffset": 7574, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (lootBonus <= 50) {\n\t\treturn 10 * lootBonus - 250;\n\t} else if (lootBonus <= 100) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2578cd731a9a214b7a6e70bbce55caca6167692417a8257de000d2887ae1a6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 231, + "startColumn": 10, + "charOffset": 7611, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 229, + "startColumn": 10, + "charOffset": 7577, + "charLength": 2, + "snippet": { + "text": "\n\tif (lootBonus <= 50) {\n\t\treturn 10 * lootBonus - 250;\n\t} else if (lootBonus <= 100) {\n\t\treturn 20 * lootBonus - 750;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21d39873177670d3002c349fe70444ccabec2990727f10c0166866ec0fab289e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "250 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 231, + "startColumn": 27, + "charOffset": 7628, + "charLength": 3, + "snippet": { + "text": "250" + } + }, + "contextRegion": { + "startLine": 229, + "startColumn": 27, + "charOffset": 7577, + "charLength": 3, + "snippet": { + "text": "\n\tif (lootBonus <= 50) {\n\t\treturn 10 * lootBonus - 250;\n\t} else if (lootBonus <= 100) {\n\t\treturn 20 * lootBonus - 750;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0c2c8b817e1628915e7a5a41dfb0670ed371f225c7064d6c9377e02adb878ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 232, + "startColumn": 4, + "charOffset": 7636, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 230, + "startColumn": 4, + "charOffset": 7578, + "charLength": 4, + "snippet": { + "text": "\tif (lootBonus <= 50) {\n\t\treturn 10 * lootBonus - 250;\n\t} else if (lootBonus <= 100) {\n\t\treturn 20 * lootBonus - 750;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1772c00fecc0b8ae8491768a6a3e2889e54a1e9f61ebbf14c74da7fb81743f4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 232, + "startColumn": 26, + "charOffset": 7658, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 230, + "startColumn": 26, + "charOffset": 7578, + "charLength": 3, + "snippet": { + "text": "\tif (lootBonus <= 50) {\n\t\treturn 10 * lootBonus - 250;\n\t} else if (lootBonus <= 100) {\n\t\treturn 20 * lootBonus - 750;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "468a17147fdb7e5d6a7ee082860fdac70b18e34c0a05191f722a68398b527abd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 233, + "startColumn": 10, + "charOffset": 7674, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 231, + "startColumn": 10, + "charOffset": 7602, + "charLength": 2, + "snippet": { + "text": "\t\treturn 10 * lootBonus - 250;\n\t} else if (lootBonus <= 100) {\n\t\treturn 20 * lootBonus - 750;\n\t}\n\treturn static_cast((2.5 * lootBonus * lootBonus) - (477.5 * lootBonus) + 24000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d5c1ea241d7d22735731f5ad29ce42470a077744c5a6fff918141fae6e49256" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "750 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 233, + "startColumn": 27, + "charOffset": 7691, + "charLength": 3, + "snippet": { + "text": "750" + } + }, + "contextRegion": { + "startLine": 231, + "startColumn": 27, + "charOffset": 7602, + "charLength": 3, + "snippet": { + "text": "\t\treturn 10 * lootBonus - 250;\n\t} else if (lootBonus <= 100) {\n\t\treturn 20 * lootBonus - 750;\n\t}\n\treturn static_cast((2.5 * lootBonus * lootBonus) - (477.5 * lootBonus) + 24000);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f2e172f0ec5f86cc4ef00fb2023a4e0889114a7d968fb4cdb45ad89fd2037a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2.5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 235, + "startColumn": 32, + "charOffset": 7730, + "charLength": 3, + "snippet": { + "text": "2.5" + } + }, + "contextRegion": { + "startLine": 233, + "startColumn": 32, + "charOffset": 7665, + "charLength": 3, + "snippet": { + "text": "\t\treturn 20 * lootBonus - 750;\n\t}\n\treturn static_cast((2.5 * lootBonus * lootBonus) - (477.5 * lootBonus) + 24000);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed7e043a0812d45a2860d47ef5acbd96b0cc557df7978973dc3544935023e4d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 235, + "startColumn": 38, + "charOffset": 7736, + "charLength": 9, + "snippet": { + "text": "lootBonus" + } + }, + "contextRegion": { + "startLine": 233, + "startColumn": 38, + "charOffset": 7665, + "charLength": 9, + "snippet": { + "text": "\t\treturn 20 * lootBonus - 750;\n\t}\n\treturn static_cast((2.5 * lootBonus * lootBonus) - (477.5 * lootBonus) + 24000);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37530c364ceef6bdb8641bc13bae78c6aecce16922ac56861bcebbe74db40e6c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 235, + "startColumn": 50, + "charOffset": 7748, + "charLength": 9, + "snippet": { + "text": "lootBonus" + } + }, + "contextRegion": { + "startLine": 233, + "startColumn": 50, + "charOffset": 7665, + "charLength": 9, + "snippet": { + "text": "\t\treturn 20 * lootBonus - 750;\n\t}\n\treturn static_cast((2.5 * lootBonus * lootBonus) - (477.5 * lootBonus) + 24000);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "663f31da6207d75ddb6f390b42f7761efbac5de59488ddbdce6677a1f4594ff6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "477.5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 235, + "startColumn": 64, + "charOffset": 7762, + "charLength": 5, + "snippet": { + "text": "477.5" + } + }, + "contextRegion": { + "startLine": 233, + "startColumn": 64, + "charOffset": 7665, + "charLength": 5, + "snippet": { + "text": "\t\treturn 20 * lootBonus - 750;\n\t}\n\treturn static_cast((2.5 * lootBonus * lootBonus) - (477.5 * lootBonus) + 24000);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5363e1561a250eb149ecaacb25f64711445c9691054feab58f869ac968637b32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 235, + "startColumn": 72, + "charOffset": 7770, + "charLength": 9, + "snippet": { + "text": "lootBonus" + } + }, + "contextRegion": { + "startLine": 233, + "startColumn": 72, + "charOffset": 7665, + "charLength": 9, + "snippet": { + "text": "\t\treturn 20 * lootBonus - 750;\n\t}\n\treturn static_cast((2.5 * lootBonus * lootBonus) - (477.5 * lootBonus) + 24000);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15e4034cac0097d22135cf3fe5eaa18e9dc134e0d4cf82e43d129fff8c0351d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 235, + "startColumn": 85, + "charOffset": 7783, + "charLength": 5, + "snippet": { + "text": "24000" + } + }, + "contextRegion": { + "startLine": 233, + "startColumn": 85, + "charOffset": 7665, + "charLength": 5, + "snippet": { + "text": "\t\treturn 20 * lootBonus - 750;\n\t}\n\treturn static_cast((2.5 * lootBonus * lootBonus) - (477.5 * lootBonus) + 24000);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62624a7584d293dae1c2230f412f4f1af9550c27060d375cec862b62a069be23" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 235, + "startColumn": 85, + "charOffset": 7783, + "charLength": 5, + "snippet": { + "text": "24000" + } + }, + "contextRegion": { + "startLine": 233, + "startColumn": 85, + "charOffset": 7665, + "charLength": 5, + "snippet": { + "text": "\t\treturn 20 * lootBonus - 750;\n\t}\n\treturn static_cast((2.5 * lootBonus * lootBonus) - (477.5 * lootBonus) + 24000);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "831a37bf5c771d5952f68ae0bdfb9e571bf573a496223c8144379d433207e134" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 239, + "startColumn": 6, + "charOffset": 7926, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 237, + "startColumn": 6, + "charOffset": 7793, + "charLength": 1, + "snippet": { + "text": "\nstd::vector IOBosstiary::getBosstiaryFinished(const std::shared_ptr &player, uint8_t level /* = 1*/) const {\n\tif (!player) {\n\t\treturn {};\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a9d0e96b5638518326269e8fbd3270792cf778614b03dec5660984e5948c9b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 244, + "startColumn": 2, + "charOffset": 8003, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 2, + "charOffset": 7953, + "charLength": 3, + "snippet": { + "text": "\n\tstdext::vector_set unlockedMonsters;\n\tfor (const auto &[bossId, bossName] : getBosstiaryMap()) {\n\t\tuint32_t bossKills = player->getBestiaryKillCount(bossId);\n\t\tif (bossKills == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ff518cc4ce4078640250a88a65a86eaf01e7e1898e95f0e95b872392dcc9646" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 251, + "startColumn": 7, + "charOffset": 8231, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 249, + "startColumn": 7, + "charOffset": 8164, + "charLength": 1, + "snippet": { + "text": "\n\t\tconst auto mType = g_monsters().getMonsterType(bossName);\n\t\tif (!mType) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b68d15cd6ae679de23e9a6ac52d191954b47be3dba6f1f0f6cfb71e7316c1a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 261, + "startColumn": 22, + "charOffset": 8557, + "charLength": 7, + "snippet": { + "text": "emplace" + } + }, + "contextRegion": { + "startLine": 259, + "startColumn": 22, + "charOffset": 8441, + "charLength": 7, + "snippet": { + "text": "\t\t\tauto levelKills = infoForCurrentRace.at(level - 1).kills;\n\t\t\tif (bossKills >= levelKills) {\n\t\t\t\tunlockedMonsters.emplace(bossId);\n\t\t\t}\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27c5e07e5e2ebd2d29b1e5a6668c54acfc991c969131e5435595a61da6da8dfe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 271, + "startColumn": 66, + "charOffset": 8809, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 269, + "startColumn": 66, + "charOffset": 8741, + "charLength": 6, + "snippet": { + "text": "}\n\nuint8_t IOBosstiary::getBossCurrentLevel(std::shared_ptr player, uint16_t bossId) const {\n\tif (bossId == 0 || !player) {\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e64bbeb750b52683ef07b14ce948a35c65815eff0040c534c224fb27f05ad3a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 272, + "startColumn": 21, + "charOffset": 8862, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 270, + "startColumn": 21, + "charOffset": 8743, + "charLength": 1, + "snippet": { + "text": "\nuint8_t IOBosstiary::getBossCurrentLevel(std::shared_ptr player, uint16_t bossId) const {\n\tif (bossId == 0 || !player) {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba0842a5f2ec77986ba160285b95a1c866b6c8b24f69b63c8735e8507f9cf0c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 277, + "startColumn": 6, + "charOffset": 8944, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 275, + "startColumn": 6, + "charOffset": 8888, + "charLength": 1, + "snippet": { + "text": "\n\tauto mType = getMonsterTypeByBossRaceId(bossId);\n\tif (!mType) {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3bca04dc4e88e1e9302bb0f60f4744a5d2d7889cf55686003544bc2ded488e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 287, + "startColumn": 3, + "charOffset": 9237, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 285, + "startColumn": 3, + "charOffset": 9139, + "charLength": 3, + "snippet": { + "text": "\t it != levelInfos.end()) {\n\t\tconst std::vector &infoForCurrentRace = it->second;\n\t\tfor (const auto &raceInfo : infoForCurrentRace) {\n\t\t\tif (currentKills >= raceInfo.kills) {\n\t\t\t\t++level;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88e5542b17b3824a9de5ceac5b0a0eac0ec4df106488643003322f80b777c966" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'calculteRemoveBoss' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 299, + "startColumn": 23, + "charOffset": 9516, + "charLength": 18, + "snippet": { + "text": "calculteRemoveBoss" + } + }, + "contextRegion": { + "startLine": 297, + "startColumn": 23, + "charOffset": 9491, + "charLength": 18, + "snippet": { + "text": "}\n\nuint32_t IOBosstiary::calculteRemoveBoss(uint8_t removeTimes) const {\n\tif (removeTimes < 2) {\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5cc5fd66e00ddb7a03836821650fd99eb3514465ac4084f091cdcca5a74c6fbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "300000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 303, + "startColumn": 9, + "charOffset": 9611, + "charLength": 6, + "snippet": { + "text": "300000" + } + }, + "contextRegion": { + "startLine": 301, + "startColumn": 9, + "charOffset": 9588, + "charLength": 6, + "snippet": { + "text": "\t\treturn 0;\n\t}\n\treturn 300000 * removeTimes - 500000;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a08b5ce1626721778c739e19c1f19cef2290d728971fe339bca9988e8021e29" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "500000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/io_bosstiary.cpp", + "index": 3 + }, + "region": { + "startLine": 303, + "startColumn": 32, + "charOffset": 9634, + "charLength": 6, + "snippet": { + "text": "500000" + } + }, + "contextRegion": { + "startLine": 301, + "startColumn": 32, + "charOffset": 9588, + "charLength": 6, + "snippet": { + "text": "\t\treturn 0;\n\t}\n\treturn 300000 * removeTimes - 500000;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dde809fd57ed37f6bb0ffc2f327326680e0df790b96498bacba1ba28b99c5a5c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioguild.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 15, + "charOffset": 1046, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 15, + "charOffset": 938, + "charLength": 1, + "snippet": { + "text": "\t\tquery << \"SELECT `id`, `name`, `level` FROM `guild_ranks` WHERE `guild_id` = \" << guildId;\n\n\t\tif ((result = db.storeQuery(query.str()))) {\n\t\t\tdo {\n\t\t\t\tguild->addRank(result->getNumber(\"id\"), result->getString(\"name\"), result->getNumber(\"level\"));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bcf3716f80629ccbcd3d43d2d8e29315ce79d7b9e1de1d7a44726538b8c1281" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioguild.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 4, + "charOffset": 1082, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 4, + "charOffset": 1031, + "charLength": 2, + "snippet": { + "text": "\n\t\tif ((result = db.storeQuery(query.str()))) {\n\t\t\tdo {\n\t\t\t\tguild->addRank(result->getNumber(\"id\"), result->getString(\"name\"), result->getNumber(\"level\"));\n\t\t\t} while (result->next());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c551d4418177aee9b544f9618fe06a3de913de1f4db4f898865439f82e27681" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioguild.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 4, + "charOffset": 1082, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 4, + "charOffset": 1031, + "charLength": 2, + "snippet": { + "text": "\n\t\tif ((result = db.storeQuery(query.str()))) {\n\t\t\tdo {\n\t\t\t\tguild->addRank(result->getNumber(\"id\"), result->getString(\"name\"), result->getNumber(\"level\"));\n\t\t\t} while (result->next());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52033dec07aab693f2ff86d48fa6917584cdaf055e86015bdd447c728792b52c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioguild.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 82, + "charOffset": 1168, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 82, + "charOffset": 1032, + "charLength": 6, + "snippet": { + "text": "\t\tif ((result = db.storeQuery(query.str()))) {\n\t\t\tdo {\n\t\t\t\tguild->addRank(result->getNumber(\"id\"), result->getString(\"name\"), result->getNumber(\"level\"));\n\t\t\t} while (result->next());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4aed0891769619110e605283005c77c2d50dc72ef3736431f234dfa3169d4f7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (do loop) is ID-dependent due to variable reference to 'result' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioguild.cpp" + }, + "region": { + "startLine": 29, + "startColumn": 13, + "charOffset": 1219, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 27, + "startColumn": 13, + "charOffset": 1079, + "charLength": 6, + "snippet": { + "text": "\t\t\tdo {\n\t\t\t\tguild->addRank(result->getNumber(\"id\"), result->getString(\"name\"), result->getNumber(\"level\"));\n\t\t\t} while (result->next());\n\t\t}\n\t\treturn guild;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1fa3a0b496fbd527dbda3c3c131c3961bbc319ba3ddbcade0634a943f718edb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioguild.cpp" + }, + "region": { + "startLine": 29, + "startColumn": 21, + "charOffset": 1227, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 27, + "startColumn": 21, + "charOffset": 1079, + "charLength": 4, + "snippet": { + "text": "\t\t\tdo {\n\t\t\t\tguild->addRank(result->getNumber(\"id\"), result->getString(\"name\"), result->getNumber(\"level\"));\n\t\t\t} while (result->next());\n\t\t}\n\t\treturn guild;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b27d36a4de85b312e89206a8ce17e6c33c1eb67497e1fe3958ab4e4f5d8dff8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'guild' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioguild.cpp" + }, + "region": { + "startLine": 36, + "startColumn": 54, + "charOffset": 1332, + "charLength": 5, + "snippet": { + "text": "guild" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 54, + "charOffset": 1276, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid IOGuild::saveGuild(const std::shared_ptr guild) {\n\tif (!guild) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3679e0b3c7eeba22ce02096e49aa6a41eb97a6b6251ad76bd72278fd1f14b32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioguild.cpp" + }, + "region": { + "startLine": 37, + "startColumn": 6, + "charOffset": 1346, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 35, + "startColumn": 6, + "charOffset": 1278, + "charLength": 1, + "snippet": { + "text": "\nvoid IOGuild::saveGuild(const std::shared_ptr guild) {\n\tif (!guild) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1dc7a84dbfc574a3b0658f1e7e7cd034c0f23e121841fde62c86ace1a952c90e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioguild.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 5, + "charOffset": 1598, + "charLength": 12, + "snippet": { + "text": "executeQuery" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 5, + "charOffset": 1483, + "charLength": 12, + "snippet": { + "text": "\tupdateQuery << \"`balance` = \" << guild->getBankBalance();\n\tupdateQuery << \" WHERE `id` = \" << guild->getId();\n\tdb.executeQuery(updateQuery.str());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19482dc9f846582754b1df02b3bc7e709692b1003f86512ee09ed382fd865ce7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioguild.cpp" + }, + "region": { + "startLine": 55, + "startColumn": 6, + "charOffset": 1902, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 6, + "charOffset": 1845, + "charLength": 1, + "snippet": { + "text": "\n\tDBResult_ptr result = db.storeQuery(query.str());\n\tif (!result) {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08e8dcea36b484fe136e3e098824ac1249eb1d27d254e32fd94cb87cabfeaae9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioguild.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 6, + "charOffset": 2299, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 6, + "charOffset": 2221, + "charLength": 1, + "snippet": { + "text": "\n\tDBResult_ptr result = Database::getInstance().storeQuery(query.str());\n\tif (!result) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b3ee2369af14934474d42a911e1ac8ab06ccb0a02b8120eb65a1751a0489d15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioguild.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 2, + "charOffset": 2325, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 2, + "charOffset": 2320, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tdo {\n\t\tuint32_t guild1 = result->getNumber(\"guild1\");\n\t\tif (guildId != guild1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0abb9531f152743599a6f2510c27343de6613eab066d12751a0d72d464a1cbc5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioguild.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 2, + "charOffset": 2325, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 2, + "charOffset": 2320, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tdo {\n\t\tuint32_t guild1 = result->getNumber(\"guild1\");\n\t\tif (guildId != guild1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb118af157e8c96cd59dfd996f8c88a2ac10c4ab11256c2e90120851a0f3bd6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioguild.cpp" + }, + "region": { + "startLine": 71, + "startColumn": 3, + "charOffset": 2332, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 69, + "startColumn": 3, + "charOffset": 2323, + "charLength": 8, + "snippet": { + "text": "\n\tdo {\n\t\tuint32_t guild1 = result->getNumber(\"guild1\");\n\t\tif (guildId != guild1) {\n\t\t\tguildWarVector.push_back(guild1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3405b79086a557c98a1e4c032481bab6827d612d3789612e8b8de0b7f98e974" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (do loop) is ID-dependent due to variable reference to 'result' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioguild.cpp" + }, + "region": { + "startLine": 77, + "startColumn": 11, + "charOffset": 2546, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 75, + "startColumn": 11, + "charOffset": 2464, + "charLength": 6, + "snippet": { + "text": "\t\t\tguildWarVector.push_back(result->getNumber(\"guild2\"));\n\t\t}\n\t} while (result->next());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a906316c32200d1d66890639c7a7013de3fe9f608490a5a83e7cdc3758bb52f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioguild.cpp" + }, + "region": { + "startLine": 77, + "startColumn": 19, + "charOffset": 2554, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 75, + "startColumn": 19, + "charOffset": 2464, + "charLength": 4, + "snippet": { + "text": "\t\t\tguildWarVector.push_back(result->getNumber(\"guild2\"));\n\t\t}\n\t} while (result->next());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "921c06e7247a3420626a8ab9d6c85bca234a79acddb97c923c1f51710f8a5e95" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'gameWorldAuthentication' of similar type ('const std::string &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 22, + "startColumn": 43, + "charOffset": 792, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 43, + "charOffset": 713, + "charLength": 5, + "snippet": { + "text": "#include \"enums/account_errors.hpp\"\n\nbool IOLoginData::gameWorldAuthentication(const std::string &accountDescriptor, const std::string &password, std::string &characterName, uint32_t &accountId, bool oldProtocol) {\n\tAccount account(accountDescriptor);\n\taccount.setProtocolCompat(oldProtocol);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f90d4ae921d9cb594834a3a7b89e9286c9df7bf7bbc90e0ec5aef633c9329b3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 6, + "charOffset": 2216, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 6, + "charOffset": 2069, + "charLength": 1, + "snippet": { + "text": "\tquery << \"SELECT `type` FROM `accounts` WHERE `id` = \" << accountId;\n\tDBResult_ptr result = Database::getInstance().storeQuery(query.str());\n\tif (!result) {\n\t\treturn ACCOUNT_TYPE_NORMAL;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55aca3b47ac656a2937f74cc7eeabd4493e6bf154131487a93f1a77844ea1955" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 16, + "charOffset": 2866, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 16, + "charOffset": 2725, + "charLength": 5, + "snippet": { + "text": "\t\tg_metrics().addUpDownCounter(\"players_online\", -1);\n\t\tquery << \"DELETE FROM `players_online` WHERE `player_id` = \" << guid;\n\t\tupdateOnline.erase(guid);\n\t}\n\tDatabase::getInstance().executeQuery(query.str());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6508308058722a576f1e1d944c29e9c56cacdbe43c9631ac096ed945ce20013a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 89, + "startColumn": 26, + "charOffset": 2907, + "charLength": 12, + "snippet": { + "text": "executeQuery" + } + }, + "contextRegion": { + "startLine": 87, + "startColumn": 26, + "charOffset": 2851, + "charLength": 12, + "snippet": { + "text": "\t\tupdateOnline.erase(guid);\n\t}\n\tDatabase::getInstance().executeQuery(query.str());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afb0fb0db7acb12b438da5ea8b0e0ac0e7b6c6c109ae698ecdc8096d674ebf29" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 97, + "startColumn": 20, + "charOffset": 3412, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 95, + "startColumn": 20, + "charOffset": 3309, + "charLength": 6, + "snippet": { + "text": "\tstd::ostringstream query;\n\tquery << \"SELECT * FROM `players` WHERE `id` = \" << id;\n\treturn loadPlayer(player, db.storeQuery(query.str()), disableIrrelevantInfo);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4491ec9fd0439fbf19985e3922e1aa987b855d6347b48b40ddae6142be84519a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 104, + "startColumn": 20, + "charOffset": 3774, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 102, + "startColumn": 20, + "charOffset": 3650, + "charLength": 6, + "snippet": { + "text": "\tstd::ostringstream query;\n\tquery << \"SELECT * FROM `players` WHERE `name` = \" << db.escapeString(name);\n\treturn loadPlayer(player, db.storeQuery(query.str()), disableIrrelevantInfo);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36fe7f9dcc37ab70ea2cbad441ae28939f5111272881834f54eacb2d95e71858" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 107, + "startColumn": 54, + "charOffset": 3890, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 105, + "startColumn": 54, + "charOffset": 3834, + "charLength": 6, + "snippet": { + "text": "}\n\nbool IOLoginData::loadPlayer(std::shared_ptr player, DBResult_ptr result, bool disableIrrelevantInfo /* = false*/) {\n\tif (!result || !player) {\n\t\tstd::string nullptrType = !result ? \"Result\" : \"Player\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "029d44e2a1ae0404d7874b31afce6f4da506a97fdf07c55e9bb968ea08c342e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'result' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 107, + "startColumn": 75, + "charOffset": 3911, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 105, + "startColumn": 75, + "charOffset": 3834, + "charLength": 6, + "snippet": { + "text": "}\n\nbool IOLoginData::loadPlayer(std::shared_ptr player, DBResult_ptr result, bool disableIrrelevantInfo /* = false*/) {\n\tif (!result || !player) {\n\t\tstd::string nullptrType = !result ? \"Result\" : \"Player\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d524610df5195f36cad0fdbf625d793a20350c8a3c8e2e88235d4fac9b0bbd8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 108, + "startColumn": 6, + "charOffset": 3967, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 6, + "charOffset": 3836, + "charLength": 1, + "snippet": { + "text": "\nbool IOLoginData::loadPlayer(std::shared_ptr player, DBResult_ptr result, bool disableIrrelevantInfo /* = false*/) {\n\tif (!result || !player) {\n\t\tstd::string nullptrType = !result ? \"Result\" : \"Player\";\n\t\tg_logger().warn(\"[{}] - {} is nullptr\", __FUNCTION__, nullptrType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "148239649e2d8989eff1781af3f389e20a1f506b590eafbb9d6f13814f500811" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 108, + "startColumn": 17, + "charOffset": 3978, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 17, + "charOffset": 3836, + "charLength": 1, + "snippet": { + "text": "\nbool IOLoginData::loadPlayer(std::shared_ptr player, DBResult_ptr result, bool disableIrrelevantInfo /* = false*/) {\n\tif (!result || !player) {\n\t\tstd::string nullptrType = !result ? \"Result\" : \"Player\";\n\t\tg_logger().warn(\"[{}] - {} is nullptr\", __FUNCTION__, nullptrType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba8e152a5b84141f14345c0d693d2ee126e384d98e3ce1b463d0d25fa216ab12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 109, + "startColumn": 29, + "charOffset": 4017, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 107, + "startColumn": 29, + "charOffset": 3837, + "charLength": 1, + "snippet": { + "text": "bool IOLoginData::loadPlayer(std::shared_ptr player, DBResult_ptr result, bool disableIrrelevantInfo /* = false*/) {\n\tif (!result || !player) {\n\t\tstd::string nullptrType = !result ? \"Result\" : \"Player\";\n\t\tg_logger().warn(\"[{}] - {} is nullptr\", __FUNCTION__, nullptrType);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ed4eb68b1504a9e8e0b2a8e496d732e5cb5332ef07fccd0c30a3563da458113" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 116, + "startColumn": 3, + "charOffset": 4158, + "charLength": 15, + "snippet": { + "text": "IOLoginDataLoad" + } + }, + "contextRegion": { + "startLine": 114, + "startColumn": 3, + "charOffset": 4138, + "charLength": 15, + "snippet": { + "text": "\ttry {\n\t\t// First\n\t\tIOLoginDataLoad::loadPlayerFirst(player, result);\n\n\t\t// Experience load" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d8aa5e8fedacff8abb131327c3988a266dd906303c37a60a4ea71a5337f0d79" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 201, + "startColumn": 54, + "charOffset": 6444, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 54, + "charOffset": 6388, + "charLength": 6, + "snippet": { + "text": "}\n\nbool IOLoginData::savePlayer(std::shared_ptr player) {\n\tbool success = DBTransaction::executeWithinTransaction([player]() {\n\t\treturn savePlayerGuard(player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46650e4276f000773a4e267b5fff0f2992e1ff13af63cfc7febf14e992fcbe50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 213, + "startColumn": 59, + "charOffset": 6733, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 211, + "startColumn": 59, + "charOffset": 6672, + "charLength": 6, + "snippet": { + "text": "}\n\nbool IOLoginData::savePlayerGuard(std::shared_ptr player) {\n\tif (!player) {\n\t\tthrow DatabaseException(\"Player nullptr in function: \" + std::string(__FUNCTION__));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7644732f698867fa50c8ab602f52d46c2e6c15ce0f819fb4cc4a57120987299d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 214, + "startColumn": 6, + "charOffset": 6748, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 6, + "charOffset": 6674, + "charLength": 1, + "snippet": { + "text": "\nbool IOLoginData::savePlayerGuard(std::shared_ptr player) {\n\tif (!player) {\n\t\tthrow DatabaseException(\"Player nullptr in function: \" + std::string(__FUNCTION__));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e09c8d747d397c03e19150d53bec2b6f8112144a1f87b34655f8104182703d76" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 285, + "startColumn": 6, + "charOffset": 9820, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 283, + "startColumn": 6, + "charOffset": 9679, + "charLength": 1, + "snippet": { + "text": "\tquery << \"SELECT `name` FROM `players` WHERE `id` = \" << guid;\n\tDBResult_ptr result = Database::getInstance().storeQuery(query.str());\n\tif (!result) {\n\t\treturn std::string();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e09c8d747d397c03e19150d53bec2b6f8112144a1f87b34655f8104182703d76" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-return-braced-init-list", + "ruleIndex": 630, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 286, + "startColumn": 10, + "charOffset": 9840, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 284, + "startColumn": 10, + "charOffset": 9743, + "charLength": 3, + "snippet": { + "text": "\tDBResult_ptr result = Database::getInstance().storeQuery(query.str());\n\tif (!result) {\n\t\treturn std::string();\n\t}\n\treturn result->getString(\"name\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7281b32a1e5ed2aa519075014a242436c4e8cf8891f829b80ef655f6d1f4a27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 297, + "startColumn": 6, + "charOffset": 10165, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 295, + "startColumn": 6, + "charOffset": 10028, + "charLength": 1, + "snippet": { + "text": "\tquery << \"SELECT `id` FROM `players` WHERE `name` = \" << db.escapeString(name);\n\tDBResult_ptr result = db.storeQuery(query.str());\n\tif (!result) {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "544e0b29cb6e9c48452a96dd7eec53800eecde43e99b1e3e8c41772e94467724" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'getGuidByNameEx' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 303, + "startColumn": 35, + "charOffset": 10271, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 301, + "startColumn": 35, + "charOffset": 10234, + "charLength": 8, + "snippet": { + "text": "}\n\nbool IOLoginData::getGuidByNameEx(uint32_t &guid, bool &specialVip, std::string &name) {\n\tDatabase &db = Database::getInstance();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7da830626a8830570fc9b824da314cd34aefdd2a230d1966818c2b1674bd86ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 309, + "startColumn": 6, + "charOffset": 10566, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 307, + "startColumn": 6, + "charOffset": 10395, + "charLength": 1, + "snippet": { + "text": "\tquery << \"SELECT `name`, `id`, `group_id`, `account_id` FROM `players` WHERE `name` = \" << db.escapeString(name);\n\tDBResult_ptr result = db.storeQuery(query.str());\n\tif (!result) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7f3d5887596f2daede78d032ccb4dc17b763b87f46a68e91a8b7bc041dcce2b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 316, + "startColumn": 16, + "charOffset": 10777, + "charLength": 5, + "snippet": { + "text": "group" + } + }, + "contextRegion": { + "startLine": 314, + "startColumn": 16, + "charOffset": 10632, + "charLength": 5, + "snippet": { + "text": "\tguid = result->getNumber(\"id\");\n\tif (auto group = g_game().groups.getGroup(result->getNumber(\"group_id\"))) {\n\t\tspecialVip = group->flags[Groups::getFlagNumber(PlayerFlags_t::SpecialVIP)];\n\t} else {\n\t\tspecialVip = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10d5e9c361d522c753b904b29ac9f78a67927cda8f33c830ebc8160298e7d951" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 330, + "startColumn": 6, + "charOffset": 11158, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 328, + "startColumn": 6, + "charOffset": 11101, + "charLength": 1, + "snippet": { + "text": "\n\tDBResult_ptr result = db.storeQuery(query.str());\n\tif (!result) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "444dec49e24c7675cd0d88a2c8aca08d6310c56ac04dde7838d7110843beb4df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 341, + "startColumn": 26, + "charOffset": 11472, + "charLength": 12, + "snippet": { + "text": "executeQuery" + } + }, + "contextRegion": { + "startLine": 339, + "startColumn": 26, + "charOffset": 11318, + "charLength": 12, + "snippet": { + "text": "\tstd::ostringstream query;\n\tquery << \"UPDATE `players` SET `balance` = `balance` + \" << bankBalance << \" WHERE `id` = \" << guid;\n\tDatabase::getInstance().executeQuery(query.str());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f22216fc03ee9a167df60260ad54650050bbf7d4e1fa0d35b93ae18c1fa19371" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 358, + "startColumn": 3, + "charOffset": 12200, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 356, + "startColumn": 3, + "charOffset": 12084, + "charLength": 2, + "snippet": { + "text": "\tif (const auto &result = Database::getInstance().storeQuery(query)) {\n\t\tentries.reserve(result->countResults());\n\t\tdo {\n\t\t\tentries.emplace_back(\n\t\t\t\tresult->getNumber(\"player_id\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d981d2c791b4de55fac43931fceb01e4baf4438237513c70d745b579442bb536" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 358, + "startColumn": 3, + "charOffset": 12200, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 356, + "startColumn": 3, + "charOffset": 12084, + "charLength": 2, + "snippet": { + "text": "\tif (const auto &result = Database::getInstance().storeQuery(query)) {\n\t\tentries.reserve(result->countResults());\n\t\tdo {\n\t\t\tentries.emplace_back(\n\t\t\t\tresult->getNumber(\"player_id\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca6038829043e34e47af15056dcd4490c3399a5fd617eb4dd55d5eee424122a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 359, + "startColumn": 12, + "charOffset": 12216, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 357, + "startColumn": 12, + "charOffset": 12155, + "charLength": 12, + "snippet": { + "text": "\t\tentries.reserve(result->countResults());\n\t\tdo {\n\t\t\tentries.emplace_back(\n\t\t\t\tresult->getNumber(\"player_id\"),\n\t\t\t\tresult->getString(\"name\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81a7ca86a797a6350d8275cd881e4cd97d34296fb3d247949ffcc313e1475cf6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (do loop) is ID-dependent due to variable reference to 'result' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 366, + "startColumn": 12, + "charOffset": 12450, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 364, + "startColumn": 12, + "charOffset": 12386, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tresult->getNumber(\"notify\") != 0\n\t\t\t);\n\t\t} while (result->next());\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "589ade875f62f8a591a5979c3d22851acf7dcc448638fae4247dd64096ce6710" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 366, + "startColumn": 20, + "charOffset": 12458, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 364, + "startColumn": 20, + "charOffset": 12386, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tresult->getNumber(\"notify\") != 0\n\t\t\t);\n\t\t} while (result->next());\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05f0b7c98e378ece47f78e6dc63db0c037a1b7734c3f13651e3f15f3fe0e6b45" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 388, + "startColumn": 15, + "charOffset": 13710, + "charLength": 12, + "snippet": { + "text": "executeQuery" + } + }, + "contextRegion": { + "startLine": 386, + "startColumn": 15, + "charOffset": 13497, + "charLength": 12, + "snippet": { + "text": "void IOLoginData::removeVIPEntry(uint32_t accountId, uint32_t guid) {\n\tstd::string query = fmt::format(\"DELETE FROM `account_viplist` WHERE `account_id` = {} AND `player_id` = {}\", accountId, guid);\n\tg_database().executeQuery(query);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9103c81cfdda2836712e3c53c48e281b426190ddd75a6d9e0dd54a860481f374" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'getVIPGroupEntries' of similar type ('uint32_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 391, + "startColumn": 60, + "charOffset": 13793, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 389, + "startColumn": 60, + "charOffset": 13731, + "charLength": 8, + "snippet": { + "text": "}\n\nstd::vector IOLoginData::getVIPGroupEntries(uint32_t accountId, uint32_t guid) {\n\tstd::string query = fmt::format(\"SELECT `id`, `name`, `customizable` FROM `account_vipgroups` WHERE `account_id` = {}\", accountId);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac9a151fada520888789cd82f4f3f3b6c3cd372ac0f0103ff90e1b4d2b3da0e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-unused-parameters", + "ruleIndex": 612, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'guid' is unused" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 391, + "startColumn": 89, + "charOffset": 13822, + "charLength": 4, + "snippet": { + "text": "guid" + } + }, + "contextRegion": { + "startLine": 389, + "startColumn": 89, + "charOffset": 13731, + "charLength": 4, + "snippet": { + "text": "}\n\nstd::vector IOLoginData::getVIPGroupEntries(uint32_t accountId, uint32_t guid) {\n\tstd::string query = fmt::format(\"SELECT `id`, `name`, `customizable` FROM `account_vipgroups` WHERE `account_id` = {}\", accountId);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c148386817377b2a5e3a4226b2c280bf0a4203f0aff54265222d5285bd19647" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 399, + "startColumn": 3, + "charOffset": 14108, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 397, + "startColumn": 3, + "charOffset": 14062, + "charLength": 2, + "snippet": { + "text": "\t\tentries.reserve(result->countResults());\n\n\t\tdo {\n\t\t\tentries.emplace_back(\n\t\t\t\tresult->getNumber(\"id\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc231eaec15bde9ce033d53e4bd5ea7ea51f2e36d20fbf82a3bfeb38eff1f57c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 399, + "startColumn": 3, + "charOffset": 14108, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 397, + "startColumn": 3, + "charOffset": 14062, + "charLength": 2, + "snippet": { + "text": "\t\tentries.reserve(result->countResults());\n\n\t\tdo {\n\t\t\tentries.emplace_back(\n\t\t\t\tresult->getNumber(\"id\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9f12169e9b63784290b0bcaf42e63072a153f0c950f71b914ef2b049d3d4fd8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 400, + "startColumn": 12, + "charOffset": 14124, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 398, + "startColumn": 12, + "charOffset": 14105, + "charLength": 12, + "snippet": { + "text": "\n\t\tdo {\n\t\t\tentries.emplace_back(\n\t\t\t\tresult->getNumber(\"id\"),\n\t\t\t\tresult->getString(\"name\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f52b133418e8232f1b2fd2003adaf557a399fcecc962242eaa435e542419ab7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in ternary expression result" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 403, + "startColumn": 55, + "charOffset": 14261, + "charLength": 5, + "snippet": { + "text": "false" + } + }, + "contextRegion": { + "startLine": 401, + "startColumn": 55, + "charOffset": 14138, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tresult->getNumber(\"id\"),\n\t\t\t\tresult->getString(\"name\"),\n\t\t\t\tresult->getNumber(\"customizable\") == 0 ? false : true\n\t\t\t);\n\t\t} while (result->next());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "18631aa57c149f21026d0677cf189d99efdd4f6947ee8394fbed65aafd4bd3f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Expression can be simplified" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 403, + "startColumn": 61, + "charOffset": 14267, + "charLength": 1, + "snippet": { + "text": ":" + } + }, + "contextRegion": { + "startLine": 401, + "startColumn": 61, + "charOffset": 14138, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tresult->getNumber(\"id\"),\n\t\t\t\tresult->getString(\"name\"),\n\t\t\t\tresult->getNumber(\"customizable\") == 0 ? false : true\n\t\t\t);\n\t\t} while (result->next());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "904f816ef881e794b9711708271bc67bc8b9c168110c31187940648eac358c4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (do loop) is ID-dependent due to variable reference to 'result' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 405, + "startColumn": 12, + "charOffset": 14291, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 403, + "startColumn": 12, + "charOffset": 14207, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tresult->getNumber(\"customizable\") == 0 ? false : true\n\t\t\t);\n\t\t} while (result->next());\n\t}\n\treturn entries;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00b8a65e3ff5fff660743cdbd5669e8c5ad8f9434aee219051145be671f984f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 405, + "startColumn": 20, + "charOffset": 14299, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 403, + "startColumn": 20, + "charOffset": 14207, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tresult->getNumber(\"customizable\") == 0 ? false : true\n\t\t\t);\n\t\t} while (result->next());\n\t}\n\treturn entries;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b32ae97a2d7ec9cd1797b8f69a827d6251dc8430c7ffa000a30bc8f0a21b99bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 426, + "startColumn": 15, + "charOffset": 15570, + "charLength": 12, + "snippet": { + "text": "executeQuery" + } + }, + "contextRegion": { + "startLine": 424, + "startColumn": 15, + "charOffset": 15352, + "charLength": 12, + "snippet": { + "text": "void IOLoginData::removeVIPGroupEntry(uint8_t groupId, uint32_t accountId) {\n\tstd::string query = fmt::format(\"DELETE FROM `account_vipgroups` WHERE `id` = {} AND `account_id` = {}\", groupId, accountId);\n\tg_database().executeQuery(query);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a7797561ef9cdfa399347941c0eb5447d0bbd053c1597c174d5cfa651f8ed9b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.cpp" + }, + "region": { + "startLine": 438, + "startColumn": 15, + "charOffset": 16272, + "charLength": 12, + "snippet": { + "text": "executeQuery" + } + }, + "contextRegion": { + "startLine": 436, + "startColumn": 15, + "charOffset": 16045, + "charLength": 12, + "snippet": { + "text": "void IOLoginData::removeGuidVIPGroupEntry(uint32_t accountId, uint32_t guid) {\n\tstd::string query = fmt::format(\"DELETE FROM `account_vipgrouplist` WHERE `account_id` = {} AND `player_id` = {}\", accountId, guid);\n\tg_database().executeQuery(query);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74513e1fe21d1b8bed8fa2ad80d08831e52adb5c1fa5514978a2f3bb07a9f3a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'IOLoginData::gameWorldAuthentication' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iologindata.hpp", + "index": 1 + }, + "region": { + "startLine": 20, + "startColumn": 14, + "charOffset": 608, + "charLength": 23, + "snippet": { + "text": "gameWorldAuthentication" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 14, + "charOffset": 567, + "charLength": 23, + "snippet": { + "text": "class IOLoginData {\npublic:\n\tstatic bool gameWorldAuthentication(const std::string &accountDescriptor, const std::string &sessionOrPassword, std::string &characterName, uint32_t &accountId, bool oldProcotol);\n\tstatic uint8_t getAccountType(uint32_t accountId);\n\tstatic void updateOnlineStatus(uint32_t guid, bool login);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b4de77fbdd0ef42ce3118c42effafb7d9328a541d1be900c362567a4d75cfad2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'result' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 21, + "startColumn": 66, + "charOffset": 785, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 19, + "startColumn": 66, + "charOffset": 692, + "charLength": 6, + "snippet": { + "text": "#include \"utils/tools.hpp\"\n\nvoid IOLoginDataLoad::loadItems(ItemsMap &itemsMap, DBResult_ptr result, const std::shared_ptr &player) {\n\ttry {\n\t\tdo {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9e53d3c6e28f22ec1c447722222c97c4e47e78615aa762140f29d812df0f611" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 23, + "startColumn": 3, + "charOffset": 843, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 21, + "startColumn": 3, + "charOffset": 720, + "charLength": 2, + "snippet": { + "text": "void IOLoginDataLoad::loadItems(ItemsMap &itemsMap, DBResult_ptr result, const std::shared_ptr &player) {\n\ttry {\n\t\tdo {\n\t\t\tuint32_t sid = result->getNumber(\"sid\");\n\t\t\tuint32_t pid = result->getNumber(\"pid\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85b86a82c62803af668d81310a61abcc004dd77529ca176677c77c2c6c17d6d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 23, + "startColumn": 3, + "charOffset": 843, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 21, + "startColumn": 3, + "charOffset": 720, + "charLength": 2, + "snippet": { + "text": "void IOLoginDataLoad::loadItems(ItemsMap &itemsMap, DBResult_ptr result, const std::shared_ptr &player) {\n\ttry {\n\t\tdo {\n\t\t\tuint32_t sid = result->getNumber(\"sid\");\n\t\t\tuint32_t pid = result->getNumber(\"pid\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d985fb726d4082741030cde2ef2abdf72f86dd544844c8604247b3bd18434623" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 24, + "startColumn": 4, + "charOffset": 851, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 22, + "startColumn": 4, + "charOffset": 834, + "charLength": 8, + "snippet": { + "text": "\ttry {\n\t\tdo {\n\t\t\tuint32_t sid = result->getNumber(\"sid\");\n\t\t\tuint32_t pid = result->getNumber(\"pid\");\n\t\t\tuint16_t type = result->getNumber(\"itemtype\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90df1460755d4ad19144a9a82d2f94687172a5902b4bb0087d6d5a101539334c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 25, + "startColumn": 4, + "charOffset": 905, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 4, + "charOffset": 841, + "charLength": 8, + "snippet": { + "text": "\t\tdo {\n\t\t\tuint32_t sid = result->getNumber(\"sid\");\n\t\t\tuint32_t pid = result->getNumber(\"pid\");\n\t\t\tuint16_t type = result->getNumber(\"itemtype\");\n\t\t\tuint16_t count = result->getNumber(\"count\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f017f2e08c0e63c98ce0cc6302e1891e29130fda3b3faf71e3f0f35fca89291" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 4, + "charOffset": 959, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 4, + "charOffset": 848, + "charLength": 8, + "snippet": { + "text": "\t\t\tuint32_t sid = result->getNumber(\"sid\");\n\t\t\tuint32_t pid = result->getNumber(\"pid\");\n\t\t\tuint16_t type = result->getNumber(\"itemtype\");\n\t\t\tuint16_t count = result->getNumber(\"count\");\n\t\t\tunsigned long attrSize;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90e7f06ac026d6a4809a57213ee7173c39f454cf4700ab60545518c0cc3aecc4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 4, + "charOffset": 1019, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 4, + "charOffset": 902, + "charLength": 8, + "snippet": { + "text": "\t\t\tuint32_t pid = result->getNumber(\"pid\");\n\t\t\tuint16_t type = result->getNumber(\"itemtype\");\n\t\t\tuint16_t count = result->getNumber(\"count\");\n\t\t\tunsigned long attrSize;\n\t\t\tconst char* attr = result->getStream(\"attributes\", attrSize);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef2dbd906ffb60502ef654ebd4421918150501ac7f0284cf53fe48434a8b01da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-runtime-int", + "ruleIndex": 546, + "kind": "fail", + "level": "warning", + "message": { + "text": "consider replacing 'unsigned long' with 'uint64'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 4, + "charOffset": 1077, + "charLength": 8, + "snippet": { + "text": "unsigned" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 4, + "charOffset": 956, + "charLength": 8, + "snippet": { + "text": "\t\t\tuint16_t type = result->getNumber(\"itemtype\");\n\t\t\tuint16_t count = result->getNumber(\"count\");\n\t\t\tunsigned long attrSize;\n\t\t\tconst char* attr = result->getStream(\"attributes\", attrSize);\n\t\t\tPropStream propStream;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "027687f3e39be08666bd99bab0e2435e82717cfcf67fd14dd9dc8927a9f5d9bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'attrSize' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 18, + "charOffset": 1091, + "charLength": 8, + "snippet": { + "text": "attrSize" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 18, + "charOffset": 956, + "charLength": 8, + "snippet": { + "text": "\t\t\tuint16_t type = result->getNumber(\"itemtype\");\n\t\t\tuint16_t count = result->getNumber(\"count\");\n\t\t\tunsigned long attrSize;\n\t\t\tconst char* attr = result->getStream(\"attributes\", attrSize);\n\t\t\tPropStream propStream;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26e394f0f08ab7ea1ee1001d02be7f7189acf030046ebd5f53d8122101ff66bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 48, + "startColumn": 20, + "charOffset": 1996, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 20, + "charOffset": 1958, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tcontinue;\n\t\t\t}\n\t\t} while (result->next());\n\t} catch (const std::exception &e) {\n\t\tg_logger().error(\"[{}] - General exception during item loading: {}\", __FUNCTION__, e.what());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b3fb2d2198b525a5941d9d7a4104c3d0fc42922c09a11acff8a5d8ac0c3bad5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 54, + "startColumn": 61, + "charOffset": 2204, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 52, + "startColumn": 61, + "charOffset": 2141, + "charLength": 6, + "snippet": { + "text": "}\n\nbool IOLoginDataLoad::preLoadPlayer(std::shared_ptr player, const std::string &name) {\n\tDatabase &db = Database::getInstance();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce2e5e4fd8f69b129860c76fbf8c7d6e7b92986da225449b15292f299d1bd269" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 60, + "startColumn": 6, + "charOffset": 2483, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 6, + "charOffset": 2308, + "charLength": 1, + "snippet": { + "text": "\tquery << \"SELECT `id`, `account_id`, `group_id`, `deletion` FROM `players` WHERE `name` = \" << db.escapeString(name);\n\tDBResult_ptr result = db.storeQuery(query.str());\n\tif (!result) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1dfb8fa4a9b54dbcf51e3284072b546a012e7d8bdad488c05a7a4d5de631c5c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 6, + "charOffset": 2733, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 6, + "charOffset": 2587, + "charLength": 1, + "snippet": { + "text": "\tplayer->setGUID(result->getNumber(\"id\"));\n\tconst auto &group = g_game().groups.getGroup(result->getNumber(\"group_id\"));\n\tif (!group) {\n\t\tg_logger().error(\"Player {} has group id {} which doesn't exist\", player->name, result->getNumber(\"group_id\"));\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44d4dd148cac91c1db7f16c1ab4c2b8ecbb968754d2c7ae6c5410c75cfeaf18c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 108, + "startColumn": 63, + "charOffset": 4388, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 63, + "charOffset": 4323, + "charLength": 6, + "snippet": { + "text": "}\n\nbool IOLoginDataLoad::loadPlayerFirst(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75758d963b04425096db68083b9a1c85fca5498b9808cf36f3f8190fe18c8fec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'result' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 108, + "startColumn": 84, + "charOffset": 4409, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 84, + "charOffset": 4323, + "charLength": 6, + "snippet": { + "text": "}\n\nbool IOLoginDataLoad::loadPlayerFirst(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e3c594a57f55e644771d80ec7d5ac81ef5f73df52a01fd5c2664d7bce38065b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 109, + "startColumn": 6, + "charOffset": 4424, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 107, + "startColumn": 6, + "charOffset": 4325, + "charLength": 1, + "snippet": { + "text": "\nbool IOLoginDataLoad::loadPlayerFirst(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9bda84c9bce9c3414c93b73cd0679e1e038da94bfa6ab0812e8bea7cb44afac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 109, + "startColumn": 17, + "charOffset": 4435, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 107, + "startColumn": 17, + "charOffset": 4325, + "charLength": 1, + "snippet": { + "text": "\nbool IOLoginDataLoad::loadPlayerFirst(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bfbdc82878bb17e5aad42906319aa1279f4c2c5485a529c09616b11d36f32fea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 117, + "startColumn": 6, + "charOffset": 4661, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 115, + "startColumn": 6, + "charOffset": 4612, + "charLength": 1, + "snippet": { + "text": "\tplayer->name = result->getString(\"name\");\n\n\tif (!player->getAccount()) {\n\t\tplayer->setAccount(result->getNumber(\"account_id\"));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "026ce0cb6f234e65540546def9f702a632cea0e87cd63466b855857f2ea0e079" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 118, + "startColumn": 11, + "charOffset": 4696, + "charLength": 10, + "snippet": { + "text": "setAccount" + } + }, + "contextRegion": { + "startLine": 116, + "startColumn": 11, + "charOffset": 4655, + "charLength": 10, + "snippet": { + "text": "\n\tif (!player->getAccount()) {\n\t\tplayer->setAccount(result->getNumber(\"account_id\"));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbab0031ae498b53f1a26f8779dd500313944e61113300581d88ebe993aa6e3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 122, + "startColumn": 6, + "charOffset": 4848, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 120, + "startColumn": 6, + "charOffset": 4754, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto &group = g_game().groups.getGroup(result->getNumber(\"group_id\"));\n\tif (!group) {\n\t\tg_logger().error(\"Player {} has group id {} which doesn't exist\", player->name, result->getNumber(\"group_id\"));\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0113a71e401cb2c5bc87620eddc2ea7bc1546fa3353cedbc5124d6245089208" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-runtime-int", + "ruleIndex": 546, + "kind": "fail", + "level": "warning", + "message": { + "text": "consider replacing 'unsigned short' with 'uint16'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 138, + "startColumn": 56, + "charOffset": 5704, + "charLength": 8, + "snippet": { + "text": "unsigned" + } + }, + "contextRegion": { + "startLine": 136, + "startColumn": 56, + "charOffset": 5480, + "charLength": 8, + "snippet": { + "text": "\tplayer->setPronoun(static_cast(result->getNumber(\"pronoun\")));\n\tplayer->level = std::max(1, result->getNumber(\"level\"));\n\tplayer->soul = static_cast(result->getNumber(\"soul\"));\n\tplayer->capacity = result->getNumber(\"cap\") * 100;\n\tplayer->mana = result->getNumber(\"mana\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62e9569ad22c9de473c97718a29bfaae5c8d64d7b2f23486d2dda602f55df012" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 139, + "startColumn": 58, + "charOffset": 5787, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 137, + "startColumn": 58, + "charOffset": 5571, + "charLength": 3, + "snippet": { + "text": "\tplayer->level = std::max(1, result->getNumber(\"level\"));\n\tplayer->soul = static_cast(result->getNumber(\"soul\"));\n\tplayer->capacity = result->getNumber(\"cap\") * 100;\n\tplayer->mana = result->getNumber(\"mana\");\n\tplayer->manaMax = result->getNumber(\"manamax\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3b02db837fec42b73e6ec64629446d734523c44186935b897ec653bf3788ec1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 144, + "startColumn": 2, + "charOffset": 6044, + "charLength": 8, + "snippet": { + "text": "uint64_t" + } + }, + "contextRegion": { + "startLine": 142, + "startColumn": 2, + "charOffset": 5904, + "charLength": 8, + "snippet": { + "text": "\tplayer->magLevel = result->getNumber(\"maglevel\");\n\tuint64_t nextManaCount = player->vocation->getReqMana(player->magLevel + 1);\n\tuint64_t manaSpent = result->getNumber(\"manaspent\");\n\tif (manaSpent > nextManaCount) {\n\t\tmanaSpent = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b48bd5d3b3ce89b450f47c84d560c576711ab4d98216ffb194c23738056930fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 164, + "startColumn": 85, + "charOffset": 7364, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 162, + "startColumn": 85, + "charOffset": 7151, + "charLength": 4, + "snippet": { + "text": "\tplayer->lastLoginSaved = result->getNumber(\"lastlogin\");\n\tplayer->lastLogout = result->getNumber(\"lastlogout\");\n\tplayer->offlineTrainingTime = result->getNumber(\"offlinetraining_time\") * 1000;\n\tauto skill = result->getInt8FromString(result->getString(\"offlinetraining_skill\"), __FUNCTION__);\n\tplayer->setOfflineTrainingSkill(skill);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fb34fa0defdf05ac87b03911e3532f0e363308a3ae9bcdbf321d9793472a52c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 168, + "startColumn": 6, + "charOffset": 7603, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 166, + "startColumn": 6, + "charOffset": 7469, + "charLength": 1, + "snippet": { + "text": "\tplayer->setOfflineTrainingSkill(skill);\n\tconst auto &town = g_game().map.towns.getTown(result->getNumber(\"town_id\"));\n\tif (!town) {\n\t\tg_logger().error(\"Player {} has town id {} which doesn't exist\", player->name, result->getNumber(\"town_id\"));\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1dfb8fa4a9b54dbcf51e3284072b546a012e7d8bdad488c05a7a4d5de631c5c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 190, + "startColumn": 68, + "charOffset": 8463, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 188, + "startColumn": 68, + "charOffset": 8393, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerExperience(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5393f20fccc47717dbc1fb41feb96a60e8ec8a23f166add73f6218de5632330a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'result' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 190, + "startColumn": 89, + "charOffset": 8484, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 188, + "startColumn": 89, + "charOffset": 8393, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerExperience(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed9f552905a850c2af5be38c1e675e48666ed2434fa1c2e88815ab8a658c7d7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 191, + "startColumn": 6, + "charOffset": 8499, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 189, + "startColumn": 6, + "charOffset": 8395, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerExperience(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95e89ee91021258cbd7dda65045ea887200d0938352169026933611354e113cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 191, + "startColumn": 17, + "charOffset": 8510, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 189, + "startColumn": 17, + "charOffset": 8395, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerExperience(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9828c705dc9884a3b464479234326881f7c0d026864c41ac92c7984fdf153308" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 196, + "startColumn": 2, + "charOffset": 8629, + "charLength": 8, + "snippet": { + "text": "uint64_t" + } + }, + "contextRegion": { + "startLine": 194, + "startColumn": 2, + "charOffset": 8624, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tuint64_t experience = result->getNumber(\"experience\");\n\tuint64_t currExpCount = Player::getExpForLevel(player->level);\n\tuint64_t nextExpCount = Player::getExpForLevel(player->level + 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "582ed843e7b8715780629490b85221c8e0a11f8aaea13a7c530a232e01d70a2d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 213, + "startColumn": 67, + "charOffset": 9252, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 211, + "startColumn": 67, + "charOffset": 9183, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerBlessings(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75758d963b04425096db68083b9a1c85fca5498b9808cf36f3f8190fe18c8fec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'result' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 213, + "startColumn": 88, + "charOffset": 9273, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 211, + "startColumn": 88, + "charOffset": 9183, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerBlessings(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e3c594a57f55e644771d80ec7d5ac81ef5f73df52a01fd5c2664d7bce38065b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 214, + "startColumn": 6, + "charOffset": 9288, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 6, + "charOffset": 9185, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerBlessings(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9bda84c9bce9c3414c93b73cd0679e1e038da94bfa6ab0812e8bea7cb44afac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 214, + "startColumn": 17, + "charOffset": 9299, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 17, + "charOffset": 9185, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerBlessings(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bfbdc82878bb17e5aad42906319aa1279f4c2c5485a529c09616b11d36f32fea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 219, + "startColumn": 2, + "charOffset": 9418, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 217, + "startColumn": 2, + "charOffset": 9413, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (int i = 1; i <= 8; i++) {\n\t\tplayer->addBlessing(static_cast(i), static_cast(result->getNumber(fmt::format(\"blessings{}\", i))));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc33c9af270f8f5c777eea464b1a189826d52b9330a7d654121d36a41516c9ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-3", + "ruleIndex": 458, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-3: The loop-counter shall not be modified within condition or statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 219, + "startColumn": 2, + "charOffset": 9418, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 217, + "startColumn": 2, + "charOffset": 9413, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (int i = 1; i <= 8; i++) {\n\t\tplayer->addBlessing(static_cast(i), static_cast(result->getNumber(fmt::format(\"blessings{}\", i))));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2920e434541fa9052eaf1e9ee8f09156dd42d54ec5d63018720e472ee8bba17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 219, + "startColumn": 23, + "charOffset": 9439, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 217, + "startColumn": 23, + "charOffset": 9413, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tfor (int i = 1; i <= 8; i++) {\n\t\tplayer->addBlessing(static_cast(i), static_cast(result->getNumber(fmt::format(\"blessings{}\", i))));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd55c13adf28aaa78e471ee8c7ef51395fdca9bedd79dbf9e52c9bfe12bf8598" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 224, + "startColumn": 68, + "charOffset": 9652, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 222, + "startColumn": 68, + "charOffset": 9582, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerConditions(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9734189cc01d5810475002b42fa13dc3c61a7403b4dcf35ce516fe7c82f5845e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'result' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 224, + "startColumn": 89, + "charOffset": 9673, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 222, + "startColumn": 89, + "charOffset": 9582, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerConditions(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6c14e4fbc68361aa839ad2b37d64c9005e76673a8b9f48d93966e45ad454525" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 225, + "startColumn": 6, + "charOffset": 9688, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 223, + "startColumn": 6, + "charOffset": 9584, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerConditions(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8fef4b8840344d428ce3977a2a8682fc0e0fa4bd839233799ff7ae08f2a9105" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 225, + "startColumn": 17, + "charOffset": 9699, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 223, + "startColumn": 17, + "charOffset": 9584, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerConditions(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b0a3833f6b8781638521efca0cde76b7855faefde296a354763bbbcd9dfee35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-runtime-int", + "ruleIndex": 546, + "kind": "fail", + "level": "warning", + "message": { + "text": "consider replacing 'unsigned long' with 'uint64'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 230, + "startColumn": 2, + "charOffset": 9818, + "charLength": 8, + "snippet": { + "text": "unsigned" + } + }, + "contextRegion": { + "startLine": 228, + "startColumn": 2, + "charOffset": 9813, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tunsigned long attrSize;\n\tconst char* attr = result->getStream(\"conditions\", attrSize);\n\tPropStream propStream;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65477a7cf5ce585d04028010d287f512a07a84f41bd605463b70105fe276ca91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'attrSize' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 230, + "startColumn": 16, + "charOffset": 9832, + "charLength": 8, + "snippet": { + "text": "attrSize" + } + }, + "contextRegion": { + "startLine": 228, + "startColumn": 16, + "charOffset": 9813, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tunsigned long attrSize;\n\tconst char* attr = result->getStream(\"conditions\", attrSize);\n\tPropStream propStream;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc8a14e608a0ec317c9fdf7a7902bf40481c8d00282952a2ccbee558a37fa478" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 236, + "startColumn": 2, + "charOffset": 10023, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 234, + "startColumn": 2, + "charOffset": 9963, + "charLength": 5, + "snippet": { + "text": "\n\tauto condition = Condition::createCondition(propStream);\n\twhile (condition) {\n\t\tif (condition->unserialize(propStream)) {\n\t\t\tplayer->storedConditionList.emplace_back(condition);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01f8602f58525a6d8fbb6a4602d472342229b6b4c4f0f80b33381983099903b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'condition' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 236, + "startColumn": 9, + "charOffset": 10030, + "charLength": 9, + "snippet": { + "text": "condition" + } + }, + "contextRegion": { + "startLine": 234, + "startColumn": 9, + "charOffset": 9963, + "charLength": 9, + "snippet": { + "text": "\n\tauto condition = Condition::createCondition(propStream);\n\twhile (condition) {\n\t\tif (condition->unserialize(propStream)) {\n\t\t\tplayer->storedConditionList.emplace_back(condition);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "abc2c9894f03f7f2127a598469dad0d61d9b79e828b695d1b7fdc975a4024765" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 238, + "startColumn": 32, + "charOffset": 10118, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 236, + "startColumn": 32, + "charOffset": 10022, + "charLength": 12, + "snippet": { + "text": "\twhile (condition) {\n\t\tif (condition->unserialize(propStream)) {\n\t\t\tplayer->storedConditionList.emplace_back(condition);\n\t\t}\n\t\tcondition = Condition::createCondition(propStream);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44225cc128d8e644f6fdbbb049edd264e71dc983de755117a9b4f96a3d2515d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 244, + "startColumn": 71, + "charOffset": 10277, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 71, + "charOffset": 10204, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerDefaultOutfit(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a708e169d0a90cdeb66c24326bcf9a295f4a27ad2bb13641ee359d8e18791f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'result' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 244, + "startColumn": 92, + "charOffset": 10298, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 92, + "charOffset": 10204, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerDefaultOutfit(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85200be14d78318531b8c5e7b437d4248c990e98e95c17a6900aa714d7ba18b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 245, + "startColumn": 6, + "charOffset": 10313, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 243, + "startColumn": 6, + "charOffset": 10206, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerDefaultOutfit(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88dd37acc4b201713cee87ed1a7ff82297674ff00e2596d6d0bb741282d155e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 245, + "startColumn": 17, + "charOffset": 10324, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 243, + "startColumn": 17, + "charOffset": 10206, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerDefaultOutfit(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2de74340058560c4d7ffc8fbad09ab925dde52284200528f6799a8aa0a149d2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 275, + "startColumn": 69, + "charOffset": 12394, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 273, + "startColumn": 69, + "charOffset": 12323, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerSkullSystem(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01faf314e9f46889bd1170ad370a7d543750bc619eefe9b579e70b389da154eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'result' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 275, + "startColumn": 90, + "charOffset": 12415, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 273, + "startColumn": 90, + "charOffset": 12323, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerSkullSystem(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f7f97d135da7ef08a92991b7f42cf3d2326be8a9d332d46a60e41846c3f458e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 276, + "startColumn": 6, + "charOffset": 12430, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 274, + "startColumn": 6, + "charOffset": 12325, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerSkullSystem(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5090fb8be83afe009450e7e05848d752bdce761775627332e978d07404537289" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 276, + "startColumn": 17, + "charOffset": 12441, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 274, + "startColumn": 17, + "charOffset": 12325, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerSkullSystem(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7172222998142eaba891778100cb9c6acbd6dadd691d11dfdcb8ca19dd382967" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 282, + "startColumn": 72, + "charOffset": 12689, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 280, + "startColumn": 72, + "charOffset": 12558, + "charLength": 4, + "snippet": { + "text": "\n\tif (g_game().getWorldType() != WORLD_TYPE_PVP_ENFORCED) {\n\t\tconst time_t skullSeconds = result->getNumber(\"skulltime\") - time(nullptr);\n\t\tif (skullSeconds > 0) {\n\t\t\t// ensure that we round up the number of ticks" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dcabbdb656436377468cc53b6ec6db4dbc91e538f2155bdf528ad0053acbaf16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 287, + "startColumn": 4, + "charOffset": 12828, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 285, + "startColumn": 4, + "charOffset": 12780, + "charLength": 8, + "snippet": { + "text": "\t\t\tplayer->skullTicks = (skullSeconds + 2);\n\n\t\t\tuint16_t skull = result->getNumber(\"skull\");\n\t\t\tif (skull == SKULL_RED) {\n\t\t\t\tplayer->skull = SKULL_RED;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "160d12dcae483d7b1169e8a54be59411eda0847b88bd20ce1fcb088471f2a1bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 288, + "startColumn": 4, + "charOffset": 12886, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 286, + "startColumn": 4, + "charOffset": 12824, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tuint16_t skull = result->getNumber(\"skull\");\n\t\t\tif (skull == SKULL_RED) {\n\t\t\t\tplayer->skull = SKULL_RED;\n\t\t\t} else if (skull == SKULL_BLACK) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f19a5878142af79a2753e23aa28ccbb88f9b5dd81619a717087e63f1e51d376" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 297, + "startColumn": 63, + "charOffset": 13091, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 295, + "startColumn": 63, + "charOffset": 13026, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerSkill(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1234d280cfd2e29ad9a8c1eb70ce2621c59a5b25c7ab7bc047e63f1add8e2d41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'result' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 297, + "startColumn": 84, + "charOffset": 13112, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 295, + "startColumn": 84, + "charOffset": 13026, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerSkill(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ed31b2fab7c624bffe88536dea2f55e891f321a0c976ca2159506a99b0b262d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 298, + "startColumn": 6, + "charOffset": 13127, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 296, + "startColumn": 6, + "charOffset": 13028, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerSkill(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2b83596d8916107c6d905a95232a73145219145a1ad089e5accba4fbe18c316" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 298, + "startColumn": 17, + "charOffset": 13138, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 296, + "startColumn": 17, + "charOffset": 13028, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerSkill(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "356b849db44ec591848cc9e168b0399dbcbf6377bbe2782ff56ac7c8d10201ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 305, + "startColumn": 2, + "charOffset": 14001, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 303, + "startColumn": 2, + "charOffset": 13256, + "charLength": 3, + "snippet": { + "text": "\tstatic const std::array skillNames = { \"skill_fist\", \"skill_club\", \"skill_sword\", \"skill_axe\", \"skill_dist\", \"skill_shielding\", \"skill_fishing\", \"skill_critical_hit_chance\", \"skill_critical_hit_damage\", \"skill_life_leech_chance\", \"skill_life_leech_amount\", \"skill_mana_leech_chance\", \"skill_mana_leech_amount\" };\n\tstatic const std::array skillNameTries = { \"skill_fist_tries\", \"skill_club_tries\", \"skill_sword_tries\", \"skill_axe_tries\", \"skill_dist_tries\", \"skill_shielding_tries\", \"skill_fishing_tries\", \"skill_critical_hit_chance_tries\", \"skill_critical_hit_damage_tries\", \"skill_life_leech_chance_tries\", \"skill_life_leech_amount_tries\", \"skill_mana_leech_chance_tries\", \"skill_mana_leech_amount_tries\" };\n\tfor (size_t i = 0; i < skillNames.size(); ++i) {\n\t\tuint16_t skillLevel = result->getNumber(skillNames[i]);\n\t\tuint64_t skillTries = result->getNumber(skillNameTries[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd884f2f247db91c2f66f950ced484fb005224e300b0759c232a8d83e30ca3d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 306, + "startColumn": 3, + "charOffset": 14052, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 304, + "startColumn": 3, + "charOffset": 13587, + "charLength": 8, + "snippet": { + "text": "\tstatic const std::array skillNameTries = { \"skill_fist_tries\", \"skill_club_tries\", \"skill_sword_tries\", \"skill_axe_tries\", \"skill_dist_tries\", \"skill_shielding_tries\", \"skill_fishing_tries\", \"skill_critical_hit_chance_tries\", \"skill_critical_hit_damage_tries\", \"skill_life_leech_chance_tries\", \"skill_life_leech_amount_tries\", \"skill_mana_leech_chance_tries\", \"skill_mana_leech_amount_tries\" };\n\tfor (size_t i = 0; i < skillNames.size(); ++i) {\n\t\tuint16_t skillLevel = result->getNumber(skillNames[i]);\n\t\tuint64_t skillTries = result->getNumber(skillNameTries[i]);\n\t\tuint64_t nextSkillTries = player->vocation->getReqSkillTries(static_cast(i), skillLevel + 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "330d7ee63bfa5ccb1db5d15cab370670eaa7430cf3d3ccd8a1cf51891cd13703" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 306, + "startColumn": 53, + "charOffset": 14102, + "charLength": 10, + "snippet": { + "text": "skillNames" + } + }, + "contextRegion": { + "startLine": 304, + "startColumn": 53, + "charOffset": 13587, + "charLength": 10, + "snippet": { + "text": "\tstatic const std::array skillNameTries = { \"skill_fist_tries\", \"skill_club_tries\", \"skill_sword_tries\", \"skill_axe_tries\", \"skill_dist_tries\", \"skill_shielding_tries\", \"skill_fishing_tries\", \"skill_critical_hit_chance_tries\", \"skill_critical_hit_damage_tries\", \"skill_life_leech_chance_tries\", \"skill_life_leech_amount_tries\", \"skill_mana_leech_chance_tries\", \"skill_mana_leech_amount_tries\" };\n\tfor (size_t i = 0; i < skillNames.size(); ++i) {\n\t\tuint16_t skillLevel = result->getNumber(skillNames[i]);\n\t\tuint64_t skillTries = result->getNumber(skillNameTries[i]);\n\t\tuint64_t nextSkillTries = player->vocation->getReqSkillTries(static_cast(i), skillLevel + 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38462c1204593f0b42194ee48ded54bfb494bca410adfd11117354bb630af9a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 307, + "startColumn": 3, + "charOffset": 14120, + "charLength": 8, + "snippet": { + "text": "uint64_t" + } + }, + "contextRegion": { + "startLine": 305, + "startColumn": 3, + "charOffset": 14000, + "charLength": 8, + "snippet": { + "text": "\tfor (size_t i = 0; i < skillNames.size(); ++i) {\n\t\tuint16_t skillLevel = result->getNumber(skillNames[i]);\n\t\tuint64_t skillTries = result->getNumber(skillNameTries[i]);\n\t\tuint64_t nextSkillTries = player->vocation->getReqSkillTries(static_cast(i), skillLevel + 1);\n\t\tif (skillTries > nextSkillTries) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c3da4af946493d73e792abe52aaf565bf4dea90f48c6c86669abdb89c9f50f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 307, + "startColumn": 53, + "charOffset": 14170, + "charLength": 14, + "snippet": { + "text": "skillNameTries" + } + }, + "contextRegion": { + "startLine": 305, + "startColumn": 53, + "charOffset": 14000, + "charLength": 14, + "snippet": { + "text": "\tfor (size_t i = 0; i < skillNames.size(); ++i) {\n\t\tuint16_t skillLevel = result->getNumber(skillNames[i]);\n\t\tuint64_t skillTries = result->getNumber(skillNameTries[i]);\n\t\tuint64_t nextSkillTries = player->vocation->getReqSkillTries(static_cast(i), skillLevel + 1);\n\t\tif (skillTries > nextSkillTries) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05cd1ac191946942cbda5ea2e5e780ca8f1847b9746f9c2a1edc6c418ae81339" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 313, + "startColumn": 3, + "charOffset": 14358, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 311, + "startColumn": 3, + "charOffset": 14351, + "charLength": 6, + "snippet": { + "text": "\t\t}\n\n\t\tplayer->skills[i].level = skillLevel;\n\t\tplayer->skills[i].tries = skillTries;\n\t\tplayer->skills[i].percent = Player::getPercentLevel(skillTries, nextSkillTries);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38462c1204593f0b42194ee48ded54bfb494bca410adfd11117354bb630af9a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 314, + "startColumn": 3, + "charOffset": 14398, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 312, + "startColumn": 3, + "charOffset": 14355, + "charLength": 6, + "snippet": { + "text": "\n\t\tplayer->skills[i].level = skillLevel;\n\t\tplayer->skills[i].tries = skillTries;\n\t\tplayer->skills[i].percent = Player::getPercentLevel(skillTries, nextSkillTries);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1be2ecad9a5887ed8dd61818aae03efb584a1af00d649982cee6e569e295057e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 315, + "startColumn": 3, + "charOffset": 14438, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 313, + "startColumn": 3, + "charOffset": 14356, + "charLength": 6, + "snippet": { + "text": "\t\tplayer->skills[i].level = skillLevel;\n\t\tplayer->skills[i].tries = skillTries;\n\t\tplayer->skills[i].percent = Player::getPercentLevel(skillTries, nextSkillTries);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ec2f8c7ba0be9ddd787c1211369940e2a6d340acdeb8eedb78ccb1d10b4fd5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 319, + "startColumn": 63, + "charOffset": 14587, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 317, + "startColumn": 63, + "charOffset": 14522, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerKills(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27d26c7cb9fc6b66a358ae251b450d9b811cccf1bee3a961f03684f8d50a9e63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 320, + "startColumn": 6, + "charOffset": 14623, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 318, + "startColumn": 6, + "charOffset": 14524, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerKills(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c61ee2c5ca24c83ae45c2f7c3dcafa5dd17dc5507ede3d6773bfbb7c1a109ad9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 320, + "startColumn": 17, + "charOffset": 14634, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 318, + "startColumn": 17, + "charOffset": 14524, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerKills(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a401616a49737a0005f71d0ab2442b381f93b7f84a98957d8102491bc26aa2fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 328, + "startColumn": 14, + "charOffset": 14958, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 326, + "startColumn": 14, + "charOffset": 14793, + "charLength": 1, + "snippet": { + "text": "\tstd::ostringstream query;\n\tquery << \"SELECT `player_id`, `time`, `target`, `unavenged` FROM `player_kills` WHERE `player_id` = \" << player->getGUID();\n\tif ((result = db.storeQuery(query.str()))) {\n\t\tdo {\n\t\t\ttime_t killTime = result->getNumber(\"time\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cce5177fa23b534be55f2c122bdae1ccd7de5753a310963ae8ec4e3b05cc82c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 329, + "startColumn": 3, + "charOffset": 14993, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 327, + "startColumn": 3, + "charOffset": 14820, + "charLength": 2, + "snippet": { + "text": "\tquery << \"SELECT `player_id`, `time`, `target`, `unavenged` FROM `player_kills` WHERE `player_id` = \" << player->getGUID();\n\tif ((result = db.storeQuery(query.str()))) {\n\t\tdo {\n\t\t\ttime_t killTime = result->getNumber(\"time\");\n\t\t\tif ((time(nullptr) - killTime) <= g_configManager().getNumber(FRAG_TIME, __FUNCTION__)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "370e2a9a6bf8a6eff1d2e12b23bae43e3a489b98878edc6140b8562c5e788e92" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 329, + "startColumn": 3, + "charOffset": 14993, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 327, + "startColumn": 3, + "charOffset": 14820, + "charLength": 2, + "snippet": { + "text": "\tquery << \"SELECT `player_id`, `time`, `target`, `unavenged` FROM `player_kills` WHERE `player_id` = \" << player->getGUID();\n\tif ((result = db.storeQuery(query.str()))) {\n\t\tdo {\n\t\t\ttime_t killTime = result->getNumber(\"time\");\n\t\t\tif ((time(nullptr) - killTime) <= g_configManager().getNumber(FRAG_TIME, __FUNCTION__)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15cfb823eec52939fc7573afbf8595746fc725699b0d2f2ff2af14f5b9ce3962" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 330, + "startColumn": 4, + "charOffset": 15001, + "charLength": 6, + "snippet": { + "text": "time_t" + } + }, + "contextRegion": { + "startLine": 328, + "startColumn": 4, + "charOffset": 14945, + "charLength": 6, + "snippet": { + "text": "\tif ((result = db.storeQuery(query.str()))) {\n\t\tdo {\n\t\t\ttime_t killTime = result->getNumber(\"time\");\n\t\t\tif ((time(nullptr) - killTime) <= g_configManager().getNumber(FRAG_TIME, __FUNCTION__)) {\n\t\t\t\tplayer->unjustifiedKills.emplace_back(result->getNumber(\"target\"), killTime, result->getNumber(\"unavenged\"));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a7ac75fc6634b4e061cb215fab6446d4c14510b2af19068fe434539714c3d74" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 331, + "startColumn": 9, + "charOffset": 15062, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 329, + "startColumn": 9, + "charOffset": 14991, + "charLength": 4, + "snippet": { + "text": "\t\tdo {\n\t\t\ttime_t killTime = result->getNumber(\"time\");\n\t\t\tif ((time(nullptr) - killTime) <= g_configManager().getNumber(FRAG_TIME, __FUNCTION__)) {\n\t\t\t\tplayer->unjustifiedKills.emplace_back(result->getNumber(\"target\"), killTime, result->getNumber(\"unavenged\"));\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c748959464a1391f88e44e93852a09f96160c6f2ba5717a897e3c2056278c4d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 332, + "startColumn": 30, + "charOffset": 15176, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 330, + "startColumn": 30, + "charOffset": 14998, + "charLength": 12, + "snippet": { + "text": "\t\t\ttime_t killTime = result->getNumber(\"time\");\n\t\t\tif ((time(nullptr) - killTime) <= g_configManager().getNumber(FRAG_TIME, __FUNCTION__)) {\n\t\t\t\tplayer->unjustifiedKills.emplace_back(result->getNumber(\"target\"), killTime, result->getNumber(\"unavenged\"));\n\t\t\t}\n\t\t} while (result->next());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc97a862e42f4946867433ad1c322032711f94de2cc268c9cc08a96ad4bef3af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 334, + "startColumn": 20, + "charOffset": 15301, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 332, + "startColumn": 20, + "charOffset": 15147, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tplayer->unjustifiedKills.emplace_back(result->getNumber(\"target\"), killTime, result->getNumber(\"unavenged\"));\n\t\t\t}\n\t\t} while (result->next());\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9f908219eba3e284eb728ebfdfe5311b3b21a341fc17aa238bd1a8a5088988d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 338, + "startColumn": 63, + "charOffset": 15378, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 336, + "startColumn": 63, + "charOffset": 15313, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerGuild(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8a9140876cd53bcbb30d8cc007bfd80557c5b1046b679f8eb61e005695f3698" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 339, + "startColumn": 6, + "charOffset": 15414, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 337, + "startColumn": 6, + "charOffset": 15315, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerGuild(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec63681207d71dfa4bf4bb1522e04471f18eb63e81b2c3d4047a309ad0b1c03b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 339, + "startColumn": 17, + "charOffset": 15425, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 337, + "startColumn": 17, + "charOffset": 15315, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerGuild(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13baff85abd5a240d8eb006ffdabcd54153e109586417471312346336573f2c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 347, + "startColumn": 14, + "charOffset": 15740, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 345, + "startColumn": 14, + "charOffset": 15584, + "charLength": 1, + "snippet": { + "text": "\tstd::ostringstream query;\n\tquery << \"SELECT `guild_id`, `rank_id`, `nick` FROM `guild_membership` WHERE `player_id` = \" << player->getGUID();\n\tif ((result = db.storeQuery(query.str()))) {\n\t\tuint32_t guildId = result->getNumber(\"guild_id\");\n\t\tuint32_t playerRankId = result->getNumber(\"rank_id\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29b334c40752c5748ecc4429b0d8d74410f3071f84a59fdba4bc4c8f4a76c6d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 348, + "startColumn": 3, + "charOffset": 15775, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 346, + "startColumn": 3, + "charOffset": 15611, + "charLength": 8, + "snippet": { + "text": "\tquery << \"SELECT `guild_id`, `rank_id`, `nick` FROM `guild_membership` WHERE `player_id` = \" << player->getGUID();\n\tif ((result = db.storeQuery(query.str()))) {\n\t\tuint32_t guildId = result->getNumber(\"guild_id\");\n\t\tuint32_t playerRankId = result->getNumber(\"rank_id\");\n\t\tplayer->guildNick = result->getString(\"nick\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25d317fc316ccd18639a1d7e0e7b6fef66d5529f0787202678e33397e09917e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 349, + "startColumn": 3, + "charOffset": 15837, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 347, + "startColumn": 3, + "charOffset": 15727, + "charLength": 8, + "snippet": { + "text": "\tif ((result = db.storeQuery(query.str()))) {\n\t\tuint32_t guildId = result->getNumber(\"guild_id\");\n\t\tuint32_t playerRankId = result->getNumber(\"rank_id\");\n\t\tplayer->guildNick = result->getString(\"nick\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78d3b306daf1e75df92d7f07d1218489b3825aafc2386b20897e6792a5a4fd67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 353, + "startColumn": 7, + "charOffset": 16000, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 351, + "startColumn": 7, + "charOffset": 15950, + "charLength": 1, + "snippet": { + "text": "\n\t\tauto guild = g_game().getGuild(guildId);\n\t\tif (!guild) {\n\t\t\tguild = IOGuild::loadGuild(guildId);\n\t\t\tg_game().addGuild(guild);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "586660ecc84635a613bae70b21d7957a6268629933f6420ae3c558add7c3e7fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 361, + "startColumn": 8, + "charOffset": 16190, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 359, + "startColumn": 8, + "charOffset": 16099, + "charLength": 1, + "snippet": { + "text": "\t\t\tplayer->guild = guild;\n\t\t\tGuildRank_ptr rank = guild->getRankById(playerRankId);\n\t\t\tif (!rank) {\n\t\t\t\tquery.str(\"\");\n\t\t\t\tquery << \"SELECT `id`, `name`, `level` FROM `guild_ranks` WHERE `id` = \" << playerRankId;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9828c705dc9884a3b464479234326881f7c0d026864c41ac92c7984fdf153308" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 365, + "startColumn": 17, + "charOffset": 16329, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 363, + "startColumn": 17, + "charOffset": 16218, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tquery << \"SELECT `id`, `name`, `level` FROM `guild_ranks` WHERE `id` = \" << playerRankId;\n\n\t\t\t\tif ((result = db.storeQuery(query.str()))) {\n\t\t\t\t\tguild->addRank(result->getNumber(\"id\"), result->getString(\"name\"), static_cast(result->getNumber(\"level\")));\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00e3abd08b413c677200878701a2e05b7a0f15354668f157fa77d11fe10e9c3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 370, + "startColumn": 9, + "charOffset": 16565, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 368, + "startColumn": 9, + "charOffset": 16511, + "charLength": 1, + "snippet": { + "text": "\n\t\t\t\trank = guild->getRankById(playerRankId);\n\t\t\t\tif (!rank) {\n\t\t\t\t\tplayer->guild = nullptr;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62046ceae2234d12f2621523431221d1d7383581080333006ec7bc378140e005" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 381, + "startColumn": 16, + "charOffset": 16836, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 379, + "startColumn": 16, + "charOffset": 16704, + "charLength": 1, + "snippet": { + "text": "\t\t\tquery.str(\"\");\n\t\t\tquery << \"SELECT COUNT(*) AS `members` FROM `guild_membership` WHERE `guild_id` = \" << guildId;\n\t\t\tif ((result = db.storeQuery(query.str()))) {\n\t\t\t\tguild->setMemberCount(result->getNumber(\"members\"));\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f492c4c1d417ababfaf91315e2084bd42b66c64a63dda1c60e817c696f77d0a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 388, + "startColumn": 68, + "charOffset": 17018, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 386, + "startColumn": 68, + "charOffset": 16948, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerStashItems(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e5df612181591de5f113ef44cf85145f10db8b7ef634701a5060d047e0308d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 389, + "startColumn": 6, + "charOffset": 17054, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 387, + "startColumn": 6, + "charOffset": 16950, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerStashItems(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2431f4b50de63a16e7274d849f4583319edecf44f3f08a59923ef7ab5784a152" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 389, + "startColumn": 17, + "charOffset": 17065, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 387, + "startColumn": 17, + "charOffset": 16950, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerStashItems(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26d03afd605372771c7b8c2e088f90467c0eabeea57021e920628ee8bb2b146b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 397, + "startColumn": 14, + "charOffset": 17371, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 395, + "startColumn": 14, + "charOffset": 17224, + "charLength": 1, + "snippet": { + "text": "\tstd::ostringstream query;\n\tquery << \"SELECT `item_count`, `item_id` FROM `player_stash` WHERE `player_id` = \" << player->getGUID();\n\tif ((result = db.storeQuery(query.str()))) {\n\t\tdo {\n\t\t\tplayer->addItemOnStash(result->getNumber(\"item_id\"), result->getNumber(\"item_count\"));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50526e65eb8b8a32b283abbc49ea4b2b0d26d85c401625d41ffa4518ee6244aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 398, + "startColumn": 3, + "charOffset": 17406, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 396, + "startColumn": 3, + "charOffset": 17251, + "charLength": 2, + "snippet": { + "text": "\tquery << \"SELECT `item_count`, `item_id` FROM `player_stash` WHERE `player_id` = \" << player->getGUID();\n\tif ((result = db.storeQuery(query.str()))) {\n\t\tdo {\n\t\t\tplayer->addItemOnStash(result->getNumber(\"item_id\"), result->getNumber(\"item_count\"));\n\t\t} while (result->next());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4dd18f9ec5cb2a56643a0d11eaada3c7e0ed2907757a827105de707b4256d649" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 398, + "startColumn": 3, + "charOffset": 17406, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 396, + "startColumn": 3, + "charOffset": 17251, + "charLength": 2, + "snippet": { + "text": "\tquery << \"SELECT `item_count`, `item_id` FROM `player_stash` WHERE `player_id` = \" << player->getGUID();\n\tif ((result = db.storeQuery(query.str()))) {\n\t\tdo {\n\t\t\tplayer->addItemOnStash(result->getNumber(\"item_id\"), result->getNumber(\"item_count\"));\n\t\t} while (result->next());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5ec92840b3df149a7a69b626848cb7f751aca60a806790cbe6acb1f44569a14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 400, + "startColumn": 20, + "charOffset": 17540, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 398, + "startColumn": 20, + "charOffset": 17404, + "charLength": 4, + "snippet": { + "text": "\t\tdo {\n\t\t\tplayer->addItemOnStash(result->getNumber(\"item_id\"), result->getNumber(\"item_count\"));\n\t\t} while (result->next());\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "998cdf3ecb96a2a84066231d48a6fca7e647c6583084eba0c3b9dec316f32788" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 404, + "startColumn": 72, + "charOffset": 17626, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 402, + "startColumn": 72, + "charOffset": 17552, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerBestiaryCharms(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7504f1bb5b965733b3ecc5b007792a51960e939409fd13354be53cac1e86eb46" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 405, + "startColumn": 6, + "charOffset": 17662, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 403, + "startColumn": 6, + "charOffset": 17554, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerBestiaryCharms(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f20c245087547702b7d9438340ab5475b89095e5b4f6d3e5a4ef77271c90a27d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 405, + "startColumn": 17, + "charOffset": 17673, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 403, + "startColumn": 17, + "charOffset": 17554, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerBestiaryCharms(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71e073b7b7d94fc9558f5b06e24d4a162af3cdebe6b78e9a3a24d5f58d6aae38" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 413, + "startColumn": 14, + "charOffset": 17959, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 411, + "startColumn": 14, + "charOffset": 17832, + "charLength": 1, + "snippet": { + "text": "\tstd::ostringstream query;\n\tquery << \"SELECT * FROM `player_charms` WHERE `player_guid` = \" << player->getGUID();\n\tif ((result = db.storeQuery(query.str()))) {\n\t\tplayer->charmPoints = result->getNumber(\"charm_points\");\n\t\tplayer->charmExpansion = result->getNumber(\"charm_expansion\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cda8dfbf8331e6cc930255d584d9e6b687a9b04af340d9339dd215bb20b6acf9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-runtime-int", + "ruleIndex": 546, + "kind": "fail", + "level": "warning", + "message": { + "text": "consider replacing 'unsigned long' with 'uint64'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 438, + "startColumn": 3, + "charOffset": 19636, + "charLength": 8, + "snippet": { + "text": "unsigned" + } + }, + "contextRegion": { + "startLine": 436, + "startColumn": 3, + "charOffset": 19556, + "charLength": 8, + "snippet": { + "text": "\t\tplayer->UnlockedRunesBit = result->getNumber(\"UnlockedRunesBit\");\n\n\t\tunsigned long attrBestSize;\n\t\tconst char* Bestattr = result->getStream(\"tracker list\", attrBestSize);\n\t\tPropStream propBestStream;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c0d09ee06377479a7161c6360d8f68b8212abe316f3310d84c6bff34745e86c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'attrBestSize' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 438, + "startColumn": 17, + "charOffset": 19650, + "charLength": 12, + "snippet": { + "text": "attrBestSize" + } + }, + "contextRegion": { + "startLine": 436, + "startColumn": 17, + "charOffset": 19556, + "charLength": 12, + "snippet": { + "text": "\t\tplayer->UnlockedRunesBit = result->getNumber(\"UnlockedRunesBit\");\n\n\t\tunsigned long attrBestSize;\n\t\tconst char* Bestattr = result->getStream(\"tracker list\", attrBestSize);\n\t\tPropStream propBestStream;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43118b347ec74be75ad27c67b54bf53bd61326e9f82d9374a8a542e7728e41f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'monsterRaceId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 443, + "startColumn": 12, + "charOffset": 19826, + "charLength": 13, + "snippet": { + "text": "monsterRaceId" + } + }, + "contextRegion": { + "startLine": 441, + "startColumn": 12, + "charOffset": 19767, + "charLength": 13, + "snippet": { + "text": "\t\tpropBestStream.init(Bestattr, attrBestSize);\n\n\t\tuint16_t monsterRaceId;\n\t\twhile (propBestStream.read(monsterRaceId)) {\n\t\t\tconst auto monsterType = g_monsters().getMonsterTypeByRaceId(monsterRaceId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b03950bb04a99785c5e84e26722d4a3360c06fe609476cd83918f5cad3b14ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 444, + "startColumn": 3, + "charOffset": 19843, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 442, + "startColumn": 3, + "charOffset": 19814, + "charLength": 5, + "snippet": { + "text": "\n\t\tuint16_t monsterRaceId;\n\t\twhile (propBestStream.read(monsterRaceId)) {\n\t\t\tconst auto monsterType = g_monsters().getMonsterTypeByRaceId(monsterRaceId);\n\t\t\tif (monsterType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc826aac604f60a7489dedfa9e0b439c1d754f539b56c1345526f274b6db783b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 453, + "startColumn": 27, + "charOffset": 20231, + "charLength": 12, + "snippet": { + "text": "executeQuery" + } + }, + "contextRegion": { + "startLine": 451, + "startColumn": 27, + "charOffset": 20093, + "charLength": 12, + "snippet": { + "text": "\t\tquery.str(\"\");\n\t\tquery << \"INSERT INTO `player_charms` (`player_guid`) VALUES (\" << player->getGUID() << ')';\n\t\tDatabase::getInstance().executeQuery(query.str());\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf86c85b12af47ce08dd8c61fa3d59b47bff61c3446c1ad0165964d3169ba039" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 457, + "startColumn": 74, + "charOffset": 20337, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 455, + "startColumn": 74, + "charOffset": 20261, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerInstantSpellList(std::shared_ptr player, DBResult_ptr result) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "163b22bc0efaec887c39af450bdfa1d4bd4e1e1d406bb85a90a0373437b1688d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 458, + "startColumn": 6, + "charOffset": 20373, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 456, + "startColumn": 6, + "charOffset": 20263, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerInstantSpellList(std::shared_ptr player, DBResult_ptr result) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17fadad274090a6876e9d0b1f245fe46ed638523aaa96a36c8f381671af206b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 466, + "startColumn": 14, + "charOffset": 20665, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 464, + "startColumn": 14, + "charOffset": 20522, + "charLength": 1, + "snippet": { + "text": "\tstd::ostringstream query;\n\tquery << \"SELECT `player_id`, `name` FROM `player_spells` WHERE `player_id` = \" << player->getGUID();\n\tif ((result = db.storeQuery(query.str()))) {\n\t\tdo {\n\t\t\tplayer->learnedInstantSpellList.emplace_back(result->getString(\"name\"));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eecd71863ac86e35e45458d345536972edadd34a7f11077f76d2ed7498f9e836" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 467, + "startColumn": 3, + "charOffset": 20700, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 465, + "startColumn": 3, + "charOffset": 20549, + "charLength": 2, + "snippet": { + "text": "\tquery << \"SELECT `player_id`, `name` FROM `player_spells` WHERE `player_id` = \" << player->getGUID();\n\tif ((result = db.storeQuery(query.str()))) {\n\t\tdo {\n\t\t\tplayer->learnedInstantSpellList.emplace_back(result->getString(\"name\"));\n\t\t} while (result->next());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae9bc8360c3333a63723cf3d9168faf38afb5cb725d3483d8cedcc0910ba1296" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 467, + "startColumn": 3, + "charOffset": 20700, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 465, + "startColumn": 3, + "charOffset": 20549, + "charLength": 2, + "snippet": { + "text": "\tquery << \"SELECT `player_id`, `name` FROM `player_spells` WHERE `player_id` = \" << player->getGUID();\n\tif ((result = db.storeQuery(query.str()))) {\n\t\tdo {\n\t\t\tplayer->learnedInstantSpellList.emplace_back(result->getString(\"name\"));\n\t\t} while (result->next());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d1a8a18605f8f1464bcf085eb827d2e825fd70191b12883439e7af16839a00c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 468, + "startColumn": 36, + "charOffset": 20740, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 466, + "startColumn": 36, + "charOffset": 20652, + "charLength": 12, + "snippet": { + "text": "\tif ((result = db.storeQuery(query.str()))) {\n\t\tdo {\n\t\t\tplayer->learnedInstantSpellList.emplace_back(result->getString(\"name\"));\n\t\t} while (result->next());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0867086ecc62fb121c2034e04d6f2ab502930fd0a7488028d1ddbd4cbfa2c34a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 469, + "startColumn": 20, + "charOffset": 20800, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 467, + "startColumn": 20, + "charOffset": 20698, + "charLength": 4, + "snippet": { + "text": "\t\tdo {\n\t\t\tplayer->learnedInstantSpellList.emplace_back(result->getString(\"name\"));\n\t\t} while (result->next());\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e4b35e5866342d92cd9d487bf2396f651e6e961b6e1089ff4780c5a9b618b26" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'loadPlayerInventoryItems' has cognitive complexity of 65 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 473, + "startColumn": 23, + "charOffset": 20837, + "charLength": 24, + "snippet": { + "text": "loadPlayerInventoryItems" + } + }, + "contextRegion": { + "startLine": 471, + "startColumn": 23, + "charOffset": 20812, + "charLength": 24, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerInventoryItems(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7f17f50e0e49df5b0de25115e71c5b5c63a7408fc53e448e313c5357205424d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 473, + "startColumn": 72, + "charOffset": 20886, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 471, + "startColumn": 72, + "charOffset": 20812, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerInventoryItems(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b355bafc409e8df75fe647be04184063fc9ba9e70f7805ea47b8a1218afe489" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 474, + "startColumn": 6, + "charOffset": 20922, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 472, + "startColumn": 6, + "charOffset": 20814, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerInventoryItems(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ff4b3d53bd819aa4d8fdd4b5b931f58b601077e1d1418a111afb51d622a9b0f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 474, + "startColumn": 17, + "charOffset": 20933, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 472, + "startColumn": 17, + "charOffset": 20814, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerInventoryItems(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09407c906c529e419ba07f4a1409df283769b7f0738b25e333afa35e44c7030f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1200 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 479, + "startColumn": 112, + "charOffset": 21162, + "charLength": 4, + "snippet": { + "text": "1200" + } + }, + "contextRegion": { + "startLine": 477, + "startColumn": 112, + "charOffset": 21047, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tbool oldProtocol = g_configManager().getBoolean(OLD_PROTOCOL, __FUNCTION__) && player->getProtocolVersion() < 1200;\n\tDatabase &db = Database::getInstance();\n\tstd::ostringstream query;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12a060494f8d2dbc73753c6d729de93c35252105e7b5daf2c7a119b4827dc4b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 488, + "startColumn": 15, + "charOffset": 21522, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 486, + "startColumn": 15, + "charOffset": 21500, + "charLength": 1, + "snippet": { + "text": "\n\ttry {\n\t\tif ((result = db.storeQuery(query.str()))) {\n\t\t\tloadItems(inventoryItems, result, player);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "081d36d51b677973e28d8239781d35d65969d6f5b4c6bbd266e900b59905e548" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 491, + "startColumn": 4, + "charOffset": 21605, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 489, + "startColumn": 4, + "charOffset": 21555, + "charLength": 3, + "snippet": { + "text": "\t\t\tloadItems(inventoryItems, result, player);\n\n\t\t\tfor (ItemsMap::const_reverse_iterator it = inventoryItems.rbegin(), end = inventoryItems.rend(); it != end; ++it) {\n\t\t\t\tconst std::pair, int32_t> &pair = it->second;\n\t\t\t\tstd::shared_ptr item = pair.first;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "299cc6d513cafcd2c498cfd64be8baa85a5e40bfa892f93e189158f9da5f44a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 491, + "startColumn": 9, + "charOffset": 21610, + "charLength": 8, + "snippet": { + "text": "ItemsMap" + } + }, + "contextRegion": { + "startLine": 489, + "startColumn": 9, + "charOffset": 21555, + "charLength": 8, + "snippet": { + "text": "\t\t\tloadItems(inventoryItems, result, player);\n\n\t\t\tfor (ItemsMap::const_reverse_iterator it = inventoryItems.rbegin(), end = inventoryItems.rend(); it != end; ++it) {\n\t\t\t\tconst std::pair, int32_t> &pair = it->second;\n\t\t\t\tstd::shared_ptr item = pair.first;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4838f6475b9bcc1cf028e37830ab471c33bbddd9e9827abaf6b5f7fc1fcc63fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when declaring iterators" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 491, + "startColumn": 9, + "charOffset": 21610, + "charLength": 8, + "snippet": { + "text": "ItemsMap" + } + }, + "contextRegion": { + "startLine": 489, + "startColumn": 9, + "charOffset": 21555, + "charLength": 8, + "snippet": { + "text": "\t\t\tloadItems(inventoryItems, result, player);\n\n\t\t\tfor (ItemsMap::const_reverse_iterator it = inventoryItems.rbegin(), end = inventoryItems.rend(); it != end; ++it) {\n\t\t\t\tconst std::pair, int32_t> &pair = it->second;\n\t\t\t\tstd::shared_ptr item = pair.first;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba2f8d4b2884c3022379923b3c2c729bec4f5971e7d9a0e0f2d72ad33b3c796c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 491, + "startColumn": 101, + "charOffset": 21702, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 489, + "startColumn": 101, + "charOffset": 21555, + "charLength": 2, + "snippet": { + "text": "\t\t\tloadItems(inventoryItems, result, player);\n\n\t\t\tfor (ItemsMap::const_reverse_iterator it = inventoryItems.rbegin(), end = inventoryItems.rend(); it != end; ++it) {\n\t\t\t\tconst std::pair, int32_t> &pair = it->second;\n\t\t\t\tstd::shared_ptr item = pair.first;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "066c2d0f228116aa50d3c3af6702f98ca455a6b9b0494e7bcf433d7b4b0824c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 494, + "startColumn": 9, + "charOffset": 21846, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 492, + "startColumn": 9, + "charOffset": 21721, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tconst std::pair, int32_t> &pair = it->second;\n\t\t\t\tstd::shared_ptr item = pair.first;\n\t\t\t\tif (!item) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5140a3e0dd0cb1945313c48f79897f62272863dff753d3700978c50d7663dbcf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when declaring iterators" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 504, + "startColumn": 6, + "charOffset": 22058, + "charLength": 8, + "snippet": { + "text": "ItemsMap" + } + }, + "contextRegion": { + "startLine": 502, + "startColumn": 6, + "charOffset": 22012, + "charLength": 8, + "snippet": { + "text": "\t\t\t\t\titem->startDecaying();\n\t\t\t\t} else {\n\t\t\t\t\tItemsMap::const_iterator it2 = inventoryItems.find(pid);\n\t\t\t\t\tif (it2 == inventoryItems.end()) {\n\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bfa4d1fa2178a850147bf34c8157ac0b9891b882a74657e135b5ca96b8a07a36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 521, + "startColumn": 27, + "charOffset": 22608, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 519, + "startColumn": 27, + "charOffset": 22483, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t\t\tauto cid = item->getAttribute(ItemAttribute_t::OPENCONTAINER);\n\t\t\t\t\t\tif (cid > 0) {\n\t\t\t\t\t\t\topenContainersList.emplace_back(std::make_pair(cid, itemContainer));\n\t\t\t\t\t\t}\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2907c3161333154bce2cb225928503bf949b9db9c77ddd92bdb5e966a9cdb77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-emplace", + "ruleIndex": 573, + "kind": "fail", + "level": "warning", + "message": { + "text": "unnecessary temporary object created while calling emplace_back" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 521, + "startColumn": 40, + "charOffset": 22621, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 519, + "startColumn": 40, + "charOffset": 22483, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\t\tauto cid = item->getAttribute(ItemAttribute_t::OPENCONTAINER);\n\t\t\t\t\t\tif (cid > 0) {\n\t\t\t\t\t\t\topenContainersList.emplace_back(std::make_pair(cid, itemContainer));\n\t\t\t\t\t\t}\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f00833035b9b0a59c754ef18304a93d6bf9228170738c303bc8aab8a54d2e430" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 529, + "startColumn": 8, + "charOffset": 22965, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 527, + "startColumn": 8, + "charOffset": 22891, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\t\t\tauto flags = item->getAttribute(checkAttribute);\n\n\t\t\t\t\t\t\tfor (uint8_t category = OBJECTCATEGORY_FIRST; category <= OBJECTCATEGORY_LAST; category++) {\n\t\t\t\t\t\t\t\tif (hasBitSet(1 << category, flags)) {\n\t\t\t\t\t\t\t\t\tplayer->refreshManagedContainer(static_cast(category), itemContainer, isLootContainer, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "772dd93d19769fc2fb35e048164d1ba1236e07cbb8f3d5ee1539d968e99be974" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 529, + "startColumn": 32, + "charOffset": 22989, + "charLength": 20, + "snippet": { + "text": "OBJECTCATEGORY_FIRST" + } + }, + "contextRegion": { + "startLine": 527, + "startColumn": 32, + "charOffset": 22891, + "charLength": 20, + "snippet": { + "text": "\t\t\t\t\t\t\tauto flags = item->getAttribute(checkAttribute);\n\n\t\t\t\t\t\t\tfor (uint8_t category = OBJECTCATEGORY_FIRST; category <= OBJECTCATEGORY_LAST; category++) {\n\t\t\t\t\t\t\t\tif (hasBitSet(1 << category, flags)) {\n\t\t\t\t\t\t\t\t\tplayer->refreshManagedContainer(static_cast(category), itemContainer, isLootContainer, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19908d4b0d99b9a23e323427d41b2ad4e7ae275a1c697b34c14ebb8cd7df7e1e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 530, + "startColumn": 23, + "charOffset": 23080, + "charLength": 1, + "snippet": { + "text": "1" + } + }, + "contextRegion": { + "startLine": 528, + "startColumn": 23, + "charOffset": 22957, + "charLength": 1, + "snippet": { + "text": "\n\t\t\t\t\t\t\tfor (uint8_t category = OBJECTCATEGORY_FIRST; category <= OBJECTCATEGORY_LAST; category++) {\n\t\t\t\t\t\t\t\tif (hasBitSet(1 << category, flags)) {\n\t\t\t\t\t\t\t\t\tplayer->refreshManagedContainer(static_cast(category), itemContainer, isLootContainer, true);\n\t\t\t\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a5067f43035f938b768efdd2663268c16c5a3a752d69143ee03a724b68b860e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 531, + "startColumn": 18, + "charOffset": 23122, + "charLength": 23, + "snippet": { + "text": "refreshManagedContainer" + } + }, + "contextRegion": { + "startLine": 529, + "startColumn": 18, + "charOffset": 22958, + "charLength": 23, + "snippet": { + "text": "\t\t\t\t\t\t\tfor (uint8_t category = OBJECTCATEGORY_FIRST; category <= OBJECTCATEGORY_LAST; category++) {\n\t\t\t\t\t\t\t\tif (hasBitSet(1 << category, flags)) {\n\t\t\t\t\t\t\t\t\tplayer->refreshManagedContainer(static_cast(category), itemContainer, isLootContainer, true);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b554588daeecb50e66cfccab989a991c767358a417dfec2a4f9f57ec90879a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 545, + "startColumn": 4, + "charOffset": 23547, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 543, + "startColumn": 4, + "charOffset": 23536, + "charLength": 3, + "snippet": { + "text": "\t\t\t});\n\n\t\t\tfor (auto &it : openContainersList) {\n\t\t\t\tplayer->addContainer(it.first - 1, it.second);\n\t\t\t\tplayer->onSendContainer(it.second);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eec1d0af41c603f1caf9177edd52303e7db5dc7f417a6e2698672e424ea1836a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 555, + "startColumn": 68, + "charOffset": 23926, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 553, + "startColumn": 68, + "charOffset": 23856, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerStoreInbox(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c84f0f04e5169c002554a804114a59b1679e33f284606faf96eee1cc2d03099" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 556, + "startColumn": 6, + "charOffset": 23941, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 554, + "startColumn": 6, + "charOffset": 23858, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerStoreInbox(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97453b21719221d7f90d5b9c90fda5907d2d0856caa7b20cb7775927e61d3259" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 561, + "startColumn": 6, + "charOffset": 24054, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 559, + "startColumn": 6, + "charOffset": 24045, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!player->inventory[CONST_SLOT_STORE_INBOX]) {\n\t\tplayer->internalAddThing(CONST_SLOT_STORE_INBOX, Item::CreateItem(ITEM_STORE_INBOX));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1fe0479f23930b640b47f7b002c142d0760bf2300eed5b01f9a421a3d5055ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 566, + "startColumn": 63, + "charOffset": 24256, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 564, + "startColumn": 63, + "charOffset": 24191, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadRewardItems(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "883c6d6fc3508bf12afd677d1e55978b2ab56ca3e17b1eb541fbfa79efa469e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 567, + "startColumn": 6, + "charOffset": 24271, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 565, + "startColumn": 6, + "charOffset": 24193, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadRewardItems(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c58caaecf343d20560ec838cbdae894593ba5c8c73049b00a3a2b1c35cb1155c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 584, + "startColumn": 68, + "charOffset": 24888, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 582, + "startColumn": 68, + "charOffset": 24818, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerDepotItems(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6d9e6ecd8732d3a0f037569c41d52cf395ae192d4a18706f690973dcd1db8e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 585, + "startColumn": 6, + "charOffset": 24924, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 583, + "startColumn": 6, + "charOffset": 24820, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerDepotItems(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7ec8fc74c76c8a52970a647da15a1f584bbbe41730630de9e6b4b3bfaf40511" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 585, + "startColumn": 17, + "charOffset": 24935, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 583, + "startColumn": 17, + "charOffset": 24820, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerDepotItems(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76d9cb5b007f4421b8e30429b7c7523510f329f3af150aceb7a97df229a0d86f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 594, + "startColumn": 14, + "charOffset": 25317, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 592, + "startColumn": 14, + "charOffset": 25116, + "charLength": 1, + "snippet": { + "text": "\tstd::ostringstream query;\n\tquery << \"SELECT `pid`, `sid`, `itemtype`, `count`, `attributes` FROM `player_depotitems` WHERE `player_id` = \" << player->getGUID() << \" ORDER BY `sid` DESC\";\n\tif ((result = db.storeQuery(query.str()))) {\n\t\tloadItems(depotItems, result, player);\n\t\tfor (ItemsMap::const_reverse_iterator it = depotItems.rbegin(), end = depotItems.rend(); it != end; ++it) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5134626ae20bad482e3776e9d2ffe114f584be6d598adf4b1d4f39af7b72bdb0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 596, + "startColumn": 3, + "charOffset": 25393, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 594, + "startColumn": 3, + "charOffset": 25304, + "charLength": 3, + "snippet": { + "text": "\tif ((result = db.storeQuery(query.str()))) {\n\t\tloadItems(depotItems, result, player);\n\t\tfor (ItemsMap::const_reverse_iterator it = depotItems.rbegin(), end = depotItems.rend(); it != end; ++it) {\n\t\t\tconst std::pair, int32_t> &pair = it->second;\n\t\t\tstd::shared_ptr item = pair.first;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bcc57ce483d963019e10d7834c3c101d5136c4ab6b652e17818f6f59dff359e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 596, + "startColumn": 3, + "charOffset": 25393, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 594, + "startColumn": 3, + "charOffset": 25304, + "charLength": 3, + "snippet": { + "text": "\tif ((result = db.storeQuery(query.str()))) {\n\t\tloadItems(depotItems, result, player);\n\t\tfor (ItemsMap::const_reverse_iterator it = depotItems.rbegin(), end = depotItems.rend(); it != end; ++it) {\n\t\t\tconst std::pair, int32_t> &pair = it->second;\n\t\t\tstd::shared_ptr item = pair.first;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70a2ceccd87ba050a600754820ce6aff986854f40719b4946ac7e5d4301b1ea6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 596, + "startColumn": 8, + "charOffset": 25398, + "charLength": 8, + "snippet": { + "text": "ItemsMap" + } + }, + "contextRegion": { + "startLine": 594, + "startColumn": 8, + "charOffset": 25304, + "charLength": 8, + "snippet": { + "text": "\tif ((result = db.storeQuery(query.str()))) {\n\t\tloadItems(depotItems, result, player);\n\t\tfor (ItemsMap::const_reverse_iterator it = depotItems.rbegin(), end = depotItems.rend(); it != end; ++it) {\n\t\t\tconst std::pair, int32_t> &pair = it->second;\n\t\t\tstd::shared_ptr item = pair.first;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd4c06fac383169fb49c504678d55a3629f36be33806182271fb2424b50ad7b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when declaring iterators" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 596, + "startColumn": 8, + "charOffset": 25398, + "charLength": 8, + "snippet": { + "text": "ItemsMap" + } + }, + "contextRegion": { + "startLine": 594, + "startColumn": 8, + "charOffset": 25304, + "charLength": 8, + "snippet": { + "text": "\tif ((result = db.storeQuery(query.str()))) {\n\t\tloadItems(depotItems, result, player);\n\t\tfor (ItemsMap::const_reverse_iterator it = depotItems.rbegin(), end = depotItems.rend(); it != end; ++it) {\n\t\t\tconst std::pair, int32_t> &pair = it->second;\n\t\t\tstd::shared_ptr item = pair.first;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2b596046a28a004dd92e4b38ec3531d54b4c486aca8300cf2367da23da00cfa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 596, + "startColumn": 92, + "charOffset": 25482, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 594, + "startColumn": 92, + "charOffset": 25304, + "charLength": 2, + "snippet": { + "text": "\tif ((result = db.storeQuery(query.str()))) {\n\t\tloadItems(depotItems, result, player);\n\t\tfor (ItemsMap::const_reverse_iterator it = depotItems.rbegin(), end = depotItems.rend(); it != end; ++it) {\n\t\t\tconst std::pair, int32_t> &pair = it->second;\n\t\t\tstd::shared_ptr item = pair.first;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5988421498c3e9cdddd7981c3f77823e1be3441ba5469e2cf52dd0eadc57be71" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 601, + "startColumn": 26, + "charOffset": 25672, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 599, + "startColumn": 26, + "charOffset": 25616, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tint32_t pid = pair.second;\n\t\t\tif (pid >= 0 && pid < 100) {\n\t\t\t\tstd::shared_ptr depotChest = player->getDepotChest(pid, true);\n\t\t\t\tif (depotChest) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "787a63f84ba41760c890c45e05e1f075477d99f57aba353c077e7d0120a95d54" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when declaring iterators" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 608, + "startColumn": 5, + "charOffset": 25871, + "charLength": 8, + "snippet": { + "text": "ItemsMap" + } + }, + "contextRegion": { + "startLine": 606, + "startColumn": 5, + "charOffset": 25849, + "charLength": 8, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tItemsMap::const_iterator it2 = depotItems.find(pid);\n\t\t\t\tif (it2 == depotItems.end()) {\n\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52599f95cf904f2dcd49737dbf9dacd2f6ec571c8dd9174ea7aa9642c86cb40f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 623, + "startColumn": 68, + "charOffset": 26236, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 621, + "startColumn": 68, + "charOffset": 26166, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerInboxItems(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c20453ab44766254774c21c2762d27fed32cc256a0a3744383393f83fec6470" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 624, + "startColumn": 6, + "charOffset": 26272, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 622, + "startColumn": 6, + "charOffset": 26168, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerInboxItems(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1baba6eaf2fca8d93b041e4ca0473e806b741d41d4ba3ca533729be60778f9b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 624, + "startColumn": 17, + "charOffset": 26283, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 622, + "startColumn": 17, + "charOffset": 26168, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerInboxItems(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d744756b7909dc0f1d48920068c2b499aebb6170ff00341f84adbd2cb829ce06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 632, + "startColumn": 14, + "charOffset": 26643, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 630, + "startColumn": 14, + "charOffset": 26442, + "charLength": 1, + "snippet": { + "text": "\tstd::ostringstream query;\n\tquery << \"SELECT `pid`, `sid`, `itemtype`, `count`, `attributes` FROM `player_inboxitems` WHERE `player_id` = \" << player->getGUID() << \" ORDER BY `sid` DESC\";\n\tif ((result = db.storeQuery(query.str()))) {\n\t\tItemsMap inboxItems;\n\t\tloadItems(inboxItems, result, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30de6b519feb30ea5913f442700cf91ddea7de704f53b19eab0362c88e14a8f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 636, + "startColumn": 3, + "charOffset": 26743, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 634, + "startColumn": 3, + "charOffset": 26699, + "charLength": 3, + "snippet": { + "text": "\t\tloadItems(inboxItems, result, player);\n\n\t\tfor (ItemsMap::const_reverse_iterator it = inboxItems.rbegin(), end = inboxItems.rend(); it != end; ++it) {\n\t\t\tconst std::pair, int32_t> &pair = it->second;\n\t\t\tstd::shared_ptr item = pair.first;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0b3dfdcf38671aa49e91ba23f18f1a8a373c7c41292d9c74cb456ce07bdde2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 636, + "startColumn": 3, + "charOffset": 26743, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 634, + "startColumn": 3, + "charOffset": 26699, + "charLength": 3, + "snippet": { + "text": "\t\tloadItems(inboxItems, result, player);\n\n\t\tfor (ItemsMap::const_reverse_iterator it = inboxItems.rbegin(), end = inboxItems.rend(); it != end; ++it) {\n\t\t\tconst std::pair, int32_t> &pair = it->second;\n\t\t\tstd::shared_ptr item = pair.first;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26a3cd24ce957c62c8522006cc47044ed5c8f9abafc626737e2e799f180349c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 636, + "startColumn": 8, + "charOffset": 26748, + "charLength": 8, + "snippet": { + "text": "ItemsMap" + } + }, + "contextRegion": { + "startLine": 634, + "startColumn": 8, + "charOffset": 26699, + "charLength": 8, + "snippet": { + "text": "\t\tloadItems(inboxItems, result, player);\n\n\t\tfor (ItemsMap::const_reverse_iterator it = inboxItems.rbegin(), end = inboxItems.rend(); it != end; ++it) {\n\t\t\tconst std::pair, int32_t> &pair = it->second;\n\t\t\tstd::shared_ptr item = pair.first;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fac8f26cfb3e000430502c771f1f5abcdba199ab155f27949cbcb6f6bba0af1c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when declaring iterators" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 636, + "startColumn": 8, + "charOffset": 26748, + "charLength": 8, + "snippet": { + "text": "ItemsMap" + } + }, + "contextRegion": { + "startLine": 634, + "startColumn": 8, + "charOffset": 26699, + "charLength": 8, + "snippet": { + "text": "\t\tloadItems(inboxItems, result, player);\n\n\t\tfor (ItemsMap::const_reverse_iterator it = inboxItems.rbegin(), end = inboxItems.rend(); it != end; ++it) {\n\t\t\tconst std::pair, int32_t> &pair = it->second;\n\t\t\tstd::shared_ptr item = pair.first;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b001003e29bc68d7febd99e547106e221eba82a2f17c19be776ab9d81dd25477" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 636, + "startColumn": 92, + "charOffset": 26832, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 634, + "startColumn": 92, + "charOffset": 26699, + "charLength": 2, + "snippet": { + "text": "\t\tloadItems(inboxItems, result, player);\n\n\t\tfor (ItemsMap::const_reverse_iterator it = inboxItems.rbegin(), end = inboxItems.rend(); it != end; ++it) {\n\t\t\tconst std::pair, int32_t> &pair = it->second;\n\t\t\tstd::shared_ptr item = pair.first;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53d199bc91660117ab8e035eb73858dd27d33ab940a038f8a4038c519a513dd4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 640, + "startColumn": 26, + "charOffset": 27021, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 638, + "startColumn": 26, + "charOffset": 26922, + "charLength": 3, + "snippet": { + "text": "\t\t\tstd::shared_ptr item = pair.first;\n\t\t\tint32_t pid = pair.second;\n\t\t\tif (pid >= 0 && pid < 100) {\n\t\t\t\tplayer->getInbox()->internalAddThing(item);\n\t\t\t\titem->startDecaying();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d342576d2bc292bc96fccb632bc0c6d838d38f88ef5ffcdd36f5147b7090a065" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when declaring iterators" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 644, + "startColumn": 5, + "charOffset": 27119, + "charLength": 8, + "snippet": { + "text": "ItemsMap" + } + }, + "contextRegion": { + "startLine": 642, + "startColumn": 5, + "charOffset": 27076, + "charLength": 8, + "snippet": { + "text": "\t\t\t\titem->startDecaying();\n\t\t\t} else {\n\t\t\t\tItemsMap::const_iterator it2 = inboxItems.find(pid);\n\t\t\t\tif (it2 == inboxItems.end()) {\n\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6fe5fd0feb74764260b8122816164e84ef5d31951e854277081a71016afa22e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 659, + "startColumn": 68, + "charOffset": 27484, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 657, + "startColumn": 68, + "charOffset": 27414, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerStorageMap(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0c9be9ddb601c594a3a357b624cf91a5db6a112a9ee7e334735d5a39952b662" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 660, + "startColumn": 6, + "charOffset": 27520, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 658, + "startColumn": 6, + "charOffset": 27416, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerStorageMap(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "586660ecc84635a613bae70b21d7957a6268629933f6420ae3c558add7c3e7fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 660, + "startColumn": 17, + "charOffset": 27531, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 658, + "startColumn": 17, + "charOffset": 27416, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerStorageMap(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d49444fd8369c4f263d1220aa43af60e65d853cbdaf0d7769b302c1d47c1efc4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 668, + "startColumn": 14, + "charOffset": 27829, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 666, + "startColumn": 14, + "charOffset": 27690, + "charLength": 1, + "snippet": { + "text": "\tstd::ostringstream query;\n\tquery << \"SELECT `key`, `value` FROM `player_storage` WHERE `player_id` = \" << player->getGUID();\n\tif ((result = db.storeQuery(query.str()))) {\n\t\tdo {\n\t\t\tplayer->addStorageValue(result->getNumber(\"key\"), result->getNumber(\"value\"), true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3c24538c7196980ffa61da949af38c8a8da0d06269c375b3d7cc3e55b9295b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 669, + "startColumn": 3, + "charOffset": 27864, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 667, + "startColumn": 3, + "charOffset": 27717, + "charLength": 2, + "snippet": { + "text": "\tquery << \"SELECT `key`, `value` FROM `player_storage` WHERE `player_id` = \" << player->getGUID();\n\tif ((result = db.storeQuery(query.str()))) {\n\t\tdo {\n\t\t\tplayer->addStorageValue(result->getNumber(\"key\"), result->getNumber(\"value\"), true);\n\t\t} while (result->next());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "634ae020bb0edaf51b6380cbbc26509f8f2c4810cf13b884092cd9c31876c955" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 669, + "startColumn": 3, + "charOffset": 27864, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 667, + "startColumn": 3, + "charOffset": 27717, + "charLength": 2, + "snippet": { + "text": "\tquery << \"SELECT `key`, `value` FROM `player_storage` WHERE `player_id` = \" << player->getGUID();\n\tif ((result = db.storeQuery(query.str()))) {\n\t\tdo {\n\t\t\tplayer->addStorageValue(result->getNumber(\"key\"), result->getNumber(\"value\"), true);\n\t\t} while (result->next());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2abac472ceaf65aaff5b4778a5e7d16d8b093cb658a976a9033733759f96ebea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 671, + "startColumn": 20, + "charOffset": 27995, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 669, + "startColumn": 20, + "charOffset": 27862, + "charLength": 4, + "snippet": { + "text": "\t\tdo {\n\t\t\tplayer->addStorageValue(result->getNumber(\"key\"), result->getNumber(\"value\"), true);\n\t\t} while (result->next());\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "669dc34f40b0217913579adee4fcccf85ace8643ae65f379ffefa7a09d432e72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 675, + "startColumn": 61, + "charOffset": 28070, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 673, + "startColumn": 61, + "charOffset": 28007, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerVip(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83280e1f81080eea4867466c016e98cd8a40d201b7c0a2b8ca8bb6f65a5772d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 676, + "startColumn": 6, + "charOffset": 28106, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 674, + "startColumn": 6, + "charOffset": 28009, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerVip(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6c8abfe653fae750f1b207947f74529a6ba97098aca5ebbf96aa68077a09873" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 676, + "startColumn": 17, + "charOffset": 28117, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 674, + "startColumn": 17, + "charOffset": 28009, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerVip(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bee594b3d8c1b66d929c350218a93e7d6dae4f6f1d0ecf4316832896734d949c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 685, + "startColumn": 14, + "charOffset": 28450, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 683, + "startColumn": 14, + "charOffset": 28282, + "charLength": 1, + "snippet": { + "text": "\tDatabase &db = Database::getInstance();\n\tstd::string query = fmt::format(\"SELECT `player_id` FROM `account_viplist` WHERE `account_id` = {}\", accountId);\n\tif ((result = db.storeQuery(query))) {\n\t\tdo {\n\t\t\tplayer->vip()->addInternal(result->getNumber(\"player_id\"));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "798c6894abae5a5dfdf871e6fa8e1852d9ba9d05e8b1bbed02abddec9f3b687e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 686, + "startColumn": 3, + "charOffset": 28479, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 684, + "startColumn": 3, + "charOffset": 28323, + "charLength": 2, + "snippet": { + "text": "\tstd::string query = fmt::format(\"SELECT `player_id` FROM `account_viplist` WHERE `account_id` = {}\", accountId);\n\tif ((result = db.storeQuery(query))) {\n\t\tdo {\n\t\t\tplayer->vip()->addInternal(result->getNumber(\"player_id\"));\n\t\t} while (result->next());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f8a3c20023b250325c3550092b52d6659b8db8e28f5a5f869a6a54da17818d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 686, + "startColumn": 3, + "charOffset": 28479, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 684, + "startColumn": 3, + "charOffset": 28323, + "charLength": 2, + "snippet": { + "text": "\tstd::string query = fmt::format(\"SELECT `player_id` FROM `account_viplist` WHERE `account_id` = {}\", accountId);\n\tif ((result = db.storeQuery(query))) {\n\t\tdo {\n\t\t\tplayer->vip()->addInternal(result->getNumber(\"player_id\"));\n\t\t} while (result->next());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86eddc48938ac71f89419adb3bbb03b8128aa19a11a97f429766c797db8def83" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 687, + "startColumn": 19, + "charOffset": 28502, + "charLength": 11, + "snippet": { + "text": "addInternal" + } + }, + "contextRegion": { + "startLine": 685, + "startColumn": 19, + "charOffset": 28437, + "charLength": 11, + "snippet": { + "text": "\tif ((result = db.storeQuery(query))) {\n\t\tdo {\n\t\t\tplayer->vip()->addInternal(result->getNumber(\"player_id\"));\n\t\t} while (result->next());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20c0b7376c4b57e16cab2dccc6451239f980422af40c58f01d263f18dfffbedc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 688, + "startColumn": 20, + "charOffset": 28576, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 686, + "startColumn": 20, + "charOffset": 28477, + "charLength": 4, + "snippet": { + "text": "\t\tdo {\n\t\t\tplayer->vip()->addInternal(result->getNumber(\"player_id\"));\n\t\t} while (result->next());\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f477abf42f6b412c4fb2d6c362562c5d4b9f44e2af3ac4887d923076062239ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 692, + "startColumn": 14, + "charOffset": 28723, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 690, + "startColumn": 14, + "charOffset": 28588, + "charLength": 1, + "snippet": { + "text": "\n\tquery = fmt::format(\"SELECT `id`, `name`, `customizable` FROM `account_vipgroups` WHERE `account_id` = {}\", accountId);\n\tif ((result = db.storeQuery(query))) {\n\t\tdo {\n\t\t\tplayer->vip()->addGroupInternal(" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77097754cc26e0bb78b6f85cf9de09ee41fa73e3d39054f77284cab998967069" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 693, + "startColumn": 3, + "charOffset": 28752, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 691, + "startColumn": 3, + "charOffset": 28589, + "charLength": 2, + "snippet": { + "text": "\tquery = fmt::format(\"SELECT `id`, `name`, `customizable` FROM `account_vipgroups` WHERE `account_id` = {}\", accountId);\n\tif ((result = db.storeQuery(query))) {\n\t\tdo {\n\t\t\tplayer->vip()->addGroupInternal(\n\t\t\t\tresult->getNumber(\"id\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7f7a2c8ad4d1c532cca410aee2839409c4620fff8a168c36510f2ef2f10d4d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 693, + "startColumn": 3, + "charOffset": 28752, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 691, + "startColumn": 3, + "charOffset": 28589, + "charLength": 2, + "snippet": { + "text": "\tquery = fmt::format(\"SELECT `id`, `name`, `customizable` FROM `account_vipgroups` WHERE `account_id` = {}\", accountId);\n\tif ((result = db.storeQuery(query))) {\n\t\tdo {\n\t\t\tplayer->vip()->addGroupInternal(\n\t\t\t\tresult->getNumber(\"id\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "506a8c5c94b24cff781ce1ca5c42d68d73a85ec275c81146528edc618a276746" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in ternary expression result" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 697, + "startColumn": 55, + "charOffset": 28916, + "charLength": 5, + "snippet": { + "text": "false" + } + }, + "contextRegion": { + "startLine": 695, + "startColumn": 55, + "charOffset": 28793, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tresult->getNumber(\"id\"),\n\t\t\t\tresult->getString(\"name\"),\n\t\t\t\tresult->getNumber(\"customizable\") == 0 ? false : true\n\t\t\t);\n\t\t} while (result->next());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49655cea3610dac25d36f9c046a6422e3067e6e346ece9c2c04b8d335fe9792a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Expression can be simplified" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 697, + "startColumn": 61, + "charOffset": 28922, + "charLength": 1, + "snippet": { + "text": ":" + } + }, + "contextRegion": { + "startLine": 695, + "startColumn": 61, + "charOffset": 28793, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tresult->getNumber(\"id\"),\n\t\t\t\tresult->getString(\"name\"),\n\t\t\t\tresult->getNumber(\"customizable\") == 0 ? false : true\n\t\t\t);\n\t\t} while (result->next());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b2732cb3ad9789c8a5e2bd760b28114fa7a0a1a69686e959ef92612536a9dfa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 699, + "startColumn": 20, + "charOffset": 28954, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 697, + "startColumn": 20, + "charOffset": 28862, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tresult->getNumber(\"customizable\") == 0 ? false : true\n\t\t\t);\n\t\t} while (result->next());\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0bcb8474602c96324bad2b5f312ffad4c52fc11f9670bf380118fcc6e76b9b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 703, + "startColumn": 14, + "charOffset": 29102, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 701, + "startColumn": 14, + "charOffset": 28966, + "charLength": 1, + "snippet": { + "text": "\n\tquery = fmt::format(\"SELECT `player_id`, `vipgroup_id` FROM `account_vipgrouplist` WHERE `account_id` = {}\", accountId);\n\tif ((result = db.storeQuery(query))) {\n\t\tdo {\n\t\t\tplayer->vip()->addGuidToGroupInternal(" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1dcc59f7177df527eb7b459fafeaa6e42793b7ab86868160864b071d6abbd5e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 704, + "startColumn": 3, + "charOffset": 29131, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 702, + "startColumn": 3, + "charOffset": 28967, + "charLength": 2, + "snippet": { + "text": "\tquery = fmt::format(\"SELECT `player_id`, `vipgroup_id` FROM `account_vipgrouplist` WHERE `account_id` = {}\", accountId);\n\tif ((result = db.storeQuery(query))) {\n\t\tdo {\n\t\t\tplayer->vip()->addGuidToGroupInternal(\n\t\t\t\tresult->getNumber(\"vipgroup_id\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a723c4ac8d1361b2b1f4ecf00f351f0118af5283b564f79cd602a1743731957" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 704, + "startColumn": 3, + "charOffset": 29131, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 702, + "startColumn": 3, + "charOffset": 28967, + "charLength": 2, + "snippet": { + "text": "\tquery = fmt::format(\"SELECT `player_id`, `vipgroup_id` FROM `account_vipgrouplist` WHERE `account_id` = {}\", accountId);\n\tif ((result = db.storeQuery(query))) {\n\t\tdo {\n\t\t\tplayer->vip()->addGuidToGroupInternal(\n\t\t\t\tresult->getNumber(\"vipgroup_id\")," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82f077262d93daed6784786951daeb73ea0c877fdc1dc0554c74f2fe97d3f3ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 709, + "startColumn": 20, + "charOffset": 29295, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 707, + "startColumn": 20, + "charOffset": 29225, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tresult->getNumber(\"player_id\")\n\t\t\t);\n\t\t} while (result->next());\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d0894c4c869afa6457aa2ed8713ce61a15b0d5dbaa84dc0adafdd6da979c71d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 713, + "startColumn": 67, + "charOffset": 29376, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 711, + "startColumn": 67, + "charOffset": 29307, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerPreyClass(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "883c6d6fc3508bf12afd677d1e55978b2ab56ca3e17b1eb541fbfa79efa469e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 714, + "startColumn": 6, + "charOffset": 29412, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 712, + "startColumn": 6, + "charOffset": 29309, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerPreyClass(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64b0a2f6e587dc468c1fc74cec4a312c6d4c514820f7820fc303e8beb6d9b799" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 714, + "startColumn": 17, + "charOffset": 29423, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 712, + "startColumn": 17, + "charOffset": 29309, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerPreyClass(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c53668f2a290f5c00af8ffb159841cbafaf94cd59a44627c821a7d0786a86f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 723, + "startColumn": 14, + "charOffset": 29773, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 721, + "startColumn": 14, + "charOffset": 29648, + "charLength": 1, + "snippet": { + "text": "\t\tstd::ostringstream query;\n\t\tquery << \"SELECT * FROM `player_prey` WHERE `player_id` = \" << player->getGUID();\n\t\tif (result = db.storeQuery(query.str())) {\n\t\t\tdo {\n\t\t\t\tauto slot = std::make_unique(static_cast(result->getNumber(\"slot\")));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "743cf1240946b18bf56005e02caa6d37a414d3f451fc17ae4832ff22defdf70a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 724, + "startColumn": 4, + "charOffset": 29808, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 722, + "startColumn": 4, + "charOffset": 29676, + "charLength": 2, + "snippet": { + "text": "\t\tquery << \"SELECT * FROM `player_prey` WHERE `player_id` = \" << player->getGUID();\n\t\tif (result = db.storeQuery(query.str())) {\n\t\t\tdo {\n\t\t\t\tauto slot = std::make_unique(static_cast(result->getNumber(\"slot\")));\n\t\t\t\tauto state = static_cast(result->getNumber(\"state\"));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8582f469d87250f9036a81faa54272fda59399f59de4750f749c2f7bf8d0964e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-runtime-int", + "ruleIndex": 546, + "kind": "fail", + "level": "warning", + "message": { + "text": "consider replacing 'unsigned long' with 'uint64'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 744, + "startColumn": 5, + "charOffset": 30814, + "charLength": 8, + "snippet": { + "text": "unsigned" + } + }, + "contextRegion": { + "startLine": 742, + "startColumn": 5, + "charOffset": 30734, + "charLength": 8, + "snippet": { + "text": "\t\t\t\tslot->freeRerollTimeStamp = result->getNumber(\"free_reroll\");\n\n\t\t\t\tunsigned long preySize;\n\t\t\t\tconst char* preyStream = result->getStream(\"monster_list\", preySize);\n\t\t\t\tPropStream propPreyStream;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9729df49561e0b1733b36a42cfaf6aa9d30c859e71d4235d1a120ba8f34798b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'preySize' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 744, + "startColumn": 19, + "charOffset": 30828, + "charLength": 8, + "snippet": { + "text": "preySize" + } + }, + "contextRegion": { + "startLine": 742, + "startColumn": 19, + "charOffset": 30734, + "charLength": 8, + "snippet": { + "text": "\t\t\t\tslot->freeRerollTimeStamp = result->getNumber(\"free_reroll\");\n\n\t\t\t\tunsigned long preySize;\n\t\t\t\tconst char* preyStream = result->getStream(\"monster_list\", preySize);\n\t\t\t\tPropStream propPreyStream;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de8161d24cfd8d3813de0ef554ef95643819c3976eb80d6f8f71d30cd5fa360d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'raceId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 749, + "startColumn": 14, + "charOffset": 31004, + "charLength": 6, + "snippet": { + "text": "raceId" + } + }, + "contextRegion": { + "startLine": 747, + "startColumn": 14, + "charOffset": 30943, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tpropPreyStream.init(preyStream, preySize);\n\n\t\t\t\tuint16_t raceId;\n\t\t\t\twhile (propPreyStream.read(raceId)) {\n\t\t\t\t\tslot->raceIdList.push_back(raceId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0969cf58045d5f7991d23f6af58306e70a6bde431a999d7119d5f6ae8d48668a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 750, + "startColumn": 5, + "charOffset": 31016, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 748, + "startColumn": 5, + "charOffset": 30990, + "charLength": 5, + "snippet": { + "text": "\n\t\t\t\tuint16_t raceId;\n\t\t\t\twhile (propPreyStream.read(raceId)) {\n\t\t\t\t\tslot->raceIdList.push_back(raceId);\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08c8f70d8911f81cc97a9552ee7ca183e93eeab393ade8ebe41109a4bce89310" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 754, + "startColumn": 13, + "charOffset": 31124, + "charLength": 16, + "snippet": { + "text": "setPreySlotClass" + } + }, + "contextRegion": { + "startLine": 752, + "startColumn": 13, + "charOffset": 31105, + "charLength": 16, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tplayer->setPreySlotClass(slot);\n\t\t\t} while (result->next());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ef05fb1dc913085a7d98b1b576cdb074820006433f750f49eabdc923f676fa1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 755, + "startColumn": 21, + "charOffset": 31168, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 753, + "startColumn": 21, + "charOffset": 31111, + "charLength": 4, + "snippet": { + "text": "\n\t\t\t\tplayer->setPreySlotClass(slot);\n\t\t\t} while (result->next());\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5debadb17b9fdcc1329de2f24584e868b86ed93fa1ab213b5696ba7c65bfb166" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'loadPlayerTaskHuntingClass' has cognitive complexity of 29 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 760, + "startColumn": 23, + "charOffset": 31209, + "charLength": 26, + "snippet": { + "text": "loadPlayerTaskHuntingClass" + } + }, + "contextRegion": { + "startLine": 758, + "startColumn": 23, + "charOffset": 31184, + "charLength": 26, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerTaskHuntingClass(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bcb44dba6cc238306ce68896190c735086fc25ed328f0f19272b50f71dbb89ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 760, + "startColumn": 74, + "charOffset": 31260, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 758, + "startColumn": 74, + "charOffset": 31184, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerTaskHuntingClass(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e7c147acadcd3f1aac34cd7db6988fa3d29abd2f4d2a056335442b429eda4ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 761, + "startColumn": 6, + "charOffset": 31296, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 759, + "startColumn": 6, + "charOffset": 31186, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerTaskHuntingClass(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "835bbb627b0ce64051411e6a7d1b7048d199a4bf8fce2955ef6d34f4c012db13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 761, + "startColumn": 17, + "charOffset": 31307, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 759, + "startColumn": 17, + "charOffset": 31186, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerTaskHuntingClass(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c2234d1a04de82aebc31cdf95df56410a609c091c572ceda605073ce73c6545" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 770, + "startColumn": 14, + "charOffset": 31669, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 768, + "startColumn": 14, + "charOffset": 31540, + "charLength": 1, + "snippet": { + "text": "\t\tstd::ostringstream query;\n\t\tquery << \"SELECT * FROM `player_taskhunt` WHERE `player_id` = \" << player->getGUID();\n\t\tif (result = db.storeQuery(query.str())) {\n\t\t\tdo {\n\t\t\t\tauto slot = std::make_unique(static_cast(result->getNumber(\"slot\")));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3c24538c7196980ffa61da949af38c8a8da0d06269c375b3d7cc3e55b9295b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 771, + "startColumn": 4, + "charOffset": 31704, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 769, + "startColumn": 4, + "charOffset": 31568, + "charLength": 2, + "snippet": { + "text": "\t\tquery << \"SELECT * FROM `player_taskhunt` WHERE `player_id` = \" << player->getGUID();\n\t\tif (result = db.storeQuery(query.str())) {\n\t\t\tdo {\n\t\t\t\tauto slot = std::make_unique(static_cast(result->getNumber(\"slot\")));\n\t\t\t\tauto state = static_cast(result->getNumber(\"state\"));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2abac472ceaf65aaff5b4778a5e7d16d8b093cb658a976a9033733759f96ebea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-runtime-int", + "ruleIndex": 546, + "kind": "fail", + "level": "warning", + "message": { + "text": "consider replacing 'unsigned long' with 'uint64'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 790, + "startColumn": 5, + "charOffset": 32603, + "charLength": 8, + "snippet": { + "text": "unsigned" + } + }, + "contextRegion": { + "startLine": 788, + "startColumn": 5, + "charOffset": 32523, + "charLength": 8, + "snippet": { + "text": "\t\t\t\tslot->freeRerollTimeStamp = result->getNumber(\"free_reroll\");\n\n\t\t\t\tunsigned long taskHuntSize;\n\t\t\t\tconst char* taskHuntStream = result->getStream(\"monster_list\", taskHuntSize);\n\t\t\t\tPropStream propTaskHuntStream;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a689a7f264464a9d0ee792de0b7d4f36116c5a72a35bc32710531fbf5f2a8fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'taskHuntSize' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 790, + "startColumn": 19, + "charOffset": 32617, + "charLength": 12, + "snippet": { + "text": "taskHuntSize" + } + }, + "contextRegion": { + "startLine": 788, + "startColumn": 19, + "charOffset": 32523, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tslot->freeRerollTimeStamp = result->getNumber(\"free_reroll\");\n\n\t\t\t\tunsigned long taskHuntSize;\n\t\t\t\tconst char* taskHuntStream = result->getStream(\"monster_list\", taskHuntSize);\n\t\t\t\tPropStream propTaskHuntStream;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5470d194df61fcc1dd0b32b5415c77a2e0f75358b0f9a493911e9a143b09d61a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'raceId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 795, + "startColumn": 14, + "charOffset": 32821, + "charLength": 6, + "snippet": { + "text": "raceId" + } + }, + "contextRegion": { + "startLine": 793, + "startColumn": 14, + "charOffset": 32748, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tpropTaskHuntStream.init(taskHuntStream, taskHuntSize);\n\n\t\t\t\tuint16_t raceId;\n\t\t\t\twhile (propTaskHuntStream.read(raceId)) {\n\t\t\t\t\tslot->raceIdList.push_back(raceId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47faf069aaf7d683490bd7a9317bd10e4520be9b152ff5692bae9a9806cd5cbc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 796, + "startColumn": 5, + "charOffset": 32833, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 794, + "startColumn": 5, + "charOffset": 32807, + "charLength": 5, + "snippet": { + "text": "\n\t\t\t\tuint16_t raceId;\n\t\t\t\twhile (propTaskHuntStream.read(raceId)) {\n\t\t\t\t\tslot->raceIdList.push_back(raceId);\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b12eee60f0bcdfe14ad9c3a9e7211dfcf66b0c3327060a06bf07f92a8c83f7bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 804, + "startColumn": 13, + "charOffset": 33100, + "charLength": 23, + "snippet": { + "text": "setTaskHuntingSlotClass" + } + }, + "contextRegion": { + "startLine": 802, + "startColumn": 13, + "charOffset": 33081, + "charLength": 23, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tplayer->setTaskHuntingSlotClass(slot);\n\t\t\t} while (result->next());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c3351bd88f5ce0d0d8e3c64e2bcbfa435d144fbfa46f2d32e70454f78ea7b31" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 805, + "startColumn": 21, + "charOffset": 33151, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 803, + "startColumn": 21, + "charOffset": 33087, + "charLength": 4, + "snippet": { + "text": "\n\t\t\t\tplayer->setTaskHuntingSlotClass(slot);\n\t\t\t} while (result->next());\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "975b75278528059c97fba69a8ba09b4428f99c015ea7aa384696755c42b9ec0f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 810, + "startColumn": 70, + "charOffset": 33239, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 808, + "startColumn": 70, + "charOffset": 33167, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerForgeHistory(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f030e7f5cced4a6c2ec4b446806c61f6eedbf4fe5b259218d7557efd90a47fe7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 811, + "startColumn": 6, + "charOffset": 33275, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 809, + "startColumn": 6, + "charOffset": 33169, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerForgeHistory(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97a479990f315323e74b318ef95a1c18cd74192823fc31b147d12a694317aef2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 811, + "startColumn": 17, + "charOffset": 33286, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 809, + "startColumn": 17, + "charOffset": 33169, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerForgeHistory(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd9356ffdafde4eb1c7bbebf8e98938614b0a3ffdf14ab282de71c06b41cb5af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 818, + "startColumn": 13, + "charOffset": 33528, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 816, + "startColumn": 13, + "charOffset": 33404, + "charLength": 1, + "snippet": { + "text": "\tstd::ostringstream query;\n\tquery << \"SELECT * FROM `forge_history` WHERE `player_id` = \" << player->getGUID();\n\tif (result = Database::getInstance().storeQuery(query.str())) {\n\t\tdo {\n\t\t\tauto actionEnum = magic_enum::enum_value(result->getNumber(\"action_type\"));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e5278ec64314594d13563a5724ed8c0cc41b30cca724cc237651c9a88529cb7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 819, + "startColumn": 3, + "charOffset": 33583, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 817, + "startColumn": 3, + "charOffset": 33431, + "charLength": 2, + "snippet": { + "text": "\tquery << \"SELECT * FROM `forge_history` WHERE `player_id` = \" << player->getGUID();\n\tif (result = Database::getInstance().storeQuery(query.str())) {\n\t\tdo {\n\t\t\tauto actionEnum = magic_enum::enum_value(result->getNumber(\"action_type\"));\n\t\t\tForgeHistory history;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4e30713d015f1e32f4b875d7ff4184b4c83c4d7b4cdca1f2235124397de4e66" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 819, + "startColumn": 3, + "charOffset": 33583, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 817, + "startColumn": 3, + "charOffset": 33431, + "charLength": 2, + "snippet": { + "text": "\tquery << \"SELECT * FROM `forge_history` WHERE `player_id` = \" << player->getGUID();\n\tif (result = Database::getInstance().storeQuery(query.str())) {\n\t\tdo {\n\t\t\tauto actionEnum = magic_enum::enum_value(result->getNumber(\"action_type\"));\n\t\t\tForgeHistory history;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47f9041b8b83966e0b1ff5f90d1e08c95c35351ab2bc82474cc91d670f250333" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 827, + "startColumn": 20, + "charOffset": 33989, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 825, + "startColumn": 20, + "charOffset": 33873, + "charLength": 4, + "snippet": { + "text": "\t\t\thistory.success = result->getNumber(\"is_success\");\n\t\t\tplayer->setForgeHistory(history);\n\t\t} while (result->next());\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9f908219eba3e284eb728ebfdfe5311b3b21a341fc17aa238bd1a8a5088988d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 831, + "startColumn": 67, + "charOffset": 34070, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 829, + "startColumn": 67, + "charOffset": 34001, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerBosstiary(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "532064e3aacc62063045347079d2cb8e7d290ad2e8422f991e12c568b13aaea7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 832, + "startColumn": 6, + "charOffset": 34106, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 830, + "startColumn": 6, + "charOffset": 34003, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerBosstiary(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e74bda4de6584d75e674fb648b68891233bb08a7d12a1890a16bd4413a216b78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 832, + "startColumn": 17, + "charOffset": 34117, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 830, + "startColumn": 17, + "charOffset": 34003, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerBosstiary(std::shared_ptr player, DBResult_ptr result) {\n\tif (!result || !player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player or Result nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87f329db56d21919847b5f676fec12d730afb6f3999f0f33f314af34d7548689" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 839, + "startColumn": 13, + "charOffset": 34362, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 837, + "startColumn": 13, + "charOffset": 34235, + "charLength": 1, + "snippet": { + "text": "\tstd::ostringstream query;\n\tquery << \"SELECT * FROM `player_bosstiary` WHERE `player_id` = \" << player->getGUID();\n\tif (result = Database::getInstance().storeQuery(query.str())) {\n\t\tdo {\n\t\t\tplayer->setSlotBossId(1, result->getNumber(\"bossIdSlotOne\"));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82b381ed7ccd97bc36142dec6dd9ee7b78757ac1f0443ead7afa8e5e550e0eb7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 840, + "startColumn": 3, + "charOffset": 34417, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 838, + "startColumn": 3, + "charOffset": 34262, + "charLength": 2, + "snippet": { + "text": "\tquery << \"SELECT * FROM `player_bosstiary` WHERE `player_id` = \" << player->getGUID();\n\tif (result = Database::getInstance().storeQuery(query.str())) {\n\t\tdo {\n\t\t\tplayer->setSlotBossId(1, result->getNumber(\"bossIdSlotOne\"));\n\t\t\tplayer->setSlotBossId(2, result->getNumber(\"bossIdSlotTwo\"));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ee0b92d66d1fe06ed30b4956849ce746009ee51056f02cd8a0fcacba18f688e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-runtime-int", + "ruleIndex": 546, + "kind": "fail", + "level": "warning", + "message": { + "text": "consider replacing 'unsigned long' with 'uint64'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 846, + "startColumn": 4, + "charOffset": 34693, + "charLength": 8, + "snippet": { + "text": "unsigned" + } + }, + "contextRegion": { + "startLine": 844, + "startColumn": 4, + "charOffset": 34675, + "charLength": 8, + "snippet": { + "text": "\n\t\t\t// Tracker\n\t\t\tunsigned long size;\n\t\t\tconst char* chars = result->getStream(\"tracker\", size);\n\t\t\tPropStream stream;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b5f8a8e28f06c5b29e584a223f78c87e878bd28fb5707d79bb9f9233a50e6cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'size' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 846, + "startColumn": 18, + "charOffset": 34707, + "charLength": 4, + "snippet": { + "text": "size" + } + }, + "contextRegion": { + "startLine": 844, + "startColumn": 18, + "charOffset": 34675, + "charLength": 4, + "snippet": { + "text": "\n\t\t\t// Tracker\n\t\t\tunsigned long size;\n\t\t\tconst char* chars = result->getStream(\"tracker\", size);\n\t\t\tPropStream stream;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "accb31ea880bea11f59d8607d0cf66d26c6c9fff3f840f5fce2f67e5534df745" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'bossid' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 850, + "startColumn": 13, + "charOffset": 34835, + "charLength": 6, + "snippet": { + "text": "bossid" + } + }, + "contextRegion": { + "startLine": 848, + "startColumn": 13, + "charOffset": 34772, + "charLength": 6, + "snippet": { + "text": "\t\t\tPropStream stream;\n\t\t\tstream.init(chars, size);\n\t\t\tuint16_t bossid;\n\t\t\twhile (stream.read(bossid)) {\n\t\t\t\tconst auto monsterType = g_monsters().getMonsterTypeByRaceId(bossid, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e4089df4204f20ac95dca9c0d2b693af7d718340c9aad0dbe83f777225ebe93" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 851, + "startColumn": 4, + "charOffset": 34846, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 849, + "startColumn": 4, + "charOffset": 34794, + "charLength": 5, + "snippet": { + "text": "\t\t\tstream.init(chars, size);\n\t\t\tuint16_t bossid;\n\t\t\twhile (stream.read(bossid)) {\n\t\t\t\tconst auto monsterType = g_monsters().getMonsterTypeByRaceId(bossid, true);\n\t\t\t\tif (!monsterType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3cc7b80f415e4fd4d666f33b4e5d35172ff630d26faca621dc794a359c4907f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 853, + "startColumn": 9, + "charOffset": 34974, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 851, + "startColumn": 9, + "charOffset": 34843, + "charLength": 1, + "snippet": { + "text": "\t\t\twhile (stream.read(bossid)) {\n\t\t\t\tconst auto monsterType = g_monsters().getMonsterTypeByRaceId(bossid, true);\n\t\t\t\tif (!monsterType) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2431f4b50de63a16e7274d849f4583319edecf44f3f08a59923ef7ab5784a152" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 859, + "startColumn": 20, + "charOffset": 35109, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 857, + "startColumn": 20, + "charOffset": 35012, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tplayer->addMonsterToCyclopediaTrackerList(monsterType, true, false);\n\t\t\t}\n\t\t} while (result->next());\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e22ef1f9f0d9df24a9194f73717623b1ae1952b56b5cf8169f900d4179bfa8b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 863, + "startColumn": 61, + "charOffset": 35184, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 861, + "startColumn": 61, + "charOffset": 35121, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::bindRewardBag(std::shared_ptr player, ItemsMap &rewardItemsMap) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "910ff8b3312b00405fdbe36a83576f485043910babea8f43631e703a81537cd0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 864, + "startColumn": 6, + "charOffset": 35225, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 862, + "startColumn": 6, + "charOffset": 35123, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::bindRewardBag(std::shared_ptr player, ItemsMap &rewardItemsMap) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7172222998142eaba891778100cb9c6acbd6dadd691d11dfdcb8ca19dd382967" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 869, + "startColumn": 2, + "charOffset": 35334, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 867, + "startColumn": 2, + "charOffset": 35329, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (auto &[id, itemPair] : rewardItemsMap) {\n\t\tconst auto [item, pid] = itemPair;\n\t\tif (pid == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eaa133df15030d63c2bc49513822f56f538a840c8621dd283fc448006e4f1fb3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 883, + "startColumn": 2, + "charOffset": 35777, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 881, + "startColumn": 2, + "charOffset": 35694, + "charLength": 3, + "snippet": { + "text": "\nvoid IOLoginDataLoad::insertItemsIntoRewardBag(const ItemsMap &rewardItemsMap) {\n\tfor (const auto &it : std::views::reverse(rewardItemsMap)) {\n\t\tconst std::pair, int32_t> &pair = it.second;\n\t\tstd::shared_ptr item = pair.first;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f59032aff7b63566dfb6cce485bce2a74a49ae81b0e9cd92514cd6fcc335276" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when declaring iterators" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 891, + "startColumn": 3, + "charOffset": 36014, + "charLength": 8, + "snippet": { + "text": "ItemsMap" + } + }, + "contextRegion": { + "startLine": 889, + "startColumn": 3, + "charOffset": 36007, + "charLength": 8, + "snippet": { + "text": "\t\t}\n\n\t\tItemsMap::const_iterator it2 = rewardItemsMap.find(pid);\n\t\tif (it2 == rewardItemsMap.end()) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d17b490e29959ba575cff579bb36793bbce7352c113e2ac7e179103ea77463ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 903, + "startColumn": 74, + "charOffset": 36342, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 901, + "startColumn": 74, + "charOffset": 36266, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerInitializeSystem(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61b604057bc5fb6523b12eb6fd31de5ad4b0c9f3d738a913b347dfdc1a9ed9bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 904, + "startColumn": 6, + "charOffset": 36357, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 902, + "startColumn": 6, + "charOffset": 36268, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerInitializeSystem(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "431309622d13e2e080307ba03fa6e41dab82396062b7c29f4491a90630ed03e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 922, + "startColumn": 70, + "charOffset": 36890, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 920, + "startColumn": 70, + "charOffset": 36818, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOLoginDataLoad::loadPlayerUpdateSystem(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e38174aa41e11fe85f9117c4dd0d4677be720c59e5c90668825c4f097c12d84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_load_player.cpp" + }, + "region": { + "startLine": 923, + "startColumn": 6, + "charOffset": 36905, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 921, + "startColumn": 6, + "charOffset": 36820, + "charLength": 1, + "snippet": { + "text": "\nvoid IOLoginDataLoad::loadPlayerUpdateSystem(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::loadPlayer] - Player nullptr: {}\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bda4b48779f6aa0a916b009f53b5a32b2e56df475c4de5933bdd67d85aeecf60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'saveItems' has cognitive complexity of 63 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 15, + "startColumn": 23, + "charOffset": 491, + "charLength": 9, + "snippet": { + "text": "saveItems" + } + }, + "contextRegion": { + "startLine": 13, + "startColumn": 23, + "charOffset": 443, + "charLength": 9, + "snippet": { + "text": "#include \"game/game.hpp\"\n\nbool IOLoginDataSave::saveItems(std::shared_ptr player, const ItemBlockList &itemList, DBInsert &query_insert, PropWriteStream &propWriteStream) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1d387e7f8ddd2822db100d18b39fdd80b69c52460d5aa3a782b3c2ce50db325" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 15, + "startColumn": 57, + "charOffset": 525, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 13, + "startColumn": 57, + "charOffset": 443, + "charLength": 6, + "snippet": { + "text": "#include \"game/game.hpp\"\n\nbool IOLoginDataSave::saveItems(std::shared_ptr player, const ItemBlockList &itemList, DBInsert &query_insert, PropWriteStream &propWriteStream) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a041b2d7252b7c4eab5ac93e94111bc887cd0eed5e3da4f18848324f1d74b40" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 16, + "startColumn": 6, + "charOffset": 629, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 14, + "startColumn": 6, + "charOffset": 468, + "charLength": 1, + "snippet": { + "text": "\nbool IOLoginDataSave::saveItems(std::shared_ptr player, const ItemBlockList &itemList, DBInsert &query_insert, PropWriteStream &propWriteStream) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ced276d0ca08209e5c0df20826da96bff1cdbe4b719b79b0e7d8176164be7e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 22, + "charOffset": 967, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 22, + "charOffset": 840, + "charLength": 3, + "snippet": { + "text": "\tusing ContainerBlock = std::pair, int32_t>;\n\tstd::list queue;\n\tint32_t runningId = 100;\n\n\t// Loop through each item in itemList" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45ba4ab5ce15bbfc30f61cdc4ba09164b08a4f7b743402cb360be2f66c4d0fe8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 8, + "charOffset": 1311, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 8, + "charOffset": 1189, + "charLength": 1, + "snippet": { + "text": "\t\t// Update container attributes if necessary\n\t\tif (std::shared_ptr container = item->getContainer()) {\n\t\t\tif (!container) {\n\t\t\t\tcontinue; // Check for null container\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "040fcf3d57420630864159f099d66a777cfaefbe9275796e1bb202d31a2536a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 47, + "startColumn": 5, + "charOffset": 1560, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 45, + "startColumn": 5, + "charOffset": 1521, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tif (!openContainers.empty()) {\n\t\t\t\tfor (const auto &its : openContainers) {\n\t\t\t\t\tauto openContainer = its.second;\n\t\t\t\t\tauto opcontainer = openContainer.container;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98a5f69ed0cd1cfd81b898297a45cb89d1f103f862dd082ffd2384892421cb50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 52, + "startColumn": 64, + "charOffset": 1789, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 50, + "startColumn": 64, + "charOffset": 1688, + "charLength": 1, + "snippet": { + "text": "\n\t\t\t\t\tif (opcontainer == container) {\n\t\t\t\t\t\tcontainer->setAttribute(ItemAttribute_t::OPENCONTAINER, ((int)its.first) + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c20bce24d1be39046c696cb2fe98f83a084aaf8fd938374d7d24397542617e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 10, + "charOffset": 1881, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 10, + "charOffset": 1842, + "charLength": 12, + "snippet": { + "text": "\n\t\t\t// Add container to queue\n\t\t\tqueue.emplace_back(container, runningId);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbe0ec5de74e785aecc405aeed192cc68c7b0c40c27b8634c66cfacfe5bf5ca4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'attributesSize' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 71, + "startColumn": 10, + "charOffset": 2138, + "charLength": 14, + "snippet": { + "text": "attributesSize" + } + }, + "contextRegion": { + "startLine": 69, + "startColumn": 10, + "charOffset": 2124, + "charLength": 14, + "snippet": { + "text": "\t\t}\n\n\t\tsize_t attributesSize;\n\t\tconst char* attributes = propWriteStream.getStream(attributesSize);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aae65090f19168e5d7a908fd3d90ca8bf6d552827667780014a80a92924c328b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 89, + "startColumn": 7, + "charOffset": 2778, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 87, + "startColumn": 7, + "charOffset": 2750, + "charLength": 1, + "snippet": { + "text": "\t\tqueue.pop_front();\n\n\t\tif (!container) {\n\t\t\tcontinue; // Check for null container\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b1109e96dd77c3aeb8dfa1aef4ee76d3880b3ca30ddf991e8b93a83d8fc1eb9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 94, + "startColumn": 30, + "charOffset": 2904, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 92, + "startColumn": 30, + "charOffset": 2837, + "charLength": 4, + "snippet": { + "text": "\n\t\t// Loop through items in container\n\t\tfor (std::shared_ptr item : container->getItemList()) {\n\t\t\tif (!item) {\n\t\t\t\tcontinue; // Check for null item" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f438dcf410f3b1a2ba395caaf946ac53562704c451b0a9050e9da228eeb61978" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 95, + "startColumn": 8, + "charOffset": 2946, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 93, + "startColumn": 8, + "charOffset": 2838, + "charLength": 1, + "snippet": { + "text": "\t\t// Loop through items in container\n\t\tfor (std::shared_ptr item : container->getItemList()) {\n\t\t\tif (!item) {\n\t\t\t\tcontinue; // Check for null item\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0565be5121687e6487af390205f0f54f1eb43d7ff06caec612655d4dce62d53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 104, + "startColumn": 11, + "charOffset": 3166, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 102, + "startColumn": 11, + "charOffset": 3066, + "charLength": 12, + "snippet": { + "text": "\t\t\tstd::shared_ptr subContainer = item->getContainer();\n\t\t\tif (subContainer) {\n\t\t\t\tqueue.emplace_back(subContainer, runningId);\n\t\t\t\tif (subContainer->getAttribute(ItemAttribute_t::OPENCONTAINER) > 0) {\n\t\t\t\t\tsubContainer->setAttribute(ItemAttribute_t::OPENCONTAINER, 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1214ac654063db7ed65ff25fba5730d266a3744213f331e068d1088fbc556d8b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 110, + "startColumn": 6, + "charOffset": 3403, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 108, + "startColumn": 6, + "charOffset": 3362, + "charLength": 3, + "snippet": { + "text": "\n\t\t\t\tif (!openContainers.empty()) {\n\t\t\t\t\tfor (const auto &it : openContainers) {\n\t\t\t\t\t\tauto openContainer = it.second;\n\t\t\t\t\t\tauto opcontainer = openContainer.container;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5de1940568bd6725f53f49c04a08cda0f373a1ca9da9d8f4df30cb1e206b7234" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'attributesSize' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 131, + "startColumn": 11, + "charOffset": 3935, + "charLength": 14, + "snippet": { + "text": "attributesSize" + } + }, + "contextRegion": { + "startLine": 129, + "startColumn": 11, + "charOffset": 3919, + "charLength": 14, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tsize_t attributesSize;\n\t\t\tconst char* attributes = propWriteStream.getStream(attributesSize);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "becfdffefdb31a0e9fcd1fd7a0a632af016489853edeb524faca71b23cfb167c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 151, + "startColumn": 63, + "charOffset": 4586, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 149, + "startColumn": 63, + "charOffset": 4521, + "charLength": 6, + "snippet": { + "text": "}\n\nbool IOLoginDataSave::savePlayerFirst(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1494135cc17137b951541306f6c298cb57ea38b77512b3fc01b1580cb7261143" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 152, + "startColumn": 6, + "charOffset": 4601, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 6, + "charOffset": 4523, + "charLength": 1, + "snippet": { + "text": "\nbool IOLoginDataSave::savePlayerFirst(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c992a80c851e23a371e119e56f43c6df946d100eef08d434c6b3bd8eaa51ad03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 166, + "startColumn": 6, + "charOffset": 4981, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 164, + "startColumn": 6, + "charOffset": 4848, + "charLength": 1, + "snippet": { + "text": "\tquery << \"SELECT `save` FROM `players` WHERE `id` = \" << player->getGUID();\n\tDBResult_ptr result = db.storeQuery(query.str());\n\tif (!result) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Error for select result query from player: {}\", player->getName());\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ced276d0ca08209e5c0df20826da96bff1cdbe4b719b79b0e7d8176164be7e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 218, + "startColumn": 45, + "charOffset": 8020, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 216, + "startColumn": 45, + "charOffset": 7882, + "charLength": 3, + "snippet": { + "text": "\tquery << \"`randomize_mount` = \" << static_cast(player->isRandomMounted()) << \",\";\n\n\tquery << \"`cap` = \" << (player->capacity / 100) << \",\";\n\tquery << \"`sex` = \" << static_cast(player->sex) << \",\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63d94a3e26e9786e182a422b9dc41cf8df618c3ae4b6a41a8b0a925974dffd6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 231, + "startColumn": 2, + "charOffset": 8346, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 229, + "startColumn": 2, + "charOffset": 8286, + "charLength": 3, + "snippet": { + "text": "\t// serialize conditions\n\tPropWriteStream propWriteStream;\n\tfor (const auto &condition : player->conditions) {\n\t\tif (condition->isPersistent()) {\n\t\t\tcondition->serialize(propWriteStream);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ecff5820f846dd345d8c486ed518df1da5c23d0f900cd77e3dcb1a2c4bec1dc5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 234, + "startColumn": 35, + "charOffset": 8508, + "charLength": 17, + "snippet": { + "text": "CONDITIONATTR_END" + } + }, + "contextRegion": { + "startLine": 232, + "startColumn": 35, + "charOffset": 8397, + "charLength": 17, + "snippet": { + "text": "\t\tif (condition->isPersistent()) {\n\t\t\tcondition->serialize(propWriteStream);\n\t\t\tpropWriteStream.write(CONDITIONATTR_END);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0de92b95d050b76a1c51f4f8192424e0fa4ac409d73264cd840a737157c59f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'attributesSize' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 238, + "startColumn": 9, + "charOffset": 8544, + "charLength": 14, + "snippet": { + "text": "attributesSize" + } + }, + "contextRegion": { + "startLine": 236, + "startColumn": 9, + "charOffset": 8532, + "charLength": 14, + "snippet": { + "text": "\t}\n\n\tsize_t attributesSize;\n\tconst char* attributes = propWriteStream.getStream(attributesSize);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9cb3f8d3aa75ca5acaf13993680b0ac8fbcb8b9caaff1187c7a4f82bc90faa07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 254, + "startColumn": 3, + "charOffset": 9106, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 3, + "charOffset": 9072, + "charLength": 2, + "snippet": { + "text": "\n\t\tSkulls_t skull = SKULL_NONE;\n\t\tif (player->skull == SKULL_RED) {\n\t\t\tskull = SKULL_RED;\n\t\t} else if (player->skull == SKULL_BLACK) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f30ddb160fb203edde318c4ba2c7169bea51dbbdf24de691606a5ca10589083" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 264, + "startColumn": 77, + "charOffset": 9497, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 262, + "startColumn": 77, + "charOffset": 9302, + "charLength": 4, + "snippet": { + "text": "\tquery << \"`lastlogout` = \" << player->getLastLogout() << \",\";\n\tquery << \"`balance` = \" << player->bankBalance << \",\";\n\tquery << \"`offlinetraining_time` = \" << player->getOfflineTrainingTime() / 1000 << \",\";\n\tquery << \"`offlinetraining_skill` = \" << std::to_string(player->getOfflineTrainingSkill()) << \",\";\n\tquery << \"`stamina` = \" << player->getStaminaMinutes() << \",\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb170581aa31c3fba5c837cc84a309ee9a5831de6acb02721ba6319085054c5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 305, + "startColumn": 2, + "charOffset": 12660, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 303, + "startColumn": 2, + "charOffset": 12655, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (int i = 1; i <= 8; i++) {\n\t\tquery << \"`blessings\" << i << \"`\"\n\t\t\t << \" = \" << static_cast(player->getBlessingCount(static_cast(i))) << ((i == 8) ? \" \" : \",\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f39570ffa19485dd89f1db249adeaee7e170a2a5b1a7c13e45eea1ff90f29aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 305, + "startColumn": 23, + "charOffset": 12681, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 303, + "startColumn": 23, + "charOffset": 12655, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tfor (int i = 1; i <= 8; i++) {\n\t\tquery << \"`blessings\" << i << \"`\"\n\t\t\t << \" = \" << static_cast(player->getBlessingCount(static_cast(i))) << ((i == 8) ? \" \" : \",\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e33f1f5eb81da488542e8a5e3d9bde5ca868dcce1edeecb85115888a74ccab79" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 307, + "startColumn": 95, + "charOffset": 12821, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 305, + "startColumn": 95, + "charOffset": 12659, + "charLength": 1, + "snippet": { + "text": "\tfor (int i = 1; i <= 8; i++) {\n\t\tquery << \"`blessings\" << i << \"`\"\n\t\t\t << \" = \" << static_cast(player->getBlessingCount(static_cast(i))) << ((i == 8) ? \" \" : \",\");\n\t}\n\tquery << \" WHERE `id` = \" << player->getGUID();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b06b39ef5322a8eee838d4016bc5d603bb17b8f6a725cd5f56c2466f5e89367b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 307, + "startColumn": 101, + "charOffset": 12827, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 305, + "startColumn": 101, + "charOffset": 12659, + "charLength": 1, + "snippet": { + "text": "\tfor (int i = 1; i <= 8; i++) {\n\t\tquery << \"`blessings\" << i << \"`\"\n\t\t\t << \" = \" << static_cast(player->getBlessingCount(static_cast(i))) << ((i == 8) ? \" \" : \",\");\n\t}\n\tquery << \" WHERE `id` = \" << player->getGUID();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55a6c12b9ace4e608893f775c9080bd1cc5c864cb8c3b1f83458450aee52e032" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in conditional return statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 312, + "startColumn": 10, + "charOffset": 12944, + "charLength": 5, + "snippet": { + "text": "false" + } + }, + "contextRegion": { + "startLine": 310, + "startColumn": 10, + "charOffset": 12896, + "charLength": 5, + "snippet": { + "text": "\n\tif (!db.executeQuery(query.str())) {\n\t\treturn false;\n\t}\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dcbfbb19ac7bfed1bc2022815d06d293bca294159ede10a088a6e25260565e55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 317, + "startColumn": 63, + "charOffset": 13033, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 315, + "startColumn": 63, + "charOffset": 12968, + "charLength": 6, + "snippet": { + "text": "}\n\nbool IOLoginDataSave::savePlayerStash(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a4f6c2cca1f3fb99359c16f50b25ea52f0ee5675eb3915ed8cf81fe7b10fa6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 318, + "startColumn": 6, + "charOffset": 13048, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 316, + "startColumn": 6, + "charOffset": 12970, + "charLength": 1, + "snippet": { + "text": "\nbool IOLoginDataSave::savePlayerStash(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48b365268aa916339a4d90f86027159f8c8172385e19dcdc2a39403ec2fa597e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 333, + "startColumn": 2, + "charOffset": 13485, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 331, + "startColumn": 2, + "charOffset": 13386, + "charLength": 3, + "snippet": { + "text": "\n\tDBInsert stashQuery(\"INSERT INTO `player_stash` (`player_id`,`item_id`,`item_count`) VALUES \");\n\tfor (const auto &[itemId, itemCount] : player->getStashItems()) {\n\t\tquery << player->getGUID() << ',' << itemId << ',' << itemCount;\n\t\tif (!stashQuery.addRow(query)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87bc612e482c874fa1ba0b7348d5c11a68385bc846450754a9398d97bdde4f43" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in conditional return statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 341, + "startColumn": 10, + "charOffset": 13717, + "charLength": 5, + "snippet": { + "text": "false" + } + }, + "contextRegion": { + "startLine": 339, + "startColumn": 10, + "charOffset": 13677, + "charLength": 5, + "snippet": { + "text": "\n\tif (!stashQuery.execute()) {\n\t\treturn false;\n\t}\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1184c95b2a75bd4f74530b62b79dd92d28159d67cd812bf54d0d32af32779740" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 346, + "startColumn": 64, + "charOffset": 13807, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 344, + "startColumn": 64, + "charOffset": 13741, + "charLength": 6, + "snippet": { + "text": "}\n\nbool IOLoginDataSave::savePlayerSpells(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "594412ae0b6d35cac27e006d35c4200be0e03847612fe78e90a5d8382325ab6c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 347, + "startColumn": 6, + "charOffset": 13822, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 345, + "startColumn": 6, + "charOffset": 13743, + "charLength": 1, + "snippet": { + "text": "\nbool IOLoginDataSave::savePlayerSpells(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4dcc5265cd859853d0a2f16ec0b4a99d88420f57d15fee9657da5a9e382039ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 362, + "startColumn": 2, + "charOffset": 14248, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 360, + "startColumn": 2, + "charOffset": 14161, + "charLength": 3, + "snippet": { + "text": "\n\tDBInsert spellsQuery(\"INSERT INTO `player_spells` (`player_id`, `name` ) VALUES \");\n\tfor (const std::string &spellName : player->learnedInstantSpellList) {\n\t\tquery << player->getGUID() << ',' << db.escapeString(spellName);\n\t\tif (!spellsQuery.addRow(query)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "835b2d795d7dc3cbe4a3ca5946a895557b433915f519e5d55c7931bfaf284669" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in conditional return statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 370, + "startColumn": 10, + "charOffset": 14487, + "charLength": 5, + "snippet": { + "text": "false" + } + }, + "contextRegion": { + "startLine": 368, + "startColumn": 10, + "charOffset": 14446, + "charLength": 5, + "snippet": { + "text": "\n\tif (!spellsQuery.execute()) {\n\t\treturn false;\n\t}\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0998cccccf7281963ce7cbdf42bd57708bbebc4bb3077289905669a2ad7e74e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 375, + "startColumn": 63, + "charOffset": 14576, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 373, + "startColumn": 63, + "charOffset": 14511, + "charLength": 6, + "snippet": { + "text": "}\n\nbool IOLoginDataSave::savePlayerKills(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13e513e177a1aacb8291d2e2234d803a183b8a21b8199d03c29bdf12df68a27d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 376, + "startColumn": 6, + "charOffset": 14591, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 374, + "startColumn": 6, + "charOffset": 14513, + "charLength": 1, + "snippet": { + "text": "\nbool IOLoginDataSave::savePlayerKills(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c49dfdf4532f370f645ee07f6de893e53ae201306f6ea6fe618b8925e423ad5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 391, + "startColumn": 2, + "charOffset": 15035, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 389, + "startColumn": 2, + "charOffset": 14929, + "charLength": 3, + "snippet": { + "text": "\n\tDBInsert killsQuery(\"INSERT INTO `player_kills` (`player_id`, `target`, `time`, `unavenged`) VALUES\");\n\tfor (const auto &kill : player->unjustifiedKills) {\n\t\tquery << player->getGUID() << ',' << kill.target << ',' << kill.time << ',' << kill.unavenged;\n\t\tif (!killsQuery.addRow(query)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c834d7e77daf9e791a353299bbacf4784e4646ef98dc932adc7d93591da49b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in conditional return statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 399, + "startColumn": 10, + "charOffset": 15283, + "charLength": 5, + "snippet": { + "text": "false" + } + }, + "contextRegion": { + "startLine": 397, + "startColumn": 10, + "charOffset": 15243, + "charLength": 5, + "snippet": { + "text": "\n\tif (!killsQuery.execute()) {\n\t\treturn false;\n\t}\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c450a1cac30bd3a77ec5a4005eb7c02dc3137d654c3f2a4b520e838e71c1ec63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 404, + "startColumn": 72, + "charOffset": 15381, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 402, + "startColumn": 72, + "charOffset": 15307, + "charLength": 6, + "snippet": { + "text": "}\n\nbool IOLoginDataSave::savePlayerBestiarySystem(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9157a3324e156af673958d528172be33f8a5b229ad29ce3ea3c3e8d9c5ee0a53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 405, + "startColumn": 6, + "charOffset": 15396, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 403, + "startColumn": 6, + "charOffset": 15309, + "charLength": 1, + "snippet": { + "text": "\nbool IOLoginDataSave::savePlayerBestiarySystem(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "244789d9cbfa13f968e402d352b1faa8f77152b58967a931911278858211ae1c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 439, + "startColumn": 2, + "charOffset": 17134, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 437, + "startColumn": 2, + "charOffset": 17095, + "charLength": 3, + "snippet": { + "text": "\n\tPropWriteStream propBestiaryStream;\n\tfor (const auto &trackedType : player->getCyclopediaMonsterTrackerSet(false)) {\n\t\tpropBestiaryStream.write(trackedType->info.raceid);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f4a4bd414a0fe79d00b62800dbf026438772cc86bbd3be6bda6fedf064b3a56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'trackerSize' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 442, + "startColumn": 9, + "charOffset": 17289, + "charLength": 11, + "snippet": { + "text": "trackerSize" + } + }, + "contextRegion": { + "startLine": 440, + "startColumn": 9, + "charOffset": 17214, + "charLength": 11, + "snippet": { + "text": "\t\tpropBestiaryStream.write(trackedType->info.raceid);\n\t}\n\tsize_t trackerSize;\n\tconst char* trackerList = propBestiaryStream.getStream(trackerSize);\n\tquery << \" `tracker list` = \" << db.escapeBlob(trackerList, static_cast(trackerSize));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "746d6b719716dabc59e80f7acd1d2a3ffc3fbf77a1738dd1a63752e2025c68a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 454, + "startColumn": 62, + "charOffset": 17776, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 452, + "startColumn": 62, + "charOffset": 17712, + "charLength": 6, + "snippet": { + "text": "}\n\nbool IOLoginDataSave::savePlayerItem(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd1b03cd38247ac3a871881ecabf6b60e89bc907e54f028c900f1add676618f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 455, + "startColumn": 6, + "charOffset": 17791, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 453, + "startColumn": 6, + "charOffset": 17714, + "charLength": 1, + "snippet": { + "text": "\nbool IOLoginDataSave::savePlayerItem(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2ef6edcbc0471dbfda4ccf4c5d59090904dc0eacff54c8073851aec94d75fbc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 472, + "startColumn": 2, + "charOffset": 18416, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 470, + "startColumn": 2, + "charOffset": 18389, + "charLength": 3, + "snippet": { + "text": "\n\tItemBlockList itemList;\n\tfor (int32_t slotId = CONST_SLOT_FIRST; slotId <= CONST_SLOT_LAST; ++slotId) {\n\t\tstd::shared_ptr item = player->inventory[slotId];\n\t\tif (item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a76b1fe9255a8b027b096e2625095ec96d2779b848115e4984cd2760bd458ed0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-3", + "ruleIndex": 458, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-3: The loop-counter shall not be modified within condition or statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 472, + "startColumn": 2, + "charOffset": 18416, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 470, + "startColumn": 2, + "charOffset": 18389, + "charLength": 3, + "snippet": { + "text": "\n\tItemBlockList itemList;\n\tfor (int32_t slotId = CONST_SLOT_FIRST; slotId <= CONST_SLOT_LAST; ++slotId) {\n\t\tstd::shared_ptr item = player->inventory[slotId];\n\t\tif (item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c36668ca3ddf98931576ffbdcb8d6853b19564bb44ff9f7acd8020f6e0bf6f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 473, + "startColumn": 32, + "charOffset": 18526, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 471, + "startColumn": 32, + "charOffset": 18390, + "charLength": 6, + "snippet": { + "text": "\tItemBlockList itemList;\n\tfor (int32_t slotId = CONST_SLOT_FIRST; slotId <= CONST_SLOT_LAST; ++slotId) {\n\t\tstd::shared_ptr item = player->inventory[slotId];\n\t\tif (item) {\n\t\t\titemList.emplace_back(slotId, item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a99bcd4726da9f7b1c2b518cd9e1555dbacbdc2cc7de3d2f0a3e6009456636f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 475, + "startColumn": 13, + "charOffset": 18579, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 473, + "startColumn": 13, + "charOffset": 18495, + "charLength": 12, + "snippet": { + "text": "\t\tstd::shared_ptr item = player->inventory[slotId];\n\t\tif (item) {\n\t\t\titemList.emplace_back(slotId, item);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b99325dcbd1f4879a09ab68331ef40053907e9881c8741f6cb5b097fd5c07bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 486, + "startColumn": 68, + "charOffset": 18891, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 484, + "startColumn": 68, + "charOffset": 18821, + "charLength": 6, + "snippet": { + "text": "}\n\nbool IOLoginDataSave::savePlayerDepotItems(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "085143f8cdbdb2e453158990263b589ed195142f85daac14bfbda20ca83b4425" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 487, + "startColumn": 6, + "charOffset": 18906, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 485, + "startColumn": 6, + "charOffset": 18823, + "charLength": 1, + "snippet": { + "text": "\nbool IOLoginDataSave::savePlayerDepotItems(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b1109e96dd77c3aeb8dfa1aef4ee76d3880b3ca30ddf991e8b93a83d8fc1eb9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 508, + "startColumn": 4, + "charOffset": 19546, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 506, + "startColumn": 4, + "charOffset": 19480, + "charLength": 3, + "snippet": { + "text": "\n\t\tfor (const auto &[pid, depotChest] : player->depotChests) {\n\t\t\tfor (std::shared_ptr item : depotChest->getItemList()) {\n\t\t\t\tdepotList.emplace_back(pid, item);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20d2b60be57feeada1a04f85975c63579d06135b29e74464e058e7840f16494a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 508, + "startColumn": 31, + "charOffset": 19573, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 506, + "startColumn": 31, + "charOffset": 19480, + "charLength": 4, + "snippet": { + "text": "\n\t\tfor (const auto &[pid, depotChest] : player->depotChests) {\n\t\t\tfor (std::shared_ptr item : depotChest->getItemList()) {\n\t\t\t\tdepotList.emplace_back(pid, item);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0dd52a9f77844d444be1c43d8374f28d3231a3f11d1532499bd272446bd707fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 509, + "startColumn": 15, + "charOffset": 19623, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 507, + "startColumn": 15, + "charOffset": 19481, + "charLength": 12, + "snippet": { + "text": "\t\tfor (const auto &[pid, depotChest] : player->depotChests) {\n\t\t\tfor (std::shared_ptr item : depotChest->getItemList()) {\n\t\t\t\tdepotList.emplace_back(pid, item);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c9d739b4738145b588b11bd6837edc6fdc59ee7878f03cbf45cd17d0877865e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in conditional return statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 514, + "startColumn": 11, + "charOffset": 19736, + "charLength": 5, + "snippet": { + "text": "false" + } + }, + "contextRegion": { + "startLine": 512, + "startColumn": 11, + "charOffset": 19657, + "charLength": 5, + "snippet": { + "text": "\n\t\tif (!saveItems(player, depotList, depotQuery, propWriteStream)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae50acaea4a7380324af26ff99b4a45a8d250d46675134ab5d82e096d34f8b35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 521, + "startColumn": 63, + "charOffset": 19844, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 519, + "startColumn": 63, + "charOffset": 19779, + "charLength": 6, + "snippet": { + "text": "}\n\nbool IOLoginDataSave::saveRewardItems(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9913558a1d7fe635d122f85fbd866fe3bb3856f89f8fbecc6db8bc4de1665b86" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 522, + "startColumn": 6, + "charOffset": 19859, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 520, + "startColumn": 6, + "charOffset": 19781, + "charLength": 1, + "snippet": { + "text": "\nbool IOLoginDataSave::saveRewardItems(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca91206941481a8871f29555984041c56ccffeb51358a86f9907492910a2dd8f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 539, + "startColumn": 3, + "charOffset": 20299, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 537, + "startColumn": 3, + "charOffset": 20236, + "charLength": 3, + "snippet": { + "text": "\tItemRewardList rewardListItems;\n\tif (!rewardList.empty()) {\n\t\tfor (const auto &rewardId : rewardList) {\n\t\t\tauto reward = player->getReward(rewardId, false);\n\t\t\tif (!reward->empty() && (getTimeMsNow() - rewardId <= 1000 * 60 * 60 * 24 * 7)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5de1940568bd6725f53f49c04a08cda0f373a1ca9da9d8f4df30cb1e206b7234" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'unsigned long' of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 541, + "startColumn": 58, + "charOffset": 20451, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 539, + "startColumn": 58, + "charOffset": 20297, + "charLength": 4, + "snippet": { + "text": "\t\tfor (const auto &rewardId : rewardList) {\n\t\t\tauto reward = player->getReward(rewardId, false);\n\t\t\tif (!reward->empty() && (getTimeMsNow() - rewardId <= 1000 * 60 * 60 * 24 * 7)) {\n\t\t\t\trewardListItems.emplace_back(0, reward);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db94c7c2b3d9bb35e1bf3105080adea37f8aeada00b05d32a42f9ac3da409769" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 541, + "startColumn": 58, + "charOffset": 20451, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 539, + "startColumn": 58, + "charOffset": 20297, + "charLength": 4, + "snippet": { + "text": "\t\tfor (const auto &rewardId : rewardList) {\n\t\t\tauto reward = player->getReward(rewardId, false);\n\t\t\tif (!reward->empty() && (getTimeMsNow() - rewardId <= 1000 * 60 * 60 * 24 * 7)) {\n\t\t\t\trewardListItems.emplace_back(0, reward);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3aab7a614c1e0c9b01a6a2900d5b959654906cb30e4a1d49f0284426ea9a98f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 541, + "startColumn": 65, + "charOffset": 20458, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 539, + "startColumn": 65, + "charOffset": 20297, + "charLength": 2, + "snippet": { + "text": "\t\tfor (const auto &rewardId : rewardList) {\n\t\t\tauto reward = player->getReward(rewardId, false);\n\t\t\tif (!reward->empty() && (getTimeMsNow() - rewardId <= 1000 * 60 * 60 * 24 * 7)) {\n\t\t\t\trewardListItems.emplace_back(0, reward);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2714b03243cd8a0e5fb247d12acc4ea6173002ef9907387824128ed86d98a5d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 541, + "startColumn": 70, + "charOffset": 20463, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 539, + "startColumn": 70, + "charOffset": 20297, + "charLength": 2, + "snippet": { + "text": "\t\tfor (const auto &rewardId : rewardList) {\n\t\t\tauto reward = player->getReward(rewardId, false);\n\t\t\tif (!reward->empty() && (getTimeMsNow() - rewardId <= 1000 * 60 * 60 * 24 * 7)) {\n\t\t\t\trewardListItems.emplace_back(0, reward);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0397205e3886456abde71938b570276c529e7972592eb06ef6820b552d04760e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "24 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 541, + "startColumn": 75, + "charOffset": 20468, + "charLength": 2, + "snippet": { + "text": "24" + } + }, + "contextRegion": { + "startLine": 539, + "startColumn": 75, + "charOffset": 20297, + "charLength": 2, + "snippet": { + "text": "\t\tfor (const auto &rewardId : rewardList) {\n\t\t\tauto reward = player->getReward(rewardId, false);\n\t\t\tif (!reward->empty() && (getTimeMsNow() - rewardId <= 1000 * 60 * 60 * 24 * 7)) {\n\t\t\t\trewardListItems.emplace_back(0, reward);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40559b7f20796d37512964bbac475fe88369576a0aa14b68963168ad22f53da1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 541, + "startColumn": 80, + "charOffset": 20473, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 539, + "startColumn": 80, + "charOffset": 20297, + "charLength": 1, + "snippet": { + "text": "\t\tfor (const auto &rewardId : rewardList) {\n\t\t\tauto reward = player->getReward(rewardId, false);\n\t\t\tif (!reward->empty() && (getTimeMsNow() - rewardId <= 1000 * 60 * 60 * 24 * 7)) {\n\t\t\t\trewardListItems.emplace_back(0, reward);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2edec8204868991c8fcc18214a7c0d6839897bb804098d603a07b558ef550681" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 542, + "startColumn": 21, + "charOffset": 20499, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 540, + "startColumn": 21, + "charOffset": 20341, + "charLength": 12, + "snippet": { + "text": "\t\t\tauto reward = player->getReward(rewardId, false);\n\t\t\tif (!reward->empty() && (getTimeMsNow() - rewardId <= 1000 * 60 * 60 * 24 * 7)) {\n\t\t\t\trewardListItems.emplace_back(0, reward);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af137e9927bd3def92a154edf52bcd958a8473bb7fa431d519852bc6f285085b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 555, + "startColumn": 63, + "charOffset": 20874, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 553, + "startColumn": 63, + "charOffset": 20809, + "charLength": 6, + "snippet": { + "text": "}\n\nbool IOLoginDataSave::savePlayerInbox(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d2dee593f9f87100bb410ce3aa8ce176934450972c0be7dcfcf60d62f9974bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 556, + "startColumn": 6, + "charOffset": 20889, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 554, + "startColumn": 6, + "charOffset": 20811, + "charLength": 1, + "snippet": { + "text": "\nbool IOLoginDataSave::savePlayerInbox(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc6407a25687e93a039a78b507802515dff43ffdbed364a96fbcd5480d71c79c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 573, + "startColumn": 2, + "charOffset": 21422, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 571, + "startColumn": 2, + "charOffset": 21292, + "charLength": 3, + "snippet": { + "text": "\tDBInsert inboxQuery(\"INSERT INTO `player_inboxitems` (`player_id`, `pid`, `sid`, `itemtype`, `count`, `attributes`) VALUES \");\n\n\tfor (const auto &item : player->getInbox()->getItemList()) {\n\t\tinboxList.emplace_back(0, item);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee5b26fd0490c587ea4613b1c80bb8b7e7f979eb602f9ec21baba6bdfcebdbe4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 574, + "startColumn": 13, + "charOffset": 21495, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 572, + "startColumn": 13, + "charOffset": 21420, + "charLength": 12, + "snippet": { + "text": "\n\tfor (const auto &item : player->getInbox()->getItemList()) {\n\t\tinboxList.emplace_back(0, item);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "122c4ce95f8e04329bef9442ee570e3f4c473c73f77d7e7d5e0f679c8df123c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in conditional return statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 578, + "startColumn": 10, + "charOffset": 21598, + "charLength": 5, + "snippet": { + "text": "false" + } + }, + "contextRegion": { + "startLine": 576, + "startColumn": 10, + "charOffset": 21521, + "charLength": 5, + "snippet": { + "text": "\n\tif (!saveItems(player, inboxList, inboxQuery, propWriteStream)) {\n\t\treturn false;\n\t}\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d05c6ad615efea994da4f1e6587ce0d58cef30aa616be1bb2488ed49318b6822" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 583, + "startColumn": 67, + "charOffset": 21691, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 581, + "startColumn": 67, + "charOffset": 21622, + "charLength": 6, + "snippet": { + "text": "}\n\nbool IOLoginDataSave::savePlayerPreyClass(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbbab0852a19da9a11cfc59f1b987868036064782ff2b8085730979053f6b86b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 584, + "startColumn": 6, + "charOffset": 21706, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 582, + "startColumn": 6, + "charOffset": 21624, + "charLength": 1, + "snippet": { + "text": "\nbool IOLoginDataSave::savePlayerPreyClass(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "409bdb49d1ad43675749b40832175419c660b1231101a5ea51345cf491eeeec2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 592, + "startColumn": 3, + "charOffset": 21956, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 590, + "startColumn": 3, + "charOffset": 21861, + "charLength": 3, + "snippet": { + "text": "\tif (g_configManager().getBoolean(PREY_ENABLED, __FUNCTION__)) {\n\t\tstd::ostringstream query;\n\t\tfor (uint8_t slotId = PreySlot_First; slotId <= PreySlot_Last; slotId++) {\n\t\t\tif (const auto &slot = player->getPreySlotById(static_cast(slotId))) {\n\t\t\t\tquery.str(std::string());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa006a8e608ca5ddfc388bef909cd67c1ec147054b516a5894a4121be3380501" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'preySize' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 612, + "startColumn": 12, + "charOffset": 23029, + "charLength": 8, + "snippet": { + "text": "preySize" + } + }, + "contextRegion": { + "startLine": 610, + "startColumn": 12, + "charOffset": 23009, + "charLength": 8, + "snippet": { + "text": "\t\t\t\t});\n\n\t\t\t\tsize_t preySize;\n\t\t\t\tconst char* preyList = propPreyStream.getStream(preySize);\n\t\t\t\tquery << db.escapeBlob(preyList, static_cast(preySize)) << \")\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7de82ceb0f4dbd83f0ba9a52f725b41889e26717cacc95cba324be6a90cd70a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 637, + "startColumn": 74, + "charOffset": 23952, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 635, + "startColumn": 74, + "charOffset": 23876, + "charLength": 6, + "snippet": { + "text": "}\n\nbool IOLoginDataSave::savePlayerTaskHuntingClass(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f69a51d701f376328b49e4a705877f7d814ed09c3caf5662877e87e7697daf84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 638, + "startColumn": 6, + "charOffset": 23967, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 636, + "startColumn": 6, + "charOffset": 23878, + "charLength": 1, + "snippet": { + "text": "\nbool IOLoginDataSave::savePlayerTaskHuntingClass(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "481aa1c8f2da5c632bfed7d34fc1d6f1c6965df6391625e845080dcb627770be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 646, + "startColumn": 3, + "charOffset": 24225, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 644, + "startColumn": 3, + "charOffset": 24122, + "charLength": 3, + "snippet": { + "text": "\tif (g_configManager().getBoolean(TASK_HUNTING_ENABLED, __FUNCTION__)) {\n\t\tstd::ostringstream query;\n\t\tfor (uint8_t slotId = PreySlot_First; slotId <= PreySlot_Last; slotId++) {\n\t\t\tif (const auto &slot = player->getTaskHuntingSlotById(static_cast(slotId))) {\n\t\t\t\tquery.str(\"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6eea75bfc1c5e1886dcaa208dbfe41bb6f0168e7b5f4ac17310da3ac22fbf7ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'taskHuntingSize' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 665, + "startColumn": 12, + "charOffset": 25260, + "charLength": 15, + "snippet": { + "text": "taskHuntingSize" + } + }, + "contextRegion": { + "startLine": 663, + "startColumn": 12, + "charOffset": 25240, + "charLength": 15, + "snippet": { + "text": "\t\t\t\t});\n\n\t\t\t\tsize_t taskHuntingSize;\n\t\t\t\tconst char* taskHuntingList = propTaskHuntingStream.getStream(taskHuntingSize);\n\t\t\t\tquery << db.escapeBlob(taskHuntingList, static_cast(taskHuntingSize)) << \")\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb3b1d02859811d594ce6ba51009f4fa6f8f1f4b3fd022a64d81a083183b4d65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 689, + "startColumn": 70, + "charOffset": 26153, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 687, + "startColumn": 70, + "charOffset": 26081, + "charLength": 6, + "snippet": { + "text": "}\n\nbool IOLoginDataSave::savePlayerForgeHistory(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3924d5402cbfc1aa1dc96ff94fdc139e9d0195a0d8a65c52d8d2f3d23b7f4fc7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 690, + "startColumn": 6, + "charOffset": 26168, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 688, + "startColumn": 6, + "charOffset": 26083, + "charLength": 1, + "snippet": { + "text": "\nbool IOLoginDataSave::savePlayerForgeHistory(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28701243152f229e90a635cc596d9769203c37aab20b1da011c9db8e4eca15f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 703, + "startColumn": 2, + "charOffset": 26618, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 701, + "startColumn": 2, + "charOffset": 26471, + "charLength": 3, + "snippet": { + "text": "\tquery.str(\"\");\n\tDBInsert insertQuery(\"INSERT INTO `forge_history` (`player_id`, `action_type`, `description`, `done_at`, `is_success`) VALUES\");\n\tfor (const auto &history : player->getForgeHistory()) {\n\t\tconst auto stringDescription = Database::getInstance().escapeString(history.description);\n\t\tauto actionString = magic_enum::enum_integer(history.actionType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aed2e60d2a5de35e55d51d750637352f25e412c61a841afc86c2c670375a71ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in conditional return statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 718, + "startColumn": 10, + "charOffset": 27137, + "charLength": 5, + "snippet": { + "text": "false" + } + }, + "contextRegion": { + "startLine": 716, + "startColumn": 10, + "charOffset": 27094, + "charLength": 5, + "snippet": { + "text": "\t}\n\tif (!insertQuery.execute()) {\n\t\treturn false;\n\t}\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4799ef1690f981b4b409db670fbd39d26154a571f9fda14584989afd4f531783" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 723, + "startColumn": 67, + "charOffset": 27230, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 721, + "startColumn": 67, + "charOffset": 27161, + "charLength": 6, + "snippet": { + "text": "}\n\nbool IOLoginDataSave::savePlayerBosstiary(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b04c8b0941ce91bef58f18db4bcd93a4044332cffc48df2b5e9e85cb89f0ed3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 724, + "startColumn": 6, + "charOffset": 27245, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 722, + "startColumn": 6, + "charOffset": 27163, + "charLength": 1, + "snippet": { + "text": "\nbool IOLoginDataSave::savePlayerBosstiary(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4242c306e5fca8febcb580b537d6cd7b4b62fb392ddbdccdbb66e2e7ffd19a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 740, + "startColumn": 2, + "charOffset": 27754, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 738, + "startColumn": 2, + "charOffset": 27706, + "charLength": 3, + "snippet": { + "text": "\t// Bosstiary tracker\n\tPropWriteStream stream;\n\tfor (const auto &monsterType : player->getCyclopediaMonsterTrackerSet(true)) {\n\t\tif (!monsterType) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed3b73eb0706b6cfb06ecdfab2e9921c3a783bd08cae76241dea5cc036a6ab72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 741, + "startColumn": 7, + "charOffset": 27839, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 739, + "startColumn": 7, + "charOffset": 27728, + "charLength": 1, + "snippet": { + "text": "\tPropWriteStream stream;\n\tfor (const auto &monsterType : player->getCyclopediaMonsterTrackerSet(true)) {\n\t\tif (!monsterType) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38a0b34cc6ea4fd073e82e2bfacbd01d8c02f4989c506e014db23da7395812c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'size' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 747, + "startColumn": 9, + "charOffset": 27936, + "charLength": 4, + "snippet": { + "text": "size" + } + }, + "contextRegion": { + "startLine": 745, + "startColumn": 9, + "charOffset": 27873, + "charLength": 4, + "snippet": { + "text": "\t\tstream.write(monsterType->info.raceid);\n\t}\n\tsize_t size;\n\tconst char* chars = stream.getStream(size);\n\t// Append query informations" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c2c78b64fc5e2f6aa292fdbac0bdf6623a8473a8c154e6d61b12e6977fe5cd24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 767, + "startColumn": 65, + "charOffset": 28452, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 765, + "startColumn": 65, + "charOffset": 28385, + "charLength": 6, + "snippet": { + "text": "}\n\nbool IOLoginDataSave::savePlayerStorage(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3970817ab1de5d980aa84b4a9a616c90407f2195a9f9ab0f466b6a29e26121fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 768, + "startColumn": 6, + "charOffset": 28467, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 766, + "startColumn": 6, + "charOffset": 28387, + "charLength": 1, + "snippet": { + "text": "\nbool IOLoginDataSave::savePlayerStorage(std::shared_ptr player) {\n\tif (!player) {\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "146e3bfeea938d74300de9354fbab2d6d082932d8db2dd25d3da092bfec852bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 785, + "startColumn": 2, + "charOffset": 28940, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 783, + "startColumn": 2, + "charOffset": 28902, + "charLength": 3, + "snippet": { + "text": "\tplayer->genReservedStorageRange();\n\n\tfor (const auto &[key, value] : player->storageMap) {\n\t\tquery << player->getGUID() << ',' << key << ',' << value;\n\t\tif (!storageQuery.addRow(query)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9452080fdede456380180d931d75427c798c22587500b70d23a72610ad226fa0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in conditional return statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/functions/iologindata_save_player.cpp" + }, + "region": { + "startLine": 793, + "startColumn": 10, + "charOffset": 29157, + "charLength": 5, + "snippet": { + "text": "false" + } + }, + "contextRegion": { + "startLine": 791, + "startColumn": 10, + "charOffset": 29115, + "charLength": 5, + "snippet": { + "text": "\n\tif (!storageQuery.execute()) {\n\t\treturn false;\n\t}\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8695a2280b5841fe1b3ff67f1941ee9eb7c8714efd24ef7fc1e1761ded075b90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto begin' can be declared as 'const auto *const begin'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 2, + "charOffset": 1178, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 2, + "charOffset": 1114, + "charLength": 5, + "snippet": { + "text": "\tconst auto &fileByte = mio::mmap_source(map->path.string());\n\n\tconst auto begin = fileByte.begin() + sizeof(OTB::Identifier { { 'O', 'T', 'B', 'M' } });\n\n\tFileStream stream { begin, fileByte.end() };" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "200c982c4f11db9062bdd6d06e13cc460c5dbc3539e2d4cc634b01fd73bd352a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 9, + "charOffset": 1586, + "charLength": 6, + "snippet": { + "text": "getU32" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 9, + "charOffset": 1499, + "charLength": 6, + "snippet": { + "text": "\tmap->height = stream.getU16();\n\tuint32_t majorVersionItems = stream.getU32();\n\tstream.getU32(); // minorVersionItems\n\n\tif (version > 2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "761eadaff55e638504055fdc8d7e263034b7d1cdc6404126800ad12103c7e8e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 69, + "startColumn": 23, + "charOffset": 1881, + "charLength": 13, + "snippet": { + "text": "OTBM_MAP_DATA" + } + }, + "contextRegion": { + "startLine": 67, + "startColumn": 23, + "charOffset": 1855, + "charLength": 13, + "snippet": { + "text": "\t}\n\n\tif (stream.startNode(OTBM_MAP_DATA)) {\n\t\tparseMapDataAttributes(stream, map);\n\t\tparseTileArea(stream, *map, pos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7beca95b714a1bf7bbb00ccc66793f11d1d5f9cd8c9af61c125d6565c15fc098" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 10, + "charOffset": 1983, + "charLength": 7, + "snippet": { + "text": "endNode" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 10, + "charOffset": 1899, + "charLength": 7, + "snippet": { + "text": "\t\tparseMapDataAttributes(stream, map);\n\t\tparseTileArea(stream, *map, pos);\n\t\tstream.endNode();\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67d5b804e52d437f4da89ab77b7f719287ba85cd8b17fd354cca95b7616400b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 85, + "startColumn": 2, + "charOffset": 2304, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 2, + "charOffset": 2217, + "charLength": 5, + "snippet": { + "text": "void IOMap::parseMapDataAttributes(FileStream &stream, Map* map) {\n\tbool end = false;\n\twhile (!end) {\n\t\tconst uint8_t attr = stream.getU8();\n\t\tswitch (attr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f706f409d8024e65e0743fc531c17ad218fd6c4402a4886a8980c707a54f334" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 89, + "startColumn": 12, + "charOffset": 2420, + "charLength": 9, + "snippet": { + "text": "getString" + } + }, + "contextRegion": { + "startLine": 87, + "startColumn": 12, + "charOffset": 2358, + "charLength": 9, + "snippet": { + "text": "\t\tswitch (attr) {\n\t\t\tcase OTBM_ATTR_DESCRIPTION: {\n\t\t\t\tstream.getString();\n\t\t\t} break;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61462744b96f49f03f437aa6326de69d8541b9e5c0f157c11c3c9ff3ecca8647" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 4, + "charOffset": 3167, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 4, + "charOffset": 3151, + "charLength": 7, + "snippet": { + "text": "\t\t\t} break;\n\n\t\t\tdefault:\n\t\t\t\tstream.back();\n\t\t\t\tend = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da79bf392bf7c5a3945e40dd60a117f58a180d125d66181e36345111d8cafe84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'parseTileArea' has cognitive complexity of 90 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 119, + "startColumn": 13, + "charOffset": 3244, + "charLength": 13, + "snippet": { + "text": "parseTileArea" + } + }, + "contextRegion": { + "startLine": 117, + "startColumn": 13, + "charOffset": 3229, + "charLength": 13, + "snippet": { + "text": "}\n\nvoid IOMap::parseTileArea(FileStream &stream, Map &map, const Position &pos) {\n\twhile (stream.startNode(OTBM_TILE_AREA)) {\n\t\tconst uint16_t base_x = stream.getU16();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46152561adaa008e4a0a74726e3c440bb79e6a83f5d0d3fd5822ffe5603fce74" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 120, + "startColumn": 26, + "charOffset": 3336, + "charLength": 14, + "snippet": { + "text": "OTBM_TILE_AREA" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 26, + "charOffset": 3231, + "charLength": 14, + "snippet": { + "text": "\nvoid IOMap::parseTileArea(FileStream &stream, Map &map, const Position &pos) {\n\twhile (stream.startNode(OTBM_TILE_AREA)) {\n\t\tconst uint16_t base_x = stream.getU16();\n\t\tconst uint16_t base_y = stream.getU16();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f4a577874ca53e4c8cf1d2773afb68d359c62d6ddcbd4eefece1dac1582c3c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 138, + "startColumn": 10, + "charOffset": 3947, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 136, + "startColumn": 10, + "charOffset": 3834, + "charLength": 7, + "snippet": { + "text": "\t\t\tconst uint16_t x = base_x + tileCoordsX + pos.x;\n\t\t\tconst uint16_t y = base_y + tileCoordsY + pos.y;\n\t\t\tconst uint8_t z = static_cast(base_z + pos.z);\n\n\t\t\tif (tileType == OTBM_HOUSETILE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e26304fc139523d611d8379a2deb6e437df4061295edae6f6f5a0b92426054a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 142, + "startColumn": 9, + "charOffset": 4080, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 140, + "startColumn": 9, + "charOffset": 3998, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (tileType == OTBM_HOUSETILE) {\n\t\t\t\ttile->houseId = stream.getU32();\n\t\t\t\tif (!map.houses.addHouse(tile->houseId)) {\n\t\t\t\t\tthrow IOMapException(fmt::format(\"[x:{}, y:{}, z:{}] Could not create house id: {}\", x, y, z, tile->houseId));\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bbcfa89cfaed99944c9b0138efbd461ae957bc49b82f1c21c91d398ad5343bda" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 143, + "startColumn": 27, + "charOffset": 4145, + "charLength": 3, + "snippet": { + "text": "fmt" + } + }, + "contextRegion": { + "startLine": 141, + "startColumn": 27, + "charOffset": 4035, + "charLength": 3, + "snippet": { + "text": "\t\t\t\ttile->houseId = stream.getU32();\n\t\t\t\tif (!map.houses.addHouse(tile->houseId)) {\n\t\t\t\t\tthrow IOMapException(fmt::format(\"[x:{}, y:{}, z:{}] Could not create house id: {}\", x, y, z, tile->houseId));\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fccd8c544e9f826ccfe37b11e23ab70e39cf935d8a3afc87a953c18141bf93ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 147, + "startColumn": 22, + "charOffset": 4268, + "charLength": 20, + "snippet": { + "text": "OTBM_ATTR_TILE_FLAGS" + } + }, + "contextRegion": { + "startLine": 145, + "startColumn": 22, + "charOffset": 4241, + "charLength": 20, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (stream.isProp(OTBM_ATTR_TILE_FLAGS)) {\n\t\t\t\tconst uint32_t flags = stream.getU32();\n\t\t\t\tif ((flags & OTBM_TILEFLAG_PROTECTIONZONE) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "91a0771edecb190dab2880ef6d470288298a13e2637e07e4d9f7feeb46ad60f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 149, + "startColumn": 5, + "charOffset": 4341, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 147, + "startColumn": 5, + "charOffset": 4247, + "charLength": 2, + "snippet": { + "text": "\t\t\tif (stream.isProp(OTBM_ATTR_TILE_FLAGS)) {\n\t\t\t\tconst uint32_t flags = stream.getU32();\n\t\t\t\tif ((flags & OTBM_TILEFLAG_PROTECTIONZONE) != 0) {\n\t\t\t\t\ttile->flags |= TILESTATE_PROTECTIONZONE;\n\t\t\t\t} else if ((flags & OTBM_TILEFLAG_NOPVPZONE) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e27cfc247f88d4bc9601a54546b15260e05f03d5e8bb4936029220e902a08a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 149, + "startColumn": 16, + "charOffset": 4352, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 147, + "startColumn": 16, + "charOffset": 4247, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (stream.isProp(OTBM_ATTR_TILE_FLAGS)) {\n\t\t\t\tconst uint32_t flags = stream.getU32();\n\t\t\t\tif ((flags & OTBM_TILEFLAG_PROTECTIONZONE) != 0) {\n\t\t\t\t\ttile->flags |= TILESTATE_PROTECTIONZONE;\n\t\t\t\t} else if ((flags & OTBM_TILEFLAG_NOPVPZONE) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d17cd7d6417f92306198b6d97e7496515dcfb70efb57aae859ea407a3358a0e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 150, + "startColumn": 18, + "charOffset": 4409, + "charLength": 2, + "snippet": { + "text": "|=" + } + }, + "contextRegion": { + "startLine": 148, + "startColumn": 18, + "charOffset": 4293, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tconst uint32_t flags = stream.getU32();\n\t\t\t\tif ((flags & OTBM_TILEFLAG_PROTECTIONZONE) != 0) {\n\t\t\t\t\ttile->flags |= TILESTATE_PROTECTIONZONE;\n\t\t\t\t} else if ((flags & OTBM_TILEFLAG_NOPVPZONE) != 0) {\n\t\t\t\t\ttile->flags |= TILESTATE_NOPVPZONE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9beb33775152417b974b20e554550eb1c394263aba05b195492a74e5aaa88680" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 151, + "startColumn": 23, + "charOffset": 4460, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 149, + "startColumn": 23, + "charOffset": 4337, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tif ((flags & OTBM_TILEFLAG_PROTECTIONZONE) != 0) {\n\t\t\t\t\ttile->flags |= TILESTATE_PROTECTIONZONE;\n\t\t\t\t} else if ((flags & OTBM_TILEFLAG_NOPVPZONE) != 0) {\n\t\t\t\t\ttile->flags |= TILESTATE_NOPVPZONE;\n\t\t\t\t} else if ((flags & OTBM_TILEFLAG_PVPZONE) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11205105b2d9ead80cb2d6ee8381477b8c4314054ad86dd656a89bacd9adba9a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 152, + "startColumn": 18, + "charOffset": 4512, + "charLength": 2, + "snippet": { + "text": "|=" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 18, + "charOffset": 4392, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\ttile->flags |= TILESTATE_PROTECTIONZONE;\n\t\t\t\t} else if ((flags & OTBM_TILEFLAG_NOPVPZONE) != 0) {\n\t\t\t\t\ttile->flags |= TILESTATE_NOPVPZONE;\n\t\t\t\t} else if ((flags & OTBM_TILEFLAG_PVPZONE) != 0) {\n\t\t\t\t\ttile->flags |= TILESTATE_PVPZONE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3439ea65708b0cb42e56849bd0b90c94857316947fd37bf87bd7b29fc48113a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 153, + "startColumn": 23, + "charOffset": 4558, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 151, + "startColumn": 23, + "charOffset": 4438, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t} else if ((flags & OTBM_TILEFLAG_NOPVPZONE) != 0) {\n\t\t\t\t\ttile->flags |= TILESTATE_NOPVPZONE;\n\t\t\t\t} else if ((flags & OTBM_TILEFLAG_PVPZONE) != 0) {\n\t\t\t\t\ttile->flags |= TILESTATE_PVPZONE;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a04bdd55daa6e021cb0cf18cc4e35f4ada17ed76d519dfe464225d8f24dc918c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 154, + "startColumn": 18, + "charOffset": 4608, + "charLength": 2, + "snippet": { + "text": "|=" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 18, + "charOffset": 4495, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\ttile->flags |= TILESTATE_NOPVPZONE;\n\t\t\t\t} else if ((flags & OTBM_TILEFLAG_PVPZONE) != 0) {\n\t\t\t\t\ttile->flags |= TILESTATE_PVPZONE;\n\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d17cd7d6417f92306198b6d97e7496515dcfb70efb57aae859ea407a3358a0e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 16, + "charOffset": 4652, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 16, + "charOffset": 4630, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif ((flags & OTBM_TILEFLAG_NOLOGOUT) != 0) {\n\t\t\t\t\ttile->flags |= TILESTATE_NOLOGOUT;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1445d6917792c3c1cf6656e2bbcf61f9d0237069797e50ad1342fc4814089d1c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 158, + "startColumn": 18, + "charOffset": 4703, + "charLength": 2, + "snippet": { + "text": "|=" + } + }, + "contextRegion": { + "startLine": 156, + "startColumn": 18, + "charOffset": 4636, + "charLength": 2, + "snippet": { + "text": "\n\t\t\t\tif ((flags & OTBM_TILEFLAG_NOLOGOUT) != 0) {\n\t\t\t\t\ttile->flags |= TILESTATE_NOLOGOUT;\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe1670294752ed3ec54b311c94426f0e9ae5e45a05730767c6b33c16cec58776" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 162, + "startColumn": 22, + "charOffset": 4759, + "charLength": 14, + "snippet": { + "text": "OTBM_ATTR_ITEM" + } + }, + "contextRegion": { + "startLine": 160, + "startColumn": 22, + "charOffset": 4732, + "charLength": 14, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (stream.isProp(OTBM_ATTR_ITEM)) {\n\t\t\t\tconst uint16_t id = stream.getU16();\n\t\t\t\tconst auto &iType = Item::items[id];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01369b8e252572decbbe4f2d6ef503716d79a745c9ab04622e2677bed7006b84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 179, + "startColumn": 19, + "charOffset": 5399, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 177, + "startColumn": 19, + "charOffset": 5311, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t\t\ttile->ground = map.tryReplaceItemFromCache(item);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttile->items.emplace_back(map.tryReplaceItemFromCache(item));\n\t\t\t\t\t}\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10e7f6121bbc197177f3c7f744023516f1a75c6e6a2e6e0057a0ad62a788f759" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 196, + "startColumn": 29, + "charOffset": 5824, + "charLength": 3, + "snippet": { + "text": "fmt" + } + }, + "contextRegion": { + "startLine": 194, + "startColumn": 29, + "charOffset": 5738, + "charLength": 3, + "snippet": { + "text": "\n\t\t\t\t\t\tif (!item->unserializeItemNode(stream, x, y, z)) {\n\t\t\t\t\t\t\tthrow IOMapException(fmt::format(\"[x:{}, y:{}, z:{}] Failed to load item {}, Node Type.\", x, y, z, id));\n\t\t\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b8161fe75c3e4255c2adf1a2faf1cd36502d7767b85a487c6b9dee318ff40a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 209, + "startColumn": 20, + "charOffset": 6412, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 207, + "startColumn": 20, + "charOffset": 6321, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t\t\t\ttile->ground = map.tryReplaceItemFromCache(item);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttile->items.emplace_back(map.tryReplaceItemFromCache(item));\n\t\t\t\t\t\t}\n\t\t\t\t\t} break;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d5c00b97d2667174203d8a44f0233ec3a7e45f329f1e4edcc2cdb46260a516d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 214, + "startColumn": 7, + "charOffset": 6563, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 7, + "charOffset": 6483, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tcase OTBM_TILE_ZONE: {\n\t\t\t\t\t\tconst auto zoneCount = stream.getU16();\n\t\t\t\t\t\tfor (uint16_t i = 0; i < zoneCount; ++i) {\n\t\t\t\t\t\t\tconst auto zoneId = stream.getU16();\n\t\t\t\t\t\t\tif (!zoneId) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a43e0fecc834235fa8c7e20a843e10914dc37cb1da1c1965492ca07357d2fbf4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'zoneCount' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 214, + "startColumn": 28, + "charOffset": 6584, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 28, + "charOffset": 6483, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\tcase OTBM_TILE_ZONE: {\n\t\t\t\t\t\tconst auto zoneCount = stream.getU16();\n\t\t\t\t\t\tfor (uint16_t i = 0; i < zoneCount; ++i) {\n\t\t\t\t\t\t\tconst auto zoneId = stream.getU16();\n\t\t\t\t\t\t\tif (!zoneId) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bfff0ce08c601556f2fee00a51e06c2d5442d8c6e17fb0dcaba8e217f5d29fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 216, + "startColumn": 12, + "charOffset": 6661, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 214, + "startColumn": 12, + "charOffset": 6557, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\t\tfor (uint16_t i = 0; i < zoneCount; ++i) {\n\t\t\t\t\t\t\tconst auto zoneId = stream.getU16();\n\t\t\t\t\t\t\tif (!zoneId) {\n\t\t\t\t\t\t\t\tthrow IOMapException(fmt::format(\"[x:{}, y:{}, z:{}] Invalid zone id.\", x, y, z));\n\t\t\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a480f6e355f90ef693115576a36eea19c481500d12524b2e6ca76ff73e75ff2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint16_t' (aka 'unsigned short') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 216, + "startColumn": 13, + "charOffset": 6662, + "charLength": 6, + "snippet": { + "text": "zoneId" + } + }, + "contextRegion": { + "startLine": 214, + "startColumn": 13, + "charOffset": 6557, + "charLength": 6, + "snippet": { + "text": "\t\t\t\t\t\tfor (uint16_t i = 0; i < zoneCount; ++i) {\n\t\t\t\t\t\t\tconst auto zoneId = stream.getU16();\n\t\t\t\t\t\t\tif (!zoneId) {\n\t\t\t\t\t\t\t\tthrow IOMapException(fmt::format(\"[x:{}, y:{}, z:{}] Invalid zone id.\", x, y, z));\n\t\t\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d238c91959e9ed35dfe454d0d970fcfe138c4fb7d2ac995220661127c45af673" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 217, + "startColumn": 30, + "charOffset": 6701, + "charLength": 3, + "snippet": { + "text": "fmt" + } + }, + "contextRegion": { + "startLine": 215, + "startColumn": 30, + "charOffset": 6606, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\t\t\tconst auto zoneId = stream.getU16();\n\t\t\t\t\t\t\tif (!zoneId) {\n\t\t\t\t\t\t\t\tthrow IOMapException(fmt::format(\"[x:{}, y:{}, z:{}] Invalid zone id.\", x, y, z));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tauto zone = Zone::getZone(zoneId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5d4d0d8b43ce69e033452857a0a682c3a86e6e8f6b22efad9099dc540ad5105" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 223, + "startColumn": 6, + "charOffset": 6886, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 221, + "startColumn": 6, + "charOffset": 6859, + "charLength": 7, + "snippet": { + "text": "\t\t\t\t\t\t}\n\t\t\t\t\t} break;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthrow IOMapException(fmt::format(\"[x:{}, y:{}, z:{}] Could not read item/zone node.\", x, y, z));\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35e1284f72e346254f9307f93d0fe2fa5af1abdc4d20e056d6749b00037a9667" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 224, + "startColumn": 28, + "charOffset": 6922, + "charLength": 3, + "snippet": { + "text": "fmt" + } + }, + "contextRegion": { + "startLine": 222, + "startColumn": 28, + "charOffset": 6867, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\t} break;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthrow IOMapException(fmt::format(\"[x:{}, y:{}, z:{}] Could not read item/zone node.\", x, y, z));\n\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53ea4de0fb03ba448b409993f5a8f0763971c2bbddf04b26687d82de456a437c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 228, + "startColumn": 27, + "charOffset": 7060, + "charLength": 3, + "snippet": { + "text": "fmt" + } + }, + "contextRegion": { + "startLine": 226, + "startColumn": 27, + "charOffset": 7004, + "charLength": 3, + "snippet": { + "text": "\n\t\t\t\tif (!stream.endNode()) {\n\t\t\t\t\tthrow IOMapException(fmt::format(\"[x:{}, y:{}, z:{}] Could not end node.\", x, y, z));\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0959cd3b7b00ac90e71f4d2369da00bdc2b1267a1b58887d9594880bb24269f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 233, + "startColumn": 26, + "charOffset": 7190, + "charLength": 3, + "snippet": { + "text": "fmt" + } + }, + "contextRegion": { + "startLine": 231, + "startColumn": 26, + "charOffset": 7136, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tif (!stream.endNode()) {\n\t\t\t\tthrow IOMapException(fmt::format(\"[x:{}, y:{}, z:{}] Could not end node.\", x, y, z));\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5a5bc5f4483f4e51648d92330dd1f151ea8f319f89404226e6989caa5499bae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 250, + "startColumn": 24, + "charOffset": 7515, + "charLength": 10, + "snippet": { + "text": "OTBM_TOWNS" + } + }, + "contextRegion": { + "startLine": 248, + "startColumn": 24, + "charOffset": 7436, + "charLength": 10, + "snippet": { + "text": "\nvoid IOMap::parseTowns(FileStream &stream, Map &map) {\n\tif (!stream.startNode(OTBM_TOWNS)) {\n\t\tthrow IOMapException(\"Could not read towns node.\");\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be00d64991ca8adb12183f1f8151e3df871217bb0490f81acb55e2da00ec2154" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 254, + "startColumn": 2, + "charOffset": 7589, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 2, + "charOffset": 7584, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\twhile (stream.startNode(OTBM_TOWN)) {\n\t\tconst uint32_t townId = stream.getU32();\n\t\tconst auto &townName = stream.getString();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07a35bfd46de0dd28f2089bc5963fd9360b4afb4e1768fd250c38fce9c64e815" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 254, + "startColumn": 26, + "charOffset": 7613, + "charLength": 9, + "snippet": { + "text": "OTBM_TOWN" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 26, + "charOffset": 7584, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\twhile (stream.startNode(OTBM_TOWN)) {\n\t\tconst uint32_t townId = stream.getU32();\n\t\tconst auto &townName = stream.getString();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bcd602de6a5632e13d58cd2c93c9ffa9ce7f8c34a39eb4974c4071249baf9da7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 276, + "startColumn": 24, + "charOffset": 8190, + "charLength": 14, + "snippet": { + "text": "OTBM_WAYPOINTS" + } + }, + "contextRegion": { + "startLine": 274, + "startColumn": 24, + "charOffset": 8107, + "charLength": 14, + "snippet": { + "text": "\nvoid IOMap::parseWaypoints(FileStream &stream, Map &map) {\n\tif (!stream.startNode(OTBM_WAYPOINTS)) {\n\t\tthrow IOMapException(\"Could not read waypoints node.\");\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de1b8759d72be42f95f12df8a776dd0e6342d4a1bd9d377afa326bb9bc68f802" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 280, + "startColumn": 2, + "charOffset": 8272, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 278, + "startColumn": 2, + "charOffset": 8267, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\twhile (stream.startNode(OTBM_WAYPOINT)) {\n\t\tconst auto &name = stream.getString();\n\t\tconst uint16_t x = stream.getU16();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "042c99432bb7cceb2ec59a2105de02c1814dd383a0741fa69f2432d4484d283e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomap.cpp" + }, + "region": { + "startLine": 280, + "startColumn": 26, + "charOffset": 8296, + "charLength": 13, + "snippet": { + "text": "OTBM_WAYPOINT" + } + }, + "contextRegion": { + "startLine": 278, + "startColumn": 26, + "charOffset": 8267, + "charLength": 13, + "snippet": { + "text": "\t}\n\n\twhile (stream.startNode(OTBM_WAYPOINT)) {\n\t\tconst auto &name = stream.getString();\n\t\tconst uint16_t x = stream.getU16();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a11cc9d0cf2fdb2a0dfcb9dab925f6a3798dafcef2612b7a6ce057c3cba6ddec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 21, + "startColumn": 6, + "charOffset": 676, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 19, + "startColumn": 6, + "charOffset": 576, + "charLength": 1, + "snippet": { + "text": "\n\tDBResult_ptr result = Database::getInstance().storeQuery(\"SELECT `data` FROM `tile_store`\");\n\tif (!result) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a65b9129c4b42f5b042d9558a32b83061089b77ca833a16b5005fc0bb7db133c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 25, + "startColumn": 2, + "charOffset": 702, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 2, + "charOffset": 697, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tdo {\n\t\tunsigned long attrSize;\n\t\tconst char* attr = result->getStream(\"data\", attrSize);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ee1148aecda323b8c1ad29875b4270816120bd8518c8468454703cd7622bc51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-runtime-int", + "ruleIndex": 546, + "kind": "fail", + "level": "warning", + "message": { + "text": "consider replacing 'unsigned long' with 'uint64'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 3, + "charOffset": 709, + "charLength": 8, + "snippet": { + "text": "unsigned" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 3, + "charOffset": 700, + "charLength": 8, + "snippet": { + "text": "\n\tdo {\n\t\tunsigned long attrSize;\n\t\tconst char* attr = result->getStream(\"data\", attrSize);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c687d15dc235da09e1aad73d9279f1f311928ab04d740c051911907003bd922d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'attrSize' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 17, + "charOffset": 723, + "charLength": 8, + "snippet": { + "text": "attrSize" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 17, + "charOffset": 700, + "charLength": 8, + "snippet": { + "text": "\n\tdo {\n\t\tunsigned long attrSize;\n\t\tconst char* attr = result->getStream(\"data\", attrSize);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3bdf30c641a623c25e0abde335fc9a86b38e80f188554ec4eff501fb0f43323a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 32, + "startColumn": 3, + "charOffset": 855, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 3, + "charOffset": 817, + "charLength": 8, + "snippet": { + "text": "\t\tpropStream.init(attr, attrSize);\n\n\t\tuint16_t x, y;\n\t\tuint8_t z;\n\t\tif (!propStream.read(x) || !propStream.read(y) || !propStream.read(z)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ceb0d42b2d046044ac5874a7a7ff566781514b8286635d5e74a8777090aebbd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 32, + "startColumn": 3, + "charOffset": 855, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 3, + "charOffset": 817, + "charLength": 8, + "snippet": { + "text": "\t\tpropStream.init(attr, attrSize);\n\n\t\tuint16_t x, y;\n\t\tuint8_t z;\n\t\tif (!propStream.read(x) || !propStream.read(y) || !propStream.read(z)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c10a9746186f5a936eee0cbbfffdb3059fa50b42b4688556038792a82cb3e5ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'x' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 32, + "startColumn": 12, + "charOffset": 864, + "charLength": 1, + "snippet": { + "text": "x" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 12, + "charOffset": 817, + "charLength": 1, + "snippet": { + "text": "\t\tpropStream.init(attr, attrSize);\n\n\t\tuint16_t x, y;\n\t\tuint8_t z;\n\t\tif (!propStream.read(x) || !propStream.read(y) || !propStream.read(z)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7931df913ea38977c39be6f0d15012accfcb6b104421dfe3e602958577bae0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'y' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 32, + "startColumn": 15, + "charOffset": 867, + "charLength": 1, + "snippet": { + "text": "y" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 15, + "charOffset": 817, + "charLength": 1, + "snippet": { + "text": "\t\tpropStream.init(attr, attrSize);\n\n\t\tuint16_t x, y;\n\t\tuint8_t z;\n\t\tif (!propStream.read(x) || !propStream.read(y) || !propStream.read(z)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b34748029e4b3ad550dc8a240d730213df996e5f4fdbe94840c1636b1bb1a81" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'z' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 11, + "charOffset": 880, + "charLength": 1, + "snippet": { + "text": "z" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 11, + "charOffset": 852, + "charLength": 1, + "snippet": { + "text": "\n\t\tuint16_t x, y;\n\t\tuint8_t z;\n\t\tif (!propStream.read(x) || !propStream.read(y) || !propStream.read(z)) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e9ccf2a045575faa54e8a203dc61b8f53c96f2622b358f356310d9c8f1566db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 39, + "startColumn": 7, + "charOffset": 1065, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 37, + "startColumn": 7, + "charOffset": 1004, + "charLength": 1, + "snippet": { + "text": "\n\t\tstd::shared_ptr tile = map->getTile(x, y, z);\n\t\tif (!tile) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "770cd00f5ff91008a5f39a870fbc49d2da32fde28dbcd8271f31c602e13154cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'item_count' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 12, + "charOffset": 1103, + "charLength": 10, + "snippet": { + "text": "item_count" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 12, + "charOffset": 1087, + "charLength": 10, + "snippet": { + "text": "\t\t}\n\n\t\tuint32_t item_count;\n\t\tif (!propStream.read(item_count)) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0ed777225fc39cd2ef5e9ab55d8a6cdfdf538f656cbad24705bd50b180b9ff3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 48, + "startColumn": 3, + "charOffset": 1183, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 3, + "charOffset": 1176, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\n\t\twhile (item_count--) {\n\t\t\tif (auto houseTile = std::dynamic_pointer_cast(tile)) {\n\t\t\t\tconst auto &house = houseTile->getHouse();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c59e1a57351e407603697f68473ad17687ccff65b1860e493a8f69fa031f7d4d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 48, + "startColumn": 10, + "charOffset": 1190, + "charLength": 10, + "snippet": { + "text": "item_count" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 10, + "charOffset": 1176, + "charLength": 10, + "snippet": { + "text": "\t\t}\n\n\t\twhile (item_count--) {\n\t\t\tif (auto houseTile = std::dynamic_pointer_cast(tile)) {\n\t\t\t\tconst auto &house = houseTile->getHouse();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef5a60428d3f46a0c5938b72cd05684e377810930d66cde7068329a18501f636" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 48, + "startColumn": 10, + "charOffset": 1190, + "charLength": 10, + "snippet": { + "text": "item_count" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 10, + "charOffset": 1176, + "charLength": 10, + "snippet": { + "text": "\t\t}\n\n\t\twhile (item_count--) {\n\t\t\tif (auto houseTile = std::dynamic_pointer_cast(tile)) {\n\t\t\t\tconst auto &house = houseTile->getHouse();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c182146da4f81dd69fdaa4bdf05ba5be6405d9f49e640425bb983e4c54b19cc9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 4, + "charOffset": 1720, + "charLength": 8, + "snippet": { + "text": "loadItem" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 4, + "charOffset": 1711, + "charLength": 8, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tloadItem(propStream, tile, true);\n\t\t}\n\t} while (result->next());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfeca0e1d7b6554c7c952eedd6795e99946db414623f48b6f0902e887d0db3ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 61, + "startColumn": 19, + "charOffset": 1776, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 59, + "startColumn": 19, + "charOffset": 1717, + "charLength": 4, + "snippet": { + "text": "\t\t\tloadItem(propStream, tile, true);\n\t\t}\n\t} while (result->next());\n\tg_logger().info(\"Loaded house items in {} milliseconds\", bm_context.duration());\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6980ad40531ac50c3da95020269f2e5044277ffdbedb70f0c1c70923663da1f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 3, + "charOffset": 2525, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 3, + "charOffset": 2433, + "charLength": 3, + "snippet": { + "text": "\tfor (const auto &[key, house] : g_game().map.houses.getHouses()) {\n\t\t// save house items\n\t\tfor (const auto &tile : house->getTiles()) {\n\t\t\tsaveTile(stream, tile);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86ee46cefe5fffa01e4817d8c0d94baaad01050884d5f723e010ebcd1b186634" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'attributesSize' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 94, + "startColumn": 11, + "charOffset": 2608, + "charLength": 14, + "snippet": { + "text": "attributesSize" + } + }, + "contextRegion": { + "startLine": 92, + "startColumn": 11, + "charOffset": 2570, + "charLength": 14, + "snippet": { + "text": "\t\t\tsaveTile(stream, tile);\n\n\t\t\tsize_t attributesSize;\n\t\t\tconst char* attributes = stream.getStream(attributesSize);\n\t\t\tif (attributesSize > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e0ebd0514938481662ab69ef7dd946477fa7514e2c0b5c44d51b806e86a4b90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 97, + "startColumn": 65, + "charOffset": 2779, + "charLength": 14, + "snippet": { + "text": "attributesSize" + } + }, + "contextRegion": { + "startLine": 95, + "startColumn": 65, + "charOffset": 2624, + "charLength": 14, + "snippet": { + "text": "\t\t\tconst char* attributes = stream.getStream(attributesSize);\n\t\t\tif (attributesSize > 0) {\n\t\t\t\tquery << house->getId() << ',' << db.escapeBlob(attributes, attributesSize);\n\t\t\t\tif (!stmt.addRow(query)) {\n\t\t\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "696727d8770bbebab49c236d0f0911fa4773e7d381d1c7069e93612aa53dee50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in conditional return statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 107, + "startColumn": 10, + "charOffset": 2918, + "charLength": 5, + "snippet": { + "text": "false" + } + }, + "contextRegion": { + "startLine": 105, + "startColumn": 10, + "charOffset": 2884, + "charLength": 5, + "snippet": { + "text": "\n\tif (!stmt.execute()) {\n\t\treturn false;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04bee40c68346eaa31afa9065e20d339e967fef01c0bb04afd353230aecd2bcf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'loadContainer' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 113, + "startColumn": 22, + "charOffset": 2967, + "charLength": 13, + "snippet": { + "text": "loadContainer" + } + }, + "contextRegion": { + "startLine": 111, + "startColumn": 22, + "charOffset": 2943, + "charLength": 13, + "snippet": { + "text": "}\n\nbool IOMapSerialize::loadContainer(PropStream &propStream, std::shared_ptr container) {\n\twhile (container->serializationCount > 0) {\n\t\tif (!loadItem(propStream, container)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "599d14c597444758562e0a4939421cffb91a4dbf59ebe44b5a203da050414596" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 113, + "startColumn": 87, + "charOffset": 3032, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 111, + "startColumn": 87, + "charOffset": 2943, + "charLength": 9, + "snippet": { + "text": "}\n\nbool IOMapSerialize::loadContainer(PropStream &propStream, std::shared_ptr container) {\n\twhile (container->serializationCount > 0) {\n\t\tif (!loadItem(propStream, container)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83a5e8c7b986aee9f13906a4b7fdeda0e9330118a8914a2c0d5e69f37f807ef4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 114, + "startColumn": 2, + "charOffset": 3046, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 112, + "startColumn": 2, + "charOffset": 2945, + "charLength": 5, + "snippet": { + "text": "\nbool IOMapSerialize::loadContainer(PropStream &propStream, std::shared_ptr container) {\n\twhile (container->serializationCount > 0) {\n\t\tif (!loadItem(propStream, container)) {\n\t\t\tg_logger().warn(\"Deserialization error for container item: {}\", container->getID());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "540f682ad4a3c759611de588793b6bbee8c07c3c2a5305f977371d587ecf2f6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'endAttr' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 122, + "startColumn": 10, + "charOffset": 3289, + "charLength": 7, + "snippet": { + "text": "endAttr" + } + }, + "contextRegion": { + "startLine": 120, + "startColumn": 10, + "charOffset": 3276, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tuint8_t endAttr;\n\tif (!propStream.read(endAttr) || endAttr != 0) {\n\t\tg_logger().warn(\"Deserialization error for container item: {}\", container->getID());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a201818b95fcd89e4c1ac28870b0bb9ff5150b70682c7e1f3bce4ed4f8784aaa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'loadItem' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 130, + "startColumn": 22, + "charOffset": 3501, + "charLength": 8, + "snippet": { + "text": "loadItem" + } + }, + "contextRegion": { + "startLine": 128, + "startColumn": 22, + "charOffset": 3477, + "charLength": 8, + "snippet": { + "text": "}\n\nbool IOMapSerialize::loadItem(PropStream &propStream, std::shared_ptr parent, bool isHouseItem /*= false*/) {\n\tuint16_t id;\n\tif (!propStream.read(id)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9df3b1111a9d3ab888c693881918782c49c8ba0e62108bf6aeb7b75a07cb2e1d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'loadItem' has cognitive complexity of 66 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 130, + "startColumn": 22, + "charOffset": 3501, + "charLength": 8, + "snippet": { + "text": "loadItem" + } + }, + "contextRegion": { + "startLine": 128, + "startColumn": 22, + "charOffset": 3477, + "charLength": 8, + "snippet": { + "text": "}\n\nbool IOMapSerialize::loadItem(PropStream &propStream, std::shared_ptr parent, bool isHouseItem /*= false*/) {\n\tuint16_t id;\n\tif (!propStream.read(id)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "799ca7f3e0e4837a64e6cd604d816f51512bb173ec40df5d7446e13c6961281e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'parent' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 130, + "startColumn": 81, + "charOffset": 3560, + "charLength": 6, + "snippet": { + "text": "parent" + } + }, + "contextRegion": { + "startLine": 128, + "startColumn": 81, + "charOffset": 3477, + "charLength": 6, + "snippet": { + "text": "}\n\nbool IOMapSerialize::loadItem(PropStream &propStream, std::shared_ptr parent, bool isHouseItem /*= false*/) {\n\tuint16_t id;\n\tif (!propStream.read(id)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22ff26599da7e211a3c8627808ef05e89dbeaf29637b796c4dd039321994d3cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'id' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 131, + "startColumn": 11, + "charOffset": 3610, + "charLength": 2, + "snippet": { + "text": "id" + } + }, + "contextRegion": { + "startLine": 129, + "startColumn": 11, + "charOffset": 3479, + "charLength": 2, + "snippet": { + "text": "\nbool IOMapSerialize::loadItem(PropStream &propStream, std::shared_ptr parent, bool isHouseItem /*= false*/) {\n\tuint16_t id;\n\tif (!propStream.read(id)) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60bd16ad7f91722c733739073fdda930056d64ba6fc2e1efe5b394c81a660697" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 142, + "startColumn": 40, + "charOffset": 3864, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 140, + "startColumn": 40, + "charOffset": 3782, + "charLength": 1, + "snippet": { + "text": "\n\tconst ItemType &iType = Item::items[id];\n\tif (iType.isBed() || iType.movable || !tile || iType.isCarpet() || iType.isTrashHolder()) {\n\t\t// create a new item\n\t\tauto item = Item::CreateItem(id);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c15140af494ce9bf7e4e922c183944056e23ec379b59d42f08b79b7383e9e8c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 169, + "startColumn": 4, + "charOffset": 4717, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 167, + "startColumn": 4, + "charOffset": 4615, + "charLength": 3, + "snippet": { + "text": "\t\tstd::shared_ptr item = nullptr;\n\t\tif (const TileItemVector* items = tile->getItemList()) {\n\t\t\tfor (auto &findItem : *items) {\n\t\t\t\tif (findItem->getID() == id) {\n\t\t\t\t\titem = findItem;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "647c1cf9af70e9e7aa2b45bbd091a1e6d63231e9122d1805ca41c7eeb0ee997e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &findItem' can be declared as 'const auto &findItem'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 169, + "startColumn": 9, + "charOffset": 4722, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 167, + "startColumn": 9, + "charOffset": 4615, + "charLength": 4, + "snippet": { + "text": "\t\tstd::shared_ptr item = nullptr;\n\t\tif (const TileItemVector* items = tile->getItemList()) {\n\t\t\tfor (auto &findItem : *items) {\n\t\t\t\tif (findItem->getID() == id) {\n\t\t\t\t\titem = findItem;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d46045371b9c1a8ba5c329441fef0e2559d635c027bcd0d34f1c666f6b6141a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 170, + "startColumn": 5, + "charOffset": 4753, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 168, + "startColumn": 5, + "charOffset": 4655, + "charLength": 2, + "snippet": { + "text": "\t\tif (const TileItemVector* items = tile->getItemList()) {\n\t\t\tfor (auto &findItem : *items) {\n\t\t\t\tif (findItem->getID() == id) {\n\t\t\t\t\titem = findItem;\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76ecad577d9fccf30e3cc3e47d07dfcbb699cc12934d4eec74d71b8099724053" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 170, + "startColumn": 34, + "charOffset": 4782, + "charLength": 1, + "snippet": { + "text": "{" + } + }, + "contextRegion": { + "startLine": 168, + "startColumn": 34, + "charOffset": 4655, + "charLength": 1, + "snippet": { + "text": "\t\tif (const TileItemVector* items = tile->getItemList()) {\n\t\t\tfor (auto &findItem : *items) {\n\t\t\t\tif (findItem->getID() == id) {\n\t\t\t\t\titem = findItem;\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0082e5dc9be0aae3eb579e033d24e1c5a865d65e610780853d3f673f3b8011a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'break'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 173, + "startColumn": 7, + "charOffset": 4824, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 171, + "startColumn": 7, + "charOffset": 4784, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\titem = findItem;\n\t\t\t\t\tbreak;\n\t\t\t\t} else if (iType.m_transformOnUse && findItem->getID() == iType.m_transformOnUse) {\n\t\t\t\t\titem = findItem;\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af847bc53b6e782981fb35be0db8cff36d3a445a27a1fa3c77f9163669ed2452" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 173, + "startColumn": 16, + "charOffset": 4833, + "charLength": 5, + "snippet": { + "text": "iType" + } + }, + "contextRegion": { + "startLine": 171, + "startColumn": 16, + "charOffset": 4784, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\titem = findItem;\n\t\t\t\t\tbreak;\n\t\t\t\t} else if (iType.m_transformOnUse && findItem->getID() == iType.m_transformOnUse) {\n\t\t\t\t\titem = findItem;\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4bfed40906ca4bf3b51aee40d733e7e31b8bd3d14869b6a66c61a58aec1fbbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint16_t' (aka 'unsigned short') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 173, + "startColumn": 16, + "charOffset": 4833, + "charLength": 5, + "snippet": { + "text": "iType" + } + }, + "contextRegion": { + "startLine": 171, + "startColumn": 16, + "charOffset": 4784, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\titem = findItem;\n\t\t\t\t\tbreak;\n\t\t\t\t} else if (iType.m_transformOnUse && findItem->getID() == iType.m_transformOnUse) {\n\t\t\t\t\titem = findItem;\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0e4558febd7afa8b706862da2cb96cd3389fe585353471b00784096b9abde68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 173, + "startColumn": 39, + "charOffset": 4856, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 171, + "startColumn": 39, + "charOffset": 4784, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\titem = findItem;\n\t\t\t\t\tbreak;\n\t\t\t\t} else if (iType.m_transformOnUse && findItem->getID() == iType.m_transformOnUse) {\n\t\t\t\t\titem = findItem;\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e05559fba980b5a76655e6d08e195514cf909538228013b67097f5dc4f12f577" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-6-4", + "ruleIndex": 461, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-6-4: For any iteration statement there shall be no more than one break or goto statement used for loop termination" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 175, + "startColumn": 6, + "charOffset": 4933, + "charLength": 5, + "snippet": { + "text": "break" + } + }, + "contextRegion": { + "startLine": 173, + "startColumn": 6, + "charOffset": 4818, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t} else if (iType.m_transformOnUse && findItem->getID() == iType.m_transformOnUse) {\n\t\t\t\t\titem = findItem;\n\t\t\t\t\tbreak;\n\t\t\t\t} else if (iType.isDoor() && findItem->getDoor()) {\n\t\t\t\t\titem = findItem;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa6b779df21db2393581552b418911f37a83697ba59264cce8d761a6edc8143a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-6-4", + "ruleIndex": 461, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-6-4: For any iteration statement there shall be no more than one break or goto statement used for loop termination" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 178, + "startColumn": 6, + "charOffset": 5023, + "charLength": 5, + "snippet": { + "text": "break" + } + }, + "contextRegion": { + "startLine": 176, + "startColumn": 6, + "charOffset": 4940, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t} else if (iType.isDoor() && findItem->getDoor()) {\n\t\t\t\t\titem = findItem;\n\t\t\t\t\tbreak;\n\t\t\t\t} else if (iType.isBed() && findItem->getBed()) {\n\t\t\t\t\titem = findItem;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d20b4307083e968fd2f390d835b1a7ca3560858f7758af7ef08e9886d7aaff7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-6-4", + "ruleIndex": 461, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-6-4: For any iteration statement there shall be no more than one break or goto statement used for loop termination" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 181, + "startColumn": 6, + "charOffset": 5111, + "charLength": 5, + "snippet": { + "text": "break" + } + }, + "contextRegion": { + "startLine": 179, + "startColumn": 6, + "charOffset": 5030, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t} else if (iType.isBed() && findItem->getBed()) {\n\t\t\t\t\titem = findItem;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e71617d575744822ffb329267c89fe8a15039f9c1a5c0b238c84ed9d908459f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 193, + "startColumn": 14, + "charOffset": 5358, + "charLength": 13, + "snippet": { + "text": "transformItem" + } + }, + "contextRegion": { + "startLine": 191, + "startColumn": 14, + "charOffset": 5338, + "charLength": 13, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tg_game().transformItem(item, id);\n\t\t\t} else {\n\t\t\t\tg_logger().warn(\"Deserialization error in {}\", id);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ba6e55c644298855a6994b98e9b162f58e1d73dfba7983a65a2713f5ccd8ef5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 201, + "startColumn": 12, + "charOffset": 5600, + "charLength": 15, + "snippet": { + "text": "unserializeAttr" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 12, + "charOffset": 5535, + "charLength": 15, + "snippet": { + "text": "\t\t\tauto dummy = Item::CreateItem(id);\n\t\t\tif (dummy) {\n\t\t\t\tdummy->unserializeAttr(propStream);\n\t\t\t\tstd::shared_ptr container = dummy->getContainer();\n\t\t\t\tif (container) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c9b503456f982ad13d91fb01f6b5b60f09a890780ce49d28ccb76ecdb58e129" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 203, + "startColumn": 5, + "charOffset": 5699, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 201, + "startColumn": 5, + "charOffset": 5589, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tdummy->unserializeAttr(propStream);\n\t\t\t\tstd::shared_ptr container = dummy->getContainer();\n\t\t\t\tif (container) {\n\t\t\t\t\tif (!loadContainer(propStream, container)) {\n\t\t\t\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a60dbed703f6488d5bd2b1bb096ca7bc060ddee19107e1882815dcfa6316ceae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'saveItem' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 219, + "startColumn": 22, + "charOffset": 6077, + "charLength": 8, + "snippet": { + "text": "saveItem" + } + }, + "contextRegion": { + "startLine": 217, + "startColumn": 22, + "charOffset": 6053, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid IOMapSerialize::saveItem(PropWriteStream &stream, std::shared_ptr item) {\n\tstd::shared_ptr container = item->getContainer();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "090866ccba4663ece640337cc62c353bb0553536c373c0ba75545282442a97bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 219, + "startColumn": 78, + "charOffset": 6133, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 217, + "startColumn": 78, + "charOffset": 6053, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid IOMapSerialize::saveItem(PropWriteStream &stream, std::shared_ptr item) {\n\tstd::shared_ptr container = item->getContainer();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed3d7e642b481f1897a61ece732b05a944bbf4c21ec3726fc89b7a290ff55c70" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 228, + "startColumn": 25, + "charOffset": 6376, + "charLength": 20, + "snippet": { + "text": "ATTR_CONTAINER_ITEMS" + } + }, + "contextRegion": { + "startLine": 226, + "startColumn": 25, + "charOffset": 6296, + "charLength": 20, + "snippet": { + "text": "\tif (container) {\n\t\t// Hack our way into the attributes\n\t\tstream.write(ATTR_CONTAINER_ITEMS);\n\t\tstream.write(container->size());\n\t\tfor (auto it = container->getReversedItems(), end = container->getReversedEnd(); it != end; ++it) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "244e9deb3469f7fda0a596b8c14ff3a15b3d2d789ad8adbad44b5a6a929f71dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 229, + "startColumn": 26, + "charOffset": 6424, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 227, + "startColumn": 26, + "charOffset": 6314, + "charLength": 9, + "snippet": { + "text": "\t\t// Hack our way into the attributes\n\t\tstream.write(ATTR_CONTAINER_ITEMS);\n\t\tstream.write(container->size());\n\t\tfor (auto it = container->getReversedItems(), end = container->getReversedEnd(); it != end; ++it) {\n\t\t\tsaveItem(stream, *it);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2bad69d3946be00e5575c046b239c80b05ed852307d67d3a921b789c9b2bc4c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 230, + "startColumn": 3, + "charOffset": 6446, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 228, + "startColumn": 3, + "charOffset": 6352, + "charLength": 3, + "snippet": { + "text": "\t\tstream.write(ATTR_CONTAINER_ITEMS);\n\t\tstream.write(container->size());\n\t\tfor (auto it = container->getReversedItems(), end = container->getReversedEnd(); it != end; ++it) {\n\t\t\tsaveItem(stream, *it);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c2fdad15a5ad1424622a80de71681ada9e3303601cc4cacc425cb15d06649c05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 230, + "startColumn": 3, + "charOffset": 6446, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 228, + "startColumn": 3, + "charOffset": 6352, + "charLength": 3, + "snippet": { + "text": "\t\tstream.write(ATTR_CONTAINER_ITEMS);\n\t\tstream.write(container->size());\n\t\tfor (auto it = container->getReversedItems(), end = container->getReversedEnd(); it != end; ++it) {\n\t\t\tsaveItem(stream, *it);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0bba46f89077888051d58d3d4972da2d4bd733638145b0ab9b48dea3d1f83d90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 230, + "startColumn": 8, + "charOffset": 6451, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 228, + "startColumn": 8, + "charOffset": 6352, + "charLength": 4, + "snippet": { + "text": "\t\tstream.write(ATTR_CONTAINER_ITEMS);\n\t\tstream.write(container->size());\n\t\tfor (auto it = container->getReversedItems(), end = container->getReversedEnd(); it != end; ++it) {\n\t\t\tsaveItem(stream, *it);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0464744ce6351bed1ca5a98a2e1e54e1d2ca5031eb48fa50b2a17fc38d624430" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 230, + "startColumn": 84, + "charOffset": 6527, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 228, + "startColumn": 84, + "charOffset": 6352, + "charLength": 2, + "snippet": { + "text": "\t\tstream.write(ATTR_CONTAINER_ITEMS);\n\t\tstream.write(container->size());\n\t\tfor (auto it = container->getReversedItems(), end = container->getReversedEnd(); it != end; ++it) {\n\t\t\tsaveItem(stream, *it);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "463a0ef1299527dcbd70d988d2f75609650b9ba6ed03e8c976814248d2cd01d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 235, + "startColumn": 24, + "charOffset": 6603, + "charLength": 4, + "snippet": { + "text": "0x00" + } + }, + "contextRegion": { + "startLine": 233, + "startColumn": 24, + "charOffset": 6576, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tstream.write(0x00); // attr end\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3b8c7cff601c87f163c4f6098a356f061608ff60d9713aadb187aa38e432d15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 238, + "startColumn": 78, + "charOffset": 6702, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 236, + "startColumn": 78, + "charOffset": 6622, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid IOMapSerialize::saveTile(PropWriteStream &stream, std::shared_ptr tile) {\n\tconst TileItemVector* tileItems = tile->getItemList();\n\tif (!tileItems) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49cfd25067a5e4b4c38384aa28dddd00ae05a796672af9bb0859b2c9569d5eb3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 240, + "startColumn": 6, + "charOffset": 6771, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 238, + "startColumn": 6, + "charOffset": 6625, + "charLength": 1, + "snippet": { + "text": "void IOMapSerialize::saveTile(PropWriteStream &stream, std::shared_ptr tile) {\n\tconst TileItemVector* tileItems = tile->getItemList();\n\tif (!tileItems) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8240840ead0f1732ea0fc8a16cb68006b111c12147b8a9d6528493d0604c431b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 240, + "startColumn": 7, + "charOffset": 6772, + "charLength": 9, + "snippet": { + "text": "tileItems" + } + }, + "contextRegion": { + "startLine": 238, + "startColumn": 7, + "charOffset": 6625, + "charLength": 9, + "snippet": { + "text": "void IOMapSerialize::saveTile(PropWriteStream &stream, std::shared_ptr tile) {\n\tconst TileItemVector* tileItems = tile->getItemList();\n\tif (!tileItems) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "162a9ab46f85850007046100e621f9a131f227957ebfd993faa44386652f8816" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "32 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 245, + "startColumn": 16, + "charOffset": 6857, + "charLength": 2, + "snippet": { + "text": "32" + } + }, + "contextRegion": { + "startLine": 243, + "startColumn": 16, + "charOffset": 6798, + "charLength": 2, + "snippet": { + "text": "\n\tstd::vector> items;\n\titems.reserve(32);\n\n\tuint16_t count = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61512766e5e786a0900ce5ef1a92fbf48f0a835eabbf6d95da55876cd4ff6561" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 248, + "startColumn": 2, + "charOffset": 6885, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 246, + "startColumn": 2, + "charOffset": 6862, + "charLength": 3, + "snippet": { + "text": "\n\tuint16_t count = 0;\n\tfor (auto &item : *tileItems) {\n\t\tif (item->getID() == ITEM_BATHTUB_FILLED_NOTMOVABLE) {\n\t\t\tstd::shared_ptr tub = Item::CreateItem(ITEM_BATHTUB_FILLED);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "799cd0a9e8a8077dbb40ae90860096caf8d75a70153bb61fce2986d4412cae9b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &item' can be declared as 'const auto &item'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 248, + "startColumn": 7, + "charOffset": 6890, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 246, + "startColumn": 7, + "charOffset": 6862, + "charLength": 4, + "snippet": { + "text": "\n\tuint16_t count = 0;\n\tfor (auto &item : *tileItems) {\n\t\tif (item->getID() == ITEM_BATHTUB_FILLED_NOTMOVABLE) {\n\t\t\tstd::shared_ptr tub = Item::CreateItem(ITEM_BATHTUB_FILLED);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db5f502065c9eed76de540baba62d48db1ecde85e0923e03399f56ade6e0dcdd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 249, + "startColumn": 3, + "charOffset": 6919, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 247, + "startColumn": 3, + "charOffset": 6863, + "charLength": 2, + "snippet": { + "text": "\tuint16_t count = 0;\n\tfor (auto &item : *tileItems) {\n\t\tif (item->getID() == ITEM_BATHTUB_FILLED_NOTMOVABLE) {\n\t\t\tstd::shared_ptr tub = Item::CreateItem(ITEM_BATHTUB_FILLED);\n\t\t\titems.emplace_back(tub);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c223c75aaeaf070588e2f7c1ea433adcf72ece0bc057c0b6834f57195e061498" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 251, + "startColumn": 10, + "charOffset": 7053, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 249, + "startColumn": 10, + "charOffset": 6917, + "charLength": 12, + "snippet": { + "text": "\t\tif (item->getID() == ITEM_BATHTUB_FILLED_NOTMOVABLE) {\n\t\t\tstd::shared_ptr tub = Item::CreateItem(ITEM_BATHTUB_FILLED);\n\t\t\titems.emplace_back(tub);\n\t\t\t++count;\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa9f3dbcea67193987a13f5fa46860ee5fb024ecb3e343fd52124e716e305f13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'continue'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 254, + "startColumn": 5, + "charOffset": 7101, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 5, + "charOffset": 7072, + "charLength": 4, + "snippet": { + "text": "\t\t\t++count;\n\t\t\tcontinue;\n\t\t} else if (!item->isSavedToHouses()) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8423b6f6865796fefe94b3d721889cfb51b18cb790e24a6380ea942a4a7a46d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 258, + "startColumn": 9, + "charOffset": 7164, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 256, + "startColumn": 9, + "charOffset": 7151, + "charLength": 12, + "snippet": { + "text": "\t\t}\n\n\t\titems.emplace_back(item);\n\t\t++count;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e71fa4557501097a8a91b1f02decc7448c2063e51c22c7f48f9d1127c631fec1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 269, + "startColumn": 3, + "charOffset": 7437, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 267, + "startColumn": 3, + "charOffset": 7401, + "charLength": 3, + "snippet": { + "text": "\n\t\tstream.write(count);\n\t\tfor (std::shared_ptr item : items) {\n\t\t\tsaveItem(stream, item);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5519f90a969a87f8ef714fef001a7234aee40f62256e2bf49209d4b4bdc2bfd9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 269, + "startColumn": 30, + "charOffset": 7464, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 267, + "startColumn": 30, + "charOffset": 7401, + "charLength": 4, + "snippet": { + "text": "\n\t\tstream.write(count);\n\t\tfor (std::shared_ptr item : items) {\n\t\t\tsaveItem(stream, item);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0eab8d129006099c68c018f273fab608514b71c457679fc8f5f885a975397d87" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 279, + "startColumn": 6, + "charOffset": 7712, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 277, + "startColumn": 6, + "charOffset": 7597, + "charLength": 1, + "snippet": { + "text": "\n\tDBResult_ptr result = db.storeQuery(\"SELECT `id`, `owner`, `new_owner`, `paid`, `warnings` FROM `houses`\");\n\tif (!result) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf8431f9d360c1d83530032da864166509f9c68918dfe3b8dbca3da169330e80" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 283, + "startColumn": 2, + "charOffset": 7744, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 281, + "startColumn": 2, + "charOffset": 7739, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tdo {\n\t\tauto houseId = result->getNumber(\"id\");\n\t\tconst auto house = g_game().map.houses.getHouse(houseId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "18030368508751e98c7721b275696140138a03346a239a15f67cca90d39a1976" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 283, + "startColumn": 2, + "charOffset": 7744, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 281, + "startColumn": 2, + "charOffset": 7739, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tdo {\n\t\tauto houseId = result->getNumber(\"id\");\n\t\tconst auto house = g_game().map.houses.getHouse(houseId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be6d1ceab9feab98251cd047b5154876540152a4e8d1a1910b925d51f6e646a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 287, + "startColumn": 4, + "charOffset": 7879, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 285, + "startColumn": 4, + "charOffset": 7801, + "charLength": 8, + "snippet": { + "text": "\t\tconst auto house = g_game().map.houses.getHouse(houseId);\n\t\tif (house) {\n\t\t\tuint32_t owner = result->getNumber(\"owner\");\n\t\t\tint32_t newOwner = result->getNumber(\"new_owner\");\n\t\t\t// Transfer house owner" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b9059d925c4f96d77ca3e07f66c909ac7b99ef6a5d3407eb2b09b0321774f98" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 288, + "startColumn": 4, + "charOffset": 7937, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 286, + "startColumn": 4, + "charOffset": 7861, + "charLength": 7, + "snippet": { + "text": "\t\tif (house) {\n\t\t\tuint32_t owner = result->getNumber(\"owner\");\n\t\t\tint32_t newOwner = result->getNumber(\"new_owner\");\n\t\t\t// Transfer house owner\n\t\t\tauto isTransferOnRestart = g_configManager().getBoolean(TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART, __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff433e7417ac74dc2ceb3963edd41906696d20e37f3147d63db50002dcd3bd3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (do loop) is ID-dependent due to variable reference to 'result' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 306, + "startColumn": 11, + "charOffset": 8698, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 304, + "startColumn": 11, + "charOffset": 8613, + "charLength": 6, + "snippet": { + "text": "\t\t\thouse->setPayRentWarnings(result->getNumber(\"warnings\"));\n\t\t}\n\t} while (result->next());\n\n\tresult = db.storeQuery(\"SELECT `house_id`, `listid`, `list` FROM `house_lists`\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9eedbc24be9e232cf5c31736f477550ca33b899d79251c5724996e5707e93c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 306, + "startColumn": 19, + "charOffset": 8706, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 304, + "startColumn": 19, + "charOffset": 8613, + "charLength": 4, + "snippet": { + "text": "\t\t\thouse->setPayRentWarnings(result->getNumber(\"warnings\"));\n\t\t}\n\t} while (result->next());\n\n\tresult = db.storeQuery(\"SELECT `house_id`, `listid`, `list` FROM `house_lists`\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71d5dd23dc586f59d2f601485da7435b68979b5e9b7eedde9c05d9b427864285" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 310, + "startColumn": 3, + "charOffset": 8816, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 308, + "startColumn": 3, + "charOffset": 8716, + "charLength": 2, + "snippet": { + "text": "\tresult = db.storeQuery(\"SELECT `house_id`, `listid`, `list` FROM `house_lists`\");\n\tif (result) {\n\t\tdo {\n\t\t\tconst auto &house = g_game().map.houses.getHouse(result->getNumber(\"house_id\"));\n\t\t\tif (house) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0053a7183ba26869ce060b3df4cd67f6c666c297e60cb819d52454c838c68107" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 310, + "startColumn": 3, + "charOffset": 8816, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 308, + "startColumn": 3, + "charOffset": 8716, + "charLength": 2, + "snippet": { + "text": "\tresult = db.storeQuery(\"SELECT `house_id`, `listid`, `list` FROM `house_lists`\");\n\tif (result) {\n\t\tdo {\n\t\t\tconst auto &house = g_game().map.houses.getHouse(result->getNumber(\"house_id\"));\n\t\t\tif (house) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd9e610a2db10d25ad1533bc5e0b69467f5f5b3915c36cd49b1653ab5ffb6e89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (do loop) is ID-dependent due to variable reference to 'result' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 315, + "startColumn": 12, + "charOffset": 9039, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 313, + "startColumn": 12, + "charOffset": 8931, + "charLength": 6, + "snippet": { + "text": "\t\t\t\thouse->setAccessList(result->getNumber(\"listid\"), result->getString(\"list\"));\n\t\t\t}\n\t\t} while (result->next());\n\t}\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64db698ef5a211e88ce277f57fe900305355bf8697d500135dc96fd95372e846" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 315, + "startColumn": 20, + "charOffset": 9047, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 313, + "startColumn": 20, + "charOffset": 8931, + "charLength": 4, + "snippet": { + "text": "\t\t\t\thouse->setAccessList(result->getNumber(\"listid\"), result->getString(\"list\"));\n\t\t\t}\n\t\t} while (result->next());\n\t}\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7dc0835b9d30f77b6ab754f78e664fe1f54a451cc374a78f2f6643bb331c58c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'SaveHouseInfoGuard' has cognitive complexity of 29 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 332, + "startColumn": 22, + "charOffset": 9353, + "charLength": 18, + "snippet": { + "text": "SaveHouseInfoGuard" + } + }, + "contextRegion": { + "startLine": 330, + "startColumn": 22, + "charOffset": 9329, + "charLength": 18, + "snippet": { + "text": "}\n\nbool IOMapSerialize::SaveHouseInfoGuard() {\n\tDatabase &db = Database::getInstance();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1260c775695a3e41c21fb44ada161e801c9cddc19269eba07da44230005ea54" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 339, + "startColumn": 2, + "charOffset": 9678, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 337, + "startColumn": 2, + "charOffset": 9579, + "charLength": 3, + "snippet": { + "text": "\thouseUpdate.upsert({ \"owner\", \"paid\", \"warnings\", \"name\", \"town_id\", \"rent\", \"size\", \"beds\" });\n\n\tfor (const auto &[key, house] : g_game().map.houses.getHouses()) {\n\t\tstd::string values = fmt::format(\"{},{},{},{},{},{},{},{},{}\", house->getId(), house->getOwner(), house->getPaidUntil(), house->getPayRentWarnings(), db.escapeString(house->getName()), house->getTownId(), house->getRent(), house->getSize(), house->getBedCount());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a4a194e9aedd711cf86d3d84badf17320bf0f844c044b570e703b4cdbc87b82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 375, + "startColumn": 3, + "charOffset": 10928, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 373, + "startColumn": 3, + "charOffset": 10921, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfor (std::shared_ptr door : house->getDoors()) {\n\t\t\tif (door->getAccessList(listText) && !listText.empty()) {\n\t\t\t\tquery << house->getId() << ',' << door->getDoorId() << ',' << db.escapeString(listText) << ',' << version;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff15b0b93595ac02a6cabf8f7ec6c100982c007d851808d2c20923954a4420da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomapserialize.cpp" + }, + "region": { + "startLine": 375, + "startColumn": 30, + "charOffset": 10955, + "charLength": 4, + "snippet": { + "text": "door" + } + }, + "contextRegion": { + "startLine": 373, + "startColumn": 30, + "charOffset": 10921, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tfor (std::shared_ptr door : house->getDoors()) {\n\t\t\tif (door->getAccessList(listText) && !listText.empty()) {\n\t\t\t\tquery << house->getId() << ',' << door->getDoorId() << ',' << db.escapeString(listText) << ',' << version;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6f08afed1f672c2f2641ed2fefb5ca85e21d8ede7fee1ce7f381d1e1dd576ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err34-c", + "ruleIndex": 133, + "kind": "fail", + "level": "warning", + "message": { + "text": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 20, + "startColumn": 35, + "charOffset": 704, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 35, + "charOffset": 597, + "charLength": 3, + "snippet": { + "text": "\nuint8_t IOMarket::getTierFromDatabaseTable(const std::string &string) {\n\tauto tier = static_cast(std::atoi(string.c_str()));\n\tif (tier > g_configManager().getNumber(FORGE_MAX_ITEM_TIER, __FUNCTION__)) {\n\t\tg_logger().error(\"{} - Failed to get number value {} for tier table result\", __FUNCTION__, tier);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7567c1f5d3dc103a60fb784bbe312f78bb2442830dc5fbe2dce637511cb53ac8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-2", + "ruleIndex": 408, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-2: The library functions atof, atoi and atol from library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 20, + "startColumn": 35, + "charOffset": 704, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 35, + "charOffset": 597, + "charLength": 3, + "snippet": { + "text": "\nuint8_t IOMarket::getTierFromDatabaseTable(const std::string &string) {\n\tauto tier = static_cast(std::atoi(string.c_str()));\n\tif (tier > g_configManager().getNumber(FORGE_MAX_ITEM_TIER, __FUNCTION__)) {\n\t\tg_logger().error(\"{} - Failed to get number value {} for tier table result\", __FUNCTION__, tier);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ffa353f59f2e92a032fc5ea60f6e61e27116a6de5997172f84a11880e07e0096" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 40, + "startColumn": 6, + "charOffset": 1350, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 38, + "startColumn": 6, + "charOffset": 1289, + "charLength": 1, + "snippet": { + "text": "\n\tDBResult_ptr result = g_database().storeQuery(query);\n\tif (!result) {\n\t\treturn offerList;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8fc4b8f3605761b4bcc53d5c6dff631cac09b2bf760b2c4326c304d3244224f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 46, + "startColumn": 2, + "charOffset": 1490, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 44, + "startColumn": 2, + "charOffset": 1385, + "charLength": 2, + "snippet": { + "text": "\tconst int32_t marketOfferDuration = g_configManager().getNumber(MARKET_OFFER_DURATION, __FUNCTION__);\n\n\tdo {\n\t\tMarketOffer offer;\n\t\toffer.itemId = result->getNumber(\"itemtype\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32bea78a8da880b4c015768d38596bfbd1f281f3e6de868c5c29f9c7e78202b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 46, + "startColumn": 2, + "charOffset": 1490, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 44, + "startColumn": 2, + "charOffset": 1385, + "charLength": 2, + "snippet": { + "text": "\tconst int32_t marketOfferDuration = g_configManager().getNumber(MARKET_OFFER_DURATION, __FUNCTION__);\n\n\tdo {\n\t\tMarketOffer offer;\n\t\toffer.itemId = result->getNumber(\"itemtype\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "877ccddbe07143d83c381247cd393f09be7d0d13edaaf4496e97e0668a095939" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 52, + "startColumn": 19, + "charOffset": 1784, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 50, + "startColumn": 19, + "charOffset": 1630, + "charLength": 6, + "snippet": { + "text": "\t\toffer.price = result->getNumber(\"price\");\n\t\toffer.timestamp = result->getNumber(\"created\") + marketOfferDuration;\n\t\toffer.counter = result->getNumber(\"id\") & 0xFFFF;\n\t\tif (result->getNumber(\"anonymous\") == 0) {\n\t\t\toffer.playerName = result->getString(\"player_name\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3860312100d739e1ee59f60869b8b7e526497f0c9be7e45714f6acb6b2cbf23c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 52, + "startColumn": 55, + "charOffset": 1820, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 50, + "startColumn": 55, + "charOffset": 1630, + "charLength": 6, + "snippet": { + "text": "\t\toffer.price = result->getNumber(\"price\");\n\t\toffer.timestamp = result->getNumber(\"created\") + marketOfferDuration;\n\t\toffer.counter = result->getNumber(\"id\") & 0xFFFF;\n\t\tif (result->getNumber(\"anonymous\") == 0) {\n\t\t\toffer.playerName = result->getString(\"player_name\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01372f2fcebc9f21113baa8aa0242187aecb1aeeb44be842afac331070d1ce77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 52, + "startColumn": 55, + "charOffset": 1820, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 50, + "startColumn": 55, + "charOffset": 1630, + "charLength": 6, + "snippet": { + "text": "\t\toffer.price = result->getNumber(\"price\");\n\t\toffer.timestamp = result->getNumber(\"created\") + marketOfferDuration;\n\t\toffer.counter = result->getNumber(\"id\") & 0xFFFF;\n\t\tif (result->getNumber(\"anonymous\") == 0) {\n\t\t\toffer.playerName = result->getString(\"player_name\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51e5066ed5801d64a50bbbd8d078f80896069b2e36af172499c2b29b25808e32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 52, + "startColumn": 55, + "charOffset": 1820, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 50, + "startColumn": 55, + "charOffset": 1630, + "charLength": 6, + "snippet": { + "text": "\t\toffer.price = result->getNumber(\"price\");\n\t\toffer.timestamp = result->getNumber(\"created\") + marketOfferDuration;\n\t\toffer.counter = result->getNumber(\"id\") & 0xFFFF;\n\t\tif (result->getNumber(\"anonymous\") == 0) {\n\t\t\toffer.playerName = result->getString(\"player_name\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64d2f2d734b09648b5871bad6563d2d096bfcd144144793ca2a384ef5e481b8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (do loop) is ID-dependent due to variable reference to 'result' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 60, + "startColumn": 11, + "charOffset": 2097, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 11, + "charOffset": 1989, + "charLength": 6, + "snippet": { + "text": "\t\toffer.tier = getTierFromDatabaseTable(result->getString(\"tier\"));\n\t\tofferList.push_back(offer);\n\t} while (result->next());\n\treturn offerList;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28a2fd78389612dce30128e543f4e170a4d3ac2f2e6a99dcfd2cae5587cee7f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 60, + "startColumn": 19, + "charOffset": 2105, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 19, + "charOffset": 1989, + "charLength": 4, + "snippet": { + "text": "\t\toffer.tier = getTierFromDatabaseTable(result->getString(\"tier\"));\n\t\tofferList.push_back(offer);\n\t} while (result->next());\n\treturn offerList;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f33ca56c58918865be88f56ea7b0e5b313bdb5189169a1291eae17dcc996c06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 71, + "startColumn": 6, + "charOffset": 2643, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 69, + "startColumn": 6, + "charOffset": 2565, + "charLength": 1, + "snippet": { + "text": "\n\tDBResult_ptr result = Database::getInstance().storeQuery(query.str());\n\tif (!result) {\n\t\treturn offerList;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e48c0b5482776d23b712231f9e7fce673529422d3d882acc09feae47db996095" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 77, + "startColumn": 2, + "charOffset": 2783, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 75, + "startColumn": 2, + "charOffset": 2678, + "charLength": 2, + "snippet": { + "text": "\tconst int32_t marketOfferDuration = g_configManager().getNumber(MARKET_OFFER_DURATION, __FUNCTION__);\n\n\tdo {\n\t\tMarketOffer offer;\n\t\toffer.itemId = itemId;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c878dbe519fe06cf0a55cf47ec1c11d0a733b8d6686217b7d1d757476bcdce07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 77, + "startColumn": 2, + "charOffset": 2783, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 75, + "startColumn": 2, + "charOffset": 2678, + "charLength": 2, + "snippet": { + "text": "\tconst int32_t marketOfferDuration = g_configManager().getNumber(MARKET_OFFER_DURATION, __FUNCTION__);\n\n\tdo {\n\t\tMarketOffer offer;\n\t\toffer.itemId = itemId;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c935eb9e942869abdb82e77801502a353109c8e5aa9971fe36fd096110188122" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 83, + "startColumn": 19, + "charOffset": 3044, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 81, + "startColumn": 19, + "charOffset": 2890, + "charLength": 6, + "snippet": { + "text": "\t\toffer.price = result->getNumber(\"price\");\n\t\toffer.timestamp = result->getNumber(\"created\") + marketOfferDuration;\n\t\toffer.counter = result->getNumber(\"id\") & 0xFFFF;\n\t\tif (result->getNumber(\"anonymous\") == 0) {\n\t\t\toffer.playerName = result->getString(\"player_name\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef7b0b72e9da72946c6266834280c5d0221bdacd63a4e9f963764dd4f7eb8703" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 83, + "startColumn": 55, + "charOffset": 3080, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 81, + "startColumn": 55, + "charOffset": 2890, + "charLength": 6, + "snippet": { + "text": "\t\toffer.price = result->getNumber(\"price\");\n\t\toffer.timestamp = result->getNumber(\"created\") + marketOfferDuration;\n\t\toffer.counter = result->getNumber(\"id\") & 0xFFFF;\n\t\tif (result->getNumber(\"anonymous\") == 0) {\n\t\t\toffer.playerName = result->getString(\"player_name\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20374ca4889bdd9f3e2ddd1a138c4b46d5feb3fb73744fb9db3b0539cd5948ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 83, + "startColumn": 55, + "charOffset": 3080, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 81, + "startColumn": 55, + "charOffset": 2890, + "charLength": 6, + "snippet": { + "text": "\t\toffer.price = result->getNumber(\"price\");\n\t\toffer.timestamp = result->getNumber(\"created\") + marketOfferDuration;\n\t\toffer.counter = result->getNumber(\"id\") & 0xFFFF;\n\t\tif (result->getNumber(\"anonymous\") == 0) {\n\t\t\toffer.playerName = result->getString(\"player_name\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b52a1ea7edc3f0f3cdd5d116c188108b6011a9721d841a7eb5446ffe8865be12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 83, + "startColumn": 55, + "charOffset": 3080, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 81, + "startColumn": 55, + "charOffset": 2890, + "charLength": 6, + "snippet": { + "text": "\t\toffer.price = result->getNumber(\"price\");\n\t\toffer.timestamp = result->getNumber(\"created\") + marketOfferDuration;\n\t\toffer.counter = result->getNumber(\"id\") & 0xFFFF;\n\t\tif (result->getNumber(\"anonymous\") == 0) {\n\t\t\toffer.playerName = result->getString(\"player_name\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53fea044b1b24be9ac0ba8099d7e92b5daa4fdcad4e11cfe373d6fb0b90b958b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (do loop) is ID-dependent due to variable reference to 'result' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 11, + "charOffset": 3357, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 11, + "charOffset": 3249, + "charLength": 6, + "snippet": { + "text": "\t\toffer.tier = getTierFromDatabaseTable(result->getString(\"tier\"));\n\t\tofferList.push_back(offer);\n\t} while (result->next());\n\treturn offerList;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55cec79e79fd5b904b4fbd43233e788bcb9a69a3439981306d275d00745715cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 19, + "charOffset": 3365, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 19, + "charOffset": 3249, + "charLength": 4, + "snippet": { + "text": "\t\toffer.tier = getTierFromDatabaseTable(result->getString(\"tier\"));\n\t\tofferList.push_back(offer);\n\t} while (result->next());\n\treturn offerList;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7c6cc9275035c8de611046d3f1f8241a8f5b8b63e99a7627248e0111a854459" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 104, + "startColumn": 6, + "charOffset": 3876, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 102, + "startColumn": 6, + "charOffset": 3798, + "charLength": 1, + "snippet": { + "text": "\n\tDBResult_ptr result = Database::getInstance().storeQuery(query.str());\n\tif (!result) {\n\t\treturn offerList;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b9134cdd14367fbb732e6f91293ba5bd177380ec7fadd3dbce2492c9bc8da95" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 108, + "startColumn": 2, + "charOffset": 3912, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 2, + "charOffset": 3907, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tdo {\n\t\tMarketOffer offer;\n\t\toffer.amount = result->getNumber(\"amount\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bedba7174dd8e91dfbc91e33d95de2d00cb18f3692e29820697e6d6e9ee1b896" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 108, + "startColumn": 2, + "charOffset": 3912, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 2, + "charOffset": 3907, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tdo {\n\t\tMarketOffer offer;\n\t\toffer.amount = result->getNumber(\"amount\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5040fea14682b361f3d53f9339244f3f5d181deeaba356477db270a7c18f32d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 113, + "startColumn": 19, + "charOffset": 4148, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 111, + "startColumn": 19, + "charOffset": 3994, + "charLength": 6, + "snippet": { + "text": "\t\toffer.price = result->getNumber(\"price\");\n\t\toffer.timestamp = result->getNumber(\"created\") + marketOfferDuration;\n\t\toffer.counter = result->getNumber(\"id\") & 0xFFFF;\n\t\toffer.itemId = result->getNumber(\"itemtype\");\n\t\toffer.tier = getTierFromDatabaseTable(result->getString(\"tier\"));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8c8be745c0efdb924f45f55662a39d0b57513b70ed132cb8a91232c1b946965" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 113, + "startColumn": 55, + "charOffset": 4184, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 111, + "startColumn": 55, + "charOffset": 3994, + "charLength": 6, + "snippet": { + "text": "\t\toffer.price = result->getNumber(\"price\");\n\t\toffer.timestamp = result->getNumber(\"created\") + marketOfferDuration;\n\t\toffer.counter = result->getNumber(\"id\") & 0xFFFF;\n\t\toffer.itemId = result->getNumber(\"itemtype\");\n\t\toffer.tier = getTierFromDatabaseTable(result->getString(\"tier\"));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78041a1cd3e6a24df1fe1501e165dfd79474985fb96ecf61fbe81867196446fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 113, + "startColumn": 55, + "charOffset": 4184, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 111, + "startColumn": 55, + "charOffset": 3994, + "charLength": 6, + "snippet": { + "text": "\t\toffer.price = result->getNumber(\"price\");\n\t\toffer.timestamp = result->getNumber(\"created\") + marketOfferDuration;\n\t\toffer.counter = result->getNumber(\"id\") & 0xFFFF;\n\t\toffer.itemId = result->getNumber(\"itemtype\");\n\t\toffer.tier = getTierFromDatabaseTable(result->getString(\"tier\"));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54cbc42ddfb8fe4d33a45ed9acf97352f37fbb71dc93f8a01638043444ab4d0e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 113, + "startColumn": 55, + "charOffset": 4184, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 111, + "startColumn": 55, + "charOffset": 3994, + "charLength": 6, + "snippet": { + "text": "\t\toffer.price = result->getNumber(\"price\");\n\t\toffer.timestamp = result->getNumber(\"created\") + marketOfferDuration;\n\t\toffer.counter = result->getNumber(\"id\") & 0xFFFF;\n\t\toffer.itemId = result->getNumber(\"itemtype\");\n\t\toffer.tier = getTierFromDatabaseTable(result->getString(\"tier\"));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8dbdba0a55b6b320c565100d8ad06f043d7ee4c6f926abf7ddbd9d3f5952bc9c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (do loop) is ID-dependent due to variable reference to 'result' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 117, + "startColumn": 11, + "charOffset": 4358, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 115, + "startColumn": 11, + "charOffset": 4250, + "charLength": 6, + "snippet": { + "text": "\t\toffer.tier = getTierFromDatabaseTable(result->getString(\"tier\"));\n\t\tofferList.push_back(offer);\n\t} while (result->next());\n\treturn offerList;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1af41097c93d0797de7b8bc94bfc254c19e5491db2775669d3926cd6b8cc1f84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 117, + "startColumn": 19, + "charOffset": 4366, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 115, + "startColumn": 19, + "charOffset": 4250, + "charLength": 4, + "snippet": { + "text": "\t\toffer.tier = getTierFromDatabaseTable(result->getString(\"tier\"));\n\t\tofferList.push_back(offer);\n\t} while (result->next());\n\treturn offerList;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "475f56db788a5db6c26a3cec87ed8770e3ddd5c10476047ec68071e43ef4cfb1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 128, + "startColumn": 6, + "charOffset": 4795, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 126, + "startColumn": 6, + "charOffset": 4717, + "charLength": 1, + "snippet": { + "text": "\n\tDBResult_ptr result = Database::getInstance().storeQuery(query.str());\n\tif (!result) {\n\t\treturn offerList;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac89b3c97584c746fc6dbaed3dab346a7588c9d0f9dc9f1bb1b48420bbddd74e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 132, + "startColumn": 2, + "charOffset": 4831, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 130, + "startColumn": 2, + "charOffset": 4826, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tdo {\n\t\tHistoryMarketOffer offer;\n\t\toffer.itemId = result->getNumber(\"itemtype\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c878dbe519fe06cf0a55cf47ec1c11d0a733b8d6686217b7d1d757476bcdce07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 132, + "startColumn": 2, + "charOffset": 4831, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 130, + "startColumn": 2, + "charOffset": 4826, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tdo {\n\t\tHistoryMarketOffer offer;\n\t\toffer.itemId = result->getNumber(\"itemtype\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c935eb9e942869abdb82e77801502a353109c8e5aa9971fe36fd096110188122" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-member-init", + "ruleIndex": 510, + "kind": "fail", + "level": "warning", + "message": { + "text": "uninitialized record type: 'offer'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 133, + "startColumn": 3, + "charOffset": 4838, + "charLength": 18, + "snippet": { + "text": "HistoryMarketOffer" + } + }, + "contextRegion": { + "startLine": 131, + "startColumn": 3, + "charOffset": 4829, + "charLength": 18, + "snippet": { + "text": "\n\tdo {\n\t\tHistoryMarketOffer offer;\n\t\toffer.itemId = result->getNumber(\"itemtype\");\n\t\toffer.amount = result->getNumber(\"amount\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "626e11efd7413a41e5eaf7527f87c1f8a350e7856d4f1a1bdff14c5dec2155fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (do loop) is ID-dependent due to variable reference to 'result' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 148, + "startColumn": 11, + "charOffset": 5425, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 146, + "startColumn": 11, + "charOffset": 5384, + "charLength": 6, + "snippet": { + "text": "\n\t\tofferList.push_back(offer);\n\t} while (result->next());\n\treturn offerList;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28a2fd78389612dce30128e543f4e170a4d3ac2f2e6a99dcfd2cae5587cee7f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 148, + "startColumn": 19, + "charOffset": 5433, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 146, + "startColumn": 19, + "charOffset": 5384, + "charLength": 4, + "snippet": { + "text": "\n\t\tofferList.push_back(offer);\n\t} while (result->next());\n\treturn offerList;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f33ca56c58918865be88f56ea7b0e5b313bdb5189169a1291eae17dcc996c06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'processExpiredOffers' has cognitive complexity of 57 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 152, + "startColumn": 16, + "charOffset": 5479, + "charLength": 20, + "snippet": { + "text": "processExpiredOffers" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 16, + "charOffset": 5461, + "charLength": 20, + "snippet": { + "text": "}\n\nvoid IOMarket::processExpiredOffers(DBResult_ptr result, bool) {\n\tif (!result) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8ca1679e9f380439797d55a6524061a8aa037bc36aafd6f33f3473a76bd181e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'result' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 152, + "startColumn": 50, + "charOffset": 5513, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 50, + "charOffset": 5461, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOMarket::processExpiredOffers(DBResult_ptr result, bool) {\n\tif (!result) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0de047ae88f0180084992166c2c4f07024183872d3e5f82874e4bf6c49bd8b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 152, + "startColumn": 62, + "charOffset": 5525, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 62, + "charOffset": 5461, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid IOMarket::processExpiredOffers(DBResult_ptr result, bool) {\n\tif (!result) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a48b8e9e72d08ae4fe9cb68c006a6d54da44be9e6ee31409205ccc6e255e0303" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 153, + "startColumn": 6, + "charOffset": 5534, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 151, + "startColumn": 6, + "charOffset": 5463, + "charLength": 1, + "snippet": { + "text": "\nvoid IOMarket::processExpiredOffers(DBResult_ptr result, bool) {\n\tif (!result) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c715a125c3c8481c020a6f2929b6242cfe4ac28f1e9211315cab2fdcc8100303" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 2, + "charOffset": 5560, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 2, + "charOffset": 5555, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tdo {\n\t\tif (!IOMarket::moveOfferToHistory(result->getNumber(\"id\"), OFFERSTATE_EXPIRED)) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86918d26db278475db5183b0d6bd7efaae502101e80433af50edf812b21d0317" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 162, + "startColumn": 9, + "charOffset": 5685, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 160, + "startColumn": 9, + "charOffset": 5672, + "charLength": 8, + "snippet": { + "text": "\t\t}\n\n\t\tconst uint32_t playerId = result->getNumber(\"player_id\");\n\t\tconst uint16_t amount = result->getNumber(\"amount\");\n\t\tauto tier = getTierFromDatabaseTable(result->getString(\"tier\"));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4acbb53a2c70f8d2bc79920f663e54b95b77f80b8b415aab96473e21255f8d3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 163, + "startColumn": 9, + "charOffset": 5755, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 161, + "startColumn": 9, + "charOffset": 5676, + "charLength": 8, + "snippet": { + "text": "\n\t\tconst uint32_t playerId = result->getNumber(\"player_id\");\n\t\tconst uint16_t amount = result->getNumber(\"amount\");\n\t\tauto tier = getTierFromDatabaseTable(result->getString(\"tier\"));\n\t\tif (result->getNumber(\"sale\") == 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05ba55b0d61e3d48fde97643eab8f8436ad40be77802bba12194bbc3feb913c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 8, + "charOffset": 6145, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 8, + "charOffset": 6059, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tstd::shared_ptr player = g_game().getPlayerByGUID(playerId, true);\n\t\t\tif (!player) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b928d3a04da6d3b6872d60046b5a589f7baa567b4f04b8ec160a9a7930b120af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 178, + "startColumn": 5, + "charOffset": 6242, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 176, + "startColumn": 5, + "charOffset": 6176, + "charLength": 5, + "snippet": { + "text": "\t\t\tif (itemType.stackable) {\n\t\t\t\tuint16_t tmpAmount = amount;\n\t\t\t\twhile (tmpAmount > 0) {\n\t\t\t\t\tuint16_t stackCount = std::min(100, tmpAmount);\n\t\t\t\t\tstd::shared_ptr item = Item::CreateItem(itemType.id, stackCount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7fc42b0d29c2615eff546b9c10d4f337e511007908ffdafcddd78744382d3f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'tmpAmount' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 178, + "startColumn": 12, + "charOffset": 6249, + "charLength": 9, + "snippet": { + "text": "tmpAmount" + } + }, + "contextRegion": { + "startLine": 176, + "startColumn": 12, + "charOffset": 6176, + "charLength": 9, + "snippet": { + "text": "\t\t\tif (itemType.stackable) {\n\t\t\t\tuint16_t tmpAmount = amount;\n\t\t\t\twhile (tmpAmount > 0) {\n\t\t\t\t\tuint16_t stackCount = std::min(100, tmpAmount);\n\t\t\t\t\tstd::shared_ptr item = Item::CreateItem(itemType.id, stackCount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1375d16fa6ab6f4860fe38ab47a3dd5bea09f2a4add8d1a9aa742e1ec845b56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 179, + "startColumn": 47, + "charOffset": 6312, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 177, + "startColumn": 47, + "charOffset": 6205, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tuint16_t tmpAmount = amount;\n\t\t\t\twhile (tmpAmount > 0) {\n\t\t\t\t\tuint16_t stackCount = std::min(100, tmpAmount);\n\t\t\t\t\tstd::shared_ptr item = Item::CreateItem(itemType.id, stackCount);\n\t\t\t\t\tif (g_game().internalAddItem(player->getInbox(), item, INDEX_WHEREEVER, FLAG_NOLIMIT) != RETURNVALUE_NOERROR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbe5cf4a151b22848c66d1cd61ebcb2dd8f0b4e624c171071f8d78ed258f1bb6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'subType' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 194, + "startColumn": 13, + "charOffset": 6821, + "charLength": 7, + "snippet": { + "text": "subType" + } + }, + "contextRegion": { + "startLine": 192, + "startColumn": 13, + "charOffset": 6791, + "charLength": 7, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tint32_t subType;\n\t\t\t\tif (itemType.charges != 0) {\n\t\t\t\t\tsubType = itemType.charges;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9dbe47da8e4218f2a30297c7019bab4f6e92b3bc9785253a31c800e2b077ea4b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 196, + "startColumn": 16, + "charOffset": 6878, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 194, + "startColumn": 16, + "charOffset": 6809, + "charLength": 8, + "snippet": { + "text": "\t\t\t\tint32_t subType;\n\t\t\t\tif (itemType.charges != 0) {\n\t\t\t\t\tsubType = itemType.charges;\n\t\t\t\t} else {\n\t\t\t\t\tsubType = -1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e5990e9d695c820e246fbc0f04d6c0095cf8ebb4189dded48d018e7d023ae39" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 201, + "startColumn": 5, + "charOffset": 6939, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 5, + "charOffset": 6928, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tfor (uint16_t i = 0; i < amount; ++i) {\n\t\t\t\t\tstd::shared_ptr item = Item::CreateItem(itemType.id, subType);\n\t\t\t\t\tif (g_game().internalAddItem(player->getInbox(), item, INDEX_WHEREEVER, FLAG_NOLIMIT) != RETURNVALUE_NOERROR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d69bdb2c1bb6d3796c35a87fe2997cedc5756a8acf49b8793338b3b2e45e9103" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'amount' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 201, + "startColumn": 26, + "charOffset": 6960, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 26, + "charOffset": 6928, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tfor (uint16_t i = 0; i < amount; ++i) {\n\t\t\t\t\tstd::shared_ptr item = Item::CreateItem(itemType.id, subType);\n\t\t\t\t\tif (g_game().internalAddItem(player->getInbox(), item, INDEX_WHEREEVER, FLAG_NOLIMIT) != RETURNVALUE_NOERROR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f56f2bc100e9e3e792552ff3935a87cff59213c148f32dc1451b22889135dfe8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 202, + "startColumn": 65, + "charOffset": 7043, + "charLength": 7, + "snippet": { + "text": "subType" + } + }, + "contextRegion": { + "startLine": 200, + "startColumn": 65, + "charOffset": 6934, + "charLength": 7, + "snippet": { + "text": "\n\t\t\t\tfor (uint16_t i = 0; i < amount; ++i) {\n\t\t\t\t\tstd::shared_ptr item = Item::CreateItem(itemType.id, subType);\n\t\t\t\t\tif (g_game().internalAddItem(player->getInbox(), item, INDEX_WHEREEVER, FLAG_NOLIMIT) != RETURNVALUE_NOERROR) {\n\t\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c557acc6e247774b7bcbddbfa92f61dfc4fadb54d33bf1c43ea1ca9760c237d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 214, + "startColumn": 21, + "charOffset": 7337, + "charLength": 10, + "snippet": { + "text": "savePlayer" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 21, + "charOffset": 7286, + "charLength": 10, + "snippet": { + "text": "\n\t\t\tif (player->isOffline()) {\n\t\t\t\tg_saveManager().savePlayer(player);\n\t\t\t}\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89b9f876cde0807e6d5f10d879d41f341fde93879514a24922c3c537f0777fe8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 19, + "charOffset": 7701, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 19, + "charOffset": 7674, + "charLength": 4, + "snippet": { + "text": "\t\t\t}\n\t\t}\n\t} while (result->next());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17a0ad92747dc67e949c47a0ffa50834b6ba736ba6f4c12f6fc0ea64ea0ce9ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 241, + "startColumn": 17, + "charOffset": 8318, + "charLength": 13, + "snippet": { + "text": "scheduleEvent" + } + }, + "contextRegion": { + "startLine": 239, + "startColumn": 17, + "charOffset": 8298, + "charLength": 13, + "snippet": { + "text": "\t}\n\n\tg_dispatcher().scheduleEvent(checkExpiredMarketOffersEachMinutes * 60 * 1000, IOMarket::checkExpiredOffers, __FUNCTION__);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "299ef6912d4685aff88e80311a289ee315977c0bf3b5c60aa130e25923439cdb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 241, + "startColumn": 69, + "charOffset": 8370, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 239, + "startColumn": 69, + "charOffset": 8298, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tg_dispatcher().scheduleEvent(checkExpiredMarketOffersEachMinutes * 60 * 1000, IOMarket::checkExpiredOffers, __FUNCTION__);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c5f23008a7e3a5f3785a13339cacaa3f29262a057a782c184e0f360b26bd80f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 241, + "startColumn": 74, + "charOffset": 8375, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 239, + "startColumn": 74, + "charOffset": 8298, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tg_dispatcher().scheduleEvent(checkExpiredMarketOffersEachMinutes * 60 * 1000, IOMarket::checkExpiredOffers, __FUNCTION__);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78a7fce888ce24434b34e07ebf5546ad4e0c425feb8077b0c96c074c27a063ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 249, + "startColumn": 6, + "charOffset": 8688, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 247, + "startColumn": 6, + "charOffset": 8610, + "charLength": 1, + "snippet": { + "text": "\n\tDBResult_ptr result = Database::getInstance().storeQuery(query.str());\n\tif (!result) {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41566841a7af04e14911fb406487a708610d3b32375ca436271eed3f858b0bf4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'getOfferByCounter' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 255, + "startColumn": 43, + "charOffset": 8804, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 253, + "startColumn": 43, + "charOffset": 8759, + "charLength": 8, + "snippet": { + "text": "}\n\nMarketOfferEx IOMarket::getOfferByCounter(uint32_t timestamp, uint16_t counter) {\n\tMarketOfferEx offer;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f06a31a878da23f482b56ef761654716c9328c667a8252c8cede68a521721434" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 258, + "startColumn": 26, + "charOffset": 8892, + "charLength": 9, + "snippet": { + "text": "timestamp" + } + }, + "contextRegion": { + "startLine": 256, + "startColumn": 26, + "charOffset": 8844, + "charLength": 9, + "snippet": { + "text": "\tMarketOfferEx offer;\n\n\tconst int32_t created = timestamp - g_configManager().getNumber(MARKET_OFFER_DURATION, __FUNCTION__);\n\n\tstd::ostringstream query;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d13d0584ea75f1f380d7789639b64651f93ee0b3cce09ca504f6c62905d5cdb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 264, + "startColumn": 6, + "charOffset": 9363, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 262, + "startColumn": 6, + "charOffset": 9285, + "charLength": 1, + "snippet": { + "text": "\n\tDBResult_ptr result = Database::getInstance().storeQuery(query.str());\n\tif (!result) {\n\t\toffer.id = 0;\n\t\treturn offer;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9ccd920d21b049e22deece60b09b8caaebd0939e1bb4375b62c0c168de11fce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 272, + "startColumn": 18, + "charOffset": 9609, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 270, + "startColumn": 18, + "charOffset": 9457, + "charLength": 6, + "snippet": { + "text": "\toffer.type = static_cast(result->getNumber(\"sale\"));\n\toffer.amount = result->getNumber(\"amount\");\n\toffer.counter = result->getNumber(\"id\") & 0xFFFF;\n\toffer.timestamp = result->getNumber(\"created\");\n\toffer.price = result->getNumber(\"price\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0748007e1af2259bab6f511a3b02ad9910571f3ebbf15e63c1484c86e6bab2c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 272, + "startColumn": 54, + "charOffset": 9645, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 270, + "startColumn": 54, + "charOffset": 9457, + "charLength": 6, + "snippet": { + "text": "\toffer.type = static_cast(result->getNumber(\"sale\"));\n\toffer.amount = result->getNumber(\"amount\");\n\toffer.counter = result->getNumber(\"id\") & 0xFFFF;\n\toffer.timestamp = result->getNumber(\"created\");\n\toffer.price = result->getNumber(\"price\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "349a08bffd65759ed0fa81cbe7ff822b372585df3c2f9eb12377df507555eb54" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 272, + "startColumn": 54, + "charOffset": 9645, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 270, + "startColumn": 54, + "charOffset": 9457, + "charLength": 6, + "snippet": { + "text": "\toffer.type = static_cast(result->getNumber(\"sale\"));\n\toffer.amount = result->getNumber(\"amount\");\n\toffer.counter = result->getNumber(\"id\") & 0xFFFF;\n\toffer.timestamp = result->getNumber(\"created\");\n\toffer.price = result->getNumber(\"price\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6e0fced7cf2821abb3a763e8604548a0baaa86fd34cf4b58cbec241c7230b5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 272, + "startColumn": 54, + "charOffset": 9645, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 270, + "startColumn": 54, + "charOffset": 9457, + "charLength": 6, + "snippet": { + "text": "\toffer.type = static_cast(result->getNumber(\"sale\"));\n\toffer.amount = result->getNumber(\"amount\");\n\toffer.counter = result->getNumber(\"id\") & 0xFFFF;\n\toffer.timestamp = result->getNumber(\"created\");\n\toffer.price = result->getNumber(\"price\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "075d3050909d41bf0969dda64f37d44fce25fc1b86fcfc8f6d048d3d2e2a31aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 289, + "startColumn": 26, + "charOffset": 10621, + "charLength": 12, + "snippet": { + "text": "executeQuery" + } + }, + "contextRegion": { + "startLine": 287, + "startColumn": 26, + "charOffset": 10274, + "charLength": 12, + "snippet": { + "text": "\tstd::ostringstream query;\n\tquery << \"INSERT INTO `market_offers` (`player_id`, `sale`, `itemtype`, `amount`, `created`, `anonymous`, `price`, `tier`) VALUES (\" << playerId << ',' << action << ',' << itemId << ',' << amount << ',' << getTimeNow() << ',' << anonymous << ',' << price << ',' << std::to_string(tier) << ')';\n\tDatabase::getInstance().executeQuery(query.str());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1de55d62635fb2e47fe8c4a9eed967edbfe7c2bac377b5c4b98957cbd8e42ab9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 295, + "startColumn": 26, + "charOffset": 10871, + "charLength": 12, + "snippet": { + "text": "executeQuery" + } + }, + "contextRegion": { + "startLine": 293, + "startColumn": 26, + "charOffset": 10715, + "charLength": 12, + "snippet": { + "text": "\tstd::ostringstream query;\n\tquery << \"UPDATE `market_offers` SET `amount` = `amount` - \" << amount << \" WHERE `id` = \" << offerId;\n\tDatabase::getInstance().executeQuery(query.str());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3b5d7c1dd2e7ea5578dff8e99986c5b69a4683deb611167762da44757a6f3bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 301, + "startColumn": 26, + "charOffset": 11066, + "charLength": 12, + "snippet": { + "text": "executeQuery" + } + }, + "contextRegion": { + "startLine": 299, + "startColumn": 26, + "charOffset": 10948, + "charLength": 12, + "snippet": { + "text": "\tstd::ostringstream query;\n\tquery << \"DELETE FROM `market_offers` WHERE `id` = \" << offerId;\n\tDatabase::getInstance().executeQuery(query.str());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8de4b1ee84f8222912616e1d924a5767cc2d671c65e87fd7f748e8ba96bf0df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 319, + "startColumn": 6, + "charOffset": 12017, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 317, + "startColumn": 6, + "charOffset": 11960, + "charLength": 1, + "snippet": { + "text": "\n\tDBResult_ptr result = db.storeQuery(query.str());\n\tif (!result) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca9aa30da9d00d81245dfe39dc3641c469245822c33ddb1f969e6a21f0afd5e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 351, + "startColumn": 6, + "charOffset": 12894, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 349, + "startColumn": 6, + "charOffset": 12833, + "charLength": 1, + "snippet": { + "text": "\n\tDBResult_ptr result = g_database().storeQuery(query);\n\tif (!result) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88f590cedaa26068ed3c999087a10e9361b28bd228752c6300eaf034af35b92c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 355, + "startColumn": 2, + "charOffset": 12920, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 353, + "startColumn": 2, + "charOffset": 12915, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tdo {\n\t\tMarketStatistics* statistics = nullptr;\n\t\tconst auto tier = getTierFromDatabaseTable(result->getString(\"tier\"));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0778bfd6c14165ad2e6fd72a589381f4142ac0dc93d4684f52e381d9712d61ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 355, + "startColumn": 2, + "charOffset": 12920, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 353, + "startColumn": 2, + "charOffset": 12915, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tdo {\n\t\tMarketStatistics* statistics = nullptr;\n\t\tconst auto tier = getTierFromDatabaseTable(result->getString(\"tier\"));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33f6019a116e731b1e52ea055a881508192440388fd7190b005ff6d933295171" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (do loop) is ID-dependent due to variable reference to 'result' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 369, + "startColumn": 11, + "charOffset": 13546, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 367, + "startColumn": 11, + "charOffset": 13408, + "charLength": 6, + "snippet": { + "text": "\t\tstatistics->totalPrice = result->getNumber(\"sum\");\n\t\tstatistics->highestPrice = result->getNumber(\"max\");\n\t} while (result->next());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e33933dd62bf67cf7ca2d4fe8a8589aad76c9b3b89537bcb9d9af27f697e28cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/iomarket.cpp" + }, + "region": { + "startLine": 369, + "startColumn": 19, + "charOffset": 13554, + "charLength": 4, + "snippet": { + "text": "next" + } + }, + "contextRegion": { + "startLine": 367, + "startColumn": 19, + "charOffset": 13408, + "charLength": 4, + "snippet": { + "text": "\t\tstatistics->totalPrice = result->getNumber(\"sum\");\n\t\tstatistics->highestPrice = result->getNumber(\"max\");\n\t} while (result->next());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d4306ad1e06e08ad815e210e5670393a5c9b620d4fcdf96ecbe6e3ea9617ff9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/appearance/outfit/outfit.cpp" + }, + "region": { + "startLine": 22, + "startColumn": 2, + "charOffset": 614, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 2, + "charOffset": 587, + "charLength": 3, + "snippet": { + "text": "\nbool Outfits::reload() {\n\tfor (auto &outfitsVector : outfits) {\n\t\toutfitsVector.clear();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "998cbf4b438f68ec409d7571d4f5ee41fe7b1362403ff5355b32ff436aaed019" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/appearance/outfit/outfit.cpp" + }, + "region": { + "startLine": 32, + "startColumn": 6, + "charOffset": 925, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 6, + "charOffset": 761, + "charLength": 1, + "snippet": { + "text": "\tauto folder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + \"/XML/outfits.xml\";\n\tpugi::xml_parse_result result = doc.load_file(folder.c_str());\n\tif (!result) {\n\t\tprintXMLError(__FUNCTION__, folder, result);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fab266772a3126fef7e86743e803fef5e8c333f38dd99572f5d1aa9948a3ef67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/appearance/outfit/outfit.cpp" + }, + "region": { + "startLine": 37, + "startColumn": 2, + "charOffset": 1004, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 35, + "startColumn": 2, + "charOffset": 999, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (auto outfitNode : doc.child(\"outfits\").children()) {\n\t\tpugi::xml_attribute attr;\n\t\tif ((attr = outfitNode.attribute(\"enabled\")) && !attr.as_bool()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "568d2d33e1e80089bc722b9daf0d6ea44cd16a6a004b38de1159bd8d837173d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/appearance/outfit/outfit.cpp" + }, + "region": { + "startLine": 39, + "startColumn": 7, + "charOffset": 1096, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 37, + "startColumn": 7, + "charOffset": 1003, + "charLength": 1, + "snippet": { + "text": "\tfor (auto outfitNode : doc.child(\"outfits\").children()) {\n\t\tpugi::xml_attribute attr;\n\t\tif ((attr = outfitNode.attribute(\"enabled\")) && !attr.as_bool()) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d482f633d48675d2e2c3fd0d1ea0889002d8c1f85c8810c98ee08c38b9dd1bfd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/appearance/outfit/outfit.cpp" + }, + "region": { + "startLine": 39, + "startColumn": 7, + "charOffset": 1096, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 37, + "startColumn": 7, + "charOffset": 1003, + "charLength": 1, + "snippet": { + "text": "\tfor (auto outfitNode : doc.child(\"outfits\").children()) {\n\t\tpugi::xml_attribute attr;\n\t\tif ((attr = outfitNode.attribute(\"enabled\")) && !attr.as_bool()) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69b1c4b426e8e87f908d882de51b0a003d95485c42d27aea91c70fbcbe8baa09" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/appearance/outfit/outfit.cpp" + }, + "region": { + "startLine": 39, + "startColumn": 7, + "charOffset": 1096, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 37, + "startColumn": 7, + "charOffset": 1003, + "charLength": 1, + "snippet": { + "text": "\tfor (auto outfitNode : doc.child(\"outfits\").children()) {\n\t\tpugi::xml_attribute attr;\n\t\tif ((attr = outfitNode.attribute(\"enabled\")) && !attr.as_bool()) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e205f6b1d03179da4344107dfe0601f02b4affc9edc67a475c639072ffa873e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/appearance/outfit/outfit.cpp" + }, + "region": { + "startLine": 39, + "startColumn": 13, + "charOffset": 1102, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 37, + "startColumn": 13, + "charOffset": 1003, + "charLength": 1, + "snippet": { + "text": "\tfor (auto outfitNode : doc.child(\"outfits\").children()) {\n\t\tpugi::xml_attribute attr;\n\t\tif ((attr = outfitNode.attribute(\"enabled\")) && !attr.as_bool()) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca46dd2c575848621af103e4afd266eca89abddb07078e6538c0f425a1d84dbf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/appearance/outfit/outfit.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 7, + "charOffset": 1183, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 7, + "charOffset": 1172, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif (!(attr = outfitNode.attribute(\"type\"))) {\n\t\t\tg_logger().warn(\"[Outfits::loadFromXml] - Missing outfit type\");\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0df4239aac4ee4067f637ccea0aa1bbefb652fc1c29e4e5be357e1c3fd26e564" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/appearance/outfit/outfit.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 14, + "charOffset": 1190, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 14, + "charOffset": 1172, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif (!(attr = outfitNode.attribute(\"type\"))) {\n\t\t\tg_logger().warn(\"[Outfits::loadFromXml] - Missing outfit type\");\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "645886196dc1220dfeaf77ba4ab728fc7314f1183968c5171dbc2b6099baa2c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/appearance/outfit/outfit.cpp" + }, + "region": { + "startLine": 55, + "startColumn": 7, + "charOffset": 1569, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 7, + "charOffset": 1486, + "charLength": 1, + "snippet": { + "text": "\n\t\tpugi::xml_attribute lookTypeAttribute = outfitNode.attribute(\"looktype\");\n\t\tif (!lookTypeAttribute) {\n\t\t\tg_logger().warn(\"[Outfits::loadFromXml] - Missing looktype on outfit\");\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32f039d07a64b1d40f0df74f9acf914e0f500cf5817c7c92e5a9cd589466e561" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-prefer-isa-or-dyn-cast-in-conditionals", + "ruleIndex": 585, + "kind": "fail", + "level": "warning", + "message": { + "text": "cast<> in conditional will assert rather than return a null pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/appearance/outfit/outfit.cpp" + }, + "region": { + "startLine": 60, + "startColumn": 23, + "charOffset": 1706, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 23, + "charOffset": 1679, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tif (auto lookType = pugi::cast(lookTypeAttribute.value());\n\t\t g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS, __FUNCTION__) && lookType != 0\n\t\t && !g_game().isLookTypeRegistered(lookType)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c73b139ef6ca37c5efe73a769ac9bc78dc513117a1c388236dafb37861bca5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/appearance/outfit/outfit.cpp" + }, + "region": { + "startLine": 67, + "startColumn": 3, + "charOffset": 2060, + "charLength": 7, + "snippet": { + "text": "outfits" + } + }, + "contextRegion": { + "startLine": 65, + "startColumn": 3, + "charOffset": 2053, + "charLength": 7, + "snippet": { + "text": "\t\t}\n\n\t\toutfits[type].emplace_back(std::make_shared(\n\t\t\toutfitNode.attribute(\"name\").as_string(),\n\t\t\tpugi::cast(lookTypeAttribute.value())," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e765af10071d38d489f36349989af04a26a7d3c875a118583e0c47249f479b72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/appearance/outfit/outfit.cpp" + }, + "region": { + "startLine": 67, + "startColumn": 17, + "charOffset": 2074, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 65, + "startColumn": 17, + "charOffset": 2053, + "charLength": 12, + "snippet": { + "text": "\t\t}\n\n\t\toutfits[type].emplace_back(std::make_shared(\n\t\t\toutfitNode.attribute(\"name\").as_string(),\n\t\t\tpugi::cast(lookTypeAttribute.value())," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a30ac4f66b87c5dff5295721ebeb301752581091b2a1a6d7300c25ce2489a9f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/appearance/outfit/outfit.cpp" + }, + "region": { + "startLine": 75, + "startColumn": 2, + "charOffset": 2361, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 73, + "startColumn": 2, + "charOffset": 2351, + "charLength": 3, + "snippet": { + "text": "\t\t));\n\t}\n\tfor (uint8_t sex = PLAYERSEX_FEMALE; sex <= PLAYERSEX_LAST; ++sex) {\n\t\toutfits[sex].shrink_to_fit();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61b17b427083add8c0f4d43aa7007e63f3473adcc0d078f93cc554ab1fbb10ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/appearance/outfit/outfit.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 3, + "charOffset": 2432, + "charLength": 7, + "snippet": { + "text": "outfits" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 3, + "charOffset": 2357, + "charLength": 7, + "snippet": { + "text": "\t}\n\tfor (uint8_t sex = PLAYERSEX_FEMALE; sex <= PLAYERSEX_LAST; ++sex) {\n\t\toutfits[sex].shrink_to_fit();\n\t}\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b16c495a164f213635879a53f0ba3344e78c6bb0aeebba7d2dce4732bf26874e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/appearance/outfit/outfit.cpp" + }, + "region": { + "startLine": 82, + "startColumn": 6, + "charOffset": 2635, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 6, + "charOffset": 2481, + "charLength": 1, + "snippet": { + "text": "\nstd::shared_ptr Outfits::getOutfitByLookType(const std::shared_ptr &player, uint16_t lookType, bool isOppositeOutfit) const {\n\tif (!player) {\n\t\tg_logger().error(\"[{}] - Player not found\", __FUNCTION__);\n\t\treturn nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55279de42688aab7f4f4b3fd58d536eb021582f6e974c63228360b2e1ec75d46" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/appearance/outfit/outfit.cpp" + }, + "region": { + "startLine": 97, + "startColumn": 33, + "charOffset": 3057, + "charLength": 7, + "snippet": { + "text": "outfits" + } + }, + "contextRegion": { + "startLine": 95, + "startColumn": 33, + "charOffset": 3021, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tauto it = std::ranges::find_if(outfits[sex], [&lookType](const auto &outfit) {\n\t\treturn outfit->lookType == lookType;\n\t});" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6426990065c6f3d39fc3adbcd930550806d219ae65b3fbf62d34a6dbc2281d6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/appearance/outfit/outfit.cpp" + }, + "region": { + "startLine": 101, + "startColumn": 12, + "charOffset": 3161, + "charLength": 7, + "snippet": { + "text": "outfits" + } + }, + "contextRegion": { + "startLine": 99, + "startColumn": 12, + "charOffset": 3144, + "charLength": 7, + "snippet": { + "text": "\t});\n\n\tif (it != outfits[sex].end()) {\n\t\treturn *it;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8eb02fe7be7606ce87a793873d556a93d64fbeb8c4a856ade6a57f6fb4df82d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.hpp" + }, + "region": { + "startLine": 13, + "startColumn": 10, + "charOffset": 429, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 11, + "startColumn": 10, + "charOffset": 384, + "charLength": 30, + "snippet": { + "text": "\n#include \"creatures/npcs/npcs.hpp\"\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"items/tile.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f69d6cfec9be0f6769310fd1d031cff4d88ef48385f012190be0fe563d15e4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.hpp", + "index": 1 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"creatures/monsters/monsters.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e45483e1912ecf8c717a48f913562d9a9cf501f9947625dad361d43acc28406" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.hpp", + "index": 2 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a2b3a997037594f8bab93e08d9b46935593069da5e9def3fec147ea485ffc36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'int64_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 25, + "startColumn": 39, + "charOffset": 749, + "charLength": 15, + "snippet": { + "text": "g_configManager" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 39, + "charOffset": 670, + "charLength": 15, + "snippet": { + "text": "\treloadBonusValue();\n\treloadBonusType();\n\tfreeRerollTimeStamp = OTSYS_TIME() + g_configManager().getNumber(PREY_FREE_REROLL_TIME, __FUNCTION__) * 1000;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2697f7f1def12aa678e97a1afbbbcc68be9d73dad8681436e6d4b2641b86c819" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 25, + "startColumn": 106, + "charOffset": 816, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 106, + "charOffset": 670, + "charLength": 4, + "snippet": { + "text": "\treloadBonusValue();\n\treloadBonusType();\n\tfreeRerollTimeStamp = OTSYS_TIME() + g_configManager().getNumber(PREY_FREE_REROLL_TIME, __FUNCTION__) * 1000;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9121f16921783393269b063b77a24215de136f725ea6421af9c3674b9acbdad1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 29, + "startColumn": 21, + "charOffset": 880, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 27, + "startColumn": 21, + "charOffset": 824, + "charLength": 2, + "snippet": { + "text": "\nvoid PreySlot::reloadBonusType() {\n\tif (bonusRarity == 10) {\n\t\tPreyBonus_t bonus_tmp = bonus;\n\t\twhile (bonus_tmp == bonus) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2052e0d3924d5871295218074ee885fb38cacd8a3b7f6af5ba095884175c1ae4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 31, + "startColumn": 3, + "charOffset": 921, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 29, + "startColumn": 3, + "charOffset": 860, + "charLength": 5, + "snippet": { + "text": "\tif (bonusRarity == 10) {\n\t\tPreyBonus_t bonus_tmp = bonus;\n\t\twhile (bonus_tmp == bonus) {\n\t\t\tbonus = static_cast(uniform_random(PreyBonus_First, PreyBonus_Last));\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e1dcd5f672b5c2137849d9f4e6deca923eb9b1c4b50d84636ed7f17ee1182e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'bonus_tmp' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 31, + "startColumn": 10, + "charOffset": 928, + "charLength": 9, + "snippet": { + "text": "bonus_tmp" + } + }, + "contextRegion": { + "startLine": 29, + "startColumn": 10, + "charOffset": 860, + "charLength": 9, + "snippet": { + "text": "\tif (bonusRarity == 10) {\n\t\tPreyBonus_t bonus_tmp = bonus;\n\t\twhile (bonus_tmp == bonus) {\n\t\t\tbonus = static_cast(uniform_random(PreyBonus_First, PreyBonus_Last));\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b4096c81d978b2e171f3ff889a762f208cc61610033308e2baad52f5df1df99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 41, + "startColumn": 21, + "charOffset": 1197, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 21, + "charOffset": 1140, + "charLength": 1, + "snippet": { + "text": "\nvoid PreySlot::reloadBonusValue() {\n\tif (bonusRarity >= 9) {\n\t\tbonusRarity = 10;\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ae7856e36990e803ef5a8151369513bcfe9b14465173e7ec9857739590e67af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 42, + "startColumn": 17, + "charOffset": 1218, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 17, + "charOffset": 1141, + "charLength": 2, + "snippet": { + "text": "void PreySlot::reloadBonusValue() {\n\tif (bonusRarity >= 9) {\n\t\tbonusRarity = 10;\n\t} else {\n\t\t// Every time you roll it will increase the rarity (star)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef763da6c03d9b184f457699efe60fc106d9cf90f41d58b5224fbd201bb0d584" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 45, + "startColumn": 70, + "charOffset": 1361, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 70, + "charOffset": 1222, + "charLength": 2, + "snippet": { + "text": "\t} else {\n\t\t// Every time you roll it will increase the rarity (star)\n\t\tbonusRarity = static_cast(uniform_random(bonusRarity + 1, 10));\n\t}\n\tif (bonus == PreyBonus_Damage) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ca1d49ecf59e1738444091acbbe42c4a32122632a8d938f92e504559bed234c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 48, + "startColumn": 21, + "charOffset": 1424, + "charLength": 1, + "snippet": { + "text": "2" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 21, + "charOffset": 1367, + "charLength": 1, + "snippet": { + "text": "\t}\n\tif (bonus == PreyBonus_Damage) {\n\t\tbonusPercentage = 2 * bonusRarity + 5;\n\t} else if (bonus == PreyBonus_Defense) {\n\t\tbonusPercentage = 2 * bonusRarity + 10;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7173b0a609c3e8e90c9efabf930b0fd9bdc79214dd710691cff6c3f7febc6c59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 48, + "startColumn": 39, + "charOffset": 1442, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 39, + "charOffset": 1367, + "charLength": 1, + "snippet": { + "text": "\t}\n\tif (bonus == PreyBonus_Damage) {\n\t\tbonusPercentage = 2 * bonusRarity + 5;\n\t} else if (bonus == PreyBonus_Defense) {\n\t\tbonusPercentage = 2 * bonusRarity + 10;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29a44ba9ad25beb265a73c3d5dca5a1c794cd41b01864cd8ac9d431141791526" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 50, + "startColumn": 21, + "charOffset": 1507, + "charLength": 1, + "snippet": { + "text": "2" + } + }, + "contextRegion": { + "startLine": 48, + "startColumn": 21, + "charOffset": 1404, + "charLength": 1, + "snippet": { + "text": "\t\tbonusPercentage = 2 * bonusRarity + 5;\n\t} else if (bonus == PreyBonus_Defense) {\n\t\tbonusPercentage = 2 * bonusRarity + 10;\n\t} else {\n\t\tbonusPercentage = 3 * bonusRarity + 10;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e27c5eea7d330f334a0fa20814cd4cee6b3df4aa6b3551dab7616a2fe0e3b485" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 50, + "startColumn": 39, + "charOffset": 1525, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 48, + "startColumn": 39, + "charOffset": 1404, + "charLength": 2, + "snippet": { + "text": "\t\tbonusPercentage = 2 * bonusRarity + 5;\n\t} else if (bonus == PreyBonus_Defense) {\n\t\tbonusPercentage = 2 * bonusRarity + 10;\n\t} else {\n\t\tbonusPercentage = 3 * bonusRarity + 10;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08a0f8b6942db33ba6c8752a6841f0f136b8ddd77dd911317545a275370c8ca1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 52, + "startColumn": 21, + "charOffset": 1559, + "charLength": 1, + "snippet": { + "text": "3" + } + }, + "contextRegion": { + "startLine": 50, + "startColumn": 21, + "charOffset": 1487, + "charLength": 1, + "snippet": { + "text": "\t\tbonusPercentage = 2 * bonusRarity + 10;\n\t} else {\n\t\tbonusPercentage = 3 * bonusRarity + 10;\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0eac03ad859cb36a02bd6ba9c99677e2c675d01a5a0db62ef9e94823feee5e27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 52, + "startColumn": 39, + "charOffset": 1577, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 50, + "startColumn": 39, + "charOffset": 1487, + "charLength": 2, + "snippet": { + "text": "\t\tbonusPercentage = 2 * bonusRarity + 10;\n\t} else {\n\t\tbonusPercentage = 3 * bonusRarity + 10;\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "932699b54eb1de0c40f5d6574b4e6a2baf14f17bede1cf467e6deb165ceb2308" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "36 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 67, + "startColumn": 24, + "charOffset": 2088, + "charLength": 2, + "snippet": { + "text": "36" + } + }, + "contextRegion": { + "startLine": 65, + "startColumn": 24, + "charOffset": 1945, + "charLength": 2, + "snippet": { + "text": "\t// - Stress the server with unnecessary loops.\n\tstd::map bestiary = g_game().getBestiaryList();\n\tif (bestiary.size() < 36) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "abdf52f8495756867601adb2eef1e6425f3af99863c98722018efd6d9eaaa2e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'stageOne' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 71, + "startColumn": 10, + "charOffset": 2117, + "charLength": 8, + "snippet": { + "text": "stageOne" + } + }, + "contextRegion": { + "startLine": 69, + "startColumn": 10, + "charOffset": 2104, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tuint8_t stageOne;\n\tuint8_t stageTwo;\n\tuint8_t stageThree;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a2061cf6f1d35f7098355cfc666430dacbeab4de21e7f8a9d12e8fb4042bf60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'stageTwo' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 72, + "startColumn": 10, + "charOffset": 2136, + "charLength": 8, + "snippet": { + "text": "stageTwo" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 10, + "charOffset": 2107, + "charLength": 8, + "snippet": { + "text": "\n\tuint8_t stageOne;\n\tuint8_t stageTwo;\n\tuint8_t stageThree;\n\tuint8_t stageFour;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "173ea708e40c3b3b9864e73a7e50de978d9b0964228819bbfcf34f1f3875d331" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'stageThree' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 73, + "startColumn": 10, + "charOffset": 2155, + "charLength": 10, + "snippet": { + "text": "stageThree" + } + }, + "contextRegion": { + "startLine": 71, + "startColumn": 10, + "charOffset": 2108, + "charLength": 10, + "snippet": { + "text": "\tuint8_t stageOne;\n\tuint8_t stageTwo;\n\tuint8_t stageThree;\n\tuint8_t stageFour;\n\tif (auto levelStage = static_cast(std::floor(level / 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1a54921c8af5279270be3e4b4b1108c97f31331ca3dfb61741ba8b96063ffac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'stageFour' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 74, + "startColumn": 10, + "charOffset": 2176, + "charLength": 9, + "snippet": { + "text": "stageFour" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 10, + "charOffset": 2127, + "charLength": 9, + "snippet": { + "text": "\tuint8_t stageTwo;\n\tuint8_t stageThree;\n\tuint8_t stageFour;\n\tif (auto levelStage = static_cast(std::floor(level / 100));\n\t levelStage == 0) { // From level 0 to 99" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f00a1b517860526ee3c7e1aa608585cef6affa6fd3009e9b9d81595e92280b14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 75, + "startColumn": 65, + "charOffset": 2251, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 73, + "startColumn": 65, + "charOffset": 2146, + "charLength": 3, + "snippet": { + "text": "\tuint8_t stageThree;\n\tuint8_t stageFour;\n\tif (auto levelStage = static_cast(std::floor(level / 100));\n\t levelStage == 0) { // From level 0 to 99\n\t\tstageOne = 3;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e602a82618590d89421e1d5daa8ec8abe44860e48362dd27ed46ed741fb9970e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 100, + "startColumn": 2, + "charOffset": 2804, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 98, + "startColumn": 2, + "charOffset": 2723, + "charLength": 5, + "snippet": { + "text": "\tuint8_t tries = 0;\n\tauto maxIndex = static_cast(bestiary.size() - 1);\n\twhile (raceIdList.size() < 9) {\n\t\tuint16_t raceId = (*(std::next(bestiary.begin(), uniform_random(0, maxIndex)))).first;\n\t\ttries++;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c857e8407a6b8644fbe84022126466a690298d0ce476c0f7092089c2cf20729" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 100, + "startColumn": 29, + "charOffset": 2831, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 98, + "startColumn": 29, + "charOffset": 2723, + "charLength": 1, + "snippet": { + "text": "\tuint8_t tries = 0;\n\tauto maxIndex = static_cast(bestiary.size() - 1);\n\twhile (raceIdList.size() < 9) {\n\t\tuint16_t raceId = (*(std::next(bestiary.begin(), uniform_random(0, maxIndex)))).first;\n\t\ttries++;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "936ebbc1473499019f9bd73ba504219a2276c3df7b9e4e0d610f59de610a54d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 110, + "startColumn": 3, + "charOffset": 3123, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 108, + "startColumn": 3, + "charOffset": 3024, + "charLength": 2, + "snippet": { + "text": "\t\tblackList.push_back(raceId);\n\t\tconst auto mtype = g_monsters().getMonsterTypeByRaceId(raceId);\n\t\tif (!mtype || mtype->info.experience == 0) {\n\t\t\tcontinue;\n\t\t} else if (stageOne != 0 && mtype->info.bestiaryStars <= 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "baf2933770dd43322d8d0d18debc38437d7c1d43041470b462fe04fc47105192" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 110, + "startColumn": 7, + "charOffset": 3127, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 108, + "startColumn": 7, + "charOffset": 3024, + "charLength": 1, + "snippet": { + "text": "\t\tblackList.push_back(raceId);\n\t\tconst auto mtype = g_monsters().getMonsterTypeByRaceId(raceId);\n\t\tif (!mtype || mtype->info.experience == 0) {\n\t\t\tcontinue;\n\t\t} else if (stageOne != 0 && mtype->info.bestiaryStars <= 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71a56c04d1c37732abee3951e9b923f83cd4ae189cfa70efba0d74e820c3d309" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'continue'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 112, + "startColumn": 5, + "charOffset": 3185, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 110, + "startColumn": 5, + "charOffset": 3121, + "charLength": 4, + "snippet": { + "text": "\t\tif (!mtype || mtype->info.experience == 0) {\n\t\t\tcontinue;\n\t\t} else if (stageOne != 0 && mtype->info.bestiaryStars <= 1) {\n\t\t\traceIdList.push_back(raceId);\n\t\t\t--stageOne;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a386c5930866b1c8fedc93a3ab8b3adc586001c910f83e45645df677b39c0141" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 124, + "startColumn": 23, + "charOffset": 3657, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 122, + "startColumn": 23, + "charOffset": 3586, + "charLength": 2, + "snippet": { + "text": "\t\t\traceIdList.push_back(raceId);\n\t\t\t--stageFour;\n\t\t} else if (tries >= 10) {\n\t\t\traceIdList.push_back(raceId);\n\t\t\ttries = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f155258a15e2cfa8f1a16b9555ac7df2c84a054d88f04dd829d0c8e33d471e88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'int64_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 134, + "startColumn": 39, + "charOffset": 3840, + "charLength": 15, + "snippet": { + "text": "g_configManager" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 39, + "charOffset": 3742, + "charLength": 15, + "snippet": { + "text": "TaskHuntingSlot::TaskHuntingSlot(PreySlot_t id) :\n\tid(id) {\n\tfreeRerollTimeStamp = OTSYS_TIME() + g_configManager().getNumber(TASK_HUNTING_FREE_REROLL_TIME, __FUNCTION__) * 1000;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "caea3fc9e74835a14d8829211ff1c3a0c7d7df80fb10d1f5ccd2cd1a65ade64c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 134, + "startColumn": 114, + "charOffset": 3915, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 114, + "charOffset": 3742, + "charLength": 4, + "snippet": { + "text": "TaskHuntingSlot::TaskHuntingSlot(PreySlot_t id) :\n\tid(id) {\n\tfreeRerollTimeStamp = OTSYS_TIME() + g_configManager().getNumber(TASK_HUNTING_FREE_REROLL_TIME, __FUNCTION__) * 1000;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a815644d7ee22622134b8b34cac57825edbf66d02c282a55ee8e8af99a000f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "36 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 148, + "startColumn": 24, + "charOffset": 4448, + "charLength": 2, + "snippet": { + "text": "36" + } + }, + "contextRegion": { + "startLine": 146, + "startColumn": 24, + "charOffset": 4305, + "charLength": 2, + "snippet": { + "text": "\t// - Stress the server with unnecessary loops.\n\tstd::map bestiary = g_game().getBestiaryList();\n\tif (bestiary.size() < 36) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eaa280832088cc2bf9a50b2a55cc836e6689a9e152d2982300df1c0037972d71" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'stageOne' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 152, + "startColumn": 10, + "charOffset": 4477, + "charLength": 8, + "snippet": { + "text": "stageOne" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 10, + "charOffset": 4464, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tuint8_t stageOne;\n\tuint8_t stageTwo;\n\tuint8_t stageThree;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a15de2aed792b415ef60a03553f30ea6577a489abf2e78901aa2e7cd2f528a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'stageTwo' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 153, + "startColumn": 10, + "charOffset": 4496, + "charLength": 8, + "snippet": { + "text": "stageTwo" + } + }, + "contextRegion": { + "startLine": 151, + "startColumn": 10, + "charOffset": 4467, + "charLength": 8, + "snippet": { + "text": "\n\tuint8_t stageOne;\n\tuint8_t stageTwo;\n\tuint8_t stageThree;\n\tuint8_t stageFour;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f70395bc61570102826bbf326e3e932eaa5ce5527bef5276680ca021b9aba46" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'stageThree' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 154, + "startColumn": 10, + "charOffset": 4515, + "charLength": 10, + "snippet": { + "text": "stageThree" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 10, + "charOffset": 4468, + "charLength": 10, + "snippet": { + "text": "\tuint8_t stageOne;\n\tuint8_t stageTwo;\n\tuint8_t stageThree;\n\tuint8_t stageFour;\n\tif (auto levelStage = static_cast(std::floor(level / 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c76ad7a4eb5cf30ee50f0647104300798fdedfe43dc84d10444676e8f8b6e442" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'stageFour' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 155, + "startColumn": 10, + "charOffset": 4536, + "charLength": 9, + "snippet": { + "text": "stageFour" + } + }, + "contextRegion": { + "startLine": 153, + "startColumn": 10, + "charOffset": 4487, + "charLength": 9, + "snippet": { + "text": "\tuint8_t stageTwo;\n\tuint8_t stageThree;\n\tuint8_t stageFour;\n\tif (auto levelStage = static_cast(std::floor(level / 100));\n\t levelStage == 0) { // From level 0 to 99" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0eceb979483b9716275f303d213c9bfde2e1d7eea96e3bbcda220a873593abc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 156, + "startColumn": 65, + "charOffset": 4611, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 154, + "startColumn": 65, + "charOffset": 4506, + "charLength": 3, + "snippet": { + "text": "\tuint8_t stageThree;\n\tuint8_t stageFour;\n\tif (auto levelStage = static_cast(std::floor(level / 100));\n\t levelStage == 0) { // From level 0 to 99\n\t\tstageOne = 3;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "393c55324f9cf1736b83abedb8f052dcce9a009e6369d5e4b7777c4c4f7a9211" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 181, + "startColumn": 2, + "charOffset": 5164, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 179, + "startColumn": 2, + "charOffset": 5083, + "charLength": 5, + "snippet": { + "text": "\tuint8_t tries = 0;\n\tauto maxIndex = static_cast(bestiary.size() - 1);\n\twhile (raceIdList.size() < 9) {\n\t\tuint16_t raceId = (*(std::next(bestiary.begin(), uniform_random(0, maxIndex)))).first;\n\t\ttries++;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb8404098958e7c58c836aebb64ac0c87f6fcd89026a205da07448999ef81979" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 181, + "startColumn": 29, + "charOffset": 5191, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 179, + "startColumn": 29, + "charOffset": 5083, + "charLength": 1, + "snippet": { + "text": "\tuint8_t tries = 0;\n\tauto maxIndex = static_cast(bestiary.size() - 1);\n\twhile (raceIdList.size() < 9) {\n\t\tuint16_t raceId = (*(std::next(bestiary.begin(), uniform_random(0, maxIndex)))).first;\n\t\ttries++;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84e9681c2a4a10fbdf0a7beca97553acf701938f335560c36c9eaba5aa1effdb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 191, + "startColumn": 3, + "charOffset": 5483, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 189, + "startColumn": 3, + "charOffset": 5384, + "charLength": 2, + "snippet": { + "text": "\t\tblackList.push_back(raceId);\n\t\tconst auto mtype = g_monsters().getMonsterTypeByRaceId(raceId);\n\t\tif (!mtype || mtype->info.experience == 0) {\n\t\t\tcontinue;\n\t\t} else if (stageOne != 0 && mtype->info.bestiaryStars <= 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27c8f5dbd03006094b3b7bcd3f434d0c3af7815fb0286bff2a5d982a00f9815f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 191, + "startColumn": 7, + "charOffset": 5487, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 189, + "startColumn": 7, + "charOffset": 5384, + "charLength": 1, + "snippet": { + "text": "\t\tblackList.push_back(raceId);\n\t\tconst auto mtype = g_monsters().getMonsterTypeByRaceId(raceId);\n\t\tif (!mtype || mtype->info.experience == 0) {\n\t\t\tcontinue;\n\t\t} else if (stageOne != 0 && mtype->info.bestiaryStars <= 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90bece0b411a01006235a648513547592a3c92b5db891fcb2565132101a1ba6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'continue'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 193, + "startColumn": 5, + "charOffset": 5545, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 191, + "startColumn": 5, + "charOffset": 5481, + "charLength": 4, + "snippet": { + "text": "\t\tif (!mtype || mtype->info.experience == 0) {\n\t\t\tcontinue;\n\t\t} else if (stageOne != 0 && mtype->info.bestiaryStars <= 1) {\n\t\t\traceIdList.push_back(raceId);\n\t\t\t--stageOne;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "687346978a4a5b9d1e7b85eba5f2e0fab43c54e87dd40992c3e9b7482d5141ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 205, + "startColumn": 23, + "charOffset": 6017, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 203, + "startColumn": 23, + "charOffset": 5946, + "charLength": 2, + "snippet": { + "text": "\t\t\traceIdList.push_back(raceId);\n\t\t\t--stageFour;\n\t\t} else if (tries >= 10) {\n\t\t\traceIdList.push_back(raceId);\n\t\t\ttries = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d670f6aa1a1519caa4f2401b28eddd0ad1307933c1de21ab53722fd08f63bae3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 218, + "startColumn": 12, + "charOffset": 6238, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 216, + "startColumn": 12, + "charOffset": 6206, + "charLength": 1, + "snippet": { + "text": "\n\tif (rarity >= 4) {\n\t\trarity = 5;\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bdc8b67e68ade7eb5e79eb7eaf3dfa18fa17e7d82d97b3cc44e3fd8d1c622cd6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'chance' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 222, + "startColumn": 10, + "charOffset": 6264, + "charLength": 6, + "snippet": { + "text": "chance" + } + }, + "contextRegion": { + "startLine": 220, + "startColumn": 10, + "charOffset": 6251, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tint32_t chance;\n\tif (rarity == 0) {\n\t\tchance = uniform_random(0, 100);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c75f3c62d3b10b1f5c51f700fd474b0db1fff1c0c0d4e38860aac9876365d221" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 224, + "startColumn": 30, + "charOffset": 6321, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 222, + "startColumn": 30, + "charOffset": 6255, + "charLength": 3, + "snippet": { + "text": "\tint32_t chance;\n\tif (rarity == 0) {\n\t\tchance = uniform_random(0, 100);\n\t} else if (rarity == 1) {\n\t\tchance = uniform_random(0, 70);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea4cdeed843d43437dcfb780aa7986dd0c430d8bde1bd997f0a27895faba2810" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "70 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 226, + "startColumn": 30, + "charOffset": 6383, + "charLength": 2, + "snippet": { + "text": "70" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 30, + "charOffset": 6292, + "charLength": 2, + "snippet": { + "text": "\t\tchance = uniform_random(0, 100);\n\t} else if (rarity == 1) {\n\t\tchance = uniform_random(0, 70);\n\t} else if (rarity == 2) {\n\t\tchance = uniform_random(0, 45);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52badd170d14566655df4013f6c912ce0ae88fb4f224179f503d3e274ca5fa26" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "45 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 228, + "startColumn": 30, + "charOffset": 6444, + "charLength": 2, + "snippet": { + "text": "45" + } + }, + "contextRegion": { + "startLine": 226, + "startColumn": 30, + "charOffset": 6354, + "charLength": 2, + "snippet": { + "text": "\t\tchance = uniform_random(0, 70);\n\t} else if (rarity == 2) {\n\t\tchance = uniform_random(0, 45);\n\t} else if (rarity == 3) {\n\t\tchance = uniform_random(0, 20);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9cdb5899da1e22edd84b3c45862c1cff0c4b1d21e879c52ea173f01519bb621" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 230, + "startColumn": 30, + "charOffset": 6505, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 228, + "startColumn": 30, + "charOffset": 6415, + "charLength": 2, + "snippet": { + "text": "\t\tchance = uniform_random(0, 45);\n\t} else if (rarity == 3) {\n\t\tchance = uniform_random(0, 20);\n\t} else {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c64e4e3da80704ea06b79b68d77ed87207d3bc6340da5e7fd56556c8416affe1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 235, + "startColumn": 16, + "charOffset": 6549, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 233, + "startColumn": 16, + "charOffset": 6530, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (chance <= 5) {\n\t\trarity = 5;\n\t} else if (chance <= 20) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5826672958404b9a3b577acbc438503ec86081171ae966fca8a7c8d61144929a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 236, + "startColumn": 12, + "charOffset": 6565, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 234, + "startColumn": 12, + "charOffset": 6533, + "charLength": 1, + "snippet": { + "text": "\n\tif (chance <= 5) {\n\t\trarity = 5;\n\t} else if (chance <= 20) {\n\t\trarity = 4;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7237900da8f5f0589ce03cde1a2e68ab3e59e6337c7e1265638eda7847de8f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 237, + "startColumn": 23, + "charOffset": 6590, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 235, + "startColumn": 23, + "charOffset": 6534, + "charLength": 2, + "snippet": { + "text": "\tif (chance <= 5) {\n\t\trarity = 5;\n\t} else if (chance <= 20) {\n\t\trarity = 4;\n\t} else if (chance <= 45) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e798b9306e32950576add18e3b06bca62b1b16e8c95105b577ba26ceb24776c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "45 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 239, + "startColumn": 23, + "charOffset": 6632, + "charLength": 2, + "snippet": { + "text": "45" + } + }, + "contextRegion": { + "startLine": 237, + "startColumn": 23, + "charOffset": 6568, + "charLength": 2, + "snippet": { + "text": "\t} else if (chance <= 20) {\n\t\trarity = 4;\n\t} else if (chance <= 45) {\n\t\trarity = 3;\n\t} else if (chance <= 70) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35bc2a9681608af10df8fe9a7aa8af75025125868bdc7b28488d76b30b764f44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "70 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 241, + "startColumn": 23, + "charOffset": 6674, + "charLength": 2, + "snippet": { + "text": "70" + } + }, + "contextRegion": { + "startLine": 239, + "startColumn": 23, + "charOffset": 6610, + "charLength": 2, + "snippet": { + "text": "\t} else if (chance <= 45) {\n\t\trarity = 3;\n\t} else if (chance <= 70) {\n\t\trarity = 2;\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ec9d5a5c064c78aa7cd6a59b2e78239bbdf59b78f37fb6f64d898ca5d2fcd96" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'checkPlayerPreys' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 249, + "startColumn": 14, + "charOffset": 6771, + "charLength": 16, + "snippet": { + "text": "checkPlayerPreys" + } + }, + "contextRegion": { + "startLine": 247, + "startColumn": 14, + "charOffset": 6723, + "charLength": 16, + "snippet": { + "text": "\n// Prey/Task hunting global class\nvoid IOPrey::checkPlayerPreys(std::shared_ptr player, uint8_t amount) const {\n\tif (!player) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37623a732ba14dad0c6be0097fa0cbe6e619863ff794ab47ce8eec1c3259e007" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 249, + "startColumn": 55, + "charOffset": 6812, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 247, + "startColumn": 55, + "charOffset": 6723, + "charLength": 6, + "snippet": { + "text": "\n// Prey/Task hunting global class\nvoid IOPrey::checkPlayerPreys(std::shared_ptr player, uint8_t amount) const {\n\tif (!player) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6302fbb0ee5c62993c2bf13091b146c170d7fa477b6430e54885278f4cd0aaf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 250, + "startColumn": 6, + "charOffset": 6849, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 248, + "startColumn": 6, + "charOffset": 6724, + "charLength": 1, + "snippet": { + "text": "// Prey/Task hunting global class\nvoid IOPrey::checkPlayerPreys(std::shared_ptr player, uint8_t amount) const {\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87b5edc6a1debfffdb635a5a22e9940cf9077bff57b9783f1005b57a6e133232" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 254, + "startColumn": 2, + "charOffset": 6875, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 2, + "charOffset": 6870, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (uint8_t slotId = PreySlot_First; slotId <= PreySlot_Last; slotId++) {\n\t\tif (const auto &slot = player->getPreySlotById(static_cast(slotId));\n\t\t slot && slot->isOccupied()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6243639bffd95b4484bb4f52c1905696f246d57b05a9b5e2bc78f8fc2d7080cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'parsePreyAction' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 293, + "startColumn": 14, + "charOffset": 8771, + "charLength": 15, + "snippet": { + "text": "parsePreyAction" + } + }, + "contextRegion": { + "startLine": 291, + "startColumn": 14, + "charOffset": 8755, + "charLength": 15, + "snippet": { + "text": "}\n\nvoid IOPrey::parsePreyAction(std::shared_ptr player, PreySlot_t slotId, PreyAction_t action, PreyOption_t option, int8_t index, uint16_t raceId) const {\n\tconst auto &slot = player->getPreySlotById(slotId);\n\tif (!slot || slot->state == PreyDataState_Locked) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7a00f42cef1624c94bf5506bc4a471a0d920ff1d4dd9669533fc74a1a2baf82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'parsePreyAction' has cognitive complexity of 40 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 293, + "startColumn": 14, + "charOffset": 8771, + "charLength": 15, + "snippet": { + "text": "parsePreyAction" + } + }, + "contextRegion": { + "startLine": 291, + "startColumn": 14, + "charOffset": 8755, + "charLength": 15, + "snippet": { + "text": "}\n\nvoid IOPrey::parsePreyAction(std::shared_ptr player, PreySlot_t slotId, PreyAction_t action, PreyOption_t option, int8_t index, uint16_t raceId) const {\n\tconst auto &slot = player->getPreySlotById(slotId);\n\tif (!slot || slot->state == PreyDataState_Locked) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d63e7324e9628fb60b779e9cbb95e4861e3b8e1bc5a7db6cf2c78f2e0ffb4d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 293, + "startColumn": 54, + "charOffset": 8811, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 291, + "startColumn": 54, + "charOffset": 8755, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOPrey::parsePreyAction(std::shared_ptr player, PreySlot_t slotId, PreyAction_t action, PreyOption_t option, int8_t index, uint16_t raceId) const {\n\tconst auto &slot = player->getPreySlotById(slotId);\n\tif (!slot || slot->state == PreyDataState_Locked) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64971efb1e7d6c655b2b56b9dfa2115898b8090ec5e01126e4ad466bb386ff2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'parsePreyAction' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 293, + "startColumn": 123, + "charOffset": 8880, + "charLength": 6, + "snippet": { + "text": "int8_t" + } + }, + "contextRegion": { + "startLine": 291, + "startColumn": 123, + "charOffset": 8755, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOPrey::parsePreyAction(std::shared_ptr player, PreySlot_t slotId, PreyAction_t action, PreyOption_t option, int8_t index, uint16_t raceId) const {\n\tconst auto &slot = player->getPreySlotById(slotId);\n\tif (!slot || slot->state == PreyDataState_Locked) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c22086f1a202462bd234223940c64b820816a542cd897e34ad62d119339e772" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 295, + "startColumn": 6, + "charOffset": 8977, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 293, + "startColumn": 6, + "charOffset": 8758, + "charLength": 1, + "snippet": { + "text": "void IOPrey::parsePreyAction(std::shared_ptr player, PreySlot_t slotId, PreyAction_t action, PreyOption_t option, int8_t index, uint16_t raceId) const {\n\tconst auto &slot = player->getPreySlotById(slotId);\n\tif (!slot || slot->state == PreyDataState_Locked) {\n\t\tplayer->sendMessageDialog(\"To unlock this prey slot first you must buy it on store.\");\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e10310ccfc3baceac17cd65bc41533db1e4e767586776fd344def233e15c0c47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 304, + "startColumn": 5, + "charOffset": 9392, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 302, + "startColumn": 5, + "charOffset": 9290, + "charLength": 4, + "snippet": { + "text": "\t\t\tplayer->sendMessageDialog(\"You don't have enought money to reroll the prey slot.\");\n\t\t\treturn;\n\t\t} else if (slot->freeRerollTimeStamp <= OTSYS_TIME()) {\n\t\t\tslot->freeRerollTimeStamp = OTSYS_TIME() + g_configManager().getNumber(PREY_FREE_REROLL_TIME, __FUNCTION__) * 1000;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce96722040e0874d75d4a05fb9e1361beda8b4aafe78e747d4e09e9de9943dd3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'int64_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 305, + "startColumn": 47, + "charOffset": 9492, + "charLength": 15, + "snippet": { + "text": "g_configManager" + } + }, + "contextRegion": { + "startLine": 303, + "startColumn": 47, + "charOffset": 9377, + "charLength": 15, + "snippet": { + "text": "\t\t\treturn;\n\t\t} else if (slot->freeRerollTimeStamp <= OTSYS_TIME()) {\n\t\t\tslot->freeRerollTimeStamp = OTSYS_TIME() + g_configManager().getNumber(PREY_FREE_REROLL_TIME, __FUNCTION__) * 1000;\n\t\t} else {\n\t\t\tg_metrics().addCounter(\"balance_decrease\", player->getPreyRerollPrice(), { { \"player\", player->getName() }, { \"context\", \"prey_reroll\" } });" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "806954af04390d1cb7452d07eee55ec52cd553b038e27a9b5891bf3eea5373de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 305, + "startColumn": 114, + "charOffset": 9559, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 303, + "startColumn": 114, + "charOffset": 9377, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn;\n\t\t} else if (slot->freeRerollTimeStamp <= OTSYS_TIME()) {\n\t\t\tslot->freeRerollTimeStamp = OTSYS_TIME() + g_configManager().getNumber(PREY_FREE_REROLL_TIME, __FUNCTION__) * 1000;\n\t\t} else {\n\t\t\tg_metrics().addCounter(\"balance_decrease\", player->getPreyRerollPrice(), { { \"player\", player->getName() }, { \"context\", \"prey_reroll\" } });" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a606907c553a7e1e49afb2fe244da0b28d8790dbc8cbdd380f8834cc111b52a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 307, + "startColumn": 47, + "charOffset": 9622, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 305, + "startColumn": 47, + "charOffset": 9446, + "charLength": 6, + "snippet": { + "text": "\t\t\tslot->freeRerollTimeStamp = OTSYS_TIME() + g_configManager().getNumber(PREY_FREE_REROLL_TIME, __FUNCTION__) * 1000;\n\t\t} else {\n\t\t\tg_metrics().addCounter(\"balance_decrease\", player->getPreyRerollPrice(), { { \"player\", player->getName() }, { \"context\", \"prey_reroll\" } });\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "233dd6dbe4fb90b3733025ec9d0167d8e40262a69853b9c1d78f9f1f56cfdc06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 325, + "startColumn": 3, + "charOffset": 10371, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 323, + "startColumn": 3, + "charOffset": 10270, + "charLength": 2, + "snippet": { + "text": "\t\tslot->state = PreyDataState_ListSelection;\n\t} else if (action == PreyAction_ListAll_Selection) {\n\t\tif (slot->isOccupied()) {\n\t\t\tplayer->sendMessageDialog(\"You already have an active monster on this prey slot.\");\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae4a4115622616f532e6a7e57fcf5a3b4802db111706452115c7a6929744a6f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 328, + "startColumn": 5, + "charOffset": 10499, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 326, + "startColumn": 5, + "charOffset": 10397, + "charLength": 4, + "snippet": { + "text": "\t\t\tplayer->sendMessageDialog(\"You already have an active monster on this prey slot.\");\n\t\t\treturn;\n\t\t} else if (!slot->canSelect() || slot->state != PreyDataState_ListSelection) {\n\t\t\tplayer->sendMessageDialog(\"There was an error while processing your action. Please try reopening the prey window.\");\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6440acdb55d044b80dbac2fb0b69c482033b6cd0c1a6b4f80ce906c84967e1ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 346, + "startColumn": 3, + "charOffset": 11222, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 344, + "startColumn": 3, + "charOffset": 11065, + "charLength": 2, + "snippet": { + "text": "\t\tslot->bonusTimeLeft = static_cast(g_configManager().getNumber(PREY_BONUS_TIME, __FUNCTION__));\n\t} else if (action == PreyAction_BonusReroll) {\n\t\tif (!slot->isOccupied()) {\n\t\t\tplayer->sendMessageDialog(\"You don't have any active monster on this prey slot.\");\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89d27ee7ff7d6148d59afa44369e5a0d747203113f7644c3474225ed08fbca91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 349, + "startColumn": 5, + "charOffset": 11350, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 347, + "startColumn": 5, + "charOffset": 11249, + "charLength": 4, + "snippet": { + "text": "\t\t\tplayer->sendMessageDialog(\"You don't have any active monster on this prey slot.\");\n\t\t\treturn;\n\t\t} else if (!player->usePreyCards(static_cast(g_configManager().getNumber(PREY_BONUS_REROLL_PRICE, __FUNCTION__)))) {\n\t\t\tplayer->sendMessageDialog(\"You don't have enought prey cards to reroll this prey slot bonus type.\");\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ac6f4086c6c5e049fbed08dcb0fab4b75ad983c10ed63b96abec004a1216412" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 358, + "startColumn": 3, + "charOffset": 11812, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 356, + "startColumn": 3, + "charOffset": 11650, + "charLength": 2, + "snippet": { + "text": "\t\tslot->bonusTimeLeft = static_cast(g_configManager().getNumber(PREY_BONUS_TIME, __FUNCTION__));\n\t} else if (action == PreyAction_MonsterSelection) {\n\t\tif (slot->isOccupied()) {\n\t\t\tplayer->sendMessageDialog(\"You already have an active monster on this prey slot.\");\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d999466b63ea07ba27f37219f7bec4b7069cd1f88d3afa86424449b2de920912" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 361, + "startColumn": 5, + "charOffset": 11940, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 359, + "startColumn": 5, + "charOffset": 11838, + "charLength": 4, + "snippet": { + "text": "\t\t\tplayer->sendMessageDialog(\"You already have an active monster on this prey slot.\");\n\t\t\treturn;\n\t\t} else if (!slot->canSelect() || index == -1 || (index + 1) > slot->raceIdList.size()) {\n\t\t\tplayer->sendMessageDialog(\"There was an error while processing your action. Please try reopening the prey window.\");\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ace000320648fd5e5ebdf151e02629749e7767e13d60363b6645a8a3968fabd4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 378, + "startColumn": 3, + "charOffset": 12715, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 376, + "startColumn": 3, + "charOffset": 12563, + "charLength": 2, + "snippet": { + "text": "\t\tslot->bonusTimeLeft = static_cast(g_configManager().getNumber(PREY_BONUS_TIME, __FUNCTION__));\n\t} else if (action == PreyAction_Option) {\n\t\tif (option == PreyOption_AutomaticReroll && player->getPreyCards() < static_cast(g_configManager().getNumber(PREY_BONUS_REROLL_PRICE, __FUNCTION__))) {\n\t\t\tplayer->sendMessageDialog(\"You don't have enought prey cards to enable automatic reroll when your slot expire.\");\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ca59aeff3be9fc6701c6a28275187bf50ee0429d9893afee0c898ba078dbb4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 381, + "startColumn": 5, + "charOffset": 13009, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 379, + "startColumn": 5, + "charOffset": 12877, + "charLength": 4, + "snippet": { + "text": "\t\t\tplayer->sendMessageDialog(\"You don't have enought prey cards to enable automatic reroll when your slot expire.\");\n\t\t\treturn;\n\t\t} else if (option == PreyOption_Locked && player->getPreyCards() < static_cast(g_configManager().getNumber(PREY_SELECTION_LIST_PRICE, __FUNCTION__))) {\n\t\t\tplayer->sendMessageDialog(\"You don't have enought prey cards to lock monster and bonus when the slot expire.\");\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47224f7beef2708ce898250ff3d7f5ad07b1fd34c3555809ea2c3c08b0f53a67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'parseTaskHuntingAction' has cognitive complexity of 55 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 395, + "startColumn": 14, + "charOffset": 13497, + "charLength": 22, + "snippet": { + "text": "parseTaskHuntingAction" + } + }, + "contextRegion": { + "startLine": 393, + "startColumn": 14, + "charOffset": 13481, + "charLength": 22, + "snippet": { + "text": "}\n\nvoid IOPrey::parseTaskHuntingAction(std::shared_ptr player, PreySlot_t slotId, PreyTaskAction_t action, bool upgrade, uint16_t raceId) const {\n\tconst auto &slot = player->getTaskHuntingSlotById(slotId);\n\tif (!slot || slot->state == PreyTaskDataState_Locked) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a479e90f03395421ca15c5d9931de457a7c898c1672fcbe49316cc63a98ba69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 395, + "startColumn": 61, + "charOffset": 13544, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 393, + "startColumn": 61, + "charOffset": 13481, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid IOPrey::parseTaskHuntingAction(std::shared_ptr player, PreySlot_t slotId, PreyTaskAction_t action, bool upgrade, uint16_t raceId) const {\n\tconst auto &slot = player->getTaskHuntingSlotById(slotId);\n\tif (!slot || slot->state == PreyTaskDataState_Locked) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44f608b8e675c1dcfe0250c9f7f5290da2a3d09abf39706f6f0f6a19eb3066a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 397, + "startColumn": 6, + "charOffset": 13700, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 395, + "startColumn": 6, + "charOffset": 13484, + "charLength": 1, + "snippet": { + "text": "void IOPrey::parseTaskHuntingAction(std::shared_ptr player, PreySlot_t slotId, PreyTaskAction_t action, bool upgrade, uint16_t raceId) const {\n\tconst auto &slot = player->getTaskHuntingSlotById(slotId);\n\tif (!slot || slot->state == PreyTaskDataState_Locked) {\n\t\tplayer->sendMessageDialog(\"To unlock this task hunting slot first you must buy it on store.\");\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6fa8c4af296f2b22325f97a0f956ebbda89fead18d0c1c55d26cac0d3889681" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 405, + "startColumn": 82, + "charOffset": 14068, + "charLength": 5, + "snippet": { + "text": "60000" + } + }, + "contextRegion": { + "startLine": 403, + "startColumn": 82, + "charOffset": 13907, + "charLength": 5, + "snippet": { + "text": "\t\tif (slot->disabledUntilTimeStamp >= OTSYS_TIME()) {\n\t\t\tstd::ostringstream ss;\n\t\t\tss << \"You need to wait \" << ((slot->disabledUntilTimeStamp - OTSYS_TIME()) / 60000) << \" minutes to select a new creature on task.\";\n\t\t\tplayer->sendMessageDialog(ss.str());\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4008d80b18bce654a5b5a837dec81d0c5ec52a38c4b80ccf55213536da28347d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 408, + "startColumn": 5, + "charOffset": 14179, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 406, + "startColumn": 5, + "charOffset": 14124, + "charLength": 4, + "snippet": { + "text": "\t\t\tplayer->sendMessageDialog(ss.str());\n\t\t\treturn;\n\t\t} else if (slot->freeRerollTimeStamp > OTSYS_TIME() && !g_game().removeMoney(player, player->getTaskHuntingRerollPrice(), 0, true)) {\n\t\t\tplayer->sendMessageDialog(\"You don't have enought money to reroll the task hunting slot.\");\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5551fa0d46ee929676c7bfd105ae53fbd2a424ff768fe473bcdc3a97b72b90fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'int64_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 412, + "startColumn": 47, + "charOffset": 14521, + "charLength": 15, + "snippet": { + "text": "g_configManager" + } + }, + "contextRegion": { + "startLine": 410, + "startColumn": 47, + "charOffset": 14406, + "charLength": 15, + "snippet": { + "text": "\t\t\treturn;\n\t\t} else if (slot->freeRerollTimeStamp <= OTSYS_TIME()) {\n\t\t\tslot->freeRerollTimeStamp = OTSYS_TIME() + g_configManager().getNumber(TASK_HUNTING_FREE_REROLL_TIME, __FUNCTION__) * 1000;\n\t\t} else {\n\t\t\tg_metrics().addCounter(\"balance_decrease\", player->getTaskHuntingRerollPrice(), { { \"player\", player->getName() }, { \"context\", \"hunting_task_reroll\" } });" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8ba5b4496f3747d3412537f764999ee9ddb1a52f92723733a933fac68ac558d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 412, + "startColumn": 122, + "charOffset": 14596, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 410, + "startColumn": 122, + "charOffset": 14406, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn;\n\t\t} else if (slot->freeRerollTimeStamp <= OTSYS_TIME()) {\n\t\t\tslot->freeRerollTimeStamp = OTSYS_TIME() + g_configManager().getNumber(TASK_HUNTING_FREE_REROLL_TIME, __FUNCTION__) * 1000;\n\t\t} else {\n\t\t\tg_metrics().addCounter(\"balance_decrease\", player->getTaskHuntingRerollPrice(), { { \"player\", player->getName() }, { \"context\", \"hunting_task_reroll\" } });" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ebd04ef5505394fb18298ca41a551ae98a876f7524554bb35b2398160482c722" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 414, + "startColumn": 47, + "charOffset": 14659, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 412, + "startColumn": 47, + "charOffset": 14475, + "charLength": 6, + "snippet": { + "text": "\t\t\tslot->freeRerollTimeStamp = OTSYS_TIME() + g_configManager().getNumber(TASK_HUNTING_FREE_REROLL_TIME, __FUNCTION__) * 1000;\n\t\t} else {\n\t\t\tg_metrics().addCounter(\"balance_decrease\", player->getTaskHuntingRerollPrice(), { { \"player\", player->getName() }, { \"context\", \"hunting_task_reroll\" } });\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a1ba7895f860d481152e321b88b5d327d40cd8e93c16bcf9bb8defa4427033f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 429, + "startColumn": 3, + "charOffset": 15330, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 427, + "startColumn": 3, + "charOffset": 15250, + "charLength": 2, + "snippet": { + "text": "\t\tslot->reloadReward();\n\t} else if (action == PreyTaskAction_ListAll_Cards) {\n\t\tif (slot->disabledUntilTimeStamp >= OTSYS_TIME()) {\n\t\t\tstd::ostringstream ss;\n\t\t\tss << \"You need to wait \" << ((slot->disabledUntilTimeStamp - OTSYS_TIME()) / 60000) << \" minutes to select a new creature on task.\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b569153867c93744df1c5e4f205ea7bed4afee94855d94fd3eae4ae7e644140" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 431, + "startColumn": 82, + "charOffset": 15489, + "charLength": 5, + "snippet": { + "text": "60000" + } + }, + "contextRegion": { + "startLine": 429, + "startColumn": 82, + "charOffset": 15328, + "charLength": 5, + "snippet": { + "text": "\t\tif (slot->disabledUntilTimeStamp >= OTSYS_TIME()) {\n\t\t\tstd::ostringstream ss;\n\t\t\tss << \"You need to wait \" << ((slot->disabledUntilTimeStamp - OTSYS_TIME()) / 60000) << \" minutes to select a new creature on task.\";\n\t\t\tplayer->sendMessageDialog(ss.str());\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f81335af8b3550af21c13c4ecca1ba1e75807b04cf07103e606262b7e1baaa74" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 434, + "startColumn": 5, + "charOffset": 15600, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 432, + "startColumn": 5, + "charOffset": 15545, + "charLength": 4, + "snippet": { + "text": "\t\t\tplayer->sendMessageDialog(ss.str());\n\t\t\treturn;\n\t\t} else if (!player->usePreyCards(static_cast(g_configManager().getNumber(TASK_HUNTING_SELECTION_LIST_PRICE, __FUNCTION__)))) {\n\t\t\tplayer->sendMessageDialog(\"You don't have enought prey cards to choose a creature on list for you task hunting slot.\");\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75bc0108b71fb21d936985ea06689359c7c9e2d76d9583c6e9e3d2f6c727da04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 442, + "startColumn": 3, + "charOffset": 16010, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 440, + "startColumn": 3, + "charOffset": 15902, + "charLength": 2, + "snippet": { + "text": "\t\tslot->state = PreyTaskDataState_ListSelection;\n\t} else if (action == PreyTaskAction_MonsterSelection) {\n\t\tif (slot->disabledUntilTimeStamp >= OTSYS_TIME()) {\n\t\t\tstd::ostringstream ss;\n\t\t\tss << \"You need to wait \" << ((slot->disabledUntilTimeStamp - OTSYS_TIME()) / 60000) << \" minutes to select a new creature on task.\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3fd3a20dedf189fd691f386b39b3547057765243b3f1f9ed92e992ff2cc8556" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 444, + "startColumn": 82, + "charOffset": 16169, + "charLength": 5, + "snippet": { + "text": "60000" + } + }, + "contextRegion": { + "startLine": 442, + "startColumn": 82, + "charOffset": 16008, + "charLength": 5, + "snippet": { + "text": "\t\tif (slot->disabledUntilTimeStamp >= OTSYS_TIME()) {\n\t\t\tstd::ostringstream ss;\n\t\t\tss << \"You need to wait \" << ((slot->disabledUntilTimeStamp - OTSYS_TIME()) / 60000) << \" minutes to select a new creature on task.\";\n\t\t\tplayer->sendMessageDialog(ss.str());\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25b93ccffebf66648dd997b3d6ddb37c62ef81daa7438c023f46630ac669212a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 447, + "startColumn": 5, + "charOffset": 16280, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 445, + "startColumn": 5, + "charOffset": 16225, + "charLength": 4, + "snippet": { + "text": "\t\t\tplayer->sendMessageDialog(ss.str());\n\t\t\treturn;\n\t\t} else if (!slot->canSelect()) {\n\t\t\tplayer->sendMessageDialog(\"There was an error while processing your action. Please try reopening the task window.\");\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a56970153f23f9fdf43a8c420c9dceab9b7e577fa6b80e518278ae6dcdd7163" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 447, + "startColumn": 34, + "charOffset": 16309, + "charLength": 1, + "snippet": { + "text": "{" + } + }, + "contextRegion": { + "startLine": 445, + "startColumn": 34, + "charOffset": 16225, + "charLength": 1, + "snippet": { + "text": "\t\t\tplayer->sendMessageDialog(ss.str());\n\t\t\treturn;\n\t\t} else if (!slot->canSelect()) {\n\t\t\tplayer->sendMessageDialog(\"There was an error while processing your action. Please try reopening the task window.\");\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cff09ea20701593718f6e430dfa7a03cbf6fb71c4e7b39efd6ccdfdd31c85be6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 474, + "startColumn": 46, + "charOffset": 17553, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 472, + "startColumn": 46, + "charOffset": 17503, + "charLength": 6, + "snippet": { + "text": "\t\t}\n\n\t\tg_metrics().addCounter(\"balance_decrease\", player->getTaskHuntingRerollPrice(), { { \"player\", player->getName() }, { \"context\", \"hunting_task_cancel\" } });\n\t\tslot->eraseTask();\n\t\tslot->reloadReward();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "357e083b58d91028c7f0fd1a557ede1884601cf927e01d5baf45bda287738f1a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'reward' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 486, + "startColumn": 13, + "charOffset": 18097, + "charLength": 6, + "snippet": { + "text": "reward" + } + }, + "contextRegion": { + "startLine": 484, + "startColumn": 13, + "charOffset": 18028, + "charLength": 6, + "snippet": { + "text": "\n\t\tif (const auto &option = getTaskRewardOption(slot)) {\n\t\t\tuint64_t reward;\n\t\t\tint32_t boostChange = uniform_random(0, 100);\n\t\t\tif (slot->rarity >= 4 && boostChange <= 5) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5479a9b5d8a8171104697924c866cfa7ee67f7297588c4071cb4e6a3f163806d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 487, + "startColumn": 44, + "charOffset": 18148, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 485, + "startColumn": 44, + "charOffset": 18029, + "charLength": 3, + "snippet": { + "text": "\t\tif (const auto &option = getTaskRewardOption(slot)) {\n\t\t\tuint64_t reward;\n\t\t\tint32_t boostChange = uniform_random(0, 100);\n\t\t\tif (slot->rarity >= 4 && boostChange <= 5) {\n\t\t\t\tboostChange = 20;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "524e257a45d8b0b2e95039a241bad23e351c6ff9a1cb875fc685b3a736147855" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 488, + "startColumn": 44, + "charOffset": 18197, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 486, + "startColumn": 44, + "charOffset": 18085, + "charLength": 1, + "snippet": { + "text": "\t\t\tuint64_t reward;\n\t\t\tint32_t boostChange = uniform_random(0, 100);\n\t\t\tif (slot->rarity >= 4 && boostChange <= 5) {\n\t\t\t\tboostChange = 20;\n\t\t\t} else if (slot->rarity >= 4 && boostChange <= 10) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a956d38e7bfaf101871eac83e11b4e51ec56d5b369b3720b45138013fe42c196" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 489, + "startColumn": 19, + "charOffset": 18220, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 487, + "startColumn": 19, + "charOffset": 18105, + "charLength": 2, + "snippet": { + "text": "\t\t\tint32_t boostChange = uniform_random(0, 100);\n\t\t\tif (slot->rarity >= 4 && boostChange <= 5) {\n\t\t\t\tboostChange = 20;\n\t\t\t} else if (slot->rarity >= 4 && boostChange <= 10) {\n\t\t\t\tboostChange = 15;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96546c22f6c00030e943049741edb0ec124914a6657c533702d0f45342a03325" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 490, + "startColumn": 51, + "charOffset": 18274, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 488, + "startColumn": 51, + "charOffset": 18154, + "charLength": 2, + "snippet": { + "text": "\t\t\tif (slot->rarity >= 4 && boostChange <= 5) {\n\t\t\t\tboostChange = 20;\n\t\t\t} else if (slot->rarity >= 4 && boostChange <= 10) {\n\t\t\t\tboostChange = 15;\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b521085ce341abd9052adf1633cf1e269038297497d19bee3fae0e65abec342a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "15 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 491, + "startColumn": 19, + "charOffset": 18298, + "charLength": 2, + "snippet": { + "text": "15" + } + }, + "contextRegion": { + "startLine": 489, + "startColumn": 19, + "charOffset": 18202, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tboostChange = 20;\n\t\t\t} else if (slot->rarity >= 4 && boostChange <= 10) {\n\t\t\t\tboostChange = 15;\n\t\t\t} else {\n\t\t\t\tboostChange = 10;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96fc82386e61a4d2d5f61edec71136420f582612d25c286d00788d31d86e8dab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 493, + "startColumn": 19, + "charOffset": 18332, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 491, + "startColumn": 19, + "charOffset": 18280, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tboostChange = 15;\n\t\t\t} else {\n\t\t\t\tboostChange = 10;\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30f94a4bfca4a2ffa14946ec67cabec9a8c6563636c79e731826862c7b32ce03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 506, + "startColumn": 70, + "charOffset": 18809, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 504, + "startColumn": 70, + "charOffset": 18713, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tstd::ostringstream ss;\n\t\t\treward = static_cast(std::ceil((reward * boostChange) / 10));\n\t\t\tss << \"Congratulations! You have earned \" << reward;\n\t\t\tif (boostChange == 20) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2bc68c94c23fda9826a48e223621472192865bfb03ff860f385de11a4bf76cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 508, + "startColumn": 23, + "charOffset": 18893, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 506, + "startColumn": 23, + "charOffset": 18740, + "charLength": 2, + "snippet": { + "text": "\t\t\treward = static_cast(std::ceil((reward * boostChange) / 10));\n\t\t\tss << \"Congratulations! You have earned \" << reward;\n\t\t\tif (boostChange == 20) {\n\t\t\t\tss << \" Hunting Task points including a 100% bonus.\";\n\t\t\t} else if (boostChange == 15) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "453175df4e3d4c098c790cfdb008c46e78189198e267ac7132a2cef4598d2f16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "15 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 510, + "startColumn": 30, + "charOffset": 18986, + "charLength": 2, + "snippet": { + "text": "15" + } + }, + "contextRegion": { + "startLine": 508, + "startColumn": 30, + "charOffset": 18871, + "charLength": 2, + "snippet": { + "text": "\t\t\tif (boostChange == 20) {\n\t\t\t\tss << \" Hunting Task points including a 100% bonus.\";\n\t\t\t} else if (boostChange == 15) {\n\t\t\t\tss << \" Hunting Task points including a 50% bonus.\";\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd67d55af40fb323165217092aeac27cded809773ecb909b82f61ca4fcdd750c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'int64_t' (aka 'long') of a multiplication performed in type 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 522, + "startColumn": 50, + "charOffset": 19407, + "charLength": 15, + "snippet": { + "text": "g_configManager" + } + }, + "contextRegion": { + "startLine": 520, + "startColumn": 50, + "charOffset": 19235, + "charLength": 15, + "snippet": { + "text": "\t\t\tplayer->sendMessageDialog(ss.str());\n\t\t\tslot->reloadMonsterGrid(player->getTaskHuntingBlackList(), player->getLevel());\n\t\t\tslot->disabledUntilTimeStamp = OTSYS_TIME() + g_configManager().getNumber(TASK_HUNTING_LIMIT_EXHAUST, __FUNCTION__) * 1000;\n\t\t}\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a4e219fc1360dc5f765ad3581d3dafaf1c6f2b8c5565f7feebf3e4592d8916d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 522, + "startColumn": 122, + "charOffset": 19479, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 520, + "startColumn": 122, + "charOffset": 19235, + "charLength": 4, + "snippet": { + "text": "\t\t\tplayer->sendMessageDialog(ss.str());\n\t\t\tslot->reloadMonsterGrid(player->getTaskHuntingBlackList(), player->getLevel());\n\t\t\tslot->disabledUntilTimeStamp = OTSYS_TIME() + g_configManager().getNumber(TASK_HUNTING_LIMIT_EXHAUST, __FUNCTION__) * 1000;\n\t\t}\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ddf2f12c93514c9ef670058487cc805d09da28be43cb0870ef8faa580d33fcee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 539, + "startColumn": 22, + "charOffset": 19904, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 537, + "startColumn": 22, + "charOffset": 19811, + "charLength": 2, + "snippet": { + "text": "\n\t// Kill stage is the multiplier for kills and rewards on task hunting\n\tuint8_t killStage = 25;\n\n\t// This is hardcoded on client but i'm saving it in case that they change it in the future" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c872541f9858d7a34f2f78a94347b918654715debe93e805ee28b3ba5889dc4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 542, + "startColumn": 25, + "charOffset": 20025, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 540, + "startColumn": 25, + "charOffset": 19908, + "charLength": 1, + "snippet": { + "text": "\n\t// This is hardcoded on client but i'm saving it in case that they change it in the future\n\tuint8_t limitOfStars = 5;\n\tuint16_t kills = killStage;\n\tNetworkMessage msg;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e30ae91d76c9f0bc8427043741996ec3bf6a41ccceaa3ae186eddb5f50bdbbb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 546, + "startColumn": 51, + "charOffset": 20276, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 544, + "startColumn": 51, + "charOffset": 20057, + "charLength": 2, + "snippet": { + "text": "\tNetworkMessage msg;\n\tfor (uint8_t difficulty = PreyTaskDifficult_First; difficulty <= PreyTaskDifficult_Last; ++difficulty) { // Difficulties of creatures on bestiary.\n\t\tauto reward = static_cast(std::round((10 * kills) / killStage));\n\t\t// Amount of task stars on task hunting\n\t\tfor (uint8_t star = 1; star <= limitOfStars; ++star) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6ca5b88e97d98b4e4a365fcdeb9373f08ec7f0d9294983fc34d4adb878b6547" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 548, + "startColumn": 3, + "charOffset": 20347, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 546, + "startColumn": 3, + "charOffset": 20226, + "charLength": 3, + "snippet": { + "text": "\t\tauto reward = static_cast(std::round((10 * kills) / killStage));\n\t\t// Amount of task stars on task hunting\n\t\tfor (uint8_t star = 1; star <= limitOfStars; ++star) {\n\t\t\tconst auto &option = taskOption.emplace_back(std::make_unique());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efe01e41ef13fa89396388e3ab166c385535a707284649a3dfbf0c3273a5a9b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 557, + "startColumn": 26, + "charOffset": 20677, + "charLength": 5, + "snippet": { + "text": "kills" + } + }, + "contextRegion": { + "startLine": 555, + "startColumn": 26, + "charOffset": 20618, + "charLength": 5, + "snippet": { + "text": "\t\t\toption->firstReward = reward;\n\n\t\t\toption->secondKills = kills * 2;\n\t\t\toption->secondReward = reward * 2;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f26d0b56dee657c1e3df1a146660b87f7bf55d9ee662e07666855bddec388f7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 558, + "startColumn": 27, + "charOffset": 20714, + "charLength": 6, + "snippet": { + "text": "reward" + } + }, + "contextRegion": { + "startLine": 556, + "startColumn": 27, + "charOffset": 20651, + "charLength": 6, + "snippet": { + "text": "\n\t\t\toption->secondKills = kills * 2;\n\t\t\toption->secondReward = reward * 2;\n\n\t\t\treward = static_cast(std::round((reward * (115 + (difficulty * limitOfStars))) / 100));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c0a9bf4a2036e8d425d37927d15a2dfae5464085621937bef6dc36ca494405b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "115 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 560, + "startColumn": 57, + "charOffset": 20783, + "charLength": 3, + "snippet": { + "text": "115" + } + }, + "contextRegion": { + "startLine": 558, + "startColumn": 57, + "charOffset": 20688, + "charLength": 3, + "snippet": { + "text": "\t\t\toption->secondReward = reward * 2;\n\n\t\t\treward = static_cast(std::round((reward * (115 + (difficulty * limitOfStars))) / 100));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "804e4e473a96f12a3c6dc63c4be9fe127f48f79800b5e505d82034d3b15145e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 560, + "startColumn": 95, + "charOffset": 20821, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 558, + "startColumn": 95, + "charOffset": 20688, + "charLength": 3, + "snippet": { + "text": "\t\t\toption->secondReward = reward * 2;\n\n\t\t\treward = static_cast(std::round((reward * (115 + (difficulty * limitOfStars))) / 100));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22644c336019a7457831eeea752694b6ceb278774b6377a54375285b8bad84d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 566, + "startColumn": 14, + "charOffset": 20864, + "charLength": 4, + "snippet": { + "text": "0xBA" + } + }, + "contextRegion": { + "startLine": 564, + "startColumn": 14, + "charOffset": 20847, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tmsg.addByte(0xBA);\n\tstd::map bestiaryList = g_game().getBestiaryList();\n\tmsg.add(static_cast(bestiaryList.size()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f1fd72282e5068280d333a8f3b14ecc1fc96b07b86739f321aa37633499ebd3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xBA is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 566, + "startColumn": 14, + "charOffset": 20864, + "charLength": 4, + "snippet": { + "text": "0xBA" + } + }, + "contextRegion": { + "startLine": 564, + "startColumn": 14, + "charOffset": 20847, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tmsg.addByte(0xBA);\n\tstd::map bestiaryList = g_game().getBestiaryList();\n\tmsg.add(static_cast(bestiaryList.size()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11eb7811360b1253f5298ad0224c0190f7fb0fd276fb7363adce284d3c4e05d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 569, + "startColumn": 2, + "charOffset": 21012, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 567, + "startColumn": 2, + "charOffset": 20871, + "charLength": 3, + "snippet": { + "text": "\tstd::map bestiaryList = g_game().getBestiaryList();\n\tmsg.add(static_cast(bestiaryList.size()));\n\tstd::for_each(bestiaryList.begin(), bestiaryList.end(), [&msg](auto mType) {\n\t\tconst auto mtype = g_monsters().getMonsterType(mType.second);\n\t\tif (!mtype) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1cc207931b1c2961545432cb3ae61898cb247c16693ab76bdc2d086c804f8d4d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 571, + "startColumn": 7, + "charOffset": 21159, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 569, + "startColumn": 7, + "charOffset": 21011, + "charLength": 1, + "snippet": { + "text": "\tstd::for_each(bestiaryList.begin(), bestiaryList.end(), [&msg](auto mType) {\n\t\tconst auto mtype = g_monsters().getMonsterType(mType.second);\n\t\tif (!mtype) {\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7362e229ec50d3646c031cf80c4bea76db5d761d5dc7e1b449d700ea977beb57" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 577, + "startColumn": 16, + "charOffset": 21281, + "charLength": 4, + "snippet": { + "text": "0x01" + } + }, + "contextRegion": { + "startLine": 575, + "startColumn": 16, + "charOffset": 21185, + "charLength": 4, + "snippet": { + "text": "\t\tmsg.add(mtype->info.raceid);\n\t\tif (mtype->info.bestiaryStars <= 1) {\n\t\t\tmsg.addByte(0x01);\n\t\t} else if (mtype->info.bestiaryStars <= 3) {\n\t\t\tmsg.addByte(0x02);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d48af298b3b8a39866cfcd6fc2591c3b665f6fd218f2f7a85a7045c4f13ff3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 579, + "startColumn": 16, + "charOffset": 21350, + "charLength": 4, + "snippet": { + "text": "0x02" + } + }, + "contextRegion": { + "startLine": 577, + "startColumn": 16, + "charOffset": 21266, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.addByte(0x01);\n\t\t} else if (mtype->info.bestiaryStars <= 3) {\n\t\t\tmsg.addByte(0x02);\n\t\t} else {\n\t\t\tmsg.addByte(0x03);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e622c6c8b16c01597ee0d7b0131b3ad8014646c116b29c46983fafbb3e65a6c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 581, + "startColumn": 16, + "charOffset": 21383, + "charLength": 4, + "snippet": { + "text": "0x03" + } + }, + "contextRegion": { + "startLine": 579, + "startColumn": 16, + "charOffset": 21335, + "charLength": 4, + "snippet": { + "text": "\t\t\tmsg.addByte(0x02);\n\t\t} else {\n\t\t\tmsg.addByte(0x03);\n\t\t}\n\t});" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2fd80027d3340efd96d20c8f28ae169bba65544da4664fcea4b7de2163322d15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 586, + "startColumn": 2, + "charOffset": 21456, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 584, + "startColumn": 2, + "charOffset": 21399, + "charLength": 3, + "snippet": { + "text": "\n\tmsg.addByte(static_cast(taskOption.size()));\n\tstd::for_each(taskOption.begin(), taskOption.end(), [&msg](const std::unique_ptr &option) {\n\t\tmsg.addByte(static_cast(option->difficult));\n\t\tmsg.addByte(option->rarity);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97dc60ae65e484936e5c0c5f7570588b59878d35a6032b5ec0a59d376b2a3b7f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 598, + "startColumn": 6, + "charOffset": 21983, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 596, + "startColumn": 6, + "charOffset": 21853, + "charLength": 1, + "snippet": { + "text": "\nconst std::unique_ptr &IOPrey::getTaskRewardOption(const std::unique_ptr &slot) const {\n\tif (!slot) {\n\t\treturn TaskHuntingOptionNull;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "474e4459df0321d16b6202d93153870bf1019698d262cdb35bbb4d73e07310cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 603, + "startColumn": 6, + "charOffset": 22112, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 601, + "startColumn": 6, + "charOffset": 22027, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto mtype = g_monsters().getMonsterTypeByRaceId(slot->selectedRaceId);\n\tif (!mtype) {\n\t\treturn TaskHuntingOptionNull;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "863c0575ae1e6b9fc055515d727856d939e1f06d2d953f339a956214b85a17eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'difficult' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/io/ioprey.cpp", + "index": 3 + }, + "region": { + "startLine": 607, + "startColumn": 22, + "charOffset": 22179, + "charLength": 9, + "snippet": { + "text": "difficult" + } + }, + "contextRegion": { + "startLine": 605, + "startColumn": 22, + "charOffset": 22154, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tPreyTaskDifficult_t difficult;\n\tif (mtype->info.bestiaryStars <= 1) {\n\t\tdifficult = PreyTaskDifficult_Easy;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14bcb4b21613236e39b1de249f6c782b26ad7d7429cf536739540ad8008faf09" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-member-init", + "ruleIndex": 510, + "kind": "fail", + "level": "warning", + "message": { + "text": "constructor does not initialize these fields: sleepStart, sleeperGUID" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 18, + "startColumn": 1, + "charOffset": 558, + "charLength": 7, + "snippet": { + "text": "BedItem" + } + }, + "contextRegion": { + "startLine": 16, + "startColumn": 1, + "charOffset": 513, + "charLength": 7, + "snippet": { + "text": "#include \"game/scheduling/save_manager.hpp\"\n\nBedItem::BedItem(uint16_t id) :\n\tItem(id) {\n\tinternalRemoveSleeper();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "658a03001b9f6a519429e13813d87909f99e76e5408dd60020299b6d042d84a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 25, + "startColumn": 3, + "charOffset": 727, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 3, + "charOffset": 631, + "charLength": 4, + "snippet": { + "text": "Attr_ReadValue BedItem::readAttr(AttrTypes_t attr, PropStream &propStream) {\n\tswitch (attr) {\n\t\tcase ATTR_SLEEPERGUID: {\n\t\t\tuint32_t guid;\n\t\t\tif (!propStream.read(guid)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e15e286a05dd705eca3c02388ef0ef0192874a83a9822297f820221062844b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'guid' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 13, + "charOffset": 764, + "charLength": 4, + "snippet": { + "text": "guid" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 13, + "charOffset": 708, + "charLength": 4, + "snippet": { + "text": "\tswitch (attr) {\n\t\tcase ATTR_SLEEPERGUID: {\n\t\t\tuint32_t guid;\n\t\t\tif (!propStream.read(guid)) {\n\t\t\t\treturn ATTR_READ_ERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "546f4770ed04f3bb51572e3d2ef90abf7d5936976d89dd2c04ccbeab9fd83deb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 3, + "charOffset": 1165, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 3, + "charOffset": 1158, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase ATTR_SLEEPSTART: {\n\t\t\tuint32_t sleep_start;\n\t\t\tif (!propStream.read(sleep_start)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e939323bce2abe392768a0dc95aac7e2ed35cc7c3f9e0a0d467e59b8772fcbed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'sleep_start' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 13, + "charOffset": 1201, + "charLength": 11, + "snippet": { + "text": "sleep_start" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 13, + "charOffset": 1162, + "charLength": 11, + "snippet": { + "text": "\n\t\tcase ATTR_SLEEPSTART: {\n\t\t\tuint32_t sleep_start;\n\t\t\tif (!propStream.read(sleep_start)) {\n\t\t\t\treturn ATTR_READ_ERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea9c0baceeca485932d4c3e43cb132b6d5c862738b0c604b30569349f8789e8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 60, + "startColumn": 34, + "charOffset": 1582, + "charLength": 16, + "snippet": { + "text": "ATTR_SLEEPERGUID" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 34, + "charOffset": 1454, + "charLength": 16, + "snippet": { + "text": "void BedItem::serializeAttr(PropWriteStream &propWriteStream) const {\n\tif (sleeperGUID != 0) {\n\t\tpropWriteStream.write(ATTR_SLEEPERGUID);\n\t\tpropWriteStream.write(sleeperGUID);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e05aa9f50e44b47a6b2616287a2121984b70020a333ec7868916b895262977f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 65, + "startColumn": 34, + "charOffset": 1710, + "charLength": 15, + "snippet": { + "text": "ATTR_SLEEPSTART" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 34, + "charOffset": 1652, + "charLength": 15, + "snippet": { + "text": "\n\tif (sleepStart != 0) {\n\t\tpropWriteStream.write(ATTR_SLEEPSTART);\n\t\t// FIXME: should be stored as 64-bit, but we need to retain backwards compatibility\n\t\tpropWriteStream.write(static_cast(sleepStart));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ebfa6f12e165c079ea7cba20d48ae22e4d4451e362fd67ce5f3bf3c34b1d857" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 82, + "startColumn": 46, + "charOffset": 2235, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 46, + "charOffset": 2187, + "charLength": 6, + "snippet": { + "text": "}\n\nbool BedItem::canUse(std::shared_ptr player) {\n\tif ((player == nullptr) || (house == nullptr) || !player->isPremium()) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9639d5500cd7394e831f2db17db8e0d46d58424578ba5a2c193a042b0f05c424" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'nextBedItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 120, + "startColumn": 54, + "charOffset": 3055, + "charLength": 11, + "snippet": { + "text": "nextBedItem" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 54, + "charOffset": 2999, + "charLength": 11, + "snippet": { + "text": "}\n\nbool BedItem::isBedComplete(std::shared_ptr nextBedItem) {\n\tconst ItemType &it = Item::items[id];\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "127ea0debe8383bcca233b75ad41c5d0e7a6a499a7ab52efa42ea4b6c802a91f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 137, + "startColumn": 48, + "charOffset": 3559, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 135, + "startColumn": 48, + "charOffset": 3509, + "charLength": 6, + "snippet": { + "text": "}\n\nbool BedItem::trySleep(std::shared_ptr player) {\n\tif (!house || player->isRemoved()) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56800a04dbc34b0668178051a3c9d2d84c558c96e89eac13b26f5b88dc12a0da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 138, + "startColumn": 6, + "charOffset": 3574, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 136, + "startColumn": 6, + "charOffset": 3511, + "charLength": 1, + "snippet": { + "text": "\nbool BedItem::trySleep(std::shared_ptr player) {\n\tif (!house || player->isRemoved()) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9a1a80357866194112cc6123b2c5463199488de922eebe5f6641421c793b1c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 153, + "startColumn": 45, + "charOffset": 3910, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 151, + "startColumn": 45, + "charOffset": 3863, + "charLength": 6, + "snippet": { + "text": "}\n\nbool BedItem::sleep(std::shared_ptr player) {\n\tif (house == nullptr) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69f478a83c9510eb6462ef325884f1daa11921ba1ac8abc9865cd4df572c7970" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 180, + "startColumn": 17, + "charOffset": 4556, + "charLength": 13, + "snippet": { + "text": "scheduleEvent" + } + }, + "contextRegion": { + "startLine": 178, + "startColumn": 17, + "charOffset": 4464, + "charLength": 13, + "snippet": { + "text": "\n\t// logout player after he sees himself walk onto the bed and it change id\n\tg_dispatcher().scheduleEvent(\n\t\tSCHEDULER_MINTICKS, [client = player->client] { client->logout(false, false); }, \"ProtocolGame::logout\"\n\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2bec3634c809f5dc593bdbe604892724a1dbc709ae25f246063d56cedca8a4d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 194, + "startColumn": 46, + "charOffset": 4889, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 192, + "startColumn": 46, + "charOffset": 4841, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid BedItem::wakeUp(std::shared_ptr player) {\n\tif (house == nullptr) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9860eb8df9615bcf5bfdf0c250d428a20770117a2307e0f3410560b577f1f68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 207, + "startColumn": 21, + "charOffset": 5204, + "charLength": 10, + "snippet": { + "text": "savePlayer" + } + }, + "contextRegion": { + "startLine": 205, + "startColumn": 21, + "charOffset": 5085, + "charLength": 10, + "snippet": { + "text": "\t\t\tif (IOLoginData::loadPlayerById(regenPlayer, sleeperGUID)) {\n\t\t\t\tregeneratePlayer(regenPlayer);\n\t\t\t\tg_saveManager().savePlayer(regenPlayer);\n\t\t\t}\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf98063c8c969df68cf85f70cc2b2c2953932b4aeb25ef6c433e9ed77a60a82d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 235, + "startColumn": 56, + "charOffset": 5779, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 233, + "startColumn": 56, + "charOffset": 5721, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid BedItem::regeneratePlayer(std::shared_ptr player) const {\n\tconst uint32_t sleptTime = time(nullptr) - sleepStart;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d06237b73d60bbe931c96dd25c34a83aea8f02cb202605e320b92dc1209d6e53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 236, + "startColumn": 29, + "charOffset": 5823, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 234, + "startColumn": 29, + "charOffset": 5723, + "charLength": 4, + "snippet": { + "text": "\nvoid BedItem::regeneratePlayer(std::shared_ptr player) const {\n\tconst uint32_t sleptTime = time(nullptr) - sleepStart;\n\n\tstd::shared_ptr condition = player->getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9abb9aad9bc5cd9d18cd0d0fa57522905aa8e371a7e6072b9e078e35cf1cb175" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 236, + "startColumn": 29, + "charOffset": 5823, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 234, + "startColumn": 29, + "charOffset": 5723, + "charLength": 4, + "snippet": { + "text": "\nvoid BedItem::regeneratePlayer(std::shared_ptr player) const {\n\tconst uint32_t sleptTime = time(nullptr) - sleepStart;\n\n\tstd::shared_ptr condition = player->getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d586787a14e3e1e30fe401ee4877d338a5c3d144c8bdc41bb8965c81aa21108a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'regen' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 240, + "startColumn": 12, + "charOffset": 5999, + "charLength": 5, + "snippet": { + "text": "regen" + } + }, + "contextRegion": { + "startLine": 238, + "startColumn": 12, + "charOffset": 5852, + "charLength": 5, + "snippet": { + "text": "\tstd::shared_ptr condition = player->getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT);\n\tif (condition != nullptr) {\n\t\tuint32_t regen;\n\t\tif (condition->getTicks() != -1) {\n\t\t\tregen = std::min((condition->getTicks() / 1000), sleptTime) / 30; // RATE_HEALTH_REGEN_SPEED and RATE_MANA_REGEN_SPEED?" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e551d1dc0225e2999b88111568d5f54177b20a2f7559143b011a7a636d8799d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 55, + "charOffset": 6097, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 55, + "charOffset": 5988, + "charLength": 4, + "snippet": { + "text": "\t\tuint32_t regen;\n\t\tif (condition->getTicks() != -1) {\n\t\t\tregen = std::min((condition->getTicks() / 1000), sleptTime) / 30; // RATE_HEALTH_REGEN_SPEED and RATE_MANA_REGEN_SPEED?\n\t\t\tconst int32_t newRegenTicks = condition->getTicks() - (regen * 30000);\n\t\t\tif (newRegenTicks <= 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30b543ff02e013b08b6a6c365ca8c5e6802a41e0e1dba7144e3bb06864b6b4f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 62, + "charOffset": 6104, + "charLength": 9, + "snippet": { + "text": "sleptTime" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 62, + "charOffset": 5988, + "charLength": 9, + "snippet": { + "text": "\t\tuint32_t regen;\n\t\tif (condition->getTicks() != -1) {\n\t\t\tregen = std::min((condition->getTicks() / 1000), sleptTime) / 30; // RATE_HEALTH_REGEN_SPEED and RATE_MANA_REGEN_SPEED?\n\t\t\tconst int32_t newRegenTicks = condition->getTicks() - (regen * 30000);\n\t\t\tif (newRegenTicks <= 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64b1b77c04122438d49124f3bc4278391cd34f0cb7220470d1cb17f1c0f762b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 75, + "charOffset": 6117, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 75, + "charOffset": 5988, + "charLength": 2, + "snippet": { + "text": "\t\tuint32_t regen;\n\t\tif (condition->getTicks() != -1) {\n\t\t\tregen = std::min((condition->getTicks() / 1000), sleptTime) / 30; // RATE_HEALTH_REGEN_SPEED and RATE_MANA_REGEN_SPEED?\n\t\t\tconst int32_t newRegenTicks = condition->getTicks() - (regen * 30000);\n\t\t\tif (newRegenTicks <= 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "718fcef343f342ab4559733c2fdf2b3e5b860fd5a87ea97765d7b8c82177238e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 243, + "startColumn": 34, + "charOffset": 6208, + "charLength": 9, + "snippet": { + "text": "condition" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 34, + "charOffset": 6006, + "charLength": 9, + "snippet": { + "text": "\t\tif (condition->getTicks() != -1) {\n\t\t\tregen = std::min((condition->getTicks() / 1000), sleptTime) / 30; // RATE_HEALTH_REGEN_SPEED and RATE_MANA_REGEN_SPEED?\n\t\t\tconst int32_t newRegenTicks = condition->getTicks() - (regen * 30000);\n\t\t\tif (newRegenTicks <= 0) {\n\t\t\t\tplayer->removeCondition(condition);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "610a3092543d0c94c0a10fe628c7edeb0391dc215df7c50f075468e3978d5455" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 250, + "startColumn": 24, + "charOffset": 6409, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 248, + "startColumn": 24, + "charOffset": 6370, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\t\t} else {\n\t\t\tregen = sleptTime / 30;\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eef01d429ffc8d8b0877a3f19117b430f0cf4ef76506673c38aa9213931458ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 253, + "startColumn": 24, + "charOffset": 6441, + "charLength": 5, + "snippet": { + "text": "regen" + } + }, + "contextRegion": { + "startLine": 251, + "startColumn": 24, + "charOffset": 6413, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\n\t\tplayer->changeHealth(regen * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__), false);\n\t\tplayer->changeMana(regen * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "beec9b9a2765f115345260349981783df00ff0158fb4908465245d2212818da9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 253, + "startColumn": 24, + "charOffset": 6441, + "charLength": 5, + "snippet": { + "text": "regen" + } + }, + "contextRegion": { + "startLine": 251, + "startColumn": 24, + "charOffset": 6413, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\n\t\tplayer->changeHealth(regen * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__), false);\n\t\tplayer->changeMana(regen * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8014f000279c7343d38c894471a0c581b618cc249b927940d259f6c327b7d515" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 253, + "startColumn": 24, + "charOffset": 6441, + "charLength": 5, + "snippet": { + "text": "regen" + } + }, + "contextRegion": { + "startLine": 251, + "startColumn": 24, + "charOffset": 6413, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\n\t\tplayer->changeHealth(regen * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__), false);\n\t\tplayer->changeMana(regen * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3faeb74e9184eeed6c1b467f13c829460485d2a3b621556f48badb72eb44c042" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 254, + "startColumn": 22, + "charOffset": 6539, + "charLength": 5, + "snippet": { + "text": "regen" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 22, + "charOffset": 6417, + "charLength": 5, + "snippet": { + "text": "\n\t\tplayer->changeHealth(regen * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__), false);\n\t\tplayer->changeMana(regen * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65e353e2663b870cb7f60bdaa31149069bf447346c8022548acfbf131c817a1a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 254, + "startColumn": 22, + "charOffset": 6539, + "charLength": 5, + "snippet": { + "text": "regen" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 22, + "charOffset": 6417, + "charLength": 5, + "snippet": { + "text": "\n\t\tplayer->changeHealth(regen * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__), false);\n\t\tplayer->changeMana(regen * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d65cb9570ed9bf2830b2d5bac4e8eab98054de3026e97804f6085cb295bc3a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 254, + "startColumn": 22, + "charOffset": 6539, + "charLength": 5, + "snippet": { + "text": "regen" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 22, + "charOffset": 6417, + "charLength": 5, + "snippet": { + "text": "\n\t\tplayer->changeHealth(regen * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__), false);\n\t\tplayer->changeMana(regen * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c075ca4cb8d457c537c9b852ab9f486ea06f6eb9f03d4c4da4afa50e476d42de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 257, + "startColumn": 28, + "charOffset": 6638, + "charLength": 9, + "snippet": { + "text": "sleptTime" + } + }, + "contextRegion": { + "startLine": 255, + "startColumn": 28, + "charOffset": 6607, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\tconst int32_t soulRegen = sleptTime / (60 * 15); // RATE_SOUL_REGEN_SPEED?\n\tplayer->changeSoul(soulRegen);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30c9d58ca328ccac5d02a524a8d5fbde858229a35430aaef4f088d2acf3ac390" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 261, + "startColumn": 56, + "charOffset": 6777, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 259, + "startColumn": 56, + "charOffset": 6719, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid BedItem::updateAppearance(std::shared_ptr player) {\n\tconst ItemType &it = Item::items[id];\n\tif (it.type == ITEM_TYPE_BED) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92bf1b63497f5dbb1660bac2a51d9df670abc82405c04238709eaef576c06822" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 264, + "startColumn": 3, + "charOffset": 6861, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 262, + "startColumn": 3, + "charOffset": 6787, + "charLength": 2, + "snippet": { + "text": "\tconst ItemType &it = Item::items[id];\n\tif (it.type == ITEM_TYPE_BED) {\n\t\tif ((player != nullptr) && it.transformToOnUse[player->getSex()] != 0) {\n\t\t\tconst ItemType &newType = Item::items[it.transformToOnUse[player->getSex()]];\n\t\t\tif (newType.type == ITEM_TYPE_BED) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cab839d24bfdf071fbb44151ba628945dcca9b94d84655cd7795507f417d6d38" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 264, + "startColumn": 30, + "charOffset": 6888, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 262, + "startColumn": 30, + "charOffset": 6787, + "charLength": 2, + "snippet": { + "text": "\tconst ItemType &it = Item::items[id];\n\tif (it.type == ITEM_TYPE_BED) {\n\t\tif ((player != nullptr) && it.transformToOnUse[player->getSex()] != 0) {\n\t\t\tconst ItemType &newType = Item::items[it.transformToOnUse[player->getSex()]];\n\t\t\tif (newType.type == ITEM_TYPE_BED) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7e9291c7d2572b6b94e6b1f744394bad4746a2200df081d87ac361c91cfbbed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 265, + "startColumn": 42, + "charOffset": 6975, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 263, + "startColumn": 42, + "charOffset": 6826, + "charLength": 2, + "snippet": { + "text": "\tif (it.type == ITEM_TYPE_BED) {\n\t\tif ((player != nullptr) && it.transformToOnUse[player->getSex()] != 0) {\n\t\t\tconst ItemType &newType = Item::items[it.transformToOnUse[player->getSex()]];\n\t\t\tif (newType.type == ITEM_TYPE_BED) {\n\t\t\t\tg_game().transformItem(static_self_cast(), it.transformToOnUse[player->getSex()]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d77bed7324038b4c0389201e323a83c09f7be2bb856d7c38c81a59b455847517" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 267, + "startColumn": 14, + "charOffset": 7068, + "charLength": 13, + "snippet": { + "text": "transformItem" + } + }, + "contextRegion": { + "startLine": 265, + "startColumn": 14, + "charOffset": 6934, + "charLength": 13, + "snippet": { + "text": "\t\t\tconst ItemType &newType = Item::items[it.transformToOnUse[player->getSex()]];\n\t\t\tif (newType.type == ITEM_TYPE_BED) {\n\t\t\t\tg_game().transformItem(static_self_cast(), it.transformToOnUse[player->getSex()]);\n\t\t\t}\n\t\t} else if (it.transformToFree != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9096398be017d8c5e3274a4dc0187dee1ffcc269bd0502f2093f0d0014f13de6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 267, + "startColumn": 57, + "charOffset": 7111, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 265, + "startColumn": 57, + "charOffset": 6934, + "charLength": 2, + "snippet": { + "text": "\t\t\tconst ItemType &newType = Item::items[it.transformToOnUse[player->getSex()]];\n\t\t\tif (newType.type == ITEM_TYPE_BED) {\n\t\t\t\tg_game().transformItem(static_self_cast(), it.transformToOnUse[player->getSex()]);\n\t\t\t}\n\t\t} else if (it.transformToFree != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7040cdc9403f056a294c0d283e10f744cfe0438792963d2e0d4973fc7501d183" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 272, + "startColumn": 14, + "charOffset": 7311, + "charLength": 13, + "snippet": { + "text": "transformItem" + } + }, + "contextRegion": { + "startLine": 270, + "startColumn": 14, + "charOffset": 7196, + "charLength": 13, + "snippet": { + "text": "\t\t\tconst ItemType &newType = Item::items[it.transformToFree];\n\t\t\tif (newType.type == ITEM_TYPE_BED) {\n\t\t\t\tg_game().transformItem(static_self_cast(), it.transformToFree);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50fb74e5fa338bb716d3963d33126ec88155974520e12efc67239b7f66f2c35e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 278, + "startColumn": 58, + "charOffset": 7447, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 276, + "startColumn": 58, + "charOffset": 7387, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid BedItem::internalSetSleeper(std::shared_ptr player) {\n\tstd::string desc_str = player->getName() + \" is sleeping there.\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aecef43bc42f82c081f766e97b7956e89827cc0b0e899e9c81a1e54650fc67e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/bed.cpp" + }, + "region": { + "startLine": 282, + "startColumn": 15, + "charOffset": 7573, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 280, + "startColumn": 15, + "charOffset": 7524, + "charLength": 4, + "snippet": { + "text": "\n\tsleeperGUID = player->getGUID();\n\tsleepStart = time(nullptr);\n\tsetAttribute(ItemAttribute_t::DESCRIPTION, desc_str);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f4efbc0a2388606d56f561cefbf264b9f30160e06e005a41abe6424924c74bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "32 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 24, + "startColumn": 13, + "charOffset": 871, + "charLength": 2, + "snippet": { + "text": "32" + } + }, + "contextRegion": { + "startLine": 22, + "startColumn": 13, + "charOffset": 760, + "charLength": 2, + "snippet": { + "text": "\t\tpagination = true;\n\t\tm_maxItems = g_configManager().getNumber(LOOTPOUCH_MAXLIMIT, __FUNCTION__);\n\t\tmaxSize = 32;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33fd8644a6ed2b7f0ea40c8ae9e07c7606e4ae61ed91829ac66a809915aacd5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "32 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 30, + "startColumn": 13, + "charOffset": 1014, + "charLength": 2, + "snippet": { + "text": "32" + } + }, + "contextRegion": { + "startLine": 28, + "startColumn": 13, + "charOffset": 902, + "charLength": 2, + "snippet": { + "text": "\t\tpagination = true;\n\t\tm_maxItems = g_configManager().getNumber(STOREINBOX_MAXLIMIT, __FUNCTION__);\n\t\tmaxSize = 32;\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1f9399384a3a57e722fb60c18356627a35bbf650b7607ddd7290b98a0d22c14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-member-init", + "ruleIndex": 510, + "kind": "fail", + "level": "warning", + "message": { + "text": "constructor does not initialize these fields: m_maxItems" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 1, + "charOffset": 1024, + "charLength": 9, + "snippet": { + "text": "Container" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 1, + "charOffset": 1021, + "charLength": 9, + "snippet": { + "text": "}\n\nContainer::Container(uint16_t initType, uint16_t initSize, bool initUnlocked /*= true*/, bool initPagination /*= false*/) :\n\tItem(initType),\n\tmaxSize(initSize)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c0df21bd689c254d2ffc228abd1cc49445824c9a081674faaab8b6f05409759" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'Container' of similar type ('uint16_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 22, + "charOffset": 1045, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 22, + "charOffset": 1021, + "charLength": 8, + "snippet": { + "text": "}\n\nContainer::Container(uint16_t initType, uint16_t initSize, bool initUnlocked /*= true*/, bool initPagination /*= false*/) :\n\tItem(initType),\n\tmaxSize(initSize)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fff086d70f4acb8ffcc64cbe2c6190e426d5b32c82c4c2852d50468858cb73dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 48, + "startColumn": 68, + "charOffset": 1624, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 68, + "charOffset": 1554, + "charLength": 4, + "snippet": { + "text": "}\n\nstd::shared_ptr Container::create(std::shared_ptr tile) {\n\tauto container = std::make_shared(ITEM_BROWSEFIELD, 30, false, true);\n\tTileItemVector* itemVector = tile->getItemList();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e436cd99327a4eb6d5d7475d826c1051ba9224271e648c15b4a77beff077d797" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 49, + "startColumn": 65, + "charOffset": 1696, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 47, + "startColumn": 65, + "charOffset": 1556, + "charLength": 2, + "snippet": { + "text": "\nstd::shared_ptr Container::create(std::shared_ptr tile) {\n\tauto container = std::make_shared(ITEM_BROWSEFIELD, 30, false, true);\n\tTileItemVector* itemVector = tile->getItemList();\n\tif (itemVector) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "609222adca1f6359b23a820fa5bd4c554f3d210708d805ea7352be904761200d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 51, + "startColumn": 6, + "charOffset": 1770, + "charLength": 10, + "snippet": { + "text": "itemVector" + } + }, + "contextRegion": { + "startLine": 49, + "startColumn": 6, + "charOffset": 1632, + "charLength": 10, + "snippet": { + "text": "\tauto container = std::make_shared(ITEM_BROWSEFIELD, 30, false, true);\n\tTileItemVector* itemVector = tile->getItemList();\n\tif (itemVector) {\n\t\tfor (auto &item : *itemVector) {\n\t\t\tif (((item->getContainer() || item->hasProperty(CONST_PROP_MOVABLE)) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) && !item->hasAttribute(ItemAttribute_t::UNIQUEID)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "249ff7f5bd454f3893d269108ea0883ab80f617afd522c23da52a2f0ee29ff91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 51, + "startColumn": 6, + "charOffset": 1770, + "charLength": 10, + "snippet": { + "text": "itemVector" + } + }, + "contextRegion": { + "startLine": 49, + "startColumn": 6, + "charOffset": 1632, + "charLength": 10, + "snippet": { + "text": "\tauto container = std::make_shared(ITEM_BROWSEFIELD, 30, false, true);\n\tTileItemVector* itemVector = tile->getItemList();\n\tif (itemVector) {\n\t\tfor (auto &item : *itemVector) {\n\t\t\tif (((item->getContainer() || item->hasProperty(CONST_PROP_MOVABLE)) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) && !item->hasAttribute(ItemAttribute_t::UNIQUEID)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36ddd4a1b77c6a96b99c99a46742c74bac0fe0fd13c4a8c5d78647f870995a37" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 52, + "startColumn": 3, + "charOffset": 1786, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 50, + "startColumn": 3, + "charOffset": 1714, + "charLength": 3, + "snippet": { + "text": "\tTileItemVector* itemVector = tile->getItemList();\n\tif (itemVector) {\n\t\tfor (auto &item : *itemVector) {\n\t\t\tif (((item->getContainer() || item->hasProperty(CONST_PROP_MOVABLE)) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) && !item->hasAttribute(ItemAttribute_t::UNIQUEID)) {\n\t\t\t\tcontainer->itemlist.push_front(item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32d49124a114bd178dc3333701f6e4910b958eed10f8f5c9fad0b00905cec93d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-virtual-call-in-ctor-or-dtor", + "ruleIndex": 477, + "kind": "fail", + "level": "warning", + "message": { + "text": "Do not invoke virtual member functions from destructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 7, + "charOffset": 2261, + "charLength": 9, + "snippet": { + "text": "getParent" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 7, + "charOffset": 2193, + "charLength": 9, + "snippet": { + "text": "Container::~Container() {\n\tif (getID() == ITEM_BROWSEFIELD) {\n\t\tif (getParent() && getParent()->getTile()) {\n\t\t\tg_game().browseFields.erase(getParent()->getTile());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8de0a78a681352d894585ff59a41a9b771134a171e230d4737a8a6449863cb1f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-virtual-call-in-ctor-or-dtor", + "ruleIndex": 477, + "kind": "fail", + "level": "warning", + "message": { + "text": "Do not invoke virtual member functions from destructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 22, + "charOffset": 2276, + "charLength": 9, + "snippet": { + "text": "getParent" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 22, + "charOffset": 2193, + "charLength": 9, + "snippet": { + "text": "Container::~Container() {\n\tif (getID() == ITEM_BROWSEFIELD) {\n\t\tif (getParent() && getParent()->getTile()) {\n\t\t\tg_game().browseFields.erase(getParent()->getTile());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1de20ac15a3a85c97cdef87510fbd8642348ca52184a9690d073883b075092f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 67, + "startColumn": 26, + "charOffset": 2327, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 65, + "startColumn": 26, + "charOffset": 2219, + "charLength": 5, + "snippet": { + "text": "\tif (getID() == ITEM_BROWSEFIELD) {\n\t\tif (getParent() && getParent()->getTile()) {\n\t\t\tg_game().browseFields.erase(getParent()->getTile());\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1fc867f14ea9415fad79408591314c1ae1e2b5290e7f35907de3c0871110c061" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-virtual-call-in-ctor-or-dtor", + "ruleIndex": 477, + "kind": "fail", + "level": "warning", + "message": { + "text": "Do not invoke virtual member functions from destructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 67, + "startColumn": 32, + "charOffset": 2333, + "charLength": 9, + "snippet": { + "text": "getParent" + } + }, + "contextRegion": { + "startLine": 65, + "startColumn": 32, + "charOffset": 2219, + "charLength": 9, + "snippet": { + "text": "\tif (getID() == ITEM_BROWSEFIELD) {\n\t\tif (getParent() && getParent()->getTile()) {\n\t\t\tg_game().browseFields.erase(getParent()->getTile());\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd700f3ac05ddf594164c388bcaa8328bd8cfc8bb3790706a27d96308d66cabb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 3, + "charOffset": 2365, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 3, + "charOffset": 2358, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfor (std::shared_ptr item : itemlist) {\n\t\t\titem->setParent(getParent());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e59f1d869251702741396ef7580b4dcd2fe139b0688ef31e2b5319e678b56537" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 30, + "charOffset": 2392, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 30, + "charOffset": 2358, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tfor (std::shared_ptr item : itemlist) {\n\t\t\titem->setParent(getParent());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ffb29e72695e6c738c8398e19f524699ae0809ddbfd9e50fac615c440b1bdb9b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-virtual-call-in-ctor-or-dtor", + "ruleIndex": 477, + "kind": "fail", + "level": "warning", + "message": { + "text": "Do not invoke virtual member functions from destructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 71, + "startColumn": 20, + "charOffset": 2430, + "charLength": 9, + "snippet": { + "text": "getParent" + } + }, + "contextRegion": { + "startLine": 69, + "startColumn": 20, + "charOffset": 2362, + "charLength": 9, + "snippet": { + "text": "\n\t\tfor (std::shared_ptr item : itemlist) {\n\t\t\titem->setParent(getParent());\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6dbc3d0f0ef2c0d939bd43eb7f057c968725f75aa34f140de1296182c715e15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 2, + "charOffset": 2592, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 2, + "charOffset": 2454, + "charLength": 3, + "snippet": { + "text": "std::shared_ptr Container::clone() const {\n\tstd::shared_ptr clone = std::static_pointer_cast(Item::clone());\n\tfor (std::shared_ptr item : itemlist) {\n\t\tclone->addItem(item->clone());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70b46a1131d41895260ca2f13dfadb4b254dd34301e18592d08a2a9dc3dc3a91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 29, + "charOffset": 2619, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 29, + "charOffset": 2454, + "charLength": 4, + "snippet": { + "text": "std::shared_ptr Container::clone() const {\n\tstd::shared_ptr clone = std::static_pointer_cast(Item::clone());\n\tfor (std::shared_ptr item : itemlist) {\n\t\tclone->addItem(item->clone());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fdb0ba26428a5a6e8188e198856e0cc2b5469d2ee443559b3feedc56259c922b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 6, + "charOffset": 2838, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 6, + "charOffset": 2727, + "charLength": 1, + "snippet": { + "text": "std::shared_ptr Container::getParentContainer() {\n\tstd::shared_ptr thing = getParent();\n\tif (!thing) {\n\t\treturn nullptr;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b210b27447072994e1bf016725e3814dbd80adc61ee09da5b36ecedbe6e50305" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 96, + "startColumn": 6, + "charOffset": 3069, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 6, + "charOffset": 2967, + "charLength": 1, + "snippet": { + "text": "\tstd::shared_ptr thing = getParent();\n\tstd::shared_ptr prevThing = getContainer();\n\tif (!thing) {\n\t\treturn prevThing->getContainer();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70d912794ea9d63b625daec3f512f4d3af7e3a107e71f1d4ffd793738f66145f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 100, + "startColumn": 2, + "charOffset": 3120, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 98, + "startColumn": 2, + "charOffset": 3115, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\twhile (thing->getParent() != nullptr && thing->getParent()->getContainer()) {\n\t\tprevThing = thing;\n\t\tthing = thing->getParent();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48430d01209c9801887b2f2e45d3d72d3386eaa092cd31685ddbed6675fdd1ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 118, + "startColumn": 6, + "charOffset": 3503, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 116, + "startColumn": 6, + "charOffset": 3440, + "charLength": 1, + "snippet": { + "text": "bool Container::hasParent() {\n\tauto parent = getParent();\n\tif (!parent) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47145a6e5ef26dc11a0ab5220d557e14166ae9dc8354aa1db47e3bc0ea8e9e83" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 126, + "startColumn": 47, + "charOffset": 3735, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 124, + "startColumn": 47, + "charOffset": 3686, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Container::addItem(std::shared_ptr item) {\n\titemlist.push_back(item);\n\titem->setParent(getContainer());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4879ee188ee691759b65a0cb72d00525356007873ad64191775c45e26c861e4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'getStowableItems' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 131, + "startColumn": 31, + "charOffset": 3837, + "charLength": 16, + "snippet": { + "text": "getStowableItems" + } + }, + "contextRegion": { + "startLine": 129, + "startColumn": 31, + "charOffset": 3804, + "charLength": 16, + "snippet": { + "text": "}\n\nStashContainerList Container::getStowableItems() const {\n\tStashContainerList toReturnList;\n\tfor (auto item : itemlist) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de88e7cca6424f14018ad81061f5ebf8644c4f9cf9438ab2ea6ecbac709467d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 133, + "startColumn": 12, + "charOffset": 3909, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 131, + "startColumn": 12, + "charOffset": 3807, + "charLength": 4, + "snippet": { + "text": "StashContainerList Container::getStowableItems() const {\n\tStashContainerList toReturnList;\n\tfor (auto item : itemlist) {\n\t\tif (item->getContainer() != NULL) {\n\t\t\tauto subContainer = item->getContainer()->getStowableItems();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "365bf0d89c7b0af0dc475a291381c9a574aed3e3c6b4295c8ba0a374c413a615" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 3, + "charOffset": 3930, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 3, + "charOffset": 3864, + "charLength": 2, + "snippet": { + "text": "\tStashContainerList toReturnList;\n\tfor (auto item : itemlist) {\n\t\tif (item->getContainer() != NULL) {\n\t\t\tauto subContainer = item->getContainer()->getStowableItems();\n\t\t\tfor (auto subContItem : subContainer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73f0961130aa5254d1ef49251dacdb982f2ae9c85b82ee29330ce17bcd1928e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-nullptr", + "ruleIndex": 577, + "kind": "fail", + "level": "warning", + "message": { + "text": "use nullptr" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 31, + "charOffset": 3958, + "charLength": 4, + "snippet": { + "text": "NULL" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 31, + "charOffset": 3864, + "charLength": 4, + "snippet": { + "text": "\tStashContainerList toReturnList;\n\tfor (auto item : itemlist) {\n\t\tif (item->getContainer() != NULL) {\n\t\t\tauto subContainer = item->getContainer()->getStowableItems();\n\t\t\tfor (auto subContItem : subContainer) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52af4a64d565fee51a06a50ea5eb4e18384ecd8a5c9554e673357185d4fe2c80" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 136, + "startColumn": 4, + "charOffset": 4034, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 4, + "charOffset": 3928, + "charLength": 3, + "snippet": { + "text": "\t\tif (item->getContainer() != NULL) {\n\t\t\tauto subContainer = item->getContainer()->getStowableItems();\n\t\t\tfor (auto subContItem : subContainer) {\n\t\t\t\tstd::shared_ptr containerItem = subContItem.first;\n\t\t\t\ttoReturnList.push_back(std::pair, uint32_t>(containerItem, static_cast(containerItem->getItemCount())));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39ebdf33982d3054f820c134114c74b5ac210c1f92fe1b88831f5211f81e7dc5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 136, + "startColumn": 14, + "charOffset": 4044, + "charLength": 11, + "snippet": { + "text": "subContItem" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 14, + "charOffset": 3928, + "charLength": 11, + "snippet": { + "text": "\t\tif (item->getContainer() != NULL) {\n\t\t\tauto subContainer = item->getContainer()->getStowableItems();\n\t\t\tfor (auto subContItem : subContainer) {\n\t\t\t\tstd::shared_ptr containerItem = subContItem.first;\n\t\t\t\ttoReturnList.push_back(std::pair, uint32_t>(containerItem, static_cast(containerItem->getItemCount())));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4493ea542d00cfeefce0794d5c77f5698d262d400df0c30e546d608134e597e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-emplace", + "ruleIndex": 573, + "kind": "fail", + "level": "warning", + "message": { + "text": "use emplace_back instead of push_back" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 138, + "startColumn": 18, + "charOffset": 4152, + "charLength": 9, + "snippet": { + "text": "push_back" + } + }, + "contextRegion": { + "startLine": 136, + "startColumn": 18, + "charOffset": 4031, + "charLength": 9, + "snippet": { + "text": "\t\t\tfor (auto subContItem : subContainer) {\n\t\t\t\tstd::shared_ptr containerItem = subContItem.first;\n\t\t\t\ttoReturnList.push_back(std::pair, uint32_t>(containerItem, static_cast(containerItem->getItemCount())));\n\t\t\t}\n\t\t} else if (item->isItemStorable()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53803a57eb1bd7fb92b517081575982d54bc799f5176caf6bc15bf71daa13aaf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-emplace", + "ruleIndex": 573, + "kind": "fail", + "level": "warning", + "message": { + "text": "use emplace_back instead of push_back" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 141, + "startColumn": 17, + "charOffset": 4336, + "charLength": 9, + "snippet": { + "text": "push_back" + } + }, + "contextRegion": { + "startLine": 139, + "startColumn": 17, + "charOffset": 4276, + "charLength": 9, + "snippet": { + "text": "\t\t\t}\n\t\t} else if (item->isItemStorable()) {\n\t\t\ttoReturnList.push_back(std::pair, uint32_t>(item, static_cast(item->getItemCount())));\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51c3370d62bcf36bf6f31d576ea7971f8332c1feebf2ecad19b6e23f5bb9af24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 164, + "startColumn": 2, + "charOffset": 4993, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 162, + "startColumn": 2, + "charOffset": 4988, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (auto &itemNode : node.children) {\n\t\t// load container items\n\t\tif (itemNode.type != OTBM_ITEM) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "066e3fd1d8eb6314554c9df876c412a820e39e817f784d09f38a9074cea5eb04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &itemNode' can be declared as 'const auto &itemNode'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 164, + "startColumn": 7, + "charOffset": 4998, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 162, + "startColumn": 7, + "charOffset": 4988, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tfor (auto &itemNode : node.children) {\n\t\t// load container items\n\t\tif (itemNode.type != OTBM_ITEM) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "968e82d00f4fa8bf5b391c6acbdb860050724c21d929ece26d919da6283c1311" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'id' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 176, + "startColumn": 12, + "charOffset": 5249, + "charLength": 2, + "snippet": { + "text": "id" + } + }, + "contextRegion": { + "startLine": 174, + "startColumn": 12, + "charOffset": 5233, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tuint16_t id;\n\t\tif (!itemPropStream.read(id)) {\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba7a840b4dd4444cc9922dd1ca0eaa35330bac56ae8516dc898bfa961921a65f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 182, + "startColumn": 7, + "charOffset": 5392, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 180, + "startColumn": 7, + "charOffset": 5318, + "charLength": 1, + "snippet": { + "text": "\n\t\tstd::shared_ptr item = Item::CreateItem(id, itemPosition);\n\t\tif (!item) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d89391e7b9e03ec22577dfd830fd3fb7cb29167b922c4305e016b74fcc8c2db6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 191, + "startColumn": 20, + "charOffset": 5557, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 189, + "startColumn": 20, + "charOffset": 5520, + "charLength": 4, + "snippet": { + "text": "\n\t\taddItem(item);\n\t\tupdateItemWeight(item->getWeight());\n\t}\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "405e59e3301ba21df2196d485319f545b6d6fb1bc6de66c6c8a7627019ad16d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 211, + "startColumn": 2, + "charOffset": 5895, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 209, + "startColumn": 2, + "charOffset": 5810, + "charLength": 5, + "snippet": { + "text": "\ttotalWeight += diff;\n\tstd::shared_ptr parentContainer = getContainer();\n\twhile ((parentContainer = parentContainer->getParentContainer()) != nullptr) {\n\t\tparentContainer->totalWeight += diff;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10c6d1d0d588e7f5284428378ae6bf9699d7e1c1558805fcae4831895aa0346a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 227, + "startColumn": 2, + "charOffset": 6379, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 225, + "startColumn": 2, + "charOffset": 6250, + "charLength": 3, + "snippet": { + "text": "std::ostringstream &Container::getContentDescription(std::ostringstream &os, bool sendColoredMessage) {\n\tbool firstitem = true;\n\tfor (ContainerIterator it = iterator(); it.hasNext(); it.advance()) {\n\t\tstd::shared_ptr item = *it;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e0aeee5d8c96f66703f3c880fc9ce8063a9c71fab54ebfdeb7439f9c07ac40b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 227, + "startColumn": 2, + "charOffset": 6379, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 225, + "startColumn": 2, + "charOffset": 6250, + "charLength": 3, + "snippet": { + "text": "std::ostringstream &Container::getContentDescription(std::ostringstream &os, bool sendColoredMessage) {\n\tbool firstitem = true;\n\tfor (ContainerIterator it = iterator(); it.hasNext(); it.advance()) {\n\t\tstd::shared_ptr item = *it;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0739032f8bf9305e27e4438bb25a0e7a511279d1e516080253dc725997750469" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in conditional return statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 265, + "startColumn": 10, + "charOffset": 7249, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 263, + "startColumn": 10, + "charOffset": 7089, + "charLength": 4, + "snippet": { + "text": "\tauto attribute = getAttribute(ItemAttribute_t::STORE_INBOX_CATEGORY);\n\tif (isStoreInbox() && !attribute.empty() && attribute != \"All\") {\n\t\treturn true;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "750a8cbf0c400f6e0f9911893d538427495206bce21f8ad9e78446b1fb41e461" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 275, + "startColumn": 3, + "charOffset": 7516, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 273, + "startColumn": 3, + "charOffset": 7448, + "charLength": 3, + "snippet": { + "text": "\tItemDeque storeInboxFilteredList;\n\tif (isStoreInboxFiltered()) {\n\t\tfor (std::shared_ptr item : getItemList()) {\n\t\t\tauto itemId = item->getID();\n\t\t\tauto attribute = item->getCustomAttribute(\"unWrapId\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "777956d00bae3c1cf30c9f17a997096f0c47e83c54ec2072641a58c7890bb208" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 275, + "startColumn": 30, + "charOffset": 7543, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 273, + "startColumn": 30, + "charOffset": 7448, + "charLength": 4, + "snippet": { + "text": "\tItemDeque storeInboxFilteredList;\n\tif (isStoreInboxFiltered()) {\n\t\tfor (std::shared_ptr item : getItemList()) {\n\t\t\tauto itemId = item->getID();\n\t\t\tauto attribute = item->getCustomAttribute(\"unWrapId\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05542d7b8e999074b008c35d8efdb42419a9b89484cdd82ec95afe807cbd1330" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto attribute' can be declared as 'const auto *attribute'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 277, + "startColumn": 4, + "charOffset": 7602, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 275, + "startColumn": 4, + "charOffset": 7514, + "charLength": 4, + "snippet": { + "text": "\t\tfor (std::shared_ptr item : getItemList()) {\n\t\t\tauto itemId = item->getID();\n\t\t\tauto attribute = item->getCustomAttribute(\"unWrapId\");\n\t\t\tuint16_t unWrapId = attribute ? static_cast(attribute->getInteger()) : 0;\n\t\t\tif (unWrapId != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9cef8a7d513479940cf97f47de93eec1ef6cb97a53f57f02892604a4f9c698d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 278, + "startColumn": 24, + "charOffset": 7680, + "charLength": 9, + "snippet": { + "text": "attribute" + } + }, + "contextRegion": { + "startLine": 276, + "startColumn": 24, + "charOffset": 7567, + "charLength": 9, + "snippet": { + "text": "\t\t\tauto itemId = item->getID();\n\t\t\tauto attribute = item->getCustomAttribute(\"unWrapId\");\n\t\t\tuint16_t unWrapId = attribute ? static_cast(attribute->getInteger()) : 0;\n\t\t\tif (unWrapId != 0) {\n\t\t\t\titemId = unWrapId;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f38638d467ee485c69dfa11827e39f094254144ab30ce58764c37f81a8e20b73" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 278, + "startColumn": 24, + "charOffset": 7680, + "charLength": 9, + "snippet": { + "text": "attribute" + } + }, + "contextRegion": { + "startLine": 276, + "startColumn": 24, + "charOffset": 7567, + "charLength": 9, + "snippet": { + "text": "\t\t\tauto itemId = item->getID();\n\t\t\tauto attribute = item->getCustomAttribute(\"unWrapId\");\n\t\t\tuint16_t unWrapId = attribute ? static_cast(attribute->getInteger()) : 0;\n\t\t\tif (unWrapId != 0) {\n\t\t\t\titemId = unWrapId;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9d5a9bc77cffeea2bd61e26cdd6a8ac0745234cfcffe51a461c8b2a775fc737" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 278, + "startColumn": 24, + "charOffset": 7680, + "charLength": 9, + "snippet": { + "text": "attribute" + } + }, + "contextRegion": { + "startLine": 276, + "startColumn": 24, + "charOffset": 7567, + "charLength": 9, + "snippet": { + "text": "\t\t\tauto itemId = item->getID();\n\t\t\tauto attribute = item->getCustomAttribute(\"unWrapId\");\n\t\t\tuint16_t unWrapId = attribute ? static_cast(attribute->getInteger()) : 0;\n\t\t\tif (unWrapId != 0) {\n\t\t\t\titemId = unWrapId;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c286284b3906be69c2a2106812550c26de984801cf4222c646858cad6bb80358" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 297, + "startColumn": 2, + "charOffset": 8311, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 295, + "startColumn": 2, + "charOffset": 8169, + "charLength": 3, + "snippet": { + "text": "std::vector Container::getStoreInboxValidCategories() const {\n\tstdext::vector_set validCategories;\n\tfor (const auto &item : itemlist) {\n\t\tauto itemId = item->getID();\n\t\tauto attribute = item->getCustomAttribute(\"unWrapId\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42be301bc54f22f4a048aabb42ffa54ad3bfeae709f1f29fb8359072988094a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto attribute' can be declared as 'const auto *attribute'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 299, + "startColumn": 3, + "charOffset": 8380, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 297, + "startColumn": 3, + "charOffset": 8310, + "charLength": 4, + "snippet": { + "text": "\tfor (const auto &item : itemlist) {\n\t\tauto itemId = item->getID();\n\t\tauto attribute = item->getCustomAttribute(\"unWrapId\");\n\t\tuint16_t unWrapId = attribute ? static_cast(attribute->getInteger()) : 0;\n\t\tif (unWrapId != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e610c9a1ae028c46fd79938809716a520f08547ff9c6421831cf948b6bd3f0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 300, + "startColumn": 23, + "charOffset": 8457, + "charLength": 9, + "snippet": { + "text": "attribute" + } + }, + "contextRegion": { + "startLine": 298, + "startColumn": 23, + "charOffset": 8347, + "charLength": 9, + "snippet": { + "text": "\t\tauto itemId = item->getID();\n\t\tauto attribute = item->getCustomAttribute(\"unWrapId\");\n\t\tuint16_t unWrapId = attribute ? static_cast(attribute->getInteger()) : 0;\n\t\tif (unWrapId != 0) {\n\t\t\titemId = unWrapId;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8603d70a0abcae403dc58ff8d30b016851efcc48ad35276cbd5afb6fe0c3d167" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 300, + "startColumn": 23, + "charOffset": 8457, + "charLength": 9, + "snippet": { + "text": "attribute" + } + }, + "contextRegion": { + "startLine": 298, + "startColumn": 23, + "charOffset": 8347, + "charLength": 9, + "snippet": { + "text": "\t\tauto itemId = item->getID();\n\t\tauto attribute = item->getCustomAttribute(\"unWrapId\");\n\t\tuint16_t unWrapId = attribute ? static_cast(attribute->getInteger()) : 0;\n\t\tif (unWrapId != 0) {\n\t\t\titemId = unWrapId;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06e175875793815d1659d609a9ecdc422be5b7bf82906dfeb52197bbaf1cb507" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 300, + "startColumn": 23, + "charOffset": 8457, + "charLength": 9, + "snippet": { + "text": "attribute" + } + }, + "contextRegion": { + "startLine": 298, + "startColumn": 23, + "charOffset": 8347, + "charLength": 9, + "snippet": { + "text": "\t\tauto itemId = item->getID();\n\t\tauto attribute = item->getCustomAttribute(\"unWrapId\");\n\t\tuint16_t unWrapId = attribute ? static_cast(attribute->getInteger()) : 0;\n\t\tif (unWrapId != 0) {\n\t\t\titemId = unWrapId;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7fb11f4831a8e9659652d80aa2894b097a9bf4be2b94caa29b2daaf6794c863b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "the variable 'item' is copy-constructed from a const reference but is only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 323, + "startColumn": 7, + "charOffset": 9260, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 321, + "startColumn": 7, + "charOffset": 9250, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tauto item = filteredItems[index];\n\n\tauto it = std::find(itemlist.begin(), itemlist.end(), item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "389f208052de91f0e334bb0876fc5965771e08f7be1cac6ee46690875c305cf7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 343, + "startColumn": 2, + "charOffset": 9631, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 341, + "startColumn": 2, + "charOffset": 9563, + "charLength": 3, + "snippet": { + "text": "uint32_t Container::getItemHoldingCount() {\n\tuint32_t counter = 0;\n\tfor (ContainerIterator it = iterator(); it.hasNext(); it.advance()) {\n\t\t++counter;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6efd165a7ffe6372736de2f3da2623fea5d19f0b11ab340dc9dc88ecef72e467" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 343, + "startColumn": 2, + "charOffset": 9631, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 341, + "startColumn": 2, + "charOffset": 9563, + "charLength": 3, + "snippet": { + "text": "uint32_t Container::getItemHoldingCount() {\n\tuint32_t counter = 0;\n\tfor (ContainerIterator it = iterator(); it.hasNext(); it.advance()) {\n\t\t++counter;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e138fbb4f16f600714ee11c7ede1be44dcc68024b1169cf73effa8062faf696d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 351, + "startColumn": 2, + "charOffset": 9810, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 349, + "startColumn": 2, + "charOffset": 9737, + "charLength": 3, + "snippet": { + "text": "uint32_t Container::getContainerHoldingCount() {\n\tuint32_t counter = 0;\n\tfor (ContainerIterator it = iterator(); it.hasNext(); it.advance()) {\n\t\tif ((*it)->getContainer()) {\n\t\t\t++counter;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5469a25136c348d9a5918a67f2dc71d1fa667c6b1d0977ce14322be51fa909b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 351, + "startColumn": 2, + "charOffset": 9810, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 349, + "startColumn": 2, + "charOffset": 9737, + "charLength": 3, + "snippet": { + "text": "uint32_t Container::getContainerHoldingCount() {\n\tuint32_t counter = 0;\n\tfor (ContainerIterator it = iterator(); it.hasNext(); it.advance()) {\n\t\tif ((*it)->getContainer()) {\n\t\t\t++counter;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1896f6db8a1eae3a18d8627682e0f1f22244dd5317107187739a004cb2c4e7a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 359, + "startColumn": 53, + "charOffset": 10004, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 357, + "startColumn": 53, + "charOffset": 9949, + "charLength": 4, + "snippet": { + "text": "}\n\nbool Container::isHoldingItem(std::shared_ptr item) {\n\tfor (ContainerIterator it = iterator(); it.hasNext(); it.advance()) {\n\t\tif (*it == item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92b9651b097df0eedad8aa9bc4ff2c6cd7106c8f9d22e3823d7b060c97d1a6d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 360, + "startColumn": 2, + "charOffset": 10013, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 358, + "startColumn": 2, + "charOffset": 9951, + "charLength": 3, + "snippet": { + "text": "\nbool Container::isHoldingItem(std::shared_ptr item) {\n\tfor (ContainerIterator it = iterator(); it.hasNext(); it.advance()) {\n\t\tif (*it == item) {\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9a657fb3ab738802b0c9b35ebe04303be89662efcec33fbd57772eebb09fc02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 360, + "startColumn": 2, + "charOffset": 10013, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 358, + "startColumn": 2, + "charOffset": 9951, + "charLength": 3, + "snippet": { + "text": "\nbool Container::isHoldingItem(std::shared_ptr item) {\n\tfor (ContainerIterator it = iterator(); it.hasNext(); it.advance()) {\n\t\tif (*it == item) {\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d007647121493aead51f481085267ff2e32da6360e6a3584e7949168c0123ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 369, + "startColumn": 2, + "charOffset": 10203, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 367, + "startColumn": 2, + "charOffset": 10144, + "charLength": 3, + "snippet": { + "text": "\nbool Container::isHoldingItemWithId(const uint16_t id) {\n\tfor (ContainerIterator it = iterator(); it.hasNext(); it.advance()) {\n\t\tstd::shared_ptr item = *it;\n\t\tif (item->getID() == id) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17264929a3d1eddb8d82f12a3bd6697984033328b83abe6960c4b34d8f70071b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 369, + "startColumn": 2, + "charOffset": 10203, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 367, + "startColumn": 2, + "charOffset": 10144, + "charLength": 3, + "snippet": { + "text": "\nbool Container::isHoldingItemWithId(const uint16_t id) {\n\tfor (ContainerIterator it = iterator(); it.hasNext(); it.advance()) {\n\t\tstd::shared_ptr item = *it;\n\t\tif (item->getID() == id) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5d3e38d02aeae3f0c27c9350ca069afd6e334fe1c1096d5ca781c8097e87bd6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 380, + "startColumn": 2, + "charOffset": 10473, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 378, + "startColumn": 2, + "charOffset": 10379, + "charLength": 5, + "snippet": { + "text": "bool Container::isInsideContainerWithId(const uint16_t id) {\n\tauto nextParent = getParent();\n\twhile (nextParent != nullptr && nextParent->getContainer()) {\n\t\tif (nextParent->getContainer()->getID() == id) {\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac9426df2abcb59f41eaa04be65a702dd25b03cbc017562a23eb76b63a12bbfc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 401, + "startColumn": 58, + "charOffset": 11350, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 399, + "startColumn": 58, + "charOffset": 11290, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Container::onAddContainerItem(std::shared_ptr item) {\n\tauto spectators = Spectators().find(getPosition(), false, 2, 2, 2, 2);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ef9db4bd7de383b8f82f6fca80cf562c9938466a1209dfe0605034dd29d5f1e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 405, + "startColumn": 2, + "charOffset": 11459, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 403, + "startColumn": 2, + "charOffset": 11438, + "charLength": 3, + "snippet": { + "text": "\n\t// send to client\n\tfor (const auto &spectator : spectators) {\n\t\tspectator->getPlayer()->sendAddContainerItem(getContainer(), item);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "862bf7b1974948bca4ddd394bda22b48f121da9d3a8d775ef3f1a70351713ef1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 410, + "startColumn": 2, + "charOffset": 11595, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 408, + "startColumn": 2, + "charOffset": 11575, + "charLength": 3, + "snippet": { + "text": "\n\t// event methods\n\tfor (const auto &spectator : spectators) {\n\t\tspectator->getPlayer()->onAddContainerItem(item);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c48b501fd67813476efc90716b35e2d5126028bc4030cfd73159e847c8a1571" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 415, + "startColumn": 77, + "charOffset": 11772, + "charLength": 7, + "snippet": { + "text": "oldItem" + } + }, + "contextRegion": { + "startLine": 413, + "startColumn": 77, + "charOffset": 11693, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid Container::onUpdateContainerItem(uint32_t index, std::shared_ptr oldItem, std::shared_ptr newItem) {\n\tauto spectators = Spectators().find(getPosition(), false, 2, 2, 2, 2);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3dea0d24ef0a4f514a1c6255304dea87c2120b729dd25190c0d0351a43cd743d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 415, + "startColumn": 108, + "charOffset": 11803, + "charLength": 7, + "snippet": { + "text": "newItem" + } + }, + "contextRegion": { + "startLine": 413, + "startColumn": 108, + "charOffset": 11693, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid Container::onUpdateContainerItem(uint32_t index, std::shared_ptr oldItem, std::shared_ptr newItem) {\n\tauto spectators = Spectators().find(getPosition(), false, 2, 2, 2, 2);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c7ef9467130aef71dac02bd4897f0659beb07fa3b45229976459823da7fe24b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 419, + "startColumn": 2, + "charOffset": 11915, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 417, + "startColumn": 2, + "charOffset": 11894, + "charLength": 3, + "snippet": { + "text": "\n\t// send to client\n\tfor (const auto &spectator : spectators) {\n\t\tspectator->getPlayer()->sendUpdateContainerItem(getContainer(), index, newItem);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50c608f156e088ec2c7d8726fe7775b825ff6f8b9491b56bf4b831cbddfbbd9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 420, + "startColumn": 67, + "charOffset": 12024, + "charLength": 5, + "snippet": { + "text": "index" + } + }, + "contextRegion": { + "startLine": 418, + "startColumn": 67, + "charOffset": 11895, + "charLength": 5, + "snippet": { + "text": "\t// send to client\n\tfor (const auto &spectator : spectators) {\n\t\tspectator->getPlayer()->sendUpdateContainerItem(getContainer(), index, newItem);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23d7a5ef6b504a82b430391c0458eca5a85cd7d88e18735c44775bbd173fedf9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 424, + "startColumn": 2, + "charOffset": 12064, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 422, + "startColumn": 2, + "charOffset": 12044, + "charLength": 3, + "snippet": { + "text": "\n\t// event methods\n\tfor (const auto &spectator : spectators) {\n\t\tspectator->getPlayer()->onUpdateContainerItem(getContainer(), oldItem, newItem);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70b46a1131d41895260ca2f13dfadb4b254dd34301e18592d08a2a9dc3dc3a91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 429, + "startColumn": 77, + "charOffset": 12272, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 427, + "startColumn": 77, + "charOffset": 12193, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Container::onRemoveContainerItem(uint32_t index, std::shared_ptr item) {\n\tauto spectators = Spectators().find(getPosition(), false, 2, 2, 2, 2);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3d03b5ed247414b9525dadfaffd04a25566e8f5da5ee3606259f45fc1704732" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 433, + "startColumn": 2, + "charOffset": 12388, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 431, + "startColumn": 2, + "charOffset": 12360, + "charLength": 3, + "snippet": { + "text": "\n\t// send change to client\n\tfor (const auto &spectator : spectators) {\n\t\tspectator->getPlayer()->sendRemoveContainerItem(getContainer(), index);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82b6d4bc9f987309d7c9b2284b827941c2fc7106cf36f0b0b19902424c3dc19d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 434, + "startColumn": 67, + "charOffset": 12497, + "charLength": 5, + "snippet": { + "text": "index" + } + }, + "contextRegion": { + "startLine": 432, + "startColumn": 67, + "charOffset": 12361, + "charLength": 5, + "snippet": { + "text": "\t// send change to client\n\tfor (const auto &spectator : spectators) {\n\t\tspectator->getPlayer()->sendRemoveContainerItem(getContainer(), index);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3ba4103f132d13fcfc468677f2ba2c03a72188b57ce302b7f991357a483e1c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 438, + "startColumn": 2, + "charOffset": 12528, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 436, + "startColumn": 2, + "charOffset": 12508, + "charLength": 3, + "snippet": { + "text": "\n\t// event methods\n\tfor (const auto &spectator : spectators) {\n\t\tspectator->getPlayer()->onRemoveContainerItem(getContainer(), item);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08712c00eff8b7c7fd1332e34f2d082f4787b7cbfe973c9aa2606c7e3d3be805" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 443, + "startColumn": 24, + "charOffset": 12671, + "charLength": 8, + "snippet": { + "text": "queryAdd" + } + }, + "contextRegion": { + "startLine": 441, + "startColumn": 24, + "charOffset": 12645, + "charLength": 8, + "snippet": { + "text": "}\n\nReturnValue Container::queryAdd(int32_t addIndex, const std::shared_ptr &addThing, uint32_t addCount, uint32_t flags, std::shared_ptr actor /* = nullptr*/) {\n\tbool childIsOwner = hasBitSet(FLAG_CHILDISOWNER, flags);\n\tif (childIsOwner) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc9d9c96c7d831272675f48721ae4534ae9a6aa52ee678512a6f8e449671aa24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'queryAdd' has cognitive complexity of 39 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 443, + "startColumn": 24, + "charOffset": 12671, + "charLength": 8, + "snippet": { + "text": "queryAdd" + } + }, + "contextRegion": { + "startLine": 441, + "startColumn": 24, + "charOffset": 12645, + "charLength": 8, + "snippet": { + "text": "}\n\nReturnValue Container::queryAdd(int32_t addIndex, const std::shared_ptr &addThing, uint32_t addCount, uint32_t flags, std::shared_ptr actor /* = nullptr*/) {\n\tbool childIsOwner = hasBitSet(FLAG_CHILDISOWNER, flags);\n\tif (childIsOwner) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "209298b60d159a07645226fe739550dbf4c75225051e1a5c1b6b408ab79755f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 482, + "startColumn": 2, + "charOffset": 13848, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 480, + "startColumn": 2, + "charOffset": 13748, + "charLength": 5, + "snippet": { + "text": "\tstd::shared_ptr cylinder = getParent();\n\tauto noLimit = hasBitSet(FLAG_NOLIMIT, flags);\n\twhile (cylinder) {\n\t\tif (cylinder == addThing) {\n\t\t\treturn RETURNVALUE_THISISIMPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23564ff9f73995fd17305f99bebdbe87fd3f130ce97978500e907b30559b35e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 527, + "startColumn": 69, + "charOffset": 15528, + "charLength": 1, + "snippet": { + "text": "|" + } + }, + "contextRegion": { + "startLine": 525, + "startColumn": 69, + "charOffset": 15369, + "charLength": 1, + "snippet": { + "text": "\tstd::shared_ptr topParent = getTopParent();\n\tif (topParent != getContainer()) {\n\t\treturn topParent->queryAdd(INDEX_WHEREEVER, item, addCount, flags | FLAG_CHILDISOWNER, actor);\n\t} else {\n\t\treturn RETURNVALUE_NOERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc862ed18e04c8d7457cc09f8da779479f17e8876cb39b35a57b42b69f1371a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 528, + "startColumn": 4, + "charOffset": 15560, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 526, + "startColumn": 4, + "charOffset": 15424, + "charLength": 4, + "snippet": { + "text": "\tif (topParent != getContainer()) {\n\t\treturn topParent->queryAdd(INDEX_WHEREEVER, item, addCount, flags | FLAG_CHILDISOWNER, actor);\n\t} else {\n\t\treturn RETURNVALUE_NOERROR;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a62d0b50db362aa1478aac5f2edbaa8731a013032d1de2ea2e0dcdb4a9c2cac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'queryMaxCount' has cognitive complexity of 29 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 533, + "startColumn": 24, + "charOffset": 15626, + "charLength": 13, + "snippet": { + "text": "queryMaxCount" + } + }, + "contextRegion": { + "startLine": 531, + "startColumn": 24, + "charOffset": 15600, + "charLength": 13, + "snippet": { + "text": "}\n\nReturnValue Container::queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) {\n\tstd::shared_ptr item = thing->getItem();\n\tif (item == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3cef91f47537719fa84e290bee0a90e6a8f271574b2a0e6693c6bc73d923b2c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 545, + "startColumn": 40, + "charOffset": 16061, + "charLength": 8, + "snippet": { + "text": "capacity" + } + }, + "contextRegion": { + "startLine": 543, + "startColumn": 40, + "charOffset": 16018, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tint32_t freeSlots = std::max(capacity() - size(), 0);\n\n\tif (item->isStackable()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72bcec3fc982f35e568563259f5694700fb7fce173fa167fb2bf584cbda0b0fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 545, + "startColumn": 40, + "charOffset": 16061, + "charLength": 8, + "snippet": { + "text": "capacity" + } + }, + "contextRegion": { + "startLine": 543, + "startColumn": 40, + "charOffset": 16018, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tint32_t freeSlots = std::max(capacity() - size(), 0);\n\n\tif (item->isStackable()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "811017b891d24cf4ea41cfc4dbcc12b0ac546717e353ef5b77fe3888e1fd12f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 553, + "startColumn": 4, + "charOffset": 16281, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 551, + "startColumn": 4, + "charOffset": 16168, + "charLength": 3, + "snippet": { + "text": "\t\t\t// Iterate through every item and check how much free stackable slots there is.\n\t\t\tuint32_t slotIndex = 0;\n\t\t\tfor (std::shared_ptr containerItem : itemlist) {\n\t\t\t\tif (containerItem != item && containerItem->equals(item) && containerItem->getItemCount() < containerItem->getStackSize()) {\n\t\t\t\t\tuint32_t remainder = (containerItem->getStackSize() - containerItem->getItemCount());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "981f6d717b0d66df2bc8508db5d9166c9e5cf99d460de3cef494756867ac871f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 553, + "startColumn": 31, + "charOffset": 16308, + "charLength": 13, + "snippet": { + "text": "containerItem" + } + }, + "contextRegion": { + "startLine": 551, + "startColumn": 31, + "charOffset": 16168, + "charLength": 13, + "snippet": { + "text": "\t\t\t// Iterate through every item and check how much free stackable slots there is.\n\t\t\tuint32_t slotIndex = 0;\n\t\t\tfor (std::shared_ptr containerItem : itemlist) {\n\t\t\t\tif (containerItem != item && containerItem->equals(item) && containerItem->getItemCount() < containerItem->getStackSize()) {\n\t\t\t\t\tuint32_t remainder = (containerItem->getStackSize() - containerItem->getItemCount());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b386a9c12c5c4827d4020954f1c3fb48884339ef74c9a34aa8c4b7f6786a907" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 556, + "startColumn": 19, + "charOffset": 16574, + "charLength": 9, + "snippet": { + "text": "slotIndex" + } + }, + "contextRegion": { + "startLine": 554, + "startColumn": 19, + "charOffset": 16336, + "charLength": 9, + "snippet": { + "text": "\t\t\t\tif (containerItem != item && containerItem->equals(item) && containerItem->getItemCount() < containerItem->getStackSize()) {\n\t\t\t\t\tuint32_t remainder = (containerItem->getStackSize() - containerItem->getItemCount());\n\t\t\t\t\tif (queryAdd(slotIndex++, item, remainder, flags) == RETURNVALUE_NOERROR) {\n\t\t\t\t\t\tn += remainder;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db8c2def231721fe9552dc2c814fa9312982cb6153b207c2c57504bd8386feef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 582, + "startColumn": 24, + "charOffset": 17269, + "charLength": 11, + "snippet": { + "text": "queryRemove" + } + }, + "contextRegion": { + "startLine": 580, + "startColumn": 24, + "charOffset": 17243, + "charLength": 11, + "snippet": { + "text": "}\n\nReturnValue Container::queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor /*= nullptr */) {\n\tint32_t index = getThingIndex(thing);\n\tif (index == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36a9cdd08efa6d715b21f308aaaf67ee075baf6418b6278582a5ba649ff0ab75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "254 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 617, + "startColumn": 15, + "charOffset": 18534, + "charLength": 3, + "snippet": { + "text": "254" + } + }, + "contextRegion": { + "startLine": 615, + "startColumn": 15, + "charOffset": 18516, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tif (index == 254 /*move up*/) {\n\t\tindex = INDEX_WHEREEVER;\n\t\t*destItem = nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d90adca36e10d624e8a9d80a8161d58e71f52ca197f0564488dbebf78871755" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 628, + "startColumn": 2, + "charOffset": 18788, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 626, + "startColumn": 2, + "charOffset": 18783, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (index == 255 /*add wherever*/) {\n\t\tindex = INDEX_WHEREEVER;\n\t\t*destItem = nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af632f8878ee14db827d7a3fab4baa9696ec8f81f4d83fc5b00430ad347abfa0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "255 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 628, + "startColumn": 15, + "charOffset": 18801, + "charLength": 3, + "snippet": { + "text": "255" + } + }, + "contextRegion": { + "startLine": 626, + "startColumn": 15, + "charOffset": 18783, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tif (index == 255 /*add wherever*/) {\n\t\tindex = INDEX_WHEREEVER;\n\t\t*destItem = nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6758c63ac6a66510841ce49fc9821e4f3616be00922c6013ae60e1262c835ec7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 628, + "startColumn": 37, + "charOffset": 18823, + "charLength": 1, + "snippet": { + "text": "{" + } + }, + "contextRegion": { + "startLine": 626, + "startColumn": 37, + "charOffset": 18783, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (index == 255 /*add wherever*/) {\n\t\tindex = INDEX_WHEREEVER;\n\t\t*destItem = nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46a9693dcf368768488b07efeb854bb2a86407a8d8d08799b05cf9dbbe241a12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 644, + "startColumn": 6, + "charOffset": 19393, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 642, + "startColumn": 6, + "charOffset": 19339, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = thing->getItem();\n\tif (!item) {\n\t\treturn getContainer();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "91ee25b3abf996dd85c72e2753b70767ad286877f569b3eada95812c44e36003" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 670, + "startColumn": 3, + "charOffset": 20122, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 668, + "startColumn": 3, + "charOffset": 20058, + "charLength": 3, + "snippet": { + "text": "\t\t// try find a suitable item to stack with\n\t\tuint32_t n = 0;\n\t\tfor (std::shared_ptr listItem : itemlist) {\n\t\t\tif (listItem != item && listItem->equals(item) && listItem->getItemCount() < listItem->getStackSize()) {\n\t\t\t\t*destItem = listItem;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5b8654e4140a9133527de164c8f4fcefa39bd7556c7690f9b84348171db2bda" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 670, + "startColumn": 30, + "charOffset": 20149, + "charLength": 8, + "snippet": { + "text": "listItem" + } + }, + "contextRegion": { + "startLine": 668, + "startColumn": 30, + "charOffset": 20058, + "charLength": 8, + "snippet": { + "text": "\t\t// try find a suitable item to stack with\n\t\tuint32_t n = 0;\n\t\tfor (std::shared_ptr listItem : itemlist) {\n\t\t\tif (listItem != item && listItem->equals(item) && listItem->getItemCount() < listItem->getStackSize()) {\n\t\t\t\t*destItem = listItem;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb7140d765726a6fcccf6dc0a4c925b719a5844caf9b4d6e1a8a907ce44ca9c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 673, + "startColumn": 13, + "charOffset": 20318, + "charLength": 1, + "snippet": { + "text": "n" + } + }, + "contextRegion": { + "startLine": 671, + "startColumn": 13, + "charOffset": 20172, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (listItem != item && listItem->equals(item) && listItem->getItemCount() < listItem->getStackSize()) {\n\t\t\t\t*destItem = listItem;\n\t\t\t\tindex = n;\n\t\t\t\treturn getContainer();\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cfb8e5fbc27477abb9fe1ad33d89fb9cc280f5dd2e86bc870a768ed97feac405" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-avoid-return-with-void-value", + "ruleIndex": 689, + "kind": "fail", + "level": "warning", + "message": { + "text": "return statement within a void function should not have a specified return value" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 683, + "startColumn": 2, + "charOffset": 20453, + "charLength": 6, + "snippet": { + "text": "return" + } + }, + "contextRegion": { + "startLine": 681, + "startColumn": 2, + "charOffset": 20394, + "charLength": 6, + "snippet": { + "text": "\nvoid Container::addThing(std::shared_ptr thing) {\n\treturn addThing(0, thing);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50a0fbfe5d8415d39dfac24a6d0bfea914fa2eb96dc2010caa643efba95bc942" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 687, + "startColumn": 6, + "charOffset": 20560, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 685, + "startColumn": 6, + "charOffset": 20482, + "charLength": 1, + "snippet": { + "text": "\nvoid Container::addThing(int32_t index, std::shared_ptr thing) {\n\tif (!thing) {\n\t\treturn /*RETURNVALUE_NOTPOSSIBLE*/;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19b99d3c5b48907104a329a082f353f022b560560d7f7f201276fbcf1f607ab5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 702, + "startColumn": 19, + "charOffset": 20898, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 700, + "startColumn": 19, + "charOffset": 20818, + "charLength": 4, + "snippet": { + "text": "\titem->setParent(getContainer());\n\titemlist.push_front(item);\n\tupdateItemWeight(item->getWeight());\n\n\t// send change to client" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83188c32539d63fc95fcbbd58629acde25a4e3fdd3d0b5a1632d1dfba84e1bc3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 710, + "startColumn": 51, + "charOffset": 21102, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 708, + "startColumn": 51, + "charOffset": 21049, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Container::addItemBack(std::shared_ptr item) {\n\taddItem(item);\n\tupdateItemWeight(item->getWeight());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ca143f6a335b66c9dfc5d55628831b1fa5c6e001151591c9eeb3ccc315c2a31" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 712, + "startColumn": 19, + "charOffset": 21144, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 710, + "startColumn": 19, + "charOffset": 21052, + "charLength": 4, + "snippet": { + "text": "void Container::addItemBack(std::shared_ptr item) {\n\taddItem(item);\n\tupdateItemWeight(item->getWeight());\n\n\t// send change to client" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49cc716f2eb49ee5bafad73dfadc8fa5c9124359d89ff66debb084357d203c5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'updateThing' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 720, + "startColumn": 59, + "charOffset": 21356, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 718, + "startColumn": 59, + "charOffset": 21295, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Container::updateThing(std::shared_ptr thing, uint16_t itemId, uint32_t count) {\n\tint32_t index = getThingIndex(thing);\n\tif (index == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76475f6c4cc73d0b71d46096aa00820aba11ee9234d54e5fa91849c27fbb3c83" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 731, + "startColumn": 28, + "charOffset": 21633, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 729, + "startColumn": 28, + "charOffset": 21602, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tconst int32_t oldWeight = item->getWeight();\n\titem->setID(itemId);\n\titem->setSubType(count);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f3c80dbfe2a07165a6d3a6350cb265c5335597a525573978137a3e63f7f1a97" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 733, + "startColumn": 19, + "charOffset": 21692, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 731, + "startColumn": 19, + "charOffset": 21606, + "charLength": 5, + "snippet": { + "text": "\tconst int32_t oldWeight = item->getWeight();\n\titem->setID(itemId);\n\titem->setSubType(count);\n\tupdateItemWeight(-oldWeight + item->getWeight());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97dda73000f996334f36ad974417f4c92d975d82c110470f89155cb844e5212b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 734, + "startColumn": 19, + "charOffset": 21718, + "charLength": 1, + "snippet": { + "text": "-" + } + }, + "contextRegion": { + "startLine": 732, + "startColumn": 19, + "charOffset": 21652, + "charLength": 1, + "snippet": { + "text": "\titem->setID(itemId);\n\titem->setSubType(count);\n\tupdateItemWeight(-oldWeight + item->getWeight());\n\n\t// send change to client" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3535c4ffeb03aaf5059344c151b91787df36d67ec8aafe49ca0ff43cffb50a77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 744, + "startColumn": 6, + "charOffset": 21978, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 742, + "startColumn": 6, + "charOffset": 21848, + "charLength": 1, + "snippet": { + "text": "void Container::replaceThing(uint32_t index, std::shared_ptr thing) {\n\tstd::shared_ptr item = thing->getItem();\n\tif (!item) {\n\t\treturn /*RETURNVALUE_NOTPOSSIBLE*/;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb3ada5bf99d5e72bca66770ce950c64083b617b57d4b963ecf711a682321abf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 749, + "startColumn": 6, + "charOffset": 22095, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 747, + "startColumn": 6, + "charOffset": 22028, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr replacedItem = getItemByIndex(index);\n\tif (!replacedItem) {\n\t\treturn /*RETURNVALUE_NOTPOSSIBLE*/;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "317aa6abc39bf64dd2ff1795e86ce124fa79a09376238c5c2784301fbfd5bb2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 755, + "startColumn": 19, + "charOffset": 22231, + "charLength": 1, + "snippet": { + "text": "-" + } + }, + "contextRegion": { + "startLine": 753, + "startColumn": 19, + "charOffset": 22154, + "charLength": 1, + "snippet": { + "text": "\titemlist[index] = item;\n\titem->setParent(getContainer());\n\tupdateItemWeight(-static_cast(replacedItem->getWeight()) + item->getWeight());\n\n\t// send change to client" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da11ffa9400539f5fd782503c31198f242e9e42dbaa1cc706f0169c5e0f5c4fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 777, + "startColumn": 64, + "charOffset": 22853, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 775, + "startColumn": 64, + "charOffset": 22728, + "charLength": 4, + "snippet": { + "text": "\n\tif (item->isStackable() && count != item->getItemCount()) {\n\t\tuint8_t newCount = static_cast(std::max(0, item->getItemCount() - count));\n\t\tconst int32_t oldWeight = item->getWeight();\n\t\titem->setItemCount(newCount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ca70885a6d5a41e9c552019701d23a9ac1c76077b3f23469363b5a11eb2687a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 778, + "startColumn": 29, + "charOffset": 22913, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 776, + "startColumn": 29, + "charOffset": 22729, + "charLength": 4, + "snippet": { + "text": "\tif (item->isStackable() && count != item->getItemCount()) {\n\t\tuint8_t newCount = static_cast(std::max(0, item->getItemCount() - count));\n\t\tconst int32_t oldWeight = item->getWeight();\n\t\titem->setItemCount(newCount);\n\t\tupdateItemWeight(-oldWeight + item->getWeight());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f3c80dbfe2a07165a6d3a6350cb265c5335597a525573978137a3e63f7f1a97" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 780, + "startColumn": 20, + "charOffset": 22983, + "charLength": 1, + "snippet": { + "text": "-" + } + }, + "contextRegion": { + "startLine": 778, + "startColumn": 20, + "charOffset": 22885, + "charLength": 1, + "snippet": { + "text": "\t\tconst int32_t oldWeight = item->getWeight();\n\t\titem->setItemCount(newCount);\n\t\tupdateItemWeight(-oldWeight + item->getWeight());\n\n\t\t// send change to client" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8de087270647a7447b49dc822c6e6aef69f02210499972db11e44c15cbc2c345" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 795, + "startColumn": 12, + "charOffset": 23313, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 793, + "startColumn": 12, + "charOffset": 23278, + "charLength": 5, + "snippet": { + "text": "\n\t\titem->resetParent();\n\t\titemlist.erase(itemlist.begin() + index);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5847d9a7bbcef0c5c368eff984f42ea21ecbe9254b0c4e5921766ccad34b2b06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 801, + "startColumn": 2, + "charOffset": 23444, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 799, + "startColumn": 2, + "charOffset": 23352, + "charLength": 3, + "snippet": { + "text": "int32_t Container::getThingIndex(std::shared_ptr thing) const {\n\tint32_t index = 0;\n\tfor (std::shared_ptr item : itemlist) {\n\t\tif (item == thing) {\n\t\t\treturn index;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32c0852abb7ff39e50986ab7d0c7302c9fe7eacfa8f1c64a49ea66598aa740e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 801, + "startColumn": 29, + "charOffset": 23471, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 799, + "startColumn": 29, + "charOffset": 23352, + "charLength": 4, + "snippet": { + "text": "int32_t Container::getThingIndex(std::shared_ptr thing) const {\n\tint32_t index = 0;\n\tfor (std::shared_ptr item : itemlist) {\n\t\tif (item == thing) {\n\t\t\treturn index;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc8ae0a0b406bbd7bcf1f7d7ad6a02591a44d652282e155831a2907e9af03e81" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 818, + "startColumn": 21, + "charOffset": 23699, + "charLength": 16, + "snippet": { + "text": "getItemTypeCount" + } + }, + "contextRegion": { + "startLine": 816, + "startColumn": 21, + "charOffset": 23676, + "charLength": 16, + "snippet": { + "text": "}\n\nuint32_t Container::getItemTypeCount(uint16_t itemId, int32_t subType /* = -1*/) const {\n\tuint32_t count = 0;\n\tfor (std::shared_ptr item : itemlist) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a286ab0e8ab7b53e5d0861fac8c0b99934d955eecba03babf507dc99edadeed0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'getItemTypeCount' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 818, + "startColumn": 38, + "charOffset": 23716, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 816, + "startColumn": 38, + "charOffset": 23676, + "charLength": 8, + "snippet": { + "text": "}\n\nuint32_t Container::getItemTypeCount(uint16_t itemId, int32_t subType /* = -1*/) const {\n\tuint32_t count = 0;\n\tfor (std::shared_ptr item : itemlist) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e70c064b8c0c253bf667c7ad6eb7f36feb4d2878dff905ab1d61358de7c94b04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 820, + "startColumn": 2, + "charOffset": 23790, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 818, + "startColumn": 2, + "charOffset": 23679, + "charLength": 3, + "snippet": { + "text": "uint32_t Container::getItemTypeCount(uint16_t itemId, int32_t subType /* = -1*/) const {\n\tuint32_t count = 0;\n\tfor (std::shared_ptr item : itemlist) {\n\t\tif (item->getID() == itemId) {\n\t\t\tcount += countByType(item, subType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ba1b484797cbac1286b57f525b27ede1a88b4e88ef67909900e0153fa2a89cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 820, + "startColumn": 29, + "charOffset": 23817, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 818, + "startColumn": 29, + "charOffset": 23679, + "charLength": 4, + "snippet": { + "text": "uint32_t Container::getItemTypeCount(uint16_t itemId, int32_t subType /* = -1*/) const {\n\tuint32_t count = 0;\n\tfor (std::shared_ptr item : itemlist) {\n\t\tif (item->getID() == itemId) {\n\t\t\tcount += countByType(item, subType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01af272ade2ef5495480765479f84074aaed11f3a4b55f7e2afb263885250c6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 829, + "startColumn": 2, + "charOffset": 24044, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 827, + "startColumn": 2, + "charOffset": 23933, + "charLength": 3, + "snippet": { + "text": "\nstd::map &Container::getAllItemTypeCount(std::map &countMap) const {\n\tfor (std::shared_ptr item : itemlist) {\n\t\tcountMap[item->getID()] += item->getItemCount();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0202625955f64513251f7f605c84716eb996aed696b8ab5f00d6b39ef0c965d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 829, + "startColumn": 29, + "charOffset": 24071, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 827, + "startColumn": 29, + "charOffset": 23933, + "charLength": 4, + "snippet": { + "text": "\nstd::map &Container::getAllItemTypeCount(std::map &countMap) const {\n\tfor (std::shared_ptr item : itemlist) {\n\t\tcountMap[item->getID()] += item->getItemCount();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3280ffbaf3235a0460c8e93c58e9f0c855934f98ec7059b4c5af7685ff642b68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 842, + "startColumn": 3, + "charOffset": 24373, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 840, + "startColumn": 3, + "charOffset": 24325, + "charLength": 3, + "snippet": { + "text": "\tItemVector containerItems;\n\tif (recursive) {\n\t\tfor (ContainerIterator it = iterator(); it.hasNext(); it.advance()) {\n\t\t\tcontainerItems.push_back(*it);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2dc505503224e769ee57ce0e92068f4bb72b661307c61289c3e77bbc0aad6c4b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 842, + "startColumn": 3, + "charOffset": 24373, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 840, + "startColumn": 3, + "charOffset": 24325, + "charLength": 3, + "snippet": { + "text": "\tItemVector containerItems;\n\tif (recursive) {\n\t\tfor (ContainerIterator it = iterator(); it.hasNext(); it.advance()) {\n\t\t\tcontainerItems.push_back(*it);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03f80d02c34b6f3ec8d92512a8ca13c768399437b7118a0eab8d1b5767f9db89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 846, + "startColumn": 3, + "charOffset": 24493, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 844, + "startColumn": 3, + "charOffset": 24477, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\tfor (std::shared_ptr item : itemlist) {\n\t\t\tcontainerItems.push_back(item);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8acc0a74fb998091d77de7d073aaf63c29b7f21c61bfd1fbc3f323816ead03a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 846, + "startColumn": 30, + "charOffset": 24520, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 844, + "startColumn": 30, + "charOffset": 24477, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\tfor (std::shared_ptr item : itemlist) {\n\t\t\tcontainerItems.push_back(item);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "036ecfaf8f14dda37b4efa36c46d24705e32f17595ca2ffa7eae9355c3e9c2b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 853, + "startColumn": 17, + "charOffset": 24624, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + } + }, + "contextRegion": { + "startLine": 851, + "startColumn": 17, + "charOffset": 24605, + "charLength": 19, + "snippet": { + "text": "}\n\nvoid Container::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\n\tstd::shared_ptr topParent = getTopParent();\n\tif (topParent->getCreature()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b31a1b67c558bec5344dc90226d2bc94c23e101df2bcb015a5fcaad2c32e2515" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 853, + "startColumn": 133, + "charOffset": 24740, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 851, + "startColumn": 133, + "charOffset": 24605, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Container::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\n\tstd::shared_ptr topParent = getTopParent();\n\tif (topParent->getCreature()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c34dd4e18a770bc28489180fc0e33d3fe7509b632f3c5d1ac150ab2f8ee54639" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 867, + "startColumn": 17, + "charOffset": 25225, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + } + }, + "contextRegion": { + "startLine": 865, + "startColumn": 17, + "charOffset": 25206, + "charLength": 22, + "snippet": { + "text": "}\n\nvoid Container::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\n\tstd::shared_ptr topParent = getTopParent();\n\tif (topParent->getCreature()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53345ff4c789ca5eb35752d26cb01f2a64e8deb44d011b560cf4e1323f93f02d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 867, + "startColumn": 136, + "charOffset": 25344, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 865, + "startColumn": 136, + "charOffset": 25206, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Container::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\n\tstd::shared_ptr topParent = getTopParent();\n\tif (topParent->getCreature()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85efc02c4bb393b313ee447939d97e98e1395e5141ab3ecd418a996bc66ae66a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 885, + "startColumn": 42, + "charOffset": 25960, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 883, + "startColumn": 42, + "charOffset": 25916, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Container::internalAddThing(uint32_t, std::shared_ptr thing) {\n\tif (!thing) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e11d1f46b3c07da6a6f6f4ee6bd9e89046f9abe3c6e1702ece996221a351815" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 886, + "startColumn": 6, + "charOffset": 25999, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 884, + "startColumn": 6, + "charOffset": 25918, + "charLength": 1, + "snippet": { + "text": "\nvoid Container::internalAddThing(uint32_t, std::shared_ptr thing) {\n\tif (!thing) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "806c937f5a2ef40267ede7e82ed57b10b8defa1800f5335ba77b884e9657c64f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 897, + "startColumn": 19, + "charOffset": 26189, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 895, + "startColumn": 19, + "charOffset": 26109, + "charLength": 4, + "snippet": { + "text": "\titem->setParent(getContainer());\n\titemlist.push_front(item);\n\tupdateItemWeight(item->getWeight());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4944f9a3d2b5bd13d6a4e38f05552dbbe97ec5dbb88e98ed181a4308d5f95990" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 902, + "startColumn": 2, + "charOffset": 26286, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 900, + "startColumn": 2, + "charOffset": 26212, + "charLength": 3, + "snippet": { + "text": "void Container::startDecaying() {\n\tg_decay().startDecay(getContainer());\n\tfor (ContainerIterator it = iterator(); it.hasNext(); it.advance()) {\n\t\tg_decay().startDecay(*it);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c303f8915bc49b5f3ec9ffc69dfa7afca63bb1f7abdc800e646e25f4706b846c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 902, + "startColumn": 2, + "charOffset": 26286, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 900, + "startColumn": 2, + "charOffset": 26212, + "charLength": 3, + "snippet": { + "text": "void Container::startDecaying() {\n\tg_decay().startDecay(getContainer());\n\tfor (ContainerIterator it = iterator(); it.hasNext(); it.advance()) {\n\t\tg_decay().startDecay(*it);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a55b15c7472147f72fa7ba2fb32b29be26faff941fe6609b5ebb85a270f988be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 909, + "startColumn": 2, + "charOffset": 26463, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 907, + "startColumn": 2, + "charOffset": 26391, + "charLength": 3, + "snippet": { + "text": "void Container::stopDecaying() {\n\tg_decay().stopDecay(getContainer());\n\tfor (ContainerIterator it = iterator(); it.hasNext(); it.advance()) {\n\t\tg_decay().stopDecay(*it);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0cefb3d9c6023977cce1d860cf5a22d0101cc8a17028c032597bea70fbaa2ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 909, + "startColumn": 2, + "charOffset": 26463, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 907, + "startColumn": 2, + "charOffset": 26391, + "charLength": 3, + "snippet": { + "text": "void Container::stopDecaying() {\n\tg_decay().stopDecay(getContainer());\n\tfor (ContainerIterator it = iterator(); it.hasNext(); it.advance()) {\n\t\tg_decay().stopDecay(*it);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "003d9530cc48adc71e2aa6b5b2a88eda51926203ba72301b67e73168d753fe14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'getFreeSlots' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 914, + "startColumn": 21, + "charOffset": 26587, + "charLength": 12, + "snippet": { + "text": "getFreeSlots" + } + }, + "contextRegion": { + "startLine": 912, + "startColumn": 21, + "charOffset": 26564, + "charLength": 12, + "snippet": { + "text": "}\n\nuint16_t Container::getFreeSlots() {\n\tuint16_t counter = std::max(0, capacity() - size());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14bc038375f94306be5058d7717b998ca4b816c1fc0e0c223f97640fdb7a1823" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 915, + "startColumn": 43, + "charOffset": 26646, + "charLength": 8, + "snippet": { + "text": "capacity" + } + }, + "contextRegion": { + "startLine": 913, + "startColumn": 43, + "charOffset": 26566, + "charLength": 8, + "snippet": { + "text": "\nuint16_t Container::getFreeSlots() {\n\tuint16_t counter = std::max(0, capacity() - size());\n\n\tfor (std::shared_ptr item : itemlist) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fdf70710a33c12e6493042d191ae40d96301f7b5cc776fe9aa130510f246dc50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 917, + "startColumn": 2, + "charOffset": 26670, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 915, + "startColumn": 2, + "charOffset": 26604, + "charLength": 3, + "snippet": { + "text": "\tuint16_t counter = std::max(0, capacity() - size());\n\n\tfor (std::shared_ptr item : itemlist) {\n\t\tif (std::shared_ptr container = item->getContainer()) {\n\t\t\tcounter += std::max(0, container->getFreeSlots());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4dc49716d04901103e2dacb4a67c1dfdc3d85b129f765ef5617b3692ae46e4cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 917, + "startColumn": 29, + "charOffset": 26697, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 915, + "startColumn": 29, + "charOffset": 26604, + "charLength": 4, + "snippet": { + "text": "\tuint16_t counter = std::max(0, capacity() - size());\n\n\tfor (std::shared_ptr item : itemlist) {\n\t\tif (std::shared_ptr container = item->getContainer()) {\n\t\t\tcounter += std::max(0, container->getFreeSlots());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ea801134dbfe3b4c7818394f311c12142a13cf1ed3647cbeb79e5eef9b77351" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 935, + "startColumn": 17, + "charOffset": 27072, + "charLength": 10, + "snippet": { + "text": "removeItem" + } + }, + "contextRegion": { + "startLine": 933, + "startColumn": 17, + "charOffset": 27053, + "charLength": 10, + "snippet": { + "text": "}\n\nvoid Container::removeItem(std::shared_ptr thing, bool sendUpdateToClient /* = false*/) {\n\tif (thing == nullptr) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41073c463330fcec20ec0803f55e5038472a904ae9502593339bdb1bf803270e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 935, + "startColumn": 51, + "charOffset": 27106, + "charLength": 5, + "snippet": { + "text": "thing" + } + }, + "contextRegion": { + "startLine": 933, + "startColumn": 51, + "charOffset": 27053, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid Container::removeItem(std::shared_ptr thing, bool sendUpdateToClient /* = false*/) {\n\tif (thing == nullptr) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ac09cd14026176c0bf4588f47ea115cad6c173b92bb2154787a6f955261f7d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-unconstrained-variable-type", + "ruleIndex": 476, + "kind": "fail", + "level": "warning", + "message": { + "text": "Add 'std::input_iterator' constraint" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 945, + "startColumn": 2, + "charOffset": 27278, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 943, + "startColumn": 2, + "charOffset": 27273, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tauto it = std::ranges::find(itemlist.begin(), itemlist.end(), itemToRemove);\n\tif (it != itemlist.end()) {\n\t\t// Send change to client" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d825db7eeedd0fc6e6e4b7278bd9cddd5808279772d2a109b105c93401765a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 952, + "startColumn": 12, + "charOffset": 27582, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 950, + "startColumn": 12, + "charOffset": 27566, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\n\t\titemlist.erase(it);\n\t\titemToRemove->resetParent();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa4002fc55b0e9971aac68359872c38e4466544c262866222aaf9514b2bab443" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-overloaded-operator", + "ruleIndex": 526, + "kind": "fail", + "level": "warning", + "message": { + "text": "overloading 'operator*' is disallowed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 957, + "startColumn": 1, + "charOffset": 27630, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 955, + "startColumn": 1, + "charOffset": 27627, + "charLength": 3, + "snippet": { + "text": "}\n\nstd::shared_ptr ContainerIterator::operator*() {\n\treturn *cur;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da7295b153fc31de6e40a4fdbd09979eb50474828ad792602478cd41fae8a3c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.cpp" + }, + "region": { + "startLine": 985, + "startColumn": 2, + "charOffset": 28163, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 983, + "startColumn": 2, + "charOffset": 28141, + "charLength": 3, + "snippet": { + "text": "\t\treturn ownerId;\n\t}\n\tfor (const auto &item : itemlist) {\n\t\townerId = item->getOwnerId();\n\t\tif (ownerId > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10b3629736239917c89ed2fb0b8734c2340841b2f337e438e5fa21cb0c6aab1d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Container::create' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "index": 1 + }, + "region": { + "startLine": 46, + "startColumn": 36, + "charOffset": 1223, + "charLength": 6, + "snippet": { + "text": "create" + } + }, + "contextRegion": { + "startLine": 44, + "startColumn": 36, + "charOffset": 1010, + "charLength": 6, + "snippet": { + "text": "\tstatic std::shared_ptr create(uint16_t type);\n\tstatic std::shared_ptr create(uint16_t type, uint16_t size, bool unlocked = true, bool pagination = false);\n\tstatic std::shared_ptr create(std::shared_ptr type);\n\n\t// non-copyable" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0d66db79bcd0c7c7b76a3b34ce1bdc5b4d5e414c1be00a5a12208b02732f7f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Container::getContentDescription' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/container.hpp", + "index": 1 + }, + "region": { + "startLine": 182, + "startColumn": 22, + "charOffset": 6131, + "charLength": 21, + "snippet": { + "text": "getContentDescription" + } + }, + "contextRegion": { + "startLine": 180, + "startColumn": 22, + "charOffset": 6098, + "charLength": 21, + "snippet": { + "text": "\nprotected:\n\tstd::ostringstream &getContentDescription(std::ostringstream &os, bool oldProtocol);\n\n\tuint32_t m_maxItems;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4df8635570877dfd006cffd7514d089d5fdef8ab3526d5af9499f6b8dc0ab500" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-prefer-member-initializer", + "ruleIndex": 504, + "kind": "fail", + "level": "warning", + "message": { + "text": "'maxDepotItems' should be initialized in a member initializer of the constructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotchest.cpp" + }, + "region": { + "startLine": 17, + "startColumn": 2, + "charOffset": 528, + "charLength": 13, + "snippet": { + "text": "maxDepotItems" + } + }, + "contextRegion": { + "startLine": 15, + "startColumn": 2, + "charOffset": 468, + "charLength": 13, + "snippet": { + "text": "DepotChest::DepotChest(uint16_t type) :\n\tContainer(type) {\n\tmaxDepotItems = 2000;\n\tmaxSize = 32;\n\tpagination = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ebdfc5761619099ed66a8f9d7ecdd30b257220814de10a81a6fdaf2b8df355f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotchest.cpp" + }, + "region": { + "startLine": 17, + "startColumn": 18, + "charOffset": 544, + "charLength": 4, + "snippet": { + "text": "2000" + } + }, + "contextRegion": { + "startLine": 15, + "startColumn": 18, + "charOffset": 468, + "charLength": 4, + "snippet": { + "text": "DepotChest::DepotChest(uint16_t type) :\n\tContainer(type) {\n\tmaxDepotItems = 2000;\n\tmaxSize = 32;\n\tpagination = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e9d3a44807a7786bfaba2f680e76e3aff5ef701fa54c33f6e7831d6e744fa16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "32 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotchest.cpp" + }, + "region": { + "startLine": 18, + "startColumn": 12, + "charOffset": 561, + "charLength": 2, + "snippet": { + "text": "32" + } + }, + "contextRegion": { + "startLine": 16, + "startColumn": 12, + "charOffset": 508, + "charLength": 2, + "snippet": { + "text": "\tContainer(type) {\n\tmaxDepotItems = 2000;\n\tmaxSize = 32;\n\tpagination = true;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "128237a854b0f62c61e7606bd791e066c5c23491ce06903b112478589babd064" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotchest.cpp" + }, + "region": { + "startLine": 22, + "startColumn": 25, + "charOffset": 612, + "charLength": 8, + "snippet": { + "text": "queryAdd" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 25, + "charOffset": 585, + "charLength": 8, + "snippet": { + "text": "}\n\nReturnValue DepotChest::queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor /* = nullptr*/) {\n\tstd::shared_ptr item = thing->getItem();\n\tif (item == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "981cecacc117ea49fae1c9bff7b617075756209abf75cc68b0939cf98731e6e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotchest.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 16, + "charOffset": 1273, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 16, + "charOffset": 1144, + "charLength": 9, + "snippet": { + "text": "\t\tif (item->getTopParent().get() != this) {\n\t\t\tif (std::shared_ptr container = item->getContainer()) {\n\t\t\t\taddCount = container->getItemHoldingCount() + 1;\n\t\t\t} else {\n\t\t\t\taddCount = 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0961e2d9a9d7bb5268367e0a49c8f4382a4bf287c9872f46b607d4bbce854bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotchest.cpp" + }, + "region": { + "startLine": 47, + "startColumn": 3, + "charOffset": 1353, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 45, + "startColumn": 3, + "charOffset": 1346, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (std::shared_ptr localParent = getRealParent()) {\n\t\t\tif (localParent->getContainer()->getItemHoldingCount() + addCount > maxDepotItems) {\n\t\t\t\treturn RETURNVALUE_DEPOTISFULL;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa6499b169a7df1a66e7630852c3eaaf501bf82ded86a28e858bc43edcadde98" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotchest.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 18, + "charOffset": 1737, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 18, + "charOffset": 1717, + "charLength": 19, + "snippet": { + "text": "}\n\nvoid DepotChest::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\n\tstd::shared_ptr localParent = getParent();\n\tif (localParent != nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38f8dac4541969d0ee05181a2b787b186c8b400d32c5bcd5e578f5976070416b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotchest.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 134, + "charOffset": 1853, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 134, + "charOffset": 1717, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid DepotChest::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\n\tstd::shared_ptr localParent = getParent();\n\tif (localParent != nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d65b08b597cc31e8f8429d9abc1b5673c4ca0a3a37132ed5e1f72ee559692e2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotchest.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 18, + "charOffset": 2039, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 18, + "charOffset": 2019, + "charLength": 22, + "snippet": { + "text": "}\n\nvoid DepotChest::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\n\tstd::shared_ptr localParent = getParent();\n\tif (localParent != nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d9f17652ed5cae53235312dd99b85275145888eeb0ad403a4281c42b036b107" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotchest.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 137, + "charOffset": 2158, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 137, + "charOffset": 2019, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid DepotChest::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\n\tstd::shared_ptr localParent = getParent();\n\tif (localParent != nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93a39c6a27409b649e5775b36fedd9cb4f6aab9ac5fc6a6aa4c38743b98bc535" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-parent-virtual-call", + "ruleIndex": 80, + "kind": "fail", + "level": "warning", + "message": { + "text": "qualified name 'Item::readAttr' refers to a member overridden in subclass; did you mean 'Container'?" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotlocker.cpp" + }, + "region": { + "startLine": 24, + "startColumn": 9, + "charOffset": 766, + "charLength": 4, + "snippet": { + "text": "Item" + } + }, + "contextRegion": { + "startLine": 22, + "startColumn": 9, + "charOffset": 726, + "charLength": 4, + "snippet": { + "text": "\t\treturn ATTR_READ_CONTINUE;\n\t}\n\treturn Item::readAttr(attr, propStream);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10ae0ec5b58565e0221b1f88af114fecbabc39e136e610464b354f8f19f9d8c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotlocker.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 26, + "charOffset": 828, + "charLength": 8, + "snippet": { + "text": "queryAdd" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 26, + "charOffset": 800, + "charLength": 8, + "snippet": { + "text": "}\n\nReturnValue DepotLocker::queryAdd(int32_t, const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr) {\n\treturn RETURNVALUE_NOTENOUGHROOM;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "083646db52e08332030e5f25369828a9e759f05108082c4d8b707c985961bafa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotlocker.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 42, + "charOffset": 844, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 42, + "charOffset": 800, + "charLength": 1, + "snippet": { + "text": "}\n\nReturnValue DepotLocker::queryAdd(int32_t, const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr) {\n\treturn RETURNVALUE_NOTENOUGHROOM;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34f22d106bdb28d2cbd81e92738b9d2bf919c4dbc6b0f7d940d294a45b1a18ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotlocker.cpp" + }, + "region": { + "startLine": 31, + "startColumn": 19, + "charOffset": 983, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + } + }, + "contextRegion": { + "startLine": 29, + "startColumn": 19, + "charOffset": 962, + "charLength": 19, + "snippet": { + "text": "}\n\nvoid DepotLocker::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\n\tauto parentLocked = m_parent.lock();\n\tif (parentLocked) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01c9549d25fdacfa0f33df537a8468bd38bd2bbb221c290aa19a0f5bae2a8744" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotlocker.cpp" + }, + "region": { + "startLine": 31, + "startColumn": 135, + "charOffset": 1099, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 29, + "startColumn": 135, + "charOffset": 962, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid DepotLocker::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\n\tauto parentLocked = m_parent.lock();\n\tif (parentLocked) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "512b689720edec204651c6970225d29a55247d7e2e158284200b42d297701042" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotlocker.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 19, + "charOffset": 1261, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 19, + "charOffset": 1240, + "charLength": 22, + "snippet": { + "text": "}\n\nvoid DepotLocker::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\n\tauto parentLocked = m_parent.lock();\n\tif (parentLocked) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f7ae9e41816a782ce8d473da161670c9f4beec9da21d84f66ce3a3769d53866" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotlocker.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 138, + "charOffset": 1380, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 138, + "charOffset": 1240, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid DepotLocker::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\n\tauto parentLocked = m_parent.lock();\n\tif (parentLocked) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea68ab90790b4485fee12f5a0055d54b08fe44b1bdc7766b8a9e1a070e5c6a8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'inbox' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotlocker.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 54, + "charOffset": 1580, + "charLength": 5, + "snippet": { + "text": "inbox" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 54, + "charOffset": 1524, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid DepotLocker::removeInbox(std::shared_ptr inbox) {\n\tauto cit = std::find(itemlist.begin(), itemlist.end(), inbox);\n\tif (cit == itemlist.end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "699d7989804d3b66a835661548f149105a5ee11f025b7c3d700a1c842d1c26bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/depot/depotlocker.cpp" + }, + "region": { + "startLine": 50, + "startColumn": 11, + "charOffset": 1706, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 48, + "startColumn": 11, + "charOffset": 1683, + "charLength": 5, + "snippet": { + "text": "\t\treturn;\n\t}\n\titemlist.erase(cit);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8036ef668cee02c5928251fd3e9be58cb30138e94fbe3584e8225e994ae9a9c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/inbox/inbox.cpp" + }, + "region": { + "startLine": 16, + "startColumn": 18, + "charOffset": 510, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 14, + "startColumn": 18, + "charOffset": 462, + "charLength": 2, + "snippet": { + "text": "\nInbox::Inbox(uint16_t type) :\n\tContainer(type, 30, false, true) {\n\tmaxInboxItems = std::numeric_limits::max();\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e3c641ba9f45320e3a7e2ad2c48360eaffda530ce8916af87efa1b1a28461d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-prefer-member-initializer", + "ruleIndex": 504, + "kind": "fail", + "level": "warning", + "message": { + "text": "'maxInboxItems' should be initialized in a member initializer of the constructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/inbox/inbox.cpp" + }, + "region": { + "startLine": 17, + "startColumn": 2, + "charOffset": 530, + "charLength": 13, + "snippet": { + "text": "maxInboxItems" + } + }, + "contextRegion": { + "startLine": 15, + "startColumn": 2, + "charOffset": 463, + "charLength": 13, + "snippet": { + "text": "Inbox::Inbox(uint16_t type) :\n\tContainer(type, 30, false, true) {\n\tmaxInboxItems = std::numeric_limits::max();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0f5914f570cf6a64ab6b0e4d7e4c0916f9268793812467da304b579a391b381" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/inbox/inbox.cpp" + }, + "region": { + "startLine": 20, + "startColumn": 20, + "charOffset": 606, + "charLength": 8, + "snippet": { + "text": "queryAdd" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 20, + "charOffset": 584, + "charLength": 8, + "snippet": { + "text": "}\n\nReturnValue Inbox::queryAdd(int32_t, const std::shared_ptr &thing, uint32_t, uint32_t flags, std::shared_ptr) {\n\tint32_t addCount = 0;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d297faa5e61ade5d7cce2eb6997e0edbfdc4e76dba403c481e6c165712750768" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/inbox/inbox.cpp" + }, + "region": { + "startLine": 20, + "startColumn": 36, + "charOffset": 622, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 36, + "charOffset": 584, + "charLength": 1, + "snippet": { + "text": "}\n\nReturnValue Inbox::queryAdd(int32_t, const std::shared_ptr &thing, uint32_t, uint32_t flags, std::shared_ptr) {\n\tint32_t addCount = 0;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6b2453957153691858e68ce246ff13b840a4d56c4cbaada282d87fab26e99d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/inbox/inbox.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 6, + "charOffset": 882, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 6, + "charOffset": 828, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = thing->getItem();\n\tif (!item) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12ab7f5b176cde806d319c96a4282093caa80139311f5ec3a18751835f8f8862" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/inbox/inbox.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 15, + "charOffset": 1200, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 15, + "charOffset": 1068, + "charLength": 9, + "snippet": { + "text": "\tif (item->getTopParent().get() != this) { // MY\n\t\tif (std::shared_ptr container = item->getContainer()) {\n\t\t\taddCount = container->getItemHoldingCount() + 1;\n\t\t} else {\n\t\t\taddCount = 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d657775127826bf36a168abf03a9a10d16ee878b994ab6be9b2abe0359492d8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/inbox/inbox.cpp" + }, + "region": { + "startLine": 55, + "startColumn": 13, + "charOffset": 1419, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 13, + "charOffset": 1404, + "charLength": 19, + "snippet": { + "text": "}\n\nvoid Inbox::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\n\tstd::shared_ptr localParent = getParent();\n\tif (localParent != nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c35f570d5b5f784e44412fb0e3bd44d1425edab06721d9699ae604275928ac26" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/inbox/inbox.cpp" + }, + "region": { + "startLine": 55, + "startColumn": 129, + "charOffset": 1535, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 129, + "charOffset": 1404, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Inbox::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\n\tstd::shared_ptr localParent = getParent();\n\tif (localParent != nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "408b139c4a7d3c584599ced9caab3bc1e02de9858c71f25d623a43e5336e964e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/inbox/inbox.cpp" + }, + "region": { + "startLine": 62, + "startColumn": 13, + "charOffset": 1716, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 13, + "charOffset": 1701, + "charLength": 22, + "snippet": { + "text": "}\n\nvoid Inbox::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\n\tstd::shared_ptr localParent = getParent();\n\tif (localParent != nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6885befdbc0467d14f21e924fc3770fa2f22cb3511ef83af15f8c1233cb3b495" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/inbox/inbox.cpp" + }, + "region": { + "startLine": 62, + "startColumn": 132, + "charOffset": 1835, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 132, + "charOffset": 1701, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Inbox::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\n\tstd::shared_ptr localParent = getParent();\n\tif (localParent != nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2834c8185181728fc667b072016287086ced1226a64cfa6afb535e3efed314c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 18, + "startColumn": 22, + "charOffset": 590, + "charLength": 8, + "snippet": { + "text": "queryAdd" + } + }, + "contextRegion": { + "startLine": 16, + "startColumn": 22, + "charOffset": 538, + "charLength": 8, + "snippet": { + "text": "#include \"map/spectators.hpp\"\n\nReturnValue Mailbox::queryAdd(int32_t, const std::shared_ptr &thing, uint32_t, uint32_t, std::shared_ptr) {\n\tstd::shared_ptr item = thing->getItem();\n\tif (item && Mailbox::canSend(item)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26dca62e5db7bc248dbec4e10c4ba545156c2495c3f45a42fecfc2903a389d3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 18, + "startColumn": 38, + "charOffset": 606, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 16, + "startColumn": 38, + "charOffset": 538, + "charLength": 1, + "snippet": { + "text": "#include \"map/spectators.hpp\"\n\nReturnValue Mailbox::queryAdd(int32_t, const std::shared_ptr &thing, uint32_t, uint32_t, std::shared_ptr) {\n\tstd::shared_ptr item = thing->getItem();\n\tif (item && Mailbox::canSend(item)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34a834db8593389d0155eaa86787f7e3376a10785770a08b46386dec680a4d1f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 43, + "charOffset": 892, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 43, + "charOffset": 847, + "charLength": 1, + "snippet": { + "text": "}\n\nReturnValue Mailbox::queryMaxCount(int32_t, const std::shared_ptr &, uint32_t count, uint32_t &maxQueryCount, uint32_t) {\n\tmaxQueryCount = std::max(1, count);\n\treturn RETURNVALUE_NOERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b21baf5073a0e3f8857d119bf8b5d3bbfed0cf6f9518a4aac1b27edbc156b63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 31, + "startColumn": 22, + "charOffset": 1079, + "charLength": 11, + "snippet": { + "text": "queryRemove" + } + }, + "contextRegion": { + "startLine": 29, + "startColumn": 22, + "charOffset": 1055, + "charLength": 11, + "snippet": { + "text": "}\n\nReturnValue Mailbox::queryRemove(const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr /*= nullptr */) {\n\treturn RETURNVALUE_NOTPOSSIBLE;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a8b27054d37b9fff032ab5e98f7bd9456b9bbc9a09a267bf75bc4e53fbbcddb9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 31, + "startColumn": 64, + "charOffset": 1121, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 29, + "startColumn": 64, + "charOffset": 1055, + "charLength": 1, + "snippet": { + "text": "}\n\nReturnValue Mailbox::queryRemove(const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr /*= nullptr */) {\n\treturn RETURNVALUE_NOTPOSSIBLE;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c922e3080847bc57ff57f055bac22dbf964b16d01a50641975b81a3a9a4ad433" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 35, + "startColumn": 62, + "charOffset": 1284, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 33, + "startColumn": 62, + "charOffset": 1220, + "charLength": 1, + "snippet": { + "text": "}\n\nstd::shared_ptr Mailbox::queryDestination(int32_t &, const std::shared_ptr &, std::shared_ptr*, uint32_t &) {\n\treturn getMailbox();\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b6b8d5f988ab6539bbdf3848196b5d3df21cc014cff225da074220fdb08dc16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-avoid-return-with-void-value", + "ruleIndex": 689, + "kind": "fail", + "level": "warning", + "message": { + "text": "return statement within a void function should not have a specified return value" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 40, + "startColumn": 2, + "charOffset": 1437, + "charLength": 6, + "snippet": { + "text": "return" + } + }, + "contextRegion": { + "startLine": 38, + "startColumn": 2, + "charOffset": 1380, + "charLength": 6, + "snippet": { + "text": "\nvoid Mailbox::addThing(std::shared_ptr thing) {\n\treturn addThing(0, thing);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "504acdaeaf1257876965b078a5127c918b1345d021064e3c3c5f7f49c7609ab3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 31, + "charOffset": 1497, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 31, + "charOffset": 1464, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Mailbox::addThing(int32_t, std::shared_ptr thing) {\n\tif (!thing) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11370bd3b174f86f2e07eaa3a1b9c750e8e64d751c7d7e6cde1bffd2f12c1107" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 44, + "startColumn": 6, + "charOffset": 1536, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 42, + "startColumn": 6, + "charOffset": 1466, + "charLength": 1, + "snippet": { + "text": "\nvoid Mailbox::addThing(int32_t, std::shared_ptr thing) {\n\tif (!thing) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2a8057c0934b617543212581c87c0397ae5d937e22860b881305bba3d789f53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 50, + "startColumn": 3, + "charOffset": 1649, + "charLength": 8, + "snippet": { + "text": "sendItem" + } + }, + "contextRegion": { + "startLine": 48, + "startColumn": 3, + "charOffset": 1560, + "charLength": 8, + "snippet": { + "text": "\tstd::shared_ptr item = thing->getItem();\n\tif (item && Mailbox::canSend(item)) {\n\t\tsendItem(item);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "254325b52f0f3c3eb3e4ff521ccf704c53eb126d8a334461eb0dfb7074299172" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 54, + "startColumn": 49, + "charOffset": 1719, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 52, + "startColumn": 49, + "charOffset": 1668, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Mailbox::updateThing(std::shared_ptr, uint16_t, uint32_t) {\n\t//\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19401c14fdb7c655da91a718c910937d907aef8514649e936463e8e29034876f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 58, + "startColumn": 36, + "charOffset": 1785, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 56, + "startColumn": 36, + "charOffset": 1747, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Mailbox::replaceThing(uint32_t, std::shared_ptr) {\n\t//\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07d8b520df2316cc39536aab890a5ccab3bf0836bd12331b102d05c08f27527f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 62, + "startColumn": 49, + "charOffset": 1868, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 49, + "charOffset": 1817, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Mailbox::removeThing(std::shared_ptr, uint32_t) {\n\t//\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0671ea8876a647764c2cd2c823ffd51c915e67050fd381e16175441bab143b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 15, + "charOffset": 1903, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 15, + "charOffset": 1886, + "charLength": 19, + "snippet": { + "text": "}\n\nvoid Mailbox::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\n\tgetParent()->postAddNotification(thing, oldParent, index, LINK_PARENT);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8ecec19a05ada53e57dc9f21627eaa9e8ac847663ea0c8cab7b3e82a2e3a644" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 131, + "charOffset": 2019, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 131, + "charOffset": 1886, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Mailbox::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\n\tgetParent()->postAddNotification(thing, oldParent, index, LINK_PARENT);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38cd7f492e626a3dad862d03167e86b6860a1ba48de5cb886eca95b7cd087db1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 15, + "charOffset": 2113, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 15, + "charOffset": 2096, + "charLength": 22, + "snippet": { + "text": "}\n\nvoid Mailbox::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\n\tgetParent()->postRemoveNotification(thing, newParent, index, LINK_PARENT);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29f80de670035e76c11a400ed0c31f5377288bc4dcd509d39a759c671ffae6ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 134, + "charOffset": 2232, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 134, + "charOffset": 2096, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Mailbox::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\n\tgetParent()->postRemoveNotification(thing, newParent, index, LINK_PARENT);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00a0af9de3c8713b0d722a2e740863b311a4c3a1442104b3b5faee218fdd7c92" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 46, + "charOffset": 2360, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 46, + "charOffset": 2312, + "charLength": 4, + "snippet": { + "text": "}\n\nbool Mailbox::sendItem(std::shared_ptr item) const {\n\tstd::string receiver;\n\tif (!getReceiver(item, receiver)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "601a39c55ed64173e2c3b7c779f283c3b21d8a4cec009c9a82b5700a2424a17e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 86, + "startColumn": 3, + "charOffset": 2603, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 3, + "charOffset": 2544, + "charLength": 3, + "snippet": { + "text": "\n\tif (item && item->getContainer() && item->getTile()) {\n\t\tfor (const auto &spectator : Spectators().find(item->getTile()->getPosition())) {\n\t\t\tspectator->getPlayer()->autoCloseContainers(item->getContainer());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75ad2b47606a42ba46e856c3bb3329b6375a503557a5fde917df0cd90dc2c728" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-4", + "ruleIndex": 410, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-4: The time handling functions of library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 93, + "startColumn": 16, + "charOffset": 2883, + "charLength": 4, + "snippet": { + "text": "time" + } + }, + "contextRegion": { + "startLine": 91, + "startColumn": 16, + "charOffset": 2771, + "charLength": 4, + "snippet": { + "text": "\tstd::shared_ptr player = g_game().getPlayerByName(receiver, true);\n\tstd::string writer;\n\ttime_t date = time(0);\n\tstd::string text;\n\tif (item && item->getID() == ITEM_LETTER && !item->getAttribute(ItemAttribute_t::WRITER).empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6028d758edc32942631cbf42489c232c18875479871830206dd68647a7a7a92d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-10-2", + "ruleIndex": 420, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-10-2: Literal zero (0) shall not be used as the null-pointer-constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 93, + "startColumn": 21, + "charOffset": 2888, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 91, + "startColumn": 21, + "charOffset": 2771, + "charLength": 1, + "snippet": { + "text": "\tstd::shared_ptr player = g_game().getPlayerByName(receiver, true);\n\tstd::string writer;\n\ttime_t date = time(0);\n\tstd::string text;\n\tif (item && item->getID() == ITEM_LETTER && !item->getAttribute(ItemAttribute_t::WRITER).empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34f40b8b7e9fabff27514328849e5ca3521857652a8abe53ad7f5c97a82cc168" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-nullptr", + "ruleIndex": 577, + "kind": "fail", + "level": "warning", + "message": { + "text": "use nullptr" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 93, + "startColumn": 21, + "charOffset": 2888, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 91, + "startColumn": 21, + "charOffset": 2771, + "charLength": 1, + "snippet": { + "text": "\tstd::shared_ptr player = g_game().getPlayerByName(receiver, true);\n\tstd::string writer;\n\ttime_t date = time(0);\n\tstd::string text;\n\tif (item && item->getID() == ITEM_LETTER && !item->getAttribute(ItemAttribute_t::WRITER).empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74e81d6567047836a5e979c62f98b32a272d059072e928da5c6d59cb1b336e2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-container-size-empty", + "ruleIndex": 695, + "kind": "fail", + "level": "warning", + "message": { + "text": "the 'empty' method should be used to check for emptiness instead of comparing to an empty object" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 103, + "startColumn": 62, + "charOffset": 3538, + "charLength": 6, + "snippet": { + "text": "writer" + } + }, + "contextRegion": { + "startLine": 101, + "startColumn": 62, + "charOffset": 3245, + "charLength": 6, + "snippet": { + "text": "\t\tif (g_game().internalMoveItem(item->getParent(), player->getInbox(), INDEX_WHEREEVER, item, item->getItemCount(), nullptr, FLAG_NOLIMIT) == RETURNVALUE_NOERROR) {\n\t\t\tauto newItem = g_game().transformItem(item, item->getID() + 1);\n\t\t\tif (newItem && newItem->getID() == ITEM_LETTER_STAMPED && writer != \"\") {\n\t\t\t\tnewItem->setAttribute(ItemAttribute_t::WRITER, writer);\n\t\t\t\tnewItem->setAttribute(ItemAttribute_t::DATE, date);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "883e92b2db6e677da78f1afa0f71b478e60359de1143f56fc0cbbc33fc47195f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 21, + "charOffset": 3821, + "charLength": 10, + "snippet": { + "text": "savePlayer" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 21, + "charOffset": 3760, + "charLength": 10, + "snippet": { + "text": "\t\t\t\tplayer->onReceiveMail();\n\t\t\t} else {\n\t\t\t\tg_saveManager().savePlayer(player);\n\t\t\t}\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a88d33f42a0c339cf9a778e94d9e2e1c4dc35f5562a2faf1dacbbdc5f116a5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'getReceiver' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 119, + "startColumn": 15, + "charOffset": 3901, + "charLength": 11, + "snippet": { + "text": "getReceiver" + } + }, + "contextRegion": { + "startLine": 117, + "startColumn": 15, + "charOffset": 3884, + "charLength": 11, + "snippet": { + "text": "}\n\nbool Mailbox::getReceiver(std::shared_ptr item, std::string &name) const {\n\tstd::shared_ptr container = item->getContainer();\n\tif (container) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58659242a234baa3af1711abe148bce8c827b9bd926b49e818d56264774741bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 119, + "startColumn": 49, + "charOffset": 3935, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 117, + "startColumn": 49, + "charOffset": 3884, + "charLength": 4, + "snippet": { + "text": "}\n\nbool Mailbox::getReceiver(std::shared_ptr item, std::string &name) const {\n\tstd::shared_ptr container = item->getContainer();\n\tif (container) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "557c35ee026dc47ed5bf646363291c7ae8ce3dac8434c92af95a93f6ae470126" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 122, + "startColumn": 3, + "charOffset": 4050, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 120, + "startColumn": 3, + "charOffset": 3968, + "charLength": 3, + "snippet": { + "text": "\tstd::shared_ptr container = item->getContainer();\n\tif (container) {\n\t\tfor (std::shared_ptr containerItem : container->getItemList()) {\n\t\t\tif (containerItem->getID() == ITEM_LABEL && getReceiver(containerItem, name)) {\n\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c2b63e04c4fb803b7a74852a6186af0b28863e00bfbf5e796739295e2bf5341" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 122, + "startColumn": 30, + "charOffset": 4077, + "charLength": 13, + "snippet": { + "text": "containerItem" + } + }, + "contextRegion": { + "startLine": 120, + "startColumn": 30, + "charOffset": 3968, + "charLength": 13, + "snippet": { + "text": "\tstd::shared_ptr container = item->getContainer();\n\tif (container) {\n\t\tfor (std::shared_ptr containerItem : container->getItemList()) {\n\t\t\tif (containerItem->getID() == ITEM_LABEL && getReceiver(containerItem, name)) {\n\t\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2301cdfcb29a6fc92ed761e6cd4cd18a362ed22f8e38961d69fc4e5c39bfc16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/mailbox/mailbox.cpp" + }, + "region": { + "startLine": 140, + "startColumn": 45, + "charOffset": 4482, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 138, + "startColumn": 45, + "charOffset": 4435, + "charLength": 4, + "snippet": { + "text": "}\n\nbool Mailbox::canSend(std::shared_ptr item) {\n\treturn !item->hasOwner() && (item->getID() == ITEM_PARCEL || item->getID() == ITEM_LETTER);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83fed7e6b10f59a62bfc335ffa9dfc9ffc2413ec4934f2add716b80356aacbfd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "32 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/reward.cpp" + }, + "region": { + "startLine": 16, + "startColumn": 12, + "charOffset": 505, + "charLength": 2, + "snippet": { + "text": "32" + } + }, + "contextRegion": { + "startLine": 14, + "startColumn": 12, + "charOffset": 439, + "charLength": 2, + "snippet": { + "text": "Reward::Reward() :\n\tContainer(ITEM_REWARD_CONTAINER) {\n\tmaxSize = 32;\n\tunlocked = false;\n\tpagination = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b1934554232a1b3b8910f25286600c2ebe8a87597f0e3a7c7c51782060f1c71" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/reward.cpp" + }, + "region": { + "startLine": 21, + "startColumn": 21, + "charOffset": 571, + "charLength": 8, + "snippet": { + "text": "queryAdd" + } + }, + "contextRegion": { + "startLine": 19, + "startColumn": 21, + "charOffset": 548, + "charLength": 8, + "snippet": { + "text": "}\n\nReturnValue Reward::queryAdd(int32_t, const std::shared_ptr &thing, uint32_t, uint32_t, std::shared_ptr actor /* = nullptr*/) {\n\tif (actor) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0731c6c1bff5da98d13b67f9ee6f2c46646e4799dfee1c5074d78cdcfda8b87" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/reward.cpp" + }, + "region": { + "startLine": 21, + "startColumn": 37, + "charOffset": 587, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 19, + "startColumn": 37, + "charOffset": 548, + "charLength": 1, + "snippet": { + "text": "}\n\nReturnValue Reward::queryAdd(int32_t, const std::shared_ptr &thing, uint32_t, uint32_t, std::shared_ptr actor /* = nullptr*/) {\n\tif (actor) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ee647875543df33501be1e6355b286cea7d88759a9c9ccfafcf0d801129f94f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/reward.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 6, + "charOffset": 801, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 6, + "charOffset": 747, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = thing->getItem();\n\tif (!item) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89274f40399ba7681dbed62db7d26359fa63a1d8b0a7f2785bcbffc45e3307dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/reward.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 14, + "charOffset": 1032, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 14, + "charOffset": 1016, + "charLength": 19, + "snippet": { + "text": "}\n\nvoid Reward::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\n\tstd::shared_ptr localParent = getParent();\n\tif (localParent != nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "545ed4c4864475bc33a8c78f5d5dc60cdb0a32cd2a8e9b7168a1a045020abc5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/reward.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 130, + "charOffset": 1148, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 130, + "charOffset": 1016, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Reward::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\n\tstd::shared_ptr localParent = getParent();\n\tif (localParent != nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63af6c972ae20e7ba92410db2b71531b503e2587bfaddb2fb942dff56a8dac87" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/reward.cpp" + }, + "region": { + "startLine": 49, + "startColumn": 14, + "charOffset": 1330, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + } + }, + "contextRegion": { + "startLine": 47, + "startColumn": 14, + "charOffset": 1314, + "charLength": 22, + "snippet": { + "text": "}\n\nvoid Reward::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\n\tstd::shared_ptr localParent = getParent();\n\tif (localParent != nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5260f6a951b986a88eb8952cb4088d662c1e464e46d48c6d68d71e7c9c1fbe16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/reward.cpp" + }, + "region": { + "startLine": 49, + "startColumn": 133, + "charOffset": 1449, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 47, + "startColumn": 133, + "charOffset": 1314, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Reward::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\n\tstd::shared_ptr localParent = getParent();\n\tif (localParent != nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d40d548ebf39de50c786679e866ad17c884306b8b302a7dea20e7a81ced4c7b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "32 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/rewardchest.cpp" + }, + "region": { + "startLine": 16, + "startColumn": 12, + "charOffset": 516, + "charLength": 2, + "snippet": { + "text": "32" + } + }, + "contextRegion": { + "startLine": 14, + "startColumn": 12, + "charOffset": 444, + "charLength": 2, + "snippet": { + "text": "RewardChest::RewardChest(uint16_t type) :\n\tContainer(type) {\n\tmaxSize = 32;\n\tunlocked = false;\n\tpagination = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed775e195ddeb58870156efc1684760bba0328f27ecde1d0cf355a0c695c4aab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/rewardchest.cpp" + }, + "region": { + "startLine": 21, + "startColumn": 26, + "charOffset": 587, + "charLength": 8, + "snippet": { + "text": "queryAdd" + } + }, + "contextRegion": { + "startLine": 19, + "startColumn": 26, + "charOffset": 559, + "charLength": 8, + "snippet": { + "text": "}\n\nReturnValue RewardChest::queryAdd(int32_t, const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr actor /* = nullptr*/) {\n\tif (actor) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80160c79629243da552bb359d2e25edc0781ed3e55db4da1ed4c7ea9dacdac00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/rewardchest.cpp" + }, + "region": { + "startLine": 21, + "startColumn": 42, + "charOffset": 603, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 19, + "startColumn": 42, + "charOffset": 559, + "charLength": 1, + "snippet": { + "text": "}\n\nReturnValue RewardChest::queryAdd(int32_t, const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr actor /* = nullptr*/) {\n\tif (actor) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fee7d78ccb1e7c866808ae33b04f84238ff14db383ab3e981d70b683cedbf308" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/rewardchest.cpp" + }, + "region": { + "startLine": 29, + "startColumn": 19, + "charOffset": 809, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + } + }, + "contextRegion": { + "startLine": 27, + "startColumn": 19, + "charOffset": 788, + "charLength": 19, + "snippet": { + "text": "}\n\nvoid RewardChest::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\n\tauto parentLocked = m_parent.lock();\n\tif (parentLocked) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55da8393091cbe63c0448407d897d56b8abf347cccb46ed9233f92c08ffe8a4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/rewardchest.cpp" + }, + "region": { + "startLine": 29, + "startColumn": 135, + "charOffset": 925, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 27, + "startColumn": 135, + "charOffset": 788, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid RewardChest::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\n\tauto parentLocked = m_parent.lock();\n\tif (parentLocked) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6f6fc73536f4a5ff6e9300450e61e60f76d7951a52e9ea7a41e1b807ebd9e28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/rewardchest.cpp" + }, + "region": { + "startLine": 36, + "startColumn": 19, + "charOffset": 1087, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 19, + "charOffset": 1066, + "charLength": 22, + "snippet": { + "text": "}\n\nvoid RewardChest::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\n\tauto parentLocked = m_parent.lock();\n\tif (parentLocked) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc7d1232eee7642f947ae02a6f445693b33e6629df5e78389d31e9c3bf170f99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/rewardchest.cpp" + }, + "region": { + "startLine": 36, + "startColumn": 138, + "charOffset": 1206, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 138, + "charOffset": 1066, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid RewardChest::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\n\tauto parentLocked = m_parent.lock();\n\tif (parentLocked) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1f3756a6778fc2d5b114024cf1f009e9afe7ebb67cd609c5f18ab7ba3b3b1b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/rewardchest.cpp" + }, + "region": { + "startLine": 44, + "startColumn": 19, + "charOffset": 1467, + "charLength": 10, + "snippet": { + "text": "removeItem" + } + }, + "contextRegion": { + "startLine": 42, + "startColumn": 19, + "charOffset": 1352, + "charLength": 10, + "snippet": { + "text": "\n// Second argument is disabled by default because not need to send to client in the RewardChest\nvoid RewardChest::removeItem(std::shared_ptr thing, bool /* sendToClient = false*/) {\n\tif (thing == nullptr) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64aa69baa8690b7cec12c45cf448c427e2ecb1298ee5bbd94f7ab1ce47b23cf2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-unconstrained-variable-type", + "ruleIndex": 476, + "kind": "fail", + "level": "warning", + "message": { + "text": "Add 'std::input_iterator' constraint" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/rewardchest.cpp" + }, + "region": { + "startLine": 54, + "startColumn": 2, + "charOffset": 1667, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 52, + "startColumn": 2, + "charOffset": 1662, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tauto it = std::ranges::find(itemlist.begin(), itemlist.end(), itemToRemove);\n\tif (it != itemlist.end()) {\n\t\titemlist.erase(it);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85a07ac5d7689534031f004d6cf7791d129676449e0acd9ef130507038427781" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/containers/rewards/rewardchest.cpp" + }, + "region": { + "startLine": 56, + "startColumn": 12, + "charOffset": 1784, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 54, + "startColumn": 12, + "charOffset": 1666, + "charLength": 5, + "snippet": { + "text": "\tauto it = std::ranges::find(itemlist.begin(), itemlist.end(), itemToRemove);\n\tif (it != itemlist.end()) {\n\t\titemlist.erase(it);\n\t\titemToRemove->resetParent();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ad6a13b04cf6ab629022c698244845b0caafd9f531a7e4637181935393be557" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'virtualCylinder' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.cpp" + }, + "region": { + "startLine": 14, + "startColumn": 51, + "charOffset": 472, + "charLength": 15, + "snippet": { + "text": "virtualCylinder" + } + }, + "contextRegion": { + "startLine": 12, + "startColumn": 51, + "charOffset": 391, + "charLength": 15, + "snippet": { + "text": "#include \"items/cylinder.hpp\"\n\nstd::shared_ptr VirtualCylinder::virtualCylinder = std::make_shared();\n\nint32_t Cylinder::getThingIndex(std::shared_ptr) const {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68aede26e517bfd0d8734eb0e292922dec9b5ef6f135e450c8f462e6b7a8db2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.cpp" + }, + "region": { + "startLine": 16, + "startColumn": 55, + "charOffset": 582, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 14, + "startColumn": 55, + "charOffset": 422, + "charLength": 1, + "snippet": { + "text": "std::shared_ptr VirtualCylinder::virtualCylinder = std::make_shared();\n\nint32_t Cylinder::getThingIndex(std::shared_ptr) const {\n\treturn -1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59868bb1441e2bc9842df676dc62c95dd458830872e2589d7d04b745a51887ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.cpp" + }, + "region": { + "startLine": 16, + "startColumn": 55, + "charOffset": 582, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 14, + "startColumn": 55, + "charOffset": 422, + "charLength": 1, + "snippet": { + "text": "std::shared_ptr VirtualCylinder::virtualCylinder = std::make_shared();\n\nint32_t Cylinder::getThingIndex(std::shared_ptr) const {\n\treturn -1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3837d976e625c6787a7acdd053412c0d24e61bf3780a04d335a178f94199f307" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 20, + "charOffset": 735, + "charLength": 16, + "snippet": { + "text": "getItemTypeCount" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 20, + "charOffset": 713, + "charLength": 16, + "snippet": { + "text": "}\n\nuint32_t Cylinder::getItemTypeCount(uint16_t, int32_t) const {\n\treturn 0;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8eec921a6397023f8c774a8cc67cbd11a5eb9f1325c5992a4ca940555650ebaf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 45, + "charOffset": 760, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 45, + "charOffset": 713, + "charLength": 1, + "snippet": { + "text": "}\n\nuint32_t Cylinder::getItemTypeCount(uint16_t, int32_t) const {\n\treturn 0;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08ce2dfb9af61cd22e21d5a68433d093fb76121e4be063af125bb5471173a03a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.cpp" + }, + "region": { + "startLine": 36, + "startColumn": 49, + "charOffset": 970, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 49, + "charOffset": 919, + "charLength": 1, + "snippet": { + "text": "}\n\nstd::shared_ptr Cylinder::getThing(size_t) const {\n\treturn nullptr;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd69b7dd77905b51e9f622876bc2c208d3d104c41ca79dafc8e8a46233f2ada0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.cpp" + }, + "region": { + "startLine": 40, + "startColumn": 55, + "charOffset": 1054, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 38, + "startColumn": 55, + "charOffset": 997, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Cylinder::internalAddThing(std::shared_ptr) {\n\t//\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "086622e0bdc403b7d8be1dc1ecff1934711912e57feb54e9c8f485eafafc1e3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.cpp" + }, + "region": { + "startLine": 40, + "startColumn": 55, + "charOffset": 1054, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 38, + "startColumn": 55, + "charOffset": 997, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Cylinder::internalAddThing(std::shared_ptr) {\n\t//\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4421110c5f2f39bb71a6f77dedc3e64658fcce46dcf880ff0adeb8bd3638a90f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.cpp" + }, + "region": { + "startLine": 44, + "startColumn": 41, + "charOffset": 1105, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 42, + "startColumn": 41, + "charOffset": 1062, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Cylinder::internalAddThing(uint32_t, std::shared_ptr) {\n\t//\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c89be48c5d8cc1befd2a79b955e66e24fcaeec217199dfc6e978e55577bacac4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/cylinder.cpp" + }, + "region": { + "startLine": 44, + "startColumn": 65, + "charOffset": 1129, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 42, + "startColumn": 65, + "charOffset": 1062, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Cylinder::internalAddThing(uint32_t, std::shared_ptr) {\n\t//\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc0f77aa19bf59906a363f4b890b9ef368601362d55ea038189934a897492b67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getLevelFormula' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 17, + "charOffset": 935, + "charLength": 15, + "snippet": { + "text": "getLevelFormula" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 17, + "charOffset": 872, + "charLength": 15, + "snippet": { + "text": "#include \"lua/callbacks/events_callbacks.hpp\"\n\nint32_t Combat::getLevelFormula(std::shared_ptr player, const std::shared_ptr wheelSpell, const CombatDamage &damage) const {\n\tif (!player) {\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c97c1431c19bb4ffa3235035a8006661ee261d348d6dac6e960229723dbb5d4b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 57, + "charOffset": 975, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 57, + "charOffset": 872, + "charLength": 6, + "snippet": { + "text": "#include \"lua/callbacks/events_callbacks.hpp\"\n\nint32_t Combat::getLevelFormula(std::shared_ptr player, const std::shared_ptr wheelSpell, const CombatDamage &damage) const {\n\tif (!player) {\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca76588c713ebe01caa78ffb93f59f9be6f3ec6dffe8dcd31114c8b3047dd46d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'wheelSpell' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 94, + "charOffset": 1012, + "charLength": 10, + "snippet": { + "text": "wheelSpell" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 94, + "charOffset": 872, + "charLength": 10, + "snippet": { + "text": "#include \"lua/callbacks/events_callbacks.hpp\"\n\nint32_t Combat::getLevelFormula(std::shared_ptr player, const std::shared_ptr wheelSpell, const CombatDamage &damage) const {\n\tif (!player) {\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "539077391f2e102d535b17ad8b8192e63f614f40e2523581d218d9652b89cfdc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 6, + "charOffset": 1065, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 6, + "charOffset": 918, + "charLength": 1, + "snippet": { + "text": "\nint32_t Combat::getLevelFormula(std::shared_ptr player, const std::shared_ptr wheelSpell, const CombatDamage &damage) const {\n\tif (!player) {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4f9b04f2e8bf6aa967f4b00dc89d36ff2cb9236afcb867f863cd7d8251efb78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 120, + "charOffset": 1301, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 120, + "charOffset": 1092, + "charLength": 3, + "snippet": { + "text": "\tuint32_t magicLevelSkill = player->getMagicLevel();\n\t// Wheel of destiny - Runic Mastery\n\tif (player->wheel()->getInstant(\"Runic Mastery\") && wheelSpell && damage.instantSpellName.empty() && normal_random(0, 100) <= 25) {\n\t\tconst auto conjuringSpell = g_spells().getInstantSpellByName(damage.runeSpellName);\n\t\tif (conjuringSpell && conjuringSpell != wheelSpell) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29948acfe0dafa7abcb00a652d1b796fa8deaeb153ff9f02bd9f5a33c10cf016" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 128, + "charOffset": 1309, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 128, + "charOffset": 1092, + "charLength": 2, + "snippet": { + "text": "\tuint32_t magicLevelSkill = player->getMagicLevel();\n\t// Wheel of destiny - Runic Mastery\n\tif (player->wheel()->getInstant(\"Runic Mastery\") && wheelSpell && damage.instantSpellName.empty() && normal_random(0, 100) <= 25) {\n\t\tconst auto conjuringSpell = g_spells().getInstantSpellByName(damage.runeSpellName);\n\t\tif (conjuringSpell && conjuringSpell != wheelSpell) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "681daab5448efb1cee7db6fa41751bb1549515aa82907c7b3aae6abca2727bc0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 37, + "startColumn": 60, + "charOffset": 1516, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 35, + "startColumn": 60, + "charOffset": 1315, + "charLength": 2, + "snippet": { + "text": "\t\tconst auto conjuringSpell = g_spells().getInstantSpellByName(damage.runeSpellName);\n\t\tif (conjuringSpell && conjuringSpell != wheelSpell) {\n\t\t\tuint32_t castResult = conjuringSpell->canCast(player) ? 20 : 10;\n\t\t\tmagicLevelSkill += magicLevelSkill * castResult / 100;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "696b072935735f63feddbda8c6bacb8870569599a529c72dd8a1ccce4a8282b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 37, + "startColumn": 65, + "charOffset": 1521, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 35, + "startColumn": 65, + "charOffset": 1315, + "charLength": 2, + "snippet": { + "text": "\t\tconst auto conjuringSpell = g_spells().getInstantSpellByName(damage.runeSpellName);\n\t\tif (conjuringSpell && conjuringSpell != wheelSpell) {\n\t\t\tuint32_t castResult = conjuringSpell->canCast(player) ? 20 : 10;\n\t\t\tmagicLevelSkill += magicLevelSkill * castResult / 100;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ee552b2b417c0492f72cad6b4e79db21fbe5c3322868b737ca5d38368dfb397" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 54, + "charOffset": 1578, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 54, + "charOffset": 1401, + "charLength": 3, + "snippet": { + "text": "\t\tif (conjuringSpell && conjuringSpell != wheelSpell) {\n\t\t\tuint32_t castResult = conjuringSpell->canCast(player) ? 20 : 10;\n\t\t\tmagicLevelSkill += magicLevelSkill * castResult / 100;\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bccb36c07b5dcd37b6f6aec894bb1edf7defbba89dd61f9febbf2f849e4363ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 25, + "charOffset": 1615, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 25, + "charOffset": 1587, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tint32_t levelFormula = player->getLevel() * 2 + (player->getMagicLevel() + player->getSpecializedMagicLevel(damage.primary.type, true)) * 3;\n\treturn levelFormula;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da9f61d2a634ff829ea08e5c1f7d9ee7b94f49f18d972cb7711fbea57d691397" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'getCombatDamage' has cognitive complexity of 31 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 46, + "startColumn": 22, + "charOffset": 1779, + "charLength": 15, + "snippet": { + "text": "getCombatDamage" + } + }, + "contextRegion": { + "startLine": 44, + "startColumn": 22, + "charOffset": 1755, + "charLength": 15, + "snippet": { + "text": "}\n\nCombatDamage Combat::getCombatDamage(std::shared_ptr creature, std::shared_ptr target) const {\n\tCombatDamage damage;\n\tdamage.origin = params.origin;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2144a3e736c095379e48e09f0e04c768a0589544cba595e73cad0f223635ba6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'getCombatDamage' of similar type ('std::shared_ptr') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 46, + "startColumn": 38, + "charOffset": 1795, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 44, + "startColumn": 38, + "charOffset": 1755, + "charLength": 3, + "snippet": { + "text": "}\n\nCombatDamage Combat::getCombatDamage(std::shared_ptr creature, std::shared_ptr target) const {\n\tCombatDamage damage;\n\tdamage.origin = params.origin;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c382ba002db0f3c469c43fc56fc365c7e172cb2187412568d19a902c9683cf73" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 46, + "startColumn": 64, + "charOffset": 1821, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 44, + "startColumn": 64, + "charOffset": 1755, + "charLength": 8, + "snippet": { + "text": "}\n\nCombatDamage Combat::getCombatDamage(std::shared_ptr creature, std::shared_ptr target) const {\n\tCombatDamage damage;\n\tdamage.origin = params.origin;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c042dcc7b0b49b4f717a89feb62a8401c387874f11e8f7fee2794d67dfb96d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 46, + "startColumn": 100, + "charOffset": 1857, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 44, + "startColumn": 100, + "charOffset": 1755, + "charLength": 6, + "snippet": { + "text": "}\n\nCombatDamage Combat::getCombatDamage(std::shared_ptr creature, std::shared_ptr target) const {\n\tCombatDamage damage;\n\tdamage.origin = params.origin;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "671e48e1afddabf73b3d7cf2fc96dd691cd524634445ab4118f60419b6be38c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 60, + "startColumn": 2, + "charOffset": 2310, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 2, + "charOffset": 2298, + "charLength": 2, + "snippet": { + "text": "\t}\n\t// End\n\tif (formulaType == COMBAT_FORMULA_DAMAGE) {\n\t\tdamage.primary.value = normal_random(\n\t\t\tstatic_cast(mina)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8001fb30b02a0c2d571a56bf22889a4629c6dccb03d3665042a72f2dbefa720d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 3, + "charOffset": 2486, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 3, + "charOffset": 2455, + "charLength": 7, + "snippet": { + "text": "\t\t);\n\t} else if (creature) {\n\t\tint32_t min, max;\n\t\tif (creature->getCombatValues(min, max)) {\n\t\t\tdamage.primary.value = normal_random(min, max);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc8311f0d555fba1d6c0492a6e2138cde393ebd256be4304788ec0e033fb8e8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 3, + "charOffset": 2486, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 3, + "charOffset": 2455, + "charLength": 7, + "snippet": { + "text": "\t\t);\n\t} else if (creature) {\n\t\tint32_t min, max;\n\t\tif (creature->getCombatValues(min, max)) {\n\t\t\tdamage.primary.value = normal_random(min, max);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6c87462871196b4803af121c90a564c21a6014aa8d51e28f74455b8ad27d4cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'min' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 11, + "charOffset": 2494, + "charLength": 3, + "snippet": { + "text": "min" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 11, + "charOffset": 2455, + "charLength": 3, + "snippet": { + "text": "\t\t);\n\t} else if (creature) {\n\t\tint32_t min, max;\n\t\tif (creature->getCombatValues(min, max)) {\n\t\t\tdamage.primary.value = normal_random(min, max);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03b511de5c38191f72a7beaef76b10cc41c0c1cdb867ab46a1a8b4daaf4519ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'max' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 16, + "charOffset": 2499, + "charLength": 3, + "snippet": { + "text": "max" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 16, + "charOffset": 2455, + "charLength": 3, + "snippet": { + "text": "\t\t);\n\t} else if (creature) {\n\t\tint32_t min, max;\n\t\tif (creature->getCombatValues(min, max)) {\n\t\t\tdamage.primary.value = normal_random(min, max);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0118c092e51cbc38b24b63b5fe5a65785dd87759999ff58c3acea2dd9a814627" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 67, + "startColumn": 3, + "charOffset": 2506, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 65, + "startColumn": 3, + "charOffset": 2460, + "charLength": 2, + "snippet": { + "text": "\t} else if (creature) {\n\t\tint32_t min, max;\n\t\tif (creature->getCombatValues(min, max)) {\n\t\t\tdamage.primary.value = normal_random(min, max);\n\t\t} else if (std::shared_ptr player = creature->getPlayer()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "146f1fbecfc81c21fbfe6a573586817f7a5724f5799e4fb0c3940b718d35a605" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 4, + "charOffset": 2674, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 4, + "charOffset": 2549, + "charLength": 2, + "snippet": { + "text": "\t\t\tdamage.primary.value = normal_random(min, max);\n\t\t} else if (std::shared_ptr player = creature->getPlayer()) {\n\t\t\tif (params.valueCallback) {\n\t\t\t\tparams.valueCallback->getMinMaxValues(player, damage, params.useCharges);\n\t\t\t} else if (formulaType == COMBAT_FORMULA_LEVELMAGIC) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34a7e8dc7a00782bf5544dc60e34bd90056c2e08d1b0e2e65fdba9b3e3e2b247" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 75, + "startColumn": 27, + "charOffset": 2978, + "charLength": 12, + "snippet": { + "text": "levelFormula" + } + }, + "contextRegion": { + "startLine": 73, + "startColumn": 27, + "charOffset": 2838, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tint32_t levelFormula = getLevelFormula(player, wheelSpell, damage);\n\t\t\t\tdamage.primary.value = normal_random(\n\t\t\t\t\tstatic_cast(levelFormula * mina + minb),\n\t\t\t\t\tstatic_cast(levelFormula * maxa + maxb)\n\t\t\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb003789c7b572aa5d01996162f881d8a72b9f60b4abbfb45e992ccfe7661ad7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 27, + "charOffset": 3033, + "charLength": 12, + "snippet": { + "text": "levelFormula" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 27, + "charOffset": 2910, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tdamage.primary.value = normal_random(\n\t\t\t\t\tstatic_cast(levelFormula * mina + minb),\n\t\t\t\t\tstatic_cast(levelFormula * maxa + maxb)\n\t\t\t\t);\n\t\t\t} else if (formulaType == COMBAT_FORMULA_SKILL) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c61fb30a663ab39cc5ca5f0376e6ddc9e3ec67da2db570465cf978db434a6d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 84, + "startColumn": 28, + "charOffset": 3362, + "charLength": 6, + "snippet": { + "text": "weapon" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 28, + "charOffset": 3258, + "charLength": 6, + "snippet": { + "text": "\t\t\t\t\tdamage.primary.value = normal_random(\n\t\t\t\t\t\tstatic_cast(minb),\n\t\t\t\t\t\tstatic_cast(weapon->getWeaponDamage(player, target, tool, true) * maxa + maxb)\n\t\t\t\t\t);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c309bede6012df5a08cb3d8df1022b55811136dd37008474c5f7c3cb31bf1b3a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 92, + "startColumn": 17, + "charOffset": 3720, + "charLength": 13, + "snippet": { + "text": "transformItem" + } + }, + "contextRegion": { + "startLine": 90, + "startColumn": 17, + "charOffset": 3601, + "charLength": 13, + "snippet": { + "text": "\t\t\t\t\t\tauto charges = tool->getAttribute(ItemAttribute_t::CHARGES);\n\t\t\t\t\t\tif (charges != 0) {\n\t\t\t\t\t\t\tg_game().transformItem(tool, tool->getID(), charges - 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e06a522648ec9aea31fbff7f201706a403873c88480402b135ae0a8589e6079b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 119, + "startColumn": 8, + "charOffset": 4376, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 117, + "startColumn": 8, + "charOffset": 4314, + "charLength": 12, + "snippet": { + "text": "\t\tarea->getList(centerPos, targetPos, list);\n\t} else {\n\t\tlist.emplace_back(g_game().map.getOrCreateTile(targetPos));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56551d818faee69a6f2e258366870fc0cca3fa3597d62051b8c0eff2d647c14d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 125, + "startColumn": 3, + "charOffset": 4523, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 123, + "startColumn": 3, + "charOffset": 4437, + "charLength": 4, + "snippet": { + "text": "CombatType_t Combat::ConditionToDamageType(ConditionType_t type) {\n\tswitch (type) {\n\t\tcase CONDITION_FIRE:\n\t\t\treturn COMBAT_FIREDAMAGE;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2ade3d0f6563632d69a455772169327d5e38ee0db4f368739cbb91302d68f99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 128, + "startColumn": 3, + "charOffset": 4576, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 126, + "startColumn": 3, + "charOffset": 4544, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn COMBAT_FIREDAMAGE;\n\n\t\tcase CONDITION_ENERGY:\n\t\t\treturn COMBAT_ENERGYDAMAGE;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f64d9bf77df8a275be35739016bd1aaf9804c2ad8d4b99dd3b280faa6c97b75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 131, + "startColumn": 3, + "charOffset": 4633, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 129, + "startColumn": 3, + "charOffset": 4599, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn COMBAT_ENERGYDAMAGE;\n\n\t\tcase CONDITION_BLEEDING:\n\t\t\treturn COMBAT_PHYSICALDAMAGE;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02b93a43de5188e85a9450b6880de505e2d0a2459906dd376189c23d02302a31" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 3, + "charOffset": 4694, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 3, + "charOffset": 4658, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn COMBAT_PHYSICALDAMAGE;\n\n\t\tcase CONDITION_DROWN:\n\t\t\treturn COMBAT_DROWNDAMAGE;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8749a49a194902cf4690d637d59d8ec433c778245c331cca48c6f1aa28b1b1a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 137, + "startColumn": 3, + "charOffset": 4749, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 135, + "startColumn": 3, + "charOffset": 4716, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn COMBAT_DROWNDAMAGE;\n\n\t\tcase CONDITION_POISON:\n\t\t\treturn COMBAT_EARTHDAMAGE;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c823bc8c2d5525c8540f9f8da7b14fe4426cff5882820a2fe1475ca88c4c021" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 140, + "startColumn": 3, + "charOffset": 4805, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 138, + "startColumn": 3, + "charOffset": 4772, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn COMBAT_EARTHDAMAGE;\n\n\t\tcase CONDITION_FREEZING:\n\t\t\treturn COMBAT_ICEDAMAGE;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "349cae386b8d36c839104cc13253d1d97f55d7a6a8d0d4e059131c7cae119f5c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 143, + "startColumn": 3, + "charOffset": 4861, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 141, + "startColumn": 3, + "charOffset": 4830, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn COMBAT_ICEDAMAGE;\n\n\t\tcase CONDITION_DAZZLED:\n\t\t\treturn COMBAT_HOLYDAMAGE;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f158a9884a6c5a7307f865c1786c4fc62b790fe27f22a92d9698a42d9420327" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 146, + "startColumn": 3, + "charOffset": 4917, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 144, + "startColumn": 3, + "charOffset": 4885, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn COMBAT_HOLYDAMAGE;\n\n\t\tcase CONDITION_CURSED:\n\t\t\treturn COMBAT_DEATHDAMAGE;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "005a179d465cb701f118933492fa18b91b5e0eb7fabcfdfacdd60e0f9b2e3b6c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 158, + "startColumn": 3, + "charOffset": 5106, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 156, + "startColumn": 3, + "charOffset": 5020, + "charLength": 4, + "snippet": { + "text": "ConditionType_t Combat::DamageToConditionType(CombatType_t type) {\n\tswitch (type) {\n\t\tcase COMBAT_FIREDAMAGE:\n\t\t\treturn CONDITION_FIRE;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f687b71a44b487a5da30c8216beb143d837b95a095a7c349e0510669b2c7881" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 161, + "startColumn": 3, + "charOffset": 5159, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 159, + "startColumn": 3, + "charOffset": 5130, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn CONDITION_FIRE;\n\n\t\tcase COMBAT_ENERGYDAMAGE:\n\t\t\treturn CONDITION_ENERGY;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "224585cb3735ad156168b488cf16804ab3aa2b31fa8eefd0d000af4c141680da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 164, + "startColumn": 3, + "charOffset": 5216, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 162, + "startColumn": 3, + "charOffset": 5185, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn CONDITION_ENERGY;\n\n\t\tcase COMBAT_DROWNDAMAGE:\n\t\t\treturn CONDITION_DROWN;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d38f3227fe9fce2f686d04dca743a77a62ac11f5ffc5d90289de0ed22c2c5a0c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 3, + "charOffset": 5271, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 3, + "charOffset": 5241, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn CONDITION_DROWN;\n\n\t\tcase COMBAT_EARTHDAMAGE:\n\t\t\treturn CONDITION_POISON;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a05180ed62923b3f4371a12ee673c1d54131328c06e67b770c8683f044b50939" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 170, + "startColumn": 3, + "charOffset": 5327, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 168, + "startColumn": 3, + "charOffset": 5296, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn CONDITION_POISON;\n\n\t\tcase COMBAT_ICEDAMAGE:\n\t\t\treturn CONDITION_FREEZING;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43cb2d6ca50b167d1f95b97d5fbf8efd7e0e15b0c72c1f4d76fba29e655e53aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 173, + "startColumn": 3, + "charOffset": 5383, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 171, + "startColumn": 3, + "charOffset": 5350, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn CONDITION_FREEZING;\n\n\t\tcase COMBAT_HOLYDAMAGE:\n\t\t\treturn CONDITION_DAZZLED;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9258785c22022b38112679dc51294539a2f6399c62276ca4cda877d3d89841f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 176, + "startColumn": 3, + "charOffset": 5439, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 174, + "startColumn": 3, + "charOffset": 5407, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn CONDITION_DAZZLED;\n\n\t\tcase COMBAT_DEATHDAMAGE:\n\t\t\treturn CONDITION_CURSED;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "deb42633f52b401084efdab2cefbb692cdc7b7ddc85144253a9efc45e3c709c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 179, + "startColumn": 3, + "charOffset": 5495, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 177, + "startColumn": 3, + "charOffset": 5464, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn CONDITION_CURSED;\n\n\t\tcase COMBAT_PHYSICALDAMAGE:\n\t\t\treturn CONDITION_BLEEDING;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b6eb5367017278cf526ac3b689902648099c82510111592ec85a00553c751a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 182, + "startColumn": 3, + "charOffset": 5556, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 180, + "startColumn": 3, + "charOffset": 5523, + "charLength": 7, + "snippet": { + "text": "\t\t\treturn CONDITION_BLEEDING;\n\n\t\tdefault:\n\t\t\treturn CONDITION_NONE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99c0a752fb4f76fac211004e09cc29a4bac8a6bf01d69584d6bacb606a4871d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 187, + "startColumn": 55, + "charOffset": 5651, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 185, + "startColumn": 55, + "charOffset": 5594, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Combat::isPlayerCombat(std::shared_ptr target) {\n\tif (target->getPlayer()) {\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c58d532d119c98692c5f87ed0e15f74e8870d5279db2c3dadb633d10ec749ade" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 199, + "startColumn": 63, + "charOffset": 5870, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 197, + "startColumn": 63, + "charOffset": 5805, + "charLength": 6, + "snippet": { + "text": "}\n\nReturnValue Combat::canTargetCreature(std::shared_ptr player, std::shared_ptr target) {\n\tif (player == target) {\n\t\treturn RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d69ca250f036f11352de2fc1335612be5e48654462c95dc6b3bc64b108813000" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 199, + "startColumn": 97, + "charOffset": 5904, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 197, + "startColumn": 97, + "charOffset": 5805, + "charLength": 6, + "snippet": { + "text": "}\n\nReturnValue Combat::canTargetCreature(std::shared_ptr player, std::shared_ptr target) {\n\tif (player == target) {\n\t\treturn RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94f54f9dbcfb888f2da65b3daba736125320c2ed20146970d1fe7f4ea599525b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 229, + "startColumn": 5, + "charOffset": 6734, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 227, + "startColumn": 5, + "charOffset": 6652, + "charLength": 4, + "snippet": { + "text": "\t\tif (target->getPlayer()) {\n\t\t\treturn RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER;\n\t\t} else {\n\t\t\treturn RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de266268e256313f726e5dd23911e86f50aa947f3048667928bb4197a5cdc04a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 247, + "startColumn": 59, + "charOffset": 7247, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 245, + "startColumn": 59, + "charOffset": 7186, + "charLength": 6, + "snippet": { + "text": "}\n\nReturnValue Combat::canDoCombat(std::shared_ptr caster, std::shared_ptr tile, bool aggressive) {\n\tif (tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) {\n\t\treturn RETURNVALUE_NOTENOUGHROOM;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a0bb603716a7bf2d5d0b396be3ba6aaf5192c5ca0918ed61ddcd2cae15f2756" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 247, + "startColumn": 89, + "charOffset": 7277, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 245, + "startColumn": 89, + "charOffset": 7186, + "charLength": 4, + "snippet": { + "text": "}\n\nReturnValue Combat::canDoCombat(std::shared_ptr caster, std::shared_ptr tile, bool aggressive) {\n\tif (tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) {\n\t\treturn RETURNVALUE_NOTENOUGHROOM;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a00a24b9e5ae72dcac5a1c367e910509d2db27a35c5028d2d2ba5e581510ed07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 266, + "startColumn": 3, + "charOffset": 7804, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 264, + "startColumn": 3, + "charOffset": 7690, + "charLength": 2, + "snippet": { + "text": "\t\tconst Position &casterPosition = caster->getPosition();\n\t\tconst Position &tilePosition = tile->getPosition();\n\t\tif (casterPosition.z < tilePosition.z) {\n\t\t\treturn RETURNVALUE_FIRSTGODOWNSTAIRS;\n\t\t} else if (casterPosition.z > tilePosition.z) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0bc9f50df2f77dc2a65a812d35804345935d7475a454c001bd25f89d6ef8e69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 268, + "startColumn": 5, + "charOffset": 7890, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 266, + "startColumn": 5, + "charOffset": 7802, + "charLength": 4, + "snippet": { + "text": "\t\tif (casterPosition.z < tilePosition.z) {\n\t\t\treturn RETURNVALUE_FIRSTGODOWNSTAIRS;\n\t\t} else if (casterPosition.z > tilePosition.z) {\n\t\t\treturn RETURNVALUE_FIRSTGOUPSTAIRS;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cac5eb30ede5aca7c7622eee005546ba577d2898a78eb78a50b58099518071c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 285, + "startColumn": 52, + "charOffset": 8494, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 283, + "startColumn": 52, + "charOffset": 8440, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Combat::isInPvpZone(std::shared_ptr attacker, std::shared_ptr target) {\n\treturn attacker->getZoneType() == ZONE_PVP && target->getZoneType() == ZONE_PVP;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b81cb57769c03d821fc5fdab64462cf560c25c31414d3044dcaf37842232a5a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 285, + "startColumn": 88, + "charOffset": 8530, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 283, + "startColumn": 88, + "charOffset": 8440, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Combat::isInPvpZone(std::shared_ptr attacker, std::shared_ptr target) {\n\treturn attacker->getZoneType() == ZONE_PVP && target->getZoneType() == ZONE_PVP;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a070b560e36c244488a77762561741df2a212ff3373424b4d6616a3972610b6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 289, + "startColumn": 50, + "charOffset": 8674, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 287, + "startColumn": 50, + "charOffset": 8622, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Combat::isProtected(std::shared_ptr attacker, std::shared_ptr target) {\n\tuint32_t protectionLevel = g_configManager().getNumber(PROTECTION_LEVEL, __FUNCTION__);\n\tif (target->getLevel() < protectionLevel || attacker->getLevel() < protectionLevel) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a08e5e1b293461db2c625c57b2e2d1e6b5b7eb1790a594e61a4849e67d62f896" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 289, + "startColumn": 84, + "charOffset": 8708, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 287, + "startColumn": 84, + "charOffset": 8622, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Combat::isProtected(std::shared_ptr attacker, std::shared_ptr target) {\n\tuint32_t protectionLevel = g_configManager().getNumber(PROTECTION_LEVEL, __FUNCTION__);\n\tif (target->getLevel() < protectionLevel || attacker->getLevel() < protectionLevel) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1886e406f3a69f021bb60b8f562ba38df348e3754da1a8ab93824088a756489c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'canDoCombat' has cognitive complexity of 135 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 306, + "startColumn": 21, + "charOffset": 9262, + "charLength": 11, + "snippet": { + "text": "canDoCombat" + } + }, + "contextRegion": { + "startLine": 304, + "startColumn": 21, + "charOffset": 9239, + "charLength": 11, + "snippet": { + "text": "}\n\nReturnValue Combat::canDoCombat(std::shared_ptr attacker, std::shared_ptr target, bool aggressive) {\n\tif (!aggressive) {\n\t\treturn RETURNVALUE_NOERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f6305720500dd5b9c6d8234d1ae6309c49abe65fca58cf1dd5ff8be689bae72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 306, + "startColumn": 59, + "charOffset": 9300, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 304, + "startColumn": 59, + "charOffset": 9239, + "charLength": 8, + "snippet": { + "text": "}\n\nReturnValue Combat::canDoCombat(std::shared_ptr attacker, std::shared_ptr target, bool aggressive) {\n\tif (!aggressive) {\n\t\treturn RETURNVALUE_NOERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c112b618bb168d0e2a424cf842b121174a040ded0109f765677bafdc3a79e0de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 306, + "startColumn": 95, + "charOffset": 9336, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 304, + "startColumn": 95, + "charOffset": 9239, + "charLength": 6, + "snippet": { + "text": "}\n\nReturnValue Combat::canDoCombat(std::shared_ptr attacker, std::shared_ptr target, bool aggressive) {\n\tif (!aggressive) {\n\t\treturn RETURNVALUE_NOERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c06a1c3a447290c12580a82e50a6e43b63375a56c96a392eec5bcaf68d43e832" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Expression can be simplified" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 318, + "startColumn": 82, + "charOffset": 9769, + "charLength": 1, + "snippet": { + "text": ":" + } + }, + "contextRegion": { + "startLine": 316, + "startColumn": 82, + "charOffset": 9635, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\t\tif (tile->hasFlag(TILESTATE_PROTECTIONZONE)) {\n\t\t\tauto permittedOnPz = targetPlayer ? targetPlayer->hasPermittedConditionInPZ() : false;\n\t\t\treturn permittedOnPz ? RETURNVALUE_NOERROR : RETURNVALUE_ACTIONNOTPERMITTEDINPROTECTIONZONE;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7834b280b3b4ef2a9102b6b3a0e3c74374930f9098cd2482c918ace290c3a714" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 325, + "startColumn": 3, + "charOffset": 9975, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 323, + "startColumn": 3, + "charOffset": 9882, + "charLength": 2, + "snippet": { + "text": "\tif (attacker) {\n\t\tconst std::shared_ptr attackerMaster = attacker->getMaster();\n\t\tif (targetPlayer) {\n\t\t\tif (targetPlayer->hasFlag(PlayerFlags_t::CannotBeAttacked)) {\n\t\t\t\treturn RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0d9bdd51b5739d82ec45cfbdab4a823270351ed36a88bbce999853ecb967f5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 343, + "startColumn": 5, + "charOffset": 10583, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 341, + "startColumn": 5, + "charOffset": 10510, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t// nopvp-zone\n\t\t\t\tauto attackerTile = attackerPlayer->getTile();\n\t\t\t\tif (targetPlayerTile && targetPlayerTile->hasFlag(TILESTATE_NOPVPZONE)) {\n\t\t\t\t\treturn RETURNVALUE_ACTIONNOTPERMITTEDINANOPVPZONE;\n\t\t\t\t} else if (attackerTile && attackerTile->hasFlag(TILESTATE_NOPVPZONE) && targetPlayerTile && !targetPlayerTile->hasFlag(TILESTATE_NOPVPZONE | TILESTATE_PROTECTIONZONE)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d436a7bc1cd3a1ab59b87e8be46835b484f718f4e5bf3a33cab2fd0eedf5ee0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 343, + "startColumn": 77, + "charOffset": 10655, + "charLength": 1, + "snippet": { + "text": "{" + } + }, + "contextRegion": { + "startLine": 341, + "startColumn": 77, + "charOffset": 10510, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t// nopvp-zone\n\t\t\t\tauto attackerTile = attackerPlayer->getTile();\n\t\t\t\tif (targetPlayerTile && targetPlayerTile->hasFlag(TILESTATE_NOPVPZONE)) {\n\t\t\t\t\treturn RETURNVALUE_ACTIONNOTPERMITTEDINANOPVPZONE;\n\t\t\t\t} else if (attackerTile && attackerTile->hasFlag(TILESTATE_NOPVPZONE) && targetPlayerTile && !targetPlayerTile->hasFlag(TILESTATE_NOPVPZONE | TILESTATE_PROTECTIONZONE)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df16b087a2a79e8532b44ee8a6140205aa15f1f1430009b4f1e83ef8d1592f29" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 345, + "startColumn": 7, + "charOffset": 10719, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 343, + "startColumn": 7, + "charOffset": 10579, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tif (targetPlayerTile && targetPlayerTile->hasFlag(TILESTATE_NOPVPZONE)) {\n\t\t\t\t\treturn RETURNVALUE_ACTIONNOTPERMITTEDINANOPVPZONE;\n\t\t\t\t} else if (attackerTile && attackerTile->hasFlag(TILESTATE_NOPVPZONE) && targetPlayerTile && !targetPlayerTile->hasFlag(TILESTATE_NOPVPZONE | TILESTATE_PROTECTIONZONE)) {\n\t\t\t\t\treturn RETURNVALUE_ACTIONNOTPERMITTEDINANOPVPZONE;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b72091b924336fdda43e9c97967eab594bd11ddb29d7bcf5d1ff0191ef3e7d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 345, + "startColumn": 145, + "charOffset": 10857, + "charLength": 1, + "snippet": { + "text": "|" + } + }, + "contextRegion": { + "startLine": 343, + "startColumn": 145, + "charOffset": 10579, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tif (targetPlayerTile && targetPlayerTile->hasFlag(TILESTATE_NOPVPZONE)) {\n\t\t\t\t\treturn RETURNVALUE_ACTIONNOTPERMITTEDINANOPVPZONE;\n\t\t\t\t} else if (attackerTile && attackerTile->hasFlag(TILESTATE_NOPVPZONE) && targetPlayerTile && !targetPlayerTile->hasFlag(TILESTATE_NOPVPZONE | TILESTATE_PROTECTIONZONE)) {\n\t\t\t\t\treturn RETURNVALUE_ACTIONNOTPERMITTEDINANOPVPZONE;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c29f8a35fbd8b61f9c8893de2cb6d7f73f7124bfdea85f8b2225ba78825903e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 370, + "startColumn": 35, + "charOffset": 11748, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 368, + "startColumn": 35, + "charOffset": 11708, + "charLength": 1, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (attacker->getMonster() && (!attackerMaster || attackerMaster->getMonster())) {\n\t\t\t\tif (attacker->getFaction() != FACTION_DEFAULT && !attacker->getMonster()->isEnemyFaction(targetPlayer->getFaction())) {\n\t\t\t\t\treturn RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fea2b6111e50c23f01a58542583fb711f0cfcfec3c16e5bfb2e91bdce16b9216" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 380, + "startColumn": 4, + "charOffset": 12281, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 378, + "startColumn": 4, + "charOffset": 12272, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (const std::shared_ptr attackerPlayer = attacker->getPlayer()) {\n\t\t\t\tif (attackerPlayer->hasFlag(PlayerFlags_t::CannotAttackMonster)) {\n\t\t\t\t\treturn RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad14014790e8568c2725f1d2105f81a37e19e7820f7f7e64de3918bb1b93792f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 391, + "startColumn": 10, + "charOffset": 12777, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 389, + "startColumn": 10, + "charOffset": 12695, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tconst std::shared_ptr targetMaster = target->getMaster();\n\n\t\t\t\tif ((!targetMaster || !targetMaster->getPlayer()) && attacker->getFaction() == FACTION_DEFAULT) {\n\t\t\t\t\tif (!attackerMaster || !attackerMaster->getPlayer()) {\n\t\t\t\t\t\treturn RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30b0add063e5f92a5cb9d8ec1f22a375008e12e2feb00a53a628286adcf02eb3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 391, + "startColumn": 27, + "charOffset": 12794, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 389, + "startColumn": 27, + "charOffset": 12695, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tconst std::shared_ptr targetMaster = target->getMaster();\n\n\t\t\t\tif ((!targetMaster || !targetMaster->getPlayer()) && attacker->getFaction() == FACTION_DEFAULT) {\n\t\t\t\t\tif (!attackerMaster || !attackerMaster->getPlayer()) {\n\t\t\t\t\t\treturn RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48b79da9f4d74ff4bca345265a5dbf53f9416c9009833d70a095453c346c6d30" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 392, + "startColumn": 10, + "charOffset": 12879, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 390, + "startColumn": 10, + "charOffset": 12767, + "charLength": 1, + "snippet": { + "text": "\n\t\t\t\tif ((!targetMaster || !targetMaster->getPlayer()) && attacker->getFaction() == FACTION_DEFAULT) {\n\t\t\t\t\tif (!attackerMaster || !attackerMaster->getPlayer()) {\n\t\t\t\t\t\treturn RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72547e60846a83745bf7e4b3531a40ca53ebf6677db2225cad9d0e1b6c8ded60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 392, + "startColumn": 29, + "charOffset": 12898, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 390, + "startColumn": 29, + "charOffset": 12767, + "charLength": 1, + "snippet": { + "text": "\n\t\t\t\tif ((!targetMaster || !targetMaster->getPlayer()) && attacker->getFaction() == FACTION_DEFAULT) {\n\t\t\t\t\tif (!attackerMaster || !attackerMaster->getPlayer()) {\n\t\t\t\t\t\treturn RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be653e21b593944b1b90dfe31ad0f8ae6d4a79419646f98227b64046419ffb9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'setPlayerCombatValues' of similar type ('double') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 424, + "startColumn": 82, + "charOffset": 13932, + "charLength": 6, + "snippet": { + "text": "double" + } + }, + "contextRegion": { + "startLine": 422, + "startColumn": 82, + "charOffset": 13848, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::setPlayerCombatValues(formulaType_t newFormulaType, double newMina, double newMinb, double newMaxa, double newMaxb) {\n\tthis->formulaType = newFormulaType;\n\tthis->mina = newMina;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b4832a7cf68a5b557ae5767ad466b9f59a36a548b09dd8e394e48cace012fca5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 434, + "startColumn": 3, + "charOffset": 14195, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 432, + "startColumn": 3, + "charOffset": 14114, + "charLength": 4, + "snippet": { + "text": "bool Combat::setParam(CombatParam_t param, uint32_t value) {\n\tswitch (param) {\n\t\tcase COMBAT_PARAM_TYPE: {\n\t\t\tparams.combatType = static_cast(value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7c8c00b05259f2029872ec10c80e1e7ec3ffd2b728a1f86ff4bfe935238a212" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 439, + "startColumn": 3, + "charOffset": 14301, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 437, + "startColumn": 3, + "charOffset": 14294, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase COMBAT_PARAM_EFFECT: {\n\t\t\tparams.impactEffect = static_cast(value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d7257f555d677155efec8e4271674f3b43328e8dd435c693150ec46d4b06227" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 444, + "startColumn": 3, + "charOffset": 14407, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 442, + "startColumn": 3, + "charOffset": 14400, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase COMBAT_PARAM_DISTANCEEFFECT: {\n\t\t\tparams.distanceEffect = static_cast(value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c824b8e169b5877f95025f0f9a56ff6792914a9caea7ae3d8957c6bee52f8634" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 449, + "startColumn": 3, + "charOffset": 14523, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 447, + "startColumn": 3, + "charOffset": 14516, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase COMBAT_PARAM_BLOCKARMOR: {\n\t\t\tparams.blockedByArmor = (value != 0);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de62c3c16216b8e4f6b621f48d9c7b11af9d4785cf8a7c1473aca50279dfa736" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 454, + "startColumn": 3, + "charOffset": 14619, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 452, + "startColumn": 3, + "charOffset": 14612, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase COMBAT_PARAM_BLOCKSHIELD: {\n\t\t\tparams.blockedByShield = (value != 0);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6776b0e0f102fdecc1c76d1e629a99750a731ea5e048a3e2b95e096a8971276c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 459, + "startColumn": 3, + "charOffset": 14717, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 457, + "startColumn": 3, + "charOffset": 14710, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase COMBAT_PARAM_TARGETCASTERORTOPMOST: {\n\t\t\tparams.targetCasterOrTopMost = (value != 0);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b516981ce512aa724a91a753d3d5391e15c7c773b8d78f06878c046436f8e333" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 464, + "startColumn": 3, + "charOffset": 14831, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 462, + "startColumn": 3, + "charOffset": 14824, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase COMBAT_PARAM_CREATEITEM: {\n\t\t\tparams.itemId = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b1fa89baa99000f9aa264dbf53d35277e413b23dab33d346697cecdca017f01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 465, + "startColumn": 20, + "charOffset": 14882, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 463, + "startColumn": 20, + "charOffset": 14828, + "charLength": 5, + "snippet": { + "text": "\n\t\tcase COMBAT_PARAM_CREATEITEM: {\n\t\t\tparams.itemId = value;\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "020cccea8e95db7e6763cd9d4c3754b8069d5aaf591abb9dd98727ca1e7ee775" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 469, + "startColumn": 3, + "charOffset": 14912, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 467, + "startColumn": 3, + "charOffset": 14905, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase COMBAT_PARAM_AGGRESSIVE: {\n\t\t\tparams.aggressive = (value != 0);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e84e6ce9738889b931b31c05740bdf16d2b63f2c47a5ec9caa08f212a6c4aa68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 474, + "startColumn": 3, + "charOffset": 15004, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 472, + "startColumn": 3, + "charOffset": 14997, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase COMBAT_PARAM_DISPEL: {\n\t\t\tparams.dispelType = static_cast(value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da746ca049a96f1d015a52a114026aec783deafc1f5e5a425cdab24d17686246" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 479, + "startColumn": 3, + "charOffset": 15115, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 477, + "startColumn": 3, + "charOffset": 15108, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase COMBAT_PARAM_USECHARGES: {\n\t\t\tparams.useCharges = (value != 0);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f585c138fb3ada3689a3a7e18380521809f46ebb6b9b490f836ba394d6aa69f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 484, + "startColumn": 3, + "charOffset": 15207, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 482, + "startColumn": 3, + "charOffset": 15200, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase COMBAT_PARAM_IMPACTSOUND: {\n\t\t\tparams.soundImpactEffect = static_cast(value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f921e5b32b81588e93844ef304bdce3eba541ef37295f8b1a3261579015d130" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 489, + "startColumn": 3, + "charOffset": 15328, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 487, + "startColumn": 3, + "charOffset": 15321, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase COMBAT_PARAM_CASTSOUND: {\n\t\t\tparams.soundCastEffect = static_cast(value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f64d9bf77df8a275be35739016bd1aaf9804c2ad8d4b99dd3b280faa6c97b75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 494, + "startColumn": 3, + "charOffset": 15445, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 492, + "startColumn": 3, + "charOffset": 15438, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase COMBAT_PARAM_CHAIN_EFFECT: {\n\t\t\tparams.chainEffect = static_cast(value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef376c51a79da3311b39a9f7fef45c4d6e97ed8fc0ed88feb23051931e63b587" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 504, + "startColumn": 3, + "charOffset": 15639, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 502, + "startColumn": 3, + "charOffset": 15573, + "charLength": 4, + "snippet": { + "text": "bool Combat::setCallback(CallBackParam_t key) {\n\tswitch (key) {\n\t\tcase CALLBACK_PARAM_LEVELMAGICVALUE: {\n\t\t\tparams.valueCallback = std::make_unique(COMBAT_FORMULA_LEVELMAGIC);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6b896878edb8537854e28feec7338902776af705f103d711a946ddb8e541257" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 509, + "startColumn": 3, + "charOffset": 15787, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 507, + "startColumn": 3, + "charOffset": 15780, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CALLBACK_PARAM_SKILLVALUE: {\n\t\t\tparams.valueCallback = std::make_unique(COMBAT_FORMULA_SKILL);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2ade3d0f6563632d69a455772169327d5e38ee0db4f368739cbb91302d68f99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 514, + "startColumn": 3, + "charOffset": 15925, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 512, + "startColumn": 3, + "charOffset": 15918, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CALLBACK_PARAM_TARGETTILE: {\n\t\t\tparams.tileCallback = std::make_unique();\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "005a179d465cb701f118933492fa18b91b5e0eb7fabcfdfacdd60e0f9b2e3b6c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 519, + "startColumn": 3, + "charOffset": 16041, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 517, + "startColumn": 3, + "charOffset": 16034, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CALLBACK_PARAM_TARGETCREATURE: {\n\t\t\tparams.targetCallback = std::make_unique();\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d43d730970b3277e96f8ef58c264e881396df1571a69854e5c8f459c14295e2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 524, + "startColumn": 3, + "charOffset": 16165, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 522, + "startColumn": 3, + "charOffset": 16158, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CALLBACK_PARAM_CHAINVALUE: {\n\t\t\tparams.chainCallback = std::make_unique();\n\t\t\tparams.chainCallback->setFromLua(true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4828603109518d7c3c0d39663db15d856b0dc9dcb32f0b86542c070f35614b54" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 530, + "startColumn": 3, + "charOffset": 16326, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 528, + "startColumn": 3, + "charOffset": 16319, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CALLBACK_PARAM_CHAINPICKER: {\n\t\t\tparams.chainPickerCallback = std::make_unique();\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1055f77b3efc44c518fcd24cdf0a1e0e2732d3fe690fa71d99a6318eb5b9fcba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-make-member-function-const", + "ruleIndex": 708, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getCallback' can be made const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 543, + "startColumn": 19, + "charOffset": 16866, + "charLength": 11, + "snippet": { + "text": "getCallback" + } + }, + "contextRegion": { + "startLine": 541, + "startColumn": 19, + "charOffset": 16845, + "charLength": 11, + "snippet": { + "text": "}\n\nCallBack* Combat::getCallback(CallBackParam_t key) {\n\tswitch (key) {\n\t\tcase CALLBACK_PARAM_LEVELMAGICVALUE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03d82e20c57915716030e4e0e5b5082a1023c575d399d2eab94de067890ffa3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 546, + "startColumn": 3, + "charOffset": 16958, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 544, + "startColumn": 3, + "charOffset": 16901, + "charLength": 4, + "snippet": { + "text": "\tswitch (key) {\n\t\tcase CALLBACK_PARAM_LEVELMAGICVALUE:\n\t\tcase CALLBACK_PARAM_SKILLVALUE: {\n\t\t\treturn params.valueCallback.get();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d003a71f9aabb22a66a76a468bd440b1c631db7774a01f110d197ad4df1121c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 546, + "startColumn": 3, + "charOffset": 16958, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 544, + "startColumn": 3, + "charOffset": 16901, + "charLength": 4, + "snippet": { + "text": "\tswitch (key) {\n\t\tcase CALLBACK_PARAM_LEVELMAGICVALUE:\n\t\tcase CALLBACK_PARAM_SKILLVALUE: {\n\t\t\treturn params.valueCallback.get();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e59e46448e4be161b76e58c89fdecd86ed0169bfc64c11ae5ecf933a40c0d20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 550, + "startColumn": 3, + "charOffset": 17037, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 548, + "startColumn": 3, + "charOffset": 17030, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CALLBACK_PARAM_TARGETTILE: {\n\t\t\treturn params.tileCallback.get();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c823bc8c2d5525c8540f9f8da7b14fe4426cff5882820a2fe1475ca88c4c021" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 554, + "startColumn": 3, + "charOffset": 17115, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 552, + "startColumn": 3, + "charOffset": 17108, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CALLBACK_PARAM_TARGETCREATURE: {\n\t\t\treturn params.targetCallback.get();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1bbe9eb8343d2cb877fd9f3c4bc2d5cceb8975cd4b6e802db31c230da39b92ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 558, + "startColumn": 3, + "charOffset": 17199, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 556, + "startColumn": 3, + "charOffset": 17192, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CALLBACK_PARAM_CHAINVALUE: {\n\t\t\treturn params.chainCallback.get();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a38c1abb38b9c57a9d27b874b6303e6f72cc1f73717c7aa17f63d56f9d80f314" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 562, + "startColumn": 3, + "charOffset": 17278, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 560, + "startColumn": 3, + "charOffset": 17271, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CALLBACK_PARAM_CHAINPICKER: {\n\t\t\treturn params.chainPickerCallback.get();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc7c2ce6c49c1e3f545dd99856647f9785a408003b71da530097bfaf5acd6e89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'CombatHealthFunc' has cognitive complexity of 28 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 569, + "startColumn": 14, + "charOffset": 17397, + "charLength": 16, + "snippet": { + "text": "CombatHealthFunc" + } + }, + "contextRegion": { + "startLine": 567, + "startColumn": 14, + "charOffset": 17381, + "charLength": 16, + "snippet": { + "text": "}\n\nvoid Combat::CombatHealthFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\n\tif (!data) {\n\t\tg_logger().error(\"[{}]: CombatDamage is nullptr\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "066a9eff5b518732be092deac79d2996c163dc9ca1a1f0005a09b142d5183d48" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 569, + "startColumn": 57, + "charOffset": 17440, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 567, + "startColumn": 57, + "charOffset": 17381, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::CombatHealthFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\n\tif (!data) {\n\t\tg_logger().error(\"[{}]: CombatDamage is nullptr\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef90a3e1708bb84ae2848c8d01327b56d152697ba2c4b0bea165c9b14515b55b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 569, + "startColumn": 91, + "charOffset": 17474, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 567, + "startColumn": 91, + "charOffset": 17381, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::CombatHealthFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\n\tif (!data) {\n\t\tg_logger().error(\"[{}]: CombatDamage is nullptr\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d1974cf5e6553552220224b90b675b45b03d2f53d1c3fcdbfe38ae25f1807e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 570, + "startColumn": 6, + "charOffset": 17537, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 568, + "startColumn": 6, + "charOffset": 17383, + "charLength": 1, + "snippet": { + "text": "\nvoid Combat::CombatHealthFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\n\tif (!data) {\n\t\tg_logger().error(\"[{}]: CombatDamage is nullptr\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4015ddf7ce6246fa398df209e15e16639120ebfea6849c6497340be445f1f8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'CombatDamage *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 570, + "startColumn": 7, + "charOffset": 17538, + "charLength": 4, + "snippet": { + "text": "data" + } + }, + "contextRegion": { + "startLine": 568, + "startColumn": 7, + "charOffset": 17383, + "charLength": 4, + "snippet": { + "text": "\nvoid Combat::CombatHealthFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\n\tif (!data) {\n\t\tg_logger().error(\"[{}]: CombatDamage is nullptr\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1bc9cc8ca187dd7af1c6f9dcaf00bbacd73ef56a3a50739af05dc44a0ca48d75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 624, + "startColumn": 108, + "charOffset": 19321, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 622, + "startColumn": 108, + "charOffset": 19010, + "charLength": 3, + "snippet": { + "text": "\t\tconst std::unique_ptr &slot = attackerPlayer->getPreyWithMonster(targetMonster->getRaceId());\n\t\tif (slot && slot->isOccupied() && slot->bonus == PreyBonus_Damage && slot->bonusTimeLeft > 0) {\n\t\t\tdamage.primary.value += static_cast(std::ceil((damage.primary.value * slot->bonusPercentage) / 100));\n\t\t\tdamage.secondary.value += static_cast(std::ceil((damage.secondary.value * slot->bonusPercentage) / 100));\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22e878f52fe6579ab34aacd7237d9469369564e7a38679b3cb228a6c0aae4fff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 625, + "startColumn": 112, + "charOffset": 19439, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 623, + "startColumn": 112, + "charOffset": 19116, + "charLength": 3, + "snippet": { + "text": "\t\tif (slot && slot->isOccupied() && slot->bonus == PreyBonus_Damage && slot->bonusTimeLeft > 0) {\n\t\t\tdamage.primary.value += static_cast(std::ceil((damage.primary.value * slot->bonusPercentage) / 100));\n\t\t\tdamage.secondary.value += static_cast(std::ceil((damage.secondary.value * slot->bonusPercentage) / 100));\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20c0645a50c41b218fdb562d884d2f8ca907484ba40f43d8590618339cba76bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 633, + "startColumn": 108, + "charOffset": 19835, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 631, + "startColumn": 108, + "charOffset": 19523, + "charLength": 3, + "snippet": { + "text": "\t\tconst std::unique_ptr &slot = targetPlayer->getPreyWithMonster(attackerMonster->getRaceId());\n\t\tif (slot && slot->isOccupied() && slot->bonus == PreyBonus_Defense && slot->bonusTimeLeft > 0) {\n\t\t\tdamage.primary.value -= static_cast(std::ceil((damage.primary.value * slot->bonusPercentage) / 100));\n\t\t\tdamage.secondary.value -= static_cast(std::ceil((damage.secondary.value * slot->bonusPercentage) / 100));\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16278ca967bf536ae994e87b08bb308f9aa3e336d24fc06ecf965be45993340d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 634, + "startColumn": 112, + "charOffset": 19953, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 632, + "startColumn": 112, + "charOffset": 19629, + "charLength": 3, + "snippet": { + "text": "\t\tif (slot && slot->isOccupied() && slot->bonus == PreyBonus_Defense && slot->bonusTimeLeft > 0) {\n\t\t\tdamage.primary.value -= static_cast(std::ceil((damage.primary.value * slot->bonusPercentage) / 100));\n\t\t\tdamage.secondary.value -= static_cast(std::ceil((damage.secondary.value * slot->bonusPercentage) / 100));\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "162b508f83d1fad0e433bfcc2feb038b6c1fae0c3b453785c9576ec261e2ca34" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 644, + "startColumn": 76, + "charOffset": 20218, + "charLength": 14, + "snippet": { + "text": "attackerPlayer" + } + }, + "contextRegion": { + "startLine": 642, + "startColumn": 76, + "charOffset": 20140, + "charLength": 14, + "snippet": { + "text": "}\n\nCombatDamage Combat::applyImbuementElementalDamage(std::shared_ptr attackerPlayer, std::shared_ptr item, CombatDamage damage) {\n\tif (!item) {\n\t\treturn damage;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9645b7a7e5b894113f4957e934628ed7a2a52e366bee421b54bc89a5307f8d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 645, + "startColumn": 6, + "charOffset": 20290, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 643, + "startColumn": 6, + "charOffset": 20142, + "charLength": 1, + "snippet": { + "text": "\nCombatDamage Combat::applyImbuementElementalDamage(std::shared_ptr attackerPlayer, std::shared_ptr item, CombatDamage damage) {\n\tif (!item) {\n\t\treturn damage;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb047284ebb10784c9503a464b2777bb5458fcc16f7c948425fcb4778eff1396" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 653, + "startColumn": 2, + "charOffset": 20512, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 651, + "startColumn": 2, + "charOffset": 20507, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (uint8_t slotid = 0; slotid < item->getImbuementSlot(); slotid++) {\n\t\tImbuementInfo imbuementInfo;\n\t\tif (!item->getImbuementInfo(slotid, &imbuementInfo)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c94c45bc0cc334584e723f0a70e37a9478abfe7e02dc3b6a2d6486710d0b2320" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 669, + "startColumn": 25, + "charOffset": 20957, + "charLength": 13, + "snippet": { + "text": "imbuementInfo" + } + }, + "contextRegion": { + "startLine": 667, + "startColumn": 25, + "charOffset": 20928, + "charLength": 13, + "snippet": { + "text": "\t\t}\n\n\t\tfloat damagePercent = imbuementInfo.imbuement->elementDamage / 100.0;\n\n\t\tdamage.secondary.type = imbuementInfo.imbuement->combatType;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "153777602ce76d676a0fa9aaf784771b81604d401e7c9a579e4d4d3e62636062" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 669, + "startColumn": 25, + "charOffset": 20957, + "charLength": 13, + "snippet": { + "text": "imbuementInfo" + } + }, + "contextRegion": { + "startLine": 667, + "startColumn": 25, + "charOffset": 20928, + "charLength": 13, + "snippet": { + "text": "\t\t}\n\n\t\tfloat damagePercent = imbuementInfo.imbuement->elementDamage / 100.0;\n\n\t\tdamage.secondary.type = imbuementInfo.imbuement->combatType;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da30a211a95d884336f94a6f1ef232dc49ea136eb451baef33401ac620592e8d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 669, + "startColumn": 25, + "charOffset": 20957, + "charLength": 13, + "snippet": { + "text": "imbuementInfo" + } + }, + "contextRegion": { + "startLine": 667, + "startColumn": 25, + "charOffset": 20928, + "charLength": 13, + "snippet": { + "text": "\t\t}\n\n\t\tfloat damagePercent = imbuementInfo.imbuement->elementDamage / 100.0;\n\n\t\tdamage.secondary.type = imbuementInfo.imbuement->combatType;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1de5268c6ce9e4e332b558cfd613b0b7600852fc5137a3f1e8e92340487730b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 672, + "startColumn": 28, + "charOffset": 21096, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 670, + "startColumn": 28, + "charOffset": 21005, + "charLength": 6, + "snippet": { + "text": "\n\t\tdamage.secondary.type = imbuementInfo.imbuement->combatType;\n\t\tdamage.secondary.value = damage.primary.value * (damagePercent);\n\t\tdamage.primary.value = damage.primary.value * (1 - damagePercent);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad835e5f47dd2cce4abdd9758fb566a888dcfcba0e7c12ee9be2b7c4826d8879" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 672, + "startColumn": 28, + "charOffset": 21096, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 670, + "startColumn": 28, + "charOffset": 21005, + "charLength": 6, + "snippet": { + "text": "\n\t\tdamage.secondary.type = imbuementInfo.imbuement->combatType;\n\t\tdamage.secondary.value = damage.primary.value * (damagePercent);\n\t\tdamage.primary.value = damage.primary.value * (1 - damagePercent);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58a96818591d2bb9e174bc46dd927dc28baa792364b91fe60306b6183af9db17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 672, + "startColumn": 28, + "charOffset": 21096, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 670, + "startColumn": 28, + "charOffset": 21005, + "charLength": 6, + "snippet": { + "text": "\n\t\tdamage.secondary.type = imbuementInfo.imbuement->combatType;\n\t\tdamage.secondary.value = damage.primary.value * (damagePercent);\n\t\tdamage.primary.value = damage.primary.value * (1 - damagePercent);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95ef4eeab4beb3761aefb9192b9b52fcb5daf7f89eca4c22baaf6898f9197dc0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 673, + "startColumn": 26, + "charOffset": 21161, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 671, + "startColumn": 26, + "charOffset": 21006, + "charLength": 6, + "snippet": { + "text": "\t\tdamage.secondary.type = imbuementInfo.imbuement->combatType;\n\t\tdamage.secondary.value = damage.primary.value * (damagePercent);\n\t\tdamage.primary.value = damage.primary.value * (1 - damagePercent);\n\n\t\tif (imbuementInfo.imbuement->soundEffect != SoundEffect_t::SILENCE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a455672c0950782842b8e3149512b549597e53c0d17d7b36479b070007436536" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 673, + "startColumn": 26, + "charOffset": 21161, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 671, + "startColumn": 26, + "charOffset": 21006, + "charLength": 6, + "snippet": { + "text": "\t\tdamage.secondary.type = imbuementInfo.imbuement->combatType;\n\t\tdamage.secondary.value = damage.primary.value * (damagePercent);\n\t\tdamage.primary.value = damage.primary.value * (1 - damagePercent);\n\n\t\tif (imbuementInfo.imbuement->soundEffect != SoundEffect_t::SILENCE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "378ca2c9c5d366572d6895430dea69c0fa78c0c3491714fadc1f95f7dfb3c574" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 673, + "startColumn": 26, + "charOffset": 21161, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 671, + "startColumn": 26, + "charOffset": 21006, + "charLength": 6, + "snippet": { + "text": "\t\tdamage.secondary.type = imbuementInfo.imbuement->combatType;\n\t\tdamage.secondary.value = damage.primary.value * (damagePercent);\n\t\tdamage.primary.value = damage.primary.value * (1 - damagePercent);\n\n\t\tif (imbuementInfo.imbuement->soundEffect != SoundEffect_t::SILENCE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc951d3e19ca0131b421915dd1ff2983928db7faded98c6a2d61aac03ea3c756" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-6-4", + "ruleIndex": 461, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-6-4: For any iteration statement there shall be no more than one break or goto statement used for loop termination" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 680, + "startColumn": 3, + "charOffset": 21481, + "charLength": 5, + "snippet": { + "text": "break" + } + }, + "contextRegion": { + "startLine": 678, + "startColumn": 3, + "charOffset": 21402, + "charLength": 5, + "snippet": { + "text": "\n\t\t// If damage imbuement is set, we can return without checking other slots\n\t\tbreak;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f6271a030f0c3738d6ce5582124780e1a1abf8e4892059f650ed1be5bfe252c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 686, + "startColumn": 55, + "charOffset": 21565, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 684, + "startColumn": 55, + "charOffset": 21508, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::CombatManaFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\n\tif (!data) {\n\t\tg_logger().error(\"[{}]: CombatDamage is nullptr\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e88f4ac97624713459439b84ce3e320ffa4c6997d24321b2840cfd723033642" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 686, + "startColumn": 89, + "charOffset": 21599, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 684, + "startColumn": 89, + "charOffset": 21508, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::CombatManaFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\n\tif (!data) {\n\t\tg_logger().error(\"[{}]: CombatDamage is nullptr\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05bd954d669ac17413ff000b7e5242848b59e26f9388d5eb2977582b9aca6fe0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 687, + "startColumn": 6, + "charOffset": 21662, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 685, + "startColumn": 6, + "charOffset": 21510, + "charLength": 1, + "snippet": { + "text": "\nvoid Combat::CombatManaFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\n\tif (!data) {\n\t\tg_logger().error(\"[{}]: CombatDamage is nullptr\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a43d07db4baa4b375c0353c558e6cbf65ac74702b568fd50847922e2c31c9c6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'CombatDamage *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 687, + "startColumn": 7, + "charOffset": 21663, + "charLength": 4, + "snippet": { + "text": "data" + } + }, + "contextRegion": { + "startLine": 685, + "startColumn": 7, + "charOffset": 21510, + "charLength": 4, + "snippet": { + "text": "\nvoid Combat::CombatManaFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\n\tif (!data) {\n\t\tg_logger().error(\"[{}]: CombatDamage is nullptr\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8af85d4786757d1dbca8f9c1053e0d79841b3809ab6471429b26472ffe02da8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 705, + "startColumn": 65, + "charOffset": 22213, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 703, + "startColumn": 65, + "charOffset": 22146, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Combat::checkFearConditionAffected(std::shared_ptr player) {\n\tif (player->isImmuneFear()) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "435ef079ec2a1bea47c5394e5df65a126e215da211ae05079f9f6a4ff27eb775" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 716, + "startColumn": 51, + "charOffset": 22439, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 714, + "startColumn": 51, + "charOffset": 22341, + "charLength": 1, + "snippet": { + "text": "\tauto party = player->getParty();\n\tif (party) {\n\t\tauto affectedCount = (party->getMemberCount() + 5) / 5;\n\t\tg_logger().debug(\"[{}] Player is member of a party, {} members can be feared\", __FUNCTION__, affectedCount);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7ca367aac6abece7ceb97674fcf5cabc08ea33637c4339499a1884efebe7b13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 716, + "startColumn": 56, + "charOffset": 22444, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 714, + "startColumn": 56, + "charOffset": 22341, + "charLength": 1, + "snippet": { + "text": "\tauto party = player->getParty();\n\tif (party) {\n\t\tauto affectedCount = (party->getMemberCount() + 5) / 5;\n\t\tg_logger().debug(\"[{}] Player is member of a party, {} members can be feared\", __FUNCTION__, affectedCount);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9d4fa41fef8430678aeb996d80a2adea92bc2ca91f4cf77072ca44a5b0c0d71" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 719, + "startColumn": 3, + "charOffset": 22561, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 717, + "startColumn": 3, + "charOffset": 22447, + "charLength": 3, + "snippet": { + "text": "\t\tg_logger().debug(\"[{}] Player is member of a party, {} members can be feared\", __FUNCTION__, affectedCount);\n\n\t\tfor (const auto &member : party->getMembers()) {\n\t\t\tif (member->hasCondition(CONDITION_FEARED)) {\n\t\t\t\taffectedCount -= 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3731712cb51b683c57ec51a2df7ecfd057c0fd23ae0844a2876805f9f8a3c7e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'CombatConditionFunc' has cognitive complexity of 51 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 733, + "startColumn": 14, + "charOffset": 22776, + "charLength": 19, + "snippet": { + "text": "CombatConditionFunc" + } + }, + "contextRegion": { + "startLine": 731, + "startColumn": 14, + "charOffset": 22760, + "charLength": 19, + "snippet": { + "text": "}\n\nvoid Combat::CombatConditionFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\n\tif (params.origin == ORIGIN_MELEE && data && data->primary.value == 0 && data->secondary.value == 0) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bdf740c5b71f560772dbec08a443509c7cd250516eb2ff6802e39a4fb1825d6c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 733, + "startColumn": 60, + "charOffset": 22822, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 731, + "startColumn": 60, + "charOffset": 22760, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::CombatConditionFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\n\tif (params.origin == ORIGIN_MELEE && data && data->primary.value == 0 && data->secondary.value == 0) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61fc49fc16ee9694945b99e9a96138dd611187bad64f36090e0a99b42eb2db6e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 733, + "startColumn": 94, + "charOffset": 22856, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 731, + "startColumn": 94, + "charOffset": 22760, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::CombatConditionFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\n\tif (params.origin == ORIGIN_MELEE && data && data->primary.value == 0 && data->secondary.value == 0) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5aa8f208a1395551b5741ebcae87f66a351a1774eb0358a45327551e5bd55e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 734, + "startColumn": 6, + "charOffset": 22919, + "charLength": 6, + "snippet": { + "text": "params" + } + }, + "contextRegion": { + "startLine": 732, + "startColumn": 6, + "charOffset": 22762, + "charLength": 6, + "snippet": { + "text": "\nvoid Combat::CombatConditionFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\n\tif (params.origin == ORIGIN_MELEE && data && data->primary.value == 0 && data->secondary.value == 0) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b50dba192682033eea2ab08df5651a0c9fd0018246de50433c6b51ac79177983" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'CombatDamage *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 734, + "startColumn": 39, + "charOffset": 22952, + "charLength": 4, + "snippet": { + "text": "data" + } + }, + "contextRegion": { + "startLine": 732, + "startColumn": 39, + "charOffset": 22762, + "charLength": 4, + "snippet": { + "text": "\nvoid Combat::CombatConditionFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\n\tif (params.origin == ORIGIN_MELEE && data && data->primary.value == 0 && data->secondary.value == 0) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32a67bc006d629cb2c555a84b8ed2eec6e15f74fd0f1b74024fd18de66a49064" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 734, + "startColumn": 72, + "charOffset": 22985, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 732, + "startColumn": 72, + "charOffset": 22762, + "charLength": 2, + "snippet": { + "text": "\nvoid Combat::CombatConditionFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\n\tif (params.origin == ORIGIN_MELEE && data && data->primary.value == 0 && data->secondary.value == 0) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f84f323a52b0fa2690ae428f58e5f743df3902396a0321f8cd28ced60df3afe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 738, + "startColumn": 2, + "charOffset": 23033, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 736, + "startColumn": 2, + "charOffset": 23028, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &condition : params.conditionList) {\n\t\tstd::shared_ptr player = nullptr;\n\t\tif (target) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "447459e375cea71840de315ae3977ca0420d32b1b489d1c027bdce8577d912a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 745, + "startColumn": 4, + "charOffset": 23246, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 743, + "startColumn": 4, + "charOffset": 23183, + "charLength": 2, + "snippet": { + "text": "\t\tif (player) {\n\t\t\t// Cleanse charm rune (target as player)\n\t\t\tif (player->isImmuneCleanse(condition->getType())) {\n\t\t\t\tplayer->sendCancelMessage(\"You are still immune against this spell.\");\n\t\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42204facc1f42c09c29d6294449b419535ad505eaa4b7fb465782970cd206086" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 748, + "startColumn": 6, + "charOffset": 23391, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 746, + "startColumn": 6, + "charOffset": 23299, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tplayer->sendCancelMessage(\"You are still immune against this spell.\");\n\t\t\t\treturn;\n\t\t\t} else if (caster && caster->getMonster()) {\n\t\t\t\tuint16_t playerCharmRaceid = player->parseRacebyCharm(CHARM_CLEANSE, false, 0);\n\t\t\t\tif (playerCharmRaceid != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d087b8373997b48d7ade8b8edcf79bec7cc4e832fb979063ee5ea49a1165d67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 754, + "startColumn": 54, + "charOffset": 23811, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 752, + "startColumn": 54, + "charOffset": 23624, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tif (mType && playerCharmRaceid == mType->info.raceid) {\n\t\t\t\t\t\tconst auto charm = g_iobestiary().getBestiaryCharm(CHARM_CLEANSE);\n\t\t\t\t\t\tif (charm && (charm->chance > normal_random(0, 100))) {\n\t\t\t\t\t\t\tif (player->hasCondition(condition->getType())) {\n\t\t\t\t\t\t\t\tplayer->removeCondition(condition->getType());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f653aec32f6d29c729d91409b9768f2b711505f519efd3770be225dd6561325" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 774, + "startColumn": 20, + "charOffset": 24363, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 772, + "startColumn": 20, + "charOffset": 24283, + "charLength": 8, + "snippet": { + "text": "\t\t\tauto conditionCopy = condition->clone();\n\t\t\tif (caster) {\n\t\t\t\tconditionCopy->setParam(CONDITION_PARAM_OWNER, caster->getID());\n\t\t\t\tconditionCopy->setPositionParam(CONDITION_PARAM_CASTER_POSITION, caster->getPosition());\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0168f872bd5acd312e3b34e12c073340ddf1ef5e2c5b44cb01512c22dbce041" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 774, + "startColumn": 52, + "charOffset": 24395, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 772, + "startColumn": 52, + "charOffset": 24283, + "charLength": 6, + "snippet": { + "text": "\t\t\tauto conditionCopy = condition->clone();\n\t\t\tif (caster) {\n\t\t\t\tconditionCopy->setParam(CONDITION_PARAM_OWNER, caster->getID());\n\t\t\t\tconditionCopy->setPositionParam(CONDITION_PARAM_CASTER_POSITION, caster->getPosition());\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a26085b0d98e9bf092a1686de93361799c1f002d6af62b03ca9e3582979e1824" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 775, + "startColumn": 20, + "charOffset": 24432, + "charLength": 16, + "snippet": { + "text": "setPositionParam" + } + }, + "contextRegion": { + "startLine": 773, + "startColumn": 20, + "charOffset": 24327, + "charLength": 16, + "snippet": { + "text": "\t\t\tif (caster) {\n\t\t\t\tconditionCopy->setParam(CONDITION_PARAM_OWNER, caster->getID());\n\t\t\t\tconditionCopy->setPositionParam(CONDITION_PARAM_CASTER_POSITION, caster->getPosition());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59cc2c714f898f5cb01ac326f04f2bceb09082c133e0371ee48f795d494eeb75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-todo", + "ruleIndex": 545, + "kind": "fail", + "level": "warning", + "message": { + "text": "missing username/bug in TODO" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 778, + "startColumn": 4, + "charOffset": 24515, + "charLength": 68, + "snippet": { + "text": "// TODO: infight condition until all aggressive conditions has ended" + } + }, + "contextRegion": { + "startLine": 776, + "startColumn": 4, + "charOffset": 24506, + "charLength": 68, + "snippet": { + "text": "\t\t\t}\n\n\t\t\t// TODO: infight condition until all aggressive conditions has ended\n\t\t\tif (target) {\n\t\t\t\ttarget->addCombatCondition(conditionCopy, caster && caster->getPlayer() != nullptr);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e40b4445b36ecd0bf65f3af3d7f6ebb013aaa2a01782d09a0013bfa88e5cbdfc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 780, + "startColumn": 13, + "charOffset": 24613, + "charLength": 18, + "snippet": { + "text": "addCombatCondition" + } + }, + "contextRegion": { + "startLine": 778, + "startColumn": 13, + "charOffset": 24512, + "charLength": 18, + "snippet": { + "text": "\t\t\t// TODO: infight condition until all aggressive conditions has ended\n\t\t\tif (target) {\n\t\t\t\ttarget->addCombatCondition(conditionCopy, caster && caster->getPlayer() != nullptr);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d63986f0f6ce86ad21de077dbbbcf71a41bfc3dfb9d06831e247907d75a0abd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 786, + "startColumn": 56, + "charOffset": 24760, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 784, + "startColumn": 56, + "charOffset": 24702, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Combat::CombatDispelFunc(std::shared_ptr, std::shared_ptr target, const CombatParams ¶ms, CombatDamage*) {\n\tif (target) {\n\t\ttarget->removeCombatCondition(params.dispelType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7a4ecc962867566eba76ff1d35c242b33361c13275f83135f7a1bdca74c05a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 786, + "startColumn": 56, + "charOffset": 24760, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 784, + "startColumn": 56, + "charOffset": 24702, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Combat::CombatDispelFunc(std::shared_ptr, std::shared_ptr target, const CombatParams ¶ms, CombatDamage*) {\n\tif (target) {\n\t\ttarget->removeCombatCondition(params.dispelType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5e69d0ec1e112b75a196b571815c76df3db8e39cfcb12c5993dc76bf3e359d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 786, + "startColumn": 84, + "charOffset": 24788, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 784, + "startColumn": 84, + "charOffset": 24702, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::CombatDispelFunc(std::shared_ptr, std::shared_ptr target, const CombatParams ¶ms, CombatDamage*) {\n\tif (target) {\n\t\ttarget->removeCombatCondition(params.dispelType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f20a4a4bf1c80b03c487689478c801373a20d046edef82e12ef3a2f2517c60a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 792, + "startColumn": 55, + "charOffset": 24968, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 790, + "startColumn": 55, + "charOffset": 24911, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::CombatNullFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage*) {\n\tCombatConditionFunc(caster, target, params, nullptr);\n\tCombatDispelFunc(caster, target, params, nullptr);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26ca2727a17c547f7eab685335e09ef1eae363b34db650f29e6bf99aabe9e1b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 792, + "startColumn": 89, + "charOffset": 25002, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 790, + "startColumn": 89, + "charOffset": 24911, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::CombatNullFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage*) {\n\tCombatConditionFunc(caster, target, params, nullptr);\n\tCombatDispelFunc(caster, target, params, nullptr);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2413034351498ad4a5285e22fed78b15a3f5b0a5ed126da6e1b4026b5a1b5fbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 792, + "startColumn": 138, + "charOffset": 25051, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 790, + "startColumn": 138, + "charOffset": 24911, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Combat::CombatNullFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage*) {\n\tCombatConditionFunc(caster, target, params, nullptr);\n\tCombatDispelFunc(caster, target, params, nullptr);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09349aba98590f26e178e52773cf14ee803abc836c2e4a2a30dd29fd53b82cc7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'combatTileEffects' has cognitive complexity of 36 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 797, + "startColumn": 14, + "charOffset": 25178, + "charLength": 17, + "snippet": { + "text": "combatTileEffects" + } + }, + "contextRegion": { + "startLine": 795, + "startColumn": 14, + "charOffset": 25162, + "charLength": 17, + "snippet": { + "text": "}\n\nvoid Combat::combatTileEffects(const CreatureVector &spectators, std::shared_ptr caster, std::shared_ptr tile, const CombatParams ¶ms) {\n\tif (params.itemId != 0) {\n\t\tuint16_t itemId = params.itemId;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c5772391d719efd0aa69238986881ab638d3def920939feef3c7a63fd4c2ab1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 797, + "startColumn": 92, + "charOffset": 25256, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 795, + "startColumn": 92, + "charOffset": 25162, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::combatTileEffects(const CreatureVector &spectators, std::shared_ptr caster, std::shared_ptr tile, const CombatParams ¶ms) {\n\tif (params.itemId != 0) {\n\t\tuint16_t itemId = params.itemId;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efbf2e53ead3655a9e05ed5e503702813c6804f1741b501f3d6e17c6abfabf90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 797, + "startColumn": 122, + "charOffset": 25286, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 795, + "startColumn": 122, + "charOffset": 25162, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Combat::combatTileEffects(const CreatureVector &spectators, std::shared_ptr caster, std::shared_ptr tile, const CombatParams ¶ms) {\n\tif (params.itemId != 0) {\n\t\tuint16_t itemId = params.itemId;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f78dc0d4e443c7460b332f6cd1d143d0bd29302868fe3d8e278cc2da7e715b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 842, + "startColumn": 5, + "charOffset": 26254, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 840, + "startColumn": 5, + "charOffset": 26226, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tif (casterPlayer) {\n\t\t\t\tif (g_game().getWorldType() == WORLD_TYPE_NO_PVP || tile->hasFlag(TILESTATE_NOPVPZONE)) {\n\t\t\t\t\tif (itemId == ITEM_FIREFIELD_PVP_FULL) {\n\t\t\t\t\t\titemId = ITEM_FIREFIELD_NOPVP;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1420d79aac7876afe5bb0157ccaa0496e32c43a0d36ca2f0bb33168213e5cf3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 843, + "startColumn": 6, + "charOffset": 26349, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 841, + "startColumn": 6, + "charOffset": 26227, + "charLength": 2, + "snippet": { + "text": "\t\t\tif (casterPlayer) {\n\t\t\t\tif (g_game().getWorldType() == WORLD_TYPE_NO_PVP || tile->hasFlag(TILESTATE_NOPVPZONE)) {\n\t\t\t\t\tif (itemId == ITEM_FIREFIELD_PVP_FULL) {\n\t\t\t\t\t\titemId = ITEM_FIREFIELD_NOPVP;\n\t\t\t\t\t} else if (itemId == ITEM_POISONFIELD_PVP) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b41387b76ae63e5e7cb6a7f45d705e782dcc882783bd73b7b4e9fd726a324865" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 879, + "startColumn": 2, + "charOffset": 27449, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 877, + "startColumn": 2, + "charOffset": 27444, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (params.soundImpactEffect != SoundEffect_t::SILENCE) {\n\t\tg_game().sendDoubleSoundEffect(tile->getPosition(), params.soundCastEffect, params.soundImpactEffect, caster);\n\t} else if (params.soundCastEffect != SoundEffect_t::SILENCE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d55bba5a0eb9fbdc4c85004270f4d1b17b9228febcc0f9c853ec646e49a43c5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 886, + "startColumn": 58, + "charOffset": 27834, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 884, + "startColumn": 58, + "charOffset": 27774, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::postCombatEffects(std::shared_ptr caster, const Position &origin, const Position &pos, const CombatParams ¶ms) {\n\tif (caster && params.distanceEffect != CONST_ANI_NONE) {\n\t\taddDistanceEffect(caster, origin, pos, params.distanceEffect);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b1e9784e419eaf0283f42cc96b3cca3ee8808a88178315c9de491ebce803cf0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 891, + "startColumn": 2, + "charOffset": 28045, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 889, + "startColumn": 2, + "charOffset": 28040, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (params.soundImpactEffect != SoundEffect_t::SILENCE) {\n\t\tg_game().sendDoubleSoundEffect(pos, params.soundCastEffect, params.soundImpactEffect, caster);\n\t} else if (params.soundCastEffect != SoundEffect_t::SILENCE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8896ab147a55cc6ced222c228ffa144dd3dc1f1c65a1a3b496884bef0355fb5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 898, + "startColumn": 58, + "charOffset": 28398, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 896, + "startColumn": 58, + "charOffset": 28338, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::addDistanceEffect(std::shared_ptr caster, const Position &fromPos, const Position &toPos, uint16_t effect) {\n\tif (effect == CONST_ANI_WEAPONTYPE) {\n\t\tif (!caster) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "101e8b4733406d7a68826fe090e85604a7e4860f6efa6ef1571882c133746f4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 900, + "startColumn": 7, + "charOffset": 28518, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 898, + "startColumn": 7, + "charOffset": 28341, + "charLength": 1, + "snippet": { + "text": "void Combat::addDistanceEffect(std::shared_ptr caster, const Position &fromPos, const Position &toPos, uint16_t effect) {\n\tif (effect == CONST_ANI_WEAPONTYPE) {\n\t\tif (!caster) {\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17da387bb09946133fb98dbd4b1c806774929f3589b889002c42d33c4602f682" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 905, + "startColumn": 7, + "charOffset": 28607, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 903, + "startColumn": 7, + "charOffset": 28544, + "charLength": 1, + "snippet": { + "text": "\n\t\tstd::shared_ptr player = caster->getPlayer();\n\t\tif (!player) {\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d326e8d003d610515a42678516e3301aea4b7e831cf866021a767871ae211c35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "9 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 945, + "startColumn": 23, + "charOffset": 29464, + "charLength": 1, + "snippet": { + "text": "9" + } + }, + "contextRegion": { + "startLine": 943, + "startColumn": 23, + "charOffset": 29392, + "charLength": 1, + "snippet": { + "text": "\t\tfpp.minTargetDist = 0;\n\t\tfpp.maxTargetDist = 1;\n\t\tfpp.maxSearchDist = 9;\n\t\tPosition pos = origin;\n\t\tif (g_game().map.getPathMatching(origin, dirList, FrozenPathingConditionCall(dest), fpp)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "144c6be297282aa9e6c7f5b7f3fd660fed3650db01427ea1d721855cfb0bcb2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 948, + "startColumn": 4, + "charOffset": 29589, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 946, + "startColumn": 4, + "charOffset": 29467, + "charLength": 3, + "snippet": { + "text": "\t\tPosition pos = origin;\n\t\tif (g_game().map.getPathMatching(origin, dirList, FrozenPathingConditionCall(dest), fpp)) {\n\t\t\tfor (auto dir : dirList) {\n\t\t\t\tpos = getNextPosition(dir, pos);\n\t\t\t\tg_game().addMagicEffect(pos, effect);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8854a617b41d5dd2bf7de87a0ea01645a33cbbe98e72224f3c365025924e5c5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 958, + "startColumn": 6, + "charOffset": 29821, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 956, + "startColumn": 6, + "charOffset": 29750, + "charLength": 1, + "snippet": { + "text": "\nvoid Combat::setupChain(const std::shared_ptr &weapon) {\n\tif (!weapon) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a5cdf818630b47c685a114761351e01e84235f13ae7b676a15c86d30b8643d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 983, + "startColumn": 28, + "charOffset": 30437, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 981, + "startColumn": 28, + "charOffset": 30345, + "charLength": 1, + "snippet": { + "text": "\t// clang-format on\n\tauto area = std::make_unique();\n\tarea->setupArea(areaList, 7);\n\tsetArea(area);\n\tg_logger().trace(\"Weapon: {}, element type: {}\", Item::items[weapon->getID()].name, weapon->params.combatType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56a62c541abd7dd1b8d5bae67d08654ca45caa0b51947de6bf0bccc7b4828e25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 986, + "startColumn": 2, + "charOffset": 30571, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 984, + "startColumn": 2, + "charOffset": 30441, + "charLength": 8, + "snippet": { + "text": "\tsetArea(area);\n\tg_logger().trace(\"Weapon: {}, element type: {}\", Item::items[weapon->getID()].name, weapon->params.combatType);\n\tsetParam(COMBAT_PARAM_TYPE, weapon->params.combatType);\n\tif (weaponType != WEAPON_WAND) {\n\t\tsetParam(COMBAT_PARAM_BLOCKARMOR, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "461aa8c1b61353c06e350aff5639cac24bc533b7f5b5665d5210596b64c80681" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 988, + "startColumn": 3, + "charOffset": 30663, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 986, + "startColumn": 3, + "charOffset": 30570, + "charLength": 8, + "snippet": { + "text": "\tsetParam(COMBAT_PARAM_TYPE, weapon->params.combatType);\n\tif (weaponType != WEAPON_WAND) {\n\t\tsetParam(COMBAT_PARAM_BLOCKARMOR, true);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da436d0d369f1266d2c86af1f17b0b7778dfd67a4fd50b4c97619d552ed8b1b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 988, + "startColumn": 37, + "charOffset": 30697, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 986, + "startColumn": 37, + "charOffset": 30570, + "charLength": 4, + "snippet": { + "text": "\tsetParam(COMBAT_PARAM_TYPE, weapon->params.combatType);\n\tif (weaponType != WEAPON_WAND) {\n\t\tsetParam(COMBAT_PARAM_BLOCKARMOR, true);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2899524a79ef913db7b4abdf457ef18fbd0b8fb85fc10a133358d8f41de37308" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 995, + "startColumn": 47, + "charOffset": 30983, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 993, + "startColumn": 47, + "charOffset": 30776, + "charLength": 1, + "snippet": { + "text": "\tauto setCommonValues = [this, weapon](double formula, SoundEffect_t impactSound, uint32_t effect) {\n\t\tdouble weaponSkillFormula = weapon->getChainSkillValue();\n\t\tsetPlayerCombatValues(COMBAT_FORMULA_SKILL, 0, 0, weaponSkillFormula ? weaponSkillFormula : formula, 0);\n\t\tsetParam(COMBAT_PARAM_IMPACTSOUND, impactSound);\n\t\tsetParam(COMBAT_PARAM_EFFECT, effect);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4978a8ea2152dd7918a016b1429e5c838a291b5e3cfb1f3a80751a0f774be944" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 995, + "startColumn": 50, + "charOffset": 30986, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 993, + "startColumn": 50, + "charOffset": 30776, + "charLength": 1, + "snippet": { + "text": "\tauto setCommonValues = [this, weapon](double formula, SoundEffect_t impactSound, uint32_t effect) {\n\t\tdouble weaponSkillFormula = weapon->getChainSkillValue();\n\t\tsetPlayerCombatValues(COMBAT_FORMULA_SKILL, 0, 0, weaponSkillFormula ? weaponSkillFormula : formula, 0);\n\t\tsetParam(COMBAT_PARAM_IMPACTSOUND, impactSound);\n\t\tsetParam(COMBAT_PARAM_EFFECT, effect);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd8a227d69f52e3f4bd9302d39d00120e28e2f89fbcd8eef2eeb18c25207bfc7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 995, + "startColumn": 53, + "charOffset": 30989, + "charLength": 18, + "snippet": { + "text": "weaponSkillFormula" + } + }, + "contextRegion": { + "startLine": 993, + "startColumn": 53, + "charOffset": 30776, + "charLength": 18, + "snippet": { + "text": "\tauto setCommonValues = [this, weapon](double formula, SoundEffect_t impactSound, uint32_t effect) {\n\t\tdouble weaponSkillFormula = weapon->getChainSkillValue();\n\t\tsetPlayerCombatValues(COMBAT_FORMULA_SKILL, 0, 0, weaponSkillFormula ? weaponSkillFormula : formula, 0);\n\t\tsetParam(COMBAT_PARAM_IMPACTSOUND, impactSound);\n\t\tsetParam(COMBAT_PARAM_EFFECT, effect);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b318ec5ff58faf6dbaeb289d475eb69fdaf8b1163f416c810d726392c1b19f78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 995, + "startColumn": 53, + "charOffset": 30989, + "charLength": 18, + "snippet": { + "text": "weaponSkillFormula" + } + }, + "contextRegion": { + "startLine": 993, + "startColumn": 53, + "charOffset": 30776, + "charLength": 18, + "snippet": { + "text": "\tauto setCommonValues = [this, weapon](double formula, SoundEffect_t impactSound, uint32_t effect) {\n\t\tdouble weaponSkillFormula = weapon->getChainSkillValue();\n\t\tsetPlayerCombatValues(COMBAT_FORMULA_SKILL, 0, 0, weaponSkillFormula ? weaponSkillFormula : formula, 0);\n\t\tsetParam(COMBAT_PARAM_IMPACTSOUND, impactSound);\n\t\tsetParam(COMBAT_PARAM_EFFECT, effect);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8246b9c70108d44d9474f71ce45edb9c25bc5425d99258aa9d56b5a291278c6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'double' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 995, + "startColumn": 53, + "charOffset": 30989, + "charLength": 18, + "snippet": { + "text": "weaponSkillFormula" + } + }, + "contextRegion": { + "startLine": 993, + "startColumn": 53, + "charOffset": 30776, + "charLength": 18, + "snippet": { + "text": "\tauto setCommonValues = [this, weapon](double formula, SoundEffect_t impactSound, uint32_t effect) {\n\t\tdouble weaponSkillFormula = weapon->getChainSkillValue();\n\t\tsetPlayerCombatValues(COMBAT_FORMULA_SKILL, 0, 0, weaponSkillFormula ? weaponSkillFormula : formula, 0);\n\t\tsetParam(COMBAT_PARAM_IMPACTSOUND, impactSound);\n\t\tsetParam(COMBAT_PARAM_EFFECT, effect);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8280b41e1a9a2a7550f8574bfd3887614d7bd037e131da6151355077d255c67d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 995, + "startColumn": 104, + "charOffset": 31040, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 993, + "startColumn": 104, + "charOffset": 30776, + "charLength": 1, + "snippet": { + "text": "\tauto setCommonValues = [this, weapon](double formula, SoundEffect_t impactSound, uint32_t effect) {\n\t\tdouble weaponSkillFormula = weapon->getChainSkillValue();\n\t\tsetPlayerCombatValues(COMBAT_FORMULA_SKILL, 0, 0, weaponSkillFormula ? weaponSkillFormula : formula, 0);\n\t\tsetParam(COMBAT_PARAM_IMPACTSOUND, impactSound);\n\t\tsetParam(COMBAT_PARAM_EFFECT, effect);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "587dc934b2403cb7df60d34122609b556a08beada32afe4157c774bdeb3f42db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 996, + "startColumn": 3, + "charOffset": 31046, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 994, + "startColumn": 3, + "charOffset": 30877, + "charLength": 8, + "snippet": { + "text": "\t\tdouble weaponSkillFormula = weapon->getChainSkillValue();\n\t\tsetPlayerCombatValues(COMBAT_FORMULA_SKILL, 0, 0, weaponSkillFormula ? weaponSkillFormula : formula, 0);\n\t\tsetParam(COMBAT_PARAM_IMPACTSOUND, impactSound);\n\t\tsetParam(COMBAT_PARAM_EFFECT, effect);\n\t\tsetParam(COMBAT_PARAM_BLOCKARMOR, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "415b9db08613c5f46741403f6c01c8f64f8943352b1a1b164274981b6ddcfc4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 997, + "startColumn": 3, + "charOffset": 31097, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 995, + "startColumn": 3, + "charOffset": 30937, + "charLength": 8, + "snippet": { + "text": "\t\tsetPlayerCombatValues(COMBAT_FORMULA_SKILL, 0, 0, weaponSkillFormula ? weaponSkillFormula : formula, 0);\n\t\tsetParam(COMBAT_PARAM_IMPACTSOUND, impactSound);\n\t\tsetParam(COMBAT_PARAM_EFFECT, effect);\n\t\tsetParam(COMBAT_PARAM_BLOCKARMOR, true);\n\t};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20b8b8e0d1c8d650dfba8d4df4b572792c86b86bcce39761eaa36b0371bc3146" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 998, + "startColumn": 3, + "charOffset": 31138, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 996, + "startColumn": 3, + "charOffset": 31044, + "charLength": 8, + "snippet": { + "text": "\t\tsetParam(COMBAT_PARAM_IMPACTSOUND, impactSound);\n\t\tsetParam(COMBAT_PARAM_EFFECT, effect);\n\t\tsetParam(COMBAT_PARAM_BLOCKARMOR, true);\n\t};\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "edfb360fbbd8a5c50365d314b0c24cb6a2ad03d4a590be9eb1d393bb7c6eb7b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 998, + "startColumn": 37, + "charOffset": 31172, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 996, + "startColumn": 37, + "charOffset": 31044, + "charLength": 4, + "snippet": { + "text": "\t\tsetParam(COMBAT_PARAM_IMPACTSOUND, impactSound);\n\t\tsetParam(COMBAT_PARAM_EFFECT, effect);\n\t\tsetParam(COMBAT_PARAM_BLOCKARMOR, true);\n\t};\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b1577b6427b370d7278febd57435bbc691525cd117aab3ca53aadd22294bd4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1001, + "startColumn": 19, + "charOffset": 31202, + "charLength": 15, + "snippet": { + "text": "g_configManager" + } + }, + "contextRegion": { + "startLine": 999, + "startColumn": 19, + "charOffset": 31179, + "charLength": 15, + "snippet": { + "text": "\t};\n\n\tsetChainCallback(g_configManager().getNumber(COMBAT_CHAIN_TARGETS, __FUNCTION__), 1, true);\n\n\tswitch (weaponType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f558d94b1b3fdd5fc5e44a90cfbfcc04344f8ebc9393e7d13f26b0c43c25cc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-6", + "ruleIndex": 453, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-6: The final clause of a switch statement shall be the default-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1003, + "startColumn": 2, + "charOffset": 31279, + "charLength": 6, + "snippet": { + "text": "switch" + } + }, + "contextRegion": { + "startLine": 1001, + "startColumn": 2, + "charOffset": 31184, + "charLength": 6, + "snippet": { + "text": "\tsetChainCallback(g_configManager().getNumber(COMBAT_CHAIN_TARGETS, __FUNCTION__), 1, true);\n\n\tswitch (weaponType) {\n\t\tcase WEAPON_SWORD:\n\t\t\tsetCommonValues(g_configManager().getFloat(COMBAT_CHAIN_SKILL_FORMULA_SWORD, __FUNCTION__), MELEE_ATK_SWORD, CONST_ME_SLASH);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16d719dd8f5f116dd2ee81412662bb1f97b7d6d66e875084ab8a77f220f69fbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1026, + "startColumn": 48, + "charOffset": 32443, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 1024, + "startColumn": 48, + "charOffset": 32301, + "charLength": 1, + "snippet": { + "text": "\t\tauto it = elementEffects.find(weapon->getElementType());\n\t\tif (it != elementEffects.end()) {\n\t\t\tsetPlayerCombatValues(COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0);\n\t\t\tsetParam(COMBAT_PARAM_EFFECT, it->second.first);\n\t\t\tsetParam(COMBAT_PARAM_CHAIN_EFFECT, it->second.second);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b87cad7de242e76e43c089349c2a234960b1a76fc0074bb6d74e3bd4bba21bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1026, + "startColumn": 51, + "charOffset": 32446, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 1024, + "startColumn": 51, + "charOffset": 32301, + "charLength": 1, + "snippet": { + "text": "\t\tauto it = elementEffects.find(weapon->getElementType());\n\t\tif (it != elementEffects.end()) {\n\t\t\tsetPlayerCombatValues(COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0);\n\t\t\tsetParam(COMBAT_PARAM_EFFECT, it->second.first);\n\t\t\tsetParam(COMBAT_PARAM_CHAIN_EFFECT, it->second.second);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e26ef82c3183a8c2efd6998e4375e5e9f758f93f50c0002d453428c7891b50f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1026, + "startColumn": 59, + "charOffset": 32454, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 1024, + "startColumn": 59, + "charOffset": 32301, + "charLength": 1, + "snippet": { + "text": "\t\tauto it = elementEffects.find(weapon->getElementType());\n\t\tif (it != elementEffects.end()) {\n\t\t\tsetPlayerCombatValues(COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0);\n\t\t\tsetParam(COMBAT_PARAM_EFFECT, it->second.first);\n\t\t\tsetParam(COMBAT_PARAM_CHAIN_EFFECT, it->second.second);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "377a47e0f4dd0553512f4d8d9447658a64e8ad581dc7f339a17d819b0f0a0f95" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1027, + "startColumn": 4, + "charOffset": 32461, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 1025, + "startColumn": 4, + "charOffset": 32360, + "charLength": 8, + "snippet": { + "text": "\t\tif (it != elementEffects.end()) {\n\t\t\tsetPlayerCombatValues(COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0);\n\t\t\tsetParam(COMBAT_PARAM_EFFECT, it->second.first);\n\t\t\tsetParam(COMBAT_PARAM_CHAIN_EFFECT, it->second.second);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b818ed4a09dac9c944f303ff916d0476358211a1a4fcc338666e09e16d028a61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1028, + "startColumn": 4, + "charOffset": 32513, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 1026, + "startColumn": 4, + "charOffset": 32396, + "charLength": 8, + "snippet": { + "text": "\t\t\tsetPlayerCombatValues(COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0);\n\t\t\tsetParam(COMBAT_PARAM_EFFECT, it->second.first);\n\t\t\tsetParam(COMBAT_PARAM_CHAIN_EFFECT, it->second.second);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d90fbdc0d03929c8a6b6230b3a95535348311e80525cad7c8c050d023171d11" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1033, + "startColumn": 54, + "charOffset": 32632, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 1031, + "startColumn": 54, + "charOffset": 32576, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Combat::doCombatChain(std::shared_ptr caster, std::shared_ptr target, bool aggressive) const {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (!params.chainCallback) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "612fce8c9c73f3cc2c109ce730513e055cced70d166ab287eca366d2633246fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1034, + "startColumn": 34, + "charOffset": 32732, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1032, + "startColumn": 34, + "charOffset": 32578, + "charLength": 15, + "snippet": { + "text": "\nbool Combat::doCombatChain(std::shared_ptr caster, std::shared_ptr target, bool aggressive) const {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (!params.chainCallback) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3c56dd8aa1f77955390a53a3587643af0a608d67d38fd8b7ce4e06b47773675" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1035, + "startColumn": 6, + "charOffset": 32755, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1033, + "startColumn": 6, + "charOffset": 32579, + "charLength": 1, + "snippet": { + "text": "bool Combat::doCombatChain(std::shared_ptr caster, std::shared_ptr target, bool aggressive) const {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (!params.chainCallback) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f18ce138d7d42906bdff79aad39c8ff4ab3e52efbb7e03434ca2ed7bb247c6f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'maxTargets' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1039, + "startColumn": 10, + "charOffset": 32809, + "charLength": 10, + "snippet": { + "text": "maxTargets" + } + }, + "contextRegion": { + "startLine": 1037, + "startColumn": 10, + "charOffset": 32796, + "charLength": 10, + "snippet": { + "text": "\t}\n\n\tuint8_t maxTargets;\n\tuint8_t chainDistance;\n\tbool backtracking = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2403f6b37c62b8a175a59952d4b6e63d988e456a14db9a2f99737fcf0aaf87d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'chainDistance' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1040, + "startColumn": 10, + "charOffset": 32830, + "charLength": 13, + "snippet": { + "text": "chainDistance" + } + }, + "contextRegion": { + "startLine": 1038, + "startColumn": 10, + "charOffset": 32799, + "charLength": 13, + "snippet": { + "text": "\n\tuint8_t maxTargets;\n\tuint8_t chainDistance;\n\tbool backtracking = false;\n\tparams.chainCallback->getChainValues(caster, maxTargets, chainDistance, backtracking);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4f1dce94ad14f100464e250dde44fb356a38c62c2a355124fcc99d33fa39435" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto combat' can be declared as 'const auto *combat'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1053, + "startColumn": 3, + "charOffset": 33358, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1051, + "startColumn": 3, + "charOffset": 33296, + "charLength": 4, + "snippet": { + "text": "\tint i = 0;\n\tfor (const auto &[from, toVector] : targets) {\n\t\tauto combat = this;\n\t\tauto delay = i * std::max(50, g_configManager().getNumber(COMBAT_CHAIN_DELAY, __FUNCTION__));\n\t\t++i;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce6a356b8c323a6d217f3f4df59b782612577423b5c8bd90f440695f68b82ec4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1054, + "startColumn": 38, + "charOffset": 33415, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 1052, + "startColumn": 38, + "charOffset": 33308, + "charLength": 2, + "snippet": { + "text": "\tfor (const auto &[from, toVector] : targets) {\n\t\tauto combat = this;\n\t\tauto delay = i * std::max(50, g_configManager().getNumber(COMBAT_CHAIN_DELAY, __FUNCTION__));\n\t\t++i;\n\t\tfor (auto to : toVector) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6b57ca14eb382301f9467cc7828706d9444625f1e80861d900bc96dd05457d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1056, + "startColumn": 3, + "charOffset": 33492, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1054, + "startColumn": 3, + "charOffset": 33378, + "charLength": 3, + "snippet": { + "text": "\t\tauto delay = i * std::max(50, g_configManager().getNumber(COMBAT_CHAIN_DELAY, __FUNCTION__));\n\t\t++i;\n\t\tfor (auto to : toVector) {\n\t\t\tauto nextTarget = g_game().getCreatureByID(to);\n\t\t\tif (!nextTarget) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "91df664d244df9e0f58837223ec438d6a5e73483f3d3de7a7428b7fc6b74efc5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1058, + "startColumn": 8, + "charOffset": 33577, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1056, + "startColumn": 8, + "charOffset": 33490, + "charLength": 1, + "snippet": { + "text": "\t\tfor (auto to : toVector) {\n\t\t\tauto nextTarget = g_game().getCreatureByID(to);\n\t\t\tif (!nextTarget) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4f9b04f2e8bf6aa967f4b00dc89d36ff2cb9236afcb867f863cd7d8251efb78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1061, + "startColumn": 19, + "charOffset": 33629, + "charLength": 13, + "snippet": { + "text": "scheduleEvent" + } + }, + "contextRegion": { + "startLine": 1059, + "startColumn": 19, + "charOffset": 33592, + "charLength": 13, + "snippet": { + "text": "\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tg_dispatcher().scheduleEvent(\n\t\t\t\tdelay, [combat, caster, nextTarget, from, affected]() {\n\t\t\t\t\tif (combat && caster && nextTarget) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d10785db73f27fad7cd5094b065a989c68fe203ad8f788f0bfed019ab9a18db1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1063, + "startColumn": 10, + "charOffset": 33713, + "charLength": 6, + "snippet": { + "text": "combat" + } + }, + "contextRegion": { + "startLine": 1061, + "startColumn": 10, + "charOffset": 33611, + "charLength": 6, + "snippet": { + "text": "\t\t\tg_dispatcher().scheduleEvent(\n\t\t\t\tdelay, [combat, caster, nextTarget, from, affected]() {\n\t\t\t\t\tif (combat && caster && nextTarget) {\n\t\t\t\t\t\tcombat->doChainEffect(from, nextTarget->getPosition(), combat->params.chainEffect);\n\t\t\t\t\t\tcombat->doCombat(caster, nextTarget, from, affected);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c431161f1f81401e69ec523edd93ed01a5ccafbcbcafe23248afccdc31b6a36c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const Combat *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1063, + "startColumn": 10, + "charOffset": 33713, + "charLength": 6, + "snippet": { + "text": "combat" + } + }, + "contextRegion": { + "startLine": 1061, + "startColumn": 10, + "charOffset": 33611, + "charLength": 6, + "snippet": { + "text": "\t\t\tg_dispatcher().scheduleEvent(\n\t\t\t\tdelay, [combat, caster, nextTarget, from, affected]() {\n\t\t\t\t\tif (combat && caster && nextTarget) {\n\t\t\t\t\t\tcombat->doChainEffect(from, nextTarget->getPosition(), combat->params.chainEffect);\n\t\t\t\t\t\tcombat->doCombat(caster, nextTarget, from, affected);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0814fbf233ccd2fe59d16b79afc674a4ae7bb73464e2228fac2e5c4956da109" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1063, + "startColumn": 27, + "charOffset": 33730, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 1061, + "startColumn": 27, + "charOffset": 33611, + "charLength": 2, + "snippet": { + "text": "\t\t\tg_dispatcher().scheduleEvent(\n\t\t\t\tdelay, [combat, caster, nextTarget, from, affected]() {\n\t\t\t\t\tif (combat && caster && nextTarget) {\n\t\t\t\t\t\tcombat->doChainEffect(from, nextTarget->getPosition(), combat->params.chainEffect);\n\t\t\t\t\t\tcombat->doCombat(caster, nextTarget, from, affected);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "493c44f5b421a3130b72442d3130368ee22c8522ee80594733648a3973b8aeef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1064, + "startColumn": 7, + "charOffset": 33753, + "charLength": 6, + "snippet": { + "text": "combat" + } + }, + "contextRegion": { + "startLine": 1062, + "startColumn": 7, + "charOffset": 33644, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tdelay, [combat, caster, nextTarget, from, affected]() {\n\t\t\t\t\tif (combat && caster && nextTarget) {\n\t\t\t\t\t\tcombat->doChainEffect(from, nextTarget->getPosition(), combat->params.chainEffect);\n\t\t\t\t\t\tcombat->doCombat(caster, nextTarget, from, affected);\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e4762c83c61353e6c92d510220c512b7ab9071e0a828062e78a32f2a018b46b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1065, + "startColumn": 15, + "charOffset": 33851, + "charLength": 8, + "snippet": { + "text": "doCombat" + } + }, + "contextRegion": { + "startLine": 1063, + "startColumn": 15, + "charOffset": 33704, + "charLength": 8, + "snippet": { + "text": "\t\t\t\t\tif (combat && caster && nextTarget) {\n\t\t\t\t\t\tcombat->doChainEffect(from, nextTarget->getPosition(), combat->params.chainEffect);\n\t\t\t\t\t\tcombat->doCombat(caster, nextTarget, from, affected);\n\t\t\t\t\t}\n\t\t\t\t}," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8504ed846a5ef14ffd72bf37209fead1453c76b2fec687dff0a9bfba9e4489cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1065, + "startColumn": 50, + "charOffset": 33886, + "charLength": 8, + "snippet": { + "text": "affected" + } + }, + "contextRegion": { + "startLine": 1063, + "startColumn": 50, + "charOffset": 33704, + "charLength": 8, + "snippet": { + "text": "\t\t\t\t\tif (combat && caster && nextTarget) {\n\t\t\t\t\t\tcombat->doChainEffect(from, nextTarget->getPosition(), combat->params.chainEffect);\n\t\t\t\t\t\tcombat->doCombat(caster, nextTarget, from, affected);\n\t\t\t\t\t}\n\t\t\t\t}," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d393773e7b9c68ca9e5c4d1d2e7d603168a99c0bd04e6acf75dab944b95f48e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1065, + "startColumn": 50, + "charOffset": 33886, + "charLength": 8, + "snippet": { + "text": "affected" + } + }, + "contextRegion": { + "startLine": 1063, + "startColumn": 50, + "charOffset": 33704, + "charLength": 8, + "snippet": { + "text": "\t\t\t\t\tif (combat && caster && nextTarget) {\n\t\t\t\t\t\tcombat->doChainEffect(from, nextTarget->getPosition(), combat->params.chainEffect);\n\t\t\t\t\t\tcombat->doCombat(caster, nextTarget, from, affected);\n\t\t\t\t\t}\n\t\t\t\t}," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3aaf0054b821b22b619dc6405d24d5ab0639d4a0cebb157c8fd0c38dc0e1bde9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1076, + "startColumn": 49, + "charOffset": 34018, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 1074, + "startColumn": 49, + "charOffset": 33967, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Combat::doCombat(std::shared_ptr caster, std::shared_ptr target) const {\n\tif (caster != nullptr && params.chainCallback) {\n\t\treturn doCombatChain(caster, target, params.aggressive);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4a585597c0dbb29181f3e5e4740cab532e1a282e17858283e4e00252f48d702" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1076, + "startColumn": 83, + "charOffset": 34052, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 1074, + "startColumn": 83, + "charOffset": 33967, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Combat::doCombat(std::shared_ptr caster, std::shared_ptr target) const {\n\tif (caster != nullptr && params.chainCallback) {\n\t\treturn doCombatChain(caster, target, params.aggressive);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1886e406f3a69f021bb60b8f562ba38df348e3754da1a8ab93824088a756489c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1084, + "startColumn": 49, + "charOffset": 34322, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 1082, + "startColumn": 49, + "charOffset": 34271, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Combat::doCombat(std::shared_ptr caster, std::shared_ptr target, const Position &origin, int affected /* = 1 */) const {\n\t// target combat callback function\n\tif (params.combatType != COMBAT_NONE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d0b5b7495af434cc8cae2d8f9c2df2921ef18ced4aa81755aa4df12b0b4aac8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1084, + "startColumn": 83, + "charOffset": 34356, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 1082, + "startColumn": 83, + "charOffset": 34271, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Combat::doCombat(std::shared_ptr caster, std::shared_ptr target, const Position &origin, int affected /* = 1 */) const {\n\t// target combat callback function\n\tif (params.combatType != COMBAT_NONE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "379793334033fc97bfba5a255a40349e3cc81892a5e22ac65135c8e24d5d138f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1101, + "startColumn": 49, + "charOffset": 34894, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 1099, + "startColumn": 49, + "charOffset": 34843, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Combat::doCombat(std::shared_ptr caster, const Position &position) const {\n\tif (caster != nullptr && params.chainCallback) {\n\t\treturn doCombatChain(caster, caster, params.aggressive);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58eb0fb8c150be729b1d2a926059f83a62d79b42afeeed656c51ea6709b96eac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'CombatFunc' has cognitive complexity of 88 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1122, + "startColumn": 14, + "charOffset": 35557, + "charLength": 10, + "snippet": { + "text": "CombatFunc" + } + }, + "contextRegion": { + "startLine": 1120, + "startColumn": 14, + "charOffset": 35541, + "charLength": 10, + "snippet": { + "text": "}\n\nvoid Combat::CombatFunc(std::shared_ptr caster, const Position &origin, const Position &pos, const std::unique_ptr &area, const CombatParams ¶ms, CombatFunction func, CombatDamage* data) {\n\tstd::vector> tileList;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b511cfcbb9d8d9e8eedb0a133dd5afa52b32c7ff8a4e854a5ec1c029877b6a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1122, + "startColumn": 51, + "charOffset": 35594, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 1120, + "startColumn": 51, + "charOffset": 35541, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::CombatFunc(std::shared_ptr caster, const Position &origin, const Position &pos, const std::unique_ptr &area, const CombatParams ¶ms, CombatFunction func, CombatDamage* data) {\n\tstd::vector> tileList;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b765d7a974a5a51d86f50c7620aff11859ed645c4cfe155d508e75c99e5a10a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'func' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1122, + "startColumn": 188, + "charOffset": 35731, + "charLength": 4, + "snippet": { + "text": "func" + } + }, + "contextRegion": { + "startLine": 1120, + "startColumn": 188, + "charOffset": 35541, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Combat::CombatFunc(std::shared_ptr caster, const Position &origin, const Position &pos, const std::unique_ptr &area, const CombatParams ¶ms, CombatFunction func, CombatDamage* data) {\n\tstd::vector> tileList;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e5d63016306ac98a61222c3e1bd473dff413ee55926c179e80f23f9c1589ed7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1135, + "startColumn": 2, + "charOffset": 36018, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1133, + "startColumn": 2, + "charOffset": 35979, + "charLength": 3, + "snippet": { + "text": "\n\t// calculate the max viewable range\n\tfor (const std::shared_ptr &tile : tileList) {\n\t\tconst Position &tilePos = tile->getPosition();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "044fdf1b13739d3ec9a48bc14a0b880fb910b596c7261234a03cdc9e6c46b430" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-std-min-max", + "ruleIndex": 736, + "kind": "fail", + "level": "warning", + "message": { + "text": "use `std::max` instead of `>`" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1139, + "startColumn": 3, + "charOffset": 36179, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1137, + "startColumn": 3, + "charOffset": 36120, + "charLength": 2, + "snippet": { + "text": "\n\t\tuint32_t diff = Position::getDistanceX(tilePos, pos);\n\t\tif (diff > maxX) {\n\t\t\tmaxX = diff;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "211c88519b1047397bedccc818f2a059ac53206732282bfa8ea5d16684b71a4d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-std-min-max", + "ruleIndex": 736, + "kind": "fail", + "level": "warning", + "message": { + "text": "use `std::max` instead of `>`" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1144, + "startColumn": 3, + "charOffset": 36268, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1142, + "startColumn": 3, + "charOffset": 36218, + "charLength": 2, + "snippet": { + "text": "\n\t\tdiff = Position::getDistanceY(tilePos, pos);\n\t\tif (diff > maxY) {\n\t\t\tmaxY = diff;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f01caf7b1fbbb0ee4516b59a6d0a09edb1dde4b6d261ed38468b951b3dea46be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1149, + "startColumn": 25, + "charOffset": 36335, + "charLength": 4, + "snippet": { + "text": "maxX" + } + }, + "contextRegion": { + "startLine": 1147, + "startColumn": 25, + "charOffset": 36307, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tconst int32_t rangeX = maxX + MAP_MAX_VIEW_PORT_X;\n\tconst int32_t rangeY = maxY + MAP_MAX_VIEW_PORT_Y;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87c342e1050f027381e72e0e4e421b3867144667e51967c4fba929c5e9d2b689" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1150, + "startColumn": 25, + "charOffset": 36387, + "charLength": 4, + "snippet": { + "text": "maxY" + } + }, + "contextRegion": { + "startLine": 1148, + "startColumn": 25, + "charOffset": 36310, + "charLength": 4, + "snippet": { + "text": "\n\tconst int32_t rangeX = maxX + MAP_MAX_VIEW_PORT_X;\n\tconst int32_t rangeY = maxY + MAP_MAX_VIEW_PORT_Y;\n\n\tint affected = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d3f8af8ceae9205dde1b79087a867c31aa43d03ed9e602750ed2a5d3d0cd1f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1160, + "startColumn": 4, + "charOffset": 36718, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1158, + "startColumn": 4, + "charOffset": 36584, + "charLength": 3, + "snippet": { + "text": "\t\tif (CreatureVector* creatures = tile->getCreatures()) {\n\t\t\tconst std::shared_ptr topCreature = tile->getTopCreature();\n\t\t\tfor (auto &creature : *creatures) {\n\t\t\t\tif (params.targetCasterOrTopMost) {\n\t\t\t\t\tif (caster && caster->getTile() == tile) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e2391b888f9e25e4921b1965063d9bc4f57c323624ebda12b4f9ba23c987cd3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1162, + "startColumn": 6, + "charOffset": 36799, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1160, + "startColumn": 6, + "charOffset": 36715, + "charLength": 2, + "snippet": { + "text": "\t\t\tfor (auto &creature : *creatures) {\n\t\t\t\tif (params.targetCasterOrTopMost) {\n\t\t\t\t\tif (caster && caster->getTile() == tile) {\n\t\t\t\t\t\tif (creature != caster) {\n\t\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a88029ec70c1682206488880aec54308d59287936a9ba424c41b9767d6b8996b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1179, + "startColumn": 6, + "charOffset": 37175, + "charLength": 4, + "snippet": { + "text": "data" + } + }, + "contextRegion": { + "startLine": 1177, + "startColumn": 6, + "charOffset": 37144, + "charLength": 4, + "snippet": { + "text": "\n\tCombatDamage tmpDamage;\n\tif (data) {\n\t\ttmpDamage.origin = data->origin;\n\t\ttmpDamage.primary.type = data->primary.type;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "213c566eecbcd464832097ed9bed27a49c2807f8e930da8cb27be419dbc0c0d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'CombatDamage *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1179, + "startColumn": 6, + "charOffset": 37175, + "charLength": 4, + "snippet": { + "text": "data" + } + }, + "contextRegion": { + "startLine": 1177, + "startColumn": 6, + "charOffset": 37144, + "charLength": 4, + "snippet": { + "text": "\n\tCombatDamage tmpDamage;\n\tif (data) {\n\t\ttmpDamage.origin = data->origin;\n\t\ttmpDamage.primary.type = data->primary.type;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "070577e6ffb10f797396ea951065c7d93f788823fb4b8a5e76054f8ef733b026" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1204, + "startColumn": 30, + "charOffset": 38361, + "charLength": 12, + "snippet": { + "text": "casterPlayer" + } + }, + "contextRegion": { + "startLine": 1202, + "startColumn": 30, + "charOffset": 38163, + "charLength": 12, + "snippet": { + "text": "\tauto spectators = Spectators().find(pos, true, rangeX, rangeX, rangeY, rangeY);\n\tstd::shared_ptr casterPlayer = caster ? caster->getPlayer() : nullptr;\n\tuint8_t beamAffectedTotal = casterPlayer ? casterPlayer->wheel()->getBeamAffectedTotal(tmpDamage) : 0;\n\tuint8_t beamAffectedCurrent = 0;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6853de0e3cd4d16c4e024ceded27b34f5c2c3a92f5ac2be8525e680b0e4beadb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1215, + "startColumn": 4, + "charOffset": 38786, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1213, + "startColumn": 4, + "charOffset": 38652, + "charLength": 3, + "snippet": { + "text": "\t\tif (CreatureVector* creatures = tile->getCreatures()) {\n\t\t\tconst std::shared_ptr topCreature = tile->getTopCreature();\n\t\t\tfor (auto &creature : *creatures) {\n\t\t\t\tif (params.targetCasterOrTopMost) {\n\t\t\t\t\tif (caster && caster->getTile() == tile) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efffc1dc1c9ad43b680ea2d9b057c94fefe0bc555b6f7a18c49c19193a4b2fe1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1217, + "startColumn": 6, + "charOffset": 38867, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1215, + "startColumn": 6, + "charOffset": 38783, + "charLength": 2, + "snippet": { + "text": "\t\t\tfor (auto &creature : *creatures) {\n\t\t\t\tif (params.targetCasterOrTopMost) {\n\t\t\t\t\tif (caster && caster->getTile() == tile) {\n\t\t\t\t\t\tif (creature != caster) {\n\t\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "014b5da970e6e0be7e203d5bd61a46596278a8f1342a78bddd72a2b2f0701a08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-suspicious-call-argument", + "ruleIndex": 732, + "kind": "fail", + "level": "warning", + "message": { + "text": "1st argument 'caster' (passed to 'creature') looks like it might be swapped with the 2nd, 'creature' (passed to 'target')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1233, + "startColumn": 30, + "charOffset": 39478, + "charLength": 14, + "snippet": { + "text": "onTargetCombat" + } + }, + "contextRegion": { + "startLine": 1231, + "startColumn": 30, + "charOffset": 39366, + "charLength": 14, + "snippet": { + "text": "\t\t\t\t\tfunc(caster, creature, params, &tmpDamage);\n\t\t\t\t\tif (params.targetCallback) {\n\t\t\t\t\t\tparams.targetCallback->onTargetCombat(caster, creature);\n\t\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68f41a5c76968da617f4317263b6db1ea672acdfaa705c35b563bb1eab2f6b51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1253, + "startColumn": 55, + "charOffset": 39942, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 1251, + "startColumn": 55, + "charOffset": 39885, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::doCombatHealth(std::shared_ptr caster, std::shared_ptr target, CombatDamage &damage, const CombatParams ¶ms) {\n\tdoCombatHealth(caster, std::move(target), caster ? caster->getPosition() : Position(), damage, params);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88aa9eb9fc6d8147e1a684a4744aefbb46cedb3df71dbefd62f74075b003750a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1257, + "startColumn": 55, + "charOffset": 40198, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 1255, + "startColumn": 55, + "charOffset": 40141, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::doCombatHealth(std::shared_ptr caster, std::shared_ptr target, const Position &origin, CombatDamage &damage, const CombatParams ¶ms) {\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\n\tif ((caster && target)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88aa9eb9fc6d8147e1a684a4744aefbb46cedb3df71dbefd62f74075b003750a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1257, + "startColumn": 89, + "charOffset": 40232, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 1255, + "startColumn": 89, + "charOffset": 40141, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::doCombatHealth(std::shared_ptr caster, std::shared_ptr target, const Position &origin, CombatDamage &damage, const CombatParams ¶ms) {\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\n\tif ((caster && target)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4615edc702026bd3cf6e35fa9f64ce774dcaa2f16d23c680525099e437a95525" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1283, + "startColumn": 3, + "charOffset": 41145, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1281, + "startColumn": 3, + "charOffset": 41138, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (target && params.soundImpactEffect != SoundEffect_t::SILENCE) {\n\t\t\tg_game().sendDoubleSoundEffect(target->getPosition(), params.soundCastEffect, params.soundImpactEffect, caster);\n\t\t} else if (target && params.soundCastEffect != SoundEffect_t::SILENCE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e605b1e78de6304d34c4e93c77937a289f245ca99abc432275c431a2e28ce55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1291, + "startColumn": 55, + "charOffset": 41558, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 1289, + "startColumn": 55, + "charOffset": 41501, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::doCombatHealth(std::shared_ptr caster, const Position &position, const std::unique_ptr &area, CombatDamage &damage, const CombatParams ¶ms) {\n\tapplyExtensions(caster, nullptr, damage, params);\n\tconst auto origin = caster ? caster->getPosition() : Position();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61269c57fcb8002622001568d47a0caa571f40b8cadbb3b43bc4e847a0797566" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1297, + "startColumn": 53, + "charOffset": 41937, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 1295, + "startColumn": 53, + "charOffset": 41882, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::doCombatMana(std::shared_ptr caster, std::shared_ptr target, CombatDamage &damage, const CombatParams ¶ms) {\n\tdoCombatMana(caster, target, caster ? caster->getPosition() : Position(), damage, params);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2080134487c5f56b1f07c670c391364733704ba2ebd53090e018f88ad6f48e7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1298, + "startColumn": 23, + "charOffset": 42053, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 1296, + "startColumn": 23, + "charOffset": 41884, + "charLength": 6, + "snippet": { + "text": "\nvoid Combat::doCombatMana(std::shared_ptr caster, std::shared_ptr target, CombatDamage &damage, const CombatParams ¶ms) {\n\tdoCombatMana(caster, target, caster ? caster->getPosition() : Position(), damage, params);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85b0339cf87d0de44fedf8adfe32ba2b8257f157c732d8259f4ebb07aeb0649e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1301, + "startColumn": 53, + "charOffset": 42178, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 1299, + "startColumn": 53, + "charOffset": 42123, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::doCombatMana(std::shared_ptr caster, std::shared_ptr target, const Position &origin, CombatDamage &damage, const CombatParams ¶ms) {\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\n\tif ((caster && target)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71d756eba1c413268c9269c96fa62229841b9b87131b6793bdd2b5ce95eb31e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1301, + "startColumn": 87, + "charOffset": 42212, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 1299, + "startColumn": 87, + "charOffset": 42123, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::doCombatMana(std::shared_ptr caster, std::shared_ptr target, const Position &origin, CombatDamage &damage, const CombatParams ¶ms) {\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\n\tif ((caster && target)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c9c20a2c302799984df1a935a40dc9981dd4ce275c6448521a9770a92cf9e5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1321, + "startColumn": 3, + "charOffset": 43000, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1319, + "startColumn": 3, + "charOffset": 42993, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (target && params.soundImpactEffect != SoundEffect_t::SILENCE) {\n\t\t\tg_game().sendDoubleSoundEffect(target->getPosition(), params.soundCastEffect, params.soundImpactEffect, caster);\n\t\t} else if (target && params.soundCastEffect != SoundEffect_t::SILENCE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc2408ecb6eef04705379c094265a0005eb190b7356ad1635fe440ddc9b00866" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1329, + "startColumn": 53, + "charOffset": 43411, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 1327, + "startColumn": 53, + "charOffset": 43356, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::doCombatMana(std::shared_ptr caster, const Position &position, const std::unique_ptr &area, CombatDamage &damage, const CombatParams ¶ms) {\n\tapplyExtensions(caster, nullptr, damage, params);\n\tconst auto origin = caster ? caster->getPosition() : Position();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5462e46e1c32727f0a69fe286d48d3874ec2d289365d13bd13e2085d208ce434" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1335, + "startColumn": 58, + "charOffset": 43793, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 1333, + "startColumn": 58, + "charOffset": 43733, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::doCombatCondition(std::shared_ptr caster, const Position &position, const std::unique_ptr &area, const CombatParams ¶ms) {\n\tconst auto origin = caster ? caster->getPosition() : Position();\n\tCombatFunc(caster, origin, position, area, params, CombatConditionFunc, nullptr);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75e0069e621e74871f9953e218a9b6066757c15f6333ca6ee8688650ccb9fff8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1340, + "startColumn": 58, + "charOffset": 44107, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 1338, + "startColumn": 58, + "charOffset": 44047, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::doCombatCondition(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms) {\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\n\tif ((caster == target || canCombat) && params.impactEffect != CONST_ME_NONE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce511d493756331e4d38f9f5dc48d55dca9c553a1c91e207049c46133bec58c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1340, + "startColumn": 92, + "charOffset": 44141, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 1338, + "startColumn": 92, + "charOffset": 44047, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::doCombatCondition(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms) {\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\n\tif ((caster == target || canCombat) && params.impactEffect != CONST_ME_NONE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e2b90db2bc74f965f24472ef10e156ee403f1a87687a9db536ae56c1286166e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1356, + "startColumn": 3, + "charOffset": 44818, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1354, + "startColumn": 3, + "charOffset": 44811, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (target && params.soundImpactEffect != SoundEffect_t::SILENCE) {\n\t\t\tg_game().sendDoubleSoundEffect(target->getPosition(), params.soundCastEffect, params.soundImpactEffect, caster);\n\t\t} else if (target && params.soundCastEffect != SoundEffect_t::SILENCE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d961505e9d42a4ee547b8530ee165b59109de4d7dacbeccd344064ea74220bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1364, + "startColumn": 55, + "charOffset": 45231, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 1362, + "startColumn": 55, + "charOffset": 45174, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::doCombatDispel(std::shared_ptr caster, const Position &position, const std::unique_ptr &area, const CombatParams ¶ms) {\n\tconst auto origin = caster ? caster->getPosition() : Position();\n\tCombatFunc(caster, origin, position, area, params, CombatDispelFunc, nullptr);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97502717c1c17b5e11703d501f3f6d20a6b09b1d04ceec78628f8c32ca78b401" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1369, + "startColumn": 55, + "charOffset": 45539, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 1367, + "startColumn": 55, + "charOffset": 45482, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::doCombatDispel(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms) {\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\n\tif ((caster && target)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a26a205d25c51ad23579b1064320caa74ccb9b2366d712032b59755dd85f6b5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1369, + "startColumn": 89, + "charOffset": 45573, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 1367, + "startColumn": 89, + "charOffset": 45482, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::doCombatDispel(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms) {\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\n\tif ((caster && target)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05b48bf0fda6ab57558ef576358ada62c8f91610e078bcededfefad582def4c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1387, + "startColumn": 3, + "charOffset": 46281, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1385, + "startColumn": 3, + "charOffset": 46274, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (target && params.soundImpactEffect != SoundEffect_t::SILENCE) {\n\t\t\tg_game().sendDoubleSoundEffect(target->getPosition(), params.soundCastEffect, params.soundImpactEffect, caster);\n\t\t} else if (target && params.soundCastEffect != SoundEffect_t::SILENCE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5638b550b66f67b852ca9a213f60adf28d90455b529d236699b310aee1bcd3bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1395, + "startColumn": 73, + "charOffset": 46712, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 1393, + "startColumn": 73, + "charOffset": 46637, + "charLength": 6, + "snippet": { + "text": "}\n\n[[maybe_unused]] void Combat::doCombatDefault(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms) {\n\tdoCombatDefault(caster, target, caster ? caster->getPosition() : Position(), params);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "612fce8c9c73f3cc2c109ce730513e055cced70d166ab287eca366d2633246fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1396, + "startColumn": 26, + "charOffset": 46809, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 1394, + "startColumn": 26, + "charOffset": 46639, + "charLength": 6, + "snippet": { + "text": "\n[[maybe_unused]] void Combat::doCombatDefault(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms) {\n\tdoCombatDefault(caster, target, caster ? caster->getPosition() : Position(), params);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76fb659e732048a70d0296c4bd5836b60956d443883a774b100ac0eea9c67e94" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1399, + "startColumn": 56, + "charOffset": 46929, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 1397, + "startColumn": 56, + "charOffset": 46871, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::doCombatDefault(std::shared_ptr caster, std::shared_ptr target, const Position &origin, const CombatParams ¶ms) {\n\tif (!params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR)) {\n\t\tauto spectators = Spectators().find(target->getPosition(), true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "097f84570b22375944a9ea8e0135a92bb98eed860df5c043e502e1fa1b69c495" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1399, + "startColumn": 90, + "charOffset": 46963, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 1397, + "startColumn": 90, + "charOffset": 46871, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::doCombatDefault(std::shared_ptr caster, std::shared_ptr target, const Position &origin, const CombatParams ¶ms) {\n\tif (!params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR)) {\n\t\tauto spectators = Spectators().find(target->getPosition(), true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13206b67ab9da97e49628f1321de50d121f95e9838c9456cc16641b4267f893b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1420, + "startColumn": 3, + "charOffset": 47739, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1418, + "startColumn": 3, + "charOffset": 47732, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (params.soundImpactEffect != SoundEffect_t::SILENCE) {\n\t\t\tg_game().sendDoubleSoundEffect(target->getPosition(), params.soundCastEffect, params.soundImpactEffect, caster);\n\t\t} else if (params.soundCastEffect != SoundEffect_t::SILENCE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e15ddc152a0cdba2b6c9b888b0107536b2fb8858300c671191472a4935de7030" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'pickChainTargets' has cognitive complexity of 31 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1436, + "startColumn": 65, + "charOffset": 48318, + "charLength": 16, + "snippet": { + "text": "pickChainTargets" + } + }, + "contextRegion": { + "startLine": 1434, + "startColumn": 65, + "charOffset": 48251, + "charLength": 16, + "snippet": { + "text": "}\n\nstd::vector>> Combat::pickChainTargets(std::shared_ptr caster, const CombatParams ¶ms, uint8_t chainDistance, uint8_t maxTargets, bool backtracking, bool aggressive, std::shared_ptr initialTarget /* = nullptr */) {\n\tBenchmark bm_pickChain;\n\tmetrics::method_latency measure(__METHOD_NAME__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6391201a95e37bb0603226ab61abff58ebfcfc3e8b348e12c404b4128d7bd2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1436, + "startColumn": 108, + "charOffset": 48361, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 1434, + "startColumn": 108, + "charOffset": 48251, + "charLength": 6, + "snippet": { + "text": "}\n\nstd::vector>> Combat::pickChainTargets(std::shared_ptr caster, const CombatParams ¶ms, uint8_t chainDistance, uint8_t maxTargets, bool backtracking, bool aggressive, std::shared_ptr initialTarget /* = nullptr */) {\n\tBenchmark bm_pickChain;\n\tmetrics::method_latency measure(__METHOD_NAME__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fd9cc13386b8eb363a1a672398db5b55627da4773640c8fd2698c00b8ae88b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'pickChainTargets' of similar type ('uint8_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1436, + "startColumn": 144, + "charOffset": 48397, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 1434, + "startColumn": 144, + "charOffset": 48251, + "charLength": 7, + "snippet": { + "text": "}\n\nstd::vector>> Combat::pickChainTargets(std::shared_ptr caster, const CombatParams ¶ms, uint8_t chainDistance, uint8_t maxTargets, bool backtracking, bool aggressive, std::shared_ptr initialTarget /* = nullptr */) {\n\tBenchmark bm_pickChain;\n\tmetrics::method_latency measure(__METHOD_NAME__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3091617e8fc80d0463af65149e85c58f64fdea2d60e9140471674474570b8fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'initialTarget' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1436, + "startColumn": 249, + "charOffset": 48502, + "charLength": 13, + "snippet": { + "text": "initialTarget" + } + }, + "contextRegion": { + "startLine": 1434, + "startColumn": 249, + "charOffset": 48251, + "charLength": 13, + "snippet": { + "text": "}\n\nstd::vector>> Combat::pickChainTargets(std::shared_ptr caster, const CombatParams ¶ms, uint8_t chainDistance, uint8_t maxTargets, bool backtracking, bool aggressive, std::shared_ptr initialTarget /* = nullptr */) {\n\tBenchmark bm_pickChain;\n\tmetrics::method_latency measure(__METHOD_NAME__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c929f789a91c1dc4e68a60e37f61ffbbac239d5676e48e04f6342c19846087f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1438, + "startColumn": 34, + "charOffset": 48593, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1436, + "startColumn": 34, + "charOffset": 48254, + "charLength": 15, + "snippet": { + "text": "std::vector>> Combat::pickChainTargets(std::shared_ptr caster, const CombatParams ¶ms, uint8_t chainDistance, uint8_t maxTargets, bool backtracking, bool aggressive, std::shared_ptr initialTarget /* = nullptr */) {\n\tBenchmark bm_pickChain;\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (!caster) {\n\t\treturn {};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "add7ebc70ab7b64710e4ccaaf7b56ca7762df826ccd6888f7e4b3541e22d7480" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1439, + "startColumn": 6, + "charOffset": 48616, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1437, + "startColumn": 6, + "charOffset": 48535, + "charLength": 1, + "snippet": { + "text": "\tBenchmark bm_pickChain;\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (!caster) {\n\t\treturn {};\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59a90d56dfbb0c4246fe0471ecbe4325a881dcf48f7076c41c3904eb8b404124" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1449, + "startColumn": 11, + "charOffset": 48898, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 1447, + "startColumn": 11, + "charOffset": 48803, + "charLength": 6, + "snippet": { + "text": "\tif (initialTarget && initialTarget != caster) {\n\t\ttargets.push_back(initialTarget);\n\t\tvisited.insert(initialTarget->getID());\n\t\tresultMap.push_back({ caster->getPosition(), { initialTarget->getID() } });\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad38ec290db4aecac03379fad79cd8d10cbcbd571ecd79cf7fa04faba64ee735" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1456, + "startColumn": 29, + "charOffset": 49095, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 1454, + "startColumn": 29, + "charOffset": 49063, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tint backtrackingAttempts = 10;\n\twhile (!targets.empty() && targets.size() <= maxTargets && backtrackingAttempts > 0) {\n\t\tauto currentTarget = targets.back();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f452ceef22f4ddd466f4ea85b59ce38532dbadaa858ba23c37e41ddf2da353f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1464, + "startColumn": 3, + "charOffset": 49622, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1462, + "startColumn": 3, + "charOffset": 49501, + "charLength": 3, + "snippet": { + "text": "\t\tdouble closestDistance = std::numeric_limits::max();\n\t\tstd::shared_ptr closestSpectator = nullptr;\n\t\tfor (const auto &spectator : spectators) {\n\t\t\tif (!spectator || visited.contains(spectator->getID())) {\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7db8521519b916d6d35494c6d2545b41a6f3a47bde236e852076eed172cce94c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1465, + "startColumn": 8, + "charOffset": 49672, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1463, + "startColumn": 8, + "charOffset": 49564, + "charLength": 1, + "snippet": { + "text": "\t\tstd::shared_ptr closestSpectator = nullptr;\n\t\tfor (const auto &spectator : spectators) {\n\t\t\tif (!spectator || visited.contains(spectator->getID())) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "003fa57464daa754705e1afb72358fdfd249c508a6f22958b69a5440e5e3f883" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1469, + "startColumn": 13, + "charOffset": 49841, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 1467, + "startColumn": 13, + "charOffset": 49740, + "charLength": 6, + "snippet": { + "text": "\t\t\t}\n\t\t\tif (!isValidChainTarget(caster, currentTarget, spectator, params, aggressive)) {\n\t\t\t\tvisited.insert(spectator->getID());\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37ccd8da0946aa472c5304e51328e956eb19c1bebc6d31979202d6753270f3df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1480, + "startColumn": 3, + "charOffset": 50113, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1478, + "startColumn": 3, + "charOffset": 50106, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (closestSpectator) {\n\t\t\tg_logger().trace(\"[{}] closestSpectator: {}\", __METHOD_NAME__, closestSpectator->getName());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8cca298b64f786fb67a791e60d1986f3e33c405838a3cf6bee002974a3225ddc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1481, + "startColumn": 50, + "charOffset": 50186, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1479, + "startColumn": 50, + "charOffset": 50110, + "charLength": 15, + "snippet": { + "text": "\n\t\tif (closestSpectator) {\n\t\t\tg_logger().trace(\"[{}] closestSpectator: {}\", __METHOD_NAME__, closestSpectator->getName());\n\n\t\t\tbool found = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9f171d38c62a7cf36231ff42724803206989942780ca6c05c46f94a82714853" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1484, + "startColumn": 4, + "charOffset": 50260, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1482, + "startColumn": 4, + "charOffset": 50233, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tbool found = false;\n\t\t\tfor (auto &[pos, vec] : resultMap) {\n\t\t\t\tif (pos == currentTarget->getPosition()) {\n\t\t\t\t\tvec.push_back(closestSpectator->getID());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29cc6e3fc9c65e46457c0d586c7b433d338fb1c810cc1fdaacf1dc361c83e44a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1496, + "startColumn": 12, + "charOffset": 50597, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 1494, + "startColumn": 12, + "charOffset": 50545, + "charLength": 6, + "snippet": { + "text": "\n\t\t\ttargets.push_back(closestSpectator);\n\t\t\tvisited.insert(closestSpectator->getID());\n\t\t\tcontinue;\n\t\t} else if (backtracking) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6c2116533b667ac4d31ec51638a13da247baaace592c5be774d51d78908ca36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'continue'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1498, + "startColumn": 5, + "charOffset": 50649, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1496, + "startColumn": 5, + "charOffset": 50586, + "charLength": 4, + "snippet": { + "text": "\t\t\tvisited.insert(closestSpectator->getID());\n\t\t\tcontinue;\n\t\t} else if (backtracking) {\n\t\t\tg_logger().debug(\"[{}] backtracking\", __METHOD_NAME__);\n\t\t\ttargets.pop_back();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6620e4cc425e5c56975ee60afca6e420d1ff9693d81efbfd9ceaaa44256c750" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1499, + "startColumn": 42, + "charOffset": 50715, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1497, + "startColumn": 42, + "charOffset": 50632, + "charLength": 15, + "snippet": { + "text": "\t\t\tcontinue;\n\t\t} else if (backtracking) {\n\t\t\tg_logger().debug(\"[{}] backtracking\", __METHOD_NAME__);\n\t\t\ttargets.pop_back();\n\t\t\tbacktrackingAttempts--;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75d0ef22ceba855b4047f6f723821d2dd00e25ae0f7c2aa696cc8ba57b30c0b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1507, + "startColumn": 50, + "charOffset": 50862, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 1505, + "startColumn": 50, + "charOffset": 50809, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tg_logger().debug(\"[{}] resultMap: {} in {} ms\", __METHOD_NAME__, resultMap.size(), bm_pickChain.duration());\n\treturn resultMap;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa2fae28d39cb5c8f25079a01515dd7182e5ac348c01bc6e0036a66c5770c6d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'isValidChainTarget' of similar type ('std::shared_ptr') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1511, + "startColumn": 33, + "charOffset": 50977, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1509, + "startColumn": 33, + "charOffset": 50942, + "charLength": 3, + "snippet": { + "text": "}\n\nbool Combat::isValidChainTarget(std::shared_ptr caster, std::shared_ptr currentTarget, std::shared_ptr potentialTarget, const CombatParams ¶ms, bool aggressive) {\n\tbool canCombat = canDoCombat(caster, potentialTarget, aggressive) == RETURNVALUE_NOERROR;\n\tbool pick = params.chainPickerCallback ? params.chainPickerCallback->onChainCombat(caster, potentialTarget) : true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5a85cb2325ac4a4092df9f3f3b042490eabc20f23a2516673f2213f85492245" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1511, + "startColumn": 59, + "charOffset": 51003, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 1509, + "startColumn": 59, + "charOffset": 50942, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Combat::isValidChainTarget(std::shared_ptr caster, std::shared_ptr currentTarget, std::shared_ptr potentialTarget, const CombatParams ¶ms, bool aggressive) {\n\tbool canCombat = canDoCombat(caster, potentialTarget, aggressive) == RETURNVALUE_NOERROR;\n\tbool pick = params.chainPickerCallback ? params.chainPickerCallback->onChainCombat(caster, potentialTarget) : true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "574dfcccdaa9228d3cd8f27cf45827d392f1524e6195e9bea550a9a2f59edfcb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'currentTarget' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1511, + "startColumn": 93, + "charOffset": 51037, + "charLength": 13, + "snippet": { + "text": "currentTarget" + } + }, + "contextRegion": { + "startLine": 1509, + "startColumn": 93, + "charOffset": 50942, + "charLength": 13, + "snippet": { + "text": "}\n\nbool Combat::isValidChainTarget(std::shared_ptr caster, std::shared_ptr currentTarget, std::shared_ptr potentialTarget, const CombatParams ¶ms, bool aggressive) {\n\tbool canCombat = canDoCombat(caster, potentialTarget, aggressive) == RETURNVALUE_NOERROR;\n\tbool pick = params.chainPickerCallback ? params.chainPickerCallback->onChainCombat(caster, potentialTarget) : true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4fc8c76f6c897037f053528f9081f5fccfe2367df5c5e51b227ecc99fb3ab766" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'potentialTarget' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1511, + "startColumn": 134, + "charOffset": 51078, + "charLength": 15, + "snippet": { + "text": "potentialTarget" + } + }, + "contextRegion": { + "startLine": 1509, + "startColumn": 134, + "charOffset": 50942, + "charLength": 15, + "snippet": { + "text": "}\n\nbool Combat::isValidChainTarget(std::shared_ptr caster, std::shared_ptr currentTarget, std::shared_ptr potentialTarget, const CombatParams ¶ms, bool aggressive) {\n\tbool canCombat = canDoCombat(caster, potentialTarget, aggressive) == RETURNVALUE_NOERROR;\n\tbool pick = params.chainPickerCallback ? params.chainPickerCallback->onChainCombat(caster, potentialTarget) : true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d70eb5601d0773f059e0c07591c86ff9ceb81a60357e82fbef75e4d9a8304c80" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Expression can be simplified" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1513, + "startColumn": 110, + "charOffset": 51342, + "charLength": 1, + "snippet": { + "text": ":" + } + }, + "contextRegion": { + "startLine": 1511, + "startColumn": 110, + "charOffset": 50945, + "charLength": 1, + "snippet": { + "text": "bool Combat::isValidChainTarget(std::shared_ptr caster, std::shared_ptr currentTarget, std::shared_ptr potentialTarget, const CombatParams ¶ms, bool aggressive) {\n\tbool canCombat = canDoCombat(caster, potentialTarget, aggressive) == RETURNVALUE_NOERROR;\n\tbool pick = params.chainPickerCallback ? params.chainPickerCallback->onChainCombat(caster, potentialTarget) : true;\n\tbool hasSight = g_game().isSightClear(currentTarget->getPosition(), potentialTarget->getPosition(), true);\n\treturn canCombat && pick && hasSight;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7bd1924f914da2726c0588ef8c624af3dc086b41adff6eadcbe77433d9c65ecf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getMagicLevelSkill' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1520, + "startColumn": 25, + "charOffset": 51588, + "charLength": 18, + "snippet": { + "text": "getMagicLevelSkill" + } + }, + "contextRegion": { + "startLine": 1518, + "startColumn": 25, + "charOffset": 51500, + "charLength": 18, + "snippet": { + "text": "//**********************************************************//\n\nuint32_t ValueCallback::getMagicLevelSkill(std::shared_ptr player, const CombatDamage &damage) const {\n\tif (!player) {\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2811362290cf6eb742738f0b72a9f11c40cbd5929b2221ae4743871b45759cf5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1520, + "startColumn": 68, + "charOffset": 51631, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1518, + "startColumn": 68, + "charOffset": 51500, + "charLength": 6, + "snippet": { + "text": "//**********************************************************//\n\nuint32_t ValueCallback::getMagicLevelSkill(std::shared_ptr player, const CombatDamage &damage) const {\n\tif (!player) {\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "482b44ad8755e101c149f5a857a1100b127ebe3b28bba94d57945e1ab7ef60b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1521, + "startColumn": 6, + "charOffset": 51680, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1519, + "startColumn": 6, + "charOffset": 51563, + "charLength": 1, + "snippet": { + "text": "\nuint32_t ValueCallback::getMagicLevelSkill(std::shared_ptr player, const CombatDamage &damage) const {\n\tif (!player) {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24067982f661b31f91d1ce0faa805bc752dea5a3aa705990b86860ae62bfdb56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1531, + "startColumn": 78, + "charOffset": 52228, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 1529, + "startColumn": 78, + "charOffset": 51971, + "charLength": 3, + "snippet": { + "text": "\t\t// Rune conjuring spell have the same name as the rune item spell.\n\t\tconst std::shared_ptr conjuringSpell = g_spells().getInstantSpellByName(damage.runeSpellName);\n\t\tif (spell && conjuringSpell && conjuringSpell != spell && normal_random(0, 100) <= 25) {\n\t\t\tuint32_t castResult = conjuringSpell->canCast(player) ? 20 : 10;\n\t\t\tmagicLevelSkill += magicLevelSkill * castResult / 100;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cfe33609645610a17043181771b2495b3e02da5a19326ddf3ce5ba3651445e2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "25 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1531, + "startColumn": 86, + "charOffset": 52236, + "charLength": 2, + "snippet": { + "text": "25" + } + }, + "contextRegion": { + "startLine": 1529, + "startColumn": 86, + "charOffset": 51971, + "charLength": 2, + "snippet": { + "text": "\t\t// Rune conjuring spell have the same name as the rune item spell.\n\t\tconst std::shared_ptr conjuringSpell = g_spells().getInstantSpellByName(damage.runeSpellName);\n\t\tif (spell && conjuringSpell && conjuringSpell != spell && normal_random(0, 100) <= 25) {\n\t\t\tuint32_t castResult = conjuringSpell->canCast(player) ? 20 : 10;\n\t\t\tmagicLevelSkill += magicLevelSkill * castResult / 100;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f7e49703b3cfa998c0f6a37910fd14d930296731f52ef78d151fb4a4f4f3e1c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1532, + "startColumn": 60, + "charOffset": 52301, + "charLength": 2, + "snippet": { + "text": "20" + } + }, + "contextRegion": { + "startLine": 1530, + "startColumn": 60, + "charOffset": 52040, + "charLength": 2, + "snippet": { + "text": "\t\tconst std::shared_ptr conjuringSpell = g_spells().getInstantSpellByName(damage.runeSpellName);\n\t\tif (spell && conjuringSpell && conjuringSpell != spell && normal_random(0, 100) <= 25) {\n\t\t\tuint32_t castResult = conjuringSpell->canCast(player) ? 20 : 10;\n\t\t\tmagicLevelSkill += magicLevelSkill * castResult / 100;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5d9cc57254c07d126e7b018dedd78f9e2e0be5dcb3ed1cab3d36633cf3dd117" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1532, + "startColumn": 65, + "charOffset": 52306, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 1530, + "startColumn": 65, + "charOffset": 52040, + "charLength": 2, + "snippet": { + "text": "\t\tconst std::shared_ptr conjuringSpell = g_spells().getInstantSpellByName(damage.runeSpellName);\n\t\tif (spell && conjuringSpell && conjuringSpell != spell && normal_random(0, 100) <= 25) {\n\t\t\tuint32_t castResult = conjuringSpell->canCast(player) ? 20 : 10;\n\t\t\tmagicLevelSkill += magicLevelSkill * castResult / 100;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae12163aaf8f1fb796e400283ae84a8510520f249fd5d2286daa41d3d77fa25e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1533, + "startColumn": 54, + "charOffset": 52363, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 1531, + "startColumn": 54, + "charOffset": 52151, + "charLength": 3, + "snippet": { + "text": "\t\tif (spell && conjuringSpell && conjuringSpell != spell && normal_random(0, 100) <= 25) {\n\t\t\tuint32_t castResult = conjuringSpell->canCast(player) ? 20 : 10;\n\t\t\tmagicLevelSkill += magicLevelSkill * castResult / 100;\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ca57dff862f94bc9771080000f3ec4bd5007ce22da7abab7367476115008725" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1540, + "startColumn": 61, + "charOffset": 52526, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1538, + "startColumn": 61, + "charOffset": 52463, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid ValueCallback::getMinMaxValues(std::shared_ptr player, CombatDamage &damage, bool useCharges) const {\n\t// onGetPlayerMinMaxValues(...)\n\tif (!scriptInterface->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88c9cc40558002e4e4d0a7b916633366e86f0daf876c0f0d6745fdfbbab7369f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1542, + "startColumn": 7, + "charOffset": 52620, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1540, + "startColumn": 7, + "charOffset": 52466, + "charLength": 15, + "snippet": { + "text": "void ValueCallback::getMinMaxValues(std::shared_ptr player, CombatDamage &damage, bool useCharges) const {\n\t// onGetPlayerMinMaxValues(...)\n\tif (!scriptInterface->reserveScriptEnv()) {\n\t\tg_logger().error(\"[ValueCallback::getMinMaxValues - Player {} formula {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c30ea8d91284330d37caccc92ac73ac67b155812dcd27afb15cb65c6833a74f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1549, + "startColumn": 27, + "charOffset": 52922, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1547, + "startColumn": 27, + "charOffset": 52892, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\n\t\tscriptInterface->resetScriptEnv();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21e6b74d25fdd7b061dc02f4cd4e603c3a6b974cf9a16f4d64bdbb2064d498c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1551, + "startColumn": 3, + "charOffset": 53012, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1549, + "startColumn": 3, + "charOffset": 52896, + "charLength": 15, + "snippet": { + "text": "\tScriptEnvironment* env = scriptInterface->getScriptEnv();\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\n\t\tscriptInterface->resetScriptEnv();\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06d3c916d200781cb53b07f2d3f38a3acc4648dd1cdb90309361f89a9e91ef13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1557, + "startColumn": 19, + "charOffset": 53128, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 1555, + "startColumn": 19, + "charOffset": 53061, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = scriptInterface->getLuaState();\n\n\tscriptInterface->pushFunction(scriptId);\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e06a522648ec9aea31fbff7f201706a403873c88480402b135ae0a8589e6079b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1563, + "startColumn": 24, + "charOffset": 53394, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 1561, + "startColumn": 24, + "charOffset": 53259, + "charLength": 1, + "snippet": { + "text": "\n\tint16_t elementAttack = 0; // To calculate elemental damage after executing spell script and get real damage.\n\tint32_t attackValue = 7; // default start attack value\n\tint parameters = 1;\n\tbool shouldCalculateSecondaryDamage = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c84c9cadaf46d4dc8d67cf3c4a7016b33cc1927a79a265e788cf2d979c055eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1570, + "startColumn": 22, + "charOffset": 53624, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1568, + "startColumn": 22, + "charOffset": 53512, + "charLength": 6, + "snippet": { + "text": "\t\tcase COMBAT_FORMULA_LEVELMAGIC: {\n\t\t\t// onGetPlayerMinMaxValues(player, level, maglevel)\n\t\t\tlua_pushnumber(L, player->getLevel());\n\t\t\tlua_pushnumber(L, getMagicLevelSkill(player, damage));\n\t\t\tparameters += 2;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "900a6ef9ea7c898863b5eec121abc59e3f0655f11ac26b0319bdf8fc8f097a35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1571, + "startColumn": 22, + "charOffset": 53666, + "charLength": 18, + "snippet": { + "text": "getMagicLevelSkill" + } + }, + "contextRegion": { + "startLine": 1569, + "startColumn": 22, + "charOffset": 53548, + "charLength": 18, + "snippet": { + "text": "\t\t\t// onGetPlayerMinMaxValues(player, level, maglevel)\n\t\t\tlua_pushnumber(L, player->getLevel());\n\t\t\tlua_pushnumber(L, getMagicLevelSkill(player, damage));\n\t\t\tparameters += 2;\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb003789c7b572aa5d01996162f881d8a72b9f60b4abbfb45e992ccfe7661ad7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1581, + "startColumn": 25, + "charOffset": 54005, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 1579, + "startColumn": 25, + "charOffset": 53900, + "charLength": 1, + "snippet": { + "text": "\t\t\tconst auto &weapon = g_weapons().getWeapon(tool);\n\t\t\tint32_t attackSkill = 0;\n\t\t\tfloat attackFactor = 0;\n\t\t\tif (weapon) {\n\t\t\t\tshouldCalculateSecondaryDamage = weapon->calculateSkillFormula(player, attackSkill, attackValue, attackFactor, elementAttack, damage, useCharges);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a80b991156fa35a5629937c196feae69b025138ae8460a2cfaafd63b3b2bcf6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1586, + "startColumn": 22, + "charOffset": 54203, + "charLength": 11, + "snippet": { + "text": "attackSkill" + } + }, + "contextRegion": { + "startLine": 1584, + "startColumn": 22, + "charOffset": 54176, + "charLength": 11, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tlua_pushnumber(L, attackSkill);\n\t\t\tlua_pushnumber(L, attackValue);\n\t\t\tlua_pushnumber(L, attackFactor);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b87cad7de242e76e43c089349c2a234960b1a76fc0074bb6d74e3bd4bba21bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1587, + "startColumn": 22, + "charOffset": 54238, + "charLength": 11, + "snippet": { + "text": "attackValue" + } + }, + "contextRegion": { + "startLine": 1585, + "startColumn": 22, + "charOffset": 54181, + "charLength": 11, + "snippet": { + "text": "\n\t\t\tlua_pushnumber(L, attackSkill);\n\t\t\tlua_pushnumber(L, attackValue);\n\t\t\tlua_pushnumber(L, attackFactor);\n\t\t\tparameters += 3;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1b24e8f4d46416021ee062ec4d54cf7ff24f3ac4df74f01e6e1bd42abf19d10" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1593, + "startColumn": 3, + "charOffset": 54325, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 1591, + "startColumn": 3, + "charOffset": 54318, + "charLength": 7, + "snippet": { + "text": "\t\t}\n\n\t\tdefault: {\n\t\t\tg_logger().warn(\"[ValueCallback::getMinMaxValues] - Unknown callback type\");\n\t\t\tscriptInterface->resetScriptEnv();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "005a179d465cb701f118933492fa18b91b5e0eb7fabcfdfacdd60e0f9b2e3b6c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1595, + "startColumn": 4, + "charOffset": 54419, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1593, + "startColumn": 4, + "charOffset": 54323, + "charLength": 15, + "snippet": { + "text": "\t\tdefault: {\n\t\t\tg_logger().warn(\"[ValueCallback::getMinMaxValues] - Unknown callback type\");\n\t\t\tscriptInterface->resetScriptEnv();\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c538250363f382c893d5acb38559de2acfdfde0e0f9fc886424827a5d10e977" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1610, + "startColumn": 20, + "charOffset": 54835, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1608, + "startColumn": 20, + "charOffset": 54775, + "charLength": 1, + "snippet": { + "text": "\n\t\tif (shouldCalculateSecondaryDamage) {\n\t\t\tdouble factor = (double)elementAttack / (double)attackValue; // attack value here is phys dmg + element dmg\n\t\t\tint32_t elementDamage = std::round(defaultDmg * factor);\n\t\t\tint32_t physDmg = std::round(defaultDmg * (1.0 - factor));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a130211b155c5790b032ae6c4580e520150cdb11f64621906c6a34bef03dd69e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1610, + "startColumn": 44, + "charOffset": 54859, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1608, + "startColumn": 44, + "charOffset": 54775, + "charLength": 1, + "snippet": { + "text": "\n\t\tif (shouldCalculateSecondaryDamage) {\n\t\t\tdouble factor = (double)elementAttack / (double)attackValue; // attack value here is phys dmg + element dmg\n\t\t\tint32_t elementDamage = std::round(defaultDmg * factor);\n\t\t\tint32_t physDmg = std::round(defaultDmg * (1.0 - factor));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7648d5e8365093790e8c3eb93605f0fa766f26f26893426fc8648a00ec7301f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1611, + "startColumn": 28, + "charOffset": 54954, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1609, + "startColumn": 28, + "charOffset": 54776, + "charLength": 3, + "snippet": { + "text": "\t\tif (shouldCalculateSecondaryDamage) {\n\t\t\tdouble factor = (double)elementAttack / (double)attackValue; // attack value here is phys dmg + element dmg\n\t\t\tint32_t elementDamage = std::round(defaultDmg * factor);\n\t\t\tint32_t physDmg = std::round(defaultDmg * (1.0 - factor));\n\t\t\tdamage.primary.value = physDmg;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e00d5dec609a62b8f3a1e5a2a34a23db10450527200e0ff72487210c642c97af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1611, + "startColumn": 28, + "charOffset": 54954, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1609, + "startColumn": 28, + "charOffset": 54776, + "charLength": 3, + "snippet": { + "text": "\t\tif (shouldCalculateSecondaryDamage) {\n\t\t\tdouble factor = (double)elementAttack / (double)attackValue; // attack value here is phys dmg + element dmg\n\t\t\tint32_t elementDamage = std::round(defaultDmg * factor);\n\t\t\tint32_t physDmg = std::round(defaultDmg * (1.0 - factor));\n\t\t\tdamage.primary.value = physDmg;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a0fdb827e1b0bc4e6a4c31011aeb9e8515ed0caca4bca9d3aa3541b97ee3d11" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1612, + "startColumn": 22, + "charOffset": 55008, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1610, + "startColumn": 22, + "charOffset": 54816, + "charLength": 3, + "snippet": { + "text": "\t\t\tdouble factor = (double)elementAttack / (double)attackValue; // attack value here is phys dmg + element dmg\n\t\t\tint32_t elementDamage = std::round(defaultDmg * factor);\n\t\t\tint32_t physDmg = std::round(defaultDmg * (1.0 - factor));\n\t\t\tdamage.primary.value = physDmg;\n\t\t\tdamage.secondary.value = elementDamage;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b98cb29c6b3ff2005456a5a71bcf657c3274055fcb9338dd911c3801a0f07c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1612, + "startColumn": 22, + "charOffset": 55008, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1610, + "startColumn": 22, + "charOffset": 54816, + "charLength": 3, + "snippet": { + "text": "\t\t\tdouble factor = (double)elementAttack / (double)attackValue; // attack value here is phys dmg + element dmg\n\t\t\tint32_t elementDamage = std::round(defaultDmg * factor);\n\t\t\tint32_t physDmg = std::round(defaultDmg * (1.0 - factor));\n\t\t\tdamage.primary.value = physDmg;\n\t\t\tdamage.secondary.value = elementDamage;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12bcb223e41f7bae30863eb53bdd0b48c48277ef72a072ee863fd953435fa883" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1628, + "startColumn": 2, + "charOffset": 55395, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1626, + "startColumn": 2, + "charOffset": 55390, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tscriptInterface->resetScriptEnv();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c68f2bfaef4dc2641fc06f2c688b15eb986d37ad2617fd95fcb5901d8b647ba5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1633, + "startColumn": 59, + "charOffset": 55555, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1631, + "startColumn": 59, + "charOffset": 55433, + "charLength": 8, + "snippet": { + "text": "//**********************************************************//\n\nvoid TileCallback::onTileCombat(std::shared_ptr creature, std::shared_ptr tile) const {\n\t// onTileCombat(creature, pos)\n\tif (!scriptInterface->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2e11115caffc517e4a761a9f524d75699be432dc80bd77c88129cba4f63b908" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1633, + "startColumn": 91, + "charOffset": 55587, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 1631, + "startColumn": 91, + "charOffset": 55433, + "charLength": 4, + "snippet": { + "text": "//**********************************************************//\n\nvoid TileCallback::onTileCombat(std::shared_ptr creature, std::shared_ptr tile) const {\n\t// onTileCombat(creature, pos)\n\tif (!scriptInterface->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3939d7032dd64a40f86ba08d0b715a58e5a5c3931f5d9718628b37d3f6a3f118" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1635, + "startColumn": 7, + "charOffset": 55639, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1633, + "startColumn": 7, + "charOffset": 55497, + "charLength": 15, + "snippet": { + "text": "void TileCallback::onTileCombat(std::shared_ptr creature, std::shared_ptr tile) const {\n\t// onTileCombat(creature, pos)\n\tif (!scriptInterface->reserveScriptEnv()) {\n\t\tg_logger().error(\"[TileCallback::onTileCombat - Creature {} type {} on tile x: {} y: {} z: {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a706783cfb4af6529b75cbcc03347da91b21aa4bfa4e5e7f8231a34fac65c8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1642, + "startColumn": 27, + "charOffset": 56054, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1640, + "startColumn": 27, + "charOffset": 56024, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\n\t\tscriptInterface->resetScriptEnv();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2cadddab8dbf16bc628a9e85c57c2153fe6aeab434919bce116e1d39ab44406" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1644, + "startColumn": 3, + "charOffset": 56144, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1642, + "startColumn": 3, + "charOffset": 56028, + "charLength": 15, + "snippet": { + "text": "\tScriptEnvironment* env = scriptInterface->getScriptEnv();\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\n\t\tscriptInterface->resetScriptEnv();\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a335b9ca74a708162c9726e6fea76c357dff7556689147dbf4a990050966a4cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1650, + "startColumn": 19, + "charOffset": 56260, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 1648, + "startColumn": 19, + "charOffset": 56193, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = scriptInterface->getLuaState();\n\n\tscriptInterface->pushFunction(scriptId);\n\tif (creature) {\n\t\tLuaScriptInterface::pushUserdata(L, creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42f0580e18730bf93c9f36bedc08b4b7a069c28dc9dc331ea79555bb9ecb4355" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1659, + "startColumn": 19, + "charOffset": 56530, + "charLength": 12, + "snippet": { + "text": "callFunction" + } + }, + "contextRegion": { + "startLine": 1657, + "startColumn": 19, + "charOffset": 56452, + "charLength": 12, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, tile->getPosition());\n\n\tscriptInterface->callFunction(2);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "320fa685f8f36d7b7ad6dac5b3a1e69466710c435687caa1c87b600a0d2d2847" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1664, + "startColumn": 63, + "charOffset": 56676, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1662, + "startColumn": 63, + "charOffset": 56550, + "charLength": 8, + "snippet": { + "text": "//**********************************************************//\n\nvoid TargetCallback::onTargetCombat(std::shared_ptr creature, std::shared_ptr target) const {\n\t// onTargetCombat(creature, target)\n\tif (!scriptInterface->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0bff391c4c873f2bf7221ec57fca782dba4a3a1e238dd916c485c29c749c33ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1664, + "startColumn": 99, + "charOffset": 56712, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 1662, + "startColumn": 99, + "charOffset": 56550, + "charLength": 6, + "snippet": { + "text": "//**********************************************************//\n\nvoid TargetCallback::onTargetCombat(std::shared_ptr creature, std::shared_ptr target) const {\n\t// onTargetCombat(creature, target)\n\tif (!scriptInterface->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a47e3eb9fd99b980141e10725c6e724303d6c8b236db867c2f485a24850a68d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1666, + "startColumn": 7, + "charOffset": 56771, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1664, + "startColumn": 7, + "charOffset": 56614, + "charLength": 15, + "snippet": { + "text": "void TargetCallback::onTargetCombat(std::shared_ptr creature, std::shared_ptr target) const {\n\t// onTargetCombat(creature, target)\n\tif (!scriptInterface->reserveScriptEnv()) {\n\t\tg_logger().error(\"[TargetCallback::onTargetCombat - Creature {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8192ba59ce4be93331b6c3f5a8840df4c29c207351092c6b7b6447af7a9daf3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1673, + "startColumn": 27, + "charOffset": 57043, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1671, + "startColumn": 27, + "charOffset": 57013, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\n\t\tscriptInterface->resetScriptEnv();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6607e60bebcb62289dd8c0f34577c63dee400daa40beb8d8008d18d9c48dc55b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1675, + "startColumn": 3, + "charOffset": 57133, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1673, + "startColumn": 3, + "charOffset": 57017, + "charLength": 15, + "snippet": { + "text": "\tScriptEnvironment* env = scriptInterface->getScriptEnv();\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\n\t\tscriptInterface->resetScriptEnv();\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c3ae59506e3d8364a04fa6252e528dd307076f7be4fc52dc81f53b3ddf4c24e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1681, + "startColumn": 19, + "charOffset": 57249, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 1679, + "startColumn": 19, + "charOffset": 57182, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = scriptInterface->getLuaState();\n\n\tscriptInterface->pushFunction(scriptId);\n\n\tif (creature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "138975016c7aae7f22027a361c79bed72d165a7ce1b45a2c3c8efff29d1bcfa5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1707, + "startColumn": 2, + "charOffset": 57895, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1705, + "startColumn": 2, + "charOffset": 57890, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tscriptInterface->resetScriptEnv();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "029edd4a687d0e7bf9cb5eae945d2a45efdf2ec151018f03fdc6eb63303a61ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1718, + "startColumn": 6, + "charOffset": 58247, + "charLength": 14, + "snippet": { + "text": "m_chainTargets" + } + }, + "contextRegion": { + "startLine": 1716, + "startColumn": 6, + "charOffset": 58238, + "charLength": 14, + "snippet": { + "text": "\t}\n\n\tif (m_chainTargets && m_chainDistance) {\n\t\tmaxTargets = m_chainTargets;\n\t\tchainDistance = m_chainDistance;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b50dba192682033eea2ab08df5651a0c9fd0018246de50433c6b51ac79177983" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1718, + "startColumn": 6, + "charOffset": 58247, + "charLength": 14, + "snippet": { + "text": "m_chainTargets" + } + }, + "contextRegion": { + "startLine": 1716, + "startColumn": 6, + "charOffset": 58238, + "charLength": 14, + "snippet": { + "text": "\t}\n\n\tif (m_chainTargets && m_chainDistance) {\n\t\tmaxTargets = m_chainTargets;\n\t\tchainDistance = m_chainDistance;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7431e6ac012ca72460d5488af9b37e309315000aba5c2c14f44932f9b6a9284" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1718, + "startColumn": 21, + "charOffset": 58262, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 1716, + "startColumn": 21, + "charOffset": 58238, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (m_chainTargets && m_chainDistance) {\n\t\tmaxTargets = m_chainTargets;\n\t\tchainDistance = m_chainDistance;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8658d14bdaac1ea7731c1156e34823d982f86f428fbe4ec5464d57d14df14321" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1718, + "startColumn": 24, + "charOffset": 58265, + "charLength": 15, + "snippet": { + "text": "m_chainDistance" + } + }, + "contextRegion": { + "startLine": 1716, + "startColumn": 24, + "charOffset": 58238, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (m_chainTargets && m_chainDistance) {\n\t\tmaxTargets = m_chainTargets;\n\t\tchainDistance = m_chainDistance;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7ffbb91f9a944ad45f5b8edce1d09b58ff97aaa82bca4b6d1b5e3b65ddb13f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1724, + "startColumn": 61, + "charOffset": 58448, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1722, + "startColumn": 61, + "charOffset": 58383, + "charLength": 8, + "snippet": { + "text": "\t}\n}\nvoid ChainCallback::onChainCombat(std::shared_ptr creature, uint8_t &maxTargets, uint8_t &chainDistance, bool &backtracking) {\n\t// onChainCombat(creature)\n\tif (!scriptInterface->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d9a834240905083c5850fd72bc07bfa307c2d8c0d5fab746f2ba953c5b7829e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "3 adjacent parameters of 'onChainCombat' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1724, + "startColumn": 71, + "charOffset": 58458, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 1722, + "startColumn": 71, + "charOffset": 58383, + "charLength": 7, + "snippet": { + "text": "\t}\n}\nvoid ChainCallback::onChainCombat(std::shared_ptr creature, uint8_t &maxTargets, uint8_t &chainDistance, bool &backtracking) {\n\t// onChainCombat(creature)\n\tif (!scriptInterface->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8bb8e20901c6ddf8d7b2f91a09f2e7b31d06249b59b1851620c0f52faf27b2a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1726, + "startColumn": 7, + "charOffset": 58559, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1724, + "startColumn": 7, + "charOffset": 58388, + "charLength": 15, + "snippet": { + "text": "void ChainCallback::onChainCombat(std::shared_ptr creature, uint8_t &maxTargets, uint8_t &chainDistance, bool &backtracking) {\n\t// onChainCombat(creature)\n\tif (!scriptInterface->reserveScriptEnv()) {\n\t\tg_logger().error(\"[ChainCallback::onTargetCombat - Creature {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7444cfbcde94c457ee200e77eb4cccad7587ea2c85d3a7b149514122149e950" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1733, + "startColumn": 27, + "charOffset": 58830, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1731, + "startColumn": 27, + "charOffset": 58800, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\n\t\tscriptInterface->resetScriptEnv();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62e65d26ae474471243e78dd74e559428a0c9a35006210d22808c91e82bc9586" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1735, + "startColumn": 3, + "charOffset": 58920, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1733, + "startColumn": 3, + "charOffset": 58804, + "charLength": 15, + "snippet": { + "text": "\tScriptEnvironment* env = scriptInterface->getScriptEnv();\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\n\t\tscriptInterface->resetScriptEnv();\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7990b0881f8888564a7acf5fb2a2df72cca8704fb48b5a055e60626ba6cc5b37" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1741, + "startColumn": 19, + "charOffset": 59036, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 1739, + "startColumn": 19, + "charOffset": 58969, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = scriptInterface->getLuaState();\n\n\tscriptInterface->pushFunction(scriptId);\n\n\tif (creature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b474e97cba3c58054dbe0fc9044b579caa0b497f6c8d813e2ea822985058edf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1763, + "startColumn": 2, + "charOffset": 59714, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1761, + "startColumn": 2, + "charOffset": 59709, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tscriptInterface->resetScriptEnv();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f1c2920ee5f939f3e874379928402ff062164ad10a13e7118bb00ab5bb3a04f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1766, + "startColumn": 67, + "charOffset": 59818, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1764, + "startColumn": 67, + "charOffset": 59749, + "charLength": 8, + "snippet": { + "text": "}\n\nbool ChainPickerCallback::onChainCombat(std::shared_ptr creature, std::shared_ptr target) const {\n\t// onChainCombat(creature, target)\n\tif (!scriptInterface->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9c6961ba94d8fff9f11923a02c398666e5a5ecde71fad8bc4a3b2e8df2c5644" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1766, + "startColumn": 103, + "charOffset": 59854, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 1764, + "startColumn": 103, + "charOffset": 59749, + "charLength": 6, + "snippet": { + "text": "}\n\nbool ChainPickerCallback::onChainCombat(std::shared_ptr creature, std::shared_ptr target) const {\n\t// onChainCombat(creature, target)\n\tif (!scriptInterface->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10f7a69f2be7a9b7b77c570f3ab581f6a54da6da951dce0ece70d551761eadea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1768, + "startColumn": 7, + "charOffset": 59912, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1766, + "startColumn": 7, + "charOffset": 59752, + "charLength": 15, + "snippet": { + "text": "bool ChainPickerCallback::onChainCombat(std::shared_ptr creature, std::shared_ptr target) const {\n\t// onChainCombat(creature, target)\n\tif (!scriptInterface->reserveScriptEnv()) {\n\t\tg_logger().error(\"[ChainPickerCallback::onTargetCombat - Creature {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "073228215ae5391204d618bba8698ee76be576df34c145d79188e2bc1c17e9c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1775, + "startColumn": 27, + "charOffset": 60194, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1773, + "startColumn": 27, + "charOffset": 60164, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\n\t\tscriptInterface->resetScriptEnv();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "beffafd80436d740732929168679a0a83478ab8531ab1091f20ed7963503a443" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1777, + "startColumn": 3, + "charOffset": 60284, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1775, + "startColumn": 3, + "charOffset": 60168, + "charLength": 15, + "snippet": { + "text": "\tScriptEnvironment* env = scriptInterface->getScriptEnv();\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\n\t\tscriptInterface->resetScriptEnv();\n\t\treturn true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9da057380a65c0deab12633884e96ddb0da77c043b27c7290868bd275d0ec1c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1783, + "startColumn": 19, + "charOffset": 60405, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 1781, + "startColumn": 19, + "charOffset": 60338, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = scriptInterface->getLuaState();\n\n\tscriptInterface->pushFunction(scriptId);\n\n\tif (creature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2bb5f859d85bf539c77e4df4040339362788d8885dfd05d3f2f6150864f6ca43" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1812, + "startColumn": 2, + "charOffset": 61137, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1810, + "startColumn": 2, + "charOffset": 61132, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tscriptInterface->resetScriptEnv();\n\treturn result;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "869c2dd2e84838c217ff092e64e1adcdb553d38afe690d329ad8df02c84ce354" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-prefer-member-initializer", + "ruleIndex": 504, + "kind": "fail", + "level": "warning", + "message": { + "text": "'hasExtArea' should be initialized in a member initializer of the constructor" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1823, + "startColumn": 2, + "charOffset": 61370, + "charLength": 10, + "snippet": { + "text": "hasExtArea" + } + }, + "contextRegion": { + "startLine": 1821, + "startColumn": 2, + "charOffset": 61320, + "charLength": 10, + "snippet": { + "text": "\nAreaCombat::AreaCombat(const AreaCombat &rhs) {\n\thasExtArea = rhs.hasExtArea;\n\tfor (uint_fast8_t i = 0; i <= Direction::DIRECTION_LAST; ++i) {\n\t\tif (const auto &area = rhs.areas[i]) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a42fcf7181fb78ffe3c640ef69aff79538d5eb3ae2833d091a52b404f83dbf27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1824, + "startColumn": 2, + "charOffset": 61400, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1822, + "startColumn": 2, + "charOffset": 61321, + "charLength": 3, + "snippet": { + "text": "AreaCombat::AreaCombat(const AreaCombat &rhs) {\n\thasExtArea = rhs.hasExtArea;\n\tfor (uint_fast8_t i = 0; i <= Direction::DIRECTION_LAST; ++i) {\n\t\tif (const auto &area = rhs.areas[i]) {\n\t\t\tareas[i] = area->clone();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63986bdaf2ec159b5fc20621b534833d7eddeb43b274a669a77793cd94d1a8e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1825, + "startColumn": 26, + "charOffset": 61489, + "charLength": 3, + "snippet": { + "text": "rhs" + } + }, + "contextRegion": { + "startLine": 1823, + "startColumn": 26, + "charOffset": 61369, + "charLength": 3, + "snippet": { + "text": "\thasExtArea = rhs.hasExtArea;\n\tfor (uint_fast8_t i = 0; i <= Direction::DIRECTION_LAST; ++i) {\n\t\tif (const auto &area = rhs.areas[i]) {\n\t\t\tareas[i] = area->clone();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c4e17ea346c520ed64cd889a2b55061518936ae8a393e8ddb0a9082bf15f69a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1826, + "startColumn": 4, + "charOffset": 61508, + "charLength": 5, + "snippet": { + "text": "areas" + } + }, + "contextRegion": { + "startLine": 1824, + "startColumn": 4, + "charOffset": 61399, + "charLength": 5, + "snippet": { + "text": "\tfor (uint_fast8_t i = 0; i <= Direction::DIRECTION_LAST; ++i) {\n\t\tif (const auto &area = rhs.areas[i]) {\n\t\t\tareas[i] = area->clone();\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5dcc2013d7bdb82c03abed98dfaa26b2491db036dcf2378728f9de10fd3a48c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1833, + "startColumn": 6, + "charOffset": 61752, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1831, + "startColumn": 6, + "charOffset": 61544, + "charLength": 1, + "snippet": { + "text": "void AreaCombat::getList(const Position ¢erPos, const Position &targetPos, std::vector> &list) const {\n\tconst std::unique_ptr &area = getArea(centerPos, targetPos);\n\tif (!area) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0078c4a09a99d501e234c89257787bae0cdf8b98f2c99bf4c907fc050bf249ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'centerY' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1837, + "startColumn": 11, + "charOffset": 61785, + "charLength": 7, + "snippet": { + "text": "centerY" + } + }, + "contextRegion": { + "startLine": 1835, + "startColumn": 11, + "charOffset": 61771, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tuint32_t centerY;\n\tuint32_t centerX;\n\tarea->getCenter(centerY, centerX);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dad72737e9f0295a8113e2cdc685853ef1e8a18a8ff8b6919f3b1b584079e9b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'centerX' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1838, + "startColumn": 11, + "charOffset": 61804, + "charLength": 7, + "snippet": { + "text": "centerX" + } + }, + "contextRegion": { + "startLine": 1836, + "startColumn": 11, + "charOffset": 61774, + "charLength": 7, + "snippet": { + "text": "\n\tuint32_t centerY;\n\tuint32_t centerX;\n\tarea->getCenter(centerY, centerX);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc8e5a38b801846987c3f4c30ed44206c945ef5ccdd5dcfc9d8470c0c99fbe8b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-implicit-widening-of-multiplication-result", + "ruleIndex": 58, + "kind": "fail", + "level": "warning", + "message": { + "text": "performing an implicit widening conversion to type 'size_type' (aka 'unsigned long') of a multiplication performed in type 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1843, + "startColumn": 15, + "charOffset": 61944, + "charLength": 4, + "snippet": { + "text": "rows" + } + }, + "contextRegion": { + "startLine": 1841, + "startColumn": 15, + "charOffset": 61850, + "charLength": 4, + "snippet": { + "text": "\tconst uint32_t rows = area->getRows();\n\tconst uint32_t cols = area->getCols();\n\tlist.reserve(rows * cols);\n\n\tPosition tmpPos(targetPos.x - centerX, targetPos.y - centerY, targetPos.z);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af5100648987918806dab266a41615e4f649da3d3e9aa776cc2dc1c0194784c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1845, + "startColumn": 18, + "charOffset": 61976, + "charLength": 9, + "snippet": { + "text": "targetPos" + } + }, + "contextRegion": { + "startLine": 1843, + "startColumn": 18, + "charOffset": 61930, + "charLength": 9, + "snippet": { + "text": "\tlist.reserve(rows * cols);\n\n\tPosition tmpPos(targetPos.x - centerX, targetPos.y - centerY, targetPos.z);\n\tfor (uint32_t y = 0; y < rows; ++y, ++tmpPos.y, tmpPos.x -= cols) {\n\t\tfor (uint32_t x = 0; x < cols; ++x, ++tmpPos.x) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9cee090a9eec0a44d3bb3b47289557c3d3790930ab9ff8a8801966d7a81b09e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1845, + "startColumn": 41, + "charOffset": 61999, + "charLength": 9, + "snippet": { + "text": "targetPos" + } + }, + "contextRegion": { + "startLine": 1843, + "startColumn": 41, + "charOffset": 61930, + "charLength": 9, + "snippet": { + "text": "\tlist.reserve(rows * cols);\n\n\tPosition tmpPos(targetPos.x - centerX, targetPos.y - centerY, targetPos.z);\n\tfor (uint32_t y = 0; y < rows; ++y, ++tmpPos.y, tmpPos.x -= cols) {\n\t\tfor (uint32_t x = 0; x < cols; ++x, ++tmpPos.x) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f9a23cdce629e38ae39a5b07d86abd748b8efbfe5017bc85200b74244675015" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'rows' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1846, + "startColumn": 23, + "charOffset": 62058, + "charLength": 1, + "snippet": { + "text": "y" + } + }, + "contextRegion": { + "startLine": 1844, + "startColumn": 23, + "charOffset": 61958, + "charLength": 1, + "snippet": { + "text": "\n\tPosition tmpPos(targetPos.x - centerX, targetPos.y - centerY, targetPos.z);\n\tfor (uint32_t y = 0; y < rows; ++y, ++tmpPos.y, tmpPos.x -= cols) {\n\t\tfor (uint32_t x = 0; x < cols; ++x, ++tmpPos.x) {\n\t\t\tif (area->getValue(y, x) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d6532dfec7c2360274f429d5768df42abcdbdf96a8590c0b2d19a28caf2aadb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-18-1", + "ruleIndex": 432, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-18-1: The comma operator shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1846, + "startColumn": 36, + "charOffset": 62071, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 1844, + "startColumn": 36, + "charOffset": 61958, + "charLength": 1, + "snippet": { + "text": "\n\tPosition tmpPos(targetPos.x - centerX, targetPos.y - centerY, targetPos.z);\n\tfor (uint32_t y = 0; y < rows; ++y, ++tmpPos.y, tmpPos.x -= cols) {\n\t\tfor (uint32_t x = 0; x < cols; ++x, ++tmpPos.x) {\n\t\t\tif (area->getValue(y, x) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "872d4a6edf218e1fad8dd98535ee8b94263152d23443e0854d3f6776cf8060cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-18-1", + "ruleIndex": 432, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-18-1: The comma operator shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1846, + "startColumn": 48, + "charOffset": 62083, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 1844, + "startColumn": 48, + "charOffset": 61958, + "charLength": 1, + "snippet": { + "text": "\n\tPosition tmpPos(targetPos.x - centerX, targetPos.y - centerY, targetPos.z);\n\tfor (uint32_t y = 0; y < rows; ++y, ++tmpPos.y, tmpPos.x -= cols) {\n\t\tfor (uint32_t x = 0; x < cols; ++x, ++tmpPos.x) {\n\t\t\tif (area->getValue(y, x) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c609d413150f5432e3179148530e0539716e79615591447088dcc2559de332e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1847, + "startColumn": 3, + "charOffset": 62107, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1845, + "startColumn": 3, + "charOffset": 61959, + "charLength": 3, + "snippet": { + "text": "\tPosition tmpPos(targetPos.x - centerX, targetPos.y - centerY, targetPos.z);\n\tfor (uint32_t y = 0; y < rows; ++y, ++tmpPos.y, tmpPos.x -= cols) {\n\t\tfor (uint32_t x = 0; x < cols; ++x, ++tmpPos.x) {\n\t\t\tif (area->getValue(y, x) != 0) {\n\t\t\t\tif (g_game().isSightClear(targetPos, tmpPos, true)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "adbed6d71a6a8b6b5b6e337f9cb04eb8d884129ae084386aad3c06d6b3ffa0ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'cols' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1847, + "startColumn": 24, + "charOffset": 62128, + "charLength": 1, + "snippet": { + "text": "x" + } + }, + "contextRegion": { + "startLine": 1845, + "startColumn": 24, + "charOffset": 61959, + "charLength": 1, + "snippet": { + "text": "\tPosition tmpPos(targetPos.x - centerX, targetPos.y - centerY, targetPos.z);\n\tfor (uint32_t y = 0; y < rows; ++y, ++tmpPos.y, tmpPos.x -= cols) {\n\t\tfor (uint32_t x = 0; x < cols; ++x, ++tmpPos.x) {\n\t\t\tif (area->getValue(y, x) != 0) {\n\t\t\t\tif (g_game().isSightClear(targetPos, tmpPos, true)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b0e75b823cc53aba9baa2739ec39a3bc1b5942a2005d76a3d63c4c1a42214ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-18-1", + "ruleIndex": 432, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-18-1: The comma operator shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1847, + "startColumn": 37, + "charOffset": 62141, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 1845, + "startColumn": 37, + "charOffset": 61959, + "charLength": 1, + "snippet": { + "text": "\tPosition tmpPos(targetPos.x - centerX, targetPos.y - centerY, targetPos.z);\n\tfor (uint32_t y = 0; y < rows; ++y, ++tmpPos.y, tmpPos.x -= cols) {\n\t\tfor (uint32_t x = 0; x < cols; ++x, ++tmpPos.x) {\n\t\t\tif (area->getValue(y, x) != 0) {\n\t\t\t\tif (g_game().isSightClear(targetPos, tmpPos, true)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77f2d605c604e652aeff1e0f8fde142e9f767aa553e8fd55f63a1ff550afca85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1848, + "startColumn": 8, + "charOffset": 62164, + "charLength": 4, + "snippet": { + "text": "area" + } + }, + "contextRegion": { + "startLine": 1846, + "startColumn": 8, + "charOffset": 62036, + "charLength": 4, + "snippet": { + "text": "\tfor (uint32_t y = 0; y < rows; ++y, ++tmpPos.y, tmpPos.x -= cols) {\n\t\tfor (uint32_t x = 0; x < cols; ++x, ++tmpPos.x) {\n\t\t\tif (area->getValue(y, x) != 0) {\n\t\t\t\tif (g_game().isSightClear(targetPos, tmpPos, true)) {\n\t\t\t\t\tlist.emplace_back(g_game().map.getOrCreateTile(tmpPos));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "185b4bc93802c0cc5fe5516d75fbf446cc057f45d85f18b698e254128bbe6b8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1850, + "startColumn": 11, + "charOffset": 62261, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1848, + "startColumn": 11, + "charOffset": 62157, + "charLength": 12, + "snippet": { + "text": "\t\t\tif (area->getValue(y, x) != 0) {\n\t\t\t\tif (g_game().isSightClear(targetPos, tmpPos, true)) {\n\t\t\t\t\tlist.emplace_back(g_game().map.getOrCreateTile(tmpPos));\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00a02a712e84d323ab1b37fb9c7dbd91f235c96d8870b2453185cef40b091df0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'copyArea' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1857, + "startColumn": 18, + "charOffset": 62351, + "charLength": 8, + "snippet": { + "text": "copyArea" + } + }, + "contextRegion": { + "startLine": 1855, + "startColumn": 18, + "charOffset": 62331, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid AreaCombat::copyArea(const std::unique_ptr &input, const std::unique_ptr &output, MatrixOperation_t op) const {\n\tuint32_t centerY, centerX;\n\tinput->getCenter(centerY, centerX);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ba915972398b7d1e78483ecb8a253237082681ec03f534b4f1dc572c0c11b34" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'copyArea' has cognitive complexity of 26 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1857, + "startColumn": 18, + "charOffset": 62351, + "charLength": 8, + "snippet": { + "text": "copyArea" + } + }, + "contextRegion": { + "startLine": 1855, + "startColumn": 18, + "charOffset": 62331, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid AreaCombat::copyArea(const std::unique_ptr &input, const std::unique_ptr &output, MatrixOperation_t op) const {\n\tuint32_t centerY, centerX;\n\tinput->getCenter(centerY, centerX);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "319a8441dffe13ac78457e1cc6ac61298e1a52d3347e60ae71338a19736251c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1858, + "startColumn": 2, + "charOffset": 62476, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 1856, + "startColumn": 2, + "charOffset": 62333, + "charLength": 8, + "snippet": { + "text": "\nvoid AreaCombat::copyArea(const std::unique_ptr &input, const std::unique_ptr &output, MatrixOperation_t op) const {\n\tuint32_t centerY, centerX;\n\tinput->getCenter(centerY, centerX);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e173132c8e5cab084836a5d53e56044aad0116d9f4115b2015debb56f762321" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1858, + "startColumn": 2, + "charOffset": 62476, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 1856, + "startColumn": 2, + "charOffset": 62333, + "charLength": 8, + "snippet": { + "text": "\nvoid AreaCombat::copyArea(const std::unique_ptr &input, const std::unique_ptr &output, MatrixOperation_t op) const {\n\tuint32_t centerY, centerX;\n\tinput->getCenter(centerY, centerX);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9691949cedda8884b2ac60ca964d2b82a17034a83f2e92c8d760f38d5803d1ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'centerY' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1858, + "startColumn": 11, + "charOffset": 62485, + "charLength": 7, + "snippet": { + "text": "centerY" + } + }, + "contextRegion": { + "startLine": 1856, + "startColumn": 11, + "charOffset": 62333, + "charLength": 7, + "snippet": { + "text": "\nvoid AreaCombat::copyArea(const std::unique_ptr &input, const std::unique_ptr &output, MatrixOperation_t op) const {\n\tuint32_t centerY, centerX;\n\tinput->getCenter(centerY, centerX);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7ecd677111005bb4220a0ae1e789c1487b88e48c642997459dd35357a0ca762" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'centerX' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1858, + "startColumn": 20, + "charOffset": 62494, + "charLength": 7, + "snippet": { + "text": "centerX" + } + }, + "contextRegion": { + "startLine": 1856, + "startColumn": 20, + "charOffset": 62333, + "charLength": 7, + "snippet": { + "text": "\nvoid AreaCombat::copyArea(const std::unique_ptr &input, const std::unique_ptr &output, MatrixOperation_t op) const {\n\tuint32_t centerY, centerX;\n\tinput->getCenter(centerY, centerX);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fdd5fffdd7dc4c2fd468e35ae350a55e611dcdc2f83005fe3861a796f7e4df69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1863, + "startColumn": 4, + "charOffset": 62631, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1861, + "startColumn": 4, + "charOffset": 62541, + "charLength": 3, + "snippet": { + "text": "\tif (op == MATRIXOPERATION_COPY) {\n\t\tfor (uint32_t y = 0; y < input->getRows(); ++y) {\n\t\t\tfor (uint32_t x = 0; x < input->getCols(); ++x) {\n\t\t\t\t(*output)[y][x] = (*input)[y][x];\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "317e530bb701b4adbd4ab01c1b13e4d484534353800df7d2c33f9a275b790586" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1864, + "startColumn": 5, + "charOffset": 62685, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1862, + "startColumn": 5, + "charOffset": 62576, + "charLength": 1, + "snippet": { + "text": "\t\tfor (uint32_t y = 0; y < input->getRows(); ++y) {\n\t\t\tfor (uint32_t x = 0; x < input->getCols(); ++x) {\n\t\t\t\t(*output)[y][x] = (*input)[y][x];\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a82ef66968d65d8fcf0ba5ec3af19c71a5be752864cc6b185b639343015989aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1864, + "startColumn": 23, + "charOffset": 62703, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1862, + "startColumn": 23, + "charOffset": 62576, + "charLength": 1, + "snippet": { + "text": "\t\tfor (uint32_t y = 0; y < input->getRows(); ++y) {\n\t\t\tfor (uint32_t x = 0; x < input->getCols(); ++x) {\n\t\t\t\t(*output)[y][x] = (*input)[y][x];\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55bd63cb319f112c2d903526fbac7bbbf35e42f42642fe16b455e1b9ea1afc53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1872, + "startColumn": 4, + "charOffset": 62887, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1870, + "startColumn": 4, + "charOffset": 62812, + "charLength": 3, + "snippet": { + "text": "\t\tfor (uint32_t y = 0; y < input->getRows(); ++y) {\n\t\t\tuint32_t rx = 0;\n\t\t\tfor (int32_t x = input->getCols(); --x >= 0;) {\n\t\t\t\t(*output)[y][rx++] = (*input)[y][x];\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "317e530bb701b4adbd4ab01c1b13e4d484534353800df7d2c33f9a275b790586" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1872, + "startColumn": 4, + "charOffset": 62887, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1870, + "startColumn": 4, + "charOffset": 62812, + "charLength": 3, + "snippet": { + "text": "\t\tfor (uint32_t y = 0; y < input->getRows(); ++y) {\n\t\t\tuint32_t rx = 0;\n\t\t\tfor (int32_t x = input->getCols(); --x >= 0;) {\n\t\t\t\t(*output)[y][rx++] = (*input)[y][x];\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d64eebf5e9199fefbe3069be6d6ca3bdcadbf5473cc14a2eb3105c6d41cbfb70" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1872, + "startColumn": 21, + "charOffset": 62904, + "charLength": 5, + "snippet": { + "text": "input" + } + }, + "contextRegion": { + "startLine": 1870, + "startColumn": 21, + "charOffset": 62812, + "charLength": 5, + "snippet": { + "text": "\t\tfor (uint32_t y = 0; y < input->getRows(); ++y) {\n\t\t\tuint32_t rx = 0;\n\t\t\tfor (int32_t x = input->getCols(); --x >= 0;) {\n\t\t\t\t(*output)[y][rx++] = (*input)[y][x];\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6c13c3fe8e083b7433f188e5771b1f0da36f9e3c640e41df053e93efaab3ad4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'x' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1872, + "startColumn": 39, + "charOffset": 62922, + "charLength": 2, + "snippet": { + "text": "--" + } + }, + "contextRegion": { + "startLine": 1870, + "startColumn": 39, + "charOffset": 62812, + "charLength": 2, + "snippet": { + "text": "\t\tfor (uint32_t y = 0; y < input->getRows(); ++y) {\n\t\t\tuint32_t rx = 0;\n\t\t\tfor (int32_t x = input->getCols(); --x >= 0;) {\n\t\t\t\t(*output)[y][rx++] = (*input)[y][x];\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b50429fe56bb55d255a7f9773810e23bd462630fd6963764f4ee23fd2501622f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1873, + "startColumn": 5, + "charOffset": 62939, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1871, + "startColumn": 5, + "charOffset": 62864, + "charLength": 1, + "snippet": { + "text": "\t\t\tuint32_t rx = 0;\n\t\t\tfor (int32_t x = input->getCols(); --x >= 0;) {\n\t\t\t\t(*output)[y][rx++] = (*input)[y][x];\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b4b5b68f1da440e9d4699310bcb590c9a940279882a464e74f7fdf1db09f3e06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1873, + "startColumn": 26, + "charOffset": 62960, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1871, + "startColumn": 26, + "charOffset": 62864, + "charLength": 1, + "snippet": { + "text": "\t\t\tuint32_t rx = 0;\n\t\t\tfor (int32_t x = input->getCols(); --x >= 0;) {\n\t\t\t\t(*output)[y][rx++] = (*input)[y][x];\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37656c045060cdbbfb7d025fadf6c7887d302a3086be38929ea7590754d64984" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1881, + "startColumn": 4, + "charOffset": 63167, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1879, + "startColumn": 4, + "charOffset": 63092, + "charLength": 3, + "snippet": { + "text": "\t\tfor (uint32_t x = 0; x < input->getCols(); ++x) {\n\t\t\tuint32_t ry = 0;\n\t\t\tfor (int32_t y = input->getRows(); --y >= 0;) {\n\t\t\t\t(*output)[ry++][x] = (*input)[y][x];\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "305131a2a70e14092cb6e0a88369eaeedf92b5d89db906f398f774a056f5063f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1881, + "startColumn": 4, + "charOffset": 63167, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1879, + "startColumn": 4, + "charOffset": 63092, + "charLength": 3, + "snippet": { + "text": "\t\tfor (uint32_t x = 0; x < input->getCols(); ++x) {\n\t\t\tuint32_t ry = 0;\n\t\t\tfor (int32_t y = input->getRows(); --y >= 0;) {\n\t\t\t\t(*output)[ry++][x] = (*input)[y][x];\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bab1452b77ee8966265ac0e208f221bde0b345cb0b706f95535e92f0cbb30222" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1881, + "startColumn": 21, + "charOffset": 63184, + "charLength": 5, + "snippet": { + "text": "input" + } + }, + "contextRegion": { + "startLine": 1879, + "startColumn": 21, + "charOffset": 63092, + "charLength": 5, + "snippet": { + "text": "\t\tfor (uint32_t x = 0; x < input->getCols(); ++x) {\n\t\t\tuint32_t ry = 0;\n\t\t\tfor (int32_t y = input->getRows(); --y >= 0;) {\n\t\t\t\t(*output)[ry++][x] = (*input)[y][x];\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a130f3e414bc93fc6587afbc4b4db6400a71e56fe121464d6ad99ee803fec45e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'y' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1881, + "startColumn": 39, + "charOffset": 63202, + "charLength": 2, + "snippet": { + "text": "--" + } + }, + "contextRegion": { + "startLine": 1879, + "startColumn": 39, + "charOffset": 63092, + "charLength": 2, + "snippet": { + "text": "\t\tfor (uint32_t x = 0; x < input->getCols(); ++x) {\n\t\t\tuint32_t ry = 0;\n\t\t\tfor (int32_t y = input->getRows(); --y >= 0;) {\n\t\t\t\t(*output)[ry++][x] = (*input)[y][x];\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8841bca6430c47be4949c77eb9b6a79ae7c7427baf5fc6da93c2ae4696729ca6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1882, + "startColumn": 5, + "charOffset": 63219, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1880, + "startColumn": 5, + "charOffset": 63144, + "charLength": 1, + "snippet": { + "text": "\t\t\tuint32_t ry = 0;\n\t\t\tfor (int32_t y = input->getRows(); --y >= 0;) {\n\t\t\t\t(*output)[ry++][x] = (*input)[y][x];\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51c69f9c242c8ad9687a289db4fa448d9688b6f1e05c55f6ef61dc8096b785a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1882, + "startColumn": 26, + "charOffset": 63240, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1880, + "startColumn": 26, + "charOffset": 63144, + "charLength": 1, + "snippet": { + "text": "\t\t\tuint32_t ry = 0;\n\t\t\tfor (int32_t y = input->getRows(); --y >= 0;) {\n\t\t\t\t(*output)[ry++][x] = (*input)[y][x];\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6672750bef051a2866343127ae917b127455c6744669c2f7a44967cb904d78f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1889, + "startColumn": 27, + "charOffset": 63380, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1887, + "startColumn": 27, + "charOffset": 63330, + "charLength": 1, + "snippet": { + "text": "\t} else {\n\t\t// rotation\n\t\tint32_t rotateCenterX = (output->getCols() / 2) - 1;\n\t\tint32_t rotateCenterY = (output->getRows() / 2) - 1;\n\t\tint32_t angle;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71db03bd0c441e2d9936dc2d453fc7d9367a7f16ed244b0950fd68dcf80c1a8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1890, + "startColumn": 27, + "charOffset": 63435, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1888, + "startColumn": 27, + "charOffset": 63340, + "charLength": 1, + "snippet": { + "text": "\t\t// rotation\n\t\tint32_t rotateCenterX = (output->getCols() / 2) - 1;\n\t\tint32_t rotateCenterY = (output->getRows() / 2) - 1;\n\t\tint32_t angle;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b8d265956c8152fdd596d8a5a60169380393ce6452bc6be1c1bdf6299a5cc2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'angle' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1891, + "startColumn": 11, + "charOffset": 63474, + "charLength": 5, + "snippet": { + "text": "angle" + } + }, + "contextRegion": { + "startLine": 1889, + "startColumn": 11, + "charOffset": 63354, + "charLength": 5, + "snippet": { + "text": "\t\tint32_t rotateCenterX = (output->getCols() / 2) - 1;\n\t\tint32_t rotateCenterY = (output->getRows() / 2) - 1;\n\t\tint32_t angle;\n\n\t\tswitch (op) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f6bb069c8c84370d8c484767d01f1e1bd801732c8615826aa3757eeca447d98" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "90 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1895, + "startColumn": 13, + "charOffset": 63544, + "charLength": 2, + "snippet": { + "text": "90" + } + }, + "contextRegion": { + "startLine": 1893, + "startColumn": 13, + "charOffset": 63482, + "charLength": 2, + "snippet": { + "text": "\t\tswitch (op) {\n\t\t\tcase MATRIXOPERATION_ROTATE90:\n\t\t\t\tangle = 90;\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1604cde39965e6e72a16bd5ccf8f3b2ce027dfc82be6c1f31156bb98fc2a161" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "180 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1899, + "startColumn": 13, + "charOffset": 63607, + "charLength": 3, + "snippet": { + "text": "180" + } + }, + "contextRegion": { + "startLine": 1897, + "startColumn": 13, + "charOffset": 63559, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tcase MATRIXOPERATION_ROTATE180:\n\t\t\t\tangle = 180;\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "add76213fad7a843e6ac848d29d5a2658ea0a44fde2e34701aebf749e7114d66" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "270 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1903, + "startColumn": 13, + "charOffset": 63671, + "charLength": 3, + "snippet": { + "text": "270" + } + }, + "contextRegion": { + "startLine": 1901, + "startColumn": 13, + "charOffset": 63623, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tcase MATRIXOPERATION_ROTATE270:\n\t\t\t\tangle = 270;\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d027dfd0992253f6801bbe6b65ebba456b87acfc2b078170c2b17a865c42bd76" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1911, + "startColumn": 28, + "charOffset": 63758, + "charLength": 5, + "snippet": { + "text": "angle" + } + }, + "contextRegion": { + "startLine": 1909, + "startColumn": 28, + "charOffset": 63726, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\n\t\tdouble angleRad = M_PI * angle / 180.0;\n\n\t\tdouble a = std::cos(angleRad);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1845a0e455772e4697eb78916efb296704eaac053d3d4b18f3fd5e62c7c4e413" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "180.0 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1911, + "startColumn": 36, + "charOffset": 63766, + "charLength": 5, + "snippet": { + "text": "180.0" + } + }, + "contextRegion": { + "startLine": 1909, + "startColumn": 36, + "charOffset": 63726, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\n\t\tdouble angleRad = M_PI * angle / 180.0;\n\n\t\tdouble a = std::cos(angleRad);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "343199c000b42e5e78e189ac18aea6abd5fbf2f4834fb43da2a7d47ab5f1fc60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1919, + "startColumn": 8, + "charOffset": 63957, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 1917, + "startColumn": 8, + "charOffset": 63907, + "charLength": 8, + "snippet": { + "text": "\n\t\tconst uint32_t rows = input->getRows();\n\t\tfor (uint32_t x = 0, cols = input->getCols(); x < cols; ++x) {\n\t\t\tfor (uint32_t y = 0; y < rows; ++y) {\n\t\t\t\t// calculate new coordinates using rotation center" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3b856f09bd7076f46ff2e1d8add5339c1fbf88c8e93519803c780d1b0b7e1ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'cols' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1919, + "startColumn": 49, + "charOffset": 63998, + "charLength": 1, + "snippet": { + "text": "x" + } + }, + "contextRegion": { + "startLine": 1917, + "startColumn": 49, + "charOffset": 63907, + "charLength": 1, + "snippet": { + "text": "\n\t\tconst uint32_t rows = input->getRows();\n\t\tfor (uint32_t x = 0, cols = input->getCols(); x < cols; ++x) {\n\t\t\tfor (uint32_t y = 0; y < rows; ++y) {\n\t\t\t\t// calculate new coordinates using rotation center" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aaf50eff48b08f78f2f5adf84ff1726d5bfbd4f26d5e97d024f37a90d91cc067" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1920, + "startColumn": 4, + "charOffset": 64018, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1918, + "startColumn": 4, + "charOffset": 63908, + "charLength": 3, + "snippet": { + "text": "\t\tconst uint32_t rows = input->getRows();\n\t\tfor (uint32_t x = 0, cols = input->getCols(); x < cols; ++x) {\n\t\t\tfor (uint32_t y = 0; y < rows; ++y) {\n\t\t\t\t// calculate new coordinates using rotation center\n\t\t\t\tint32_t newX = x - centerX;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3f672b9fae516cb43164c6e28633ffc6bf96a083331776be0398417b6f27fa0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'rows' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1920, + "startColumn": 25, + "charOffset": 64039, + "charLength": 1, + "snippet": { + "text": "y" + } + }, + "contextRegion": { + "startLine": 1918, + "startColumn": 25, + "charOffset": 63908, + "charLength": 1, + "snippet": { + "text": "\t\tconst uint32_t rows = input->getRows();\n\t\tfor (uint32_t x = 0, cols = input->getCols(); x < cols; ++x) {\n\t\t\tfor (uint32_t y = 0; y < rows; ++y) {\n\t\t\t\t// calculate new coordinates using rotation center\n\t\t\t\tint32_t newX = x - centerX;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a51353943719ace498da86a876aa420d74cd656414b50148ed8d6f7f734a49e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1922, + "startColumn": 20, + "charOffset": 64130, + "charLength": 1, + "snippet": { + "text": "x" + } + }, + "contextRegion": { + "startLine": 1920, + "startColumn": 20, + "charOffset": 64015, + "charLength": 1, + "snippet": { + "text": "\t\t\tfor (uint32_t y = 0; y < rows; ++y) {\n\t\t\t\t// calculate new coordinates using rotation center\n\t\t\t\tint32_t newX = x - centerX;\n\t\t\t\tint32_t newY = y - centerY;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f19e412360882463879d1ac38bff0d27a55d8527a850d47e1552a3724c359b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1923, + "startColumn": 20, + "charOffset": 64162, + "charLength": 1, + "snippet": { + "text": "y" + } + }, + "contextRegion": { + "startLine": 1921, + "startColumn": 20, + "charOffset": 64056, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t// calculate new coordinates using rotation center\n\t\t\t\tint32_t newX = x - centerX;\n\t\t\t\tint32_t newY = y - centerY;\n\n\t\t\t\t// perform rotation" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "554107346f75a34da428d09b722b68c072a3dbdb910853d79bd3b2f211ed8c86" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1926, + "startColumn": 5, + "charOffset": 64204, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 1924, + "startColumn": 5, + "charOffset": 64175, + "charLength": 7, + "snippet": { + "text": "\n\t\t\t\t// perform rotation\n\t\t\t\tint32_t rotatedX = static_cast(round(newX * a + newY * b));\n\t\t\t\tint32_t rotatedY = static_cast(round(newX * c + newY * d));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e4fd53a0be3662acc05df84b08b9667b5df7c8028677ebb7c9ae68e6e299167" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1926, + "startColumn": 51, + "charOffset": 64250, + "charLength": 4, + "snippet": { + "text": "newX" + } + }, + "contextRegion": { + "startLine": 1924, + "startColumn": 51, + "charOffset": 64175, + "charLength": 4, + "snippet": { + "text": "\n\t\t\t\t// perform rotation\n\t\t\t\tint32_t rotatedX = static_cast(round(newX * a + newY * b));\n\t\t\t\tint32_t rotatedY = static_cast(round(newX * c + newY * d));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27d0d3e3e77ad5972f1cf7a01c06ab6cc7805f891313754918ae976ae3ea5753" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1926, + "startColumn": 62, + "charOffset": 64261, + "charLength": 4, + "snippet": { + "text": "newY" + } + }, + "contextRegion": { + "startLine": 1924, + "startColumn": 62, + "charOffset": 64175, + "charLength": 4, + "snippet": { + "text": "\n\t\t\t\t// perform rotation\n\t\t\t\tint32_t rotatedX = static_cast(round(newX * a + newY * b));\n\t\t\t\tint32_t rotatedY = static_cast(round(newX * c + newY * d));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4981d73d7c4e481d1c741bd658efea350e4e5437f415a0aedb871f0ad53e3d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1927, + "startColumn": 5, + "charOffset": 64277, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 1925, + "startColumn": 5, + "charOffset": 64176, + "charLength": 7, + "snippet": { + "text": "\t\t\t\t// perform rotation\n\t\t\t\tint32_t rotatedX = static_cast(round(newX * a + newY * b));\n\t\t\t\tint32_t rotatedY = static_cast(round(newX * c + newY * d));\n\n\t\t\t\t// write in the output matrix using rotated coordinates" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "427b973297d997c9c4bb593de74c026dc65ddd7252df672afe9d3e16892c4e96" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1927, + "startColumn": 51, + "charOffset": 64323, + "charLength": 4, + "snippet": { + "text": "newX" + } + }, + "contextRegion": { + "startLine": 1925, + "startColumn": 51, + "charOffset": 64176, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t// perform rotation\n\t\t\t\tint32_t rotatedX = static_cast(round(newX * a + newY * b));\n\t\t\t\tint32_t rotatedY = static_cast(round(newX * c + newY * d));\n\n\t\t\t\t// write in the output matrix using rotated coordinates" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "846e6fd5476f75483730f7fdd8e4e06e9e17d8a9c867545a79d01faae09513f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1927, + "startColumn": 62, + "charOffset": 64334, + "charLength": 4, + "snippet": { + "text": "newY" + } + }, + "contextRegion": { + "startLine": 1925, + "startColumn": 62, + "charOffset": 64176, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t// perform rotation\n\t\t\t\tint32_t rotatedX = static_cast(round(newX * a + newY * b));\n\t\t\t\tint32_t rotatedY = static_cast(round(newX * c + newY * d));\n\n\t\t\t\t// write in the output matrix using rotated coordinates" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49b355c6622d3fb09ca488c88b862a956f6f10125e9c0cc1827fe64deb5b45d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1930, + "startColumn": 5, + "charOffset": 64411, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1928, + "startColumn": 5, + "charOffset": 64346, + "charLength": 1, + "snippet": { + "text": "\n\t\t\t\t// write in the output matrix using rotated coordinates\n\t\t\t\t(*output)[rotatedY + rotateCenterY][rotatedX + rotateCenterX] = (*input)[y][x];\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68bd4b4662b2dcb2bb2cd76e5188e81f395fbc89df3f4557e33c8d784611569b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-pointer-arithmetic", + "ruleIndex": 507, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use pointer arithmetic" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1930, + "startColumn": 69, + "charOffset": 64475, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1928, + "startColumn": 69, + "charOffset": 64346, + "charLength": 1, + "snippet": { + "text": "\n\t\t\t\t// write in the output matrix using rotated coordinates\n\t\t\t\t(*output)[rotatedY + rotateCenterY][rotatedX + rotateCenterX] = (*input)[y][x];\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b4b5b68f1da440e9d4699310bcb590c9a940279882a464e74f7fdf1db09f3e06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'createArea' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1938, + "startColumn": 41, + "charOffset": 64598, + "charLength": 10, + "snippet": { + "text": "createArea" + } + }, + "contextRegion": { + "startLine": 1936, + "startColumn": 41, + "charOffset": 64555, + "charLength": 10, + "snippet": { + "text": "}\n\nstd::unique_ptr AreaCombat::createArea(const std::list &list, uint32_t rows) {\n\tuint32_t cols;\n\tif (rows == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbbb76923a31056cabfe0b917684ec291789a981ff2ad458c69353ee7e7ef287" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'cols' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1939, + "startColumn": 11, + "charOffset": 64669, + "charLength": 4, + "snippet": { + "text": "cols" + } + }, + "contextRegion": { + "startLine": 1937, + "startColumn": 11, + "charOffset": 64557, + "charLength": 4, + "snippet": { + "text": "\nstd::unique_ptr AreaCombat::createArea(const std::list &list, uint32_t rows) {\n\tuint32_t cols;\n\tif (rows == 0) {\n\t\tcols = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec948bf9f10277994ce6201104c33ded689302519dfc22b20630bd5225f1ab6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1943, + "startColumn": 10, + "charOffset": 64724, + "charLength": 4, + "snippet": { + "text": "list" + } + }, + "contextRegion": { + "startLine": 1941, + "startColumn": 10, + "charOffset": 64693, + "charLength": 4, + "snippet": { + "text": "\t\tcols = 0;\n\t} else {\n\t\tcols = list.size() / rows;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3674897dd3a40312a2db13250a41f693c9a5b645182a45e11d1532fc2e999548" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 1951, + "startColumn": 2, + "charOffset": 64840, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1949, + "startColumn": 2, + "charOffset": 64821, + "charLength": 3, + "snippet": { + "text": "\tuint32_t y = 0;\n\n\tfor (uint32_t value : list) {\n\t\tif (value == 1 || value == 3) {\n\t\t\tarea->setValue(y, x, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f4a88974e38c22c4d0522b14376cd52cd9e5ecd38ddb275a17cd7f120f20ac4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'rows' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2002, + "startColumn": 23, + "charOffset": 66136, + "charLength": 1, + "snippet": { + "text": "y" + } + }, + "contextRegion": { + "startLine": 2000, + "startColumn": 23, + "charOffset": 66086, + "charLength": 1, + "snippet": { + "text": "\tint32_t colSpread = cols;\n\n\tfor (uint32_t y = 1; y <= rows; ++y) {\n\t\tint32_t mincol = cols - colSpread + 1;\n\t\tint32_t maxcol = cols - (cols - colSpread);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c568602cabfbba90ca4302af2dff946096fa979dafa4053d85be10611160af5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2006, + "startColumn": 3, + "charOffset": 66244, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2004, + "startColumn": 3, + "charOffset": 66195, + "charLength": 3, + "snippet": { + "text": "\t\tint32_t maxcol = cols - (cols - colSpread);\n\n\t\tfor (int32_t x = 1; x <= cols; ++x) {\n\t\t\tif (y == rows && x == ((cols - (cols % 2)) / 2) + 1) {\n\t\t\t\tlist.push_back(3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce740ab29107f8a736ba354c5749da4863bb49b62c72ef5f19502c5c657eb786" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'cols' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2006, + "startColumn": 23, + "charOffset": 66264, + "charLength": 1, + "snippet": { + "text": "x" + } + }, + "contextRegion": { + "startLine": 2004, + "startColumn": 23, + "charOffset": 66195, + "charLength": 1, + "snippet": { + "text": "\t\tint32_t maxcol = cols - (cols - colSpread);\n\n\t\tfor (int32_t x = 1; x <= cols; ++x) {\n\t\t\tif (y == rows && x == ((cols - (cols % 2)) / 2) + 1) {\n\t\t\t\tlist.push_back(3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6acb41a03cb0a1d275bf58b7b40b997ab7a7c68d79606a4b246fdffc71ff3e01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-c-arrays", + "ruleIndex": 480, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not declare C-style arrays, use std::array<> instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2025, + "startColumn": 2, + "charOffset": 66611, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 2023, + "startColumn": 2, + "charOffset": 66564, + "charLength": 7, + "snippet": { + "text": "\nvoid AreaCombat::setupArea(int32_t radius) {\n\tint32_t area[13][13] = {\n\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a58e7b3962e1a14d11d64e94da2141be25d3a29221a37f151c7296936480159" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "13 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2025, + "startColumn": 15, + "charOffset": 66624, + "charLength": 2, + "snippet": { + "text": "13" + } + }, + "contextRegion": { + "startLine": 2023, + "startColumn": 15, + "charOffset": 66564, + "charLength": 2, + "snippet": { + "text": "\nvoid AreaCombat::setupArea(int32_t radius) {\n\tint32_t area[13][13] = {\n\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "109882d479a8f3e449e9594af8eb288369fca47631209113c668b3cdb784451d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "13 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2025, + "startColumn": 19, + "charOffset": 66628, + "charLength": 2, + "snippet": { + "text": "13" + } + }, + "contextRegion": { + "startLine": 2023, + "startColumn": 19, + "charOffset": 66564, + "charLength": 2, + "snippet": { + "text": "\nvoid AreaCombat::setupArea(int32_t radius) {\n\tint32_t area[13][13] = {\n\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1020a75b889f9db71444cd34c392f831be13282dc24c106762c7e5c7cbeefb51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2026, + "startColumn": 23, + "charOffset": 66658, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2024, + "startColumn": 23, + "charOffset": 66565, + "charLength": 1, + "snippet": { + "text": "void AreaCombat::setupArea(int32_t radius) {\n\tint32_t area[13][13] = {\n\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f7f6f7c3cd5c478819b69e16a79a6a8ae4bd726fa7c9493a639c1c0ff27fd7f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2027, + "startColumn": 17, + "charOffset": 66697, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2025, + "startColumn": 17, + "charOffset": 66610, + "charLength": 1, + "snippet": { + "text": "\tint32_t area[13][13] = {\n\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "390aa472c6e801b5008f14403a8fd49c2c9786a0b2c1cda1534965f413d94dbb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2027, + "startColumn": 20, + "charOffset": 66700, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2025, + "startColumn": 20, + "charOffset": 66610, + "charLength": 1, + "snippet": { + "text": "\tint32_t area[13][13] = {\n\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d28fdda6f48cc0430b8ce6ba38bb0b8a40ba0d9a70e150cf3d9a324ae08989a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2027, + "startColumn": 23, + "charOffset": 66703, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 2025, + "startColumn": 23, + "charOffset": 66610, + "charLength": 1, + "snippet": { + "text": "\tint32_t area[13][13] = {\n\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24711d0bb1adb437e896304b1d21ad2559f320f34f490c710571810c297fd5f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2027, + "startColumn": 26, + "charOffset": 66706, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2025, + "startColumn": 26, + "charOffset": 66610, + "charLength": 1, + "snippet": { + "text": "\tint32_t area[13][13] = {\n\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a17ab19e5f0868e5966ae1b12edc3016058f337526002d207193fe746684073d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2027, + "startColumn": 29, + "charOffset": 66709, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2025, + "startColumn": 29, + "charOffset": 66610, + "charLength": 1, + "snippet": { + "text": "\tint32_t area[13][13] = {\n\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f74f5c39aeeaa14fbf949a99390d038f2dc2b06a8bbb3e4b410cacc36d45fec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2028, + "startColumn": 14, + "charOffset": 66739, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2026, + "startColumn": 14, + "charOffset": 66636, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83e69df9c880eaa751f59c57044ff29a7cb012eaacaa83e9eccabdd0d8bf0113" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2028, + "startColumn": 17, + "charOffset": 66742, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 2026, + "startColumn": 17, + "charOffset": 66636, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d27f1c4b261f00daa07304b921ec0a964480a72f29e7ffca760db812848de68d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2028, + "startColumn": 20, + "charOffset": 66745, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 2026, + "startColumn": 20, + "charOffset": 66636, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77877c8b5f7132567bdd90b250ff374a101da484c449a116789ff428d2381bcc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2028, + "startColumn": 23, + "charOffset": 66748, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 2026, + "startColumn": 23, + "charOffset": 66636, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce7040ee601499bd940320d632d71b2597a9505aea8c1e75348e390aefe5288f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2028, + "startColumn": 26, + "charOffset": 66751, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 2026, + "startColumn": 26, + "charOffset": 66636, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c8c29c8b65fa2ea88d905e98920cd93dd83dc7ee5f8ff99fdd3046769dc9d2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2028, + "startColumn": 29, + "charOffset": 66754, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 2026, + "startColumn": 29, + "charOffset": 66636, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a404963fe30370239ff535767a4f95c7186d946548e357a895b7631640a3bf4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2028, + "startColumn": 32, + "charOffset": 66757, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2026, + "startColumn": 32, + "charOffset": 66636, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e2255f3a1bb9d44217839e0f83d5a764536d4bbb66daf5108155873f9339f8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2029, + "startColumn": 11, + "charOffset": 66781, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2027, + "startColumn": 11, + "charOffset": 66681, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "260b0294e4d33acf14083b786014961c6761f63589ee62ecd93c32aebdf6f29d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2029, + "startColumn": 14, + "charOffset": 66784, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 2027, + "startColumn": 14, + "charOffset": 66681, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec30c755342a19c0d7fef7bfa6156ee9297341a51c3d3f7c66b6b4a282d5b1a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2029, + "startColumn": 17, + "charOffset": 66787, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 2027, + "startColumn": 17, + "charOffset": 66681, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a3f3c4099821944bdbaf990f7ff6efea90c75790ed39be80a914e61de8e6e68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2029, + "startColumn": 20, + "charOffset": 66790, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2027, + "startColumn": 20, + "charOffset": 66681, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ec19b7e5e17843f05611e64ed583cbe5c615c5a29aa5b68b45304485bf06326" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2029, + "startColumn": 23, + "charOffset": 66793, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2027, + "startColumn": 23, + "charOffset": 66681, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79bbab40f53e49223d988ebd7d50b1af15d893f01d99b2e5e16a652a6bca82e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2029, + "startColumn": 26, + "charOffset": 66796, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2027, + "startColumn": 26, + "charOffset": 66681, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62b63b3c38fd0ff9007fc34f1cfa71e48388c2b0d2e749329bf0b8dc19313fdd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2029, + "startColumn": 29, + "charOffset": 66799, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 2027, + "startColumn": 29, + "charOffset": 66681, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa2e8454a80946fc3c95d323ac592fa13be601ac2c4fc49b8b63974ce03002ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2029, + "startColumn": 32, + "charOffset": 66802, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 2027, + "startColumn": 32, + "charOffset": 66681, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "174ae57668586c9bca518f1c805de02c3dd2796c46cb0c15d335119d606c5f94" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2029, + "startColumn": 35, + "charOffset": 66805, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2027, + "startColumn": 35, + "charOffset": 66681, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc6c0b4f2c91f40b16570c69bf014616c0eb6e7daf35c27511278219060c69b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2030, + "startColumn": 8, + "charOffset": 66823, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2028, + "startColumn": 8, + "charOffset": 66726, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a26ab0810b8abd0ec46bca7f5ff8e9b0a4806edd39a86531c364574f8ed1b11b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2030, + "startColumn": 11, + "charOffset": 66826, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 2028, + "startColumn": 11, + "charOffset": 66726, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0b0df3ebc6477e52b062d7e8972a03cabe1e9c6e888cbe0a107c1681bd65726" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2030, + "startColumn": 14, + "charOffset": 66829, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 2028, + "startColumn": 14, + "charOffset": 66726, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7075524c0113e23c455655bdd55503056c2fa7a09f2141bd7862fd91a2ebdd5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2030, + "startColumn": 17, + "charOffset": 66832, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2028, + "startColumn": 17, + "charOffset": 66726, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b350daaeeb8f3560d09048d78df44d88fe9c90da19efaef9442dd3c9a5323a25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2030, + "startColumn": 29, + "charOffset": 66844, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2028, + "startColumn": 29, + "charOffset": 66726, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f9cbde8d0d6d50feba53964a422866f760f9f99c3137bc86ed05c670f35f719" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2030, + "startColumn": 32, + "charOffset": 66847, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 2028, + "startColumn": 32, + "charOffset": 66726, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "110b2729a6c8e2dc1fe9b826bb1c6d7dfbefce1b5d9a19d65de36ab6dd0da621" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2030, + "startColumn": 35, + "charOffset": 66850, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 2028, + "startColumn": 35, + "charOffset": 66726, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dcf2a72fb5083d9eeea9569bc026aee83f9043e6284f5ba7e7a4083693de29b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2030, + "startColumn": 38, + "charOffset": 66853, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2028, + "startColumn": 38, + "charOffset": 66726, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afadf4ed8fe32039a5fd67b682610f9e9248099ce3488dd00fae2c16233f448c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2031, + "startColumn": 8, + "charOffset": 66868, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2029, + "startColumn": 8, + "charOffset": 66771, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad53e8424e167455d1ec6f8ac47cfd9355835398e0cef4be6837f20c48894d4d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2031, + "startColumn": 11, + "charOffset": 66871, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 2029, + "startColumn": 11, + "charOffset": 66771, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b69059ee1ff359f54cae10650bef8cfee61de983e6b54862accc414bfbc9963" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2031, + "startColumn": 14, + "charOffset": 66874, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2029, + "startColumn": 14, + "charOffset": 66771, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e3ea28034147b288f95451917741a8ca45b65294580f4a9f37bbfcdcad73314" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2031, + "startColumn": 32, + "charOffset": 66892, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2029, + "startColumn": 32, + "charOffset": 66771, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb43691dda8c0bf9bdd864b1ea320549a4e1ee75d6f4ad622a8d9398d8b77760" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2031, + "startColumn": 35, + "charOffset": 66895, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 2029, + "startColumn": 35, + "charOffset": 66771, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa2203fb95b7dbfd57ef3f318cad74b041957fe0bee78ee30b97deaeecb3c1d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2031, + "startColumn": 38, + "charOffset": 66898, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2029, + "startColumn": 38, + "charOffset": 66771, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dde6edecfd989c89723004fd054ae30f3c8d9cba5287818ddcd98044ccfffef4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2032, + "startColumn": 5, + "charOffset": 66910, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2030, + "startColumn": 5, + "charOffset": 66816, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a87223c3cbe8e99c70b20780eed10566c9a8c76c0003da03fa2cd815ca254ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2032, + "startColumn": 8, + "charOffset": 66913, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 2030, + "startColumn": 8, + "charOffset": 66816, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85374746802ad1d9e81ebe549983922103d55f9ee362f4bfcca414815759d7f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2032, + "startColumn": 11, + "charOffset": 66916, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 2030, + "startColumn": 11, + "charOffset": 66816, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e06cdb2f1d4ecdbb1513b456294930753baca6ec0e9a0bcab2e652ef9ac88f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2032, + "startColumn": 14, + "charOffset": 66919, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2030, + "startColumn": 14, + "charOffset": 66816, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0d5f5f37c2dbb96e10d17e416df88bc896f44d23d0397f674c741ad9be5a107" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2032, + "startColumn": 32, + "charOffset": 66937, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2030, + "startColumn": 32, + "charOffset": 66816, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8da59411b6811b6ad459c314e77fbd4684780ed4acaba12bd709201b8769a47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2032, + "startColumn": 35, + "charOffset": 66940, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 2030, + "startColumn": 35, + "charOffset": 66816, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8fde67fd43c193477955df77763d737aedadd13580be2355c8fb46bca3ef3e71" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2032, + "startColumn": 38, + "charOffset": 66943, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 2030, + "startColumn": 38, + "charOffset": 66816, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11b0c1e6b88f433f440f9398d84bb03994f33d4161b972601a1f6b6c21bb772d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2032, + "startColumn": 41, + "charOffset": 66946, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2030, + "startColumn": 41, + "charOffset": 66816, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34f58a1a5c2f788476d60852a1e7d98f1239e33bfbccd52856b7131a303fb190" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2033, + "startColumn": 8, + "charOffset": 66958, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2031, + "startColumn": 8, + "charOffset": 66861, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7913050bffb0aff7e4051b4a027736c20a2f9450a9d08c8420e8a164b84bfff4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2033, + "startColumn": 11, + "charOffset": 66961, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 2031, + "startColumn": 11, + "charOffset": 66861, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "028e2f331e92f19d42c876d448ea24e7f005905500b02a7c2d61ea0dd38710ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2033, + "startColumn": 14, + "charOffset": 66964, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2031, + "startColumn": 14, + "charOffset": 66861, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e8bf96ae1717e91cdec8082234ae9b0bb792aed47ee955891b5c6837844794e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2033, + "startColumn": 32, + "charOffset": 66982, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2031, + "startColumn": 32, + "charOffset": 66861, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c0a182817ac9cad4057100db76f04562ca363661738b931020ce30996439610" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2033, + "startColumn": 35, + "charOffset": 66985, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 2031, + "startColumn": 35, + "charOffset": 66861, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3a4c8fa78f4d873755083b31d5b8a4cb2e1e041a4261eab25859c8dbe424437" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2033, + "startColumn": 38, + "charOffset": 66988, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2031, + "startColumn": 38, + "charOffset": 66861, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b27c94a51d4a38f87372cb0578bb87a14ceec2825145c288498022419edd90ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2034, + "startColumn": 8, + "charOffset": 67003, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2032, + "startColumn": 8, + "charOffset": 66906, + "charLength": 1, + "snippet": { + "text": "\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "907ed786c201f5fb5632365728540e5bfedd37274d90464c2f021ee069f1103f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2034, + "startColumn": 11, + "charOffset": 67006, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 2032, + "startColumn": 11, + "charOffset": 66906, + "charLength": 1, + "snippet": { + "text": "\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c68008018d11c1890009592a1fe973a3fcb3e3e9efadf09add4e36d53d2ea377" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2034, + "startColumn": 14, + "charOffset": 67009, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 2032, + "startColumn": 14, + "charOffset": 66906, + "charLength": 1, + "snippet": { + "text": "\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4be83ad023ecb2bcf9b0000e9321bd12c1a8b1781eee2cc5cbc476ff90405e88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2034, + "startColumn": 17, + "charOffset": 67012, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2032, + "startColumn": 17, + "charOffset": 66906, + "charLength": 1, + "snippet": { + "text": "\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8ed1be389ad8418c6131cac3b5d89147c223dbe87cac98f5170ede21320736d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2034, + "startColumn": 29, + "charOffset": 67024, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2032, + "startColumn": 29, + "charOffset": 66906, + "charLength": 1, + "snippet": { + "text": "\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a45fe794c0837589b039d2851f63a9eef05aaa71b8813ce703f9020f452918fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2034, + "startColumn": 32, + "charOffset": 67027, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 2032, + "startColumn": 32, + "charOffset": 66906, + "charLength": 1, + "snippet": { + "text": "\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "276815fa93f316ee5e227703ba06cbaad6b1bbcb45e8d2f667c40e212dbf3a97" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2034, + "startColumn": 35, + "charOffset": 67030, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 2032, + "startColumn": 35, + "charOffset": 66906, + "charLength": 1, + "snippet": { + "text": "\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94f93923c1b0716e016aa25a88c27303e1fc796933598ddebd7ab0dfee88fe54" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2034, + "startColumn": 38, + "charOffset": 67033, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2032, + "startColumn": 38, + "charOffset": 66906, + "charLength": 1, + "snippet": { + "text": "\t\t{ 8, 7, 6, 5, 4, 2, 1, 2, 4, 5, 6, 7, 8 },\n\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6bbeaf441e40f2034a4a8c2650d8f9126bac600d9ab454538d69e40da54bedcd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2035, + "startColumn": 11, + "charOffset": 67051, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2033, + "startColumn": 11, + "charOffset": 66951, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc5e78a9c0fec836f7251fdd9cc09d438265be632ef625ba805fc843cb6e010b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2035, + "startColumn": 14, + "charOffset": 67054, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 2033, + "startColumn": 14, + "charOffset": 66951, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19eea605ca07c568108f97a23defeba4d025b289e11441aafb79f9df135a4e7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2035, + "startColumn": 17, + "charOffset": 67057, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 2033, + "startColumn": 17, + "charOffset": 66951, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d29ac975b9c5755ac5dc487c72019a62bb1882658a288f1d212ae7e4af4c2896" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2035, + "startColumn": 20, + "charOffset": 67060, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2033, + "startColumn": 20, + "charOffset": 66951, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "153f58d14c247654c09f11c74465a89346887cafca68772c72b627a54a8fcf01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2035, + "startColumn": 23, + "charOffset": 67063, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2033, + "startColumn": 23, + "charOffset": 66951, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "141c9f1c949395670f3f012eeb593f0df5ac9cfe641280b0062f4d9caf97585b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2035, + "startColumn": 26, + "charOffset": 67066, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 2033, + "startColumn": 26, + "charOffset": 66951, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afea10e9b78406b6c68a4993128dc54edb0ff81b131f7ee67d1fae899232bb53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2035, + "startColumn": 29, + "charOffset": 67069, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 2033, + "startColumn": 29, + "charOffset": 66951, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c27a63378da8ef039cb6bab86fb53aa98a0fff3d8e49bf6f378275e0323df77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2035, + "startColumn": 32, + "charOffset": 67072, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 2033, + "startColumn": 32, + "charOffset": 66951, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51a70f27f77d2f3684a62f66e83e5f8f0fc2bdfc8ebf4eccc54c6c6c6a2f4a7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2035, + "startColumn": 35, + "charOffset": 67075, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2033, + "startColumn": 35, + "charOffset": 66951, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 0 },\n\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1d798fcc0a2b086d9d0de1f513683d2bd08674ed252fc2b928b7f527ca00574" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2036, + "startColumn": 14, + "charOffset": 67099, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2034, + "startColumn": 14, + "charOffset": 66996, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 }" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "492938a1cb0cdb6f2dcf62c5df87bb2b428edd5265baf186008050b6fb37ce28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2036, + "startColumn": 17, + "charOffset": 67102, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 2034, + "startColumn": 17, + "charOffset": 66996, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 }" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d07b50c7643ef529a5fb23efe58f1334a5b7a998f3f3243e4830e11a851b231" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2036, + "startColumn": 20, + "charOffset": 67105, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 2034, + "startColumn": 20, + "charOffset": 66996, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 }" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "576ea8774d024f85b20b4da836baf9a9fc26eb2dd110b1741b6ea6252a9ecf5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2036, + "startColumn": 23, + "charOffset": 67108, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 2034, + "startColumn": 23, + "charOffset": 66996, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 }" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "237140f3c3d56580391c97be0d333b663b9d65828ed35147eb22edeb34dba8df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2036, + "startColumn": 26, + "charOffset": 67111, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 2034, + "startColumn": 26, + "charOffset": 66996, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 }" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1732923264c1d563462f8900c17815ea912559932600badd8632f3efc2dab1f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2036, + "startColumn": 29, + "charOffset": 67114, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 2034, + "startColumn": 29, + "charOffset": 66996, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 }" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c469b72c78e849e4e47d92836a39ff3d9cdb0b14ca4c70ebcfc40d386520c9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2036, + "startColumn": 32, + "charOffset": 67117, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2034, + "startColumn": 32, + "charOffset": 66996, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 8, 7, 6, 5, 4, 4, 4, 5, 6, 7, 8, 0 },\n\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 }" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31d68eb4efd3c49a66c6c05c9bf7d4a97c564de1b9f4f402470abff5bab88a63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2037, + "startColumn": 17, + "charOffset": 67147, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2035, + "startColumn": 17, + "charOffset": 67041, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 }\n\t};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70f89da091cb58bfb1748e4c4c4c05b8007e9e5ee0c356c33b0242046b48bf3a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2037, + "startColumn": 20, + "charOffset": 67150, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2035, + "startColumn": 20, + "charOffset": 67041, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 }\n\t};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a3e9c53fc5daecc4d44a077cc96cf4f0eb280dd20c03044c53a5d9ab0cc9bb9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2037, + "startColumn": 23, + "charOffset": 67153, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 2035, + "startColumn": 23, + "charOffset": 67041, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 }\n\t};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29719267bfd7df36ac30de365e3333d275eabedf4b185f2d9a07ee99dc1ed882" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2037, + "startColumn": 26, + "charOffset": 67156, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2035, + "startColumn": 26, + "charOffset": 67041, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 }\n\t};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c88aee2c7676ccb51899dbe7864e074549fac16da7cf9e0e8a38e0b1fdb39e95" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2037, + "startColumn": 29, + "charOffset": 67159, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2035, + "startColumn": 29, + "charOffset": 67041, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 8, 7, 6, 5, 5, 5, 6, 7, 8, 0, 0 },\n\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 }\n\t};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a18abf3a245a85550a1b39631d0001b0d69b36f6d1882828a4f9b419496d5836" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2038, + "startColumn": 23, + "charOffset": 67198, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 2036, + "startColumn": 23, + "charOffset": 67086, + "charLength": 1, + "snippet": { + "text": "\t\t{ 0, 0, 0, 8, 7, 6, 6, 6, 7, 8, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 8, 8, 7, 8, 8, 0, 0, 0, 0 },\n\t\t{ 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0 }\n\t};\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16601191075df5770302ba835dcf0add754719ce852e0b7cc6eec92bfaf41a43" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2044, + "startColumn": 3, + "charOffset": 67281, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2042, + "startColumn": 3, + "charOffset": 67252, + "charLength": 3, + "snippet": { + "text": "\n\tfor (auto &row : area) {\n\t\tfor (int cell : row) {\n\t\t\tif (cell == 1) {\n\t\t\t\tlist.push_back(3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d442faf36e837320dc87040fa002f7427f6a4101e1e8b76a5f3937f65ce479bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "13 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2055, + "startColumn": 18, + "charOffset": 67479, + "charLength": 2, + "snippet": { + "text": "13" + } + }, + "contextRegion": { + "startLine": 2053, + "startColumn": 18, + "charOffset": 67458, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tsetupArea(list, 13);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9b80c965c3d613d39935c209de41614ce8fa8c8a35cf8e932c5e832775653e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'onStepInField' has cognitive complexity of 44 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2090, + "startColumn": 18, + "charOffset": 68449, + "charLength": 13, + "snippet": { + "text": "onStepInField" + } + }, + "contextRegion": { + "startLine": 2088, + "startColumn": 18, + "charOffset": 68368, + "charLength": 13, + "snippet": { + "text": "//**********************************************************//\n\nvoid MagicField::onStepInField(const std::shared_ptr &creature) {\n\t// remove magic walls/wild growth\n\tif ((!isBlocking() && g_game().getWorldType() == WORLD_TYPE_NO_PVP && id == ITEM_MAGICWALL_SAFE) || id == ITEM_WILDGROWTH_SAFE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06a7a2ce3c222acb4e37ee9ec26ae799cd2a2763c013b6e3d0881a2f7139f623" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2094, + "startColumn": 13, + "charOffset": 68722, + "charLength": 18, + "snippet": { + "text": "internalRemoveItem" + } + }, + "contextRegion": { + "startLine": 2092, + "startColumn": 13, + "charOffset": 68543, + "charLength": 18, + "snippet": { + "text": "\tif ((!isBlocking() && g_game().getWorldType() == WORLD_TYPE_NO_PVP && id == ITEM_MAGICWALL_SAFE) || id == ITEM_WILDGROWTH_SAFE) {\n\t\tif (!creature->isInGhostMode()) {\n\t\t\tg_game().internalRemoveItem(static_self_cast(), 1);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69edf4762a30164b943ce2648bac38f3350b690e6840b8a766da2f36582b0368" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2104, + "startColumn": 7, + "charOffset": 68944, + "charLength": 7, + "snippet": { + "text": "ownerId" + } + }, + "contextRegion": { + "startLine": 2102, + "startColumn": 7, + "charOffset": 68855, + "charLength": 7, + "snippet": { + "text": "\t\tauto conditionCopy = it.conditionDamage->clone();\n\t\tauto ownerId = getOwnerId();\n\t\tif (ownerId) {\n\t\t\tbool harmfulField = true;\n\t\t\tauto itemTile = getTile();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9690892aae0d92739fa1b5116dabb54d48a4854b970836752dec04b4b93803fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2104, + "startColumn": 7, + "charOffset": 68944, + "charLength": 7, + "snippet": { + "text": "ownerId" + } + }, + "contextRegion": { + "startLine": 2102, + "startColumn": 7, + "charOffset": 68855, + "charLength": 7, + "snippet": { + "text": "\t\tauto conditionCopy = it.conditionDamage->clone();\n\t\tauto ownerId = getOwnerId();\n\t\tif (ownerId) {\n\t\t\tbool harmfulField = true;\n\t\t\tauto itemTile = getTile();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2118367e953bb2126b7c5a9cedb528234a80087fe705dc371712d3f4a733fa5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2130, + "startColumn": 55, + "charOffset": 69845, + "charLength": 4, + "snippet": { + "text": "5000" + } + }, + "contextRegion": { + "startLine": 2128, + "startColumn": 55, + "charOffset": 69785, + "charLength": 4, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (!harmfulField || (OTSYS_TIME() - createTime <= 5000) || creature->hasBeenAttacked(ownerId)) {\n\t\t\t\tconditionCopy->setParam(CONDITION_PARAM_OWNER, ownerId);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9ae4a06ca8c197d68d15b205dd58881b2ab09cc9c01fa757f299e10f405fdc7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2131, + "startColumn": 20, + "charOffset": 69911, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 2129, + "startColumn": 20, + "charOffset": 69790, + "charLength": 8, + "snippet": { + "text": "\n\t\t\tif (!harmfulField || (OTSYS_TIME() - createTime <= 5000) || creature->hasBeenAttacked(ownerId)) {\n\t\t\t\tconditionCopy->setParam(CONDITION_PARAM_OWNER, ownerId);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "105b8a82899aca35e626c297a9be4bb64d5fb6e10b3f35537dbca9099511c510" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2131, + "startColumn": 52, + "charOffset": 69943, + "charLength": 7, + "snippet": { + "text": "ownerId" + } + }, + "contextRegion": { + "startLine": 2129, + "startColumn": 52, + "charOffset": 69790, + "charLength": 7, + "snippet": { + "text": "\n\t\t\tif (!harmfulField || (OTSYS_TIME() - createTime <= 5000) || creature->hasBeenAttacked(ownerId)) {\n\t\t\t\tconditionCopy->setParam(CONDITION_PARAM_OWNER, ownerId);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62cc613c1f711ddf85c19535d6eea98a799ae81486a7e9ff76e8bb6233274ff9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2135, + "startColumn": 13, + "charOffset": 69975, + "charLength": 12, + "snippet": { + "text": "addCondition" + } + }, + "contextRegion": { + "startLine": 2133, + "startColumn": 13, + "charOffset": 69958, + "charLength": 12, + "snippet": { + "text": "\t\t}\n\n\t\tcreature->addCondition(conditionCopy);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55b820013450c15fd97ce3ec2ef4da035f91498c4d21b0869bc07be355de15e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'applyExtensions' has cognitive complexity of 32 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2139, + "startColumn": 14, + "charOffset": 70023, + "charLength": 15, + "snippet": { + "text": "applyExtensions" + } + }, + "contextRegion": { + "startLine": 2137, + "startColumn": 14, + "charOffset": 70007, + "charLength": 15, + "snippet": { + "text": "}\n\nvoid Combat::applyExtensions(std::shared_ptr caster, std::shared_ptr target, CombatDamage &damage, const CombatParams ¶ms) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (damage.extension || !caster || damage.primary.type == COMBAT_HEALING) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf4dd4e736f1e92f61f127bd1b78fedfac84421c1d4ad52eaedce3e7509978ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2139, + "startColumn": 56, + "charOffset": 70065, + "charLength": 6, + "snippet": { + "text": "caster" + } + }, + "contextRegion": { + "startLine": 2137, + "startColumn": 56, + "charOffset": 70007, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::applyExtensions(std::shared_ptr caster, std::shared_ptr target, CombatDamage &damage, const CombatParams ¶ms) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (damage.extension || !caster || damage.primary.type == COMBAT_HEALING) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b4a88b7166cc138ca9dbe7912374b16ef07343bb8047dbec50b2248726403c26" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2139, + "startColumn": 90, + "charOffset": 70099, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 2137, + "startColumn": 90, + "charOffset": 70007, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::applyExtensions(std::shared_ptr caster, std::shared_ptr target, CombatDamage &damage, const CombatParams ¶ms) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (damage.extension || !caster || damage.primary.type == COMBAT_HEALING) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eafe8dc9c745823d6a85ec6116225dd754554a1dcb094f279a9a1a88339f2c84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-unused-parameters", + "ruleIndex": 612, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'params' is unused" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2139, + "startColumn": 140, + "charOffset": 70149, + "charLength": 6, + "snippet": { + "text": "params" + } + }, + "contextRegion": { + "startLine": 2137, + "startColumn": 140, + "charOffset": 70007, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Combat::applyExtensions(std::shared_ptr caster, std::shared_ptr target, CombatDamage &damage, const CombatParams ¶ms) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (damage.extension || !caster || damage.primary.type == COMBAT_HEALING) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1aba879225d16841d8293a80c22986390d6b6555e3da14a63c2cbe6065505a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2140, + "startColumn": 34, + "charOffset": 70192, + "charLength": 15, + "snippet": { + "text": "__METHOD_NAME__" + } + }, + "contextRegion": { + "startLine": 2138, + "startColumn": 34, + "charOffset": 70009, + "charLength": 15, + "snippet": { + "text": "\nvoid Combat::applyExtensions(std::shared_ptr caster, std::shared_ptr target, CombatDamage &damage, const CombatParams ¶ms) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (damage.extension || !caster || damage.primary.type == COMBAT_HEALING) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56de62c0b67ad2bf84a71ca11a70779ee44d5626344554f04e9d121ca9f7fc51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2141, + "startColumn": 26, + "charOffset": 70235, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2139, + "startColumn": 26, + "charOffset": 70010, + "charLength": 1, + "snippet": { + "text": "void Combat::applyExtensions(std::shared_ptr caster, std::shared_ptr target, CombatDamage &damage, const CombatParams ¶ms) {\n\tmetrics::method_latency measure(__METHOD_NAME__);\n\tif (damage.extension || !caster || damage.primary.type == COMBAT_HEALING) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "609e3e97de87b4f4e26a10dc03dfca9787075a1c062610d510dce731b623f5c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "50 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2149, + "startColumn": 18, + "charOffset": 70539, + "charLength": 2, + "snippet": { + "text": "50" + } + }, + "contextRegion": { + "startLine": 2147, + "startColumn": 18, + "charOffset": 70483, + "charLength": 2, + "snippet": { + "text": "\t// Critical hit\n\tuint16_t chance = 0;\n\tint32_t bonus = 50;\n\tauto player = caster->getPlayer();\n\tauto monster = caster->getMonster();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "100e83755ae284e7fb09a9f93672dcd9db55b5476e6e51a81b076c4b4c654638" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2152, + "startColumn": 2, + "charOffset": 70618, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2150, + "startColumn": 2, + "charOffset": 70543, + "charLength": 2, + "snippet": { + "text": "\tauto player = caster->getPlayer();\n\tauto monster = caster->getMonster();\n\tif (player) {\n\t\tchance = player->getSkillLevel(SKILL_CRITICAL_HIT_CHANCE);\n\t\tbonus = player->getSkillLevel(SKILL_CRITICAL_HIT_DAMAGE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc6648fd85cce27786d3db6fc001693dd18ae7e5964d810f0caeee11e6560369" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2169, + "startColumn": 12, + "charOffset": 71329, + "charLength": 7, + "snippet": { + "text": "monster" + } + }, + "contextRegion": { + "startLine": 2167, + "startColumn": 12, + "charOffset": 71291, + "charLength": 7, + "snippet": { + "text": "\t\t}\n\t} else if (monster) {\n\t\tchance = monster->critChance() * 100;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c993c7048777c4e91a6b28a670194fd21c506842f5798d77d85dc257895b125b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2169, + "startColumn": 36, + "charOffset": 71353, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2167, + "startColumn": 36, + "charOffset": 71291, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else if (monster) {\n\t\tchance = monster->critChance() * 100;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c8d6782228667d6e2ce4e8eca9e9c8a8100c807df1a2fce8e820a443c874a2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2173, + "startColumn": 57, + "charOffset": 71451, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 2171, + "startColumn": 57, + "charOffset": 71361, + "charLength": 5, + "snippet": { + "text": "\n\tbonus += damage.criticalDamage;\n\tdouble multiplier = 1.0 + static_cast(bonus) / 10000;\n\tchance += (uint16_t)damage.criticalChance;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f39fbaa621c8ea0a1230577cf7c0f8ace8b02920970dcd166a7c5200c6b95823" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2173, + "startColumn": 57, + "charOffset": 71451, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 2171, + "startColumn": 57, + "charOffset": 71361, + "charLength": 5, + "snippet": { + "text": "\n\tbonus += damage.criticalDamage;\n\tdouble multiplier = 1.0 + static_cast(bonus) / 10000;\n\tchance += (uint16_t)damage.criticalChance;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96afefb06bb07407eb6e2230020c78c7525cba4d5385761aca94f6394eb89de8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2174, + "startColumn": 12, + "charOffset": 71469, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 2172, + "startColumn": 12, + "charOffset": 71362, + "charLength": 1, + "snippet": { + "text": "\tbonus += damage.criticalDamage;\n\tdouble multiplier = 1.0 + static_cast(bonus) / 10000;\n\tchance += (uint16_t)damage.criticalChance;\n\n\tif (chance != 0 && uniform_random(1, 10000) <= chance) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "778b9ad1840acfc08c07fcc31fa644ded95f8693234298c98b8aab3c518e0407" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2176, + "startColumn": 39, + "charOffset": 71541, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 2174, + "startColumn": 39, + "charOffset": 71458, + "charLength": 5, + "snippet": { + "text": "\tchance += (uint16_t)damage.criticalChance;\n\n\tif (chance != 0 && uniform_random(1, 10000) <= chance) {\n\t\tdamage.critical = true;\n\t\tdamage.primary.value *= multiplier;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "986130aecb41feab9335352a264067ddceb4cf5c2616acdfdddacc603db89cf1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2178, + "startColumn": 27, + "charOffset": 71613, + "charLength": 10, + "snippet": { + "text": "multiplier" + } + }, + "contextRegion": { + "startLine": 2176, + "startColumn": 27, + "charOffset": 71503, + "charLength": 10, + "snippet": { + "text": "\tif (chance != 0 && uniform_random(1, 10000) <= chance) {\n\t\tdamage.critical = true;\n\t\tdamage.primary.value *= multiplier;\n\t\tdamage.secondary.value *= multiplier;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0c6249dff701a6f7e79dd17ceb525e8e0b03e1a99906891448a4b21d78eefe2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2179, + "startColumn": 29, + "charOffset": 71653, + "charLength": 10, + "snippet": { + "text": "multiplier" + } + }, + "contextRegion": { + "startLine": 2177, + "startColumn": 29, + "charOffset": 71561, + "charLength": 10, + "snippet": { + "text": "\t\tdamage.critical = true;\n\t\tdamage.primary.value *= multiplier;\n\t\tdamage.secondary.value *= multiplier;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f406da0f8070798c4ca825da285bfbb7c733ae581a103f266f0da80ace8eee2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2182, + "startColumn": 2, + "charOffset": 71670, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2180, + "startColumn": 2, + "charOffset": 71665, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (player) {\n\t\t// Fatal hit (onslaught)\n\t\tif (auto playerWeapon = player->getInventoryItem(CONST_SLOT_LEFT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62286c50aacb5531812b7db91329c3ceb22a58f5650000a01142ec3330e1ac51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-integer-division", + "ruleIndex": 64, + "kind": "fail", + "level": "warning", + "message": { + "text": "result of integer division used in a floating point context; possible loss of precision" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2187, + "startColumn": 28, + "charOffset": 71929, + "charLength": 14, + "snippet": { + "text": "uniform_random" + } + }, + "contextRegion": { + "startLine": 2185, + "startColumn": 28, + "charOffset": 71780, + "charLength": 14, + "snippet": { + "text": "\t\t playerWeapon != nullptr && playerWeapon->getTier() > 0) {\n\t\t\tdouble_t fatalChance = playerWeapon->getFatalChance();\n\t\t\tdouble_t randomChance = uniform_random(0, 10000) / 100;\n\t\t\tif (fatalChance > 0 && randomChance < fatalChance) {\n\t\t\t\tdamage.fatal = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d08706b0f9a85c13e8af75415b6594b22a53a799e53f6ce334b2a44085722686" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2187, + "startColumn": 28, + "charOffset": 71929, + "charLength": 14, + "snippet": { + "text": "uniform_random" + } + }, + "contextRegion": { + "startLine": 2185, + "startColumn": 28, + "charOffset": 71780, + "charLength": 14, + "snippet": { + "text": "\t\t playerWeapon != nullptr && playerWeapon->getTier() > 0) {\n\t\t\tdouble_t fatalChance = playerWeapon->getFatalChance();\n\t\t\tdouble_t randomChance = uniform_random(0, 10000) / 100;\n\t\t\tif (fatalChance > 0 && randomChance < fatalChance) {\n\t\t\t\tdamage.fatal = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fe9ec8b871c837308f7e261afa3db124bd3dc8f34aede96ebdd8b48e323ae24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2187, + "startColumn": 46, + "charOffset": 71947, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 2185, + "startColumn": 46, + "charOffset": 71780, + "charLength": 5, + "snippet": { + "text": "\t\t playerWeapon != nullptr && playerWeapon->getTier() > 0) {\n\t\t\tdouble_t fatalChance = playerWeapon->getFatalChance();\n\t\t\tdouble_t randomChance = uniform_random(0, 10000) / 100;\n\t\t\tif (fatalChance > 0 && randomChance < fatalChance) {\n\t\t\t\tdamage.fatal = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f629047c33c137d0a11622b72d4c67c9d42c57c41583e9e1a243d15c76d3a3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2187, + "startColumn": 55, + "charOffset": 71956, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 2185, + "startColumn": 55, + "charOffset": 71780, + "charLength": 3, + "snippet": { + "text": "\t\t playerWeapon != nullptr && playerWeapon->getTier() > 0) {\n\t\t\tdouble_t fatalChance = playerWeapon->getFatalChance();\n\t\t\tdouble_t randomChance = uniform_random(0, 10000) / 100;\n\t\t\tif (fatalChance > 0 && randomChance < fatalChance) {\n\t\t\t\tdamage.fatal = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d56b5e942934176219f37cbb3abf4479723b8ca23e66a120516efb579606b17a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2188, + "startColumn": 22, + "charOffset": 71982, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 2186, + "startColumn": 22, + "charOffset": 71844, + "charLength": 1, + "snippet": { + "text": "\t\t\tdouble_t fatalChance = playerWeapon->getFatalChance();\n\t\t\tdouble_t randomChance = uniform_random(0, 10000) / 100;\n\t\t\tif (fatalChance > 0 && randomChance < fatalChance) {\n\t\t\t\tdamage.fatal = true;\n\t\t\t\tdamage.primary.value += static_cast(std::round(damage.primary.value * 0.6));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab2ca59f635714d5cd576d96cdc2d4bd8752af2bb2913ab585487c20219a80ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2190, + "startColumn": 61, + "charOffset": 72102, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 2188, + "startColumn": 61, + "charOffset": 71961, + "charLength": 6, + "snippet": { + "text": "\t\t\tif (fatalChance > 0 && randomChance < fatalChance) {\n\t\t\t\tdamage.fatal = true;\n\t\t\t\tdamage.primary.value += static_cast(std::round(damage.primary.value * 0.6));\n\t\t\t\tdamage.secondary.value += static_cast(std::round(damage.secondary.value * 0.6));\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee5b69c33edbca9caf497476ec48dd5e06bff731dd994f8a29751206a3b230c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2190, + "startColumn": 84, + "charOffset": 72125, + "charLength": 3, + "snippet": { + "text": "0.6" + } + }, + "contextRegion": { + "startLine": 2188, + "startColumn": 84, + "charOffset": 71961, + "charLength": 3, + "snippet": { + "text": "\t\t\tif (fatalChance > 0 && randomChance < fatalChance) {\n\t\t\t\tdamage.fatal = true;\n\t\t\t\tdamage.primary.value += static_cast(std::round(damage.primary.value * 0.6));\n\t\t\t\tdamage.secondary.value += static_cast(std::round(damage.secondary.value * 0.6));\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f92b3efb7393c32526e46143b303ff315e8058d564dcee400556632363f01ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2191, + "startColumn": 63, + "charOffset": 72194, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 2189, + "startColumn": 63, + "charOffset": 72017, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tdamage.fatal = true;\n\t\t\t\tdamage.primary.value += static_cast(std::round(damage.primary.value * 0.6));\n\t\t\t\tdamage.secondary.value += static_cast(std::round(damage.secondary.value * 0.6));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8102afba384af5f3f72898dc4d19a2426bbb5bb65c5a4f5c683c920ec9eedd5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2191, + "startColumn": 88, + "charOffset": 72219, + "charLength": 3, + "snippet": { + "text": "0.6" + } + }, + "contextRegion": { + "startLine": 2189, + "startColumn": 88, + "charOffset": 72017, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tdamage.fatal = true;\n\t\t\t\tdamage.primary.value += static_cast(std::round(damage.primary.value * 0.6));\n\t\t\t\tdamage.secondary.value += static_cast(std::round(damage.secondary.value * 0.6));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5783969cc2f916b049f475c5ebba1ed34f7c48c1dd0e689c0ea6ac3e393bc0f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2195, + "startColumn": 27, + "charOffset": 72284, + "charLength": 7, + "snippet": { + "text": "monster" + } + }, + "contextRegion": { + "startLine": 2193, + "startColumn": 27, + "charOffset": 72231, + "charLength": 7, + "snippet": { + "text": "\t\t}\n\t} else if (monster) {\n\t\tdamage.primary.value *= monster->getAttackMultiplier();\n\t\tdamage.secondary.value *= monster->getAttackMultiplier();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6e2ea9905dfede42d841fcc8c4f50b4f805f5ea176c55e9736ba47ce879eddb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.cpp" + }, + "region": { + "startLine": 2196, + "startColumn": 29, + "charOffset": 72344, + "charLength": 7, + "snippet": { + "text": "monster" + } + }, + "contextRegion": { + "startLine": 2194, + "startColumn": 29, + "charOffset": 72235, + "charLength": 7, + "snippet": { + "text": "\t} else if (monster) {\n\t\tdamage.primary.value *= monster->getAttackMultiplier();\n\t\tdamage.secondary.value *= monster->getAttackMultiplier();\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3dc2361183bc482b2210c9c7d2359e3e793434c1b4e6db262db52f4843a168e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'ChainCallback::onChainCombat' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.hpp", + "index": 1 + }, + "region": { + "startLine": 73, + "startColumn": 7, + "charOffset": 2083, + "charLength": 13, + "snippet": { + "text": "onChainCombat" + } + }, + "contextRegion": { + "startLine": 71, + "startColumn": 7, + "charOffset": 2067, + "charLength": 13, + "snippet": { + "text": "\nprivate:\n\tvoid onChainCombat(std::shared_ptr creature, uint8_t &chainTargets, uint8_t &chainDistance, bool &backtracking);\n\n\tuint8_t m_chainDistance = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "292ba891fa8cd19b5c81f6020a143c051b804803bc459872a4007bfcd3f4a715" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Combat::canTargetCreature' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.hpp", + "index": 1 + }, + "region": { + "startLine": 300, + "startColumn": 21, + "charOffset": 9074, + "charLength": 17, + "snippet": { + "text": "canTargetCreature" + } + }, + "contextRegion": { + "startLine": 298, + "startColumn": 21, + "charOffset": 8922, + "charLength": 17, + "snippet": { + "text": "\tstatic CombatType_t ConditionToDamageType(ConditionType_t type);\n\tstatic ConditionType_t DamageToConditionType(CombatType_t type);\n\tstatic ReturnValue canTargetCreature(std::shared_ptr attacker, std::shared_ptr target);\n\tstatic ReturnValue canDoCombat(std::shared_ptr caster, std::shared_ptr tile, bool aggressive);\n\tstatic ReturnValue canDoCombat(std::shared_ptr attacker, std::shared_ptr target, bool aggressive);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b15bf9294abd76f67e8b935d38941605fc29a38591ac0ad2a3b7e57e5db27295" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Combat::doChainEffect' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.hpp", + "index": 1 + }, + "region": { + "startLine": 352, + "startColumn": 14, + "charOffset": 11335, + "charLength": 13, + "snippet": { + "text": "doChainEffect" + } + }, + "contextRegion": { + "startLine": 350, + "startColumn": 14, + "charOffset": 11312, + "charLength": 13, + "snippet": { + "text": "\nprivate:\n\tstatic void doChainEffect(const Position &origin, const Position &pos, uint8_t effect);\n\tstatic std::vector>> pickChainTargets(std::shared_ptr caster, const CombatParams ¶ms, uint8_t chainDistance, uint8_t maxTargets, bool aggressive, bool backtracking, std::shared_ptr initialTarget = nullptr);\n\tstatic bool isValidChainTarget(std::shared_ptr caster, std::shared_ptr currentTarget, std::shared_ptr potentialTarget, const CombatParams ¶ms, bool aggressive);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3c56bd38401c8b7585e7783264efdc2ebe22461c2d3d85d63c8f3f492fce294" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Combat::pickChainTargets' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.hpp", + "index": 1 + }, + "region": { + "startLine": 353, + "startColumn": 65, + "charOffset": 11475, + "charLength": 16, + "snippet": { + "text": "pickChainTargets" + } + }, + "contextRegion": { + "startLine": 351, + "startColumn": 65, + "charOffset": 11313, + "charLength": 16, + "snippet": { + "text": "private:\n\tstatic void doChainEffect(const Position &origin, const Position &pos, uint8_t effect);\n\tstatic std::vector>> pickChainTargets(std::shared_ptr caster, const CombatParams ¶ms, uint8_t chainDistance, uint8_t maxTargets, bool aggressive, bool backtracking, std::shared_ptr initialTarget = nullptr);\n\tstatic bool isValidChainTarget(std::shared_ptr caster, std::shared_ptr currentTarget, std::shared_ptr potentialTarget, const CombatParams ¶ms, bool aggressive);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23e96d01b8a406682f04f125fc1f3d997d809704107609991061b0e0b22ac119" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Combat::CombatManaFunc' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/combat.hpp", + "index": 1 + }, + "region": { + "startLine": 366, + "startColumn": 14, + "charOffset": 13016, + "charLength": 14, + "snippet": { + "text": "CombatManaFunc" + } + }, + "contextRegion": { + "startLine": 364, + "startColumn": 14, + "charOffset": 12715, + "charLength": 14, + "snippet": { + "text": "\tstatic void CombatHealthFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data);\n\tstatic CombatDamage applyImbuementElementalDamage(std::shared_ptr attackerPlayer, std::shared_ptr item, CombatDamage damage);\n\tstatic void CombatManaFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* damage);\n\t/**\n\t * @brief Checks if a fear condition can be applied to a player." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "612d67b525c1902b565789c46c6ba5719a2cecfecfb4603c76946b9ef7514e47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 22, + "startColumn": 46, + "charOffset": 628, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 46, + "charOffset": 580, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Decay::startDecay(std::shared_ptr item) {\n\tif (!item) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ab9eaaccc0f87859f78f85133a423237c292744faa950e62b81e4f4d07aa028" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 23, + "startColumn": 6, + "charOffset": 641, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 21, + "startColumn": 6, + "charOffset": 582, + "charLength": 1, + "snippet": { + "text": "\nvoid Decay::startDecay(std::shared_ptr item) {\n\tif (!item) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf9209d444cbbf8b453df020947b617bd329619b5eae9028a303aa344983f5d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 50, + "startColumn": 14, + "charOffset": 1296, + "charLength": 12, + "snippet": { + "text": "g_dispatcher" + } + }, + "contextRegion": { + "startLine": 48, + "startColumn": 14, + "charOffset": 1210, + "charLength": 12, + "snippet": { + "text": "\t\tint64_t timestamp = OTSYS_TIME() + duration;\n\t\tif (decayMap.empty()) {\n\t\t\teventId = g_dispatcher().scheduleEvent(\n\t\t\t\tstd::max(SCHEDULER_MINTICKS, duration), [this] { checkDecay(); }, \"Decay::checkDecay\"\n\t\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a698eb6b0147057ecb210215d50736c398224fbcd6df26caa454d5f35e13f859" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'long' to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 51, + "startColumn": 43, + "charOffset": 1368, + "charLength": 8, + "snippet": { + "text": "duration" + } + }, + "contextRegion": { + "startLine": 49, + "startColumn": 43, + "charOffset": 1257, + "charLength": 8, + "snippet": { + "text": "\t\tif (decayMap.empty()) {\n\t\t\teventId = g_dispatcher().scheduleEvent(\n\t\t\t\tstd::max(SCHEDULER_MINTICKS, duration), [this] { checkDecay(); }, \"Decay::checkDecay\"\n\t\t\t);\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f02f4f6255e014ac85ca8d099535b2cdf3189a8b4e3c899c9a8e1d354dbab1c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 51, + "startColumn": 43, + "charOffset": 1368, + "charLength": 8, + "snippet": { + "text": "duration" + } + }, + "contextRegion": { + "startLine": 49, + "startColumn": 43, + "charOffset": 1257, + "charLength": 8, + "snippet": { + "text": "\t\tif (decayMap.empty()) {\n\t\t\teventId = g_dispatcher().scheduleEvent(\n\t\t\t\tstd::max(SCHEDULER_MINTICKS, duration), [this] { checkDecay(); }, \"Decay::checkDecay\"\n\t\t\t);\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc278a37d155a2313ed6a2eb3d35431f8549b4ad6c04c6d8e09526982e06073f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 56, + "startColumn": 15, + "charOffset": 1541, + "charLength": 12, + "snippet": { + "text": "g_dispatcher" + } + }, + "contextRegion": { + "startLine": 54, + "startColumn": 15, + "charOffset": 1442, + "charLength": 12, + "snippet": { + "text": "\t\t\tif (timestamp < decayMap.begin()->first) {\n\t\t\t\tg_dispatcher().stopEvent(eventId);\n\t\t\t\teventId = g_dispatcher().scheduleEvent(\n\t\t\t\t\tstd::max(SCHEDULER_MINTICKS, duration), [this] { checkDecay(); }, \"Decay::checkDecay\"\n\t\t\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54c4103faf3b5443f0f3bce5e8e82793961afef54d012e65ba8f21e66e7eaa31" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'long' to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 57, + "startColumn": 44, + "charOffset": 1614, + "charLength": 8, + "snippet": { + "text": "duration" + } + }, + "contextRegion": { + "startLine": 55, + "startColumn": 44, + "charOffset": 1488, + "charLength": 8, + "snippet": { + "text": "\t\t\t\tg_dispatcher().stopEvent(eventId);\n\t\t\t\teventId = g_dispatcher().scheduleEvent(\n\t\t\t\t\tstd::max(SCHEDULER_MINTICKS, duration), [this] { checkDecay(); }, \"Decay::checkDecay\"\n\t\t\t\t);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb16ddaf3b1961f22caf7d05f4d2376f681937c836df346729b10b05ce004ba7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 57, + "startColumn": 44, + "charOffset": 1614, + "charLength": 8, + "snippet": { + "text": "duration" + } + }, + "contextRegion": { + "startLine": 55, + "startColumn": 44, + "charOffset": 1488, + "charLength": 8, + "snippet": { + "text": "\t\t\t\tg_dispatcher().stopEvent(eventId);\n\t\t\t\teventId = g_dispatcher().scheduleEvent(\n\t\t\t\t\tstd::max(SCHEDULER_MINTICKS, duration), [this] { checkDecay(); }, \"Decay::checkDecay\"\n\t\t\t\t);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f503996df244b8864a258935d2d80c1ab9111a3d8c6e3925c581f6821e16dd9b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'stopDecay' has cognitive complexity of 37 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 68, + "startColumn": 13, + "charOffset": 1851, + "charLength": 9, + "snippet": { + "text": "stopDecay" + } + }, + "contextRegion": { + "startLine": 66, + "startColumn": 13, + "charOffset": 1836, + "charLength": 9, + "snippet": { + "text": "}\n\nvoid Decay::stopDecay(std::shared_ptr item) {\n\tif (item->hasAttribute(ItemAttribute_t::DECAYSTATE)) {\n\t\tauto timestamp = item->getAttribute(ItemAttribute_t::DURATION_TIMESTAMP);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f55dc9125011e0167b8dd127c582d1acc8599876858501ac5ecd0f60eff09514" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 68, + "startColumn": 45, + "charOffset": 1883, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 66, + "startColumn": 45, + "charOffset": 1836, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Decay::stopDecay(std::shared_ptr item) {\n\tif (item->hasAttribute(ItemAttribute_t::DECAYSTATE)) {\n\t\tauto timestamp = item->getAttribute(ItemAttribute_t::DURATION_TIMESTAMP);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "121fbe4c9ea556341f770d3449acac8801fcda147ade4af44540248fd263ca54" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 5, + "charOffset": 2207, + "charLength": 6, + "snippet": { + "text": "size_t" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 5, + "charOffset": 2167, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tauto &decayItems = it->second;\n\n\t\t\t\tsize_t i = 0, end = decayItems.size();\n\t\t\t\tauto decayItem = decayItems[i];\n\t\t\t\tif (end == 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85695a2cf65015453858621860c213f0d13244f5e096aceabdfbf51dd9f39b00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 5, + "charOffset": 2207, + "charLength": 6, + "snippet": { + "text": "size_t" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 5, + "charOffset": 2167, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tauto &decayItems = it->second;\n\n\t\t\t\tsize_t i = 0, end = decayItems.size();\n\t\t\t\tauto decayItem = decayItems[i];\n\t\t\t\tif (end == 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba13c32260496a42bfa76fc402dce17c8e8976a6fd123bfc63750f28fcfa15fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 86, + "startColumn": 16, + "charOffset": 2593, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 16, + "charOffset": 2519, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\t\titem->removeAttribute(ItemAttribute_t::DECAYSTATE);\n\n\t\t\t\t\t\tdecayMap.erase(it);\n\t\t\t\t\t}\n\t\t\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33cf980ac8e69542a115b39cd7741b8204d89f9d80415048eaf9e72c61f51efd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 90, + "startColumn": 5, + "charOffset": 2634, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 88, + "startColumn": 5, + "charOffset": 2611, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\twhile (i < end) {\n\t\t\t\t\tdecayItem = decayItems[i];\n\t\t\t\t\tif (item == decayItem) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f18dd9f2822143ba4ca6d968b1bfb96892bf8211cb3ccb643884558c87baad4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'end' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 90, + "startColumn": 12, + "charOffset": 2641, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 88, + "startColumn": 12, + "charOffset": 2611, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\twhile (i < end) {\n\t\t\t\t\tdecayItem = decayItems[i];\n\t\t\t\t\tif (item == decayItem) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac2472ccb402890c5c7f30a254b765bba25d7b94e16e6ef8e652505408d43d18" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "32 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 117, + "startColumn": 20, + "charOffset": 3340, + "charLength": 2, + "snippet": { + "text": "32" + } + }, + "contextRegion": { + "startLine": 115, + "startColumn": 20, + "charOffset": 3273, + "charLength": 2, + "snippet": { + "text": "\n\tstd::vector> tempItems;\n\ttempItems.reserve(32); // Small preallocation\n\n\tauto it = decayMap.begin(), end = decayMap.end();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d704c0aa9e9df661661cc05bc1e4f5798524d10a5c2aaf67143900bbea79d13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 119, + "startColumn": 2, + "charOffset": 3370, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 117, + "startColumn": 2, + "charOffset": 3321, + "charLength": 4, + "snippet": { + "text": "\ttempItems.reserve(32); // Small preallocation\n\n\tauto it = decayMap.begin(), end = decayMap.end();\n\twhile (it != end) {\n\t\tif (it->first > timestamp) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5708158089e20fffffb4935f3fdab19010256fa1212427d84568c5e7ffa7eae8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 119, + "startColumn": 2, + "charOffset": 3370, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 117, + "startColumn": 2, + "charOffset": 3321, + "charLength": 4, + "snippet": { + "text": "\ttempItems.reserve(32); // Small preallocation\n\n\tauto it = decayMap.begin(), end = decayMap.end();\n\twhile (it != end) {\n\t\tif (it->first > timestamp) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff6dccaba36d9265e22ef343ce86afcaa8a310cb24e4f25b762cdbaa2b1e0472" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 120, + "startColumn": 9, + "charOffset": 3428, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 9, + "charOffset": 3368, + "charLength": 2, + "snippet": { + "text": "\n\tauto it = decayMap.begin(), end = decayMap.end();\n\twhile (it != end) {\n\t\tif (it->first > timestamp) {\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d117094acc9af390b1ffa8688f40112891e346ee825746c388237e0beed02c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 128, + "startColumn": 3, + "charOffset": 3657, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 126, + "startColumn": 3, + "charOffset": 3563, + "charLength": 3, + "snippet": { + "text": "\t\tauto &decayItems = it->second;\n\t\ttempItems.reserve(tempItems.size() + decayItems.size());\n\t\tfor (auto &decayItem : decayItems) {\n\t\t\ttempItems.push_back(decayItem);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c77e47bf188ebe7e17dbaf4f3e0a819dec59b7564011079489c3605ae7fb6a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 2, + "charOffset": 3765, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 2, + "charOffset": 3760, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &item : tempItems) {\n\t\tif (!item->canDecay()) {\n\t\t\titem->setDuration(item->getDuration());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71527c77eaf4333f4696a156dcc1b04085f86afd983803c653cffc00157ba227" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 145, + "startColumn": 13, + "charOffset": 4025, + "charLength": 12, + "snippet": { + "text": "g_dispatcher" + } + }, + "contextRegion": { + "startLine": 143, + "startColumn": 13, + "charOffset": 3994, + "charLength": 12, + "snippet": { + "text": "\n\tif (it != end) {\n\t\teventId = g_dispatcher().scheduleEvent(\n\t\t\tstd::max(SCHEDULER_MINTICKS, static_cast(it->first - timestamp)), [this] { checkDecay(); }, \"Decay::checkDecay\"\n\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "365782d990726ff873cf23129642a1ac97829702451b8005c40e35afe4c31e20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'internalDecayItem' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 151, + "startColumn": 13, + "charOffset": 4211, + "charLength": 17, + "snippet": { + "text": "internalDecayItem" + } + }, + "contextRegion": { + "startLine": 149, + "startColumn": 13, + "charOffset": 4196, + "charLength": 17, + "snippet": { + "text": "}\n\nvoid Decay::internalDecayItem(std::shared_ptr item) {\n\tconst ItemType &it = Item::items[item->getID()];\n\t// Remove the item and halt the decay process if a player triggers a bug where the item's decay ID matches its equip or de-equip transformation ID" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4dc43e7bf0bccf2a9949e22aac8c3b357d2dbf46c4d521c6b8d78074844bb82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'internalDecayItem' has cognitive complexity of 41 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 151, + "startColumn": 13, + "charOffset": 4211, + "charLength": 17, + "snippet": { + "text": "internalDecayItem" + } + }, + "contextRegion": { + "startLine": 149, + "startColumn": 13, + "charOffset": 4196, + "charLength": 17, + "snippet": { + "text": "}\n\nvoid Decay::internalDecayItem(std::shared_ptr item) {\n\tconst ItemType &it = Item::items[item->getID()];\n\t// Remove the item and halt the decay process if a player triggers a bug where the item's decay ID matches its equip or de-equip transformation ID" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5cf209956ea4cd67afd55a49de582fcb7d9c974ac827d5e424d7daf184caa21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 151, + "startColumn": 53, + "charOffset": 4251, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 149, + "startColumn": 53, + "charOffset": 4196, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Decay::internalDecayItem(std::shared_ptr item) {\n\tconst ItemType &it = Item::items[item->getID()];\n\t// Remove the item and halt the decay process if a player triggers a bug where the item's decay ID matches its equip or de-equip transformation ID" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d6b7570707ec6a03aa1d11e800760921509dc8e9dfa74eb1fc84cfb9f2c81ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 155, + "startColumn": 12, + "charOffset": 4539, + "charLength": 18, + "snippet": { + "text": "internalRemoveItem" + } + }, + "contextRegion": { + "startLine": 153, + "startColumn": 12, + "charOffset": 4309, + "charLength": 18, + "snippet": { + "text": "\t// Remove the item and halt the decay process if a player triggers a bug where the item's decay ID matches its equip or de-equip transformation ID\n\tif (it.id == it.transformEquipTo || it.id == it.transformDeEquipTo) {\n\t\tg_game().internalRemoveItem(item);\n\t\tauto player = item->getHoldingPlayer();\n\t\tif (player) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0435a55deb2748e3a247dcc769d4d9e0c576085bd656eefc86ae5c1816e7de6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 169, + "startColumn": 4, + "charOffset": 5074, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 167, + "startColumn": 4, + "charOffset": 5021, + "charLength": 3, + "snippet": { + "text": "\t\tif (player) {\n\t\t\tbool needUpdateSkills = false;\n\t\t\tfor (int32_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\n\t\t\t\tif (it.abilities && item->getSkill(static_cast(i)) != 0) {\n\t\t\t\t\tneedUpdateSkills = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c63a176deaec860e83be2fcb0927346cfba5663d05eda9849e88fba0f8f55d2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 181, + "startColumn": 4, + "charOffset": 5433, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 179, + "startColumn": 4, + "charOffset": 5396, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tbool needUpdateStats = false;\n\t\t\tfor (int32_t s = STAT_FIRST; s <= STAT_LAST; ++s) {\n\t\t\t\tif (item->getStat(static_cast(s)) != 0) {\n\t\t\t\t\tneedUpdateStats = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31b5ed074e1fe18beaf6d92229e4435bc99bf51a6dceef35a5e012c1b2d7667e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 187, + "startColumn": 25, + "charOffset": 5721, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 185, + "startColumn": 25, + "charOffset": 5599, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tplayer->setVarStats(static_cast(s), -item->getStat(static_cast(s)));\n\t\t\t\t}\n\t\t\t\tif (it.abilities && it.abilities->statsPercent[s] != 0) {\n\t\t\t\t\tneedUpdateStats = true;\n\t\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47909f722cfa7d34d3c3d328062c1a56f59a7a0938159b00c944c70a622b428d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 189, + "startColumn": 73, + "charOffset": 5860, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 187, + "startColumn": 73, + "charOffset": 5697, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tif (it.abilities && it.abilities->statsPercent[s] != 0) {\n\t\t\t\t\tneedUpdateStats = true;\n\t\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4110d7ab0d92df5d45e4bc4712d2c32bb6f2805d06dc97158cf1f4ea11ec4a13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 189, + "startColumn": 73, + "charOffset": 5860, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 187, + "startColumn": 73, + "charOffset": 5697, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tif (it.abilities && it.abilities->statsPercent[s] != 0) {\n\t\t\t\t\tneedUpdateStats = true;\n\t\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "319f02d9b3e9027a3fa7a5f2a09c6504d2d33e6aacb7341d72f5441ff294ef8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 189, + "startColumn": 125, + "charOffset": 5912, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 187, + "startColumn": 125, + "charOffset": 5697, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tif (it.abilities && it.abilities->statsPercent[s] != 0) {\n\t\t\t\t\tneedUpdateStats = true;\n\t\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b0d488012a3b9df17afd9af6cf1dbaf7e47902301b3b37f51a63590ca146e61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 189, + "startColumn": 125, + "charOffset": 5912, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 187, + "startColumn": 125, + "charOffset": 5697, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tif (it.abilities && it.abilities->statsPercent[s] != 0) {\n\t\t\t\t\tneedUpdateStats = true;\n\t\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3da0c569a4321ac120f2062594cde4a2ecfd187f6142d0550fcdeadb9246f9c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 189, + "startColumn": 126, + "charOffset": 5913, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 187, + "startColumn": 126, + "charOffset": 5697, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tif (it.abilities && it.abilities->statsPercent[s] != 0) {\n\t\t\t\t\tneedUpdateStats = true;\n\t\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bea768d9e28c83c662ccf5d3559506b981841d608dac9426ece4231c37e482b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 189, + "startColumn": 158, + "charOffset": 5945, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 187, + "startColumn": 158, + "charOffset": 5697, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tif (it.abilities && it.abilities->statsPercent[s] != 0) {\n\t\t\t\t\tneedUpdateStats = true;\n\t\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ed6822e6b4c1f81e63f397c2a96064bb3ef91513f17aaaea2c065d6e81f01c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 189, + "startColumn": 165, + "charOffset": 5952, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 187, + "startColumn": 165, + "charOffset": 5697, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tif (it.abilities && it.abilities->statsPercent[s] != 0) {\n\t\t\t\t\tneedUpdateStats = true;\n\t\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ec2a0f4c2975154b268321adadd7648e61e85436328a20b02a343756553ea50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 189, + "startColumn": 165, + "charOffset": 5952, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 187, + "startColumn": 165, + "charOffset": 5697, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tif (it.abilities && it.abilities->statsPercent[s] != 0) {\n\t\t\t\t\tneedUpdateStats = true;\n\t\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "887e9ed75b136ada12387b1813d25005739a0bed8be0e503b16ddf9eb44a0dd4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/decay/decay.cpp" + }, + "region": { + "startLine": 201, + "startColumn": 12, + "charOffset": 6104, + "charLength": 13, + "snippet": { + "text": "transformItem" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 12, + "charOffset": 6084, + "charLength": 13, + "snippet": { + "text": "\t\t\t}\n\t\t}\n\t\tg_game().transformItem(item, static_cast(it.decayTo));\n\t} else {\n\t\tif (item->isLoadedFromMap()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75fc29588b596de47e0ff1c64cb81cff6d0609b8519214935d3d00ca5d2d6777" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-macro-to-enum", + "ruleIndex": 492, + "kind": "fail", + "level": "warning", + "message": { + "text": "replace macro with enum" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 1, + "charOffset": 869, + "charLength": 1, + "snippet": { + "text": "#" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 1, + "charOffset": 829, + "charLength": 1, + "snippet": { + "text": "#include \"creatures/combat/spells.hpp\"\n\n#define ITEM_IMBUEMENT_SLOT 500\n\nItems Item::items;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31acf80e2904cece34f0aff4deeeb0377cfc75c9b1ebbee3efa439aba6e9c2c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-macro-to-enum", + "ruleIndex": 492, + "kind": "fail", + "level": "warning", + "message": { + "text": "macro 'ITEM_IMBUEMENT_SLOT' defines an integral constant; prefer an enum instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 9, + "charOffset": 877, + "charLength": 19, + "snippet": { + "text": "ITEM_IMBUEMENT_SLOT" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 9, + "charOffset": 829, + "charLength": 19, + "snippet": { + "text": "#include \"creatures/combat/spells.hpp\"\n\n#define ITEM_IMBUEMENT_SLOT 500\n\nItems Item::items;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd745ce8a79624bd1b72dbe2eac4c78644ede88b1538c7357de56270eccb20be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-macro-usage", + "ruleIndex": 493, + "kind": "fail", + "level": "warning", + "message": { + "text": "macro 'ITEM_IMBUEMENT_SLOT' used to declare a constant; consider using a 'constexpr' constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 9, + "charOffset": 877, + "charLength": 19, + "snippet": { + "text": "ITEM_IMBUEMENT_SLOT" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 9, + "charOffset": 829, + "charLength": 19, + "snippet": { + "text": "#include \"creatures/combat/spells.hpp\"\n\n#define ITEM_IMBUEMENT_SLOT 500\n\nItems Item::items;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80dca9d6fc738f5dbcb68238a31760346cd15ce1e5026988f69173c6ac6a678b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 1, + "charOffset": 902, + "charLength": 5, + "snippet": { + "text": "Items" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 1, + "charOffset": 869, + "charLength": 5, + "snippet": { + "text": "#define ITEM_IMBUEMENT_SLOT 500\n\nItems Item::items;\n\nstd::shared_ptr Item::CreateItem(const uint16_t type, uint16_t count /*= 0*/, Position* itemPosition /*= nullptr*/) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c986fd493d91f73306c7ff9c080fdc8e1fa8281824cd64b7677b232c1c76b054" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'items' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 13, + "charOffset": 914, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 13, + "charOffset": 869, + "charLength": 5, + "snippet": { + "text": "#define ITEM_IMBUEMENT_SLOT 500\n\nItems Item::items;\n\nstd::shared_ptr Item::CreateItem(const uint16_t type, uint16_t count /*= 0*/, Position* itemPosition /*= nullptr*/) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56b5777d9f43a0643a2eb1ce5a486a5126df551092954bf57d27024fefc34e9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 79, + "startColumn": 13, + "charOffset": 2902, + "charLength": 4, + "snippet": { + "text": "type" + } + }, + "contextRegion": { + "startLine": 77, + "startColumn": 13, + "charOffset": 2881, + "charLength": 4, + "snippet": { + "text": "\t\t\t}\n\t\t}\n\t} else if (type > 0 && itemPosition) {\n\t\tauto position = *itemPosition;\n\t\tg_logger().warn(\"[Item::CreateItem] Item with id '{}', in position '{}' not exists in the appearances.dat and cannot be created.\", type, position.toString());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff91364d635e6865801dba90f8785b94018092698cef7bdf555be449630015d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 79, + "startColumn": 22, + "charOffset": 2911, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 77, + "startColumn": 22, + "charOffset": 2881, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\t\t}\n\t} else if (type > 0 && itemPosition) {\n\t\tauto position = *itemPosition;\n\t\tg_logger().warn(\"[Item::CreateItem] Item with id '{}', in position '{}' not exists in the appearances.dat and cannot be created.\", type, position.toString());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67235c7d93f8931e6df8b0bc5345eb4c3f2d383eb64e6c208752201bbae661d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'Position *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 79, + "startColumn": 25, + "charOffset": 2914, + "charLength": 12, + "snippet": { + "text": "itemPosition" + } + }, + "contextRegion": { + "startLine": 77, + "startColumn": 25, + "charOffset": 2881, + "charLength": 12, + "snippet": { + "text": "\t\t\t}\n\t\t}\n\t} else if (type > 0 && itemPosition) {\n\t\tauto position = *itemPosition;\n\t\tg_logger().warn(\"[Item::CreateItem] Item with id '{}', in position '{}' not exists in the appearances.dat and cannot be created.\", type, position.toString());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34f8915a0e5518e2a68f5b4e358ce164ce2d936a2b434c8e3af2315b2815b98c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 14, + "charOffset": 3457, + "charLength": 9, + "snippet": { + "text": "attribute" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 14, + "charOffset": 3264, + "charLength": 9, + "snippet": { + "text": "bool Item::getImbuementInfo(uint8_t slot, ImbuementInfo* imbuementInfo) const {\n\tconst CustomAttribute* attribute = getCustomAttribute(std::to_string(ITEM_IMBUEMENT_SLOT + slot));\n\tauto info = attribute ? attribute->getAttribute() : 0;\n\timbuementInfo->imbuement = g_imbuements().getImbuement(info & 0xFF);\n\timbuementInfo->duration = info >> 8;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a46783cc0ae10f359f2757c80dd380624c26eeaeff600ffba54a7410a9fcee38" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 14, + "charOffset": 3457, + "charLength": 9, + "snippet": { + "text": "attribute" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 14, + "charOffset": 3264, + "charLength": 9, + "snippet": { + "text": "bool Item::getImbuementInfo(uint8_t slot, ImbuementInfo* imbuementInfo) const {\n\tconst CustomAttribute* attribute = getCustomAttribute(std::to_string(ITEM_IMBUEMENT_SLOT + slot));\n\tauto info = attribute ? attribute->getAttribute() : 0;\n\timbuementInfo->imbuement = g_imbuements().getImbuement(info & 0xFF);\n\timbuementInfo->duration = info >> 8;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "307c0acfdec8015a678219db6fa1a1473d66d7a2f536bb748cef11dac0968042" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 92, + "startColumn": 57, + "charOffset": 3566, + "charLength": 4, + "snippet": { + "text": "info" + } + }, + "contextRegion": { + "startLine": 90, + "startColumn": 57, + "charOffset": 3344, + "charLength": 4, + "snippet": { + "text": "\tconst CustomAttribute* attribute = getCustomAttribute(std::to_string(ITEM_IMBUEMENT_SLOT + slot));\n\tauto info = attribute ? attribute->getAttribute() : 0;\n\timbuementInfo->imbuement = g_imbuements().getImbuement(info & 0xFF);\n\timbuementInfo->duration = info >> 8;\n\treturn imbuementInfo->duration && imbuementInfo->imbuement;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83b317dae7fa8c4a970d74d48ac3fca1fdb650c0fd1a94ab956374c59fd06eca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 92, + "startColumn": 64, + "charOffset": 3573, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 90, + "startColumn": 64, + "charOffset": 3344, + "charLength": 4, + "snippet": { + "text": "\tconst CustomAttribute* attribute = getCustomAttribute(std::to_string(ITEM_IMBUEMENT_SLOT + slot));\n\tauto info = attribute ? attribute->getAttribute() : 0;\n\timbuementInfo->imbuement = g_imbuements().getImbuement(info & 0xFF);\n\timbuementInfo->duration = info >> 8;\n\treturn imbuementInfo->duration && imbuementInfo->imbuement;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9359ab62e7987433465e001ffa6c74e35df35a6d2d1b0db46b0c9c1a9c31501d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 92, + "startColumn": 64, + "charOffset": 3573, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 90, + "startColumn": 64, + "charOffset": 3344, + "charLength": 4, + "snippet": { + "text": "\tconst CustomAttribute* attribute = getCustomAttribute(std::to_string(ITEM_IMBUEMENT_SLOT + slot));\n\tauto info = attribute ? attribute->getAttribute() : 0;\n\timbuementInfo->imbuement = g_imbuements().getImbuement(info & 0xFF);\n\timbuementInfo->duration = info >> 8;\n\treturn imbuementInfo->duration && imbuementInfo->imbuement;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d6dac5029ff507c657a3226fe17a724d39c20a2aa9bd7492a3f96172ee382e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 92, + "startColumn": 64, + "charOffset": 3573, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 90, + "startColumn": 64, + "charOffset": 3344, + "charLength": 4, + "snippet": { + "text": "\tconst CustomAttribute* attribute = getCustomAttribute(std::to_string(ITEM_IMBUEMENT_SLOT + slot));\n\tauto info = attribute ? attribute->getAttribute() : 0;\n\timbuementInfo->imbuement = g_imbuements().getImbuement(info & 0xFF);\n\timbuementInfo->duration = info >> 8;\n\treturn imbuementInfo->duration && imbuementInfo->imbuement;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1da33f01a9b0350bf1d5dbacfa822d3e82cbbf28a96abf3f3e1ce00446e5eb5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 93, + "startColumn": 36, + "charOffset": 3615, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 91, + "startColumn": 36, + "charOffset": 3444, + "charLength": 1, + "snippet": { + "text": "\tauto info = attribute ? attribute->getAttribute() : 0;\n\timbuementInfo->imbuement = g_imbuements().getImbuement(info & 0xFF);\n\timbuementInfo->duration = info >> 8;\n\treturn imbuementInfo->duration && imbuementInfo->imbuement;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5082f0cbc6af6c993a88fb8af3a98049be66a27d29190b4a8c63afdf7eb36245" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 93, + "startColumn": 36, + "charOffset": 3615, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 91, + "startColumn": 36, + "charOffset": 3444, + "charLength": 1, + "snippet": { + "text": "\tauto info = attribute ? attribute->getAttribute() : 0;\n\timbuementInfo->imbuement = g_imbuements().getImbuement(info & 0xFF);\n\timbuementInfo->duration = info >> 8;\n\treturn imbuementInfo->duration && imbuementInfo->imbuement;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe30f6384b0191172d4b1ea83d1ed20dc977d4f63d03d54f480809c90d8742e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 94, + "startColumn": 9, + "charOffset": 3626, + "charLength": 13, + "snippet": { + "text": "imbuementInfo" + } + }, + "contextRegion": { + "startLine": 92, + "startColumn": 9, + "charOffset": 3510, + "charLength": 13, + "snippet": { + "text": "\timbuementInfo->imbuement = g_imbuements().getImbuement(info & 0xFF);\n\timbuementInfo->duration = info >> 8;\n\treturn imbuementInfo->duration && imbuementInfo->imbuement;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "536f3c63b1dad85267523c64de1d369e0a8f04571043a24e6e77cb04bee0790f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 94, + "startColumn": 9, + "charOffset": 3626, + "charLength": 13, + "snippet": { + "text": "imbuementInfo" + } + }, + "contextRegion": { + "startLine": 92, + "startColumn": 9, + "charOffset": 3510, + "charLength": 13, + "snippet": { + "text": "\timbuementInfo->imbuement = g_imbuements().getImbuement(info & 0xFF);\n\timbuementInfo->duration = info >> 8;\n\treturn imbuementInfo->duration && imbuementInfo->imbuement;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d134a8641c74e663a45f4b68cfdf9aa9347c9c8a9c3104ad4ecd49d58960c486" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'Imbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 94, + "startColumn": 36, + "charOffset": 3653, + "charLength": 13, + "snippet": { + "text": "imbuementInfo" + } + }, + "contextRegion": { + "startLine": 92, + "startColumn": 36, + "charOffset": 3510, + "charLength": 13, + "snippet": { + "text": "\timbuementInfo->imbuement = g_imbuements().getImbuement(info & 0xFF);\n\timbuementInfo->duration = info >> 8;\n\treturn imbuementInfo->duration && imbuementInfo->imbuement;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e73c80bf86eee26766cc50daf9676dcb54e62c4cd2ecc57ca6cccbee2a2f19b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'setImbuement' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 97, + "startColumn": 25, + "charOffset": 3706, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 95, + "startColumn": 25, + "charOffset": 3679, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid Item::setImbuement(uint8_t slot, uint16_t imbuementId, uint32_t duration) {\n\tauto valueDuration = (static_cast(duration > 0 ? (duration << 8) | imbuementId : 0));\n\tsetCustomAttribute(std::to_string(ITEM_IMBUEMENT_SLOT + slot), valueDuration);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "759b4e729ab265ea09ce097a346274eb4981f261cbc1f7711152a0f052d84017" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 73, + "charOffset": 3835, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 73, + "charOffset": 3681, + "charLength": 1, + "snippet": { + "text": "\nvoid Item::setImbuement(uint8_t slot, uint16_t imbuementId, uint32_t duration) {\n\tauto valueDuration = (static_cast(duration > 0 ? (duration << 8) | imbuementId : 0));\n\tsetCustomAttribute(std::to_string(ITEM_IMBUEMENT_SLOT + slot), valueDuration);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87a17650e23e152e40caf34bee81847d55137b29da03ab8e2973a662a473a73a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 73, + "charOffset": 3835, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 73, + "charOffset": 3681, + "charLength": 1, + "snippet": { + "text": "\nvoid Item::setImbuement(uint8_t slot, uint16_t imbuementId, uint32_t duration) {\n\tauto valueDuration = (static_cast(duration > 0 ? (duration << 8) | imbuementId : 0));\n\tsetCustomAttribute(std::to_string(ITEM_IMBUEMENT_SLOT + slot), valueDuration);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e9984a66546c58a02b48e4adc29c3edde1e15beab98cbe0a182e33063a2f26f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 104, + "startColumn": 6, + "charOffset": 4082, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 102, + "startColumn": 6, + "charOffset": 3942, + "charLength": 1, + "snippet": { + "text": "void Item::addImbuement(uint8_t slot, uint16_t imbuementId, uint32_t duration) {\n\tstd::shared_ptr player = getHoldingPlayer();\n\tif (!player) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c85a97bb2fbb199de540be1f6b3ebbcf21ad7d40dc1c35786d77c22b9693286b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 110, + "startColumn": 6, + "charOffset": 4212, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 108, + "startColumn": 6, + "charOffset": 4107, + "charLength": 1, + "snippet": { + "text": "\t// Get imbuement by the id\n\tconst Imbuement* imbuement = g_imbuements().getImbuement(imbuementId);\n\tif (!imbuement) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24c152e88e8e148f13defdf520c4265f6622a073dc4f455a4e92911b48f0b623" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const Imbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 110, + "startColumn": 7, + "charOffset": 4213, + "charLength": 9, + "snippet": { + "text": "imbuement" + } + }, + "contextRegion": { + "startLine": 108, + "startColumn": 7, + "charOffset": 4107, + "charLength": 9, + "snippet": { + "text": "\t// Get imbuement by the id\n\tconst Imbuement* imbuement = g_imbuements().getImbuement(imbuementId);\n\tif (!imbuement) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a14bce931576a3986768dbad62f64d606df16bcfed8eb241150db8a56772bce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 131, + "startColumn": 2, + "charOffset": 5043, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 129, + "startColumn": 2, + "charOffset": 4978, + "charLength": 3, + "snippet": { + "text": "\nbool Item::hasImbuementCategoryId(uint16_t categoryId) const {\n\tfor (uint8_t slotid = 0; slotid < getImbuementSlot(); slotid++) {\n\t\tImbuementInfo imbuementInfo;\n\t\tif (getImbuementInfo(slotid, &imbuementInfo)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8eb70b6262607bd5196a8a1831f9d1138ef931786564576538b014bfea4be668" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-12-1-3", + "ruleIndex": 400, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 12-1-3: All constructors that are callable with a single argument of fundamental type shall be declared explicit" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 197, + "startColumn": 7, + "charOffset": 6594, + "charLength": 4, + "snippet": { + "text": "Item" + } + }, + "contextRegion": { + "startLine": 195, + "startColumn": 7, + "charOffset": 6585, + "charLength": 4, + "snippet": { + "text": "}\n\nItem::Item(const uint16_t itemId, uint16_t itemCount /*= 0*/) :\n\tid(itemId) {\n\tconst ItemType &it = items[id];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25744adcbc8a343960e91ed6bc828698a0e3b5dc01b5f975cc5cee8720f7d342" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 201, + "startColumn": 2, + "charOffset": 6732, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 2, + "charOffset": 6666, + "charLength": 2, + "snippet": { + "text": "\tconst ItemType &it = items[id];\n\tauto itemCharges = it.charges;\n\tif (it.isFluidContainer() || it.isSplash()) {\n\t\tauto fluidType = std::clamp(itemCount, 1, FLUID_INK);\n\t\tsetAttribute(ItemAttribute_t::FLUIDTYPE, fluidType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd2ee3b299788531f40e8a009a29f66cb90252a20c69089cce0749d4229d75f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 205, + "startColumn": 3, + "charOffset": 6929, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 203, + "startColumn": 3, + "charOffset": 6844, + "charLength": 2, + "snippet": { + "text": "\t\tsetAttribute(ItemAttribute_t::FLUIDTYPE, fluidType);\n\t} else if (it.stackable) {\n\t\tif (itemCount != 0) {\n\t\t\tsetItemCount(static_cast(itemCount));\n\t\t} else if (itemCharges != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9152983ac6c471005bf88cdac9def2801595a22f8cafa90d6110dba88510e724" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-redundant-member-init", + "ruleIndex": 721, + "kind": "fail", + "level": "warning", + "message": { + "text": "initializer for base class 'Thing' is redundant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 222, + "startColumn": 2, + "charOffset": 7345, + "charLength": 5, + "snippet": { + "text": "Thing" + } + }, + "contextRegion": { + "startLine": 220, + "startColumn": 2, + "charOffset": 7298, + "charLength": 5, + "snippet": { + "text": "\nItem::Item(const std::shared_ptr &i) :\n\tThing(), id(i->id), count(i->count), loadedFromMap(i->loadedFromMap) {\n\tif (i->attributePtr) {\n\t\tattributePtr = std::make_unique(*i->attributePtr);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7443d3fd2a6abc2ab5ed6fb1b09ecb06c7a7e654549ace2c16775dffd7cded2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'compareItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 41, + "charOffset": 7874, + "charLength": 11, + "snippet": { + "text": "compareItem" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 41, + "charOffset": 7831, + "charLength": 11, + "snippet": { + "text": "}\n\nbool Item::equals(std::shared_ptr compareItem) const {\n\tif (!compareItem) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7da4a781ec8c083e5bd0bf672ccb912aa8b0add8ed5907cb09b1b39331b6c18" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 243, + "startColumn": 6, + "charOffset": 7900, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 6, + "charOffset": 7833, + "charLength": 1, + "snippet": { + "text": "\nbool Item::equals(std::shared_ptr compareItem) const {\n\tif (!compareItem) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "138e4f4cc138f53ab9f31071b01c9ca93a267e72fb88d86d808cfe0a8b2bc1ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 264, + "startColumn": 3, + "charOffset": 8266, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 262, + "startColumn": 3, + "charOffset": 8259, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfor (const auto &compareAttribute : compareItem->getAttributeVector()) {\n\t\t\tif (attribute.getAttributeType() != compareAttribute.getAttributeType()) {\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4dac7e54ff42a208bb869f68a6e6d4dfc131b14c6702527540095c2bce554a9a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 310, + "startColumn": 40, + "charOffset": 9430, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 308, + "startColumn": 40, + "charOffset": 9348, + "charLength": 4, + "snippet": { + "text": "\n\tconst ItemType &it = Item::items[newid];\n\tuint32_t newDuration = it.decayTime * 1000;\n\n\tif (newDuration == 0 && !it.stopTime && it.decayTo < 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb4c72e98b546374136f8207cc7cc81a466587c34991ffb7642e687b418ed895" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 326, + "startColumn": 15, + "charOffset": 9942, + "charLength": 11, + "snippet": { + "text": "newDuration" + } + }, + "contextRegion": { + "startLine": 324, + "startColumn": 15, + "charOffset": 9805, + "charLength": 11, + "snippet": { + "text": "\tif (newDuration > 0 && (!prevIt.stopTime || !hasAttribute(ItemAttribute_t::DURATION))) {\n\t\tsetDecaying(DECAYING_PENDING);\n\t\tsetDuration(newDuration);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d0aed10661fa53de716a9b8301fb713700e33c8b10b21f11f1302f89184cf2a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 347, + "startColumn": 6, + "charOffset": 10565, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 345, + "startColumn": 6, + "charOffset": 10420, + "charLength": 1, + "snippet": { + "text": "\tstd::shared_ptr aux = getParent();\n\tstd::shared_ptr prevaux = std::dynamic_pointer_cast(shared_from_this());\n\tif (!aux) {\n\t\treturn prevaux;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85fccc30f6d99ba065efe4983178b7b4e940818fe06f841dc3210991742c78f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 351, + "startColumn": 2, + "charOffset": 10596, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 349, + "startColumn": 2, + "charOffset": 10591, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\twhile (aux && aux->getParent() != nullptr) {\n\t\tprevaux = aux;\n\t\taux = aux->getParent();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f872803acfed04acd42c97abfbbd9be1241744e09b9c34ddf56962b6133de093" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 373, + "startColumn": 2, + "charOffset": 11062, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 371, + "startColumn": 2, + "charOffset": 10992, + "charLength": 2, + "snippet": { + "text": "uint16_t Item::getSubType() const {\n\tconst ItemType &it = items[id];\n\tif (it.isFluidContainer() || it.isSplash()) {\n\t\treturn getAttribute(ItemAttribute_t::FLUIDTYPE);\n\t} else if (it.stackable) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e623227084a3443f53ed98a9a3e118ea420d0187a3cf8807d557b54416499d8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 375, + "startColumn": 4, + "charOffset": 11172, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 373, + "startColumn": 4, + "charOffset": 11061, + "charLength": 4, + "snippet": { + "text": "\tif (it.isFluidContainer() || it.isSplash()) {\n\t\treturn getAttribute(ItemAttribute_t::FLUIDTYPE);\n\t} else if (it.stackable) {\n\t\treturn count;\n\t} else if (it.charges != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1988758ac354767c5e6ae055582950c0b1dbe0c64d7789cd316967e4f3f7a08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 385, + "startColumn": 2, + "charOffset": 11443, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 383, + "startColumn": 2, + "charOffset": 11347, + "charLength": 5, + "snippet": { + "text": "std::shared_ptr Item::getHoldingPlayer() {\n\tstd::shared_ptr p = getParent();\n\twhile (p) {\n\t\tif (p->getCreature()) {\n\t\t\treturn p->getCreature()->getPlayer();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8eb70b6262607bd5196a8a1831f9d1138ef931786564576538b014bfea4be668" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-nullptr", + "ruleIndex": 577, + "kind": "fail", + "level": "warning", + "message": { + "text": "use nullptr" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 399, + "startColumn": 61, + "charOffset": 11723, + "charLength": 4, + "snippet": { + "text": "NULL" + } + }, + "contextRegion": { + "startLine": 397, + "startColumn": 61, + "charOffset": 11644, + "charLength": 4, + "snippet": { + "text": "\t\treturn false;\n\t}\n\tauto isContainerAndHasSomethingInside = (getContainer() != NULL) && (getContainer()->getItemList().size() > 0);\n\treturn (isStowable() || isContainerAndHasSomethingInside);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1050dd321daa7b5ce18953abc2d80a77f0afa816bbb6ef11a71accf3b8461dad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-container-size-empty", + "ruleIndex": 695, + "kind": "fail", + "level": "warning", + "message": { + "text": "the 'empty' method should be used to check for emptiness instead of 'size'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 399, + "startColumn": 71, + "charOffset": 11733, + "charLength": 12, + "snippet": { + "text": "getContainer" + } + }, + "contextRegion": { + "startLine": 397, + "startColumn": 71, + "charOffset": 11644, + "charLength": 12, + "snippet": { + "text": "\t\treturn false;\n\t}\n\tauto isContainerAndHasSomethingInside = (getContainer() != NULL) && (getContainer()->getItemList().size() > 0);\n\treturn (isStowable() || isContainerAndHasSomethingInside);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de3bbca46e54c9ec35d6b7df2119b16e0924c3e106b6c1d652a2678bb1c62075" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 407, + "startColumn": 27, + "charOffset": 12028, + "charLength": 1, + "snippet": { + "text": "{" + } + }, + "contextRegion": { + "startLine": 405, + "startColumn": 27, + "charOffset": 11908, + "charLength": 1, + "snippet": { + "text": "\tif (it.isFluidContainer() || it.isSplash()) {\n\t\tsetAttribute(ItemAttribute_t::FLUIDTYPE, n);\n\t} else if (it.stackable) {\n\t\tsetItemCount(n);\n\t} else if (it.charges != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "561bd046cc65fa5c4179b98a6e596ab9a3c4abec43aef25834f311ac6ed973b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 408, + "startColumn": 16, + "charOffset": 12045, + "charLength": 1, + "snippet": { + "text": "n" + } + }, + "contextRegion": { + "startLine": 406, + "startColumn": 16, + "charOffset": 11955, + "charLength": 1, + "snippet": { + "text": "\t\tsetAttribute(ItemAttribute_t::FLUIDTYPE, n);\n\t} else if (it.stackable) {\n\t\tsetItemCount(n);\n\t} else if (it.charges != 0) {\n\t\tsetAttribute(ItemAttribute_t::CHARGES, n);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "665bc885f5496ccf785ed5f6661bec516f3ac682a47fcdc8bcbc74a5b05734a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 412, + "startColumn": 16, + "charOffset": 12150, + "charLength": 1, + "snippet": { + "text": "n" + } + }, + "contextRegion": { + "startLine": 410, + "startColumn": 16, + "charOffset": 12080, + "charLength": 1, + "snippet": { + "text": "\t\tsetAttribute(ItemAttribute_t::CHARGES, n);\n\t} else {\n\t\tsetItemCount(n);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82901da55e4c70d3785f78314cb0a6dfd0a32c98b70f87e1bafc0a610f56e9d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'readAttr' has cognitive complexity of 99 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 416, + "startColumn": 22, + "charOffset": 12181, + "charLength": 8, + "snippet": { + "text": "readAttr" + } + }, + "contextRegion": { + "startLine": 414, + "startColumn": 22, + "charOffset": 12157, + "charLength": 8, + "snippet": { + "text": "}\n\nAttr_ReadValue Item::readAttr(AttrTypes_t attr, PropStream &propStream) {\n\tswitch (attr) {\n\t\tcase ATTR_STORE: {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfb00c096be6dfc3ce19c60383cbf6aaaf502539a64c50d4405460fabb8e2b83" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'timeStamp' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 419, + "startColumn": 12, + "charOffset": 12283, + "charLength": 9, + "snippet": { + "text": "timeStamp" + } + }, + "contextRegion": { + "startLine": 417, + "startColumn": 12, + "charOffset": 12234, + "charLength": 9, + "snippet": { + "text": "\tswitch (attr) {\n\t\tcase ATTR_STORE: {\n\t\t\tint64_t timeStamp;\n\t\t\tif (!propStream.read(timeStamp)) {\n\t\t\t\treturn ATTR_READ_ERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8e2226662a2d09bd0560d623aae08e5edbd7203c7605b38eaad0b3b34b570f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 428, + "startColumn": 3, + "charOffset": 12462, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 426, + "startColumn": 3, + "charOffset": 12437, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t\tcase ATTR_COUNT:\n\t\tcase ATTR_RUNE_CHARGES: {\n\t\t\tuint8_t charges;\n\t\t\tif (!propStream.read(charges)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05271853e18417dd364be6591959bb9f9574a852f737f2b0312d1434178e3430" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'charges' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 429, + "startColumn": 12, + "charOffset": 12499, + "charLength": 7, + "snippet": { + "text": "charges" + } + }, + "contextRegion": { + "startLine": 427, + "startColumn": 12, + "charOffset": 12441, + "charLength": 7, + "snippet": { + "text": "\t\tcase ATTR_COUNT:\n\t\tcase ATTR_RUNE_CHARGES: {\n\t\t\tuint8_t charges;\n\t\t\tif (!propStream.read(charges)) {\n\t\t\t\treturn ATTR_READ_ERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "422b0f2653394a516573d1d2a4b02292bcfdca27428ceeec0942ea6ce6eacb34" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'actionId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 439, + "startColumn": 13, + "charOffset": 12663, + "charLength": 8, + "snippet": { + "text": "actionId" + } + }, + "contextRegion": { + "startLine": 437, + "startColumn": 13, + "charOffset": 12625, + "charLength": 8, + "snippet": { + "text": "\n\t\tcase ATTR_ACTION_ID: {\n\t\t\tuint16_t actionId;\n\t\t\tif (!propStream.read(actionId)) {\n\t\t\t\treturn ATTR_READ_ERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "becb21a340f942f2933ff3342f2e8d2c468b613a196ac3cc57437ad3bd2422d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'uniqueId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 449, + "startColumn": 13, + "charOffset": 12860, + "charLength": 8, + "snippet": { + "text": "uniqueId" + } + }, + "contextRegion": { + "startLine": 447, + "startColumn": 13, + "charOffset": 12822, + "charLength": 8, + "snippet": { + "text": "\n\t\tcase ATTR_UNIQUE_ID: {\n\t\t\tuint16_t uniqueId;\n\t\t\tif (!propStream.read(uniqueId)) {\n\t\t\t\treturn ATTR_READ_ERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b6f7d859965cc61ff49c4cbc81506b8c72d05a2537ac901e8d47438a8c42134" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'writtenDate' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 469, + "startColumn": 13, + "charOffset": 13206, + "charLength": 11, + "snippet": { + "text": "writtenDate" + } + }, + "contextRegion": { + "startLine": 467, + "startColumn": 13, + "charOffset": 13166, + "charLength": 11, + "snippet": { + "text": "\n\t\tcase ATTR_WRITTENDATE: {\n\t\t\tuint64_t writtenDate;\n\t\t\tif (!propStream.read(writtenDate)) {\n\t\t\t\treturn ATTR_READ_ERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0271e7ce39e2a2baa03d24968d6da1ee574186e64604f74f65856d72049cc1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'charges' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 499, + "startColumn": 13, + "charOffset": 13776, + "charLength": 7, + "snippet": { + "text": "charges" + } + }, + "contextRegion": { + "startLine": 497, + "startColumn": 13, + "charOffset": 13740, + "charLength": 7, + "snippet": { + "text": "\n\t\tcase ATTR_CHARGES: {\n\t\t\tuint16_t charges;\n\t\t\tif (!propStream.read(charges)) {\n\t\t\t\treturn ATTR_READ_ERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a1f48760514d49d10d808b2c2f6de29db9ab41404eba7d9ec3740e204d308f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'duration' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 509, + "startColumn": 12, + "charOffset": 13939, + "charLength": 8, + "snippet": { + "text": "duration" + } + }, + "contextRegion": { + "startLine": 507, + "startColumn": 12, + "charOffset": 13903, + "charLength": 8, + "snippet": { + "text": "\n\t\tcase ATTR_DURATION: {\n\t\t\tint32_t duration;\n\t\t\tif (!propStream.read(duration)) {\n\t\t\t\treturn ATTR_READ_ERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28dc40958eb9ea570e7c532381706b6d3bdb572239de615459722a915886e7a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'state' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 519, + "startColumn": 12, + "charOffset": 14111, + "charLength": 5, + "snippet": { + "text": "state" + } + }, + "contextRegion": { + "startLine": 517, + "startColumn": 12, + "charOffset": 14069, + "charLength": 5, + "snippet": { + "text": "\n\t\tcase ATTR_DECAYING_STATE: {\n\t\t\tuint8_t state;\n\t\t\tif (!propStream.read(state)) {\n\t\t\t\treturn ATTR_READ_ERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f462ddf610e9495c18b797416bd7482c6d1bbc4511a29703b42d40bc028fc6cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'weight' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 561, + "startColumn": 13, + "charOffset": 14888, + "charLength": 6, + "snippet": { + "text": "weight" + } + }, + "contextRegion": { + "startLine": 559, + "startColumn": 13, + "charOffset": 14853, + "charLength": 6, + "snippet": { + "text": "\n\t\tcase ATTR_WEIGHT: {\n\t\t\tuint32_t weight;\n\t\t\tif (!propStream.read(weight)) {\n\t\t\t\treturn ATTR_READ_ERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9045e000c7b1c5db6dbac69aee40a8d9cdeae83459d848f7342741b478af0e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'attack' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 571, + "startColumn": 12, + "charOffset": 15073, + "charLength": 6, + "snippet": { + "text": "attack" + } + }, + "contextRegion": { + "startLine": 569, + "startColumn": 12, + "charOffset": 15039, + "charLength": 6, + "snippet": { + "text": "\n\t\tcase ATTR_ATTACK: {\n\t\t\tint32_t attack;\n\t\t\tif (!propStream.read(attack)) {\n\t\t\t\treturn ATTR_READ_ERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c80da3e0fe23d5c0a8bbf08172e7970a366e076b92f39e24920747b06728564" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'defense' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 581, + "startColumn": 12, + "charOffset": 15258, + "charLength": 7, + "snippet": { + "text": "defense" + } + }, + "contextRegion": { + "startLine": 579, + "startColumn": 12, + "charOffset": 15223, + "charLength": 7, + "snippet": { + "text": "\n\t\tcase ATTR_DEFENSE: {\n\t\t\tint32_t defense;\n\t\t\tif (!propStream.read(defense)) {\n\t\t\t\treturn ATTR_READ_ERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d217a3e2cc654882b5d9f8d06910713fc6fdf361540a210327426c9b4999177" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'extraDefense' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 591, + "startColumn": 12, + "charOffset": 15452, + "charLength": 12, + "snippet": { + "text": "extraDefense" + } + }, + "contextRegion": { + "startLine": 589, + "startColumn": 12, + "charOffset": 15412, + "charLength": 12, + "snippet": { + "text": "\n\t\tcase ATTR_EXTRADEFENSE: {\n\t\t\tint32_t extraDefense;\n\t\t\tif (!propStream.read(extraDefense)) {\n\t\t\t\treturn ATTR_READ_ERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59bebc9238ab3139533951c9af3aa94b7955f82ab4589f35f1ff380a4c88d977" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'imbuementSlot' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 601, + "startColumn": 12, + "charOffset": 15668, + "charLength": 13, + "snippet": { + "text": "imbuementSlot" + } + }, + "contextRegion": { + "startLine": 599, + "startColumn": 12, + "charOffset": 15626, + "charLength": 13, + "snippet": { + "text": "\n\t\tcase ATTR_IMBUEMENT_SLOT: {\n\t\t\tint32_t imbuementSlot;\n\t\t\tif (!propStream.read(imbuementSlot)) {\n\t\t\t\treturn ATTR_READ_ERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb040b5cac033ae8966cb04f351b8dd20dc10a580ea653f3d330295bacd84265" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'openContainer' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 611, + "startColumn": 12, + "charOffset": 15888, + "charLength": 13, + "snippet": { + "text": "openContainer" + } + }, + "contextRegion": { + "startLine": 609, + "startColumn": 12, + "charOffset": 15847, + "charLength": 13, + "snippet": { + "text": "\n\t\tcase ATTR_OPENCONTAINER: {\n\t\t\tuint8_t openContainer;\n\t\t\tif (!propStream.read(openContainer)) {\n\t\t\t\treturn ATTR_READ_ERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2dc20a7753329381dfc878f651974da40d63848869715d085e6c8f981ddb92a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'armor' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 621, + "startColumn": 12, + "charOffset": 16099, + "charLength": 5, + "snippet": { + "text": "armor" + } + }, + "contextRegion": { + "startLine": 619, + "startColumn": 12, + "charOffset": 16066, + "charLength": 5, + "snippet": { + "text": "\n\t\tcase ATTR_ARMOR: {\n\t\t\tint32_t armor;\n\t\t\tif (!propStream.read(armor)) {\n\t\t\t\treturn ATTR_READ_ERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40ff1b989921a02571910984c96482bf6a229916d365b9ea582999e92f064f01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'hitChance' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 631, + "startColumn": 11, + "charOffset": 16281, + "charLength": 9, + "snippet": { + "text": "hitChance" + } + }, + "contextRegion": { + "startLine": 629, + "startColumn": 11, + "charOffset": 16245, + "charLength": 9, + "snippet": { + "text": "\n\t\tcase ATTR_HITCHANCE: {\n\t\t\tint8_t hitChance;\n\t\t\tif (!propStream.read(hitChance)) {\n\t\t\t\treturn ATTR_READ_ERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b61982b786a1f8abdeae38c4f7217aea7dccc6fdb79e0b55b3e55a78a771eeda" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'shootRange' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 641, + "startColumn": 12, + "charOffset": 16480, + "charLength": 10, + "snippet": { + "text": "shootRange" + } + }, + "contextRegion": { + "startLine": 639, + "startColumn": 12, + "charOffset": 16442, + "charLength": 10, + "snippet": { + "text": "\n\t\tcase ATTR_SHOOTRANGE: {\n\t\t\tuint8_t shootRange;\n\t\t\tif (!propStream.read(shootRange)) {\n\t\t\t\treturn ATTR_READ_ERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ba445f079544067764b21902db2de3cb36f3b480fceaa4e31082ed7ffd116d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err34-c", + "ruleIndex": 133, + "kind": "fail", + "level": "warning", + "message": { + "text": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 663, + "startColumn": 57, + "charOffset": 17107, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 661, + "startColumn": 57, + "charOffset": 16976, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tremoveAttribute(ItemAttribute_t::SPECIAL);\n\t\t\t\t// Add custom attribute\n\t\t\t\tsetCustomAttribute(\"Hireling\", static_cast(std::atoi(special.c_str())));\n\t\t\t}\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4cec6cfed7cd197c2ac385624d50d0f4937f4a593faf5f5bf3f1c0cbf3eccd54" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-18-0-2", + "ruleIndex": 408, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 18-0-2: The library functions atof, atoi and atol from library shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 663, + "startColumn": 57, + "charOffset": 17107, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 661, + "startColumn": 57, + "charOffset": 16976, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tremoveAttribute(ItemAttribute_t::SPECIAL);\n\t\t\t\t// Add custom attribute\n\t\t\t\tsetCustomAttribute(\"Hireling\", static_cast(std::atoi(special.c_str())));\n\t\t\t}\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4f95ccd959a2299c270fbb7cdb9c7ebfa49bedc37847fd5fb6ae01fc116f379" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'flags' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 669, + "startColumn": 13, + "charOffset": 17203, + "charLength": 5, + "snippet": { + "text": "flags" + } + }, + "contextRegion": { + "startLine": 667, + "startColumn": 13, + "charOffset": 17156, + "charLength": 5, + "snippet": { + "text": "\n\t\tcase ATTR_QUICKLOOTCONTAINER: {\n\t\t\tuint32_t flags;\n\t\t\tif (!propStream.read(flags)) {\n\t\t\t\treturn ATTR_READ_ERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05617413488084f193198b12fb44c7d7cefdb59bb8e733a3c6d0c1a605a01989" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "switch has 2 consecutive identical branches" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 699, + "startColumn": 3, + "charOffset": 17794, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 697, + "startColumn": 3, + "charOffset": 17776, + "charLength": 4, + "snippet": { + "text": "\n\t\t// Bed class\n\t\tcase ATTR_SLEEPERGUID: {\n\t\t\tif (!propStream.skip(4)) {\n\t\t\t\treturn ATTR_READ_ERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c07272d68daed90f69d4a8dfd7f2c5cc6862b3350c11fa6626b514f468a5916f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 715, + "startColumn": 25, + "charOffset": 18070, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 713, + "startColumn": 25, + "charOffset": 18001, + "charLength": 1, + "snippet": { + "text": "\t\t// Teleport class\n\t\tcase ATTR_TELE_DEST: {\n\t\t\tif (!propStream.skip(5)) {\n\t\t\t\treturn ATTR_READ_ERROR;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82b862b3cf63fb6d645114973c09d5baec7daa06c2bdf77a2018247d1d710735" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 722, + "startColumn": 3, + "charOffset": 18147, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 720, + "startColumn": 3, + "charOffset": 18123, + "charLength": 4, + "snippet": { + "text": "\n\t\t// Container class\n\t\tcase ATTR_CONTAINER_ITEMS: {\n\t\t\treturn ATTR_READ_ERROR;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86cd10a3a00f9b449a21296733b8d126b1af73695b20fd99833211decd7627cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'size' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 728, + "startColumn": 13, + "charOffset": 18406, + "charLength": 4, + "snippet": { + "text": "size" + } + }, + "contextRegion": { + "startLine": 726, + "startColumn": 13, + "charOffset": 18208, + "charLength": 4, + "snippet": { + "text": "\t\t// Deprecated, all items that still exist with this attribute will work normally, but new items will be created with the new system, using ATTR_CUSTOM\n\t\tcase ATTR_CUSTOM_ATTRIBUTES: {\n\t\t\tuint64_t size;\n\t\t\tif (!propStream.read(size)) {\n\t\t\t\treturn ATTR_READ_ERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2c289178a6796dcc262f0d11252b15c89e31f83a887e9318fafdc024408d514" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 733, + "startColumn": 4, + "charOffset": 18492, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 731, + "startColumn": 4, + "charOffset": 18483, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (uint64_t i = 0; i < size; i++) {\n\t\t\t\t// Unserialize key type and value\n\t\t\t\tstd::string key;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "feca8d226d14c1ea04e3a506882e7a808d36b996a428df1681f1d815b372c390" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 751, + "startColumn": 9, + "charOffset": 19067, + "charLength": 18, + "snippet": { + "text": "getCustomAttribute" + } + }, + "contextRegion": { + "startLine": 749, + "startColumn": 9, + "charOffset": 19001, + "charLength": 18, + "snippet": { + "text": "\n\t\t\t\t// Migrate wrapable items to the new store attribute\n\t\t\t\tif (getCustomAttribute(\"unWrapId\") && getAttribute(ItemAttribute_t::STORE) == 0) {\n\t\t\t\t\tsetAttribute(ItemAttribute_t::STORE, getTimeNow());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5eec7c81c3874639336d6f146e90968c2712b37890658c01543f0ccc8faf4b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 751, + "startColumn": 9, + "charOffset": 19067, + "charLength": 18, + "snippet": { + "text": "getCustomAttribute" + } + }, + "contextRegion": { + "startLine": 749, + "startColumn": 9, + "charOffset": 19001, + "charLength": 18, + "snippet": { + "text": "\n\t\t\t\t// Migrate wrapable items to the new store attribute\n\t\t\t\tif (getCustomAttribute(\"unWrapId\") && getAttribute(ItemAttribute_t::STORE) == 0) {\n\t\t\t\t\tsetAttribute(ItemAttribute_t::STORE, getTimeNow());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a94c15f141b6a2c29e8c48b613fdafbda83e285ef8259ba77d2e171cb6303f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CustomAttribute *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 751, + "startColumn": 9, + "charOffset": 19067, + "charLength": 18, + "snippet": { + "text": "getCustomAttribute" + } + }, + "contextRegion": { + "startLine": 749, + "startColumn": 9, + "charOffset": 19001, + "charLength": 18, + "snippet": { + "text": "\n\t\t\t\t// Migrate wrapable items to the new store attribute\n\t\t\t\tif (getCustomAttribute(\"unWrapId\") && getAttribute(ItemAttribute_t::STORE) == 0) {\n\t\t\t\t\tsetAttribute(ItemAttribute_t::STORE, getTimeNow());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9178dc97fb1203ce538c5e9c333745bb667f0e878582fa8335f63c0955c633d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'tier' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 759, + "startColumn": 12, + "charOffset": 19269, + "charLength": 4, + "snippet": { + "text": "tier" + } + }, + "contextRegion": { + "startLine": 757, + "startColumn": 12, + "charOffset": 19237, + "charLength": 4, + "snippet": { + "text": "\n\t\tcase ATTR_TIER: {\n\t\t\tuint8_t tier;\n\t\t\tif (!propStream.read(tier)) {\n\t\t\t\tg_logger().error(\"[{}] failed to read tier\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ec147fda40aaf8a111bcd817ea1d5e794984195bde65faab0e4aa51c7cf2b82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'amount' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 770, + "startColumn": 13, + "charOffset": 19510, + "charLength": 6, + "snippet": { + "text": "amount" + } + }, + "contextRegion": { + "startLine": 768, + "startColumn": 13, + "charOffset": 19475, + "charLength": 6, + "snippet": { + "text": "\n\t\tcase ATTR_AMOUNT: {\n\t\t\tuint16_t amount;\n\t\t\tif (!propStream.read(amount)) {\n\t\t\t\tg_logger().error(\"[{}] failed to read amount\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c46c9de786b6df97853d0cf8b23be29ae0099c426bb3365895ee6da966e058f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'size' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 781, + "startColumn": 13, + "charOffset": 19745, + "charLength": 4, + "snippet": { + "text": "size" + } + }, + "contextRegion": { + "startLine": 779, + "startColumn": 13, + "charOffset": 19710, + "charLength": 4, + "snippet": { + "text": "\n\t\tcase ATTR_CUSTOM: {\n\t\t\tuint64_t size;\n\t\t\tif (!propStream.read(size)) {\n\t\t\t\tg_logger().error(\"[{}] failed to read size\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ebee52333286fee3c0ad4b4ed14f16819422a20f5f78fb0edd81671bb1556cf4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 787, + "startColumn": 4, + "charOffset": 19895, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 785, + "startColumn": 4, + "charOffset": 19886, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (uint64_t i = 0; i < size; i++) {\n\t\t\t\t// Unserialize custom attribute key type\n\t\t\t\tstd::string key;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "886dc06a1e5da9d81a00c4bcd84e39fa5b1f4d1ec672a1465106e7c208f05de2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-empty-decl-or-stmt", + "ruleIndex": 331, + "kind": "fail", + "level": "warning", + "message": { + "text": "Empty statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 793, + "startColumn": 6, + "charOffset": 20144, + "charLength": 1, + "snippet": { + "text": ";" + } + }, + "contextRegion": { + "startLine": 791, + "startColumn": 6, + "charOffset": 20038, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\tg_logger().error(\"[{}] failed to read custom type\", __FUNCTION__);\n\t\t\t\t\treturn ATTR_READ_ERROR;\n\t\t\t\t};\n\n\t\t\t\tCustomAttribute customAttribute;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6806b25115752d11fb7c72c707dd294196da00cb20f02c49bcb6bb218238c1c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'ownerId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 818, + "startColumn": 13, + "charOffset": 20781, + "charLength": 7, + "snippet": { + "text": "ownerId" + } + }, + "contextRegion": { + "startLine": 816, + "startColumn": 13, + "charOffset": 20747, + "charLength": 7, + "snippet": { + "text": "\n\t\tcase ATTR_OWNER: {\n\t\t\tuint32_t ownerId;\n\t\t\tif (!propStream.read(ownerId)) {\n\t\t\t\tg_logger().error(\"[{}] failed to read amount\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b3aeb9450b8a1bc92828f20583d0a3939701ff7c3396483fffd61716a3c95b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'flags' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 829, + "startColumn": 13, + "charOffset": 21027, + "charLength": 5, + "snippet": { + "text": "flags" + } + }, + "contextRegion": { + "startLine": 827, + "startColumn": 13, + "charOffset": 20983, + "charLength": 5, + "snippet": { + "text": "\n\t\tcase ATTR_OBTAINCONTAINER: {\n\t\t\tuint32_t flags;\n\t\t\tif (!propStream.read(flags)) {\n\t\t\t\treturn ATTR_READ_ERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61682cd134dde9cba748b7f0b97e3e23341a4abad4f7081d765c863c3f26daf5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 838, + "startColumn": 3, + "charOffset": 21270, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 836, + "startColumn": 3, + "charOffset": 21254, + "charLength": 7, + "snippet": { + "text": "\t\t\tbreak;\n\t\t}\n\t\tdefault:\n\t\t\treturn ATTR_READ_ERROR;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc84a9f321ce916fbaebfe7f77f5b2b0b484b13a0b3230db109d91277b4f3a28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'attr_type' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 846, + "startColumn": 10, + "charOffset": 21403, + "charLength": 9, + "snippet": { + "text": "attr_type" + } + }, + "contextRegion": { + "startLine": 844, + "startColumn": 10, + "charOffset": 21340, + "charLength": 9, + "snippet": { + "text": "\nbool Item::unserializeAttr(PropStream &propStream) {\n\tuint8_t attr_type;\n\twhile (propStream.read(attr_type) && attr_type != 0) {\n\t\tAttr_ReadValue ret = readAttr(static_cast(attr_type), propStream);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ff9334cb380da2444bd2d3d02f8328b5e5a2fa9132b47ac1e6f38940d860777" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 847, + "startColumn": 2, + "charOffset": 21415, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 845, + "startColumn": 2, + "charOffset": 21341, + "charLength": 5, + "snippet": { + "text": "bool Item::unserializeAttr(PropStream &propStream) {\n\tuint8_t attr_type;\n\twhile (propStream.read(attr_type) && attr_type != 0) {\n\t\tAttr_ReadValue ret = readAttr(static_cast(attr_type), propStream);\n\t\tif (ret == ATTR_READ_ERROR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e58fd6ceb11a9a60033b81b1dfc398dbd1d90d1143e9bae5b1caa4287e0ce0ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 849, + "startColumn": 3, + "charOffset": 21563, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 847, + "startColumn": 3, + "charOffset": 21414, + "charLength": 2, + "snippet": { + "text": "\twhile (propStream.read(attr_type) && attr_type != 0) {\n\t\tAttr_ReadValue ret = readAttr(static_cast(attr_type), propStream);\n\t\tif (ret == ATTR_READ_ERROR) {\n\t\t\treturn false;\n\t\t} else if (ret == ATTR_READ_END) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e938ec9b32dfff3a35fb39a3556bd160daf9c62f88232767c8056887ffbfa5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 851, + "startColumn": 5, + "charOffset": 21614, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 849, + "startColumn": 5, + "charOffset": 21561, + "charLength": 4, + "snippet": { + "text": "\t\tif (ret == ATTR_READ_ERROR) {\n\t\t\treturn false;\n\t\t} else if (ret == ATTR_READ_END) {\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d38cd10cfce73a3478057adf59f23f3ec0f889c7ed27eb372d216d2148fc0bcd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 858, + "startColumn": 45, + "charOffset": 21731, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 856, + "startColumn": 45, + "charOffset": 21684, + "charLength": 1, + "snippet": { + "text": "}\n\nbool Item::unserializeItemNode(OTB::Loader &, const OTB::Node &, PropStream &propStream, Position &itemPosition) {\n\treturn unserializeAttr(propStream);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "406fceb8638eaa9327be82b3606c371385e3ccc8f03432629ac3cf2cbe75bbb7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-unused-parameters", + "ruleIndex": 612, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'itemPosition' is unused" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 858, + "startColumn": 100, + "charOffset": 21786, + "charLength": 12, + "snippet": { + "text": "itemPosition" + } + }, + "contextRegion": { + "startLine": 856, + "startColumn": 100, + "charOffset": 21684, + "charLength": 12, + "snippet": { + "text": "}\n\nbool Item::unserializeItemNode(OTB::Loader &, const OTB::Node &, PropStream &propStream, Position &itemPosition) {\n\treturn unserializeAttr(propStream);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a26f790d3bd51b005d60b0fe95925eb9f0e1d48e4338ec84b8f294c476256af7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'serializeAttr' has cognitive complexity of 36 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 862, + "startColumn": 12, + "charOffset": 21853, + "charLength": 13, + "snippet": { + "text": "serializeAttr" + } + }, + "contextRegion": { + "startLine": 860, + "startColumn": 12, + "charOffset": 21839, + "charLength": 13, + "snippet": { + "text": "}\n\nvoid Item::serializeAttr(PropWriteStream &propWriteStream) const {\n\tconst ItemType &it = items[id];\n\tif (auto timeStamp = getAttribute(ItemAttribute_t::STORE)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd7ca5f278514f02b4507184100e973bc6fc60689cc9b7562f7fa7240839a1a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 865, + "startColumn": 34, + "charOffset": 22046, + "charLength": 10, + "snippet": { + "text": "ATTR_STORE" + } + }, + "contextRegion": { + "startLine": 863, + "startColumn": 34, + "charOffset": 21909, + "charLength": 10, + "snippet": { + "text": "\tconst ItemType &it = items[id];\n\tif (auto timeStamp = getAttribute(ItemAttribute_t::STORE)) {\n\t\tpropWriteStream.write(ATTR_STORE);\n\t\tpropWriteStream.write(timeStamp);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7700c779933aca66be756dba9c2fb73e88a31f73b63caf845237872bfb424849" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 869, + "startColumn": 34, + "charOffset": 22203, + "charLength": 10, + "snippet": { + "text": "ATTR_COUNT" + } + }, + "contextRegion": { + "startLine": 867, + "startColumn": 34, + "charOffset": 22104, + "charLength": 10, + "snippet": { + "text": "\t}\n\tif (it.stackable || it.isFluidContainer() || it.isSplash()) {\n\t\tpropWriteStream.write(ATTR_COUNT);\n\t\tpropWriteStream.write(getSubType());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46d411003fec6175ea310465b69b0a2079dac5dbe5a528afbb28241faaa33cfc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 870, + "startColumn": 34, + "charOffset": 22249, + "charLength": 10, + "snippet": { + "text": "getSubType" + } + }, + "contextRegion": { + "startLine": 868, + "startColumn": 34, + "charOffset": 22107, + "charLength": 10, + "snippet": { + "text": "\tif (it.stackable || it.isFluidContainer() || it.isSplash()) {\n\t\tpropWriteStream.write(ATTR_COUNT);\n\t\tpropWriteStream.write(getSubType());\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9cbb2c7c71427bf037577ad5ef8553a22755f2ca442b5dc2cfbff4063f650008" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 874, + "startColumn": 34, + "charOffset": 22373, + "charLength": 12, + "snippet": { + "text": "ATTR_CHARGES" + } + }, + "contextRegion": { + "startLine": 872, + "startColumn": 34, + "charOffset": 22267, + "charLength": 12, + "snippet": { + "text": "\n\tif (auto charges = getAttribute(ItemAttribute_t::CHARGES)) {\n\t\tpropWriteStream.write(ATTR_CHARGES);\n\t\tpropWriteStream.write(charges);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f65ca655c092cd05157559f32760f9fefe092058c9b5f9bd34db5a705e3b175b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 880, + "startColumn": 35, + "charOffset": 22564, + "charLength": 14, + "snippet": { + "text": "ATTR_ACTION_ID" + } + }, + "contextRegion": { + "startLine": 878, + "startColumn": 35, + "charOffset": 22436, + "charLength": 14, + "snippet": { + "text": "\tif (it.movable) {\n\t\tif (auto actionId = getAttribute(ItemAttribute_t::ACTIONID)) {\n\t\t\tpropWriteStream.write(ATTR_ACTION_ID);\n\t\t\tpropWriteStream.write(actionId);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd39fad8dc193f5c1584087d9c91a741aa85669ce040da01c02112a1dda90a2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 887, + "startColumn": 34, + "charOffset": 22755, + "charLength": 9, + "snippet": { + "text": "ATTR_TEXT" + } + }, + "contextRegion": { + "startLine": 885, + "startColumn": 34, + "charOffset": 22635, + "charLength": 9, + "snippet": { + "text": "\tif (const std::string &text = getString(ItemAttribute_t::TEXT);\n\t !text.empty()) {\n\t\tpropWriteStream.write(ATTR_TEXT);\n\t\tpropWriteStream.writeString(text);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b2a7e5e0dc0f4693f65354618105cd02bbcee370d5ef4b0cecc8eac147a562de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 891, + "startColumn": 12, + "charOffset": 22819, + "charLength": 8, + "snippet": { + "text": "uint64_t" + } + }, + "contextRegion": { + "startLine": 889, + "startColumn": 12, + "charOffset": 22804, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tif (const uint64_t writtenDate = getAttribute(ItemAttribute_t::DATE)) {\n\t\tpropWriteStream.write(ATTR_WRITTENDATE);\n\t\tpropWriteStream.write(writtenDate);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "586fd0a133be3d632c7e90fd9bc97f0ee2646cbbe2a653adcaede40259ffcf24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 892, + "startColumn": 34, + "charOffset": 22924, + "charLength": 16, + "snippet": { + "text": "ATTR_WRITTENDATE" + } + }, + "contextRegion": { + "startLine": 890, + "startColumn": 34, + "charOffset": 22807, + "charLength": 16, + "snippet": { + "text": "\n\tif (const uint64_t writtenDate = getAttribute(ItemAttribute_t::DATE)) {\n\t\tpropWriteStream.write(ATTR_WRITTENDATE);\n\t\tpropWriteStream.write(writtenDate);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8617b1d629b6735a2cdeabb13918d6bbc2fbe38ac835bb58230a288a3f3a361" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 898, + "startColumn": 34, + "charOffset": 23117, + "charLength": 14, + "snippet": { + "text": "ATTR_WRITTENBY" + } + }, + "contextRegion": { + "startLine": 896, + "startColumn": 34, + "charOffset": 22995, + "charLength": 14, + "snippet": { + "text": "\tconst std::string &writer = getString(ItemAttribute_t::WRITER);\n\tif (!writer.empty()) {\n\t\tpropWriteStream.write(ATTR_WRITTENBY);\n\t\tpropWriteStream.writeString(writer);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73090b1dc01f5f8d17bd5cf4d84b7ec0ad93f00e67820805e277cc4ff86b99cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 904, + "startColumn": 34, + "charOffset": 23314, + "charLength": 9, + "snippet": { + "text": "ATTR_DESC" + } + }, + "contextRegion": { + "startLine": 902, + "startColumn": 34, + "charOffset": 23177, + "charLength": 9, + "snippet": { + "text": "\tconst std::string &specialDesc = getString(ItemAttribute_t::DESCRIPTION);\n\tif (!specialDesc.empty()) {\n\t\tpropWriteStream.write(ATTR_DESC);\n\t\tpropWriteStream.writeString(specialDesc);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3bcb34015018d22bc4a249af313feb1487bd5e7f7f761a43493b5d95125e001f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 909, + "startColumn": 34, + "charOffset": 23455, + "charLength": 13, + "snippet": { + "text": "ATTR_DURATION" + } + }, + "contextRegion": { + "startLine": 907, + "startColumn": 34, + "charOffset": 23373, + "charLength": 13, + "snippet": { + "text": "\n\tif (hasAttribute(ItemAttribute_t::DURATION)) {\n\t\tpropWriteStream.write(ATTR_DURATION);\n\t\tpropWriteStream.write(getDuration());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "357db0776b1bf034de34363eac8795d7ea1a1bfd96c5d4c30791355e1afa42f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 915, + "startColumn": 34, + "charOffset": 23665, + "charLength": 19, + "snippet": { + "text": "ATTR_DECAYING_STATE" + } + }, + "contextRegion": { + "startLine": 913, + "startColumn": 34, + "charOffset": 23524, + "charLength": 19, + "snippet": { + "text": "\tif (auto decayState = getDecaying();\n\t decayState == DECAYING_TRUE || decayState == DECAYING_PENDING) {\n\t\tpropWriteStream.write(ATTR_DECAYING_STATE);\n\t\tpropWriteStream.write(decayState);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71b2181d27a3ad06ada524e3542eca94efb06235bf0f69776be8ceea3d8c09d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 920, + "startColumn": 34, + "charOffset": 23814, + "charLength": 9, + "snippet": { + "text": "ATTR_NAME" + } + }, + "contextRegion": { + "startLine": 918, + "startColumn": 34, + "charOffset": 23736, + "charLength": 9, + "snippet": { + "text": "\n\tif (hasAttribute(ItemAttribute_t::NAME)) {\n\t\tpropWriteStream.write(ATTR_NAME);\n\t\tpropWriteStream.writeString(getString(ItemAttribute_t::NAME));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eea903d092d7ac5dd1a4ac1e88511e62420d591d1fde6f69272283de5fd114e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 925, + "startColumn": 34, + "charOffset": 23975, + "charLength": 12, + "snippet": { + "text": "ATTR_ARTICLE" + } + }, + "contextRegion": { + "startLine": 923, + "startColumn": 34, + "charOffset": 23894, + "charLength": 12, + "snippet": { + "text": "\n\tif (hasAttribute(ItemAttribute_t::ARTICLE)) {\n\t\tpropWriteStream.write(ATTR_ARTICLE);\n\t\tpropWriteStream.writeString(getString(ItemAttribute_t::ARTICLE));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6082418b7910c12a10070a8e571370e09e93f763eee9a1048b6ea95f9c20d3f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 930, + "startColumn": 34, + "charOffset": 24145, + "charLength": 15, + "snippet": { + "text": "ATTR_PLURALNAME" + } + }, + "contextRegion": { + "startLine": 928, + "startColumn": 34, + "charOffset": 24061, + "charLength": 15, + "snippet": { + "text": "\n\tif (hasAttribute(ItemAttribute_t::PLURALNAME)) {\n\t\tpropWriteStream.write(ATTR_PLURALNAME);\n\t\tpropWriteStream.writeString(getString(ItemAttribute_t::PLURALNAME));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a04547123f7336e01441adcfc35467468a3e6f5588f74f0410440cd7c2ab2b03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 935, + "startColumn": 34, + "charOffset": 24317, + "charLength": 11, + "snippet": { + "text": "ATTR_WEIGHT" + } + }, + "contextRegion": { + "startLine": 933, + "startColumn": 34, + "charOffset": 24237, + "charLength": 11, + "snippet": { + "text": "\n\tif (hasAttribute(ItemAttribute_t::WEIGHT)) {\n\t\tpropWriteStream.write(ATTR_WEIGHT);\n\t\tpropWriteStream.write(getAttribute(ItemAttribute_t::WEIGHT));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f4cc6cab6172ee1f878ce5a4f5bf75607e61154fbc104d0ffb76c4adf05ddfa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 940, + "startColumn": 34, + "charOffset": 24498, + "charLength": 11, + "snippet": { + "text": "ATTR_ATTACK" + } + }, + "contextRegion": { + "startLine": 938, + "startColumn": 34, + "charOffset": 24418, + "charLength": 11, + "snippet": { + "text": "\n\tif (hasAttribute(ItemAttribute_t::ATTACK)) {\n\t\tpropWriteStream.write(ATTR_ATTACK);\n\t\tpropWriteStream.write(getAttribute(ItemAttribute_t::ATTACK));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c469f9325e2455eb760646e39da92d1c3724ae26b7f4fc78396f9910df5d1579" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 945, + "startColumn": 34, + "charOffset": 24678, + "charLength": 12, + "snippet": { + "text": "ATTR_DEFENSE" + } + }, + "contextRegion": { + "startLine": 943, + "startColumn": 34, + "charOffset": 24597, + "charLength": 12, + "snippet": { + "text": "\n\tif (hasAttribute(ItemAttribute_t::DEFENSE)) {\n\t\tpropWriteStream.write(ATTR_DEFENSE);\n\t\tpropWriteStream.write(getAttribute(ItemAttribute_t::DEFENSE));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22eaae1149fe0537338b4f406218b9e6bbb6f9f04366d638549dbbf0ec6cd9ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 950, + "startColumn": 34, + "charOffset": 24865, + "charLength": 17, + "snippet": { + "text": "ATTR_EXTRADEFENSE" + } + }, + "contextRegion": { + "startLine": 948, + "startColumn": 34, + "charOffset": 24779, + "charLength": 17, + "snippet": { + "text": "\n\tif (hasAttribute(ItemAttribute_t::EXTRADEFENSE)) {\n\t\tpropWriteStream.write(ATTR_EXTRADEFENSE);\n\t\tpropWriteStream.write(getAttribute(ItemAttribute_t::EXTRADEFENSE));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5486dde582c4bc7471e5c2fc5df393c3cd44c231e34fb5f7650ee70bf21ac55a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 955, + "startColumn": 34, + "charOffset": 25064, + "charLength": 19, + "snippet": { + "text": "ATTR_IMBUEMENT_SLOT" + } + }, + "contextRegion": { + "startLine": 953, + "startColumn": 34, + "charOffset": 24976, + "charLength": 19, + "snippet": { + "text": "\n\tif (hasAttribute(ItemAttribute_t::IMBUEMENT_SLOT)) {\n\t\tpropWriteStream.write(ATTR_IMBUEMENT_SLOT);\n\t\tpropWriteStream.write(getAttribute(ItemAttribute_t::IMBUEMENT_SLOT));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c274592f1f08688d69384d6a009b10b3a8d60aa9609776b37478a9a6fb62f96d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 960, + "startColumn": 34, + "charOffset": 25266, + "charLength": 18, + "snippet": { + "text": "ATTR_OPENCONTAINER" + } + }, + "contextRegion": { + "startLine": 958, + "startColumn": 34, + "charOffset": 25179, + "charLength": 18, + "snippet": { + "text": "\n\tif (hasAttribute(ItemAttribute_t::OPENCONTAINER)) {\n\t\tpropWriteStream.write(ATTR_OPENCONTAINER);\n\t\tpropWriteStream.write(getAttribute(ItemAttribute_t::OPENCONTAINER));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c469f9325e2455eb760646e39da92d1c3724ae26b7f4fc78396f9910df5d1579" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 965, + "startColumn": 34, + "charOffset": 25458, + "charLength": 10, + "snippet": { + "text": "ATTR_ARMOR" + } + }, + "contextRegion": { + "startLine": 963, + "startColumn": 34, + "charOffset": 25379, + "charLength": 10, + "snippet": { + "text": "\n\tif (hasAttribute(ItemAttribute_t::ARMOR)) {\n\t\tpropWriteStream.write(ATTR_ARMOR);\n\t\tpropWriteStream.write(getAttribute(ItemAttribute_t::ARMOR));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dce90010786eab00b0a90285ac143f07c6c1f2914ab528e9ef6987d407b5dc73" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 970, + "startColumn": 34, + "charOffset": 25638, + "charLength": 14, + "snippet": { + "text": "ATTR_HITCHANCE" + } + }, + "contextRegion": { + "startLine": 968, + "startColumn": 34, + "charOffset": 25555, + "charLength": 14, + "snippet": { + "text": "\n\tif (hasAttribute(ItemAttribute_t::HITCHANCE)) {\n\t\tpropWriteStream.write(ATTR_HITCHANCE);\n\t\tpropWriteStream.write(getAttribute(ItemAttribute_t::HITCHANCE));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e9b83b6e6c029ba51380429892361607ed4617b1a4b1a17a9983ad9d7da7fb3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 975, + "startColumn": 34, + "charOffset": 25825, + "charLength": 15, + "snippet": { + "text": "ATTR_SHOOTRANGE" + } + }, + "contextRegion": { + "startLine": 973, + "startColumn": 34, + "charOffset": 25741, + "charLength": 15, + "snippet": { + "text": "\n\tif (hasAttribute(ItemAttribute_t::SHOOTRANGE)) {\n\t\tpropWriteStream.write(ATTR_SHOOTRANGE);\n\t\tpropWriteStream.write(getAttribute(ItemAttribute_t::SHOOTRANGE));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bfe08248a77aa8f92b1a4206e6e243481329c4ab384d2cea448b20e04537bf9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 980, + "startColumn": 34, + "charOffset": 26013, + "charLength": 12, + "snippet": { + "text": "ATTR_SPECIAL" + } + }, + "contextRegion": { + "startLine": 978, + "startColumn": 34, + "charOffset": 25932, + "charLength": 12, + "snippet": { + "text": "\n\tif (hasAttribute(ItemAttribute_t::SPECIAL)) {\n\t\tpropWriteStream.write(ATTR_SPECIAL);\n\t\tpropWriteStream.writeString(getString(ItemAttribute_t::SPECIAL));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a53816b91a655bc410db61dfb2a5d8056d2b9e04a9f483187ba803f32cd1b7b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 985, + "startColumn": 34, + "charOffset": 26191, + "charLength": 23, + "snippet": { + "text": "ATTR_QUICKLOOTCONTAINER" + } + }, + "contextRegion": { + "startLine": 983, + "startColumn": 34, + "charOffset": 26099, + "charLength": 23, + "snippet": { + "text": "\n\tif (hasAttribute(ItemAttribute_t::QUICKLOOTCONTAINER)) {\n\t\tpropWriteStream.write(ATTR_QUICKLOOTCONTAINER);\n\t\tpropWriteStream.write(getAttribute(ItemAttribute_t::QUICKLOOTCONTAINER));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7031032549d658b12f81612221f98abe68a5d3c57ef33cb26b9b0a70e92ba722" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 990, + "startColumn": 34, + "charOffset": 26394, + "charLength": 9, + "snippet": { + "text": "ATTR_TIER" + } + }, + "contextRegion": { + "startLine": 988, + "startColumn": 34, + "charOffset": 26316, + "charLength": 9, + "snippet": { + "text": "\n\tif (hasAttribute(ItemAttribute_t::TIER)) {\n\t\tpropWriteStream.write(ATTR_TIER);\n\t\tpropWriteStream.write(getTier());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5bb4e78200c70a363e52aa2ba7fcf8edadd228d759b24cbb38646f56d3615a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 995, + "startColumn": 34, + "charOffset": 26517, + "charLength": 11, + "snippet": { + "text": "ATTR_AMOUNT" + } + }, + "contextRegion": { + "startLine": 993, + "startColumn": 34, + "charOffset": 26454, + "charLength": 11, + "snippet": { + "text": "\n\tif (hasAttribute(AMOUNT)) {\n\t\tpropWriteStream.write(ATTR_AMOUNT);\n\t\tpropWriteStream.write(getAttribute(AMOUNT));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "269322d53580b6dac2d91e018d3c6f6d64c0dd6c8e3a25b1c3abb0b4ab168531" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1000, + "startColumn": 34, + "charOffset": 26678, + "charLength": 25, + "snippet": { + "text": "ATTR_STORE_INBOX_CATEGORY" + } + }, + "contextRegion": { + "startLine": 998, + "startColumn": 34, + "charOffset": 26601, + "charLength": 25, + "snippet": { + "text": "\n\tif (hasAttribute(STORE_INBOX_CATEGORY)) {\n\t\tpropWriteStream.write(ATTR_STORE_INBOX_CATEGORY);\n\t\tpropWriteStream.writeString(getString(ItemAttribute_t::STORE_INBOX_CATEGORY));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5f5df61e91df7dfc2963d8bce2d7b028a22800492d8f13524c9c6f5c8d514e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1005, + "startColumn": 34, + "charOffset": 26852, + "charLength": 10, + "snippet": { + "text": "ATTR_OWNER" + } + }, + "contextRegion": { + "startLine": 1003, + "startColumn": 34, + "charOffset": 26790, + "charLength": 10, + "snippet": { + "text": "\n\tif (hasAttribute(OWNER)) {\n\t\tpropWriteStream.write(ATTR_OWNER);\n\t\tpropWriteStream.write(getAttribute(ItemAttribute_t::OWNER));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12257037b53edb454060d06351a4299dcdc8d10156a7070d7d153f95840f9e79" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1012, + "startColumn": 34, + "charOffset": 27139, + "charLength": 11, + "snippet": { + "text": "ATTR_CUSTOM" + } + }, + "contextRegion": { + "startLine": 1010, + "startColumn": 34, + "charOffset": 27024, + "charLength": 11, + "snippet": { + "text": "\tif (hasCustomAttribute()) {\n\t\tauto customAttributeMap = getCustomAttributeMap();\n\t\tpropWriteStream.write(ATTR_CUSTOM);\n\t\tpropWriteStream.write(customAttributeMap.size());\n\t\tfor (const auto &[attributeKey, customAttribute] : customAttributeMap) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce19788182963200b201f86a1730ccfc05efc189a8d9e4f5c4cf7f10c6303f17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1014, + "startColumn": 3, + "charOffset": 27217, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1012, + "startColumn": 3, + "charOffset": 27106, + "charLength": 3, + "snippet": { + "text": "\t\tpropWriteStream.write(ATTR_CUSTOM);\n\t\tpropWriteStream.write(customAttributeMap.size());\n\t\tfor (const auto &[attributeKey, customAttribute] : customAttributeMap) {\n\t\t\t// Serializing custom attribute key type\n\t\t\tpropWriteStream.writeString(attributeKey);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac0f9aa8a68eb93f3c69cd331bb5246276a6a79588b3edeed3f50ba3dded55f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1023, + "startColumn": 34, + "charOffset": 27569, + "charLength": 20, + "snippet": { + "text": "ATTR_OBTAINCONTAINER" + } + }, + "contextRegion": { + "startLine": 1021, + "startColumn": 34, + "charOffset": 27480, + "charLength": 20, + "snippet": { + "text": "\n\tif (hasAttribute(ItemAttribute_t::OBTAINCONTAINER)) {\n\t\tpropWriteStream.write(ATTR_OBTAINCONTAINER);\n\t\tauto flags = getAttribute(ItemAttribute_t::OBTAINCONTAINER);\n\t\tg_logger().debug(\"Reading flag {}, to item id {}\", flags, getID());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "519e4b37b668d7b1e1255e7a4a423cf4b3240bca2d98565267537dbb552936fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'owner' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1030, + "startColumn": 47, + "charOffset": 27829, + "charLength": 5, + "snippet": { + "text": "owner" + } + }, + "contextRegion": { + "startLine": 1028, + "startColumn": 47, + "charOffset": 27780, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid Item::setOwner(std::shared_ptr owner) {\n\tauto ownerId = owner->getID();\n\tif (owner->getPlayer()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a3874b1bdde16ea97d9fe52753096e87420f83bd6a9b0d1a7c3b4ca52f16b6c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'owner' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1038, + "startColumn": 46, + "charOffset": 28011, + "charLength": 5, + "snippet": { + "text": "owner" + } + }, + "contextRegion": { + "startLine": 1036, + "startColumn": 46, + "charOffset": 27963, + "charLength": 5, + "snippet": { + "text": "}\n\nbool Item::isOwner(std::shared_ptr owner) const {\n\tif (!owner) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd7e3fd33f28090537508d8b279062bda10fe98895b735623505751de0e20670" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1039, + "startColumn": 6, + "charOffset": 28031, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1037, + "startColumn": 6, + "charOffset": 27965, + "charLength": 1, + "snippet": { + "text": "\nbool Item::isOwner(std::shared_ptr owner) const {\n\tif (!owner) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3f452d6f7c06c60758d9a81b24d75da1918632820bd9fd7eb66b32bd98ebb7b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1077, + "startColumn": 3, + "charOffset": 28802, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1075, + "startColumn": 3, + "charOffset": 28750, + "charLength": 4, + "snippet": { + "text": "\tconst ItemType &it = items[id];\n\tswitch (prop) {\n\t\tcase CONST_PROP_BLOCKSOLID:\n\t\t\treturn it.blockSolid;\n\t\tcase CONST_PROP_MOVABLE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51ddb755dc563252e9741e168f4f7885da25db9e1490c86cec0de054ec175beb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1079, + "startColumn": 3, + "charOffset": 28857, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1077, + "startColumn": 3, + "charOffset": 28800, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONST_PROP_BLOCKSOLID:\n\t\t\treturn it.blockSolid;\n\t\tcase CONST_PROP_MOVABLE:\n\t\t\treturn canBeMoved();\n\t\tcase CONST_PROP_HASHEIGHT:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "750b058f4a3b6d7340357a699bda11290ab7a45fe206480224feb82bde820fb0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1081, + "startColumn": 3, + "charOffset": 28908, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1079, + "startColumn": 3, + "charOffset": 28855, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONST_PROP_MOVABLE:\n\t\t\treturn canBeMoved();\n\t\tcase CONST_PROP_HASHEIGHT:\n\t\t\treturn it.hasHeight;\n\t\tcase CONST_PROP_BLOCKPROJECTILE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe9a4a757c478aa21db8f5a0e32551144f0f119a80dc7629c190904b4253e08a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1083, + "startColumn": 3, + "charOffset": 28961, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1081, + "startColumn": 3, + "charOffset": 28906, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONST_PROP_HASHEIGHT:\n\t\t\treturn it.hasHeight;\n\t\tcase CONST_PROP_BLOCKPROJECTILE:\n\t\t\treturn it.blockProjectile;\n\t\tcase CONST_PROP_BLOCKPATH:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7b125983de62b0b25d9dc3f7e54b2859df7de8004f572314b522b6ada888c3a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1085, + "startColumn": 3, + "charOffset": 29026, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1083, + "startColumn": 3, + "charOffset": 28959, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONST_PROP_BLOCKPROJECTILE:\n\t\t\treturn it.blockProjectile;\n\t\tcase CONST_PROP_BLOCKPATH:\n\t\t\treturn it.blockPathFind;\n\t\tcase CONST_PROP_ISVERTICAL:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7935850aa99fcb393e8d266052c711be1ba6bed8d48779df273224325a549631" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1087, + "startColumn": 3, + "charOffset": 29083, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1085, + "startColumn": 3, + "charOffset": 29024, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONST_PROP_BLOCKPATH:\n\t\t\treturn it.blockPathFind;\n\t\tcase CONST_PROP_ISVERTICAL:\n\t\t\treturn it.isVertical;\n\t\tcase CONST_PROP_ISHORIZONTAL:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78a446c23d8e2f01e70dfe3d71b780a0126de9261c274e0a3718c39c7f17a2c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1089, + "startColumn": 3, + "charOffset": 29138, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1087, + "startColumn": 3, + "charOffset": 29081, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONST_PROP_ISVERTICAL:\n\t\t\treturn it.isVertical;\n\t\tcase CONST_PROP_ISHORIZONTAL:\n\t\t\treturn it.isHorizontal;\n\t\tcase CONST_PROP_IMMOVABLEBLOCKSOLID:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1af78f9104b76317c700dba788c91da75c592fb18fb4703f22db776ad8b6394a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1091, + "startColumn": 3, + "charOffset": 29197, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1089, + "startColumn": 3, + "charOffset": 29136, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONST_PROP_ISHORIZONTAL:\n\t\t\treturn it.isHorizontal;\n\t\tcase CONST_PROP_IMMOVABLEBLOCKSOLID:\n\t\t\treturn it.blockSolid && !canBeMoved();\n\t\tcase CONST_PROP_IMMOVABLEBLOCKPATH:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a432be5818ccee903374a834f565a7e472a764cce3f1af9501934bfa6c2b5a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1093, + "startColumn": 3, + "charOffset": 29278, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1091, + "startColumn": 3, + "charOffset": 29195, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONST_PROP_IMMOVABLEBLOCKSOLID:\n\t\t\treturn it.blockSolid && !canBeMoved();\n\t\tcase CONST_PROP_IMMOVABLEBLOCKPATH:\n\t\t\treturn it.blockPathFind && !canBeMoved();\n\t\tcase CONST_PROP_IMMOVABLENOFIELDBLOCKPATH:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82b1aaacf981fdadb5103c77268ee81188b50cbe1add691d24d5c3dba9013f4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1095, + "startColumn": 3, + "charOffset": 29361, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1093, + "startColumn": 3, + "charOffset": 29276, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONST_PROP_IMMOVABLEBLOCKPATH:\n\t\t\treturn it.blockPathFind && !canBeMoved();\n\t\tcase CONST_PROP_IMMOVABLENOFIELDBLOCKPATH:\n\t\t\treturn !it.isMagicField() && it.blockPathFind && !canBeMoved();\n\t\tcase CONST_PROP_NOFIELDBLOCKPATH:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2536c22ca94035997bc80dd2ba37b6ca62f27090583b69060fe2907b2a92f2f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1097, + "startColumn": 3, + "charOffset": 29473, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1095, + "startColumn": 3, + "charOffset": 29359, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONST_PROP_IMMOVABLENOFIELDBLOCKPATH:\n\t\t\treturn !it.isMagicField() && it.blockPathFind && !canBeMoved();\n\t\tcase CONST_PROP_NOFIELDBLOCKPATH:\n\t\t\treturn !it.isMagicField() && it.blockPathFind;\n\t\tcase CONST_PROP_SUPPORTHANGABLE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7b125983de62b0b25d9dc3f7e54b2859df7de8004f572314b522b6ada888c3a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1099, + "startColumn": 3, + "charOffset": 29559, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1097, + "startColumn": 3, + "charOffset": 29471, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONST_PROP_NOFIELDBLOCKPATH:\n\t\t\treturn !it.isMagicField() && it.blockPathFind;\n\t\tcase CONST_PROP_SUPPORTHANGABLE:\n\t\t\treturn it.isHorizontal || it.isVertical;\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e97687bcaeff4b04f5ded1316d1a582844c262ec876d9fb2d3c2d42d7d354c6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1101, + "startColumn": 3, + "charOffset": 29638, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 1099, + "startColumn": 3, + "charOffset": 29557, + "charLength": 7, + "snippet": { + "text": "\t\tcase CONST_PROP_SUPPORTHANGABLE:\n\t\t\treturn it.isHorizontal || it.isVertical;\n\t\tdefault:\n\t\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5cb7372b8692c0d669dfb6ab57801038c2c0cbc9f31f3dc5fdeeee10c5dc017e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'getDescriptions' has cognitive complexity of 462 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1136, + "startColumn": 7, + "charOffset": 30466, + "charLength": 15, + "snippet": { + "text": "getDescriptions" + } + }, + "contextRegion": { + "startLine": 1134, + "startColumn": 7, + "charOffset": 30410, + "charLength": 15, + "snippet": { + "text": "\nstd::vector>\nItem::getDescriptions(const ItemType &it, std::shared_ptr item /*= nullptr*/) {\n\tstd::ostringstream ss;\n\tstd::vector> descriptions;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26448b0d8235df607aecb63acb7f8d0d184bed4782ac374fc296e1b3888b6b29" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1136, + "startColumn": 65, + "charOffset": 30524, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 1134, + "startColumn": 65, + "charOffset": 30410, + "charLength": 4, + "snippet": { + "text": "\nstd::vector>\nItem::getDescriptions(const ItemType &it, std::shared_ptr item /*= nullptr*/) {\n\tstd::ostringstream ss;\n\tstd::vector> descriptions;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4951e38322c973dfdf7db584056db2bf8bbd8bec583f1bc6bd8705f209ec2edb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1140, + "startColumn": 23, + "charOffset": 30682, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 1138, + "startColumn": 23, + "charOffset": 30570, + "charLength": 2, + "snippet": { + "text": "\tstd::vector> descriptions;\n\tbool isTradeable = true;\n\tdescriptions.reserve(30);\n\n\tif (item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fd23756c5ffac866aad886cf2b880aa178648b4bef67931fdc6dfb61709df74" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1144, + "startColumn": 3, + "charOffset": 30808, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1142, + "startColumn": 3, + "charOffset": 30688, + "charLength": 2, + "snippet": { + "text": "\tif (item) {\n\t\tconst std::string &specialDescription = item->getAttribute(ItemAttribute_t::DESCRIPTION);\n\t\tif (!specialDescription.empty()) {\n\t\t\tdescriptions.emplace_back(\"Description\", specialDescription);\n\t\t} else if (!it.description.empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b7aa5c3e959706a3c34e01b2ac744a7a0e2d30d318daac06da94807d18ac01d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1145, + "startColumn": 17, + "charOffset": 30859, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1143, + "startColumn": 17, + "charOffset": 30701, + "charLength": 12, + "snippet": { + "text": "\t\tconst std::string &specialDescription = item->getAttribute(ItemAttribute_t::DESCRIPTION);\n\t\tif (!specialDescription.empty()) {\n\t\t\tdescriptions.emplace_back(\"Description\", specialDescription);\n\t\t} else if (!it.description.empty()) {\n\t\t\tdescriptions.emplace_back(\"Description\", it.description);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46de68529cc6a08efde99d47bed6822c6682ab1b075c9dcf16182d0f4d370fbf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1147, + "startColumn": 17, + "charOffset": 30964, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1145, + "startColumn": 17, + "charOffset": 30843, + "charLength": 12, + "snippet": { + "text": "\t\t\tdescriptions.emplace_back(\"Description\", specialDescription);\n\t\t} else if (!it.description.empty()) {\n\t\t\tdescriptions.emplace_back(\"Description\", it.description);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22d1862334e704fc4a350c1f27d32af6e9cb17aadbf3cef43500e42706951949" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1151, + "startColumn": 17, + "charOffset": 31060, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1149, + "startColumn": 17, + "charOffset": 31013, + "charLength": 12, + "snippet": { + "text": "\n\t\tif (item->getContainer()) {\n\t\t\tdescriptions.emplace_back(\"Capacity\", std::to_string(item->getContainer()->capacity()));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d757c2480ff648a995f0d345a3ef2f4e8ac568321c72011ea7653df7b4a34f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1157, + "startColumn": 18, + "charOffset": 31278, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1155, + "startColumn": 18, + "charOffset": 31165, + "charLength": 12, + "snippet": { + "text": "\t\t\tauto charges = item->getAttribute(ItemAttribute_t::CHARGES);\n\t\t\tif (charges != 0) {\n\t\t\t\tdescriptions.emplace_back(\"Charges\", std::to_string(charges));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fcfe9852dd5a8bedb9a35168fe10d02e06509e6c822bcba31e8045b7fe599293" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1162, + "startColumn": 3, + "charOffset": 31378, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1160, + "startColumn": 3, + "charOffset": 31337, + "charLength": 2, + "snippet": { + "text": "\n\t\tint32_t attack = item->getAttack();\n\t\tif (it.isRanged()) {\n\t\t\tbool separator = false;\n\t\t\tif (attack != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7f380633305e53e72361d6f48f52e999e7c984fc4b35146ccbeabe69debfba8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-signed-char-misuse", + "ruleIndex": 86, + "kind": "fail", + "level": "warning", + "message": { + "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1168, + "startColumn": 28, + "charOffset": 31534, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 1166, + "startColumn": 28, + "charOffset": 31480, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tseparator = true;\n\t\t\t}\n\t\t\tif (int32_t hitChance = item->getHitChance();\n\t\t\t hitChance != 0) {\n\t\t\t\tif (separator) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e70972aad00c4d0c8771bd6d8f3609326999f246ff5192a56268a60a82a8f76" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1183, + "startColumn": 17, + "charOffset": 31923, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1181, + "startColumn": 17, + "charOffset": 31844, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss << static_cast(shootRange) << \" fields\";\n\t\t\t}\n\t\t\tdescriptions.emplace_back(\"Attack\", ss.str());\n\t\t} else if (!it.isRanged() && attack != 0) {\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE && it.abilities->elementDamage != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1992cffc0366d851c4cdc8978b7282827adc18fcc62a41281f309b0049304f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1188, + "startColumn": 18, + "charOffset": 32256, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1186, + "startColumn": 18, + "charOffset": 32106, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << attack << \" physical +\" << it.abilities->elementDamage << ' ' << getCombatName(it.abilities->elementType);\n\t\t\t\tdescriptions.emplace_back(\"Attack\", ss.str());\n\t\t\t} else {\n\t\t\t\tdescriptions.emplace_back(\"Attack\", std::to_string(attack));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e6c63ba09a0253b6a09ae183423a14e1d2ddbde7d1bbeaede836e146b345c8f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1190, + "startColumn": 18, + "charOffset": 32319, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1188, + "startColumn": 18, + "charOffset": 32239, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tdescriptions.emplace_back(\"Attack\", ss.str());\n\t\t\t} else {\n\t\t\t\tdescriptions.emplace_back(\"Attack\", std::to_string(attack));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1509ec5024ed2185aa3d7ce1c2b3745e178fd0225957b2a62bbd0863549734a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-signed-char-misuse", + "ruleIndex": 86, + "kind": "fail", + "level": "warning", + "message": { + "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1194, + "startColumn": 23, + "charOffset": 32399, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 1192, + "startColumn": 23, + "charOffset": 32372, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tint32_t hitChance = item->getHitChance();\n\t\tif (hitChance != 0) {\n\t\t\tdescriptions.emplace_back(\"HitChance\", std::to_string(hitChance));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a7f978284b61abd9f67bada4ba07b97ed5ddd82788527dd953343cb52824ec9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1196, + "startColumn": 17, + "charOffset": 32461, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1194, + "startColumn": 17, + "charOffset": 32377, + "charLength": 12, + "snippet": { + "text": "\t\tint32_t hitChance = item->getHitChance();\n\t\tif (hitChance != 0) {\n\t\t\tdescriptions.emplace_back(\"HitChance\", std::to_string(hitChance));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f4a73405aba9d5a95204a6118f646e12fd1bb5b3977d8ba85fb186872f1e2a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1199, + "startColumn": 3, + "charOffset": 32522, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 1197, + "startColumn": 3, + "charOffset": 32515, + "charLength": 7, + "snippet": { + "text": "\t\t}\n\n\t\tint32_t defense = item->getDefense(), extraDefense = item->getExtraDefense();\n\t\tif (defense != 0 || extraDefense != 0 || item->getWeaponType() == WEAPON_MISSILE) {\n\t\t\tif (extraDefense != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1bcdd1c51b3da86b20981840fe83b691dfe3dc45d97eca1f7912d8df2120907" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1199, + "startColumn": 3, + "charOffset": 32522, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 1197, + "startColumn": 3, + "charOffset": 32515, + "charLength": 7, + "snippet": { + "text": "\t\t}\n\n\t\tint32_t defense = item->getDefense(), extraDefense = item->getExtraDefense();\n\t\tif (defense != 0 || extraDefense != 0 || item->getWeaponType() == WEAPON_MISSILE) {\n\t\t\tif (extraDefense != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a5526d744a2381cb575456f1d118232b157df08b09234d0486bd43747211441" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1204, + "startColumn": 18, + "charOffset": 32823, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1202, + "startColumn": 18, + "charOffset": 32714, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << defense << ' ' << std::showpos << extraDefense << std::noshowpos;\n\t\t\t\tdescriptions.emplace_back(\"Defence\", ss.str());\n\t\t\t} else {\n\t\t\t\tdescriptions.emplace_back(\"Defence\", std::to_string(defense));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79e3c454b7551e84eca9364cd059d554fbdf558c2baaef84ead353b28abebbfe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1206, + "startColumn": 18, + "charOffset": 32887, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1204, + "startColumn": 18, + "charOffset": 32806, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tdescriptions.emplace_back(\"Defence\", ss.str());\n\t\t\t} else {\n\t\t\t\tdescriptions.emplace_back(\"Defence\", std::to_string(defense));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7af66e46094d53264d8dbd951fdb62ee61f7b069fc8013b5d2b609dc7902e61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1212, + "startColumn": 17, + "charOffset": 33019, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1210, + "startColumn": 17, + "charOffset": 32947, + "charLength": 12, + "snippet": { + "text": "\t\tint32_t armor = item->getArmor();\n\t\tif (armor != 0) {\n\t\t\tdescriptions.emplace_back(\"Armor\", std::to_string(armor));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a5471d770553489e8cba4474829cf2c2b053c8c07d81cfaefae4327e3afc8ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1219, + "startColumn": 4, + "charOffset": 33155, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1217, + "startColumn": 4, + "charOffset": 33109, + "charLength": 3, + "snippet": { + "text": "\t\t\tss.str(\"\");\n\t\t\tbool protection = false;\n\t\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\tif (it.abilities->absorbPercent[i] == 0) {\n\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8cd41cb87a255154232fdabd6bea6834c0fa6ea6a3f84cf099418ee2fb7066fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1220, + "startColumn": 9, + "charOffset": 33207, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1218, + "startColumn": 9, + "charOffset": 33124, + "charLength": 2, + "snippet": { + "text": "\t\t\tbool protection = false;\n\t\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\tif (it.abilities->absorbPercent[i] == 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74725c86916e240500a4879f677e459152bdd66e08136edd9e53d067879d4011" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1228, + "startColumn": 72, + "charOffset": 33385, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1226, + "startColumn": 72, + "charOffset": 33307, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tss << fmt::format(\"{} {:+}%\", getCombatName(indexToCombatType(i)), it.abilities->fieldAbsorbPercent[i]);\n\t\t\t\tprotection = true;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5673662b306410be25e90cfe18b3ede3fdb1f1a9cde7d5edc8c49a18fe78ce1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1232, + "startColumn": 18, + "charOffset": 33489, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1230, + "startColumn": 18, + "charOffset": 33446, + "charLength": 12, + "snippet": { + "text": "\t\t\t}\n\t\t\tif (protection) {\n\t\t\t\tdescriptions.emplace_back(\"Protection\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "841d1edd0ad4cd2a3ce04ba166a8694fe4836d97694d446dd062cacb42d75190" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1238, + "startColumn": 8, + "charOffset": 33601, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1236, + "startColumn": 8, + "charOffset": 33551, + "charLength": 2, + "snippet": { + "text": "\t\t\tss.str(\"\");\n\t\t\tbool skillBoost = false;\n\t\t\tif (it.abilities->speed) {\n\t\t\t\tss << std::showpos << \"speed \" << (it.abilities->speed >> 1) << std::noshowpos;\n\t\t\t\tskillBoost = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a178a9936ccc9a25041af77972cef5a723cd92d5b7e4c6e2140deb8eb87d6fb5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1238, + "startColumn": 8, + "charOffset": 33601, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1236, + "startColumn": 8, + "charOffset": 33551, + "charLength": 2, + "snippet": { + "text": "\t\t\tss.str(\"\");\n\t\t\tbool skillBoost = false;\n\t\t\tif (it.abilities->speed) {\n\t\t\t\tss << std::showpos << \"speed \" << (it.abilities->speed >> 1) << std::noshowpos;\n\t\t\t\tskillBoost = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd45af5b4bf205ea342a720f8d33a17cabcd29468a2c7c65f646f72a4fc183bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1239, + "startColumn": 40, + "charOffset": 33663, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1237, + "startColumn": 40, + "charOffset": 33566, + "charLength": 2, + "snippet": { + "text": "\t\t\tbool skillBoost = false;\n\t\t\tif (it.abilities->speed) {\n\t\t\t\tss << std::showpos << \"speed \" << (it.abilities->speed >> 1) << std::noshowpos;\n\t\t\t\tskillBoost = true;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a9d54b2e37a83624de8812564b5d10002787a2c2040d3e2628a6e886376267d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1243, + "startColumn": 4, + "charOffset": 33740, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1241, + "startColumn": 4, + "charOffset": 33731, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; i++) {\n\t\t\t\tif (!it.abilities->skills[i]) {\n\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f4823970f1307157be1932730520dfb16e79c726dc320cfec2cf5ef4a677a20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1244, + "startColumn": 9, + "charOffset": 33805, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1242, + "startColumn": 9, + "charOffset": 33736, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; i++) {\n\t\t\t\tif (!it.abilities->skills[i]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ad8030903dbc5a79cdd67338a952ddd97862b9c91fbdf9005a8fa30299e0e38" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1244, + "startColumn": 10, + "charOffset": 33806, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1242, + "startColumn": 10, + "charOffset": 33736, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; i++) {\n\t\t\t\tif (!it.abilities->skills[i]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5aef630cb088ff3336f263225a4bda803bcd44f17b0cad691e6caa0926bcb6d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1244, + "startColumn": 10, + "charOffset": 33806, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1242, + "startColumn": 10, + "charOffset": 33736, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; i++) {\n\t\t\t\tif (!it.abilities->skills[i]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04623440ea7bbadc42210bcb6a3be204b3995049e38e22ec4300b9cd012b1632" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1252, + "startColumn": 53, + "charOffset": 33953, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1250, + "startColumn": 53, + "charOffset": 33894, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tss << std::showpos << getSkillName(i) << ' ' << it.abilities->skills[i] << std::noshowpos;\n\t\t\t\tskillBoost = true;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13a8b9853e12e7028c46009ace1a07b8cd92e6890df469b6ab1b329049f5d7ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1256, + "startColumn": 8, + "charOffset": 34032, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1254, + "startColumn": 8, + "charOffset": 34019, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->stats[STAT_MAGICPOINTS]) {\n\t\t\t\tif (skillBoost) {\n\t\t\t\t\tss << \", \";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ddbadeadf7c0642f315f3d70759479fa07a30dfe1cbfdbe16d78cbff6e16fc0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1256, + "startColumn": 8, + "charOffset": 34032, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1254, + "startColumn": 8, + "charOffset": 34019, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->stats[STAT_MAGICPOINTS]) {\n\t\t\t\tif (skillBoost) {\n\t\t\t\t\tss << \", \";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af3577e3f44ea0453552100e0467ba0221f3187c2261a8351b92458e5c5967ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1265, + "startColumn": 4, + "charOffset": 34252, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1263, + "startColumn": 4, + "charOffset": 34243, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (uint8_t i = SKILL_CRITICAL_HIT_CHANCE; i <= SKILL_LAST; i++) {\n\t\t\t\tauto skill = item ? item->getSkill(static_cast(i)) : it.getSkill(static_cast(i));\n\t\t\t\tif (!skill) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f4823970f1307157be1932730520dfb16e79c726dc320cfec2cf5ef4a677a20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1267, + "startColumn": 9, + "charOffset": 34434, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1265, + "startColumn": 9, + "charOffset": 34249, + "charLength": 1, + "snippet": { + "text": "\t\t\tfor (uint8_t i = SKILL_CRITICAL_HIT_CHANCE; i <= SKILL_LAST; i++) {\n\t\t\t\tauto skill = item ? item->getSkill(static_cast(i)) : it.getSkill(static_cast(i));\n\t\t\t\tif (!skill) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8b17c177245671f28da4d94a8c06c081f9b3cf5850fe88e4b2fa2d3b4c786c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1267, + "startColumn": 10, + "charOffset": 34435, + "charLength": 5, + "snippet": { + "text": "skill" + } + }, + "contextRegion": { + "startLine": 1265, + "startColumn": 10, + "charOffset": 34249, + "charLength": 5, + "snippet": { + "text": "\t\t\tfor (uint8_t i = SKILL_CRITICAL_HIT_CHANCE; i <= SKILL_LAST; i++) {\n\t\t\t\tauto skill = item ? item->getSkill(static_cast(i)) : it.getSkill(static_cast(i));\n\t\t\t\tif (!skill) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "027ea4ba92685c6be51cfd56b8604b37fcd3e263bbd5879f9cbf8ee2fd79d942" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1281, + "startColumn": 11, + "charOffset": 34648, + "charLength": 5, + "snippet": { + "text": "skill" + } + }, + "contextRegion": { + "startLine": 1279, + "startColumn": 11, + "charOffset": 34586, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tss << getSkillName(i) << ' ';\n\t\t\t\t// Show float\n\t\t\t\tss << skill / 100.;\n\t\t\t\tss << '%' << std::noshowpos;\n\t\t\t\tskillBoost = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "629037deb121d4db287be9f5fa3e0c35d84e40ded294e7306f0a92dcddd0e89e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1287, + "startColumn": 18, + "charOffset": 34762, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1285, + "startColumn": 18, + "charOffset": 34723, + "charLength": 12, + "snippet": { + "text": "\n\t\t\tif (skillBoost) {\n\t\t\t\tdescriptions.emplace_back(\"Skill Boost\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f019a05306d8ef6ac63a878f3868fd1ddc04a839e23ceedb8093ce4669861daa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1290, + "startColumn": 8, + "charOffset": 34814, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1288, + "startColumn": 8, + "charOffset": 34801, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->stats[STAT_MAGICPOINTS]) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << it.abilities->stats[STAT_MAGICPOINTS] << std::noshowpos;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a70e8312470097785ea2c2a36a0d68b3459bf237ada594c2391b9197b2d59c71" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1290, + "startColumn": 8, + "charOffset": 34814, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1288, + "startColumn": 8, + "charOffset": 34801, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->stats[STAT_MAGICPOINTS]) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << it.abilities->stats[STAT_MAGICPOINTS] << std::noshowpos;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "015c84056cff9949d2c755f4738bf85ecc64b2c15b8228e6b544cd7b8fd9dc7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1293, + "startColumn": 18, + "charOffset": 34971, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1291, + "startColumn": 18, + "charOffset": 34855, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << it.abilities->stats[STAT_MAGICPOINTS] << std::noshowpos;\n\t\t\t\tdescriptions.emplace_back(\"Magic Level\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6992ef65bee62e6513575f5180bd64e0856a0c7c4d95536a0aaed2d82e6d4396" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1296, + "startColumn": 4, + "charOffset": 35019, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1294, + "startColumn": 4, + "charOffset": 35010, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\t\tif (it.abilities->specializedMagicLevel[i]) {\n\t\t\t\t\tss.str(\"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2b0635def31a525839cfbde261f8e0b0a609f375f08cb153323622c4aeb75b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "11 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1296, + "startColumn": 29, + "charOffset": 35044, + "charLength": 2, + "snippet": { + "text": "11" + } + }, + "contextRegion": { + "startLine": 1294, + "startColumn": 29, + "charOffset": 35010, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\t\tif (it.abilities->specializedMagicLevel[i]) {\n\t\t\t\t\tss.str(\"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0e8dfff97062b88ff8b046e4ae0c06a25da6f53b03f50e877a9c256b9e8617e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1297, + "startColumn": 9, + "charOffset": 35063, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1295, + "startColumn": 9, + "charOffset": 35015, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\t\tif (it.abilities->specializedMagicLevel[i]) {\n\t\t\t\t\tss.str(\"\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ea7f87df7d2dd1e87a10dc0eb37cb4016c12148b50875b32e5a51950b678ad4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1297, + "startColumn": 9, + "charOffset": 35063, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1295, + "startColumn": 9, + "charOffset": 35015, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\t\tif (it.abilities->specializedMagicLevel[i]) {\n\t\t\t\t\tss.str(\"\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a948550e1f38c4c653dc7c9cfd3108e2ed935c18d84b56c692c87b4ccce5aa66" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1297, + "startColumn": 9, + "charOffset": 35063, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1295, + "startColumn": 9, + "charOffset": 35015, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\t\tif (it.abilities->specializedMagicLevel[i]) {\n\t\t\t\t\tss.str(\"\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "840c2a7c2d16e6a215c1dc6f602cb5e72feec5e5bf78db562b31877ffdcf9437" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1300, + "startColumn": 28, + "charOffset": 35150, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1298, + "startColumn": 28, + "charOffset": 35105, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tss.str(\"\");\n\n\t\t\t\t\tss << std::showpos << it.abilities->specializedMagicLevel[i] << std::noshowpos;\n\t\t\t\t\tstd::string combatName = getCombatName(indexToCombatType(i));\n\t\t\t\t\tcombatName[0] = toupper(combatName[0]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5161fe76035757ec77dcc7d4b971e05102b582112298592cae02c2693b6711b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-11", + "ruleIndex": 423, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-11: The plain char type shall only be used for the storage and use of character values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1302, + "startColumn": 6, + "charOffset": 35280, + "charLength": 10, + "snippet": { + "text": "combatName" + } + }, + "contextRegion": { + "startLine": 1300, + "startColumn": 6, + "charOffset": 35123, + "charLength": 10, + "snippet": { + "text": "\t\t\t\t\tss << std::showpos << it.abilities->specializedMagicLevel[i] << std::noshowpos;\n\t\t\t\t\tstd::string combatName = getCombatName(indexToCombatType(i));\n\t\t\t\t\tcombatName[0] = toupper(combatName[0]);\n\t\t\t\t\tdescriptions.emplace_back(combatName + \" Magic Level\", ss.str());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "379990840c496d6dc7551bd44ab6406269474be4f39bbcafc048979e7759e2a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'value_type' (aka 'char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1302, + "startColumn": 22, + "charOffset": 35296, + "charLength": 7, + "snippet": { + "text": "toupper" + } + }, + "contextRegion": { + "startLine": 1300, + "startColumn": 22, + "charOffset": 35123, + "charLength": 7, + "snippet": { + "text": "\t\t\t\t\tss << std::showpos << it.abilities->specializedMagicLevel[i] << std::noshowpos;\n\t\t\t\t\tstd::string combatName = getCombatName(indexToCombatType(i));\n\t\t\t\t\tcombatName[0] = toupper(combatName[0]);\n\t\t\t\t\tdescriptions.emplace_back(combatName + \" Magic Level\", ss.str());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d515dbb18ca305c142283712e6a77a0e0170e88867818359053485bcd7199717" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1302, + "startColumn": 22, + "charOffset": 35296, + "charLength": 7, + "snippet": { + "text": "toupper" + } + }, + "contextRegion": { + "startLine": 1300, + "startColumn": 22, + "charOffset": 35123, + "charLength": 7, + "snippet": { + "text": "\t\t\t\t\tss << std::showpos << it.abilities->specializedMagicLevel[i] << std::noshowpos;\n\t\t\t\t\tstd::string combatName = getCombatName(indexToCombatType(i));\n\t\t\t\t\tcombatName[0] = toupper(combatName[0]);\n\t\t\t\t\tdescriptions.emplace_back(combatName + \" Magic Level\", ss.str());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1222f6e4bf8d00f7a34beaec1ed65800f9cc08095daccb4582c13c319ce1f4ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1303, + "startColumn": 19, + "charOffset": 35338, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1301, + "startColumn": 19, + "charOffset": 35208, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t\tstd::string combatName = getCombatName(indexToCombatType(i));\n\t\t\t\t\tcombatName[0] = toupper(combatName[0]);\n\t\t\t\t\tdescriptions.emplace_back(combatName + \" Magic Level\", ss.str());\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "405d47e298395b2604edeb34f48585dcaa8a81396d91af3398698c1d7c44af81" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1307, + "startColumn": 8, + "charOffset": 35410, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1305, + "startColumn": 8, + "charOffset": 35397, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->magicShieldCapacityFlat || it.abilities->magicShieldCapacityPercent) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << it.abilities->magicShieldCapacityFlat << std::noshowpos << \" and \" << it.abilities->magicShieldCapacityPercent << \"%\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58437c9db07ccc28d2b1c013051dffecc38291f71b6607e8111be2da7d7aff77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1307, + "startColumn": 8, + "charOffset": 35410, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1305, + "startColumn": 8, + "charOffset": 35397, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->magicShieldCapacityFlat || it.abilities->magicShieldCapacityPercent) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << it.abilities->magicShieldCapacityFlat << std::noshowpos << \" and \" << it.abilities->magicShieldCapacityPercent << \"%\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b5357f9e6cfa3ddea4f56f08afbc8b33ec11e8be2e6c596f7618f36b081ba4b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1307, + "startColumn": 46, + "charOffset": 35448, + "charLength": 2, + "snippet": { + "text": "||" + } + }, + "contextRegion": { + "startLine": 1305, + "startColumn": 46, + "charOffset": 35397, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->magicShieldCapacityFlat || it.abilities->magicShieldCapacityPercent) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << it.abilities->magicShieldCapacityFlat << std::noshowpos << \" and \" << it.abilities->magicShieldCapacityPercent << \"%\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49f208a0c4abf0e8d5899986b7bf67b0fc3cd19ea11f5289d0122f6382117fdb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1307, + "startColumn": 49, + "charOffset": 35451, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1305, + "startColumn": 49, + "charOffset": 35397, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->magicShieldCapacityFlat || it.abilities->magicShieldCapacityPercent) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << it.abilities->magicShieldCapacityFlat << std::noshowpos << \" and \" << it.abilities->magicShieldCapacityPercent << \"%\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c57a6403b70ebdd409cd4cac8176ff8d075d7f36b163511f513ee99ef09fd8db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1310, + "startColumn": 18, + "charOffset": 35673, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1308, + "startColumn": 18, + "charOffset": 35495, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << it.abilities->magicShieldCapacityFlat << std::noshowpos << \" and \" << it.abilities->magicShieldCapacityPercent << \"%\";\n\t\t\t\tdescriptions.emplace_back(\"Magic Shield Capacity\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc6dba5f52b5c1d98f6540aeed91ebf940dbc70840dc0fb45f7a70c144f12e79" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1313, + "startColumn": 8, + "charOffset": 35735, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1311, + "startColumn": 8, + "charOffset": 35722, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->perfectShotRange) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << it.abilities->perfectShotDamage << std::noshowpos << \" at range \" << unsigned(it.abilities->perfectShotRange);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fe5b7d789783e5808197cc81b3542164826da48b1741522292ac00f1a4fefa6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1313, + "startColumn": 8, + "charOffset": 35735, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1311, + "startColumn": 8, + "charOffset": 35722, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->perfectShotRange) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << it.abilities->perfectShotDamage << std::noshowpos << \" at range \" << unsigned(it.abilities->perfectShotRange);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19c51e632a3b59c498aa954e39179d90c543025f815d639d9ee7af4afa848c37" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1315, + "startColumn": 96, + "charOffset": 35880, + "charLength": 8, + "snippet": { + "text": "unsigned" + } + }, + "contextRegion": { + "startLine": 1313, + "startColumn": 96, + "charOffset": 35728, + "charLength": 8, + "snippet": { + "text": "\t\t\tif (it.abilities->perfectShotRange) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << it.abilities->perfectShotDamage << std::noshowpos << \" at range \" << unsigned(it.abilities->perfectShotRange);\n\t\t\t\tdescriptions.emplace_back(\"Perfect Shot\", ss.str());\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f8f92b92bfdd0b7e31d1240c9344227b29b0c4d176d8f76636739079c4cd8be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1316, + "startColumn": 18, + "charOffset": 35939, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1314, + "startColumn": 18, + "charOffset": 35769, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << it.abilities->perfectShotDamage << std::noshowpos << \" at range \" << unsigned(it.abilities->perfectShotRange);\n\t\t\t\tdescriptions.emplace_back(\"Perfect Shot\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94a679ef22e805877ecb24f1b324555cfda0f87061ec902f1f50861628ca6800" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1319, + "startColumn": 8, + "charOffset": 35992, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1317, + "startColumn": 8, + "charOffset": 35979, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)]) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << it.abilities->reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee8b085cf04d8aa52275581d3db05dd20a8a6e87b50d43d8406aad795a4d3b14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1319, + "startColumn": 8, + "charOffset": 35992, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1317, + "startColumn": 8, + "charOffset": 35979, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)]) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << it.abilities->reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "111e99a108e52ce28e90a199320508a6db265ed220842902969f0d156e9658e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1319, + "startColumn": 8, + "charOffset": 35992, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1317, + "startColumn": 8, + "charOffset": 35979, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)]) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << it.abilities->reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e29c316a906fd17933ce929c2181880157ab63d0b544fb8b4cd9e33c45156437" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1321, + "startColumn": 11, + "charOffset": 36089, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1319, + "startColumn": 11, + "charOffset": 35985, + "charLength": 2, + "snippet": { + "text": "\t\t\tif (it.abilities->reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)]) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << it.abilities->reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)];\n\t\t\t\tdescriptions.emplace_back(\"Damage Reflection\", ss.str());\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd58186c8811a6bd9d91baa8e0b6942b9ed0aecd8dc9336d1786946890a99a50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1322, + "startColumn": 18, + "charOffset": 36175, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1320, + "startColumn": 18, + "charOffset": 36063, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << it.abilities->reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)];\n\t\t\t\tdescriptions.emplace_back(\"Damage Reflection\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34b0c78bc5f7df8eef039095b004c7bdfc7710d16442a81c3cf7e31ffee199c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1325, + "startColumn": 8, + "charOffset": 36233, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1323, + "startColumn": 8, + "charOffset": 36220, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->speed) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << it.abilities->speed << std::noshowpos;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "637992e596c1d8c55ee5b18626ef4da4be62eee6a29c05f626b2eadf094eb931" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1325, + "startColumn": 8, + "charOffset": 36233, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1323, + "startColumn": 8, + "charOffset": 36220, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->speed) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << it.abilities->speed << std::noshowpos;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc53d461053e4bf0cc6f997a387cb9fb81e46918a43e5b2325fde8b9516e50d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1328, + "startColumn": 18, + "charOffset": 36354, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1326, + "startColumn": 18, + "charOffset": 36256, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << it.abilities->speed << std::noshowpos;\n\t\t\t\tdescriptions.emplace_back(\"Speed\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efbeca38b962af726e889bc62784bd7bd6f4702810491c386771b18be8b32e2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1331, + "startColumn": 8, + "charOffset": 36400, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1329, + "startColumn": 8, + "charOffset": 36387, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->cleavePercent) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << (it.abilities->cleavePercent) << std::noshowpos << \"%\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fd89ab7df2c00a57ff911779f04d716e2d4c432099790d2c82683de02febe6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1331, + "startColumn": 8, + "charOffset": 36400, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1329, + "startColumn": 8, + "charOffset": 36387, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->cleavePercent) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << (it.abilities->cleavePercent) << std::noshowpos << \"%\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81643d5429670684d6170cc92de86538842be7a21fb2cdee4cb5b2f5a2078b02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1334, + "startColumn": 18, + "charOffset": 36546, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1332, + "startColumn": 18, + "charOffset": 36431, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << (it.abilities->cleavePercent) << std::noshowpos << \"%\";\n\t\t\t\tdescriptions.emplace_back(\"Cleave\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c4c2b647a0c5754f668b3cbd2fe9b2b9e161def9a379a6d6112fd4e40c4c3ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1340, + "startColumn": 18, + "charOffset": 36714, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1338, + "startColumn": 18, + "charOffset": 36654, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << \"Hard Drinking\";\n\t\t\t\tdescriptions.emplace_back(\"Effect\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d4d917e737dcb2aad30f9a87d875e96c59b8d59e44b63c57f06b7bbd06b4a04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1346, + "startColumn": 18, + "charOffset": 36847, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1344, + "startColumn": 18, + "charOffset": 36788, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << \"Invisibility\";\n\t\t\t\tdescriptions.emplace_back(\"Effect\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e532217868926918451bc2030713a086edd009d871c591fa14a039a06c08c259" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1352, + "startColumn": 18, + "charOffset": 36990, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1350, + "startColumn": 18, + "charOffset": 36924, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << \"Faster Regeneration\";\n\t\t\t\tdescriptions.emplace_back(\"Effect\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e9032410c3f9805cadaa0b8e248a52e98b4043b4419efdc05a97e55fbc9badf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1358, + "startColumn": 18, + "charOffset": 37123, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1356, + "startColumn": 18, + "charOffset": 37065, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << \"Mana Shield\";\n\t\t\t\tdescriptions.emplace_back(\"Effect\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37995195e962932d0559c13a20147342e1cea5952a7a03bc99ee7acef6b00acb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1361, + "startColumn": 4, + "charOffset": 37166, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1359, + "startColumn": 4, + "charOffset": 37157, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\tif (it.abilities->absorbPercent[i] == 0) {\n\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02452cc37f368db10585bb79a615ee6e606708972926eec2788066cf2dc4af80" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1362, + "startColumn": 9, + "charOffset": 37218, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1360, + "startColumn": 9, + "charOffset": 37162, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\tif (it.abilities->absorbPercent[i] == 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03b18e8bdea93013407965c7d7794661e0b6a210cf81ee33a2db5afac974d669" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1368, + "startColumn": 27, + "charOffset": 37374, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1366, + "startColumn": 27, + "charOffset": 37279, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << getCombatName(indexToCombatType(i)) << ' '\n\t\t\t\t << std::showpos << it.abilities->absorbPercent[i] << std::noshowpos << '%';\n\t\t\t\tdescriptions.emplace_back(\"Protection\", ss.str());\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "454348736e354b99246383c80bf7490c4e2474c76eae030675d56b298f4b3d7b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1369, + "startColumn": 18, + "charOffset": 37448, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1367, + "startColumn": 18, + "charOffset": 37295, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss << getCombatName(indexToCombatType(i)) << ' '\n\t\t\t\t << std::showpos << it.abilities->absorbPercent[i] << std::noshowpos << '%';\n\t\t\t\tdescriptions.emplace_back(\"Protection\", ss.str());\n\t\t\t}\n\t\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "710ac43b2ca312d9bb4aec76579ad01204e03bc8221ff957b0e42b69445726ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1371, + "startColumn": 4, + "charOffset": 37494, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1369, + "startColumn": 4, + "charOffset": 37431, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tdescriptions.emplace_back(\"Protection\", ss.str());\n\t\t\t}\n\t\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\tif (it.abilities->fieldAbsorbPercent[i] == 0) {\n\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28d5f464df4750ccb892729b876d27204778db1df1649ee415b566d97e9358cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1372, + "startColumn": 9, + "charOffset": 37546, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1370, + "startColumn": 9, + "charOffset": 37486, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\t\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\tif (it.abilities->fieldAbsorbPercent[i] == 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19b44025e8ae9bf35f7a66c56625dd01bb0d4e852b2aa0c2d93f01fddf4d7365" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1377, + "startColumn": 72, + "charOffset": 37699, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1375, + "startColumn": 72, + "charOffset": 37611, + "charLength": 2, + "snippet": { + "text": "\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << fmt::format(\"{} {:+}%\", getCombatName(indexToCombatType(i)), it.abilities->fieldAbsorbPercent[i]);\n\t\t\t\tdescriptions.emplace_back(\"Field Protection\", ss.str());\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ded63fbe2e29dd547281b0b780e1db4d86f41f44f672a3cc302b0fe81b9b76fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1378, + "startColumn": 18, + "charOffset": 37754, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1376, + "startColumn": 18, + "charOffset": 37612, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << fmt::format(\"{} {:+}%\", getCombatName(indexToCombatType(i)), it.abilities->fieldAbsorbPercent[i]);\n\t\t\t\tdescriptions.emplace_back(\"Field Protection\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10061f9900f82460c4324feabc7d495405497df9a5e6872fdb1a99c90af94867" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1384, + "startColumn": 18, + "charOffset": 37932, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1382, + "startColumn": 18, + "charOffset": 37872, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << \"Hard Drinking\";\n\t\t\t\tdescriptions.emplace_back(\"Skill Boost\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b723715096b20f35259d24695f37dd0041527cc5b100893628c8fba6b34e2fae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1390, + "startColumn": 18, + "charOffset": 38070, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1388, + "startColumn": 18, + "charOffset": 38011, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << \"Invisibility\";\n\t\t\t\tdescriptions.emplace_back(\"Skill Boost\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef3e55e091fd180db173aefb578c33d26b3e8ab566b554019dabc292a5a0e24b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1396, + "startColumn": 18, + "charOffset": 38218, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1394, + "startColumn": 18, + "charOffset": 38152, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << \"Faster Regeneration\";\n\t\t\t\tdescriptions.emplace_back(\"Skill Boost\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b92c2d538a4b8b43d51e4bd2e51872d4c63b334f6046dac5425028d4fd6315b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1402, + "startColumn": 18, + "charOffset": 38356, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1400, + "startColumn": 18, + "charOffset": 38298, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << \"Mana Shield\";\n\t\t\t\tdescriptions.emplace_back(\"Skill Boost\", ss.str());\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5bf04ee49369a179af3febfd996cc6327313d7d1ba0ad7c69d14b00de2a7a3c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1407, + "startColumn": 17, + "charOffset": 38459, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1405, + "startColumn": 17, + "charOffset": 38404, + "charLength": 12, + "snippet": { + "text": "\n\t\tif (it.upgradeClassification > 0) {\n\t\t\tdescriptions.emplace_back(\"Tier\", std::to_string(item->getTier()));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "057ab48275b01ce5f053dfaec9f9ef97ffcda611134205741e98ebbc73d553d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1412, + "startColumn": 4, + "charOffset": 38584, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1410, + "startColumn": 4, + "charOffset": 38519, + "charLength": 3, + "snippet": { + "text": "\t\tstd::string slotName;\n\t\tif (item->getImbuementSlot() > 0) {\n\t\t\tfor (uint8_t i = 0; i < item->getImbuementSlot(); ++i) {\n\t\t\t\tslotName = fmt::format(\"Imbuement Slot {}\", i + 1);\n\t\t\t\tss.str(\"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3e5d07e4f3afecc26db2787c025652232741f0910caa4319b6cb6aa966b5d41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'castItem' of the variable 'item' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1415, + "startColumn": 16, + "charOffset": 38728, + "charLength": 8, + "snippet": { + "text": "castItem" + } + }, + "contextRegion": { + "startLine": 1413, + "startColumn": 16, + "charOffset": 38641, + "charLength": 8, + "snippet": { + "text": "\t\t\t\tslotName = fmt::format(\"Imbuement Slot {}\", i + 1);\n\t\t\t\tss.str(\"\");\n\t\t\t\tconst auto castItem = item;\n\t\t\t\tif (!castItem) {\n\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13bf95e71af68c2d79a20c225f03c5eca2c5df057027f58aceaeb0e3dc7a6c81" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1416, + "startColumn": 9, + "charOffset": 38753, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1414, + "startColumn": 9, + "charOffset": 38697, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tconst auto castItem = item;\n\t\t\t\tif (!castItem) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "961cb0525e1fd9e103d0af3e6c6042607678e290c12d926bc4ec545f3d9b8c44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1423, + "startColumn": 19, + "charOffset": 38917, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1421, + "startColumn": 19, + "charOffset": 38821, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tif (!castItem->getImbuementInfo(i, &imbuementInfo)) {\n\t\t\t\t\tss << \"empty\";\n\t\t\t\t\tdescriptions.emplace_back(slotName, ss.str());\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58fbb897973a62f5474620f90c6b81fbb7fc406bb6dc7fcf0a3d23215f04b5b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1428, + "startColumn": 9, + "charOffset": 39088, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1426, + "startColumn": 9, + "charOffset": 38972, + "charLength": 1, + "snippet": { + "text": "\n\t\t\t\tconst BaseImbuement* baseImbuement = g_imbuements().getBaseByID(imbuementInfo.imbuement->getBaseID());\n\t\t\t\tif (!baseImbuement) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87752099bf509ef12a7edeb0090966dab8dca6df921ec46276bdc59358dfdab7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const BaseImbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1428, + "startColumn": 10, + "charOffset": 39089, + "charLength": 13, + "snippet": { + "text": "baseImbuement" + } + }, + "contextRegion": { + "startLine": 1426, + "startColumn": 10, + "charOffset": 38972, + "charLength": 13, + "snippet": { + "text": "\n\t\t\t\tconst BaseImbuement* baseImbuement = g_imbuements().getBaseByID(imbuementInfo.imbuement->getBaseID());\n\t\t\t\tif (!baseImbuement) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "131c389d68d1c2ee5b05f12f3c3f16b316bad62d73a93995af1bc7f46fbd817d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1432, + "startColumn": 45, + "charOffset": 39172, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 1430, + "startColumn": 45, + "charOffset": 39121, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tauto minutes = imbuementInfo.duration / 60;\n\t\t\t\tauto hours = minutes / 60;\n\t\t\t\tss << fmt::format(\"{} {} ({}), lasts {:02}:{:02}h while fighting.\", baseImbuement->name, imbuementInfo.imbuement->getName(), imbuementInfo.imbuement->getDescription(), hours, minutes % 60);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d06fa2e3648f9b038c9fe5ca123cd702a0cda5fc581544483cd87b061be43608" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1433, + "startColumn": 28, + "charOffset": 39203, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 1431, + "startColumn": 28, + "charOffset": 39127, + "charLength": 2, + "snippet": { + "text": "\n\t\t\t\tauto minutes = imbuementInfo.duration / 60;\n\t\t\t\tauto hours = minutes / 60;\n\t\t\t\tss << fmt::format(\"{} {} ({}), lasts {:02}:{:02}h while fighting.\", baseImbuement->name, imbuementInfo.imbuement->getName(), imbuementInfo.imbuement->getDescription(), hours, minutes % 60);\n\t\t\t\tisTradeable = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1fd11014d95a1b602ad17bcb4d9f3ece1d1afd11f6506a40fe16f93a75cfc3b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1434, + "startColumn": 190, + "charOffset": 39396, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 1432, + "startColumn": 190, + "charOffset": 39128, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tauto minutes = imbuementInfo.duration / 60;\n\t\t\t\tauto hours = minutes / 60;\n\t\t\t\tss << fmt::format(\"{} {} ({}), lasts {:02}:{:02}h while fighting.\", baseImbuement->name, imbuementInfo.imbuement->getName(), imbuementInfo.imbuement->getDescription(), hours, minutes % 60);\n\t\t\t\tisTradeable = false;\n\t\t\t\tdescriptions.emplace_back(slotName, ss.str());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab3daeb9b8a6aad23d700cb2d1f133c169481f1674ac693c940dac6fcf4ae543" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1436, + "startColumn": 18, + "charOffset": 39443, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1434, + "startColumn": 18, + "charOffset": 39207, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss << fmt::format(\"{} {} ({}), lasts {:02}:{:02}h while fighting.\", baseImbuement->name, imbuementInfo.imbuement->getName(), imbuementInfo.imbuement->getDescription(), hours, minutes % 60);\n\t\t\t\tisTradeable = false;\n\t\t\t\tdescriptions.emplace_back(slotName, ss.str());\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da7b2829f0bd301170a2e38777ed6796407513c01ad5815ca77e654c8475b34d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1442, + "startColumn": 17, + "charOffset": 39614, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1440, + "startColumn": 17, + "charOffset": 39487, + "charLength": 12, + "snippet": { + "text": "\t\tstd::string augmentsDescription = parseAugmentDescription(item, true);\n\t\tif (!augmentsDescription.empty()) {\n\t\t\tdescriptions.emplace_back(\"Augments\", augmentsDescription);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42b863698ec7a4f9355d3c0a95604fc9a15ec9dbd89397468d9841bf2a100dc8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1448, + "startColumn": 17, + "charOffset": 39805, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1446, + "startColumn": 17, + "charOffset": 39686, + "charLength": 12, + "snippet": { + "text": "\t\t\tss.str(\"\");\n\t\t\tss << fmt::format(\"{:04}\", item->getAttribute(ItemAttribute_t::ACTIONID));\n\t\t\tdescriptions.emplace_back(\"Key\", ss.str());\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a4cb46a4cb213f1bfa881564d8bc81cf3c6a71bdd8540f1b0c99aa162a1899c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1461, + "startColumn": 17, + "charOffset": 40115, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1459, + "startColumn": 17, + "charOffset": 40073, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss << \"Nothing\";\n\t\t\t}\n\t\t\tdescriptions.emplace_back(\"Contain\", \"Nothing\");\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1992cffc0366d851c4cdc8978b7282827adc18fcc62a41281f309b0049304f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1465, + "startColumn": 17, + "charOffset": 40193, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1463, + "startColumn": 17, + "charOffset": 40155, + "charLength": 12, + "snippet": { + "text": "\n\t\tif (it.isRune()) {\n\t\t\tdescriptions.emplace_back(\"Rune Spell Name\", it.runeSpellName);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8dd761a2c8f4f36094f5ded604710621de217e3aa336014a17625241e5d0a979" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1474, + "startColumn": 18, + "charOffset": 40437, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1472, + "startColumn": 18, + "charOffset": 40353, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t// Missing Actual Charges\n\t\t\t\tss << charges << \"/\" << charges;\n\t\t\t\tdescriptions.emplace_back(\"Charges\", ss.str());\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e3aa1f52dab438ff738b801eae73ca17f72f9a9472bc995510e11467f15118a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1481, + "startColumn": 17, + "charOffset": 40560, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1479, + "startColumn": 17, + "charOffset": 40507, + "charLength": 12, + "snippet": { + "text": "\t\t\tss.str(\"\");\n\t\t\tss << \"brand-new\";\n\t\t\tdescriptions.emplace_back(\"Expires\", ss.str());\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "766ee4dc5aff3506b2c6622caa397de4b5e469e4eb571e95fcbd4612642be166" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1487, + "startColumn": 17, + "charOffset": 40691, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 1485, + "startColumn": 17, + "charOffset": 40639, + "charLength": 2, + "snippet": { + "text": "\t\tif (weight != 0) {\n\t\t\tss.str(\"\");\n\t\t\tif (weight < 10) {\n\t\t\t\tss << \"0.0\" << weight;\n\t\t\t} else if (weight < 100) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60a1f22c0d6a68fe25c4a1560b51616658925405d3a7f0350f85104617ad439f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1489, + "startColumn": 24, + "charOffset": 40747, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 1487, + "startColumn": 24, + "charOffset": 40675, + "charLength": 3, + "snippet": { + "text": "\t\t\tif (weight < 10) {\n\t\t\t\tss << \"0.0\" << weight;\n\t\t\t} else if (weight < 100) {\n\t\t\t\tss << \"0.\" << weight;\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5dd030e4c27fc418129158d578ebfededc9800adef2b074bb957d17f3a6dcff3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1493, + "startColumn": 18, + "charOffset": 40864, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 1491, + "startColumn": 18, + "charOffset": 40780, + "charLength": 6, + "snippet": { + "text": "\t\t\t} else {\n\t\t\t\tstd::string weightString = std::to_string(weight);\n\t\t\t\tweightString.insert(weightString.end() - 2, '.');\n\t\t\t\tss << weightString;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f83d1cd8e632da2d2f9e2825da360edb51e86ef7a75d07e244532c60ca93b8cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1499, + "startColumn": 18, + "charOffset": 40995, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1497, + "startColumn": 18, + "charOffset": 40931, + "charLength": 12, + "snippet": { + "text": "\t\t\tss << \" oz\";\n\t\t\tif (item->getContainer()) {\n\t\t\t\tdescriptions.emplace_back(\"Total Weight\", ss.str());\n\t\t\t} else {\n\t\t\t\tdescriptions.emplace_back(\"Weight\", ss.str());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0be1f01f811848b1e348f1d5b9a55ac8ec3eccb6813a1f8bf31dda8707783166" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1501, + "startColumn": 18, + "charOffset": 41064, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1499, + "startColumn": 18, + "charOffset": 40978, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tdescriptions.emplace_back(\"Total Weight\", ss.str());\n\t\t\t} else {\n\t\t\t\tdescriptions.emplace_back(\"Weight\", ss.str());\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5072245ed082db15a520d540adc03379d0bb87b2c9d5b017dd73761d879b7cb0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1505, + "startColumn": 7, + "charOffset": 41114, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1503, + "startColumn": 7, + "charOffset": 41103, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (it.wieldInfo & WIELDINFO_PREMIUM) {\n\t\t\tdescriptions.emplace_back(\"Required\", \"Premium\");\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c06010b7432bb0a5893efb0eb349758c8011f2937958bf83c8c6578bf297fada" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1505, + "startColumn": 7, + "charOffset": 41114, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1503, + "startColumn": 7, + "charOffset": 41103, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (it.wieldInfo & WIELDINFO_PREMIUM) {\n\t\t\tdescriptions.emplace_back(\"Required\", \"Premium\");\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20fca5ab4a12e81e899bfc210e2e153dbddd39dfa929d1906ff0eda084cb8beb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1505, + "startColumn": 20, + "charOffset": 41127, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1503, + "startColumn": 20, + "charOffset": 41103, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif (it.wieldInfo & WIELDINFO_PREMIUM) {\n\t\t\tdescriptions.emplace_back(\"Required\", \"Premium\");\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2796144bb04da389c9237ad2bd391d678b3d8887022c04321214659204fdcc43" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1506, + "startColumn": 17, + "charOffset": 41166, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1504, + "startColumn": 17, + "charOffset": 41107, + "charLength": 12, + "snippet": { + "text": "\n\t\tif (it.wieldInfo & WIELDINFO_PREMIUM) {\n\t\t\tdescriptions.emplace_back(\"Required\", \"Premium\");\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab66e36020419c2861a5caf44e4172c0cbf2a1d5c304a1913e5ba0838498cad7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1510, + "startColumn": 17, + "charOffset": 41253, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1508, + "startColumn": 17, + "charOffset": 41207, + "charLength": 12, + "snippet": { + "text": "\n\t\tif (it.minReqLevel != 0) {\n\t\t\tdescriptions.emplace_back(\"Required Level\", std::to_string(it.minReqLevel));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4c504b57efde28e8469fbddd0047ab110bd3dfa0399195e5740d49c140e7705" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1514, + "startColumn": 17, + "charOffset": 41372, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1512, + "startColumn": 17, + "charOffset": 41321, + "charLength": 12, + "snippet": { + "text": "\n\t\tif (it.minReqMagicLevel != 0) {\n\t\t\tdescriptions.emplace_back(\"Required Magic Level\", std::to_string(it.minReqMagicLevel));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c411aa9e97fb20f30ac04babbf5d7458138fc87b517d4ed684bce5c6d436ab5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1518, + "startColumn": 17, + "charOffset": 41504, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1516, + "startColumn": 17, + "charOffset": 41451, + "charLength": 12, + "snippet": { + "text": "\n\t\tif (!it.vocationString.empty()) {\n\t\t\tdescriptions.emplace_back(\"Professions\", it.vocationString);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "57d0428932343c0a1125bfd1856175c355cb7b33c3610e8f6b99719fb5e05273" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1523, + "startColumn": 17, + "charOffset": 41628, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1521, + "startColumn": 17, + "charOffset": 41557, + "charLength": 12, + "snippet": { + "text": "\t\t// Missing Tradeable Conditions\n\t\tif (isTradeable) {\n\t\t\tdescriptions.emplace_back(\"Tradeable\", \"yes\");\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c411aa9e97fb20f30ac04babbf5d7458138fc87b517d4ed684bce5c6d436ab5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1527, + "startColumn": 7, + "charOffset": 41730, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1525, + "startColumn": 7, + "charOffset": 41666, + "charLength": 2, + "snippet": { + "text": "\n\t\tstd::string weaponName = getWeaponName(it.weaponType);\n\t\tif (it.slotPosition & SLOTP_TWO_HAND) {\n\t\t\tif (!weaponName.empty()) {\n\t\t\t\tweaponName += \", two-handed\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8880046ba77a63b210970363f68567d9c930524b1be54bb71fafdae60de12b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1527, + "startColumn": 7, + "charOffset": 41730, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1525, + "startColumn": 7, + "charOffset": 41666, + "charLength": 2, + "snippet": { + "text": "\n\t\tstd::string weaponName = getWeaponName(it.weaponType);\n\t\tif (it.slotPosition & SLOTP_TWO_HAND) {\n\t\t\tif (!weaponName.empty()) {\n\t\t\t\tweaponName += \", two-handed\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e03c4ed5b151194d305e094079ba3ba04963ee67b17a447e92f7f95ab6042fa3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1527, + "startColumn": 23, + "charOffset": 41746, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1525, + "startColumn": 23, + "charOffset": 41666, + "charLength": 1, + "snippet": { + "text": "\n\t\tstd::string weaponName = getWeaponName(it.weaponType);\n\t\tif (it.slotPosition & SLOTP_TWO_HAND) {\n\t\t\tif (!weaponName.empty()) {\n\t\t\t\tweaponName += \", two-handed\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92f556f1290d35ca3dccd8e6cd230ed5fd984c93007ea12a70439f87a7141c70" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1535, + "startColumn": 17, + "charOffset": 41927, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1533, + "startColumn": 17, + "charOffset": 41878, + "charLength": 12, + "snippet": { + "text": "\t\t}\n\t\tif (!weaponName.empty()) {\n\t\t\tdescriptions.emplace_back(\"Weapon Type\", weaponName);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a4834296a574cc5dc628f0b00851b9cb52543918d3a2266ec19ae4f9268cf2d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1538, + "startColumn": 3, + "charOffset": 41975, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1536, + "startColumn": 3, + "charOffset": 41968, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (it.slotPosition & SLOTP_BACKPACK) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"container\");\n\t\t} else if (it.slotPosition & SLOTP_HEAD) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e96344e313c478e8c1a7e49b0d597eb9db82f1ada00ed31ab37b8d726dca8b15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1538, + "startColumn": 7, + "charOffset": 41979, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1536, + "startColumn": 7, + "charOffset": 41968, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (it.slotPosition & SLOTP_BACKPACK) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"container\");\n\t\t} else if (it.slotPosition & SLOTP_HEAD) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9612de88cdd40486459e00f33c61becde5c6b3a4d70f33a1f086fea4f62e72c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1538, + "startColumn": 7, + "charOffset": 41979, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1536, + "startColumn": 7, + "charOffset": 41968, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (it.slotPosition & SLOTP_BACKPACK) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"container\");\n\t\t} else if (it.slotPosition & SLOTP_HEAD) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb23a873e6b533918ef0a14f5ca767bd6454e8e45f641e41df2a06996cc8d401" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1538, + "startColumn": 23, + "charOffset": 41995, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1536, + "startColumn": 23, + "charOffset": 41968, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif (it.slotPosition & SLOTP_BACKPACK) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"container\");\n\t\t} else if (it.slotPosition & SLOTP_HEAD) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53f72f7629852f4472618be3df48ecfa7e172371fae4ee38ac0b2df1cb1918ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1539, + "startColumn": 17, + "charOffset": 42031, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1537, + "startColumn": 17, + "charOffset": 41972, + "charLength": 12, + "snippet": { + "text": "\n\t\tif (it.slotPosition & SLOTP_BACKPACK) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"container\");\n\t\t} else if (it.slotPosition & SLOTP_HEAD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"head\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e06b598901dc7aba72d1620c2b650134ac2a24ef8e466bc4b47ad9074c2236f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1540, + "startColumn": 14, + "charOffset": 42088, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1538, + "startColumn": 14, + "charOffset": 41973, + "charLength": 2, + "snippet": { + "text": "\t\tif (it.slotPosition & SLOTP_BACKPACK) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"container\");\n\t\t} else if (it.slotPosition & SLOTP_HEAD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"head\");\n\t\t} else if (it.slotPosition & SLOTP_ARMOR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f04a75e44d9645958d31f722d1e7e21db7cf5f47e438da95cc3d5db6700439ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1540, + "startColumn": 14, + "charOffset": 42088, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1538, + "startColumn": 14, + "charOffset": 41973, + "charLength": 2, + "snippet": { + "text": "\t\tif (it.slotPosition & SLOTP_BACKPACK) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"container\");\n\t\t} else if (it.slotPosition & SLOTP_HEAD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"head\");\n\t\t} else if (it.slotPosition & SLOTP_ARMOR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6284011dc030872291f82aeb0fd476ccb8fab5b0d0baad1f8934250b9cc8dba9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1540, + "startColumn": 30, + "charOffset": 42104, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1538, + "startColumn": 30, + "charOffset": 41973, + "charLength": 1, + "snippet": { + "text": "\t\tif (it.slotPosition & SLOTP_BACKPACK) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"container\");\n\t\t} else if (it.slotPosition & SLOTP_HEAD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"head\");\n\t\t} else if (it.slotPosition & SLOTP_ARMOR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "938406db05cc23e313e842d930187c80f6d84da00ca98599380a306b6698e0c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1541, + "startColumn": 17, + "charOffset": 42136, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1539, + "startColumn": 17, + "charOffset": 42015, + "charLength": 12, + "snippet": { + "text": "\t\t\tdescriptions.emplace_back(\"Body Position\", \"container\");\n\t\t} else if (it.slotPosition & SLOTP_HEAD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"head\");\n\t\t} else if (it.slotPosition & SLOTP_ARMOR) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"body\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5add0c0682a9924b623378c556f502b62ce2985571f77ecff78e45347b6c2fd0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1542, + "startColumn": 14, + "charOffset": 42188, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1540, + "startColumn": 14, + "charOffset": 42075, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_HEAD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"head\");\n\t\t} else if (it.slotPosition & SLOTP_ARMOR) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"body\");\n\t\t} else if (it.slotPosition & SLOTP_LEGS) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a326c90571c97a34d8ede4cba9261c5a9f1cbe8fa84c922035ff512740a7bb1f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1542, + "startColumn": 14, + "charOffset": 42188, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1540, + "startColumn": 14, + "charOffset": 42075, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_HEAD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"head\");\n\t\t} else if (it.slotPosition & SLOTP_ARMOR) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"body\");\n\t\t} else if (it.slotPosition & SLOTP_LEGS) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1cebb4823ef520e99320519b606c46d7c01dd9489e5ecbeeac4f7266a0af75af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1542, + "startColumn": 30, + "charOffset": 42204, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1540, + "startColumn": 30, + "charOffset": 42075, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_HEAD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"head\");\n\t\t} else if (it.slotPosition & SLOTP_ARMOR) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"body\");\n\t\t} else if (it.slotPosition & SLOTP_LEGS) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c4ec51515c0c99fbb9a6af9f00a2147620250b5ca87a88d617734af0035da67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1543, + "startColumn": 17, + "charOffset": 42237, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1541, + "startColumn": 17, + "charOffset": 42120, + "charLength": 12, + "snippet": { + "text": "\t\t\tdescriptions.emplace_back(\"Body Position\", \"head\");\n\t\t} else if (it.slotPosition & SLOTP_ARMOR) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"body\");\n\t\t} else if (it.slotPosition & SLOTP_LEGS) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"legs\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "feccdb9b77fdc7b9af91fb15e2ea84e065e24c004fcc2e01966ef0e02993854e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1544, + "startColumn": 14, + "charOffset": 42289, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1542, + "startColumn": 14, + "charOffset": 42175, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_ARMOR) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"body\");\n\t\t} else if (it.slotPosition & SLOTP_LEGS) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"legs\");\n\t\t} else if (it.slotPosition & SLOTP_FEET) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f3af5622c878210edb3ab2a4bd2e958d73d60f858eb499e3aebe7957c0191d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1544, + "startColumn": 14, + "charOffset": 42289, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1542, + "startColumn": 14, + "charOffset": 42175, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_ARMOR) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"body\");\n\t\t} else if (it.slotPosition & SLOTP_LEGS) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"legs\");\n\t\t} else if (it.slotPosition & SLOTP_FEET) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d48010ac3f0444ffd2ad447728075ac887bd7319c3d0d662bd51101604b7505" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1544, + "startColumn": 30, + "charOffset": 42305, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1542, + "startColumn": 30, + "charOffset": 42175, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_ARMOR) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"body\");\n\t\t} else if (it.slotPosition & SLOTP_LEGS) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"legs\");\n\t\t} else if (it.slotPosition & SLOTP_FEET) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "068331d25fdfe581f884db40795d08e2057c43782e6bed6819239c9ab62430ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1545, + "startColumn": 17, + "charOffset": 42337, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1543, + "startColumn": 17, + "charOffset": 42221, + "charLength": 12, + "snippet": { + "text": "\t\t\tdescriptions.emplace_back(\"Body Position\", \"body\");\n\t\t} else if (it.slotPosition & SLOTP_LEGS) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"legs\");\n\t\t} else if (it.slotPosition & SLOTP_FEET) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"feet\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03bc9b452ee9a0f00862a6efc00e9e6279471c2a298dd9078ceddd420db16a55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1546, + "startColumn": 14, + "charOffset": 42389, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1544, + "startColumn": 14, + "charOffset": 42276, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_LEGS) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"legs\");\n\t\t} else if (it.slotPosition & SLOTP_FEET) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"feet\");\n\t\t} else if (it.slotPosition & SLOTP_NECKLACE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40b46942ab8c1db5d122a5589399798906b1f8d83b38d26a108bbb78be19a6db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1546, + "startColumn": 14, + "charOffset": 42389, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1544, + "startColumn": 14, + "charOffset": 42276, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_LEGS) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"legs\");\n\t\t} else if (it.slotPosition & SLOTP_FEET) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"feet\");\n\t\t} else if (it.slotPosition & SLOTP_NECKLACE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ca6999f6cd80a89108d89fef3e8577f0721e566fb6590d71f646dcfe0589024" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1546, + "startColumn": 30, + "charOffset": 42405, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1544, + "startColumn": 30, + "charOffset": 42276, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_LEGS) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"legs\");\n\t\t} else if (it.slotPosition & SLOTP_FEET) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"feet\");\n\t\t} else if (it.slotPosition & SLOTP_NECKLACE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "372d66fa8b74261a0d3f4ac3613928508393613fdd430ce84907cbb31b9fa101" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1547, + "startColumn": 17, + "charOffset": 42437, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1545, + "startColumn": 17, + "charOffset": 42321, + "charLength": 12, + "snippet": { + "text": "\t\t\tdescriptions.emplace_back(\"Body Position\", \"legs\");\n\t\t} else if (it.slotPosition & SLOTP_FEET) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"feet\");\n\t\t} else if (it.slotPosition & SLOTP_NECKLACE) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"neck\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07312cc79550974cd281e479388a4f959498705046e8177b3cab4f750d82f76b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1548, + "startColumn": 14, + "charOffset": 42489, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1546, + "startColumn": 14, + "charOffset": 42376, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_FEET) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"feet\");\n\t\t} else if (it.slotPosition & SLOTP_NECKLACE) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"neck\");\n\t\t} else if (it.slotPosition & SLOTP_RING) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b2dde52319381da71c11914be0f2bcf69a58b3ebad3daa2bcada64292eeca93" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1548, + "startColumn": 14, + "charOffset": 42489, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1546, + "startColumn": 14, + "charOffset": 42376, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_FEET) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"feet\");\n\t\t} else if (it.slotPosition & SLOTP_NECKLACE) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"neck\");\n\t\t} else if (it.slotPosition & SLOTP_RING) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1e7ac63f3bcc7b91d116ae0f3d5e4a617a729564f265c997ac193332e086aa8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1548, + "startColumn": 30, + "charOffset": 42505, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1546, + "startColumn": 30, + "charOffset": 42376, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_FEET) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"feet\");\n\t\t} else if (it.slotPosition & SLOTP_NECKLACE) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"neck\");\n\t\t} else if (it.slotPosition & SLOTP_RING) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c99f5fdb601c90afe89c255bc1a16bfd2dc27380c5a318f91e0616775ee41fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1549, + "startColumn": 17, + "charOffset": 42541, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1547, + "startColumn": 17, + "charOffset": 42421, + "charLength": 12, + "snippet": { + "text": "\t\t\tdescriptions.emplace_back(\"Body Position\", \"feet\");\n\t\t} else if (it.slotPosition & SLOTP_NECKLACE) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"neck\");\n\t\t} else if (it.slotPosition & SLOTP_RING) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"finger\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f295b03963bd049628d97ef023659bcc998d358e68f1d301d0806166a198847" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1550, + "startColumn": 14, + "charOffset": 42593, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1548, + "startColumn": 14, + "charOffset": 42476, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_NECKLACE) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"neck\");\n\t\t} else if (it.slotPosition & SLOTP_RING) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"finger\");\n\t\t} else if (it.slotPosition & SLOTP_AMMO) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e09cfd58357e0153a1033b12bb47c34e00cc7e137f5111186c65c803c52b85d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1550, + "startColumn": 14, + "charOffset": 42593, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1548, + "startColumn": 14, + "charOffset": 42476, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_NECKLACE) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"neck\");\n\t\t} else if (it.slotPosition & SLOTP_RING) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"finger\");\n\t\t} else if (it.slotPosition & SLOTP_AMMO) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "daf1b61d96ccb0dc4438a9ee7ef25271c4daae9f189558b04b4537a19d1ef1eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1550, + "startColumn": 30, + "charOffset": 42609, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1548, + "startColumn": 30, + "charOffset": 42476, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_NECKLACE) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"neck\");\n\t\t} else if (it.slotPosition & SLOTP_RING) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"finger\");\n\t\t} else if (it.slotPosition & SLOTP_AMMO) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78a1cfca067a35657223700ebae3de568aef4122b4e1bc0c1c1a41fe96cf71db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1551, + "startColumn": 17, + "charOffset": 42641, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1549, + "startColumn": 17, + "charOffset": 42525, + "charLength": 12, + "snippet": { + "text": "\t\t\tdescriptions.emplace_back(\"Body Position\", \"neck\");\n\t\t} else if (it.slotPosition & SLOTP_RING) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"finger\");\n\t\t} else if (it.slotPosition & SLOTP_AMMO) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"extra slot\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7294ba5d296a619f1c61185b0297c36b82089c97392d15ec68fe7099edbd85e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1552, + "startColumn": 14, + "charOffset": 42695, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1550, + "startColumn": 14, + "charOffset": 42580, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_RING) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"finger\");\n\t\t} else if (it.slotPosition & SLOTP_AMMO) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"extra slot\");\n\t\t} else if (it.slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77a3471f02227e9958ee06026e9fc0c51cafa83f8e3e7c87669e8aeb0a9a74d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1552, + "startColumn": 14, + "charOffset": 42695, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1550, + "startColumn": 14, + "charOffset": 42580, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_RING) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"finger\");\n\t\t} else if (it.slotPosition & SLOTP_AMMO) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"extra slot\");\n\t\t} else if (it.slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e587ce4b39765b60c837dcccef7d7c78ba508c1b2d849b2d24a2f29880830351" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1552, + "startColumn": 30, + "charOffset": 42711, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1550, + "startColumn": 30, + "charOffset": 42580, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_RING) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"finger\");\n\t\t} else if (it.slotPosition & SLOTP_AMMO) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"extra slot\");\n\t\t} else if (it.slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f731be13a11776a5ec21870d0781e6ceaaa4ba58ae21d30c9879ae1d17e06acf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1553, + "startColumn": 17, + "charOffset": 42743, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1551, + "startColumn": 17, + "charOffset": 42625, + "charLength": 12, + "snippet": { + "text": "\t\t\tdescriptions.emplace_back(\"Body Position\", \"finger\");\n\t\t} else if (it.slotPosition & SLOTP_AMMO) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"extra slot\");\n\t\t} else if (it.slotPosition & SLOTP_TWO_HAND) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"both hands\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4861c7a400eb73d897ba774228a7d3094380473e5a05ad624f8c2fa01ff7c221" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1554, + "startColumn": 14, + "charOffset": 42801, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1552, + "startColumn": 14, + "charOffset": 42682, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_AMMO) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"extra slot\");\n\t\t} else if (it.slotPosition & SLOTP_TWO_HAND) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"both hands\");\n\t\t} else if ((it.slotPosition & SLOTP_LEFT) && it.weaponType != WEAPON_SHIELD) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f3af5622c878210edb3ab2a4bd2e958d73d60f858eb499e3aebe7957c0191d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1554, + "startColumn": 14, + "charOffset": 42801, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1552, + "startColumn": 14, + "charOffset": 42682, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_AMMO) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"extra slot\");\n\t\t} else if (it.slotPosition & SLOTP_TWO_HAND) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"both hands\");\n\t\t} else if ((it.slotPosition & SLOTP_LEFT) && it.weaponType != WEAPON_SHIELD) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d48010ac3f0444ffd2ad447728075ac887bd7319c3d0d662bd51101604b7505" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1554, + "startColumn": 30, + "charOffset": 42817, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1552, + "startColumn": 30, + "charOffset": 42682, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_AMMO) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"extra slot\");\n\t\t} else if (it.slotPosition & SLOTP_TWO_HAND) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"both hands\");\n\t\t} else if ((it.slotPosition & SLOTP_LEFT) && it.weaponType != WEAPON_SHIELD) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "068331d25fdfe581f884db40795d08e2057c43782e6bed6819239c9ab62430ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1555, + "startColumn": 17, + "charOffset": 42853, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1553, + "startColumn": 17, + "charOffset": 42727, + "charLength": 12, + "snippet": { + "text": "\t\t\tdescriptions.emplace_back(\"Body Position\", \"extra slot\");\n\t\t} else if (it.slotPosition & SLOTP_TWO_HAND) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"both hands\");\n\t\t} else if ((it.slotPosition & SLOTP_LEFT) && it.weaponType != WEAPON_SHIELD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"weapon hand\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67c21192006d5acdadebca5d6cc274fba493f41126f382bd9f9854989453d735" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1556, + "startColumn": 14, + "charOffset": 42911, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1554, + "startColumn": 14, + "charOffset": 42788, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_TWO_HAND) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"both hands\");\n\t\t} else if ((it.slotPosition & SLOTP_LEFT) && it.weaponType != WEAPON_SHIELD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"weapon hand\");\n\t\t} else if (it.slotPosition & SLOTP_RIGHT) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05c057f0a31acee874308dfeab7578c7404f7519957c8f6dc2d2902c46c827fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1556, + "startColumn": 14, + "charOffset": 42911, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1554, + "startColumn": 14, + "charOffset": 42788, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_TWO_HAND) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"both hands\");\n\t\t} else if ((it.slotPosition & SLOTP_LEFT) && it.weaponType != WEAPON_SHIELD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"weapon hand\");\n\t\t} else if (it.slotPosition & SLOTP_RIGHT) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4fc6a4f46556cfb801acf590ded8391386fa92c969e77112126d269937e75991" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1556, + "startColumn": 31, + "charOffset": 42928, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1554, + "startColumn": 31, + "charOffset": 42788, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_TWO_HAND) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"both hands\");\n\t\t} else if ((it.slotPosition & SLOTP_LEFT) && it.weaponType != WEAPON_SHIELD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"weapon hand\");\n\t\t} else if (it.slotPosition & SLOTP_RIGHT) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ee3563a0b76d5c7f732c09223f3e5384fedc9c029fa8cb443989f6889b08399" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1556, + "startColumn": 45, + "charOffset": 42942, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 1554, + "startColumn": 45, + "charOffset": 42788, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_TWO_HAND) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"both hands\");\n\t\t} else if ((it.slotPosition & SLOTP_LEFT) && it.weaponType != WEAPON_SHIELD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"weapon hand\");\n\t\t} else if (it.slotPosition & SLOTP_RIGHT) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e16a5d086f0a9cd717d5a1bfd434abac9cc53f4e0d4dc6877c77397039982fd0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1557, + "startColumn": 17, + "charOffset": 42995, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1555, + "startColumn": 17, + "charOffset": 42837, + "charLength": 12, + "snippet": { + "text": "\t\t\tdescriptions.emplace_back(\"Body Position\", \"both hands\");\n\t\t} else if ((it.slotPosition & SLOTP_LEFT) && it.weaponType != WEAPON_SHIELD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"weapon hand\");\n\t\t} else if (it.slotPosition & SLOTP_RIGHT) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"shield hand\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dab237faa508e74475b63c3009e3ce04cef8526e51b1211b79c2f3255698ce0c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1558, + "startColumn": 14, + "charOffset": 43054, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1556, + "startColumn": 14, + "charOffset": 42898, + "charLength": 2, + "snippet": { + "text": "\t\t} else if ((it.slotPosition & SLOTP_LEFT) && it.weaponType != WEAPON_SHIELD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"weapon hand\");\n\t\t} else if (it.slotPosition & SLOTP_RIGHT) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"shield hand\");\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37f60c9bd4584b4d7cc7dd6f6016dae1f06d14c76cc3c20ff42acb142c640335" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1558, + "startColumn": 14, + "charOffset": 43054, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1556, + "startColumn": 14, + "charOffset": 42898, + "charLength": 2, + "snippet": { + "text": "\t\t} else if ((it.slotPosition & SLOTP_LEFT) && it.weaponType != WEAPON_SHIELD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"weapon hand\");\n\t\t} else if (it.slotPosition & SLOTP_RIGHT) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"shield hand\");\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52f69f15027c6a13da0b29f16a59d60ce4bc99df73e24be9645dfe3843c331cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1558, + "startColumn": 30, + "charOffset": 43070, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1556, + "startColumn": 30, + "charOffset": 42898, + "charLength": 1, + "snippet": { + "text": "\t\t} else if ((it.slotPosition & SLOTP_LEFT) && it.weaponType != WEAPON_SHIELD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"weapon hand\");\n\t\t} else if (it.slotPosition & SLOTP_RIGHT) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"shield hand\");\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef86d0507a0302ac3f6f3c135a95730b7c466c6999456aaec3556eec3a6948d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1559, + "startColumn": 17, + "charOffset": 43103, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1557, + "startColumn": 17, + "charOffset": 42979, + "charLength": 12, + "snippet": { + "text": "\t\t\tdescriptions.emplace_back(\"Body Position\", \"weapon hand\");\n\t\t} else if (it.slotPosition & SLOTP_RIGHT) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"shield hand\");\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06d9b753352b0782f500b16da28bd62803a606dfc78b73f697354f612dc82787" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1563, + "startColumn": 17, + "charOffset": 43208, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1561, + "startColumn": 17, + "charOffset": 43153, + "charLength": 12, + "snippet": { + "text": "\n\t\tif (it.upgradeClassification > 0) {\n\t\t\tdescriptions.emplace_back(\"Classification\", std::to_string(it.upgradeClassification));\n\t\t}\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e49cf2cc44e153eb4dbb0d0e1f8a5410a0764b7531f7ba662521fb76976606d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1567, + "startColumn": 17, + "charOffset": 43345, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1565, + "startColumn": 17, + "charOffset": 43286, + "charLength": 12, + "snippet": { + "text": "\t} else {\n\t\tif (!it.description.empty()) {\n\t\t\tdescriptions.emplace_back(\"Description\", it.description);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f89ed79b58445303f140fc3046ef73b5d89976e8dd8309c1c29b0ba8f8aaa8bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1571, + "startColumn": 17, + "charOffset": 43437, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1569, + "startColumn": 17, + "charOffset": 43394, + "charLength": 12, + "snippet": { + "text": "\n\t\tif (it.isContainer()) {\n\t\t\tdescriptions.emplace_back(\"Capacity\", std::to_string(it.maxItems));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e41fa3d60054c2e7d0252f4adebd5774182dad24997299259df9de5f39c9acab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1575, + "startColumn": 3, + "charOffset": 43529, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1573, + "startColumn": 3, + "charOffset": 43496, + "charLength": 2, + "snippet": { + "text": "\n\t\tint32_t attack = it.attack;\n\t\tif (it.isRanged()) {\n\t\t\tbool separator = false;\n\t\t\tif (attack != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e196a614f094c685891a89e4b758db3f2eff506c198388e16a51cbc2e15d934" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-signed-char-misuse", + "ruleIndex": 86, + "kind": "fail", + "level": "warning", + "message": { + "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1581, + "startColumn": 28, + "charOffset": 43685, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1579, + "startColumn": 28, + "charOffset": 43631, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tseparator = true;\n\t\t\t}\n\t\t\tif (int32_t hitChance = it.hitChance;\n\t\t\t hitChance != 0) {\n\t\t\t\tif (separator) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73611151f67dcb6a60f01a1dc86679fd71385336d0634bbbae77edd4b3e66d65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1596, + "startColumn": 17, + "charOffset": 44058, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1594, + "startColumn": 17, + "charOffset": 43979, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss << static_cast(shootRange) << \" fields\";\n\t\t\t}\n\t\t\tdescriptions.emplace_back(\"Attack\", ss.str());\n\t\t} else if (!it.isRanged() && attack != 0) {\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE && it.abilities->elementDamage != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "edb369e0bc0b7e4cfa3a1c252be819f8934c621d5c1f790748cc2bb9960e492b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1601, + "startColumn": 18, + "charOffset": 44391, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1599, + "startColumn": 18, + "charOffset": 44241, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << attack << \" physical +\" << it.abilities->elementDamage << ' ' << getCombatName(it.abilities->elementType);\n\t\t\t\tdescriptions.emplace_back(\"Attack\", ss.str());\n\t\t\t} else {\n\t\t\t\tdescriptions.emplace_back(\"Attack\", std::to_string(attack));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0588897a2ee6fd961a71ce11a3ae1b6663548bc2f052b399b8055821e30ae3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1603, + "startColumn": 18, + "charOffset": 44454, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1601, + "startColumn": 18, + "charOffset": 44374, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tdescriptions.emplace_back(\"Attack\", ss.str());\n\t\t\t} else {\n\t\t\t\tdescriptions.emplace_back(\"Attack\", std::to_string(attack));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b5eeb00ecf6cfc9797a53d45fc71781ba979d7b355a08ec4c95b8461d98b6d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1607, + "startColumn": 3, + "charOffset": 44514, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 1605, + "startColumn": 3, + "charOffset": 44507, + "charLength": 7, + "snippet": { + "text": "\t\t}\n\n\t\tint32_t defense = it.defense, extraDefense = it.extraDefense;\n\t\tif (defense != 0 || extraDefense != 0 || it.isMissile()) {\n\t\t\tif (extraDefense != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "957330bdc4146fee7136c80a15c09947fd7109a9039455b61a50b86f7a84e686" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1607, + "startColumn": 3, + "charOffset": 44514, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 1605, + "startColumn": 3, + "charOffset": 44507, + "charLength": 7, + "snippet": { + "text": "\t\t}\n\n\t\tint32_t defense = it.defense, extraDefense = it.extraDefense;\n\t\tif (defense != 0 || extraDefense != 0 || it.isMissile()) {\n\t\t\tif (extraDefense != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80d81faa2b01a30f5bbd983aa3c6d45ed4270eceb2cf4795426771478116f472" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1612, + "startColumn": 18, + "charOffset": 44774, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1610, + "startColumn": 18, + "charOffset": 44665, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << defense << ' ' << std::showpos << extraDefense << std::noshowpos;\n\t\t\t\tdescriptions.emplace_back(\"Defence\", ss.str());\n\t\t\t} else {\n\t\t\t\tdescriptions.emplace_back(\"Defence\", std::to_string(defense));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75efc84ac993ecd3df99685e4e537650cf64ddcf7b5a3fa07545b0edb73585e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1614, + "startColumn": 18, + "charOffset": 44838, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1612, + "startColumn": 18, + "charOffset": 44757, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tdescriptions.emplace_back(\"Defence\", ss.str());\n\t\t\t} else {\n\t\t\t\tdescriptions.emplace_back(\"Defence\", std::to_string(defense));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44e80e99d626c420abd49b41f49c801aed107b2c2b663cd247d86dc0a9f11749" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1620, + "startColumn": 17, + "charOffset": 44962, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1618, + "startColumn": 17, + "charOffset": 44898, + "charLength": 12, + "snippet": { + "text": "\t\tint32_t armor = it.armor;\n\t\tif (armor != 0) {\n\t\t\tdescriptions.emplace_back(\"Armor\", std::to_string(armor));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19f91a5b890c5984ad5f8bd72a340f7c840442013598fc31aee3eea5cb88634e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1627, + "startColumn": 4, + "charOffset": 45098, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1625, + "startColumn": 4, + "charOffset": 45052, + "charLength": 3, + "snippet": { + "text": "\t\t\tss.str(\"\");\n\t\t\tbool protection = false;\n\t\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\tif (it.abilities->absorbPercent[i] == 0) {\n\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61e25f3ce6af8be33765d2eea0b8fec3ffaa31a3bbda4f5a6bd8cd41d6d97e92" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1628, + "startColumn": 9, + "charOffset": 45150, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1626, + "startColumn": 9, + "charOffset": 45067, + "charLength": 2, + "snippet": { + "text": "\t\t\tbool protection = false;\n\t\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\tif (it.abilities->absorbPercent[i] == 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47d26bc6df462d0790398e2e9f75dd781b02d5343c89f43e70c7db4230a84a98" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1636, + "startColumn": 72, + "charOffset": 45328, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1634, + "startColumn": 72, + "charOffset": 45250, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tss << fmt::format(\"{} {:+}%\", getCombatName(indexToCombatType(i)), it.abilities->absorbPercent[i]);\n\t\t\t\tprotection = true;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e77b7320d9116cb2c811f7b563576e8de04e1c9ec64a5b28c243abebe226e2d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1640, + "startColumn": 18, + "charOffset": 45427, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1638, + "startColumn": 18, + "charOffset": 45384, + "charLength": 12, + "snippet": { + "text": "\t\t\t}\n\t\t\tif (protection) {\n\t\t\t\tdescriptions.emplace_back(\"Protection\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9035c335c25885e9d1d8618ffa8975f8e4aa4a896ea571420dcc8f932440a3d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1646, + "startColumn": 8, + "charOffset": 45539, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1644, + "startColumn": 8, + "charOffset": 45489, + "charLength": 2, + "snippet": { + "text": "\t\t\tss.str(\"\");\n\t\t\tbool skillBoost = false;\n\t\t\tif (it.abilities->speed) {\n\t\t\t\tss << std::showpos << \"speed \" << it.abilities->speed << std::noshowpos;\n\t\t\t\tskillBoost = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6e77481a8199ab88c8410754b15312561d623e07d2e24ce430b53d9335076b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1646, + "startColumn": 8, + "charOffset": 45539, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1644, + "startColumn": 8, + "charOffset": 45489, + "charLength": 2, + "snippet": { + "text": "\t\t\tss.str(\"\");\n\t\t\tbool skillBoost = false;\n\t\t\tif (it.abilities->speed) {\n\t\t\t\tss << std::showpos << \"speed \" << it.abilities->speed << std::noshowpos;\n\t\t\t\tskillBoost = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8bd945e9dc97e06a9ea31037cb7a9157e0bd5e560ddf893f1dcbe49d776b0bc3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1651, + "startColumn": 4, + "charOffset": 45671, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1649, + "startColumn": 4, + "charOffset": 45662, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; i++) {\n\t\t\t\tif (!it.abilities->skills[i]) {\n\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee3032d49fb717cc39a72749e14e1ee0d0edddc7fff955c586f808b4983ca766" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1652, + "startColumn": 9, + "charOffset": 45736, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1650, + "startColumn": 9, + "charOffset": 45667, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; i++) {\n\t\t\t\tif (!it.abilities->skills[i]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "088ef6b5423c5e478531bda6a6557324ecf4b3c67ffd52a3b97d0d8c8710ebb2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1652, + "startColumn": 10, + "charOffset": 45737, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1650, + "startColumn": 10, + "charOffset": 45667, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; i++) {\n\t\t\t\tif (!it.abilities->skills[i]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5713af4e102dde88b15b12d67a7f3abe4e1cf5628ffc67394a2e774e23e7e8a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1652, + "startColumn": 10, + "charOffset": 45737, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1650, + "startColumn": 10, + "charOffset": 45667, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; i++) {\n\t\t\t\tif (!it.abilities->skills[i]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "206c9da6b4f969e30b4761e5141c5b2033aaeebd5516a6f38016a1ec5fd163b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1660, + "startColumn": 53, + "charOffset": 45884, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1658, + "startColumn": 53, + "charOffset": 45825, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tss << std::showpos << getSkillName(i) << ' ' << it.abilities->skills[i] << std::noshowpos;\n\t\t\t\tskillBoost = true;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c8fa1020da13c07e999fbd019caee48a451648288c8d46d735da688966eb147" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1664, + "startColumn": 8, + "charOffset": 45963, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1662, + "startColumn": 8, + "charOffset": 45950, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->stats[STAT_MAGICPOINTS]) {\n\t\t\t\tif (skillBoost) {\n\t\t\t\t\tss << \", \";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d656e5109daf1d6d889dc81a9bad486fc91877212844551b5690108654931ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1664, + "startColumn": 8, + "charOffset": 45963, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1662, + "startColumn": 8, + "charOffset": 45950, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->stats[STAT_MAGICPOINTS]) {\n\t\t\t\tif (skillBoost) {\n\t\t\t\t\tss << \", \";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e9d19758e3d483fb3de97473e71d98538ebc9c1c7b006966204b49bbd31d1d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1673, + "startColumn": 4, + "charOffset": 46183, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1671, + "startColumn": 4, + "charOffset": 46174, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (uint8_t i = SKILL_CRITICAL_HIT_CHANCE; i <= SKILL_LAST; i++) {\n\t\t\t\tauto skill = item ? item->getSkill(static_cast(i)) : it.getSkill(static_cast(i));\n\t\t\t\tif (!skill) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee3032d49fb717cc39a72749e14e1ee0d0edddc7fff955c586f808b4983ca766" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1675, + "startColumn": 9, + "charOffset": 46365, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1673, + "startColumn": 9, + "charOffset": 46180, + "charLength": 1, + "snippet": { + "text": "\t\t\tfor (uint8_t i = SKILL_CRITICAL_HIT_CHANCE; i <= SKILL_LAST; i++) {\n\t\t\t\tauto skill = item ? item->getSkill(static_cast(i)) : it.getSkill(static_cast(i));\n\t\t\t\tif (!skill) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4748d130939afc0f4cf2368aee763217a66742c6a88881b879d5fc380fcceaf8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1675, + "startColumn": 10, + "charOffset": 46366, + "charLength": 5, + "snippet": { + "text": "skill" + } + }, + "contextRegion": { + "startLine": 1673, + "startColumn": 10, + "charOffset": 46180, + "charLength": 5, + "snippet": { + "text": "\t\t\tfor (uint8_t i = SKILL_CRITICAL_HIT_CHANCE; i <= SKILL_LAST; i++) {\n\t\t\t\tauto skill = item ? item->getSkill(static_cast(i)) : it.getSkill(static_cast(i));\n\t\t\t\tif (!skill) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "646a919f337ec476b37e84aa7771e57a81cea38f7a3ec78c23556932be2ce3c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1689, + "startColumn": 11, + "charOffset": 46579, + "charLength": 5, + "snippet": { + "text": "skill" + } + }, + "contextRegion": { + "startLine": 1687, + "startColumn": 11, + "charOffset": 46517, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tss << getSkillName(i) << ' ';\n\t\t\t\t// Show float\n\t\t\t\tss << skill / 100.;\n\t\t\t\tss << '%' << std::noshowpos;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b62199dcb03e6e89e298679f2c7f709924a975aa60dbff35f9a647674b3b5ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1696, + "startColumn": 18, + "charOffset": 46694, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1694, + "startColumn": 18, + "charOffset": 46655, + "charLength": 12, + "snippet": { + "text": "\n\t\t\tif (skillBoost) {\n\t\t\t\tdescriptions.emplace_back(\"Skill Boost\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46bca7bee33007c7f865401124b77a583c99bed582a0e1020c838aa7751ac9db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1699, + "startColumn": 4, + "charOffset": 46742, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1697, + "startColumn": 4, + "charOffset": 46733, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\t\tif (it.abilities->specializedMagicLevel[i]) {\n\t\t\t\t\tss.str(\"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70ddd92879f9c075d2b2d4a36724022254aecdca9ace758207949479b20aa495" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "11 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1699, + "startColumn": 29, + "charOffset": 46767, + "charLength": 2, + "snippet": { + "text": "11" + } + }, + "contextRegion": { + "startLine": 1697, + "startColumn": 29, + "charOffset": 46733, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\t\tif (it.abilities->specializedMagicLevel[i]) {\n\t\t\t\t\tss.str(\"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b2cfc3a1a55bee6c90f74812f202bdb043e78d33f30a02d02f26310695417ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1700, + "startColumn": 9, + "charOffset": 46786, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1698, + "startColumn": 9, + "charOffset": 46738, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\t\tif (it.abilities->specializedMagicLevel[i]) {\n\t\t\t\t\tss.str(\"\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3eff1ba5ddb0323e159d637acb34896cc9e83117de9a13828b3e39199d5f53d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1700, + "startColumn": 9, + "charOffset": 46786, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1698, + "startColumn": 9, + "charOffset": 46738, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\t\tif (it.abilities->specializedMagicLevel[i]) {\n\t\t\t\t\tss.str(\"\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e57253aff5cadd5056263526cea012fd7523988a08fb7db14f9d652205be1048" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1700, + "startColumn": 9, + "charOffset": 46786, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1698, + "startColumn": 9, + "charOffset": 46738, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\t\tif (it.abilities->specializedMagicLevel[i]) {\n\t\t\t\t\tss.str(\"\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c49b0bf8ac78a47784385952fb674044cd760cafcdbbe63b89ce7047a4823c57" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1703, + "startColumn": 28, + "charOffset": 46873, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1701, + "startColumn": 28, + "charOffset": 46828, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tss.str(\"\");\n\n\t\t\t\t\tss << std::showpos << it.abilities->specializedMagicLevel[i] << std::noshowpos;\n\t\t\t\t\tstd::string combatName = getCombatName(indexToCombatType(i));\n\t\t\t\t\tcombatName[0] = toupper(combatName[0]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2aa4f6d2dc960b30cad44e8c8e520508a8f3e3fc3df1768712415188adcd0d94" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-11", + "ruleIndex": 423, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-11: The plain char type shall only be used for the storage and use of character values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1705, + "startColumn": 6, + "charOffset": 47003, + "charLength": 10, + "snippet": { + "text": "combatName" + } + }, + "contextRegion": { + "startLine": 1703, + "startColumn": 6, + "charOffset": 46846, + "charLength": 10, + "snippet": { + "text": "\t\t\t\t\tss << std::showpos << it.abilities->specializedMagicLevel[i] << std::noshowpos;\n\t\t\t\t\tstd::string combatName = getCombatName(indexToCombatType(i));\n\t\t\t\t\tcombatName[0] = toupper(combatName[0]);\n\t\t\t\t\tdescriptions.emplace_back(combatName + \" Magic Level\", ss.str());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b3e156ec2797467fe5a1e86bc0e41056b475a4602ea60d7fc2eb2c59adca6e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'value_type' (aka 'char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1705, + "startColumn": 22, + "charOffset": 47019, + "charLength": 7, + "snippet": { + "text": "toupper" + } + }, + "contextRegion": { + "startLine": 1703, + "startColumn": 22, + "charOffset": 46846, + "charLength": 7, + "snippet": { + "text": "\t\t\t\t\tss << std::showpos << it.abilities->specializedMagicLevel[i] << std::noshowpos;\n\t\t\t\t\tstd::string combatName = getCombatName(indexToCombatType(i));\n\t\t\t\t\tcombatName[0] = toupper(combatName[0]);\n\t\t\t\t\tdescriptions.emplace_back(combatName + \" Magic Level\", ss.str());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fabd397cd62b32035b8069d79f068bac0b032bfefc16b6d0aac26228825b08be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1705, + "startColumn": 22, + "charOffset": 47019, + "charLength": 7, + "snippet": { + "text": "toupper" + } + }, + "contextRegion": { + "startLine": 1703, + "startColumn": 22, + "charOffset": 46846, + "charLength": 7, + "snippet": { + "text": "\t\t\t\t\tss << std::showpos << it.abilities->specializedMagicLevel[i] << std::noshowpos;\n\t\t\t\t\tstd::string combatName = getCombatName(indexToCombatType(i));\n\t\t\t\t\tcombatName[0] = toupper(combatName[0]);\n\t\t\t\t\tdescriptions.emplace_back(combatName + \" Magic Level\", ss.str());\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf9c43979ad927d8c89fd6fca737c11a9965e975c387808966c2d3b9dad5a87f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1706, + "startColumn": 19, + "charOffset": 47061, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1704, + "startColumn": 19, + "charOffset": 46931, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t\tstd::string combatName = getCombatName(indexToCombatType(i));\n\t\t\t\t\tcombatName[0] = toupper(combatName[0]);\n\t\t\t\t\tdescriptions.emplace_back(combatName + \" Magic Level\", ss.str());\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aac58a4b2d1c3816746a547218e553611d1cc0ce2f1fbbfb8dc212656a8e2b60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1710, + "startColumn": 8, + "charOffset": 47133, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1708, + "startColumn": 8, + "charOffset": 47120, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->magicShieldCapacityFlat || it.abilities->magicShieldCapacityPercent) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << it.abilities->magicShieldCapacityFlat << std::noshowpos << \" and \" << it.abilities->magicShieldCapacityPercent << \"%\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4748d130939afc0f4cf2368aee763217a66742c6a88881b879d5fc380fcceaf8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1710, + "startColumn": 8, + "charOffset": 47133, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1708, + "startColumn": 8, + "charOffset": 47120, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->magicShieldCapacityFlat || it.abilities->magicShieldCapacityPercent) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << it.abilities->magicShieldCapacityFlat << std::noshowpos << \" and \" << it.abilities->magicShieldCapacityPercent << \"%\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ee3197ec43e2085494ad91c0103eab1c40b3c12a08dd3f56be4baa772c9bdd4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1710, + "startColumn": 46, + "charOffset": 47171, + "charLength": 2, + "snippet": { + "text": "||" + } + }, + "contextRegion": { + "startLine": 1708, + "startColumn": 46, + "charOffset": 47120, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->magicShieldCapacityFlat || it.abilities->magicShieldCapacityPercent) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << it.abilities->magicShieldCapacityFlat << std::noshowpos << \" and \" << it.abilities->magicShieldCapacityPercent << \"%\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "980f7dd2a794318794da8f57fe9c699021e00da293a81847b2c669ebe11dd9ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1710, + "startColumn": 49, + "charOffset": 47174, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1708, + "startColumn": 49, + "charOffset": 47120, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->magicShieldCapacityFlat || it.abilities->magicShieldCapacityPercent) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << it.abilities->magicShieldCapacityFlat << std::noshowpos << \" and \" << it.abilities->magicShieldCapacityPercent << \"%\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00d3ec43c6856d668f3d34357bd793989157d90566ebacc9ad50bff4d85e4361" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1713, + "startColumn": 18, + "charOffset": 47396, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1711, + "startColumn": 18, + "charOffset": 47218, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << it.abilities->magicShieldCapacityFlat << std::noshowpos << \" and \" << it.abilities->magicShieldCapacityPercent << \"%\";\n\t\t\t\tdescriptions.emplace_back(\"Magic Shield Capacity\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60121f4ff54ccd1be39c9428bf2483a13776c4c3fa0a7b22fcc2c1b7caedccc3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1716, + "startColumn": 8, + "charOffset": 47458, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1714, + "startColumn": 8, + "charOffset": 47445, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->perfectShotRange) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << it.abilities->perfectShotDamage << std::noshowpos << \" at range \" << unsigned(it.abilities->perfectShotRange);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23e4c1066227092263e699336be668fc912beb4534ea71f4548ad4a3d362dcce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1716, + "startColumn": 8, + "charOffset": 47458, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1714, + "startColumn": 8, + "charOffset": 47445, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->perfectShotRange) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << it.abilities->perfectShotDamage << std::noshowpos << \" at range \" << unsigned(it.abilities->perfectShotRange);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c0208504f2909e780d404de29b34c332230d2f28c9680839c865010b69568e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1718, + "startColumn": 96, + "charOffset": 47603, + "charLength": 8, + "snippet": { + "text": "unsigned" + } + }, + "contextRegion": { + "startLine": 1716, + "startColumn": 96, + "charOffset": 47451, + "charLength": 8, + "snippet": { + "text": "\t\t\tif (it.abilities->perfectShotRange) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << it.abilities->perfectShotDamage << std::noshowpos << \" at range \" << unsigned(it.abilities->perfectShotRange);\n\t\t\t\tdescriptions.emplace_back(\"Perfect Shot\", ss.str());\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0a26afd1b5480d001b863a96f276a6538a57d0ca1a4c4f4cd5af62b72e2cc1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1719, + "startColumn": 18, + "charOffset": 47662, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1717, + "startColumn": 18, + "charOffset": 47492, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << it.abilities->perfectShotDamage << std::noshowpos << \" at range \" << unsigned(it.abilities->perfectShotRange);\n\t\t\t\tdescriptions.emplace_back(\"Perfect Shot\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fcfe9852dd5a8bedb9a35168fe10d02e06509e6c822bcba31e8045b7fe599293" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1722, + "startColumn": 8, + "charOffset": 47715, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1720, + "startColumn": 8, + "charOffset": 47702, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)]) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << it.abilities->reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29b762ed466de96e7c11079903390caeb422bc2ed7a92517489df33aa3a4a088" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1722, + "startColumn": 8, + "charOffset": 47715, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1720, + "startColumn": 8, + "charOffset": 47702, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)]) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << it.abilities->reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0143a6f30536d63e075ebaf93e4c16b5f285e845928a33eb1a8b21cd1d096b75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1722, + "startColumn": 8, + "charOffset": 47715, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1720, + "startColumn": 8, + "charOffset": 47702, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)]) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << it.abilities->reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17d0c253c824758e92e6eb05d4c4bf5b46ecf7356fac4c73a4ea088244a245a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1724, + "startColumn": 11, + "charOffset": 47812, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1722, + "startColumn": 11, + "charOffset": 47708, + "charLength": 2, + "snippet": { + "text": "\t\t\tif (it.abilities->reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)]) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << it.abilities->reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)];\n\t\t\t\tdescriptions.emplace_back(\"Damage Reflection\", ss.str());\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "312ff8152712c9afbc68e96a2133fc84791b61ffc73f699d9b2f116230fb03f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1725, + "startColumn": 18, + "charOffset": 47898, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1723, + "startColumn": 18, + "charOffset": 47786, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << it.abilities->reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)];\n\t\t\t\tdescriptions.emplace_back(\"Damage Reflection\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "edb369e0bc0b7e4cfa3a1c252be819f8934c621d5c1f790748cc2bb9960e492b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1728, + "startColumn": 8, + "charOffset": 47956, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1726, + "startColumn": 8, + "charOffset": 47943, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->cleavePercent) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << (it.abilities->cleavePercent) << std::noshowpos << \"%\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6357d2ea4f90582cc0c15a61cfb8003cc6391efadb6cc2d72f5e24a7287e66b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1728, + "startColumn": 8, + "charOffset": 47956, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1726, + "startColumn": 8, + "charOffset": 47943, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->cleavePercent) {\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << (it.abilities->cleavePercent) << std::noshowpos << \"%\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79614b25062fd5613fc3f32fe1febf66e60c90e43422345eb3f20d524f28a0ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1731, + "startColumn": 18, + "charOffset": 48102, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1729, + "startColumn": 18, + "charOffset": 47987, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << std::showpos << (it.abilities->cleavePercent) << std::noshowpos << \"%\";\n\t\t\t\tdescriptions.emplace_back(\"Cleave\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75efc84ac993ecd3df99685e4e537650cf64ddcf7b5a3fa07545b0edb73585e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1737, + "startColumn": 18, + "charOffset": 48270, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1735, + "startColumn": 18, + "charOffset": 48210, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << \"Hard Drinking\";\n\t\t\t\tdescriptions.emplace_back(\"Effect\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aca918a8f8c028d2c1efa02bb78d925f5d0dc20cd69c6e55ede30072e040d883" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1743, + "startColumn": 18, + "charOffset": 48403, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1741, + "startColumn": 18, + "charOffset": 48344, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << \"Invisibility\";\n\t\t\t\tdescriptions.emplace_back(\"Effect\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da7b2829f0bd301170a2e38777ed6796407513c01ad5815ca77e654c8475b34d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1749, + "startColumn": 18, + "charOffset": 48546, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1747, + "startColumn": 18, + "charOffset": 48480, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << \"Faster Regeneration\";\n\t\t\t\tdescriptions.emplace_back(\"Effect\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19f91a5b890c5984ad5f8bd72a340f7c840442013598fc31aee3eea5cb88634e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1755, + "startColumn": 18, + "charOffset": 48679, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1753, + "startColumn": 18, + "charOffset": 48621, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << \"Mana Shield\";\n\t\t\t\tdescriptions.emplace_back(\"Effect\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa2c9000c47829ac806bf33ed11f6a8a19cbd2baf4590f77d7665168f5e56b1a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1758, + "startColumn": 4, + "charOffset": 48722, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1756, + "startColumn": 4, + "charOffset": 48713, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\tif (it.abilities->fieldAbsorbPercent[i] == 0) {\n\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c630cb6b402c2f8b9b5a3a0751ed39ea4cb3e4c39cdad86a200347bd50322f98" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1759, + "startColumn": 9, + "charOffset": 48774, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1757, + "startColumn": 9, + "charOffset": 48718, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\tif (it.abilities->fieldAbsorbPercent[i] == 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "773380ce17d550a263b1891f9a04f7cdcd14994feebcd6f8b5ee0d3e157ed516" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1764, + "startColumn": 72, + "charOffset": 48927, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1762, + "startColumn": 72, + "charOffset": 48839, + "charLength": 2, + "snippet": { + "text": "\n\t\t\t\tss.str(\"\");\n\t\t\t\tss << fmt::format(\"{} {:+}%\", getCombatName(indexToCombatType(i)), it.abilities->fieldAbsorbPercent[i]);\n\t\t\t\tdescriptions.emplace_back(\"Field Protection\", ss.str());\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf3b1bfa812673a2cd49e8e6ab233c387659daf9dd00493eda25301216e53c2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1765, + "startColumn": 18, + "charOffset": 48982, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1763, + "startColumn": 18, + "charOffset": 48840, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << fmt::format(\"{} {:+}%\", getCombatName(indexToCombatType(i)), it.abilities->fieldAbsorbPercent[i]);\n\t\t\t\tdescriptions.emplace_back(\"Field Protection\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63e20f425636d8135a02fd93fa56ebd1299037d1aa18a6c6ca48c138b7c32ea2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1771, + "startColumn": 18, + "charOffset": 49160, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1769, + "startColumn": 18, + "charOffset": 49100, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << \"Hard Drinking\";\n\t\t\t\tdescriptions.emplace_back(\"Skill Boost\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0245224030ab06a824b26f46a233006f22252ac3dfb77974546a7fa7eadf1bc7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1777, + "startColumn": 18, + "charOffset": 49298, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1775, + "startColumn": 18, + "charOffset": 49239, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << \"Invisibility\";\n\t\t\t\tdescriptions.emplace_back(\"Skill Boost\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f2b8e857e2e52c316f042e79ad621fff63d58d0d9f52b1aed713d447c7048f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1783, + "startColumn": 18, + "charOffset": 49446, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1781, + "startColumn": 18, + "charOffset": 49380, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << \"Faster Regeneration\";\n\t\t\t\tdescriptions.emplace_back(\"Skill Boost\", ss.str());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44e80e99d626c420abd49b41f49c801aed107b2c2b663cd247d86dc0a9f11749" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1789, + "startColumn": 18, + "charOffset": 49584, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1787, + "startColumn": 18, + "charOffset": 49526, + "charLength": 12, + "snippet": { + "text": "\t\t\t\tss.str(\"\");\n\t\t\t\tss << \"Mana Shield\";\n\t\t\t\tdescriptions.emplace_back(\"Skill Boost\", ss.str());\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b00ae06366fe2e6cc9cddfd0ac0944a0ed911c9aac98a8d596dc5a91877d3713" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1794, + "startColumn": 17, + "charOffset": 49679, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1792, + "startColumn": 17, + "charOffset": 49632, + "charLength": 12, + "snippet": { + "text": "\n\t\tif (it.imbuementSlot > 0) {\n\t\t\tdescriptions.emplace_back(\"Imbuement Slots\", std::to_string(it.imbuementSlot));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "039b0011d494322eac01ff1aebdd59e1b5d186761a163821f40b50f87febdbe4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1799, + "startColumn": 17, + "charOffset": 49875, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1797, + "startColumn": 17, + "charOffset": 49751, + "charLength": 12, + "snippet": { + "text": "\t\tstd::string augmentsDescription = it.parseAugmentDescription(true);\n\t\tif (!augmentsDescription.empty()) {\n\t\t\tdescriptions.emplace_back(\"Augments\", augmentsDescription);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9330ba3846bb853f7acb9047d1eeb6401cb6d2a59ce0145462163707240ac318" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1805, + "startColumn": 17, + "charOffset": 50012, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1803, + "startColumn": 17, + "charOffset": 49947, + "charLength": 12, + "snippet": { + "text": "\t\t\tss.str(\"\");\n\t\t\tss << fmt::format(\"{:04}\", 0);\n\t\t\tdescriptions.emplace_back(\"Key\", ss.str());\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc34f125847a00ef2bf1cd97e61c0dea198db352d33a1d6d76c1778de0f4c901" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1809, + "startColumn": 17, + "charOffset": 50095, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1807, + "startColumn": 17, + "charOffset": 50047, + "charLength": 12, + "snippet": { + "text": "\n\t\tif (it.isFluidContainer()) {\n\t\t\tdescriptions.emplace_back(\"Contain\", \"Nothing\");\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14b8ff4325bc381f1974262ee280f2c453af19411a84d068079955b67f85158e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1813, + "startColumn": 17, + "charOffset": 50173, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1811, + "startColumn": 17, + "charOffset": 50135, + "charLength": 12, + "snippet": { + "text": "\n\t\tif (it.isRune()) {\n\t\t\tdescriptions.emplace_back(\"Rune Spell Name\", it.runeSpellName);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "feccdb9b77fdc7b9af91fb15e2ea84e065e24c004fcc2e01966ef0e02993854e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1817, + "startColumn": 22, + "charOffset": 50274, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1815, + "startColumn": 22, + "charOffset": 50228, + "charLength": 2, + "snippet": { + "text": "\n\t\tif (it.showCharges) {\n\t\t\tint32_t charges = it.charges;\n\t\t\tif (charges != 0) {\n\t\t\t\tss.str(\"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37dec79db7f880e07886c4344efc6e749bd61f1a6895c66c315460cad2798741" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1822, + "startColumn": 18, + "charOffset": 50409, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1820, + "startColumn": 18, + "charOffset": 50325, + "charLength": 12, + "snippet": { + "text": "\t\t\t\t// Missing Actual Charges\n\t\t\t\tss << charges << \"/\" << charges;\n\t\t\t\tdescriptions.emplace_back(\"Charges\", ss.str());\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6fd2f557fe64eb783d9d8eb243803ef59c0baa7ee2ad2ce9a282d30ebc54744" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1828, + "startColumn": 17, + "charOffset": 50527, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1826, + "startColumn": 17, + "charOffset": 50454, + "charLength": 12, + "snippet": { + "text": "\t\tif (it.showDuration) {\n\t\t\t// Missing Total Expire Time\n\t\t\tdescriptions.emplace_back(\"Total Expire Time\", \"brand-new\");\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06d9b753352b0782f500b16da28bd62803a606dfc78b73f697354f612dc82787" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1834, + "startColumn": 17, + "charOffset": 50659, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 1832, + "startColumn": 17, + "charOffset": 50607, + "charLength": 2, + "snippet": { + "text": "\t\tif (weight != 0) {\n\t\t\tss.str(\"\");\n\t\t\tif (weight < 10) {\n\t\t\t\tss << \"0.0\" << weight;\n\t\t\t} else if (weight < 100) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba5025bef91388669c4cab5bdeb324d9705267ecb10ec221dd6837dbb18dd68e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1836, + "startColumn": 24, + "charOffset": 50715, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 1834, + "startColumn": 24, + "charOffset": 50643, + "charLength": 3, + "snippet": { + "text": "\t\t\tif (weight < 10) {\n\t\t\t\tss << \"0.0\" << weight;\n\t\t\t} else if (weight < 100) {\n\t\t\t\tss << \"0.\" << weight;\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe41812be4580c78105ad8ecd10f4d8d4d8a04182c3a6686204ec83eea232e2b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1840, + "startColumn": 18, + "charOffset": 50832, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 1838, + "startColumn": 18, + "charOffset": 50748, + "charLength": 6, + "snippet": { + "text": "\t\t\t} else {\n\t\t\t\tstd::string weightString = std::to_string(weight);\n\t\t\t\tweightString.insert(weightString.end() - 2, '.');\n\t\t\t\tss << weightString;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f32198fe53039f893b05cca8787843a62c40e058780b5d90b9e0009317f68db6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1844, + "startColumn": 17, + "charOffset": 50930, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1842, + "startColumn": 17, + "charOffset": 50893, + "charLength": 12, + "snippet": { + "text": "\t\t\t}\n\t\t\tss << \" oz\";\n\t\t\tdescriptions.emplace_back(\"Weight\", ss.str());\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1921d7b117668908bcc80679c9dc96aa304c58d6222d8846593a6c7fbf6e4c5c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1847, + "startColumn": 7, + "charOffset": 50975, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1845, + "startColumn": 7, + "charOffset": 50964, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (it.wieldInfo & WIELDINFO_PREMIUM) {\n\t\t\tdescriptions.emplace_back(\"Required\", \"Premium\");\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c50bfb36a76fde66d3344aba675e4487b78600ff9abf3ed9416192f11a49dfe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1847, + "startColumn": 7, + "charOffset": 50975, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1845, + "startColumn": 7, + "charOffset": 50964, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (it.wieldInfo & WIELDINFO_PREMIUM) {\n\t\t\tdescriptions.emplace_back(\"Required\", \"Premium\");\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c45eb4fe2d5dc87e5a1bb91c14b08931f2595188431dbb1bda6694835eb29b96" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1847, + "startColumn": 20, + "charOffset": 50988, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1845, + "startColumn": 20, + "charOffset": 50964, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif (it.wieldInfo & WIELDINFO_PREMIUM) {\n\t\t\tdescriptions.emplace_back(\"Required\", \"Premium\");\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0585d0b1e6d925df8156f177d3ba146981b06fda80eb247889dcc0653ecd4300" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1848, + "startColumn": 17, + "charOffset": 51027, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1846, + "startColumn": 17, + "charOffset": 50968, + "charLength": 12, + "snippet": { + "text": "\n\t\tif (it.wieldInfo & WIELDINFO_PREMIUM) {\n\t\t\tdescriptions.emplace_back(\"Required\", \"Premium\");\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29fa1011785ea3c0653a3e9f73fd548e70c77ae608a5b04c3c12eb8c63cd2cff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1852, + "startColumn": 17, + "charOffset": 51114, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1850, + "startColumn": 17, + "charOffset": 51068, + "charLength": 12, + "snippet": { + "text": "\n\t\tif (it.minReqLevel != 0) {\n\t\t\tdescriptions.emplace_back(\"Required Level\", std::to_string(it.minReqLevel));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c310d58d46e3ed62b6ae32e7cc5642a394ebf44bb3c536b9368001e0a12fc790" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1856, + "startColumn": 17, + "charOffset": 51233, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1854, + "startColumn": 17, + "charOffset": 51182, + "charLength": 12, + "snippet": { + "text": "\n\t\tif (it.minReqMagicLevel != 0) {\n\t\t\tdescriptions.emplace_back(\"Required Magic Level\", std::to_string(it.minReqMagicLevel));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c88f7b9af95655fa648f64d3a55e4baa958aad2c4855aa42556cc9803c732b10" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1860, + "startColumn": 17, + "charOffset": 51365, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1858, + "startColumn": 17, + "charOffset": 51312, + "charLength": 12, + "snippet": { + "text": "\n\t\tif (!it.vocationString.empty()) {\n\t\t\tdescriptions.emplace_back(\"Professions\", it.vocationString);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a017790a64f66c68831b52fb48039f21b6496556f7d4a9be82fb7cde64f2f72c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1864, + "startColumn": 16, + "charOffset": 51467, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1862, + "startColumn": 16, + "charOffset": 51417, + "charLength": 12, + "snippet": { + "text": "\n\t\t// Missing Tradeable Conditions\n\t\tdescriptions.emplace_back(\"Tradeable In Market\", \"yes\");\n\n\t\tstd::string weaponName = getWeaponName(it.weaponType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc385ad2432f75bb97d081cc09520d12f8e247149c19e468bb0ae195c95de705" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1867, + "startColumn": 7, + "charOffset": 51575, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1865, + "startColumn": 7, + "charOffset": 51511, + "charLength": 2, + "snippet": { + "text": "\n\t\tstd::string weaponName = getWeaponName(it.weaponType);\n\t\tif (it.slotPosition & SLOTP_TWO_HAND) {\n\t\t\tif (!weaponName.empty()) {\n\t\t\t\tweaponName += \", two-handed\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b403b23c2155f4716c7054fc2fcbf52466997dd7ff3af8583c8778a27413b45" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1867, + "startColumn": 7, + "charOffset": 51575, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1865, + "startColumn": 7, + "charOffset": 51511, + "charLength": 2, + "snippet": { + "text": "\n\t\tstd::string weaponName = getWeaponName(it.weaponType);\n\t\tif (it.slotPosition & SLOTP_TWO_HAND) {\n\t\t\tif (!weaponName.empty()) {\n\t\t\t\tweaponName += \", two-handed\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c10d2a63635607b6c0786ccfb852d4648c0210de00d1d2178ce5faee9e9d975a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1867, + "startColumn": 23, + "charOffset": 51591, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1865, + "startColumn": 23, + "charOffset": 51511, + "charLength": 1, + "snippet": { + "text": "\n\t\tstd::string weaponName = getWeaponName(it.weaponType);\n\t\tif (it.slotPosition & SLOTP_TWO_HAND) {\n\t\t\tif (!weaponName.empty()) {\n\t\t\t\tweaponName += \", two-handed\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "affd75f6fbbbc96bfa9a2b937fab415f791fd6b0f6ff2cba61e11991cda2d5ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1875, + "startColumn": 17, + "charOffset": 51772, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1873, + "startColumn": 17, + "charOffset": 51723, + "charLength": 12, + "snippet": { + "text": "\t\t}\n\t\tif (!weaponName.empty()) {\n\t\t\tdescriptions.emplace_back(\"Weapon Type\", weaponName);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e75ed22cb4a55b9c5331727424d6d3b1fa508f1986212c31781d1261b69ec2ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1878, + "startColumn": 3, + "charOffset": 51820, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1876, + "startColumn": 3, + "charOffset": 51813, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (it.slotPosition & SLOTP_BACKPACK) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"container\");\n\t\t} else if (it.slotPosition & SLOTP_HEAD) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1acce533b2968b09e9bac606214951036b49b24be9429694a074b4a4145fc9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1878, + "startColumn": 7, + "charOffset": 51824, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1876, + "startColumn": 7, + "charOffset": 51813, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (it.slotPosition & SLOTP_BACKPACK) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"container\");\n\t\t} else if (it.slotPosition & SLOTP_HEAD) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4676d74bd44e15b360f32b57c60fb1d0187504f9615ac1a4fd24dbac66a9b211" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1878, + "startColumn": 7, + "charOffset": 51824, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1876, + "startColumn": 7, + "charOffset": 51813, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (it.slotPosition & SLOTP_BACKPACK) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"container\");\n\t\t} else if (it.slotPosition & SLOTP_HEAD) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09dd04ef3bd06d88c170fe16bf5f4bc428b41382285afcb3d86d8fbd8bc16d00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1878, + "startColumn": 23, + "charOffset": 51840, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1876, + "startColumn": 23, + "charOffset": 51813, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif (it.slotPosition & SLOTP_BACKPACK) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"container\");\n\t\t} else if (it.slotPosition & SLOTP_HEAD) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2001d7a745f84b8deac0a2002db2227c4df3ddc3be655cb6e183426968bef835" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1879, + "startColumn": 17, + "charOffset": 51876, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1877, + "startColumn": 17, + "charOffset": 51817, + "charLength": 12, + "snippet": { + "text": "\n\t\tif (it.slotPosition & SLOTP_BACKPACK) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"container\");\n\t\t} else if (it.slotPosition & SLOTP_HEAD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"head\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f830ddd205deff53b7be7288cce18167444899be50cf8c3b2be31730251ad2eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1880, + "startColumn": 14, + "charOffset": 51933, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1878, + "startColumn": 14, + "charOffset": 51818, + "charLength": 2, + "snippet": { + "text": "\t\tif (it.slotPosition & SLOTP_BACKPACK) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"container\");\n\t\t} else if (it.slotPosition & SLOTP_HEAD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"head\");\n\t\t} else if (it.slotPosition & SLOTP_ARMOR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b8c0e8ba87f3c35e67b7f5329a7ef595702d0b41ad16cf0246b865154390210" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1880, + "startColumn": 14, + "charOffset": 51933, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1878, + "startColumn": 14, + "charOffset": 51818, + "charLength": 2, + "snippet": { + "text": "\t\tif (it.slotPosition & SLOTP_BACKPACK) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"container\");\n\t\t} else if (it.slotPosition & SLOTP_HEAD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"head\");\n\t\t} else if (it.slotPosition & SLOTP_ARMOR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e41369109d5738f2fd95ea768a33b108c2d79a995a88cb77bd9e64e912002709" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1880, + "startColumn": 30, + "charOffset": 51949, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1878, + "startColumn": 30, + "charOffset": 51818, + "charLength": 1, + "snippet": { + "text": "\t\tif (it.slotPosition & SLOTP_BACKPACK) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"container\");\n\t\t} else if (it.slotPosition & SLOTP_HEAD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"head\");\n\t\t} else if (it.slotPosition & SLOTP_ARMOR) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "272df736d47020550a34a848ea9291210a681e928257fa70bf1bf9130006d126" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1881, + "startColumn": 17, + "charOffset": 51981, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1879, + "startColumn": 17, + "charOffset": 51860, + "charLength": 12, + "snippet": { + "text": "\t\t\tdescriptions.emplace_back(\"Body Position\", \"container\");\n\t\t} else if (it.slotPosition & SLOTP_HEAD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"head\");\n\t\t} else if (it.slotPosition & SLOTP_ARMOR) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"body\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "136325376726fbb8734e2c5b5c653a224df5189882743ffd5ce73b3a4054d01b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1882, + "startColumn": 14, + "charOffset": 52033, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1880, + "startColumn": 14, + "charOffset": 51920, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_HEAD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"head\");\n\t\t} else if (it.slotPosition & SLOTP_ARMOR) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"body\");\n\t\t} else if (it.slotPosition & SLOTP_LEGS) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a178a9936ccc9a25041af77972cef5a723cd92d5b7e4c6e2140deb8eb87d6fb5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1882, + "startColumn": 14, + "charOffset": 52033, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1880, + "startColumn": 14, + "charOffset": 51920, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_HEAD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"head\");\n\t\t} else if (it.slotPosition & SLOTP_ARMOR) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"body\");\n\t\t} else if (it.slotPosition & SLOTP_LEGS) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e8621b274b98a2853ccc695da774c31759c6146d9a4f9c493a7ffc4c92b0719" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1882, + "startColumn": 30, + "charOffset": 52049, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1880, + "startColumn": 30, + "charOffset": 51920, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_HEAD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"head\");\n\t\t} else if (it.slotPosition & SLOTP_ARMOR) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"body\");\n\t\t} else if (it.slotPosition & SLOTP_LEGS) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9e5129d54c9ce88b3ebacb67501001a0b2204dbcd3482ec931a39c157979fd3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1883, + "startColumn": 17, + "charOffset": 52082, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1881, + "startColumn": 17, + "charOffset": 51965, + "charLength": 12, + "snippet": { + "text": "\t\t\tdescriptions.emplace_back(\"Body Position\", \"head\");\n\t\t} else if (it.slotPosition & SLOTP_ARMOR) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"body\");\n\t\t} else if (it.slotPosition & SLOTP_LEGS) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"legs\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11c82c3cce240d87f45057d997c68670362e0a06a0801dd179082d267175dea7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1884, + "startColumn": 14, + "charOffset": 52134, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1882, + "startColumn": 14, + "charOffset": 52020, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_ARMOR) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"body\");\n\t\t} else if (it.slotPosition & SLOTP_LEGS) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"legs\");\n\t\t} else if (it.slotPosition & SLOTP_FEET) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1154ac4f7d1b820d9e5321cbc9f1748ee58c3bc1c6070803cadd723246763058" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1884, + "startColumn": 14, + "charOffset": 52134, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1882, + "startColumn": 14, + "charOffset": 52020, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_ARMOR) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"body\");\n\t\t} else if (it.slotPosition & SLOTP_LEGS) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"legs\");\n\t\t} else if (it.slotPosition & SLOTP_FEET) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf4b424f43a80b38343395466dd0f3a49dd3d937fedec9d7e25a814cdd8eed14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1884, + "startColumn": 30, + "charOffset": 52150, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1882, + "startColumn": 30, + "charOffset": 52020, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_ARMOR) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"body\");\n\t\t} else if (it.slotPosition & SLOTP_LEGS) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"legs\");\n\t\t} else if (it.slotPosition & SLOTP_FEET) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bce6b7cfa6d54bc222e66e2a3e78b6bab9e836f7fbad195a31740b46cb769081" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1885, + "startColumn": 17, + "charOffset": 52182, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1883, + "startColumn": 17, + "charOffset": 52066, + "charLength": 12, + "snippet": { + "text": "\t\t\tdescriptions.emplace_back(\"Body Position\", \"body\");\n\t\t} else if (it.slotPosition & SLOTP_LEGS) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"legs\");\n\t\t} else if (it.slotPosition & SLOTP_FEET) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"feet\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8515f6e50ba02e87fcbad112493374fe2e48818ace7fc7ab79b8e4250c912f99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1886, + "startColumn": 14, + "charOffset": 52234, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1884, + "startColumn": 14, + "charOffset": 52121, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_LEGS) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"legs\");\n\t\t} else if (it.slotPosition & SLOTP_FEET) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"feet\");\n\t\t} else if (it.slotPosition & SLOTP_NECKLACE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1703ebe43dfcf33720e116f2aabc4e8a6b666c8825587fb58068d21e41043dd6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1886, + "startColumn": 14, + "charOffset": 52234, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1884, + "startColumn": 14, + "charOffset": 52121, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_LEGS) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"legs\");\n\t\t} else if (it.slotPosition & SLOTP_FEET) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"feet\");\n\t\t} else if (it.slotPosition & SLOTP_NECKLACE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df1c0191d7ce1c10a7af8be68848efe0470c60da48aec699d2993398b15de4e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1886, + "startColumn": 30, + "charOffset": 52250, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1884, + "startColumn": 30, + "charOffset": 52121, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_LEGS) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"legs\");\n\t\t} else if (it.slotPosition & SLOTP_FEET) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"feet\");\n\t\t} else if (it.slotPosition & SLOTP_NECKLACE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86dfa4b5b3acea5b63a6977329cd870886a9872d72d4e60e130a2fad89a65221" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1887, + "startColumn": 17, + "charOffset": 52282, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1885, + "startColumn": 17, + "charOffset": 52166, + "charLength": 12, + "snippet": { + "text": "\t\t\tdescriptions.emplace_back(\"Body Position\", \"legs\");\n\t\t} else if (it.slotPosition & SLOTP_FEET) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"feet\");\n\t\t} else if (it.slotPosition & SLOTP_NECKLACE) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"neck\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f905dbc6e951a17fb06ec6d1acb69b6bd744c19468e49df7ec356b84967dc262" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1888, + "startColumn": 14, + "charOffset": 52334, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1886, + "startColumn": 14, + "charOffset": 52221, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_FEET) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"feet\");\n\t\t} else if (it.slotPosition & SLOTP_NECKLACE) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"neck\");\n\t\t} else if (it.slotPosition & SLOTP_RING) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de109808371a77bce74f914ac1a74271784970c1f8e47c6b81f847255bfc47f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1888, + "startColumn": 14, + "charOffset": 52334, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1886, + "startColumn": 14, + "charOffset": 52221, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_FEET) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"feet\");\n\t\t} else if (it.slotPosition & SLOTP_NECKLACE) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"neck\");\n\t\t} else if (it.slotPosition & SLOTP_RING) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef17e614893ae0cee6acb660940c5d6b4f72dd814cf0471b3b33d158476d503c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1888, + "startColumn": 30, + "charOffset": 52350, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1886, + "startColumn": 30, + "charOffset": 52221, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_FEET) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"feet\");\n\t\t} else if (it.slotPosition & SLOTP_NECKLACE) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"neck\");\n\t\t} else if (it.slotPosition & SLOTP_RING) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e040567c45c4019d99091b64cb19280efc988ba21542848ef40ece11e94d4c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1889, + "startColumn": 17, + "charOffset": 52386, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1887, + "startColumn": 17, + "charOffset": 52266, + "charLength": 12, + "snippet": { + "text": "\t\t\tdescriptions.emplace_back(\"Body Position\", \"feet\");\n\t\t} else if (it.slotPosition & SLOTP_NECKLACE) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"neck\");\n\t\t} else if (it.slotPosition & SLOTP_RING) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"finger\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19f91a5b890c5984ad5f8bd72a340f7c840442013598fc31aee3eea5cb88634e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1890, + "startColumn": 14, + "charOffset": 52438, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1888, + "startColumn": 14, + "charOffset": 52321, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_NECKLACE) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"neck\");\n\t\t} else if (it.slotPosition & SLOTP_RING) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"finger\");\n\t\t} else if (it.slotPosition & SLOTP_AMMO) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb8086afe8e8b8bc2cb68b6a7cdeb03909175cd7945fe203c2aa3f0ea9b8f844" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1890, + "startColumn": 14, + "charOffset": 52438, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1888, + "startColumn": 14, + "charOffset": 52321, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_NECKLACE) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"neck\");\n\t\t} else if (it.slotPosition & SLOTP_RING) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"finger\");\n\t\t} else if (it.slotPosition & SLOTP_AMMO) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b87f8a2f4a223d3731d79f333cc2c8422692ffc16c793306c65553712682c434" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1890, + "startColumn": 30, + "charOffset": 52454, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1888, + "startColumn": 30, + "charOffset": 52321, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_NECKLACE) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"neck\");\n\t\t} else if (it.slotPosition & SLOTP_RING) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"finger\");\n\t\t} else if (it.slotPosition & SLOTP_AMMO) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ccad8b0e5ebf2565665c108f008fd6800205787bdaa1fcd3a034f3361e9484fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1891, + "startColumn": 17, + "charOffset": 52486, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1889, + "startColumn": 17, + "charOffset": 52370, + "charLength": 12, + "snippet": { + "text": "\t\t\tdescriptions.emplace_back(\"Body Position\", \"neck\");\n\t\t} else if (it.slotPosition & SLOTP_RING) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"finger\");\n\t\t} else if (it.slotPosition & SLOTP_AMMO) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"extra slot\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "659a84fd6c9285fcbc861a1cd0fabbf45f1e6d132ed000c0f147cfa3e626287e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1892, + "startColumn": 14, + "charOffset": 52540, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1890, + "startColumn": 14, + "charOffset": 52425, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_RING) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"finger\");\n\t\t} else if (it.slotPosition & SLOTP_AMMO) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"extra slot\");\n\t\t} else if (it.slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13e594aa7be33ce09ebe9322f02a694ea3d64b5e325d11c24e51c7a8bff9483c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1892, + "startColumn": 14, + "charOffset": 52540, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1890, + "startColumn": 14, + "charOffset": 52425, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_RING) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"finger\");\n\t\t} else if (it.slotPosition & SLOTP_AMMO) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"extra slot\");\n\t\t} else if (it.slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97d56abbc46409c7e00f46250ba6d342423bf2852c5487a39e0c7a4395f970e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1892, + "startColumn": 30, + "charOffset": 52556, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1890, + "startColumn": 30, + "charOffset": 52425, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_RING) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"finger\");\n\t\t} else if (it.slotPosition & SLOTP_AMMO) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"extra slot\");\n\t\t} else if (it.slotPosition & SLOTP_TWO_HAND) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b3d4057b8a1a5675bc42a335b627fce41d8e18999ee0b08ef7ee78f07e74fac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1893, + "startColumn": 17, + "charOffset": 52588, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1891, + "startColumn": 17, + "charOffset": 52470, + "charLength": 12, + "snippet": { + "text": "\t\t\tdescriptions.emplace_back(\"Body Position\", \"finger\");\n\t\t} else if (it.slotPosition & SLOTP_AMMO) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"extra slot\");\n\t\t} else if (it.slotPosition & SLOTP_TWO_HAND) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"both hands\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6f717460f134e33f1f59c597aa918d024d8ddb65d975f0ae3995b3e8ea39344" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1894, + "startColumn": 14, + "charOffset": 52646, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1892, + "startColumn": 14, + "charOffset": 52527, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_AMMO) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"extra slot\");\n\t\t} else if (it.slotPosition & SLOTP_TWO_HAND) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"both hands\");\n\t\t} else if ((it.slotPosition & SLOTP_LEFT) && it.weaponType != WEAPON_SHIELD) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1154ac4f7d1b820d9e5321cbc9f1748ee58c3bc1c6070803cadd723246763058" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1894, + "startColumn": 14, + "charOffset": 52646, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1892, + "startColumn": 14, + "charOffset": 52527, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_AMMO) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"extra slot\");\n\t\t} else if (it.slotPosition & SLOTP_TWO_HAND) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"both hands\");\n\t\t} else if ((it.slotPosition & SLOTP_LEFT) && it.weaponType != WEAPON_SHIELD) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf4b424f43a80b38343395466dd0f3a49dd3d937fedec9d7e25a814cdd8eed14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1894, + "startColumn": 30, + "charOffset": 52662, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1892, + "startColumn": 30, + "charOffset": 52527, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_AMMO) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"extra slot\");\n\t\t} else if (it.slotPosition & SLOTP_TWO_HAND) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"both hands\");\n\t\t} else if ((it.slotPosition & SLOTP_LEFT) && it.weaponType != WEAPON_SHIELD) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bce6b7cfa6d54bc222e66e2a3e78b6bab9e836f7fbad195a31740b46cb769081" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1895, + "startColumn": 17, + "charOffset": 52698, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1893, + "startColumn": 17, + "charOffset": 52572, + "charLength": 12, + "snippet": { + "text": "\t\t\tdescriptions.emplace_back(\"Body Position\", \"extra slot\");\n\t\t} else if (it.slotPosition & SLOTP_TWO_HAND) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"both hands\");\n\t\t} else if ((it.slotPosition & SLOTP_LEFT) && it.weaponType != WEAPON_SHIELD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"weapon hand\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbf7157f154f7063085a3c967cad065f5470e22014be63e25a2a8683e9a6adf5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1896, + "startColumn": 14, + "charOffset": 52756, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1894, + "startColumn": 14, + "charOffset": 52633, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_TWO_HAND) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"both hands\");\n\t\t} else if ((it.slotPosition & SLOTP_LEFT) && it.weaponType != WEAPON_SHIELD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"weapon hand\");\n\t\t} else if (it.slotPosition & SLOTP_RIGHT) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53fe341a3c8d60f16cfb1ea912b3d5cf199f604365223b0920f839426c374341" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1896, + "startColumn": 14, + "charOffset": 52756, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 1894, + "startColumn": 14, + "charOffset": 52633, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_TWO_HAND) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"both hands\");\n\t\t} else if ((it.slotPosition & SLOTP_LEFT) && it.weaponType != WEAPON_SHIELD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"weapon hand\");\n\t\t} else if (it.slotPosition & SLOTP_RIGHT) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d43e37ea8ff9b48d1439930b22ee8723ba86b3e854acf4cb9cec886849fd9b28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1896, + "startColumn": 31, + "charOffset": 52773, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1894, + "startColumn": 31, + "charOffset": 52633, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_TWO_HAND) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"both hands\");\n\t\t} else if ((it.slotPosition & SLOTP_LEFT) && it.weaponType != WEAPON_SHIELD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"weapon hand\");\n\t\t} else if (it.slotPosition & SLOTP_RIGHT) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dab43ea776f4d1926fdca37423ccdf7541163ca9ee69fe341fef43239044359f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1896, + "startColumn": 45, + "charOffset": 52787, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 1894, + "startColumn": 45, + "charOffset": 52633, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.slotPosition & SLOTP_TWO_HAND) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"both hands\");\n\t\t} else if ((it.slotPosition & SLOTP_LEFT) && it.weaponType != WEAPON_SHIELD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"weapon hand\");\n\t\t} else if (it.slotPosition & SLOTP_RIGHT) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56a3b32fbdfe36ce239dcac81f354b72e147306de256c3985af35a11047040da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1897, + "startColumn": 17, + "charOffset": 52840, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1895, + "startColumn": 17, + "charOffset": 52682, + "charLength": 12, + "snippet": { + "text": "\t\t\tdescriptions.emplace_back(\"Body Position\", \"both hands\");\n\t\t} else if ((it.slotPosition & SLOTP_LEFT) && it.weaponType != WEAPON_SHIELD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"weapon hand\");\n\t\t} else if (it.slotPosition & SLOTP_RIGHT) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"shield hand\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5072245ed082db15a520d540adc03379d0bb87b2c9d5b017dd73761d879b7cb0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1898, + "startColumn": 14, + "charOffset": 52899, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1896, + "startColumn": 14, + "charOffset": 52743, + "charLength": 2, + "snippet": { + "text": "\t\t} else if ((it.slotPosition & SLOTP_LEFT) && it.weaponType != WEAPON_SHIELD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"weapon hand\");\n\t\t} else if (it.slotPosition & SLOTP_RIGHT) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"shield hand\");\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5481db067bb0a4cc6b51deabbe226d39f4857b102311c7e3c9b9da1c8c8e3485" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1898, + "startColumn": 14, + "charOffset": 52899, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1896, + "startColumn": 14, + "charOffset": 52743, + "charLength": 2, + "snippet": { + "text": "\t\t} else if ((it.slotPosition & SLOTP_LEFT) && it.weaponType != WEAPON_SHIELD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"weapon hand\");\n\t\t} else if (it.slotPosition & SLOTP_RIGHT) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"shield hand\");\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b78e26dc76a5dcd0f3e3eda91e06639668339b9333d30bcc80c2fb7a3d672e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1898, + "startColumn": 30, + "charOffset": 52915, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 1896, + "startColumn": 30, + "charOffset": 52743, + "charLength": 1, + "snippet": { + "text": "\t\t} else if ((it.slotPosition & SLOTP_LEFT) && it.weaponType != WEAPON_SHIELD) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"weapon hand\");\n\t\t} else if (it.slotPosition & SLOTP_RIGHT) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"shield hand\");\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6744335f867b052a54d6607b600d2072a40ddbb7943e57d7b241eae4ad4c0ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1899, + "startColumn": 17, + "charOffset": 52948, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1897, + "startColumn": 17, + "charOffset": 52824, + "charLength": 12, + "snippet": { + "text": "\t\t\tdescriptions.emplace_back(\"Body Position\", \"weapon hand\");\n\t\t} else if (it.slotPosition & SLOTP_RIGHT) {\n\t\t\tdescriptions.emplace_back(\"Body Position\", \"shield hand\");\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5bf04ee49369a179af3febfd996cc6327313d7d1ba0ad7c69d14b00de2a7a3c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1903, + "startColumn": 17, + "charOffset": 53053, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1901, + "startColumn": 17, + "charOffset": 52998, + "charLength": 12, + "snippet": { + "text": "\n\t\tif (it.upgradeClassification > 0) {\n\t\t\tdescriptions.emplace_back(\"Classification\", std::to_string(it.upgradeClassification));\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da8644888f504dad351c8688834a49eb04c42039625b1f6a744b53c9a818d1ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1910, + "startColumn": 67, + "charOffset": 53256, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 1908, + "startColumn": 67, + "charOffset": 53187, + "charLength": 4, + "snippet": { + "text": "}\n\nstd::string Item::parseImbuementDescription(std::shared_ptr item) {\n\tstd::ostringstream s;\n\tif (item && item->getImbuementSlot() >= 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f83470a0772a349629e7768ec4bf9f9964ebc2cbd4acbcd2a3070c8bec5e9f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-avoid-endl", + "ruleIndex": 665, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'std::endl' with streams; use '\\n' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1913, + "startColumn": 8, + "charOffset": 53340, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1911, + "startColumn": 8, + "charOffset": 53264, + "charLength": 3, + "snippet": { + "text": "\tstd::ostringstream s;\n\tif (item && item->getImbuementSlot() >= 1) {\n\t\ts << std::endl\n\t\t << \"Imbuements: (\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d5d72d07641d9d8c0269dcf9749a9833d7fd52cdd3405b2e5ff6a25a64df007" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1916, + "startColumn": 3, + "charOffset": 53377, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1914, + "startColumn": 3, + "charOffset": 53350, + "charLength": 3, + "snippet": { + "text": "\t\t << \"Imbuements: (\";\n\n\t\tfor (uint8_t slotid = 0; slotid < item->getImbuementSlot(); slotid++) {\n\t\t\tif (slotid >= 1) {\n\t\t\t\ts << \", \";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8f81efc3644ae5fb935d94021aa113735426ebc3a38411fd647339f7f251003" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1928, + "startColumn": 8, + "charOffset": 53738, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1926, + "startColumn": 8, + "charOffset": 53624, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tconst BaseImbuement* baseImbuement = g_imbuements().getBaseByID(imbuementInfo.imbuement->getBaseID());\n\t\t\tif (!baseImbuement) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71dcdd6e5d39bcd0f1d2bcfed91e38b310e7248df0974b7ef1eb77ae4b17cd3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const BaseImbuement *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1928, + "startColumn": 9, + "charOffset": 53739, + "charLength": 13, + "snippet": { + "text": "baseImbuement" + } + }, + "contextRegion": { + "startLine": 1926, + "startColumn": 9, + "charOffset": 53624, + "charLength": 13, + "snippet": { + "text": "\n\t\t\tconst BaseImbuement* baseImbuement = g_imbuements().getBaseByID(imbuementInfo.imbuement->getBaseID());\n\t\t\tif (!baseImbuement) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90bd285e58857a4593545b7b9f5a27ff48b4d94368f34b3ec55da1a671988938" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1932, + "startColumn": 18, + "charOffset": 53793, + "charLength": 13, + "snippet": { + "text": "imbuementInfo" + } + }, + "contextRegion": { + "startLine": 1930, + "startColumn": 18, + "charOffset": 53770, + "charLength": 13, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tint minutes = imbuementInfo.duration / 60;\n\t\t\tint hours = minutes / 60;\n\t\t\ts << fmt::format(\"{} {} {:02}:{:02}h\", baseImbuement->name, imbuementInfo.imbuement->getName(), hours, minutes % 60);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf8feaf5de12312eda56e486c51cd4fc29d06f0a8d3c5e30358fe5b377fae832" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1932, + "startColumn": 43, + "charOffset": 53818, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 1930, + "startColumn": 43, + "charOffset": 53770, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tint minutes = imbuementInfo.duration / 60;\n\t\t\tint hours = minutes / 60;\n\t\t\ts << fmt::format(\"{} {} {:02}:{:02}h\", baseImbuement->name, imbuementInfo.imbuement->getName(), hours, minutes % 60);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85e263f5c48238f8d8c8bb2bb0acf934a43f2b5e48ab129ef23f796a11b3161e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1933, + "startColumn": 26, + "charOffset": 53847, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 1931, + "startColumn": 26, + "charOffset": 53775, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tint minutes = imbuementInfo.duration / 60;\n\t\t\tint hours = minutes / 60;\n\t\t\ts << fmt::format(\"{} {} {:02}:{:02}h\", baseImbuement->name, imbuementInfo.imbuement->getName(), hours, minutes % 60);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2204e88cab4efacbf13c40855f7304a846195971cffbe3c96583a15f51bca539" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1934, + "startColumn": 117, + "charOffset": 53967, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 1932, + "startColumn": 117, + "charOffset": 53776, + "charLength": 2, + "snippet": { + "text": "\t\t\tint minutes = imbuementInfo.duration / 60;\n\t\t\tint hours = minutes / 60;\n\t\t\ts << fmt::format(\"{} {} {:02}:{:02}h\", baseImbuement->name, imbuementInfo.imbuement->getName(), hours, minutes % 60);\n\t\t}\n\t\ts << \").\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4514e307db698524b7f68ee0fc3b6714006004627e1c45e0ae3c7f6c194a456" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1944, + "startColumn": 9, + "charOffset": 54081, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1942, + "startColumn": 9, + "charOffset": 54013, + "charLength": 2, + "snippet": { + "text": "bool Item::isSavedToHouses() {\n\tconst auto &it = items[id];\n\treturn it.movable || it.isWrappable() || it.isCarpet() || getDoor() || (getContainer() && !getContainer()->empty()) || it.canWriteText || getBed() || it.m_transformOnUse;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f180ac4655abc6610571ada724a1dad458bb058bd5da15109d1d82b4ee265efa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint16_t' (aka 'unsigned short') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1944, + "startColumn": 152, + "charOffset": 54224, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1942, + "startColumn": 152, + "charOffset": 54013, + "charLength": 2, + "snippet": { + "text": "bool Item::isSavedToHouses() {\n\tconst auto &it = items[id];\n\treturn it.movable || it.isWrappable() || it.isCarpet() || getDoor() || (getContainer() && !getContainer()->empty()) || it.canWriteText || getBed() || it.m_transformOnUse;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80b783f1a5e32ca6f7f25b6d292133c7d4c4e442238508375b1984cacd4482e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'toCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1947, + "startColumn": 64, + "charOffset": 54311, + "charLength": 10, + "snippet": { + "text": "toCylinder" + } + }, + "contextRegion": { + "startLine": 1945, + "startColumn": 64, + "charOffset": 54245, + "charLength": 10, + "snippet": { + "text": "}\n\nSoundEffect_t Item::getMovementSound(std::shared_ptr toCylinder) const {\n\tif (!toCylinder) {\n\t\treturn SoundEffect_t::ITEM_MOVE_DEFAULT;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54a4458b1c438e676e9a24fd8c12c68138cafcc9c00dbccd1cc407c6a82326d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1948, + "startColumn": 6, + "charOffset": 54336, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1946, + "startColumn": 6, + "charOffset": 54247, + "charLength": 1, + "snippet": { + "text": "\nSoundEffect_t Item::getMovementSound(std::shared_ptr toCylinder) const {\n\tif (!toCylinder) {\n\t\treturn SoundEffect_t::ITEM_MOVE_DEFAULT;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c40e23ea71924f845febb495cfba13cdee59f43b692b8101513caf2637727c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1958, + "startColumn": 3, + "charOffset": 54604, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1956, + "startColumn": 3, + "charOffset": 54574, + "charLength": 4, + "snippet": { + "text": "\n\tswitch (items[id].type) {\n\t\tcase ITEM_TYPE_ARMOR: {\n\t\t\treturn SoundEffect_t::ITEM_MOVE_ARMORS;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfc72a40d230ff1619e3581ae360c2ffa3056df7cc2ef7696dac6d08fccabce0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1961, + "startColumn": 3, + "charOffset": 54677, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1959, + "startColumn": 3, + "charOffset": 54628, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn SoundEffect_t::ITEM_MOVE_ARMORS;\n\t\t}\n\t\tcase ITEM_TYPE_AMULET: {\n\t\t\treturn SoundEffect_t::ITEM_MOVE_NECKLACES;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3a504cde547607e22e397f1ee632887477c80c048a176628117a228ec1e883f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1964, + "startColumn": 3, + "charOffset": 54754, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1962, + "startColumn": 3, + "charOffset": 54702, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn SoundEffect_t::ITEM_MOVE_NECKLACES;\n\t\t}\n\t\tcase ITEM_TYPE_BOOTS: {\n\t\t\treturn SoundEffect_t::ITEM_MOVE_BOOTS;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ff1e9483b0987f645da5b4a701511f66b19f92dbecb3814abb8344a3539f3e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1967, + "startColumn": 3, + "charOffset": 54826, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1965, + "startColumn": 3, + "charOffset": 54778, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn SoundEffect_t::ITEM_MOVE_BOOTS;\n\t\t}\n\t\tcase ITEM_TYPE_CONTAINER: {\n\t\t\treturn SoundEffect_t::ITEM_MOVE_BACKPACK;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6548b96563add69a5359619eb3f21d3b0d02632a982b6e9bab4fedce46ee2dbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1970, + "startColumn": 3, + "charOffset": 54905, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1968, + "startColumn": 3, + "charOffset": 54854, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn SoundEffect_t::ITEM_MOVE_BACKPACK;\n\t\t}\n\t\tcase ITEM_TYPE_HELMET: {\n\t\t\treturn SoundEffect_t::ITEM_MOVE_HELMETS;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "266bbc6db7fbc3f7c4581233675cab715a4bd2f4fa601c833d2b21c615370759" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1973, + "startColumn": 3, + "charOffset": 54980, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1971, + "startColumn": 3, + "charOffset": 54930, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn SoundEffect_t::ITEM_MOVE_HELMETS;\n\t\t}\n\t\tcase ITEM_TYPE_LEGS: {\n\t\t\treturn SoundEffect_t::ITEM_MOVE_LEGS;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17fbfb891a3cc406e608151813d492d3dfece147d8e6aa47fc453164e1d4c926" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1976, + "startColumn": 3, + "charOffset": 55050, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1974, + "startColumn": 3, + "charOffset": 55003, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn SoundEffect_t::ITEM_MOVE_LEGS;\n\t\t}\n\t\tcase ITEM_TYPE_RING: {\n\t\t\treturn SoundEffect_t::ITEM_MOVE_RINGS;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f0e6b0ed0abf55e0401d06b5cb0b9ef1bee730965a88f612a83396b0076e71b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1979, + "startColumn": 3, + "charOffset": 55121, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1977, + "startColumn": 3, + "charOffset": 55073, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn SoundEffect_t::ITEM_MOVE_RINGS;\n\t\t}\n\t\tcase ITEM_TYPE_DISTANCE: {\n\t\t\treturn SoundEffect_t::ITEM_MOVE_DISTANCE;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8d8e699c6e4d9527a7f00739803301c4977e8d392a13732e946b26067052d4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1982, + "startColumn": 3, + "charOffset": 55199, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1980, + "startColumn": 3, + "charOffset": 55148, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn SoundEffect_t::ITEM_MOVE_DISTANCE;\n\t\t}\n\t\tcase ITEM_TYPE_QUIVER: {\n\t\t\treturn SoundEffect_t::ITEM_MOVE_QUIVERS;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7a762bcf404240aa9ec266277f0c6b2f26a920e1cad3b4f404370f47b1d7433" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1985, + "startColumn": 3, + "charOffset": 55274, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1983, + "startColumn": 3, + "charOffset": 55224, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn SoundEffect_t::ITEM_MOVE_QUIVERS;\n\t\t}\n\t\tcase ITEM_TYPE_VALUABLE: {\n\t\t\treturn SoundEffect_t::ITEM_MOVE_STACKABLE;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bea61d2b122af73f7256a75471bd75134396e1f740ab4666421bc7264840fbdd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1990, + "startColumn": 3, + "charOffset": 55377, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1988, + "startColumn": 3, + "charOffset": 55351, + "charLength": 4, + "snippet": { + "text": "\n\t\tcase ITEM_TYPE_WAND:\n\t\tcase ITEM_TYPE_SHIELD:\n\t\tcase ITEM_TYPE_TOOLS:\n\t\tcase ITEM_TYPE_AMMO: {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e5086caa954a90860f6b5abebd15f96fce2a96f2f3a9da7f518cbcb2ad2a69b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1991, + "startColumn": 3, + "charOffset": 55402, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1989, + "startColumn": 3, + "charOffset": 55352, + "charLength": 4, + "snippet": { + "text": "\t\tcase ITEM_TYPE_WAND:\n\t\tcase ITEM_TYPE_SHIELD:\n\t\tcase ITEM_TYPE_TOOLS:\n\t\tcase ITEM_TYPE_AMMO: {\n\t\t\treturn SoundEffect_t::ITEM_MOVE_WOOD;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb7a074e78b133ed0ed2376c7148f45582fd81a66487e111681df6820c57d00a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1992, + "startColumn": 3, + "charOffset": 55426, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1990, + "startColumn": 3, + "charOffset": 55375, + "charLength": 4, + "snippet": { + "text": "\t\tcase ITEM_TYPE_SHIELD:\n\t\tcase ITEM_TYPE_TOOLS:\n\t\tcase ITEM_TYPE_AMMO: {\n\t\t\treturn SoundEffect_t::ITEM_MOVE_WOOD;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3393ff32c85cb32825db2871c47862f8d55dd2652c61b5df68e75a06895f64be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1992, + "startColumn": 3, + "charOffset": 55426, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1990, + "startColumn": 3, + "charOffset": 55375, + "charLength": 4, + "snippet": { + "text": "\t\tcase ITEM_TYPE_SHIELD:\n\t\tcase ITEM_TYPE_TOOLS:\n\t\tcase ITEM_TYPE_AMMO: {\n\t\t\treturn SoundEffect_t::ITEM_MOVE_WOOD;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51ddb755dc563252e9741e168f4f7885da25db9e1490c86cec0de054ec175beb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1997, + "startColumn": 3, + "charOffset": 55519, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1995, + "startColumn": 3, + "charOffset": 55494, + "charLength": 4, + "snippet": { + "text": "\n\t\tcase ITEM_TYPE_AXE:\n\t\tcase ITEM_TYPE_SWORD:\n\t\tcase ITEM_TYPE_CLUB: {\n\t\t\treturn SoundEffect_t::ITEM_MOVE_METALIC;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b17aa0fa701b19107ae253cf3cc766c461b7dbaedefacd87255aefb36d17ea3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1998, + "startColumn": 3, + "charOffset": 55543, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1996, + "startColumn": 3, + "charOffset": 55495, + "charLength": 4, + "snippet": { + "text": "\t\tcase ITEM_TYPE_AXE:\n\t\tcase ITEM_TYPE_SWORD:\n\t\tcase ITEM_TYPE_CLUB: {\n\t\t\treturn SoundEffect_t::ITEM_MOVE_METALIC;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0cc5cdb066226af1a5038aa87940b9965e07b160e75e21a33e199319cb2efe6e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 1998, + "startColumn": 3, + "charOffset": 55543, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1996, + "startColumn": 3, + "charOffset": 55495, + "charLength": 4, + "snippet": { + "text": "\t\tcase ITEM_TYPE_AXE:\n\t\tcase ITEM_TYPE_SWORD:\n\t\tcase ITEM_TYPE_CLUB: {\n\t\t\treturn SoundEffect_t::ITEM_MOVE_METALIC;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99daeec227769a133a6836af5dfd24f9627eb1a7a7d29208febd7aafe83465ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2009, + "startColumn": 72, + "charOffset": 55756, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 2007, + "startColumn": 72, + "charOffset": 55682, + "charLength": 4, + "snippet": { + "text": "}\n\nstd::string Item::parseClassificationDescription(std::shared_ptr item) {\n\tstd::ostringstream string;\n\tif (item && item->getClassification() >= 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84d6f2871573558d33e4c2ffb351c2aaffb580194210e849be42dcda748b1288" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-avoid-endl", + "ruleIndex": 665, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'std::endl' with streams; use '\\n' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2012, + "startColumn": 13, + "charOffset": 55851, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 2010, + "startColumn": 13, + "charOffset": 55764, + "charLength": 3, + "snippet": { + "text": "\tstd::ostringstream string;\n\tif (item && item->getClassification() >= 1) {\n\t\tstring << std::endl\n\t\t\t << \"Classification: \" << std::to_string(item->getClassification()) << \" Tier: \" << std::to_string(item->getTier());\n\t\tif (item->getTier() != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80e135f0566ae113dfcab5b37a7b92a8fe2b75da478c6ff3d2539ba84b82f305" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2015, + "startColumn": 4, + "charOffset": 56016, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2013, + "startColumn": 4, + "charOffset": 55861, + "charLength": 2, + "snippet": { + "text": "\t\t\t << \"Classification: \" << std::to_string(item->getClassification()) << \" Tier: \" << std::to_string(item->getTier());\n\t\tif (item->getTier() != 0) {\n\t\t\tif (Item::items[item->getID()].weaponType != WEAPON_NONE) {\n\t\t\t\tstring << fmt::format(\" ({:.2f}% Onslaught).\", item->getFatalChance());\n\t\t\t} else if (g_game().getObjectCategory(item) == OBJECTCATEGORY_HELMETS) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0924dd87a05446f0b6b574b50ce9be16cbc4052727a4155ec063ae7f6e94d5a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'parseShowDuration' has cognitive complexity of 42 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2042, + "startColumn": 19, + "charOffset": 56943, + "charLength": 17, + "snippet": { + "text": "parseShowDuration" + } + }, + "contextRegion": { + "startLine": 2040, + "startColumn": 19, + "charOffset": 56922, + "charLength": 17, + "snippet": { + "text": "}\n\nstd::string Item::parseShowDuration(std::shared_ptr item) {\n\tif (!item) {\n\t\treturn {};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3244351660743f23a2901eaddbbd12e95dc3d6a2489a72f8d0cec35c70805011" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2042, + "startColumn": 59, + "charOffset": 56983, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 2040, + "startColumn": 59, + "charOffset": 56922, + "charLength": 4, + "snippet": { + "text": "}\n\nstd::string Item::parseShowDuration(std::shared_ptr item) {\n\tif (!item) {\n\t\treturn {};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55ff34ad74df297fa61571e1a5841fd882a291c14962424f854a322f15732cdb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2043, + "startColumn": 6, + "charOffset": 56996, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2041, + "startColumn": 6, + "charOffset": 56924, + "charLength": 1, + "snippet": { + "text": "\nstd::string Item::parseShowDuration(std::shared_ptr item) {\n\tif (!item) {\n\t\treturn {};\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de5f3eb552354b3db3a59c87006c0d541d815d1ca29899c7a85c1f44efc18d8f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2048, + "startColumn": 44, + "charOffset": 57098, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 2046, + "startColumn": 44, + "charOffset": 57021, + "charLength": 4, + "snippet": { + "text": "\n\tstd::ostringstream description;\n\tuint32_t duration = item->getDuration() / 1000;\n\tif (item && item->hasAttribute(ItemAttribute_t::DURATION) && duration > 0) {\n\t\tdescription << \" that will expire in \";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d8020581240535c8eb02351a7a1cfaf1e85052e4851992e15448af94b17a45f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "86400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2051, + "startColumn": 19, + "charOffset": 57242, + "charLength": 5, + "snippet": { + "text": "86400" + } + }, + "contextRegion": { + "startLine": 2049, + "startColumn": 19, + "charOffset": 57104, + "charLength": 5, + "snippet": { + "text": "\tif (item && item->hasAttribute(ItemAttribute_t::DURATION) && duration > 0) {\n\t\tdescription << \" that will expire in \";\n\t\tif (duration >= 86400) {\n\t\t\tuint16_t days = duration / 86400;\n\t\t\tuint16_t hours = (duration % 86400) / 3600;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "353e4765822d3909bb5dc569f738d1baeacc08abc1e33bdb5cea680e62a03713" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2052, + "startColumn": 20, + "charOffset": 57270, + "charLength": 8, + "snippet": { + "text": "duration" + } + }, + "contextRegion": { + "startLine": 2050, + "startColumn": 20, + "charOffset": 57182, + "charLength": 8, + "snippet": { + "text": "\t\tdescription << \" that will expire in \";\n\t\tif (duration >= 86400) {\n\t\t\tuint16_t days = duration / 86400;\n\t\t\tuint16_t hours = (duration % 86400) / 3600;\n\t\t\tdescription << days << \" day\" << (days != 1 ? \"s\" : \"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "199a67b071512f2b24abbb360f28b517a19387bcedd1d14feab1fcbb666c65c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "86400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2052, + "startColumn": 31, + "charOffset": 57281, + "charLength": 5, + "snippet": { + "text": "86400" + } + }, + "contextRegion": { + "startLine": 2050, + "startColumn": 31, + "charOffset": 57182, + "charLength": 5, + "snippet": { + "text": "\t\tdescription << \" that will expire in \";\n\t\tif (duration >= 86400) {\n\t\t\tuint16_t days = duration / 86400;\n\t\t\tuint16_t hours = (duration % 86400) / 3600;\n\t\t\tdescription << days << \" day\" << (days != 1 ? \"s\" : \"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63995311e9d537e5aaa0201ff1a0989ad5cfb82162d9cbd9554d08388a072b43" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2053, + "startColumn": 21, + "charOffset": 57308, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 2051, + "startColumn": 21, + "charOffset": 57224, + "charLength": 1, + "snippet": { + "text": "\t\tif (duration >= 86400) {\n\t\t\tuint16_t days = duration / 86400;\n\t\t\tuint16_t hours = (duration % 86400) / 3600;\n\t\t\tdescription << days << \" day\" << (days != 1 ? \"s\" : \"\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc2842af8fd112585ab93b83804fa9c537d835d358fec87a215ccae8fcb169e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "86400 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2053, + "startColumn": 33, + "charOffset": 57320, + "charLength": 5, + "snippet": { + "text": "86400" + } + }, + "contextRegion": { + "startLine": 2051, + "startColumn": 33, + "charOffset": 57224, + "charLength": 5, + "snippet": { + "text": "\t\tif (duration >= 86400) {\n\t\t\tuint16_t days = duration / 86400;\n\t\t\tuint16_t hours = (duration % 86400) / 3600;\n\t\t\tdescription << days << \" day\" << (days != 1 ? \"s\" : \"\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e71335d12367c25b58aa340e05ff506dc3b4d5eb63e909d64d32e9435144d6db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "3600 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2053, + "startColumn": 42, + "charOffset": 57329, + "charLength": 4, + "snippet": { + "text": "3600" + } + }, + "contextRegion": { + "startLine": 2051, + "startColumn": 42, + "charOffset": 57224, + "charLength": 4, + "snippet": { + "text": "\t\tif (duration >= 86400) {\n\t\t\tuint16_t days = duration / 86400;\n\t\t\tuint16_t hours = (duration % 86400) / 3600;\n\t\t\tdescription << days << \" day\" << (days != 1 ? \"s\" : \"\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49fbadec6698ff24d9cba42d9cc10e0b62a0df1d27a11c85e52f86f108d0e6d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "3600 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2059, + "startColumn": 26, + "charOffset": 57521, + "charLength": 4, + "snippet": { + "text": "3600" + } + }, + "contextRegion": { + "startLine": 2057, + "startColumn": 26, + "charOffset": 57416, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tdescription << \" and \" << hours << \" hour\" << (hours != 1 ? \"s\" : \"\");\n\t\t\t}\n\t\t} else if (duration >= 3600) {\n\t\t\tuint16_t hours = duration / 3600;\n\t\t\tuint16_t minutes = (duration % 3600) / 60;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7780bc45140a1923508569c0cbe8b5f2163de28b4067abe3e92e3258ef372a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2060, + "startColumn": 21, + "charOffset": 57549, + "charLength": 8, + "snippet": { + "text": "duration" + } + }, + "contextRegion": { + "startLine": 2058, + "startColumn": 21, + "charOffset": 57491, + "charLength": 8, + "snippet": { + "text": "\t\t\t}\n\t\t} else if (duration >= 3600) {\n\t\t\tuint16_t hours = duration / 3600;\n\t\t\tuint16_t minutes = (duration % 3600) / 60;\n\t\t\tdescription << hours << \" hour\" << (hours != 1 ? \"s\" : \"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f4a0f8b0d34b4387d42c2c776c6351e24e1d97dc96354333aa1dce7ae550d6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "3600 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2060, + "startColumn": 32, + "charOffset": 57560, + "charLength": 4, + "snippet": { + "text": "3600" + } + }, + "contextRegion": { + "startLine": 2058, + "startColumn": 32, + "charOffset": 57491, + "charLength": 4, + "snippet": { + "text": "\t\t\t}\n\t\t} else if (duration >= 3600) {\n\t\t\tuint16_t hours = duration / 3600;\n\t\t\tuint16_t minutes = (duration % 3600) / 60;\n\t\t\tdescription << hours << \" hour\" << (hours != 1 ? \"s\" : \"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d223a598bc08265b4566815ab4a7e140e386ad01bf8702716dc945bc8eecbe21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2061, + "startColumn": 23, + "charOffset": 57588, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 2059, + "startColumn": 23, + "charOffset": 57496, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (duration >= 3600) {\n\t\t\tuint16_t hours = duration / 3600;\n\t\t\tuint16_t minutes = (duration % 3600) / 60;\n\t\t\tdescription << hours << \" hour\" << (hours != 1 ? \"s\" : \"\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "639e265fcb6679f1625952b4ac65caaf106cca6ccf64aa9d382f13328341ab5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "3600 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2061, + "startColumn": 35, + "charOffset": 57600, + "charLength": 4, + "snippet": { + "text": "3600" + } + }, + "contextRegion": { + "startLine": 2059, + "startColumn": 35, + "charOffset": 57496, + "charLength": 4, + "snippet": { + "text": "\t\t} else if (duration >= 3600) {\n\t\t\tuint16_t hours = duration / 3600;\n\t\t\tuint16_t minutes = (duration % 3600) / 60;\n\t\t\tdescription << hours << \" hour\" << (hours != 1 ? \"s\" : \"\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b32bd1c9524e08abe6eef81ca220f4ae532a4e84d5a9268b4b4da4f0c9e0e457" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2061, + "startColumn": 43, + "charOffset": 57608, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 2059, + "startColumn": 43, + "charOffset": 57496, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (duration >= 3600) {\n\t\t\tuint16_t hours = duration / 3600;\n\t\t\tuint16_t minutes = (duration % 3600) / 60;\n\t\t\tdescription << hours << \" hour\" << (hours != 1 ? \"s\" : \"\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "007ec006a01d3d994c4e671d141b3adc8c8357aafc9c49e33d823f50a82ff6d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2067, + "startColumn": 26, + "charOffset": 57809, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 2065, + "startColumn": 26, + "charOffset": 57698, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tdescription << \" and \" << minutes << \" minute\" << (minutes != 1 ? \"s\" : \"\");\n\t\t\t}\n\t\t} else if (duration >= 60) {\n\t\t\tuint16_t minutes = duration / 60;\n\t\t\tdescription << minutes << \" minute\" << (minutes != 1 ? \"s\" : \"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4106cb392599be04058924023e646c92394498a531cae64d65db793ca07a5658" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2068, + "startColumn": 23, + "charOffset": 57837, + "charLength": 8, + "snippet": { + "text": "duration" + } + }, + "contextRegion": { + "startLine": 2066, + "startColumn": 23, + "charOffset": 57779, + "charLength": 8, + "snippet": { + "text": "\t\t\t}\n\t\t} else if (duration >= 60) {\n\t\t\tuint16_t minutes = duration / 60;\n\t\t\tdescription << minutes << \" minute\" << (minutes != 1 ? \"s\" : \"\");\n\t\t\tuint16_t seconds = duration % 60;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b8e9ec17fd8affd75edc2ad3707763cfae9eb21f30d88cf88efa9d313f6293d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2068, + "startColumn": 34, + "charOffset": 57848, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 2066, + "startColumn": 34, + "charOffset": 57779, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\t\t} else if (duration >= 60) {\n\t\t\tuint16_t minutes = duration / 60;\n\t\t\tdescription << minutes << \" minute\" << (minutes != 1 ? \"s\" : \"\");\n\t\t\tuint16_t seconds = duration % 60;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1bd3d44edec6ee6ab9f950364bbc864a54cd3b082cb3e7778e0e01f86156a4e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2070, + "startColumn": 23, + "charOffset": 57943, + "charLength": 8, + "snippet": { + "text": "duration" + } + }, + "contextRegion": { + "startLine": 2068, + "startColumn": 23, + "charOffset": 57815, + "charLength": 8, + "snippet": { + "text": "\t\t\tuint16_t minutes = duration / 60;\n\t\t\tdescription << minutes << \" minute\" << (minutes != 1 ? \"s\" : \"\");\n\t\t\tuint16_t seconds = duration % 60;\n\n\t\t\tif (seconds > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40b48593aadba4461d4d52ffda6bfd193addab98d9d94aec2742895c9efb8b8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2070, + "startColumn": 34, + "charOffset": 57954, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 2068, + "startColumn": 34, + "charOffset": 57815, + "charLength": 2, + "snippet": { + "text": "\t\t\tuint16_t minutes = duration / 60;\n\t\t\tdescription << minutes << \" minute\" << (minutes != 1 ? \"s\" : \"\");\n\t\t\tuint16_t seconds = duration % 60;\n\n\t\t\tif (seconds > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8be3ee31819a677ccf3d84c25e8d3ff8e538e7acdf7320ecfc26b5934d3f9f90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'parseShowAttributesDescription' has cognitive complexity of 196 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2085, + "startColumn": 19, + "charOffset": 58254, + "charLength": 30, + "snippet": { + "text": "parseShowAttributesDescription" + } + }, + "contextRegion": { + "startLine": 2083, + "startColumn": 19, + "charOffset": 58233, + "charLength": 30, + "snippet": { + "text": "}\n\nstd::string Item::parseShowAttributesDescription(std::shared_ptr item, const uint16_t itemId) {\n\tstd::ostringstream itemDescription;\n\tconst ItemType &itemType = Item::items[itemId];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05c8c3a2259eee8e4d5e1cb707e719bf5b61ec0cdf424a7be9e3a0f6f883d950" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2085, + "startColumn": 72, + "charOffset": 58307, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 2083, + "startColumn": 72, + "charOffset": 58233, + "charLength": 4, + "snippet": { + "text": "}\n\nstd::string Item::parseShowAttributesDescription(std::shared_ptr item, const uint16_t itemId) {\n\tstd::ostringstream itemDescription;\n\tconst ItemType &itemType = Item::items[itemId];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3177c643bab7dc2d53d6505b0a487ea09338179e7062c7d19133ce2a395c23c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in ternary expression result" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2090, + "startColumn": 38, + "charOffset": 58552, + "charLength": 5, + "snippet": { + "text": "false" + } + }, + "contextRegion": { + "startLine": 2088, + "startColumn": 38, + "charOffset": 58424, + "charLength": 5, + "snippet": { + "text": "\n\tif (itemType.armor != 0 || (item && item->getArmor() != 0) || itemType.showAttributes) {\n\t\tbool begin = itemType.isQuiver() ? false : true;\n\n\t\tint32_t armor = (item ? item->getArmor() : itemType.armor);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dee7fd6721199369477aa3894992c677a6a464cd8df4c0a9500c42f06bf84217" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Expression can be simplified" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2090, + "startColumn": 44, + "charOffset": 58558, + "charLength": 1, + "snippet": { + "text": ":" + } + }, + "contextRegion": { + "startLine": 2088, + "startColumn": 44, + "charOffset": 58424, + "charLength": 1, + "snippet": { + "text": "\n\tif (itemType.armor != 0 || (item && item->getArmor() != 0) || itemType.showAttributes) {\n\t\tbool begin = itemType.isQuiver() ? false : true;\n\n\t\tint32_t armor = (item ? item->getArmor() : itemType.armor);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "500956701bd15cef6d8293a222a3151750b9b0457d3b6b5d3abda6a1f1519277" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2103, + "startColumn": 4, + "charOffset": 58821, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2101, + "startColumn": 4, + "charOffset": 58789, + "charLength": 3, + "snippet": { + "text": "\n\t\tif (itemType.abilities) {\n\t\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; i++) {\n\t\t\t\tif (!itemType.abilities->skills[i]) {\n\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4893f3852e04121b496d53038a663bf275790b06e67e7a58a6af2555b6b24815" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2104, + "startColumn": 9, + "charOffset": 58886, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2102, + "startColumn": 9, + "charOffset": 58790, + "charLength": 1, + "snippet": { + "text": "\t\tif (itemType.abilities) {\n\t\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; i++) {\n\t\t\t\tif (!itemType.abilities->skills[i]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ca39145fb6c7bff8835d4e4ed6818da167cf24664a3a4a90a8be185ab83e5da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2104, + "startColumn": 10, + "charOffset": 58887, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 2102, + "startColumn": 10, + "charOffset": 58790, + "charLength": 8, + "snippet": { + "text": "\t\tif (itemType.abilities) {\n\t\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; i++) {\n\t\t\t\tif (!itemType.abilities->skills[i]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "553a9d1f2347156213dc9b82b381608e62ae6cb69e80e786c91be956e127db73" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2104, + "startColumn": 10, + "charOffset": 58887, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 2102, + "startColumn": 10, + "charOffset": 58790, + "charLength": 8, + "snippet": { + "text": "\t\tif (itemType.abilities) {\n\t\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; i++) {\n\t\t\t\tif (!itemType.abilities->skills[i]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2540f75203080cd04ffbd986da5c4e535dad2d0cd6275d142ecc4ecbd52699b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2115, + "startColumn": 66, + "charOffset": 59124, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 2113, + "startColumn": 66, + "charOffset": 59052, + "charLength": 8, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\titemDescription << getSkillName(i) << ' ' << std::showpos << itemType.abilities->skills[i] << std::noshowpos;\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14daa994006de391d165e0ab693757bfb5ce2adf71cc98276364d71fd3992a9c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2118, + "startColumn": 4, + "charOffset": 59182, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2116, + "startColumn": 4, + "charOffset": 59173, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (uint8_t i = SKILL_CRITICAL_HIT_CHANCE; i <= SKILL_LAST; i++) {\n\t\t\t\tauto skill = item ? item->getSkill(static_cast(i)) : itemType.getSkill(static_cast(i));\n\t\t\t\tif (!skill) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02452cc37f368db10585bb79a615ee6e606708972926eec2788066cf2dc4af80" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2120, + "startColumn": 9, + "charOffset": 59370, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2118, + "startColumn": 9, + "charOffset": 59179, + "charLength": 1, + "snippet": { + "text": "\t\t\tfor (uint8_t i = SKILL_CRITICAL_HIT_CHANCE; i <= SKILL_LAST; i++) {\n\t\t\t\tauto skill = item ? item->getSkill(static_cast(i)) : itemType.getSkill(static_cast(i));\n\t\t\t\tif (!skill) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71dcdd6e5d39bcd0f1d2bcfed91e38b310e7248df0974b7ef1eb77ae4b17cd3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2120, + "startColumn": 10, + "charOffset": 59371, + "charLength": 5, + "snippet": { + "text": "skill" + } + }, + "contextRegion": { + "startLine": 2118, + "startColumn": 10, + "charOffset": 59179, + "charLength": 5, + "snippet": { + "text": "\t\t\tfor (uint8_t i = SKILL_CRITICAL_HIT_CHANCE; i <= SKILL_LAST; i++) {\n\t\t\t\tauto skill = item ? item->getSkill(static_cast(i)) : itemType.getSkill(static_cast(i));\n\t\t\t\tif (!skill) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc9bc6130a58e26b4a413de3e46d1b58335ab8338d2b0286424387f6600952fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2135, + "startColumn": 24, + "charOffset": 59692, + "charLength": 5, + "snippet": { + "text": "skill" + } + }, + "contextRegion": { + "startLine": 2133, + "startColumn": 24, + "charOffset": 59645, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t\t// Show float\n\t\t\t\titemDescription << skill / 100.;\n\t\t\t\tif (i != SKILL_CRITICAL_HIT_CHANCE) {\n\t\t\t\t\titemDescription << std::noshowpos;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48479b2a77f066daa7f9c34f9c2799e713d5874e8f1f9e3005076c463aa9e4b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2142, + "startColumn": 8, + "charOffset": 59835, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 2140, + "startColumn": 8, + "charOffset": 59822, + "charLength": 8, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (itemType.abilities->stats[STAT_MAGICPOINTS]) {\n\t\t\t\tif (begin) {\n\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d98bf7f898f54b288f336fd253cbd1fefe36168082841b38936d28031d741128" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2142, + "startColumn": 8, + "charOffset": 59835, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 2140, + "startColumn": 8, + "charOffset": 59822, + "charLength": 8, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (itemType.abilities->stats[STAT_MAGICPOINTS]) {\n\t\t\t\tif (begin) {\n\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e71c056faa2a105912e9bd2e9d83afadf5c9f641497d2c14168de40edc2ddb0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2153, + "startColumn": 4, + "charOffset": 60128, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2151, + "startColumn": 4, + "charOffset": 60119, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\t\tif (itemType.abilities->specializedMagicLevel[i]) {\n\t\t\t\t\tif (begin) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3605a955f67c022258f70e5264052d567b23839ea0392d44d233a76cf54cd5dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "11 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2153, + "startColumn": 29, + "charOffset": 60153, + "charLength": 2, + "snippet": { + "text": "11" + } + }, + "contextRegion": { + "startLine": 2151, + "startColumn": 29, + "charOffset": 60119, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\t\tif (itemType.abilities->specializedMagicLevel[i]) {\n\t\t\t\t\tif (begin) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b4ae89e5dcdf7cab348af63b41dc37230b7f7d89e74d923b76211e4e30505fed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2154, + "startColumn": 9, + "charOffset": 60172, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 2152, + "startColumn": 9, + "charOffset": 60124, + "charLength": 8, + "snippet": { + "text": "\n\t\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\t\tif (itemType.abilities->specializedMagicLevel[i]) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a55fbbda84cf2da5d752b79155deba13d17cb1cd917e8e743e904100e0060ac2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2154, + "startColumn": 9, + "charOffset": 60172, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 2152, + "startColumn": 9, + "charOffset": 60124, + "charLength": 8, + "snippet": { + "text": "\n\t\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\t\tif (itemType.abilities->specializedMagicLevel[i]) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2cacc7b491308a5a08dcc60811dd1511147bbbdd7e8b49a439e59c7f27faf12c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2154, + "startColumn": 9, + "charOffset": 60172, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 2152, + "startColumn": 9, + "charOffset": 60124, + "charLength": 8, + "snippet": { + "text": "\n\t\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\t\tif (itemType.abilities->specializedMagicLevel[i]) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7872ad73c0f07f222d9f597561feb6735fd9ae48d185afd04268a275a4b6b86" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2162, + "startColumn": 99, + "charOffset": 60441, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 2160, + "startColumn": 99, + "charOffset": 60335, + "charLength": 8, + "snippet": { + "text": "\t\t\t\t\t}\n\n\t\t\t\t\titemDescription << getCombatName(indexToCombatType(i)) << \" magic level \" << std::showpos << itemType.abilities->specializedMagicLevel[i] << std::noshowpos;\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2aa4f6d2dc960b30cad44e8c8e520508a8f3e3fc3df1768712415188adcd0d94" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2166, + "startColumn": 8, + "charOffset": 60524, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 2164, + "startColumn": 8, + "charOffset": 60511, + "charLength": 8, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (itemType.abilities->magicShieldCapacityFlat || itemType.abilities->magicShieldCapacityPercent) {\n\t\t\t\tif (begin) {\n\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5efefbf1c265870a3f9d98c647a1f6f76ef47aef97779827cd67f468ebb615e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2166, + "startColumn": 8, + "charOffset": 60524, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 2164, + "startColumn": 8, + "charOffset": 60511, + "charLength": 8, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (itemType.abilities->magicShieldCapacityFlat || itemType.abilities->magicShieldCapacityPercent) {\n\t\t\t\tif (begin) {\n\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7814f499328f71c30d276b9f55e2f5443c48272f16d272518c88622a14faba6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2166, + "startColumn": 52, + "charOffset": 60568, + "charLength": 2, + "snippet": { + "text": "||" + } + }, + "contextRegion": { + "startLine": 2164, + "startColumn": 52, + "charOffset": 60511, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (itemType.abilities->magicShieldCapacityFlat || itemType.abilities->magicShieldCapacityPercent) {\n\t\t\t\tif (begin) {\n\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee8b085cf04d8aa52275581d3db05dd20a8a6e87b50d43d8406aad795a4d3b14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2166, + "startColumn": 55, + "charOffset": 60571, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 2164, + "startColumn": 55, + "charOffset": 60511, + "charLength": 8, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (itemType.abilities->magicShieldCapacityFlat || itemType.abilities->magicShieldCapacityPercent) {\n\t\t\t\tif (begin) {\n\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d167c29878598d01dd7107579ed2ac9b4cf2edf10eec15f4d0b30e4f25f3608d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2177, + "startColumn": 8, + "charOffset": 60949, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 2175, + "startColumn": 8, + "charOffset": 60936, + "charLength": 8, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (itemType.abilities->perfectShotRange) {\n\t\t\t\tif (begin) {\n\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4ad6feb6851877f98b5d10fc899e8a49f7ff749d906a04f8e879c91b85e10f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2177, + "startColumn": 8, + "charOffset": 60949, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 2175, + "startColumn": 8, + "charOffset": 60936, + "charLength": 8, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (itemType.abilities->perfectShotRange) {\n\t\t\t\tif (begin) {\n\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "140117cb890b2de946db4a87f787c1805b64156485ca4841c5e9b016b967446e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2185, + "startColumn": 134, + "charOffset": 61239, + "charLength": 8, + "snippet": { + "text": "unsigned" + } + }, + "contextRegion": { + "startLine": 2183, + "startColumn": 134, + "charOffset": 61099, + "charLength": 8, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\titemDescription << \"perfect shot \" << std::showpos << itemType.abilities->perfectShotDamage << std::noshowpos << \" at range \" << unsigned(itemType.abilities->perfectShotRange);\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d805fdcca8537496a3e65c4e80f3d4affbf0c822526b2fcd3c897094cd9528f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2201, + "startColumn": 5, + "charOffset": 61663, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2199, + "startColumn": 5, + "charOffset": 61583, + "charLength": 3, + "snippet": { + "text": "\t\t\tint16_t show = itemType.abilities->absorbPercent[0];\n\t\t\tif (show != 0) {\n\t\t\t\tfor (size_t i = 1; i < COMBAT_COUNT; ++i) {\n\t\t\t\t\tif (itemType.abilities->absorbPercent[i] != show) {\n\t\t\t\t\t\tshow = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27ee99a85ac2eab5df9a1f04b38bbe078695997e80569791a130b7ab46fca7b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2202, + "startColumn": 10, + "charOffset": 61716, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 2200, + "startColumn": 10, + "charOffset": 61639, + "charLength": 8, + "snippet": { + "text": "\t\t\tif (show != 0) {\n\t\t\t\tfor (size_t i = 1; i < COMBAT_COUNT; ++i) {\n\t\t\t\t\tif (itemType.abilities->absorbPercent[i] != show) {\n\t\t\t\t\t\tshow = 0;\n\t\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d700a82518a60a10975c7814494280f6713735496bac5b91058e610c20a76757" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2209, + "startColumn": 8, + "charOffset": 61819, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2207, + "startColumn": 8, + "charOffset": 61806, + "charLength": 1, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (!show) {\n\t\t\t\tbool protectionBegin = true;\n\t\t\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a94c15f141b6a2c29e8c48b613fdafbda83e285ef8259ba77d2e171cb6303f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int16_t' (aka 'short') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2209, + "startColumn": 9, + "charOffset": 61820, + "charLength": 4, + "snippet": { + "text": "show" + } + }, + "contextRegion": { + "startLine": 2207, + "startColumn": 9, + "charOffset": 61806, + "charLength": 4, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (!show) {\n\t\t\t\tbool protectionBegin = true;\n\t\t\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6764882e56a7e5fec9be7c590383d72a2661ea25041fc028468fa92a564f083e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2211, + "startColumn": 5, + "charOffset": 61865, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2209, + "startColumn": 5, + "charOffset": 61812, + "charLength": 3, + "snippet": { + "text": "\t\t\tif (!show) {\n\t\t\t\tbool protectionBegin = true;\n\t\t\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\t\tif (itemType.abilities->absorbPercent[i] == 0) {\n\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "219c97a930267ff789f20a5d24043f81c80a5976aef4009852b7647804574736" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2212, + "startColumn": 10, + "charOffset": 61918, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 2210, + "startColumn": 10, + "charOffset": 61828, + "charLength": 8, + "snippet": { + "text": "\t\t\t\tbool protectionBegin = true;\n\t\t\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\t\tif (itemType.abilities->absorbPercent[i] == 0) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b1b08e98ee33dac0986b64274bcb93b3317ee1856a51de57113595e83c1a4b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2230, + "startColumn": 86, + "charOffset": 62353, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 2228, + "startColumn": 86, + "charOffset": 62230, + "charLength": 8, + "snippet": { + "text": "\t\t\t\t\t\titemDescription << \", \";\n\t\t\t\t\t}\n\t\t\t\t\titemDescription << fmt::format(\"{} {:+}%\", getCombatName(indexToCombatType(i)), itemType.abilities->absorbPercent[i]);\n\t\t\t\t}\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "469bd8045df2e9989db65a8fc5a7abc56992a0762ad6394458c2548ce891b5da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2245, + "startColumn": 5, + "charOffset": 62676, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2243, + "startColumn": 5, + "charOffset": 62599, + "charLength": 3, + "snippet": { + "text": "\t\t\tshow = itemType.abilities->fieldAbsorbPercent[0];\n\t\t\tif (show != 0) {\n\t\t\t\tfor (size_t i = 1; i < COMBAT_COUNT; ++i) {\n\t\t\t\t\tif (itemType.abilities->absorbPercent[i] != show) {\n\t\t\t\t\t\tshow = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b734c8da8afa2a9bcdbd39c2305dca66ecfff61708c3446698ffeec665b6952" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2246, + "startColumn": 10, + "charOffset": 62729, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 2244, + "startColumn": 10, + "charOffset": 62652, + "charLength": 8, + "snippet": { + "text": "\t\t\tif (show != 0) {\n\t\t\t\tfor (size_t i = 1; i < COMBAT_COUNT; ++i) {\n\t\t\t\t\tif (itemType.abilities->absorbPercent[i] != show) {\n\t\t\t\t\t\tshow = 0;\n\t\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "becf9be3f682555db6b2a8d738fe56b7394fb3a4cc6b3076a5ad188ac01aacdc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2253, + "startColumn": 8, + "charOffset": 62832, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2251, + "startColumn": 8, + "charOffset": 62819, + "charLength": 1, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (!show) {\n\t\t\t\tbool tmp = true;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c2c83472b403a4ec9c8bdbbfa4dae40463be8efe1fc5a21433e6e812aa45c252" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int16_t' (aka 'short') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2253, + "startColumn": 9, + "charOffset": 62833, + "charLength": 4, + "snippet": { + "text": "show" + } + }, + "contextRegion": { + "startLine": 2251, + "startColumn": 9, + "charOffset": 62819, + "charLength": 4, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (!show) {\n\t\t\t\tbool tmp = true;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0539afa2d8733c4c130d16177d7c64e2a0fb09b66a5a3708335d8c167e08d1d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2256, + "startColumn": 5, + "charOffset": 62867, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2254, + "startColumn": 5, + "charOffset": 62841, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tbool tmp = true;\n\n\t\t\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\t\tif (itemType.abilities->fieldAbsorbPercent[i] == 0) {\n\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "459995d2b6a82a7c2ab48df6d7847b0c55eb9d08c5905a5390a76ecd9747ee47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2257, + "startColumn": 10, + "charOffset": 62920, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 2255, + "startColumn": 10, + "charOffset": 62862, + "charLength": 8, + "snippet": { + "text": "\n\t\t\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\t\tif (itemType.abilities->fieldAbsorbPercent[i] == 0) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e182d3b83a1c237c5a20a96f5b22b23a7bd0cab45f8584790139edae91275a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2276, + "startColumn": 92, + "charOffset": 63343, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 2274, + "startColumn": 92, + "charOffset": 63244, + "charLength": 8, + "snippet": { + "text": "\t\t\t\t\t}\n\n\t\t\t\t\titemDescription << fmt::format(\"{} field {:+}%\", getCombatName(indexToCombatType(i)), itemType.abilities->fieldAbsorbPercent[i]);\n\t\t\t\t}\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c940523aa09e1c4dfa68b2fe8d3ae3d84ecc3861f67780759edd7ea0f514337e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2289, + "startColumn": 8, + "charOffset": 63608, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 2287, + "startColumn": 8, + "charOffset": 63595, + "charLength": 8, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (itemType.abilities->speed) {\n\t\t\t\titemDescription << parseShowDurationSpeed(itemType.abilities->speed, begin);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49f208a0c4abf0e8d5899986b7bf67b0fc3cd19ea11f5289d0122f6382117fdb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2289, + "startColumn": 8, + "charOffset": 63608, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 2287, + "startColumn": 8, + "charOffset": 63595, + "charLength": 8, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (itemType.abilities->speed) {\n\t\t\t\titemDescription << parseShowDurationSpeed(itemType.abilities->speed, begin);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5138501c46af822358939db4e7667c0beb8accc2c1b6f33bbf32224a7601192e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2293, + "startColumn": 8, + "charOffset": 63731, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 2291, + "startColumn": 8, + "charOffset": 63718, + "charLength": 8, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (itemType.abilities->cleavePercent) {\n\t\t\t\tif (begin) {\n\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e99039f542f1afaa8f85fbce84b0d53800a21e65c538343c1274e9229440c0b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2293, + "startColumn": 8, + "charOffset": 63731, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 2291, + "startColumn": 8, + "charOffset": 63718, + "charLength": 8, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (itemType.abilities->cleavePercent) {\n\t\t\t\tif (begin) {\n\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84beae8674c4d8b6261be492276b008eb4140a4b8d2da95507a06fbdc08a5bc7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'getDescription' has cognitive complexity of 734 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2313, + "startColumn": 19, + "charOffset": 64112, + "charLength": 14, + "snippet": { + "text": "getDescription" + } + }, + "contextRegion": { + "startLine": 2311, + "startColumn": 19, + "charOffset": 64091, + "charLength": 14, + "snippet": { + "text": "}\n\nstd::string Item::getDescription(const ItemType &it, int32_t lookDistance, std::shared_ptr item /*= nullptr*/, int32_t subType /*= -1*/, bool addArticle /*= true*/) {\n\tstd::string text = \"\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d55f00ea8e4124d9e62953ce1051e9af9ca98933770b3df86d647774bde21c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2313, + "startColumn": 98, + "charOffset": 64191, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 2311, + "startColumn": 98, + "charOffset": 64091, + "charLength": 4, + "snippet": { + "text": "}\n\nstd::string Item::getDescription(const ItemType &it, int32_t lookDistance, std::shared_ptr item /*= nullptr*/, int32_t subType /*= -1*/, bool addArticle /*= true*/) {\n\tstd::string text = \"\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e32eca4a6650533cdbe7743d20c7a5d6b3b2b734748d9a43b6129ec0b2a618f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-redundant-string-init", + "ruleIndex": 725, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant string initialization" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2314, + "startColumn": 14, + "charOffset": 64280, + "charLength": 4, + "snippet": { + "text": "text" + } + }, + "contextRegion": { + "startLine": 2312, + "startColumn": 14, + "charOffset": 64093, + "charLength": 4, + "snippet": { + "text": "\nstd::string Item::getDescription(const ItemType &it, int32_t lookDistance, std::shared_ptr item /*= nullptr*/, int32_t subType /*= -1*/, bool addArticle /*= true*/) {\n\tstd::string text = \"\";\n\n\tstd::ostringstream s;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b82b6b2d87bb4649281710ec40cecad989ff02a47c8dcbeaf8f07b114b3e397e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2338, + "startColumn": 5, + "charOffset": 65120, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2336, + "startColumn": 5, + "charOffset": 64974, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t// hidden from description, so `total / 2` is most likely the amount of vocations to be shown.\n\t\t\t\tshowVocMap.reserve(vocMap.size() / 2);\n\t\t\t\tfor (const auto &voc : vocMap) {\n\t\t\t\t\tif (voc.second) {\n\t\t\t\t\t\tshowVocMap.push_back(g_vocations().getVocation(voc.first));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d94528c075748fbb64e0a3f18aea7852bf9a9d4376db201f12eb5c41134341b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2345, + "startColumn": 6, + "charOffset": 65292, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 2343, + "startColumn": 6, + "charOffset": 65255, + "charLength": 4, + "snippet": { + "text": "\n\t\t\t\tif (!showVocMap.empty()) {\n\t\t\t\t\tauto vocIt = showVocMap.begin(), vocLast = (showVocMap.end() - 1);\n\t\t\t\t\twhile (vocIt != vocLast) {\n\t\t\t\t\t\ts << asLowerCaseString((*vocIt)->getVocName()) << \"s\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0f713231bcc7003d263c2867e83fd12ffe5eaedb3bb89de0154a939d491a68b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2345, + "startColumn": 6, + "charOffset": 65292, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 2343, + "startColumn": 6, + "charOffset": 65255, + "charLength": 4, + "snippet": { + "text": "\n\t\t\t\tif (!showVocMap.empty()) {\n\t\t\t\t\tauto vocIt = showVocMap.begin(), vocLast = (showVocMap.end() - 1);\n\t\t\t\t\twhile (vocIt != vocLast) {\n\t\t\t\t\t\ts << asLowerCaseString((*vocIt)->getVocName()) << \"s\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da7769665f451ade8785b444d99440fa6420810873853fe451e32f9e7b4bc110" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2346, + "startColumn": 6, + "charOffset": 65364, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 2344, + "startColumn": 6, + "charOffset": 65256, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tif (!showVocMap.empty()) {\n\t\t\t\t\tauto vocIt = showVocMap.begin(), vocLast = (showVocMap.end() - 1);\n\t\t\t\t\twhile (vocIt != vocLast) {\n\t\t\t\t\t\ts << asLowerCaseString((*vocIt)->getVocName()) << \"s\";\n\t\t\t\t\t\tif (++vocIt == vocLast) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9bc2f6c87069fcb63fec0327cbffc0fc2cf23e1cb31c74af80e7c9a06e263098" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'vocIt' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2346, + "startColumn": 13, + "charOffset": 65371, + "charLength": 5, + "snippet": { + "text": "vocIt" + } + }, + "contextRegion": { + "startLine": 2344, + "startColumn": 13, + "charOffset": 65256, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tif (!showVocMap.empty()) {\n\t\t\t\t\tauto vocIt = showVocMap.begin(), vocLast = (showVocMap.end() - 1);\n\t\t\t\t\twhile (vocIt != vocLast) {\n\t\t\t\t\t\ts << asLowerCaseString((*vocIt)->getVocName()) << \"s\";\n\t\t\t\t\t\tif (++vocIt == vocLast) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6da493dc4c05e0a4eae82dec07f6238de0433454e22b4a6eb2657f4aa978537a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2377, + "startColumn": 3, + "charOffset": 65965, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2375, + "startColumn": 3, + "charOffset": 65915, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\t} else if (it.weaponType != WEAPON_NONE) {\n\t\tif (it.weaponType == WEAPON_DISTANCE && it.ammoType != AMMO_NONE) {\n\t\t\tbool begin = true;\n\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc3f8a3d7603e9550b06e17f688b38cb4ecbd4a7c64c9345b78fb281e06ee83f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'attack' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2382, + "startColumn": 12, + "charOffset": 66177, + "charLength": 6, + "snippet": { + "text": "attack" + } + }, + "contextRegion": { + "startLine": 2380, + "startColumn": 12, + "charOffset": 66073, + "charLength": 6, + "snippet": { + "text": "\t\t\ts << \" (Range: \" << static_cast(item ? item->getShootRange() : it.shootRange);\n\n\t\t\tint32_t attack;\n\t\t\tint8_t hitChance;\n\t\t\tif (item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53a715dc99f43e32dc4d94e67ef049ce54ddac2a8787ee0e32839fe0ae51aa03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'hitChance' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2383, + "startColumn": 11, + "charOffset": 66195, + "charLength": 9, + "snippet": { + "text": "hitChance" + } + }, + "contextRegion": { + "startLine": 2381, + "startColumn": 11, + "charOffset": 66165, + "charLength": 9, + "snippet": { + "text": "\n\t\t\tint32_t attack;\n\t\t\tint8_t hitChance;\n\t\t\tif (item) {\n\t\t\t\tattack = item->getAttack();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "634a62d1eba104cb0802aa3144b15c71cbc4672b2f75f2f90df2eeb4d5a8e0d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2401, + "startColumn": 5, + "charOffset": 66601, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2399, + "startColumn": 5, + "charOffset": 66573, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tif (it.abilities) {\n\t\t\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; i++) {\n\t\t\t\t\tif (!it.abilities->skills[i]) {\n\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38c33e4fe24f61b129110c94c1475bd39e211e8eb768f39c0b9c461ca427e6e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2402, + "startColumn": 10, + "charOffset": 66667, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2400, + "startColumn": 10, + "charOffset": 66574, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (it.abilities) {\n\t\t\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; i++) {\n\t\t\t\t\tif (!it.abilities->skills[i]) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ae97deed4365a2fb7ee9772fb792e240bd8ae84aaaf341f7f2a5be62bfde7b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2402, + "startColumn": 11, + "charOffset": 66668, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2400, + "startColumn": 11, + "charOffset": 66574, + "charLength": 2, + "snippet": { + "text": "\t\t\tif (it.abilities) {\n\t\t\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; i++) {\n\t\t\t\t\tif (!it.abilities->skills[i]) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d2e185acd9df07655bd6128fe700d7c868c0b7d0ba36938d5540f4f34be0299" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2402, + "startColumn": 11, + "charOffset": 66668, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2400, + "startColumn": 11, + "charOffset": 66574, + "charLength": 2, + "snippet": { + "text": "\t\t\tif (it.abilities) {\n\t\t\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; i++) {\n\t\t\t\t\tif (!it.abilities->skills[i]) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7814f499328f71c30d276b9f55e2f5443c48272f16d272518c88622a14faba6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2413, + "startColumn": 53, + "charOffset": 66866, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2411, + "startColumn": 53, + "charOffset": 66806, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\t}\n\n\t\t\t\t\ts << getSkillName(i) << ' ' << std::showpos << it.abilities->skills[i] << std::noshowpos;\n\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3dcad25ea75ea194ec99c3316011814c28075f39d6fb742225702013557c207" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2416, + "startColumn": 5, + "charOffset": 66920, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2414, + "startColumn": 5, + "charOffset": 66909, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tfor (uint8_t i = SKILL_CRITICAL_HIT_CHANCE; i <= SKILL_LAST; i++) {\n\t\t\t\t\tauto skill = item ? item->getSkill(static_cast(i)) : it.getSkill(static_cast(i));\n\t\t\t\t\tif (!skill) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "675f8e2640a8e47f23bae2cb9ddd931cd20a2464c4c6e83bbad2890d71b42820" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2418, + "startColumn": 10, + "charOffset": 67104, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2416, + "startColumn": 10, + "charOffset": 66916, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tfor (uint8_t i = SKILL_CRITICAL_HIT_CHANCE; i <= SKILL_LAST; i++) {\n\t\t\t\t\tauto skill = item ? item->getSkill(static_cast(i)) : it.getSkill(static_cast(i));\n\t\t\t\t\tif (!skill) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b67bfa1de4c5b6af205d8169d74bc912ea7b2aaf5f9eeafa316013e91f52d7b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2418, + "startColumn": 11, + "charOffset": 67105, + "charLength": 5, + "snippet": { + "text": "skill" + } + }, + "contextRegion": { + "startLine": 2416, + "startColumn": 11, + "charOffset": 66916, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tfor (uint8_t i = SKILL_CRITICAL_HIT_CHANCE; i <= SKILL_LAST; i++) {\n\t\t\t\t\tauto skill = item ? item->getSkill(static_cast(i)) : it.getSkill(static_cast(i));\n\t\t\t\t\tif (!skill) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d4fd5b0b08ac23a95d2ccaa3b652bcedcc052b26a85e6354f40d449ed83acb0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2433, + "startColumn": 11, + "charOffset": 67370, + "charLength": 5, + "snippet": { + "text": "skill" + } + }, + "contextRegion": { + "startLine": 2431, + "startColumn": 11, + "charOffset": 67334, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\t}\n\t\t\t\t\t// Show float\n\t\t\t\t\ts << skill / 100.;\n\t\t\t\t\tif (i != SKILL_CRITICAL_HIT_CHANCE) {\n\t\t\t\t\t\ts << std::noshowpos;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32c0a973fbfcff073ffacff995575195b5f15886a831b330c1cdd95d373ff3bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2440, + "startColumn": 9, + "charOffset": 67491, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2438, + "startColumn": 9, + "charOffset": 67476, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->stats[STAT_MAGICPOINTS]) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5481db067bb0a4cc6b51deabbe226d39f4857b102311c7e3c9b9da1c8c8e3485" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2440, + "startColumn": 9, + "charOffset": 67491, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2438, + "startColumn": 9, + "charOffset": 67476, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->stats[STAT_MAGICPOINTS]) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5ae0131e116c138d1458d3500f9f7314f040216a60f35c9489bbc49b5b5556e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2451, + "startColumn": 5, + "charOffset": 67739, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2449, + "startColumn": 5, + "charOffset": 67728, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\t\t\tif (it.abilities->specializedMagicLevel[i]) {\n\t\t\t\t\t\tif (begin) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c4de973ed3d4fd7684e25aef624e9d234ed4550a6ee5c3f04f5566cdde8a556" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "11 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2451, + "startColumn": 30, + "charOffset": 67764, + "charLength": 2, + "snippet": { + "text": "11" + } + }, + "contextRegion": { + "startLine": 2449, + "startColumn": 30, + "charOffset": 67728, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\t\t\tif (it.abilities->specializedMagicLevel[i]) {\n\t\t\t\t\t\tif (begin) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04004d2509bc59a74a43513210db52bfb215963d5d3f708437b407b7a4075fc9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2452, + "startColumn": 10, + "charOffset": 67784, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2450, + "startColumn": 10, + "charOffset": 67734, + "charLength": 2, + "snippet": { + "text": "\n\t\t\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\t\t\tif (it.abilities->specializedMagicLevel[i]) {\n\t\t\t\t\t\tif (begin) {\n\t\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4856cd86621cf72801ef732848f2391a709cc3b1dcd9fd1267a3043f91b924ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2452, + "startColumn": 10, + "charOffset": 67784, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2450, + "startColumn": 10, + "charOffset": 67734, + "charLength": 2, + "snippet": { + "text": "\n\t\t\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\t\t\tif (it.abilities->specializedMagicLevel[i]) {\n\t\t\t\t\t\tif (begin) {\n\t\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e182d3b83a1c237c5a20a96f5b22b23a7bd0cab45f8584790139edae91275a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2452, + "startColumn": 10, + "charOffset": 67784, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2450, + "startColumn": 10, + "charOffset": 67734, + "charLength": 2, + "snippet": { + "text": "\n\t\t\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\t\t\tif (it.abilities->specializedMagicLevel[i]) {\n\t\t\t\t\t\tif (begin) {\n\t\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e39c09e0e1946164cb12aef5c6fba30cac61b420e763efa2b92e14a4ae5da27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2460, + "startColumn": 86, + "charOffset": 68012, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2458, + "startColumn": 86, + "charOffset": 67918, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts << getCombatName(indexToCombatType(i)) << \" magic level \" << std::showpos << it.abilities->specializedMagicLevel[i] << std::noshowpos;\n\t\t\t\t\t}\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73c63aac148939e92f3968924783460d782b0e1586bfa646759ce0b22f705869" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2464, + "startColumn": 9, + "charOffset": 68092, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2462, + "startColumn": 9, + "charOffset": 68077, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->magicShieldCapacityFlat || it.abilities->magicShieldCapacityPercent) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1df31d6a1049b68fac4b50ec442e3017507d96b0c407b0337c9958ce6a59eeb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2464, + "startColumn": 9, + "charOffset": 68092, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2462, + "startColumn": 9, + "charOffset": 68077, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->magicShieldCapacityFlat || it.abilities->magicShieldCapacityPercent) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "922ad7df21273b07c4eda231b953c1be2ff6f60c8be5de3ba07f13978bb358b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2464, + "startColumn": 47, + "charOffset": 68130, + "charLength": 2, + "snippet": { + "text": "||" + } + }, + "contextRegion": { + "startLine": 2462, + "startColumn": 47, + "charOffset": 68077, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->magicShieldCapacityFlat || it.abilities->magicShieldCapacityPercent) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25f4d4a34bf0fd838642170be74bec26612401d4080196871d23af2788188e8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2464, + "startColumn": 50, + "charOffset": 68133, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2462, + "startColumn": 50, + "charOffset": 68077, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->magicShieldCapacityFlat || it.abilities->magicShieldCapacityPercent) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f006831f50acccc199dce891356c2851f54182c56815fcc0c3ece0f169011749" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2475, + "startColumn": 9, + "charOffset": 68460, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2473, + "startColumn": 9, + "charOffset": 68445, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->perfectShotRange) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7478a53ec5f8cc48df7bdafcb2b30e5db0c0aafeb4e0bce0321e31f8d45fb4af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2475, + "startColumn": 9, + "charOffset": 68460, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2473, + "startColumn": 9, + "charOffset": 68445, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->perfectShotRange) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d417c7f062aaae618584d5d81f3e4a851604191809e133128413f93deece119b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2483, + "startColumn": 115, + "charOffset": 68703, + "charLength": 8, + "snippet": { + "text": "unsigned" + } + }, + "contextRegion": { + "startLine": 2481, + "startColumn": 115, + "charOffset": 68581, + "charLength": 8, + "snippet": { + "text": "\t\t\t\t\t}\n\n\t\t\t\t\ts << \"perfect shot \" << std::showpos << it.abilities->perfectShotDamage << std::noshowpos << \" at range \" << unsigned(it.abilities->perfectShotRange);\n\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a14ad9fae70aa4e73e887a3511a2ab51ffe2ab0c23f269b870399cfac93d509b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2486, + "startColumn": 9, + "charOffset": 68760, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2484, + "startColumn": 9, + "charOffset": 68745, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)]) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee8b085cf04d8aa52275581d3db05dd20a8a6e87b50d43d8406aad795a4d3b14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2486, + "startColumn": 9, + "charOffset": 68760, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2484, + "startColumn": 9, + "charOffset": 68745, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)]) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "111e99a108e52ce28e90a199320508a6db265ed220842902969f0d156e9658e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2486, + "startColumn": 9, + "charOffset": 68760, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2484, + "startColumn": 9, + "charOffset": 68745, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)]) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e29c316a906fd17933ce929c2181880157ab63d0b544fb8b4cd9e33c45156437" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2494, + "startColumn": 51, + "charOffset": 68976, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2492, + "startColumn": 51, + "charOffset": 68918, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\t}\n\n\t\t\t\t\ts << \"damage reflection \" << std::showpos << it.abilities->reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)] << std::noshowpos;\n\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a65ac983c7a0f06ff212b3e63f1227c77abc6684ebec3852a0d59e4ad86bfef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2499, + "startColumn": 6, + "charOffset": 69147, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2497, + "startColumn": 6, + "charOffset": 69070, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tint16_t show = it.abilities->absorbPercent[0];\n\t\t\t\tif (show != 0) {\n\t\t\t\t\tfor (size_t i = 1; i < COMBAT_COUNT; ++i) {\n\t\t\t\t\t\tif (it.abilities->absorbPercent[i] != show) {\n\t\t\t\t\t\t\tshow = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d23a95ddc621effdeb2062a92d6ed734e04f902bc055d396e14a05f279f8fa7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2500, + "startColumn": 11, + "charOffset": 69201, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2498, + "startColumn": 11, + "charOffset": 69121, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tif (show != 0) {\n\t\t\t\t\tfor (size_t i = 1; i < COMBAT_COUNT; ++i) {\n\t\t\t\t\t\tif (it.abilities->absorbPercent[i] != show) {\n\t\t\t\t\t\t\tshow = 0;\n\t\t\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6aa3995a6cf23a742ed5dba7a3de6f1251e12cffe90ebf1ad480affc69088ee8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2510, + "startColumn": 6, + "charOffset": 69345, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2508, + "startColumn": 6, + "charOffset": 69317, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbool tmp = true;\n\n\t\t\t\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\t\t\tif (it.abilities->absorbPercent[i] == 0) {\n\t\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c9125789e7e2aa9368bda0dc2f275c464552be81db748757e44405ea346efd7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2511, + "startColumn": 11, + "charOffset": 69399, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2509, + "startColumn": 11, + "charOffset": 69339, + "charLength": 2, + "snippet": { + "text": "\n\t\t\t\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\t\t\tif (it.abilities->absorbPercent[i] == 0) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b452422b9dde826ecd2cb4a829f34ea2462983f0f95099394622f12a380e2147" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2530, + "startColumn": 73, + "charOffset": 69750, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2528, + "startColumn": 73, + "charOffset": 69669, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts << fmt::format(\"{} {:+}%\", getCombatName(indexToCombatType(i)), it.abilities->absorbPercent[i]);\n\t\t\t\t\t}\n\t\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf8ff3f3300962cbcb4732625f11e9a2d39194f448390e0acdf5f62409bd7c8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2545, + "startColumn": 6, + "charOffset": 70032, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2543, + "startColumn": 6, + "charOffset": 69958, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tshow = it.abilities->fieldAbsorbPercent[0];\n\t\t\t\tif (show != 0) {\n\t\t\t\t\tfor (size_t i = 1; i < COMBAT_COUNT; ++i) {\n\t\t\t\t\t\tif (it.abilities->absorbPercent[i] != show) {\n\t\t\t\t\t\t\tshow = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0714a9266b6af1aa6abfe675de3063aeafaa62e9bc4f79cfbbff1bab7a6939eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2546, + "startColumn": 11, + "charOffset": 70086, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2544, + "startColumn": 11, + "charOffset": 70006, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tif (show != 0) {\n\t\t\t\t\tfor (size_t i = 1; i < COMBAT_COUNT; ++i) {\n\t\t\t\t\t\tif (it.abilities->absorbPercent[i] != show) {\n\t\t\t\t\t\t\tshow = 0;\n\t\t\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6851c8fd8e25a2e7c71a80c3f7d13cc2e532e357ca7d4aee0674f24b371829c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2556, + "startColumn": 6, + "charOffset": 70230, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2554, + "startColumn": 6, + "charOffset": 70202, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbool tmp = true;\n\n\t\t\t\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\t\t\tif (it.abilities->fieldAbsorbPercent[i] == 0) {\n\t\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88805a9f8f9336b9f92353bd3b2429d9f2b9bbecf2d148f31721c80499aa5ad1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2557, + "startColumn": 11, + "charOffset": 70284, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2555, + "startColumn": 11, + "charOffset": 70224, + "charLength": 2, + "snippet": { + "text": "\n\t\t\t\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\t\t\tif (it.abilities->fieldAbsorbPercent[i] == 0) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95f9697271570cf3fad1c3e16e52a203efe8fe4c841c71cce17c191e132a0b2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2576, + "startColumn": 79, + "charOffset": 70646, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2574, + "startColumn": 79, + "charOffset": 70559, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts << fmt::format(\"{} field {:+}%\", getCombatName(indexToCombatType(i)), it.abilities->fieldAbsorbPercent[i]);\n\t\t\t\t\t}\n\t\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3298b825be00fd57a3d9bd888f2f3d40fc75760b5c13c9270d202f8e64e98fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2589, + "startColumn": 9, + "charOffset": 70874, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2587, + "startColumn": 9, + "charOffset": 70859, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->speed) {\n\t\t\t\t\ts << parseShowDurationSpeed(it.abilities->speed, begin);\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8bbef19cc80d457d101643b3ce50db583fb26dc929ec104e5a61543a78dead4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2589, + "startColumn": 9, + "charOffset": 70874, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2587, + "startColumn": 9, + "charOffset": 70859, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->speed) {\n\t\t\t\t\ts << parseShowDurationSpeed(it.abilities->speed, begin);\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73c0ba98215d8c252959662efa261d49897f6b90e0a03617893a1ecbfbeea3db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2593, + "startColumn": 9, + "charOffset": 70974, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2591, + "startColumn": 9, + "charOffset": 70959, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->cleavePercent) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cfc28308c5c469d90f020e8e749b20df4e0401a8a9446d5c4460e2fb62de7a73" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2593, + "startColumn": 9, + "charOffset": 70974, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2591, + "startColumn": 9, + "charOffset": 70959, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->cleavePercent) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58b6a6fb0664b311744de2376f476be15f0622dc870c9187dc2ef83c575d3aa6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2612, + "startColumn": 4, + "charOffset": 71366, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 2610, + "startColumn": 4, + "charOffset": 71340, + "charLength": 7, + "snippet": { + "text": "\t\t\tbool begin = true;\n\n\t\t\tint32_t attack, defense, extraDefense;\n\t\t\tif (item) {\n\t\t\t\tattack = item->getAttack();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "deb80af7f8b43fd7701c684a91a6898ab07e199b791e005b028a27528d04f06f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2612, + "startColumn": 4, + "charOffset": 71366, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 2610, + "startColumn": 4, + "charOffset": 71340, + "charLength": 7, + "snippet": { + "text": "\t\t\tbool begin = true;\n\n\t\t\tint32_t attack, defense, extraDefense;\n\t\t\tif (item) {\n\t\t\t\tattack = item->getAttack();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04ab66eb465f523af3783474d0e8d2bc41f518a5e5cc8c1d284248e5ff9e9fa4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'attack' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2612, + "startColumn": 12, + "charOffset": 71374, + "charLength": 6, + "snippet": { + "text": "attack" + } + }, + "contextRegion": { + "startLine": 2610, + "startColumn": 12, + "charOffset": 71340, + "charLength": 6, + "snippet": { + "text": "\t\t\tbool begin = true;\n\n\t\t\tint32_t attack, defense, extraDefense;\n\t\t\tif (item) {\n\t\t\t\tattack = item->getAttack();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d46a16d12dbc9255c10da3395f845e9dc95bc507564b01bec0f155fa9b9f21cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'defense' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2612, + "startColumn": 20, + "charOffset": 71382, + "charLength": 7, + "snippet": { + "text": "defense" + } + }, + "contextRegion": { + "startLine": 2610, + "startColumn": 20, + "charOffset": 71340, + "charLength": 7, + "snippet": { + "text": "\t\t\tbool begin = true;\n\n\t\t\tint32_t attack, defense, extraDefense;\n\t\t\tif (item) {\n\t\t\t\tattack = item->getAttack();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "614ad417b3244c538766849d3143382a3883b6965f025950aee1d4d9ae8475f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'extraDefense' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2612, + "startColumn": 29, + "charOffset": 71391, + "charLength": 12, + "snippet": { + "text": "extraDefense" + } + }, + "contextRegion": { + "startLine": 2610, + "startColumn": 29, + "charOffset": 71340, + "charLength": 12, + "snippet": { + "text": "\t\t\tbool begin = true;\n\n\t\t\tint32_t attack, defense, extraDefense;\n\t\t\tif (item) {\n\t\t\t\tattack = item->getAttack();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74f7354da9334c3ac6ca6857a94fc6af6359e87a41f3cfdd4a6388ce11c0faf9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2626, + "startColumn": 9, + "charOffset": 71729, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2624, + "startColumn": 9, + "charOffset": 71695, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tuint32_t volume = 0;\n\n\t\t\t\tif (!item || !item->hasAttribute(ItemAttribute_t::UNIQUEID)) {\n\t\t\t\t\tif (it.isContainer()) {\n\t\t\t\t\t\tvolume = it.maxItems;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38628fa2f94b9f2db9d7f985ae3733fb55c5fe1c02d18271be626dda4fdbb53f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2627, + "startColumn": 6, + "charOffset": 71793, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2625, + "startColumn": 6, + "charOffset": 71720, + "charLength": 2, + "snippet": { + "text": "\n\t\t\t\tif (!item || !item->hasAttribute(ItemAttribute_t::UNIQUEID)) {\n\t\t\t\t\tif (it.isContainer()) {\n\t\t\t\t\t\tvolume = it.maxItems;\n\t\t\t\t\t} else if (item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7282878fe91979032faaa61f03bc6dbb7a06261856ffa39a53b65acff75d040c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2669, + "startColumn": 5, + "charOffset": 72696, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2667, + "startColumn": 5, + "charOffset": 72668, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tif (it.abilities) {\n\t\t\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; i++) {\n\t\t\t\t\tif (!it.abilities->skills[i]) {\n\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "293152fee4fd47ae28c4820f7b9eb1c3b89eaea26781b49c6fcb537e7535e010" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2670, + "startColumn": 10, + "charOffset": 72762, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2668, + "startColumn": 10, + "charOffset": 72669, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (it.abilities) {\n\t\t\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; i++) {\n\t\t\t\t\tif (!it.abilities->skills[i]) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3824a75642a216907f2b8e20c7472ba33ea1afe9532fb215e8695d8015ccebae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2670, + "startColumn": 11, + "charOffset": 72763, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2668, + "startColumn": 11, + "charOffset": 72669, + "charLength": 2, + "snippet": { + "text": "\t\t\tif (it.abilities) {\n\t\t\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; i++) {\n\t\t\t\t\tif (!it.abilities->skills[i]) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d97c36f606f6798a2f3d5e96bc9babeccce4ac9e7f2ae3cef9bfa5f984621a71" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2670, + "startColumn": 11, + "charOffset": 72763, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2668, + "startColumn": 11, + "charOffset": 72669, + "charLength": 2, + "snippet": { + "text": "\t\t\tif (it.abilities) {\n\t\t\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; i++) {\n\t\t\t\t\tif (!it.abilities->skills[i]) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee91229e333456c5a32bf174b61b933da36992f000ab98bb07049565d4d160ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2681, + "startColumn": 53, + "charOffset": 72961, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2679, + "startColumn": 53, + "charOffset": 72901, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\t}\n\n\t\t\t\t\ts << getSkillName(i) << ' ' << std::showpos << it.abilities->skills[i] << std::noshowpos;\n\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3ac1a6e35f1ebea956d38022b22f131072895a72269082002207c2d7f203cc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2684, + "startColumn": 5, + "charOffset": 73015, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2682, + "startColumn": 5, + "charOffset": 73004, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tfor (uint8_t i = SKILL_CRITICAL_HIT_CHANCE; i <= SKILL_LAST; i++) {\n\t\t\t\t\tauto skill = item ? item->getSkill(static_cast(i)) : it.getSkill(static_cast(i));\n\t\t\t\t\tif (!skill) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08a968d7cff76af6b7fb86774ce63c29f907e2df11d41b934afaa798e11b6062" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2686, + "startColumn": 10, + "charOffset": 73199, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2684, + "startColumn": 10, + "charOffset": 73011, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tfor (uint8_t i = SKILL_CRITICAL_HIT_CHANCE; i <= SKILL_LAST; i++) {\n\t\t\t\t\tauto skill = item ? item->getSkill(static_cast(i)) : it.getSkill(static_cast(i));\n\t\t\t\t\tif (!skill) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "466d27b6f487f8582abdfdc98ce0b7127d525d35f5a3e601239459b80aec8182" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2686, + "startColumn": 11, + "charOffset": 73200, + "charLength": 5, + "snippet": { + "text": "skill" + } + }, + "contextRegion": { + "startLine": 2684, + "startColumn": 11, + "charOffset": 73011, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tfor (uint8_t i = SKILL_CRITICAL_HIT_CHANCE; i <= SKILL_LAST; i++) {\n\t\t\t\t\tauto skill = item ? item->getSkill(static_cast(i)) : it.getSkill(static_cast(i));\n\t\t\t\t\tif (!skill) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af3577e3f44ea0453552100e0467ba0221f3187c2261a8351b92458e5c5967ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2701, + "startColumn": 11, + "charOffset": 73465, + "charLength": 5, + "snippet": { + "text": "skill" + } + }, + "contextRegion": { + "startLine": 2699, + "startColumn": 11, + "charOffset": 73429, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\t}\n\t\t\t\t\t// Show float\n\t\t\t\t\ts << skill / 100.;\n\t\t\t\t\tif (i != SKILL_CRITICAL_HIT_CHANCE) {\n\t\t\t\t\t\ts << std::noshowpos;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e9305d2e851ec7c3969d9f8abcad01e53383c98b571f6a571557312759c2db5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2708, + "startColumn": 9, + "charOffset": 73586, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2706, + "startColumn": 9, + "charOffset": 73571, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->stats[STAT_MAGICPOINTS]) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94c34d3793f6f4d1a66a2d44b4c9fa5642d3e8290f09bca0710b7b3f2465f265" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2708, + "startColumn": 9, + "charOffset": 73586, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2706, + "startColumn": 9, + "charOffset": 73571, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->stats[STAT_MAGICPOINTS]) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98543fd3f6c2bb734f956463122944cf5db31203258039cc2af461b95dbb1323" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2719, + "startColumn": 5, + "charOffset": 73834, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2717, + "startColumn": 5, + "charOffset": 73823, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\t\t\tif (it.abilities->specializedMagicLevel[i]) {\n\t\t\t\t\t\tif (begin) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46535d890503fea6e808a9c746eb513e7deccae526dcea099e80e39d1d217e07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "11 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2719, + "startColumn": 30, + "charOffset": 73859, + "charLength": 2, + "snippet": { + "text": "11" + } + }, + "contextRegion": { + "startLine": 2717, + "startColumn": 30, + "charOffset": 73823, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\t\t\tif (it.abilities->specializedMagicLevel[i]) {\n\t\t\t\t\t\tif (begin) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2dfa55346f2e6c59868b45a1312c4c6461296166e5067fd939b4fde16f14278b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2720, + "startColumn": 10, + "charOffset": 73879, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2718, + "startColumn": 10, + "charOffset": 73829, + "charLength": 2, + "snippet": { + "text": "\n\t\t\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\t\t\tif (it.abilities->specializedMagicLevel[i]) {\n\t\t\t\t\t\tif (begin) {\n\t\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fe5b7d789783e5808197cc81b3542164826da48b1741522292ac00f1a4fefa6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2720, + "startColumn": 10, + "charOffset": 73879, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2718, + "startColumn": 10, + "charOffset": 73829, + "charLength": 2, + "snippet": { + "text": "\n\t\t\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\t\t\tif (it.abilities->specializedMagicLevel[i]) {\n\t\t\t\t\t\tif (begin) {\n\t\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5a8828fc20de3b320fb858ba3c6a3cfede98172705a478a2fb383cadec43590" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2720, + "startColumn": 10, + "charOffset": 73879, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2718, + "startColumn": 10, + "charOffset": 73829, + "charLength": 2, + "snippet": { + "text": "\n\t\t\t\tfor (uint8_t i = 1; i <= 11; i++) {\n\t\t\t\t\tif (it.abilities->specializedMagicLevel[i]) {\n\t\t\t\t\t\tif (begin) {\n\t\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd07c4b0e4928a8c796d8d7316429d93748bc47fae7bfd42bdb4dc0565593fc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2728, + "startColumn": 86, + "charOffset": 74107, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2726, + "startColumn": 86, + "charOffset": 74013, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts << getCombatName(indexToCombatType(i)) << \" magic level \" << std::showpos << it.abilities->specializedMagicLevel[i] << std::noshowpos;\n\t\t\t\t\t}\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d342ac7bbdfd2d988f6c5dd0b4f9576e940b5ff36917392bb03ecaa4d5f5dc3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2732, + "startColumn": 9, + "charOffset": 74187, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2730, + "startColumn": 9, + "charOffset": 74172, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->magicShieldCapacityFlat || it.abilities->magicShieldCapacityPercent) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10c53224fcb5df6ca1326657109ecc2a5c53def74c2e5112bc6264987ba426e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2732, + "startColumn": 9, + "charOffset": 74187, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2730, + "startColumn": 9, + "charOffset": 74172, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->magicShieldCapacityFlat || it.abilities->magicShieldCapacityPercent) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b5e33edc0ba67d14406c89c6366b167f80b1bc364f68b7c120964c2bcbb21b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2732, + "startColumn": 47, + "charOffset": 74225, + "charLength": 2, + "snippet": { + "text": "||" + } + }, + "contextRegion": { + "startLine": 2730, + "startColumn": 47, + "charOffset": 74172, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->magicShieldCapacityFlat || it.abilities->magicShieldCapacityPercent) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f77fc1bd450df528d49c7093fc3c544bae98377c85e6772c564f93375d534c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2732, + "startColumn": 50, + "charOffset": 74228, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2730, + "startColumn": 50, + "charOffset": 74172, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->magicShieldCapacityFlat || it.abilities->magicShieldCapacityPercent) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "737628ebd43bb15929448d0ca88747f9427428ee52de0fcf73f34213b5bf5478" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2743, + "startColumn": 9, + "charOffset": 74555, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2741, + "startColumn": 9, + "charOffset": 74540, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->perfectShotRange) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26d8d6df37c65c1df6d5a1c2403746f18de802f13aee33557b6780b78440c083" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint8_t' (aka 'unsigned char') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2743, + "startColumn": 9, + "charOffset": 74555, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2741, + "startColumn": 9, + "charOffset": 74540, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->perfectShotRange) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b184f21a13e6e76cdc6875435ad91f6f1bf605c72f2009892896b176c8584db1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2751, + "startColumn": 115, + "charOffset": 74798, + "charLength": 8, + "snippet": { + "text": "unsigned" + } + }, + "contextRegion": { + "startLine": 2749, + "startColumn": 115, + "charOffset": 74676, + "charLength": 8, + "snippet": { + "text": "\t\t\t\t\t}\n\n\t\t\t\t\ts << \"perfect shot \" << std::showpos << it.abilities->perfectShotDamage << std::noshowpos << \" at range \" << unsigned(it.abilities->perfectShotRange);\n\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f842af83dc1950012a3a7d76994b741934f5e3f6bb9f06a31e57d081a367620" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2754, + "startColumn": 9, + "charOffset": 74855, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2752, + "startColumn": 9, + "charOffset": 74840, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)]) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60ca81d5df75ec6ffd4506d0a2c1798f3b43cd9db7d13d36080b03db486fe762" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2754, + "startColumn": 9, + "charOffset": 74855, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2752, + "startColumn": 9, + "charOffset": 74840, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)]) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21882738826f25a8034450612d3d577353e5e09133bb468d66a50962e6bf4964" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2754, + "startColumn": 9, + "charOffset": 74855, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2752, + "startColumn": 9, + "charOffset": 74840, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)]) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4cf683f7e5d23a3250d9be1b60134e727b7e1c57f53af2a0fe2bf0654d7f9314" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2762, + "startColumn": 51, + "charOffset": 75071, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2760, + "startColumn": 51, + "charOffset": 75013, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\t}\n\n\t\t\t\t\ts << \"damage reflection \" << std::showpos << it.abilities->reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)] << std::noshowpos;\n\t\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6fa50dd5e5cad00e71d05421f55cd3184acc196e3b24aa83ddbe9b58fefe1b8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2767, + "startColumn": 6, + "charOffset": 75242, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2765, + "startColumn": 6, + "charOffset": 75165, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tint16_t show = it.abilities->absorbPercent[0];\n\t\t\t\tif (show != 0) {\n\t\t\t\t\tfor (size_t i = 1; i < COMBAT_COUNT; ++i) {\n\t\t\t\t\t\tif (it.abilities->absorbPercent[i] != show) {\n\t\t\t\t\t\t\tshow = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3a1fb6a49095f2c91ad7c987852ccb9cf51fb6028204306bba37a2aef1ed49e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2768, + "startColumn": 11, + "charOffset": 75296, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2766, + "startColumn": 11, + "charOffset": 75216, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tif (show != 0) {\n\t\t\t\t\tfor (size_t i = 1; i < COMBAT_COUNT; ++i) {\n\t\t\t\t\t\tif (it.abilities->absorbPercent[i] != show) {\n\t\t\t\t\t\t\tshow = 0;\n\t\t\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90e87097477cb1f393a496f641e091b7cb59b9465502e47cb21ba630f4318c3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2778, + "startColumn": 6, + "charOffset": 75440, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2776, + "startColumn": 6, + "charOffset": 75412, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbool tmp = true;\n\n\t\t\t\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\t\t\tif (it.abilities->absorbPercent[i] == 0) {\n\t\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f37e557623c6d90fe55ae31132823890587930ca98b92227828a7b6f15223a1a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2779, + "startColumn": 11, + "charOffset": 75494, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2777, + "startColumn": 11, + "charOffset": 75434, + "charLength": 2, + "snippet": { + "text": "\n\t\t\t\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\t\t\tif (it.abilities->absorbPercent[i] == 0) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e63aaf2670e55e5dfc6303c1117bf46c22eceed54f76c57865ca7af3f129fb4f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2798, + "startColumn": 73, + "charOffset": 75845, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2796, + "startColumn": 73, + "charOffset": 75764, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts << fmt::format(\"{} {:+}%\", getCombatName(indexToCombatType(i)), it.abilities->absorbPercent[i]);\n\t\t\t\t\t}\n\t\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8475e7c4350055d59c73e353878399fbdcab960b6c1f53129c0eaaee140d6ed6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2813, + "startColumn": 6, + "charOffset": 76127, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2811, + "startColumn": 6, + "charOffset": 76053, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tshow = it.abilities->fieldAbsorbPercent[0];\n\t\t\t\tif (show != 0) {\n\t\t\t\t\tfor (size_t i = 1; i < COMBAT_COUNT; ++i) {\n\t\t\t\t\t\tif (it.abilities->absorbPercent[i] != show) {\n\t\t\t\t\t\t\tshow = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a5a9f6eb4e298f0d30e5845b5dca4bc4507ed428b9ec9ff6a3e86450abefeed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2814, + "startColumn": 11, + "charOffset": 76181, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2812, + "startColumn": 11, + "charOffset": 76101, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tif (show != 0) {\n\t\t\t\t\tfor (size_t i = 1; i < COMBAT_COUNT; ++i) {\n\t\t\t\t\t\tif (it.abilities->absorbPercent[i] != show) {\n\t\t\t\t\t\t\tshow = 0;\n\t\t\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39429df8e1c1e25b36045927f6e5cf07f5866d00c6bc27ca1bff6de5d4cf5ca9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2824, + "startColumn": 6, + "charOffset": 76325, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 2822, + "startColumn": 6, + "charOffset": 76297, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbool tmp = true;\n\n\t\t\t\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\t\t\tif (it.abilities->fieldAbsorbPercent[i] == 0) {\n\t\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2719bf52fb661d26bc905b9606d458fd1133aa5dac49d885840196021d29e1ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2825, + "startColumn": 11, + "charOffset": 76379, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2823, + "startColumn": 11, + "charOffset": 76319, + "charLength": 2, + "snippet": { + "text": "\n\t\t\t\t\tfor (size_t i = 0; i < COMBAT_COUNT; ++i) {\n\t\t\t\t\t\tif (it.abilities->fieldAbsorbPercent[i] == 0) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a89108d2c3d44895e8e162f655c3e4b8e3ee9365bb30d0b68d85f44955359e78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2844, + "startColumn": 79, + "charOffset": 76741, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2842, + "startColumn": 79, + "charOffset": 76654, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts << fmt::format(\"{} field {:+}%\", getCombatName(indexToCombatType(i)), it.abilities->fieldAbsorbPercent[i]);\n\t\t\t\t\t}\n\t\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "167250a887f356c26e22635bd606862117b35440753d802d80eb97e5ea3d7db7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2857, + "startColumn": 9, + "charOffset": 76969, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2855, + "startColumn": 9, + "charOffset": 76954, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->speed) {\n\t\t\t\t\ts << parseShowDurationSpeed(it.abilities->speed, begin);\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d7471d209eac2311bd92af7c31e28b0f5f930745a848b3720d93f879632a796" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2857, + "startColumn": 9, + "charOffset": 76969, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2855, + "startColumn": 9, + "charOffset": 76954, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->speed) {\n\t\t\t\t\ts << parseShowDurationSpeed(it.abilities->speed, begin);\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "206c9da6b4f969e30b4761e5141c5b2033aaeebd5516a6f38016a1ec5fd163b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2861, + "startColumn": 9, + "charOffset": 77069, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2859, + "startColumn": 9, + "charOffset": 77054, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->cleavePercent) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3d4f9e648d65029590858ab1b0822f253337700aba6d97eb8cdf02ce7183699" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2861, + "startColumn": 9, + "charOffset": 77069, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2859, + "startColumn": 9, + "charOffset": 77054, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (it.abilities->cleavePercent) {\n\t\t\t\t\tif (begin) {\n\t\t\t\t\t\tbegin = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94b41fe1b27b2a67bae5b4f8a4e7100dd3b6604f3890eb970e4ecbe4deadffbd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2879, + "startColumn": 7, + "charOffset": 77437, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2877, + "startColumn": 7, + "charOffset": 77342, + "charLength": 1, + "snippet": { + "text": "\t} else if (it.isContainer() || (item && item->getContainer())) {\n\t\tuint32_t volume = 0;\n\t\tif (!item || !item->hasAttribute(ItemAttribute_t::UNIQUEID)) {\n\t\t\tif (it.isContainer()) {\n\t\t\t\tvolume = it.maxItems;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23c4665e89e9829e5565c57db050431e6154786b1d7d569ec40096b91467092c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2887, + "startColumn": 3, + "charOffset": 77620, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2885, + "startColumn": 3, + "charOffset": 77613, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (volume != 0 && !it.isQuiver()) {\n\t\t\ts << \" (Vol:\" << volume << ')';\n\t\t} else if (volume != 0 && it.isQuiver()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "814ac361c520f8a69f5229031b1cf8b4e195d9c990d4d87fc4acbaafc9bc2951" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2895, + "startColumn": 7, + "charOffset": 77807, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2893, + "startColumn": 7, + "charOffset": 77779, + "charLength": 2, + "snippet": { + "text": "\t\tbool found = true;\n\n\t\tif (it.abilities && it.slotPosition & SLOTP_RING) {\n\t\t\tif (it.abilities->speed > 0) {\n\t\t\t\tbool begin = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "466d27b6f487f8582abdfdc98ce0b7127d525d35f5a3e601239459b80aec8182" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2895, + "startColumn": 20, + "charOffset": 77820, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 2893, + "startColumn": 20, + "charOffset": 77779, + "charLength": 2, + "snippet": { + "text": "\t\tbool found = true;\n\n\t\tif (it.abilities && it.slotPosition & SLOTP_RING) {\n\t\t\tif (it.abilities->speed > 0) {\n\t\t\t\tbool begin = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fec6bd7da3a8fe95d466b358be720ba7ac1eb25b2f3f6f674d53671260876d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2895, + "startColumn": 23, + "charOffset": 77823, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 2893, + "startColumn": 23, + "charOffset": 77779, + "charLength": 2, + "snippet": { + "text": "\t\tbool found = true;\n\n\t\tif (it.abilities && it.slotPosition & SLOTP_RING) {\n\t\t\tif (it.abilities->speed > 0) {\n\t\t\t\tbool begin = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4e73d69272acb99bc52bdc8af476fcecb13c3e4bf45fb4e66d4a907da1fbc6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2895, + "startColumn": 39, + "charOffset": 77839, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 2893, + "startColumn": 39, + "charOffset": 77779, + "charLength": 1, + "snippet": { + "text": "\t\tbool found = true;\n\n\t\tif (it.abilities && it.slotPosition & SLOTP_RING) {\n\t\t\tif (it.abilities->speed > 0) {\n\t\t\t\tbool begin = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2bc9c76dba87994bf7718d8cba3f25e928b7949c74e4f50153c7c253763e5189" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2915, + "startColumn": 4, + "charOffset": 78417, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2913, + "startColumn": 4, + "charOffset": 78397, + "charLength": 2, + "snippet": { + "text": "\n\t\tif (!found) {\n\t\t\tif (it.isKey()) {\n\t\t\t\ts << fmt::format(\" (Key:{:04})\", item ? item->getAttribute(ItemAttribute_t::ACTIONID) : 0);\n\t\t\t} else if (it.isFluidContainer()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7a4e3e0cfd6e25b6c8fec67a9b4aa417a8cfe9fbc4570650023cbc64561afea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7369 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2932, + "startColumn": 44, + "charOffset": 78987, + "charLength": 4, + "snippet": { + "text": "7369" + } + }, + "contextRegion": { + "startLine": 2930, + "startColumn": 44, + "charOffset": 78917, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\ts << \"unknown\";\n\t\t\t\t}\n\t\t\t} else if (it.allowDistRead && (it.id < 7369 || it.id > 7371)) {\n\t\t\t\ts << '.' << std::endl;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "115477e1d3e03c401d9d2ce9423f6d7d25e9a95bdbbc3eb9cb398e35bef9f0be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7371 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2932, + "startColumn": 60, + "charOffset": 79003, + "charLength": 4, + "snippet": { + "text": "7371" + } + }, + "contextRegion": { + "startLine": 2930, + "startColumn": 60, + "charOffset": 78917, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\ts << \"unknown\";\n\t\t\t\t}\n\t\t\t} else if (it.allowDistRead && (it.id < 7369 || it.id > 7371)) {\n\t\t\t\ts << '.' << std::endl;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b59e58c680427514fd22aa130571df5f880d44ce381ce91415fe119d5fd62585" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-avoid-endl", + "ruleIndex": 665, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'std::endl' with streams; use '\\n' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2933, + "startColumn": 17, + "charOffset": 79028, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 2931, + "startColumn": 17, + "charOffset": 78938, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t} else if (it.allowDistRead && (it.id < 7369 || it.id > 7371)) {\n\t\t\t\ts << '.' << std::endl;\n\n\t\t\t\tif (lookDistance <= 4) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cdbcb201346a697e0307aae27bc3c2f194ec81ca3cf94fe7853c4712bf8ad3fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7369 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2987, + "startColumn": 37, + "charOffset": 80496, + "charLength": 4, + "snippet": { + "text": "7369" + } + }, + "contextRegion": { + "startLine": 2985, + "startColumn": 37, + "charOffset": 80456, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tif (!it.allowDistRead || (it.id >= 7369 && it.id <= 7371)) {\n\t\ts << '.';\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "822f1a84fee69d42cc3d7fa0608a3d27bfb0fb1d47256c1ddd984ac57192020b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7371 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 2987, + "startColumn": 54, + "charOffset": 80513, + "charLength": 4, + "snippet": { + "text": "7371" + } + }, + "contextRegion": { + "startLine": 2985, + "startColumn": 54, + "charOffset": 80456, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tif (!it.allowDistRead || (it.id >= 7369 && it.id <= 7371)) {\n\t\ts << '.';\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9bfaab55ff7fb578cca069c0b40f94cf63eb4e85bd937f85a9b9acedff561f4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-avoid-endl", + "ruleIndex": 665, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'std::endl' with streams; use '\\n' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3000, + "startColumn": 8, + "charOffset": 80721, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 2998, + "startColumn": 8, + "charOffset": 80687, + "charLength": 3, + "snippet": { + "text": "\n\tif (it.wieldInfo != 0) {\n\t\ts << std::endl\n\t\t << \"It can only be wielded properly by \";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c756844221d55c3754c8d75b8dfb5ac621afd5436451d696046203ed26760dfc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3003, + "startColumn": 7, + "charOffset": 80784, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 3001, + "startColumn": 7, + "charOffset": 80731, + "charLength": 2, + "snippet": { + "text": "\t\t << \"It can only be wielded properly by \";\n\n\t\tif (it.wieldInfo & WIELDINFO_PREMIUM) {\n\t\t\ts << \"premium \";\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "171108ea5a397593526ffff741442663a3ef5aa3bb7d4a138feddab23be5a2db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3003, + "startColumn": 7, + "charOffset": 80784, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 3001, + "startColumn": 7, + "charOffset": 80731, + "charLength": 2, + "snippet": { + "text": "\t\t << \"It can only be wielded properly by \";\n\n\t\tif (it.wieldInfo & WIELDINFO_PREMIUM) {\n\t\t\ts << \"premium \";\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "79720d2238dd35b0d7f148e98a1fb2478f473a1d3d6c689dd2c974ad0d4e2e86" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3003, + "startColumn": 20, + "charOffset": 80797, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3001, + "startColumn": 20, + "charOffset": 80731, + "charLength": 1, + "snippet": { + "text": "\t\t << \"It can only be wielded properly by \";\n\n\t\tif (it.wieldInfo & WIELDINFO_PREMIUM) {\n\t\t\ts << \"premium \";\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22aa08901dd481fe002debc4c94bb42ec40f17a9d991adf444988a15c58df2ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3013, + "startColumn": 7, + "charOffset": 80949, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 3011, + "startColumn": 7, + "charOffset": 80938, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (it.wieldInfo & WIELDINFO_LEVEL) {\n\t\t\ts << \" of level \" << it.minReqLevel << \" or higher\";\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ff37925c3cae657bab80e366d5610d844d343bbd4e2c249bcbee79a22339ff1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3013, + "startColumn": 7, + "charOffset": 80949, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 3011, + "startColumn": 7, + "charOffset": 80938, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (it.wieldInfo & WIELDINFO_LEVEL) {\n\t\t\ts << \" of level \" << it.minReqLevel << \" or higher\";\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ec3fec134ac4555b36f01382b033385025110ff8634599ee9059875d3a685cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3013, + "startColumn": 20, + "charOffset": 80962, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3011, + "startColumn": 20, + "charOffset": 80938, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif (it.wieldInfo & WIELDINFO_LEVEL) {\n\t\t\ts << \" of level \" << it.minReqLevel << \" or higher\";\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be4661990350e3bdde113ac1fe2687f786e0c4e246c6a3ef6eea5f42ac95c60f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3017, + "startColumn": 7, + "charOffset": 81050, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 3015, + "startColumn": 7, + "charOffset": 81039, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (it.wieldInfo & WIELDINFO_MAGLV) {\n\t\t\tif (it.wieldInfo & WIELDINFO_LEVEL) {\n\t\t\t\ts << \" and\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c06010b7432bb0a5893efb0eb349758c8011f2937958bf83c8c6578bf297fada" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3017, + "startColumn": 7, + "charOffset": 81050, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 3015, + "startColumn": 7, + "charOffset": 81039, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (it.wieldInfo & WIELDINFO_MAGLV) {\n\t\t\tif (it.wieldInfo & WIELDINFO_LEVEL) {\n\t\t\t\ts << \" and\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20fca5ab4a12e81e899bfc210e2e153dbddd39dfa929d1906ff0eda084cb8beb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3017, + "startColumn": 20, + "charOffset": 81063, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3015, + "startColumn": 20, + "charOffset": 81039, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif (it.wieldInfo & WIELDINFO_MAGLV) {\n\t\t\tif (it.wieldInfo & WIELDINFO_LEVEL) {\n\t\t\t\ts << \" and\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2796144bb04da389c9237ad2bd391d678b3d8887022c04321214659204fdcc43" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3018, + "startColumn": 8, + "charOffset": 81091, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 3016, + "startColumn": 8, + "charOffset": 81043, + "charLength": 2, + "snippet": { + "text": "\n\t\tif (it.wieldInfo & WIELDINFO_MAGLV) {\n\t\t\tif (it.wieldInfo & WIELDINFO_LEVEL) {\n\t\t\t\ts << \" and\";\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9663db4abdc6f0b8509a43ff56fac3c5922fa90e006cd59d42fc539373ea1ad9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3018, + "startColumn": 8, + "charOffset": 81091, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 3016, + "startColumn": 8, + "charOffset": 81043, + "charLength": 2, + "snippet": { + "text": "\n\t\tif (it.wieldInfo & WIELDINFO_MAGLV) {\n\t\t\tif (it.wieldInfo & WIELDINFO_LEVEL) {\n\t\t\t\ts << \" and\";\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25fccd7cca46bc3c15f3bffd831cc67573a2779e39c4645071f6653ec265c5c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3018, + "startColumn": 21, + "charOffset": 81104, + "charLength": 1, + "snippet": { + "text": "&" + } + }, + "contextRegion": { + "startLine": 3016, + "startColumn": 21, + "charOffset": 81043, + "charLength": 1, + "snippet": { + "text": "\n\t\tif (it.wieldInfo & WIELDINFO_MAGLV) {\n\t\t\tif (it.wieldInfo & WIELDINFO_LEVEL) {\n\t\t\t\ts << \" and\";\n\t\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c9a0689b1236b491645ef3a36a9f8b0856cac77ac00b7d5ce2c6e42337d1a55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3037, + "startColumn": 3, + "charOffset": 81412, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 3035, + "startColumn": 3, + "charOffset": 81383, + "charLength": 2, + "snippet": { + "text": "\n\tif (lookDistance <= 1) {\n\t\tif (item) {\n\t\t\tconst uint32_t weight = item->getWeight();\n\t\t\tif (weight != 0 && it.pickupable) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fbfb64e4760f087ad08544d972a48412a308e7ea43bc2d3123b9bd4d1696dc30" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-avoid-endl", + "ruleIndex": 665, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'std::endl' with streams; use '\\n' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3040, + "startColumn": 10, + "charOffset": 81518, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 3038, + "startColumn": 10, + "charOffset": 81424, + "charLength": 3, + "snippet": { + "text": "\t\t\tconst uint32_t weight = item->getWeight();\n\t\t\tif (weight != 0 && it.pickupable) {\n\t\t\t\ts << std::endl\n\t\t\t\t << getWeightDescription(it, weight, item->getItemCount());\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c884b0be76f02d103662d9629cd305e97c252a5dd69c0af3db8ba611ab60f22" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-avoid-endl", + "ruleIndex": 665, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'std::endl' with streams; use '\\n' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3044, + "startColumn": 9, + "charOffset": 81654, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 3042, + "startColumn": 9, + "charOffset": 81593, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\t\t} else if (it.weight != 0 && it.pickupable) {\n\t\t\ts << std::endl\n\t\t\t << getWeightDescription(it, it.weight);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc518a2a9d4d908bdf07bc859c0ddbb3d33994e592cbc63628f5bfcc81d04fbc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3049, + "startColumn": 2, + "charOffset": 81718, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 3047, + "startColumn": 2, + "charOffset": 81713, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (item) {\n\t\tconst std::string &specialDescription = item->getAttribute(ItemAttribute_t::DESCRIPTION);\n\t\tif (!specialDescription.empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e623227084a3443f53ed98a9a3e118ea420d0187a3cf8807d557b54416499d8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3051, + "startColumn": 3, + "charOffset": 81837, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 3049, + "startColumn": 3, + "charOffset": 81717, + "charLength": 2, + "snippet": { + "text": "\tif (item) {\n\t\tconst std::string &specialDescription = item->getAttribute(ItemAttribute_t::DESCRIPTION);\n\t\tif (!specialDescription.empty()) {\n\t\t\ts << std::endl\n\t\t\t << specialDescription;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc3f8a3d7603e9550b06e17f688b38cb4ecbd4a7c64c9345b78fb281e06ee83f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-avoid-endl", + "ruleIndex": 665, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'std::endl' with streams; use '\\n' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3052, + "startColumn": 9, + "charOffset": 81880, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 3050, + "startColumn": 9, + "charOffset": 81730, + "charLength": 3, + "snippet": { + "text": "\t\tconst std::string &specialDescription = item->getAttribute(ItemAttribute_t::DESCRIPTION);\n\t\tif (!specialDescription.empty()) {\n\t\t\ts << std::endl\n\t\t\t << specialDescription;\n\t\t} else if (lookDistance <= 1 && !it.description.empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6491ac214f5eb141646daae5ab77f5b46e9b7b71eeff70ee8e92050aacaef5d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-avoid-endl", + "ruleIndex": 665, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'std::endl' with streams; use '\\n' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3055, + "startColumn": 9, + "charOffset": 81987, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 3053, + "startColumn": 9, + "charOffset": 81890, + "charLength": 3, + "snippet": { + "text": "\t\t\t << specialDescription;\n\t\t} else if (lookDistance <= 1 && !it.description.empty()) {\n\t\t\ts << std::endl\n\t\t\t << it.description;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a804f7ab2c23b630d2baf82dc069a1f0445845acef9b079be04cc9b126e03a93" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-avoid-endl", + "ruleIndex": 665, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'std::endl' with streams; use '\\n' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3059, + "startColumn": 8, + "charOffset": 82092, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 3057, + "startColumn": 8, + "charOffset": 82021, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t} else if (lookDistance <= 1 && !it.description.empty()) {\n\t\ts << std::endl\n\t\t << it.description;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1eee32010445c9e809cfbc652dc020a4e23445160ac67ce289c1e31a19b6e52a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7369 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3063, + "startColumn": 35, + "charOffset": 82163, + "charLength": 4, + "snippet": { + "text": "7369" + } + }, + "contextRegion": { + "startLine": 3061, + "startColumn": 35, + "charOffset": 82125, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tif (it.allowDistRead && it.id >= 7369 && it.id <= 7371) {\n\t\tif (text.empty() && item) {\n\t\t\ttext = item->getAttribute(ItemAttribute_t::TEXT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d46e676ddab55b5f9198c57e14388c2a554483a7d05d143452994efd9a98e6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7371 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3063, + "startColumn": 52, + "charOffset": 82180, + "charLength": 4, + "snippet": { + "text": "7371" + } + }, + "contextRegion": { + "startLine": 3061, + "startColumn": 52, + "charOffset": 82125, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tif (it.allowDistRead && it.id >= 7369 && it.id <= 7371) {\n\t\tif (text.empty() && item) {\n\t\t\ttext = item->getAttribute(ItemAttribute_t::TEXT);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b363de550934560273111db472b66c4c65a850a9384ef7ae279a09535b63e66" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-avoid-endl", + "ruleIndex": 665, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'std::endl' with streams; use '\\n' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3069, + "startColumn": 9, + "charOffset": 82320, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 3067, + "startColumn": 9, + "charOffset": 82288, + "charLength": 3, + "snippet": { + "text": "\n\t\tif (!text.empty()) {\n\t\t\ts << std::endl\n\t\t\t << text;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28435e51f46bf5dd857f6164c914d3c6a524f8b413c0e09436ab3e8009cea28f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3081, + "startColumn": 80, + "charOffset": 82596, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 3079, + "startColumn": 80, + "charOffset": 82514, + "charLength": 4, + "snippet": { + "text": "}\n\nstd::string Item::getNameDescription(const ItemType &it, std::shared_ptr item /*= nullptr*/, int32_t subType /*= -1*/, bool addArticle /*= true*/) {\n\tif (item) {\n\t\tsubType = item->getSubType();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3713fe2dd29d588614d72cd4d9abd73b557cc8ab7c94016fd027f05f4b6d759" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'getWeightDescription' of similar type ('uint32_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3117, + "startColumn": 60, + "charOffset": 83421, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 3115, + "startColumn": 60, + "charOffset": 83359, + "charLength": 8, + "snippet": { + "text": "}\n\nstd::string Item::getWeightDescription(const ItemType &it, uint32_t weight, uint32_t count /*= 1*/) {\n\tstd::ostringstream ss;\n\tif (it.stackable && count > 1 && it.showCount != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8055a9deac8c98da818877e79667eb2444abec50593862ff1fb3a0300fd83ced" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3119, + "startColumn": 35, + "charOffset": 83522, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 3117, + "startColumn": 35, + "charOffset": 83362, + "charLength": 2, + "snippet": { + "text": "std::string Item::getWeightDescription(const ItemType &it, uint32_t weight, uint32_t count /*= 1*/) {\n\tstd::ostringstream ss;\n\tif (it.stackable && count > 1 && it.showCount != 0) {\n\t\tss << \"They weigh \";\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22c3459826c69b57b9494f608c5334ce5a661ec934a9a53a5f4dd2789349f929" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3125, + "startColumn": 15, + "charOffset": 83616, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 3123, + "startColumn": 15, + "charOffset": 83598, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (weight < 10) {\n\t\tss << \"0.0\" << weight;\n\t} else if (weight < 100) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6846f4408ceac20eefe1bbd5b2e966f0d3702bf0d3248aabe9af6b228048ee1e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3127, + "startColumn": 22, + "charOffset": 83668, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 3125, + "startColumn": 22, + "charOffset": 83602, + "charLength": 3, + "snippet": { + "text": "\tif (weight < 10) {\n\t\tss << \"0.0\" << weight;\n\t} else if (weight < 100) {\n\t\tss << \"0.\" << weight;\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad3908c9cb629f22c8611712d94af0a567c83cc7ebfb0c72101d064027a3280f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3131, + "startColumn": 16, + "charOffset": 83777, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 3129, + "startColumn": 16, + "charOffset": 83699, + "charLength": 6, + "snippet": { + "text": "\t} else {\n\t\tstd::string weightString = std::to_string(weight);\n\t\tweightString.insert(weightString.end() - 2, '.');\n\t\tss << weightString;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd63086e847eb8ba13b1cacdcdbece1446cd5ddc762e95d9b745191d6886c6ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-return-braced-init-list", + "ruleIndex": 630, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3147, + "startColumn": 10, + "charOffset": 84150, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 3145, + "startColumn": 10, + "charOffset": 84089, + "charLength": 3, + "snippet": { + "text": "\tuint32_t weight = getWeight();\n\tif (weight == 0) {\n\t\treturn std::string();\n\t}\n\treturn getWeightDescription(weight);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "320a5babb7ebb0c6f40064c4735245a1e38dfaf2b1a2f83777329520f8dc0169" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3181, + "startColumn": 3, + "charOffset": 84765, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 3179, + "startColumn": 3, + "charOffset": 84714, + "charLength": 4, + "snippet": { + "text": "uint32_t Item::getWorth() const {\n\tswitch (id) {\n\t\tcase ITEM_GOLD_COIN:\n\t\t\treturn count;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96c3d6dd0f51bcf01af30776a67ec90502ed0e04478511c92085e1bf101d51e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3184, + "startColumn": 3, + "charOffset": 84806, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 3182, + "startColumn": 3, + "charOffset": 84786, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn count;\n\n\t\tcase ITEM_PLATINUM_COIN:\n\t\t\treturn count * 100;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7958907de2553580234ce6f1850041e5ca6727f807a4383814f5f6694a12bab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3185, + "startColumn": 19, + "charOffset": 84849, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 3183, + "startColumn": 19, + "charOffset": 84803, + "charLength": 3, + "snippet": { + "text": "\n\t\tcase ITEM_PLATINUM_COIN:\n\t\t\treturn count * 100;\n\n\t\tcase ITEM_CRYSTAL_COIN:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fcb6c56eab75b5a8c584795c41eefdb7f2873f69477eb2b31ddde8b25aa6cc60" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3187, + "startColumn": 3, + "charOffset": 84857, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 3185, + "startColumn": 3, + "charOffset": 84831, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn count * 100;\n\n\t\tcase ITEM_CRYSTAL_COIN:\n\t\t\treturn count * 10000;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "266bbc6db7fbc3f7c4581233675cab715a4bd2f4fa601c833d2b21c615370759" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3188, + "startColumn": 19, + "charOffset": 84899, + "charLength": 5, + "snippet": { + "text": "10000" + } + }, + "contextRegion": { + "startLine": 3186, + "startColumn": 19, + "charOffset": 84854, + "charLength": 5, + "snippet": { + "text": "\n\t\tcase ITEM_CRYSTAL_COIN:\n\t\t\treturn count * 10000;\n\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ad4c781be1a1d73542fd3a68cbf8789a01495443e61663a3e008504be2c5f51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3190, + "startColumn": 3, + "charOffset": 84909, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 3188, + "startColumn": 3, + "charOffset": 84881, + "charLength": 7, + "snippet": { + "text": "\t\t\treturn count * 10000;\n\n\t\tdefault:\n\t\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b028fc39b640bd9eb171025330239de02a0b4ea351f7bcf5ded9cc1f45047c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3198, + "startColumn": 4, + "charOffset": 85043, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 3196, + "startColumn": 4, + "charOffset": 84978, + "charLength": 4, + "snippet": { + "text": "\tif (getID() == ITEM_FORGE_SLIVER) {\n\t\treturn getItemCount();\n\t} else {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "474f4caf5d9dbd89279a9f9c38ccf96ea6b44001a47d3e84421ad1a8317c6be7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3206, + "startColumn": 4, + "charOffset": 85170, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 3204, + "startColumn": 4, + "charOffset": 85107, + "charLength": 4, + "snippet": { + "text": "\tif (getID() == ITEM_FORGE_CORE) {\n\t\treturn getItemCount();\n\t} else {\n\t\treturn 0;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "731bc23f28985d98442b50c3870238e1cdf36458fdc7c6e176a9dca97a10a7bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3267, + "startColumn": 2, + "charOffset": 86678, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 3265, + "startColumn": 2, + "charOffset": 86673, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &attribute : getAttributeVector()) {\n\t\tif (attribute.getAttributeType() == ItemAttribute_t::CHARGES && static_cast(attribute.getInteger()) != items[id].charges) {\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70ddd92879f9c075d2b2d4a36724022254aecdca9ace758207949479b20aa495" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3290, + "startColumn": 6, + "charOffset": 87593, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3288, + "startColumn": 6, + "charOffset": 87536, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr cylinder = getParent();\n\tif (!cylinder) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f0142afe7aa1c9461182fbc564ab25411fdced11ec0ca2f2dd61e714161369e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3295, + "startColumn": 6, + "charOffset": 87697, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 3293, + "startColumn": 6, + "charOffset": 87625, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr container = cylinder->getContainer();\n\tif (!container) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8beba64e4f585ee7b541a26b851563e0f5dad79c5de9d74b688161de2a1462e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3299, + "startColumn": 2, + "charOffset": 87732, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 3297, + "startColumn": 2, + "charOffset": 87727, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\twhile (container) {\n\t\tif (container->getDepotLocker() || container->isDepotChest() || (includeInbox && container->isInbox())) {\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1abc9ebfddfda033c63fe5007c044662da80d48c5f58e537bf40c67ef07c18de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'container' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.cpp" + }, + "region": { + "startLine": 3299, + "startColumn": 9, + "charOffset": 87739, + "charLength": 9, + "snippet": { + "text": "container" + } + }, + "contextRegion": { + "startLine": 3297, + "startColumn": 9, + "charOffset": 87727, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\twhile (container) {\n\t\tif (container->getDepotLocker() || container->isDepotChest() || (includeInbox && container->isInbox())) {\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58b3df274678da387ba226826c55b25297f991d19eb9138789f4612cfb89b7cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'Item::Item' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/item.hpp", + "index": 1 + }, + "region": { + "startLine": 224, + "startColumn": 2, + "charOffset": 6672, + "charLength": 4, + "snippet": { + "text": "Item" + } + }, + "contextRegion": { + "startLine": 222, + "startColumn": 2, + "charOffset": 6644, + "charLength": 4, + "snippet": { + "text": "\n\t// Constructor for items\n\tItem(const uint16_t type, uint16_t count = 0);\n\tItem(const std::shared_ptr &i);\n\tvirtual std::shared_ptr clone() const;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7aeefc1682e6c0f7b8dfaea1df99d14351b2e9d946bd6fb1bc4f5201c9994be6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-non-const-global-variables", + "ruleIndex": 486, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'lootTypeNames' is non-const and globally accessible, consider making it const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 15, + "charOffset": 889, + "charLength": 13, + "snippet": { + "text": "lootTypeNames" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 15, + "charOffset": 804, + "charLength": 13, + "snippet": { + "text": "using LootTypeNames = phmap::flat_hash_map;\n\nLootTypeNames lootTypeNames = {\n\t{ \"armor\", ITEM_TYPE_ARMOR },\n\t{ \"amulet\", ITEM_TYPE_AMULET }," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "684c43d13b243ea300b8d51c02d158b44cbda84d53b30d7d8074af371e0a9781" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getLootType' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 62, + "startColumn": 20, + "charOffset": 1759, + "charLength": 11, + "snippet": { + "text": "getLootType" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 20, + "charOffset": 1736, + "charLength": 11, + "snippet": { + "text": "};\n\nItemTypes_t Items::getLootType(const std::string &strValue) {\n\tauto lootType = lootTypeNames.find(strValue);\n\tif (lootType != lootTypeNames.end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "177e827cdd3c5cc4f410dd7cc59dca4c58c04470bab38f85a3ab2e518da23c6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-const-return-type", + "ruleIndex": 692, + "kind": "fail", + "level": "warning", + "message": { + "text": "return type 'const std::string' (aka 'const basic_string') is 'const'-qualified at the top level, which may reduce code readability without improving const correctness" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 1, + "charOffset": 1946, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 1, + "charOffset": 1943, + "charLength": 5, + "snippet": { + "text": "}\n\nconst std::string Items::getAugmentNameByType(Augment_t augmentType) {\n\tstd::string augmentTypeName = magic_enum::enum_name(augmentType).data();\n\taugmentTypeName = toStartCaseWithSpace(augmentTypeName);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f78c80039159015f3f052549a5d8c1b8728cab0e1e4961df48db394682d59bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 4, + "charOffset": 2653, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 4, + "charOffset": 2546, + "charLength": 4, + "snippet": { + "text": "\tif (inspect) {\n\t\treturn fmt::format(\"{}.\", fmt::join(descriptions.begin(), descriptions.end(), \", \"));\n\t} else {\n\t\treturn fmt::format(\"\\nAugments: ({}).\", fmt::join(descriptions.begin(), descriptions.end(), \", \"));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3daaad7a2ec71fb0f6c7384ae629858c438e6c716581651a43d661aa91e945ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getFormattedAugmentDescription' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 96, + "startColumn": 23, + "charOffset": 2790, + "charLength": 30, + "snippet": { + "text": "getFormattedAugmentDescription" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 23, + "charOffset": 2765, + "charLength": 30, + "snippet": { + "text": "}\n\nstd::string ItemType::getFormattedAugmentDescription(const std::shared_ptr &augmentInfo) const {\n\tconst std::string augmentName = Items::getAugmentNameByType(augmentInfo->type);\n\tstd::string augmentSpellNameCapitalized = augmentInfo->spellName;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c4f46f234da811c0d51df523a526e3e3ae2814566b7db2c03aaf828a15d41e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 103, + "startColumn": 2, + "charOffset": 3149, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 101, + "startColumn": 2, + "charOffset": 3096, + "charLength": 2, + "snippet": { + "text": "\tchar signal = augmentInfo->value > 0 ? '-' : '+';\n\n\tif (Items::isAugmentWithoutValueDescription(augmentInfo->type)) {\n\t\treturn fmt::format(\"{} -> {}\", augmentSpellNameCapitalized, augmentName);\n\t} else if (augmentInfo->type == Augment_t::Cooldown) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "069ba889ec495856ed244405f38aa22d36259bee6838e10e38fe866a069e5e6e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 105, + "startColumn": 4, + "charOffset": 3294, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 103, + "startColumn": 4, + "charOffset": 3148, + "charLength": 4, + "snippet": { + "text": "\tif (Items::isAugmentWithoutValueDescription(augmentInfo->type)) {\n\t\treturn fmt::format(\"{} -> {}\", augmentSpellNameCapitalized, augmentName);\n\t} else if (augmentInfo->type == Augment_t::Cooldown) {\n\t\treturn fmt::format(\"{} -> {}{}s {}\", augmentSpellNameCapitalized, signal, augmentInfo->value / 1000, augmentName);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cdd02fd045ae437d37d6516d21e36eca346a01392feac1b173e3024e98a44d96" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 106, + "startColumn": 98, + "charOffset": 3444, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 104, + "startColumn": 98, + "charOffset": 3215, + "charLength": 4, + "snippet": { + "text": "\t\treturn fmt::format(\"{} -> {}\", augmentSpellNameCapitalized, augmentName);\n\t} else if (augmentInfo->type == Augment_t::Cooldown) {\n\t\treturn fmt::format(\"{} -> {}{}s {}\", augmentSpellNameCapitalized, signal, augmentInfo->value / 1000, augmentName);\n\t}\n\treturn fmt::format(\"{} -> {:+}% {}\", augmentSpellNameCapitalized, augmentInfo->value, augmentName);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "797ce663aafda70fee849c174ea363b1b558d2f81dc0196a6f0ebabd05a5500d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in conditional return statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 116, + "startColumn": 10, + "charOffset": 3658, + "charLength": 5, + "snippet": { + "text": "false" + } + }, + "contextRegion": { + "startLine": 114, + "startColumn": 10, + "charOffset": 3625, + "charLength": 5, + "snippet": { + "text": "\n\tif (!loadFromXml()) {\n\t\treturn false;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "577633f375f4e32405c48f016ab09a06d9fe62d388ec4339d8326ab550b93f58" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'loadFromProtobuf' has cognitive complexity of 59 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 122, + "startColumn": 13, + "charOffset": 3698, + "charLength": 16, + "snippet": { + "text": "loadFromProtobuf" + } + }, + "contextRegion": { + "startLine": 120, + "startColumn": 13, + "charOffset": 3683, + "charLength": 16, + "snippet": { + "text": "}\n\nvoid Items::loadFromProtobuf() {\n\tusing namespace Canary::protobuf::appearances;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c78c5e087ba5e8761d8399b16a29b8c324680af8ca5178a094140c8dbc392b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-7-3-4", + "ruleIndex": 464, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 7-3-4: using-directives shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 123, + "startColumn": 2, + "charOffset": 3720, + "charLength": 5, + "snippet": { + "text": "using" + } + }, + "contextRegion": { + "startLine": 121, + "startColumn": 2, + "charOffset": 3685, + "charLength": 5, + "snippet": { + "text": "\nvoid Items::loadFromProtobuf() {\n\tusing namespace Canary::protobuf::appearances;\n\n\tbool supportAnimation = g_configManager().getBoolean(OLD_PROTOCOL, __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bbbb4d7acc4ecaa23b4fd5d411ccfc20e7da43efa14f4e527e62b8dc47af9cd1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-build-using-namespace", + "ruleIndex": 532, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use namespace using-directives; use using-declarations instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 123, + "startColumn": 2, + "charOffset": 3720, + "charLength": 5, + "snippet": { + "text": "using" + } + }, + "contextRegion": { + "startLine": 121, + "startColumn": 2, + "charOffset": 3685, + "charLength": 5, + "snippet": { + "text": "\nvoid Items::loadFromProtobuf() {\n\tusing namespace Canary::protobuf::appearances;\n\n\tbool supportAnimation = g_configManager().getBoolean(OLD_PROTOCOL, __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83405fc16edf4e8e3687a69c284ab7a226860df18ff455fcfc3b401eee66a503" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 130, + "startColumn": 7, + "charOffset": 4084, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 128, + "startColumn": 7, + "charOffset": 3990, + "charLength": 1, + "snippet": { + "text": "\n\t\t// This scenario should never happen but on custom assets this can break the loader.\n\t\tif (!object.has_flags()) {\n\t\t\tg_logger().warn(\"[Items::loadFromProtobuf] - Item with id '{}' is invalid and was ignored.\", object.id());\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "591f8fda314f480f6425527745c8bc1e8cb27c7ede21b1a7df068980a64c80d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 139, + "startColumn": 7, + "charOffset": 4317, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 137, + "startColumn": 7, + "charOffset": 4306, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif (!object.has_id()) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d0feb8381462cac551848d06caf2107e72c4021a52c2498bc9360bf1be348fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 144, + "startColumn": 3, + "charOffset": 4397, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 142, + "startColumn": 3, + "charOffset": 4354, + "charLength": 2, + "snippet": { + "text": "\n\t\tItemType &iType = items[object.id()];\n\t\tif (object.flags().container()) {\n\t\t\tiType.type = ITEM_TYPE_CONTAINER;\n\t\t\tiType.group = ITEM_GROUP_CONTAINER;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f43dd503632bb2aa5307ff1d160bf8aa57650680d7c053cb13ec9b44b376ebcf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 4, + "charOffset": 4898, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 4, + "charOffset": 4754, + "charLength": 3, + "snippet": { + "text": "\t\t// This attribute is only used on 10x protocol, so we should not waste our time iterating it when it's disabled.\n\t\tif (supportAnimation) {\n\t\t\tfor (uint32_t frame_it = 0; frame_it < object.frame_group_size(); ++frame_it) {\n\t\t\t\tFrameGroup objectFrame = object.frame_group(frame_it);\n\t\t\t\tif (!objectFrame.has_sprite_info()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "747b341dcdff212a3bd345547dc754ca9296d80d779bd2e5ae3622d3de39eeda" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 159, + "startColumn": 9, + "charOffset": 5045, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 157, + "startColumn": 9, + "charOffset": 4895, + "charLength": 1, + "snippet": { + "text": "\t\t\tfor (uint32_t frame_it = 0; frame_it < object.frame_group_size(); ++frame_it) {\n\t\t\t\tFrameGroup objectFrame = object.frame_group(frame_it);\n\t\t\t\tif (!objectFrame.has_sprite_info()) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "487092e13426b40f48ba05deb570e571dd3a3b3890ae050a29891ac9a96147d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 163, + "startColumn": 9, + "charOffset": 5109, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 161, + "startColumn": 9, + "charOffset": 5094, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t}\n\n\t\t\t\tif (!objectFrame.sprite_info().has_animation()) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f056121d6b07c94e886816182af79a78993393b47bd9229e0fa85f7e29223945" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 175, + "startColumn": 3, + "charOffset": 5368, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 173, + "startColumn": 3, + "charOffset": 5361, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (object.flags().clip()) {\n\t\t\tiType.alwaysOnTopOrder = 1;\n\t\t} else if (object.flags().top()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e71d7e9939acb1c7a388674ad076a0acc102e5768aba1afdf5f1b9d64f87189a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 184, + "startColumn": 23, + "charOffset": 5632, + "charLength": 2, + "snippet": { + "text": "|=" + } + }, + "contextRegion": { + "startLine": 182, + "startColumn": 23, + "charOffset": 5571, + "charLength": 2, + "snippet": { + "text": "\n\t\tif (object.flags().has_clothes()) {\n\t\t\tiType.slotPosition |= static_cast(1 << (object.flags().clothes().slot() - 1));\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4094f7bc0c02f8b36fb7fe96e122d35a9d0f9c7f9adec38b5509f7bdce8d4ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-12", + "ruleIndex": 424, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-12: signed char and unsigned char type shall only be used for the storage and use of numeric values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 194, + "startColumn": 9, + "charOffset": 5918, + "charLength": 21, + "snippet": { + "text": "upgradeClassification" + } + }, + "contextRegion": { + "startLine": 192, + "startColumn": 9, + "charOffset": 5865, + "charLength": 21, + "snippet": { + "text": "\t\tiType.description = object.description();\n\n\t\tiType.upgradeClassification = object.flags().has_upgradeclassification() ? static_cast(object.flags().upgradeclassification().upgrade_classification()) : 0;\n\t\tiType.lightLevel = object.flags().has_light() ? static_cast(object.flags().light().brightness()) : 0;\n\t\tiType.lightColor = object.flags().has_light() ? static_cast(object.flags().light().color()) : 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9bee39a00d5e4b8d4cab9e8e7b9b6ea3707f2ca4f0a4c427bc71537deb352e72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-12", + "ruleIndex": 424, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-12: signed char and unsigned char type shall only be used for the storage and use of numeric values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 195, + "startColumn": 9, + "charOffset": 6086, + "charLength": 10, + "snippet": { + "text": "lightLevel" + } + }, + "contextRegion": { + "startLine": 193, + "startColumn": 9, + "charOffset": 5909, + "charLength": 10, + "snippet": { + "text": "\n\t\tiType.upgradeClassification = object.flags().has_upgradeclassification() ? static_cast(object.flags().upgradeclassification().upgrade_classification()) : 0;\n\t\tiType.lightLevel = object.flags().has_light() ? static_cast(object.flags().light().brightness()) : 0;\n\t\tiType.lightColor = object.flags().has_light() ? static_cast(object.flags().light().color()) : 0;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e14e56121f7a245384a33f1f0cc1127efc806f2704d01eb8ac3318b5be9e758" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-12", + "ruleIndex": 424, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-12: signed char and unsigned char type shall only be used for the storage and use of numeric values" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 196, + "startColumn": 9, + "charOffset": 6199, + "charLength": 10, + "snippet": { + "text": "lightColor" + } + }, + "contextRegion": { + "startLine": 194, + "startColumn": 9, + "charOffset": 5910, + "charLength": 10, + "snippet": { + "text": "\t\tiType.upgradeClassification = object.flags().has_upgradeclassification() ? static_cast(object.flags().upgradeclassification().upgrade_classification()) : 0;\n\t\tiType.lightLevel = object.flags().has_light() ? static_cast(object.flags().light().brightness()) : 0;\n\t\tiType.lightColor = object.flags().has_light() ? static_cast(object.flags().light().color()) : 0;\n\n\t\tiType.id = static_cast(object.id());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d29d14c4aff52ca940dc57ad2ac1f20e8be828c4d1c5d6647d3147283aed30a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1112 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 217, + "startColumn": 91, + "charOffset": 7348, + "charLength": 4, + "snippet": { + "text": "1112" + } + }, + "contextRegion": { + "startLine": 215, + "startColumn": 91, + "charOffset": 7160, + "charLength": 4, + "snippet": { + "text": "\t\tiType.multiUse = object.flags().multiuse();\n\t\tiType.movable = object.flags().unmove() == false;\n\t\tiType.canReadText = (object.flags().has_lenshelp() && object.flags().lenshelp().id() == 1112) || (object.flags().has_write() && object.flags().write().max_text_length() != 0) || (object.flags().has_write_once() && object.flags().write_once().max_text_length_once() != 0);\n\t\tiType.canReadText = object.flags().has_write() || object.flags().has_write_once();\n\t\tiType.isVertical = object.flags().has_hook() && object.flags().hook().direction() == HOOK_TYPE_SOUTH;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1869227ac8f665ccf236f5130a68c83add2a611389cbe0586958d3679a01ee99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 232, + "startColumn": 25, + "charOffset": 8312, + "charLength": 17, + "snippet": { + "text": "asLowerCaseString" + } + }, + "contextRegion": { + "startLine": 230, + "startColumn": 25, + "charOffset": 8258, + "charLength": 17, + "snippet": { + "text": "\n\t\tif (!iType.name.empty()) {\n\t\t\tnameToItems.insert({ asLowerCaseString(iType.name), iType.id });\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90a8dae0656be83e958c8f57985d21778665df49bdb4e4013868f51504f732a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'loadFromXml' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 239, + "startColumn": 13, + "charOffset": 8403, + "charLength": 11, + "snippet": { + "text": "loadFromXml" + } + }, + "contextRegion": { + "startLine": 237, + "startColumn": 13, + "charOffset": 8388, + "charLength": 11, + "snippet": { + "text": "}\n\nbool Items::loadFromXml() {\n\tpugi::xml_document doc;\n\tauto folder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + \"/items/items.xml\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e66f87fbd6cb6171ca53ad8d98560d3f6e352ec4dd0d3364c30c5f82e0a83e77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 243, + "startColumn": 6, + "charOffset": 8608, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 6, + "charOffset": 8444, + "charLength": 1, + "snippet": { + "text": "\tauto folder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + \"/items/items.xml\";\n\tpugi::xml_parse_result result = doc.load_file(folder.c_str());\n\tif (!result) {\n\t\tprintXMLError(__FUNCTION__, folder, result);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a6cef2e6f2605bd8cad423172964867c748d4c8ca84bfc997b02218fe2849f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 285, + "startColumn": 22, + "charOffset": 10094, + "charLength": 5, + "snippet": { + "text": "begin" + } + }, + "contextRegion": { + "startLine": 283, + "startColumn": 22, + "charOffset": 10042, + "charLength": 5, + "snippet": { + "text": "\t}\n\tinventory.shrink_to_fit();\n\tstd::sort(inventory.begin(), inventory.end());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f71f953c76ca287e0e7a3697dcaf42eeaabdb8fcf3b99cb4e3b6212904c4697" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 285, + "startColumn": 41, + "charOffset": 10113, + "charLength": 3, + "snippet": { + "text": "end" + } + }, + "contextRegion": { + "startLine": 283, + "startColumn": 41, + "charOffset": 10042, + "charLength": 3, + "snippet": { + "text": "\t}\n\tinventory.shrink_to_fit();\n\tstd::sort(inventory.begin(), inventory.end());\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ffedcb136f1a6c646dce5ab1f919e232fcf2988b99783a67c13ed65bb56cd06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 294, + "startColumn": 12, + "charOffset": 10346, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 292, + "startColumn": 12, + "charOffset": 10251, + "charLength": 3, + "snippet": { + "text": "\tItemType &itemType = getItemType(id);\n\t// Ids 0-100 are used for fluids in the XML\n\tif (id >= 100 && (itemType.id == 0 && (itemType.name.empty() || itemType.name == asLowerCaseString(\"reserved sprite\")))) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1257e6aec8ab51195deab7c5c0a918a638a6000cfd39e9692e8bfc944078c001" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 316, + "startColumn": 24, + "charOffset": 11024, + "charLength": 17, + "snippet": { + "text": "asLowerCaseString" + } + }, + "contextRegion": { + "startLine": 314, + "startColumn": 24, + "charOffset": 10973, + "charLength": 17, + "snippet": { + "text": "\n\t\titemType.name = xmlName;\n\t\tnameToItems.insert({ asLowerCaseString(itemType.name), id });\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "193183204d7d1eec2fdde0136f8ec2ff6798a64e8491c751f3b6f00f43851a25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 321, + "startColumn": 6, + "charOffset": 11170, + "charLength": 16, + "snippet": { + "text": "articleAttribute" + } + }, + "contextRegion": { + "startLine": 319, + "startColumn": 6, + "charOffset": 11069, + "charLength": 16, + "snippet": { + "text": "\titemType.loaded = true;\n\tpugi::xml_attribute articleAttribute = itemNode.attribute(\"article\");\n\tif (articleAttribute) {\n\t\titemType.article = articleAttribute.as_string();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98459218bdf940b706b6d246edc877aed986b81ff9240ba502620ed29a17466d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 321, + "startColumn": 6, + "charOffset": 11170, + "charLength": 16, + "snippet": { + "text": "articleAttribute" + } + }, + "contextRegion": { + "startLine": 319, + "startColumn": 6, + "charOffset": 11069, + "charLength": 16, + "snippet": { + "text": "\titemType.loaded = true;\n\tpugi::xml_attribute articleAttribute = itemNode.attribute(\"article\");\n\tif (articleAttribute) {\n\t\titemType.article = articleAttribute.as_string();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "610dd4b019c074006cb82137634a45a565dfb3432149aad906b4241e3a682587" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 326, + "startColumn": 6, + "charOffset": 11319, + "charLength": 15, + "snippet": { + "text": "pluralAttribute" + } + }, + "contextRegion": { + "startLine": 324, + "startColumn": 6, + "charOffset": 11244, + "charLength": 15, + "snippet": { + "text": "\n\tpugi::xml_attribute pluralAttribute = itemNode.attribute(\"plural\");\n\tif (pluralAttribute) {\n\t\titemType.pluralName = pluralAttribute.as_string();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70c76594b06938fa96f1c20423abe32aca45772bad2ddd7a86b1a8df90d47fc0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 326, + "startColumn": 6, + "charOffset": 11319, + "charLength": 15, + "snippet": { + "text": "pluralAttribute" + } + }, + "contextRegion": { + "startLine": 324, + "startColumn": 6, + "charOffset": 11244, + "charLength": 15, + "snippet": { + "text": "\n\tpugi::xml_attribute pluralAttribute = itemNode.attribute(\"plural\");\n\tif (pluralAttribute) {\n\t\titemType.pluralName = pluralAttribute.as_string();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74d8a3def0c8ff9cc7b119ada797dacbfdd58befc4b1ad0b3eeae3c1732c3f55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in conditional return statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/items.cpp" + }, + "region": { + "startLine": 382, + "startColumn": 10, + "charOffset": 12882, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 380, + "startColumn": 10, + "charOffset": 12798, + "charLength": 4, + "snippet": { + "text": "bool Items::hasItemType(size_t hasId) const {\n\tif (hasId < items.size()) {\n\t\treturn true;\n\t}\n\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7faa89842fc3ae2d6534f4f95fbc3956b06a113233790ae0fce8d52d9561ba49" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto attribute' can be declared as 'const auto *attribute'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/attribute.cpp" + }, + "region": { + "startLine": 25, + "startColumn": 2, + "charOffset": 723, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 2, + "charOffset": 718, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tauto attribute = getAttribute(type);\n\tif (!attribute) {\n\t\treturn emptyString;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1eae0313c733ff90c819303b01ef077f1857a470033d4b24636ff736303c89d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/attribute.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 6, + "charOffset": 765, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 6, + "charOffset": 721, + "charLength": 1, + "snippet": { + "text": "\n\tauto attribute = getAttribute(type);\n\tif (!attribute) {\n\t\treturn emptyString;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83e51ef70c13806358aa412524f4307f0d4cd22d5ee3bd4cf51e29fbd69f7c3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const Attributes *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/attribute.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 7, + "charOffset": 766, + "charLength": 9, + "snippet": { + "text": "attribute" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 7, + "charOffset": 721, + "charLength": 9, + "snippet": { + "text": "\n\tauto attribute = getAttribute(type);\n\tif (!attribute) {\n\t\treturn emptyString;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65907e7f938fd91bf7e929dd065718365588f6033023563378d92999b462e4fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-redundant-smartptr-get", + "ruleIndex": 723, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant get() call on smart pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/attribute.cpp" + }, + "region": { + "startLine": 30, + "startColumn": 10, + "charOffset": 814, + "charLength": 9, + "snippet": { + "text": "attribute" + } + }, + "contextRegion": { + "startLine": 28, + "startColumn": 10, + "charOffset": 801, + "charLength": 9, + "snippet": { + "text": "\t}\n\n\treturn *attribute->getString().get();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1fec46b6e54b460ef2b292d3a154b58e9c5fcb8ecf54414ce8d86ec505fa4578" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto attribute' can be declared as 'const auto *attribute'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/attribute.cpp" + }, + "region": { + "startLine": 39, + "startColumn": 2, + "charOffset": 1009, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 37, + "startColumn": 2, + "charOffset": 1004, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tauto attribute = getAttribute(type);\n\tif (!attribute) {\n\t\treturn emptyInt;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6955d7742cf7a8caffd12750937d442689b570d865df550af47dabfdb029def" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/attribute.cpp" + }, + "region": { + "startLine": 40, + "startColumn": 6, + "charOffset": 1051, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 38, + "startColumn": 6, + "charOffset": 1007, + "charLength": 1, + "snippet": { + "text": "\n\tauto attribute = getAttribute(type);\n\tif (!attribute) {\n\t\treturn emptyInt;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44e7f0da6aa53f45fbe977732c5160f76250959571a4f660d02ddf7a0d223a5f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const Attributes *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/attribute.cpp" + }, + "region": { + "startLine": 40, + "startColumn": 7, + "charOffset": 1052, + "charLength": 9, + "snippet": { + "text": "attribute" + } + }, + "contextRegion": { + "startLine": 38, + "startColumn": 7, + "charOffset": 1007, + "charLength": 9, + "snippet": { + "text": "\n\tauto attribute = getAttribute(type);\n\tif (!attribute) {\n\t\treturn emptyInt;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4cce0da61f8a33b3d645b706ee92bb939c684a70e6591d1a30d236f09800cb30" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/attribute.cpp" + }, + "region": { + "startLine": 49, + "startColumn": 3, + "charOffset": 1229, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 47, + "startColumn": 3, + "charOffset": 1124, + "charLength": 3, + "snippet": { + "text": "const Attributes* ItemAttribute::getAttribute(ItemAttribute_t type) const {\n\tif (hasAttribute(type)) {\n\t\tfor (const Attributes &attribute : attributeVector) {\n\t\t\tif (attribute.getAttributeType() == type) {\n\t\t\t\treturn &attribute;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3fd563995667a9ac0a54a14caeb0d0ab3592af61c053e75916cf86148d359dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/attribute.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 2, + "charOffset": 1457, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 2, + "charOffset": 1384, + "charLength": 3, + "snippet": { + "text": "\nAttributes &ItemAttribute::getAttributesByType(ItemAttribute_t type) {\n\tfor (Attributes &attribute : attributeVector) {\n\t\tif (attribute.getAttributeType() == type) {\n\t\t\treturn attribute;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a37fa8e5cb138f82c77bce762611fc3bb48c36f21727e53007b698894890773e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/attribute.cpp" + }, + "region": { + "startLine": 65, + "startColumn": 18, + "charOffset": 1597, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 18, + "charOffset": 1576, + "charLength": 12, + "snippet": { + "text": "\t}\n\n\tattributeVector.emplace_back(type);\n\treturn attributeVector.back();\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "644a66a61bba4b0bcdf7e73ffcbce649809f448ad78fdceaff164cd5e3c633b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/attribute.cpp" + }, + "region": { + "startLine": 90, + "startColumn": 2, + "charOffset": 2093, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 88, + "startColumn": 2, + "charOffset": 2031, + "charLength": 3, + "snippet": { + "text": "\nbool ItemAttribute::removeAttribute(ItemAttribute_t type) {\n\tfor (auto it = attributeVector.begin(); it != attributeVector.end(); ++it) {\n\t\tif (it->getAttributeType() == type) {\n\t\t\t*it = std::move(attributeVector.back());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a42c12d242e678bef4dc1c1fb372110e381fbee67578d06d2b09e6265bae20f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/attribute.cpp" + }, + "region": { + "startLine": 90, + "startColumn": 2, + "charOffset": 2093, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 88, + "startColumn": 2, + "charOffset": 2031, + "charLength": 3, + "snippet": { + "text": "\nbool ItemAttribute::removeAttribute(ItemAttribute_t type) {\n\tfor (auto it = attributeVector.begin(); it != attributeVector.end(); ++it) {\n\t\tif (it->getAttributeType() == type) {\n\t\t\t*it = std::move(attributeVector.back());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24f60622fc9cc580544222e8c59933d6bf32a485c149157f584a976f555d607c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/attribute.cpp" + }, + "region": { + "startLine": 90, + "startColumn": 42, + "charOffset": 2133, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 88, + "startColumn": 42, + "charOffset": 2031, + "charLength": 2, + "snippet": { + "text": "\nbool ItemAttribute::removeAttribute(ItemAttribute_t type) {\n\tfor (auto it = attributeVector.begin(); it != attributeVector.end(); ++it) {\n\t\tif (it->getAttributeType() == type) {\n\t\t\t*it = std::move(attributeVector.back());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec0e994dc9fa1eeca841e1b046ec599d65a38b67fc18bcec9c53dce4d2ea91cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/attribute.cpp" + }, + "region": { + "startLine": 151, + "startColumn": 21, + "charOffset": 4060, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 149, + "startColumn": 21, + "charOffset": 4036, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tcustomAttributeMap.erase(it);\n\treturn true;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43e6ca8a9afaef928784da82d39601f52b989bc9aa90f1b9ea0e547db8e40b15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-pass-by-value", + "ruleIndex": 624, + "kind": "fail", + "level": "warning", + "message": { + "text": "pass by value and use std::move" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.cpp" + }, + "region": { + "startLine": 20, + "startColumn": 34, + "charOffset": 637, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 34, + "charOffset": 576, + "charLength": 5, + "snippet": { + "text": "\n// Constructor for int64_t\nCustomAttribute::CustomAttribute(const std::string &initStringKey, const int64_t initInt64) :\n\tstringKey(initStringKey), value(initInt64) {\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66c0ddbf3d78882904aa272919132ae7494bea8dc33789953432d59d45549f6e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'CustomAttribute' of similar type ('const std::string &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.cpp" + }, + "region": { + "startLine": 24, + "startColumn": 34, + "charOffset": 805, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 22, + "startColumn": 34, + "charOffset": 744, + "charLength": 5, + "snippet": { + "text": "}\n// Constructor for string\nCustomAttribute::CustomAttribute(const std::string &initStringKey, const std::string &initStringValue) :\n\tstringKey(initStringKey), value(initStringValue) {\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce996a9459ac6b4fbc8044c9ada450c622e58ec4f1fafdfa7c8a4063727a153c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-pass-by-value", + "ruleIndex": 624, + "kind": "fail", + "level": "warning", + "message": { + "text": "pass by value and use std::move" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.cpp" + }, + "region": { + "startLine": 24, + "startColumn": 34, + "charOffset": 805, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 22, + "startColumn": 34, + "charOffset": 744, + "charLength": 5, + "snippet": { + "text": "}\n// Constructor for string\nCustomAttribute::CustomAttribute(const std::string &initStringKey, const std::string &initStringValue) :\n\tstringKey(initStringKey), value(initStringValue) {\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "235bb890a15bb03112fd519d77c3950164d5ce82cfca5fa2cae08ea62d44c228" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-pass-by-value", + "ruleIndex": 624, + "kind": "fail", + "level": "warning", + "message": { + "text": "pass by value and use std::move" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.cpp" + }, + "region": { + "startLine": 28, + "startColumn": 34, + "charOffset": 990, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 34, + "charOffset": 929, + "charLength": 5, + "snippet": { + "text": "}\n// Constructor for double\nCustomAttribute::CustomAttribute(const std::string &initStringKey, const double initDoubleValue) :\n\tstringKey(initStringKey), value(initDoubleValue) {\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfcb998b48d39ec3822b7c60656e9cbd1e707381f93910740822f977d1fba77e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-pass-by-value", + "ruleIndex": 624, + "kind": "fail", + "level": "warning", + "message": { + "text": "pass by value and use std::move" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.cpp" + }, + "region": { + "startLine": 32, + "startColumn": 34, + "charOffset": 1170, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 34, + "charOffset": 1108, + "charLength": 5, + "snippet": { + "text": "}\n// Constructor for boolean\nCustomAttribute::CustomAttribute(const std::string &initStringKey, const bool initBoolValue) :\n\tstringKey(initStringKey), value(initBoolValue) {\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66c5e41c2d90ee1591f811dac4713dc5e6f0f92d179a330985e2f55745dc0db9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.cpp" + }, + "region": { + "startLine": 92, + "startColumn": 2, + "charOffset": 2622, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 90, + "startColumn": 2, + "charOffset": 2546, + "charLength": 2, + "snippet": { + "text": "void CustomAttribute::serialize(PropWriteStream &propWriteStream) const {\n\n\tif (hasValue()) {\n\t\tpropWriteStream.write(1);\n\t\tpropWriteStream.writeString(getString());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3dcc3c650ad4d2364c03ac03593c229dee30001162149d07f1208549e92fdeb4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'type' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.cpp" + }, + "region": { + "startLine": 108, + "startColumn": 10, + "charOffset": 3186, + "charLength": 4, + "snippet": { + "text": "type" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 10, + "charOffset": 3087, + "charLength": 4, + "snippet": { + "text": "\nbool CustomAttribute::unserialize(PropStream &propStream, const std::string &function) {\n\tuint8_t type;\n\tif (!propStream.read(type)) {\n\t\tg_logger().error(\"[{}] Failed to read type\", function);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e63f1cc5399753c44436181537fc3bbfa77f8f2a38bb9698866b412d11d60de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'readInt' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.cpp" + }, + "region": { + "startLine": 125, + "startColumn": 12, + "charOffset": 3589, + "charLength": 7, + "snippet": { + "text": "readInt" + } + }, + "contextRegion": { + "startLine": 123, + "startColumn": 12, + "charOffset": 3562, + "charLength": 7, + "snippet": { + "text": "\t\t}\n\t\tcase 2: {\n\t\t\tint64_t readInt;\n\t\t\tif (!propStream.read(readInt)) {\n\t\t\t\tg_logger().error(\"[{}] failed to read int64, call function: {}\", __FUNCTION__, function);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7fd0e8b36b2fa4338340bce058cbd6d7bda2a969e311453ac9eadf949a35a9a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'readDouble' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 11, + "charOffset": 3816, + "charLength": 10, + "snippet": { + "text": "readDouble" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 11, + "charOffset": 3790, + "charLength": 10, + "snippet": { + "text": "\t\t}\n\t\tcase 3: {\n\t\t\tdouble readDouble;\n\t\t\tif (!propStream.read(readDouble)) {\n\t\t\t\tg_logger().error(\"[{}] failed to read double, call function: {}\", __FUNCTION__, function);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4592b0d1f705871785c8e579073d117b97cf34592674aeafcab80e9f29ed49bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'readBoolean' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.cpp" + }, + "region": { + "startLine": 143, + "startColumn": 9, + "charOffset": 4050, + "charLength": 11, + "snippet": { + "text": "readBoolean" + } + }, + "contextRegion": { + "startLine": 141, + "startColumn": 9, + "charOffset": 4026, + "charLength": 11, + "snippet": { + "text": "\t\t}\n\t\tcase 4: {\n\t\t\tbool readBoolean;\n\t\t\tif (!propStream.read(readBoolean)) {\n\t\t\t\tg_logger().error(\"[{}] failed to read boolean, call function: {}\", __FUNCTION__, function);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8248e546b5c30a2d659341b6ab603bda654d5b61a53091aaf1a6128de20ff237" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/custom_attribute.cpp" + }, + "region": { + "startLine": 151, + "startColumn": 3, + "charOffset": 4268, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 149, + "startColumn": 3, + "charOffset": 4252, + "charLength": 7, + "snippet": { + "text": "\t\t\tbreak;\n\t\t}\n\t\tdefault:\n\t\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1855bde17e5f8c9da48dd7fc1e45f22a5fd27fa425d4a50490c98164e5138428" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 85, + "startColumn": 2, + "charOffset": 5163, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 2, + "charOffset": 5078, + "charLength": 3, + "snippet": { + "text": "\nvoid ItemParse::parseDummyRate(pugi::xml_node attributeNode, ItemType &itemType) {\n\tfor (auto subAttributeNode : attributeNode.children()) {\n\t\tpugi::xml_attribute subKeyAttribute = subAttributeNode.attribute(\"key\");\n\t\tif (!subKeyAttribute) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7e0bd4fc88d55f683260397d06e414a8dc73262b3b0e61d776826ce20425760" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 7, + "charOffset": 5301, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 7, + "charOffset": 5162, + "charLength": 1, + "snippet": { + "text": "\tfor (auto subAttributeNode : attributeNode.children()) {\n\t\tpugi::xml_attribute subKeyAttribute = subAttributeNode.attribute(\"key\");\n\t\tif (!subKeyAttribute) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd4f79c5bdad7de3f74332ca7106b2bb203d4ad2422451cc90a9da703bf53102" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 92, + "startColumn": 7, + "charOffset": 5424, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 90, + "startColumn": 7, + "charOffset": 5338, + "charLength": 1, + "snippet": { + "text": "\n\t\tpugi::xml_attribute subValueAttribute = subAttributeNode.attribute(\"value\");\n\t\tif (!subValueAttribute) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c736f432ac451ccdcb7daf67fbe7d960d665ff69c7bb12a27d46b2ff54a261f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 20, + "charOffset": 5583, + "charLength": 17, + "snippet": { + "text": "subValueAttribute" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 20, + "charOffset": 5464, + "charLength": 17, + "snippet": { + "text": "\t\tauto stringValue = asLowerCaseString(subKeyAttribute.as_string());\n\t\tif (stringValue == \"rate\") {\n\t\t\tuint16_t rate = subValueAttribute.as_uint();\n\t\t\tItem::items.addDummyId(itemType.id, rate);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bbb749d8d554091c12fc253fc69af3775444374283aac2e6c718689cf79dec6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 127, + "startColumn": 14, + "charOffset": 6600, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 125, + "startColumn": 14, + "charOffset": 6463, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseDescription(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"description\") {\n\t\titemType.description = valueAttribute.as_string();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2db30237bb8028324cae6559a2b758c9cc95c0efb589619cc942cc9ae10ba20e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 139, + "startColumn": 14, + "charOffset": 7207, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 137, + "startColumn": 14, + "charOffset": 7068, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseRuneSpellName(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"runespellname\") {\n\t\titemType.runeSpellName = valueAttribute.as_string();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b38f43d5cfc827c32c6015f02cb268117dfd9956867534667c753b8bf006dbf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 146, + "startColumn": 14, + "charOffset": 7465, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 144, + "startColumn": 14, + "charOffset": 7333, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseWeight(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"weight\") {\n\t\titemType.weight = pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76602fe1f4fbee709e9d3f9a0cf6d0d7b770378213ddfd0f722f1163d5a55a12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 153, + "startColumn": 14, + "charOffset": 7729, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 151, + "startColumn": 14, + "charOffset": 7594, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseShowCount(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"showcount\") {\n\t\titemType.showCount = valueAttribute.as_bool();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89e5de51c73e16bcea89fc341cd13dc6dddc9093047999b976ccaba8b4a5a531" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 160, + "startColumn": 14, + "charOffset": 7976, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 158, + "startColumn": 14, + "charOffset": 7845, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseArmor(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"armor\") {\n\t\titemType.armor = pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9b55274a271568c36622f2b64551943283ec9cd90dc608ecbb48e1585f1bd42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 14, + "charOffset": 8236, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 14, + "charOffset": 8103, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseDefense(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"defense\") {\n\t\titemType.defense = pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e24b69674f434e099ac3d384013c8226d4d65e6c8244a9a451905260913005d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 174, + "startColumn": 14, + "charOffset": 8505, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 14, + "charOffset": 8367, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseExtraDefense(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"extradef\") {\n\t\titemType.extraDefense = pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9934a82afcca7c676ac14b8c9dc873321622664c89261bba6cbc182c9c655839" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 181, + "startColumn": 14, + "charOffset": 8774, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 179, + "startColumn": 14, + "charOffset": 8642, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseAttack(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"attack\") {\n\t\titemType.attack = pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16301ec695e22572c51b57ff22a2479511f43127b00d6660819a2a89b79d84cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 188, + "startColumn": 14, + "charOffset": 9037, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 186, + "startColumn": 14, + "charOffset": 8903, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseRotateTo(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"rotateto\") {\n\t\titemType.rotateTo = pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e98270a59d3062646039640fc150402351256db061ecc9c84d3636c3a233d221" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 195, + "startColumn": 14, + "charOffset": 9309, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 193, + "startColumn": 14, + "charOffset": 9170, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseWrapContainer(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"wrapcontainer\") {\n\t\titemType.wrapContainer = valueAttribute.as_bool();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05090228d7db9e5467c41fc4268a35c724077d2b45e2a422db70c523e524a533" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 202, + "startColumn": 14, + "charOffset": 9569, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 200, + "startColumn": 14, + "charOffset": 9433, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseWrapableTo(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"wrapableto\") {\n\t\titemType.wrapableTo = pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4998db77ebb0e7cdf1bffd9507bf6ffffc598fcdfafe13f8985e62dce3c2fe5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 210, + "startColumn": 14, + "charOffset": 9867, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 208, + "startColumn": 14, + "charOffset": 9734, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseMovable(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"movable\") {\n\t\titemType.movable = valueAttribute.as_bool();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19f03a658bc496dd64e42ebd6dc84879ea562e8d83a524ef74137cccea88981e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 217, + "startColumn": 14, + "charOffset": 10121, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 215, + "startColumn": 14, + "charOffset": 9979, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseBlockProjectTile(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"blockprojectile\") {\n\t\titemType.blockProjectile = valueAttribute.as_bool();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "634439f5796c5b0a237a33b2aac1ed2c790630430e4c9d1bc87164b8d38070ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 224, + "startColumn": 14, + "charOffset": 10385, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 222, + "startColumn": 14, + "charOffset": 10249, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parsePickupable(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"allowpickupable\" || stringValue == \"pickupable\") {\n\t\titemType.pickupable = valueAttribute.as_bool();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5034914e75229a93d1d72cf1f4994aa25568e120ebe07acb4c19aa0038fcdd55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 244, + "startColumn": 14, + "charOffset": 11201, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 14, + "charOffset": 11062, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseContainerSize(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"containersize\") {\n\t\titemType.maxItems = pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc0447f2ef5a707b475ea958d25a9af6a014b726ebfb149ef3b9b9a82d2eeecf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 264, + "startColumn": 14, + "charOffset": 11992, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 262, + "startColumn": 14, + "charOffset": 11856, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseWriteables(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"readable\") {\n\t\titemType.canReadText = valueAttribute.as_bool();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a282dd6fe2b28b98cdbb974ee02f4b686645960b54cef6c5c07c64c950582ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 265, + "startColumn": 2, + "charOffset": 12020, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 263, + "startColumn": 2, + "charOffset": 11857, + "charLength": 2, + "snippet": { + "text": "void ItemParse::parseWriteables(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"readable\") {\n\t\titemType.canReadText = valueAttribute.as_bool();\n\t} else if (stringValue == \"writeable\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "238e0dbdb1588e9020d9aae848383680d0e568fcb943942b8f012c4fe3f91b24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 296, + "startColumn": 27, + "charOffset": 13295, + "charLength": 10, + "snippet": { + "text": "SLOTP_HAND" + } + }, + "contextRegion": { + "startLine": 294, + "startColumn": 27, + "charOffset": 13195, + "charLength": 10, + "snippet": { + "text": "\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"slottype\") {\n\t\titemType.slotPosition = SLOTP_HAND;\n\t\tstringValue = asLowerCaseString(valueAttribute.as_string());\n\t\tif (stringValue == \"head\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6196b3912f2af4c16ca8e8cd887f639338453fec77441e5b3dacb8f347db17e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 299, + "startColumn": 26, + "charOffset": 13426, + "charLength": 2, + "snippet": { + "text": "|=" + } + }, + "contextRegion": { + "startLine": 297, + "startColumn": 26, + "charOffset": 13307, + "charLength": 2, + "snippet": { + "text": "\t\tstringValue = asLowerCaseString(valueAttribute.as_string());\n\t\tif (stringValue == \"head\") {\n\t\t\titemType.slotPosition |= SLOTP_HEAD;\n\t\t} else if (stringValue == \"body\") {\n\t\t\titemType.slotPosition |= SLOTP_ARMOR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1921abaaffed5be60f9b8ea9617ab6784f20a27329669f623b68f00c4bbe952d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 301, + "startColumn": 26, + "charOffset": 13504, + "charLength": 2, + "snippet": { + "text": "|=" + } + }, + "contextRegion": { + "startLine": 299, + "startColumn": 26, + "charOffset": 13401, + "charLength": 2, + "snippet": { + "text": "\t\t\titemType.slotPosition |= SLOTP_HEAD;\n\t\t} else if (stringValue == \"body\") {\n\t\t\titemType.slotPosition |= SLOTP_ARMOR;\n\t\t} else if (stringValue == \"legs\") {\n\t\t\titemType.slotPosition |= SLOTP_LEGS;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8840c64c389107113b9834ac7c90502e17ecf28575f50decc7a280b06272ef7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 303, + "startColumn": 26, + "charOffset": 13583, + "charLength": 2, + "snippet": { + "text": "|=" + } + }, + "contextRegion": { + "startLine": 301, + "startColumn": 26, + "charOffset": 13479, + "charLength": 2, + "snippet": { + "text": "\t\t\titemType.slotPosition |= SLOTP_ARMOR;\n\t\t} else if (stringValue == \"legs\") {\n\t\t\titemType.slotPosition |= SLOTP_LEGS;\n\t\t} else if (stringValue == \"feet\") {\n\t\t\titemType.slotPosition |= SLOTP_FEET;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "920971cae1045598b2e7e897b3dfc7ad0be20db4af2d9bbdf81fe5a02cd81ba9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 305, + "startColumn": 26, + "charOffset": 13661, + "charLength": 2, + "snippet": { + "text": "|=" + } + }, + "contextRegion": { + "startLine": 303, + "startColumn": 26, + "charOffset": 13558, + "charLength": 2, + "snippet": { + "text": "\t\t\titemType.slotPosition |= SLOTP_LEGS;\n\t\t} else if (stringValue == \"feet\") {\n\t\t\titemType.slotPosition |= SLOTP_FEET;\n\t\t} else if (stringValue == \"backpack\") {\n\t\t\titemType.slotPosition |= SLOTP_BACKPACK;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2cf93a48609b31495858bad9fb5024aefa8cb49d8d2b2b659e1b4dca00e0459" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 307, + "startColumn": 26, + "charOffset": 13743, + "charLength": 2, + "snippet": { + "text": "|=" + } + }, + "contextRegion": { + "startLine": 305, + "startColumn": 26, + "charOffset": 13636, + "charLength": 2, + "snippet": { + "text": "\t\t\titemType.slotPosition |= SLOTP_FEET;\n\t\t} else if (stringValue == \"backpack\") {\n\t\t\titemType.slotPosition |= SLOTP_BACKPACK;\n\t\t} else if (stringValue == \"two-handed\") {\n\t\t\titemType.slotPosition |= SLOTP_TWO_HAND;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eae024000dc98d8e1c50cb9f4e124481e3d93ada095f6d24d91a1707584abfd4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 309, + "startColumn": 26, + "charOffset": 13831, + "charLength": 2, + "snippet": { + "text": "|=" + } + }, + "contextRegion": { + "startLine": 307, + "startColumn": 26, + "charOffset": 13718, + "charLength": 2, + "snippet": { + "text": "\t\t\titemType.slotPosition |= SLOTP_BACKPACK;\n\t\t} else if (stringValue == \"two-handed\") {\n\t\t\titemType.slotPosition |= SLOTP_TWO_HAND;\n\t\t} else if (stringValue == \"right-hand\") {\n\t\t\titemType.slotPosition &= ~SLOTP_LEFT;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "199039a94d1d35fc381ef1cada69d80c73da9303d79726adc2f94feed6cc8059" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 311, + "startColumn": 29, + "charOffset": 13922, + "charLength": 1, + "snippet": { + "text": "~" + } + }, + "contextRegion": { + "startLine": 309, + "startColumn": 29, + "charOffset": 13806, + "charLength": 1, + "snippet": { + "text": "\t\t\titemType.slotPosition |= SLOTP_TWO_HAND;\n\t\t} else if (stringValue == \"right-hand\") {\n\t\t\titemType.slotPosition &= ~SLOTP_LEFT;\n\t\t} else if (stringValue == \"left-hand\") {\n\t\t\titemType.slotPosition &= ~SLOTP_RIGHT;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2eaf48a2d85697fed2b1548a91afc7dce0395f6da829cac0a1fc736e52879a3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 313, + "startColumn": 29, + "charOffset": 14006, + "charLength": 1, + "snippet": { + "text": "~" + } + }, + "contextRegion": { + "startLine": 311, + "startColumn": 29, + "charOffset": 13894, + "charLength": 1, + "snippet": { + "text": "\t\t\titemType.slotPosition &= ~SLOTP_LEFT;\n\t\t} else if (stringValue == \"left-hand\") {\n\t\t\titemType.slotPosition &= ~SLOTP_RIGHT;\n\t\t} else if (stringValue == \"necklace\") {\n\t\t\titemType.slotPosition |= SLOTP_NECKLACE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "424a387b65630f6c960f6508d5be4e81b0ca280453f8d0eee297a67826d4b993" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 315, + "startColumn": 26, + "charOffset": 14087, + "charLength": 2, + "snippet": { + "text": "|=" + } + }, + "contextRegion": { + "startLine": 313, + "startColumn": 26, + "charOffset": 13978, + "charLength": 2, + "snippet": { + "text": "\t\t\titemType.slotPosition &= ~SLOTP_RIGHT;\n\t\t} else if (stringValue == \"necklace\") {\n\t\t\titemType.slotPosition |= SLOTP_NECKLACE;\n\t\t} else if (stringValue == \"ring\") {\n\t\t\titemType.slotPosition |= SLOTP_RING;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "199039a94d1d35fc381ef1cada69d80c73da9303d79726adc2f94feed6cc8059" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 317, + "startColumn": 26, + "charOffset": 14169, + "charLength": 2, + "snippet": { + "text": "|=" + } + }, + "contextRegion": { + "startLine": 315, + "startColumn": 26, + "charOffset": 14062, + "charLength": 2, + "snippet": { + "text": "\t\t\titemType.slotPosition |= SLOTP_NECKLACE;\n\t\t} else if (stringValue == \"ring\") {\n\t\t\titemType.slotPosition |= SLOTP_RING;\n\t\t} else if (stringValue == \"ammo\") {\n\t\t\titemType.slotPosition |= SLOTP_AMMO;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a0cbf2ce4bdd3208edc1d493354a08365bf20b7b71d808ff8fb5f013e819be5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 319, + "startColumn": 26, + "charOffset": 14247, + "charLength": 2, + "snippet": { + "text": "|=" + } + }, + "contextRegion": { + "startLine": 317, + "startColumn": 26, + "charOffset": 14144, + "charLength": 2, + "snippet": { + "text": "\t\t\titemType.slotPosition |= SLOTP_RING;\n\t\t} else if (stringValue == \"ammo\") {\n\t\t\titemType.slotPosition |= SLOTP_AMMO;\n\t\t} else if (stringValue == \"hand\") {\n\t\t\titemType.slotPosition |= SLOTP_HAND;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4623a74171e8ce423fd304b9648f3dd6d568e9d6ef1da2700e0985636320e238" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 321, + "startColumn": 26, + "charOffset": 14325, + "charLength": 2, + "snippet": { + "text": "|=" + } + }, + "contextRegion": { + "startLine": 319, + "startColumn": 26, + "charOffset": 14222, + "charLength": 2, + "snippet": { + "text": "\t\t\titemType.slotPosition |= SLOTP_AMMO;\n\t\t} else if (stringValue == \"hand\") {\n\t\t\titemType.slotPosition |= SLOTP_HAND;\n\t\t} else {\n\t\t\tg_logger().warn(\"[itemParseSlotType - Items::parseItemNode] - Unknown slotType {}\", valueAttribute.as_string());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f43bb2eb27eba602874d0d3fb1f6fa9f20053d692353f61687b2a88c6ff4bd9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 329, + "startColumn": 14, + "charOffset": 14610, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 327, + "startColumn": 14, + "charOffset": 14476, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseAmmoType(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"ammotype\") {\n\t\titemType.ammoType = getAmmoType(asLowerCaseString(valueAttribute.as_string()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02a01c6ab68843ae0849c8c20624404d60728553a8aaaf8c5b301003d86ba4fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 339, + "startColumn": 14, + "charOffset": 15033, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 337, + "startColumn": 14, + "charOffset": 14898, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseShootType(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"shoottype\") {\n\t\tShootType_t shoot = getShootType(asLowerCaseString(valueAttribute.as_string()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5eefbd7f67b82bd9e26492d8ff75762dff0ea77318c977125d9cbfe70d35ef07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 351, + "startColumn": 14, + "charOffset": 15496, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 349, + "startColumn": 14, + "charOffset": 15359, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseMagicEffect(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"effect\") {\n\t\tMagicEffectClasses effect = getMagicEffect(asLowerCaseString(valueAttribute.as_string()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9cfb5225e60d08f113b6dd7a229d49a0df4ba8adec77d4e04462a15ba9195e8b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 363, + "startColumn": 14, + "charOffset": 15963, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 361, + "startColumn": 14, + "charOffset": 15829, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseLootType(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"loottype\") {\n\t\titemType.type = Item::items.getLootType(valueAttribute.as_string());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62608075de583d0f1a928feb11a7e694db6b22f4c3e2043203139e433ae8d147" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 370, + "startColumn": 14, + "charOffset": 16231, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 368, + "startColumn": 14, + "charOffset": 16100, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseRange(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"range\") {\n\t\titemType.shootRange = pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd9d0c382dbdb577901a301437525e41007232d8941a3c8445cac48969abd415" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 377, + "startColumn": 14, + "charOffset": 16496, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 375, + "startColumn": 14, + "charOffset": 16363, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseDecayTo(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"decayto\") {\n\t\titemType.decayTo = pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25ae56301f1833eda975cb6af894ab9e8e962061b65efc1218d7eda109a89098" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 384, + "startColumn": 14, + "charOffset": 16762, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 382, + "startColumn": 14, + "charOffset": 16628, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseDuration(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"duration\") {\n\t\titemType.decayTime = pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5599f56f22c82c655bbc1c2afe0f56d3a447a0eaabdcb3edaf39772474361fd7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 385, + "startColumn": 2, + "charOffset": 16790, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 383, + "startColumn": 2, + "charOffset": 16629, + "charLength": 2, + "snippet": { + "text": "void ItemParse::parseDuration(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"duration\") {\n\t\titemType.decayTime = pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"stopduration\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff57751ebf5134aa9e16d6ad84230c8bf93b2eb28f80113d90f034bbc4a7f5f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 395, + "startColumn": 14, + "charOffset": 17222, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 393, + "startColumn": 14, + "charOffset": 17087, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseTransform(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"transformequipto\") {\n\t\titemType.transformEquipTo = pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16301ec695e22572c51b57ff22a2479511f43127b00d6660819a2a89b79d84cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 396, + "startColumn": 2, + "charOffset": 17250, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 394, + "startColumn": 2, + "charOffset": 17088, + "charLength": 2, + "snippet": { + "text": "void ItemParse::parseTransform(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"transformequipto\") {\n\t\titemType.transformEquipTo = pugi::cast(valueAttribute.value());\n\t\tif (itemType.transformEquipTo == itemType.decayTo) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4de482b84761ace8cea4a810a967cffb542f856c1277fa2907f4c26072b309c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 421, + "startColumn": 14, + "charOffset": 18491, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 419, + "startColumn": 14, + "charOffset": 18358, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseCharges(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"charges\") {\n\t\titemType.charges = pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bdcfd8cc827860ab62dc651145f85edb34c49abe73f7eb799ddf379f31de52ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 422, + "startColumn": 2, + "charOffset": 18519, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 420, + "startColumn": 2, + "charOffset": 18359, + "charLength": 2, + "snippet": { + "text": "void ItemParse::parseCharges(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"charges\") {\n\t\titemType.charges = pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"showcharges\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71e37ff218c6fa149ebd1c4dea608f233cc16221654c5fe6c77c42666574ae83" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 437, + "startColumn": 14, + "charOffset": 19148, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 435, + "startColumn": 14, + "charOffset": 19013, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseHitChance(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"hitchance\") {\n\t\titemType.hitChance = std::min(100, std::max(-100, pugi::cast(valueAttribute.value())));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5815ec307e85a8875245bb2f561d76792555c5066bf05995acc7ecfb8811d0d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 438, + "startColumn": 2, + "charOffset": 19176, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 436, + "startColumn": 2, + "charOffset": 19014, + "charLength": 2, + "snippet": { + "text": "void ItemParse::parseHitChance(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"hitchance\") {\n\t\titemType.hitChance = std::min(100, std::max(-100, pugi::cast(valueAttribute.value())));\n\t} else if (stringValue == \"maxhitchance\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bad66e45c810fb533c3fce96463f7609d0f80fd1c9cf386b0833754d7540f2ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 439, + "startColumn": 41, + "charOffset": 19250, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 437, + "startColumn": 41, + "charOffset": 19135, + "charLength": 3, + "snippet": { + "text": "\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"hitchance\") {\n\t\titemType.hitChance = std::min(100, std::max(-100, pugi::cast(valueAttribute.value())));\n\t} else if (stringValue == \"maxhitchance\") {\n\t\titemType.maxHitChance = std::min(100, pugi::cast(valueAttribute.value()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a7728cf2bdf53d9d1b94a889372d389857724435d653970cb944e2a8918b4a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 439, + "startColumn": 64, + "charOffset": 19273, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 437, + "startColumn": 64, + "charOffset": 19135, + "charLength": 3, + "snippet": { + "text": "\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"hitchance\") {\n\t\titemType.hitChance = std::min(100, std::max(-100, pugi::cast(valueAttribute.value())));\n\t} else if (stringValue == \"maxhitchance\") {\n\t\titemType.maxHitChance = std::min(100, pugi::cast(valueAttribute.value()));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8a1fc94d6ec3c22d7ce6849f5eb908d678580818f6d92da2ca3442f74dc6514" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 441, + "startColumn": 27, + "charOffset": 19395, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 439, + "startColumn": 27, + "charOffset": 19210, + "charLength": 3, + "snippet": { + "text": "\t\titemType.hitChance = std::min(100, std::max(-100, pugi::cast(valueAttribute.value())));\n\t} else if (stringValue == \"maxhitchance\") {\n\t\titemType.maxHitChance = std::min(100, pugi::cast(valueAttribute.value()));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68e8109395f1bf5a05f2bad4feab371d36fa18c0520b4fc10cc674a0aa8ee279" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 441, + "startColumn": 46, + "charOffset": 19414, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 439, + "startColumn": 46, + "charOffset": 19210, + "charLength": 3, + "snippet": { + "text": "\t\titemType.hitChance = std::min(100, std::max(-100, pugi::cast(valueAttribute.value())));\n\t} else if (stringValue == \"maxhitchance\") {\n\t\titemType.maxHitChance = std::min(100, pugi::cast(valueAttribute.value()));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4ea8f5e39b7d54fc07c6ba4546da8dd32be99dbfa7d269e54fbfa09956379c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 446, + "startColumn": 14, + "charOffset": 19606, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 444, + "startColumn": 14, + "charOffset": 19471, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseInvisible(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"invisible\") {\n\t\titemType.getAbilities().invisible = valueAttribute.as_bool();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d79f021cfd1af4ab9c86d502dd94dd9915715bb2fac23e8beee5b2f60072446" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 453, + "startColumn": 14, + "charOffset": 19868, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 451, + "startColumn": 14, + "charOffset": 19737, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseSpeed(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"speed\") {\n\t\titemType.getAbilities().speed = pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5219ef373ec5a5c0764cf15376cd77a57e9ce1bb85262edeb3b7ff0888583668" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 460, + "startColumn": 14, + "charOffset": 20149, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 458, + "startColumn": 14, + "charOffset": 20010, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseHealthAndMana(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"healthgain\") {\n\t\tAbilities &abilities = itemType.getAbilities();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d87fe8623ad1652a94e8d775d245244f21d87b7dcde0f6d304700d2906857859" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 461, + "startColumn": 2, + "charOffset": 20177, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 459, + "startColumn": 2, + "charOffset": 20011, + "charLength": 2, + "snippet": { + "text": "void ItemParse::parseHealthAndMana(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"healthgain\") {\n\t\tAbilities &abilities = itemType.getAbilities();\n\t\tabilities.regeneration = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d14862e3e25a25f966ea9c382b5bb9c07ded18e0c4925676ec38744899ceb6da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 483, + "startColumn": 14, + "charOffset": 21206, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 481, + "startColumn": 14, + "charOffset": 21074, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseSkills(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"skillsword\") {\n\t\titemType.getAbilities().skills[SKILL_SWORD] = pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14e5630dcf606a19679d69e7bf6c78978d5849c57a5a640e625e7a0632eba175" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 484, + "startColumn": 2, + "charOffset": 21234, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 482, + "startColumn": 2, + "charOffset": 21075, + "charLength": 2, + "snippet": { + "text": "void ItemParse::parseSkills(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"skillsword\") {\n\t\titemType.getAbilities().skills[SKILL_SWORD] = pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"skillaxe\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa7ec8baa1b370192dd3d6a07d3940f898e65a7cabfb56676320a5a7f14705f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 502, + "startColumn": 14, + "charOffset": 22317, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 500, + "startColumn": 14, + "charOffset": 22180, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseCriticalHit(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"criticalhitchance\") {\n\t\titemType.getAbilities().skills[SKILL_CRITICAL_HIT_CHANCE] = pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af54d1c504d6398a7fb637d9d7e4f7c4cdee344901cb7d5098831b30a574ccc3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 503, + "startColumn": 2, + "charOffset": 22345, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 501, + "startColumn": 2, + "charOffset": 22181, + "charLength": 2, + "snippet": { + "text": "void ItemParse::parseCriticalHit(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"criticalhitchance\") {\n\t\titemType.getAbilities().skills[SKILL_CRITICAL_HIT_CHANCE] = pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"criticalhitdamage\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "590c039d9f71a488686708ff4c8d8506f9bbd854e8caa4f4650773ef4827c5b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 511, + "startColumn": 14, + "charOffset": 22798, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 509, + "startColumn": 14, + "charOffset": 22656, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseLifeAndManaLeech(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"lifeleechchance\") {\n\t\titemType.getAbilities().skills[SKILL_LIFE_LEECH_CHANCE] = pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e38d6e12e759f210221b81c8abc60b14daef146578c9057162036efd9d318eb6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 512, + "startColumn": 2, + "charOffset": 22826, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 510, + "startColumn": 2, + "charOffset": 22657, + "charLength": 2, + "snippet": { + "text": "void ItemParse::parseLifeAndManaLeech(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"lifeleechchance\") {\n\t\titemType.getAbilities().skills[SKILL_LIFE_LEECH_CHANCE] = pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"lifeleechamount\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "326121a6c3e788eeda15c6cc684af60475562fd31be6a79ca3349ecccd5f6edb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 524, + "startColumn": 14, + "charOffset": 23580, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 522, + "startColumn": 14, + "charOffset": 23435, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseMaxHitAndManaPoints(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"maxhitpoints\") {\n\t\titemType.getAbilities().stats[STAT_MAXHITPOINTS] = pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d21ed2c752729a28624c0d3f47076ca5d5dcba006cd180a77dc53a191dcc8adf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 525, + "startColumn": 2, + "charOffset": 23608, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 523, + "startColumn": 2, + "charOffset": 23436, + "charLength": 2, + "snippet": { + "text": "void ItemParse::parseMaxHitAndManaPoints(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"maxhitpoints\") {\n\t\titemType.getAbilities().stats[STAT_MAXHITPOINTS] = pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"maxhitpointspercent\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb1aa4b3ce6b4094151e4b8ba3cf2a63a7fbce891f938aab258391690780e437" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 537, + "startColumn": 14, + "charOffset": 24350, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 535, + "startColumn": 14, + "charOffset": 24209, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseMagicLevelPoint(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"magiclevelpoints\" || stringValue == \"magicpoints\") {\n\t\titemType.getAbilities().stats[STAT_MAGICPOINTS] = pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e12f034aaf8c148d8969d84a568d0257027e53b93b2603ba47548444dccab69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 538, + "startColumn": 2, + "charOffset": 24378, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 536, + "startColumn": 2, + "charOffset": 24210, + "charLength": 2, + "snippet": { + "text": "void ItemParse::parseMagicLevelPoint(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"magiclevelpoints\" || stringValue == \"magicpoints\") {\n\t\titemType.getAbilities().stats[STAT_MAGICPOINTS] = pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"magiclevelpointspercent\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3672995347612465ac6a5fbce19722a131b611be9e8e3b011f4c0155f07769c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 546, + "startColumn": 14, + "charOffset": 24857, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 544, + "startColumn": 14, + "charOffset": 24713, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseFieldAbsorbPercent(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"fieldabsorbpercentenergy\") {\n\t\titemType.getAbilities().fieldAbsorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ece1e1e0b844dededd00e5a36a8aaea9e685e6539471624e33a86f77be48eb5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 547, + "startColumn": 2, + "charOffset": 24885, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 545, + "startColumn": 2, + "charOffset": 24714, + "charLength": 2, + "snippet": { + "text": "void ItemParse::parseFieldAbsorbPercent(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"fieldabsorbpercentenergy\") {\n\t\titemType.getAbilities().fieldAbsorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"fieldabsorbpercentfire\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78a16ad33591fd130c67cdb3402cdbfda103ebe3c380f7debc302c507850dfb4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 548, + "startColumn": 3, + "charOffset": 24936, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 546, + "startColumn": 3, + "charOffset": 24844, + "charLength": 8, + "snippet": { + "text": "\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"fieldabsorbpercentenergy\") {\n\t\titemType.getAbilities().fieldAbsorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"fieldabsorbpercentfire\") {\n\t\titemType.getAbilities().fieldAbsorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a5425bf7a913f56cd32610ac293a72977387163098a66a1c7845d6a54e7d2138" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 548, + "startColumn": 89, + "charOffset": 25022, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 546, + "startColumn": 89, + "charOffset": 24844, + "charLength": 4, + "snippet": { + "text": "\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"fieldabsorbpercentenergy\") {\n\t\titemType.getAbilities().fieldAbsorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"fieldabsorbpercentfire\") {\n\t\titemType.getAbilities().fieldAbsorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ace186bf13384794d065a2a116ea3c5c2966efa931de7903df005836d88d5c65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 550, + "startColumn": 3, + "charOffset": 25124, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 548, + "startColumn": 3, + "charOffset": 24934, + "charLength": 8, + "snippet": { + "text": "\t\titemType.getAbilities().fieldAbsorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"fieldabsorbpercentfire\") {\n\t\titemType.getAbilities().fieldAbsorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"fieldabsorbpercentpoison\") {\n\t\titemType.getAbilities().fieldAbsorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d6ac66948d463e91958fbe86dcaaefd189e9c3b533d86dd06f2935785fc42b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 550, + "startColumn": 87, + "charOffset": 25208, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 548, + "startColumn": 87, + "charOffset": 24934, + "charLength": 4, + "snippet": { + "text": "\t\titemType.getAbilities().fieldAbsorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"fieldabsorbpercentfire\") {\n\t\titemType.getAbilities().fieldAbsorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"fieldabsorbpercentpoison\") {\n\t\titemType.getAbilities().fieldAbsorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf5fbed5bee382ad7a29f1e65d93628fc16d10e445511fba032a79191e82fc8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 552, + "startColumn": 3, + "charOffset": 25312, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 550, + "startColumn": 3, + "charOffset": 25122, + "charLength": 8, + "snippet": { + "text": "\t\titemType.getAbilities().fieldAbsorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"fieldabsorbpercentpoison\") {\n\t\titemType.getAbilities().fieldAbsorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += pugi::cast(valueAttribute.value());\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30be48c36f05e7ff541289e4d6a77bc834639ae8157c0281b40e465fa710530a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 552, + "startColumn": 88, + "charOffset": 25397, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 550, + "startColumn": 88, + "charOffset": 25122, + "charLength": 4, + "snippet": { + "text": "\t\titemType.getAbilities().fieldAbsorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"fieldabsorbpercentpoison\") {\n\t\titemType.getAbilities().fieldAbsorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += pugi::cast(valueAttribute.value());\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "57b5f3d0c37d6a0573b3460199468ad26e2306fd069f17ad187be2a3b26ca19d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 557, + "startColumn": 14, + "charOffset": 25586, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 555, + "startColumn": 14, + "charOffset": 25447, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseAbsorbPercent(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"absorbpercentall\") {\n\t\tint16_t value = pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f3ed0ec9f6bd7f83ee40a53b5292a8010459b29df067aeb44821e9a143fc3b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 558, + "startColumn": 2, + "charOffset": 25614, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 556, + "startColumn": 2, + "charOffset": 25448, + "charLength": 2, + "snippet": { + "text": "void ItemParse::parseAbsorbPercent(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"absorbpercentall\") {\n\t\tint16_t value = pugi::cast(valueAttribute.value());\n\t\tAbilities &abilities = itemType.getAbilities();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a2b5578b707ec488e4b6e102f3149806eed333cf3a9d4bc4cbd69c6d49a4171" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 559, + "startColumn": 3, + "charOffset": 25657, + "charLength": 7, + "snippet": { + "text": "int16_t" + } + }, + "contextRegion": { + "startLine": 557, + "startColumn": 3, + "charOffset": 25573, + "charLength": 7, + "snippet": { + "text": "\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"absorbpercentall\") {\n\t\tint16_t value = pugi::cast(valueAttribute.value());\n\t\tAbilities &abilities = itemType.getAbilities();\n\t\tfor (auto &i : abilities.absorbPercent) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5abbd96a3bb0aae9e633e816f5b6d28a1999e15f3deeb0e5e05dc4ef937d4526" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 561, + "startColumn": 3, + "charOffset": 25770, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 559, + "startColumn": 3, + "charOffset": 25655, + "charLength": 3, + "snippet": { + "text": "\t\tint16_t value = pugi::cast(valueAttribute.value());\n\t\tAbilities &abilities = itemType.getAbilities();\n\t\tfor (auto &i : abilities.absorbPercent) {\n\t\t\ti += value;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94b39da9a217504311a5c580be9a77c3a1d84984ca958a8a1c81b145de1d280d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 562, + "startColumn": 9, + "charOffset": 25820, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 560, + "startColumn": 9, + "charOffset": 25718, + "charLength": 5, + "snippet": { + "text": "\t\tAbilities &abilities = itemType.getAbilities();\n\t\tfor (auto &i : abilities.absorbPercent) {\n\t\t\ti += value;\n\t\t}\n\t} else if (stringValue == \"absorbpercentelements\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1aed505b0b47e66e5906e6ca84e9eed5cc01226dbccf8aabbfa29af368d7176" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 565, + "startColumn": 3, + "charOffset": 25887, + "charLength": 7, + "snippet": { + "text": "int16_t" + } + }, + "contextRegion": { + "startLine": 563, + "startColumn": 3, + "charOffset": 25827, + "charLength": 7, + "snippet": { + "text": "\t\t}\n\t} else if (stringValue == \"absorbpercentelements\") {\n\t\tint16_t value = pugi::cast(valueAttribute.value());\n\t\tAbilities &abilities = itemType.getAbilities();\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31e66f591bedfede3fd07a887fb106fde918fd61273e7b82dd3098bfc3157b73" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 567, + "startColumn": 3, + "charOffset": 26000, + "charLength": 9, + "snippet": { + "text": "abilities" + } + }, + "contextRegion": { + "startLine": 565, + "startColumn": 3, + "charOffset": 25885, + "charLength": 9, + "snippet": { + "text": "\t\tint16_t value = pugi::cast(valueAttribute.value());\n\t\tAbilities &abilities = itemType.getAbilities();\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32b8aa2edfc9b9dbee5ec7714e6d6628c84d4c79ea23950f21943aaf23620cb4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 567, + "startColumn": 70, + "charOffset": 26067, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 565, + "startColumn": 70, + "charOffset": 25885, + "charLength": 5, + "snippet": { + "text": "\t\tint16_t value = pugi::cast(valueAttribute.value());\n\t\tAbilities &abilities = itemType.getAbilities();\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67dc8d88d200643fda3ce3315ca26688c1ae382b7795f1cf1c8a99ee1405608a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 568, + "startColumn": 3, + "charOffset": 26076, + "charLength": 9, + "snippet": { + "text": "abilities" + } + }, + "contextRegion": { + "startLine": 566, + "startColumn": 3, + "charOffset": 25948, + "charLength": 9, + "snippet": { + "text": "\t\tAbilities &abilities = itemType.getAbilities();\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34484d49bff72e6237773ded31847840be5dcfb0a5349b66efd29452f210b25c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 568, + "startColumn": 68, + "charOffset": 26141, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 566, + "startColumn": 68, + "charOffset": 25948, + "charLength": 5, + "snippet": { + "text": "\t\tAbilities &abilities = itemType.getAbilities();\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8521c545e81d0ffb13d4923334989b2687aff6deeb45a09bf41fb1f93415f9fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 569, + "startColumn": 3, + "charOffset": 26150, + "charLength": 9, + "snippet": { + "text": "abilities" + } + }, + "contextRegion": { + "startLine": 567, + "startColumn": 3, + "charOffset": 25998, + "charLength": 9, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;\n\t} else if (stringValue == \"absorbpercentmagic\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f395199bd0026a87e745a31a70b280114761efa2210f6c7445b9a436cbcf8b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 569, + "startColumn": 69, + "charOffset": 26216, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 567, + "startColumn": 69, + "charOffset": 25998, + "charLength": 5, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;\n\t} else if (stringValue == \"absorbpercentmagic\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5dc62a76c1da747e0a99b59522b7c985d81458f490fdf039daa253b6cf34e6da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 570, + "startColumn": 3, + "charOffset": 26225, + "charLength": 9, + "snippet": { + "text": "abilities" + } + }, + "contextRegion": { + "startLine": 568, + "startColumn": 3, + "charOffset": 26074, + "charLength": 9, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;\n\t} else if (stringValue == \"absorbpercentmagic\") {\n\t\tint16_t value = pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8baef2a072583fb5329ae76ec65d5235b2d8b215a6b511e4a17f95e463d52d38" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 570, + "startColumn": 67, + "charOffset": 26289, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 568, + "startColumn": 67, + "charOffset": 26074, + "charLength": 5, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;\n\t} else if (stringValue == \"absorbpercentmagic\") {\n\t\tint16_t value = pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dde65ff9ecae857bbb459251efba836e5a57a25decd54914cf5e67afa327dd7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 572, + "startColumn": 3, + "charOffset": 26349, + "charLength": 7, + "snippet": { + "text": "int16_t" + } + }, + "contextRegion": { + "startLine": 570, + "startColumn": 3, + "charOffset": 26223, + "charLength": 7, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;\n\t} else if (stringValue == \"absorbpercentmagic\") {\n\t\tint16_t value = pugi::cast(valueAttribute.value());\n\t\tAbilities &abilities = itemType.getAbilities();\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd5da4717bf1f6f4d31f15514a446176b6af2c6a37757d04dd1677aeac3fab82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 574, + "startColumn": 3, + "charOffset": 26462, + "charLength": 9, + "snippet": { + "text": "abilities" + } + }, + "contextRegion": { + "startLine": 572, + "startColumn": 3, + "charOffset": 26347, + "charLength": 9, + "snippet": { + "text": "\t\tint16_t value = pugi::cast(valueAttribute.value());\n\t\tAbilities &abilities = itemType.getAbilities();\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc2727ed91dca7680cc16f1ed650e4ac1654ed88b922b622e16b31a713554451" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 574, + "startColumn": 70, + "charOffset": 26529, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 572, + "startColumn": 70, + "charOffset": 26347, + "charLength": 5, + "snippet": { + "text": "\t\tint16_t value = pugi::cast(valueAttribute.value());\n\t\tAbilities &abilities = itemType.getAbilities();\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f519b4838479c61de0eebd0f460fadd29f0993aedfa114a23046e5496a667d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 575, + "startColumn": 3, + "charOffset": 26538, + "charLength": 9, + "snippet": { + "text": "abilities" + } + }, + "contextRegion": { + "startLine": 573, + "startColumn": 3, + "charOffset": 26410, + "charLength": 9, + "snippet": { + "text": "\t\tAbilities &abilities = itemType.getAbilities();\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28c9660a5e5a66fd88889a7b4079caf82d6fd98ec362840842709517f97f9179" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 575, + "startColumn": 68, + "charOffset": 26603, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 573, + "startColumn": 68, + "charOffset": 26410, + "charLength": 5, + "snippet": { + "text": "\t\tAbilities &abilities = itemType.getAbilities();\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df29946b0b42f186dc6712051ccab54a84934a2991321f6f252b4b81e5b9674c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 576, + "startColumn": 3, + "charOffset": 26612, + "charLength": 9, + "snippet": { + "text": "abilities" + } + }, + "contextRegion": { + "startLine": 574, + "startColumn": 3, + "charOffset": 26460, + "charLength": 9, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += value;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a287b67f1aff775ff3d52fb09812fd709a1b2666273c9d7f0c74ca859393775" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 576, + "startColumn": 69, + "charOffset": 26678, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 574, + "startColumn": 69, + "charOffset": 26460, + "charLength": 5, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += value;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "edacac7ce4b88d5f4d33ae45c30ef98f306112eab10f5651e0c3abc6f51c0e8b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 577, + "startColumn": 3, + "charOffset": 26687, + "charLength": 9, + "snippet": { + "text": "abilities" + } + }, + "contextRegion": { + "startLine": 575, + "startColumn": 3, + "charOffset": 26536, + "charLength": 9, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += value;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44624830f492d00d7c6dc75268bfe0882fac10599b33241ad1ddb3ffde80cdab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 577, + "startColumn": 67, + "charOffset": 26751, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 575, + "startColumn": 67, + "charOffset": 26536, + "charLength": 5, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += value;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f41abf9afde589d49c3bdee5272be1cd6271ffc8bbfc05cd0a70b1385a37155" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 578, + "startColumn": 3, + "charOffset": 26760, + "charLength": 9, + "snippet": { + "text": "abilities" + } + }, + "contextRegion": { + "startLine": 576, + "startColumn": 3, + "charOffset": 26610, + "charLength": 9, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += value;\n\t} else if (stringValue == \"absorbpercentenergy\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17943ddb011bb9e1926be7a5aeb13a0825cb3247810d17eaef7a2a43ab0d054d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 578, + "startColumn": 68, + "charOffset": 26825, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 576, + "startColumn": 68, + "charOffset": 26610, + "charLength": 5, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += value;\n\t} else if (stringValue == \"absorbpercentenergy\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1bdb8854952d310c2cc199e21728db9be53f8da12e5ee5670f09d9c796f64e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 579, + "startColumn": 3, + "charOffset": 26834, + "charLength": 9, + "snippet": { + "text": "abilities" + } + }, + "contextRegion": { + "startLine": 577, + "startColumn": 3, + "charOffset": 26685, + "charLength": 9, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += value;\n\t} else if (stringValue == \"absorbpercentenergy\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "192a4f7cf9f231c7fdbce22ee2d8806a85c6eb865483426bf3f5555345960ad6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 579, + "startColumn": 69, + "charOffset": 26900, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 577, + "startColumn": 69, + "charOffset": 26685, + "charLength": 5, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += value;\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += value;\n\t} else if (stringValue == \"absorbpercentenergy\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "139fb8acbf81f4d5f8262e43a6542e2643a5f3464612f70fe7623831cda7f52b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 581, + "startColumn": 3, + "charOffset": 26961, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 579, + "startColumn": 3, + "charOffset": 26832, + "charLength": 8, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += value;\n\t} else if (stringValue == \"absorbpercentenergy\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentfire\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de39d9ac7f35b6863262d306d0e9c76012a6cebc914c333aba19b80db1743b7b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 581, + "startColumn": 84, + "charOffset": 27042, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 579, + "startColumn": 84, + "charOffset": 26832, + "charLength": 4, + "snippet": { + "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += value;\n\t} else if (stringValue == \"absorbpercentenergy\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentfire\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dce56d6d609bd74f63cce0eeab18967d8b2a0fad6c636cc272b933e185e34b93" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 583, + "startColumn": 3, + "charOffset": 27139, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 581, + "startColumn": 3, + "charOffset": 26959, + "charLength": 8, + "snippet": { + "text": "\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentfire\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentpoison\" || stringValue == \"absorbpercentearth\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0929b5cd8e7bab794e9abebd14a9e518e2011704e2498d80e079becfe45032b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 583, + "startColumn": 82, + "charOffset": 27218, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 581, + "startColumn": 82, + "charOffset": 26959, + "charLength": 4, + "snippet": { + "text": "\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentfire\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentpoison\" || stringValue == \"absorbpercentearth\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56542459cf2d5803e4dddc3b8879ccee29da58838d1568ae3d78d49d8d631954" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 585, + "startColumn": 3, + "charOffset": 27356, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 583, + "startColumn": 3, + "charOffset": 27137, + "charLength": 8, + "snippet": { + "text": "\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentpoison\" || stringValue == \"absorbpercentearth\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentice\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34484d49bff72e6237773ded31847840be5dcfb0a5349b66efd29452f210b25c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 585, + "startColumn": 83, + "charOffset": 27436, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 583, + "startColumn": 83, + "charOffset": 27137, + "charLength": 4, + "snippet": { + "text": "\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentpoison\" || stringValue == \"absorbpercentearth\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentice\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e786996f2ddf9755f7c9fd9a64aa156efa871076f47caf3c5aa989266298d78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 587, + "startColumn": 3, + "charOffset": 27532, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 585, + "startColumn": 3, + "charOffset": 27354, + "charLength": 8, + "snippet": { + "text": "\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentice\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentholy\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58f9c95bfc2788628f0fa30d0e6a58031e76a819b51af0daa8c6489892afd56e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 587, + "startColumn": 81, + "charOffset": 27610, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 585, + "startColumn": 81, + "charOffset": 27354, + "charLength": 4, + "snippet": { + "text": "\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentice\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentholy\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61fa1407a64141390cd329afbb188bf895a2cc031605682bdadbb8c2eb272810" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 589, + "startColumn": 3, + "charOffset": 27707, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 587, + "startColumn": 3, + "charOffset": 27530, + "charLength": 8, + "snippet": { + "text": "\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentholy\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentdeath\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6d73b1f202add4382285fb8f6ec17c3faf4c7eddb081a497f0fafd8354ac81a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 589, + "startColumn": 82, + "charOffset": 27786, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 587, + "startColumn": 82, + "charOffset": 27530, + "charLength": 4, + "snippet": { + "text": "\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentholy\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentdeath\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0efb0b7bf90a8a72cdc2121950dd62ab8c4886169304bf2d33189312f11ac055" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 591, + "startColumn": 3, + "charOffset": 27884, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 589, + "startColumn": 3, + "charOffset": 27705, + "charLength": 8, + "snippet": { + "text": "\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentdeath\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentlifedrain\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_LIFEDRAIN)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "087499b500a71e8f42ae2a23badf1a58525cb80615480355a58df7e5dffc5a24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 591, + "startColumn": 83, + "charOffset": 27964, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 589, + "startColumn": 83, + "charOffset": 27705, + "charLength": 4, + "snippet": { + "text": "\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentdeath\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentlifedrain\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_LIFEDRAIN)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a0b7000c5ad8190757769fd1541758ba5acf29e93a756ffa9a524200104fe5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 593, + "startColumn": 3, + "charOffset": 28066, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 591, + "startColumn": 3, + "charOffset": 27882, + "charLength": 8, + "snippet": { + "text": "\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentlifedrain\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_LIFEDRAIN)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentmanadrain\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_MANADRAIN)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b10fa9f37e570aa4eb9d77746dca1e2ee72b581824af003afd032fce061aa460" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 593, + "startColumn": 81, + "charOffset": 28144, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 591, + "startColumn": 81, + "charOffset": 27882, + "charLength": 4, + "snippet": { + "text": "\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentlifedrain\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_LIFEDRAIN)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentmanadrain\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_MANADRAIN)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b4030c88e90990efda6adab8335abf3f070470752dc073a96ebcd1445b5032c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 595, + "startColumn": 3, + "charOffset": 28246, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 593, + "startColumn": 3, + "charOffset": 28064, + "charLength": 8, + "snippet": { + "text": "\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_LIFEDRAIN)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentmanadrain\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_MANADRAIN)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentdrown\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_DROWNDAMAGE)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87b7608123af6ab1aa231aadebb3a1297b9533f3b948bf8cd5a853f83959efee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 595, + "startColumn": 81, + "charOffset": 28324, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 593, + "startColumn": 81, + "charOffset": 28064, + "charLength": 4, + "snippet": { + "text": "\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_LIFEDRAIN)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentmanadrain\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_MANADRAIN)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentdrown\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_DROWNDAMAGE)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68f72ab01e8ebc87ae2b526bda4fb796bb073298067019e26a93e3e5acb8fe62" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 597, + "startColumn": 3, + "charOffset": 28422, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 595, + "startColumn": 3, + "charOffset": 28244, + "charLength": 8, + "snippet": { + "text": "\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_MANADRAIN)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentdrown\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_DROWNDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentphysical\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b892c536c04786118c64f4e37eda7907004794732ed521c4d07442f61e88707f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 597, + "startColumn": 83, + "charOffset": 28502, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 595, + "startColumn": 83, + "charOffset": 28244, + "charLength": 4, + "snippet": { + "text": "\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_MANADRAIN)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentdrown\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_DROWNDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentphysical\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b24615906ac62e65a654b87fa69b9f9bb7bd96ac8ab34829f52e7416ca1a641" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 599, + "startColumn": 3, + "charOffset": 28603, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 597, + "startColumn": 3, + "charOffset": 28420, + "charLength": 8, + "snippet": { + "text": "\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_DROWNDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentphysical\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercenthealing\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_HEALING)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9761936d8460d60877fe4fabf3878c7007a30efc96a54666230d16862393fd7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 599, + "startColumn": 86, + "charOffset": 28686, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 597, + "startColumn": 86, + "charOffset": 28420, + "charLength": 4, + "snippet": { + "text": "\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_DROWNDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercentphysical\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercenthealing\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_HEALING)] += pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55113082a386b9aaa1484d57c5c73ac6e11d6a02e6b1d7da834171238844fbf4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 601, + "startColumn": 3, + "charOffset": 28786, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 599, + "startColumn": 3, + "charOffset": 28601, + "charLength": 8, + "snippet": { + "text": "\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercenthealing\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_HEALING)] += pugi::cast(valueAttribute.value());\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "476c298b4a4c048d6f965e2df0195ad159a98b5a9b6455af204f3e39dd77c122" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 601, + "startColumn": 79, + "charOffset": 28862, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 599, + "startColumn": 79, + "charOffset": 28601, + "charLength": 4, + "snippet": { + "text": "\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"absorbpercenthealing\") {\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_HEALING)] += pugi::cast(valueAttribute.value());\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ace186bf13384794d065a2a116ea3c5c2966efa931de7903df005836d88d5c65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 606, + "startColumn": 14, + "charOffset": 29050, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 604, + "startColumn": 14, + "charOffset": 28912, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseSupressDrunk(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (valueAttribute.as_bool()) {\n\t\tConditionType_t conditionType = CONDITION_NONE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5599f56f22c82c655bbc1c2afe0f56d3a447a0eaabdcb3edaf39772474361fd7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 609, + "startColumn": 3, + "charOffset": 29162, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 607, + "startColumn": 3, + "charOffset": 29077, + "charLength": 2, + "snippet": { + "text": "\tif (valueAttribute.as_bool()) {\n\t\tConditionType_t conditionType = CONDITION_NONE;\n\t\tif (stringValue == \"suppressdrunk\") {\n\t\t\tconditionType = CONDITION_DRUNK;\n\t\t} else if (stringValue == \"suppressenergy\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94ffe29dbdc51d1ff93ad89a64ee5055fce2fca2d40bf37a9d336ce8f49f3963" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 629, + "startColumn": 3, + "charOffset": 29923, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 627, + "startColumn": 3, + "charOffset": 29916, + "charLength": 8, + "snippet": { + "text": "\t\t}\n\n\t\titemType.getAbilities().conditionSuppressions[conditionType] = conditionType;\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bdfcff9254b6bf458103a2fe7759245e397b64a498a9fa935a4dd2429c86c019" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 640, + "startColumn": 4, + "charOffset": 30441, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 638, + "startColumn": 4, + "charOffset": 30350, + "charLength": 4, + "snippet": { + "text": "\t\tconditionType = CONDITION_FIRE;\n\t\treturn std::make_tuple(conditionId, conditionType);\n\t} else if (lowerStringValue == \"energy\") {\n\t\tconditionType = CONDITION_ENERGY;\n\t\treturn std::make_tuple(conditionId, conditionType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d70e37d87f766cd99bda61b745d3028ba34598931b5b72e5ef2963635bdfe0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 662, + "startColumn": 4, + "charOffset": 31396, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 660, + "startColumn": 4, + "charOffset": 31330, + "charLength": 4, + "snippet": { + "text": "\tif (lowerStringValue == \"fire\") {\n\t\treturn COMBAT_FIREDAMAGE;\n\t} else if (lowerStringValue == \"energy\") {\n\t\treturn COMBAT_ENERGYDAMAGE;\n\t} else if (lowerStringValue == \"poison\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "599e635948d7982f64c97cf2b1f4d6d15f9c64b1232d63912e6f8db40153a6d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'conditionDamage' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 676, + "startColumn": 73, + "charOffset": 31895, + "charLength": 15, + "snippet": { + "text": "conditionDamage" + } + }, + "contextRegion": { + "startLine": 674, + "startColumn": 73, + "charOffset": 31820, + "charLength": 15, + "snippet": { + "text": "}\n\nvoid ItemParse::parseFieldCombatDamage(std::shared_ptr conditionDamage, std::string stringValue, pugi::xml_node attributeNode) {\n\tuint32_t combatTicks = 0;\n\tint32_t combatDamage = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30884b66dbeea051a14b68d758587255022ce5dc55dc13ba2e15e995e7db0208" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 684, + "startColumn": 7, + "charOffset": 32215, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 682, + "startColumn": 7, + "charOffset": 32076, + "charLength": 1, + "snippet": { + "text": "\tfor (auto subAttributeNode : attributeNode.children()) {\n\t\tpugi::xml_attribute subKeyAttribute = subAttributeNode.attribute(\"key\");\n\t\tif (!subKeyAttribute) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36beda94e7c75c188e805af16f83fdfdbf472447ef7ed81edb7de3ec77114b59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 689, + "startColumn": 7, + "charOffset": 32338, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 687, + "startColumn": 7, + "charOffset": 32252, + "charLength": 1, + "snippet": { + "text": "\n\t\tpugi::xml_attribute subValueAttribute = subAttributeNode.attribute(\"value\");\n\t\tif (!subValueAttribute) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a71753f2c95b9a55d2c729320d61ff4c89a7bfc9815d8a845101d40910e2414" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 694, + "startColumn": 3, + "charOffset": 32444, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 692, + "startColumn": 3, + "charOffset": 32377, + "charLength": 2, + "snippet": { + "text": "\n\t\tstringValue = asLowerCaseString(subKeyAttribute.as_string());\n\t\tif (stringValue == \"ticks\") {\n\t\t\tcombatTicks = pugi::cast(subValueAttribute.value());\n\t\t} else if (stringValue == \"count\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e76fc44d8a9e9c2fd32bcdd501f18dbb45fc3dee9d800f12b4dfe4d01702d17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 703, + "startColumn": 22, + "charOffset": 32947, + "charLength": 9, + "snippet": { + "text": "addDamage" + } + }, + "contextRegion": { + "startLine": 701, + "startColumn": 22, + "charOffset": 32832, + "charLength": 9, + "snippet": { + "text": "\t\t\tcombatDamage = -pugi::cast(subValueAttribute.value());\n\t\t\tif (combatStart == 0) {\n\t\t\t\tconditionDamage->addDamage(combatCount, combatTicks, combatDamage);\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d6ab24b4ab3a5f72bc5949ca63403dfed1f7b19c3c8eec46dc60af447e129fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 703, + "startColumn": 45, + "charOffset": 32970, + "charLength": 11, + "snippet": { + "text": "combatTicks" + } + }, + "contextRegion": { + "startLine": 701, + "startColumn": 45, + "charOffset": 32832, + "charLength": 11, + "snippet": { + "text": "\t\t\tcombatDamage = -pugi::cast(subValueAttribute.value());\n\t\t\tif (combatStart == 0) {\n\t\t\t\tconditionDamage->addDamage(combatCount, combatTicks, combatDamage);\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3db391e829a8185e964cd55e5b94173d78f97d18e2d32dc7c0f969ece7f59d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 708, + "startColumn": 4, + "charOffset": 33120, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 706, + "startColumn": 4, + "charOffset": 33004, + "charLength": 3, + "snippet": { + "text": "\t\t\tstd::list damageList;\n\t\t\tConditionDamage::generateDamageList(combatDamage, combatStart, damageList);\n\t\t\tfor (int32_t damageValue : damageList) {\n\t\t\t\tconditionDamage->addDamage(1, combatTicks, -damageValue);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9340d460488354fec6e9b0f8162eeb9f9d528578ddc4a38a05f97dcdc4d759fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 709, + "startColumn": 22, + "charOffset": 33182, + "charLength": 9, + "snippet": { + "text": "addDamage" + } + }, + "contextRegion": { + "startLine": 707, + "startColumn": 22, + "charOffset": 33038, + "charLength": 9, + "snippet": { + "text": "\t\t\tConditionDamage::generateDamageList(combatDamage, combatStart, damageList);\n\t\t\tfor (int32_t damageValue : damageList) {\n\t\t\t\tconditionDamage->addDamage(1, combatTicks, -damageValue);\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eed0c02d83efde9498c7925f99297a3c08c72fa93b96de1faf7f068f1a3f2c01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 709, + "startColumn": 35, + "charOffset": 33195, + "charLength": 11, + "snippet": { + "text": "combatTicks" + } + }, + "contextRegion": { + "startLine": 707, + "startColumn": 35, + "charOffset": 33038, + "charLength": 11, + "snippet": { + "text": "\t\t\tConditionDamage::generateDamageList(combatDamage, combatStart, damageList);\n\t\t\tfor (int32_t damageValue : damageList) {\n\t\t\t\tconditionDamage->addDamage(1, combatTicks, -damageValue);\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f03b871e8731fd1b938547ebc371752c15366fe97f850141ae3d9aba6043bde3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 737, + "startColumn": 21, + "charOffset": 34092, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 735, + "startColumn": 21, + "charOffset": 33999, + "charLength": 8, + "snippet": { + "text": "\t\t\tparseFieldCombatDamage(conditionDamage, tmpStrValue, attributeNode);\n\n\t\t\tconditionDamage->setParam(CONDITION_PARAM_FIELD, 1);\n\n\t\t\tif (conditionDamage->getTotalDamage() > 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a9245ca0c8e5cba8da70e58df07dbf9a4f3cb8faa547b0b16f6602305de18bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 740, + "startColumn": 22, + "charOffset": 34198, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 738, + "startColumn": 22, + "charOffset": 34128, + "charLength": 8, + "snippet": { + "text": "\n\t\t\tif (conditionDamage->getTotalDamage() > 0) {\n\t\t\t\tconditionDamage->setParam(CONDITION_PARAM_FORCEUPDATE, 1);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "900229121ed39b6a46100dfd7802bf17e58afbd431f9cfcbeed6c9e7f80cc4ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 747, + "startColumn": 14, + "charOffset": 34391, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 745, + "startColumn": 14, + "charOffset": 34254, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseReplaceable(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"replaceable\") {\n\t\titemType.replaceable = valueAttribute.as_bool();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2376969e6643375241d2c6cba41d3b92d53f576c2849d285b68316abf357170c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 754, + "startColumn": 14, + "charOffset": 34646, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 752, + "startColumn": 14, + "charOffset": 34511, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseLevelDoor(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"leveldoor\") {\n\t\titemType.levelDoor = pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19f5f49bdd28da218b6e931da1a1f7026c15e52939a9cda4c4bb5e4ab34e7636" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 761, + "startColumn": 14, + "charOffset": 34912, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 759, + "startColumn": 14, + "charOffset": 34782, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseBeds(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"partnerdirection\") {\n\t\titemType.bedPartnerDir = getDirection(valueAttribute.as_string());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ff35121b6baca9b42061982bc8708a5e7d7b30d006a9b8a6fbbd156d09303dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 766, + "startColumn": 2, + "charOffset": 35055, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 764, + "startColumn": 2, + "charOffset": 35050, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (stringValue == \"maletransformto\") {\n\t\tuint16_t valueMale = pugi::cast(valueAttribute.value());\n\t\tItemType &other = Item::items.getItemType(valueMale);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a3b97968a91531228d7916d429e2b3ee27b8c7c6fceec651748bb1a2c7c4417" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 767, + "startColumn": 3, + "charOffset": 35097, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 765, + "startColumn": 3, + "charOffset": 35053, + "charLength": 8, + "snippet": { + "text": "\n\tif (stringValue == \"maletransformto\") {\n\t\tuint16_t valueMale = pugi::cast(valueAttribute.value());\n\t\tItemType &other = Item::items.getItemType(valueMale);\n\t\titemType.transformToOnUse[PLAYERSEX_MALE] = valueMale;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a05a57031ae615729722f00312f557af80eb242438d7528c3d8a20f1419ecd0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 778, + "startColumn": 3, + "charOffset": 35532, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 776, + "startColumn": 3, + "charOffset": 35476, + "charLength": 8, + "snippet": { + "text": "\t\t}\n\t} else if (stringValue == \"femaletransformto\") {\n\t\tuint16_t valueFemale = pugi::cast(valueAttribute.value());\n\t\tItemType &other = Item::items.getItemType(valueFemale);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d83e4936a70e171d5591d17951a8efe948246c1708f2fb1491fff13477799880" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 792, + "startColumn": 2, + "charOffset": 35928, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 790, + "startColumn": 2, + "charOffset": 35923, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (stringValue == \"bedpart\") {\n\t\titemType.bedPart = getBedPart(valueAttribute.as_string());\n\t} else if (stringValue == \"bedpartof\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e461d393f83a081e5adc706d38b803ac45da838891190a49723b54985b9ca681" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 800, + "startColumn": 14, + "charOffset": 36270, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 798, + "startColumn": 14, + "charOffset": 36137, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseElement(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"elementice\") {\n\t\tAbilities &abilities = itemType.getAbilities();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32a62dbfc06076d211dc98d06b02539e9d852045356970101944dd88794bcf32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 801, + "startColumn": 2, + "charOffset": 36298, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 799, + "startColumn": 2, + "charOffset": 36138, + "charLength": 2, + "snippet": { + "text": "void ItemParse::parseElement(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"elementice\") {\n\t\tAbilities &abilities = itemType.getAbilities();\n\t\tabilities.elementDamage = pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9827d128f41ecf3c6c7d4084b3b25d7d4d10ca519bd6246bb08a58a661a7871" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 829, + "startColumn": 14, + "charOffset": 37709, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 827, + "startColumn": 14, + "charOffset": 37579, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseWalk(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"walkstack\") {\n\t\titemType.walkStack = valueAttribute.as_bool();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e98270a59d3062646039640fc150402351256db061ecc9c84d3636c3a233d221" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 830, + "startColumn": 2, + "charOffset": 37737, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 828, + "startColumn": 2, + "charOffset": 37580, + "charLength": 2, + "snippet": { + "text": "void ItemParse::parseWalk(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"walkstack\") {\n\t\titemType.walkStack = valueAttribute.as_bool();\n\t} else if (stringValue == \"blocking\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07fd893ad410c4b0ba11edbc730526b64e5125f9188e51133cc4d065c5254bb4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 838, + "startColumn": 14, + "charOffset": 38059, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 836, + "startColumn": 14, + "charOffset": 37916, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseAllowDistanceRead(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"allowdistread\") {\n\t\titemType.allowDistRead = booleanString(valueAttribute.as_string());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ea2b175a7d2bcae72becb8ca850d8946d7243e02295b4de5a1698ce4e20c570" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 850, + "startColumn": 2, + "charOffset": 38477, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 848, + "startColumn": 2, + "charOffset": 38404, + "charLength": 3, + "snippet": { + "text": "\titemType.imbuementSlot = pugi::cast(valueAttribute.value());\n\n\tfor (auto subAttributeNode : attributeNode.children()) {\n\t\tpugi::xml_attribute subKeyAttribute = subAttributeNode.attribute(\"key\");\n\t\tif (!subKeyAttribute) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b60c27d8ef964cf55ca04e097ab8265d73a08bd61544a368fbd33672733d6382" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 852, + "startColumn": 7, + "charOffset": 38615, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 850, + "startColumn": 7, + "charOffset": 38476, + "charLength": 1, + "snippet": { + "text": "\tfor (auto subAttributeNode : attributeNode.children()) {\n\t\tpugi::xml_attribute subKeyAttribute = subAttributeNode.attribute(\"key\");\n\t\tif (!subKeyAttribute) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36beda94e7c75c188e805af16f83fdfdbf472447ef7ed81edb7de3ec77114b59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 857, + "startColumn": 7, + "charOffset": 38738, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 855, + "startColumn": 7, + "charOffset": 38652, + "charLength": 1, + "snippet": { + "text": "\n\t\tpugi::xml_attribute subValueAttribute = subAttributeNode.attribute(\"value\");\n\t\tif (!subValueAttribute) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a71753f2c95b9a55d2c729320d61ff4c89a7bfc9815d8a845101d40910e2414" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'parseAugment' has cognitive complexity of 37 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 874, + "startColumn": 17, + "charOffset": 39313, + "charLength": 12, + "snippet": { + "text": "parseAugment" + } + }, + "contextRegion": { + "startLine": 872, + "startColumn": 17, + "charOffset": 39294, + "charLength": 12, + "snippet": { + "text": "}\n\nvoid ItemParse::parseAugment(const std::string &tmpStrValue, pugi::xml_node attributeNode, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tif (tmpStrValue != \"augments\") {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "011e356072c02eb52b4702361c6c0845579663eb8925d09def38984bc0237bfa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 881, + "startColumn": 3, + "charOffset": 39598, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 879, + "startColumn": 3, + "charOffset": 39494, + "charLength": 3, + "snippet": { + "text": "\t// Check if the augments value is 1 or 0 (1 = enable - 0 = disable)\n\tif (valueAttribute.as_bool()) {\n\t\tfor (const auto subAttributeNode : attributeNode.children()) {\n\t\t\tconst pugi::xml_attribute subKeyAttribute = subAttributeNode.attribute(\"key\");\n\t\t\tif (!subKeyAttribute) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f61b458fc7ab292b3594e6d0eea24dcd83ce348e109b8b53c6c432a4cbe02726" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 883, + "startColumn": 8, + "charOffset": 39750, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 881, + "startColumn": 8, + "charOffset": 39596, + "charLength": 1, + "snippet": { + "text": "\t\tfor (const auto subAttributeNode : attributeNode.children()) {\n\t\t\tconst pugi::xml_attribute subKeyAttribute = subAttributeNode.attribute(\"key\");\n\t\t\tif (!subKeyAttribute) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68d4f33cba0483fa8caabd2f5ba7bad2714dd43fcb02594c4cba780d7b6fc76b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 888, + "startColumn": 8, + "charOffset": 39883, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 886, + "startColumn": 8, + "charOffset": 39789, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tconst pugi::xml_attribute subValueAttribute = subAttributeNode.attribute(\"value\");\n\t\t\tif (!subValueAttribute) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e91d689d3add1ab41a0d8c136bbde8dc78ced866d59050a81693f976af39e2d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 908, + "startColumn": 5, + "charOffset": 40836, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 906, + "startColumn": 5, + "charOffset": 40640, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tconst auto augmentName = asLowerCaseString(subKeyAttribute.as_string());\n\t\t\t\tconst pugi::xml_object_range augmentValueAttributeNode = subAttributeNode.children();\n\t\t\t\tif (!augmentValueAttributeNode.empty()) {\n\t\t\t\t\tconst pugi::xml_node augmentValueNode = *augmentValueAttributeNode.begin();\n\t\t\t\t\tconst pugi::xml_attribute augmentValueAttribute = augmentValueNode.attribute(\"value\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f0f52f4305ab6c832136c30108731e1113b597bf45d778242ecb7f86cceff8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 911, + "startColumn": 21, + "charOffset": 41071, + "charLength": 21, + "snippet": { + "text": "augmentValueAttribute" + } + }, + "contextRegion": { + "startLine": 909, + "startColumn": 21, + "charOffset": 40878, + "charLength": 21, + "snippet": { + "text": "\t\t\t\t\tconst pugi::xml_node augmentValueNode = *augmentValueAttributeNode.begin();\n\t\t\t\t\tconst pugi::xml_attribute augmentValueAttribute = augmentValueNode.attribute(\"value\");\n\t\t\t\t\taugmentValue = augmentValueAttribute ? pugi::cast(augmentValueAttribute.value()) : augmentValue;\n\t\t\t\t} else if (!hasValueDescrition) {\n\t\t\t\t\tg_logger().warn(\"[{}] - Item '{}' has an augment '{}' without a value\", __FUNCTION__, itemType.name, augmentName);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5fbe3a88c62b49f7e2d239331b98386dc90317effb189b39ab6828fa66facbb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 911, + "startColumn": 21, + "charOffset": 41071, + "charLength": 21, + "snippet": { + "text": "augmentValueAttribute" + } + }, + "contextRegion": { + "startLine": 909, + "startColumn": 21, + "charOffset": 40878, + "charLength": 21, + "snippet": { + "text": "\t\t\t\t\tconst pugi::xml_node augmentValueNode = *augmentValueAttributeNode.begin();\n\t\t\t\t\tconst pugi::xml_attribute augmentValueAttribute = augmentValueNode.attribute(\"value\");\n\t\t\t\t\taugmentValue = augmentValueAttribute ? pugi::cast(augmentValueAttribute.value()) : augmentValue;\n\t\t\t\t} else if (!hasValueDescrition) {\n\t\t\t\t\tg_logger().warn(\"[{}] - Item '{}' has an augment '{}' without a value\", __FUNCTION__, itemType.name, augmentName);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21b6c9cba6a98aab8de49525b8f96a005989676801de9e857331a99b268aff86" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 927, + "startColumn": 14, + "charOffset": 41696, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 925, + "startColumn": 14, + "charOffset": 41561, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseStackSize(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tif (stringValue == \"stacksize\") {\n\t\tauto stackSize = pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8c2c0b8540eff8ac112dcd39fa09b93cb7bbabab311fd6b6f1c6cf7d61b648d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "255 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 930, + "startColumn": 19, + "charOffset": 41841, + "charLength": 3, + "snippet": { + "text": "255" + } + }, + "contextRegion": { + "startLine": 928, + "startColumn": 19, + "charOffset": 41723, + "charLength": 3, + "snippet": { + "text": "\tif (stringValue == \"stacksize\") {\n\t\tauto stackSize = pugi::cast(valueAttribute.value());\n\t\tif (stackSize > 255) {\n\t\t\tstackSize = 255;\n\t\t\tg_logger().warn(\"[{}] Invalid stack size value: {}. Stack size must be between 1 and 255.\", __FUNCTION__, stackSize);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe6e5b21075a71d6f40a611abe7e02750fc72d6a2a3b93a20c3ac2b5c1912403" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "255 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 931, + "startColumn": 16, + "charOffset": 41863, + "charLength": 3, + "snippet": { + "text": "255" + } + }, + "contextRegion": { + "startLine": 929, + "startColumn": 16, + "charOffset": 41758, + "charLength": 3, + "snippet": { + "text": "\t\tauto stackSize = pugi::cast(valueAttribute.value());\n\t\tif (stackSize > 255) {\n\t\t\tstackSize = 255;\n\t\t\tg_logger().warn(\"[{}] Invalid stack size value: {}. Stack size must be between 1 and 255.\", __FUNCTION__, stackSize);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7ebcc77e851e2940fe5f5f7b7864ed2731dcd35897431c8c83d97666e8e20c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 939, + "startColumn": 14, + "charOffset": 42206, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 937, + "startColumn": 14, + "charOffset": 42054, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseSpecializedMagicLevelPoint(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tAbilities &abilities = itemType.getAbilities();\n\tif (stringValue == \"deathmagiclevelpoints\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ecee700b55b765b1c9c79ff235dd2f9757392b8b2d4065c5ae97ce90559d056e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 941, + "startColumn": 2, + "charOffset": 42283, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 939, + "startColumn": 2, + "charOffset": 42193, + "charLength": 2, + "snippet": { + "text": "\tstd::string stringValue = tmpStrValue;\n\tAbilities &abilities = itemType.getAbilities();\n\tif (stringValue == \"deathmagiclevelpoints\") {\n\t\tabilities.specializedMagicLevel[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += pugi::cast(valueAttribute.value());\n\t\tabilities.elementType = COMBAT_DEATHDAMAGE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bef1e9b5643b92f2f896baa5a9e780ab76ea19053ef90f5a81a8d3772968d738" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 942, + "startColumn": 3, + "charOffset": 42331, + "charLength": 9, + "snippet": { + "text": "abilities" + } + }, + "contextRegion": { + "startLine": 940, + "startColumn": 3, + "charOffset": 42233, + "charLength": 9, + "snippet": { + "text": "\tAbilities &abilities = itemType.getAbilities();\n\tif (stringValue == \"deathmagiclevelpoints\") {\n\t\tabilities.specializedMagicLevel[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += pugi::cast(valueAttribute.value());\n\t\tabilities.elementType = COMBAT_DEATHDAMAGE;\n\t} else if (stringValue == \"energymagiclevelpoints\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25aab0aca7df0095f24d637e66a961e6615cb9abfc0e3c59e9ec95f26c05185f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 945, + "startColumn": 3, + "charOffset": 42553, + "charLength": 9, + "snippet": { + "text": "abilities" + } + }, + "contextRegion": { + "startLine": 943, + "startColumn": 3, + "charOffset": 42450, + "charLength": 9, + "snippet": { + "text": "\t\tabilities.elementType = COMBAT_DEATHDAMAGE;\n\t} else if (stringValue == \"energymagiclevelpoints\") {\n\t\tabilities.specializedMagicLevel[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());\n\t\tabilities.elementType = COMBAT_ENERGYDAMAGE;\n\t} else if (stringValue == \"earthmagiclevelpoints\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d5dcf6f44fd748a0bea6cc1422c5c908f2934bc8245edcd0af63b1318b1b423" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 948, + "startColumn": 3, + "charOffset": 42776, + "charLength": 9, + "snippet": { + "text": "abilities" + } + }, + "contextRegion": { + "startLine": 946, + "startColumn": 3, + "charOffset": 42673, + "charLength": 9, + "snippet": { + "text": "\t\tabilities.elementType = COMBAT_ENERGYDAMAGE;\n\t} else if (stringValue == \"earthmagiclevelpoints\") {\n\t\tabilities.specializedMagicLevel[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += pugi::cast(valueAttribute.value());\n\t\tabilities.elementType = COMBAT_EARTHDAMAGE;\n\t} else if (stringValue == \"firemagiclevelpoints\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50f6c38bcafdf8f80bb0589e53f556ecf6384490d52311f1b16239e43659ddf4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 951, + "startColumn": 3, + "charOffset": 42996, + "charLength": 9, + "snippet": { + "text": "abilities" + } + }, + "contextRegion": { + "startLine": 949, + "startColumn": 3, + "charOffset": 42895, + "charLength": 9, + "snippet": { + "text": "\t\tabilities.elementType = COMBAT_EARTHDAMAGE;\n\t} else if (stringValue == \"firemagiclevelpoints\") {\n\t\tabilities.specializedMagicLevel[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\n\t\tabilities.elementType = COMBAT_FIREDAMAGE;\n\t} else if (stringValue == \"healingmagiclevelpoints\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a287b67f1aff775ff3d52fb09812fd709a1b2666273c9d7f0c74ca859393775" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 954, + "startColumn": 3, + "charOffset": 43217, + "charLength": 9, + "snippet": { + "text": "abilities" + } + }, + "contextRegion": { + "startLine": 952, + "startColumn": 3, + "charOffset": 43114, + "charLength": 9, + "snippet": { + "text": "\t\tabilities.elementType = COMBAT_FIREDAMAGE;\n\t} else if (stringValue == \"healingmagiclevelpoints\") {\n\t\tabilities.specializedMagicLevel[combatTypeToIndex(COMBAT_HEALING)] += pugi::cast(valueAttribute.value());\n\t\tabilities.elementType = COMBAT_HEALING;\n\t} else if (stringValue == \"holymagiclevelpoints\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8c1b78a0350948994cb3970f8ccea6a7322308595a51ff061681acb5a0cb2a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 957, + "startColumn": 3, + "charOffset": 43429, + "charLength": 9, + "snippet": { + "text": "abilities" + } + }, + "contextRegion": { + "startLine": 955, + "startColumn": 3, + "charOffset": 43332, + "charLength": 9, + "snippet": { + "text": "\t\tabilities.elementType = COMBAT_HEALING;\n\t} else if (stringValue == \"holymagiclevelpoints\") {\n\t\tabilities.specializedMagicLevel[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += pugi::cast(valueAttribute.value());\n\t\tabilities.elementType = COMBAT_HOLYDAMAGE;\n\t} else if (stringValue == \"icemagiclevelpoints\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a8ca78442f2b988d650e6140e804a52a0ffedbf26c37682add632d27b5a702e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 960, + "startColumn": 3, + "charOffset": 43646, + "charLength": 9, + "snippet": { + "text": "abilities" + } + }, + "contextRegion": { + "startLine": 958, + "startColumn": 3, + "charOffset": 43547, + "charLength": 9, + "snippet": { + "text": "\t\tabilities.elementType = COMBAT_HOLYDAMAGE;\n\t} else if (stringValue == \"icemagiclevelpoints\") {\n\t\tabilities.specializedMagicLevel[combatTypeToIndex(COMBAT_ICEDAMAGE)] += pugi::cast(valueAttribute.value());\n\t\tabilities.elementType = COMBAT_ICEDAMAGE;\n\t} else if (stringValue == \"physicalmagiclevelpoints\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90034160b86b8891d4f16bd651e7d1cd000bf6df094b1d4444133045c3c3c41a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 963, + "startColumn": 3, + "charOffset": 43866, + "charLength": 9, + "snippet": { + "text": "abilities" + } + }, + "contextRegion": { + "startLine": 961, + "startColumn": 3, + "charOffset": 43763, + "charLength": 9, + "snippet": { + "text": "\t\tabilities.elementType = COMBAT_ICEDAMAGE;\n\t} else if (stringValue == \"physicalmagiclevelpoints\") {\n\t\tabilities.specializedMagicLevel[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)] += pugi::cast(valueAttribute.value());\n\t\tabilities.elementType = COMBAT_PHYSICALDAMAGE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c78529817338f641c89d0e2afa2c543f30c835dea1cc348a34291ae4d4ecaf1c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 969, + "startColumn": 14, + "charOffset": 44187, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 967, + "startColumn": 14, + "charOffset": 44042, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseMagicShieldCapacity(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tAbilities &abilities = itemType.getAbilities();\n\tif (stringValue == \"magicshieldcapacitypercent\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41004af558cc862bd959b2cf4845fd668379d5fc60fc4ed5a91d52b32abc638d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 971, + "startColumn": 2, + "charOffset": 44264, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 969, + "startColumn": 2, + "charOffset": 44174, + "charLength": 2, + "snippet": { + "text": "\tstd::string stringValue = tmpStrValue;\n\tAbilities &abilities = itemType.getAbilities();\n\tif (stringValue == \"magicshieldcapacitypercent\") {\n\t\tabilities.magicShieldCapacityPercent += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"magicshieldcapacityflat\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bad66e45c810fb533c3fce96463f7609d0f80fd1c9cf386b0833754d7540f2ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 979, + "startColumn": 14, + "charOffset": 44683, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 977, + "startColumn": 14, + "charOffset": 44547, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parsePerfecShot(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tAbilities &abilities = itemType.getAbilities();\n\tif (stringValue == \"perfectshotdamage\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19f03a658bc496dd64e42ebd6dc84879ea562e8d83a524ef74137cccea88981e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 981, + "startColumn": 2, + "charOffset": 44760, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 979, + "startColumn": 2, + "charOffset": 44670, + "charLength": 2, + "snippet": { + "text": "\tstd::string stringValue = tmpStrValue;\n\tAbilities &abilities = itemType.getAbilities();\n\tif (stringValue == \"perfectshotdamage\") {\n\t\tabilities.perfectShotDamage = pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"perfectshotrange\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7ad553788d1e525cd863a4b78eedf81b22cfb15095ff46d8383b4dee0bcd592" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 984, + "startColumn": 32, + "charOffset": 44959, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 982, + "startColumn": 32, + "charOffset": 44802, + "charLength": 4, + "snippet": { + "text": "\t\tabilities.perfectShotDamage = pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"perfectshotrange\") {\n\t\tabilities.perfectShotRange = pugi::cast(valueAttribute.value());\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37bff17e5acb75daeaf0bdf5e389d831377aa71d3488d7bbb3a5e5fb08ce78c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 989, + "startColumn": 14, + "charOffset": 45148, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 987, + "startColumn": 14, + "charOffset": 45009, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseCleavePercent(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tAbilities &abilities = itemType.getAbilities();\n\tif (stringValue == \"cleavepercent\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "836e561c67bf28c9ce679639f79a32e2b80b537d3364955d0d22a9a23fc681b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "local copy 'stringValue' of the variable 'tmpStrValue' is never modified; consider avoiding the copy" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 997, + "startColumn": 14, + "charOffset": 45481, + "charLength": 11, + "snippet": { + "text": "stringValue" + } + }, + "contextRegion": { + "startLine": 995, + "startColumn": 14, + "charOffset": 45342, + "charLength": 11, + "snippet": { + "text": "\nvoid ItemParse::parseReflectDamage(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tstd::string stringValue = tmpStrValue;\n\tAbilities &abilities = itemType.getAbilities();\n\tif (stringValue == \"reflectdamage\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f7b069046aa417e53098c6332743cc1ec21cef6deaee1a21e6d40a7e94958aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 999, + "startColumn": 2, + "charOffset": 45558, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 997, + "startColumn": 2, + "charOffset": 45468, + "charLength": 2, + "snippet": { + "text": "\tstd::string stringValue = tmpStrValue;\n\tAbilities &abilities = itemType.getAbilities();\n\tif (stringValue == \"reflectdamage\") {\n\t\tabilities.reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"reflectpercentall\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7778d9ce321e139f0c9084ae80d0b781edb03900c9acfff90bf47dbc5e01c874" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1000, + "startColumn": 3, + "charOffset": 45598, + "charLength": 9, + "snippet": { + "text": "abilities" + } + }, + "contextRegion": { + "startLine": 998, + "startColumn": 3, + "charOffset": 45508, + "charLength": 9, + "snippet": { + "text": "\tAbilities &abilities = itemType.getAbilities();\n\tif (stringValue == \"reflectdamage\") {\n\t\tabilities.reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"reflectpercentall\") {\n\t\tint32_t value = pugi::cast(valueAttribute.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "203e4ae4f446921cb7d3a3b827ce5f7d708b1983db92763bb33949fd3e1182d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1002, + "startColumn": 3, + "charOffset": 45762, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 1000, + "startColumn": 3, + "charOffset": 45596, + "charLength": 7, + "snippet": { + "text": "\t\tabilities.reflectFlat[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)] += pugi::cast(valueAttribute.value());\n\t} else if (stringValue == \"reflectpercentall\") {\n\t\tint32_t value = pugi::cast(valueAttribute.value());\n\t\tstd::transform(std::begin(abilities.reflectPercent), std::end(abilities.reflectPercent), std::begin(abilities.reflectPercent), [&](const auto &i) {\n\t\t\treturn i + value;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2dfe599e095ea1d8b34c4182745d7c12db02cbcf64bbdc77010f1923587e1457" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1003, + "startColumn": 3, + "charOffset": 45825, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1001, + "startColumn": 3, + "charOffset": 45710, + "charLength": 3, + "snippet": { + "text": "\t} else if (stringValue == \"reflectpercentall\") {\n\t\tint32_t value = pugi::cast(valueAttribute.value());\n\t\tstd::transform(std::begin(abilities.reflectPercent), std::end(abilities.reflectPercent), std::begin(abilities.reflectPercent), [&](const auto &i) {\n\t\t\treturn i + value;\n\t\t});" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "043d649bba39cb4a5b8787e6ac37a9b590acc50e5a8c341d9103ff4ff96a34bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'createAndRegisterScript' has cognitive complexity of 132 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1028, + "startColumn": 17, + "charOffset": 46865, + "charLength": 23, + "snippet": { + "text": "createAndRegisterScript" + } + }, + "contextRegion": { + "startLine": 1026, + "startColumn": 17, + "charOffset": 46846, + "charLength": 23, + "snippet": { + "text": "}\n\nvoid ItemParse::createAndRegisterScript(ItemType &itemType, pugi::xml_node attributeNode, MoveEvent_t eventType /*= MOVE_EVENT_NONE*/, WeaponType_t weaponType /*= WEAPON_NONE*/) {\n\tstd::shared_ptr moveevent;\n\tif (eventType != MOVE_EVENT_NONE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a65e901e856f4b82e186fcff97242e6fc0215c03f36ac92f7ad5dd6ce86a1a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1036, + "startColumn": 3, + "charOffset": 47295, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1034, + "startColumn": 3, + "charOffset": 47261, + "charLength": 2, + "snippet": { + "text": "\t\tmoveevent->setFromXML(true);\n\n\t\tif (eventType == MOVE_EVENT_EQUIP) {\n\t\t\tmoveevent->equipFunction = moveevent->EquipItem;\n\t\t} else if (eventType == MOVE_EVENT_DEEQUIP) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be7772cb6d56bc90ce8eb9f6a9ca13c7360ba896fc9d9c747689d7e83e0a24a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1070, + "startColumn": 7, + "charOffset": 48778, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1068, + "startColumn": 7, + "charOffset": 48639, + "charLength": 1, + "snippet": { + "text": "\tfor (auto subAttributeNode : attributeNode.children()) {\n\t\tpugi::xml_attribute subKeyAttribute = subAttributeNode.attribute(\"key\");\n\t\tif (!subKeyAttribute) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70027ebfb7d19ac52a59b5c068b3e3ee47544dcce79f29144d0bfa533fba5dee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1075, + "startColumn": 7, + "charOffset": 48901, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1073, + "startColumn": 7, + "charOffset": 48815, + "charLength": 1, + "snippet": { + "text": "\n\t\tpugi::xml_attribute subValueAttribute = subAttributeNode.attribute(\"value\");\n\t\tif (!subValueAttribute) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a55a34ff890975912f751e8b1da635bede0cc2821709e2eabdac1b5afe25a8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1080, + "startColumn": 3, + "charOffset": 49010, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1078, + "startColumn": 3, + "charOffset": 48940, + "charLength": 2, + "snippet": { + "text": "\n\t\tauto stringKey = asLowerCaseString(subKeyAttribute.as_string());\n\t\tif (stringKey == \"slot\") {\n\t\t\tauto slotName = asLowerCaseString(subValueAttribute.as_string());\n\t\t\tif (moveevent && (moveevent->getEventType() == MOVE_EVENT_EQUIP || moveevent->getEventType() == MOVE_EVENT_DEEQUIP)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5353356f81fd9d56941f00e8d3e41fe8d410da575db6ab13f2e372fc0019dfdf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1082, + "startColumn": 4, + "charOffset": 49109, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1080, + "startColumn": 4, + "charOffset": 49008, + "charLength": 2, + "snippet": { + "text": "\t\tif (stringKey == \"slot\") {\n\t\t\tauto slotName = asLowerCaseString(subValueAttribute.as_string());\n\t\t\tif (moveevent && (moveevent->getEventType() == MOVE_EVENT_EQUIP || moveevent->getEventType() == MOVE_EVENT_DEEQUIP)) {\n\t\t\t\tif (slotName == \"head\") {\n\t\t\t\t\tmoveevent->setSlot(SLOTP_HEAD);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7030ccbfb2cd0dbf2a330bac1bb5d3c500d77939952af630e2532e2b7199dabd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1096, + "startColumn": 37, + "charOffset": 49814, + "charLength": 1, + "snippet": { + "text": "|" + } + }, + "contextRegion": { + "startLine": 1094, + "startColumn": 37, + "charOffset": 49680, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\tmoveevent->setSlot(SLOTP_LEFT);\n\t\t\t\t} else if (slotName == \"hand\" || slotName == \"shield\") {\n\t\t\t\t\tmoveevent->setSlot(SLOTP_RIGHT | SLOTP_LEFT);\n\t\t\t\t} else if (slotName == \"legs\") {\n\t\t\t\t\tmoveevent->setSlot(SLOTP_LEGS);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09c2c16e425fc7307e4b7c964fa0444b838e21e4448eb4c2e4a9436057493b6e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1114, + "startColumn": 24, + "charOffset": 50471, + "charLength": 14, + "snippet": { + "text": "SLOTP_TWO_HAND" + } + }, + "contextRegion": { + "startLine": 1112, + "startColumn": 24, + "charOffset": 50364, + "charLength": 14, + "snippet": { + "text": "\t\t\t\tItemType &it = Item::items.getItemType(id);\n\t\t\t\tif (slotName == \"two-handed\") {\n\t\t\t\t\tit.slotPosition = SLOTP_TWO_HAND;\n\t\t\t\t} else {\n\t\t\t\t\tit.slotPosition = SLOTP_HAND;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4da5b03da4addf10ec1fc2870b3dffdb653ad8a088a84935507395d4a2c17d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1116, + "startColumn": 24, + "charOffset": 50523, + "charLength": 10, + "snippet": { + "text": "SLOTP_HAND" + } + }, + "contextRegion": { + "startLine": 1114, + "startColumn": 24, + "charOffset": 50448, + "charLength": 10, + "snippet": { + "text": "\t\t\t\t\tit.slotPosition = SLOTP_TWO_HAND;\n\t\t\t\t} else {\n\t\t\t\t\tit.slotPosition = SLOTP_HAND;\n\t\t\t\t}\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6eb3bef2db3b3487c7c54eb7e3060d064705b9f15dd4c585c330562149b8a4d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1121, + "startColumn": 4, + "charOffset": 50637, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1119, + "startColumn": 4, + "charOffset": 50546, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (stringKey == \"level\") {\n\t\t\tauto numberValue = subValueAttribute.as_uint();\n\t\t\tif (moveevent) {\n\t\t\t\tg_logger().trace(\"Added required moveevent level '{}'\", numberValue);\n\t\t\t\tmoveevent->setRequiredLevel(numberValue);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf1d0de3e473753028cf3c8a077bdff0fa781de759918c1dbd2734214ef5be88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto vocations' can be declared as 'const auto *vocations'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1131, + "startColumn": 4, + "charOffset": 51049, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1129, + "startColumn": 4, + "charOffset": 51001, + "charLength": 4, + "snippet": { + "text": "\t\t\t}\n\t\t} else if (stringKey == \"vocation\") {\n\t\t\tauto vocations = subValueAttribute.as_string();\n\t\t\tstd::string tmp;\n\t\t\tstd::stringstream ss(vocations);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e4971de2f6797f421af330d5d9d06bc4ce1a5428185d3cbd794b8714917b987" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1136, + "startColumn": 4, + "charOffset": 51179, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 1134, + "startColumn": 4, + "charOffset": 51153, + "charLength": 5, + "snippet": { + "text": "\t\t\tstd::string token;\n\n\t\t\twhile (std::getline(ss, token, ',')) {\n\t\t\t\ttoken.erase(token.begin(), std::find_if(token.begin(), token.end(), [](unsigned char ch) {\n\t\t\t\t\t\t\t\treturn !std::isspace(ch);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0fd216457f1987a900f16ae7823573c2c2f43e031bd0a3f3c2bbb1dd785d95ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (while loop) is ID-dependent due to variable reference to 'ss' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1136, + "startColumn": 11, + "charOffset": 51186, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1134, + "startColumn": 11, + "charOffset": 51153, + "charLength": 3, + "snippet": { + "text": "\t\t\tstd::string token;\n\n\t\t\twhile (std::getline(ss, token, ',')) {\n\t\t\t\ttoken.erase(token.begin(), std::find_if(token.begin(), token.end(), [](unsigned char ch) {\n\t\t\t\t\t\t\t\treturn !std::isspace(ch);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c98c31ee1489be5abff94938cd1385068c218acf203f1f289e5b222b91a9d211" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1137, + "startColumn": 11, + "charOffset": 51228, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 1135, + "startColumn": 11, + "charOffset": 51175, + "charLength": 5, + "snippet": { + "text": "\n\t\t\twhile (std::getline(ss, token, ',')) {\n\t\t\t\ttoken.erase(token.begin(), std::find_if(token.begin(), token.end(), [](unsigned char ch) {\n\t\t\t\t\t\t\t\treturn !std::isspace(ch);\n\t\t\t\t\t\t\t}));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "134574702aa19d14ccb69a913a0cee725f601f7ada2c2c1c2ceccf81a5e19a09" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1138, + "startColumn": 16, + "charOffset": 51328, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1136, + "startColumn": 16, + "charOffset": 51176, + "charLength": 1, + "snippet": { + "text": "\t\t\twhile (std::getline(ss, token, ',')) {\n\t\t\t\ttoken.erase(token.begin(), std::find_if(token.begin(), token.end(), [](unsigned char ch) {\n\t\t\t\t\t\t\t\treturn !std::isspace(ch);\n\t\t\t\t\t\t\t}));\n\t\t\t\ttoken.erase(std::find_if(token.rbegin(), token.rend(), [](unsigned char ch) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b02a451d5077ab5cb95279eb2a019700d5d27f197fb3008972d0a613d6af51c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1138, + "startColumn": 17, + "charOffset": 51329, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1136, + "startColumn": 17, + "charOffset": 51176, + "charLength": 3, + "snippet": { + "text": "\t\t\twhile (std::getline(ss, token, ',')) {\n\t\t\t\ttoken.erase(token.begin(), std::find_if(token.begin(), token.end(), [](unsigned char ch) {\n\t\t\t\t\t\t\t\treturn !std::isspace(ch);\n\t\t\t\t\t\t\t}));\n\t\t\t\ttoken.erase(std::find_if(token.rbegin(), token.rend(), [](unsigned char ch) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d0a42c5f91d86ece1352bff711d6223420bc5e12b52d15387315e8cae8ca653" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1140, + "startColumn": 11, + "charOffset": 51369, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 1138, + "startColumn": 11, + "charOffset": 51313, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\t\t\t\treturn !std::isspace(ch);\n\t\t\t\t\t\t\t}));\n\t\t\t\ttoken.erase(std::find_if(token.rbegin(), token.rend(), [](unsigned char ch) {\n\t\t\t\t\t\t\t\treturn !std::isspace(ch);\n\t\t\t\t\t\t\t}).base()," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "217f546da833eb9a48bb76348d6fcb41890a925a82bcaaff15ef10eea59ebcbf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1141, + "startColumn": 16, + "charOffset": 51456, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1139, + "startColumn": 16, + "charOffset": 51347, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\t\t\t}));\n\t\t\t\ttoken.erase(std::find_if(token.rbegin(), token.rend(), [](unsigned char ch) {\n\t\t\t\t\t\t\t\treturn !std::isspace(ch);\n\t\t\t\t\t\t\t}).base(),\n\t\t\t\t token.end());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b60efdf42bd4bcf89ef5d09e800d972fbd9114035f88325326997dc7e61c566b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1141, + "startColumn": 17, + "charOffset": 51457, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1139, + "startColumn": 17, + "charOffset": 51347, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\t\t\t}));\n\t\t\t\ttoken.erase(std::find_if(token.rbegin(), token.rend(), [](unsigned char ch) {\n\t\t\t\t\t\t\t\treturn !std::isspace(ch);\n\t\t\t\t\t\t\t}).base(),\n\t\t\t\t token.end());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d677ff0d0637b83342f5395e47fd06bf680022c24bc1808f79180124bdd7ebae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1149, + "startColumn": 5, + "charOffset": 51624, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1147, + "startColumn": 5, + "charOffset": 51580, + "charLength": 3, + "snippet": { + "text": "\n\t\t\t\tstd::stringstream inner_ss(token);\n\t\t\t\tstd::getline(inner_ss, v1, ';');\n\t\t\t\tstd::string showInDescriptionStr;\n\t\t\t\tstd::getline(inner_ss, showInDescriptionStr, ';');" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "460b3113bdb7fea71eddde615e277f9da340dd3def860f4d03bf905436af8afd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1151, + "startColumn": 5, + "charOffset": 51699, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1149, + "startColumn": 5, + "charOffset": 51620, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tstd::getline(inner_ss, v1, ';');\n\t\t\t\tstd::string showInDescriptionStr;\n\t\t\t\tstd::getline(inner_ss, showInDescriptionStr, ';');\n\t\t\t\tshowInDescription = showInDescriptionStr == \"true\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "711f96713dd9f09389a367b62a52a8b042cf891803f027e182d0be340c5e3bb8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1178, + "startColumn": 9, + "charOffset": 52455, + "charLength": 7, + "snippet": { + "text": "replace" + } + }, + "contextRegion": { + "startLine": 1176, + "startColumn": 9, + "charOffset": 52368, + "charLength": 7, + "snippet": { + "text": "\t\t\tsize_t lastComma = tmp.rfind(',');\n\t\t\tif (lastComma != std::string::npos) {\n\t\t\t\ttmp.replace(lastComma, 1, \" and\");\n\t\t\t\tif (moveevent) {\n\t\t\t\t\tmoveevent->setVocationString(tmp);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bbb3151d624971f69927d06708ceac5f27fe3c3d8c557bd1770a6e9cae11a98e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1179, + "startColumn": 5, + "charOffset": 52490, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1177, + "startColumn": 5, + "charOffset": 52406, + "charLength": 2, + "snippet": { + "text": "\t\t\tif (lastComma != std::string::npos) {\n\t\t\t\ttmp.replace(lastComma, 1, \" and\");\n\t\t\t\tif (moveevent) {\n\t\t\t\t\tmoveevent->setVocationString(tmp);\n\t\t\t\t} else if (weapon) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95267a29b8e78812ce3fe6a646a8cc09665ac1b6e180d01852c9942a41a9a3e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1187, + "startColumn": 4, + "charOffset": 52738, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1185, + "startColumn": 4, + "charOffset": 52620, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (stringKey == \"action\" && weapon) {\n\t\t\tauto action = asLowerCaseString(subValueAttribute.as_string());\n\t\t\tif (action == \"removecharge\") {\n\t\t\t\tweapon->action = WEAPONACTION_REMOVECHARGE;\n\t\t\t} else if (action == \"removecount\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73bf7f765a949534c1a8ba856d76d1165831ca3f40742a810d70ef9bf9e05a06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1195, + "startColumn": 27, + "charOffset": 53064, + "charLength": 17, + "snippet": { + "text": "subValueAttribute" + } + }, + "contextRegion": { + "startLine": 1193, + "startColumn": 27, + "charOffset": 52980, + "charLength": 17, + "snippet": { + "text": "\t\t\t}\n\t\t} else if (stringKey == \"breakchance\" && weapon) {\n\t\t\tweapon->setBreakChance(subValueAttribute.as_uint());\n\t\t} else if (stringKey == \"mana\" && weapon) {\n\t\t\tweapon->setMana(subValueAttribute.as_uint());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05f945ea0553a24b6a385b4804fa47fcc7745695776e5336ab83dc93c1b7b564" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1224, + "startColumn": 22, + "charOffset": 54385, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 1222, + "startColumn": 22, + "charOffset": 54264, + "charLength": 1, + "snippet": { + "text": "\t\t} else if (stringKey == \"chain\" && weapon) {\n\t\t\tauto doubleValue = subValueAttribute.as_double();\n\t\t\tif (doubleValue > 0) {\n\t\t\t\tweapon->setChainSkillValue(doubleValue);\n\t\t\t\tg_logger().trace(\"Found chain skill value '{}' for weapon: {}\", doubleValue, itemType.name);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "508999e8eee3a9d01843a7a1ff0250587279825ea838008cca10272baf6d9266" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.1 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1228, + "startColumn": 22, + "charOffset": 54558, + "charLength": 3, + "snippet": { + "text": "0.1" + } + }, + "contextRegion": { + "startLine": 1226, + "startColumn": 22, + "charOffset": 54435, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tg_logger().trace(\"Found chain skill value '{}' for weapon: {}\", doubleValue, itemType.name);\n\t\t\t}\n\t\t\tif (doubleValue < 0.1 && subValueAttribute.as_bool() == false) {\n\t\t\t\tweapon->setDisabledChain();\n\t\t\t\tg_logger().trace(\"Chain disabled for weapon: {}\", itemType.name);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad9f03e8003c68340e1dbf3415b2771712d37b803a6c4cc360fdeb68e48d02b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-simplify", + "ruleIndex": 475, + "kind": "fail", + "level": "warning", + "message": { + "text": "Expression can be simplified" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1228, + "startColumn": 57, + "charOffset": 54593, + "charLength": 2, + "snippet": { + "text": "==" + } + }, + "contextRegion": { + "startLine": 1226, + "startColumn": 57, + "charOffset": 54435, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tg_logger().trace(\"Found chain skill value '{}' for weapon: {}\", doubleValue, itemType.name);\n\t\t\t}\n\t\t\tif (doubleValue < 0.1 && subValueAttribute.as_bool() == false) {\n\t\t\t\tweapon->setDisabledChain();\n\t\t\t\tg_logger().trace(\"Chain disabled for weapon: {}\", itemType.name);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e5ef4b6c1dfdbe405703d35eafd002bd8371ff3cb375d8255914e668068be88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal supplied to boolean operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1228, + "startColumn": 60, + "charOffset": 54596, + "charLength": 5, + "snippet": { + "text": "false" + } + }, + "contextRegion": { + "startLine": 1226, + "startColumn": 60, + "charOffset": 54435, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tg_logger().trace(\"Found chain skill value '{}' for weapon: {}\", doubleValue, itemType.name);\n\t\t\t}\n\t\t\tif (doubleValue < 0.1 && subValueAttribute.as_bool() == false) {\n\t\t\t\tweapon->setDisabledChain();\n\t\t\t\tg_logger().trace(\"Chain disabled for weapon: {}\", itemType.name);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e7b7a7535f4ca9afad46e3932cfdc8a8c43a32b345e382d417f27075ac7727f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1238, + "startColumn": 29, + "charOffset": 54916, + "charLength": 10, + "snippet": { + "text": "fromDamage" + } + }, + "contextRegion": { + "startLine": 1236, + "startColumn": 29, + "charOffset": 54735, + "charLength": 10, + "snippet": { + "text": "\t\tif (auto weaponWand = dynamic_pointer_cast(weapon)) {\n\t\t\tg_logger().trace(\"Added weapon damage from '{}', to '{}'\", fromDamage, toDamage);\n\t\t\tweaponWand->setMinChange(fromDamage);\n\t\t\tweaponWand->setMaxChange(toDamage);\n\t\t\tweaponWand->configureWeapon(itemType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cdcef361dee6249919eaa1e44c3e61da156bd4df4f7b63ef3a49651d90ae15b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1239, + "startColumn": 29, + "charOffset": 54957, + "charLength": 8, + "snippet": { + "text": "toDamage" + } + }, + "contextRegion": { + "startLine": 1237, + "startColumn": 29, + "charOffset": 54803, + "charLength": 8, + "snippet": { + "text": "\t\t\tg_logger().trace(\"Added weapon damage from '{}', to '{}'\", fromDamage, toDamage);\n\t\t\tweaponWand->setMinChange(fromDamage);\n\t\t\tweaponWand->setMaxChange(toDamage);\n\t\t\tweaponWand->configureWeapon(itemType);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98d020198af7b2ccce27a1c6784f9f2d64611efcce14783b05fb4526e6f79e4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'parseUnscriptedItems' has cognitive complexity of 50 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1265, + "startColumn": 17, + "charOffset": 55713, + "charLength": 20, + "snippet": { + "text": "parseUnscriptedItems" + } + }, + "contextRegion": { + "startLine": 1263, + "startColumn": 17, + "charOffset": 55694, + "charLength": 20, + "snippet": { + "text": "}\n\nvoid ItemParse::parseUnscriptedItems(const std::string_view &tmpStrValue, pugi::xml_node attributeNode, pugi::xml_attribute valueAttribute, ItemType &itemType) {\n\tif (tmpStrValue == \"script\") {\n\t\tstd::string scriptName = valueAttribute.as_string();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0f0c03cce0920b217037927c631ff3ff95948dde36e3fb5b1148eec8cccbbe0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-redundant-string-cstr", + "ruleIndex": 724, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant call to 'data'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1268, + "startColumn": 23, + "charOffset": 55968, + "charLength": 10, + "snippet": { + "text": "scriptName" + } + }, + "contextRegion": { + "startLine": 1266, + "startColumn": 23, + "charOffset": 55859, + "charLength": 10, + "snippet": { + "text": "\tif (tmpStrValue == \"script\") {\n\t\tstd::string scriptName = valueAttribute.as_string();\n\t\tauto tokens = split(scriptName.data(), ';');\n\t\tfor (const auto &token : tokens) {\n\t\t\tif (token == \"moveevent\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "473b7aa6458e482e0a8d7af889bb83d89ce899c5b744219ff93e02e97fe317d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1270, + "startColumn": 4, + "charOffset": 56033, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1268, + "startColumn": 4, + "charOffset": 55946, + "charLength": 2, + "snippet": { + "text": "\t\tauto tokens = split(scriptName.data(), ';');\n\t\tfor (const auto &token : tokens) {\n\t\t\tif (token == \"moveevent\") {\n\t\t\t\tg_logger().trace(\"Registering moveevent for item id '{}', name '{}'\", itemType.id, itemType.name);\n\t\t\t\tMoveEvent_t eventType = MOVE_EVENT_NONE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a274ef444bbd91a0fa7c4b06c4dd078992e5891cc9108fda4280a48de78f9cbc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1273, + "startColumn": 5, + "charOffset": 56213, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1271, + "startColumn": 5, + "charOffset": 56061, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tg_logger().trace(\"Registering moveevent for item id '{}', name '{}'\", itemType.id, itemType.name);\n\t\t\t\tMoveEvent_t eventType = MOVE_EVENT_NONE;\n\t\t\t\tfor (auto subAttributeNode : attributeNode.children()) {\n\t\t\t\t\tpugi::xml_attribute subKeyAttribute = subAttributeNode.attribute(\"key\");\n\t\t\t\t\tif (!subKeyAttribute) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5e617da9451b08fc9206078de2d598ecdbfdbcee2857b358a41e0f8989e53b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1275, + "startColumn": 10, + "charOffset": 56357, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1273, + "startColumn": 10, + "charOffset": 56209, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tfor (auto subAttributeNode : attributeNode.children()) {\n\t\t\t\t\tpugi::xml_attribute subKeyAttribute = subAttributeNode.attribute(\"key\");\n\t\t\t\t\tif (!subKeyAttribute) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3fe2cdf5b9259bd3049608050a778f24aa7ee269a895a0a2c2597859c28415ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1280, + "startColumn": 10, + "charOffset": 56492, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1278, + "startColumn": 10, + "charOffset": 56400, + "charLength": 1, + "snippet": { + "text": "\n\t\t\t\t\tpugi::xml_attribute subValueAttribute = subAttributeNode.attribute(\"value\");\n\t\t\t\t\tif (!subValueAttribute) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f840c1187d0dea67443a2fbf0012695fdd19f0d5a04981ce38203d3de8300f8f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'weaponType' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1301, + "startColumn": 18, + "charOffset": 57265, + "charLength": 10, + "snippet": { + "text": "weaponType" + } + }, + "contextRegion": { + "startLine": 1299, + "startColumn": 18, + "charOffset": 57207, + "charLength": 10, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t} else if (token == \"weapon\") {\n\t\t\t\tWeaponType_t weaponType;\n\t\t\t\tg_logger().trace(\"Registering weapon for item id '{}', name '{}'\", itemType.id, itemType.name);\n\t\t\t\tfor (auto subAttributeNode : attributeNode.children()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cfac161419ad50ab57c8fbc4fe7911f1557b5ef57b1e030ddc70b242d3698f59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1303, + "startColumn": 5, + "charOffset": 57381, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1301, + "startColumn": 5, + "charOffset": 57248, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tWeaponType_t weaponType;\n\t\t\t\tg_logger().trace(\"Registering weapon for item id '{}', name '{}'\", itemType.id, itemType.name);\n\t\t\t\tfor (auto subAttributeNode : attributeNode.children()) {\n\t\t\t\t\tpugi::xml_attribute subKeyAttribute = subAttributeNode.attribute(\"key\");\n\t\t\t\t\tif (!subKeyAttribute) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "701e34c914780f0800580eb5b45038142ddc429288393ecc460827144c5a4c4f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1305, + "startColumn": 10, + "charOffset": 57525, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1303, + "startColumn": 10, + "charOffset": 57377, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tfor (auto subAttributeNode : attributeNode.children()) {\n\t\t\t\t\tpugi::xml_attribute subKeyAttribute = subAttributeNode.attribute(\"key\");\n\t\t\t\t\tif (!subKeyAttribute) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd4f79c5bdad7de3f74332ca7106b2bb203d4ad2422451cc90a9da703bf53102" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.cpp" + }, + "region": { + "startLine": 1310, + "startColumn": 10, + "charOffset": 57660, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1308, + "startColumn": 10, + "charOffset": 57568, + "charLength": 1, + "snippet": { + "text": "\n\t\t\t\t\tpugi::xml_attribute subValueAttribute = subAttributeNode.attribute(\"value\");\n\t\t\t\t\tif (!subValueAttribute) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99940a94bdc07db9fe66d2ed411ed316d6553bd7810d76ff8b31f646b04f6932" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'ItemParse::parseFieldCombatType' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/functions/item/item_parse.hpp", + "index": 1 + }, + "region": { + "startLine": 329, + "startColumn": 22, + "charOffset": 18952, + "charLength": 20, + "snippet": { + "text": "parseFieldCombatType" + } + }, + "contextRegion": { + "startLine": 327, + "startColumn": 22, + "charOffset": 18741, + "charLength": 20, + "snippet": { + "text": "\t// Parent of the function: static void parseField\n\tstatic std::tuple parseFieldConditions(std::string lowerStringValue, pugi::xml_attribute valueAttribute);\n\tstatic CombatType_t parseFieldCombatType(std::string string, pugi::xml_attribute valueAttribute);\n\tstatic void parseFieldCombatDamage(std::shared_ptr conditionDamage, std::string stringValue, pugi::xml_node attributeNode);\n\tstatic void createAndRegisterScript(ItemType &itemType, pugi::xml_node attributeNode, MoveEvent_t eventType = MOVE_EVENT_NONE, WeaponType_t weaponType = WEAPON_NONE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dea8976b739cbcbd869c0ddc65dbd0b30e55b89090485d95fc95a48c34dd2ad7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/thing.cpp" + }, + "region": { + "startLine": 17, + "startColumn": 6, + "charOffset": 530, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 15, + "startColumn": 6, + "charOffset": 445, + "charLength": 1, + "snippet": { + "text": "const Position &Thing::getPosition() {\n\tstd::shared_ptr tile = getTile();\n\tif (!tile) {\n\t\treturn Tile::nullptr_tile->getPosition();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d03e745ac9e77c6b9f5cf6c1c6061d4c25a0a6866aed7a4050b1506e2cfd26a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": {}, + "region": { + "snippet": {} + }, + "contextRegion": { + "startLine": 1, + "snippet": { + "text": "<<<<>>>>" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc42d97fdd4d48a02bae907eb9e54d52256ef841596f5814e652c810560912a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cert-err58-cpp", + "ruleIndex": 135, + "kind": "fail", + "level": "warning", + "message": { + "text": "initialization of 'real_nullptr_tile' with static storage duration may throw an exception that cannot be caught" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 26, + "startColumn": 6, + "charOffset": 838, + "charLength": 17, + "snippet": { + "text": "real_nullptr_tile" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 6, + "charOffset": 798, + "charLength": 17, + "snippet": { + "text": "#include \"enums/account_type.hpp\"\n\nauto real_nullptr_tile = std::make_shared(0xFFFF, 0xFFFF, 0xFF);\nconst std::shared_ptr &Tile::nullptr_tile = real_nullptr_tile;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d27c70758e834c32dc80625cdfe268ebc5a0faff9783c2da946530aa8db1608" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-non-const-global-variables", + "ruleIndex": 486, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'real_nullptr_tile' is non-const and globally accessible, consider making it const" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 26, + "startColumn": 6, + "charOffset": 838, + "charLength": 17, + "snippet": { + "text": "real_nullptr_tile" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 6, + "charOffset": 798, + "charLength": 17, + "snippet": { + "text": "#include \"enums/account_type.hpp\"\n\nauto real_nullptr_tile = std::make_shared(0xFFFF, 0xFFFF, 0xFF);\nconst std::shared_ptr &Tile::nullptr_tile = real_nullptr_tile;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d55f84dff9dc767db64251db6fe6671969505e83a67bcc480bb28f73345aae85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 26, + "startColumn": 55, + "charOffset": 887, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 55, + "charOffset": 798, + "charLength": 6, + "snippet": { + "text": "#include \"enums/account_type.hpp\"\n\nauto real_nullptr_tile = std::make_shared(0xFFFF, 0xFFFF, 0xFF);\nconst std::shared_ptr &Tile::nullptr_tile = real_nullptr_tile;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48c9d020839eead7444487f2614b0a4ec98aeeafa675582cf554692b8412732c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 26, + "startColumn": 63, + "charOffset": 895, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 63, + "charOffset": 798, + "charLength": 6, + "snippet": { + "text": "#include \"enums/account_type.hpp\"\n\nauto real_nullptr_tile = std::make_shared(0xFFFF, 0xFFFF, 0xFF);\nconst std::shared_ptr &Tile::nullptr_tile = real_nullptr_tile;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03ef2a50ccd10c21b12da08fac630dce564533c6b3b2dc9290f855d0c0592bef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 26, + "startColumn": 71, + "charOffset": 903, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 71, + "charOffset": 798, + "charLength": 4, + "snippet": { + "text": "#include \"enums/account_type.hpp\"\n\nauto real_nullptr_tile = std::make_shared(0xFFFF, 0xFFFF, 0xFF);\nconst std::shared_ptr &Tile::nullptr_tile = real_nullptr_tile;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e34dd959a62ecf1c111dec10b75f482baf30f2a226218fa7ad4cc05f49403a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "fuchsia-statically-constructed-objects", + "ruleIndex": 527, + "kind": "fail", + "level": "warning", + "message": { + "text": "static objects are disallowed; if possible, use a constexpr constructor instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 27, + "startColumn": 1, + "charOffset": 910, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 1, + "charOffset": 832, + "charLength": 5, + "snippet": { + "text": "\nauto real_nullptr_tile = std::make_shared(0xFFFF, 0xFFFF, 0xFF);\nconst std::shared_ptr &Tile::nullptr_tile = real_nullptr_tile;\n\nbool Tile::hasProperty(ItemProperty prop) const {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7ca905a45debac57a5c5228c6285dd797fa5f3186faa2d70dbf2201839ba507" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 31, + "startColumn": 3, + "charOffset": 1049, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 29, + "startColumn": 3, + "charOffset": 980, + "charLength": 4, + "snippet": { + "text": "bool Tile::hasProperty(ItemProperty prop) const {\n\tswitch (prop) {\n\t\tcase CONST_PROP_BLOCKSOLID:\n\t\t\treturn hasFlag(TILESTATE_BLOCKSOLID);\n\t\tcase CONST_PROP_HASHEIGHT:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01b0d609ec6e58bc403b06ab16c57d0fa7d5950ad8c979ec38af141802f08409" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 33, + "startColumn": 3, + "charOffset": 1120, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 3, + "charOffset": 1047, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONST_PROP_BLOCKSOLID:\n\t\t\treturn hasFlag(TILESTATE_BLOCKSOLID);\n\t\tcase CONST_PROP_HASHEIGHT:\n\t\t\treturn hasFlag(TILESTATE_HASHEIGHT);\n\t\tcase CONST_PROP_BLOCKPROJECTILE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05077ab44d859fea542fea6895e2a732500f3e62cfbbc837e0c4f3bb68b7854b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 35, + "startColumn": 3, + "charOffset": 1189, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 33, + "startColumn": 3, + "charOffset": 1118, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONST_PROP_HASHEIGHT:\n\t\t\treturn hasFlag(TILESTATE_HASHEIGHT);\n\t\tcase CONST_PROP_BLOCKPROJECTILE:\n\t\t\treturn hasFlag(TILESTATE_BLOCKPROJECTILE);\n\t\tcase CONST_PROP_BLOCKPATH:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d1e9e242f00436b3bbf4355349214e9b107f4bbd6586aa4b5f481dfdfec33f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 37, + "startColumn": 3, + "charOffset": 1270, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 35, + "startColumn": 3, + "charOffset": 1187, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONST_PROP_BLOCKPROJECTILE:\n\t\t\treturn hasFlag(TILESTATE_BLOCKPROJECTILE);\n\t\tcase CONST_PROP_BLOCKPATH:\n\t\t\treturn hasFlag(TILESTATE_BLOCKPATH);\n\t\tcase CONST_PROP_ISVERTICAL:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59338f0247ff280bad54f24ed40e6bbb970494986f5a04837eebab9877af7342" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 39, + "startColumn": 3, + "charOffset": 1339, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 37, + "startColumn": 3, + "charOffset": 1268, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONST_PROP_BLOCKPATH:\n\t\t\treturn hasFlag(TILESTATE_BLOCKPATH);\n\t\tcase CONST_PROP_ISVERTICAL:\n\t\t\treturn hasFlag(TILESTATE_ISVERTICAL);\n\t\tcase CONST_PROP_ISHORIZONTAL:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "faeebebd7499f50e1ec3426702283e3ae92e7c35fdc2319889dd79376426ebe4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 41, + "startColumn": 3, + "charOffset": 1410, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 3, + "charOffset": 1337, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONST_PROP_ISVERTICAL:\n\t\t\treturn hasFlag(TILESTATE_ISVERTICAL);\n\t\tcase CONST_PROP_ISHORIZONTAL:\n\t\t\treturn hasFlag(TILESTATE_ISHORIZONTAL);\n\t\tcase CONST_PROP_MOVABLE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bcb126ccb497c6744f72374c3d366078805d88ad5aebc1fb884e5663b4fd904f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 43, + "startColumn": 3, + "charOffset": 1485, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 3, + "charOffset": 1408, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONST_PROP_ISHORIZONTAL:\n\t\t\treturn hasFlag(TILESTATE_ISHORIZONTAL);\n\t\tcase CONST_PROP_MOVABLE:\n\t\t\treturn hasFlag(TILESTATE_MOVABLE);\n\t\tcase CONST_PROP_IMMOVABLEBLOCKSOLID:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39da6b6e1e18ec9d743001bd8dda406454a65afd70eb88d3f44125e95829279c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 45, + "startColumn": 3, + "charOffset": 1550, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 3, + "charOffset": 1483, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONST_PROP_MOVABLE:\n\t\t\treturn hasFlag(TILESTATE_MOVABLE);\n\t\tcase CONST_PROP_IMMOVABLEBLOCKSOLID:\n\t\t\treturn hasFlag(TILESTATE_IMMOVABLEBLOCKSOLID);\n\t\tcase CONST_PROP_IMMOVABLEBLOCKPATH:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c430615e58851499cd4e2a59a951458e05665e270fa91dd63402b78025c9cf63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 47, + "startColumn": 3, + "charOffset": 1639, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 45, + "startColumn": 3, + "charOffset": 1548, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONST_PROP_IMMOVABLEBLOCKSOLID:\n\t\t\treturn hasFlag(TILESTATE_IMMOVABLEBLOCKSOLID);\n\t\tcase CONST_PROP_IMMOVABLEBLOCKPATH:\n\t\t\treturn hasFlag(TILESTATE_IMMOVABLEBLOCKPATH);\n\t\tcase CONST_PROP_IMMOVABLENOFIELDBLOCKPATH:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b6543e1e724e2d779105636da58293cf863cb1f6c3ff42fcbecedbfdc821bd8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 49, + "startColumn": 3, + "charOffset": 1726, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 47, + "startColumn": 3, + "charOffset": 1637, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONST_PROP_IMMOVABLEBLOCKPATH:\n\t\t\treturn hasFlag(TILESTATE_IMMOVABLEBLOCKPATH);\n\t\tcase CONST_PROP_IMMOVABLENOFIELDBLOCKPATH:\n\t\t\treturn hasFlag(TILESTATE_IMMOVABLENOFIELDBLOCKPATH);\n\t\tcase CONST_PROP_NOFIELDBLOCKPATH:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2991cf56ab0f9a156a79fc081c9e0c27f0ffddd6e67dec9a8afcb970f7050f65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 51, + "startColumn": 3, + "charOffset": 1827, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 49, + "startColumn": 3, + "charOffset": 1724, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONST_PROP_IMMOVABLENOFIELDBLOCKPATH:\n\t\t\treturn hasFlag(TILESTATE_IMMOVABLENOFIELDBLOCKPATH);\n\t\tcase CONST_PROP_NOFIELDBLOCKPATH:\n\t\t\treturn hasFlag(TILESTATE_NOFIELDBLOCKPATH);\n\t\tcase CONST_PROP_SUPPORTHANGABLE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b4de20aa94cc38342008ade2aa7f8bdfce6daefd01e309a649bfeb3e123f30b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 53, + "startColumn": 3, + "charOffset": 1910, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 3, + "charOffset": 1825, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONST_PROP_NOFIELDBLOCKPATH:\n\t\t\treturn hasFlag(TILESTATE_NOFIELDBLOCKPATH);\n\t\tcase CONST_PROP_SUPPORTHANGABLE:\n\t\t\treturn hasFlag(TILESTATE_SUPPORTS_HANGABLE);\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "326ad861cb0cad69b2dc7980341963161987dc97e0f65b4ee63d08c9a062e64e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 55, + "startColumn": 3, + "charOffset": 1993, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 3, + "charOffset": 1908, + "charLength": 7, + "snippet": { + "text": "\t\tcase CONST_PROP_SUPPORTHANGABLE:\n\t\t\treturn hasFlag(TILESTATE_SUPPORTS_HANGABLE);\n\t\tdefault:\n\t\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64270e806e8e3eab657dd74e35b34136d141891faa6e6e5ca5475d669b1ee9a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'exclude' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 60, + "startColumn": 46, + "charOffset": 2070, + "charLength": 7, + "snippet": { + "text": "exclude" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 46, + "charOffset": 2022, + "charLength": 7, + "snippet": { + "text": "}\n\nbool Tile::hasProperty(std::shared_ptr exclude, ItemProperty prop) const {\n\tif (!exclude) {\n\t\tg_logger().error(\"[{}]: exclude is nullptr\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8fa7197417ee79e1eb3c456aaa8b6cc1788b8cf3e502404fa8ca7fa20035ae96" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 61, + "startColumn": 6, + "charOffset": 2111, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 59, + "startColumn": 6, + "charOffset": 2024, + "charLength": 1, + "snippet": { + "text": "\nbool Tile::hasProperty(std::shared_ptr exclude, ItemProperty prop) const {\n\tif (!exclude) {\n\t\tg_logger().error(\"[{}]: exclude is nullptr\", __FUNCTION__);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9eb0f07cd0df3bf4a4672c222c46b2b3bcdf9bc7e0ae70314c7d4d7735988d5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 73, + "startColumn": 3, + "charOffset": 2362, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 71, + "startColumn": 3, + "charOffset": 2307, + "charLength": 3, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto &item : *items) {\n\t\t\tif (!item) {\n\t\t\t\tg_logger().error(\"Tile::hasProperty: tile {} has an item which is nullptr\", tilePos.toString());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "028b5c51ddbcddb40e5ac7f5cc7ce9295b9f4558bd76ea64ac253e1a4e97480a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &item' can be declared as 'const auto &item'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 73, + "startColumn": 8, + "charOffset": 2367, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 71, + "startColumn": 8, + "charOffset": 2307, + "charLength": 4, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto &item : *items) {\n\t\t\tif (!item) {\n\t\t\t\tg_logger().error(\"Tile::hasProperty: tile {} has an item which is nullptr\", tilePos.toString());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49365fe70d1a32d20935e2f8c5c8dcd6b58f135e161e60284fb3f079439a2381" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 74, + "startColumn": 8, + "charOffset": 2397, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 8, + "charOffset": 2308, + "charLength": 1, + "snippet": { + "text": "\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto &item : *items) {\n\t\t\tif (!item) {\n\t\t\t\tg_logger().error(\"Tile::hasProperty: tile {} has an item which is nullptr\", tilePos.toString());\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb9a48fceda9e61c25f372621ff2297296e928c3604c40808cb3e5e89a49b0ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 101, + "startColumn": 3, + "charOffset": 2874, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 99, + "startColumn": 3, + "charOffset": 2819, + "charLength": 3, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto &item : *items) {\n\t\t\tif (item->hasProperty(CONST_PROP_HASHEIGHT)) {\n\t\t\t\t++height;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "028b5c51ddbcddb40e5ac7f5cc7ce9295b9f4558bd76ea64ac253e1a4e97480a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &item' can be declared as 'const auto &item'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 101, + "startColumn": 8, + "charOffset": 2879, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 99, + "startColumn": 8, + "charOffset": 2819, + "charLength": 4, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto &item : *items) {\n\t\t\tif (item->hasProperty(CONST_PROP_HASHEIGHT)) {\n\t\t\t\t++height;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49365fe70d1a32d20935e2f8c5c8dcd6b58f135e161e60284fb3f079439a2381" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 142, + "startColumn": 41, + "charOffset": 3644, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 140, + "startColumn": 41, + "charOffset": 3601, + "charLength": 1, + "snippet": { + "text": "}\n\nstd::string Tile::getDescription(int32_t) {\n\treturn \"You dont know why, but you cant see anything!\";\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17765d87a24033e4d1b7a892786bb53c22e06ff14c509874be8b2d3c8d7f4ed9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 152, + "startColumn": 3, + "charOffset": 3879, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 3, + "charOffset": 3824, + "charLength": 3, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\n\t\t\tif ((*it)->getTeleport()) {\n\t\t\t\treturn (*it)->getTeleport();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db147a9a6f7ab8892e7635eee10c70731d519b79ebc54b85d7572e78e4075139" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 152, + "startColumn": 3, + "charOffset": 3879, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 3, + "charOffset": 3824, + "charLength": 3, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\n\t\t\tif ((*it)->getTeleport()) {\n\t\t\t\treturn (*it)->getTeleport();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d19e71289e890f03c4535f3bbdef45cbb4a0aad1cf37170c79add388b1ddc90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-loop-convert", + "ruleIndex": 620, + "kind": "fail", + "level": "warning", + "message": { + "text": "use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 152, + "startColumn": 3, + "charOffset": 3879, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 3, + "charOffset": 3824, + "charLength": 3, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\n\t\t\tif ((*it)->getTeleport()) {\n\t\t\t\treturn (*it)->getTeleport();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44af8c5cac91dc8c16dd3ddefbf240d9eb7bca032366f7eb76711fb2c4af05b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 152, + "startColumn": 8, + "charOffset": 3884, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 8, + "charOffset": 3824, + "charLength": 4, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\n\t\t\tif ((*it)->getTeleport()) {\n\t\t\t\treturn (*it)->getTeleport();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4d5fbc3c0f72101f1a47b6a6763096d921cc6c50d39719fc96b5da4a624cbb2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 152, + "startColumn": 56, + "charOffset": 3932, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 56, + "charOffset": 3824, + "charLength": 2, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\n\t\t\tif ((*it)->getTeleport()) {\n\t\t\t\treturn (*it)->getTeleport();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0662063cb47fcb0611c4fb9f69603b7deb2b3548391bf72bc9fc7685b84ae1d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 171, + "startColumn": 3, + "charOffset": 4299, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 169, + "startColumn": 3, + "charOffset": 4244, + "charLength": 3, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\n\t\t\tif ((*it)->getMagicField()) {\n\t\t\t\treturn (*it)->getMagicField();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0611f72f5f8aa6950b91b22866073a4c8f81408901cbda0a64c5af20ca18c35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 171, + "startColumn": 3, + "charOffset": 4299, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 169, + "startColumn": 3, + "charOffset": 4244, + "charLength": 3, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\n\t\t\tif ((*it)->getMagicField()) {\n\t\t\t\treturn (*it)->getMagicField();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bad9a4b42fb7633254f4aa9fc077052c74b1924058d0c9df9e7833dcb7c2df6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-loop-convert", + "ruleIndex": 620, + "kind": "fail", + "level": "warning", + "message": { + "text": "use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 171, + "startColumn": 3, + "charOffset": 4299, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 169, + "startColumn": 3, + "charOffset": 4244, + "charLength": 3, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\n\t\t\tif ((*it)->getMagicField()) {\n\t\t\t\treturn (*it)->getMagicField();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "056102c7324d0763c1f9ab47528b36fc6b8386e1487e7a2d1083de18ba3f5587" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 171, + "startColumn": 8, + "charOffset": 4304, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 169, + "startColumn": 8, + "charOffset": 4244, + "charLength": 4, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\n\t\t\tif ((*it)->getMagicField()) {\n\t\t\t\treturn (*it)->getMagicField();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23b23d7123aec82954b92705cd3dd43f8dd941697c08b1cd422fd21948a42782" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 171, + "startColumn": 56, + "charOffset": 4352, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 169, + "startColumn": 56, + "charOffset": 4244, + "charLength": 2, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\n\t\t\tif ((*it)->getMagicField()) {\n\t\t\t\treturn (*it)->getMagicField();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50c47e216b86e59f6169da6dbec1518da3df9c98544973dec63c47ec2b3cbeea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 190, + "startColumn": 3, + "charOffset": 4729, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 188, + "startColumn": 3, + "charOffset": 4674, + "charLength": 3, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\n\t\t\tif ((*it)->getTrashHolder()) {\n\t\t\t\treturn (*it)->getTrashHolder();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49713c19ee845799a499da088526b3d0454775453f4395fc6037c7c1ac081eba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 190, + "startColumn": 3, + "charOffset": 4729, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 188, + "startColumn": 3, + "charOffset": 4674, + "charLength": 3, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\n\t\t\tif ((*it)->getTrashHolder()) {\n\t\t\t\treturn (*it)->getTrashHolder();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9bd9d8e9d6f3116d4b4e0921f97bb1eefd183fe5237a59535497c58fffdf9c06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-loop-convert", + "ruleIndex": 620, + "kind": "fail", + "level": "warning", + "message": { + "text": "use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 190, + "startColumn": 3, + "charOffset": 4729, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 188, + "startColumn": 3, + "charOffset": 4674, + "charLength": 3, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\n\t\t\tif ((*it)->getTrashHolder()) {\n\t\t\t\treturn (*it)->getTrashHolder();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7356b7782b1e1b2f4fb94e581aa755780590c8a7d7fefc532e7b894fe886d45e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 190, + "startColumn": 8, + "charOffset": 4734, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 188, + "startColumn": 8, + "charOffset": 4674, + "charLength": 4, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\n\t\t\tif ((*it)->getTrashHolder()) {\n\t\t\t\treturn (*it)->getTrashHolder();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "934a74c6b1a0649a8a238c83bd1f039a809a22adde75ae5ed67b3e2ab1d5e0c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 190, + "startColumn": 56, + "charOffset": 4782, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 188, + "startColumn": 56, + "charOffset": 4674, + "charLength": 2, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\n\t\t\tif ((*it)->getTrashHolder()) {\n\t\t\t\treturn (*it)->getTrashHolder();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1431fbe0e0547eb112bbd64dd32e4bfc3846f1ff611ce61a71ea0a5bb1e2342b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 209, + "startColumn": 3, + "charOffset": 5141, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 207, + "startColumn": 3, + "charOffset": 5086, + "charLength": 3, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\n\t\t\tif ((*it)->getMailbox()) {\n\t\t\t\treturn (*it)->getMailbox();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2bce840e1ac5524d19e811f10cfae004ec2712b88727f5f48ae7befa6460f190" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 209, + "startColumn": 3, + "charOffset": 5141, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 207, + "startColumn": 3, + "charOffset": 5086, + "charLength": 3, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\n\t\t\tif ((*it)->getMailbox()) {\n\t\t\t\treturn (*it)->getMailbox();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d406513328767e26bf2c20fcb0cd1048af4333d891b354116811a6ba682dc69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-loop-convert", + "ruleIndex": 620, + "kind": "fail", + "level": "warning", + "message": { + "text": "use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 209, + "startColumn": 3, + "charOffset": 5141, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 207, + "startColumn": 3, + "charOffset": 5086, + "charLength": 3, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\n\t\t\tif ((*it)->getMailbox()) {\n\t\t\t\treturn (*it)->getMailbox();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e0d70fdc40ea18357ede3f773435391cb9c08a8c08f17a5da113a66c281731d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 209, + "startColumn": 8, + "charOffset": 5146, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 207, + "startColumn": 8, + "charOffset": 5086, + "charLength": 4, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\n\t\t\tif ((*it)->getMailbox()) {\n\t\t\t\treturn (*it)->getMailbox();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bff23beac1ee6f7e901afad202a8d5f3284e0d54c8b3333494ac5090e760afb7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 209, + "startColumn": 56, + "charOffset": 5194, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 207, + "startColumn": 56, + "charOffset": 5086, + "charLength": 2, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\n\t\t\tif ((*it)->getMailbox()) {\n\t\t\t\treturn (*it)->getMailbox();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "760de23c75caeba1de19c6b3781af8fd895ed7f1695ee29decdbff5d7fbc27ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 228, + "startColumn": 3, + "charOffset": 5533, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 226, + "startColumn": 3, + "charOffset": 5478, + "charLength": 3, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\n\t\t\tif ((*it)->getBed()) {\n\t\t\t\treturn (*it)->getBed();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e3fef9b4dad370ea5901316dbaf8c8247c2273666451ccbddb15840ae261933" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 228, + "startColumn": 3, + "charOffset": 5533, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 226, + "startColumn": 3, + "charOffset": 5478, + "charLength": 3, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\n\t\t\tif ((*it)->getBed()) {\n\t\t\t\treturn (*it)->getBed();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab91dc77d77d39ef6bacfeaeff3fa993e6a74781453d3ac14157d21b6a729ed5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-loop-convert", + "ruleIndex": 620, + "kind": "fail", + "level": "warning", + "message": { + "text": "use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 228, + "startColumn": 3, + "charOffset": 5533, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 226, + "startColumn": 3, + "charOffset": 5478, + "charLength": 3, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\n\t\t\tif ((*it)->getBed()) {\n\t\t\t\treturn (*it)->getBed();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d3f8c69466fea1a805ff43e4823c7d4b53c45653acb123d39969d723e50e7d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 228, + "startColumn": 8, + "charOffset": 5538, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 226, + "startColumn": 8, + "charOffset": 5478, + "charLength": 4, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\n\t\t\tif ((*it)->getBed()) {\n\t\t\t\treturn (*it)->getBed();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61ec1cea0c35649b43432dad614f976757154dd6da6f48df885255c854099cca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 228, + "startColumn": 56, + "charOffset": 5586, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 226, + "startColumn": 56, + "charOffset": 5478, + "charLength": 2, + "snippet": { + "text": "\n\tif (const TileItemVector* items = getItemList()) {\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\n\t\t\tif ((*it)->getBed()) {\n\t\t\t\treturn (*it)->getBed();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3ca2e1ce490ed7e9c07c218245b16a62bf5f89c902e45c16f12a71c8158d250" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'getTopVisibleCreature' has cognitive complexity of 28 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 255, + "startColumn": 33, + "charOffset": 6129, + "charLength": 21, + "snippet": { + "text": "getTopVisibleCreature" + } + }, + "contextRegion": { + "startLine": 253, + "startColumn": 33, + "charOffset": 6094, + "charLength": 21, + "snippet": { + "text": "}\n\nstd::shared_ptr Tile::getTopVisibleCreature(std::shared_ptr creature) const {\n\tif (const CreatureVector* creatures = getCreatures()) {\n\t\tif (creature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3dff8b4f5c6fff7fa9a70cbab8f2dfe2156168f2091d903d53e7d02568b68983" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 255, + "startColumn": 81, + "charOffset": 6177, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 253, + "startColumn": 81, + "charOffset": 6094, + "charLength": 8, + "snippet": { + "text": "}\n\nstd::shared_ptr Tile::getTopVisibleCreature(std::shared_ptr creature) const {\n\tif (const CreatureVector* creatures = getCreatures()) {\n\t\tif (creature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e211b4cb80d161e08d0650c35e544be7ed2e093271c7ac1315291a7b540cd07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 263, + "startColumn": 4, + "charOffset": 6412, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 261, + "startColumn": 4, + "charOffset": 6403, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\tif (creature->canSeeCreature(tileCreature)) {\n\t\t\t\t\treturn tileCreature;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b93add1778190e7053547b72c93f3ab11e09fa42dd8897c4594f70a6d7d77c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &tileCreature' can be declared as 'const auto &tileCreature'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 263, + "startColumn": 9, + "charOffset": 6417, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 261, + "startColumn": 9, + "charOffset": 6403, + "charLength": 4, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\tif (creature->canSeeCreature(tileCreature)) {\n\t\t\t\t\treturn tileCreature;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c86b2970229b45ad08deace909e5659625d602f7b0cd357f49836d9222f38d5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 269, + "startColumn": 4, + "charOffset": 6553, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 267, + "startColumn": 4, + "charOffset": 6534, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\t\t} else {\n\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\tif (!tileCreature->isInvisible()) {\n\t\t\t\t\tstd::shared_ptr player = tileCreature->getPlayer();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a07854739abffc13f68f859705f244585910324847685b60cd7113fd12a9d6e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &tileCreature' can be declared as 'const auto &tileCreature'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 269, + "startColumn": 9, + "charOffset": 6558, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 267, + "startColumn": 9, + "charOffset": 6534, + "charLength": 4, + "snippet": { + "text": "\t\t\t}\n\t\t} else {\n\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\tif (!tileCreature->isInvisible()) {\n\t\t\t\t\tstd::shared_ptr player = tileCreature->getPlayer();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3657f6e899ce759acbddcb4a55b8f9a2b993507ba6ce0db7d7f24f7fc45e374e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 272, + "startColumn": 10, + "charOffset": 6707, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 270, + "startColumn": 10, + "charOffset": 6593, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tif (!tileCreature->isInvisible()) {\n\t\t\t\t\tstd::shared_ptr player = tileCreature->getPlayer();\n\t\t\t\t\tif (!player || !player->isInGhostMode()) {\n\t\t\t\t\t\treturn tileCreature;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48b2f4644a3be83e9f32abfb4b7bd189ae05999336f4749b71016cbf283d55a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'getBottomVisibleCreature' has cognitive complexity of 28 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 282, + "startColumn": 33, + "charOffset": 6850, + "charLength": 24, + "snippet": { + "text": "getBottomVisibleCreature" + } + }, + "contextRegion": { + "startLine": 280, + "startColumn": 33, + "charOffset": 6815, + "charLength": 24, + "snippet": { + "text": "}\n\nstd::shared_ptr Tile::getBottomVisibleCreature(std::shared_ptr creature) const {\n\tif (const CreatureVector* creatures = getCreatures()) {\n\t\tif (creature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5682a368e4eedc4d1687c81420b91c2ff587c836b0a9c9122242abc1d6cbebfe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 282, + "startColumn": 84, + "charOffset": 6901, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 280, + "startColumn": 84, + "charOffset": 6815, + "charLength": 8, + "snippet": { + "text": "}\n\nstd::shared_ptr Tile::getBottomVisibleCreature(std::shared_ptr creature) const {\n\tif (const CreatureVector* creatures = getCreatures()) {\n\t\tif (creature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a75d54bd4ce7e98ddb538ef8fcdab04ee37dff2491d015a3b032e811ab743ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 290, + "startColumn": 4, + "charOffset": 7139, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 288, + "startColumn": 4, + "charOffset": 7130, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (auto it = creatures->rbegin(), end = creatures->rend(); it != end; ++it) {\n\t\t\t\tif (creature->canSeeCreature(*it)) {\n\t\t\t\t\treturn *it;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25f32258a7c4eed8c7d090fad99262e09b12ad4d294c3e9e73f3345000af5378" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 290, + "startColumn": 4, + "charOffset": 7139, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 288, + "startColumn": 4, + "charOffset": 7130, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (auto it = creatures->rbegin(), end = creatures->rend(); it != end; ++it) {\n\t\t\t\tif (creature->canSeeCreature(*it)) {\n\t\t\t\t\treturn *it;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9cebd6a270c52e70795f12799fdab9b2d778fa92a51515eb5b53aa32739faf7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-loop-convert", + "ruleIndex": 620, + "kind": "fail", + "level": "warning", + "message": { + "text": "use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 290, + "startColumn": 4, + "charOffset": 7139, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 288, + "startColumn": 4, + "charOffset": 7130, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (auto it = creatures->rbegin(), end = creatures->rend(); it != end; ++it) {\n\t\t\t\tif (creature->canSeeCreature(*it)) {\n\t\t\t\t\treturn *it;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "335e283cf6556eec8c5cc0e493733ee60696236cfae05587d27628788cd3a17a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 290, + "startColumn": 9, + "charOffset": 7144, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 288, + "startColumn": 9, + "charOffset": 7130, + "charLength": 4, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (auto it = creatures->rbegin(), end = creatures->rend(); it != end; ++it) {\n\t\t\t\tif (creature->canSeeCreature(*it)) {\n\t\t\t\t\treturn *it;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae48eddb445477e86e2e1429158dd95662e913831ad87ce408952cf19e8e1d45" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 290, + "startColumn": 65, + "charOffset": 7200, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 288, + "startColumn": 65, + "charOffset": 7130, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (auto it = creatures->rbegin(), end = creatures->rend(); it != end; ++it) {\n\t\t\t\tif (creature->canSeeCreature(*it)) {\n\t\t\t\t\treturn *it;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3eef596e52d53ee79a55d73d7351974d2826f0f104d5b63aabfd4b207bbd843" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 296, + "startColumn": 4, + "charOffset": 7302, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 294, + "startColumn": 4, + "charOffset": 7283, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\t\t} else {\n\t\t\tfor (auto it = creatures->rbegin(), end = creatures->rend(); it != end; ++it) {\n\t\t\t\tif (!(*it)->isInvisible()) {\n\t\t\t\t\tstd::shared_ptr player = (*it)->getPlayer();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15873cb36716e7afb7b84b1cc2cd5bad5ca996a7890f87c2108a24f1feff4723" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 296, + "startColumn": 4, + "charOffset": 7302, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 294, + "startColumn": 4, + "charOffset": 7283, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\t\t} else {\n\t\t\tfor (auto it = creatures->rbegin(), end = creatures->rend(); it != end; ++it) {\n\t\t\t\tif (!(*it)->isInvisible()) {\n\t\t\t\t\tstd::shared_ptr player = (*it)->getPlayer();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f467c5ca67792d4731e04758a6c1034aa3ebee7826143bd2cd8d925727007b2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-loop-convert", + "ruleIndex": 620, + "kind": "fail", + "level": "warning", + "message": { + "text": "use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 296, + "startColumn": 4, + "charOffset": 7302, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 294, + "startColumn": 4, + "charOffset": 7283, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\t\t} else {\n\t\t\tfor (auto it = creatures->rbegin(), end = creatures->rend(); it != end; ++it) {\n\t\t\t\tif (!(*it)->isInvisible()) {\n\t\t\t\t\tstd::shared_ptr player = (*it)->getPlayer();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51b7048da37aea5a9190474ee73cec0e0034a86becb9d4bddd4bcadfa2d488fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 296, + "startColumn": 9, + "charOffset": 7307, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 294, + "startColumn": 9, + "charOffset": 7283, + "charLength": 4, + "snippet": { + "text": "\t\t\t}\n\t\t} else {\n\t\t\tfor (auto it = creatures->rbegin(), end = creatures->rend(); it != end; ++it) {\n\t\t\t\tif (!(*it)->isInvisible()) {\n\t\t\t\t\tstd::shared_ptr player = (*it)->getPlayer();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33680e4dd4cb240ee8add47c67fc4784a48df7f608e558677fa3df27e73c0e31" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 296, + "startColumn": 65, + "charOffset": 7363, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 294, + "startColumn": 65, + "charOffset": 7283, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\t\t} else {\n\t\t\tfor (auto it = creatures->rbegin(), end = creatures->rend(); it != end; ++it) {\n\t\t\t\tif (!(*it)->isInvisible()) {\n\t\t\t\t\tstd::shared_ptr player = (*it)->getPlayer();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc589d3f54aaf1a78d124b2a71f347675d332b66b36d91764aa181ff023ce61b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 299, + "startColumn": 10, + "charOffset": 7482, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 297, + "startColumn": 10, + "charOffset": 7382, + "charLength": 1, + "snippet": { + "text": "\t\t\t\tif (!(*it)->isInvisible()) {\n\t\t\t\t\tstd::shared_ptr player = (*it)->getPlayer();\n\t\t\t\t\tif (!player || !player->isInGhostMode()) {\n\t\t\t\t\t\treturn *it;\n\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e87b5e287fbb7c7fa471658ac1cf33b1c397761544489d31c57540fb45e37a85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 330, + "startColumn": 3, + "charOffset": 8115, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 328, + "startColumn": 3, + "charOffset": 8050, + "charLength": 3, + "snippet": { + "text": "\t// 4: creatures\n\tif (TileItemVector* items = getItemList()) {\n\t\tfor (auto it = ItemVector::const_reverse_iterator(items->getEndTopItem()), end = ItemVector::const_reverse_iterator(items->getBeginTopItem()); it != end; ++it) {\n\t\t\tif (Item::items[(*it)->getID()].alwaysOnTopOrder == topOrder) {\n\t\t\t\treturn (*it);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d6ca2e480ae556cd2d03aaeb029291c1d7056912f6757233d8c8073a4b1cee4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 330, + "startColumn": 3, + "charOffset": 8115, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 328, + "startColumn": 3, + "charOffset": 8050, + "charLength": 3, + "snippet": { + "text": "\t// 4: creatures\n\tif (TileItemVector* items = getItemList()) {\n\t\tfor (auto it = ItemVector::const_reverse_iterator(items->getEndTopItem()), end = ItemVector::const_reverse_iterator(items->getBeginTopItem()); it != end; ++it) {\n\t\t\tif (Item::items[(*it)->getID()].alwaysOnTopOrder == topOrder) {\n\t\t\t\treturn (*it);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c7cb4f663d5e9d9105080243eaf517b82ec8f684f2425fa9598f45be6e55bbb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 330, + "startColumn": 8, + "charOffset": 8120, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 328, + "startColumn": 8, + "charOffset": 8050, + "charLength": 4, + "snippet": { + "text": "\t// 4: creatures\n\tif (TileItemVector* items = getItemList()) {\n\t\tfor (auto it = ItemVector::const_reverse_iterator(items->getEndTopItem()), end = ItemVector::const_reverse_iterator(items->getBeginTopItem()); it != end; ++it) {\n\t\t\tif (Item::items[(*it)->getID()].alwaysOnTopOrder == topOrder) {\n\t\t\t\treturn (*it);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b5b4df34fe2ac1f5e86a297bbfbe1f8ee62c75cebdda18e7aa9d991835fc181" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 330, + "startColumn": 146, + "charOffset": 8258, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 328, + "startColumn": 146, + "charOffset": 8050, + "charLength": 2, + "snippet": { + "text": "\t// 4: creatures\n\tif (TileItemVector* items = getItemList()) {\n\t\tfor (auto it = ItemVector::const_reverse_iterator(items->getEndTopItem()), end = ItemVector::const_reverse_iterator(items->getBeginTopItem()); it != end; ++it) {\n\t\t\tif (Item::items[(*it)->getID()].alwaysOnTopOrder == topOrder) {\n\t\t\t\treturn (*it);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98d350f5fe0f35497f7276d14be0f076e00d429fbde49a7450e2cf3c5684f967" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 340, + "startColumn": 55, + "charOffset": 8534, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 338, + "startColumn": 55, + "charOffset": 8393, + "charLength": 8, + "snippet": { + "text": "\nstd::shared_ptr Tile::getTopVisibleThing(std::shared_ptr creature) {\n\tstd::shared_ptr thing = getTopVisibleCreature(creature);\n\tif (thing) {\n\t\treturn thing;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c1193aac2a92e391d7b1e9bdf287440df06767508f4f2b3aef56a8aaf83a412" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 346, + "startColumn": 6, + "charOffset": 8624, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 344, + "startColumn": 6, + "charOffset": 8578, + "charLength": 5, + "snippet": { + "text": "\n\tTileItemVector* items = getItemList();\n\tif (items) {\n\t\tfor (ItemVector::const_iterator it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\tconst ItemType &iit = Item::items[(*it)->getID()];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fea45a5bf8fb707d52b67bd891141c9919e30c280c62b5232cd57455eb7948c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 346, + "startColumn": 6, + "charOffset": 8624, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 344, + "startColumn": 6, + "charOffset": 8578, + "charLength": 5, + "snippet": { + "text": "\n\tTileItemVector* items = getItemList();\n\tif (items) {\n\t\tfor (ItemVector::const_iterator it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\tconst ItemType &iit = Item::items[(*it)->getID()];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e91a93f36c8e3e3ccc329fdd0adaaf4c748b8fbc20af876ab0c05882b45ace5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 347, + "startColumn": 3, + "charOffset": 8635, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 345, + "startColumn": 3, + "charOffset": 8579, + "charLength": 3, + "snippet": { + "text": "\tTileItemVector* items = getItemList();\n\tif (items) {\n\t\tfor (ItemVector::const_iterator it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\tconst ItemType &iit = Item::items[(*it)->getID()];\n\t\t\tif (!iit.lookThrough) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40ae7c86e15f46f4168bbdbdc31a6d47aaccc3ee4a2fc7ef1a1c5ee6d444d4d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 347, + "startColumn": 3, + "charOffset": 8635, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 345, + "startColumn": 3, + "charOffset": 8579, + "charLength": 3, + "snippet": { + "text": "\tTileItemVector* items = getItemList();\n\tif (items) {\n\t\tfor (ItemVector::const_iterator it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\tconst ItemType &iit = Item::items[(*it)->getID()];\n\t\t\tif (!iit.lookThrough) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f40d8197a8e2699c639c85b0da03c43d209a46e8447f4bef1d4dfccb56a5a7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 347, + "startColumn": 8, + "charOffset": 8640, + "charLength": 10, + "snippet": { + "text": "ItemVector" + } + }, + "contextRegion": { + "startLine": 345, + "startColumn": 8, + "charOffset": 8579, + "charLength": 10, + "snippet": { + "text": "\tTileItemVector* items = getItemList();\n\tif (items) {\n\t\tfor (ItemVector::const_iterator it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\tconst ItemType &iit = Item::items[(*it)->getID()];\n\t\t\tif (!iit.lookThrough) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9af2ba6b5288005f9678970ee8c4ade4dc1afce2c19f5d63477d287a4d4bd372" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when declaring iterators" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 347, + "startColumn": 8, + "charOffset": 8640, + "charLength": 10, + "snippet": { + "text": "ItemVector" + } + }, + "contextRegion": { + "startLine": 345, + "startColumn": 8, + "charOffset": 8579, + "charLength": 10, + "snippet": { + "text": "\tTileItemVector* items = getItemList();\n\tif (items) {\n\t\tfor (ItemVector::const_iterator it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\tconst ItemType &iit = Item::items[(*it)->getID()];\n\t\t\tif (!iit.lookThrough) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4908386bf74bccc7255aecb84eabf2a16b141a704587c5bfdc0a22ffa37e0f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 347, + "startColumn": 98, + "charOffset": 8730, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 345, + "startColumn": 98, + "charOffset": 8579, + "charLength": 2, + "snippet": { + "text": "\tTileItemVector* items = getItemList();\n\tif (items) {\n\t\tfor (ItemVector::const_iterator it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\tconst ItemType &iit = Item::items[(*it)->getID()];\n\t\t\tif (!iit.lookThrough) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8309d3d8fd1a6238f4fe1f296ee6678cd36ca74e41a0d17c99a3f7dff67da0bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 354, + "startColumn": 3, + "charOffset": 8860, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 352, + "startColumn": 3, + "charOffset": 8853, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfor (auto it = ItemVector::const_reverse_iterator(items->getEndTopItem()), end = ItemVector::const_reverse_iterator(items->getBeginTopItem()); it != end; ++it) {\n\t\t\tconst ItemType &iit = Item::items[(*it)->getID()];\n\t\t\tif (!iit.lookThrough) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b6f78855bcd5399616be9ca6cecc0adab83a35ef6e0d32c5ebd7b2b43d4447e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 354, + "startColumn": 3, + "charOffset": 8860, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 352, + "startColumn": 3, + "charOffset": 8853, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfor (auto it = ItemVector::const_reverse_iterator(items->getEndTopItem()), end = ItemVector::const_reverse_iterator(items->getBeginTopItem()); it != end; ++it) {\n\t\t\tconst ItemType &iit = Item::items[(*it)->getID()];\n\t\t\tif (!iit.lookThrough) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "adad91a7cbc55a942632f4a3adbfbf17a33611a81fcf61afc70aa733cbd2c276" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 354, + "startColumn": 8, + "charOffset": 8865, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 352, + "startColumn": 8, + "charOffset": 8853, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tfor (auto it = ItemVector::const_reverse_iterator(items->getEndTopItem()), end = ItemVector::const_reverse_iterator(items->getBeginTopItem()); it != end; ++it) {\n\t\t\tconst ItemType &iit = Item::items[(*it)->getID()];\n\t\t\tif (!iit.lookThrough) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0fa66173739406fc5d2feb4a83026d5a942781870cb411505c077d6c94fa4649" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 354, + "startColumn": 146, + "charOffset": 9003, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 352, + "startColumn": 146, + "charOffset": 8853, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tfor (auto it = ItemVector::const_reverse_iterator(items->getEndTopItem()), end = ItemVector::const_reverse_iterator(items->getBeginTopItem()); it != end; ++it) {\n\t\t\tconst ItemType &iit = Item::items[(*it)->getID()];\n\t\t\tif (!iit.lookThrough) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f13267260b6bf8c7f2646eab2b4c3fc66149aba4150adee0136937cf13efa38c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'onAddTileItem' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 365, + "startColumn": 12, + "charOffset": 9164, + "charLength": 13, + "snippet": { + "text": "onAddTileItem" + } + }, + "contextRegion": { + "startLine": 363, + "startColumn": 12, + "charOffset": 9150, + "charLength": 13, + "snippet": { + "text": "}\n\nvoid Tile::onAddTileItem(std::shared_ptr item) {\n\tif ((item->hasProperty(CONST_PROP_MOVABLE) || item->getContainer()) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) {\n\t\tauto it = g_game().browseFields.find(static_self_cast());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f282d1b93aff3fe7b6e1c56247d2a1bfd84060176136b35cb9ba2d2cfa5e2059" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'onAddTileItem' has cognitive complexity of 46 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 365, + "startColumn": 12, + "charOffset": 9164, + "charLength": 13, + "snippet": { + "text": "onAddTileItem" + } + }, + "contextRegion": { + "startLine": 363, + "startColumn": 12, + "charOffset": 9150, + "charLength": 13, + "snippet": { + "text": "}\n\nvoid Tile::onAddTileItem(std::shared_ptr item) {\n\tif ((item->hasProperty(CONST_PROP_MOVABLE) || item->getContainer()) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) {\n\t\tauto it = g_game().browseFields.find(static_self_cast());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e0103fd1887afdf93a4a5325bf7ba4f104b827bc2bf80a35a4416570c9b6f25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 365, + "startColumn": 48, + "charOffset": 9200, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 363, + "startColumn": 48, + "charOffset": 9150, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Tile::onAddTileItem(std::shared_ptr item) {\n\tif ((item->hasProperty(CONST_PROP_MOVABLE) || item->getContainer()) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) {\n\t\tauto it = g_game().browseFields.find(static_self_cast());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "610cd3af6beb5f763dfb4186ef38fdebe6b9bbf124b378e32014f117b9afd8ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 384, + "startColumn": 2, + "charOffset": 9815, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 382, + "startColumn": 2, + "charOffset": 9794, + "charLength": 3, + "snippet": { + "text": "\n\t// send to client\n\tfor (const auto &spectator : spectators) {\n\t\tif (const auto &tmpPlayer = spectator->getPlayer()) {\n\t\t\ttmpPlayer->sendAddTileItem(static_self_cast(), cylinderMapPos, item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d24fe8c34c5b605fafdf4b07e88c583ca7e8a9cbc527f0b30b50d15725e4433" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 391, + "startColumn": 2, + "charOffset": 10020, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 389, + "startColumn": 2, + "charOffset": 10000, + "charLength": 3, + "snippet": { + "text": "\n\t// event methods\n\tfor (const auto &spectator : spectators) {\n\t\tspectator->onAddTileItem(static_self_cast(), cylinderMapPos);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f814c7aa6b3b236142f6bc7c3e3d0eabcf101a4c23e851b40667138d36e05cbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 397, + "startColumn": 7, + "charOffset": 10286, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 395, + "startColumn": 7, + "charOffset": 10137, + "charLength": 1, + "snippet": { + "text": "\tif ((!hasFlag(TILESTATE_PROTECTIONZONE) || g_configManager().getBoolean(CLEAN_PROTECTION_ZONES, __FUNCTION__))\n\t && item->isCleanable()) {\n\t\tif (!this->getHouse()) {\n\t\t\tg_game().addTileToClean(static_self_cast());\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b01f450f6cc2bee1e59a5c94a826e579203a413e39736f4b26a652c20ebd04f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 407, + "startColumn": 7, + "charOffset": 10532, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 405, + "startColumn": 7, + "charOffset": 10495, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\t\tauto house = getHouse();\n\t\tif (!house) {\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8fbe0970612fa102bc2f89896c7777ec6bc7d40ae2b46bee83039e62e1342446" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 412, + "startColumn": 8, + "charOffset": 10616, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 410, + "startColumn": 8, + "charOffset": 10557, + "charLength": 1, + "snippet": { + "text": "\n\t\tfor (const auto &tile : getSurroundingTiles()) {\n\t\t\tif (!tile || !tile->getGround() || tile->getGround()->getID() != getGround()->getID()) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04fea76df3828ac136d2627429589c94deaad86e786a9e96949054f4da0f5305" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 412, + "startColumn": 17, + "charOffset": 10625, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 410, + "startColumn": 17, + "charOffset": 10557, + "charLength": 1, + "snippet": { + "text": "\n\t\tfor (const auto &tile : getSurroundingTiles()) {\n\t\t\tif (!tile || !tile->getGround() || tile->getGround()->getID() != getGround()->getID()) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6a2e10112c8de3943f882e5be10c9b13ea0717daa7b90c711f22fc6f2cdb333" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 416, + "startColumn": 8, + "charOffset": 10768, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 414, + "startColumn": 8, + "charOffset": 10715, + "charLength": 1, + "snippet": { + "text": "\t\t\t}\n\t\t\tauto topItem = tile->getTopTopItem();\n\t\t\tif (!topItem || !topItem->canReceiveAutoCarpet()) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46f6472211850b41f52f323142a40b8ff6ac301e1141fcc8219d9ab805214e8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 420, + "startColumn": 43, + "charOffset": 10923, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 418, + "startColumn": 43, + "charOffset": 10830, + "charLength": 1, + "snippet": { + "text": "\t\t\t}\n\t\t\t// Check if tile is part of the same house\n\t\t\tif (auto tileHouse = tile->getHouse(); !tileHouse || house != tileHouse) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ff399525abeef5f8ac65e4b514cd8d7ca912b6e19d20c7d16ee0e52c9396d44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 425, + "startColumn": 4, + "charOffset": 11014, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 423, + "startColumn": 4, + "charOffset": 10978, + "charLength": 3, + "snippet": { + "text": "\n\t\t\t// Clear any existing carpet\n\t\t\tfor (auto tileItem : *tile->getItemList()) {\n\t\t\t\tif (tileItem && tileItem->isCarpet()) {\n\t\t\t\t\ttile->removeThing(tileItem, tileItem->getItemCount());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7876df394464839b642882faee2915bac11d9a449776da4453aacb683cbe512d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 425, + "startColumn": 14, + "charOffset": 11024, + "charLength": 8, + "snippet": { + "text": "tileItem" + } + }, + "contextRegion": { + "startLine": 423, + "startColumn": 14, + "charOffset": 10978, + "charLength": 8, + "snippet": { + "text": "\n\t\t\t// Clear any existing carpet\n\t\t\tfor (auto tileItem : *tile->getItemList()) {\n\t\t\t\tif (tileItem && tileItem->isCarpet()) {\n\t\t\t\t\ttile->removeThing(tileItem, tileItem->getItemCount());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51e3ee4cee479809339a51e45180e91e08148c35782a0b8a5f7e27b7b0a04963" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 438, + "startColumn": 51, + "charOffset": 11367, + "charLength": 7, + "snippet": { + "text": "oldItem" + } + }, + "contextRegion": { + "startLine": 436, + "startColumn": 51, + "charOffset": 11314, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid Tile::onUpdateTileItem(std::shared_ptr oldItem, const ItemType &oldType, std::shared_ptr newItem, const ItemType &newType) {\n\tif ((newItem->hasProperty(CONST_PROP_MOVABLE) || newItem->getContainer()) || (newItem->isWrapable() && newItem->hasProperty(CONST_PROP_MOVABLE) && !oldItem->hasProperty(CONST_PROP_BLOCKPATH))) {\n\t\tauto it = g_game().browseFields.find(getTile());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54bc50e7088c98d9029a0c459444a88cc6e2a7e4072bec0d9f5628160911ff65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 438, + "startColumn": 107, + "charOffset": 11423, + "charLength": 7, + "snippet": { + "text": "newItem" + } + }, + "contextRegion": { + "startLine": 436, + "startColumn": 107, + "charOffset": 11314, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid Tile::onUpdateTileItem(std::shared_ptr oldItem, const ItemType &oldType, std::shared_ptr newItem, const ItemType &newType) {\n\tif ((newItem->hasProperty(CONST_PROP_MOVABLE) || newItem->getContainer()) || (newItem->isWrapable() && newItem->hasProperty(CONST_PROP_MOVABLE) && !oldItem->hasProperty(CONST_PROP_BLOCKPATH))) {\n\t\tauto it = g_game().browseFields.find(getTile());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5a2c941a5b01597caf7a585252d971c797efd4c040bbb73959b43c3e5f94547" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 439, + "startColumn": 2, + "charOffset": 11460, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 437, + "startColumn": 2, + "charOffset": 11316, + "charLength": 2, + "snippet": { + "text": "\nvoid Tile::onUpdateTileItem(std::shared_ptr oldItem, const ItemType &oldType, std::shared_ptr newItem, const ItemType &newType) {\n\tif ((newItem->hasProperty(CONST_PROP_MOVABLE) || newItem->getContainer()) || (newItem->isWrapable() && newItem->hasProperty(CONST_PROP_MOVABLE) && !oldItem->hasProperty(CONST_PROP_BLOCKPATH))) {\n\t\tauto it = g_game().browseFields.find(getTile());\n\t\tif (it != g_game().browseFields.end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23641c19498f9102dfcfd4893b7e41356d2e7d882620619e9a312b7783ea5ee6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 468, + "startColumn": 2, + "charOffset": 12705, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 466, + "startColumn": 2, + "charOffset": 12684, + "charLength": 3, + "snippet": { + "text": "\n\t// send to client\n\tfor (const auto &spectator : spectators) {\n\t\tif (const auto &tmpPlayer = spectator->getPlayer()) {\n\t\t\ttmpPlayer->sendUpdateTileItem(static_self_cast(), cylinderMapPos, newItem);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3d8044aa891e371d7615883a5fb5993cd3c94120dc6bdfef3b1d59be3194d3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 475, + "startColumn": 2, + "charOffset": 12916, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 473, + "startColumn": 2, + "charOffset": 12896, + "charLength": 3, + "snippet": { + "text": "\n\t// event methods\n\tfor (const auto &spectator : spectators) {\n\t\tspectator->onUpdateTileItem(static_self_cast(), cylinderMapPos, oldItem, oldType, newItem, newType);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec4d018c66dc7b7f12c15882fa46418968acb63dc8459e97689e4ff68d3a3412" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'onRemoveTileItem' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 480, + "startColumn": 12, + "charOffset": 13085, + "charLength": 16, + "snippet": { + "text": "onRemoveTileItem" + } + }, + "contextRegion": { + "startLine": 478, + "startColumn": 12, + "charOffset": 13071, + "charLength": 16, + "snippet": { + "text": "}\n\nvoid Tile::onRemoveTileItem(const CreatureVector &spectators, const std::vector &oldStackPosVector, std::shared_ptr item) {\n\tif ((item->hasProperty(CONST_PROP_MOVABLE) || item->getContainer()) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) {\n\t\tauto it = g_game().browseFields.find(getTile());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5bd99c4beaad259ee3014b2bd86a1290b5a04f00a722f4d798bb1d2790d65ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'onRemoveTileItem' has cognitive complexity of 54 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 480, + "startColumn": 12, + "charOffset": 13085, + "charLength": 16, + "snippet": { + "text": "onRemoveTileItem" + } + }, + "contextRegion": { + "startLine": 478, + "startColumn": 12, + "charOffset": 13071, + "charLength": 16, + "snippet": { + "text": "}\n\nvoid Tile::onRemoveTileItem(const CreatureVector &spectators, const std::vector &oldStackPosVector, std::shared_ptr item) {\n\tif ((item->hasProperty(CONST_PROP_MOVABLE) || item->getContainer()) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) {\n\t\tauto it = g_game().browseFields.find(getTile());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56e420c78b53d267c1f6b2bcfc3095b3592929101fe63393173ad37302a0d143" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 480, + "startColumn": 132, + "charOffset": 13205, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 478, + "startColumn": 132, + "charOffset": 13071, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Tile::onRemoveTileItem(const CreatureVector &spectators, const std::vector &oldStackPosVector, std::shared_ptr item) {\n\tif ((item->hasProperty(CONST_PROP_MOVABLE) || item->getContainer()) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) {\n\t\tauto it = g_game().browseFields.find(getTile());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b410ce9ed5358ec942524917e1451f25a1c12ec411cc925c1e1699912dbd0dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 490, + "startColumn": 2, + "charOffset": 13632, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 488, + "startColumn": 2, + "charOffset": 13624, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t}\n\tfor (auto &zone : getZones()) {\n\t\tzone->itemRemoved(item);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4ffdece6cbe9377dd1c447b3802ac883703afb52e0591b90f22e2d963a5305e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &zone' can be declared as 'const auto &zone'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 490, + "startColumn": 7, + "charOffset": 13637, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 488, + "startColumn": 7, + "charOffset": 13624, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t}\n\tfor (auto &zone : getZones()) {\n\t\tzone->itemRemoved(item);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8d6465acd3decc86dcb186aaec3bc000a0c0631ff04bd9f490f321396711c1d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 501, + "startColumn": 2, + "charOffset": 13857, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 499, + "startColumn": 2, + "charOffset": 13822, + "charLength": 3, + "snippet": { + "text": "\t// send to client\n\tsize_t i = 0;\n\tfor (std::shared_ptr spectator : spectators) {\n\t\tif (std::shared_ptr tmpPlayer = spectator->getPlayer()) {\n\t\t\ttmpPlayer->sendRemoveTileThing(cylinderMapPos, oldStackPosVector[i++]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a005cc6b625a1003219a013bcf2d7c155b967149f4a33564bf58aeea6c49190" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 501, + "startColumn": 33, + "charOffset": 13888, + "charLength": 9, + "snippet": { + "text": "spectator" + } + }, + "contextRegion": { + "startLine": 499, + "startColumn": 33, + "charOffset": 13822, + "charLength": 9, + "snippet": { + "text": "\t// send to client\n\tsize_t i = 0;\n\tfor (std::shared_ptr spectator : spectators) {\n\t\tif (std::shared_ptr tmpPlayer = spectator->getPlayer()) {\n\t\t\ttmpPlayer->sendRemoveTileThing(cylinderMapPos, oldStackPosVector[i++]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84ccbb395e0fa9773674706f8b49c75312929988eb99082c398fc9563bdeb359" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 508, + "startColumn": 2, + "charOffset": 14084, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 506, + "startColumn": 2, + "charOffset": 14064, + "charLength": 3, + "snippet": { + "text": "\n\t// event methods\n\tfor (std::shared_ptr spectator : spectators) {\n\t\tspectator->onRemoveTileItem(static_self_cast(), cylinderMapPos, iType, item);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76e8c18dc692e515c0a019cbe73db0a2b8049f458c4e5c2bbf7c98c0422b0ab2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 508, + "startColumn": 33, + "charOffset": 14115, + "charLength": 9, + "snippet": { + "text": "spectator" + } + }, + "contextRegion": { + "startLine": 506, + "startColumn": 33, + "charOffset": 14064, + "charLength": 9, + "snippet": { + "text": "\n\t// event methods\n\tfor (std::shared_ptr spectator : spectators) {\n\t\tspectator->onRemoveTileItem(static_self_cast(), cylinderMapPos, iType, item);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45a624739301b62290371e1e8bf0e4d4de1ad234ac09228685acd528f6d2d6bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto items' can be declared as 'auto *items'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 513, + "startColumn": 3, + "charOffset": 14346, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 511, + "startColumn": 3, + "charOffset": 14230, + "charLength": 4, + "snippet": { + "text": "\n\tif (!hasFlag(TILESTATE_PROTECTIONZONE) || g_configManager().getBoolean(CLEAN_PROTECTION_ZONES, __FUNCTION__)) {\n\t\tauto items = getItemList();\n\t\tif (!items || items->empty()) {\n\t\t\tg_game().removeTileToClean(static_self_cast());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06cf25b240615dda1391e7be35b7ec763059b467d2754d61c509edd536d7cf10" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 514, + "startColumn": 7, + "charOffset": 14380, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 512, + "startColumn": 7, + "charOffset": 14231, + "charLength": 1, + "snippet": { + "text": "\tif (!hasFlag(TILESTATE_PROTECTIONZONE) || g_configManager().getBoolean(CLEAN_PROTECTION_ZONES, __FUNCTION__)) {\n\t\tauto items = getItemList();\n\t\tif (!items || items->empty()) {\n\t\t\tg_game().removeTileToClean(static_self_cast());\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9adee3349772bf539bdf532345c66177832e0eb4916282e429503cdb9849ab08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 514, + "startColumn": 8, + "charOffset": 14381, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 512, + "startColumn": 8, + "charOffset": 14231, + "charLength": 5, + "snippet": { + "text": "\tif (!hasFlag(TILESTATE_PROTECTIONZONE) || g_configManager().getBoolean(CLEAN_PROTECTION_ZONES, __FUNCTION__)) {\n\t\tauto items = getItemList();\n\t\tif (!items || items->empty()) {\n\t\t\tg_game().removeTileToClean(static_self_cast());\n\t\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71d5ceb914ea85791e416d4a6e5604abc7389f6b5da9331cd1fd9155dfd2a2d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 520, + "startColumn": 3, + "charOffset": 14503, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 518, + "startColumn": 3, + "charOffset": 14480, + "charLength": 3, + "snippet": { + "text": "\n\t\tbool ret = false;\n\t\tfor (auto toCheck : *items) {\n\t\t\tif (toCheck->isCleanable()) {\n\t\t\t\tret = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c788150df9bbfc4b079387dbc6af86f4ffde005f4540f11d9502d87a67d7a627" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 520, + "startColumn": 13, + "charOffset": 14513, + "charLength": 7, + "snippet": { + "text": "toCheck" + } + }, + "contextRegion": { + "startLine": 518, + "startColumn": 13, + "charOffset": 14480, + "charLength": 7, + "snippet": { + "text": "\n\t\tbool ret = false;\n\t\tfor (auto toCheck : *items) {\n\t\t\tif (toCheck->isCleanable()) {\n\t\t\t\tret = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6236a7c7f768fbcf154e3bc151280b8ebd173ae3c73581ca5a0f617f2a5dd6b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 537, + "startColumn": 7, + "charOffset": 14845, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 535, + "startColumn": 7, + "charOffset": 14808, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\t\tauto house = getHouse();\n\t\tif (!house) {\n\t\t\treturn;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a676221bc94a16aee83fb078d92daa8c9bcc17f6743742f62aee2312d1edcd2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 542, + "startColumn": 8, + "charOffset": 14929, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 540, + "startColumn": 8, + "charOffset": 14870, + "charLength": 1, + "snippet": { + "text": "\n\t\tfor (const auto &tile : getSurroundingTiles()) {\n\t\t\tif (!tile || !tile->getGround() || tile->getGround()->getID() != getGround()->getID()) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "945a33e6985860eea375de9047e28de4b59a8bad4b2314a5c06b1590d2b7f6fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 542, + "startColumn": 17, + "charOffset": 14938, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 540, + "startColumn": 17, + "charOffset": 14870, + "charLength": 1, + "snippet": { + "text": "\n\t\tfor (const auto &tile : getSurroundingTiles()) {\n\t\t\tif (!tile || !tile->getGround() || tile->getGround()->getID() != getGround()->getID()) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fac293cdcebbd72c56edb36d7e8051a40a1cf93e74c08691a5d8e203dd2faf94" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 546, + "startColumn": 8, + "charOffset": 15081, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 544, + "startColumn": 8, + "charOffset": 15028, + "charLength": 1, + "snippet": { + "text": "\t\t\t}\n\t\t\tauto topItem = tile->getTopTopItem();\n\t\t\tif (!topItem || !topItem->canReceiveAutoCarpet()) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9527c0f8e62d4a83653da8a64631d58398c7d2b090263e4007425148121afb25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 550, + "startColumn": 43, + "charOffset": 15236, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 548, + "startColumn": 43, + "charOffset": 15143, + "charLength": 1, + "snippet": { + "text": "\t\t\t}\n\t\t\t// Check if tile is part of the same house\n\t\t\tif (auto tileHouse = tile->getHouse(); !tileHouse || house != tileHouse) {\n\t\t\t\tcontinue;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c075dd4c5bcad6aea921f717b64efa23407f13dcea4f0b6a70a0ddfd3ece353e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 554, + "startColumn": 4, + "charOffset": 15295, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 552, + "startColumn": 4, + "charOffset": 15286, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (auto tileItem : *tile->getItemList()) {\n\t\t\t\tif (tileItem && tileItem->getID() == item->getID()) {\n\t\t\t\t\ttile->removeThing(tileItem, tileItem->getItemCount());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3977ce70eec7adf6ed208f112c897b898cdb1104204ac4c64fc573c3dd4bb45e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 554, + "startColumn": 14, + "charOffset": 15305, + "charLength": 8, + "snippet": { + "text": "tileItem" + } + }, + "contextRegion": { + "startLine": 552, + "startColumn": 14, + "charOffset": 15286, + "charLength": 8, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfor (auto tileItem : *tile->getItemList()) {\n\t\t\t\tif (tileItem && tileItem->getID() == item->getID()) {\n\t\t\t\t\ttile->removeThing(tileItem, tileItem->getItemCount());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c7e2e7e8fd8f1cb87de234b9a7def84c6563254313bd62d84588cc152522de6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 567, + "startColumn": 2, + "charOffset": 15610, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 565, + "startColumn": 2, + "charOffset": 15588, + "charLength": 3, + "snippet": { + "text": "\n\t// send to clients\n\tfor (std::shared_ptr spectator : spectators) {\n\t\tspectator->getPlayer()->sendUpdateTile(getTile(), cylinderMapPos);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bbedb3c58aa1d7bcbb3a313b49f4c33ed1ec8739c35bbc1fc6549e12c70d82a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 567, + "startColumn": 33, + "charOffset": 15641, + "charLength": 9, + "snippet": { + "text": "spectator" + } + }, + "contextRegion": { + "startLine": 565, + "startColumn": 33, + "charOffset": 15588, + "charLength": 9, + "snippet": { + "text": "\n\t// send to clients\n\tfor (std::shared_ptr spectator : spectators) {\n\t\tspectator->getPlayer()->sendUpdateTile(getTile(), cylinderMapPos);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b57c1202280853b08919c26ecd2c525f9c0cc6b638ed155917f975dce5fce211" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 572, + "startColumn": 19, + "charOffset": 15760, + "charLength": 8, + "snippet": { + "text": "queryAdd" + } + }, + "contextRegion": { + "startLine": 570, + "startColumn": 19, + "charOffset": 15739, + "charLength": 8, + "snippet": { + "text": "}\n\nReturnValue Tile::queryAdd(int32_t, const std::shared_ptr &thing, uint32_t, uint32_t tileFlags, std::shared_ptr) {\n\tif (hasBitSet(FLAG_NOLIMIT, tileFlags)) {\n\t\treturn RETURNVALUE_NOERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16b8336d09614e1b5ef9576d4e96d6efe7edfe4a895ea17030c3848128ae7806" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'queryAdd' has cognitive complexity of 355 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 572, + "startColumn": 19, + "charOffset": 15760, + "charLength": 8, + "snippet": { + "text": "queryAdd" + } + }, + "contextRegion": { + "startLine": 570, + "startColumn": 19, + "charOffset": 15739, + "charLength": 8, + "snippet": { + "text": "}\n\nReturnValue Tile::queryAdd(int32_t, const std::shared_ptr &thing, uint32_t, uint32_t tileFlags, std::shared_ptr) {\n\tif (hasBitSet(FLAG_NOLIMIT, tileFlags)) {\n\t\treturn RETURNVALUE_NOERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aaf1ce573230dbba7ad82aefec6251238670a42de576fde94f7a4fca4152164f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 572, + "startColumn": 35, + "charOffset": 15776, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 570, + "startColumn": 35, + "charOffset": 15739, + "charLength": 1, + "snippet": { + "text": "}\n\nReturnValue Tile::queryAdd(int32_t, const std::shared_ptr &thing, uint32_t, uint32_t tileFlags, std::shared_ptr) {\n\tif (hasBitSet(FLAG_NOLIMIT, tileFlags)) {\n\t\treturn RETURNVALUE_NOERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88db211e7923b289cfe004f7d0630351502a7e65b54871d00eb82aee95cdbf35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 577, + "startColumn": 2, + "charOffset": 15952, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 575, + "startColumn": 2, + "charOffset": 15947, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (auto creature = thing->getCreature()) {\n\t\tif (creature->getNpc()) {\n\t\t\tReturnValue returnValue = checkNpcCanWalkIntoTile();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "505030b4d6c14ce7a231a2b7311fa40756b563f23c5473e012879527ba9e3284" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 585, + "startColumn": 79, + "charOffset": 16237, + "charLength": 1, + "snippet": { + "text": "|" + } + }, + "contextRegion": { + "startLine": 583, + "startColumn": 79, + "charOffset": 16154, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif (hasBitSet(FLAG_PATHFINDING, tileFlags) && hasFlag(TILESTATE_FLOORCHANGE | TILESTATE_TELEPORT)) {\n\t\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dad141aa0d250c63512856ed064374f56cb6157b25d561b189e9184b6db7732d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 594, + "startColumn": 41, + "charOffset": 16504, + "charLength": 1, + "snippet": { + "text": "|" + } + }, + "contextRegion": { + "startLine": 592, + "startColumn": 41, + "charOffset": 16396, + "charLength": 1, + "snippet": { + "text": "\n\t\tif (std::shared_ptr monster = creature->getMonster()) {\n\t\t\tif (hasFlag(TILESTATE_PROTECTIONZONE | TILESTATE_FLOORCHANGE | TILESTATE_TELEPORT) && (!monster->isFamiliar() || (monster->isFamiliar() && monster->getMaster() && monster->getMaster()->getAttackedCreature()))) {\n\t\t\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5c38e91bc6aee5cc719a7c76dd8b2d08ed1bb4ed6927c6858bc7d1833ae2a51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 594, + "startColumn": 65, + "charOffset": 16528, + "charLength": 1, + "snippet": { + "text": "|" + } + }, + "contextRegion": { + "startLine": 592, + "startColumn": 65, + "charOffset": 16396, + "charLength": 1, + "snippet": { + "text": "\n\t\tif (std::shared_ptr monster = creature->getMonster()) {\n\t\t\tif (hasFlag(TILESTATE_PROTECTIONZONE | TILESTATE_FLOORCHANGE | TILESTATE_TELEPORT) && (!monster->isFamiliar() || (monster->isFamiliar() && monster->getMaster() && monster->getMaster()->getAttackedCreature()))) {\n\t\t\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b365a9ae6000256174f7496a420470ccb808ce52d25f217c6a31dcf399a43ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 605, + "startColumn": 4, + "charOffset": 16954, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 603, + "startColumn": 4, + "charOffset": 16897, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tconst CreatureVector* creatures = getCreatures();\n\t\t\tif (monster->canPushCreatures() && !monster->isSummon()) {\n\t\t\t\tif (creatures) {\n\t\t\t\t\tfor (auto &tileCreature : *creatures) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2e2891668e6950e25b23d87c7573e12dc1a11b84d25fd9b87df8c8000a1de4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 606, + "startColumn": 9, + "charOffset": 17021, + "charLength": 9, + "snippet": { + "text": "creatures" + } + }, + "contextRegion": { + "startLine": 604, + "startColumn": 9, + "charOffset": 16898, + "charLength": 9, + "snippet": { + "text": "\t\t\tconst CreatureVector* creatures = getCreatures();\n\t\t\tif (monster->canPushCreatures() && !monster->isSummon()) {\n\t\t\t\tif (creatures) {\n\t\t\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\t\t\tif (tileCreature->getPlayer() && tileCreature->getPlayer()->isInGhostMode()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8184dc7b15fbfd15d68d631c436fc7b8a198e91e65d314414b9d279ea047fdc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CreatureVector *' (aka 'const vector> *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 606, + "startColumn": 9, + "charOffset": 17021, + "charLength": 9, + "snippet": { + "text": "creatures" + } + }, + "contextRegion": { + "startLine": 604, + "startColumn": 9, + "charOffset": 16898, + "charLength": 9, + "snippet": { + "text": "\t\t\tconst CreatureVector* creatures = getCreatures();\n\t\t\tif (monster->canPushCreatures() && !monster->isSummon()) {\n\t\t\t\tif (creatures) {\n\t\t\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\t\t\tif (tileCreature->getPlayer() && tileCreature->getPlayer()->isInGhostMode()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "072f1c129b4fb6da827caaec4554c643f5bd51bfa45bf694c5664c675da0127d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 607, + "startColumn": 6, + "charOffset": 17039, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 605, + "startColumn": 6, + "charOffset": 16951, + "charLength": 3, + "snippet": { + "text": "\t\t\tif (monster->canPushCreatures() && !monster->isSummon()) {\n\t\t\t\tif (creatures) {\n\t\t\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\t\t\tif (tileCreature->getPlayer() && tileCreature->getPlayer()->isInGhostMode()) {\n\t\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f354923caf9f3b2e7609e8eb7321bc250ea859ec29e32d44ee765238cfd0c536" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &tileCreature' can be declared as 'const auto &tileCreature'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 607, + "startColumn": 11, + "charOffset": 17044, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 605, + "startColumn": 11, + "charOffset": 16951, + "charLength": 4, + "snippet": { + "text": "\t\t\tif (monster->canPushCreatures() && !monster->isSummon()) {\n\t\t\t\tif (creatures) {\n\t\t\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\t\t\tif (tileCreature->getPlayer() && tileCreature->getPlayer()->isInGhostMode()) {\n\t\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78a533ad866a9660018825ba8af5cf342852ba15d54a4d5ffd3cda8ed71ae152" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 613, + "startColumn": 11, + "charOffset": 17277, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 611, + "startColumn": 11, + "charOffset": 17189, + "charLength": 1, + "snippet": { + "text": "\n\t\t\t\t\t\tstd::shared_ptr creatureMonster = tileCreature->getMonster();\n\t\t\t\t\t\tif (!creatureMonster || !tileCreature->isPushable() || (creatureMonster->isSummon() && creatureMonster->getMaster()->getPlayer())) {\n\t\t\t\t\t\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1327791133c6369f1fda85de5e9106066d24026379f809e5748ae52af8204e26" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 618, + "startColumn": 15, + "charOffset": 17480, + "charLength": 9, + "snippet": { + "text": "creatures" + } + }, + "contextRegion": { + "startLine": 616, + "startColumn": 15, + "charOffset": 17453, + "charLength": 9, + "snippet": { + "text": "\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (creatures && !creatures->empty()) {\n\t\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\t\tif (!tileCreature->isInGhostMode()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca2049af9940ab680d031417ed005f564e4fcf2d2c7377e79c5e90b2984d1064" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CreatureVector *' (aka 'const vector> *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 618, + "startColumn": 15, + "charOffset": 17480, + "charLength": 9, + "snippet": { + "text": "creatures" + } + }, + "contextRegion": { + "startLine": 616, + "startColumn": 15, + "charOffset": 17453, + "charLength": 9, + "snippet": { + "text": "\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (creatures && !creatures->empty()) {\n\t\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\t\tif (!tileCreature->isInGhostMode()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "544791584332ea1ee05f337acf6ef2e088915ba3bdff510cf60178ef792c6004" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 618, + "startColumn": 25, + "charOffset": 17490, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 616, + "startColumn": 25, + "charOffset": 17453, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (creatures && !creatures->empty()) {\n\t\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\t\tif (!tileCreature->isInGhostMode()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9bf2719e4dc8eb98ed9e2350485574e4df9a2d8271b52d17bd6d82cb069ab72b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 619, + "startColumn": 5, + "charOffset": 17520, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 617, + "startColumn": 5, + "charOffset": 17460, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t} else if (creatures && !creatures->empty()) {\n\t\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\t\tif (!tileCreature->isInGhostMode()) {\n\t\t\t\t\t\treturn RETURNVALUE_NOTENOUGHROOM;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee02c4e7f480283a4bd9963c015590a083a2947c27f6152bb374de5667dc4677" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &tileCreature' can be declared as 'const auto &tileCreature'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 619, + "startColumn": 10, + "charOffset": 17525, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 617, + "startColumn": 10, + "charOffset": 17460, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t} else if (creatures && !creatures->empty()) {\n\t\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\t\tif (!tileCreature->isInGhostMode()) {\n\t\t\t\t\t\treturn RETURNVALUE_NOTENOUGHROOM;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4afaffcddaa402f1a426a8e5bab904ebcbc020f2acee4d2f8fe256099cd5b6a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 662, + "startColumn": 3, + "charOffset": 18862, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 660, + "startColumn": 3, + "charOffset": 18807, + "charLength": 2, + "snippet": { + "text": "\n\t\tconst CreatureVector* creatures = getCreatures();\n\t\tif (std::shared_ptr player = creature->getPlayer()) {\n\t\t\tif (creatures && !creatures->empty() && !hasBitSet(FLAG_IGNOREBLOCKCREATURE, tileFlags) && !player->isAccessPlayer()) {\n\t\t\t\tfor (auto &tileCreature : *creatures) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ec61032b6050bf81e93f714dc4b83dd295b9af441c2e96ce4a46818ead1f5e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 663, + "startColumn": 8, + "charOffset": 18931, + "charLength": 9, + "snippet": { + "text": "creatures" + } + }, + "contextRegion": { + "startLine": 661, + "startColumn": 8, + "charOffset": 18808, + "charLength": 9, + "snippet": { + "text": "\t\tconst CreatureVector* creatures = getCreatures();\n\t\tif (std::shared_ptr player = creature->getPlayer()) {\n\t\t\tif (creatures && !creatures->empty() && !hasBitSet(FLAG_IGNOREBLOCKCREATURE, tileFlags) && !player->isAccessPlayer()) {\n\t\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\t\tif (!player->canWalkthrough(tileCreature)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f13ecaa81471a032fc65249f13e38d2e868c8ccd46aabd52205719b73ff59b51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CreatureVector *' (aka 'const vector> *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 663, + "startColumn": 8, + "charOffset": 18931, + "charLength": 9, + "snippet": { + "text": "creatures" + } + }, + "contextRegion": { + "startLine": 661, + "startColumn": 8, + "charOffset": 18808, + "charLength": 9, + "snippet": { + "text": "\t\tconst CreatureVector* creatures = getCreatures();\n\t\tif (std::shared_ptr player = creature->getPlayer()) {\n\t\t\tif (creatures && !creatures->empty() && !hasBitSet(FLAG_IGNOREBLOCKCREATURE, tileFlags) && !player->isAccessPlayer()) {\n\t\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\t\tif (!player->canWalkthrough(tileCreature)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "421a4a04c84391d67507e77fa5b39338e3986445591fb52e47d1589c63e13136" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 663, + "startColumn": 92, + "charOffset": 19015, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 661, + "startColumn": 92, + "charOffset": 18808, + "charLength": 2, + "snippet": { + "text": "\t\tconst CreatureVector* creatures = getCreatures();\n\t\tif (std::shared_ptr player = creature->getPlayer()) {\n\t\t\tif (creatures && !creatures->empty() && !hasBitSet(FLAG_IGNOREBLOCKCREATURE, tileFlags) && !player->isAccessPlayer()) {\n\t\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\t\tif (!player->canWalkthrough(tileCreature)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2aed0f9ae4a26b022327ffec86c8d2c1dd7f3519b94ec676157ebc730913a7c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 664, + "startColumn": 5, + "charOffset": 19051, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 662, + "startColumn": 5, + "charOffset": 18860, + "charLength": 3, + "snippet": { + "text": "\t\tif (std::shared_ptr player = creature->getPlayer()) {\n\t\t\tif (creatures && !creatures->empty() && !hasBitSet(FLAG_IGNOREBLOCKCREATURE, tileFlags) && !player->isAccessPlayer()) {\n\t\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\t\tif (!player->canWalkthrough(tileCreature)) {\n\t\t\t\t\t\treturn RETURNVALUE_NOTPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ff9129d2a6db00e01f9906bba3157f43861cf6ff70cfa32fe4c2e4bd7d796be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &tileCreature' can be declared as 'const auto &tileCreature'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 664, + "startColumn": 10, + "charOffset": 19056, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 662, + "startColumn": 10, + "charOffset": 18860, + "charLength": 4, + "snippet": { + "text": "\t\tif (std::shared_ptr player = creature->getPlayer()) {\n\t\t\tif (creatures && !creatures->empty() && !hasBitSet(FLAG_IGNOREBLOCKCREATURE, tileFlags) && !player->isAccessPlayer()) {\n\t\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\t\tif (!player->canWalkthrough(tileCreature)) {\n\t\t\t\t\t\treturn RETURNVALUE_NOTPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4065dd04fab1991aef052a7ffa87adffbd87589598fb5aff3fbb06080ca1daaa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 688, + "startColumn": 6, + "charOffset": 20074, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 686, + "startColumn": 6, + "charOffset": 19961, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tauto accountPlayers = g_game().getPlayersByAccount(player->getAccount());\n\t\t\t\t\tint countOutsizePZ = 0;\n\t\t\t\t\tfor (const auto &accountPlayer : accountPlayers) {\n\t\t\t\t\t\tif (accountPlayer == player || accountPlayer->isOffline()) {\n\t\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "736550bac0ea142b2c6ab3d03118a353740fa90f80981ca02ce25042560c677c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 703, + "startColumn": 5, + "charOffset": 20768, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 701, + "startColumn": 5, + "charOffset": 20714, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\t\t\tif (playerTile && player->isPzLocked()) {\n\t\t\t\tif (!playerTile->hasFlag(TILESTATE_PVPZONE)) {\n\t\t\t\t\t// player is trying to enter a pvp zone while being pz-locked\n\t\t\t\t\tif (hasFlag(TILESTATE_PVPZONE)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42e39bf53b645f5d098baed66da1516b53fa8b94c0a39511d3f1e00c69fcb621" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 718, + "startColumn": 14, + "charOffset": 21481, + "charLength": 9, + "snippet": { + "text": "creatures" + } + }, + "contextRegion": { + "startLine": 716, + "startColumn": 14, + "charOffset": 21457, + "charLength": 9, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t}\n\t\t} else if (creatures && !creatures->empty() && !hasBitSet(FLAG_IGNOREBLOCKCREATURE, tileFlags)) {\n\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\tif (!tileCreature->isInGhostMode()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9527c0f8e62d4a83653da8a64631d58398c7d2b090263e4007425148121afb25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CreatureVector *' (aka 'const vector> *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 718, + "startColumn": 14, + "charOffset": 21481, + "charLength": 9, + "snippet": { + "text": "creatures" + } + }, + "contextRegion": { + "startLine": 716, + "startColumn": 14, + "charOffset": 21457, + "charLength": 9, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t}\n\t\t} else if (creatures && !creatures->empty() && !hasBitSet(FLAG_IGNOREBLOCKCREATURE, tileFlags)) {\n\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\tif (!tileCreature->isInGhostMode()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afe2cc151cc836e83998b3c2a6512222a233c8676143a5e841d7ab96decf7d1f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 718, + "startColumn": 47, + "charOffset": 21514, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 716, + "startColumn": 47, + "charOffset": 21457, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t}\n\t\t} else if (creatures && !creatures->empty() && !hasBitSet(FLAG_IGNOREBLOCKCREATURE, tileFlags)) {\n\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\tif (!tileCreature->isInGhostMode()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5bf685a6aec12c0a9525b73876b41b1f1f7e52a3729ad76292e953640c8556cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 719, + "startColumn": 4, + "charOffset": 21571, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 717, + "startColumn": 4, + "charOffset": 21463, + "charLength": 3, + "snippet": { + "text": "\t\t\t}\n\t\t} else if (creatures && !creatures->empty() && !hasBitSet(FLAG_IGNOREBLOCKCREATURE, tileFlags)) {\n\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\tif (!tileCreature->isInGhostMode()) {\n\t\t\t\t\treturn RETURNVALUE_NOTENOUGHROOM;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17023d0edfc6f134e695b05420fa32ed70457b7595f9eb0cd4f8dc0ebd92880b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &tileCreature' can be declared as 'const auto &tileCreature'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 719, + "startColumn": 9, + "charOffset": 21576, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 717, + "startColumn": 9, + "charOffset": 21463, + "charLength": 4, + "snippet": { + "text": "\t\t\t}\n\t\t} else if (creatures && !creatures->empty() && !hasBitSet(FLAG_IGNOREBLOCKCREATURE, tileFlags)) {\n\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\tif (!tileCreature->isInGhostMode()) {\n\t\t\t\t\treturn RETURNVALUE_NOTENOUGHROOM;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "847f1655616596eb3eaa6a39ecc2a6a949939e685530eb04986eeeeb3f042356" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto fieldList' can be declared as 'auto *const fieldList'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 731, + "startColumn": 10, + "charOffset": 21997, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 729, + "startColumn": 10, + "charOffset": 21891, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t// NO PVP magic wall or wild growth field check\n\t\t\t\tif (creature && creature->getPlayer()) {\n\t\t\t\t\tif (const auto fieldList = getItemList()) {\n\t\t\t\t\t\tfor (auto &findfield : *fieldList) {\n\t\t\t\t\t\t\tif (findfield && (findfield->getID() == ITEM_WILDGROWTH_SAFE || findfield->getID() == ITEM_MAGICWALL_SAFE)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed8f2eace565a1c7f18182a65226a987e7fbff69bf735d34af6fd52c029fefba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 732, + "startColumn": 7, + "charOffset": 22043, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 730, + "startColumn": 7, + "charOffset": 21943, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tif (creature && creature->getPlayer()) {\n\t\t\t\t\tif (const auto fieldList = getItemList()) {\n\t\t\t\t\t\tfor (auto &findfield : *fieldList) {\n\t\t\t\t\t\t\tif (findfield && (findfield->getID() == ITEM_WILDGROWTH_SAFE || findfield->getID() == ITEM_MAGICWALL_SAFE)) {\n\t\t\t\t\t\t\t\tif (!creature->isInGhostMode()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2771618eb758678ffa08c516f0bd301b9ecf2c1b246feca1f926e64cd286a942" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 735, + "startColumn": 19, + "charOffset": 22257, + "charLength": 18, + "snippet": { + "text": "internalRemoveItem" + } + }, + "contextRegion": { + "startLine": 733, + "startColumn": 19, + "charOffset": 22080, + "charLength": 18, + "snippet": { + "text": "\t\t\t\t\t\t\tif (findfield && (findfield->getID() == ITEM_WILDGROWTH_SAFE || findfield->getID() == ITEM_MAGICWALL_SAFE)) {\n\t\t\t\t\t\t\t\tif (!creature->isInGhostMode()) {\n\t\t\t\t\t\t\t\t\tg_game().internalRemoveItem(findfield, 1);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn RETURNVALUE_NOERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58f003a4e095b30013ab2dbf88bbf966a6d4923357ebbc4e4d1ea8554f1200dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'const auto items' can be declared as 'auto *const items'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 753, + "startColumn": 8, + "charOffset": 22688, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 751, + "startColumn": 8, + "charOffset": 22675, + "charLength": 5, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (const auto items = getItemList()) {\n\t\t\t\tfor (auto &item : *items) {\n\t\t\t\t\tconst ItemType &iiType = Item::items[item->getID()];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f6154f8d065ee3de7942a8b78b276d7c74b74e854a7e69ac8b519b06547fa2b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 754, + "startColumn": 5, + "charOffset": 22728, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 752, + "startColumn": 5, + "charOffset": 22680, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tif (const auto items = getItemList()) {\n\t\t\t\tfor (auto &item : *items) {\n\t\t\t\t\tconst ItemType &iiType = Item::items[item->getID()];\n\t\t\t\t\tif (iiType.blockSolid && (!iiType.movable || item->hasAttribute(ItemAttribute_t::UNIQUEID))) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbbf43f0515e9dd69c0c145fcb08527bdfd70c1213eba31d68650b2ae5b68b6e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 764, + "startColumn": 7, + "charOffset": 23071, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 762, + "startColumn": 7, + "charOffset": 22974, + "charLength": 5, + "snippet": { + "text": "\t} else if (auto item = thing->getItem()) {\n\t\tconst TileItemVector* items = getItemList();\n\t\tif (items && items->size() >= 0x3E8) {\n\t\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a14e577a81d30d55c6b891d5cc4478d1d464e638a7cf3c84747ba3813aaff2b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 764, + "startColumn": 7, + "charOffset": 23071, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 762, + "startColumn": 7, + "charOffset": 22974, + "charLength": 5, + "snippet": { + "text": "\t} else if (auto item = thing->getItem()) {\n\t\tconst TileItemVector* items = getItemList();\n\t\tif (items && items->size() >= 0x3E8) {\n\t\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3bc72e9f803189f4f507844f1e60cea3b475d6cd0a5b1577ab4603c3e5b459be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 764, + "startColumn": 13, + "charOffset": 23077, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 762, + "startColumn": 13, + "charOffset": 22974, + "charLength": 2, + "snippet": { + "text": "\t} else if (auto item = thing->getItem()) {\n\t\tconst TileItemVector* items = getItemList();\n\t\tif (items && items->size() >= 0x3E8) {\n\t\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f12722b5ce284b3569d027126ac7cd33b721b6ef62ac1b08da42eb06e90dfe3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 764, + "startColumn": 33, + "charOffset": 23097, + "charLength": 5, + "snippet": { + "text": "0x3E8" + } + }, + "contextRegion": { + "startLine": 762, + "startColumn": 33, + "charOffset": 22974, + "charLength": 5, + "snippet": { + "text": "\t} else if (auto item = thing->getItem()) {\n\t\tconst TileItemVector* items = getItemList();\n\t\tif (items && items->size() >= 0x3E8) {\n\t\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39bf4819c904e49bfc1dafb0d75a1b1647c94d734f691f8593c46deefb7626a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0x3E8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 764, + "startColumn": 33, + "charOffset": 23097, + "charLength": 5, + "snippet": { + "text": "0x3E8" + } + }, + "contextRegion": { + "startLine": 762, + "startColumn": 33, + "charOffset": 22974, + "charLength": 5, + "snippet": { + "text": "\t} else if (auto item = thing->getItem()) {\n\t\tconst TileItemVector* items = getItemList();\n\t\tif (items && items->size() >= 0x3E8) {\n\t\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b8a70c0bee1261027b75e8a4c026aa8d2cdc4bf07ba108537673e3a101da9fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 774, + "startColumn": 7, + "charOffset": 23334, + "charLength": 9, + "snippet": { + "text": "creatures" + } + }, + "contextRegion": { + "startLine": 772, + "startColumn": 7, + "charOffset": 23275, + "charLength": 9, + "snippet": { + "text": "\n\t\tconst CreatureVector* creatures = getCreatures();\n\t\tif (creatures && !creatures->empty() && item->isBlocking() && !hasBitSet(FLAG_IGNOREBLOCKCREATURE, tileFlags)) {\n\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\tif (!tileCreature->isInGhostMode()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20be3ac614560f8f93cf82f7ded647a0b2d0d7bd4182b18eaa78f62dc98903db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const CreatureVector *' (aka 'const vector> *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 774, + "startColumn": 7, + "charOffset": 23334, + "charLength": 9, + "snippet": { + "text": "creatures" + } + }, + "contextRegion": { + "startLine": 772, + "startColumn": 7, + "charOffset": 23275, + "charLength": 9, + "snippet": { + "text": "\n\t\tconst CreatureVector* creatures = getCreatures();\n\t\tif (creatures && !creatures->empty() && item->isBlocking() && !hasBitSet(FLAG_IGNOREBLOCKCREATURE, tileFlags)) {\n\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\tif (!tileCreature->isInGhostMode()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13001ac7aacffb8c188a268b4ab76704ad00753f96ccdf30a83dd94f6b0dd52b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 774, + "startColumn": 62, + "charOffset": 23389, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 772, + "startColumn": 62, + "charOffset": 23275, + "charLength": 2, + "snippet": { + "text": "\n\t\tconst CreatureVector* creatures = getCreatures();\n\t\tif (creatures && !creatures->empty() && item->isBlocking() && !hasBitSet(FLAG_IGNOREBLOCKCREATURE, tileFlags)) {\n\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\tif (!tileCreature->isInGhostMode()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74edf53213821da4c607ac6fa26b099e7fb23088c640c7fa81450f21b39285f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 775, + "startColumn": 4, + "charOffset": 23446, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 773, + "startColumn": 4, + "charOffset": 23276, + "charLength": 3, + "snippet": { + "text": "\t\tconst CreatureVector* creatures = getCreatures();\n\t\tif (creatures && !creatures->empty() && item->isBlocking() && !hasBitSet(FLAG_IGNOREBLOCKCREATURE, tileFlags)) {\n\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\tif (!tileCreature->isInGhostMode()) {\n\t\t\t\t\treturn RETURNVALUE_NOTENOUGHROOM;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de1262614a153daae8f4f24137aae84f08145416f48784600573daa6d3f13642" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &tileCreature' can be declared as 'const auto &tileCreature'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 775, + "startColumn": 9, + "charOffset": 23451, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 773, + "startColumn": 9, + "charOffset": 23276, + "charLength": 4, + "snippet": { + "text": "\t\tconst CreatureVector* creatures = getCreatures();\n\t\tif (creatures && !creatures->empty() && item->isBlocking() && !hasBitSet(FLAG_IGNOREBLOCKCREATURE, tileFlags)) {\n\t\t\tfor (auto &tileCreature : *creatures) {\n\t\t\t\tif (!tileCreature->isInGhostMode()) {\n\t\t\t\t\treturn RETURNVALUE_NOTENOUGHROOM;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c562fed9bd89d6cb549ddb0086320d3e34400622285adeef23f77498150299ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 783, + "startColumn": 8, + "charOffset": 23654, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 781, + "startColumn": 8, + "charOffset": 23582, + "charLength": 5, + "snippet": { + "text": "\n\t\tif (itemIsHangable && hasFlag(TILESTATE_SUPPORTS_HANGABLE)) {\n\t\t\tif (items) {\n\t\t\t\tfor (auto &tileItem : *items) {\n\t\t\t\t\tif (tileItem->isHangable()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "417c9c42293a9a7645a72a6240a00e06f4f103d0b30bed6a380b38b43b170859" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 783, + "startColumn": 8, + "charOffset": 23654, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 781, + "startColumn": 8, + "charOffset": 23582, + "charLength": 5, + "snippet": { + "text": "\n\t\tif (itemIsHangable && hasFlag(TILESTATE_SUPPORTS_HANGABLE)) {\n\t\t\tif (items) {\n\t\t\t\tfor (auto &tileItem : *items) {\n\t\t\t\t\tif (tileItem->isHangable()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc9588e47292c2effb5a3328d0cc5ee4438de92a506856b646ccb347696a295a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 784, + "startColumn": 5, + "charOffset": 23667, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 782, + "startColumn": 5, + "charOffset": 23583, + "charLength": 3, + "snippet": { + "text": "\t\tif (itemIsHangable && hasFlag(TILESTATE_SUPPORTS_HANGABLE)) {\n\t\t\tif (items) {\n\t\t\t\tfor (auto &tileItem : *items) {\n\t\t\t\t\tif (tileItem->isHangable()) {\n\t\t\t\t\t\treturn RETURNVALUE_NEEDEXCHANGE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "704036da54435f108c530183d79c49caf3a2528b0c6abb2c8e62725fcab6d280" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &tileItem' can be declared as 'const auto &tileItem'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 784, + "startColumn": 10, + "charOffset": 23672, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 782, + "startColumn": 10, + "charOffset": 23583, + "charLength": 4, + "snippet": { + "text": "\t\tif (itemIsHangable && hasFlag(TILESTATE_SUPPORTS_HANGABLE)) {\n\t\t\tif (items) {\n\t\t\t\tfor (auto &tileItem : *items) {\n\t\t\t\t\tif (tileItem->isHangable()) {\n\t\t\t\t\t\treturn RETURNVALUE_NEEDEXCHANGE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d56602ed0d7393fc627f10b8ec0b18821adc457a398a87ac96c744ecc022559" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 806, + "startColumn": 8, + "charOffset": 24238, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 804, + "startColumn": 8, + "charOffset": 24225, + "charLength": 5, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (items) {\n\t\t\t\tfor (auto &tileItem : *items) {\n\t\t\t\t\tconst ItemType &iiType = Item::items[tileItem->getID()];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f6ef1245a283efafbcb9b88eeabab3fc30631df98560da851b6dd18c5e45d06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 806, + "startColumn": 8, + "charOffset": 24238, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 804, + "startColumn": 8, + "charOffset": 24225, + "charLength": 5, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (items) {\n\t\t\t\tfor (auto &tileItem : *items) {\n\t\t\t\t\tconst ItemType &iiType = Item::items[tileItem->getID()];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e3baa68ee206b3b7748349ba29945d1657f43126f45fc5a38829c7a9e4497f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 807, + "startColumn": 5, + "charOffset": 24251, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 805, + "startColumn": 5, + "charOffset": 24230, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tif (items) {\n\t\t\t\tfor (auto &tileItem : *items) {\n\t\t\t\t\tconst ItemType &iiType = Item::items[tileItem->getID()];\n\t\t\t\t\tif (!iiType.blockSolid || iiType.type == ITEM_TYPE_TRASHHOLDER) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40ae7c86e15f46f4168bbdbdc31a6d47aaccc3ee4a2fc7ef1a1c5ee6d444d4d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &tileItem' can be declared as 'const auto &tileItem'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 807, + "startColumn": 10, + "charOffset": 24256, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 805, + "startColumn": 10, + "charOffset": 24230, + "charLength": 4, + "snippet": { + "text": "\n\t\t\tif (items) {\n\t\t\t\tfor (auto &tileItem : *items) {\n\t\t\t\t\tconst ItemType &iiType = Item::items[tileItem->getID()];\n\t\t\t\t\tif (!iiType.blockSolid || iiType.type == ITEM_TYPE_TRASHHOLDER) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a6e8de2a9557cf7f1fa6c51aa49245e992ec95a3e7abad934755e95fdc971eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 834, + "startColumn": 4, + "charOffset": 24887, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 832, + "startColumn": 4, + "charOffset": 24824, + "charLength": 4, + "snippet": { + "text": "\tif (hasHarmfulField()) {\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\n\t} else {\n\t\treturn RETURNVALUE_NOERROR;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ddcdd24a309972dabd8266e00b4146d2c27636b947c01d2ca5141ede81467bc2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 843, + "startColumn": 40, + "charOffset": 25134, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 841, + "startColumn": 40, + "charOffset": 25092, + "charLength": 1, + "snippet": { + "text": "}\n\nReturnValue Tile::queryMaxCount(int32_t, const std::shared_ptr &, uint32_t count, uint32_t &maxQueryCount, uint32_t) {\n\tmaxQueryCount = std::max(1, count);\n\treturn RETURNVALUE_NOERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab6c49d55748d6b16f0192b7f16dfa6a8c35e3431f747bf30c4cf00e19f0b1c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 848, + "startColumn": 19, + "charOffset": 25318, + "charLength": 11, + "snippet": { + "text": "queryRemove" + } + }, + "contextRegion": { + "startLine": 846, + "startColumn": 19, + "charOffset": 25297, + "charLength": 11, + "snippet": { + "text": "}\n\nReturnValue Tile::queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t tileFlags, std::shared_ptr /*= nullptr */) {\n\tint32_t index = getThingIndex(thing);\n\tif (index == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb72768252b1da7a2f6b7be345299bd861b599c8c64b6efcba23dd29c66f3dae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'queryRemove' of similar type ('uint32_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 848, + "startColumn": 68, + "charOffset": 25367, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 846, + "startColumn": 68, + "charOffset": 25297, + "charLength": 8, + "snippet": { + "text": "}\n\nReturnValue Tile::queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t tileFlags, std::shared_ptr /*= nullptr */) {\n\tint32_t index = getThingIndex(thing);\n\tif (index == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45ec9156712303cf84ca7c9bf44f8edaa5b901862fe89bdfa496b68b2ee3a3f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'queryDestination' has cognitive complexity of 70 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 870, + "startColumn": 33, + "charOffset": 25944, + "charLength": 16, + "snippet": { + "text": "queryDestination" + } + }, + "contextRegion": { + "startLine": 868, + "startColumn": 33, + "charOffset": 25909, + "charLength": 16, + "snippet": { + "text": "}\n\nstd::shared_ptr Tile::queryDestination(int32_t &, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &tileFlags) {\n\tstd::shared_ptr destTile = nullptr;\n\t*destItem = nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9fca7d9ae836091ce12a35a6c20bc2a2badc04f950066d24af1f3178a4af326" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 870, + "startColumn": 59, + "charOffset": 25970, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 868, + "startColumn": 59, + "charOffset": 25909, + "charLength": 1, + "snippet": { + "text": "}\n\nstd::shared_ptr Tile::queryDestination(int32_t &, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &tileFlags) {\n\tstd::shared_ptr destTile = nullptr;\n\t*destItem = nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3caf5c080f07c69fb3faa8eed6ba8c2b5c488bc3f15888cd134b5a9fa44f1c95" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 874, + "startColumn": 2, + "charOffset": 26132, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 872, + "startColumn": 2, + "charOffset": 26108, + "charLength": 2, + "snippet": { + "text": "\t*destItem = nullptr;\n\n\tif (hasFlag(TILESTATE_FLOORCHANGE_DOWN)) {\n\t\tuint16_t dx = tilePos.x;\n\t\tuint16_t dy = tilePos.y;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88dc752a2920331201a2b3847146988e3b9bef4da1d7309c08d49557a51cf077" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 879, + "startColumn": 66, + "charOffset": 26325, + "charLength": 2, + "snippet": { + "text": "dy" + } + }, + "contextRegion": { + "startLine": 877, + "startColumn": 66, + "charOffset": 26229, + "charLength": 2, + "snippet": { + "text": "\t\tuint8_t dz = tilePos.z + 1;\n\n\t\tstd::shared_ptr southDownTile = g_game().map.getTile(dx, dy - 1, dz);\n\t\tif (southDownTile && southDownTile->hasFlag(TILESTATE_FLOORCHANGE_SOUTH_ALT)) {\n\t\t\tdy -= 2;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "539d2aaf52fb7b44b992a09ea2e26b24d6ae61427af96d17795ef71b4d83417a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 884, + "startColumn": 62, + "charOffset": 26552, + "charLength": 2, + "snippet": { + "text": "dx" + } + }, + "contextRegion": { + "startLine": 882, + "startColumn": 62, + "charOffset": 26432, + "charLength": 2, + "snippet": { + "text": "\t\t\tdestTile = g_game().map.getTile(dx, dy, dz);\n\t\t} else {\n\t\t\tstd::shared_ptr eastDownTile = g_game().map.getTile(dx - 1, dy, dz);\n\t\t\tif (eastDownTile && eastDownTile->hasFlag(TILESTATE_FLOORCHANGE_EAST_ALT)) {\n\t\t\t\tdx -= 2;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8185e3acc24af19ab9be30e53c8bcfb4249bb90fff323ab82348ea66faf195c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 954, + "startColumn": 13, + "charOffset": 28006, + "charLength": 2, + "snippet": { + "text": "|=" + } + }, + "contextRegion": { + "startLine": 952, + "startColumn": 13, + "charOffset": 27945, + "charLength": 2, + "snippet": { + "text": "\t\tdestTile = static_self_cast();\n\t} else {\n\t\ttileFlags |= FLAG_NOLIMIT; // Will ignore that there is blocking items/creatures\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a38bbf98e0eedba66a905e29fddcf902fc5286b7bc7337657e90eb8259ccc623" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 963, + "startColumn": 25, + "charOffset": 28320, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 961, + "startColumn": 25, + "charOffset": 28219, + "charLength": 1, + "snippet": { + "text": "\t\t\tif (thing->getItem()) {\n\t\t\t\tauto destCylinder = destThing->getCylinder();\n\t\t\t\tif (destCylinder && !destCylinder->getContainer()) {\n\t\t\t\t\treturn destThing->getCylinder();\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6cdfe8a821a3a2e3dd43564990315b3d621fb70ab3c9694cb8ec0d3a2c0cb1d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 975, + "startColumn": 24, + "charOffset": 28566, + "charLength": 8, + "snippet": { + "text": "position" + } + }, + "contextRegion": { + "startLine": 973, + "startColumn": 24, + "charOffset": 28495, + "charLength": 8, + "snippet": { + "text": "\tconst auto position = getPosition();\n\treturn {\n\t\tg_game().map.getTile(position.x - 1, position.y, position.z),\n\t\tg_game().map.getTile(position.x + 1, position.y, position.z),\n\t\tg_game().map.getTile(position.x, position.y - 1, position.z)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04e3ef052c7e229f423cbce371fecd1b429bbca434674c579d671c1ab569e99d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 977, + "startColumn": 36, + "charOffset": 28706, + "charLength": 8, + "snippet": { + "text": "position" + } + }, + "contextRegion": { + "startLine": 975, + "startColumn": 36, + "charOffset": 28543, + "charLength": 8, + "snippet": { + "text": "\t\tg_game().map.getTile(position.x - 1, position.y, position.z),\n\t\tg_game().map.getTile(position.x + 1, position.y, position.z),\n\t\tg_game().map.getTile(position.x, position.y - 1, position.z),\n\t\tg_game().map.getTile(position.x, position.y + 1, position.z),\n\t\tg_game().map.getTile(position.x - 1, position.y - 1, position.z)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01310319f26240e8c7555f3bdf8d5e2aea6af170639807b64d670dc4accc02fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 979, + "startColumn": 24, + "charOffset": 28822, + "charLength": 8, + "snippet": { + "text": "position" + } + }, + "contextRegion": { + "startLine": 977, + "startColumn": 24, + "charOffset": 28671, + "charLength": 8, + "snippet": { + "text": "\t\tg_game().map.getTile(position.x, position.y - 1, position.z),\n\t\tg_game().map.getTile(position.x, position.y + 1, position.z),\n\t\tg_game().map.getTile(position.x - 1, position.y - 1, position.z),\n\t\tg_game().map.getTile(position.x + 1, position.y + 1, position.z),\n\t\tg_game().map.getTile(position.x + 1, position.y - 1, position.z)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04e3ef052c7e229f423cbce371fecd1b429bbca434674c579d671c1ab569e99d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 979, + "startColumn": 40, + "charOffset": 28838, + "charLength": 8, + "snippet": { + "text": "position" + } + }, + "contextRegion": { + "startLine": 977, + "startColumn": 40, + "charOffset": 28671, + "charLength": 8, + "snippet": { + "text": "\t\tg_game().map.getTile(position.x, position.y - 1, position.z),\n\t\tg_game().map.getTile(position.x, position.y + 1, position.z),\n\t\tg_game().map.getTile(position.x - 1, position.y - 1, position.z),\n\t\tg_game().map.getTile(position.x + 1, position.y + 1, position.z),\n\t\tg_game().map.getTile(position.x + 1, position.y - 1, position.z)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "728d9204fb1e09adde953a14fbec427a9dd2538b2bfba6681e70a670cdf8eb24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 981, + "startColumn": 40, + "charOffset": 28974, + "charLength": 8, + "snippet": { + "text": "position" + } + }, + "contextRegion": { + "startLine": 979, + "startColumn": 40, + "charOffset": 28799, + "charLength": 8, + "snippet": { + "text": "\t\tg_game().map.getTile(position.x - 1, position.y - 1, position.z),\n\t\tg_game().map.getTile(position.x + 1, position.y + 1, position.z),\n\t\tg_game().map.getTile(position.x + 1, position.y - 1, position.z),\n\t\tg_game().map.getTile(position.x - 1, position.y + 1, position.z)\n\t};" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8b3f8d41cb067c47d42d55d1fbe52baa43cdd784b1bfe5c909b34c2a9e705c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 982, + "startColumn": 24, + "charOffset": 29026, + "charLength": 8, + "snippet": { + "text": "position" + } + }, + "contextRegion": { + "startLine": 980, + "startColumn": 24, + "charOffset": 28867, + "charLength": 8, + "snippet": { + "text": "\t\tg_game().map.getTile(position.x + 1, position.y + 1, position.z),\n\t\tg_game().map.getTile(position.x + 1, position.y - 1, position.z),\n\t\tg_game().map.getTile(position.x - 1, position.y + 1, position.z)\n\t};\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "830372894dc2ec1cc684732a8f387c127c22437def04184ed8e444d3ee2213b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'addThing' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 986, + "startColumn": 12, + "charOffset": 29088, + "charLength": 8, + "snippet": { + "text": "addThing" + } + }, + "contextRegion": { + "startLine": 984, + "startColumn": 12, + "charOffset": 29074, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Tile::addThing(std::shared_ptr thing) {\n\taddThing(0, thing);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "447ccc2442602d1bd542ef98f1591736e66964b1153600b28acd4561653ce63a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'addThing' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 990, + "startColumn": 12, + "charOffset": 29164, + "charLength": 8, + "snippet": { + "text": "addThing" + } + }, + "contextRegion": { + "startLine": 988, + "startColumn": 12, + "charOffset": 29150, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Tile::addThing(int32_t, std::shared_ptr thing) {\n\tif (!thing) {\n\t\treturn /*RETURNVALUE_NOTPOSSIBLE*/;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fce4e2e190e5370576a4005243f741e97fbde8b64b13b1666c31cebe2d94908c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'addThing' has cognitive complexity of 71 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 990, + "startColumn": 12, + "charOffset": 29164, + "charLength": 8, + "snippet": { + "text": "addThing" + } + }, + "contextRegion": { + "startLine": 988, + "startColumn": 12, + "charOffset": 29150, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Tile::addThing(int32_t, std::shared_ptr thing) {\n\tif (!thing) {\n\t\treturn /*RETURNVALUE_NOTPOSSIBLE*/;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7aa16403eec198c9b46c70a83feaa00996b3422e1b4eae964e44327258b66e75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 990, + "startColumn": 28, + "charOffset": 29180, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 988, + "startColumn": 28, + "charOffset": 29150, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Tile::addThing(int32_t, std::shared_ptr thing) {\n\tif (!thing) {\n\t\treturn /*RETURNVALUE_NOTPOSSIBLE*/;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24f3b03c31aa7c8027df71531cc85b12a87d202e443229da8dd9e14edac280de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 991, + "startColumn": 6, + "charOffset": 29219, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 989, + "startColumn": 6, + "charOffset": 29152, + "charLength": 1, + "snippet": { + "text": "\nvoid Tile::addThing(int32_t, std::shared_ptr thing) {\n\tif (!thing) {\n\t\treturn /*RETURNVALUE_NOTPOSSIBLE*/;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9370f5e32f55c85c202e761d64926730694187b679752eb8ba60304f3df81b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1001, + "startColumn": 14, + "charOffset": 29486, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 999, + "startColumn": 14, + "charOffset": 29425, + "charLength": 6, + "snippet": { + "text": "\n\t\tCreatureVector* creatures = makeCreatures();\n\t\tcreatures->insert(creatures->begin(), creature);\n\t} else {\n\t\tstd::shared_ptr item = thing->getItem();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5341ed622f933aabb45c6533f2e4fec84110a31a991c634bd9011416c6e111da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1009, + "startColumn": 7, + "charOffset": 29699, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1007, + "startColumn": 7, + "charOffset": 29651, + "charLength": 5, + "snippet": { + "text": "\n\t\tTileItemVector* items = getItemList();\n\t\tif (items && items->size() >= 0xFFFF) {\n\t\t\treturn /*RETURNVALUE_NOTPOSSIBLE*/;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b19018e558918006c0c89b00f1c91bc026bb01f5c9ebed4a9601e011f66d0c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1009, + "startColumn": 7, + "charOffset": 29699, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1007, + "startColumn": 7, + "charOffset": 29651, + "charLength": 5, + "snippet": { + "text": "\n\t\tTileItemVector* items = getItemList();\n\t\tif (items && items->size() >= 0xFFFF) {\n\t\t\treturn /*RETURNVALUE_NOTPOSSIBLE*/;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d88185875a1c3a6e8968b3d0aeabb56e88ee956115c8b29af0aeb4c210a5dcb8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1009, + "startColumn": 13, + "charOffset": 29705, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 1007, + "startColumn": 13, + "charOffset": 29651, + "charLength": 2, + "snippet": { + "text": "\n\t\tTileItemVector* items = getItemList();\n\t\tif (items && items->size() >= 0xFFFF) {\n\t\t\treturn /*RETURNVALUE_NOTPOSSIBLE*/;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e64377619573ee379f7bf468a3a021d283a965f319609ba73cffa5a37f375c2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1009, + "startColumn": 33, + "charOffset": 29725, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 1007, + "startColumn": 33, + "charOffset": 29651, + "charLength": 6, + "snippet": { + "text": "\n\t\tTileItemVector* items = getItemList();\n\t\tif (items && items->size() >= 0xFFFF) {\n\t\t\treturn /*RETURNVALUE_NOTPOSSIBLE*/;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2993bc987b33b8ccee2402222fe0a13705bf7f36b2fe38fb2dc82f7d0b17c03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1009, + "startColumn": 33, + "charOffset": 29725, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 1007, + "startColumn": 33, + "charOffset": 29651, + "charLength": 6, + "snippet": { + "text": "\n\t\tTileItemVector* items = getItemList();\n\t\tif (items && items->size() >= 0xFFFF) {\n\t\t\treturn /*RETURNVALUE_NOTPOSSIBLE*/;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c33df31980bd6ef7f841554c9311e339f6202ae6015de34611be6df0ba8e06af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1032, + "startColumn": 8, + "charOffset": 30366, + "charLength": 8, + "snippet": { + "text": "itemType" + } + }, + "contextRegion": { + "startLine": 1030, + "startColumn": 8, + "charOffset": 30316, + "charLength": 8, + "snippet": { + "text": "\t\t\t}\n\t\t} else if (item->isAlwaysOnTop()) {\n\t\t\tif (itemType.isSplash() && items) {\n\t\t\t\t// remove old splash if exists\n\t\t\t\tfor (ItemVector::const_iterator it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "424cf0c5a22cd92e372fafa8643112c5043e35cf8cd3260b2112bf0a7b81de6e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1032, + "startColumn": 28, + "charOffset": 30386, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 1030, + "startColumn": 28, + "charOffset": 30316, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\t\t} else if (item->isAlwaysOnTop()) {\n\t\t\tif (itemType.isSplash() && items) {\n\t\t\t\t// remove old splash if exists\n\t\t\t\tfor (ItemVector::const_iterator it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c425575b1f9eb17d29af5659ac83951cb1feb341860d5e7491eb3ffebbdede3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1032, + "startColumn": 31, + "charOffset": 30389, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1030, + "startColumn": 31, + "charOffset": 30316, + "charLength": 5, + "snippet": { + "text": "\t\t\t}\n\t\t} else if (item->isAlwaysOnTop()) {\n\t\t\tif (itemType.isSplash() && items) {\n\t\t\t\t// remove old splash if exists\n\t\t\t\tfor (ItemVector::const_iterator it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c97fe1b4923fafec70aba34568d6c5d82e2f32644e68e088cb5f70e2be9a459b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1034, + "startColumn": 5, + "charOffset": 30437, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1032, + "startColumn": 5, + "charOffset": 30359, + "charLength": 3, + "snippet": { + "text": "\t\t\tif (itemType.isSplash() && items) {\n\t\t\t\t// remove old splash if exists\n\t\t\t\tfor (ItemVector::const_iterator it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\t\t\tstd::shared_ptr oldSplash = *it;\n\t\t\t\t\tif (!Item::items[oldSplash->getID()].isSplash()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6c8e956fe533aa482cdc4528569710946295bda7bc393453a9bf067a2e54299" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1034, + "startColumn": 5, + "charOffset": 30437, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1032, + "startColumn": 5, + "charOffset": 30359, + "charLength": 3, + "snippet": { + "text": "\t\t\tif (itemType.isSplash() && items) {\n\t\t\t\t// remove old splash if exists\n\t\t\t\tfor (ItemVector::const_iterator it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\t\t\tstd::shared_ptr oldSplash = *it;\n\t\t\t\t\tif (!Item::items[oldSplash->getID()].isSplash()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46eb77f9142bbbe7e0cb1bb5ba27671fbfb0e68d4965630b7973ba9e173d63e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1034, + "startColumn": 10, + "charOffset": 30442, + "charLength": 10, + "snippet": { + "text": "ItemVector" + } + }, + "contextRegion": { + "startLine": 1032, + "startColumn": 10, + "charOffset": 30359, + "charLength": 10, + "snippet": { + "text": "\t\t\tif (itemType.isSplash() && items) {\n\t\t\t\t// remove old splash if exists\n\t\t\t\tfor (ItemVector::const_iterator it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\t\t\tstd::shared_ptr oldSplash = *it;\n\t\t\t\t\tif (!Item::items[oldSplash->getID()].isSplash()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bd1648e7ac7bd386632af410c146fb1ebd04d575d4260e10372459ece7367af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when declaring iterators" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1034, + "startColumn": 10, + "charOffset": 30442, + "charLength": 10, + "snippet": { + "text": "ItemVector" + } + }, + "contextRegion": { + "startLine": 1032, + "startColumn": 10, + "charOffset": 30359, + "charLength": 10, + "snippet": { + "text": "\t\t\tif (itemType.isSplash() && items) {\n\t\t\t\t// remove old splash if exists\n\t\t\t\tfor (ItemVector::const_iterator it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\t\t\tstd::shared_ptr oldSplash = *it;\n\t\t\t\t\tif (!Item::items[oldSplash->getID()].isSplash()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84d94634ee07198f08b92cc5c81571dcf1f58b482451f2f0b18ee264dfd26bf2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1034, + "startColumn": 98, + "charOffset": 30530, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1032, + "startColumn": 98, + "charOffset": 30359, + "charLength": 2, + "snippet": { + "text": "\t\t\tif (itemType.isSplash() && items) {\n\t\t\t\t// remove old splash if exists\n\t\t\t\tfor (ItemVector::const_iterator it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\t\t\tstd::shared_ptr oldSplash = *it;\n\t\t\t\t\tif (!Item::items[oldSplash->getID()].isSplash()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98d350f5fe0f35497f7276d14be0f076e00d429fbde49a7450e2cf3c5684f967" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-copy-initialization", + "ruleIndex": 682, + "kind": "fail", + "level": "warning", + "message": { + "text": "the variable 'oldSplash' is copy-constructed from a const reference but is only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1035, + "startColumn": 28, + "charOffset": 30576, + "charLength": 9, + "snippet": { + "text": "oldSplash" + } + }, + "contextRegion": { + "startLine": 1033, + "startColumn": 28, + "charOffset": 30398, + "charLength": 9, + "snippet": { + "text": "\t\t\t\t// remove old splash if exists\n\t\t\t\tfor (ItemVector::const_iterator it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\t\t\tstd::shared_ptr oldSplash = *it;\n\t\t\t\t\tif (!Item::items[oldSplash->getID()].isSplash()) {\n\t\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dda69dce23281065f2bf32f75d03ce7fab39a94c8e90687aa2a09307c0dc57a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1049, + "startColumn": 8, + "charOffset": 30848, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1047, + "startColumn": 8, + "charOffset": 30812, + "charLength": 5, + "snippet": { + "text": "\t\t\tbool isInserted = false;\n\n\t\t\tif (items) {\n\t\t\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\t\t\t// Note: this is different from internalAddThing" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e23174812e5ecc6353f13eb9055d04be1cfe75052bee0d6cc8d43bd0a1d4635a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1049, + "startColumn": 8, + "charOffset": 30848, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1047, + "startColumn": 8, + "charOffset": 30812, + "charLength": 5, + "snippet": { + "text": "\t\t\tbool isInserted = false;\n\n\t\t\tif (items) {\n\t\t\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\t\t\t// Note: this is different from internalAddThing" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48d4cdb85fb392049c58089cbbcc2bd38ef7f9d997ad5a43f3a74371d35d25a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1050, + "startColumn": 5, + "charOffset": 30861, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1048, + "startColumn": 5, + "charOffset": 30840, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tif (items) {\n\t\t\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\t\t\t// Note: this is different from internalAddThing\n\t\t\t\t\tif (itemType.alwaysOnTopOrder <= Item::items[(*it)->getID()].alwaysOnTopOrder) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e15a9e1190305c9d85f11a85c30f7d9af6ade21fb2482dcd5ed6390bd0da777" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1050, + "startColumn": 5, + "charOffset": 30861, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1048, + "startColumn": 5, + "charOffset": 30840, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tif (items) {\n\t\t\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\t\t\t// Note: this is different from internalAddThing\n\t\t\t\t\tif (itemType.alwaysOnTopOrder <= Item::items[(*it)->getID()].alwaysOnTopOrder) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55bfc13f58e4c4bde5e4fac010e591b1c09da4385b0e8c966a853a935eb1c3b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1050, + "startColumn": 10, + "charOffset": 30866, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1048, + "startColumn": 10, + "charOffset": 30840, + "charLength": 4, + "snippet": { + "text": "\n\t\t\tif (items) {\n\t\t\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\t\t\t// Note: this is different from internalAddThing\n\t\t\t\t\tif (itemType.alwaysOnTopOrder <= Item::items[(*it)->getID()].alwaysOnTopOrder) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "504b2dab0ca6ae3fd26b087f151df68066c5ae685ac28d07e1b5951d4e4c5cb2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1050, + "startColumn": 76, + "charOffset": 30932, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1048, + "startColumn": 76, + "charOffset": 30840, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tif (items) {\n\t\t\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\t\t\t// Note: this is different from internalAddThing\n\t\t\t\t\tif (itemType.alwaysOnTopOrder <= Item::items[(*it)->getID()].alwaysOnTopOrder) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06735eab49449c00f3fd91ea55c9ab9dc92db99ff68e995181a02b71c064a94f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1053, + "startColumn": 14, + "charOffset": 31104, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 1051, + "startColumn": 14, + "charOffset": 30951, + "charLength": 6, + "snippet": { + "text": "\t\t\t\t\t// Note: this is different from internalAddThing\n\t\t\t\t\tif (itemType.alwaysOnTopOrder <= Item::items[(*it)->getID()].alwaysOnTopOrder) {\n\t\t\t\t\t\titems->insert(it, item);\n\t\t\t\t\t\tisInserted = true;\n\t\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ba23b32cb910d22a3b86dc6486c0d04ef0653d7863a65e387c13c0a0157aaac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1070, + "startColumn": 9, + "charOffset": 31391, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1068, + "startColumn": 9, + "charOffset": 31310, + "charLength": 5, + "snippet": { + "text": "\t\t\tif (itemType.isMagicField()) {\n\t\t\t\t// remove old field item if exists\n\t\t\t\tif (items) {\n\t\t\t\t\tfor (ItemVector::const_iterator it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\t\t\t\tstd::shared_ptr oldField = (*it)->getMagicField();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ae0871bde9af51acc0b3910032cc7ac8613a352c76e6d7307c4a04e2d41cecc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1070, + "startColumn": 9, + "charOffset": 31391, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1068, + "startColumn": 9, + "charOffset": 31310, + "charLength": 5, + "snippet": { + "text": "\t\t\tif (itemType.isMagicField()) {\n\t\t\t\t// remove old field item if exists\n\t\t\t\tif (items) {\n\t\t\t\t\tfor (ItemVector::const_iterator it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\t\t\t\tstd::shared_ptr oldField = (*it)->getMagicField();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6f0c8bdca333e38635cb6e63823a3c0fa267e8c016d974d98406abe1a8f4851" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1071, + "startColumn": 6, + "charOffset": 31405, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1069, + "startColumn": 6, + "charOffset": 31344, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t// remove old field item if exists\n\t\t\t\tif (items) {\n\t\t\t\t\tfor (ItemVector::const_iterator it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\t\t\t\tstd::shared_ptr oldField = (*it)->getMagicField();\n\t\t\t\t\t\tif (oldField) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eeaa42febd53958a681659dee88019cd29ea95f84612dbea4420e52e4f6a8e5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1071, + "startColumn": 6, + "charOffset": 31405, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1069, + "startColumn": 6, + "charOffset": 31344, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t// remove old field item if exists\n\t\t\t\tif (items) {\n\t\t\t\t\tfor (ItemVector::const_iterator it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\t\t\t\tstd::shared_ptr oldField = (*it)->getMagicField();\n\t\t\t\t\t\tif (oldField) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b56eec936e9ad6e8961f6d41a75f4499b73686f12681a7f985e730988749c1b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1071, + "startColumn": 11, + "charOffset": 31410, + "charLength": 10, + "snippet": { + "text": "ItemVector" + } + }, + "contextRegion": { + "startLine": 1069, + "startColumn": 11, + "charOffset": 31344, + "charLength": 10, + "snippet": { + "text": "\t\t\t\t// remove old field item if exists\n\t\t\t\tif (items) {\n\t\t\t\t\tfor (ItemVector::const_iterator it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\t\t\t\tstd::shared_ptr oldField = (*it)->getMagicField();\n\t\t\t\t\t\tif (oldField) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81f55dbec41f1ecfd0c4e06c1d10899716777c073442eb6b64776a02c695d877" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when declaring iterators" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1071, + "startColumn": 11, + "charOffset": 31410, + "charLength": 10, + "snippet": { + "text": "ItemVector" + } + }, + "contextRegion": { + "startLine": 1069, + "startColumn": 11, + "charOffset": 31344, + "charLength": 10, + "snippet": { + "text": "\t\t\t\t// remove old field item if exists\n\t\t\t\tif (items) {\n\t\t\t\t\tfor (ItemVector::const_iterator it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\t\t\t\tstd::shared_ptr oldField = (*it)->getMagicField();\n\t\t\t\t\t\tif (oldField) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4380a606adb64ccfad2cca7775bc7ea7ed195fd3e548c8343d88e8b482bbf9b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1071, + "startColumn": 101, + "charOffset": 31500, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1069, + "startColumn": 101, + "charOffset": 31344, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t// remove old field item if exists\n\t\t\t\tif (items) {\n\t\t\t\t\tfor (ItemVector::const_iterator it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\t\t\t\tstd::shared_ptr oldField = (*it)->getMagicField();\n\t\t\t\t\t\tif (oldField) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e2b2b42d7eb987b416eac117da77d542ca317e9c7b40e3b0b9c7bb7202f33c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'break'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1080, + "startColumn": 10, + "charOffset": 31796, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1078, + "startColumn": 10, + "charOffset": 31718, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\t\t\t\tpostRemoveNotification(oldField, nullptr, 0);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// This magic field cannot be replaced.\n\t\t\t\t\t\t\t\titem->resetParent();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f1d906d91ffc865be35714903082ff5f4af7ea7ae1189e67eb7db7d72efc61a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1091, + "startColumn": 11, + "charOffset": 31969, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 1089, + "startColumn": 11, + "charOffset": 31931, + "charLength": 6, + "snippet": { + "text": "\n\t\t\titems = makeItemList();\n\t\t\titems->insert(items->getBeginDownItem(), item);\n\t\t\titems->increaseDownItemCount();\n\t\t\tonAddTileItem(item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41f5e23e23880d35f8f6b7d74e42dfbbc27f18c9f7d038b6adf0fba639fe1715" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'updateThing' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1098, + "startColumn": 54, + "charOffset": 32132, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 1096, + "startColumn": 54, + "charOffset": 32076, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Tile::updateThing(std::shared_ptr thing, uint16_t itemId, uint32_t count) {\n\tint32_t index = getThingIndex(thing);\n\tif (index == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "393b883c484292538ad8862065de4b40a06556537180a3b36acdfe72b8c9cf0f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1113, + "startColumn": 19, + "charOffset": 32548, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 1111, + "startColumn": 19, + "charOffset": 32485, + "charLength": 5, + "snippet": { + "text": "\tresetTileFlags(item);\n\titem->setID(itemId);\n\titem->setSubType(count);\n\tsetTileFlags(item);\n\tonUpdateTileItem(item, oldType, item, newType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72b03e1ecbbd07aa30adcbc9825cb65c3ff6717b6cf3bcf9ac6b912761432a08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1119, + "startColumn": 16, + "charOffset": 32716, + "charLength": 5, + "snippet": { + "text": "index" + } + }, + "contextRegion": { + "startLine": 1117, + "startColumn": 16, + "charOffset": 32628, + "charLength": 5, + "snippet": { + "text": "\nvoid Tile::replaceThing(uint32_t index, std::shared_ptr thing) {\n\tint32_t pos = index;\n\n\tstd::shared_ptr item = thing->getItem();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75a07323b3111c378265af714068cea14e025e1ca9a53ffae334257df099012d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1140, + "startColumn": 6, + "charOffset": 33064, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1138, + "startColumn": 6, + "charOffset": 33018, + "charLength": 5, + "snippet": { + "text": "\n\tTileItemVector* items = getItemList();\n\tif (items && !isInserted) {\n\t\tint32_t topItemSize = getTopItemCount();\n\t\tif (pos < topItemSize) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "285e8ccb6b2273ef51e14c605293c2ab51cb8e10bececd42e59a4d77b1cf6f0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1140, + "startColumn": 6, + "charOffset": 33064, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1138, + "startColumn": 6, + "charOffset": 33018, + "charLength": 5, + "snippet": { + "text": "\n\tTileItemVector* items = getItemList();\n\tif (items && !isInserted) {\n\t\tint32_t topItemSize = getTopItemCount();\n\t\tif (pos < topItemSize) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc6f10e020c1bc0d6b15d6466b4685ef173cf2ef7b0e95cb7e65d1bddd9f5076" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1140, + "startColumn": 12, + "charOffset": 33070, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 1138, + "startColumn": 12, + "charOffset": 33018, + "charLength": 2, + "snippet": { + "text": "\n\tTileItemVector* items = getItemList();\n\tif (items && !isInserted) {\n\t\tint32_t topItemSize = getTopItemCount();\n\t\tif (pos < topItemSize) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "008dfbbe993a0b74099ad2e77789e173596f922d70d0abea4d92c00e884ebdbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1141, + "startColumn": 25, + "charOffset": 33112, + "charLength": 15, + "snippet": { + "text": "getTopItemCount" + } + }, + "contextRegion": { + "startLine": 1139, + "startColumn": 25, + "charOffset": 33019, + "charLength": 15, + "snippet": { + "text": "\tTileItemVector* items = getItemList();\n\tif (items && !isInserted) {\n\t\tint32_t topItemSize = getTopItemCount();\n\t\tif (pos < topItemSize) {\n\t\t\tauto it = items->getBeginTopItem();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca149c6604422e0568c7aa1638fe2bb84280102ab45f1f1c2c309ce6ae214390" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1148, + "startColumn": 11, + "charOffset": 33268, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 1146, + "startColumn": 11, + "charOffset": 33212, + "charLength": 6, + "snippet": { + "text": "\t\t\toldItem = (*it);\n\t\t\tit = items->erase(it);\n\t\t\titems->insert(it, item);\n\t\t\tisInserted = true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "adc5ff16280125c9e515b6d5e4c806e6a367e04e9942921fb236c9c4b74fcf61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1156, + "startColumn": 6, + "charOffset": 33389, + "charLength": 9, + "snippet": { + "text": "creatures" + } + }, + "contextRegion": { + "startLine": 1154, + "startColumn": 6, + "charOffset": 33338, + "charLength": 9, + "snippet": { + "text": "\n\tCreatureVector* creatures = getCreatures();\n\tif (creatures) {\n\t\tif (!isInserted && pos < static_cast(creatures->size())) {\n\t\t\treturn /*RETURNVALUE_NOTPOSSIBLE*/;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85f34427cf775000c63880300c5eca880d68c2a06190c754b6a25a315b2d1bc6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'CreatureVector *' (aka 'vector> *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1156, + "startColumn": 6, + "charOffset": 33389, + "charLength": 9, + "snippet": { + "text": "creatures" + } + }, + "contextRegion": { + "startLine": 1154, + "startColumn": 6, + "charOffset": 33338, + "charLength": 9, + "snippet": { + "text": "\n\tCreatureVector* creatures = getCreatures();\n\tif (creatures) {\n\t\tif (!isInserted && pos < static_cast(creatures->size())) {\n\t\t\treturn /*RETURNVALUE_NOTPOSSIBLE*/;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51730125fc56d7b48bbf2c85160a58deec6377f8a583e9d4fd6ad23e6acb9e56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1161, + "startColumn": 10, + "charOffset": 33525, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 1159, + "startColumn": 10, + "charOffset": 33511, + "charLength": 11, + "snippet": { + "text": "\t\t}\n\n\t\tpos -= static_cast(creatures->size());\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd3350a20b9f6a6ec526df4e6b9b0b1a6404a29594c3a93bac125f2c90f34038" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1164, + "startColumn": 6, + "charOffset": 33576, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1162, + "startColumn": 6, + "charOffset": 33567, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tif (items && !isInserted) {\n\t\tint32_t downItemSize = getDownItemCount();\n\t\tif (pos < downItemSize) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "285e8ccb6b2273ef51e14c605293c2ab51cb8e10bececd42e59a4d77b1cf6f0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1164, + "startColumn": 6, + "charOffset": 33576, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1162, + "startColumn": 6, + "charOffset": 33567, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tif (items && !isInserted) {\n\t\tint32_t downItemSize = getDownItemCount();\n\t\tif (pos < downItemSize) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc6f10e020c1bc0d6b15d6466b4685ef173cf2ef7b0e95cb7e65d1bddd9f5076" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1164, + "startColumn": 12, + "charOffset": 33582, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 1162, + "startColumn": 12, + "charOffset": 33567, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (items && !isInserted) {\n\t\tint32_t downItemSize = getDownItemCount();\n\t\tif (pos < downItemSize) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "008dfbbe993a0b74099ad2e77789e173596f922d70d0abea4d92c00e884ebdbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1165, + "startColumn": 26, + "charOffset": 33625, + "charLength": 16, + "snippet": { + "text": "getDownItemCount" + } + }, + "contextRegion": { + "startLine": 1163, + "startColumn": 26, + "charOffset": 33570, + "charLength": 16, + "snippet": { + "text": "\n\tif (items && !isInserted) {\n\t\tint32_t downItemSize = getDownItemCount();\n\t\tif (pos < downItemSize) {\n\t\t\tauto it = items->getBeginDownItem() + pos;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6fdcca89d6273d8d7c5ade5793d33d8089ef02448ce903b0546ca800dc0be115" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1170, + "startColumn": 11, + "charOffset": 33773, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 1168, + "startColumn": 11, + "charOffset": 33719, + "charLength": 6, + "snippet": { + "text": "\t\t\toldItem = *it;\n\t\t\tit = items->erase(it);\n\t\t\titems->insert(it, item);\n\t\t\tisInserted = true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55e5e68d01e11cf07a1bf30192d0fe3a738066841d2b1f686fc8b1a2decba91e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-no-recursion", + "ruleIndex": 603, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'removeThing' is within a recursive call chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1189, + "startColumn": 12, + "charOffset": 34181, + "charLength": 11, + "snippet": { + "text": "removeThing" + } + }, + "contextRegion": { + "startLine": 1187, + "startColumn": 12, + "charOffset": 34167, + "charLength": 11, + "snippet": { + "text": "}\n\nvoid Tile::removeThing(std::shared_ptr thing, uint32_t count) {\n\tstd::shared_ptr creature = thing->getCreature();\n\tif (creature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b82059729bab33765b411f3f5be8e49ba5c2831d78cbf9738c547db9f366724f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'removeThing' has cognitive complexity of 32 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1189, + "startColumn": 12, + "charOffset": 34181, + "charLength": 11, + "snippet": { + "text": "removeThing" + } + }, + "contextRegion": { + "startLine": 1187, + "startColumn": 12, + "charOffset": 34167, + "charLength": 11, + "snippet": { + "text": "}\n\nvoid Tile::removeThing(std::shared_ptr thing, uint32_t count) {\n\tstd::shared_ptr creature = thing->getCreature();\n\tif (creature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b41f87f96dc1942193d767f7c480ee63a660202737bfc691b2190dce687c6956" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1193, + "startColumn": 7, + "charOffset": 34370, + "charLength": 9, + "snippet": { + "text": "creatures" + } + }, + "contextRegion": { + "startLine": 1191, + "startColumn": 7, + "charOffset": 34301, + "charLength": 9, + "snippet": { + "text": "\tif (creature) {\n\t\tCreatureVector* creatures = getCreatures();\n\t\tif (creatures) {\n\t\t\tauto it = std::find(creatures->begin(), creatures->end(), thing);\n\t\t\tif (it != creatures->end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84ed192bbe3dfa3705bd9a64693fc76e4b727d82a2ecad72004a64f961e15d53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'CreatureVector *' (aka 'vector> *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1193, + "startColumn": 7, + "charOffset": 34370, + "charLength": 9, + "snippet": { + "text": "creatures" + } + }, + "contextRegion": { + "startLine": 1191, + "startColumn": 7, + "charOffset": 34301, + "charLength": 9, + "snippet": { + "text": "\tif (creature) {\n\t\tCreatureVector* creatures = getCreatures();\n\t\tif (creatures) {\n\t\t\tauto it = std::find(creatures->begin(), creatures->end(), thing);\n\t\t\tif (it != creatures->end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5b8111eca8f5055aaab5ace82619952f75258fddee5ff441785fb6e1e2cf46f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1197, + "startColumn": 16, + "charOffset": 34530, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 1195, + "startColumn": 16, + "charOffset": 34452, + "charLength": 5, + "snippet": { + "text": "\t\t\tif (it != creatures->end()) {\n\t\t\t\tSpectators::clearCache();\n\t\t\t\tcreatures->erase(it);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a8d0d511fb4e98fb9177f2d461a89534eb5aa0b98d2338728236e6b97717548" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1204, + "startColumn": 6, + "charOffset": 34617, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1202, + "startColumn": 6, + "charOffset": 34563, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = thing->getItem();\n\tif (!item) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fde9d420384ae391be876f36e96dcc9c846457490cc12e3d111d05720e00386" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1223, + "startColumn": 6, + "charOffset": 34999, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1221, + "startColumn": 6, + "charOffset": 34953, + "charLength": 1, + "snippet": { + "text": "\n\tTileItemVector* items = getItemList();\n\tif (!items) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c979b5a66e3620641bd7687dab1495af0958ea9812567ade80a9cfe9d78cf478" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1223, + "startColumn": 7, + "charOffset": 35000, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1221, + "startColumn": 7, + "charOffset": 34953, + "charLength": 5, + "snippet": { + "text": "\n\tTileItemVector* items = getItemList();\n\tif (!items) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b47b24c8182bc19c3385a6c5da951dc15484bba45d400c60c4b677c8d5224a07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1236, + "startColumn": 3, + "charOffset": 35301, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1234, + "startColumn": 3, + "charOffset": 35228, + "charLength": 3, + "snippet": { + "text": "\n\t\tauto spectators = Spectators().find(getPosition(), true);\n\t\tfor (const auto &spectator : spectators) {\n\t\t\tif (const auto &tmpPlayer = spectator->getPlayer()) {\n\t\t\t\toldStackPosVector.push_back(getStackposOfItem(tmpPlayer, item));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6c8e956fe533aa482cdc4528569710946295bda7bc393453a9bf067a2e54299" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1243, + "startColumn": 10, + "charOffset": 35512, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 1241, + "startColumn": 10, + "charOffset": 35479, + "charLength": 5, + "snippet": { + "text": "\n\t\titem->resetParent();\n\t\titems->erase(it);\n\t\tonRemoveTileItem(spectators.data(), oldStackPosVector, item);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed15fcb9955e1b17b1044238113f24db9ff73ea0dc7af23e686c18fd7c7cb9c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1260, + "startColumn": 4, + "charOffset": 36184, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1258, + "startColumn": 4, + "charOffset": 36109, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tauto spectators = Spectators().find(getPosition(), true);\n\t\t\tfor (const auto &spectator : spectators) {\n\t\t\t\tif (const auto &tmpPlayer = spectator->getPlayer()) {\n\t\t\t\t\toldStackPosVector.push_back(getStackposOfItem(spectator->getPlayer(), item));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "235e1164b827632fc6e5f135a6e7cbe3ca72117464a9ec0ebb343405a13ac157" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1267, + "startColumn": 11, + "charOffset": 36414, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 1265, + "startColumn": 11, + "charOffset": 36379, + "charLength": 5, + "snippet": { + "text": "\n\t\t\titem->resetParent();\n\t\t\titems->erase(it);\n\t\t\titems->decreaseDownItemCount();\n\t\t\tonRemoveTileItem(spectators.data(), oldStackPosVector, item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d79d9675832ed65708839faac52769b6d1fecc450b751a79167acdd35c4376a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1274, + "startColumn": 53, + "charOffset": 36587, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1272, + "startColumn": 53, + "charOffset": 36532, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Tile::removeCreature(std::shared_ptr creature) {\n\tg_game().map.getMapSector(tilePos.x, tilePos.y)->removeCreature(creature);\n\tremoveThing(creature, 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5cff0b51c0c4a66d1db46559ee739d684a48c89f0ceaefafeb594be79068af40" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'getThingIndex' has cognitive complexity of 37 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1279, + "startColumn": 15, + "charOffset": 36719, + "charLength": 13, + "snippet": { + "text": "getThingIndex" + } + }, + "contextRegion": { + "startLine": 1277, + "startColumn": 15, + "charOffset": 36702, + "charLength": 13, + "snippet": { + "text": "}\n\nint32_t Tile::getThingIndex(std::shared_ptr thing) const {\n\tint32_t n = -1;\n\tif (ground) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06f6b8f7b0d783532f601e12eb7bd956eaf6e06e171caff9cb51127c991c32ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1289, + "startColumn": 6, + "charOffset": 36907, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1287, + "startColumn": 6, + "charOffset": 36855, + "charLength": 5, + "snippet": { + "text": "\n\tconst TileItemVector* items = getItemList();\n\tif (items) {\n\t\tstd::shared_ptr item = thing->getItem();\n\t\tif (item && item->isAlwaysOnTop()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc2e5fe3e7b8588727fab87f53bcb8cfb1d894eaf5d017a425fcc9c4444e403f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1289, + "startColumn": 6, + "charOffset": 36907, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1287, + "startColumn": 6, + "charOffset": 36855, + "charLength": 5, + "snippet": { + "text": "\n\tconst TileItemVector* items = getItemList();\n\tif (items) {\n\t\tstd::shared_ptr item = thing->getItem();\n\t\tif (item && item->isAlwaysOnTop()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2eafa58750a9ba37f8aff10348e460c08a43a0e88020c6c170e45b5dba85cb3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1292, + "startColumn": 4, + "charOffset": 37007, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1290, + "startColumn": 4, + "charOffset": 36916, + "charLength": 3, + "snippet": { + "text": "\t\tstd::shared_ptr item = thing->getItem();\n\t\tif (item && item->isAlwaysOnTop()) {\n\t\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\t\t++n;\n\t\t\t\tif (*it == item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f354923caf9f3b2e7609e8eb7321bc250ea859ec29e32d44ee765238cfd0c536" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1292, + "startColumn": 4, + "charOffset": 37007, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1290, + "startColumn": 4, + "charOffset": 36916, + "charLength": 3, + "snippet": { + "text": "\t\tstd::shared_ptr item = thing->getItem();\n\t\tif (item && item->isAlwaysOnTop()) {\n\t\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\t\t++n;\n\t\t\t\tif (*it == item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8a858ebc51fa3f2a15df9588e2676c5011ab00cc0e669029b4bf371e252eaec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1292, + "startColumn": 9, + "charOffset": 37012, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1290, + "startColumn": 9, + "charOffset": 36916, + "charLength": 4, + "snippet": { + "text": "\t\tstd::shared_ptr item = thing->getItem();\n\t\tif (item && item->isAlwaysOnTop()) {\n\t\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\t\t++n;\n\t\t\t\tif (*it == item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ed78b6703b1c24e8c8f7eda5f2a3788d17178ecaddc187ae30574693b49553e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1292, + "startColumn": 75, + "charOffset": 37078, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1290, + "startColumn": 75, + "charOffset": 36916, + "charLength": 2, + "snippet": { + "text": "\t\tstd::shared_ptr item = thing->getItem();\n\t\tif (item && item->isAlwaysOnTop()) {\n\t\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\t\t++n;\n\t\t\t\tif (*it == item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a87e052e4b2da63d3c693165265c920ab2e6a7c48b05a03a7f970f7b657e959a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1299, + "startColumn": 9, + "charOffset": 37174, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1297, + "startColumn": 9, + "charOffset": 37150, + "charLength": 5, + "snippet": { + "text": "\t\t\t}\n\t\t} else {\n\t\t\tn += items->getTopItemCount();\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67ce48234fabaca04b622fc1e19fb96c17a3149c2d8a5e3edd2c2d5cb8585797" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1305, + "startColumn": 4, + "charOffset": 37298, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1303, + "startColumn": 4, + "charOffset": 37208, + "charLength": 3, + "snippet": { + "text": "\tif (const CreatureVector* creatures = getCreatures()) {\n\t\tif (thing->getCreature()) {\n\t\t\tfor (auto &creature : *creatures) {\n\t\t\t\t++n;\n\t\t\t\tif (creature == thing) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5e2f2fa8da74cccab1d0b78953478cf349f8bcd67d4c1129b0893e82cda21a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &creature' can be declared as 'const auto &creature'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1305, + "startColumn": 9, + "charOffset": 37303, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1303, + "startColumn": 9, + "charOffset": 37208, + "charLength": 4, + "snippet": { + "text": "\tif (const CreatureVector* creatures = getCreatures()) {\n\t\tif (thing->getCreature()) {\n\t\t\tfor (auto &creature : *creatures) {\n\t\t\t\t++n;\n\t\t\t\tif (creature == thing) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73b7e40713c6ed9b7b5a168ad7581dfb3b204b8e5deffbb33d4bb08b7f81a57a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1312, + "startColumn": 9, + "charOffset": 37417, + "charLength": 9, + "snippet": { + "text": "creatures" + } + }, + "contextRegion": { + "startLine": 1310, + "startColumn": 9, + "charOffset": 37393, + "charLength": 9, + "snippet": { + "text": "\t\t\t}\n\t\t} else {\n\t\t\tn += creatures->size();\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0491541ccbd6fec7ea06c3bb2605841f342ed93966793612994e60a5b7fe1488" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1316, + "startColumn": 6, + "charOffset": 37449, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1314, + "startColumn": 6, + "charOffset": 37440, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tif (items) {\n\t\tstd::shared_ptr item = thing->getItem();\n\t\tif (item && !item->isAlwaysOnTop()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f665b81bad26e7c9e9928ee3295f897fcaa932de3043d1d106d37b2c1cfec07d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1316, + "startColumn": 6, + "charOffset": 37449, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1314, + "startColumn": 6, + "charOffset": 37440, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tif (items) {\n\t\tstd::shared_ptr item = thing->getItem();\n\t\tif (item && !item->isAlwaysOnTop()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c97bb68b772384450217ef495b9dad50502cb98e932aba33ff7510cfadb6163" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1319, + "startColumn": 4, + "charOffset": 37550, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1317, + "startColumn": 4, + "charOffset": 37458, + "charLength": 3, + "snippet": { + "text": "\t\tstd::shared_ptr item = thing->getItem();\n\t\tif (item && !item->isAlwaysOnTop()) {\n\t\t\tfor (auto it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\t\t++n;\n\t\t\t\tif (*it == item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99df5f55a11dcafda42d3fdf6f5247889c80924893da6652bb128b931b232e2a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1319, + "startColumn": 4, + "charOffset": 37550, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1317, + "startColumn": 4, + "charOffset": 37458, + "charLength": 3, + "snippet": { + "text": "\t\tstd::shared_ptr item = thing->getItem();\n\t\tif (item && !item->isAlwaysOnTop()) {\n\t\t\tfor (auto it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\t\t++n;\n\t\t\t\tif (*it == item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a362bbf1cd3cb37e660b1d4058e9cf77e77fb894ba4aa48e20e3177915305fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1319, + "startColumn": 9, + "charOffset": 37555, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1317, + "startColumn": 9, + "charOffset": 37458, + "charLength": 4, + "snippet": { + "text": "\t\tstd::shared_ptr item = thing->getItem();\n\t\tif (item && !item->isAlwaysOnTop()) {\n\t\t\tfor (auto it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\t\t++n;\n\t\t\t\tif (*it == item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36aa6105b7ec8b0180df4ff0204e001659b98867aec0c9b40cb3769d3f17e7f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1319, + "startColumn": 77, + "charOffset": 37623, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1317, + "startColumn": 77, + "charOffset": 37458, + "charLength": 2, + "snippet": { + "text": "\t\tstd::shared_ptr item = thing->getItem();\n\t\tif (item && !item->isAlwaysOnTop()) {\n\t\t\tfor (auto it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\t\t++n;\n\t\t\t\tif (*it == item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04bc9df1a8d956619dc1180070a45ca721eba7f4a57575b4a292c5fb3a232f1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1330, + "startColumn": 64, + "charOffset": 37785, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1328, + "startColumn": 64, + "charOffset": 37719, + "charLength": 6, + "snippet": { + "text": "}\n\nint32_t Tile::getClientIndexOfCreature(std::shared_ptr player, std::shared_ptr creature) const {\n\tint32_t n;\n\tif (ground) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62ae5ebf0982e23694dfbbde24ed21056cac6d7e11fa28a97b1fb5f37109f69a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1330, + "startColumn": 98, + "charOffset": 37819, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1328, + "startColumn": 98, + "charOffset": 37719, + "charLength": 8, + "snippet": { + "text": "}\n\nint32_t Tile::getClientIndexOfCreature(std::shared_ptr player, std::shared_ptr creature) const {\n\tint32_t n;\n\tif (ground) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7743ef6dfc271b94e53f1b71f108e1c72412d203d29336fa1e7ff68e23a32da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'n' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1331, + "startColumn": 10, + "charOffset": 37846, + "charLength": 1, + "snippet": { + "text": "n" + } + }, + "contextRegion": { + "startLine": 1329, + "startColumn": 10, + "charOffset": 37721, + "charLength": 1, + "snippet": { + "text": "\nint32_t Tile::getClientIndexOfCreature(std::shared_ptr player, std::shared_ptr creature) const {\n\tint32_t n;\n\tif (ground) {\n\t\tn = 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "547ba8d2e2d50f1c912f23324f1d7dd152c4d35fabcf6e71f7ea36e3ebc611f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1339, + "startColumn": 6, + "charOffset": 37947, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1337, + "startColumn": 6, + "charOffset": 37895, + "charLength": 5, + "snippet": { + "text": "\n\tconst TileItemVector* items = getItemList();\n\tif (items) {\n\t\tn += items->getTopItemCount();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14bc4db7ae699023902ea6ead0d8c926efc5ad5db28ac9ba76e81f5e1ece2a29" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1339, + "startColumn": 6, + "charOffset": 37947, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1337, + "startColumn": 6, + "charOffset": 37895, + "charLength": 5, + "snippet": { + "text": "\n\tconst TileItemVector* items = getItemList();\n\tif (items) {\n\t\tn += items->getTopItemCount();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8586391cf32a3f86bb5dc8f09d475b23131d67c14628b6b12f90872b099c85f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1340, + "startColumn": 8, + "charOffset": 37963, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1338, + "startColumn": 8, + "charOffset": 37896, + "charLength": 5, + "snippet": { + "text": "\tconst TileItemVector* items = getItemList();\n\tif (items) {\n\t\tn += items->getTopItemCount();\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3faf184f0f3ca4e67cf6406376c64114bdfdf7411bd58a5ce4a72132f257de4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1344, + "startColumn": 3, + "charOffset": 38052, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1342, + "startColumn": 3, + "charOffset": 37992, + "charLength": 3, + "snippet": { + "text": "\n\tif (const CreatureVector* creatures = getCreatures()) {\n\t\tfor (auto it = creatures->rbegin(); it != creatures->rend(); ++it) {\n\t\t\tif (*it == creature) {\n\t\t\t\treturn n;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4261b75c9719b1757973b996ce508c15a1cf1998e5bc5dcbcdeb92802e8b0bca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1344, + "startColumn": 3, + "charOffset": 38052, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1342, + "startColumn": 3, + "charOffset": 37992, + "charLength": 3, + "snippet": { + "text": "\n\tif (const CreatureVector* creatures = getCreatures()) {\n\t\tfor (auto it = creatures->rbegin(); it != creatures->rend(); ++it) {\n\t\t\tif (*it == creature) {\n\t\t\t\treturn n;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "615eeffa630470c95f4480003557e3d52d606257b291bf0748e3c904f80ca778" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-loop-convert", + "ruleIndex": 620, + "kind": "fail", + "level": "warning", + "message": { + "text": "use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1344, + "startColumn": 3, + "charOffset": 38052, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1342, + "startColumn": 3, + "charOffset": 37992, + "charLength": 3, + "snippet": { + "text": "\n\tif (const CreatureVector* creatures = getCreatures()) {\n\t\tfor (auto it = creatures->rbegin(); it != creatures->rend(); ++it) {\n\t\t\tif (*it == creature) {\n\t\t\t\treturn n;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c19afa997ec5b84ff8d965695e798aad550ade304f65536bcee0dd1138daa50d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1344, + "startColumn": 39, + "charOffset": 38088, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1342, + "startColumn": 39, + "charOffset": 37992, + "charLength": 2, + "snippet": { + "text": "\n\tif (const CreatureVector* creatures = getCreatures()) {\n\t\tfor (auto it = creatures->rbegin(); it != creatures->rend(); ++it) {\n\t\t\tif (*it == creature) {\n\t\t\t\treturn n;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "684f4653ece8c2679d3aaee08c897e1f5c22091fa9566d5485497fb92d678b48" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1345, + "startColumn": 4, + "charOffset": 38124, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1343, + "startColumn": 4, + "charOffset": 37993, + "charLength": 2, + "snippet": { + "text": "\tif (const CreatureVector* creatures = getCreatures()) {\n\t\tfor (auto it = creatures->rbegin(); it != creatures->rend(); ++it) {\n\t\t\tif (*it == creature) {\n\t\t\t\treturn n;\n\t\t\t} else if (player->canSeeCreature(*it)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "301e772073faa08a6d8104ce7daae1e0335c6dfc1b64e63cadfe15c6a0def070" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1347, + "startColumn": 6, + "charOffset": 38166, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1345, + "startColumn": 6, + "charOffset": 38121, + "charLength": 4, + "snippet": { + "text": "\t\t\tif (*it == creature) {\n\t\t\t\treturn n;\n\t\t\t} else if (player->canSeeCreature(*it)) {\n\t\t\t\t++n;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c337533eed9d94f98af0f8781037d7b2488b2d0448d18c4e2da7653a1330c52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1355, + "startColumn": 61, + "charOffset": 38302, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1353, + "startColumn": 61, + "charOffset": 38239, + "charLength": 6, + "snippet": { + "text": "}\n\nint32_t Tile::getStackposOfCreature(std::shared_ptr player, std::shared_ptr creature) const {\n\tint32_t n;\n\tif (ground) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00082faa2be9d42f5b6de227f6da505f2bee2282419435ecba22556c1e809039" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1355, + "startColumn": 95, + "charOffset": 38336, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1353, + "startColumn": 95, + "charOffset": 38239, + "charLength": 8, + "snippet": { + "text": "}\n\nint32_t Tile::getStackposOfCreature(std::shared_ptr player, std::shared_ptr creature) const {\n\tint32_t n;\n\tif (ground) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4e5699e03b03f418c30f614821ddbcb75219f42bb2a5231d63adb51acdb2db9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'n' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1356, + "startColumn": 10, + "charOffset": 38363, + "charLength": 1, + "snippet": { + "text": "n" + } + }, + "contextRegion": { + "startLine": 1354, + "startColumn": 10, + "charOffset": 38241, + "charLength": 1, + "snippet": { + "text": "\nint32_t Tile::getStackposOfCreature(std::shared_ptr player, std::shared_ptr creature) const {\n\tint32_t n;\n\tif (ground) {\n\t\tn = 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00a4ac3d4d6ac246e092b8bd6e4913c5e2aa564606914e759ced334394e96b3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1364, + "startColumn": 6, + "charOffset": 38464, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1362, + "startColumn": 6, + "charOffset": 38412, + "charLength": 5, + "snippet": { + "text": "\n\tconst TileItemVector* items = getItemList();\n\tif (items) {\n\t\tn += items->getTopItemCount();\n\t\tif (n >= 10) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b232a8590edd0fb3158c71724e81503347154fc89f7eaa99103640749f4ae5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1364, + "startColumn": 6, + "charOffset": 38464, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1362, + "startColumn": 6, + "charOffset": 38412, + "charLength": 5, + "snippet": { + "text": "\n\tconst TileItemVector* items = getItemList();\n\tif (items) {\n\t\tn += items->getTopItemCount();\n\t\tif (n >= 10) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b65a9b98e5c264ca67898253986f7e1463dbd03cf604c5fca947aa37db03ba8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1365, + "startColumn": 8, + "charOffset": 38480, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1363, + "startColumn": 8, + "charOffset": 38413, + "charLength": 5, + "snippet": { + "text": "\tconst TileItemVector* items = getItemList();\n\tif (items) {\n\t\tn += items->getTopItemCount();\n\t\tif (n >= 10) {\n\t\t\treturn -1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1216653a2afd52c14289999fd6cb3e33ee289257392166d3c674cffe898758b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1366, + "startColumn": 12, + "charOffset": 38517, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 1364, + "startColumn": 12, + "charOffset": 38459, + "charLength": 2, + "snippet": { + "text": "\tif (items) {\n\t\tn += items->getTopItemCount();\n\t\tif (n >= 10) {\n\t\t\treturn -1;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b58b448e260f3ffda45c59be56ed4168d8f4a440ffb8210154f60f707bad86f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1372, + "startColumn": 3, + "charOffset": 38604, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1370, + "startColumn": 3, + "charOffset": 38544, + "charLength": 3, + "snippet": { + "text": "\n\tif (const CreatureVector* creatures = getCreatures()) {\n\t\tfor (auto it = creatures->rbegin(); it != creatures->rend(); ++it) {\n\t\t\tif (*it == creature) {\n\t\t\t\treturn n;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "596e09d193fba6e486cda63870d888b0fc8b19840e7e63308451ab3dd19081c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1372, + "startColumn": 3, + "charOffset": 38604, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1370, + "startColumn": 3, + "charOffset": 38544, + "charLength": 3, + "snippet": { + "text": "\n\tif (const CreatureVector* creatures = getCreatures()) {\n\t\tfor (auto it = creatures->rbegin(); it != creatures->rend(); ++it) {\n\t\t\tif (*it == creature) {\n\t\t\t\treturn n;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ffbdc4c853f659519a4789556918d24a20eb0378d4f99f87e95e9c9f7a7b766" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-loop-convert", + "ruleIndex": 620, + "kind": "fail", + "level": "warning", + "message": { + "text": "use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1372, + "startColumn": 3, + "charOffset": 38604, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1370, + "startColumn": 3, + "charOffset": 38544, + "charLength": 3, + "snippet": { + "text": "\n\tif (const CreatureVector* creatures = getCreatures()) {\n\t\tfor (auto it = creatures->rbegin(); it != creatures->rend(); ++it) {\n\t\t\tif (*it == creature) {\n\t\t\t\treturn n;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "567f739400fd6a0134d6190eb326f7b5a4f5c1701027a562b36936f8646b7ea7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1372, + "startColumn": 39, + "charOffset": 38640, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1370, + "startColumn": 39, + "charOffset": 38544, + "charLength": 2, + "snippet": { + "text": "\n\tif (const CreatureVector* creatures = getCreatures()) {\n\t\tfor (auto it = creatures->rbegin(); it != creatures->rend(); ++it) {\n\t\t\tif (*it == creature) {\n\t\t\t\treturn n;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4f35acf346503a0c7baa1776ed87eee74f577cb327a5448d9196a380eee2f48" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1373, + "startColumn": 4, + "charOffset": 38676, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1371, + "startColumn": 4, + "charOffset": 38545, + "charLength": 2, + "snippet": { + "text": "\tif (const CreatureVector* creatures = getCreatures()) {\n\t\tfor (auto it = creatures->rbegin(); it != creatures->rend(); ++it) {\n\t\t\tif (*it == creature) {\n\t\t\t\treturn n;\n\t\t\t} else if (player->canSeeCreature(*it)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88dc752a2920331201a2b3847146988e3b9bef4da1d7309c08d49557a51cf077" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1375, + "startColumn": 6, + "charOffset": 38718, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1373, + "startColumn": 6, + "charOffset": 38673, + "charLength": 4, + "snippet": { + "text": "\t\t\tif (*it == creature) {\n\t\t\t\treturn n;\n\t\t\t} else if (player->canSeeCreature(*it)) {\n\t\t\t\tif (++n >= 10) {\n\t\t\t\t\treturn -1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81a86be95a478cc72ee762fd614b0a95f449fb2b280ff45793bed252980041f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1376, + "startColumn": 16, + "charOffset": 38773, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 1374, + "startColumn": 16, + "charOffset": 38699, + "charLength": 2, + "snippet": { + "text": "\t\t\t\treturn n;\n\t\t\t} else if (player->canSeeCreature(*it)) {\n\t\t\t\tif (++n >= 10) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b58b448e260f3ffda45c59be56ed4168d8f4a440ffb8210154f60f707bad86f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'getStackposOfItem' has cognitive complexity of 36 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1385, + "startColumn": 15, + "charOffset": 38842, + "charLength": 17, + "snippet": { + "text": "getStackposOfItem" + } + }, + "contextRegion": { + "startLine": 1383, + "startColumn": 15, + "charOffset": 38825, + "charLength": 17, + "snippet": { + "text": "}\n\nint32_t Tile::getStackposOfItem(std::shared_ptr player, std::shared_ptr item) const {\n\tint32_t n = 0;\n\tif (ground) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8364534992cb3f52843eb816186a7d71134a33f4ed62697ebcf6e1ab151a2118" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1385, + "startColumn": 57, + "charOffset": 38884, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1383, + "startColumn": 57, + "charOffset": 38825, + "charLength": 6, + "snippet": { + "text": "}\n\nint32_t Tile::getStackposOfItem(std::shared_ptr player, std::shared_ptr item) const {\n\tint32_t n = 0;\n\tif (ground) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c045a12fdb05a79ec1b606215698a851067ec1bf3ce1fa50dfc74b12321f255a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1385, + "startColumn": 87, + "charOffset": 38914, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 1383, + "startColumn": 87, + "charOffset": 38825, + "charLength": 4, + "snippet": { + "text": "}\n\nint32_t Tile::getStackposOfItem(std::shared_ptr player, std::shared_ptr item) const {\n\tint32_t n = 0;\n\tif (ground) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85101adeedd39bee49f4313432efb25d2f16816c2a241c23f9d7ae956bb56454" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1395, + "startColumn": 6, + "charOffset": 39062, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1393, + "startColumn": 6, + "charOffset": 39010, + "charLength": 5, + "snippet": { + "text": "\n\tconst TileItemVector* items = getItemList();\n\tif (items) {\n\t\tif (item->isAlwaysOnTop()) {\n\t\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e830cbb2405f36966f1df66217cb13069911a479ed6c507b6e22ecd5adf1cad0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1395, + "startColumn": 6, + "charOffset": 39062, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1393, + "startColumn": 6, + "charOffset": 39010, + "charLength": 5, + "snippet": { + "text": "\n\tconst TileItemVector* items = getItemList();\n\tif (items) {\n\t\tif (item->isAlwaysOnTop()) {\n\t\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "009ff42aa042d591718dd1de7bfbb3901e92c209156bb7e241d8ce76f7f57e4d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1397, + "startColumn": 4, + "charOffset": 39105, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1395, + "startColumn": 4, + "charOffset": 39057, + "charLength": 3, + "snippet": { + "text": "\tif (items) {\n\t\tif (item->isAlwaysOnTop()) {\n\t\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\t\tif (*it == item) {\n\t\t\t\t\treturn n;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46954331af110a9f0b83dda3dbbd2a18ff9ccf2dccccc4ea1c5adbc687690f79" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1397, + "startColumn": 4, + "charOffset": 39105, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1395, + "startColumn": 4, + "charOffset": 39057, + "charLength": 3, + "snippet": { + "text": "\tif (items) {\n\t\tif (item->isAlwaysOnTop()) {\n\t\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\t\tif (*it == item) {\n\t\t\t\t\treturn n;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bdd05cbf04dfa632443a8a63ca8f7e32e79f37c8419ec7d700570a8ddf661442" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1397, + "startColumn": 9, + "charOffset": 39110, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1395, + "startColumn": 9, + "charOffset": 39057, + "charLength": 4, + "snippet": { + "text": "\tif (items) {\n\t\tif (item->isAlwaysOnTop()) {\n\t\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\t\tif (*it == item) {\n\t\t\t\t\treturn n;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "149b7fa343a64b55cc9b407d86bbdd1d0deb0119184f6ef2d3399ea590f1f1de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1397, + "startColumn": 75, + "charOffset": 39176, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1395, + "startColumn": 75, + "charOffset": 39057, + "charLength": 2, + "snippet": { + "text": "\tif (items) {\n\t\tif (item->isAlwaysOnTop()) {\n\t\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\t\tif (*it == item) {\n\t\t\t\t\treturn n;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8558e0fcf2d041e76c3eb83f0bc58399935766d71df87581d9ef557ee42c1ae9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1398, + "startColumn": 5, + "charOffset": 39199, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1396, + "startColumn": 5, + "charOffset": 39071, + "charLength": 2, + "snippet": { + "text": "\t\tif (item->isAlwaysOnTop()) {\n\t\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\t\tif (*it == item) {\n\t\t\t\t\treturn n;\n\t\t\t\t} else if (++n == 10) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a779f526982a757e95bebfe3852cbecabcc4576979489c12441234fe3dd3c9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1400, + "startColumn": 7, + "charOffset": 39239, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1398, + "startColumn": 7, + "charOffset": 39195, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tif (*it == item) {\n\t\t\t\t\treturn n;\n\t\t\t\t} else if (++n == 10) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e09ed31297662ea1359433f411f6e17dbaa1aa084135f762e75d2996b29c655" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1400, + "startColumn": 23, + "charOffset": 39255, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 1398, + "startColumn": 23, + "charOffset": 39195, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tif (*it == item) {\n\t\t\t\t\treturn n;\n\t\t\t\t} else if (++n == 10) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8556ae7853ca0ff88099aa0c3a17a04869bf8c57e70764c645fd1d28c43b3d7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1405, + "startColumn": 9, + "charOffset": 39307, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1403, + "startColumn": 9, + "charOffset": 39283, + "charLength": 5, + "snippet": { + "text": "\t\t\t}\n\t\t} else {\n\t\t\tn += items->getTopItemCount();\n\t\t\tif (n >= 10) {\n\t\t\t\treturn -1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66494b994f447f622d9af8a93b79b9b63baf9d16d26744f1c1b7a0bb4e089d38" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1406, + "startColumn": 13, + "charOffset": 39345, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 1404, + "startColumn": 13, + "charOffset": 39288, + "charLength": 2, + "snippet": { + "text": "\t\t} else {\n\t\t\tn += items->getTopItemCount();\n\t\t\tif (n >= 10) {\n\t\t\t\treturn -1;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "feebc3df01c952056d79bd288c56fe25e7ad6cc68892962fa2a1efad88204c0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1413, + "startColumn": 3, + "charOffset": 39438, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1411, + "startColumn": 3, + "charOffset": 39378, + "charLength": 3, + "snippet": { + "text": "\n\tif (const CreatureVector* creatures = getCreatures()) {\n\t\tfor (auto &creature : *creatures) {\n\t\t\tif (player->canSeeCreature(creature)) {\n\t\t\t\tif (++n >= 10) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d6a0456cd0bacd71051cc6cf7ff76ba002ea335470005e453501997b622856d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &creature' can be declared as 'const auto &creature'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1413, + "startColumn": 8, + "charOffset": 39443, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1411, + "startColumn": 8, + "charOffset": 39378, + "charLength": 4, + "snippet": { + "text": "\n\tif (const CreatureVector* creatures = getCreatures()) {\n\t\tfor (auto &creature : *creatures) {\n\t\t\tif (player->canSeeCreature(creature)) {\n\t\t\t\tif (++n >= 10) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f89ffb7a41f22481cdac74f5d0f1fe8b0e29493d0660ca5fc7bb3adbd184fab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1415, + "startColumn": 16, + "charOffset": 39532, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 1413, + "startColumn": 16, + "charOffset": 39436, + "charLength": 2, + "snippet": { + "text": "\t\tfor (auto &creature : *creatures) {\n\t\t\tif (player->canSeeCreature(creature)) {\n\t\t\t\tif (++n >= 10) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31f7da440cd7d2b3fb351c6aa27dd50b52a63f33a7072b4b8b3d97c6846a8c1c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1422, + "startColumn": 6, + "charOffset": 39578, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1420, + "startColumn": 6, + "charOffset": 39569, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tif (items && !item->isAlwaysOnTop()) {\n\t\tfor (auto it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\tif (*it == item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee065f19c013d7ee5a1eabbb17f2e9c6d57fc9d0f989c55d376ea65c299f42af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1422, + "startColumn": 6, + "charOffset": 39578, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1420, + "startColumn": 6, + "charOffset": 39569, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tif (items && !item->isAlwaysOnTop()) {\n\t\tfor (auto it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\tif (*it == item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "593bcf15cdeaa8cdf474e7cfd09d90b1df3646a97b8802a9a2b3701dddaaea44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1422, + "startColumn": 12, + "charOffset": 39584, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 1420, + "startColumn": 12, + "charOffset": 39569, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (items && !item->isAlwaysOnTop()) {\n\t\tfor (auto it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\tif (*it == item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "106040b07aa9ac05708df7d145373d036b51b41e1f9d469ec8451610bf8e6f00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1423, + "startColumn": 3, + "charOffset": 39615, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1421, + "startColumn": 3, + "charOffset": 39572, + "charLength": 3, + "snippet": { + "text": "\n\tif (items && !item->isAlwaysOnTop()) {\n\t\tfor (auto it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\tif (*it == item) {\n\t\t\t\treturn n;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3977ce70eec7adf6ed208f112c897b898cdb1104204ac4c64fc573c3dd4bb45e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1423, + "startColumn": 3, + "charOffset": 39615, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1421, + "startColumn": 3, + "charOffset": 39572, + "charLength": 3, + "snippet": { + "text": "\n\tif (items && !item->isAlwaysOnTop()) {\n\t\tfor (auto it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\tif (*it == item) {\n\t\t\t\treturn n;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31820415ee313f27f4bdb2a6e3b7d9dc8de55021871cad7f80f8bed7ed8f1812" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1423, + "startColumn": 8, + "charOffset": 39620, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1421, + "startColumn": 8, + "charOffset": 39572, + "charLength": 4, + "snippet": { + "text": "\n\tif (items && !item->isAlwaysOnTop()) {\n\t\tfor (auto it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\tif (*it == item) {\n\t\t\t\treturn n;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fcaf9c8b1f1ac2b148aff7ae8bcb7d02182a1bec3161559af48fcbc692fde53f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1423, + "startColumn": 76, + "charOffset": 39688, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1421, + "startColumn": 76, + "charOffset": 39572, + "charLength": 2, + "snippet": { + "text": "\n\tif (items && !item->isAlwaysOnTop()) {\n\t\tfor (auto it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\tif (*it == item) {\n\t\t\t\treturn n;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8558e0fcf2d041e76c3eb83f0bc58399935766d71df87581d9ef557ee42c1ae9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1424, + "startColumn": 4, + "charOffset": 39710, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1422, + "startColumn": 4, + "charOffset": 39573, + "charLength": 2, + "snippet": { + "text": "\tif (items && !item->isAlwaysOnTop()) {\n\t\tfor (auto it = items->getBeginDownItem(), end = items->getEndDownItem(); it != end; ++it) {\n\t\t\tif (*it == item) {\n\t\t\t\treturn n;\n\t\t\t} else if (++n >= 10) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51c546986bc6babe4304a16ab33f8994ad4be7519ee1d34797c9c89a9b7a6e4f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1426, + "startColumn": 6, + "charOffset": 39748, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1424, + "startColumn": 6, + "charOffset": 39707, + "charLength": 4, + "snippet": { + "text": "\t\t\tif (*it == item) {\n\t\t\t\treturn n;\n\t\t\t} else if (++n >= 10) {\n\t\t\t\treturn -1;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a95cd1b57acec2183dbca8dfb9397271ea89709ba6b1bbacd70b9e7b4f9dad0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "10 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1426, + "startColumn": 22, + "charOffset": 39764, + "charLength": 2, + "snippet": { + "text": "10" + } + }, + "contextRegion": { + "startLine": 1424, + "startColumn": 22, + "charOffset": 39707, + "charLength": 2, + "snippet": { + "text": "\t\t\tif (*it == item) {\n\t\t\t\treturn n;\n\t\t\t} else if (++n >= 10) {\n\t\t\t\treturn -1;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c466b73c93e15d4837ff83bf1e2ea373eef35c270483382d603f39ab92ed3420" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1442, + "startColumn": 16, + "charOffset": 39942, + "charLength": 16, + "snippet": { + "text": "getItemTypeCount" + } + }, + "contextRegion": { + "startLine": 1440, + "startColumn": 16, + "charOffset": 39924, + "charLength": 16, + "snippet": { + "text": "}\n\nuint32_t Tile::getItemTypeCount(uint16_t itemId, int32_t subType /*= -1*/) const {\n\tuint32_t count = 0;\n\tif (ground && ground->getID() == itemId) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de89a9eb252f73855b0e17282868be134c9461edf1e6943ac3054be948601dbb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'getItemTypeCount' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1442, + "startColumn": 33, + "charOffset": 39959, + "charLength": 8, + "snippet": { + "text": "uint16_t" + } + }, + "contextRegion": { + "startLine": 1440, + "startColumn": 33, + "charOffset": 39924, + "charLength": 8, + "snippet": { + "text": "}\n\nuint32_t Tile::getItemTypeCount(uint16_t itemId, int32_t subType /*= -1*/) const {\n\tuint32_t count = 0;\n\tif (ground && ground->getID() == itemId) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89a621d79576ac9dda65cda3e5f8c1d0dd69d64fd26471bba8e7c1e8575781bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1449, + "startColumn": 6, + "charOffset": 40177, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1447, + "startColumn": 6, + "charOffset": 40125, + "charLength": 5, + "snippet": { + "text": "\n\tconst TileItemVector* items = getItemList();\n\tif (items) {\n\t\tfor (auto &item : *items) {\n\t\t\tif (item->getID() == itemId) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a04e5b328e205571c94f054ffe0505225132cb39c3a4759de8b487063158dcf8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1449, + "startColumn": 6, + "charOffset": 40177, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1447, + "startColumn": 6, + "charOffset": 40125, + "charLength": 5, + "snippet": { + "text": "\n\tconst TileItemVector* items = getItemList();\n\tif (items) {\n\t\tfor (auto &item : *items) {\n\t\t\tif (item->getID() == itemId) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "875af06e359d45923e9010e4759966b41aba694e29692152711045ecf8929fec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1450, + "startColumn": 3, + "charOffset": 40188, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1448, + "startColumn": 3, + "charOffset": 40126, + "charLength": 3, + "snippet": { + "text": "\tconst TileItemVector* items = getItemList();\n\tif (items) {\n\t\tfor (auto &item : *items) {\n\t\t\tif (item->getID() == itemId) {\n\t\t\t\tcount += Item::countByType(item, subType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7916277157118a0652cb81fa1d02a8b52f0a3aa4a3bd98f6118fb0d762154d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &item' can be declared as 'const auto &item'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1450, + "startColumn": 8, + "charOffset": 40193, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1448, + "startColumn": 8, + "charOffset": 40126, + "charLength": 4, + "snippet": { + "text": "\tconst TileItemVector* items = getItemList();\n\tif (items) {\n\t\tfor (auto &item : *items) {\n\t\t\tif (item->getID() == itemId) {\n\t\t\t\tcount += Item::countByType(item, subType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ecf9d36f581cf10324547f531c8ebec7e11876ed0638688237a1b19a151ff2fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1469, + "startColumn": 6, + "charOffset": 40511, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1467, + "startColumn": 6, + "charOffset": 40459, + "charLength": 5, + "snippet": { + "text": "\n\tconst TileItemVector* items = getItemList();\n\tif (items) {\n\t\tuint32_t topItemSize = items->getTopItemCount();\n\t\tif (index < topItemSize) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ceff94fd6673b45206dce38d409a05fb99327fb0b24ce5d9757e753e91db264" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1469, + "startColumn": 6, + "charOffset": 40511, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1467, + "startColumn": 6, + "charOffset": 40459, + "charLength": 5, + "snippet": { + "text": "\n\tconst TileItemVector* items = getItemList();\n\tif (items) {\n\t\tuint32_t topItemSize = items->getTopItemCount();\n\t\tif (index < topItemSize) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a38e5a6dfa8c20e39cb41092b17a5c915d827092286b9cd80cc543fac26bd57" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1484, + "startColumn": 6, + "charOffset": 40854, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1482, + "startColumn": 6, + "charOffset": 40845, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tif (items && index < items->getDownItemCount()) {\n\t\treturn items->at(index);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea3ca77ca30cae08d3682e063cd45ebf74bb35e1bee0075212efd57ba9f944fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1484, + "startColumn": 6, + "charOffset": 40854, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1482, + "startColumn": 6, + "charOffset": 40845, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tif (items && index < items->getDownItemCount()) {\n\t\treturn items->at(index);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "009ff42aa042d591718dd1de7bfbb3901e92c209156bb7e241d8ce76f7f57e4d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1484, + "startColumn": 12, + "charOffset": 40860, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 1482, + "startColumn": 12, + "charOffset": 40845, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (items && index < items->getDownItemCount()) {\n\t\treturn items->at(index);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5053cd393073fbe7aa355b5dca1fcd3b0ed0b8654c537614ae6a0c9098b17767" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1490, + "startColumn": 12, + "charOffset": 40961, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + } + }, + "contextRegion": { + "startLine": 1488, + "startColumn": 12, + "charOffset": 40947, + "charLength": 19, + "snippet": { + "text": "}\n\nvoid Tile::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link /*= LINK_OWNER*/) {\n\tfor (const auto &spectator : Spectators().find(getPosition(), true)) {\n\t\tspectator->getPlayer()->postAddNotification(thing, oldParent, index, LINK_NEAR);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "530d758b7d3eb83a93e99ae7b96efbf9370e08be41a62c813345384e904e04ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1491, + "startColumn": 2, + "charOffset": 41104, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1489, + "startColumn": 2, + "charOffset": 40949, + "charLength": 3, + "snippet": { + "text": "\nvoid Tile::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link /*= LINK_OWNER*/) {\n\tfor (const auto &spectator : Spectators().find(getPosition(), true)) {\n\t\tspectator->getPlayer()->postAddNotification(thing, oldParent, index, LINK_NEAR);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ae9f6d8cae545361fb49c2325d10d25b3733243f3aa1865cb913dbdf1f4b7b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1505, + "startColumn": 3, + "charOffset": 41556, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1503, + "startColumn": 3, + "charOffset": 41526, + "charLength": 2, + "snippet": { + "text": "\n\tif (link == LINK_OWNER) {\n\t\tif (hasFlag(TILESTATE_TELEPORT)) {\n\t\t\tstd::shared_ptr teleport = getTeleportItem();\n\t\t\tif (teleport) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "558a7960470f352b53d541d611e94c49c004fc999540c14dcd4a8ff7ca69f033" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1523, + "startColumn": 3, + "charOffset": 42062, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1521, + "startColumn": 3, + "charOffset": 42029, + "charLength": 2, + "snippet": { + "text": "\n\t\t// calling movement scripts\n\t\tif (creature) {\n\t\t\tg_moveEvents().onCreatureMove(creature, static_self_cast(), MOVE_EVENT_STEP_IN);\n\t\t} else if (item) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b54a835fa7d9706a0adf001b0e62a3bd7075388e4ea080ca7ea73380a4d9c95a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1524, + "startColumn": 19, + "charOffset": 42096, + "charLength": 14, + "snippet": { + "text": "onCreatureMove" + } + }, + "contextRegion": { + "startLine": 1522, + "startColumn": 19, + "charOffset": 42030, + "charLength": 14, + "snippet": { + "text": "\t\t// calling movement scripts\n\t\tif (creature) {\n\t\t\tg_moveEvents().onCreatureMove(creature, static_self_cast(), MOVE_EVENT_STEP_IN);\n\t\t} else if (item) {\n\t\t\tg_moveEvents().onItemMove(item, static_self_cast(), true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7cc7a3cf7f1139b1d621b23c4e72b6ad5cd10d6427e233e3cf98e0b342f170c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1526, + "startColumn": 19, + "charOffset": 42207, + "charLength": 10, + "snippet": { + "text": "onItemMove" + } + }, + "contextRegion": { + "startLine": 1524, + "startColumn": 19, + "charOffset": 42078, + "charLength": 10, + "snippet": { + "text": "\t\t\tg_moveEvents().onCreatureMove(creature, static_self_cast(), MOVE_EVENT_STEP_IN);\n\t\t} else if (item) {\n\t\t\tg_moveEvents().onItemMove(item, static_self_cast(), true);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07f41a7b0d934afaff49a26ebbd3bd46e8be80dc1953d5280590742950df2d38" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1531, + "startColumn": 12, + "charOffset": 42278, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + } + }, + "contextRegion": { + "startLine": 1529, + "startColumn": 12, + "charOffset": 42264, + "charLength": 22, + "snippet": { + "text": "}\n\nvoid Tile::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\n\tauto spectators = Spectators().find(getPosition(), true);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "965c12090795446aac1258ca50363bafca159ef6fcd79487b21df35e271c6fdb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1531, + "startColumn": 131, + "charOffset": 42397, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 1529, + "startColumn": 131, + "charOffset": 42264, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Tile::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\n\tauto spectators = Spectators().find(getPosition(), true);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de51b9dcfa4a7f1e7f2e08f1e8a2e1f2c4d0d7fe6061b4d727a6b090c3af45be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1534, + "startColumn": 24, + "charOffset": 42492, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 1532, + "startColumn": 24, + "charOffset": 42401, + "charLength": 1, + "snippet": { + "text": "\tauto spectators = Spectators().find(getPosition(), true);\n\n\tif (getThingCount() > 8) {\n\t\tonUpdateTile(spectators.data());\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97f353f3f15b2b879b729211ff2909bf680047930f989b076133744baaed7f0c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1538, + "startColumn": 2, + "charOffset": 42537, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1536, + "startColumn": 2, + "charOffset": 42532, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (const auto &spectator : spectators) {\n\t\tspectator->getPlayer()->postRemoveNotification(thing, newParent, index, LINK_NEAR);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "511ef429f1094a78f7c654dd79a29b707fd2fc7218e4015278a894af73ca2ebd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1545, + "startColumn": 18, + "charOffset": 42793, + "charLength": 14, + "snippet": { + "text": "onCreatureMove" + } + }, + "contextRegion": { + "startLine": 1543, + "startColumn": 18, + "charOffset": 42699, + "charLength": 14, + "snippet": { + "text": "\tstd::shared_ptr creature = thing->getCreature();\n\tif (creature) {\n\t\tg_moveEvents().onCreatureMove(creature, static_self_cast(), MOVE_EVENT_STEP_OUT);\n\t} else {\n\t\tstd::shared_ptr item = thing->getItem();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd7f2bf47307a55056217e117b729d2fec22aa502e8d5676eb4ffe15771579b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1549, + "startColumn": 19, + "charOffset": 42957, + "charLength": 10, + "snippet": { + "text": "onItemMove" + } + }, + "contextRegion": { + "startLine": 1547, + "startColumn": 19, + "charOffset": 42876, + "charLength": 10, + "snippet": { + "text": "\t\tstd::shared_ptr item = thing->getItem();\n\t\tif (item) {\n\t\t\tg_moveEvents().onItemMove(item, static_self_cast(), false);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b749ad76be9510b174fa25d0fc67598121223396e53f51ff268243d8885f8199" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1556, + "startColumn": 6, + "charOffset": 43112, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1554, + "startColumn": 6, + "charOffset": 43018, + "charLength": 1, + "snippet": { + "text": "void Tile::internalAddThing(std::shared_ptr thing) {\n\tinternalAddThing(0, thing);\n\tif (!thing || !thing->getParent()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39d79519663c56831451803b1c48e83f781b889cf027905f1812d8e3a9a56059" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1556, + "startColumn": 16, + "charOffset": 43122, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1554, + "startColumn": 16, + "charOffset": 43018, + "charLength": 1, + "snippet": { + "text": "void Tile::internalAddThing(std::shared_ptr thing) {\n\tinternalAddThing(0, thing);\n\tif (!thing || !thing->getParent()) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b26edb22074d87c7e1b0726c564b4675d7d8036677b12934c69cf5f9eb0fd9e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'internalAddThing' has cognitive complexity of 26 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1574, + "startColumn": 12, + "charOffset": 43466, + "charLength": 16, + "snippet": { + "text": "internalAddThing" + } + }, + "contextRegion": { + "startLine": 1572, + "startColumn": 12, + "charOffset": 43452, + "charLength": 16, + "snippet": { + "text": "}\n\nvoid Tile::internalAddThing(uint32_t, std::shared_ptr thing) {\n\tif (!thing) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8dcb2cc4e2962b8efecadb1cee8e8d361196e1d4d604c013a689388f9e423c00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1574, + "startColumn": 37, + "charOffset": 43491, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 1572, + "startColumn": 37, + "charOffset": 43452, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid Tile::internalAddThing(uint32_t, std::shared_ptr thing) {\n\tif (!thing) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e83c193630e641743afc4ba8008054589b27c93b35b4f179aa94e4b5d70c97cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1575, + "startColumn": 6, + "charOffset": 43530, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1573, + "startColumn": 6, + "charOffset": 43454, + "charLength": 1, + "snippet": { + "text": "\nvoid Tile::internalAddThing(uint32_t, std::shared_ptr thing) {\n\tif (!thing) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43b895edd7d64667c059628bc300ed5ca6d73999e25219583417d9b60f1544cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1578, + "startColumn": 2, + "charOffset": 43554, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1576, + "startColumn": 2, + "charOffset": 43540, + "charLength": 3, + "snippet": { + "text": "\t\treturn;\n\t}\n\tfor (const auto &zone : getZones()) {\n\t\tzone->thingAdded(thing);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f3b899e1e3aa6730893254eb02d601c44d3279633e7bca1a54b5adc1664f344" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1589, + "startColumn": 14, + "charOffset": 43820, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 1587, + "startColumn": 14, + "charOffset": 43759, + "charLength": 6, + "snippet": { + "text": "\n\t\tCreatureVector* creatures = makeCreatures();\n\t\tcreatures->insert(creatures->begin(), creature);\n\t} else {\n\t\tstd::shared_ptr item = thing->getItem();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "827d3f043d768f2e943cc7c2eedb6e4be55c98adcd43779b363319c475ea5848" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-3", + "ruleIndex": 415, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-3: A \"U\" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1606, + "startColumn": 24, + "charOffset": 44205, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 1604, + "startColumn": 24, + "charOffset": 44139, + "charLength": 6, + "snippet": { + "text": "\n\t\tTileItemVector* items = makeItemList();\n\t\tif (items->size() >= 0xFFFF) {\n\t\t\treturn /*RETURNVALUE_NOTPOSSIBLE*/;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4263f09bd803e438e4a3c82d95683bbb8e49647b0a0b71ff32e4f1fce4ec704b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1606, + "startColumn": 24, + "charOffset": 44205, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 1604, + "startColumn": 24, + "charOffset": 44139, + "charLength": 6, + "snippet": { + "text": "\n\t\tTileItemVector* items = makeItemList();\n\t\tif (items->size() >= 0xFFFF) {\n\t\t\treturn /*RETURNVALUE_NOTPOSSIBLE*/;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0548fb085404062703dc3998092b2a8878671ecfe768081c8b7591d58cdf4bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1612, + "startColumn": 4, + "charOffset": 44321, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1610, + "startColumn": 4, + "charOffset": 44259, + "charLength": 3, + "snippet": { + "text": "\t\tif (item->isAlwaysOnTop()) {\n\t\t\tbool isInserted = false;\n\t\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\t\tif (Item::items[(*it)->getID()].alwaysOnTopOrder > itemType.alwaysOnTopOrder) {\n\t\t\t\t\titems->insert(it, item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a005cc6b625a1003219a013bcf2d7c155b967149f4a33564bf58aeea6c49190" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1612, + "startColumn": 4, + "charOffset": 44321, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1610, + "startColumn": 4, + "charOffset": 44259, + "charLength": 3, + "snippet": { + "text": "\t\tif (item->isAlwaysOnTop()) {\n\t\t\tbool isInserted = false;\n\t\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\t\tif (Item::items[(*it)->getID()].alwaysOnTopOrder > itemType.alwaysOnTopOrder) {\n\t\t\t\t\titems->insert(it, item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe67ff9b13b8c0dc7205ef3a122bcc5702f011a9bf9a2ccedb320cc78fe24f0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1612, + "startColumn": 9, + "charOffset": 44326, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1610, + "startColumn": 9, + "charOffset": 44259, + "charLength": 4, + "snippet": { + "text": "\t\tif (item->isAlwaysOnTop()) {\n\t\t\tbool isInserted = false;\n\t\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\t\tif (Item::items[(*it)->getID()].alwaysOnTopOrder > itemType.alwaysOnTopOrder) {\n\t\t\t\t\titems->insert(it, item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "720a6dd471ea8b0be6c6dc3f0adc0b8ff90a870ff5256aa4edca45223ac2264d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1612, + "startColumn": 75, + "charOffset": 44392, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 1610, + "startColumn": 75, + "charOffset": 44259, + "charLength": 2, + "snippet": { + "text": "\t\tif (item->isAlwaysOnTop()) {\n\t\t\tbool isInserted = false;\n\t\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\t\tif (Item::items[(*it)->getID()].alwaysOnTopOrder > itemType.alwaysOnTopOrder) {\n\t\t\t\t\titems->insert(it, item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4202bee1049fb1fbb192bc3606852e6cf46951ca717bef9e9752e89089b921ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1614, + "startColumn": 13, + "charOffset": 44507, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 1612, + "startColumn": 13, + "charOffset": 44318, + "charLength": 6, + "snippet": { + "text": "\t\t\tfor (auto it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\n\t\t\t\tif (Item::items[(*it)->getID()].alwaysOnTopOrder > itemType.alwaysOnTopOrder) {\n\t\t\t\t\titems->insert(it, item);\n\t\t\t\t\tisInserted = true;\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8ebb664a9727ad3e5ad42ac51c9b60b8d0b1b682b0559875c56b153722b486f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1624, + "startColumn": 11, + "charOffset": 44649, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 1622, + "startColumn": 11, + "charOffset": 44623, + "charLength": 6, + "snippet": { + "text": "\t\t\t}\n\t\t} else {\n\t\t\titems->insert(items->getBeginDownItem(), item);\n\t\t\titems->increaseDownItemCount();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06cdfe8d04bd4cb887067a6529dce238bf5142a78ae597fe014cff2fc0320819" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'resetTileFlags' has cognitive complexity of 32 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1724, + "startColumn": 12, + "charOffset": 46757, + "charLength": 14, + "snippet": { + "text": "resetTileFlags" + } + }, + "contextRegion": { + "startLine": 1722, + "startColumn": 12, + "charOffset": 46743, + "charLength": 14, + "snippet": { + "text": "}\n\nvoid Tile::resetTileFlags(const std::shared_ptr &item) {\n\tconst ItemType &it = Item::items[item->getID()];\n\tif (it.floorChange != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7336ea3a9aa2a2b3d83c8bc65ebab40dbcac5f9319a2f2de30d8107a2e22b13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1806, + "startColumn": 9, + "charOffset": 49111, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1804, + "startColumn": 9, + "charOffset": 49063, + "charLength": 1, + "snippet": { + "text": "\nbool Tile::isMovableBlocking() const {\n\treturn !ground || hasFlag(TILESTATE_BLOCKSOLID);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a19961b2241d3a2360ca2bf3a92d327fc396eeeb1e8dceae6fdf586c09cbc20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1811, + "startColumn": 6, + "charOffset": 49269, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1809, + "startColumn": 6, + "charOffset": 49156, + "charLength": 1, + "snippet": { + "text": "std::shared_ptr Tile::getUseItem(int32_t index) const {\n\tconst TileItemVector* items = getItemList();\n\tif (!items || items->size() == 0) {\n\t\treturn ground;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2a20fbe9e63762555161b67b3a85e0750b9c1e98c2d9c557610ed0e2a8e6189" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1811, + "startColumn": 7, + "charOffset": 49270, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1809, + "startColumn": 7, + "charOffset": 49156, + "charLength": 5, + "snippet": { + "text": "std::shared_ptr Tile::getUseItem(int32_t index) const {\n\tconst TileItemVector* items = getItemList();\n\tif (!items || items->size() == 0) {\n\t\treturn ground;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c786c2106859fff0637328b5736eccc19a541f3f7d6d654462d43e76dd39b888" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-container-size-empty", + "ruleIndex": 695, + "kind": "fail", + "level": "warning", + "message": { + "text": "the 'empty' method should be used to check for emptiness instead of 'size'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1811, + "startColumn": 16, + "charOffset": 49279, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1809, + "startColumn": 16, + "charOffset": 49156, + "charLength": 5, + "snippet": { + "text": "std::shared_ptr Tile::getUseItem(int32_t index) const {\n\tconst TileItemVector* items = getItemList();\n\tif (!items || items->size() == 0) {\n\t\treturn ground;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9cb90dc890362d7a81ed2cbf436945fc9f670d31d716a348d8fac2ba236ed1f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1824, + "startColumn": 6, + "charOffset": 49529, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1822, + "startColumn": 6, + "charOffset": 49428, + "charLength": 1, + "snippet": { + "text": "std::shared_ptr Tile::getDoorItem() const {\n\tconst TileItemVector* items = getItemList();\n\tif (!items || items->size() == 0) {\n\t\treturn ground;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ba45d2fd44020abb806f9b15f8940bf644eed482c5e3567a1b020fe9c718834" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1824, + "startColumn": 7, + "charOffset": 49530, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1822, + "startColumn": 7, + "charOffset": 49428, + "charLength": 5, + "snippet": { + "text": "std::shared_ptr Tile::getDoorItem() const {\n\tconst TileItemVector* items = getItemList();\n\tif (!items || items->size() == 0) {\n\t\treturn ground;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7dedb58e2ea8b6c1669e66ec883fcc7865f924b688de3f75ca9bc1361cf9519" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-container-size-empty", + "ruleIndex": 695, + "kind": "fail", + "level": "warning", + "message": { + "text": "the 'empty' method should be used to check for emptiness instead of 'size'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1824, + "startColumn": 16, + "charOffset": 49539, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1822, + "startColumn": 16, + "charOffset": 49428, + "charLength": 5, + "snippet": { + "text": "std::shared_ptr Tile::getDoorItem() const {\n\tconst TileItemVector* items = getItemList();\n\tif (!items || items->size() == 0) {\n\t\treturn ground;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f1932e86adbbe2aa271d7ff223f1e881875655af0d0e13597b0abfd6f2de920" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1828, + "startColumn": 6, + "charOffset": 49587, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1826, + "startColumn": 6, + "charOffset": 49578, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tif (items) {\n\t\tfor (auto &item : *items) {\n\t\t\tconst ItemType &it = Item::items[item->getID()];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a803e05d285f6f21e8c3be2e22381cd3a98e63d6d1718181db38a065bc7965b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1828, + "startColumn": 6, + "charOffset": 49587, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1826, + "startColumn": 6, + "charOffset": 49578, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tif (items) {\n\t\tfor (auto &item : *items) {\n\t\t\tconst ItemType &it = Item::items[item->getID()];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14705ff35aba8b02d9f01cacd54a709c4da06f338845bf69cc1f8dce943483b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1829, + "startColumn": 3, + "charOffset": 49598, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1827, + "startColumn": 3, + "charOffset": 49581, + "charLength": 3, + "snippet": { + "text": "\n\tif (items) {\n\t\tfor (auto &item : *items) {\n\t\t\tconst ItemType &it = Item::items[item->getID()];\n\t\t\tif (it.isDoor()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7afe9053531e50590882e69d9ac63bdb1bced8edd65661f9ba8dfdae6d78cd2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &item' can be declared as 'const auto &item'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1829, + "startColumn": 8, + "charOffset": 49603, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 1827, + "startColumn": 8, + "charOffset": 49581, + "charLength": 4, + "snippet": { + "text": "\n\tif (items) {\n\t\tfor (auto &item : *items) {\n\t\t\tconst ItemType &it = Item::items[item->getID()];\n\t\t\tif (it.isDoor()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f63de60718170929a20c890843ac2a4c89ab72933856fd88a4bbdfe31cf0123" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1840, + "startColumn": 42, + "charOffset": 49791, + "charLength": 4, + "snippet": { + "text": "zone" + } + }, + "contextRegion": { + "startLine": 1838, + "startColumn": 42, + "charOffset": 49747, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Tile::addZone(std::shared_ptr zone) {\n\tzones.emplace(zone);\n\tconst auto &items = getItemList();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "519accb1341e0171e9d8484ffd232f65cc3232a351cad1b96da2ec16a84a3109" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1841, + "startColumn": 8, + "charOffset": 49806, + "charLength": 7, + "snippet": { + "text": "emplace" + } + }, + "contextRegion": { + "startLine": 1839, + "startColumn": 8, + "charOffset": 49749, + "charLength": 7, + "snippet": { + "text": "\nvoid Tile::addZone(std::shared_ptr zone) {\n\tzones.emplace(zone);\n\tconst auto &items = getItemList();\n\tif (items) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd08ca43ea0ab81c95507a7798f9bee7c6869fd23d4b65d18eb772dd3c16586e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1843, + "startColumn": 6, + "charOffset": 49862, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1841, + "startColumn": 6, + "charOffset": 49799, + "charLength": 5, + "snippet": { + "text": "\tzones.emplace(zone);\n\tconst auto &items = getItemList();\n\tif (items) {\n\t\tfor (const auto &item : *items) {\n\t\t\tzone->itemAdded(item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1fb2d2ae08ac7e54bc6253934f25b5ea220e233b6e12fbd2592b8d6854deed7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1843, + "startColumn": 6, + "charOffset": 49862, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1841, + "startColumn": 6, + "charOffset": 49799, + "charLength": 5, + "snippet": { + "text": "\tzones.emplace(zone);\n\tconst auto &items = getItemList();\n\tif (items) {\n\t\tfor (const auto &item : *items) {\n\t\t\tzone->itemAdded(item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26fcb02be06c83e1e8c18fdee244e628d903d0813351fb457ab18228799372fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1844, + "startColumn": 3, + "charOffset": 49873, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1842, + "startColumn": 3, + "charOffset": 49821, + "charLength": 3, + "snippet": { + "text": "\tconst auto &items = getItemList();\n\tif (items) {\n\t\tfor (const auto &item : *items) {\n\t\t\tzone->itemAdded(item);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d85c76522c1170fd3cb21c7f31370d46f60e9bb665a2b786bc05240d48bb3663" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1849, + "startColumn": 6, + "charOffset": 49986, + "charLength": 9, + "snippet": { + "text": "creatures" + } + }, + "contextRegion": { + "startLine": 1847, + "startColumn": 6, + "charOffset": 49937, + "charLength": 9, + "snippet": { + "text": "\t}\n\tconst auto &creatures = getCreatures();\n\tif (creatures) {\n\t\tfor (const auto &creature : *creatures) {\n\t\t\tzone->creatureAdded(creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84ed192bbe3dfa3705bd9a64693fc76e4b727d82a2ecad72004a64f961e15d53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'CreatureVector *' (aka 'vector> *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1849, + "startColumn": 6, + "charOffset": 49986, + "charLength": 9, + "snippet": { + "text": "creatures" + } + }, + "contextRegion": { + "startLine": 1847, + "startColumn": 6, + "charOffset": 49937, + "charLength": 9, + "snippet": { + "text": "\t}\n\tconst auto &creatures = getCreatures();\n\tif (creatures) {\n\t\tfor (const auto &creature : *creatures) {\n\t\t\tzone->creatureAdded(creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5b8111eca8f5055aaab5ace82619952f75258fddee5ff441785fb6e1e2cf46f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1850, + "startColumn": 3, + "charOffset": 50001, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1848, + "startColumn": 3, + "charOffset": 49940, + "charLength": 3, + "snippet": { + "text": "\tconst auto &creatures = getCreatures();\n\tif (creatures) {\n\t\tfor (const auto &creature : *creatures) {\n\t\t\tzone->creatureAdded(creature);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f50a5c10dc8026f5c9a6722578192755618b45f8b4c00ee93f699dc7468c1965" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1862, + "startColumn": 17, + "charOffset": 50257, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 1860, + "startColumn": 17, + "charOffset": 50224, + "charLength": 12, + "snippet": { + "text": "\t\t\tcontinue;\n\t\t}\n\t\tzonesToRemove.emplace_back(zone);\n\t\tconst auto &items = getItemList();\n\t\tif (items) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a721af45483d060daea54649ce50c67ab7e40a5c229e41fc9529597983148684" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1864, + "startColumn": 7, + "charOffset": 50320, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1862, + "startColumn": 7, + "charOffset": 50241, + "charLength": 5, + "snippet": { + "text": "\t\tzonesToRemove.emplace_back(zone);\n\t\tconst auto &items = getItemList();\n\t\tif (items) {\n\t\t\tfor (const auto &item : *items) {\n\t\t\t\tzone->itemRemoved(item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19f212867cb578ea23602cea0131eacb2914653d78244bb7b53b0921b518743e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'TileItemVector *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1864, + "startColumn": 7, + "charOffset": 50320, + "charLength": 5, + "snippet": { + "text": "items" + } + }, + "contextRegion": { + "startLine": 1862, + "startColumn": 7, + "charOffset": 50241, + "charLength": 5, + "snippet": { + "text": "\t\tzonesToRemove.emplace_back(zone);\n\t\tconst auto &items = getItemList();\n\t\tif (items) {\n\t\t\tfor (const auto &item : *items) {\n\t\t\t\tzone->itemRemoved(item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c41d3b819960016d623d4ad9f1bfa7ad772747295cd108ba126eb6036646dcd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1865, + "startColumn": 4, + "charOffset": 50332, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1863, + "startColumn": 4, + "charOffset": 50277, + "charLength": 3, + "snippet": { + "text": "\t\tconst auto &items = getItemList();\n\t\tif (items) {\n\t\t\tfor (const auto &item : *items) {\n\t\t\t\tzone->itemRemoved(item);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b6f78855bcd5399616be9ca6cecc0adab83a35ef6e0d32c5ebd7b2b43d4447e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1870, + "startColumn": 7, + "charOffset": 50452, + "charLength": 9, + "snippet": { + "text": "creatures" + } + }, + "contextRegion": { + "startLine": 1868, + "startColumn": 7, + "charOffset": 50400, + "charLength": 9, + "snippet": { + "text": "\t\t}\n\t\tconst auto &creatures = getCreatures();\n\t\tif (creatures) {\n\t\t\tfor (const auto &creature : *creatures) {\n\t\t\t\tzone->creatureRemoved(creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ee38d2e5ffa7c4823e9688c5e710809249dfb094f75755ec3f1f932a53a9e2d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'CreatureVector *' (aka 'vector> *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1870, + "startColumn": 7, + "charOffset": 50452, + "charLength": 9, + "snippet": { + "text": "creatures" + } + }, + "contextRegion": { + "startLine": 1868, + "startColumn": 7, + "charOffset": 50400, + "charLength": 9, + "snippet": { + "text": "\t\t}\n\t\tconst auto &creatures = getCreatures();\n\t\tif (creatures) {\n\t\t\tfor (const auto &creature : *creatures) {\n\t\t\t\tzone->creatureRemoved(creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ad8fe940ed116e0c750ea12be408e227447af23ad22a7f09f2ea8d5a65d662e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1871, + "startColumn": 4, + "charOffset": 50468, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1869, + "startColumn": 4, + "charOffset": 50404, + "charLength": 3, + "snippet": { + "text": "\t\tconst auto &creatures = getCreatures();\n\t\tif (creatures) {\n\t\t\tfor (const auto &creature : *creatures) {\n\t\t\t\tzone->creatureRemoved(creature);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f814c7aa6b3b236142f6bc7c3e3d0eabcf101a4c23e851b40667138d36e05cbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1876, + "startColumn": 2, + "charOffset": 50560, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1874, + "startColumn": 2, + "charOffset": 50552, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t}\n\tfor (const auto &zone : zonesToRemove) {\n\t\tzones.erase(zone);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a35ac26365330b18fdfd634a1523d531ffba6358637979b58096fbc3dc52d00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/tile.cpp", + "index": 1 + }, + "region": { + "startLine": 1877, + "startColumn": 9, + "charOffset": 50609, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 1875, + "startColumn": 9, + "charOffset": 50556, + "charLength": 5, + "snippet": { + "text": "\t}\n\tfor (const auto &zone : zonesToRemove) {\n\t\tzones.erase(zone);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c11ab12b69a67927d295004a8b7d01af0db0161928a300a9b174bf71623e06f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.cpp" + }, + "region": { + "startLine": 15, + "startColumn": 26, + "charOffset": 475, + "charLength": 8, + "snippet": { + "text": "queryAdd" + } + }, + "contextRegion": { + "startLine": 13, + "startColumn": 26, + "charOffset": 424, + "charLength": 8, + "snippet": { + "text": "#include \"game/game.hpp\"\n\nReturnValue TrashHolder::queryAdd(int32_t, const std::shared_ptr &thing, uint32_t, uint32_t, std::shared_ptr actor) {\n\tstd::shared_ptr item = thing->getItem();\n\tif (item == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a612a87ce10768a5782a2f69dc72d9d7cd32f9225c1e613713a5d7053f4a37f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.cpp" + }, + "region": { + "startLine": 15, + "startColumn": 42, + "charOffset": 491, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 13, + "startColumn": 42, + "charOffset": 424, + "charLength": 1, + "snippet": { + "text": "#include \"game/game.hpp\"\n\nReturnValue TrashHolder::queryAdd(int32_t, const std::shared_ptr &thing, uint32_t, uint32_t, std::shared_ptr actor) {\n\tstd::shared_ptr item = thing->getItem();\n\tif (item == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68f656e3dff92baaa856775048db51d6b79d8e42bff475bdc88bee7e533c2980" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 47, + "charOffset": 858, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 47, + "charOffset": 809, + "charLength": 1, + "snippet": { + "text": "}\n\nReturnValue TrashHolder::queryMaxCount(int32_t, const std::shared_ptr &, uint32_t queryCount, uint32_t &maxQueryCount, uint32_t) {\n\tmaxQueryCount = std::max(1, queryCount);\n\treturn RETURNVALUE_NOERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cea690b072554c7a9d0144019abe07b27a93a6721b90cb20c015d55260278edc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.cpp" + }, + "region": { + "startLine": 31, + "startColumn": 26, + "charOffset": 1059, + "charLength": 11, + "snippet": { + "text": "queryRemove" + } + }, + "contextRegion": { + "startLine": 29, + "startColumn": 26, + "charOffset": 1031, + "charLength": 11, + "snippet": { + "text": "}\n\nReturnValue TrashHolder::queryRemove(const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr /*= nullptr*/) {\n\treturn RETURNVALUE_NOTPOSSIBLE;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4cfde640d5445015d598facffc605009c033646c22c4054ec144b6dd0f7dcfb8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.cpp" + }, + "region": { + "startLine": 31, + "startColumn": 68, + "charOffset": 1101, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 29, + "startColumn": 68, + "charOffset": 1031, + "charLength": 1, + "snippet": { + "text": "}\n\nReturnValue TrashHolder::queryRemove(const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr /*= nullptr*/) {\n\treturn RETURNVALUE_NOTPOSSIBLE;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "541399f3509996105a3134a8d31a55233c90c418db44de37b30dc1c7126bd131" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.cpp" + }, + "region": { + "startLine": 35, + "startColumn": 66, + "charOffset": 1267, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 33, + "startColumn": 66, + "charOffset": 1199, + "charLength": 1, + "snippet": { + "text": "}\n\nstd::shared_ptr TrashHolder::queryDestination(int32_t &, const std::shared_ptr &, std::shared_ptr*, uint32_t &) {\n\treturn static_self_cast();\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c4913609ba84848a04c226a65cdc87e1225f6bca8af7e00bae02426d6e9844e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-avoid-return-with-void-value", + "ruleIndex": 689, + "kind": "fail", + "level": "warning", + "message": { + "text": "return statement within a void function should not have a specified return value" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.cpp" + }, + "region": { + "startLine": 40, + "startColumn": 2, + "charOffset": 1443, + "charLength": 6, + "snippet": { + "text": "return" + } + }, + "contextRegion": { + "startLine": 38, + "startColumn": 2, + "charOffset": 1382, + "charLength": 6, + "snippet": { + "text": "\nvoid TrashHolder::addThing(std::shared_ptr thing) {\n\treturn addThing(0, thing);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2d2dfa7fe732d1b71759220869b68473f5d8f737aef10cbc89824fec534e69a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 35, + "charOffset": 1507, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 35, + "charOffset": 1470, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid TrashHolder::addThing(int32_t, std::shared_ptr thing) {\n\tif (!thing) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35104205d2fdbfd66e4af8845fff0218b391feeed3e083f0d21b51ad86ddd132" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.cpp" + }, + "region": { + "startLine": 44, + "startColumn": 6, + "charOffset": 1546, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 42, + "startColumn": 6, + "charOffset": 1472, + "charLength": 1, + "snippet": { + "text": "\nvoid TrashHolder::addThing(int32_t, std::shared_ptr thing) {\n\tif (!thing) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9617c7e0bb9158e1fa3ca246fed642c1340bf6576bf8ec4c20f05d6c33e59cc2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.cpp" + }, + "region": { + "startLine": 49, + "startColumn": 6, + "charOffset": 1623, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 47, + "startColumn": 6, + "charOffset": 1569, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr item = thing->getItem();\n\tif (!item) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "237d3ae99ffa0433b8f1a281480e3fc7e7582f2f8d7543c695237bac2da8ae28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.cpp" + }, + "region": { + "startLine": 68, + "startColumn": 11, + "charOffset": 2060, + "charLength": 18, + "snippet": { + "text": "internalRemoveItem" + } + }, + "contextRegion": { + "startLine": 66, + "startColumn": 11, + "charOffset": 2037, + "charLength": 18, + "snippet": { + "text": "\t\treturn;\n\t}\n\tg_game().internalRemoveItem(item);\n\n\tif (it.magicEffect != CONST_ME_NONE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5550ca82c027adabd7d818079ea46a4c5eddb2cdb2bb354f18a86ed84b1387a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.cpp" + }, + "region": { + "startLine": 75, + "startColumn": 53, + "charOffset": 2243, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 73, + "startColumn": 53, + "charOffset": 2188, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid TrashHolder::updateThing(std::shared_ptr, uint16_t, uint32_t) {\n\t//\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61a57963e428f1de056d6c149d3bc4b2245347d66f11c6b06278c6225cb805d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.cpp" + }, + "region": { + "startLine": 79, + "startColumn": 40, + "charOffset": 2313, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 77, + "startColumn": 40, + "charOffset": 2271, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid TrashHolder::replaceThing(uint32_t, std::shared_ptr) {\n\t//\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14109869d7092a1db9735a22cb02038362f155ae322c47b6b99abd343d4433c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.cpp" + }, + "region": { + "startLine": 83, + "startColumn": 53, + "charOffset": 2400, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 81, + "startColumn": 53, + "charOffset": 2345, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid TrashHolder::removeThing(std::shared_ptr, uint32_t) {\n\t//\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b33ff51f3e3fb427f4c9cb1dc48a1534a2fb709ca4f522d44df262e685a28a90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 19, + "charOffset": 2439, + "charLength": 19, + "snippet": { + "text": "postAddNotification" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 19, + "charOffset": 2418, + "charLength": 19, + "snippet": { + "text": "}\n\nvoid TrashHolder::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\n\tgetParent()->postAddNotification(thing, oldParent, index, LINK_PARENT);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9bced95126677e89dda2b42757e8336d285dd0e3002e780d258bef5d7e31cff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 135, + "charOffset": 2555, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 135, + "charOffset": 2418, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid TrashHolder::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\n\tgetParent()->postAddNotification(thing, oldParent, index, LINK_PARENT);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2a7501ba8590d41db691dc90c62fac41f2a568b5c08d84812bc4fb8ad3395a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 19, + "charOffset": 2653, + "charLength": 22, + "snippet": { + "text": "postRemoveNotification" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 19, + "charOffset": 2632, + "charLength": 22, + "snippet": { + "text": "}\n\nvoid TrashHolder::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\n\tgetParent()->postRemoveNotification(thing, newParent, index, LINK_PARENT);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eafcc0ff30581c2841cf6d01a6cb292d45ee54ce7e57c3362031325562166f84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/trashholder.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 138, + "charOffset": 2772, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 138, + "charOffset": 2632, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid TrashHolder::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\n\tgetParent()->postRemoveNotification(thing, newParent, index, LINK_PARENT);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03f15cb3252019f2facc5d892299261b16640092e8d6ee8e2146e274a080d889" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-const-return-type", + "ruleIndex": 692, + "kind": "fail", + "level": "warning", + "message": { + "text": "return type 'const WeaponShared_ptr' (aka 'const shared_ptr') is 'const'-qualified at the top level, which may reduce code readability without improving const correctness" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 22, + "startColumn": 1, + "charOffset": 629, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 1, + "charOffset": 597, + "charLength": 5, + "snippet": { + "text": "Weapons::~Weapons() = default;\n\nconst WeaponShared_ptr Weapons::getWeapon(std::shared_ptr item) const {\n\tif (!item) {\n\t\treturn nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8cf0d95351121123db8e59fc6804e16819ccc1d321cd60c2abc008a5f8c25994" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 22, + "startColumn": 65, + "charOffset": 693, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 65, + "charOffset": 597, + "charLength": 4, + "snippet": { + "text": "Weapons::~Weapons() = default;\n\nconst WeaponShared_ptr Weapons::getWeapon(std::shared_ptr item) const {\n\tif (!item) {\n\t\treturn nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c03c221b733ef5bc99599ff30ebcb63dc0fb4d93a6bd818a9c2de2445f567ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 23, + "startColumn": 6, + "charOffset": 712, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 21, + "startColumn": 6, + "charOffset": 628, + "charLength": 1, + "snippet": { + "text": "\nconst WeaponShared_ptr Weapons::getWeapon(std::shared_ptr item) const {\n\tif (!item) {\n\t\treturn nullptr;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8c1b0811144e97d2aeac37e7256632aac54197465bad15de0bc725da60c9fad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 37, + "startColumn": 3, + "charOffset": 947, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 35, + "startColumn": 3, + "charOffset": 905, + "charLength": 3, + "snippet": { + "text": "\tif (isFromXML) {\n\t\tint numRemoved = 0;\n\t\tfor (auto it = weapons.begin(); it != weapons.end();) {\n\t\t\tif (it->second && it->second->isFromXML()) {\n\t\t\t\tg_logger().debug(\"Weapon with id '{}' is from XML and will be removed.\", it->first);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "150f809ccba545b076d4f1ef534613a75996d35aed6b1f448537916a3c15fc12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 37, + "startColumn": 3, + "charOffset": 947, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 35, + "startColumn": 3, + "charOffset": 905, + "charLength": 3, + "snippet": { + "text": "\tif (isFromXML) {\n\t\tint numRemoved = 0;\n\t\tfor (auto it = weapons.begin(); it != weapons.end();) {\n\t\t\tif (it->second && it->second->isFromXML()) {\n\t\t\t\tg_logger().debug(\"Weapon with id '{}' is from XML and will be removed.\", it->first);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8885170f134d0cf7165128a97a7ab0062dd45fe7aec8f4732dfffbace5c5d708" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 37, + "startColumn": 35, + "charOffset": 979, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 35, + "startColumn": 35, + "charOffset": 905, + "charLength": 2, + "snippet": { + "text": "\tif (isFromXML) {\n\t\tint numRemoved = 0;\n\t\tfor (auto it = weapons.begin(); it != weapons.end();) {\n\t\t\tif (it->second && it->second->isFromXML()) {\n\t\t\t\tg_logger().debug(\"Weapon with id '{}' is from XML and will be removed.\", it->first);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "333fd7f8c92ebf3d1ff3e4bb6dcc0834afce5ee7655645c9f479388ea7915879" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'event' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 57, + "startColumn": 49, + "charOffset": 1396, + "charLength": 5, + "snippet": { + "text": "event" + } + }, + "contextRegion": { + "startLine": 55, + "startColumn": 49, + "charOffset": 1345, + "charLength": 5, + "snippet": { + "text": "}\n\nbool Weapons::registerLuaEvent(WeaponShared_ptr event, bool fromXML /*= false*/) {\n\tweapons[event->getID()] = event;\n\tif (fromXML) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c168ea2f67be581181537c87f086cedf3a0db335fdc10642043ef0643cb42c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 68, + "startColumn": 41, + "charOffset": 1715, + "charLength": 11, + "snippet": { + "text": "attackSkill" + } + }, + "contextRegion": { + "startLine": 66, + "startColumn": 41, + "charOffset": 1543, + "charLength": 11, + "snippet": { + "text": "int32_t Weapons::getMaxMeleeDamage(int32_t attackSkill, int32_t attackValue) {\n\t// Returns maximum melee attack damage, rounding up\n\treturn static_cast(std::ceil((attackSkill * (attackValue * 0.05)) + (attackValue * 0.5)));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f2bc1687ec6772c30709eeb30c9a68691755fc1ba0b335e33290375d4ab4f3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 68, + "startColumn": 56, + "charOffset": 1730, + "charLength": 11, + "snippet": { + "text": "attackValue" + } + }, + "contextRegion": { + "startLine": 66, + "startColumn": 56, + "charOffset": 1543, + "charLength": 11, + "snippet": { + "text": "int32_t Weapons::getMaxMeleeDamage(int32_t attackSkill, int32_t attackValue) {\n\t// Returns maximum melee attack damage, rounding up\n\treturn static_cast(std::ceil((attackSkill * (attackValue * 0.05)) + (attackValue * 0.5)));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8725bac137cc450ce6f4effe6ddf85a5bdf6fdef3fa674eea9c06049dafd4b2b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.05 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 68, + "startColumn": 70, + "charOffset": 1744, + "charLength": 4, + "snippet": { + "text": "0.05" + } + }, + "contextRegion": { + "startLine": 66, + "startColumn": 70, + "charOffset": 1543, + "charLength": 4, + "snippet": { + "text": "int32_t Weapons::getMaxMeleeDamage(int32_t attackSkill, int32_t attackValue) {\n\t// Returns maximum melee attack damage, rounding up\n\treturn static_cast(std::ceil((attackSkill * (attackValue * 0.05)) + (attackValue * 0.5)));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c6a23f6827d6e5d8d93c4db9f46cc5f9be2a2d52278d3dac761e8db961eb4b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 68, + "startColumn": 80, + "charOffset": 1754, + "charLength": 11, + "snippet": { + "text": "attackValue" + } + }, + "contextRegion": { + "startLine": 66, + "startColumn": 80, + "charOffset": 1543, + "charLength": 11, + "snippet": { + "text": "int32_t Weapons::getMaxMeleeDamage(int32_t attackSkill, int32_t attackValue) {\n\t// Returns maximum melee attack damage, rounding up\n\treturn static_cast(std::ceil((attackSkill * (attackValue * 0.05)) + (attackValue * 0.5)));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e83143c0d6a275a2c4b8c4ca75a37de95d49b5e89d383eb36ca6132e122b83b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 68, + "startColumn": 94, + "charOffset": 1768, + "charLength": 3, + "snippet": { + "text": "0.5" + } + }, + "contextRegion": { + "startLine": 66, + "startColumn": 94, + "charOffset": 1543, + "charLength": 3, + "snippet": { + "text": "int32_t Weapons::getMaxMeleeDamage(int32_t attackSkill, int32_t attackValue) {\n\t// Returns maximum melee attack damage, rounding up\n\treturn static_cast(std::ceil((attackSkill * (attackValue * 0.05)) + (attackValue * 0.5)));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c85fda37315cc7671dcb4f077a3b0ca5891b46ca4a4b5a46d4627e75b0086893" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.085 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 43, + "charOffset": 1978, + "charLength": 5, + "snippet": { + "text": "0.085" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 43, + "charOffset": 1790, + "charLength": 5, + "snippet": { + "text": "int32_t Weapons::getMaxWeaponDamage(uint32_t level, int32_t attackSkill, int32_t attackValue, float attackFactor, bool isMelee) {\n\tif (isMelee) {\n\t\treturn static_cast(std::round((0.085 * attackFactor * attackValue * attackSkill) + (level / 5)));\n\t} else {\n\t\treturn static_cast(std::round((0.09 * attackFactor * attackValue * attackSkill) + (level / 5)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "810f973be1b5aa72b483044f97fdb78738fe7b71a6a1656a715dab45ced70464" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 66, + "charOffset": 2001, + "charLength": 11, + "snippet": { + "text": "attackValue" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 66, + "charOffset": 1790, + "charLength": 11, + "snippet": { + "text": "int32_t Weapons::getMaxWeaponDamage(uint32_t level, int32_t attackSkill, int32_t attackValue, float attackFactor, bool isMelee) {\n\tif (isMelee) {\n\t\treturn static_cast(std::round((0.085 * attackFactor * attackValue * attackSkill) + (level / 5)));\n\t} else {\n\t\treturn static_cast(std::round((0.09 * attackFactor * attackValue * attackSkill) + (level / 5)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bca72325dad94ae39eb5578b44416f0936f17dd939cac031301ab9dbb97b8be8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 80, + "charOffset": 2015, + "charLength": 11, + "snippet": { + "text": "attackSkill" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 80, + "charOffset": 1790, + "charLength": 11, + "snippet": { + "text": "int32_t Weapons::getMaxWeaponDamage(uint32_t level, int32_t attackSkill, int32_t attackValue, float attackFactor, bool isMelee) {\n\tif (isMelee) {\n\t\treturn static_cast(std::round((0.085 * attackFactor * attackValue * attackSkill) + (level / 5)));\n\t} else {\n\t\treturn static_cast(std::round((0.09 * attackFactor * attackValue * attackSkill) + (level / 5)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce4578d788312bd05261b9c8048d8f59c8f61317d692452aa15bd7103297b595" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 95, + "charOffset": 2030, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 95, + "charOffset": 1790, + "charLength": 1, + "snippet": { + "text": "int32_t Weapons::getMaxWeaponDamage(uint32_t level, int32_t attackSkill, int32_t attackValue, float attackFactor, bool isMelee) {\n\tif (isMelee) {\n\t\treturn static_cast(std::round((0.085 * attackFactor * attackValue * attackSkill) + (level / 5)));\n\t} else {\n\t\treturn static_cast(std::round((0.09 * attackFactor * attackValue * attackSkill) + (level / 5)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "137f0ed34c91e9f8bcf2e4baaa28abf00c840fee24f47b0b59fe9a550d6ea7dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-integer-division", + "ruleIndex": 64, + "kind": "fail", + "level": "warning", + "message": { + "text": "result of integer division used in a floating point context; possible loss of precision" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 96, + "charOffset": 2031, + "charLength": 5, + "snippet": { + "text": "level" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 96, + "charOffset": 1790, + "charLength": 5, + "snippet": { + "text": "int32_t Weapons::getMaxWeaponDamage(uint32_t level, int32_t attackSkill, int32_t attackValue, float attackFactor, bool isMelee) {\n\tif (isMelee) {\n\t\treturn static_cast(std::round((0.085 * attackFactor * attackValue * attackSkill) + (level / 5)));\n\t} else {\n\t\treturn static_cast(std::round((0.09 * attackFactor * attackValue * attackSkill) + (level / 5)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04cb78a0a93684adc9a7ab1dd0717a82982bfe69e7e4c4f7da7abf4248bb5ecd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 104, + "charOffset": 2039, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 104, + "charOffset": 1790, + "charLength": 1, + "snippet": { + "text": "int32_t Weapons::getMaxWeaponDamage(uint32_t level, int32_t attackSkill, int32_t attackValue, float attackFactor, bool isMelee) {\n\tif (isMelee) {\n\t\treturn static_cast(std::round((0.085 * attackFactor * attackValue * attackSkill) + (level / 5)));\n\t} else {\n\t\treturn static_cast(std::round((0.09 * attackFactor * attackValue * attackSkill) + (level / 5)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "facb0903e87af9ec320c865a957348410c97d9acca278271e89c649dc54794bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 75, + "startColumn": 4, + "charOffset": 2048, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 73, + "startColumn": 4, + "charOffset": 1920, + "charLength": 4, + "snippet": { + "text": "\tif (isMelee) {\n\t\treturn static_cast(std::round((0.085 * attackFactor * attackValue * attackSkill) + (level / 5)));\n\t} else {\n\t\treturn static_cast(std::round((0.09 * attackFactor * attackValue * attackSkill) + (level / 5)));\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "571c535a29af74d12d784056ea61af6a229c260e07692b839a6f953012ed6dd7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.09 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 43, + "charOffset": 2097, + "charLength": 4, + "snippet": { + "text": "0.09" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 43, + "charOffset": 1936, + "charLength": 4, + "snippet": { + "text": "\t\treturn static_cast(std::round((0.085 * attackFactor * attackValue * attackSkill) + (level / 5)));\n\t} else {\n\t\treturn static_cast(std::round((0.09 * attackFactor * attackValue * attackSkill) + (level / 5)));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f9e70aced7d43290005b3b80a780b54596b7206d42e0f58ebe7c8d94f80764c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 65, + "charOffset": 2119, + "charLength": 11, + "snippet": { + "text": "attackValue" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 65, + "charOffset": 1936, + "charLength": 11, + "snippet": { + "text": "\t\treturn static_cast(std::round((0.085 * attackFactor * attackValue * attackSkill) + (level / 5)));\n\t} else {\n\t\treturn static_cast(std::round((0.09 * attackFactor * attackValue * attackSkill) + (level / 5)));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d34c7543a77f1416eb7dfd2cf195c61fac3bb754fe97dd7904ba670e3c51f62d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 79, + "charOffset": 2133, + "charLength": 11, + "snippet": { + "text": "attackSkill" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 79, + "charOffset": 1936, + "charLength": 11, + "snippet": { + "text": "\t\treturn static_cast(std::round((0.085 * attackFactor * attackValue * attackSkill) + (level / 5)));\n\t} else {\n\t\treturn static_cast(std::round((0.09 * attackFactor * attackValue * attackSkill) + (level / 5)));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c7f849b05f2f43e26b5cc9d41131b5a9e838855a1030dcb21001e042be7fc83" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 94, + "charOffset": 2148, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 94, + "charOffset": 1936, + "charLength": 1, + "snippet": { + "text": "\t\treturn static_cast(std::round((0.085 * attackFactor * attackValue * attackSkill) + (level / 5)));\n\t} else {\n\t\treturn static_cast(std::round((0.09 * attackFactor * attackValue * attackSkill) + (level / 5)));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2253ed3edaef156549a3f3b2b1df2d07097a7638108ad6098fc7f91237a9483" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-integer-division", + "ruleIndex": 64, + "kind": "fail", + "level": "warning", + "message": { + "text": "result of integer division used in a floating point context; possible loss of precision" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 95, + "charOffset": 2149, + "charLength": 5, + "snippet": { + "text": "level" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 95, + "charOffset": 1936, + "charLength": 5, + "snippet": { + "text": "\t\treturn static_cast(std::round((0.085 * attackFactor * attackValue * attackSkill) + (level / 5)));\n\t} else {\n\t\treturn static_cast(std::round((0.09 * attackFactor * attackValue * attackSkill) + (level / 5)));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b607b1254425a6e0c823c20cb761c7c9998fc1cbead7606ae5bf9d6dfea84b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 103, + "charOffset": 2157, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 103, + "charOffset": 1936, + "charLength": 1, + "snippet": { + "text": "\t\treturn static_cast(std::round((0.085 * attackFactor * attackValue * attackSkill) + (level / 5)));\n\t} else {\n\t\treturn static_cast(std::round((0.09 * attackFactor * attackValue * attackSkill) + (level / 5)));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0516c7cdac6672f7138dd4ced6e323ef2c5202cd3873d85d71c2e2e047a1dc15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'playerWeaponCheck' has cognitive complexity of 27 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 84, + "startColumn": 17, + "charOffset": 2252, + "charLength": 17, + "snippet": { + "text": "playerWeaponCheck" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 17, + "charOffset": 2233, + "charLength": 17, + "snippet": { + "text": "}\n\nint32_t Weapon::playerWeaponCheck(std::shared_ptr player, std::shared_ptr target, uint8_t shootRange) const {\n\tconst Position &playerPos = player->getPosition();\n\tconst Position &targetPos = target->getPosition();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ef7967ead390b3d871afb05b380abe0be09a625b5baee9792d6f2b8de4aa106" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 84, + "startColumn": 59, + "charOffset": 2294, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 59, + "charOffset": 2233, + "charLength": 6, + "snippet": { + "text": "}\n\nint32_t Weapon::playerWeaponCheck(std::shared_ptr player, std::shared_ptr target, uint8_t shootRange) const {\n\tconst Position &playerPos = player->getPosition();\n\tconst Position &targetPos = target->getPosition();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7401a8275e5cfea8e384a2fed9fd7c7ec0cfb2ea7f38e87fc8f53c51c00abb03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 84, + "startColumn": 93, + "charOffset": 2328, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 93, + "charOffset": 2233, + "charLength": 6, + "snippet": { + "text": "}\n\nint32_t Weapon::playerWeaponCheck(std::shared_ptr player, std::shared_ptr target, uint8_t shootRange) const {\n\tconst Position &playerPos = player->getPosition();\n\tconst Position &targetPos = target->getPosition();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a3e4d15c68e105aee0798f58b4924e3df75779c62dbbf0c3d15ba93ead480b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 120, + "startColumn": 28, + "charOffset": 3142, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 28, + "charOffset": 3110, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tint32_t damageModifier = 100;\n\t\tif (player->getLevel() < getReqLevel()) {\n\t\t\tdamageModifier = (isWieldedUnproperly() ? damageModifier / 2 : 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b6a9de9408be7e40e0fd059e59e38468a6da532bd47117d1eaab70feff86100" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 131, + "startColumn": 9, + "charOffset": 3426, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 129, + "startColumn": 9, + "charOffset": 3414, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\treturn 100;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46a51e86357f1b7a6ab364b6180695f501169fab213bc4d309a67616701ef2c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 48, + "charOffset": 3481, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 48, + "charOffset": 3431, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Weapon::useWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target) const {\n\tint32_t damageModifier = playerWeaponCheck(player, target, item->getShootRange());\n\tif (damageModifier == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe76599ce1f998076b5a7d392c326046a4d2db2ec87bbb95f1146fedc7bc732e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 78, + "charOffset": 3511, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 78, + "charOffset": 3431, + "charLength": 4, + "snippet": { + "text": "}\n\nbool Weapon::useWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target) const {\n\tint32_t damageModifier = playerWeaponCheck(player, target, item->getShootRange());\n\tif (damageModifier == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fcb5f893235c94f46b1749c90cb1238759da84b602e70a3f05ca3fe01ee54a21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 110, + "charOffset": 3543, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 110, + "charOffset": 3431, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Weapon::useWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target) const {\n\tint32_t damageModifier = playerWeaponCheck(player, target, item->getShootRange());\n\tif (damageModifier == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f94a7dc03cf88b6a1f96ba55da8a1327a82f31c79be2f4ee9f2fccdd13f8cc3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 144, + "startColumn": 83, + "charOffset": 3848, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 142, + "startColumn": 83, + "charOffset": 3763, + "charLength": 6, + "snippet": { + "text": "}\n\nCombatDamage Weapon::getCombatDamage(CombatDamage combat, std::shared_ptr player, std::shared_ptr item, int32_t damageModifier) const {\n\t// Local variables\n\tuint32_t level = player->getLevel();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "985878f891ca9e92cd6e3a446f727ed1d4876cfebfcb1c7a50e3fa2680f90e10" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 144, + "startColumn": 113, + "charOffset": 3878, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 142, + "startColumn": 113, + "charOffset": 3763, + "charLength": 4, + "snippet": { + "text": "}\n\nCombatDamage Weapon::getCombatDamage(CombatDamage combat, std::shared_ptr player, std::shared_ptr item, int32_t damageModifier) const {\n\t// Local variables\n\tuint32_t level = player->getLevel();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3610f9a07623cdeb88cea0dc0f2039fd2ed18289142a8104ab9ac2389a40a96a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 154, + "startColumn": 34, + "charOffset": 4348, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 34, + "charOffset": 4232, + "charLength": 1, + "snippet": { + "text": "\t// Getting values factores\n\tint32_t totalAttack = elementalAttack + weaponAttack;\n\tdouble weaponAttackProportion = (double)weaponAttack / (double)totalAttack;\n\n\t// Calculating damage" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "984ac859000b5241b495c1e4a8ae426eddc6ae4617a9abd179f56c68feaff182" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 154, + "startColumn": 57, + "charOffset": 4371, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 57, + "charOffset": 4232, + "charLength": 1, + "snippet": { + "text": "\t// Getting values factores\n\tint32_t totalAttack = elementalAttack + weaponAttack;\n\tdouble weaponAttackProportion = (double)weaponAttack / (double)totalAttack;\n\n\t// Calculating damage" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb66f825b8687dcf0a65842faf899c5e7045af3b58c7846169a514b2a1582cf9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 43, + "charOffset": 4458, + "charLength": 7, + "snippet": { + "text": "Weapons" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 43, + "charOffset": 4392, + "charLength": 7, + "snippet": { + "text": "\n\t// Calculating damage\n\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(level, playerSkill, totalAttack, attackFactor, true) * player->getVocation()->meleeDamageMultiplier * damageModifier / 100);\n\tint32_t minDamage = level / 5;\n\tint32_t realDamage = normal_random(minDamage, maxDamage);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce4e2957590009f5449ce7671008d0473617c976ef56b8d643a236e27425eb03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 43, + "charOffset": 4458, + "charLength": 7, + "snippet": { + "text": "Weapons" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 43, + "charOffset": 4392, + "charLength": 7, + "snippet": { + "text": "\n\t// Calculating damage\n\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(level, playerSkill, totalAttack, attackFactor, true) * player->getVocation()->meleeDamageMultiplier * damageModifier / 100);\n\tint32_t minDamage = level / 5;\n\tint32_t realDamage = normal_random(minDamage, maxDamage);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "720291d1eb54a1834ebc7f621a9563a3d72d009f9203e2c19855929046de6124" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 173, + "charOffset": 4588, + "charLength": 14, + "snippet": { + "text": "damageModifier" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 173, + "charOffset": 4392, + "charLength": 14, + "snippet": { + "text": "\n\t// Calculating damage\n\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(level, playerSkill, totalAttack, attackFactor, true) * player->getVocation()->meleeDamageMultiplier * damageModifier / 100);\n\tint32_t minDamage = level / 5;\n\tint32_t realDamage = normal_random(minDamage, maxDamage);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1e0ead19ef97162edba2fcdff80a21cb2e7ceb99fbee0196c706b0706ab32d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 173, + "charOffset": 4588, + "charLength": 14, + "snippet": { + "text": "damageModifier" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 173, + "charOffset": 4392, + "charLength": 14, + "snippet": { + "text": "\n\t// Calculating damage\n\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(level, playerSkill, totalAttack, attackFactor, true) * player->getVocation()->meleeDamageMultiplier * damageModifier / 100);\n\tint32_t minDamage = level / 5;\n\tint32_t realDamage = normal_random(minDamage, maxDamage);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5cb9d05dc540ec070c5a06178d861e1a52559bc92e309ed86b654c94718dbb95" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 190, + "charOffset": 4605, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 190, + "charOffset": 4392, + "charLength": 3, + "snippet": { + "text": "\n\t// Calculating damage\n\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(level, playerSkill, totalAttack, attackFactor, true) * player->getVocation()->meleeDamageMultiplier * damageModifier / 100);\n\tint32_t minDamage = level / 5;\n\tint32_t realDamage = normal_random(minDamage, maxDamage);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5f7b929e0bb434a4b845a3e0cca456c29043cbea6b511ee1ccbd836687c072e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 190, + "charOffset": 4605, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 190, + "charOffset": 4392, + "charLength": 3, + "snippet": { + "text": "\n\t// Calculating damage\n\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(level, playerSkill, totalAttack, attackFactor, true) * player->getVocation()->meleeDamageMultiplier * damageModifier / 100);\n\tint32_t minDamage = level / 5;\n\tint32_t realDamage = normal_random(minDamage, maxDamage);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "322aa362c35da9928009c2c281c6fe260f35ed5f6d7ed883619605d796113365" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 158, + "startColumn": 22, + "charOffset": 4632, + "charLength": 5, + "snippet": { + "text": "level" + } + }, + "contextRegion": { + "startLine": 156, + "startColumn": 22, + "charOffset": 4393, + "charLength": 5, + "snippet": { + "text": "\t// Calculating damage\n\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(level, playerSkill, totalAttack, attackFactor, true) * player->getVocation()->meleeDamageMultiplier * damageModifier / 100);\n\tint32_t minDamage = level / 5;\n\tint32_t realDamage = normal_random(minDamage, maxDamage);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "961305bbc3be215ff4e1f7887147099a0d816fbec09f332db72d36af6784bacc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 158, + "startColumn": 30, + "charOffset": 4640, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 156, + "startColumn": 30, + "charOffset": 4393, + "charLength": 1, + "snippet": { + "text": "\t// Calculating damage\n\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(level, playerSkill, totalAttack, attackFactor, true) * player->getVocation()->meleeDamageMultiplier * damageModifier / 100);\n\tint32_t minDamage = level / 5;\n\tint32_t realDamage = normal_random(minDamage, maxDamage);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e573e852a1602f88869708c9fa6059bc6fbcc1ade708ab862e920f80311aa6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 162, + "startColumn": 25, + "charOffset": 4756, + "charLength": 10, + "snippet": { + "text": "realDamage" + } + }, + "contextRegion": { + "startLine": 160, + "startColumn": 25, + "charOffset": 4702, + "charLength": 10, + "snippet": { + "text": "\n\t// Setting damage to combat\n\tcombat.primary.value = realDamage * weaponAttackProportion;\n\tcombat.secondary.value = realDamage * (1 - weaponAttackProportion);\n\treturn combat;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1847632de6c8951557678314a27470d2f5e0d82189fe50000420847f8b58ab7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 162, + "startColumn": 25, + "charOffset": 4756, + "charLength": 10, + "snippet": { + "text": "realDamage" + } + }, + "contextRegion": { + "startLine": 160, + "startColumn": 25, + "charOffset": 4702, + "charLength": 10, + "snippet": { + "text": "\n\t// Setting damage to combat\n\tcombat.primary.value = realDamage * weaponAttackProportion;\n\tcombat.secondary.value = realDamage * (1 - weaponAttackProportion);\n\treturn combat;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6bf4225902d2548673a3ebe25d73e8b921280a63e8fc8bfc0daa0bf2c5b1d20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 163, + "startColumn": 27, + "charOffset": 4819, + "charLength": 10, + "snippet": { + "text": "realDamage" + } + }, + "contextRegion": { + "startLine": 161, + "startColumn": 27, + "charOffset": 4703, + "charLength": 10, + "snippet": { + "text": "\t// Setting damage to combat\n\tcombat.primary.value = realDamage * weaponAttackProportion;\n\tcombat.secondary.value = realDamage * (1 - weaponAttackProportion);\n\treturn combat;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40464af1bd153f408e44fcf5d9c18df4e2bc7b1a116506ac2548d2fb38341b62" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 163, + "startColumn": 27, + "charOffset": 4819, + "charLength": 10, + "snippet": { + "text": "realDamage" + } + }, + "contextRegion": { + "startLine": 161, + "startColumn": 27, + "charOffset": 4703, + "charLength": 10, + "snippet": { + "text": "\t// Setting damage to combat\n\tcombat.primary.value = realDamage * weaponAttackProportion;\n\tcombat.secondary.value = realDamage * (1 - weaponAttackProportion);\n\treturn combat;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c71c4772c0635c8c7cbf9339a0eb02d78136b136f519216752ab6380359ee3d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 46, + "charOffset": 4926, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 46, + "charOffset": 4878, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Weapon::useFist(std::shared_ptr player, std::shared_ptr target) {\n\tif (!Position::areInRange<1, 1>(player->getPosition(), target->getPosition())) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a82fe9c728a5f4ef853c02527a331e7decdd840e2928ad49b35f9c083377434" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 80, + "charOffset": 4960, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 80, + "charOffset": 4878, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Weapon::useFist(std::shared_ptr player, std::shared_ptr target) {\n\tif (!Position::areInRange<1, 1>(player->getPosition(), target->getPosition())) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3352adef6e7efd8bde43f4e48faa0d7096f1c2126e81dfbc62d70f93bb5646d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 174, + "startColumn": 24, + "charOffset": 5202, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 24, + "charOffset": 5072, + "charLength": 1, + "snippet": { + "text": "\tfloat attackFactor = player->getAttackFactor();\n\tint32_t attackSkill = player->getSkillLevel(SKILL_FIST);\n\tint32_t attackValue = 7;\n\n\tint32_t maxDamage = Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c95610c020a90a0c6fd9fd3b4dbbafd8c0f1bfcce6e0b5abab0549236bb52fbb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 197, + "startColumn": 56, + "charOffset": 5928, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 195, + "startColumn": 56, + "charOffset": 5870, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Weapon::internalUseWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target, int32_t damageModifier, int32_t cleavePercent) const {\n\tif (player) {\n\t\tif (params.soundCastEffect == SoundEffect_t::SILENCE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d72f80a245beef36d37d9076f944e2674685122ad41575461a2bb7378747cde" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 197, + "startColumn": 86, + "charOffset": 5958, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 195, + "startColumn": 86, + "charOffset": 5870, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Weapon::internalUseWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target, int32_t damageModifier, int32_t cleavePercent) const {\n\tif (player) {\n\t\tif (params.soundCastEffect == SoundEffect_t::SILENCE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bfbf1f20b2ea30c789dfbbe1b26b8bda426f8fc9c40fe32ef5242a37a8a4a2c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 197, + "startColumn": 118, + "charOffset": 5990, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 195, + "startColumn": 118, + "charOffset": 5870, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Weapon::internalUseWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target, int32_t damageModifier, int32_t cleavePercent) const {\n\tif (player) {\n\t\tif (params.soundCastEffect == SoundEffect_t::SILENCE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db889893eff8539c8d7fb6b6e3092632089265a2b1eac36601719f7ee8f678e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'internalUseWeapon' of similar type ('int32_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 197, + "startColumn": 126, + "charOffset": 5998, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 195, + "startColumn": 126, + "charOffset": 5870, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid Weapon::internalUseWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target, int32_t damageModifier, int32_t cleavePercent) const {\n\tif (player) {\n\t\tif (params.soundCastEffect == SoundEffect_t::SILENCE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d774a8cd0bf73ed389b24b3a22749d05a1cdcb25fc19c515d0976a30b8d2e07a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 214, + "startColumn": 3, + "charOffset": 6540, + "charLength": 16, + "snippet": { + "text": "executeUseWeapon" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 3, + "charOffset": 6477, + "charLength": 16, + "snippet": { + "text": "\t\tvar.type = VARIANT_NUMBER;\n\t\tvar.number = target->getID();\n\t\texecuteUseWeapon(player, var);\n\t\tg_logger().debug(\"Weapon::internalUseWeapon - Lua callback executed.\");\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9cf0723467479d819a04a7f7810ea55b982685b5387d709e542faab388401f56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 85, + "charOffset": 7039, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 85, + "charOffset": 6911, + "charLength": 3, + "snippet": { + "text": "\n\t\tdamage.primary.type = params.combatType;\n\t\tdamage.primary.value = (getWeaponDamage(player, target, item) * damageModifier) / 100;\n\t\tdamage.secondary.type = getElementType();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7ac723d58113c999d5362e6fa301a35093c3549cf0a2ad5f5b0d0c9fd6b3c28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 230, + "startColumn": 28, + "charOffset": 7135, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 228, + "startColumn": 28, + "charOffset": 7088, + "charLength": 3, + "snippet": { + "text": "\n\t\t// Cleave damage\n\t\tuint16_t damagePercent = 100;\n\t\tif (cleavePercent != 0) {\n\t\t\tdamage.extension = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f11f3113726cc3776708a2f08ca1700608c1691ed453e7255998832ede0b4a6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 233, + "startColumn": 20, + "charOffset": 7215, + "charLength": 13, + "snippet": { + "text": "cleavePercent" + } + }, + "contextRegion": { + "startLine": 231, + "startColumn": 20, + "charOffset": 7140, + "charLength": 13, + "snippet": { + "text": "\t\tif (cleavePercent != 0) {\n\t\t\tdamage.extension = true;\n\t\t\tdamagePercent = cleavePercent;\n\t\t\tif (!damage.exString.empty()) {\n\t\t\t\tdamage.exString += \", \";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3493f600c0be54df1fb17c40582ffb534bcda57fb202b5660338ede48518da2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 241, + "startColumn": 85, + "charOffset": 7473, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 239, + "startColumn": 85, + "charOffset": 7342, + "charLength": 3, + "snippet": { + "text": "\n\t\tif (damage.secondary.type == COMBAT_NONE) {\n\t\t\tdamage.primary.value = (getWeaponDamage(player, target, item) * damageModifier / 100) * damagePercent / 100;\n\t\t\tdamage.secondary.value = 0;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9be1f7bee3322ede00be6bae541b9155bbb1e42447d254ad603c041cb94b201f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 241, + "startColumn": 108, + "charOffset": 7496, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 239, + "startColumn": 108, + "charOffset": 7342, + "charLength": 3, + "snippet": { + "text": "\n\t\tif (damage.secondary.type == COMBAT_NONE) {\n\t\t\tdamage.primary.value = (getWeaponDamage(player, target, item) * damageModifier / 100) * damagePercent / 100;\n\t\t\tdamage.secondary.value = 0;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06c9fd29ebf1f18d6176a499ef4be276a69bd30f4a60978a1446b2a21b1876f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 244, + "startColumn": 85, + "charOffset": 7627, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 85, + "charOffset": 7501, + "charLength": 3, + "snippet": { + "text": "\t\t\tdamage.secondary.value = 0;\n\t\t} else {\n\t\t\tdamage.primary.value = (getWeaponDamage(player, target, item) * damageModifier / 100) * damagePercent / 100;\n\t\t\tdamage.secondary.value = (getElementDamage(player, target, item) * damageModifier / 100) * damagePercent / 100;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8615b7fe0ae28feb28ad5e84a0583a06652f976310e1e01db797790323494950" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 244, + "startColumn": 108, + "charOffset": 7650, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 108, + "charOffset": 7501, + "charLength": 3, + "snippet": { + "text": "\t\t\tdamage.secondary.value = 0;\n\t\t} else {\n\t\t\tdamage.primary.value = (getWeaponDamage(player, target, item) * damageModifier / 100) * damagePercent / 100;\n\t\t\tdamage.secondary.value = (getElementDamage(player, target, item) * damageModifier / 100) * damagePercent / 100;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "360ecfc0f70a59fef3b7bde64671531153d6fe74e4c21b5cd7ff4fa4c07d329e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 245, + "startColumn": 88, + "charOffset": 7742, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 243, + "startColumn": 88, + "charOffset": 7532, + "charLength": 3, + "snippet": { + "text": "\t\t} else {\n\t\t\tdamage.primary.value = (getWeaponDamage(player, target, item) * damageModifier / 100) * damagePercent / 100;\n\t\t\tdamage.secondary.value = (getElementDamage(player, target, item) * damageModifier / 100) * damagePercent / 100;\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "566064ba1f5f21aedcdb40e05c553f4f1effe44f3d2d26123c916ab98f25aeef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 245, + "startColumn": 111, + "charOffset": 7765, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 243, + "startColumn": 111, + "charOffset": 7532, + "charLength": 3, + "snippet": { + "text": "\t\t} else {\n\t\t\tdamage.primary.value = (getWeaponDamage(player, target, item) * damageModifier / 100) * damagePercent / 100;\n\t\t\tdamage.secondary.value = (getElementDamage(player, target, item) * damageModifier / 100) * damagePercent / 100;\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ccce849bf89f2b7ba28759aaa4dcde644fac58d9a495933266f64e9fb641545" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 249, + "startColumn": 14, + "charOffset": 7885, + "charLength": 13, + "snippet": { + "text": "doCombatChain" + } + }, + "contextRegion": { + "startLine": 247, + "startColumn": 14, + "charOffset": 7774, + "charLength": 13, + "snippet": { + "text": "\n\t\tif (g_configManager().getBoolean(TOGGLE_CHAIN_SYSTEM, __FUNCTION__) && params.chainCallback) {\n\t\t\tm_combat->doCombatChain(player, target, params.aggressive);\n\t\t\tg_logger().debug(\"Weapon::internalUseWeapon - Chain callback executed.\");\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4dff39dfa52871602243306f160630d382a24c7b579f161d4b217e919ee3e61b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 261, + "startColumn": 56, + "charOffset": 8271, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 259, + "startColumn": 56, + "charOffset": 8213, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Weapon::internalUseWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr tile) const {\n\tif (isLoadedCallback()) {\n\t\tLuaVariant var;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b63917e7d424ff05dea84839d9ec56aa74bc6c72cd4d1a128793b7d08c057790" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 261, + "startColumn": 114, + "charOffset": 8329, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 259, + "startColumn": 114, + "charOffset": 8213, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Weapon::internalUseWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr tile) const {\n\tif (isLoadedCallback()) {\n\t\tLuaVariant var;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0cf213278f62a894ee343bd8123b6b44ce6fb2539869b7c7c1281fd608eccd55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 266, + "startColumn": 3, + "charOffset": 8460, + "charLength": 16, + "snippet": { + "text": "executeUseWeapon" + } + }, + "contextRegion": { + "startLine": 264, + "startColumn": 3, + "charOffset": 8388, + "charLength": 16, + "snippet": { + "text": "\t\tvar.type = VARIANT_TARGETPOSITION;\n\t\tvar.pos = tile->getPosition();\n\t\texecuteUseWeapon(player, var);\n\t} else {\n\t\tCombat::postCombatEffects(player, player->getPosition(), tile->getPosition(), params);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64cc4f3429f14229f59def45f1c175a4adc689a09ee081e55266aa099eefc337" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 272, + "startColumn": 23, + "charOffset": 8777, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 270, + "startColumn": 23, + "charOffset": 8653, + "charLength": 4, + "snippet": { + "text": "\t\tg_game().sendSingleSoundEffect(tile->getPosition(), SoundEffect_t::PHYSICAL_RANGE_MISS, player);\n\t}\n\tonUsedWeapon(player, item, tile);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b2ea53c2b8ed65738ab93bacb5eac4388f8af76763d96809609ef9bf36500df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 275, + "startColumn": 51, + "charOffset": 8843, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 273, + "startColumn": 51, + "charOffset": 8790, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Weapon::onUsedWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr destTile) const {\n\tif (!player->hasFlag(PlayerFlags_t::NotGainSkill)) {\n\t\tskills_t skillType;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c89ac82d6633c69e23820609f5619787fe6c2cb8d4ae724bed936bd650ab80f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 275, + "startColumn": 81, + "charOffset": 8873, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 273, + "startColumn": 81, + "charOffset": 8790, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Weapon::onUsedWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr destTile) const {\n\tif (!player->hasFlag(PlayerFlags_t::NotGainSkill)) {\n\t\tskills_t skillType;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ed6524f833c00bccd6fdd32a4e2bd5bcf37920490f8a51295c0a9c1676317a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'destTile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 275, + "startColumn": 109, + "charOffset": 8901, + "charLength": 8, + "snippet": { + "text": "destTile" + } + }, + "contextRegion": { + "startLine": 273, + "startColumn": 109, + "charOffset": 8790, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Weapon::onUsedWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr destTile) const {\n\tif (!player->hasFlag(PlayerFlags_t::NotGainSkill)) {\n\t\tskills_t skillType;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71f3e23b7d98a3a4b8a1d63271486dc15333cbb7e01dbb961df90b4b1c8ca30d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'skillType' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 277, + "startColumn": 12, + "charOffset": 8984, + "charLength": 9, + "snippet": { + "text": "skillType" + } + }, + "contextRegion": { + "startLine": 275, + "startColumn": 12, + "charOffset": 8793, + "charLength": 9, + "snippet": { + "text": "void Weapon::onUsedWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr destTile) const {\n\tif (!player->hasFlag(PlayerFlags_t::NotGainSkill)) {\n\t\tskills_t skillType;\n\t\tuint32_t skillPoint;\n\t\tif (getSkillType(player, item, skillType, skillPoint)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af6345a872edd23b8fb4a3b8ab5441b4e645919a8ebff38f58ab8128bfce138a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'skillPoint' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 278, + "startColumn": 12, + "charOffset": 9006, + "charLength": 10, + "snippet": { + "text": "skillPoint" + } + }, + "contextRegion": { + "startLine": 276, + "startColumn": 12, + "charOffset": 8919, + "charLength": 10, + "snippet": { + "text": "\tif (!player->hasFlag(PlayerFlags_t::NotGainSkill)) {\n\t\tskills_t skillType;\n\t\tuint32_t skillPoint;\n\t\tif (getSkillType(player, item, skillType, skillPoint)) {\n\t\t\tplayer->addSkillAdvance(skillType, skillPoint);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8299bc554aadf8b7d23bfbe55d32bb61ffc946d1cec43a8ca53455ea0047365" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 304, + "startColumn": 78, + "charOffset": 10052, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 302, + "startColumn": 78, + "charOffset": 9770, + "charLength": 3, + "snippet": { + "text": "\n\tbool skipRemoveBeginningWeaponAmmo = !g_configManager().getBoolean(REMOVE_BEGINNING_WEAPON_AMMO, __FUNCTION__) && (item->getName() == \"arrow\" || item->getName() == \"bolt\" || item->getName() == \"spear\");\n\tif (!skipRemoveBeginningWeaponAmmo && breakChance != 0 && uniform_random(1, 100) <= breakChance) {\n\t\tWeapon::decrementItemCount(item);\n\t\tplayer->updateSupplyTracker(item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed7c0c88199f969e4d2811472db7631f902a4a64178d05eaee400ce196d125b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'uint16_t' (aka 'unsigned short')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 319, + "startColumn": 27, + "charOffset": 10476, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 317, + "startColumn": 27, + "charOffset": 10413, + "charLength": 4, + "snippet": { + "text": "\n\t\tcase WEAPONACTION_REMOVECHARGE: {\n\t\t\tif (uint16_t charges = item->getCharges() != 0 && g_configManager().getBoolean(REMOVE_WEAPON_CHARGES, __FUNCTION__)) {\n\t\t\t\tg_game().transformItem(item, item->getID(), charges - 1);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "028e8b97358f3f92c79b63aa921730e5f45428dfc0f0d22f25235d3c6c8b41fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 320, + "startColumn": 14, + "charOffset": 10585, + "charLength": 13, + "snippet": { + "text": "transformItem" + } + }, + "contextRegion": { + "startLine": 318, + "startColumn": 14, + "charOffset": 10414, + "charLength": 13, + "snippet": { + "text": "\t\tcase WEAPONACTION_REMOVECHARGE: {\n\t\t\tif (uint16_t charges = item->getCharges() != 0 && g_configManager().getBoolean(REMOVE_WEAPON_CHARGES, __FUNCTION__)) {\n\t\t\t\tg_game().transformItem(item, item->getID(), charges - 1);\n\t\t\t}\n\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e26cd972a617d52ec0ae29efe9ccad49d7f896b19bc8a254444281962e85626" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 326, + "startColumn": 13, + "charOffset": 10692, + "charLength": 16, + "snippet": { + "text": "internalMoveItem" + } + }, + "contextRegion": { + "startLine": 324, + "startColumn": 13, + "charOffset": 10653, + "charLength": 16, + "snippet": { + "text": "\n\t\tcase WEAPONACTION_MOVE:\n\t\t\tg_game().internalMoveItem(item->getParent(), destTile, INDEX_WHEREEVER, item, 1, nullptr, FLAG_NOLIMIT);\n\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49e57c1b4161983d3ee26b3897933462ec4e37e17d5781dbffd48aea8d7ef4db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 334, + "startColumn": 54, + "charOffset": 10879, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 332, + "startColumn": 54, + "charOffset": 10823, + "charLength": 6, + "snippet": { + "text": "}\n\nuint32_t Weapon::getManaCost(std::shared_ptr player) const {\n\tif (mana != 0) {\n\t\treturn mana;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1487541fda1342c8d682ab0547b880d106bd28a3fbe8175adb39c5b1ff83226" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 343, + "startColumn": 48, + "charOffset": 11020, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 341, + "startColumn": 48, + "charOffset": 10969, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\treturn (player->getMaxMana() * manaPercent) / 100;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2dcd375fccad5c03263bae20d088e715d34eac9e40e1ac0802cd37613e7d1027" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 346, + "startColumn": 55, + "charOffset": 11082, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 344, + "startColumn": 55, + "charOffset": 11025, + "charLength": 6, + "snippet": { + "text": "}\n\nint32_t Weapon::getHealthCost(std::shared_ptr player) const {\n\tif (health != 0) {\n\t\treturn health;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc8a56253b69fbd9acf6acf25a30ffd93410a7b42193eff9989a35d36504f60b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 348, + "startColumn": 10, + "charOffset": 11127, + "charLength": 6, + "snippet": { + "text": "health" + } + }, + "contextRegion": { + "startLine": 346, + "startColumn": 10, + "charOffset": 11028, + "charLength": 6, + "snippet": { + "text": "int32_t Weapon::getHealthCost(std::shared_ptr player) const {\n\tif (health != 0) {\n\t\treturn health;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b24fca72e036baef809f90b31ee55cf97e8ac4737da9e5def46089ae95dbb247" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 355, + "startColumn": 9, + "charOffset": 11190, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 353, + "startColumn": 9, + "charOffset": 11178, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\treturn (player->getMaxHealth() * healthPercent) / 100;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "176eee75dcea9dfc871d140ba71154e08f13a1874f43a2d2843f028c37825e43" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 355, + "startColumn": 52, + "charOffset": 11233, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 353, + "startColumn": 52, + "charOffset": 11178, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\treturn (player->getMaxHealth() * healthPercent) / 100;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5293a9006aca36085128163722f47b492cc26b3d79ff0ededeb93e5bfb51810f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 358, + "startColumn": 55, + "charOffset": 11295, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 356, + "startColumn": 55, + "charOffset": 11238, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Weapon::executeUseWeapon(std::shared_ptr player, const LuaVariant &var) const {\n\t// onUseWeapon(player, var)\n\tif (!getScriptInterface()->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "515101146af634302441142c1b7e7ad4f1fef7aa9a66831b871ea3195f18c870" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 360, + "startColumn": 7, + "charOffset": 11369, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 358, + "startColumn": 7, + "charOffset": 11241, + "charLength": 18, + "snippet": { + "text": "bool Weapon::executeUseWeapon(std::shared_ptr player, const LuaVariant &var) const {\n\t// onUseWeapon(player, var)\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tstd::string playerName = player ? player->getName() : \"Player nullptr\";\n\t\tg_logger().error(\"[Weapon::executeUseWeapon - Player {} weaponId {}]\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eae644532e96762a51088b799393ebabaea8d864ecfa8243d82bd583feffe8f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 368, + "startColumn": 27, + "charOffset": 11729, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 366, + "startColumn": 27, + "charOffset": 11699, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\n\tenv->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11216b323efb61bf01fa3d47e55a5dbfc9a418db37b891fccab8d7459b27757a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 373, + "startColumn": 24, + "charOffset": 11901, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 371, + "startColumn": 24, + "charOffset": 11824, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = getScriptInterface()->getLuaState();\n\n\tgetScriptInterface()->pushFunction(getScriptId());\n\tLuaScriptInterface::pushUserdata(L, player);\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43def388b1cd656db43613cc3aa6a1d262be0ba7bd2653357875ce1cabf9a203" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 376, + "startColumn": 2, + "charOffset": 12037, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 374, + "startColumn": 2, + "charOffset": 11930, + "charLength": 18, + "snippet": { + "text": "\tLuaScriptInterface::pushUserdata(L, player);\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n\tgetScriptInterface()->pushVariant(L, var);\n\n\treturn getScriptInterface()->callFunction(2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "868b4a1aa8327d55873a89b03123e352c33f8864943b83faed73fd7c486f37e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 381, + "startColumn": 55, + "charOffset": 12185, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 379, + "startColumn": 55, + "charOffset": 12128, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Weapon::decrementItemCount(std::shared_ptr item) {\n\tuint16_t count = item->getItemCount();\n\tif (count > 1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4342acbfea76561405b727410e9f24eecb93b2f4c06603e7bf0b065d4edb21fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 384, + "startColumn": 12, + "charOffset": 12262, + "charLength": 13, + "snippet": { + "text": "transformItem" + } + }, + "contextRegion": { + "startLine": 382, + "startColumn": 12, + "charOffset": 12193, + "charLength": 13, + "snippet": { + "text": "\tuint16_t count = item->getItemCount();\n\tif (count > 1) {\n\t\tg_game().transformItem(item, item->getID(), count - 1);\n\t} else {\n\t\tg_game().internalRemoveItem(item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75685f77a12571dfbab065e7ab49484e96932a5a3395973eda3675086082a69a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 386, + "startColumn": 12, + "charOffset": 12330, + "charLength": 18, + "snippet": { + "text": "internalRemoveItem" + } + }, + "contextRegion": { + "startLine": 384, + "startColumn": 12, + "charOffset": 12251, + "charLength": 18, + "snippet": { + "text": "\t\tg_game().transformItem(item, item->getID(), count - 1);\n\t} else {\n\t\tg_game().internalRemoveItem(item);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe8923ab6fc35ba5ed828b22d4d93254896bd11de4fe335dbb7eae890e6f6738" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "3 adjacent parameters of 'calculateSkillFormula' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 390, + "startColumn": 75, + "charOffset": 12436, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 388, + "startColumn": 75, + "charOffset": 12359, + "charLength": 7, + "snippet": { + "text": "}\n\nbool Weapon::calculateSkillFormula(const std::shared_ptr &player, int32_t &attackSkill, int32_t &attackValue, float &attackFactor, int16_t &elementAttack, CombatDamage &damage, bool useCharges /* = false*/) const {\n\tstd::shared_ptr tool = player->getWeapon();\n\tif (!tool) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5741f7da2e2b79c299c84f6bb9d549e938a0ff1b62d4ecbf8558e0b01c60a2c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 392, + "startColumn": 6, + "charOffset": 12641, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 390, + "startColumn": 6, + "charOffset": 12362, + "charLength": 1, + "snippet": { + "text": "bool Weapon::calculateSkillFormula(const std::shared_ptr &player, int32_t &attackSkill, int32_t &attackValue, float &attackFactor, int16_t &elementAttack, CombatDamage &damage, bool useCharges /* = false*/) const {\n\tstd::shared_ptr tool = player->getWeapon();\n\tif (!tool) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a5de8a22f348b1d9e9389d94d98c0df39abea2074caad8fc6e35873acfa5c2e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 418, + "startColumn": 13, + "charOffset": 13293, + "charLength": 13, + "snippet": { + "text": "transformItem" + } + }, + "contextRegion": { + "startLine": 416, + "startColumn": 13, + "charOffset": 13186, + "charLength": 13, + "snippet": { + "text": "\t\tauto charges = tool->getAttribute(ItemAttribute_t::CHARGES);\n\t\tif (charges != 0) {\n\t\t\tg_game().transformItem(tool, tool->getID(), charges - 1);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "153b9f00ff9c7f11b00c7380f3db10ae15428a05b6d85405bd97dcc2f4c9db7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'useWeapon' has cognitive complexity of 59 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 448, + "startColumn": 19, + "charOffset": 14078, + "charLength": 9, + "snippet": { + "text": "useWeapon" + } + }, + "contextRegion": { + "startLine": 446, + "startColumn": 19, + "charOffset": 14057, + "charLength": 9, + "snippet": { + "text": "}\n\nbool WeaponMelee::useWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target) const {\n\tint32_t damageModifier = playerWeaponCheck(player, target, item->getShootRange());\n\tif (damageModifier == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4493382f1af82ed064f5885d6d0ab2fe48e2cac094fd8af388fc1874d023284a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 485, + "startColumn": 6, + "charOffset": 15456, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 483, + "startColumn": 6, + "charOffset": 15362, + "charLength": 3, + "snippet": { + "text": "\t\t\tif (firstTile) {\n\t\t\t\tif (CreatureVector* tileCreatures = firstTile->getCreatures()) {\n\t\t\t\t\tfor (auto &tileCreature : *tileCreatures) {\n\t\t\t\t\t\tif (tileCreature->getMonster() || (tileCreature->getPlayer() && !player->hasSecureMode())) {\n\t\t\t\t\t\t\tinternalUseWeapon(player, item, tileCreature, damageModifier, cleavePercent);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07045edd98b8e7ec3952da4389bd141123efa3998ba69ec9f9ba23242a4a18b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 494, + "startColumn": 6, + "charOffset": 15806, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 492, + "startColumn": 6, + "charOffset": 15710, + "charLength": 3, + "snippet": { + "text": "\t\t\tif (secondTile) {\n\t\t\t\tif (CreatureVector* tileCreatures = secondTile->getCreatures()) {\n\t\t\t\t\tfor (auto &tileCreature : *tileCreatures) {\n\t\t\t\t\t\tif (tileCreature->getMonster() || (tileCreature->getPlayer() && !player->hasSecureMode())) {\n\t\t\t\t\t\t\tinternalUseWeapon(player, item, tileCreature, damageModifier, cleavePercent);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd7efcfafb50474f0c0ed5d184da91190a6afe10981604a50ac5665c5c814b2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 517, + "startColumn": 3, + "charOffset": 16496, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 515, + "startColumn": 3, + "charOffset": 16421, + "charLength": 4, + "snippet": { + "text": "\tWeaponType_t weaponType = item->getWeaponType();\n\tswitch (weaponType) {\n\t\tcase WEAPON_SWORD: {\n\t\t\tskill = SKILL_SWORD;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d77f8efe62a5b3e7d845fd68a591a37798090347cb9416306230c7b7121e47fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 522, + "startColumn": 3, + "charOffset": 16564, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 520, + "startColumn": 3, + "charOffset": 16557, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase WEAPON_CLUB: {\n\t\t\tskill = SKILL_CLUB;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7044785bbd90e2fb3183caa02831a33c185b920430a1ce8938bbffdf117830b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 527, + "startColumn": 3, + "charOffset": 16630, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 525, + "startColumn": 3, + "charOffset": 16623, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase WEAPON_AXE: {\n\t\t\tskill = SKILL_AXE;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1d53be12c5aaa40fdd96d0ee1fb68ed0c61df4b47e5450053e2c45b46a327ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 538, + "startColumn": 96, + "charOffset": 16829, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 536, + "startColumn": 96, + "charOffset": 16731, + "charLength": 1, + "snippet": { + "text": "}\n\nint32_t WeaponMelee::getElementDamage(std::shared_ptr player, std::shared_ptr, std::shared_ptr item) const {\n\tif (elementType == COMBAT_NONE) {\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c911faf9a18ab3e913c26b00ad5f3a0a7c1cdfab778bcf2f63bce42c0ef2e6df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 549, + "startColumn": 21, + "charOffset": 17219, + "charLength": 5, + "snippet": { + "text": "level" + } + }, + "contextRegion": { + "startLine": 547, + "startColumn": 21, + "charOffset": 17096, + "charLength": 5, + "snippet": { + "text": "\n\tint32_t maxValue = Weapons::getMaxWeaponDamage(level, attackSkill, attackValue, attackFactor, true);\n\tint32_t minValue = level / 5;\n\n\treturn -normal_random(minValue, static_cast(maxValue * player->getVocation()->meleeDamageMultiplier));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e572fb3aa21e3fbae59854884627269cd6efcae9f0dd8fde435f5de7c888a10" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 549, + "startColumn": 29, + "charOffset": 17227, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 547, + "startColumn": 29, + "charOffset": 17096, + "charLength": 1, + "snippet": { + "text": "\n\tint32_t maxValue = Weapons::getMaxWeaponDamage(level, attackSkill, attackValue, attackFactor, true);\n\tint32_t minValue = level / 5;\n\n\treturn -normal_random(minValue, static_cast(maxValue * player->getVocation()->meleeDamageMultiplier));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "663d9f2d462858ac5afd6a0381424bbfa54d8758aba03dd691aeeb107f00bf19" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 551, + "startColumn": 55, + "charOffset": 17285, + "charLength": 8, + "snippet": { + "text": "maxValue" + } + }, + "contextRegion": { + "startLine": 549, + "startColumn": 55, + "charOffset": 17199, + "charLength": 8, + "snippet": { + "text": "\tint32_t minValue = level / 5;\n\n\treturn -normal_random(minValue, static_cast(maxValue * player->getVocation()->meleeDamageMultiplier));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ef202d0e33c759af7c23f0dfed6f95b69230cd0292a1c80a279b9ceaebb26b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 551, + "startColumn": 55, + "charOffset": 17285, + "charLength": 8, + "snippet": { + "text": "maxValue" + } + }, + "contextRegion": { + "startLine": 549, + "startColumn": 55, + "charOffset": 17199, + "charLength": 8, + "snippet": { + "text": "\tint32_t minValue = level / 5;\n\n\treturn -normal_random(minValue, static_cast(maxValue * player->getVocation()->meleeDamageMultiplier));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70ece1ee77143bfcdd3f068be7f085169ae3095aff1f5694a1a9fb047ef3f184" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 555, + "startColumn": 9, + "charOffset": 17408, + "charLength": 13, + "snippet": { + "text": "elementDamage" + } + }, + "contextRegion": { + "startLine": 553, + "startColumn": 9, + "charOffset": 17346, + "charLength": 13, + "snippet": { + "text": "\nint16_t WeaponMelee::getElementDamageValue() const {\n\treturn elementDamage;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e27c0ddce18163b9ddd2950a1ba43a85c22626659d555cc8dbcaf8db59b2b7e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 558, + "startColumn": 22, + "charOffset": 17447, + "charLength": 15, + "snippet": { + "text": "getWeaponDamage" + } + }, + "contextRegion": { + "startLine": 556, + "startColumn": 22, + "charOffset": 17423, + "charLength": 15, + "snippet": { + "text": "}\n\nint32_t WeaponMelee::getWeaponDamage(std::shared_ptr player, std::shared_ptr, std::shared_ptr item, bool maxDamage /*= false*/) const {\n\tusing namespace std;\n\tint32_t attackSkill = player->getWeaponSkill(item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47b816b30cfe1c042b1de189809ede515ec922faf91c1afd2c9a42c1dd2a23fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 558, + "startColumn": 95, + "charOffset": 17520, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 556, + "startColumn": 95, + "charOffset": 17423, + "charLength": 1, + "snippet": { + "text": "}\n\nint32_t WeaponMelee::getWeaponDamage(std::shared_ptr player, std::shared_ptr, std::shared_ptr item, bool maxDamage /*= false*/) const {\n\tusing namespace std;\n\tint32_t attackSkill = player->getWeaponSkill(item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6badf64f181e9cc9a0fb83478ce235e081ac2ae124cfc8e5020428a2691dd024" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-7-3-4", + "ruleIndex": 464, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 7-3-4: using-directives shall not be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 559, + "startColumn": 2, + "charOffset": 17587, + "charLength": 5, + "snippet": { + "text": "using" + } + }, + "contextRegion": { + "startLine": 557, + "startColumn": 2, + "charOffset": 17425, + "charLength": 5, + "snippet": { + "text": "\nint32_t WeaponMelee::getWeaponDamage(std::shared_ptr player, std::shared_ptr, std::shared_ptr item, bool maxDamage /*= false*/) const {\n\tusing namespace std;\n\tint32_t attackSkill = player->getWeaponSkill(item);\n\tint32_t attackValue = std::max(0, item->getAttack());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3dae31f2ca158670711cbf4bf1078bc1c346e458c6463bcbde25122cf580aac9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-build-using-namespace", + "ruleIndex": 532, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use namespace using-directives; use using-declarations instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 559, + "startColumn": 2, + "charOffset": 17587, + "charLength": 5, + "snippet": { + "text": "using" + } + }, + "contextRegion": { + "startLine": 557, + "startColumn": 2, + "charOffset": 17425, + "charLength": 5, + "snippet": { + "text": "\nint32_t WeaponMelee::getWeaponDamage(std::shared_ptr player, std::shared_ptr, std::shared_ptr item, bool maxDamage /*= false*/) const {\n\tusing namespace std;\n\tint32_t attackSkill = player->getWeaponSkill(item);\n\tint32_t attackValue = std::max(0, item->getAttack());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d5dcc3eabb5f69b746bee2a7e8fd5bcd4abc7d1795f3d8d5c53f8162196bf07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 565, + "startColumn": 42, + "charOffset": 17854, + "charLength": 7, + "snippet": { + "text": "Weapons" + } + }, + "contextRegion": { + "startLine": 563, + "startColumn": 42, + "charOffset": 17774, + "charLength": 7, + "snippet": { + "text": "\tuint32_t level = player->getLevel();\n\n\tint32_t maxValue = static_cast(Weapons::getMaxWeaponDamage(level, attackSkill, attackValue, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\n\n\tint32_t minValue = level / 5;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c69629db57a06bee33fc6663f2d18c67c0ef170dfd48c1000569b98fd395e7b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 565, + "startColumn": 42, + "charOffset": 17854, + "charLength": 7, + "snippet": { + "text": "Weapons" + } + }, + "contextRegion": { + "startLine": 563, + "startColumn": 42, + "charOffset": 17774, + "charLength": 7, + "snippet": { + "text": "\tuint32_t level = player->getLevel();\n\n\tint32_t maxValue = static_cast(Weapons::getMaxWeaponDamage(level, attackSkill, attackValue, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\n\n\tint32_t minValue = level / 5;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "91320a6461a312fdae215c9dd1577c393059100e6859f8e8a5fb906db412e082" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 567, + "startColumn": 21, + "charOffset": 18005, + "charLength": 5, + "snippet": { + "text": "level" + } + }, + "contextRegion": { + "startLine": 565, + "startColumn": 21, + "charOffset": 17813, + "charLength": 5, + "snippet": { + "text": "\tint32_t maxValue = static_cast(Weapons::getMaxWeaponDamage(level, attackSkill, attackValue, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\n\n\tint32_t minValue = level / 5;\n\n\tif (maxDamage) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31c44bc49958d93af933433e5728c292e471670fbc8e40b1a6178a9cf78f1494" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 567, + "startColumn": 29, + "charOffset": 18013, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 565, + "startColumn": 29, + "charOffset": 17813, + "charLength": 1, + "snippet": { + "text": "\tint32_t maxValue = static_cast(Weapons::getMaxWeaponDamage(level, attackSkill, attackValue, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\n\n\tint32_t minValue = level / 5;\n\n\tif (maxDamage) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ac103bb485cf9f4b58bce41d899c6691f0fb2d82ef98e8be604026af05957b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'useWeapon' has cognitive complexity of 53 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 598, + "startColumn": 22, + "charOffset": 18777, + "charLength": 9, + "snippet": { + "text": "useWeapon" + } + }, + "contextRegion": { + "startLine": 596, + "startColumn": 22, + "charOffset": 18753, + "charLength": 9, + "snippet": { + "text": "}\n\nbool WeaponDistance::useWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target) const {\n\tint32_t damageModifier;\n\tconst ItemType &it = Item::items[id];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87a3e78245a1ba86e94a234baaa727502b5a72aae8d713291c4b24744be75209" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'damageModifier' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 599, + "startColumn": 10, + "charOffset": 18898, + "charLength": 14, + "snippet": { + "text": "damageModifier" + } + }, + "contextRegion": { + "startLine": 597, + "startColumn": 10, + "charOffset": 18755, + "charLength": 14, + "snippet": { + "text": "\nbool WeaponDistance::useWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target) const {\n\tint32_t damageModifier;\n\tconst ItemType &it = Item::items[id];\n\tif (it.weaponType == WEAPON_AMMO) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3a86bb2b27fb5187977893ac35085fc36eff604f7a34f8946f8a90de7589032" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 622, + "startColumn": 49, + "charOffset": 19808, + "charLength": 9, + "snippet": { + "text": "distanceX" + } + }, + "contextRegion": { + "startLine": 620, + "startColumn": 49, + "charOffset": 19626, + "charLength": 9, + "snippet": { + "text": "\tint32_t distanceX = Position::getDistanceX(targetPos, playerPos);\n\tint32_t distanceY = Position::getDistanceY(targetPos, playerPos);\n\tint32_t damageX = player->getPerfectShotDamage(distanceX);\n\tint32_t damageY = player->getPerfectShotDamage(distanceY);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac0b162f914dd9d7fe361cb0553a8b9d07b24cc76454709a360a68bfd243699b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 623, + "startColumn": 49, + "charOffset": 19868, + "charLength": 9, + "snippet": { + "text": "distanceY" + } + }, + "contextRegion": { + "startLine": 621, + "startColumn": 49, + "charOffset": 19693, + "charLength": 9, + "snippet": { + "text": "\tint32_t distanceY = Position::getDistanceY(targetPos, playerPos);\n\tint32_t damageX = player->getPerfectShotDamage(distanceX);\n\tint32_t damageY = player->getPerfectShotDamage(distanceY);\n\n\tif (it.weaponType == WEAPON_DISTANCE) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9bece19249459149b5a9ec04ef44d6ae1173c217b5b4d15582f6fa907359fe0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 627, + "startColumn": 7, + "charOffset": 20005, + "charLength": 6, + "snippet": { + "text": "quiver" + } + }, + "contextRegion": { + "startLine": 625, + "startColumn": 7, + "charOffset": 19881, + "charLength": 6, + "snippet": { + "text": "\tif (it.weaponType == WEAPON_DISTANCE) {\n\t\tstd::shared_ptr quiver = player->getInventoryItem(CONST_SLOT_RIGHT);\n\t\tif (quiver && quiver->getWeaponType()) {\n\t\t\tif (quiver->getPerfectShotRange() == distanceX) {\n\t\t\t\tdamageX -= quiver->getPerfectShotDamage();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64ccb3869a11b8e5894fe39b55bf573e3d7aeedee9f184a232516e596c603db2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 627, + "startColumn": 14, + "charOffset": 20012, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 625, + "startColumn": 14, + "charOffset": 19881, + "charLength": 2, + "snippet": { + "text": "\tif (it.weaponType == WEAPON_DISTANCE) {\n\t\tstd::shared_ptr quiver = player->getInventoryItem(CONST_SLOT_RIGHT);\n\t\tif (quiver && quiver->getWeaponType()) {\n\t\t\tif (quiver->getPerfectShotRange() == distanceX) {\n\t\t\t\tdamageX -= quiver->getPerfectShotDamage();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16767c9ca2c95993158b8aa2642aa39de7acedd7580e9ee226ef94ad9691ec04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 627, + "startColumn": 14, + "charOffset": 20012, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 625, + "startColumn": 14, + "charOffset": 19881, + "charLength": 2, + "snippet": { + "text": "\tif (it.weaponType == WEAPON_DISTANCE) {\n\t\tstd::shared_ptr quiver = player->getInventoryItem(CONST_SLOT_RIGHT);\n\t\tif (quiver && quiver->getWeaponType()) {\n\t\t\tif (quiver->getPerfectShotRange() == distanceX) {\n\t\t\t\tdamageX -= quiver->getPerfectShotDamage();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40458c76473574eaa92049501d506efc433acaadb73ae98e5a8db2d69224f169" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'WeaponType_t' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 627, + "startColumn": 17, + "charOffset": 20015, + "charLength": 6, + "snippet": { + "text": "quiver" + } + }, + "contextRegion": { + "startLine": 625, + "startColumn": 17, + "charOffset": 19881, + "charLength": 6, + "snippet": { + "text": "\tif (it.weaponType == WEAPON_DISTANCE) {\n\t\tstd::shared_ptr quiver = player->getInventoryItem(CONST_SLOT_RIGHT);\n\t\tif (quiver && quiver->getWeaponType()) {\n\t\t\tif (quiver->getPerfectShotRange() == distanceX) {\n\t\t\t\tdamageX -= quiver->getPerfectShotDamage();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e5d5e4fe80e78a85c5b21f42ed44d0f3936ba77c8dd7856b5fe8f7fccfb31bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 628, + "startColumn": 4, + "charOffset": 20045, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 626, + "startColumn": 4, + "charOffset": 19922, + "charLength": 2, + "snippet": { + "text": "\t\tstd::shared_ptr quiver = player->getInventoryItem(CONST_SLOT_RIGHT);\n\t\tif (quiver && quiver->getWeaponType()) {\n\t\t\tif (quiver->getPerfectShotRange() == distanceX) {\n\t\t\t\tdamageX -= quiver->getPerfectShotDamage();\n\t\t\t} else if (quiver->getPerfectShotRange() == distanceY) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c237b4be151006c8e2016b5e248d14cdf81030c6f00996a39f92485f54add7a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'chance' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 636, + "startColumn": 10, + "charOffset": 20271, + "charLength": 6, + "snippet": { + "text": "chance" + } + }, + "contextRegion": { + "startLine": 634, + "startColumn": 10, + "charOffset": 20258, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tint32_t chance;\n\tif (damageX != 0 || damageY != 0) {\n\t\tchance = 100;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6ae26cd390e0916b189fb135b104ab5a71401697c0e424bdba8df9b65a1fb20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 638, + "startColumn": 12, + "charOffset": 20327, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 636, + "startColumn": 12, + "charOffset": 20262, + "charLength": 3, + "snippet": { + "text": "\tint32_t chance;\n\tif (damageX != 0 || damageY != 0) {\n\t\tchance = 100;\n\t\tperfectShot = true;\n\t} else if (it.hitChance == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab8f5f5cfa0097be1e102635215e07231da2ec74804042c8f49a8dcd403eb7e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'maxHitChance' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 645, + "startColumn": 12, + "charOffset": 20587, + "charLength": 12, + "snippet": { + "text": "maxHitChance" + } + }, + "contextRegion": { + "startLine": 643, + "startColumn": 12, + "charOffset": 20511, + "charLength": 12, + "snippet": { + "text": "\t\tuint32_t distance = std::max(distanceX, distanceY);\n\n\t\tuint32_t maxHitChance;\n\t\tif (it.maxHitChance != -1) {\n\t\t\tmaxHitChance = it.maxHitChance;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8011b4482e23426b21eb0f09145ad109afc0f3e638ece43a2695742b9b4c26e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "90 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 650, + "startColumn": 19, + "charOffset": 20783, + "charLength": 2, + "snippet": { + "text": "90" + } + }, + "contextRegion": { + "startLine": 648, + "startColumn": 19, + "charOffset": 20667, + "charLength": 2, + "snippet": { + "text": "\t\t} else if (it.ammoType != AMMO_NONE) {\n\t\t\t// hit chance on two-handed weapons is limited to 90%\n\t\t\tmaxHitChance = 90;\n\t\t} else {\n\t\t\t// one-handed is set to 75%" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5330e5ac682835a667feabf548fcfe852015d25fb82f68ef670913fa5e17584f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "75 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 653, + "startColumn": 19, + "charOffset": 20847, + "charLength": 2, + "snippet": { + "text": "75" + } + }, + "contextRegion": { + "startLine": 651, + "startColumn": 19, + "charOffset": 20787, + "charLength": 2, + "snippet": { + "text": "\t\t} else {\n\t\t\t// one-handed is set to 75%\n\t\t\tmaxHitChance = 75;\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce8c832f494c15e5b0040ba73d31f4974e49cb7d661407eb9ccea3878112d310" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "75 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 656, + "startColumn": 23, + "charOffset": 20878, + "charLength": 2, + "snippet": { + "text": "75" + } + }, + "contextRegion": { + "startLine": 654, + "startColumn": 23, + "charOffset": 20851, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tif (maxHitChance == 75) {\n\t\t\t// chance for one-handed weapons\n\t\t\tswitch (distance) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50af7b45155a025b9c9c5836ce3e621042d51187e345227fbf60b14e7b8b68b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 660, + "startColumn": 5, + "charOffset": 20959, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 658, + "startColumn": 5, + "charOffset": 20920, + "charLength": 4, + "snippet": { + "text": "\t\t\tswitch (distance) {\n\t\t\t\tcase 1:\n\t\t\t\tcase 5:\n\t\t\t\t\tchance = std::min(skill, 74) + 1;\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37d52c4f7768e673afc08c71348dde0bc1d715b93ba7526df87c933f12b9be97" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 660, + "startColumn": 10, + "charOffset": 20964, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 658, + "startColumn": 10, + "charOffset": 20920, + "charLength": 1, + "snippet": { + "text": "\t\t\tswitch (distance) {\n\t\t\t\tcase 1:\n\t\t\t\tcase 5:\n\t\t\t\t\tchance = std::min(skill, 74) + 1;\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "216ed16fdc85ff8904d26e1b90c357c39c4a18c7f0e05cfcdae78b5720ea40eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 661, + "startColumn": 15, + "charOffset": 20981, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 659, + "startColumn": 15, + "charOffset": 20943, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tcase 1:\n\t\t\t\tcase 5:\n\t\t\t\t\tchance = std::min(skill, 74) + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "561aad7ac631913777c5cc294a6d0859e97ff4f64f6d86d1ad3088a4c581d724" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "74 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 661, + "startColumn": 41, + "charOffset": 21007, + "charLength": 2, + "snippet": { + "text": "74" + } + }, + "contextRegion": { + "startLine": 659, + "startColumn": 41, + "charOffset": 20943, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tcase 1:\n\t\t\t\tcase 5:\n\t\t\t\t\tchance = std::min(skill, 74) + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f341653e20408507fdf4a38b6437fe986132793ebfed8d4f2b2470193ac2bf7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 664, + "startColumn": 15, + "charOffset": 21054, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 662, + "startColumn": 15, + "charOffset": 21016, + "charLength": 11, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 2.40f) + 8;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6cb0dec9df8ef761c51282758cf70d95ec6cd154d4a89ae3612401c6035905e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 664, + "startColumn": 37, + "charOffset": 21076, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 662, + "startColumn": 37, + "charOffset": 21016, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 2.40f) + 8;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "801fc42f8b0ffbf30dba7a091fa9d12db93912ac40abef9c3658055f302b9ec9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 664, + "startColumn": 37, + "charOffset": 21076, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 662, + "startColumn": 37, + "charOffset": 21016, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 2.40f) + 8;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9c743a93e2f2adc2c8c084656115ea30ded6305bcaf3ecd5b96612a7255d17b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "28 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 664, + "startColumn": 63, + "charOffset": 21102, + "charLength": 2, + "snippet": { + "text": "28" + } + }, + "contextRegion": { + "startLine": 662, + "startColumn": 63, + "charOffset": 21016, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 2.40f) + 8;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bac05298f907772ec7865e3782d014b29220df4ef744b6bcd01623ce96849a54" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 664, + "startColumn": 69, + "charOffset": 21108, + "charLength": 5, + "snippet": { + "text": "2.40f" + } + }, + "contextRegion": { + "startLine": 662, + "startColumn": 69, + "charOffset": 21016, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 2.40f) + 8;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba5c9004b97dce0ee8f8d3fcb76837670d4640f2d3aba904af0c14cc815fe5c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 664, + "startColumn": 69, + "charOffset": 21108, + "charLength": 5, + "snippet": { + "text": "2.40f" + } + }, + "contextRegion": { + "startLine": 662, + "startColumn": 69, + "charOffset": 21016, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 2.40f) + 8;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7aa942dcf0c4618f26332c977888dfedfc618391e397701658a17c61a024c567" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2.40f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 664, + "startColumn": 69, + "charOffset": 21108, + "charLength": 5, + "snippet": { + "text": "2.40f" + } + }, + "contextRegion": { + "startLine": 662, + "startColumn": 69, + "charOffset": 21016, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 2.40f) + 8;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd9e266c317ae9b1438327940a14776aad33232e2780bbe6db026e3896663e3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 664, + "startColumn": 78, + "charOffset": 21117, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 662, + "startColumn": 78, + "charOffset": 21016, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 2.40f) + 8;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09f9263bdace64fea3e7314423d5d55751952ee2c2985ce089e5e6e685048a83" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 667, + "startColumn": 15, + "charOffset": 21158, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 665, + "startColumn": 15, + "charOffset": 21120, + "charLength": 11, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tchance = static_cast(std::min(skill, 45) * 1.55f) + 6;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58637f46db50732bc5efc1561cc1022a4342cbfdd3aafb44502d57211ce97d54" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 667, + "startColumn": 37, + "charOffset": 21180, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 665, + "startColumn": 37, + "charOffset": 21120, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tchance = static_cast(std::min(skill, 45) * 1.55f) + 6;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c2085e028c290c17f2e052f30dca158d1cdf5929d56213050bc89dade56a86d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 667, + "startColumn": 37, + "charOffset": 21180, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 665, + "startColumn": 37, + "charOffset": 21120, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tchance = static_cast(std::min(skill, 45) * 1.55f) + 6;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0bb4cf5ff5eb76d773cf4e30298dcab2713cdefa7cf5391632b3ba30607a417c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "45 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 667, + "startColumn": 63, + "charOffset": 21206, + "charLength": 2, + "snippet": { + "text": "45" + } + }, + "contextRegion": { + "startLine": 665, + "startColumn": 63, + "charOffset": 21120, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tchance = static_cast(std::min(skill, 45) * 1.55f) + 6;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "559f171ab8feec77fedbecfee40de2227b17de016dd2b4ff6c9dc713c87ed092" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 667, + "startColumn": 69, + "charOffset": 21212, + "charLength": 5, + "snippet": { + "text": "1.55f" + } + }, + "contextRegion": { + "startLine": 665, + "startColumn": 69, + "charOffset": 21120, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tchance = static_cast(std::min(skill, 45) * 1.55f) + 6;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d06f514eb6e5e460645d2d8fb3af4d6d980a930cb14f9b64cc5b5838eac5a2e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 667, + "startColumn": 69, + "charOffset": 21212, + "charLength": 5, + "snippet": { + "text": "1.55f" + } + }, + "contextRegion": { + "startLine": 665, + "startColumn": 69, + "charOffset": 21120, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tchance = static_cast(std::min(skill, 45) * 1.55f) + 6;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "215fa8b405aa7a48884525e9d1eeec179ffc60c430053f78f17c5a937efda4e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1.55f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 667, + "startColumn": 69, + "charOffset": 21212, + "charLength": 5, + "snippet": { + "text": "1.55f" + } + }, + "contextRegion": { + "startLine": 665, + "startColumn": 69, + "charOffset": 21120, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tchance = static_cast(std::min(skill, 45) * 1.55f) + 6;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a02f6a14889503749dd6bb91dedead6eb5bbe2d147d5c58fbe561a90c45de741" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 667, + "startColumn": 78, + "charOffset": 21221, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 665, + "startColumn": 78, + "charOffset": 21120, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tchance = static_cast(std::min(skill, 45) * 1.55f) + 6;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "591a63cbe8b7911c91aef3832a08cab6e51736b96c9b89fa91ef8291f75620c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 670, + "startColumn": 15, + "charOffset": 21262, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 668, + "startColumn": 15, + "charOffset": 21224, + "charLength": 11, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.25f) + 3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "053b3c6a9aeaf95d5ea31200ab11bc10dacf35c897dfa26b323028e3ebc5c323" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 670, + "startColumn": 37, + "charOffset": 21284, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 668, + "startColumn": 37, + "charOffset": 21224, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.25f) + 3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43cf030aaf90a8c02769b20ecf9267fd21102deaa7aa23e3971b19af3c8d7848" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 670, + "startColumn": 37, + "charOffset": 21284, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 668, + "startColumn": 37, + "charOffset": 21224, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.25f) + 3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "376fe9b3aadf44ab58a37bed7985ba8221dca093135b12ff6b2483e2f5ea5d78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "58 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 670, + "startColumn": 63, + "charOffset": 21310, + "charLength": 2, + "snippet": { + "text": "58" + } + }, + "contextRegion": { + "startLine": 668, + "startColumn": 63, + "charOffset": 21224, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.25f) + 3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efd74cb036ea31f319e6b6bc153e14a0cea1e376172f338779cf79f3d49e7205" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 670, + "startColumn": 69, + "charOffset": 21316, + "charLength": 5, + "snippet": { + "text": "1.25f" + } + }, + "contextRegion": { + "startLine": 668, + "startColumn": 69, + "charOffset": 21224, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.25f) + 3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a51bac5fc5c1942ca342f9d21e524f3105823f5d5326a38423d40f0e71e4d05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 670, + "startColumn": 69, + "charOffset": 21316, + "charLength": 5, + "snippet": { + "text": "1.25f" + } + }, + "contextRegion": { + "startLine": 668, + "startColumn": 69, + "charOffset": 21224, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.25f) + 3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c956df4526b541bffd8a634d204fae7f933e29699ede5547f9f3617e1f39f1b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1.25f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 670, + "startColumn": 69, + "charOffset": 21316, + "charLength": 5, + "snippet": { + "text": "1.25f" + } + }, + "contextRegion": { + "startLine": 668, + "startColumn": 69, + "charOffset": 21224, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.25f) + 3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96c2be38e8dcfba77dc396e56a67845b3f875075e27b4c4d4e49484d26ac3e83" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 672, + "startColumn": 10, + "charOffset": 21349, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 670, + "startColumn": 10, + "charOffset": 21248, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.25f) + 3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 0.80f) + 3;\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76cef08225fb2125d441f0c4a237b651dd7127a1577baf58fda726a111c99f7d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 673, + "startColumn": 15, + "charOffset": 21366, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 671, + "startColumn": 15, + "charOffset": 21328, + "charLength": 11, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 0.80f) + 3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6fad44649eab0a0121424b74974d0c5737287be102dfec780d866c71ab9b98e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 673, + "startColumn": 37, + "charOffset": 21388, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 671, + "startColumn": 37, + "charOffset": 21328, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 0.80f) + 3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44fc8800e708d6c85128816a0a894193c75fc333e56ed3d6bdd4ad155effb0cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 673, + "startColumn": 37, + "charOffset": 21388, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 671, + "startColumn": 37, + "charOffset": 21328, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 0.80f) + 3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54e27d6df62c9f2faf10ebc33c602cd619b04ef5d4e9b539772ed15e105492d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "90 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 673, + "startColumn": 63, + "charOffset": 21414, + "charLength": 2, + "snippet": { + "text": "90" + } + }, + "contextRegion": { + "startLine": 671, + "startColumn": 63, + "charOffset": 21328, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 0.80f) + 3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "924ba0c72f6f9c02f2eba495ac447ffd0943975f99ac1974102e96e849dcae72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 673, + "startColumn": 69, + "charOffset": 21420, + "charLength": 5, + "snippet": { + "text": "0.80f" + } + }, + "contextRegion": { + "startLine": 671, + "startColumn": 69, + "charOffset": 21328, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 0.80f) + 3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b24e6bcbc29d1c6a40453907669b800f1028465a9dfb612b8df1a50229dc3f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 673, + "startColumn": 69, + "charOffset": 21420, + "charLength": 5, + "snippet": { + "text": "0.80f" + } + }, + "contextRegion": { + "startLine": 671, + "startColumn": 69, + "charOffset": 21328, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 0.80f) + 3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97892c359cf50d00afde5555aa9a2e1cb2e7d1a4cf39d1faafc7cd25262d265a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.80f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 673, + "startColumn": 69, + "charOffset": 21420, + "charLength": 5, + "snippet": { + "text": "0.80f" + } + }, + "contextRegion": { + "startLine": 671, + "startColumn": 69, + "charOffset": 21328, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 0.80f) + 3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9244f0bbe232b2229757fc284cadec59048d90d67dd5defc68f75dd77f82631f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 675, + "startColumn": 10, + "charOffset": 21453, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 673, + "startColumn": 10, + "charOffset": 21352, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 0.80f) + 3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\tchance = static_cast(std::min(skill, 104) * 0.70f) + 2;\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50e80fcf15fea8de1caea41356bd87bf277028079eacbee0a12dbfa0cf9e371a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 676, + "startColumn": 15, + "charOffset": 21470, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 674, + "startColumn": 15, + "charOffset": 21432, + "charLength": 11, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\tchance = static_cast(std::min(skill, 104) * 0.70f) + 2;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed032ec092339097d0829d257d8874c1f717fc971a65b6415b1f1a2fa41129a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 676, + "startColumn": 37, + "charOffset": 21492, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 674, + "startColumn": 37, + "charOffset": 21432, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\tchance = static_cast(std::min(skill, 104) * 0.70f) + 2;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9074b46564e6beee3373e89e095be53bc061bc314d016f6c419ba30ebefd1ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 676, + "startColumn": 37, + "charOffset": 21492, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 674, + "startColumn": 37, + "charOffset": 21432, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\tchance = static_cast(std::min(skill, 104) * 0.70f) + 2;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0804c064e67453b0147dfc3de21737d02c1878459f2b545e0637f09038cfeb3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "104 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 676, + "startColumn": 63, + "charOffset": 21518, + "charLength": 3, + "snippet": { + "text": "104" + } + }, + "contextRegion": { + "startLine": 674, + "startColumn": 63, + "charOffset": 21432, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\tchance = static_cast(std::min(skill, 104) * 0.70f) + 2;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8352007dbe8243d9d5aae6f998413c5490bd25312b02b4541b297deaae3b961e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 676, + "startColumn": 70, + "charOffset": 21525, + "charLength": 5, + "snippet": { + "text": "0.70f" + } + }, + "contextRegion": { + "startLine": 674, + "startColumn": 70, + "charOffset": 21432, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\tchance = static_cast(std::min(skill, 104) * 0.70f) + 2;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8dd38b759d5be40745880b9ec8af9f5e1c2417185b17bd56e07bf88440814509" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 676, + "startColumn": 70, + "charOffset": 21525, + "charLength": 5, + "snippet": { + "text": "0.70f" + } + }, + "contextRegion": { + "startLine": 674, + "startColumn": 70, + "charOffset": 21432, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\tchance = static_cast(std::min(skill, 104) * 0.70f) + 2;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0fb913b6c44bfe3f6cac8c055b6930cad92d001d86d3653fdb8a2850795cbf9c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.70f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 676, + "startColumn": 70, + "charOffset": 21525, + "charLength": 5, + "snippet": { + "text": "0.70f" + } + }, + "contextRegion": { + "startLine": 674, + "startColumn": 70, + "charOffset": 21432, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\tchance = static_cast(std::min(skill, 104) * 0.70f) + 2;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88b1ea9445ce4e488699c8d9e79fbe3d3b7808b37b307523c60e06f4b8958a70" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-signed-char-misuse", + "ruleIndex": 86, + "kind": "fail", + "level": "warning", + "message": { + "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 679, + "startColumn": 15, + "charOffset": 21576, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 677, + "startColumn": 15, + "charOffset": 21537, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tchance = it.hitChance;\n\t\t\t\t\tbreak;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23efbdb9d94e1d848e1494d90ab1a558ebbe1671d7ba7a773b4ebdbf44822f8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "90 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 682, + "startColumn": 30, + "charOffset": 21636, + "charLength": 2, + "snippet": { + "text": "90" + } + }, + "contextRegion": { + "startLine": 680, + "startColumn": 30, + "charOffset": 21590, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} else if (maxHitChance == 90) {\n\t\t\t// formula for two-handed weapons\n\t\t\tswitch (distance) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83a6189781fc4a9b5d01d83bf738b30de96656b30f984d60730c56ae41c1f735" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 686, + "startColumn": 5, + "charOffset": 21718, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 684, + "startColumn": 5, + "charOffset": 21679, + "charLength": 4, + "snippet": { + "text": "\t\t\tswitch (distance) {\n\t\t\t\tcase 1:\n\t\t\t\tcase 5:\n\t\t\t\t\tchance = static_cast(std::min(skill, 74) * 1.20f) + 1;\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "475d5b874d150515b1db012cf9d9e60a6110c496c91878e6c5ae954dc0998458" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 686, + "startColumn": 10, + "charOffset": 21723, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 684, + "startColumn": 10, + "charOffset": 21679, + "charLength": 1, + "snippet": { + "text": "\t\t\tswitch (distance) {\n\t\t\t\tcase 1:\n\t\t\t\tcase 5:\n\t\t\t\t\tchance = static_cast(std::min(skill, 74) * 1.20f) + 1;\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41383835d9d8183bcca05744b73f18f96a0c2f7d9c6489fe11bbd63282b00b76" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 687, + "startColumn": 15, + "charOffset": 21740, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 685, + "startColumn": 15, + "charOffset": 21702, + "charLength": 11, + "snippet": { + "text": "\t\t\t\tcase 1:\n\t\t\t\tcase 5:\n\t\t\t\t\tchance = static_cast(std::min(skill, 74) * 1.20f) + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c86e9019cb517bf4d80c76d7c7bd06c0f53a850e56728984d77360dc6a8d858b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 687, + "startColumn": 37, + "charOffset": 21762, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 685, + "startColumn": 37, + "charOffset": 21702, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tcase 1:\n\t\t\t\tcase 5:\n\t\t\t\t\tchance = static_cast(std::min(skill, 74) * 1.20f) + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e569a89813a6de133eaf713cb8ce306f6a2f77e14535032692852888a9b1b2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 687, + "startColumn": 37, + "charOffset": 21762, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 685, + "startColumn": 37, + "charOffset": 21702, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tcase 1:\n\t\t\t\tcase 5:\n\t\t\t\t\tchance = static_cast(std::min(skill, 74) * 1.20f) + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c30458cf525bcfa210caedaca13d3fcb9aaea09ac29ca1ed2f32750c3313185" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "74 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 687, + "startColumn": 63, + "charOffset": 21788, + "charLength": 2, + "snippet": { + "text": "74" + } + }, + "contextRegion": { + "startLine": 685, + "startColumn": 63, + "charOffset": 21702, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tcase 1:\n\t\t\t\tcase 5:\n\t\t\t\t\tchance = static_cast(std::min(skill, 74) * 1.20f) + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58cf36a956a8a054ccc4a1518289b44f81ddd0692f5ac5d210606bc59928ddc0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 687, + "startColumn": 69, + "charOffset": 21794, + "charLength": 5, + "snippet": { + "text": "1.20f" + } + }, + "contextRegion": { + "startLine": 685, + "startColumn": 69, + "charOffset": 21702, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tcase 1:\n\t\t\t\tcase 5:\n\t\t\t\t\tchance = static_cast(std::min(skill, 74) * 1.20f) + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "860bec92a4a187f7d4094fc520052477ca0b6329fc095dca7630135474952868" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 687, + "startColumn": 69, + "charOffset": 21794, + "charLength": 5, + "snippet": { + "text": "1.20f" + } + }, + "contextRegion": { + "startLine": 685, + "startColumn": 69, + "charOffset": 21702, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tcase 1:\n\t\t\t\tcase 5:\n\t\t\t\t\tchance = static_cast(std::min(skill, 74) * 1.20f) + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7309d0e9881a82c818b9f8d508b8e98ba3f775d0269c1e73e8059e2bf1b18e33" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1.20f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 687, + "startColumn": 69, + "charOffset": 21794, + "charLength": 5, + "snippet": { + "text": "1.20f" + } + }, + "contextRegion": { + "startLine": 685, + "startColumn": 69, + "charOffset": 21702, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tcase 1:\n\t\t\t\tcase 5:\n\t\t\t\t\tchance = static_cast(std::min(skill, 74) * 1.20f) + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a84606c09649e4be06d6548670e4612f360ac47f09cd9ce3374a85eac1c31d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 690, + "startColumn": 15, + "charOffset": 21844, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 688, + "startColumn": 15, + "charOffset": 21806, + "charLength": 11, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 3.20f);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f86952e3e29a1d004c8181b1ad878b48d8982469a39ae15cb619cbf8071c05ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 690, + "startColumn": 37, + "charOffset": 21866, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 688, + "startColumn": 37, + "charOffset": 21806, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 3.20f);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec3ba100e353ac84050fec600bd246157095edd96ee05816cffd286f0d679f8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 690, + "startColumn": 37, + "charOffset": 21866, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 688, + "startColumn": 37, + "charOffset": 21806, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 3.20f);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "720291d1eb54a1834ebc7f621a9563a3d72d009f9203e2c19855929046de6124" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "28 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 690, + "startColumn": 63, + "charOffset": 21892, + "charLength": 2, + "snippet": { + "text": "28" + } + }, + "contextRegion": { + "startLine": 688, + "startColumn": 63, + "charOffset": 21806, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 3.20f);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70b4d4d046ca22d5df6b968a508c15106f7b175861fca2fc5f49103ebb72953c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 690, + "startColumn": 69, + "charOffset": 21898, + "charLength": 5, + "snippet": { + "text": "3.20f" + } + }, + "contextRegion": { + "startLine": 688, + "startColumn": 69, + "charOffset": 21806, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 3.20f);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f02230479f9232c7210b89e6eb5a08a96698ef5875dd0d6ef217b10daec41c53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 690, + "startColumn": 69, + "charOffset": 21898, + "charLength": 5, + "snippet": { + "text": "3.20f" + } + }, + "contextRegion": { + "startLine": 688, + "startColumn": 69, + "charOffset": 21806, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 3.20f);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd8970bb6249b64898a0add629c27e47ebcdb8071edbe9420ed3bf6498228b3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "3.20f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 690, + "startColumn": 69, + "charOffset": 21898, + "charLength": 5, + "snippet": { + "text": "3.20f" + } + }, + "contextRegion": { + "startLine": 688, + "startColumn": 69, + "charOffset": 21806, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 3.20f);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "379e71d2317b8b2d5df6804d320c0989e3691e6c11308935284462cff85d683d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 693, + "startColumn": 15, + "charOffset": 21944, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 691, + "startColumn": 15, + "charOffset": 21906, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tchance = std::min(skill, 45) * 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f67f8e6b29652a6476f79f27be404e6a79f4e5261fc8bb1b2dd2d580df93eda" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "45 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 693, + "startColumn": 41, + "charOffset": 21970, + "charLength": 2, + "snippet": { + "text": "45" + } + }, + "contextRegion": { + "startLine": 691, + "startColumn": 41, + "charOffset": 21906, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tchance = std::min(skill, 45) * 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52800a18d78697241f329b3acfff22b78dc5142b592af8e544750ae50af9f72b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 696, + "startColumn": 15, + "charOffset": 22017, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 694, + "startColumn": 15, + "charOffset": 21979, + "charLength": 11, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.55f);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83af5ef735af38347b4ffae1dcebc3f5e23fa8c6e19ff88a1080010045ec19f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 696, + "startColumn": 37, + "charOffset": 22039, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 694, + "startColumn": 37, + "charOffset": 21979, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.55f);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d1c3b5780f2ec4ac591cfdfebb64e44633df15aa9cb35d72ebe1c81409b2578" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 696, + "startColumn": 37, + "charOffset": 22039, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 694, + "startColumn": 37, + "charOffset": 21979, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.55f);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d72214f50ca6b95886c4af0acf2ab95619188b0e529d2f32e8e521fd80f0f3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "58 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 696, + "startColumn": 63, + "charOffset": 22065, + "charLength": 2, + "snippet": { + "text": "58" + } + }, + "contextRegion": { + "startLine": 694, + "startColumn": 63, + "charOffset": 21979, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.55f);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bfef6da4ac4df4b767dcd28cdd85f08544d5f947ef7cafd367f6cd14bae78ea4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 696, + "startColumn": 69, + "charOffset": 22071, + "charLength": 5, + "snippet": { + "text": "1.55f" + } + }, + "contextRegion": { + "startLine": 694, + "startColumn": 69, + "charOffset": 21979, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.55f);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "021568d3a0637d8cc597dbb632f5fa1091c395b838191847088ad65975a8f4ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 696, + "startColumn": 69, + "charOffset": 22071, + "charLength": 5, + "snippet": { + "text": "1.55f" + } + }, + "contextRegion": { + "startLine": 694, + "startColumn": 69, + "charOffset": 21979, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.55f);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5809bd50377e88bdda1800f0d5302c783317f449d9287bd7696f2943ac708fbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1.55f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 696, + "startColumn": 69, + "charOffset": 22071, + "charLength": 5, + "snippet": { + "text": "1.55f" + } + }, + "contextRegion": { + "startLine": 694, + "startColumn": 69, + "charOffset": 21979, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.55f);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a7ec1f1c1f2bc756989295a0da2966f96e25cf7361c336dd5b8175396df8fae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 698, + "startColumn": 10, + "charOffset": 22100, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 696, + "startColumn": 10, + "charOffset": 22003, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.55f);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\tcase 7:\n\t\t\t\t\tchance = std::min(skill, 90);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c52fe69abf6e0cede07de1c0096e7e39e8e0923205ec6b9a8ea07e172d3e186e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 699, + "startColumn": 5, + "charOffset": 22107, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 697, + "startColumn": 5, + "charOffset": 22079, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\tcase 7:\n\t\t\t\t\tchance = std::min(skill, 90);\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3776aa29c3e5af1a72375929514c8fe73f59d6dd5413923fcfbcc7b5d1ff515" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 699, + "startColumn": 10, + "charOffset": 22112, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 697, + "startColumn": 10, + "charOffset": 22079, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\tcase 7:\n\t\t\t\t\tchance = std::min(skill, 90);\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ea99306f8231cf74350ab9a0cd84bfcf344bdee21b61d7c619a2c5bb0c6da2b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 700, + "startColumn": 15, + "charOffset": 22129, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 698, + "startColumn": 15, + "charOffset": 22091, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tcase 6:\n\t\t\t\tcase 7:\n\t\t\t\t\tchance = std::min(skill, 90);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c74d9bad2c4dde7973b9c232332622f7d809d08b240ee4204683adf836af23fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "90 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 700, + "startColumn": 41, + "charOffset": 22155, + "charLength": 2, + "snippet": { + "text": "90" + } + }, + "contextRegion": { + "startLine": 698, + "startColumn": 41, + "charOffset": 22091, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tcase 6:\n\t\t\t\tcase 7:\n\t\t\t\t\tchance = std::min(skill, 90);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "176e031ec09c519becbf54acdb75d762a1ae8917bf63cd021bdffd84ff625ab1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-signed-char-misuse", + "ruleIndex": 86, + "kind": "fail", + "level": "warning", + "message": { + "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 703, + "startColumn": 15, + "charOffset": 22199, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 701, + "startColumn": 15, + "charOffset": 22160, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tchance = it.hitChance;\n\t\t\t\t\tbreak;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c1c11e7f13d2a819ff6fadee2d8c9095f8fa33f1ed73ac0c9e57e9c0ef47ece" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 706, + "startColumn": 30, + "charOffset": 22259, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 704, + "startColumn": 30, + "charOffset": 22213, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} else if (maxHitChance == 100) {\n\t\t\tswitch (distance) {\n\t\t\t\tcase 1:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea69306783d67913a5ddbfb0b34bc259173d56c4eee64b66b482da062def9082" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 709, + "startColumn": 5, + "charOffset": 22305, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 707, + "startColumn": 5, + "charOffset": 22266, + "charLength": 4, + "snippet": { + "text": "\t\t\tswitch (distance) {\n\t\t\t\tcase 1:\n\t\t\t\tcase 5:\n\t\t\t\t\tchance = static_cast(std::min(skill, 73) * 1.35f) + 1;\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eeae4fc4296dba6f3d1c5ed1877f6ab113f3b99f309ebe4274db7a1be146acb9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 709, + "startColumn": 10, + "charOffset": 22310, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 707, + "startColumn": 10, + "charOffset": 22266, + "charLength": 1, + "snippet": { + "text": "\t\t\tswitch (distance) {\n\t\t\t\tcase 1:\n\t\t\t\tcase 5:\n\t\t\t\t\tchance = static_cast(std::min(skill, 73) * 1.35f) + 1;\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8c27d40ff4cb2e4cb8b6ab94cdaab0825b78e069aef0f3f3dd8ef2352a4f31b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 710, + "startColumn": 15, + "charOffset": 22327, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 708, + "startColumn": 15, + "charOffset": 22289, + "charLength": 11, + "snippet": { + "text": "\t\t\t\tcase 1:\n\t\t\t\tcase 5:\n\t\t\t\t\tchance = static_cast(std::min(skill, 73) * 1.35f) + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60253a0329892f1ec82640b307b0560d8e27321afb6d7ced8cfbb57450593dc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 710, + "startColumn": 37, + "charOffset": 22349, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 708, + "startColumn": 37, + "charOffset": 22289, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tcase 1:\n\t\t\t\tcase 5:\n\t\t\t\t\tchance = static_cast(std::min(skill, 73) * 1.35f) + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10f69aca258becd3125560a2cfee4c336fbc71d8e4deac4335403daa72c041af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 710, + "startColumn": 37, + "charOffset": 22349, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 708, + "startColumn": 37, + "charOffset": 22289, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tcase 1:\n\t\t\t\tcase 5:\n\t\t\t\t\tchance = static_cast(std::min(skill, 73) * 1.35f) + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a503f4f7fb8ce5c814a5b0443e0bea5db7f832adb892a40fb6b12e9bac29a427" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "73 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 710, + "startColumn": 63, + "charOffset": 22375, + "charLength": 2, + "snippet": { + "text": "73" + } + }, + "contextRegion": { + "startLine": 708, + "startColumn": 63, + "charOffset": 22289, + "charLength": 2, + "snippet": { + "text": "\t\t\t\tcase 1:\n\t\t\t\tcase 5:\n\t\t\t\t\tchance = static_cast(std::min(skill, 73) * 1.35f) + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2489d754e7fbbb4a4d703d85ee1f3315bbdbd91883511e03d237cccf64ac30f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 710, + "startColumn": 69, + "charOffset": 22381, + "charLength": 5, + "snippet": { + "text": "1.35f" + } + }, + "contextRegion": { + "startLine": 708, + "startColumn": 69, + "charOffset": 22289, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tcase 1:\n\t\t\t\tcase 5:\n\t\t\t\t\tchance = static_cast(std::min(skill, 73) * 1.35f) + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd457b7079da138c6e1c6d73e507bba9eb81e97ba50eb0ce817e6fd785695c41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 710, + "startColumn": 69, + "charOffset": 22381, + "charLength": 5, + "snippet": { + "text": "1.35f" + } + }, + "contextRegion": { + "startLine": 708, + "startColumn": 69, + "charOffset": 22289, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tcase 1:\n\t\t\t\tcase 5:\n\t\t\t\t\tchance = static_cast(std::min(skill, 73) * 1.35f) + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ef1b45c9c157b3149cce1460158eeacd8470ff900fe3a3b62fdf07261d76b1a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1.35f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 710, + "startColumn": 69, + "charOffset": 22381, + "charLength": 5, + "snippet": { + "text": "1.35f" + } + }, + "contextRegion": { + "startLine": 708, + "startColumn": 69, + "charOffset": 22289, + "charLength": 5, + "snippet": { + "text": "\t\t\t\tcase 1:\n\t\t\t\tcase 5:\n\t\t\t\t\tchance = static_cast(std::min(skill, 73) * 1.35f) + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ec2beddaaba1a1a9b2469b0c2b6a40064aefc57062bd94150f31268c05f1273" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 713, + "startColumn": 15, + "charOffset": 22431, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 711, + "startColumn": 15, + "charOffset": 22393, + "charLength": 11, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchance = static_cast(std::min(skill, 30) * 3.20f) + 4;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "503e0f648d6deba60460e4c05cf5bbb0fe7c1adb068044aaaf25acdf25ab1181" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 713, + "startColumn": 37, + "charOffset": 22453, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 711, + "startColumn": 37, + "charOffset": 22393, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchance = static_cast(std::min(skill, 30) * 3.20f) + 4;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68f09a4d85ebfda7a0f9a0743d2dffd5711a6e22184f1084c64ce039317d7894" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 713, + "startColumn": 37, + "charOffset": 22453, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 711, + "startColumn": 37, + "charOffset": 22393, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchance = static_cast(std::min(skill, 30) * 3.20f) + 4;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c2a53fde7a4968a2818635b4d0135aa972e8788b7a61f86e0d1c1a5bfe67fb1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 713, + "startColumn": 63, + "charOffset": 22479, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 711, + "startColumn": 63, + "charOffset": 22393, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchance = static_cast(std::min(skill, 30) * 3.20f) + 4;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6a5db42d4a922d35f53155eeb2b50f65a05df93d291f8bd8d685b2bda40b1db" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 713, + "startColumn": 69, + "charOffset": 22485, + "charLength": 5, + "snippet": { + "text": "3.20f" + } + }, + "contextRegion": { + "startLine": 711, + "startColumn": 69, + "charOffset": 22393, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchance = static_cast(std::min(skill, 30) * 3.20f) + 4;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77a304193611670045cb079b912be5cc014f29716b606b0218a8d8845d88a110" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 713, + "startColumn": 69, + "charOffset": 22485, + "charLength": 5, + "snippet": { + "text": "3.20f" + } + }, + "contextRegion": { + "startLine": 711, + "startColumn": 69, + "charOffset": 22393, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchance = static_cast(std::min(skill, 30) * 3.20f) + 4;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b45adf7e8cddf33911e1dc2a135fa05d217d64f3a8bb1f68817ea76daea68ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "3.20f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 713, + "startColumn": 69, + "charOffset": 22485, + "charLength": 5, + "snippet": { + "text": "3.20f" + } + }, + "contextRegion": { + "startLine": 711, + "startColumn": 69, + "charOffset": 22393, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchance = static_cast(std::min(skill, 30) * 3.20f) + 4;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1106700661422418eba74bdb45860f80ed06a9a86aa1b5cc946f1f0356b233cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 716, + "startColumn": 15, + "charOffset": 22535, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 714, + "startColumn": 15, + "charOffset": 22497, + "charLength": 11, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tchance = static_cast(std::min(skill, 48) * 2.05f) + 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a08c1341b68518e918da9187f09c1878783f74b2c20cc899ca66ba57df4dcf3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 716, + "startColumn": 37, + "charOffset": 22557, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 714, + "startColumn": 37, + "charOffset": 22497, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tchance = static_cast(std::min(skill, 48) * 2.05f) + 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fb3f352355f548084a5b4bfe6a94cf7962f14d1da47529087a035589404c8c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 716, + "startColumn": 37, + "charOffset": 22557, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 714, + "startColumn": 37, + "charOffset": 22497, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tchance = static_cast(std::min(skill, 48) * 2.05f) + 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3dfe27d7a1d1ba2697bd59dc4c35cad382205d6d8c759f11672331217005c3da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "48 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 716, + "startColumn": 63, + "charOffset": 22583, + "charLength": 2, + "snippet": { + "text": "48" + } + }, + "contextRegion": { + "startLine": 714, + "startColumn": 63, + "charOffset": 22497, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tchance = static_cast(std::min(skill, 48) * 2.05f) + 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea67237ff782853d959b2dbf9a67cee8358601b199875f83429ab36dd8532b03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 716, + "startColumn": 69, + "charOffset": 22589, + "charLength": 5, + "snippet": { + "text": "2.05f" + } + }, + "contextRegion": { + "startLine": 714, + "startColumn": 69, + "charOffset": 22497, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tchance = static_cast(std::min(skill, 48) * 2.05f) + 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15c9514f6b176b63579cc2632beb49a0a09b7bf200518c721abcb417b99df554" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 716, + "startColumn": 69, + "charOffset": 22589, + "charLength": 5, + "snippet": { + "text": "2.05f" + } + }, + "contextRegion": { + "startLine": 714, + "startColumn": 69, + "charOffset": 22497, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tchance = static_cast(std::min(skill, 48) * 2.05f) + 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0076d84a624f3a723c676cc89cb8a4c7f45e10dcdd9d230ac1f4779f796b259b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2.05f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 716, + "startColumn": 69, + "charOffset": 22589, + "charLength": 5, + "snippet": { + "text": "2.05f" + } + }, + "contextRegion": { + "startLine": 714, + "startColumn": 69, + "charOffset": 22497, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tchance = static_cast(std::min(skill, 48) * 2.05f) + 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f77d3f53e1ee854c68afe120d50641060bd0104e22d8668ff2e871dd5040ee8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 719, + "startColumn": 15, + "charOffset": 22639, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 717, + "startColumn": 15, + "charOffset": 22601, + "charLength": 11, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tchance = static_cast(std::min(skill, 65) * 1.50f) + 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "129fa780aafe0c8f496951403ce8fd3602a9c41fe64c955794bc15f058a561b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 719, + "startColumn": 37, + "charOffset": 22661, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 717, + "startColumn": 37, + "charOffset": 22601, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tchance = static_cast(std::min(skill, 65) * 1.50f) + 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a16f7aa0a049653db9be9809f214ca97f26fc81c61ba94a73b8fbee87787e15d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 719, + "startColumn": 37, + "charOffset": 22661, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 717, + "startColumn": 37, + "charOffset": 22601, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tchance = static_cast(std::min(skill, 65) * 1.50f) + 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70ece1ee77143bfcdd3f068be7f085169ae3095aff1f5694a1a9fb047ef3f184" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "65 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 719, + "startColumn": 63, + "charOffset": 22687, + "charLength": 2, + "snippet": { + "text": "65" + } + }, + "contextRegion": { + "startLine": 717, + "startColumn": 63, + "charOffset": 22601, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tchance = static_cast(std::min(skill, 65) * 1.50f) + 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6eadf9c1e8c4a3eb54354b489916c6ae355ceb9e5a21ad2f8d5ef4ae65bc5e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 719, + "startColumn": 69, + "charOffset": 22693, + "charLength": 5, + "snippet": { + "text": "1.50f" + } + }, + "contextRegion": { + "startLine": 717, + "startColumn": 69, + "charOffset": 22601, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tchance = static_cast(std::min(skill, 65) * 1.50f) + 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2243f16424abb4e51245ca828c6c835f5e7aff233767779bce3cea7e9591a79c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 719, + "startColumn": 69, + "charOffset": 22693, + "charLength": 5, + "snippet": { + "text": "1.50f" + } + }, + "contextRegion": { + "startLine": 717, + "startColumn": 69, + "charOffset": 22601, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tchance = static_cast(std::min(skill, 65) * 1.50f) + 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "815058ee2e96d526ed0082e56706620f2db5fbe4e029b9661b8dda4fa512f74f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1.50f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 719, + "startColumn": 69, + "charOffset": 22693, + "charLength": 5, + "snippet": { + "text": "1.50f" + } + }, + "contextRegion": { + "startLine": 717, + "startColumn": 69, + "charOffset": 22601, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tchance = static_cast(std::min(skill, 65) * 1.50f) + 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4fd5a65315e7583f0ff07f3fc404a27bee381e1ab148f4751e12250c30b85efb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 721, + "startColumn": 10, + "charOffset": 22726, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 719, + "startColumn": 10, + "charOffset": 22625, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\tchance = static_cast(std::min(skill, 65) * 1.50f) + 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tchance = static_cast(std::min(skill, 87) * 1.20f) - 4;\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "060112bffd98c65395a478c91a1c61c3787552b590bfa767fd9ad39fb4936273" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 722, + "startColumn": 15, + "charOffset": 22743, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 720, + "startColumn": 15, + "charOffset": 22705, + "charLength": 11, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tchance = static_cast(std::min(skill, 87) * 1.20f) - 4;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8f14ddf0cf03181f48b5e6481d5fd90a721456c85fff3134c652c9311d5457e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 722, + "startColumn": 37, + "charOffset": 22765, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 720, + "startColumn": 37, + "charOffset": 22705, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tchance = static_cast(std::min(skill, 87) * 1.20f) - 4;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d74d537a9ce5171d022527adea88945df793fd5838ccbba1f7360c99afdf6aa3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 722, + "startColumn": 37, + "charOffset": 22765, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 720, + "startColumn": 37, + "charOffset": 22705, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tchance = static_cast(std::min(skill, 87) * 1.20f) - 4;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2bec9d0fe20c890ee127e1c52807fde92b5291d397a080593de4dc4b3c9fb4b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "87 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 722, + "startColumn": 63, + "charOffset": 22791, + "charLength": 2, + "snippet": { + "text": "87" + } + }, + "contextRegion": { + "startLine": 720, + "startColumn": 63, + "charOffset": 22705, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tchance = static_cast(std::min(skill, 87) * 1.20f) - 4;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9197aede5f2d22fb86753d9feaadf2fa2a0f18b115eadc2dad3ab7d4af9e20b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 722, + "startColumn": 69, + "charOffset": 22797, + "charLength": 5, + "snippet": { + "text": "1.20f" + } + }, + "contextRegion": { + "startLine": 720, + "startColumn": 69, + "charOffset": 22705, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tchance = static_cast(std::min(skill, 87) * 1.20f) - 4;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "350fed414c9ce977d542a49b78b3f96145663c7fc18d16ee61d013651fe28332" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 722, + "startColumn": 69, + "charOffset": 22797, + "charLength": 5, + "snippet": { + "text": "1.20f" + } + }, + "contextRegion": { + "startLine": 720, + "startColumn": 69, + "charOffset": 22705, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tchance = static_cast(std::min(skill, 87) * 1.20f) - 4;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d053bc739a30fa8422e525bda227179eaf2d185dc0c19661a42d7ae19bac8dc6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1.20f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 722, + "startColumn": 69, + "charOffset": 22797, + "charLength": 5, + "snippet": { + "text": "1.20f" + } + }, + "contextRegion": { + "startLine": 720, + "startColumn": 69, + "charOffset": 22705, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tchance = static_cast(std::min(skill, 87) * 1.20f) - 4;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0928b8df05b0bb8bfb20cbebf17332705b23254dcd49f234060d49df4fe1835" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 724, + "startColumn": 10, + "charOffset": 22830, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 722, + "startColumn": 10, + "charOffset": 22729, + "charLength": 1, + "snippet": { + "text": "\t\t\t\t\tchance = static_cast(std::min(skill, 87) * 1.20f) - 4;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 1.10f) + 1;\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a4df0fb3591bb3cc9d020f43c44f2e5e66e367816cf8ba61efcca9d78572350" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 725, + "startColumn": 15, + "charOffset": 22847, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 723, + "startColumn": 15, + "charOffset": 22809, + "charLength": 11, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 1.10f) + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c470fadbcb8a2a824ba21069c29f189dc7f339311b0540077e6951e08f4672cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 725, + "startColumn": 37, + "charOffset": 22869, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 723, + "startColumn": 37, + "charOffset": 22809, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 1.10f) + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a5df7397e7a7c641c116ee4917e47ba48fb4db846d8f600b01af030ee0063e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 725, + "startColumn": 37, + "charOffset": 22869, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 723, + "startColumn": 37, + "charOffset": 22809, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 1.10f) + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c7f849b05f2f43e26b5cc9d41131b5a9e838855a1030dcb21001e042be7fc83" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "90 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 725, + "startColumn": 63, + "charOffset": 22895, + "charLength": 2, + "snippet": { + "text": "90" + } + }, + "contextRegion": { + "startLine": 723, + "startColumn": 63, + "charOffset": 22809, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 1.10f) + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f1bf2d48e776904637a84c9b4cd907da44dc5d93b5a6afbdf65374a049aa643" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 725, + "startColumn": 69, + "charOffset": 22901, + "charLength": 5, + "snippet": { + "text": "1.10f" + } + }, + "contextRegion": { + "startLine": 723, + "startColumn": 69, + "charOffset": 22809, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 1.10f) + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a300eb2df26068dadc88f7b6d68614962f07b6a2b4b50ff7890b314a31eb66d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 725, + "startColumn": 69, + "charOffset": 22901, + "charLength": 5, + "snippet": { + "text": "1.10f" + } + }, + "contextRegion": { + "startLine": 723, + "startColumn": 69, + "charOffset": 22809, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 1.10f) + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "238b27e5ce7c4b6ed6f613a96dc66ae300f19ffed19dc1df4af9fd609cb98c27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1.10f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 725, + "startColumn": 69, + "charOffset": 22901, + "charLength": 5, + "snippet": { + "text": "1.10f" + } + }, + "contextRegion": { + "startLine": 723, + "startColumn": 69, + "charOffset": 22809, + "charLength": 5, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 1.10f) + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7ac6ecad56c892b0651f321ce6ea6bfb4c8fdd8cdc5eadd38a83e751288c518" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-signed-char-misuse", + "ruleIndex": 86, + "kind": "fail", + "level": "warning", + "message": { + "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 728, + "startColumn": 15, + "charOffset": 22952, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 726, + "startColumn": 15, + "charOffset": 22913, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tchance = it.hitChance;\n\t\t\t\t\tbreak;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "150d999f5ef05e9136ad2563a56e60541202f6a29a81b9c9619a639209d0f6fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 732, + "startColumn": 13, + "charOffset": 23006, + "charLength": 12, + "snippet": { + "text": "maxHitChance" + } + }, + "contextRegion": { + "startLine": 730, + "startColumn": 13, + "charOffset": 22978, + "charLength": 12, + "snippet": { + "text": "\t\t\t}\n\t\t} else {\n\t\t\tchance = maxHitChance;\n\t\t}\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed032ec092339097d0829d257d8874c1f717fc971a65b6415b1f1a2fa41129a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-signed-char-misuse", + "ruleIndex": 86, + "kind": "fail", + "level": "warning", + "message": { + "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 735, + "startColumn": 12, + "charOffset": 23045, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 733, + "startColumn": 12, + "charOffset": 23020, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\tchance = it.hitChance;\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d1659de22a985990d0c99a999d3318f588bc678d2f8829abc53292fc3dd81ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 745, + "startColumn": 34, + "charOffset": 23295, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 743, + "startColumn": 34, + "charOffset": 23258, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tif (chance >= uniform_random(1, 100)) {\n\t\tWeapon::internalUseWeapon(player, item, target, damageModifier);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29c92322b8d3ab3ca5b562303319f402f3cfce0a517064f0d88fc4f14cce719b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 759, + "startColumn": 4, + "charOffset": 23836, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 757, + "startColumn": 4, + "charOffset": 23787, + "charLength": 3, + "snippet": { + "text": "\t\t\tPosition destPos = target->getPosition();\n\n\t\t\tfor (const auto &dir : destList) {\n\t\t\t\t// Blocking tiles or tiles without ground ain't valid targets for spears\n\t\t\t\tauto tmpTile = g_game().map.getTile(static_cast(destPos.x + dir.first), static_cast(destPos.y + dir.second), destPos.z);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ff225362c794a1b85b31479d8a9ce68d3361e68b8cffaab8d055313867589a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'typename __gnu_cxx::__enable_if<__is_integer::__value, double>::__type' (aka 'double') to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 791, + "startColumn": 21, + "charOffset": 24892, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 789, + "startColumn": 21, + "charOffset": 24822, + "charLength": 3, + "snippet": { + "text": "\tfloat attackFactor = player->getAttackFactor();\n\n\tint32_t minValue = std::round(player->getLevel() / 5);\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue) / 2;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5bd3da8ed2b09007253913257b4367d8f38d7e44feb2680a537df6b4ce26719f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 791, + "startColumn": 21, + "charOffset": 24892, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 789, + "startColumn": 21, + "charOffset": 24822, + "charLength": 3, + "snippet": { + "text": "\tfloat attackFactor = player->getAttackFactor();\n\n\tint32_t minValue = std::round(player->getLevel() / 5);\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue) / 2;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0a99fa6915ab72809309f3516f690ec42eb1f2e0e2df8bebfb6aec827dad6c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 791, + "startColumn": 53, + "charOffset": 24924, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 789, + "startColumn": 53, + "charOffset": 24822, + "charLength": 1, + "snippet": { + "text": "\tfloat attackFactor = player->getAttackFactor();\n\n\tint32_t minValue = std::round(player->getLevel() / 5);\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue) / 2;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08014aaf9e3df0219638de85b8df3d5f6fd200e34dad25e9127804e78b536993" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 792, + "startColumn": 21, + "charOffset": 24948, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 790, + "startColumn": 21, + "charOffset": 24871, + "charLength": 3, + "snippet": { + "text": "\n\tint32_t minValue = std::round(player->getLevel() / 5);\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue) / 2;\n\n\tif (target) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36709b557980764a6a58a0fcff69fea70ffa7a9d6bbb175ec83195f199464fc6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 792, + "startColumn": 21, + "charOffset": 24948, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 790, + "startColumn": 21, + "charOffset": 24871, + "charLength": 3, + "snippet": { + "text": "\n\tint32_t minValue = std::round(player->getLevel() / 5);\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue) / 2;\n\n\tif (target) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b23ecffe82eeb082000e548567057512c0374e8e62cf4e71eb72dd26844e79d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 792, + "startColumn": 33, + "charOffset": 24960, + "charLength": 5, + "snippet": { + "text": "0.09f" + } + }, + "contextRegion": { + "startLine": 790, + "startColumn": 33, + "charOffset": 24871, + "charLength": 5, + "snippet": { + "text": "\n\tint32_t minValue = std::round(player->getLevel() / 5);\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue) / 2;\n\n\tif (target) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28938eb186933096a959c1a3b8f5f3550d02c3e13a7dc76ec00a573b6753d6c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 792, + "startColumn": 33, + "charOffset": 24960, + "charLength": 5, + "snippet": { + "text": "0.09f" + } + }, + "contextRegion": { + "startLine": 790, + "startColumn": 33, + "charOffset": 24871, + "charLength": 5, + "snippet": { + "text": "\n\tint32_t minValue = std::round(player->getLevel() / 5);\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue) / 2;\n\n\tif (target) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64e6bae0a22646b919e31a67bf53a1236254006ca14ee8c35f0ce2916e772bf3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.09f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 792, + "startColumn": 33, + "charOffset": 24960, + "charLength": 5, + "snippet": { + "text": "0.09f" + } + }, + "contextRegion": { + "startLine": 790, + "startColumn": 33, + "charOffset": 24871, + "charLength": 5, + "snippet": { + "text": "\n\tint32_t minValue = std::round(player->getLevel() / 5);\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue) / 2;\n\n\tif (target) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3be9f2dc0df22829177c53a3e9c69ee5880e69ff2760b51cafae5c3b44a136a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 792, + "startColumn": 57, + "charOffset": 24984, + "charLength": 11, + "snippet": { + "text": "attackSkill" + } + }, + "contextRegion": { + "startLine": 790, + "startColumn": 57, + "charOffset": 24871, + "charLength": 11, + "snippet": { + "text": "\n\tint32_t minValue = std::round(player->getLevel() / 5);\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue) / 2;\n\n\tif (target) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e5868c45c2319ddbb579ea3e37e446cec3aa35c556e37f098054ff63609315d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 792, + "startColumn": 71, + "charOffset": 24998, + "charLength": 11, + "snippet": { + "text": "attackValue" + } + }, + "contextRegion": { + "startLine": 790, + "startColumn": 71, + "charOffset": 24871, + "charLength": 11, + "snippet": { + "text": "\n\tint32_t minValue = std::round(player->getLevel() / 5);\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue) / 2;\n\n\tif (target) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82058b38317e33d33891d06a10fd30846c2730668901466d0a857c6f4c205dc7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 792, + "startColumn": 85, + "charOffset": 25012, + "charLength": 8, + "snippet": { + "text": "minValue" + } + }, + "contextRegion": { + "startLine": 790, + "startColumn": 85, + "charOffset": 24871, + "charLength": 8, + "snippet": { + "text": "\n\tint32_t minValue = std::round(player->getLevel() / 5);\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue) / 2;\n\n\tif (target) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2d72646a45e485562e7605e05bc193ba6559e341eebbd8d0066f31e35f45286" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 802, + "startColumn": 55, + "charOffset": 25181, + "charLength": 8, + "snippet": { + "text": "maxValue" + } + }, + "contextRegion": { + "startLine": 800, + "startColumn": 55, + "charOffset": 25123, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\treturn -normal_random(minValue, static_cast(maxValue * player->getVocation()->distDamageMultiplier));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0f0737c5e29cbb71e9a777ed6a5a6f62c273aa1f781c768ae8fbd273d8090e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 802, + "startColumn": 55, + "charOffset": 25181, + "charLength": 8, + "snippet": { + "text": "maxValue" + } + }, + "contextRegion": { + "startLine": 800, + "startColumn": 55, + "charOffset": 25123, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\treturn -normal_random(minValue, static_cast(maxValue * player->getVocation()->distDamageMultiplier));\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17bed028bb6f38b05eb6c02966e8359c6cffb715ada9975c6be74d69dd518c81" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 806, + "startColumn": 9, + "charOffset": 25306, + "charLength": 13, + "snippet": { + "text": "elementDamage" + } + }, + "contextRegion": { + "startLine": 804, + "startColumn": 9, + "charOffset": 25241, + "charLength": 13, + "snippet": { + "text": "\nint16_t WeaponDistance::getElementDamageValue() const {\n\treturn elementDamage;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cfe4068676da9a90a2791cf263c59395f9898709d037e6847bc843bec1fd683e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 809, + "startColumn": 25, + "charOffset": 25348, + "charLength": 15, + "snippet": { + "text": "getWeaponDamage" + } + }, + "contextRegion": { + "startLine": 807, + "startColumn": 25, + "charOffset": 25321, + "charLength": 15, + "snippet": { + "text": "}\n\nint32_t WeaponDistance::getWeaponDamage(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, bool maxDamage /*= false*/) const {\n\tint32_t attackValue = item->getAttack();\n\tbool hasElement = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26a0dde9c07ca0fe89807226c6f765fe7c696b970b56f3a92e14e5ec9926db47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 829, + "startColumn": 21, + "charOffset": 26049, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 827, + "startColumn": 21, + "charOffset": 25979, + "charLength": 6, + "snippet": { + "text": "\tfloat attackFactor = player->getAttackFactor();\n\n\tint32_t minValue = player->getLevel() / 5;\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue);\n\tif (maxDamage) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1847d2df2a3b5b1c241c9ad89fde26cb1ac0efedd2803ab2567da779cde3f948" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 829, + "startColumn": 42, + "charOffset": 26070, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 827, + "startColumn": 42, + "charOffset": 25979, + "charLength": 1, + "snippet": { + "text": "\tfloat attackFactor = player->getAttackFactor();\n\n\tint32_t minValue = player->getLevel() / 5;\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue);\n\tif (maxDamage) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db3c8817bdf22346dc0cab33781a44b19d6cd8d9c7aa6af6a3213f322e0ab2e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 830, + "startColumn": 21, + "charOffset": 26093, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 828, + "startColumn": 21, + "charOffset": 26028, + "charLength": 3, + "snippet": { + "text": "\n\tint32_t minValue = player->getLevel() / 5;\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue);\n\tif (maxDamage) {\n\t\treturn -maxValue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac0471b28082620b676a753cde0b6ef22f936d72d3c167aea4bd5adbc47f0b21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 830, + "startColumn": 21, + "charOffset": 26093, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 828, + "startColumn": 21, + "charOffset": 26028, + "charLength": 3, + "snippet": { + "text": "\n\tint32_t minValue = player->getLevel() / 5;\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue);\n\tif (maxDamage) {\n\t\treturn -maxValue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2bec9d0fe20c890ee127e1c52807fde92b5291d397a080593de4dc4b3c9fb4b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 830, + "startColumn": 33, + "charOffset": 26105, + "charLength": 5, + "snippet": { + "text": "0.09f" + } + }, + "contextRegion": { + "startLine": 828, + "startColumn": 33, + "charOffset": 26028, + "charLength": 5, + "snippet": { + "text": "\n\tint32_t minValue = player->getLevel() / 5;\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue);\n\tif (maxDamage) {\n\t\treturn -maxValue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9043b9a833504f0cff8bf1a4e59aeb65c63b7dee1252017ba02fe13c3fffe318" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 830, + "startColumn": 33, + "charOffset": 26105, + "charLength": 5, + "snippet": { + "text": "0.09f" + } + }, + "contextRegion": { + "startLine": 828, + "startColumn": 33, + "charOffset": 26028, + "charLength": 5, + "snippet": { + "text": "\n\tint32_t minValue = player->getLevel() / 5;\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue);\n\tif (maxDamage) {\n\t\treturn -maxValue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d24eb9e9c16e38e47e66b7b9f01f58d6b2fb37eddbf8fdcfd9b0d5dbd8b7c6e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.09f is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 830, + "startColumn": 33, + "charOffset": 26105, + "charLength": 5, + "snippet": { + "text": "0.09f" + } + }, + "contextRegion": { + "startLine": 828, + "startColumn": 33, + "charOffset": 26028, + "charLength": 5, + "snippet": { + "text": "\n\tint32_t minValue = player->getLevel() / 5;\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue);\n\tif (maxDamage) {\n\t\treturn -maxValue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff738449c18e0eaaa10e37be96ad083fd4a77b093bb64023a6c246117698d034" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 830, + "startColumn": 57, + "charOffset": 26129, + "charLength": 11, + "snippet": { + "text": "attackSkill" + } + }, + "contextRegion": { + "startLine": 828, + "startColumn": 57, + "charOffset": 26028, + "charLength": 11, + "snippet": { + "text": "\n\tint32_t minValue = player->getLevel() / 5;\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue);\n\tif (maxDamage) {\n\t\treturn -maxValue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "480c3650cf2106c3d849119006e5f451a3bd80ca0850b183ed55d7f4261592ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 830, + "startColumn": 71, + "charOffset": 26143, + "charLength": 11, + "snippet": { + "text": "attackValue" + } + }, + "contextRegion": { + "startLine": 828, + "startColumn": 71, + "charOffset": 26028, + "charLength": 11, + "snippet": { + "text": "\n\tint32_t minValue = player->getLevel() / 5;\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue);\n\tif (maxDamage) {\n\t\treturn -maxValue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b86b5926333521b1aa287b997e1b8a607b77f8f8fb5c4efdfa5108e72bf256ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 830, + "startColumn": 85, + "charOffset": 26157, + "charLength": 8, + "snippet": { + "text": "minValue" + } + }, + "contextRegion": { + "startLine": 828, + "startColumn": 85, + "charOffset": 26028, + "charLength": 8, + "snippet": { + "text": "\n\tint32_t minValue = player->getLevel() / 5;\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue);\n\tif (maxDamage) {\n\t\treturn -maxValue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e60d4b04c4491d5719c73ca20b2c1c729d479863bf24679aae96e997757ba28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 851, + "startColumn": 88, + "charOffset": 26587, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 849, + "startColumn": 88, + "charOffset": 26497, + "charLength": 1, + "snippet": { + "text": "}\n\nbool WeaponDistance::getSkillType(std::shared_ptr player, std::shared_ptr, skills_t &skill, uint32_t &skillpoint) const {\n\tskill = SKILL_DISTANCE;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43e48f2c15d36d884132f82741890cde048c934b410762c4597bd511ccc957bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 862, + "startColumn": 4, + "charOffset": 26829, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 860, + "startColumn": 4, + "charOffset": 26802, + "charLength": 4, + "snippet": { + "text": "\n\t\t\tcase BLOCK_DEFENSE:\n\t\t\tcase BLOCK_ARMOR: {\n\t\t\t\tskillpoint = 1;\n\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3c46e0ccc89d8ac6f857d971bd20636be488533427df61e2211f1b15975b707" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-5", + "ruleIndex": 438, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-5: A cast shall not remove any const or volatile qualification from the type of a pointer or reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 879, + "startColumn": 2, + "charOffset": 27076, + "charLength": 10, + "snippet": { + "text": "const_cast" + } + }, + "contextRegion": { + "startLine": 877, + "startColumn": 2, + "charOffset": 26981, + "charLength": 10, + "snippet": { + "text": "void WeaponWand::configureWeapon(const ItemType &it) {\n\tparams.distanceEffect = it.shootType;\n\tconst_cast(it).combatType = params.combatType;\n\tconst_cast(it).maxHitChance = (minChange + maxChange) / 2;\n\tWeapon::configureWeapon(it);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "18c064e1fc4f0ac624f8689a4cd894163abcfa24248eca84fb73e625e38fd85f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-const-cast", + "ruleIndex": 508, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use const_cast to remove const qualifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 879, + "startColumn": 2, + "charOffset": 27076, + "charLength": 10, + "snippet": { + "text": "const_cast" + } + }, + "contextRegion": { + "startLine": 877, + "startColumn": 2, + "charOffset": 26981, + "charLength": 10, + "snippet": { + "text": "void WeaponWand::configureWeapon(const ItemType &it) {\n\tparams.distanceEffect = it.shootType;\n\tconst_cast(it).combatType = params.combatType;\n\tconst_cast(it).maxHitChance = (minChange + maxChange) / 2;\n\tWeapon::configureWeapon(it);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "654b110bfe7c95fb797330359f5b5dd27d14e89c687e1f01dc17bccce700d8d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-5", + "ruleIndex": 438, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-5: A cast shall not remove any const or volatile qualification from the type of a pointer or reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 880, + "startColumn": 2, + "charOffset": 27136, + "charLength": 10, + "snippet": { + "text": "const_cast" + } + }, + "contextRegion": { + "startLine": 878, + "startColumn": 2, + "charOffset": 27036, + "charLength": 10, + "snippet": { + "text": "\tparams.distanceEffect = it.shootType;\n\tconst_cast(it).combatType = params.combatType;\n\tconst_cast(it).maxHitChance = (minChange + maxChange) / 2;\n\tWeapon::configureWeapon(it);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72d70ffcc2fdd24d8bcf4824b62983c2181c313862733b1e77228f60e97271cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-type-const-cast", + "ruleIndex": 508, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use const_cast to remove const qualifier" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 880, + "startColumn": 2, + "charOffset": 27136, + "charLength": 10, + "snippet": { + "text": "const_cast" + } + }, + "contextRegion": { + "startLine": 878, + "startColumn": 2, + "charOffset": 27036, + "charLength": 10, + "snippet": { + "text": "\tparams.distanceEffect = it.shootType;\n\tconst_cast(it).combatType = params.combatType;\n\tconst_cast(it).maxHitChance = (minChange + maxChange) / 2;\n\tWeapon::configureWeapon(it);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e84fc16992aaf399b7e25a8ede36f697fad3ca6b5dabaa70ce53ee6b788d0490" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 884, + "startColumn": 21, + "charOffset": 27260, + "charLength": 15, + "snippet": { + "text": "getWeaponDamage" + } + }, + "contextRegion": { + "startLine": 882, + "startColumn": 21, + "charOffset": 27237, + "charLength": 15, + "snippet": { + "text": "}\n\nint32_t WeaponWand::getWeaponDamage(std::shared_ptr player, std::shared_ptr, std::shared_ptr, bool maxDamage /* = false*/) const {\n\tif (!g_configManager().getBoolean(TOGGLE_CHAIN_SYSTEM, __FUNCTION__)) {\n\t\t// Returns maximum damage or a random value between minChange and maxChange" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d04a50cb5f9701ef8391b26d3786eae012433c812f91fb16bf4611f4452cb160" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 884, + "startColumn": 94, + "charOffset": 27333, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 882, + "startColumn": 94, + "charOffset": 27237, + "charLength": 1, + "snippet": { + "text": "}\n\nint32_t WeaponWand::getWeaponDamage(std::shared_ptr player, std::shared_ptr, std::shared_ptr, bool maxDamage /* = false*/) const {\n\tif (!g_configManager().getBoolean(TOGGLE_CHAIN_SYSTEM, __FUNCTION__)) {\n\t\t// Returns maximum damage or a random value between minChange and maxChange" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1fe40900d518367c979d59bb94a3aca234afca22759e015f61c3bcf411a81d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 893, + "startColumn": 23, + "charOffset": 27758, + "charLength": 3, + "snippet": { + "text": "0.0" + } + }, + "contextRegion": { + "startLine": 891, + "startColumn": 23, + "charOffset": 27684, + "charLength": 3, + "snippet": { + "text": "\tint32_t attackSkill = 0;\n\tint32_t attackValue = 0;\n\tfloat attackFactor = 0.0;\n\t[[maybe_unused]] int16_t elementAttack = 0;\n\t[[maybe_unused]] CombatDamage combatDamage;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eae90d661536fc629c61f4d0aad220ffd1ad0427440d55933d054b00f0caae5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 896, + "startColumn": 2, + "charOffset": 27854, + "charLength": 21, + "snippet": { + "text": "calculateSkillFormula" + } + }, + "contextRegion": { + "startLine": 894, + "startColumn": 2, + "charOffset": 27763, + "charLength": 21, + "snippet": { + "text": "\t[[maybe_unused]] int16_t elementAttack = 0;\n\t[[maybe_unused]] CombatDamage combatDamage;\n\tcalculateSkillFormula(player, attackSkill, attackValue, attackFactor, elementAttack, combatDamage);\n\n\tauto magLevel = player->getMagicLevel();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f3885e355e74e7549a7d78119bd0ad908ec8999b50c72ba7ea51b36157109af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 902, + "startColumn": 35, + "charOffset": 28133, + "charLength": 5, + "snippet": { + "text": "level" + } + }, + "contextRegion": { + "startLine": 900, + "startColumn": 35, + "charOffset": 28031, + "charLength": 5, + "snippet": { + "text": "\n\t// Check if level is greater than zero before performing division\n\tauto levelDivision = level > 0 ? level / 5.0 : 0.0;\n\n\tauto totalAttackValue = magLevel + attackValue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "496dfd306d4ab0cbd1a325595056e80f5f299fbf7963cf1d965cc6620d26e776" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5.0 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 902, + "startColumn": 43, + "charOffset": 28141, + "charLength": 3, + "snippet": { + "text": "5.0" + } + }, + "contextRegion": { + "startLine": 900, + "startColumn": 43, + "charOffset": 28031, + "charLength": 3, + "snippet": { + "text": "\n\t// Check if level is greater than zero before performing division\n\tauto levelDivision = level > 0 ? level / 5.0 : 0.0;\n\n\tauto totalAttackValue = magLevel + attackValue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0051d15e4fa2e28bdbbe4ffb4a68826266c5b899e274737860976829ae07cbfb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 907, + "startColumn": 51, + "charOffset": 28323, + "charLength": 16, + "snippet": { + "text": "totalAttackValue" + } + }, + "contextRegion": { + "startLine": 905, + "startColumn": 51, + "charOffset": 28202, + "charLength": 16, + "snippet": { + "text": "\n\t// Check if magLevel is greater than zero before performing division\n\tauto magicLevelDivision = totalAttackValue > 0 ? totalAttackValue / 3.0 : 0.0;\n\n\tdouble min = levelDivision + magicLevelDivision;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef396bcdb97ff417f6ed88300e7dfe48a7ab4ebaa4279e7e7504d31ba17d6b6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "3.0 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 907, + "startColumn": 70, + "charOffset": 28342, + "charLength": 3, + "snippet": { + "text": "3.0" + } + }, + "contextRegion": { + "startLine": 905, + "startColumn": 70, + "charOffset": 28202, + "charLength": 3, + "snippet": { + "text": "\n\t// Check if magLevel is greater than zero before performing division\n\tauto magicLevelDivision = totalAttackValue > 0 ? totalAttackValue / 3.0 : 0.0;\n\n\tdouble min = levelDivision + magicLevelDivision;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0354ad751062ae9be62f7b6d5a174e87257a7cf031e37f3e821216d4ade5bb58" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 910, + "startColumn": 31, + "charOffset": 28434, + "charLength": 16, + "snippet": { + "text": "totalAttackValue" + } + }, + "contextRegion": { + "startLine": 908, + "startColumn": 31, + "charOffset": 28353, + "charLength": 16, + "snippet": { + "text": "\n\tdouble min = levelDivision + magicLevelDivision;\n\tdouble max = levelDivision + totalAttackValue;\n\n\t// Returns the calculated maximum damage or a random value between the calculated minimum and maximum" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e19a0d73a76cd01a17edce228913da9f138d7f94399d2585dafe920029854c0c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 913, + "startColumn": 9, + "charOffset": 28564, + "charLength": 9, + "snippet": { + "text": "maxDamage" + } + }, + "contextRegion": { + "startLine": 911, + "startColumn": 9, + "charOffset": 28452, + "charLength": 9, + "snippet": { + "text": "\n\t// Returns the calculated maximum damage or a random value between the calculated minimum and maximum\n\treturn maxDamage ? -max : -normal_random(min, max);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6bf4225902d2548673a3ebe25d73e8b921280a63e8fc8bfc0daa0bf2c5b1d20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 913, + "startColumn": 21, + "charOffset": 28576, + "charLength": 1, + "snippet": { + "text": "-" + } + }, + "contextRegion": { + "startLine": 911, + "startColumn": 21, + "charOffset": 28452, + "charLength": 1, + "snippet": { + "text": "\n\t// Returns the calculated maximum damage or a random value between the calculated minimum and maximum\n\treturn maxDamage ? -max : -normal_random(min, max);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd18d68f2f6a5c6c2890f588e1cded09264a3f29f8d08fa517234896596fdaef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 913, + "startColumn": 28, + "charOffset": 28583, + "charLength": 1, + "snippet": { + "text": "-" + } + }, + "contextRegion": { + "startLine": 911, + "startColumn": 28, + "charOffset": 28452, + "charLength": 1, + "snippet": { + "text": "\n\t// Returns the calculated maximum damage or a random value between the calculated minimum and maximum\n\treturn maxDamage ? -max : -normal_random(min, max);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4073f5af27c53779ad483f902a6b3b3b940cb09e0016e23160b1cceab7574106" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 913, + "startColumn": 43, + "charOffset": 28598, + "charLength": 3, + "snippet": { + "text": "min" + } + }, + "contextRegion": { + "startLine": 911, + "startColumn": 43, + "charOffset": 28452, + "charLength": 3, + "snippet": { + "text": "\n\t// Returns the calculated maximum damage or a random value between the calculated minimum and maximum\n\treturn maxDamage ? -max : -normal_random(min, max);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36251f9180d877b3b4c91d90fae49abd25bc10b3b850e47d3e8eaffb96f01c79" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/items/weapons/weapons.cpp" + }, + "region": { + "startLine": 913, + "startColumn": 48, + "charOffset": 28603, + "charLength": 3, + "snippet": { + "text": "max" + } + }, + "contextRegion": { + "startLine": 911, + "startColumn": 48, + "charOffset": 28452, + "charLength": 3, + "snippet": { + "text": "\n\t// Returns the calculated maximum damage or a random value between the calculated minimum and maximum\n\treturn maxDamage ? -max : -normal_random(min, max);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a4ff4b0fc7cb3c8b41683060524ea15020ef2f086e97477a172619064101048" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 24, + "startColumn": 3, + "charOffset": 669, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 22, + "startColumn": 3, + "charOffset": 583, + "charLength": 4, + "snippet": { + "text": "bool Condition::setParam(ConditionParam_t param, int32_t value) {\n\tswitch (param) {\n\t\tcase CONDITION_PARAM_TICKS: {\n\t\t\tticks = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3eb5ccca1843b092c7405128df6585da4a238b929c7fa6ad4ab432f76ca5e644" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 29, + "startColumn": 3, + "charOffset": 740, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 27, + "startColumn": 3, + "charOffset": 733, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_DRAIN_BODY: {\n\t\t\tdrainBodyStage = std::min(static_cast(value), std::numeric_limits::max());\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e1f8951cdf7faa0626544338b268cb82d8896597fd127f56e16f631f2860f26" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 3, + "charOffset": 894, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 3, + "charOffset": 887, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_BUFF_SPELL: {\n\t\t\tisBuff = (value != 0);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8255026a894656ed262fdb5357393aa766b0638151cdbd4ca0a8cf662585a5d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 39, + "startColumn": 3, + "charOffset": 978, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 37, + "startColumn": 3, + "charOffset": 971, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_SUBID: {\n\t\t\tsubId = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00540ea7a846b95b256be7ae3b0aa586eb2fa46afb6f56fa17ce118df43924fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 44, + "startColumn": 3, + "charOffset": 1049, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 42, + "startColumn": 3, + "charOffset": 1042, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_SOUND_TICK: {\n\t\t\ttickSound = static_cast(value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea9cf0f7b357d72b500a79b7cb097b7fb4f3a83d3c3e5d8607f2989ebfdf09c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 49, + "startColumn": 3, + "charOffset": 1157, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 47, + "startColumn": 3, + "charOffset": 1150, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_SOUND_ADD: {\n\t\t\taddSound = static_cast(value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d725f1abfc59879a22a6ce9d61369fb7be88c0082a935f5394a267658d1691e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 54, + "startColumn": 3, + "charOffset": 1263, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 52, + "startColumn": 3, + "charOffset": 1256, + "charLength": 7, + "snippet": { + "text": "\t\t}\n\n\t\tdefault: {\n\t\t\treturn false;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3124a1a73594311d12cd7abeb133d23a0d6f80ba6223e8a80eeef3c2674bff63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-unused-parameters", + "ruleIndex": 612, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'param' is unused" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 60, + "startColumn": 51, + "charOffset": 1351, + "charLength": 5, + "snippet": { + "text": "param" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 51, + "charOffset": 1298, + "charLength": 5, + "snippet": { + "text": "}\n\nbool Condition::setPositionParam(ConditionParam_t param, const Position &pos) {\n\treturn false;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9009237ab3562201d6d0d864b028f9305c968f03171cc9c82a638535ea58dfae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-unused-parameters", + "ruleIndex": 612, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'pos' is unused" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 60, + "startColumn": 74, + "charOffset": 1374, + "charLength": 3, + "snippet": { + "text": "pos" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 74, + "charOffset": 1298, + "charLength": 3, + "snippet": { + "text": "}\n\nbool Condition::setPositionParam(ConditionParam_t param, const Position &pos) {\n\treturn false;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9642d5dbeb4efc6ab0c80b65a30657ff853860b6d8a8d7ba4fcdf64f372f25a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'attr_type' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 65, + "startColumn": 10, + "charOffset": 1462, + "charLength": 9, + "snippet": { + "text": "attr_type" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 10, + "charOffset": 1398, + "charLength": 9, + "snippet": { + "text": "\nbool Condition::unserialize(PropStream &propStream) {\n\tuint8_t attr_type;\n\twhile (propStream.read(attr_type) && attr_type != CONDITIONATTR_END) {\n\t\tif (!unserializeProp(static_cast(attr_type), propStream)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c3d509b58951a25b342fe935ad858041d722263911395e591b894979ff9066f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 66, + "startColumn": 2, + "charOffset": 1474, + "charLength": 5, + "snippet": { + "text": "while" + } + }, + "contextRegion": { + "startLine": 64, + "startColumn": 2, + "charOffset": 1399, + "charLength": 5, + "snippet": { + "text": "bool Condition::unserialize(PropStream &propStream) {\n\tuint8_t attr_type;\n\twhile (propStream.read(attr_type) && attr_type != CONDITIONATTR_END) {\n\t\tif (!unserializeProp(static_cast(attr_type), propStream)) {\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6738bd1ec920ec6fbd2d19a88cbe96979e4575f67f40143ced0b620d22caa48" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 3, + "charOffset": 1773, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 3, + "charOffset": 1674, + "charLength": 4, + "snippet": { + "text": "bool Condition::unserializeProp(ConditionAttr_t attr, PropStream &propStream) {\n\tswitch (attr) {\n\t\tcase CONDITIONATTR_TYPE: {\n\t\t\tint32_t value;\n\t\t\tif (!propStream.read(value)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "598f30411c70dbabbe19bdfe3bf4732355e544b401191360d47f771efe8e4707" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'value' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 77, + "startColumn": 12, + "charOffset": 1811, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 75, + "startColumn": 12, + "charOffset": 1754, + "charLength": 5, + "snippet": { + "text": "\tswitch (attr) {\n\t\tcase CONDITIONATTR_TYPE: {\n\t\t\tint32_t value;\n\t\t\tif (!propStream.read(value)) {\n\t\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4cbaa7ddb6da9eff949a4b984310386b6ead7fe9dc80b6f3b0e3005df29fc92" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 86, + "startColumn": 3, + "charOffset": 1964, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 3, + "charOffset": 1957, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITIONATTR_ID: {\n\t\t\tint32_t value;\n\t\t\tif (!propStream.read(value)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "843ed7527bce42f8e735da8e3e409d99034224a4795784a758ca2775fa7decba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'value' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 12, + "charOffset": 2000, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 12, + "charOffset": 1961, + "charLength": 5, + "snippet": { + "text": "\n\t\tcase CONDITIONATTR_ID: {\n\t\t\tint32_t value;\n\t\t\tif (!propStream.read(value)) {\n\t\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "440d56977fbf5e30ef4dd9292ef3fe8e77b5b50ab5771d3474c8382d517809bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 96, + "startColumn": 3, + "charOffset": 2140, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 3, + "charOffset": 2133, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITIONATTR_TICKS: {\n\t\t\treturn propStream.read(ticks);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3dcf83a6d4c677eb22871096e32c68aaca73e64aed9951c4b3e9a4499b335761" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 100, + "startColumn": 3, + "charOffset": 2218, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 98, + "startColumn": 3, + "charOffset": 2211, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITIONATTR_ISBUFF: {\n\t\t\tuint8_t value;\n\t\t\tif (!propStream.read(value)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "239f736556fee89b4386662a0ac93b0696993ef246dbf4cd3a4b1dfd469ac9c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'value' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 101, + "startColumn": 12, + "charOffset": 2258, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 99, + "startColumn": 12, + "charOffset": 2215, + "charLength": 5, + "snippet": { + "text": "\n\t\tcase CONDITIONATTR_ISBUFF: {\n\t\t\tuint8_t value;\n\t\t\tif (!propStream.read(value)) {\n\t\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d1f46433b16ffeb22bef0b362a18dd595d6d31d96c5a4f17861d69f7cc4f20a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 110, + "startColumn": 3, + "charOffset": 2381, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 108, + "startColumn": 3, + "charOffset": 2374, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITIONATTR_SUBID: {\n\t\t\treturn propStream.read(subId);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "518b8195aba464b96b6ef835154b6a038f26caa7201ca5af15dc785a73e8c425" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 114, + "startColumn": 3, + "charOffset": 2460, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 112, + "startColumn": 3, + "charOffset": 2453, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITIONATTR_TICKSOUND: {\n\t\t\tuint16_t value;\n\t\t\tif (!propStream.read(value)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ebf7a555fa07d1b1561bb492cdfbbd9b2c1c269f9e3964be7e7d9057d8b61d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'value' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 115, + "startColumn": 13, + "charOffset": 2504, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 113, + "startColumn": 13, + "charOffset": 2457, + "charLength": 5, + "snippet": { + "text": "\n\t\tcase CONDITIONATTR_TICKSOUND: {\n\t\t\tuint16_t value;\n\t\t\tif (!propStream.read(value)) {\n\t\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9130b12bfa2daf7debc09ecd0018585d02c0c132213ae772ab0d78c494a97c49" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 124, + "startColumn": 3, + "charOffset": 2652, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 122, + "startColumn": 3, + "charOffset": 2645, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITIONATTR_ADDSOUND: {\n\t\t\tuint16_t value;\n\t\t\tif (!propStream.read(value)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3dcf83a6d4c677eb22871096e32c68aaca73e64aed9951c4b3e9a4499b335761" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'value' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 125, + "startColumn": 13, + "charOffset": 2695, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 123, + "startColumn": 13, + "charOffset": 2649, + "charLength": 5, + "snippet": { + "text": "\n\t\tcase CONDITIONATTR_ADDSOUND: {\n\t\t\tuint16_t value;\n\t\t\tif (!propStream.read(value)) {\n\t\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "745ba69c9abcb442cb23a0c1c0ab5e18ff4f860c954f38f02b39ead00849395d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 3, + "charOffset": 2842, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 3, + "charOffset": 2835, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITIONATTR_PERSISTENT: {\n\t\t\tbool value = false;\n\t\t\tif (!propStream.read(value)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93e3d5cdd6a7cf1faca96cd802ecdc33e7fc2ea7d47fe9c47efd46db8c71042d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 144, + "startColumn": 3, + "charOffset": 3012, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 142, + "startColumn": 3, + "charOffset": 3005, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITIONATTR_END:\n\t\t\treturn true;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f0012dc22e367b0d8eca6c6fc542433b97f3caede217ab8a4fd17d2384b9233" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 147, + "startColumn": 3, + "charOffset": 3055, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 145, + "startColumn": 3, + "charOffset": 3036, + "charLength": 7, + "snippet": { + "text": "\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3124a1a73594311d12cd7abeb133d23a0d6f80ba6223e8a80eeef3c2674bff63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 153, + "startColumn": 33, + "charOffset": 3181, + "charLength": 18, + "snippet": { + "text": "CONDITIONATTR_TYPE" + } + }, + "contextRegion": { + "startLine": 151, + "startColumn": 33, + "charOffset": 3086, + "charLength": 18, + "snippet": { + "text": "\nvoid Condition::serialize(PropWriteStream &propWriteStream) {\n\tpropWriteStream.write(CONDITIONATTR_TYPE);\n\tpropWriteStream.write(conditionType);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ff4fed0db24e59a074743fb1da803a8a3725a7070a364bcf7238d78dac3816e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 156, + "startColumn": 33, + "charOffset": 3282, + "charLength": 16, + "snippet": { + "text": "CONDITIONATTR_ID" + } + }, + "contextRegion": { + "startLine": 154, + "startColumn": 33, + "charOffset": 3202, + "charLength": 16, + "snippet": { + "text": "\tpropWriteStream.write(conditionType);\n\n\tpropWriteStream.write(CONDITIONATTR_ID);\n\tpropWriteStream.write(id);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e697191735ebf926e4a5dd5be30669e059cc5cfd2e9c4cb5fa0741588613bc2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 159, + "startColumn": 33, + "charOffset": 3372, + "charLength": 19, + "snippet": { + "text": "CONDITIONATTR_TICKS" + } + }, + "contextRegion": { + "startLine": 157, + "startColumn": 33, + "charOffset": 3301, + "charLength": 19, + "snippet": { + "text": "\tpropWriteStream.write(id);\n\n\tpropWriteStream.write(CONDITIONATTR_TICKS);\n\tpropWriteStream.write(ticks);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2af0694611d9e32d781220130bf82109e9868ea49a4de10773abb98aa75e5cb1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 162, + "startColumn": 33, + "charOffset": 3468, + "charLength": 20, + "snippet": { + "text": "CONDITIONATTR_ISBUFF" + } + }, + "contextRegion": { + "startLine": 160, + "startColumn": 33, + "charOffset": 3394, + "charLength": 20, + "snippet": { + "text": "\tpropWriteStream.write(ticks);\n\n\tpropWriteStream.write(CONDITIONATTR_ISBUFF);\n\tpropWriteStream.write(isBuff);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ca926696272505543e20cff4358cf87c82068b9619bad8a01cdbd08cb8babf8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'unsigned char'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 163, + "startColumn": 33, + "charOffset": 3523, + "charLength": 6, + "snippet": { + "text": "isBuff" + } + }, + "contextRegion": { + "startLine": 161, + "startColumn": 33, + "charOffset": 3435, + "charLength": 6, + "snippet": { + "text": "\n\tpropWriteStream.write(CONDITIONATTR_ISBUFF);\n\tpropWriteStream.write(isBuff);\n\n\tpropWriteStream.write(CONDITIONATTR_SUBID);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c872baae6cd55b3da29d9c29f16d77c283f987c5b7090a4108a6d36ebd5d10ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 165, + "startColumn": 33, + "charOffset": 3565, + "charLength": 19, + "snippet": { + "text": "CONDITIONATTR_SUBID" + } + }, + "contextRegion": { + "startLine": 163, + "startColumn": 33, + "charOffset": 3491, + "charLength": 19, + "snippet": { + "text": "\tpropWriteStream.write(isBuff);\n\n\tpropWriteStream.write(CONDITIONATTR_SUBID);\n\tpropWriteStream.write(subId);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef889e3691a712464dc511ecb6e562bea124eb7698ab33ba317aa010f88b83cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 168, + "startColumn": 33, + "charOffset": 3661, + "charLength": 23, + "snippet": { + "text": "CONDITIONATTR_TICKSOUND" + } + }, + "contextRegion": { + "startLine": 166, + "startColumn": 33, + "charOffset": 3587, + "charLength": 23, + "snippet": { + "text": "\tpropWriteStream.write(subId);\n\n\tpropWriteStream.write(CONDITIONATTR_TICKSOUND);\n\tpropWriteStream.write(static_cast(tickSound));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb4f2d066024a563b903dd23ca47e8f55e993355fad261f45fd96aaf12c148de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 171, + "startColumn": 33, + "charOffset": 3788, + "charLength": 22, + "snippet": { + "text": "CONDITIONATTR_ADDSOUND" + } + }, + "contextRegion": { + "startLine": 169, + "startColumn": 33, + "charOffset": 3687, + "charLength": 22, + "snippet": { + "text": "\tpropWriteStream.write(static_cast(tickSound));\n\n\tpropWriteStream.write(CONDITIONATTR_ADDSOUND);\n\tpropWriteStream.write(static_cast(addSound));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8feda263e9db3bd55203213c5c11cdddae408201aa7e83bd1a50d4c628ed2224" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 174, + "startColumn": 33, + "charOffset": 3913, + "charLength": 24, + "snippet": { + "text": "CONDITIONATTR_PERSISTENT" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 33, + "charOffset": 3813, + "charLength": 24, + "snippet": { + "text": "\tpropWriteStream.write(static_cast(addSound));\n\n\tpropWriteStream.write(CONDITIONATTR_PERSISTENT);\n\tpropWriteStream.write(m_isPersistent);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2fe29f062bbe97c64123f8985dd589180cc94e5b2a33157a23343df346bf56d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 183, + "startColumn": 60, + "charOffset": 4148, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 181, + "startColumn": 60, + "charOffset": 4086, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Condition::executeCondition(std::shared_ptr creature, int32_t interval) {\n\tif (ticks == -1) {\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9d3bb68a226b7331e15c4ef475fbfa64e59f79fa7587bef2efff41ac11df4f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 204, + "startColumn": 3, + "charOffset": 4797, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 202, + "startColumn": 3, + "charOffset": 4753, + "charLength": 4, + "snippet": { + "text": "\tswitch (type) {\n\t\tcase CONDITION_POISON:\n\t\tcase CONDITION_FIRE:\n\t\tcase CONDITION_ENERGY:\n\t\tcase CONDITION_DROWN:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71e91a6f5c9d737c770c20970b16d0847fdd2e81e9538a2aecc09a47088b9e8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 205, + "startColumn": 3, + "charOffset": 4820, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 203, + "startColumn": 3, + "charOffset": 4770, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONDITION_POISON:\n\t\tcase CONDITION_FIRE:\n\t\tcase CONDITION_ENERGY:\n\t\tcase CONDITION_DROWN:\n\t\tcase CONDITION_FREEZING:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f3406a7282707679fd32fb476c5b56c3abaf1679e0cee66a6b4a582f8c6658d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 206, + "startColumn": 3, + "charOffset": 4845, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 204, + "startColumn": 3, + "charOffset": 4795, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONDITION_FIRE:\n\t\tcase CONDITION_ENERGY:\n\t\tcase CONDITION_DROWN:\n\t\tcase CONDITION_FREEZING:\n\t\tcase CONDITION_DAZZLED:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7122dbfbacc1196b6cfd13609e8e01ebfbb69b847c637fd2a5f0921df3fcb232" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 207, + "startColumn": 3, + "charOffset": 4869, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 205, + "startColumn": 3, + "charOffset": 4818, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONDITION_ENERGY:\n\t\tcase CONDITION_DROWN:\n\t\tcase CONDITION_FREEZING:\n\t\tcase CONDITION_DAZZLED:\n\t\tcase CONDITION_CURSED:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "489ea56a8d385f2dc3732fd1e167a2bff84ee873f44999e48da12453b3624dcc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 208, + "startColumn": 3, + "charOffset": 4896, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 206, + "startColumn": 3, + "charOffset": 4843, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONDITION_DROWN:\n\t\tcase CONDITION_FREEZING:\n\t\tcase CONDITION_DAZZLED:\n\t\tcase CONDITION_CURSED:\n\t\tcase CONDITION_BLEEDING:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10db85889e02303bbd95832772a01dfe682836cf9d80b34dbe7cd896c5719acf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 209, + "startColumn": 3, + "charOffset": 4922, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 207, + "startColumn": 3, + "charOffset": 4867, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONDITION_FREEZING:\n\t\tcase CONDITION_DAZZLED:\n\t\tcase CONDITION_CURSED:\n\t\tcase CONDITION_BLEEDING:\n\t\t\treturn std::make_shared(id, type, buff, subId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8cf9a68f2336b490b1a920dacd14164c414d962d031e1745c051d9292f747201" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 210, + "startColumn": 3, + "charOffset": 4947, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 208, + "startColumn": 3, + "charOffset": 4894, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONDITION_DAZZLED:\n\t\tcase CONDITION_CURSED:\n\t\tcase CONDITION_BLEEDING:\n\t\t\treturn std::make_shared(id, type, buff, subId);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a7b3dd5a533da95f1312f5a178070d353d4e0b961755586f30926455619be17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 210, + "startColumn": 3, + "charOffset": 4947, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 208, + "startColumn": 3, + "charOffset": 4894, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONDITION_DAZZLED:\n\t\tcase CONDITION_CURSED:\n\t\tcase CONDITION_BLEEDING:\n\t\t\treturn std::make_shared(id, type, buff, subId);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dff26042818f768e6c7d8ac27068c5c570f189975b6d6ccbe42366ce81311b4b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 214, + "startColumn": 3, + "charOffset": 5067, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 3, + "charOffset": 5040, + "charLength": 4, + "snippet": { + "text": "\n\t\tcase CONDITION_HASTE:\n\t\tcase CONDITION_PARALYZE:\n\t\t\treturn std::make_shared(id, type, ticks, buff, subId, param);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9201ed22a67c1aa57eab9da36e4450700234c72ab74e5ffd00213a817e894735" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 214, + "startColumn": 3, + "charOffset": 5067, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 3, + "charOffset": 5040, + "charLength": 4, + "snippet": { + "text": "\n\t\tcase CONDITION_HASTE:\n\t\tcase CONDITION_PARALYZE:\n\t\t\treturn std::make_shared(id, type, ticks, buff, subId, param);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7363afc3df4c1a2f0a79cb1e09db81548f45500903fa6d9e154a1f6af761d1cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 217, + "startColumn": 3, + "charOffset": 5176, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 215, + "startColumn": 3, + "charOffset": 5092, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn std::make_shared(id, type, ticks, buff, subId, param);\n\n\t\tcase CONDITION_INVISIBLE:\n\t\t\treturn std::make_shared(id, type, ticks, buff, subId);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6fdf78d50f8a826ec42b09c45c808606290ef76a5aad791b9d135024c85013ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 220, + "startColumn": 3, + "charOffset": 5283, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 218, + "startColumn": 3, + "charOffset": 5202, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn std::make_shared(id, type, ticks, buff, subId);\n\n\t\tcase CONDITION_OUTFIT:\n\t\t\treturn std::make_shared(id, type, ticks, buff, subId);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7d17c629f585e15bbdf16658f5edd13886e51dda2c2cbe73a8f5e695dc18396" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 223, + "startColumn": 3, + "charOffset": 5384, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 221, + "startColumn": 3, + "charOffset": 5306, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn std::make_shared(id, type, ticks, buff, subId);\n\n\t\tcase CONDITION_LIGHT:\n\t\t\treturn std::make_shared(id, type, ticks, buff, subId, param & 0xFF, (param & 0xFF00) >> 8);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec79b25295bbf54887f2b44e2db91bd4a5f7ad7c7a0c1badb35014171a599e0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 224, + "startColumn": 74, + "charOffset": 5479, + "charLength": 5, + "snippet": { + "text": "param" + } + }, + "contextRegion": { + "startLine": 222, + "startColumn": 74, + "charOffset": 5381, + "charLength": 5, + "snippet": { + "text": "\n\t\tcase CONDITION_LIGHT:\n\t\t\treturn std::make_shared(id, type, ticks, buff, subId, param & 0xFF, (param & 0xFF00) >> 8);\n\n\t\tcase CONDITION_REGENERATION:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a12897cc51a48b49040c06c3f45f0ff9b23599f3efb34a58a2e021d32866873" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 224, + "startColumn": 82, + "charOffset": 5487, + "charLength": 4, + "snippet": { + "text": "0xFF" + } + }, + "contextRegion": { + "startLine": 222, + "startColumn": 82, + "charOffset": 5381, + "charLength": 4, + "snippet": { + "text": "\n\t\tcase CONDITION_LIGHT:\n\t\t\treturn std::make_shared(id, type, ticks, buff, subId, param & 0xFF, (param & 0xFF00) >> 8);\n\n\t\tcase CONDITION_REGENERATION:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "856e073412f60ff7744e73329f2061aad8aa9b932ae2742cb00d17b38b32d492" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 224, + "startColumn": 88, + "charOffset": 5493, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 222, + "startColumn": 88, + "charOffset": 5381, + "charLength": 1, + "snippet": { + "text": "\n\t\tcase CONDITION_LIGHT:\n\t\t\treturn std::make_shared(id, type, ticks, buff, subId, param & 0xFF, (param & 0xFF00) >> 8);\n\n\t\tcase CONDITION_REGENERATION:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0a7d5f05536d699afe71b10f022a110469d2c17fa1e84bc4e04b8ad93922bb6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-signed-bitwise", + "ruleIndex": 567, + "kind": "fail", + "level": "warning", + "message": { + "text": "use of a signed integer operand with a binary bitwise operator" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 224, + "startColumn": 89, + "charOffset": 5494, + "charLength": 5, + "snippet": { + "text": "param" + } + }, + "contextRegion": { + "startLine": 222, + "startColumn": 89, + "charOffset": 5381, + "charLength": 5, + "snippet": { + "text": "\n\t\tcase CONDITION_LIGHT:\n\t\t\treturn std::make_shared(id, type, ticks, buff, subId, param & 0xFF, (param & 0xFF00) >> 8);\n\n\t\tcase CONDITION_REGENERATION:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f004d5ed2e9424fd9f8be14b7079ed1d16d1faad21e0f444518a7f51e9cb38b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFF00 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 224, + "startColumn": 97, + "charOffset": 5502, + "charLength": 6, + "snippet": { + "text": "0xFF00" + } + }, + "contextRegion": { + "startLine": 222, + "startColumn": 97, + "charOffset": 5381, + "charLength": 6, + "snippet": { + "text": "\n\t\tcase CONDITION_LIGHT:\n\t\t\treturn std::make_shared(id, type, ticks, buff, subId, param & 0xFF, (param & 0xFF00) >> 8);\n\n\t\tcase CONDITION_REGENERATION:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e84385b806d27c92728d87183349fb366688beee1837a68936bd9690f43da88d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 224, + "startColumn": 108, + "charOffset": 5513, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 222, + "startColumn": 108, + "charOffset": 5381, + "charLength": 1, + "snippet": { + "text": "\n\t\tcase CONDITION_LIGHT:\n\t\t\treturn std::make_shared(id, type, ticks, buff, subId, param & 0xFF, (param & 0xFF00) >> 8);\n\n\t\tcase CONDITION_REGENERATION:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2762d1553847c39346b7666ff2b9572f03ad92aa2921df3be707640431c3f852" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 226, + "startColumn": 3, + "charOffset": 5520, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 3, + "charOffset": 5406, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn std::make_shared(id, type, ticks, buff, subId, param & 0xFF, (param & 0xFF00) >> 8);\n\n\t\tcase CONDITION_REGENERATION:\n\t\t\treturn std::make_shared(id, type, ticks, buff, subId);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7e04f84c7a178025c4d0c196a3921e1e27624620a396ccd13eaa02a1327e434" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 229, + "startColumn": 3, + "charOffset": 5633, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 227, + "startColumn": 3, + "charOffset": 5549, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn std::make_shared(id, type, ticks, buff, subId);\n\n\t\tcase CONDITION_SOUL:\n\t\t\treturn std::make_shared(id, type, ticks, buff, subId);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e9566ac03ecddf93842f6781613862d48d41e519785b896ee85f13329c77f41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 232, + "startColumn": 3, + "charOffset": 5730, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 230, + "startColumn": 3, + "charOffset": 5654, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn std::make_shared(id, type, ticks, buff, subId);\n\n\t\tcase CONDITION_ATTRIBUTES:\n\t\t\treturn std::make_shared(id, type, ticks, buff, subId);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5d4280f05abfbf08890b5b7c9aba211101e24b4cb58df982d3a01ace81a5f5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 235, + "startColumn": 3, + "charOffset": 5839, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 233, + "startColumn": 3, + "charOffset": 5757, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn std::make_shared(id, type, ticks, buff, subId);\n\n\t\tcase CONDITION_SPELLCOOLDOWN:\n\t\t\treturn std::make_shared(id, type, ticks, buff, subId);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c0a469275873803ad13784001abe380a0d09f27231a6590b6439ed95e88095b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 238, + "startColumn": 3, + "charOffset": 5954, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 236, + "startColumn": 3, + "charOffset": 5869, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn std::make_shared(id, type, ticks, buff, subId);\n\n\t\tcase CONDITION_SPELLGROUPCOOLDOWN:\n\t\t\treturn std::make_shared(id, type, ticks, buff, subId);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cff0f764713ad930a4f80ea92cb4fc802f69206e37b26a3e94224979c9f0c5f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 241, + "startColumn": 3, + "charOffset": 6079, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 239, + "startColumn": 3, + "charOffset": 5989, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn std::make_shared(id, type, ticks, buff, subId);\n\n\t\tcase CONDITION_MANASHIELD:\n\t\t\treturn std::make_shared(id, type, ticks, buff, subId);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f780daab065fd3cbfeafe60ed4e7ef52b8c5cb803644f395e8c573f0218d125d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 244, + "startColumn": 3, + "charOffset": 6188, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 3, + "charOffset": 6106, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn std::make_shared(id, type, ticks, buff, subId);\n\n\t\tcase CONDITION_FEARED:\n\t\t\treturn std::make_shared(id, type, ticks, buff, subId);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "acc24f9a055e9e1c772962e1ab3196c0cf83a7e42e596746ae96ff4e6e3b9600" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 248, + "startColumn": 3, + "charOffset": 6314, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 246, + "startColumn": 3, + "charOffset": 6286, + "charLength": 4, + "snippet": { + "text": "\n\t\tcase CONDITION_ROOTED:\n\t\tcase CONDITION_INFIGHT:\n\t\tcase CONDITION_DRUNK:\n\t\tcase CONDITION_EXHAUST:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1ea6fe860819a6d7f9c1267eb3ff5dd7b5b94200fbeb4446e5b64a0debc1814" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 249, + "startColumn": 3, + "charOffset": 6340, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 247, + "startColumn": 3, + "charOffset": 6287, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONDITION_ROOTED:\n\t\tcase CONDITION_INFIGHT:\n\t\tcase CONDITION_DRUNK:\n\t\tcase CONDITION_EXHAUST:\n\t\tcase CONDITION_EXHAUST_COMBAT:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d72eba9ad0b24a693b21ff533f1af7c883ad809fe0d3d3526b47421067f989b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 250, + "startColumn": 3, + "charOffset": 6364, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 248, + "startColumn": 3, + "charOffset": 6312, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONDITION_INFIGHT:\n\t\tcase CONDITION_DRUNK:\n\t\tcase CONDITION_EXHAUST:\n\t\tcase CONDITION_EXHAUST_COMBAT:\n\t\tcase CONDITION_EXHAUST_HEAL:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19ca3103d91193a52f816a8f3efe872647742aeb3e42ef797239db91081071fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 251, + "startColumn": 3, + "charOffset": 6390, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 249, + "startColumn": 3, + "charOffset": 6338, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONDITION_DRUNK:\n\t\tcase CONDITION_EXHAUST:\n\t\tcase CONDITION_EXHAUST_COMBAT:\n\t\tcase CONDITION_EXHAUST_HEAL:\n\t\tcase CONDITION_MUTED:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5428ab31e707e7f2d69fadc8f35be69ec085cf17da768a9a08375bf123219434" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 252, + "startColumn": 3, + "charOffset": 6423, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 250, + "startColumn": 3, + "charOffset": 6362, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONDITION_EXHAUST:\n\t\tcase CONDITION_EXHAUST_COMBAT:\n\t\tcase CONDITION_EXHAUST_HEAL:\n\t\tcase CONDITION_MUTED:\n\t\tcase CONDITION_CHANNELMUTEDTICKS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f8f16d3f7b9108b982bfb94779d20b3002f859cb2f8908ab97f08490f20d404" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 253, + "startColumn": 3, + "charOffset": 6454, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 251, + "startColumn": 3, + "charOffset": 6388, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONDITION_EXHAUST_COMBAT:\n\t\tcase CONDITION_EXHAUST_HEAL:\n\t\tcase CONDITION_MUTED:\n\t\tcase CONDITION_CHANNELMUTEDTICKS:\n\t\tcase CONDITION_YELLTICKS:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2540c0f0322c3457f077daed28b183443304c9e26acc8691d5f63c7ae59efad8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 254, + "startColumn": 3, + "charOffset": 6478, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 3, + "charOffset": 6421, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONDITION_EXHAUST_HEAL:\n\t\tcase CONDITION_MUTED:\n\t\tcase CONDITION_CHANNELMUTEDTICKS:\n\t\tcase CONDITION_YELLTICKS:\n\t\tcase CONDITION_PACIFIED:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28cc894ec25be1ada844a465a25bde3d9d1d5efea848c884c638eefd7c668500" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 255, + "startColumn": 3, + "charOffset": 6514, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 253, + "startColumn": 3, + "charOffset": 6452, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONDITION_MUTED:\n\t\tcase CONDITION_CHANNELMUTEDTICKS:\n\t\tcase CONDITION_YELLTICKS:\n\t\tcase CONDITION_PACIFIED:\n\t\t\treturn std::make_shared(id, type, ticks, buff, subId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c788fc3927434843612678ea9827e65236b5566d01d75b4cb8ed501a90ec7fcc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 256, + "startColumn": 3, + "charOffset": 6542, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 254, + "startColumn": 3, + "charOffset": 6476, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONDITION_CHANNELMUTEDTICKS:\n\t\tcase CONDITION_YELLTICKS:\n\t\tcase CONDITION_PACIFIED:\n\t\t\treturn std::make_shared(id, type, ticks, buff, subId);\n\t\tcase CONDITION_BAKRAGORE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "897593c6f3b3e49276e11b82b128bc72a91986ce81bc0663975792770e4052b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 256, + "startColumn": 3, + "charOffset": 6542, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 254, + "startColumn": 3, + "charOffset": 6476, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONDITION_CHANNELMUTEDTICKS:\n\t\tcase CONDITION_YELLTICKS:\n\t\tcase CONDITION_PACIFIED:\n\t\t\treturn std::make_shared(id, type, ticks, buff, subId);\n\t\tcase CONDITION_BAKRAGORE:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc050b90278554cea9c34701aae1edb2409f804501d95f75fb69eee96a665bbc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 258, + "startColumn": 3, + "charOffset": 6645, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 256, + "startColumn": 3, + "charOffset": 6540, + "charLength": 4, + "snippet": { + "text": "\t\tcase CONDITION_PACIFIED:\n\t\t\treturn std::make_shared(id, type, ticks, buff, subId);\n\t\tcase CONDITION_BAKRAGORE:\n\t\t\treturn std::make_shared(id, type, ticks, buff, subId, isPersistent);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ce1f3de89d24ae527237aa75cb7afa5ed241831a6a843792a48be2fbdacaa3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 261, + "startColumn": 3, + "charOffset": 6764, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 259, + "startColumn": 3, + "charOffset": 6671, + "charLength": 7, + "snippet": { + "text": "\t\t\treturn std::make_shared(id, type, ticks, buff, subId, isPersistent);\n\n\t\tdefault:\n\t\t\treturn nullptr;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3611a199e269c9755d4c5adf6b7c51b4ab7545586a7feafb32a30a73b4be2540" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'attr' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 267, + "startColumn": 10, + "charOffset": 6887, + "charLength": 4, + "snippet": { + "text": "attr" + } + }, + "contextRegion": { + "startLine": 265, + "startColumn": 10, + "charOffset": 6797, + "charLength": 4, + "snippet": { + "text": "\nstd::shared_ptr Condition::createCondition(PropStream &propStream) {\n\tuint8_t attr;\n\tif (!propStream.read(attr) || attr != CONDITIONATTR_TYPE) {\n\t\treturn nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dffb4d05a679f19b13e3fa8eafdd14d2ffdd8415b0f2ce96bd4ee7173be9f4de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'type' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 272, + "startColumn": 9, + "charOffset": 6993, + "charLength": 4, + "snippet": { + "text": "type" + } + }, + "contextRegion": { + "startLine": 270, + "startColumn": 9, + "charOffset": 6981, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tint8_t type;\n\tif (!propStream.read(type)) {\n\t\treturn nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d10430fa763badc2f653d478ee64125b9056eef53fcb202fc33398d24e7b60b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'id' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 281, + "startColumn": 11, + "charOffset": 7160, + "charLength": 2, + "snippet": { + "text": "id" + } + }, + "contextRegion": { + "startLine": 279, + "startColumn": 11, + "charOffset": 7146, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tuint32_t id;\n\tif (!propStream.read(id)) {\n\t\treturn nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00ab0238de3ba22136d379f6549bc2b63b5a89ce118109ef7e5141773a1742dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'ticks' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 290, + "startColumn": 11, + "charOffset": 7328, + "charLength": 5, + "snippet": { + "text": "ticks" + } + }, + "contextRegion": { + "startLine": 288, + "startColumn": 11, + "charOffset": 7314, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tuint32_t ticks;\n\tif (!propStream.read(ticks)) {\n\t\treturn nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e79dd12d364ac4244af11706c0741b5dce5c4af8d4187d1e1b4f36b197e4afc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'buff' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 299, + "startColumn": 10, + "charOffset": 7502, + "charLength": 4, + "snippet": { + "text": "buff" + } + }, + "contextRegion": { + "startLine": 297, + "startColumn": 10, + "charOffset": 7489, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tuint8_t buff;\n\tif (!propStream.read(buff)) {\n\t\treturn nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fbd334f9b52d20bb5f91d733377b668651dd72c4a69421f8964e66670b8cb424" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'subId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 308, + "startColumn": 11, + "charOffset": 7673, + "charLength": 5, + "snippet": { + "text": "subId" + } + }, + "contextRegion": { + "startLine": 306, + "startColumn": 11, + "charOffset": 7659, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\tuint32_t subId;\n\tif (!propStream.read(subId)) {\n\t\treturn nullptr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46961d45bd88490e33734514a2dbd1f68a65ab4f921f5fc92114c46f9afa96f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 313, + "startColumn": 93, + "charOffset": 7836, + "charLength": 5, + "snippet": { + "text": "ticks" + } + }, + "contextRegion": { + "startLine": 311, + "startColumn": 93, + "charOffset": 7740, + "charLength": 5, + "snippet": { + "text": "\t}\n\n\treturn createCondition(static_cast(id), static_cast(type), ticks, 0, buff != 0, subId);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9f0ab6096352b0757174dfa021746ddcdf557375f4e54c57d62ae8632fdd1f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 316, + "startColumn": 57, + "charOffset": 7924, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 314, + "startColumn": 57, + "charOffset": 7865, + "charLength": 1, + "snippet": { + "text": "}\n\nbool Condition::startCondition(std::shared_ptr) {\n\tif (ticks > 0) {\n\t\tendTime = ticks + OTSYS_TIME();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1055fbb3d7f10e391b7f4a465124bd6660dbb8411582c4538a1a9802e4cf703d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 316, + "startColumn": 57, + "charOffset": 7924, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 314, + "startColumn": 57, + "charOffset": 7865, + "charLength": 1, + "snippet": { + "text": "}\n\nbool Condition::startCondition(std::shared_ptr) {\n\tif (ticks > 0) {\n\t\tendTime = ticks + OTSYS_TIME();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eafe41bfbf967e4aceedbcf8031bc520f58e0c1511bc85840a895753e5951172" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "boolean expression can be simplified by DeMorgan's theorem" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 332, + "startColumn": 6, + "charOffset": 8190, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 330, + "startColumn": 6, + "charOffset": 8181, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!(id == CONDITIONID_DEFAULT || id == CONDITIONID_COMBAT)) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "104aaf0472bc8fcd3d5cd22924baa21b3bedbee559c3900add81eb0b4f37d07f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 358, + "startColumn": 9, + "charOffset": 8709, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 356, + "startColumn": 9, + "charOffset": 8647, + "charLength": 6, + "snippet": { + "text": "\tstd::unordered_set icons;\n\tif (isBuff) {\n\t\ticons.insert(PlayerIcon::PartyBuff);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efb5425b1b61e922f41adeff0bdd3c7b484c0484014486a3c042fe98f03a816f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'addCondition' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 364, + "startColumn": 66, + "charOffset": 8827, + "charLength": 12, + "snippet": { + "text": "addCondition" + } + }, + "contextRegion": { + "startLine": 362, + "startColumn": 66, + "charOffset": 8759, + "charLength": 12, + "snippet": { + "text": "}\n\nbool Condition::updateCondition(const std::shared_ptr addCondition) {\n\tif (conditionType != addCondition->getType()) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9ac79b779e74a69f48127b6f31a031b39e607d5629056ca4d66cd1e3b7cfa5e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 392, + "startColumn": 62, + "charOffset": 9490, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 390, + "startColumn": 62, + "charOffset": 9426, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid ConditionGeneric::endCondition(std::shared_ptr) {\n\t//\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b1ede875e766934d5bd6285550f3157c27ffa70b6b6f42b585c93b18e3bdae6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 411, + "startColumn": 10, + "charOffset": 10012, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 409, + "startColumn": 10, + "charOffset": 9951, + "charLength": 6, + "snippet": { + "text": "\tswitch (conditionType) {\n\t\tcase CONDITION_INFIGHT:\n\t\t\ticons.insert(PlayerIcon::Swords);\n\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f864c7cc2ca8e2f7792c6b0b9a7a828f20ea4dc4a04a545138c6af6ef60ce3e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 415, + "startColumn": 10, + "charOffset": 10084, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 413, + "startColumn": 10, + "charOffset": 10050, + "charLength": 6, + "snippet": { + "text": "\n\t\tcase CONDITION_DRUNK:\n\t\t\ticons.insert(PlayerIcon::Drunk);\n\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c45cddaae6ab5672b1dabc0bd51bdd4cf771b8b34cdb399bc6d98bd4756fed53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 419, + "startColumn": 10, + "charOffset": 10156, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 417, + "startColumn": 10, + "charOffset": 10121, + "charLength": 6, + "snippet": { + "text": "\n\t\tcase CONDITION_ROOTED:\n\t\t\ticons.insert(PlayerIcon::Rooted);\n\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d483a191930a3b715f5087f118e02f768b8217acd0ffaa9f45aeb9dbe4ac75e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 434, + "startColumn": 6, + "charOffset": 10400, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 432, + "startColumn": 6, + "charOffset": 10270, + "charLength": 1, + "snippet": { + "text": "\nvoid ConditionAttributes::addCondition(std::shared_ptr creature, const std::shared_ptr addCondition) {\n\tif (!creature) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54a25a98b429aa1a18b55a03a9c9744b55924d742fe79b59e2be68968f16bc0f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 446, + "startColumn": 3, + "charOffset": 10704, + "charLength": 6, + "snippet": { + "text": "memcpy" + } + }, + "contextRegion": { + "startLine": 444, + "startColumn": 3, + "charOffset": 10678, + "charLength": 6, + "snippet": { + "text": "\n\t\t// Apply the new one\n\t\tmemcpy(skills, conditionAttrs->skills, sizeof(skills));\n\t\tmemcpy(skillsPercent, conditionAttrs->skillsPercent, sizeof(skillsPercent));\n\t\tmemcpy(stats, conditionAttrs->stats, sizeof(stats));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d099eba1d3e4a37e3b64af164acab929eb2f3bfe09a2e22bc0e672da0084b39f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 446, + "startColumn": 10, + "charOffset": 10711, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 444, + "startColumn": 10, + "charOffset": 10678, + "charLength": 6, + "snippet": { + "text": "\n\t\t// Apply the new one\n\t\tmemcpy(skills, conditionAttrs->skills, sizeof(skills));\n\t\tmemcpy(skillsPercent, conditionAttrs->skillsPercent, sizeof(skillsPercent));\n\t\tmemcpy(stats, conditionAttrs->stats, sizeof(stats));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "262ef21592abf527ad7672ea57a5f78ce64a5d74ac5a7ae21e306c57f1d78aeb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 446, + "startColumn": 10, + "charOffset": 10711, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 444, + "startColumn": 10, + "charOffset": 10678, + "charLength": 6, + "snippet": { + "text": "\n\t\t// Apply the new one\n\t\tmemcpy(skills, conditionAttrs->skills, sizeof(skills));\n\t\tmemcpy(skillsPercent, conditionAttrs->skillsPercent, sizeof(skillsPercent));\n\t\tmemcpy(stats, conditionAttrs->stats, sizeof(stats));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09c3526a974b137041387d4d07754d760a137f5e08d2d288ea670dbddb7a3b2d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 446, + "startColumn": 18, + "charOffset": 10719, + "charLength": 14, + "snippet": { + "text": "conditionAttrs" + } + }, + "contextRegion": { + "startLine": 444, + "startColumn": 18, + "charOffset": 10678, + "charLength": 14, + "snippet": { + "text": "\n\t\t// Apply the new one\n\t\tmemcpy(skills, conditionAttrs->skills, sizeof(skills));\n\t\tmemcpy(skillsPercent, conditionAttrs->skillsPercent, sizeof(skillsPercent));\n\t\tmemcpy(stats, conditionAttrs->stats, sizeof(stats));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e801783767736eb636372a37909dd9898ae7fc9dfeeb3782680a3c25213da9ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 446, + "startColumn": 34, + "charOffset": 10735, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 444, + "startColumn": 34, + "charOffset": 10678, + "charLength": 6, + "snippet": { + "text": "\n\t\t// Apply the new one\n\t\tmemcpy(skills, conditionAttrs->skills, sizeof(skills));\n\t\tmemcpy(skillsPercent, conditionAttrs->skillsPercent, sizeof(skillsPercent));\n\t\tmemcpy(stats, conditionAttrs->stats, sizeof(stats));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "91f674ee303e63229bbb2a434520252049f43480fc496bdf6256486edef35b80" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 447, + "startColumn": 3, + "charOffset": 10762, + "charLength": 6, + "snippet": { + "text": "memcpy" + } + }, + "contextRegion": { + "startLine": 445, + "startColumn": 3, + "charOffset": 10679, + "charLength": 6, + "snippet": { + "text": "\t\t// Apply the new one\n\t\tmemcpy(skills, conditionAttrs->skills, sizeof(skills));\n\t\tmemcpy(skillsPercent, conditionAttrs->skillsPercent, sizeof(skillsPercent));\n\t\tmemcpy(stats, conditionAttrs->stats, sizeof(stats));\n\t\tmemcpy(statsPercent, conditionAttrs->statsPercent, sizeof(statsPercent));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "507c37700e41ba76dd887f9d52045db1f5c94f948adeeb79d0ac11f05d470790" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 447, + "startColumn": 10, + "charOffset": 10769, + "charLength": 13, + "snippet": { + "text": "skillsPercent" + } + }, + "contextRegion": { + "startLine": 445, + "startColumn": 10, + "charOffset": 10679, + "charLength": 13, + "snippet": { + "text": "\t\t// Apply the new one\n\t\tmemcpy(skills, conditionAttrs->skills, sizeof(skills));\n\t\tmemcpy(skillsPercent, conditionAttrs->skillsPercent, sizeof(skillsPercent));\n\t\tmemcpy(stats, conditionAttrs->stats, sizeof(stats));\n\t\tmemcpy(statsPercent, conditionAttrs->statsPercent, sizeof(statsPercent));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f241dc2ccad274c1fe23a7d5f3b5ffd65935afad5f9568a85b283a306bc1603" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 447, + "startColumn": 10, + "charOffset": 10769, + "charLength": 13, + "snippet": { + "text": "skillsPercent" + } + }, + "contextRegion": { + "startLine": 445, + "startColumn": 10, + "charOffset": 10679, + "charLength": 13, + "snippet": { + "text": "\t\t// Apply the new one\n\t\tmemcpy(skills, conditionAttrs->skills, sizeof(skills));\n\t\tmemcpy(skillsPercent, conditionAttrs->skillsPercent, sizeof(skillsPercent));\n\t\tmemcpy(stats, conditionAttrs->stats, sizeof(stats));\n\t\tmemcpy(statsPercent, conditionAttrs->statsPercent, sizeof(statsPercent));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "890a9a312dc5a724629fb83b9217a72a29394318c90393a593e352388a74421d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 447, + "startColumn": 25, + "charOffset": 10784, + "charLength": 14, + "snippet": { + "text": "conditionAttrs" + } + }, + "contextRegion": { + "startLine": 445, + "startColumn": 25, + "charOffset": 10679, + "charLength": 14, + "snippet": { + "text": "\t\t// Apply the new one\n\t\tmemcpy(skills, conditionAttrs->skills, sizeof(skills));\n\t\tmemcpy(skillsPercent, conditionAttrs->skillsPercent, sizeof(skillsPercent));\n\t\tmemcpy(stats, conditionAttrs->stats, sizeof(stats));\n\t\tmemcpy(statsPercent, conditionAttrs->statsPercent, sizeof(statsPercent));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76c25e7b5b76799e0d0f764f9c350ebf5b543f61e4a4fce004d47a314213acbb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 447, + "startColumn": 41, + "charOffset": 10800, + "charLength": 13, + "snippet": { + "text": "skillsPercent" + } + }, + "contextRegion": { + "startLine": 445, + "startColumn": 41, + "charOffset": 10679, + "charLength": 13, + "snippet": { + "text": "\t\t// Apply the new one\n\t\tmemcpy(skills, conditionAttrs->skills, sizeof(skills));\n\t\tmemcpy(skillsPercent, conditionAttrs->skillsPercent, sizeof(skillsPercent));\n\t\tmemcpy(stats, conditionAttrs->stats, sizeof(stats));\n\t\tmemcpy(statsPercent, conditionAttrs->statsPercent, sizeof(statsPercent));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44ff8bf9d494745c7878b7b0f66897e949ac5f67a5e0e251f509e6dd4ca6ada0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 448, + "startColumn": 3, + "charOffset": 10841, + "charLength": 6, + "snippet": { + "text": "memcpy" + } + }, + "contextRegion": { + "startLine": 446, + "startColumn": 3, + "charOffset": 10702, + "charLength": 6, + "snippet": { + "text": "\t\tmemcpy(skills, conditionAttrs->skills, sizeof(skills));\n\t\tmemcpy(skillsPercent, conditionAttrs->skillsPercent, sizeof(skillsPercent));\n\t\tmemcpy(stats, conditionAttrs->stats, sizeof(stats));\n\t\tmemcpy(statsPercent, conditionAttrs->statsPercent, sizeof(statsPercent));\n\t\tmemcpy(buffs, conditionAttrs->buffs, sizeof(buffs));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc71c3e7108df6a726772c5baa4494c8101555b25273a91463e767862f7d38f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 448, + "startColumn": 10, + "charOffset": 10848, + "charLength": 5, + "snippet": { + "text": "stats" + } + }, + "contextRegion": { + "startLine": 446, + "startColumn": 10, + "charOffset": 10702, + "charLength": 5, + "snippet": { + "text": "\t\tmemcpy(skills, conditionAttrs->skills, sizeof(skills));\n\t\tmemcpy(skillsPercent, conditionAttrs->skillsPercent, sizeof(skillsPercent));\n\t\tmemcpy(stats, conditionAttrs->stats, sizeof(stats));\n\t\tmemcpy(statsPercent, conditionAttrs->statsPercent, sizeof(statsPercent));\n\t\tmemcpy(buffs, conditionAttrs->buffs, sizeof(buffs));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d159a4dfcb16cc60e35047c4d8982e1a33c6bf712e5ebcd7401f205595bfb645" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 448, + "startColumn": 10, + "charOffset": 10848, + "charLength": 5, + "snippet": { + "text": "stats" + } + }, + "contextRegion": { + "startLine": 446, + "startColumn": 10, + "charOffset": 10702, + "charLength": 5, + "snippet": { + "text": "\t\tmemcpy(skills, conditionAttrs->skills, sizeof(skills));\n\t\tmemcpy(skillsPercent, conditionAttrs->skillsPercent, sizeof(skillsPercent));\n\t\tmemcpy(stats, conditionAttrs->stats, sizeof(stats));\n\t\tmemcpy(statsPercent, conditionAttrs->statsPercent, sizeof(statsPercent));\n\t\tmemcpy(buffs, conditionAttrs->buffs, sizeof(buffs));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b78518c98ac8860d0d8659174664e7a14f784e78f4d5b284bd28a48dcabcb8f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 448, + "startColumn": 17, + "charOffset": 10855, + "charLength": 14, + "snippet": { + "text": "conditionAttrs" + } + }, + "contextRegion": { + "startLine": 446, + "startColumn": 17, + "charOffset": 10702, + "charLength": 14, + "snippet": { + "text": "\t\tmemcpy(skills, conditionAttrs->skills, sizeof(skills));\n\t\tmemcpy(skillsPercent, conditionAttrs->skillsPercent, sizeof(skillsPercent));\n\t\tmemcpy(stats, conditionAttrs->stats, sizeof(stats));\n\t\tmemcpy(statsPercent, conditionAttrs->statsPercent, sizeof(statsPercent));\n\t\tmemcpy(buffs, conditionAttrs->buffs, sizeof(buffs));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ece856960c39cdf12769abdb02929322ba24f44b9e2a84286fbbff1ae475c506" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 448, + "startColumn": 33, + "charOffset": 10871, + "charLength": 5, + "snippet": { + "text": "stats" + } + }, + "contextRegion": { + "startLine": 446, + "startColumn": 33, + "charOffset": 10702, + "charLength": 5, + "snippet": { + "text": "\t\tmemcpy(skills, conditionAttrs->skills, sizeof(skills));\n\t\tmemcpy(skillsPercent, conditionAttrs->skillsPercent, sizeof(skillsPercent));\n\t\tmemcpy(stats, conditionAttrs->stats, sizeof(stats));\n\t\tmemcpy(statsPercent, conditionAttrs->statsPercent, sizeof(statsPercent));\n\t\tmemcpy(buffs, conditionAttrs->buffs, sizeof(buffs));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d294b3fc10c16b245fe3e5559c38a9193fdc26cfdef3413f166a9bc464a61a08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 449, + "startColumn": 3, + "charOffset": 10896, + "charLength": 6, + "snippet": { + "text": "memcpy" + } + }, + "contextRegion": { + "startLine": 447, + "startColumn": 3, + "charOffset": 10760, + "charLength": 6, + "snippet": { + "text": "\t\tmemcpy(skillsPercent, conditionAttrs->skillsPercent, sizeof(skillsPercent));\n\t\tmemcpy(stats, conditionAttrs->stats, sizeof(stats));\n\t\tmemcpy(statsPercent, conditionAttrs->statsPercent, sizeof(statsPercent));\n\t\tmemcpy(buffs, conditionAttrs->buffs, sizeof(buffs));\n\t\tmemcpy(buffsPercent, conditionAttrs->buffsPercent, sizeof(buffsPercent));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3aa595599904bd227cfe5f0ea6c217173acd749515a118fc91b9fe0f149b60f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 449, + "startColumn": 10, + "charOffset": 10903, + "charLength": 12, + "snippet": { + "text": "statsPercent" + } + }, + "contextRegion": { + "startLine": 447, + "startColumn": 10, + "charOffset": 10760, + "charLength": 12, + "snippet": { + "text": "\t\tmemcpy(skillsPercent, conditionAttrs->skillsPercent, sizeof(skillsPercent));\n\t\tmemcpy(stats, conditionAttrs->stats, sizeof(stats));\n\t\tmemcpy(statsPercent, conditionAttrs->statsPercent, sizeof(statsPercent));\n\t\tmemcpy(buffs, conditionAttrs->buffs, sizeof(buffs));\n\t\tmemcpy(buffsPercent, conditionAttrs->buffsPercent, sizeof(buffsPercent));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41ce233938a732c5657c030634cbcce9ba2af6765037f97be5afe447379a9f01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 449, + "startColumn": 10, + "charOffset": 10903, + "charLength": 12, + "snippet": { + "text": "statsPercent" + } + }, + "contextRegion": { + "startLine": 447, + "startColumn": 10, + "charOffset": 10760, + "charLength": 12, + "snippet": { + "text": "\t\tmemcpy(skillsPercent, conditionAttrs->skillsPercent, sizeof(skillsPercent));\n\t\tmemcpy(stats, conditionAttrs->stats, sizeof(stats));\n\t\tmemcpy(statsPercent, conditionAttrs->statsPercent, sizeof(statsPercent));\n\t\tmemcpy(buffs, conditionAttrs->buffs, sizeof(buffs));\n\t\tmemcpy(buffsPercent, conditionAttrs->buffsPercent, sizeof(buffsPercent));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1909ae77dee0538d68394c1403c13ac48dc19e4475348c61358fed6b74ea5ff6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 449, + "startColumn": 24, + "charOffset": 10917, + "charLength": 14, + "snippet": { + "text": "conditionAttrs" + } + }, + "contextRegion": { + "startLine": 447, + "startColumn": 24, + "charOffset": 10760, + "charLength": 14, + "snippet": { + "text": "\t\tmemcpy(skillsPercent, conditionAttrs->skillsPercent, sizeof(skillsPercent));\n\t\tmemcpy(stats, conditionAttrs->stats, sizeof(stats));\n\t\tmemcpy(statsPercent, conditionAttrs->statsPercent, sizeof(statsPercent));\n\t\tmemcpy(buffs, conditionAttrs->buffs, sizeof(buffs));\n\t\tmemcpy(buffsPercent, conditionAttrs->buffsPercent, sizeof(buffsPercent));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "729155504bb52668896d8e5725dec061327094887ea29d85d505582fd5a8f691" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 449, + "startColumn": 40, + "charOffset": 10933, + "charLength": 12, + "snippet": { + "text": "statsPercent" + } + }, + "contextRegion": { + "startLine": 447, + "startColumn": 40, + "charOffset": 10760, + "charLength": 12, + "snippet": { + "text": "\t\tmemcpy(skillsPercent, conditionAttrs->skillsPercent, sizeof(skillsPercent));\n\t\tmemcpy(stats, conditionAttrs->stats, sizeof(stats));\n\t\tmemcpy(statsPercent, conditionAttrs->statsPercent, sizeof(statsPercent));\n\t\tmemcpy(buffs, conditionAttrs->buffs, sizeof(buffs));\n\t\tmemcpy(buffsPercent, conditionAttrs->buffsPercent, sizeof(buffsPercent));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee2aaf1c87e797c451a718f99a74a8d8cbc2bfb33775523cef560ff4c6d69ead" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 450, + "startColumn": 3, + "charOffset": 10972, + "charLength": 6, + "snippet": { + "text": "memcpy" + } + }, + "contextRegion": { + "startLine": 448, + "startColumn": 3, + "charOffset": 10839, + "charLength": 6, + "snippet": { + "text": "\t\tmemcpy(stats, conditionAttrs->stats, sizeof(stats));\n\t\tmemcpy(statsPercent, conditionAttrs->statsPercent, sizeof(statsPercent));\n\t\tmemcpy(buffs, conditionAttrs->buffs, sizeof(buffs));\n\t\tmemcpy(buffsPercent, conditionAttrs->buffsPercent, sizeof(buffsPercent));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c124b95acdc170a4c185461b4b61a5eaaa24990fe35a07cdd772fdd82152501d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 450, + "startColumn": 10, + "charOffset": 10979, + "charLength": 5, + "snippet": { + "text": "buffs" + } + }, + "contextRegion": { + "startLine": 448, + "startColumn": 10, + "charOffset": 10839, + "charLength": 5, + "snippet": { + "text": "\t\tmemcpy(stats, conditionAttrs->stats, sizeof(stats));\n\t\tmemcpy(statsPercent, conditionAttrs->statsPercent, sizeof(statsPercent));\n\t\tmemcpy(buffs, conditionAttrs->buffs, sizeof(buffs));\n\t\tmemcpy(buffsPercent, conditionAttrs->buffsPercent, sizeof(buffsPercent));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53b26e5b24906c4c10cfa503a8bcc6d969bfd1efad8424a0e7b5148ede0f6a9b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 450, + "startColumn": 10, + "charOffset": 10979, + "charLength": 5, + "snippet": { + "text": "buffs" + } + }, + "contextRegion": { + "startLine": 448, + "startColumn": 10, + "charOffset": 10839, + "charLength": 5, + "snippet": { + "text": "\t\tmemcpy(stats, conditionAttrs->stats, sizeof(stats));\n\t\tmemcpy(statsPercent, conditionAttrs->statsPercent, sizeof(statsPercent));\n\t\tmemcpy(buffs, conditionAttrs->buffs, sizeof(buffs));\n\t\tmemcpy(buffsPercent, conditionAttrs->buffsPercent, sizeof(buffsPercent));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df183bfeee4eeaac269626a472e5f6178ac898e710aeb475bafc7528df725d8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 450, + "startColumn": 17, + "charOffset": 10986, + "charLength": 14, + "snippet": { + "text": "conditionAttrs" + } + }, + "contextRegion": { + "startLine": 448, + "startColumn": 17, + "charOffset": 10839, + "charLength": 14, + "snippet": { + "text": "\t\tmemcpy(stats, conditionAttrs->stats, sizeof(stats));\n\t\tmemcpy(statsPercent, conditionAttrs->statsPercent, sizeof(statsPercent));\n\t\tmemcpy(buffs, conditionAttrs->buffs, sizeof(buffs));\n\t\tmemcpy(buffsPercent, conditionAttrs->buffsPercent, sizeof(buffsPercent));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c85be2090cff546355cf612772c03b340ade15ed75888ccc16d2c2b10f224d4f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 450, + "startColumn": 33, + "charOffset": 11002, + "charLength": 5, + "snippet": { + "text": "buffs" + } + }, + "contextRegion": { + "startLine": 448, + "startColumn": 33, + "charOffset": 10839, + "charLength": 5, + "snippet": { + "text": "\t\tmemcpy(stats, conditionAttrs->stats, sizeof(stats));\n\t\tmemcpy(statsPercent, conditionAttrs->statsPercent, sizeof(statsPercent));\n\t\tmemcpy(buffs, conditionAttrs->buffs, sizeof(buffs));\n\t\tmemcpy(buffsPercent, conditionAttrs->buffsPercent, sizeof(buffsPercent));\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf1f3fc4cbcbfc2fd3b3e1d2b4b93b20ec77e41101f26145a061a8e6ca870dec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 451, + "startColumn": 3, + "charOffset": 11027, + "charLength": 6, + "snippet": { + "text": "memcpy" + } + }, + "contextRegion": { + "startLine": 449, + "startColumn": 3, + "charOffset": 10894, + "charLength": 6, + "snippet": { + "text": "\t\tmemcpy(statsPercent, conditionAttrs->statsPercent, sizeof(statsPercent));\n\t\tmemcpy(buffs, conditionAttrs->buffs, sizeof(buffs));\n\t\tmemcpy(buffsPercent, conditionAttrs->buffsPercent, sizeof(buffsPercent));\n\n\t\t// Using std::array can only increment to the new instead of use memcpy" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "083997bc5d6ca32f75b66f8ad5d6a364175664877d99f8cca3948f8568d35fd1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 451, + "startColumn": 10, + "charOffset": 11034, + "charLength": 12, + "snippet": { + "text": "buffsPercent" + } + }, + "contextRegion": { + "startLine": 449, + "startColumn": 10, + "charOffset": 10894, + "charLength": 12, + "snippet": { + "text": "\t\tmemcpy(statsPercent, conditionAttrs->statsPercent, sizeof(statsPercent));\n\t\tmemcpy(buffs, conditionAttrs->buffs, sizeof(buffs));\n\t\tmemcpy(buffsPercent, conditionAttrs->buffsPercent, sizeof(buffsPercent));\n\n\t\t// Using std::array can only increment to the new instead of use memcpy" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e90bb91a830e53babe270ff98b759b68b80518d609ccc11e7037579347a09ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 451, + "startColumn": 10, + "charOffset": 11034, + "charLength": 12, + "snippet": { + "text": "buffsPercent" + } + }, + "contextRegion": { + "startLine": 449, + "startColumn": 10, + "charOffset": 10894, + "charLength": 12, + "snippet": { + "text": "\t\tmemcpy(statsPercent, conditionAttrs->statsPercent, sizeof(statsPercent));\n\t\tmemcpy(buffs, conditionAttrs->buffs, sizeof(buffs));\n\t\tmemcpy(buffsPercent, conditionAttrs->buffsPercent, sizeof(buffsPercent));\n\n\t\t// Using std::array can only increment to the new instead of use memcpy" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3a44af7a385e8ff02b5b9a1318986e1a541d438d2e1b2af28ae02ea7b14c985" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-array-to-pointer-decay", + "ruleIndex": 505, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 451, + "startColumn": 24, + "charOffset": 11048, + "charLength": 14, + "snippet": { + "text": "conditionAttrs" + } + }, + "contextRegion": { + "startLine": 449, + "startColumn": 24, + "charOffset": 10894, + "charLength": 14, + "snippet": { + "text": "\t\tmemcpy(statsPercent, conditionAttrs->statsPercent, sizeof(statsPercent));\n\t\tmemcpy(buffs, conditionAttrs->buffs, sizeof(buffs));\n\t\tmemcpy(buffsPercent, conditionAttrs->buffsPercent, sizeof(buffsPercent));\n\n\t\t// Using std::array can only increment to the new instead of use memcpy" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "003da130627f887dd87ded6c65171634966f45d8643a17d652271701a6c46c38" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 451, + "startColumn": 40, + "charOffset": 11064, + "charLength": 12, + "snippet": { + "text": "buffsPercent" + } + }, + "contextRegion": { + "startLine": 449, + "startColumn": 40, + "charOffset": 10894, + "charLength": 12, + "snippet": { + "text": "\t\tmemcpy(statsPercent, conditionAttrs->statsPercent, sizeof(statsPercent));\n\t\tmemcpy(buffs, conditionAttrs->buffs, sizeof(buffs));\n\t\tmemcpy(buffsPercent, conditionAttrs->buffsPercent, sizeof(buffsPercent));\n\n\t\t// Using std::array can only increment to the new instead of use memcpy" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65f83d538ba4045ec32b91c4d57a64fb9723a2cfbef25b4c9fd6aa0746fcf797" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 482, + "startColumn": 2, + "charOffset": 12065, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 480, + "startColumn": 2, + "charOffset": 11973, + "charLength": 2, + "snippet": { + "text": "\nbool ConditionAttributes::unserializeProp(ConditionAttr_t attr, PropStream &propStream) {\n\tif (attr == CONDITIONATTR_SKILLS) {\n\t\treturn propStream.read(skills[currentSkill++]);\n\t} else if (attr == CONDITIONATTR_STATS) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d135533cf9df7142c4362b30b2a44cefe1c8b3da844e98c48d4da4b5fc6ba5b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 483, + "startColumn": 35, + "charOffset": 12135, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 481, + "startColumn": 35, + "charOffset": 11974, + "charLength": 6, + "snippet": { + "text": "bool ConditionAttributes::unserializeProp(ConditionAttr_t attr, PropStream &propStream) {\n\tif (attr == CONDITIONATTR_SKILLS) {\n\t\treturn propStream.read(skills[currentSkill++]);\n\t} else if (attr == CONDITIONATTR_STATS) {\n\t\treturn propStream.read(stats[currentStat++]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d3940e4afe371b5fc142e6835866fa5a9a1200c9ce82a8e7f8c25406adba4ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 484, + "startColumn": 4, + "charOffset": 12163, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 482, + "startColumn": 4, + "charOffset": 12064, + "charLength": 4, + "snippet": { + "text": "\tif (attr == CONDITIONATTR_SKILLS) {\n\t\treturn propStream.read(skills[currentSkill++]);\n\t} else if (attr == CONDITIONATTR_STATS) {\n\t\treturn propStream.read(stats[currentStat++]);\n\t} else if (attr == CONDITIONATTR_BUFFS) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "078795b92d942ad8889bc44f2331c8796550e21047785400a82a09a711ca5c51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 485, + "startColumn": 35, + "charOffset": 12237, + "charLength": 5, + "snippet": { + "text": "stats" + } + }, + "contextRegion": { + "startLine": 483, + "startColumn": 35, + "charOffset": 12101, + "charLength": 5, + "snippet": { + "text": "\t\treturn propStream.read(skills[currentSkill++]);\n\t} else if (attr == CONDITIONATTR_STATS) {\n\t\treturn propStream.read(stats[currentStat++]);\n\t} else if (attr == CONDITIONATTR_BUFFS) {\n\t\treturn propStream.read(buffs[currentBuff++]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a740e47a111b2f6e8781cf2b9b075c7adc6b9ec40b68b80450bf53fa5e1665a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 487, + "startColumn": 35, + "charOffset": 12337, + "charLength": 5, + "snippet": { + "text": "buffs" + } + }, + "contextRegion": { + "startLine": 485, + "startColumn": 35, + "charOffset": 12203, + "charLength": 5, + "snippet": { + "text": "\t\treturn propStream.read(stats[currentStat++]);\n\t} else if (attr == CONDITIONATTR_BUFFS) {\n\t\treturn propStream.read(buffs[currentBuff++]);\n\t} else if (attr == CONDITIONATTR_ABSORBS) {\n\t\tfor (int32_t i = 0; i < CombatType_t::COMBAT_COUNT; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d010fb48a36747279bdbbdddef3364344fb4ed9080de70d9ddcee2513997efb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 489, + "startColumn": 3, + "charOffset": 12407, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 487, + "startColumn": 3, + "charOffset": 12303, + "charLength": 3, + "snippet": { + "text": "\t\treturn propStream.read(buffs[currentBuff++]);\n\t} else if (attr == CONDITIONATTR_ABSORBS) {\n\t\tfor (int32_t i = 0; i < CombatType_t::COMBAT_COUNT; ++i) {\n\t\t\tuint8_t index;\n\t\t\tint32_t value;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "400350332dd669ae763bc2671058f258e6c54361ae16af4561a187de322737e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'index' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 490, + "startColumn": 12, + "charOffset": 12477, + "charLength": 5, + "snippet": { + "text": "index" + } + }, + "contextRegion": { + "startLine": 488, + "startColumn": 12, + "charOffset": 12360, + "charLength": 5, + "snippet": { + "text": "\t} else if (attr == CONDITIONATTR_ABSORBS) {\n\t\tfor (int32_t i = 0; i < CombatType_t::COMBAT_COUNT; ++i) {\n\t\t\tuint8_t index;\n\t\t\tint32_t value;\n\t\t\tif (!propStream.read(index) || !propStream.read(value)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9936f4e3e29ffd4d7e7c0d78026f1890269985e2bb81fbc6a01435b2d5e29fc0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'value' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 491, + "startColumn": 12, + "charOffset": 12495, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 489, + "startColumn": 12, + "charOffset": 12405, + "charLength": 5, + "snippet": { + "text": "\t\tfor (int32_t i = 0; i < CombatType_t::COMBAT_COUNT; ++i) {\n\t\t\tuint8_t index;\n\t\t\tint32_t value;\n\t\t\tif (!propStream.read(index) || !propStream.read(value)) {\n\t\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44a66c0c5ac58b3319c2488e73339cbea2aafd787abe7b498c0fd888898e80b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 501, + "startColumn": 3, + "charOffset": 12702, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 499, + "startColumn": 3, + "charOffset": 12638, + "charLength": 3, + "snippet": { + "text": "\t\treturn true;\n\t} else if (attr == CONDITIONATTR_INCREASES) {\n\t\tfor (int32_t i = 0; i < CombatType_t::COMBAT_COUNT; ++i) {\n\t\t\tuint8_t index;\n\t\t\tint32_t value;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c681ed3f7b4e8cd14fad2eabfee62c4808ccbb5deb534d8710a785252163416e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'index' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 502, + "startColumn": 12, + "charOffset": 12772, + "charLength": 5, + "snippet": { + "text": "index" + } + }, + "contextRegion": { + "startLine": 500, + "startColumn": 12, + "charOffset": 12653, + "charLength": 5, + "snippet": { + "text": "\t} else if (attr == CONDITIONATTR_INCREASES) {\n\t\tfor (int32_t i = 0; i < CombatType_t::COMBAT_COUNT; ++i) {\n\t\t\tuint8_t index;\n\t\t\tint32_t value;\n\t\t\tif (!propStream.read(index) || !propStream.read(value)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8202cf3edb38b2d97616661fc84d3bfe70e158d17d5a1cc2ab7f417cb17458b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'value' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 503, + "startColumn": 12, + "charOffset": 12790, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 501, + "startColumn": 12, + "charOffset": 12700, + "charLength": 5, + "snippet": { + "text": "\t\tfor (int32_t i = 0; i < CombatType_t::COMBAT_COUNT; ++i) {\n\t\t\tuint8_t index;\n\t\t\tint32_t value;\n\t\t\tif (!propStream.read(index) || !propStream.read(value)) {\n\t\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35552e35bd7d5e29f9f75be7f89e72a0336d4a7f56723d0ab66bc4ec7e5fa889" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 521, + "startColumn": 2, + "charOffset": 13238, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 519, + "startColumn": 2, + "charOffset": 13196, + "charLength": 3, + "snippet": { + "text": "\tCondition::serialize(propWriteStream);\n\n\tfor (int32_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\n\t\tpropWriteStream.write(CONDITIONATTR_SKILLS);\n\t\tpropWriteStream.write(skills[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2f854ff542123085e0017bcd603ae721e941d6de87e497875ef129d4f6331d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 522, + "startColumn": 34, + "charOffset": 13325, + "charLength": 20, + "snippet": { + "text": "CONDITIONATTR_SKILLS" + } + }, + "contextRegion": { + "startLine": 520, + "startColumn": 34, + "charOffset": 13236, + "charLength": 20, + "snippet": { + "text": "\n\tfor (int32_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\n\t\tpropWriteStream.write(CONDITIONATTR_SKILLS);\n\t\tpropWriteStream.write(skills[i]);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03427814489ed8748fee3652853582126ed5a3a858062289d31fc3b4d5e6219e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 523, + "startColumn": 34, + "charOffset": 13381, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 521, + "startColumn": 34, + "charOffset": 13237, + "charLength": 6, + "snippet": { + "text": "\tfor (int32_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\n\t\tpropWriteStream.write(CONDITIONATTR_SKILLS);\n\t\tpropWriteStream.write(skills[i]);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a115250ddb1e95ae2af2e8f3f8b3ffce8a257576827f2c9da8495b982fc978af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 526, + "startColumn": 2, + "charOffset": 13398, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 524, + "startColumn": 2, + "charOffset": 13393, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (int32_t i = STAT_FIRST; i <= STAT_LAST; ++i) {\n\t\tpropWriteStream.write(CONDITIONATTR_STATS);\n\t\tpropWriteStream.write(stats[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8358ddd2e9e0a30e2eae7562b89c9d4cdf3b6f937441acff23b9dac1f634deaa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 527, + "startColumn": 34, + "charOffset": 13483, + "charLength": 19, + "snippet": { + "text": "CONDITIONATTR_STATS" + } + }, + "contextRegion": { + "startLine": 525, + "startColumn": 34, + "charOffset": 13396, + "charLength": 19, + "snippet": { + "text": "\n\tfor (int32_t i = STAT_FIRST; i <= STAT_LAST; ++i) {\n\t\tpropWriteStream.write(CONDITIONATTR_STATS);\n\t\tpropWriteStream.write(stats[i]);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f848cb6ce4eb4ee5bda16edaf823d19d8a095d4c7ad7b78380121abe946a3e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 528, + "startColumn": 34, + "charOffset": 13538, + "charLength": 5, + "snippet": { + "text": "stats" + } + }, + "contextRegion": { + "startLine": 526, + "startColumn": 34, + "charOffset": 13397, + "charLength": 5, + "snippet": { + "text": "\tfor (int32_t i = STAT_FIRST; i <= STAT_LAST; ++i) {\n\t\tpropWriteStream.write(CONDITIONATTR_STATS);\n\t\tpropWriteStream.write(stats[i]);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ea95e56021516bfbaecb350651d8f05a3d210b18026b4a39395c7f3daa2229c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 531, + "startColumn": 2, + "charOffset": 13554, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 529, + "startColumn": 2, + "charOffset": 13549, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (int32_t i = BUFF_FIRST; i <= BUFF_LAST; ++i) {\n\t\tpropWriteStream.write(CONDITIONATTR_BUFFS);\n\t\tpropWriteStream.write(buffs[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8c1c17798234790e5dd79945d4640f48a3c7f9bca492447a3fbc69d82a2ac08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 532, + "startColumn": 34, + "charOffset": 13639, + "charLength": 19, + "snippet": { + "text": "CONDITIONATTR_BUFFS" + } + }, + "contextRegion": { + "startLine": 530, + "startColumn": 34, + "charOffset": 13552, + "charLength": 19, + "snippet": { + "text": "\n\tfor (int32_t i = BUFF_FIRST; i <= BUFF_LAST; ++i) {\n\t\tpropWriteStream.write(CONDITIONATTR_BUFFS);\n\t\tpropWriteStream.write(buffs[i]);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90aa57cef84b2beda7c5dc97b1dd1d48026a0d2f5ff2692ef5e88770f6944deb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 533, + "startColumn": 34, + "charOffset": 13694, + "charLength": 5, + "snippet": { + "text": "buffs" + } + }, + "contextRegion": { + "startLine": 531, + "startColumn": 34, + "charOffset": 13553, + "charLength": 5, + "snippet": { + "text": "\tfor (int32_t i = BUFF_FIRST; i <= BUFF_LAST; ++i) {\n\t\tpropWriteStream.write(CONDITIONATTR_BUFFS);\n\t\tpropWriteStream.write(buffs[i]);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fbea84821226ca4b49c32faf9135101e9d7f9f9f822e7fa33b21690a1b4c71b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 537, + "startColumn": 33, + "charOffset": 13768, + "charLength": 21, + "snippet": { + "text": "CONDITIONATTR_ABSORBS" + } + }, + "contextRegion": { + "startLine": 535, + "startColumn": 33, + "charOffset": 13708, + "charLength": 21, + "snippet": { + "text": "\n\t// Save attribute absorbs\n\tpropWriteStream.write(CONDITIONATTR_ABSORBS);\n\tfor (int32_t i = 0; i < CombatType_t::COMBAT_COUNT; ++i) {\n\t\t// Save index" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93927670d1e2cba0dba98f2c6abd918bbac7fce2737002dbf7bc89f3ac6056be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 538, + "startColumn": 2, + "charOffset": 13793, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 536, + "startColumn": 2, + "charOffset": 13709, + "charLength": 3, + "snippet": { + "text": "\t// Save attribute absorbs\n\tpropWriteStream.write(CONDITIONATTR_ABSORBS);\n\tfor (int32_t i = 0; i < CombatType_t::COMBAT_COUNT; ++i) {\n\t\t// Save index\n\t\tpropWriteStream.write(i);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "382cf06f974e650a75cd0149d2e25180ca53a2c601b2bf9e253b16bb98cbf3a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 540, + "startColumn": 34, + "charOffset": 13901, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 538, + "startColumn": 34, + "charOffset": 13792, + "charLength": 1, + "snippet": { + "text": "\tfor (int32_t i = 0; i < CombatType_t::COMBAT_COUNT; ++i) {\n\t\t// Save index\n\t\tpropWriteStream.write(i);\n\t\t// Save percent\n\t\tpropWriteStream.write(getAbsorbByIndex(i));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb4f2d066024a563b903dd23ca47e8f55e993355fad261f45fd96aaf12c148de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 542, + "startColumn": 51, + "charOffset": 13973, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 540, + "startColumn": 51, + "charOffset": 13868, + "charLength": 1, + "snippet": { + "text": "\t\tpropWriteStream.write(i);\n\t\t// Save percent\n\t\tpropWriteStream.write(getAbsorbByIndex(i));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b6227309b4baf38fe36188db4bf6f9560be5dc7040734bf785a9d88c969950f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 546, + "startColumn": 33, + "charOffset": 14043, + "charLength": 23, + "snippet": { + "text": "CONDITIONATTR_INCREASES" + } + }, + "contextRegion": { + "startLine": 544, + "startColumn": 33, + "charOffset": 13981, + "charLength": 23, + "snippet": { + "text": "\n\t// Save attribute increases\n\tpropWriteStream.write(CONDITIONATTR_INCREASES);\n\tfor (int32_t i = 0; i < CombatType_t::COMBAT_COUNT; ++i) {\n\t\t// Save index" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d8cfdd2a2ee33af2996352359d6b5251b6a09bbbebd263b9018867c96e0dbef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 547, + "startColumn": 2, + "charOffset": 14070, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 545, + "startColumn": 2, + "charOffset": 13982, + "charLength": 3, + "snippet": { + "text": "\t// Save attribute increases\n\tpropWriteStream.write(CONDITIONATTR_INCREASES);\n\tfor (int32_t i = 0; i < CombatType_t::COMBAT_COUNT; ++i) {\n\t\t// Save index\n\t\tpropWriteStream.write(i);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f276b1156d44363f0bd0a03d444211283c4688851aa54dc7acc16e46fc851722" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 549, + "startColumn": 34, + "charOffset": 14178, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 547, + "startColumn": 34, + "charOffset": 14069, + "charLength": 1, + "snippet": { + "text": "\tfor (int32_t i = 0; i < CombatType_t::COMBAT_COUNT; ++i) {\n\t\t// Save index\n\t\tpropWriteStream.write(i);\n\t\t// Save percent\n\t\tpropWriteStream.write(getIncreaseByIndex(i));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94b842dcbd71c83e8be68cd7fcacc3fe734952f7ccc986191aff86083afd82ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 551, + "startColumn": 53, + "charOffset": 14252, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 549, + "startColumn": 53, + "charOffset": 14145, + "charLength": 1, + "snippet": { + "text": "\t\tpropWriteStream.write(i);\n\t\t// Save percent\n\t\tpropWriteStream.write(getIncreaseByIndex(i));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf9c70c51b94f5ae5264aaa9f05b953bebb74ad9bf65233dfcf4830b51b2b031" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 555, + "startColumn": 33, + "charOffset": 14316, + "charLength": 35, + "snippet": { + "text": "CONDITIONATTR_CHARM_CHANCE_MODIFIER" + } + }, + "contextRegion": { + "startLine": 553, + "startColumn": 33, + "charOffset": 14260, + "charLength": 35, + "snippet": { + "text": "\n\t// Save charm percent\n\tpropWriteStream.write(CONDITIONATTR_CHARM_CHANCE_MODIFIER);\n\tpropWriteStream.write(charmChanceModifier);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d138155c4a47e64d0031265772fbdf79db6d3d49af9fceb96a5dd07df3096d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-parent-virtual-call", + "ruleIndex": 80, + "kind": "fail", + "level": "warning", + "message": { + "text": "qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 560, + "startColumn": 7, + "charOffset": 14495, + "charLength": 9, + "snippet": { + "text": "Condition" + } + }, + "contextRegion": { + "startLine": 558, + "startColumn": 7, + "charOffset": 14409, + "charLength": 9, + "snippet": { + "text": "\nbool ConditionAttributes::startCondition(std::shared_ptr creature) {\n\tif (!Condition::startCondition(creature)) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2369d39cfe395707644d31dbb82f2f02a63d85787be0f729ad4559e133d2c4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 583, + "startColumn": 70, + "charOffset": 15093, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 581, + "startColumn": 70, + "charOffset": 15021, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid ConditionAttributes::updatePercentStats(std::shared_ptr player) {\n\tfor (int32_t i = STAT_FIRST; i <= STAT_LAST; ++i) {\n\t\tif (statsPercent[i] == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f2e81debc10c9ab49de1d4440d5b11f31c1267f6a3960455af7de30922b1aaf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 584, + "startColumn": 2, + "charOffset": 15104, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 582, + "startColumn": 2, + "charOffset": 15023, + "charLength": 3, + "snippet": { + "text": "\nvoid ConditionAttributes::updatePercentStats(std::shared_ptr player) {\n\tfor (int32_t i = STAT_FIRST; i <= STAT_LAST; ++i) {\n\t\tif (statsPercent[i] == 0) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5aa3e42f285789dd50b3359a495c0b01b3e14bf1e2c2910847fc7332fdd2f36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 585, + "startColumn": 7, + "charOffset": 15162, + "charLength": 12, + "snippet": { + "text": "statsPercent" + } + }, + "contextRegion": { + "startLine": 583, + "startColumn": 7, + "charOffset": 15024, + "charLength": 12, + "snippet": { + "text": "void ConditionAttributes::updatePercentStats(std::shared_ptr player) {\n\tfor (int32_t i = STAT_FIRST; i <= STAT_LAST; ++i) {\n\t\tif (statsPercent[i] == 0) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d2591042bbabfa45e2ff9c6df9d89fe651220eb5ec3ad3b1ccac8607fd72477" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-switch-missing-default-case", + "ruleIndex": 104, + "kind": "fail", + "level": "warning", + "message": { + "text": "switching on non-enum value without default case may not cover all cases" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 589, + "startColumn": 3, + "charOffset": 15206, + "charLength": 6, + "snippet": { + "text": "switch" + } + }, + "contextRegion": { + "startLine": 587, + "startColumn": 3, + "charOffset": 15199, + "charLength": 6, + "snippet": { + "text": "\t\t}\n\n\t\tswitch (i) {\n\t\t\tcase STAT_MAXHITPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getMaxHealth() * ((statsPercent[i] - 100) / 100.f));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fcd6ede5c9677f3e6714696a4d6c2ab42dcd7ab39b7515e3b044889770e3246c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-6", + "ruleIndex": 453, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-6: The final clause of a switch statement shall be the default-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 589, + "startColumn": 3, + "charOffset": 15206, + "charLength": 6, + "snippet": { + "text": "switch" + } + }, + "contextRegion": { + "startLine": 587, + "startColumn": 3, + "charOffset": 15199, + "charLength": 6, + "snippet": { + "text": "\t\t}\n\n\t\tswitch (i) {\n\t\t\tcase STAT_MAXHITPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getMaxHealth() * ((statsPercent[i] - 100) / 100.f));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3153d97952096fa8df707e99a26267a6d2f0bfe180c2de9c8f06bf09e47900d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-multiway-paths-covered", + "ruleIndex": 560, + "kind": "fail", + "level": "warning", + "message": { + "text": "potential uncovered code path; add a default label" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 589, + "startColumn": 3, + "charOffset": 15206, + "charLength": 6, + "snippet": { + "text": "switch" + } + }, + "contextRegion": { + "startLine": 587, + "startColumn": 3, + "charOffset": 15199, + "charLength": 6, + "snippet": { + "text": "\t\t}\n\n\t\tswitch (i) {\n\t\t\tcase STAT_MAXHITPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getMaxHealth() * ((statsPercent[i] - 100) / 100.f));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c9c246367665ae5f8812d045ca1dab939f43b089ab626270b5f0dac42eea3c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 591, + "startColumn": 5, + "charOffset": 15250, + "charLength": 5, + "snippet": { + "text": "stats" + } + }, + "contextRegion": { + "startLine": 589, + "startColumn": 5, + "charOffset": 15204, + "charLength": 5, + "snippet": { + "text": "\t\tswitch (i) {\n\t\t\tcase STAT_MAXHITPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getMaxHealth() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "595c3f62815f72b86f11df84fc35667e42c15426552b0bb3b6990d0c01f83a2d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 591, + "startColumn": 37, + "charOffset": 15282, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 589, + "startColumn": 37, + "charOffset": 15204, + "charLength": 6, + "snippet": { + "text": "\t\tswitch (i) {\n\t\t\tcase STAT_MAXHITPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getMaxHealth() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "135ed3e3129b63871634ce06a9b2b28ca1ecae8891d72543cc02e1ff47b78372" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 591, + "startColumn": 37, + "charOffset": 15282, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 589, + "startColumn": 37, + "charOffset": 15204, + "charLength": 6, + "snippet": { + "text": "\t\tswitch (i) {\n\t\t\tcase STAT_MAXHITPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getMaxHealth() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fbaf66df9d613eb905420bb7f51bf869d6ccc26f7a516106376acc133962b6f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 591, + "startColumn": 63, + "charOffset": 15308, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 589, + "startColumn": 63, + "charOffset": 15204, + "charLength": 1, + "snippet": { + "text": "\t\tswitch (i) {\n\t\t\tcase STAT_MAXHITPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getMaxHealth() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf48c0ff32a67554760a0d51290b8107c6708b93a4289097a39876fa333cc63d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 591, + "startColumn": 63, + "charOffset": 15308, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 589, + "startColumn": 63, + "charOffset": 15204, + "charLength": 1, + "snippet": { + "text": "\t\tswitch (i) {\n\t\t\tcase STAT_MAXHITPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getMaxHealth() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9464cd5b8135a9b3c4be9ef37b045dc11b5b3afee440a83aa5d37fcef25cde8b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 591, + "startColumn": 64, + "charOffset": 15309, + "charLength": 12, + "snippet": { + "text": "statsPercent" + } + }, + "contextRegion": { + "startLine": 589, + "startColumn": 64, + "charOffset": 15204, + "charLength": 12, + "snippet": { + "text": "\t\tswitch (i) {\n\t\t\tcase STAT_MAXHITPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getMaxHealth() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a740e47a111b2f6e8781cf2b9b075c7adc6b9ec40b68b80450bf53fa5e1665a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 591, + "startColumn": 82, + "charOffset": 15327, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 589, + "startColumn": 82, + "charOffset": 15204, + "charLength": 3, + "snippet": { + "text": "\t\tswitch (i) {\n\t\t\tcase STAT_MAXHITPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getMaxHealth() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4af0291def83e7b6d564821aa9f380e4b7c33e7460e7ae81c11ac67972d25cab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 591, + "startColumn": 89, + "charOffset": 15334, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 589, + "startColumn": 89, + "charOffset": 15204, + "charLength": 5, + "snippet": { + "text": "\t\tswitch (i) {\n\t\t\tcase STAT_MAXHITPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getMaxHealth() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec5df40acf05582072826e8d170358a760b205e391c2331bbfbd80909ca593fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 591, + "startColumn": 89, + "charOffset": 15334, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 589, + "startColumn": 89, + "charOffset": 15204, + "charLength": 5, + "snippet": { + "text": "\t\tswitch (i) {\n\t\t\tcase STAT_MAXHITPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getMaxHealth() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7e863d659b1b576b0defec3010c367e1e03e984ad8c25e47a09573d81ba609e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 595, + "startColumn": 5, + "charOffset": 15387, + "charLength": 5, + "snippet": { + "text": "stats" + } + }, + "contextRegion": { + "startLine": 593, + "startColumn": 5, + "charOffset": 15354, + "charLength": 5, + "snippet": { + "text": "\n\t\t\tcase STAT_MAXMANAPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getMaxMana() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b9b3e8113072245001f3a0ccb3bdab397f3814807d723cf1e51cba2ad7ed41f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 595, + "startColumn": 37, + "charOffset": 15419, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 593, + "startColumn": 37, + "charOffset": 15354, + "charLength": 6, + "snippet": { + "text": "\n\t\t\tcase STAT_MAXMANAPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getMaxMana() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3d58e1528d2dce2390a611f81744bd4c7a57243a16c79bf57ebc543ae0d8b7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 595, + "startColumn": 37, + "charOffset": 15419, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 593, + "startColumn": 37, + "charOffset": 15354, + "charLength": 6, + "snippet": { + "text": "\n\t\t\tcase STAT_MAXMANAPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getMaxMana() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f97fa3d0816e5bed30e0e808dba5f2d6e606cfe7cd9380efc0af95277f9934ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 595, + "startColumn": 61, + "charOffset": 15443, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 593, + "startColumn": 61, + "charOffset": 15354, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tcase STAT_MAXMANAPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getMaxMana() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f53c12610886eda7ab02eebf83ccb41f30806abe6f39b268cac1a41751603d17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 595, + "startColumn": 61, + "charOffset": 15443, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 593, + "startColumn": 61, + "charOffset": 15354, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tcase STAT_MAXMANAPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getMaxMana() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60daaf1466497b3f4b34bd05335df92383a582158410a43aab6028359170423c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 595, + "startColumn": 62, + "charOffset": 15444, + "charLength": 12, + "snippet": { + "text": "statsPercent" + } + }, + "contextRegion": { + "startLine": 593, + "startColumn": 62, + "charOffset": 15354, + "charLength": 12, + "snippet": { + "text": "\n\t\t\tcase STAT_MAXMANAPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getMaxMana() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "737a7ba354d79b8431975e0b3038d5f3e8f27bb84002e05da88b75d8e17b6031" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 595, + "startColumn": 80, + "charOffset": 15462, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 593, + "startColumn": 80, + "charOffset": 15354, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tcase STAT_MAXMANAPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getMaxMana() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10d0c78d5e189095606a191a43d3e9ef6998cc3f857fb42845205055ed8b16c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 595, + "startColumn": 87, + "charOffset": 15469, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 593, + "startColumn": 87, + "charOffset": 15354, + "charLength": 5, + "snippet": { + "text": "\n\t\t\tcase STAT_MAXMANAPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getMaxMana() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c35f1032184b213f49d46e4a6a44cd28910f539365a72a217ef64768fb4013c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 595, + "startColumn": 87, + "charOffset": 15469, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 593, + "startColumn": 87, + "charOffset": 15354, + "charLength": 5, + "snippet": { + "text": "\n\t\t\tcase STAT_MAXMANAPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getMaxMana() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8fb70cbd36c6a0ad957d95024e07e8cf2fe3413d643b07cfbdb583a3cd03cf6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 599, + "startColumn": 5, + "charOffset": 15520, + "charLength": 5, + "snippet": { + "text": "stats" + } + }, + "contextRegion": { + "startLine": 597, + "startColumn": 5, + "charOffset": 15489, + "charLength": 5, + "snippet": { + "text": "\n\t\t\tcase STAT_MAGICPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getBaseMagicLevel() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa19281f0984c1787bf00eff964102c52d012af691da1af0dafd083492f17d8d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 599, + "startColumn": 37, + "charOffset": 15552, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 597, + "startColumn": 37, + "charOffset": 15489, + "charLength": 6, + "snippet": { + "text": "\n\t\t\tcase STAT_MAGICPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getBaseMagicLevel() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbfeb3b87e2c8e182d8235cc58f2f33ceb240a3419eb10925b3af2f717103788" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 599, + "startColumn": 37, + "charOffset": 15552, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 597, + "startColumn": 37, + "charOffset": 15489, + "charLength": 6, + "snippet": { + "text": "\n\t\t\tcase STAT_MAGICPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getBaseMagicLevel() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c6dffeb1732a3158684a32a4908ff337ac87c3fcac1590351cd3ceeaa4e8e9c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 599, + "startColumn": 68, + "charOffset": 15583, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 597, + "startColumn": 68, + "charOffset": 15489, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tcase STAT_MAGICPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getBaseMagicLevel() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6dc81a8906d5e82805aa34e1f3aafc6a373b66e701cb8531a2d0e7d61a249d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 599, + "startColumn": 68, + "charOffset": 15583, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 597, + "startColumn": 68, + "charOffset": 15489, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tcase STAT_MAGICPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getBaseMagicLevel() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ddf78e67b4cd8052ef1d2dd3f317b4d5d0c6c00bb9ffaa7ac82797b15e37138" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 599, + "startColumn": 69, + "charOffset": 15584, + "charLength": 12, + "snippet": { + "text": "statsPercent" + } + }, + "contextRegion": { + "startLine": 597, + "startColumn": 69, + "charOffset": 15489, + "charLength": 12, + "snippet": { + "text": "\n\t\t\tcase STAT_MAGICPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getBaseMagicLevel() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "067049889e9d5c0b49b4063fa10e1ab3616eef75f89a5968ec110cd577c6af07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 599, + "startColumn": 87, + "charOffset": 15602, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 597, + "startColumn": 87, + "charOffset": 15489, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tcase STAT_MAGICPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getBaseMagicLevel() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "353eab12952630af72fceeaf8bfa2a192f9a231e2ef0d94f46aa7105f7716dcc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 599, + "startColumn": 94, + "charOffset": 15609, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 597, + "startColumn": 94, + "charOffset": 15489, + "charLength": 5, + "snippet": { + "text": "\n\t\t\tcase STAT_MAGICPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getBaseMagicLevel() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e50a6c58949054ce0753a6c162a6ae4dbde8e3e49382b6da1c26c3d379a7443" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 599, + "startColumn": 94, + "charOffset": 15609, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 597, + "startColumn": 94, + "charOffset": 15489, + "charLength": 5, + "snippet": { + "text": "\n\t\t\tcase STAT_MAGICPOINTS:\n\t\t\t\tstats[i] = static_cast(player->getBaseMagicLevel() * ((statsPercent[i] - 100) / 100.f));\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de299ab26b8f0d36211fa7ae9a93b6340744c9f03f7f0575af88c938853b6c74" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 603, + "startColumn": 5, + "charOffset": 15657, + "charLength": 5, + "snippet": { + "text": "stats" + } + }, + "contextRegion": { + "startLine": 601, + "startColumn": 5, + "charOffset": 15629, + "charLength": 5, + "snippet": { + "text": "\n\t\t\tcase STAT_CAPACITY:\n\t\t\t\tstats[i] = static_cast(player->getCapacity() * (statsPercent[i] / 100.f));\n\t\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0584a2232eeac1956ccdbdc761752eced5e122b3ad4c89b6939bef37082952c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 603, + "startColumn": 37, + "charOffset": 15689, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 601, + "startColumn": 37, + "charOffset": 15629, + "charLength": 6, + "snippet": { + "text": "\n\t\t\tcase STAT_CAPACITY:\n\t\t\t\tstats[i] = static_cast(player->getCapacity() * (statsPercent[i] / 100.f));\n\t\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "683b133724c2261f1d6650eaaaac10610b64c08d4d80b54e29e87f8c5bd0657a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 603, + "startColumn": 37, + "charOffset": 15689, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 601, + "startColumn": 37, + "charOffset": 15629, + "charLength": 6, + "snippet": { + "text": "\n\t\t\tcase STAT_CAPACITY:\n\t\t\t\tstats[i] = static_cast(player->getCapacity() * (statsPercent[i] / 100.f));\n\t\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f01f0c3fe03f0df7451e929e9fb633c560d9d7924f3b85845d1ae06775f23fa4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 603, + "startColumn": 62, + "charOffset": 15714, + "charLength": 12, + "snippet": { + "text": "statsPercent" + } + }, + "contextRegion": { + "startLine": 601, + "startColumn": 62, + "charOffset": 15629, + "charLength": 12, + "snippet": { + "text": "\n\t\t\tcase STAT_CAPACITY:\n\t\t\t\tstats[i] = static_cast(player->getCapacity() * (statsPercent[i] / 100.f));\n\t\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "caae4af7b4514c3effd5f2224dffa08798ec76ddee96a9eff7d401534d64fd09" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 603, + "startColumn": 62, + "charOffset": 15714, + "charLength": 12, + "snippet": { + "text": "statsPercent" + } + }, + "contextRegion": { + "startLine": 601, + "startColumn": 62, + "charOffset": 15629, + "charLength": 12, + "snippet": { + "text": "\n\t\t\tcase STAT_CAPACITY:\n\t\t\t\tstats[i] = static_cast(player->getCapacity() * (statsPercent[i] / 100.f));\n\t\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3333c4eaaa6be81bf27ba975631ef2abcc70e3a77af06f134006526859b1562f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 603, + "startColumn": 62, + "charOffset": 15714, + "charLength": 12, + "snippet": { + "text": "statsPercent" + } + }, + "contextRegion": { + "startLine": 601, + "startColumn": 62, + "charOffset": 15629, + "charLength": 12, + "snippet": { + "text": "\n\t\t\tcase STAT_CAPACITY:\n\t\t\t\tstats[i] = static_cast(player->getCapacity() * (statsPercent[i] / 100.f));\n\t\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a84eebc8f21a3b5c0ea91448b7929ffe0ed2b57ff318aa9e8a799fbcf1d24803" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 603, + "startColumn": 80, + "charOffset": 15732, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 601, + "startColumn": 80, + "charOffset": 15629, + "charLength": 5, + "snippet": { + "text": "\n\t\t\tcase STAT_CAPACITY:\n\t\t\t\tstats[i] = static_cast(player->getCapacity() * (statsPercent[i] / 100.f));\n\t\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dab04a736928b707ab99b49a03d9d32ae13cccc0a6a2d51f964c536f11582860" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 603, + "startColumn": 80, + "charOffset": 15732, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 601, + "startColumn": 80, + "charOffset": 15629, + "charLength": 5, + "snippet": { + "text": "\n\t\t\tcase STAT_CAPACITY:\n\t\t\t\tstats[i] = static_cast(player->getCapacity() * (statsPercent[i] / 100.f));\n\t\t\t\tbreak;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3f3585ed24e50159d7dfd339411874ecea10eebd066f58e1d277449182e084d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 609, + "startColumn": 63, + "charOffset": 15824, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 607, + "startColumn": 63, + "charOffset": 15759, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid ConditionAttributes::updateStats(std::shared_ptr player) {\n\tbool needUpdate = false;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afbff3e0514646ad6d7d5a32ebb1c3a968376d0d123b14e250d4f99e4811bff6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 612, + "startColumn": 2, + "charOffset": 15862, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 610, + "startColumn": 2, + "charOffset": 15834, + "charLength": 3, + "snippet": { + "text": "\tbool needUpdate = false;\n\n\tfor (int32_t i = STAT_FIRST; i <= STAT_LAST; ++i) {\n\t\tif (stats[i]) {\n\t\t\tneedUpdate = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f276b1156d44363f0bd0a03d444211283c4688851aa54dc7acc16e46fc851722" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 613, + "startColumn": 7, + "charOffset": 15920, + "charLength": 5, + "snippet": { + "text": "stats" + } + }, + "contextRegion": { + "startLine": 611, + "startColumn": 7, + "charOffset": 15860, + "charLength": 5, + "snippet": { + "text": "\n\tfor (int32_t i = STAT_FIRST; i <= STAT_LAST; ++i) {\n\t\tif (stats[i]) {\n\t\t\tneedUpdate = true;\n\t\t\tplayer->setVarStats(static_cast(i), stats[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62ff951f7fa1835b4b00e8d3a78439cefb12e11f9b9ec6fd088dc6cffde68d6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 613, + "startColumn": 7, + "charOffset": 15920, + "charLength": 5, + "snippet": { + "text": "stats" + } + }, + "contextRegion": { + "startLine": 611, + "startColumn": 7, + "charOffset": 15860, + "charLength": 5, + "snippet": { + "text": "\n\tfor (int32_t i = STAT_FIRST; i <= STAT_LAST; ++i) {\n\t\tif (stats[i]) {\n\t\t\tneedUpdate = true;\n\t\t\tplayer->setVarStats(static_cast(i), stats[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cf292f3a5afe8a9a7985e00d9f440413c728f722181e9b929ba8e3056db5d7a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 613, + "startColumn": 7, + "charOffset": 15920, + "charLength": 5, + "snippet": { + "text": "stats" + } + }, + "contextRegion": { + "startLine": 611, + "startColumn": 7, + "charOffset": 15860, + "charLength": 5, + "snippet": { + "text": "\n\tfor (int32_t i = STAT_FIRST; i <= STAT_LAST; ++i) {\n\t\tif (stats[i]) {\n\t\t\tneedUpdate = true;\n\t\t\tplayer->setVarStats(static_cast(i), stats[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9271cbcc3bf47a55ffbb4bfc6c1750c75a9f703cd00d652dce5be28a0ec65fde" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 615, + "startColumn": 49, + "charOffset": 16002, + "charLength": 5, + "snippet": { + "text": "stats" + } + }, + "contextRegion": { + "startLine": 613, + "startColumn": 49, + "charOffset": 15914, + "charLength": 5, + "snippet": { + "text": "\t\tif (stats[i]) {\n\t\t\tneedUpdate = true;\n\t\t\tplayer->setVarStats(static_cast(i), stats[i]);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d6c8a1690f7e5a4e69523ff25f16958c7b14ee0003e39fee82d4169f5ca912f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 625, + "startColumn": 71, + "charOffset": 16163, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 623, + "startColumn": 71, + "charOffset": 16090, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid ConditionAttributes::updatePercentSkills(std::shared_ptr player) {\n\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\n\t\tskills_t skill = static_cast(i);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ce0775caf96e7e6764583eb1e6dfe6d6b8b8219a34ef498498025821d270cbc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 626, + "startColumn": 2, + "charOffset": 16174, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 624, + "startColumn": 2, + "charOffset": 16092, + "charLength": 3, + "snippet": { + "text": "\nvoid ConditionAttributes::updatePercentSkills(std::shared_ptr player) {\n\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\n\t\tskills_t skill = static_cast(i);\n\t\tif (skillsPercent[skill] == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b23497945fa580ed84645d7720f0995f08b4c1f6484e92d1a622b780eadb705" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 627, + "startColumn": 3, + "charOffset": 16230, + "charLength": 8, + "snippet": { + "text": "skills_t" + } + }, + "contextRegion": { + "startLine": 625, + "startColumn": 3, + "charOffset": 16093, + "charLength": 8, + "snippet": { + "text": "void ConditionAttributes::updatePercentSkills(std::shared_ptr player) {\n\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\n\t\tskills_t skill = static_cast(i);\n\t\tif (skillsPercent[skill] == 0) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "357e70f41dc069552d9b7ea7b66b3cf5bf098c870d06f1bb37e33aeb5c79d2c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 628, + "startColumn": 7, + "charOffset": 16279, + "charLength": 13, + "snippet": { + "text": "skillsPercent" + } + }, + "contextRegion": { + "startLine": 626, + "startColumn": 7, + "charOffset": 16173, + "charLength": 13, + "snippet": { + "text": "\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\n\t\tskills_t skill = static_cast(i);\n\t\tif (skillsPercent[skill] == 0) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06031a1677ba9a372a0e535bc7260b95ae0ce1d775fcbfd16907d70296e0e303" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 633, + "startColumn": 3, + "charOffset": 16385, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 631, + "startColumn": 3, + "charOffset": 16325, + "charLength": 6, + "snippet": { + "text": "\n\t\tint32_t unmodifiedSkill = player->getBaseSkill(skill);\n\t\tskills[skill] = static_cast(unmodifiedSkill * ((skillsPercent[skill] - 100) / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c59f4fc1d272f4d397ae3c32ac1e371fdd57a6ae47d4fd16f2220ba57a4facfe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 633, + "startColumn": 40, + "charOffset": 16422, + "charLength": 15, + "snippet": { + "text": "unmodifiedSkill" + } + }, + "contextRegion": { + "startLine": 631, + "startColumn": 40, + "charOffset": 16325, + "charLength": 15, + "snippet": { + "text": "\n\t\tint32_t unmodifiedSkill = player->getBaseSkill(skill);\n\t\tskills[skill] = static_cast(unmodifiedSkill * ((skillsPercent[skill] - 100) / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9be5032ad1c0dfadd6ce0072bfd816482356077d1c1e4587a4b603c91d6245ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 633, + "startColumn": 40, + "charOffset": 16422, + "charLength": 15, + "snippet": { + "text": "unmodifiedSkill" + } + }, + "contextRegion": { + "startLine": 631, + "startColumn": 40, + "charOffset": 16325, + "charLength": 15, + "snippet": { + "text": "\n\t\tint32_t unmodifiedSkill = player->getBaseSkill(skill);\n\t\tskills[skill] = static_cast(unmodifiedSkill * ((skillsPercent[skill] - 100) / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc1ed01d0843a35a7fb9b57f05da8a83536ed2e3a6b1e82e5444ebd872614728" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 633, + "startColumn": 59, + "charOffset": 16441, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 631, + "startColumn": 59, + "charOffset": 16325, + "charLength": 1, + "snippet": { + "text": "\n\t\tint32_t unmodifiedSkill = player->getBaseSkill(skill);\n\t\tskills[skill] = static_cast(unmodifiedSkill * ((skillsPercent[skill] - 100) / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14e274ae36f178e3d75bce4776350caf96d020ca9ac0fe4b68000e2776cb4925" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 633, + "startColumn": 59, + "charOffset": 16441, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 631, + "startColumn": 59, + "charOffset": 16325, + "charLength": 1, + "snippet": { + "text": "\n\t\tint32_t unmodifiedSkill = player->getBaseSkill(skill);\n\t\tskills[skill] = static_cast(unmodifiedSkill * ((skillsPercent[skill] - 100) / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80bd5938016aeb8ed9c9869311240ddcbfbcae905acba81fb7769db1238984b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 633, + "startColumn": 60, + "charOffset": 16442, + "charLength": 13, + "snippet": { + "text": "skillsPercent" + } + }, + "contextRegion": { + "startLine": 631, + "startColumn": 60, + "charOffset": 16325, + "charLength": 13, + "snippet": { + "text": "\n\t\tint32_t unmodifiedSkill = player->getBaseSkill(skill);\n\t\tskills[skill] = static_cast(unmodifiedSkill * ((skillsPercent[skill] - 100) / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d2591042bbabfa45e2ff9c6df9d89fe651220eb5ec3ad3b1ccac8607fd72477" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 633, + "startColumn": 83, + "charOffset": 16465, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 631, + "startColumn": 83, + "charOffset": 16325, + "charLength": 3, + "snippet": { + "text": "\n\t\tint32_t unmodifiedSkill = player->getBaseSkill(skill);\n\t\tskills[skill] = static_cast(unmodifiedSkill * ((skillsPercent[skill] - 100) / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3e8fb5fc343831869df344cd04db68a2ae3c3b8a6363c554e49cb2d776c688d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 633, + "startColumn": 90, + "charOffset": 16472, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 631, + "startColumn": 90, + "charOffset": 16325, + "charLength": 5, + "snippet": { + "text": "\n\t\tint32_t unmodifiedSkill = player->getBaseSkill(skill);\n\t\tskills[skill] = static_cast(unmodifiedSkill * ((skillsPercent[skill] - 100) / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da4c43a460738da7ba8cf15cdec280de71f2f016f906f01142aad155be39a576" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 633, + "startColumn": 90, + "charOffset": 16472, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 631, + "startColumn": 90, + "charOffset": 16325, + "charLength": 5, + "snippet": { + "text": "\n\t\tint32_t unmodifiedSkill = player->getBaseSkill(skill);\n\t\tskills[skill] = static_cast(unmodifiedSkill * ((skillsPercent[skill] - 100) / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b51116ab76e4652f635d59cb61039c1ac8b2867a6f9bc8463befc5155bdf0b5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 637, + "startColumn": 64, + "charOffset": 16550, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 635, + "startColumn": 64, + "charOffset": 16484, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid ConditionAttributes::updateSkills(std::shared_ptr player) {\n\tbool needUpdateSkills = false;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97ffbcc0b0218454eea331297c6417e79d8c62971dd39734d459a91dda033d43" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 640, + "startColumn": 2, + "charOffset": 16594, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 638, + "startColumn": 2, + "charOffset": 16560, + "charLength": 3, + "snippet": { + "text": "\tbool needUpdateSkills = false;\n\n\tfor (int32_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\n\t\tif (skills[i]) {\n\t\t\tneedUpdateSkills = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "871be5dc286e70938e1dbee0ba2e01f1ee2cfdf822b1be9df1424e89d8c0b5ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 641, + "startColumn": 7, + "charOffset": 16654, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 639, + "startColumn": 7, + "charOffset": 16592, + "charLength": 6, + "snippet": { + "text": "\n\tfor (int32_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\n\t\tif (skills[i]) {\n\t\t\tneedUpdateSkills = true;\n\t\t\tplayer->setVarSkill(static_cast(i), skills[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3673818f7eef88396e43303c9b02340c3417a5bfc35d70bdcbbf69228a87f875" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 641, + "startColumn": 7, + "charOffset": 16654, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 639, + "startColumn": 7, + "charOffset": 16592, + "charLength": 6, + "snippet": { + "text": "\n\tfor (int32_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\n\t\tif (skills[i]) {\n\t\t\tneedUpdateSkills = true;\n\t\t\tplayer->setVarSkill(static_cast(i), skills[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3dd28556cb00e2017c3aef7649544570bed4953fe536f045fa7f7cd50027a113" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 641, + "startColumn": 7, + "charOffset": 16654, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 639, + "startColumn": 7, + "charOffset": 16592, + "charLength": 6, + "snippet": { + "text": "\n\tfor (int32_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\n\t\tif (skills[i]) {\n\t\t\tneedUpdateSkills = true;\n\t\t\tplayer->setVarSkill(static_cast(i), skills[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75b927ad1ee0bdba92e03833ec419b69d4d2f3b8f616a56180ca90377e1012fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 643, + "startColumn": 50, + "charOffset": 16744, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 641, + "startColumn": 50, + "charOffset": 16648, + "charLength": 6, + "snippet": { + "text": "\t\tif (skills[i]) {\n\t\t\tneedUpdateSkills = true;\n\t\t\tplayer->setVarSkill(static_cast(i), skills[i]);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "575da19bf9a26803875d24a4958c4aa28fe80dcf3c286303064f9bc7d1e6036e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 652, + "startColumn": 74, + "charOffset": 16892, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 650, + "startColumn": 74, + "charOffset": 16816, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ConditionAttributes::updatePercentAbsorbs(std::shared_ptr creature) {\n\tfor (uint8_t i = 0; i < COMBAT_COUNT; i++) {\n\t\tauto value = getAbsorbPercentByIndex(i);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56cc398d5d4eb741ff7c505140d933fe8360bcf478e92ec2d5382ccddccb46c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 653, + "startColumn": 2, + "charOffset": 16905, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 651, + "startColumn": 2, + "charOffset": 16818, + "charLength": 3, + "snippet": { + "text": "\nvoid ConditionAttributes::updatePercentAbsorbs(std::shared_ptr creature) {\n\tfor (uint8_t i = 0; i < COMBAT_COUNT; i++) {\n\t\tauto value = getAbsorbPercentByIndex(i);\n\t\tif (value == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "447d98c9e1b0b864fd59a98025053c11ab50dcf95fd4651f436fdd8df5c9a0ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 658, + "startColumn": 16, + "charOffset": 17045, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 656, + "startColumn": 16, + "charOffset": 17013, + "charLength": 3, + "snippet": { + "text": "\t\t\tcontinue;\n\t\t}\n\t\tsetAbsorb(i, std::round((100 - creature->getAbsorbPercent(indexToCombatType(i))) * value / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a63d56db77e64fc51e5aaac0f2f7ef26b1e6fa5abca3c81b9dd7cce07032f225" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 658, + "startColumn": 16, + "charOffset": 17045, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 656, + "startColumn": 16, + "charOffset": 17013, + "charLength": 3, + "snippet": { + "text": "\t\t\tcontinue;\n\t\t}\n\t\tsetAbsorb(i, std::round((100 - creature->getAbsorbPercent(indexToCombatType(i))) * value / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "adebb7b2065e90cbb454548c97ce41c49920e192ce7e6fb87ad2a69b79a6fab2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 658, + "startColumn": 27, + "charOffset": 17056, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 656, + "startColumn": 27, + "charOffset": 17013, + "charLength": 1, + "snippet": { + "text": "\t\t\tcontinue;\n\t\t}\n\t\tsetAbsorb(i, std::round((100 - creature->getAbsorbPercent(indexToCombatType(i))) * value / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b3ba2da0e17fd17e402f94e70d6b1c84b8739e2bbce333babd74b7aff221737" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 658, + "startColumn": 28, + "charOffset": 17057, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 656, + "startColumn": 28, + "charOffset": 17013, + "charLength": 3, + "snippet": { + "text": "\t\t\tcontinue;\n\t\t}\n\t\tsetAbsorb(i, std::round((100 - creature->getAbsorbPercent(indexToCombatType(i))) * value / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc48c38ead1a81898a10ced267253749cfafaf4dff0b6b64fc994a84ebc5935a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 658, + "startColumn": 94, + "charOffset": 17123, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 656, + "startColumn": 94, + "charOffset": 17013, + "charLength": 5, + "snippet": { + "text": "\t\t\tcontinue;\n\t\t}\n\t\tsetAbsorb(i, std::round((100 - creature->getAbsorbPercent(indexToCombatType(i))) * value / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "996610f8c0de15386b62b93baa268526d354e1b5efb7892db072bb24ac35990a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 658, + "startColumn": 94, + "charOffset": 17123, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 656, + "startColumn": 94, + "charOffset": 17013, + "charLength": 5, + "snippet": { + "text": "\t\t\tcontinue;\n\t\t}\n\t\tsetAbsorb(i, std::round((100 - creature->getAbsorbPercent(indexToCombatType(i))) * value / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40ece6f641e88d6e2c075820f7ed0a1c5c844d89d6aedc4dad267d085102ff4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 662, + "startColumn": 67, + "charOffset": 17204, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 660, + "startColumn": 67, + "charOffset": 17135, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ConditionAttributes::updateAbsorbs(std::shared_ptr creature) const {\n\tfor (uint8_t i = 0; i < COMBAT_COUNT; i++) {\n\t\tauto value = getAbsorbByIndex(i);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9d3bb68a226b7331e15c4ef475fbfa64e59f79fa7587bef2efff41ac11df4f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 663, + "startColumn": 2, + "charOffset": 17223, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 661, + "startColumn": 2, + "charOffset": 17137, + "charLength": 3, + "snippet": { + "text": "\nvoid ConditionAttributes::updateAbsorbs(std::shared_ptr creature) const {\n\tfor (uint8_t i = 0; i < COMBAT_COUNT; i++) {\n\t\tauto value = getAbsorbByIndex(i);\n\t\tif (value == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ad722085d8fa9f26b388a68e8934703def25667a56e32facd83b17a2e68cafe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 673, + "startColumn": 76, + "charOffset": 17482, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 671, + "startColumn": 76, + "charOffset": 17404, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ConditionAttributes::updatePercentIncreases(std::shared_ptr creature) {\n\tfor (uint8_t i = 0; i < COMBAT_COUNT; i++) {\n\t\tauto increasePercentValue = getIncreasePercentById(i);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5184682ce3db42a1748ca1ea0a32ec7c3679872d4a77e1ec1b893cb417c6f6ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 674, + "startColumn": 2, + "charOffset": 17495, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 672, + "startColumn": 2, + "charOffset": 17406, + "charLength": 3, + "snippet": { + "text": "\nvoid ConditionAttributes::updatePercentIncreases(std::shared_ptr creature) {\n\tfor (uint8_t i = 0; i < COMBAT_COUNT; i++) {\n\t\tauto increasePercentValue = getIncreasePercentById(i);\n\t\tif (increasePercentValue == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e77da0c39e5cad47ced43e669bed759eac8ae5d85210141c68e37e88e7456073" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 679, + "startColumn": 18, + "charOffset": 17666, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 677, + "startColumn": 18, + "charOffset": 17632, + "charLength": 3, + "snippet": { + "text": "\t\t\tcontinue;\n\t\t}\n\t\tsetIncrease(i, std::round((100 - creature->getIncreasePercent(indexToCombatType(i))) * increasePercentValue / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f71ca650d5e741098724f5019a0df693e9c33f746447637dd1cb60f5446a39a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 679, + "startColumn": 18, + "charOffset": 17666, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 677, + "startColumn": 18, + "charOffset": 17632, + "charLength": 3, + "snippet": { + "text": "\t\t\tcontinue;\n\t\t}\n\t\tsetIncrease(i, std::round((100 - creature->getIncreasePercent(indexToCombatType(i))) * increasePercentValue / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90769d98121b7c4501f8bc2b66dedc5e7ed2fd04f959fa90d4222ad35d316734" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 679, + "startColumn": 29, + "charOffset": 17677, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 677, + "startColumn": 29, + "charOffset": 17632, + "charLength": 1, + "snippet": { + "text": "\t\t\tcontinue;\n\t\t}\n\t\tsetIncrease(i, std::round((100 - creature->getIncreasePercent(indexToCombatType(i))) * increasePercentValue / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2381a7d179ceca4713818887bafb5cfb15c4213b82d8189e7458d6c660f7721c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 679, + "startColumn": 30, + "charOffset": 17678, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 677, + "startColumn": 30, + "charOffset": 17632, + "charLength": 3, + "snippet": { + "text": "\t\t\tcontinue;\n\t\t}\n\t\tsetIncrease(i, std::round((100 - creature->getIncreasePercent(indexToCombatType(i))) * increasePercentValue / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a19c15cf3982e873eeccbefad5ac0a6aa6e1d4742df214e6de0b19f820dfe80" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 679, + "startColumn": 113, + "charOffset": 17761, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 677, + "startColumn": 113, + "charOffset": 17632, + "charLength": 5, + "snippet": { + "text": "\t\t\tcontinue;\n\t\t}\n\t\tsetIncrease(i, std::round((100 - creature->getIncreasePercent(indexToCombatType(i))) * increasePercentValue / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b4fe9a045f3edefa6a7f27c78aaa2c058026953b4530fd47f904f1c936b600a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 679, + "startColumn": 113, + "charOffset": 17761, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 677, + "startColumn": 113, + "charOffset": 17632, + "charLength": 5, + "snippet": { + "text": "\t\t\tcontinue;\n\t\t}\n\t\tsetIncrease(i, std::round((100 - creature->getIncreasePercent(indexToCombatType(i))) * increasePercentValue / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6cda09c85fd75fdc8deff4d98da5eabde4ed4c17b66c63e4ed149548a1e390ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 683, + "startColumn": 69, + "charOffset": 17844, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 681, + "startColumn": 69, + "charOffset": 17773, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ConditionAttributes::updateIncreases(std::shared_ptr creature) const {\n\tfor (uint8_t i = 0; i < COMBAT_COUNT; i++) {\n\t\tauto increaseValue = getIncreaseByIndex(i);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4a6a3cfbc979dc44ef5a295d36a8000595e445e2697765a0092ce07d32fe88b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 684, + "startColumn": 2, + "charOffset": 17863, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 682, + "startColumn": 2, + "charOffset": 17775, + "charLength": 3, + "snippet": { + "text": "\nvoid ConditionAttributes::updateIncreases(std::shared_ptr creature) const {\n\tfor (uint8_t i = 0; i < COMBAT_COUNT; i++) {\n\t\tauto increaseValue = getIncreaseByIndex(i);\n\t\tif (increaseValue == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54c668aa00d3a8bc6e06f6609ca14bbdcf7f9a85fdae06b8fa1032fa9258e9be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 693, + "startColumn": 79, + "charOffset": 18152, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 691, + "startColumn": 79, + "charOffset": 18071, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ConditionAttributes::updateCharmChanceModifier(std::shared_ptr creature) const {\n\tcreature->setCharmChanceModifier(creature->getCharmChanceModifier() + charmChanceModifier);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e65d99a1539922d2acffab9972efa42bea561e2fa1ddaa474c0e3fb0b818cde4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 694, + "startColumn": 35, + "charOffset": 18204, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 692, + "startColumn": 35, + "charOffset": 18073, + "charLength": 8, + "snippet": { + "text": "\nvoid ConditionAttributes::updateCharmChanceModifier(std::shared_ptr creature) const {\n\tcreature->setCharmChanceModifier(creature->getCharmChanceModifier() + charmChanceModifier);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1854bb8f46730a274f0c41fdfdb24966f2071e7ab16c4f98d337f7ba7f2d1f06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 697, + "startColumn": 72, + "charOffset": 18337, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 695, + "startColumn": 72, + "charOffset": 18263, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ConditionAttributes::updatePercentBuffs(std::shared_ptr creature) {\n\tfor (int32_t i = BUFF_FIRST; i <= BUFF_LAST; ++i) {\n\t\tif (buffsPercent[i] == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2bf1d1a3292aed5e40dbf0d27ccbc868c3c1ebd685f8d49c68690dc90acde9fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 698, + "startColumn": 2, + "charOffset": 18350, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 696, + "startColumn": 2, + "charOffset": 18265, + "charLength": 3, + "snippet": { + "text": "\nvoid ConditionAttributes::updatePercentBuffs(std::shared_ptr creature) {\n\tfor (int32_t i = BUFF_FIRST; i <= BUFF_LAST; ++i) {\n\t\tif (buffsPercent[i] == 0) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0209008f3a9242b2dff7bfa6f4783a4fe2f1d07ecb983bb117898ed3c3a41dd5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 699, + "startColumn": 7, + "charOffset": 18408, + "charLength": 12, + "snippet": { + "text": "buffsPercent" + } + }, + "contextRegion": { + "startLine": 697, + "startColumn": 7, + "charOffset": 18266, + "charLength": 12, + "snippet": { + "text": "void ConditionAttributes::updatePercentBuffs(std::shared_ptr creature) {\n\tfor (int32_t i = BUFF_FIRST; i <= BUFF_LAST; ++i) {\n\t\tif (buffsPercent[i] == 0) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e04a0152af7bc1138494509b9328e2f8d1b0fbc01dfc338ec0c9c4e5aac5760e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 704, + "startColumn": 3, + "charOffset": 18497, + "charLength": 5, + "snippet": { + "text": "buffs" + } + }, + "contextRegion": { + "startLine": 702, + "startColumn": 3, + "charOffset": 18449, + "charLength": 5, + "snippet": { + "text": "\n\t\tint32_t actualBuff = creature->getBuff(i);\n\t\tbuffs[i] = static_cast(actualBuff * ((buffsPercent[i] - 100) / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "077fa3bdbeb79b62dd2e51efabac4ea7a76c566abeacff4500e498dd08b692e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 704, + "startColumn": 35, + "charOffset": 18529, + "charLength": 10, + "snippet": { + "text": "actualBuff" + } + }, + "contextRegion": { + "startLine": 702, + "startColumn": 35, + "charOffset": 18449, + "charLength": 10, + "snippet": { + "text": "\n\t\tint32_t actualBuff = creature->getBuff(i);\n\t\tbuffs[i] = static_cast(actualBuff * ((buffsPercent[i] - 100) / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9ed281c0e4fb777cffdb22da9fee81a29a5058e37ce3f4143956a5fea090f05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 704, + "startColumn": 35, + "charOffset": 18529, + "charLength": 10, + "snippet": { + "text": "actualBuff" + } + }, + "contextRegion": { + "startLine": 702, + "startColumn": 35, + "charOffset": 18449, + "charLength": 10, + "snippet": { + "text": "\n\t\tint32_t actualBuff = creature->getBuff(i);\n\t\tbuffs[i] = static_cast(actualBuff * ((buffsPercent[i] - 100) / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39aa0a25cec3a04fafdfb1e68f612a156d856663921f7e670deb11247e3b5e73" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 704, + "startColumn": 49, + "charOffset": 18543, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 702, + "startColumn": 49, + "charOffset": 18449, + "charLength": 1, + "snippet": { + "text": "\n\t\tint32_t actualBuff = creature->getBuff(i);\n\t\tbuffs[i] = static_cast(actualBuff * ((buffsPercent[i] - 100) / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b283ba546a8e471271922d25b2ac24f68aa74f44819c5e77f70ac7dd397c61f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 704, + "startColumn": 49, + "charOffset": 18543, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 702, + "startColumn": 49, + "charOffset": 18449, + "charLength": 1, + "snippet": { + "text": "\n\t\tint32_t actualBuff = creature->getBuff(i);\n\t\tbuffs[i] = static_cast(actualBuff * ((buffsPercent[i] - 100) / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "715281f1798217ffce83dab5296c451cbbc31e52efeaf262e3912bc1ee4c07d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 704, + "startColumn": 50, + "charOffset": 18544, + "charLength": 12, + "snippet": { + "text": "buffsPercent" + } + }, + "contextRegion": { + "startLine": 702, + "startColumn": 50, + "charOffset": 18449, + "charLength": 12, + "snippet": { + "text": "\n\t\tint32_t actualBuff = creature->getBuff(i);\n\t\tbuffs[i] = static_cast(actualBuff * ((buffsPercent[i] - 100) / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a8600d09e4f72dfd940b03d8f4919b49668f9c19eef3a97ca16fe6eeb9ba431e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 704, + "startColumn": 68, + "charOffset": 18562, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 702, + "startColumn": 68, + "charOffset": 18449, + "charLength": 3, + "snippet": { + "text": "\n\t\tint32_t actualBuff = creature->getBuff(i);\n\t\tbuffs[i] = static_cast(actualBuff * ((buffsPercent[i] - 100) / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1242ecde8de80b1a8c765a80bfcc8468d65420033791f9cb38084c8d37b09867" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 704, + "startColumn": 75, + "charOffset": 18569, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 702, + "startColumn": 75, + "charOffset": 18449, + "charLength": 5, + "snippet": { + "text": "\n\t\tint32_t actualBuff = creature->getBuff(i);\n\t\tbuffs[i] = static_cast(actualBuff * ((buffsPercent[i] - 100) / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b03eecf686c6876c08b08ef40a3a0226f3abf776b13c2254a2218fe7895f8c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 704, + "startColumn": 75, + "charOffset": 18569, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 702, + "startColumn": 75, + "charOffset": 18449, + "charLength": 5, + "snippet": { + "text": "\n\t\tint32_t actualBuff = creature->getBuff(i);\n\t\tbuffs[i] = static_cast(actualBuff * ((buffsPercent[i] - 100) / 100.f));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec17064c7dde7d2d1fdcb4ef18fa1294760dc30ebbf4b852352f3a9bcb52e0d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 708, + "startColumn": 65, + "charOffset": 18648, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 706, + "startColumn": 65, + "charOffset": 18581, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid ConditionAttributes::updateBuffs(std::shared_ptr creature) {\n\tbool needUpdate = false;\n\tfor (int32_t i = BUFF_FIRST; i <= BUFF_LAST; ++i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ccdf8a6ea18bb6b89aa39beb34e1fbd99c074f39de72a9c1a07f5aa567a84616" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 710, + "startColumn": 2, + "charOffset": 18687, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 708, + "startColumn": 2, + "charOffset": 18584, + "charLength": 3, + "snippet": { + "text": "void ConditionAttributes::updateBuffs(std::shared_ptr creature) {\n\tbool needUpdate = false;\n\tfor (int32_t i = BUFF_FIRST; i <= BUFF_LAST; ++i) {\n\t\tif (buffs[i]) {\n\t\t\tneedUpdate = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5bca14098842c44642fc597227879f849b46f7ca8adcd91f99120ac0d4927183" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 711, + "startColumn": 7, + "charOffset": 18745, + "charLength": 5, + "snippet": { + "text": "buffs" + } + }, + "contextRegion": { + "startLine": 709, + "startColumn": 7, + "charOffset": 18660, + "charLength": 5, + "snippet": { + "text": "\tbool needUpdate = false;\n\tfor (int32_t i = BUFF_FIRST; i <= BUFF_LAST; ++i) {\n\t\tif (buffs[i]) {\n\t\t\tneedUpdate = true;\n\t\t\tcreature->setBuff(static_cast(i), buffs[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7fd7dc15c675616c5419485d96b7e04f2185d9ec1c71de1591f1a99b0ab6881" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 711, + "startColumn": 7, + "charOffset": 18745, + "charLength": 5, + "snippet": { + "text": "buffs" + } + }, + "contextRegion": { + "startLine": 709, + "startColumn": 7, + "charOffset": 18660, + "charLength": 5, + "snippet": { + "text": "\tbool needUpdate = false;\n\tfor (int32_t i = BUFF_FIRST; i <= BUFF_LAST; ++i) {\n\t\tif (buffs[i]) {\n\t\t\tneedUpdate = true;\n\t\t\tcreature->setBuff(static_cast(i), buffs[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1baced38c03cc92c48431ee13b31926140a13dd80c7d7ed64c594ecb6f5d4ad8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 711, + "startColumn": 7, + "charOffset": 18745, + "charLength": 5, + "snippet": { + "text": "buffs" + } + }, + "contextRegion": { + "startLine": 709, + "startColumn": 7, + "charOffset": 18660, + "charLength": 5, + "snippet": { + "text": "\tbool needUpdate = false;\n\tfor (int32_t i = BUFF_FIRST; i <= BUFF_LAST; ++i) {\n\t\tif (buffs[i]) {\n\t\t\tneedUpdate = true;\n\t\t\tcreature->setBuff(static_cast(i), buffs[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "caf2f3fe909c24698c73d5b17a8684dd34296455f1836ea26a42e1c0aea13e45" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 713, + "startColumn": 47, + "charOffset": 18825, + "charLength": 5, + "snippet": { + "text": "buffs" + } + }, + "contextRegion": { + "startLine": 711, + "startColumn": 47, + "charOffset": 18739, + "charLength": 5, + "snippet": { + "text": "\t\tif (buffs[i]) {\n\t\t\tneedUpdate = true;\n\t\t\tcreature->setBuff(static_cast(i), buffs[i]);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc304586693e75c746bb5d61def777f9013c74efcaf60f0b5fbbb31acd1f352e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 730, + "startColumn": 3, + "charOffset": 19280, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 728, + "startColumn": 3, + "charOffset": 19250, + "charLength": 3, + "snippet": { + "text": "\t\tbool needUpdate = false;\n\n\t\tfor (int32_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\n\t\t\tif (skills[i] || skillsPercent[i]) {\n\t\t\t\tneedUpdate = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9aabf9efbddb7e30150a6fd672945e6bb44167b3364a537fad6b0c98a540a12b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 731, + "startColumn": 8, + "charOffset": 19341, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 729, + "startColumn": 8, + "charOffset": 19277, + "charLength": 6, + "snippet": { + "text": "\n\t\tfor (int32_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\n\t\t\tif (skills[i] || skillsPercent[i]) {\n\t\t\t\tneedUpdate = true;\n\t\t\t\tplayer->setVarSkill(static_cast(i), -skills[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d929530787ea861e77e5611d71b26b894cc6cbd9d1cc46e25ed187d2ef8f20a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 731, + "startColumn": 8, + "charOffset": 19341, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 729, + "startColumn": 8, + "charOffset": 19277, + "charLength": 6, + "snippet": { + "text": "\n\t\tfor (int32_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\n\t\t\tif (skills[i] || skillsPercent[i]) {\n\t\t\t\tneedUpdate = true;\n\t\t\t\tplayer->setVarSkill(static_cast(i), -skills[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f96de8f07b21c64123bdd4d4cb901070748ac7f434505c7624492469334e849f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 731, + "startColumn": 8, + "charOffset": 19341, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 729, + "startColumn": 8, + "charOffset": 19277, + "charLength": 6, + "snippet": { + "text": "\n\t\tfor (int32_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\n\t\t\tif (skills[i] || skillsPercent[i]) {\n\t\t\t\tneedUpdate = true;\n\t\t\t\tplayer->setVarSkill(static_cast(i), -skills[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53cf6b7110faab47fd7406852b63abd0e29e7cd3937f3f78c9028b7d29609400" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 731, + "startColumn": 18, + "charOffset": 19351, + "charLength": 2, + "snippet": { + "text": "||" + } + }, + "contextRegion": { + "startLine": 729, + "startColumn": 18, + "charOffset": 19277, + "charLength": 2, + "snippet": { + "text": "\n\t\tfor (int32_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\n\t\t\tif (skills[i] || skillsPercent[i]) {\n\t\t\t\tneedUpdate = true;\n\t\t\t\tplayer->setVarSkill(static_cast(i), -skills[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca094fc5267bb52038e08845325a1182605ed1544f999ae67f5af65fd1309a0c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 731, + "startColumn": 21, + "charOffset": 19354, + "charLength": 13, + "snippet": { + "text": "skillsPercent" + } + }, + "contextRegion": { + "startLine": 729, + "startColumn": 21, + "charOffset": 19277, + "charLength": 13, + "snippet": { + "text": "\n\t\tfor (int32_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\n\t\t\tif (skills[i] || skillsPercent[i]) {\n\t\t\t\tneedUpdate = true;\n\t\t\t\tplayer->setVarSkill(static_cast(i), -skills[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "403a3e24572bca3b522246438a1c192c7013bb1b3f04409f62088e2c73744320" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 731, + "startColumn": 21, + "charOffset": 19354, + "charLength": 13, + "snippet": { + "text": "skillsPercent" + } + }, + "contextRegion": { + "startLine": 729, + "startColumn": 21, + "charOffset": 19277, + "charLength": 13, + "snippet": { + "text": "\n\t\tfor (int32_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\n\t\t\tif (skills[i] || skillsPercent[i]) {\n\t\t\t\tneedUpdate = true;\n\t\t\t\tplayer->setVarSkill(static_cast(i), -skills[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff4d68ecd2cffbda99d43c903e7d6c9378b390a1111772f1fd092532f5b27b68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 733, + "startColumn": 52, + "charOffset": 19448, + "charLength": 6, + "snippet": { + "text": "skills" + } + }, + "contextRegion": { + "startLine": 731, + "startColumn": 52, + "charOffset": 19334, + "charLength": 6, + "snippet": { + "text": "\t\t\tif (skills[i] || skillsPercent[i]) {\n\t\t\t\tneedUpdate = true;\n\t\t\t\tplayer->setVarSkill(static_cast(i), -skills[i]);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fc6852c387ad409167b7df74fea0cb3f1e8f5d5037ad6e4e96fff06eeb5e3cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 737, + "startColumn": 3, + "charOffset": 19472, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 735, + "startColumn": 3, + "charOffset": 19465, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfor (int32_t i = STAT_FIRST; i <= STAT_LAST; ++i) {\n\t\t\tif (stats[i]) {\n\t\t\t\tneedUpdate = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7390464f95a8db44890a1d33fc120807acc667f5faf98f4984dab835ef86427f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 738, + "startColumn": 8, + "charOffset": 19531, + "charLength": 5, + "snippet": { + "text": "stats" + } + }, + "contextRegion": { + "startLine": 736, + "startColumn": 8, + "charOffset": 19469, + "charLength": 5, + "snippet": { + "text": "\n\t\tfor (int32_t i = STAT_FIRST; i <= STAT_LAST; ++i) {\n\t\t\tif (stats[i]) {\n\t\t\t\tneedUpdate = true;\n\t\t\t\tplayer->setVarStats(static_cast(i), -stats[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "541098a1fe12d2ea03edef55f30a80073f0987ca048d5990651d58be8c40bb13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 738, + "startColumn": 8, + "charOffset": 19531, + "charLength": 5, + "snippet": { + "text": "stats" + } + }, + "contextRegion": { + "startLine": 736, + "startColumn": 8, + "charOffset": 19469, + "charLength": 5, + "snippet": { + "text": "\n\t\tfor (int32_t i = STAT_FIRST; i <= STAT_LAST; ++i) {\n\t\t\tif (stats[i]) {\n\t\t\t\tneedUpdate = true;\n\t\t\t\tplayer->setVarStats(static_cast(i), -stats[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a99899b84dc713835a6b978d39f9e19f33e15ade4bfe772b43833ce18d0d5df7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 738, + "startColumn": 8, + "charOffset": 19531, + "charLength": 5, + "snippet": { + "text": "stats" + } + }, + "contextRegion": { + "startLine": 736, + "startColumn": 8, + "charOffset": 19469, + "charLength": 5, + "snippet": { + "text": "\n\t\tfor (int32_t i = STAT_FIRST; i <= STAT_LAST; ++i) {\n\t\t\tif (stats[i]) {\n\t\t\t\tneedUpdate = true;\n\t\t\t\tplayer->setVarStats(static_cast(i), -stats[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9564d2bdfdd44f10e4ded55e6063a186cede3a26c7285447701fe18deb204590" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 740, + "startColumn": 51, + "charOffset": 19616, + "charLength": 5, + "snippet": { + "text": "stats" + } + }, + "contextRegion": { + "startLine": 738, + "startColumn": 51, + "charOffset": 19524, + "charLength": 5, + "snippet": { + "text": "\t\t\tif (stats[i]) {\n\t\t\t\tneedUpdate = true;\n\t\t\t\tplayer->setVarStats(static_cast(i), -stats[i]);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa19281f0984c1787bf00eff964102c52d012af691da1af0dafd083492f17d8d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 744, + "startColumn": 34, + "charOffset": 19670, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 742, + "startColumn": 34, + "charOffset": 19632, + "charLength": 6, + "snippet": { + "text": "\t\t}\n\n\t\tplayer->setCharmChanceModifier(player->getCharmChanceModifier() - charmChanceModifier);\n\n\t\tif (needUpdate) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45306183d7bb7cc3afd7dcfe09e8a82c489d96e067d5cce7aa91339d34caab95" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 752, + "startColumn": 2, + "charOffset": 19836, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 750, + "startColumn": 2, + "charOffset": 19801, + "charLength": 3, + "snippet": { + "text": "\t}\n\tbool needUpdateIcons = false;\n\tfor (int32_t i = BUFF_FIRST; i <= BUFF_LAST; ++i) {\n\t\tif (buffs[i]) {\n\t\t\tneedUpdateIcons = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51baab59a556125bc299ef9b516ed4930ab07531f8345cdaa44960f6b9b4b1d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 753, + "startColumn": 7, + "charOffset": 19894, + "charLength": 5, + "snippet": { + "text": "buffs" + } + }, + "contextRegion": { + "startLine": 751, + "startColumn": 7, + "charOffset": 19804, + "charLength": 5, + "snippet": { + "text": "\tbool needUpdateIcons = false;\n\tfor (int32_t i = BUFF_FIRST; i <= BUFF_LAST; ++i) {\n\t\tif (buffs[i]) {\n\t\t\tneedUpdateIcons = true;\n\t\t\tcreature->setBuff(static_cast(i), -buffs[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71648c6da47744606e8bcea1790d6553d2644ecd72b5190167249dd2914ef7e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 753, + "startColumn": 7, + "charOffset": 19894, + "charLength": 5, + "snippet": { + "text": "buffs" + } + }, + "contextRegion": { + "startLine": 751, + "startColumn": 7, + "charOffset": 19804, + "charLength": 5, + "snippet": { + "text": "\tbool needUpdateIcons = false;\n\tfor (int32_t i = BUFF_FIRST; i <= BUFF_LAST; ++i) {\n\t\tif (buffs[i]) {\n\t\t\tneedUpdateIcons = true;\n\t\t\tcreature->setBuff(static_cast(i), -buffs[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "320a9be5c5c98a9b16b268b667f70ae417402a4320354bfaf5ede37531a5c30e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 753, + "startColumn": 7, + "charOffset": 19894, + "charLength": 5, + "snippet": { + "text": "buffs" + } + }, + "contextRegion": { + "startLine": 751, + "startColumn": 7, + "charOffset": 19804, + "charLength": 5, + "snippet": { + "text": "\tbool needUpdateIcons = false;\n\tfor (int32_t i = BUFF_FIRST; i <= BUFF_LAST; ++i) {\n\t\tif (buffs[i]) {\n\t\t\tneedUpdateIcons = true;\n\t\t\tcreature->setBuff(static_cast(i), -buffs[i]);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "150d6667dd4ebd9c2d84724821a36bd2228aeca07bd657bd554fbd3c66017d3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 755, + "startColumn": 48, + "charOffset": 19980, + "charLength": 5, + "snippet": { + "text": "buffs" + } + }, + "contextRegion": { + "startLine": 753, + "startColumn": 48, + "charOffset": 19888, + "charLength": 5, + "snippet": { + "text": "\t\tif (buffs[i]) {\n\t\t\tneedUpdateIcons = true;\n\t\t\tcreature->setBuff(static_cast(i), -buffs[i]);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39b69a0c83ba35a2ec1ba3e59a568da9190fcb58f9dc06e037f0f1c8b4073e2b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 758, + "startColumn": 2, + "charOffset": 19999, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 756, + "startColumn": 2, + "charOffset": 19991, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t}\n\tfor (uint8_t i = 0; i < COMBAT_COUNT; i++) {\n\t\tauto value = getAbsorbByIndex(i);\n\t\tif (value) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "568e139c8b33a97050f9e4edd9a1e84f92a145c18eb739edd8c35f74856d1628" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 760, + "startColumn": 7, + "charOffset": 20086, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 758, + "startColumn": 7, + "charOffset": 19998, + "charLength": 5, + "snippet": { + "text": "\tfor (uint8_t i = 0; i < COMBAT_COUNT; i++) {\n\t\tauto value = getAbsorbByIndex(i);\n\t\tif (value) {\n\t\t\tcreature->setAbsorbPercent(indexToCombatType(i), -value);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21b4be0313659978f1471b813843bd716d40a60c73c6bf7c7023c5e394ab6113" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 760, + "startColumn": 7, + "charOffset": 20086, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 758, + "startColumn": 7, + "charOffset": 19998, + "charLength": 5, + "snippet": { + "text": "\tfor (uint8_t i = 0; i < COMBAT_COUNT; i++) {\n\t\tauto value = getAbsorbByIndex(i);\n\t\tif (value) {\n\t\t\tcreature->setAbsorbPercent(indexToCombatType(i), -value);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f12781f72f97442f781f695147edc3833c25b87c9be83f3636aab094d50cd3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 782, + "startColumn": 3, + "charOffset": 20620, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 780, + "startColumn": 3, + "charOffset": 20599, + "charLength": 4, + "snippet": { + "text": "\n\tswitch (param) {\n\t\tcase CONDITION_PARAM_SKILL_MELEE: {\n\t\t\tskills[SKILL_CLUB] = value;\n\t\t\tskills[SKILL_AXE] = value;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3ca6a146b0fdd28171ee22a883002fc6649a7cc5a51bb0326bed7cebe1e92a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 789, + "startColumn": 3, + "charOffset": 20772, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 787, + "startColumn": 3, + "charOffset": 20765, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_SKILL_MELEEPERCENT: {\n\t\t\tskillsPercent[SKILL_CLUB] = value;\n\t\t\tskillsPercent[SKILL_AXE] = value;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7348988c29b304232f43f173a396ecbd968b8ad0bf999dab92b8b06bc8e573e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 796, + "startColumn": 3, + "charOffset": 20952, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 794, + "startColumn": 3, + "charOffset": 20945, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_SKILL_FIST: {\n\t\t\tskills[SKILL_FIST] = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa905ec3dddd4f41ce13226390b0b748ce58ed2bff2de8026125f446bf4ad0a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 801, + "startColumn": 3, + "charOffset": 21041, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 799, + "startColumn": 3, + "charOffset": 21034, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_SKILL_FISTPERCENT: {\n\t\t\tskillsPercent[SKILL_FIST] = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a77418aef73493d1d0f57a425931296b9c9824566899515e405c4a549282208c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 806, + "startColumn": 3, + "charOffset": 21144, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 804, + "startColumn": 3, + "charOffset": 21137, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_SKILL_CLUB: {\n\t\t\tskills[SKILL_CLUB] = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6bcdb22367f864b23b1e7b8498badfcf7a1374fa7586b8621a80a8f95e9b08fa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 811, + "startColumn": 3, + "charOffset": 21233, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 809, + "startColumn": 3, + "charOffset": 21226, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_SKILL_CLUBPERCENT: {\n\t\t\tskillsPercent[SKILL_CLUB] = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d05f61e3606b22d11b1470065ecb3747639face34698d67b09e93a41884be0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 816, + "startColumn": 3, + "charOffset": 21336, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 814, + "startColumn": 3, + "charOffset": 21329, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_SKILL_SWORD: {\n\t\t\tskills[SKILL_SWORD] = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82bfb46ee57c17bc2eb5d6e2c5352cacfec2151789230c5e0f13a995501e3da2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 821, + "startColumn": 3, + "charOffset": 21427, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 819, + "startColumn": 3, + "charOffset": 21420, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_SKILL_SWORDPERCENT: {\n\t\t\tskillsPercent[SKILL_SWORD] = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5dedd28b542d1c266868000377c3e29b24ee19dc81f76413c7c8b2b370d19fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 826, + "startColumn": 3, + "charOffset": 21532, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 824, + "startColumn": 3, + "charOffset": 21525, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_SKILL_AXE: {\n\t\t\tskills[SKILL_AXE] = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "395d05f71a3c45f7caebe4d1caa9c0ed07f7b04de02e57737ba28153ba06f17f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 831, + "startColumn": 3, + "charOffset": 21619, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 829, + "startColumn": 3, + "charOffset": 21612, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_SKILL_AXEPERCENT: {\n\t\t\tskillsPercent[SKILL_AXE] = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4593e94f614428c583c06fcaeaa21f82b58ba0cd263474343c93c0ea72c5abe4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 836, + "startColumn": 3, + "charOffset": 21720, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 834, + "startColumn": 3, + "charOffset": 21713, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_SKILL_DISTANCE: {\n\t\t\tskills[SKILL_DISTANCE] = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa905ec3dddd4f41ce13226390b0b748ce58ed2bff2de8026125f446bf4ad0a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 841, + "startColumn": 3, + "charOffset": 21817, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 839, + "startColumn": 3, + "charOffset": 21810, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_SKILL_DISTANCEPERCENT: {\n\t\t\tskillsPercent[SKILL_DISTANCE] = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b11da7d0a823a682600cf339fa25a011d707641927c7347b4bc37813f46e3b74" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 846, + "startColumn": 3, + "charOffset": 21928, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 844, + "startColumn": 3, + "charOffset": 21921, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_SKILL_SHIELD: {\n\t\t\tskills[SKILL_SHIELD] = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e93bdf53f525db0cd3dbc6ab41876780ee60de273d8db3742e749f98d025a6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 851, + "startColumn": 3, + "charOffset": 22021, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 849, + "startColumn": 3, + "charOffset": 22014, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_SKILL_SHIELDPERCENT: {\n\t\t\tskillsPercent[SKILL_SHIELD] = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71e1df58437733480fcafce61b269d8d0385def9e6fc4a7aba8bd149ff23a926" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 856, + "startColumn": 3, + "charOffset": 22128, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 854, + "startColumn": 3, + "charOffset": 22121, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_SKILL_FISHING: {\n\t\t\tskills[SKILL_FISHING] = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "889aa3ad358ac533a587d4c4e3ccae314a4d2d889863c7d7e0d070df15d15e72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 861, + "startColumn": 3, + "charOffset": 22223, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 859, + "startColumn": 3, + "charOffset": 22216, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_SKILL_FISHINGPERCENT: {\n\t\t\tskillsPercent[SKILL_FISHING] = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c0a469275873803ad13784001abe380a0d09f27231a6590b6439ed95e88095b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 866, + "startColumn": 3, + "charOffset": 22332, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 864, + "startColumn": 3, + "charOffset": 22325, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_SKILL_CRITICAL_HIT_CHANCE: {\n\t\t\tskills[SKILL_CRITICAL_HIT_CHANCE] = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7f569927d34f0adc98d1c0ea08738a84c3cb6363d9b04ad217905d0fa861a3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 871, + "startColumn": 3, + "charOffset": 22451, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 869, + "startColumn": 3, + "charOffset": 22444, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_SKILL_CRITICAL_HIT_DAMAGE: {\n\t\t\tskills[SKILL_CRITICAL_HIT_DAMAGE] = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5dedd28b542d1c266868000377c3e29b24ee19dc81f76413c7c8b2b370d19fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 876, + "startColumn": 3, + "charOffset": 22570, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 874, + "startColumn": 3, + "charOffset": 22563, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_SKILL_LIFE_LEECH_CHANCE: {\n\t\t\tskills[SKILL_LIFE_LEECH_CHANCE] = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67bc4aff5a1ebe1a57ab661efd8a746a4c0b9e25a10f027997069ca0bef342da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 881, + "startColumn": 3, + "charOffset": 22685, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 879, + "startColumn": 3, + "charOffset": 22678, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_SKILL_LIFE_LEECH_AMOUNT: {\n\t\t\tskills[SKILL_LIFE_LEECH_AMOUNT] = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3eb5ccca1843b092c7405128df6585da4a238b929c7fa6ad4ab432f76ca5e644" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 886, + "startColumn": 3, + "charOffset": 22800, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 884, + "startColumn": 3, + "charOffset": 22793, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_SKILL_MANA_LEECH_CHANCE: {\n\t\t\tskills[SKILL_MANA_LEECH_CHANCE] = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b6ef2a23177467df9f9c00850f9ca4c38d221a5adcc3292e775f76170afee4f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 891, + "startColumn": 3, + "charOffset": 22915, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 889, + "startColumn": 3, + "charOffset": 22908, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_SKILL_MANA_LEECH_AMOUNT: {\n\t\t\tskills[SKILL_MANA_LEECH_AMOUNT] = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a9ec03b25517c34841abd014d409dc88227775e0fc86cc4d06f8981505e9fea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 896, + "startColumn": 3, + "charOffset": 23030, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 894, + "startColumn": 3, + "charOffset": 23023, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_STAT_MAXHITPOINTS: {\n\t\t\tstats[STAT_MAXHITPOINTS] = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbd8649864dc64b3e52fe13e3b684c0bc4f8e862b5c8b97b5886ad8b70559f52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 901, + "startColumn": 3, + "charOffset": 23132, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 899, + "startColumn": 3, + "charOffset": 23125, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_STAT_MAXMANAPOINTS: {\n\t\t\tstats[STAT_MAXMANAPOINTS] = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3dcf83a6d4c677eb22871096e32c68aaca73e64aed9951c4b3e9a4499b335761" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 906, + "startColumn": 3, + "charOffset": 23236, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 904, + "startColumn": 3, + "charOffset": 23229, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_STAT_MAGICPOINTS: {\n\t\t\tstats[STAT_MAGICPOINTS] = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f0012dc22e367b0d8eca6c6fc542433b97f3caede217ab8a4fd17d2384b9233" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 911, + "startColumn": 3, + "charOffset": 23336, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 909, + "startColumn": 3, + "charOffset": 23329, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_STAT_MAXHITPOINTSPERCENT: {\n\t\t\tstatsPercent[STAT_MAXHITPOINTS] = std::max(0, value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9134bb6335e00bcc0c519ac1c32d99b24e322a426b847ea208ce714f527f4ce5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 916, + "startColumn": 3, + "charOffset": 23474, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 914, + "startColumn": 3, + "charOffset": 23467, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_STAT_MAXMANAPOINTSPERCENT: {\n\t\t\tstatsPercent[STAT_MAXMANAPOINTS] = std::max(0, value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "108946afef47911f077c7862c26bda1a8589039edc840d791d4f36faf88bc8fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 921, + "startColumn": 3, + "charOffset": 23614, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 919, + "startColumn": 3, + "charOffset": 23607, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_STAT_MAGICPOINTSPERCENT: {\n\t\t\tstatsPercent[STAT_MAGICPOINTS] = std::max(0, value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76b587d63eb0eeaea7df8e3459a4de4da6c2d131b2bda29063863a368a02a291" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 926, + "startColumn": 3, + "charOffset": 23750, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 924, + "startColumn": 3, + "charOffset": 23743, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_DISABLE_DEFENSE: {\n\t\t\tdisableDefense = (value != 0);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10760f860fc4c3a5c083cd7fc6e39f61339c9723692ac4d4f3e8a986e0e53069" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 931, + "startColumn": 3, + "charOffset": 23847, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 929, + "startColumn": 3, + "charOffset": 23840, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_STAT_CAPACITYPERCENT: {\n\t\t\tstatsPercent[STAT_CAPACITY] = std::max(0, value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4344b9ee60fdb3e274153d1e03687aaa4dc00e6cb5ce061baf2ed2b28a512eec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 936, + "startColumn": 3, + "charOffset": 23977, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 934, + "startColumn": 3, + "charOffset": 23970, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_BUFF_DAMAGEDEALT: {\n\t\t\tbuffsPercent[BUFF_DAMAGEDEALT] = std::max(0, value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bfda1c1bf91b504402868fab0e278620a94903ec56c70f06bfbab70d9af65396" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 941, + "startColumn": 3, + "charOffset": 24106, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 939, + "startColumn": 3, + "charOffset": 24099, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_BUFF_DAMAGERECEIVED: {\n\t\t\tbuffsPercent[BUFF_DAMAGERECEIVED] = std::max(0, value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67bc4aff5a1ebe1a57ab661efd8a746a4c0b9e25a10f027997069ca0bef342da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 946, + "startColumn": 3, + "charOffset": 24241, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 944, + "startColumn": 3, + "charOffset": 24234, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_ABSORB_PHYSICALPERCENT: {\n\t\t\tsetAbsorbPercent(combatTypeToIndex(COMBAT_PHYSICALDAMAGE), value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71e993e6a3f5927efd238bffb2d8a8316e5c89ed626503c9c65312d5daca65d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 947, + "startColumn": 21, + "charOffset": 24308, + "charLength": 17, + "snippet": { + "text": "combatTypeToIndex" + } + }, + "contextRegion": { + "startLine": 945, + "startColumn": 21, + "charOffset": 24238, + "charLength": 17, + "snippet": { + "text": "\n\t\tcase CONDITION_PARAM_ABSORB_PHYSICALPERCENT: {\n\t\t\tsetAbsorbPercent(combatTypeToIndex(COMBAT_PHYSICALDAMAGE), value);\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48fa1d135c3458013700c68d4916f465b91ba436ba598f4ceb2e7dea6ec8a0a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 951, + "startColumn": 3, + "charOffset": 24381, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 949, + "startColumn": 3, + "charOffset": 24374, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_ABSORB_FIREPERCENT: {\n\t\t\tsetAbsorbPercent(combatTypeToIndex(COMBAT_FIREDAMAGE), value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34f12b8a1e75dd37af7c0355660342a1b1a295bd6b8eeeeb017fd9cdcb1ebf30" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 952, + "startColumn": 21, + "charOffset": 24444, + "charLength": 17, + "snippet": { + "text": "combatTypeToIndex" + } + }, + "contextRegion": { + "startLine": 950, + "startColumn": 21, + "charOffset": 24378, + "charLength": 17, + "snippet": { + "text": "\n\t\tcase CONDITION_PARAM_ABSORB_FIREPERCENT: {\n\t\t\tsetAbsorbPercent(combatTypeToIndex(COMBAT_FIREDAMAGE), value);\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce762ba18bbb1e33d6cab38158f0828b02c253281c85dcfa67923f8c08e5b588" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 956, + "startColumn": 3, + "charOffset": 24513, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 954, + "startColumn": 3, + "charOffset": 24506, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_ABSORB_ENERGYPERCENT: {\n\t\t\tsetAbsorbPercent(combatTypeToIndex(COMBAT_ENERGYDAMAGE), value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aca3cd38f35d40331e2c5c9237691fc61d3e03bf0e8d1a8058dd2e2d5b179b64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 957, + "startColumn": 21, + "charOffset": 24578, + "charLength": 17, + "snippet": { + "text": "combatTypeToIndex" + } + }, + "contextRegion": { + "startLine": 955, + "startColumn": 21, + "charOffset": 24510, + "charLength": 17, + "snippet": { + "text": "\n\t\tcase CONDITION_PARAM_ABSORB_ENERGYPERCENT: {\n\t\t\tsetAbsorbPercent(combatTypeToIndex(COMBAT_ENERGYDAMAGE), value);\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a014bb5febfac545c6bec82f3aa3f186c3f8cb8811e35426a5995908eb900e95" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 961, + "startColumn": 3, + "charOffset": 24649, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 959, + "startColumn": 3, + "charOffset": 24642, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_ABSORB_ICEPERCENT: {\n\t\t\tsetAbsorbPercent(combatTypeToIndex(COMBAT_ICEDAMAGE), value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53e72f5b168259f273bbbc1ce58d58fabb25604b20b18e0b650a4722dc02bb03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 962, + "startColumn": 21, + "charOffset": 24711, + "charLength": 17, + "snippet": { + "text": "combatTypeToIndex" + } + }, + "contextRegion": { + "startLine": 960, + "startColumn": 21, + "charOffset": 24646, + "charLength": 17, + "snippet": { + "text": "\n\t\tcase CONDITION_PARAM_ABSORB_ICEPERCENT: {\n\t\t\tsetAbsorbPercent(combatTypeToIndex(COMBAT_ICEDAMAGE), value);\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf927231cc19937afb4dcb2947839ca2d4cc7435137bd7ef1f3a64983bf1d9f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 966, + "startColumn": 3, + "charOffset": 24779, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 964, + "startColumn": 3, + "charOffset": 24772, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_ABSORB_EARTHPERCENT: {\n\t\t\tsetAbsorbPercent(combatTypeToIndex(COMBAT_EARTHDAMAGE), value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7363afc3df4c1a2f0a79cb1e09db81548f45500903fa6d9e154a1f6af761d1cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 967, + "startColumn": 21, + "charOffset": 24843, + "charLength": 17, + "snippet": { + "text": "combatTypeToIndex" + } + }, + "contextRegion": { + "startLine": 965, + "startColumn": 21, + "charOffset": 24776, + "charLength": 17, + "snippet": { + "text": "\n\t\tcase CONDITION_PARAM_ABSORB_EARTHPERCENT: {\n\t\t\tsetAbsorbPercent(combatTypeToIndex(COMBAT_EARTHDAMAGE), value);\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a8bb9ccf94e275dac541600f5a6ee4c920171385e0317d7424969e7d7e39b01d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 971, + "startColumn": 3, + "charOffset": 24913, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 969, + "startColumn": 3, + "charOffset": 24906, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_ABSORB_DEATHPERCENT: {\n\t\t\tsetAbsorbPercent(combatTypeToIndex(COMBAT_DEATHDAMAGE), value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74beb52e8558310c3ce9e985324a3b7d8d751b4dce88b4d493fa4884d7a883a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 972, + "startColumn": 21, + "charOffset": 24977, + "charLength": 17, + "snippet": { + "text": "combatTypeToIndex" + } + }, + "contextRegion": { + "startLine": 970, + "startColumn": 21, + "charOffset": 24910, + "charLength": 17, + "snippet": { + "text": "\n\t\tcase CONDITION_PARAM_ABSORB_DEATHPERCENT: {\n\t\t\tsetAbsorbPercent(combatTypeToIndex(COMBAT_DEATHDAMAGE), value);\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a40b2a1a1f1f1a89505732592e2f7789da62b07f64220ab6f85d59dee2ccba4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 976, + "startColumn": 3, + "charOffset": 25047, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 974, + "startColumn": 3, + "charOffset": 25040, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_ABSORB_HOLYPERCENT: {\n\t\t\tsetAbsorbPercent(combatTypeToIndex(COMBAT_HOLYDAMAGE), value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ac917e48d5fede4a87cb08e9d0071ae6eabaf441ebcebae4a2178fc9d9c80c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 977, + "startColumn": 21, + "charOffset": 25110, + "charLength": 17, + "snippet": { + "text": "combatTypeToIndex" + } + }, + "contextRegion": { + "startLine": 975, + "startColumn": 21, + "charOffset": 25044, + "charLength": 17, + "snippet": { + "text": "\n\t\tcase CONDITION_PARAM_ABSORB_HOLYPERCENT: {\n\t\t\tsetAbsorbPercent(combatTypeToIndex(COMBAT_HOLYDAMAGE), value);\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14768e404dc946d5acf194692ffe402415c0ae421868dea5dfde9e0e253d0768" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 981, + "startColumn": 3, + "charOffset": 25179, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 979, + "startColumn": 3, + "charOffset": 25172, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_ABSORB_LIFEDRAINPERCENT: {\n\t\t\tsetAbsorbPercent(combatTypeToIndex(COMBAT_LIFEDRAIN), value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1494921d562f504d5ad453d5d707e05c5fead78aaca305b7a00a4a01c5ae51ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 982, + "startColumn": 21, + "charOffset": 25247, + "charLength": 17, + "snippet": { + "text": "combatTypeToIndex" + } + }, + "contextRegion": { + "startLine": 980, + "startColumn": 21, + "charOffset": 25176, + "charLength": 17, + "snippet": { + "text": "\n\t\tcase CONDITION_PARAM_ABSORB_LIFEDRAINPERCENT: {\n\t\t\tsetAbsorbPercent(combatTypeToIndex(COMBAT_LIFEDRAIN), value);\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f716bc864df4490579f5ac8cf8b3efeaa6d2bae9a19d798b2e078d5c604174be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 986, + "startColumn": 3, + "charOffset": 25315, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 984, + "startColumn": 3, + "charOffset": 25308, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_ABSORB_MANADRAINPERCENT: {\n\t\t\tsetAbsorbPercent(combatTypeToIndex(COMBAT_MANADRAIN), value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "202c65c58fb624bac4dc7ce1b456189ade37bfe7882d3ce7598bc8562e368c5c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 987, + "startColumn": 21, + "charOffset": 25383, + "charLength": 17, + "snippet": { + "text": "combatTypeToIndex" + } + }, + "contextRegion": { + "startLine": 985, + "startColumn": 21, + "charOffset": 25312, + "charLength": 17, + "snippet": { + "text": "\n\t\tcase CONDITION_PARAM_ABSORB_MANADRAINPERCENT: {\n\t\t\tsetAbsorbPercent(combatTypeToIndex(COMBAT_MANADRAIN), value);\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d63f85ac3c185e63d8fa5dc8326f7a92531b00427ac71a8f7a907dd34841390" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 991, + "startColumn": 3, + "charOffset": 25451, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 989, + "startColumn": 3, + "charOffset": 25444, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_ABSORB_DROWNPERCENT: {\n\t\t\tsetAbsorbPercent(combatTypeToIndex(COMBAT_DROWNDAMAGE), value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "746ce6f32452c968227d904cf3b6002953478601e83492737005c8f3da213a01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 992, + "startColumn": 21, + "charOffset": 25515, + "charLength": 17, + "snippet": { + "text": "combatTypeToIndex" + } + }, + "contextRegion": { + "startLine": 990, + "startColumn": 21, + "charOffset": 25448, + "charLength": 17, + "snippet": { + "text": "\n\t\tcase CONDITION_PARAM_ABSORB_DROWNPERCENT: {\n\t\t\tsetAbsorbPercent(combatTypeToIndex(COMBAT_DROWNDAMAGE), value);\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f848cb6ce4eb4ee5bda16edaf823d19d8a095d4c7ad7b78380121abe946a3e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 996, + "startColumn": 3, + "charOffset": 25585, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 994, + "startColumn": 3, + "charOffset": 25578, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_INCREASE_PHYSICALPERCENT: {\n\t\t\tsetIncreasePercent(combatTypeToIndex(COMBAT_PHYSICALDAMAGE), value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d05f61e3606b22d11b1470065ecb3747639face34698d67b09e93a41884be0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 997, + "startColumn": 23, + "charOffset": 25656, + "charLength": 17, + "snippet": { + "text": "combatTypeToIndex" + } + }, + "contextRegion": { + "startLine": 995, + "startColumn": 23, + "charOffset": 25582, + "charLength": 17, + "snippet": { + "text": "\n\t\tcase CONDITION_PARAM_INCREASE_PHYSICALPERCENT: {\n\t\t\tsetIncreasePercent(combatTypeToIndex(COMBAT_PHYSICALDAMAGE), value);\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1816a7767391c44b9b51bf905cdebb7d4063a132161632a0fb5343aee2ee605c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1001, + "startColumn": 3, + "charOffset": 25729, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 999, + "startColumn": 3, + "charOffset": 25722, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_INCREASE_FIREPERCENT: {\n\t\t\tsetIncreasePercent(combatTypeToIndex(COMBAT_FIREDAMAGE), value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc4dac65455a5d1ff2c73decd5215a5bd96af0f737bc1232ce1ddec49fa65b84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1002, + "startColumn": 23, + "charOffset": 25796, + "charLength": 17, + "snippet": { + "text": "combatTypeToIndex" + } + }, + "contextRegion": { + "startLine": 1000, + "startColumn": 23, + "charOffset": 25726, + "charLength": 17, + "snippet": { + "text": "\n\t\tcase CONDITION_PARAM_INCREASE_FIREPERCENT: {\n\t\t\tsetIncreasePercent(combatTypeToIndex(COMBAT_FIREDAMAGE), value);\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "231930dc0b28a748067eca7481c8848564084a8b34475a7b878aa4f32f95fda5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1006, + "startColumn": 3, + "charOffset": 25865, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1004, + "startColumn": 3, + "charOffset": 25858, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_INCREASE_ENERGYPERCENT: {\n\t\t\tsetIncreasePercent(combatTypeToIndex(COMBAT_ENERGYDAMAGE), value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1c802d5ef48c0fa69c189adb81d92380ea9969b440aec264a26cb4a31e1134d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1007, + "startColumn": 23, + "charOffset": 25934, + "charLength": 17, + "snippet": { + "text": "combatTypeToIndex" + } + }, + "contextRegion": { + "startLine": 1005, + "startColumn": 23, + "charOffset": 25862, + "charLength": 17, + "snippet": { + "text": "\n\t\tcase CONDITION_PARAM_INCREASE_ENERGYPERCENT: {\n\t\t\tsetIncreasePercent(combatTypeToIndex(COMBAT_ENERGYDAMAGE), value);\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b878b8f972c7b9f87506722027935ee45fef05ad528c477ddea828381097972" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1011, + "startColumn": 3, + "charOffset": 26005, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1009, + "startColumn": 3, + "charOffset": 25998, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_INCREASE_ICEPERCENT: {\n\t\t\tsetIncreasePercent(combatTypeToIndex(COMBAT_ICEDAMAGE), value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36dadeb62a6471f232b4c468c066641b4b384dd27808c91fc91a2ac80017a737" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1012, + "startColumn": 23, + "charOffset": 26071, + "charLength": 17, + "snippet": { + "text": "combatTypeToIndex" + } + }, + "contextRegion": { + "startLine": 1010, + "startColumn": 23, + "charOffset": 26002, + "charLength": 17, + "snippet": { + "text": "\n\t\tcase CONDITION_PARAM_INCREASE_ICEPERCENT: {\n\t\t\tsetIncreasePercent(combatTypeToIndex(COMBAT_ICEDAMAGE), value);\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5b18ef3163c26ff7482e38dfc76ea85240e690675a49499f2b2d0007fbe95cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1016, + "startColumn": 3, + "charOffset": 26139, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1014, + "startColumn": 3, + "charOffset": 26132, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_INCREASE_EARTHPERCENT: {\n\t\t\tsetIncreasePercent(combatTypeToIndex(COMBAT_EARTHDAMAGE), value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba0b5d96e8445d306459fe5f0b8fcd6ab9c0a5f23269202e258b9b4d32a0511d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1017, + "startColumn": 23, + "charOffset": 26207, + "charLength": 17, + "snippet": { + "text": "combatTypeToIndex" + } + }, + "contextRegion": { + "startLine": 1015, + "startColumn": 23, + "charOffset": 26136, + "charLength": 17, + "snippet": { + "text": "\n\t\tcase CONDITION_PARAM_INCREASE_EARTHPERCENT: {\n\t\t\tsetIncreasePercent(combatTypeToIndex(COMBAT_EARTHDAMAGE), value);\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b6371ad4049204058dfd2aa951a833ceebc256bfb98a65600395ded2cf856fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1021, + "startColumn": 3, + "charOffset": 26277, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1019, + "startColumn": 3, + "charOffset": 26270, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_INCREASE_DEATHPERCENT: {\n\t\t\tsetIncreasePercent(combatTypeToIndex(COMBAT_DEATHDAMAGE), value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e0feac6a28a2b507778c6d4484f891bba024e3ac6649c2dd9859a177f3fb7ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1022, + "startColumn": 23, + "charOffset": 26345, + "charLength": 17, + "snippet": { + "text": "combatTypeToIndex" + } + }, + "contextRegion": { + "startLine": 1020, + "startColumn": 23, + "charOffset": 26274, + "charLength": 17, + "snippet": { + "text": "\n\t\tcase CONDITION_PARAM_INCREASE_DEATHPERCENT: {\n\t\t\tsetIncreasePercent(combatTypeToIndex(COMBAT_DEATHDAMAGE), value);\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0494e9b42c17df41e8c01ee52de8c6a3672ec3118fb896c6a2b12adea045e1a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1026, + "startColumn": 3, + "charOffset": 26415, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1024, + "startColumn": 3, + "charOffset": 26408, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_INCREASE_HOLYPERCENT: {\n\t\t\tsetIncreasePercent(combatTypeToIndex(COMBAT_HOLYDAMAGE), value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b39adb8bb6a6097398c2a534f908714bc7d36b89821e3920becf5c5cf0fc8221" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1027, + "startColumn": 23, + "charOffset": 26482, + "charLength": 17, + "snippet": { + "text": "combatTypeToIndex" + } + }, + "contextRegion": { + "startLine": 1025, + "startColumn": 23, + "charOffset": 26412, + "charLength": 17, + "snippet": { + "text": "\n\t\tcase CONDITION_PARAM_INCREASE_HOLYPERCENT: {\n\t\t\tsetIncreasePercent(combatTypeToIndex(COMBAT_HOLYDAMAGE), value);\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce6e7c1a17da38d86088e3f322ed5129a489d7dd326d2536434e8b63756d69e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1031, + "startColumn": 3, + "charOffset": 26551, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1029, + "startColumn": 3, + "charOffset": 26544, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_INCREASE_LIFEDRAINPERCENT: {\n\t\t\tsetIncreasePercent(combatTypeToIndex(COMBAT_LIFEDRAIN), value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "138dab38e834152bfb82336652ada15b4061dafcfb66c4db10c517f5f5c09ebc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1032, + "startColumn": 23, + "charOffset": 26623, + "charLength": 17, + "snippet": { + "text": "combatTypeToIndex" + } + }, + "contextRegion": { + "startLine": 1030, + "startColumn": 23, + "charOffset": 26548, + "charLength": 17, + "snippet": { + "text": "\n\t\tcase CONDITION_PARAM_INCREASE_LIFEDRAINPERCENT: {\n\t\t\tsetIncreasePercent(combatTypeToIndex(COMBAT_LIFEDRAIN), value);\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec3bd4a92f499120065a10e5fbc21091e7eee64410ac3cdbf6f985d45c0acc1f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1036, + "startColumn": 3, + "charOffset": 26691, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1034, + "startColumn": 3, + "charOffset": 26684, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_INCREASE_MANADRAINPERCENT: {\n\t\t\tsetIncreasePercent(combatTypeToIndex(COMBAT_MANADRAIN), value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e10c71cf0fec024b1dacb3e41cd0b8345484e2bf55c67dfbaff6913ab219f80" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1037, + "startColumn": 23, + "charOffset": 26763, + "charLength": 17, + "snippet": { + "text": "combatTypeToIndex" + } + }, + "contextRegion": { + "startLine": 1035, + "startColumn": 23, + "charOffset": 26688, + "charLength": 17, + "snippet": { + "text": "\n\t\tcase CONDITION_PARAM_INCREASE_MANADRAINPERCENT: {\n\t\t\tsetIncreasePercent(combatTypeToIndex(COMBAT_MANADRAIN), value);\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9e1da813cf70e1469506175aef69b9b7f8283a953df5a5738480d9bdfbd2104" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1041, + "startColumn": 3, + "charOffset": 26831, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1039, + "startColumn": 3, + "charOffset": 26824, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_INCREASE_DROWNPERCENT: {\n\t\t\tsetIncreasePercent(combatTypeToIndex(COMBAT_DROWNDAMAGE), value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c0a469275873803ad13784001abe380a0d09f27231a6590b6439ed95e88095b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1042, + "startColumn": 23, + "charOffset": 26899, + "charLength": 17, + "snippet": { + "text": "combatTypeToIndex" + } + }, + "contextRegion": { + "startLine": 1040, + "startColumn": 23, + "charOffset": 26828, + "charLength": 17, + "snippet": { + "text": "\n\t\tcase CONDITION_PARAM_INCREASE_DROWNPERCENT: {\n\t\t\tsetIncreasePercent(combatTypeToIndex(COMBAT_DROWNDAMAGE), value);\n\t\t\treturn true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "827e065a23ea3397f50150a93989d8d4a56b10fcc9deee661cc12f3a2a5658bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1046, + "startColumn": 3, + "charOffset": 26969, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1044, + "startColumn": 3, + "charOffset": 26962, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\n\t\tcase CONDITION_PARAM_CHARM_CHANCE_MODIFIER: {\n\t\t\tcharmChanceModifier = static_cast(value);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be55291ca7ecfd08f1c966894cac94d05dc59ec5f5236d31240df55f2295c6ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1051, + "startColumn": 3, + "charOffset": 27091, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 1049, + "startColumn": 3, + "charOffset": 27084, + "charLength": 7, + "snippet": { + "text": "\t\t}\n\n\t\tdefault:\n\t\t\treturn ret;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf9b2eef224031a88943f0df1a99517e14284b93b75d4c5e6ff7775a40fac13b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-parent-virtual-call", + "ruleIndex": 80, + "kind": "fail", + "level": "warning", + "message": { + "text": "qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1129, + "startColumn": 7, + "charOffset": 29272, + "charLength": 9, + "snippet": { + "text": "Condition" + } + }, + "contextRegion": { + "startLine": 1127, + "startColumn": 7, + "charOffset": 29184, + "charLength": 9, + "snippet": { + "text": "\nbool ConditionRegeneration::startCondition(std::shared_ptr creature) {\n\tif (!Condition::startCondition(creature)) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85a115c313b646c6245ff286c661d2d3026f07e9d8b0787d0cda86e59b8f0419" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1164, + "startColumn": 2, + "charOffset": 30273, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1162, + "startColumn": 2, + "charOffset": 30179, + "charLength": 2, + "snippet": { + "text": "\nbool ConditionRegeneration::unserializeProp(ConditionAttr_t attr, PropStream &propStream) {\n\tif (attr == CONDITIONATTR_HEALTHTICKS) {\n\t\treturn propStream.read(healthTicks);\n\t} else if (attr == CONDITIONATTR_HEALTHGAIN) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "260cd471f9382c2057f8f0c17759efdc8f47236c52be947c78cac546f2fcdd7b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1166, + "startColumn": 4, + "charOffset": 30366, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1164, + "startColumn": 4, + "charOffset": 30272, + "charLength": 4, + "snippet": { + "text": "\tif (attr == CONDITIONATTR_HEALTHTICKS) {\n\t\treturn propStream.read(healthTicks);\n\t} else if (attr == CONDITIONATTR_HEALTHGAIN) {\n\t\treturn propStream.read(healthGain);\n\t} else if (attr == CONDITIONATTR_MANATICKS) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f015be07c5913b365672f3cb9432fa44077717173d8ff9cfcc1458a444daa80" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1179, + "startColumn": 33, + "charOffset": 30852, + "charLength": 25, + "snippet": { + "text": "CONDITIONATTR_HEALTHTICKS" + } + }, + "contextRegion": { + "startLine": 1177, + "startColumn": 33, + "charOffset": 30779, + "charLength": 25, + "snippet": { + "text": "\tCondition::serialize(propWriteStream);\n\n\tpropWriteStream.write(CONDITIONATTR_HEALTHTICKS);\n\tpropWriteStream.write(healthTicks);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2542414ead62d1b38b66133680a9befc7a4c245c84923853dd2bc438c9b248d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1182, + "startColumn": 33, + "charOffset": 30960, + "charLength": 24, + "snippet": { + "text": "CONDITIONATTR_HEALTHGAIN" + } + }, + "contextRegion": { + "startLine": 1180, + "startColumn": 33, + "charOffset": 30880, + "charLength": 24, + "snippet": { + "text": "\tpropWriteStream.write(healthTicks);\n\n\tpropWriteStream.write(CONDITIONATTR_HEALTHGAIN);\n\tpropWriteStream.write(healthGain);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c91a6925c7fdf3d5eeb347aae2ce44bd0c077c85e0e57050407f9d981b79ef48" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1185, + "startColumn": 33, + "charOffset": 31066, + "charLength": 23, + "snippet": { + "text": "CONDITIONATTR_MANATICKS" + } + }, + "contextRegion": { + "startLine": 1183, + "startColumn": 33, + "charOffset": 30987, + "charLength": 23, + "snippet": { + "text": "\tpropWriteStream.write(healthGain);\n\n\tpropWriteStream.write(CONDITIONATTR_MANATICKS);\n\tpropWriteStream.write(manaTicks);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c98ca131df0967c31382b753dfdfc03377108d9625fc259080550562e07cf819" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1188, + "startColumn": 33, + "charOffset": 31170, + "charLength": 22, + "snippet": { + "text": "CONDITIONATTR_MANAGAIN" + } + }, + "contextRegion": { + "startLine": 1186, + "startColumn": 33, + "charOffset": 31092, + "charLength": 22, + "snippet": { + "text": "\tpropWriteStream.write(manaTicks);\n\n\tpropWriteStream.write(CONDITIONATTR_MANAGAIN);\n\tpropWriteStream.write(manaGain);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b432715160808077fe93cf1319eeb878d73bb1cab05fdc1db5212bc6e35a8469" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'executeCondition' has cognitive complexity of 43 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1192, + "startColumn": 29, + "charOffset": 31270, + "charLength": 16, + "snippet": { + "text": "executeCondition" + } + }, + "contextRegion": { + "startLine": 1190, + "startColumn": 29, + "charOffset": 31239, + "charLength": 16, + "snippet": { + "text": "}\n\nbool ConditionRegeneration::executeCondition(std::shared_ptr creature, int32_t interval) {\n\tinternalHealthTicks += interval;\n\tinternalManaTicks += interval;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82d40925d0ad8ebbe0112419cf9c177725fdbe90e1e00d6d7bfdf506c0a2f6b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1206, + "startColumn": 28, + "charOffset": 31964, + "charLength": 10, + "snippet": { + "text": "healthGain" + } + }, + "contextRegion": { + "startLine": 1204, + "startColumn": 28, + "charOffset": 31779, + "charLength": 10, + "snippet": { + "text": "\t\t\tint32_t realHealthGain = creature->getHealth();\n\t\t\tif (creature->getZoneType() == ZONE_PROTECTION && dailyStreak >= DAILY_REWARD_DOUBLE_HP_REGENERATION) {\n\t\t\t\tcreature->changeHealth(healthGain * 2); // Double regen from daily reward\n\t\t\t} else {\n\t\t\t\tcreature->changeHealth(healthGain);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51c9ab43c1d3255221989c37f405751bee56e480d25a003a62819ca5b8564afa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1208, + "startColumn": 28, + "charOffset": 32054, + "charLength": 10, + "snippet": { + "text": "healthGain" + } + }, + "contextRegion": { + "startLine": 1206, + "startColumn": 28, + "charOffset": 31937, + "charLength": 10, + "snippet": { + "text": "\t\t\t\tcreature->changeHealth(healthGain * 2); // Double regen from daily reward\n\t\t\t} else {\n\t\t\t\tcreature->changeHealth(healthGain);\n\t\t\t}\n\t\t\trealHealthGain = creature->getHealth() - realHealthGain;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e6aeb1ee1a6f5b7d178b0139c2c66eeb825a84078cae5f2661469277542d81a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1223, + "startColumn": 17, + "charOffset": 32652, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 1221, + "startColumn": 17, + "charOffset": 32562, + "charLength": 5, + "snippet": { + "text": "\n\t\t\t\t\tauto spectators = Spectators().find(player->getPosition());\n\t\t\t\t\tspectators.erase(player);\n\t\t\t\t\tif (!spectators.empty()) {\n\t\t\t\t\t\tmessage.type = MESSAGE_HEALED_OTHERS;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12be26d7180524e73620d9acfc51a061e4ec60598afe554f8c728724be813171" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1227, + "startColumn": 7, + "charOffset": 32823, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1225, + "startColumn": 7, + "charOffset": 32699, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\t\tmessage.type = MESSAGE_HEALED_OTHERS;\n\t\t\t\t\t\tmessage.text = player->getName() + \" was healed for \" + healString;\n\t\t\t\t\t\tfor (const auto &spectator : spectators) {\n\t\t\t\t\t\t\tspectator->getPlayer()->sendTextMessage(message);\n\t\t\t\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4ecf214419288f0c3d70a6f0dd31e0491a57e2e81d953bf7a954fc638d1309b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1240, + "startColumn": 26, + "charOffset": 33266, + "charLength": 8, + "snippet": { + "text": "manaGain" + } + }, + "contextRegion": { + "startLine": 1238, + "startColumn": 26, + "charOffset": 33108, + "charLength": 8, + "snippet": { + "text": "\t\t\tinternalManaTicks = 0;\n\t\t\tif (creature->getZoneType() == ZONE_PROTECTION && dailyStreak >= DAILY_REWARD_DOUBLE_MP_REGENERATION) {\n\t\t\t\tcreature->changeMana(manaGain * 2); // Double regen from daily reward\n\t\t\t} else {\n\t\t\t\tcreature->changeMana(manaGain);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6b874f8aaf6ec36ac369e781642385e6aba247126babd287a6e5fc2f233cfef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1242, + "startColumn": 26, + "charOffset": 33352, + "charLength": 8, + "snippet": { + "text": "manaGain" + } + }, + "contextRegion": { + "startLine": 1240, + "startColumn": 26, + "charOffset": 33241, + "charLength": 8, + "snippet": { + "text": "\t\t\t\tcreature->changeMana(manaGain * 2); // Double regen from daily reward\n\t\t\t} else {\n\t\t\t\tcreature->changeMana(manaGain);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6cbf1c00303a7dd9a368d9b22331a127aa0349cf358837e3560df3d449491803" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1254, + "startColumn": 3, + "charOffset": 33596, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1252, + "startColumn": 3, + "charOffset": 33575, + "charLength": 4, + "snippet": { + "text": "\n\tswitch (param) {\n\t\tcase CONDITION_PARAM_HEALTHGAIN:\n\t\t\thealthGain = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7f569927d34f0adc98d1c0ea08738a84c3cb6363d9b04ad217905d0fa861a3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1258, + "startColumn": 3, + "charOffset": 33671, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1256, + "startColumn": 3, + "charOffset": 33652, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn true;\n\n\t\tcase CONDITION_PARAM_HEALTHTICKS:\n\t\t\thealthTicks = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49babdd124225bb5da5527abbf85f9ffffe51eaa67473767787bfd4ca9259bab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1262, + "startColumn": 3, + "charOffset": 33748, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1260, + "startColumn": 3, + "charOffset": 33729, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn true;\n\n\t\tcase CONDITION_PARAM_MANAGAIN:\n\t\t\tmanaGain = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2641b3744500e351b5fa3b958d6dec07761371195f441583ae49e5f99095995" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1266, + "startColumn": 3, + "charOffset": 33819, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1264, + "startColumn": 3, + "charOffset": 33800, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn true;\n\n\t\tcase CONDITION_PARAM_MANATICKS:\n\t\t\tmanaTicks = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba0b5d96e8445d306459fe5f0b8fcd6ab9c0a5f23269202e258b9b4d32a0511d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1270, + "startColumn": 3, + "charOffset": 33892, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 1268, + "startColumn": 3, + "charOffset": 33873, + "charLength": 7, + "snippet": { + "text": "\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn ret;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69becfa3142b6b9851dee81f827d66530d113b1f82ac9c946177d52538856c3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1275, + "startColumn": 74, + "charOffset": 33995, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1273, + "startColumn": 74, + "charOffset": 33919, + "charLength": 8, + "snippet": { + "text": "}\n\nuint32_t ConditionRegeneration::getHealthTicks(std::shared_ptr creature) const {\n\tstd::shared_ptr player = creature->getPlayer();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3fca83e8eddacdd7d9a8127ea4379afb2874a87b8f8e3dbc418a45465e48f567" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1279, + "startColumn": 10, + "charOffset": 34116, + "charLength": 11, + "snippet": { + "text": "healthTicks" + } + }, + "contextRegion": { + "startLine": 1277, + "startColumn": 10, + "charOffset": 34070, + "charLength": 11, + "snippet": { + "text": "\n\tif (player != nullptr && isBuff) {\n\t\treturn healthTicks / g_configManager().getFloat(RATE_SPELL_COOLDOWN, __FUNCTION__);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "427982ba621ffccf3901d3358f314daeaf3866637b225d5c30710d66f8f39514" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1279, + "startColumn": 10, + "charOffset": 34116, + "charLength": 11, + "snippet": { + "text": "healthTicks" + } + }, + "contextRegion": { + "startLine": 1277, + "startColumn": 10, + "charOffset": 34070, + "charLength": 11, + "snippet": { + "text": "\n\tif (player != nullptr && isBuff) {\n\t\treturn healthTicks / g_configManager().getFloat(RATE_SPELL_COOLDOWN, __FUNCTION__);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efb690874fdee7dd7aad9fb7ff935bb57dcecebedcd61f55f9f2663cd0ccf9c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1279, + "startColumn": 10, + "charOffset": 34116, + "charLength": 11, + "snippet": { + "text": "healthTicks" + } + }, + "contextRegion": { + "startLine": 1277, + "startColumn": 10, + "charOffset": 34070, + "charLength": 11, + "snippet": { + "text": "\n\tif (player != nullptr && isBuff) {\n\t\treturn healthTicks / g_configManager().getFloat(RATE_SPELL_COOLDOWN, __FUNCTION__);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c111a7964461d3d75fbf055d3b16effdfbaf9887befb914b5e86a35bbe945e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1285, + "startColumn": 72, + "charOffset": 34292, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1283, + "startColumn": 72, + "charOffset": 34218, + "charLength": 8, + "snippet": { + "text": "}\n\nuint32_t ConditionRegeneration::getManaTicks(std::shared_ptr creature) const {\n\tstd::shared_ptr player = creature->getPlayer();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1cfd61a46090bfb75b7f1ebaee635a7fdeb3aba7b74aa03461f6a68795df1d25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1289, + "startColumn": 10, + "charOffset": 34413, + "charLength": 9, + "snippet": { + "text": "manaTicks" + } + }, + "contextRegion": { + "startLine": 1287, + "startColumn": 10, + "charOffset": 34367, + "charLength": 9, + "snippet": { + "text": "\n\tif (player != nullptr && isBuff) {\n\t\treturn manaTicks / g_configManager().getFloat(RATE_SPELL_COOLDOWN, __FUNCTION__);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f306cd0a6d96b2e236ef099df97ae47abe5b63002b3c0c005f274421bd23a41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1289, + "startColumn": 10, + "charOffset": 34413, + "charLength": 9, + "snippet": { + "text": "manaTicks" + } + }, + "contextRegion": { + "startLine": 1287, + "startColumn": 10, + "charOffset": 34367, + "charLength": 9, + "snippet": { + "text": "\n\tif (player != nullptr && isBuff) {\n\t\treturn manaTicks / g_configManager().getFloat(RATE_SPELL_COOLDOWN, __FUNCTION__);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f0e525c2e93f924100b300906721f64c245068f2a6dcd623f8343d8ae7e40c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1289, + "startColumn": 10, + "charOffset": 34413, + "charLength": 9, + "snippet": { + "text": "manaTicks" + } + }, + "contextRegion": { + "startLine": 1287, + "startColumn": 10, + "charOffset": 34367, + "charLength": 9, + "snippet": { + "text": "\n\tif (player != nullptr && isBuff) {\n\t\treturn manaTicks / g_configManager().getFloat(RATE_SPELL_COOLDOWN, __FUNCTION__);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5bcbd06cea8520bf45ad042da341635efb854f0f63eadbbf4554e58b2441a653" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1347, + "startColumn": 33, + "charOffset": 36021, + "charLength": 24, + "snippet": { + "text": "CONDITIONATTR_MANASHIELD" + } + }, + "contextRegion": { + "startLine": 1345, + "startColumn": 33, + "charOffset": 35948, + "charLength": 24, + "snippet": { + "text": "\tCondition::serialize(propWriteStream);\n\n\tpropWriteStream.write(CONDITIONATTR_MANASHIELD);\n\tpropWriteStream.write(manaShield);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd0c77df4de903ec1d5b991299e2d9e41ec0beedd6572e4b5c481d2b1b966165" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1355, + "startColumn": 3, + "charOffset": 36241, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1353, + "startColumn": 3, + "charOffset": 36220, + "charLength": 4, + "snippet": { + "text": "\n\tswitch (param) {\n\t\tcase CONDITION_PARAM_MANASHIELD:\n\t\t\tmanaShield = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "273110bfd4e18fdc6d25ee77c57fae163acb5c4cf07f789c4c7632ebb0b2a46b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1358, + "startColumn": 3, + "charOffset": 36315, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 1356, + "startColumn": 3, + "charOffset": 36274, + "charLength": 7, + "snippet": { + "text": "\t\t\tmanaShield = value;\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn ret;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8436be2fd850ce12ae214126634618aa1d554129adf7b183913268e18105ca76" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1366, + "startColumn": 9, + "charOffset": 36485, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 1364, + "startColumn": 9, + "charOffset": 36416, + "charLength": 6, + "snippet": { + "text": "\tauto icons = Condition::getIcons();\n\tif (manaShield != 0) {\n\t\ticons.insert(PlayerIcon::NewManaShield);\n\t} else {\n\t\ticons.insert(PlayerIcon::ManaShield);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8ee40f9fc391fa43c3aed80698cc53e9a17ab3b4b4ad239d69d9a6c0f4ea4dec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1368, + "startColumn": 9, + "charOffset": 36538, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 1366, + "startColumn": 9, + "charOffset": 36477, + "charLength": 6, + "snippet": { + "text": "\t\ticons.insert(PlayerIcon::NewManaShield);\n\t} else {\n\t\ticons.insert(PlayerIcon::ManaShield);\n\t}\n\treturn icons;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afaf24ab297b622a389706013777c5b4a37abf8ea0c80647d2ebdae9bf1cac7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1377, + "startColumn": 59, + "charOffset": 36676, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 1375, + "startColumn": 59, + "charOffset": 36613, + "charLength": 1, + "snippet": { + "text": " */\n\nvoid ConditionSoul::addCondition(std::shared_ptr, const std::shared_ptr addCondition) {\n\tif (updateCondition(addCondition)) {\n\t\tsetTicks(addCondition->getTicks());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af16965830624f6860c9d1e4e75bce0a1798f1698417e0c467dcea1dee39460e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1389, + "startColumn": 2, + "charOffset": 37079, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1387, + "startColumn": 2, + "charOffset": 36993, + "charLength": 2, + "snippet": { + "text": "\nbool ConditionSoul::unserializeProp(ConditionAttr_t attr, PropStream &propStream) {\n\tif (attr == CONDITIONATTR_SOULGAIN) {\n\t\treturn propStream.read(soulGain);\n\t} else if (attr == CONDITIONATTR_SOULTICKS) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "642e97899b119771410b2db73ef5f0b0514f91925dc4ef7b0f39b28151b1f4a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1391, + "startColumn": 4, + "charOffset": 37166, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1389, + "startColumn": 4, + "charOffset": 37078, + "charLength": 4, + "snippet": { + "text": "\tif (attr == CONDITIONATTR_SOULGAIN) {\n\t\treturn propStream.read(soulGain);\n\t} else if (attr == CONDITIONATTR_SOULTICKS) {\n\t\treturn propStream.read(soulTicks);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43d0a63742d0fbaf1943c6d3b2c7089ffdd2af667b0e5dd9b82fcdada905211b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1400, + "startColumn": 33, + "charOffset": 37456, + "charLength": 22, + "snippet": { + "text": "CONDITIONATTR_SOULGAIN" + } + }, + "contextRegion": { + "startLine": 1398, + "startColumn": 33, + "charOffset": 37383, + "charLength": 22, + "snippet": { + "text": "\tCondition::serialize(propWriteStream);\n\n\tpropWriteStream.write(CONDITIONATTR_SOULGAIN);\n\tpropWriteStream.write(soulGain);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f9b03a3e3c0fd70e0c19683193766d9eb565027538c4934bcf60e60c3ecedd6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1403, + "startColumn": 33, + "charOffset": 37558, + "charLength": 23, + "snippet": { + "text": "CONDITIONATTR_SOULTICKS" + } + }, + "contextRegion": { + "startLine": 1401, + "startColumn": 33, + "charOffset": 37481, + "charLength": 23, + "snippet": { + "text": "\tpropWriteStream.write(soulGain);\n\n\tpropWriteStream.write(CONDITIONATTR_SOULTICKS);\n\tpropWriteStream.write(soulTicks);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f5ac575d1d4620153d0b1d65f8c82bbae8996d0711ee7bcaef87115c12a37a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1414, + "startColumn": 24, + "charOffset": 37962, + "charLength": 8, + "snippet": { + "text": "soulGain" + } + }, + "contextRegion": { + "startLine": 1412, + "startColumn": 24, + "charOffset": 37871, + "charLength": 8, + "snippet": { + "text": "\t\t\tif (internalSoulTicks >= soulTicks) {\n\t\t\t\tinternalSoulTicks = 0;\n\t\t\t\tplayer->changeSoul(soulGain);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df285744272dc100b56688fa2f0999cc3d79deba19ed416420f111e7f3efb451" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1425, + "startColumn": 3, + "charOffset": 38197, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1423, + "startColumn": 3, + "charOffset": 38123, + "charLength": 4, + "snippet": { + "text": "\tbool ret = ConditionGeneric::setParam(param, value);\n\tswitch (param) {\n\t\tcase CONDITION_PARAM_SOULGAIN:\n\t\t\tsoulGain = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2011233d67443a766c239ffc2571795747fb80641b46c35778c092f5b80b2640" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1429, + "startColumn": 3, + "charOffset": 38268, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1427, + "startColumn": 3, + "charOffset": 38249, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn true;\n\n\t\tcase CONDITION_PARAM_SOULTICKS:\n\t\t\tsoulTicks = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f88eddb04128c78ffca2b16048b5742a310696972704f87d966e0938be7a5e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1433, + "startColumn": 3, + "charOffset": 38341, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 1431, + "startColumn": 3, + "charOffset": 38322, + "charLength": 7, + "snippet": { + "text": "\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn ret;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3cc6d579f7ae3263a6e8d5265c0dffc156a4e84e6acb0459f307209d220ee63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1446, + "startColumn": 3, + "charOffset": 38540, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1444, + "startColumn": 3, + "charOffset": 38519, + "charLength": 4, + "snippet": { + "text": "\n\tswitch (param) {\n\t\tcase CONDITION_PARAM_OWNER:\n\t\t\towner = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3ca6a146b0fdd28171ee22a883002fc6649a7cc5a51bb0326bed7cebe1e92a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1450, + "startColumn": 3, + "charOffset": 38605, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1448, + "startColumn": 3, + "charOffset": 38586, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn true;\n\n\t\tcase CONDITION_PARAM_FORCEUPDATE:\n\t\t\tforceUpdate = (value != 0);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d60f675486ff11121d2b7463f206302089b3acf33b79998e97a12482436fae04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1454, + "startColumn": 3, + "charOffset": 38689, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1452, + "startColumn": 3, + "charOffset": 38670, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn true;\n\n\t\tcase CONDITION_PARAM_DELAYED:\n\t\t\tdelayed = (value != 0);\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53e25782dd1459c4070725bb2e7b52304fbdd74f1769880556fcefc7d2662468" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1482, + "startColumn": 3, + "charOffset": 39221, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 1480, + "startColumn": 3, + "charOffset": 39208, + "charLength": 7, + "snippet": { + "text": "\t\t\tbreak;\n\n\t\tdefault:\n\t\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2011233d67443a766c239ffc2571795747fb80641b46c35778c092f5b80b2640" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1490, + "startColumn": 2, + "charOffset": 39354, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1488, + "startColumn": 2, + "charOffset": 39266, + "charLength": 2, + "snippet": { + "text": "\nbool ConditionDamage::unserializeProp(ConditionAttr_t attr, PropStream &propStream) {\n\tif (attr == CONDITIONATTR_DELAYED) {\n\t\tuint8_t value;\n\t\tif (!propStream.read(value)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "818169f2218ff364a210f04906ae9052f4d195a7d685093ec34a3dba21c41c98" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'value' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1491, + "startColumn": 11, + "charOffset": 39401, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 1489, + "startColumn": 11, + "charOffset": 39267, + "charLength": 5, + "snippet": { + "text": "bool ConditionDamage::unserializeProp(ConditionAttr_t attr, PropStream &propStream) {\n\tif (attr == CONDITIONATTR_DELAYED) {\n\t\tuint8_t value;\n\t\tif (!propStream.read(value)) {\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8fe84f65d34d2c19ee5e7c230d76da6dfccd02fbac62fe3e61c354662d062acd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1498, + "startColumn": 4, + "charOffset": 39516, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1496, + "startColumn": 4, + "charOffset": 39472, + "charLength": 4, + "snippet": { + "text": "\t\tdelayed = (value != 0);\n\t\treturn true;\n\t} else if (attr == CONDITIONATTR_PERIODDAMAGE) {\n\t\treturn propStream.read(periodDamage);\n\t} else if (attr == CONDITIONATTR_OWNER) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f405a6e818da5711861071130183c44b4b691f598b5c09d9f1b6297964b7293" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1520, + "startColumn": 33, + "charOffset": 40157, + "charLength": 21, + "snippet": { + "text": "CONDITIONATTR_DELAYED" + } + }, + "contextRegion": { + "startLine": 1518, + "startColumn": 33, + "charOffset": 40084, + "charLength": 21, + "snippet": { + "text": "\tCondition::serialize(propWriteStream);\n\n\tpropWriteStream.write(CONDITIONATTR_DELAYED);\n\tpropWriteStream.write(delayed);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f98c1e2c6c987186741e603ccc46e90a94de7649de15e89418d3edad59227d77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'unsigned char'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1521, + "startColumn": 33, + "charOffset": 40213, + "charLength": 7, + "snippet": { + "text": "delayed" + } + }, + "contextRegion": { + "startLine": 1519, + "startColumn": 33, + "charOffset": 40124, + "charLength": 7, + "snippet": { + "text": "\n\tpropWriteStream.write(CONDITIONATTR_DELAYED);\n\tpropWriteStream.write(delayed);\n\n\tpropWriteStream.write(CONDITIONATTR_PERIODDAMAGE);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9692342696e725fdd0cc3a605ec3d34a0f27f51b50f8408e9876959f4219a89e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1523, + "startColumn": 33, + "charOffset": 40256, + "charLength": 26, + "snippet": { + "text": "CONDITIONATTR_PERIODDAMAGE" + } + }, + "contextRegion": { + "startLine": 1521, + "startColumn": 33, + "charOffset": 40181, + "charLength": 26, + "snippet": { + "text": "\tpropWriteStream.write(delayed);\n\n\tpropWriteStream.write(CONDITIONATTR_PERIODDAMAGE);\n\tpropWriteStream.write(periodDamage);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50e946446be23af467b46bcf07db8c404c5d39f5641c78bb21b04c41757518f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1526, + "startColumn": 2, + "charOffset": 40334, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1524, + "startColumn": 2, + "charOffset": 40285, + "charLength": 3, + "snippet": { + "text": "\tpropWriteStream.write(periodDamage);\n\n\tfor (const IntervalInfo &intervalInfo : damageList) {\n\t\tpropWriteStream.write(CONDITIONATTR_INTERVALDATA);\n\t\tpropWriteStream.write(intervalInfo);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e31c95ead58a73d654c91d92610db10fb549c8516b44c93c07dcface174d7153" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1527, + "startColumn": 34, + "charOffset": 40421, + "charLength": 26, + "snippet": { + "text": "CONDITIONATTR_INTERVALDATA" + } + }, + "contextRegion": { + "startLine": 1525, + "startColumn": 34, + "charOffset": 40332, + "charLength": 26, + "snippet": { + "text": "\n\tfor (const IntervalInfo &intervalInfo : damageList) {\n\t\tpropWriteStream.write(CONDITIONATTR_INTERVALDATA);\n\t\tpropWriteStream.write(intervalInfo);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78fc732e1f468629c16da1bf8eb96093ca4c795b03d2b408f5ea9340a9e8614c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "3 adjacent parameters of 'addDamage' of similar type ('int32_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1545, + "startColumn": 33, + "charOffset": 40933, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 1543, + "startColumn": 33, + "charOffset": 40898, + "charLength": 7, + "snippet": { + "text": "}\n\nbool ConditionDamage::addDamage(int32_t rounds, int32_t time, int32_t value) {\n\ttime = std::max(time, EVENT_CREATURE_THINK_INTERVAL);\n\tif (rounds == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "def4bdf1d4abeda0beea512970967cfc0a5e15ba62ea984919be899d7468a5e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1550, + "startColumn": 3, + "charOffset": 41112, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 1548, + "startColumn": 3, + "charOffset": 41065, + "charLength": 8, + "snippet": { + "text": "\t\t// periodic damage\n\t\tperiodDamage = value;\n\t\tsetParam(CONDITION_PARAM_TICKINTERVAL, time);\n\t\tsetParam(CONDITION_PARAM_TICKS, -1);\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bfe9206be9f9747b668a1263c0464c0a8eae02919169e9ccd51ebd131116edbd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1551, + "startColumn": 3, + "charOffset": 41160, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 1549, + "startColumn": 3, + "charOffset": 41086, + "charLength": 8, + "snippet": { + "text": "\t\tperiodDamage = value;\n\t\tsetParam(CONDITION_PARAM_TICKINTERVAL, time);\n\t\tsetParam(CONDITION_PARAM_TICKS, -1);\n\t\treturn true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b1ff7d1d08334a8f7542a0ce03848c5f243b659bccf22bc3fb373c875e64ccc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1560, + "startColumn": 2, + "charOffset": 41287, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1558, + "startColumn": 2, + "charOffset": 41260, + "charLength": 3, + "snippet": { + "text": "\n\t// rounds, time, damage\n\tfor (int32_t i = 0; i < rounds; ++i) {\n\t\tIntervalInfo damageInfo {};\n\t\tdamageInfo.interval = time;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ad722085d8fa9f26b388a68e8934703def25667a56e32facd83b17a2e68cafe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1586, + "startColumn": 4, + "charOffset": 41770, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1584, + "startColumn": 4, + "charOffset": 41689, + "charLength": 2, + "snippet": { + "text": "\t\tint32_t amount = uniform_random(minDamage, maxDamage);\n\t\tif (amount != 0) {\n\t\t\tif (startDamage > maxDamage) {\n\t\t\t\tstartDamage = maxDamage;\n\t\t\t} else if (startDamage == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "767556351c0ffd72077b66766ae296f5db9964fc6099561225c4bd6fd49f0545" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1589, + "startColumn": 40, + "charOffset": 41903, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1587, + "startColumn": 40, + "charOffset": 41801, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tstartDamage = maxDamage;\n\t\t\t} else if (startDamage == 0) {\n\t\t\t\tstartDamage = std::max(1, std::ceil(amount / 20.0));\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "facdc90dffc4d266e28f20c5d5bb11ae981b7e23538529d9842261f8b6440d30" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "20.0 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1589, + "startColumn": 59, + "charOffset": 41922, + "charLength": 4, + "snippet": { + "text": "20.0" + } + }, + "contextRegion": { + "startLine": 1587, + "startColumn": 59, + "charOffset": 41801, + "charLength": 4, + "snippet": { + "text": "\t\t\t\tstartDamage = maxDamage;\n\t\t\t} else if (startDamage == 0) {\n\t\t\t\tstartDamage = std::max(1, std::ceil(amount / 20.0));\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cedc8fd8e1498baac92b449246166754ba6c786aea8ab0939c1b118a699394d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1594, + "startColumn": 4, + "charOffset": 42034, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1592, + "startColumn": 4, + "charOffset": 41936, + "charLength": 3, + "snippet": { + "text": "\t\t\tstd::list list;\n\t\t\tConditionDamage::generateDamageList(amount, startDamage, list);\n\t\t\tfor (int32_t value : list) {\n\t\t\t\taddDamage(1, tickInterval, -value);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e5f90b1883ed72f6744a93ac9baf05e41e2fd59678243555d85c1c865d84589" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1595, + "startColumn": 5, + "charOffset": 42067, + "charLength": 9, + "snippet": { + "text": "addDamage" + } + }, + "contextRegion": { + "startLine": 1593, + "startColumn": 5, + "charOffset": 41964, + "charLength": 9, + "snippet": { + "text": "\t\t\tConditionDamage::generateDamageList(amount, startDamage, list);\n\t\t\tfor (int32_t value : list) {\n\t\t\t\taddDamage(1, tickInterval, -value);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "518c9a3617b9d5403a7fb4411b6f7902b34f42446788733b5754717f8f3ceac5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'damage' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1612, + "startColumn": 11, + "charOffset": 42350, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 1610, + "startColumn": 11, + "charOffset": 42322, + "charLength": 6, + "snippet": { + "text": "\n\tif (!delayed) {\n\t\tint32_t damage;\n\t\tif (getNextDamage(damage)) {\n\t\t\treturn doDamage(creature, damage);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65f91dca6c25000f9d1b2df70161acd75e80db24dc883063d6b6e34da74e223d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1621, + "startColumn": 2, + "charOffset": 42547, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1619, + "startColumn": 2, + "charOffset": 42450, + "charLength": 2, + "snippet": { + "text": "\nbool ConditionDamage::executeCondition(std::shared_ptr creature, int32_t interval) {\n\tif (periodDamage != 0) {\n\t\tperiodDamageTick += interval;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2fb64babb6912c1e5ff897c6dcb362f96de79ae1e28fc831633f65ce7e8e672d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1626, + "startColumn": 4, + "charOffset": 42675, + "charLength": 8, + "snippet": { + "text": "doDamage" + } + }, + "contextRegion": { + "startLine": 1624, + "startColumn": 4, + "charOffset": 42605, + "charLength": 8, + "snippet": { + "text": "\t\tif (periodDamageTick >= tickInterval) {\n\t\t\tperiodDamageTick = 0;\n\t\t\tdoDamage(creature, periodDamage);\n\t\t}\n\t} else if (!damageList.empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc844332a998a6dbe55f9cfac48aba0fb5e50ef5c6de75ec247594f59c977adc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1644, + "startColumn": 4, + "charOffset": 43102, + "charLength": 8, + "snippet": { + "text": "doDamage" + } + }, + "contextRegion": { + "startLine": 1642, + "startColumn": 4, + "charOffset": 43093, + "charLength": 8, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tdoDamage(creature, damage);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "709813a1257c9b4d573f1b322720d3ce18b90a09b8b529462cd9d0273e29b794" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1660, + "startColumn": 2, + "charOffset": 43345, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1658, + "startColumn": 2, + "charOffset": 43288, + "charLength": 2, + "snippet": { + "text": "\nbool ConditionDamage::getNextDamage(int32_t &damage) {\n\tif (periodDamage != 0) {\n\t\tdamage = periodDamage;\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ddd545611946e20503ce405cd8dda9fb82aa2df5fa9c13d04f4614f7c9ee567e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1663, + "startColumn": 4, + "charOffset": 43413, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1661, + "startColumn": 4, + "charOffset": 43370, + "charLength": 4, + "snippet": { + "text": "\t\tdamage = periodDamage;\n\t\treturn true;\n\t} else if (!damageList.empty()) {\n\t\tIntervalInfo &damageInfo = damageList.front();\n\t\tdamage = damageInfo.value;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93f9668a6a76c97ce7a32647f486ef7255104b369603cd09a139d286a0125a35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1674, + "startColumn": 58, + "charOffset": 43668, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1672, + "startColumn": 58, + "charOffset": 43608, + "charLength": 8, + "snippet": { + "text": "}\n\nbool ConditionDamage::doDamage(std::shared_ptr creature, int32_t healthChange) {\n\tauto attacker = g_game().getPlayerByGUID(owner) ? g_game().getPlayerByGUID(owner)->getCreature() : g_game().getCreatureByID(owner);\n\tbool isPlayer = attacker && attacker->getPlayer();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "078810e827a1ef1e294354ae39d30f67d8799c9396e2830d437d47cf0ea9c71e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1687, + "startColumn": 58, + "charOffset": 44254, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 1685, + "startColumn": 58, + "charOffset": 44120, + "charLength": 6, + "snippet": { + "text": "\n\tif (field && creature->getPlayer() && attacker && attacker->getPlayer()) {\n\t\tdamage.primary.value = static_cast(std::round(damage.primary.value / 2.));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b4905e1409acdbde35996df38e3de61fe86dc5f5fbbc5f90cef61945ac5a86d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "2. is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1687, + "startColumn": 81, + "charOffset": 44277, + "charLength": 2, + "snippet": { + "text": "2." + } + }, + "contextRegion": { + "startLine": 1685, + "startColumn": 81, + "charOffset": 44120, + "charLength": 2, + "snippet": { + "text": "\n\tif (field && creature->getPlayer() && attacker && attacker->getPlayer()) {\n\t\tdamage.primary.value = static_cast(std::round(damage.primary.value / 2.));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a17e226d621cb73b535c4394c4fc6c72ff44e0c2eaf33c964758fea9800e41d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1691, + "startColumn": 37, + "charOffset": 44462, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1689, + "startColumn": 37, + "charOffset": 44286, + "charLength": 1, + "snippet": { + "text": "\n\tif (!creature->isAttackable() || Combat::canDoCombat(attacker, creature, damage.primary.type != COMBAT_HEALING) != RETURNVALUE_NOERROR) {\n\t\tif (!creature->isInGhostMode() && !creature->getNpc()) {\n\t\t\tg_game().addMagicEffect(creature->getPosition(), CONST_ME_POFF);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a8df9f46960848d1d9b700a8bf7110aa5ae5ba50bcc416b5b8fa023befe3d3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1708, + "startColumn": 61, + "charOffset": 44946, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 1706, + "startColumn": 61, + "charOffset": 44883, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid ConditionDamage::endCondition(std::shared_ptr) {\n\t//\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84ef5969f7864ceb47d115197f977588312152c810eac9f851c4c7747f6bba30" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'damage' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1749, + "startColumn": 12, + "charOffset": 46042, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 1747, + "startColumn": 12, + "charOffset": 46012, + "charLength": 6, + "snippet": { + "text": "\n\t\tif (!delayed) {\n\t\t\tint32_t damage;\n\t\t\tif (getNextDamage(damage)) {\n\t\t\t\tdoDamage(creature, damage);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d43ee5bc9b96983e7c87f16e2cabee86d11e5857d974e5a33dd3abf576ce9a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1751, + "startColumn": 5, + "charOffset": 46086, + "charLength": 8, + "snippet": { + "text": "doDamage" + } + }, + "contextRegion": { + "startLine": 1749, + "startColumn": 5, + "charOffset": 46031, + "charLength": 8, + "snippet": { + "text": "\t\t\tint32_t damage;\n\t\t\tif (getNextDamage(damage)) {\n\t\t\t\tdoDamage(creature, damage);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db7dc1a031f22626248fc54d4af311fef2ed920c550ad0bcba2a5c58cbf0370e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'result' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1758, + "startColumn": 10, + "charOffset": 46188, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 1756, + "startColumn": 10, + "charOffset": 46128, + "charLength": 6, + "snippet": { + "text": "\nint32_t ConditionDamage::getTotalDamage() const {\n\tint32_t result;\n\tif (!damageList.empty()) {\n\t\tresult = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "872d3d640a3f4fb49be0e96a9d7fcb9d4e30edb9dcc07bce2758239303b12520" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1761, + "startColumn": 3, + "charOffset": 46240, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1759, + "startColumn": 3, + "charOffset": 46196, + "charLength": 3, + "snippet": { + "text": "\tif (!damageList.empty()) {\n\t\tresult = 0;\n\t\tfor (const IntervalInfo &intervalInfo : damageList) {\n\t\t\tresult += intervalInfo.value;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b54ac51562be0354a413d0677b08505550bdbdd8292a857055eb4919fdb42340" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1774, + "startColumn": 10, + "charOffset": 46587, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 1772, + "startColumn": 10, + "charOffset": 46529, + "charLength": 6, + "snippet": { + "text": "\tswitch (conditionType) {\n\t\tcase CONDITION_FIRE:\n\t\t\ticons.insert(PlayerIcon::Burn);\n\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "162434f32a2c25a38dc32b4681e285e36c82d8b8ef7fd5849c92955f7676ec17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1778, + "startColumn": 10, + "charOffset": 46658, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 1776, + "startColumn": 10, + "charOffset": 46623, + "charLength": 6, + "snippet": { + "text": "\n\t\tcase CONDITION_ENERGY:\n\t\t\ticons.insert(PlayerIcon::Energy);\n\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6dabb77f5aafd889549e84153fba9365421c47c02c4405d7653408a79aa36689" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1782, + "startColumn": 10, + "charOffset": 46730, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 1780, + "startColumn": 10, + "charOffset": 46696, + "charLength": 6, + "snippet": { + "text": "\n\t\tcase CONDITION_DROWN:\n\t\t\ticons.insert(PlayerIcon::Drowning);\n\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1aa3bb2daa9c837854d074010fb50693c229c98e22a094f0b21c0c94f572f648" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1786, + "startColumn": 10, + "charOffset": 46805, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 1784, + "startColumn": 10, + "charOffset": 46770, + "charLength": 6, + "snippet": { + "text": "\n\t\tcase CONDITION_POISON:\n\t\t\ticons.insert(PlayerIcon::Poison);\n\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f134a97607164c5cdc7d2683f6dad7a972b0a246b0e06241abae528a88d9927" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1790, + "startColumn": 10, + "charOffset": 46880, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 1788, + "startColumn": 10, + "charOffset": 46843, + "charLength": 6, + "snippet": { + "text": "\n\t\tcase CONDITION_FREEZING:\n\t\t\ticons.insert(PlayerIcon::Freezing);\n\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ec73685d74fdbf5d72ca22ca127473b5dea04d8c21b174f70e8e90873f53d80" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1794, + "startColumn": 10, + "charOffset": 46956, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 1792, + "startColumn": 10, + "charOffset": 46920, + "charLength": 6, + "snippet": { + "text": "\n\t\tcase CONDITION_DAZZLED:\n\t\t\ticons.insert(PlayerIcon::Dazzled);\n\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72662f8b37eb256b728da27a68ace98f65a4d9a0020b0cff9f484c375424b74a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1798, + "startColumn": 10, + "charOffset": 47030, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 1796, + "startColumn": 10, + "charOffset": 46995, + "charLength": 6, + "snippet": { + "text": "\n\t\tcase CONDITION_CURSED:\n\t\t\ticons.insert(PlayerIcon::Cursed);\n\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6333e569a09251bac3e1e86e37cdaf96d73b5740c19a817a53816c8a802517f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1802, + "startColumn": 10, + "charOffset": 47105, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 1800, + "startColumn": 10, + "charOffset": 47068, + "charLength": 6, + "snippet": { + "text": "\n\t\tcase CONDITION_BLEEDING:\n\t\t\ticons.insert(PlayerIcon::Bleeding);\n\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d999ae816b68ad7440f97b8cab045982cfdb58f882a5481f1688c4f43f16ed1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1814, + "startColumn": 2, + "charOffset": 47335, + "charLength": 6, + "snippet": { + "text": "double" + } + }, + "contextRegion": { + "startLine": 1812, + "startColumn": 2, + "charOffset": 47288, + "charLength": 6, + "snippet": { + "text": "\tamount = std::abs(amount);\n\tint32_t sum = 0;\n\tdouble x1, x2;\n\n\tfor (int32_t i = start; i > 0; --i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9520f6e9efce09d198a25522344111da2754170459b6426d0c9a6ceb3bd1f960" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1814, + "startColumn": 2, + "charOffset": 47335, + "charLength": 6, + "snippet": { + "text": "double" + } + }, + "contextRegion": { + "startLine": 1812, + "startColumn": 2, + "charOffset": 47288, + "charLength": 6, + "snippet": { + "text": "\tamount = std::abs(amount);\n\tint32_t sum = 0;\n\tdouble x1, x2;\n\n\tfor (int32_t i = start; i > 0; --i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2cc15850ce193aacf24345adf77c786823af2dfebb2dd619b24d1e1ccaa841b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'x1' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1814, + "startColumn": 9, + "charOffset": 47342, + "charLength": 2, + "snippet": { + "text": "x1" + } + }, + "contextRegion": { + "startLine": 1812, + "startColumn": 9, + "charOffset": 47288, + "charLength": 2, + "snippet": { + "text": "\tamount = std::abs(amount);\n\tint32_t sum = 0;\n\tdouble x1, x2;\n\n\tfor (int32_t i = start; i > 0; --i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50ff0cfe64e5bde73000646321d179b858db5ea486ceaa06dc1d64fec009ad89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'x2' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1814, + "startColumn": 13, + "charOffset": 47346, + "charLength": 2, + "snippet": { + "text": "x2" + } + }, + "contextRegion": { + "startLine": 1812, + "startColumn": 13, + "charOffset": 47288, + "charLength": 2, + "snippet": { + "text": "\tamount = std::abs(amount);\n\tint32_t sum = 0;\n\tdouble x1, x2;\n\n\tfor (int32_t i = start; i > 0; --i) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99c96025330520a826c8cc6e636c08fb53844e0411fed786cc4421c2e1e6e001" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'i' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1816, + "startColumn": 26, + "charOffset": 47376, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1814, + "startColumn": 26, + "charOffset": 47334, + "charLength": 1, + "snippet": { + "text": "\tdouble x1, x2;\n\n\tfor (int32_t i = start; i > 0; --i) {\n\t\tint32_t n = start + 1 - i;\n\t\tint32_t med = (n * amount) / start;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "385c274f8611934c23ec358dc95c3c80b3fdada7e3fa9fd0901b18165575e1f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1820, + "startColumn": 3, + "charOffset": 47460, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 1818, + "startColumn": 3, + "charOffset": 47419, + "charLength": 2, + "snippet": { + "text": "\t\tint32_t med = (n * amount) / start;\n\n\t\tdo {\n\t\t\tsum += i;\n\t\t\tlist.push_back(i);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98ebf8f1e7503ac191105c1f5fa8926541379ae8a0e03cfa0b5a2843889844fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1820, + "startColumn": 3, + "charOffset": 47460, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 1818, + "startColumn": 3, + "charOffset": 47419, + "charLength": 2, + "snippet": { + "text": "\t\tint32_t med = (n * amount) / start;\n\n\t\tdo {\n\t\t\tsum += i;\n\t\t\tlist.push_back(i);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0bc1c195f29560adbf439e10a0734f78d96459b6c5b19ba85fcb0d003d0087c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1824, + "startColumn": 54, + "charOffset": 47554, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1822, + "startColumn": 54, + "charOffset": 47478, + "charLength": 1, + "snippet": { + "text": "\t\t\tlist.push_back(i);\n\n\t\t\tx1 = std::fabs(1.0 - ((static_cast(sum)) + i) / med);\n\t\t\tx2 = std::fabs(1.0 - (static_cast(sum) / med));\n\t\t} while (x1 < x2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c57637f498e3969709cdafaf0c1651a312f8b65b4bdc2da625d53b910b4d5a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1824, + "startColumn": 54, + "charOffset": 47554, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 1822, + "startColumn": 54, + "charOffset": 47478, + "charLength": 1, + "snippet": { + "text": "\t\t\tlist.push_back(i);\n\n\t\t\tx1 = std::fabs(1.0 - ((static_cast(sum)) + i) / med);\n\t\t\tx2 = std::fabs(1.0 - (static_cast(sum) / med));\n\t\t} while (x1 < x2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73e8fa95d6414be341f8d542756326d8f96520b0dacfaf8efdb68cdfda81c6ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1824, + "startColumn": 59, + "charOffset": 47559, + "charLength": 3, + "snippet": { + "text": "med" + } + }, + "contextRegion": { + "startLine": 1822, + "startColumn": 59, + "charOffset": 47478, + "charLength": 3, + "snippet": { + "text": "\t\t\tlist.push_back(i);\n\n\t\t\tx1 = std::fabs(1.0 - ((static_cast(sum)) + i) / med);\n\t\t\tx2 = std::fabs(1.0 - (static_cast(sum) / med));\n\t\t} while (x1 < x2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7edf60b0f2f63881a1d4cceaec32bc7c9dffd0d3ae5796a72031b4e1e7ba9274" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1824, + "startColumn": 59, + "charOffset": 47559, + "charLength": 3, + "snippet": { + "text": "med" + } + }, + "contextRegion": { + "startLine": 1822, + "startColumn": 59, + "charOffset": 47478, + "charLength": 3, + "snippet": { + "text": "\t\t\tlist.push_back(i);\n\n\t\t\tx1 = std::fabs(1.0 - ((static_cast(sum)) + i) / med);\n\t\t\tx2 = std::fabs(1.0 - (static_cast(sum) / med));\n\t\t} while (x1 < x2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6263ec2bff53b0e030cb4d94c451a74bf0b2ab5636a34e0bf4b93103c1bcc370" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1825, + "startColumn": 52, + "charOffset": 47616, + "charLength": 3, + "snippet": { + "text": "med" + } + }, + "contextRegion": { + "startLine": 1823, + "startColumn": 52, + "charOffset": 47500, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tx1 = std::fabs(1.0 - ((static_cast(sum)) + i) / med);\n\t\t\tx2 = std::fabs(1.0 - (static_cast(sum) / med));\n\t\t} while (x1 < x2);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ba8b12bb3526a1836390eb8c7daac9b44e3fecde67ca9ba97573d9dea51b8ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1825, + "startColumn": 52, + "charOffset": 47616, + "charLength": 3, + "snippet": { + "text": "med" + } + }, + "contextRegion": { + "startLine": 1823, + "startColumn": 52, + "charOffset": 47500, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tx1 = std::fabs(1.0 - ((static_cast(sum)) + i) / med);\n\t\t\tx2 = std::fabs(1.0 - (static_cast(sum) / med));\n\t\t} while (x1 < x2);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b03e75c2862c47538bc332fb9ddfdd9775f364c12c442bb3f0966b9c7285bc18" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (do loop) is ID-dependent due to variable reference to 'x1' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1826, + "startColumn": 12, + "charOffset": 47634, + "charLength": 2, + "snippet": { + "text": "x1" + } + }, + "contextRegion": { + "startLine": 1824, + "startColumn": 12, + "charOffset": 47501, + "charLength": 2, + "snippet": { + "text": "\t\t\tx1 = std::fabs(1.0 - ((static_cast(sum)) + i) / med);\n\t\t\tx2 = std::fabs(1.0 - (static_cast(sum) / med));\n\t\t} while (x1 < x2);\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c77ffe1a83e41cb9163d816557db43a1c35ef2b381687abf6776da28b6f7bdd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1839, + "startColumn": 68, + "charOffset": 47951, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1837, + "startColumn": 68, + "charOffset": 47881, + "charLength": 8, + "snippet": { + "text": "}\n\nbool ConditionFeared::getRandomDirection(std::shared_ptr creature, Position pos) {\n\tstatic std::vector directions {\n\t\tDIRECTION_NORTH," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d99ada10c253b69ff344c90343e342e7b6c67c313d2074b14b0cf813a1664f9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1852, + "startColumn": 2, + "charOffset": 48275, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1850, + "startColumn": 2, + "charOffset": 48190, + "charLength": 3, + "snippet": { + "text": "\n\tstd::ranges::shuffle(directions.begin(), directions.end(), getRandomGenerator());\n\tfor (Direction dir : directions) {\n\t\tif (canWalkTo(creature, pos, dir)) {\n\t\t\tthis->fleeIndx = static_cast(dir);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8bc32b622253b5ccb657ef325f9f813bac73ae5ad6492f264914b677d4baee1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-anyofallof", + "ruleIndex": 735, + "kind": "fail", + "level": "warning", + "message": { + "text": "replace loop by 'std::ranges::any_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1852, + "startColumn": 2, + "charOffset": 48275, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1850, + "startColumn": 2, + "charOffset": 48190, + "charLength": 3, + "snippet": { + "text": "\n\tstd::ranges::shuffle(directions.begin(), directions.end(), getRandomGenerator());\n\tfor (Direction dir : directions) {\n\t\tif (canWalkTo(creature, pos, dir)) {\n\t\t\tthis->fleeIndx = static_cast(dir);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "887d8aa4493b3de22139bbddf1b8bdc1ae1beb6026db4646e48e2ffaaa917fea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'canWalkTo' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1862, + "startColumn": 23, + "charOffset": 48460, + "charLength": 9, + "snippet": { + "text": "canWalkTo" + } + }, + "contextRegion": { + "startLine": 1860, + "startColumn": 23, + "charOffset": 48435, + "charLength": 9, + "snippet": { + "text": "}\n\nbool ConditionFeared::canWalkTo(std::shared_ptr creature, Position pos, Direction moveDirection) const {\n\tpos = getNextPosition(moveDirection, pos);\n\tif (!creature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b550a652265d2af1c6270acae8f8386f06d14660f1371d71bc4475a3254ae01d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1862, + "startColumn": 59, + "charOffset": 48496, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1860, + "startColumn": 59, + "charOffset": 48435, + "charLength": 8, + "snippet": { + "text": "}\n\nbool ConditionFeared::canWalkTo(std::shared_ptr creature, Position pos, Direction moveDirection) const {\n\tpos = getNextPosition(moveDirection, pos);\n\tif (!creature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "91e5649f8f021613ba3fd9f57795bd4539bb8db34f530bc0b02b72e17df112e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1864, + "startColumn": 6, + "charOffset": 48602, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 1862, + "startColumn": 6, + "charOffset": 48438, + "charLength": 1, + "snippet": { + "text": "bool ConditionFeared::canWalkTo(std::shared_ptr creature, Position pos, Direction moveDirection) const {\n\tpos = getNextPosition(moveDirection, pos);\n\tif (!creature) {\n\t\tg_logger().error(\"[{}] creature is nullptr\", __FUNCTION__);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c977ab119e4c831dceabcc29567a674f12aefc3627339509f8be89bc6ceeca3a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in conditional return statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1873, + "startColumn": 11, + "charOffset": 49013, + "charLength": 5, + "snippet": { + "text": "false" + } + }, + "contextRegion": { + "startLine": 1871, + "startColumn": 11, + "charOffset": 48877, + "charLength": 5, + "snippet": { + "text": "\t\tstd::shared_ptr field = tile->getFieldItem();\n\t\tif (field && !field->isBlocking() && field->getDamage() != 0) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c33ed0ae6d902ba6622d4c28518d66f3a015d951f1c9f61f857d3edc4bed4645" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1881, + "startColumn": 66, + "charOffset": 49126, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1879, + "startColumn": 66, + "charOffset": 49058, + "charLength": 8, + "snippet": { + "text": "}\n\nbool ConditionFeared::getFleeDirection(std::shared_ptr creature) {\n\tPosition creaturePos = creature->getPosition();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "962a2fb5dd5ce229141595a7ecb67bf84c2755164488f13597529e754abe1edb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1888, + "startColumn": 2, + "charOffset": 49368, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1886, + "startColumn": 2, + "charOffset": 49332, + "charLength": 2, + "snippet": { + "text": "\n\t// Discover where the monster is\n\tif (offx == 0 && offy == 0) {\n\t\t/*\n\t\t *\tMonster is on the same SQM of the player" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8fd694dfb8aa2690329c27c073f5e79056465a573efea7761b4103eff75af00b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1895, + "startColumn": 4, + "charOffset": 49654, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1893, + "startColumn": 4, + "charOffset": 49477, + "charLength": 4, + "snippet": { + "text": "\t\tg_logger().debug(\"[ConditionsFeared::getFleeDirection] Monster is on top of player, flee randomly. {} {}\", offx, offy);\n\t\treturn getRandomDirection(creature, creaturePos);\n\t} else if (offx >= 1 && offy <= 0) {\n\t\t/*\n\t\t *\tMonster is on SW Region" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b52e18ca629bb1090bdf94347953b8e17d5b189ad060b2e2c80a867d1fab9b47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1931, + "startColumn": 21, + "charOffset": 50677, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 1929, + "startColumn": 21, + "charOffset": 50637, + "charLength": 1, + "snippet": { + "text": "\n\t\tif (offy == 0) {\n\t\t\tthis->fleeIndx = 6; // Starts at West\n\t\t} else {\n\t\t\tthis->fleeIndx = 4; // Starts at South" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5d5d7cc18f853e3aab804ba8dba49f9a06f106213a16f7dc8d5683326a10653" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1947, + "startColumn": 21, + "charOffset": 51097, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 1945, + "startColumn": 21, + "charOffset": 51024, + "charLength": 1, + "snippet": { + "text": "\t\t\tthis->fleeIndx = 0; // Starts at North\n\t\t} else {\n\t\t\tthis->fleeIndx = 6; // Starts at West\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f58ba5f7678f7b94d3277a1217fb17de741564d252a87908546f44b3fdeca5c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1957, + "startColumn": 61, + "charOffset": 51319, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1955, + "startColumn": 61, + "charOffset": 51256, + "charLength": 8, + "snippet": { + "text": "}\n\nbool ConditionFeared::getFleePath(std::shared_ptr creature, const Position &pos, std::vector &dirList) {\n\tconst std::vector walkSize { 15, 9, 3, 1 };\n\tbool found = false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a4001e6ff0083951833eff6edfcba13fd82e0ade51b1755e06553041ffd8dbf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1963, + "startColumn": 2, + "charOffset": 51521, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 1961, + "startColumn": 2, + "charOffset": 51492, + "charLength": 2, + "snippet": { + "text": "\tPosition futurePos = pos;\n\n\tdo {\n\t\tfor (uint8_t wsize : walkSize) {\n\t\t\tg_logger().debug(\"[{}] Checking on index {} with walkSize of {}\", __FUNCTION__, fleeIndx, wsize);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff25542d2e34783578e7c240b06f00da2605b72189d220d457a253d433e060bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1964, + "startColumn": 3, + "charOffset": 51528, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 1962, + "startColumn": 3, + "charOffset": 51519, + "charLength": 3, + "snippet": { + "text": "\n\tdo {\n\t\tfor (uint8_t wsize : walkSize) {\n\t\t\tg_logger().debug(\"[{}] Checking on index {} with walkSize of {}\", __FUNCTION__, fleeIndx, wsize);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fe3d3254360bdc7ceb0666253bf5a879ef821246d9425405b563a134cbd3cf5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1967, + "startColumn": 20, + "charOffset": 51682, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 1965, + "startColumn": 20, + "charOffset": 51561, + "charLength": 1, + "snippet": { + "text": "\t\t\tg_logger().debug(\"[{}] Checking on index {} with walkSize of {}\", __FUNCTION__, fleeIndx, wsize);\n\n\t\t\tif (fleeIndx == 8) { // Reset index if at the end of the loop\n\t\t\t\tfleeIndx = 0;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5892181ef378726d652daf2848ec9af151dbfd5488a6e7c344541bb1ca7a62f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1979, + "startColumn": 5, + "charOffset": 52041, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1977, + "startColumn": 5, + "charOffset": 51993, + "charLength": 4, + "snippet": { + "text": "\n\t\t\tswitch (m_directionsVector[fleeIndx]) {\n\t\t\t\tcase DIRECTION_NORTH:\n\t\t\t\t\tfuturePos.y += wsize;\n\t\t\t\t\tg_logger().debug(\"[{}] Trying to flee to NORTH to {} [{}]\", __FUNCTION__, futurePos.toString(), wsize);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53e72f5b168259f273bbbc1ce58d58fabb25604b20b18e0b650a4722dc02bb03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1984, + "startColumn": 5, + "charOffset": 52216, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1982, + "startColumn": 5, + "charOffset": 52199, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\n\t\t\t\tcase DIRECTION_NORTHEAST:\n\t\t\t\t\tfuturePos.x += wsize;\n\t\t\t\t\tfuturePos.y -= wsize;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03164dd109228d8c5f32f6e59ade8451b92dd8c9d9fb6060717bae5529aefd00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1990, + "startColumn": 5, + "charOffset": 52426, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1988, + "startColumn": 5, + "charOffset": 52409, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\n\t\t\t\tcase DIRECTION_EAST:\n\t\t\t\t\tfuturePos.x -= wsize;\n\t\t\t\t\tg_logger().debug(\"[{}] Trying to flee to EAST to {} [{}]\", __FUNCTION__, futurePos.toString(), wsize);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c1e43dcb15ab513ad006d0a270c2bad80cfcdfa63cd0aaca16a1fffcd93715f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 1995, + "startColumn": 5, + "charOffset": 52599, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1993, + "startColumn": 5, + "charOffset": 52582, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\n\t\t\t\tcase DIRECTION_SOUTHEAST:\n\t\t\t\t\tfuturePos.x -= wsize;\n\t\t\t\t\tfuturePos.y += wsize;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ee95faac444d46ad9487eacf2a23d1ff0b5d7eeae7107cadefd6e6d6c0f5458" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2001, + "startColumn": 5, + "charOffset": 52809, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 1999, + "startColumn": 5, + "charOffset": 52792, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\n\t\t\t\tcase DIRECTION_SOUTH:\n\t\t\t\t\tfuturePos.y += wsize;\n\t\t\t\t\tg_logger().debug(\"[{}] Trying to flee to SOUTH to {} [{}]\", __FUNCTION__, futurePos.toString(), wsize);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53e72f5b168259f273bbbc1ce58d58fabb25604b20b18e0b650a4722dc02bb03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2006, + "startColumn": 5, + "charOffset": 52984, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 2004, + "startColumn": 5, + "charOffset": 52967, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\n\t\t\t\tcase DIRECTION_SOUTHWEST:\n\t\t\t\t\tfuturePos.x += wsize;\n\t\t\t\t\tfuturePos.y += wsize;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03164dd109228d8c5f32f6e59ade8451b92dd8c9d9fb6060717bae5529aefd00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2012, + "startColumn": 5, + "charOffset": 53194, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 2010, + "startColumn": 5, + "charOffset": 53177, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\n\t\t\t\tcase DIRECTION_WEST:\n\t\t\t\t\tfuturePos.x += wsize;\n\t\t\t\t\tg_logger().debug(\"[{}] Trying to flee to WEST to {} [{}]\", __FUNCTION__, futurePos.toString(), wsize);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c1e43dcb15ab513ad006d0a270c2bad80cfcdfa63cd0aaca16a1fffcd93715f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2017, + "startColumn": 5, + "charOffset": 53367, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 2015, + "startColumn": 5, + "charOffset": 53350, + "charLength": 4, + "snippet": { + "text": "\t\t\t\t\tbreak;\n\n\t\t\t\tcase DIRECTION_NORTHWEST:\n\t\t\t\t\tfuturePos.x += wsize;\n\t\t\t\t\tfuturePos.y -= wsize;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ee95faac444d46ad9487eacf2a23d1ff0b5d7eeae7107cadefd6e6d6c0f5458" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "30 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2026, + "startColumn": 55, + "charOffset": 53669, + "charLength": 2, + "snippet": { + "text": "30" + } + }, + "contextRegion": { + "startLine": 2024, + "startColumn": 55, + "charOffset": 53609, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tfound = creature->getPathTo(futurePos, dirList, 0, 30);\n\t\t\tfound_size = std::distance(dirList.begin(), dirList.end());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bb1cf9e163139e0397ea1d59fb77c9748f52a622043641dd794b8b53b0c6c22" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (do loop) is ID-dependent due to variable reference to 'found' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2037, + "startColumn": 11, + "charOffset": 53866, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 2035, + "startColumn": 11, + "charOffset": 53828, + "charLength": 1, + "snippet": { + "text": "\t\t\tthis->fleeIndx += 1;\n\t\t}\n\t} while (!found && found_size == 0);\n\n\tg_logger().debug(\"[{}] Found Available path to {} with {} steps\", __FUNCTION__, futurePos.toString(), found_size);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6af9ff33c54bb8c96adc11fea6a08cbade7136c274a0e50ff422048dd7e04ac4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2053, + "startColumn": 2, + "charOffset": 54409, + "charLength": 16, + "snippet": { + "text": "getFleeDirection" + } + }, + "contextRegion": { + "startLine": 2051, + "startColumn": 2, + "charOffset": 54229, + "charLength": 16, + "snippet": { + "text": "bool ConditionFeared::startCondition(std::shared_ptr creature) {\n\tg_logger().debug(\"[ConditionFeared::executeCondition] Condition started for {}\", creature->getName());\n\tgetFleeDirection(creature);\n\tg_logger().debug(\"[ConditionFeared::executeCondition] Flee from {}\", fleeingFromPos.toString());\n\treturn Condition::startCondition(creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73958631f4401c3d22cfde70affe8e58425a3106344b8400c9f30ec8a442405a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "99 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2065, + "startColumn": 19, + "charOffset": 54940, + "charLength": 2, + "snippet": { + "text": "99" + } + }, + "contextRegion": { + "startLine": 2063, + "startColumn": 19, + "charOffset": 54885, + "charLength": 2, + "snippet": { + "text": "\n\tif (creature->getWalkSize() < 2) {\n\t\tif (fleeIndx == 99) {\n\t\t\tgetFleeDirection(creature);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "39e0a7def5c31b45565e80a0ccdf68a94cec97552271bd6ccd7fbc506abb9687" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2066, + "startColumn": 4, + "charOffset": 54949, + "charLength": 16, + "snippet": { + "text": "getFleeDirection" + } + }, + "contextRegion": { + "startLine": 2064, + "startColumn": 4, + "charOffset": 54886, + "charLength": 16, + "snippet": { + "text": "\tif (creature->getWalkSize() < 2) {\n\t\tif (fleeIndx == 99) {\n\t\t\tgetFleeDirection(creature);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d57c69327ae06bfa2d7dd836b4abb8f1056f20aefd23b27890b38464d827312" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2093, + "startColumn": 61, + "charOffset": 55721, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 2091, + "startColumn": 61, + "charOffset": 55658, + "charLength": 1, + "snippet": { + "text": "}\n\nvoid ConditionFeared::addCondition(std::shared_ptr, const std::shared_ptr addCondition) {\n\tif (updateCondition(addCondition)) {\n\t\tsetTicks(addCondition->getTicks());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a67a4cf8bd22254d294593edd5f7e1e165bdd4dcee726e646b6fe226f1af1630" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2102, + "startColumn": 8, + "charOffset": 55966, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 2100, + "startColumn": 8, + "charOffset": 55921, + "charLength": 6, + "snippet": { + "text": "\tauto icons = Condition::getIcons();\n\n\ticons.insert(PlayerIcon::Feared);\n\treturn icons;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a5da7f13a8db510fc24c096ab8c02a2ac48adf77a9d5de7f8dcd024ce15530b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'setFormulaVars' of similar type ('float') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2110, + "startColumn": 52, + "charOffset": 56091, + "charLength": 5, + "snippet": { + "text": "float" + } + }, + "contextRegion": { + "startLine": 2108, + "startColumn": 52, + "charOffset": 56035, + "charLength": 5, + "snippet": { + "text": " */\n\nvoid ConditionSpeed::setFormulaVars(float NewMina, float NewMinb, float NewMaxa, float NewMaxb) {\n\tthis->mina = NewMina;\n\tthis->minb = NewMinb;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae676f0ecb67a6bef16adef2bed3b0b3192bef2268ca562a422cfbd0d7d25ade" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'getFormulaValues' of similar type ('int32_t &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2117, + "startColumn": 52, + "charOffset": 56284, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 2115, + "startColumn": 52, + "charOffset": 56230, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid ConditionSpeed::getFormulaValues(int32_t var, int32_t &min, int32_t &max) const {\n\tint32_t difference = var - 40;\n\tmin = mina * difference + minb;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c16244f89c44af5c1afd779650039fa08b3da9330fc1fed071409aac2c32ee4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2118, + "startColumn": 29, + "charOffset": 56348, + "charLength": 2, + "snippet": { + "text": "40" + } + }, + "contextRegion": { + "startLine": 2116, + "startColumn": 29, + "charOffset": 56232, + "charLength": 2, + "snippet": { + "text": "\nvoid ConditionSpeed::getFormulaValues(int32_t var, int32_t &min, int32_t &max) const {\n\tint32_t difference = var - 40;\n\tmin = mina * difference + minb;\n\tmax = maxa * difference + maxb;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6d3445001a55551025b84eb936be830882eb81edb122ded69a4f4746b970cd2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2119, + "startColumn": 8, + "charOffset": 56359, + "charLength": 4, + "snippet": { + "text": "mina" + } + }, + "contextRegion": { + "startLine": 2117, + "startColumn": 8, + "charOffset": 56233, + "charLength": 4, + "snippet": { + "text": "void ConditionSpeed::getFormulaValues(int32_t var, int32_t &min, int32_t &max) const {\n\tint32_t difference = var - 40;\n\tmin = mina * difference + minb;\n\tmax = maxa * difference + maxb;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3dd9cf4d540838673c78a33f72ccd971256e206706423fc5bc62b320f5b5440" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2119, + "startColumn": 8, + "charOffset": 56359, + "charLength": 4, + "snippet": { + "text": "mina" + } + }, + "contextRegion": { + "startLine": 2117, + "startColumn": 8, + "charOffset": 56233, + "charLength": 4, + "snippet": { + "text": "void ConditionSpeed::getFormulaValues(int32_t var, int32_t &min, int32_t &max) const {\n\tint32_t difference = var - 40;\n\tmin = mina * difference + minb;\n\tmax = maxa * difference + maxb;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c751f1a82a2f2c44231c92a1ab754457166be6d13c3efe7214341183b367c65f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2119, + "startColumn": 15, + "charOffset": 56366, + "charLength": 10, + "snippet": { + "text": "difference" + } + }, + "contextRegion": { + "startLine": 2117, + "startColumn": 15, + "charOffset": 56233, + "charLength": 10, + "snippet": { + "text": "void ConditionSpeed::getFormulaValues(int32_t var, int32_t &min, int32_t &max) const {\n\tint32_t difference = var - 40;\n\tmin = mina * difference + minb;\n\tmax = maxa * difference + maxb;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9dfe49ba959e7fb158c5af5045cf8061f3bf123f2ffb2b8d94811b05d7f23453" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2120, + "startColumn": 8, + "charOffset": 56392, + "charLength": 4, + "snippet": { + "text": "maxa" + } + }, + "contextRegion": { + "startLine": 2118, + "startColumn": 8, + "charOffset": 56320, + "charLength": 4, + "snippet": { + "text": "\tint32_t difference = var - 40;\n\tmin = mina * difference + minb;\n\tmax = maxa * difference + maxb;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59800e8b60ca51cbe57077349c2b05075a52051ba88ae3382cf13245294aac5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2120, + "startColumn": 8, + "charOffset": 56392, + "charLength": 4, + "snippet": { + "text": "maxa" + } + }, + "contextRegion": { + "startLine": 2118, + "startColumn": 8, + "charOffset": 56320, + "charLength": 4, + "snippet": { + "text": "\tint32_t difference = var - 40;\n\tmin = mina * difference + minb;\n\tmax = maxa * difference + maxb;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99e149b3882e0e81dd50b158e99d8dc87bc8fcc513499cdeb2daa070ed4e5fa4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2120, + "startColumn": 15, + "charOffset": 56399, + "charLength": 10, + "snippet": { + "text": "difference" + } + }, + "contextRegion": { + "startLine": 2118, + "startColumn": 15, + "charOffset": 56320, + "charLength": 10, + "snippet": { + "text": "\tint32_t difference = var - 40;\n\tmin = mina * difference + minb;\n\tmax = maxa * difference + maxb;\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b33f2b1f1c481aa06c1284e1e9ec65162393fe2bf5951760f86f5a2d906a7382" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2124, + "startColumn": 13, + "charOffset": 56504, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 2122, + "startColumn": 13, + "charOffset": 56420, + "charLength": 8, + "snippet": { + "text": "\nbool ConditionSpeed::setParam(ConditionParam_t param, int32_t value) {\n\tCondition::setParam(param, value);\n\tif (param != CONDITION_PARAM_SPEED) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66d9115d2ed919075c9a6570a248001d97e1998522f9a6af3913664c4acc1ba0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2140, + "startColumn": 2, + "charOffset": 56816, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2138, + "startColumn": 2, + "charOffset": 56729, + "charLength": 2, + "snippet": { + "text": "\nbool ConditionSpeed::unserializeProp(ConditionAttr_t attr, PropStream &propStream) {\n\tif (attr == CONDITIONATTR_SPEEDDELTA) {\n\t\treturn propStream.read(speedDelta);\n\t} else if (attr == CONDITIONATTR_FORMULA_MINA) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c514c689e818e1a5bccc332177ce4139a90ed14c926c65cefc43e598e9129d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2142, + "startColumn": 4, + "charOffset": 56906, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 2140, + "startColumn": 4, + "charOffset": 56815, + "charLength": 4, + "snippet": { + "text": "\tif (attr == CONDITIONATTR_SPEEDDELTA) {\n\t\treturn propStream.read(speedDelta);\n\t} else if (attr == CONDITIONATTR_FORMULA_MINA) {\n\t\treturn propStream.read(mina);\n\t} else if (attr == CONDITIONATTR_FORMULA_MINB) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de03bea160eb0c8d026030daa97c6828ce580f5775d85af2e51978b55422045f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2157, + "startColumn": 33, + "charOffset": 57459, + "charLength": 24, + "snippet": { + "text": "CONDITIONATTR_SPEEDDELTA" + } + }, + "contextRegion": { + "startLine": 2155, + "startColumn": 33, + "charOffset": 57386, + "charLength": 24, + "snippet": { + "text": "\tCondition::serialize(propWriteStream);\n\n\tpropWriteStream.write(CONDITIONATTR_SPEEDDELTA);\n\tpropWriteStream.write(speedDelta);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "402309eafd8d776a472c6d6b7e409e1d33788a7a1a0a158f82d190ff0d2067b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2160, + "startColumn": 33, + "charOffset": 57564, + "charLength": 26, + "snippet": { + "text": "CONDITIONATTR_FORMULA_MINA" + } + }, + "contextRegion": { + "startLine": 2158, + "startColumn": 33, + "charOffset": 57486, + "charLength": 26, + "snippet": { + "text": "\tpropWriteStream.write(speedDelta);\n\n\tpropWriteStream.write(CONDITIONATTR_FORMULA_MINA);\n\tpropWriteStream.write(mina);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85c0c562bdfac1a148fd9b7f2e7a8bb3669816adbcc81028b3eb2643f7eaf6f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2163, + "startColumn": 33, + "charOffset": 57663, + "charLength": 26, + "snippet": { + "text": "CONDITIONATTR_FORMULA_MINB" + } + }, + "contextRegion": { + "startLine": 2161, + "startColumn": 33, + "charOffset": 57593, + "charLength": 26, + "snippet": { + "text": "\tpropWriteStream.write(mina);\n\n\tpropWriteStream.write(CONDITIONATTR_FORMULA_MINB);\n\tpropWriteStream.write(minb);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ec48f35e44e0719388548259d47c148496d7da59f3184da348604d796df7440" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2166, + "startColumn": 33, + "charOffset": 57762, + "charLength": 26, + "snippet": { + "text": "CONDITIONATTR_FORMULA_MAXA" + } + }, + "contextRegion": { + "startLine": 2164, + "startColumn": 33, + "charOffset": 57692, + "charLength": 26, + "snippet": { + "text": "\tpropWriteStream.write(minb);\n\n\tpropWriteStream.write(CONDITIONATTR_FORMULA_MAXA);\n\tpropWriteStream.write(maxa);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b15a2ed5f6928bf098498229a616f9a4187a7c788d3cec64e3a0d4bb9a3684ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2169, + "startColumn": 33, + "charOffset": 57861, + "charLength": 26, + "snippet": { + "text": "CONDITIONATTR_FORMULA_MAXB" + } + }, + "contextRegion": { + "startLine": 2167, + "startColumn": 33, + "charOffset": 57791, + "charLength": 26, + "snippet": { + "text": "\tpropWriteStream.write(maxa);\n\n\tpropWriteStream.write(CONDITIONATTR_FORMULA_MAXB);\n\tpropWriteStream.write(maxb);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bda3af4b90ce3f5e76fdabc62042a51f5f80e2cff41da79801ffa967d44cffe0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'min' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2179, + "startColumn": 11, + "charOffset": 58103, + "charLength": 3, + "snippet": { + "text": "min" + } + }, + "contextRegion": { + "startLine": 2177, + "startColumn": 11, + "charOffset": 58068, + "charLength": 3, + "snippet": { + "text": "\n\tif (speedDelta == 0) {\n\t\tint32_t min;\n\t\tint32_t max;\n\t\tauto baseSpeed = creature->getBaseSpeed();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c2ea29cccf280487f17882dbe150429c5e0ec4406b422c5fb65dae9857f8129" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'max' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2180, + "startColumn": 11, + "charOffset": 58118, + "charLength": 3, + "snippet": { + "text": "max" + } + }, + "contextRegion": { + "startLine": 2178, + "startColumn": 11, + "charOffset": 58069, + "charLength": 3, + "snippet": { + "text": "\tif (speedDelta == 0) {\n\t\tint32_t min;\n\t\tint32_t max;\n\t\tauto baseSpeed = creature->getBaseSpeed();\n\t\tgetFormulaValues(baseSpeed, min, max);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "622cceb6b74bb69b7fafe9d25a3b701c0d76a0909ac9b9f63afad2c997611a18" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2184, + "startColumn": 59, + "charOffset": 58320, + "charLength": 2, + "snippet": { + "text": "40" + } + }, + "contextRegion": { + "startLine": 2182, + "startColumn": 59, + "charOffset": 58168, + "charLength": 2, + "snippet": { + "text": "\t\tgetFormulaValues(baseSpeed, min, max);\n\t\tspeedDelta = uniform_random(min, max) - baseSpeed;\n\t\tif (conditionType == CONDITION_PARALYZE && speedDelta < 40 - baseSpeed) {\n\t\t\tspeedDelta = 40 - baseSpeed;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11c9461ae216bca55deb34f08008c0af5146bd2eaad5583891a1908867620d76" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2185, + "startColumn": 17, + "charOffset": 58354, + "charLength": 2, + "snippet": { + "text": "40" + } + }, + "contextRegion": { + "startLine": 2183, + "startColumn": 17, + "charOffset": 58209, + "charLength": 2, + "snippet": { + "text": "\t\tspeedDelta = uniform_random(min, max) - baseSpeed;\n\t\tif (conditionType == CONDITION_PARALYZE && speedDelta < 40 - baseSpeed) {\n\t\t\tspeedDelta = 40 - baseSpeed;\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "928adb5396e89f0a07297a912038caf1be7392fe917b3fa7ae29e6379e0fad05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'min' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2221, + "startColumn": 11, + "charOffset": 59315, + "charLength": 3, + "snippet": { + "text": "min" + } + }, + "contextRegion": { + "startLine": 2219, + "startColumn": 11, + "charOffset": 59280, + "charLength": 3, + "snippet": { + "text": "\n\tif (speedDelta == 0) {\n\t\tint32_t min;\n\t\tint32_t max;\n\t\tauto baseSpeed = creature->getBaseSpeed();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85495f826d8bc24f9058feaed95257c462a4e8864ca0287ea5af152746c354e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'max' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2222, + "startColumn": 11, + "charOffset": 59330, + "charLength": 3, + "snippet": { + "text": "max" + } + }, + "contextRegion": { + "startLine": 2220, + "startColumn": 11, + "charOffset": 59281, + "charLength": 3, + "snippet": { + "text": "\tif (speedDelta == 0) {\n\t\tint32_t min;\n\t\tint32_t max;\n\t\tauto baseSpeed = creature->getBaseSpeed();\n\t\tgetFormulaValues(baseSpeed, min, max);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "191a84586f169e92082cde787ee82742d7e0da571521b985cd18fa50faa99bb5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2227, + "startColumn": 59, + "charOffset": 59533, + "charLength": 2, + "snippet": { + "text": "40" + } + }, + "contextRegion": { + "startLine": 2225, + "startColumn": 59, + "charOffset": 59421, + "charLength": 2, + "snippet": { + "text": "\t\tspeedDelta = uniform_random(min, max) - baseSpeed;\n\n\t\tif (conditionType == CONDITION_PARALYZE && speedDelta < 40 - baseSpeed) {\n\t\t\tspeedDelta = 40 - baseSpeed;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1187256fb0ea761c6d9453be7eaa98da21e8e40b6590d34cb7966f202edf56f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "40 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2228, + "startColumn": 17, + "charOffset": 59567, + "charLength": 2, + "snippet": { + "text": "40" + } + }, + "contextRegion": { + "startLine": 2226, + "startColumn": 17, + "charOffset": 59474, + "charLength": 2, + "snippet": { + "text": "\n\t\tif (conditionType == CONDITION_PARALYZE && speedDelta < 40 - baseSpeed) {\n\t\t\tspeedDelta = 40 - baseSpeed;\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "92776098af0ec91373708f050f9ffe0e4fed89231ff12e3d548fffc94d14e363" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2242, + "startColumn": 10, + "charOffset": 59893, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 2240, + "startColumn": 10, + "charOffset": 59834, + "charLength": 6, + "snippet": { + "text": "\tswitch (conditionType) {\n\t\tcase CONDITION_HASTE:\n\t\t\ticons.insert(PlayerIcon::Haste);\n\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc72823f04b518c19d94c2cc8928cd2060908124e34c1a8458d32d8aced6e482" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2246, + "startColumn": 10, + "charOffset": 59967, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 2244, + "startColumn": 10, + "charOffset": 59930, + "charLength": 6, + "snippet": { + "text": "\n\t\tcase CONDITION_PARALYZE:\n\t\t\ticons.insert(PlayerIcon::Paralyze);\n\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5110803b7b59efcd4a14213db937b8e20afae732bbcdc3802f492e7b83689864" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-parent-virtual-call", + "ruleIndex": 80, + "kind": "fail", + "level": "warning", + "message": { + "text": "qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2260, + "startColumn": 7, + "charOffset": 60166, + "charLength": 9, + "snippet": { + "text": "Condition" + } + }, + "contextRegion": { + "startLine": 2258, + "startColumn": 7, + "charOffset": 60081, + "charLength": 9, + "snippet": { + "text": "\nbool ConditionInvisible::startCondition(std::shared_ptr creature) {\n\tif (!Condition::startCondition(creature)) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "664b8694e3f8389f1b9b74a1131c6494be463cd30300460412c0fdf471d48af9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2296, + "startColumn": 33, + "charOffset": 61074, + "charLength": 20, + "snippet": { + "text": "CONDITIONATTR_OUTFIT" + } + }, + "contextRegion": { + "startLine": 2294, + "startColumn": 33, + "charOffset": 61001, + "charLength": 20, + "snippet": { + "text": "\tCondition::serialize(propWriteStream);\n\n\tpropWriteStream.write(CONDITIONATTR_OUTFIT);\n\tpropWriteStream.write(outfit);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d0e32c51c1f6e83dc36d306bf0e95390fba0c2ffe0b873f03177eae353e2fb1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2342, + "startColumn": 3, + "charOffset": 62972, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2340, + "startColumn": 3, + "charOffset": 62858, + "charLength": 2, + "snippet": { + "text": "\n\t\tconst std::shared_ptr &conditionOutfit = addCondition->static_self_cast();\n\t\tif (!conditionOutfit->monsterName.empty() && conditionOutfit->monsterName.compare(monsterName) != 0) {\n\t\t\tconst auto monsterType = g_monsters().getMonsterType(conditionOutfit->monsterName);\n\t\t\tif (monsterType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a698a9376cedb7afe06a2f5f94c5b3d2b5aeacd1eebe9dd5177c2bab6083d8d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-string-compare", + "ruleIndex": 731, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'compare' to test equality of strings; use the string equality operator instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2342, + "startColumn": 48, + "charOffset": 63017, + "charLength": 15, + "snippet": { + "text": "conditionOutfit" + } + }, + "contextRegion": { + "startLine": 2340, + "startColumn": 48, + "charOffset": 62858, + "charLength": 15, + "snippet": { + "text": "\n\t\tconst std::shared_ptr &conditionOutfit = addCondition->static_self_cast();\n\t\tif (!conditionOutfit->monsterName.empty() && conditionOutfit->monsterName.compare(monsterName) != 0) {\n\t\t\tconst auto monsterType = g_monsters().getMonsterType(conditionOutfit->monsterName);\n\t\t\tif (monsterType) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6f3f6308224ae8b32d88c68da2383bd7a9bfa2c5dedc49fba2e20587f75b672" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2417, + "startColumn": 3, + "charOffset": 65244, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 2415, + "startColumn": 3, + "charOffset": 65223, + "charLength": 4, + "snippet": { + "text": "\n\tswitch (param) {\n\t\tcase CONDITION_PARAM_LIGHT_LEVEL:\n\t\t\tlightInfo.level = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "637c34a801f3164067470262990a5e9eb17c93eab38133bc8739b93075af7038" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2418, + "startColumn": 22, + "charOffset": 65299, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 2416, + "startColumn": 22, + "charOffset": 65224, + "charLength": 5, + "snippet": { + "text": "\tswitch (param) {\n\t\tcase CONDITION_PARAM_LIGHT_LEVEL:\n\t\t\tlightInfo.level = value;\n\t\t\treturn true;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "827e065a23ea3397f50150a93989d8d4a56b10fcc9deee661cc12f3a2a5658bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2421, + "startColumn": 3, + "charOffset": 65325, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 2419, + "startColumn": 3, + "charOffset": 65306, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn true;\n\n\t\tcase CONDITION_PARAM_LIGHT_COLOR:\n\t\t\tlightInfo.color = value;\n\t\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93334e9d20b48768fbed223cc2e5ede59e08f04194c8be7709cb3c3aae52ef7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2422, + "startColumn": 22, + "charOffset": 65380, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 2420, + "startColumn": 22, + "charOffset": 65322, + "charLength": 5, + "snippet": { + "text": "\n\t\tcase CONDITION_PARAM_LIGHT_COLOR:\n\t\t\tlightInfo.color = value;\n\t\t\treturn true;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3272726e1971a678e2a1975b3d194f910e5a94855511c1b5b0fddbc72a83b271" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2425, + "startColumn": 3, + "charOffset": 65406, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 2423, + "startColumn": 3, + "charOffset": 65387, + "charLength": 7, + "snippet": { + "text": "\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8255026a894656ed262fdb5357393aa766b0638151cdbd4ca0a8cf662585a5d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2431, + "startColumn": 2, + "charOffset": 65524, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 2429, + "startColumn": 2, + "charOffset": 65437, + "charLength": 2, + "snippet": { + "text": "\nbool ConditionLight::unserializeProp(ConditionAttr_t attr, PropStream &propStream) {\n\tif (attr == CONDITIONATTR_LIGHTCOLOR) {\n\t\tuint32_t value;\n\t\tif (!propStream.read(value)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f510aa0c04038cd90411163ff1d6218e2478d1bc5f9822cee7a13f26f6b339c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'value' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2432, + "startColumn": 12, + "charOffset": 65575, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 2430, + "startColumn": 12, + "charOffset": 65438, + "charLength": 5, + "snippet": { + "text": "bool ConditionLight::unserializeProp(ConditionAttr_t attr, PropStream &propStream) {\n\tif (attr == CONDITIONATTR_LIGHTCOLOR) {\n\t\tuint32_t value;\n\t\tif (!propStream.read(value)) {\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5746fcd0c26d4d3e41ef63dad4b1d30fd2de3f219b07b22a6dc42945b10f5ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2437, + "startColumn": 21, + "charOffset": 65667, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 2435, + "startColumn": 21, + "charOffset": 65642, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\n\t\tlightInfo.color = value;\n\t\treturn true;\n\t} else if (attr == CONDITIONATTR_LIGHTLEVEL) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f74b4ff020996c50f7cec6c86edaaf3b5c2f80d1c53820fa79d0cbb45ead41d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2439, + "startColumn": 4, + "charOffset": 65692, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 2437, + "startColumn": 4, + "charOffset": 65647, + "charLength": 4, + "snippet": { + "text": "\t\tlightInfo.color = value;\n\t\treturn true;\n\t} else if (attr == CONDITIONATTR_LIGHTLEVEL) {\n\t\tuint32_t value;\n\t\tif (!propStream.read(value)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "888435093622d8fe65c28ca9997f9d661c0c7f9a93ada5a3396830fb52a006f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'value' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2440, + "startColumn": 12, + "charOffset": 65748, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 2438, + "startColumn": 12, + "charOffset": 65674, + "charLength": 5, + "snippet": { + "text": "\t\treturn true;\n\t} else if (attr == CONDITIONATTR_LIGHTLEVEL) {\n\t\tuint32_t value;\n\t\tif (!propStream.read(value)) {\n\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0753b0fe1eec16141444d418560bf377ff115123c4efd3bdb5742160f4d2a8cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2445, + "startColumn": 21, + "charOffset": 65840, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 2443, + "startColumn": 21, + "charOffset": 65815, + "charLength": 5, + "snippet": { + "text": "\t\t}\n\n\t\tlightInfo.level = value;\n\t\treturn true;\n\t} else if (attr == CONDITIONATTR_LIGHTTICKS) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3bbef7b44ab20957d0677d11209d7dab4425067e3d33ac9a75f855a010448143" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-todo", + "ruleIndex": 545, + "kind": "fail", + "level": "warning", + "message": { + "text": "missing username/bug in TODO" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2458, + "startColumn": 2, + "charOffset": 66243, + "charLength": 80, + "snippet": { + "text": "// TODO: color and level could be serialized as 8-bit if we can retain backwards" + } + }, + "contextRegion": { + "startLine": 2456, + "startColumn": 2, + "charOffset": 66201, + "charLength": 80, + "snippet": { + "text": "\tCondition::serialize(propWriteStream);\n\n\t// TODO: color and level could be serialized as 8-bit if we can retain backwards\n\t// compatibility, but perhaps we should keep it like this in case they increase\n\t// in the future..." + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81843ceb6dbfd88a730cab87cbc6987bbf40514f0ef17262125c53fce91e7099" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2461, + "startColumn": 33, + "charOffset": 66458, + "charLength": 24, + "snippet": { + "text": "CONDITIONATTR_LIGHTCOLOR" + } + }, + "contextRegion": { + "startLine": 2459, + "startColumn": 33, + "charOffset": 66324, + "charLength": 24, + "snippet": { + "text": "\t// compatibility, but perhaps we should keep it like this in case they increase\n\t// in the future...\n\tpropWriteStream.write(CONDITIONATTR_LIGHTCOLOR);\n\tpropWriteStream.write(lightInfo.color);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f15d31d0528ae5a895cdf3e4d2964653f97ba9d9348eccac78ff6b06552a9801" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2464, + "startColumn": 33, + "charOffset": 66569, + "charLength": 24, + "snippet": { + "text": "CONDITIONATTR_LIGHTLEVEL" + } + }, + "contextRegion": { + "startLine": 2462, + "startColumn": 33, + "charOffset": 66485, + "charLength": 24, + "snippet": { + "text": "\tpropWriteStream.write(lightInfo.color);\n\n\tpropWriteStream.write(CONDITIONATTR_LIGHTLEVEL);\n\tpropWriteStream.write(lightInfo.level);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e25f36a855cc7f6391c543a8b280bf6fde1ab32354af578cad306709d0dd65f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2467, + "startColumn": 33, + "charOffset": 66680, + "charLength": 24, + "snippet": { + "text": "CONDITIONATTR_LIGHTTICKS" + } + }, + "contextRegion": { + "startLine": 2465, + "startColumn": 33, + "charOffset": 66596, + "charLength": 24, + "snippet": { + "text": "\tpropWriteStream.write(lightInfo.level);\n\n\tpropWriteStream.write(CONDITIONATTR_LIGHTTICKS);\n\tpropWriteStream.write(internalLightTicks);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a06907612d01061c40a75e82970e1459f6094202a24b934f8d6e2fda3d506c1a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2470, + "startColumn": 33, + "charOffset": 66794, + "charLength": 27, + "snippet": { + "text": "CONDITIONATTR_LIGHTINTERVAL" + } + }, + "contextRegion": { + "startLine": 2468, + "startColumn": 33, + "charOffset": 66707, + "charLength": 27, + "snippet": { + "text": "\tpropWriteStream.write(internalLightTicks);\n\n\tpropWriteStream.write(CONDITIONATTR_LIGHTINTERVAL);\n\tpropWriteStream.write(lightChangeInterval);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44ae6d81af2170edc433a595f964e8b10bc053054a0e12a2b0a80d90cda163c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2485, + "startColumn": 31, + "charOffset": 67261, + "charLength": 5, + "snippet": { + "text": "subId" + } + }, + "contextRegion": { + "startLine": 2483, + "startColumn": 31, + "charOffset": 67155, + "charLength": 5, + "snippet": { + "text": "\t\t\tstd::shared_ptr player = creature->getPlayer();\n\t\t\tif (player) {\n\t\t\t\tplayer->sendSpellCooldown(subId, ticks);\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aef698ca120e0f26f6df173cbe76f0b6ee9af59c90dc240eda4408864a840249" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-parent-virtual-call", + "ruleIndex": 80, + "kind": "fail", + "level": "warning", + "message": { + "text": "qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2492, + "startColumn": 7, + "charOffset": 67379, + "charLength": 9, + "snippet": { + "text": "Condition" + } + }, + "contextRegion": { + "startLine": 2490, + "startColumn": 7, + "charOffset": 67290, + "charLength": 9, + "snippet": { + "text": "\nbool ConditionSpellCooldown::startCondition(std::shared_ptr creature) {\n\tif (!Condition::startCondition(creature)) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b2c3303ebaf9edf3e0b7b2b4d452be98db9aea84f417802efa1a6faa4852c57" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2499, + "startColumn": 30, + "charOffset": 67573, + "charLength": 5, + "snippet": { + "text": "subId" + } + }, + "contextRegion": { + "startLine": 2497, + "startColumn": 30, + "charOffset": 67470, + "charLength": 5, + "snippet": { + "text": "\t\tstd::shared_ptr player = creature->getPlayer();\n\t\tif (player) {\n\t\t\tplayer->sendSpellCooldown(subId, ticks);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "431adf37719384d4212172e37a7edf202b86c4a22d63e17fd2f3592480616a0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-parent-virtual-call", + "ruleIndex": 80, + "kind": "fail", + "level": "warning", + "message": { + "text": "qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/condition.cpp" + }, + "region": { + "startLine": 2523, + "startColumn": 7, + "charOffset": 68156, + "charLength": 9, + "snippet": { + "text": "Condition" + } + }, + "contextRegion": { + "startLine": 2521, + "startColumn": 7, + "charOffset": 68062, + "charLength": 9, + "snippet": { + "text": "\nbool ConditionSpellGroupCooldown::startCondition(std::shared_ptr creature) {\n\tif (!Condition::startCondition(creature)) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d35e50dcd56fd773d4436666c9c395d542f753f979849f8a7954fb2d46add77" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvmlibc-restrict-system-libc-headers", + "ruleIndex": 592, + "kind": "fail", + "level": "warning", + "message": { + "text": "system include spdlog/spdlog.h not allowed" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/logging/log_with_spd_log.cpp" + }, + "region": { + "startLine": 9, + "startColumn": 1, + "charOffset": 370, + "charLength": 1, + "snippet": { + "text": "#" + } + }, + "contextRegion": { + "startLine": 7, + "startColumn": 1, + "charOffset": 324, + "charLength": 1, + "snippet": { + "text": " * Website: https://docs.opentibiabr.com/\n */\n#include \n\n#include \"pch.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e34e633646305fa0db4edff999525103a706c94be4ff0fd236002102eb9a418" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-macro-usage", + "ruleIndex": 493, + "kind": "fail", + "level": "warning", + "message": { + "text": "macro 'DEFAULT_NUMBER_OF_THREADS' used to declare a constant; consider using a 'constexpr' constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/thread/thread_pool.cpp" + }, + "region": { + "startLine": 25, + "startColumn": 10, + "charOffset": 821, + "charLength": 25, + "snippet": { + "text": "DEFAULT_NUMBER_OF_THREADS" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 10, + "charOffset": 777, + "charLength": 25, + "snippet": { + "text": "\n#ifndef DEFAULT_NUMBER_OF_THREADS\n\t#define DEFAULT_NUMBER_OF_THREADS 4\n#endif\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89ed01d2f92854ee795fbfa7abcc3b815ed53c87ed42ce18289509910cc056d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lib/thread/thread_pool.cpp" + }, + "region": { + "startLine": 29, + "startColumn": 32, + "charOffset": 929, + "charLength": 16, + "snippet": { + "text": "getNumberOfCores" + } + }, + "contextRegion": { + "startLine": 27, + "startColumn": 32, + "charOffset": 856, + "charLength": 16, + "snippet": { + "text": "\nThreadPool::ThreadPool(Logger &logger) :\n\tBS::thread_pool(std::max(getNumberOfCores(), DEFAULT_NUMBER_OF_THREADS)), logger(logger) {\n\tstart();\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9838e87fc32dd91675d14ccc446e44ec68ef7f75ac6cf0697e84722a59b7e3f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-pass-by-value", + "ruleIndex": 624, + "kind": "fail", + "level": "warning", + "message": { + "text": "pass by value and use std::move" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.cpp" + }, + "region": { + "startLine": 18, + "startColumn": 28, + "charOffset": 589, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 16, + "startColumn": 28, + "charOffset": 500, + "charLength": 5, + "snippet": { + "text": "\ttimestamp_(timestamp == 0 ? getTimeMsNow() : timestamp) { }\n\nValueWrapper::ValueWrapper(const ValueVariant &value, uint64_t timestamp) :\n\tdata_(value), timestamp_(timestamp == 0 ? getTimeMsNow() : timestamp) { }\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f01a856dbd889d446c2ad2ed714f1758e20d56bfdc90eb4789b3f23e328fa361" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-12-1-3", + "ruleIndex": 400, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 12-1-3: All constructors that are callable with a single argument of fundamental type shall be declared explicit" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.cpp" + }, + "region": { + "startLine": 24, + "startColumn": 15, + "charOffset": 879, + "charLength": 12, + "snippet": { + "text": "ValueWrapper" + } + }, + "contextRegion": { + "startLine": 22, + "startColumn": 15, + "charOffset": 789, + "charLength": 12, + "snippet": { + "text": "\tdata_(value), timestamp_(timestamp == 0 ? getTimeMsNow() : timestamp) { }\n\nValueWrapper::ValueWrapper(bool value, uint64_t timestamp) :\n\tdata_(value), timestamp_(timestamp == 0 ? getTimeMsNow() : timestamp) { }\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ba705a9f892ff17dcb550497058e32627d168012d19793521bec5adbbb3aaa6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-12-1-3", + "ruleIndex": 400, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 12-1-3: All constructors that are callable with a single argument of fundamental type shall be declared explicit" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 15, + "charOffset": 1016, + "charLength": 12, + "snippet": { + "text": "ValueWrapper" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 15, + "charOffset": 926, + "charLength": 12, + "snippet": { + "text": "\tdata_(value), timestamp_(timestamp == 0 ? getTimeMsNow() : timestamp) { }\n\nValueWrapper::ValueWrapper(int value, uint64_t timestamp) :\n\tdata_(value), timestamp_(timestamp == 0 ? getTimeMsNow() : timestamp) { }\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "460ede73126ecdff11c02187eba660d538de8e0d37b360f7e112d611b0ab8c9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'ValueWrapper' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 28, + "charOffset": 1029, + "charLength": 3, + "snippet": { + "text": "int" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 28, + "charOffset": 926, + "charLength": 3, + "snippet": { + "text": "\tdata_(value), timestamp_(timestamp == 0 ? getTimeMsNow() : timestamp) { }\n\nValueWrapper::ValueWrapper(int value, uint64_t timestamp) :\n\tdata_(value), timestamp_(timestamp == 0 ? getTimeMsNow() : timestamp) { }\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0c8027f0ecf90c5cc9f18bd19943b5875a43a5c9a9c01f9c3eb4a1bc2fd2969" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-12-1-3", + "ruleIndex": 400, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 12-1-3: All constructors that are callable with a single argument of fundamental type shall be declared explicit" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.cpp" + }, + "region": { + "startLine": 30, + "startColumn": 15, + "charOffset": 1152, + "charLength": 12, + "snippet": { + "text": "ValueWrapper" + } + }, + "contextRegion": { + "startLine": 28, + "startColumn": 15, + "charOffset": 1062, + "charLength": 12, + "snippet": { + "text": "\tdata_(value), timestamp_(timestamp == 0 ? getTimeMsNow() : timestamp) { }\n\nValueWrapper::ValueWrapper(double value, uint64_t timestamp) :\n\tdata_(value), timestamp_(timestamp == 0 ? getTimeMsNow() : timestamp) { }\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c19b9a4009be7590dbf990bd7fdb3911e64b97ec672d3cd206f794a0978e1643" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'ValueWrapper' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.cpp" + }, + "region": { + "startLine": 30, + "startColumn": 28, + "charOffset": 1165, + "charLength": 6, + "snippet": { + "text": "double" + } + }, + "contextRegion": { + "startLine": 28, + "startColumn": 28, + "charOffset": 1062, + "charLength": 6, + "snippet": { + "text": "\tdata_(value), timestamp_(timestamp == 0 ? getTimeMsNow() : timestamp) { }\n\nValueWrapper::ValueWrapper(double value, uint64_t timestamp) :\n\tdata_(value), timestamp_(timestamp == 0 ? getTimeMsNow() : timestamp) { }\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4531d55089383ac7ed5878713f757080e902054c7ef85a50e9e2b5c640f2a737" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto pval' can be declared as 'const auto *pval'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 2, + "charOffset": 1866, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 2, + "charOffset": 1786, + "charLength": 4, + "snippet": { + "text": "\nstd::optional ValueWrapper::get(const std::string &key) const {\n\tauto pval = std::get_if(&data_);\n\tif (!pval) {\n\t\treturn std::nullopt;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a85eff03c3cc028b2e0032ec2d4e4bea295db295ec36a717ed5d1297de9a16a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 6, + "charOffset": 1913, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 6, + "charOffset": 1787, + "charLength": 1, + "snippet": { + "text": "std::optional ValueWrapper::get(const std::string &key) const {\n\tauto pval = std::get_if(&data_);\n\tif (!pval) {\n\t\treturn std::nullopt;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15cd91968020250a49f10c1d426d728d9182e2c414d96b5fb65dffa40d0fe1da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'add_pointer_t, allocator>, shared_ptr, Hash, Eq, allocator, allocator>, shared_ptr>>>>' (aka 'const phmap::flat_hash_map, std::shared_ptr> *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.cpp" + }, + "region": { + "startLine": 43, + "startColumn": 7, + "charOffset": 1914, + "charLength": 4, + "snippet": { + "text": "pval" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 7, + "charOffset": 1787, + "charLength": 4, + "snippet": { + "text": "std::optional ValueWrapper::get(const std::string &key) const {\n\tauto pval = std::get_if(&data_);\n\tif (!pval) {\n\t\treturn std::nullopt;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb2edb5869ba1371bdb2d9865f26c5f69e0867dffb4837a8074273a8705bb6d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.cpp" + }, + "region": { + "startLine": 52, + "startColumn": 6, + "charOffset": 2057, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 50, + "startColumn": 6, + "charOffset": 2004, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto &[_, valuePtr] = *pval->find(key);\n\tif (!valuePtr) {\n\t\treturn std::nullopt;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db4837ecb0d6e442344bad4388ed1d74153e76386c56f53793ee71426fef4f9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto pval' can be declared as 'const auto *pval'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper.cpp" + }, + "region": { + "startLine": 60, + "startColumn": 6, + "charOffset": 2192, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 6, + "charOffset": 2118, + "charLength": 4, + "snippet": { + "text": "\nstd::optional ValueWrapper::get(size_t index) const {\n\tif (auto pval = std::get_if(&data_)) {\n\t\tif (index < pval->size()) {\n\t\t\treturn (*pval)[index];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "57e6d1dc25a7a75552a08ca4c5c14ce32c7eb487b097b66da85ecc5c72880115" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper_proto.cpp" + }, + "region": { + "startLine": 44, + "startColumn": 3, + "charOffset": 1454, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 42, + "startColumn": 3, + "charOffset": 1309, + "charLength": 3, + "snippet": { + "text": "\tvoid setProtoMapValue(Canary::protobuf::kv::ValueWrapper &protoValue, const MapType &arg) {\n\t\tauto mapValue = protoValue.mutable_map_value();\n\t\tfor (const auto &[key, value] : arg) {\n\t\t\tauto* elem = mapValue->add_items();\n\t\t\telem->set_key(key);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0fd27790ba500942c81462fc1244403e88cfe4c76d937e65448162c09748198" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-namespace-comments", + "ruleIndex": 544, + "kind": "fail", + "level": "warning", + "message": { + "text": "namespace 'ProtoHelpers' not terminated with a closing comment" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper_proto.cpp" + }, + "region": { + "startLine": 50, + "startColumn": 1, + "charOffset": 1626, + "charLength": 1, + "snippet": { + "text": "}" + } + }, + "contextRegion": { + "startLine": 48, + "startColumn": 1, + "charOffset": 1619, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\t}\n}\n\nCanary::protobuf::kv::ValueWrapper ProtoSerializable::toProto(const ValueWrapper &obj) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a04bda4caf35deca13422fc72df3d6306f607deb41296e6272881945ee8ed53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper_proto.cpp" + }, + "region": { + "startLine": 58, + "startColumn": 4, + "charOffset": 1860, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 56, + "startColumn": 4, + "charOffset": 1780, + "charLength": 2, + "snippet": { + "text": "\t\t[&protoValue](const auto &arg) {\n\t\t\tusing T = std::decay_t;\n\t\t\tif constexpr (std::is_same_v) {\n\t\t\t\tProtoHelpers::setProtoStringValue(protoValue, arg);\n\t\t\t} else if constexpr (std::is_same_v) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38ebc0deaf5179e3ef1f2b9ffd36addc63a97010861b6ad2e120567f742b434d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper_proto.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 7, + "charOffset": 2532, + "charLength": 10, + "snippet": { + "text": "getVariant" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 7, + "charOffset": 2516, + "charLength": 10, + "snippet": { + "text": "\t\t\t}\n\t\t},\n\t\tobj.getVariant()\n\t);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1163407ee5bef775b1886b627b14eb52373b70faf9bf58aa3e77c4380274449e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-8", + "ruleIndex": 455, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-8: Every switch statement shall have at least one case-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper_proto.cpp" + }, + "region": { + "startLine": 80, + "startColumn": 2, + "charOffset": 2712, + "charLength": 6, + "snippet": { + "text": "switch" + } + }, + "contextRegion": { + "startLine": 78, + "startColumn": 2, + "charOffset": 2573, + "charLength": 6, + "snippet": { + "text": "ValueWrapper ProtoSerializable::fromProto(const Canary::protobuf::kv::ValueWrapper &protoValue, uint64_t timestamp) {\n\tValueVariant data;\n\tswitch (protoValue.value_case()) {\n\t\tcase Canary::protobuf::kv::ValueWrapper::kStrValue:\n\t\t\tdata = protoValue.str_value();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe1667450c20bef79d98e0e0f366c7af85c9d5348f3fad5773c0d70beaa6178f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-return-braced-init-list", + "ruleIndex": 630, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/value_wrapper_proto.cpp" + }, + "region": { + "startLine": 110, + "startColumn": 9, + "charOffset": 3685, + "charLength": 12, + "snippet": { + "text": "ValueWrapper" + } + }, + "contextRegion": { + "startLine": 108, + "startColumn": 9, + "charOffset": 3664, + "charLength": 12, + "snippet": { + "text": "\t\t\tbreak;\n\t}\n\treturn ValueWrapper(data, timestamp);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6708d553f7efa1db98d13882f1cde582a7916a9297087af68ed6686a20ccf030" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-avoid-return-with-void-value", + "ruleIndex": 689, + "kind": "fail", + "level": "warning", + "message": { + "text": "return statement within a void function should not have a specified return value" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.cpp" + }, + "region": { + "startLine": 35, + "startColumn": 2, + "charOffset": 1073, + "charLength": 6, + "snippet": { + "text": "return" + } + }, + "contextRegion": { + "startLine": 33, + "startColumn": 2, + "charOffset": 969, + "charLength": 6, + "snippet": { + "text": "void KVStore::set(const std::string &key, const ValueWrapper &value) {\n\tstd::scoped_lock lock(mutex_);\n\treturn setLocked(key, value);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "210de3c6b5a4468fbb5884b04556f7bb290c419c750cb507892caadf6266ba3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.cpp" + }, + "region": { + "startLine": 49, + "startColumn": 4, + "charOffset": 1544, + "charLength": 4, + "snippet": { + "text": "save" + } + }, + "contextRegion": { + "startLine": 47, + "startColumn": 4, + "charOffset": 1498, + "charLength": 4, + "snippet": { + "text": "\t\t\tauto last = lruQueue_.end();\n\t\t\tlast--;\n\t\t\tsave(*last, store_[*last].first);\n\t\t\tstore_.erase(*last);\n\t\t\tlruQueue_.pop_back();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69f809a439d6a350bcbd2a2767a82230a6ff5cfb66079719036221c6c8a67bf2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.cpp" + }, + "region": { + "startLine": 50, + "startColumn": 11, + "charOffset": 1588, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 48, + "startColumn": 11, + "charOffset": 1530, + "charLength": 5, + "snippet": { + "text": "\t\t\tlast--;\n\t\t\tsave(*last, store_[*last].first);\n\t\t\tstore_.erase(*last);\n\t\t\tlruQueue_.pop_back();\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ce42271ff191f09e62496f92dc6ee1311485b437cfce917567c7ceba036dd5c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.cpp" + }, + "region": { + "startLine": 55, + "startColumn": 10, + "charOffset": 1670, + "charLength": 11, + "snippet": { + "text": "try_emplace" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 10, + "charOffset": 1631, + "charLength": 11, + "snippet": { + "text": "\n\t\tlruQueue_.push_front(key);\n\t\tstore_.try_emplace(key, std::make_pair(value, lruQueue_.begin()));\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a015c3f388daef39a59df1613a0f90cd053962221735a5431015dac795115198" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 38, + "charOffset": 1773, + "charLength": 3, + "snippet": { + "text": "get" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 38, + "charOffset": 1733, + "charLength": 3, + "snippet": { + "text": "}\n\nstd::optional KVStore::get(const std::string &key, bool forceLoad /*= false */) {\n\tlogger.trace(\"KVStore::get({})\", key);\n\tstd::scoped_lock lock(mutex_);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e3f808cbf28b590d64415f735820939e9d8ca96fd9a05a9cc7c2e993e2963b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-default-arguments", + "ruleIndex": 533, + "kind": "fail", + "level": "warning", + "message": { + "text": "default arguments on virtual or override methods are prohibited" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.cpp" + }, + "region": { + "startLine": 79, + "startColumn": 42, + "charOffset": 2298, + "charLength": 4, + "snippet": { + "text": "keys" + } + }, + "contextRegion": { + "startLine": 77, + "startColumn": 42, + "charOffset": 2254, + "charLength": 4, + "snippet": { + "text": "}\n\nstd::unordered_set KVStore::keys(const std::string &prefix /*= \"\"*/) {\n\tstd::scoped_lock lock(mutex_);\n\tstd::unordered_set keys;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a36ef7b2090e7af751fd38de368c428f264180e7c2382517a7bb5c8fc2742c17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.cpp" + }, + "region": { + "startLine": 82, + "startColumn": 2, + "charOffset": 2413, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 2, + "charOffset": 2341, + "charLength": 3, + "snippet": { + "text": "\tstd::scoped_lock lock(mutex_);\n\tstd::unordered_set keys;\n\tfor (const auto &[key, value] : store_) {\n\t\tif (key.find(prefix) == 0) {\n\t\t\tstd::string suffix = key.substr(prefix.size());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fbc3d2f5ccc64f3cc5b489cbb7cff633f2dcf123a58e1507519f59eaf659ffd4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-use-starts-ends-with", + "ruleIndex": 645, + "kind": "fail", + "level": "warning", + "message": { + "text": "use starts_with instead of find() == 0" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.cpp" + }, + "region": { + "startLine": 83, + "startColumn": 7, + "charOffset": 2461, + "charLength": 3, + "snippet": { + "text": "key" + } + }, + "contextRegion": { + "startLine": 81, + "startColumn": 7, + "charOffset": 2373, + "charLength": 3, + "snippet": { + "text": "\tstd::unordered_set keys;\n\tfor (const auto &[key, value] : store_) {\n\t\tif (key.find(prefix) == 0) {\n\t\t\tstd::string suffix = key.substr(prefix.size());\n\t\t\tkeys.insert(suffix);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bba777d98cf79c563d6034c9fe633f0348036c594acee561297592a417815a7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.cpp" + }, + "region": { + "startLine": 85, + "startColumn": 9, + "charOffset": 2545, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 9, + "charOffset": 2455, + "charLength": 6, + "snippet": { + "text": "\t\tif (key.find(prefix) == 0) {\n\t\t\tstd::string suffix = key.substr(prefix.size());\n\t\t\tkeys.insert(suffix);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a7e0a5a6fe2ea1128cd5d8a8b14e4970879ebc4d1653d1a8ae29d37771c1c44" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.cpp" + }, + "region": { + "startLine": 88, + "startColumn": 2, + "charOffset": 2569, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 86, + "startColumn": 2, + "charOffset": 2561, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\t}\n\tfor (const auto &key : loadPrefix(prefix)) {\n\t\tkeys.insert(key);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "479a44b03d07971861c38b28273f03a189f851612e5092259b173960fa7b7c3a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv.cpp" + }, + "region": { + "startLine": 89, + "startColumn": 8, + "charOffset": 2621, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 87, + "startColumn": 8, + "charOffset": 2565, + "charLength": 6, + "snippet": { + "text": "\t}\n\tfor (const auto &key : loadPrefix(prefix)) {\n\t\tkeys.insert(key);\n\t}\n\treturn keys;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "216f69a77621435b2e90e072377e1e61223cc59129c5b2016ed2d3735645507a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-runtime-int", + "ruleIndex": 546, + "kind": "fail", + "level": "warning", + "message": { + "text": "consider replacing 'unsigned long' with 'uint64'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv_sql.cpp" + }, + "region": { + "startLine": 25, + "startColumn": 2, + "charOffset": 789, + "charLength": 8, + "snippet": { + "text": "unsigned" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 2, + "charOffset": 784, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tunsigned long size;\n\tauto data = result->getStream(\"value\", size);\n\tif (data == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a8627c4af82616531d9a2574f0842334bc180be65718dab6b63204dc8656a501" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'size' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv_sql.cpp" + }, + "region": { + "startLine": 25, + "startColumn": 16, + "charOffset": 803, + "charLength": 4, + "snippet": { + "text": "size" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 16, + "charOffset": 784, + "charLength": 4, + "snippet": { + "text": "\t}\n\n\tunsigned long size;\n\tauto data = result->getStream(\"value\", size);\n\tif (data == nullptr) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2fd1795f14f977ef8cfbbb3ac0a7f54917ebdf33f05861a3d2671bd79b192fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv_sql.cpp" + }, + "region": { + "startLine": 51, + "startColumn": 2, + "charOffset": 1643, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 49, + "startColumn": 2, + "charOffset": 1638, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tdo {\n\t\tstd::string key = result->getString(\"key_name\");\n\t\treplaceString(key, prefix, \"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01d7f4e138dfca6003e882f70f399150d58fc184a3bd08211bfffdc7a37b88f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv_sql.cpp" + }, + "region": { + "startLine": 51, + "startColumn": 2, + "charOffset": 1643, + "charLength": 2, + "snippet": { + "text": "do" + } + }, + "contextRegion": { + "startLine": 49, + "startColumn": 2, + "charOffset": 1638, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tdo {\n\t\tstd::string key = result->getString(\"key_name\");\n\t\treplaceString(key, prefix, \"\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a69e9a4a1a49273a95e5c879e50cdb0b44a0e0c8a80b0b6240bfdf172f9ae573" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv_sql.cpp" + }, + "region": { + "startLine": 62, + "startColumn": 2, + "charOffset": 1899, + "charLength": 11, + "snippet": { + "text": "prepareSave" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 2, + "charOffset": 1801, + "charLength": 11, + "snippet": { + "text": "bool KVSQL::save(const std::string &key, const ValueWrapper &value) {\n\tauto update = dbUpdate();\n\tprepareSave(key, value, update);\n\treturn update.execute();\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53b1536b8b92602f60b9a6281da27fe3d8aea365aaaf69ac9294ba5a7d1e1cf4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv_sql.cpp" + }, + "region": { + "startLine": 69, + "startColumn": 6, + "charOffset": 2134, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 67, + "startColumn": 6, + "charOffset": 2056, + "charLength": 1, + "snippet": { + "text": "\tauto protoValue = ProtoSerializable::toProto(value);\n\tstd::string data;\n\tif (!protoValue.SerializeToString(&data)) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71e438eebf78ccf44cc14947855f0e06d8968f4279d2dc48fb0dc48f6a46353c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv_sql.cpp" + }, + "region": { + "startLine": 77, + "startColumn": 9, + "charOffset": 2362, + "charLength": 6, + "snippet": { + "text": "addRow" + } + }, + "contextRegion": { + "startLine": 75, + "startColumn": 9, + "charOffset": 2350, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tupdate.addRow(fmt::format(\"{}, {}, {}\", db.escapeString(key), value.getTimestamp(), db.escapeString(data)));\n\treturn true;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a95f1493277c3010f2e9b3771d81d7e0064225fe8e7bd671fd08c31be18dcfe7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/kv/kv_sql.cpp" + }, + "region": { + "startLine": 85, + "startColumn": 7, + "charOffset": 2640, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 7, + "charOffset": 2531, + "charLength": 1, + "snippet": { + "text": "\tbool success = DBTransaction::executeWithinTransaction([this, &store]() {\n\t\tauto update = dbUpdate();\n\t\tif (!std::ranges::all_of(store, [this, &update](const auto &kv) {\n\t\t\t\tconst auto &[key, value] = kv;\n\t\t\t\treturn prepareSave(key, value.first, update);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "893fb7479daa8d187dafafb766abec2f6b01d776a075a8e35cfb3000112e6a5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/creaturecallback.cpp" + }, + "region": { + "startLine": 17, + "startColumn": 7, + "charOffset": 531, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 15, + "startColumn": 7, + "charOffset": 521, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface->reserveScriptEnv()) {\n\t\tauto targetCreature = m_targetCreature.lock();\n\t\tg_logger().error(" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1eac4c382999fe03eaab0bd06de9dc9dd50aca503e50a433b530093d146fc84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/creaturecallback.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 2, + "charOffset": 847, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 2, + "charOffset": 842, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tscriptInterface\n\t\t->getScriptEnv()\n\t\t->setScriptId(scriptId, scriptInterface);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67c099495ddb80c1b9bf6cd807c74bb2d12d04b2b0806a6462fb3b23220830be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/creaturecallback.cpp" + }, + "region": { + "startLine": 33, + "startColumn": 19, + "charOffset": 983, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 31, + "startColumn": 19, + "charOffset": 927, + "charLength": 12, + "snippet": { + "text": "\tL = scriptInterface->getLuaState();\n\n\tscriptInterface->pushFunction(scriptId);\n\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ceb099c127a268b41d659fa83653b4042891476d65188fca3eefe4dd6ab3987c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/creaturecallback.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 71, + "charOffset": 1095, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 71, + "charOffset": 1022, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid CreatureCallback::pushSpecificCreature(std::shared_ptr creature) {\n\tif (std::shared_ptr npc = creature->getNpc()) {\n\t\tLuaScriptInterface::pushUserdata(L, npc);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5edaca8381d5f9ab0671ec2c6293c10c3e019552a1beabf6182dcd4429bc2b8a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/creaturecallback.cpp" + }, + "region": { + "startLine": 53, + "startColumn": 74, + "charOffset": 1646, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 74, + "charOffset": 1570, + "charLength": 8, + "snippet": { + "text": "}\n\nstd::string CreatureCallback::getCreatureClass(std::shared_ptr creature) {\n\tif (!creature) {\n\t\treturn \"\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e0c90f16127db26db83ce319cf3f579f836bf90b9451560b6a1e1af8ad3e5c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/creaturecallback.cpp" + }, + "region": { + "startLine": 54, + "startColumn": 6, + "charOffset": 1663, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 52, + "startColumn": 6, + "charOffset": 1572, + "charLength": 1, + "snippet": { + "text": "\nstd::string CreatureCallback::getCreatureClass(std::shared_ptr creature) {\n\tif (!creature) {\n\t\treturn \"\";\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d53a5ee496f8fe1862c3ed3704494203d8587a7aa1b57bdedef21275951ef84b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.hpp" + }, + "region": { + "startLine": 13, + "startColumn": 10, + "charOffset": 429, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 11, + "startColumn": 10, + "charOffset": 384, + "charLength": 30, + "snippet": { + "text": "\n#include \"creatures/npcs/npcs.hpp\"\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"items/tile.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f69d6cfec9be0f6769310fd1d031cff4d88ef48385f012190be0fe563d15e4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.hpp", + "index": 1 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"creatures/monsters/monsters.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e45483e1912ecf8c717a48f913562d9a9cf501f9947625dad361d43acc28406" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.hpp", + "index": 2 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a2b3a997037594f8bab93e08d9b46935593069da5e9def3fec147ea485ffc36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 50, + "startColumn": 70, + "charOffset": 1392, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 48, + "startColumn": 70, + "charOffset": 1294, + "charLength": 8, + "snippet": { + "text": "// Lua functions\n// Creature\nbool EventCallback::creatureOnChangeOutfit(std::shared_ptr creature, const Outfit_t &outfit) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::creatureOnChangeOutfit - Creature {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e367c0558e219da8bac009aa9fdf86efbaecdbad8fff8a6e1b8d896ff920ce9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 51, + "startColumn": 7, + "charOffset": 1440, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 49, + "startColumn": 7, + "charOffset": 1311, + "charLength": 18, + "snippet": { + "text": "// Creature\nbool EventCallback::creatureOnChangeOutfit(std::shared_ptr creature, const Outfit_t &outfit) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::creatureOnChangeOutfit - Creature {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bec1ae5e2ff22f557e8351991976b274436103bec5d5f75997fb1cedfcbfbc1d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 58, + "startColumn": 41, + "charOffset": 1744, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 56, + "startColumn": 41, + "charOffset": 1700, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbb227911aa01bca1eb229a01e1ea7483a79a7d8952b05625aa82ba9ee35afac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 62, + "startColumn": 24, + "charOffset": 1929, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 60, + "startColumn": 24, + "charOffset": 1852, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e71295c9774d77e272474f56f8ba7669d980fa2315aa0e11edc1f5494ace1bab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 72, + "startColumn": 75, + "charOffset": 2247, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 75, + "charOffset": 2170, + "charLength": 8, + "snippet": { + "text": "}\n\nReturnValue EventCallback::creatureOnAreaCombat(std::shared_ptr creature, std::shared_ptr tile, bool aggressive) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::creatureOnAreaCombat - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2550878f3627e42c8c3f50b9546b526bb0a477553ac1da2d22494f79490dd17d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 72, + "startColumn": 107, + "charOffset": 2279, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 107, + "charOffset": 2170, + "charLength": 4, + "snippet": { + "text": "}\n\nReturnValue EventCallback::creatureOnAreaCombat(std::shared_ptr creature, std::shared_ptr tile, bool aggressive) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::creatureOnAreaCombat - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "760aff680757af04e506e674cc3a38d893892cdbf48c19ad420f3eb23ff59b54" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 73, + "startColumn": 7, + "charOffset": 2316, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 71, + "startColumn": 7, + "charOffset": 2172, + "charLength": 18, + "snippet": { + "text": "\nReturnValue EventCallback::creatureOnAreaCombat(std::shared_ptr creature, std::shared_ptr tile, bool aggressive) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::creatureOnAreaCombat - \"\n\t\t \"Creature {} on tile position {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ebbd379c6657214e6e200d382e7bd20084177986841d6177c329c7e0395dd4ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 81, + "startColumn": 41, + "charOffset": 2710, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 79, + "startColumn": 41, + "charOffset": 2666, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ace3e584abb52c656d7425f54eba7dea0f45b127efa3bf639ef6acd7c1d14d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 85, + "startColumn": 24, + "charOffset": 2895, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 24, + "charOffset": 2818, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tif (creature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3890cdeb351d7cfa8205e3ebf6338773c3a6f05a4e33368b706809ee43065fb4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'returnValue' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 99, + "startColumn": 14, + "charOffset": 3258, + "charLength": 11, + "snippet": { + "text": "returnValue" + } + }, + "contextRegion": { + "startLine": 97, + "startColumn": 14, + "charOffset": 3195, + "charLength": 11, + "snippet": { + "text": "\tLuaScriptInterface::pushBoolean(L, aggressive);\n\n\tReturnValue returnValue;\n\tif (getScriptInterface()->protectedCall(L, 3, 1) != 0) {\n\t\treturnValue = RETURNVALUE_NOTPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0488e358a503f60912ceeb0bf29cee43eb7335d63c39d6139c580ad7fe838aab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 100, + "startColumn": 6, + "charOffset": 3276, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 98, + "startColumn": 6, + "charOffset": 3244, + "charLength": 18, + "snippet": { + "text": "\n\tReturnValue returnValue;\n\tif (getScriptInterface()->protectedCall(L, 3, 1) != 0) {\n\t\treturnValue = RETURNVALUE_NOTPOSSIBLE;\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5658176363ece56b9c23006175fc4f3a850fbe3a5d08f3e1e3b0a012f39c83a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 108, + "startColumn": 2, + "charOffset": 3547, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 2, + "charOffset": 3542, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tgetScriptInterface()->resetScriptEnv();\n\treturn returnValue;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a34cf5b325ee51658c416be42b09d966e00158746bddde04113b3ead044099b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 112, + "startColumn": 77, + "charOffset": 3687, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 110, + "startColumn": 77, + "charOffset": 3608, + "charLength": 8, + "snippet": { + "text": "}\n\nReturnValue EventCallback::creatureOnTargetCombat(std::shared_ptr creature, std::shared_ptr target) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::creatureOnTargetCombat - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c8e730df5129999701708edb2bcffcefa546b65dc83edc8f1e3fbf1ddd3c030" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 112, + "startColumn": 113, + "charOffset": 3723, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 110, + "startColumn": 113, + "charOffset": 3608, + "charLength": 6, + "snippet": { + "text": "}\n\nReturnValue EventCallback::creatureOnTargetCombat(std::shared_ptr creature, std::shared_ptr target) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::creatureOnTargetCombat - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e00ceefd00776bb9da0c06ebaaf8ee57b94acde0bd368fbc8e8ebc77a8ce6401" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 113, + "startColumn": 7, + "charOffset": 3745, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 111, + "startColumn": 7, + "charOffset": 3610, + "charLength": 18, + "snippet": { + "text": "\nReturnValue EventCallback::creatureOnTargetCombat(std::shared_ptr creature, std::shared_ptr target) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::creatureOnTargetCombat - \"\n\t\t \"Creature {} target {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85c18d5b869861ec8e2d6f56cb4a6d571cd652fa486bd123b93ebd362821a14d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 121, + "startColumn": 41, + "charOffset": 4118, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 119, + "startColumn": 41, + "charOffset": 4074, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3529fcb5e996f094c2d1506621c3ac1b5098197f10faa16f9c83d633e2b9e110" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 125, + "startColumn": 24, + "charOffset": 4303, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 123, + "startColumn": 24, + "charOffset": 4226, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tif (creature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3bf3a7169a603dd0895de4cd8dc0e103e16baf88d6b626e310ecfd79e6c11191" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'returnValue' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 137, + "startColumn": 14, + "charOffset": 4630, + "charLength": 11, + "snippet": { + "text": "returnValue" + } + }, + "contextRegion": { + "startLine": 135, + "startColumn": 14, + "charOffset": 4558, + "charLength": 11, + "snippet": { + "text": "\tLuaScriptInterface::setCreatureMetatable(L, -1, target);\n\n\tReturnValue returnValue;\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\n\t\treturnValue = RETURNVALUE_NOTPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7f1a05fbca73c64206d999e013f1f4b77945aed961c54a67aae8213c013e783" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 138, + "startColumn": 6, + "charOffset": 4648, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 136, + "startColumn": 6, + "charOffset": 4616, + "charLength": 18, + "snippet": { + "text": "\n\tReturnValue returnValue;\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\n\t\treturnValue = RETURNVALUE_NOTPOSSIBLE;\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac1ae900aaa39d10588a08a95b379fa48248cd6fa3c368eaaac6a2ea8d193b2b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 146, + "startColumn": 2, + "charOffset": 4919, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 144, + "startColumn": 2, + "charOffset": 4914, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tgetScriptInterface()->resetScriptEnv();\n\treturn returnValue;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "477a80e4b21a0aa3c81f03e7975c26d8c9ea19dce8f3aa81fdfc4dfbbb5c90b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 150, + "startColumn": 62, + "charOffset": 5044, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 148, + "startColumn": 62, + "charOffset": 4980, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid EventCallback::creatureOnHear(std::shared_ptr creature, std::shared_ptr speaker, const std::string &words, SpeakClasses type) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::creatureOnHear - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1a4b5c6130620c592ac3c79c499f20d4083fce6ba32206418aeb90a471c76b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'speaker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 150, + "startColumn": 98, + "charOffset": 5080, + "charLength": 7, + "snippet": { + "text": "speaker" + } + }, + "contextRegion": { + "startLine": 148, + "startColumn": 98, + "charOffset": 4980, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid EventCallback::creatureOnHear(std::shared_ptr creature, std::shared_ptr speaker, const std::string &words, SpeakClasses type) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::creatureOnHear - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76849f4e8a74f70415859dc3576753e95739f07f352700c59dcc567c0b83d5e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 151, + "startColumn": 7, + "charOffset": 5148, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 149, + "startColumn": 7, + "charOffset": 4982, + "charLength": 18, + "snippet": { + "text": "\nvoid EventCallback::creatureOnHear(std::shared_ptr creature, std::shared_ptr speaker, const std::string &words, SpeakClasses type) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::creatureOnHear - \"\n\t\t \"Creature {} speaker {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f4be1268b0bf7fb8d34a61d9ac49c232e1e3891513a65115703d7e52de0dd80f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 159, + "startColumn": 41, + "charOffset": 5491, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 157, + "startColumn": 41, + "charOffset": 5447, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98165aade8b1e15cbb3fb2d8714cff24c15b7a280ed7c034cbd917ba10c62bbd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 163, + "startColumn": 24, + "charOffset": 5676, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 161, + "startColumn": 24, + "charOffset": 5599, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a34fcbf7ddf642162768c0a113a680c8881ddc14a84e173dc0a608745f6d7014" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 172, + "startColumn": 20, + "charOffset": 6004, + "charLength": 4, + "snippet": { + "text": "type" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 20, + "charOffset": 5941, + "charLength": 4, + "snippet": { + "text": "\n\tLuaScriptInterface::pushString(L, words);\n\tlua_pushnumber(L, type);\n\n\tgetScriptInterface()->callVoidFunction(4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe8c4243c024e64c2fdb77904f7fb4bbf6033d4287796fbcc8ae1084f8771eb5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 177, + "startColumn": 69, + "charOffset": 6127, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 175, + "startColumn": 69, + "charOffset": 6056, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid EventCallback::creatureOnDrainHealth(std::shared_ptr creature, std::shared_ptr attacker, CombatType_t &typePrimary, int32_t &damagePrimary, CombatType_t &typeSecondary, int32_t &damageSecondary, TextColor_t &colorPrimary, TextColor_t &colorSecondary) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::creatureOnDrainHealth - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90ada208146babe92c3bf52a0dbdf01ebe9de0283cb32a505fea422f1f9c48ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 177, + "startColumn": 105, + "charOffset": 6163, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 175, + "startColumn": 105, + "charOffset": 6056, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid EventCallback::creatureOnDrainHealth(std::shared_ptr creature, std::shared_ptr attacker, CombatType_t &typePrimary, int32_t &damagePrimary, CombatType_t &typeSecondary, int32_t &damageSecondary, TextColor_t &colorPrimary, TextColor_t &colorSecondary) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::creatureOnDrainHealth - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89087e78833fd6d7ca1cc999d3ea592d33ac8e7ab6685ffecc273316cf6a6d34" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 178, + "startColumn": 7, + "charOffset": 6349, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 176, + "startColumn": 7, + "charOffset": 6058, + "charLength": 18, + "snippet": { + "text": "\nvoid EventCallback::creatureOnDrainHealth(std::shared_ptr creature, std::shared_ptr attacker, CombatType_t &typePrimary, int32_t &damagePrimary, CombatType_t &typeSecondary, int32_t &damageSecondary, TextColor_t &colorPrimary, TextColor_t &colorSecondary) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::creatureOnDrainHealth - \"\n\t\t \"Creature {} attacker {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14e5aa6dca8bf7caf7477c5b6114ca5e1b9bd13cbd22aa0554743f150a470a3a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 186, + "startColumn": 41, + "charOffset": 6701, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 184, + "startColumn": 41, + "charOffset": 6657, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a053781ffc8f0add2b576a986c831160024632d5f594b08b7f6dab742bb25c35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 190, + "startColumn": 24, + "charOffset": 6886, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 188, + "startColumn": 24, + "charOffset": 6809, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tif (creature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c95834eae6c379ce9ecad1da41eaf6a7492315c31329921caaa6dd32edc7c98e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 206, + "startColumn": 20, + "charOffset": 7273, + "charLength": 11, + "snippet": { + "text": "typePrimary" + } + }, + "contextRegion": { + "startLine": 204, + "startColumn": 20, + "charOffset": 7250, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, typePrimary);\n\tlua_pushnumber(L, damagePrimary);\n\tlua_pushnumber(L, typeSecondary);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec81f2137bc66ba23c4f36eee97f985623c293c606bd7b222936c6dd100ad956" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 207, + "startColumn": 20, + "charOffset": 7306, + "charLength": 13, + "snippet": { + "text": "damagePrimary" + } + }, + "contextRegion": { + "startLine": 205, + "startColumn": 20, + "charOffset": 7253, + "charLength": 13, + "snippet": { + "text": "\n\tlua_pushnumber(L, typePrimary);\n\tlua_pushnumber(L, damagePrimary);\n\tlua_pushnumber(L, typeSecondary);\n\tlua_pushnumber(L, damageSecondary);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49b86489a81b0bcc80e43e1f54bd306b37d745a29a144f615f29e3e786e22947" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 208, + "startColumn": 20, + "charOffset": 7341, + "charLength": 13, + "snippet": { + "text": "typeSecondary" + } + }, + "contextRegion": { + "startLine": 206, + "startColumn": 20, + "charOffset": 7254, + "charLength": 13, + "snippet": { + "text": "\tlua_pushnumber(L, typePrimary);\n\tlua_pushnumber(L, damagePrimary);\n\tlua_pushnumber(L, typeSecondary);\n\tlua_pushnumber(L, damageSecondary);\n\tlua_pushnumber(L, colorPrimary);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a7341f032c639aee0b61027eeb254701c3962bb17be29eae692e4e60ab5d859" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 209, + "startColumn": 20, + "charOffset": 7376, + "charLength": 15, + "snippet": { + "text": "damageSecondary" + } + }, + "contextRegion": { + "startLine": 207, + "startColumn": 20, + "charOffset": 7287, + "charLength": 15, + "snippet": { + "text": "\tlua_pushnumber(L, damagePrimary);\n\tlua_pushnumber(L, typeSecondary);\n\tlua_pushnumber(L, damageSecondary);\n\tlua_pushnumber(L, colorPrimary);\n\tlua_pushnumber(L, colorSecondary);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae410f75349d7d098b16e07dcc3e29a339776b50b4b3c1226e0fbe9d7a6d6d87" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 210, + "startColumn": 20, + "charOffset": 7413, + "charLength": 12, + "snippet": { + "text": "colorPrimary" + } + }, + "contextRegion": { + "startLine": 208, + "startColumn": 20, + "charOffset": 7322, + "charLength": 12, + "snippet": { + "text": "\tlua_pushnumber(L, typeSecondary);\n\tlua_pushnumber(L, damageSecondary);\n\tlua_pushnumber(L, colorPrimary);\n\tlua_pushnumber(L, colorSecondary);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "724393a436c32eac97da7d9ec595e6dd2e4b831f089a7a74a1e0c2ab7d457bcd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 211, + "startColumn": 20, + "charOffset": 7447, + "charLength": 14, + "snippet": { + "text": "colorSecondary" + } + }, + "contextRegion": { + "startLine": 209, + "startColumn": 20, + "charOffset": 7357, + "charLength": 14, + "snippet": { + "text": "\tlua_pushnumber(L, damageSecondary);\n\tlua_pushnumber(L, colorPrimary);\n\tlua_pushnumber(L, colorSecondary);\n\n\tif (getScriptInterface()->protectedCall(L, 8, 6) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "131919a949c60dd3bccf686459142f3b739d641cafb7bdff486adbb4db7f53da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 213, + "startColumn": 6, + "charOffset": 7470, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 211, + "startColumn": 6, + "charOffset": 7428, + "charLength": 18, + "snippet": { + "text": "\tlua_pushnumber(L, colorSecondary);\n\n\tif (getScriptInterface()->protectedCall(L, 8, 6) != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "700fdc4c229e4ffeb8df76895798e86737033875d6f405c5eabd0990a710e776" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 213, + "startColumn": 45, + "charOffset": 7509, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 211, + "startColumn": 45, + "charOffset": 7428, + "charLength": 1, + "snippet": { + "text": "\tlua_pushnumber(L, colorSecondary);\n\n\tif (getScriptInterface()->protectedCall(L, 8, 6) != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42a8f9bdafbc8a3e11f9b6cfc566b555681bffa054f15c5a8d7f8238d818664e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 213, + "startColumn": 48, + "charOffset": 7512, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 211, + "startColumn": 48, + "charOffset": 7428, + "charLength": 1, + "snippet": { + "text": "\tlua_pushnumber(L, colorSecondary);\n\n\tif (getScriptInterface()->protectedCall(L, 8, 6) != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31884c38b42f45f08c50dadbcc800e69ba05989de4478c8a782282c294c4209e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 216, + "startColumn": 65, + "charOffset": 7675, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 214, + "startColumn": 65, + "charOffset": 7523, + "charLength": 1, + "snippet": { + "text": "\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {\n\t\ttypePrimary = LuaScriptInterface::getNumber(L, -6);\n\t\tdamagePrimary = LuaScriptInterface::getNumber(L, -5);\n\t\ttypeSecondary = LuaScriptInterface::getNumber(L, -4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d465eb04a84c985422edcb0f3d1a406a592a81825481d05d0f1f9d55fb7f8ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 217, + "startColumn": 62, + "charOffset": 7740, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 215, + "startColumn": 62, + "charOffset": 7601, + "charLength": 1, + "snippet": { + "text": "\t} else {\n\t\ttypePrimary = LuaScriptInterface::getNumber(L, -6);\n\t\tdamagePrimary = LuaScriptInterface::getNumber(L, -5);\n\t\ttypeSecondary = LuaScriptInterface::getNumber(L, -4);\n\t\tdamageSecondary = LuaScriptInterface::getNumber(L, -3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47ecfcb655e4f39de5cfc0509b7963a2ccb5147c78ba41f21c248db1a15912c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 225, + "startColumn": 2, + "charOffset": 8041, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 223, + "startColumn": 2, + "charOffset": 8036, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tgetScriptInterface()->resetScriptEnv();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "811fc1cb3b8fa14a3cd936ec251071e39ee5b6973dd8b7d0b10c4e83cd8ea257" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 229, + "startColumn": 87, + "charOffset": 8179, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 227, + "startColumn": 87, + "charOffset": 8083, + "charLength": 6, + "snippet": { + "text": "\n// Party\nbool EventCallback::partyOnJoin(std::shared_ptr party, std::shared_ptr player) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::partyOnJoin - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd9f67d47e9b4be412b6e09f0e6964a7a301a2304c9595a16c018ca85badb129" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 230, + "startColumn": 7, + "charOffset": 8201, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 228, + "startColumn": 7, + "charOffset": 8084, + "charLength": 18, + "snippet": { + "text": "// Party\nbool EventCallback::partyOnJoin(std::shared_ptr party, std::shared_ptr player) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::partyOnJoin - \"\n\t\t \"Player {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21dbf5923a91fc65b1ecb3e13bc15aca97d60b31163cc008d0f48cdeb19c8020" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 238, + "startColumn": 41, + "charOffset": 8512, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 236, + "startColumn": 41, + "charOffset": 8468, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bdd52b12bc874efb1063c72fa0a7c9c1ba40e840425fa2d7e2cd95fec1f1d18d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 242, + "startColumn": 24, + "charOffset": 8697, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 24, + "charOffset": 8620, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, party);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73c215d392849475847b21c6a73374dae82b03ec4e7f8bf7a3c014f8cd1784f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 244, + "startColumn": 45, + "charOffset": 8771, + "charLength": 5, + "snippet": { + "text": "party" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 45, + "charOffset": 8674, + "charLength": 5, + "snippet": { + "text": "\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, party);\n\tLuaScriptInterface::setMetatable(L, -1, \"Party\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f46542c4b35318662109508b9c91d15594134390059edc7f63ba1bcd876d328" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 253, + "startColumn": 88, + "charOffset": 9075, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 251, + "startColumn": 88, + "charOffset": 8985, + "charLength": 6, + "snippet": { + "text": "}\n\nbool EventCallback::partyOnLeave(std::shared_ptr party, std::shared_ptr player) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::partyOnLeave - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af7cf23031a15ebcd74589969c39bf1c30e785080853a7f3b310c53bb2eaa093" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 254, + "startColumn": 7, + "charOffset": 9097, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 7, + "charOffset": 8987, + "charLength": 18, + "snippet": { + "text": "\nbool EventCallback::partyOnLeave(std::shared_ptr party, std::shared_ptr player) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::partyOnLeave - \"\n\t\t \"Player {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b54679a386dc20d40bb30610ffab05daac3440ab0bd3aad2f1b8767169fcfbb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 262, + "startColumn": 41, + "charOffset": 9409, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 260, + "startColumn": 41, + "charOffset": 9365, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eed05cc0cadddc26df0479dbc5a7026dbcf17480a7034460e53466843d375688" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 266, + "startColumn": 24, + "charOffset": 9594, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 264, + "startColumn": 24, + "charOffset": 9517, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, party);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "530cf1a284519aaa3b8365ed1b162ffc8b1895154ede7e97197a29371f970972" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 268, + "startColumn": 45, + "charOffset": 9668, + "charLength": 5, + "snippet": { + "text": "party" + } + }, + "contextRegion": { + "startLine": 266, + "startColumn": 45, + "charOffset": 9571, + "charLength": 5, + "snippet": { + "text": "\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, party);\n\tLuaScriptInterface::setMetatable(L, -1, \"Party\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1c1938116c672edb63bd635719abe306a95acac493c637380c61c39678d046b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 277, + "startColumn": 59, + "charOffset": 9943, + "charLength": 5, + "snippet": { + "text": "party" + } + }, + "contextRegion": { + "startLine": 275, + "startColumn": 59, + "charOffset": 9882, + "charLength": 5, + "snippet": { + "text": "}\n\nbool EventCallback::partyOnDisband(std::shared_ptr party) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::partyOnDisband - Party leader {}] Call stack \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "652e8e1ab77362b8065294ea91caeaa5cd024e43dd27cc355f622fb0f9727c8b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 278, + "startColumn": 7, + "charOffset": 9964, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 276, + "startColumn": 7, + "charOffset": 9884, + "charLength": 18, + "snippet": { + "text": "\nbool EventCallback::partyOnDisband(std::shared_ptr party) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::partyOnDisband - Party leader {}] Call stack \"\n\t\t \"overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a94b7dce91602d25aae50430347d3b3bf283a32339b5dafb735a8bc4ca34e68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 285, + "startColumn": 41, + "charOffset": 10307, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 283, + "startColumn": 41, + "charOffset": 10263, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a134492a91501d9744e61c26167de1e6f946e7815bd1ae83f43a263d66003728" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 289, + "startColumn": 24, + "charOffset": 10492, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 287, + "startColumn": 24, + "charOffset": 10415, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, party);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "741578dc78e8e0f04a8d188b9abe5a08abad5ced6e3fd591e56195e8fa6c77d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 297, + "startColumn": 67, + "charOffset": 10742, + "charLength": 5, + "snippet": { + "text": "party" + } + }, + "contextRegion": { + "startLine": 295, + "startColumn": 67, + "charOffset": 10673, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid EventCallback::partyOnShareExperience(std::shared_ptr party, uint64_t &exp) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"Party leader {}. Call stack overflow. Too many lua script calls being nested.\", party->getLeader() ? party->getLeader()->getName() : \"unknown\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20863bdfd1713b4315b4435a004548c498ddcaf6ed33664afd459e5f1cc49474" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 298, + "startColumn": 7, + "charOffset": 10778, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 296, + "startColumn": 7, + "charOffset": 10675, + "charLength": 18, + "snippet": { + "text": "\nvoid EventCallback::partyOnShareExperience(std::shared_ptr party, uint64_t &exp) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"Party leader {}. Call stack overflow. Too many lua script calls being nested.\", party->getLeader() ? party->getLeader()->getName() : \"unknown\");\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd1ed9cabd0e935e22bf9c9de8e95998e78f9f862f7b9175e6ba7681b51eaa9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 303, + "startColumn": 41, + "charOffset": 11041, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 301, + "startColumn": 41, + "charOffset": 10997, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4cf53cb8d4428700e711fab6dacdc0763241667a6b96ca6aea4952b34611bb86" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 307, + "startColumn": 24, + "charOffset": 11226, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 305, + "startColumn": 24, + "charOffset": 11149, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, party);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46dd0c71391393befb81d415a348599a271793d2b6dafc0b3182a13378530031" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 312, + "startColumn": 20, + "charOffset": 11379, + "charLength": 3, + "snippet": { + "text": "exp" + } + }, + "contextRegion": { + "startLine": 310, + "startColumn": 20, + "charOffset": 11308, + "charLength": 3, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Party\");\n\n\tlua_pushnumber(L, exp);\n\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf355745065db9b6abaee719285c2a71a0c6fbe22de37c109db5424a8e0f3c75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 312, + "startColumn": 20, + "charOffset": 11379, + "charLength": 3, + "snippet": { + "text": "exp" + } + }, + "contextRegion": { + "startLine": 310, + "startColumn": 20, + "charOffset": 11308, + "charLength": 3, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Party\");\n\n\tlua_pushnumber(L, exp);\n\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb30e7a6c2e7c8c3d9f8157d083b98084d4a04697e57fa23f004c84581412dde" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 314, + "startColumn": 6, + "charOffset": 11391, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 312, + "startColumn": 6, + "charOffset": 11360, + "charLength": 18, + "snippet": { + "text": "\tlua_pushnumber(L, exp);\n\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab824dfc87085a65469fec270cc801966b6615ea4bc20e5452062f1f0ec3b682" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 321, + "startColumn": 2, + "charOffset": 11610, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 319, + "startColumn": 2, + "charOffset": 11605, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tgetScriptInterface()->resetScriptEnv();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "291cbc516d33ddc405f37c00bb9ed5aee2258d1ff3039ccb677ea0ec57ad2e63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 325, + "startColumn": 65, + "charOffset": 11727, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 323, + "startColumn": 65, + "charOffset": 11652, + "charLength": 6, + "snippet": { + "text": "\n// Player\nbool EventCallback::playerOnBrowseField(std::shared_ptr player, const Position &position) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnBrowseField - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4536a93e3fd4dd082e9bddf0f338e06deeb645c05ef424af13994c4ecbed89d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 326, + "startColumn": 7, + "charOffset": 11775, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 324, + "startColumn": 7, + "charOffset": 11653, + "charLength": 18, + "snippet": { + "text": "// Player\nbool EventCallback::playerOnBrowseField(std::shared_ptr player, const Position &position) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnBrowseField - \"\n\t\t \"Player {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6396232c7c614ebe97f7af6bf978589d6defe372086d35bbbe04108af9da2264" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 334, + "startColumn": 41, + "charOffset": 12094, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 332, + "startColumn": 41, + "charOffset": 12050, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43bc2292c2562b328021dc766155e36f123e5aded90e61b1c319ebadef49c86e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 338, + "startColumn": 24, + "charOffset": 12279, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 336, + "startColumn": 24, + "charOffset": 12202, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0616fb66ba64f775287bd49819f356c87f3858c7c903899ed94dcfe74d5bafb2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 348, + "startColumn": 58, + "charOffset": 12572, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 346, + "startColumn": 58, + "charOffset": 12512, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnLook(std::shared_ptr player, const Position &position, std::shared_ptr thing, uint8_t stackpos, int32_t lookDistance) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnLook - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "48d14341c88583b40537b238edc71cc9583d52d82a30a3993e884e26d1696d5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 348, + "startColumn": 115, + "charOffset": 12629, + "charLength": 5, + "snippet": { + "text": "thing" + } + }, + "contextRegion": { + "startLine": 346, + "startColumn": 115, + "charOffset": 12512, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnLook(std::shared_ptr player, const Position &position, std::shared_ptr thing, uint8_t stackpos, int32_t lookDistance) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnLook - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "528adb67593efaf971d5f494507a715451ffd6acc0ed56cf83020a64c8340c03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerOnLook' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 348, + "startColumn": 122, + "charOffset": 12636, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 346, + "startColumn": 122, + "charOffset": 12512, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnLook(std::shared_ptr player, const Position &position, std::shared_ptr thing, uint8_t stackpos, int32_t lookDistance) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnLook - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a7efd0263847a198f1f27426631bda60f11e519e4d45708c35884a438fca929" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 349, + "startColumn": 7, + "charOffset": 12690, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 347, + "startColumn": 7, + "charOffset": 12514, + "charLength": 18, + "snippet": { + "text": "\nvoid EventCallback::playerOnLook(std::shared_ptr player, const Position &position, std::shared_ptr thing, uint8_t stackpos, int32_t lookDistance) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnLook - \"\n\t\t \"Player {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a108db4bfbe40394bbf7a0545568dd4bfcf8f6f870d65aeb669fba9ae01df919" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 357, + "startColumn": 41, + "charOffset": 12996, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 355, + "startColumn": 41, + "charOffset": 12952, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ace1301159977445eb843b45a45fa58a01faf70534b9c5aff2c1a1d5231aae34" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 361, + "startColumn": 24, + "charOffset": 13181, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 359, + "startColumn": 24, + "charOffset": 13104, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6d2e47a4b5d8de39eb64245d5cf02477b0da1ed07349fb009aaae002cd8226b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 377, + "startColumn": 20, + "charOffset": 13778, + "charLength": 12, + "snippet": { + "text": "lookDistance" + } + }, + "contextRegion": { + "startLine": 375, + "startColumn": 20, + "charOffset": 13700, + "charLength": 12, + "snippet": { + "text": "\n\tLuaScriptInterface::pushPosition(L, position, stackpos);\n\tlua_pushnumber(L, lookDistance);\n\n\tgetScriptInterface()->callVoidFunction(4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f93d0b5675ad1cba5bd63f8db7096d6638f85ba50b0edb60736930fd84cb78fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 382, + "startColumn": 70, + "charOffset": 13910, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 380, + "startColumn": 70, + "charOffset": 13838, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnLookInBattleList(std::shared_ptr player, std::shared_ptr creature, int32_t lookDistance) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnLookInBattleList - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b21196ba50bf56e8889166d2c8dd3bdeccbf5e0ef3da9c03845fb81d54caf55a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 382, + "startColumn": 104, + "charOffset": 13944, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 380, + "startColumn": 104, + "charOffset": 13838, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnLookInBattleList(std::shared_ptr player, std::shared_ptr creature, int32_t lookDistance) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnLookInBattleList - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15791340ca545a71acb6650cd688e9c4bac8837f4ab1b80d550ae2d0eb6783d4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 383, + "startColumn": 7, + "charOffset": 13990, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 381, + "startColumn": 7, + "charOffset": 13840, + "charLength": 18, + "snippet": { + "text": "\nvoid EventCallback::playerOnLookInBattleList(std::shared_ptr player, std::shared_ptr creature, int32_t lookDistance) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnLookInBattleList - \"\n\t\t \"Player {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e6b63a228df324b0295cb302a12ab9152429e4ed372fe622d90d801a78cc812" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 391, + "startColumn": 41, + "charOffset": 14308, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 389, + "startColumn": 41, + "charOffset": 14264, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ada258d353b428fe33d2ec542949fe2be08e56e2a078d532a67e339a2083c8a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 395, + "startColumn": 24, + "charOffset": 14493, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 393, + "startColumn": 24, + "charOffset": 14416, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "37b360c2e7dbc74f445a7c8e95577c96b17e2cde960b96af6458236ef3aae390" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 403, + "startColumn": 20, + "charOffset": 14768, + "charLength": 12, + "snippet": { + "text": "lookDistance" + } + }, + "contextRegion": { + "startLine": 401, + "startColumn": 20, + "charOffset": 14688, + "charLength": 12, + "snippet": { + "text": "\tLuaScriptInterface::setCreatureMetatable(L, -1, creature);\n\n\tlua_pushnumber(L, lookDistance);\n\n\tgetScriptInterface()->callVoidFunction(3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a357b650fade59bee0e21db124b1aadd060416062551b17a1f21f7f4fe5cf34" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerOnLookInTrade' of similar type ('std::shared_ptr') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 408, + "startColumn": 41, + "charOffset": 14871, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 406, + "startColumn": 41, + "charOffset": 14828, + "charLength": 3, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnLookInTrade(std::shared_ptr player, std::shared_ptr partner, std::shared_ptr item, int32_t lookDistance) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnLookInTrade - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c8645982655674f81afc9ef30d99ae74c8c8a6dc6ae32f9ed422e21958f2b7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 408, + "startColumn": 65, + "charOffset": 14895, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 406, + "startColumn": 65, + "charOffset": 14828, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnLookInTrade(std::shared_ptr player, std::shared_ptr partner, std::shared_ptr item, int32_t lookDistance) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnLookInTrade - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42c647935d878723ccdd98fd10a5ee36989b87fff9fe43aa79b4151874b7181e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 408, + "startColumn": 128, + "charOffset": 14958, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 406, + "startColumn": 128, + "charOffset": 14828, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnLookInTrade(std::shared_ptr player, std::shared_ptr partner, std::shared_ptr item, int32_t lookDistance) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnLookInTrade - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dcde8483a037c80cfd12cf08e4189b58f0679939c719337758393d05711cb6c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 409, + "startColumn": 7, + "charOffset": 15000, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 407, + "startColumn": 7, + "charOffset": 14830, + "charLength": 18, + "snippet": { + "text": "\nvoid EventCallback::playerOnLookInTrade(std::shared_ptr player, std::shared_ptr partner, std::shared_ptr item, int32_t lookDistance) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnLookInTrade - \"\n\t\t \"Player {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f3fc903f9c788d8fb0bef28b442343db4b16564d05d461536719148154cb751" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 417, + "startColumn": 41, + "charOffset": 15313, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 415, + "startColumn": 41, + "charOffset": 15269, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6d8f2655e2a954af1fc09b1e99e03615515908e119a224655b1baf4be181569" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 421, + "startColumn": 24, + "charOffset": 15498, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 419, + "startColumn": 24, + "charOffset": 15421, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f336b3c19087ebca01ce05806d93528e668273e065c808cef43cc6c52f2a74c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'partner' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 426, + "startColumn": 46, + "charOffset": 15680, + "charLength": 7, + "snippet": { + "text": "partner" + } + }, + "contextRegion": { + "startLine": 424, + "startColumn": 46, + "charOffset": 15582, + "charLength": 7, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n\n\tLuaScriptInterface::pushUserdata(L, partner);\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ef72cfedc9642963bc0871c4c805d7a40819691ce318d7b90723cf36213653b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 432, + "startColumn": 20, + "charOffset": 15865, + "charLength": 12, + "snippet": { + "text": "lookDistance" + } + }, + "contextRegion": { + "startLine": 430, + "startColumn": 20, + "charOffset": 15793, + "charLength": 12, + "snippet": { + "text": "\tLuaScriptInterface::setItemMetatable(L, -1, item);\n\n\tlua_pushnumber(L, lookDistance);\n\n\tgetScriptInterface()->callVoidFunction(4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42b7a8212baebb0fc5607bc5effa5efbf6f14638dfeb5b10945ea9c22e6fae0f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 437, + "startColumn": 64, + "charOffset": 15991, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 435, + "startColumn": 64, + "charOffset": 15925, + "charLength": 6, + "snippet": { + "text": "}\n\nbool EventCallback::playerOnLookInShop(std::shared_ptr player, const ItemType* itemType, uint8_t count) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnLookInShop - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab844402dcb472215a7e26319c0f5ee30c1d7daa4b81ee7cea8c42c38c1a7dff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 438, + "startColumn": 7, + "charOffset": 16054, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 436, + "startColumn": 7, + "charOffset": 15927, + "charLength": 18, + "snippet": { + "text": "\nbool EventCallback::playerOnLookInShop(std::shared_ptr player, const ItemType* itemType, uint8_t count) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnLookInShop - \"\n\t\t \"Player {} itemType {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f7b16ef1887f040b1f2959cadd5961d64f032c78050b985ae7e8c7765edd031" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 446, + "startColumn": 41, + "charOffset": 16411, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 444, + "startColumn": 41, + "charOffset": 16367, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60359c239a144fb4891dde3bf0f65ff6e4d1b994c0d990e1b253d48a581d97b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 450, + "startColumn": 24, + "charOffset": 16596, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 448, + "startColumn": 24, + "charOffset": 16519, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e37a59bf7b0dcc3e24e449d97c9a6fd4107954acf4580e42d5491d0617d7924" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 458, + "startColumn": 20, + "charOffset": 16871, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 456, + "startColumn": 20, + "charOffset": 16797, + "charLength": 5, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"ItemType\");\n\n\tlua_pushnumber(L, count);\n\n\treturn getScriptInterface()->callFunction(3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "730957819be83c3fe52788d1fa388c3623956e09f5ce3f9d7d1a3cf9c6d6f63b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 463, + "startColumn": 65, + "charOffset": 16994, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 461, + "startColumn": 65, + "charOffset": 16927, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnRemoveCount(std::shared_ptr player, std::shared_ptr item) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnMove - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b805cebf8c8c15e1210e690642b3bfb85953e9141574da1ac5d81ea8712eafb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 463, + "startColumn": 95, + "charOffset": 17024, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 461, + "startColumn": 95, + "charOffset": 16927, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnRemoveCount(std::shared_ptr player, std::shared_ptr item) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnMove - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6cbf7584f4a5e77f9d02c8f6347e368b27e7a519f4cf75583b2d076f0d3533fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 464, + "startColumn": 7, + "charOffset": 17044, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 462, + "startColumn": 7, + "charOffset": 16929, + "charLength": 18, + "snippet": { + "text": "\nvoid EventCallback::playerOnRemoveCount(std::shared_ptr player, std::shared_ptr item) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnMove - \"\n\t\t \"Player {} item {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7772269535f292121af01947fa4f19121f6f5e709ff16a652bc4f5279b143b4b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 472, + "startColumn": 41, + "charOffset": 17375, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 470, + "startColumn": 41, + "charOffset": 17331, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "004894240f5f2f95b5f7b27fc5e69611f809624d77fa644ed4a77ee9c849a152" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 476, + "startColumn": 24, + "charOffset": 17560, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 474, + "startColumn": 24, + "charOffset": 17483, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0a6af38574ce612485bd14179609a9afa3c9af9784d4f9b6206cd03204150cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 484, + "startColumn": 24, + "charOffset": 17823, + "charLength": 12, + "snippet": { + "text": "callFunction" + } + }, + "contextRegion": { + "startLine": 482, + "startColumn": 24, + "charOffset": 17747, + "charLength": 12, + "snippet": { + "text": "\tLuaScriptInterface::setItemMetatable(L, -1, item);\n\n\tgetScriptInterface()->callFunction(2);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82132b7742e1dd3bfd05f828b18cd35bd14dc1a09cf4a2bf212be3baa20aabd6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 487, + "startColumn": 62, + "charOffset": 17904, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 485, + "startColumn": 62, + "charOffset": 17840, + "charLength": 6, + "snippet": { + "text": "}\n\nbool EventCallback::playerOnMoveItem(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPos, const Position &toPos, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) const {\n\tif (!getScriptInterface()) {\n\t\tg_logger().error(\"script interface nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b8fc80fb6225f50ed4e00c20b59513dc0edc3dcf491ce20d69cd1f26e2224a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 487, + "startColumn": 92, + "charOffset": 17934, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 485, + "startColumn": 92, + "charOffset": 17840, + "charLength": 4, + "snippet": { + "text": "}\n\nbool EventCallback::playerOnMoveItem(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPos, const Position &toPos, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) const {\n\tif (!getScriptInterface()) {\n\t\tg_logger().error(\"script interface nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5b8940766d4a7332a959810ad59a86f36aef2532ae9c8a33f321f01b6ee8efd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerOnMoveItem' of similar type ('std::shared_ptr') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 487, + "startColumn": 162, + "charOffset": 18004, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 485, + "startColumn": 162, + "charOffset": 17840, + "charLength": 3, + "snippet": { + "text": "}\n\nbool EventCallback::playerOnMoveItem(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPos, const Position &toPos, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) const {\n\tif (!getScriptInterface()) {\n\t\tg_logger().error(\"script interface nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5f8433d788632bce2cfef45d0ac113ce6ce9cd497a596aa0f68fda646da139e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 488, + "startColumn": 6, + "charOffset": 18095, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 486, + "startColumn": 6, + "charOffset": 17842, + "charLength": 1, + "snippet": { + "text": "\nbool EventCallback::playerOnMoveItem(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPos, const Position &toPos, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) const {\n\tif (!getScriptInterface()) {\n\t\tg_logger().error(\"script interface nullptr\");\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f22d7c229d191df33c15d9ed12ad78df521c647f70a114d467714b153a3a31bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'LuaScriptInterface *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 488, + "startColumn": 7, + "charOffset": 18096, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 486, + "startColumn": 7, + "charOffset": 17842, + "charLength": 18, + "snippet": { + "text": "\nbool EventCallback::playerOnMoveItem(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPos, const Position &toPos, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) const {\n\tif (!getScriptInterface()) {\n\t\tg_logger().error(\"script interface nullptr\");\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9e8249b621a55fb271d49ae617f5b95cab3cb3683161a3ed029f0f4156a80ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 493, + "startColumn": 7, + "charOffset": 18194, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 491, + "startColumn": 7, + "charOffset": 18184, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[Action::executeUse - Player {}, on item {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7ff130b4b70dcc9bb9033b1047f473e1196a1d0af168074e957da6fe3011479" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 500, + "startColumn": 41, + "charOffset": 18504, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 498, + "startColumn": 41, + "charOffset": 18460, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "621bb48e58fbf77be5961ed2f5d665fd7bf9ca36c4edad78bfc05d2a8a81d9f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 505, + "startColumn": 24, + "charOffset": 18690, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 503, + "startColumn": 24, + "charOffset": 18613, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = getScriptInterface()->getLuaState();\n\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c25d28b8fdd6cb807f49a21880262f9381a44e0e5887624be0b62ebe06eb056e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 512, + "startColumn": 20, + "charOffset": 18888, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 510, + "startColumn": 20, + "charOffset": 18827, + "charLength": 5, + "snippet": { + "text": "\tLuaScriptInterface::pushThing(L, item);\n\n\tlua_pushnumber(L, count);\n\tLuaScriptInterface::pushPosition(L, fromPos);\n\tLuaScriptInterface::pushPosition(L, toPos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78e914392b2e4aa6daace48775e6aaca30e75927b261937aa1db2a65fb7e6064" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 516, + "startColumn": 38, + "charOffset": 19026, + "charLength": 12, + "snippet": { + "text": "fromCylinder" + } + }, + "contextRegion": { + "startLine": 514, + "startColumn": 38, + "charOffset": 18943, + "charLength": 12, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, toPos);\n\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33ae152ee307bb6a4c59f0e23607ab15ce7a3852a9e2b40fb9de74ad93287aaa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 517, + "startColumn": 38, + "charOffset": 19078, + "charLength": 10, + "snippet": { + "text": "toCylinder" + } + }, + "contextRegion": { + "startLine": 515, + "startColumn": 38, + "charOffset": 18988, + "charLength": 10, + "snippet": { + "text": "\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\n\n\treturn getScriptInterface()->callFunction(7);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28f317d7558abdc3e503a2ebd694c4cd65dc5158dea91b5b2f88bbc88fa08d88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 519, + "startColumn": 44, + "charOffset": 19135, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 517, + "startColumn": 44, + "charOffset": 19041, + "charLength": 1, + "snippet": { + "text": "\tLuaScriptInterface::pushCylinder(L, toCylinder);\n\n\treturn getScriptInterface()->callFunction(7);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6367c03cbade80b27c67ab92a047b98022fd753867285db57d2dd9fd3ed9b09f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 522, + "startColumn": 63, + "charOffset": 19204, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 520, + "startColumn": 63, + "charOffset": 19139, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnItemMoved(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnItemMoved - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b60844021b4b4aa87bff8317c0b34b7868faa5acc9e8d44cd5d7bc91e45234d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 522, + "startColumn": 93, + "charOffset": 19234, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 520, + "startColumn": 93, + "charOffset": 19139, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnItemMoved(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnItemMoved - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8bedb62ebe0df407a064d42c236b91f08cd147f7d9a34b44351d73dde9ba2899" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerOnItemMoved' of similar type ('std::shared_ptr') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 522, + "startColumn": 173, + "charOffset": 19314, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 520, + "startColumn": 173, + "charOffset": 19139, + "charLength": 3, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnItemMoved(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnItemMoved - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58c8f06ba3e67d1e8fa79114cd7c37d294f6c47087d703eaad7b70414e7213b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 523, + "startColumn": 7, + "charOffset": 19406, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 521, + "startColumn": 7, + "charOffset": 19141, + "charLength": 18, + "snippet": { + "text": "\nvoid EventCallback::playerOnItemMoved(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnItemMoved - \"\n\t\t \"Player {} item {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fecf9c709d10120bfe5e94578965ac72de5f6753f90c40e2babb24d8354c5f98" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 531, + "startColumn": 41, + "charOffset": 19742, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 529, + "startColumn": 41, + "charOffset": 19698, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "157aa4d1d04d3b7347cbe8db311dac847c7dfb3963f5a49fcd0e1b400a10d56a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 535, + "startColumn": 24, + "charOffset": 19927, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 533, + "startColumn": 24, + "charOffset": 19850, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f011d7d0f3774dab5ee4fbe7a7189a6d703e8d1ab137b75da5cbae3d22bef967" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 543, + "startColumn": 20, + "charOffset": 20186, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 541, + "startColumn": 20, + "charOffset": 20114, + "charLength": 5, + "snippet": { + "text": "\tLuaScriptInterface::setItemMetatable(L, -1, item);\n\n\tlua_pushnumber(L, count);\n\tLuaScriptInterface::pushPosition(L, fromPosition);\n\tLuaScriptInterface::pushPosition(L, toPosition);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38775edc8f6e8a81dabffb7655019bad26368365e1e87101854caed701eed334" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 547, + "startColumn": 38, + "charOffset": 20334, + "charLength": 12, + "snippet": { + "text": "fromCylinder" + } + }, + "contextRegion": { + "startLine": 545, + "startColumn": 38, + "charOffset": 20246, + "charLength": 12, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, toPosition);\n\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c726344654a7823713cf23eb2b2cf30a0bc80dec7b239ef109622cea98e51c96" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 548, + "startColumn": 38, + "charOffset": 20386, + "charLength": 10, + "snippet": { + "text": "toCylinder" + } + }, + "contextRegion": { + "startLine": 546, + "startColumn": 38, + "charOffset": 20296, + "charLength": 10, + "snippet": { + "text": "\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\n\n\tgetScriptInterface()->callVoidFunction(7);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9f28843a1a65dd257249fa97ffeebb01744420d0eae7d198fe45b4a4d23c26a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 550, + "startColumn": 41, + "charOffset": 20440, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 548, + "startColumn": 41, + "charOffset": 20349, + "charLength": 1, + "snippet": { + "text": "\tLuaScriptInterface::pushCylinder(L, toCylinder);\n\n\tgetScriptInterface()->callVoidFunction(7);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "676f60b2087bbeed90af1b2997793479880b595f1dbdba2ddb8ca94977a77d50" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 553, + "startColumn": 64, + "charOffset": 20510, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 551, + "startColumn": 64, + "charOffset": 20444, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnChangeZone(std::shared_ptr player, ZoneType_t zone) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnChangeZone - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e44d7ebecb7324e3c6071cc6d369cadc3034996315fbd131befe60b3243fa3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 554, + "startColumn": 7, + "charOffset": 20549, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 552, + "startColumn": 7, + "charOffset": 20446, + "charLength": 18, + "snippet": { + "text": "\nvoid EventCallback::playerOnChangeZone(std::shared_ptr player, ZoneType_t zone) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnChangeZone - \"\n\t\t \"Player {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fe44c82b71772a4bc59767cfcfd18cc63263d1b7b2eaae6bd7dafe0989ff393" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 562, + "startColumn": 41, + "charOffset": 20861, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 560, + "startColumn": 41, + "charOffset": 20817, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a5ff49466608852dff1c29cf42ca7e9ce6fe81b39ed8a3cc5cf9921160e62fb6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 566, + "startColumn": 24, + "charOffset": 21046, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 564, + "startColumn": 24, + "charOffset": 20969, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e70ea10d4abc627cca13388cddbe69014df78d94e41df1a356fd9cd2a9145c3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 571, + "startColumn": 20, + "charOffset": 21202, + "charLength": 4, + "snippet": { + "text": "zone" + } + }, + "contextRegion": { + "startLine": 569, + "startColumn": 20, + "charOffset": 21130, + "charLength": 4, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n\n\tlua_pushnumber(L, zone);\n\tgetScriptInterface()->callVoidFunction(2);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f93d0b5675ad1cba5bd63f8db7096d6638f85ba50b0edb60736930fd84cb78fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 575, + "startColumn": 66, + "charOffset": 21321, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 573, + "startColumn": 66, + "charOffset": 21253, + "charLength": 6, + "snippet": { + "text": "}\n\nbool EventCallback::playerOnMoveCreature(std::shared_ptr player, std::shared_ptr creature, const Position &fromPosition, const Position &toPosition) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnMoveCreature - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa84c7a4a6c6f2a6d909735f373f6f3ea3b98a41a01854a8b0dd2d345f4ac7d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 575, + "startColumn": 100, + "charOffset": 21355, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 573, + "startColumn": 100, + "charOffset": 21253, + "charLength": 8, + "snippet": { + "text": "}\n\nbool EventCallback::playerOnMoveCreature(std::shared_ptr player, std::shared_ptr creature, const Position &fromPosition, const Position &toPosition) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnMoveCreature - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d7880ea2577a68bc376a43eccb295d078b6f1af4f53f7cc5b4d1b8f9388ae4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 576, + "startColumn": 7, + "charOffset": 21437, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 574, + "startColumn": 7, + "charOffset": 21255, + "charLength": 18, + "snippet": { + "text": "\nbool EventCallback::playerOnMoveCreature(std::shared_ptr player, std::shared_ptr creature, const Position &fromPosition, const Position &toPosition) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnMoveCreature - \"\n\t\t \"Player {} creature {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d18953aa062b0d849ed86489444b0ba07c93c71154cfac0c5f9eae6556a45bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 584, + "startColumn": 41, + "charOffset": 21790, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 582, + "startColumn": 41, + "charOffset": 21746, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "157aa4d1d04d3b7347cbe8db311dac847c7dfb3963f5a49fcd0e1b400a10d56a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 588, + "startColumn": 24, + "charOffset": 21975, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 586, + "startColumn": 24, + "charOffset": 21898, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f011d7d0f3774dab5ee4fbe7a7189a6d703e8d1ab137b75da5cbae3d22bef967" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 602, + "startColumn": 73, + "charOffset": 22456, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 600, + "startColumn": 73, + "charOffset": 22381, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnReportRuleViolation(std::shared_ptr player, const std::string &targetName, uint8_t reportType, uint8_t reportReason, const std::string &comment, const std::string &translation) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnReportRuleViolation - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73f2839a6dc3236503db93110ad714614e89069c810e0e90bf4b978c2e3e52f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 603, + "startColumn": 7, + "charOffset": 22611, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 601, + "startColumn": 7, + "charOffset": 22383, + "charLength": 18, + "snippet": { + "text": "\nvoid EventCallback::playerOnReportRuleViolation(std::shared_ptr player, const std::string &targetName, uint8_t reportType, uint8_t reportReason, const std::string &comment, const std::string &translation) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnReportRuleViolation - \"\n\t\t \"Player {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56b4f04202f0855e26da93e8265782675189986ae5895085428adf1c4f298903" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 611, + "startColumn": 41, + "charOffset": 22932, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 609, + "startColumn": 41, + "charOffset": 22888, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7772269535f292121af01947fa4f19121f6f5e709ff16a652bc4f5279b143b4b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 615, + "startColumn": 24, + "charOffset": 23117, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 613, + "startColumn": 24, + "charOffset": 23040, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a458c913bb5b2f0add6c4d8d237a55cb92ec737ffb791a11f43d621675781af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 622, + "startColumn": 20, + "charOffset": 23322, + "charLength": 10, + "snippet": { + "text": "reportType" + } + }, + "contextRegion": { + "startLine": 620, + "startColumn": 20, + "charOffset": 23254, + "charLength": 10, + "snippet": { + "text": "\tLuaScriptInterface::pushString(L, targetName);\n\n\tlua_pushnumber(L, reportType);\n\tlua_pushnumber(L, reportReason);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "852b8c8bd4adb58065a3f8f53535f8454aebf25604d10a9dd4aa0262615f7260" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 623, + "startColumn": 20, + "charOffset": 23354, + "charLength": 12, + "snippet": { + "text": "reportReason" + } + }, + "contextRegion": { + "startLine": 621, + "startColumn": 20, + "charOffset": 23302, + "charLength": 12, + "snippet": { + "text": "\n\tlua_pushnumber(L, reportType);\n\tlua_pushnumber(L, reportReason);\n\n\tLuaScriptInterface::pushString(L, comment);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69d8b8202f8bfef57904fe27d9687b342f81ca356863b051389d79c3587846bf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 628, + "startColumn": 41, + "charOffset": 23505, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 626, + "startColumn": 41, + "charOffset": 23415, + "charLength": 1, + "snippet": { + "text": "\tLuaScriptInterface::pushString(L, translation);\n\n\tgetScriptInterface()->callVoidFunction(6);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e25a0ef6827ca0762e5e48a31c1e41093c2ab77c9ff46032e51c328967a81000" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 631, + "startColumn": 63, + "charOffset": 23574, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 629, + "startColumn": 63, + "charOffset": 23509, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnReportBug(std::shared_ptr player, const std::string &message, const Position &position, uint8_t category) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnReportBug - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9dc63705c447a62efc7ec2fb9f83582994955ae15d31cde52fe0cea3e2121ff2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 632, + "startColumn": 7, + "charOffset": 23668, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 630, + "startColumn": 7, + "charOffset": 23511, + "charLength": 18, + "snippet": { + "text": "\nvoid EventCallback::playerOnReportBug(std::shared_ptr player, const std::string &message, const Position &position, uint8_t category) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnReportBug - \"\n\t\t \"Player {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3bf556be2e0df5901dfa39a8ac7b687b45cfcc022a5061d6c8ead6402068d130" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 640, + "startColumn": 41, + "charOffset": 23979, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 638, + "startColumn": 41, + "charOffset": 23935, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d232ffa5ae7881446874524dda8a2bcd6cf7664c77c058b9abcd7a529499c46" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 644, + "startColumn": 24, + "charOffset": 24164, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 642, + "startColumn": 24, + "charOffset": 24087, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "396ef05b2cc9206e3fba4f9dab82a8d049fb8c80095fbb858e3608433e46dead" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 651, + "startColumn": 20, + "charOffset": 24413, + "charLength": 8, + "snippet": { + "text": "category" + } + }, + "contextRegion": { + "startLine": 649, + "startColumn": 20, + "charOffset": 24301, + "charLength": 8, + "snippet": { + "text": "\tLuaScriptInterface::pushString(L, message);\n\tLuaScriptInterface::pushPosition(L, position);\n\tlua_pushnumber(L, category);\n\n\tgetScriptInterface()->callFunction(4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7433457c91362218690ca93420df179f089004373108d5f736faa4ac5c54b1d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 653, + "startColumn": 24, + "charOffset": 24448, + "charLength": 12, + "snippet": { + "text": "callFunction" + } + }, + "contextRegion": { + "startLine": 651, + "startColumn": 24, + "charOffset": 24394, + "charLength": 12, + "snippet": { + "text": "\tlua_pushnumber(L, category);\n\n\tgetScriptInterface()->callFunction(4);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2606aad804e2ccfbdc61941f6999cf9b91974d57e0468525fff516eb1d94a0c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 656, + "startColumn": 58, + "charOffset": 24525, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 654, + "startColumn": 58, + "charOffset": 24465, + "charLength": 6, + "snippet": { + "text": "}\n\nbool EventCallback::playerOnTurn(std::shared_ptr player, Direction direction) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnTurn - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b90d455316d9935d558a7e016b449f27f98af2f80c2aab8cbaed892cb64cf0c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 657, + "startColumn": 7, + "charOffset": 24568, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 655, + "startColumn": 7, + "charOffset": 24467, + "charLength": 18, + "snippet": { + "text": "\nbool EventCallback::playerOnTurn(std::shared_ptr player, Direction direction) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnTurn - \"\n\t\t \"Player {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a5feae1563ecda3c41c3c756d23cfc460d26f61d83c3cac55c4654982aaebece" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 665, + "startColumn": 41, + "charOffset": 24880, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 663, + "startColumn": 41, + "charOffset": 24836, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f13bb2f97780e46ccb015b9cd9c13b1f4ccc5535f08527fe128ea61c2f96a760" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 669, + "startColumn": 24, + "charOffset": 25065, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 667, + "startColumn": 24, + "charOffset": 24988, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db58569ee72613235dd6e80ea9b97eae37061b38edd78a6d2671931981eb35c4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 674, + "startColumn": 20, + "charOffset": 25221, + "charLength": 9, + "snippet": { + "text": "direction" + } + }, + "contextRegion": { + "startLine": 672, + "startColumn": 20, + "charOffset": 25149, + "charLength": 9, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n\n\tlua_pushnumber(L, direction);\n\n\treturn getScriptInterface()->callFunction(2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ecce0cff83be3cc5eece8c38d442bf74a5214c1f7e9a0b78e14f6f8eab05de11" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 679, + "startColumn": 66, + "charOffset": 25349, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 677, + "startColumn": 66, + "charOffset": 25281, + "charLength": 6, + "snippet": { + "text": "}\n\nbool EventCallback::playerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnTradeRequest - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a5aab0cf81d5f501bac653db445dbb2351aa5894e24463a6888edbbb7adabf0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 679, + "startColumn": 98, + "charOffset": 25381, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 677, + "startColumn": 98, + "charOffset": 25281, + "charLength": 6, + "snippet": { + "text": "}\n\nbool EventCallback::playerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnTradeRequest - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "caef63c5494f65629b26c54a6fe6c1839742e098572ddc935e524835af78754c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 679, + "startColumn": 128, + "charOffset": 25411, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 677, + "startColumn": 128, + "charOffset": 25281, + "charLength": 4, + "snippet": { + "text": "}\n\nbool EventCallback::playerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnTradeRequest - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0497ab25e27d149549aed5802da707477ca902f252ae3549df006088f4ff74a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 680, + "startColumn": 7, + "charOffset": 25431, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 678, + "startColumn": 7, + "charOffset": 25283, + "charLength": 18, + "snippet": { + "text": "\nbool EventCallback::playerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnTradeRequest - \"\n\t\t \"Player {} target {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67c597c75a512c7fde1954b712fe6afee18efa2d922442e470ef4818fbbe9ff0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 688, + "startColumn": 41, + "charOffset": 25780, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 686, + "startColumn": 41, + "charOffset": 25736, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72e1d47d72169ae6af618472cad43c9bb9d47a7ff905e80042c736daa550344a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 692, + "startColumn": 24, + "charOffset": 25965, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 690, + "startColumn": 24, + "charOffset": 25888, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3970b8751b54872035ba10c0085a69cdf45bcede2cf11c49f5264e9e817a872" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 706, + "startColumn": 65, + "charOffset": 26426, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 704, + "startColumn": 65, + "charOffset": 26359, + "charLength": 6, + "snippet": { + "text": "}\n\nbool EventCallback::playerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnTradeAccept - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5775d8dcea3d428ce1907a43bfb0854e539860a20baedb960b771d95cd15e526" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 706, + "startColumn": 97, + "charOffset": 26458, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 704, + "startColumn": 97, + "charOffset": 26359, + "charLength": 6, + "snippet": { + "text": "}\n\nbool EventCallback::playerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnTradeAccept - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c20aa82245a2cd9e25eedccfe71e4992858f89927f6c10a38152b104a322dd63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'playerOnTradeAccept' of similar type ('std::shared_ptr') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 706, + "startColumn": 105, + "charOffset": 26466, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 704, + "startColumn": 105, + "charOffset": 26359, + "charLength": 3, + "snippet": { + "text": "}\n\nbool EventCallback::playerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnTradeAccept - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6a66cc5b2db82922699cb5ab71c0d63925081e4c3ae5d3e7430763cbd85d16d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 706, + "startColumn": 127, + "charOffset": 26488, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 704, + "startColumn": 127, + "charOffset": 26359, + "charLength": 4, + "snippet": { + "text": "}\n\nbool EventCallback::playerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnTradeAccept - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee9ba88e18d85a32789e9d5b40174985554872ad415915d72a519c943c4da5f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'targetItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 706, + "startColumn": 155, + "charOffset": 26516, + "charLength": 10, + "snippet": { + "text": "targetItem" + } + }, + "contextRegion": { + "startLine": 704, + "startColumn": 155, + "charOffset": 26359, + "charLength": 10, + "snippet": { + "text": "}\n\nbool EventCallback::playerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnTradeAccept - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dca8c844d6a992eb83467d0f0d73883da053826d153b5bf21820a1d9ce581b59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 707, + "startColumn": 7, + "charOffset": 26542, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 705, + "startColumn": 7, + "charOffset": 26361, + "charLength": 18, + "snippet": { + "text": "\nbool EventCallback::playerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnTradeAccept - \"\n\t\t \"Player {} target {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8d8edbae4acdf0325d9e216961a38e9c961c7d9aaefba1c3bd60940a780dfd1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 715, + "startColumn": 41, + "charOffset": 26890, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 713, + "startColumn": 41, + "charOffset": 26846, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90d173d6b7e75421f1af870d858e66c6c6c81d12b3cdffd6ecf271a20dca1e0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 719, + "startColumn": 24, + "charOffset": 27075, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 717, + "startColumn": 24, + "charOffset": 26998, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6cdb68c68b592846aff5143c0d085c3797ba889d959e0d3303fe1381882858e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 736, + "startColumn": 68, + "charOffset": 27654, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 734, + "startColumn": 68, + "charOffset": 27584, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnGainExperience(std::shared_ptr player, std::shared_ptr target, uint64_t &exp, uint64_t rawExp) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnGainExperience - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f11e0ee4ec48d705b6a120bb7a223ef3d079c1f50c4471025e0b3143fafb8f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 736, + "startColumn": 102, + "charOffset": 27688, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 734, + "startColumn": 102, + "charOffset": 27584, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnGainExperience(std::shared_ptr player, std::shared_ptr target, uint64_t &exp, uint64_t rawExp) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnGainExperience - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1886d65562cf8a95c65fb13fa9ed53fe0a55f5e3f735ad167a93c892c06a733" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 737, + "startColumn": 7, + "charOffset": 27742, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 735, + "startColumn": 7, + "charOffset": 27586, + "charLength": 18, + "snippet": { + "text": "\nvoid EventCallback::playerOnGainExperience(std::shared_ptr player, std::shared_ptr target, uint64_t &exp, uint64_t rawExp) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnGainExperience - \"\n\t\t \"Player {} target {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a57f413a2176f153809ecf0d6700d0841dcaea93777b0e5d13b3a8614f93229" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 745, + "startColumn": 41, + "charOffset": 28087, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 743, + "startColumn": 41, + "charOffset": 28043, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74e9bb17690ca189480a4e9a1c9ea25d7cd2974a11968867694e2bdc20b1eef2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 749, + "startColumn": 24, + "charOffset": 28272, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 747, + "startColumn": 24, + "charOffset": 28195, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "468af791c9b3809f0ffb053fc4ea5d86c6a98c13a5a77d128c517d2638b94fb2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 761, + "startColumn": 20, + "charOffset": 28591, + "charLength": 3, + "snippet": { + "text": "exp" + } + }, + "contextRegion": { + "startLine": 759, + "startColumn": 20, + "charOffset": 28568, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, exp);\n\tlua_pushnumber(L, rawExp);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2639e29c7ef45e6fd37ec8927dcea358946da063dd09e46787ca3491615e639c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 761, + "startColumn": 20, + "charOffset": 28591, + "charLength": 3, + "snippet": { + "text": "exp" + } + }, + "contextRegion": { + "startLine": 759, + "startColumn": 20, + "charOffset": 28568, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, exp);\n\tlua_pushnumber(L, rawExp);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07713640ff39be7e4b623f2adeb1c1a538f75694cf4df10f6b12348a478758d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 762, + "startColumn": 20, + "charOffset": 28616, + "charLength": 6, + "snippet": { + "text": "rawExp" + } + }, + "contextRegion": { + "startLine": 760, + "startColumn": 20, + "charOffset": 28571, + "charLength": 6, + "snippet": { + "text": "\n\tlua_pushnumber(L, exp);\n\tlua_pushnumber(L, rawExp);\n\n\tif (getScriptInterface()->protectedCall(L, 4, 1) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "122b2e1c14f702f2db08e8c5ab012ebe90f53c9950744e5119eda7178f08e0b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 762, + "startColumn": 20, + "charOffset": 28616, + "charLength": 6, + "snippet": { + "text": "rawExp" + } + }, + "contextRegion": { + "startLine": 760, + "startColumn": 20, + "charOffset": 28571, + "charLength": 6, + "snippet": { + "text": "\n\tlua_pushnumber(L, exp);\n\tlua_pushnumber(L, rawExp);\n\n\tif (getScriptInterface()->protectedCall(L, 4, 1) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78e914392b2e4aa6daace48775e6aaca30e75927b261937aa1db2a65fb7e6064" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 764, + "startColumn": 6, + "charOffset": 28631, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 762, + "startColumn": 6, + "charOffset": 28597, + "charLength": 18, + "snippet": { + "text": "\tlua_pushnumber(L, rawExp);\n\n\tif (getScriptInterface()->protectedCall(L, 4, 1) != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81054a764a87286aee8cbbe8bb17c3a8d78ec45ebe455a1cf09fb46d077723c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 771, + "startColumn": 2, + "charOffset": 28850, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 769, + "startColumn": 2, + "charOffset": 28845, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tgetScriptInterface()->resetScriptEnv();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8da2611722cede39562b3804080b6adc982f6e58d8c6d78c8fe34bae36b2ad9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 774, + "startColumn": 68, + "charOffset": 28960, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 772, + "startColumn": 68, + "charOffset": 28890, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnLoseExperience(std::shared_ptr player, uint64_t &exp) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnLoseExperience - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf6ab170a93577b9eefe43bda008bf76c1ab0a5ddf8c07f41151aed784906a73" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 775, + "startColumn": 7, + "charOffset": 28997, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 773, + "startColumn": 7, + "charOffset": 28892, + "charLength": 18, + "snippet": { + "text": "\nvoid EventCallback::playerOnLoseExperience(std::shared_ptr player, uint64_t &exp) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnLoseExperience - \"\n\t\t \"Player {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fe44c82b71772a4bc59767cfcfd18cc63263d1b7b2eaae6bd7dafe0989ff393" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 783, + "startColumn": 41, + "charOffset": 29313, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 781, + "startColumn": 41, + "charOffset": 29269, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e696cd3bd8f602a64974efc7014364627ba561841620ecf10b880e4d2d1cb3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 787, + "startColumn": 24, + "charOffset": 29498, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 785, + "startColumn": 24, + "charOffset": 29421, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cae319e90f90531d96a194b71201ecca3c215a45ebd3ede7f635ede5438532d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 792, + "startColumn": 20, + "charOffset": 29654, + "charLength": 3, + "snippet": { + "text": "exp" + } + }, + "contextRegion": { + "startLine": 790, + "startColumn": 20, + "charOffset": 29582, + "charLength": 3, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n\n\tlua_pushnumber(L, exp);\n\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "032e550cfb046e60ea971abc2a7e598e8027523e7aa84c56aa7cac2f0342f040" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 792, + "startColumn": 20, + "charOffset": 29654, + "charLength": 3, + "snippet": { + "text": "exp" + } + }, + "contextRegion": { + "startLine": 790, + "startColumn": 20, + "charOffset": 29582, + "charLength": 3, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n\n\tlua_pushnumber(L, exp);\n\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f722f9168b7a86802037ca90e3b9c80e4c1c77f8abd1d6cd974728b11102a06e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 794, + "startColumn": 6, + "charOffset": 29666, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 792, + "startColumn": 6, + "charOffset": 29635, + "charLength": 18, + "snippet": { + "text": "\tlua_pushnumber(L, exp);\n\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4fe67e7137df51500e31695412a64e01aea45ea1ed7223402fef70757cc19b91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 801, + "startColumn": 2, + "charOffset": 29885, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 799, + "startColumn": 2, + "charOffset": 29880, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tgetScriptInterface()->resetScriptEnv();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d18953aa062b0d849ed86489444b0ba07c93c71154cfac0c5f9eae6556a45bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 804, + "startColumn": 68, + "charOffset": 29995, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 802, + "startColumn": 68, + "charOffset": 29925, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnGainSkillTries(std::shared_ptr player, skills_t skill, uint64_t &tries) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnGainSkillTries - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "628d0d7d1a23b55cafc172e6480a6b4516991c71343dde98ff669d6eed3d5f26" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 805, + "startColumn": 7, + "charOffset": 30050, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 803, + "startColumn": 7, + "charOffset": 29927, + "charLength": 18, + "snippet": { + "text": "\nvoid EventCallback::playerOnGainSkillTries(std::shared_ptr player, skills_t skill, uint64_t &tries) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnGainSkillTries - \"\n\t\t \"Player {} skill {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86738c2524a4e8624f61b98c5d51b1b2128a4802690c3569b5273573041b4079" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 813, + "startColumn": 41, + "charOffset": 30399, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 811, + "startColumn": 41, + "charOffset": 30355, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93a19a004cc7b76bc8a4afd590e62c97d0b6ab4500f2b96ee724cf80e009c3aa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 817, + "startColumn": 24, + "charOffset": 30584, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 815, + "startColumn": 24, + "charOffset": 30507, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83043b7000737e83ef09f38f7180c2a78d847642d02255517292271baec00e91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 822, + "startColumn": 20, + "charOffset": 30740, + "charLength": 5, + "snippet": { + "text": "skill" + } + }, + "contextRegion": { + "startLine": 820, + "startColumn": 20, + "charOffset": 30668, + "charLength": 5, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n\n\tlua_pushnumber(L, skill);\n\tlua_pushnumber(L, tries);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f307cf6d9a76786eaec5da9d701f02c006324f122a62d2d468a2dcf3e837d3af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 823, + "startColumn": 20, + "charOffset": 30767, + "charLength": 5, + "snippet": { + "text": "tries" + } + }, + "contextRegion": { + "startLine": 821, + "startColumn": 20, + "charOffset": 30720, + "charLength": 5, + "snippet": { + "text": "\n\tlua_pushnumber(L, skill);\n\tlua_pushnumber(L, tries);\n\n\tif (getScriptInterface()->protectedCall(L, 3, 1) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f0cf772d16ce506637bfe2ee35409c34b3d9d6ed64378f3f9bf80a340eee7fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 823, + "startColumn": 20, + "charOffset": 30767, + "charLength": 5, + "snippet": { + "text": "tries" + } + }, + "contextRegion": { + "startLine": 821, + "startColumn": 20, + "charOffset": 30720, + "charLength": 5, + "snippet": { + "text": "\n\tlua_pushnumber(L, skill);\n\tlua_pushnumber(L, tries);\n\n\tif (getScriptInterface()->protectedCall(L, 3, 1) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15afe3bcd7f0ccbfc90e913fa30817d74d4cd12917d78a1ab1251092e617f80e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 825, + "startColumn": 6, + "charOffset": 30781, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 823, + "startColumn": 6, + "charOffset": 30748, + "charLength": 18, + "snippet": { + "text": "\tlua_pushnumber(L, tries);\n\n\tif (getScriptInterface()->protectedCall(L, 3, 1) != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f44c90ffa08ff6c9b4f88ad1e3a07a003f03b09e2909a84692e0d4d6b4a5665" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 832, + "startColumn": 2, + "charOffset": 31002, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 830, + "startColumn": 2, + "charOffset": 30997, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tgetScriptInterface()->resetScriptEnv();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd1ed9cabd0e935e22bf9c9de8e95998e78f9f862f7b9175e6ba7681b51eaa9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 835, + "startColumn": 60, + "charOffset": 31104, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 833, + "startColumn": 60, + "charOffset": 31042, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnCombat - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db1add9b78f38a486893c956dd1a6072d917e18ac7276d7de8c344b80d4f9519" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 835, + "startColumn": 94, + "charOffset": 31138, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 833, + "startColumn": 94, + "charOffset": 31042, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnCombat - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84caaa5d340196ad69d6527e2481234238bf528142962b0ea0b70eda1088536c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 835, + "startColumn": 124, + "charOffset": 31168, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 833, + "startColumn": 124, + "charOffset": 31042, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnCombat - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4cfbc3633d5eabb1cd2967746bb1a404d13a5fbdaf8d207cd7c9326c470382b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 836, + "startColumn": 7, + "charOffset": 31210, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 834, + "startColumn": 7, + "charOffset": 31044, + "charLength": 18, + "snippet": { + "text": "\nvoid EventCallback::playerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnCombat - \"\n\t\t \"Player {} target {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62a8c1e940994f872af59e1fc820e38e8fd3d7a69b9ff30e2a56ec8d064ee3b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 844, + "startColumn": 41, + "charOffset": 31547, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 842, + "startColumn": 41, + "charOffset": 31503, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da6c985d37c09de3cf685acd825580ddadcb084bdde43f128fd95a8fe7da72a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 848, + "startColumn": 24, + "charOffset": 31732, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 846, + "startColumn": 24, + "charOffset": 31655, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "724cd4d55daddc6cad9b07ab61cf2e886383b319fd7b76d2d2d4f325dd091975" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 869, + "startColumn": 6, + "charOffset": 32231, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 867, + "startColumn": 6, + "charOffset": 32175, + "charLength": 18, + "snippet": { + "text": "\tLuaScriptInterface::pushCombatDamage(L, damage);\n\n\tif (getScriptInterface()->protectedCall(L, 8, 4) != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1e867b2308e01f6222ad69c1288000c2e05747aeafb7c94475aa0ae81b42a4f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 869, + "startColumn": 45, + "charOffset": 32270, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 867, + "startColumn": 45, + "charOffset": 32175, + "charLength": 1, + "snippet": { + "text": "\tLuaScriptInterface::pushCombatDamage(L, damage);\n\n\tif (getScriptInterface()->protectedCall(L, 8, 4) != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0748a246a4bf0a71716d5a25b3e39eb27e6b6a43669ca9fd57b7964bd9b71c9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 886, + "startColumn": 67, + "charOffset": 33056, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 884, + "startColumn": 67, + "charOffset": 32946, + "charLength": 1, + "snippet": { + "text": "\t\t*/\n\t\tif (damage.origin == ORIGIN_SPELL) {\n\t\t\tif (player->getVocationId() != 4 && player->getVocationId() != 8) {\n\t\t\t\tdamage.primary.value = damage.primary.value + damage.secondary.value;\n\t\t\t\tdamage.secondary.type = COMBAT_NONE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc8311777285a4963e817f1cb2817e35d7175a4d92012a5b088745ec2bccaeaf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 894, + "startColumn": 2, + "charOffset": 33222, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 892, + "startColumn": 2, + "charOffset": 33217, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tgetScriptInterface()->resetScriptEnv();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1326e8ded6b5d5960bf4012df3b7010594d8e15c29f2b470afc50ac94c99ed7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 897, + "startColumn": 69, + "charOffset": 33333, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 895, + "startColumn": 69, + "charOffset": 33262, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnRequestQuestLog(std::shared_ptr player) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnRequestQuestLog - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f2f47ab8aa7f3255eea97695c26fde424d6dab5ae9c105f5d182731c252aaf2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 898, + "startColumn": 7, + "charOffset": 33355, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 896, + "startColumn": 7, + "charOffset": 33264, + "charLength": 18, + "snippet": { + "text": "\nvoid EventCallback::playerOnRequestQuestLog(std::shared_ptr player) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnRequestQuestLog - \"\n\t\t \"Player {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d085d8fe2eb4e44fe8f5f749a5d9c95cff1cea692ced0fbfd100e5fcb4f8721" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 906, + "startColumn": 41, + "charOffset": 33672, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 904, + "startColumn": 41, + "charOffset": 33628, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99fe0775782a03888aa06d24bb4c649000cff8bbcb5356f07d570347e6f27ac6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 910, + "startColumn": 24, + "charOffset": 33857, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 908, + "startColumn": 24, + "charOffset": 33780, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af22acdeb829d1823db7db9c296fdac25332675655b8afc4fec9bcddb933ad6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 918, + "startColumn": 70, + "charOffset": 34110, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 916, + "startColumn": 70, + "charOffset": 34038, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnRequestQuestLine(std::shared_ptr player, uint16_t questId) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnRequestQuestLine - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2b732d6fb675cb8bcb85e5816483f1ee623242c9b2a2ef30a58da6140f86096" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 919, + "startColumn": 7, + "charOffset": 34150, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 917, + "startColumn": 7, + "charOffset": 34040, + "charLength": 18, + "snippet": { + "text": "\nvoid EventCallback::playerOnRequestQuestLine(std::shared_ptr player, uint16_t questId) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::playerOnRequestQuestLine - \"\n\t\t \"Player {} questId {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd422d2b829851ff478a06553954d4ba1124e9fdd689336a0a0c4cee3c9fc02b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 927, + "startColumn": 41, + "charOffset": 34488, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 925, + "startColumn": 41, + "charOffset": 34444, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9f9891933f701a47c0670c41aaff236a49d3eb1fc84b717ff1e9e54568e2d7f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 931, + "startColumn": 24, + "charOffset": 34673, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 929, + "startColumn": 24, + "charOffset": 34596, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a904dbb6eb084cfd4edce1c1b546379bb586d9267677da8e133964114678db3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 936, + "startColumn": 20, + "charOffset": 34829, + "charLength": 7, + "snippet": { + "text": "questId" + } + }, + "contextRegion": { + "startLine": 934, + "startColumn": 20, + "charOffset": 34757, + "charLength": 7, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n\n\tlua_pushnumber(L, questId);\n\n\tgetScriptInterface()->callVoidFunction(2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09874accdeffa9f723ad23a73e817cb3e5e6e6e7acf3a64a223deaf87eb00be9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 941, + "startColumn": 99, + "charOffset": 34985, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 939, + "startColumn": 99, + "charOffset": 34884, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnInventoryUpdate(std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool equip) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[{}] Call stack overflow\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64d76d06bb16617f03ca9cfd78891721fd7bd3a62cbdf61f72656ba51525e501" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 942, + "startColumn": 7, + "charOffset": 35031, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 940, + "startColumn": 7, + "charOffset": 34886, + "charLength": 18, + "snippet": { + "text": "\nvoid EventCallback::playerOnInventoryUpdate(std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool equip) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[{}] Call stack overflow\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81054a764a87286aee8cbbe8bb17c3a8d78ec45ebe455a1cf09fb46d077723c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 947, + "startColumn": 41, + "charOffset": 35191, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 945, + "startColumn": 41, + "charOffset": 35147, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38a0a297d80463346bd7e3de5536de845a7e211a56a8a235dc936b836a126dbf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 951, + "startColumn": 24, + "charOffset": 35376, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 949, + "startColumn": 24, + "charOffset": 35299, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5dd4d3ff4ae441e4c16584004e311adc0c70f2d835883e3cc81ffcd0da1584a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 953, + "startColumn": 46, + "charOffset": 35451, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 951, + "startColumn": 46, + "charOffset": 35353, + "charLength": 6, + "snippet": { + "text": "\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5934f060e599a899ecc6742364a338c2a661ac5665cf8f8c26fd710de9abe0ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 959, + "startColumn": 20, + "charOffset": 35635, + "charLength": 4, + "snippet": { + "text": "slot" + } + }, + "contextRegion": { + "startLine": 957, + "startColumn": 20, + "charOffset": 35563, + "charLength": 4, + "snippet": { + "text": "\tLuaScriptInterface::setItemMetatable(L, -1, item);\n\n\tlua_pushnumber(L, slot);\n\tLuaScriptInterface::pushBoolean(L, equip);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "299081ed73ca4522915018d3898ba8e978b263ed14e93a418311cf44573db7ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 965, + "startColumn": 94, + "charOffset": 35827, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 963, + "startColumn": 94, + "charOffset": 35731, + "charLength": 4, + "snippet": { + "text": "}\n\nbool EventCallback::playerOnRotateItem(std::shared_ptr player, std::shared_ptr item, const Position &position) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[{}] Call stack overflow\", __FUNCTION__);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efdcb24d47972c58170732d120e37114094c42988b2528037acfc107c6867770" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 966, + "startColumn": 7, + "charOffset": 35873, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 964, + "startColumn": 7, + "charOffset": 35733, + "charLength": 18, + "snippet": { + "text": "\nbool EventCallback::playerOnRotateItem(std::shared_ptr player, std::shared_ptr item, const Position &position) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[{}] Call stack overflow\", __FUNCTION__);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4cf53cb8d4428700e711fab6dacdc0763241667a6b96ca6aea4952b34611bb86" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 971, + "startColumn": 41, + "charOffset": 36039, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 969, + "startColumn": 41, + "charOffset": 35995, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9cf75f2f3f0bbd39171593c0708a4c682957fed10352f0db7d3ac0f9a63803e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 975, + "startColumn": 24, + "charOffset": 36224, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 973, + "startColumn": 24, + "charOffset": 36147, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2606aad804e2ccfbdc61941f6999cf9b91974d57e0468525fff516eb1d94a0c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 977, + "startColumn": 46, + "charOffset": 36299, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 975, + "startColumn": 46, + "charOffset": 36201, + "charLength": 6, + "snippet": { + "text": "\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3e94d2a087f68a2deab9b7b70bf3fa60dd4f01fb7cdb8c62ea6adf710864338" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 988, + "startColumn": 58, + "charOffset": 36620, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 986, + "startColumn": 58, + "charOffset": 36560, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnWalk(std::shared_ptr player, Direction &dir) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::eventOnWalk - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36fb3b666be72b4861e69b1c40a98216ff3833c237c076f380ee6069492cddaf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 989, + "startColumn": 7, + "charOffset": 36658, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 987, + "startColumn": 7, + "charOffset": 36562, + "charLength": 18, + "snippet": { + "text": "\nvoid EventCallback::playerOnWalk(std::shared_ptr player, Direction &dir) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::eventOnWalk - \"\n\t\t \"Player {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "94299b86e8cd8f8d104ed37bcebb47d2dc53dacc51b7bf74009f2877b5712e81" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 997, + "startColumn": 41, + "charOffset": 36963, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 995, + "startColumn": 41, + "charOffset": 36919, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36a92ca0a80415a5e977d6944a780af88acd148d5cc6a7d0d8187c643a9dfe24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1001, + "startColumn": 24, + "charOffset": 37148, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 999, + "startColumn": 24, + "charOffset": 37071, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86941d7ddd395f2a58d2b06609a86f5cd2b724d851fd8efca11895b013e3196c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1006, + "startColumn": 20, + "charOffset": 37304, + "charLength": 3, + "snippet": { + "text": "dir" + } + }, + "contextRegion": { + "startLine": 1004, + "startColumn": 20, + "charOffset": 37232, + "charLength": 3, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n\n\tlua_pushnumber(L, dir);\n\n\tgetScriptInterface()->callVoidFunction(2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "026ca265b26470a6bc43cc3cf3722efec27e90f808a912ba591e53bab5834d04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1011, + "startColumn": 67, + "charOffset": 37424, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1009, + "startColumn": 67, + "charOffset": 37355, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid EventCallback::playerOnStorageUpdate(std::shared_ptr player, const uint32_t key, const int32_t value, int32_t oldValue, uint64_t currentTime) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::eventOnStorageUpdate - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f329c759683077daab3558ad8ca6739d90043b41eca99fdc8e9d4a96f35c1b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1012, + "startColumn": 7, + "charOffset": 37527, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 1010, + "startColumn": 7, + "charOffset": 37357, + "charLength": 18, + "snippet": { + "text": "\nvoid EventCallback::playerOnStorageUpdate(std::shared_ptr player, const uint32_t key, const int32_t value, int32_t oldValue, uint64_t currentTime) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::eventOnStorageUpdate - \"\n\t\t \"Player {} key {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b7e52eb0566347eb16363edefc526c492cff91337595f34a2f5e263901a2c45" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1020, + "startColumn": 41, + "charOffset": 37853, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 1018, + "startColumn": 41, + "charOffset": 37809, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05f77ca959c0a0fac9966b04c7ba512094502225c34a761e5ad4689a9a99421e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1024, + "startColumn": 24, + "charOffset": 38038, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 1022, + "startColumn": 24, + "charOffset": 37961, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a8c0beec5e88097046cbad7a1df6a982c8ada89f508a95e8eafc62a2ebc871da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1029, + "startColumn": 20, + "charOffset": 38194, + "charLength": 3, + "snippet": { + "text": "key" + } + }, + "contextRegion": { + "startLine": 1027, + "startColumn": 20, + "charOffset": 38122, + "charLength": 3, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n\n\tlua_pushnumber(L, key);\n\tlua_pushnumber(L, value);\n\tlua_pushnumber(L, oldValue);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a54dbf5b1771a8f973bdffe4e01204581024b2f27e8c345b3c020635ed765d39" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1030, + "startColumn": 20, + "charOffset": 38219, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 1028, + "startColumn": 20, + "charOffset": 38174, + "charLength": 5, + "snippet": { + "text": "\n\tlua_pushnumber(L, key);\n\tlua_pushnumber(L, value);\n\tlua_pushnumber(L, oldValue);\n\tlua_pushnumber(L, currentTime);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6ec1156ce889c00c57c800d64614d50eeb9e81719653db9bead324657fb7217" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1031, + "startColumn": 20, + "charOffset": 38246, + "charLength": 8, + "snippet": { + "text": "oldValue" + } + }, + "contextRegion": { + "startLine": 1029, + "startColumn": 20, + "charOffset": 38175, + "charLength": 8, + "snippet": { + "text": "\tlua_pushnumber(L, key);\n\tlua_pushnumber(L, value);\n\tlua_pushnumber(L, oldValue);\n\tlua_pushnumber(L, currentTime);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45109af321d60f28a0eb1dd90e492bfa8b27760b273a87f12ea441f44f59204f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1032, + "startColumn": 20, + "charOffset": 38276, + "charLength": 11, + "snippet": { + "text": "currentTime" + } + }, + "contextRegion": { + "startLine": 1030, + "startColumn": 20, + "charOffset": 38200, + "charLength": 11, + "snippet": { + "text": "\tlua_pushnumber(L, value);\n\tlua_pushnumber(L, oldValue);\n\tlua_pushnumber(L, currentTime);\n\n\tgetScriptInterface()->callVoidFunction(5);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ef67525441cc1ee45de0d815474e3a0fe84a55cb7f84da75ff6a90cccb120de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1032, + "startColumn": 20, + "charOffset": 38276, + "charLength": 11, + "snippet": { + "text": "currentTime" + } + }, + "contextRegion": { + "startLine": 1030, + "startColumn": 20, + "charOffset": 38200, + "charLength": 11, + "snippet": { + "text": "\tlua_pushnumber(L, value);\n\tlua_pushnumber(L, oldValue);\n\tlua_pushnumber(L, currentTime);\n\n\tgetScriptInterface()->callVoidFunction(5);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de6ecc869b168b6ea6ffd9f3ff93b0f2dcf0790cb2cdb2aa22a4ed08d3e7efba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1034, + "startColumn": 41, + "charOffset": 38331, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 1032, + "startColumn": 41, + "charOffset": 38257, + "charLength": 1, + "snippet": { + "text": "\tlua_pushnumber(L, currentTime);\n\n\tgetScriptInterface()->callVoidFunction(5);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d64083b0106b80179bb9a7ff6973b8eedf7eff0b910dc4785298a066d5d4a91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1038, + "startColumn": 100, + "charOffset": 38448, + "charLength": 6, + "snippet": { + "text": "corpse" + } + }, + "contextRegion": { + "startLine": 1036, + "startColumn": 100, + "charOffset": 38337, + "charLength": 6, + "snippet": { + "text": "\n// Monster\nvoid EventCallback::monsterOnDropLoot(std::shared_ptr monster, std::shared_ptr corpse) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::monsterOnDropLoot - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e49cc2c8ee24bdc02553d676b3465e8941df5011003e004ab5a1df71bfa706af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1039, + "startColumn": 7, + "charOffset": 38470, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 1037, + "startColumn": 7, + "charOffset": 38338, + "charLength": 18, + "snippet": { + "text": "// Monster\nvoid EventCallback::monsterOnDropLoot(std::shared_ptr monster, std::shared_ptr corpse) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::monsterOnDropLoot - \"\n\t\t \"Monster corpse {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1c3b206e44038044fadf54c4862d73b73a53a8ffe26072040a16c4affd1aa53" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1047, + "startColumn": 41, + "charOffset": 38789, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 1045, + "startColumn": 41, + "charOffset": 38745, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14b2496713a8787e9b8a4f09e671dbdc7dac3949282d295cb1525540979c8950" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1051, + "startColumn": 24, + "charOffset": 38974, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 1049, + "startColumn": 24, + "charOffset": 38897, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, monster);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8dbc3b08e1a1f40d8c693363db5b926fe3eb7809e250c825b62519cea2bae55e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1053, + "startColumn": 47, + "charOffset": 39050, + "charLength": 7, + "snippet": { + "text": "monster" + } + }, + "contextRegion": { + "startLine": 1051, + "startColumn": 47, + "charOffset": 38951, + "charLength": 7, + "snippet": { + "text": "\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, monster);\n\tLuaScriptInterface::setMetatable(L, -1, \"Monster\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "160f8990711964039f470af149d11ef2d3a03e558ae85d83aa2882e71f3f1799" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-avoid-return-with-void-value", + "ruleIndex": 689, + "kind": "fail", + "level": "warning", + "message": { + "text": "return statement within a void function should not have a specified return value" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1059, + "startColumn": 2, + "charOffset": 39228, + "charLength": 6, + "snippet": { + "text": "return" + } + }, + "contextRegion": { + "startLine": 1057, + "startColumn": 2, + "charOffset": 39171, + "charLength": 6, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Container\");\n\n\treturn getScriptInterface()->callVoidFunction(2);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "935df42a7c7b9223e982fc28217c6d19be24a94cf14883fbaf379618e7016861" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1062, + "startColumn": 102, + "charOffset": 39382, + "charLength": 6, + "snippet": { + "text": "corpse" + } + }, + "contextRegion": { + "startLine": 1060, + "startColumn": 102, + "charOffset": 39278, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid EventCallback::monsterPostDropLoot(std::shared_ptr monster, std::shared_ptr corpse) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::monsterPostDropLoot - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a6727159fe43346aa7ba53c02631e508eada15470e08c87fe65b872fb039975" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1063, + "startColumn": 7, + "charOffset": 39404, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 1061, + "startColumn": 7, + "charOffset": 39280, + "charLength": 18, + "snippet": { + "text": "\nvoid EventCallback::monsterPostDropLoot(std::shared_ptr monster, std::shared_ptr corpse) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::monsterPostDropLoot - \"\n\t\t \"Monster corpse {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a94b7dce91602d25aae50430347d3b3bf283a32339b5dafb735a8bc4ca34e68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1071, + "startColumn": 41, + "charOffset": 39725, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 1069, + "startColumn": 41, + "charOffset": 39681, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a053781ffc8f0add2b576a986c831160024632d5f594b08b7f6dab742bb25c35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1075, + "startColumn": 24, + "charOffset": 39910, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 1073, + "startColumn": 24, + "charOffset": 39833, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, monster);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c95834eae6c379ce9ecad1da41eaf6a7492315c31329921caaa6dd32edc7c98e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1077, + "startColumn": 47, + "charOffset": 39986, + "charLength": 7, + "snippet": { + "text": "monster" + } + }, + "contextRegion": { + "startLine": 1075, + "startColumn": 47, + "charOffset": 39887, + "charLength": 7, + "snippet": { + "text": "\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, monster);\n\tLuaScriptInterface::setMetatable(L, -1, \"Monster\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca700f4b1be394553debd13d3a15855b67288ba3e877ef579928d40c3cbd5a35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-avoid-return-with-void-value", + "ruleIndex": 689, + "kind": "fail", + "level": "warning", + "message": { + "text": "return statement within a void function should not have a specified return value" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1083, + "startColumn": 2, + "charOffset": 40164, + "charLength": 6, + "snippet": { + "text": "return" + } + }, + "contextRegion": { + "startLine": 1081, + "startColumn": 2, + "charOffset": 40107, + "charLength": 6, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Container\");\n\n\treturn getScriptInterface()->callVoidFunction(2);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e00ec1bace999a67b0ef8313ff37f0fd462312fd2314333116c4714520100e56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1087, + "startColumn": 7, + "charOffset": 40326, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 1085, + "startColumn": 7, + "charOffset": 40216, + "charLength": 18, + "snippet": { + "text": "\nvoid EventCallback::monsterOnSpawn(std::shared_ptr monster, const Position &position) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"{} - \"\n\t\t \"Position {}\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9a621f7e62514006d6f6d335f47b4465572f80a6a45d23e08f75a3d8ed0f65e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1095, + "startColumn": 41, + "charOffset": 40624, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 1093, + "startColumn": 41, + "charOffset": 40580, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cfd1b8277064da775e8446cb89a586bf2f336ac823083d3007d3c321b44b1fda" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1099, + "startColumn": 24, + "charOffset": 40809, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 1097, + "startColumn": 24, + "charOffset": 40732, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, monster);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a32fa1b618cdeb377082c1f1ea7b38b6ea414fcf76637b899bad2fff8adb25e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1101, + "startColumn": 47, + "charOffset": 40885, + "charLength": 7, + "snippet": { + "text": "monster" + } + }, + "contextRegion": { + "startLine": 1099, + "startColumn": 47, + "charOffset": 40786, + "charLength": 7, + "snippet": { + "text": "\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, monster);\n\tLuaScriptInterface::setMetatable(L, -1, \"Monster\");\n\tLuaScriptInterface::pushPosition(L, position);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54314a772508c8caed47342268cb084585bc8101b82ef95a7084e317e66101c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1105, + "startColumn": 6, + "charOffset": 41002, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 1103, + "startColumn": 6, + "charOffset": 40948, + "charLength": 18, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, position);\n\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b072353d11c6dabe3b4c6c693506dd109b1b28ebd020f597b7b34aaea901773" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1111, + "startColumn": 2, + "charOffset": 41165, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 1109, + "startColumn": 2, + "charOffset": 41160, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tgetScriptInterface()->resetScriptEnv();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14e5aa6dca8bf7caf7477c5b6114ca5e1b9bd13cbd22aa0554743f150a470a3a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1116, + "startColumn": 7, + "charOffset": 41312, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 1114, + "startColumn": 7, + "charOffset": 41208, + "charLength": 18, + "snippet": { + "text": "// Npc\nvoid EventCallback::npcOnSpawn(std::shared_ptr npc, const Position &position) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"{} - \"\n\t\t \"Position {}\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b150361c03dc27ed2ead920ea811e870a580f5a306d7076e69ea8e25b51793d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1124, + "startColumn": 41, + "charOffset": 41610, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 1122, + "startColumn": 41, + "charOffset": 41566, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "974de5cc8168cef9323b268db579e0fa7db1fd766fd5c3336117f547be7eb2a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1128, + "startColumn": 24, + "charOffset": 41795, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 1126, + "startColumn": 24, + "charOffset": 41718, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, npc);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b4bddbee4a13f33d18f41772a3dde2e9a0080e5f2828c0714443e64f5e67b51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'npc' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1130, + "startColumn": 43, + "charOffset": 41867, + "charLength": 3, + "snippet": { + "text": "npc" + } + }, + "contextRegion": { + "startLine": 1128, + "startColumn": 43, + "charOffset": 41772, + "charLength": 3, + "snippet": { + "text": "\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, npc);\n\tLuaScriptInterface::setMetatable(L, -1, \"Npc\");\n\tLuaScriptInterface::pushPosition(L, position);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "baf96949e1fd5c42938ce693b086163af343083f0a7759ca8354bfbefe5c2fb8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1134, + "startColumn": 6, + "charOffset": 41976, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 1132, + "startColumn": 6, + "charOffset": 41922, + "charLength": 18, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, position);\n\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a5feae1563ecda3c41c3c756d23cfc460d26f61d83c3cac55c4654982aaebece" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1140, + "startColumn": 2, + "charOffset": 42139, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 1138, + "startColumn": 2, + "charOffset": 42134, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tgetScriptInterface()->resetScriptEnv();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f40054f1267e259cba7e2d5225ffbd9eefe3d30f0f7f08116d8c5d484f0d0869" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1143, + "startColumn": 67, + "charOffset": 42248, + "charLength": 4, + "snippet": { + "text": "zone" + } + }, + "contextRegion": { + "startLine": 1141, + "startColumn": 67, + "charOffset": 42179, + "charLength": 4, + "snippet": { + "text": "}\n\nbool EventCallback::zoneBeforeCreatureEnter(std::shared_ptr zone, std::shared_ptr creature) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::zoneBeforeCreatureEnter - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a8bf605d7dcf108b80fb96e98bd71f26d65da7260f0f576fa03c96677649d932" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1143, + "startColumn": 99, + "charOffset": 42280, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1141, + "startColumn": 99, + "charOffset": 42179, + "charLength": 8, + "snippet": { + "text": "}\n\nbool EventCallback::zoneBeforeCreatureEnter(std::shared_ptr zone, std::shared_ptr creature) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::zoneBeforeCreatureEnter - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac62473677be43106b1dbe411add6a8731d4b209c58ebef15249a82e91597002" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1144, + "startColumn": 7, + "charOffset": 42304, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 1142, + "startColumn": 7, + "charOffset": 42181, + "charLength": 18, + "snippet": { + "text": "\nbool EventCallback::zoneBeforeCreatureEnter(std::shared_ptr zone, std::shared_ptr creature) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::zoneBeforeCreatureEnter - \"\n\t\t \"Zone {} Creature {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bdd52b12bc874efb1063c72fa0a7c9c1ba40e840425fa2d7e2cd95fec1f1d18d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1152, + "startColumn": 41, + "charOffset": 42656, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 1150, + "startColumn": 41, + "charOffset": 42612, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bec1ae5e2ff22f557e8351991976b274436103bec5d5f75997fb1cedfcbfbc1d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1156, + "startColumn": 24, + "charOffset": 42841, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 1154, + "startColumn": 24, + "charOffset": 42764, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, zone);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d066cd006075cf0e5db6bbc9babfa9bb9dee67e185ea06f56abe64e2092647f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1167, + "startColumn": 67, + "charOffset": 43207, + "charLength": 4, + "snippet": { + "text": "zone" + } + }, + "contextRegion": { + "startLine": 1165, + "startColumn": 67, + "charOffset": 43138, + "charLength": 4, + "snippet": { + "text": "}\n\nbool EventCallback::zoneBeforeCreatureLeave(std::shared_ptr zone, std::shared_ptr creature) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::zoneBeforeCreatureLeave - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f797901c481a8515dcb4e361485553298bb93be7812c402acd64c7e6954b4503" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1167, + "startColumn": 99, + "charOffset": 43239, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1165, + "startColumn": 99, + "charOffset": 43138, + "charLength": 8, + "snippet": { + "text": "}\n\nbool EventCallback::zoneBeforeCreatureLeave(std::shared_ptr zone, std::shared_ptr creature) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::zoneBeforeCreatureLeave - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6732e872aabfdf2f5a3f6c4ad6bffe3287dab15163f9265dab737b042fcd1d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1168, + "startColumn": 7, + "charOffset": 43263, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 1166, + "startColumn": 7, + "charOffset": 43140, + "charLength": 18, + "snippet": { + "text": "\nbool EventCallback::zoneBeforeCreatureLeave(std::shared_ptr zone, std::shared_ptr creature) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::zoneBeforeCreatureLeave - \"\n\t\t \"Zone {} Creature {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6396232c7c614ebe97f7af6bf978589d6defe372086d35bbbe04108af9da2264" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1176, + "startColumn": 41, + "charOffset": 43615, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 1174, + "startColumn": 41, + "charOffset": 43571, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "363a2d9d2dee77d594e162ee983ee96118d5821ee424837fbc0b8c7da5a6469b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1180, + "startColumn": 24, + "charOffset": 43800, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 1178, + "startColumn": 24, + "charOffset": 43723, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, zone);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2dd12c92f83d797be31cc34c819a0edd60d5b622de183b1ed217139be71715ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1191, + "startColumn": 66, + "charOffset": 44165, + "charLength": 4, + "snippet": { + "text": "zone" + } + }, + "contextRegion": { + "startLine": 1189, + "startColumn": 66, + "charOffset": 44097, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid EventCallback::zoneAfterCreatureEnter(std::shared_ptr zone, std::shared_ptr creature) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::zoneAfterCreatureEnter - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae1519a19c52e774d63c1ec4f393eb706088e817849b46dc1edaf3c1b8b73f14" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1191, + "startColumn": 98, + "charOffset": 44197, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1189, + "startColumn": 98, + "charOffset": 44097, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid EventCallback::zoneAfterCreatureEnter(std::shared_ptr zone, std::shared_ptr creature) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::zoneAfterCreatureEnter - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0f32421c0a03085f693121f19e1526e3bea1d68586cd4b9980770edf1a49e41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1192, + "startColumn": 7, + "charOffset": 44221, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 1190, + "startColumn": 7, + "charOffset": 44099, + "charLength": 18, + "snippet": { + "text": "\nvoid EventCallback::zoneAfterCreatureEnter(std::shared_ptr zone, std::shared_ptr creature) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::zoneAfterCreatureEnter - \"\n\t\t \"Zone {} Creature {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d18953aa062b0d849ed86489444b0ba07c93c71154cfac0c5f9eae6556a45bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1200, + "startColumn": 41, + "charOffset": 44566, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 1198, + "startColumn": 41, + "charOffset": 44522, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3529fcb5e996f094c2d1506621c3ac1b5098197f10faa16f9c83d633e2b9e110" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1204, + "startColumn": 24, + "charOffset": 44751, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 1202, + "startColumn": 24, + "charOffset": 44674, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, zone);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3bf3a7169a603dd0895de4cd8dc0e103e16baf88d6b626e310ecfd79e6c11191" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1215, + "startColumn": 66, + "charOffset": 45113, + "charLength": 4, + "snippet": { + "text": "zone" + } + }, + "contextRegion": { + "startLine": 1213, + "startColumn": 66, + "charOffset": 45045, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid EventCallback::zoneAfterCreatureLeave(std::shared_ptr zone, std::shared_ptr creature) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::zoneAfterCreatureLeave - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d3e37ffd320b29591e0491807914d0b1e463a2275836b6b39262a21a81c759f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1215, + "startColumn": 98, + "charOffset": 45145, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1213, + "startColumn": 98, + "charOffset": 45045, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid EventCallback::zoneAfterCreatureLeave(std::shared_ptr zone, std::shared_ptr creature) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::zoneAfterCreatureLeave - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20315f2767d140bf3b258384441304c48adac505dc6d894f4fe339ad13decb75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1216, + "startColumn": 7, + "charOffset": 45169, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 1214, + "startColumn": 7, + "charOffset": 45047, + "charLength": 18, + "snippet": { + "text": "\nvoid EventCallback::zoneAfterCreatureLeave(std::shared_ptr zone, std::shared_ptr creature) const {\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[EventCallback::zoneAfterCreatureLeave - \"\n\t\t \"Zone {} Creature {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2bad0d87a9af0878c7a82f2916d8661528092b7a63ec3f9cb34a33ba1405120" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1224, + "startColumn": 41, + "charOffset": 45514, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 1222, + "startColumn": 41, + "charOffset": 45470, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10f5aa1a8581f386f033dd56e836881d2652b8968fcdb03ce247ff64a219c241" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/event_callback.cpp", + "index": 3 + }, + "region": { + "startLine": 1228, + "startColumn": 24, + "charOffset": 45699, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 1226, + "startColumn": 24, + "charOffset": 45622, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, zone);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26237b543959043251632a004130912ee592f00d0fd9e1cf6b4e8fabc57b2de9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'callback' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/events_callbacks.cpp" + }, + "region": { + "startLine": 31, + "startColumn": 72, + "charOffset": 985, + "charLength": 8, + "snippet": { + "text": "callback" + } + }, + "contextRegion": { + "startLine": 29, + "startColumn": 72, + "charOffset": 911, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid EventsCallbacks::addCallback(const std::shared_ptr callback) {\n\tm_callbacks.push_back(callback);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7dc0f1b98b0817ce4245d4dd99b1c4ed25576d031e62886bb0ac68a132c965f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/events_callbacks.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 2, + "charOffset": 1314, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 2, + "charOffset": 1142, + "charLength": 3, + "snippet": { + "text": "std::vector> EventsCallbacks::getCallbacksByType(EventCallback_t type) const {\n\tstd::vector> eventCallbacks;\n\tfor (auto callback : getCallbacks()) {\n\t\tif (callback->getType() != type) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b6c4ce088b2c0a28294c5d86e6be9853944d826feb0e2762d3919cb33134ae4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/callbacks/events_callbacks.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 12, + "charOffset": 1324, + "charLength": 8, + "snippet": { + "text": "callback" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 12, + "charOffset": 1142, + "charLength": 8, + "snippet": { + "text": "std::vector> EventsCallbacks::getCallbacksByType(EventCallback_t type) const {\n\tstd::vector> eventCallbacks;\n\tfor (auto callback : getCallbacks()) {\n\t\tif (callback->getType() != type) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0397cdc9eba27ddc3524c000262494490f0e2854a72a242400ba218c07c58ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'playerSaySpell' has cognitive complexity of 38 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 28, + "charOffset": 831, + "charLength": 14, + "snippet": { + "text": "playerSaySpell" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 28, + "charOffset": 774, + "charLength": 14, + "snippet": { + "text": "Spells::~Spells() = default;\n\nTalkActionResult_t Spells::playerSaySpell(std::shared_ptr player, std::string &words) {\n\tauto maxOnline = g_configManager().getNumber(MAX_PLAYERS_PER_ACCOUNT, __FUNCTION__);\n\tauto tile = player->getTile();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0beeb9b34fbb607a89bf694189bc69268e12ff70e81e5896d762dcab5f0d3a2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 67, + "charOffset": 870, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 67, + "charOffset": 774, + "charLength": 6, + "snippet": { + "text": "Spells::~Spells() = default;\n\nTalkActionResult_t Spells::playerSaySpell(std::shared_ptr player, std::string &words) {\n\tauto maxOnline = g_configManager().getNumber(MAX_PLAYERS_PER_ACCOUNT, __FUNCTION__);\n\tauto tile = player->getTile();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1087053296b8722a1419a28f863e67b8ac241698458caa55996eebec2831c232" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 3, + "charOffset": 1351, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 3, + "charOffset": 1247, + "charLength": 3, + "snippet": { + "text": "\t\tauto accountPlayers = g_game().getPlayersByAccount(player->getAccount());\n\t\tint countOutsizePZ = 0;\n\t\tfor (const auto &accountPlayer : accountPlayers) {\n\t\t\tif (accountPlayer == player || accountPlayer->isOffline()) {\n\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89f1dba34b816bd5221135c8a68e2a9f4b5d345860dd0eeaac45cc5a35da60f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 58, + "startColumn": 6, + "charOffset": 2161, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 56, + "startColumn": 6, + "charOffset": 2075, + "charLength": 1, + "snippet": { + "text": "\n\tconst std::shared_ptr instantSpell = getInstantSpell(str_words);\n\tif (!instantSpell) {\n\t\treturn TALKACTION_CONTINUE;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "322203194a2d5871065dc0fb32fc9df1a232944c5853953950ae70323707e3f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 5, + "charOffset": 2625, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 5, + "charOffset": 2536, + "charLength": 2, + "snippet": { + "text": "\t\t\tif (loc1 != std::string::npos) {\n\t\t\t\tsize_t loc2 = paramText.find('\"', loc1 + 1);\n\t\t\t\tif (loc2 == std::string::npos) {\n\t\t\t\t\tloc2 = paramText.length();\n\t\t\t\t} else if (paramText.find_last_not_of(' ') != loc2) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c557c4728bc8cf9d50d869bbfb2fd5c7d629a69e63eb3ba072ba8cb6c81ca866" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'instant' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 117, + "startColumn": 74, + "charOffset": 3599, + "charLength": 7, + "snippet": { + "text": "instant" + } + }, + "contextRegion": { + "startLine": 115, + "startColumn": 74, + "charOffset": 3523, + "charLength": 7, + "snippet": { + "text": "}\n\nbool Spells::registerInstantLuaEvent(const std::shared_ptr instant) {\n\tif (instant) {\n\t\t// If the spell not have the \"spell:words()\" return a error message" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc3af683fb512d21ce1e8add5c56cc0502c1e81706c2a67c571d0ce5b3460a2d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'rune' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 141, + "startColumn": 68, + "charOffset": 4449, + "charLength": 4, + "snippet": { + "text": "rune" + } + }, + "contextRegion": { + "startLine": 139, + "startColumn": 68, + "charOffset": 4379, + "charLength": 4, + "snippet": { + "text": "}\n\nbool Spells::registerRuneLuaEvent(const std::shared_ptr rune) {\n\tif (rune) {\n\t\tuint16_t id = rune->getRuneItemId();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "17e86902f96e20e4f2f3d33f55b5399c988e9ec7caecd3527493ce5d59cec3ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 164, + "startColumn": 2, + "charOffset": 5001, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 162, + "startColumn": 2, + "charOffset": 4944, + "charLength": 3, + "snippet": { + "text": "\tstd::map::const_iterator vocSpellsIt;\n\n\tfor (const auto &it : instants) {\n\t\tvocSpells = it.second->getVocMap();\n\t\tvocSpellsIt = vocSpells.find(vocationId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0816872d2cbf82f20673a9a0326260815790817d296beb54c039224e164e48dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 179, + "startColumn": 6, + "charOffset": 5404, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 177, + "startColumn": 6, + "charOffset": 5268, + "charLength": 1, + "snippet": { + "text": "std::shared_ptr Spells::getSpellByName(const std::string &name) {\n\tstd::shared_ptr spell = getRuneSpellByName(name);\n\tif (!spell) {\n\t\tspell = getInstantSpellByName(name);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5548636b9977e49b7f56621a7c2710a0a3cd86e3254d469657329800becc5a32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 188, + "startColumn": 3, + "charOffset": 5592, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 186, + "startColumn": 3, + "charOffset": 5537, + "charLength": 3, + "snippet": { + "text": "\tauto it = runes.find(id);\n\tif (it == runes.end()) {\n\t\tfor (auto &rune : runes) {\n\t\t\tif (rune.second->getRuneItemId() == id) {\n\t\t\t\treturn rune.second;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a29ad592d9d177178705bcbd4ba4d33d3552e3eb6fe04d439329cef7efff232" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 199, + "startColumn": 2, + "charOffset": 5823, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 197, + "startColumn": 2, + "charOffset": 5740, + "charLength": 3, + "snippet": { + "text": "\nstd::shared_ptr Spells::getRuneSpellByName(const std::string &name) {\n\tfor (auto &it : runes) {\n\t\tif (strcasecmp(it.second->getName().c_str(), name.c_str()) == 0) {\n\t\t\treturn it.second;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e61a1d84b7b5c8a5fb4aae2a45a78782603f91d739af518ebcc995abd8834bf9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 210, + "startColumn": 2, + "charOffset": 6098, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 208, + "startColumn": 2, + "charOffset": 6047, + "charLength": 3, + "snippet": { + "text": "\tstd::shared_ptr result = nullptr;\n\n\tfor (auto &it : instants) {\n\t\tconst std::string &instantSpellWords = it.second->getWords();\n\t\tsize_t spellLen = instantSpellWords.length();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a83e6c6e584b2b039dad5b1f00e8e2c3c47d8fc8c892be6bd4dfedc2e98495cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 214, + "startColumn": 8, + "charOffset": 6323, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 8, + "charOffset": 6190, + "charLength": 1, + "snippet": { + "text": "\t\tsize_t spellLen = instantSpellWords.length();\n\t\tif (strncasecmp(instantSpellWords.c_str(), words.c_str(), spellLen) == 0) {\n\t\t\tif (!result || spellLen > result->getWords().length()) {\n\t\t\t\tresult = it.second;\n\t\t\t\tif (words.length() == spellLen) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbf825250df9a5db03fbb4a0e1f6687e2906e5730ebb0b63478e06d72ca9ef42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 2, + "charOffset": 6933, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 2, + "charOffset": 6853, + "charLength": 3, + "snippet": { + "text": "\nstd::shared_ptr Spells::getInstantSpellById(uint16_t spellId) {\n\tfor (auto &it : instants) {\n\t\tif (it.second->getSpellId() == spellId) {\n\t\t\treturn it.second;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93a2a856f6d216951e6748fe53e7d1748e661a5f49e95b2b71370c962c2c5eb0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 251, + "startColumn": 2, + "charOffset": 7141, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 249, + "startColumn": 2, + "charOffset": 7052, + "charLength": 3, + "snippet": { + "text": "\nstd::shared_ptr Spells::getInstantSpellByName(const std::string &name) {\n\tfor (auto &it : instants) {\n\t\tif (strcasecmp(it.second->getName().c_str(), name.c_str()) == 0) {\n\t\t\treturn it.second;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ff44189793bb88cf0515ab284da1601f80ac169c770faea32b580484ae96d226" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 259, + "startColumn": 62, + "charOffset": 7347, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 257, + "startColumn": 62, + "charOffset": 7283, + "charLength": 8, + "snippet": { + "text": "}\n\nPosition Spells::getCasterPosition(std::shared_ptr creature, Direction dir) {\n\treturn getNextPosition(dir, creature->getPosition());\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c0c790012f32870e82f1296c58965bcb8dbfb7bab2e9e9ff9b51054a5cf5bee2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'newCombat' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 263, + "startColumn": 56, + "charOffset": 7487, + "charLength": 9, + "snippet": { + "text": "newCombat" + } + }, + "contextRegion": { + "startLine": 261, + "startColumn": 56, + "charOffset": 7429, + "charLength": 9, + "snippet": { + "text": "}\n\nCombatSpell::CombatSpell(const std::shared_ptr newCombat, bool newNeedTarget, bool newNeedDirection) :\n\tScript(&g_spells().getScriptInterface()),\n\tm_combat(newCombat)," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9042a7bdf576e8a00d6720c6536fe4c7db78e96e0ebda2bcf4ffc0b1874fc479" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 298, + "startColumn": 6, + "charOffset": 8366, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 296, + "startColumn": 6, + "charOffset": 8332, + "charLength": 1, + "snippet": { + "text": "\n\tauto combat = getCombat();\n\tif (!combat) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a023f9b8414614adba9e71a3c9d3ad617868ef3ed56754e9a117c181306a9b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 303, + "startColumn": 11, + "charOffset": 8457, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 301, + "startColumn": 11, + "charOffset": 8396, + "charLength": 8, + "snippet": { + "text": "\n\tif (soundCastEffect != SoundEffect_t::SILENCE) {\n\t\tcombat->setParam(COMBAT_PARAM_CASTSOUND, static_cast(soundCastEffect));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13f4493ccc565e71cc3b07769647162cc71c690c64830bf67768e9c209ec0e0a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 307, + "startColumn": 11, + "charOffset": 8597, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 305, + "startColumn": 11, + "charOffset": 8534, + "charLength": 8, + "snippet": { + "text": "\n\tif (soundImpactEffect != SoundEffect_t::SILENCE) {\n\t\tcombat->setParam(COMBAT_PARAM_IMPACTSOUND, static_cast(soundImpactEffect));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a80797a2bf00cbc013a01c6f9319cfdbf8fa13da2706b29b17c7dc92aca43e59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 310, + "startColumn": 10, + "charOffset": 8688, + "charLength": 8, + "snippet": { + "text": "doCombat" + } + }, + "contextRegion": { + "startLine": 308, + "startColumn": 10, + "charOffset": 8675, + "charLength": 8, + "snippet": { + "text": "\t}\n\n\tcombat->doCombat(creature, pos);\n\treturn true;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b651b02a8265f0de9513f89776a32c9b6e8a91e65c7a3c9f80da63b06830703" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 316, + "startColumn": 6, + "charOffset": 8863, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 314, + "startColumn": 6, + "charOffset": 8730, + "charLength": 1, + "snippet": { + "text": "bool CombatSpell::castSpell(std::shared_ptr creature, std::shared_ptr target) {\n\tauto combat = getCombat();\n\tif (!combat) {\n\t\treturn false;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1deb5925a5711f3ad8a41323f03dd4ee4959e0484afd8601b21a0ec377210ec9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 341, + "startColumn": 11, + "charOffset": 9406, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 339, + "startColumn": 11, + "charOffset": 9345, + "charLength": 8, + "snippet": { + "text": "\n\tif (soundCastEffect != SoundEffect_t::SILENCE) {\n\t\tcombat->setParam(COMBAT_PARAM_CASTSOUND, static_cast(soundCastEffect));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "feb5db787c1d08223f04ac315d3b69692dfa1a8c4ae13ee4c6336b06dae06d8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 345, + "startColumn": 11, + "charOffset": 9546, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 343, + "startColumn": 11, + "charOffset": 9483, + "charLength": 8, + "snippet": { + "text": "\n\tif (soundImpactEffect != SoundEffect_t::SILENCE) {\n\t\tcombat->setParam(COMBAT_PARAM_IMPACTSOUND, static_cast(soundImpactEffect));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "484ccd0714e97f35f4a928e4b0a640370e0f862d386201f266408c6c2b9f4572" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 350, + "startColumn": 12, + "charOffset": 9685, + "charLength": 8, + "snippet": { + "text": "doCombat" + } + }, + "contextRegion": { + "startLine": 348, + "startColumn": 12, + "charOffset": 9628, + "charLength": 8, + "snippet": { + "text": "\tif (combat->hasArea()) {\n\t\tif (needTarget) {\n\t\t\tcombat->doCombat(creature, target->getPosition());\n\t\t} else {\n\t\t\treturn castSpell(creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eec23489a2f87a6baa08d892961fc4e7a725bbf908c67004d461abff1532fb98" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 355, + "startColumn": 11, + "charOffset": 9794, + "charLength": 8, + "snippet": { + "text": "doCombat" + } + }, + "contextRegion": { + "startLine": 353, + "startColumn": 11, + "charOffset": 9770, + "charLength": 8, + "snippet": { + "text": "\t\t}\n\t} else {\n\t\tcombat->doCombat(creature, target);\n\t}\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e9d5115a3e01b7e048a9f9dfa4aaa89e3d6d8049921566665857ed70e27fdd8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 360, + "startColumn": 62, + "charOffset": 9903, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 358, + "startColumn": 62, + "charOffset": 9839, + "charLength": 8, + "snippet": { + "text": "}\n\nbool CombatSpell::executeCastSpell(std::shared_ptr creature, const LuaVariant &var) const {\n\t// onCastSpell(creature, var)\n\tif (!getScriptInterface()->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a113ce360a710fc0a65d66fea9aa65f2b8c4a800c8129bd9682a92289c42912" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 362, + "startColumn": 7, + "charOffset": 9981, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 360, + "startColumn": 7, + "charOffset": 9842, + "charLength": 18, + "snippet": { + "text": "bool CombatSpell::executeCastSpell(std::shared_ptr creature, const LuaVariant &var) const {\n\t// onCastSpell(creature, var)\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[CombatSpell::executeCastSpell - Creature {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70037863717fecef093eb98eb9894a6ee93aea6b575fb45d143f3ab0c6db8acc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 369, + "startColumn": 27, + "charOffset": 10263, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 367, + "startColumn": 27, + "charOffset": 10233, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\n\tenv->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "789d1c1120bc45bd08349172b6f410d76070d64562d314ab9b9d5142f8095601" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 374, + "startColumn": 24, + "charOffset": 10435, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 372, + "startColumn": 24, + "charOffset": 10358, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = getScriptInterface()->getLuaState();\n\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fdb560df74c1d60d73c3300996ce29c6cfa76b9f65d75ecebc0373672ec881b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'playerSpellCheck' has cognitive complexity of 34 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 384, + "startColumn": 13, + "charOffset": 10689, + "charLength": 16, + "snippet": { + "text": "playerSpellCheck" + } + }, + "contextRegion": { + "startLine": 382, + "startColumn": 13, + "charOffset": 10674, + "charLength": 16, + "snippet": { + "text": "}\n\nbool Spell::playerSpellCheck(std::shared_ptr player) const {\n\tif (player->hasFlag(PlayerFlags_t::CannotUseSpells)) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d02ae1b4629a7077c0a1709b18f262f7986aa176bf70bcaa0c97689871cbe3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 384, + "startColumn": 54, + "charOffset": 10730, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 382, + "startColumn": 54, + "charOffset": 10674, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Spell::playerSpellCheck(std::shared_ptr player) const {\n\tif (player->hasFlag(PlayerFlags_t::CannotUseSpells)) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5858cfb81bc8b92c24797e12f4c48eaab4878bd568a230a70abb8b821edae69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 402, + "startColumn": 48, + "charOffset": 11112, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 400, + "startColumn": 48, + "charOffset": 11061, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (aggressive && (range < 1 || (range > 0 && !player->getAttackedCreature())) && player->getSkull() == SKULL_BLACK) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0fe09955a565dbb252a1b858e2155c301f5a82fddec2dace1818eeab6d106b89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 452, + "startColumn": 2, + "charOffset": 12923, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 450, + "startColumn": 2, + "charOffset": 12918, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tif (isInstant() && getNeedLearn()) {\n\t\tif (!player->hasLearnedInstantSpell(getName())) {\n\t\t\tplayer->sendCancelMessage(RETURNVALUE_YOUNEEDTOLEARNTHISSPELL);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6a197cb80fd6a8197c77c14de07ab08e37ce8804a6fc7aa06ea6abc64bc79e3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 467, + "startColumn": 4, + "charOffset": 13541, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 465, + "startColumn": 4, + "charOffset": 13479, + "charLength": 4, + "snippet": { + "text": "\t\tswitch (player->getWeaponType()) {\n\t\t\tcase WEAPON_SWORD:\n\t\t\tcase WEAPON_CLUB:\n\t\t\tcase WEAPON_AXE:\n\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fcc07b833b7f6b91b40fffc7843dc102e5e66ffd435823d84ccdff3161d079c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 468, + "startColumn": 4, + "charOffset": 13562, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 466, + "startColumn": 4, + "charOffset": 13516, + "charLength": 4, + "snippet": { + "text": "\t\t\tcase WEAPON_SWORD:\n\t\t\tcase WEAPON_CLUB:\n\t\t\tcase WEAPON_AXE:\n\t\t\t\tbreak;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f85b70f07dc556274471ebb195cacd49d609267778c9668aab32260bed83781" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 471, + "startColumn": 4, + "charOffset": 13594, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 469, + "startColumn": 4, + "charOffset": 13579, + "charLength": 7, + "snippet": { + "text": "\t\t\t\tbreak;\n\n\t\t\tdefault: {\n\t\t\t\tplayer->sendCancelMessage(RETURNVALUE_YOUNEEDAWEAPONTOUSETHISSPELL);\n\t\t\t\tg_game().addMagicEffect(player->getPosition(), CONST_ME_POFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54c3e357f06f53c84400b7c8256db3f3fd1bebafdb83e57329865d71e2f67e51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 488, + "startColumn": 61, + "charOffset": 14046, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 486, + "startColumn": 61, + "charOffset": 13983, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Spell::playerInstantSpellCheck(std::shared_ptr player, const Position &toPos) const {\n\tif (toPos.x == 0xFFFF) {\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81fcfff1aa6b21996d2f53cfed7eab345c7f0992fa106c9f2cafa959218828b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 489, + "startColumn": 17, + "charOffset": 14101, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 487, + "startColumn": 17, + "charOffset": 13985, + "charLength": 6, + "snippet": { + "text": "\nbool Spell::playerInstantSpellCheck(std::shared_ptr player, const Position &toPos) const {\n\tif (toPos.x == 0xFFFF) {\n\t\treturn true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f6d92f345655031220c2ae343c6bb7916d6e1d588eee896f37bb2ccb170e497" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 494, + "startColumn": 2, + "charOffset": 14183, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 492, + "startColumn": 2, + "charOffset": 14129, + "charLength": 2, + "snippet": { + "text": "\n\tconst Position &playerPos = player->getPosition();\n\tif (playerPos.z > toPos.z) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_FIRSTGOUPSTAIRS);\n\t\tg_game().addMagicEffect(player->getPosition(), CONST_ME_POFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3083a50452ab3e0150ac748ae1d66fabae71a6939c7ebfc3d9a43e3326d22df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 498, + "startColumn": 4, + "charOffset": 14354, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 496, + "startColumn": 4, + "charOffset": 14270, + "charLength": 4, + "snippet": { + "text": "\t\tg_game().addMagicEffect(player->getPosition(), CONST_ME_POFF);\n\t\treturn false;\n\t} else if (playerPos.z < toPos.z) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_FIRSTGODOWNSTAIRS);\n\t\tg_game().addMagicEffect(player->getPosition(), CONST_ME_POFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d7dfe566718e3ac5309ed89e954867b2b7ec97a0cf82e419060cb827da796fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 528, + "startColumn": 58, + "charOffset": 15305, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 526, + "startColumn": 58, + "charOffset": 15245, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Spell::playerRuneSpellCheck(std::shared_ptr player, const Position &toPos) {\n\tif (!playerSpellCheck(player)) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f93fb27a44ebeb1bf9e4db48f0c0426522ea86196b5185927ce25aad77f5a9ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 533, + "startColumn": 17, + "charOffset": 15408, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 531, + "startColumn": 17, + "charOffset": 15388, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tif (toPos.x == 0xFFFF) {\n\t\treturn true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "873a2cab7b0043b44da3cbaa1b7c3b55952d148733d48cd893754fea208c4a42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 538, + "startColumn": 2, + "charOffset": 15490, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 536, + "startColumn": 2, + "charOffset": 15436, + "charLength": 2, + "snippet": { + "text": "\n\tconst Position &playerPos = player->getPosition();\n\tif (playerPos.z > toPos.z) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_FIRSTGOUPSTAIRS);\n\t\tg_game().addMagicEffect(player->getPosition(), CONST_ME_POFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1cebc8369a1274b58afdb971e9c32303edf58411ab8aab505585cd85f26e8f68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 542, + "startColumn": 4, + "charOffset": 15661, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 540, + "startColumn": 4, + "charOffset": 15577, + "charLength": 4, + "snippet": { + "text": "\t\tg_game().addMagicEffect(player->getPosition(), CONST_ME_POFF);\n\t\treturn false;\n\t} else if (playerPos.z < toPos.z) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_FIRSTGODOWNSTAIRS);\n\t\tg_game().addMagicEffect(player->getPosition(), CONST_ME_POFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10cbe3d089112fb741d57c094aa029af4e4d23892863a69c68825ab5b7c163e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 549, + "startColumn": 6, + "charOffset": 15904, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 547, + "startColumn": 6, + "charOffset": 15839, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr tile = g_game().map.getTile(toPos);\n\tif (!tile) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);\n\t\tg_game().addMagicEffect(player->getPosition(), CONST_ME_POFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55f534e82d3d968b622cdefb2adaf70f3f0427439c0d16dd269b8f22f031cebd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 569, + "startColumn": 2, + "charOffset": 16632, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 567, + "startColumn": 2, + "charOffset": 16536, + "charLength": 2, + "snippet": { + "text": "\n\tconst std::shared_ptr topVisibleCreature = tile->getBottomVisibleCreature(player);\n\tif (blockingCreature && topVisibleCreature) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTENOUGHROOM);\n\t\tg_game().addMagicEffect(player->getPosition(), CONST_ME_POFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69684c9d1c4d91bb48991b6dd7cf00802478bbb302c62dc63abb4fa2169c32c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 569, + "startColumn": 46, + "charOffset": 16676, + "charLength": 1, + "snippet": { + "text": "{" + } + }, + "contextRegion": { + "startLine": 567, + "startColumn": 46, + "charOffset": 16536, + "charLength": 1, + "snippet": { + "text": "\n\tconst std::shared_ptr topVisibleCreature = tile->getBottomVisibleCreature(player);\n\tif (blockingCreature && topVisibleCreature) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTENOUGHROOM);\n\t\tg_game().addMagicEffect(player->getPosition(), CONST_ME_POFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "910a10a3f1a51605cf323b8f0698778b727e92963eca14612e9b0cb06e32535f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 573, + "startColumn": 4, + "charOffset": 16818, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 571, + "startColumn": 4, + "charOffset": 16734, + "charLength": 4, + "snippet": { + "text": "\t\tg_game().addMagicEffect(player->getPosition(), CONST_ME_POFF);\n\t\treturn false;\n\t} else if (blockingSolid && tile->hasFlag(TILESTATE_BLOCKSOLID) && !topVisibleCreature) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTENOUGHROOM);\n\t\tg_game().addMagicEffect(player->getPosition(), CONST_ME_POFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47b89c36d9f3b7bd441938a70970a9cadb4e28685ea1f632bfb43d943f089acc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 573, + "startColumn": 69, + "charOffset": 16883, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 571, + "startColumn": 69, + "charOffset": 16734, + "charLength": 1, + "snippet": { + "text": "\t\tg_game().addMagicEffect(player->getPosition(), CONST_ME_POFF);\n\t\treturn false;\n\t} else if (blockingSolid && tile->hasFlag(TILESTATE_BLOCKSOLID) && !topVisibleCreature) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTENOUGHROOM);\n\t\tg_game().addMagicEffect(player->getPosition(), CONST_ME_POFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1fae1002399b855286e6b216a6cb2495744304b3e090db6ba1dce3a6310a537" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 579, + "startColumn": 20, + "charOffset": 17066, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 577, + "startColumn": 20, + "charOffset": 17043, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (needTarget && !topVisibleCreature) {\n\t\tplayer->sendCancelMessage(RETURNVALUE_CANONLYUSETHISRUNEONCREATURES);\n\t\tg_game().addMagicEffect(player->getPosition(), CONST_ME_POFF);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cfce9db9ce09d1f6f65baa1bcf509d7449a24d49b50404e677c9c66f32a88409" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 623, + "startColumn": 3, + "charOffset": 18596, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 621, + "startColumn": 3, + "charOffset": 18485, + "charLength": 2, + "snippet": { + "text": "void Spell::setWheelOfDestinyBoost(WheelSpellBoost_t boost, WheelSpellGrade_t grade, int32_t value) {\n\ttry {\n\t\tif (grade == WheelSpellGrade_t::REGULAR) {\n\t\t\twheelOfDestinyRegularBoost.at(static_cast(boost)) = value;\n\t\t} else if (grade == WheelSpellGrade_t::UPGRADED) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42fb11f299c81bfa8104b56677edde3d886981004079e402bfbae9ccbef60255" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'getCombatDataAugment' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 633, + "startColumn": 13, + "charOffset": 18985, + "charLength": 20, + "snippet": { + "text": "getCombatDataAugment" + } + }, + "contextRegion": { + "startLine": 631, + "startColumn": 13, + "charOffset": 18970, + "charLength": 20, + "snippet": { + "text": "}\n\nvoid Spell::getCombatDataAugment(std::shared_ptr player, CombatDamage &damage) {\n\tif (!(damage.instantSpellName).empty()) {\n\t\tconst auto equippedAugmentItems = player->getEquippedAugmentItems();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb412ddfc62c7f0c5daf46f2b60bc90e207d4ed9a38b43211a060919bcbad06d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'getCombatDataAugment' has cognitive complexity of 31 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 633, + "startColumn": 13, + "charOffset": 18985, + "charLength": 20, + "snippet": { + "text": "getCombatDataAugment" + } + }, + "contextRegion": { + "startLine": 631, + "startColumn": 13, + "charOffset": 18970, + "charLength": 20, + "snippet": { + "text": "}\n\nvoid Spell::getCombatDataAugment(std::shared_ptr player, CombatDamage &damage) {\n\tif (!(damage.instantSpellName).empty()) {\n\t\tconst auto equippedAugmentItems = player->getEquippedAugmentItems();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7925546eacd74b52411e2ca91b90089bbdccdd0587800aa48d0252f0e1d70134" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 633, + "startColumn": 58, + "charOffset": 19030, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 631, + "startColumn": 58, + "charOffset": 18970, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Spell::getCombatDataAugment(std::shared_ptr player, CombatDamage &damage) {\n\tif (!(damage.instantSpellName).empty()) {\n\t\tconst auto equippedAugmentItems = player->getEquippedAugmentItems();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88bd8568387803a0a9c20003722493194cbf419fbc72f1dd66205ce6affbf2f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 638, + "startColumn": 4, + "charOffset": 19309, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 636, + "startColumn": 4, + "charOffset": 19176, + "charLength": 3, + "snippet": { + "text": "\t\tfor (const auto &item : equippedAugmentItems) {\n\t\t\tconst auto augments = item->getAugmentsBySpellName(damage.instantSpellName);\n\t\t\tfor (auto &augment : augments) {\n\t\t\t\tif (augment->value == 0) {\n\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe71b647af2613aaddeae60c3e4a7ad1fdfac97c2d73aa1af6087345c5308517" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &augment' can be declared as 'const auto &augment'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 638, + "startColumn": 9, + "charOffset": 19314, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 636, + "startColumn": 9, + "charOffset": 19176, + "charLength": 4, + "snippet": { + "text": "\t\tfor (const auto &item : equippedAugmentItems) {\n\t\t\tconst auto augments = item->getAugmentsBySpellName(damage.instantSpellName);\n\t\t\tfor (auto &augment : augments) {\n\t\t\t\tif (augment->value == 0) {\n\t\t\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4af5a8ea2f1e23b374bdb949f91780569615b0b27680f698f25c115a1965e5da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 642, + "startColumn": 5, + "charOffset": 19398, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 640, + "startColumn": 5, + "charOffset": 19373, + "charLength": 2, + "snippet": { + "text": "\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (augment->type == Augment_t::IncreasedDamage || augment->type == Augment_t::PowerfulImpact || augment->type == Augment_t::StrongImpact) {\n\t\t\t\t\tconst float augmentPercent = augment->value / 100.0;\n\t\t\t\t\tdamage.primary.value += static_cast(damage.primary.value * augmentPercent);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc6f23eaf5074784546d96e1104b9ea056ca36e0706e76473dbdbc297d916ea3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'double' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 643, + "startColumn": 35, + "charOffset": 19573, + "charLength": 7, + "snippet": { + "text": "augment" + } + }, + "contextRegion": { + "startLine": 641, + "startColumn": 35, + "charOffset": 19388, + "charLength": 7, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t\tif (augment->type == Augment_t::IncreasedDamage || augment->type == Augment_t::PowerfulImpact || augment->type == Augment_t::StrongImpact) {\n\t\t\t\t\tconst float augmentPercent = augment->value / 100.0;\n\t\t\t\t\tdamage.primary.value += static_cast(damage.primary.value * augmentPercent);\n\t\t\t\t\tdamage.secondary.value += static_cast(damage.secondary.value * augmentPercent);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b09c8b462bccb784a83c40ce3ef44e185c31e03dfea00f3329da78ab549079f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 643, + "startColumn": 35, + "charOffset": 19573, + "charLength": 7, + "snippet": { + "text": "augment" + } + }, + "contextRegion": { + "startLine": 641, + "startColumn": 35, + "charOffset": 19388, + "charLength": 7, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t\tif (augment->type == Augment_t::IncreasedDamage || augment->type == Augment_t::PowerfulImpact || augment->type == Augment_t::StrongImpact) {\n\t\t\t\t\tconst float augmentPercent = augment->value / 100.0;\n\t\t\t\t\tdamage.primary.value += static_cast(damage.primary.value * augmentPercent);\n\t\t\t\t\tdamage.secondary.value += static_cast(damage.secondary.value * augmentPercent);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "527fa6954911307c47f385f8bbc1db0078bd2e36442359bd05515a8aa8551ff1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 643, + "startColumn": 35, + "charOffset": 19573, + "charLength": 7, + "snippet": { + "text": "augment" + } + }, + "contextRegion": { + "startLine": 641, + "startColumn": 35, + "charOffset": 19388, + "charLength": 7, + "snippet": { + "text": "\t\t\t\t}\n\t\t\t\tif (augment->type == Augment_t::IncreasedDamage || augment->type == Augment_t::PowerfulImpact || augment->type == Augment_t::StrongImpact) {\n\t\t\t\t\tconst float augmentPercent = augment->value / 100.0;\n\t\t\t\t\tdamage.primary.value += static_cast(damage.primary.value * augmentPercent);\n\t\t\t\t\tdamage.secondary.value += static_cast(damage.secondary.value * augmentPercent);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d6f35bdbdb5e630282288fe1f0cff0f9e431a8ee2657d9a7ba5c1ce1441265c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 644, + "startColumn": 51, + "charOffset": 19647, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 642, + "startColumn": 51, + "charOffset": 19394, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tif (augment->type == Augment_t::IncreasedDamage || augment->type == Augment_t::PowerfulImpact || augment->type == Augment_t::StrongImpact) {\n\t\t\t\t\tconst float augmentPercent = augment->value / 100.0;\n\t\t\t\t\tdamage.primary.value += static_cast(damage.primary.value * augmentPercent);\n\t\t\t\t\tdamage.secondary.value += static_cast(damage.secondary.value * augmentPercent);\n\t\t\t\t} else if (augment->type != Augment_t::Cooldown) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "83d3c1fad870e70f472a5b3e20e698d658a22269314327d164a326997d38a1a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 644, + "startColumn": 51, + "charOffset": 19647, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 642, + "startColumn": 51, + "charOffset": 19394, + "charLength": 6, + "snippet": { + "text": "\t\t\t\tif (augment->type == Augment_t::IncreasedDamage || augment->type == Augment_t::PowerfulImpact || augment->type == Augment_t::StrongImpact) {\n\t\t\t\t\tconst float augmentPercent = augment->value / 100.0;\n\t\t\t\t\tdamage.primary.value += static_cast(damage.primary.value * augmentPercent);\n\t\t\t\t\tdamage.secondary.value += static_cast(damage.secondary.value * augmentPercent);\n\t\t\t\t} else if (augment->type != Augment_t::Cooldown) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16d708b519f72a5804b77f3cbf1f6b8ce170bf74bc740e7feaf7530400f45d3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 645, + "startColumn": 53, + "charOffset": 19739, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 643, + "startColumn": 53, + "charOffset": 19539, + "charLength": 6, + "snippet": { + "text": "\t\t\t\t\tconst float augmentPercent = augment->value / 100.0;\n\t\t\t\t\tdamage.primary.value += static_cast(damage.primary.value * augmentPercent);\n\t\t\t\t\tdamage.secondary.value += static_cast(damage.secondary.value * augmentPercent);\n\t\t\t\t} else if (augment->type != Augment_t::Cooldown) {\n\t\t\t\t\tconst int32_t augmentValue = augment->value * 100;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e331153fe2f7898fa38d02cca3ee21059a178525fbc432e48c826be17b4e9da6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 645, + "startColumn": 53, + "charOffset": 19739, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 643, + "startColumn": 53, + "charOffset": 19539, + "charLength": 6, + "snippet": { + "text": "\t\t\t\t\tconst float augmentPercent = augment->value / 100.0;\n\t\t\t\t\tdamage.primary.value += static_cast(damage.primary.value * augmentPercent);\n\t\t\t\t\tdamage.secondary.value += static_cast(damage.secondary.value * augmentPercent);\n\t\t\t\t} else if (augment->type != Augment_t::Cooldown) {\n\t\t\t\t\tconst int32_t augmentValue = augment->value * 100;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8386e06a2f0560301ff3844c4582e85746fb40cf55da2a79ebfe982b655458f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-empty-decl-or-stmt", + "ruleIndex": 331, + "kind": "fail", + "level": "warning", + "message": { + "text": "Empty declaration" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 655, + "startColumn": 2, + "charOffset": 20175, + "charLength": 1, + "snippet": { + "text": ";" + } + }, + "contextRegion": { + "startLine": 653, + "startColumn": 2, + "charOffset": 20167, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\t}\n};\n\nint32_t Spell::calculateAugmentSpellCooldownReduction(std::shared_ptr player) const {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b083e0bc5d024aaf738c266a8723dfd56bf6937f7e79ade13f505035091ae175" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 657, + "startColumn": 79, + "charOffset": 20256, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 655, + "startColumn": 79, + "charOffset": 20174, + "charLength": 6, + "snippet": { + "text": "};\n\nint32_t Spell::calculateAugmentSpellCooldownReduction(std::shared_ptr player) const {\n\tint32_t spellCooldown = 0;\n\tconst auto equippedAugmentItems = player->getEquippedAugmentItemsByType(Augment_t::Cooldown);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0aaa79fff4fe1940075cd9fb0c71d503db05374233a18f74a03f084f32152dcd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 662, + "startColumn": 3, + "charOffset": 20539, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 660, + "startColumn": 3, + "charOffset": 20395, + "charLength": 3, + "snippet": { + "text": "\tfor (const auto &item : equippedAugmentItems) {\n\t\tconst auto augments = item->getAugmentsBySpellNameAndType(getName(), Augment_t::Cooldown);\n\t\tfor (auto &augment : augments) {\n\t\t\tspellCooldown += augment->value;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "06b4fe823d92d2e409c973718f9b71559bd35e764e092187d2a28a72cbedd2e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &augment' can be declared as 'const auto &augment'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 662, + "startColumn": 8, + "charOffset": 20544, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 660, + "startColumn": 8, + "charOffset": 20395, + "charLength": 4, + "snippet": { + "text": "\tfor (const auto &item : equippedAugmentItems) {\n\t\tconst auto augments = item->getAugmentsBySpellNameAndType(getName(), Augment_t::Cooldown);\n\t\tfor (auto &augment : augments) {\n\t\t\tspellCooldown += augment->value;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a8b54d098a18978d51061b6dce55923d92b7484cdaa492631f0f26470ebdc54b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 670, + "startColumn": 61, + "charOffset": 20702, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 668, + "startColumn": 61, + "charOffset": 20639, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Spell::applyCooldownConditions(std::shared_ptr player) const {\n\tWheelSpellGrade_t spellGrade = player->wheel()->getSpellUpgrade(getName());\n\tbool isUpgraded = getWheelOfDestinyUpgraded() && static_cast(spellGrade) > 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81fcfff1aa6b21996d2f53cfed7eab345c7f0992fa106c9f2cafa959218828b7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 676, + "startColumn": 18, + "charOffset": 21100, + "charLength": 3, + "snippet": { + "text": "0.1" + } + }, + "contextRegion": { + "startLine": 674, + "startColumn": 18, + "charOffset": 20928, + "charLength": 3, + "snippet": { + "text": "\tauto rateCooldown = g_configManager().getFloat(RATE_SPELL_COOLDOWN, __FUNCTION__);\n\tif (std::abs(rateCooldown) < std::numeric_limits::epsilon()) {\n\t\trateCooldown = 0.1; // Safe minimum value\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "906d9787de7216a5d07819fb7d4d94a975b23f7f8729feb70dd812e8d9d0aec3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0.1 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 676, + "startColumn": 18, + "charOffset": 21100, + "charLength": 3, + "snippet": { + "text": "0.1" + } + }, + "contextRegion": { + "startLine": 674, + "startColumn": 18, + "charOffset": 20928, + "charLength": 3, + "snippet": { + "text": "\tauto rateCooldown = g_configManager().getFloat(RATE_SPELL_COOLDOWN, __FUNCTION__);\n\tif (std::abs(rateCooldown) < std::numeric_limits::epsilon()) {\n\t\trateCooldown = 0.1; // Safe minimum value\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0d817d9205bed56f16abb32eb8b5b48a5d841c6f1b22d59953fdd8860488b0d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 680, + "startColumn": 27, + "charOffset": 21178, + "charLength": 8, + "snippet": { + "text": "cooldown" + } + }, + "contextRegion": { + "startLine": 678, + "startColumn": 27, + "charOffset": 21130, + "charLength": 8, + "snippet": { + "text": "\n\tif (cooldown > 0) {\n\t\tint32_t spellCooldown = cooldown;\n\t\tif (isUpgraded) {\n\t\t\tspellCooldown -= getWheelOfDestinyBoost(WheelSpellBoost_t::COOLDOWN, spellGrade);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d77cd18413e985111e8a623ad850df920a183e18a8db214a4ca3baf4c325bb40" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 689, + "startColumn": 116, + "charOffset": 21868, + "charLength": 13, + "snippet": { + "text": "spellCooldown" + } + }, + "contextRegion": { + "startLine": 687, + "startColumn": 116, + "charOffset": 21681, + "charLength": 13, + "snippet": { + "text": "\t\tspellCooldown -= augmentCooldownReduction;\n\t\tif (spellCooldown > 0) {\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLCOOLDOWN, spellCooldown / rateCooldown, 0, false, m_spellId);\n\t\t\tplayer->addCondition(condition);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "533fd803c39f6440363533401a9170ecef7264627c5b22ab62b346364a3a25af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 689, + "startColumn": 116, + "charOffset": 21868, + "charLength": 13, + "snippet": { + "text": "spellCooldown" + } + }, + "contextRegion": { + "startLine": 687, + "startColumn": 116, + "charOffset": 21681, + "charLength": 13, + "snippet": { + "text": "\t\tspellCooldown -= augmentCooldownReduction;\n\t\tif (spellCooldown > 0) {\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLCOOLDOWN, spellCooldown / rateCooldown, 0, false, m_spellId);\n\t\t\tplayer->addCondition(condition);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1cab27be52648eeca62def9b64201fe801b76e6f1a5e7826a111e5304254c7eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 689, + "startColumn": 116, + "charOffset": 21868, + "charLength": 13, + "snippet": { + "text": "spellCooldown" + } + }, + "contextRegion": { + "startLine": 687, + "startColumn": 116, + "charOffset": 21681, + "charLength": 13, + "snippet": { + "text": "\t\tspellCooldown -= augmentCooldownReduction;\n\t\tif (spellCooldown > 0) {\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLCOOLDOWN, spellCooldown / rateCooldown, 0, false, m_spellId);\n\t\t\tplayer->addCondition(condition);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "591b74db434d36b83cb8e03391056ab816463f6bdad6264aa2dc8daad8d587d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 690, + "startColumn": 12, + "charOffset": 21931, + "charLength": 12, + "snippet": { + "text": "addCondition" + } + }, + "contextRegion": { + "startLine": 688, + "startColumn": 12, + "charOffset": 21726, + "charLength": 12, + "snippet": { + "text": "\t\tif (spellCooldown > 0) {\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLCOOLDOWN, spellCooldown / rateCooldown, 0, false, m_spellId);\n\t\t\tplayer->addCondition(condition);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3712cd701b16e79442f74ca0357a749b3f04d4ce18e3981d1019926e7fa6652b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 695, + "startColumn": 32, + "charOffset": 22021, + "charLength": 13, + "snippet": { + "text": "groupCooldown" + } + }, + "contextRegion": { + "startLine": 693, + "startColumn": 32, + "charOffset": 21963, + "charLength": 13, + "snippet": { + "text": "\n\tif (groupCooldown > 0) {\n\t\tint32_t spellGroupCooldown = groupCooldown;\n\t\tif (isUpgraded) {\n\t\t\tspellGroupCooldown -= getWheelOfDestinyBoost(WheelSpellBoost_t::GROUP_COOLDOWN, spellGrade);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c64cfc198cc9614f77e9e178eeba5a45d8a39be8f02a5feadb94b7c1e150614" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 700, + "startColumn": 121, + "charOffset": 22308, + "charLength": 18, + "snippet": { + "text": "spellGroupCooldown" + } + }, + "contextRegion": { + "startLine": 698, + "startColumn": 121, + "charOffset": 22152, + "charLength": 18, + "snippet": { + "text": "\t\t}\n\t\tif (spellGroupCooldown > 0) {\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLGROUPCOOLDOWN, spellGroupCooldown / rateCooldown, 0, false, group);\n\t\t\tplayer->addCondition(condition);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00d678f5dea1555469414be5cbb34ddda6b6fa83ce26c7fabcdcf87825fa551a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 700, + "startColumn": 121, + "charOffset": 22308, + "charLength": 18, + "snippet": { + "text": "spellGroupCooldown" + } + }, + "contextRegion": { + "startLine": 698, + "startColumn": 121, + "charOffset": 22152, + "charLength": 18, + "snippet": { + "text": "\t\t}\n\t\tif (spellGroupCooldown > 0) {\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLGROUPCOOLDOWN, spellGroupCooldown / rateCooldown, 0, false, group);\n\t\t\tplayer->addCondition(condition);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a1e5879451ff5187a3761bd578edd5f353facce87ac773a81fd663f415af32d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 700, + "startColumn": 121, + "charOffset": 22308, + "charLength": 18, + "snippet": { + "text": "spellGroupCooldown" + } + }, + "contextRegion": { + "startLine": 698, + "startColumn": 121, + "charOffset": 22152, + "charLength": 18, + "snippet": { + "text": "\t\t}\n\t\tif (spellGroupCooldown > 0) {\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLGROUPCOOLDOWN, spellGroupCooldown / rateCooldown, 0, false, group);\n\t\t\tplayer->addCondition(condition);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "040649d3c167cda35fac2dec7eeece2883d0609b9e351bef68aa6e276c08e022" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 701, + "startColumn": 12, + "charOffset": 22372, + "charLength": 12, + "snippet": { + "text": "addCondition" + } + }, + "contextRegion": { + "startLine": 699, + "startColumn": 12, + "charOffset": 22156, + "charLength": 12, + "snippet": { + "text": "\t\tif (spellGroupCooldown > 0) {\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLGROUPCOOLDOWN, spellGroupCooldown / rateCooldown, 0, false, group);\n\t\t\tplayer->addCondition(condition);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a52940c1e34295e4d838c7eee40f9de4b6b12efe9b4578ca858d55496c84c95" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 706, + "startColumn": 41, + "charOffset": 22480, + "charLength": 22, + "snippet": { + "text": "secondaryGroupCooldown" + } + }, + "contextRegion": { + "startLine": 704, + "startColumn": 41, + "charOffset": 22404, + "charLength": 22, + "snippet": { + "text": "\n\tif (secondaryGroupCooldown > 0) {\n\t\tint32_t spellSecondaryGroupCooldown = secondaryGroupCooldown;\n\t\tif (isUpgraded) {\n\t\t\tspellSecondaryGroupCooldown -= getWheelOfDestinyBoost(WheelSpellBoost_t::SECONDARY_GROUP_COOLDOWN, spellGrade);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6cadbf0690cc8409e691980ff9f84f3f1245068f5fafc06cc4527179f7a37d35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'float' to 'int32_t' (aka 'int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 711, + "startColumn": 121, + "charOffset": 22804, + "charLength": 27, + "snippet": { + "text": "spellSecondaryGroupCooldown" + } + }, + "contextRegion": { + "startLine": 709, + "startColumn": 121, + "charOffset": 22639, + "charLength": 27, + "snippet": { + "text": "\t\t}\n\t\tif (spellSecondaryGroupCooldown > 0) {\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLGROUPCOOLDOWN, spellSecondaryGroupCooldown / rateCooldown, 0, false, secondaryGroup);\n\t\t\tplayer->addCondition(condition);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b0b2fd14a13cd3388243c8bd574ab427d0e55ac4b6306a69ffb3b137c6eafc9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 711, + "startColumn": 121, + "charOffset": 22804, + "charLength": 27, + "snippet": { + "text": "spellSecondaryGroupCooldown" + } + }, + "contextRegion": { + "startLine": 709, + "startColumn": 121, + "charOffset": 22639, + "charLength": 27, + "snippet": { + "text": "\t\t}\n\t\tif (spellSecondaryGroupCooldown > 0) {\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLGROUPCOOLDOWN, spellSecondaryGroupCooldown / rateCooldown, 0, false, secondaryGroup);\n\t\t\tplayer->addCondition(condition);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ed5d8659789b804d1b202010feea13bfb7acdf1b0b7df1413ec00c41134e137" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 711, + "startColumn": 121, + "charOffset": 22804, + "charLength": 27, + "snippet": { + "text": "spellSecondaryGroupCooldown" + } + }, + "contextRegion": { + "startLine": 709, + "startColumn": 121, + "charOffset": 22639, + "charLength": 27, + "snippet": { + "text": "\t\t}\n\t\tif (spellSecondaryGroupCooldown > 0) {\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLGROUPCOOLDOWN, spellSecondaryGroupCooldown / rateCooldown, 0, false, secondaryGroup);\n\t\t\tplayer->addCondition(condition);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8d9026db2d70429d09f0e3eb83a967d06144577d49ebcd7ee3366ce6e34c1dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 712, + "startColumn": 12, + "charOffset": 22886, + "charLength": 12, + "snippet": { + "text": "addCondition" + } + }, + "contextRegion": { + "startLine": 710, + "startColumn": 12, + "charOffset": 22643, + "charLength": 12, + "snippet": { + "text": "\t\tif (spellSecondaryGroupCooldown > 0) {\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLGROUPCOOLDOWN, spellSecondaryGroupCooldown / rateCooldown, 0, false, secondaryGroup);\n\t\t\tplayer->addCondition(condition);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c4bdac3d1220b5f9cf5aad2b217e31edb6282cc0e397006a0d200e21ee5b718" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 717, + "startColumn": 51, + "charOffset": 22971, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 715, + "startColumn": 51, + "charOffset": 22918, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Spell::postCastSpell(std::shared_ptr player, bool finishedCast /*= true*/, bool payCost /*= true*/) const {\n\tif (finishedCast) {\n\t\tif (!player->hasFlag(PlayerFlags_t::HasNoExhaustion)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d3dc7b492e2463a21f7c26995b92349513e613e78901f6302dae397772495e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 738, + "startColumn": 51, + "charOffset": 23569, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 736, + "startColumn": 51, + "charOffset": 23516, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Spell::postCastSpell(std::shared_ptr player, uint32_t manaCost, uint32_t soulCost) {\n\tif (manaCost > 0) {\n\t\tplayer->addManaSpent(manaCost);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "893d7602c83ba3e837b3c4ecefa53bc3b73c5a422711cd455e7d65b175d1f1b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'postCastSpell' of similar type ('uint32_t') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 738, + "startColumn": 59, + "charOffset": 23577, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 736, + "startColumn": 59, + "charOffset": 23516, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Spell::postCastSpell(std::shared_ptr player, uint32_t manaCost, uint32_t soulCost) {\n\tif (manaCost > 0) {\n\t\tplayer->addManaSpent(manaCost);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6fda0b0838170f88ca334758597d2de3f7656ae665c85bc41dbcf653e9907489" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 751, + "startColumn": 53, + "charOffset": 23928, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 749, + "startColumn": 53, + "charOffset": 23873, + "charLength": 6, + "snippet": { + "text": "}\n\nuint32_t Spell::getManaCost(std::shared_ptr player) const {\n\tWheelSpellGrade_t spellGrade = player->wheel()->getSpellUpgrade(getName());\n\tuint32_t manaRedution = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "023f4f8ac341f8480c416c6d0be0504e3addcb70b09fb04b015e4202531b463f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 768, + "startColumn": 49, + "charOffset": 24502, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 766, + "startColumn": 49, + "charOffset": 24386, + "charLength": 3, + "snippet": { + "text": "\tif (manaPercent != 0) {\n\t\tuint32_t maxMana = player->getMaxMana();\n\t\tuint32_t manaCost = (maxMana * manaPercent) / 100;\n\t\tif (manaRedution > manaCost) {\n\t\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c69be9469083163a661e1d01723fb49181541eea1409c8aafd538e30e51b7fab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'playerCastInstant' has cognitive complexity of 62 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 778, + "startColumn": 20, + "charOffset": 24613, + "charLength": 17, + "snippet": { + "text": "playerCastInstant" + } + }, + "contextRegion": { + "startLine": 776, + "startColumn": 20, + "charOffset": 24591, + "charLength": 17, + "snippet": { + "text": "}\n\nbool InstantSpell::playerCastInstant(std::shared_ptr player, std::string ¶m) {\n\tif (!playerSpellCheck(player)) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f9687830f491f917624d357b055d358e30648ec8222893d0dc772f970e078f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 778, + "startColumn": 62, + "charOffset": 24655, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 776, + "startColumn": 62, + "charOffset": 24591, + "charLength": 6, + "snippet": { + "text": "}\n\nbool InstantSpell::playerCastInstant(std::shared_ptr player, std::string ¶m) {\n\tif (!playerSpellCheck(player)) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04af70b99cd11020afbbf5802f6ed8880b2669da9920d2b87be968877207cc59" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 802, + "startColumn": 8, + "charOffset": 25283, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 800, + "startColumn": 8, + "charOffset": 25249, + "charLength": 1, + "snippet": { + "text": "\n\t\t\ttarget = playerTarget;\n\t\t\tif (!target || target->isRemoved() || target->getHealth() <= 0) {\n\t\t\t\tif (!casterTargetOrDirection) {\n\t\t\t\t\tapplyCooldownConditions(player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f888b99641662aeaccff28257efa59b30c0884163dadf5ee04c78da3160693e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 819, + "startColumn": 8, + "charOffset": 25708, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 817, + "startColumn": 8, + "charOffset": 25647, + "charLength": 1, + "snippet": { + "text": "\t\t} else {\n\t\t\ttarget = player->getAttackedCreature();\n\t\t\tif (!target || target->isRemoved() || target->getHealth() <= 0) {\n\t\t\t\tif (!casterTargetOrDirection) {\n\t\t\t\t\tplayer->sendCancelMessage(RETURNVALUE_YOUCANONLYUSEITONCREATURES);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee249a3dcd571ffa78fdea9457666fd839d7ce26f7be83693110c655d5d6dfde" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'canThrowSpell' of similar type ('std::shared_ptr') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 900, + "startColumn": 34, + "charOffset": 27784, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 898, + "startColumn": 34, + "charOffset": 27748, + "charLength": 3, + "snippet": { + "text": "}\n\nbool InstantSpell::canThrowSpell(std::shared_ptr creature, std::shared_ptr target) const {\n\tconst Position &fromPos = creature->getPosition();\n\tconst Position &toPos = target->getPosition();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75b2685ce5863ad35887b1a9c6aa7cf663d0492e6d1ab40a8977bf79b86d7fd9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 900, + "startColumn": 60, + "charOffset": 27810, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 898, + "startColumn": 60, + "charOffset": 27748, + "charLength": 8, + "snippet": { + "text": "}\n\nbool InstantSpell::canThrowSpell(std::shared_ptr creature, std::shared_ptr target) const {\n\tconst Position &fromPos = creature->getPosition();\n\tconst Position &toPos = target->getPosition();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2fcce2dfb229802da12c08f995a4933a8545e96b993d591df36303db289dae35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 900, + "startColumn": 96, + "charOffset": 27846, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 898, + "startColumn": 96, + "charOffset": 27748, + "charLength": 6, + "snippet": { + "text": "}\n\nbool InstantSpell::canThrowSpell(std::shared_ptr creature, std::shared_ptr target) const {\n\tconst Position &fromPos = creature->getPosition();\n\tconst Position &toPos = target->getPosition();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "923754f34b62c606cc6cd7f5a688382584910c8c14a502a63c430d32a083223d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in conditional return statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 904, + "startColumn": 10, + "charOffset": 28286, + "charLength": 5, + "snippet": { + "text": "false" + } + }, + "contextRegion": { + "startLine": 902, + "startColumn": 10, + "charOffset": 27914, + "charLength": 5, + "snippet": { + "text": "\tconst Position &toPos = target->getPosition();\n\tif (fromPos.z != toPos.z || (range == -1 && !g_game().canThrowObjectTo(fromPos, toPos, checkLineOfSight ? SightLine_CheckSightLineAndFloor : SightLine_NoCheck)) || (range != -1 && !g_game().canThrowObjectTo(fromPos, toPos, checkLineOfSight ? SightLine_CheckSightLineAndFloor : SightLine_NoCheck, range, range))) {\n\t\treturn false;\n\t}\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "008f3ae915ba5bf185804566951aeffdf35947796380b734ab71eafd305d4d0e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 927, + "startColumn": 4, + "charOffset": 28802, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 925, + "startColumn": 4, + "charOffset": 28782, + "charLength": 4, + "snippet": { + "text": "\n\t\treturn false;\n\t} else if (needDirection) {\n\t\tvar.type = VARIANT_POSITION;\n\t\tvar.pos = Spells::getCasterPosition(creature, creature->getDirection());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "69e51b0fe8e54ac8e578d362351a834b177216b31a5df958c63f6f1e024fcfa0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'castSpell' of similar type ('std::shared_ptr') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 938, + "startColumn": 30, + "charOffset": 29089, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 936, + "startColumn": 30, + "charOffset": 29057, + "charLength": 3, + "snippet": { + "text": "}\n\nbool InstantSpell::castSpell(std::shared_ptr creature, std::shared_ptr target) {\n\tif (needTarget) {\n\t\tLuaVariant var;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3112251f0e29aa39463036e205c3ba3a9b59125df3710b62f81939e5218ef37" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 944, + "startColumn": 4, + "charOffset": 29304, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 942, + "startColumn": 4, + "charOffset": 29227, + "charLength": 4, + "snippet": { + "text": "\t\tvar.number = target->getID();\n\t\treturn executeCastSpell(creature, var);\n\t} else {\n\t\treturn castSpell(creature);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8d887cb6a5b24637dca544cc6954003975e25a90a9d274d0721cefe8bce3d3e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 949, + "startColumn": 63, + "charOffset": 29409, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 947, + "startColumn": 63, + "charOffset": 29344, + "charLength": 8, + "snippet": { + "text": "}\n\nbool InstantSpell::executeCastSpell(std::shared_ptr creature, const LuaVariant &var) const {\n\t// onCastSpell(creature, var)\n\tif (!getScriptInterface()->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "07698b0a5958196474c2452abb667c48794cff7efff874354d5273460e06ff4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 951, + "startColumn": 7, + "charOffset": 29487, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 949, + "startColumn": 7, + "charOffset": 29347, + "charLength": 18, + "snippet": { + "text": "bool InstantSpell::executeCastSpell(std::shared_ptr creature, const LuaVariant &var) const {\n\t// onCastSpell(creature, var)\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[InstantSpell::executeCastSpell - Creature {} words {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c864124969fabfb7072dc641f5831e4060ee705a99e34c1f446cf6eff94e84ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 958, + "startColumn": 27, + "charOffset": 29791, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 956, + "startColumn": 27, + "charOffset": 29761, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\n\tenv->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f581ebd247a89af3808bd2f17a08881e6fb97ebb1fafc9ce3619fca761d8fb56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 963, + "startColumn": 24, + "charOffset": 29963, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 961, + "startColumn": 24, + "charOffset": 29886, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = getScriptInterface()->getLuaState();\n\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22957cb383baf33ae32fabbcb7a1d7ad976028614b397a8e92453a80d380c6d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 973, + "startColumn": 52, + "charOffset": 30256, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 971, + "startColumn": 52, + "charOffset": 30202, + "charLength": 6, + "snippet": { + "text": "}\n\nbool InstantSpell::canCast(std::shared_ptr player) const {\n\tif (player->hasFlag(PlayerFlags_t::CannotUseSpells)) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d088b5908358c4f80bf9088bcc127eb0222495e3935abf9e3634baf0fb86307" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 1005, + "startColumn": 17, + "charOffset": 30976, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 1003, + "startColumn": 17, + "charOffset": 30956, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tif (toPos.x == 0xFFFF) {\n\t\tif (needTarget) {\n\t\t\treturn RETURNVALUE_CANONLYUSETHISRUNEONCREATURES;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7cc9baa1fe2f85703bd25a3b1ce6643f7675d9bded5732950e5b6bb492be7d96" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 1006, + "startColumn": 3, + "charOffset": 30988, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 1004, + "startColumn": 3, + "charOffset": 30959, + "charLength": 2, + "snippet": { + "text": "\n\tif (toPos.x == 0xFFFF) {\n\t\tif (needTarget) {\n\t\t\treturn RETURNVALUE_CANONLYUSETHISRUNEONCREATURES;\n\t\t} else if (!selfTarget) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70e4cf2cc348edc694b217631a6e0a02d31d53ca7ad211b326db2701631c87dc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 1008, + "startColumn": 5, + "charOffset": 31063, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 1006, + "startColumn": 5, + "charOffset": 30986, + "charLength": 4, + "snippet": { + "text": "\t\tif (needTarget) {\n\t\t\treturn RETURNVALUE_CANONLYUSETHISRUNEONCREATURES;\n\t\t} else if (!selfTarget) {\n\t\t\treturn RETURNVALUE_NOTENOUGHROOM;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e3efb9986f2e5e298250388e8a50c45f52ceb6c878cf3ef48b10bfaa0e1535a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 1016, + "startColumn": 104, + "charOffset": 31267, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 1014, + "startColumn": 104, + "charOffset": 31161, + "charLength": 1, + "snippet": { + "text": "}\n\nbool RuneSpell::executeUse(std::shared_ptr player, std::shared_ptr item, const Position &, std::shared_ptr target, const Position &toPosition, bool isHotkey) {\n\tif (!playerRuneSpellCheck(player, toPosition)) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7a738bcfa7e1ecec9e2dd56248180f86e6cc61a54f4b2845f8950501f2102cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 1055, + "startColumn": 12, + "charOffset": 32284, + "charLength": 13, + "snippet": { + "text": "transformItem" + } + }, + "contextRegion": { + "startLine": 1053, + "startColumn": 12, + "charOffset": 32110, + "charLength": 13, + "snippet": { + "text": "\tif (hasCharges && item && g_configManager().getBoolean(REMOVE_RUNE_CHARGES, __FUNCTION__)) {\n\t\tint32_t newCount = std::max(0, item->getItemCount() - 1);\n\t\tg_game().transformItem(item, item->getID(), newCount);\n\t\tplayer->updateSupplyTracker(item);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1f71b7e21d4c295810fab398d44afaed12e2e5a0338d7b25a0a28ab33b41d1d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'castSpell' of similar type ('std::shared_ptr') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 1076, + "startColumn": 27, + "charOffset": 32845, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 1074, + "startColumn": 27, + "charOffset": 32816, + "charLength": 3, + "snippet": { + "text": "}\n\nbool RuneSpell::castSpell(std::shared_ptr creature, std::shared_ptr target) {\n\tLuaVariant var;\n\tvar.type = VARIANT_NUMBER;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2eb7b240e2e20173586ecd934d4fca1ee19c30f8e5499b2b53b2665edf86fea5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'result' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 1085, + "startColumn": 7, + "charOffset": 33188, + "charLength": 6, + "snippet": { + "text": "result" + } + }, + "contextRegion": { + "startLine": 1083, + "startColumn": 7, + "charOffset": 33071, + "charLength": 6, + "snippet": { + "text": "\nbool RuneSpell::internalCastSpell(std::shared_ptr creature, const LuaVariant &var, bool isHotkey) {\n\tbool result;\n\tif (isLoadedCallback()) {\n\t\tresult = executeCastSpell(std::move(creature), var, isHotkey);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c996621044698a9e53161ad8e354191ec28ed5b460e19d5e13ff4b678c0d5ae1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 1094, + "startColumn": 60, + "charOffset": 33397, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 1092, + "startColumn": 60, + "charOffset": 33335, + "charLength": 8, + "snippet": { + "text": "}\n\nbool RuneSpell::executeCastSpell(std::shared_ptr creature, const LuaVariant &var, bool isHotkey) const {\n\t// onCastSpell(creature, var, isHotkey)\n\tif (!getScriptInterface()->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d87e88e8db6f3f28b9b6c34e310344dedd79892ace17c8efa53d763f712ec643" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 1096, + "startColumn": 7, + "charOffset": 33500, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 1094, + "startColumn": 7, + "charOffset": 33338, + "charLength": 18, + "snippet": { + "text": "bool RuneSpell::executeCastSpell(std::shared_ptr creature, const LuaVariant &var, bool isHotkey) const {\n\t// onCastSpell(creature, var, isHotkey)\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[RuneSpell::executeCastSpell - Creature {} runeId {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ffb1376b79787b7c5962cb8c054d82466e8b8e217a86577cdfdb74d5a93f2cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 1103, + "startColumn": 27, + "charOffset": 33807, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 1101, + "startColumn": 27, + "charOffset": 33777, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\n\tenv->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35b7b8aaac220308bb1c6726f875a3e1015c6d7e4048ef28dc7c092e686621bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/combat/spells.cpp" + }, + "region": { + "startLine": 1108, + "startColumn": 24, + "charOffset": 33979, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 1106, + "startColumn": 24, + "charOffset": 33902, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = getScriptInterface()->getLuaState();\n\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19f4b6c3ed8d0fe4500e5193606d0f343f4c7e434eca5ed91effab7f7535f3ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'action' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 30, + "startColumn": 66, + "charOffset": 902, + "charLength": 6, + "snippet": { + "text": "action" + } + }, + "contextRegion": { + "startLine": 28, + "startColumn": 66, + "charOffset": 834, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Actions::registerLuaItemEvent(const std::shared_ptr action) {\n\tauto itemIdVector = action->getItemIdsVector();\n\tif (itemIdVector.empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c99959f3eb93bda8134faf780bf27d2b8ef9832cda77af2cf557a0504d0df35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 39, + "startColumn": 2, + "charOffset": 1087, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 37, + "startColumn": 2, + "charOffset": 1044, + "charLength": 3, + "snippet": { + "text": "\ttmpVector.reserve(itemIdVector.size());\n\n\tfor (const auto &itemId : itemIdVector) {\n\t\t// Check if the item is already registered and prevent it from being registered again\n\t\tif (hasItemId(itemId)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "df12caf34193c8cc1e93ee9f42f561634dd77b5ec59cc9444135326830ac591c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 56, + "startColumn": 13, + "charOffset": 1635, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 54, + "startColumn": 13, + "charOffset": 1552, + "charLength": 12, + "snippet": { + "text": "\t\t// Register item in the action item map\n\t\tsetItemId(itemId, action);\n\t\ttmpVector.emplace_back(itemId);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31d81fcc6c035444d3459e26123fe60903d6ab94247e6aab9050e3fd468f547e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'action' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 63, + "startColumn": 68, + "charOffset": 1800, + "charLength": 6, + "snippet": { + "text": "action" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 68, + "charOffset": 1730, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Actions::registerLuaUniqueEvent(const std::shared_ptr action) {\n\tauto uniqueIdVector = action->getUniqueIdsVector();\n\tif (uniqueIdVector.empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c63be44cb449fdfd289c0c5fd6dd32eae5269da9f7d14898e4b42bbe97f93e1d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 72, + "startColumn": 2, + "charOffset": 1993, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 2, + "charOffset": 1948, + "charLength": 3, + "snippet": { + "text": "\ttmpVector.reserve(uniqueIdVector.size());\n\n\tfor (const auto &uniqueId : uniqueIdVector) {\n\t\t// Check if the unique is already registered and prevent it from being registered again\n\t\tif (!hasUniqueId(uniqueId)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4486fdcddf4ae639417746825b30489065fad9aa089d9266f7e35b7a3c4da79f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 77, + "startColumn": 14, + "charOffset": 2253, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 75, + "startColumn": 14, + "charOffset": 2161, + "charLength": 12, + "snippet": { + "text": "\t\t\t// Register unique id the unique item map\n\t\t\tsetUniqueId(uniqueId, action);\n\t\t\ttmpVector.emplace_back(uniqueId);\n\t\t} else {\n\t\t\tg_logger().warn(" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35ff94d44d9d1c20d702982dcd910c452ac141de57301cc2769e4689d78de85e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'action' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 94, + "startColumn": 68, + "charOffset": 2731, + "charLength": 6, + "snippet": { + "text": "action" + } + }, + "contextRegion": { + "startLine": 92, + "startColumn": 68, + "charOffset": 2661, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Actions::registerLuaActionEvent(const std::shared_ptr action) {\n\tauto actionIdVector = action->getActionIdsVector();\n\tif (actionIdVector.empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b19f04c6cafc40196ccbf456e611cfcd8b8e61e3aab2b5614ee2abd089aa94b0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 103, + "startColumn": 2, + "charOffset": 2924, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 101, + "startColumn": 2, + "charOffset": 2879, + "charLength": 3, + "snippet": { + "text": "\ttmpVector.reserve(actionIdVector.size());\n\n\tfor (const auto &actionId : actionIdVector) {\n\t\t// Check if the unique is already registered and prevent it from being registered again\n\t\tif (!hasActionId(actionId)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1922c89a01093d74f8fcdde3d99512e9686a302bad7878eff102b857ccd1fe7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 108, + "startColumn": 14, + "charOffset": 3184, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 14, + "charOffset": 3092, + "charLength": 12, + "snippet": { + "text": "\t\t\t// Register action in the action item map\n\t\t\tsetActionId(actionId, action);\n\t\t\ttmpVector.emplace_back(actionId);\n\t\t} else {\n\t\t\tg_logger().warn(" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "34ca055d76fe273fcac77ad48b699c6620bd5af3abd09461a1f0deca7865d836" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'action' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 125, + "startColumn": 70, + "charOffset": 3664, + "charLength": 6, + "snippet": { + "text": "action" + } + }, + "contextRegion": { + "startLine": 123, + "startColumn": 70, + "charOffset": 3592, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Actions::registerLuaPositionEvent(const std::shared_ptr action) {\n\tauto positionVector = action->getPositionsVector();\n\tif (positionVector.empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "748ddd7486e51a4ecc9647c07f47fdd29de1c1d1bacdc8330c96c2167717a297" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 134, + "startColumn": 2, + "charOffset": 3857, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 2, + "charOffset": 3812, + "charLength": 3, + "snippet": { + "text": "\ttmpVector.reserve(positionVector.size());\n\n\tfor (const auto &position : positionVector) {\n\t\t// Check if the position is already registered and prevent it from being registered again\n\t\tif (!hasPosition(position)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59b3394d2a89c3cf9d71f475240a1239d3a661310c8156a85ed6bdb197f98df8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 139, + "startColumn": 14, + "charOffset": 4125, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 137, + "startColumn": 14, + "charOffset": 4027, + "charLength": 12, + "snippet": { + "text": "\t\t\t// Register position in the action position map\n\t\t\tsetPosition(position, action);\n\t\t\ttmpVector.emplace_back(position);\n\t\t} else {\n\t\t\tg_logger().warn(" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa772d3c0c501cc4bbe03428564c4c17e1943ec3e98490c6ecee66b4052e9064" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'action' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 154, + "startColumn": 62, + "charOffset": 4511, + "charLength": 6, + "snippet": { + "text": "action" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 62, + "charOffset": 4447, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Actions::registerLuaEvent(const std::shared_ptr action) {\n\t// Call all register lua events\n\tif (registerLuaItemEvent(action) || registerLuaUniqueEvent(action) || registerLuaActionEvent(action) || registerLuaPositionEvent(action)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc603f1c5dc4378f8998c3d6f2575fba59cb3e59a996ca05eb8bdd287354457c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 158, + "startColumn": 4, + "charOffset": 4713, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 156, + "startColumn": 4, + "charOffset": 4554, + "charLength": 4, + "snippet": { + "text": "\tif (registerLuaItemEvent(action) || registerLuaUniqueEvent(action) || registerLuaActionEvent(action) || registerLuaPositionEvent(action)) {\n\t\treturn true;\n\t} else {\n\t\tg_logger().warn(\n\t\t\t\"[{}] missing id/aid/uid/position for one script event, for script: {}\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be11e4c1506eac1d08b622759dfc6676828ab4b6e10d5d8ef4afa1c7170f75d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'canUse' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 170, + "startColumn": 22, + "charOffset": 5078, + "charLength": 6, + "snippet": { + "text": "canUse" + } + }, + "contextRegion": { + "startLine": 168, + "startColumn": 22, + "charOffset": 5054, + "charLength": 6, + "snippet": { + "text": "}\n\nReturnValue Actions::canUse(std::shared_ptr player, const Position &pos) {\n\tif (pos.x != 0xFFFF) {\n\t\tconst Position &playerPos = player->getPosition();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ffededa8b7dc78050cf217c97ca6fe274ca491d47930c6611c5f01d4b50e11c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 170, + "startColumn": 53, + "charOffset": 5109, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 168, + "startColumn": 53, + "charOffset": 5054, + "charLength": 6, + "snippet": { + "text": "}\n\nReturnValue Actions::canUse(std::shared_ptr player, const Position &pos) {\n\tif (pos.x != 0xFFFF) {\n\t\tconst Position &playerPos = player->getPosition();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ae88d49e2b535e4be0004427f2b1b081757a07527f9f67cf24b1536330bdd51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 171, + "startColumn": 15, + "charOffset": 5154, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 169, + "startColumn": 15, + "charOffset": 5056, + "charLength": 6, + "snippet": { + "text": "\nReturnValue Actions::canUse(std::shared_ptr player, const Position &pos) {\n\tif (pos.x != 0xFFFF) {\n\t\tconst Position &playerPos = player->getPosition();\n\t\tif (playerPos.z != pos.z) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f19cde2d0412f912e956987731458b2356f9d8da36b1ca00490bcd19ac4e4aab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 185, + "startColumn": 51, + "charOffset": 5632, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 183, + "startColumn": 51, + "charOffset": 5470, + "charLength": 4, + "snippet": { + "text": "\nReturnValue Actions::canUse(std::shared_ptr player, const Position &pos, std::shared_ptr item) {\n\tconst std::shared_ptr action = getAction(item);\n\tif (action != nullptr) {\n\t\treturn action->canExecuteAction(player, pos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ab4719216c909b8dbe34814454f6b381dded492c790d25e0ada914d6c88b856f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 187, + "startColumn": 35, + "charOffset": 5699, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 185, + "startColumn": 35, + "charOffset": 5582, + "charLength": 6, + "snippet": { + "text": "\tconst std::shared_ptr action = getAction(item);\n\tif (action != nullptr) {\n\t\treturn action->canExecuteAction(player, pos);\n\t}\n\treturn RETURNVALUE_NOERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "89ba6d19b599a45c642cbb8b9f30b2cfcff77ea8afd9524a4b04d2b1731a416b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'canUseFar' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 192, + "startColumn": 22, + "charOffset": 5769, + "charLength": 9, + "snippet": { + "text": "canUseFar" + } + }, + "contextRegion": { + "startLine": 190, + "startColumn": 22, + "charOffset": 5745, + "charLength": 9, + "snippet": { + "text": "}\n\nReturnValue Actions::canUseFar(std::shared_ptr creature, const Position &toPos, bool checkLineOfSight, bool checkFloor) {\n\tif (toPos.x == 0xFFFF) {\n\t\treturn RETURNVALUE_NOERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd2bc5eed1b3caa5042bcc8dc22811de33846869366a4da351c5724d8e9557c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 192, + "startColumn": 58, + "charOffset": 5805, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 190, + "startColumn": 58, + "charOffset": 5745, + "charLength": 8, + "snippet": { + "text": "}\n\nReturnValue Actions::canUseFar(std::shared_ptr creature, const Position &toPos, bool checkLineOfSight, bool checkFloor) {\n\tif (toPos.x == 0xFFFF) {\n\t\treturn RETURNVALUE_NOERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "612f1c95bedafbfbcec77d0ffe3a136ef860705dac7004591fb56415ec07d433" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 193, + "startColumn": 17, + "charOffset": 5896, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 191, + "startColumn": 17, + "charOffset": 5747, + "charLength": 6, + "snippet": { + "text": "\nReturnValue Actions::canUseFar(std::shared_ptr creature, const Position &toPos, bool checkLineOfSight, bool checkFloor) {\n\tif (toPos.x == 0xFFFF) {\n\t\treturn RETURNVALUE_NOERROR;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22dc34b2e26cb6c4449dda8c0c359b0c49655ea64aab0f1f8ac037e1bb67f53c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 202, + "startColumn": 28, + "charOffset": 6170, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 200, + "startColumn": 28, + "charOffset": 6139, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!Position::areInRange<7, 5>(toPos, creaturePos)) {\n\t\treturn RETURNVALUE_TOOFARAWAY;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b154f0b05a9423cba1cc2ed1b22024ac1e8633c6757afa77562de3cfac6c6cf8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 202, + "startColumn": 31, + "charOffset": 6173, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 200, + "startColumn": 31, + "charOffset": 6139, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!Position::areInRange<7, 5>(toPos, creaturePos)) {\n\t\treturn RETURNVALUE_TOOFARAWAY;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2341bfd02a30b2b84b15d0a43607fc6f1165bb6d3bd0d5b1ace351b9e178758a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 213, + "startColumn": 66, + "charOffset": 6520, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 211, + "startColumn": 66, + "charOffset": 6452, + "charLength": 4, + "snippet": { + "text": "}\n\nstd::shared_ptr Actions::getAction(std::shared_ptr item) {\n\tif (item->hasAttribute(ItemAttribute_t::UNIQUEID)) {\n\t\tauto it = uniqueItemMap.find(item->getAttribute(ItemAttribute_t::UNIQUEID));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c30fbd3d0ecbcb455fbd47e4eddd646894dd51c29406213ab76a056b4e43e705" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'internalUseItem' has cognitive complexity of 70 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 251, + "startColumn": 22, + "charOffset": 7643, + "charLength": 15, + "snippet": { + "text": "internalUseItem" + } + }, + "contextRegion": { + "startLine": 249, + "startColumn": 22, + "charOffset": 7619, + "charLength": 15, + "snippet": { + "text": "}\n\nReturnValue Actions::internalUseItem(std::shared_ptr player, const Position &pos, uint8_t index, std::shared_ptr item, bool isHotkey) {\n\tif (std::shared_ptr door = item->getDoor()) {\n\t\tif (!door->canUse(player)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04f489c70fe501fe9b8e886bda90f081ebf9a417efa423c5b8d4a8545b0ed3b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 251, + "startColumn": 62, + "charOffset": 7683, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 249, + "startColumn": 62, + "charOffset": 7619, + "charLength": 6, + "snippet": { + "text": "}\n\nReturnValue Actions::internalUseItem(std::shared_ptr player, const Position &pos, uint8_t index, std::shared_ptr item, bool isHotkey) {\n\tif (std::shared_ptr door = item->getDoor()) {\n\t\tif (!door->canUse(player)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "285d92dc5660ffc345a615a82c2ef33eb9ff341f32c488260ac354fa2f438565" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 251, + "startColumn": 128, + "charOffset": 7749, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 249, + "startColumn": 128, + "charOffset": 7619, + "charLength": 4, + "snippet": { + "text": "}\n\nReturnValue Actions::internalUseItem(std::shared_ptr player, const Position &pos, uint8_t index, std::shared_ptr item, bool isHotkey) {\n\tif (std::shared_ptr door = item->getDoor()) {\n\t\tif (!door->canUse(player)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "91206fce6ad1fba1cc1516672b52aa8965f67cfb68d0f0fe159da77540b41883" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 262, + "startColumn": 2, + "charOffset": 8091, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 260, + "startColumn": 2, + "charOffset": 7986, + "charLength": 2, + "snippet": { + "text": "\tauto transformTo = itemType.m_transformOnUse;\n\tconst std::shared_ptr action = getAction(item);\n\tif (!action && transformTo > 0 && itemId != transformTo) {\n\t\tif (g_game().transformItem(item, transformTo) == nullptr) {\n\t\t\tg_logger().warn(\"[{}] item with id {} failed to transform to item {}\", __FUNCTION__, itemId, transformTo);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "164e9eb2bcaf3d1d4f8a881250e524910e2eda343bf0169fe9858da4eab64cdb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 262, + "startColumn": 6, + "charOffset": 8095, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 260, + "startColumn": 6, + "charOffset": 7986, + "charLength": 1, + "snippet": { + "text": "\tauto transformTo = itemType.m_transformOnUse;\n\tconst std::shared_ptr action = getAction(item);\n\tif (!action && transformTo > 0 && itemId != transformTo) {\n\t\tif (g_game().transformItem(item, transformTo) == nullptr) {\n\t\t\tg_logger().warn(\"[{}] item with id {} failed to transform to item {}\", __FUNCTION__, itemId, transformTo);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e802fb370fa0c17d91a89ee33d4dbba0c31183cfac386e6cff009b842696999" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 269, + "startColumn": 4, + "charOffset": 8403, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 267, + "startColumn": 4, + "charOffset": 8369, + "charLength": 4, + "snippet": { + "text": "\n\t\treturn RETURNVALUE_NOERROR;\n\t} else if (transformTo > 0 && action) {\n\t\tg_logger().warn(\"[{}] item with id {} already have action registered and cannot be use transformTo tag\", __FUNCTION__, itemId);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3434d852a89b5cef7803df696719c01810dce5cf131bcbabd9ccffeb844f2b2a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 274, + "startColumn": 3, + "charOffset": 8603, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 272, + "startColumn": 3, + "charOffset": 8574, + "charLength": 2, + "snippet": { + "text": "\n\tif (action != nullptr) {\n\t\tif (action->isLoadedCallback()) {\n\t\t\tif (action->executeUse(player, item, pos, nullptr, pos, isHotkey)) {\n\t\t\t\treturn RETURNVALUE_NOERROR;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "164e9eb2bcaf3d1d4f8a881250e524910e2eda343bf0169fe9858da4eab64cdb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 307, + "startColumn": 27, + "charOffset": 9662, + "charLength": 5, + "snippet": { + "text": "depot" + } + }, + "contextRegion": { + "startLine": 305, + "startColumn": 27, + "charOffset": 9542, + "charLength": 5, + "snippet": { + "text": "\t\t\tmyDepotLocker->setParent(depot->getParent()->getTile());\n\t\t\topenContainer = myDepotLocker;\n\t\t\tplayer->setLastDepotId(depot->getDepotId());\n\t\t} else {\n\t\t\topenContainer = container;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c10613395ab839dba6082fa2b72a5a9a712b1c8303811422f61fbd323f033b16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 324, + "startColumn": 4, + "charOffset": 10184, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 322, + "startColumn": 4, + "charOffset": 10112, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tplayerRewardChest->setParent(container->getParent()->getTile());\n\t\t\tfor (const auto &[mapRewardId, reward] : player->rewardMap) {\n\t\t\t\treward->setParent(playerRewardChest);\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14eca9d3f7c102a42909cae43bbacd95c8d5402872f05a78dd320b767fa73b5b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 333, + "startColumn": 54, + "charOffset": 10519, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 331, + "startColumn": 54, + "charOffset": 10337, + "charLength": 1, + "snippet": { + "text": "\t\tauto rewardId = container->getAttribute(ItemAttribute_t::DATE);\n\t\t// Reward container proxy created when the boss dies\n\t\tif (container->getID() == ITEM_REWARD_CONTAINER && !container->getReward()) {\n\t\t\tauto reward = player->getReward(rewardId, false);\n\t\t\tif (!reward) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd3aa1df2119963e039f4aab3640492f640ad5a5f04245b32cd6a5a875f2452b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 335, + "startColumn": 8, + "charOffset": 10606, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 333, + "startColumn": 8, + "charOffset": 10466, + "charLength": 1, + "snippet": { + "text": "\t\tif (container->getID() == ITEM_REWARD_CONTAINER && !container->getReward()) {\n\t\t\tauto reward = player->getReward(rewardId, false);\n\t\t\tif (!reward) {\n\t\t\t\treturn RETURNVALUE_THISISIMPOSSIBLE;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7b95b6a01728e9f86b6653635b8bdd4b2c007bd2097e666862b290e705fc5e26" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 346, + "startColumn": 3, + "charOffset": 10879, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 344, + "startColumn": 3, + "charOffset": 10822, + "charLength": 2, + "snippet": { + "text": "\n\t\tuint32_t corpseOwner = container->getCorpseOwner();\n\t\tif (container->isRewardCorpse()) {\n\t\t\t// only players who participated in the fight can open the corpse\n\t\t\tif (player->getGroup()->id >= GROUP_TYPE_GAMEMASTER) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ff430e469af1e6a612191f1e7335df43bbbcfa4cee58b8a8b103bc45f313b35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 352, + "startColumn": 8, + "charOffset": 11151, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 350, + "startColumn": 8, + "charOffset": 11086, + "charLength": 1, + "snippet": { + "text": "\t\t\t}\n\t\t\tauto reward = player->getReward(rewardId, false);\n\t\t\tif (!reward) {\n\t\t\t\treturn RETURNVALUE_YOUARENOTTHEOWNER;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d806faec094d81c75ac5b65ef35433b8b4de7aaef5975e4229cb1ed14491036" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 366, + "startColumn": 27, + "charOffset": 11597, + "charLength": 14, + "snippet": { + "text": "oldContainerId" + } + }, + "contextRegion": { + "startLine": 364, + "startColumn": 27, + "charOffset": 11497, + "charLength": 14, + "snippet": { + "text": "\t\tif (oldContainerId != -1) {\n\t\t\tplayer->onCloseContainer(openContainer);\n\t\t\tplayer->closeContainer(oldContainerId);\n\t\t} else {\n\t\t\tplayer->addContainer(index, openContainer);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1902ca68f88462f1406469fd4b9d5d53d9daaf5aba58b428f7a92042939096d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 391, + "startColumn": 47, + "charOffset": 12169, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 389, + "startColumn": 47, + "charOffset": 12120, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Actions::useItem(std::shared_ptr player, const Position &pos, uint8_t index, std::shared_ptr item, bool isHotkey) {\n\tconst ItemType &it = Item::items[item->getID()];\n\tif (it.isRune() || it.type == ITEM_TYPE_POTION) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e2a9d74b9c0f0c7d3706be36cbce259424d0e44e660bf01d0819f403a1d0f58" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 391, + "startColumn": 113, + "charOffset": 12235, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 389, + "startColumn": 113, + "charOffset": 12120, + "charLength": 4, + "snippet": { + "text": "}\n\nbool Actions::useItem(std::shared_ptr player, const Position &pos, uint8_t index, std::shared_ptr item, bool isHotkey) {\n\tconst ItemType &it = Item::items[item->getID()];\n\tif (it.isRune() || it.type == ITEM_TYPE_POTION) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb3d13b6438d66329f5b11ddcb59b8eb3e99b9d9d8e0591bd39d76de30da1a31" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 423, + "startColumn": 49, + "charOffset": 13354, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 421, + "startColumn": 49, + "charOffset": 13303, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Actions::useItemEx(std::shared_ptr player, const Position &fromPos, const Position &toPos, uint8_t toStackPos, std::shared_ptr item, bool isHotkey, std::shared_ptr creature /* = nullptr*/) {\n\tconst ItemType &it = Item::items[item->getID()];\n\tif (it.isRune() || it.type == ITEM_TYPE_POTION) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09800ecc6d5e7247a64095f2b1631fcb0592df7c40b9a39d10d87bfa8f922951" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 423, + "startColumn": 147, + "charOffset": 13452, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 421, + "startColumn": 147, + "charOffset": 13303, + "charLength": 4, + "snippet": { + "text": "}\n\nbool Actions::useItemEx(std::shared_ptr player, const Position &fromPos, const Position &toPos, uint8_t toStackPos, std::shared_ptr item, bool isHotkey, std::shared_ptr creature /* = nullptr*/) {\n\tconst ItemType &it = Item::items[item->getID()];\n\tif (it.isRune() || it.type == ITEM_TYPE_POTION) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b1c029feeed048695cdf0cbb45f9b9157d9cad91df99ec5752904b32b4a4de4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 423, + "startColumn": 194, + "charOffset": 13499, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 421, + "startColumn": 194, + "charOffset": 13303, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Actions::useItemEx(std::shared_ptr player, const Position &fromPos, const Position &toPos, uint8_t toStackPos, std::shared_ptr item, bool isHotkey, std::shared_ptr creature /* = nullptr*/) {\n\tconst ItemType &it = Item::items[item->getID()];\n\tif (it.isRune() || it.type == ITEM_TYPE_POTION) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd9c392493ae1d4883f4929ec506fbbed9cfc09ddcea684685634525ad692be2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-simplify-boolean-expr", + "ruleIndex": 727, + "kind": "fail", + "level": "warning", + "message": { + "text": "redundant boolean literal in conditional return statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 451, + "startColumn": 11, + "charOffset": 14410, + "charLength": 4, + "snippet": { + "text": "true" + } + }, + "contextRegion": { + "startLine": 449, + "startColumn": 11, + "charOffset": 14247, + "charLength": 4, + "snippet": { + "text": "\tif (action->useFunction) {\n\t\tif (action->useFunction(player, item, fromPos, action->getTarget(player, creature, toPos, toStackPos), toPos, isHotkey)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87e54d6806b1a28b2a2673f2911444961a02bd474b6ce5f522bb337b94e09a10" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 475, + "startColumn": 60, + "charOffset": 15185, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 473, + "startColumn": 60, + "charOffset": 15123, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Actions::showUseHotkeyMessage(std::shared_ptr player, std::shared_ptr item, uint32_t count) {\n\tstd::ostringstream ss;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96088a704e37e192e07a091044468244101625ed1740ef1a9629061a13918faf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 475, + "startColumn": 90, + "charOffset": 15215, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 473, + "startColumn": 90, + "charOffset": 15123, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Actions::showUseHotkeyMessage(std::shared_ptr player, std::shared_ptr item, uint32_t count) {\n\tstd::ostringstream ss;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b4840a62022a2f512daf913c842af71cb7e6f5922e728899e64b875b1c298504" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 499, + "startColumn": 62, + "charOffset": 15837, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 497, + "startColumn": 62, + "charOffset": 15752, + "charLength": 6, + "snippet": { + "text": "\tScript(interface) { }\n\nReturnValue Action::canExecuteAction(std::shared_ptr player, const Position &toPos) {\n\tif (!allowFarUse) {\n\t\treturn g_actions().canUse(player, toPos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e4c770e7ac0937a1d2d58d7a793ac663e17e74ddbecab7414d21ceefcb94859" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 511, + "startColumn": 35, + "charOffset": 16285, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 509, + "startColumn": 35, + "charOffset": 16223, + "charLength": 6, + "snippet": { + "text": "\t\treturn targetCreature;\n\t}\n\treturn g_game().internalGetThing(player, toPosition, toStackPos, 0, STACKPOS_USETARGET);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46f230fd7a0fb1350f04353b32a4bbf54db242ffae95179c10508507db01075b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 514, + "startColumn": 49, + "charOffset": 16392, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 512, + "startColumn": 49, + "charOffset": 16341, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Action::executeUse(std::shared_ptr player, std::shared_ptr item, const Position &fromPosition, std::shared_ptr target, const Position &toPosition, bool isHotkey) {\n\t// onUse(player, item, fromPosition, target, toPosition, isHotkey)\n\tif (!getScriptInterface()->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e5283564b33c1eba71bad541f794422467b451675ff01bc62ad47b3464a17a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 514, + "startColumn": 79, + "charOffset": 16422, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 512, + "startColumn": 79, + "charOffset": 16341, + "charLength": 4, + "snippet": { + "text": "}\n\nbool Action::executeUse(std::shared_ptr player, std::shared_ptr item, const Position &fromPosition, std::shared_ptr target, const Position &toPosition, bool isHotkey) {\n\t// onUse(player, item, fromPosition, target, toPosition, isHotkey)\n\tif (!getScriptInterface()->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60ca0188f4e79a40f94ff18e82029ffa2f2b1678542f597a4a694dda3162d7bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 516, + "startColumn": 7, + "charOffset": 16608, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 514, + "startColumn": 7, + "charOffset": 16344, + "charLength": 18, + "snippet": { + "text": "bool Action::executeUse(std::shared_ptr player, std::shared_ptr item, const Position &fromPosition, std::shared_ptr target, const Position &toPosition, bool isHotkey) {\n\t// onUse(player, item, fromPosition, target, toPosition, isHotkey)\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[Action::executeUse - Player {}, on item {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bdbdfd928e51c4d952dd851c0ba24b66b57304f5a767358cad906a2ea786221d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 523, + "startColumn": 41, + "charOffset": 16918, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 521, + "startColumn": 41, + "charOffset": 16874, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc0c0b42b16edef5ab0428f552588c49147a4926880cda0b01b32245c15357d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 528, + "startColumn": 24, + "charOffset": 17104, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 526, + "startColumn": 24, + "charOffset": 17027, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = getScriptInterface()->getLuaState();\n\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ba6e27fa3097952ef4deceb74b886e9fbfee8a1961c84d26e8bdb959258b9b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 536, + "startColumn": 35, + "charOffset": 17369, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 534, + "startColumn": 35, + "charOffset": 17282, + "charLength": 6, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, fromPosition);\n\n\tLuaScriptInterface::pushThing(L, target);\n\tLuaScriptInterface::pushPosition(L, toPosition);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e82e3a4f095254312a73b420d49a0440e9264859da3d192f8146ccfd06a180b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/actions.cpp" + }, + "region": { + "startLine": 540, + "startColumn": 44, + "charOffset": 17519, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 538, + "startColumn": 44, + "charOffset": 17428, + "charLength": 1, + "snippet": { + "text": "\n\tLuaScriptInterface::pushBoolean(L, isHotkey);\n\treturn getScriptInterface()->callFunction(6);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f2995ac46ee6db07d8342141557a22aa74cff12efcaa51c56451875cf3f6d7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.hpp" + }, + "region": { + "startLine": 13, + "startColumn": 10, + "charOffset": 429, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 11, + "startColumn": 10, + "charOffset": 384, + "charLength": 30, + "snippet": { + "text": "\n#include \"creatures/npcs/npcs.hpp\"\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"items/tile.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f69d6cfec9be0f6769310fd1d031cff4d88ef48385f012190be0fe563d15e4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.hpp", + "index": 1 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"creatures/monsters/monsters.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e45483e1912ecf8c717a48f913562d9a9cf501f9947625dad361d43acc28406" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.hpp", + "index": 2 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a2b3a997037594f8bab93e08d9b46935593069da5e9def3fec147ea485ffc36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 17, + "startColumn": 2, + "charOffset": 533, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 15, + "startColumn": 2, + "charOffset": 500, + "charLength": 3, + "snippet": { + "text": "\nvoid CreatureEvents::clear() {\n\tfor (auto &[name, event] : creatureEvents) {\n\t\tevent->clearEvent();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08e86eef210310dd82f25a61c3221487a4a26fa48da61f56140adf01239c0c63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'creatureEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 22, + "startColumn": 76, + "charOffset": 682, + "charLength": 13, + "snippet": { + "text": "creatureEvent" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 76, + "charOffset": 604, + "charLength": 13, + "snippet": { + "text": "}\n\nbool CreatureEvents::registerLuaEvent(const std::shared_ptr creatureEvent) {\n\tif (creatureEvent->getEventType() == CREATURE_EVENT_NONE) {\n\t\tg_logger().error(" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4eae67280edf8bc9c30412d582079effdfabc312f6689e2876f33bc7943dc03e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 41, + "startColumn": 4, + "charOffset": 1325, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 4, + "charOffset": 1305, + "charLength": 4, + "snippet": { + "text": "\n\t\treturn false;\n\t} else {\n\t\t// if not, register it normally\n\t\tcreatureEvents.emplace(creatureEvent->getName(), creatureEvent);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8422b936d5ba6c167cebd8cd81f6f85395480e64942094c54e6788879e7750a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 43, + "startColumn": 18, + "charOffset": 1383, + "charLength": 7, + "snippet": { + "text": "emplace" + } + }, + "contextRegion": { + "startLine": 41, + "startColumn": 18, + "charOffset": 1322, + "charLength": 7, + "snippet": { + "text": "\t} else {\n\t\t// if not, register it normally\n\t\tcreatureEvents.emplace(creatureEvent->getName(), creatureEvent);\n\t\treturn true;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b87658f3f9592491f2e386fc4cd3bc919f4365991067758639eb61362df8fc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 58, + "startColumn": 58, + "charOffset": 1799, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 56, + "startColumn": 58, + "charOffset": 1739, + "charLength": 6, + "snippet": { + "text": "}\n\nbool CreatureEvents::playerLogin(std::shared_ptr player) const {\n\t// fire global event if is registered\n\tfor (const auto &it : creatureEvents) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be5f385cc72816c66eeb3fdf2f26e2310a97cffa89930d9bcbc56eeb794bad49" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 60, + "startColumn": 2, + "charOffset": 1855, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 2, + "charOffset": 1742, + "charLength": 3, + "snippet": { + "text": "bool CreatureEvents::playerLogin(std::shared_ptr player) const {\n\t// fire global event if is registered\n\tfor (const auto &it : creatureEvents) {\n\t\tif (it.second->getEventType() == CREATURE_EVENT_LOGIN) {\n\t\t\tif (!it.second->executeOnLogin(player)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1314b93d0756b580e2bba8cceb528a573b8cc89102efcf7d809515b7b598cc1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-anyofallof", + "ruleIndex": 735, + "kind": "fail", + "level": "warning", + "message": { + "text": "replace loop by 'std::ranges::all_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 60, + "startColumn": 2, + "charOffset": 1855, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 58, + "startColumn": 2, + "charOffset": 1742, + "charLength": 3, + "snippet": { + "text": "bool CreatureEvents::playerLogin(std::shared_ptr player) const {\n\t// fire global event if is registered\n\tfor (const auto &it : creatureEvents) {\n\t\tif (it.second->getEventType() == CREATURE_EVENT_LOGIN) {\n\t\t\tif (!it.second->executeOnLogin(player)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "85add706b5429ca75d68e04161d8d4ec47299d759d096339b50d4f8719fa6cc3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 70, + "startColumn": 59, + "charOffset": 2104, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 59, + "charOffset": 2043, + "charLength": 6, + "snippet": { + "text": "}\n\nbool CreatureEvents::playerLogout(std::shared_ptr player) const {\n\t// fire global event if is registered\n\tfor (const auto &it : creatureEvents) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b93295844ed04902140a43268c92a94161acd3ff3931c4058062ca9f2d364e25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 72, + "startColumn": 2, + "charOffset": 2160, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 2, + "charOffset": 2046, + "charLength": 3, + "snippet": { + "text": "bool CreatureEvents::playerLogout(std::shared_ptr player) const {\n\t// fire global event if is registered\n\tfor (const auto &it : creatureEvents) {\n\t\tif (it.second->getEventType() == CREATURE_EVENT_LOGOUT) {\n\t\t\tif (!it.second->executeOnLogout(player)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f976c781616d839edec55504f8260337604a6a27fecc0c3bb39eaece902cf1c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-anyofallof", + "ruleIndex": 735, + "kind": "fail", + "level": "warning", + "message": { + "text": "replace loop by 'std::ranges::all_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 72, + "startColumn": 2, + "charOffset": 2160, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 70, + "startColumn": 2, + "charOffset": 2046, + "charLength": 3, + "snippet": { + "text": "bool CreatureEvents::playerLogout(std::shared_ptr player) const {\n\t// fire global event if is registered\n\tfor (const auto &it : creatureEvents) {\n\t\tif (it.second->getEventType() == CREATURE_EVENT_LOGOUT) {\n\t\t\tif (!it.second->executeOnLogout(player)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28d54696226ee304a436d7ddd20fcc95c8217e0325234e4169b5ef035165aa00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 83, + "startColumn": 26, + "charOffset": 2414, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 81, + "startColumn": 26, + "charOffset": 2352, + "charLength": 6, + "snippet": { + "text": "\nbool CreatureEvents::playerAdvance(\n\tstd::shared_ptr player,\n\tskills_t skill,\n\tuint32_t oldLevel," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35b5563e056444e7f28402e359c9cf1b64f5a3e5d865f1b2a2d30cbd399bbcfd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 88, + "startColumn": 2, + "charOffset": 2489, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 86, + "startColumn": 2, + "charOffset": 2459, + "charLength": 3, + "snippet": { + "text": "\tuint32_t newLevel\n) const {\n\tfor ([[maybe_unused]] const auto &[eventName, eventPtr] : creatureEvents) {\n\t\tif (eventPtr->getEventType() == CREATURE_EVENT_ADVANCE) {\n\t\t\tif (!eventPtr->executeAdvance(player, skill, oldLevel, newLevel)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53bac691d750f0f03fde8d4788f623b790c7d30fa3196bb85865f005936184e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-use-anyofallof", + "ruleIndex": 735, + "kind": "fail", + "level": "warning", + "message": { + "text": "replace loop by 'std::ranges::all_of()'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 88, + "startColumn": 2, + "charOffset": 2489, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 86, + "startColumn": 2, + "charOffset": 2459, + "charLength": 3, + "snippet": { + "text": "\tuint32_t newLevel\n) const {\n\tfor ([[maybe_unused]] const auto &[eventName, eventPtr] : creatureEvents) {\n\t\tif (eventPtr->getEventType() == CREATURE_EVENT_ADVANCE) {\n\t\t\tif (!eventPtr->executeAdvance(player, skill, oldLevel, newLevel)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4bc899411e37c11b482cd54ef6a9e9146871999e5c770db55474338bf91c6976" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 108, + "startColumn": 2, + "charOffset": 2957, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 2, + "charOffset": 2910, + "charLength": 3, + "snippet": { + "text": "\nvoid CreatureEvents::removeInvalidEvents() {\n\tstd::erase_if(creatureEvents, [](const auto &pair) {\n\t\treturn pair.second->getScriptId() == 0;\n\t});" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "275f2b8ce138230923f048dcab6abda427020c737d71353780323cd6001a3afc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 116, + "startColumn": 3, + "charOffset": 3191, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 114, + "startColumn": 3, + "charOffset": 3115, + "charLength": 4, + "snippet": { + "text": "\t// Depending on the type script event name is different\n\tswitch (type) {\n\t\tcase CREATURE_EVENT_LOGIN:\n\t\t\treturn \"onLogin\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cfb5be73060d9e4fc9589ce71a85760a52cfa592b3d8914a4e998a7c07285031" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 119, + "startColumn": 3, + "charOffset": 3242, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 117, + "startColumn": 3, + "charOffset": 3218, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"onLogin\";\n\n\t\tcase CREATURE_EVENT_LOGOUT:\n\t\t\treturn \"onLogout\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b734888dabdb1f452de4674acb23b9f345ac0719a0807ea1de26a28826cfd3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 122, + "startColumn": 3, + "charOffset": 3295, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 120, + "startColumn": 3, + "charOffset": 3270, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"onLogout\";\n\n\t\tcase CREATURE_EVENT_THINK:\n\t\t\treturn \"onThink\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65c4400bbc91a0437c95ef7954d4b5823796249ade51cd1db1de4c2caff7b494" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 125, + "startColumn": 3, + "charOffset": 3346, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 123, + "startColumn": 3, + "charOffset": 3322, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"onThink\";\n\n\t\tcase CREATURE_EVENT_PREPAREDEATH:\n\t\t\treturn \"onPrepareDeath\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd6d01c0a425efadd47e0ddb9207ec91e760eaa00f67aa3170da666873ca3b85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 128, + "startColumn": 3, + "charOffset": 3411, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 126, + "startColumn": 3, + "charOffset": 3380, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"onPrepareDeath\";\n\n\t\tcase CREATURE_EVENT_DEATH:\n\t\t\treturn \"onDeath\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd675f6d8cfbf79820dbdc793b3455d86be6b42215a1e32a3514a150f95e76ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 131, + "startColumn": 3, + "charOffset": 3462, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 129, + "startColumn": 3, + "charOffset": 3438, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"onDeath\";\n\n\t\tcase CREATURE_EVENT_KILL:\n\t\t\treturn \"onKill\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d6cd624b890b63a5b529e4b79807a0efa9fffa45b7671dbf3ce2ac567f2018d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 134, + "startColumn": 3, + "charOffset": 3511, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 132, + "startColumn": 3, + "charOffset": 3488, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"onKill\";\n\n\t\tcase CREATURE_EVENT_ADVANCE:\n\t\t\treturn \"onAdvance\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fa5ab8a9b642dd65c736ace09c048f3e04ce92b95c1cbe4b755be8c32b7f0f4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 137, + "startColumn": 3, + "charOffset": 3566, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 135, + "startColumn": 3, + "charOffset": 3540, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"onAdvance\";\n\n\t\tcase CREATURE_EVENT_MODALWINDOW:\n\t\t\treturn \"onModalWindow\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e1cf93d200d641322a4325ea829c68b0008b4529278742dc0a10614663c90465" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 140, + "startColumn": 3, + "charOffset": 3629, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 138, + "startColumn": 3, + "charOffset": 3599, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"onModalWindow\";\n\n\t\tcase CREATURE_EVENT_TEXTEDIT:\n\t\t\treturn \"onTextEdit\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed3c49db4ff8462af944578ca4470861c8c9338b22c40a6114f855e190631ae0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 143, + "startColumn": 3, + "charOffset": 3686, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 141, + "startColumn": 3, + "charOffset": 3659, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"onTextEdit\";\n\n\t\tcase CREATURE_EVENT_HEALTHCHANGE:\n\t\t\treturn \"onHealthChange\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2eec15011b0bb00adfebcb7dbddad6244def08f9199b6b34cf5da5d1c43098a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 146, + "startColumn": 3, + "charOffset": 3751, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 144, + "startColumn": 3, + "charOffset": 3720, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"onHealthChange\";\n\n\t\tcase CREATURE_EVENT_MANACHANGE:\n\t\t\treturn \"onManaChange\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0ba36669615a3029facfca53c146ed9a5cc9acb85c7120308de45bcb9c798e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 149, + "startColumn": 3, + "charOffset": 3812, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 147, + "startColumn": 3, + "charOffset": 3783, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn \"onManaChange\";\n\n\t\tcase CREATURE_EVENT_EXTENDED_OPCODE:\n\t\t\treturn \"onExtendedOpcode\";\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fca82afa06cad670158556153f310318cb5ebe78c437971a8559157a535814eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 153, + "startColumn": 3, + "charOffset": 3910, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 151, + "startColumn": 3, + "charOffset": 3879, + "charLength": 7, + "snippet": { + "text": "\n\t\tcase CREATURE_EVENT_NONE:\n\t\tdefault:\n\t\t\treturn std::string();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23c6ccba463ef64fce517ba60da48f0276acd9a842720bd4816cf6a9b1cb6751" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 153, + "startColumn": 3, + "charOffset": 3910, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 151, + "startColumn": 3, + "charOffset": 3879, + "charLength": 7, + "snippet": { + "text": "\n\t\tcase CREATURE_EVENT_NONE:\n\t\tdefault:\n\t\t\treturn std::string();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f0b407fce34cb703c5344ce50bdd39e094b5cc1200f885fb52fd7b3e5345eb8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-return-braced-init-list", + "ruleIndex": 630, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 154, + "startColumn": 11, + "charOffset": 3929, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 11, + "charOffset": 3880, + "charLength": 3, + "snippet": { + "text": "\t\tcase CREATURE_EVENT_NONE:\n\t\tdefault:\n\t\t\treturn std::string();\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81a69fe2b32ec9fd27ff249ec7072bb883fda1dc055add81e14663cd53f280d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'creatureEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 158, + "startColumn": 68, + "charOffset": 4017, + "charLength": 13, + "snippet": { + "text": "creatureEvent" + } + }, + "contextRegion": { + "startLine": 156, + "startColumn": 68, + "charOffset": 3947, + "charLength": 13, + "snippet": { + "text": "}\n\nvoid CreatureEvent::copyEvent(const std::shared_ptr creatureEvent) {\n\tsetScriptId(creatureEvent->getScriptId());\n\tsetScriptInterface(creatureEvent->getScriptInterface());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "532c1269c84f8b9927b5a24089277eb6f9624277ba665f3e37036eeeebb7d5a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 172, + "startColumn": 60, + "charOffset": 4415, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 60, + "charOffset": 4353, + "charLength": 6, + "snippet": { + "text": "}\n\nbool CreatureEvent::executeOnLogin(std::shared_ptr player) const {\n\t// onLogin(player)\n\tif (!getScriptInterface()->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c67ac669e88cbc19d96de7e8a234dfb61bbc8893a8d07af0d435617e354e0692" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 174, + "startColumn": 7, + "charOffset": 4457, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 172, + "startColumn": 7, + "charOffset": 4356, + "charLength": 18, + "snippet": { + "text": "bool CreatureEvent::executeOnLogin(std::shared_ptr player) const {\n\t// onLogin(player)\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[CreatureEvent::executeOnLogin - Player {} event {}]\"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e897074a09f4230dcf7462337e23608bc7dc083513f1c47e9cceadd3e2ac1bae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 181, + "startColumn": 27, + "charOffset": 4754, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 179, + "startColumn": 27, + "charOffset": 4724, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\n\tenv->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25c65cd1381a792660ba0f898512eae0592466185ae46de02a3cf330950ca65e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 186, + "startColumn": 24, + "charOffset": 4926, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 184, + "startColumn": 24, + "charOffset": 4849, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = getScriptInterface()->getLuaState();\n\n\tgetScriptInterface()->pushFunction(getScriptId());\n\tLuaScriptInterface::pushUserdata(L, player);\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c49975e37e953834f074008e5fc2e6c7e0ca7fb0e337474bfc8fa598a3bea042" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 192, + "startColumn": 61, + "charOffset": 5163, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 190, + "startColumn": 61, + "charOffset": 5100, + "charLength": 6, + "snippet": { + "text": "}\n\nbool CreatureEvent::executeOnLogout(std::shared_ptr player) const {\n\t// onLogout(player)\n\tif (!getScriptInterface()->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05d79c493183e4b6ab5fe5512ea77759bf80fab2acc1f7f1f96e0c1627255018" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 194, + "startColumn": 7, + "charOffset": 5206, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 192, + "startColumn": 7, + "charOffset": 5103, + "charLength": 18, + "snippet": { + "text": "bool CreatureEvent::executeOnLogout(std::shared_ptr player) const {\n\t// onLogout(player)\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[CreatureEvent::executeOnLogout - Player {} event {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1fad62598290eab6fa52132a62ee0021e75712274402f12aa7322d015d0f1885" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 201, + "startColumn": 27, + "charOffset": 5505, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 27, + "charOffset": 5475, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\n\tenv->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d6708467894b75bc5f7273b65906ecc4f80158656a7a39538971825e16a95ac9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 206, + "startColumn": 24, + "charOffset": 5677, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 204, + "startColumn": 24, + "charOffset": 5600, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = getScriptInterface()->getLuaState();\n\n\tgetScriptInterface()->pushFunction(getScriptId());\n\tLuaScriptInterface::pushUserdata(L, player);\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9288df68e4de5d4ede972b3ebd4e39831cdeb36bf4bfa3696457c2d572d50a7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 212, + "startColumn": 62, + "charOffset": 5915, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 210, + "startColumn": 62, + "charOffset": 5851, + "charLength": 8, + "snippet": { + "text": "}\n\nbool CreatureEvent::executeOnThink(std::shared_ptr creature, uint32_t interval) const {\n\t// onThink(creature, interval)\n\tif (!getScriptInterface()->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4e676546ce02ceeaf92e77fc89478b049c76657473959f40af79eb41a0a9882" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 214, + "startColumn": 7, + "charOffset": 5990, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 7, + "charOffset": 5854, + "charLength": 18, + "snippet": { + "text": "bool CreatureEvent::executeOnThink(std::shared_ptr creature, uint32_t interval) const {\n\t// onThink(creature, interval)\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[CreatureEvent::executeOnThink - Creature {} event {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4296d425a5ec5016fa55e093a94d4986d9b40a0ab30b2d82e64ac9d6081c6484" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 221, + "startColumn": 27, + "charOffset": 6292, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 219, + "startColumn": 27, + "charOffset": 6262, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\n\tenv->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e6b9f4015f0b5bd6c9dd784c57ee6929d11f16491afacd6e2f72081fb118a96" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 226, + "startColumn": 24, + "charOffset": 6464, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 224, + "startColumn": 24, + "charOffset": 6387, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = getScriptInterface()->getLuaState();\n\n\tgetScriptInterface()->pushFunction(getScriptId());\n\tLuaScriptInterface::pushUserdata(L, creature);\n\tLuaScriptInterface::setCreatureMetatable(L, -1, creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7e34e53a768d50092f734bc6bfba55fe3b1ba3f9e9a76f85d3c7960a692fdb7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 229, + "startColumn": 20, + "charOffset": 6630, + "charLength": 8, + "snippet": { + "text": "interval" + } + }, + "contextRegion": { + "startLine": 227, + "startColumn": 20, + "charOffset": 6493, + "charLength": 8, + "snippet": { + "text": "\tLuaScriptInterface::pushUserdata(L, creature);\n\tLuaScriptInterface::setCreatureMetatable(L, -1, creature);\n\tlua_pushnumber(L, interval);\n\n\treturn getScriptInterface()->callFunction(2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "de4d0c1cee9bc1aef01bed0c286a9d8be18552bf0951966e690df57f32834a9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 234, + "startColumn": 69, + "charOffset": 6760, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 232, + "startColumn": 69, + "charOffset": 6689, + "charLength": 8, + "snippet": { + "text": "}\n\nbool CreatureEvent::executeOnPrepareDeath(std::shared_ptr creature, std::shared_ptr killer) const {\n\t// onPrepareDeath(creature, killer)\n\tif (!getScriptInterface()->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d71f1406ed4c17eff048e416a5c9ba15e27bf0ca2885fcccefb9b6e135d0ad9b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'killer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 234, + "startColumn": 105, + "charOffset": 6796, + "charLength": 6, + "snippet": { + "text": "killer" + } + }, + "contextRegion": { + "startLine": 232, + "startColumn": 105, + "charOffset": 6689, + "charLength": 6, + "snippet": { + "text": "}\n\nbool CreatureEvent::executeOnPrepareDeath(std::shared_ptr creature, std::shared_ptr killer) const {\n\t// onPrepareDeath(creature, killer)\n\tif (!getScriptInterface()->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be2c58f42b954b690d88d3d96366552d07852c242a9d320b5f3b2ef4ac0166cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 236, + "startColumn": 7, + "charOffset": 6855, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 234, + "startColumn": 7, + "charOffset": 6692, + "charLength": 18, + "snippet": { + "text": "bool CreatureEvent::executeOnPrepareDeath(std::shared_ptr creature, std::shared_ptr killer) const {\n\t// onPrepareDeath(creature, killer)\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[CreatureEvent::executeOnPrepareDeath - Creature {} killer {}\"\n\t\t \" event {}] Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f4f79ed82d4615c60ee0ce839d096da5cca10bfd50721354015adae46275ca1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 243, + "startColumn": 27, + "charOffset": 7193, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 27, + "charOffset": 7163, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\n\tenv->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a83a4d26b7b7722227e2fa9720a31afff6f10cd3ebae73f6c84acb1e5901054" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 248, + "startColumn": 24, + "charOffset": 7365, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 246, + "startColumn": 24, + "charOffset": 7288, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = getScriptInterface()->getLuaState();\n\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61bb75dd7251112c47c6e60ff3ae1bb4cf930681a79814fa52b17fa338da1ebc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 263, + "startColumn": 62, + "charOffset": 7788, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 261, + "startColumn": 62, + "charOffset": 7724, + "charLength": 8, + "snippet": { + "text": "}\n\nbool CreatureEvent::executeOnDeath(std::shared_ptr creature, std::shared_ptr corpse, std::shared_ptr killer, std::shared_ptr mostDamageKiller, bool lastHitUnjustified, bool mostDamageUnjustified) const {\n\t// onDeath(creature, corpse, lasthitkiller, mostdamagekiller, lasthitunjustified, mostdamageunjustified)\n\tif (!getScriptInterface()->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aa680205c71ebb33f4660003541e49bd7366134a967e14bddb4674c8428e1fcf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 263, + "startColumn": 94, + "charOffset": 7820, + "charLength": 6, + "snippet": { + "text": "corpse" + } + }, + "contextRegion": { + "startLine": 261, + "startColumn": 94, + "charOffset": 7724, + "charLength": 6, + "snippet": { + "text": "}\n\nbool CreatureEvent::executeOnDeath(std::shared_ptr creature, std::shared_ptr corpse, std::shared_ptr killer, std::shared_ptr mostDamageKiller, bool lastHitUnjustified, bool mostDamageUnjustified) const {\n\t// onDeath(creature, corpse, lasthitkiller, mostdamagekiller, lasthitunjustified, mostdamageunjustified)\n\tif (!getScriptInterface()->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b43d160abea698688e5aa98a32adc05d39c343a02d72c3106580f0932231dd7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'killer' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 263, + "startColumn": 128, + "charOffset": 7854, + "charLength": 6, + "snippet": { + "text": "killer" + } + }, + "contextRegion": { + "startLine": 261, + "startColumn": 128, + "charOffset": 7724, + "charLength": 6, + "snippet": { + "text": "}\n\nbool CreatureEvent::executeOnDeath(std::shared_ptr creature, std::shared_ptr corpse, std::shared_ptr killer, std::shared_ptr mostDamageKiller, bool lastHitUnjustified, bool mostDamageUnjustified) const {\n\t// onDeath(creature, corpse, lasthitkiller, mostdamagekiller, lasthitunjustified, mostdamageunjustified)\n\tif (!getScriptInterface()->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1d06e23998304157fd254cccd939acc1ae93a2cb0b12d6765d7b5a8589d3697" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'mostDamageKiller' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 263, + "startColumn": 162, + "charOffset": 7888, + "charLength": 16, + "snippet": { + "text": "mostDamageKiller" + } + }, + "contextRegion": { + "startLine": 261, + "startColumn": 162, + "charOffset": 7724, + "charLength": 16, + "snippet": { + "text": "}\n\nbool CreatureEvent::executeOnDeath(std::shared_ptr creature, std::shared_ptr corpse, std::shared_ptr killer, std::shared_ptr mostDamageKiller, bool lastHitUnjustified, bool mostDamageUnjustified) const {\n\t// onDeath(creature, corpse, lasthitkiller, mostdamagekiller, lasthitunjustified, mostdamageunjustified)\n\tif (!getScriptInterface()->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14d54fb9e64988930cf50c03d40295ae7a406af6ea85aaf130b47964c60f2dc0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 265, + "startColumn": 7, + "charOffset": 8079, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 263, + "startColumn": 7, + "charOffset": 7727, + "charLength": 18, + "snippet": { + "text": "bool CreatureEvent::executeOnDeath(std::shared_ptr creature, std::shared_ptr corpse, std::shared_ptr killer, std::shared_ptr mostDamageKiller, bool lastHitUnjustified, bool mostDamageUnjustified) const {\n\t// onDeath(creature, corpse, lasthitkiller, mostdamagekiller, lasthitunjustified, mostdamageunjustified)\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[CreatureEvent::executeOnDeath - Creature {} killer {} event {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb1b3e3f7668847fc65dbb9bd26a8b516dfbfca960cfcc4e835afcd152507ff6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 272, + "startColumn": 27, + "charOffset": 8410, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 270, + "startColumn": 27, + "charOffset": 8380, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\n\tenv->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c069f563671e00a79f4b53935dd918f04caa3f97ec6412e3791abbef0ba8843" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 277, + "startColumn": 24, + "charOffset": 8582, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 275, + "startColumn": 24, + "charOffset": 8505, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = getScriptInterface()->getLuaState();\n\n\tgetScriptInterface()->pushFunction(getScriptId());\n\tLuaScriptInterface::pushUserdata(L, creature);\n\tLuaScriptInterface::setCreatureMetatable(L, -1, creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9d48e8b899e194b0e346e38e91918826682a2a38422b4fbe1fb99234e1ee99bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 300, + "startColumn": 44, + "charOffset": 9291, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 298, + "startColumn": 44, + "charOffset": 9187, + "charLength": 1, + "snippet": { + "text": "\tLuaScriptInterface::pushBoolean(L, mostDamageUnjustified);\n\n\treturn getScriptInterface()->callFunction(6);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24e94853ffe8df5b17e5a0b87b0b7328bc5ea07865def9f0ed2dd28e1ffcad22" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 303, + "startColumn": 60, + "charOffset": 9357, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 301, + "startColumn": 60, + "charOffset": 9295, + "charLength": 6, + "snippet": { + "text": "}\n\nbool CreatureEvent::executeAdvance(std::shared_ptr player, skills_t skill, uint32_t oldLevel, uint32_t newLevel) const {\n\t// onAdvance(player, skill, oldLevel, newLevel)\n\tif (!getScriptInterface()->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb6971dbd0dcf8a73a0ce368c8215a82f58949265d5c87c32921e659703d824f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 305, + "startColumn": 7, + "charOffset": 9482, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 303, + "startColumn": 7, + "charOffset": 9298, + "charLength": 18, + "snippet": { + "text": "bool CreatureEvent::executeAdvance(std::shared_ptr player, skills_t skill, uint32_t oldLevel, uint32_t newLevel) const {\n\t// onAdvance(player, skill, oldLevel, newLevel)\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[CreatureEvent::executeAdvance - Player {} event {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f676a40f80a1e90f3085802c6ea4e765351d532001a245f3c31264ebbbf6389" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 312, + "startColumn": 27, + "charOffset": 9780, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 310, + "startColumn": 27, + "charOffset": 9750, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\n\tenv->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bed92cbe2ff55a0f7f7fee7460a8a3c8976a839f106207f51b65b1d64daa9beb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 317, + "startColumn": 24, + "charOffset": 9952, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 315, + "startColumn": 24, + "charOffset": 9875, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = getScriptInterface()->getLuaState();\n\n\tgetScriptInterface()->pushFunction(getScriptId());\n\tLuaScriptInterface::pushUserdata(L, player);\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e58a2cc9c759605f1659534bc60c0f01d06659c245219daa0af8290ba3d44a47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 320, + "startColumn": 20, + "charOffset": 10098, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 318, + "startColumn": 20, + "charOffset": 9981, + "charLength": 11, + "snippet": { + "text": "\tLuaScriptInterface::pushUserdata(L, player);\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n\tlua_pushnumber(L, static_cast(skill));\n\tlua_pushnumber(L, oldLevel);\n\tlua_pushnumber(L, newLevel);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbef9501f0c3fefa4003dca7cedb8a10ce4509187dc899e42e1e4edad97ec419" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 321, + "startColumn": 20, + "charOffset": 10148, + "charLength": 8, + "snippet": { + "text": "oldLevel" + } + }, + "contextRegion": { + "startLine": 319, + "startColumn": 20, + "charOffset": 10027, + "charLength": 8, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n\tlua_pushnumber(L, static_cast(skill));\n\tlua_pushnumber(L, oldLevel);\n\tlua_pushnumber(L, newLevel);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21a2a516e4c40d22cecf817e5cecb79af9bbfd09b194b49a4d28072f4ba2da65" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 322, + "startColumn": 20, + "charOffset": 10178, + "charLength": 8, + "snippet": { + "text": "newLevel" + } + }, + "contextRegion": { + "startLine": 320, + "startColumn": 20, + "charOffset": 10079, + "charLength": 8, + "snippet": { + "text": "\tlua_pushnumber(L, static_cast(skill));\n\tlua_pushnumber(L, oldLevel);\n\tlua_pushnumber(L, newLevel);\n\n\treturn getScriptInterface()->callFunction(4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1fac927337946e2cb7a2056478735da38077207a3228f2dfc48d58c20ea063e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 330, + "startColumn": 61, + "charOffset": 10394, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 328, + "startColumn": 61, + "charOffset": 10244, + "charLength": 8, + "snippet": { + "text": " * @deprecated Prefer using registered onDeath events instead for better performance.\n */\nvoid CreatureEvent::executeOnKill(std::shared_ptr creature, std::shared_ptr target, bool lastHit) const {\n\t// onKill(creature, target, lastHit)\n\tg_logger().warn(\"[CreatureEvent::executeOnKill - Creature {} target {} event {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b822b1d3b18b5adb5040676f82dacb32de4f1d8ccb55ad3d5563eb4bcd2179f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 330, + "startColumn": 97, + "charOffset": 10430, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 328, + "startColumn": 97, + "charOffset": 10244, + "charLength": 6, + "snippet": { + "text": " * @deprecated Prefer using registered onDeath events instead for better performance.\n */\nvoid CreatureEvent::executeOnKill(std::shared_ptr creature, std::shared_ptr target, bool lastHit) const {\n\t// onKill(creature, target, lastHit)\n\tg_logger().warn(\"[CreatureEvent::executeOnKill - Creature {} target {} event {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3e27c705a18dfc3b9e6a7b48368daca25585983ce6c23c18d761b05ebb7bd4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 335, + "startColumn": 7, + "charOffset": 10771, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 333, + "startColumn": 7, + "charOffset": 10582, + "charLength": 18, + "snippet": { + "text": "\t \"Deprecated use of onKill event. Use registered onDeath events instead for better performance.\",\n\t creature->getName(), target->getName(), getName());\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[CreatureEvent::executeOnKill - Creature {} target {} event {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be1b11aabf27081903d8d2bce07c085c9ea936d4d8e00a338d7a2369f88ec23f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 342, + "startColumn": 27, + "charOffset": 11095, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 340, + "startColumn": 27, + "charOffset": 11065, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\n\tenv->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ddc68fe05f868aef1e37d34ff0d14fd243483fe3ef19bd6607894b2355f4062" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 347, + "startColumn": 24, + "charOffset": 11267, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 345, + "startColumn": 24, + "charOffset": 11190, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = getScriptInterface()->getLuaState();\n\n\tgetScriptInterface()->pushFunction(getScriptId());\n\tLuaScriptInterface::pushUserdata(L, creature);\n\tLuaScriptInterface::setCreatureMetatable(L, -1, creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1264f3ef6741a047671fa3b27885252435871b27c8ccbbaba7615d837c55464b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 356, + "startColumn": 64, + "charOffset": 11684, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 354, + "startColumn": 64, + "charOffset": 11618, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid CreatureEvent::executeModalWindow(std::shared_ptr player, uint32_t modalWindowId, uint8_t buttonId, uint8_t choiceId) const {\n\t// onModalWindow(player, modalWindowId, buttonId, choiceId)\n\tif (!getScriptInterface()->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba1516f72c517f2e0d6656c1231781e1d4cf984c943fabfbb83190743f6cb476" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 358, + "startColumn": 7, + "charOffset": 11827, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 356, + "startColumn": 7, + "charOffset": 11621, + "charLength": 18, + "snippet": { + "text": "void CreatureEvent::executeModalWindow(std::shared_ptr player, uint32_t modalWindowId, uint8_t buttonId, uint8_t choiceId) const {\n\t// onModalWindow(player, modalWindowId, buttonId, choiceId)\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[CreatureEvent::executeModalWindow - \"\n\t\t \"Player {} modaw window id {} event {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ee53de3a9a2eb56e37381c1a57a5d56e309e755b98f6eaed0254ea5853c9371" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 366, + "startColumn": 27, + "charOffset": 12179, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 364, + "startColumn": 27, + "charOffset": 12149, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\n\tenv->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8e8bdb966315c261feae5a3265ede9a5dccc3851ecf3c188757e5bc8c1f51eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 370, + "startColumn": 24, + "charOffset": 12350, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 368, + "startColumn": 24, + "charOffset": 12273, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c49975e37e953834f074008e5fc2e6c7e0ca7fb0e337474bfc8fa598a3bea042" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 375, + "startColumn": 20, + "charOffset": 12498, + "charLength": 13, + "snippet": { + "text": "modalWindowId" + } + }, + "contextRegion": { + "startLine": 373, + "startColumn": 20, + "charOffset": 12426, + "charLength": 13, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n\n\tlua_pushnumber(L, modalWindowId);\n\tlua_pushnumber(L, buttonId);\n\tlua_pushnumber(L, choiceId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01563efd80f756e2cb848737f6dfb7265f66a3a6536a72f63798513f04ce51d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 376, + "startColumn": 20, + "charOffset": 12533, + "charLength": 8, + "snippet": { + "text": "buttonId" + } + }, + "contextRegion": { + "startLine": 374, + "startColumn": 20, + "charOffset": 12478, + "charLength": 8, + "snippet": { + "text": "\n\tlua_pushnumber(L, modalWindowId);\n\tlua_pushnumber(L, buttonId);\n\tlua_pushnumber(L, choiceId);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3d0b357999ebc4d5ed11dc56307c4a29c0a1a154a8229db853e62eb00d82d81" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 377, + "startColumn": 20, + "charOffset": 12563, + "charLength": 8, + "snippet": { + "text": "choiceId" + } + }, + "contextRegion": { + "startLine": 375, + "startColumn": 20, + "charOffset": 12479, + "charLength": 8, + "snippet": { + "text": "\tlua_pushnumber(L, modalWindowId);\n\tlua_pushnumber(L, buttonId);\n\tlua_pushnumber(L, choiceId);\n\n\tgetScriptInterface()->callVoidFunction(4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "457eed7ac024bf797e5b14542a9d6c4f0df16191bdd0da3516d67848da3a7458" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 382, + "startColumn": 61, + "charOffset": 12682, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 380, + "startColumn": 61, + "charOffset": 12619, + "charLength": 6, + "snippet": { + "text": "}\n\nbool CreatureEvent::executeTextEdit(std::shared_ptr player, std::shared_ptr item, const std::string &text) const {\n\t// onTextEdit(player, item, text)\n\tif (!getScriptInterface()->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0dc0ebbf59608a4073b84be2ba16cc9b663f46770600aed2a5d65d719c8ea787" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 382, + "startColumn": 91, + "charOffset": 12712, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 380, + "startColumn": 91, + "charOffset": 12619, + "charLength": 4, + "snippet": { + "text": "}\n\nbool CreatureEvent::executeTextEdit(std::shared_ptr player, std::shared_ptr item, const std::string &text) const {\n\t// onTextEdit(player, item, text)\n\tif (!getScriptInterface()->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93744f876cd3763c030daf001fb59113e299a9ac126ebd0efe63f5a443f772b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 384, + "startColumn": 7, + "charOffset": 12792, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 382, + "startColumn": 7, + "charOffset": 12622, + "charLength": 18, + "snippet": { + "text": "bool CreatureEvent::executeTextEdit(std::shared_ptr player, std::shared_ptr item, const std::string &text) const {\n\t// onTextEdit(player, item, text)\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[CreatureEvent::executeTextEdit - Player {} event {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68cde95716ca6a55d9a596bff7b55c4b7ec9f2b9ad6d4deb6afb2515ae640621" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 391, + "startColumn": 27, + "charOffset": 13091, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 389, + "startColumn": 27, + "charOffset": 13061, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\n\tenv->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2e39a587ddd50cd9afd97079dd01efe762520a5952025874c8b0aa8f4c584e2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 395, + "startColumn": 24, + "charOffset": 13262, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 393, + "startColumn": 24, + "charOffset": 13185, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da98764fa2d1daaf3b2d96f5822892ac7428f93ad51b0695783bcdf533ee0800" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 406, + "startColumn": 67, + "charOffset": 13591, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 404, + "startColumn": 67, + "charOffset": 13522, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid CreatureEvent::executeHealthChange(std::shared_ptr creature, std::shared_ptr attacker, CombatDamage &damage) const {\n\t// onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)\n\tif (!getScriptInterface()->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43958eb441e476c0139a9d86249d13a8831699e6223e50f3aad75127018ba3d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 406, + "startColumn": 103, + "charOffset": 13627, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 404, + "startColumn": 103, + "charOffset": 13522, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid CreatureEvent::executeHealthChange(std::shared_ptr creature, std::shared_ptr attacker, CombatDamage &damage) const {\n\t// onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)\n\tif (!getScriptInterface()->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a52b0bde41d07cf813904d8f9dc2bf6e66aa9c8d6cdfdef9a3d5cf4330892c6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 408, + "startColumn": 7, + "charOffset": 13780, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 406, + "startColumn": 7, + "charOffset": 13525, + "charLength": 18, + "snippet": { + "text": "void CreatureEvent::executeHealthChange(std::shared_ptr creature, std::shared_ptr attacker, CombatDamage &damage) const {\n\t// onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[CreatureEvent::executeHealthChange - \"\n\t\t \"Creature {} attacker {} event {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8e8cebe4e1bae20866ebf695ebb1af9040ebbca3e7a5906c2de803d939b5dd2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 416, + "startColumn": 27, + "charOffset": 14136, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 414, + "startColumn": 27, + "charOffset": 14106, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\n\tenv->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb2fc2a964f8f2e6c1818ce1b51ce48a4fab3466aaaad8581bb0861ec1de5f3e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 420, + "startColumn": 24, + "charOffset": 14307, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 418, + "startColumn": 24, + "charOffset": 14230, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c87303326a69ac10cb5590f2ff75887d3349000ad313e670ad025fbfc691bff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 433, + "startColumn": 6, + "charOffset": 14660, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 431, + "startColumn": 6, + "charOffset": 14604, + "charLength": 18, + "snippet": { + "text": "\tLuaScriptInterface::pushCombatDamage(L, damage);\n\n\tif (getScriptInterface()->protectedCall(L, 7, 4) != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52bbe6ea52413095117d18efca905f00bb43bbe05d58ca3ad226e7649aa9cd96" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 433, + "startColumn": 45, + "charOffset": 14699, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 431, + "startColumn": 45, + "charOffset": 14604, + "charLength": 1, + "snippet": { + "text": "\tLuaScriptInterface::pushCombatDamage(L, damage);\n\n\tif (getScriptInterface()->protectedCall(L, 7, 4) != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d7a194c6e55b869484f4db09899a50289e8cdbbac756330e0b59d81e2e796855" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 448, + "startColumn": 2, + "charOffset": 15297, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 446, + "startColumn": 2, + "charOffset": 15292, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tgetScriptInterface()->resetScriptEnv();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d3a70c91f2fe9b60c5ecd1db5bd0cbe4f2c1fda1f06b36f8523f77772312d21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 451, + "startColumn": 65, + "charOffset": 15404, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 449, + "startColumn": 65, + "charOffset": 15337, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid CreatureEvent::executeManaChange(std::shared_ptr creature, std::shared_ptr attacker, CombatDamage &damage) const {\n\t// onManaChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)\n\tif (!getScriptInterface()->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e1cce259c9d16384cc4d862b2b05aa7feb50e6613f891ca0154dca037248798" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 451, + "startColumn": 101, + "charOffset": 15440, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 449, + "startColumn": 101, + "charOffset": 15337, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid CreatureEvent::executeManaChange(std::shared_ptr creature, std::shared_ptr attacker, CombatDamage &damage) const {\n\t// onManaChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)\n\tif (!getScriptInterface()->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f4f0a2cd4a5f0f0e397a41ffc90e818ec92c5889653513b902b44770b5896fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 453, + "startColumn": 7, + "charOffset": 15591, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 451, + "startColumn": 7, + "charOffset": 15340, + "charLength": 18, + "snippet": { + "text": "void CreatureEvent::executeManaChange(std::shared_ptr creature, std::shared_ptr attacker, CombatDamage &damage) const {\n\t// onManaChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[CreatureEvent::executeManaChange - \"\n\t\t \"Creature {} attacker {} event {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a155689cfd878dfea85a70270c32004ebc9136c796b76fc3ecb8eced073f39a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 461, + "startColumn": 27, + "charOffset": 15945, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 459, + "startColumn": 27, + "charOffset": 15915, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\n\tenv->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4ad2a9219cc2e7e26ff1e8c71bc0e1c04b3abea889a2514ad9a919c9563a760" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 465, + "startColumn": 24, + "charOffset": 16116, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 463, + "startColumn": 24, + "charOffset": 16039, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = getScriptInterface()->getLuaState();\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40753de051fe2b70514fd8aac539b2f428110821ab1144922f80910586bb1dea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 478, + "startColumn": 6, + "charOffset": 16469, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 476, + "startColumn": 6, + "charOffset": 16413, + "charLength": 18, + "snippet": { + "text": "\tLuaScriptInterface::pushCombatDamage(L, damage);\n\n\tif (getScriptInterface()->protectedCall(L, 7, 4) != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1490a1940d799c3007a337f7e08b1463e3b814f6180eb2b60108e6185ac2d56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 478, + "startColumn": 45, + "charOffset": 16508, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 476, + "startColumn": 45, + "charOffset": 16413, + "charLength": 1, + "snippet": { + "text": "\tLuaScriptInterface::pushCombatDamage(L, damage);\n\n\tif (getScriptInterface()->protectedCall(L, 7, 4) != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c0c3a4954eb3750278f136bbe0a7e4f53774fafefd4bf8c10b4e4b7addcc98b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 488, + "startColumn": 2, + "charOffset": 16932, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 486, + "startColumn": 2, + "charOffset": 16927, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tgetScriptInterface()->resetScriptEnv();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d04da2c1d51f63197db4d3f68facabd5f7ca67e654761bfedff59308278d6c1c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 491, + "startColumn": 67, + "charOffset": 17041, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 489, + "startColumn": 67, + "charOffset": 16972, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid CreatureEvent::executeExtendedOpcode(std::shared_ptr player, uint8_t opcode, const std::string &buffer) const {\n\t// onExtendedOpcode(player, opcode, buffer)\n\tif (!getScriptInterface()->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8897cffaa28673a47d2e299952daf02fd90e071ca18885da462b1df332a85776" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 493, + "startColumn": 7, + "charOffset": 17151, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 491, + "startColumn": 7, + "charOffset": 16975, + "charLength": 18, + "snippet": { + "text": "void CreatureEvent::executeExtendedOpcode(std::shared_ptr player, uint8_t opcode, const std::string &buffer) const {\n\t// onExtendedOpcode(player, opcode, buffer)\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[CreatureEvent::executeExtendedOpcode - \"\n\t\t \"Player {} event {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e919d54058b808b89b029f3d098163ef4bd02afb3822cf401edf5b2c47404b2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 501, + "startColumn": 27, + "charOffset": 17472, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 499, + "startColumn": 27, + "charOffset": 17442, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\n\tenv->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c23d8b4b27cadd9a638653fb093c03d0f0e44694c17577c77c2d2367d6076f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 506, + "startColumn": 24, + "charOffset": 17644, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 504, + "startColumn": 24, + "charOffset": 17567, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = getScriptInterface()->getLuaState();\n\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "562e71d815e020ca44b79156e5cd452d9e39b0250cb9daeb1adb1e8cf9afc262" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/creatureevent.cpp", + "index": 3 + }, + "region": { + "startLine": 511, + "startColumn": 20, + "charOffset": 17800, + "charLength": 6, + "snippet": { + "text": "opcode" + } + }, + "contextRegion": { + "startLine": 509, + "startColumn": 20, + "charOffset": 17728, + "charLength": 6, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n\n\tlua_pushnumber(L, opcode);\n\tLuaScriptInterface::pushString(L, buffer);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e830c0c245c2c963cf5cf977ff8418a512e3589725c3ae883868fccedb8c3be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 19, + "startColumn": 18, + "charOffset": 594, + "charLength": 9, + "snippet": { + "text": "initState" + } + }, + "contextRegion": { + "startLine": 17, + "startColumn": 18, + "charOffset": 520, + "charLength": 9, + "snippet": { + "text": "Events::Events() :\n\tscriptInterface(\"Event Interface\") {\n\tscriptInterface.initState();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "312bb66f6b4421155dc533389c4ebabb6195510fe80933a8e2c8552a3547bc26" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'loadFromXml' has cognitive complexity of 67 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 22, + "startColumn": 14, + "charOffset": 623, + "charLength": 11, + "snippet": { + "text": "loadFromXml" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 14, + "charOffset": 607, + "charLength": 11, + "snippet": { + "text": "}\n\nbool Events::loadFromXml() {\n\tpugi::xml_document doc;\n\tauto folder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + \"/events/events.xml\";" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e64721497d987cfc8e4f17b4ac269be5c18730c684f7390c9a13d4a8bb5ee1a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 26, + "startColumn": 6, + "charOffset": 830, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 24, + "startColumn": 6, + "charOffset": 664, + "charLength": 1, + "snippet": { + "text": "\tauto folder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + \"/events/events.xml\";\n\tpugi::xml_parse_result result = doc.load_file(folder.c_str());\n\tif (!result) {\n\t\tprintXMLError(__FUNCTION__, folder, result);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2ca249222a272193bc24e08e908ba4517874469db6cc086603c50f775fe1129" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 2, + "charOffset": 966, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 2, + "charOffset": 920, + "charLength": 3, + "snippet": { + "text": "\n\tphmap::flat_hash_set classes;\n\tfor (auto eventNode : doc.child(\"events\").children()) {\n\t\tif (!eventNode.attribute(\"enabled\").as_bool()) {\n\t\t\tcontinue;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f02e84aee13f843043d72fca985fc6094fef954e887c9020edd428b2db3efd2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-inefficient-string-concatenation", + "ruleIndex": 671, + "kind": "fail", + "level": "warning", + "message": { + "text": "string concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 65, + "charOffset": 1490, + "charLength": 1, + "snippet": { + "text": "+" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 65, + "charOffset": 1291, + "charLength": 1, + "snippet": { + "text": "\t\t\tconst std::string &scriptName = lowercase + \".lua\";\n\t\t\tauto coreFolder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__);\n\t\t\tif (scriptInterface.loadFile(coreFolder + \"/events/scripts/\" + scriptName, scriptName) != 0) {\n\t\t\t\tg_logger().warn(\"{} - Can not load script: {}.lua\", __FUNCTION__, lowercase);\n\t\t\t\tg_logger().warn(scriptInterface.getLastLuaError());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8747d2fb01f88ae7ac75f87cd1587faa13b0afa17929e8b52f3e083093cd6dac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 159, + "startColumn": 7, + "charOffset": 5818, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 157, + "startColumn": 7, + "charOffset": 5808, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"{} - \"\n\t\t \"Position {}\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f62299c495c795c43e546165837483a0e934efd50a51e91f2128f5a3d03155f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 27, + "charOffset": 6096, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 27, + "charOffset": 6066, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.monsterOnSpawn, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb49f9526da37ecf1ba86f2f6f1314af21c2b2de27295e85db18edafa94bfc26" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 171, + "startColumn": 18, + "charOffset": 6251, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 169, + "startColumn": 18, + "charOffset": 6186, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.monsterOnSpawn);\n\n\tLuaScriptInterface::pushUserdata(L, monster);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82336fbd9494091ae74713f25452863baafddb3b6332f4f48042b1af5d737d27" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 173, + "startColumn": 47, + "charOffset": 6333, + "charLength": 7, + "snippet": { + "text": "monster" + } + }, + "contextRegion": { + "startLine": 171, + "startColumn": 47, + "charOffset": 6234, + "charLength": 7, + "snippet": { + "text": "\tscriptInterface.pushFunction(info.monsterOnSpawn);\n\n\tLuaScriptInterface::pushUserdata(L, monster);\n\tLuaScriptInterface::setMetatable(L, -1, \"Monster\");\n\tLuaScriptInterface::pushPosition(L, position);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f48495ca07e6c2850b3699f8c525ba6f65ebb89a593f769a74281fd2e8b7541f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 177, + "startColumn": 6, + "charOffset": 6450, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 175, + "startColumn": 6, + "charOffset": 6396, + "charLength": 15, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, position);\n\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71b525b667a7973dc88445c009f7ef6f7560892138be9edf9e5f1f2a5f4798f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 183, + "startColumn": 2, + "charOffset": 6607, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 181, + "startColumn": 2, + "charOffset": 6602, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tscriptInterface.resetScriptEnv();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "feec179412e0c945801e91efa48738072c86cf79168d2334feaa1d5a729a5563" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 193, + "startColumn": 7, + "charOffset": 6841, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 191, + "startColumn": 7, + "charOffset": 6831, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"{} - \"\n\t\t \"Position {}\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "112b45c7f71f1c990abcc354874852559c5474bef05e09b09bd9f6277aec161b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 201, + "startColumn": 27, + "charOffset": 7119, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 27, + "charOffset": 7089, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.npcOnSpawn, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "feec179412e0c945801e91efa48738072c86cf79168d2334feaa1d5a729a5563" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 205, + "startColumn": 18, + "charOffset": 7270, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 203, + "startColumn": 18, + "charOffset": 7205, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.npcOnSpawn);\n\n\tLuaScriptInterface::pushUserdata(L, npc);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2ba1f42efa013e727a471453e6c58dda3e2ec568445c1eda995a3cc513e048cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'npc' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 207, + "startColumn": 43, + "charOffset": 7344, + "charLength": 3, + "snippet": { + "text": "npc" + } + }, + "contextRegion": { + "startLine": 205, + "startColumn": 43, + "charOffset": 7253, + "charLength": 3, + "snippet": { + "text": "\tscriptInterface.pushFunction(info.npcOnSpawn);\n\n\tLuaScriptInterface::pushUserdata(L, npc);\n\tLuaScriptInterface::setMetatable(L, -1, \"Npc\");\n\tLuaScriptInterface::pushPosition(L, position);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1d61c47c1605c46b5c8b8944a73c7085cbbf1e96c52bda6c11bbd3a3c6ae3009" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 211, + "startColumn": 6, + "charOffset": 7453, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 209, + "startColumn": 6, + "charOffset": 7399, + "charLength": 15, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, position);\n\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77dcd0c6c9e96e4ee11d983a8a168d161451b90e67974c8ce9b379bd195f739b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 217, + "startColumn": 2, + "charOffset": 7610, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 215, + "startColumn": 2, + "charOffset": 7605, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tscriptInterface.resetScriptEnv();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f62299c495c795c43e546165837483a0e934efd50a51e91f2128f5a3d03155f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 221, + "startColumn": 68, + "charOffset": 7726, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 219, + "startColumn": 68, + "charOffset": 7646, + "charLength": 8, + "snippet": { + "text": "\n// Creature\nbool Events::eventCreatureOnChangeOutfit(std::shared_ptr creature, const Outfit_t &outfit) {\n\t// Creature:onChangeOutfit(outfit) or Creature.onChangeOutfit(self, outfit)\n\tif (info.creatureOnChangeOutfit == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86f0eee59aedf318893842af878d59994bd79bc6ff1bffa6983c3cfcfb84f349" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 227, + "startColumn": 7, + "charOffset": 7906, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 225, + "startColumn": 7, + "charOffset": 7896, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventCreatureOnChangeOutfit - Creature {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "875aec4a75a84827a36ebac120e234ef8c9b5ceedd36eb37488778920e11e37e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 234, + "startColumn": 27, + "charOffset": 8188, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 232, + "startColumn": 27, + "charOffset": 8158, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.creatureOnChangeOutfit, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71965e327ed5dbc355492c621fd812cd10e5893b1c2aa0de18a58d342907e172" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 238, + "startColumn": 18, + "charOffset": 8351, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 236, + "startColumn": 18, + "charOffset": 8286, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.creatureOnChangeOutfit);\n\n\tLuaScriptInterface::pushUserdata(L, creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db4ab5f2cb7635b8ae0f038842e20f9bd3e0e5b328b7b9ada16bb7e5fc6e6161" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 248, + "startColumn": 73, + "charOffset": 8675, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 246, + "startColumn": 73, + "charOffset": 8600, + "charLength": 8, + "snippet": { + "text": "}\n\nReturnValue Events::eventCreatureOnAreaCombat(std::shared_ptr creature, std::shared_ptr tile, bool aggressive) {\n\t// Creature:onAreaCombat(tile, aggressive) or Creature.onAreaCombat(self, tile, aggressive)\n\tif (info.creatureOnAreaCombat == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f62de49124536ab6d1a90b23253601570e9cae44f534bbcfd8f728deef6c5cda" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 248, + "startColumn": 105, + "charOffset": 8707, + "charLength": 4, + "snippet": { + "text": "tile" + } + }, + "contextRegion": { + "startLine": 246, + "startColumn": 105, + "charOffset": 8600, + "charLength": 4, + "snippet": { + "text": "}\n\nReturnValue Events::eventCreatureOnAreaCombat(std::shared_ptr creature, std::shared_ptr tile, bool aggressive) {\n\t// Creature:onAreaCombat(tile, aggressive) or Creature.onAreaCombat(self, tile, aggressive)\n\tif (info.creatureOnAreaCombat == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "202a5c1f098b1618ef1eb6620987872780d0de504463bebc2772fe66c9d9139f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 254, + "startColumn": 7, + "charOffset": 8905, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 7, + "charOffset": 8895, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventCreatureOnAreaCombat - \"\n\t\t \"Creature {} on tile position {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e838b7a2cf3b54f58981f8d5a02b900bbb951dae653fc1a39c3a481b5497e8f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 262, + "startColumn": 27, + "charOffset": 9277, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 260, + "startColumn": 27, + "charOffset": 9247, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.creatureOnAreaCombat, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0fb88f818fda674c7bf7d525d43aa2fb90117bec3862bd26017bbc118c47ab3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 266, + "startColumn": 18, + "charOffset": 9438, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 264, + "startColumn": 18, + "charOffset": 9373, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.creatureOnAreaCombat);\n\n\tif (creature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c36900c908e9ac95933b33a7b18c9515301ec0ea83e0b14221e112383fd1fdfa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'returnValue' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 280, + "startColumn": 14, + "charOffset": 9813, + "charLength": 11, + "snippet": { + "text": "returnValue" + } + }, + "contextRegion": { + "startLine": 278, + "startColumn": 14, + "charOffset": 9750, + "charLength": 11, + "snippet": { + "text": "\tLuaScriptInterface::pushBoolean(L, aggressive);\n\n\tReturnValue returnValue;\n\tif (scriptInterface.protectedCall(L, 3, 1) != 0) {\n\t\treturnValue = RETURNVALUE_NOTPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20de27f8108e85192ccf8873967acbf3c3ed35cc7c5d989ac212d59438480200" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 281, + "startColumn": 6, + "charOffset": 9831, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 279, + "startColumn": 6, + "charOffset": 9799, + "charLength": 15, + "snippet": { + "text": "\n\tReturnValue returnValue;\n\tif (scriptInterface.protectedCall(L, 3, 1) != 0) {\n\t\treturnValue = RETURNVALUE_NOTPOSSIBLE;\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbd507c4a8e9eecbfbb6e3b285fec567f18c2cb50b5906757bb9ac8a9564c344" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 289, + "startColumn": 2, + "charOffset": 10096, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 287, + "startColumn": 2, + "charOffset": 10091, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tscriptInterface.resetScriptEnv();\n\treturn returnValue;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a76e14297fb775a227b78944b68b59926911dac87e676bc9ea3c4bae0066141" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 293, + "startColumn": 75, + "charOffset": 10228, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 291, + "startColumn": 75, + "charOffset": 10151, + "charLength": 8, + "snippet": { + "text": "}\n\nReturnValue Events::eventCreatureOnTargetCombat(std::shared_ptr creature, std::shared_ptr target) {\n\t// Creature:onTargetCombat(target) or Creature.onTargetCombat(self, target)\n\tif (info.creatureOnTargetCombat == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56b3410c682ff0787f074730e1e76a7e03abe5963afdc2342960e2059c903d19" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 293, + "startColumn": 111, + "charOffset": 10264, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 291, + "startColumn": 111, + "charOffset": 10151, + "charLength": 6, + "snippet": { + "text": "}\n\nReturnValue Events::eventCreatureOnTargetCombat(std::shared_ptr creature, std::shared_ptr target) {\n\t// Creature:onTargetCombat(target) or Creature.onTargetCombat(self, target)\n\tif (info.creatureOnTargetCombat == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b568d554a89d9e6abdfb448c7b758866bc3bed4308d3c1c94c93df269917a62b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 299, + "startColumn": 7, + "charOffset": 10433, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 297, + "startColumn": 7, + "charOffset": 10423, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventCreatureOnTargetCombat - \"\n\t\t \"Creature {} target {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a1c286986ead227e3c378b90422124961625a9d5970a3bd0fdd1367253ee54f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 307, + "startColumn": 27, + "charOffset": 10784, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 305, + "startColumn": 27, + "charOffset": 10754, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.creatureOnTargetCombat, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8eff0887ff5eb543c886861034dbcc03b5c3b720896544a1fb2c326b4c253c22" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 311, + "startColumn": 18, + "charOffset": 10947, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 309, + "startColumn": 18, + "charOffset": 10882, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.creatureOnTargetCombat);\n\n\tif (creature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a93193ee4f2587bfe678cad681f295949bd2a4da64cb638afbb5d2640fd7f9c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'returnValue' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 323, + "startColumn": 14, + "charOffset": 11288, + "charLength": 11, + "snippet": { + "text": "returnValue" + } + }, + "contextRegion": { + "startLine": 321, + "startColumn": 14, + "charOffset": 11216, + "charLength": 11, + "snippet": { + "text": "\tLuaScriptInterface::setCreatureMetatable(L, -1, target);\n\n\tReturnValue returnValue;\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\n\t\treturnValue = RETURNVALUE_NOTPOSSIBLE;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "facd036b49c6cd140c1bdde014d29dc5e33d81604cececf7b7d910d1760c6186" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 324, + "startColumn": 6, + "charOffset": 11306, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 322, + "startColumn": 6, + "charOffset": 11274, + "charLength": 15, + "snippet": { + "text": "\n\tReturnValue returnValue;\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\n\t\treturnValue = RETURNVALUE_NOTPOSSIBLE;\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8be60917bee3fda857abc4baacb32ef3ab7bf6919b74f755a63ed026f4dde67c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 332, + "startColumn": 2, + "charOffset": 11571, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 330, + "startColumn": 2, + "charOffset": 11566, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tscriptInterface.resetScriptEnv();\n\treturn returnValue;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f3870125e5dce09fbd9836eb38216d20c712e3400f130d42cc6fff2bb6cddbc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 336, + "startColumn": 60, + "charOffset": 11688, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 334, + "startColumn": 60, + "charOffset": 11626, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Events::eventCreatureOnHear(std::shared_ptr creature, std::shared_ptr speaker, const std::string &words, SpeakClasses type) {\n\t// Creature:onHear(speaker, words, type)\n\tif (info.creatureOnHear == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "501bb126f46ddaa795d7a03162e3af8fb79088c3575f1f85910a4006946beead" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'speaker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 336, + "startColumn": 96, + "charOffset": 11724, + "charLength": 7, + "snippet": { + "text": "speaker" + } + }, + "contextRegion": { + "startLine": 334, + "startColumn": 96, + "charOffset": 11626, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid Events::eventCreatureOnHear(std::shared_ptr creature, std::shared_ptr speaker, const std::string &words, SpeakClasses type) {\n\t// Creature:onHear(speaker, words, type)\n\tif (info.creatureOnHear == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a4e1f60789e141afaa003fcd52f71756699d8801b090f9c3c7dea43ec3b6f514" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 342, + "startColumn": 7, + "charOffset": 11876, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 340, + "startColumn": 7, + "charOffset": 11866, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventCreatureOnHear - \"\n\t\t \"Creature {} speaker {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be661a9f1b2f970718513557d5fd81b5b739966a3b44da9f5b7a0a1c2c4a9285" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 350, + "startColumn": 27, + "charOffset": 12197, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 348, + "startColumn": 27, + "charOffset": 12167, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.creatureOnHear, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da192d0e6b2109c214e0d471af2bc329f477125ac432151da67d7f0ceac408dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 354, + "startColumn": 18, + "charOffset": 12352, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 352, + "startColumn": 18, + "charOffset": 12287, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.creatureOnHear);\n\n\tLuaScriptInterface::pushUserdata(L, creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b1bcad72e04c417b62eeb7fefb25aa1d81496368018a589f45fd73199db3377f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 363, + "startColumn": 20, + "charOffset": 12686, + "charLength": 4, + "snippet": { + "text": "type" + } + }, + "contextRegion": { + "startLine": 361, + "startColumn": 20, + "charOffset": 12623, + "charLength": 4, + "snippet": { + "text": "\n\tLuaScriptInterface::pushString(L, words);\n\tlua_pushnumber(L, type);\n\n\tscriptInterface.callVoidFunction(4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eeef80305e878acdf452256cd6c72bd9d066065e5602341f0196cee62627904f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 368, + "startColumn": 67, + "charOffset": 12801, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 366, + "startColumn": 67, + "charOffset": 12732, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Events::eventCreatureOnDrainHealth(std::shared_ptr creature, std::shared_ptr attacker, CombatType_t &typePrimary, int32_t &damagePrimary, CombatType_t &typeSecondary, int32_t &damageSecondary, TextColor_t &colorPrimary, TextColor_t &colorSecondary) {\n\tif (info.creatureOnDrainHealth == -1) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b5fba38d2e2d68c217e00058ac0a0257dee1f72b1da3a8a7241358ce68dd10c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 368, + "startColumn": 103, + "charOffset": 12837, + "charLength": 8, + "snippet": { + "text": "attacker" + } + }, + "contextRegion": { + "startLine": 366, + "startColumn": 103, + "charOffset": 12732, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Events::eventCreatureOnDrainHealth(std::shared_ptr creature, std::shared_ptr attacker, CombatType_t &typePrimary, int32_t &damagePrimary, CombatType_t &typeSecondary, int32_t &damageSecondary, TextColor_t &colorPrimary, TextColor_t &colorSecondary) {\n\tif (info.creatureOnDrainHealth == -1) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4541c19fb2abfd064ca2f23bda5ae4a3242d711292dd3e1a40d38993abe56c66" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 373, + "startColumn": 7, + "charOffset": 13072, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 371, + "startColumn": 7, + "charOffset": 13062, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventCreatureOnDrainHealth - \"\n\t\t \"Creature {} attacker {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46e94f19e3ed6f3a8f0948da60e9ae2efa13982b39b4f9264a371a44ab668deb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 381, + "startColumn": 27, + "charOffset": 13402, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 379, + "startColumn": 27, + "charOffset": 13372, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.creatureOnDrainHealth, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f93da117f2731f935a6d58d8c94171b46cb0fb965f512ca7491c234479d76910" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 385, + "startColumn": 18, + "charOffset": 13564, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 383, + "startColumn": 18, + "charOffset": 13499, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.creatureOnDrainHealth);\n\n\tif (creature) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "edae38c2b6c81d509d6caaca7804ceafc6c81ff50bf17bc141a482f5e436a5e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 401, + "startColumn": 20, + "charOffset": 13964, + "charLength": 11, + "snippet": { + "text": "typePrimary" + } + }, + "contextRegion": { + "startLine": 399, + "startColumn": 20, + "charOffset": 13941, + "charLength": 11, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, typePrimary);\n\tlua_pushnumber(L, damagePrimary);\n\tlua_pushnumber(L, typeSecondary);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54febc7158b6f7ba51d70580e4ac7973884607602d4b69e6421cad78c2586220" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 402, + "startColumn": 20, + "charOffset": 13997, + "charLength": 13, + "snippet": { + "text": "damagePrimary" + } + }, + "contextRegion": { + "startLine": 400, + "startColumn": 20, + "charOffset": 13944, + "charLength": 13, + "snippet": { + "text": "\n\tlua_pushnumber(L, typePrimary);\n\tlua_pushnumber(L, damagePrimary);\n\tlua_pushnumber(L, typeSecondary);\n\tlua_pushnumber(L, damageSecondary);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "122f38871de12358bf1ff5df5fe6dafd20cec65e77513f5cdebcb68192e5606c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 403, + "startColumn": 20, + "charOffset": 14032, + "charLength": 13, + "snippet": { + "text": "typeSecondary" + } + }, + "contextRegion": { + "startLine": 401, + "startColumn": 20, + "charOffset": 13945, + "charLength": 13, + "snippet": { + "text": "\tlua_pushnumber(L, typePrimary);\n\tlua_pushnumber(L, damagePrimary);\n\tlua_pushnumber(L, typeSecondary);\n\tlua_pushnumber(L, damageSecondary);\n\tlua_pushnumber(L, colorPrimary);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d289bba93b391babc2b518caf9c2bcdd0b17be24eabd2b147601629599845916" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 404, + "startColumn": 20, + "charOffset": 14067, + "charLength": 15, + "snippet": { + "text": "damageSecondary" + } + }, + "contextRegion": { + "startLine": 402, + "startColumn": 20, + "charOffset": 13978, + "charLength": 15, + "snippet": { + "text": "\tlua_pushnumber(L, damagePrimary);\n\tlua_pushnumber(L, typeSecondary);\n\tlua_pushnumber(L, damageSecondary);\n\tlua_pushnumber(L, colorPrimary);\n\tlua_pushnumber(L, colorSecondary);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3fb743b3388cebb22a4ad93cdf2ab2644291fbf6cbce89a31d968a5606ee2f7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 405, + "startColumn": 20, + "charOffset": 14104, + "charLength": 12, + "snippet": { + "text": "colorPrimary" + } + }, + "contextRegion": { + "startLine": 403, + "startColumn": 20, + "charOffset": 14013, + "charLength": 12, + "snippet": { + "text": "\tlua_pushnumber(L, typeSecondary);\n\tlua_pushnumber(L, damageSecondary);\n\tlua_pushnumber(L, colorPrimary);\n\tlua_pushnumber(L, colorSecondary);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3c66b30ac686519f3610c493116a3d66eea99a5e70fc2cf42b686fa4c5862d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 406, + "startColumn": 20, + "charOffset": 14138, + "charLength": 14, + "snippet": { + "text": "colorSecondary" + } + }, + "contextRegion": { + "startLine": 404, + "startColumn": 20, + "charOffset": 14048, + "charLength": 14, + "snippet": { + "text": "\tlua_pushnumber(L, damageSecondary);\n\tlua_pushnumber(L, colorPrimary);\n\tlua_pushnumber(L, colorSecondary);\n\n\tif (scriptInterface.protectedCall(L, 8, 6) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0238f03dae22e81ffcf29100afdf2c9df33e171d59509768f3ba77321dd95f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 408, + "startColumn": 6, + "charOffset": 14161, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 406, + "startColumn": 6, + "charOffset": 14119, + "charLength": 15, + "snippet": { + "text": "\tlua_pushnumber(L, colorSecondary);\n\n\tif (scriptInterface.protectedCall(L, 8, 6) != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "beee1ce459ab7c42306c1a65eb49fa2b7a47f01decc2b4a38965049744e31493" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 408, + "startColumn": 39, + "charOffset": 14194, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 406, + "startColumn": 39, + "charOffset": 14119, + "charLength": 1, + "snippet": { + "text": "\tlua_pushnumber(L, colorSecondary);\n\n\tif (scriptInterface.protectedCall(L, 8, 6) != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "273f7e4e082f1e0a4704e1d28fe49dfd5e761f7b1140cc61321fdc8780dbec00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 408, + "startColumn": 42, + "charOffset": 14197, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 406, + "startColumn": 42, + "charOffset": 14119, + "charLength": 1, + "snippet": { + "text": "\tlua_pushnumber(L, colorSecondary);\n\n\tif (scriptInterface.protectedCall(L, 8, 6) != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a035888ebc20ca2028592bf92c5ac6566110f8b04a3dd12c064d0ff02a90ec84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 411, + "startColumn": 65, + "charOffset": 14360, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 409, + "startColumn": 65, + "charOffset": 14208, + "charLength": 1, + "snippet": { + "text": "\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {\n\t\ttypePrimary = LuaScriptInterface::getNumber(L, -6);\n\t\tdamagePrimary = LuaScriptInterface::getNumber(L, -5);\n\t\ttypeSecondary = LuaScriptInterface::getNumber(L, -4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0b145f03afd7135a167132406e497027e72e7e2a11b4f81cad50f389ce677429" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 412, + "startColumn": 62, + "charOffset": 14425, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 410, + "startColumn": 62, + "charOffset": 14286, + "charLength": 1, + "snippet": { + "text": "\t} else {\n\t\ttypePrimary = LuaScriptInterface::getNumber(L, -6);\n\t\tdamagePrimary = LuaScriptInterface::getNumber(L, -5);\n\t\ttypeSecondary = LuaScriptInterface::getNumber(L, -4);\n\t\tdamageSecondary = LuaScriptInterface::getNumber(L, -3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9f5b17cb01cd76c99f8cb52dfd6dad1cfd4a5a9fef304159298ac42e77e50bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 420, + "startColumn": 2, + "charOffset": 14726, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 418, + "startColumn": 2, + "charOffset": 14721, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tscriptInterface.resetScriptEnv();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c4d482c076fc87fa87b6e097a3e77f26ea77df6e1d23e92d60e755129bb977b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 424, + "startColumn": 85, + "charOffset": 14856, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 422, + "startColumn": 85, + "charOffset": 14762, + "charLength": 6, + "snippet": { + "text": "\n// Party\nbool Events::eventPartyOnJoin(std::shared_ptr party, std::shared_ptr player) {\n\t// Party:onJoin(player) or Party.onJoin(self, player)\n\tif (info.partyOnJoin == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95065baacb02e98d0b1161361ef9700dbfc2ccf435af09daebcd65acae60a88e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 430, + "startColumn": 7, + "charOffset": 14977, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 428, + "startColumn": 7, + "charOffset": 14967, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventPartyOnJoin - \"\n\t\t \"Player {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "210be9442b191801e0e6210d14ebca26bfa860237776d59e202194371d122911" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 438, + "startColumn": 27, + "charOffset": 15266, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 436, + "startColumn": 27, + "charOffset": 15236, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.partyOnJoin, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed51a54046f7dab9456d797c77f1ae5b859838ea92ee7c3228065bdcf34a84a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 442, + "startColumn": 18, + "charOffset": 15418, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 440, + "startColumn": 18, + "charOffset": 15353, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.partyOnJoin);\n\n\tLuaScriptInterface::pushUserdata(L, party);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45c84c2fcc9f66196ce56fe84432ee099b75e46cf9a07d69665aef1e8ed58eb1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 444, + "startColumn": 45, + "charOffset": 15495, + "charLength": 5, + "snippet": { + "text": "party" + } + }, + "contextRegion": { + "startLine": 442, + "startColumn": 45, + "charOffset": 15401, + "charLength": 5, + "snippet": { + "text": "\tscriptInterface.pushFunction(info.partyOnJoin);\n\n\tLuaScriptInterface::pushUserdata(L, party);\n\tLuaScriptInterface::setMetatable(L, -1, \"Party\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "560e4bdc14ae80f2b741bf3bad552396112991d5a35eb06e90e5a79709d39338" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 453, + "startColumn": 86, + "charOffset": 15791, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 451, + "startColumn": 86, + "charOffset": 15703, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Events::eventPartyOnLeave(std::shared_ptr party, std::shared_ptr player) {\n\t// Party:onLeave(player) or Party.onLeave(self, player)\n\tif (info.partyOnLeave == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5d5b0c85e5b123ac25e0972c0353a97ab979e912ef30c8152c8e1c53f24967b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 459, + "startColumn": 7, + "charOffset": 15915, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 457, + "startColumn": 7, + "charOffset": 15905, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventPartyOnLeave - \"\n\t\t \"Player {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "443b8a18211b0b831f4573d493649c54f60b719ed80e417c7b7f23cb00eff271" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 467, + "startColumn": 27, + "charOffset": 16205, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 465, + "startColumn": 27, + "charOffset": 16175, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.partyOnLeave, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b4b9e460b58d151a7c5cfc623f2d39c446a3a6f1aa434de84c11e4e58a72538b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 471, + "startColumn": 18, + "charOffset": 16358, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 469, + "startColumn": 18, + "charOffset": 16293, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.partyOnLeave);\n\n\tLuaScriptInterface::pushUserdata(L, party);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a2c05e5744b353ee973139095d4d8856cabb384840031eb31eef7c5f51771d24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 473, + "startColumn": 45, + "charOffset": 16436, + "charLength": 5, + "snippet": { + "text": "party" + } + }, + "contextRegion": { + "startLine": 471, + "startColumn": 45, + "charOffset": 16341, + "charLength": 5, + "snippet": { + "text": "\tscriptInterface.pushFunction(info.partyOnLeave);\n\n\tLuaScriptInterface::pushUserdata(L, party);\n\tLuaScriptInterface::setMetatable(L, -1, \"Party\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2d9d1598f0d5736a6643888fc060a75ba8643097b3423579a19c7b622c9de15" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 482, + "startColumn": 57, + "charOffset": 16703, + "charLength": 5, + "snippet": { + "text": "party" + } + }, + "contextRegion": { + "startLine": 480, + "startColumn": 57, + "charOffset": 16644, + "charLength": 5, + "snippet": { + "text": "}\n\nbool Events::eventPartyOnDisband(std::shared_ptr party) {\n\t// Party:onDisband() or Party.onDisband(self)\n\tif (info.partyOnDisband == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33cd09d5d4bece6686b789f4733ca5324340015e466ef73dfca66abffe5f4df5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 488, + "startColumn": 7, + "charOffset": 16818, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 486, + "startColumn": 7, + "charOffset": 16808, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventPartyOnDisband - Party leader {}] Call stack \"\n\t\t \"overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c02f5a91cbd7ec6fe0069eb00d34b7d5b469e9f2f82ed9a82abbf25d9df90cf7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 495, + "startColumn": 27, + "charOffset": 17139, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 493, + "startColumn": 27, + "charOffset": 17109, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.partyOnDisband, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e6fbe890f7fb1f2501b7e74e66d46e5502b055110a10177f62e6384b2ac42dbd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 499, + "startColumn": 18, + "charOffset": 17294, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 497, + "startColumn": 18, + "charOffset": 17229, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.partyOnDisband);\n\n\tLuaScriptInterface::pushUserdata(L, party);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9e290f08a6d3dd09931e1088c18a77bf3e5cb790881460f6baf9c28d4b80418" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 507, + "startColumn": 65, + "charOffset": 17542, + "charLength": 5, + "snippet": { + "text": "party" + } + }, + "contextRegion": { + "startLine": 505, + "startColumn": 65, + "charOffset": 17475, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid Events::eventPartyOnShareExperience(std::shared_ptr party, uint64_t &exp) {\n\t// Party:onShareExperience(exp) or Party.onShareExperience(self, exp)\n\tif (info.partyOnShareExperience == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5d825b5191676f74093af8ba8a98beba4f5d8384ada53f23b23a289dee403fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 513, + "startColumn": 7, + "charOffset": 17699, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 511, + "startColumn": 7, + "charOffset": 17689, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"Party leader {}. Call stack overflow. Too many lua script calls being nested.\", party->getLeader() ? party->getLeader()->getName() : \"unknown\");\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ffda7542e91adc6c45896e79b74cc94131e772e7947be7d2ce7f56ec0110fe4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 518, + "startColumn": 27, + "charOffset": 17942, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 516, + "startColumn": 27, + "charOffset": 17912, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.partyOnShareExperience, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1eca2bd50a85af1a4ba94c0af4645b4c6f6b182a2cb2fbd78eea65fa280bc5d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 522, + "startColumn": 18, + "charOffset": 18105, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 520, + "startColumn": 18, + "charOffset": 18040, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.partyOnShareExperience);\n\n\tLuaScriptInterface::pushUserdata(L, party);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7efa7af53087c52f6e10948ecbe923e28664118cd207e2ca7f8bf2944b5c6f3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 527, + "startColumn": 20, + "charOffset": 18272, + "charLength": 3, + "snippet": { + "text": "exp" + } + }, + "contextRegion": { + "startLine": 525, + "startColumn": 20, + "charOffset": 18201, + "charLength": 3, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Party\");\n\n\tlua_pushnumber(L, exp);\n\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "61c9623682ac09232cf215ee90c25b6a5606e0c55826367fe82e69fac5784547" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 527, + "startColumn": 20, + "charOffset": 18272, + "charLength": 3, + "snippet": { + "text": "exp" + } + }, + "contextRegion": { + "startLine": 525, + "startColumn": 20, + "charOffset": 18201, + "charLength": 3, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Party\");\n\n\tlua_pushnumber(L, exp);\n\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97b4a8a08b7090260fab68a0fad1d048a1986d9e10e4672d66edbf9a81b29a1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 529, + "startColumn": 6, + "charOffset": 18284, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 527, + "startColumn": 6, + "charOffset": 18253, + "charLength": 15, + "snippet": { + "text": "\tlua_pushnumber(L, exp);\n\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6da4278330ee33f0ff5b2333925aea5094a13d5a8639690dabe47af5acfba4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 536, + "startColumn": 2, + "charOffset": 18497, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 534, + "startColumn": 2, + "charOffset": 18492, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tscriptInterface.resetScriptEnv();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9318a1a54f56641b58a9af7fd3d74eee22707322d1d5d62f12c6fe266d5aa1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 540, + "startColumn": 63, + "charOffset": 18606, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 538, + "startColumn": 63, + "charOffset": 18533, + "charLength": 6, + "snippet": { + "text": "\n// Player\nbool Events::eventPlayerOnBrowseField(std::shared_ptr player, const Position &position) {\n\t// Player:onBrowseField(position) or Player.onBrowseField(self, position)\n\tif (info.playerOnBrowseField == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f393668d722c914fadffb69d28cfab7987aa5daf390c4ab1253f9f9f15882ccb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 546, + "startColumn": 7, + "charOffset": 18781, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 544, + "startColumn": 7, + "charOffset": 18771, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventPlayerOnBrowseField - \"\n\t\t \"Player {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c12d8b7ca2493f37dc966fde342b567aea8691342522088553f2fac158b310c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 554, + "startColumn": 27, + "charOffset": 19078, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 552, + "startColumn": 27, + "charOffset": 19048, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.playerOnBrowseField, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c4d482c076fc87fa87b6e097a3e77f26ea77df6e1d23e92d60e755129bb977b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 558, + "startColumn": 18, + "charOffset": 19238, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 556, + "startColumn": 18, + "charOffset": 19173, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.playerOnBrowseField);\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e61e563d7d1f4d4e0df48a4775faae1c0a035e00060dd02b14c64b1b3079e14d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 568, + "startColumn": 56, + "charOffset": 19534, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 566, + "startColumn": 56, + "charOffset": 19476, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Events::eventPlayerOnLook(std::shared_ptr player, const Position &position, std::shared_ptr thing, uint8_t stackpos, int32_t lookDistance) {\n\t// Player:onLook(thing, position, distance) or Player.onLook(self, thing, position, distance)\n\tif (info.playerOnLook == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5975ac9f69b418245f5a08f96056f895c314885bef4834d57f5050792d8789b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 568, + "startColumn": 113, + "charOffset": 19591, + "charLength": 5, + "snippet": { + "text": "thing" + } + }, + "contextRegion": { + "startLine": 566, + "startColumn": 113, + "charOffset": 19476, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid Events::eventPlayerOnLook(std::shared_ptr player, const Position &position, std::shared_ptr thing, uint8_t stackpos, int32_t lookDistance) {\n\t// Player:onLook(thing, position, distance) or Player.onLook(self, thing, position, distance)\n\tif (info.playerOnLook == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1bd1e0b963d7b13659ef8de2aa691d4c82fb6d0ff76fea91e8ecfd9d58d3a64" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'eventPlayerOnLook' of convertible types are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 568, + "startColumn": 120, + "charOffset": 19598, + "charLength": 7, + "snippet": { + "text": "uint8_t" + } + }, + "contextRegion": { + "startLine": 566, + "startColumn": 120, + "charOffset": 19476, + "charLength": 7, + "snippet": { + "text": "}\n\nvoid Events::eventPlayerOnLook(std::shared_ptr player, const Position &position, std::shared_ptr thing, uint8_t stackpos, int32_t lookDistance) {\n\t// Player:onLook(thing, position, distance) or Player.onLook(self, thing, position, distance)\n\tif (info.playerOnLook == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "852aba4e1b82bc3c89e109440cc6f888373408a87c8fb97f934bcf01484d9269" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 574, + "startColumn": 7, + "charOffset": 19787, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 572, + "startColumn": 7, + "charOffset": 19777, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventPlayerOnLook - \"\n\t\t \"Player {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e632debe378de6bbf37f100b30e1d6eab27c3b6a1c5cbf8d1bc014e61da59a61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 582, + "startColumn": 27, + "charOffset": 20071, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 580, + "startColumn": 27, + "charOffset": 20041, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.playerOnLook, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cbd507c4a8e9eecbfbb6e3b285fec567f18c2cb50b5906757bb9ac8a9564c344" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 586, + "startColumn": 18, + "charOffset": 20224, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 584, + "startColumn": 18, + "charOffset": 20159, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.playerOnLook);\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58c5e044d3812ff19a0df3ee661d3d7c8fcbc1e3e37605cc9820d22d017373e7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 602, + "startColumn": 20, + "charOffset": 20825, + "charLength": 12, + "snippet": { + "text": "lookDistance" + } + }, + "contextRegion": { + "startLine": 600, + "startColumn": 20, + "charOffset": 20747, + "charLength": 12, + "snippet": { + "text": "\n\tLuaScriptInterface::pushPosition(L, position, stackpos);\n\tlua_pushnumber(L, lookDistance);\n\n\tscriptInterface.callVoidFunction(4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5901466cc38e23737271130f0373e3ee3f0421f6cd1a78a4f594c7938a0ea8e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 607, + "startColumn": 68, + "charOffset": 20949, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 605, + "startColumn": 68, + "charOffset": 20879, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Events::eventPlayerOnLookInBattleList(std::shared_ptr player, std::shared_ptr creature, int32_t lookDistance) {\n\t// Player:onLookInBattleList(creature, position, distance) or Player.onLookInBattleList(self, creature, position, distance)\n\tif (info.playerOnLookInBattleList == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c308abba965a62e60dc1b7a42e9f1861289c0a628f6174c856130e001be8e600" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 607, + "startColumn": 102, + "charOffset": 20983, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 605, + "startColumn": 102, + "charOffset": 20879, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid Events::eventPlayerOnLookInBattleList(std::shared_ptr player, std::shared_ptr creature, int32_t lookDistance) {\n\t// Player:onLookInBattleList(creature, position, distance) or Player.onLookInBattleList(self, creature, position, distance)\n\tif (info.playerOnLookInBattleList == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5249bdb0dd0d0050ebd123a5a87a23abc0582ab89ee38a922c116a5668f7194" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 613, + "startColumn": 7, + "charOffset": 21206, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 611, + "startColumn": 7, + "charOffset": 21196, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventPlayerOnLookInBattleList - \"\n\t\t \"Player {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a340a9aab1f18627267a53a96d1fbbbffe7d9249852bdf04e61b118852ffe9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 621, + "startColumn": 27, + "charOffset": 21502, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 619, + "startColumn": 27, + "charOffset": 21472, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.playerOnLookInBattleList, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7515b713ef844550dfec5232e1060df9a48b3e9989c9e9b1bf496e4e68311c7b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 625, + "startColumn": 18, + "charOffset": 21667, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 623, + "startColumn": 18, + "charOffset": 21602, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.playerOnLookInBattleList);\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "67794bb150b6ea6ee458232a9fdba9e9e4406580f9a981eb44b5c000cdee05f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 633, + "startColumn": 20, + "charOffset": 21958, + "charLength": 12, + "snippet": { + "text": "lookDistance" + } + }, + "contextRegion": { + "startLine": 631, + "startColumn": 20, + "charOffset": 21878, + "charLength": 12, + "snippet": { + "text": "\tLuaScriptInterface::setCreatureMetatable(L, -1, creature);\n\n\tlua_pushnumber(L, lookDistance);\n\n\tscriptInterface.callVoidFunction(3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "951926ce77c12b383c6eee4fc2a86a3bb2a895357ef7c4cbfb3124f90984864a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'eventPlayerOnLookInTrade' of similar type ('std::shared_ptr') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 638, + "startColumn": 39, + "charOffset": 22053, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 636, + "startColumn": 39, + "charOffset": 22012, + "charLength": 3, + "snippet": { + "text": "}\n\nvoid Events::eventPlayerOnLookInTrade(std::shared_ptr player, std::shared_ptr partner, std::shared_ptr item, int32_t lookDistance) {\n\t// Player:onLookInTrade(partner, item, distance) or Player.onLookInTrade(self, partner, item, distance)\n\tif (info.playerOnLookInTrade == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b2cb481daab1a59a7c5680e188dff507fb8400649ec52e3d93aa9402e01aa54" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 638, + "startColumn": 63, + "charOffset": 22077, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 636, + "startColumn": 63, + "charOffset": 22012, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Events::eventPlayerOnLookInTrade(std::shared_ptr player, std::shared_ptr partner, std::shared_ptr item, int32_t lookDistance) {\n\t// Player:onLookInTrade(partner, item, distance) or Player.onLookInTrade(self, partner, item, distance)\n\tif (info.playerOnLookInTrade == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa2723dbc429bea0940992cf547f9293b13f0b879bdab3b5eb2b4825610bb01d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 638, + "startColumn": 126, + "charOffset": 22140, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 636, + "startColumn": 126, + "charOffset": 22012, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Events::eventPlayerOnLookInTrade(std::shared_ptr player, std::shared_ptr partner, std::shared_ptr item, int32_t lookDistance) {\n\t// Player:onLookInTrade(partner, item, distance) or Player.onLookInTrade(self, partner, item, distance)\n\tif (info.playerOnLookInTrade == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "469d87404fa65fdb8eb13fbe0dd2e64a1b7c5ed842f132def7e32b9e908bca2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 644, + "startColumn": 7, + "charOffset": 22334, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 642, + "startColumn": 7, + "charOffset": 22324, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventPlayerOnLookInTrade - \"\n\t\t \"Player {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2fb87b12b5e81bdce416044e6a41b8164bc1a08a1016dd77a89b4b78ac0fdd02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 652, + "startColumn": 27, + "charOffset": 22625, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 650, + "startColumn": 27, + "charOffset": 22595, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.playerOnLookInTrade, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a42fdbf8149d243e1e4e946b7ac3de4255e89e5c97dd4d799cecebd7c6a78495" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 656, + "startColumn": 18, + "charOffset": 22785, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 654, + "startColumn": 18, + "charOffset": 22720, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.playerOnLookInTrade);\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d74aaecdfa29d3607ab8340bc2c9011722289725336be5d35d692847b459fad8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'partner' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 661, + "startColumn": 46, + "charOffset": 22978, + "charLength": 7, + "snippet": { + "text": "partner" + } + }, + "contextRegion": { + "startLine": 659, + "startColumn": 46, + "charOffset": 22880, + "charLength": 7, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n\n\tLuaScriptInterface::pushUserdata(L, partner);\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ec6d43a4ee7da028b82c24355e390ec49a0b112616e424c84a697430c55ea3b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 667, + "startColumn": 20, + "charOffset": 23163, + "charLength": 12, + "snippet": { + "text": "lookDistance" + } + }, + "contextRegion": { + "startLine": 665, + "startColumn": 20, + "charOffset": 23091, + "charLength": 12, + "snippet": { + "text": "\tLuaScriptInterface::setItemMetatable(L, -1, item);\n\n\tlua_pushnumber(L, lookDistance);\n\n\tscriptInterface.callVoidFunction(4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "13ef48ab46b4ee1f1ee4077d782a9f179ebea22bad857a2f639ff826645bcd61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 672, + "startColumn": 62, + "charOffset": 23281, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 670, + "startColumn": 62, + "charOffset": 23217, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Events::eventPlayerOnLookInShop(std::shared_ptr player, const ItemType* itemType, uint8_t count) {\n\t// Player:onLookInShop(itemType, count) or Player.onLookInShop(self, itemType, count)\n\tif (info.playerOnLookInShop == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "75c09c6c6db76b891906b93f219083abab257736fbb339574856ad42092d56d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 678, + "startColumn": 7, + "charOffset": 23482, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 676, + "startColumn": 7, + "charOffset": 23472, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventPlayerOnLookInShop - \"\n\t\t \"Player {} itemType {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f62299c495c795c43e546165837483a0e934efd50a51e91f2128f5a3d03155f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 686, + "startColumn": 27, + "charOffset": 23817, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 684, + "startColumn": 27, + "charOffset": 23787, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.playerOnLookInShop, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f39578e36bdb3f3fa1321af3639953d6aae877fd920c041bb26eb3bcc6522c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 690, + "startColumn": 18, + "charOffset": 23976, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 688, + "startColumn": 18, + "charOffset": 23911, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.playerOnLookInShop);\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a654659883ba8e98af016dd7f95fc1a0fb055ac9b7dc2858a7fa0123a4d7de6e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 698, + "startColumn": 20, + "charOffset": 24261, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 696, + "startColumn": 20, + "charOffset": 24187, + "charLength": 5, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"ItemType\");\n\n\tlua_pushnumber(L, count);\n\n\treturn scriptInterface.callFunction(3);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "325b4a0b798e84a88cbbbac03a838e29e192af258c3c09dde12163a6c8d12584" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 703, + "startColumn": 63, + "charOffset": 24376, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 701, + "startColumn": 63, + "charOffset": 24311, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Events::eventPlayerOnRemoveCount(std::shared_ptr player, std::shared_ptr item) {\n\t// Player:onMove()\n\tif (info.playerOnRemoveCount == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59f1de829e887bfb7abccadbe59d6b2f6ee580f804350155a156eafebc28538e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 703, + "startColumn": 93, + "charOffset": 24406, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 701, + "startColumn": 93, + "charOffset": 24311, + "charLength": 4, + "snippet": { + "text": "}\n\nbool Events::eventPlayerOnRemoveCount(std::shared_ptr player, std::shared_ptr item) {\n\t// Player:onMove()\n\tif (info.playerOnRemoveCount == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc29e2ccf64ca0bac6d66541ac82f5969b4bc77418d611fa169cd10fc2fabe3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 709, + "startColumn": 7, + "charOffset": 24498, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 707, + "startColumn": 7, + "charOffset": 24488, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventPlayerOnMove - \"\n\t\t \"Player {} item {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c02f5a91cbd7ec6fe0069eb00d34b7d5b469e9f2f82ed9a82abbf25d9df90cf7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 717, + "startColumn": 27, + "charOffset": 24813, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 715, + "startColumn": 27, + "charOffset": 24783, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.playerOnRemoveCount, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1a65205b89b45bb4c33b79b798a4e585df8787e3f89e00168be9cdfce00ca0b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 721, + "startColumn": 18, + "charOffset": 24973, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 719, + "startColumn": 18, + "charOffset": 24908, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.playerOnRemoveCount);\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba4a3fd33700b6f0f8b812d027854e5d7fbb6aeb54d6b1237b894359b4bb40e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 732, + "startColumn": 60, + "charOffset": 25327, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 730, + "startColumn": 60, + "charOffset": 25265, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Events::eventPlayerOnMoveItem(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) {\n\t// Player:onMoveItem(item, count, fromPosition, toPosition) or Player.onMoveItem(self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)\n\tif (info.playerOnMoveItem == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "370de4ba10d5b0598f3bbf8d8c7d495dfff5a60550372e5939d6f77e973f0136" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 732, + "startColumn": 90, + "charOffset": 25357, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 730, + "startColumn": 90, + "charOffset": 25265, + "charLength": 4, + "snippet": { + "text": "}\n\nbool Events::eventPlayerOnMoveItem(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) {\n\t// Player:onMoveItem(item, count, fromPosition, toPosition) or Player.onMoveItem(self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)\n\tif (info.playerOnMoveItem == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd726b80a0abcf660d1c0deff6407a37b010b95b9b87a7cade9317b1a4d9ded2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'eventPlayerOnMoveItem' of similar type ('std::shared_ptr') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 732, + "startColumn": 170, + "charOffset": 25437, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 730, + "startColumn": 170, + "charOffset": 25265, + "charLength": 3, + "snippet": { + "text": "}\n\nbool Events::eventPlayerOnMoveItem(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) {\n\t// Player:onMoveItem(item, count, fromPosition, toPosition) or Player.onMoveItem(self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)\n\tif (info.playerOnMoveItem == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f08641a61697e8690aaf8e275e0defbf518cb89e6a0407378e9a21f05ae47b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 738, + "startColumn": 7, + "charOffset": 25731, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 736, + "startColumn": 7, + "charOffset": 25721, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventPlayerOnMoveItem - \"\n\t\t \"Player {} item {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c1cba5f9af58bb9766f87498dfc374e0e5c31fafe14642f41694bc1cf8baf21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 746, + "startColumn": 27, + "charOffset": 26050, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 744, + "startColumn": 27, + "charOffset": 26020, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.playerOnMoveItem, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5e5bc668f49af1e50585af8d6358d044691fefa1de16b1391d4a7d6f7609f76" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 750, + "startColumn": 18, + "charOffset": 26207, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 748, + "startColumn": 18, + "charOffset": 26142, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.playerOnMoveItem);\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "405d453ab04964a5c3ba537b64632983da8d1f60ffc79ce5ff339cd23dcdc436" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 758, + "startColumn": 20, + "charOffset": 26474, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 756, + "startColumn": 20, + "charOffset": 26402, + "charLength": 5, + "snippet": { + "text": "\tLuaScriptInterface::setItemMetatable(L, -1, item);\n\n\tlua_pushnumber(L, count);\n\tLuaScriptInterface::pushPosition(L, fromPosition);\n\tLuaScriptInterface::pushPosition(L, toPosition);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5a41e0bbfac147af132fbfcae8fc81a87b06e6ab1fe92fca1b689eb56d79861" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 762, + "startColumn": 38, + "charOffset": 26622, + "charLength": 12, + "snippet": { + "text": "fromCylinder" + } + }, + "contextRegion": { + "startLine": 760, + "startColumn": 38, + "charOffset": 26534, + "charLength": 12, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, toPosition);\n\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fd1f147d562975c321b403c2e091cbba2996347e8ae08168b476f0342a2190f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 763, + "startColumn": 38, + "charOffset": 26674, + "charLength": 10, + "snippet": { + "text": "toCylinder" + } + }, + "contextRegion": { + "startLine": 761, + "startColumn": 38, + "charOffset": 26584, + "charLength": 10, + "snippet": { + "text": "\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\n\n\treturn scriptInterface.callFunction(7);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e69c5d7168eeb950147450daf1631ec900c55c4c93607cfb1222dec5240f870f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 765, + "startColumn": 38, + "charOffset": 26725, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 763, + "startColumn": 38, + "charOffset": 26637, + "charLength": 1, + "snippet": { + "text": "\tLuaScriptInterface::pushCylinder(L, toCylinder);\n\n\treturn scriptInterface.callFunction(7);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f06e62b99b6d670ad46f3e0113152cf70f114ac83e8253c943504ce0926345ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 768, + "startColumn": 61, + "charOffset": 26792, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 766, + "startColumn": 61, + "charOffset": 26729, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Events::eventPlayerOnItemMoved(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) {\n\t// Player:onItemMoved(item, count, fromPosition, toPosition) or Player.onItemMoved(self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)\n\tif (info.playerOnItemMoved == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6146978a44fbd7b5b82f03324db4c8543a1b3dc5ef4892b16a5e9d8aec6ebae1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 768, + "startColumn": 91, + "charOffset": 26822, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 766, + "startColumn": 91, + "charOffset": 26729, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Events::eventPlayerOnItemMoved(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) {\n\t// Player:onItemMoved(item, count, fromPosition, toPosition) or Player.onItemMoved(self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)\n\tif (info.playerOnItemMoved == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0df6aa83d0f4851f837e8c85a1f079f2b5b2a4050b37583d45204b83cf86302f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'eventPlayerOnItemMoved' of similar type ('std::shared_ptr') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 768, + "startColumn": 171, + "charOffset": 26902, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 766, + "startColumn": 171, + "charOffset": 26729, + "charLength": 3, + "snippet": { + "text": "}\n\nvoid Events::eventPlayerOnItemMoved(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) {\n\t// Player:onItemMoved(item, count, fromPosition, toPosition) or Player.onItemMoved(self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)\n\tif (info.playerOnItemMoved == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12661b147db5ba1da91273e0c75d1739a6465034cc43820a9bdbab3194d40b30" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 774, + "startColumn": 7, + "charOffset": 27194, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 772, + "startColumn": 7, + "charOffset": 27184, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventPlayerOnItemMoved - \"\n\t\t \"Player {} item {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68f00de2484637f3f10b2034844da1e774c770496e48a4e4858b6fa3d29c6853" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 782, + "startColumn": 27, + "charOffset": 27508, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 780, + "startColumn": 27, + "charOffset": 27478, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.playerOnItemMoved, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3f6312ed57987f9eb67b16c413c2cca3fefe6985e4fc1297c7e2590d9a463ae4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 786, + "startColumn": 18, + "charOffset": 27666, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 784, + "startColumn": 18, + "charOffset": 27601, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.playerOnItemMoved);\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10769078a39814012ed6a0656fbb61bc32d4e41f0f1a6eb609827b0fec5c68e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 794, + "startColumn": 20, + "charOffset": 27934, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 792, + "startColumn": 20, + "charOffset": 27862, + "charLength": 5, + "snippet": { + "text": "\tLuaScriptInterface::setItemMetatable(L, -1, item);\n\n\tlua_pushnumber(L, count);\n\tLuaScriptInterface::pushPosition(L, fromPosition);\n\tLuaScriptInterface::pushPosition(L, toPosition);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "26debf033cd231340fb99fd350ba13944ee4b38539873083bfa7525c27550975" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 798, + "startColumn": 38, + "charOffset": 28082, + "charLength": 12, + "snippet": { + "text": "fromCylinder" + } + }, + "contextRegion": { + "startLine": 796, + "startColumn": 38, + "charOffset": 27994, + "charLength": 12, + "snippet": { + "text": "\tLuaScriptInterface::pushPosition(L, toPosition);\n\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4bd0eb40db31803a13cd10417db27c72bda2db2a52b0db3fbe205882dca8a2a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 799, + "startColumn": 38, + "charOffset": 28134, + "charLength": 10, + "snippet": { + "text": "toCylinder" + } + }, + "contextRegion": { + "startLine": 797, + "startColumn": 38, + "charOffset": 28044, + "charLength": 10, + "snippet": { + "text": "\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\n\n\tscriptInterface.callVoidFunction(7);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "590850fa4cdfe0ab6b4b3a0a9581191dd8848e717320dc194dc9cb256d93ee33" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 801, + "startColumn": 35, + "charOffset": 28182, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 799, + "startColumn": 35, + "charOffset": 28097, + "charLength": 1, + "snippet": { + "text": "\tLuaScriptInterface::pushCylinder(L, toCylinder);\n\n\tscriptInterface.callVoidFunction(7);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb01658ed20bc2c431a50f519b8365f9369e6927dfe76c4739fcfa1a073667df" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 804, + "startColumn": 62, + "charOffset": 28250, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 802, + "startColumn": 62, + "charOffset": 28186, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Events::eventPlayerOnChangeZone(std::shared_ptr player, ZoneType_t zone) {\n\t// Player:onChangeZone(zone)\n\tif (info.playerOnChangeZone == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd12d87552987b9071eaa3875e26079e9b7da435ba83fa7d47b9c6a939d8167d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 810, + "startColumn": 7, + "charOffset": 28365, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 808, + "startColumn": 7, + "charOffset": 28355, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventPlayerOnChangeZone - \"\n\t\t \"Player {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30f704b011e74e00ea7ddb2aa80862ada8ecb9d9fba633a463db022bec2d98f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 818, + "startColumn": 27, + "charOffset": 28655, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 816, + "startColumn": 27, + "charOffset": 28625, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.playerOnChangeZone, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd2c36c6f01fce2042cc584aac47d65e7a1f17a5ab797d1f505a1c387eaaf280" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 822, + "startColumn": 18, + "charOffset": 28814, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 820, + "startColumn": 18, + "charOffset": 28749, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.playerOnChangeZone);\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9e290f08a6d3dd09931e1088c18a77bf3e5cb790881460f6baf9c28d4b80418" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 827, + "startColumn": 20, + "charOffset": 28980, + "charLength": 4, + "snippet": { + "text": "zone" + } + }, + "contextRegion": { + "startLine": 825, + "startColumn": 20, + "charOffset": 28908, + "charLength": 4, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n\n\tlua_pushnumber(L, zone);\n\tscriptInterface.callVoidFunction(2);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0637cdf2f0364001752b7c915e9548001edca513c015fc1a0dc723858a602524" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 831, + "startColumn": 64, + "charOffset": 29091, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 829, + "startColumn": 64, + "charOffset": 29025, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Events::eventPlayerOnMoveCreature(std::shared_ptr player, std::shared_ptr creature, const Position &fromPosition, const Position &toPosition) {\n\t// Player:onMoveCreature(creature, fromPosition, toPosition) or Player.onMoveCreature(self, creature, fromPosition, toPosition)\n\tif (info.playerOnMoveCreature == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2eff317f719ee85fbe70c4a6dd3793774bcd83176ac54b312f994cac7cdfbd6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 831, + "startColumn": 98, + "charOffset": 29125, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 829, + "startColumn": 98, + "charOffset": 29025, + "charLength": 8, + "snippet": { + "text": "}\n\nbool Events::eventPlayerOnMoveCreature(std::shared_ptr player, std::shared_ptr creature, const Position &fromPosition, const Position &toPosition) {\n\t// Player:onMoveCreature(creature, fromPosition, toPosition) or Player.onMoveCreature(self, creature, fromPosition, toPosition)\n\tif (info.playerOnMoveCreature == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08474b2e1410d18a299281896383a8f37ab0f8f0010952eb5143e5e0e53ee8c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 837, + "startColumn": 7, + "charOffset": 29389, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 835, + "startColumn": 7, + "charOffset": 29379, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventPlayerOnMoveCreature - \"\n\t\t \"Player {} creature {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30f704b011e74e00ea7ddb2aa80862ada8ecb9d9fba633a463db022bec2d98f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 845, + "startColumn": 27, + "charOffset": 29720, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 843, + "startColumn": 27, + "charOffset": 29690, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.playerOnMoveCreature, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c420c1a5c13be63ba75749d33f22c274337ca1225fecd9ed8f4458ef89085b41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 849, + "startColumn": 18, + "charOffset": 29881, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 847, + "startColumn": 18, + "charOffset": 29816, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.playerOnMoveCreature);\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7efa7af53087c52f6e10948ecbe923e28664118cd207e2ca7f8bf2944b5c6f3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 863, + "startColumn": 71, + "charOffset": 30366, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 861, + "startColumn": 71, + "charOffset": 30293, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Events::eventPlayerOnReportRuleViolation(std::shared_ptr player, const std::string &targetName, uint8_t reportType, uint8_t reportReason, const std::string &comment, const std::string &translation) {\n\t// Player:onReportRuleViolation(targetName, reportType, reportReason, comment, translation)\n\tif (info.playerOnReportRuleViolation == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c847b32e4de0e0a679cab73b0ab2adc572c87243bbccdfd30deb7c543554380" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 869, + "startColumn": 7, + "charOffset": 30669, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 867, + "startColumn": 7, + "charOffset": 30659, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventPlayerOnReportRuleViolation - \"\n\t\t \"Player {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "30f704b011e74e00ea7ddb2aa80862ada8ecb9d9fba633a463db022bec2d98f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 877, + "startColumn": 27, + "charOffset": 30968, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 875, + "startColumn": 27, + "charOffset": 30938, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.playerOnReportRuleViolation, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "023e4a13c667f1f23f35d4f51ff3ea5ca9b43174c6c147c06a1d9eee536abb2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 881, + "startColumn": 18, + "charOffset": 31136, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 879, + "startColumn": 18, + "charOffset": 31071, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.playerOnReportRuleViolation);\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33bb7c7ad4d50840e49cc891988bb1fa10c121a6e5727caf4db0a77b137c8425" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 888, + "startColumn": 20, + "charOffset": 31360, + "charLength": 10, + "snippet": { + "text": "reportType" + } + }, + "contextRegion": { + "startLine": 886, + "startColumn": 20, + "charOffset": 31292, + "charLength": 10, + "snippet": { + "text": "\tLuaScriptInterface::pushString(L, targetName);\n\n\tlua_pushnumber(L, reportType);\n\tlua_pushnumber(L, reportReason);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31a35666b36caf800160cfe801c1c0dda219dec8c390065cdea59fcc5318cd3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 889, + "startColumn": 20, + "charOffset": 31392, + "charLength": 12, + "snippet": { + "text": "reportReason" + } + }, + "contextRegion": { + "startLine": 887, + "startColumn": 20, + "charOffset": 31340, + "charLength": 12, + "snippet": { + "text": "\n\tlua_pushnumber(L, reportType);\n\tlua_pushnumber(L, reportReason);\n\n\tLuaScriptInterface::pushString(L, comment);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66afc5318ba6b951063febb32332c1e4ce49b91299882c57ab589dc43ac1a980" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 894, + "startColumn": 35, + "charOffset": 31537, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 892, + "startColumn": 35, + "charOffset": 31453, + "charLength": 1, + "snippet": { + "text": "\tLuaScriptInterface::pushString(L, translation);\n\n\tscriptInterface.callVoidFunction(6);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6f236072b4b4314353ae09abe9186877e760647268cfe32914feac3568b4d21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 897, + "startColumn": 61, + "charOffset": 31604, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 895, + "startColumn": 61, + "charOffset": 31541, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Events::eventPlayerOnReportBug(std::shared_ptr player, const std::string &message, const Position &position, uint8_t category) {\n\t// Player:onReportBug(message, position, category)\n\tif (info.playerOnReportBug == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c61c351cc59971c13015c34983b9b518fa69df90934cdc39e4b5ba10432d5ecf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 903, + "startColumn": 7, + "charOffset": 31800, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 901, + "startColumn": 7, + "charOffset": 31790, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventPlayerOnReportBug - \"\n\t\t \"Player {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b169ffcc6a1fd2f64631e3cc25c33dd83b38f2536dfb54b9fa1b756b54660d4d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 911, + "startColumn": 27, + "charOffset": 32095, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 909, + "startColumn": 27, + "charOffset": 32065, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.playerOnReportBug, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe3a87c6905b6f5f5c29edd91ce8aff734cf6992a5c08967b11ec7111c7d75f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 915, + "startColumn": 18, + "charOffset": 32253, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 913, + "startColumn": 18, + "charOffset": 32188, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.playerOnReportBug);\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4133163d0bfe8a406e950e4a9f951071ea4c8febae100cd17916288eead3e3b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 922, + "startColumn": 20, + "charOffset": 32511, + "charLength": 8, + "snippet": { + "text": "category" + } + }, + "contextRegion": { + "startLine": 920, + "startColumn": 20, + "charOffset": 32399, + "charLength": 8, + "snippet": { + "text": "\tLuaScriptInterface::pushString(L, message);\n\tLuaScriptInterface::pushPosition(L, position);\n\tlua_pushnumber(L, category);\n\n\treturn scriptInterface.callFunction(4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8381555fdcb124abc49061ab9f71abb539a4b9d3fc71054c5a14991eaee15a05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 927, + "startColumn": 56, + "charOffset": 32622, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 925, + "startColumn": 56, + "charOffset": 32564, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Events::eventPlayerOnTurn(std::shared_ptr player, Direction direction) {\n\t// Player:onTurn(direction) or Player.onTurn(self, direction)\n\tif (info.playerOnTurn == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7684d144a06da8340be47681dfb11380fe961652ffbd92e8973f432dc0702633" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 933, + "startColumn": 7, + "charOffset": 32773, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 931, + "startColumn": 7, + "charOffset": 32763, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventPlayerOnTurn - \"\n\t\t \"Player {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2797a26c242cff7f69fe862ad0a6874c34c406efd18e41b01ef6a8dd1f4193d5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 941, + "startColumn": 27, + "charOffset": 33063, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 939, + "startColumn": 27, + "charOffset": 33033, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.playerOnTurn, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3379834ae98884b4703533928024e5e29014091292ed099b4a2667c4488cb101" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 945, + "startColumn": 18, + "charOffset": 33216, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 943, + "startColumn": 18, + "charOffset": 33151, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.playerOnTurn);\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe2a093dd09b722836112340c47600c7ced7ef77b90c6fab6ca9cbdc1abe9e2c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 950, + "startColumn": 20, + "charOffset": 33376, + "charLength": 9, + "snippet": { + "text": "direction" + } + }, + "contextRegion": { + "startLine": 948, + "startColumn": 20, + "charOffset": 33304, + "charLength": 9, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n\n\tlua_pushnumber(L, direction);\n\n\treturn scriptInterface.callFunction(2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97b4a8a08b7090260fab68a0fad1d048a1986d9e10e4672d66edbf9a81b29a1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 955, + "startColumn": 64, + "charOffset": 33496, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 953, + "startColumn": 64, + "charOffset": 33430, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Events::eventPlayerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) {\n\t// Player:onTradeRequest(target, item)\n\tif (info.playerOnTradeRequest == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "353875b59711e6aed9f9e35c4265e1f99ae8cad10c73ef9534cdca926fe0faed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 955, + "startColumn": 96, + "charOffset": 33528, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 953, + "startColumn": 96, + "charOffset": 33430, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Events::eventPlayerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) {\n\t// Player:onTradeRequest(target, item)\n\tif (info.playerOnTradeRequest == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52a64e7ddfc4f9e579c0c333726cd9934bb94169177b0f83335d6fa6ae8eeeae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 955, + "startColumn": 126, + "charOffset": 33558, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 953, + "startColumn": 126, + "charOffset": 33430, + "charLength": 4, + "snippet": { + "text": "}\n\nbool Events::eventPlayerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) {\n\t// Player:onTradeRequest(target, item)\n\tif (info.playerOnTradeRequest == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f30ed8bce9cfc364d77fc67314c4f92b33b04c4d3653f8417473d41673032ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 961, + "startColumn": 7, + "charOffset": 33671, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 959, + "startColumn": 7, + "charOffset": 33661, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventPlayerOnTradeRequest - \"\n\t\t \"Player {} target {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9ee20a8a43605bfbf6bbba7b9bfce39f2b09a4508694440ef8742d746be69c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 969, + "startColumn": 27, + "charOffset": 33998, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 967, + "startColumn": 27, + "charOffset": 33968, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.playerOnTradeRequest, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5ab14f28a63ddc1ea8010098162052fdb0c5ce7464090f5b19f883a81f96e08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 973, + "startColumn": 18, + "charOffset": 34159, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 971, + "startColumn": 18, + "charOffset": 34094, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.playerOnTradeRequest);\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1430d01d9d1f07f0fc1c1e885c39216e4ead71b0a55976dd19b27c8f3a983695" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 987, + "startColumn": 63, + "charOffset": 34624, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 985, + "startColumn": 63, + "charOffset": 34559, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Events::eventPlayerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) {\n\t// Player:onTradeAccept(target, item, targetItem)\n\tif (info.playerOnTradeAccept == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "57b08c05dbb1e38d99e5e34ecb859e77365be98469b42e4ed536e27b3c079bee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 987, + "startColumn": 95, + "charOffset": 34656, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 985, + "startColumn": 95, + "charOffset": 34559, + "charLength": 6, + "snippet": { + "text": "}\n\nbool Events::eventPlayerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) {\n\t// Player:onTradeAccept(target, item, targetItem)\n\tif (info.playerOnTradeAccept == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cae972f1737186809eb2e8c6282505496bc878bfed9d773b4d69777c8dd21446" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'eventPlayerOnTradeAccept' of similar type ('std::shared_ptr') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 987, + "startColumn": 103, + "charOffset": 34664, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 985, + "startColumn": 103, + "charOffset": 34559, + "charLength": 3, + "snippet": { + "text": "}\n\nbool Events::eventPlayerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) {\n\t// Player:onTradeAccept(target, item, targetItem)\n\tif (info.playerOnTradeAccept == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a8e649a571accc8a702b7d221a5090858ada3159362fbccc901664211b73fa9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 987, + "startColumn": 125, + "charOffset": 34686, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 985, + "startColumn": 125, + "charOffset": 34559, + "charLength": 4, + "snippet": { + "text": "}\n\nbool Events::eventPlayerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) {\n\t// Player:onTradeAccept(target, item, targetItem)\n\tif (info.playerOnTradeAccept == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d349f1ccd7d9e961c50f2f66e1b0dea31fd381166ee87d071737ff541c73f558" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'targetItem' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 987, + "startColumn": 153, + "charOffset": 34714, + "charLength": 10, + "snippet": { + "text": "targetItem" + } + }, + "contextRegion": { + "startLine": 985, + "startColumn": 153, + "charOffset": 34559, + "charLength": 10, + "snippet": { + "text": "}\n\nbool Events::eventPlayerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) {\n\t// Player:onTradeAccept(target, item, targetItem)\n\tif (info.playerOnTradeAccept == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "699ff0d0d5e78f3d3cef5e06bece716343c941e376d478a33c259cedfca9461b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 993, + "startColumn": 7, + "charOffset": 34843, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 991, + "startColumn": 7, + "charOffset": 34833, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventPlayerOnTradeAccept - \"\n\t\t \"Player {} target {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b5c088b9f0542d28d349527c3986222b9605bbfc2b806d25edd35fedb4f9d781" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1001, + "startColumn": 27, + "charOffset": 35169, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 999, + "startColumn": 27, + "charOffset": 35139, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.playerOnTradeAccept, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a42fdbf8149d243e1e4e946b7ac3de4255e89e5c97dd4d799cecebd7c6a78495" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1005, + "startColumn": 18, + "charOffset": 35329, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 1003, + "startColumn": 18, + "charOffset": 35264, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.playerOnTradeAccept);\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d74aaecdfa29d3607ab8340bc2c9011722289725336be5d35d692847b459fad8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1022, + "startColumn": 66, + "charOffset": 35911, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1020, + "startColumn": 66, + "charOffset": 35843, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Events::eventPlayerOnGainExperience(std::shared_ptr player, std::shared_ptr target, uint64_t &exp, uint64_t rawExp) {\n\t// Player:onGainExperience(target, exp, rawExp)\n\t// rawExp gives the original exp which is not multiplied" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f1b2c710c51ffe152f0da694201eba7936bce82b9bb7bdcb3db25787607c820" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1022, + "startColumn": 100, + "charOffset": 35945, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 1020, + "startColumn": 100, + "charOffset": 35843, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Events::eventPlayerOnGainExperience(std::shared_ptr player, std::shared_ptr target, uint64_t &exp, uint64_t rawExp) {\n\t// Player:onGainExperience(target, exp, rawExp)\n\t// rawExp gives the original exp which is not multiplied" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "929d8be635134f4cee777db1b871d2ac422a88a4fdb100ee866c5e2d02b43846" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1029, + "startColumn": 7, + "charOffset": 36156, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1027, + "startColumn": 7, + "charOffset": 36146, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventPlayerOnGainExperience - \"\n\t\t \"Player {} target {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a94e176bc48c5d243aa71cd52901f6bc12403b1c11ce3b57032dd86a5125848d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1037, + "startColumn": 27, + "charOffset": 36479, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1035, + "startColumn": 27, + "charOffset": 36449, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.playerOnGainExperience, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b08022efaec6b4d0cd71acc8321356693e9bcf72b65ff04a6a2cb7d4b488250b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1041, + "startColumn": 18, + "charOffset": 36642, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 1039, + "startColumn": 18, + "charOffset": 36577, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.playerOnGainExperience);\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2873bfe9dccc95b2e234b69b1175a5cfc845ba326cf45f44e8f6a91aeb804370" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1053, + "startColumn": 20, + "charOffset": 36975, + "charLength": 3, + "snippet": { + "text": "exp" + } + }, + "contextRegion": { + "startLine": 1051, + "startColumn": 20, + "charOffset": 36952, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, exp);\n\tlua_pushnumber(L, rawExp);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "47d712b43c300f6207ab1682cea3d143acadb296360e0a8e74303105ee4051d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1053, + "startColumn": 20, + "charOffset": 36975, + "charLength": 3, + "snippet": { + "text": "exp" + } + }, + "contextRegion": { + "startLine": 1051, + "startColumn": 20, + "charOffset": 36952, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, exp);\n\tlua_pushnumber(L, rawExp);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6afd8c9cd03effcfe59e2aa71f38aa3a45396d0a36205197dee2c5a768a58828" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1054, + "startColumn": 20, + "charOffset": 37000, + "charLength": 6, + "snippet": { + "text": "rawExp" + } + }, + "contextRegion": { + "startLine": 1052, + "startColumn": 20, + "charOffset": 36955, + "charLength": 6, + "snippet": { + "text": "\n\tlua_pushnumber(L, exp);\n\tlua_pushnumber(L, rawExp);\n\n\tif (scriptInterface.protectedCall(L, 4, 1) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e77f1444a10cfc16744128ddbcc68ab9bde3caccb934178b8ff12c437498953e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1054, + "startColumn": 20, + "charOffset": 37000, + "charLength": 6, + "snippet": { + "text": "rawExp" + } + }, + "contextRegion": { + "startLine": 1052, + "startColumn": 20, + "charOffset": 36955, + "charLength": 6, + "snippet": { + "text": "\n\tlua_pushnumber(L, exp);\n\tlua_pushnumber(L, rawExp);\n\n\tif (scriptInterface.protectedCall(L, 4, 1) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "00d3f2c2e89f92671ce54bc8a752267dfb037f771cdab60468704f454e71ec90" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1056, + "startColumn": 6, + "charOffset": 37015, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1054, + "startColumn": 6, + "charOffset": 36981, + "charLength": 15, + "snippet": { + "text": "\tlua_pushnumber(L, rawExp);\n\n\tif (scriptInterface.protectedCall(L, 4, 1) != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7cac31705f8b411537bfd405fd4ac2290b89087a68cfacda31c260c1db89fb88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1063, + "startColumn": 2, + "charOffset": 37228, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1061, + "startColumn": 2, + "charOffset": 37223, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tscriptInterface.resetScriptEnv();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6da4278330ee33f0ff5b2333925aea5094a13d5a8639690dabe47af5acfba4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1066, + "startColumn": 66, + "charOffset": 37330, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1064, + "startColumn": 66, + "charOffset": 37262, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Events::eventPlayerOnLoseExperience(std::shared_ptr player, uint64_t &exp) {\n\t// Player:onLoseExperience(exp)\n\tif (info.playerOnLoseExperience == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f916309ea12eb60448ab8675810fd25322b7a89e83cb75584eaf8266bb5b1933" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1072, + "startColumn": 7, + "charOffset": 37450, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1070, + "startColumn": 7, + "charOffset": 37440, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventPlayerOnLoseExperience - \"\n\t\t \"Player {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0cc1a4cf33b230ffee6d1061fce243a853765dce0e60e674e2da8b0de6311561" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1080, + "startColumn": 27, + "charOffset": 37744, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1078, + "startColumn": 27, + "charOffset": 37714, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.playerOnLoseExperience, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a76e14297fb775a227b78944b68b59926911dac87e676bc9ea3c4bae0066141" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1084, + "startColumn": 18, + "charOffset": 37907, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 1082, + "startColumn": 18, + "charOffset": 37842, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.playerOnLoseExperience);\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d9cce8a765da9dce2a0a952c3db591f437269ed01a13645456036d9cef6b45e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1089, + "startColumn": 20, + "charOffset": 38077, + "charLength": 3, + "snippet": { + "text": "exp" + } + }, + "contextRegion": { + "startLine": 1087, + "startColumn": 20, + "charOffset": 38005, + "charLength": 3, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n\n\tlua_pushnumber(L, exp);\n\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "68a64864f216322beef26fcab7d0555254058dce52a3cc5a54fe170e4fb3478e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1089, + "startColumn": 20, + "charOffset": 38077, + "charLength": 3, + "snippet": { + "text": "exp" + } + }, + "contextRegion": { + "startLine": 1087, + "startColumn": 20, + "charOffset": 38005, + "charLength": 3, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n\n\tlua_pushnumber(L, exp);\n\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31fe5907c60114176510cc569e4bc29126a79ac8d5efc77ed28d6a394a1eae89" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1091, + "startColumn": 6, + "charOffset": 38089, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1089, + "startColumn": 6, + "charOffset": 38058, + "charLength": 15, + "snippet": { + "text": "\tlua_pushnumber(L, exp);\n\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e838b7a2cf3b54f58981f8d5a02b900bbb951dae653fc1a39c3a481b5497e8f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1098, + "startColumn": 2, + "charOffset": 38302, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1096, + "startColumn": 2, + "charOffset": 38297, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tscriptInterface.resetScriptEnv();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3b7306af78881d8358f1a53ec63a18255fdca7826f09ef37ba27667571f33ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1101, + "startColumn": 66, + "charOffset": 38404, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1099, + "startColumn": 66, + "charOffset": 38336, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Events::eventPlayerOnGainSkillTries(std::shared_ptr player, skills_t skill, uint64_t &tries) {\n\t// Player:onGainSkillTries(skill, tries)\n\tif (info.playerOnGainSkillTries == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31eee8c4dc3abcd78f8daa1df7f0506adbf1deb6edb822d06d6c872f2a5ab4c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1107, + "startColumn": 7, + "charOffset": 38551, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1105, + "startColumn": 7, + "charOffset": 38541, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventPlayerOnGainSkillTries - \"\n\t\t \"Player {} skill {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7cac31705f8b411537bfd405fd4ac2290b89087a68cfacda31c260c1db89fb88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1115, + "startColumn": 27, + "charOffset": 38878, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1113, + "startColumn": 27, + "charOffset": 38848, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.playerOnGainSkillTries, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "78dc36b6a93538e660315703ae7ba3f75ef73d0634ccc2cb9ed56fc89d3b608c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1119, + "startColumn": 18, + "charOffset": 39041, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 1117, + "startColumn": 18, + "charOffset": 38976, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.playerOnGainSkillTries);\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b60599fa3bf45bc2413be7b6f1d74f66ee3a8add9725e44e221fd341e1bda403" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1124, + "startColumn": 20, + "charOffset": 39211, + "charLength": 5, + "snippet": { + "text": "skill" + } + }, + "contextRegion": { + "startLine": 1122, + "startColumn": 20, + "charOffset": 39139, + "charLength": 5, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n\n\tlua_pushnumber(L, skill);\n\tlua_pushnumber(L, tries);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99be3fb70584f97d4f15d0070c342ebed85684d4c536bc2046e2dc2f187e495c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1125, + "startColumn": 20, + "charOffset": 39238, + "charLength": 5, + "snippet": { + "text": "tries" + } + }, + "contextRegion": { + "startLine": 1123, + "startColumn": 20, + "charOffset": 39191, + "charLength": 5, + "snippet": { + "text": "\n\tlua_pushnumber(L, skill);\n\tlua_pushnumber(L, tries);\n\n\tif (scriptInterface.protectedCall(L, 3, 1) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70d3c505fbc8803c8aed2fb787dfe211e95b707ba2866f3288f124759873fb39" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1125, + "startColumn": 20, + "charOffset": 39238, + "charLength": 5, + "snippet": { + "text": "tries" + } + }, + "contextRegion": { + "startLine": 1123, + "startColumn": 20, + "charOffset": 39191, + "charLength": 5, + "snippet": { + "text": "\n\tlua_pushnumber(L, skill);\n\tlua_pushnumber(L, tries);\n\n\tif (scriptInterface.protectedCall(L, 3, 1) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "449c4e370d44490c06b5f9f1ae41cf0982f2fe12c776a4cf7707793584514c47" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1127, + "startColumn": 6, + "charOffset": 39252, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1125, + "startColumn": 6, + "charOffset": 39219, + "charLength": 15, + "snippet": { + "text": "\tlua_pushnumber(L, tries);\n\n\tif (scriptInterface.protectedCall(L, 3, 1) != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f74f41cebabed6a3a1812465ab139c580dedd2c7478b22beb673c0db12e0240f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1134, + "startColumn": 2, + "charOffset": 39467, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1132, + "startColumn": 2, + "charOffset": 39462, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tscriptInterface.resetScriptEnv();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "443b8a18211b0b831f4573d493649c54f60b719ed80e417c7b7f23cb00eff271" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1137, + "startColumn": 58, + "charOffset": 39561, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1135, + "startColumn": 58, + "charOffset": 39501, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Events::eventPlayerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) {\n\t// Player:onCombat(target, item, primaryDamage, primaryType, secondaryDamage, secondaryType)\n\tif (info.playerOnCombat == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9866f7265fcb0b9af7e7ca0df44cc22e6bc25736de7511214818fa6dd63966b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1137, + "startColumn": 92, + "charOffset": 39595, + "charLength": 6, + "snippet": { + "text": "target" + } + }, + "contextRegion": { + "startLine": 1135, + "startColumn": 92, + "charOffset": 39501, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Events::eventPlayerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) {\n\t// Player:onCombat(target, item, primaryDamage, primaryType, secondaryDamage, secondaryType)\n\tif (info.playerOnCombat == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "059d9264e790ac13992e0dec653c33304f45b77296819d6ead684d2af6ca8b43" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1137, + "startColumn": 122, + "charOffset": 39625, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 1135, + "startColumn": 122, + "charOffset": 39501, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Events::eventPlayerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) {\n\t// Player:onCombat(target, item, primaryDamage, primaryType, secondaryDamage, secondaryType)\n\tif (info.playerOnCombat == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7f8b5941f063221d8ae8f127bab30126864b2875baa561921634c467e134e1f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1143, + "startColumn": 7, + "charOffset": 39803, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1141, + "startColumn": 7, + "charOffset": 39793, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventPlayerOnCombat - \"\n\t\t \"Player {} target {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ea3847da8e447f3f3b9f10e6d5433613c11532519ca01541d41f4a714cc2ad3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1151, + "startColumn": 27, + "charOffset": 40118, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1149, + "startColumn": 27, + "charOffset": 40088, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.playerOnCombat, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d82c178ddeec8a4a7f944f27bfd4fb2f9ccd4c517c0427c25c88b3da650132b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1155, + "startColumn": 18, + "charOffset": 40273, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 1153, + "startColumn": 18, + "charOffset": 40208, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.playerOnCombat);\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d20c3309c0f88334f6e788c387e90556c47323648c13add7d948f3d0f2fac9da" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1176, + "startColumn": 6, + "charOffset": 40778, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1174, + "startColumn": 6, + "charOffset": 40722, + "charLength": 15, + "snippet": { + "text": "\tLuaScriptInterface::pushCombatDamage(L, damage);\n\n\tif (scriptInterface.protectedCall(L, 8, 4) != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0cc1a4cf33b230ffee6d1061fce243a853765dce0e60e674e2da8b0de6311561" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "8 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1176, + "startColumn": 39, + "charOffset": 40811, + "charLength": 1, + "snippet": { + "text": "8" + } + }, + "contextRegion": { + "startLine": 1174, + "startColumn": 39, + "charOffset": 40722, + "charLength": 1, + "snippet": { + "text": "\tLuaScriptInterface::pushCombatDamage(L, damage);\n\n\tif (scriptInterface.protectedCall(L, 8, 4) != 0) {\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d29f1ffe298597f5e06a243404dccd22fc2d5333aae387df65ba98228b9b614" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1191, + "startColumn": 2, + "charOffset": 41409, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1189, + "startColumn": 2, + "charOffset": 41404, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tscriptInterface.resetScriptEnv();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a1c286986ead227e3c378b90422124961625a9d5970a3bd0fdd1367253ee54f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1194, + "startColumn": 67, + "charOffset": 41512, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1192, + "startColumn": 67, + "charOffset": 41443, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Events::eventPlayerOnRequestQuestLog(std::shared_ptr player) {\n\t// Player:onRequestQuestLog()\n\tif (info.playerOnRequestQuestLog == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23e1d08f28fa57900015870e7aa82db28391c005e6b9c9a0b583cbf5799145e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1200, + "startColumn": 7, + "charOffset": 41616, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1198, + "startColumn": 7, + "charOffset": 41606, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventPlayerOnRequestQuestLog - \"\n\t\t \"Player {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1cf490bec3d3a56fbd598d8d1116b3b4b30622c64e98b1415e34f5681bc400cb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1208, + "startColumn": 27, + "charOffset": 41911, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1206, + "startColumn": 27, + "charOffset": 41881, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.playerOnRequestQuestLog, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1c849b6fd50dba17be51c882dd569bd08e3c5913944e1137809df4d015a517c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1212, + "startColumn": 18, + "charOffset": 42075, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 1210, + "startColumn": 18, + "charOffset": 42010, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.playerOnRequestQuestLog);\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e70d055b5aae0bee7ee55206bb84613a0615eac1d9d9ac4b56de4b56eb0b30c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1220, + "startColumn": 68, + "charOffset": 42335, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1218, + "startColumn": 68, + "charOffset": 42265, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Events::eventPlayerOnRequestQuestLine(std::shared_ptr player, uint16_t questId) {\n\t// Player::onRequestQuestLine()\n\tif (info.playerOnRequestQuestLine == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a84f7def892c6f327a0b3ed5a00401aeccb52e96793bf3a657404611d67cfb2a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1226, + "startColumn": 7, + "charOffset": 42460, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1224, + "startColumn": 7, + "charOffset": 42450, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventPlayerOnRequestQuestLine - \"\n\t\t \"Player {} questId {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d8d8c072ba0f41fcc1edab402df8f68f017de4ec5a48da765c3a4121603b2d52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1234, + "startColumn": 27, + "charOffset": 42776, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1232, + "startColumn": 27, + "charOffset": 42746, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.playerOnRequestQuestLine, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c420c1a5c13be63ba75749d33f22c274337ca1225fecd9ed8f4458ef89085b41" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1238, + "startColumn": 18, + "charOffset": 42941, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 1236, + "startColumn": 18, + "charOffset": 42876, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.playerOnRequestQuestLine);\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6ce6bcf7e2be5533758cdaa571a60fc4364ce6e30acca236fcd2d4e1a75e825" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1243, + "startColumn": 20, + "charOffset": 43113, + "charLength": 7, + "snippet": { + "text": "questId" + } + }, + "contextRegion": { + "startLine": 1241, + "startColumn": 20, + "charOffset": 43041, + "charLength": 7, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n\n\tlua_pushnumber(L, questId);\n\n\tscriptInterface.callVoidFunction(2);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8696ec98e07ed002815163211e8d04966ee79e78c7f08e003f6eea7983bf487a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1248, + "startColumn": 97, + "charOffset": 43261, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 1246, + "startColumn": 97, + "charOffset": 43162, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid Events::eventPlayerOnInventoryUpdate(std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool equip) {\n\t// Player:onInventoryUpdate(item, slot, equip)\n\tif (info.playerOnInventoryUpdate == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3dbaa64cf502a6e10f26079aa8ad6e8a3dae268497f5cd4864bcb3407a89fb7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1254, + "startColumn": 7, + "charOffset": 43406, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1252, + "startColumn": 7, + "charOffset": 43396, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[{}] Call stack overflow\", __FUNCTION__);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49714d8cf185ef818585ce9c311e026abf8c8bb22d9c014749739aef704bc45c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1259, + "startColumn": 27, + "charOffset": 43546, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1257, + "startColumn": 27, + "charOffset": 43516, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.playerOnInventoryUpdate, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "698cee65f1bc6e2ac118d3beb19923c146b445c3e97ca99ac2b1599c73252c61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1263, + "startColumn": 18, + "charOffset": 43710, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 1261, + "startColumn": 18, + "charOffset": 43645, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.playerOnInventoryUpdate);\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a569ac07ad79a9cd89b309d2c6bb14892a975afc1486fd5c4d53a9651557e699" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1265, + "startColumn": 46, + "charOffset": 43800, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1263, + "startColumn": 46, + "charOffset": 43693, + "charLength": 6, + "snippet": { + "text": "\tscriptInterface.pushFunction(info.playerOnInventoryUpdate);\n\n\tLuaScriptInterface::pushUserdata(L, player);\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "882db974d885179f380b4faaecb6a3256efd0db01e365fab113ca93f99127856" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1271, + "startColumn": 20, + "charOffset": 43984, + "charLength": 4, + "snippet": { + "text": "slot" + } + }, + "contextRegion": { + "startLine": 1269, + "startColumn": 20, + "charOffset": 43912, + "charLength": 4, + "snippet": { + "text": "\tLuaScriptInterface::setItemMetatable(L, -1, item);\n\n\tlua_pushnumber(L, slot);\n\tLuaScriptInterface::pushBoolean(L, equip);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d289bba93b391babc2b518caf9c2bcdd0b17be24eabd2b147601629599845916" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1277, + "startColumn": 59, + "charOffset": 44135, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 1275, + "startColumn": 59, + "charOffset": 44074, + "charLength": 6, + "snippet": { + "text": "}\n\nvoid Events::eventOnStorageUpdate(std::shared_ptr player, const uint32_t key, const int32_t value, int32_t oldValue, uint64_t currentTime) {\n\t// Player::onStorageUpdate(key, value, oldValue, currentTime)\n\tif (info.playerOnStorageUpdate == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4814a46b0b529dad00df1695e1ffe99d5bab9bdd5ce6ea1846789eb1da791c2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1283, + "startColumn": 7, + "charOffset": 44350, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1281, + "startColumn": 7, + "charOffset": 44340, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventOnStorageUpdate - \"\n\t\t \"Player {} key {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2fb87b12b5e81bdce416044e6a41b8164bc1a08a1016dd77a89b4b78ac0fdd02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1291, + "startColumn": 27, + "charOffset": 44649, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1289, + "startColumn": 27, + "charOffset": 44619, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.playerOnStorageUpdate, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e4880b0d96c081d95e70a91ac0b4d7ca55dbc44b8e93cdbce22c2c72a14cff06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1295, + "startColumn": 18, + "charOffset": 44811, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 1293, + "startColumn": 18, + "charOffset": 44746, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.playerOnStorageUpdate);\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9dd1eda58cfbf5422ce6f391b2eefb380dd0e6bff03d3d46c896fdf24fa47dee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1300, + "startColumn": 20, + "charOffset": 44980, + "charLength": 3, + "snippet": { + "text": "key" + } + }, + "contextRegion": { + "startLine": 1298, + "startColumn": 20, + "charOffset": 44908, + "charLength": 3, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n\n\tlua_pushnumber(L, key);\n\tlua_pushnumber(L, value);\n\tlua_pushnumber(L, oldValue);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d7bed9bd6138c2102da274436c6e3a1f95a809bb47e06b82fc4e7c299332834" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1301, + "startColumn": 20, + "charOffset": 45005, + "charLength": 5, + "snippet": { + "text": "value" + } + }, + "contextRegion": { + "startLine": 1299, + "startColumn": 20, + "charOffset": 44960, + "charLength": 5, + "snippet": { + "text": "\n\tlua_pushnumber(L, key);\n\tlua_pushnumber(L, value);\n\tlua_pushnumber(L, oldValue);\n\tlua_pushnumber(L, currentTime);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9edd383f7a1465c68d164419c5b1a7d5dbfd79a3c731f11c421c5f79921f1e20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1302, + "startColumn": 20, + "charOffset": 45032, + "charLength": 8, + "snippet": { + "text": "oldValue" + } + }, + "contextRegion": { + "startLine": 1300, + "startColumn": 20, + "charOffset": 44961, + "charLength": 8, + "snippet": { + "text": "\tlua_pushnumber(L, key);\n\tlua_pushnumber(L, value);\n\tlua_pushnumber(L, oldValue);\n\tlua_pushnumber(L, currentTime);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "668cefba722ed85b15baa0ae7defeb17a9bca208d46722b4656a33059e866b7d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1303, + "startColumn": 20, + "charOffset": 45062, + "charLength": 11, + "snippet": { + "text": "currentTime" + } + }, + "contextRegion": { + "startLine": 1301, + "startColumn": 20, + "charOffset": 44986, + "charLength": 11, + "snippet": { + "text": "\tlua_pushnumber(L, value);\n\tlua_pushnumber(L, oldValue);\n\tlua_pushnumber(L, currentTime);\n\n\tscriptInterface.callVoidFunction(5);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0427cd630cd77a9c78ea9443515c647d4edec18de378209fe1489cbec573852" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1303, + "startColumn": 20, + "charOffset": 45062, + "charLength": 11, + "snippet": { + "text": "currentTime" + } + }, + "contextRegion": { + "startLine": 1301, + "startColumn": 20, + "charOffset": 44986, + "charLength": 11, + "snippet": { + "text": "\tlua_pushnumber(L, value);\n\tlua_pushnumber(L, oldValue);\n\tlua_pushnumber(L, currentTime);\n\n\tscriptInterface.callVoidFunction(5);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "195068dbdadfee5f35913f5682cbbde1f6548aa773c273b966d872e5a51b0604" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1305, + "startColumn": 35, + "charOffset": 45111, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 1303, + "startColumn": 35, + "charOffset": 45043, + "charLength": 1, + "snippet": { + "text": "\tlua_pushnumber(L, currentTime);\n\n\tscriptInterface.callVoidFunction(5);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7faa292e07391a3cd1eb46e4f1e07db424f5be949277916b29be294b377ab067" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1309, + "startColumn": 98, + "charOffset": 45226, + "charLength": 6, + "snippet": { + "text": "corpse" + } + }, + "contextRegion": { + "startLine": 1307, + "startColumn": 98, + "charOffset": 45117, + "charLength": 6, + "snippet": { + "text": "\n// Monster\nvoid Events::eventMonsterOnDropLoot(std::shared_ptr monster, std::shared_ptr corpse) {\n\t// Monster:onDropLoot(corpse)\n\tif (info.monsterOnDropLoot == -1) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc3c2f90692a2f0f6c4d4fcf594079e5680042675c6be5711b929b4ea7d518a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1315, + "startColumn": 7, + "charOffset": 45324, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1313, + "startColumn": 7, + "charOffset": 45314, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tif (!scriptInterface.reserveScriptEnv()) {\n\t\tg_logger().error(\"[Events::eventMonsterOnDropLoot - \"\n\t\t \"Monster corpse {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e57d311c4dc25ab26d6166816b89f969375b977024341cf0c67ad0475f70e17e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1323, + "startColumn": 27, + "charOffset": 45621, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 1321, + "startColumn": 27, + "charOffset": 45591, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\n\tenv->setScriptId(info.monsterOnDropLoot, &scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93e6254aa3b2775708e7eb1926fc9907dc5e9cc7aa1a3f9975b12e1726909aa6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1327, + "startColumn": 18, + "charOffset": 45779, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 1325, + "startColumn": 18, + "charOffset": 45714, + "charLength": 12, + "snippet": { + "text": "\n\tlua_State* L = scriptInterface.getLuaState();\n\tscriptInterface.pushFunction(info.monsterOnDropLoot);\n\n\tLuaScriptInterface::pushUserdata(L, monster);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05e2303432cca866841b8ac07a8d951c554328da412d7dd3d0e77d798df245ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1329, + "startColumn": 47, + "charOffset": 45864, + "charLength": 7, + "snippet": { + "text": "monster" + } + }, + "contextRegion": { + "startLine": 1327, + "startColumn": 47, + "charOffset": 45762, + "charLength": 7, + "snippet": { + "text": "\tscriptInterface.pushFunction(info.monsterOnDropLoot);\n\n\tLuaScriptInterface::pushUserdata(L, monster);\n\tLuaScriptInterface::setMetatable(L, -1, \"Monster\");\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "86b0b37e478d218aa949e728d92e11c27a0aeaaf89cc9d72020897b0513d768e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-avoid-return-with-void-value", + "ruleIndex": 689, + "kind": "fail", + "level": "warning", + "message": { + "text": "return statement within a void function should not have a specified return value" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/events.cpp" + }, + "region": { + "startLine": 1335, + "startColumn": 2, + "charOffset": 46042, + "charLength": 6, + "snippet": { + "text": "return" + } + }, + "contextRegion": { + "startLine": 1333, + "startColumn": 2, + "charOffset": 45985, + "charLength": 6, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Container\");\n\n\treturn scriptInterface.callVoidFunction(2);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c987156549023465c8cf73868acad71dff3c9be953cd0056485888ba3a1f4cd8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 24, + "startColumn": 4, + "charOffset": 756, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 22, + "startColumn": 4, + "charOffset": 705, + "charLength": 3, + "snippet": { + "text": "\t\t\tMoveEventList &moveEventList = pair.second;\n\n\t\t\tfor (int moveEventType = 0; moveEventType < MOVE_EVENT_LAST; ++moveEventType) {\n\t\t\t\tauto &eventList = moveEventList.moveEvent[moveEventType];\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a897328772cc499146e8adec2d0c34e98529914c0a8d89464f70982eedd274e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-loop-convert", + "ruleIndex": 620, + "kind": "fail", + "level": "warning", + "message": { + "text": "use range-based for loop instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 24, + "startColumn": 4, + "charOffset": 756, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 22, + "startColumn": 4, + "charOffset": 705, + "charLength": 3, + "snippet": { + "text": "\t\t\tMoveEventList &moveEventList = pair.second;\n\n\t\t\tfor (int moveEventType = 0; moveEventType < MOVE_EVENT_LAST; ++moveEventType) {\n\t\t\t\tauto &eventList = moveEventList.moveEvent[moveEventType];\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3950127c4aedc46a39bbdc77d9752c2e453bd671607c4cf50bcaae6e70687b80" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 25, + "startColumn": 23, + "charOffset": 858, + "charLength": 13, + "snippet": { + "text": "moveEventList" + } + }, + "contextRegion": { + "startLine": 23, + "startColumn": 23, + "charOffset": 752, + "charLength": 13, + "snippet": { + "text": "\n\t\t\tfor (int moveEventType = 0; moveEventType < MOVE_EVENT_LAST; ++moveEventType) {\n\t\t\t\tauto &eventList = moveEventList.moveEvent[moveEventType];\n\n\t\t\t\teventList.remove_if([&](const std::shared_ptr &moveEvent) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3cfea36139f3c53458c965cc990b1e82b64ed7bf1fd9e63cabcfe689cff2464e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 27, + "startColumn": 15, + "charOffset": 913, + "charLength": 9, + "snippet": { + "text": "remove_if" + } + }, + "contextRegion": { + "startLine": 25, + "startColumn": 15, + "charOffset": 836, + "charLength": 9, + "snippet": { + "text": "\t\t\t\tauto &eventList = moveEventList.moveEvent[moveEventType];\n\n\t\t\t\teventList.remove_if([&](const std::shared_ptr &moveEvent) {\n\t\t\t\t\tbool removed = moveEvent && moveEvent->isFromXML();\n\t\t\t\t\tif (removed) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d6aed37bdaa44194391f175bf5883d01cbc42334442b3325a250dca61e65c2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 50, + "startColumn": 72, + "charOffset": 1484, + "charLength": 9, + "snippet": { + "text": "moveEvent" + } + }, + "contextRegion": { + "startLine": 48, + "startColumn": 72, + "charOffset": 1410, + "charLength": 9, + "snippet": { + "text": "}\n\nbool MoveEvents::registerLuaItemEvent(const std::shared_ptr moveEvent) {\n\tauto itemIdVector = moveEvent->getItemIdsVector();\n\tif (itemIdVector.empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74ddbea4579637dad2e628db506252058a4f6e4b59d518a1e8867f90b33b5d1a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 2, + "charOffset": 1675, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 2, + "charOffset": 1632, + "charLength": 3, + "snippet": { + "text": "\ttmpVector.reserve(itemIdVector.size());\n\n\tfor (const auto &itemId : itemIdVector) {\n\t\tif (moveEvent->getEventType() == MOVE_EVENT_EQUIP) {\n\t\t\tItemType &it = Item::items.getItemType(itemId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1470519a9fc1e919bf10e7b6d3dae6070d7724d19e71b5bc57a82432a3cfcd4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 67, + "startColumn": 32, + "charOffset": 2055, + "charLength": 6, + "snippet": { + "text": "itemId" + } + }, + "contextRegion": { + "startLine": 65, + "startColumn": 32, + "charOffset": 1965, + "charLength": 6, + "snippet": { + "text": "\t\t\tit.vocationString = moveEvent->getVocationString();\n\t\t}\n\t\tif (registerEvent(moveEvent, itemId, itemIdMap)) {\n\t\t\ttmpVector.emplace_back(itemId);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b27cd3f40be21e8aa4dee2d84a45032bb42fd0c93c844271a4b5cbc3c66b10f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 68, + "startColumn": 14, + "charOffset": 2090, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 66, + "startColumn": 14, + "charOffset": 2020, + "charLength": 12, + "snippet": { + "text": "\t\t}\n\t\tif (registerEvent(moveEvent, itemId, itemIdMap)) {\n\t\t\ttmpVector.emplace_back(itemId);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93b64affdc2f5605115c2bff7418083a5b978513c720e4c689b617ed50794c6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 76, + "startColumn": 74, + "charOffset": 2265, + "charLength": 9, + "snippet": { + "text": "moveEvent" + } + }, + "contextRegion": { + "startLine": 74, + "startColumn": 74, + "charOffset": 2189, + "charLength": 9, + "snippet": { + "text": "}\n\nbool MoveEvents::registerLuaActionEvent(const std::shared_ptr moveEvent) {\n\tauto actionIdVector = moveEvent->getActionIdsVector();\n\tif (actionIdVector.empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3d95047bcc17cefe011df83538e2ba689f72f872ac7a0a992f62a7ae77654d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 85, + "startColumn": 2, + "charOffset": 2464, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 2, + "charOffset": 2419, + "charLength": 3, + "snippet": { + "text": "\ttmpVector.reserve(actionIdVector.size());\n\n\tfor (const auto &actionId : actionIdVector) {\n\t\tif (registerEvent(moveEvent, actionId, actionIdMap)) {\n\t\t\ttmpVector.emplace_back(actionId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02ea333a64a966d279d3c7254d037c03e6138cb086dedae18a773f058b11bf3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 86, + "startColumn": 32, + "charOffset": 2541, + "charLength": 8, + "snippet": { + "text": "actionId" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 32, + "charOffset": 2462, + "charLength": 8, + "snippet": { + "text": "\n\tfor (const auto &actionId : actionIdVector) {\n\t\tif (registerEvent(moveEvent, actionId, actionIdMap)) {\n\t\t\ttmpVector.emplace_back(actionId);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e0c82f39e006f5be7dc91ae51d1136a63b8bfa21e7353f06b420336ec9ecc2ea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 14, + "charOffset": 2580, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 14, + "charOffset": 2463, + "charLength": 12, + "snippet": { + "text": "\tfor (const auto &actionId : actionIdVector) {\n\t\tif (registerEvent(moveEvent, actionId, actionIdMap)) {\n\t\t\ttmpVector.emplace_back(actionId);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05c5d84ba6ba66d22b0d3e3b958c7b4bf279c188aa980cd0fa28b9f193563454" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 95, + "startColumn": 74, + "charOffset": 2761, + "charLength": 9, + "snippet": { + "text": "moveEvent" + } + }, + "contextRegion": { + "startLine": 93, + "startColumn": 74, + "charOffset": 2685, + "charLength": 9, + "snippet": { + "text": "}\n\nbool MoveEvents::registerLuaUniqueEvent(const std::shared_ptr moveEvent) {\n\tauto uniqueIdVector = moveEvent->getUniqueIdsVector();\n\tif (uniqueIdVector.empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74a7528ff8411ece4c4ac46e3683dd06f869c33be3bc51e66bd5686e90b72ebd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 104, + "startColumn": 2, + "charOffset": 2960, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 102, + "startColumn": 2, + "charOffset": 2915, + "charLength": 3, + "snippet": { + "text": "\ttmpVector.reserve(uniqueIdVector.size());\n\n\tfor (const auto &uniqueId : uniqueIdVector) {\n\t\tif (registerEvent(moveEvent, uniqueId, uniqueIdMap)) {\n\t\t\ttmpVector.emplace_back(uniqueId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c9123ac53ca0bd5c20a76f07cff35044006158f750053b0b4cd750c97db0043e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 105, + "startColumn": 32, + "charOffset": 3037, + "charLength": 8, + "snippet": { + "text": "uniqueId" + } + }, + "contextRegion": { + "startLine": 103, + "startColumn": 32, + "charOffset": 2958, + "charLength": 8, + "snippet": { + "text": "\n\tfor (const auto &uniqueId : uniqueIdVector) {\n\t\tif (registerEvent(moveEvent, uniqueId, uniqueIdMap)) {\n\t\t\ttmpVector.emplace_back(uniqueId);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "976f18f9de6d42c289be3336b0db4f1c5f12c50f5db8e299982fee451ccc465e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 106, + "startColumn": 14, + "charOffset": 3076, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 104, + "startColumn": 14, + "charOffset": 2959, + "charLength": 12, + "snippet": { + "text": "\tfor (const auto &uniqueId : uniqueIdVector) {\n\t\tif (registerEvent(moveEvent, uniqueId, uniqueIdMap)) {\n\t\t\ttmpVector.emplace_back(uniqueId);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b50ef62310c0ea3f00134c64a7f793c299fb5aa408d69635e4c3577ad252ad6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 114, + "startColumn": 76, + "charOffset": 3259, + "charLength": 9, + "snippet": { + "text": "moveEvent" + } + }, + "contextRegion": { + "startLine": 112, + "startColumn": 76, + "charOffset": 3181, + "charLength": 9, + "snippet": { + "text": "}\n\nbool MoveEvents::registerLuaPositionEvent(const std::shared_ptr moveEvent) {\n\tauto positionVector = moveEvent->getPositionsVector();\n\tif (positionVector.empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59c54677a790f4b136d8922d90a2ebbe419c1e031d2326b44da9c3ab68e87b32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 123, + "startColumn": 2, + "charOffset": 3458, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 121, + "startColumn": 2, + "charOffset": 3413, + "charLength": 3, + "snippet": { + "text": "\ttmpVector.reserve(positionVector.size());\n\n\tfor (const auto &position : positionVector) {\n\t\tif (registerEvent(moveEvent, position, positionsMap)) {\n\t\t\ttmpVector.emplace_back(position);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a1b9b382a5d09443c76f097bc3468683472799a14d6fe15ac54b8bf0867baeb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 125, + "startColumn": 14, + "charOffset": 3575, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 123, + "startColumn": 14, + "charOffset": 3457, + "charLength": 12, + "snippet": { + "text": "\tfor (const auto &position : positionVector) {\n\t\tif (registerEvent(moveEvent, position, positionsMap)) {\n\t\t\ttmpVector.emplace_back(position);\n\t\t}\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ae541c055ce4b5617d1181d6a193e0e2536cd9314d5ddd8b17ec127e635056c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 133, + "startColumn": 68, + "charOffset": 3750, + "charLength": 9, + "snippet": { + "text": "moveEvent" + } + }, + "contextRegion": { + "startLine": 131, + "startColumn": 68, + "charOffset": 3680, + "charLength": 9, + "snippet": { + "text": "}\n\nbool MoveEvents::registerLuaEvent(const std::shared_ptr moveEvent) {\n\t// Check if event is correct\n\tif (registerLuaItemEvent(moveEvent)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef5521c459688e9abe5020d3eb9dc43d582107451b4b1bdfa23e79aecac2f0b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 140, + "startColumn": 4, + "charOffset": 3979, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 138, + "startColumn": 4, + "charOffset": 3914, + "charLength": 4, + "snippet": { + "text": "\t || registerLuaPositionEvent(moveEvent)) {\n\t\treturn true;\n\t} else {\n\t\tg_logger().warn(\n\t\t\t\"[{}] missing id, aid, uid or position for script: {}\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35c352a1e8d544d4206c4131b766c2a51c10e98f80fb9b47a7b6d340eaa49703" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'registerEvent' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 150, + "startColumn": 18, + "charOffset": 4184, + "charLength": 13, + "snippet": { + "text": "registerEvent" + } + }, + "contextRegion": { + "startLine": 148, + "startColumn": 18, + "charOffset": 4164, + "charLength": 13, + "snippet": { + "text": "}\n\nbool MoveEvents::registerEvent(const std::shared_ptr moveEvent, int32_t id, std::map &moveListMap) const {\n\tauto it = moveListMap.find(id);\n\tif (it == moveListMap.end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b78ed27247992c67fefc320e28d132a81f7d1adf93c750b4f157da9abab094ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 150, + "startColumn": 65, + "charOffset": 4231, + "charLength": 9, + "snippet": { + "text": "moveEvent" + } + }, + "contextRegion": { + "startLine": 148, + "startColumn": 65, + "charOffset": 4164, + "charLength": 9, + "snippet": { + "text": "}\n\nbool MoveEvents::registerEvent(const std::shared_ptr moveEvent, int32_t id, std::map &moveListMap) const {\n\tauto it = moveListMap.find(id);\n\tif (it == moveListMap.end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2d2c290c07db5676c7efb05f75a93c84c4d0167520be299cc23c17802af55548" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 154, + "startColumn": 3, + "charOffset": 4407, + "charLength": 13, + "snippet": { + "text": "moveEventList" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 3, + "charOffset": 4342, + "charLength": 13, + "snippet": { + "text": "\tif (it == moveListMap.end()) {\n\t\tMoveEventList moveEventList;\n\t\tmoveEventList.moveEvent[moveEvent->getEventType()].push_back(moveEvent);\n\t\tmoveListMap[id] = moveEventList;\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a0532121d8519c5288973b47116a739b211e741ee2082e97dc6f53cf63dff014" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 157, + "startColumn": 4, + "charOffset": 4533, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 155, + "startColumn": 4, + "charOffset": 4480, + "charLength": 4, + "snippet": { + "text": "\t\tmoveListMap[id] = moveEventList;\n\t\treturn true;\n\t} else {\n\t\tstd::list> &moveEventList = it->second.moveEvent[moveEvent->getEventType()];\n\t\tfor (const auto &existingMoveEvent : moveEventList) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ac39975da4f8558b37bb9d67881418a5e3e3957333c31e76b7acc3a02f23b38" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 158, + "startColumn": 58, + "charOffset": 4597, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 156, + "startColumn": 58, + "charOffset": 4515, + "charLength": 2, + "snippet": { + "text": "\t\treturn true;\n\t} else {\n\t\tstd::list> &moveEventList = it->second.moveEvent[moveEvent->getEventType()];\n\t\tfor (const auto &existingMoveEvent : moveEventList) {\n\t\t\tif (existingMoveEvent->getSlot() == moveEvent->getSlot()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc4c75b3b1938f44f3359249cfbda812ad7dc9f3bcac59ed2e6a8314282e63d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 159, + "startColumn": 3, + "charOffset": 4648, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 157, + "startColumn": 3, + "charOffset": 4530, + "charLength": 3, + "snippet": { + "text": "\t} else {\n\t\tstd::list> &moveEventList = it->second.moveEvent[moveEvent->getEventType()];\n\t\tfor (const auto &existingMoveEvent : moveEventList) {\n\t\t\tif (existingMoveEvent->getSlot() == moveEvent->getSlot()) {\n\t\t\t\tg_logger().warn(" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fba2649fd8e0f3f4f54cb9ceda92a91c9642263b7ff1cb658caac1a3bd132438" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'slotp' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 176, + "startColumn": 11, + "charOffset": 5160, + "charLength": 5, + "snippet": { + "text": "slotp" + } + }, + "contextRegion": { + "startLine": 174, + "startColumn": 11, + "charOffset": 5027, + "charLength": 5, + "snippet": { + "text": "\nstd::shared_ptr MoveEvents::getEvent(const std::shared_ptr &item, MoveEvent_t eventType, Slots_t slot) {\n\tuint32_t slotp;\n\tswitch (slot) {\n\t\tcase CONST_SLOT_HEAD:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e3294911c8bf7c7bb927f9ce12447b3171f0ba4e77c3f66a599a99becccdcc0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when declaring iterators" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 214, + "startColumn": 3, + "charOffset": 5869, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 3, + "charOffset": 5812, + "charLength": 3, + "snippet": { + "text": "\n\tif (item->hasAttribute(ItemAttribute_t::ACTIONID)) {\n\t\tstd::map::iterator it = actionIdMap.find(item->getAttribute(ItemAttribute_t::ACTIONID));\n\t\tif (it != actionIdMap.end()) {\n\t\t\tstd::list> moveEventList = it->second.moveEvent[eventType];" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "319173420cd617f017e7d8fa8f9673e9a91c999719be1516c22410fe0cc6c40f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 216, + "startColumn": 58, + "charOffset": 6082, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 214, + "startColumn": 58, + "charOffset": 5867, + "charLength": 2, + "snippet": { + "text": "\t\tstd::map::iterator it = actionIdMap.find(item->getAttribute(ItemAttribute_t::ACTIONID));\n\t\tif (it != actionIdMap.end()) {\n\t\t\tstd::list> moveEventList = it->second.moveEvent[eventType];\n\t\t\tfor (const auto &moveEvent : moveEventList) {\n\t\t\t\tif ((moveEvent->getSlot() & slotp) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d24ce70a00e23f100d1273843cc7391f5883383f9d25ffdbab824de81784cd6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 217, + "startColumn": 4, + "charOffset": 6118, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 215, + "startColumn": 4, + "charOffset": 5992, + "charLength": 3, + "snippet": { + "text": "\t\tif (it != actionIdMap.end()) {\n\t\t\tstd::list> moveEventList = it->second.moveEvent[eventType];\n\t\t\tfor (const auto &moveEvent : moveEventList) {\n\t\t\t\tif ((moveEvent->getSlot() & slotp) != 0) {\n\t\t\t\t\treturn moveEvent;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d550a7419206a5c03aaec2115cbc036b57510c0b8fe1e41ceb12c01bbc4fc3c1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 227, + "startColumn": 58, + "charOffset": 6382, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 225, + "startColumn": 58, + "charOffset": 6253, + "charLength": 2, + "snippet": { + "text": "\tauto it = itemIdMap.find(item->getID());\n\tif (it != itemIdMap.end()) {\n\t\tstd::list> &moveEventList = it->second.moveEvent[eventType];\n\t\tfor (const auto &moveEvent : moveEventList) {\n\t\t\tif ((moveEvent->getSlot() & slotp) != 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fac2327756f717b959e24c6201efa418319292463a0a9caee4dc923e8dbf33b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 228, + "startColumn": 3, + "charOffset": 6417, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 226, + "startColumn": 3, + "charOffset": 6295, + "charLength": 3, + "snippet": { + "text": "\tif (it != itemIdMap.end()) {\n\t\tstd::list> &moveEventList = it->second.moveEvent[eventType];\n\t\tfor (const auto &moveEvent : moveEventList) {\n\t\t\tif ((moveEvent->getSlot() & slotp) != 0) {\n\t\t\t\treturn moveEvent;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a2bd5f40cd5ef3cee33b3d009c0345f23dcff0fe5b9ac56fb3a1f23cbccf5c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 242, + "startColumn": 59, + "charOffset": 6946, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 240, + "startColumn": 59, + "charOffset": 6773, + "charLength": 2, + "snippet": { + "text": "\t\tit = uniqueIdMap.find(item->getAttribute(ItemAttribute_t::UNIQUEID));\n\t\tif (it != uniqueIdMap.end()) {\n\t\t\tstd::list> &moveEventList = it->second.moveEvent[eventType];\n\t\t\tif (!moveEventList.empty()) {\n\t\t\t\treturn *moveEventList.begin();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c2fed0f0e27866d7cdcdf5db78f4853d2dfdfc66f58f4741a6fec848671ae4ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 252, + "startColumn": 59, + "charOffset": 7287, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 250, + "startColumn": 59, + "charOffset": 7114, + "charLength": 2, + "snippet": { + "text": "\t\tit = actionIdMap.find(item->getAttribute(ItemAttribute_t::ACTIONID));\n\t\tif (it != actionIdMap.end()) {\n\t\t\tstd::list> &moveEventList = it->second.moveEvent[eventType];\n\t\t\tif (!moveEventList.empty()) {\n\t\t\t\treturn *moveEventList.begin();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b973bc0bb9e4bc3ecd293327b058d076e339c4e3a58f8e207fe2ad08b4b4b9e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 261, + "startColumn": 58, + "charOffset": 7525, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 259, + "startColumn": 58, + "charOffset": 7401, + "charLength": 2, + "snippet": { + "text": "\tit = itemIdMap.find(item->getID());\n\tif (it != itemIdMap.end()) {\n\t\tstd::list> &moveEventList = it->second.moveEvent[eventType];\n\t\tif (!moveEventList.empty()) {\n\t\t\treturn *moveEventList.begin();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "994b51f3034447cef11cb990649e99c9ddc3fe38da618ee28289fbc790db8a1f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'registerEvent' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 269, + "startColumn": 18, + "charOffset": 7668, + "charLength": 13, + "snippet": { + "text": "registerEvent" + } + }, + "contextRegion": { + "startLine": 267, + "startColumn": 18, + "charOffset": 7648, + "charLength": 13, + "snippet": { + "text": "}\n\nbool MoveEvents::registerEvent(const std::shared_ptr moveEvent, const Position &position, std::map &moveListMap) const {\n\tauto it = moveListMap.find(position);\n\tif (it == moveListMap.end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9502d722c31eb9319be10c46c3b931676a10abd5d2aad360f10febdfa82a9e56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 269, + "startColumn": 65, + "charOffset": 7715, + "charLength": 9, + "snippet": { + "text": "moveEvent" + } + }, + "contextRegion": { + "startLine": 267, + "startColumn": 65, + "charOffset": 7648, + "charLength": 9, + "snippet": { + "text": "}\n\nbool MoveEvents::registerEvent(const std::shared_ptr moveEvent, const Position &position, std::map &moveListMap) const {\n\tauto it = moveListMap.find(position);\n\tif (it == moveListMap.end()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "87c09541da80ce6bcddf01b5b611b73f4eaaaed09fbbd7af155ccf06a2388d6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 273, + "startColumn": 3, + "charOffset": 7912, + "charLength": 13, + "snippet": { + "text": "moveEventList" + } + }, + "contextRegion": { + "startLine": 271, + "startColumn": 3, + "charOffset": 7847, + "charLength": 13, + "snippet": { + "text": "\tif (it == moveListMap.end()) {\n\t\tMoveEventList moveEventList;\n\t\tmoveEventList.moveEvent[moveEvent->getEventType()].push_back(moveEvent);\n\t\tmoveListMap[position] = moveEventList;\n\t\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25120deb1b8603f8ff1b937cc2ecedcf74dd3a4cf8ee94805729e7c7989f43f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 276, + "startColumn": 4, + "charOffset": 8044, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 274, + "startColumn": 4, + "charOffset": 7985, + "charLength": 4, + "snippet": { + "text": "\t\tmoveListMap[position] = moveEventList;\n\t\treturn true;\n\t} else {\n\t\tstd::list> &moveEventList = it->second.moveEvent[moveEvent->getEventType()];\n\t\tif (!moveEventList.empty()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e2c8bfdea1c91082080fc707ff979eb27b3797aea67ec345a6cad73006ea917a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 277, + "startColumn": 58, + "charOffset": 8108, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 275, + "startColumn": 58, + "charOffset": 8026, + "charLength": 2, + "snippet": { + "text": "\t\treturn true;\n\t} else {\n\t\tstd::list> &moveEventList = it->second.moveEvent[moveEvent->getEventType()];\n\t\tif (!moveEventList.empty()) {\n\t\t\tg_logger().warn(" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb096a78e99d84dd1ee905ce5ab4dc48febf347b7c07a40cf36f95f4cd7c3836" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 296, + "startColumn": 58, + "charOffset": 8710, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 294, + "startColumn": 58, + "charOffset": 8565, + "charLength": 2, + "snippet": { + "text": "\tif (auto it = positionsMap.find(tile->getPosition());\n\t it != positionsMap.end()) {\n\t\tstd::list> &moveEventList = it->second.moveEvent[eventType];\n\t\tif (!moveEventList.empty()) {\n\t\t\treturn *moveEventList.begin();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea708fa0e2380af7971fe21b5ccd9b1316cbaa627c5345380c45e4bc169a5620" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 314, + "startColumn": 2, + "charOffset": 9167, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 312, + "startColumn": 2, + "charOffset": 9162, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (size_t i = tile->getFirstIndex(), j = tile->getLastIndex(); i < j; ++i) {\n\t\tstd::shared_ptr thing = tile->getThing(i);\n\t\tif (!thing) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7dfc29e0d689124ab34849aa3ebe4bfe6b889dcb5ba4c49bb868dec365f677b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 314, + "startColumn": 7, + "charOffset": 9172, + "charLength": 6, + "snippet": { + "text": "size_t" + } + }, + "contextRegion": { + "startLine": 312, + "startColumn": 7, + "charOffset": 9162, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tfor (size_t i = tile->getFirstIndex(), j = tile->getLastIndex(); i < j; ++i) {\n\t\tstd::shared_ptr thing = tile->getThing(i);\n\t\tif (!thing) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7fe641d03a367be570a1b564ec9e9202f8c7f93fe204ead738d8c5d8958f3989" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'i' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 314, + "startColumn": 67, + "charOffset": 9232, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 312, + "startColumn": 67, + "charOffset": 9162, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tfor (size_t i = tile->getFirstIndex(), j = tile->getLastIndex(); i < j; ++i) {\n\t\tstd::shared_ptr thing = tile->getThing(i);\n\t\tif (!thing) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19aaa3dbb5653ac5d8c1006a51cf2469fe5f4028173c83bce7cf612fd90a00f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 316, + "startColumn": 7, + "charOffset": 9304, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 314, + "startColumn": 7, + "charOffset": 9166, + "charLength": 1, + "snippet": { + "text": "\tfor (size_t i = tile->getFirstIndex(), j = tile->getLastIndex(); i < j; ++i) {\n\t\tstd::shared_ptr thing = tile->getThing(i);\n\t\tif (!thing) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a744b1fefd3e25b9f3a90a74efcbe0d2e3d2382aa2ff2b57f0ae0a643e9f75f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 321, + "startColumn": 7, + "charOffset": 9391, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 319, + "startColumn": 7, + "charOffset": 9331, + "charLength": 1, + "snippet": { + "text": "\n\t\tstd::shared_ptr tileItem = thing->getItem();\n\t\tif (!tileItem) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbf10b098acc0aa8d3797083f2e0c2a1b20bd77aa21e8102dae398ee4c7792a1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 340, + "startColumn": 6, + "charOffset": 9904, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 338, + "startColumn": 6, + "charOffset": 9696, + "charLength": 1, + "snippet": { + "text": "uint32_t MoveEvents::onPlayerEquip(const std::shared_ptr &player, const std::shared_ptr &item, Slots_t slot, bool isCheck) {\n\tconst auto moveEvent = getEvent(item, MOVE_EVENT_EQUIP, slot);\n\tif (!moveEvent) {\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3af894acae83722e7b1ac0824a3a01d8dca2bddd169d8e22a12b864827e00047" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 350, + "startColumn": 6, + "charOffset": 10402, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 348, + "startColumn": 6, + "charOffset": 10204, + "charLength": 1, + "snippet": { + "text": "uint32_t MoveEvents::onPlayerDeEquip(const std::shared_ptr &player, const std::shared_ptr &item, Slots_t slot) {\n\tconst auto moveEvent = getEvent(item, MOVE_EVENT_DEEQUIP, slot);\n\tif (!moveEvent) {\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9ab955d2e0e317b7f473bb124baac4c22ed71f3774f7ad755f0586d594e7d3ba" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 359, + "startColumn": 2, + "charOffset": 10819, + "charLength": 11, + "snippet": { + "text": "MoveEvent_t" + } + }, + "contextRegion": { + "startLine": 357, + "startColumn": 2, + "charOffset": 10701, + "charLength": 11, + "snippet": { + "text": "\nuint32_t MoveEvents::onItemMove(const std::shared_ptr &item, const std::shared_ptr &tile, bool isAdd) {\n\tMoveEvent_t eventType1, eventType2;\n\tif (isAdd) {\n\t\teventType1 = MOVE_EVENT_ADD_ITEM;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5a038d7c47013c1d8d3af2bc42f30fd06de1078f8f5cd95a71de370ab4fa3cac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 359, + "startColumn": 2, + "charOffset": 10819, + "charLength": 11, + "snippet": { + "text": "MoveEvent_t" + } + }, + "contextRegion": { + "startLine": 357, + "startColumn": 2, + "charOffset": 10701, + "charLength": 11, + "snippet": { + "text": "\nuint32_t MoveEvents::onItemMove(const std::shared_ptr &item, const std::shared_ptr &tile, bool isAdd) {\n\tMoveEvent_t eventType1, eventType2;\n\tif (isAdd) {\n\t\teventType1 = MOVE_EVENT_ADD_ITEM;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3801a194737e14b4d6bb599e32fe81e381efbe27a92d57683d5b4c4eb33f8d2a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'eventType1' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 359, + "startColumn": 14, + "charOffset": 10831, + "charLength": 10, + "snippet": { + "text": "eventType1" + } + }, + "contextRegion": { + "startLine": 357, + "startColumn": 14, + "charOffset": 10701, + "charLength": 10, + "snippet": { + "text": "\nuint32_t MoveEvents::onItemMove(const std::shared_ptr &item, const std::shared_ptr &tile, bool isAdd) {\n\tMoveEvent_t eventType1, eventType2;\n\tif (isAdd) {\n\t\teventType1 = MOVE_EVENT_ADD_ITEM;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82ad8bdccb50472b284222546ca8509ecbceea2bf4f51d35e424caf0a4c973fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'eventType2' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 359, + "startColumn": 26, + "charOffset": 10843, + "charLength": 10, + "snippet": { + "text": "eventType2" + } + }, + "contextRegion": { + "startLine": 357, + "startColumn": 26, + "charOffset": 10701, + "charLength": 10, + "snippet": { + "text": "\nuint32_t MoveEvents::onItemMove(const std::shared_ptr &item, const std::shared_ptr &tile, bool isAdd) {\n\tMoveEvent_t eventType1, eventType2;\n\tif (isAdd) {\n\t\teventType1 = MOVE_EVENT_ADD_ITEM;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01d875831921f7e0f877c419befd331dbd7336868f56829d5d45596d87944d22" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 381, + "startColumn": 2, + "charOffset": 11364, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 379, + "startColumn": 2, + "charOffset": 11359, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (size_t i = tile->getFirstIndex(), j = tile->getLastIndex(); i < j; ++i) {\n\t\tstd::shared_ptr thing = tile->getThing(i);\n\t\tif (!thing) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c50ac54ae43d838f17c0bdb2d779b9ccef548fd6bb38c1955cd01a8cfad407b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 381, + "startColumn": 7, + "charOffset": 11369, + "charLength": 6, + "snippet": { + "text": "size_t" + } + }, + "contextRegion": { + "startLine": 379, + "startColumn": 7, + "charOffset": 11359, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tfor (size_t i = tile->getFirstIndex(), j = tile->getLastIndex(); i < j; ++i) {\n\t\tstd::shared_ptr thing = tile->getThing(i);\n\t\tif (!thing) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dd9ea531163ace856f5f2d529af2fea09e6da0cb2dac8a556a8ea899ab6ed475" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'i' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 381, + "startColumn": 67, + "charOffset": 11429, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 379, + "startColumn": 67, + "charOffset": 11359, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tfor (size_t i = tile->getFirstIndex(), j = tile->getLastIndex(); i < j; ++i) {\n\t\tstd::shared_ptr thing = tile->getThing(i);\n\t\tif (!thing) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "901cbbeea419ad33798cbfa82960feb2a97302dd78791fb37ca3cda77dde518f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 383, + "startColumn": 7, + "charOffset": 11501, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 381, + "startColumn": 7, + "charOffset": 11363, + "charLength": 1, + "snippet": { + "text": "\tfor (size_t i = tile->getFirstIndex(), j = tile->getLastIndex(); i < j; ++i) {\n\t\tstd::shared_ptr thing = tile->getThing(i);\n\t\tif (!thing) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a5ac1e2e9a03dc30d5d6378cbde2ba75e560ce32f2669ead9c90b0858b9f32e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 388, + "startColumn": 7, + "charOffset": 11588, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 386, + "startColumn": 7, + "charOffset": 11528, + "charLength": 1, + "snippet": { + "text": "\n\t\tstd::shared_ptr tileItem = thing->getItem();\n\t\tif (!tileItem) {\n\t\t\tcontinue;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7d9f79023a669c05fe54eb60e76700f082db9cf74efc84655e25d0b33dd64a21" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 415, + "startColumn": 3, + "charOffset": 12110, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 413, + "startColumn": 3, + "charOffset": 12035, + "charLength": 4, + "snippet": { + "text": "std::string MoveEvent::getScriptTypeName() const {\n\tswitch (eventType) {\n\t\tcase MOVE_EVENT_STEP_IN:\n\t\t\treturn \"onStepIn\";\n\t\tcase MOVE_EVENT_STEP_OUT:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a50147ef760c202fc2fc7561ae87b5a6cf16376a2acf39c8bec33584893fb3a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 417, + "startColumn": 3, + "charOffset": 12159, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 415, + "startColumn": 3, + "charOffset": 12108, + "charLength": 4, + "snippet": { + "text": "\t\tcase MOVE_EVENT_STEP_IN:\n\t\t\treturn \"onStepIn\";\n\t\tcase MOVE_EVENT_STEP_OUT:\n\t\t\treturn \"onStepOut\";\n\t\tcase MOVE_EVENT_EQUIP:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09778097b88e28c0d0f1db2c4658f9af407d006ec041a8ceca5ba248162a4399" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 419, + "startColumn": 3, + "charOffset": 12210, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 417, + "startColumn": 3, + "charOffset": 12157, + "charLength": 4, + "snippet": { + "text": "\t\tcase MOVE_EVENT_STEP_OUT:\n\t\t\treturn \"onStepOut\";\n\t\tcase MOVE_EVENT_EQUIP:\n\t\t\treturn \"onEquip\";\n\t\tcase MOVE_EVENT_DEEQUIP:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d684db3d7e3ff2aa1f3f38454396dd3d3dd276e9c0f3f42d10c68ad874c65188" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 421, + "startColumn": 3, + "charOffset": 12256, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 419, + "startColumn": 3, + "charOffset": 12208, + "charLength": 4, + "snippet": { + "text": "\t\tcase MOVE_EVENT_EQUIP:\n\t\t\treturn \"onEquip\";\n\t\tcase MOVE_EVENT_DEEQUIP:\n\t\t\treturn \"onDeEquip\";\n\t\tcase MOVE_EVENT_ADD_ITEM:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fbbd7974b91c1348be3c9c6cb6306420ead81895df7db6c52cf10173884c9446" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 423, + "startColumn": 3, + "charOffset": 12306, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 421, + "startColumn": 3, + "charOffset": 12254, + "charLength": 4, + "snippet": { + "text": "\t\tcase MOVE_EVENT_DEEQUIP:\n\t\t\treturn \"onDeEquip\";\n\t\tcase MOVE_EVENT_ADD_ITEM:\n\t\t\treturn \"onAddItem\";\n\t\tcase MOVE_EVENT_REMOVE_ITEM:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1230f927160ff2b0b15d8e527a5cef4b096b51e3669aeb360964140609c018b6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 425, + "startColumn": 3, + "charOffset": 12357, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 423, + "startColumn": 3, + "charOffset": 12304, + "charLength": 4, + "snippet": { + "text": "\t\tcase MOVE_EVENT_ADD_ITEM:\n\t\t\treturn \"onAddItem\";\n\t\tcase MOVE_EVENT_REMOVE_ITEM:\n\t\t\treturn \"onRemoveItem\";\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3f27c3a48b65efabbb3e5fee42c67c63f84c116b90e844f59da0bbc65a3e34f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 427, + "startColumn": 3, + "charOffset": 12414, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 425, + "startColumn": 3, + "charOffset": 12355, + "charLength": 7, + "snippet": { + "text": "\t\tcase MOVE_EVENT_REMOVE_ITEM:\n\t\t\treturn \"onRemoveItem\";\n\t\tdefault:\n\t\t\tg_logger().error(\n\t\t\t\t\"[{}] invalid event type for script: {}\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e944bf0c0ad1195d04821bb284c045caae889c43b3cd0efc4390e6a25c7223f3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-return-braced-init-list", + "ruleIndex": 630, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 433, + "startColumn": 11, + "charOffset": 12573, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 431, + "startColumn": 11, + "charOffset": 12508, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tgetScriptInterface()->getLoadingScriptName()\n\t\t\t);\n\t\t\treturn std::string();\n\t}\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5bf8460e82c7861cb931197e9b1e1c9fa5a233d8361fb8a19de250d8a5fed805" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 437, + "startColumn": 59, + "charOffset": 12652, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 435, + "startColumn": 59, + "charOffset": 12591, + "charLength": 8, + "snippet": { + "text": "}\n\nuint32_t MoveEvent::StepInField(std::shared_ptr creature, std::shared_ptr item, const Position &) {\n\tif (creature == nullptr) {\n\t\tg_logger().error(\"[MoveEvent::StepInField] - Creature is nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6da2e966858f4edc1c376319499be44b6c02408a12cf9d42b383d66024a8127f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 437, + "startColumn": 91, + "charOffset": 12684, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 435, + "startColumn": 91, + "charOffset": 12591, + "charLength": 4, + "snippet": { + "text": "}\n\nuint32_t MoveEvent::StepInField(std::shared_ptr creature, std::shared_ptr item, const Position &) {\n\tif (creature == nullptr) {\n\t\tg_logger().error(\"[MoveEvent::StepInField] - Creature is nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "050b7ca2132e8def31d35032de27c389676a499844aa3d61df32c99688444da6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 437, + "startColumn": 113, + "charOffset": 12706, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 435, + "startColumn": 113, + "charOffset": 12591, + "charLength": 1, + "snippet": { + "text": "}\n\nuint32_t MoveEvent::StepInField(std::shared_ptr creature, std::shared_ptr item, const Position &) {\n\tif (creature == nullptr) {\n\t\tg_logger().error(\"[MoveEvent::StepInField] - Creature is nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e79b33b77569143c40367ce062b07de33d67e506d95afb69ef4ace325ec08c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 457, + "startColumn": 59, + "charOffset": 13149, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 455, + "startColumn": 59, + "charOffset": 13088, + "charLength": 1, + "snippet": { + "text": "}\n\nuint32_t MoveEvent::StepOutField(std::shared_ptr, std::shared_ptr, const Position &) {\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a56ea7d5ae39895a749ee42d991e2d9dc086764ed11916fb04f0c5fad405b8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 457, + "startColumn": 59, + "charOffset": 13149, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 455, + "startColumn": 59, + "charOffset": 13088, + "charLength": 1, + "snippet": { + "text": "}\n\nuint32_t MoveEvent::StepOutField(std::shared_ptr, std::shared_ptr, const Position &) {\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ef29f16db260707c746e4674e17a941911e01df230202848de4f234bd36caa72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 457, + "startColumn": 82, + "charOffset": 13172, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 455, + "startColumn": 82, + "charOffset": 13088, + "charLength": 1, + "snippet": { + "text": "}\n\nuint32_t MoveEvent::StepOutField(std::shared_ptr, std::shared_ptr, const Position &) {\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ad4d4aae74c0ff928ddd141e83b0be3d2fa7fa84c01066fd42ccf2bc4a2a7e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 461, + "startColumn": 56, + "charOffset": 13263, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 459, + "startColumn": 56, + "charOffset": 13205, + "charLength": 4, + "snippet": { + "text": "}\n\nuint32_t MoveEvent::AddItemField(std::shared_ptr item, std::shared_ptr, const Position &) {\n\tif (item == nullptr) {\n\t\tg_logger().error(\"[MoveEvent::AddItemField] - Item is nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0bd92203812c3884652e02fdcc8a89b5b6e5a33b3d81d243291a904725697613" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 461, + "startColumn": 83, + "charOffset": 13290, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 459, + "startColumn": 83, + "charOffset": 13205, + "charLength": 1, + "snippet": { + "text": "}\n\nuint32_t MoveEvent::AddItemField(std::shared_ptr item, std::shared_ptr, const Position &) {\n\tif (item == nullptr) {\n\t\tg_logger().error(\"[MoveEvent::AddItemField] - Item is nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72dacaa338c555f2507fc836a0f3d4128a2163b3e17986428e6b5a1384f1b6b8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 461, + "startColumn": 83, + "charOffset": 13290, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 459, + "startColumn": 83, + "charOffset": 13205, + "charLength": 1, + "snippet": { + "text": "}\n\nuint32_t MoveEvent::AddItemField(std::shared_ptr item, std::shared_ptr, const Position &) {\n\tif (item == nullptr) {\n\t\tg_logger().error(\"[MoveEvent::AddItemField] - Item is nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b513b04a91e20b59121f798c382445e015967234adc13d434f3ba765cf5b49dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 478, + "startColumn": 3, + "charOffset": 13823, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 476, + "startColumn": 3, + "charOffset": 13804, + "charLength": 3, + "snippet": { + "text": "\t\t\treturn 0;\n\t\t}\n\t\tfor (auto &creature : *creatures) {\n\t\t\tif (field == nullptr) {\n\t\t\t\tg_logger().debug(\"[MoveEvent::AddItemField] - MagicField is nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f1c48de273a60e612bf090e23d7232ea3b040a4783c4a9361d0c2462b55abc6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-qualified-auto", + "ruleIndex": 714, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto &creature' can be declared as 'const auto &creature'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 478, + "startColumn": 8, + "charOffset": 13828, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 476, + "startColumn": 8, + "charOffset": 13804, + "charLength": 4, + "snippet": { + "text": "\t\t\treturn 0;\n\t\t}\n\t\tfor (auto &creature : *creatures) {\n\t\t\tif (field == nullptr) {\n\t\t\t\tg_logger().debug(\"[MoveEvent::AddItemField] - MagicField is nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d26b9a21976c6b44bae5107e4b78b0d6c14e6ae5808b92964dcc6f39a9096629" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 491, + "startColumn": 58, + "charOffset": 14129, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 489, + "startColumn": 58, + "charOffset": 14069, + "charLength": 1, + "snippet": { + "text": "}\n\nuint32_t MoveEvent::RemoveItemField(std::shared_ptr, std::shared_ptr, const Position &) {\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f3b53b9548d2d1df293fa149ae288cfb65703ca868442229edb535f809b250e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 491, + "startColumn": 58, + "charOffset": 14129, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 489, + "startColumn": 58, + "charOffset": 14069, + "charLength": 1, + "snippet": { + "text": "}\n\nuint32_t MoveEvent::RemoveItemField(std::shared_ptr, std::shared_ptr, const Position &) {\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "af7b6b4588a3ea8d80d59c040c1d86a60549da03967003cb15e8dc457878a698" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 491, + "startColumn": 81, + "charOffset": 14152, + "charLength": 1, + "snippet": { + "text": "," + } + }, + "contextRegion": { + "startLine": 489, + "startColumn": 81, + "charOffset": 14069, + "charLength": 1, + "snippet": { + "text": "}\n\nuint32_t MoveEvent::RemoveItemField(std::shared_ptr, std::shared_ptr, const Position &) {\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c88b86d784233e5930f766eb05c51a086a1d1fed5b8385155573d8664c240bfc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'EquipItem' has cognitive complexity of 54 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 495, + "startColumn": 21, + "charOffset": 14208, + "charLength": 9, + "snippet": { + "text": "EquipItem" + } + }, + "contextRegion": { + "startLine": 493, + "startColumn": 21, + "charOffset": 14185, + "charLength": 9, + "snippet": { + "text": "}\n\nuint32_t MoveEvent::EquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool isCheck) {\n\tif (player == nullptr) {\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe4e0f9dcaa6a48122fedb18bd18dc9d1c9526299926b4f2734fbbbafb62080c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 495, + "startColumn": 64, + "charOffset": 14251, + "charLength": 9, + "snippet": { + "text": "moveEvent" + } + }, + "contextRegion": { + "startLine": 493, + "startColumn": 64, + "charOffset": 14185, + "charLength": 9, + "snippet": { + "text": "}\n\nuint32_t MoveEvent::EquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool isCheck) {\n\tif (player == nullptr) {\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad960b0bbdaa8ef579345da1d2e28b11bdc99fdaa673bb4b81711f8dbe492419" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 495, + "startColumn": 99, + "charOffset": 14286, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 493, + "startColumn": 99, + "charOffset": 14185, + "charLength": 6, + "snippet": { + "text": "}\n\nuint32_t MoveEvent::EquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool isCheck) {\n\tif (player == nullptr) {\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "279cb3d50d615d2c17c79510f9c9421251c834aa9a95f459d9becc028c3c6bc4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 495, + "startColumn": 129, + "charOffset": 14316, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 493, + "startColumn": 129, + "charOffset": 14185, + "charLength": 4, + "snippet": { + "text": "}\n\nuint32_t MoveEvent::EquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool isCheck) {\n\tif (player == nullptr) {\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4829aca0dd81647bc7539f866f067349200f4c2fbb672f3aaee5f4c1ac336f58" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 527, + "startColumn": 12, + "charOffset": 15162, + "charLength": 13, + "snippet": { + "text": "transformItem" + } + }, + "contextRegion": { + "startLine": 525, + "startColumn": 12, + "charOffset": 15068, + "charLength": 13, + "snippet": { + "text": "\tconst ItemType &it = Item::items[item->getID()];\n\tif (it.transformEquipTo != 0) {\n\t\tg_game().transformItem(item, it.transformEquipTo);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d2d847a1ab742ae003b1a732a32fd2ad1a82f9a6cdba69d9768b87c43e1bfcf6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 537, + "startColumn": 2, + "charOffset": 15380, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 535, + "startColumn": 2, + "charOffset": 15341, + "charLength": 3, + "snippet": { + "text": "\tplayer->setItemAbility(slot, true);\n\n\tfor (uint8_t slotid = 0; slotid < item->getImbuementSlot(); slotid++) {\n\t\tplayer->updateImbuementTrackerStats();\n\t\tImbuementInfo imbuementInfo;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ebffbe247880a8cc4cffb08b33088ef0e3f2070697e59b45355d0fcbe9ba6d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 550, + "startColumn": 12, + "charOffset": 15858, + "charLength": 12, + "snippet": { + "text": "addCondition" + } + }, + "contextRegion": { + "startLine": 548, + "startColumn": 12, + "charOffset": 15682, + "charLength": 12, + "snippet": { + "text": "\t\tif (it.abilities->invisible) {\n\t\t\tstd::shared_ptr condition = Condition::createCondition(static_cast(slot), CONDITION_INVISIBLE, -1, 0);\n\t\t\tplayer->addCondition(condition);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44f71c3924c03f8b731e3a1801aa471a838f8aad4e01d4890300f4df5c0bddf5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 555, + "startColumn": 12, + "charOffset": 16066, + "charLength": 12, + "snippet": { + "text": "addCondition" + } + }, + "contextRegion": { + "startLine": 553, + "startColumn": 12, + "charOffset": 15888, + "charLength": 12, + "snippet": { + "text": "\t\tif (it.abilities->manaShield) {\n\t\t\tstd::shared_ptr condition = Condition::createCondition(static_cast(slot), CONDITION_MANASHIELD, -1, 0);\n\t\t\tplayer->addCondition(condition);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9cd655ef0fa5ae82b1fb40d0fdbba41b66b4ad3992337d9a56835a85b24261d6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 569, + "startColumn": 16, + "charOffset": 16518, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 567, + "startColumn": 16, + "charOffset": 16457, + "charLength": 8, + "snippet": { + "text": "\n\t\t\tif (it.abilities->getHealthGain() != 0) {\n\t\t\t\tcondition->setParam(CONDITION_PARAM_HEALTHGAIN, it.abilities->getHealthGain());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41d3aa6745b1b0544ca1319c4682a1015aced1c48b0ac09c4361b22b92a238f7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 569, + "startColumn": 53, + "charOffset": 16555, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 567, + "startColumn": 53, + "charOffset": 16457, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tif (it.abilities->getHealthGain() != 0) {\n\t\t\t\tcondition->setParam(CONDITION_PARAM_HEALTHGAIN, it.abilities->getHealthGain());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "218617ff7271605c9f2fd4a91863aaf4b15b340925e9b5e1e979b693db914699" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 573, + "startColumn": 16, + "charOffset": 16654, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 571, + "startColumn": 16, + "charOffset": 16592, + "charLength": 8, + "snippet": { + "text": "\n\t\t\tif (it.abilities->getHealthTicks() != 0) {\n\t\t\t\tcondition->setParam(CONDITION_PARAM_HEALTHTICKS, it.abilities->getHealthTicks());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a6aacb3f81b171d225d8813ec17e61e4a8b9519f0d81727d9fc55ae6661cff4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 573, + "startColumn": 54, + "charOffset": 16692, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 571, + "startColumn": 54, + "charOffset": 16592, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tif (it.abilities->getHealthTicks() != 0) {\n\t\t\t\tcondition->setParam(CONDITION_PARAM_HEALTHTICKS, it.abilities->getHealthTicks());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7dd191e0c13ad76cde0b8d7acee04972bdd18ce2bf155f1b127a1523d213eb7b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 577, + "startColumn": 16, + "charOffset": 16789, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 575, + "startColumn": 16, + "charOffset": 16730, + "charLength": 8, + "snippet": { + "text": "\n\t\t\tif (it.abilities->getManaGain() != 0) {\n\t\t\t\tcondition->setParam(CONDITION_PARAM_MANAGAIN, it.abilities->getManaGain());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f76c363e59b5dda69da8e1c33a79c4d23905062b4d5dcebe9305ed77045272d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 577, + "startColumn": 51, + "charOffset": 16824, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 575, + "startColumn": 51, + "charOffset": 16730, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tif (it.abilities->getManaGain() != 0) {\n\t\t\t\tcondition->setParam(CONDITION_PARAM_MANAGAIN, it.abilities->getManaGain());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a8184809df0bbb28002f2fd658a5ab5e009ff951c911e3d1dc7ab7b8f25b5ac5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 581, + "startColumn": 16, + "charOffset": 16919, + "charLength": 8, + "snippet": { + "text": "setParam" + } + }, + "contextRegion": { + "startLine": 579, + "startColumn": 16, + "charOffset": 16859, + "charLength": 8, + "snippet": { + "text": "\n\t\t\tif (it.abilities->getManaTicks() != 0) {\n\t\t\t\tcondition->setParam(CONDITION_PARAM_MANATICKS, it.abilities->getManaTicks());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "18d80819eb156177ebb6845891a87d3e907b927644f399736ee0747bdc7bc865" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 581, + "startColumn": 52, + "charOffset": 16955, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 579, + "startColumn": 52, + "charOffset": 16859, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tif (it.abilities->getManaTicks() != 0) {\n\t\t\t\tcondition->setParam(CONDITION_PARAM_MANATICKS, it.abilities->getManaTicks());\n\t\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f51adadbf9a42818361f47793174211935670ff6c26e7c61eb673cdfd96d7bc7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 584, + "startColumn": 12, + "charOffset": 17003, + "charLength": 12, + "snippet": { + "text": "addCondition" + } + }, + "contextRegion": { + "startLine": 582, + "startColumn": 12, + "charOffset": 16986, + "charLength": 12, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tplayer->addCondition(condition);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4e57a21760737bc4d3d0c86452786ebf8bdfe5773a61950e2862d7f11c31c2e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 588, + "startColumn": 3, + "charOffset": 17066, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 586, + "startColumn": 3, + "charOffset": 17032, + "charLength": 3, + "snippet": { + "text": "\n\t\t// Skill and stats modifiers\n\t\tfor (int32_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\n\t\t\tif (item->getSkill(static_cast(i)) != 0) {\n\t\t\t\tplayer->setVarSkill(static_cast(i), item->getSkill(static_cast(i)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11417bf1ff987dc387f21ae4ebe3860ebd34711e09830359b433d18d4b6943c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 594, + "startColumn": 3, + "charOffset": 17281, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 592, + "startColumn": 3, + "charOffset": 17274, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfor (int32_t s = STAT_FIRST; s <= STAT_LAST; ++s) {\n\t\t\tif (item->getStat(static_cast(s)) != 0) {\n\t\t\t\tplayer->setVarStats(static_cast(s), item->getStat(static_cast(s)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b69d8f6acbf0d80c25f00bcf9fb4d5ff8f59fb3d63033d42316bfd8a0565fded" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 599, + "startColumn": 8, + "charOffset": 17490, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 597, + "startColumn": 8, + "charOffset": 17477, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->statsPercent[s]) {\n\t\t\t\tplayer->setVarStats(static_cast(s), static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fc1e7138006faa2e72b5c1f49dbc701aa17f428447af6b640f73b706db86d4e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 599, + "startColumn": 8, + "charOffset": 17490, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 597, + "startColumn": 8, + "charOffset": 17477, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->statsPercent[s]) {\n\t\t\t\tplayer->setVarStats(static_cast(s), static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99488078475d49039ba1dd5992f70d059d2b353aab8eff783c218e8e0151d2b9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 599, + "startColumn": 8, + "charOffset": 17490, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 597, + "startColumn": 8, + "charOffset": 17477, + "charLength": 2, + "snippet": { + "text": "\t\t\t}\n\n\t\t\tif (it.abilities->statsPercent[s]) {\n\t\t\t\tplayer->setVarStats(static_cast(s), static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15e2b2e6500534f4009454332fd75691c4863dd5378c14344f35a5171fb81c0f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 600, + "startColumn": 71, + "charOffset": 17593, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 598, + "startColumn": 71, + "charOffset": 17482, + "charLength": 6, + "snippet": { + "text": "\n\t\t\tif (it.abilities->statsPercent[s]) {\n\t\t\t\tplayer->setVarStats(static_cast(s), static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b79311ee5759c9bf2ac5ff14e56726bf4db8a3ceb574614f3ca6094535ab0bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 600, + "startColumn": 71, + "charOffset": 17593, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 598, + "startColumn": 71, + "charOffset": 17482, + "charLength": 6, + "snippet": { + "text": "\n\t\t\tif (it.abilities->statsPercent[s]) {\n\t\t\t\tplayer->setVarStats(static_cast(s), static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ecdd6edd6376f0d773e860ee37281f94dd5902b61c3502e92b24f9b7c8f1ab43" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 600, + "startColumn": 123, + "charOffset": 17645, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 598, + "startColumn": 123, + "charOffset": 17482, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tif (it.abilities->statsPercent[s]) {\n\t\t\t\tplayer->setVarStats(static_cast(s), static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50a104da91f88b8f91b2a1e742378a84700f3a4375fa84e30e3dba5dddac0814" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 600, + "startColumn": 123, + "charOffset": 17645, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 598, + "startColumn": 123, + "charOffset": 17482, + "charLength": 1, + "snippet": { + "text": "\n\t\t\tif (it.abilities->statsPercent[s]) {\n\t\t\t\tplayer->setVarStats(static_cast(s), static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98f8d23fe951c344d95fddd40cc7103a18952da6a05047dab80405c8e70185e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 600, + "startColumn": 124, + "charOffset": 17646, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 598, + "startColumn": 124, + "charOffset": 17482, + "charLength": 2, + "snippet": { + "text": "\n\t\t\tif (it.abilities->statsPercent[s]) {\n\t\t\t\tplayer->setVarStats(static_cast(s), static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5fac2327756f717b959e24c6201efa418319292463a0a9caee4dc923e8dbf33b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 600, + "startColumn": 156, + "charOffset": 17678, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 598, + "startColumn": 156, + "charOffset": 17482, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tif (it.abilities->statsPercent[s]) {\n\t\t\t\tplayer->setVarStats(static_cast(s), static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a480afb05efc4c55ec1f229b8efb058979ad1560a1f136441df9845191b7bd8c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 600, + "startColumn": 163, + "charOffset": 17685, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 598, + "startColumn": 163, + "charOffset": 17482, + "charLength": 5, + "snippet": { + "text": "\n\t\t\tif (it.abilities->statsPercent[s]) {\n\t\t\t\tplayer->setVarStats(static_cast(s), static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25755876527c0cc49f34460387986e333321cb7e55e75453bb5f29898d9add39" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 600, + "startColumn": 163, + "charOffset": 17685, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 598, + "startColumn": 163, + "charOffset": 17482, + "charLength": 5, + "snippet": { + "text": "\n\t\t\tif (it.abilities->statsPercent[s]) {\n\t\t\t\tplayer->setVarStats(static_cast(s), static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "878e45e5a19140bc4464a98ae1154409a43b834e6b4b34c476dc1f7fe50731ad" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'DeEquipItem' has cognitive complexity of 26 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 616, + "startColumn": 21, + "charOffset": 18065, + "charLength": 11, + "snippet": { + "text": "DeEquipItem" + } + }, + "contextRegion": { + "startLine": 614, + "startColumn": 21, + "charOffset": 18042, + "charLength": 11, + "snippet": { + "text": "}\n\nuint32_t MoveEvent::DeEquipItem(const std::shared_ptr MoveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool) {\n\tif (player == nullptr) {\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "601b31a9ee4013dd46dc81e821d0f0a9b348c951cfade15d031162c071495f6d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-unused-parameters", + "ruleIndex": 612, + "kind": "fail", + "level": "warning", + "message": { + "text": "parameter 'MoveEvent' is unused" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 616, + "startColumn": 66, + "charOffset": 18110, + "charLength": 9, + "snippet": { + "text": "MoveEvent" + } + }, + "contextRegion": { + "startLine": 614, + "startColumn": 66, + "charOffset": 18042, + "charLength": 9, + "snippet": { + "text": "}\n\nuint32_t MoveEvent::DeEquipItem(const std::shared_ptr MoveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool) {\n\tif (player == nullptr) {\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "246459b763c6032e4f97508a28e6bdc1f6e06972486475cec30d725ab2aa64a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'MoveEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 616, + "startColumn": 66, + "charOffset": 18110, + "charLength": 9, + "snippet": { + "text": "MoveEvent" + } + }, + "contextRegion": { + "startLine": 614, + "startColumn": 66, + "charOffset": 18042, + "charLength": 9, + "snippet": { + "text": "}\n\nuint32_t MoveEvent::DeEquipItem(const std::shared_ptr MoveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool) {\n\tif (player == nullptr) {\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "64f34c3afb9b979c33f3f4f3c90e1b139e3609916630f932e5166652adcd7574" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 616, + "startColumn": 101, + "charOffset": 18145, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 614, + "startColumn": 101, + "charOffset": 18042, + "charLength": 6, + "snippet": { + "text": "}\n\nuint32_t MoveEvent::DeEquipItem(const std::shared_ptr MoveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool) {\n\tif (player == nullptr) {\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afdd497d8535336d4b359ce8e97e3d63f09019b1117d1660c71062e910336b35" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 616, + "startColumn": 131, + "charOffset": 18175, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 614, + "startColumn": 131, + "charOffset": 18042, + "charLength": 4, + "snippet": { + "text": "}\n\nuint32_t MoveEvent::DeEquipItem(const std::shared_ptr MoveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool) {\n\tif (player == nullptr) {\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "464a7fb1a1bed56535822f501eb682f011d0b0cb5bdb53f0236f286e79712fc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-named-parameter", + "ruleIndex": 561, + "kind": "fail", + "level": "warning", + "message": { + "text": "all parameters should be named in a function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 616, + "startColumn": 155, + "charOffset": 18199, + "charLength": 1, + "snippet": { + "text": ")" + } + }, + "contextRegion": { + "startLine": 614, + "startColumn": 155, + "charOffset": 18042, + "charLength": 1, + "snippet": { + "text": "}\n\nuint32_t MoveEvent::DeEquipItem(const std::shared_ptr MoveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool) {\n\tif (player == nullptr) {\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a73af626e386ba3e41410e59abe596f9e34d16788554e3c6691cf860ce23c4f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 635, + "startColumn": 2, + "charOffset": 18635, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 633, + "startColumn": 2, + "charOffset": 18595, + "charLength": 3, + "snippet": { + "text": "\tplayer->setItemAbility(slot, false);\n\n\tfor (uint8_t slotid = 0; slotid < item->getImbuementSlot(); slotid++) {\n\t\tplayer->updateImbuementTrackerStats();\n\t\tImbuementInfo imbuementInfo;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "76bb785e281d40a707ee54d19f8390de6b935f8d0ea6d7dfc3bcc04cf4552cfd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 658, + "startColumn": 3, + "charOffset": 19313, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 656, + "startColumn": 3, + "charOffset": 19306, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfor (int32_t s = STAT_FIRST; s <= STAT_LAST; ++s) {\n\t\t\tif (it.abilities->statsPercent[s]) {\n\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d677a9abeb402ecc7263dedef1b4dfa4da33e2beb59530e53ba5fae57d4ffada" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 659, + "startColumn": 8, + "charOffset": 19372, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 657, + "startColumn": 8, + "charOffset": 19310, + "charLength": 2, + "snippet": { + "text": "\n\t\tfor (int32_t s = STAT_FIRST; s <= STAT_LAST; ++s) {\n\t\t\tif (it.abilities->statsPercent[s]) {\n\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "31f00128f8d2e19aef00d1cd14fb611e2cef16b52abbfd33fba6cef81fa3a48f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 659, + "startColumn": 8, + "charOffset": 19372, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 657, + "startColumn": 8, + "charOffset": 19310, + "charLength": 2, + "snippet": { + "text": "\n\t\tfor (int32_t s = STAT_FIRST; s <= STAT_LAST; ++s) {\n\t\t\tif (it.abilities->statsPercent[s]) {\n\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb096a78e99d84dd1ee905ce5ab4dc48febf347b7c07a40cf36f95f4cd7c3836" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 659, + "startColumn": 8, + "charOffset": 19372, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 657, + "startColumn": 8, + "charOffset": 19310, + "charLength": 2, + "snippet": { + "text": "\n\t\tfor (int32_t s = STAT_FIRST; s <= STAT_LAST; ++s) {\n\t\t\tif (it.abilities->statsPercent[s]) {\n\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b2ee4bdfa843cec8f0ae7580a7990d8af41296dfbdfcf2e341668b8b3180417" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 660, + "startColumn": 72, + "charOffset": 19476, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 658, + "startColumn": 72, + "charOffset": 19311, + "charLength": 6, + "snippet": { + "text": "\t\tfor (int32_t s = STAT_FIRST; s <= STAT_LAST; ++s) {\n\t\t\tif (it.abilities->statsPercent[s]) {\n\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "11c1558ea95ce4eec948f132bf56133e419252754eee5d72bbd28487e927488a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 660, + "startColumn": 72, + "charOffset": 19476, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 658, + "startColumn": 72, + "charOffset": 19311, + "charLength": 6, + "snippet": { + "text": "\t\tfor (int32_t s = STAT_FIRST; s <= STAT_LAST; ++s) {\n\t\t\tif (it.abilities->statsPercent[s]) {\n\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e60cde4a535a67aa0c4283d4e66c8bd29323a00609b558c2fd5840612d617289" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int' to 'float'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 660, + "startColumn": 124, + "charOffset": 19528, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 658, + "startColumn": 124, + "charOffset": 19311, + "charLength": 1, + "snippet": { + "text": "\t\tfor (int32_t s = STAT_FIRST; s <= STAT_LAST; ++s) {\n\t\t\tif (it.abilities->statsPercent[s]) {\n\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fd4bd2f644ab827e8e552944b7af14e167bf8f9c3454dc402ed59b9886a69945" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 660, + "startColumn": 124, + "charOffset": 19528, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 658, + "startColumn": 124, + "charOffset": 19311, + "charLength": 1, + "snippet": { + "text": "\t\tfor (int32_t s = STAT_FIRST; s <= STAT_LAST; ++s) {\n\t\t\tif (it.abilities->statsPercent[s]) {\n\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5eaa6e7af857eab0731cec7385f7b62fe2a1c545f28a7a7a4c0bdfea62fcdde4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-pro-bounds-constant-array-index", + "ruleIndex": 506, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use array subscript when the index is not an integer constant expression" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 660, + "startColumn": 125, + "charOffset": 19529, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 658, + "startColumn": 125, + "charOffset": 19311, + "charLength": 2, + "snippet": { + "text": "\t\tfor (int32_t s = STAT_FIRST; s <= STAT_LAST; ++s) {\n\t\t\tif (it.abilities->statsPercent[s]) {\n\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7378a004be6c1e368db05e619757dae6e7d284b17ce5ad9e5e2b3fd42a65c52c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "100 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 660, + "startColumn": 157, + "charOffset": 19561, + "charLength": 3, + "snippet": { + "text": "100" + } + }, + "contextRegion": { + "startLine": 658, + "startColumn": 157, + "charOffset": 19311, + "charLength": 3, + "snippet": { + "text": "\t\tfor (int32_t s = STAT_FIRST; s <= STAT_LAST; ++s) {\n\t\t\tif (it.abilities->statsPercent[s]) {\n\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95e6e936295366f896b0596f0254ed2c5714c9e4b4fa4dd5155382549705af22" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-4", + "ruleIndex": 416, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-4: Literal suffixes shall be upper case" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 660, + "startColumn": 164, + "charOffset": 19568, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 658, + "startColumn": 164, + "charOffset": 19311, + "charLength": 5, + "snippet": { + "text": "\t\tfor (int32_t s = STAT_FIRST; s <= STAT_LAST; ++s) {\n\t\t\tif (it.abilities->statsPercent[s]) {\n\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "19ea62e534e67c386e3923d0a4ebc54c4f473a9171404142cb8e87663ef5d210" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-uppercase-literal-suffix", + "ruleIndex": 571, + "kind": "fail", + "level": "warning", + "message": { + "text": "floating point literal has suffix 'f', which is not uppercase" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 660, + "startColumn": 164, + "charOffset": 19568, + "charLength": 5, + "snippet": { + "text": "100.f" + } + }, + "contextRegion": { + "startLine": 658, + "startColumn": 164, + "charOffset": 19311, + "charLength": 5, + "snippet": { + "text": "\t\tfor (int32_t s = STAT_FIRST; s <= STAT_LAST; ++s) {\n\t\t\tif (it.abilities->statsPercent[s]) {\n\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7c801438e6793bd6b0212b4ad83c06ee985c96121a143b91ff639dde7e1bfb5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 665, + "startColumn": 2, + "charOffset": 19592, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 663, + "startColumn": 2, + "charOffset": 19587, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (int32_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\n\t\tif (item->getSkill(static_cast(i)) != 0) {\n\t\t\tplayer->setVarSkill(static_cast(i), -item->getSkill(static_cast(i)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4a87e804c88e6a1f96a44ca48ee30b840adb1e3871801bffc5ba3a28c63e2ee" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 671, + "startColumn": 2, + "charOffset": 19803, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 669, + "startColumn": 2, + "charOffset": 19798, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (int32_t s = STAT_FIRST; s <= STAT_LAST; ++s) {\n\t\tif (item->getStat(static_cast(s))) {\n\t\t\tplayer->setVarStats(static_cast(s), -item->getStat(static_cast(s)));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6823c77e1ca7c939734900c23c4154d46437149b9076f42dfef7b150dcf4d1c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 672, + "startColumn": 7, + "charOffset": 19861, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 670, + "startColumn": 7, + "charOffset": 19801, + "charLength": 4, + "snippet": { + "text": "\n\tfor (int32_t s = STAT_FIRST; s <= STAT_LAST; ++s) {\n\t\tif (item->getStat(static_cast(s))) {\n\t\t\tplayer->setVarStats(static_cast(s), -item->getStat(static_cast(s)));\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "277bb12d4c48d247986fd5e0d00e62630f4fc3fb26445efc5159db7fc4aa3cca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 672, + "startColumn": 7, + "charOffset": 19861, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 670, + "startColumn": 7, + "charOffset": 19801, + "charLength": 4, + "snippet": { + "text": "\n\tfor (int32_t s = STAT_FIRST; s <= STAT_LAST; ++s) {\n\t\tif (item->getStat(static_cast(s))) {\n\t\t\tplayer->setVarStats(static_cast(s), -item->getStat(static_cast(s)));\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "661750f90813f5f637123350a974ae227291403ce810518524f279c96707f854" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 685, + "startColumn": 12, + "charOffset": 20201, + "charLength": 13, + "snippet": { + "text": "transformItem" + } + }, + "contextRegion": { + "startLine": 683, + "startColumn": 12, + "charOffset": 20154, + "charLength": 13, + "snippet": { + "text": "\n\tif (it.transformDeEquipTo != 0) {\n\t\tg_game().transformItem(item, it.transformDeEquipTo);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a467fc2c431078cc42711692b350557eb3a8e3a18226aad1a4e63461eee4518f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 701, + "startColumn": 100, + "charOffset": 20546, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 699, + "startColumn": 100, + "charOffset": 20444, + "charLength": 4, + "snippet": { + "text": "}\n\nuint32_t MoveEvent::fireStepEvent(const std::shared_ptr &creature, std::shared_ptr item, const Position &pos) const {\n\tif (isLoadedCallback()) {\n\t\treturn executeStep(creature, item, pos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3446f995eb9748e7b258f2707858d4bfa78d67ff9a2dbe9e995b34d4b547fb75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 703, + "startColumn": 10, + "charOffset": 20617, + "charLength": 11, + "snippet": { + "text": "executeStep" + } + }, + "contextRegion": { + "startLine": 701, + "startColumn": 10, + "charOffset": 20447, + "charLength": 11, + "snippet": { + "text": "uint32_t MoveEvent::fireStepEvent(const std::shared_ptr &creature, std::shared_ptr item, const Position &pos) const {\n\tif (isLoadedCallback()) {\n\t\treturn executeStep(creature, item, pos);\n\t} else {\n\t\treturn stepFunction(creature, item, pos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1fd367290a74e8afe65f59da924364191e8209086c8b5429b87e346d42003d86" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 704, + "startColumn": 4, + "charOffset": 20654, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 702, + "startColumn": 4, + "charOffset": 20581, + "charLength": 4, + "snippet": { + "text": "\tif (isLoadedCallback()) {\n\t\treturn executeStep(creature, item, pos);\n\t} else {\n\t\treturn stepFunction(creature, item, pos);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24155a57e807b72c3af2b83a13750bcb433d67290cf2966aa513e8f912dd0ef1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 709, + "startColumn": 94, + "charOffset": 20804, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 707, + "startColumn": 94, + "charOffset": 20708, + "charLength": 4, + "snippet": { + "text": "}\n\nbool MoveEvent::executeStep(const std::shared_ptr &creature, std::shared_ptr item, const Position &pos) const {\n\t// onStepIn(creature, item, pos, fromPosition)\n\t// onStepOut(creature, item, pos, fromPosition)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "229804b9e9690d441e8bca1a9993ac4a13906863af290c8ae30d09255d26e341" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 719, + "startColumn": 13, + "charOffset": 21552, + "charLength": 16, + "snippet": { + "text": "internalTeleport" + } + }, + "contextRegion": { + "startLine": 717, + "startColumn": 13, + "charOffset": 21269, + "charLength": 16, + "snippet": { + "text": "\t\tif (const ItemType &itemType = Item::items[item->getID()]; player && itemType.isTeleport()) {\n\t\t\tg_logger().warn(\"[{}] cannot teleport player: {}, to the same position: {} of fromPosition: {}\", __FUNCTION__, player->getName(), pos.toString(), fromPosition.toString());\n\t\t\tg_game().internalTeleport(player, player->getTemplePosition());\n\t\t\tplayer->sendMagicEffect(player->getTemplePosition(), CONST_ME_TELEPORT);\n\t\t\tplayer->sendCancelMessage(getReturnMessage(RETURNVALUE_CONTACTADMINISTRATOR));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "392e67e6540bacc9bce5814c59c5de7bed7118c771977f2497325bf77c80624c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 727, + "startColumn": 7, + "charOffset": 21796, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 725, + "startColumn": 7, + "charOffset": 21786, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tif (item != nullptr) {\n\t\t\tg_logger().error(\"[MoveEvent::executeStep - Creature {} item {}, position {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a54b94e579cd9bf955c721bd53506df3302a55ac4394e9f9c8b244ba6a1b776" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 740, + "startColumn": 27, + "charOffset": 22385, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 738, + "startColumn": 27, + "charOffset": 22355, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\n\tenv->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5cd2da684cceb20dab72e1a4afd6938a6a1700877c5d337ce3bb1dc19b9b65ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 745, + "startColumn": 24, + "charOffset": 22557, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 743, + "startColumn": 24, + "charOffset": 22480, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = getScriptInterface()->getLuaState();\n\n\tgetScriptInterface()->pushFunction(getScriptId());\n\tLuaScriptInterface::pushUserdata(L, creature);\n\tLuaScriptInterface::setCreatureMetatable(L, -1, creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "136a0f8f555067c815d8a3f98bd3a0c2641aca6aef68723287accc012d5961d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 757, + "startColumn": 7, + "charOffset": 23060, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 755, + "startColumn": 7, + "charOffset": 22891, + "charLength": 1, + "snippet": { + "text": "uint32_t MoveEvent::fireEquip(const std::shared_ptr &player, const std::shared_ptr &item, Slots_t toSlot, bool isCheck) {\n\tif (isLoadedCallback()) {\n\t\tif (!equipFunction || equipFunction(static_self_cast(), player, item, toSlot, isCheck) == 1) {\n\t\t\tif (executeEquip(player, item, toSlot, isCheck)) {\n\t\t\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b905b6f5b9dc298b8e9b55421617efdae9e3c29da5d0fc093a1d6460c7e487c5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 763, + "startColumn": 4, + "charOffset": 23254, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 761, + "startColumn": 4, + "charOffset": 23235, + "charLength": 4, + "snippet": { + "text": "\t\t}\n\t\treturn 0;\n\t} else {\n\t\treturn equipFunction(static_self_cast(), player, item, toSlot, isCheck);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d662c924eb6680e97814aad3f152043b87ab377765b38a82685996d5d43c2f9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 771, + "startColumn": 7, + "charOffset": 23584, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 769, + "startColumn": 7, + "charOffset": 23494, + "charLength": 18, + "snippet": { + "text": "\t// onEquip(player, item, slot, isCheck)\n\t// onDeEquip(player, item, slot, isCheck)\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[MoveEvent::executeEquip - Player {} item {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c364a730cf41dc6c20d0969b9f3c024d3f6f57cefd915b13585405403f948e5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 778, + "startColumn": 27, + "charOffset": 23881, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 776, + "startColumn": 27, + "charOffset": 23851, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\n\tenv->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ffee714f97e227722ecaf031c87e18e0038e2c1b2e07c8a7528dc565d960ebc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 783, + "startColumn": 24, + "charOffset": 24053, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 781, + "startColumn": 24, + "charOffset": 23976, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = getScriptInterface()->getLuaState();\n\n\tgetScriptInterface()->pushFunction(getScriptId());\n\tLuaScriptInterface::pushUserdata(L, player);\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aebb91d70957a16107ae66d842bdb769638c1e7a00406032ccf8e78655b0a4f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 787, + "startColumn": 20, + "charOffset": 24248, + "charLength": 6, + "snippet": { + "text": "onSlot" + } + }, + "contextRegion": { + "startLine": 785, + "startColumn": 20, + "charOffset": 24136, + "charLength": 6, + "snippet": { + "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\n\tLuaScriptInterface::pushThing(L, item);\n\tlua_pushnumber(L, onSlot);\n\tLuaScriptInterface::pushBoolean(L, isCheck);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "14c72c3e7f1a221d6f9a868c8c9cf7a20790ba980ccad0d1639d786b33805195" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 795, + "startColumn": 10, + "charOffset": 24528, + "charLength": 17, + "snippet": { + "text": "executeAddRemItem" + } + }, + "contextRegion": { + "startLine": 793, + "startColumn": 10, + "charOffset": 24354, + "charLength": 17, + "snippet": { + "text": "uint32_t MoveEvent::fireAddRemItem(const std::shared_ptr &item, const std::shared_ptr &fromTile, const Position &pos) const {\n\tif (isLoadedCallback()) {\n\t\treturn executeAddRemItem(item, fromTile, pos);\n\t} else {\n\t\treturn moveFunction(item, fromTile, pos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b73658436706dfe0bbf1b371f4722885598cc69d47cf1cd5c3883c35d9aef935" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 796, + "startColumn": 4, + "charOffset": 24571, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 794, + "startColumn": 4, + "charOffset": 24492, + "charLength": 4, + "snippet": { + "text": "\tif (isLoadedCallback()) {\n\t\treturn executeAddRemItem(item, fromTile, pos);\n\t} else {\n\t\treturn moveFunction(item, fromTile, pos);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb0084706c6e6baebb7976fb1ca5250f25c6123740111b69bef43a59c57567d8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'executeAddRemItem' of similar type ('const std::shared_ptr &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 801, + "startColumn": 35, + "charOffset": 24662, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 799, + "startColumn": 35, + "charOffset": 24625, + "charLength": 5, + "snippet": { + "text": "}\n\nbool MoveEvent::executeAddRemItem(const std::shared_ptr &item, const std::shared_ptr &fromTile, const Position &pos) const {\n\t// onAddItem(moveitem, tileitem, pos)\n\t// onRemoveItem(moveitem, tileitem, pos)" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c80288ddb4b19371c0b9968e1ade287b7cad9ab9697134134af1f969619d9a72" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 804, + "startColumn": 7, + "charOffset": 24852, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 802, + "startColumn": 7, + "charOffset": 24765, + "charLength": 18, + "snippet": { + "text": "\t// onAddItem(moveitem, tileitem, pos)\n\t// onRemoveItem(moveitem, tileitem, pos)\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[MoveEvent::executeAddRemItem - \"\n\t\t \"Item {} item on tile x: {} y: {} z: {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "81841d24f18cca7fd1d9733e259bc3ec8e1575c7409a82bb9ecaa188235fc124" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 812, + "startColumn": 27, + "charOffset": 25214, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 810, + "startColumn": 27, + "charOffset": 25184, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\n\tenv->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "982acae8f9889e1c641d999922318d1019250755886cbca93163b0a2ccb7c4e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 817, + "startColumn": 24, + "charOffset": 25386, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 815, + "startColumn": 24, + "charOffset": 25309, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = getScriptInterface()->getLuaState();\n\n\tgetScriptInterface()->pushFunction(getScriptId());\n\tLuaScriptInterface::pushThing(L, item);\n\tLuaScriptInterface::pushThing(L, fromTile);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93b64affdc2f5605115c2bff7418083a5b978513c720e4c689b617ed50794c6a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'uint32_t' (aka 'unsigned int')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 827, + "startColumn": 10, + "charOffset": 25730, + "charLength": 17, + "snippet": { + "text": "executeAddRemItem" + } + }, + "contextRegion": { + "startLine": 825, + "startColumn": 10, + "charOffset": 25595, + "charLength": 17, + "snippet": { + "text": "uint32_t MoveEvent::fireAddRemItem(const std::shared_ptr &item, const Position &pos) const {\n\tif (isLoadedCallback()) {\n\t\treturn executeAddRemItem(item, pos);\n\t} else {\n\t\treturn moveFunction(item, nullptr, pos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd6b46f0bfe0948ebdae52c65e0cae32bb8a3faaad90298df518220063456d4c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 828, + "startColumn": 4, + "charOffset": 25763, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 826, + "startColumn": 4, + "charOffset": 25694, + "charLength": 4, + "snippet": { + "text": "\tif (isLoadedCallback()) {\n\t\treturn executeAddRemItem(item, pos);\n\t} else {\n\t\treturn moveFunction(item, nullptr, pos);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9cce48654df47f711029153ac3d635706ea1f49554be1813d28dfc744f97526b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 836, + "startColumn": 7, + "charOffset": 25984, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 834, + "startColumn": 7, + "charOffset": 25917, + "charLength": 18, + "snippet": { + "text": "\t// onaddItem(moveitem, pos)\n\t// onRemoveItem(moveitem, pos)\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[MoveEvent::executeAddRemItem - \"\n\t\t \"Item {} item on tile x: {} y: {} z: {}] \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "399ce3d8d5c4a32d1ba6e28fac537c419a07c1bcbbdfbdf9225c80cc1e68983f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 844, + "startColumn": 27, + "charOffset": 26346, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 842, + "startColumn": 27, + "charOffset": 26316, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\n\tenv->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "431a85eadd6a08682d2b8b314cf2d9593839d33479635f7bd7f58d8371362207" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.cpp" + }, + "region": { + "startLine": 849, + "startColumn": 24, + "charOffset": 26518, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 847, + "startColumn": 24, + "charOffset": 26441, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = getScriptInterface()->getLuaState();\n\n\tgetScriptInterface()->pushFunction(getScriptId());\n\tLuaScriptInterface::pushThing(L, item);\n\tLuaScriptInterface::pushPosition(L, pos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c263cc0c04f15daf6053ab4e27b3a635dbd544e02a431c2b32fe7908bf9d8467" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'MoveEvent::fireAddRemItem' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "index": 1 + }, + "region": { + "startLine": 143, + "startColumn": 11, + "charOffset": 4650, + "charLength": 14, + "snippet": { + "text": "fireAddRemItem" + } + }, + "contextRegion": { + "startLine": 141, + "startColumn": 11, + "charOffset": 4516, + "charLength": 14, + "snippet": { + "text": "\n\tuint32_t fireStepEvent(const std::shared_ptr &creature, std::shared_ptr item, const Position &pos) const;\n\tuint32_t fireAddRemItem(const std::shared_ptr &item, const std::shared_ptr &tileItem, const Position &pos) const;\n\tuint32_t fireAddRemItem(const std::shared_ptr &item, const Position &pos) const;\n\tuint32_t fireEquip(const std::shared_ptr &player, const std::shared_ptr &item, Slots_t slot, bool isCheck);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3acc9edb734209ee5b26619148634f8133587218bd68228c24dc09374851eaeb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'MoveEvent::executeAddRemItem' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "index": 1 + }, + "region": { + "startLine": 154, + "startColumn": 7, + "charOffset": 5308, + "charLength": 17, + "snippet": { + "text": "executeAddRemItem" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 7, + "charOffset": 5057, + "charLength": 17, + "snippet": { + "text": "\tbool executeStep(const std::shared_ptr &creature, std::shared_ptr item, const Position &pos) const;\n\tbool executeEquip(const std::shared_ptr &player, const std::shared_ptr &item, Slots_t slot, bool isCheck) const;\n\tbool executeAddRemItem(const std::shared_ptr &item, const std::shared_ptr &tileItem, const Position &pos) const;\n\t// No have tile item\n\tbool executeAddRemItem(const std::shared_ptr &item, const Position &pos) const;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84b2d6c1f0e0ca9e2d41bbbf98f1254cb32dca3d1c009505acccc2ddce6a9677" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-inconsistent-declaration-parameter-name", + "ruleIndex": 705, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'MoveEvent::EquipItem' has a definition with different parameter names" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/movement.hpp", + "index": 1 + }, + "region": { + "startLine": 251, + "startColumn": 18, + "charOffset": 7860, + "charLength": 9, + "snippet": { + "text": "EquipItem" + } + }, + "contextRegion": { + "startLine": 249, + "startColumn": 18, + "charOffset": 7727, + "charLength": 9, + "snippet": { + "text": "\tstatic uint32_t RemoveItemField(std::shared_ptr item, std::shared_ptr tileItem, const Position &pos);\n\n\tstatic uint32_t EquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool boolean);\n\tstatic uint32_t DeEquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool boolean);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aec829bc94b877ddbfb1599b9818b945b184ad9c4d9a69f46efede2d0ec0e84c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 20, + "startColumn": 18, + "charOffset": 645, + "charLength": 9, + "snippet": { + "text": "initState" + } + }, + "contextRegion": { + "startLine": 18, + "startColumn": 18, + "charOffset": 610, + "charLength": 9, + "snippet": { + "text": "\nRaids::Raids() {\n\tscriptInterface.initState();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "44bbaef819187ff9d38eb4985ac2725c7ad83668abc266c9adc4fd3c5408cf3d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 31, + "startColumn": 6, + "charOffset": 984, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 29, + "startColumn": 6, + "charOffset": 820, + "charLength": 1, + "snippet": { + "text": "\tauto folder = g_configManager().getString(DATA_DIRECTORY, __FUNCTION__) + \"/raids/raids.xml\";\n\tpugi::xml_parse_result result = doc.load_file(folder.c_str());\n\tif (!result) {\n\t\tprintXMLError(__FUNCTION__, folder, result);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3224c5490cc3d9a2dca746a86ac9201fb3d58135092785ea2b9d61971ba2cfd0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 36, + "startColumn": 2, + "charOffset": 1063, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 34, + "startColumn": 2, + "charOffset": 1058, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (auto raidNode : doc.child(\"raids\").children()) {\n\t\tstd::string name, file;\n\t\tuint32_t interval, margin;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3503de6eed723b484fd268132339b4d0f6c3ade95d60d381adb71f6cafe0b80" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 37, + "startColumn": 3, + "charOffset": 1119, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 35, + "startColumn": 3, + "charOffset": 1061, + "charLength": 3, + "snippet": { + "text": "\n\tfor (auto raidNode : doc.child(\"raids\").children()) {\n\t\tstd::string name, file;\n\t\tuint32_t interval, margin;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5ab14456cdff256ebd9a9bd3714f76e51b3709585eba9d9f53d75c0afecd18b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 37, + "startColumn": 3, + "charOffset": 1119, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 35, + "startColumn": 3, + "charOffset": 1061, + "charLength": 3, + "snippet": { + "text": "\n\tfor (auto raidNode : doc.child(\"raids\").children()) {\n\t\tstd::string name, file;\n\t\tuint32_t interval, margin;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b35c4230d0180ca332c9cbc2d0e72d257381d23a0574660b4411ee55f455d227" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 3, + "charOffset": 1145, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 3, + "charOffset": 1062, + "charLength": 8, + "snippet": { + "text": "\tfor (auto raidNode : doc.child(\"raids\").children()) {\n\t\tstd::string name, file;\n\t\tuint32_t interval, margin;\n\n\t\tpugi::xml_attribute attr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8f2bb9956f2c194391cc76cabc479c83616bf3fb4139de4bf122065d75a65241" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-isolate-declaration", + "ruleIndex": 706, + "kind": "fail", + "level": "warning", + "message": { + "text": "multiple declarations in a single statement reduces readability" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 3, + "charOffset": 1145, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 3, + "charOffset": 1062, + "charLength": 8, + "snippet": { + "text": "\tfor (auto raidNode : doc.child(\"raids\").children()) {\n\t\tstd::string name, file;\n\t\tuint32_t interval, margin;\n\n\t\tpugi::xml_attribute attr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99eebdabc41f0ca9b005b38f6eba2ca2de46ef3d83b4aca4bc867dc2d2a3f43c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'interval' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 12, + "charOffset": 1154, + "charLength": 8, + "snippet": { + "text": "interval" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 12, + "charOffset": 1062, + "charLength": 8, + "snippet": { + "text": "\tfor (auto raidNode : doc.child(\"raids\").children()) {\n\t\tstd::string name, file;\n\t\tuint32_t interval, margin;\n\n\t\tpugi::xml_attribute attr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "28d6090b88be0699d75a04579a4075dd5eb3956ba00f8012cc55c8ba14b56478" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'margin' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 22, + "charOffset": 1164, + "charLength": 6, + "snippet": { + "text": "margin" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 22, + "charOffset": 1062, + "charLength": 6, + "snippet": { + "text": "\tfor (auto raidNode : doc.child(\"raids\").children()) {\n\t\tstd::string name, file;\n\t\tuint32_t interval, margin;\n\n\t\tpugi::xml_attribute attr;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9e3bbe9ec61d38588bf9a2d2c620e8a330f06dac1f9955218cb6995e08cf5b2d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 7, + "charOffset": 1207, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 7, + "charOffset": 1172, + "charLength": 1, + "snippet": { + "text": "\n\t\tpugi::xml_attribute attr;\n\t\tif ((attr = raidNode.attribute(\"name\"))) {\n\t\t\tname = attr.as_string();\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "98b2b00764981b3b1e2f11fb2156c9ae22c4589cca191815d9b7ed51445ccd33" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 7, + "charOffset": 1207, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 7, + "charOffset": 1172, + "charLength": 1, + "snippet": { + "text": "\n\t\tpugi::xml_attribute attr;\n\t\tif ((attr = raidNode.attribute(\"name\"))) {\n\t\t\tname = attr.as_string();\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f939d8a6e94ff41fb11fd8cbf69298dfe8883bbf3c580be81573672c99ae498" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 13, + "charOffset": 1213, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 13, + "charOffset": 1172, + "charLength": 1, + "snippet": { + "text": "\n\t\tpugi::xml_attribute attr;\n\t\tif ((attr = raidNode.attribute(\"name\"))) {\n\t\t\tname = attr.as_string();\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "97eb80397fd002a265424d62ce9f928a2a447fa33927651eb7b3bd43d408e541" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 48, + "startColumn": 7, + "charOffset": 1378, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 7, + "charOffset": 1367, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = raidNode.attribute(\"file\"))) {\n\t\t\tfile = attr.as_string();\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a9de40bf6a74704026daaf73f73c8267468584740865c66f4e84d1eb8d905116" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 48, + "startColumn": 7, + "charOffset": 1378, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 7, + "charOffset": 1367, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = raidNode.attribute(\"file\"))) {\n\t\t\tfile = attr.as_string();\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb3aa52c7c756dabd2e6ca3365f82d8c611c6346ef4a1ea344d67b8e2c424586" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 48, + "startColumn": 13, + "charOffset": 1384, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 46, + "startColumn": 13, + "charOffset": 1367, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = raidNode.attribute(\"file\"))) {\n\t\t\tfile = attr.as_string();\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2532695669d0dcb64dca47c97973195805f3f83aba650b3f23b1128577f72e9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 78, + "charOffset": 1766, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 78, + "charOffset": 1684, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\n\t\tinterval = pugi::cast(raidNode.attribute(\"interval2\").value()) * 60;\n\t\tif (interval == 0) {\n\t\t\tg_logger().error(\"{} - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8fe23539bb838888d8947fb1323504afcb93a34b10e84f723b69823529808ee7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 68, + "startColumn": 7, + "charOffset": 1997, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 66, + "startColumn": 7, + "charOffset": 1986, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = raidNode.attribute(\"margin\"))) {\n\t\t\tmargin = pugi::cast(attr.value()) * 60 * 1000;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3cf8472c79faf3e3cb77487b6cdeee1e4d0674f9585f01e66914367d7df1e3c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 68, + "startColumn": 7, + "charOffset": 1997, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 66, + "startColumn": 7, + "charOffset": 1986, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = raidNode.attribute(\"margin\"))) {\n\t\t\tmargin = pugi::cast(attr.value()) * 60 * 1000;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46f3f4357952db5a2eab846cef0fd360f655820046a22fd449a3bbff6b22d5e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 68, + "startColumn": 13, + "charOffset": 2003, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 66, + "startColumn": 13, + "charOffset": 1986, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = raidNode.attribute(\"margin\"))) {\n\t\t\tmargin = pugi::cast(attr.value()) * 60 * 1000;\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "213ef68d00c18e385f5e5860e744906dc7c6059c1c3b3e7de7934770bb58b02e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "60 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 69, + "startColumn": 50, + "charOffset": 2087, + "charLength": 2, + "snippet": { + "text": "60" + } + }, + "contextRegion": { + "startLine": 67, + "startColumn": 50, + "charOffset": 1990, + "charLength": 2, + "snippet": { + "text": "\n\t\tif ((attr = raidNode.attribute(\"margin\"))) {\n\t\t\tmargin = pugi::cast(attr.value()) * 60 * 1000;\n\t\t} else {\n\t\t\tg_logger().warn(\"{} - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "847fc8db931f7b30de5c55519d25e0381e5185cbb264c1c3d4943be964789c40" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 69, + "startColumn": 55, + "charOffset": 2092, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 67, + "startColumn": 55, + "charOffset": 1990, + "charLength": 4, + "snippet": { + "text": "\n\t\tif ((attr = raidNode.attribute(\"margin\"))) {\n\t\t\tmargin = pugi::cast(attr.value()) * 60 * 1000;\n\t\t} else {\n\t\t\tg_logger().warn(\"{} - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0179c40817e413c185cd166ba29dbe42da817989037f0c31bc4734d008af6ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'repeat' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 77, + "startColumn": 8, + "charOffset": 2259, + "charLength": 6, + "snippet": { + "text": "repeat" + } + }, + "contextRegion": { + "startLine": 75, + "startColumn": 8, + "charOffset": 2247, + "charLength": 6, + "snippet": { + "text": "\t\t}\n\n\t\tbool repeat;\n\t\tif ((attr = raidNode.attribute(\"repeat\"))) {\n\t\t\trepeat = booleanString(attr.as_string());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5444727b2166067917cb10de9e1faee9702c59ce4c9f8954600f933292c0223f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 7, + "charOffset": 2273, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 7, + "charOffset": 2251, + "charLength": 1, + "snippet": { + "text": "\n\t\tbool repeat;\n\t\tif ((attr = raidNode.attribute(\"repeat\"))) {\n\t\t\trepeat = booleanString(attr.as_string());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5d1965e02b9e2ef2acc14e834dfe4b7ea316f13e0482e664ddeca3bbbb724b07" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 7, + "charOffset": 2273, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 7, + "charOffset": 2251, + "charLength": 1, + "snippet": { + "text": "\n\t\tbool repeat;\n\t\tif ((attr = raidNode.attribute(\"repeat\"))) {\n\t\t\trepeat = booleanString(attr.as_string());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "841a509a13efb69add148adbc4c79a4a46da324700b43deffc8f4fa2c6498668" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 78, + "startColumn": 13, + "charOffset": 2279, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 76, + "startColumn": 13, + "charOffset": 2251, + "charLength": 1, + "snippet": { + "text": "\n\t\tbool repeat;\n\t\tif ((attr = raidNode.attribute(\"repeat\"))) {\n\t\t\trepeat = booleanString(attr.as_string());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "63fa1174dd31f01536c0101b9aa420bea9f009593c7703691148d7fcc48bd3d2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 105, + "startColumn": 20, + "charOffset": 2983, + "charLength": 12, + "snippet": { + "text": "g_dispatcher" + } + }, + "contextRegion": { + "startLine": 103, + "startColumn": 20, + "charOffset": 2932, + "charLength": 12, + "snippet": { + "text": "\tsetLastRaidEnd(OTSYS_TIME());\n\n\tcheckRaidsEvent = g_dispatcher().scheduleEvent(\n\t\tCHECK_RAIDS_INTERVAL * 1000, [this] { checkRaids(); }, \"Raids::checkRaids\"\n\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c1cacca700ecaef256b16799f0bc686541d2da51b9e6e913818ebbe94bf6db0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 106, + "startColumn": 26, + "charOffset": 3038, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 104, + "startColumn": 26, + "charOffset": 2963, + "charLength": 4, + "snippet": { + "text": "\n\tcheckRaidsEvent = g_dispatcher().scheduleEvent(\n\t\tCHECK_RAIDS_INTERVAL * 1000, [this] { checkRaids(); }, \"Raids::checkRaids\"\n\t);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9095246791d7e630cc9786a05ee99858e99e0bd70fe698b3146f803e73270201" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 117, + "startColumn": 6, + "charOffset": 3250, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 115, + "startColumn": 6, + "charOffset": 3232, + "charLength": 1, + "snippet": { + "text": "\t\treturn;\n\t}\n\tif (!getRunning()) {\n\t\tuint64_t now = OTSYS_TIME();\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d5acd94e58cb45191e9eddb9aec298c13cd908b727be70be6a6051cab04995e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 120, + "startColumn": 3, + "charOffset": 3301, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 3, + "charOffset": 3267, + "charLength": 3, + "snippet": { + "text": "\t\tuint64_t now = OTSYS_TIME();\n\n\t\tfor (auto it = raidList.begin(), end = raidList.end(); it != end; ++it) {\n\t\t\tconst auto &raid = *it;\n\t\t\tif (now >= (getLastRaidEnd() + raid->getMargin())) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "904566ffecb83ab9fc8dc53cd2f66a70771de8b18638168c5210d48f87776d54" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-5-1", + "ruleIndex": 456, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-5-1: A for loop shall contain a single loop-counter which shall not have floating type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 120, + "startColumn": 3, + "charOffset": 3301, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 3, + "charOffset": 3267, + "charLength": 3, + "snippet": { + "text": "\t\tuint64_t now = OTSYS_TIME();\n\n\t\tfor (auto it = raidList.begin(), end = raidList.end(); it != end; ++it) {\n\t\t\tconst auto &raid = *it;\n\t\t\tif (now >= (getLastRaidEnd() + raid->getMargin())) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65dc88e6b4a9e4182827350094fb9f450e889faf9eea76ae9c3731c819d822c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-8-0-1", + "ruleIndex": 466, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 8-0-1: An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 120, + "startColumn": 8, + "charOffset": 3306, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 8, + "charOffset": 3267, + "charLength": 4, + "snippet": { + "text": "\t\tuint64_t now = OTSYS_TIME();\n\n\t\tfor (auto it = raidList.begin(), end = raidList.end(); it != end; ++it) {\n\t\t\tconst auto &raid = *it;\n\t\t\tif (now >= (getLastRaidEnd() + raid->getMargin())) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7ba333e8dead1269c833b626d4a53e1f1ff94e1b51204a27e6294ff623b1bb0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'it' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 120, + "startColumn": 58, + "charOffset": 3356, + "charLength": 2, + "snippet": { + "text": "it" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 58, + "charOffset": 3267, + "charLength": 2, + "snippet": { + "text": "\t\tuint64_t now = OTSYS_TIME();\n\n\t\tfor (auto it = raidList.begin(), end = raidList.end(); it != end; ++it) {\n\t\t\tconst auto &raid = *it;\n\t\t\tif (now >= (getLastRaidEnd() + raid->getMargin())) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "261d00c9d84ad28db1a3f4aaaa60cc90afa7d9740a38e4b11a93ae998ef801a5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 131, + "startColumn": 16, + "charOffset": 3798, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 129, + "startColumn": 16, + "charOffset": 3747, + "charLength": 5, + "snippet": { + "text": "\n\t\t\t\t\tif (!raid->canBeRepeated()) {\n\t\t\t\t\t\traidList.erase(it);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a007259e62cfac19b3f38871c335c0b3888de568963212ac06893eb183bac2b4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 139, + "startColumn": 20, + "charOffset": 3866, + "charLength": 12, + "snippet": { + "text": "g_dispatcher" + } + }, + "contextRegion": { + "startLine": 137, + "startColumn": 20, + "charOffset": 3843, + "charLength": 12, + "snippet": { + "text": "\t}\n\n\tcheckRaidsEvent = g_dispatcher().scheduleEvent(\n\t\tCHECK_RAIDS_INTERVAL * 1000, [this] { checkRaids(); }, \"Raids::checkRaids\"\n\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f9ba3a1f2909e80c77e23df339de414a8a8aeb4cca7f128c1ca1623bb88e8f3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "1000 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 140, + "startColumn": 26, + "charOffset": 3921, + "charLength": 4, + "snippet": { + "text": "1000" + } + }, + "contextRegion": { + "startLine": 138, + "startColumn": 26, + "charOffset": 3846, + "charLength": 4, + "snippet": { + "text": "\n\tcheckRaidsEvent = g_dispatcher().scheduleEvent(\n\t\tCHECK_RAIDS_INTERVAL * 1000, [this] { checkRaids(); }, \"Raids::checkRaids\"\n\t);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1fb03d5d6f36e86917dda856e5eea102bcd0f4c5ded569bf085357f39191bf2f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 148, + "startColumn": 2, + "charOffset": 4070, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 146, + "startColumn": 2, + "charOffset": 4046, + "charLength": 3, + "snippet": { + "text": "\tcheckRaidsEvent = 0;\n\n\tfor (const auto &raid : raidList) {\n\t\traid->stopEvents();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fb1c5969545482cde2871e558254e178c8798e53ac55ebea47b31a3963a21a04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 158, + "startColumn": 18, + "charOffset": 4242, + "charLength": 11, + "snippet": { + "text": "reInitState" + } + }, + "contextRegion": { + "startLine": 156, + "startColumn": 18, + "charOffset": 4206, + "charLength": 11, + "snippet": { + "text": "\tlastRaidEnd = 0;\n\n\tscriptInterface.reInitState();\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "24267147ecabd3317870a65f3db7cddbcf55594687867610759b71368f9823a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 2, + "charOffset": 4390, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 2, + "charOffset": 4318, + "charLength": 3, + "snippet": { + "text": "\nstd::shared_ptr Raids::getRaidByName(const std::string &name) {\n\tfor (const auto &raid : raidList) {\n\t\tif (strcasecmp(raid->getName().c_str(), name.c_str()) == 0) {\n\t\t\treturn raid;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d4b33a4925d04d8c85b0eccb26a0d58fb72c49fcc17b409d7101fa6572f1587" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 182, + "startColumn": 6, + "charOffset": 4721, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 180, + "startColumn": 6, + "charOffset": 4625, + "charLength": 1, + "snippet": { + "text": "\tpugi::xml_document doc;\n\tpugi::xml_parse_result result = doc.load_file(filename.c_str());\n\tif (!result) {\n\t\tprintXMLError(__FUNCTION__, filename, result);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2637db99c48f4fb8fa4e33a1e1638ee37f28b7bebe83de9818759a8b937636b2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 187, + "startColumn": 2, + "charOffset": 4802, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 185, + "startColumn": 2, + "charOffset": 4797, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (auto eventNode : doc.child(\"raid\").children()) {\n\t\tstd::shared_ptr event;\n\t\tif (strcasecmp(eventNode.name(), \"announce\") == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9abcd90f98674fd0c79b69c74edf5347db4f6429a48fca8ce9cb65ca39604edf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'lhs' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 211, + "startColumn": 86, + "charOffset": 5732, + "charLength": 3, + "snippet": { + "text": "lhs" + } + }, + "contextRegion": { + "startLine": 209, + "startColumn": 86, + "charOffset": 5623, + "charLength": 3, + "snippet": { + "text": "\n\t// sort by delay time\n\tstd::sort(raidEvents.begin(), raidEvents.end(), [](const std::shared_ptr lhs, const std::shared_ptr rhs) {\n\t\treturn lhs->getDelay() < rhs->getDelay();\n\t});" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "283587a81c80666f762e877915a690491121494a833b98df1201ce6722364ed1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'rhs' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 211, + "startColumn": 124, + "charOffset": 5770, + "charLength": 3, + "snippet": { + "text": "rhs" + } + }, + "contextRegion": { + "startLine": 209, + "startColumn": 124, + "charOffset": 5623, + "charLength": 3, + "snippet": { + "text": "\n\t// sort by delay time\n\tstd::sort(raidEvents.begin(), raidEvents.end(), [](const std::shared_ptr lhs, const std::shared_ptr rhs) {\n\t\treturn lhs->getDelay() < rhs->getDelay();\n\t});" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5cbee0ec0ca7ba7b9e77cda62df83ec245e3c803f93b14e4273f2b20cf84b9f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 223, + "startColumn": 20, + "charOffset": 5997, + "charLength": 12, + "snippet": { + "text": "g_dispatcher" + } + }, + "contextRegion": { + "startLine": 221, + "startColumn": 20, + "charOffset": 5929, + "charLength": 12, + "snippet": { + "text": "\tif (raidEvent) {\n\t\tstate = RAIDSTATE_EXECUTING;\n\t\tnextEventEvent = g_dispatcher().scheduleEvent(\n\t\t\traidEvent->getDelay(), [this, raidEvent] { executeRaidEvent(raidEvent); }, \"Raid::executeRaidEvent\"\n\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "71759e7accca2fa8293896e8a83680c5e7926016fc9e637224de9347d1968374" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the const qualified parameter 'raidEvent' is copied for each invocation; consider making it a reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 232, + "startColumn": 62, + "charOffset": 6285, + "charLength": 9, + "snippet": { + "text": "raidEvent" + } + }, + "contextRegion": { + "startLine": 230, + "startColumn": 62, + "charOffset": 6221, + "charLength": 9, + "snippet": { + "text": "}\n\nvoid Raid::executeRaidEvent(const std::shared_ptr raidEvent) {\n\tif (raidEvent->executeEvent()) {\n\t\tnextEvent++;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4ea9ae33a586ffdbf58b91027a46fb6741d5bdcb80ff33126edcf5be1a2225af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 238, + "startColumn": 76, + "charOffset": 6493, + "charLength": 12, + "snippet": { + "text": "newRaidEvent" + } + }, + "contextRegion": { + "startLine": 236, + "startColumn": 76, + "charOffset": 6395, + "charLength": 12, + "snippet": { + "text": "\n\t\tif (newRaidEvent) {\n\t\t\tuint32_t ticks = static_cast(std::max(RAID_MINTICKS, newRaidEvent->getDelay() - raidEvent->getDelay()));\n\t\t\tnextEventEvent = g_dispatcher().scheduleEvent(\n\t\t\t\tticks, [this, newRaidEvent] { executeRaidEvent(newRaidEvent); }, __FUNCTION__" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f628ad8dd45b913b12e27ff31b15b6500ba82cdf1d524d77adc81a0eaece7c52" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 239, + "startColumn": 21, + "charOffset": 6565, + "charLength": 12, + "snippet": { + "text": "g_dispatcher" + } + }, + "contextRegion": { + "startLine": 237, + "startColumn": 21, + "charOffset": 6396, + "charLength": 12, + "snippet": { + "text": "\t\tif (newRaidEvent) {\n\t\t\tuint32_t ticks = static_cast(std::max(RAID_MINTICKS, newRaidEvent->getDelay() - raidEvent->getDelay()));\n\t\t\tnextEventEvent = g_dispatcher().scheduleEvent(\n\t\t\t\tticks, [this, newRaidEvent] { executeRaidEvent(newRaidEvent); }, __FUNCTION__\n\t\t\t);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b7251e2b29ccbce1bdbd4684ea7bb5dc1f9fa79c0f692bb86248d5a9ae3c890c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 267, + "startColumn": 4, + "charOffset": 7150, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 265, + "startColumn": 4, + "charOffset": 7077, + "charLength": 4, + "snippet": { + "text": "\tif (nextEvent < raidEvents.size()) {\n\t\treturn raidEvents[nextEvent];\n\t} else {\n\t\treturn nullptr;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fe0e694047bba21dfb4090060181bb81627471843896d903f5f61adf0e203bdc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 274, + "startColumn": 6, + "charOffset": 7324, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 272, + "startColumn": 6, + "charOffset": 7181, + "charLength": 1, + "snippet": { + "text": "bool RaidEvent::configureRaidEvent(const pugi::xml_node &eventNode) {\n\tpugi::xml_attribute delayAttribute = eventNode.attribute(\"delay\");\n\tif (!delayAttribute) {\n\t\tg_logger().error(\"{} - 'delay' tag missing\", __FUNCTION__);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5f51b5971b27b78f0ecfb9bfe765bc97d36e7f00dfc649aa2792f8ea7f7a6a68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 289, + "startColumn": 6, + "charOffset": 7753, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 287, + "startColumn": 6, + "charOffset": 7675, + "charLength": 1, + "snippet": { + "text": "\n\tpugi::xml_attribute messageAttribute = eventNode.attribute(\"message\");\n\tif (!messageAttribute) {\n\t\tg_logger().error(\"{} - \"\n\t\t \"'message' tag missing for announce event\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "638450698e6e3fdfe8b0917f707f721503fa77ceef351e79f57d3051ef5151e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 298, + "startColumn": 6, + "charOffset": 8030, + "charLength": 13, + "snippet": { + "text": "typeAttribute" + } + }, + "contextRegion": { + "startLine": 296, + "startColumn": 6, + "charOffset": 7958, + "charLength": 13, + "snippet": { + "text": "\n\tpugi::xml_attribute typeAttribute = eventNode.attribute(\"type\");\n\tif (typeAttribute) {\n\t\tstd::string tmpStrValue = asLowerCaseString(typeAttribute.as_string());\n\t\tif (tmpStrValue == \"warning\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7f516cf01fecd2a46452d14625c17183b99f74fd8cdc7491689033df200399ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 298, + "startColumn": 6, + "charOffset": 8030, + "charLength": 13, + "snippet": { + "text": "typeAttribute" + } + }, + "contextRegion": { + "startLine": 296, + "startColumn": 6, + "charOffset": 7958, + "charLength": 13, + "snippet": { + "text": "\n\tpugi::xml_attribute typeAttribute = eventNode.attribute(\"type\");\n\tif (typeAttribute) {\n\t\tstd::string tmpStrValue = asLowerCaseString(typeAttribute.as_string());\n\t\tif (tmpStrValue == \"warning\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "937457ef0c7a972735d5e7c56fc332cb3a2a986e8130e4c570f7311ba5f55264" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-branch-clone", + "ruleIndex": 45, + "kind": "fail", + "level": "warning", + "message": { + "text": "repeated branch body in conditional chain" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 302, + "startColumn": 38, + "charOffset": 8233, + "charLength": 1, + "snippet": { + "text": "{" + } + }, + "contextRegion": { + "startLine": 300, + "startColumn": 38, + "charOffset": 8121, + "charLength": 1, + "snippet": { + "text": "\t\tif (tmpStrValue == \"warning\") {\n\t\t\tmessageType = MESSAGE_GAME_HIGHLIGHT;\n\t\t} else if (tmpStrValue == \"event\") {\n\t\t\tmessageType = MESSAGE_EVENT_ADVANCE;\n\t\t} else if (tmpStrValue == \"default\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f231e6128b33ebae99e2667f57db7b053765ffceec135ef165452316a7676a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 340, + "startColumn": 6, + "charOffset": 9433, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 338, + "startColumn": 6, + "charOffset": 9400, + "charLength": 1, + "snippet": { + "text": "\n\tpugi::xml_attribute attr;\n\tif ((attr = eventNode.attribute(\"name\"))) {\n\t\tmonsterName = attr.as_string();\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5ffcc5203619df087bf613dad01d64dbe125af1d4bf287bd015d60a6589856d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 340, + "startColumn": 6, + "charOffset": 9433, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 338, + "startColumn": 6, + "charOffset": 9400, + "charLength": 1, + "snippet": { + "text": "\n\tpugi::xml_attribute attr;\n\tif ((attr = eventNode.attribute(\"name\"))) {\n\t\tmonsterName = attr.as_string();\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "36248ca142fa807ffc363c3bc994910ae1a9313ba4df2ff90220cc8298362d4e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 340, + "startColumn": 12, + "charOffset": 9439, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 338, + "startColumn": 12, + "charOffset": 9400, + "charLength": 1, + "snippet": { + "text": "\n\tpugi::xml_attribute attr;\n\tif ((attr = eventNode.attribute(\"name\"))) {\n\t\tmonsterName = attr.as_string();\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2858351119a2351c68baaacbb9c0af17605d1319bb57db19691e30e9c3d07b3c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 349, + "startColumn": 6, + "charOffset": 9666, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 347, + "startColumn": 6, + "charOffset": 9657, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif ((attr = eventNode.attribute(\"x\"))) {\n\t\tposition.x = pugi::cast(attr.value());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c94f9f14c091c8221711289cefce2dd5151376842108a4acd10c834e03061257" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 349, + "startColumn": 6, + "charOffset": 9666, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 347, + "startColumn": 6, + "charOffset": 9657, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif ((attr = eventNode.attribute(\"x\"))) {\n\t\tposition.x = pugi::cast(attr.value());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "704f53e0f39d02de41689d1034fe76d616f043a570e61906854c3bcabcb4d410" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 349, + "startColumn": 12, + "charOffset": 9672, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 347, + "startColumn": 12, + "charOffset": 9657, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif ((attr = eventNode.attribute(\"x\"))) {\n\t\tposition.x = pugi::cast(attr.value());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "254ab4bee12f34421522ad7d559d6fca69631de362cb4adf4cb7a66539c6fdfc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 358, + "startColumn": 6, + "charOffset": 9910, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 356, + "startColumn": 6, + "charOffset": 9901, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif ((attr = eventNode.attribute(\"y\"))) {\n\t\tposition.y = pugi::cast(attr.value());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ff9ecdfb1522417b7f91912c64fbbff5d9e0222cbc88f675c645bea6f26c817" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 358, + "startColumn": 6, + "charOffset": 9910, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 356, + "startColumn": 6, + "charOffset": 9901, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif ((attr = eventNode.attribute(\"y\"))) {\n\t\tposition.y = pugi::cast(attr.value());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51d8b7a213fc653116a305678a5c38b067e31f275c41c3cafdc3e4be63ae3d16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 358, + "startColumn": 12, + "charOffset": 9916, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 356, + "startColumn": 12, + "charOffset": 9901, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif ((attr = eventNode.attribute(\"y\"))) {\n\t\tposition.y = pugi::cast(attr.value());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9f42de4f8e8da8683d6dca6853630edb87e2222c04acdbedf842982684b7818d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 367, + "startColumn": 6, + "charOffset": 10154, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 365, + "startColumn": 6, + "charOffset": 10145, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif ((attr = eventNode.attribute(\"z\"))) {\n\t\tposition.z = pugi::cast(attr.value());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be083a4ca4ac8ab1098e07d3a510ae7d9a1fee5041c73bf41beda261161ca123" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 367, + "startColumn": 6, + "charOffset": 10154, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 365, + "startColumn": 6, + "charOffset": 10145, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif ((attr = eventNode.attribute(\"z\"))) {\n\t\tposition.z = pugi::cast(attr.value());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "16c6c8756e8874fb5019b17d63898064707af145f44caad01ae59a1d25405456" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 367, + "startColumn": 12, + "charOffset": 10160, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 365, + "startColumn": 12, + "charOffset": 10145, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif ((attr = eventNode.attribute(\"z\"))) {\n\t\tposition.z = pugi::cast(attr.value());\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e9482ba94c9e160d6e1201bf29b8bc2622cadc6dd03b53342b872bf32b8d019e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 368, + "startColumn": 16, + "charOffset": 10206, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 366, + "startColumn": 16, + "charOffset": 10148, + "charLength": 4, + "snippet": { + "text": "\n\tif ((attr = eventNode.attribute(\"z\"))) {\n\t\tposition.z = pugi::cast(attr.value());\n\t} else {\n\t\tg_logger().error(\"{} - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc4c9d80a0120cac45f222ee2f710941b9a7d4f2b6e11e27966851b98a736b55" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 380, + "startColumn": 6, + "charOffset": 10527, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 378, + "startColumn": 6, + "charOffset": 10409, + "charLength": 1, + "snippet": { + "text": "bool SingleSpawnEvent::executeEvent() {\n\tstd::shared_ptr monster = Monster::createMonster(monsterName);\n\tif (!monster) {\n\t\tg_logger().error(\"{} - Cant create monster {}\", __FUNCTION__, monsterName);\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09b3d3feee89fe2af3ae3d98c0b4460056fb21e4867b4c2b08c5f11720a044d3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'configureRaidEvent' has cognitive complexity of 47 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 394, + "startColumn": 22, + "charOffset": 10871, + "charLength": 18, + "snippet": { + "text": "configureRaidEvent" + } + }, + "contextRegion": { + "startLine": 392, + "startColumn": 22, + "charOffset": 10847, + "charLength": 18, + "snippet": { + "text": "}\n\nbool AreaSpawnEvent::configureRaidEvent(const pugi::xml_node &eventNode) {\n\tif (!RaidEvent::configureRaidEvent(eventNode)) {\n\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "163e85fdf6ef867b98dea1e892a8e6ea3605650a5198cdfcab16f7ecc9b47e7c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 400, + "startColumn": 6, + "charOffset": 11027, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 398, + "startColumn": 6, + "charOffset": 10994, + "charLength": 1, + "snippet": { + "text": "\n\tpugi::xml_attribute attr;\n\tif ((attr = eventNode.attribute(\"radius\"))) {\n\t\tint32_t radius = pugi::cast(attr.value());\n\t\tPosition centerPos;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c49ddcd83338f4ec282c5a009a724b00d4499896809241dd15a7e6fb294abfda" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 400, + "startColumn": 6, + "charOffset": 11027, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 398, + "startColumn": 6, + "charOffset": 10994, + "charLength": 1, + "snippet": { + "text": "\n\tpugi::xml_attribute attr;\n\tif ((attr = eventNode.attribute(\"radius\"))) {\n\t\tint32_t radius = pugi::cast(attr.value());\n\t\tPosition centerPos;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ad78f6b712ef4a920ea88c7a5c2a17b5c8b338debfede59b520036026aa6869" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 400, + "startColumn": 12, + "charOffset": 11033, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 398, + "startColumn": 12, + "charOffset": 10994, + "charLength": 1, + "snippet": { + "text": "\n\tpugi::xml_attribute attr;\n\tif ((attr = eventNode.attribute(\"radius\"))) {\n\t\tint32_t radius = pugi::cast(attr.value());\n\t\tPosition centerPos;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee155ef8e546bd1fb8195dff05ca4ac92feee3fcbacd0ccd64e0236cff1f5b1f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 401, + "startColumn": 3, + "charOffset": 11071, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 399, + "startColumn": 3, + "charOffset": 10995, + "charLength": 7, + "snippet": { + "text": "\tpugi::xml_attribute attr;\n\tif ((attr = eventNode.attribute(\"radius\"))) {\n\t\tint32_t radius = pugi::cast(attr.value());\n\t\tPosition centerPos;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "84f1bfe9483af16a76acd3bfab591464dd4f343218cb39ace144f45f46d28200" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 404, + "startColumn": 7, + "charOffset": 11152, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 402, + "startColumn": 7, + "charOffset": 11123, + "charLength": 1, + "snippet": { + "text": "\t\tPosition centerPos;\n\n\t\tif ((attr = eventNode.attribute(\"centerx\"))) {\n\t\t\tcenterPos.x = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0011ecfde7b5e5f2740604abdc7309f73a238febbb8b1411e68bdae0847e8e9d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 404, + "startColumn": 7, + "charOffset": 11152, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 402, + "startColumn": 7, + "charOffset": 11123, + "charLength": 1, + "snippet": { + "text": "\t\tPosition centerPos;\n\n\t\tif ((attr = eventNode.attribute(\"centerx\"))) {\n\t\t\tcenterPos.x = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b8862f27506039f0e98b6943770c3cc9b68a3258a6968b1a5ea6a6a699be46b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 404, + "startColumn": 13, + "charOffset": 11158, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 402, + "startColumn": 13, + "charOffset": 11123, + "charLength": 1, + "snippet": { + "text": "\t\tPosition centerPos;\n\n\t\tif ((attr = eventNode.attribute(\"centerx\"))) {\n\t\t\tcenterPos.x = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77ad511e46179df45a2f8d79452f65b48ffa7c3a2308bc03ed32b3f409d603c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 414, + "startColumn": 7, + "charOffset": 11438, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 412, + "startColumn": 7, + "charOffset": 11427, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = eventNode.attribute(\"centery\"))) {\n\t\t\tcenterPos.y = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6fb5e6d05e6f18b9537cf54002d5ddc75a9cbe0dd5711fd8eb53ef8edc696477" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 414, + "startColumn": 7, + "charOffset": 11438, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 412, + "startColumn": 7, + "charOffset": 11427, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = eventNode.attribute(\"centery\"))) {\n\t\t\tcenterPos.y = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46a75c6c5ff329103ef92dfed016be82e4c58f6b84cf8123bb62fe1e282500a8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 414, + "startColumn": 13, + "charOffset": 11444, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 412, + "startColumn": 13, + "charOffset": 11427, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = eventNode.attribute(\"centery\"))) {\n\t\t\tcenterPos.y = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a42b816a65e5b6c68ca6bc010d0a3e752d7366addd1264c1b36d169c12ee9ae3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 423, + "startColumn": 7, + "charOffset": 11701, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 421, + "startColumn": 7, + "charOffset": 11690, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = eventNode.attribute(\"centerz\"))) {\n\t\t\tcenterPos.z = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "178f7351635691f7d17af435cd4a6c648661520516395081e6399d6cb9cbb204" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 423, + "startColumn": 7, + "charOffset": 11701, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 421, + "startColumn": 7, + "charOffset": 11690, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = eventNode.attribute(\"centerz\"))) {\n\t\t\tcenterPos.z = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58c4825a7bd88874436c8620e152fdf818ed666c9d81f1ba40d9d6f5bc185d3a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 423, + "startColumn": 13, + "charOffset": 11707, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 421, + "startColumn": 13, + "charOffset": 11690, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = eventNode.attribute(\"centerz\"))) {\n\t\t\tcenterPos.z = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a133724899e59ecc7000784d13c996b4f6806ac39596d6032b7e203878601558" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 424, + "startColumn": 18, + "charOffset": 11761, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 422, + "startColumn": 18, + "charOffset": 11694, + "charLength": 4, + "snippet": { + "text": "\n\t\tif ((attr = eventNode.attribute(\"centerz\"))) {\n\t\t\tcenterPos.z = pugi::cast(attr.value());\n\t\t} else {\n\t\t\tg_logger().error(\"{} - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cea246c376a0afda38dae8436579f3f952a2671f5bac5e54b6a2eece4ca01c1f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 432, + "startColumn": 15, + "charOffset": 11971, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 430, + "startColumn": 15, + "charOffset": 11952, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfromPos.x = std::max(0, centerPos.getX() - radius);\n\t\tfromPos.y = std::max(0, centerPos.getY() - radius);\n\t\tfromPos.z = centerPos.z;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8bb8d23dcc09c284000c3b77fdc0768d889b1bd79b4a9ee56e55a89cecbca882" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int_fast32_t' (aka 'long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 432, + "startColumn": 36, + "charOffset": 11992, + "charLength": 9, + "snippet": { + "text": "centerPos" + } + }, + "contextRegion": { + "startLine": 430, + "startColumn": 36, + "charOffset": 11952, + "charLength": 9, + "snippet": { + "text": "\t\t}\n\n\t\tfromPos.x = std::max(0, centerPos.getX() - radius);\n\t\tfromPos.y = std::max(0, centerPos.getY() - radius);\n\t\tfromPos.z = centerPos.z;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cc6bf2f38231555042a8c7b629b46d0e8aa95258ef1b43ddea7c4768f1457bdf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 432, + "startColumn": 36, + "charOffset": 11992, + "charLength": 9, + "snippet": { + "text": "centerPos" + } + }, + "contextRegion": { + "startLine": 430, + "startColumn": 36, + "charOffset": 11952, + "charLength": 9, + "snippet": { + "text": "\t\t}\n\n\t\tfromPos.x = std::max(0, centerPos.getX() - radius);\n\t\tfromPos.y = std::max(0, centerPos.getY() - radius);\n\t\tfromPos.z = centerPos.z;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "184010b4db214dcc975b4e14b00b045a97a3e8c065541a4f87f0aee241c128f6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 433, + "startColumn": 15, + "charOffset": 12034, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 431, + "startColumn": 15, + "charOffset": 11956, + "charLength": 3, + "snippet": { + "text": "\n\t\tfromPos.x = std::max(0, centerPos.getX() - radius);\n\t\tfromPos.y = std::max(0, centerPos.getY() - radius);\n\t\tfromPos.z = centerPos.z;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8f1ddca48d847542c4edf22d36fb9c6006e96c174a222e5e59dd092c63f01e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int_fast32_t' (aka 'long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 433, + "startColumn": 36, + "charOffset": 12055, + "charLength": 9, + "snippet": { + "text": "centerPos" + } + }, + "contextRegion": { + "startLine": 431, + "startColumn": 36, + "charOffset": 11956, + "charLength": 9, + "snippet": { + "text": "\n\t\tfromPos.x = std::max(0, centerPos.getX() - radius);\n\t\tfromPos.y = std::max(0, centerPos.getY() - radius);\n\t\tfromPos.z = centerPos.z;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed979a4599c60ff61e5621d282526d64d26064b8c5a0d8109cb1db97eed87ef9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 433, + "startColumn": 36, + "charOffset": 12055, + "charLength": 9, + "snippet": { + "text": "centerPos" + } + }, + "contextRegion": { + "startLine": 431, + "startColumn": 36, + "charOffset": 11956, + "charLength": 9, + "snippet": { + "text": "\n\t\tfromPos.x = std::max(0, centerPos.getX() - radius);\n\t\tfromPos.y = std::max(0, centerPos.getY() - radius);\n\t\tfromPos.z = centerPos.z;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32d81147528f486dc0c84234984039af06fe1683cc38eb6f39a7b1dd48e50c97" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 436, + "startColumn": 13, + "charOffset": 12123, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 434, + "startColumn": 13, + "charOffset": 12083, + "charLength": 3, + "snippet": { + "text": "\t\tfromPos.z = centerPos.z;\n\n\t\ttoPos.x = std::min(0xFFFF, centerPos.getX() + radius);\n\t\ttoPos.y = std::min(0xFFFF, centerPos.getY() + radius);\n\t\ttoPos.z = centerPos.z;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "38184e142c2b0dbfd03f0a7bc34c65808cb701cfe782ba41229bec7387efaaec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 436, + "startColumn": 31, + "charOffset": 12141, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 434, + "startColumn": 31, + "charOffset": 12083, + "charLength": 6, + "snippet": { + "text": "\t\tfromPos.z = centerPos.z;\n\n\t\ttoPos.x = std::min(0xFFFF, centerPos.getX() + radius);\n\t\ttoPos.y = std::min(0xFFFF, centerPos.getY() + radius);\n\t\ttoPos.z = centerPos.z;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4d00152e23e2b569e47e3f0460e1044c878723ee98786fd09977ccba425419de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int_fast32_t' (aka 'long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 436, + "startColumn": 39, + "charOffset": 12149, + "charLength": 9, + "snippet": { + "text": "centerPos" + } + }, + "contextRegion": { + "startLine": 434, + "startColumn": 39, + "charOffset": 12083, + "charLength": 9, + "snippet": { + "text": "\t\tfromPos.z = centerPos.z;\n\n\t\ttoPos.x = std::min(0xFFFF, centerPos.getX() + radius);\n\t\ttoPos.y = std::min(0xFFFF, centerPos.getY() + radius);\n\t\ttoPos.z = centerPos.z;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cca7c814b3388411d50ffa52c24f5cc8b5ed8fcc3f2ce721c8922783337b8b20" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 436, + "startColumn": 39, + "charOffset": 12149, + "charLength": 9, + "snippet": { + "text": "centerPos" + } + }, + "contextRegion": { + "startLine": 434, + "startColumn": 39, + "charOffset": 12083, + "charLength": 9, + "snippet": { + "text": "\t\tfromPos.z = centerPos.z;\n\n\t\ttoPos.x = std::min(0xFFFF, centerPos.getX() + radius);\n\t\ttoPos.y = std::min(0xFFFF, centerPos.getY() + radius);\n\t\ttoPos.z = centerPos.z;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7cea8ca464810a0802de84ba8f9d49d2b02c3b29fe5f99fbefcccad1cddbe656" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 437, + "startColumn": 13, + "charOffset": 12189, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 435, + "startColumn": 13, + "charOffset": 12110, + "charLength": 3, + "snippet": { + "text": "\n\t\ttoPos.x = std::min(0xFFFF, centerPos.getX() + radius);\n\t\ttoPos.y = std::min(0xFFFF, centerPos.getY() + radius);\n\t\ttoPos.z = centerPos.z;\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "41db5818a6a9369ee334f061e866bd34478e4493b94e697778de885cbb09affc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "0xFFFF is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 437, + "startColumn": 31, + "charOffset": 12207, + "charLength": 6, + "snippet": { + "text": "0xFFFF" + } + }, + "contextRegion": { + "startLine": 435, + "startColumn": 31, + "charOffset": 12110, + "charLength": 6, + "snippet": { + "text": "\n\t\ttoPos.x = std::min(0xFFFF, centerPos.getX() + radius);\n\t\ttoPos.y = std::min(0xFFFF, centerPos.getY() + radius);\n\t\ttoPos.z = centerPos.z;\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ffdd3101111d7d921778c3592f10207f1cbc8771aa69ef13518075ba9e7cea13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int_fast32_t' (aka 'long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 437, + "startColumn": 39, + "charOffset": 12215, + "charLength": 9, + "snippet": { + "text": "centerPos" + } + }, + "contextRegion": { + "startLine": 435, + "startColumn": 39, + "charOffset": 12110, + "charLength": 9, + "snippet": { + "text": "\n\t\ttoPos.x = std::min(0xFFFF, centerPos.getX() + radius);\n\t\ttoPos.y = std::min(0xFFFF, centerPos.getY() + radius);\n\t\ttoPos.z = centerPos.z;\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0bc89def223cde3260899dfc2c0f773df0ca78a3ac2d1b7b81eb2d53646620b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 437, + "startColumn": 39, + "charOffset": 12215, + "charLength": 9, + "snippet": { + "text": "centerPos" + } + }, + "contextRegion": { + "startLine": 435, + "startColumn": 39, + "charOffset": 12110, + "charLength": 9, + "snippet": { + "text": "\n\t\ttoPos.x = std::min(0xFFFF, centerPos.getX() + radius);\n\t\ttoPos.y = std::min(0xFFFF, centerPos.getY() + radius);\n\t\ttoPos.z = centerPos.z;\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "697a45b7b3a98b4a60545d6ae156727e0de525f3d7dd8679c728fad642c95b82" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 440, + "startColumn": 7, + "charOffset": 12284, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 438, + "startColumn": 7, + "charOffset": 12243, + "charLength": 1, + "snippet": { + "text": "\t\ttoPos.z = centerPos.z;\n\t} else {\n\t\tif ((attr = eventNode.attribute(\"fromx\"))) {\n\t\t\tfromPos.x = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a6c37eaddd760978cdb5c70ec36521800dca83de065c591a4e73ac65deb4981" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 440, + "startColumn": 7, + "charOffset": 12284, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 438, + "startColumn": 7, + "charOffset": 12243, + "charLength": 1, + "snippet": { + "text": "\t\ttoPos.z = centerPos.z;\n\t} else {\n\t\tif ((attr = eventNode.attribute(\"fromx\"))) {\n\t\t\tfromPos.x = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf06620fe928704b1f0cf520177535fa80b3c59842c65327c6771c360b68b410" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 440, + "startColumn": 13, + "charOffset": 12290, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 438, + "startColumn": 13, + "charOffset": 12243, + "charLength": 1, + "snippet": { + "text": "\t\ttoPos.z = centerPos.z;\n\t} else {\n\t\tif ((attr = eventNode.attribute(\"fromx\"))) {\n\t\t\tfromPos.x = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0647a8e39a74b719f6234d8771543e6c34c446a93ecf6360e390528f94c09e68" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 449, + "startColumn": 7, + "charOffset": 12541, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 447, + "startColumn": 7, + "charOffset": 12530, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = eventNode.attribute(\"fromy\"))) {\n\t\t\tfromPos.y = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8b37b19e16497e83823f1cdc6950ee965b0dede2bb2eecc5d53be01894d57f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 449, + "startColumn": 7, + "charOffset": 12541, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 447, + "startColumn": 7, + "charOffset": 12530, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = eventNode.attribute(\"fromy\"))) {\n\t\t\tfromPos.y = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ac1c74508e54ec6da444b5951fba717a9f44861931a473f0bbb10b1ea10e0a2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 449, + "startColumn": 13, + "charOffset": 12547, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 447, + "startColumn": 13, + "charOffset": 12530, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = eventNode.attribute(\"fromy\"))) {\n\t\t\tfromPos.y = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0278228ed5eda66aead47a58a0c5abb5e961afc71a5bca08d3d49c0d3e805d8b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 458, + "startColumn": 7, + "charOffset": 12798, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 456, + "startColumn": 7, + "charOffset": 12787, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = eventNode.attribute(\"fromz\"))) {\n\t\t\tfromPos.z = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "005091f28a5bae6124d450a3928b6d3015c1a1f639c8c8015d6eee2d9e8cb757" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 458, + "startColumn": 7, + "charOffset": 12798, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 456, + "startColumn": 7, + "charOffset": 12787, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = eventNode.attribute(\"fromz\"))) {\n\t\t\tfromPos.z = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bd537ab6a0a965a204ebf460a2d695b6e9659f9a867029c79aa6061ab2ae06e4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 458, + "startColumn": 13, + "charOffset": 12804, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 456, + "startColumn": 13, + "charOffset": 12787, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = eventNode.attribute(\"fromz\"))) {\n\t\t\tfromPos.z = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e5d9966471a5d1f58313bc9691dc9b2116035a859217076ff030d534c183707" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 459, + "startColumn": 16, + "charOffset": 12854, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 457, + "startColumn": 16, + "charOffset": 12791, + "charLength": 4, + "snippet": { + "text": "\n\t\tif ((attr = eventNode.attribute(\"fromz\"))) {\n\t\t\tfromPos.z = pugi::cast(attr.value());\n\t\t} else {\n\t\t\tg_logger().error(\"{} - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6177aff0811bb9fffc1a07171a78061bdd445aba69073cf8d2ad54a770520f97" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 467, + "startColumn": 7, + "charOffset": 13055, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 465, + "startColumn": 7, + "charOffset": 13044, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = eventNode.attribute(\"tox\"))) {\n\t\t\ttoPos.x = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "958811dd14c4205793d7691211d848f7c943c8c28707e2b3f62dc454246b4772" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 467, + "startColumn": 7, + "charOffset": 13055, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 465, + "startColumn": 7, + "charOffset": 13044, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = eventNode.attribute(\"tox\"))) {\n\t\t\ttoPos.x = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9367f939019777c9f3dbbc344b6031170d59a398a07b61e11a46a670de4cceab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 467, + "startColumn": 13, + "charOffset": 13061, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 465, + "startColumn": 13, + "charOffset": 13044, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = eventNode.attribute(\"tox\"))) {\n\t\t\ttoPos.x = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "912ab31aaf543c4311f2c04f2ac641d7ee0546d39c42bb7c9fd9c77972eda6c8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 476, + "startColumn": 7, + "charOffset": 13306, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 474, + "startColumn": 7, + "charOffset": 13295, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = eventNode.attribute(\"toy\"))) {\n\t\t\ttoPos.y = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efeed14e8b17624fe1d48df5857f95afbd78e20d9e70206c0cb9ec826ffc992b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 476, + "startColumn": 7, + "charOffset": 13306, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 474, + "startColumn": 7, + "charOffset": 13295, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = eventNode.attribute(\"toy\"))) {\n\t\t\ttoPos.y = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8d46eb9171189e09a8c0c972ad2d3b621c938962a911d56f6181d6eaa84061f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 476, + "startColumn": 13, + "charOffset": 13312, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 474, + "startColumn": 13, + "charOffset": 13295, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = eventNode.attribute(\"toy\"))) {\n\t\t\ttoPos.y = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "04ab44be04a6ba477b7a9ba9bb4101daa5370aa19bd2f4be94fdf222498d4339" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 485, + "startColumn": 7, + "charOffset": 13557, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 483, + "startColumn": 7, + "charOffset": 13546, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = eventNode.attribute(\"toz\"))) {\n\t\t\ttoPos.z = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "966aa2ea5630b55755f7d267d456b2ab5c0cb216e9e05c040fa93ca7156edd8d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 485, + "startColumn": 7, + "charOffset": 13557, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 483, + "startColumn": 7, + "charOffset": 13546, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = eventNode.attribute(\"toz\"))) {\n\t\t\ttoPos.z = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "09f32123929d51fce8e6aa7f653a02ef35a6ab55cc03353662afb4940d02263a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 485, + "startColumn": 13, + "charOffset": 13563, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 483, + "startColumn": 13, + "charOffset": 13546, + "charLength": 1, + "snippet": { + "text": "\t\t}\n\n\t\tif ((attr = eventNode.attribute(\"toz\"))) {\n\t\t\ttoPos.z = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c003e9b1bb5a2b9e9d87179d750202f2d2ef60159bffcd6cf492c446d4854fa2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 486, + "startColumn": 14, + "charOffset": 13609, + "charLength": 4, + "snippet": { + "text": "pugi" + } + }, + "contextRegion": { + "startLine": 484, + "startColumn": 14, + "charOffset": 13550, + "charLength": 4, + "snippet": { + "text": "\n\t\tif ((attr = eventNode.attribute(\"toz\"))) {\n\t\t\ttoPos.z = pugi::cast(attr.value());\n\t\t} else {\n\t\t\tg_logger().error(\"{} - \"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b374cbe090b19a26c7f53774e2a937187e6415e43956925adbd8572d88172e88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 495, + "startColumn": 2, + "charOffset": 13806, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 493, + "startColumn": 2, + "charOffset": 13801, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (auto monsterNode : eventNode.children()) {\n\t\tconst char* name;\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e8021a864e7b33b4ba0d92f2b3b056ad0b777ed5c124371cf1f53c37418aa1b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'name' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 496, + "startColumn": 15, + "charOffset": 13868, + "charLength": 4, + "snippet": { + "text": "name" + } + }, + "contextRegion": { + "startLine": 494, + "startColumn": 15, + "charOffset": 13804, + "charLength": 4, + "snippet": { + "text": "\n\tfor (auto monsterNode : eventNode.children()) {\n\t\tconst char* name;\n\n\t\tif ((attr = monsterNode.attribute(\"name\"))) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a45dd85197a7b9fa371c9e19096fedb92bd11ce6f49ad822f85ba0c8914ce53e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 498, + "startColumn": 7, + "charOffset": 13881, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 496, + "startColumn": 7, + "charOffset": 13854, + "charLength": 1, + "snippet": { + "text": "\t\tconst char* name;\n\n\t\tif ((attr = monsterNode.attribute(\"name\"))) {\n\t\t\tname = attr.value();\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e38efdc5c74c3eabf785ed5f467672187118f5417716eebaa143298300a8183" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 498, + "startColumn": 7, + "charOffset": 13881, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 496, + "startColumn": 7, + "charOffset": 13854, + "charLength": 1, + "snippet": { + "text": "\t\tconst char* name;\n\n\t\tif ((attr = monsterNode.attribute(\"name\"))) {\n\t\t\tname = attr.value();\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "223a8a0ec2c264b362ae96bf1bce2b3a7fe67d2e6d439f65db3448dbf9e2c44c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 498, + "startColumn": 13, + "charOffset": 13887, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 496, + "startColumn": 13, + "charOffset": 13854, + "charLength": 1, + "snippet": { + "text": "\t\tconst char* name;\n\n\t\tif ((attr = monsterNode.attribute(\"name\"))) {\n\t\t\tname = attr.value();\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b93046ebfce7c5842a4dbc16ee6c3441c2cf3a4c41b4378545ec98c262c38dbe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'minAmount' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 507, + "startColumn": 12, + "charOffset": 14113, + "charLength": 9, + "snippet": { + "text": "minAmount" + } + }, + "contextRegion": { + "startLine": 505, + "startColumn": 12, + "charOffset": 14097, + "charLength": 9, + "snippet": { + "text": "\t\t}\n\n\t\tuint32_t minAmount;\n\t\tif ((attr = monsterNode.attribute(\"minamount\"))) {\n\t\t\tminAmount = pugi::cast(attr.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b606ce62790073175e7ca6c5c2baa70ae590f1eb273e9e7fab1e12ff9ab1c2fc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 508, + "startColumn": 7, + "charOffset": 14130, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 506, + "startColumn": 7, + "charOffset": 14101, + "charLength": 1, + "snippet": { + "text": "\n\t\tuint32_t minAmount;\n\t\tif ((attr = monsterNode.attribute(\"minamount\"))) {\n\t\t\tminAmount = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "40f483a4e6e10c9c6916c26d620918107479d1089fa6fc7212bcec382c38ef29" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 508, + "startColumn": 7, + "charOffset": 14130, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 506, + "startColumn": 7, + "charOffset": 14101, + "charLength": 1, + "snippet": { + "text": "\n\t\tuint32_t minAmount;\n\t\tif ((attr = monsterNode.attribute(\"minamount\"))) {\n\t\t\tminAmount = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21f530fe96966605fee65b7bb5e8881e8b9748f456d18e9bab68a42f77d603d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 508, + "startColumn": 13, + "charOffset": 14136, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 506, + "startColumn": 13, + "charOffset": 14101, + "charLength": 1, + "snippet": { + "text": "\n\t\tuint32_t minAmount;\n\t\tif ((attr = monsterNode.attribute(\"minamount\"))) {\n\t\t\tminAmount = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c2f3e80454621da630362a328e5511ca3739b729e47dd44c094f4c16b0e7a5f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'maxAmount' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 514, + "startColumn": 12, + "charOffset": 14273, + "charLength": 9, + "snippet": { + "text": "maxAmount" + } + }, + "contextRegion": { + "startLine": 512, + "startColumn": 12, + "charOffset": 14257, + "charLength": 9, + "snippet": { + "text": "\t\t}\n\n\t\tuint32_t maxAmount;\n\t\tif ((attr = monsterNode.attribute(\"maxamount\"))) {\n\t\t\tmaxAmount = pugi::cast(attr.value());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6b8940ecc6f75bd5c1db17c9dc1a45bf4cbc9c15cf300cf170e2e3dfc880c616" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 515, + "startColumn": 7, + "charOffset": 14290, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 513, + "startColumn": 7, + "charOffset": 14261, + "charLength": 1, + "snippet": { + "text": "\n\t\tuint32_t maxAmount;\n\t\tif ((attr = monsterNode.attribute(\"maxamount\"))) {\n\t\t\tmaxAmount = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fcc8aa74d41b2f32bfcb5d9d5be14e3aa233706ebbc6e8e25b18c5cf06a8fdd3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 515, + "startColumn": 7, + "charOffset": 14290, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 513, + "startColumn": 7, + "charOffset": 14261, + "charLength": 1, + "snippet": { + "text": "\n\t\tuint32_t maxAmount;\n\t\tif ((attr = monsterNode.attribute(\"maxamount\"))) {\n\t\t\tmaxAmount = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5df79da0ed3a6f70a4b80daad669e38159da901a4fcf1410e27a2b43e39ebb9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 515, + "startColumn": 13, + "charOffset": 14296, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 513, + "startColumn": 13, + "charOffset": 14261, + "charLength": 1, + "snippet": { + "text": "\n\t\tuint32_t maxAmount;\n\t\tif ((attr = monsterNode.attribute(\"maxamount\"))) {\n\t\t\tmaxAmount = pugi::cast(attr.value());\n\t\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2b93920d6a76e129bd16b197067a26df6f7acc8550baae3e8b2e11e5cb28b3d0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 522, + "startColumn": 8, + "charOffset": 14471, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 520, + "startColumn": 8, + "charOffset": 14421, + "charLength": 1, + "snippet": { + "text": "\n\t\tif (maxAmount == 0 && minAmount == 0) {\n\t\t\tif ((attr = monsterNode.attribute(\"amount\"))) {\n\t\t\t\tminAmount = pugi::cast(attr.value());\n\t\t\t\tmaxAmount = minAmount;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "060902755202e5e39e9e2ba686deba32c2eb4a4aba466a5c633e28a323333783" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'unspecified_bool_type' (aka 'void (*)(xml_attribute ***)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 522, + "startColumn": 8, + "charOffset": 14471, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 520, + "startColumn": 8, + "charOffset": 14421, + "charLength": 1, + "snippet": { + "text": "\n\t\tif (maxAmount == 0 && minAmount == 0) {\n\t\t\tif ((attr = monsterNode.attribute(\"amount\"))) {\n\t\t\t\tminAmount = pugi::cast(attr.value());\n\t\t\t\tmaxAmount = minAmount;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "216f14108dd4a4863e1280c93f84bb3d5296579ba15e3494fd9da0db262d2f16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-assignment-in-if-condition", + "ruleIndex": 42, + "kind": "fail", + "level": "warning", + "message": { + "text": "an assignment within an 'if' condition is bug-prone" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 522, + "startColumn": 14, + "charOffset": 14477, + "charLength": 1, + "snippet": { + "text": "=" + } + }, + "contextRegion": { + "startLine": 520, + "startColumn": 14, + "charOffset": 14421, + "charLength": 1, + "snippet": { + "text": "\n\t\tif (maxAmount == 0 && minAmount == 0) {\n\t\t\tif ((attr = monsterNode.attribute(\"amount\"))) {\n\t\t\t\tminAmount = pugi::cast(attr.value());\n\t\t\t\tmaxAmount = minAmount;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "20e6ab2f3a02eabe9c95d09fa8c6207d83f17e91de5e96835d7da719a2128da0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 533, + "startColumn": 20, + "charOffset": 14780, + "charLength": 12, + "snippet": { + "text": "emplace_back" + } + }, + "contextRegion": { + "startLine": 531, + "startColumn": 20, + "charOffset": 14756, + "charLength": 12, + "snippet": { + "text": "\t\t}\n\n\t\tspawnMonsterList.emplace_back(name, minAmount, maxAmount);\n\t}\n\treturn true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a937f793b8d20bf752399b9ba29d0a0b00f1579e3ed333cd7daf6e97f4e59574" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 540, + "startColumn": 36, + "charOffset": 14969, + "charLength": 5, + "snippet": { + "text": "spawn" + } + }, + "contextRegion": { + "startLine": 538, + "startColumn": 36, + "charOffset": 14842, + "charLength": 5, + "snippet": { + "text": "bool AreaSpawnEvent::executeEvent() {\n\tfor (const MonsterSpawn &spawn : spawnMonsterList) {\n\t\tuint32_t amount = uniform_random(spawn.minAmount, spawn.maxAmount);\n\t\tfor (uint32_t i = 0; i < amount; ++i) {\n\t\t\tstd::shared_ptr monster = Monster::createMonster(spawn.name);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6bd893c26f8228c54cbcacdbc91f72265221121fe9a7191dc667ca0c809bf61" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 540, + "startColumn": 53, + "charOffset": 14986, + "charLength": 5, + "snippet": { + "text": "spawn" + } + }, + "contextRegion": { + "startLine": 538, + "startColumn": 53, + "charOffset": 14842, + "charLength": 5, + "snippet": { + "text": "bool AreaSpawnEvent::executeEvent() {\n\tfor (const MonsterSpawn &spawn : spawnMonsterList) {\n\t\tuint32_t amount = uniform_random(spawn.minAmount, spawn.maxAmount);\n\t\tfor (uint32_t i = 0; i < amount; ++i) {\n\t\t\tstd::shared_ptr monster = Monster::createMonster(spawn.name);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "724b0a91429f49c80572607b05c7e1357dc617d3a5848bb216529ee3acd81175" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'amount' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 541, + "startColumn": 24, + "charOffset": 15027, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 539, + "startColumn": 24, + "charOffset": 14880, + "charLength": 1, + "snippet": { + "text": "\tfor (const MonsterSpawn &spawn : spawnMonsterList) {\n\t\tuint32_t amount = uniform_random(spawn.minAmount, spawn.maxAmount);\n\t\tfor (uint32_t i = 0; i < amount; ++i) {\n\t\t\tstd::shared_ptr monster = Monster::createMonster(spawn.name);\n\t\t\tif (!monster) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "954db893e776ff3aaaf4aab1dc7ca4412a286463379d8682e647c8082e3d30b1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 543, + "startColumn": 8, + "charOffset": 15127, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 541, + "startColumn": 8, + "charOffset": 15004, + "charLength": 1, + "snippet": { + "text": "\t\tfor (uint32_t i = 0; i < amount; ++i) {\n\t\t\tstd::shared_ptr monster = Monster::createMonster(spawn.name);\n\t\t\tif (!monster) {\n\t\t\t\tg_logger().error(\"{} - Can't create monster {}\", __FUNCTION__, spawn.name);\n\t\t\t\treturn false;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ceec8b0c019738ff757b728e731d334dfbad091c0d9e34b2047c614fabb94e51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 549, + "startColumn": 4, + "charOffset": 15271, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 547, + "startColumn": 4, + "charOffset": 15242, + "charLength": 3, + "snippet": { + "text": "\n\t\t\tbool success = false;\n\t\t\tfor (int32_t tries = 0; tries < MAXIMUM_TRIES_PER_MONSTER; tries++) {\n\t\t\t\tstd::shared_ptr tile = g_game().map.getTile(static_cast(uniform_random(fromPos.x, toPos.x)), static_cast(uniform_random(fromPos.y, toPos.y)), static_cast(uniform_random(fromPos.z, toPos.z)));\n\t\t\t\tif (tile && !tile->isMovableBlocking() && !tile->hasFlag(TILESTATE_PROTECTIONZONE) && tile->getTopCreature() == nullptr && g_game().placeCreature(monster, tile->getPosition(), false, true)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ca33726cdd9e2b3b358f663dc1910d55537c29c22e7bfa15d203ca0ffba3527" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 571, + "startColumn": 6, + "charOffset": 16116, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 569, + "startColumn": 6, + "charOffset": 16040, + "charLength": 1, + "snippet": { + "text": "\n\tpugi::xml_attribute scriptAttribute = eventNode.attribute(\"script\");\n\tif (!scriptAttribute) {\n\t\tg_logger().error(\"{} - \"\n\t\t \"No script file found for raid\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a16727b6cf409be98ab925f0f57982e2c592647125ef0ec6de38ee3695cfccb5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 596, + "startColumn": 7, + "charOffset": 16740, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 594, + "startColumn": 7, + "charOffset": 16686, + "charLength": 15, + "snippet": { + "text": "bool ScriptEvent::executeEvent() {\n\t// onRaid()\n\tif (!scriptInterface->reserveScriptEnv()) {\n\t\tg_logger().error(\"{} - Script with name {} \"\n\t\t \"Call stack overflow. Too many lua script calls being nested.\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3c043b60af48b4dc091324bacc071e8ca39ed0a3597dddf8645b299cb179ee4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 603, + "startColumn": 27, + "charOffset": 17006, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 601, + "startColumn": 27, + "charOffset": 16976, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\n\tenv->setScriptId(scriptId, scriptInterface);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f212bfaa5cde9e9ce1c7ae6a626602b27a01834fda5c7ce317647155b96fc4bb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/raids.cpp" + }, + "region": { + "startLine": 606, + "startColumn": 19, + "charOffset": 17104, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 604, + "startColumn": 19, + "charOffset": 17039, + "charLength": 12, + "snippet": { + "text": "\tenv->setScriptId(scriptId, scriptInterface);\n\n\tscriptInterface->pushFunction(scriptId);\n\n\treturn scriptInterface->callFunction(0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be943510b183cab2eb02daf321f8cf4895d485d414909590a236c0e5bec8289d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/npcs/npc.hpp" + }, + "region": { + "startLine": 13, + "startColumn": 10, + "charOffset": 429, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 11, + "startColumn": 10, + "charOffset": 384, + "charLength": 30, + "snippet": { + "text": "\n#include \"creatures/npcs/npcs.hpp\"\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"items/tile.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f69d6cfec9be0f6769310fd1d031cff4d88ef48385f012190be0fe563d15e4a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/grouping/party.hpp", + "index": 1 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"creatures/monsters/monsters.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0e45483e1912ecf8c717a48f913562d9a9cf501f9947625dad361d43acc28406" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "misc-header-include-cycle", + "ruleIndex": 597, + "kind": "fail", + "level": "warning", + "message": { + "text": "circular header file dependency detected while including 'player.hpp', please check the include path" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/creatures/players/imbuements/imbuements.hpp", + "index": 2 + }, + "region": { + "startLine": 12, + "startColumn": 10, + "charOffset": 394, + "charLength": 30, + "snippet": { + "text": "\"creatures/players/player.hpp\"" + } + }, + "contextRegion": { + "startLine": 10, + "startColumn": 10, + "charOffset": 371, + "charLength": 30, + "snippet": { + "text": "#pragma once\n\n#include \"creatures/players/player.hpp\"\n#include \"declarations.hpp\"\n#include \"lib/di/container.hpp\"" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3a2b3a997037594f8bab93e08d9b46935593069da5e9def3fec147ea485ffc36" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-convert-member-functions-to-static", + "ruleIndex": 696, + "kind": "fail", + "level": "warning", + "message": { + "text": "method 'checkWord' can be made static" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/talkaction.cpp", + "index": 3 + }, + "region": { + "startLine": 28, + "startColumn": 19, + "charOffset": 837, + "charLength": 9, + "snippet": { + "text": "checkWord" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 19, + "charOffset": 816, + "charLength": 9, + "snippet": { + "text": "}\n\nbool TalkActions::checkWord(std::shared_ptr player, SpeakClasses type, const std::string &words, const std::string_view &word, const TalkAction_ptr &talkActionPtr) const {\n\tauto spacePos = std::ranges::find_if(words.begin(), words.end(), ::isspace);\n\tstd::string firstWord = words.substr(0, spacePos - words.begin());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ab77ef09ae1fc2492879f5cb343b6844a95bf1ae232b7a4a4d6a761d2f7c6c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/talkaction.cpp", + "index": 3 + }, + "region": { + "startLine": 28, + "startColumn": 53, + "charOffset": 871, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 26, + "startColumn": 53, + "charOffset": 816, + "charLength": 6, + "snippet": { + "text": "}\n\nbool TalkActions::checkWord(std::shared_ptr player, SpeakClasses type, const std::string &words, const std::string_view &word, const TalkAction_ptr &talkActionPtr) const {\n\tauto spacePos = std::ranges::find_if(words.begin(), words.end(), ::isspace);\n\tstd::string firstWord = words.substr(0, spacePos - words.begin());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c59c400f534dcc7f0b9c62f1d5560725a2f01b1eb00146df95f5036ef57a2437" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-unconstrained-variable-type", + "ruleIndex": 476, + "kind": "fail", + "level": "warning", + "message": { + "text": "Add 'std::input_iterator' constraint" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/talkaction.cpp", + "index": 3 + }, + "region": { + "startLine": 29, + "startColumn": 2, + "charOffset": 1000, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 27, + "startColumn": 2, + "charOffset": 818, + "charLength": 4, + "snippet": { + "text": "\nbool TalkActions::checkWord(std::shared_ptr player, SpeakClasses type, const std::string &words, const std::string_view &word, const TalkAction_ptr &talkActionPtr) const {\n\tauto spacePos = std::ranges::find_if(words.begin(), words.end(), ::isspace);\n\tstd::string firstWord = words.substr(0, spacePos - words.begin());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ac33bfad6cf67053ef23f96d41813bc0a46318d17a5077eced42bad0a2555bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/talkaction.cpp", + "index": 3 + }, + "region": { + "startLine": 55, + "startColumn": 6, + "charOffset": 1793, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 6, + "charOffset": 1741, + "charLength": 4, + "snippet": { + "text": "\t\t\tif (param != separator) {\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\tparam.erase(param.begin());\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6e3ba5ca800f129a7c8bacfef6cfe5701b1cb3c205975a9061827712e2273cc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/talkaction.cpp", + "index": 3 + }, + "region": { + "startLine": 56, + "startColumn": 11, + "charOffset": 1810, + "charLength": 5, + "snippet": { + "text": "erase" + } + }, + "contextRegion": { + "startLine": 54, + "startColumn": 11, + "charOffset": 1770, + "charLength": 5, + "snippet": { + "text": "\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\tparam.erase(param.begin());\n\t\t\t}\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "171fcaa16b38a0d39cb0fdb830339e66b480e2d681c807ac998dd59db9b9a3ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/talkaction.cpp", + "index": 3 + }, + "region": { + "startLine": 64, + "startColumn": 85, + "charOffset": 1995, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 62, + "startColumn": 85, + "charOffset": 1908, + "charLength": 6, + "snippet": { + "text": "}\n\nTalkActionResult_t TalkActions::checkPlayerCanSayTalkAction(std::shared_ptr player, SpeakClasses type, const std::string &words) const {\n\tfor (const auto &[talkactionWords, talkActionPtr] : talkActions) {\n\t\tif (talkactionWords.find(',') != std::string::npos) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7a6119b97b5e286669b167a889f3b0076583a8595c42c7b361b1168cdb8c55fe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/talkaction.cpp", + "index": 3 + }, + "region": { + "startLine": 68, + "startColumn": 4, + "charOffset": 2227, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 66, + "startColumn": 4, + "charOffset": 2124, + "charLength": 3, + "snippet": { + "text": "\t\tif (talkactionWords.find(',') != std::string::npos) {\n\t\t\tauto wordsList = split(talkactionWords);\n\t\t\tfor (const auto &word : wordsList) {\n\t\t\t\tif (checkWord(player, type, words, word, talkActionPtr)) {\n\t\t\t\t\treturn TALKACTION_BREAK;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "33945df2c29fec392748b9e683d2928e84392eebbb3f1178b9f163a99fe19bb7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/talkaction.cpp", + "index": 3 + }, + "region": { + "startLine": 82, + "startColumn": 53, + "charOffset": 2577, + "charLength": 6, + "snippet": { + "text": "player" + } + }, + "contextRegion": { + "startLine": 80, + "startColumn": 53, + "charOffset": 2522, + "charLength": 6, + "snippet": { + "text": "}\n\nbool TalkAction::executeSay(std::shared_ptr player, const std::string &words, const std::string ¶m, SpeakClasses type) const {\n\t// onSay(player, words, param, type)\n\tif (!getScriptInterface()->reserveScriptEnv()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f5eef37a36a2e7060016dfe5c024273090c8d91997ddc742b8e61e10ed71f285" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/talkaction.cpp", + "index": 3 + }, + "region": { + "startLine": 84, + "startColumn": 7, + "charOffset": 2708, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 82, + "startColumn": 7, + "charOffset": 2525, + "charLength": 18, + "snippet": { + "text": "bool TalkAction::executeSay(std::shared_ptr player, const std::string &words, const std::string ¶m, SpeakClasses type) const {\n\t// onSay(player, words, param, type)\n\tif (!getScriptInterface()->reserveScriptEnv()) {\n\t\tg_logger().error(\"[TalkAction::executeSay - Player {} words {}] \"\n\t\t \"Call stack overflow. Too many lua script calls being nested. Script name {}\"," + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "839efa6c509ef5cfbe0a4c753cb696d1bfe52c761162d72f638d57e380acab54" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/talkaction.cpp", + "index": 3 + }, + "region": { + "startLine": 91, + "startColumn": 41, + "charOffset": 3075, + "charLength": 18, + "snippet": { + "text": "getScriptInterface" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 41, + "charOffset": 3031, + "charLength": 18, + "snippet": { + "text": "\t}\n\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f39d3ea04b373c2e04c1d49d40bdafc7641375c9e6b6121dbdd233bae7d391ae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/talkaction.cpp", + "index": 3 + }, + "region": { + "startLine": 96, + "startColumn": 24, + "charOffset": 3261, + "charLength": 12, + "snippet": { + "text": "pushFunction" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 24, + "charOffset": 3184, + "charLength": 12, + "snippet": { + "text": "\tlua_State* L = getScriptInterface()->getLuaState();\n\n\tgetScriptInterface()->pushFunction(getScriptId());\n\n\tLuaScriptInterface::pushUserdata(L, player);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b82d891865ef99357a770f839a6b09e5851664d8a9b1e8e822e2bcec34b599b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/creature/talkaction.cpp", + "index": 3 + }, + "region": { + "startLine": 103, + "startColumn": 20, + "charOffset": 3503, + "charLength": 4, + "snippet": { + "text": "type" + } + }, + "contextRegion": { + "startLine": 101, + "startColumn": 20, + "charOffset": 3398, + "charLength": 4, + "snippet": { + "text": "\tLuaScriptInterface::pushString(L, words);\n\tLuaScriptInterface::pushString(L, param);\n\tlua_pushnumber(L, type);\n\n\treturn getScriptInterface()->callFunction(4);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b062eafe063a6c4b1e81633d5a6c7557ad1d588eb86c03c46b852e458e1e9f24" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 35, + "startColumn": 6, + "charOffset": 1247, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 33, + "startColumn": 6, + "charOffset": 1195, + "charLength": 1, + "snippet": { + "text": "\nvoid LuaFunctionsLoader::load(lua_State* L) {\n\tif (!L) {\n\t\tg_game().dieSafely(\"Invalid lua state, cannot load lua functions.\");\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "152e2aa81f357beb539750edf96828e0e1beaf1c53c05ad23390106b4119300b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'lua_State *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 35, + "startColumn": 7, + "charOffset": 1248, + "charLength": 1, + "snippet": { + "text": "L" + } + }, + "contextRegion": { + "startLine": 33, + "startColumn": 7, + "charOffset": 1195, + "charLength": 1, + "snippet": { + "text": "\nvoid LuaFunctionsLoader::load(lua_State* L) {\n\tif (!L) {\n\t\tg_game().dieSafely(\"Invalid lua state, cannot load lua functions.\");\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d441e473528549c5debdb229eeab516910f5af319dc0f14056827550cb5af906" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 51, + "startColumn": 3, + "charOffset": 1589, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 49, + "startColumn": 3, + "charOffset": 1505, + "charLength": 4, + "snippet": { + "text": "std::string LuaFunctionsLoader::getErrorDesc(ErrorCode_t code) {\n\tswitch (code) {\n\t\tcase LUA_ERROR_PLAYER_NOT_FOUND:\n\t\t\treturn \"Player not found\";\n\t\tcase LUA_ERROR_CREATURE_NOT_FOUND:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f1d08128f300633cb45abe0d2f762934e7dd21a054b8777a2cb44e99a980cb74" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 53, + "startColumn": 3, + "charOffset": 1654, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 3, + "charOffset": 1587, + "charLength": 4, + "snippet": { + "text": "\t\tcase LUA_ERROR_PLAYER_NOT_FOUND:\n\t\t\treturn \"Player not found\";\n\t\tcase LUA_ERROR_CREATURE_NOT_FOUND:\n\t\t\treturn \"Creature not found\";\n\t\tcase LUA_ERROR_NPC_NOT_FOUND:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c73ad3bd646174db67c19941d95f9bf52d4ad60497c83be76a0b1bf0d20dda2e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 55, + "startColumn": 3, + "charOffset": 1723, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 53, + "startColumn": 3, + "charOffset": 1652, + "charLength": 4, + "snippet": { + "text": "\t\tcase LUA_ERROR_CREATURE_NOT_FOUND:\n\t\t\treturn \"Creature not found\";\n\t\tcase LUA_ERROR_NPC_NOT_FOUND:\n\t\t\treturn \"Npc not found\";\n\t\tcase LUA_ERROR_NPC_TYPE_NOT_FOUND:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "126a086757d5b827f27ad8e1719aeaa7cfb7e1338c30d62396e7c25eef503153" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 57, + "startColumn": 3, + "charOffset": 1782, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 55, + "startColumn": 3, + "charOffset": 1721, + "charLength": 4, + "snippet": { + "text": "\t\tcase LUA_ERROR_NPC_NOT_FOUND:\n\t\t\treturn \"Npc not found\";\n\t\tcase LUA_ERROR_NPC_TYPE_NOT_FOUND:\n\t\t\treturn \"Npc type not found\";\n\t\tcase LUA_ERROR_MONSTER_NOT_FOUND:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "da7f86e73be14554102e7ed7ac3875a512a38a6a550432670e6dad894be1f520" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 3, + "charOffset": 1851, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 3, + "charOffset": 1780, + "charLength": 4, + "snippet": { + "text": "\t\tcase LUA_ERROR_NPC_TYPE_NOT_FOUND:\n\t\t\treturn \"Npc type not found\";\n\t\tcase LUA_ERROR_MONSTER_NOT_FOUND:\n\t\t\treturn \"Monster not found\";\n\t\tcase LUA_ERROR_MONSTER_TYPE_NOT_FOUND:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "99b5032ee9ea1d8bcb42a43bf4cd52a853c40a99c7a2c9c3f7b9b79e9e68feb3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 61, + "startColumn": 3, + "charOffset": 1918, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 59, + "startColumn": 3, + "charOffset": 1849, + "charLength": 4, + "snippet": { + "text": "\t\tcase LUA_ERROR_MONSTER_NOT_FOUND:\n\t\t\treturn \"Monster not found\";\n\t\tcase LUA_ERROR_MONSTER_TYPE_NOT_FOUND:\n\t\t\treturn \"Monster type not found\";\n\t\tcase LUA_ERROR_ITEM_NOT_FOUND:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1324f31f20ccc8f1feda513d967230271f58ec8d15e88641b892010c5253281" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 63, + "startColumn": 3, + "charOffset": 1995, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 3, + "charOffset": 1916, + "charLength": 4, + "snippet": { + "text": "\t\tcase LUA_ERROR_MONSTER_TYPE_NOT_FOUND:\n\t\t\treturn \"Monster type not found\";\n\t\tcase LUA_ERROR_ITEM_NOT_FOUND:\n\t\t\treturn \"Item not found\";\n\t\tcase LUA_ERROR_THING_NOT_FOUND:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1522855eb215ccfd35da333e14b3a946b71307ca99eb56e533d1b7f25cf8c273" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 65, + "startColumn": 3, + "charOffset": 2056, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 63, + "startColumn": 3, + "charOffset": 1993, + "charLength": 4, + "snippet": { + "text": "\t\tcase LUA_ERROR_ITEM_NOT_FOUND:\n\t\t\treturn \"Item not found\";\n\t\tcase LUA_ERROR_THING_NOT_FOUND:\n\t\t\treturn \"Thing not found\";\n\t\tcase LUA_ERROR_TILE_NOT_FOUND:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f38acedda8ebe32845eedf829813dbf99664c59d0ad1a789bfa1f176ea7f529" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 67, + "startColumn": 3, + "charOffset": 2119, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 65, + "startColumn": 3, + "charOffset": 2054, + "charLength": 4, + "snippet": { + "text": "\t\tcase LUA_ERROR_THING_NOT_FOUND:\n\t\t\treturn \"Thing not found\";\n\t\tcase LUA_ERROR_TILE_NOT_FOUND:\n\t\t\treturn \"Tile not found\";\n\t\tcase LUA_ERROR_HOUSE_NOT_FOUND:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "375fff99e4eeb285c260e44bfbb2da5dcede3e87dc84acead7e158a2543fcfa7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 69, + "startColumn": 3, + "charOffset": 2180, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 67, + "startColumn": 3, + "charOffset": 2117, + "charLength": 4, + "snippet": { + "text": "\t\tcase LUA_ERROR_TILE_NOT_FOUND:\n\t\t\treturn \"Tile not found\";\n\t\tcase LUA_ERROR_HOUSE_NOT_FOUND:\n\t\t\treturn \"House not found\";\n\t\tcase LUA_ERROR_COMBAT_NOT_FOUND:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9465f2f236759e0b93613806624c3e6ea0c2482ecc1853a457ec84709ee3c59c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 71, + "startColumn": 3, + "charOffset": 2243, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 69, + "startColumn": 3, + "charOffset": 2178, + "charLength": 4, + "snippet": { + "text": "\t\tcase LUA_ERROR_HOUSE_NOT_FOUND:\n\t\t\treturn \"House not found\";\n\t\tcase LUA_ERROR_COMBAT_NOT_FOUND:\n\t\t\treturn \"Combat not found\";\n\t\tcase LUA_ERROR_CONDITION_NOT_FOUND:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "155efc04a1fce174c45445e7675c4822a168e0bdb35791a37d69d71aa9518825" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 73, + "startColumn": 3, + "charOffset": 2308, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 71, + "startColumn": 3, + "charOffset": 2241, + "charLength": 4, + "snippet": { + "text": "\t\tcase LUA_ERROR_COMBAT_NOT_FOUND:\n\t\t\treturn \"Combat not found\";\n\t\tcase LUA_ERROR_CONDITION_NOT_FOUND:\n\t\t\treturn \"Condition not found\";\n\t\tcase LUA_ERROR_AREA_NOT_FOUND:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "49b1cc42d3be2e81603d4a1e6c7e478cb78c079aa952e7b14693b23e64000160" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 75, + "startColumn": 3, + "charOffset": 2379, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 73, + "startColumn": 3, + "charOffset": 2306, + "charLength": 4, + "snippet": { + "text": "\t\tcase LUA_ERROR_CONDITION_NOT_FOUND:\n\t\t\treturn \"Condition not found\";\n\t\tcase LUA_ERROR_AREA_NOT_FOUND:\n\t\t\treturn \"Area not found\";\n\t\tcase LUA_ERROR_CONTAINER_NOT_FOUND:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf2c494ae31a000e0ccf79e56d489b3a8a2e21f4b13e59a6324d11b4852d7fda" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 77, + "startColumn": 3, + "charOffset": 2440, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 75, + "startColumn": 3, + "charOffset": 2377, + "charLength": 4, + "snippet": { + "text": "\t\tcase LUA_ERROR_AREA_NOT_FOUND:\n\t\t\treturn \"Area not found\";\n\t\tcase LUA_ERROR_CONTAINER_NOT_FOUND:\n\t\t\treturn \"Container not found\";\n\t\tcase LUA_ERROR_VARIANT_NOT_FOUND:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c55347e05afb2676a0bfde2fdb49adbb402729ebea920e4205460a08c539b2b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 79, + "startColumn": 3, + "charOffset": 2511, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 77, + "startColumn": 3, + "charOffset": 2438, + "charLength": 4, + "snippet": { + "text": "\t\tcase LUA_ERROR_CONTAINER_NOT_FOUND:\n\t\t\treturn \"Container not found\";\n\t\tcase LUA_ERROR_VARIANT_NOT_FOUND:\n\t\t\treturn \"Variant not found\";\n\t\tcase LUA_ERROR_VARIANT_UNKNOWN:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43932c581899939146bf8c74f0325a5c5f1a9abc745ba3f903580e8d6610a2cd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 81, + "startColumn": 3, + "charOffset": 2578, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 79, + "startColumn": 3, + "charOffset": 2509, + "charLength": 4, + "snippet": { + "text": "\t\tcase LUA_ERROR_VARIANT_NOT_FOUND:\n\t\t\treturn \"Variant not found\";\n\t\tcase LUA_ERROR_VARIANT_UNKNOWN:\n\t\t\treturn \"Unknown variant type\";\n\t\tcase LUA_ERROR_SPELL_NOT_FOUND:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "95158942e63ec13ed2ad4201c308f724f3c6daf62d937b63e65ff23e4eec2102" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 83, + "startColumn": 3, + "charOffset": 2646, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 81, + "startColumn": 3, + "charOffset": 2576, + "charLength": 4, + "snippet": { + "text": "\t\tcase LUA_ERROR_VARIANT_UNKNOWN:\n\t\t\treturn \"Unknown variant type\";\n\t\tcase LUA_ERROR_SPELL_NOT_FOUND:\n\t\t\treturn \"Spell not found\";\n\t\tcase LUA_ERROR_ACTION_NOT_FOUND:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8aef10ff15ba70a90e76ccf400da08a4db5edcf7c9a7f90fdc99ede263a2aea8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 85, + "startColumn": 3, + "charOffset": 2709, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 83, + "startColumn": 3, + "charOffset": 2644, + "charLength": 4, + "snippet": { + "text": "\t\tcase LUA_ERROR_SPELL_NOT_FOUND:\n\t\t\treturn \"Spell not found\";\n\t\tcase LUA_ERROR_ACTION_NOT_FOUND:\n\t\t\treturn \"Action not found\";\n\t\tcase LUA_ERROR_TALK_ACTION_NOT_FOUND:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54b1aa2c7a1428bca4666389d2810195be2c0908db08271980438d2d4717827b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 87, + "startColumn": 3, + "charOffset": 2774, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 85, + "startColumn": 3, + "charOffset": 2707, + "charLength": 4, + "snippet": { + "text": "\t\tcase LUA_ERROR_ACTION_NOT_FOUND:\n\t\t\treturn \"Action not found\";\n\t\tcase LUA_ERROR_TALK_ACTION_NOT_FOUND:\n\t\t\treturn \"TalkAction not found\";\n\t\tcase LUA_ERROR_ZONE_NOT_FOUND:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9a53c790eb5a98dd448108eacaa0796f617ed1de2ee9883b5bdbc83e6f950bed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 89, + "startColumn": 3, + "charOffset": 2848, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 87, + "startColumn": 3, + "charOffset": 2772, + "charLength": 4, + "snippet": { + "text": "\t\tcase LUA_ERROR_TALK_ACTION_NOT_FOUND:\n\t\t\treturn \"TalkAction not found\";\n\t\tcase LUA_ERROR_ZONE_NOT_FOUND:\n\t\t\treturn \"Zone not found\";\n\t\tdefault:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb98b96539cd520256fb2c76eabf01a9cc347188dd8e9ae288df7d80aac46ac5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-5", + "ruleIndex": 452, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-5: An unconditional throw or break statement shall terminate every non-empty switch-clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 91, + "startColumn": 3, + "charOffset": 2909, + "charLength": 7, + "snippet": { + "text": "default" + } + }, + "contextRegion": { + "startLine": 89, + "startColumn": 3, + "charOffset": 2846, + "charLength": 7, + "snippet": { + "text": "\t\tcase LUA_ERROR_ZONE_NOT_FOUND:\n\t\t\treturn \"Zone not found\";\n\t\tdefault:\n\t\t\treturn \"Bad error code\";\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9005d94fdb74acf6d4975bad1bf8883368ea0a7ad55d5f88c41e71b8734b6025" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'scriptId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 10, + "charOffset": 3467, + "charLength": 8, + "snippet": { + "text": "scriptId" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 10, + "charOffset": 3334, + "charLength": 8, + "snippet": { + "text": "\nvoid LuaFunctionsLoader::reportError(const char* function, const std::string &error_desc, bool stack_trace /* = false*/) {\n\tint32_t scriptId;\n\tint32_t callbackId;\n\tbool timerEvent;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "efb58b6d1af45add5109614cfc6a028e98c0d446dca4cda8c1d95d3ffbd84051" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'callbackId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 112, + "startColumn": 10, + "charOffset": 3486, + "charLength": 10, + "snippet": { + "text": "callbackId" + } + }, + "contextRegion": { + "startLine": 110, + "startColumn": 10, + "charOffset": 3335, + "charLength": 10, + "snippet": { + "text": "void LuaFunctionsLoader::reportError(const char* function, const std::string &error_desc, bool stack_trace /* = false*/) {\n\tint32_t scriptId;\n\tint32_t callbackId;\n\tbool timerEvent;\n\tLuaScriptInterface* scriptInterface;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60d72c6edbd02c22baa48a91d159a6f9cc33867f4aaf7ebadf4588d91fd7c5a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'timerEvent' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 113, + "startColumn": 7, + "charOffset": 3504, + "charLength": 10, + "snippet": { + "text": "timerEvent" + } + }, + "contextRegion": { + "startLine": 111, + "startColumn": 7, + "charOffset": 3458, + "charLength": 10, + "snippet": { + "text": "\tint32_t scriptId;\n\tint32_t callbackId;\n\tbool timerEvent;\n\tLuaScriptInterface* scriptInterface;\n\tgetScriptEnv()->getEventInfo(scriptId, scriptInterface, callbackId, timerEvent);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "825ddd2f5248520c8a00bb1a3e3c28a3ef5311400966c7b23db378c8e99efcb7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'scriptInterface' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 114, + "startColumn": 22, + "charOffset": 3537, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 112, + "startColumn": 22, + "charOffset": 3477, + "charLength": 15, + "snippet": { + "text": "\tint32_t callbackId;\n\tbool timerEvent;\n\tLuaScriptInterface* scriptInterface;\n\tgetScriptEnv()->getEventInfo(scriptId, scriptInterface, callbackId, timerEvent);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1a178e65ba63239ec3fe7f51930713ad1b089f6afab9f4adfbf71fdb16b80950" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 120, + "startColumn": 6, + "charOffset": 3767, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 6, + "charOffset": 3664, + "charLength": 15, + "snippet": { + "text": "\tlogMsg << \"Lua Script Error Detected\\n\";\n\tlogMsg << \"---------------------------------------\\n\";\n\tif (scriptInterface) {\n\t\tlogMsg << \"Interface: \" << scriptInterface->getInterfaceName() << \"\\n\";\n\t\tif (scriptId) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "365a6b64a9815a6d5e466bf5bb46a2cba639e1299388c52d20bc695605b15215" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'LuaScriptInterface *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 120, + "startColumn": 6, + "charOffset": 3767, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 6, + "charOffset": 3664, + "charLength": 15, + "snippet": { + "text": "\tlogMsg << \"Lua Script Error Detected\\n\";\n\tlogMsg << \"---------------------------------------\\n\";\n\tif (scriptInterface) {\n\t\tlogMsg << \"Interface: \" << scriptInterface->getInterfaceName() << \"\\n\";\n\t\tif (scriptId) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1e9a4c5f9c5a553740291450f427959c9a10e8894c98cb5bcbc156a148fc845d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 122, + "startColumn": 7, + "charOffset": 3866, + "charLength": 8, + "snippet": { + "text": "scriptId" + } + }, + "contextRegion": { + "startLine": 120, + "startColumn": 7, + "charOffset": 3762, + "charLength": 8, + "snippet": { + "text": "\tif (scriptInterface) {\n\t\tlogMsg << \"Interface: \" << scriptInterface->getInterfaceName() << \"\\n\";\n\t\tif (scriptId) {\n\t\t\tlogMsg << \"Script ID: \" << scriptInterface->getFileById(scriptId) << \"\\n\";\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be9b11acbe97ea6ee0a9e120fa48cdcf78440d954fef1d4871c0f445eec650d7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 122, + "startColumn": 7, + "charOffset": 3866, + "charLength": 8, + "snippet": { + "text": "scriptId" + } + }, + "contextRegion": { + "startLine": 120, + "startColumn": 7, + "charOffset": 3762, + "charLength": 8, + "snippet": { + "text": "\tif (scriptInterface) {\n\t\tlogMsg << \"Interface: \" << scriptInterface->getInterfaceName() << \"\\n\";\n\t\tif (scriptId) {\n\t\t\tlogMsg << \"Script ID: \" << scriptInterface->getFileById(scriptId) << \"\\n\";\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8dadb60d109bb781caf475be320b4b02c3f67222d2e6ab36f1d3fb6cc8f72be9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 128, + "startColumn": 7, + "charOffset": 4025, + "charLength": 10, + "snippet": { + "text": "callbackId" + } + }, + "contextRegion": { + "startLine": 126, + "startColumn": 7, + "charOffset": 3980, + "charLength": 10, + "snippet": { + "text": "\t\t\tlogMsg << \"Timer Event: Yes\\n\";\n\t\t}\n\t\tif (callbackId) {\n\t\t\tlogMsg << \"Callback ID: \" << scriptInterface->getFileById(callbackId) << \"\\n\";\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21248d548b2927919d91e446d02af34d2354468f1dff1b820a9223be96140249" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int32_t' (aka 'int') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 128, + "startColumn": 7, + "charOffset": 4025, + "charLength": 10, + "snippet": { + "text": "callbackId" + } + }, + "contextRegion": { + "startLine": 126, + "startColumn": 7, + "charOffset": 3980, + "charLength": 10, + "snippet": { + "text": "\t\t\tlogMsg << \"Timer Event: Yes\\n\";\n\t\t}\n\t\tif (callbackId) {\n\t\t\tlogMsg << \"Callback ID: \" << scriptInterface->getFileById(callbackId) << \"\\n\";\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ed8462d38992b3ceac97ed903185e7e9f2d4a72e564393d3dc67d3ec4dc3a2b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 132, + "startColumn": 6, + "charOffset": 4133, + "charLength": 8, + "snippet": { + "text": "function" + } + }, + "contextRegion": { + "startLine": 130, + "startColumn": 6, + "charOffset": 4121, + "charLength": 8, + "snippet": { + "text": "\t\t}\n\t}\n\tif (function && strcmp(function, \"N/A\") != 0) {\n\t\tlogMsg << \"Function: \" << function << \"\\n\";\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27527a250c1b9807de6b464db8b45ad81e4bdb29567a872a52576d5658052c57" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const char *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 132, + "startColumn": 6, + "charOffset": 4133, + "charLength": 8, + "snippet": { + "text": "function" + } + }, + "contextRegion": { + "startLine": 130, + "startColumn": 6, + "charOffset": 4121, + "charLength": 8, + "snippet": { + "text": "\t\t}\n\t}\n\tif (function && strcmp(function, \"N/A\") != 0) {\n\t\tlogMsg << \"Function: \" << function << \"\\n\";\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "856c5575b62ef12c061cbb722108f6c69dd15d102097b6e8993ec588f0101efc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 132, + "startColumn": 15, + "charOffset": 4142, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 130, + "startColumn": 15, + "charOffset": 4121, + "charLength": 2, + "snippet": { + "text": "\t\t}\n\t}\n\tif (function && strcmp(function, \"N/A\") != 0) {\n\t\tlogMsg << \"Function: \" << function << \"\\n\";\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad07cb1ddec15d69d3f64040b1ba4e9db3c800cc3d5a167e1be06aae74cf96c9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 136, + "startColumn": 6, + "charOffset": 4287, + "charLength": 11, + "snippet": { + "text": "stack_trace" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 6, + "charOffset": 4223, + "charLength": 11, + "snippet": { + "text": "\t}\n\tlogMsg << \"Error Description: \" << error_desc << \"\\n\";\n\tif (stack_trace && scriptInterface) {\n\t\tstd::string stackTrace = scriptInterface->getStackTrace(error_desc);\n\t\tif (!stackTrace.empty() && stackTrace != \"N/A\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eecbf85670cf0913386ef39b9cf6dc2b577bf6381d830eeae43c797d89c57145" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 136, + "startColumn": 18, + "charOffset": 4299, + "charLength": 2, + "snippet": { + "text": "&&" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 18, + "charOffset": 4223, + "charLength": 2, + "snippet": { + "text": "\t}\n\tlogMsg << \"Error Description: \" << error_desc << \"\\n\";\n\tif (stack_trace && scriptInterface) {\n\t\tstd::string stackTrace = scriptInterface->getStackTrace(error_desc);\n\t\tif (!stackTrace.empty() && stackTrace != \"N/A\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ece07ec2e57887810a00fd733a24a25a15b716a0814f9a22903033aa7a9119e2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'LuaScriptInterface *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 136, + "startColumn": 21, + "charOffset": 4302, + "charLength": 15, + "snippet": { + "text": "scriptInterface" + } + }, + "contextRegion": { + "startLine": 134, + "startColumn": 21, + "charOffset": 4223, + "charLength": 15, + "snippet": { + "text": "\t}\n\tlogMsg << \"Error Description: \" << error_desc << \"\\n\";\n\tif (stack_trace && scriptInterface) {\n\t\tstd::string stackTrace = scriptInterface->getStackTrace(error_desc);\n\t\tif (!stackTrace.empty() && stackTrace != \"N/A\") {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70f3283700ca91a2b62ab2ef190728377441f38343f3a0493e43dd35882a9a17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto interface' can be declared as 'auto *interface'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 150, + "startColumn": 2, + "charOffset": 4710, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 148, + "startColumn": 2, + "charOffset": 4604, + "charLength": 4, + "snippet": { + "text": "int LuaFunctionsLoader::luaErrorHandler(lua_State* L) {\n\tconst std::string &errorMessage = popString(L);\n\tauto interface = getScriptEnv()->getScriptInterface();\n\tif (!interface) {\n\t\tg_logger().error(\"[{}]: LuaScriptInterface not found, error: {}\", __FUNCTION__, errorMessage);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7ce7219937b2a942648247538b775578882815aefbe35e7f08c5b87249d1a749" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 151, + "startColumn": 6, + "charOffset": 4770, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 149, + "startColumn": 6, + "charOffset": 4660, + "charLength": 1, + "snippet": { + "text": "\tconst std::string &errorMessage = popString(L);\n\tauto interface = getScriptEnv()->getScriptInterface();\n\tif (!interface) {\n\t\tg_logger().error(\"[{}]: LuaScriptInterface not found, error: {}\", __FUNCTION__, errorMessage);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "27ac3a3534c4a8eafbaf9134d46229015a1b78a97b1ea9fcbf9a480a13f1cebb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'LuaScriptInterface *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 151, + "startColumn": 7, + "charOffset": 4771, + "charLength": 9, + "snippet": { + "text": "interface" + } + }, + "contextRegion": { + "startLine": 149, + "startColumn": 7, + "charOffset": 4660, + "charLength": 9, + "snippet": { + "text": "\tconst std::string &errorMessage = popString(L);\n\tauto interface = getScriptEnv()->getScriptInterface();\n\tif (!interface) {\n\t\tg_logger().error(\"[{}]: LuaScriptInterface not found, error: {}\", __FUNCTION__, errorMessage);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c90ab47a178b01005e0c6a59908bad2b8f3c1e7bcd6e9398b0b4683b7dd9e648" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 162, + "startColumn": 6, + "charOffset": 5125, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 160, + "startColumn": 6, + "charOffset": 5043, + "charLength": 25, + "snippet": { + "text": "\nvoid LuaFunctionsLoader::pushVariant(lua_State* L, const LuaVariant &var) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3bcaec47b62379d1ad5d8cf0e00956619b4ca5fa0459db46dd4019ab29dada0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 162, + "startColumn": 6, + "charOffset": 5125, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 160, + "startColumn": 6, + "charOffset": 5043, + "charLength": 25, + "snippet": { + "text": "\nvoid LuaFunctionsLoader::pushVariant(lua_State* L, const LuaVariant &var) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c16b7e90963e4ed729b97dc4976c085101dc6d6634c12ed7c35e0a3b743f040f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 167, + "startColumn": 22, + "charOffset": 5230, + "charLength": 3, + "snippet": { + "text": "var" + } + }, + "contextRegion": { + "startLine": 165, + "startColumn": 22, + "charOffset": 5181, + "charLength": 3, + "snippet": { + "text": "\n\tlua_createtable(L, 0, 4);\n\tsetField(L, \"type\", var.type);\n\tswitch (var.type) {\n\t\tcase VARIANT_NUMBER:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f27cf2f0c07070eeb111621bd9b3db31299f5dc05ee9cc7b3aee197524a9f85" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 170, + "startColumn": 26, + "charOffset": 5310, + "charLength": 3, + "snippet": { + "text": "var" + } + }, + "contextRegion": { + "startLine": 168, + "startColumn": 26, + "charOffset": 5241, + "charLength": 3, + "snippet": { + "text": "\tswitch (var.type) {\n\t\tcase VARIANT_NUMBER:\n\t\t\tsetField(L, \"number\", var.number);\n\t\t\tbreak;\n\t\tcase VARIANT_STRING:" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1b4ed2745defca88cf0db5d22e142086dfc9d13cd9fa2b6356cf98a7ce00275a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 176, + "startColumn": 3, + "charOffset": 5435, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 174, + "startColumn": 3, + "charOffset": 5392, + "charLength": 4, + "snippet": { + "text": "\t\t\tbreak;\n\t\tcase VARIANT_TARGETPOSITION:\n\t\tcase VARIANT_POSITION: {\n\t\t\tpushPosition(L, var.pos);\n\t\t\tlua_setfield(L, -2, \"pos\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed3216f30b6abef93a64022f0464a78836192a91fee78d3fa01cfd0fe9e7320d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 189, + "startColumn": 73, + "charOffset": 5752, + "charLength": 5, + "snippet": { + "text": "thing" + } + }, + "contextRegion": { + "startLine": 187, + "startColumn": 73, + "charOffset": 5677, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid LuaFunctionsLoader::pushThing(lua_State* L, std::shared_ptr thing) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "05ef9c1bab7c32ee959d54ba69fc6ebcd9e1a28f0513ae26cd1277764b51cb3b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 190, + "startColumn": 6, + "charOffset": 5766, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 188, + "startColumn": 6, + "charOffset": 5679, + "charLength": 25, + "snippet": { + "text": "\nvoid LuaFunctionsLoader::pushThing(lua_State* L, std::shared_ptr thing) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ae752a0cd490b3a57c2cd26161695b79a4db9d25f8069cc6ebe0ffcb844d836" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 190, + "startColumn": 6, + "charOffset": 5766, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 188, + "startColumn": 6, + "charOffset": 5679, + "charLength": 25, + "snippet": { + "text": "\nvoid LuaFunctionsLoader::pushThing(lua_State* L, std::shared_ptr thing) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "430da72163de9b5037241d25d9f665ba0d9bb9d038b501dd7c3e3b76368ff845" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 194, + "startColumn": 6, + "charOffset": 5828, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 192, + "startColumn": 6, + "charOffset": 5819, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tif (!thing) {\n\t\tlua_createtable(L, 0, 4);\n\t\tsetField(L, \"uid\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b5aa5c0388c36e171cab90112d6d9eebd6dab54321887bdd5b7003e325edc5d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 196, + "startColumn": 22, + "charOffset": 5887, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 194, + "startColumn": 22, + "charOffset": 5823, + "charLength": 1, + "snippet": { + "text": "\tif (!thing) {\n\t\tlua_createtable(L, 0, 4);\n\t\tsetField(L, \"uid\", 0);\n\t\tsetField(L, \"itemid\", 0);\n\t\tsetField(L, \"actionid\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea249af6acabc413a85f8edb28d4ce60672276b8b2b581152b9003f8fffcd0a6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 197, + "startColumn": 25, + "charOffset": 5915, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 195, + "startColumn": 25, + "charOffset": 5838, + "charLength": 1, + "snippet": { + "text": "\t\tlua_createtable(L, 0, 4);\n\t\tsetField(L, \"uid\", 0);\n\t\tsetField(L, \"itemid\", 0);\n\t\tsetField(L, \"actionid\", 0);\n\t\tsetField(L, \"type\", 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "270d9890c56eb05fc998685976593b152040fdf4b2f6703370003ea7ab717b40" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 198, + "startColumn": 27, + "charOffset": 5945, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 196, + "startColumn": 27, + "charOffset": 5866, + "charLength": 1, + "snippet": { + "text": "\t\tsetField(L, \"uid\", 0);\n\t\tsetField(L, \"itemid\", 0);\n\t\tsetField(L, \"actionid\", 0);\n\t\tsetField(L, \"type\", 0);\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b3bdabff47b99cc24f26cf34e00a5eb0f9f5f71e81f95ade3d5d77dccd5800f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 199, + "startColumn": 23, + "charOffset": 5971, + "charLength": 1, + "snippet": { + "text": "0" + } + }, + "contextRegion": { + "startLine": 197, + "startColumn": 23, + "charOffset": 5891, + "charLength": 1, + "snippet": { + "text": "\t\tsetField(L, \"itemid\", 0);\n\t\tsetField(L, \"actionid\", 0);\n\t\tsetField(L, \"type\", 0);\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "55a99f7ae9dec077b37780117c187e7e4b6762fb4ceb229548aed44497fd9000" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 214, + "startColumn": 79, + "charOffset": 6372, + "charLength": 8, + "snippet": { + "text": "cylinder" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 79, + "charOffset": 6291, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid LuaFunctionsLoader::pushCylinder(lua_State* L, std::shared_ptr cylinder) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "70ac3b6728732370a83d22667bb3e71f03b604189964e21cfaad84b2bbaa0bae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 215, + "startColumn": 6, + "charOffset": 6389, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 213, + "startColumn": 6, + "charOffset": 6293, + "charLength": 25, + "snippet": { + "text": "\nvoid LuaFunctionsLoader::pushCylinder(lua_State* L, std::shared_ptr cylinder) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e173d1afdb2e3e348890e50a8ed75f0a8eb337acec2eed71837a6b279e3a13b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 215, + "startColumn": 6, + "charOffset": 6389, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 213, + "startColumn": 6, + "charOffset": 6293, + "charLength": 25, + "snippet": { + "text": "\nvoid LuaFunctionsLoader::pushCylinder(lua_State* L, std::shared_ptr cylinder) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ce16712288263da055c5b1ab3c2a575dc15b4a60e108ae163f65762dfcf04a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 236, + "startColumn": 6, + "charOffset": 7068, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 234, + "startColumn": 6, + "charOffset": 6984, + "charLength": 25, + "snippet": { + "text": "\nvoid LuaFunctionsLoader::pushString(lua_State* L, const std::string &value) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c6144d95067566e99d3e11d479061773ebc57f6eceb6225611eb59d538152d08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 236, + "startColumn": 6, + "charOffset": 7068, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 234, + "startColumn": 6, + "charOffset": 6984, + "charLength": 25, + "snippet": { + "text": "\nvoid LuaFunctionsLoader::pushString(lua_State* L, const std::string &value) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "50f0e350efb07c0bb31b65977f5fef5d1011a7bcc2edf9d73157bd89df6f885a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 244, + "startColumn": 6, + "charOffset": 7257, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 6, + "charOffset": 7179, + "charLength": 25, + "snippet": { + "text": "\nvoid LuaFunctionsLoader::pushCallback(lua_State* L, int32_t callback) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72bad42c65bb0177e4093563e7ecf7623209f0c5e1948a790491bc17dd9f13e9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 244, + "startColumn": 6, + "charOffset": 7257, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 242, + "startColumn": 6, + "charOffset": 7179, + "charLength": 25, + "snippet": { + "text": "\nvoid LuaFunctionsLoader::pushCallback(lua_State* L, int32_t callback) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c35d404158de84586a48a58d3c19298e5f2de885a1d2f20a06ad4d095f1873f1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-return-braced-init-list", + "ruleIndex": 630, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 253, + "startColumn": 10, + "charOffset": 7457, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 251, + "startColumn": 10, + "charOffset": 7363, + "charLength": 3, + "snippet": { + "text": "std::string LuaFunctionsLoader::popString(lua_State* L) {\n\tif (lua_gettop(L) == 0) {\n\t\treturn std::string();\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a715dac26aa86b5216fa03b0fcd6b2dc0d301f7a90e3cd87670641a86b9019f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 267, + "startColumn": 6, + "charOffset": 7756, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 265, + "startColumn": 6, + "charOffset": 7643, + "charLength": 25, + "snippet": { + "text": "// Metatables\nvoid LuaFunctionsLoader::setMetatable(lua_State* L, int32_t index, const std::string &name) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7bc3ddc6cc6027ce332cb0be2fa4b0d134ba1f03a0acaa34c99c1d2854003e8f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 267, + "startColumn": 6, + "charOffset": 7756, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 265, + "startColumn": 6, + "charOffset": 7643, + "charLength": 25, + "snippet": { + "text": "// Metatables\nvoid LuaFunctionsLoader::setMetatable(lua_State* L, int32_t index, const std::string &name) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "801c8aeb0b9c10a48ccec2036e3f529409a7ddb6eb04bd9215d325f939011d67" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 272, + "startColumn": 2, + "charOffset": 7851, + "charLength": 16, + "snippet": { + "text": "lua_setmetatable" + } + }, + "contextRegion": { + "startLine": 270, + "startColumn": 2, + "charOffset": 7812, + "charLength": 16, + "snippet": { + "text": "\n\tluaL_getmetatable(L, name.c_str());\n\tlua_setmetatable(L, index - 1);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4b254cc3916fb37f1c7f827e5fdd6a8723df335b2d16d72717766d1108ad6601" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 277, + "startColumn": 6, + "charOffset": 8048, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 275, + "startColumn": 6, + "charOffset": 7886, + "charLength": 25, + "snippet": { + "text": "void LuaFunctionsLoader::setWeakMetatable(lua_State* L, int32_t index, const std::string &name) {\n\tstatic phmap::flat_hash_set weakObjectTypes;\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "23af6a1d750876c4a1960404812f6da2f7180ea398ed4fa153fa402c772da0ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 277, + "startColumn": 6, + "charOffset": 8048, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 275, + "startColumn": 6, + "charOffset": 7886, + "charLength": 25, + "snippet": { + "text": "void LuaFunctionsLoader::setWeakMetatable(lua_State* L, int32_t index, const std::string &name) {\n\tstatic phmap::flat_hash_set weakObjectTypes;\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b736e771a18d6ef340c3218041fb3477321ac078374d59c5fc07211c3c4e31ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 288, + "startColumn": 3, + "charOffset": 8300, + "charLength": 17, + "snippet": { + "text": "luaL_newmetatable" + } + }, + "contextRegion": { + "startLine": 286, + "startColumn": 3, + "charOffset": 8259, + "charLength": 17, + "snippet": { + "text": "\t\tint childMetatable = lua_gettop(L);\n\n\t\tluaL_newmetatable(L, weakName.c_str());\n\t\tint metatable = lua_gettop(L);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f165dbaae98f6acba6af430694bd572d74396525d613cbe62ad0b0b8c34cccd6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 291, + "startColumn": 3, + "charOffset": 8376, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 289, + "startColumn": 3, + "charOffset": 8340, + "charLength": 3, + "snippet": { + "text": "\t\tint metatable = lua_gettop(L);\n\n\t\tfor (static const std::vector methodKeys = { \"__index\", \"__metatable\", \"__eq\" };\n\t\t const std::string &metaKey : methodKeys) {\n\t\t\tlua_getfield(L, childMetatable, metaKey.c_str());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66d06d23c71f8388148d9b14fea57850909919651786c680dd4b78ea47d8f099" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 297, + "startColumn": 3, + "charOffset": 8628, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 295, + "startColumn": 3, + "charOffset": 8621, + "charLength": 3, + "snippet": { + "text": "\t\t}\n\n\t\tfor (static const std::vector methodIndexes = { 'h', 'p', 't' };\n\t\t int metaIndex : methodIndexes) {\n\t\t\tlua_rawgeti(L, childMetatable, metaIndex);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a5025ebeeaae25b2375bae52cac4be404154b1d31d96b885fc16e34c461381ed" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 310, + "startColumn": 2, + "charOffset": 8976, + "charLength": 16, + "snippet": { + "text": "lua_setmetatable" + } + }, + "contextRegion": { + "startLine": 308, + "startColumn": 2, + "charOffset": 8930, + "charLength": 16, + "snippet": { + "text": "\t\tluaL_getmetatable(L, weakName.c_str());\n\t}\n\tlua_setmetatable(L, index - 1);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22706618119bc7440d50230091ef493eb87535a9eb8e6265d3f78425e8890936" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 313, + "startColumn": 94, + "charOffset": 9104, + "charLength": 4, + "snippet": { + "text": "item" + } + }, + "contextRegion": { + "startLine": 311, + "startColumn": 94, + "charOffset": 9008, + "charLength": 4, + "snippet": { + "text": "}\n\nvoid LuaFunctionsLoader::setItemMetatable(lua_State* L, int32_t index, std::shared_ptr item) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65cd712ad197997ed7c59051c9d3de3b7657ce93ec1d11f0efbd11e570ca591b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 314, + "startColumn": 6, + "charOffset": 9117, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 312, + "startColumn": 6, + "charOffset": 9010, + "charLength": 25, + "snippet": { + "text": "\nvoid LuaFunctionsLoader::setItemMetatable(lua_State* L, int32_t index, std::shared_ptr item) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c792f7a398a7e2dac9e37ebb615c542102d3ce315559ec02b870720e70b61e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 314, + "startColumn": 6, + "charOffset": 9117, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 312, + "startColumn": 6, + "charOffset": 9010, + "charLength": 25, + "snippet": { + "text": "\nvoid LuaFunctionsLoader::setItemMetatable(lua_State* L, int32_t index, std::shared_ptr item) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "607b213acc979213294fed63f94f6070a265e4340e34770ba5240a64908995fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 325, + "startColumn": 2, + "charOffset": 9373, + "charLength": 16, + "snippet": { + "text": "lua_setmetatable" + } + }, + "contextRegion": { + "startLine": 323, + "startColumn": 2, + "charOffset": 9337, + "charLength": 16, + "snippet": { + "text": "\t\tluaL_getmetatable(L, \"Item\");\n\t}\n\tlua_setmetatable(L, index - 1);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6b5f33c29c1d01492995ea7d95cd7a02cfd0753114824456280c36287c3f1a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-unnecessary-value-param", + "ruleIndex": 683, + "kind": "fail", + "level": "warning", + "message": { + "text": "the parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 328, + "startColumn": 102, + "charOffset": 9509, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 326, + "startColumn": 102, + "charOffset": 9405, + "charLength": 8, + "snippet": { + "text": "}\n\nvoid LuaFunctionsLoader::setCreatureMetatable(lua_State* L, int32_t index, std::shared_ptr creature) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3627a1f0065bc4858b438e57d24e89005d5b6681bf3d5e567dcb6e1e70be673f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 329, + "startColumn": 6, + "charOffset": 9526, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 327, + "startColumn": 6, + "charOffset": 9407, + "charLength": 25, + "snippet": { + "text": "\nvoid LuaFunctionsLoader::setCreatureMetatable(lua_State* L, int32_t index, std::shared_ptr creature) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cfc5f867796fded81f8608062898ef517b1cec1f58c12d10834c2118be3a60ca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 329, + "startColumn": 6, + "charOffset": 9526, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 327, + "startColumn": 6, + "charOffset": 9407, + "charLength": 25, + "snippet": { + "text": "\nvoid LuaFunctionsLoader::setCreatureMetatable(lua_State* L, int32_t index, std::shared_ptr creature) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ca8bcd08a52578352ebe96ae7b7f1717a2cea1edb7630f216f86ee46732e580" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 340, + "startColumn": 2, + "charOffset": 9789, + "charLength": 16, + "snippet": { + "text": "lua_setmetatable" + } + }, + "contextRegion": { + "startLine": 338, + "startColumn": 2, + "charOffset": 9754, + "charLength": 16, + "snippet": { + "text": "\t\tluaL_getmetatable(L, \"Npc\");\n\t}\n\tlua_setmetatable(L, index - 1);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cd7b9b713f9641da775b22bce2b52651445e4c083db4df1db19bc9f956a839ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 360, + "startColumn": 2, + "charOffset": 10366, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 358, + "startColumn": 2, + "charOffset": 10306, + "charLength": 3, + "snippet": { + "text": "\tfmt::dynamic_format_arg_store args;\n\n\tfor (int i = 2; i <= n; i++) {\n\t\tif (isString(L, i)) {\n\t\t\targs.push_back(lua_tostring(L, i));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "164faa1d6ac1cb66e1c6f75490f621e1b3b778b6d334ed8bc6fc28582e456d94" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'n' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 360, + "startColumn": 18, + "charOffset": 10382, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 358, + "startColumn": 18, + "charOffset": 10306, + "charLength": 1, + "snippet": { + "text": "\tfmt::dynamic_format_arg_store args;\n\n\tfor (int i = 2; i <= n; i++) {\n\t\tif (isString(L, i)) {\n\t\t\targs.push_back(lua_tostring(L, i));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c49ed428c54663c29defdb9823a7c749fa282f6c681b02236f4ae895be72a75" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-14", + "ruleIndex": 426, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-14: The first operand of a conditional-operator shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 366, + "startColumn": 19, + "charOffset": 10580, + "charLength": 13, + "snippet": { + "text": "lua_toboolean" + } + }, + "contextRegion": { + "startLine": 364, + "startColumn": 19, + "charOffset": 10491, + "charLength": 13, + "snippet": { + "text": "\t\t\targs.push_back(lua_tonumber(L, i));\n\t\t} else if (isBoolean(L, i)) {\n\t\t\targs.push_back(lua_toboolean(L, i) ? \"true\" : \"false\");\n\t\t} else if (isUserdata(L, i)) {\n\t\t\tLuaData_t userType = getUserdataType(L, i);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9831bae23a43d00f625392b508f9b82a0581a964705dd37c0e0f06bc98d63b04" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 366, + "startColumn": 19, + "charOffset": 10580, + "charLength": 13, + "snippet": { + "text": "lua_toboolean" + } + }, + "contextRegion": { + "startLine": 364, + "startColumn": 19, + "charOffset": 10491, + "charLength": 13, + "snippet": { + "text": "\t\t\targs.push_back(lua_tonumber(L, i));\n\t\t} else if (isBoolean(L, i)) {\n\t\t\targs.push_back(lua_toboolean(L, i) ? \"true\" : \"false\");\n\t\t} else if (isUserdata(L, i)) {\n\t\t\tLuaData_t userType = getUserdataType(L, i);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4c350719cfd50ce93bafa2c929c92002707ae84e423de9b803432c996967f0d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 385, + "startColumn": 3, + "charOffset": 11162, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 383, + "startColumn": 3, + "charOffset": 11051, + "charLength": 15, + "snippet": { + "text": "\t} catch (const fmt::format_error &e) {\n\t\tg_logger().debug(\"[{}] format error: {}\", __FUNCTION__, e.what());\n\t\treportErrorFunc(fmt::format(\"Format error, {}\", e.what()));\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1e30bdafecbd03201dbe91acd1edbf19f2737027d9d23a36d5eaedafb6ecc02" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'len' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 392, + "startColumn": 9, + "charOffset": 11320, + "charLength": 3, + "snippet": { + "text": "len" + } + }, + "contextRegion": { + "startLine": 390, + "startColumn": 9, + "charOffset": 11240, + "charLength": 3, + "snippet": { + "text": "\nstd::string LuaFunctionsLoader::getString(lua_State* L, int32_t arg) {\n\tsize_t len;\n\tconst char* c_str = lua_tolstring(L, arg, &len);\n\tif (!c_str || len == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0713cbf72ffdfbbd30cf4d692e1842c51dd952569023fb673f2ed4b140970614" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 394, + "startColumn": 6, + "charOffset": 11380, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 392, + "startColumn": 6, + "charOffset": 11312, + "charLength": 1, + "snippet": { + "text": "\tsize_t len;\n\tconst char* c_str = lua_tolstring(L, arg, &len);\n\tif (!c_str || len == 0) {\n\t\treturn std::string();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f7c34045f3982ef5c957aa389a119b36389d7df507b37b6b5f016fc7497bf931" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const char *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 394, + "startColumn": 7, + "charOffset": 11381, + "charLength": 5, + "snippet": { + "text": "c_str" + } + }, + "contextRegion": { + "startLine": 392, + "startColumn": 7, + "charOffset": 11312, + "charLength": 5, + "snippet": { + "text": "\tsize_t len;\n\tconst char* c_str = lua_tolstring(L, arg, &len);\n\tif (!c_str || len == 0) {\n\t\treturn std::string();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0e86a726ac5011b8c36bd8b68a59f12391f8dbe910541da49ec5230194c62ce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-return-braced-init-list", + "ruleIndex": 630, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 395, + "startColumn": 10, + "charOffset": 11411, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 393, + "startColumn": 10, + "charOffset": 11325, + "charLength": 3, + "snippet": { + "text": "\tconst char* c_str = lua_tolstring(L, arg, &len);\n\tif (!c_str || len == 0) {\n\t\treturn std::string();\n\t}\n\treturn std::string(c_str, len);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "222253422921f9365fa8125e9b5fb08a2a734ccac206d5dcb5fb84741ed5f321" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "modernize-return-braced-init-list", + "ruleIndex": 630, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid repeating the return type from the declaration; use a braced initializer list instead" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 397, + "startColumn": 9, + "charOffset": 11437, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 395, + "startColumn": 9, + "charOffset": 11402, + "charLength": 3, + "snippet": { + "text": "\t\treturn std::string();\n\t}\n\treturn std::string(c_str, len);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9aca2ea71c716a05c3d676677fb18fa251cf72b359b3c7b91d31ad0124007fea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-4", + "ruleIndex": 451, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-4: A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 467, + "startColumn": 3, + "charOffset": 13615, + "charLength": 4, + "snippet": { + "text": "case" + } + }, + "contextRegion": { + "startLine": 465, + "startColumn": 3, + "charOffset": 13587, + "charLength": 4, + "snippet": { + "text": "\n\t\tcase VARIANT_POSITION:\n\t\tcase VARIANT_TARGETPOSITION: {\n\t\t\tlua_getfield(L, arg, \"pos\");\n\t\t\tvar.pos = getPosition(L, lua_gettop(L));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58a6ff22fe80d6183f5d44117fc12804d80f42e8544ce702dc43355fdde044dd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 525, + "startColumn": 2, + "charOffset": 15089, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 523, + "startColumn": 2, + "charOffset": 14971, + "charLength": 2, + "snippet": { + "text": "\nstd::shared_ptr LuaFunctionsLoader::getPlayer(lua_State* L, int32_t arg, bool allowOffline /* = false */) {\n\tif (isUserdata(L, arg)) {\n\t\treturn getUserdataShared(L, arg);\n\t} else if (isNumber(L, arg)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "912ab82500a729519c54207142f0d3c541b014ead28fdd30de0b6386df251572" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 527, + "startColumn": 4, + "charOffset": 15162, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 525, + "startColumn": 4, + "charOffset": 15088, + "charLength": 4, + "snippet": { + "text": "\tif (isUserdata(L, arg)) {\n\t\treturn getUserdataShared(L, arg);\n\t} else if (isNumber(L, arg)) {\n\t\treturn g_game().getPlayerByID(getNumber(L, arg), allowOffline);\n\t} else if (isString(L, arg)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afbd31bb7e54d6ecaecffa1c647d3932fc74cf89e1acbd2ac28e9dadf253e275" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 528, + "startColumn": 33, + "charOffset": 15223, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 526, + "startColumn": 33, + "charOffset": 15115, + "charLength": 9, + "snippet": { + "text": "\t\treturn getUserdataShared(L, arg);\n\t} else if (isNumber(L, arg)) {\n\t\treturn g_game().getPlayerByID(getNumber(L, arg), allowOffline);\n\t} else if (isString(L, arg)) {\n\t\treturn g_game().getPlayerByName(getString(L, arg), allowOffline);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "234516fff7dbdf2963f11bddb4ab29871d3827fa1c20e0d50dd97c2a602d7070" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 537, + "startColumn": 2, + "charOffset": 15575, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 535, + "startColumn": 2, + "charOffset": 15459, + "charLength": 2, + "snippet": { + "text": "\nstd::shared_ptr LuaFunctionsLoader::getGuild(lua_State* L, int32_t arg, bool allowOffline /* = false */) {\n\tif (isUserdata(L, arg)) {\n\t\treturn getUserdataShared(L, arg);\n\t} else if (isNumber(L, arg)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "51d14edcdb3def87473c49c50004c8723d598b5392b791e0920d9e6596390478" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 539, + "startColumn": 4, + "charOffset": 15647, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 537, + "startColumn": 4, + "charOffset": 15574, + "charLength": 4, + "snippet": { + "text": "\tif (isUserdata(L, arg)) {\n\t\treturn getUserdataShared(L, arg);\n\t} else if (isNumber(L, arg)) {\n\t\treturn g_game().getGuild(getNumber(L, arg), allowOffline);\n\t} else if (isString(L, arg)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf59d979541a04fd95e75c27256dc6475fd180dadd99fb5c3471497edc45c56a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 540, + "startColumn": 28, + "charOffset": 15703, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 538, + "startColumn": 28, + "charOffset": 15601, + "charLength": 9, + "snippet": { + "text": "\t\treturn getUserdataShared(L, arg);\n\t} else if (isNumber(L, arg)) {\n\t\treturn g_game().getGuild(getNumber(L, arg), allowOffline);\n\t} else if (isString(L, arg)) {\n\t\treturn g_game().getGuildByName(getString(L, arg), allowOffline);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dca0cc6b4f8b585a0aa978ba72ef0249f960fb6c440c738a63a6c31dfe091770" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 571, + "startColumn": 6, + "charOffset": 16559, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 569, + "startColumn": 6, + "charOffset": 16481, + "charLength": 25, + "snippet": { + "text": "// Push\nvoid LuaFunctionsLoader::pushBoolean(lua_State* L, bool value) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d48a139d0596d9af3e450ab13a1c061b095569a7636311bb60bcc9924cfc3f78" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 571, + "startColumn": 6, + "charOffset": 16559, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 569, + "startColumn": 6, + "charOffset": 16481, + "charLength": 25, + "snippet": { + "text": "// Push\nvoid LuaFunctionsLoader::pushBoolean(lua_State* L, bool value) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6cec14d157d2f209aae9c09f873b5530052e9b6473134d3868eb15ab78284bf1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 579, + "startColumn": 6, + "charOffset": 16746, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 577, + "startColumn": 6, + "charOffset": 16654, + "charLength": 25, + "snippet": { + "text": "\nvoid LuaFunctionsLoader::pushCombatDamage(lua_State* L, const CombatDamage &damage) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bbbe97342ac9f15d6e484f3d1208a71b29164e054ae71508c3199f28a0f330bc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 579, + "startColumn": 6, + "charOffset": 16746, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 577, + "startColumn": 6, + "charOffset": 16654, + "charLength": 25, + "snippet": { + "text": "\nvoid LuaFunctionsLoader::pushCombatDamage(lua_State* L, const CombatDamage &damage) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "12283acdf912e78fd1efa0f9246316a445f13f6abbe9733178a5f39ee7f74e6f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 583, + "startColumn": 20, + "charOffset": 16822, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 581, + "startColumn": 20, + "charOffset": 16799, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, damage.primary.value);\n\tlua_pushnumber(L, damage.primary.type);\n\tlua_pushnumber(L, damage.secondary.value);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc67b16bd21d68bd34b60af8334fe189d215adcae371df3571526a38e5cb1c38" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 584, + "startColumn": 20, + "charOffset": 16864, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 582, + "startColumn": 20, + "charOffset": 16802, + "charLength": 6, + "snippet": { + "text": "\n\tlua_pushnumber(L, damage.primary.value);\n\tlua_pushnumber(L, damage.primary.type);\n\tlua_pushnumber(L, damage.secondary.value);\n\tlua_pushnumber(L, damage.secondary.type);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "db89239b58381a336ba80d074c2dc3a5fc8906ac3832ad3db2f223387a297dd5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 585, + "startColumn": 20, + "charOffset": 16905, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 583, + "startColumn": 20, + "charOffset": 16803, + "charLength": 6, + "snippet": { + "text": "\tlua_pushnumber(L, damage.primary.value);\n\tlua_pushnumber(L, damage.primary.type);\n\tlua_pushnumber(L, damage.secondary.value);\n\tlua_pushnumber(L, damage.secondary.type);\n\tlua_pushnumber(L, damage.origin);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7dc9be0fd84cbdeba0bb4ffdc2daf2d935d78c87a8927064f05ccd9f3c2496c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 586, + "startColumn": 20, + "charOffset": 16949, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 584, + "startColumn": 20, + "charOffset": 16845, + "charLength": 6, + "snippet": { + "text": "\tlua_pushnumber(L, damage.primary.type);\n\tlua_pushnumber(L, damage.secondary.value);\n\tlua_pushnumber(L, damage.secondary.type);\n\tlua_pushnumber(L, damage.origin);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "663e323a22f2983413905bb68e7d53f6890e1141a915ce86d6f8369eee23a460" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 587, + "startColumn": 20, + "charOffset": 16992, + "charLength": 6, + "snippet": { + "text": "damage" + } + }, + "contextRegion": { + "startLine": 585, + "startColumn": 20, + "charOffset": 16886, + "charLength": 6, + "snippet": { + "text": "\tlua_pushnumber(L, damage.secondary.value);\n\tlua_pushnumber(L, damage.secondary.type);\n\tlua_pushnumber(L, damage.origin);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "58cbb00fa9ca2cea3377e45f96e2a5d272a9267efdfaf3b2f92ed5f157b5ac6e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 591, + "startColumn": 6, + "charOffset": 17101, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 589, + "startColumn": 6, + "charOffset": 17010, + "charLength": 25, + "snippet": { + "text": "\nvoid LuaFunctionsLoader::pushInstantSpell(lua_State* L, const InstantSpell &spell) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10d2325d3ea69e8ce5cb091128583e448aa4966a8064ad5bd3c058940a7f311d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 591, + "startColumn": 6, + "charOffset": 17101, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 589, + "startColumn": 6, + "charOffset": 17010, + "charLength": 25, + "snippet": { + "text": "\nvoid LuaFunctionsLoader::pushInstantSpell(lua_State* L, const InstantSpell &spell) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d53e4e8ba731065fe26e1fbe67ecdfef3c46ceaaadce3251cffaa60c49946bb4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 595, + "startColumn": 24, + "charOffset": 17181, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 593, + "startColumn": 24, + "charOffset": 17154, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tlua_createtable(L, 0, 6);\n\n\tsetField(L, \"name\", spell.getName());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3afc23eb5265f7ecf8f0bcac7aaa39f3d9969f3839a4f6e14924c90e96bdb91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 599, + "startColumn": 23, + "charOffset": 17288, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 597, + "startColumn": 23, + "charOffset": 17186, + "charLength": 5, + "snippet": { + "text": "\tsetField(L, \"name\", spell.getName());\n\tsetField(L, \"words\", spell.getWords());\n\tsetField(L, \"level\", spell.getLevel());\n\tsetField(L, \"mlevel\", spell.getMagicLevel());\n\tsetField(L, \"mana\", spell.getMana());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "263b47702212893964705bfe917e13f2d1b6121c244e0f46d3f61255bcc21f45" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 600, + "startColumn": 24, + "charOffset": 17330, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 598, + "startColumn": 24, + "charOffset": 17225, + "charLength": 5, + "snippet": { + "text": "\tsetField(L, \"words\", spell.getWords());\n\tsetField(L, \"level\", spell.getLevel());\n\tsetField(L, \"mlevel\", spell.getMagicLevel());\n\tsetField(L, \"mana\", spell.getMana());\n\tsetField(L, \"manapercent\", spell.getManaPercent());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8679d339adf9f648784ca802f00f31c3d7622dad70872225b55596ab666f0a5a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 601, + "startColumn": 22, + "charOffset": 17375, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 599, + "startColumn": 22, + "charOffset": 17266, + "charLength": 5, + "snippet": { + "text": "\tsetField(L, \"level\", spell.getLevel());\n\tsetField(L, \"mlevel\", spell.getMagicLevel());\n\tsetField(L, \"mana\", spell.getMana());\n\tsetField(L, \"manapercent\", spell.getManaPercent());\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7fd543c0130359a44ecba292bb28d3e055ab8cb5882a2baf4a01ad064c7f5b42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 602, + "startColumn": 29, + "charOffset": 17421, + "charLength": 5, + "snippet": { + "text": "spell" + } + }, + "contextRegion": { + "startLine": 600, + "startColumn": 29, + "charOffset": 17307, + "charLength": 5, + "snippet": { + "text": "\tsetField(L, \"mlevel\", spell.getMagicLevel());\n\tsetField(L, \"mana\", spell.getMana());\n\tsetField(L, \"manapercent\", spell.getManaPercent());\n\n\tsetMetatable(L, -1, \"Spell\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c13cf792f0c82e291d8178d2a8e401fbc5bb66ec55314b47a1ab8ccffb37bdb1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 608, + "startColumn": 6, + "charOffset": 17593, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 606, + "startColumn": 6, + "charOffset": 17480, + "charLength": 25, + "snippet": { + "text": "\nvoid LuaFunctionsLoader::pushPosition(lua_State* L, const Position &position, int32_t stackpos /* = 0*/) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "21248d548b2927919d91e446d02af34d2354468f1dff1b820a9223be96140249" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 608, + "startColumn": 6, + "charOffset": 17593, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 606, + "startColumn": 6, + "charOffset": 17480, + "charLength": 25, + "snippet": { + "text": "\nvoid LuaFunctionsLoader::pushPosition(lua_State* L, const Position &position, int32_t stackpos /* = 0*/) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5832c73ae99be678d7c6b1011c575e651e65d13fe2464b81c541c1f96737a35e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 614, + "startColumn": 19, + "charOffset": 17696, + "charLength": 8, + "snippet": { + "text": "position" + } + }, + "contextRegion": { + "startLine": 612, + "startColumn": 19, + "charOffset": 17650, + "charLength": 8, + "snippet": { + "text": "\tlua_createtable(L, 0, 4);\n\n\tsetField(L, \"x\", position.x);\n\tsetField(L, \"y\", position.y);\n\tsetField(L, \"z\", position.z);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "645c03e064d27ba842149388d702c5739eac91cc43aa1dc8a0b10f8f9a600b2d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 615, + "startColumn": 19, + "charOffset": 17727, + "charLength": 8, + "snippet": { + "text": "position" + } + }, + "contextRegion": { + "startLine": 613, + "startColumn": 19, + "charOffset": 17677, + "charLength": 8, + "snippet": { + "text": "\n\tsetField(L, \"x\", position.x);\n\tsetField(L, \"y\", position.y);\n\tsetField(L, \"z\", position.z);\n\tsetField(L, \"stackpos\", stackpos);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3576ef40a2cbb4cddfdeb2fd32898b9f7127b59f0ed161cab9f6777bf4acd11b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 616, + "startColumn": 19, + "charOffset": 17758, + "charLength": 8, + "snippet": { + "text": "position" + } + }, + "contextRegion": { + "startLine": 614, + "startColumn": 19, + "charOffset": 17678, + "charLength": 8, + "snippet": { + "text": "\tsetField(L, \"x\", position.x);\n\tsetField(L, \"y\", position.y);\n\tsetField(L, \"z\", position.z);\n\tsetField(L, \"stackpos\", stackpos);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "65b877ac11ad58b0737d7c229025eea1bb3824af1278c39bfd054bb0db9653bd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 617, + "startColumn": 26, + "charOffset": 17796, + "charLength": 8, + "snippet": { + "text": "stackpos" + } + }, + "contextRegion": { + "startLine": 615, + "startColumn": 26, + "charOffset": 17709, + "charLength": 8, + "snippet": { + "text": "\tsetField(L, \"y\", position.y);\n\tsetField(L, \"z\", position.z);\n\tsetField(L, \"stackpos\", stackpos);\n\n\tsetMetatable(L, -1, \"Position\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6534c762f3342d280a372a8a3bfd3e32a1bacf491b0fd6852ce9bd868ed5c2f8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 623, + "startColumn": 6, + "charOffset": 17926, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 621, + "startColumn": 6, + "charOffset": 17844, + "charLength": 25, + "snippet": { + "text": "\nvoid LuaFunctionsLoader::pushOutfit(lua_State* L, const Outfit_t &outfit) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "087a044dac8a13c0df1bf4844491e5c183398487190047179ca5cbf842887cc1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 623, + "startColumn": 6, + "charOffset": 17926, + "charLength": 25, + "snippet": { + "text": "validateDispatcherContext" + } + }, + "contextRegion": { + "startLine": 621, + "startColumn": 6, + "charOffset": 17844, + "charLength": 25, + "snippet": { + "text": "\nvoid LuaFunctionsLoader::pushOutfit(lua_State* L, const Outfit_t &outfit) {\n\tif (validateDispatcherContext(__FUNCTION__)) {\n\t\treturn;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "158904cadddb3eb38b8a61b93e4502015267c2d579e62c73c03ce9bd0ef4bda1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "13 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 627, + "startColumn": 24, + "charOffset": 18006, + "charLength": 2, + "snippet": { + "text": "13" + } + }, + "contextRegion": { + "startLine": 625, + "startColumn": 24, + "charOffset": 17979, + "charLength": 2, + "snippet": { + "text": "\t}\n\n\tlua_createtable(L, 0, 13);\n\tsetField(L, \"lookType\", outfit.lookType);\n\tsetField(L, \"lookTypeEx\", outfit.lookTypeEx);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6e2dac73752ff6584813545a7839927a75c6c82f4db896b2c87ce6e7353e2816" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 628, + "startColumn": 26, + "charOffset": 18036, + "charLength": 6, + "snippet": { + "text": "outfit" + } + }, + "contextRegion": { + "startLine": 626, + "startColumn": 26, + "charOffset": 17982, + "charLength": 6, + "snippet": { + "text": "\n\tlua_createtable(L, 0, 13);\n\tsetField(L, \"lookType\", outfit.lookType);\n\tsetField(L, \"lookTypeEx\", outfit.lookTypeEx);\n\tsetField(L, \"lookHead\", outfit.lookHead);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "781d8d46c6653f71e9fa728390fd925160b7cd7390e277a61c45e424151aeac9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 629, + "startColumn": 28, + "charOffset": 18081, + "charLength": 6, + "snippet": { + "text": "outfit" + } + }, + "contextRegion": { + "startLine": 627, + "startColumn": 28, + "charOffset": 17983, + "charLength": 6, + "snippet": { + "text": "\tlua_createtable(L, 0, 13);\n\tsetField(L, \"lookType\", outfit.lookType);\n\tsetField(L, \"lookTypeEx\", outfit.lookTypeEx);\n\tsetField(L, \"lookHead\", outfit.lookHead);\n\tsetField(L, \"lookBody\", outfit.lookBody);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a127487da323c4099a4dfb01dad65aef17a11b87b78eedcf56c92e3f481ae64f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 630, + "startColumn": 26, + "charOffset": 18126, + "charLength": 6, + "snippet": { + "text": "outfit" + } + }, + "contextRegion": { + "startLine": 628, + "startColumn": 26, + "charOffset": 18011, + "charLength": 6, + "snippet": { + "text": "\tsetField(L, \"lookType\", outfit.lookType);\n\tsetField(L, \"lookTypeEx\", outfit.lookTypeEx);\n\tsetField(L, \"lookHead\", outfit.lookHead);\n\tsetField(L, \"lookBody\", outfit.lookBody);\n\tsetField(L, \"lookLegs\", outfit.lookLegs);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02cad75ff1d43a54d797f93fab61350e43363fd713e2a2d3682135580addc61c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 631, + "startColumn": 26, + "charOffset": 18169, + "charLength": 6, + "snippet": { + "text": "outfit" + } + }, + "contextRegion": { + "startLine": 629, + "startColumn": 26, + "charOffset": 18054, + "charLength": 6, + "snippet": { + "text": "\tsetField(L, \"lookTypeEx\", outfit.lookTypeEx);\n\tsetField(L, \"lookHead\", outfit.lookHead);\n\tsetField(L, \"lookBody\", outfit.lookBody);\n\tsetField(L, \"lookLegs\", outfit.lookLegs);\n\tsetField(L, \"lookFeet\", outfit.lookFeet);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8003342190bf73934140dcda4cff41494559c2d0b757d7c4be74094aee701efa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 632, + "startColumn": 26, + "charOffset": 18212, + "charLength": 6, + "snippet": { + "text": "outfit" + } + }, + "contextRegion": { + "startLine": 630, + "startColumn": 26, + "charOffset": 18101, + "charLength": 6, + "snippet": { + "text": "\tsetField(L, \"lookHead\", outfit.lookHead);\n\tsetField(L, \"lookBody\", outfit.lookBody);\n\tsetField(L, \"lookLegs\", outfit.lookLegs);\n\tsetField(L, \"lookFeet\", outfit.lookFeet);\n\tsetField(L, \"lookAddons\", outfit.lookAddons);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7e740dc5828bd4a245c8d3108af4f43c36c2eea88464803616a23dc93f083bd0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 633, + "startColumn": 26, + "charOffset": 18255, + "charLength": 6, + "snippet": { + "text": "outfit" + } + }, + "contextRegion": { + "startLine": 631, + "startColumn": 26, + "charOffset": 18144, + "charLength": 6, + "snippet": { + "text": "\tsetField(L, \"lookBody\", outfit.lookBody);\n\tsetField(L, \"lookLegs\", outfit.lookLegs);\n\tsetField(L, \"lookFeet\", outfit.lookFeet);\n\tsetField(L, \"lookAddons\", outfit.lookAddons);\n\tsetField(L, \"lookMount\", outfit.lookMount);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "46494385631756c783f1856f1924d7804c6a33160e3751dbd8ad9bfaed38abdc" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 634, + "startColumn": 28, + "charOffset": 18300, + "charLength": 6, + "snippet": { + "text": "outfit" + } + }, + "contextRegion": { + "startLine": 632, + "startColumn": 28, + "charOffset": 18187, + "charLength": 6, + "snippet": { + "text": "\tsetField(L, \"lookLegs\", outfit.lookLegs);\n\tsetField(L, \"lookFeet\", outfit.lookFeet);\n\tsetField(L, \"lookAddons\", outfit.lookAddons);\n\tsetField(L, \"lookMount\", outfit.lookMount);\n\tsetField(L, \"lookMountHead\", outfit.lookMountHead);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "45fa0fed099c9be536dc8ae92c70eda96bf9aa11fda50e089aa9a9ca5de9e995" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 635, + "startColumn": 27, + "charOffset": 18346, + "charLength": 6, + "snippet": { + "text": "outfit" + } + }, + "contextRegion": { + "startLine": 633, + "startColumn": 27, + "charOffset": 18230, + "charLength": 6, + "snippet": { + "text": "\tsetField(L, \"lookFeet\", outfit.lookFeet);\n\tsetField(L, \"lookAddons\", outfit.lookAddons);\n\tsetField(L, \"lookMount\", outfit.lookMount);\n\tsetField(L, \"lookMountHead\", outfit.lookMountHead);\n\tsetField(L, \"lookMountBody\", outfit.lookMountBody);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cae0adc828e80d259b46684d64af1596bc7c5d89953d201fae216c033a9ea03f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 636, + "startColumn": 31, + "charOffset": 18395, + "charLength": 6, + "snippet": { + "text": "outfit" + } + }, + "contextRegion": { + "startLine": 634, + "startColumn": 31, + "charOffset": 18273, + "charLength": 6, + "snippet": { + "text": "\tsetField(L, \"lookAddons\", outfit.lookAddons);\n\tsetField(L, \"lookMount\", outfit.lookMount);\n\tsetField(L, \"lookMountHead\", outfit.lookMountHead);\n\tsetField(L, \"lookMountBody\", outfit.lookMountBody);\n\tsetField(L, \"lookMountLegs\", outfit.lookMountLegs);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f74845110592aafe208061914bbd374d281118d521ca59df28f8c25f02389425" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 637, + "startColumn": 31, + "charOffset": 18448, + "charLength": 6, + "snippet": { + "text": "outfit" + } + }, + "contextRegion": { + "startLine": 635, + "startColumn": 31, + "charOffset": 18320, + "charLength": 6, + "snippet": { + "text": "\tsetField(L, \"lookMount\", outfit.lookMount);\n\tsetField(L, \"lookMountHead\", outfit.lookMountHead);\n\tsetField(L, \"lookMountBody\", outfit.lookMountBody);\n\tsetField(L, \"lookMountLegs\", outfit.lookMountLegs);\n\tsetField(L, \"lookMountFeet\", outfit.lookMountFeet);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e9ab8c0cd699622c0acfa2ab071a63ae51f0cc33d4ec7c3c01ba9c5aaea3f06" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 638, + "startColumn": 31, + "charOffset": 18501, + "charLength": 6, + "snippet": { + "text": "outfit" + } + }, + "contextRegion": { + "startLine": 636, + "startColumn": 31, + "charOffset": 18365, + "charLength": 6, + "snippet": { + "text": "\tsetField(L, \"lookMountHead\", outfit.lookMountHead);\n\tsetField(L, \"lookMountBody\", outfit.lookMountBody);\n\tsetField(L, \"lookMountLegs\", outfit.lookMountLegs);\n\tsetField(L, \"lookMountFeet\", outfit.lookMountFeet);\n\tsetField(L, \"lookFamiliarsType\", outfit.lookFamiliarsType);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ac850d3b36a1234e80978cf76528309bd9d3e223458e19ce05929b1aa2ad9d3f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 639, + "startColumn": 31, + "charOffset": 18554, + "charLength": 6, + "snippet": { + "text": "outfit" + } + }, + "contextRegion": { + "startLine": 637, + "startColumn": 31, + "charOffset": 18418, + "charLength": 6, + "snippet": { + "text": "\tsetField(L, \"lookMountBody\", outfit.lookMountBody);\n\tsetField(L, \"lookMountLegs\", outfit.lookMountLegs);\n\tsetField(L, \"lookMountFeet\", outfit.lookMountFeet);\n\tsetField(L, \"lookFamiliarsType\", outfit.lookFamiliarsType);\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "274b9ae9eb1c1143dc9cdf0f8f14c4bee54068a6c3dc88b1b798e6784d5f7774" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 640, + "startColumn": 35, + "charOffset": 18611, + "charLength": 6, + "snippet": { + "text": "outfit" + } + }, + "contextRegion": { + "startLine": 638, + "startColumn": 35, + "charOffset": 18471, + "charLength": 6, + "snippet": { + "text": "\tsetField(L, \"lookMountLegs\", outfit.lookMountLegs);\n\tsetField(L, \"lookMountFeet\", outfit.lookMountFeet);\n\tsetField(L, \"lookFamiliarsType\", outfit.lookFamiliarsType);\n}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eeb22f6b123f428c5758c8c16e1567308278958f0ae04ff24f98ddd00ad038ac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 654, + "startColumn": 6, + "charOffset": 19008, + "charLength": 11, + "snippet": { + "text": "newFunction" + } + }, + "contextRegion": { + "startLine": 652, + "startColumn": 6, + "charOffset": 18967, + "charLength": 11, + "snippet": { + "text": "\tint methodsTable = lua_gettop(L);\n\n\tif (newFunction) {\n\t\t// className.__call = newFunction\n\t\tlua_pushcfunction(L, newFunction);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "72c4a228f6e0af213588c68bf0b5f11e8fbd38db37f8c03a134c0460704c6578" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'lua_CFunction' (aka 'int (*)(lua_State *)') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 654, + "startColumn": 6, + "charOffset": 19008, + "charLength": 11, + "snippet": { + "text": "newFunction" + } + }, + "contextRegion": { + "startLine": 652, + "startColumn": 6, + "charOffset": 18967, + "charLength": 11, + "snippet": { + "text": "\tint methodsTable = lua_gettop(L);\n\n\tif (newFunction) {\n\t\t// className.__call = newFunction\n\t\tlua_pushcfunction(L, newFunction);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5e02ec938e7fc164605b5e6b51a335038d786a86353c5c19d8c8232d108ae278" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 670, + "startColumn": 2, + "charOffset": 19411, + "charLength": 16, + "snippet": { + "text": "lua_setmetatable" + } + }, + "contextRegion": { + "startLine": 668, + "startColumn": 2, + "charOffset": 19367, + "charLength": 16, + "snippet": { + "text": "\n\t// setmetatable(className, methodsTable)\n\tlua_setmetatable(L, methods);\n\n\t// className.metatable = {}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ba403db5546f953f8f80e09d3ce055600e68c2175004db8ce50b022d2a66e93" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 673, + "startColumn": 2, + "charOffset": 19472, + "charLength": 17, + "snippet": { + "text": "luaL_newmetatable" + } + }, + "contextRegion": { + "startLine": 671, + "startColumn": 2, + "charOffset": 19441, + "charLength": 17, + "snippet": { + "text": "\n\t// className.metatable = {}\n\tluaL_newmetatable(L, className.c_str());\n\tint metatable = lua_gettop(L);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "22706618119bc7440d50230091ef493eb87535a9eb8e6265d3f78425e8890936" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 685, + "startColumn": 20, + "charOffset": 19835, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 683, + "startColumn": 20, + "charOffset": 19779, + "charLength": 3, + "snippet": { + "text": "\n\t// className.metatable['h'] = hash\n\tlua_pushnumber(L, std::hash()(className));\n\tlua_rawseti(L, metatable, 'h');\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e47d0508270e66143114a289e0d463a9a815ce6362d742de5472d7c774c84df4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 685, + "startColumn": 20, + "charOffset": 19835, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 683, + "startColumn": 20, + "charOffset": 19779, + "charLength": 3, + "snippet": { + "text": "\n\t// className.metatable['h'] = hash\n\tlua_pushnumber(L, std::hash()(className));\n\tlua_rawseti(L, metatable, 'h');\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "15149e0f9bf7d5307d0b82ed7b11cdcdba2c7a3cdb6757b71e6c5a117ac470ec" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 689, + "startColumn": 20, + "charOffset": 19965, + "charLength": 7, + "snippet": { + "text": "parents" + } + }, + "contextRegion": { + "startLine": 687, + "startColumn": 20, + "charOffset": 19906, + "charLength": 7, + "snippet": { + "text": "\n\t// className.metatable['p'] = parents\n\tlua_pushnumber(L, parents);\n\tlua_rawseti(L, metatable, 'p');\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6ff6328987a54703905e86287ba4b4838b0b801e0587f65f41bbaba59624dbd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-easily-swappable-parameters", + "ruleIndex": 52, + "kind": "fail", + "level": "warning", + "message": { + "text": "2 adjacent parameters of 'registerGlobalString' of similar type ('const std::string &') are easily swapped by mistake" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 758, + "startColumn": 61, + "charOffset": 22131, + "charLength": 5, + "snippet": { + "text": "const" + } + }, + "contextRegion": { + "startLine": 756, + "startColumn": 61, + "charOffset": 22068, + "charLength": 5, + "snippet": { + "text": "}\n\nvoid LuaFunctionsLoader::registerGlobalString(lua_State* L, const std::string &variable, const std::string &name) {\n\t// Example: registerGlobalString(L, \"VARIABLE_NAME\", \"variable string\");\n\tpushString(L, name);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "90da3d155c0af337ea270408f3f0a2dade805fc613070a9dc996dd069d2c7f56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-2-13-1", + "ruleIndex": 413, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 2-13-1: Only those escape sequences that are defined in ISO/IEC 14882:2003 shall be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 769, + "startColumn": 25, + "charOffset": 22543, + "charLength": 6, + "snippet": { + "text": "\"\\\\[[\"" + } + }, + "contextRegion": { + "startLine": 767, + "startColumn": 25, + "charOffset": 22455, + "charLength": 6, + "snippet": { + "text": "\treplaceString(s, \"\\\"\", \"\\\\\\\"\");\n\treplaceString(s, \"'\", \"\\\\'\");\n\treplaceString(s, \"[[\", \"\\\\[[\");\n\treturn s;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "02aaba22e7834fc86d9ff41f56b6629a7d3eaa51b994c20b768d75cb967e7dfe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto objPtr' can be declared as 'auto *objPtr'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 784, + "startColumn": 2, + "charOffset": 23040, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 782, + "startColumn": 2, + "charOffset": 22977, + "charLength": 4, + "snippet": { + "text": "\nint LuaFunctionsLoader::luaGarbageCollection(lua_State* L) {\n\tauto objPtr = static_cast*>(lua_touserdata(L, 1));\n\tif (objPtr) {\n\t\tobjPtr->reset();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "32175ba21df5a79a2d2e97cafcc4538342c4d878ba9be24d015f89a1c93ae121" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-8", + "ruleIndex": 440, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-8: An object with integer type or pointer to void type shall not be converted to an object with pointer type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 784, + "startColumn": 16, + "charOffset": 23054, + "charLength": 11, + "snippet": { + "text": "static_cast" + } + }, + "contextRegion": { + "startLine": 782, + "startColumn": 16, + "charOffset": 22977, + "charLength": 11, + "snippet": { + "text": "\nint LuaFunctionsLoader::luaGarbageCollection(lua_State* L) {\n\tauto objPtr = static_cast*>(lua_touserdata(L, 1));\n\tif (objPtr) {\n\t\tobjPtr->reset();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "96507f553bcd409abc59e19bfe5af5755feda12b1c9cb1fded1d227c79294805" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 785, + "startColumn": 6, + "charOffset": 23126, + "charLength": 6, + "snippet": { + "text": "objPtr" + } + }, + "contextRegion": { + "startLine": 783, + "startColumn": 6, + "charOffset": 22978, + "charLength": 6, + "snippet": { + "text": "int LuaFunctionsLoader::luaGarbageCollection(lua_State* L) {\n\tauto objPtr = static_cast*>(lua_touserdata(L, 1));\n\tif (objPtr) {\n\t\tobjPtr->reset();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b80b716b00628dc43dcae041ea81fec1233bd7bd4862b651afd5c2df8fc504d9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'std::shared_ptr *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/lua_functions_loader.cpp" + }, + "region": { + "startLine": 785, + "startColumn": 6, + "charOffset": 23126, + "charLength": 6, + "snippet": { + "text": "objPtr" + } + }, + "contextRegion": { + "startLine": 783, + "startColumn": 6, + "charOffset": 22978, + "charLength": 6, + "snippet": { + "text": "int LuaFunctionsLoader::luaGarbageCollection(lua_State* L) {\n\tauto objPtr = static_cast*>(lua_touserdata(L, 1));\n\tif (objPtr) {\n\t\tobjPtr->reset();\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4657d53ede11409c3fb3281a65de1bd6832ce148945cc0bcdb377ea8f237c62a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-macro-usage", + "ruleIndex": 493, + "kind": "fail", + "level": "warning", + "message": { + "text": "function-like macro 'registerMagicEnumIn' used; consider a 'constexpr' template function" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/config_functions.cpp" + }, + "region": { + "startLine": 23, + "startColumn": 9, + "charOffset": 881, + "charLength": 19, + "snippet": { + "text": "registerMagicEnumIn" + } + }, + "contextRegion": { + "startLine": 21, + "startColumn": 9, + "charOffset": 797, + "charLength": 19, + "snippet": { + "text": "\tregisterMethod(L, \"configManager\", \"getFloat\", luaConfigManagerGetFloat);\n\n#define registerMagicEnumIn(L, tableName, enumValue) \\\n\tdo { \\\n\t\tauto name = magic_enum::enum_name(enumValue).data(); \\" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0cdce3744ffd0f61824ef8eb3ebb074312123f8f1a78e77a28cb7586d4540a16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-qualified-auto", + "ruleIndex": 587, + "kind": "fail", + "level": "warning", + "message": { + "text": "'auto enumName' can be declared as 'const auto *enumName'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/config_functions.cpp" + }, + "region": { + "startLine": 30, + "startColumn": 3, + "charOffset": 1219, + "charLength": 4, + "snippet": { + "text": "auto" + } + }, + "contextRegion": { + "startLine": 28, + "startColumn": 3, + "charOffset": 1123, + "charLength": 4, + "snippet": { + "text": "\tregisterTable(L, \"configKeys\");\n\tfor (auto value : magic_enum::enum_values()) {\n\t\tauto enumName = magic_enum::enum_name(value).data();\n\t\tif (enumName) {\n\t\t\tregisterMagicEnumIn(L, \"configKeys\", value);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77a23259f7f5a5efb22130bdedc7b2f3b21a753e2bb5a866deacb9791b66046e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/config_functions.cpp" + }, + "region": { + "startLine": 31, + "startColumn": 7, + "charOffset": 1278, + "charLength": 8, + "snippet": { + "text": "enumName" + } + }, + "contextRegion": { + "startLine": 29, + "startColumn": 7, + "charOffset": 1156, + "charLength": 8, + "snippet": { + "text": "\tfor (auto value : magic_enum::enum_values()) {\n\t\tauto enumName = magic_enum::enum_name(value).data();\n\t\tif (enumName) {\n\t\t\tregisterMagicEnumIn(L, \"configKeys\", value);\n\t\t\tg_logger().debug(\"Registering ConfigManager enum name '{}' value '{}' to lua\", enumName, fmt::underlying(value));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "502f3bd690fe6fd3a9e78ead8ce2ae3af966b272b76bbcd164ca8021d79a4d42" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const_pointer' (aka 'const char *') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/config_functions.cpp" + }, + "region": { + "startLine": 31, + "startColumn": 7, + "charOffset": 1278, + "charLength": 8, + "snippet": { + "text": "enumName" + } + }, + "contextRegion": { + "startLine": 29, + "startColumn": 7, + "charOffset": 1156, + "charLength": 8, + "snippet": { + "text": "\tfor (auto value : magic_enum::enum_values()) {\n\t\tauto enumName = magic_enum::enum_name(value).data();\n\t\tif (enumName) {\n\t\t\tregisterMagicEnumIn(L, \"configKeys\", value);\n\t\t\tg_logger().debug(\"Registering ConfigManager enum name '{}' value '{}' to lua\", enumName, fmt::underlying(value));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "18209680bd071151a4a046a8babee57159f38bb8adf18eced8679c48d0b4603b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/config_functions.cpp" + }, + "region": { + "startLine": 32, + "startColumn": 4, + "charOffset": 1293, + "charLength": 19, + "snippet": { + "text": "registerMagicEnumIn" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 4, + "charOffset": 1217, + "charLength": 19, + "snippet": { + "text": "\t\tauto enumName = magic_enum::enum_name(value).data();\n\t\tif (enumName) {\n\t\t\tregisterMagicEnumIn(L, \"configKeys\", value);\n\t\t\tg_logger().debug(\"Registering ConfigManager enum name '{}' value '{}' to lua\", enumName, fmt::underlying(value));\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "593465624dea93974f01d38eb4cbb269d31946f5576161ebc1cffa46e476acc7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/config_functions.cpp" + }, + "region": { + "startLine": 32, + "startColumn": 4, + "charOffset": 1293, + "charLength": 19, + "snippet": { + "text": "registerMagicEnumIn" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 4, + "charOffset": 1217, + "charLength": 19, + "snippet": { + "text": "\t\tauto enumName = magic_enum::enum_name(value).data();\n\t\tif (enumName) {\n\t\t\tregisterMagicEnumIn(L, \"configKeys\", value);\n\t\t\tg_logger().debug(\"Registering ConfigManager enum name '{}' value '{}' to lua\", enumName, fmt::underlying(value));\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1f4431273b70029751277c8843b3a0ef5235cc966140b1c58152e99e5e5f9a84" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-avoid-do-while", + "ruleIndex": 483, + "kind": "fail", + "level": "warning", + "message": { + "text": "avoid do-while loops" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/config_functions.cpp" + }, + "region": { + "startLine": 32, + "startColumn": 4, + "charOffset": 1293, + "charLength": 19, + "snippet": { + "text": "registerMagicEnumIn" + } + }, + "contextRegion": { + "startLine": 30, + "startColumn": 4, + "charOffset": 1217, + "charLength": 19, + "snippet": { + "text": "\t\tauto enumName = magic_enum::enum_name(value).data();\n\t\tif (enumName) {\n\t\t\tregisterMagicEnumIn(L, \"configKeys\", value);\n\t\t\tg_logger().debug(\"Registering ConfigManager enum name '{}' value '{}' to lua\", enumName, fmt::underlying(value));\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "88c0dbe1f738b70edf22ea63fdbbdb76db5a901dc87108ba6ad5fbbc23937318" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/config_functions.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 6, + "charOffset": 1603, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 6, + "charOffset": 1492, + "charLength": 1, + "snippet": { + "text": "int ConfigFunctions::luaConfigManagerGetString(lua_State* L) {\n\tauto key = getNumber(L, -1);\n\tif (!key) {\n\t\treportErrorFunc(\"Wrong enum\");\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "82800e96bc7f37ce82b22c6095f240c1ed87d9746ba602044aa561f596ec4eaa" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/config_functions.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 6, + "charOffset": 1603, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 6, + "charOffset": 1492, + "charLength": 1, + "snippet": { + "text": "int ConfigFunctions::luaConfigManagerGetString(lua_State* L) {\n\tauto key = getNumber(L, -1);\n\tif (!key) {\n\t\treportErrorFunc(\"Wrong enum\");\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c4378b8bf5715a13b5de1c0cfc7ec2f621ad6be57a90a396e60b9a9d9800a706" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'typename std::enable_if::value, ConfigKey_t>::type' (aka 'ConfigKey_t') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/config_functions.cpp" + }, + "region": { + "startLine": 41, + "startColumn": 7, + "charOffset": 1604, + "charLength": 3, + "snippet": { + "text": "key" + } + }, + "contextRegion": { + "startLine": 39, + "startColumn": 7, + "charOffset": 1492, + "charLength": 3, + "snippet": { + "text": "int ConfigFunctions::luaConfigManagerGetString(lua_State* L) {\n\tauto key = getNumber(L, -1);\n\tif (!key) {\n\t\treportErrorFunc(\"Wrong enum\");\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b15a4de3ad912b28ea936a5d1ba79d202a883c418b6b6b2118e0175d51ce7e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/config_functions.cpp" + }, + "region": { + "startLine": 42, + "startColumn": 3, + "charOffset": 1613, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 40, + "startColumn": 3, + "charOffset": 1555, + "charLength": 15, + "snippet": { + "text": "\tauto key = getNumber(L, -1);\n\tif (!key) {\n\t\treportErrorFunc(\"Wrong enum\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0ce5c3635694073f4b303c90e932f74abb38a26632e33b5a6401f7824a373502" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/config_functions.cpp" + }, + "region": { + "startLine": 52, + "startColumn": 6, + "charOffset": 1875, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 50, + "startColumn": 6, + "charOffset": 1764, + "charLength": 1, + "snippet": { + "text": "int ConfigFunctions::luaConfigManagerGetNumber(lua_State* L) {\n\tauto key = getNumber(L, -1);\n\tif (!key) {\n\t\treportErrorFunc(\"Wrong enum\");\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "74dcd66fd65cce2dac18a8fd26e596f0adc5a15bb4f07e2bc4826ca5d4267fae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/config_functions.cpp" + }, + "region": { + "startLine": 52, + "startColumn": 6, + "charOffset": 1875, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 50, + "startColumn": 6, + "charOffset": 1764, + "charLength": 1, + "snippet": { + "text": "int ConfigFunctions::luaConfigManagerGetNumber(lua_State* L) {\n\tauto key = getNumber(L, -1);\n\tif (!key) {\n\t\treportErrorFunc(\"Wrong enum\");\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6d890699d407b907910a5d0d51fbe5136f2beef9247aca6e21035c46874f379b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'typename std::enable_if::value, ConfigKey_t>::type' (aka 'ConfigKey_t') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/config_functions.cpp" + }, + "region": { + "startLine": 52, + "startColumn": 7, + "charOffset": 1876, + "charLength": 3, + "snippet": { + "text": "key" + } + }, + "contextRegion": { + "startLine": 50, + "startColumn": 7, + "charOffset": 1764, + "charLength": 3, + "snippet": { + "text": "int ConfigFunctions::luaConfigManagerGetNumber(lua_State* L) {\n\tauto key = getNumber(L, -1);\n\tif (!key) {\n\t\treportErrorFunc(\"Wrong enum\");\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8b358ae2c34b341426c17d6ad8cf8d83afc4019370e467854b91025857c4da28" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/config_functions.cpp" + }, + "region": { + "startLine": 53, + "startColumn": 3, + "charOffset": 1885, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 3, + "charOffset": 1827, + "charLength": 15, + "snippet": { + "text": "\tauto key = getNumber(L, -1);\n\tif (!key) {\n\t\treportErrorFunc(\"Wrong enum\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "80270ffb05fa9599aabee27b548e5260050a544c843ece415ff8130e86f9b6f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/config_functions.cpp" + }, + "region": { + "startLine": 57, + "startColumn": 20, + "charOffset": 1951, + "charLength": 15, + "snippet": { + "text": "g_configManager" + } + }, + "contextRegion": { + "startLine": 55, + "startColumn": 20, + "charOffset": 1928, + "charLength": 15, + "snippet": { + "text": "\t}\n\n\tlua_pushnumber(L, g_configManager().getNumber(getNumber(L, -1), __FUNCTION__));\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f013c0d1b8d8b7084a1ee8a38fbd8f06a59d92e26efe69366a96156de94a2f00" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/config_functions.cpp" + }, + "region": { + "startLine": 63, + "startColumn": 6, + "charOffset": 2152, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 6, + "charOffset": 2040, + "charLength": 1, + "snippet": { + "text": "int ConfigFunctions::luaConfigManagerGetBoolean(lua_State* L) {\n\tauto key = getNumber(L, -1);\n\tif (!key) {\n\t\treportErrorFunc(\"Wrong enum\");\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "53e2690b2b510430a2064908c45e4b181c4766d081b3672d5676ee4aa5dcd380" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/config_functions.cpp" + }, + "region": { + "startLine": 63, + "startColumn": 6, + "charOffset": 2152, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 6, + "charOffset": 2040, + "charLength": 1, + "snippet": { + "text": "int ConfigFunctions::luaConfigManagerGetBoolean(lua_State* L) {\n\tauto key = getNumber(L, -1);\n\tif (!key) {\n\t\treportErrorFunc(\"Wrong enum\");\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c395278d3a84323360626f49900881d567319e1d395b3cf2765564a0feaa72ff" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'typename std::enable_if::value, ConfigKey_t>::type' (aka 'ConfigKey_t') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/config_functions.cpp" + }, + "region": { + "startLine": 63, + "startColumn": 7, + "charOffset": 2153, + "charLength": 3, + "snippet": { + "text": "key" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 7, + "charOffset": 2040, + "charLength": 3, + "snippet": { + "text": "int ConfigFunctions::luaConfigManagerGetBoolean(lua_State* L) {\n\tauto key = getNumber(L, -1);\n\tif (!key) {\n\t\treportErrorFunc(\"Wrong enum\");\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "963bdaff71f7a08484778eb0daf3b40e31bedb53c140e913cadf629f5b11353b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/config_functions.cpp" + }, + "region": { + "startLine": 64, + "startColumn": 3, + "charOffset": 2162, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 62, + "startColumn": 3, + "charOffset": 2104, + "charLength": 15, + "snippet": { + "text": "\tauto key = getNumber(L, -1);\n\tif (!key) {\n\t\treportErrorFunc(\"Wrong enum\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "286704216196da2bb816f367b3abc61dc720afac608f54ed04bf273f22249bca" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-4-5-2", + "ruleIndex": 422, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 4-5-2: Expressions with type enum shall not be used as operands to built-in operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/config_functions.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 6, + "charOffset": 2425, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 6, + "charOffset": 2315, + "charLength": 1, + "snippet": { + "text": "int ConfigFunctions::luaConfigManagerGetFloat(lua_State* L) {\n\tauto key = getNumber(L, -1);\n\tif (!key) {\n\t\treportErrorFunc(\"Wrong enum\");\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c7675e60f95f70777cced5ac05ab03e36fbe1661fd81abf2d27278131d5313af" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/config_functions.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 6, + "charOffset": 2425, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 6, + "charOffset": 2315, + "charLength": 1, + "snippet": { + "text": "int ConfigFunctions::luaConfigManagerGetFloat(lua_State* L) {\n\tauto key = getNumber(L, -1);\n\tif (!key) {\n\t\treportErrorFunc(\"Wrong enum\");\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "01f155864f26bfaab96a8f508a801600a80d807f91f2ede2f35ef91b56342d01" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'typename std::enable_if::value, ConfigKey_t>::type' (aka 'ConfigKey_t') -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/config_functions.cpp" + }, + "region": { + "startLine": 74, + "startColumn": 7, + "charOffset": 2426, + "charLength": 3, + "snippet": { + "text": "key" + } + }, + "contextRegion": { + "startLine": 72, + "startColumn": 7, + "charOffset": 2315, + "charLength": 3, + "snippet": { + "text": "int ConfigFunctions::luaConfigManagerGetFloat(lua_State* L) {\n\tauto key = getNumber(L, -1);\n\tif (!key) {\n\t\treportErrorFunc(\"Wrong enum\");\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c8e9d1ea209b796372a8dc85ed6077486ecf06722af93fc196b2a7f9c2ce4351" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/config_functions.cpp" + }, + "region": { + "startLine": 75, + "startColumn": 3, + "charOffset": 2435, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 73, + "startColumn": 3, + "charOffset": 2377, + "charLength": 15, + "snippet": { + "text": "\tauto key = getNumber(L, -1);\n\tif (!key) {\n\t\treportErrorFunc(\"Wrong enum\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29694c19b2491732cfacdcee15992e9e89983f55ab954ca69a829e7f9a223780" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 45, + "startColumn": 7, + "charOffset": 1748, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 43, + "startColumn": 7, + "charOffset": 1653, + "charLength": 1, + "snippet": { + "text": "\t\tstd::set names;\n\t\tauto monsterType = std::make_shared(name);\n\t\tif (!monsterType) {\n\t\t\tlua_pushstring(L, \"MonsterType is nullptr\");\n\t\t\tlua_error(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "91433bd1d77b8e5b3f14648bdaa4fb70e336b79c45c93401dcaf7a2df13a631a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 47, + "startColumn": 4, + "charOffset": 1815, + "charLength": 9, + "snippet": { + "text": "lua_error" + } + }, + "contextRegion": { + "startLine": 45, + "startColumn": 4, + "charOffset": 1742, + "charLength": 9, + "snippet": { + "text": "\t\tif (!monsterType) {\n\t\t\tlua_pushstring(L, \"MonsterType is nullptr\");\n\t\t\tlua_error(L);\n\t\t\treturn 1;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbab4921cc61eec4cea9fa2ee4c7f56d54dc3b0b56dd8e4a266775fe6a806ea7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 53, + "startColumn": 10, + "charOffset": 2000, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 51, + "startColumn": 10, + "charOffset": 1847, + "charLength": 6, + "snippet": { + "text": "\t\t// if variant starts with !, then it's the only variant for this monster, so we register it with both names\n\t\tif (variant.starts_with(\"!\")) {\n\t\t\tnames.insert(name);\n\t\t\tvariant = variant.substr(1);\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "77972d907ab2ff88a412d10e3fba7f97788ee3e03be72a82512089b91ae2fa80" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 59, + "startColumn": 9, + "charOffset": 2126, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 57, + "startColumn": 9, + "charOffset": 2076, + "charLength": 6, + "snippet": { + "text": "\t\t\tuniqueName = variant + \"|\" + name;\n\t\t}\n\t\tnames.insert(uniqueName);\n\n\t\tmonsterType->name = name;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7bd4578e45f2672fa9022be574d357e3c469aaf1f1be25745a3416e105c9ca88" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 63, + "startColumn": 10, + "charOffset": 2216, + "charLength": 6, + "snippet": { + "text": "insert" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 10, + "charOffset": 2147, + "charLength": 6, + "snippet": { + "text": "\t\tmonsterType->name = name;\n\t\tif (!alternateName.empty()) {\n\t\t\tnames.insert(alternateName);\n\t\t\tmonsterType->name = alternateName;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa407762f791261342627efa93a4115a7ba2833ce24612822c83d5fd2f7bab03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 70, + "startColumn": 3, + "charOffset": 2369, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 68, + "startColumn": 3, + "charOffset": 2320, + "charLength": 3, + "snippet": { + "text": "\t\tmonsterType->nameDescription = \"a \" + name;\n\n\t\tfor (const auto &alternateName : names) {\n\t\t\tif (!g_monsters().tryAddMonsterType(alternateName, monsterType)) {\n\t\t\t\tlua_pushstring(L, fmt::format(\"The monster with name {} already registered\", alternateName).c_str());" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6f0e280796bfac3d6cf307e1ec515e7e17fa5c2b3f53b1b0a728e3b9876aef3a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 73, + "startColumn": 5, + "charOffset": 2591, + "charLength": 9, + "snippet": { + "text": "lua_error" + } + }, + "contextRegion": { + "startLine": 71, + "startColumn": 5, + "charOffset": 2411, + "charLength": 9, + "snippet": { + "text": "\t\t\tif (!g_monsters().tryAddMonsterType(alternateName, monsterType)) {\n\t\t\t\tlua_pushstring(L, fmt::format(\"The monster with name {} already registered\", alternateName).c_str());\n\t\t\t\tlua_error(L);\n\t\t\t\treturn 1;\n\t\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6a8a671c50f9beb9e99ad62ff687e21b550e349dd6b2cf1666a18d04ee050031" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 95, + "startColumn": 2, + "charOffset": 3201, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 93, + "startColumn": 2, + "charOffset": 3111, + "charLength": 7, + "snippet": { + "text": "\tbool multifloor = getBoolean(L, 2, false);\n\tbool onlyPlayers = getBoolean(L, 3, false);\n\tint32_t minRangeX = getNumber(L, 4, 0);\n\tint32_t maxRangeX = getNumber(L, 5, 0);\n\tint32_t minRangeY = getNumber(L, 6, 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c701752107ddfd294a61e140274c58debf4ec13260dbd84c5c636325be03f171" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 96, + "startColumn": 2, + "charOffset": 3251, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 2, + "charOffset": 3155, + "charLength": 7, + "snippet": { + "text": "\tbool onlyPlayers = getBoolean(L, 3, false);\n\tint32_t minRangeX = getNumber(L, 4, 0);\n\tint32_t maxRangeX = getNumber(L, 5, 0);\n\tint32_t minRangeY = getNumber(L, 6, 0);\n\tint32_t maxRangeY = getNumber(L, 7, 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8a05632c84c20cab79376255d0f86c451c6abffca182583a7b2ff9efdc111c7b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 96, + "startColumn": 44, + "charOffset": 3293, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 94, + "startColumn": 44, + "charOffset": 3155, + "charLength": 1, + "snippet": { + "text": "\tbool onlyPlayers = getBoolean(L, 3, false);\n\tint32_t minRangeX = getNumber(L, 4, 0);\n\tint32_t maxRangeX = getNumber(L, 5, 0);\n\tint32_t minRangeY = getNumber(L, 6, 0);\n\tint32_t maxRangeY = getNumber(L, 7, 0);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1ba6139b506919f8d84d63549473b365ad8b0b83195f8b711255c94820024f56" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 97, + "startColumn": 2, + "charOffset": 3301, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 95, + "startColumn": 2, + "charOffset": 3200, + "charLength": 7, + "snippet": { + "text": "\tint32_t minRangeX = getNumber(L, 4, 0);\n\tint32_t maxRangeX = getNumber(L, 5, 0);\n\tint32_t minRangeY = getNumber(L, 6, 0);\n\tint32_t maxRangeY = getNumber(L, 7, 0);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a6bab62ffe91780925dd5393ec973198c18fa372d87d71b41d8f5a812581e73b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 97, + "startColumn": 44, + "charOffset": 3343, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 95, + "startColumn": 44, + "charOffset": 3200, + "charLength": 1, + "snippet": { + "text": "\tint32_t minRangeX = getNumber(L, 4, 0);\n\tint32_t maxRangeX = getNumber(L, 5, 0);\n\tint32_t minRangeY = getNumber(L, 6, 0);\n\tint32_t maxRangeY = getNumber(L, 7, 0);\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f2d0579387bb9afc15e13a8a27d1472daf5c3143b014a14b31c5e025c88bf348" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 2, + "charOffset": 3351, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 2, + "charOffset": 3250, + "charLength": 7, + "snippet": { + "text": "\tint32_t maxRangeX = getNumber(L, 5, 0);\n\tint32_t minRangeY = getNumber(L, 6, 0);\n\tint32_t maxRangeY = getNumber(L, 7, 0);\n\n\tSpectators spectators;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9942db38f94a78eae18e713b6aa87b8412b11833bd0b4536932accceceaa0840" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "7 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 44, + "charOffset": 3393, + "charLength": 1, + "snippet": { + "text": "7" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 44, + "charOffset": 3250, + "charLength": 1, + "snippet": { + "text": "\tint32_t maxRangeX = getNumber(L, 5, 0);\n\tint32_t minRangeY = getNumber(L, 6, 0);\n\tint32_t maxRangeY = getNumber(L, 7, 0);\n\n\tSpectators spectators;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "624803975224a4df2dd41b4201c4d195ab532b274b54ef91a4ac653b8bd2a9f9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 103, + "startColumn": 14, + "charOffset": 3459, + "charLength": 4, + "snippet": { + "text": "find" + } + }, + "contextRegion": { + "startLine": 101, + "startColumn": 14, + "charOffset": 3425, + "charLength": 4, + "snippet": { + "text": "\n\tif (onlyPlayers) {\n\t\tspectators.find(position, multifloor, minRangeX, maxRangeX, minRangeY, maxRangeY);\n\t} else {\n\t\tspectators.find(position, multifloor, minRangeX, maxRangeX, minRangeY, maxRangeY);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b1b3ec73ce00390e74383c522f4942b725698ec8cbef95b0555c724484665fd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 105, + "startColumn": 14, + "charOffset": 3562, + "charLength": 4, + "snippet": { + "text": "find" + } + }, + "contextRegion": { + "startLine": 103, + "startColumn": 14, + "charOffset": 3446, + "charLength": 4, + "snippet": { + "text": "\t\tspectators.find(position, multifloor, minRangeX, maxRangeX, minRangeY, maxRangeY);\n\t} else {\n\t\tspectators.find(position, multifloor, minRangeX, maxRangeX, minRangeY, maxRangeY);\n\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ce80ad61d36c7f64d1845e4c30355291ebeb617c24593b49e03b0a9b8ddff36d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 108, + "startColumn": 21, + "charOffset": 3668, + "charLength": 10, + "snippet": { + "text": "spectators" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 21, + "charOffset": 3644, + "charLength": 10, + "snippet": { + "text": "\t}\n\n\tlua_createtable(L, spectators.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3cd3fbc6fbbe23cdf02356b64a0f234d9367a61708edce23d9c3d8023c01e629" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 108, + "startColumn": 21, + "charOffset": 3668, + "charLength": 10, + "snippet": { + "text": "spectators" + } + }, + "contextRegion": { + "startLine": 106, + "startColumn": 21, + "charOffset": 3644, + "charLength": 10, + "snippet": { + "text": "\t}\n\n\tlua_createtable(L, spectators.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b852e972c9bdc7d71889aea617159683d71c7185dc0fd4e23d3d934b89a7fb26" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 2, + "charOffset": 3709, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 2, + "charOffset": 3691, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (std::shared_ptr creature : spectators) {\n\t\tpushUserdata(L, creature);\n\t\tsetCreatureMetatable(L, -1, creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f0620195c4b69b827e14e74db57b1718ff27ddec6603ce1b4056478c3080023d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 111, + "startColumn": 33, + "charOffset": 3740, + "charLength": 8, + "snippet": { + "text": "creature" + } + }, + "contextRegion": { + "startLine": 109, + "startColumn": 33, + "charOffset": 3691, + "charLength": 8, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (std::shared_ptr creature : spectators) {\n\t\tpushUserdata(L, creature);\n\t\tsetCreatureMetatable(L, -1, creature);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "54b3573313b0cb7317e841a7eadc60e8e88820789bc2c0142e0aede74a76920b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'luaGameGetBestiaryList' has cognitive complexity of 27 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 125, + "startColumn": 20, + "charOffset": 4067, + "charLength": 22, + "snippet": { + "text": "luaGameGetBestiaryList" + } + }, + "contextRegion": { + "startLine": 123, + "startColumn": 20, + "charOffset": 4045, + "charLength": 22, + "snippet": { + "text": "}\n\nint GameFunctions::luaGameGetBestiaryList(lua_State* L) {\n\t// Game.getBestiaryList([bool[string or BestiaryType_t]])\n\tlua_newtable(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "669a1a38dd7d37e5c05dcbec553cdc8ca13c86afc7d2bba12d5cf0f17f12185c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 133, + "startColumn": 3, + "charOffset": 4342, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 131, + "startColumn": 3, + "charOffset": 4238, + "charLength": 3, + "snippet": { + "text": "\tif (lua_gettop(L) <= 2) {\n\t\tstd::map mtype_list = g_game().getBestiaryList();\n\t\tfor (auto ita : mtype_list) {\n\t\t\tif (name) {\n\t\t\t\tpushString(L, ita.second);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b9c21468ff2c456840ff1516ff1d0e595da60ec649f40a1dfc5244b8a4470094" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 133, + "startColumn": 13, + "charOffset": 4352, + "charLength": 3, + "snippet": { + "text": "ita" + } + }, + "contextRegion": { + "startLine": 131, + "startColumn": 13, + "charOffset": 4238, + "charLength": 3, + "snippet": { + "text": "\tif (lua_gettop(L) <= 2) {\n\t\tstd::map mtype_list = g_game().getBestiaryList();\n\t\tfor (auto ita : mtype_list) {\n\t\t\tif (name) {\n\t\t\t\tpushString(L, ita.second);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9372a409a81669c876d58a8990037ea6d260e70b887ad72976adcedd62f9599a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 137, + "startColumn": 23, + "charOffset": 4452, + "charLength": 3, + "snippet": { + "text": "ita" + } + }, + "contextRegion": { + "startLine": 135, + "startColumn": 23, + "charOffset": 4387, + "charLength": 3, + "snippet": { + "text": "\t\t\t\tpushString(L, ita.second);\n\t\t\t} else {\n\t\t\t\tlua_pushnumber(L, ita.first);\n\t\t\t}\n\t\t\tlua_rawseti(L, -2, ++index);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "03f465f6e6552c2260dab1b5b6f8ab6b2d0c5e515f3ff595097b1bd1d0e62e17" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 144, + "startColumn": 4, + "charOffset": 4668, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 142, + "startColumn": 4, + "charOffset": 4515, + "charLength": 3, + "snippet": { + "text": "\t\tif (isNumber(L, 2)) {\n\t\t\tstd::map tmplist = g_iobestiary().findRaceByName(\"CANARY\", false, getNumber(L, 2));\n\t\t\tfor (auto itb : tmplist) {\n\t\t\t\tif (name) {\n\t\t\t\t\tpushString(L, itb.second);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93c98de2adcfc990b900632a7f1b39bd77b55b6d6ab8b3dde215677fd06c9880" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 144, + "startColumn": 14, + "charOffset": 4678, + "charLength": 3, + "snippet": { + "text": "itb" + } + }, + "contextRegion": { + "startLine": 142, + "startColumn": 14, + "charOffset": 4515, + "charLength": 3, + "snippet": { + "text": "\t\tif (isNumber(L, 2)) {\n\t\t\tstd::map tmplist = g_iobestiary().findRaceByName(\"CANARY\", false, getNumber(L, 2));\n\t\t\tfor (auto itb : tmplist) {\n\t\t\t\tif (name) {\n\t\t\t\t\tpushString(L, itb.second);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee63ec30afdecc24c8aa8fb63c4c6ed78b851987cec9ec3a1c233c18735f7e08" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 148, + "startColumn": 24, + "charOffset": 4779, + "charLength": 3, + "snippet": { + "text": "itb" + } + }, + "contextRegion": { + "startLine": 146, + "startColumn": 24, + "charOffset": 4711, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tpushString(L, itb.second);\n\t\t\t\t} else {\n\t\t\t\t\tlua_pushnumber(L, itb.first);\n\t\t\t\t}\n\t\t\t\tlua_rawseti(L, -2, ++index);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fef1e060184879e582bb63baade2d5040fa0babeedb1c3d6b16f233f8e9922a3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 154, + "startColumn": 4, + "charOffset": 4942, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 4, + "charOffset": 4835, + "charLength": 3, + "snippet": { + "text": "\t\t} else {\n\t\t\tstd::map tmplist = g_iobestiary().findRaceByName(getString(L, 2));\n\t\t\tfor (auto itc : tmplist) {\n\t\t\t\tif (name) {\n\t\t\t\t\tpushString(L, itc.second);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9c15b37e0f7de60968838b33986ead58bb3be0307a0371d448a54ce500a2edc3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 154, + "startColumn": 14, + "charOffset": 4952, + "charLength": 3, + "snippet": { + "text": "itc" + } + }, + "contextRegion": { + "startLine": 152, + "startColumn": 14, + "charOffset": 4835, + "charLength": 3, + "snippet": { + "text": "\t\t} else {\n\t\t\tstd::map tmplist = g_iobestiary().findRaceByName(getString(L, 2));\n\t\t\tfor (auto itc : tmplist) {\n\t\t\t\tif (name) {\n\t\t\t\t\tpushString(L, itc.second);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "aaa8b5c548b99c5d7f75fdfac2e521ee42f341dd4cfa6a9178bbd44e2d20d418" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 158, + "startColumn": 24, + "charOffset": 5053, + "charLength": 3, + "snippet": { + "text": "itc" + } + }, + "contextRegion": { + "startLine": 156, + "startColumn": 24, + "charOffset": 4985, + "charLength": 3, + "snippet": { + "text": "\t\t\t\t\tpushString(L, itc.second);\n\t\t\t\t} else {\n\t\t\t\t\tlua_pushnumber(L, itc.first);\n\t\t\t\t}\n\t\t\t\tlua_rawseti(L, -2, ++index);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "10925f454aa6d65a154256c368f69a7761ce9a2f8dc7fbc01f3cc4257079ec16" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 169, + "startColumn": 21, + "charOffset": 5225, + "charLength": 6, + "snippet": { + "text": "g_game" + } + }, + "contextRegion": { + "startLine": 167, + "startColumn": 21, + "charOffset": 5130, + "charLength": 6, + "snippet": { + "text": "int GameFunctions::luaGameGetPlayers(lua_State* L) {\n\t// Game.getPlayers()\n\tlua_createtable(L, g_game().getPlayersOnline(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6db5c4a8d96cbad267a07cd8c319d65c91d0a0a0b5b82dd8e64f18b09f644bea" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 169, + "startColumn": 21, + "charOffset": 5225, + "charLength": 6, + "snippet": { + "text": "g_game" + } + }, + "contextRegion": { + "startLine": 167, + "startColumn": 21, + "charOffset": 5130, + "charLength": 6, + "snippet": { + "text": "int GameFunctions::luaGameGetPlayers(lua_State* L) {\n\t// Game.getPlayers()\n\tlua_createtable(L, g_game().getPlayersOnline(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c691e711f90ccd2677405044b433610228b51ba4f509a5fe32ba309dd097304d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 172, + "startColumn": 2, + "charOffset": 5276, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 170, + "startColumn": 2, + "charOffset": 5258, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (const auto &playerEntry : g_game().getPlayers()) {\n\t\tpushUserdata(L, playerEntry.second);\n\t\tsetMetatable(L, -1, \"Player\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "359982dd4f3475f3dbebeb3229d288bf6ddd295701ae71fefada2af2b878ffe3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 199, + "startColumn": 3, + "charOffset": 6190, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 197, + "startColumn": 3, + "charOffset": 6118, + "charLength": 15, + "snippet": { + "text": "\tconst uint32_t level = getNumber(L, 1);\n\tif (level == 0) {\n\t\treportErrorFunc(\"Level must be greater than 0.\");\n\t} else {\n\t\tlua_pushnumber(L, Player::getExpForLevel(level));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "468ea3c5a951343ea49b1a3f122ddcae8b59aefc614fd16d50696976064ee37f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 201, + "startColumn": 21, + "charOffset": 6270, + "charLength": 6, + "snippet": { + "text": "Player" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 21, + "charOffset": 6188, + "charLength": 6, + "snippet": { + "text": "\t\treportErrorFunc(\"Level must be greater than 0.\");\n\t} else {\n\t\tlua_pushnumber(L, Player::getExpForLevel(level));\n\t}\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "afb514c95daf95f61d5726afd53a574295f24eee8e7b80cf7a119fa48ca48838" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 201, + "startColumn": 21, + "charOffset": 6270, + "charLength": 6, + "snippet": { + "text": "Player" + } + }, + "contextRegion": { + "startLine": 199, + "startColumn": 21, + "charOffset": 6188, + "charLength": 6, + "snippet": { + "text": "\t\treportErrorFunc(\"Level must be greater than 0.\");\n\t} else {\n\t\tlua_pushnumber(L, Player::getExpForLevel(level));\n\t}\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "002c6b23152cf3ba18def7ca0ab733d8d262964acae30c40bd158a8b87127cf6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 208, + "startColumn": 20, + "charOffset": 6423, + "charLength": 6, + "snippet": { + "text": "g_game" + } + }, + "contextRegion": { + "startLine": 206, + "startColumn": 20, + "charOffset": 6319, + "charLength": 6, + "snippet": { + "text": "int GameFunctions::luaGameGetMonsterCount(lua_State* L) {\n\t// Game.getMonsterCount()\n\tlua_pushnumber(L, g_game().getMonstersOnline());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f4adcb9d86c7e5b0fe74ec05f19b917a0b7ec6103dbc821c5f576a3c5b3f103" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 208, + "startColumn": 20, + "charOffset": 6423, + "charLength": 6, + "snippet": { + "text": "g_game" + } + }, + "contextRegion": { + "startLine": 206, + "startColumn": 20, + "charOffset": 6319, + "charLength": 6, + "snippet": { + "text": "int GameFunctions::luaGameGetMonsterCount(lua_State* L) {\n\t// Game.getMonsterCount()\n\tlua_pushnumber(L, g_game().getMonstersOnline());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7fa3a5a40c03b01d431215500e23239168d9beaef6727d5cc10cd18a2f256cb3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 214, + "startColumn": 20, + "charOffset": 6570, + "charLength": 6, + "snippet": { + "text": "g_game" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 20, + "charOffset": 6468, + "charLength": 6, + "snippet": { + "text": "int GameFunctions::luaGameGetPlayerCount(lua_State* L) {\n\t// Game.getPlayerCount()\n\tlua_pushnumber(L, g_game().getPlayersOnline());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ad41c89cbddfa1070864421f2598d7c13b340eedb53c8e6373711e69cc775e8e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 214, + "startColumn": 20, + "charOffset": 6570, + "charLength": 6, + "snippet": { + "text": "g_game" + } + }, + "contextRegion": { + "startLine": 212, + "startColumn": 20, + "charOffset": 6468, + "charLength": 6, + "snippet": { + "text": "int GameFunctions::luaGameGetPlayerCount(lua_State* L) {\n\t// Game.getPlayerCount()\n\tlua_pushnumber(L, g_game().getPlayersOnline());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "271ee00ff19a6702223f60c87635891fb39ff217996c7412c589f24e190b2105" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 220, + "startColumn": 20, + "charOffset": 6710, + "charLength": 6, + "snippet": { + "text": "g_game" + } + }, + "contextRegion": { + "startLine": 218, + "startColumn": 20, + "charOffset": 6614, + "charLength": 6, + "snippet": { + "text": "int GameFunctions::luaGameGetNpcCount(lua_State* L) {\n\t// Game.getNpcCount()\n\tlua_pushnumber(L, g_game().getNpcsOnline());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4693417977361b945ced77f53323905fa9315722a23802f2c0270ca3c9d81b0e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 220, + "startColumn": 20, + "charOffset": 6710, + "charLength": 6, + "snippet": { + "text": "g_game" + } + }, + "contextRegion": { + "startLine": 218, + "startColumn": 20, + "charOffset": 6614, + "charLength": 6, + "snippet": { + "text": "int GameFunctions::luaGameGetNpcCount(lua_State* L) {\n\t// Game.getNpcCount()\n\tlua_pushnumber(L, g_game().getNpcsOnline());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "59441f10dc04d49802915cc318d4590b4a9fecf3db9fa34b291713664c828d51" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 227, + "startColumn": 21, + "charOffset": 6898, + "charLength": 4, + "snippet": { + "text": "type" + } + }, + "contextRegion": { + "startLine": 225, + "startColumn": 21, + "charOffset": 6809, + "charLength": 4, + "snippet": { + "text": "\t// Game.getMonsterTypes()\n\tconst auto type = g_monsters().monsters;\n\tlua_createtable(L, type.size(), 0);\n\n\tfor (const auto &[typeName, mType] : type) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "338daec055796d4dad5d880f45c1dcc452bf72d43f8df84999c20aa1cbf76aac" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 227, + "startColumn": 21, + "charOffset": 6898, + "charLength": 4, + "snippet": { + "text": "type" + } + }, + "contextRegion": { + "startLine": 225, + "startColumn": 21, + "charOffset": 6809, + "charLength": 4, + "snippet": { + "text": "\t// Game.getMonsterTypes()\n\tconst auto type = g_monsters().monsters;\n\tlua_createtable(L, type.size(), 0);\n\n\tfor (const auto &[typeName, mType] : type) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b03577988584d14fe1d96e43bffa354ea54d72a3acb5ddd8fe39fc7e25b14e19" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 229, + "startColumn": 2, + "charOffset": 6917, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 227, + "startColumn": 2, + "charOffset": 6878, + "charLength": 3, + "snippet": { + "text": "\tlua_createtable(L, type.size(), 0);\n\n\tfor (const auto &[typeName, mType] : type) {\n\t\tpushUserdata(L, mType);\n\t\tsetMetatable(L, -1, \"MonsterType\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e3427eff4742ab6c9e32185757728ed7ad751bf7fd42cc765ec1091329dd02f2" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 240, + "startColumn": 21, + "charOffset": 7239, + "charLength": 5, + "snippet": { + "text": "towns" + } + }, + "contextRegion": { + "startLine": 238, + "startColumn": 21, + "charOffset": 7148, + "charLength": 5, + "snippet": { + "text": "\t// Game.getTowns()\n\tconst auto towns = g_game().map.towns.getTowns();\n\tlua_createtable(L, towns.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "29a7ce29b8b5d8bef7c8e520b8dd3d153c3590a87f76f36ee2595bdeaaf99ba0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 240, + "startColumn": 21, + "charOffset": 7239, + "charLength": 5, + "snippet": { + "text": "towns" + } + }, + "contextRegion": { + "startLine": 238, + "startColumn": 21, + "charOffset": 7148, + "charLength": 5, + "snippet": { + "text": "\t// Game.getTowns()\n\tconst auto towns = g_game().map.towns.getTowns();\n\tlua_createtable(L, towns.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d3bb63439428b5bd2679de7800e6e33404bc38edc3cc03a67b10742ca4a638c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 243, + "startColumn": 2, + "charOffset": 7275, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 2, + "charOffset": 7257, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (auto townEntry : towns) {\n\t\tpushUserdata(L, townEntry.second);\n\t\tsetMetatable(L, -1, \"Town\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "73069e97bd2ada9f0a14d395cedc56d18e568d3701d0e78184756a41dde54ae6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 243, + "startColumn": 12, + "charOffset": 7285, + "charLength": 9, + "snippet": { + "text": "townEntry" + } + }, + "contextRegion": { + "startLine": 241, + "startColumn": 12, + "charOffset": 7257, + "charLength": 9, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (auto townEntry : towns) {\n\t\tpushUserdata(L, townEntry.second);\n\t\tsetMetatable(L, -1, \"Town\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d24cb6f5ac37abd33b30b783c3f8ea6d7041dc73231019cf11f2ac303ea0d69e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 254, + "startColumn": 21, + "charOffset": 7575, + "charLength": 6, + "snippet": { + "text": "houses" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 21, + "charOffset": 7480, + "charLength": 6, + "snippet": { + "text": "\t// Game.getHouses()\n\tconst auto houses = g_game().map.houses.getHouses();\n\tlua_createtable(L, houses.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dbf459d1487b3556a864a39dc5af968ae4d207e300b3a4642cc243230eff2856" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 254, + "startColumn": 21, + "charOffset": 7575, + "charLength": 6, + "snippet": { + "text": "houses" + } + }, + "contextRegion": { + "startLine": 252, + "startColumn": 21, + "charOffset": 7480, + "charLength": 6, + "snippet": { + "text": "\t// Game.getHouses()\n\tconst auto houses = g_game().map.houses.getHouses();\n\tlua_createtable(L, houses.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3c9dbc6e7fcb69a36bfaa85c621774dd51f930b79c095ca24aade9433b77074a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 257, + "startColumn": 2, + "charOffset": 7612, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 255, + "startColumn": 2, + "charOffset": 7594, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (auto houseEntry : houses) {\n\t\tpushUserdata(L, houseEntry.second);\n\t\tsetMetatable(L, -1, \"House\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb5f4ee07a1bf0a366a287265b5c979d71b6fa972296f3954a6be754d88e9869" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "performance-for-range-copy", + "ruleIndex": 668, + "kind": "fail", + "level": "warning", + "message": { + "text": "loop variable is copied but only used as const reference; consider making it a const reference" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 257, + "startColumn": 12, + "charOffset": 7622, + "charLength": 10, + "snippet": { + "text": "houseEntry" + } + }, + "contextRegion": { + "startLine": 255, + "startColumn": 12, + "charOffset": 7594, + "charLength": 10, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (auto houseEntry : houses) {\n\t\tpushUserdata(L, houseEntry.second);\n\t\tsetMetatable(L, -1, \"House\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6399e245571c4a49c92c1f3a1d592110cd49d57de117f97487df3096374e5345" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 267, + "startColumn": 20, + "charOffset": 7868, + "charLength": 6, + "snippet": { + "text": "g_game" + } + }, + "contextRegion": { + "startLine": 265, + "startColumn": 20, + "charOffset": 7770, + "charLength": 6, + "snippet": { + "text": "int GameFunctions::luaGameGetGameState(lua_State* L) {\n\t// Game.getGameState()\n\tlua_pushnumber(L, g_game().getGameState());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b48cfdc3bd5510f40c6c805109fa75a15bcfa51e8f5e9622a6b0397360938eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 281, + "startColumn": 20, + "charOffset": 8209, + "charLength": 6, + "snippet": { + "text": "g_game" + } + }, + "contextRegion": { + "startLine": 279, + "startColumn": 20, + "charOffset": 8111, + "charLength": 6, + "snippet": { + "text": "int GameFunctions::luaGameGetWorldType(lua_State* L) {\n\t// Game.getWorldType()\n\tlua_pushnumber(L, g_game().getWorldType());\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e27a4ac8ad92b60047089a0f81822ad2509c3337bcd9168bc3dcc409939c76cf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-function-cognitive-complexity", + "ruleIndex": 700, + "kind": "fail", + "level": "warning", + "message": { + "text": "function 'luaGameCreateItem' has cognitive complexity of 39 (threshold 25)" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 300, + "startColumn": 20, + "charOffset": 8666, + "charLength": 17, + "snippet": { + "text": "luaGameCreateItem" + } + }, + "contextRegion": { + "startLine": 298, + "startColumn": 20, + "charOffset": 8644, + "charLength": 17, + "snippet": { + "text": "}\n\nint GameFunctions::luaGameCreateItem(lua_State* L) {\n\t// Game.createItem(itemId or name[, count[, position]])\n\tuint16_t itemId;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2f43ff89773a064614e3c4777a11c9c59d7b80c954203b32f664c1bb54776fa1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'itemId' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 302, + "startColumn": 11, + "charOffset": 8767, + "charLength": 6, + "snippet": { + "text": "itemId" + } + }, + "contextRegion": { + "startLine": 300, + "startColumn": 11, + "charOffset": 8647, + "charLength": 6, + "snippet": { + "text": "int GameFunctions::luaGameCreateItem(lua_State* L) {\n\t// Game.createItem(itemId or name[, count[, position]])\n\tuint16_t itemId;\n\tif (isNumber(L, 1)) {\n\t\titemId = getNumber(L, 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c5b177a91623d793d656338868deafd1e22c8008da8dbd460771ccd0695d709b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 313, + "startColumn": 2, + "charOffset": 8965, + "charLength": 7, + "snippet": { + "text": "int32_t" + } + }, + "contextRegion": { + "startLine": 311, + "startColumn": 2, + "charOffset": 8960, + "charLength": 7, + "snippet": { + "text": "\t}\n\n\tint32_t count = getNumber(L, 2, 1);\n\tint32_t itemCount = 1;\n\tint32_t subType = 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c4a31f23533f9d2580eab4d38254a9f4dfb037f24454d843f9d47660ee669e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 320, + "startColumn": 16, + "charOffset": 9161, + "charLength": 3, + "snippet": { + "text": "std" + } + }, + "contextRegion": { + "startLine": 318, + "startColumn": 16, + "charOffset": 9100, + "charLength": 3, + "snippet": { + "text": "\tif (it.hasSubType()) {\n\t\tif (it.stackable) {\n\t\t\titemCount = std::ceil(count / (float_t)it.stackSize);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ed8d3a2d6f96943a4c3c32a317b3ad02475dec3f22fb009f98d986d191a1a50b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'int32_t' (aka 'int') to 'float_t' (aka 'float')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 320, + "startColumn": 26, + "charOffset": 9171, + "charLength": 5, + "snippet": { + "text": "count" + } + }, + "contextRegion": { + "startLine": 318, + "startColumn": 26, + "charOffset": 9100, + "charLength": 5, + "snippet": { + "text": "\tif (it.hasSubType()) {\n\t\tif (it.stackable) {\n\t\t\titemCount = std::ceil(count / (float_t)it.stackSize);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "42a0df7a2f32608940d0a0e9e6da1ed15e69f054f4b482a43c59af12bf824858" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "google-readability-casting", + "ruleIndex": 542, + "kind": "fail", + "level": "warning", + "message": { + "text": "C-style casts are discouraged; use static_cast" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 320, + "startColumn": 34, + "charOffset": 9179, + "charLength": 1, + "snippet": { + "text": "(" + } + }, + "contextRegion": { + "startLine": 318, + "startColumn": 34, + "charOffset": 9100, + "charLength": 1, + "snippet": { + "text": "\tif (it.hasSubType()) {\n\t\tif (it.stackable) {\n\t\t\titemCount = std::ceil(count / (float_t)it.stackSize);\n\t\t}\n" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b59231d6d8b69fed3b384beb93c5fef0b40884f8e82e6b0b068e89db0b195bcb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 334, + "startColumn": 2, + "charOffset": 9400, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 332, + "startColumn": 2, + "charOffset": 9366, + "charLength": 2, + "snippet": { + "text": "\n\tbool hasTable = itemCount > 1;\n\tif (hasTable) {\n\t\tlua_newtable(L);\n\t} else if (itemCount == 0) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a3f16447d474397c93f5c1f6809e1249a7e30f898cac9d05089e2963f97eabb0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 341, + "startColumn": 2, + "charOffset": 9500, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 339, + "startColumn": 2, + "charOffset": 9495, + "charLength": 3, + "snippet": { + "text": "\t}\n\n\tfor (int32_t i = 1; i <= itemCount; ++i) {\n\t\tint32_t stackCount = subType;\n\t\tif (it.stackable) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c0bc8dc21343d49ccee12ec729fd3404afae858490efbf4771ebb78e3339303" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-id-dependent-backward-branch", + "ruleIndex": 19, + "kind": "fail", + "level": "warning", + "message": { + "text": "backward branch (for loop) is ID-dependent due to variable reference to 'itemCount' and may cause performance degradation" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 341, + "startColumn": 22, + "charOffset": 9520, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 339, + "startColumn": 22, + "charOffset": 9495, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tfor (int32_t i = 1; i <= itemCount; ++i) {\n\t\tint32_t stackCount = subType;\n\t\tif (it.stackable) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5c551d52e73f1856c34d71d28a1b839e5c2a51a688e5dc69eb13f8539e9bd6e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 348, + "startColumn": 57, + "charOffset": 9745, + "charLength": 10, + "snippet": { + "text": "stackCount" + } + }, + "contextRegion": { + "startLine": 346, + "startColumn": 57, + "charOffset": 9684, + "charLength": 10, + "snippet": { + "text": "\t\t}\n\n\t\tstd::shared_ptr item = Item::CreateItem(itemId, stackCount);\n\t\tif (!item) {\n\t\t\tif (!hasTable) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8bd254d1d853f8348b67c6db861cee5bbf2e7caf6940de5f1227f41e63388047" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 349, + "startColumn": 7, + "charOffset": 9764, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 347, + "startColumn": 7, + "charOffset": 9688, + "charLength": 1, + "snippet": { + "text": "\n\t\tstd::shared_ptr item = Item::CreateItem(itemId, stackCount);\n\t\tif (!item) {\n\t\t\tif (!hasTable) {\n\t\t\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "60ac8292d695eb2885df1c4316b298d61bc1ec5304f217c55b5a24bc9601b57b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 358, + "startColumn": 8, + "charOffset": 9932, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 356, + "startColumn": 8, + "charOffset": 9836, + "charLength": 1, + "snippet": { + "text": "\t\tif (position.x != 0) {\n\t\t\tstd::shared_ptr tile = g_game().map.getTile(position);\n\t\t\tif (!tile) {\n\t\t\t\tif (!hasTable) {\n\t\t\t\t\tlua_pushnil(L);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ba37b394c87f7a620c0c0213def3c9f9f7badcae9d232358c8de207f1aa4f0ab" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 378, + "startColumn": 22, + "charOffset": 10350, + "charLength": 1, + "snippet": { + "text": "i" + } + }, + "contextRegion": { + "startLine": 376, + "startColumn": 22, + "charOffset": 10310, + "charLength": 1, + "snippet": { + "text": "\n\t\tif (hasTable) {\n\t\t\tlua_pushnumber(L, i);\n\t\t\tpushUserdata(L, item);\n\t\t\tsetItemMetatable(L, -1, item);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bf768802b11b8af87e50e6a90b700df0d4339249490d71ad25c9de897e6e0f69" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'id' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 394, + "startColumn": 11, + "charOffset": 10706, + "charLength": 2, + "snippet": { + "text": "id" + } + }, + "contextRegion": { + "startLine": 392, + "startColumn": 11, + "charOffset": 10601, + "charLength": 2, + "snippet": { + "text": "\t// Game.createContainer(itemId, size[, position])\n\tuint16_t size = getNumber(L, 2);\n\tuint16_t id;\n\tif (isNumber(L, 1)) {\n\t\tid = getNumber(L, 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "350c3cb96089088e7a2fb9577ee52f77aae4e88785109f404a7a115a2e648705" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 406, + "startColumn": 6, + "charOffset": 10971, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 404, + "startColumn": 6, + "charOffset": 10886, + "charLength": 1, + "snippet": { + "text": "\n\tstd::shared_ptr container = Item::CreateItemAsContainer(id, size);\n\tif (!container) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "877985ad77d77b9ade792af98834417ff4216819c427d0f21e72829e7f03a978" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 414, + "startColumn": 7, + "charOffset": 11163, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 412, + "startColumn": 7, + "charOffset": 11046, + "charLength": 1, + "snippet": { + "text": "\t\tconst Position &position = getPosition(L, 3);\n\t\tstd::shared_ptr tile = g_game().map.getTile(position);\n\t\tif (!tile) {\n\t\t\tlua_pushnil(L);\n\t\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "564ec4734cb80ca8aad8e51b979b2df6fc2bf85acae28ca4f4070a7902091b76" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 419, + "startColumn": 12, + "charOffset": 11220, + "charLength": 15, + "snippet": { + "text": "internalAddItem" + } + }, + "contextRegion": { + "startLine": 417, + "startColumn": 12, + "charOffset": 11204, + "charLength": 15, + "snippet": { + "text": "\t\t}\n\n\t\tg_game().internalAddItem(tile, container, INDEX_WHEREEVER, FLAG_NOLIMIT);\n\t} else {\n\t\tgetScriptEnv()->addTempItem(container);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "56eedb634047fcd685c4d9859415e4de266f2db3a7e8206dfd55a2e4b7b6043b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 433, + "startColumn": 6, + "charOffset": 11712, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 431, + "startColumn": 6, + "charOffset": 11544, + "charLength": 1, + "snippet": { + "text": "\t// Game.createMonster(monsterName, position[, extended = false[, force = false[, master = nil]]])\n\tconst auto &monster = Monster::createMonster(getString(L, 1));\n\tif (!monster) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f255385c810bfdc3feb1a29d38f01fe9a0b1177c064119cb545eb8f2b856268a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 439, + "startColumn": 23, + "charOffset": 11804, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 437, + "startColumn": 23, + "charOffset": 11757, + "charLength": 1, + "snippet": { + "text": "\n\tbool isSummon = false;\n\tif (lua_gettop(L) >= 5) {\n\t\tif (const auto &master = getCreature(L, 5)) {\n\t\t\tmonster->setMaster(master, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b91f08327457fe4bb05855e7fecdcbfc96b6d32030e354bc6b82a918c4e4c111" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 440, + "startColumn": 43, + "charOffset": 11851, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 438, + "startColumn": 43, + "charOffset": 11758, + "charLength": 1, + "snippet": { + "text": "\tbool isSummon = false;\n\tif (lua_gettop(L) >= 5) {\n\t\tif (const auto &master = getCreature(L, 5)) {\n\t\t\tmonster->setMaster(master, true);\n\t\t\tisSummon = true;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d3f6081c7592e4fc00c4c9d9998139a297403fc89dda16c637bad859263daee3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 441, + "startColumn": 13, + "charOffset": 11869, + "charLength": 9, + "snippet": { + "text": "setMaster" + } + }, + "contextRegion": { + "startLine": 439, + "startColumn": 13, + "charOffset": 11782, + "charLength": 9, + "snippet": { + "text": "\tif (lua_gettop(L) >= 5) {\n\t\tif (const auto &master = getCreature(L, 5)) {\n\t\t\tmonster->setMaster(master, true);\n\t\t\tisSummon = true;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "029a75b1e38259bad3d6c0e2a9705800b5ef7bd249b58ea729f14a269b6c59be" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 454, + "startColumn": 4, + "charOffset": 12446, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 452, + "startColumn": 4, + "charOffset": 12287, + "charLength": 3, + "snippet": { + "text": "\t\tconst auto &mtype = monster->getMonsterType();\n\t\tif (mtype && mtype->info.raceid > 0 && mtype->info.bosstiaryRace == BosstiaryRarity_t::RARITY_ARCHFOE) {\n\t\t\tfor (const auto &spectator : Spectators().find(monster->getPosition(), true)) {\n\t\t\t\tif (const auto &tmpPlayer = spectator->getPlayer()) {\n\t\t\t\t\ttmpPlayer->sendBosstiaryCooldownTimer();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "93db00fff1e41b0a861b1c86b7b965735c78a6dc0ed95e056ee65986a2b0add7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 465, + "startColumn": 13, + "charOffset": 12765, + "charLength": 9, + "snippet": { + "text": "setMaster" + } + }, + "contextRegion": { + "startLine": 463, + "startColumn": 13, + "charOffset": 12725, + "charLength": 9, + "snippet": { + "text": "\t} else {\n\t\tif (isSummon) {\n\t\t\tmonster->setMaster(nullptr);\n\t\t} else {\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "333d68fa38258cd7fe1405fc58517520d52aa8ecd1b0d6af6b534008e8b44792" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 476, + "startColumn": 6, + "charOffset": 12985, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 474, + "startColumn": 6, + "charOffset": 12889, + "charLength": 1, + "snippet": { + "text": "\t// Game.generateNpc(npcName)\n\tstd::shared_ptr npc = Npc::createNpc(getString(L, 1));\n\tif (!npc) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0d3e54e364356a8c4cc4e57dd0eb3b284fddff3a2e83639e5eb5a4cdf8380ceb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "llvm-else-after-return", + "ruleIndex": 581, + "kind": "fail", + "level": "warning", + "message": { + "text": "do not use 'else' after 'return'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 479, + "startColumn": 4, + "charOffset": 13026, + "charLength": 4, + "snippet": { + "text": "else" + } + }, + "contextRegion": { + "startLine": 477, + "startColumn": 4, + "charOffset": 12993, + "charLength": 4, + "snippet": { + "text": "\t\tlua_pushnil(L);\n\t\treturn 1;\n\t} else {\n\t\tpushUserdata(L, npc);\n\t\tsetMetatable(L, -1, \"Npc\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8e9fb15a52ced836f8b622fa08955ab8ccd48450019d2e0780ce8d164908667c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 489, + "startColumn": 6, + "charOffset": 13302, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 487, + "startColumn": 6, + "charOffset": 13161, + "charLength": 1, + "snippet": { + "text": "\t// Game.createNpc(npcName, position[, extended = false[, force = false]])\n\tstd::shared_ptr npc = Npc::createNpc(getString(L, 1));\n\tif (!npc) {\n\t\tlua_pushnil(L);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d4ec3497bb1c609a70afa2465f191cafe1a2ba2d47db9184b7a96c0608bc1514" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "cppcoreguidelines-init-variables", + "ruleIndex": 490, + "kind": "fail", + "level": "warning", + "message": { + "text": "variable 'isDynamic' is not initialized" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 510, + "startColumn": 7, + "charOffset": 13819, + "charLength": 9, + "snippet": { + "text": "isDynamic" + } + }, + "contextRegion": { + "startLine": 508, + "startColumn": 7, + "charOffset": 13742, + "charLength": 9, + "snippet": { + "text": "\t// Game.createTile(position[, isDynamic = false])\n\tPosition position;\n\tbool isDynamic;\n\tif (isTable(L, 1)) {\n\t\tposition = getPosition(L, 1);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "770e1c5c5908da5a36b04cd895e3138168f8c571d298b5b253a7743688286857" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 517, + "startColumn": 16, + "charOffset": 14032, + "charLength": 9, + "snippet": { + "text": "getNumber" + } + }, + "contextRegion": { + "startLine": 515, + "startColumn": 16, + "charOffset": 13933, + "charLength": 9, + "snippet": { + "text": "\t\tposition.x = getNumber(L, 1);\n\t\tposition.y = getNumber(L, 2);\n\t\tposition.z = getNumber(L, 3);\n\t\tisDynamic = getBoolean(L, 4, false);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1e5371184021ff79498f9fca05c4409fa8d78ec5f7d5a7614e13ff95fc780f5" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 529, + "startColumn": 21, + "charOffset": 14368, + "charLength": 6, + "snippet": { + "text": "c_list" + } + }, + "contextRegion": { + "startLine": 527, + "startColumn": 21, + "charOffset": 14274, + "charLength": 6, + "snippet": { + "text": "\t// Game.getBestiaryCharm()\n\tconst auto c_list = g_game().getCharmList();\n\tlua_createtable(L, c_list.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3e7dd6f5e1ab9827c9d525a2f876b65aa45733b4b25a6318bba619b2bca2a656" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 529, + "startColumn": 21, + "charOffset": 14368, + "charLength": 6, + "snippet": { + "text": "c_list" + } + }, + "contextRegion": { + "startLine": 527, + "startColumn": 21, + "charOffset": 14274, + "charLength": 6, + "snippet": { + "text": "\t// Game.getBestiaryCharm()\n\tconst auto c_list = g_game().getCharmList();\n\tlua_createtable(L, c_list.size(), 0);\n\n\tint index = 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4f06f7eb590aa0acb511cd1fd540b45f941f5ac3c577f29fae6d1d213b2e0e0f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 532, + "startColumn": 2, + "charOffset": 14405, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 530, + "startColumn": 2, + "charOffset": 14387, + "charLength": 3, + "snippet": { + "text": "\n\tint index = 0;\n\tfor (const auto &charmPtr : c_list) {\n\t\tpushUserdata(L, charmPtr);\n\t\tsetMetatable(L, -1, \"Charm\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3244f0615a34608bd4af772822692f7bbd26a43b41cfd5dae1c3f25505dfae1a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 554, + "startColumn": 6, + "charOffset": 15124, + "charLength": 18, + "snippet": { + "text": "itemClassification" + } + }, + "contextRegion": { + "startLine": 552, + "startColumn": 6, + "charOffset": 14968, + "charLength": 18, + "snippet": { + "text": "\t// Game.createItemClassification(id)\n\tconst ItemClassification* itemClassification = g_game().getItemsClassification(getNumber(L, 1), true);\n\tif (itemClassification) {\n\t\tpushUserdata(L, itemClassification);\n\t\tsetMetatable(L, -1, \"ItemClassification\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5d0fb0a7beda73d0cbcc1f4974dc836566962bab74713e2ae50e27e3f19a88b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'const ItemClassification *' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 554, + "startColumn": 6, + "charOffset": 15124, + "charLength": 18, + "snippet": { + "text": "itemClassification" + } + }, + "contextRegion": { + "startLine": 552, + "startColumn": 6, + "charOffset": 14968, + "charLength": 18, + "snippet": { + "text": "\t// Game.createItemClassification(id)\n\tconst ItemClassification* itemClassification = g_game().getItemsClassification(getNumber(L, 1), true);\n\tif (itemClassification) {\n\t\tpushUserdata(L, itemClassification);\n\t\tsetMetatable(L, -1, \"ItemClassification\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c3795e54caf9b8bdcd5af6b191a68efb080f783be07194787255c41a14747891" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 568, + "startColumn": 6, + "charOffset": 15495, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 566, + "startColumn": 6, + "charOffset": 15430, + "charLength": 1, + "snippet": { + "text": "\n\tconst auto raid = g_game().raids.getRaidByName(raidName);\n\tif (!raid || !raid->isLoaded()) {\n\t\tlua_pushnumber(L, RETURNVALUE_NOSUCHRAIDEXISTS);\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "529fc4ccee27f98d14b716765105d4dbc5dc91308be3fa308570a1fc8fb8b90c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 569, + "startColumn": 21, + "charOffset": 15545, + "charLength": 28, + "snippet": { + "text": "RETURNVALUE_NOSUCHRAIDEXISTS" + } + }, + "contextRegion": { + "startLine": 567, + "startColumn": 21, + "charOffset": 15431, + "charLength": 28, + "snippet": { + "text": "\tconst auto raid = g_game().raids.getRaidByName(raidName);\n\tif (!raid || !raid->isLoaded()) {\n\t\tlua_pushnumber(L, RETURNVALUE_NOSUCHRAIDEXISTS);\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0c8a8a47860117a7f6d900ebc87c0bfeec228a7768d770d96e3e902e254f990f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 574, + "startColumn": 21, + "charOffset": 15648, + "charLength": 41, + "snippet": { + "text": "RETURNVALUE_ANOTHERRAIDISALREADYEXECUTING" + } + }, + "contextRegion": { + "startLine": 572, + "startColumn": 21, + "charOffset": 15591, + "charLength": 41, + "snippet": { + "text": "\n\tif (g_game().raids.getRunning()) {\n\t\tlua_pushnumber(L, RETURNVALUE_ANOTHERRAIDISALREADYEXECUTING);\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b6044580144b6c364e6e96c5372e150dcf8f198051aa9715adc2a477cf7c0fae" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 580, + "startColumn": 20, + "charOffset": 15781, + "charLength": 19, + "snippet": { + "text": "RETURNVALUE_NOERROR" + } + }, + "contextRegion": { + "startLine": 578, + "startColumn": 20, + "charOffset": 15708, + "charLength": 19, + "snippet": { + "text": "\tg_game().raids.setRunning(raid);\n\traid->startRaid();\n\tlua_pushnumber(L, RETURNVALUE_NOERROR);\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6c1dd4d2d02a6281b202241f9e5be2addce722a2fb183fe134cc993b3e032829" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 587, + "startColumn": 21, + "charOffset": 15951, + "charLength": 14, + "snippet": { + "text": "CLIENT_VERSION" + } + }, + "contextRegion": { + "startLine": 585, + "startColumn": 21, + "charOffset": 15876, + "charLength": 14, + "snippet": { + "text": "\t// Game.getClientVersion()\n\tlua_createtable(L, 0, 3);\n\tsetField(L, \"min\", CLIENT_VERSION);\n\tsetField(L, \"max\", CLIENT_VERSION);\n\tstd::string version = fmt::format(\"{}.{}\", CLIENT_VERSION_UPPER, CLIENT_VERSION_LOWER);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6ab2e3602f9af253c85122e1ecdc138a10de33639cd972bb7bbbbd123ccb1c12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 588, + "startColumn": 21, + "charOffset": 15988, + "charLength": 14, + "snippet": { + "text": "CLIENT_VERSION" + } + }, + "contextRegion": { + "startLine": 586, + "startColumn": 21, + "charOffset": 15904, + "charLength": 14, + "snippet": { + "text": "\tlua_createtable(L, 0, 3);\n\tsetField(L, \"min\", CLIENT_VERSION);\n\tsetField(L, \"max\", CLIENT_VERSION);\n\tstd::string version = fmt::format(\"{}.{}\", CLIENT_VERSION_UPPER, CLIENT_VERSION_LOWER);\n\tsetField(L, \"string\", version);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9fef6feddfcd6319f3d707354926decf583473cd595005207072031a1341f443" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 597, + "startColumn": 6, + "charOffset": 16273, + "charLength": 12, + "snippet": { + "text": "g_gameReload" + } + }, + "contextRegion": { + "startLine": 595, + "startColumn": 6, + "charOffset": 16190, + "charLength": 12, + "snippet": { + "text": "\t// Game.reload(reloadType)\n\tReload_t reloadType = getNumber(L, 1);\n\tif (g_gameReload().getReloadNumber(reloadType) == g_gameReload().getReloadNumber(Reload_t::RELOAD_TYPE_NONE)) {\n\t\treportErrorFunc(\"Reload type is none\");\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f6463ce7042da24adb71619db1e5524d755b00bc8e072e45986df6c3116f76f0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 597, + "startColumn": 52, + "charOffset": 16319, + "charLength": 12, + "snippet": { + "text": "g_gameReload" + } + }, + "contextRegion": { + "startLine": 595, + "startColumn": 52, + "charOffset": 16190, + "charLength": 12, + "snippet": { + "text": "\t// Game.reload(reloadType)\n\tReload_t reloadType = getNumber(L, 1);\n\tif (g_gameReload().getReloadNumber(reloadType) == g_gameReload().getReloadNumber(Reload_t::RELOAD_TYPE_NONE)) {\n\t\treportErrorFunc(\"Reload type is none\");\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "793d9e9afd151a74b25f107bcee2b193e83bb9c28cf8b83265660b2b9b6fb60d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 598, + "startColumn": 3, + "charOffset": 16383, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 596, + "startColumn": 3, + "charOffset": 16218, + "charLength": 15, + "snippet": { + "text": "\tReload_t reloadType = getNumber(L, 1);\n\tif (g_gameReload().getReloadNumber(reloadType) == g_gameReload().getReloadNumber(Reload_t::RELOAD_TYPE_NONE)) {\n\t\treportErrorFunc(\"Reload type is none\");\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb5891d8678f163b60a78e48d5bf50bb416e825d2c6f575c35af98234735dea7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 603, + "startColumn": 6, + "charOffset": 16469, + "charLength": 12, + "snippet": { + "text": "g_gameReload" + } + }, + "contextRegion": { + "startLine": 601, + "startColumn": 6, + "charOffset": 16460, + "charLength": 12, + "snippet": { + "text": "\t}\n\n\tif (g_gameReload().getReloadNumber(reloadType) >= g_gameReload().getReloadNumber(Reload_t::RELOAD_TYPE_LAST)) {\n\t\treportErrorFunc(\"Reload type not exist\");\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "eb1b199b3d9618810518b7788d8d9bb3a5dc4b58502411b96bc45863b63bf5e0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 603, + "startColumn": 52, + "charOffset": 16515, + "charLength": 12, + "snippet": { + "text": "g_gameReload" + } + }, + "contextRegion": { + "startLine": 601, + "startColumn": 52, + "charOffset": 16460, + "charLength": 12, + "snippet": { + "text": "\t}\n\n\tif (g_gameReload().getReloadNumber(reloadType) >= g_gameReload().getReloadNumber(Reload_t::RELOAD_TYPE_LAST)) {\n\t\treportErrorFunc(\"Reload type not exist\");\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3fb4637c81b97ac657bddbc010c59b206c716b97197c6e81772c6466c0c48f79" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 604, + "startColumn": 3, + "charOffset": 16579, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 602, + "startColumn": 3, + "charOffset": 16463, + "charLength": 15, + "snippet": { + "text": "\n\tif (g_gameReload().getReloadNumber(reloadType) >= g_gameReload().getReloadNumber(Reload_t::RELOAD_TYPE_LAST)) {\n\t\treportErrorFunc(\"Reload type not exist\");\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a75d14ca12a46f01d958f24a821eacfb760768689c2ea3fa0e5f3772e4d54068" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-static-accessed-through-instance", + "ruleIndex": 729, + "kind": "fail", + "level": "warning", + "message": { + "text": "static member accessed through instance" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 609, + "startColumn": 17, + "charOffset": 16678, + "charLength": 12, + "snippet": { + "text": "g_gameReload" + } + }, + "contextRegion": { + "startLine": 607, + "startColumn": 17, + "charOffset": 16658, + "charLength": 12, + "snippet": { + "text": "\t}\n\n\tpushBoolean(L, g_gameReload().init(reloadType));\n\tlua_gc(g_luaEnvironment().getLuaState(), LUA_GCCOLLECT, 0);\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "08bb21ee470ea955f1f33630ec4ea3d8880091cd31a51c843817ac20141eca95" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-0-1-7", + "ruleIndex": 396, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 0-1-7: The value returned by a function having non-void return type that is not an overloaded operator shall always be used" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 610, + "startColumn": 2, + "charOffset": 16713, + "charLength": 6, + "snippet": { + "text": "lua_gc" + } + }, + "contextRegion": { + "startLine": 608, + "startColumn": 2, + "charOffset": 16661, + "charLength": 6, + "snippet": { + "text": "\n\tpushBoolean(L, g_gameReload().init(reloadType));\n\tlua_gc(g_luaEnvironment().getLuaState(), LUA_GCCOLLECT, 0);\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d93dc7167d5ab107d9385bc1396b05cddfe0eb097e0ff53dae7461eb99754973" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 631, + "startColumn": 2, + "charOffset": 17332, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 629, + "startColumn": 2, + "charOffset": 17250, + "charLength": 2, + "snippet": { + "text": "\t// Game.getOfflinePlayer(name or id)\n\tstd::shared_ptr player = nullptr;\n\tif (isNumber(L, 1)) {\n\t\tuint32_t id = getNumber(L, 1);\n\t\tif (id >= Player::getFirstID() && id <= Player::getLastID()) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6565a01b92c15d5285add9404d77b1b70086fe14f29be7d25e8aeb26dd19bc13" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 642, + "startColumn": 6, + "charOffset": 17689, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 640, + "startColumn": 6, + "charOffset": 17632, + "charLength": 1, + "snippet": { + "text": "\t\tplayer = g_game().getPlayerByName(name, true);\n\t}\n\tif (!player) {\n\t\tlua_pushnil(L);\n\t} else {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f18a3072afa97d6f359d40a3731d54ff212422837c935e550c9677e25aa83bef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 680, + "startColumn": 6, + "charOffset": 18653, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 678, + "startColumn": 6, + "charOffset": 18539, + "charLength": 1, + "snippet": { + "text": "\t// Game.addInfluencedMonster(monster)\n\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_NOT_FOUND));\n\t\tpushBoolean(L, false);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c4051308f859c0de6d338b3bf653bc1bfbc5191b12fbc369fcde030741c76fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 681, + "startColumn": 3, + "charOffset": 18667, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 679, + "startColumn": 3, + "charOffset": 18578, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr monster = getUserdataShared(L, 1);\n\tif (!monster) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_NOT_FOUND));\n\t\tpushBoolean(L, false);\n\t\treturn 0;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "170fe2f6922f6f6eb4d26f5ee6751577b322cafd86d6608d8996f3520500bfd3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'int'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 686, + "startColumn": 21, + "charOffset": 18788, + "charLength": 6, + "snippet": { + "text": "g_game" + } + }, + "contextRegion": { + "startLine": 684, + "startColumn": 21, + "charOffset": 18764, + "charLength": 6, + "snippet": { + "text": "\t}\n\n\tlua_pushboolean(L, g_game().addInfluencedMonster(monster));\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6706408c2e2d6b161f60709622f81d978f179f7319b52824b4cee4dec8da4632" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 694, + "startColumn": 20, + "charOffset": 19061, + "charLength": 6, + "snippet": { + "text": "g_game" + } + }, + "contextRegion": { + "startLine": 692, + "startColumn": 20, + "charOffset": 18953, + "charLength": 6, + "snippet": { + "text": "\tuint32_t monsterId = getNumber(L, 1);\n\tauto create = getBoolean(L, 2, false);\n\tlua_pushnumber(L, g_game().removeInfluencedMonster(monsterId, create));\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1cc48dfa8f4089a1ca0348260c3232090a170819dc388ad5ef6c5e730bac1fe0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 694, + "startColumn": 20, + "charOffset": 19061, + "charLength": 6, + "snippet": { + "text": "g_game" + } + }, + "contextRegion": { + "startLine": 692, + "startColumn": 20, + "charOffset": 18953, + "charLength": 6, + "snippet": { + "text": "\tuint32_t monsterId = getNumber(L, 1);\n\tauto create = getBoolean(L, 2, false);\n\tlua_pushnumber(L, g_game().removeInfluencedMonster(monsterId, create));\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "66b7fcd59d32921f715f62dac1370fc8ab1ce168d38d8aade4a5e10337830699" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 703, + "startColumn": 2, + "charOffset": 19359, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 701, + "startColumn": 2, + "charOffset": 19283, + "charLength": 3, + "snippet": { + "text": "\tlua_createtable(L, static_cast(monsters.size()), 0);\n\tint index = 0;\n\tfor (const auto &monsterId : monsters) {\n\t\t++index;\n\t\tlua_pushnumber(L, monsterId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1baabec7ebcdbac6bb4472a0e437b3fb05654ee47a2462de04050c26e8223499" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 705, + "startColumn": 21, + "charOffset": 19431, + "charLength": 9, + "snippet": { + "text": "monsterId" + } + }, + "contextRegion": { + "startLine": 703, + "startColumn": 21, + "charOffset": 19358, + "charLength": 9, + "snippet": { + "text": "\tfor (const auto &monsterId : monsters) {\n\t\t++index;\n\t\tlua_pushnumber(L, monsterId);\n\t\tlua_rawseti(L, -2, index);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9dda8beb6f2c9fbdeeef9811f5449eee4ba3f66368e42ddd45b1fe60c67ce69b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 717, + "startColumn": 2, + "charOffset": 19693, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 715, + "startColumn": 2, + "charOffset": 19618, + "charLength": 3, + "snippet": { + "text": "\tlua_createtable(L, static_cast(ladders.size()), 0);\n\tint index = 0;\n\tfor (const auto ladderId : ladders) {\n\t\t++index;\n\t\tlua_pushnumber(L, static_cast(ladderId));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6938f6e77f4461fddb1444e7cb57ca3e914f51b3ce41ea68d7e101db274cba7a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 737, + "startColumn": 21, + "charOffset": 20274, + "charLength": 7, + "snippet": { + "text": "dummies" + } + }, + "contextRegion": { + "startLine": 735, + "startColumn": 21, + "charOffset": 20205, + "charLength": 7, + "snippet": { + "text": "\n\tconst auto &dummies = Item::items.getDummys();\n\tlua_createtable(L, dummies.size(), 0);\n\tfor (const auto &[dummyId, rate] : dummies) {\n\t\tlua_pushnumber(L, static_cast(rate));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "254fdcc8e0879e9a6873d40bc939a0aa9c77c67cf115a155b2f1af446d868971" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 737, + "startColumn": 21, + "charOffset": 20274, + "charLength": 7, + "snippet": { + "text": "dummies" + } + }, + "contextRegion": { + "startLine": 735, + "startColumn": 21, + "charOffset": 20205, + "charLength": 7, + "snippet": { + "text": "\n\tconst auto &dummies = Item::items.getDummys();\n\tlua_createtable(L, dummies.size(), 0);\n\tfor (const auto &[dummyId, rate] : dummies) {\n\t\tlua_pushnumber(L, static_cast(rate));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5b38eb9a8bb7e3251f26067a1a17d01c59e181ba46da0cde93775b1c7caafb97" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 738, + "startColumn": 2, + "charOffset": 20295, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 736, + "startColumn": 2, + "charOffset": 20206, + "charLength": 3, + "snippet": { + "text": "\tconst auto &dummies = Item::items.getDummys();\n\tlua_createtable(L, dummies.size(), 0);\n\tfor (const auto &[dummyId, rate] : dummies) {\n\t\tlua_pushnumber(L, static_cast(rate));\n\t\tlua_rawseti(L, -2, dummyId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d0277a21317f797c28a9e5f224229025d78176a34e5ad29aecb7781051c2c411" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "hicpp-use-auto", + "ruleIndex": 572, + "kind": "fail", + "level": "warning", + "message": { + "text": "use auto when initializing with a template cast to avoid duplicating the type name" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 747, + "startColumn": 2, + "charOffset": 20556, + "charLength": 8, + "snippet": { + "text": "uint32_t" + } + }, + "contextRegion": { + "startLine": 745, + "startColumn": 2, + "charOffset": 20441, + "charLength": 8, + "snippet": { + "text": "int GameFunctions::luaGameMakeFiendishMonster(lua_State* L) {\n\t// Game.makeFiendishMonster(monsterId[default= 0])\n\tuint32_t monsterId = getNumber(L, 1, 0);\n\tauto createForgeableMonsters = getBoolean(L, 2, false);\n\tlua_pushnumber(L, g_game().makeFiendishMonster(monsterId, createForgeableMonsters));" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e89849b25a307e864dbbdedfd6cd62ea5fd49052d5b0e11dee60fc9e5387e850" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 749, + "startColumn": 20, + "charOffset": 20683, + "charLength": 6, + "snippet": { + "text": "g_game" + } + }, + "contextRegion": { + "startLine": 747, + "startColumn": 20, + "charOffset": 20555, + "charLength": 6, + "snippet": { + "text": "\tuint32_t monsterId = getNumber(L, 1, 0);\n\tauto createForgeableMonsters = getBoolean(L, 2, false);\n\tlua_pushnumber(L, g_game().makeFiendishMonster(monsterId, createForgeableMonsters));\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "be91f1aa64249a3f4798fddbb47d085cd454205316e1e777e8ffec57087beafd" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 757, + "startColumn": 20, + "charOffset": 20978, + "charLength": 6, + "snippet": { + "text": "g_game" + } + }, + "contextRegion": { + "startLine": 755, + "startColumn": 20, + "charOffset": 20870, + "charLength": 6, + "snippet": { + "text": "\tuint32_t monsterId = getNumber(L, 1);\n\tauto create = getBoolean(L, 2, false);\n\tlua_pushnumber(L, g_game().removeFiendishMonster(monsterId, create));\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ea833f8f333cf455575d8f83057a4cfc2988e634c23b27de521ebb4781f71ca3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 757, + "startColumn": 20, + "charOffset": 20978, + "charLength": 6, + "snippet": { + "text": "g_game" + } + }, + "contextRegion": { + "startLine": 755, + "startColumn": 20, + "charOffset": 20870, + "charLength": 6, + "snippet": { + "text": "\tuint32_t monsterId = getNumber(L, 1);\n\tauto create = getBoolean(L, 2, false);\n\tlua_pushnumber(L, g_game().removeFiendishMonster(monsterId, create));\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "356fca853b8336e4a179b73876dc0866849c0c0c852018d2c07c98faa138112b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 767, + "startColumn": 2, + "charOffset": 21269, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 765, + "startColumn": 2, + "charOffset": 21193, + "charLength": 3, + "snippet": { + "text": "\tlua_createtable(L, static_cast(monsters.size()), 0);\n\tint index = 0;\n\tfor (const auto &monsterId : monsters) {\n\t\t++index;\n\t\tlua_pushnumber(L, monsterId);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "62c3833093892b195c436bb3dcdcdfc75aad24ca9bef3bc126a3790a40e81661" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 769, + "startColumn": 21, + "charOffset": 21341, + "charLength": 9, + "snippet": { + "text": "monsterId" + } + }, + "contextRegion": { + "startLine": 767, + "startColumn": 21, + "charOffset": 21268, + "charLength": 9, + "snippet": { + "text": "\tfor (const auto &monsterId : monsters) {\n\t\t++index;\n\t\tlua_pushnumber(L, monsterId);\n\t\tlua_rawseti(L, -2, index);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3ee7dfe4f2cd913d8bb2a66b203ca4938c3b749ea8e2032943497319b4ff82fb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 787, + "startColumn": 2, + "charOffset": 21767, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 785, + "startColumn": 2, + "charOffset": 21700, + "charLength": 3, + "snippet": { + "text": "\tlua_createtable(L, static_cast(talkactionsMap.size()), 0);\n\n\tfor (const auto &[talkName, talkactionSharedPtr] : talkactionsMap) {\n\t\tpushUserdata(L, talkactionSharedPtr);\n\t\tsetMetatable(L, -1, \"TalkAction\");" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "fa98a79c5f78111e55fe83c0dc5668409c588f295f6739c45e95328422a9db32" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 798, + "startColumn": 2, + "charOffset": 22140, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 796, + "startColumn": 2, + "charOffset": 22043, + "charLength": 3, + "snippet": { + "text": "\tlua_createtable(L, 0, 0);\n\tlua_pushcfunction(L, EventCallbackFunctions::luaEventCallbackLoad);\n\tfor (auto [value, name] : magic_enum::enum_entries()) {\n\t\tif (value != EventCallback_t::none) {\n\t\t\tstd::string methodName = magic_enum::enum_name(value).data();" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "52d2a72fdba2c5ffa523d82f6e80eb3bbe39abc8dbdb4ae43508e9b3af8c22c6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 814, + "startColumn": 22, + "charOffset": 22683, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 812, + "startColumn": 22, + "charOffset": 22525, + "charLength": 1, + "snippet": { + "text": "int GameFunctions::luaGameRegisterAchievement(lua_State* L) {\n\t// Game.registerAchievement(id, name, description, secret, grade, points)\n\tif (lua_gettop(L) < 6) {\n\t\treportErrorFunc(\"Achievement can only be registered with all params.\");\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfe723e1eb9df4a19d0f8392e3d04af9a870a4012390747a063ef7237cbe7b92" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 815, + "startColumn": 3, + "charOffset": 22690, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 813, + "startColumn": 3, + "charOffset": 22587, + "charLength": 15, + "snippet": { + "text": "\t// Game.registerAchievement(id, name, description, secret, grade, points)\n\tif (lua_gettop(L) < 6) {\n\t\treportErrorFunc(\"Achievement can only be registered with all params.\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "541c0d34986c98b530992c53d54ec18a3d78393b06f273824e2fa45847408368" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "5 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 823, + "startColumn": 40, + "charOffset": 22973, + "charLength": 1, + "snippet": { + "text": "5" + } + }, + "contextRegion": { + "startLine": 821, + "startColumn": 40, + "charOffset": 22857, + "charLength": 1, + "snippet": { + "text": "\tstd::string description = getString(L, 3);\n\tbool secret = getBoolean(L, 4);\n\tuint8_t grade = getNumber(L, 5);\n\tuint8_t points = getNumber(L, 6);\n\tg_game().registerAchievement(id, name, description, secret, grade, points);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ee82e6f9da9710feffaeb604bb739bfb2a72164db0fb715e1c998eb75949e48e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 824, + "startColumn": 41, + "charOffset": 23017, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 822, + "startColumn": 41, + "charOffset": 22901, + "charLength": 1, + "snippet": { + "text": "\tbool secret = getBoolean(L, 4);\n\tuint8_t grade = getNumber(L, 5);\n\tuint8_t points = getNumber(L, 6);\n\tg_game().registerAchievement(id, name, description, secret, grade, points);\n\tpushBoolean(L, true);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3b92fe7d726e371eba360b6c22564face8ba06fada7718bb7d87633992da5c8b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 835, + "startColumn": 3, + "charOffset": 23368, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 833, + "startColumn": 3, + "charOffset": 23278, + "charLength": 15, + "snippet": { + "text": "\tAchievement achievement = g_game().getAchievementById(id);\n\tif (achievement.id == 0) {\n\t\treportErrorFunc(\"Achievement id is wrong\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d487800c8dfc1965b4cb6f3ddb9ef4dea96d4c8f767134f8fe4e392acfb44cc7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 839, + "startColumn": 24, + "charOffset": 23451, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 837, + "startColumn": 24, + "charOffset": 23424, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tlua_createtable(L, 0, 6);\n\tsetField(L, \"id\", achievement.id);\n\tsetField(L, \"name\", achievement.name);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dfe723e1eb9df4a19d0f8392e3d04af9a870a4012390747a063ef7237cbe7b92" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 840, + "startColumn": 20, + "charOffset": 23474, + "charLength": 11, + "snippet": { + "text": "achievement" + } + }, + "contextRegion": { + "startLine": 838, + "startColumn": 20, + "charOffset": 23427, + "charLength": 11, + "snippet": { + "text": "\n\tlua_createtable(L, 0, 6);\n\tsetField(L, \"id\", achievement.id);\n\tsetField(L, \"name\", achievement.name);\n\tsetField(L, \"description\", achievement.description);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f7f5f6a6de752f3f93983d3d5472a5a2159e1248b4e24331f2c4a2db1cf724b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 843, + "startColumn": 24, + "charOffset": 23608, + "charLength": 11, + "snippet": { + "text": "achievement" + } + }, + "contextRegion": { + "startLine": 841, + "startColumn": 24, + "charOffset": 23491, + "charLength": 11, + "snippet": { + "text": "\tsetField(L, \"name\", achievement.name);\n\tsetField(L, \"description\", achievement.description);\n\tsetField(L, \"points\", achievement.points);\n\tsetField(L, \"grade\", achievement.grade);\n\tsetField(L, \"secret\", achievement.secret);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bfe6c464eee0b537203d0b6c2bcc61010f978ddb80dd696fcdef6bf93279f217" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 844, + "startColumn": 23, + "charOffset": 23651, + "charLength": 11, + "snippet": { + "text": "achievement" + } + }, + "contextRegion": { + "startLine": 842, + "startColumn": 23, + "charOffset": 23531, + "charLength": 11, + "snippet": { + "text": "\tsetField(L, \"description\", achievement.description);\n\tsetField(L, \"points\", achievement.points);\n\tsetField(L, \"grade\", achievement.grade);\n\tsetField(L, \"secret\", achievement.secret);\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f5b61dc8be56d3def43b67b0fdbf5e40ff6e039a257e70dd4447dd2110b33de" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 845, + "startColumn": 24, + "charOffset": 23694, + "charLength": 11, + "snippet": { + "text": "achievement" + } + }, + "contextRegion": { + "startLine": 843, + "startColumn": 24, + "charOffset": 23585, + "charLength": 11, + "snippet": { + "text": "\tsetField(L, \"points\", achievement.points);\n\tsetField(L, \"grade\", achievement.grade);\n\tsetField(L, \"secret\", achievement.secret);\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bb357ad12c598df47090259b0419d3ef804fbdbb01283497c46aee772d27196b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 845, + "startColumn": 24, + "charOffset": 23694, + "charLength": 11, + "snippet": { + "text": "achievement" + } + }, + "contextRegion": { + "startLine": 843, + "startColumn": 24, + "charOffset": 23585, + "charLength": 11, + "snippet": { + "text": "\tsetField(L, \"points\", achievement.points);\n\tsetField(L, \"grade\", achievement.grade);\n\tsetField(L, \"secret\", achievement.secret);\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9cd5d9e89f8f75670e2fd667d3794ef574c3787335aba70a957dd7074cedbb25" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 854, + "startColumn": 3, + "charOffset": 23967, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 852, + "startColumn": 3, + "charOffset": 23873, + "charLength": 15, + "snippet": { + "text": "\tAchievement achievement = g_game().getAchievementByName(name);\n\tif (achievement.id == 0) {\n\t\treportErrorFunc(\"Achievement name is wrong\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "3d7db6f1e4db7c4ee64181260482cb27263f514f1512bc0cf351df45460b74e1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 858, + "startColumn": 24, + "charOffset": 24052, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 856, + "startColumn": 24, + "charOffset": 24025, + "charLength": 1, + "snippet": { + "text": "\t}\n\n\tlua_createtable(L, 0, 6);\n\tsetField(L, \"id\", achievement.id);\n\tsetField(L, \"name\", achievement.name);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d74d393ca0658542d1adf2e4182e3b97f402e15bef02e8e823b514bf29f627a0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 859, + "startColumn": 20, + "charOffset": 24075, + "charLength": 11, + "snippet": { + "text": "achievement" + } + }, + "contextRegion": { + "startLine": 857, + "startColumn": 20, + "charOffset": 24028, + "charLength": 11, + "snippet": { + "text": "\n\tlua_createtable(L, 0, 6);\n\tsetField(L, \"id\", achievement.id);\n\tsetField(L, \"name\", achievement.name);\n\tsetField(L, \"description\", achievement.description);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "25f5ec6c2d97a12ad99b891e641b755245e28c4cabc872f6e90c0c00a5151fd0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 862, + "startColumn": 24, + "charOffset": 24209, + "charLength": 11, + "snippet": { + "text": "achievement" + } + }, + "contextRegion": { + "startLine": 860, + "startColumn": 24, + "charOffset": 24092, + "charLength": 11, + "snippet": { + "text": "\tsetField(L, \"name\", achievement.name);\n\tsetField(L, \"description\", achievement.description);\n\tsetField(L, \"points\", achievement.points);\n\tsetField(L, \"grade\", achievement.grade);\n\tsetField(L, \"secret\", achievement.secret);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc0a183fca1e216e5fa92addaac2338f71cdf98058d2d406be910f6c1cb50cfe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 863, + "startColumn": 23, + "charOffset": 24252, + "charLength": 11, + "snippet": { + "text": "achievement" + } + }, + "contextRegion": { + "startLine": 861, + "startColumn": 23, + "charOffset": 24132, + "charLength": 11, + "snippet": { + "text": "\tsetField(L, \"description\", achievement.description);\n\tsetField(L, \"points\", achievement.points);\n\tsetField(L, \"grade\", achievement.grade);\n\tsetField(L, \"secret\", achievement.secret);\n\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9b48cfdc3bd5510f40c6c805109fa75a15bcfa51e8f5e9622a6b0397360938eb" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 864, + "startColumn": 24, + "charOffset": 24295, + "charLength": 11, + "snippet": { + "text": "achievement" + } + }, + "contextRegion": { + "startLine": 862, + "startColumn": 24, + "charOffset": 24186, + "charLength": 11, + "snippet": { + "text": "\tsetField(L, \"points\", achievement.points);\n\tsetField(L, \"grade\", achievement.grade);\n\tsetField(L, \"secret\", achievement.secret);\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "9dda8beb6f2c9fbdeeef9811f5449eee4ba3f66368e42ddd45b1fe60c67ce69b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 864, + "startColumn": 24, + "charOffset": 24295, + "charLength": 11, + "snippet": { + "text": "achievement" + } + }, + "contextRegion": { + "startLine": 862, + "startColumn": 24, + "charOffset": 24186, + "charLength": 11, + "snippet": { + "text": "\tsetField(L, \"points\", achievement.points);\n\tsetField(L, \"grade\", achievement.grade);\n\tsetField(L, \"secret\", achievement.secret);\n\treturn 1;\n}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a7b414775a14f09b2b1c542e322c6e31fd1452e663cb9c9bd84f67b340900232" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 872, + "startColumn": 21, + "charOffset": 24545, + "charLength": 12, + "snippet": { + "text": "achievements" + } + }, + "contextRegion": { + "startLine": 870, + "startColumn": 21, + "charOffset": 24427, + "charLength": 12, + "snippet": { + "text": "\tconst std::vector &achievements = g_game().getSecretAchievements();\n\tint index = 0;\n\tlua_createtable(L, achievements.size(), 0);\n\tfor (const auto &achievement : achievements) {\n\t\tlua_createtable(L, 0, 6);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8130f0f637ea1b297fc3ca6f56ffae4ace5da961d185fff3d6c372deb6d20a7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 872, + "startColumn": 21, + "charOffset": 24545, + "charLength": 12, + "snippet": { + "text": "achievements" + } + }, + "contextRegion": { + "startLine": 870, + "startColumn": 21, + "charOffset": 24427, + "charLength": 12, + "snippet": { + "text": "\tconst std::vector &achievements = g_game().getSecretAchievements();\n\tint index = 0;\n\tlua_createtable(L, achievements.size(), 0);\n\tfor (const auto &achievement : achievements) {\n\t\tlua_createtable(L, 0, 6);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "bc54846198a68a041ba1525c261a40a6e042b314e3ee5b2758af172dce8f18c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 873, + "startColumn": 2, + "charOffset": 24571, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 871, + "startColumn": 2, + "charOffset": 24509, + "charLength": 3, + "snippet": { + "text": "\tint index = 0;\n\tlua_createtable(L, achievements.size(), 0);\n\tfor (const auto &achievement : achievements) {\n\t\tlua_createtable(L, 0, 6);\n\t\tsetField(L, \"id\", achievement.id);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5faa6e68d7934e17cd0b17de88a0b8f81d613af589d6256e60766b529b6e4591" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 874, + "startColumn": 25, + "charOffset": 24642, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 872, + "startColumn": 25, + "charOffset": 24525, + "charLength": 1, + "snippet": { + "text": "\tlua_createtable(L, achievements.size(), 0);\n\tfor (const auto &achievement : achievements) {\n\t\tlua_createtable(L, 0, 6);\n\t\tsetField(L, \"id\", achievement.id);\n\t\tsetField(L, \"name\", achievement.name);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "531171bb6b385a2d2ab7b2e3d41f48db2fe77dd955da633a33f60ef9cf6a384c" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 875, + "startColumn": 21, + "charOffset": 24666, + "charLength": 11, + "snippet": { + "text": "achievement" + } + }, + "contextRegion": { + "startLine": 873, + "startColumn": 21, + "charOffset": 24570, + "charLength": 11, + "snippet": { + "text": "\tfor (const auto &achievement : achievements) {\n\t\tlua_createtable(L, 0, 6);\n\t\tsetField(L, \"id\", achievement.id);\n\t\tsetField(L, \"name\", achievement.name);\n\t\tsetField(L, \"description\", achievement.description);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "cb487dfc07c9dd284118bd0cc635dd0b8eff7badca40c9da380afdda04a0c139" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 878, + "startColumn": 25, + "charOffset": 24803, + "charLength": 11, + "snippet": { + "text": "achievement" + } + }, + "contextRegion": { + "startLine": 876, + "startColumn": 25, + "charOffset": 24683, + "charLength": 11, + "snippet": { + "text": "\t\tsetField(L, \"name\", achievement.name);\n\t\tsetField(L, \"description\", achievement.description);\n\t\tsetField(L, \"points\", achievement.points);\n\t\tsetField(L, \"grade\", achievement.grade);\n\t\tsetField(L, \"secret\", achievement.secret);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5884806f7b0409069e4f12e66331983591dcfea8738082a7e11d87a937a392a4" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 879, + "startColumn": 24, + "charOffset": 24847, + "charLength": 11, + "snippet": { + "text": "achievement" + } + }, + "contextRegion": { + "startLine": 877, + "startColumn": 24, + "charOffset": 24724, + "charLength": 11, + "snippet": { + "text": "\t\tsetField(L, \"description\", achievement.description);\n\t\tsetField(L, \"points\", achievement.points);\n\t\tsetField(L, \"grade\", achievement.grade);\n\t\tsetField(L, \"secret\", achievement.secret);\n\t\tlua_rawseti(L, -2, ++index);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1060ebce0d3527684dc34969058e25ce91785f062bac7d2a32f2aa1ac8b095d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 880, + "startColumn": 25, + "charOffset": 24891, + "charLength": 11, + "snippet": { + "text": "achievement" + } + }, + "contextRegion": { + "startLine": 878, + "startColumn": 25, + "charOffset": 24779, + "charLength": 11, + "snippet": { + "text": "\t\tsetField(L, \"points\", achievement.points);\n\t\tsetField(L, \"grade\", achievement.grade);\n\t\tsetField(L, \"secret\", achievement.secret);\n\t\tlua_rawseti(L, -2, ++index);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7c232a6b37825d80401f5fd7b9df2b402783d594c9094c7a69be946e0689f175" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 880, + "startColumn": 25, + "charOffset": 24891, + "charLength": 11, + "snippet": { + "text": "achievement" + } + }, + "contextRegion": { + "startLine": 878, + "startColumn": 25, + "charOffset": 24779, + "charLength": 11, + "snippet": { + "text": "\t\tsetField(L, \"points\", achievement.points);\n\t\tsetField(L, \"grade\", achievement.grade);\n\t\tsetField(L, \"secret\", achievement.secret);\n\t\tlua_rawseti(L, -2, ++index);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "ca3f6fb5dcc6a36db3b969589f8bcc913fcd3dfccbae8b43104bf9037f641dce" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 890, + "startColumn": 21, + "charOffset": 25175, + "charLength": 12, + "snippet": { + "text": "achievements" + } + }, + "contextRegion": { + "startLine": 888, + "startColumn": 21, + "charOffset": 25057, + "charLength": 12, + "snippet": { + "text": "\tconst std::vector &achievements = g_game().getPublicAchievements();\n\tint index = 0;\n\tlua_createtable(L, achievements.size(), 0);\n\tfor (const auto &achievement : achievements) {\n\t\tlua_createtable(L, 0, 6);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "328e29d0db5fa6b20661409c8a4024622f36474d3b192f3d429012b36a978463" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 890, + "startColumn": 21, + "charOffset": 25175, + "charLength": 12, + "snippet": { + "text": "achievements" + } + }, + "contextRegion": { + "startLine": 888, + "startColumn": 21, + "charOffset": 25057, + "charLength": 12, + "snippet": { + "text": "\tconst std::vector &achievements = g_game().getPublicAchievements();\n\tint index = 0;\n\tlua_createtable(L, achievements.size(), 0);\n\tfor (const auto &achievement : achievements) {\n\t\tlua_createtable(L, 0, 6);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "6de969dd62c55854f38ac436ff5eec7d8728bf88a728ecd7b9b845841cd212c7" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 891, + "startColumn": 2, + "charOffset": 25201, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 889, + "startColumn": 2, + "charOffset": 25139, + "charLength": 3, + "snippet": { + "text": "\tint index = 0;\n\tlua_createtable(L, achievements.size(), 0);\n\tfor (const auto &achievement : achievements) {\n\t\tlua_createtable(L, 0, 6);\n\t\tsetField(L, \"id\", achievement.id);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "5788a46f82570956803bb1884b1b7f2b892a0711218f69ab89612ddd3bfd73ef" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 892, + "startColumn": 25, + "charOffset": 25272, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 890, + "startColumn": 25, + "charOffset": 25155, + "charLength": 1, + "snippet": { + "text": "\tlua_createtable(L, achievements.size(), 0);\n\tfor (const auto &achievement : achievements) {\n\t\tlua_createtable(L, 0, 6);\n\t\tsetField(L, \"id\", achievement.id);\n\t\tsetField(L, \"name\", achievement.name);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f12336749434bee4b6ff735f076cb62d85a270f10e68bf10e23a7375fae38b12" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 893, + "startColumn": 21, + "charOffset": 25296, + "charLength": 11, + "snippet": { + "text": "achievement" + } + }, + "contextRegion": { + "startLine": 891, + "startColumn": 21, + "charOffset": 25200, + "charLength": 11, + "snippet": { + "text": "\tfor (const auto &achievement : achievements) {\n\t\tlua_createtable(L, 0, 6);\n\t\tsetField(L, \"id\", achievement.id);\n\t\tsetField(L, \"name\", achievement.name);\n\t\tsetField(L, \"description\", achievement.description);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0a8e0fbd7088f929f3bab41bcfc641331d4b54b340adeb645a5b72668a376f7e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 896, + "startColumn": 25, + "charOffset": 25433, + "charLength": 11, + "snippet": { + "text": "achievement" + } + }, + "contextRegion": { + "startLine": 894, + "startColumn": 25, + "charOffset": 25313, + "charLength": 11, + "snippet": { + "text": "\t\tsetField(L, \"name\", achievement.name);\n\t\tsetField(L, \"description\", achievement.description);\n\t\tsetField(L, \"points\", achievement.points);\n\t\tsetField(L, \"grade\", achievement.grade);\n\t\tsetField(L, \"secret\", achievement.secret);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b0162eba3edcf267a7c89e0d3ef4d7c0fd91ffdfc008a5d7999326a18550ed03" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 897, + "startColumn": 24, + "charOffset": 25477, + "charLength": 11, + "snippet": { + "text": "achievement" + } + }, + "contextRegion": { + "startLine": 895, + "startColumn": 24, + "charOffset": 25354, + "charLength": 11, + "snippet": { + "text": "\t\tsetField(L, \"description\", achievement.description);\n\t\tsetField(L, \"points\", achievement.points);\n\t\tsetField(L, \"grade\", achievement.grade);\n\t\tsetField(L, \"secret\", achievement.secret);\n\t\tlua_rawseti(L, -2, ++index);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4a73adeb70396026fb0363aa9f8c79a17be37e68f44fdbbb23d0d3cdaa1e3cfe" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 898, + "startColumn": 25, + "charOffset": 25521, + "charLength": 11, + "snippet": { + "text": "achievement" + } + }, + "contextRegion": { + "startLine": 896, + "startColumn": 25, + "charOffset": 25409, + "charLength": 11, + "snippet": { + "text": "\t\tsetField(L, \"points\", achievement.points);\n\t\tsetField(L, \"grade\", achievement.grade);\n\t\tsetField(L, \"secret\", achievement.secret);\n\t\tlua_rawseti(L, -2, ++index);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2c6f45d0a628b8b8ec14319210728d3d3f5a38d4ac14cfb09e0260d1e8e682e8" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 898, + "startColumn": 25, + "charOffset": 25521, + "charLength": 11, + "snippet": { + "text": "achievement" + } + }, + "contextRegion": { + "startLine": 896, + "startColumn": 25, + "charOffset": 25409, + "charLength": 11, + "snippet": { + "text": "\t\tsetField(L, \"points\", achievement.points);\n\t\tsetField(L, \"grade\", achievement.grade);\n\t\tsetField(L, \"secret\", achievement.secret);\n\t\tlua_rawseti(L, -2, ++index);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "4239176537bdf45a8066bcfb982a582181c2e5cd39211fab42475c5d359acf05" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 908, + "startColumn": 21, + "charOffset": 25794, + "charLength": 12, + "snippet": { + "text": "achievements" + } + }, + "contextRegion": { + "startLine": 906, + "startColumn": 21, + "charOffset": 25675, + "charLength": 12, + "snippet": { + "text": "\tconst std::map &achievements = g_game().getAchievements();\n\tint index = 0;\n\tlua_createtable(L, achievements.size(), 0);\n\tfor (const auto &achievement_it : achievements) {\n\t\tlua_createtable(L, 0, 6);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "122f201d782daf3ddfdd12ac3a9a371c785e4e3e57845e4060ce60df6ba46b63" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-6", + "ruleIndex": 430, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-6: An implicit integral or floating-point conversion shall not reduce the size of the underlying type" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 908, + "startColumn": 21, + "charOffset": 25794, + "charLength": 12, + "snippet": { + "text": "achievements" + } + }, + "contextRegion": { + "startLine": 906, + "startColumn": 21, + "charOffset": 25675, + "charLength": 12, + "snippet": { + "text": "\tconst std::map &achievements = g_game().getAchievements();\n\tint index = 0;\n\tlua_createtable(L, achievements.size(), 0);\n\tfor (const auto &achievement_it : achievements) {\n\t\tlua_createtable(L, 0, 6);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8142cf65edb093b53a4881f5b1e03c034cbc571d30ab738814391dca8e4e9c6b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "altera-unroll-loops", + "ruleIndex": 23, + "kind": "fail", + "level": "warning", + "message": { + "text": "kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 909, + "startColumn": 2, + "charOffset": 25820, + "charLength": 3, + "snippet": { + "text": "for" + } + }, + "contextRegion": { + "startLine": 907, + "startColumn": 2, + "charOffset": 25758, + "charLength": 3, + "snippet": { + "text": "\tint index = 0;\n\tlua_createtable(L, achievements.size(), 0);\n\tfor (const auto &achievement_it : achievements) {\n\t\tlua_createtable(L, 0, 6);\n\t\tsetField(L, \"id\", achievement_it.first);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "008cc05f66b19dfd3c375d0027e3c947dd7d7bc945a28114fe409827f9828339" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-magic-numbers", + "ruleIndex": 707, + "kind": "fail", + "level": "warning", + "message": { + "text": "6 is a magic number; consider replacing it with a named constant" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 910, + "startColumn": 25, + "charOffset": 25894, + "charLength": 1, + "snippet": { + "text": "6" + } + }, + "contextRegion": { + "startLine": 908, + "startColumn": 25, + "charOffset": 25774, + "charLength": 1, + "snippet": { + "text": "\tlua_createtable(L, achievements.size(), 0);\n\tfor (const auto &achievement_it : achievements) {\n\t\tlua_createtable(L, 0, 6);\n\t\tsetField(L, \"id\", achievement_it.first);\n\t\tsetField(L, \"name\", achievement_it.second.name);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "43abd8399b69630a401252bc143cffcccfd009fa5777b242dded7b7396756b91" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 911, + "startColumn": 21, + "charOffset": 25918, + "charLength": 14, + "snippet": { + "text": "achievement_it" + } + }, + "contextRegion": { + "startLine": 909, + "startColumn": 21, + "charOffset": 25819, + "charLength": 14, + "snippet": { + "text": "\tfor (const auto &achievement_it : achievements) {\n\t\tlua_createtable(L, 0, 6);\n\t\tsetField(L, \"id\", achievement_it.first);\n\t\tsetField(L, \"name\", achievement_it.second.name);\n\t\tsetField(L, \"description\", achievement_it.second.description);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2a7cebba4ef26517eb7548b83a91bf6562dd89dbab1706d99ecce817cc2e3b99" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 914, + "startColumn": 25, + "charOffset": 26081, + "charLength": 14, + "snippet": { + "text": "achievement_it" + } + }, + "contextRegion": { + "startLine": 912, + "startColumn": 25, + "charOffset": 25941, + "charLength": 14, + "snippet": { + "text": "\t\tsetField(L, \"name\", achievement_it.second.name);\n\t\tsetField(L, \"description\", achievement_it.second.description);\n\t\tsetField(L, \"points\", achievement_it.second.points);\n\t\tsetField(L, \"grade\", achievement_it.second.grade);\n\t\tsetField(L, \"secret\", achievement_it.second.secret);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "530ba4fb7b01edd4afb72cbc74212775663c22fb9e80454f7dfccb1d270fd32b" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 915, + "startColumn": 24, + "charOffset": 26135, + "charLength": 14, + "snippet": { + "text": "achievement_it" + } + }, + "contextRegion": { + "startLine": 913, + "startColumn": 24, + "charOffset": 25992, + "charLength": 14, + "snippet": { + "text": "\t\tsetField(L, \"description\", achievement_it.second.description);\n\t\tsetField(L, \"points\", achievement_it.second.points);\n\t\tsetField(L, \"grade\", achievement_it.second.grade);\n\t\tsetField(L, \"secret\", achievement_it.second.secret);\n\t\tlua_rawseti(L, -2, ++index);" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7fa3a5a40c03b01d431215500e23239168d9beaef6727d5cc10cd18a2f256cb3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 916, + "startColumn": 25, + "charOffset": 26189, + "charLength": 14, + "snippet": { + "text": "achievement_it" + } + }, + "contextRegion": { + "startLine": 914, + "startColumn": 25, + "charOffset": 26057, + "charLength": 14, + "snippet": { + "text": "\t\tsetField(L, \"points\", achievement_it.second.points);\n\t\tsetField(L, \"grade\", achievement_it.second.grade);\n\t\tsetField(L, \"secret\", achievement_it.second.secret);\n\t\tlua_rawseti(L, -2, ++index);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e5dceb1b4b5cb5cb0f393ab4bd313692a23ecfb3005a2d84aac713e55ceb85a9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'bool' -> 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/game_functions.cpp" + }, + "region": { + "startLine": 916, + "startColumn": 25, + "charOffset": 26189, + "charLength": 14, + "snippet": { + "text": "achievement_it" + } + }, + "contextRegion": { + "startLine": 914, + "startColumn": 25, + "charOffset": 26057, + "charLength": 14, + "snippet": { + "text": "\t\tsetField(L, \"points\", achievement_it.second.points);\n\t\tsetField(L, \"grade\", achievement_it.second.grade);\n\t\tsetField(L, \"secret\", achievement_it.second.secret);\n\t\tlua_rawseti(L, -2, ++index);\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "f8f95ae41f5134411fc293f338fc899e37b8ab4b183b4234dbd14261c9bd0f43" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/bank_functions.cpp" + }, + "region": { + "startLine": 10, + "startColumn": 3, + "charOffset": 271, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 8, + "startColumn": 3, + "charOffset": 217, + "charLength": 15, + "snippet": { + "text": "\tauto bank = getBank(L, 1);\n\tif (bank == nullptr) {\n\t\treportErrorFunc(\"Bank is nullptr\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "1681419acf940174b178254a1ff334b2d6db6c4473548d740a33b403f36dd835" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/bank_functions.cpp" + }, + "region": { + "startLine": 22, + "startColumn": 3, + "charOffset": 561, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 20, + "startColumn": 3, + "charOffset": 507, + "charLength": 15, + "snippet": { + "text": "\tauto bank = getBank(L, 1);\n\tif (bank == nullptr) {\n\t\treportErrorFunc(\"Bank is nullptr\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a41fedcdd7c38770e3eb2eb2aa82e916e869cbc22a2494b0716ea797c6ec3e39" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/bank_functions.cpp" + }, + "region": { + "startLine": 34, + "startColumn": 3, + "charOffset": 857, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 32, + "startColumn": 3, + "charOffset": 803, + "charLength": 15, + "snippet": { + "text": "\tauto bank = getBank(L, 1);\n\tif (bank == nullptr) {\n\t\treportErrorFunc(\"Bank is nullptr\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "a1a9dd748231631f30386873cfce63cc8585e3225c3fef1f9586417596200c70" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "bugprone-narrowing-conversions", + "ruleIndex": 75, + "kind": "fail", + "level": "warning", + "message": { + "text": "narrowing conversion from 'uint64_t' (aka 'unsigned long') to 'lua_Number' (aka 'double')" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/bank_functions.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 21, + "charOffset": 955, + "charLength": 4, + "snippet": { + "text": "bank" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 21, + "charOffset": 905, + "charLength": 4, + "snippet": { + "text": "\t}\n\tif (lua_gettop(L) == 1) {\n\t\tlua_pushnumber(L, bank->balance());\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "2921914c927625b84d162c66aee266e78b15e6edaa0ad6f0ccd9ad86fe4f325e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-5", + "ruleIndex": 429, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-5: There shall be no implicit floating-integral conversions" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/bank_functions.cpp" + }, + "region": { + "startLine": 38, + "startColumn": 21, + "charOffset": 955, + "charLength": 4, + "snippet": { + "text": "bank" + } + }, + "contextRegion": { + "startLine": 36, + "startColumn": 21, + "charOffset": 905, + "charLength": 4, + "snippet": { + "text": "\t}\n\tif (lua_gettop(L) == 1) {\n\t\tlua_pushnumber(L, bank->balance());\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "487fa107cdb6ed52baebc5942886d8223aec436672748e37c998e426011f8acf" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/bank_functions.cpp" + }, + "region": { + "startLine": 50, + "startColumn": 3, + "charOffset": 1238, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 48, + "startColumn": 3, + "charOffset": 1184, + "charLength": 15, + "snippet": { + "text": "\tauto bank = getBank(L, 1);\n\tif (bank == nullptr) {\n\t\treportErrorFunc(\"Bank is nullptr\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e8d6add72c9f9ce700eb98821611e31ccf531fbe0535350382c1b21d3a592bb9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/bank_functions.cpp" + }, + "region": { + "startLine": 63, + "startColumn": 3, + "charOffset": 1633, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 61, + "startColumn": 3, + "charOffset": 1535, + "charLength": 15, + "snippet": { + "text": "\tif (source == nullptr) {\n\t\tg_logger().debug(\"BankFunctions::luaBankTransfer: source is null\");\n\t\treportErrorFunc(\"Bank is nullptr\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "d1241bbf4c78e21e57fc510101c0ff3114bc0209fbdda70e00c2adfcf4da40b3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/bank_functions.cpp" + }, + "region": { + "startLine": 69, + "startColumn": 3, + "charOffset": 1844, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 67, + "startColumn": 3, + "charOffset": 1736, + "charLength": 15, + "snippet": { + "text": "\tif (destination == nullptr) {\n\t\tg_logger().debug(\"BankFunctions::luaBankTransfer: destination is null\");\n\t\treportErrorFunc(\"Bank is nullptr\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e7a008fc9ae682bcc2cb9f98b0e687254f30aa72b5ed97f1bc1cbe954cad768f" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/bank_functions.cpp" + }, + "region": { + "startLine": 81, + "startColumn": 3, + "charOffset": 2183, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 79, + "startColumn": 3, + "charOffset": 2125, + "charLength": 15, + "snippet": { + "text": "\tauto source = getBank(L, 1);\n\tif (source == nullptr) {\n\t\treportErrorFunc(\"Source is nullptr\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "c1c7115826e990e5bcd90640765cc1b6a9a8d2278c27e528bf354f0a72aa9253" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/bank_functions.cpp" + }, + "region": { + "startLine": 86, + "startColumn": 3, + "charOffset": 2341, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 84, + "startColumn": 3, + "charOffset": 2236, + "charLength": 15, + "snippet": { + "text": "\tstd::shared_ptr destination = getBank(L, 2, true /* isGuild */);\n\tif (destination == nullptr) {\n\t\treportErrorFunc(\"Destination is nullptr\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dea98ef6c3b65533d1cc3d36dde1e847cdad9b761a549286d78e7278f7f24ee9" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/bank_functions.cpp" + }, + "region": { + "startLine": 97, + "startColumn": 6, + "charOffset": 2665, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 95, + "startColumn": 6, + "charOffset": 2568, + "charLength": 1, + "snippet": { + "text": "\t// Bank.withdraw(player, amount[, source = player])\n\tconst auto &player = getPlayer(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "8bc0c4eae40a96a74213ea0688ef1745d504c1aeead0c359e47ffe1a31c6ff0a" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/bank_functions.cpp" + }, + "region": { + "startLine": 98, + "startColumn": 3, + "charOffset": 2678, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 96, + "startColumn": 3, + "charOffset": 2621, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getPlayer(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "7bb6cda2a7c0e6a755c1e525c8022a090e0b3ab4a574d08a1b9b25d03e8ee37e" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/bank_functions.cpp" + }, + "region": { + "startLine": 110, + "startColumn": 3, + "charOffset": 3001, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 108, + "startColumn": 3, + "charOffset": 2943, + "charLength": 15, + "snippet": { + "text": "\tauto source = getBank(L, 3);\n\tif (source == nullptr) {\n\t\treportErrorFunc(\"Source is nullptr\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "130651aa5d5cd2681531ae929d87b4efaa328a2897c8d00ece5f66b9c3398cd6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/bank_functions.cpp" + }, + "region": { + "startLine": 120, + "startColumn": 6, + "charOffset": 3270, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 118, + "startColumn": 6, + "charOffset": 3169, + "charLength": 1, + "snippet": { + "text": "\t// Bank.deposit(player, amount[, destination = player])\n\tconst auto &player = getPlayer(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "b95d3c150ef3e3da8227cfcce099688811c463b48257ec7616183f21fff697c3" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/bank_functions.cpp" + }, + "region": { + "startLine": 121, + "startColumn": 3, + "charOffset": 3283, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 119, + "startColumn": 3, + "charOffset": 3226, + "charLength": 15, + "snippet": { + "text": "\tconst auto &player = getPlayer(L, 1);\n\tif (!player) {\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "edc4ee0e5925fe723919e7313cfba0d235f94049bf8810a7ef3a18d4488d99d1" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-6-4-2", + "ruleIndex": 450, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 6-4-2: All if ... else if constructs shall be terminated with an else clause" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/bank_functions.cpp" + }, + "region": { + "startLine": 127, + "startColumn": 2, + "charOffset": 3432, + "charLength": 2, + "snippet": { + "text": "if" + } + }, + "contextRegion": { + "startLine": 125, + "startColumn": 2, + "charOffset": 3408, + "charLength": 2, + "snippet": { + "text": "\n\tuint64_t amount = 0;\n\tif (lua_isnumber(L, 2)) {\n\t\tamount = getNumber(L, 2);\n\t} else if (lua_isnil(L, 2)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "acef8240c555ec46339ecb720424d424ffa149a090f78a10df68c2192fe3c127" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-0-13", + "ruleIndex": 425, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-0-13: The condition of an if-statement and the condition of an iteration-statement shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/bank_functions.cpp" + }, + "region": { + "startLine": 127, + "startColumn": 6, + "charOffset": 3436, + "charLength": 12, + "snippet": { + "text": "lua_isnumber" + } + }, + "contextRegion": { + "startLine": 125, + "startColumn": 6, + "charOffset": 3408, + "charLength": 12, + "snippet": { + "text": "\n\tuint64_t amount = 0;\n\tif (lua_isnumber(L, 2)) {\n\t\tamount = getNumber(L, 2);\n\t} else if (lua_isnil(L, 2)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "080c09aeda0ab85b2b10767eba8829555c8beb0f12ba289fd3893e1628ac5872" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "readability-implicit-bool-conversion", + "ruleIndex": 704, + "kind": "fail", + "level": "warning", + "message": { + "text": "implicit conversion 'int' -> 'bool'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/bank_functions.cpp" + }, + "region": { + "startLine": 127, + "startColumn": 6, + "charOffset": 3436, + "charLength": 12, + "snippet": { + "text": "lua_isnumber" + } + }, + "contextRegion": { + "startLine": 125, + "startColumn": 6, + "charOffset": 3408, + "charLength": 12, + "snippet": { + "text": "\n\tuint64_t amount = 0;\n\tif (lua_isnumber(L, 2)) {\n\t\tamount = getNumber(L, 2);\n\t} else if (lua_isnil(L, 2)) {" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "35d4bafc1ec06b4f4f0f524e5ced352c87d3f8552b244165b984d03d442f419d" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-2-12", + "ruleIndex": 435, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-2-12: An identifier with array type passed as a function argument shall not decay to a pointer" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/bank_functions.cpp" + }, + "region": { + "startLine": 139, + "startColumn": 3, + "charOffset": 3752, + "charLength": 15, + "snippet": { + "text": "reportErrorFunc" + } + }, + "contextRegion": { + "startLine": 137, + "startColumn": 3, + "charOffset": 3684, + "charLength": 15, + "snippet": { + "text": "\tauto destination = getBank(L, 3);\n\tif (destination == nullptr) {\n\t\treportErrorFunc(\"Destination is nullptr\");\n\t\treturn 1;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "dc9861a886fc89fbfe8aa37062722192c2918cc44127ca28cb95204b913851e6" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/bank_functions.cpp" + }, + "region": { + "startLine": 152, + "startColumn": 7, + "charOffset": 4183, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 150, + "startColumn": 7, + "charOffset": 4116, + "charLength": 1, + "snippet": { + "text": "\tif (isGuild) {\n\t\tconst auto guild = getGuild(L, arg, true);\n\t\tif (!guild) {\n\t\t\treturn nullptr;\n\t\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "0f4bd9d992092551e99c4669ce38c44cb381d5c57a469c89a5f7f5daf62b04c0" + }, + "properties": { + "tags": [ + "C++" + ] + } + }, + { + "ruleId": "clion-misra-cpp2008-5-3-1", + "ruleIndex": 442, + "kind": "fail", + "level": "warning", + "message": { + "text": "MISRA 5-3-1: Each operand of the ! operator, the logical && or the logical || operators shall have type bool" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/lua/functions/core/game/bank_functions.cpp" + }, + "region": { + "startLine": 158, + "startColumn": 6, + "charOffset": 4323, + "charLength": 1, + "snippet": { + "text": "!" + } + }, + "contextRegion": { + "startLine": 156, + "startColumn": 6, + "charOffset": 4256, + "charLength": 1, + "snippet": { + "text": "\t}\n\tstd::shared_ptr player = getPlayer(L, arg, true);\n\tif (!player) {\n\t\treturn nullptr;\n\t}" + } + } + } + } + ], + "partialFingerprints": { + "equalIndicator/v1": "e741b924f33f2ea5ee1f2a68fd373fd390dee5c18e5b08b1bf153b0b2891bfd7" + }, + "properties": { + "tags": [ + "C++" + ] + } + } + ], + "automationDetails": { + "id": "QDCL/qodana/2024-08-13", + "guid": "644d52b6-5a4e-4c2d-b634-1aaefbd32fe4", + "properties": { + "jobUrl": "https://github.com/opentibiabr/canary/actions/runs/10376820025" + } + }, + "newlineSequences": [ + "\r\n", + "\n" + ], + "columnKind": "unicodeCodePoints", + "properties": { + "deviceId": "200820300000000-a726-6a65-03ef-120cd7bbce70" + } + } + ] +} \ No newline at end of file diff --git a/qodana.sarif.json b/qodana.sarif.json deleted file mode 100644 index afc2ec4974d..00000000000 --- a/qodana.sarif.json +++ /dev/null @@ -1,184891 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/schemastore/schemastore/master/src/schemas/json/sarif-2.1.0-rtm.5.json", - "version": "2.1.0", - "runs": [ - { - "tool": { - "driver": { - "name": "CL", - "fullName": "Qodana", - "version": "241.18034.45", - "rules": [ - { - "id": "ArrayIndexOutOfBounds", - "shortDescription": { - "text": "Array Index Out Of Bounds" - }, - "fullDescription": { - "text": "Reports array or pointer variable access expressions where index may be out of bounds of an array or allocated buffer. Example: 'void foo() {\n int buffer[100];\n\n for (int i = 0; i <= 100; i ++)\n buffer[i] = 0; // buffer overflow when i is equal to 100\n }' New in 2022.2", - "markdown": "Reports array or pointer variable access expressions where index may be out of bounds of an array or allocated buffer.\n\n**Example:**\n\n\n void foo() {\n int buffer[100];\n\n for (int i = 0; i <= 100; i ++)\n buffer[i] = 0; // buffer overflow when i is equal to 100\n }\n\nNew in 2022.2" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "ArrayIndexOutOfBounds", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Data Flow Analysis", - "index": 14, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "UnconstrainedVariableType", - "shortDescription": { - "text": "Unconstrained variable type" - }, - "fullDescription": { - "text": "Reports cases where an expression constrained by a concept is assigned to a variable declared as 'auto' and suggests adding a type constraint. Example: 'template\n concept Foo = true;\n\n Foo auto func() { return true; }\n\n void bar() {\n auto f = func(); //warn here to add constraint 'Foo'\n }'", - "markdown": "Reports cases where an expression constrained by a concept is assigned to a variable declared as `auto` and suggests adding a type constraint.\n\n**Example:**\n\n\n template\n concept Foo = true;\n\n Foo auto func() { return true; }\n\n void bar() {\n auto f = func(); //warn here to add constraint 'Foo'\n }\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "UnconstrainedVariableType", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/General", - "index": 28, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ConstantConditionsOC", - "shortDescription": { - "text": "Constant condition" - }, - "fullDescription": { - "text": "Reports conditions that are always 'true' or 'false' and expressions whose value is statically proven to be constant. Example: 'void process(State current) {\n current = State::Started;\n\n if (current == State::Stopped) {\n //code\n }\n //code\n }'", - "markdown": "Reports conditions that are always `true` or `false` and expressions whose value is statically proven to be constant.\n\n**Example:**\n\n\n void process(State current) {\n current = State::Started;\n\n if (current == State::Stopped) {\n //code\n }\n //code\n }\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "ConstantConditionsOC", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Data Flow Analysis", - "index": 14, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "UnusedLocalVariable", - "shortDescription": { - "text": "Unused Local Variable" - }, - "fullDescription": { - "text": "Reports the local variables that are declared but never accessed for reading. Such declarations and assignment can be removed safely.", - "markdown": "Reports the local variables that are declared but never accessed for reading. Such declarations and assignment can be removed safely." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "UnusedLocalVariable", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Data Flow Analysis", - "index": 14, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "OCInconsistentNaming", - "shortDescription": { - "text": "Inconsistent Naming" - }, - "fullDescription": { - "text": "Reports the names that don't match the naming convention for that kind of symbol. Learn More", - "markdown": "Reports the names that don't match the naming convention for that kind of symbol.\n\n[Learn More](https://www.jetbrains.com/help/clion/naming-conventions.html)" - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "OCInconsistentNaming", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/General", - "index": 28, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PreprocessorComment", - "shortDescription": { - "text": "Preprocessor directive comment" - }, - "fullDescription": { - "text": "Reports the mismatches between the preprocessor '#endif' comments and macro names. Example: '#ifndef _UTILS_H\n #define _UTILS_H\n\n #endif //_UTILS'", - "markdown": "Reports the mismatches between the preprocessor `#endif` comments and macro names.\n\n**Example:**\n\n\n #ifndef _UTILS_H\n #define _UTILS_H\n\n #endif //_UTILS\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "PreprocessorComment", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/General", - "index": 28, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "VirtualCallInCtorOrDtor", - "shortDescription": { - "text": "Virtual call from constructor or destructor" - }, - "fullDescription": { - "text": "Reports virtual member function calls from constructors or destructors. Since construction starts with the base class and moves to the derived classes, the resources of the derived class are not yet initialized. Destruction is performed in reverse order, so calling a virtual function can lead to accessing the resources that have already been destroyed. Example: 'class Test {\n public:\n void virtual setUp();\n\n Test() {\n setUp();\n }\n };'", - "markdown": "Reports virtual member function calls from constructors or destructors. Since construction starts with the base class and moves to the derived classes, the resources of the derived class are not yet initialized. Destruction is performed in reverse order, so calling a virtual function can lead to accessing the resources that have already been destroyed.\n\n**Example:**\n\n\n class Test {\n public:\n void virtual setUp();\n\n Test() {\n setUp();\n }\n };\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "VirtualCallInCtorOrDtor", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/General", - "index": 28, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "EmptyDeclOrStmt", - "shortDescription": { - "text": "Empty declaration or statement" - }, - "fullDescription": { - "text": "Reports empty declarations and statements that can be removed safely. Example: 'void foo() {\n //code\n }; // redundant empty declaration'", - "markdown": "Reports empty declarations and statements that can be removed safely.\n\n**Example:**\n\n\n void foo() {\n //code\n }; // redundant empty declaration\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "EmptyDeclOrStmt", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/General", - "index": 28, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "OCUnusedGlobalDeclaration", - "shortDescription": { - "text": "Unused Global Declaration" - }, - "fullDescription": { - "text": "Reports the global function and variable declarations that are never used and can be removed safely.", - "markdown": "Reports the global function and variable declarations that are never used and can be removed safely." - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "OCUnusedGlobalDeclaration", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Unused code", - "index": 55, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HidingNonVirtualFunction", - "shortDescription": { - "text": "Hiding non-virtual function" - }, - "fullDescription": { - "text": "Reports the functions that hide non-virtual functions with the same signature declared in the base class. Example: class Base {\n public:\n void operate() {}\n};\n\nclass Derived : public Base {\n public:\n void operate() {}\n}", - "markdown": "Reports the functions that hide non-virtual functions with the same signature declared in the base class.\n\nExample:\n\n```\nclass Base {\n public:\n void operate() {}\n};\n\nclass Derived : public Base {\n public:\n void operate() {}\n}\n```" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "HidingNonVirtualFunction", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Functions", - "index": 56, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "LoopDoesntUseConditionVariable", - "shortDescription": { - "text": "Loop condition isn't updated inside the loop" - }, - "fullDescription": { - "text": "Reports the loop conditions that are not updated inside the loop. This can indicate code defects and cause infinite loops at runtime. Example: 'int i = 0, j = 0;\n while (i < 10) {\n ++j;\n }'", - "markdown": "Reports the loop conditions that are not updated inside the loop. This can indicate code defects and cause infinite loops at runtime.\n\n**Example:**\n\n\n int i = 0, j = 0;\n while (i < 10) {\n ++j;\n }\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "LoopDoesntUseConditionVariable", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Data Flow Analysis", - "index": 14, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "MemoryLeak", - "shortDescription": { - "text": "Memory Leak" - }, - "fullDescription": { - "text": "Reports the allocations of memory (either 'new' operator or 'malloc()' function) that were not released before they become non-accessible. Example: 'class MyClass {\n int* leakedField = new int;\n };\n\n void foo() {\n MyClass* c = new MyClass;\n delete c;\n }'", - "markdown": "Reports the allocations of memory (either `new` operator or `malloc()` function) that were not released before they become non-accessible.\n\n**Example:**\n\n\n class MyClass {\n int* leakedField = new int;\n };\n\n void foo() {\n MyClass* c = new MyClass;\n delete c;\n }\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "MemoryLeak", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Data Flow Analysis", - "index": 14, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "OCUnusedInstanceVariable", - "shortDescription": { - "text": "Unused Instance Variable" - }, - "fullDescription": { - "text": "Reports the instance variables that are never accessed or written.", - "markdown": "Reports the instance variables that are never accessed or written." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "OCUnusedInstanceVariable", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Objective-C/Unused code", - "index": 60, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "UnreachableCode", - "shortDescription": { - "text": "Unreachable Code" - }, - "fullDescription": { - "text": "Reports the code pieces that are never executed in any control flow and can be removed safely.", - "markdown": "Reports the code pieces that are never executed in any control flow and can be removed safely." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "UnreachableCode", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Data Flow Analysis", - "index": 14, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "OCUnusedMethod", - "shortDescription": { - "text": "Unused Method" - }, - "fullDescription": { - "text": "Reports the methods that are never called, for example, in send message expressions, '@selector' expressions, and other places like XIB files.", - "markdown": "Reports the methods that are never called, for example, in send message expressions, `@selector` expressions, and other places like XIB files." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "OCUnusedMethod", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Objective-C/Unused code", - "index": 60, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "LocalValueEscapesScope", - "shortDescription": { - "text": "Local Value Escapes Scope" - }, - "fullDescription": { - "text": "Reports the references to local values that escape the function Example: 'int *escapeLocalScope() {\n int lv = 100;\n return &lv;\n }'", - "markdown": "Reports the references to local values that escape the function\n\n**Example:**\n\n\n int *escapeLocalScope() {\n int lv = 100;\n return &lv;\n }\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "LocalValueEscapesScope", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Data Flow Analysis", - "index": 14, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "OCUnusedMacro", - "shortDescription": { - "text": "Unused Macro" - }, - "fullDescription": { - "text": "Reports the macro definitions that are never used and can be removed safely.", - "markdown": "Reports the macro definitions that are never used and can be removed safely." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "OCUnusedMacro", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Unused code", - "index": 55, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "OCUnusedConcept", - "shortDescription": { - "text": "Unused Concept" - }, - "fullDescription": { - "text": "Reports the concepts that are never used and can be removed safely.", - "markdown": "Reports the concepts that are never used and can be removed safely." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "OCUnusedConcept", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Unused code", - "index": 55, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "OCDFA", - "shortDescription": { - "text": "Context-sensitive analysis" - }, - "fullDescription": { - "text": "Reports the issues found by the context-sensitive data flow analyser. Such as: \"Constant condition\", \"Dangling pointer\", \"Null dereference\", \"Unreachable code\", and so on.", - "markdown": "Reports the issues found by the context-sensitive data flow analyser. Such as: \"Constant condition\", \"Dangling pointer\", \"Null dereference\", \"Unreachable code\", and so on." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "OCDFA", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Data Flow Analysis", - "index": 14, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "Clazy", - "shortDescription": { - "text": "Clazy" - }, - "fullDescription": { - "text": "Reports the Qt-related compiler warnings, ranging from unneeded memory allocations to the misused API.", - "markdown": "Reports the Qt-related compiler warnings, ranging from unneeded memory allocations to the misused API." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "Clazy", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Static Analysis Tools", - "index": 70, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "EndlessLoop", - "shortDescription": { - "text": "Endless Loop" - }, - "fullDescription": { - "text": "Reports the 'for', 'while', 'do while', and 'goto' statements that exit only by throwing an exception. Even though such statements may be correct, they often indicate code errors.", - "markdown": "Reports the `for`, `while`, `do while`, and `goto` statements that exit only by throwing an exception. Even though such statements may be correct, they often indicate code errors." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "EndlessLoop", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Data Flow Analysis", - "index": 14, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "Simplify", - "shortDescription": { - "text": "Simplifiable statement" - }, - "fullDescription": { - "text": "Reports the statements that can be simplified, such as constant conditions, identical if branches, redundant boolean expressions, and others. Use the checkboxes below to control the analysis options: Simplify \"if (true)\", \"while(false)\": suggest replacing the 'if'/'while' statement with a boolean literal. Simplify \"condition == true\": suggest replacing equality statements with boolean literals. Simplify \"condition1 ? true : condition2;\": suggest simplifying ternary operators where one of the expressions is a boolean literal. Simplify \"if (condition1) return true; return condition2;\": suggest simplifying 'if' where a boolean literal is returned if the condition is true and another condition is returned otherwise.", - "markdown": "Reports the statements that can be simplified, such as constant conditions, identical if branches, redundant boolean expressions, and others. Use the checkboxes below to control the analysis options:\n\n* **Simplify \"if (true)\", \"while(false)\"** : suggest replacing the `if`/`while` statement with a boolean literal.\n* **Simplify \"condition == true\"**: suggest replacing equality statements with boolean literals.\n* **Simplify \"condition1 ? true : condition2;\"**: suggest simplifying ternary operators where one of the expressions is a boolean literal.\n* **Simplify \"if (condition1) return true; return condition2;\"** : suggest simplifying `if` where a boolean literal is returned if the condition is true and another condition is returned otherwise." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "Simplify", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/General", - "index": 28, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "OCUnusedIncludeDirective", - "shortDescription": { - "text": "Unused Include Directive" - }, - "fullDescription": { - "text": "Reports the include directives that are not used or not required and can be removed safely. Detect completely unused An include directive is considered unused if declarations from it are never used within the translation unit. Detect not directly used An include directive is considered unused if declarations from it are not used in the file directly. This works best with the \"Include What You Use\" policy. Detect not required Detects the minimal set of include directives for the file to be compilable. All other #include directives are considered unused. Use the checkbox below to run inspection in header files.", - "markdown": "Reports the include directives that are not used or not required and can be removed safely.\n\n**Detect completely unused**\n: An include directive is considered unused if declarations from it are never used within the translation unit.\n\n**Detect not directly used**\n: An include directive is considered unused if declarations from it are not used in the file directly. This works best with the \"Include What You Use\" policy.\n\n**Detect not required**\n: Detects the minimal set of include directives for the file to be compilable. All other #include directives are considered unused.\n\nUse the checkbox below to run inspection in header files." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "OCUnusedIncludeDirective", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Unused code", - "index": 55, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "OCUnusedProperty", - "shortDescription": { - "text": "Unused Property" - }, - "fullDescription": { - "text": "Reports the properties that are never accessed or written, neither in qualified expressions nor in accessor method calls.", - "markdown": "Reports the properties that are never accessed or written, neither in qualified expressions nor in accessor method calls." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "OCUnusedProperty", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Objective-C/Unused code", - "index": 60, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ConstantFunctionResult", - "shortDescription": { - "text": "Constant Function Result" - }, - "fullDescription": { - "text": "Reports the functions where the return value is always the same constant.", - "markdown": "Reports the functions where the return value is always the same constant." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "ConstantFunctionResult", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Data Flow Analysis", - "index": 14, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "UnusedValue", - "shortDescription": { - "text": "Unused Value" - }, - "fullDescription": { - "text": "Reports the variable values that are never used after being assigned. This can happen in the following cases: the variable is never read after the assignment the value is overwritten by another assignment before it is accessed for reading the variable initializer is redundant (for one of the above two reasons) the variable itself is never used. Example: 'class C {\n int field;\n\n void foo() {\n field = unused_value;\n }\n\n void bar() {\n use(field);\n foo();\n }\n };' Use the checkbox below to have this inspection ignore variable initializers.", - "markdown": "Reports the variable values that are never used after being assigned. This can happen in the following cases:\n\n* the variable is never read after the assignment\n* the value is overwritten by another assignment before it is accessed for reading\n* the variable initializer is redundant (for one of the above two reasons)\n* the variable itself is never used.\n\n**Example:**\n\n\n class C {\n int field;\n\n void foo() {\n field = unused_value;\n }\n\n void bar() {\n use(field);\n foo();\n }\n };\n\nUse the checkbox below to have this inspection ignore variable initializers." - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "UnusedValue", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Data Flow Analysis", - "index": 14, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ConstantParameter", - "shortDescription": { - "text": "Constant Parameter" - }, - "fullDescription": { - "text": "Reports function parameters that always have the same value.", - "markdown": "Reports function parameters that always have the same value." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "ConstantParameter", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Data Flow Analysis", - "index": 14, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "OCUnusedTypeAlias", - "shortDescription": { - "text": "Unused Type Alias" - }, - "fullDescription": { - "text": "Reports the statements that are never used and can be removed safely.", - "markdown": "Reports the statements that are never used and can be removed safely." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "OCUnusedTypeAlias", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Unused code", - "index": 55, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ArgumentSelectionDefects", - "shortDescription": { - "text": "Argument selection defect" - }, - "fullDescription": { - "text": "Reports mismatches between the argument identifier name and the formal parameter name. This can help detect programming errors, for example, when you accidentally switch the arguments of the same type. The original research paper can be found here. Example: 'const User* get_User(int64_t company_id, int64_t user_id) {\n return new User{company_id, user_id, \"foo\"};\n }\n\n void call_User(int64_t company_id, int64_t user_id) {\n const User* user = get_User(user_id, company_id); // potential issue here\n //...\n }' Use the checkbox below to inspect arguments with names shorter than three symbols. Learn More.", - "markdown": "Reports mismatches between the argument identifier name and the formal parameter name. This can help detect programming errors, for example, when you accidentally switch the arguments of the same type. The original research paper can be found [here](https://static.googleusercontent.com/media/research.google.com/ru//pubs/archive/46317.pdf).\n\n**Example:**\n\n\n const User* get_User(int64_t company_id, int64_t user_id) {\n return new User{company_id, user_id, \"foo\"};\n }\n\n void call_User(int64_t company_id, int64_t user_id) {\n const User* user = get_User(user_id, company_id); // potential issue here\n //...\n }\n\nUse the checkbox below to inspect arguments with names shorter than three symbols.\n\n[Learn More.](https://www.jetbrains.com/help/clion/argument-selection-defects-inspection.html)" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "ArgumentSelectionDefects", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/General", - "index": 28, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "Misra", - "shortDescription": { - "text": "MISRA" - }, - "fullDescription": { - "text": "Reports various issues defined by the MISRA C 2012 and MISRA C++ 2008 guidelines. The list of currently supported checks is here.", - "markdown": "Reports various issues defined by the MISRA C 2012 and MISRA C++ 2008 guidelines.\n\nThe list of currently supported checks is [here](https://youtrack.jetbrains.com/articles/CPP-A-191430682/MISRA-checks-supported-in-CLion)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "Misra", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Static Analysis Tools", - "index": 70, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "NotImplementedFunctions", - "shortDescription": { - "text": "Not Implemented Functions" - }, - "fullDescription": { - "text": "Reports the functions that were declared in a class but have no implementations. Example: class Test {\n public:\n void setUp();\n};", - "markdown": "Reports the functions that were declared in a class but have no implementations.\n\n**Example:**\n\n```\nclass Test {\n public:\n void setUp();\n};\n```" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "NotImplementedFunctions", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Functions", - "index": 56, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "UnusedParameter", - "shortDescription": { - "text": "Unused Parameter" - }, - "fullDescription": { - "text": "Reports the parameters that are declared but never accessed for reading and can be removed safely.", - "markdown": "Reports the parameters that are declared but never accessed for reading and can be removed safely." - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "UnusedParameter", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Data Flow Analysis", - "index": 14, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "UnreachableCallsOfFunction", - "shortDescription": { - "text": "Unreachable Calls Of Function" - }, - "fullDescription": { - "text": "Reports the functions which calls are never used. Such functions are also never executed.", - "markdown": "Reports the functions which calls are never used. Such functions are also never executed." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "UnreachableCallsOfFunction", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Data Flow Analysis", - "index": 14, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "OCUnusedClass", - "shortDescription": { - "text": "Unused Class" - }, - "fullDescription": { - "text": "Reports Objective-C classes and protocols that are never used.", - "markdown": "Reports Objective-C classes and protocols that are never used." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "OCUnusedClass", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Objective-C/Unused code", - "index": 60, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ClangdErrorsAndWarnings", - "shortDescription": { - "text": "Clangd errors and warnings" - }, - "fullDescription": { - "text": "Reports C/C++ errors and warnings from clangd.", - "markdown": "Reports C/C++ errors and warnings from clangd. " - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "ClangdErrorsAndWarnings", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/General", - "index": 28, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "OCUnusedTemplateParameter", - "shortDescription": { - "text": "Unused Template Parameter" - }, - "fullDescription": { - "text": "Reports the template parameters that are never used and can be removed safely.", - "markdown": "Reports the template parameters that are never used and can be removed safely." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "OCUnusedTemplateParameter", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Unused code", - "index": 55, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "OCUnusedStruct", - "shortDescription": { - "text": "Unused Struct" - }, - "fullDescription": { - "text": "Reports the classes and structures that are never used and can be removed safely.", - "markdown": "Reports the classes and structures that are never used and can be removed safely." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "OCUnusedStruct", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Unused code", - "index": 55, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "NotInitializedField", - "shortDescription": { - "text": "Not Initialized Field" - }, - "fullDescription": { - "text": "Reports the fields that may have not been initialized before their usage. Initialization and usage may be in different functions.", - "markdown": "Reports the fields that may have not been initialized before their usage. Initialization and usage may be in different functions." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "NotInitializedField", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Data Flow Analysis", - "index": 14, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "DanglingPointer", - "shortDescription": { - "text": "Dangling Pointer" - }, - "fullDescription": { - "text": "Reports the usages of the pointers that refer to the memory already deleted by the 'delete' operator or the 'free(void* ptr)' function. Example: 'void process() {\n for(node *pt = head; pt != nullptr; pt = pt->next) {\n delete pt;\n }\n }'", - "markdown": "Reports the usages of the pointers that refer to the memory already deleted by the `delete` operator or the `free(void* ptr)` function.\n\n**Example:**\n\n\n void process() {\n for(node *pt = head; pt != nullptr; pt = pt->next) {\n delete pt;\n }\n }\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "DanglingPointer", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Data Flow Analysis", - "index": 14, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ClangTidy", - "shortDescription": { - "text": "Clang-Tidy" - }, - "fullDescription": { - "text": "Reports various issues related to The C++ Core Guidelines, Modernize, Readability and Performance. CLion's default configuration is described here. For more information, visit the official Clang-Tidy page. Use the checkbox below to have this inspection ignore the IDE settings and use a list of checks specified in the .clang-tidy file if any exist.", - "markdown": "Reports various issues related to The C++ Core Guidelines, Modernize, Readability and Performance. \nCLion's default configuration is described [here](https://youtrack.jetbrains.com/articles/CPP-A-90276519/Clang-Tidy-in-CLion:-default-configuration). \nFor more information, visit the official [Clang-Tidy](https://clang.llvm.org/extra/clang-tidy/) page.\n\nUse the checkbox below to have this inspection ignore the IDE settings and use a list of checks specified in the **.clang-tidy** file if any exist." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "ClangTidy", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Static Analysis Tools", - "index": 70, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "InfiniteRecursion", - "shortDescription": { - "text": "Infinite Recursion" - }, - "fullDescription": { - "text": "Reports methods and functions with infinite recursion. Example: 'int factorial(int n) {\n return n * factorial(n - 1);\n }'", - "markdown": "Reports methods and functions with infinite recursion.\n\n**Example:**\n\n\n int factorial(int n) {\n return n * factorial(n - 1);\n }\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "InfiniteRecursion", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Data Flow Analysis", - "index": 14, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "NullDereference", - "shortDescription": { - "text": "Null Dereference" - }, - "fullDescription": { - "text": "Reports dereferences of the pointers that may contain 'nullptr'. Example: 'using namespace std;\n void process(string *a, string b) {\n if (a != nullptr || a->length()) {\n a = &b;\n }\n }'", - "markdown": "Reports dereferences of the pointers that may contain `nullptr`.\n\n**Example:**\n\n\n using namespace std;\n void process(string *a, string b) {\n if (a != nullptr || a->length()) {\n a = &b;\n }\n }\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "NullDereference", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Data Flow Analysis", - "index": 14, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "taxa": [ - { - "id": "Python", - "name": "Python" - }, - { - "id": "JavaScript and TypeScript", - "name": "JavaScript and TypeScript" - }, - { - "id": "JavaScript and TypeScript/Control flow issues", - "name": "Control flow issues", - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript", - "index": 1, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "Angular", - "name": "Angular" - }, - { - "id": "PostCSS", - "name": "PostCSS" - }, - { - "id": "XPath", - "name": "XPath" - }, - { - "id": "Sass_SCSS", - "name": "Sass/SCSS" - }, - { - "id": "Shell script", - "name": "Shell script" - }, - { - "id": "JavaScript and TypeScript/Unit testing", - "name": "Unit testing", - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript", - "index": 1, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "Makefile", - "name": "Makefile" - }, - { - "id": "CMake", - "name": "CMake" - }, - { - "id": "CMake/General", - "name": "General", - "relationships": [ - { - "target": { - "id": "CMake", - "index": 10, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSON and JSON5", - "name": "JSON and JSON5" - }, - { - "id": "C_C++", - "name": "C/C++" - }, - { - "id": "C_C++/Data Flow Analysis", - "name": "Data Flow Analysis", - "relationships": [ - { - "target": { - "id": "C_C++", - "index": 13, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "MongoJS", - "name": "MongoJS" - }, - { - "id": "JavaScript and TypeScript/General", - "name": "General", - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript", - "index": 1, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JavaScript and TypeScript/Code style issues", - "name": "Code style issues", - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript", - "index": 1, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "MySQL", - "name": "MySQL" - }, - { - "id": "JavaScript and TypeScript/Potentially undesirable code constructs", - "name": "Potentially undesirable code constructs", - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript", - "index": 1, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JavaScript and TypeScript/Flow type checker", - "name": "Flow type checker", - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript", - "index": 1, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "Markdown", - "name": "Markdown" - }, - { - "id": "JavaScript and TypeScript/Probable bugs", - "name": "Probable bugs", - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript", - "index": 1, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HTTP Client", - "name": "HTTP Client" - }, - { - "id": "Devicetree", - "name": "Devicetree" - }, - { - "id": "HTML", - "name": "HTML" - }, - { - "id": "JavaScript and TypeScript/Unused symbols", - "name": "Unused symbols", - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript", - "index": 1, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JavaScript and TypeScript/Data flow", - "name": "Data flow", - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript", - "index": 1, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "C_C++/General", - "name": "General", - "relationships": [ - { - "target": { - "id": "C_C++", - "index": 13, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JavaScript and TypeScript/Bitwise operation issues", - "name": "Bitwise operation issues", - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript", - "index": 1, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JavaScript and TypeScript/ES2015 migration aids", - "name": "ES2015 migration aids", - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript", - "index": 1, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "General", - "name": "General" - }, - { - "id": "HTML/Accessibility", - "name": "Accessibility", - "relationships": [ - { - "target": { - "id": "HTML", - "index": 25, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JavaScript and TypeScript/React", - "name": "React", - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript", - "index": 1, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JavaScript and TypeScript/TypeScript", - "name": "TypeScript", - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript", - "index": 1, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JavaScript and TypeScript/Validity issues", - "name": "Validity issues", - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript", - "index": 1, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "Docker-compose", - "name": "Docker-compose" - }, - { - "id": "JavaScript and TypeScript/Potentially confusing code constructs", - "name": "Potentially confusing code constructs", - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript", - "index": 1, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CSS", - "name": "CSS" - }, - { - "id": "CSS/Invalid elements", - "name": "Invalid elements", - "relationships": [ - { - "target": { - "id": "CSS", - "index": 38, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "Dockerfile", - "name": "Dockerfile" - }, - { - "id": "SQL", - "name": "SQL" - }, - { - "id": "JavaScript and TypeScript/Try statement issues", - "name": "Try statement issues", - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript", - "index": 1, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "Structural search", - "name": "Structural search" - }, - { - "id": "JavaScript and TypeScript/Function metrics", - "name": "Function metrics", - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript", - "index": 1, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "YAML", - "name": "YAML" - }, - { - "id": "Requirements", - "name": "Requirements" - }, - { - "id": "XML", - "name": "XML" - }, - { - "id": "JavaScript and TypeScript/Assignment issues", - "name": "Assignment issues", - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript", - "index": 1, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CSS/Code style issues", - "name": "Code style issues", - "relationships": [ - { - "target": { - "id": "CSS", - "index": 38, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "Less", - "name": "Less" - }, - { - "id": "RegExp", - "name": "RegExp" - }, - { - "id": "Vue", - "name": "Vue" - }, - { - "id": "JavaScript and TypeScript/Node.js", - "name": "Node.js", - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript", - "index": 1, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "XSLT", - "name": "XSLT" - }, - { - "id": "C_C++/Unused code", - "name": "Unused code", - "relationships": [ - { - "target": { - "id": "C_C++", - "index": 13, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "C_C++/Functions", - "name": "Functions", - "relationships": [ - { - "target": { - "id": "C_C++", - "index": 13, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JavaScript and TypeScript/Imports and dependencies", - "name": "Imports and dependencies", - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript", - "index": 1, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "RELAX NG", - "name": "RELAX NG" - }, - { - "id": "Objective-C", - "name": "Objective-C" - }, - { - "id": "Objective-C/Unused code", - "name": "Unused code", - "relationships": [ - { - "target": { - "id": "Objective-C", - "index": 59, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CSS/Probable bugs", - "name": "Probable bugs", - "relationships": [ - { - "target": { - "id": "CSS", - "index": 38, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JavaScript and TypeScript/Naming conventions", - "name": "Naming conventions", - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript", - "index": 1, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JavaScript and TypeScript/Switch statement issues", - "name": "Switch statement issues", - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript", - "index": 1, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JavaScript and TypeScript/DOM issues", - "name": "DOM issues", - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript", - "index": 1, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JavaScript and TypeScript/Async code and promises", - "name": "Async code and promises", - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript", - "index": 1, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JavaScript and TypeScript/Code quality tools", - "name": "Code quality tools", - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript", - "index": 1, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "Code Coverage", - "name": "Code Coverage" - }, - { - "id": "Proofreading", - "name": "Proofreading" - }, - { - "id": "GitHub actions", - "name": "GitHub actions" - }, - { - "id": "C_C++/Static Analysis Tools", - "name": "Static Analysis Tools", - "relationships": [ - { - "target": { - "id": "C_C++", - "index": 13, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CSS/Code quality tools", - "name": "Code quality tools", - "relationships": [ - { - "target": { - "id": "CSS", - "index": 38, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PostgreSQL", - "name": "PostgreSQL" - }, - { - "id": "SQL server", - "name": "SQL server" - }, - { - "id": "ReST", - "name": "ReST" - }, - { - "id": "JSONPath", - "name": "JSONPath" - }, - { - "id": "Qodana", - "name": "Qodana" - }, - { - "id": "Security", - "name": "Security" - }, - { - "id": "Oracle", - "name": "Oracle" - }, - { - "id": "Internationalization", - "name": "Internationalization" - }, - { - "id": "TOML", - "name": "TOML" - }, - { - "id": "Version control", - "name": "Version control" - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - "extensions": [ - { - "name": "PythonCore", - "version": "241.18034.45", - "rules": [ - { - "id": "PyPandasSeriesToListInspection", - "shortDescription": { - "text": "Method Series.to_list() is recommended" - }, - "fullDescription": { - "text": "Reports redundant 'list' in 'list(Series.values)' statement for pandas and polars libraries. Such 'Series' values extraction can be replaced with the 'to_list()' function call. Example: list(df['column'].values)\n When the quick-fix is applied, the code changes to: df['column'].to_list()", - "markdown": "Reports redundant `list` in `list(Series.values)` statement for pandas and polars libraries.\nSuch `Series` values extraction can be replaced with the `to_list()` function call.\n\n**Example:**\n\n```\nlist(df['column'].values)\n```\n\nWhen the quick-fix is applied, the code changes to:\n\n```\ndf['column'].to_list()\n```" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyPackages", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PySetFunctionToLiteralInspection", - "shortDescription": { - "text": "Function call can be replaced with set literal" - }, - "fullDescription": { - "text": "Reports calls to the 'set' function that can be replaced with the 'set' literal. Example: 'def do_mult(a, b):\n c = a * b\n return set([c, a, b])' When the quick-fix is applied, the code changes to: 'def do_mult(a, b):\n c = a * b\n return {c, a, b}'", - "markdown": "Reports calls to the `set` function that can be replaced with\nthe `set` literal.\n\n**Example:**\n\n\n def do_mult(a, b):\n c = a * b\n return set([c, a, b])\n\nWhen the quick-fix is applied, the code changes to:\n\n\n def do_mult(a, b):\n c = a * b\n return {c, a, b}\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PySetFunctionToLiteral", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyOverridesInspection", - "shortDescription": { - "text": "Invalid usages of @override decorator" - }, - "fullDescription": { - "text": "Reports when a method decorated with @override doesn't have a matching method in its ancestor classes Example: 'from typing import override\n\nclass Parent:\n def foo(self) -> int:\n return 1\n\n def bar(self, x: str) -> str:\n return x\n\nclass Child(Parent):\n @override\n def foo(self) -> int:\n return 2\n\n @override # Missing super method for override function\n def baz(self) -> int:\n return 1'", - "markdown": "Reports when a method decorated with @override doesn't have a matching method in its ancestor classes\n\n**Example:**\n\n\n from typing import override\n\n class Parent:\n def foo(self) -> int:\n return 1\n\n def bar(self, x: str) -> str:\n return x\n\n class Child(Parent):\n @override\n def foo(self) -> int:\n return 2\n\n @override # Missing super method for override function\n def baz(self) -> int:\n return 1\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyOverrides", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyInitNewSignatureInspection", - "shortDescription": { - "text": "Incompatible signatures of __new__ and __init__" - }, - "fullDescription": { - "text": "Reports incompatible signatures of the '__new__' and '__init__' methods. Example: 'class MyClass(object):\n def __new__(cls, arg1):\n return super().__new__(cls)\n\n def __init__(self):\n pass' If the '__new__' and '__init__' have different arguments, then the 'MyClass' cannot be instantiated. As a fix, the IDE offers to apply the Change Signature refactoring.", - "markdown": "Reports incompatible signatures of the `__new__` and `__init__` methods.\n\n**Example:**\n\n\n class MyClass(object):\n def __new__(cls, arg1):\n return super().__new__(cls)\n\n def __init__(self):\n pass\n\nIf the `__new__` and `__init__` have different arguments, then the `MyClass`\ncannot be instantiated.\n\nAs a fix, the IDE offers to apply the Change Signature refactoring." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyInitNewSignature", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyMissingConstructorInspection", - "shortDescription": { - "text": "Missed call to '__init__' of the super class" - }, - "fullDescription": { - "text": "Reports cases when a call to the 'super' constructor in a class is missed. Example: 'class Fruit:\n def __init__(self):\n pass\n\n\nclass Pear(Fruit):\n def __init__(self):\n pass' The 'Pear' class should have a 'super' call in the '__init__' method. When the quick-fix is applied, the code changes to: 'class Fruit:\n def __init__(self):\n pass\n\n\nclass Pear(Fruit):\n def __init__(self):\n super().__init__()'", - "markdown": "Reports cases when a call to the `super` constructor in a class is missed.\n\n**Example:**\n\n\n class Fruit:\n def __init__(self):\n pass\n\n\n class Pear(Fruit):\n def __init__(self):\n pass\n\nThe `Pear` class should have a `super` call in the `__init__`\nmethod.\n\nWhen the quick-fix is applied, the code changes to:\n\n\n class Fruit:\n def __init__(self):\n pass\n\n\n class Pear(Fruit):\n def __init__(self):\n super().__init__()\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyMissingConstructor", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PySimplifyBooleanCheckInspection", - "shortDescription": { - "text": "Redundant boolean variable check" - }, - "fullDescription": { - "text": "Reports equality comparison with a boolean literal. Example: 'def func(s):\n if s.isdigit() == True:\n return int(s)' With the quick-fix applied, the code fragment will be simplified to: 'def func(s):\n if s.isdigit():\n return int(s)'", - "markdown": "Reports equality comparison with a boolean literal.\n\n**Example:**\n\n\n def func(s):\n if s.isdigit() == True:\n return int(s)\n\nWith the quick-fix applied, the code fragment will be simplified to:\n\n\n def func(s):\n if s.isdigit():\n return int(s)\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "PySimplifyBooleanCheck", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyCallingNonCallableInspection", - "shortDescription": { - "text": "Attempt to call a non-callable object" - }, - "fullDescription": { - "text": "Reports a problem when you are trying to call objects that are not callable, like, for example, properties: Example: 'class Record:\n @property\n def as_json(self):\n\njson = Record().as_json()'", - "markdown": "Reports a problem when you are trying\nto call objects that are not callable, like, for example, properties:\n\n**Example:**\n\n\n class Record:\n @property\n def as_json(self):\n\n json = Record().as_json()\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyCallingNonCallable", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyUnreachableCodeInspection", - "shortDescription": { - "text": "Unreachable code" - }, - "fullDescription": { - "text": "Reports code fragments that cannot be normally reached. Example: 'if True:\n print('Yes')\nelse:\n print('No')' As a fix, you might want to check and modify the algorithm to ensure it implements the expected logic.", - "markdown": "Reports code fragments that cannot be normally reached.\n\n**Example:**\n\n\n if True:\n print('Yes')\n else:\n print('No')\n\nAs a fix, you might want to check and modify the algorithm to ensure it implements\nthe expected logic." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyUnreachableCode", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyChainedComparisonsInspection", - "shortDescription": { - "text": "Too complex chained comparisons" - }, - "fullDescription": { - "text": "Reports chained comparisons that can be simplified. Example: 'def do_comparison(x):\n xmin = 10\n xmax = 100\n if x >= xmin and x <= xmax:\n pass' The IDE offers to simplify 'if x >= xmin and x <= xmax'. When the quick-fix is applied, the code changes to: 'def do_comparison(x):\n xmin = 10\n xmax = 100\n if xmin <= x <= xmax:\n pass'", - "markdown": "Reports chained comparisons that can be simplified.\n\n**Example:**\n\n\n def do_comparison(x):\n xmin = 10\n xmax = 100\n if x >= xmin and x <= xmax:\n pass\n\nThe IDE offers to simplify `if x >= xmin and x <= xmax`.\nWhen the quick-fix is applied, the code changes to:\n\n\n def do_comparison(x):\n xmin = 10\n xmax = 100\n if xmin <= x <= xmax:\n pass\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "PyChainedComparisons", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyCompatibilityInspection", - "shortDescription": { - "text": "Code is incompatible with specific Python versions" - }, - "fullDescription": { - "text": "Reports incompatibility with the specified versions of Python. Enable this inspection if you need your code to be compatible with a range of Python versions, for example, if you are building a library. To define the range of the inspected Python versions, select the corresponding checkboxes in the Options section. For more information about the Python versions supported by the IDE, see the web help.", - "markdown": "Reports incompatibility with the specified versions of Python.\nEnable this inspection if you need your code to be compatible with a range of Python versions, for example,\nif you are building a library.\n\nTo define the range of the inspected Python versions, select the corresponding checkboxes in the **Options**\nsection.\n\nFor more information about the Python versions supported by the IDE, see the\n[web help](https://www.jetbrains.com/help/pycharm/python.html#support)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "PyCompatibility", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyGlobalUndefinedInspection", - "shortDescription": { - "text": "Global variable is not defined at the module level" - }, - "fullDescription": { - "text": "Reports problems when a variable defined through the 'global' statement is not defined in the module scope. Example: 'def foo():\n global bar\n print(bar)\n\nfoo()' As a fix, you can move the global variable declaration: 'global bar\n\n\ndef foo():\n print(bar)'", - "markdown": "Reports problems when a variable defined through the `global`\nstatement is not defined in the module scope.\n\n**Example:**\n\n\n def foo():\n global bar\n print(bar)\n\n foo()\n\nAs a fix, you can move the global variable declaration:\n\n\n global bar\n\n\n def foo():\n print(bar)\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "PyGlobalUndefined", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "UnsatisfiedRequirementInspection", - "shortDescription": { - "text": "Requirement is not satisfied" - }, - "fullDescription": { - "text": "Reports packages mentioned in requirements files (for example, 'requirements.txt', or 'dependencies' section in 'pyproject.toml' files) but not installed, or imported but not mentioned in requirements files.", - "markdown": "Reports packages mentioned in requirements files (for example, `requirements.txt`, or `dependencies` section in `pyproject.toml` files) but not installed,\nor imported but not mentioned in requirements files." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "UnsatisfiedRequirement", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Requirements", - "index": 46, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyProtocolInspection", - "shortDescription": { - "text": "Invalid protocol definitions and usages" - }, - "fullDescription": { - "text": "Reports invalid definitions and usages of protocols introduced in PEP-544. Example: 'from typing import Protocol\n\n\nclass MyProtocol(Protocol):\n def method(self, p: int) -> str:\n pass\n\n\nclass MyClass(MyProtocol):\n def method(self, p: str) -> int: # Type of 'method' is not compatible with 'MyProtocol'\n pass\n\n\nclass MyAnotherProtocol(MyClass, Protocol): # All bases of a protocol must be protocols\n pass'", - "markdown": "Reports invalid definitions and usages of protocols introduced in\n[PEP-544](https://www.python.org/dev/peps/pep-0544/).\n\n**Example:**\n\n\n from typing import Protocol\n\n\n class MyProtocol(Protocol):\n def method(self, p: int) -> str:\n pass\n\n\n class MyClass(MyProtocol):\n def method(self, p: str) -> int: # Type of 'method' is not compatible with 'MyProtocol'\n pass\n\n\n class MyAnotherProtocol(MyClass, Protocol): # All bases of a protocol must be protocols\n pass\n\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyProtocol", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyTypeHintsInspection", - "shortDescription": { - "text": "Invalid type hints definitions and usages" - }, - "fullDescription": { - "text": "Reports invalid usages of type hints. Example: 'from typing import TypeVar\n\nT0 = TypeVar('T1') # Argument of 'TypeVar' must be 'T0'\n\n\ndef b(p: int) -> int: # Type specified both in a comment and annotation\n # type: (int) -> int\n pass\n\n\ndef c(p1, p2): # Type signature has too many arguments\n # type: (int) -> int\n pass' Available quick-fixes offer various actions. You can rename, remove, or move problematic elements. You can also manually modify type declarations to ensure no warning is shown.", - "markdown": "Reports invalid usages of type hints.\n\n**Example:**\n\n\n from typing import TypeVar\n\n T0 = TypeVar('T1') # Argument of 'TypeVar' must be 'T0'\n\n\n def b(p: int) -> int: # Type specified both in a comment and annotation\n # type: (int) -> int\n pass\n\n\n def c(p1, p2): # Type signature has too many arguments\n # type: (int) -> int\n pass\n\nAvailable quick-fixes offer various actions. You can rename, remove, or move problematic elements. You can also manually modify type declarations to ensure no warning is shown." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyTypeHints", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyMethodMayBeStaticInspection", - "shortDescription": { - "text": "Method is not declared static" - }, - "fullDescription": { - "text": "Reports any methods that do not require a class instance creation and can be made static. Example: 'class MyClass(object):\n def my_method(self, x):\n print(x)' If a Make function from method quick-fix is applied, the code changes to: 'def my_method(x):\n print(x)\n\n\nclass MyClass(object):\n pass' If you select the Make method static quick-fix, the '@staticmethod' decorator is added: 'class MyClass(object):\n @staticmethod\n def my_method(x):\n print(x)'", - "markdown": "Reports any methods that do not require a class instance creation and can be\nmade static.\n\n**Example:**\n\n\n class MyClass(object):\n def my_method(self, x):\n print(x)\n\nIf a **Make function from method** quick-fix is applied, the code changes to:\n\n\n def my_method(x):\n print(x)\n\n\n class MyClass(object):\n pass\n\nIf you select the **Make method static** quick-fix, the `@staticmethod` decorator is added:\n\n\n class MyClass(object):\n @staticmethod\n def my_method(x):\n print(x)\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "PyMethodMayBeStatic", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyDictCreationInspection", - "shortDescription": { - "text": "Dictionary creation can be rewritten by dictionary literal" - }, - "fullDescription": { - "text": "Reports situations when you can rewrite dictionary creation by using a dictionary literal. This approach brings performance improvements. Example: 'dic = {}\ndic['var'] = 1' When the quick-fix is applied, the code changes to: 'dic = {'var': 1}'", - "markdown": "Reports situations when you can rewrite dictionary creation\nby using a dictionary literal.\n\nThis approach brings performance improvements.\n\n**Example:**\n\n\n dic = {}\n dic['var'] = 1\n\nWhen the quick-fix is applied, the code changes to:\n\n\n dic = {'var': 1}\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "PyDictCreation", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyStringFormatInspection", - "shortDescription": { - "text": "Errors in string formatting operations" - }, - "fullDescription": { - "text": "Reports errors in string formatting operations. Example 1: '\"Hello {1}\".format(\"people\")' Example 2: 'def bar():\n return 1\n\n\n\"%s %s\" % bar()' As a fix, you need to rewrite string formatting fragments to adhere to the formatting syntax.", - "markdown": "Reports errors in string formatting operations.\n\n**Example 1:**\n\n\n \"Hello {1}\".format(\"people\")\n\n**Example 2:**\n\n\n def bar():\n return 1\n\n\n \"%s %s\" % bar()\n\nAs a fix, you need to rewrite string formatting fragments to\nadhere to the [formatting syntax](https://docs.python.org/3/library/string.html#format-string-syntax)." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyStringFormat", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyExceptionInheritInspection", - "shortDescription": { - "text": "Exceptions do not inherit from standard 'Exception' class" - }, - "fullDescription": { - "text": "Reports cases when a custom exception class is raised but does not inherit from the builtin Exception class. Example: 'class A:\n pass\n\n\ndef me_exception():\n raise A()' The proposed quick-fix changes the code to: 'class A(Exception):\n pass\n\n\ndef me_exception():\n raise A()'", - "markdown": "Reports cases when a custom exception class is\nraised but does not inherit from the\n[builtin Exception class](https://docs.python.org/3/library/exceptions.html).\n\n**Example:**\n\n\n class A:\n pass\n\n\n def me_exception():\n raise A()\n\nThe proposed quick-fix changes the code to:\n\n\n class A(Exception):\n pass\n\n\n def me_exception():\n raise A()\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyExceptionInherit", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyAssignmentToLoopOrWithParameterInspection", - "shortDescription": { - "text": "Assignments to 'for' loop or 'with' statement parameter" - }, - "fullDescription": { - "text": "Reports the cases when you rewrite a loop variable with an inner loop. Example: 'for i in range(5):\n for i in range(20, 25):\n print(\"Inner\", i)\n print(\"Outer\", i)' It also warns you if a variable declared in the 'with' statement is redeclared inside the statement body: 'with open(\"file\") as f:\n f.read()\n with open(\"file\") as f:'", - "markdown": "Reports the cases when you rewrite a loop variable with an inner loop.\n\n**Example:**\n\n\n for i in range(5):\n for i in range(20, 25):\n print(\"Inner\", i)\n print(\"Outer\", i)\n \nIt also warns you if a variable declared in the `with` statement is redeclared inside the statement body:\n\n\n with open(\"file\") as f:\n f.read()\n with open(\"file\") as f:\n \n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "PyAssignmentToLoopOrWithParameter", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PySuperArgumentsInspection", - "shortDescription": { - "text": "Wrong arguments to call super" - }, - "fullDescription": { - "text": "Reports cases when any call to 'super(A, B)' does not meet the following requirements: 'B' is an instance of 'A' 'B' a subclass of 'A' Example: 'class Figure:\n def color(self):\n pass\n\n\nclass Rectangle(Figure):\n def color(self):\n pass\n\n\nclass Square(Figure):\n def color(self):\n return super(Rectangle, self).color() # Square is not an instance or subclass of Rectangle' As a fix, you can make the 'Square' an instance of the 'Rectangle' class.", - "markdown": "Reports cases when any call to `super(A, B)` does not meet the\nfollowing requirements:\n\n* `B` is an instance of `A`\n* `B` a subclass of `A`\n\n**Example:**\n\n\n class Figure:\n def color(self):\n pass\n\n\n class Rectangle(Figure):\n def color(self):\n pass\n\n\n class Square(Figure):\n def color(self):\n return super(Rectangle, self).color() # Square is not an instance or subclass of Rectangle\n\nAs a fix, you can make the `Square` an instance of the `Rectangle` class." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PySuperArguments", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyNonAsciiCharInspection", - "shortDescription": { - "text": "File contains non-ASCII character" - }, - "fullDescription": { - "text": "Reports cases in Python 2 when a file contains non-ASCII characters and does not have an encoding declaration at the top. Example: 'class A(object):\n# №5\n def __init__(self):\n pass' In this example, the IDE reports a non-ASCII symbol in a comment and a lack of encoding declaration. Apply the proposed quick-fix to add a missing encoding declaration: '# coding=utf-8\nclass A(object)\n# №5\n def __init__(self):\n pass'", - "markdown": "Reports cases in Python 2 when a file contains non-ASCII characters and does not\nhave an encoding declaration at the top.\n\n**Example:**\n\n\n class A(object):\n # №5\n def __init__(self):\n pass\n\nIn this example, the IDE reports a non-ASCII symbol in a comment and a lack of encoding\ndeclaration. Apply the proposed quick-fix to add a missing encoding declaration:\n\n\n # coding=utf-8\n class A(object)\n # №5\n def __init__(self):\n pass\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyNonAsciiChar", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyAbstractClassInspection", - "shortDescription": { - "text": "Class must implement all abstract methods" - }, - "fullDescription": { - "text": "Reports cases when not all abstract properties or methods are defined in a subclass. Example: 'from abc import abstractmethod, ABC\n\n\nclass Figure(ABC):\n\n @abstractmethod\n def do_figure(self):\n pass\n\n\nclass Triangle(Figure):\n def do_triangle(self):\n pass' When the quick-fix is applied, the IDE implements an abstract method for the 'Triangle' class: 'from abc import abstractmethod, ABC\n\n\nclass Figure(ABC):\n\n @abstractmethod\n def do_figure(self):\n pass\n\n\nclass Triangle(Figure):\n def do_figure(self):\n pass\n\n def do_triangle(self):\n pass'", - "markdown": "Reports cases when not all abstract properties or methods are defined in\na subclass.\n\n**Example:**\n\n\n from abc import abstractmethod, ABC\n\n\n class Figure(ABC):\n\n @abstractmethod\n def do_figure(self):\n pass\n\n\n class Triangle(Figure):\n def do_triangle(self):\n pass\n\nWhen the quick-fix is applied, the IDE implements an abstract method for the `Triangle` class:\n\n\n from abc import abstractmethod, ABC\n\n\n class Figure(ABC):\n\n @abstractmethod\n def do_figure(self):\n pass\n\n\n class Triangle(Figure):\n def do_figure(self):\n pass\n\n def do_triangle(self):\n pass\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "PyAbstractClass", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyOldStyleClassesInspection", - "shortDescription": { - "text": "Old-style class contains new-style class features" - }, - "fullDescription": { - "text": "Reports occurrences of new-style class features in old-style classes. The inspection highlights '__slots__', '__getattribute__', and 'super()' inside old-style classes.", - "markdown": "Reports occurrences of\n[new-style class features](https://www.python.org/doc/newstyle/)\nin old-style classes. The inspection highlights\n`__slots__`, `__getattribute__`, and `super()`\ninside old-style classes." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyOldStyleClasses", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyBroadExceptionInspection", - "shortDescription": { - "text": "Unclear exception clauses" - }, - "fullDescription": { - "text": "Reports exception clauses that do not provide specific information about the problem. Example: Clauses that do not specify an exception class Clauses that are specified as 'Exception'", - "markdown": "Reports exception clauses that do not provide specific information\nabout the problem.\n\n**Example:**\n\n* Clauses that do not specify an exception class\n* Clauses that are specified as `Exception`" - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "PyBroadException", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyTypeCheckerInspection", - "shortDescription": { - "text": "Incorrect type" - }, - "fullDescription": { - "text": "Reports type errors in function call expressions, targets, and return values. In a dynamically typed language, this is possible in a limited number of cases. Types of function parameters can be specified in docstrings or in Python 3 function annotations. Example: 'def foo() -> int:\n return \"abc\" # Expected int, got str\n\n\na: str\na = foo() # Expected str, got int' With the quick-fix, you can modify the problematic types: 'def foo() -> str:\n return \"abc\"\n\n\na: str\na = foo()'", - "markdown": "Reports type errors in function call expressions, targets, and return values. In a dynamically typed language, this is possible in a limited number of cases.\n\nTypes of function parameters can be specified in\ndocstrings or in Python 3 function annotations.\n\n**Example:**\n\n\n def foo() -> int:\n return \"abc\" # Expected int, got str\n\n\n a: str\n a = foo() # Expected str, got int\n\nWith the quick-fix, you can modify the problematic types:\n\n\n def foo() -> str:\n return \"abc\"\n\n\n a: str\n a = foo()\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyTypeChecker", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyByteLiteralInspection", - "shortDescription": { - "text": "A byte literal contains a non-ASCII character" - }, - "fullDescription": { - "text": "Reports characters in byte literals that are outside ASCII range. Example: 's = b'№5''", - "markdown": "Reports characters in byte literals that are outside ASCII range.\n\n**Example:**\n\n\n s = b'№5'\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyByteLiteral", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyAugmentAssignmentInspection", - "shortDescription": { - "text": "Assignment can be replaced with augmented assignment" - }, - "fullDescription": { - "text": "Reports assignments that can be replaced with augmented assignments. Example: 'a = 23\nb = 3\na = a + b' After the quick-fix is applied, the code changes to: 'a = 23\nb = 3\na += b'", - "markdown": "Reports assignments that can be replaced with augmented assignments.\n\n**Example:**\n\n\n a = 23\n b = 3\n a = a + b\n\nAfter the quick-fix is applied, the code changes to:\n\n\n a = 23\n b = 3\n a += b\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "PyAugmentAssignment", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyDeprecationInspection", - "shortDescription": { - "text": "Deprecated function, class, or module" - }, - "fullDescription": { - "text": "Reports usages of Python functions, or methods that are marked as deprecated and raise the 'DeprecationWarning' or 'PendingDeprecationWarning' warning. Also, this inspection highlights usages of 'abc.abstractstaticmethod', 'abc.abstractproperty', and 'abc.abstractclassmethod' decorators. Example: 'class Foo:\n @property\n def bar(self):\n import warnings\n warnings.warn(\"this is deprecated\", DeprecationWarning, 2)\n return 5\n\n\nfoo = Foo()\nprint(foo.bar)'", - "markdown": "Reports usages of Python functions, or methods that are marked as\ndeprecated and raise the `DeprecationWarning` or `PendingDeprecationWarning` warning.\n\nAlso, this inspection highlights usages of `abc.abstractstaticmethod`, `abc.abstractproperty`, and `abc.abstractclassmethod`\ndecorators.\n\n**Example:**\n\n\n class Foo:\n @property\n def bar(self):\n import warnings\n warnings.warn(\"this is deprecated\", DeprecationWarning, 2)\n return 5\n\n\n foo = Foo()\n print(foo.bar)\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyDeprecation", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyUnnecessaryBackslashInspection", - "shortDescription": { - "text": "Unnecessary backslash" - }, - "fullDescription": { - "text": "Reports backslashes in places where line continuation is implicit inside '()', '[]', and '{}'. Example: 'a = ('first', \\\n 'second', 'third')' When the quick-fix is applied, the redundant backslash is deleted.", - "markdown": "Reports backslashes in places where line continuation is implicit inside `()`,\n`[]`, and `{}`.\n\n**Example:**\n\n\n a = ('first', \\\n 'second', 'third')\n\nWhen the quick-fix is applied, the redundant backslash is deleted." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyUnnecessaryBackslash", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyShadowingNamesInspection", - "shortDescription": { - "text": "Shadowing names from outer scopes" - }, - "fullDescription": { - "text": "Reports shadowing names defined in outer scopes. Example: 'def outer(p):\n def inner(p):\n pass' As a quick-fix, the IDE offers to remove a parameter or rename it.", - "markdown": "Reports shadowing names defined in outer scopes.\n\n**Example:**\n\n\n def outer(p):\n def inner(p):\n pass\n\nAs a quick-fix, the IDE offers to remove a parameter or rename it." - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "PyShadowingNames", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyFinalInspection", - "shortDescription": { - "text": "Invalid usages of final classes, methods, and variables" - }, - "fullDescription": { - "text": "Reports invalid usages of final classes, methods and variables. Example: 'from typing import final\n\n\n@final\nclass A:\n def a_method(self):\n pass\n\n\nclass B(A):\n def a_method(self):\n pass'", - "markdown": "Reports invalid usages of final classes,\nmethods and variables.\n\n**Example:**\n\n\n from typing import final\n\n\n @final\n class A:\n def a_method(self):\n pass\n\n\n class B(A):\n def a_method(self):\n pass\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyFinal", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PySingleQuotedDocstringInspection", - "shortDescription": { - "text": "Single quoted docstring" - }, - "fullDescription": { - "text": "Reports docstrings that do not adhere to the triple double-quoted string format. Example: 'def calc(self, balance=0):\n 'param: balance'\n self.balance = balance' When the quick-fix is applied, the code changes to: 'def calc(self, balance=0):\n \"\"\"param: balance\"\"\"\n self.balance = balance'", - "markdown": "Reports docstrings that do not adhere to the triple double-quoted string format.\n\n**Example:**\n\n\n def calc(self, balance=0):\n 'param: balance'\n self.balance = balance\n\nWhen the quick-fix is applied, the code changes to:\n\n\n def calc(self, balance=0):\n \"\"\"param: balance\"\"\"\n self.balance = balance\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "PySingleQuotedDocstring", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyUnusedLocalInspection", - "shortDescription": { - "text": "Unused local symbols" - }, - "fullDescription": { - "text": "Reports local variables, parameters, and functions that are locally defined, but not used name in a function.", - "markdown": "Reports local variables, parameters, and functions that are locally defined, but not used name in a function." - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "PyUnusedLocal", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyReturnFromInitInspection", - "shortDescription": { - "text": "__init__ method that returns a value" - }, - "fullDescription": { - "text": "Reports occurrences of 'return' statements with a return value inside '__init__' methods of classes. Example: 'class Sum:\n def __init__(self, a, b):\n self.a = a\n self.b = b\n self.sum = a + b\n return self.sum' A constructor should not return any value. The '__init__' method should only initialize the values of instance members for news objects. As a quick-fix, the IDE offers to remove the 'return' statement.", - "markdown": "Reports occurrences of `return` statements with a return value inside\n`__init__` methods of classes.\n\n**Example:**\n\n\n class Sum:\n def __init__(self, a, b):\n self.a = a\n self.b = b\n self.sum = a + b\n return self.sum\n\nA constructor should not return any value. The `__init__` method should\nonly initialize the values of instance members for news objects.\n\nAs a quick-fix, the IDE offers to remove the `return` statement." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyReturnFromInit", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyMissingOrEmptyDocstringInspection", - "shortDescription": { - "text": "Missing or empty docstring" - }, - "fullDescription": { - "text": "Reports missing and empty docstrings. Example of a missing docstring 'def demo(a):\n c = a ** 2' Example of an empty docstring 'def demo(a):\n \"\"\"\n \"\"\"\n c = a ** 2' When the quick-fix is applied, the code fragments change to: 'def demo(a):\n \"\"\"\n\n :param a:\n \"\"\"\n c = a ** 2' You need to provide some details about the parameter in the generated template.", - "markdown": "Reports missing and empty docstrings.\n\n**Example of a missing docstring**\n\n\n def demo(a):\n c = a ** 2\n\n**Example of an empty docstring**\n\n\n def demo(a):\n \"\"\"\n \"\"\"\n c = a ** 2\n\nWhen the quick-fix is applied, the code fragments change to:\n\n\n def demo(a):\n \"\"\"\n\n :param a:\n \"\"\"\n c = a ** 2\n\nYou need to provide some details about the parameter in the generated template." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "PyMissingOrEmptyDocstring", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyPep8NamingInspection", - "shortDescription": { - "text": "PEP 8 naming convention violation" - }, - "fullDescription": { - "text": "Reports violations of the PEP8 naming conventions. Example: 'class mammalia(object):\n extremities = 4\n\n def feeds(self):\n print(\"milk\")' In this code fragment, IDE offers to rename 'mammalia' to 'Mammalia'. When the quick-fix is applied, the code change to: 'class Mammalia(object):\n extremities = 4\n\n def feeds(self):\n print(\"milk\")'", - "markdown": "Reports violations of the\n[PEP8](https://www.python.org/dev/peps/pep-0008/) naming conventions.\n\n**Example:**\n\n\n class mammalia(object):\n extremities = 4\n\n def feeds(self):\n print(\"milk\")\n\nIn this code fragment, IDE offers to rename `mammalia` to `Mammalia`.\nWhen the quick-fix is applied, the code change to:\n\n\n class Mammalia(object):\n extremities = 4\n\n def feeds(self):\n print(\"milk\")\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "PyPep8Naming", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyDictDuplicateKeysInspection", - "shortDescription": { - "text": "Dictionary contains duplicate keys" - }, - "fullDescription": { - "text": "Reports using the same value as the dictionary key twice. Example: 'dic = {\"a\": [1, 2], \"a\": [3, 4]}'", - "markdown": "Reports using the same value as the dictionary key twice.\n\n**Example:**\n\n\n dic = {\"a\": [1, 2], \"a\": [3, 4]}\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyDictDuplicateKeys", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyNoneFunctionAssignmentInspection", - "shortDescription": { - "text": "Assigning function calls that don't return anything" - }, - "fullDescription": { - "text": "Reports cases when an assignment is done on a function that does not return anything. This inspection is similar to pylint inspection E1111. Example: 'def just_print():\n print(\"Hello!\")\n\n\naction = just_print()' As a quick-fix, the IDE offers to remove the assignment.", - "markdown": "Reports cases when an assignment is done on a function that does not return anything.\nThis inspection is similar to [pylint inspection E1111](https://docs.pylint.org/en/1.6.0/features.html#id6).\n\n**Example:**\n\n\n def just_print():\n print(\"Hello!\")\n\n\n action = just_print()\n\nAs a quick-fix, the IDE offers to remove the assignment." - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "PyNoneFunctionAssignment", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyStatementEffectInspection", - "shortDescription": { - "text": "Statement has no effect" - }, - "fullDescription": { - "text": "Reports statements that have no effect. Example: 'class Car:\n def __init__(self, speed=0):\n self.speed = speed\n self.time # has no effect\n\n2 + 3 # has no effect' In this example, you can either add a field 'time' to the 'Car' class or introduce variables for the problematic statements.", - "markdown": "Reports statements that have no effect.\n\n**Example:**\n\n\n class Car:\n def __init__(self, speed=0):\n self.speed = speed\n self.time # has no effect\n\n 2 + 3 # has no effect\n\nIn this example, you can either add a field `time` to the `Car` class or\nintroduce variables for the problematic statements." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyStatementEffect", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyMandatoryEncodingInspection", - "shortDescription": { - "text": "No encoding specified for file" - }, - "fullDescription": { - "text": "Reports a missing encoding comment in Python 2. Example: 'class Book(object):\n def __init__(self):\n pass' When the quick-fix is applied, the missing comment is added: '# coding=utf-8\nclass Book(object):\n def __init__(self):\n pass'", - "markdown": "Reports a missing encoding comment in Python 2.\n\n**Example:**\n\n\n class Book(object):\n def __init__(self):\n pass\n\nWhen the quick-fix is applied, the missing comment is added:\n\n\n # coding=utf-8\n class Book(object):\n def __init__(self):\n pass\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "PyMandatoryEncoding", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyInconsistentIndentationInspection", - "shortDescription": { - "text": "Inconsistent indentation" - }, - "fullDescription": { - "text": "Reports inconsistent indentation in Python source files when, for example, you use a mixture of tabs and spaces in your code.", - "markdown": "Reports inconsistent indentation in Python source files when, for example,\nyou use a mixture of tabs and spaces in your code." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyInconsistentIndentation", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyAttributeOutsideInitInspection", - "shortDescription": { - "text": "An instance attribute is defined outside `__init__`" - }, - "fullDescription": { - "text": "Reports a problem when instance attribute definition is outside '__init__' method. Example: 'class Book:\n def __init__(self):\n self.author = 'Mark Twain'\n\n def release(self):\n self.year = '1889'' When the quick-fix is applied, the code sample changes to: 'class Book:\n def __init__(self):\n self.year = '1889'\n self.author = 'Mark Twain'\n\n def release(self):\n pass'", - "markdown": "Reports a problem when instance attribute definition is outside `__init__` method.\n\n**Example:**\n\n\n class Book:\n def __init__(self):\n self.author = 'Mark Twain'\n\n def release(self):\n self.year = '1889'\n\n\nWhen the quick-fix is applied, the code sample changes to:\n\n\n class Book:\n def __init__(self):\n self.year = '1889'\n self.author = 'Mark Twain'\n\n def release(self):\n pass\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "PyAttributeOutsideInit", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyTypedDictInspection", - "shortDescription": { - "text": "Invalid TypedDict definition and usages" - }, - "fullDescription": { - "text": "Reports invalid definition and usage of TypedDict. Example: 'from typing import TypedDict\n\n\nclass Movie(TypedDict):\n name: str\n year: int\n rate: int = 10 # Right-hand side values are not supported\n\n def method(self): # Invalid statement in TypedDict\n pass\n\n\nm = Movie(name=\"name\", year=1000, rate=9)\nprint(m[\"director\"]) # There is no the 'director' key in 'Movie'\ndel m[\"name\"] # The 'name' key cannot be deleted\nm[\"year\"] = \"1001\" # Expected 'int', got 'str''", - "markdown": "Reports invalid definition and usage of\n[TypedDict](https://www.python.org/dev/peps/pep-0589/).\n\n**Example:**\n\n\n from typing import TypedDict\n\n\n class Movie(TypedDict):\n name: str\n year: int\n rate: int = 10 # Right-hand side values are not supported\n\n def method(self): # Invalid statement in TypedDict\n pass\n\n\n m = Movie(name=\"name\", year=1000, rate=9)\n print(m[\"director\"]) # There is no the 'director' key in 'Movie'\n del m[\"name\"] # The 'name' key cannot be deleted\n m[\"year\"] = \"1001\" # Expected 'int', got 'str'\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyTypedDict", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyPep8Inspection", - "shortDescription": { - "text": "PEP 8 coding style violation" - }, - "fullDescription": { - "text": "Reports violations of the PEP 8 coding style guide by running the bundled pycodestyle.py tool.", - "markdown": "Reports violations of the [PEP 8 coding style guide](https://www.python.org/dev/peps/pep-0008/) by running the bundled [pycodestyle.py](https://github.com/PyCQA/pycodestyle) tool." - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "PyPep8", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyMissingTypeHintsInspection", - "shortDescription": { - "text": "Missing type hinting for function definition" - }, - "fullDescription": { - "text": "Reports missing type hints for function declaration in one of the two formats: parameter annotations or a type comment. Select the Only when types are known checkbox if you want the inspection check the types collected from runtime or inferred.", - "markdown": "Reports missing type hints for function declaration in\none of the two formats: parameter annotations or a type comment.\n\nSelect the **Only when types are known** checkbox if you want the inspection check\nthe types collected from runtime or inferred." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "PyMissingTypeHints", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyTupleItemAssignmentInspection", - "shortDescription": { - "text": "Tuple item assignment is prohibited" - }, - "fullDescription": { - "text": "Reports assignments to a tuple item. Example: 't = ('red', 'blue', 'green', 'white')\nt[3] = 'black'' A quick-fix offers to replace the tuple with a list.", - "markdown": "Reports assignments to a tuple item.\n\n**Example:**\n\n\n t = ('red', 'blue', 'green', 'white')\n t[3] = 'black'\n\nA quick-fix offers to replace the tuple with a list." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyTupleItemAssignment", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyDunderSlotsInspection", - "shortDescription": { - "text": "Invalid usages of classes with '__slots__' definitions" - }, - "fullDescription": { - "text": "Reports invalid usages of a class with '__slots__' definitions. Example: 'class Foo:\n __slots__ = ['foo', 'bar']\n\n\nfoo = Foo()\nfoo.baz = 'spam''", - "markdown": "Reports invalid usages of a class with `__slots__` definitions.\n\n**Example:**\n\n\n class Foo:\n __slots__ = ['foo', 'bar']\n\n\n foo = Foo()\n foo.baz = 'spam'\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyDunderSlots", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyDefaultArgumentInspection", - "shortDescription": { - "text": "The default argument is mutable" - }, - "fullDescription": { - "text": "Reports a problem when a mutable value as a list or dictionary is detected in a default value for an argument. Default argument values are evaluated only once at function definition time, which means that modifying the default value of the argument will affect all subsequent calls of that function. Example: 'def func(s, cache={}):\n cache[s] = None' When the quick-fix is applied, the code changes to: 'def func(s, cache=None):\n if cache is None:\n cache = {}\n cache[s] = None'", - "markdown": "Reports a problem when a mutable value as a list or dictionary is detected in a default value for\nan argument. \n\nDefault argument values are evaluated only once at function definition time,\nwhich means that modifying the\ndefault value of the argument will affect all subsequent calls of that function.\n\n**Example:**\n\n\n def func(s, cache={}):\n cache[s] = None\n\nWhen the quick-fix is applied, the code changes to:\n\n\n def func(s, cache=None):\n if cache is None:\n cache = {}\n cache[s] = None\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyDefaultArgument", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyTestUnpassedFixtureInspection", - "shortDescription": { - "text": "Fixture is not requested by test functions" - }, - "fullDescription": { - "text": "Reports if a fixture is used without being passed to test function parameters or to '@pytest.mark.usefixtures' decorator", - "markdown": "Reports if a fixture is used without being passed to test function parameters or to `@pytest.mark.usefixtures` decorator" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyTestUnpassedFixture", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyShadowingBuiltinsInspection", - "shortDescription": { - "text": "Shadowing built-in names" - }, - "fullDescription": { - "text": "Reports shadowing built-in names, such as 'len' or 'list'. Example: 'def len(a, b, c):\n d = a + b + c\n return d' In this code fragment, the 'len' built-in name is used. The IDE offers to apply the Rename refactoring as a fix.", - "markdown": "Reports shadowing built-in names, such as `len` or `list`.\n\n**Example:**\n\n\n def len(a, b, c):\n d = a + b + c\n return d\n\nIn this code fragment, the `len` built-in name is used. The IDE offers to\napply the Rename refactoring as a fix." - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "PyShadowingBuiltins", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyMethodOverridingInspection", - "shortDescription": { - "text": "Method signature does not match signature of overridden method" - }, - "fullDescription": { - "text": "Reports inconsistencies in overriding method signatures. Example: 'class Book:\n def add_title(self):\n pass\n\n\nclass Novel(Book):\n def add_title(self, text):\n pass' Parameters of the 'add_title' method in the 'Novel' class do not match the method signature specified in the 'Book' class. As a fix, the IDE offers to apply the Change Signature refactoring.", - "markdown": "Reports inconsistencies in overriding method signatures.\n\n**Example:**\n\n\n class Book:\n def add_title(self):\n pass\n\n\n class Novel(Book):\n def add_title(self, text):\n pass\n\nParameters of the `add_title` method in the `Novel` class do not match the method\nsignature specified in the `Book` class. As a fix, the IDE offers to apply the Change Signature\nrefactoring." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyMethodOverriding", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PoetryPackageVersionsInspection", - "shortDescription": { - "text": "Poetry package versions" - }, - "fullDescription": { - "text": "Reports outdated versions of packages in '[tool.poetry.dependencies]' and '[tool.poetry.dev-dependencies]' sections of 'pyproject.toml'.", - "markdown": "Reports outdated versions of packages in `[tool.poetry.dependencies]` and `[tool.poetry.dev-dependencies]`\nsections of `pyproject.toml`." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PoetryPackageVersions", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyTestParametrizedInspection", - "shortDescription": { - "text": "Incorrect arguments in @pytest.mark.parametrize" - }, - "fullDescription": { - "text": "Reports functions that are decorated with @pytest.mark.parametrize but do not have arguments to accept parameters of the decorator.", - "markdown": "Reports functions that are decorated with [@pytest.mark.parametrize](https://docs.pytest.org/en/stable/parametrize.html) but do not have arguments to accept\nparameters of the decorator." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyTestParametrized", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyDecoratorInspection", - "shortDescription": { - "text": "Class-specific decorator is used outside the class" - }, - "fullDescription": { - "text": "Reports usages of '@classmethod' or '@staticmethod' decorators in methods outside a class. Example: 'class State(object):\n\n @classmethod\n def my_state(cls, name):\n cls.name = name\n\n\n@classmethod\ndef change_state(self):\n pass' The 'change_state' method should not use the '@classmethod' decorator or it should be moved to the 'State' class declaration. If you apply the 'Remove decorator' action, the code changes to: 'class State(object):\n\n @classmethod\n def my_state(cls, name):\n cls.name = name\n\n\ndef change_state(self):\n pass'", - "markdown": "Reports usages of `@classmethod` or `@staticmethod` decorators\nin methods outside a class.\n\n**Example:**\n\n\n class State(object):\n\n @classmethod\n def my_state(cls, name):\n cls.name = name\n\n\n @classmethod\n def change_state(self):\n pass\n\nThe `change_state` method should not use the `@classmethod` decorator or it should be\nmoved to the `State` class declaration.\n\nIf you apply the `Remove decorator` action, the code changes to:\n\n\n class State(object):\n\n @classmethod\n def my_state(cls, name):\n cls.name = name\n\n\n def change_state(self):\n pass\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyDecorator", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyAsyncCallInspection", - "shortDescription": { - "text": "Missing `await` syntax in coroutine calls" - }, - "fullDescription": { - "text": "Reports coroutines that were called without using the 'await' syntax. Example: 'async def bar():\n pass\n\n\nasync def foo():\n bar()' After the quick-fix is applied, the code changes to: 'async def bar():\n pass\n\n\nasync def foo():\n await bar()'", - "markdown": "Reports coroutines that were called\nwithout using the `await` syntax.\n\n**Example:**\n\n\n async def bar():\n pass\n\n\n async def foo():\n bar()\n\nAfter the quick-fix is applied, the code changes to:\n\n\n async def bar():\n pass\n\n\n async def foo():\n await bar()\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyAsyncCall", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "RestRoleInspection", - "shortDescription": { - "text": "Role is not defined" - }, - "fullDescription": { - "text": "Reports undefined roles in reStructuredText files. Example: '.. role:: custom\n.. role:: newcustom(emphasis)\n\nAn example of using :custom:`interpreted text`\nAn example of using :newcustom:`interpreted text`\nAn example of using :emphasis:`interpreted text`\n\n\nSome text using undefined role :undef:`interpreted text`'", - "markdown": "Reports undefined roles in reStructuredText files.\n\n**Example:**\n\n\n .. role:: custom\n .. role:: newcustom(emphasis)\n\n An example of using :custom:`interpreted text`\n An example of using :newcustom:`interpreted text`\n An example of using :emphasis:`interpreted text`\n\n\n Some text using undefined role :undef:`interpreted text`\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "RestRoleInspection", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "ReST", - "index": 74, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CommandLineInspection", - "shortDescription": { - "text": "Incorrect CLI syntax" - }, - "fullDescription": { - "text": "Reports the problems if the arguments of the command you type in the console are not in the proper order. The inspection also verifies that option names and arguments are correct. Do not disable the inspection if you are going to use command-line interfaces like manage.py in Django.", - "markdown": "Reports the problems if the arguments of the command you type in the console are not in the proper order. The inspection also verifies\nthat option names and arguments are correct.\n\nDo not disable the inspection if you are going to use command-line interfaces like [manage.py in Django](https://www.jetbrains.com/help/pycharm/running-manage-py.html)." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "CommandLineInspection", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyComparisonWithNoneInspection", - "shortDescription": { - "text": "Using equality operators to compare with None" - }, - "fullDescription": { - "text": "Reports comparisons with 'None'. That type of comparisons should always be done with 'is' or 'is not', never the equality operators. Example: 'a = 2\n\n\nif a == None:\n print(\"Success\")' Once the quick-fix is applied, the code changes to: 'a = 2\n\n\nif a is None:\n print(\"Success\")'", - "markdown": "Reports comparisons with `None`. That type of comparisons\nshould always be done with `is` or `is not`, never\nthe equality operators.\n\n**Example:**\n\n\n a = 2\n\n\n if a == None:\n print(\"Success\")\n\nOnce the quick-fix is applied, the code changes to:\n\n\n a = 2\n\n\n if a is None:\n print(\"Success\")\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "PyComparisonWithNone", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyMethodParametersInspection", - "shortDescription": { - "text": "Improper first parameter" - }, - "fullDescription": { - "text": "Reports methods that lack the first parameter that is usually named 'self'. Example: 'class Movie:\n\n def show():\n pass' When the quick-fix is applied, the code changes to: 'class Movie:\n\n def show(self):\n pass' The inspection also reports naming issues in class methods. Example: 'class Movie:\n @classmethod\n def show(abc):\n pass' Since the first parameter of a class method should be 'cls', the IDE provides a quick-fix to rename it.", - "markdown": "Reports methods that lack the first parameter that is usually\nnamed `self`.\n\n**Example:**\n\n\n class Movie:\n\n def show():\n pass\n\nWhen the quick-fix is applied, the code changes to:\n\n\n class Movie:\n\n def show(self):\n pass\n\nThe inspection also reports naming issues in class methods.\n\n**Example:**\n\n\n class Movie:\n @classmethod\n def show(abc):\n pass\n\nSince the first parameter of a class method should be `cls`, the IDE provides a quick-fix\nto rename it." - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "PyMethodParameters", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyDocstringTypesInspection", - "shortDescription": { - "text": "Type in docstring does not match inferred type" - }, - "fullDescription": { - "text": "Reports types in docstring that do not match dynamically inferred types.", - "markdown": "Reports types in docstring that do not match dynamically inferred types." - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "PyDocstringTypes", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyMethodFirstArgAssignmentInspection", - "shortDescription": { - "text": "First argument of the method is reassigned" - }, - "fullDescription": { - "text": "Reports cases when the first parameter, such as 'self' or 'cls', is reassigned in a method. Because in most cases, there are no objectives in such reassignment, the IDE indicates an error. Example: 'class Account:\n def calc(self, balance):\n if balance == 0:\n self = balance\n return self' As a fix, you might want to check and modify the algorithm to ensure that reassignment is needed. If everything is correct, you can invoke intention actions for this code and opt to ignore the warning.", - "markdown": "Reports cases when the first parameter,\nsuch as `self` or `cls`, is reassigned in a method.\nBecause in most cases, there are no objectives in such reassignment, the\nIDE indicates an error.\n\n**Example:**\n\n\n class Account:\n def calc(self, balance):\n if balance == 0:\n self = balance\n return self\n\nAs a fix, you might want to check and modify the algorithm to ensure that reassignment is needed. If everything is correct,\nyou can invoke intention actions for this code and opt to ignore the warning." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyMethodFirstArgAssignment", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyNewStyleGenericSyntaxInspection", - "shortDescription": { - "text": "Invalid usage of new-style type parameters and type aliases" - }, - "fullDescription": { - "text": "Reports invalid usage of PEP 695 type parameter syntax Finds the following problems in function and class definitions and new-style type alias statements: Extending typing.Generic in new-style generic classes Extending parameterized typing.Protocol in new-style generic classes Using generic upper bounds and constraints with type parameters for ParamSpec and TypeVarTuple Mixing traditional and new-style type variables Using traditional type variables in new-style type aliases Examples: 'from typing import Generic\n\n class Example[T](Generic[T]): ... # Classes with type parameter list should not extend 'Generic'' 'class Example[T: (list[S], str)]: ... # Generic types are not allowed inside constraints and bounds of type parameters' 'from typing import TypeVar\n\n K = TypeVar(\"K\")\n\n class ClassC[V]:\n def method2[M](self, a: M, b: K) -> M | K: ... # Mixing traditional and new-style TypeVars is not allowed'", - "markdown": "Reports invalid usage of [PEP 695](https://www.python.org/dev/peps/pep-0695/) type parameter syntax\n\n\nFinds the following problems in function and class definitions and new-style type alias statements:\n\n* Extending typing.Generic in new-style generic classes\n* Extending parameterized typing.Protocol in new-style generic classes\n* Using generic upper bounds and constraints with type parameters for ParamSpec and TypeVarTuple\n* Mixing traditional and new-style type variables\n* Using traditional type variables in new-style type aliases\n\n\nExamples:\n\n\n from typing import Generic\n\n class Example[T](Generic[T]): ... # Classes with type parameter list should not extend 'Generic'\n\n\n class Example[T: (list[S], str)]: ... # Generic types are not allowed inside constraints and bounds of type parameters\n\n\n from typing import TypeVar\n\n K = TypeVar(\"K\")\n\n class ClassC[V]:\n def method2[M](self, a: M, b: K) -> M | K: ... # Mixing traditional and new-style TypeVars is not allowed\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyNewStyleGenericSyntax", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyTupleAssignmentBalanceInspection", - "shortDescription": { - "text": "Tuple assignment balance is incorrect" - }, - "fullDescription": { - "text": "Reports cases when the number of expressions on the right-hand side and targets on the left-hand side are not the same. Example: 't = ('red', 'blue', 'green', 'white')\n(c1, c2, c3) = t' As a quick-fix, you can modify the highlighted code fragment to restore the tuple balance.", - "markdown": "Reports cases when the number of expressions on the right-hand side\nand targets on the left-hand side are not the same.\n\n**Example:**\n\n\n t = ('red', 'blue', 'green', 'white')\n (c1, c2, c3) = t\n\nAs a quick-fix, you can modify the highlighted code fragment to restore the tuple\nbalance." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyTupleAssignmentBalance", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyClassHasNoInitInspection", - "shortDescription": { - "text": "Class has no `__init__` method" - }, - "fullDescription": { - "text": "Reports cases in Python 2 when a class has no '__init__' method, neither its parent classes. Example: 'class Book():\n pass' The quick-fix adds the '__init__' method: 'class Book():\n def __init__(self):\n pass'", - "markdown": "Reports cases in Python 2 when a class has no `__init__` method, neither its parent\nclasses.\n\n**Example:**\n\n\n class Book():\n pass\n\nThe quick-fix adds the `__init__` method:\n\n\n class Book():\n def __init__(self):\n pass\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "PyClassHasNoInit", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyArgumentEqualDefaultInspection", - "shortDescription": { - "text": "The function argument is equal to the default parameter value" - }, - "fullDescription": { - "text": "Reports a problem when an argument passed to the function is equal to the default parameter value. This inspection is disabled by default to avoid performance degradation. Example: 'def my_function(a: int = 2):\n print(a)\n\n\nmy_function(2)'", - "markdown": "Reports a problem when an argument\npassed to the function is equal to the default parameter value.\n\nThis inspection is disabled by default to avoid performance degradation.\n\n**Example:**\n\n\n def my_function(a: int = 2):\n print(a)\n\n\n my_function(2)\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "PyArgumentEqualDefault", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyClassVarInspection", - "shortDescription": { - "text": "Invalid usage of ClassVar variables" - }, - "fullDescription": { - "text": "Reports invalid usages of ClassVar annotations. Example: 'from typing import ClassVar\n\n\nclass Cat:\n color: ClassVar[str] = \"white\"\n weight: int\n\n def __init__(self, weight: int):\n self.weight = weight\n\n\nCat.color = \"black\" # OK\nmy_cat = Cat(5)\nmy_cat.color = \"gray\" # Error, setting class variable on instance'", - "markdown": "Reports invalid usages of [ClassVar](https://docs.python.org/3/library/typing.html#typing.ClassVar) annotations.\n\n**Example:**\n\n\n from typing import ClassVar\n\n\n class Cat:\n color: ClassVar[str] = \"white\"\n weight: int\n\n def __init__(self, weight: int):\n self.weight = weight\n\n\n Cat.color = \"black\" # OK\n my_cat = Cat(5)\n my_cat.color = \"gray\" # Error, setting class variable on instance\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyClassVar", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyFromFutureImportInspection", - "shortDescription": { - "text": "Improper position of from __future__ import" - }, - "fullDescription": { - "text": "Reports 'from __future__ import' statements that are used not at the beginning of a file. Example: 'a = 1\nfrom __future__ import print_function\nprint()' When the quick-fix is applied, the code changes to: 'from __future__ import print_function\n\na = 1\nprint()'", - "markdown": "Reports `from __future__ import`\nstatements that are used not at\nthe beginning of a file.\n\n**Example:**\n\n\n a = 1\n from __future__ import print_function\n print()\n\nWhen the quick-fix is applied, the code changes to:\n\n\n from __future__ import print_function\n\n a = 1\n print()\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyFromFutureImport", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyUnresolvedReferencesInspection", - "shortDescription": { - "text": "Unresolved references" - }, - "fullDescription": { - "text": "Reports references in your code that cannot be resolved. In a dynamically typed language, this is possible in a limited number of cases. If a reference type is unknown, then its attributes are not highlighted as unresolved even if you know that they should be: 'def print_string(s):\n print(s.abc())' In this code fragment 's' is always a string and 'abc' should be highlighted as unresolved. However, 's' type is inferred as 'Any' and no warning is reported. The IDE provides quick-fix actions to add missing references on-the-fly.", - "markdown": "Reports references in your code that cannot be resolved.\n\nIn a dynamically typed language, this is possible in a limited number of cases.\n\nIf a reference type is unknown, then its attributes are not highlighted as unresolved even if you know that they should be:\n\n\n def print_string(s):\n print(s.abc())\n\nIn this code fragment `s` is always a string and `abc` should be highlighted as unresolved. However, `s`\ntype is inferred as `Any` and no warning is reported.\n\nThe IDE provides quick-fix actions to add missing references on-the-fly." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "PyUnresolvedReferences", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyPackageRequirementsInspection", - "shortDescription": { - "text": "Unsatisfied package requirements" - }, - "fullDescription": { - "text": "Reports packages mentioned in requirements files (for example, 'requirements.txt' or 'Pipfile') but not installed, or imported but not mentioned in requirements files. The IDE shows a quick-fix banner so that you can install the missing packages in one click.", - "markdown": "Reports packages mentioned in requirements files (for example, `requirements.txt` or `Pipfile`) but not installed,\nor imported but not mentioned in requirements files.\n\n\nThe IDE shows a quick-fix banner so that you can install the missing packages in one click." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyPackageRequirements", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyTrailingSemicolonInspection", - "shortDescription": { - "text": "Prohibited trailing semicolon in a statement" - }, - "fullDescription": { - "text": "Reports trailing semicolons in statements. Example: 'def my_func(a):\n c = a ** 2;\n return c' IDE provides a quick-fix that removes a trailing semicolon. When you apply it, the code changes to: 'def my_func(a):\n c = a ** 2\n return c'", - "markdown": "Reports trailing semicolons in statements.\n\n**Example:**\n\n\n def my_func(a):\n c = a ** 2;\n return c\n\nIDE provides a quick-fix that removes a trailing semicolon. When you\napply it, the code changes to:\n\n\n def my_func(a):\n c = a ** 2\n return c\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyTrailingSemicolon", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyRedundantParenthesesInspection", - "shortDescription": { - "text": "Redundant parentheses" - }, - "fullDescription": { - "text": "Reports about redundant parentheses in expressions. The IDE provides the quick-fix action to remove the redundant parentheses.", - "markdown": "Reports about redundant parentheses in expressions.\n\nThe IDE provides the quick-fix action to remove the redundant parentheses." - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "PyRedundantParentheses", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyArgumentListInspection", - "shortDescription": { - "text": "Incorrect call arguments" - }, - "fullDescription": { - "text": "Reports discrepancies between declared parameters and actual arguments, as well as incorrect arguments, for example, duplicate named arguments, and incorrect argument order. Example: 'class Foo:\n def __call__(self, p1: int, *, p2: str = \"%\"):\n return p2 * p1\n\n\nbar = Foo()\nbar.__call__() # unfilled parameter\nbar(5, \"#\") # unexpected argument' The correct code fragment looks at follows: 'class Foo:\n def __call__(self, p1: int, *, p2: str = \"%\"):\n return p2 * p1\n\n\nbar = Foo()\nbar.__call__(5)\nbar(5, p2=\"#\")'", - "markdown": "Reports discrepancies between declared parameters and actual arguments, as well as\nincorrect arguments, for example, duplicate named arguments, and incorrect argument order.\n\n**Example:**\n\n\n class Foo:\n def __call__(self, p1: int, *, p2: str = \"%\"):\n return p2 * p1\n\n\n bar = Foo()\n bar.__call__() # unfilled parameter\n bar(5, \"#\") # unexpected argument\n\nThe correct code fragment looks at follows:\n\n\n class Foo:\n def __call__(self, p1: int, *, p2: str = \"%\"):\n return p2 * p1\n\n\n bar = Foo()\n bar.__call__(5)\n bar(5, p2=\"#\")\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyArgumentList", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyInterpreterInspection", - "shortDescription": { - "text": "An invalid interpreter" - }, - "fullDescription": { - "text": "Reports problems if there is no Python interpreter configured for the project or if the interpreter is invalid. Without a properly configured interpreter, you cannot execute your Python scripts and benefit from some Python code insight features. The IDE provides quick access to the interpreter settings.", - "markdown": "Reports problems if there is no Python interpreter configured for the project or if the interpreter is invalid. Without a properly\nconfigured interpreter, you cannot execute your Python scripts and benefit from some Python code insight features.\n\nThe IDE provides quick access to the interpreter settings." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "PyInterpreter", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyPropertyAccessInspection", - "shortDescription": { - "text": "Inappropriate access to properties" - }, - "fullDescription": { - "text": "Reports cases when properties are accessed inappropriately: Read-only properties are set Write-only properties are read Non-deletable properties are deleted Example: 'class MyClass:\n @property\n def read_only(self): return None\n\n def __write_only_setter(self, value): pass\n\n write_only = property(None, __write_only_setter)\n\n\na = MyClass()\na.read_only = 10 # property cannot be set\ndel a.read_only # property cannot be deleted\nprint(a.write_only) # property cannot be read'", - "markdown": "Reports cases when properties are accessed inappropriately:\n\n* Read-only properties are set\n* Write-only properties are read\n* Non-deletable properties are deleted\n\n**Example:**\n\n\n class MyClass:\n @property\n def read_only(self): return None\n\n def __write_only_setter(self, value): pass\n\n write_only = property(None, __write_only_setter)\n\n\n a = MyClass()\n a.read_only = 10 # property cannot be set\n del a.read_only # property cannot be deleted\n print(a.write_only) # property cannot be read\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyPropertyAccess", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyStubPackagesAdvertiser", - "shortDescription": { - "text": "Stub packages advertiser" - }, - "fullDescription": { - "text": "Reports availability of stub packages. Stub package is a package that contains type information for the corresponding runtime package. Using stub packages ensures better coding assistance for the corresponding python package.", - "markdown": "Reports availability of stub packages.\n\n\n[Stub package](https://www.python.org/dev/peps/pep-0561/) is a package that contains type information for the corresponding\nruntime package.\n\nUsing stub packages ensures better coding assistance for the corresponding python package." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyStubPackagesAdvertiser", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyRelativeImportInspection", - "shortDescription": { - "text": "Suspicious relative imports" - }, - "fullDescription": { - "text": "Reports usages of relative imports inside plain directories, for example, directories neither containing '__init__.py' nor explicitly marked as namespace packages.", - "markdown": "Reports usages of relative imports inside plain directories, for example, directories neither containing `__init__.py` nor\nexplicitly marked as namespace packages." - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "PyPackages", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyRedeclarationInspection", - "shortDescription": { - "text": "Redeclared names without usages" - }, - "fullDescription": { - "text": "Reports unconditional redeclarations of names without being used in between. Example: 'def x(): pass\n\n\nx = 2' It applies to function and class declarations, and top-level assignments. When the warning is shown, you can try a recommended action, for example, you might be prompted to rename the variable.", - "markdown": "Reports unconditional redeclarations of names without being used in between.\n\n**Example:**\n\n\n def x(): pass\n\n\n x = 2\n\nIt applies to function and class declarations, and top-level assignments.\n\nWhen the warning is shown, you can try a recommended action, for example, you might be prompted to\nrename the variable." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyRedeclaration", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyProtectedMemberInspection", - "shortDescription": { - "text": "Accessing a protected member of a class or a module" - }, - "fullDescription": { - "text": "Reports cases when a protected member is accessed outside the class, a descendant of the class where it is defined, or a module. Example: 'class Foo:\n def _protected_method(self):\n pass\n\n\nclass Bar(Foo):\n def public_method(self):\n self._protected_method()\n\n\nfoo = Foo()\nfoo._protected_method() # Access to a protected method'", - "markdown": "Reports cases when a protected member is accessed outside the class,\na descendant of the class where it is defined, or a module.\n\n**Example:**\n\n\n class Foo:\n def _protected_method(self):\n pass\n\n\n class Bar(Foo):\n def public_method(self):\n self._protected_method()\n\n\n foo = Foo()\n foo._protected_method() # Access to a protected method\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "PyProtectedMember", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyStubPackagesCompatibilityInspection", - "shortDescription": { - "text": "Incompatible stub packages" - }, - "fullDescription": { - "text": "Reports stub packages that do not support the version of the corresponding runtime package. A stub package contains type information for some runtime package.", - "markdown": "Reports stub packages that do not support the version of the corresponding runtime package.\n\nA [stub package](https://www.python.org/dev/peps/pep-0561/) contains type information for some runtime package." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyStubPackagesCompatibility", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyUnboundLocalVariableInspection", - "shortDescription": { - "text": "Unbound local variables" - }, - "fullDescription": { - "text": "Reports local variables referenced before assignment. Example: 'x = 0\nif x > 10:\n b = 3\nprint(b)' The IDE reports a problem for 'print(b)'. A possible fix is: 'x = 0\nif x > 10:\n b = 3\n print(b)'", - "markdown": "Reports local variables referenced before assignment.\n\n**Example:**\n\n\n x = 0\n if x > 10:\n b = 3\n print(b)\n\nThe IDE reports a problem for `print(b)`. A possible fix is:\n\n\n x = 0\n if x > 10:\n b = 3\n print(b)\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyUnboundLocalVariable", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyNamedTupleInspection", - "shortDescription": { - "text": "Invalid definition of 'typing.NamedTuple'" - }, - "fullDescription": { - "text": "Reports invalid definition of a typing.NamedTuple. Example: 'import typing\n\n\nclass FullName(typing.NamedTuple):\n first: str\n last: str = \"\"\n middle: str' As a fix, place the field with the default value after the fields without default values: 'import typing\n\n\nclass FullName(typing.NamedTuple):\n first: str\n middle: str\n last: str = \"\"'", - "markdown": "Reports invalid definition of a\n[typing.NamedTuple](https://docs.python.org/3/library/typing.html#typing.NamedTuple).\n\n**Example:**\n\n\n import typing\n\n\n class FullName(typing.NamedTuple):\n first: str\n last: str = \"\"\n middle: str\n\nAs a fix, place the field with the default value after the fields without default values:\n\n\n import typing\n\n\n class FullName(typing.NamedTuple):\n first: str\n middle: str\n last: str = \"\"\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyNamedTuple", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyNestedDecoratorsInspection", - "shortDescription": { - "text": "Problematic nesting of decorators" - }, - "fullDescription": { - "text": "Reports problems with nesting decorators. The inspection highlights the cases when 'classmethod' or 'staticmethod' is applied before another decorator. Example: 'def innocent(f):\n return f\n\n\nclass A:\n @innocent # Decorator will not receive a callable it may expect\n @classmethod\n def f2(cls):\n pass\n\n @innocent # Decorator will not receive a callable it may expect\n @staticmethod\n def f1():\n pass' As a quick-fix, the IDE offers to remove the decorator.", - "markdown": "Reports problems with nesting decorators. The inspection highlights the cases when `classmethod` or `staticmethod`\nis applied before another decorator.\n\n**Example:**\n\n\n def innocent(f):\n return f\n\n\n class A:\n @innocent # Decorator will not receive a callable it may expect\n @classmethod\n def f2(cls):\n pass\n\n @innocent # Decorator will not receive a callable it may expect\n @staticmethod\n def f1():\n pass\n\nAs a quick-fix, the IDE offers to remove the decorator." - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "PyNestedDecorators", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyOverloadsInspection", - "shortDescription": { - "text": "Overloads in regular Python files" - }, - "fullDescription": { - "text": "Reports cases when overloads in regular Python files are placed after the implementation or when their signatures are not compatible with the implementation. Example: 'from typing import overload\n\n\n@overload\ndef foo(p1, p2): # Overload signature is not compatible with the implementation\n pass\n\n\n@overload\ndef foo(p1): # Overload signature is not compatible with the implementation\n pass\n\n\ndef foo(p1, p2, p3):\n print(p1, p2, p3)'", - "markdown": "Reports cases when overloads in regular Python files are placed after the implementation or when their signatures are\nnot compatible with the implementation.\n\n**Example:**\n\n\n from typing import overload\n\n\n @overload\n def foo(p1, p2): # Overload signature is not compatible with the implementation\n pass\n\n\n @overload\n def foo(p1): # Overload signature is not compatible with the implementation\n pass\n\n\n def foo(p1, p2, p3):\n print(p1, p2, p3)\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyOverloads", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyExceptClausesOrderInspection", - "shortDescription": { - "text": "Wrong order of 'except' clauses" - }, - "fullDescription": { - "text": "Reports cases when 'except' clauses are not in the proper order, from the more specific to the more generic, or one exception class is caught twice. If you do not fix the order, some exceptions may not be caught by the most specific handler. Example: 'try:\n call()\nexcept ValueError:\n pass\nexcept UnicodeError:\n pass' The IDE recommends moving the clause up. When the quick-fix is applied, the code changes to: 'try:\n call()\nexcept UnicodeError:\n pass\nexcept ValueError:\n pass'", - "markdown": "Reports cases when `except` clauses are not in the proper order,\nfrom the more specific to the more generic, or one exception class is caught twice.\n\n\nIf you do not fix the order, some exceptions may not be caught by the most specific handler.\n\n**Example:**\n\n\n try:\n call()\n except ValueError:\n pass\n except UnicodeError:\n pass\n\nThe IDE recommends moving the clause up. When the quick-fix is applied, the code changes to:\n\n\n try:\n call()\n except UnicodeError:\n pass\n except ValueError:\n pass\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyExceptClausesOrder", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyDataclassInspection", - "shortDescription": { - "text": "Invalid definition and usage of Data Classes" - }, - "fullDescription": { - "text": "Reports invalid definitions and usages of classes created with 'dataclasses' or 'attr' modules. Example: 'import dataclasses\n\n\n@dataclasses.dataclass\nclass FullName:\n first: str\n middle: str = \"\"\n last: str'", - "markdown": "Reports invalid definitions and usages of classes created with\n`dataclasses` or `attr` modules.\n\n**Example:**\n\n\n import dataclasses\n\n\n @dataclasses.dataclass\n class FullName:\n first: str\n middle: str = \"\"\n last: str\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyDataclass", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyClassicStyleClassInspection", - "shortDescription": { - "text": "Classic style class usage" - }, - "fullDescription": { - "text": "Reports classic style classes usage. This inspection applies only to Python 2. Example: 'class A:\n pass' With quick-fixes provided by the IDE, this code fragment changes to: 'class A(object):\n def __init__(self):\n pass'", - "markdown": "Reports [classic style classes](https://docs.python.org/2/reference/datamodel.html#new-style-and-classic-classes) usage. This inspection applies only to Python 2.\n\n**Example:**\n\n\n class A:\n pass\n\nWith quick-fixes provided by the IDE, this code fragment changes to:\n\n\n class A(object):\n def __init__(self):\n pass\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "PyClassicStyleClass", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyPropertyDefinitionInspection", - "shortDescription": { - "text": "Incorrect property definition" - }, - "fullDescription": { - "text": "Reports problems with the arguments of 'property()' and functions annotated with '@property'. 'class C:\n @property\n def abc(self): # Getter should return or yield something\n pass\n\n @abc.setter\n def foo(self, value): # Names of function and decorator don't match\n pass\n\n @abc.setter\n def abc(self, v1, v2): # Setter signature should be (self, value)\n pass\n\n @abc.deleter\n def abc(self, v1): # Delete signature should be (self)\n pass' A quick-fix offers to update parameters.", - "markdown": "Reports problems with the arguments of `property()` and functions\nannotated with `@property`.\n\n\n class C:\n @property\n def abc(self): # Getter should return or yield something\n pass\n\n @abc.setter\n def foo(self, value): # Names of function and decorator don't match\n pass\n\n @abc.setter\n def abc(self, v1, v2): # Setter signature should be (self, value)\n pass\n\n @abc.deleter\n def abc(self, v1): # Delete signature should be (self)\n pass\n\nA quick-fix offers to update parameters." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PyPropertyDefinition", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyIncorrectDocstringInspection", - "shortDescription": { - "text": "Incorrect docstring" - }, - "fullDescription": { - "text": "Reports mismatched parameters in a docstring. For example, 'b' is highlighted, because there is no such a parameter in the 'add' function. 'def add(a, c):\n \"\"\"\n @param a:\n @param b:\n @return:\n \"\"\"\n pass' The inspection does not warn you of missing parameters if none of them is mentioned in a docstring: 'def mult(a, c):\n \"\"\"\n @return:\n \"\"\"\n pass'", - "markdown": "Reports mismatched parameters in a docstring. For example, `b` is highlighted, because there is no\nsuch a parameter in the `add` function.\n\n\n def add(a, c):\n \"\"\"\n @param a:\n @param b:\n @return:\n \"\"\"\n pass\n\nThe inspection does not warn you of missing parameters if none of them is mentioned in a docstring:\n\n\n def mult(a, c):\n \"\"\"\n @return:\n \"\"\"\n pass\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "PyIncorrectDocstring", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PyListCreationInspection", - "shortDescription": { - "text": "Non-optimal list declaration" - }, - "fullDescription": { - "text": "Reports cases when a list declaration can be rewritten with a list literal. This ensures better performance of your application. Example: 'l = [1]\nl.append(2)' When the quick-fix is applied, the code changes to: 'l = [1, 2]'", - "markdown": "Reports cases when a list declaration\ncan be rewritten with a list literal.\n\nThis ensures better performance of your application.\n\n**Example:**\n\n\n l = [1]\n l.append(2)\n\nWhen the quick-fix is applied, the code changes to:\n\n\n l = [1, 2]\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "PyListCreation", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Python", - "index": 0, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "JavaScript", - "version": "241.18034.45", - "rules": [ - { - "id": "ConstantConditionalExpressionJS", - "shortDescription": { - "text": "Constant conditional expression" - }, - "fullDescription": { - "text": "Reports a conditional expression in the format 'true? result1: result2' or 'false? result1: result2. Suggests simplifying the expression.'", - "markdown": "Reports a conditional expression in the format `true? result1: result2` or `false? result1: result2``.\nSuggests simplifying the expression.\n`" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "ConstantConditionalExpressionJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Control flow issues", - "index": 2, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSTestFailedLine", - "shortDescription": { - "text": "Highlight failure line in test code" - }, - "fullDescription": { - "text": "Reports a failed method call or an assertion in a test.", - "markdown": "Reports a failed method call or an assertion in a test." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JSTestFailedLine", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Unit testing", - "index": 8, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSValidateJSDoc", - "shortDescription": { - "text": "Syntax errors and unresolved references in JSDoc" - }, - "fullDescription": { - "text": "Reports a syntax discrepancy in a documentation comment.", - "markdown": "Reports a syntax discrepancy in a documentation comment." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JSValidateJSDoc", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "NonBlockStatementBodyJS", - "shortDescription": { - "text": "Statement body without braces" - }, - "fullDescription": { - "text": "Reports a 'if', 'while', 'for', or 'with' statements whose body is not a block statement. Using code block in statement bodies is usually safer for downstream maintenance.", - "markdown": "Reports a `if`, `while`, `for`, or `with` statements whose body is not a block statement. Using code block in statement bodies is usually safer for downstream maintenance." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "NonBlockStatementBodyJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Code style issues", - "index": 17, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "IfStatementWithTooManyBranchesJS", - "shortDescription": { - "text": "'if' statement with too many branches" - }, - "fullDescription": { - "text": "Reports an 'if' statement with too many branches. Such statements may be confusing, and often indicate inadequate levels of design abstraction. Use the field below to specify the maximum number of branches expected.", - "markdown": "Reports an `if` statement with too many branches. Such statements may be confusing, and often indicate inadequate levels of design abstraction.\n\n\nUse the field below to specify the maximum number of branches expected." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "IfStatementWithTooManyBranchesJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Control flow issues", - "index": 2, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "BreakStatementJS", - "shortDescription": { - "text": "'break' statement" - }, - "fullDescription": { - "text": "Reports a 'break' statements. Ignores 'break' statements that end case blocks.", - "markdown": "Reports a `break` statements. Ignores `break` statements that end case blocks." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "BreakStatementJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Potentially undesirable code constructs", - "index": 19, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "FlowJSConfig", - "shortDescription": { - "text": "Missing .flowconfig" - }, - "fullDescription": { - "text": "Reports a JavaScript file with a '@flow' flag that doesn't have an associated '.flowconfig' file in the project.", - "markdown": "Reports a JavaScript file with a `@flow` flag that doesn't have an associated `.flowconfig` file in the project." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "FlowJSConfig", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Flow type checker", - "index": 20, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSPotentiallyInvalidUsageOfClassThis", - "shortDescription": { - "text": "Potentially invalid reference to 'this' of a class from closure" - }, - "fullDescription": { - "text": "Reports an attempt to reference a member of an ECMAScript class via the 'this.' qualifier in a nested function that is not a lambda. 'this' in a nested function that is not a lambda is the function's own 'this' and doesn't relate to the outer class.", - "markdown": "Reports an attempt to reference a member of an ECMAScript class via the `this.` qualifier in a nested function that is not a lambda. \n`this` in a nested function that is not a lambda is the function's own `this` and doesn't relate to the outer class." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JSPotentiallyInvalidUsageOfClassThis", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Probable bugs", - "index": 22, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "DebuggerStatementJS", - "shortDescription": { - "text": "'debugger' statement" - }, - "fullDescription": { - "text": "Reports a 'debugger' statement used for interaction with the Javascript debuggers. Such statements should not appear in production code.", - "markdown": "Reports a `debugger` statement used for interaction with the Javascript debuggers. Such statements should not appear in production code." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "DebuggerStatementJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Potentially undesirable code constructs", - "index": 19, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSUnusedAssignment", - "shortDescription": { - "text": "Unused assignment" - }, - "fullDescription": { - "text": "Reports a variable whose value is never used after assignment. Suggests removing the unused variable to shorten the code and to avoid redundant allocations. The following cases are reported: A variable is never read after assignment. The value of a variable is always overwritten with another assignment before the variable is read next time. The initializer of a variable is redundant (for one of the above-mentioned reasons).", - "markdown": "Reports a variable whose value is never used after assignment. \nSuggests removing the unused variable to shorten the code and to avoid redundant allocations.\n\nThe following cases are reported:\n\n* A variable is never read after assignment.\n* The value of a variable is always overwritten with another assignment before the variable is read next time.\n* The initializer of a variable is redundant (for one of the above-mentioned reasons)." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "JSUnusedAssignment", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Unused symbols", - "index": 26, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "FlowJSError", - "shortDescription": { - "text": "Flow type checker" - }, - "fullDescription": { - "text": "Reports errors from Flow.", - "markdown": "Reports errors from [Flow](https://flowtype.org/)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "FlowJSError", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Flow type checker", - "index": 20, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ReuseOfLocalVariableJS", - "shortDescription": { - "text": "Reuse of local variable" - }, - "fullDescription": { - "text": "Reports reusing a local variable and overwriting its value with a new value that is not related to the original variable usage. Reusing a local variable in this way may be confusing because the intended semantics of the local variable may vary with each usage. It may also cause bugs, if code changes result in values that were expected to be overwritten while they are actually live. It is good practices to keep variable lifetimes as short as possible, and not reuse local variables for the sake of brevity.", - "markdown": "Reports reusing a local variable and overwriting its value with a new value that is not related to the original variable usage. Reusing a local variable in this way may be confusing because the intended semantics of the local variable may vary with each usage. It may also cause bugs, if code changes result in values that were expected to be overwritten while they are actually live. It is good practices to keep variable lifetimes as short as possible, and not reuse local variables for the sake of brevity." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "ReuseOfLocalVariableJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Data flow", - "index": 27, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ShiftOutOfRangeJS", - "shortDescription": { - "text": "Shift operation by possibly wrong constant" - }, - "fullDescription": { - "text": "Reports a shift operation where the second operand is a constant outside the reasonable range, for example, an integer shift operation outside the range '0..31', shifting by negative or overly large values.", - "markdown": "Reports a shift operation where the second operand is a constant outside the reasonable range, for example, an integer shift operation outside the range `0..31`, shifting by negative or overly large values." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "ShiftOutOfRangeJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Bitwise operation issues", - "index": 29, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSClosureCompilerSyntax", - "shortDescription": { - "text": "Incorrect usage of JSDoc tags" - }, - "fullDescription": { - "text": "Reports warnings implied by Google Closure Compiler annotations including correct use of '@abstract', '@interface', and '@implements' tags.", - "markdown": "Reports warnings implied by *Google Closure Compiler* annotations including correct use of `@abstract`, `@interface`, and `@implements` tags." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JSClosureCompilerSyntax", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "UnnecessaryContinueJS", - "shortDescription": { - "text": "Unnecessary 'continue' statement" - }, - "fullDescription": { - "text": "Reports an unnecessary 'continue' statement at the end of a loop. Suggests removing such statements.", - "markdown": "Reports an unnecessary `continue` statement at the end of a loop. Suggests removing such statements." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "UnnecessaryContinueJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Control flow issues", - "index": 2, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ES6ConvertLetToConst", - "shortDescription": { - "text": "'let' is used instead of 'const'" - }, - "fullDescription": { - "text": "Reports a 'let' declaration that can be made 'const'.", - "markdown": "Reports a `let` declaration that can be made `const`. " - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "ES6ConvertLetToConst", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/ES2015 migration aids", - "index": 30, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSXDomNesting", - "shortDescription": { - "text": "Invalid DOM element nesting" - }, - "fullDescription": { - "text": "Detects HTML elements in JSX files which are not nested properly according to the DOM specification. React reports runtime warnings on incorrectly nested elements.", - "markdown": "Detects HTML elements in JSX files which are not nested properly according to the DOM specification. React reports runtime warnings on incorrectly nested elements." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JSXDomNesting", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/React", - "index": 33, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "TypeScriptValidateTypes", - "shortDescription": { - "text": "Type mismatch" - }, - "fullDescription": { - "text": "Reports a parameter, return value, or assigned expression of incorrect type.", - "markdown": "Reports a parameter, return value, or assigned expression of incorrect type." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "TypeScriptValidateTypes", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/TypeScript", - "index": 34, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "BadExpressionStatementJS", - "shortDescription": { - "text": "Expression statement which is not assignment or call" - }, - "fullDescription": { - "text": "Reports an expression statement that is neither an assignment nor a call. Such statements usually indicate an error.", - "markdown": "Reports an expression statement that is neither an assignment nor a call. Such statements usually indicate an error." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "BadExpressionStatementJS", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Validity issues", - "index": 35, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ConfusingFloatingPointLiteralJS", - "shortDescription": { - "text": "Confusing floating point literal" - }, - "fullDescription": { - "text": "Reports any floating point number that does not have a decimal point, or any numbers before the decimal point, or and numbers after the decimal point. Such literals may be confusing, and violate several coding standards.", - "markdown": "Reports any floating point number that does not have a decimal point, or any numbers before the decimal point, or and numbers after the decimal point. Such literals may be confusing, and violate several coding standards." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "ConfusingFloatingPointLiteralJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Potentially confusing code constructs", - "index": 37, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "BreakStatementWithLabelJS", - "shortDescription": { - "text": "'break' statement with label" - }, - "fullDescription": { - "text": "Reports a labeled 'break' statement.", - "markdown": "Reports a labeled `break` statement." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "BreakStatementWithLabelJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Potentially undesirable code constructs", - "index": 19, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ContinueOrBreakFromFinallyBlockJS", - "shortDescription": { - "text": "'continue' or 'break' inside 'finally' block" - }, - "fullDescription": { - "text": "Reports a 'break' or 'continue' statement inside a 'finally' block. Such statements are very confusing, may hide exceptions, and complicate debugging.", - "markdown": "Reports a `break` or `continue` statement inside a `finally` block. Such statements are very confusing, may hide exceptions, and complicate debugging." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "ContinueOrBreakFromFinallyBlockJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Try statement issues", - "index": 42, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "StatementsPerFunctionJS", - "shortDescription": { - "text": "Overly long function" - }, - "fullDescription": { - "text": "Reports an overly long function. Function length is calculated by counting up the number of non-empty statements in the function. Functions that are too long are error-prone and difficult to test. Use the field below to specify the maximum acceptable number of statements in a function.", - "markdown": "Reports an overly long function. Function length is calculated by counting up the number of non-empty statements in the function. Functions that are too long are error-prone and difficult to test.\n\n\nUse the field below to specify the maximum acceptable number of statements in a function." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "FunctionTooLongJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Function metrics", - "index": 44, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "UnnecessaryLocalVariableJS", - "shortDescription": { - "text": "Redundant local variable" - }, - "fullDescription": { - "text": "Reports an unnecessary local variable that does not make a function more comprehensible: a local variable that is immediately returned a local variable that is immediately assigned to another variable and is not used anymore a local variable that always has the same value as another local variable or parameter. Use the checkbox below to have this inspection ignore variables that are immediately returned or thrown. Some coding styles suggest using such variables for clarity and ease of debugging.", - "markdown": "Reports an unnecessary local variable that does not make a function more comprehensible:\n\n* a local variable that is immediately returned\n* a local variable that is immediately assigned to another variable and is not used anymore\n* a local variable that always has the same value as another local variable or parameter.\n\n\nUse the checkbox below to have this inspection ignore variables that are immediately\nreturned or thrown. Some coding styles suggest using such variables for clarity and\nease of debugging." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "UnnecessaryLocalVariableJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Data flow", - "index": 27, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSMethodCanBeStatic", - "shortDescription": { - "text": "Method can be made 'static'" - }, - "fullDescription": { - "text": "Reports a class method that can be safely made 'static'. A method can be 'static' if it does not reference any of its class' non-static methods and non-static fields and is not overridden in a subclass. Use the first checkbox below to inspect only 'private' methods.", - "markdown": "Reports a class method that can be safely made `static`. A method can be `static` if it does not reference any of its class' non-static methods and non-static fields and is not overridden in a subclass.\n\n\nUse the first checkbox below to inspect only `private` methods." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "JSMethodCanBeStatic", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSDeclarationsAtScopeStart", - "shortDescription": { - "text": "'var' declared not at the beginning of a function" - }, - "fullDescription": { - "text": "Checks that declarations of local variables declared with var are at the top of a function scope. By default, variable declarations are always moved (\"hoisted\") invisibly to the top of their containing scope when the code is executed. Therefore, declaring them at the top of the scope helps represent this behavior in the code.", - "markdown": "Checks that declarations of local variables declared with **var** are at the top of a function scope. \n\nBy default, variable declarations are always moved (\"hoisted\") invisibly to the top of their containing scope when the code is executed. Therefore, declaring them at the top of the scope helps represent this behavior in the code." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "JSDeclarationsAtScopeStart", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Code style issues", - "index": 17, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ContinueStatementWithLabelJS", - "shortDescription": { - "text": "'continue' statement with label" - }, - "fullDescription": { - "text": "Reports a labeled 'continue' statement.", - "markdown": "Reports a labeled `continue` statement." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "ContinueStatementWithLabelJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Potentially undesirable code constructs", - "index": 19, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSObjectNullOrUndefined", - "shortDescription": { - "text": "Object is 'null' or 'undefined'" - }, - "fullDescription": { - "text": "Reports an error caused by invoking a method, accessing a property, or calling a function on an object that is 'undefined' or 'null'.", - "markdown": "Reports an error caused by invoking a method, accessing a property, or calling a function on an object that is `undefined` or `null`." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "JSObjectNullOrUndefined", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Control flow issues", - "index": 2, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "TypeScriptMissingConfigOption", - "shortDescription": { - "text": "Missing tsconfig.json option " - }, - "fullDescription": { - "text": "Reports a usage that requires an explicit option in 'tsconfig.json'. For example, to use JSX in '.tsx' files, 'tsconfig.json' must contain '\"jsx\"' property.", - "markdown": "Reports a usage that requires an explicit option in `tsconfig.json`. For example, to use JSX in `.tsx` files, `tsconfig.json` must contain `\"jsx\"` property." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "TypeScriptMissingConfigOption", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/TypeScript", - "index": 34, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSXUnresolvedComponent", - "shortDescription": { - "text": "Unresolved JSX component" - }, - "fullDescription": { - "text": "Reports an unresolved reference to a JSX component. Suggests adding a missing import statement if the referenced component is defined in the project or its dependencies or creating a new component with this name. The template for a new component can be modified in Editor | File and Code Templates.", - "markdown": "Reports an unresolved reference to a JSX component. Suggests adding a missing import statement if the referenced component is defined in the project or its dependencies or creating a new component with this name.\n\nThe template for a new component can be modified in Editor \\| File and Code Templates." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "JSXUnresolvedComponent", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "UnnecessaryLabelOnBreakStatementJS", - "shortDescription": { - "text": "Unnecessary label on 'break' statement" - }, - "fullDescription": { - "text": "Reports a labeled 'break' statement whose labels may be removed without changing the flow of control.", - "markdown": "Reports a labeled `break` statement whose labels may be removed without changing the flow of control." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "UnnecessaryLabelOnBreakStatementJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Control flow issues", - "index": 2, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ES6ShorthandObjectProperty", - "shortDescription": { - "text": "Property can be replaced with shorthand" - }, - "fullDescription": { - "text": "Reports an object property that can be converted to ES6 shorthand style and provides a quick-fix to do it. Example: 'var obj = {foo:foo}' After applying the quick-fix the code looks as follows: 'var obj = {foo}'", - "markdown": "Reports an object property that can be converted to ES6 shorthand style and provides a quick-fix to do it.\n\nExample:\n\n\n var obj = {foo:foo}\n\nAfter applying the quick-fix the code looks as follows:\n\n\n var obj = {foo}\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "ES6ShorthandObjectProperty", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ContinueStatementJS", - "shortDescription": { - "text": "'continue' statement" - }, - "fullDescription": { - "text": "Reports a 'continue' statement.", - "markdown": "Reports a `continue` statement." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "ContinueStatementJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Potentially undesirable code constructs", - "index": 19, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "AssignmentToForLoopParameterJS", - "shortDescription": { - "text": "Assignment to 'for' loop parameter" - }, - "fullDescription": { - "text": "Reports an assignment to a variable declared as a 'for' loop parameter. Although occasionally intended, this construct can be extremely confusing, and is often a result of an error.", - "markdown": "Reports an assignment to a variable declared as a `for` loop parameter. Although occasionally intended, this construct can be extremely confusing, and is often a result of an error." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "AssignmentToForLoopParameterJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Assignment issues", - "index": 48, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSPotentiallyInvalidConstructorUsage", - "shortDescription": { - "text": "Potentially invalid constructor usage" - }, - "fullDescription": { - "text": "Reports a usage of a potentially invalid constructor function, for example: a function that is not a constructor after 'new', using a constructor's prototype or calling a constructor without 'new'. A constructor function is assumed to have an upper case name (optional) or have an explicit JSDoc '@constructor' tag.", - "markdown": "Reports a usage of a potentially invalid constructor function, for example: a function that is not a constructor after `new`, using a constructor's prototype or calling a constructor without `new`. A constructor function is assumed to have an upper case name (optional) or have an explicit JSDoc `@constructor` tag." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JSPotentiallyInvalidConstructorUsage", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Probable bugs", - "index": 22, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PointlessArithmeticExpressionJS", - "shortDescription": { - "text": "Pointless arithmetic expression" - }, - "fullDescription": { - "text": "Reports an arithmetic expression that include adding or subtracting zero, multiplying by zero or one, division by one, and shift by zero. Such expressions may result from not fully completed automated refactoring.", - "markdown": "Reports an arithmetic expression that include adding or subtracting zero, multiplying by zero or one, division by one, and shift by zero. Such expressions may result from not fully completed automated refactoring." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "PointlessArithmeticExpressionJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Potentially confusing code constructs", - "index": 37, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "NodeCoreCodingAssistance", - "shortDescription": { - "text": "Unresolved Node.js APIs" - }, - "fullDescription": { - "text": "Suggests configuring coding assistance for Node.js, for example, 'require' and/or core modules ('path', 'http', 'fs', etc.). See https://nodejs.org/api/ for the complete list.", - "markdown": "Suggests configuring coding assistance for Node.js, for example, `require` and/or core modules ('path', 'http', 'fs', etc.).\n\n\nSee for the complete list." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "NodeCoreCodingAssistance", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Node.js", - "index": 53, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSUndeclaredVariable", - "shortDescription": { - "text": "Implicitly declared global JavaScript variable" - }, - "fullDescription": { - "text": "Reports an implicit declaration of a global variable. Example: 'var aaa = 1; // good\n bbb = 2; // bad, if bbb is not declared with 'var' somewhere'", - "markdown": "Reports an implicit declaration of a global variable.\n\nExample:\n\n\n var aaa = 1; // good\n bbb = 2; // bad, if bbb is not declared with 'var' somewhere\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "JSUndeclaredVariable", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "DivideByZeroJS", - "shortDescription": { - "text": "Division by zero" - }, - "fullDescription": { - "text": "Reports division by zero or a remainder by zero.", - "markdown": "Reports division by zero or a remainder by zero." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "DivideByZeroJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Probable bugs", - "index": 22, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSPrimitiveTypeWrapperUsage", - "shortDescription": { - "text": "Primitive type object wrapper used" - }, - "fullDescription": { - "text": "Reports an improper usage of a wrapper for primitive types or a property of a primitive type being modified, as in the latter case the assigned value will be lost.", - "markdown": "Reports an improper usage of a wrapper for primitive types or a property of a primitive type being modified, as in the latter case the assigned value will be lost." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JSPrimitiveTypeWrapperUsage", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "TypeScriptSmartCast", - "shortDescription": { - "text": "Narrowed type" - }, - "fullDescription": { - "text": "Reports a usage of a variable where the variable type is narrowed by a type guard. Note that severity level doesn't affect this inspection.", - "markdown": "Reports a usage of a variable where the variable type is narrowed by a type guard. Note that severity level doesn't affect this inspection." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "TypeScriptSmartCast", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/TypeScript", - "index": 34, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ES6ConvertIndexedForToForOf", - "shortDescription": { - "text": "Indexed 'for' is used instead of 'for..of'" - }, - "fullDescription": { - "text": "Reports an indexed 'for' loop used on an array. Suggests replacing it with a 'for..of' loop. 'for..of' loops are introduced in ECMAScript 6 and iterate over 'iterable' objects.", - "markdown": "Reports an indexed [for](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) loop used on an array. Suggests replacing it with a [for..of](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) loop. \n`for..of` loops are introduced in ECMAScript 6 and iterate over `iterable` objects." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "ES6ConvertIndexedForToForOf", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/ES2015 migration aids", - "index": 30, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSLastCommaInArrayLiteral", - "shortDescription": { - "text": "Unneeded last comma in array literal" - }, - "fullDescription": { - "text": "Reports a usage of a trailing comma in an array literal. The warning is reported only when the JavaScript language version is set to ECMAScript 5.1. Although trailing commas in arrays are allowed by the specification, some browsers may throw an error when a trailing comma is used. You can configure formatting options for trailing commas in Code Style | JavaScript or TypeScript | Punctuation.", - "markdown": "Reports a usage of a trailing comma in an array literal.\n\nThe warning is reported only when the JavaScript language version is set to ECMAScript 5.1.\n\nAlthough trailing commas in arrays are allowed by the specification, some browsers may throw an error when a trailing comma is used.\n\nYou can configure formatting options for trailing commas in **Code Style** \\| **JavaScript** or **TypeScript** \\| **Punctuation**." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JSLastCommaInArrayLiteral", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ConditionalExpressionJS", - "shortDescription": { - "text": "Conditional expression" - }, - "fullDescription": { - "text": "Reports a ternary conditional expression. Some coding standards prohibit such expressions in favor of explicit 'if' statements.", - "markdown": "Reports a ternary conditional expression. Some coding standards prohibit such expressions in favor of explicit `if` statements." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "ConditionalExpressionJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Potentially undesirable code constructs", - "index": 19, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ES6ConvertVarToLetConst", - "shortDescription": { - "text": "'var' is used instead of 'let' or 'const'" - }, - "fullDescription": { - "text": "Reports a 'var' declaration that is used instead of 'let' or 'const'. Both 'let' and 'const' are block-scoped and behave more strictly. Suggests replacing all 'var' declarations with 'let' or 'const' declarations, depending on the semantics of a particular value. The declarations may be moved to the top of the function or placed before the first usage of the variable to avoid Reference errors. Select the 'Conservatively convert var with Fix all action' option to prevent any changes in these complex cases when using the 'Fix all' action.", - "markdown": "Reports a `var` declaration that is used instead of `let` or `const`. \nBoth `let` and `const` are block-scoped and behave more strictly. \n\nSuggests replacing all `var` declarations with `let` or `const` declarations, depending on the semantics of a particular value. The declarations may be moved to the top of the function or placed before the first usage of the variable to avoid Reference errors. \nSelect the 'Conservatively convert var with Fix all action' option to prevent any changes in these complex cases when using the 'Fix all' action." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "ES6ConvertVarToLetConst", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/ES2015 migration aids", - "index": 30, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSReferencingMutableVariableFromClosure", - "shortDescription": { - "text": "Referencing mutable variable from closure" - }, - "fullDescription": { - "text": "Reports access to outer mutable variables from functions. Example: 'for (var i = 1; i <= 3; i++) {\n setTimeout(function() {\n console.log(i); // bad\n }, 0);\n }'", - "markdown": "Reports access to outer mutable variables from functions.\n\nExample:\n\n\n for (var i = 1; i <= 3; i++) {\n setTimeout(function() {\n console.log(i); // bad\n }, 0);\n }\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JSReferencingMutableVariableFromClosure", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PointlessBooleanExpressionJS", - "shortDescription": { - "text": "Pointless statement or boolean expression" - }, - "fullDescription": { - "text": "Reports a pointless or pointlessly complicated boolean expression or statement. Example: 'let a = !(false && x);\n let b = false || x;' After the quick fix is applied the result looks like: 'let a = true;\n let b = x;'", - "markdown": "Reports a pointless or pointlessly complicated boolean expression or statement.\n\nExample:\n\n\n let a = !(false && x);\n let b = false || x;\n\nAfter the quick fix is applied the result looks like:\n\n\n let a = true;\n let b = x;\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "PointlessBooleanExpressionJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Control flow issues", - "index": 2, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "DynamicallyGeneratedCodeJS", - "shortDescription": { - "text": "Execution of dynamically generated code" - }, - "fullDescription": { - "text": "Reports a call of the 'eval()', 'setTimeout()', or 'setInterval()' function or an allocation of a 'Function' object. These functions are used to execute arbitrary strings of JavaScript text, which often dynamically generated. This can be very confusing, and may be a security risk. Ignores the cases when a callback function is provided to these methods statically, without code generation.", - "markdown": "Reports a call of the `eval()`, `setTimeout()`, or `setInterval()` function or an allocation of a `Function` object. These functions are used to execute arbitrary strings of JavaScript text, which often dynamically generated. This can be very confusing, and may be a security risk. \n\nIgnores the cases when a callback function is provided to these methods statically, without code generation." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "DynamicallyGeneratedCodeJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Potentially confusing code constructs", - "index": 37, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "NegatedConditionalExpressionJS", - "shortDescription": { - "text": "Negated conditional expression" - }, - "fullDescription": { - "text": "Reports a conditional expression whose condition is negated. Suggests flipping the order of branches in the conditional expression to increase the clarity of the statement. Example: '!condition ? 2 : 1'", - "markdown": "Reports a conditional expression whose condition is negated. Suggests flipping the order of branches in the conditional expression to increase the clarity of the statement. Example: `!condition ? 2 : 1`" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "NegatedConditionalExpressionJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Potentially confusing code constructs", - "index": 37, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSUrlImportUsage", - "shortDescription": { - "text": "URL import is used" - }, - "fullDescription": { - "text": "Checks used URL imports in the JavaScript language. Suggests downloading the module for the specified remote URL. Such association enables the IDE to provide proper code completion and navigation. URLs in import specifiers are supported only for ECMAScript modules in the JavaScript language.", - "markdown": "Checks used URL imports in the JavaScript language. Suggests downloading the module for the specified remote URL. Such association enables the IDE to provide proper code completion and navigation. \n\nURLs in import specifiers are supported only for ECMAScript modules in the JavaScript language." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "JSUrlImportUsage", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Imports and dependencies", - "index": 57, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "UnnecessaryLabelOnContinueStatementJS", - "shortDescription": { - "text": "Unnecessary label on 'continue' statement" - }, - "fullDescription": { - "text": "Reports a labeled 'continue' statement whose labels may be removed without changing the flow of control.", - "markdown": "Reports a labeled `continue` statement whose labels may be removed without changing the flow of control." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "UnnecessaryLabelOnContinueStatementJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Control flow issues", - "index": 2, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ChainedEqualityJS", - "shortDescription": { - "text": "Chained equality" - }, - "fullDescription": { - "text": "Reports a chained equality comparison (i.e. 'a==b==c'). Such comparisons are confusing.", - "markdown": "Reports a chained equality comparison (i.e. `a==b==c`). Such comparisons are confusing." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "ChainedEqualityComparisonsJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Code style issues", - "index": 17, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SillyAssignmentJS", - "shortDescription": { - "text": "Variable is assigned to itself" - }, - "fullDescription": { - "text": "Reports an assignment in the form 'x = x'.", - "markdown": "Reports an assignment in the form `x = x`." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SillyAssignmentJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Assignment issues", - "index": 48, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSPotentiallyInvalidTargetOfIndexedPropertyAccess", - "shortDescription": { - "text": "Possibly incorrect target of indexed property access" - }, - "fullDescription": { - "text": "Reports a potentially invalid indexed property access, for example, 'Array[1]'.", - "markdown": "Reports a potentially invalid indexed property access, for example, `Array[1]`." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JSPotentiallyInvalidTargetOfIndexedPropertyAccess", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Probable bugs", - "index": 22, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSAccessibilityCheck", - "shortDescription": { - "text": "Inaccessible @private and @protected members referenced" - }, - "fullDescription": { - "text": "Reports a reference to a JavaScript member that is marked with a '@private' or '@protected' tag but does not comply with visibility rules that these tags imply.", - "markdown": "Reports a reference to a JavaScript member that is marked with a `@private` or `@protected` tag but does not comply with visibility rules that these tags imply." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "JSAccessibilityCheck", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ES6ConvertRequireIntoImport", - "shortDescription": { - "text": "'require()' is used instead of 'import'" - }, - "fullDescription": { - "text": "Reports a 'require()' statement. Suggests converting it to a 'require()' call with an 'import' statement. Enable 'Convert require() inside inner scopes with Fix all action' to convert all 'require()' calls inside the nested functions and statements when using the 'Fix all' action. Please note that converting 'require()' statements inside inner scopes to 'import' statements may cause changes in the semantics of the code. Import statements are static module dependencies and are hoisted, which means that they are moved to the top of the current module. 'require()' calls load modules dynamically. They can be executed conditionally, and their scope is defined by the expression in which they are used. Clear the 'Convert require() inside inner scopes with Fix all action' checkbox to prevent any changes in these complex cases when using the 'Fix all' action.", - "markdown": "Reports a `require()` statement. Suggests converting it to a `require()` call with an `import` statement. \n\nEnable 'Convert require() inside inner scopes with Fix all action' to convert all `require()` calls inside the nested functions and statements when using the 'Fix all' action. \n\nPlease note that converting `require()` statements inside inner scopes to `import` statements may cause changes in the semantics of the code. Import statements are static module dependencies and are hoisted, which means that they are moved to the top of the current module. `require()` calls load modules dynamically. They can be executed conditionally, and their scope is defined by the expression in which they are used. \nClear the 'Convert require() inside inner scopes with Fix all action' checkbox to prevent any changes in these complex cases when using the 'Fix all' action." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "ES6ConvertRequireIntoImport", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/ES2015 migration aids", - "index": 30, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "FunctionWithMultipleLoopsJS", - "shortDescription": { - "text": "Function with multiple loops" - }, - "fullDescription": { - "text": "Reports a function with multiple loop statements.", - "markdown": "Reports a function with multiple loop statements." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "FunctionWithMultipleLoopsJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Function metrics", - "index": 44, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "LabeledStatementJS", - "shortDescription": { - "text": "Labeled statement" - }, - "fullDescription": { - "text": "Reports a labeled statement.", - "markdown": "Reports a labeled statement." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "LabeledStatementJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Potentially undesirable code constructs", - "index": 19, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "UnusedCatchParameterJS", - "shortDescription": { - "text": "Unused 'catch' parameter" - }, - "fullDescription": { - "text": "Reports a 'catch' parameter that is not used in the corresponding block. The 'catch' parameters named 'ignore' or 'ignored' are ignored. Use the checkbox below to disable this inspection for 'catch' blocks with comments.", - "markdown": "Reports a `catch` parameter that is not used in the corresponding block. The `catch` parameters named `ignore` or `ignored` are ignored.\n\n\nUse the checkbox below to disable this inspection for `catch`\nblocks with comments." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "UnusedCatchParameterJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Try statement issues", - "index": 42, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "NpmUsedModulesInstalled", - "shortDescription": { - "text": "Missing module dependency" - }, - "fullDescription": { - "text": "Reports a module from a 'require()' call or an 'import' statement that is not installed or is not listed in package.json dependencies. Suggests installing the module and/or including it into package.json. For 'require()' calls, works only in the files from the scope of Node.js Core JavaScript library.", - "markdown": "Reports a module from a `require()` call or an `import` statement that is not installed or is not listed in package.json dependencies.\n\nSuggests installing the module and/or including it into package.json.\n\nFor `require()` calls, works only in the files from the scope of *Node.js Core* JavaScript library." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "NpmUsedModulesInstalled", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Imports and dependencies", - "index": 57, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "WithStatementJS", - "shortDescription": { - "text": "'with' statement" - }, - "fullDescription": { - "text": "Reports a 'with' statements. Such statements result in potentially confusing implicit bindings, and may behave strangely in setting new variables.", - "markdown": "Reports a `with` statements. Such statements result in potentially confusing implicit bindings, and may behave strangely in setting new variables." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "WithStatementJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Potentially undesirable code constructs", - "index": 19, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "TypeScriptCheckImport", - "shortDescription": { - "text": "Unresolved imported name" - }, - "fullDescription": { - "text": "Reports an unresolved name or binding in an 'import' declaration in TypeScript code.", - "markdown": "Reports an unresolved name or binding in an `import` declaration in TypeScript code." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "TypeScriptCheckImport", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/TypeScript", - "index": 34, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSConstantReassignment", - "shortDescription": { - "text": "Attempt to assign to const or readonly variable" - }, - "fullDescription": { - "text": "Reports reassigning a value to a constant or a readonly variable.", - "markdown": "Reports reassigning a value to a constant or a readonly variable." - }, - "defaultConfiguration": { - "enabled": true, - "level": "error", - "parameters": { - "suppressToolId": "JSConstantReassignment", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Validity issues", - "index": 35, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "MagicNumberJS", - "shortDescription": { - "text": "Magic number" - }, - "fullDescription": { - "text": "Reports a \"magic number\" that is a numeric literal used without being named by a constant declaration. Magic numbers can result in code whose intention is unclear, and may result in errors if a magic number is changed in one code location but remains unchanged in another. The numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100, 1000, 0.0 and 1.0 are ignored.", - "markdown": "Reports a \"magic number\" that is a numeric literal used without being named by a constant declaration. Magic numbers can result in code whose intention is unclear, and may result in errors if a magic number is changed in one code location but remains unchanged in another. The numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100, 1000, 0.0 and 1.0 are ignored." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "MagicNumberJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Potentially confusing code constructs", - "index": 37, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "FunctionNamingConventionJS", - "shortDescription": { - "text": "Function naming convention" - }, - "fullDescription": { - "text": "Reports a function whose name is too short, too long, or does not follow the specified regular expression pattern. Use the fields provided below to specify minimum length, maximum length, and a regular expression for function names. Use the standard 'java.util.regex' format for regular expressions.", - "markdown": "Reports a function whose name is too short, too long, or does not follow the specified regular expression pattern.\n\n\nUse the fields provided below to specify minimum length, maximum length, and a regular expression\nfor function names. Use the standard `java.util.regex` format for regular expressions." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "FunctionNamingConventionJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Naming conventions", - "index": 62, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSXSyntaxUsed", - "shortDescription": { - "text": "JSX syntax used" - }, - "fullDescription": { - "text": "Reports a usage of a JSX tag in JavaScript code.", - "markdown": "Reports a usage of a JSX tag in JavaScript code." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "JSXSyntaxUsed", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSJoinVariableDeclarationAndAssignment", - "shortDescription": { - "text": "Variable declaration can be merged with the first assignment to the variable" - }, - "fullDescription": { - "text": "Reports a variable that is declared without an initializer and is used much further in the code or in a single nested scope. Suggests moving the variable closer to its usages and joining it with the initializer expression.", - "markdown": "Reports a variable that is declared without an initializer and is used much further in the code or in a single nested scope. Suggests moving the variable closer to its usages and joining it with the initializer expression." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "JSJoinVariableDeclarationAndAssignment", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSRedundantSwitchStatement", - "shortDescription": { - "text": "'switch' statement is redundant and can be replaced" - }, - "fullDescription": { - "text": "Reports a 'switch' statement with an empty body, or with only one 'case' branch, or with a 'default' branch only.", - "markdown": "Reports a `switch` statement with an empty body, or with only one `case` branch, or with a `default` branch only." - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "JSRedundantSwitchStatement", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Switch statement issues", - "index": 63, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "TypeScriptLibrary", - "shortDescription": { - "text": "Missing global library" - }, - "fullDescription": { - "text": "Reports a TypeScript library file that is required for a symbol but is not listed under the 'lib' compiler option in 'tsconfig.json'.", - "markdown": "Reports a TypeScript library file that is required for a symbol but is not listed under the `lib` compiler option in `tsconfig.json`." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "TypeScriptLibrary", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/TypeScript", - "index": 34, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "TypeScriptMissingAugmentationImport", - "shortDescription": { - "text": "Missing augmentation import" - }, - "fullDescription": { - "text": "Reports a usage from augmentation module without an explicit import.", - "markdown": "Reports a usage from [augmentation module](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation) without an explicit import." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "TypeScriptMissingAugmentationImport", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/TypeScript", - "index": 34, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSUnusedGlobalSymbols", - "shortDescription": { - "text": "Unused global symbol" - }, - "fullDescription": { - "text": "Reports an unused globally accessible public function, variable, class, or property.", - "markdown": "Reports an unused globally accessible public function, variable, class, or property." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "JSUnusedGlobalSymbols", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Unused symbols", - "index": 26, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ES6ConvertModuleExportToExport", - "shortDescription": { - "text": "'module.exports' is used instead of 'export'" - }, - "fullDescription": { - "text": "Reports a 'module.export' statement. Suggests replacing it with an 'export' or 'export default' statement. Please note that the quick-fix for converting 'module.export' into 'export' is not available for 'module.export' inside functions or statements because 'export' statements can only be at the top level of a module.", - "markdown": "Reports a `module.export` statement. Suggests replacing it with an `export` or `export default` statement. \n\nPlease note that the quick-fix for converting `module.export` into `export` is not available for `module.export` inside functions or statements because `export` statements can only be at the top level of a module." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "ES6ConvertModuleExportToExport", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/ES2015 migration aids", - "index": 30, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "DocumentWriteJS", - "shortDescription": { - "text": "Call to 'document.write()'" - }, - "fullDescription": { - "text": "Reports a method call to 'document.write()' or 'document.writeln()'. Most usages of such calls are performed better with explicit DOM calls, such as 'getElementByID()' and 'createElement()'. Additionally, the 'write()' and 'writeln()' calls will not work with XML DOMs, including DOMs for XHTML if viewed as XML. This can result in difficulty to point out bugs.", - "markdown": "Reports a method call to `document.write()` or `document.writeln()`. Most usages of such calls are performed better with explicit DOM calls, such as `getElementByID()` and `createElement()`. Additionally, the `write()` and `writeln()` calls will not work with XML DOMs, including DOMs for XHTML if viewed as XML. This can result in difficulty to point out bugs." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "DocumentWriteJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/DOM issues", - "index": 64, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "AnonymousFunctionJS", - "shortDescription": { - "text": "Anonymous function" - }, - "fullDescription": { - "text": "Reports an anonymous function. An explicit name of a function expression may be helpful for debugging. Ignores function expressions without names if they have a 'name' property specified in the ECMAScript 6 standard. For example, 'var bar = function() {};' is not reported.", - "markdown": "Reports an anonymous function. An explicit name of a function expression may be helpful for debugging. Ignores function expressions without names if they have a `name` property specified in the ECMAScript 6 standard. For example, `var bar = function() {};` is not reported." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "AnonymousFunctionJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Potentially undesirable code constructs", - "index": 19, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "BlockStatementJS", - "shortDescription": { - "text": "Unnecessary block statement" - }, - "fullDescription": { - "text": "Reports a block statement that is not used as the body of 'if', 'for', 'while', 'do', 'with', or 'try' statements, or as the body of a function declaration. Starting from ECMAScript 6, JavaScript blocks introduce new scopes for 'let' and 'const' variables, but still free-standing block statements may be confusing and result in subtle bugs when used with 'var' variables.", - "markdown": "Reports a block statement that is not used as the body of `if`, `for`, `while`, `do`, `with`, or `try` statements, or as the body of a function declaration. Starting from ECMAScript 6, JavaScript blocks introduce new scopes for `let` and `const` variables, but still free-standing block statements may be confusing and result in subtle bugs when used with `var` variables." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "BlockStatementJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Potentially confusing code constructs", - "index": 37, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ObjectAllocationIgnoredJS", - "shortDescription": { - "text": "Result of object allocation ignored" - }, - "fullDescription": { - "text": "Reports object allocation where the result of the allocated object is ignored, for example, 'new Error();' as a statement, without any assignment. Such allocation expressions may indicate an odd object initialization strategy.", - "markdown": "Reports object allocation where the result of the allocated object is ignored, for example, `new Error();` as a statement, without any assignment. Such allocation expressions may indicate an odd object initialization strategy." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "ObjectAllocationIgnored", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Probable bugs", - "index": 22, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "InfiniteRecursionJS", - "shortDescription": { - "text": "Infinite recursion" - }, - "fullDescription": { - "text": "Reports a function which must either recurse infinitely or throw an exception. Such functions may not return normally.", - "markdown": "Reports a function which must either recurse infinitely or throw an exception. Such functions may not return normally." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "InfiniteRecursionJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Probable bugs", - "index": 22, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "NestedConditionalExpressionJS", - "shortDescription": { - "text": "Nested conditional expression" - }, - "fullDescription": { - "text": "Reports a ternary conditional expression within another ternary condition. Such nested conditionals may be extremely confusing, and best replaced by more explicit conditional logic.", - "markdown": "Reports a ternary conditional expression within another ternary condition. Such nested conditionals may be extremely confusing, and best replaced by more explicit conditional logic." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "NestedConditionalExpressionJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Potentially confusing code constructs", - "index": 37, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSTypeOfValues", - "shortDescription": { - "text": "'typeof' comparison with non-standard value" - }, - "fullDescription": { - "text": "Reports a comparison of a 'typeof' expression with a literal string which is not one of the standard types: 'undefined', 'object', 'boolean', 'number', 'string', 'function', or 'symbol'. Such comparisons always return 'false'.", - "markdown": "Reports a comparison of a `typeof` expression with a literal string which is not one of the standard types: `undefined`, `object`, `boolean`, `number`, `string`, `function`, or `symbol`. Such comparisons always return `false`." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JSTypeOfValues", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Probable bugs", - "index": 22, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "IncompatibleMaskJS", - "shortDescription": { - "text": "Incompatible bitwise mask operation" - }, - "fullDescription": { - "text": "Reports a bitwise mask expression which for sure evaluates to 'true' or 'false'. Expressions are of the form '(var & constant1) == constant2' or '(var | constant1) == constant2', where 'constant1' and 'constant2' are incompatible bitmask constants. Example: '// Incompatible mask: as the last byte in mask is zero,\n// something like 0x1200 would be possible, but not 0x1234\nif ((mask & 0xFF00) == 0x1234) {...}'", - "markdown": "Reports a bitwise mask expression which for sure evaluates to `true` or `false`. Expressions are of the form `(var & constant1) == constant2` or `(var | constant1) == constant2`, where `constant1` and `constant2` are incompatible bitmask constants.\n\nExample:\n\n\n // Incompatible mask: as the last byte in mask is zero,\n // something like 0x1200 would be possible, but not 0x1234\n if ((mask & 0xFF00) == 0x1234) {...}\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "IncompatibleBitwiseMaskOperation", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Bitwise operation issues", - "index": 29, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ES6PossiblyAsyncFunction", - "shortDescription": { - "text": "'await' in non-async function" - }, - "fullDescription": { - "text": "Reports a usage of 'await' in a function that was possibly intended to be async but is actually missing the 'async' modifier. Although 'await' can be used as an identifier, it is likely that it was intended to be used as an operator, so the containing function should be made 'async'.", - "markdown": "Reports a usage of `await` in a function that was possibly intended to be async but is actually missing the `async` modifier. Although `await` can be used as an identifier, it is likely that it was intended to be used as an operator, so the containing function should be made `async`." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "ES6PossiblyAsyncFunction", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Async code and promises", - "index": 65, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "TextLabelInSwitchStatementJS", - "shortDescription": { - "text": "Text label in 'switch' statement" - }, - "fullDescription": { - "text": "Reports a labeled statement inside a 'switch' statement, which often results from a typo. Example: 'switch(x)\n {\n case 1:\n case2: //typo!\n case 3:\n break;\n }'", - "markdown": "Reports a labeled statement inside a `switch` statement, which often results from a typo.\n\nExample:\n\n\n switch(x)\n {\n case 1:\n case2: //typo!\n case 3:\n break;\n }\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "TextLabelInSwitchStatementJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Switch statement issues", - "index": 63, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "EmptyCatchBlockJS", - "shortDescription": { - "text": "Empty 'catch' block" - }, - "fullDescription": { - "text": "Reports an empty 'catch' block. This indicates that errors are simply ignored instead of handling them. Any comment in a 'catch' block mutes the inspection.", - "markdown": "Reports an empty `catch` block. This indicates that errors are simply ignored instead of handling them. \n\nAny comment in a `catch` block mutes the inspection." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "EmptyCatchBlockJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Try statement issues", - "index": 42, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSHint", - "shortDescription": { - "text": "JSHint" - }, - "fullDescription": { - "text": "Reports a problem detected by the JSHint linter.", - "markdown": "Reports a problem detected by the [JSHint](https://jshint.com/) linter." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "JSHint", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Code quality tools", - "index": 66, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "FlowJSFlagCommentPlacement", - "shortDescription": { - "text": "Misplaced @flow flag" - }, - "fullDescription": { - "text": "Reports a '@flow' flag comment that is not located at the top of a file.", - "markdown": "Reports a `@flow` flag comment that is not located at the top of a file." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "FlowJSFlagCommentPlacement", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Flow type checker", - "index": 20, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "Eslint", - "shortDescription": { - "text": "ESLint" - }, - "fullDescription": { - "text": "Reports a discrepancy detected by the ESLint linter. The highlighting is based on the rule severity specified in the ESLint configuration file for each individual rule. Clear the 'Use rule severity from the configuration file' checkbox to use the severity configured in this inspection for all ESLint rules.", - "markdown": "Reports a discrepancy detected by the [ESLint](https://eslint.org) linter. \n\nThe highlighting is based on the rule severity specified in the [ESLint configuration file](https://eslint.org/docs/user-guide/configuring) for each individual rule. \n\nClear the 'Use rule severity from the configuration file' checkbox to use the severity configured in this inspection for all ESLint rules." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "Eslint", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Code quality tools", - "index": 66, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSDuplicatedDeclaration", - "shortDescription": { - "text": "Duplicate declaration" - }, - "fullDescription": { - "text": "Reports multiple declarations in a scope.", - "markdown": "Reports multiple declarations in a scope." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JSDuplicatedDeclaration", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSEqualityComparisonWithCoercion.TS", - "shortDescription": { - "text": "Equality operator may cause type coercion" - }, - "fullDescription": { - "text": "Reports a usage of equality operators may cause unexpected type coercions. Suggests replacing '==' or '!=' equality operators with type-safe '===' or '!==' operators. Depending on the option selected, one of the following cases will be reported: All usages of '==' and '!=' operators. All usages except comparison with null. Some code styles allow using 'x == null' as a replacement for 'x === null || x === undefined'. Only suspicious expressions, such as: '==' or '!=' comparisons with '0', '''', 'null', 'true', 'false', or 'undefined'.", - "markdown": "Reports a usage of equality operators may cause unexpected type coercions. Suggests replacing `==` or `!=` equality operators with type-safe `===` or `!==` operators.\n\nDepending on the option selected, one of the following cases will be reported:\n\n* All usages of `==` and `!=` operators.\n* All usages except comparison with null. Some code styles allow using `x == null` as a replacement for `x === null || x === undefined`.\n* Only suspicious expressions, such as: `==` or `!=` comparisons with `0`, `''`, `null`, `true`, `false`, or `undefined`." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "EqualityComparisonWithCoercionJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/TypeScript", - "index": 34, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSOctalInteger", - "shortDescription": { - "text": "Octal integer" - }, - "fullDescription": { - "text": "Reports a deprecated octal integer literal prefixed with '0' instead of '0o'. Such literals are not allowed in modern ECMAScript code, and using them in the strict mode is an error. To force this inspection for ES5 and ES3 language levels, select the 'Warn about obsolete octal literals in ES5- code' checkbox below.", - "markdown": "Reports a deprecated octal integer literal prefixed with `0` instead of `0o`. \nSuch literals are not allowed in modern ECMAScript code, and using them in the strict mode is an error. \nTo force this inspection for ES5 and ES3 language levels, select the 'Warn about obsolete octal literals in ES5- code' checkbox below." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "JSOctalInteger", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Validity issues", - "index": 35, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ExceptionCaughtLocallyJS", - "shortDescription": { - "text": "Exception used for local control-flow" - }, - "fullDescription": { - "text": "Reports a 'throw' statement whose exceptions are always caught by the containing 'try' statement. Using 'throw' statements as a 'goto' to change the local flow of control is confusing.", - "markdown": "Reports a `throw` statement whose exceptions are always caught by the containing `try` statement. Using `throw` statements as a `goto` to change the local flow of control is confusing." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "ExceptionCaughtLocallyJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Try statement issues", - "index": 42, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ThrowFromFinallyBlockJS", - "shortDescription": { - "text": "'throw' inside 'finally' block" - }, - "fullDescription": { - "text": "Reports s 'throw' statement inside a 'finally' block. Such 'throw' statements may mask exceptions thrown, and complicate debugging.", - "markdown": "Reports s `throw` statement inside a `finally` block. Such `throw` statements may mask exceptions thrown, and complicate debugging." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "ThrowInsideFinallyBlockJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Try statement issues", - "index": 42, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "TypeScriptValidateGenericTypes", - "shortDescription": { - "text": "Incorrect generic type argument" - }, - "fullDescription": { - "text": "Reports an invalid type argument in a function, interface, or class declaration.", - "markdown": "Reports an invalid type argument in a function, interface, or class declaration." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "TypeScriptValidateGenericTypes", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/TypeScript", - "index": 34, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CyclomaticComplexityJS", - "shortDescription": { - "text": "Overly complex function" - }, - "fullDescription": { - "text": "Reports a function with too many branching points in a function (too high cyclomatic complexity). Such functions may be confusing and hard to test. Use the field provided below to specify the maximum acceptable cyclomatic complexity for a function.", - "markdown": "Reports a function with too many branching points in a function (too high cyclomatic complexity). Such functions may be confusing and hard to test.\n\n\nUse the field provided below to specify the maximum acceptable cyclomatic complexity for a function." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "OverlyComplexFunctionJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Function metrics", - "index": 44, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSMismatchedCollectionQueryUpdate", - "shortDescription": { - "text": "Mismatched query and update of collection" - }, - "fullDescription": { - "text": "Reports a collection of fields or variables whose contents are either queried and not updated or updated and not queried. Such mismatched queries and updates are pointless and may indicate either dead code or a typographical error. Query methods are automatically detected, based on whether they return something, or a callback is passed to them. Use the table below to specify which methods are update methods.", - "markdown": "Reports a collection of fields or variables whose contents are either queried and not updated or updated and not queried. Such mismatched queries and updates are pointless and may indicate either dead code or a typographical error.\n\n\nQuery methods are automatically detected, based on whether they return something, or a callback is passed to them.\nUse the table below to specify which methods are update methods." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JSMismatchedCollectionQueryUpdate", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PackageJsonMismatchedDependency", - "shortDescription": { - "text": "Mismatched dependencies in package.json" - }, - "fullDescription": { - "text": "Reports a dependency from package.json that is not installed or doesn't match the specified version range.", - "markdown": "Reports a dependency from package.json that is not installed or doesn't match the specified [version range](https://docs.npmjs.com/about-semantic-versioning)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "PackageJsonMismatchedDependency", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Imports and dependencies", - "index": 57, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSPotentiallyInvalidUsageOfThis", - "shortDescription": { - "text": "Potentially invalid reference to 'this' from closure" - }, - "fullDescription": { - "text": "Reports a 'this' in closure that is used for referencing properties of outer context. Example: 'function Outer() {\n this.outerProp = 1;\n function inner() {\n // bad, because 'outerProp' of Outer\n // won't be updated here\n // on calling 'new Outer()' as may be expected\n this.outerProp = 2;\n }\n inner();\n}'", - "markdown": "Reports a `this` in closure that is used for referencing properties of outer context.\n\nExample:\n\n\n function Outer() {\n this.outerProp = 1;\n function inner() {\n // bad, because 'outerProp' of Outer\n // won't be updated here\n // on calling 'new Outer()' as may be expected\n this.outerProp = 2;\n }\n inner();\n }\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JSPotentiallyInvalidUsageOfThis", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Probable bugs", - "index": 22, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSMissingSwitchDefault", - "shortDescription": { - "text": "'switch' statement has no 'default' branch" - }, - "fullDescription": { - "text": "Reports a 'switch' statement without a 'default' clause when some possible values are not enumerated.", - "markdown": "Reports a `switch` statement without a `default` clause when some possible values are not enumerated." - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "JSMissingSwitchDefault", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Switch statement issues", - "index": 63, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSXNamespaceValidation", - "shortDescription": { - "text": "Missing JSX namespace" - }, - "fullDescription": { - "text": "Reports a usage of a JSX construction without importing namespace. Having the namespace in the file scope ensures proper code compilation.", - "markdown": "Reports a usage of a JSX construction without importing namespace. Having the namespace in the file scope ensures proper code compilation." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "JSXNamespaceValidation", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Imports and dependencies", - "index": 57, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSUnresolvedLibraryURL", - "shortDescription": { - "text": "Missed locally stored library for HTTP link" - }, - "fullDescription": { - "text": "Reports a URL of an external JavaScript library that is not associated with any locally stored file. Suggests downloading the library. Such association enables the IDE to provide proper code completion and navigation.", - "markdown": "Reports a URL of an external JavaScript library that is not associated with any locally stored file. Suggests downloading the library. Such association enables the IDE to provide proper code completion and navigation." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JSUnresolvedLibraryURL", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ES6PreferShortImport", - "shortDescription": { - "text": "Import can be shortened" - }, - "fullDescription": { - "text": "Reports an ES6 import whose 'from' part can be shortened. Suggests importing the parent directory.", - "markdown": "Reports an ES6 import whose `from` part can be shortened. Suggests importing the parent directory." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "ES6PreferShortImport", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PointlessBitwiseExpressionJS", - "shortDescription": { - "text": "Bitwise expression can be simplified" - }, - "fullDescription": { - "text": "Reports an expression that includes 'and' with zero, 'or' by zero, or shifting by zero. Such expressions may result from not fully completed automated refactorings.", - "markdown": "Reports an expression that includes `and` with zero, `or` by zero, or shifting by zero. Such expressions may result from not fully completed automated refactorings." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "PointlessBitwiseExpressionJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Bitwise operation issues", - "index": 29, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "InfiniteLoopJS", - "shortDescription": { - "text": "Infinite loop statement" - }, - "fullDescription": { - "text": "Reports a 'for', 'while', or 'do' statement which can only exit by throwing an exception. Such statements often indicate coding errors.", - "markdown": "Reports a `for`, `while`, or `do` statement which can only exit by throwing an exception. Such statements often indicate coding errors." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "InfiniteLoopJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Probable bugs", - "index": 22, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSStringConcatenationToES6Template", - "shortDescription": { - "text": "String concatenation is used instead of template literal" - }, - "fullDescription": { - "text": "Reports a string concatenation. Suggests replacing it with a template literal Example '\"result: \" + a + \".\"' After applying the quick-fix the code looks as follows: '`result: ${a}.`'", - "markdown": "Reports a string concatenation. Suggests replacing it with a [template literal](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)\n\nExample\n\n \"result: \" + a + \".\" \n\nAfter applying the quick-fix the code looks as follows:\n\n `result: ${a}.` \n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "JSStringConcatenationToES6Template", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/ES2015 migration aids", - "index": 30, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSArrowFunctionBracesCanBeRemoved", - "shortDescription": { - "text": "Redundant braces around arrow function body" - }, - "fullDescription": { - "text": "Reports an arrow function whose body only consists of braces and exactly one statement. Suggests converting to concise syntax without braces. 'let incrementer = (x) => {return x + 1};' After the quick-fix is applied, the code fragment looks as follows: 'let incrementer = (x) => x + 1;'", - "markdown": "Reports an arrow function whose body only consists of braces and exactly one statement. Suggests converting to concise syntax without braces.\n\n\n let incrementer = (x) => {return x + 1};\n\nAfter the quick-fix is applied, the code fragment looks as follows:\n\n\n let incrementer = (x) => x + 1;\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "JSArrowFunctionBracesCanBeRemoved", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Code style issues", - "index": 17, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ReplaceAssignmentWithOperatorAssignmentJS", - "shortDescription": { - "text": "Assignment could be replaced with operator assignment" - }, - "fullDescription": { - "text": "Reports an assignment operation that can be replaced by an operator assignment to make your code shorter and probably clearer. Example: 'x = x + 3;'\n 'x = x / 3;'\n After the quick fix is applied the result looks like: 'x += 3;'\n 'x /= 3;'", - "markdown": "Reports an assignment operation that can be replaced by an operator assignment to make your code shorter and probably clearer.\n\n\nExample:\n\n x = x + 3;\n x = x / 3;\n\nAfter the quick fix is applied the result looks like:\n\n x += 3;\n x /= 3;\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "AssignmentReplaceableWithOperatorAssignmentJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Assignment issues", - "index": 48, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSFileReferences", - "shortDescription": { - "text": "Unresolved file reference" - }, - "fullDescription": { - "text": "Reports an unresolved file reference in a JavaScript file, including CommonJS and AMD modules references.", - "markdown": "Reports an unresolved file reference in a JavaScript file, including CommonJS and AMD modules references." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JSFileReferences", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "FunctionWithInconsistentReturnsJS", - "shortDescription": { - "text": "Function with inconsistent returns" - }, - "fullDescription": { - "text": "Reports a function that returns a value in some cases while in other cases no value is returned. This usually indicates an error. Example: 'function foo() {\n if (true)\n return 3;\n return;\n}'", - "markdown": "Reports a function that returns a value in some cases while in other cases no value is returned. This usually indicates an error.\n\nExample:\n\n\n function foo() {\n if (true)\n return 3;\n return;\n }\n\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "FunctionWithInconsistentReturnsJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Validity issues", - "index": 35, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "EmptyTryBlockJS", - "shortDescription": { - "text": "Empty 'try' block" - }, - "fullDescription": { - "text": "Reports an empty 'try' block, which usually indicates an error.", - "markdown": "Reports an empty `try` block, which usually indicates an error." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "EmptyTryBlockJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Try statement issues", - "index": 42, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ES6ClassMemberInitializationOrder", - "shortDescription": { - "text": "Use of possibly unassigned property in a static initializer" - }, - "fullDescription": { - "text": "Reports a class member initializer which references another non-hoisted class member while the latter may be not initialized yet. Initialization of class members happens consequently for fields, so a field cannot reference another field that is declared later.", - "markdown": "Reports a class member initializer which references another non-hoisted class member while the latter may be not initialized yet. \n\nInitialization of class members happens consequently for fields, so a field cannot reference another field that is declared later." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "ES6ClassMemberInitializationOrder", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ReservedWordUsedAsNameJS", - "shortDescription": { - "text": "Reserved word used as name" - }, - "fullDescription": { - "text": "Reports a JavaScript reserved word used as a name. The JavaScript specification reserves a number of words which are currently not used as keywords. Using those words as identifiers may result in broken code if later versions of JavaScript start using them as keywords.", - "markdown": "Reports a JavaScript reserved word used as a name. The JavaScript specification reserves a number of words which are currently not used as keywords. Using those words as identifiers may result in broken code if later versions of JavaScript start using them as keywords." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "ReservedWordAsName", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Validity issues", - "index": 35, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSClassNamingConvention", - "shortDescription": { - "text": "Class naming convention" - }, - "fullDescription": { - "text": "Reports a class or a function that is annotated with a JSDoc '@constructor' or '@class' tag whose names are too short, too long, or do not follow the specified regular expression pattern. Use the fields provided below to specify minimum length, maximum length, and a regular expression expected for classes names. Use the standard 'java.util.regex' format for regular expressions.", - "markdown": "Reports a class or a function that is annotated with a JSDoc `@constructor` or `@class` tag whose names are too short, too long, or do not follow the specified regular expression pattern.\n\n\nUse the fields provided below to specify minimum length, maximum length, and a regular expression\nexpected for classes names. Use the standard `java.util.regex` format for regular expressions." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JSClassNamingConvention", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Naming conventions", - "index": 62, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "NestedFunctionJS", - "shortDescription": { - "text": "Nested function" - }, - "fullDescription": { - "text": "Reports a function nested inside another function. Although JavaScript allows functions to be nested, such constructs may be confusing. Use the checkbox below to ignore anonymous nested functions.", - "markdown": "Reports a function nested inside another function. Although JavaScript allows functions to be nested, such constructs may be confusing.\n\n\nUse the checkbox below to ignore anonymous nested functions." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "NestedFunctionJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Potentially confusing code constructs", - "index": 37, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "XHTMLIncompatabilitiesJS", - "shortDescription": { - "text": "Incompatible XHTML usages" - }, - "fullDescription": { - "text": "Reports common JavaScript DOM patterns which may present problems with XHTML documents. In particular, the patterns detected will behave completely differently depending on whether the document is loaded as XML or HTML. This can result in subtle bugs where script behaviour is dependent on the MIME-type of the document, rather than its content. Patterns detected include document.body, document.images, document.applets, document.links, document.forms, and document.anchors.", - "markdown": "Reports common JavaScript DOM patterns which may present problems with XHTML documents. In particular, the patterns detected will behave completely differently depending on whether the document is loaded as XML or HTML. This can result in subtle bugs where script behaviour is dependent on the MIME-type of the document, rather than its content. Patterns detected include **document.body** , **document.images** , **document.applets** , **document.links** , **document.forms** , and **document.anchors**." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "XHTMLIncompatabilitiesJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/DOM issues", - "index": 64, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "IncrementDecrementResultUsedJS", - "shortDescription": { - "text": "Result of increment or decrement used" - }, - "fullDescription": { - "text": "Reports an increment ('++') or decrement ('--') expression where the result of the assignment is used in a containing expression. Such assignments can result in confusion due to the order of operations, as evaluation of the assignment may affect the outer expression in unexpected ways. Example: 'var a = b++'", - "markdown": "Reports an increment (`++`) or decrement (`--`) expression where the result of the assignment is used in a containing expression. Such assignments can result in confusion due to the order of operations, as evaluation of the assignment may affect the outer expression in unexpected ways. Example: `var a = b++`" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "IncrementDecrementResultUsedJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Potentially confusing code constructs", - "index": 37, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SuspiciousTypeOfGuard", - "shortDescription": { - "text": "Unsound type guard check" - }, - "fullDescription": { - "text": "Reports a 'typeof' or 'instanceof' unsound type guard check. The 'typeof x' type guard can be unsound in one of the following two cases: 'typeof x' never corresponds to the specified value (for example, 'typeof x === 'number'' when 'x' is of the type 'string | boolean') 'typeof x' always corresponds to the specified value (for example, 'typeof x === 'string'' when 'x' is of the type 'string') The 'x instanceof A' type guard can be unsound in one of the following two cases: The type of 'x' is not related to 'A' The type of 'x' is 'A' or a subtype of 'A'", - "markdown": "Reports a `typeof` or `instanceof` unsound type guard check. The `typeof x` type guard can be unsound in one of the following two cases:\n\n* `typeof x` never corresponds to the specified value (for example, `typeof x === 'number'` when `x` is of the type 'string \\| boolean')\n* `typeof x` always corresponds to the specified value (for example, `typeof x === 'string'` when `x` is of the type 'string')\n\nThe `x instanceof A` type guard can be unsound in one of the following two cases:\n\n* The type of `x` is not related to `A`\n* The type of `x` is `A` or a subtype of `A`" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "SuspiciousTypeOfGuard", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Control flow issues", - "index": 2, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "TypeScriptJSXUnresolvedComponent", - "shortDescription": { - "text": "Unresolved JSX component" - }, - "fullDescription": { - "text": "Reports an unresolved reference to a JSX component. Suggests adding an import statement if the referenced component is defined in the project or its dependencies or creating a new component with the specified name. The template for a new component can be modified in Editor | File and Code Templates.", - "markdown": "Reports an unresolved reference to a JSX component. Suggests adding an import statement if the referenced component is defined in the project or its dependencies or creating a new component with the specified name.\n\nThe template for a new component can be modified in Editor \\| File and Code Templates." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "TypeScriptJSXUnresolvedComponent", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/TypeScript", - "index": 34, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "TypeScriptFieldCanBeMadeReadonly", - "shortDescription": { - "text": "Field can be readonly" - }, - "fullDescription": { - "text": "Reports a private field that can be made readonly (for example, if the field is assigned only in the constructor).", - "markdown": "Reports a private field that can be made readonly (for example, if the field is assigned only in the constructor)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "TypeScriptFieldCanBeMadeReadonly", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/TypeScript", - "index": 34, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ES6DestructuringVariablesMerge", - "shortDescription": { - "text": "Destructuring properties with the same key" - }, - "fullDescription": { - "text": "Reports multiple destructuring properties with identical keys. Suggests merging the properties.", - "markdown": "Reports multiple destructuring properties with identical keys. Suggests merging the properties." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "ES6DestructuringVariablesMerge", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "LoopStatementThatDoesntLoopJS", - "shortDescription": { - "text": "Loop statement that doesn't loop" - }, - "fullDescription": { - "text": "Reports a 'for', 'while', or 'do' statement whose bodies are guaranteed to execute at most once. Normally, this indicates an error.", - "markdown": "Reports a `for`, `while`, or `do` statement whose bodies are guaranteed to execute at most once. Normally, this indicates an error." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "LoopStatementThatDoesntLoopJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Control flow issues", - "index": 2, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "NegatedIfStatementJS", - "shortDescription": { - "text": "Negated 'if' statement" - }, - "fullDescription": { - "text": "Reports if statements which have an else branch and a negated condition. Flipping the order of the if and else branches will usually increase the clarity of such statements.", - "markdown": "Reports **if** statements which have an **else** branch and a negated condition. Flipping the order of the **if** and **else** branches will usually increase the clarity of such statements." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "NegatedIfStatementJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Potentially confusing code constructs", - "index": 37, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSNonASCIINames", - "shortDescription": { - "text": "Identifiers with non-ASCII symbols" - }, - "fullDescription": { - "text": "Reports a non-ASCII symbol in a name. If the 'Allow only ASCII names' option is selected, reports all names that contain non-ASCII symbols. Otherwise reports all names that contain both ASCII and non-ASCII symbols.", - "markdown": "Reports a non-ASCII symbol in a name. \n\nIf the 'Allow only ASCII names' option is selected, reports all names that contain non-ASCII symbols. \nOtherwise reports all names that contain both ASCII and non-ASCII symbols." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JSNonASCIINames", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Naming conventions", - "index": 62, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "TypeScriptRedundantGenericType", - "shortDescription": { - "text": "Redundant type arguments" - }, - "fullDescription": { - "text": "Reports a type argument that is equal to the default one and can be removed. Example: 'type Foo = T;\nlet z: Foo;'", - "markdown": "Reports a type argument that is equal to the default one and can be removed.\n\n\nExample:\n\n\n type Foo = T;\n let z: Foo;\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "TypeScriptRedundantGenericType", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/TypeScript", - "index": 34, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "TypeScriptUMDGlobal", - "shortDescription": { - "text": "Referenced UMD global variable" - }, - "fullDescription": { - "text": "Reports a usage of a Universal Module Definition (UMD) global variable if the current file is a module (ECMAScript or CommonJS). Referencing UMD variables without explicit imports can lead to a runtime error if the library isn't included implicitly.", - "markdown": "Reports a usage of a Universal Module Definition (UMD) global variable if the current file is a module (ECMAScript or CommonJS). Referencing UMD variables without explicit imports can lead to a runtime error if the library isn't included implicitly." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "TypeScriptUMDGlobal", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/TypeScript", - "index": 34, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "UnnecessaryReturnJS", - "shortDescription": { - "text": "Unnecessary 'return' statement" - }, - "fullDescription": { - "text": "Reports an unnecessary 'return' statement, that is, a 'return' statement that returns no value and occurs just before the function would have \"fallen through\" the bottom. These statements may be safely removed.", - "markdown": "Reports an unnecessary `return` statement, that is, a `return` statement that returns no value and occurs just before the function would have \"fallen through\" the bottom. These statements may be safely removed." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "UnnecessaryReturnStatementJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Control flow issues", - "index": 2, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ConditionalExpressionWithIdenticalBranchesJS", - "shortDescription": { - "text": "Conditional expression with identical branches" - }, - "fullDescription": { - "text": "Reports a ternary conditional expression with identical 'then' and 'else' branches.", - "markdown": "Reports a ternary conditional expression with identical `then` and `else` branches." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "ConditionalExpressionWithIdenticalBranchesJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Control flow issues", - "index": 2, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSAnnotator", - "shortDescription": { - "text": "ECMAScript specification is not followed" - }, - "fullDescription": { - "text": "Reports basic syntax issues and inconsistencies with language specification, such as invalid usages of keywords, usages of incompatible numeric format, or multiple parameters to getters/setters. Generally, such errors must always be reported and shouldn't be disabled. But in some cases, such as issues due to the dynamic nature of JavaScript, the use of not yet supported language features, or bugs in IDE's checker, it may be handy to disable reporting these very basic errors.", - "markdown": "Reports basic syntax issues and inconsistencies with language specification, such as invalid usages of keywords, usages of incompatible numeric format, or multiple parameters to getters/setters. \nGenerally, such errors must always be reported and shouldn't be disabled. But in some cases, such as issues due to the dynamic nature of JavaScript, the use of not yet supported language features, or bugs in IDE's checker, it may be handy to disable reporting these very basic errors." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "JSAnnotator", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSUnfilteredForInLoop", - "shortDescription": { - "text": "Unfiltered for..in loop" - }, - "fullDescription": { - "text": "Reports unfiltered 'for-in' loops. The use of this construct results in processing not only own properties of an object but properties from its prototype as well. It may be unexpected in some specific cases, for example, in utility methods that copy or modify all properties or when 'Object''s prototype may be incorrectly modified. For example, the following code will print 42 and myMethod: 'Object.prototype.myMethod = function myMethod() {};\nlet a = { foo: 42 };\nfor (let i in a) {\n console.log(a[i]);\n}' Suggests replacing the whole loop with a 'Object.keys()' method or adding a 'hasOwnProperty()' check. After applying the quick-fix the code looks as follows: 'for (let i in a) {\n if (a.hasOwnProperty(i)) {\n console.log(a[i]);\n }\n}'", - "markdown": "Reports unfiltered `for-in` loops. \n\nThe use of this construct results in processing not only own properties of an object but properties from its prototype as well. It may be unexpected in some specific cases, for example, in utility methods that copy or modify all properties or when `Object`'s prototype may be incorrectly modified. For example, the following code will print **42** and **myMethod** : \n\n\n Object.prototype.myMethod = function myMethod() {};\n let a = { foo: 42 };\n for (let i in a) {\n console.log(a[i]);\n }\n\nSuggests replacing the whole loop with a `Object.keys()` method or adding a `hasOwnProperty()` check. After applying the quick-fix the code looks as follows:\n\n\n for (let i in a) {\n if (a.hasOwnProperty(i)) {\n console.log(a[i]);\n }\n }\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JSUnfilteredForInLoop", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSIncompatibleTypesComparison", - "shortDescription": { - "text": "Comparison of expressions having incompatible types" - }, - "fullDescription": { - "text": "Reports a comparison with operands of incompatible types or an operand with a type without possible common values.", - "markdown": "Reports a comparison with operands of incompatible types or an operand with a type without possible common values." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "JSIncompatibleTypesComparison", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Probable bugs", - "index": 22, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSLastCommaInObjectLiteral", - "shortDescription": { - "text": "Unneeded last comma in object literal" - }, - "fullDescription": { - "text": "Reports usages of a trailing comma in object literals. The warning is reported only when the JavaScript language version is set to ECMAScript 5.1. Trailing commas in object literals are allowed by the specification, however, some browsers might throw an error when a trailing comma is used. You can configure formatting options for trailing commas in Code Style | JavaScript or TypeScript | Punctuation.", - "markdown": "Reports usages of a trailing comma in object literals.\n\nThe warning is reported only when the JavaScript language version is set to ECMAScript 5.1.\n\nTrailing commas in object literals are allowed by the specification, however, some browsers might throw an error when a trailing comma is used.\n\nYou can configure formatting options for trailing commas in **Code Style** \\| **JavaScript** or **TypeScript** \\| **Punctuation**." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JSLastCommaInObjectLiteral", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSFunctionExpressionToArrowFunction", - "shortDescription": { - "text": "Function expression is used instead of arrow function" - }, - "fullDescription": { - "text": "Reports a function expression. Suggests converting it to an arrow function. Example: 'arr.map(function(el) {return el + 1})' After applying the quick-fix the code looks as follows: 'arr.map(el => el + 1)'", - "markdown": "Reports a [function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/function) expression. Suggests converting it to an [arrow function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions).\n\nExample:\n\n arr.map(function(el) {return el + 1})\n\nAfter applying the quick-fix the code looks as follows:\n\n arr.map(el => el + 1)\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "JSFunctionExpressionToArrowFunction", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/ES2015 migration aids", - "index": 30, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ES6TopLevelAwaitExpression", - "shortDescription": { - "text": "Top-level 'await' expression" - }, - "fullDescription": { - "text": "Reports a usage of a top-level 'await' expression. While the new 'top-level async' proposal is on its way, using 'await' outside async functions is not allowed.", - "markdown": "Reports a usage of a top-level `await` expression. While the new 'top-level async' proposal is on its way, using `await` outside async functions is not allowed." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "ES6TopLevelAwaitExpression", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Async code and promises", - "index": 65, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ES6MissingAwait", - "shortDescription": { - "text": "Missing await for an async function call" - }, - "fullDescription": { - "text": "Reports an 'async' function call without an expected 'await' prefix inside an 'async' function. Such call returns a 'Promise' and control flow is continued immediately. Example: 'async function bar() { /* ... */ }\nasync function foo() {\n bar(); // bad\n}' After the quick-fix is applied, the 'await' prefix is added: 'async function bar() { /* ... */ }\nasync function foo() {\n await bar(); // good\n}' When the 'Report for promises in return statements' checkbox is selected, also suggests adding 'await' in return statements. While this is generally not necessary, it gives two main benefits. You won't forget to add 'await' when surrounding your code with 'try-catch'. An explicit 'await' helps V8 runtime to provide async stack traces.", - "markdown": "Reports an `async` function call without an expected `await` prefix inside an `async` function. Such call returns a `Promise` and control flow is continued immediately.\n\nExample:\n\n\n async function bar() { /* ... */ }\n async function foo() {\n bar(); // bad\n }\n\n\nAfter the quick-fix is applied, the `await` prefix is added:\n\n\n async function bar() { /* ... */ }\n async function foo() {\n await bar(); // good\n }\n\nWhen the 'Report for promises in return statements' checkbox is selected, also suggests adding `await` in return statements. \nWhile this is generally not necessary, it gives two main benefits. \n\n* You won't forget to add `await` when surrounding your code with `try-catch`.\n* An explicit `await` helps V8 runtime to provide [async stack traces](https://bit.ly/v8-zero-cost-async-stack-traces)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "ES6MissingAwait", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Async code and promises", - "index": 65, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "TailRecursionJS", - "shortDescription": { - "text": "Tail recursion" - }, - "fullDescription": { - "text": "Reports a tail recursion, that is, when a function calls itself as its last action before returning. A tail recursion can always be replaced by looping, which will be considerably faster. Some JavaScript engines perform this optimization, while others do not. Thus, tail recursive solutions may have considerably different performance characteristics in different environments.", - "markdown": "Reports a tail recursion, that is, when a function calls itself as its last action before returning. A tail recursion can always be replaced by looping, which will be considerably faster. Some JavaScript engines perform this optimization, while others do not. Thus, tail recursive solutions may have considerably different performance characteristics in different environments." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "TailRecursionJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Control flow issues", - "index": 2, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ES6ConvertToForOf", - "shortDescription": { - "text": "'for..in' is used instead of 'for..of'" - }, - "fullDescription": { - "text": "Reports a usage of a 'for..in' loop on an array. Suggests replacing it with a 'for..of' loop. 'for..of' loops, which are introduced in ECMAScript 6, iterate over 'iterable' objects. For arrays, this structure is preferable to 'for..in', because it works only with array values but not with array object's properties.", - "markdown": "Reports a usage of a [for..in](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) loop on an array. Suggests replacing it with a [for..of](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) loop. \n`for..of` loops, which are introduced in ECMAScript 6, iterate over `iterable` objects. For arrays, this structure is preferable to `for..in`, because it works only with array values but not with array object's properties." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "ES6ConvertToForOf", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/ES2015 migration aids", - "index": 30, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "FlowJSCoverage", - "shortDescription": { - "text": "Code is not covered by Flow" - }, - "fullDescription": { - "text": "Reports JavaScript code fragments that are not covered by the Flow type checker. To use this inspection, configure the Flow executable in Settings | Languages & Frameworks | JavaScript.", - "markdown": "Reports JavaScript code fragments that are not covered by the Flow type checker. To use this inspection, configure the Flow executable in [Settings \\| Languages \\& Frameworks \\| JavaScript](settings://Settings.JavaScript)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "FlowJSCoverage", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Flow type checker", - "index": 20, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ParameterNamingConventionJS", - "shortDescription": { - "text": "Function parameter naming convention" - }, - "fullDescription": { - "text": "Reports a function parameter whose name is too short, too long, or doesn't follow the specified regular expression pattern. Use the fields provided below to specify minimum length, maximum length and regular expression expected for local variables names. Use the standard 'java.util.regex' format regular expressions.", - "markdown": "Reports a function parameter whose name is too short, too long, or doesn't follow the specified regular expression pattern.\n\n\nUse the fields provided below to specify minimum length, maximum length and regular expression\nexpected for local variables names. Use the standard `java.util.regex` format regular expressions." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "ParameterNamingConventionJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Naming conventions", - "index": 62, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSUndefinedPropertyAssignment", - "shortDescription": { - "text": "Undefined property assignment" - }, - "fullDescription": { - "text": "Reports an assignment to a property that is not defined in the type of a variable. Example: '/**\n * @type {{ property1: string, property2: number }}\n */\nlet myVariable = create();\n\nmyVariable.newProperty = 3; // bad'", - "markdown": "Reports an assignment to a property that is not defined in the type of a variable.\n\nExample:\n\n\n /**\n * @type {{ property1: string, property2: number }}\n */\n let myVariable = create();\n\n myVariable.newProperty = 3; // bad\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "JSUndefinedPropertyAssignment", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Code style issues", - "index": 17, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "StandardJS", - "shortDescription": { - "text": "Standard code style" - }, - "fullDescription": { - "text": "Reports a discrepancy detected by the JavaScript Standard Style linter. The highlighting severity in the editor is based on the severity level the linter reports.", - "markdown": "Reports a discrepancy detected by the [JavaScript Standard Style](https://standardjs.com/) linter. \n\nThe highlighting severity in the editor is based on the severity level the linter reports." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "StandardJS", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Code quality tools", - "index": 66, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ParametersPerFunctionJS", - "shortDescription": { - "text": "Function with too many parameters" - }, - "fullDescription": { - "text": "Reports a function with too many parameters. Such functions often indicate problems with design. Use the field below to specify the maximum acceptable number of parameters for a function.", - "markdown": "Reports a function with too many parameters. Such functions often indicate problems with design.\n\n\nUse the field below to specify the maximum acceptable number of parameters for a function." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "OverlyComplexFunctionJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Function metrics", - "index": 44, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ThisExpressionReferencesGlobalObjectJS", - "shortDescription": { - "text": "'this' expression which references the global object" - }, - "fullDescription": { - "text": "Reports a 'this' expression outside an object literal or a constructor body. Such 'this' expressions reference the top-level \"global\" JavaScript object, but are mostly useless.", - "markdown": "Reports a `this` expression outside an object literal or a constructor body. Such `this` expressions reference the top-level \"global\" JavaScript object, but are mostly useless." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "ThisExpressionReferencesGlobalObjectJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Validity issues", - "index": 35, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "NestedAssignmentJS", - "shortDescription": { - "text": "Nested assignment" - }, - "fullDescription": { - "text": "Reports an assignment expression nested inside another expression, for example, 'a = b = 1'. Such expressions may be confusing and violate the general design principle that a given construct should do precisely one thing.", - "markdown": "Reports an assignment expression nested inside another expression, for example, `a = b = 1`. Such expressions may be confusing and violate the general design principle that a given construct should do precisely one thing." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "NestedAssignmentJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Assignment issues", - "index": 48, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "DefaultNotLastCaseInSwitchJS", - "shortDescription": { - "text": "'default' not last case in 'switch'" - }, - "fullDescription": { - "text": "Reports a 'switch' statement where the 'default' case comes before another case instead of being the very last case, which may cause confusion.", - "markdown": "Reports a `switch` statement where the `default` case comes before another case instead of being the very last case, which may cause confusion." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "DefaultNotLastCaseInSwitchJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Switch statement issues", - "index": 63, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ConfusingPlusesOrMinusesJS", - "shortDescription": { - "text": "Confusing sequence of '+' or '-'" - }, - "fullDescription": { - "text": "Reports a suspicious combination of '+' or '-' characters in JavaScript code (for example, 'a+++b'. Such sequences are confusing, and their semantics may change through changes in the whitespace.", - "markdown": "Reports a suspicious combination of `+` or `-` characters in JavaScript code (for example, `a+++b`. Such sequences are confusing, and their semantics may change through changes in the whitespace." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "ConfusingPlusesOrMinusesJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Potentially confusing code constructs", - "index": 37, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSDeprecatedSymbols", - "shortDescription": { - "text": "Deprecated symbol used" - }, - "fullDescription": { - "text": "Reports a usage of a deprecated function variable.", - "markdown": "Reports a usage of a deprecated function variable." - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "JSDeprecatedSymbols", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "LocalVariableNamingConventionJS", - "shortDescription": { - "text": "Local variable naming convention" - }, - "fullDescription": { - "text": "Reports a local variable whose name is too short, too long, or doesn't follow the specified regular expression pattern. Use the fields provided below to specify minimum length, maximum length, and a regular expression expected for local variables names. Use the standard 'java.util.regex' format regular expressions.", - "markdown": "Reports a local variable whose name is too short, too long, or doesn't follow the specified regular expression pattern.\n\n\nUse the fields provided below to specify minimum length, maximum length, and a regular expression\nexpected for local variables names. Use the standard `java.util.regex` format regular expressions." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "LocalVariableNamingConventionJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Naming conventions", - "index": 62, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "EmptyFinallyBlockJS", - "shortDescription": { - "text": "Empty 'finally' block" - }, - "fullDescription": { - "text": "Reports an empty 'finally' block, which usually indicates an error.", - "markdown": "Reports an empty `finally` block, which usually indicates an error." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "EmptyFinallyBlockJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Try statement issues", - "index": 42, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSCommentMatchesSignature", - "shortDescription": { - "text": "Mismatched JSDoc and function signature" - }, - "fullDescription": { - "text": "Reports mismatch between the names and the number of parameters within a JSDoc comment and the actual parameters of a function. Suggests updating parameters in JSDoc comment. Example: '/**\n * @param height Height in pixels\n */\nfunction sq(height, width) {} // width is not documented' After the quick-fix is applied: '/**\n * @param height Height in pixels\n * @param width\n */\nfunction sq(height, width) {}'", - "markdown": "Reports mismatch between the names and the number of parameters within a JSDoc comment and the actual parameters of a function. Suggests updating parameters in JSDoc comment.\n\n**Example:**\n\n\n /**\n * @param height Height in pixels\n */\n function sq(height, width) {} // width is not documented\n\nAfter the quick-fix is applied:\n\n\n /**\n * @param height Height in pixels\n * @param width\n */\n function sq(height, width) {}\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JSCommentMatchesSignature", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "UpdateDependencyToLatestVersion", - "shortDescription": { - "text": "Update package.json dependencies to latest versions" - }, - "fullDescription": { - "text": "Suggests to upgrade your package.json dependencies to the latest versions, ignoring specified versions.", - "markdown": "Suggests to upgrade your package.json dependencies to the latest versions, ignoring specified versions." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "UpdateDependencyToLatestVersion", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Imports and dependencies", - "index": 57, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "TypeScriptConfig", - "shortDescription": { - "text": "Inconsistent tsconfig.json properties" - }, - "fullDescription": { - "text": "Reports inconsistency of a 'paths', 'checkJs', or 'extends' property in a tsconfig.json file. The 'checkJs' property requires 'allowJs'. The 'extends' property should be a valid file reference.", - "markdown": "Reports inconsistency of a `paths`, `checkJs`, or `extends` property in a tsconfig.json file. \nThe `checkJs` property requires `allowJs`. \nThe `extends` property should be a valid file reference." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "TypeScriptConfig", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/TypeScript", - "index": 34, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSSuspiciousNameCombination", - "shortDescription": { - "text": "Suspicious variable/parameter name combination" - }, - "fullDescription": { - "text": "Reports an assignment or a function call where the name of the target variable or the function parameter does not match the name of the value assigned to it. Example: 'var x = 0;\n var y = x;' or 'var x = 0, y = 0;\n var rc = new Rectangle(y, x, 20, 20);' Here the inspection guesses that 'x' and 'y' are mixed up. Specify the names that should not be used together. An error is reported if a parameter name or an assignment target name contains words from one group while the name of the assigned or passed variable contains words from another group.", - "markdown": "Reports an assignment or a function call where the name of the target variable or the function parameter does not match the name of the value assigned to it.\n\nExample:\n\n\n var x = 0;\n var y = x;\n\nor\n\n\n var x = 0, y = 0;\n var rc = new Rectangle(y, x, 20, 20);\n\nHere the inspection guesses that `x` and `y` are mixed up.\n\nSpecify the names that should not be used together. An error is reported\nif a parameter name or an assignment target name contains words from one group while the name of the assigned or passed\nvariable contains words from another group." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JSSuspiciousNameCombination", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Probable bugs", - "index": 22, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSUnresolvedExtXType", - "shortDescription": { - "text": "Unresolved Ext JS xtype" - }, - "fullDescription": { - "text": "Reports an Ext JS 'xtype' reference that doesn't have a corresponding class.", - "markdown": "Reports an Ext JS `xtype` reference that doesn't have a corresponding class." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JSUnresolvedExtXType", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ForLoopThatDoesntUseLoopVariableJS", - "shortDescription": { - "text": "'for' loop where update or condition does not use loop variable" - }, - "fullDescription": { - "text": "Reports a 'for' loop where the condition or update does not use the 'for' loop variable.", - "markdown": "Reports a `for` loop where the condition or update does not use the `for` loop variable." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "ForLoopThatDoesntUseLoopVariableJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Probable bugs", - "index": 22, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "TypeScriptAbstractClassConstructorCanBeMadeProtected", - "shortDescription": { - "text": "Abstract class constructor can be made protected" - }, - "fullDescription": { - "text": "Reports a public constructor of an abstract class and suggests making it protected (because it is useless to have it public).", - "markdown": "Reports a public constructor of an abstract class and suggests making it protected (because it is useless to have it public)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "TypeScriptAbstractClassConstructorCanBeMadeProtected", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/TypeScript", - "index": 34, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "FunctionWithMultipleReturnPointsJS", - "shortDescription": { - "text": "Function with multiple return points" - }, - "fullDescription": { - "text": "Reports a function with multiple return points. Such functions are hard to understand and maintain.", - "markdown": "Reports a function with multiple return points. Such functions are hard to understand and maintain." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "FunctionWithMultipleReturnPointsJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Function metrics", - "index": 44, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSIgnoredPromiseFromCall", - "shortDescription": { - "text": "Result of method call returning a promise is ignored" - }, - "fullDescription": { - "text": "Reports a function call that returns a 'Promise' that is not used later. Such calls are usually unintended and indicate an error.", - "markdown": "Reports a function call that returns a `Promise` that is not used later. Such calls are usually unintended and indicate an error." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "JSIgnoredPromiseFromCall", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Async code and promises", - "index": 65, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ThreeNegationsPerFunctionJS", - "shortDescription": { - "text": "Function with more than three negations" - }, - "fullDescription": { - "text": "Reports a function with three or more negation operations ('!' or '!='). Such functions may be unnecessarily confusing.", - "markdown": "Reports a function with three or more negation operations (`!` or `!=`). Such functions may be unnecessarily confusing." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "FunctionWithMoreThanThreeNegationsJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Function metrics", - "index": 44, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JSRemoveUnnecessaryParentheses", - "shortDescription": { - "text": "Unnecessary parentheses" - }, - "fullDescription": { - "text": "Reports redundant parentheses. In expressions: 'var x = ((1) + 2) + 3' In arrow function argument lists: 'var incrementer = (x) => x + 1' In TypeScript and Flow type declarations: 'type Card = (Suit & Rank) | (Suit & Number)'", - "markdown": "Reports redundant parentheses.\n\nIn expressions:\n\n var x = ((1) + 2) + 3\n\nIn arrow function argument lists:\n\n var incrementer = (x) => x + 1\n\nIn TypeScript and Flow type declarations:\n\n type Card = (Suit & Rank) | (Suit & Number)\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "JSRemoveUnnecessaryParentheses", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Code style issues", - "index": 17, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "OverlyComplexBooleanExpressionJS", - "shortDescription": { - "text": "Overly complex boolean expression" - }, - "fullDescription": { - "text": "Reports a boolean expression with too many terms. Such expressions may be confusing and bug-prone. Use the field below to specify the maximum number of terms allowed in an arithmetic expression.", - "markdown": "Reports a boolean expression with too many terms. Such expressions may be confusing and bug-prone.\n\n\nUse the field below to specify the maximum number of terms allowed in an arithmetic expression." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "OverlyComplexBooleanExpressionJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Potentially confusing code constructs", - "index": 37, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "OverlyComplexArithmeticExpressionJS", - "shortDescription": { - "text": "Overly complex arithmetic expression" - }, - "fullDescription": { - "text": "Reports an arithmetic expression with too many terms. Such expressions may be confusing and bug-prone. Use the field below to specify the maximum number of terms allowed in an arithmetic expression.", - "markdown": "Reports an arithmetic expression with too many terms. Such expressions may be confusing and bug-prone.\n\n\nUse the field below to specify the maximum number of terms allowed in an arithmetic expression." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "OverlyComplexArithmeticExpressionJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Potentially confusing code constructs", - "index": 37, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ES6RedundantNestingInTemplateLiteral", - "shortDescription": { - "text": "Redundant nesting in template literal" - }, - "fullDescription": { - "text": "Reports nested instances of a string or a template literal. Suggests inlining the nested instances into the containing template string. Example: 'let a = `Hello, ${`Brave ${\"New\"}`} ${\"World\"}!`' After applying the quick-fix the code looks as follows: 'let a = `Hello, Brave New World!`'", - "markdown": "Reports nested instances of a string or a template literal. Suggests inlining the nested instances into the containing template string.\n\nExample:\n\n\n let a = `Hello, ${`Brave ${\"New\"}`} ${\"World\"}!`\n\nAfter applying the quick-fix the code looks as follows:\n\n\n let a = `Hello, Brave New World!`\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "ES6RedundantNestingInTemplateLiteral", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "StringLiteralBreaksHTMLJS", - "shortDescription": { - "text": "String literal which breaks HTML parsing" - }, - "fullDescription": { - "text": "Reports a string literal that contains a '' or multiple components matched on any other element.", - "markdown": "Reports a component that is matched on an embedded template element `` or multiple components matched on any other element." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "AngularAmbiguousComponentTag", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Angular", - "index": 3, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "AngularUndefinedModuleExport", - "shortDescription": { - "text": "Undefined export from Angular module" - }, - "fullDescription": { - "text": "Reports an export of an undeclared or unimported component, directive, or pipes from an Angular module.", - "markdown": "Reports an export of an undeclared or unimported component, directive, or pipes from an Angular module." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "AngularUndefinedModuleExport", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Angular", - "index": 3, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "AngularInvalidI18nAttribute", - "shortDescription": { - "text": "Invalid i18n attribute" - }, - "fullDescription": { - "text": "Reports a problem with a 'i18n-*' attribute.", - "markdown": "Reports a problem with a `i18n-*` attribute." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "AngularInvalidI18nAttribute", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Angular", - "index": 3, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "AngularForBlockNonIterableVar", - "shortDescription": { - "text": "Non-iterable type in @for block" - }, - "fullDescription": { - "text": "Reports that the type of variable to iterate over does not have '[Symbol.iterator]()' method, which returns an iterator.", - "markdown": "Reports that the type of variable to iterate over does not have `[Symbol.iterator]()` method, which returns an iterator." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "AngularForBlockNonIterableVar", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Angular", - "index": 3, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "AngularIncorrectTemplateDefinition", - "shortDescription": { - "text": "Incorrect component template definition" - }, - "fullDescription": { - "text": "Reports a component that doesn’t have an associated template or uses both 'template' and 'templateUrl' properties.", - "markdown": "Reports a component that doesn't have an associated template or uses both `template` and `templateUrl` properties." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "AngularIncorrectTemplateDefinition", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Angular", - "index": 3, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "AngularNonStandaloneComponentImports", - "shortDescription": { - "text": "Invalid usage of imports in non-standalone components" - }, - "fullDescription": { - "text": "Reports usages of imports property in non-standalone component decorators. Imports can be used only in standalone components.", - "markdown": "Reports usages of imports property in non-standalone component decorators. Imports can be used only in standalone components." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "AngularNonStandaloneComponentImports", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Angular", - "index": 3, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "AngularMissingOrInvalidDeclarationInModule", - "shortDescription": { - "text": "Missing or invalid component, directive or pipe declaration in a module" - }, - "fullDescription": { - "text": "Reports a non-standalone Angular component, directive, or pipe that is not declared in any module or is declared in multiple modules.", - "markdown": "Reports a non-standalone Angular component, directive, or pipe that is not declared in any module or is declared in multiple modules." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "AngularMissingOrInvalidDeclarationInModule", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Angular", - "index": 3, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "AngularInvalidAnimationTriggerAssignment", - "shortDescription": { - "text": "Invalid animation trigger assignment" - }, - "fullDescription": { - "text": "Reports an invalid assignment of an animation trigger. To attach an animation to an element, use '[@triggerName]=\"expression\"' or an attribute without a value '@triggerName'.", - "markdown": "Reports an invalid assignment of an animation trigger. To attach an animation to an element, use `[@triggerName]=\"expression\"` or an attribute without a value `@triggerName`." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "AngularInvalidAnimationTriggerAssignment", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Angular", - "index": 3, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "AngularInvalidEntryComponent", - "shortDescription": { - "text": "Invalid entry component" - }, - "fullDescription": { - "text": "Reports an invalid Angular component specified in the module’s 'bootstrap' or 'entryComponents' property.", - "markdown": "Reports an invalid Angular component specified in the module's `bootstrap` or `entryComponents` property." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "AngularInvalidEntryComponent", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Angular", - "index": 3, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "AngularRecursiveModuleImportExport", - "shortDescription": { - "text": "Recursive import or export of an Angular module or a standalone component" - }, - "fullDescription": { - "text": "Reports a cyclic dependency between Angular modules or standalone components.", - "markdown": "Reports a cyclic dependency between Angular modules or standalone components." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "AngularRecursiveModuleImportExport", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Angular", - "index": 3, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "AngularInvalidSelector", - "shortDescription": { - "text": "Missing or invalid selector" - }, - "fullDescription": { - "text": "Reports an invalid 'selector' property of a component or directive.", - "markdown": "Reports an invalid `selector` property of a component or directive." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "AngularInvalidSelector", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Angular", - "index": 3, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "AngularBindingTypeMismatch", - "shortDescription": { - "text": "Invalid binding type" - }, - "fullDescription": { - "text": "Reports a mismatch between actual and expected directive binding type.", - "markdown": "Reports a mismatch between actual and expected directive binding type." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "AngularBindingTypeMismatch", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Angular", - "index": 3, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "AngularNonEmptyNgContent", - "shortDescription": { - "text": "Content inside tag" - }, - "fullDescription": { - "text": "Reports a text or tag occurrence inside a '' tag used for content projection.", - "markdown": "Reports a text or tag occurrence inside a `` tag used for content projection." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "AngularNonEmptyNgContent", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Angular", - "index": 3, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "AngularMissingRequiredDirectiveInputBinding", - "shortDescription": { - "text": "Missing required directive input" - }, - "fullDescription": { - "text": "Reports a missing binding for a required directive input.", - "markdown": "Reports a missing binding for a required directive input." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "AngularMissingRequiredDirectiveInputBinding", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Angular", - "index": 3, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "AngularInsecureBindingToEvent", - "shortDescription": { - "text": "Insecure binding to event" - }, - "fullDescription": { - "text": "Reports a binding to an event property or attribute, for example, '[onclick]' or '[attr.onclick]' instead of '(click)'.", - "markdown": "Reports a binding to an event property or attribute, for example, `[onclick]` or `[attr.onclick]` instead of `(click)`." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "AngularInsecureBindingToEvent", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Angular", - "index": 3, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "org.intellij.plugins.postcss", - "version": "241.18034.45", - "rules": [ - { - "id": "PostCssCustomSelector", - "shortDescription": { - "text": "Invalid custom selector" - }, - "fullDescription": { - "text": "Reports a syntax error in PostCSS Custom Selector. Example: '@custom-selector :--heading h1, h2, h3;'", - "markdown": "Reports a syntax error in [PostCSS Custom Selector](https://github.com/postcss/postcss-custom-selectors).\n\nExample:\n\n\n @custom-selector :--heading h1, h2, h3;\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "PostCssCustomSelector", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "PostCSS", - "index": 4, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PostCssUnresolvedModuleValueReference", - "shortDescription": { - "text": "Unresolved CSS module value" - }, - "fullDescription": { - "text": "Reports an unresolved reference to a CSS Module Value ('@value' declaration). Example: '@value foo from unknown;'", - "markdown": "Reports an unresolved reference to a [CSS Module Value](https://github.com/css-modules/postcss-modules-values) (`@value` declaration).\n\nExample:\n\n\n @value foo from unknown;\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "PostCssUnresolvedModuleValueReference", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "PostCSS", - "index": 4, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PostCssNesting", - "shortDescription": { - "text": "Invalid nested rule" - }, - "fullDescription": { - "text": "Reports a nested style rule whose syntax doesn't comply with the PostCSS Nested or the PostCSS Nesting specification. Example: '.phone {\n &_title {}\n}'", - "markdown": "Reports a nested style rule whose syntax doesn't comply with the [PostCSS Nested](https://github.com/postcss/postcss-nested) or the [PostCSS Nesting](https://github.com/csstools/postcss-nesting) specification.\n\nExample:\n\n\n .phone {\n &_title {}\n }\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "PostCssNesting", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "PostCSS", - "index": 4, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PostCssCustomMedia", - "shortDescription": { - "text": "Invalid custom media" - }, - "fullDescription": { - "text": "Reports a syntax error in a PostCSS Custom Media query. Example: '@custom-media --small-viewport (max-width: 30em);'", - "markdown": "Reports a syntax error in a [PostCSS Custom Media](https://github.com/postcss/postcss-custom-media) query.\n\nExample:\n\n\n @custom-media --small-viewport (max-width: 30em);\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "PostCssCustomMedia", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "PostCSS", - "index": 4, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PostCssMediaRange", - "shortDescription": { - "text": "Invalid media query range" - }, - "fullDescription": { - "text": "Checks range context syntax, which may alternatively be used for media features with a 'range' type. Example: '@media screen and (500px <= width <= 1200px) {}'", - "markdown": "Checks [range context](https://github.com/postcss/postcss-media-minmax) syntax, which may alternatively be used for media features with a 'range' type.\n\nExample:\n\n\n @media screen and (500px <= width <= 1200px) {}\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "PostCssMediaRange", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "PostCSS", - "index": 4, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "XPathView", - "version": "241.18034.45", - "rules": [ - { - "id": "IndexZeroUsage", - "shortDescription": { - "text": "XPath predicate with index 0" - }, - "fullDescription": { - "text": "Reports usages of '0' in a predicate index or in a comparison with the function 'position()'. Such usage is almost always a bug because in XPath, the index starts at '1', not at '0'. Example: '//someelement[position() = 0]' or '//something[0]'", - "markdown": "Reports usages of `0` in a predicate index or in a comparison with the function `position()`. Such usage is almost always a bug because in XPath, the index starts at `1`, *not* at `0`.\n\n**Example:**\n\n\n //someelement[position() = 0] or //something[0]\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "IndexZeroUsage", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "XPath", - "index": 5, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CheckNodeTest", - "shortDescription": { - "text": "Unknown element or attribute name" - }, - "fullDescription": { - "text": "Reports names of elements or attributes that are used in an XPath-expression but are missing in the associated XML files and are not defined in the referenced schemas. Such names are often the result of typos and would otherwise probably only be discovered at runtime. Example: '' If the 'h' is bound to the XHTML namespace, the inspection will report this part of the 'match' expression as an unknown element name because the correct name of the element is \"textarea\".", - "markdown": "Reports names of elements or attributes that are used in an XPath-expression but are missing in the associated XML files and are not defined in the referenced schemas. Such names are often the result of typos and would otherwise probably only be discovered at runtime.\n\n**Example:**\n\n\n \n\n\nIf the `h` is bound to the XHTML namespace, the inspection will report this part of the `match` expression as an\nunknown element name because the correct name of the element is \"textarea\"." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "CheckNodeTest", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "XPath", - "index": 5, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "XsltUnusedDeclaration", - "shortDescription": { - "text": "Unused variable or parameter" - }, - "fullDescription": { - "text": "Reports local variables and parameters that are never used.", - "markdown": "Reports local variables and parameters that are never used." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "XsltUnusedDeclaration", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "XSLT", - "index": 54, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "XsltDeclarations", - "shortDescription": { - "text": "Incorrect declaration" - }, - "fullDescription": { - "text": "Reports duplicate declarations and illegal identifiers in XSLT variables, parameters, and named templates:", - "markdown": "Reports duplicate declarations and illegal identifiers in XSLT variables, parameters, and named templates:" - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "XsltDeclarations", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "XSLT", - "index": 54, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "XsltVariableShadowing", - "shortDescription": { - "text": "Shadowed variable" - }, - "fullDescription": { - "text": "Reports shadowed XSLT variables.", - "markdown": "Reports shadowed XSLT variables." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "XsltVariableShadowing", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "XSLT", - "index": 54, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HardwiredNamespacePrefix", - "shortDescription": { - "text": "Hardcoded namespace prefix" - }, - "fullDescription": { - "text": "Reports comparisons of the 'name()' function with a string that contains a colon (':'). Such usages usually indicate a hardcoded namespace prefix in the comparison. As a result, the code will break when run against XML that uses another prefix for the same namespace. Example: '...'", - "markdown": "Reports comparisons of the `name()` function with a string that contains a colon (`:`). Such usages usually indicate a hardcoded namespace prefix in the comparison. As a result, the code will break when run against XML that uses another prefix for the same namespace.\n\n**Example:**\n\n\n ...\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "HardwiredNamespacePrefix", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "XPath", - "index": 5, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "RedundantTypeConversion", - "shortDescription": { - "text": "Redundant type conversion" - }, - "fullDescription": { - "text": "Reports unnecessary type conversions. Type conversions are unnecessary when the argument type of a 'string()', 'number()', or 'boolean()' function is already the same as the function's return type or if the expected expression type is 'any'. Suggests removing the unnecessary conversion.", - "markdown": "Reports unnecessary type conversions. Type conversions are unnecessary when the argument type of a `string()`, `number()`, or `boolean()` function is already the same as the function's return type or if the expected expression type is `any`. Suggests removing the unnecessary conversion." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "RedundantTypeConversion", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "XPath", - "index": 5, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "XsltTemplateInvocation", - "shortDescription": { - "text": "Incorrect template invocation" - }, - "fullDescription": { - "text": "Reports missing arguments, passing arguments that are not declared, and passing arguments for parameters more than once in named XSLT template invocations. Parameters declared with a default value are optional and will not be reported as missing.", - "markdown": "Reports missing arguments, passing arguments that are not declared, and passing arguments for parameters more than once in named XSLT template invocations.\n\n\nParameters declared with a default value are optional and will not be reported as missing." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "XsltTemplateInvocation", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "XSLT", - "index": 54, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ImplicitTypeConversion", - "shortDescription": { - "text": "Implicit type conversion" - }, - "fullDescription": { - "text": "Reports implicit conversions between the predefined XPath-types 'STRING', 'NUMBER', 'BOOLEAN', and 'NODESET'. Helps to write XSLT scripts that are more expressive about types and prevents subtle bugs: Example: '' is not the same as '' The first test checks whether the element \"foo\" exists ('count(foo) > 0)'; the latter one however is only true if the element actually contains any text ('string-length(foo) > 0'). Suggests making the type conversion more explicit. Use the following options to configure the inspection: Enable or disable implicit conversions between certain types Always report explicit conversions that do not result in the actually expected type, for example, '' Ignore conversion from 'NODESET' to 'BOOLEAN' by using the 'string()' function as a shortcut for writing 'string-length() > 0'.", - "markdown": "Reports implicit conversions between the predefined XPath-types `STRING`, `NUMBER`, `BOOLEAN`, and `NODESET`. Helps to write XSLT scripts that are more expressive about types and prevents subtle bugs:\n\n**Example:**\n\n\n \n\nis not the same as\n\n\n \n\n\nThe first test checks whether the element \"foo\" exists (`count(foo) > 0)`; the latter one however is only\ntrue if the element actually contains any text (`string-length(foo) > 0`). Suggests making\nthe type conversion more explicit.\n\n\nUse the following options to configure the inspection:\n\n* Enable or disable implicit conversions between certain types\n* Always report explicit conversions that do not result in the actually expected type, for example, ``\n* Ignore conversion from `NODESET` to `BOOLEAN` by using the `string()` function as a shortcut for writing `string-length() > 0`." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "ImplicitTypeConversion", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "XPath", - "index": 5, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "org.jetbrains.plugins.sass", - "version": "241.18034.45", - "rules": [ - { - "id": "SassScssUnresolvedMixin", - "shortDescription": { - "text": "Unresolved mixin" - }, - "fullDescription": { - "text": "Reports an unresolved Sass/SCSS mixin reference. Example: '* {\n @include unknown-mixin;\n}'", - "markdown": "Reports an unresolved [Sass/SCSS mixin](https://sass-lang.com/documentation/at-rules/mixin) reference.\n\n**Example:**\n\n\n * {\n @include unknown-mixin;\n }\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SassScssUnresolvedMixin", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Sass_SCSS", - "index": 6, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SassScssResolvedByNameOnly", - "shortDescription": { - "text": "Missing import" - }, - "fullDescription": { - "text": "Reports a reference to a variable, mixin, or function that is declared in another file but this file isn't explicitly imported in the current file. Example: '* {\n margin: $var-in-other-file;\n}'", - "markdown": "Reports a reference to a variable, mixin, or function that is declared in another file but this file isn't explicitly [imported](https://sass-lang.com/documentation/at-rules/import) in the current file.\n\n**Example:**\n\n\n * {\n margin: $var-in-other-file;\n }\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "SassScssResolvedByNameOnly", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Sass_SCSS", - "index": 6, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SassScssUnresolvedPlaceholderSelector", - "shortDescription": { - "text": "Unresolved placeholder selector" - }, - "fullDescription": { - "text": "Reports an unresolved Sass/SCSS placeholder selector reference. Example: '* {\n @extend %unknown-placeholder-selector;\n}'", - "markdown": "Reports an unresolved [Sass/SCSS placeholder selector](https://sass-lang.com/documentation/variables) reference.\n\n**Example:**\n\n\n * {\n @extend %unknown-placeholder-selector;\n }\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SassScssUnresolvedPlaceholderSelector", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Sass_SCSS", - "index": 6, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SassScssUnresolvedVariable", - "shortDescription": { - "text": "Unresolved variable" - }, - "fullDescription": { - "text": "Reports an unresolved Sass/SCSS variable reference. Example: '* {\n margin: $unknown-var;\n}'", - "markdown": "Reports an unresolved [Sass/SCSS variable](https://sass-lang.com/documentation/variables) reference.\n\n**Example:**\n\n\n * {\n margin: $unknown-var;\n }\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SassScssUnresolvedVariable", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Sass_SCSS", - "index": 6, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "com.jetbrains.sh", - "version": "241.18034.45", - "rules": [ - { - "id": "ShellCheck", - "shortDescription": { - "text": "ShellCheck" - }, - "fullDescription": { - "text": "Reports shell script bugs detected by the integrated ShellCheck static analysis tool.", - "markdown": "Reports shell script bugs detected by the integrated [ShellCheck](https://github.com/koalaman/shellcheck) static analysis tool." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "ShellCheck", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Shell script", - "index": 7, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "name.kropp.intellij.makefile", - "version": "241.18034.45", - "rules": [ - { - "id": "MakefileUnresolvedPrerequisite", - "shortDescription": { - "text": "Unresolved prerequisite" - }, - "fullDescription": { - "text": "Reports unresolved target prerequisites", - "markdown": "Reports unresolved target prerequisites" - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "MakefileUnresolvedPrerequisite", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Makefile", - "index": 9, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "com.intellij.clion", - "version": "241.18034.45", - "rules": [ - { - "id": "CMakeMismatchedCommandArguments", - "shortDescription": { - "text": "Mismatched command arguments" - }, - "fullDescription": { - "text": "Reports mismatched arguments in opening- and closing commands. Example: 'if (A)\nendif (B)'", - "markdown": "Reports mismatched arguments in opening- and closing commands.\n\n**Example:**\n\n\n if (A)\n endif (B)\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "CMakeMismatchedCommandArguments", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "CMake/General", - "index": 11, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CMakeDeprecatedCommands", - "shortDescription": { - "text": "Deprecated command used" - }, - "fullDescription": { - "text": "Reports a usage of a deprecated command.", - "markdown": "Reports a usage of a deprecated command." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "CMakeDeprecatedCommands", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "CMake/General", - "index": 11, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "OCGlobalDFAInspection", - "shortDescription": { - "text": "Interprocedural analysis" - }, - "fullDescription": { - "text": "Interprocedural summary-based static code analysis", - "markdown": "Interprocedural summary-based static code analysis" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "OCGlobalDFAInspection", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "C_C++/Data Flow Analysis", - "index": 14, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "Karma", - "version": "241.18034.45", - "rules": [ - { - "id": "KarmaConfigFile", - "shortDescription": { - "text": "Invalid Karma configuration file" - }, - "fullDescription": { - "text": "Reports a potential error in a file path ('basePath', 'files') for a Karma configuration file, for example, 'karma.conf.js'.", - "markdown": "Reports a potential error in a file path ('basePath', 'files') for a Karma configuration file, for example, `karma.conf.js`." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "KarmaConfigFile", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Unit testing", - "index": 8, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "com.intellij", - "version": "241.18034.45", - "rules": [ - { - "id": "JsonSchemaDeprecation", - "shortDescription": { - "text": "Deprecated JSON property" - }, - "fullDescription": { - "text": "Reports a deprecated property in a JSON file. Note that deprecation mechanism is not defined in the JSON Schema specification yet, and this inspection uses a non-standard extension 'deprecationMessage'.", - "markdown": "Reports a deprecated property in a JSON file. \nNote that deprecation mechanism is not defined in the JSON Schema specification yet, and this inspection uses a non-standard extension 'deprecationMessage'." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "JsonSchemaDeprecation", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "JSON and JSON5", - "index": 12, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JsonSchemaRefReference", - "shortDescription": { - "text": "Unresolved '$ref' and '$schema' references" - }, - "fullDescription": { - "text": "Reports an unresolved '$ref' or '$schema' path in a JSON schema.", - "markdown": "Reports an unresolved `$ref` or `$schema` path in a JSON schema. " - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JsonSchemaRefReference", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JSON and JSON5", - "index": 12, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HtmlUnknownBooleanAttribute", - "shortDescription": { - "text": "Incorrect boolean attribute" - }, - "fullDescription": { - "text": "Reports an HTML non-boolean attribute without a value. Suggests configuring attributes that should not be reported.", - "markdown": "Reports an HTML non-boolean attribute without a value. Suggests configuring attributes that should not be reported." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "HtmlUnknownBooleanAttribute", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "HTML", - "index": 25, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "DuplicatedCode", - "shortDescription": { - "text": "Duplicated code fragment" - }, - "fullDescription": { - "text": "Reports duplicated blocks of code from the selected scope: the same file or the entire project. The inspection features quick-fixes that help you to set the size of detected duplicates, navigate to repetitive code fragments, and compare them in a tool window. The inspection options allow you to select the scope of the reported duplicated fragments and set the initial size for the duplicated language constructs. You can also configure the constructs that you want to anonymize in File | Settings | Editor | Duplicates.", - "markdown": "Reports duplicated blocks of code from the selected scope: the same file or the entire project.\n\nThe inspection features quick-fixes that help you to set the size of detected duplicates, navigate to repetitive code fragments, and compare them in a tool window.\n\nThe inspection options allow you to select the scope of the reported duplicated fragments and set the initial size for the duplicated language constructs.\n\nYou can also configure the constructs that you want to anonymize in [File \\| Settings \\| Editor \\| Duplicates](settings://duplicates.index)." - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "DuplicatedCode", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "General", - "index": 31, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "InconsistentLineSeparators", - "shortDescription": { - "text": "Inconsistent line separators" - }, - "fullDescription": { - "text": "Reports files with line separators different from the ones that are specified in the project's settings. For example, the inspection will be triggered if you set the line separator to '\\n' in Settings | Editor | Code Style | Line separator, while the file you are editing uses '\\r\\n' as a line separator. The inspection also warns you about mixed line separators within a file.", - "markdown": "Reports files with line separators different from the ones that are specified in the project's settings.\n\nFor example, the inspection will be triggered if you set the line separator to `\\n` in\n[Settings \\| Editor \\| Code Style \\| Line separator](settings://preferences.sourceCode?Line%20separator),\nwhile the file you are editing uses `\\r\\n` as a line separator.\n\nThe inspection also warns you about mixed line separators within a file." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "InconsistentLineSeparators", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "General", - "index": 31, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "RedundantSuppression", - "shortDescription": { - "text": "Redundant suppression" - }, - "fullDescription": { - "text": "Reports usages of the following elements that can be safely removed because the inspection they affect is no longer applicable in this context: '@SuppressWarning' annotation, or '// noinspection' line comment, or '/** noinspection */' JavaDoc comment Example: 'public class C {\n // symbol is already private,\n // but annotation is still around\n @SuppressWarnings({\"WeakerAccess\"})\n private boolean CONST = true;\n void f() {\n CONST = false;\n }\n}'", - "markdown": "Reports usages of the following elements that can be safely removed because the inspection they affect is no longer applicable in this context:\n\n* `@SuppressWarning` annotation, or\n* `// noinspection` line comment, or\n* `/** noinspection */` JavaDoc comment\n\nExample:\n\n\n public class C {\n // symbol is already private,\n // but annotation is still around\n @SuppressWarnings({\"WeakerAccess\"})\n private boolean CONST = true;\n void f() {\n CONST = false;\n }\n }\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "RedundantSuppression", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "General", - "index": 31, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ProblematicWhitespace", - "shortDescription": { - "text": "Problematic whitespace" - }, - "fullDescription": { - "text": "Reports the following problems: Tabs used for indentation when the code style is configured to use only spaces. Spaces used for indentation when the code style is configured to use only tabs. Spaces used for indentation and tabs used for alignment when the code style is configured to use smart tabs.", - "markdown": "Reports the following problems:\n\n* Tabs used for indentation when the code style is configured to use only spaces.\n* Spaces used for indentation when the code style is configured to use only tabs.\n* Spaces used for indentation and tabs used for alignment when the code style is configured to use smart tabs." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "ProblematicWhitespace", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "General", - "index": 31, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HtmlUnknownTarget", - "shortDescription": { - "text": "Unresolved file in a link" - }, - "fullDescription": { - "text": "Reports an unresolved file in a link.", - "markdown": "Reports an unresolved file in a link." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "HtmlUnknownTarget", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "HTML", - "index": 25, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SSBasedInspection", - "shortDescription": { - "text": "Structural search inspection" - }, - "fullDescription": { - "text": "Allows configuring Structural Search/Structural Replace templates that you can apply to the file you are editing. All matches will be highlighted and marked with the template name that you have configured. If you configure the Structural Replace pattern as well, the corresponding replace option will be available as a quick-fix.", - "markdown": "Allows configuring **Structural Search/Structural Replace** templates that you can apply to the file you are editing.\n\nAll matches will be highlighted and marked with the template name that you have configured.\nIf you configure the **Structural Replace** pattern as well, the corresponding replace option will be available as a quick-fix." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SSBasedInspection", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Structural search", - "index": 43, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "LongLine", - "shortDescription": { - "text": "Line is longer than allowed by code style" - }, - "fullDescription": { - "text": "Reports lines that are longer than the Hard wrap at parameter specified in Settings | Editor | Code Style | General.", - "markdown": "Reports lines that are longer than the **Hard wrap at** parameter specified in [Settings \\| Editor \\| Code Style \\| General](settings://preferences.sourceCode?Hard%20wrap%20at)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "LongLine", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "General", - "index": 31, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "XmlWrongRootElement", - "shortDescription": { - "text": "Wrong root element" - }, - "fullDescription": { - "text": "Reports a root tag name different from the name specified in the '' tag.", - "markdown": "Reports a root tag name different from the name specified in the `` tag." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "XmlWrongRootElement", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "XML", - "index": 47, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CheckValidXmlInScriptTagBody", - "shortDescription": { - "text": "Malformed content of 'script' tag" - }, - "fullDescription": { - "text": "Reports contents of 'script' tags that are invalid XML. Example: '' After the quick-fix is applied: ''", - "markdown": "Reports contents of `script` tags that are invalid XML. \n\n**Example:**\n\n\n \n\nAfter the quick-fix is applied:\n\n\n \n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "CheckValidXmlInScriptTagBody", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "HTML", - "index": 25, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "RegExpSuspiciousBackref", - "shortDescription": { - "text": "Suspicious back reference" - }, - "fullDescription": { - "text": "Reports back references that will not be resolvable at runtime. This means that the back reference can never match anything. A back reference will not be resolvable when the group is defined after the back reference, or if the group is defined in a different branch of an alternation. Example of a group defined after its back reference: '\\1(abc)' Example of a group and a back reference in different branches: 'a(b)c|(xy)\\1z' New in 2022.1", - "markdown": "Reports back references that will not be resolvable at runtime. This means that the back reference can never match anything. A back reference will not be resolvable when the group is defined after the back reference, or if the group is defined in a different branch of an alternation.\n\n**Example of a group defined after its back reference:**\n\n\n \\1(abc)\n\n**Example of a group and a back reference in different branches:**\n\n\n a(b)c|(xy)\\1z\n\nNew in 2022.1" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "RegExpSuspiciousBackref", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "RegExp", - "index": 51, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "RegExpSingleCharAlternation", - "shortDescription": { - "text": "Single character alternation" - }, - "fullDescription": { - "text": "Reports single char alternation in a RegExp. It is simpler to use a character class instead. This may also provide better matching performance. Example: 'a|b|c|d' After the quick-fix is applied: '[abcd]' New in 2017.1", - "markdown": "Reports single char alternation in a RegExp. It is simpler to use a character class instead. This may also provide better matching performance.\n\n**Example:**\n\n\n a|b|c|d\n\nAfter the quick-fix is applied:\n\n\n [abcd]\n\n\nNew in 2017.1" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "RegExpSingleCharAlternation", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "RegExp", - "index": 51, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HtmlUnknownAttribute", - "shortDescription": { - "text": "Unknown attribute" - }, - "fullDescription": { - "text": "Reports an unknown HTML attribute. Suggests configuring attributes that should not be reported.", - "markdown": "Reports an unknown HTML attribute. Suggests configuring attributes that should not be reported." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "HtmlUnknownAttribute", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "HTML", - "index": 25, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CheckTagEmptyBody", - "shortDescription": { - "text": "Empty element content" - }, - "fullDescription": { - "text": "Reports XML elements without contents. Example: '\n \n ' After the quick-fix is applied: '\n \n '", - "markdown": "Reports XML elements without contents.\n\n**Example:**\n\n\n \n \n \n\nAfter the quick-fix is applied:\n\n\n \n \n \n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "CheckTagEmptyBody", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "XML", - "index": 47, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "RegExpRedundantEscape", - "shortDescription": { - "text": "Redundant character escape" - }, - "fullDescription": { - "text": "Reports redundant character escape sequences that can be replaced with unescaped characters preserving the meaning. Many escape sequences that are necessary outside of a character class are redundant inside square brackets '[]' of a character class. Although unescaped opening curly braces '{' outside of character classes are allowed in some dialects (JavaScript, Python, and so on), it can cause confusion and make the pattern less portable, because there are dialects that require escaping curly braces as characters. For this reason the inspection does not report escaped opening curly braces. Example: '\\-\\;[\\.]' After the quick-fix is applied: '-;[.]' The Ignore escaped closing brackets '}' and ']' option specifies whether to report '\\}' and '\\]' outside of a character class when they are allowed to be unescaped by the RegExp dialect. New in 2017.3", - "markdown": "Reports redundant character escape sequences that can be replaced with unescaped characters preserving the meaning. Many escape sequences that are necessary outside of a character class are redundant inside square brackets `[]` of a character class.\n\n\nAlthough unescaped opening curly braces `{` outside of character classes are allowed in some dialects (JavaScript, Python, and so on),\nit can cause confusion and make the pattern less portable, because there are dialects that require escaping curly braces as characters.\nFor this reason the inspection does not report escaped opening curly braces.\n\n**Example:**\n\n\n \\-\\;[\\.]\n\nAfter the quick-fix is applied:\n\n\n -;[.]\n\n\nThe **Ignore escaped closing brackets '}' and '\\]'** option specifies whether to report `\\}` and `\\]` outside of a character class\nwhen they are allowed to be unescaped by the RegExp dialect.\n\nNew in 2017.3" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "RegExpRedundantEscape", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "RegExp", - "index": 51, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "UnresolvedReference", - "shortDescription": { - "text": "Unresolved reference" - }, - "fullDescription": { - "text": "Reports an unresolved reference to a named pattern ('define') in RELAX-NG files that use XML syntax. Suggests creating the referenced 'define' element.", - "markdown": "Reports an unresolved reference to a named pattern (`define`) in RELAX-NG files that use XML syntax. Suggests creating the referenced `define` element." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "UnresolvedReference", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "RELAX NG", - "index": 58, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HtmlMissingClosingTag", - "shortDescription": { - "text": "Missing closing tag" - }, - "fullDescription": { - "text": "Reports an HTML element without a closing tag. Some coding styles require that HTML elements have closing tags even where this is optional. Example: '\n \n

      Behold!\n \n ' After the quick-fix is applied: '\n \n

      Behold!

      \n \n '", - "markdown": "Reports an HTML element without a closing tag. Some coding styles require that HTML elements have closing tags even where this is optional.\n\n**Example:**\n\n\n \n \n

      Behold!\n \n \n\nAfter the quick-fix is applied:\n\n\n \n \n

      Behold!

      \n \n \n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "HtmlMissingClosingTag", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "HTML", - "index": 25, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CustomRegExpInspection", - "shortDescription": { - "text": "Custom RegExp inspection" - }, - "fullDescription": { - "text": "Custom Regex Inspection", - "markdown": "Custom Regex Inspection" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "CustomRegExpInspection", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "RegExp", - "index": 51, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "IncorrectFormatting", - "shortDescription": { - "text": "Incorrect formatting" - }, - "fullDescription": { - "text": "Reports formatting issues that appear if your code doesn't follow your project's code style settings. This inspection is not compatible with languages that require third-party formatters for code formatting, for example, Go or C with CLangFormat enabled.", - "markdown": "Reports formatting issues that appear if your code doesn't\nfollow your project's code style settings.\n\n\nThis inspection is not compatible with languages that require\nthird-party formatters for code formatting, for example, Go or\nC with CLangFormat enabled." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "IncorrectFormatting", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "General", - "index": 31, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HtmlExtraClosingTag", - "shortDescription": { - "text": "Redundant closing tag" - }, - "fullDescription": { - "text": "Reports redundant closing tags on empty elements, for example, 'img' or 'br'. Example: '\n \n

      \n \n ' After the quick-fix is applied: '\n \n
      \n \n '", - "markdown": "Reports redundant closing tags on empty elements, for example, `img` or `br`.\n\n**Example:**\n\n\n \n \n

      \n \n \n\nAfter the quick-fix is applied:\n\n\n \n \n
      \n \n \n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "HtmlExtraClosingTag", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "HTML", - "index": 25, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HtmlUnknownAnchorTarget", - "shortDescription": { - "text": "Unresolved fragment in a link" - }, - "fullDescription": { - "text": "Reports an unresolved last part of an URL after the '#' sign.", - "markdown": "Reports an unresolved last part of an URL after the `#` sign." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "HtmlUnknownAnchorTarget", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "HTML", - "index": 25, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "RegExpUnexpectedAnchor", - "shortDescription": { - "text": "Begin or end anchor in unexpected position" - }, - "fullDescription": { - "text": "Reports '^' or '\\A' anchors not at the beginning of the pattern and '$', '\\Z' or '\\z' anchors not at the end of the pattern. In the wrong position these RegExp anchors prevent the pattern from matching anything. In case of the '^' and '$' anchors, most likely the literal character was meant and the escape forgotten. Example: '(Price $10)' New in 2018.1", - "markdown": "Reports `^` or `\\A` anchors not at the beginning of the pattern and `$`, `\\Z` or `\\z` anchors not at the end of the pattern. In the wrong position these RegExp anchors prevent the pattern from matching anything. In case of the `^` and `$` anchors, most likely the literal character was meant and the escape forgotten.\n\n**Example:**\n\n\n (Price $10)\n\n\nNew in 2018.1" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "RegExpUnexpectedAnchor", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "RegExp", - "index": 51, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SpellCheckingInspection", - "shortDescription": { - "text": "Typo" - }, - "fullDescription": { - "text": "Reports typos and misspellings in your code, comments, and literals and fixes them with one click.", - "markdown": "Reports typos and misspellings in your code, comments, and literals and fixes them with one click." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "SpellCheckingInspection", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "Proofreading", - "index": 68, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CheckXmlFileWithXercesValidator", - "shortDescription": { - "text": "Failed external validation" - }, - "fullDescription": { - "text": "Reports a discrepancy in an XML file with the specified DTD or schema detected by the Xerces validator.", - "markdown": "Reports a discrepancy in an XML file with the specified DTD or schema detected by the Xerces validator." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "CheckXmlFileWithXercesValidator", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "XML", - "index": 47, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HtmlUnknownTag", - "shortDescription": { - "text": "Unknown tag" - }, - "fullDescription": { - "text": "Reports an unknown HTML tag. Suggests configuring tags that should not be reported.", - "markdown": "Reports an unknown HTML tag. Suggests configuring tags that should not be reported." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "HtmlUnknownTag", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "HTML", - "index": 25, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "RegExpEscapedMetaCharacter", - "shortDescription": { - "text": "Escaped meta character" - }, - "fullDescription": { - "text": "Reports escaped meta characters. Some RegExp coding styles specify that meta characters should be placed inside a character class, to make the regular expression easier to understand. This inspection does not warn about the meta character '[', ']' and '^', because those would need additional escaping inside a character class. Example: '\\d+\\.\\d+' After the quick-fix is applied: '\\d+[.]\\d+' New in 2017.1", - "markdown": "Reports escaped meta characters. Some RegExp coding styles specify that meta characters should be placed inside a character class, to make the regular expression easier to understand. This inspection does not warn about the meta character `[`, `]` and `^`, because those would need additional escaping inside a character class.\n\n**Example:**\n\n\n \\d+\\.\\d+\n\nAfter the quick-fix is applied:\n\n\n \\d+[.]\\d+\n\nNew in 2017.1" - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "RegExpEscapedMetaCharacter", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "RegExp", - "index": 51, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "XmlHighlighting", - "shortDescription": { - "text": "XML highlighting" - }, - "fullDescription": { - "text": "Reports XML validation problems in the results of a batch code inspection.", - "markdown": "Reports XML validation problems in the results of a batch code inspection." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "XmlHighlighting", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "XML", - "index": 47, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "XmlDuplicatedId", - "shortDescription": { - "text": "Duplicate 'id' attribute" - }, - "fullDescription": { - "text": "Reports a duplicate 'id' attribute in XML.", - "markdown": "Reports a duplicate `id` attribute in XML." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "XmlDuplicatedId", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "XML", - "index": 47, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "RegExpDuplicateCharacterInClass", - "shortDescription": { - "text": "Duplicate character in character class" - }, - "fullDescription": { - "text": "Reports duplicate characters inside a RegExp character class. Duplicate characters are unnecessary and can be removed without changing the semantics of the regex. Example: '[aabc]' After the quick-fix is applied: '[abc]'", - "markdown": "Reports duplicate characters inside a RegExp character class. Duplicate characters are unnecessary and can be removed without changing the semantics of the regex.\n\n**Example:**\n\n\n [aabc]\n\nAfter the quick-fix is applied:\n\n\n [abc]\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "RegExpDuplicateCharacterInClass", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "RegExp", - "index": 51, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "XmlInvalidId", - "shortDescription": { - "text": "Unresolved 'id' reference" - }, - "fullDescription": { - "text": "Reports an unresolved 'id' reference in XML.", - "markdown": "Reports an unresolved `id` reference in XML." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "XmlInvalidId", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "XML", - "index": 47, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "XmlUnboundNsPrefix", - "shortDescription": { - "text": "Unbound namespace prefix" - }, - "fullDescription": { - "text": "Reports an unbound namespace prefix in XML.", - "markdown": "Reports an unbound namespace prefix in XML." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "XmlUnboundNsPrefix", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "XML", - "index": 47, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "RequiredAttributes", - "shortDescription": { - "text": "Missing required attribute" - }, - "fullDescription": { - "text": "Reports a missing mandatory attribute in an XML/HTML tag. Suggests configuring attributes that should not be reported.", - "markdown": "Reports a missing mandatory attribute in an XML/HTML tag. Suggests configuring attributes that should not be reported." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "RequiredAttributes", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "HTML", - "index": 25, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ReassignedToPlainText", - "shortDescription": { - "text": "Reassigned to plain text" - }, - "fullDescription": { - "text": "Reports files that were explicitly re-assigned to Plain Text File Type. This association is unnecessary because the platform auto-detects text files by content automatically. You can dismiss this warning by removing the file type association in Settings | Editor | File Types | Text.", - "markdown": "Reports files that were explicitly re-assigned to Plain Text File Type. This association is unnecessary because the platform auto-detects text files by content automatically.\n\nYou can dismiss this warning by removing the file type association\nin **Settings \\| Editor \\| File Types \\| Text**." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "ReassignedToPlainText", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "General", - "index": 31, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "XmlUnusedNamespaceDeclaration", - "shortDescription": { - "text": "Unused schema declaration" - }, - "fullDescription": { - "text": "Reports an unused namespace declaration or location hint in XML.", - "markdown": "Reports an unused namespace declaration or location hint in XML." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "XmlUnusedNamespaceDeclaration", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "XML", - "index": 47, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "RegExpRedundantClassElement", - "shortDescription": { - "text": "Redundant '\\d', '[:digit:]', or '\\D' class elements" - }, - "fullDescription": { - "text": "Reports redundant '\\d' or '[:digit:]' that are used in one class with '\\w' or '[:word:]' ('\\D' with '\\W') and can be removed. Example: '[\\w\\d]' After the quick-fix is applied: '[\\w]' New in 2022.2", - "markdown": "Reports redundant `\\d` or `[:digit:]` that are used in one class with `\\w` or `[:word:]` (`\\D` with `\\W`) and can be removed.\n\n**Example:**\n\n\n [\\w\\d]\n\nAfter the quick-fix is applied:\n\n\n [\\w]\n\nNew in 2022.2" - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "RegExpRedundantClassElement", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "RegExp", - "index": 51, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "RegExpSimplifiable", - "shortDescription": { - "text": "Regular expression can be simplified" - }, - "fullDescription": { - "text": "Reports regular expressions that can be simplified. Example: '[a] xx* [ah-hz]' After the quick-fix is applied: 'a x+ [ahz]' New in 2022.1", - "markdown": "Reports regular expressions that can be simplified.\n\n**Example:**\n\n\n [a] xx* [ah-hz]\n\nAfter the quick-fix is applied:\n\n\n a x+ [ahz]\n\nNew in 2022.1" - }, - "defaultConfiguration": { - "enabled": true, - "level": "note", - "parameters": { - "suppressToolId": "RegExpSimplifiable", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "RegExp", - "index": 51, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "RegExpEmptyAlternationBranch", - "shortDescription": { - "text": "Empty branch in alternation" - }, - "fullDescription": { - "text": "Reports empty branches in a RegExp alternation. An empty branch will only match the empty string, and in most cases that is not what is desired. This inspection will not report a single empty branch at the start or the end of an alternation. Example: '(alpha||bravo)' After the quick-fix is applied: '(alpha|bravo)' New in 2017.2", - "markdown": "Reports empty branches in a RegExp alternation. An empty branch will only match the empty string, and in most cases that is not what is desired. This inspection will not report a single empty branch at the start or the end of an alternation.\n\n**Example:**\n\n\n (alpha||bravo)\n\nAfter the quick-fix is applied:\n\n\n (alpha|bravo)\n\nNew in 2017.2" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "RegExpEmptyAlternationBranch", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "RegExp", - "index": 51, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "Annotator", - "shortDescription": { - "text": "Annotator" - }, - "fullDescription": { - "text": "Reports issues essential to this file (e.g., syntax errors) in the result of a batch code inspection run. These issues are usually always highlighted in the editor and can't be configured, unlike inspections. These options control the scope of checks performed by this inspection: Option \"Report syntax errors\": report parser-related issues. Option \"Report issues from language-specific annotators\": report issues found by annotators configured for the relevant language. See Custom Language Support: Annotators for details. Option \"Report other highlighting problems\": report issues specific to the language of the current file (e.g., type mismatches or unreported exceptions). See Custom Language Support: Highlighting for details.", - "markdown": "Reports issues essential to this file (e.g., syntax errors) in the result of a batch code inspection run. These issues are usually always highlighted in the editor and can't be configured, unlike inspections. These options control the scope of checks performed by this inspection:\n\n* Option \"**Report syntax errors**\": report parser-related issues.\n* Option \"**Report issues from language-specific annotators** \": report issues found by annotators configured for the relevant language. See [Custom Language Support: Annotators](https://plugins.jetbrains.com/docs/intellij/annotator.html) for details.\n* Option \"**Report other highlighting problems** \": report issues specific to the language of the current file (e.g., type mismatches or unreported exceptions). See [Custom Language Support: Highlighting](https://plugins.jetbrains.com/docs/intellij/syntax-highlighting-and-error-highlighting.html#semantic-highlighting) for details." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "Annotator", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "General", - "index": 31, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "XmlPathReference", - "shortDescription": { - "text": "Unresolved file reference" - }, - "fullDescription": { - "text": "Reports an unresolved file reference in XML.", - "markdown": "Reports an unresolved file reference in XML." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "XmlPathReference", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "XML", - "index": 47, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "RegExpUnnecessaryNonCapturingGroup", - "shortDescription": { - "text": "Unnecessary non-capturing group" - }, - "fullDescription": { - "text": "Reports unnecessary non-capturing groups, which have no influence on the match result. Example: 'Everybody be cool, (?:this) is a robbery!' After the quick-fix is applied: 'Everybody be cool, this is a robbery!' New in 2021.1", - "markdown": "Reports unnecessary non-capturing groups, which have no influence on the match result.\n\n**Example:**\n\n\n Everybody be cool, (?:this) is a robbery!\n\nAfter the quick-fix is applied:\n\n\n Everybody be cool, this is a robbery!\n\nNew in 2021.1" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "RegExpUnnecessaryNonCapturingGroup", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "RegExp", - "index": 51, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "TodoComment", - "shortDescription": { - "text": "TODO comment" - }, - "fullDescription": { - "text": "Reports TODO comments in your code. You can configure the format for TODO comments in Settings | Editor | TODO. Enable the Only warn on TODO comments without any details option to only warn on empty TODO comments, that don't provide any description on the task that should be done. Disable to report all TODO comments.", - "markdown": "Reports **TODO** comments in your code.\n\nYou can configure the format for **TODO** comments in [Settings \\| Editor \\| TODO](settings://preferences.toDoOptions).\n\nEnable the **Only warn on TODO comments without any details** option to only warn on empty TODO comments, that\ndon't provide any description on the task that should be done. Disable to report all TODO comments." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "TodoComment", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "General", - "index": 31, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "Json5StandardCompliance", - "shortDescription": { - "text": "Compliance with JSON5 standard" - }, - "fullDescription": { - "text": "Reports inconsistency with the language specification in a JSON5 file.", - "markdown": "Reports inconsistency with [the language specification](http://json5.org) in a JSON5 file." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "Json5StandardCompliance", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "JSON and JSON5", - "index": 12, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JsonDuplicatePropertyKeys", - "shortDescription": { - "text": "Duplicate keys in object literals" - }, - "fullDescription": { - "text": "Reports a duplicate key in an object literal.", - "markdown": "Reports a duplicate key in an object literal." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JsonDuplicatePropertyKeys", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JSON and JSON5", - "index": 12, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "XmlDeprecatedElement", - "shortDescription": { - "text": "Deprecated symbol" - }, - "fullDescription": { - "text": "Reports a deprecated XML element or attribute. Symbols can be marked by XML comment or documentation tag with text 'deprecated'.", - "markdown": "Reports a deprecated XML element or attribute.\n\nSymbols can be marked by XML comment or documentation tag with text 'deprecated'." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "XmlDeprecatedElement", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "XML", - "index": 47, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "RegExpRedundantNestedCharacterClass", - "shortDescription": { - "text": "Redundant nested character class" - }, - "fullDescription": { - "text": "Reports unnecessary nested character classes. Example: '[a-c[x-z]]' After the quick-fix is applied: '[a-cx-z]' New in 2020.2", - "markdown": "Reports unnecessary nested character classes.\n\n**Example:**\n\n\n [a-c[x-z]]\n\nAfter the quick-fix is applied:\n\n\n [a-cx-z]\n\nNew in 2020.2" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "RegExpRedundantNestedCharacterClass", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "RegExp", - "index": 51, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HtmlWrongAttributeValue", - "shortDescription": { - "text": "Wrong attribute value" - }, - "fullDescription": { - "text": "Reports an incorrect HTML attribute value.", - "markdown": "Reports an incorrect HTML attribute value." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "HtmlWrongAttributeValue", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "HTML", - "index": 25, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "XmlDefaultAttributeValue", - "shortDescription": { - "text": "Redundant attribute with default value" - }, - "fullDescription": { - "text": "Reports a redundant assignment of the default value to an XML attribute.", - "markdown": "Reports a redundant assignment of the default value to an XML attribute." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "XmlDefaultAttributeValue", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "XML", - "index": 47, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "RegExpOctalEscape", - "shortDescription": { - "text": "Octal escape" - }, - "fullDescription": { - "text": "Reports octal escapes, which are easily confused with back references. Use hexadecimal escapes to avoid confusion. Example: '\\07' After the quick-fix is applied: '\\x07' New in 2017.1", - "markdown": "Reports octal escapes, which are easily confused with back references. Use hexadecimal escapes to avoid confusion.\n\n**Example:**\n\n\n \\07\n\nAfter the quick-fix is applied:\n\n\n \\x07\n\nNew in 2017.1" - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "RegExpOctalEscape", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "RegExp", - "index": 51, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "UnusedDefine", - "shortDescription": { - "text": "Unused define" - }, - "fullDescription": { - "text": "Reports an unused named pattern ('define') in a RELAX-NG file (XML or Compact Syntax). 'define' elements that are used through an include in another file are ignored.", - "markdown": "Reports an unused named pattern (`define`) in a RELAX-NG file (XML or Compact Syntax). `define` elements that are used through an include in another file are ignored." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "UnusedDefine", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "RELAX NG", - "index": 58, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JsonSchemaCompliance", - "shortDescription": { - "text": "Compliance with JSON schema" - }, - "fullDescription": { - "text": "Reports inconsistence between a JSON file and the JSON schema that is assigned to it.", - "markdown": "Reports inconsistence between a JSON file and the [JSON schema](https://json-schema.org) that is assigned to it. " - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JsonSchemaCompliance", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JSON and JSON5", - "index": 12, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "EmptyDirectory", - "shortDescription": { - "text": "Empty directory" - }, - "fullDescription": { - "text": "Reports empty directories. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor. Use the Only report empty directories located under a source folder option to have only directories under source roots reported.", - "markdown": "Reports empty directories.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor.\n\nUse the **Only report empty directories located under a source folder** option to have only directories under source\nroots reported." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "EmptyDirectory", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "General", - "index": 31, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "RegExpAnonymousGroup", - "shortDescription": { - "text": "Anonymous capturing group or numeric back reference" - }, - "fullDescription": { - "text": "Reports anonymous capturing groups and numeric back references in a RegExp. These are only reported when the RegExp dialect supports named group and named group references. Named groups and named back references improve code readability and are recommended to use instead. When a capture is not needed, matching can be more performant and use less memory by using a non-capturing group, i.e. '(?:xxx)' instead of '(xxx)'. Example: '(\\d\\d\\d\\d)\\1' A better regex pattern could look like this: '(?\\d\\d\\d\\d)\\k' New in 2017.2", - "markdown": "Reports anonymous capturing groups and numeric back references in a RegExp. These are only reported when the RegExp dialect supports named group and named group references. Named groups and named back references improve code readability and are recommended to use instead. When a capture is not needed, matching can be more performant and use less memory by using a non-capturing group, i.e. `(?:xxx)` instead of `(xxx)`.\n\n**Example:**\n\n\n (\\d\\d\\d\\d)\\1\n\nA better regex pattern could look like this:\n\n\n (?\\d\\d\\d\\d)\\k\n\nNew in 2017.2" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "RegExpAnonymousGroup", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "RegExp", - "index": 51, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CheckDtdRefs", - "shortDescription": { - "text": "Unresolved DTD reference" - }, - "fullDescription": { - "text": "Reports inconsistency in a DTD-specific reference, for example, in a reference to an XML entity or to a DTD element declaration. Works in DTD an XML files.", - "markdown": "Reports inconsistency in a DTD-specific reference, for example, in a reference to an XML entity or to a DTD element declaration. Works in DTD an XML files." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "CheckDtdRefs", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "XML", - "index": 47, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "NonAsciiCharacters", - "shortDescription": { - "text": "Non-ASCII characters" - }, - "fullDescription": { - "text": "Reports code elements that use non-ASCII symbols in an unusual context. Example: Non-ASCII characters used in identifiers, strings, or comments. Identifiers written in different languages, such as 'myСollection' with the letter 'C' written in Cyrillic. Comments or strings containing Unicode symbols, such as long dashes and arrows.", - "markdown": "Reports code elements that use non-ASCII symbols in an unusual context.\n\nExample:\n\n* Non-ASCII characters used in identifiers, strings, or comments.\n* Identifiers written in different languages, such as `my`**С**`ollection` with the letter **C** written in Cyrillic.\n* Comments or strings containing Unicode symbols, such as long dashes and arrows." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "NonAsciiCharacters", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Internationalization", - "index": 79, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "XmlUnresolvedReference", - "shortDescription": { - "text": "Unresolved references" - }, - "fullDescription": { - "text": "Reports an unresolved references in XML.", - "markdown": "Reports an unresolved references in XML." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "XmlUnresolvedReference", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "XML", - "index": 47, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "LossyEncoding", - "shortDescription": { - "text": "Lossy encoding" - }, - "fullDescription": { - "text": "Reports characters that cannot be displayed because of the current document encoding. Examples: If you type international characters in a document with the US-ASCII charset, some characters will be lost on save. If you load a UTF-8-encoded file using the ISO-8859-1 one-byte charset, some characters will be displayed incorrectly. You can fix this by changing the file encoding either by specifying the encoding directly in the file, e.g. by editing 'encoding=' attribute in the XML prolog of XML file, or by changing the corresponding options in Settings | Editor | File Encodings.", - "markdown": "Reports characters that cannot be displayed because of the current document encoding.\n\nExamples:\n\n* If you type international characters in a document with the **US-ASCII** charset, some characters will be lost on save.\n* If you load a **UTF-8** -encoded file using the **ISO-8859-1** one-byte charset, some characters will be displayed incorrectly.\n\nYou can fix this by changing the file encoding\neither by specifying the encoding directly in the file, e.g. by editing `encoding=` attribute in the XML prolog of XML file,\nor by changing the corresponding options in **Settings \\| Editor \\| File Encodings**." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "LossyEncoding", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Internationalization", - "index": 79, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "RegExpRepeatedSpace", - "shortDescription": { - "text": "Consecutive spaces" - }, - "fullDescription": { - "text": "Reports multiple consecutive spaces in a RegExp. Because spaces are not visible by default, it can be hard to see how many spaces are required. The RegExp can be made more clear by replacing the consecutive spaces with a single space and a counted quantifier. Example: '( )' After the quick-fix is applied: '( {5})' New in 2017.1", - "markdown": "Reports multiple consecutive spaces in a RegExp. Because spaces are not visible by default, it can be hard to see how many spaces are required. The RegExp can be made more clear by replacing the consecutive spaces with a single space and a counted quantifier.\n\n**Example:**\n\n\n ( )\n\nAfter the quick-fix is applied:\n\n\n ( {5})\n\n\nNew in 2017.1" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "RegExpRepeatedSpace", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "RegExp", - "index": 51, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "RegExpDuplicateAlternationBranch", - "shortDescription": { - "text": "Duplicate branch in alternation" - }, - "fullDescription": { - "text": "Reports duplicate branches in a RegExp alternation. Duplicate branches slow down matching and obscure the intent of the expression. Example: '(alpha|bravo|charlie|alpha)' After the quick-fix is applied: '(alpha|bravo|charlie)' New in 2017.1", - "markdown": "Reports duplicate branches in a RegExp alternation. Duplicate branches slow down matching and obscure the intent of the expression.\n\n**Example:**\n\n\n (alpha|bravo|charlie|alpha)\n\nAfter the quick-fix is applied:\n\n\n (alpha|bravo|charlie)\n\nNew in 2017.1" - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "RegExpDuplicateAlternationBranch", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "RegExp", - "index": 51, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "IgnoreFileDuplicateEntry", - "shortDescription": { - "text": "Ignore file duplicates" - }, - "fullDescription": { - "text": "Reports duplicate entries (patterns) in the ignore file (e.g. .gitignore, .hgignore). Duplicate entries in these files are redundant and can be removed. Example: '# Output directories\n /out/\n /target/\n /out/'", - "markdown": "Reports duplicate entries (patterns) in the ignore file (e.g. .gitignore, .hgignore). Duplicate entries in these files are redundant and can be removed.\n\nExample:\n\n\n # Output directories\n /out/\n /target/\n /out/\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "IgnoreFileDuplicateEntry", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Version control", - "index": 81, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JsonStandardCompliance", - "shortDescription": { - "text": "Compliance with JSON standard" - }, - "fullDescription": { - "text": "Reports the following discrepancies of a JSON file with the language specification: A line or block comment (configurable). Multiple top-level values (expect for JSON Lines files, configurable for others). A trailing comma in an object or array (configurable). A single quoted string. A property key is a not a double quoted strings. A NaN or Infinity/-Infinity numeric value as a floating point literal (configurable).", - "markdown": "Reports the following discrepancies of a JSON file with [the language specification](https://tools.ietf.org/html/rfc7159):\n\n* A line or block comment (configurable).\n* Multiple top-level values (expect for JSON Lines files, configurable for others).\n* A trailing comma in an object or array (configurable).\n* A single quoted string.\n* A property key is a not a double quoted strings.\n* A NaN or Infinity/-Infinity numeric value as a floating point literal (configurable)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "JsonStandardCompliance", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "JSON and JSON5", - "index": 12, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CheckEmptyScriptTag", - "shortDescription": { - "text": "Empty tag" - }, - "fullDescription": { - "text": "Reports empty tags that do not work in some browsers. Example: '\n \n '", - "markdown": "Reports empty tags that do not work in some browsers.\n\n**Example:**\n\n\n \n \n \n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "CheckEmptyScriptTag", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "HTML", - "index": 25, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "com.intellij.database", - "version": "241.18034.45", - "rules": [ - { - "id": "MongoJSSideEffectsInspection", - "shortDescription": { - "text": "Statement with side effects" - }, - "fullDescription": { - "text": "Reports statements that can cause side effects while the data source is in read-only mode. For more information about enabling read-only mode, see Enable read-only mode for a connection in the IDE documentation. The Disable read-only mode quick-fix turns off the read-only mode for the respective data source. Example: 'db.my_collection.insertOne()'", - "markdown": "Reports statements that can cause side effects while the data source is in read-only mode.\n\nFor more information about enabling read-only mode, see\n[Enable\nread-only mode for a connection in the IDE documentation](https://www.jetbrains.com/help/datagrip/configuring-database-connections.html#enable-read-only-mode-for-a-connection).\n\nThe **Disable read-only mode** quick-fix turns off the read-only mode for the respective data source.\n\nExample:\n\n\n db.my_collection.insertOne()\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "MongoJSSideEffects", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "MongoJS", - "index": 15, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "MysqlLoadDataPathInspection", - "shortDescription": { - "text": "LOAD statement path" - }, - "fullDescription": { - "text": "Reports paths that start with the tilde character in LOAD statements. Example (MySQL): 'CREATE TABLE table_name (id int);\nLOAD DATA LOCAL INFILE '~/Documents/some_file.txt'\nINTO TABLE table_name FIELDS TERMINATED BY ',' LINES TERMINATED BY '\\n'\nIGNORE 1 LINES;' Instead of the tilde character, use a full path to the file.", - "markdown": "Reports paths that start with the tilde character in LOAD statements.\n\nExample (MySQL):\n\n CREATE TABLE table_name (id int);\n LOAD DATA LOCAL INFILE '~/Documents/some_file.txt'\n INTO TABLE table_name FIELDS TERMINATED BY ',' LINES TERMINATED BY '\\n'\n IGNORE 1 LINES;\n\nInstead of the tilde character, use a full path to the file." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "MysqlLoadDataPath", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "MySQL", - "index": 18, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "MongoJSExtSideEffectsInspection", - "shortDescription": { - "text": "Statement with side effects" - }, - "fullDescription": { - "text": "Reports statements that may cause side effects while the data source is in read-only mode. The quick-fix turns off the read-only mode for the respective data source. Example: 'db.my_collection.insertOne()'", - "markdown": "Reports statements that may cause side effects while the data source is in read-only mode.\n\nThe quick-fix turns off the read-only mode for the respective data source.\n\nExample:\n\n\n db.my_collection.insertOne()\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "MongoJSSideEffects", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "MongoJS", - "index": 15, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "MysqlSpaceAfterFunctionNameInspection", - "shortDescription": { - "text": "Whitespace between the function name and the open parenthesis" - }, - "fullDescription": { - "text": "Reports any whitespace in a function call between the function name and the open parenthesis, which is not supported by default. Example (MySQL): 'SELECT MAX (qty) FROM orders;'", - "markdown": "Reports any whitespace in a function call between the function name and the open parenthesis, which is not supported by default.\n\nExample (MySQL):\n\n SELECT MAX (qty) FROM orders;\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "MysqlSpaceAfterFunctionName", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "MySQL", - "index": 18, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlMissingReturnInspection", - "shortDescription": { - "text": "Missing return statement" - }, - "fullDescription": { - "text": "Reports functions that have no RETURN statements. Example (Oracle): 'CREATE FUNCTION foo RETURN int AS\nBEGIN\nEND;' The 'foo' function must return the integer value but the function body returns nothing. To fix the error, add a RETURN statement (for example, 'return 1;'). 'CREATE FUNCTION foo RETURN int AS\nBEGIN\n RETURN 1;\nEND;'", - "markdown": "Reports functions that have no RETURN statements.\n\nExample (Oracle):\n\n CREATE FUNCTION foo RETURN int AS\n BEGIN\n END;\n\nThe `foo` function must return the integer value but the function body returns nothing. To fix the error,\nadd a RETURN statement (for example, `return 1;`).\n\n CREATE FUNCTION foo RETURN int AS\n BEGIN\n RETURN 1;\n END;\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "SqlMissingReturn", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlUnusedSubqueryItemInspection", - "shortDescription": { - "text": "Unused subquery item" - }, - "fullDescription": { - "text": "Reports columns, aliases, and other subquery items that are not referenced in the outer query expression. Example (PostgreSQL): 'CREATE TABLE for_subquery(id INT);\nSELECT a, q FROM (SELECT 1 AS a, 10 AS b, 2 + 3 AS q, id\n FROM for_subquery) x;' We reference 'a' and 'q' aliases from a subquery. But the 'b' alias and the 'id' column are not referenced in the outer SELECT statement. Therefore, 'b' and 'id' are grayed out.", - "markdown": "Reports columns, aliases, and other subquery items that are not referenced in the outer query expression.\n\nExample (PostgreSQL):\n\n CREATE TABLE for_subquery(id INT);\n SELECT a, q FROM (SELECT 1 AS a, 10 AS b, 2 + 3 AS q, id\n FROM for_subquery) x;\n\nWe reference `a` and `q` aliases from a subquery. But the `b` alias and the `id` column are\nnot referenced in the outer SELECT statement. Therefore, `b` and `id` are grayed out." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlUnused", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlCaseVsIfInspection", - "shortDescription": { - "text": "Using CASE instead of conditional function and vice versa" - }, - "fullDescription": { - "text": "Reports situations when CASE and IF are interchangeable. Example (MySQL): 'SELECT CASE\nWHEN C1 IS NULL THEN 1\nELSE 0\nEND\nFROM dual;' To keep your code short, you can replace the CASE structure with IF. You can do that by applying the Replace with 'IF' call intention action. The example code will look as follows: 'SELECT IF(C1 IS NULL, 1, 0)\nFROM dual;' To revert IF to CASE, click IF and apply the Replace with CASE expression intention action.", - "markdown": "Reports situations when CASE and IF are interchangeable.\n\nExample (MySQL):\n\n SELECT CASE\n WHEN C1 IS NULL THEN 1\n ELSE 0\n END\n FROM dual;\n\nTo keep your code short, you can replace the CASE structure with IF. You can do that by applying the **Replace with 'IF' call**\nintention action. The example code will look as follows:\n\n SELECT IF(C1 IS NULL, 1, 0)\n FROM dual;\n\nTo revert IF to CASE, click IF and apply the **Replace with CASE expression** intention action." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlCaseVsIf", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlShouldBeInGroupByInspection", - "shortDescription": { - "text": "Column should be in group by clause" - }, - "fullDescription": { - "text": "Reports columns that are not in the GROUP BY clause or inside an aggregate function call. Example (Microsoft SQL Server): 'CREATE TABLE t1 (a INT, b INT);\nSELECT a, b FROM t1 GROUP BY a;' If you run the SELECT query, you will receive an error because Microsoft SQL Server expects the 'b' column in GROUP BY or used inside an aggregate function. The following two examples will fix the error. 'SELECT a, b FROM t1 GROUP BY a, b;\nSELECT a, max(b) max_b FROM t1 GROUP BY a;'", - "markdown": "Reports columns that are not in the GROUP BY clause or inside an aggregate function call.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE t1 (a INT, b INT);\n SELECT a, b FROM t1 GROUP BY a;\n\nIf you run the SELECT query, you will receive an error because Microsoft SQL Server expects the `b` column in GROUP BY or used\ninside an aggregate function. The following two examples will fix the error.\n\n SELECT a, b FROM t1 GROUP BY a, b;\n SELECT a, max(b) max_b FROM t1 GROUP BY a;\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlShouldBeInGroupBy", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlAutoIncrementDuplicateInspection", - "shortDescription": { - "text": "Auto-increment duplicate" - }, - "fullDescription": { - "text": "Reports tables that contain two columns with an automatic increment. In MySQL, Microsoft SQL Server, and Db2 dialects, a table can have only one field with a auto-increment option, and this field must be a key. Example (MySQL): 'CREATE TABLE my_table\n(\n id INT AUTO_INCREMENT,\n c2 INT AUTO_INCREMENT,\n);' The AUTO_INCREMENT constraint for 'c2' will be highlighted as 'c1' already has this constraint. To fix the warning, you can make 'id' a primary key and delete AUTO_INCREMENT for 'c2'. 'CREATE TABLE my_table\n(\n id INT AUTO_INCREMENT PRIMARY KEY,\n c2 INT,\n);'", - "markdown": "Reports tables that contain two columns with an automatic increment. In MySQL, Microsoft SQL Server, and Db2 dialects, a table can have only one field with a auto-increment option, and this field must be a key.\n\nExample (MySQL):\n\n CREATE TABLE my_table\n (\n id INT AUTO_INCREMENT,\n c2 INT AUTO_INCREMENT,\n );\n\nThe AUTO_INCREMENT constraint for `c2` will be highlighted as `c1` already has this constraint. To fix the warning,\nyou can make `id` a primary key and delete AUTO_INCREMENT for `c2`.\n\n CREATE TABLE my_table\n (\n id INT AUTO_INCREMENT PRIMARY KEY,\n c2 INT,\n );\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlAutoIncrementDuplicate", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlStringLengthExceededInspection", - "shortDescription": { - "text": "Implicit string truncation" - }, - "fullDescription": { - "text": "Reports variables that exceed the defined length in characters. Example (Microsoft SQL Server): 'CREATE PROCEDURE test() AS\nBEGIN\nDECLARE myVarOk VARCHAR(5) = 'abcde';\nDECLARE myVarExceeded VARCHAR(5) = 'abcde12345';\n\nSET myVarOk = 'xyz';\nSET myVarExceeded = '123456789';\nEND;' The 'myVarExceeded' variable is defined as 'VARCHAR(5)' but both assigned values (''abcde12345'' and ''123456789'') exceed this limitation. You can truncate assigned values or increase the defined length. To increase the length, use the Increase type length quick-fix. After the quick-fix is applied: 'CREATE PROCEDURE test() AS\nBEGIN\nDECLARE myVarOk VARCHAR(5) = 'abcde';\nDECLARE myVarExceeded VARCHAR(10) = 'abcde12345';\n\nSET myVarOk = 'xyz';\nSET myVarExceeded = '123456789';\nEND;'", - "markdown": "Reports variables that exceed the defined length in characters.\n\nExample (Microsoft SQL Server):\n\n CREATE PROCEDURE test() AS\n BEGIN\n DECLARE myVarOk VARCHAR(5) = 'abcde';\n DECLARE myVarExceeded VARCHAR(5) = 'abcde12345';\n\n SET myVarOk = 'xyz';\n SET myVarExceeded = '123456789';\n END;\n\nThe `myVarExceeded` variable is defined as `VARCHAR(5)` but both assigned values (`'abcde12345'` and\n`'123456789'`) exceed this limitation. You can truncate assigned values or increase the defined length.\nTo increase the length, use the **Increase type length** quick-fix.\n\nAfter the quick-fix is applied:\n\n CREATE PROCEDURE test() AS\n BEGIN\n DECLARE myVarOk VARCHAR(5) = 'abcde';\n DECLARE myVarExceeded VARCHAR(10) = 'abcde12345';\n\n SET myVarOk = 'xyz';\n SET myVarExceeded = '123456789';\n END;\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlStringLengthExceeded", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlSideEffectsInspection", - "shortDescription": { - "text": "Statement with side effects" - }, - "fullDescription": { - "text": "Reports statements that might lead to modification of a database during a read-only connection. To enable read-only mode for a connection, right-click a data source in the Database tool window (View | Tool Windows | Database) and select Properties. In the Data Sources and Drivers dialog, click the Options tab and select the Read-only checkbox. Example (MySQL): 'CREATE TABLE foo(a INT);\nINSERT INTO foo VALUES (1);' As 'CREATE TABLE' and 'INSERT INTO' statements lead to a database modification, these statements will be highlighted in read-only connection mode.", - "markdown": "Reports statements that might lead to modification of a database during a read-only connection.\n\nTo enable read-only mode for a\nconnection,\nright-click a data source in the **Database** tool window (**View \\| Tool Windows \\| Database** ) and select **Properties** .\nIn the **Data Sources and Drivers** dialog, click the **Options** tab and select the **Read-only** checkbox.\n\nExample (MySQL):\n\n CREATE TABLE foo(a INT);\n INSERT INTO foo VALUES (1);\n\nAs `CREATE TABLE` and `INSERT INTO` statements lead to a database modification, these statements will be highlighted\nin read-only connection mode." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlSideEffects", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlDtInspection", - "shortDescription": { - "text": "Ill-formed date/time literals" - }, - "fullDescription": { - "text": "Reports errors in date and time literals. This inspection is available in MySQL, Oracle, Db2, and H2. Example (MySQL): 'SELECT TIME '10 -12:13:14' FROM dual;\nSELECT TIME ' 12 : 13 : 14 ' FROM dual;\nSELECT TIME '12 13 14' FROM dual;\nSELECT TIME '12-13-14' FROM dual;\nSELECT TIME '12.13.14' FROM dual;\nSELECT TIME '12:13:' FROM dual;\nSELECT TIME '12:13' FROM dual;\nSELECT TIME '12:' FROM dual;' In this example, dates ignore the MySQL standard for date and time literals. Therefore, they will be highlighted. For more information about date and time literals in MySQL, see Date and Time Literals at dev.mysql.com. The following date and type literals are valid for MySQL. 'SELECT TIME '12:13:14' FROM dual;\nSELECT TIME '12:13:14.555' FROM dual;\nSELECT TIME '12:13:14.' FROM dual;\nSELECT TIME '-12:13:14' FROM dual;\nSELECT TIME '10 12:13:14' FROM dual;\nSELECT TIME '-10 12:13:14' FROM dual;'", - "markdown": "Reports errors in date and time literals. This inspection is available in MySQL, Oracle, Db2, and H2.\n\nExample (MySQL):\n\n SELECT TIME '10 -12:13:14' FROM dual;\n SELECT TIME ' 12 : 13 : 14 ' FROM dual;\n SELECT TIME '12 13 14' FROM dual;\n SELECT TIME '12-13-14' FROM dual;\n SELECT TIME '12.13.14' FROM dual;\n SELECT TIME '12:13:' FROM dual;\n SELECT TIME '12:13' FROM dual;\n SELECT TIME '12:' FROM dual;\n\nIn this example, dates ignore the MySQL standard for date and time literals. Therefore, they will be highlighted.\nFor more information about date and time literals in MySQL, see [Date and Time Literals at dev.mysql.com](https://dev.mysql.com/doc/refman/8.0/en/date-and-time-literals.html).\n\nThe following date and type literals are valid for MySQL.\n\n SELECT TIME '12:13:14' FROM dual;\n SELECT TIME '12:13:14.555' FROM dual;\n SELECT TIME '12:13:14.' FROM dual;\n SELECT TIME '-12:13:14' FROM dual;\n SELECT TIME '10 12:13:14' FROM dual;\n SELECT TIME '-10 12:13:14' FROM dual;\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlDateTime", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlIllegalCursorStateInspection", - "shortDescription": { - "text": "Illegal cursor state" - }, - "fullDescription": { - "text": "Reports illegal cursor states inside SQL routines. A routine has CLOSE or FETCH statements but a cursor might be closed. A routine has the OPEN statement but a cursor might be opened. Example (Microsoft SQL Server): 'CREATE TABLE t(col INT);\n\nCREATE PROCEDURE foo() AS\nBEGIN\nDECLARE my_cursor CURSOR FOR SELECT * FROM t;\nDECLARE a INT;\nFETCH my_cursor INTO a;\nCLOSE my_cursor;\nEND;' According to CLOSE (Transact-SQL) at docs.microsoft.com, CLOSE must be issued on an open cursor, and CLOSE is not allowed on cursors that have only been declared or are already closed. So, we need to open the cursor to fix the warning. 'CREATE PROCEDURE foo() AS\nBEGIN\nDECLARE my_cursor CURSOR FOR SELECT * FROM t;\nDECLARE a INT;\nOPEN my_cursor;\nFETCH my_cursor INTO a;\nCLOSE my_cursor;\nEND;'", - "markdown": "Reports illegal cursor states inside SQL routines.\n\n* A routine has CLOSE or FETCH statements but a cursor might be closed.\n* A routine has the OPEN statement but a cursor might be opened.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE t(col INT);\n\n CREATE PROCEDURE foo() AS\n BEGIN\n DECLARE my_cursor CURSOR FOR SELECT * FROM t;\n DECLARE a INT;\n FETCH my_cursor INTO a;\n CLOSE my_cursor;\n END;\n\nAccording to [CLOSE (Transact-SQL) at\ndocs.microsoft.com](https://docs.microsoft.com/en-us/sql/t-sql/language-elements/close-transact-sql), CLOSE must be issued on an open cursor, and CLOSE is not allowed on cursors that have only been declared or are\nalready closed. So, we need to open the cursor to fix the warning.\n\n CREATE PROCEDURE foo() AS\n BEGIN\n DECLARE my_cursor CURSOR FOR SELECT * FROM t;\n DECLARE a INT;\n OPEN my_cursor;\n FETCH my_cursor INTO a;\n CLOSE my_cursor;\n END;\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlIllegalCursorState", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlJoinWithoutOnInspection", - "shortDescription": { - "text": "Unsafe 'join' clause in 'delete' statement" - }, - "fullDescription": { - "text": "Reports missing conditional checks for statements that might modify the whole database. For example, usages of JOIN clauses inside DELETE statements without ON or WHERE. Without conditional checks on JOIN, DELETE drops contents of the entire table. Example (MySQL): 'CREATE TABLE foo (a INT,b INT,c INT);\nCREATE TABLE bar (a INT,b INT,c INT);\n\nDELETE table1 FROM foo table1 INNER JOIN bar table2;'", - "markdown": "Reports missing conditional checks for statements that might modify the whole database.\n\nFor example, usages of JOIN clauses inside DELETE statements without ON or WHERE. Without conditional checks on JOIN, DELETE drops\ncontents of the entire table.\n\nExample (MySQL):\n\n CREATE TABLE foo (a INT,b INT,c INT);\n CREATE TABLE bar (a INT,b INT,c INT);\n\n DELETE table1 FROM foo table1 INNER JOIN bar table2;\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlJoinWithoutOn", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlDropIndexedColumnInspection", - "shortDescription": { - "text": "Index is dependent on column" - }, - "fullDescription": { - "text": "Reports cases when you try to drop columns from indexed tables. This inspection is available in Microsoft SQL Server and Sybase ASE. Example (Microsoft SQL Server): 'CREATE TABLE test_index\n(\ncol INT NOT NULL,\ncol2 INT NOT NULL,\ncol3 INT NOT NULL UNIQUE,\ncol4 VARCHAR(200)\n);\n\nCREATE UNIQUE INDEX aaaa ON test_index (col, col2);\n\nALTER TABLE test_index\nDROP COLUMN col;' You cannot delete the 'col' column because it is in the indexed table. To delete the column, you need to delete the 'aaaa' index first (for example, DROP INDEX aaaa).", - "markdown": "Reports cases when you try to drop columns from indexed tables. This inspection is available in Microsoft SQL Server and Sybase ASE.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE test_index\n (\n col INT NOT NULL,\n col2 INT NOT NULL,\n col3 INT NOT NULL UNIQUE,\n col4 VARCHAR(200)\n );\n\n CREATE UNIQUE INDEX aaaa ON test_index (col, col2);\n\n ALTER TABLE test_index\n DROP COLUMN col;\n\nYou cannot delete the `col` column because it is in the indexed table. To delete the column, you need to delete the\n`aaaa` index first (for example, DROP INDEX aaaa)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlDropIndexedColumn", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlCheckUsingColumnsInspection", - "shortDescription": { - "text": "Check using clause columns" - }, - "fullDescription": { - "text": "Reports columns in the USING clause that does not exist in both tables. Example (MySQL): 'CREATE TABLE t1 (i INT, j INT);\nCREATE TABLE t2 (k INT, l INT);\nSELECT * FROM t1 JOIN t2 USING (j);' In USING clauses, a column name must be present in both tables, and the SELECT query will automatically join those tables by using the given column name. As we do not have the 'j' column in 't2', we can rewrite the query using ON. The ON clause can join tables where the column names do not match in both tables. 'SELECT * FROM t1 JOIN t2 ON t1.j = t2.l;'", - "markdown": "Reports columns in the USING clause that does not exist in both tables.\n\nExample (MySQL):\n\n CREATE TABLE t1 (i INT, j INT);\n CREATE TABLE t2 (k INT, l INT);\n SELECT * FROM t1 JOIN t2 USING (j);\n\nIn USING clauses, a column name must be present in both tables, and the SELECT query will automatically join\nthose tables by using the given column name. As we do not have the `j` column in `t2`, we can\nrewrite the query using ON. The ON clause can join tables where the column names do not match in both tables.\n\n SELECT * FROM t1 JOIN t2 ON t1.j = t2.l;\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlCheckUsingColumns", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlInsertValuesInspection", - "shortDescription": { - "text": "VALUES clause cardinality" - }, - "fullDescription": { - "text": "Reports situations when a number of parameters in VALUES does not match a number of columns in a target table. Example (MySQL): 'CREATE TABLE foo(a INT, b INT, c INT);\n\nINSERT INTO foo VALUES (1,2,3,4)' The 'foo' table has three columns but in the INSERT INTO statement we pass four.", - "markdown": "Reports situations when a number of parameters in VALUES does not match a number of columns in a target table.\n\nExample (MySQL):\n\n CREATE TABLE foo(a INT, b INT, c INT);\n\n INSERT INTO foo VALUES (1,2,3,4)\n\nThe `foo` table has three columns but in the INSERT INTO statement we pass four." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlInsertValues", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlConstantConditionInspection", - "shortDescription": { - "text": "Constant condition" - }, - "fullDescription": { - "text": "Reports conditions in WHERE or JOIN clauses that are always TRUE or always FALSE. Example (MySQL): 'CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\nSELECT a FROM t1 WHERE 'Cat' = 'Cat';' The ''Cat' = 'Cat'' is always true and will be reported.", - "markdown": "Reports conditions in WHERE or JOIN clauses that are always TRUE or always FALSE.\n\nExample (MySQL):\n\n CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\n SELECT a FROM t1 WHERE 'Cat' = 'Cat';\n\nThe `'Cat' = 'Cat'` is always true and will be reported." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlConstantCondition", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlDialectInspection", - "shortDescription": { - "text": "SQL dialect detection" - }, - "fullDescription": { - "text": "Reports situations when a dialect is not assigned to an SQL file. For example, when you open a new SQL file without assigning a dialect to it, you see a notification where the best matching dialect is advised. Click the Use link to use the advised dialect. Alternatively, click the Change dialect to link to select the other dialect.", - "markdown": "Reports situations when a dialect is not assigned to an SQL file.\n\nFor example, when you open a new SQL file without assigning a dialect\nto it, you see a notification where the best matching dialect is advised. Click the **Use \\** link to use the advised\ndialect. Alternatively, click the **Change dialect to** link to select the other dialect." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlDialectInspection", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlRedundantElseNullInspection", - "shortDescription": { - "text": "Redundant ELSE NULL clause" - }, - "fullDescription": { - "text": "Reports redundant ELSE NULL clauses. Example (MySQL): 'SELECT CASE WHEN 2 > 1 THEN 'OK' ELSE NULL END AS alias FROM foo;' The 'ELSE NULL' part will never be executed and may be omitted.", - "markdown": "Reports redundant ELSE NULL clauses.\n\nExample (MySQL):\n\n SELECT CASE WHEN 2 > 1 THEN 'OK' ELSE NULL END AS alias FROM foo;\n\nThe `ELSE NULL` part will never be executed and may be omitted." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlRedundantElseNull", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "MysqlParsingInspection", - "shortDescription": { - "text": "Unsupported syntax in pre-8.0 versions" - }, - "fullDescription": { - "text": "Reports invalid usages of UNION in queries. The inspection works in MySQL versions that are earlier than 8.0. Example (MySQL): 'SELECT * FROM (SELECT 1 UNION (SELECT 1 UNION SELECT 2)) a;'", - "markdown": "Reports invalid usages of UNION in queries.\n\nThe inspection works in MySQL versions that are earlier than 8.0.\n\nExample (MySQL):\n\n\n SELECT * FROM (SELECT 1 UNION (SELECT 1 UNION SELECT 2)) a;\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "MysqlParsing", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "MySQL", - "index": 18, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlCallNotationInspection", - "shortDescription": { - "text": "Using of named and positional arguments" - }, - "fullDescription": { - "text": "Reports calls in which positional arguments go after the named ones. Works in PostgreSQL, Oracle, and Db2. Example (In PostgreSQL): 'CREATE FUNCTION foo(a int, b int, c int) RETURNS int\n LANGUAGE plpgsql AS\n$$\nBEGIN\n RETURN a + b + c;\nEND\n$$;\nSELECT foo(a => 1, b => 2, c => 3);\n -- `3` goes after the named argument\nSELECT foo(1, b => 2, 3);\n -- `1` and `3` go after the named argument\nSELECT foo(b => 2, 1, 3);'", - "markdown": "Reports calls in which positional arguments go after the named ones. Works in PostgreSQL, Oracle, and Db2.\n\nExample (In PostgreSQL):\n\n CREATE FUNCTION foo(a int, b int, c int) RETURNS int\n LANGUAGE plpgsql AS\n $$\n BEGIN\n RETURN a + b + c;\n END\n $$;\n SELECT foo(a => 1, b => 2, c => 3);\n -- `3` goes after the named argument\n SELECT foo(1, b => 2, 3);\n -- `1` and `3` go after the named argument\n SELECT foo(b => 2, 1, 3);\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "SqlCallNotation", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "MongoJSExtDeprecationInspection", - "shortDescription": { - "text": "Deprecated element" - }, - "fullDescription": { - "text": "Reports usages of deprecated methods in MongoDB and JavaScript code. The quick-fix replaces deprecated methods with recommended alternatives. Example: 'db.my_collection.insert()' After the quick-fix is applied: 'db.my_collection.insertOne()'", - "markdown": "Reports usages of deprecated methods in MongoDB and JavaScript code.\n\nThe quick-fix replaces deprecated methods with recommended alternatives.\n\nExample:\n\n\n db.my_collection.insert()\n\nAfter the quick-fix is applied:\n\n\n db.my_collection.insertOne()\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "MongoJSDeprecation", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "MongoJS", - "index": 15, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlDuplicateColumnInspection", - "shortDescription": { - "text": "Duplicating column name in SELECT" - }, - "fullDescription": { - "text": "Reports duplicated names of column aliases in SELECT lists. Example (Sybase ASE): 'CREATE TABLE t1 (a TEXT, b INT, c INT);\n\nSELECT a AS x, b AS x FROM t1;' The 'x' alias name is used for 'a' and 'b' columns. These assignments are highlighted as errors because you cannot use identical alias names for columns in Sybase ASE.", - "markdown": "Reports duplicated names of column aliases in SELECT lists.\n\nExample (Sybase ASE):\n\n CREATE TABLE t1 (a TEXT, b INT, c INT);\n\n SELECT a AS x, b AS x FROM t1;\n\nThe `x` alias name is used for `a` and `b` columns. These assignments are highlighted as errors because\nyou cannot use identical alias names for columns in Sybase ASE." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlDuplicateColumn", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlShadowingAliasInspection", - "shortDescription": { - "text": "Column is shadowed by alias" - }, - "fullDescription": { - "text": "Reports SELECT aliases with names that match column names in the FROM clause. Example (MySQL): 'CREATE TABLE foo (a INT, b INT, c INT);\nSELECT a b, c FROM foo;' The 'a' column uses the 'b' alias but the 'b' name is also used by the column from the 'foo' table.", - "markdown": "Reports SELECT aliases with names that match column names in the FROM clause.\n\nExample (MySQL):\n\n CREATE TABLE foo (a INT, b INT, c INT);\n SELECT a b, c FROM foo;\n\nThe `a` column uses the `b` alias but the `b` name is also used by the column from the `foo`\ntable." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlShadowingAlias", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "MongoJSDeprecationInspection", - "shortDescription": { - "text": "Deprecated element" - }, - "fullDescription": { - "text": "Reports usages of deprecated methods in MongoDB and JavaScript code. The quick-fix replaces deprecated methods with recommended alternatives. Example: 'db.my_collection.insert()' After the quick-fix is applied: 'db.my_collection.insertOne()'", - "markdown": "Reports usages of deprecated methods in MongoDB and JavaScript code.\n\nThe quick-fix replaces deprecated methods with recommended alternatives.\n\nExample:\n\n db.my_collection.insert()\n\nAfter the quick-fix is applied:\n\n db.my_collection.insertOne()\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "MongoJSDeprecation", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "MongoJS", - "index": 15, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlTypeInspection", - "shortDescription": { - "text": "Types compatibility" - }, - "fullDescription": { - "text": "Reports type-related errors.", - "markdown": "Reports type-related errors." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlType", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlUnreachableCodeInspection", - "shortDescription": { - "text": "Unreachable code" - }, - "fullDescription": { - "text": "Reports unreachable statements inside SQL routines. Example (Microsoft SQL Server): 'CREATE FUNCTION foo() RETURNS INT AS\nBEGIN\n THROW;\n RETURN 1;\nEND;' In Microsoft SQL Server, the 'THROW' statement raises an exception and transfers execution to the CATCH block of the TRY...CATCH construct. Therefore, the 'RETURN 1;' part will never be executed.", - "markdown": "Reports unreachable statements inside SQL routines.\n\nExample (Microsoft SQL Server):\n\n CREATE FUNCTION foo() RETURNS INT AS\n BEGIN\n THROW;\n RETURN 1;\n END;\n\nIn Microsoft SQL Server, the `THROW` statement raises an exception and transfers execution to the CATCH block of the TRY...CATCH\nconstruct. Therefore, the `RETURN 1;` part will never be executed." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlUnreachable", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlUnicodeStringLiteralInspection", - "shortDescription": { - "text": "Unicode usage in SQL" - }, - "fullDescription": { - "text": "Reports string literals that use national characters without the 'N' prefix. Without the N prefix, the string is converted to the default code page of the database. This default code page may not recognize certain characters. For more information, see nchar and nvarchar (Transact-SQL) at docs.microsoft.com. Example (Microsoft SQL Server): 'SELECT 'abcde' AS a;\nSELECT N'abcde' AS b;\nSELECT 'абвгд' AS c;\nSELECT N'абвгд' AS d;' The 'SELECT 'абвгд' AS c;' does not have the 'N' prefix, the ''абвгд'' part will be highlighted.", - "markdown": "Reports string literals that use national characters without the `N` prefix.\n\nWithout the N prefix, the string is converted to the default\ncode page of the database. This default code page may not recognize certain characters. For more information, see\n[nchar and nvarchar\n(Transact-SQL)\nat docs.microsoft.com](https://docs.microsoft.com/en-us/sql/t-sql/data-types/nchar-and-nvarchar-transact-sql).\n\nExample (Microsoft SQL Server):\n\n SELECT 'abcde' AS a;\n SELECT N'abcde' AS b;\n SELECT 'абвгд' AS c;\n SELECT N'абвгд' AS d;\n\nThe `SELECT 'абвгд' AS c;` does not have the `N` prefix, the `'абвгд'` part will be highlighted." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlUnicodeStringLiteral", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlNoDataSourceInspection", - "shortDescription": { - "text": "No data sources configured" - }, - "fullDescription": { - "text": "Reports the absence of data sources in the Database tool window (View | Tool Windows | Database).", - "markdown": "Reports the absence of data sources in the **Database** tool window (**View \\| Tool Windows \\| Database**)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlNoDataSourceInspection", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlUnusedVariableInspection", - "shortDescription": { - "text": "Unused variable" - }, - "fullDescription": { - "text": "Reports unused arguments, variables, or parameters. Example (PostgreSQL): 'CREATE FUNCTION foo(PARAMUSED INT, PARAMUNUSED INT) RETURNS INT AS\n$$\nBEGIN\n RETURN PARAMUSED;\nEND\n$$ LANGUAGE plpgsql;' The 'PARAMUNUSED' parameter is not used in the function and might be deleted.", - "markdown": "Reports unused arguments, variables, or parameters.\n\nExample (PostgreSQL):\n\n CREATE FUNCTION foo(PARAMUSED INT, PARAMUNUSED INT) RETURNS INT AS\n $$\n BEGIN\n RETURN PARAMUSED;\n END\n $$ LANGUAGE plpgsql;\n\nThe `PARAMUNUSED` parameter is not used in the function and might be deleted." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlUnused", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlResolveInspection", - "shortDescription": { - "text": "Unresolved reference" - }, - "fullDescription": { - "text": "Reports unresolved SQL references. Example (MySQL): 'CREATE TABLE users(id INT, name VARCHAR(40));\nCREATE TABLE admins(id INT, col1 INT);\n\nSELECT users.id, admins.id FROM admins WHERE admins.id > 1;' The 'users.id' column is unresolved because the 'users' table is missing in the FROM clause.", - "markdown": "Reports unresolved SQL references.\n\nExample (MySQL):\n\n CREATE TABLE users(id INT, name VARCHAR(40));\n CREATE TABLE admins(id INT, col1 INT);\n\n SELECT users.id, admins.id FROM admins WHERE admins.id > 1;\n\nThe `users.id` column is unresolved because the `users` table is missing in the FROM clause." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "SqlResolve", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "PgSelectFromProcedureInspection", - "shortDescription": { - "text": "Postgres: Select from procedure call" - }, - "fullDescription": { - "text": "Reports situations when you make SELECT from a function or a DBLINK without an alias with a type (for example, 'AS t1(s VARCHAR)'). This requirement does not apply to scalar functions. Example (PostgreSQL): 'CREATE FUNCTION produce_a_table() RETURNS RECORD AS $$\nSELECT 1;\n$$ LANGUAGE sql;\nSELECT * FROM produce_a_table() AS s (c1 INT);\nSELECT * FROM produce_a_table() AS s (c1);\nSELECT * FROM DBLINK('dbname=mydb', 'SELECT proname, prosrc FROM pg_proc') AS t1;' The 'AS s (c1 INT)' has a typed alias, while 'AS s (c1)' and 'AS t1' do not. In this case, the second call of 'produce_a_table()' and 'DBLINK()' will be highlighted.", - "markdown": "Reports situations when you make SELECT from a function or a DBLINK without an alias with a type (for example, `AS t1(s VARCHAR)`).\n\nThis requirement does not apply to scalar functions.\n\nExample (PostgreSQL):\n\n CREATE FUNCTION produce_a_table() RETURNS RECORD AS $$\n SELECT 1;\n $$ LANGUAGE sql;\n SELECT * FROM produce_a_table() AS s (c1 INT);\n SELECT * FROM produce_a_table() AS s (c1);\n SELECT * FROM DBLINK('dbname=mydb', 'SELECT proname, prosrc FROM pg_proc') AS t1;\n\nThe `AS s (c1 INT)` has a typed alias, while `AS s (c1)` and `AS t1` do not.\nIn this case, the second call of `produce_a_table()` and `DBLINK()` will be highlighted." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "PgSelectFromProcedure", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "PostgreSQL", - "index": 72, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlCurrentSchemaInspection", - "shortDescription": { - "text": "Current console schema introspected" - }, - "fullDescription": { - "text": "Reports schemas and databases in the current session that are not introspected. For example, this warning might occur when you try to create a table in the schema that is not introspected. Introspection is a method of inspecting a data source. When you perform introspection, structural information in the data source is inspected to detect tables, columns, functions, and other elements with their attributes.", - "markdown": "Reports schemas and databases in the current session that are not introspected.\n\nFor example, this warning might occur when you try to create a table in the schema that is not introspected.\n\nIntrospection is a method of inspecting a data source. When you perform introspection, structural information in the data source is\ninspected to detect tables, columns, functions, and other elements with their attributes." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlCurrentSchemaInspection", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlMisleadingReferenceInspection", - "shortDescription": { - "text": "Misleading references" - }, - "fullDescription": { - "text": "Reports ambiguous references in SQL code. For example, when a name refer to both a table column and a routine parameter. The execution of such code might lead to errors or unexpected results due to counter-intuitive resolution logic. Usually, names with a more local scope have higher priority. Example (PostgreSQL): 'CREATE TABLE foo\n(\n id INT,\n name VARCHAR(5)\n);\nCREATE FUNCTION func(name VARCHAR(5)) RETURNS INT AS\n$$\nDECLARE\n b INT;\nBEGIN\n -- `name` is ambiguous as it is used as a column name and a parameter\n SELECT COUNT(*) INTO b FROM foo t WHERE t.name = name;\n RETURN b;\nEND;\n$$ LANGUAGE plpgsql;' In PostgreSQL, you can use the '#variable_conflict' directives to explicitly specify a correct reference. For example, use '#variable_conflict use_column' to refer to a column name, or '#variable_conflict use_variable' to refer to a parameter. 'CREATE TABLE foo\n(\n id INT,\n name VARCHAR(5)\n);\nCREATE FUNCTION func(name VARCHAR(5)) RETURNS INT AS\n$$\n #variable_conflict use_column\nDECLARE\n b INT;\nBEGIN\n SELECT COUNT(*) INTO b FROM foo t WHERE t.name = name;\n RETURN b;\nEND;\n$$ LANGUAGE plpgsql;'", - "markdown": "Reports ambiguous references in SQL code.\n\nFor example, when a name refer to both a table column and a routine parameter. The execution of such code might lead to errors or unexpected\nresults due to counter-intuitive resolution logic. Usually, names with a more local scope have higher priority.\n\nExample (PostgreSQL):\n\n CREATE TABLE foo\n (\n id INT,\n name VARCHAR(5)\n );\n CREATE FUNCTION func(name VARCHAR(5)) RETURNS INT AS\n $$\n DECLARE\n b INT;\n BEGIN\n -- `name` is ambiguous as it is used as a column name and a parameter\n SELECT COUNT(*) INTO b FROM foo t WHERE t.name = name;\n RETURN b;\n END;\n $$ LANGUAGE plpgsql;\n\nIn PostgreSQL, you can use the `#variable_conflict` directives to explicitly specify a correct reference. For example,\nuse `#variable_conflict use_column` to refer to a column name, or `#variable_conflict use_variable` to refer to a\nparameter.\n\n CREATE TABLE foo\n (\n id INT,\n name VARCHAR(5)\n );\n CREATE FUNCTION func(name VARCHAR(5)) RETURNS INT AS\n $$\n #variable_conflict use_column\n DECLARE\n b INT;\n BEGIN\n SELECT COUNT(*) INTO b FROM foo t WHERE t.name = name;\n RETURN b;\n END;\n $$ LANGUAGE plpgsql;\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlMisleadingReference", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlInsertIntoGeneratedColumnInspection", - "shortDescription": { - "text": "Insertion into generated columns" - }, - "fullDescription": { - "text": "Reports INSERT statements that assign values to generated columns. Generated columns can be read, but their values can not be directly written. Example (PostgreSQL): 'CREATE TABLE foo\n(\n col1 INT,\n col2 INT GENERATED ALWAYS AS (col1 + 1) STORED\n);\nINSERT INTO foo(col1, col2) VALUES (1, 2);'\n You cannot insert '2' into the 'col2' column because this column is generated. For this script to work, you can change '2' to DEFAULT. 'INSERT INTO foo(col1, col2) VALUES (1, DEFAULT);'", - "markdown": "Reports INSERT statements that assign values to generated columns. Generated columns can be read, but their values can not be directly written.\n\nExample (PostgreSQL):\n\n CREATE TABLE foo\n (\n col1 INT,\n col2 INT GENERATED ALWAYS AS (col1 + 1) STORED\n );\n INSERT INTO foo(col1, col2) VALUES (1, 2);\n\nYou cannot insert `2` into the `col2` column because this column is generated.\nFor this script to work, you can change `2` to DEFAULT.\n`INSERT INTO foo(col1, col2) VALUES (1, DEFAULT);`" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlInsertIntoGeneratedColumn", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlRedundantLimitInspection", - "shortDescription": { - "text": "Redundant row limiting in queries" - }, - "fullDescription": { - "text": "Reports redundant row limiting clauses like FETCH and LIMIT in queries. Example (PostgreSQL): 'CREATE TABLE foo(a INT);\n\nSELECT * FROM foo WHERE EXISTS(SELECT * FROM foo LIMIT 2);\nSELECT * FROM foo WHERE EXISTS(SELECT * FROM foo FETCH FIRST 2 ROWS ONLY);' To fix the warning, you can add OFFSET to limiting clauses. If OFFSET is missing, then LIMIT is redundant because the usage of LIMIT does not influence the operation result of EXISTS. In case with OFFSET, we skip first 'N' rows and this will influence the output. 'SELECT * FROM foo WHERE EXISTS(SELECT * FROM foo OFFSET 1 ROW LIMIT 2);\nSELECT * FROM foo WHERE EXISTS(SELECT * FROM foo OFFSET 1 ROW FETCH FIRST 2 ROWS ONLY);'", - "markdown": "Reports redundant row limiting clauses like FETCH and LIMIT in queries.\n\nExample (PostgreSQL):\n\n CREATE TABLE foo(a INT);\n\n SELECT * FROM foo WHERE EXISTS(SELECT * FROM foo LIMIT 2);\n SELECT * FROM foo WHERE EXISTS(SELECT * FROM foo FETCH FIRST 2 ROWS ONLY);\n\nTo fix the warning, you can add OFFSET to limiting clauses. If OFFSET is missing, then LIMIT is redundant because\nthe usage of LIMIT does not influence the operation result of EXISTS. In case with OFFSET, we skip first `N` rows and this will\ninfluence the output.\n\n SELECT * FROM foo WHERE EXISTS(SELECT * FROM foo OFFSET 1 ROW LIMIT 2);\n SELECT * FROM foo WHERE EXISTS(SELECT * FROM foo OFFSET 1 ROW FETCH FIRST 2 ROWS ONLY);\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlRedundantLimit", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlInsertNullIntoNotNullInspection", - "shortDescription": { - "text": "Insert NULL into NOT NULL column" - }, - "fullDescription": { - "text": "Reports cases when you insert NULL values into columns that accept only NOT NULL values. Example (Microsoft SQL Server): 'CREATE TABLE br2 (\nid INT NOT NULL,\ncol1 NVARCHAR (20) NOT NULL,\ncol2 NVARCHAR (20) NOT NULL,\n);\n--\nINSERT INTO br2 (id, col1, col2)\nVALUES (1, NULL, NULL);' You cannot insert NULL values in 'col1' and 'col2' because they are defined as NOT NULL. If you run the script as is, you will receive an error. To fix this code, replace NULL in the VALUES part with some values (for example, '42' and ''bird''). INSERT INTO br2 (id, col1, col2)\nVALUES (1, 42, 'bird');", - "markdown": "Reports cases when you insert NULL values into columns that accept only NOT NULL values.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE br2 (\n id INT NOT NULL,\n col1 NVARCHAR (20) NOT NULL,\n col2 NVARCHAR (20) NOT NULL,\n );\n --\n INSERT INTO br2 (id, col1, col2)\n VALUES (1, NULL, NULL);\n\nYou cannot insert NULL values in `col1` and `col2` because they are defined as NOT NULL. If you run the script as\nis,\nyou will receive an error. To fix this code, replace NULL in the VALUES part with some values (for example, `42` and\n`'bird'`).\n\n```\nINSERT INTO br2 (id, col1, col2)\nVALUES (1, 42, 'bird');\n```" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlInsertNullIntoNotNull", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlDerivedTableAliasInspection", - "shortDescription": { - "text": "Each derived table should have alias" - }, - "fullDescription": { - "text": "Reports derived tables without aliases. Example (MySQL): 'CREATE TABLE table1 (id INT, name VARCHAR(20), cats FLOAT);\nCREATE TABLE table2 (id INT, age INTEGER);\n\nSELECT id AS ID, name, cats, age\nFROM (SELECT table1.id, name, cats, age\nFROM table1\nJOIN table2 ON table1.id = table2.id);' According to Derived Tables at dev.mysql.com, an alias is mandatory. You can add the alias by using the Introduce alias quick-fix. After the quick-fix is applied: 'SELECT id AS ID, name, cats, age\nFROM (SELECT table1.id, name, cats, age\nFROM table1\nJOIN table2 ON table1.id = table2.id);'", - "markdown": "Reports derived tables without aliases.\n\nExample (MySQL):\n\n CREATE TABLE table1 (id INT, name VARCHAR(20), cats FLOAT);\n CREATE TABLE table2 (id INT, age INTEGER);\n\n SELECT id AS ID, name, cats, age\n FROM (SELECT table1.id, name, cats, age\n FROM table1\n JOIN table2 ON table1.id = table2.id);\n\nAccording to [Derived Tables at dev.mysql.com](https://dev.mysql.com/doc/refman/8.0/en/derived-tables.html), an alias is\nmandatory. You can add the alias by using the **Introduce alias** quick-fix.\n\nAfter the quick-fix is applied:\n\n SELECT id AS ID, name, cats, age\n FROM (SELECT table1.id, name, cats, age\n FROM table1\n JOIN table2 ON table1.id = table2.id);\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlDerivedTableAlias", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "MsBuiltinInspection", - "shortDescription": { - "text": "Builtin functions" - }, - "fullDescription": { - "text": "Reports truncations of string arguments in ISNULL functions. The ISNULL syntax is 'ISNULL(check_expression, replacement_value)'. According to ISNULL at docs.microsoft.com, 'replacement_value' will be truncated if 'replacement_value' is longer than 'check_expression'. Example (Microsoft SQL Server): 'DECLARE @name1 VARCHAR(2) = NULL;\nDECLARE @name2 VARCHAR(10) = 'Example';\nDECLARE @name3 VARCHAR(2) = 'Hi';\n\n -- `@name2` is VARCHAR(10) and will be truncated\nSELECT ISNULL(@name1, @name2);\n\n -- `@name3` is VARCHAR(2) as `@name1` and will not be truncated\nSELECT ISNULL(@name1, @name3);'", - "markdown": "Reports truncations of string arguments in ISNULL functions.\n\nThe ISNULL syntax is `ISNULL(check_expression, replacement_value)`.\n\nAccording to [ISNULL at\ndocs.microsoft.com](https://docs.microsoft.com/en-us/sql/t-sql/functions/isnull-transact-sql), `replacement_value` will be truncated if `replacement_value` is longer than\n`check_expression`.\n\nExample (Microsoft SQL Server):\n\n DECLARE @name1 VARCHAR(2) = NULL;\n DECLARE @name2 VARCHAR(10) = 'Example';\n DECLARE @name3 VARCHAR(2) = 'Hi';\n\n -- `@name2` is VARCHAR(10) and will be truncated\n SELECT ISNULL(@name1, @name2);\n\n -- `@name3` is VARCHAR(2) as `@name1` and will not be truncated\n SELECT ISNULL(@name1, @name3);\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "MssqlBuiltin", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL server", - "index": 73, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlTriggerTransitionInspection", - "shortDescription": { - "text": "Suspicious code in triggers" - }, - "fullDescription": { - "text": "Reports incorrect usages of transition table variables in triggers. Example (HSQLDB): 'CREATE TABLE foo(a INT);\n\nCREATE TRIGGER trg\n AFTER DELETE ON foo\nBEGIN\n SELECT * FROM NEW;\nEND;\n\nCREATE TRIGGER trig AFTER INSERT ON foo\n REFERENCING OLD ROW AS newrow\n FOR EACH ROW WHEN (a > 1)\n INSERT INTO foo VALUES (1)' In HSQLDB, DELETE triggers may be used only with the OLD state while INSERT triggers may have only the NEW state. So, in the previous example, NEW in 'SELECT * FROM NEW;' will be highlighted as well as OLD in 'REFERENCING OLD ROW AS newrow'.", - "markdown": "Reports incorrect usages of transition table variables in triggers.\n\nExample (HSQLDB):\n\n CREATE TABLE foo(a INT);\n\n CREATE TRIGGER trg\n AFTER DELETE ON foo\n BEGIN\n SELECT * FROM NEW;\n END;\n\n CREATE TRIGGER trig AFTER INSERT ON foo\n REFERENCING OLD ROW AS newrow\n FOR EACH ROW WHEN (a > 1)\n INSERT INTO foo VALUES (1)\n\nIn HSQLDB, DELETE triggers may be used only with the OLD state while INSERT triggers may have only the NEW state. So, in the previous\nexample, NEW in `SELECT * FROM NEW;` will be highlighted as well as OLD in `REFERENCING OLD ROW AS newrow`." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlTriggerTransition", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlMultipleLimitClausesInspection", - "shortDescription": { - "text": "Multiple row limiting/offset clauses in queries" - }, - "fullDescription": { - "text": "Reports usages of multiple row limiting clauses in a single query. Example (Microsoft SQL Server): 'create table foo(a int);\nselect top 1 * from foo order by a offset 10 rows fetch next 20 rows only;' The SELECT TOP clause is used to specify that only 1 record must be returned. The FETCH clause specifies the number of rows to return after the OFFSET clause has been processed. But as we already have the SELECT TOP limiting clause, the FETCH clause might be redundant.", - "markdown": "Reports usages of multiple row limiting clauses in a single query.\n\nExample (Microsoft SQL Server):\n\n create table foo(a int);\n select top 1 * from foo order by a offset 10 rows fetch next 20 rows only;\n\nThe SELECT TOP clause is used to specify that only 1 record must be\nreturned. The FETCH clause specifies the number of rows to return after the OFFSET\nclause has been processed. But as we already have the SELECT TOP limiting clause, the FETCH clause might be redundant." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlMultipleLimitClauses", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlNamedArgumentsInspection", - "shortDescription": { - "text": "Named arguments should be used" - }, - "fullDescription": { - "text": "Reports arguments that are used without names in routine calls. By default, this inspection is disabled. For more information about the difference between named and unnamed parameters, see Binding Parameters by Name (Named Parameters) at docs.microsoft.com . Example (Microsoft SQL Server): 'CREATE FUNCTION foo(n INT, m INT) RETURNS INT AS\nBEGIN\n RETURN n + m;\nEND;\n\nCREATE PROCEDURE test AS\nBEGIN\n foo n = 1, m = 2;\n\n--- The following call misses parameter names and will be highlighted\n foo 1, 2;\nEND;' Parameters '1, 2' in the 'foo 1, 2;' call are highlighted because they miss names.", - "markdown": "Reports arguments that are used without names in routine calls. By default, this inspection is disabled.\n\nFor more information about the difference between named and unnamed parameters, see [Binding Parameters by Name (Named Parameters) at docs.microsoft.com](https://docs.microsoft.com/en-us/sql/odbc/reference/develop-app/binding-parameters-by-name-named-parameters).\n\nExample (Microsoft SQL Server):\n\n CREATE FUNCTION foo(n INT, m INT) RETURNS INT AS\n BEGIN\n RETURN n + m;\n END;\n\n CREATE PROCEDURE test AS\n BEGIN\n foo n = 1, m = 2;\n\n --- The following call misses parameter names and will be highlighted\n foo 1, 2;\n END;\n\nParameters `1, 2` in the `foo 1, 2;` call are highlighted because they miss names." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlNamedArguments", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlCaseVsCoalesceInspection", - "shortDescription": { - "text": "Using CASE instead of COALESCE function and vice versa" - }, - "fullDescription": { - "text": "Reports situations when CASE and COALESCE calls are interchangeable. This inspection has the following intention actions: Replace with 'COALESCE' call and the opposite one Replace with CASE expression. Example (MySQL): 'SELECT\n -- this CASE may be replaced by COALESCE\n\tCASE\n\t\tWHEN C1 IS NOT NULL THEN C1\n\t\tELSE 0\n\t\tEND\nFROM dual;' In the example, the CASE statement can be replaced with 'SELECT COALESCE(C1, 0)' that produces the same output. If you prefer using CASE expressions, select the Prefer CASE expressions over COALESCE function option on the inspection page.", - "markdown": "Reports situations when CASE and COALESCE calls are interchangeable. This inspection has the following intention actions: **Replace\nwith 'COALESCE' call** and the opposite one **Replace with CASE expression** .\n\nExample (MySQL):\n\n SELECT\n -- this CASE may be replaced by COALESCE\n \tCASE\n \t\tWHEN C1 IS NOT NULL THEN C1\n \t\tELSE 0\n \t\tEND\n FROM dual;\n\nIn the example, the CASE statement can be replaced with `SELECT COALESCE(C1, 0)` that produces the same output.\n\nIf you prefer using CASE expressions, select the **Prefer CASE expressions over COALESCE function** option on\nthe inspection page." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlCaseVsCoalesce", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlRedundantAliasInspection", - "shortDescription": { - "text": "Redundant alias expressions" - }, - "fullDescription": { - "text": "Reports alias expressions that duplicate names of columns in tables and might be redundant. Example (PostgreSQL): 'CREATE TABLE foo(a INT, b INT);\n\nSELECT * FROM foo foo(a, b);\nSELECT * FROM foo foo(a);\nSELECT * FROM foo foo(x);\nSELECT * FROM foo foo(x, y);' The first two aliases use the same column names as in the 'foo' table. They are considered redundant because they column names are identical.", - "markdown": "Reports alias expressions that duplicate names of columns in tables and might be redundant.\n\nExample (PostgreSQL):\n\n CREATE TABLE foo(a INT, b INT);\n\n SELECT * FROM foo foo(a, b);\n SELECT * FROM foo foo(a);\n SELECT * FROM foo foo(x);\n SELECT * FROM foo foo(x, y);\n\nThe first two aliases use the same column names as in the `foo` table. They are considered redundant because they\ncolumn names are identical." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlRedundantAlias", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlIdentifierInspection", - "shortDescription": { - "text": "Identifier should be quoted" - }, - "fullDescription": { - "text": "Reports situations when you use SQL reserved keywords as identifier names in your query. Example (Microsoft SQL Server): 'CREATE TABLE select (identity INT IDENTITY NOT NULL, order INT NOT NULL);' We use 'select', 'identity', and 'order' as table and column names. But they are also reserved keywords in Microsoft SQL Server. Therefore, in order to use them as object names in the query, you must quote these identifiers. To quote them, you can use the Quote identifier quick-fix. After the quick-fix is applied: 'CREATE TABLE [select] ([identity] INT IDENTITY NOT NULL, [order] INT NOT NULL);'", - "markdown": "Reports situations when you use SQL reserved keywords as identifier names in your query.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE select (identity INT IDENTITY NOT NULL, order INT NOT NULL);\n\nWe use `select`, `identity`, and `order` as table and column names.\nBut they are also reserved keywords in Microsoft SQL Server.\nTherefore, in order to use them as object names in the query, you must quote these identifiers. To quote them, you can use the\n**Quote identifier** quick-fix.\n\nAfter the quick-fix is applied:\n\n CREATE TABLE [select] ([identity] INT IDENTITY NOT NULL, [order] INT NOT NULL);\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlIdentifier", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlTransactionStatementInTriggerInspection", - "shortDescription": { - "text": "Use of transaction management statements in triggers" - }, - "fullDescription": { - "text": "Reports usages of transaction management statements like COMMIT or ROLLBACK in trigger bodies. With COMMIT or ROLLBACK statements in a trigger body, the trigger will not compile. The fail happens because triggers start during transactions. When the trigger starts the current transaction is still not complete. As COMMIT terminates a transaction, both statements (COMMIT and ROLLBACK) would lead to an exception. Changes that are executed in a trigger should be committed (or rolled back) by the owning transaction that started the trigger. Example (Oracle): 'CREATE TABLE employee_audit\n(\n id INT NOT NULL,\n update_date DATE NOT NULL,\n old_name VARCHAR2(100),\n new_name VARCHAR2(100)\n);\n\nCREATE TABLE employees\n(\n id INT NOT NULL,\n name VARCHAR2(100) NOT NULL\n);\n\nCREATE OR REPLACE TRIGGER trig_commit\n AFTER UPDATE OF name\n ON employees\n FOR EACH ROW\nBEGIN\n INSERT INTO employee_audit VALUES (:old.id, SYSDATE, :old.name, :new.name);\n COMMIT;\nEND;\n\nCREATE OR REPLACE TRIGGER trig_rollback\n AFTER UPDATE OF name\n ON employees\n FOR EACH ROW\nBEGIN\n INSERT INTO employee_audit VALUES (:old.id, SYSDATE, :old.name, :new.name);\n ROLLBACK;\nEND;'", - "markdown": "Reports usages of transaction management statements like COMMIT or ROLLBACK in trigger bodies.\n\nWith COMMIT or ROLLBACK statements in a trigger body, the trigger will not compile.\nThe fail happens because triggers start during transactions. When the trigger starts the current transaction is still not complete. As\nCOMMIT\nterminates a transaction, both statements (COMMIT and ROLLBACK) would lead to an exception.\nChanges that are executed in a trigger should be committed (or rolled back) by the owning transaction that started the trigger.\n\nExample (Oracle):\n\n CREATE TABLE employee_audit\n (\n id INT NOT NULL,\n update_date DATE NOT NULL,\n old_name VARCHAR2(100),\n new_name VARCHAR2(100)\n );\n\n CREATE TABLE employees\n (\n id INT NOT NULL,\n name VARCHAR2(100) NOT NULL\n );\n\n CREATE OR REPLACE TRIGGER trig_commit\n AFTER UPDATE OF name\n ON employees\n FOR EACH ROW\n BEGIN\n INSERT INTO employee_audit VALUES (:old.id, SYSDATE, :old.name, :new.name);\n COMMIT;\n END;\n\n CREATE OR REPLACE TRIGGER trig_rollback\n AFTER UPDATE OF name\n ON employees\n FOR EACH ROW\n BEGIN\n INSERT INTO employee_audit VALUES (:old.id, SYSDATE, :old.name, :new.name);\n ROLLBACK;\n END;\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlTransactionStatementInTrigger", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlRedundantCodeInCoalesceInspection", - "shortDescription": { - "text": "Redundant code in COALESCE call" - }, - "fullDescription": { - "text": "Reports all the arguments except for the first expression that does not evaluate to NULL in COALESCE functions. Example (MySQL): 'SELECT COALESCE(NULL, NULL, NULL, 42, NULL, 'string') as a;' The first NOT NULL argument is '42', all other arguments will be grayed out.", - "markdown": "Reports all the arguments except for the first expression that does not evaluate to NULL in COALESCE functions.\n\nExample (MySQL):\n\n SELECT COALESCE(NULL, NULL, NULL, 42, NULL, 'string') as a;\n\nThe first NOT NULL argument is `42`, all other arguments will be grayed out." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlRedundantCodeInCoalesce", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlStorageInspection", - "shortDescription": { - "text": "SQL source modification detection" - }, - "fullDescription": { - "text": "Reports situations when source code of a database object has been changed. The inspection is triggered when you perform database or object introspection. The introspection is run when you open source code of an object, run statements, and perform code refactoring. Also, you can run introspection by right-clicking an object and selecting Refresh. The inspection covers the following situations: Object source code was changed in the database but code in the editor was not updated. Works in PostgreSQL, Microsoft SQL Server, Oracle, and Sybase ASE. You changed the object source code, introspected the database, but source code has been already changed by someone else. The database introspector was updated in the IDE and you need to download new object properties that were missing in the previous introspector version.", - "markdown": "Reports situations when source code of a database object has been changed.\n\nThe inspection is triggered when you perform database or object introspection. The introspection is run when you open source code of an\nobject, run statements, and perform code refactoring.\nAlso, you can run introspection by right-clicking an object and selecting **Refresh**.\n\nThe inspection covers the following situations:\n\n* Object source code was changed in the database but code in the editor was not updated. Works in PostgreSQL, Microsoft SQL Server, Oracle, and Sybase ASE.\n* You changed the object source code, introspected the database, but source code has been already changed by someone else.\n* The database introspector was updated in the IDE and you need to download new object properties that were missing in the previous introspector version." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlStorageInspection", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "MsOrderByInspection", - "shortDescription": { - "text": "ORDER BY in queries" - }, - "fullDescription": { - "text": "Reports usages when the 'ORDER BY' clause is used without 'TOP', 'OFFSET', or 'FOR XML' in views, inline functions, derived tables, subqueries, and common table expressions. For more information about usages of 'ORDER BY', see SELECT - ORDER BY Clause (Transact-SQL) at docs.microsoft.com. Example (Microsoft SQL server): 'CREATE TABLE foo (a INT NOT NULL, b INT NOT NULL);\n\nSELECT *\nFROM (SELECT a, b\nFROM foo A\nWHERE a < 89\nORDER BY b) ALIAS;' In a subquery, ORDER BY will be highlighted as an error. You can add TOP, OFFSET, or FOR XML to a subquery. Alternatively, use the Delete element quick-fix to delete the ORDER BY section. After the quick-fix is applied: 'SELECT *\nFROM (SELECT a, b\nFROM foo A\nWHERE a < 89) ALIAS;'", - "markdown": "Reports usages when the `ORDER BY` clause is used without `TOP`, `OFFSET`, or `FOR XML` in views, inline functions, derived tables, subqueries, and common table expressions.\n\nFor more information about usages of `ORDER BY`, see [SELECT - ORDER BY Clause (Transact-SQL) at\ndocs.microsoft.com](https://docs.microsoft.com/en-us/sql/t-sql/queries/select-order-by-clause-transact-sql).\n\nExample (Microsoft SQL server):\n\n CREATE TABLE foo (a INT NOT NULL, b INT NOT NULL);\n\n SELECT *\n FROM (SELECT a, b\n FROM foo A\n WHERE a < 89\n ORDER BY b) ALIAS;\n\nIn a subquery, ORDER BY will be highlighted as an error. You can add TOP, OFFSET, or FOR XML to a subquery.\nAlternatively, use the **Delete element** quick-fix to delete the ORDER BY section.\n\nAfter the quick-fix is applied:\n\n SELECT *\n FROM (SELECT a, b\n FROM foo A\n WHERE a < 89) ALIAS;\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "MsOrderBy", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "SQL server", - "index": 73, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlSignatureInspection", - "shortDescription": { - "text": "Function signature" - }, - "fullDescription": { - "text": "Reports signature issues for built-in functions. The inspection will report a wrong number of arguments, invalid keywords, wrong data types, and other issues. Example (MySQL): 'CREATE TABLE foo (a INT, b INT, c INT)\n\nSELECT IFNULL() FROM foo; -- error\nSELECT IFNULL(a) FROM foo; -- error\nSELECT IFNULL(a, b) FROM foo; -- OK\nSELECT IFNULL(a, b, c) FROM foo; -- error' In MySQL, the 'IFNULL()' function accepts strictly two arguments. So, only the 'SELECT IFNULL(a, b) FROM foo;' query is correct.", - "markdown": "Reports signature issues for built-in functions.\n\nThe inspection will report a wrong number of arguments, invalid keywords, wrong data types, and other issues.\n\nExample (MySQL):\n\n CREATE TABLE foo (a INT, b INT, c INT)\n\n SELECT IFNULL() FROM foo; -- error\n SELECT IFNULL(a) FROM foo; -- error\n SELECT IFNULL(a, b) FROM foo; -- OK\n SELECT IFNULL(a, b, c) FROM foo; -- error\n\nIn MySQL, the `IFNULL()` function accepts strictly two arguments. So, only the `SELECT IFNULL(a, b) FROM foo;`\nquery is correct." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlSignature", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlRedundantOrderingDirectionInspection", - "shortDescription": { - "text": "Redundant ordering direction" - }, - "fullDescription": { - "text": "Reports redundant ordering directions like ASC and DESC in ORDER BY clauses. Example (MySQL): 'CREATE TABLE foo(a INT, b INT, c INT);\nSELECT * FROM foo ORDER BY a ASC, b DESC, c ASC;' The ORDER BY keyword sorts the records in the ascending order by default. So, the 'ASC' keyword for 'a' and 'c' columns is redundant.", - "markdown": "Reports redundant ordering directions like ASC and DESC in ORDER BY clauses.\n\nExample (MySQL):\n\n CREATE TABLE foo(a INT, b INT, c INT);\n SELECT * FROM foo ORDER BY a ASC, b DESC, c ASC;\n\nThe ORDER BY keyword sorts the records in the ascending order by default. So, the `ASC` keyword for `a` and\n`c` columns is redundant." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlRedundantOrderingDirection", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlDeprecateTypeInspection", - "shortDescription": { - "text": "Deprecated type" - }, - "fullDescription": { - "text": "Reports usages of types that are deprecated and might disappear in future versions of DBMS. Reported types: LONG in Oracle (see Deprecated and Desupported Features at docs.oracle.com). TEXT, NTEXT, and IMAGE in Microsoft SQL Server (see Deprecated Database Engine Features in SQL Server 2016 at docs.microsoft.com). Example (Oracle): 'CREATE TABLE ot.foo(\na NUMBER GENERATED BY DEFAULT AS IDENTITY,\nb LONG NOT NULL\n);'", - "markdown": "Reports usages of types that are deprecated and might disappear in future versions of DBMS.\n\nReported types:\n\n* LONG in Oracle (see [Deprecated\n and Desupported Features at docs.oracle.com](https://docs.oracle.com/cd/A91202_01/901_doc/server.901/a90120/ch4_dep.htm#6690)).\n* TEXT, NTEXT, and IMAGE in Microsoft SQL Server (see [Deprecated Database Engine Features in SQL Server 2016 at docs.microsoft.com](https://docs.microsoft.com/en-us/sql/database-engine/deprecated-database-engine-features-in-sql-server-2016?view=sql-server-ver15)).\n\nExample (Oracle):\n\n CREATE TABLE ot.foo(\n a NUMBER GENERATED BY DEFAULT AS IDENTITY,\n b LONG NOT NULL\n );\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlDeprecateType", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlAggregatesInspection", - "shortDescription": { - "text": "Aggregate-related problems" - }, - "fullDescription": { - "text": "Reports invalid usages of SQL aggregate functions. The following situations are considered: Columns that are used in HAVING and ORDER BY clauses but are missed in GROUP BY clauses. 'CREATE TABLE foo(id INT PRIMARY KEY, a INT, b INT);\nSELECT a, MAX(b) FROM foo GROUP BY a HAVING b > 0;\nSELECT * FROM foo GROUP BY a ORDER BY b;' This rule does not apply when grouping is made by the primary key. 'SELECT * FROM foo GROUP BY id ORDER BY b;' Aggregate functions in a wrong context. Usually, you can use aggregate functions in the following contexts: a list of expressions in SELECT; in HAVING and ORDER BY sections; and other dialect-specific cases. The following queries will display an error. 'SELECT a FROM foo WHERE MAX(b) > 0;\nSELECT a FROM foo GROUP BY MAX(a);' Nested calls of aggregate functions. 'SELECT MAX(SUM(a)) FROM foo GROUP BY a;' This rule does not apply to analytic functions. The following query is valid and correct. 'SELECT MAX(SUM(a) OVER ()) FROM foo;' Usages of HAVING without aggregate functions. In this case, consider rewriting your code using the WHERE section. 'SELECT a, MAX(b) FROM foo GROUP BY a HAVING a > 0;'", - "markdown": "Reports invalid usages of SQL aggregate functions.\n\nThe following situations are considered:\n\n* Columns that are used in HAVING and ORDER BY clauses but are missed in GROUP BY clauses.\n\n CREATE TABLE foo(id INT PRIMARY KEY, a INT, b INT);\n SELECT a, MAX(b) FROM foo GROUP BY a HAVING b > 0;\n SELECT * FROM foo GROUP BY a ORDER BY b;\n\n This rule does not apply when grouping is made by the primary key.\n\n SELECT * FROM foo GROUP BY id ORDER BY b;\n\n* Aggregate functions in a wrong context. Usually, you can use aggregate functions in the following contexts: a list of expressions in\n SELECT; in HAVING and ORDER BY sections; and other dialect-specific cases. The following queries will display an error.\n\n SELECT a FROM foo WHERE MAX(b) > 0;\n SELECT a FROM foo GROUP BY MAX(a);\n\n* Nested calls of aggregate functions.\n\n SELECT MAX(SUM(a)) FROM foo GROUP BY a;\n\n This rule does not apply to analytic functions. The following query is valid and correct.\n\n SELECT MAX(SUM(a) OVER ()) FROM foo;\n\n* Usages of HAVING without aggregate functions. In this case, consider rewriting your code using the WHERE section.\n\n SELECT a, MAX(b) FROM foo GROUP BY a HAVING a > 0;\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlAggregates", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlConstantExpressionInspection", - "shortDescription": { - "text": "Constant expression" - }, - "fullDescription": { - "text": "Reports conditions and expressions that are always true, false or null. Example (MySQL): 'CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\nSELECT a FROM t1 WHERE 'Cat' = 'Cat';\nSELECT a FROM t1 WHERE 'Cat' = null;' The ''Cat' = 'Cat'' is always true and will be reported. The ''Cat' = null' is always null and will be reported.", - "markdown": "Reports conditions and expressions that are always true, false or null.\n\nExample (MySQL):\n\n CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\n SELECT a FROM t1 WHERE 'Cat' = 'Cat';\n SELECT a FROM t1 WHERE 'Cat' = null;\n\nThe `'Cat' = 'Cat'` is always true and will be reported.\n\nThe `'Cat' = null` is always null and will be reported." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlConstantExpression", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlMissingColumnAliasesInspection", - "shortDescription": { - "text": "Missing column aliases" - }, - "fullDescription": { - "text": "Reports queries without explicit aliases in output expressions (for example, in the SELECT statement). Example (PostgreSQL): 'CREATE TABLE foo(a INT, b INT);\n\nSELECT 1, a + 1 AS A2, MAX(b) AS M\nFROM foo;'", - "markdown": "Reports queries without explicit aliases in output expressions (for example, in the SELECT statement).\n\nExample (PostgreSQL):\n\n CREATE TABLE foo(a INT, b INT);\n\n SELECT 1, a + 1 AS A2, MAX(b) AS M\n FROM foo;\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlMissingColumnAliases", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlAddNotNullColumnInspection", - "shortDescription": { - "text": "Adding not null column without default value" - }, - "fullDescription": { - "text": "Reports attempts to create NOT NULL columns without DEFAULT values. Example (Microsoft SQL Server): 'CREATE TABLE foo (a INT, b INT)\n\nALTER TABLE foo ADD c INT NOT NULL;' By default, a column holds NULL values. In the example, we use the NOT NULL constraint that enforces a column not to accept NULL values. If we prohibit to use NULL values, we must set the DEFAULT value that SQL can use when we create a new record. 'ALTER TABLE foo ADD c INT NOT NULL DEFAULT 42;' You can quickly add the DEFAULT value by using the Add DEFAULT value quick-fix.", - "markdown": "Reports attempts to create NOT NULL columns without DEFAULT values.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE foo (a INT, b INT)\n\n ALTER TABLE foo ADD c INT NOT NULL;\n\nBy default, a column holds NULL values. In the example, we use the NOT NULL constraint that enforces a column not to accept NULL values.\nIf we prohibit to use NULL values, we must set the DEFAULT value that SQL can use when we create a new record.\n\n ALTER TABLE foo ADD c INT NOT NULL DEFAULT 42;\n\nYou can quickly add the DEFAULT value by using the **Add DEFAULT value** quick-fix." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlAddNotNullColumn", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "OraOverloadInspection", - "shortDescription": { - "text": "Overloading errors" - }, - "fullDescription": { - "text": "Reports invalid cases of subprogram overloading in Oracle. Example (Oracle): 'DECLARE\n SUBTYPE fff IS BINARY_INTEGER;\n SUBTYPE ggg IS NATURAL;\n PROCEDURE foo (a IN ggg) IS BEGIN NULL; END;\n PROCEDURE foo (a IN fff) IS BEGIN NULL; END;\nBEGIN\n NULL;\nEND;' You cannot overload subprograms which parameters differ only in subtypes. For example, you cannot overload procedures where one accepts a BINARY INTEGER parameter and the other accepts a NATURAL parameter. For more information about restrictions on procedure overloading, see Restrictions on Overloading at docs.oracle.com.", - "markdown": "Reports invalid cases of subprogram overloading in Oracle.\n\nExample (Oracle):\n\n DECLARE\n SUBTYPE fff IS BINARY_INTEGER;\n SUBTYPE ggg IS NATURAL;\n PROCEDURE foo (a IN ggg) IS BEGIN NULL; END;\n PROCEDURE foo (a IN fff) IS BEGIN NULL; END;\n BEGIN\n NULL;\n END;\n\nYou cannot overload subprograms which parameters differ only in subtypes. For example, you cannot overload procedures where one accepts a\nBINARY INTEGER parameter and the other accepts a NATURAL parameter. For more information about restrictions on procedure overloading,\nsee [Restrictions on Overloading at docs.oracle.com](https://docs.oracle.com/cd/B19306_01/appdev.102/b14261/subprograms.htm)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlOverload", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Oracle", - "index": 78, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "OraMissingBodyInspection", - "shortDescription": { - "text": "Missing body for package/object type specification" - }, - "fullDescription": { - "text": "Reports package and object type specifications that are missing body declarations. Package specifications and object types that declare routines as well as package specifications with cursors must have body declarations where those routines and cursors are implemented. Absence of a body leads to a runtime error when routines or cursors are invoked in program code. Example (Oracle): 'CREATE OR REPLACE PACKAGE ppp IS\n FUNCTION foo(a INT) RETURN INT;\nEND;'", - "markdown": "Reports package and object type specifications that are missing body declarations.\n\nPackage specifications and object types that declare routines as well as package specifications with cursors must have body\ndeclarations where those routines and cursors are implemented. Absence of a body leads to a runtime error when routines or cursors are\ninvoked in program code.\n\nExample (Oracle):\n\n CREATE OR REPLACE PACKAGE ppp IS\n FUNCTION foo(a INT) RETURN INT;\n END;\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlMissingBody", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Oracle", - "index": 78, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "OraUnmatchedForwardDeclarationInspection", - "shortDescription": { - "text": "Forward declaration without definition" - }, - "fullDescription": { - "text": "Reports declarations of procedures and functions that are missing their implementation in code. In Oracle, you can declare a procedure or a function without its body, and write the implementation later. The inspection will report names of such procedures or functions that are left without implementation. Example (Oracle): 'DECLARE PROCEDURE foo(a int, b varchar2);\nBEGIN\n NULL;\nEND;' The 'foo' procedure is declared but is missing implementation. We can add the implementation to get rid of the error. 'DECLARE PROCEDURE foo(a int, b varchar2);\n PROCEDURE foo(a int, b varchar2) IS\nBEGIN\n NULL;\nEND;\nBEGIN\n NULL;\nEND;'", - "markdown": "Reports declarations of procedures and functions that are missing their implementation in code.\n\nIn Oracle, you can declare a procedure or a function without its body, and write the implementation later. The inspection will report names\nof such procedures or functions that are left without implementation.\n\nExample (Oracle):\n\n DECLARE PROCEDURE foo(a int, b varchar2);\n BEGIN\n NULL;\n END;\n\nThe `foo` procedure is declared but is missing implementation. We can add the implementation to get rid of the error.\n\n DECLARE PROCEDURE foo(a int, b varchar2);\n PROCEDURE foo(a int, b varchar2) IS\n BEGIN\n NULL;\n END;\n BEGIN\n NULL;\n END;\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "SqlUnmatchedForwardDeclaration", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Oracle", - "index": 78, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlGotoInspection", - "shortDescription": { - "text": "Usages of GOTO statements" - }, - "fullDescription": { - "text": "Reports usages of backward GOTO statements and GOTO statements used to exit a loop. The extensive use of GOTO statements is generally not recommended. For details, see GOTO statement in SQL procedures at ibm.com. Instead of jumping back to a previous statement using GOTO, consider using a loop. Instead of exiting the WHILE loop with GOTO, consider using other control-of-flow statements (for example, RETURN or BREAK). Example (Oracle): 'CREATE PROCEDURE test(n INT) AS\nDECLARE\n x INT;\nBEGIN\n x := 0;\n GOTO a;\n <
      > x := 1;\n IF (n = 0) THEN\n GOTO a;\n END IF;\n WHILE TRUE\n LOOP\n GOTO b;\n END LOOP;\n <> x := 3;\nEND;'", - "markdown": "Reports usages of backward GOTO statements and GOTO statements used to exit a loop.\n\nThe extensive use of GOTO statements is generally\nnot recommended. For details, see [GOTO statement in\nSQL\nprocedures at ibm.com](https://www.ibm.com/docs/no/db2/11.5?topic=procedures-goto-statement-in-sql).\n\nInstead of jumping back to a previous statement using GOTO, consider using a loop.\n\nInstead of exiting the WHILE loop with GOTO, consider using other control-of-flow statements (for example, RETURN or BREAK).\n\nExample (Oracle):\n\n CREATE PROCEDURE test(n INT) AS\n DECLARE\n x INT;\n BEGIN\n x := 0;\n GOTO a;\n <> x := 1;\n IF (n = 0) THEN\n GOTO a;\n END IF;\n WHILE TRUE\n LOOP\n GOTO b;\n END LOOP;\n <> x := 3;\n END;\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlGoto", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "MongoJSExtResolveInspection", - "shortDescription": { - "text": "Resolution problems" - }, - "fullDescription": { - "text": "Reports unresolved references in MongoDB and JavaScript code.", - "markdown": "Reports unresolved references in MongoDB and JavaScript code." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "MongoJSResolve", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "MongoJS", - "index": 15, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlWithoutWhereInspection", - "shortDescription": { - "text": "Delete or update statement without where clauses" - }, - "fullDescription": { - "text": "Reports usages of DELETE or UPDATE statements without WHERE clauses. Without WHERE clauses, DELETE drops all the data from the table, and UPDATE overwrites values for all the table rows. Example (MySQL): 'CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\nupdate t1 set a = 'Smith';\ndelete from t1;'", - "markdown": "Reports usages of DELETE or UPDATE statements without WHERE clauses.\n\nWithout WHERE clauses, DELETE drops all the data from the table, and UPDATE overwrites values for all the table rows.\n\nExample (MySQL):\n\n CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\n update t1 set a = 'Smith';\n delete from t1;\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlWithoutWhere", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlAmbiguousColumnInspection", - "shortDescription": { - "text": "Ambiguous reference" - }, - "fullDescription": { - "text": "Reports columns that have identical names but belong to different tables. Example (MySQL): 'CREATE TABLE foo(id INT PRIMARY KEY);\nCREATE TABLE bar(id INT PRIMARY KEY);\n\nSELECT foo.id, bar.id FROM foo, bar WHERE id > 0;' The 'id' column appears in 'foo' and 'bar' tables. You need to qualify the column name to make the query correct. 'SELECT foo.id, bar.id FROM foo, bar WHERE foo.id > 0;'", - "markdown": "Reports columns that have identical names but belong to different tables.\n\nExample (MySQL):\n\n CREATE TABLE foo(id INT PRIMARY KEY);\n CREATE TABLE bar(id INT PRIMARY KEY);\n\n SELECT foo.id, bar.id FROM foo, bar WHERE id > 0;\n\nThe `id` column appears in `foo` and `bar` tables. You need to qualify the column name to\nmake the query correct.\n\n SELECT foo.id, bar.id FROM foo, bar WHERE foo.id > 0;\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlAmbiguousColumn", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlUnusedCteInspection", - "shortDescription": { - "text": "Unused common table expression" - }, - "fullDescription": { - "text": "Reports unused common table expressions (CTE) inside the query. Example (PostgreSQL): 'CREATE TABLE foo(a INT);\n\nWITH a AS (SELECT 1 AS x FROM foo)\nSELECT 1 + 2 FROM foo;' By using WITH, we create a temporary named result set with the name 'a', also known as a common table expression (CTE). But we do not use this CTE later in the code. The unused CTE is greyed out.", - "markdown": "Reports unused common table expressions (CTE) inside the query.\n\nExample (PostgreSQL):\n\n CREATE TABLE foo(a INT);\n\n WITH a AS (SELECT 1 AS x FROM foo)\n SELECT 1 + 2 FROM foo;\n\nBy using WITH, we create a temporary named result set with the name `a`, also known as a common table expression (CTE). But\nwe do not use this CTE later in the code. The unused CTE is greyed out." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlUnusedCte", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "MongoJSResolveInspection", - "shortDescription": { - "text": "Resolution problems" - }, - "fullDescription": { - "text": "Reports unresolved references in MongoDB and JavaScript code. Example: 'db\nuse foo\n -- a reference to a non-existing collection\ndb.non_existing_collection\ndb['non_existing_collection']\ndb['non_existing_collection'].find().hasNext()' The 'non_existing_collection' collection does not exist in the database and will be reported.", - "markdown": "Reports unresolved references in MongoDB and JavaScript code.\n\nExample:\n\n db\n use foo\n -- a reference to a non-existing collection\n db.non_existing_collection\n db['non_existing_collection']\n db['non_existing_collection'].find().hasNext()\n\nThe `non_existing_collection` collection does not exist in the database and will be reported." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "MongoJSResolve", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "MongoJS", - "index": 15, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "SqlNullComparisonInspection", - "shortDescription": { - "text": "Null comparison" - }, - "fullDescription": { - "text": "Reports comparisons with NULL that can be replaced with IS NULL or IS NOT NULL operators. Example (Microsoft SQL Server): 'CREATE TABLE foo ( id int );\n\nSELECT * FROM foo WHERE NULL = NULL;\nSELECT * FROM foo WHERE NULL != NULL;' The 'NULL = NULL' can be replaced with 'IS NULL', the 'NULL != NULL' comparison with 'IS NOT NULL'. To do this replacement, you can use Use IS NULL operator or Use IS NOT NULL operator quick-fixes. 'SELECT * FROM foo WHERE NULL IS NULL;\nSELECT * FROM foo WHERE NULL IS NOT NULL;'", - "markdown": "Reports comparisons with NULL that can be replaced with IS NULL or IS NOT NULL operators.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE foo ( id int );\n\n SELECT * FROM foo WHERE NULL = NULL;\n SELECT * FROM foo WHERE NULL != NULL;\n\nThe `NULL = NULL` can be replaced with `IS NULL`, the `NULL != NULL` comparison\nwith `IS NOT NULL`. To do this replacement, you can use **Use IS NULL operator** or **Use IS NOT NULL operator**\nquick-fixes.\n\n SELECT * FROM foo WHERE NULL IS NULL;\n SELECT * FROM foo WHERE NULL IS NOT NULL;\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "SqlNullComparison", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "SQL", - "index": 41, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "org.intellij.plugins.markdown", - "version": "241.18034.45", - "rules": [ - { - "id": "MarkdownOutdatedTableOfContents", - "shortDescription": { - "text": "Outdated table of contents section" - }, - "fullDescription": { - "text": "Checks if a particular table of contents section corresponds to the actual structure of the document.", - "markdown": "Checks if a particular table of contents section corresponds to the actual structure of the document." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "MarkdownOutdatedTableOfContents", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Markdown", - "index": 21, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "MarkdownUnresolvedLinkLabel", - "shortDescription": { - "text": "Unresolved link label" - }, - "fullDescription": { - "text": "Reports unresolved link labels in Markdown files.", - "markdown": "Reports unresolved link labels in Markdown files." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "MarkdownUnresolvedLinkLabel", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Markdown", - "index": 21, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "MarkdownIncorrectTableFormatting", - "shortDescription": { - "text": "Incorrect table formatting" - }, - "fullDescription": { - "text": "Checks if table is correctly formatted.", - "markdown": "Checks if table is correctly formatted." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "MarkdownIncorrectTableFormatting", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Markdown", - "index": 21, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "MarkdownIncorrectlyNumberedListItem", - "shortDescription": { - "text": "Incorrectly numbered list item" - }, - "fullDescription": { - "text": "Ordered list items are expected to have straight numeration starting from 1. The motivation behind this is that most of Markdown processors are ignoring the numbering of ordered lists. A processor will generate an '
        ' element for such list, that will number items continuously from 1.", - "markdown": "Ordered list items are expected to have straight numeration starting from 1.\n\nThe motivation behind this is that most of Markdown processors are ignoring the numbering of ordered lists. A processor will generate an `
          ` element for such list, that will number items continuously from 1." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "MarkdownIncorrectlyNumberedListItem", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Markdown", - "index": 21, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "MarkdownLinkDestinationWithSpaces", - "shortDescription": { - "text": "Links should not contain spaces" - }, - "fullDescription": { - "text": "To ensure consistency between different tools, file links should not contain spaces. Example: '[Some file link](some file.md)' A quick-fix replaces spaces with their url-encoded equivalent: '[Some file link](some%20file.md)'", - "markdown": "To ensure consistency between different tools, file links should not contain spaces.\n\n**Example:**\n\n\n [Some file link](some file.md)\n\nA quick-fix replaces spaces with their url-encoded equivalent:\n\n\n [Some file link](some%20file.md)\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "MarkdownLinkDestinationWithSpaces", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Markdown", - "index": 21, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "MarkdownNoTableBorders", - "shortDescription": { - "text": "Table doesn't have side borders" - }, - "fullDescription": { - "text": "Checks if table has correct side borders. For compatibility reasons all table rows should have borders (pipe symbols) at the start and at the end.", - "markdown": "Checks if table has correct side borders. For compatibility reasons all table rows should have borders (pipe symbols) at the start and at the end." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "MarkdownNoTableBorders", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Markdown", - "index": 21, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "MarkdownUnresolvedFileReference", - "shortDescription": { - "text": "Unresolved file references" - }, - "fullDescription": { - "text": "Reports unresolved file references in Markdown files.", - "markdown": "Reports unresolved file references in Markdown files." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "MarkdownUnresolvedFileReference", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Markdown", - "index": 21, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "MarkdownUnresolvedHeaderReference", - "shortDescription": { - "text": "Unresolved header reference" - }, - "fullDescription": { - "text": "Reports unresolved header references in Markdown files.", - "markdown": "Reports unresolved header references in Markdown files." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "MarkdownUnresolvedHeaderReference", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Markdown", - "index": 21, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "com.jetbrains.restClient", - "version": "241.18034.45", - "rules": [ - { - "id": "HttpRequestRequestSeparatorJsonBodyInspection", - "shortDescription": { - "text": "Missing request separator in JSON body" - }, - "fullDescription": { - "text": "Reports possible requests in injected JSON body where request separator '###' is missing. The quick fix suggests adding the separator '###' before the request.", - "markdown": "Reports possible requests in injected JSON body where request separator `###` is missing. The quick fix suggests adding the separator `###` before the request." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "HttpRequestRequestSeparatorJsonBodyInspection", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "HTTP Client", - "index": 23, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HttpRequestWhitespaceInsideRequestTargetPath", - "shortDescription": { - "text": "Whitespace in URL in request" - }, - "fullDescription": { - "text": "Highlights spaces inside URL path segments. HTTP Client will ignore them. For better composing use Split Lines action.", - "markdown": "Highlights spaces inside URL path segments. HTTP Client will ignore them. For better composing use Split Lines action." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "HttpRequestWhitespaceInsideRequestTargetPath", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "HTTP Client", - "index": 23, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HttpClientUnresolvedAuthId", - "shortDescription": { - "text": "Unresolved Auth identifier" - }, - "fullDescription": { - "text": "Highlights references to non-existent Auth configurations. Suggests creating a new one in the current environment.", - "markdown": "Highlights references to non-existent Auth configurations. Suggests creating a new one in the current environment." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "HttpClientUnresolvedAuthId", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "HTTP Client", - "index": 23, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HttpRequestEnvironmentAuthConfigurationValidationInspection", - "shortDescription": { - "text": "Auth configuration validation" - }, - "fullDescription": { - "text": "Reports Auth configuration the following problems in HTTP Client environment files: Missing properties in Auth configuration Auth/Security configuration placed in private environment file", - "markdown": "Reports Auth configuration the following problems in HTTP Client environment files:\n\n* Missing properties in Auth configuration\n* Auth/Security configuration placed in private environment file" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "HttpRequestEnvironmentAuthConfigurationValidationInspection", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "HTTP Client", - "index": 23, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HttpRequestContentLengthIsIgnored", - "shortDescription": { - "text": "Redundant 'Content-Length'" - }, - "fullDescription": { - "text": "Reports an explicitly set 'Content-Length' header. The header is redundant because HTTP Client uses the actual request body length.", - "markdown": "Reports an explicitly set `Content-Length` header. The header is redundant because HTTP Client uses the actual request body length." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "HttpRequestContentLengthIsIgnored", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "HTTP Client", - "index": 23, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HttpRequestRequestSeparatorXmlBodyInspection", - "shortDescription": { - "text": "Missing request separator in HTML/XML body" - }, - "fullDescription": { - "text": "Reports possible requests in injected XML/HTML body where request separator '###' is missing. The quick fix suggests adding the separator '###' before the request.", - "markdown": "Reports possible requests in injected XML/HTML body where request separator `###` is missing. The quick fix suggests adding the separator `###` before the request." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "HttpRequestRequestSeparatorXmlBodyInspection", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "HTTP Client", - "index": 23, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "IncorrectHttpHeaderInspection", - "shortDescription": { - "text": "Incorrect HTTP header" - }, - "fullDescription": { - "text": "Reports unknown HTTP headers that do not match any publicly known headers. The quick fix suggests adding the header to the list of custom headers when the Use custom HTTP headers option is enabled. HTTP headers from the list of custom headers will not trigger the inspection.", - "markdown": "Reports unknown HTTP headers that do not match any [publicly\nknown headers](https://www.iana.org/assignments/message-headers/message-headers.xml). The quick fix suggests adding the header to the list of custom headers when the **Use custom HTTP headers** option\nis enabled. HTTP headers from the list of custom headers will not trigger the inspection." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "IncorrectHttpHeaderInspection", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "HTTP Client", - "index": 23, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HttpClientInappropriateProtocolUsageInspection", - "shortDescription": { - "text": "Inappropriate HTTP Protocol usage" - }, - "fullDescription": { - "text": "Reports inappropriate usage of HTTP protocol keyword, e.g. 'HTTP/2', with non-HTTP method requests. Such a usage will be ignored.", - "markdown": "Reports inappropriate usage of HTTP protocol keyword, e.g. `HTTP/2`, with non-HTTP method requests. Such a usage will be ignored." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "HttpClientInappropriateProtocolUsageInspection", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "HTTP Client", - "index": 23, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HttpRequestPlaceholder", - "shortDescription": { - "text": "'$placeholder' in HTTP Request" - }, - "fullDescription": { - "text": "Reports a '$placeholder' inside a request. A '$placeholder' to be replaced by the user is created automatically when a tool cannot recognize a part of a request. For example, a request mapping '/aaaa/*/bbb' will be generated as 'GET localhost/aaaa/{{$placeholder}}/bbb'.", - "markdown": "Reports a `$placeholder` inside a request.\n\nA `$placeholder` to be replaced by the user is created automatically when a tool cannot recognize a part of a request. For example, a request mapping `/aaaa/*/bbb` will be generated as `GET localhost/aaaa/{{$placeholder}}/bbb`." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "HttpRequestPlaceholder", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "HTTP Client", - "index": 23, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HttpClientUnresolvedVariable", - "shortDescription": { - "text": "Unresolved environment variable" - }, - "fullDescription": { - "text": "Reports variables undeclared in the current environment HTTP Client. Executing requests with undeclared variables probably fail. Consider adding a variable to the environment or selecting an environment with this variable. Inspection doesn't report variables in request bodies, because it can be a valid syntax of the body. Some variables may be not reported as unresolved, because they are declared in response or pre-request handler scripts via 'client.global.set' or 'request.variables.set' functions call.", - "markdown": "Reports variables undeclared in the current environment HTTP Client.\n\n\nExecuting requests with undeclared variables probably fail.\nConsider adding a variable to the environment or selecting an environment with this variable.\n\nInspection doesn't report variables in request bodies, because it can be a valid syntax of the body.\n\n\nSome variables may be not reported as unresolved, because they are declared in response or pre-request handler scripts via\n`client.global.set` or `request.variables.set` functions call." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "HttpClientUnresolvedVariable", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "HTTP Client", - "index": 23, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HttpRequestRequestSeparatorYamlBodyInspection", - "shortDescription": { - "text": "Missing request separator in YAML body" - }, - "fullDescription": { - "text": "Reports possible requests in injected YAML body where request separator '###' is missing. The quick fix suggests adding the separator '###' before the request.", - "markdown": "Reports possible requests in injected YAML body where request separator `###` is missing. The quick fix suggests adding the separator `###` before the request." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "HttpRequestRequestSeparatorYamlBodyInspection", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "HTTP Client", - "index": 23, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HttpUrlsUsage", - "shortDescription": { - "text": "Link with unencrypted protocol" - }, - "fullDescription": { - "text": "Reports the links that use unencrypted protocols (such as HTTP), which can expose your data to man-in-the-middle attacks. These attacks are dangerous in general and may be especially harmful for artifact repositories. Use protocols with encryption, such as HTTPS, instead. See HTTPS: Difference from HTTP (wikipedia.org).", - "markdown": "Reports the links that use unencrypted protocols (such as HTTP), which can expose your data to man-in-the-middle attacks. These attacks\nare dangerous in general and may be especially harmful for artifact repositories. Use protocols with encryption, such as HTTPS,\ninstead.\n\nSee [HTTPS: Difference from HTTP (wikipedia.org)](https://en.wikipedia.org/wiki/HTTPS#Difference_from_HTTP)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "HttpUrlsUsage", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Security", - "index": 77, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "com.intellij.dts", - "version": "241.18034.45", - "rules": [ - { - "id": "DtsPropertyEnum", - "shortDescription": { - "text": "Invalid property value (enum)" - }, - "fullDescription": { - "text": "Reports enum properties with invalid values. The values of an enum property are specified in the node binding.", - "markdown": "Reports enum properties with invalid values. The values of an enum property are specified in the node binding." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "DtsPropertyEnum", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Devicetree", - "index": 24, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "DtsDuplicateElement", - "shortDescription": { - "text": "Duplicate element" - }, - "fullDescription": { - "text": "Reports duplicated elements inside a node. This could either be two or more properties with the same name or two or more nodes.", - "markdown": "Reports duplicated elements inside a node. This could either be two or more properties with the same name or two or more nodes." - }, - "defaultConfiguration": { - "enabled": true, - "level": "error", - "parameters": { - "suppressToolId": "DtsDuplicateElement", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Devicetree", - "index": 24, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "DtsRequiredProperty", - "shortDescription": { - "text": "Required properties" - }, - "fullDescription": { - "text": "Reports missing required properties. Properties are considered required if they are marked as required in the binding.", - "markdown": "Reports missing required properties. Properties are considered required if they are marked as required in the binding." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "DtsRequiredProperty", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Devicetree", - "index": 24, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "DtsBits", - "shortDescription": { - "text": "Invalid array element size" - }, - "fullDescription": { - "text": "Reports invalid array element size. Array elements must be 8, 16, 32 or 64-bits.", - "markdown": "Reports invalid array element size. Array elements must be 8, 16, 32 or 64-bits." - }, - "defaultConfiguration": { - "enabled": true, - "level": "error", - "parameters": { - "suppressToolId": "DtsBits", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Devicetree", - "index": 24, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "DtsNodeName", - "shortDescription": { - "text": "Invalid node name" - }, - "fullDescription": { - "text": "Reports invalid node names. Node names should match '[a-zA-Z0-9,._+@-]+' and should only include at most one '@'.", - "markdown": "Reports invalid node names. Node names should match `[a-zA-Z0-9,._+@-]+` and should only include at most one `@`." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "DtsNodeName", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Devicetree", - "index": 24, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "DtsPropertyType", - "shortDescription": { - "text": "Invalid property type" - }, - "fullDescription": { - "text": "Reports properties with invalid type. The type of the property is specified in the node binding.", - "markdown": "Reports properties with invalid type. The type of the property is specified in the node binding." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "DtsPropertyType", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Devicetree", - "index": 24, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "DtsLabelName", - "shortDescription": { - "text": "Invalid label name" - }, - "fullDescription": { - "text": "Reports invalid label names. Label names should match '[a-zA-Z_][a-zA-Z0-9_]*'.", - "markdown": "Reports invalid label names. Label names should match `[a-zA-Z_][a-zA-Z0-9_]*`." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "DtsLabelName", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Devicetree", - "index": 24, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "DtsUnitName", - "shortDescription": { - "text": "Invalid unit name" - }, - "fullDescription": { - "text": "Reports invalid unit names inside node names. Unit names should not have leading 0s or start with 0x.", - "markdown": "Reports invalid unit names inside node names. Unit names should not have leading 0s or start with 0x." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "DtsUnitName", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Devicetree", - "index": 24, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "DtsPropertyName", - "shortDescription": { - "text": "Invalid property name" - }, - "fullDescription": { - "text": "Reports invalid property names. Property names should match '[a-zA-Z0-9,._+*#?-]+'.", - "markdown": "Reports invalid property names. Property names should match `[a-zA-Z0-9,._+*#?-]+`." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "DtsPropertyName", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Devicetree", - "index": 24, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "DtsContainer", - "shortDescription": { - "text": "Invalid entry location" - }, - "fullDescription": { - "text": "Reports if an entry is not valid in its current location. For example if a property was defied on the root level of a devicetree source file.", - "markdown": "Reports if an entry is not valid in its current location. For example if a property was defied on the root level of a devicetree source file." - }, - "defaultConfiguration": { - "enabled": true, - "level": "error", - "parameters": { - "suppressToolId": "DtsContainer", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Devicetree", - "index": 24, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "DtsPropertyConst", - "shortDescription": { - "text": "Invalid property value (const)" - }, - "fullDescription": { - "text": "Reports const properties with invalid values. The value of a const property is specified in the node binding.", - "markdown": "Reports const properties with invalid values. The value of a const property is specified in the node binding." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "DtsPropertyConst", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Devicetree", - "index": 24, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "DtsStatementOrder", - "shortDescription": { - "text": "Invalid entry order" - }, - "fullDescription": { - "text": "Reports if property and node entries are in the wrong order. Property definitions should always come before node definitions.", - "markdown": "Reports if property and node entries are in the wrong order. Property definitions should always come before node definitions." - }, - "defaultConfiguration": { - "enabled": true, - "level": "error", - "parameters": { - "suppressToolId": "DtsStatementOrder", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Devicetree", - "index": 24, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "DtsUndeclaredProperty", - "shortDescription": { - "text": "Undeclared property" - }, - "fullDescription": { - "text": "Reports undeclared properties. Properties are undeclared if there not present in the properties section of the binding. There are some exceptions: Property name ends with: '-controller' Property name starts with: '#' Property name starts with: 'pinctrl-' And the following properties are allowed: status compatible phandle ranges device_type interrupts-extended interrupt-parent", - "markdown": "Reports undeclared properties. Properties are undeclared if there not present in the properties section of the binding. \n\nThere are some exceptions:\n\n* Property name ends with: `-controller`\n* Property name starts with: `#`\n* Property name starts with: `pinctrl-`\n\nAnd the following properties are allowed:\n\n\n\n* status\n* compatible\n* phandle\n* ranges\n* device_type\n* interrupts-extended\n* interrupt-parent" - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "DtsUndeclaredProperty", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Devicetree", - "index": 24, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "HtmlTools", - "version": "241.18034.45", - "rules": [ - { - "id": "HtmlRequiredAltAttribute", - "shortDescription": { - "text": "Missing required 'alt' attribute" - }, - "fullDescription": { - "text": "Reports a missing 'alt' attribute in a 'img' or 'applet' tag or in a 'area' element of an image map. Suggests adding a required attribute with a text alternative for the contents of the tag. Based on WCAG 2.0: H24, H35, H36, H37.", - "markdown": "Reports a missing `alt` attribute in a `img` or `applet` tag or in a `area` element of an image map. Suggests adding a required attribute with a text alternative for the contents of the tag. Based on WCAG 2.0: [H24](https://www.w3.org/TR/WCAG20-TECHS/H24.html), [H35](https://www.w3.org/TR/WCAG20-TECHS/H35.html), [H36](https://www.w3.org/TR/WCAG20-TECHS/H36.html), [H37](https://www.w3.org/TR/WCAG20-TECHS/H37.html)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "HtmlRequiredAltAttribute", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "HTML/Accessibility", - "index": 32, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HtmlFormInputWithoutLabel", - "shortDescription": { - "text": "Missing associated label" - }, - "fullDescription": { - "text": "Reports a form element ('input', 'textarea', or 'select') without an associated label. Suggests creating a new label. Based on WCAG 2.0: H44.", - "markdown": "Reports a form element (`input`, `textarea`, or `select`) without an associated label. Suggests creating a new label. Based on WCAG 2.0: [H44](https://www.w3.org/TR/WCAG20-TECHS/H44.html). " - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "HtmlFormInputWithoutLabel", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "HTML/Accessibility", - "index": 32, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HtmlRequiredTitleAttribute", - "shortDescription": { - "text": "Missing required 'title' attribute" - }, - "fullDescription": { - "text": "Reports a missing title attribute 'frame', 'iframe', 'dl', and 'a' tags. Suggests adding a title attribute. Based on WCAG 2.0: H33, H40, and H64.", - "markdown": "Reports a missing title attribute `frame`, `iframe`, `dl`, and `a` tags. Suggests adding a title attribute. Based on WCAG 2.0: [H33](https://www.w3.org/TR/WCAG20-TECHS/H33.html), [H40](https://www.w3.org/TR/WCAG20-TECHS/H40.html), and [H64](https://www.w3.org/TR/WCAG20-TECHS/H64.html)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "HtmlRequiredTitleAttribute", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "HTML/Accessibility", - "index": 32, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HtmlDeprecatedTag", - "shortDescription": { - "text": "Obsolete tag" - }, - "fullDescription": { - "text": "Reports an obsolete HTML5 tag. Suggests replacing the obsolete tag with a CSS or another tag.", - "markdown": "Reports an obsolete HTML5 tag. Suggests replacing the obsolete tag with a CSS or another tag." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "HtmlDeprecatedTag", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "HTML", - "index": 25, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CheckImageSize", - "shortDescription": { - "text": "Mismatched image size" - }, - "fullDescription": { - "text": "Reports a 'width' and 'height' attribute value of a 'img' tag that is different from the actual width and height of the referenced image.", - "markdown": "Reports a `width` and `height` attribute value of a `img` tag that is different from the actual width and height of the referenced image." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "CheckImageSize", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "HTML", - "index": 25, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HtmlRequiredSummaryAttribute", - "shortDescription": { - "text": "Missing required 'summary' attribute" - }, - "fullDescription": { - "text": "Reports a missing 'summary' attribute in a 'table' tag. Suggests adding a'summary' attribute. Based on WCAG 2.0: H73.", - "markdown": "Reports a missing `summary` attribute in a `table` tag. Suggests adding a`summary` attribute. Based on WCAG 2.0: [H73](https://www.w3.org/TR/WCAG20-TECHS/H73.html)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "HtmlRequiredSummaryAttribute", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "HTML/Accessibility", - "index": 32, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HtmlRequiredLangAttribute", - "shortDescription": { - "text": "Missing required 'lang' attribute" - }, - "fullDescription": { - "text": "Reports a missing 'lang' (or 'xml:lang') attribute in a 'html' tag. Suggests adding a required attribute to state the default language of the document. Based on WCAG 2.0: H57.", - "markdown": "Reports a missing `lang` (or `xml:lang`) attribute in a `html` tag. Suggests adding a required attribute to state the default language of the document. Based on WCAG 2.0: [H57](https://www.w3.org/TR/WCAG20-TECHS/H57.html)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "HtmlRequiredLangAttribute", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "HTML/Accessibility", - "index": 32, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HtmlNonExistentInternetResource", - "shortDescription": { - "text": "Unresolved web link" - }, - "fullDescription": { - "text": "Reports an unresolved web link. Works by making network requests in the background.", - "markdown": "Reports an unresolved web link. Works by making network requests in the background." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "HtmlNonExistentInternetResource", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "HTML", - "index": 25, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HtmlRequiredTitleElement", - "shortDescription": { - "text": "Missing required 'title' element" - }, - "fullDescription": { - "text": "Reports a missing 'title' element inside a 'head' section. Suggests adding a 'title' element. The title should describe the document. Based on WCAG 2.0: H25.", - "markdown": "Reports a missing `title` element inside a `head` section. Suggests adding a `title` element. The title should describe the document. Based on WCAG 2.0: [H25](https://www.w3.org/TR/WCAG20-TECHS/H25.html)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "HtmlRequiredTitleElement", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "HTML/Accessibility", - "index": 32, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HtmlDeprecatedAttribute", - "shortDescription": { - "text": "Obsolete attribute" - }, - "fullDescription": { - "text": "Reports an obsolete HTML5 attribute.", - "markdown": "Reports an obsolete HTML5 attribute." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "HtmlDeprecatedAttribute", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "HTML", - "index": 25, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "HtmlPresentationalElement", - "shortDescription": { - "text": "Presentational tag" - }, - "fullDescription": { - "text": "Reports a presentational HTML tag. Suggests replacing the presentational tag with a CSS or another tag.", - "markdown": "Reports a presentational HTML tag. Suggests replacing the presentational tag with a CSS or another tag." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "HtmlPresentationalElement", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "HTML", - "index": 25, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "Docker", - "version": "241.18034.45", - "rules": [ - { - "id": "ComposeMissingKeys", - "shortDescription": { - "text": "Missing docker-compose YAML keys" - }, - "fullDescription": { - "text": "Reports missing required keys in Docker Compose files.", - "markdown": "Reports missing required keys in Docker Compose files. " - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "ComposeMissingKeys", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Docker-compose", - "index": 36, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "DockerFileAssignments", - "shortDescription": { - "text": "Invalid spaces in ''key=value'' pair" - }, - "fullDescription": { - "text": "Reports incorrect spacing for key-value pairs in 'ARG', 'ENV', and 'LABEL' commands. While it is not explicitly specified in the Dockerfile specification, some combinations of spacing for key-value pairs are not allowed. Docker build will fail after reaching the problem instruction. Examples: The 'ARG' command does not allow any spaces around '=' 'ENV' and 'LABEL' do not allow spaces after '=' '# all the commands below will fail\n ARG answer = 42\n ARG version= \"1.0.0\"\n LABEL \"maintained.by\"= someone@gmail.com\n ENV JAVA_HOME= \"/docker-java-home\"' After the quick-fix is applied: 'ARG answer=2\n ARG version=\"1.0.0\"\n LABEL \"maintained.by\"=someone@gmail.com\n ENV JAVA_HOME=\"/docker-java-home\"'", - "markdown": "Reports incorrect spacing for key-value pairs in `ARG`, `ENV`, and `LABEL` commands.\n\n\nWhile it is not explicitly specified in the [Dockerfile specification](https://docs.docker.com/engine/reference/builder/#arg),\nsome combinations of spacing for key-value pairs are not allowed.\nDocker build will fail after reaching the problem instruction.\n\n**Examples:**\n\n* The `ARG` command does not allow any spaces around '='\n* `ENV` and `LABEL` do not allow spaces after '='\n\n\n # all the commands below will fail\n ARG answer = 42\n ARG version= \"1.0.0\"\n LABEL \"maintained.by\"= someone@gmail.com\n ENV JAVA_HOME= \"/docker-java-home\"\n\nAfter the quick-fix is applied:\n\n\n ARG answer=2\n ARG version=\"1.0.0\"\n LABEL \"maintained.by\"=someone@gmail.com\n ENV JAVA_HOME=\"/docker-java-home\"\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "DockerFileAssignments", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Dockerfile", - "index": 40, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "DockerFileAddOrCopyPaths", - "shortDescription": { - "text": "Invalid destination for ''ADD''/''COPY'' commands" - }, - "fullDescription": { - "text": "Reports invalid destination directories in 'ADD' and 'COPY' commands. According to the Dockerfile specification, if multiple sources are specified, then the destination must be a directory, and it must end with a slash '/'. Otherwise, Docker build will fail. Examples: '# all the commands below will fail\n ADD textA.txt textB.txt relativeDir\n ADD [\"binaryA.jar\", \"binary2.jar\", \"destination\"]\n COPY text3.txt text4.txt /absolute/path' After the quick-fix is applied: 'ADD textA.txt textB.txt relativeDir/\n ADD [\"binaryA.jar\", \"binary2.jar\", \"destination/\"]\n COPY text3.txt text4.txt /absolute/path/'", - "markdown": "Reports invalid destination directories in `ADD` and `COPY` commands.\n\n\nAccording to the [Dockerfile specification](https://docs.docker.com/engine/reference/builder/#add),\nif multiple sources are specified, then the destination must be a directory, and it must end with a slash '/'.\nOtherwise, Docker build will fail.\n\n**Examples:**\n\n\n # all the commands below will fail\n ADD textA.txt textB.txt relativeDir\n ADD [\"binaryA.jar\", \"binary2.jar\", \"destination\"]\n COPY text3.txt text4.txt /absolute/path\n\nAfter the quick-fix is applied:\n\n\n ADD textA.txt textB.txt relativeDir/\n ADD [\"binaryA.jar\", \"binary2.jar\", \"destination/\"]\n COPY text3.txt text4.txt /absolute/path/\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "DockerFileAddOrCopyPaths", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Dockerfile", - "index": 40, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "DockerFileRunCommandMissingContinuation", - "shortDescription": { - "text": "Missing continuation character for ''RUN'' command" - }, - "fullDescription": { - "text": "Reports missing continuation characters in 'RUN' command. In the shell form of 'RUN' command you should use a '\\' (backslash) to continue a single 'RUN' instruction onto the next line. Otherwise, Docker build will fail. Examples: '# the command below will fail\n RUN /bin/bash -c 'source $HOME/.bashrc;\n echo $HOME'' After the quick-fix is applied: 'RUN /bin/bash -c 'source $HOME/.bashrc; \\\n echo $HOME''", - "markdown": "Reports missing continuation characters in `RUN` command.\n\n\nIn the *shell* form of `RUN` command you should use a '\\\\' (backslash)\nto continue a single `RUN` instruction onto the next line.\nOtherwise, Docker build will fail.\n\n**Examples:**\n\n\n # the command below will fail\n RUN /bin/bash -c 'source $HOME/.bashrc;\n echo $HOME'\n\nAfter the quick-fix is applied:\n\n\n RUN /bin/bash -c 'source $HOME/.bashrc; \\\n echo $HOME'\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "DockerFileRunCommandMissingContinuation", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Dockerfile", - "index": 40, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "DockerJsonFormStringLiterals", - "shortDescription": { - "text": "A single quoted string in JSON array format" - }, - "fullDescription": { - "text": "Reports a single quoted string in JSON array format. JSON array form, must use double-quotes (\") around words not single-quotes ('). Otherwise, Docker build will fail. Examples: '# all the commands below will fail\n RUN ['/bin/bash', '-c', 'echo hello']\n ADD ['binaryA.jar', 'binary2.jar', 'destination/']\n COPY ['binaryA.jar', 'binary2.jar', 'destination/']' After the quick-fix is applied: 'RUN [\"/bin/bash\", \"-c\", \"echo hello\"]\n ADD [\"binaryA.jar\", \"binary2.jar\", \"destination/\"]\n COPY [\"binaryA.jar\", \"binary2.jar\", \"destination/\"]'", - "markdown": "Reports a single quoted string in JSON array format.\n\n\nJSON array form, must use double-quotes (\") around words not single-quotes ('). Otherwise, Docker build will fail.\n\n**Examples:**\n\n\n # all the commands below will fail\n RUN ['/bin/bash', '-c', 'echo hello']\n ADD ['binaryA.jar', 'binary2.jar', 'destination/']\n COPY ['binaryA.jar', 'binary2.jar', 'destination/']\n\nAfter the quick-fix is applied:\n\n\n RUN [\"/bin/bash\", \"-c\", \"echo hello\"]\n ADD [\"binaryA.jar\", \"binary2.jar\", \"destination/\"]\n COPY [\"binaryA.jar\", \"binary2.jar\", \"destination/\"]\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "DockerJsonFormStringLiterals", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Dockerfile", - "index": 40, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ComposeUnknownValues", - "shortDescription": { - "text": "Unknown docker-compose YAML values" - }, - "fullDescription": { - "text": "Reports unrecognized values in Docker Compose files.", - "markdown": "Reports unrecognized values in Docker Compose files. " - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "ComposeUnknownValues", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Docker-compose", - "index": 36, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ComposeUnknownKeys", - "shortDescription": { - "text": "Unknown docker-compose YAML keys" - }, - "fullDescription": { - "text": "Reports unrecognized keys in Docker Compose files.", - "markdown": "Reports unrecognized keys in Docker Compose files. " - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "ComposeUnknownKeys", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Docker-compose", - "index": 36, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "ComposeUnquotedPorts", - "shortDescription": { - "text": "Unquoted port mappings" - }, - "fullDescription": { - "text": "Reports unquoted port mappings in Docker Compose files. According to the Compose file specification, mapping ports in the 'HOST:CONTAINER' format may lead to erroneous results when using a container port lower than 60, because YAML parses numbers in the format 'xx:yy' as a base-60 value. For this reason, we recommend always explicitly specifying the port mappings as strings. Examples: 'ports:\n - 3000\n - 3000-3005\n - 22:22\n - 8080:8080' After the quick-fix is applied: 'ports:\n - \"3000\"\n - \"3000-3005\"\n - \"22:22\"\n - \"8080:8080\"'", - "markdown": "Reports unquoted port mappings in Docker Compose files.\n\n\nAccording to the [Compose file specification](https://docs.docker.com/compose/compose-file/compose-file-v3/#short-syntax-1),\nmapping ports in the `HOST:CONTAINER` format may lead to erroneous results when using a container port lower than 60,\nbecause YAML parses numbers in the format `xx:yy` as a base-60 value.\nFor this reason, we recommend always explicitly specifying the port mappings as strings.\n\n**Examples:**\n\n\n ports:\n - 3000\n - 3000-3005\n - 22:22\n - 8080:8080\n\nAfter the quick-fix is applied:\n\n\n ports:\n - \"3000\"\n - \"3000-3005\"\n - \"22:22\"\n - \"8080:8080\"\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "ComposeUnquotedPorts", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Docker-compose", - "index": 36, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "DockerFileArgumentCount", - "shortDescription": { - "text": "Wrong number of arguments" - }, - "fullDescription": { - "text": "Reports invalid number of arguments for the Dockerfile commands. Docker build will fail after reaching the instruction with an invalid number of arguments.", - "markdown": "Reports invalid number of arguments for the Dockerfile commands.\n\n\nDocker build will fail after reaching the instruction with an invalid number of arguments." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "DockerFileArgumentCount", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Dockerfile", - "index": 40, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "com.intellij.css", - "version": "241.18034.45", - "rules": [ - { - "id": "CssInvalidHtmlTagReference", - "shortDescription": { - "text": "Invalid type selector" - }, - "fullDescription": { - "text": "Reports a CSS type selector that matches an unknown HTML element.", - "markdown": "Reports a CSS [type selector](https://developer.mozilla.org/en-US/docs/Web/CSS/Type_selectors) that matches an unknown HTML element." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "CssInvalidHtmlTagReference", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "CSS/Invalid elements", - "index": 39, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssInvalidCustomPropertyAtRuleDeclaration", - "shortDescription": { - "text": "Invalid @property declaration" - }, - "fullDescription": { - "text": "Reports a missing required syntax, inherits, or initial-value property in a declaration of a custom property.", - "markdown": "Reports a missing required [syntax](https://developer.mozilla.org/en-US/docs/web/css/@property/syntax), [inherits](https://developer.mozilla.org/en-US/docs/web/css/@property/inherits), or [initial-value](https://developer.mozilla.org/en-US/docs/web/css/@property/initial-value) property in a declaration of a custom property." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "CssInvalidCustomPropertyAtRuleDeclaration", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "CSS/Invalid elements", - "index": 39, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssInvalidFunction", - "shortDescription": { - "text": "Invalid function" - }, - "fullDescription": { - "text": "Reports an unknown CSS function or an incorrect function parameter.", - "markdown": "Reports an unknown [CSS function](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Functions) or an incorrect function parameter." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "CssInvalidFunction", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "CSS/Invalid elements", - "index": 39, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssMissingSemicolon", - "shortDescription": { - "text": "Missing semicolon" - }, - "fullDescription": { - "text": "Reports a missing semicolon at the end of a declaration.", - "markdown": "Reports a missing semicolon at the end of a declaration." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "CssMissingSemicolon", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "CSS/Code style issues", - "index": 49, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssRedundantUnit", - "shortDescription": { - "text": "Redundant measure unit" - }, - "fullDescription": { - "text": "Reports a measure unit of a zero value where units are not required by the specification. Example: 'width: 0px'", - "markdown": "Reports a measure unit of a zero value where units are not required by the specification.\n\n**Example:**\n\n width: 0px\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "CssRedundantUnit", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "CSS/Code style issues", - "index": 49, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssMissingComma", - "shortDescription": { - "text": "Missing comma in selector list" - }, - "fullDescription": { - "text": "Reports a multi-line selector. Most likely this means that several single-line selectors are actually intended but a comma is missing at the end of one or several lines. Example: 'input /* comma has probably been forgotten */\n.button {\n margin: 1px;\n}'", - "markdown": "Reports a multi-line selector. Most likely this means that several single-line selectors are actually intended but a comma is missing at the end of one or several lines.\n\n**Example:**\n\n\n input /* comma has probably been forgotten */\n .button {\n margin: 1px;\n }\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "CssMissingComma", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "CSS/Probable bugs", - "index": 61, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssInvalidPropertyValue", - "shortDescription": { - "text": "Invalid property value" - }, - "fullDescription": { - "text": "Reports an incorrect CSS property value.", - "markdown": "Reports an incorrect CSS property value." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "CssInvalidPropertyValue", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "CSS/Invalid elements", - "index": 39, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssBrowserCompatibilityForProperties", - "shortDescription": { - "text": "Property is incompatible with selected browsers" - }, - "fullDescription": { - "text": "Reports a CSS property that is not supported by the specified browsers. Based on the MDN Compatibility Data.", - "markdown": "Reports a CSS property that is not supported by the specified browsers. Based on the [MDN Compatibility Data](https://github.com/mdn/browser-compat-data)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "CssBrowserCompatibilityForProperties", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "CSS", - "index": 38, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssInvalidCustomPropertyAtRuleName", - "shortDescription": { - "text": "Invalid @property name" - }, - "fullDescription": { - "text": "Reports an invalid custom property name. Custom property name should be prefixed with two dashes. Example: '@property invalid-property-name {\n ...\n}\n\n@property --valid-property-name {\n ...\n}'", - "markdown": "Reports an invalid custom property name. Custom property name should be prefixed with two dashes.\n\n**Example:**\n\n\n @property invalid-property-name {\n ...\n }\n\n @property --valid-property-name {\n ...\n }\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "CssInvalidCustomPropertyAtRuleName", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "CSS/Invalid elements", - "index": 39, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssConvertColorToHexInspection", - "shortDescription": { - "text": "Color could be replaced with #-hex" - }, - "fullDescription": { - "text": "Reports an 'rgb()', 'hsl()', or other color function. Suggests replacing a color function with an equivalent hexadecimal notation. Example: 'rgb(12, 15, 255)' After the quick-fix is applied: '#0c0fff'.", - "markdown": "Reports an `rgb()`, `hsl()`, or other color function.\n\nSuggests replacing a color function with an equivalent hexadecimal notation.\n\n**Example:**\n\n rgb(12, 15, 255)\n\nAfter the quick-fix is applied:\n\n #0c0fff.\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "CssConvertColorToHexInspection", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "CSS", - "index": 38, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssReplaceWithShorthandUnsafely", - "shortDescription": { - "text": "Properties may probably be replaced with a shorthand" - }, - "fullDescription": { - "text": "Reports a set of longhand CSS properties and suggests replacing an incomplete set of longhand CSS properties with a shorthand form, which is however not 100% equivalent in this case. For example, 2 properties: 'outline-color' and 'outline-style' may be replaced with a single 'outline'. Such replacement is not 100% equivalent because shorthands reset all omitted sub-values to their initial states. In this example, switching to the 'outline' shorthand means that 'outline-width' is also set to its initial value, which is 'medium'. This inspection doesn't handle full sets of longhand properties (when switching to shorthand is 100% safe). For such cases see the 'Properties may be safely replaced with a shorthand' inspection instead.", - "markdown": "Reports a set of longhand CSS properties and suggests replacing an incomplete set of longhand CSS properties with a shorthand form, which is however not 100% equivalent in this case.\n\n\nFor example, 2 properties: `outline-color` and `outline-style` may be replaced with a single `outline`.\nSuch replacement is not 100% equivalent because shorthands reset all omitted sub-values to their initial states.\nIn this example, switching to the `outline` shorthand means that `outline-width` is also set to its initial value,\nwhich is `medium`.\n\n\nThis inspection doesn't handle full sets of longhand properties (when switching to shorthand is 100% safe).\nFor such cases see the 'Properties may be safely replaced with a shorthand' inspection instead." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "CssReplaceWithShorthandUnsafely", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "CSS", - "index": 38, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssUnknownUnit", - "shortDescription": { - "text": "Unknown unit" - }, - "fullDescription": { - "text": "Reports an unknown unit.", - "markdown": "Reports an unknown unit." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "CssUnknownUnit", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "CSS/Invalid elements", - "index": 39, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssInvalidMediaFeature", - "shortDescription": { - "text": "Invalid media feature" - }, - "fullDescription": { - "text": "Reports an unknown CSS media feature or an incorrect media feature value.", - "markdown": "Reports an unknown [CSS media feature](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries) or an incorrect media feature value." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "CssInvalidMediaFeature", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "CSS/Invalid elements", - "index": 39, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssConvertColorToRgbInspection", - "shortDescription": { - "text": "Color could be replaced with rgb()" - }, - "fullDescription": { - "text": "Reports an 'hsl()' or 'hwb()' color function or a hexadecimal color notation. Suggests replacing such color value with an equivalent 'rgb()' or 'rgba()' color function. Example: '#0c0fff' After the quick-fix is applied: 'rgb(12, 15, 255)'.", - "markdown": "Reports an `hsl()` or `hwb()` color function or a hexadecimal color notation.\n\nSuggests replacing such color value with an equivalent `rgb()` or `rgba()` color function.\n\n**Example:**\n\n #0c0fff\n\nAfter the quick-fix is applied:\n\n rgb(12, 15, 255).\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "CssConvertColorToRgbInspection", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "CSS", - "index": 38, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssUnusedSymbol", - "shortDescription": { - "text": "Unused selector" - }, - "fullDescription": { - "text": "Reports a CSS class or an element IDs that appears in selectors but is not used in HTML. Note that complete inspection results are available only when running it via Code | Inspect Code or Code | Analyze Code | Run Inspection by Name. Due to performance reasons, style sheet files are not inspected on the fly.", - "markdown": "Reports a CSS class or an element IDs that appears in selectors but is not used in HTML.\n\n\nNote that complete inspection results are available only when running it via **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name**.\nDue to performance reasons, style sheet files are not inspected on the fly." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "CssUnusedSymbol", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "CSS", - "index": 38, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssDeprecatedValue", - "shortDescription": { - "text": "Deprecated value" - }, - "fullDescription": { - "text": "Reports a deprecated CSS value. Suggests replacing the deprecated value with its valid equivalent.", - "markdown": "Reports a deprecated CSS value. Suggests replacing the deprecated value with its valid equivalent." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "CssDeprecatedValue", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "CSS", - "index": 38, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssNonIntegerLengthInPixels", - "shortDescription": { - "text": "Non-integer length in pixels" - }, - "fullDescription": { - "text": "Reports a non-integer length in pixels. Example: 'width: 3.14px'", - "markdown": "Reports a non-integer length in pixels.\n\n**Example:**\n\n width: 3.14px\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "CssNonIntegerLengthInPixels", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "CSS/Probable bugs", - "index": 61, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssInvalidImport", - "shortDescription": { - "text": "Misplaced @import" - }, - "fullDescription": { - "text": "Reports a misplaced '@import' statement. According to the specification, '@import' rules must precede all other types of rules, except '@charset' rules.", - "markdown": "Reports a misplaced `@import` statement.\n\n\nAccording to the [specification](https://developer.mozilla.org/en-US/docs/Web/CSS/@import),\n`@import` rules must precede all other types of rules, except `@charset` rules." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "CssInvalidImport", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "CSS/Invalid elements", - "index": 39, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssInvalidAtRule", - "shortDescription": { - "text": "Unknown at-rule" - }, - "fullDescription": { - "text": "Reports an unknown CSS at-rule.", - "markdown": "Reports an unknown [CSS at-rule](https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "CssInvalidAtRule", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "CSS/Invalid elements", - "index": 39, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssUnresolvedCustomProperty", - "shortDescription": { - "text": "Unresolved custom property" - }, - "fullDescription": { - "text": "Reports an unresolved reference to a custom property among the arguments of the 'var()' function.", - "markdown": "Reports an unresolved reference to a [custom property](https://developer.mozilla.org/en-US/docs/Web/CSS/--*) among the arguments of the `var()` function." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "CssUnresolvedCustomProperty", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "CSS/Invalid elements", - "index": 39, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssOverwrittenProperties", - "shortDescription": { - "text": "Overwritten property" - }, - "fullDescription": { - "text": "Reports a duplicated CSS property within a ruleset. Respects shorthand properties. Example: '.foo {\n margin-bottom: 1px;\n margin-bottom: 1px; /* duplicates margin-bottom */\n margin: 0; /* overrides margin-bottom */\n}'", - "markdown": "Reports a duplicated CSS property within a ruleset. Respects shorthand properties.\n\n**Example:**\n\n\n .foo {\n margin-bottom: 1px;\n margin-bottom: 1px; /* duplicates margin-bottom */\n margin: 0; /* overrides margin-bottom */\n }\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "CssOverwrittenProperties", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "CSS", - "index": 38, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssUnknownTarget", - "shortDescription": { - "text": "Unresolved file reference" - }, - "fullDescription": { - "text": "Reports an unresolved file reference, for example, an incorrect path in an '@import' statement.", - "markdown": "Reports an unresolved file reference, for example, an incorrect path in an `@import` statement." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "CssUnknownTarget", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "CSS/Invalid elements", - "index": 39, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssNegativeValue", - "shortDescription": { - "text": "Negative property value" - }, - "fullDescription": { - "text": "Reports a negative value of a CSS property that is not expected to be less than zero, for example, object width or height.", - "markdown": "Reports a negative value of a CSS property that is not expected to be less than zero, for example, object width or height." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "CssNegativeValue", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "CSS/Invalid elements", - "index": 39, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssNoGenericFontName", - "shortDescription": { - "text": "Missing generic font family name" - }, - "fullDescription": { - "text": "Verifies that the 'font-family' property contains a generic font family name as a fallback alternative. Generic font family names are: 'serif', 'sans-serif', 'cursive', 'fantasy', and 'monospace'.", - "markdown": "Verifies that the [font-family](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family) property contains a generic font family name as a fallback alternative.\n\n\nGeneric font family names are: `serif`, `sans-serif`, `cursive`, `fantasy`,\nand `monospace`." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "CssNoGenericFontName", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "CSS/Probable bugs", - "index": 61, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssUnresolvedClassInComposesRule", - "shortDescription": { - "text": "Unresolved class in 'composes' rule" - }, - "fullDescription": { - "text": "Reports a CSS class reference in the 'composes' rule that cannot be resolved to any valid target. Example: '.className {/* ... */}\n\n .otherClassName {\n composes: className;\n }'", - "markdown": "Reports a CSS class reference in the ['composes'](https://github.com/css-modules/css-modules#composition) rule that cannot be resolved to any valid target.\n\n**Example:**\n\n\n .className {/* ... */}\n\n .otherClassName {\n composes: className;\n }\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "CssUnresolvedClassInComposesRule", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "CSS/Invalid elements", - "index": 39, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssInvalidCharsetRule", - "shortDescription": { - "text": "Misplaced or incorrect @charset" - }, - "fullDescription": { - "text": "Reports a misplaced '@charset' at-rule or an incorrect charset value.", - "markdown": "Reports a misplaced `@charset` at-rule or an incorrect charset value." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "CssInvalidCharsetRule", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "CSS/Invalid elements", - "index": 39, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssReplaceWithShorthandSafely", - "shortDescription": { - "text": "Properties may be safely replaced with a shorthand" - }, - "fullDescription": { - "text": "Reports a set of longhand properties. Suggests replacing a complete set of longhand CSS properties with an equivalent shorthand form. For example, 4 properties: 'padding-top', 'padding-right', 'padding-bottom', and 'padding-left' can be safely replaced with a single 'padding' property. Note that this inspection doesn't show up if the set of longhand properties is incomplete (e.g. only 3 'padding-xxx' properties in a ruleset) because switching to a shorthand may change the result. For such cases consider the 'Properties may probably be replaced with a shorthand' inspection.", - "markdown": "Reports a set of longhand properties. Suggests replacing a complete set of longhand CSS properties with an equivalent shorthand form.\n\n\nFor example, 4 properties: `padding-top`, `padding-right`, `padding-bottom`, and\n`padding-left`\ncan be safely replaced with a single `padding` property.\n\n\nNote that this inspection doesn't show up if the set of longhand properties is incomplete\n(e.g. only 3 `padding-xxx` properties in a ruleset)\nbecause switching to a shorthand may change the result.\nFor such cases consider the 'Properties may probably be replaced with a shorthand'\ninspection." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "CssReplaceWithShorthandSafely", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "CSS", - "index": 38, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssUnknownProperty", - "shortDescription": { - "text": "Unknown property" - }, - "fullDescription": { - "text": "Reports an unknown CSS property or a property used in a wrong context. Add the unknown property to the 'Custom CSS properties' list to skip validation.", - "markdown": "Reports an unknown CSS property or a property used in a wrong context.\n\nAdd the unknown property to the 'Custom CSS properties' list to skip validation." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "CssUnknownProperty", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "CSS/Invalid elements", - "index": 39, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssInvalidPseudoSelector", - "shortDescription": { - "text": "Invalid pseudo-selector" - }, - "fullDescription": { - "text": "Reports an incorrect CSS pseudo-class pseudo-element.", - "markdown": "Reports an incorrect CSS [pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes) [pseudo-element](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "CssInvalidPseudoSelector", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "CSS/Invalid elements", - "index": 39, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "CssInvalidNestedSelector", - "shortDescription": { - "text": "Invalid nested selector" - }, - "fullDescription": { - "text": "Reports a nested selector starting with an identifier or a functional notation.", - "markdown": "Reports a nested selector starting with an identifier or a functional notation." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "CssInvalidNestedSelector", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "CSS/Invalid elements", - "index": 39, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "org.jetbrains.plugins.yaml", - "version": "241.18034.45", - "rules": [ - { - "id": "YAMLSchemaValidation", - "shortDescription": { - "text": "Validation by JSON Schema" - }, - "fullDescription": { - "text": "Reports inconsistencies between a YAML file and a JSON Schema if the schema is specified. Scheme example: '{\n \"properties\": {\n \"SomeNumberProperty\": {\n \"type\": \"number\"\n }\n }\n }' The following is an example with the corresponding warning: 'SomeNumberProperty: hello world'", - "markdown": "Reports inconsistencies between a YAML file and a JSON Schema if the schema is specified.\n\n**Scheme example:**\n\n\n {\n \"properties\": {\n \"SomeNumberProperty\": {\n \"type\": \"number\"\n }\n }\n }\n\n**The following is an example with the corresponding warning:**\n\n\n SomeNumberProperty: hello world\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "YAMLSchemaValidation", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "YAML", - "index": 45, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "YAMLIncompatibleTypes", - "shortDescription": { - "text": "Suspicious type mismatch" - }, - "fullDescription": { - "text": "Reports a mismatch between a scalar value type in YAML file and types of the values in the similar positions. Example: 'myElements:\n - value1\n - value2\n - false # <- reported, because it is a boolean value, while other values are strings'", - "markdown": "Reports a mismatch between a scalar value type in YAML file and types of the values in the similar positions.\n\n**Example:**\n\n\n myElements:\n - value1\n - value2\n - false # <- reported, because it is a boolean value, while other values are strings\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "YAMLIncompatibleTypes", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "YAML", - "index": 45, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "YAMLUnresolvedAlias", - "shortDescription": { - "text": "Unresolved alias" - }, - "fullDescription": { - "text": "Reports unresolved aliases in YAML files. Example: 'some_key: *unknown_alias'", - "markdown": "Reports unresolved aliases in YAML files.\n\n**Example:**\n\n\n some_key: *unknown_alias\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "YAMLUnresolvedAlias", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "YAML", - "index": 45, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "YAMLSchemaDeprecation", - "shortDescription": { - "text": "Deprecated YAML key" - }, - "fullDescription": { - "text": "Reports deprecated keys in YAML files. Deprecation is checked only if there exists a JSON schema associated with the corresponding YAML file. Note that the deprecation mechanism is not defined in the JSON Schema specification yet, and this inspection uses a non-standard 'deprecationMessage' extension. Scheme deprecation example: '{\n \"properties\": {\n \"SomeDeprecatedProperty\": {\n \"deprecationMessage\": \"Baz\",\n \"description\": \"Foo bar\"\n }\n }\n }' The following is an example with the corresponding warning: 'SomeDeprecatedProperty: some value'", - "markdown": "Reports deprecated keys in YAML files.\n\nDeprecation is checked only if there exists a JSON schema associated with the corresponding YAML file.\n\nNote that the deprecation mechanism is not defined in the JSON Schema specification yet,\nand this inspection uses a non-standard `deprecationMessage` extension.\n\n**Scheme deprecation example:**\n\n\n {\n \"properties\": {\n \"SomeDeprecatedProperty\": {\n \"deprecationMessage\": \"Baz\",\n \"description\": \"Foo bar\"\n }\n }\n }\n\n**The following is an example with the corresponding warning:**\n\n\n SomeDeprecatedProperty: some value\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "YAMLSchemaDeprecation", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "YAML", - "index": 45, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "YAMLRecursiveAlias", - "shortDescription": { - "text": "Recursive alias" - }, - "fullDescription": { - "text": "Reports recursion in YAML aliases. Alias can't be recursive and be used inside the data referenced by a corresponding anchor. Example: 'some_key: &some_anchor\n sub_key1: value1\n sub_key2: *some_anchor'", - "markdown": "Reports recursion in YAML aliases.\n\nAlias can't be recursive and be used inside the data referenced by a corresponding anchor.\n\n**Example:**\n\n\n some_key: &some_anchor\n sub_key1: value1\n sub_key2: *some_anchor\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "YAMLRecursiveAlias", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "YAML", - "index": 45, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "YAMLDuplicatedKeys", - "shortDescription": { - "text": "Duplicated YAML keys" - }, - "fullDescription": { - "text": "Reports duplicated keys in YAML files. Example: 'same_key: some value\n same_key: another value'", - "markdown": "Reports duplicated keys in YAML files.\n\n**Example:**\n\n\n same_key: some value\n same_key: another value\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "YAMLDuplicatedKeys", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "YAML", - "index": 45, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "YAMLUnusedAnchor", - "shortDescription": { - "text": "Unused anchor" - }, - "fullDescription": { - "text": "Reports unused anchors. Example: 'some_key: &some_anchor\n key1: value1'", - "markdown": "Reports unused anchors.\n\n**Example:**\n\n\n some_key: &some_anchor\n key1: value1\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "YAMLUnusedAnchor", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "YAML", - "index": 45, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "org.jetbrains.plugins.less", - "version": "241.18034.45", - "rules": [ - { - "id": "LessUnresolvedMixin", - "shortDescription": { - "text": "Unresolved mixin" - }, - "fullDescription": { - "text": "Reports a reference to a Less mixin that is not resolved. Example: '* {\n .unknown-mixin();\n}'", - "markdown": "Reports a reference to a [Less mixin](http://lesscss.org/features/#mixins-feature) that is not resolved.\n\n**Example:**\n\n\n * {\n .unknown-mixin();\n }\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "LessUnresolvedMixin", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Less", - "index": 50, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "LessUnresolvedVariable", - "shortDescription": { - "text": "Unresolved variable" - }, - "fullDescription": { - "text": "Reports a reference to a Less variable that is not resolved. Example: '* {\n margin: @unknown-var;\n}'", - "markdown": "Reports a reference to a [Less variable](http://lesscss.org/features/#variables-feature) that is not resolved.\n\n**Example:**\n\n\n * {\n margin: @unknown-var;\n }\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "LessUnresolvedVariable", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Less", - "index": 50, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "LessResolvedByNameOnly", - "shortDescription": { - "text": "Missing import" - }, - "fullDescription": { - "text": "Reports a reference to a variable or mixin that is declared in another file, which is not explicitly imported in the current file. Example: '* {\n margin: @var-in-other-file;\n}'", - "markdown": "Reports a reference to a variable or mixin that is declared in another file, which is not explicitly [imported](http://lesscss.org/features/#import-atrules-feature) in the current file.\n\n**Example:**\n\n\n * {\n margin: @var-in-other-file;\n }\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "LessResolvedByNameOnly", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Less", - "index": 50, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "org.intellij.intelliLang", - "version": "241.18034.45", - "rules": [ - { - "id": "InjectedReferences", - "shortDescription": { - "text": "Injected references" - }, - "fullDescription": { - "text": "Reports unresolved references injected by Language Injections. Example: '@Language(\"file-reference\")\n String fileName = \"/home/user/nonexistent.file\"; // highlighted if file doesn't exist'", - "markdown": "Reports unresolved references injected by [Language Injections](https://www.jetbrains.com/help/idea/using-language-injections.html).\n\nExample:\n\n\n @Language(\"file-reference\")\n String fileName = \"/home/user/nonexistent.file\"; // highlighted if file doesn't exist\n" - }, - "defaultConfiguration": { - "enabled": true, - "level": "error", - "parameters": { - "suppressToolId": "InjectedReferences", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "General", - "index": 31, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "org.jetbrains.plugins.vue", - "version": "241.18034.45", - "rules": [ - { - "id": "VueDataFunction", - "shortDescription": { - "text": "Data function" - }, - "fullDescription": { - "text": "Reports a Vue component data property that is not a function. Suggests wrapping an object literal with a function. When defining a component, 'data' must be declared as a function that returns the initial data object, because the same definition will be used for creating numerous instances. If a plain object is still used for 'data', that very object will be shared by reference across all instances created! With a 'data' function, every time a new instance is created we can simply call it to return a fresh copy of the initial data.", - "markdown": "Reports a Vue component [data](https://vuejs.org/v2/api/#data) property that is not a function. Suggests wrapping an object literal with a function.\n\nWhen defining a component, `data` must be declared as a function that returns the initial data object, because the same definition will be used for creating numerous instances. If a plain object is still used for `data`, that very object will be shared by reference across all instances created! With a `data` function, every time a new instance is created we can simply call it to return a fresh copy of the initial data." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "VueDataFunction", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Vue", - "index": 52, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "VueUnrecognizedSlot", - "shortDescription": { - "text": "Unrecognized slot" - }, - "fullDescription": { - "text": "Reports an unrecognized Vue slot.", - "markdown": "Reports an unrecognized Vue slot." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "VueUnrecognizedSlot", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" - } - }, - "relationships": [ - { - "target": { - "id": "Vue", - "index": 52, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "VueMissingComponentImportInspection", - "shortDescription": { - "text": "Missing component import" - }, - "fullDescription": { - "text": "Reports Vue components, which require to be imported in Vue templates. It provides a quick fix to add the missing import.", - "markdown": "Reports Vue components, which require to be imported in Vue templates. It provides a quick fix to add the missing import." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "VueMissingComponentImportInspection", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Vue", - "index": 52, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "VueUnrecognizedDirective", - "shortDescription": { - "text": "Unrecognized directive" - }, - "fullDescription": { - "text": "Reports an unrecognized Vue directive.", - "markdown": "Reports an unrecognized Vue directive." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "VueUnrecognizedDirective", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Vue", - "index": 52, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "VueDuplicateTag", - "shortDescription": { - "text": "Duplicate template/script tag" - }, - "fullDescription": { - "text": "Reports multiple usages of the 'template' or 'script' tag in a Vue file. Vue Component specification indicates that each '*.vue' file can contain at most one 'template' or 'script' block at a time.", - "markdown": "Reports multiple usages of the `template` or `script` tag in a Vue file.\n\n[Vue Component specification](https://vue-loader.vuejs.org/spec.html) indicates that each `*.vue` file can contain at most one `template` or `script` block at a time." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "VueDuplicateTag", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Vue", - "index": 52, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "VueDeprecatedSymbol", - "shortDescription": { - "text": "Deprecated symbol" - }, - "fullDescription": { - "text": "Reports a deprecated Vue symbol.", - "markdown": "Reports a deprecated Vue symbol." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "VueDeprecatedSymbol", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Vue", - "index": 52, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "org.intellij.qodana", - "version": "241.18034.8", - "rules": [ - { - "id": "JsCoverageInspection", - "shortDescription": { - "text": "Check JavaScript and TypeScript source code coverage" - }, - "fullDescription": { - "text": "Reports methods, classes and files whose coverage is below a certain threshold.", - "markdown": "Reports methods, classes and files whose coverage is below a certain threshold." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JsCoverageInspection", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Code Coverage", - "index": 67, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "QodanaSanity", - "shortDescription": { - "text": "Sanity" - }, - "fullDescription": { - "text": "Reports issues essential to this file like syntax errors, unresolved methods and variables, etc...", - "markdown": "Reports issues essential to this file like syntax errors, unresolved methods and variables, etc..." - }, - "defaultConfiguration": { - "enabled": true, - "level": "error", - "parameters": { - "suppressToolId": "QodanaSanity", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "Qodana", - "index": 76, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "org.jetbrains.plugins.github", - "version": "241.18034.45", - "rules": [ - { - "id": "GithubFunctionSignatureValidation", - "shortDescription": { - "text": "Standard library functions validation" - }, - "fullDescription": { - "text": "Reports invalid GitHub Actions Expression language standard library function calls For more information on GitHub Actions Expression language, see the GitHub documentation.", - "markdown": "Reports invalid GitHub Actions Expression language standard library function calls\n\n\nFor more information on GitHub Actions Expression language, see the [GitHub documentation](https://docs.github.com/en/actions/learn-github-actions/expressions)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "GithubFunctionSignatureValidation", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "GitHub actions", - "index": 69, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "UndefinedParamsPresent", - "shortDescription": { - "text": "Undefined action parameters" - }, - "fullDescription": { - "text": "Reports the presence of parameters which are not defined in an action. It also provides a Quick Fix by removing the undefined parameters. For more information on action params, see the GitHub documentation.", - "markdown": "Reports the presence of parameters which are not defined in an action. It also provides a Quick Fix by removing the undefined parameters.\n\n\nFor more information on action params, see the [GitHub documentation](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runsstepswith)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "UndefinedParamsPresent", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "GitHub actions", - "index": 69, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "MandatoryParamsAbsent", - "shortDescription": { - "text": "Invalid action parameters" - }, - "fullDescription": { - "text": "Reports the absence of mandatory parameters that do not have a default value for an action. It also provides a Quick Fix by adding the missing parameters with an empty value. For more information on action params, see the GitHub documentation.", - "markdown": "Reports the absence of mandatory parameters that do not have a default value for an action. It also provides a Quick Fix by adding the missing parameters with an empty value.\n\n\nFor more information on action params, see the [GitHub documentation](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runsstepswith)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "MandatoryParamsAbsent", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "GitHub actions", - "index": 69, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "UndefinedAction", - "shortDescription": { - "text": "Undefined action reference" - }, - "fullDescription": { - "text": "Detects unresolved action references in GitHub action and workflow files. For more information on action references, see the GitHub documentation.", - "markdown": "Detects unresolved action references in GitHub action and workflow files.\n\n\nFor more information on action references, see the [GitHub documentation](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsuses)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "UndefinedAction", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "GitHub actions", - "index": 69, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "com.intellij.stylelint", - "version": "241.18034.45", - "rules": [ - { - "id": "Stylelint", - "shortDescription": { - "text": "Stylelint" - }, - "fullDescription": { - "text": "Reports a discrepancy detected by the Stylelint linter. The highlighting is based on the rule severity specified in the Stylelint configuration file for each individual rule.", - "markdown": "Reports a discrepancy detected by the [Stylelint](http://stylelint.io) linter. \n\nThe highlighting is based on the rule severity specified in the [Stylelint configuration file](https://stylelint.io/user-guide/configure) for each individual rule." - }, - "defaultConfiguration": { - "enabled": false, - "level": "error", - "parameters": { - "suppressToolId": "Stylelint", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" - } - }, - "relationships": [ - { - "target": { - "id": "CSS/Code quality tools", - "index": 71, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "intellij.webpack", - "version": "241.18034.45", - "rules": [ - { - "id": "WebpackConfigHighlighting", - "shortDescription": { - "text": "Webpack config compliance with JSON Schema" - }, - "fullDescription": { - "text": "Validates options in webpack config files (which name should start with `webpack`, e.g. `webpack.config.js`) against webpack options schema. Disable this inspection to turn off validation and code completion inside the configuration object.", - "markdown": "Validates options in webpack config files (which name should start with \\`webpack\\`, e.g. \\`webpack.config.js\\`) against [webpack options schema](https://github.com/webpack/webpack/blob/master/schemas/WebpackOptions.json). \n\nDisable this inspection to turn off validation and code completion inside the configuration object." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "WebpackConfigHighlighting", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/General", - "index": 16, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "tslint", - "version": "241.18034.45", - "rules": [ - { - "id": "TsLint", - "shortDescription": { - "text": "TSLint" - }, - "fullDescription": { - "text": "Reports a discrepancy detected by the TSLint linter. The highlighting is based on the rule severity specified in the TSLint configuration file for each individual rule. Clear the 'Use rule severity from the configuration file' checkbox to use the severity configured in this inspection for all TSLint rules.", - "markdown": "Reports a discrepancy detected by the [TSLint](https://github.com/palantir/tslint) linter. \n\nThe highlighting is based on the rule severity specified in the [TSLint configuration file](https://palantir.github.io/tslint/usage/configuration/) for each individual rule. \n\nClear the 'Use rule severity from the configuration file' checkbox to use the severity configured in this inspection for all TSLint rules." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "TsLint", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JavaScript and TypeScript/Code quality tools", - "index": 66, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "com.intellij.jsonpath", - "version": "241.18034.45", - "rules": [ - { - "id": "JsonPathEvaluateUnknownKey", - "shortDescription": { - "text": "Unknown property key used for JSONPath evaluate expression" - }, - "fullDescription": { - "text": "Reports a key in a JSONPath expression that is missing in the source JSON document to evaluate.", - "markdown": "Reports a key in a JSONPath expression that is missing in the source JSON document to evaluate." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JsonPathEvaluateUnknownKey", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JSONPath", - "index": 75, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JsonPathUnknownFunction", - "shortDescription": { - "text": "Unknown JSONPath function" - }, - "fullDescription": { - "text": "Reports an unknown name in a JSONPath function call instead of known standard function names: 'concat', 'keys', 'length', 'min', 'max', 'avg', 'stddev', 'sum'.", - "markdown": "Reports an unknown name in a JSONPath function call instead of known standard function names: `concat`, `keys`, `length`, `min`, `max`, `avg`, `stddev`, `sum`." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JsonPathUnknownFunction", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JSONPath", - "index": 75, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "JsonPathUnknownOperator", - "shortDescription": { - "text": "Unknown JSONPath operator" - }, - "fullDescription": { - "text": "Reports an unknown operator on a JSONPath expression instead of one of the standard ones: 'in', 'nin', 'subsetof', 'anyof', 'noneof', 'size', 'empty', 'contains'.", - "markdown": "Reports an unknown operator on a JSONPath expression instead of one of the standard ones: `in`, `nin`, `subsetof`, `anyof`, `noneof`, `size`, `empty`, `contains`." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "JsonPathUnknownOperator", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "JSONPath", - "index": 75, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "tanvd.grazi", - "version": "241.18034.45", - "rules": [ - { - "id": "LanguageDetectionInspection", - "shortDescription": { - "text": "Natural language detection" - }, - "fullDescription": { - "text": "Detects natural languages and suggests enabling corresponding grammar and spelling checks.", - "markdown": "Detects natural languages and suggests enabling corresponding grammar and spelling checks." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "LanguageDetectionInspection", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Proofreading", - "index": 68, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "GrazieInspection", - "shortDescription": { - "text": "Grammar" - }, - "fullDescription": { - "text": "Reports grammar mistakes in your text. You can configure the inspection in Settings | Editor | Natural Languages | Grammar.", - "markdown": "Reports grammar mistakes in your text. You can configure the inspection in [Settings \\| Editor \\| Natural Languages \\| Grammar](settings://reference.settingsdialog.project.grazie)." - }, - "defaultConfiguration": { - "enabled": false, - "level": "note", - "parameters": { - "suppressToolId": "GrazieInspection", - "ideaSeverity": "GRAMMAR_ERROR", - "qodanaSeverity": "Info" - } - }, - "relationships": [ - { - "target": { - "id": "Proofreading", - "index": 68, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "org.toml.lang", - "version": "241.18034.45", - "rules": [ - { - "id": "TomlUnresolvedReference", - "shortDescription": { - "text": "Unresolved reference" - }, - "fullDescription": { - "text": "Reports unresolved references in TOML files.", - "markdown": "Reports unresolved references in TOML files." - }, - "defaultConfiguration": { - "enabled": true, - "level": "warning", - "parameters": { - "suppressToolId": "TomlUnresolvedReference", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "TOML", - "index": 80, - "toolComponent": { - "name": "CL" - } - }, - "kinds": [ - "superset" - ] - } - ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - } - ] - }, - "invocations": [ - { - "startTimeUtc": "2024-08-05T01:26:57.0086298Z", - "exitCode": 0, - "executionSuccessful": true - } - ], - "language": "en-US", - "versionControlProvenance": [ - { - "repositoryUri": "https://github.com/opentibiabr/canary.git", - "revisionId": "43fdb88ea14c24d58ac7c9cd50b28c5196f9c5d3", - "branch": "main", - "properties": { - "repoUrl": "https://github.com/opentibiabr/canary.git", - "lastAuthorName": "Renato Foot Guimarães Costallat", - "vcsType": "Git", - "lastAuthorEmail": "costallat@hotmail.com" - } - } - ], - "results": [ - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3112, - "startColumn": 2, - "charOffset": 95313, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3110, - "startColumn": 1, - "charOffset": 95306, - "charLength": 186, - "snippet": { - "text": "\t}\r\n\r\n\tuint16_t amount = msg.get();\r\n\tuint64_t price = oldProtocol ? static_cast(msg.get()) : msg.get();\r\n\tbool anonymous = (msg.getByte() != 0);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7f50018899484f2f", - "equalIndicator/v1": "002ce4e3c9047eedc500d63944d02fc7ce8ea38a0dfd3e3f99c06ceef1158c97" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'signed char' is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'signed char' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/spectators.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 120, - "startColumn": 54, - "charOffset": 4409, - "charLength": 9, - "snippet": { - "text": "centerPos" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 118, - "startColumn": 1, - "charOffset": 4289, - "charLength": 333, - "snippet": { - "text": "\tif (multifloor) {\r\n\t\tif (centerPos.z > MAP_INIT_SURFACE_LAYER) {\r\n\t\t\tminRangeZ = static_cast(std::max(centerPos.z - MAP_LAYER_VIEW_LIMIT, 0u));\r\n\t\t\tmaxRangeZ = static_cast(std::min(centerPos.z + MAP_LAYER_VIEW_LIMIT, MAP_MAX_LAYERS - 1));\r\n\t\t} else if (centerPos.z == MAP_INIT_SURFACE_LAYER - 1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4fc5526566efba35", - "equalIndicator/v1": "004d334de55f140a7b9942527421c319880c44ed00f7575e0662732eca02a2cd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1038, - "startColumn": 100, - "charOffset": 39484, - "charLength": 6, - "snippet": { - "text": "corpse" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1036, - "startColumn": 1, - "charOffset": 39371, - "charLength": 239, - "snippet": { - "text": "\r\n// Monster\r\nvoid EventCallback::monsterOnDropLoot(std::shared_ptr monster, std::shared_ptr corpse) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::monsterOnDropLoot - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d88af56504dd865f", - "equalIndicator/v1": "004fb00d6d7fe1aa3f378e2253d7d8adc92ce7344b4fa9fe1cebce5ff8f58e37" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1216, - "startColumn": 7, - "charOffset": 46383, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1214, - "startColumn": 1, - "charOffset": 46259, - "charLength": 276, - "snippet": { - "text": "\r\nvoid EventCallback::zoneAfterCreatureLeave(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneAfterCreatureLeave - \"\r\n\t\t \"Zone {} Creature {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "14e9ffd99da27466", - "equalIndicator/v1": "00506df460be7534e24eefe56822e9a0f2228b554f549f8c43be7dfb971f000f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1200, - "startColumn": 41, - "charOffset": 45764, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1198, - "startColumn": 1, - "charOffset": 45718, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bd2302c1a1bdb0b8", - "equalIndicator/v1": "005d3d29d53506de065563e6127b224c6de4f5b38b5b0755af5bfb696d17cfe9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1937, - "startColumn": 2, - "charOffset": 59034, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1935, - "startColumn": 1, - "charOffset": 58967, - "charLength": 229, - "snippet": { - "text": "\r\nvoid ProtocolGame::parsePlayerBuyOnShop(NetworkMessage &msg) {\r\n\tuint16_t id = msg.get();\r\n\tuint8_t count = msg.getByte();\r\n\tuint16_t amount = oldProtocol ? static_cast(msg.getByte()) : msg.get();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5a2e28489ef0999e", - "equalIndicator/v1": "00686a79b6f8930a89ad12d9036583ef29efb7130b7706d2c5db1707c7bee443" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1110, - "startColumn": 38, - "charOffset": 32995, - "charLength": 11, - "snippet": { - "text": "static_cast" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1108, - "startColumn": 1, - "charOffset": 32835, - "charLength": 350, - "snippet": { - "text": "\r\n\t\tif (!mType->info.soundVector.empty() && (mType->info.soundChance >= static_cast(uniform_random(1, 100)))) {\r\n\t\t\tint64_t index = uniform_random(0, static_cast(mType->info.soundVector.size() - 1));\r\n\t\t\tg_game().sendSingleSoundEffect(static_self_cast()->getPosition(), mType->info.soundVector[index], getMonster());\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2124272d95057ae8", - "equalIndicator/v1": "0085585729435a9f832f5568fe43827ab194ec08392f70e615266a8b513e3b2d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/functions/iologindata_save_player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 15, - "startColumn": 57, - "charOffset": 538, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 13, - "startColumn": 1, - "charOffset": 454, - "charLength": 284, - "snippet": { - "text": "#include \"game/game.hpp\"\r\n\r\nbool IOLoginDataSave::saveItems(std::shared_ptr player, const ItemBlockList &itemList, DBInsert &query_insert, PropWriteStream &propWriteStream) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2b3c0ee5d196bdd4", - "equalIndicator/v1": "00ab8119b5f9538c4ce7d026cc1b857eecf55f6ca69923f1ce62773631760396" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 95, - "startColumn": 74, - "charOffset": 2854, - "charLength": 9, - "snippet": { - "text": "moveEvent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 93, - "startColumn": 1, - "charOffset": 2776, - "charLength": 180, - "snippet": { - "text": "}\r\n\r\nbool MoveEvents::registerLuaUniqueEvent(const std::shared_ptr moveEvent) {\r\n\tauto uniqueIdVector = moveEvent->getUniqueIdsVector();\r\n\tif (uniqueIdVector.empty()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2750afa9c22913fa", - "equalIndicator/v1": "00b4db4b8db0971fa7854b21584ee615c4b97199a2bd91ee149e8c61acf9c7af" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 955, - "startColumn": 64, - "charOffset": 34449, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 953, - "startColumn": 1, - "charOffset": 34381, - "charLength": 220, - "snippet": { - "text": "}\r\n\r\nbool Events::eventPlayerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) {\r\n\t// Player:onTradeRequest(target, item)\r\n\tif (info.playerOnTradeRequest == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9b6cf1a2a7419b78", - "equalIndicator/v1": "00c51789f6f132103913b144b2efe83207e7808d4ec2294e8d31d0990ae956e6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 925, - "startColumn": 73, - "charOffset": 30081, - "charLength": 8, - "snippet": { - "text": "attacker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 923, - "startColumn": 1, - "charOffset": 30004, - "charLength": 239, - "snippet": { - "text": "}\r\n\r\nvoid Creature::applyAbsorbDamageModifications(std::shared_ptr attacker, int32_t &damage, CombatType_t combatType) const {\r\n\tif (combatType != COMBAT_HEALING && damage != 0) {\r\n\t\tint32_t value = getAbsorbPercent(combatType);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8e3a48ea87f07dd3", - "equalIndicator/v1": "00db005be4c23f2dd13b21e92d979f49723ff7a85ef1305a0d001ca2f0cf46d1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead", - "markdown": "Do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/modules/modules.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 47, - "startColumn": 22, - "charOffset": 1228, - "charLength": 11, - "snippet": { - "text": "static_cast" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 45, - "startColumn": 1, - "charOffset": 1133, - "charLength": 251, - "snippet": { - "text": "\r\nbool Modules::registerEvent(Event_ptr event, const pugi::xml_node &) {\r\n\tModule_ptr module { static_cast(event.release()) };\r\n\tif (module->getEventType() == MODULE_TYPE_NONE) {\r\n\t\tg_logger().error(\"Trying to register event without type!\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "79a46945fbf9945b", - "equalIndicator/v1": "00ddc1665d49ad2913b4365b679221b32825e81c5b12a8f057080ebeb17a57bf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1098, - "startColumn": 2, - "charOffset": 39398, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1096, - "startColumn": 1, - "charOffset": 39391, - "charLength": 46, - "snippet": { - "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "37dd9ae4c092c453", - "equalIndicator/v1": "00e8b9c40b3260a7ad761078e41767441085af54feddf773c4d9e5cc2c4bf249" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 792, - "startColumn": 21, - "charOffset": 25738, - "charLength": 10, - "snippet": { - "text": "std::round" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 790, - "startColumn": 1, - "charOffset": 25659, - "charLength": 176, - "snippet": { - "text": "\r\n\tint32_t minValue = std::round(player->getLevel() / 5);\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue) / 2;\r\n\r\n\tif (target) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "705b2ee940b80d44", - "equalIndicator/v1": "0100a5f5d1f05b7aac933746d3bae79feb6594c026a50d6651547dd6ba3f74d2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7627, - "startColumn": 91, - "charOffset": 266830, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7625, - "startColumn": 1, - "charOffset": 266735, - "charLength": 247, - "snippet": { - "text": "}\r\n\r\nbool Game::combatChangeMana(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage) {\r\n\tconst Position &targetPos = target->getPosition();\r\n\tauto manaChange = damage.primary.value + damage.secondary.value;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9bcf026fbe379b1d", - "equalIndicator/v1": "0111414d953b5734e2c898401b5a87fd755cf4fa433c00bb84b68242d8c8dff4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/creature_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 536, - "startColumn": 24, - "charOffset": 14291, - "charLength": 19, - "snippet": { - "text": "getNumber" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 534, - "startColumn": 1, - "charOffset": 14262, - "charLength": 175, - "snippet": { - "text": "\t}\r\n\r\n\tcreature->healthMax = getNumber(L, 2);\r\n\tcreature->health = std::min(creature->health, creature->healthMax);\r\n\tg_game().addCreatureHealth(creature);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b83b9de834b85115", - "equalIndicator/v1": "0123ae2a480b40ce5864b4d0862f1739d2af30e3c6fc3d0f4a41746b2d9d0afd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'operator vector' must be marked explicit to avoid unintentional implicit conversions", - "markdown": "'operator vector' must be marked explicit to avoid unintentional implicit conversions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/value_wrapper.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 116, - "startColumn": 27, - "charOffset": 3371, - "charLength": 9, - "snippet": { - "text": "ArrayType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 114, - "startColumn": 1, - "charOffset": 3339, - "charLength": 84, - "snippet": { - "text": "\t}\r\n\r\n\texplicit(false) operator ArrayType() const {\r\n\t\treturn get();\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d771443d71c08e16", - "equalIndicator/v1": "013323c06ce4b94b69ad560d82506536047025f471ffb47fcb750a165b7eb1d0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1119, - "startColumn": 16, - "charOffset": 33833, - "charLength": 5, - "snippet": { - "text": "index" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1117, - "startColumn": 1, - "charOffset": 33743, - "charLength": 148, - "snippet": { - "text": "\r\nvoid Tile::replaceThing(uint32_t index, std::shared_ptr thing) {\r\n\tint32_t pos = index;\r\n\r\n\tstd::shared_ptr item = thing->getItem();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a85fc7bf062db0a3", - "equalIndicator/v1": "0133b1e2b81c9446ad2d8ee64728120ef27a775740b7243eca16a9addce9daf1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 867, - "startColumn": 17, - "charOffset": 26090, - "charLength": 22, - "snippet": { - "text": "postRemoveNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 865, - "startColumn": 1, - "charOffset": 26069, - "charLength": 234, - "snippet": { - "text": "}\r\n\r\nvoid Container::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tstd::shared_ptr topParent = getTopParent();\r\n\tif (topParent->getCreature()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4d216bf40b0d008b", - "equalIndicator/v1": "0158e545c4080b094679202f04677076481fbaa8c17870e7936de49c89007c51" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2818, - "startColumn": 2, - "charOffset": 86087, - "charLength": 11, - "snippet": { - "text": "charmRune_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2816, - "startColumn": 1, - "charOffset": 86080, - "charLength": 144, - "snippet": { - "text": "\t}\r\n\r\n\tcharmRune_t runeID = static_cast(msg.getByte());\r\n\tuint8_t action = msg.getByte();\r\n\tuint16_t raceid = msg.get();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5912f7bf9e525631", - "equalIndicator/v1": "015afa847af1b098989965396c735561e53402b6ed179c0c955a49b7b882aad8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 368, - "startColumn": 103, - "charOffset": 13203, - "charLength": 8, - "snippet": { - "text": "attacker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 366, - "startColumn": 1, - "charOffset": 13096, - "charLength": 334, - "snippet": { - "text": "}\r\n\r\nvoid Events::eventCreatureOnDrainHealth(std::shared_ptr creature, std::shared_ptr attacker, CombatType_t &typePrimary, int32_t &damagePrimary, CombatType_t &typeSecondary, int32_t &damageSecondary, TextColor_t &colorPrimary, TextColor_t &colorSecondary) {\r\n\tif (info.creatureOnDrainHealth == -1) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "407c559e2fb7e9b4", - "equalIndicator/v1": "01a2d4bdb41c837eb9a69d253d01180fe3b99075d1f83105b73573130ce739fc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 230, - "startColumn": 21, - "charOffset": 6296, - "charLength": 7, - "snippet": { - "text": "npcType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 228, - "startColumn": 1, - "charOffset": 6257, - "charLength": 167, - "snippet": { - "text": "\r\n\tint index = 0;\r\n\tlua_createtable(L, npcType->info.voiceVector.size(), 0);\r\n\tfor (const auto &voiceBlock : npcType->info.voiceVector) {\r\n\t\tlua_createtable(L, 0, 2);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6f5061ede8d0ca74", - "equalIndicator/v1": "01a951af123a4d48eb7f8d4f98009e7797d792575c68dab6263119f9c1380a87" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'result' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'result' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iologindata.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 107, - "startColumn": 75, - "charOffset": 4016, - "charLength": 6, - "snippet": { - "text": "result" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 105, - "startColumn": 1, - "charOffset": 3937, - "charLength": 218, - "snippet": { - "text": "}\r\n\r\nbool IOLoginData::loadPlayer(std::shared_ptr player, DBResult_ptr result, bool disableIrrelevantInfo /* = false*/) {\r\n\tif (!result || !player) {\r\n\t\tstd::string nullptrType = !result ? \"Result\" : \"Player\";\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a1a5a8590f41dcfc", - "equalIndicator/v1": "01b9b35abb7fa8ea6e04102eacb59a474a92b26795d4eca965a9c5d23953132c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5135, - "startColumn": 55, - "charOffset": 183013, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5133, - "startColumn": 1, - "charOffset": 182954, - "charLength": 252, - "snippet": { - "text": "}\r\n\r\nvoid Game::internalCloseTrade(std::shared_ptr player) {\r\n\tstd::shared_ptr tradePartner = player->tradePartner;\r\n\tif ((tradePartner && tradePartner->getTradeState() == TRADE_TRANSFER) || player->getTradeState() == TRADE_TRANSFER) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4ff3908507f6223e", - "equalIndicator/v1": "01f2e7555fc6bd49820d92f39137bb718c5aed47091ff17d983f7ea2b711a409" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6495, - "startColumn": 111, - "charOffset": 224192, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6493, - "startColumn": 1, - "charOffset": 224077, - "charLength": 273, - "snippet": { - "text": "}\r\n\r\nbool Game::combatBlockHit(CombatDamage &damage, std::shared_ptr attacker, std::shared_ptr target, bool checkDefense, bool checkArmor, bool field) {\r\n\tif (damage.primary.type == COMBAT_NONE && damage.secondary.type == COMBAT_NONE) {\r\n\t\treturn true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f06168c685bef74e", - "equalIndicator/v1": "023103e87a498e099ae83a2106c16c880f22287b0d440a7718864ba83e3b9826" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'raidEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'raidEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/raids.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 103, - "startColumn": 24, - "charOffset": 2597, - "charLength": 32, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 101, - "startColumn": 1, - "charOffset": 2552, - "charLength": 112, - "snippet": { - "text": "\tvoid startRaid();\r\n\r\n\tvoid executeRaidEvent(const std::shared_ptr raidEvent);\r\n\tvoid resetRaid();\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3e6e273d6c07c68f", - "equalIndicator/v1": "0245d7ce534cdc6fdca6e0505f094da91469bd5a46782f403bbafcc637e3bee7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1190, - "startColumn": 50, - "charOffset": 34801, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1188, - "startColumn": 1, - "charOffset": 34747, - "charLength": 217, - "snippet": { - "text": "}\r\n\r\nvoid Player::sendLootStats(std::shared_ptr item, uint8_t count) {\r\n\tuint64_t value = 0;\r\n\tif (item->getID() == ITEM_GOLD_COIN || item->getID() == ITEM_PLATINUM_COIN || item->getID() == ITEM_CRYSTAL_COIN) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2ea4a18d76ef7e9d", - "equalIndicator/v1": "0249279da9018252358aac7e2b595c4595da930b0ee82245ab97bda5cbce66c2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 706, - "startColumn": 97, - "charOffset": 27162, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 704, - "startColumn": 1, - "charOffset": 27061, - "charLength": 291, - "snippet": { - "text": "}\r\n\r\nbool EventCallback::playerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeAccept - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6f9ae60b5c397ef2", - "equalIndicator/v1": "02492d87ad46632b4ad64a3bd8f35ed5cd57f3abccecbbd24e59f10cec16cd5a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/depot/depotchest.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 27, - "startColumn": 7, - "charOffset": 984, - "charLength": 22, - "snippet": { - "text": "postRemoveNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 25, - "startColumn": 1, - "charOffset": 823, - "charLength": 351, - "snippet": { - "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r\n\tbool isDepotChest() const override {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6d98bb0e0959a9f3", - "equalIndicator/v1": "026ab7b08fe677994468f010175dd6592f596fa17079ac759d03374711196d53" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 621, - "startColumn": 27, - "charOffset": 22121, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 619, - "startColumn": 1, - "charOffset": 22089, - "charLength": 135, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnLookInBattleList, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3a2814a1eb1bdd89", - "equalIndicator/v1": "02723b263663384d79efc4838389f7ef123c5ba28fbb353ac1e4f969ce642722" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/depot/depotchest.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 22, - "startColumn": 25, - "charOffset": 632, - "charLength": 8, - "snippet": { - "text": "queryAdd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 20, - "startColumn": 1, - "charOffset": 603, - "charLength": 246, - "snippet": { - "text": "}\r\n\r\nReturnValue DepotChest::queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor /* = nullptr*/) {\r\n\tstd::shared_ptr item = thing->getItem();\r\n\tif (item == nullptr) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "771dea193711d651", - "equalIndicator/v1": "0275985241458ba719a4dc0ef74e53e9b601c421c7391f92ed635af52e6dcf0e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'conn' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'conn' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolstatus.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 26, - "startColumn": 12, - "charOffset": 835, - "charLength": 4, - "snippet": { - "text": "conn" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 24, - "startColumn": 1, - "charOffset": 773, - "charLength": 131, - "snippet": { - "text": "\r\n\texplicit ProtocolStatus(Connection_ptr conn) :\r\n\t\tProtocol(conn) { }\r\n\r\n\tvoid onRecvFirstMessage(NetworkMessage &msg) override;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bfbe7b4aa4990636", - "equalIndicator/v1": "02ad0e3f6649af90f929938052cc018dff739ebd9c727de848e4729e2e4765ac" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2037, - "startColumn": 63, - "charOffset": 60349, - "charLength": 9, - "snippet": { - "text": "container" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2035, - "startColumn": 1, - "charOffset": 60282, - "charLength": 172, - "snippet": { - "text": "}\r\n\r\nvoid Player::onRemoveContainerItem(std::shared_ptr container, std::shared_ptr item) {\r\n\tif (tradeState != TRADE_TRANSFER) {\r\n\t\tcheckTradeState(item);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e8adc3bca0b10eec", - "equalIndicator/v1": "02ea6f1dbcc1a813b89d8d2786d1e1d954e488066a3308f8a04051644166205b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 554, - "startColumn": 27, - "charOffset": 19630, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 552, - "startColumn": 1, - "charOffset": 19598, - "charLength": 130, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnBrowseField, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "de5607edd8c49744", - "equalIndicator/v1": "02ff6b12402271562ec6b7f23db7029b691eaef3fd86ea4b053bad57123ac479" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 234, - "startColumn": 27, - "charOffset": 8420, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 232, - "startColumn": 1, - "charOffset": 8388, - "charLength": 133, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.creatureOnChangeOutfit, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4a39da1a5eed26ea", - "equalIndicator/v1": "0319d61ed3366dd769890abf744ea8a1bfdb20a3e11de7ccc77be11e5b5957ac" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 464, - "startColumn": 7, - "charOffset": 17506, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 462, - "startColumn": 1, - "charOffset": 17389, - "charLength": 257, - "snippet": { - "text": "\r\nvoid EventCallback::playerOnRemoveCount(std::shared_ptr player, std::shared_ptr item) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnMove - \"\r\n\t\t \"Player {} item {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "08e6ddc14ab4d444", - "equalIndicator/v1": "031fbbde9fc44c879ccf672eb4056ae81f9e0007169655cee1591a8a03acc294" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructor does not initialize these fields: m_maxItems", - "markdown": "Constructor does not initialize these fields: m_maxItems" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 34, - "startColumn": 12, - "charOffset": 1067, - "charLength": 9, - "snippet": { - "text": "Container" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 32, - "startColumn": 1, - "charOffset": 1051, - "charLength": 168, - "snippet": { - "text": "}\r\n\r\nContainer::Container(uint16_t initType, uint16_t initSize, bool initUnlocked /*= true*/, bool initPagination /*= false*/) :\r\n\tItem(initType),\r\n\tmaxSize(initSize),\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "14f9250ed32dc8f6", - "equalIndicator/v1": "0378f6e80a53c4b5c58ac6dd790b3eb69c8a3f8d8f8de7659b6da9c773b65a4f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 217, - "startColumn": 7, - "charOffset": 6532, - "charLength": 8, - "snippet": { - "text": "addThing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 215, - "startColumn": 1, - "charOffset": 6464, - "charLength": 196, - "snippet": { - "text": "\tstd::vector> getSurroundingTiles();\r\n\r\n\tvoid addThing(std::shared_ptr thing) override final;\r\n\tvoid addThing(int32_t index, std::shared_ptr thing) override;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cbd945e8b12400e0", - "equalIndicator/v1": "037cb83b2e9333076794f413f19da0df8f40b9be4eb3a275acf91e016e3944c2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 706, - "startColumn": 65, - "charOffset": 27130, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 704, - "startColumn": 1, - "charOffset": 27061, - "charLength": 291, - "snippet": { - "text": "}\r\n\r\nbool EventCallback::playerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeAccept - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "956a83004595ec2b", - "equalIndicator/v1": "039051f28398b7b77755c9b854debe54318546679b26ab3ad3924c6bc89bf53a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 475, - "startColumn": 90, - "charOffset": 15688, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 473, - "startColumn": 1, - "charOffset": 15594, - "charLength": 145, - "snippet": { - "text": "}\r\n\r\nvoid Actions::showUseHotkeyMessage(std::shared_ptr player, std::shared_ptr item, uint32_t count) {\r\n\tstd::ostringstream ss;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9fdf8b8f46bc426a", - "equalIndicator/v1": "0397b7981b363289c4cede45bfb0d5d191309983632c15c9568d4aecfda068aa" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Escaped string literal can be written as a raw string literal", - "markdown": "Escaped string literal can be written as a raw string literal" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/webhook/webhook.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 133, - "startColumn": 15, - "charOffset": 4253, - "charLength": 28, - "snippet": { - "text": "\"\\\"footer\\\": { \\\"text\\\": \\\"\"" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 131, - "startColumn": 1, - "charOffset": 4160, - "charLength": 182, - "snippet": { - "text": "\t\t}\r\n\t\tif (g_configManager().getBoolean(DISCORD_SEND_FOOTER, __FUNCTION__)) {\r\n\t\t\tpayload << \"\\\"footer\\\": { \\\"text\\\": \\\"\" << footer_text.str() << \"\\\" }, \";\r\n\t\t}\r\n\t\tif (color >= 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5338e735d454f92e", - "equalIndicator/v1": "03b2f90dadede9ab253a16c7bf2d6c941cbaf0aa00549c3c5c876cdb46c63c73" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 259, - "startColumn": 62, - "charOffset": 7604, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 257, - "startColumn": 1, - "charOffset": 7538, - "charLength": 152, - "snippet": { - "text": "}\r\n\r\nPosition Spells::getCasterPosition(std::shared_ptr creature, Direction dir) {\r\n\treturn getNextPosition(dir, creature->getPosition());\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "86ed948a90a06c81", - "equalIndicator/v1": "03c2681d50399708c0a6bca8f63e3e528572140bb1b8e89855e4312b506cb4f2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Converting integer literal to bool, use bool literal instead", - "markdown": "Converting integer literal to bool, use bool literal instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/bank/bank.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 56, - "startColumn": 10, - "charOffset": 1453, - "charLength": 1, - "snippet": { - "text": "0" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 54, - "startColumn": 1, - "charOffset": 1392, - "charLength": 104, - "snippet": { - "text": "\tauto bankable = getBankable();\r\n\tif (!bankable) {\r\n\t\treturn 0;\r\n\t}\r\n\tbankable->setBankBalance(amount);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "67663aea5c33e972", - "equalIndicator/v1": "03d390431b97ac5c73a888dc47dcea6a4a49bcc1f02dab2450d854c7ccc9944d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1257, - "startColumn": 89, - "charOffset": 41487, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1255, - "startColumn": 1, - "charOffset": 41394, - "charLength": 344, - "snippet": { - "text": "}\r\n\r\nvoid Combat::doCombatHealth(std::shared_ptr caster, std::shared_ptr target, const Position &origin, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\r\n\tif ((caster && target)\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "276ded4f964a9fb6", - "equalIndicator/v1": "03d7080c05bb2ca7f90fb67e8803cce4ffd5ed62e2b0d9eda316b188054c377a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 480, - "startColumn": 132, - "charOffset": 13683, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 478, - "startColumn": 1, - "charOffset": 13547, - "charLength": 379, - "snippet": { - "text": "}\r\n\r\nvoid Tile::onRemoveTileItem(const CreatureVector &spectators, const std::vector &oldStackPosVector, std::shared_ptr item) {\r\n\tif ((item->hasProperty(CONST_PROP_MOVABLE) || item->getContainer()) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) {\r\n\t\tauto it = g_game().browseFields.find(getTile());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "72138b473d08a740", - "equalIndicator/v1": "04042f0b214a2d8cd13ae31301e6406e5412baa74325f0d3896f9f961fe52b71" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/monster_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 297, - "startColumn": 2, - "charOffset": 8746, - "charLength": 2, - "snippet": { - "text": "if" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 295, - "startColumn": 1, - "charOffset": 8644, - "charLength": 183, - "snippet": { - "text": "\t// monster:getTargetCount()\r\n\tstd::shared_ptr monster = getUserdataShared(L, 1);\r\n\tif (monster) {\r\n\t\tlua_pushnumber(L, monster->getTargetList().size());\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2dc650adcf0ee234", - "equalIndicator/v1": "042e4ecc21e0e8344175ab6f0570f8b99c70e4312ae7f6c51cfb234c455f309b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1167, - "startColumn": 99, - "charOffset": 44404, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1165, - "startColumn": 1, - "charOffset": 44301, - "charLength": 237, - "snippet": { - "text": "}\r\n\r\nbool EventCallback::zoneBeforeCreatureLeave(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneBeforeCreatureLeave - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "077900b51d4344a1", - "equalIndicator/v1": "043f94d8de84bec7c6950addd6386048c9264bea35e34970554890a03309371f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2565, - "startColumn": 3, - "charOffset": 74588, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2563, - "startColumn": 1, - "charOffset": 74524, - "charLength": 180, - "snippet": { - "text": "\t}\r\n\tbool isConcoctionActive(Concoction_t concotion) const {\r\n\t\tuint16_t itemId = static_cast(concotion);\r\n\t\tif (!activeConcoctions.contains(itemId)) {\r\n\t\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "eca87d319d6a6fbe", - "equalIndicator/v1": "044e762af59b09a34d9d497dea1f4cf18336c1e3257de0eb9e999b799486f10b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 10519, - "startColumn": 62, - "charOffset": 365267, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 10517, - "startColumn": 1, - "charOffset": 365201, - "charLength": 232, - "snippet": { - "text": "}\r\n\r\nvoid Game::afterCreatureZoneChange(std::shared_ptr creature, const std::unordered_set> &fromZones, const std::unordered_set> &toZones) const {\r\n\tif (!creature) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "72eeaa554fc29398", - "equalIndicator/v1": "04830bc4398e7dc0aa46f1ada569bfad14d4181c63be9a5650b02f68ed59d070" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'float'", - "markdown": "Narrowing conversion from 'double' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/io_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 667, - "startColumn": 26, - "charOffset": 31232, - "charLength": 19, - "snippet": { - "text": "MITIGATION_INCREASE" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 665, - "startColumn": 1, - "charOffset": 31037, - "charLength": 336, - "snippet": { - "text": "// SLOT_BLUE_TOP_100 = 19\r\nvoid IOWheel::slotBlueTop100(const std::shared_ptr &player, uint16_t points, uint8_t, PlayerWheelMethodsBonusData &bonusData) const {\r\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\r\n\taddVesselResonance(player, bonusData, WheelSlots_t::SLOT_BLUE_TOP_100, WheelGemAffinity_t::Blue, points);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b47ccb4943d2db59", - "equalIndicator/v1": "04bad30583703148e7f51afc8e5855a5e4ad7ee7db4c68fe6a409bd654b12a7e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/depot/depotchest.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 26, - "startColumn": 7, - "charOffset": 831, - "charLength": 19, - "snippet": { - "text": "postAddNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 24, - "startColumn": 1, - "charOffset": 663, - "charLength": 472, - "snippet": { - "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a0ae5b3c0c0908cc", - "equalIndicator/v1": "04c7fd228204fd80edd881b1f36b8423fbd93836a7c6a0581cbbf8f13d1f566a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", - "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/lua_functions_loader.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 253, - "startColumn": 10, - "charOffset": 7708, - "charLength": 11, - "snippet": { - "text": "std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 251, - "startColumn": 1, - "charOffset": 7612, - "charLength": 117, - "snippet": { - "text": "std::string LuaFunctionsLoader::popString(lua_State* L) {\r\n\tif (lua_gettop(L) == 0) {\r\n\t\treturn std::string();\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a539a658bd38f813", - "equalIndicator/v1": "04e1d1df948597f40c99d4989d038384bd0784660d0a57938794c3425389c247" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 272, - "startColumn": 23, - "charOffset": 9047, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 270, - "startColumn": 1, - "charOffset": 8921, - "charLength": 144, - "snippet": { - "text": "\t\tg_game().sendSingleSoundEffect(tile->getPosition(), SoundEffect_t::PHYSICAL_RANGE_MISS, player);\r\n\t}\r\n\tonUsedWeapon(player, item, tile);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "380a6be5c3ac7f60", - "equalIndicator/v1": "04e380af2b42f02629f270c9e5c9c87384e850af894e7f37634daf9eaeb8c1c1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/movement/teleport.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 34, - "startColumn": 23, - "charOffset": 1151, - "charLength": 8, - "snippet": { - "text": "queryAdd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 32, - "startColumn": 1, - "charOffset": 1124, - "charLength": 163, - "snippet": { - "text": "}\r\n\r\nReturnValue Teleport::queryAdd(int32_t, const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr) {\r\n\treturn RETURNVALUE_NOTPOSSIBLE;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b4bacdda553068de", - "equalIndicator/v1": "04ef3f3a05de61d096256fc48b9bd667ebbf9aee7343934ff89bacc9eb1c69aa" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1084, - "startColumn": 49, - "charOffset": 35404, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1082, - "startColumn": 1, - "charOffset": 35351, - "charLength": 230, - "snippet": { - "text": "}\r\n\r\nbool Combat::doCombat(std::shared_ptr caster, std::shared_ptr target, const Position &origin, int affected /* = 1 */) const {\r\n\t// target combat callback function\r\n\tif (params.combatType != COMBAT_NONE) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1abe8d5a89b6d01b", - "equalIndicator/v1": "05072b81ab91984708e144eee9329976e8c800567c5b2ce354f028d4edaf776a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4710, - "startColumn": 56, - "charOffset": 148694, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4708, - "startColumn": 1, - "charOffset": 148634, - "charLength": 109, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendLootStats(std::shared_ptr item, uint8_t count) {\r\n\tif (!item) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bafd73ff774f619a", - "equalIndicator/v1": "0508afcbc72617d3cb1007d820c3709bee8aaa8d78a6f112d490cc1fc085b60c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 378, - "startColumn": 10, - "charOffset": 11694, - "charLength": 5, - "snippet": { - "text": "items" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 376, - "startColumn": 1, - "charOffset": 11633, - "charLength": 116, - "snippet": { - "text": "\r\n\tint16_t getMagicShieldCapacityPercent() const {\r\n\t\treturn items[id].abilities->magicShieldCapacityPercent;\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7a2915915fcb6869", - "equalIndicator/v1": "050efc96bfcba13c6edf2ab2bc7a7daa008bbfc1c62cbb07e8f5c18989fea97c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 809, - "startColumn": 25, - "charOffset": 26155, - "charLength": 15, - "snippet": { - "text": "getWeaponDamage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 807, - "startColumn": 1, - "charOffset": 26126, - "charLength": 245, - "snippet": { - "text": "}\r\n\r\nint32_t WeaponDistance::getWeaponDamage(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, bool maxDamage /*= false*/) const {\r\n\tint32_t attackValue = item->getAttack();\r\n\tbool hasElement = false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "552b91f1ec0e07c8", - "equalIndicator/v1": "0530e2f0b329c6cc180c3498a156c86c4425c08ecb75b82e86752a07060fc195" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'transformItem' is within a recursive call chain", - "markdown": "Function 'transformItem' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2691, - "startColumn": 29, - "charOffset": 101179, - "charLength": 13, - "snippet": { - "text": "transformItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2689, - "startColumn": 1, - "charOffset": 101146, - "charLength": 321, - "snippet": { - "text": "}\r\n\r\nstd::shared_ptr Game::transformItem(std::shared_ptr item, uint16_t newId, int32_t newCount /*= -1*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (item->getID() == newId && (newCount == -1 || (newCount == item->getSubType() && newCount != 0))) { // chargeless item placed on map = infinite\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a8187066f9503cf3", - "equalIndicator/v1": "053388149a89e0130a781d129939936f0a212f10b703c4650669c8f21c243c87" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first.", - "markdown": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 728, - "startColumn": 15, - "charOffset": 23678, - "charLength": 2, - "snippet": { - "text": "it" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 726, - "startColumn": 1, - "charOffset": 23637, - "charLength": 74, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tchance = it.hitChance;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3d4a690e93b22f0f", - "equalIndicator/v1": "0543f3fc2ec0d9092104f60d595dfe14755339bca29684771d6bb5e8e5230c92" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 835, - "startColumn": 60, - "charOffset": 31937, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 833, - "startColumn": 1, - "charOffset": 31873, - "charLength": 271, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::playerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnCombat - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0c36d01405770872", - "equalIndicator/v1": "055bf7faa61cb709bba54af43bd4377d91bf60fbbd314a0c08670350772b99d0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/global_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 136, - "startColumn": 2, - "charOffset": 4235, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 134, - "startColumn": 1, - "charOffset": 4186, - "charLength": 123, - "snippet": { - "text": "\tint32_t itemCount = 1;\r\n\tint32_t subType = 1;\r\n\tuint32_t count = getNumber(L, 3, 1);\r\n\r\n\tif (it.hasSubType()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "18f030d8fefe6873", - "equalIndicator/v1": "0567a8fb0f0ff2aa43580a6bfae8ae3e6830132be50cb802b4e160450ce7700a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1215, - "startColumn": 36, - "charOffset": 35778, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1213, - "startColumn": 1, - "charOffset": 35639, - "charLength": 172, - "snippet": { - "text": "\tvoid sendCreatureWalkthrough(std::shared_ptr creature, bool walkthrough) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureWalkthrough(creature, walkthrough);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "85066812fb5268dc", - "equalIndicator/v1": "05708e798f0f7c1701b6a5b889370ce39731099857765153a6f5828bdefd3be6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::list::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::list::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5165, - "startColumn": 95, - "charOffset": 162688, - "charLength": 3, - "snippet": { - "text": "810" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5163, - "startColumn": 1, - "charOffset": 162431, - "charLength": 307, - "snippet": { - "text": "\tstd::map counterMap;\r\n\tuint32_t buyOffersToSend = std::min(buyOffers.size(), 810 + std::max(0, 810 - sellOffers.size()));\r\n\tuint32_t sellOffersToSend = std::min(sellOffers.size(), 810 + std::max(0, 810 - buyOffers.size()));\r\n\r\n\tNetworkMessage msg;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bcf40b9a2e0fefee", - "equalIndicator/v1": "0576a0d7af0e59172bcab62a506d78b8ae8557e89fc5dbc5f4789acec7d2d608" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 596, - "startColumn": 13, - "charOffset": 28975, - "charLength": 11, - "snippet": { - "text": "stringValue" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 594, - "startColumn": 1, - "charOffset": 28781, - "charLength": 416, - "snippet": { - "text": "\t} else if (stringValue == \"absorbpercentmanadrain\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_MANADRAIN)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentdrown\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_DROWNDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentphysical\") {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "851e6d94beec7005", - "equalIndicator/v1": "0583f9f6070f11a684e54867a4d862ceac9a2a8bb9926ec462e9818eb8b840a5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 933, - "startColumn": 7, - "charOffset": 33704, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 931, - "startColumn": 1, - "charOffset": 33692, - "charLength": 136, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnTurn - \"\r\n\t\t \"Player {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fec4ff5d46845ef9", - "equalIndicator/v1": "0592d608535b6352c996b18d986083a38bdf6e746d60cc58b8533627ce04e64d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructor does not initialize these fields: channelId", - "markdown": "Constructor does not initialize these fields: channelId" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 43, - "startColumn": 2, - "charOffset": 1162, - "charLength": 11, - "snippet": { - "text": "TextMessage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 41, - "startColumn": 1, - "charOffset": 1112, - "charLength": 162, - "snippet": { - "text": "struct TextMessage {\r\n\tTextMessage() = default;\r\n\tTextMessage(MessageClasses initType, std::string initText) :\r\n\t\ttype(initType), text(std::move(initText)) { }\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5cc0b4630a5a121d", - "equalIndicator/v1": "05cd2ddee7658ce2cae6377e80194f55e6f0dfc0ca69bd70eebc4a47dde420c9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 58, - "startColumn": 41, - "charOffset": 1800, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 56, - "startColumn": 1, - "charOffset": 1754, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c228fe8a89531189", - "equalIndicator/v1": "05e15418463bf450ed6c22ed6f85e1c8f8a926a1156a500b0281b5474a4357c2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 419, - "startColumn": 10, - "charOffset": 11205, - "charLength": 17, - "snippet": { - "text": "getReflectPercent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 417, - "startColumn": 1, - "charOffset": 11190, - "charLength": 184, - "snippet": { - "text": "\t}\r\n\r\n\tint32_t getReflectPercent(CombatType_t combat, bool useCharges = false) const override;\r\n\r\n\tint32_t getReflectFlat(CombatType_t combat, bool useCharges = false) const override;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2fd24d3f8cf018c9", - "equalIndicator/v1": "060283e76764a0cf44ee2039fd56fde9d89546a8bd0d47d0a72c9a1217b823ca" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 391, - "startColumn": 113, - "charOffset": 12624, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 389, - "startColumn": 1, - "charOffset": 12507, - "charLength": 243, - "snippet": { - "text": "}\r\n\r\nbool Actions::useItem(std::shared_ptr player, const Position &pos, uint8_t index, std::shared_ptr item, bool isHotkey) {\r\n\tconst ItemType &it = Item::items[item->getID()];\r\n\tif (it.isRune() || it.type == ITEM_TYPE_POTION) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2d7a5d8e5d5abbfe", - "equalIndicator/v1": "0607f1a546bbd9d086295463c26732736263945a9314de5c0936e6e2116a6456" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '_Valty', which is a reserved identifier", - "markdown": "Declaration uses identifier '_Valty', which is a reserved identifier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/arraylist.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 102, - "startColumn": 22, - "charOffset": 2309, - "charLength": 6, - "snippet": { - "text": "_Valty" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 100, - "startColumn": 1, - "charOffset": 2281, - "charLength": 109, - "snippet": { - "text": "\t\t}\r\n\r\n\t\ttemplate \r\n\t\tdecltype(auto) emplace_front(_Valty &&... v) {\r\n\t\t\tneedUpdate = true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "680e21a97f1df0ed", - "equalIndicator/v1": "060dc568bd27032686b8c86f3c173dbfdf57eaf6dce7bf832f0c0baa4a16bb81" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 183, - "startColumn": 2, - "charOffset": 6788, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 181, - "startColumn": 1, - "charOffset": 6781, - "charLength": 46, - "snippet": { - "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8f6b25bd0b4b8d81", - "equalIndicator/v1": "061f81cae0c0c5744929e0121c8fb79612de4520cddf24049313ba549a600d10" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2088, - "startColumn": 58, - "charOffset": 61649, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2086, - "startColumn": 1, - "charOffset": 61587, - "charLength": 134, - "snippet": { - "text": "}\r\n\r\nvoid Player::onRemoveInventoryItem(std::shared_ptr item) {\r\n\tif (tradeState != TRADE_TRANSFER) {\r\n\t\tcheckTradeState(item);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ac6267b84fa7822f", - "equalIndicator/v1": "0625daa73c94b3554445f06276733506d4c5fd38f32a9a822a5b258277807dd0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 199, - "startColumn": 63, - "charOffset": 6067, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 197, - "startColumn": 1, - "charOffset": 6000, - "charLength": 186, - "snippet": { - "text": "}\r\n\r\nReturnValue Combat::canTargetCreature(std::shared_ptr player, std::shared_ptr target) {\r\n\tif (player == target) {\r\n\t\treturn RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "66a7a373ead18b90", - "equalIndicator/v1": "062d63181b8168c55090ffb3a168b571875d9dc47e7a70b3897130d9acb1ffce" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3521, - "startColumn": 14, - "charOffset": 106528, - "charLength": 1, - "snippet": { - "text": "n" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3519, - "startColumn": 1, - "charOffset": 106372, - "charLength": 213, - "snippet": { - "text": "\t\t\t\t// try find an already existing item to stack with\r\n\t\t\t\tif (tmpItem->equals(item) && tmpItem->getItemCount() < tmpItem->getStackSize()) {\r\n\t\t\t\t\tindex = n;\r\n\t\t\t\t\t*destItem = tmpItem;\r\n\t\t\t\t\treturn tmpContainer;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b647f842edbafcbd", - "equalIndicator/v1": "065219692d5308f976d9f14146f8f6ef973e576f6524f757bca638b3aa16e445" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 213, - "startColumn": 66, - "charOffset": 6731, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 211, - "startColumn": 1, - "charOffset": 6661, - "charLength": 223, - "snippet": { - "text": "}\r\n\r\nstd::shared_ptr Actions::getAction(std::shared_ptr item) {\r\n\tif (item->hasAttribute(ItemAttribute_t::UNIQUEID)) {\r\n\t\tauto it = uniqueItemMap.find(item->getAttribute(ItemAttribute_t::UNIQUEID));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3fb1ea88033404d0", - "equalIndicator/v1": "066f7c51628a4411add5681f1e9ec1b5e533e5ece7c1dae45cd8e902ee293599" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7809, - "startColumn": 62, - "charOffset": 245631, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7807, - "startColumn": 1, - "charOffset": 245565, - "charLength": 121, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::openImbuementWindow(std::shared_ptr item) {\r\n\tif (!item || item->isRemoved()) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "de6d5a0456e8ba19", - "equalIndicator/v1": "066f92050658460e4b2739eadd040090b590393fb0663aac585e6877f5ac37b4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'name' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'name' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/player_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2923, - "startColumn": 48, - "charOffset": 102908, - "charLength": 4, - "snippet": { - "text": "name" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2921, - "startColumn": 1, - "charOffset": 102856, - "charLength": 169, - "snippet": { - "text": "}\r\n\r\nbool PlayerWheel::getInstant(const std::string name) const {\r\n\tif (name == \"Battle Instinct\") {\r\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::BATTLE_INSTINCT);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4b0254e56a30f776", - "equalIndicator/v1": "066fab314f43598ce21f62696e75eb5cad24866d4cac9bfa63704a2d33a25608" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 455, - "startColumn": 22, - "charOffset": 24166, - "charLength": 31, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 453, - "startColumn": 1, - "charOffset": 24014, - "charLength": 316, - "snippet": { - "text": "\tvoid changeLight(const std::shared_ptr creature);\r\n\tvoid updateCreatureIcon(const std::shared_ptr creature);\r\n\tvoid reloadCreature(const std::shared_ptr creature);\r\n\tvoid updateCreatureSkull(std::shared_ptr player);\r\n\tvoid updatePlayerShield(std::shared_ptr player);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3ac2600f362a5a1e", - "equalIndicator/v1": "06781621800ba7458c9433a4aba2420d3adb72d5b79d56b636fc3db514abeae4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3460, - "startColumn": 38, - "charOffset": 105859, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3458, - "startColumn": 1, - "charOffset": 105621, - "charLength": 431, - "snippet": { - "text": "\tmsg.add(std::min(player->getHealth(), std::numeric_limits::max()));\r\n\tmsg.add(std::min(player->getMaxHealth(), std::numeric_limits::max()));\r\n\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\r\n\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\r\n\tmsg.addByte(player->getSoul());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "88664f2a0ab8d8e9", - "equalIndicator/v1": "069a82498b0f12f701fbcc681c79e5a056d093ab8d5c6222ee1654af4df0405e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 597, - "startColumn": 8, - "charOffset": 14733, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 595, - "startColumn": 1, - "charOffset": 14631, - "charLength": 220, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetWrapableTo(lua_State* L) {\r\n\t// itemType:getWrapableTo()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->wrapableTo);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "10376e1f2c882f79", - "equalIndicator/v1": "06a4796f652f83eaeb7e6291b777cb996a89f5b28b50d6a9b47c8b440cc987ae" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1206, - "startColumn": 40, - "charOffset": 35367, - "charLength": 5, - "snippet": { - "text": "value" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1204, - "startColumn": 1, - "charOffset": 35288, - "charLength": 134, - "snippet": { - "text": "\t\tvalue = iType.sellPrice * count;\r\n\t}\r\n\tg_metrics().addCounter(\"player_loot\", value, { { \"player\", getName() } });\r\n\r\n\tif (client) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f538737986a781eb", - "equalIndicator/v1": "06bc7882725be6017c1397e3765a42a74fe975fc84e3a97bb6a862721d4d1b7b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2535, - "startColumn": 35, - "charOffset": 75781, - "charLength": 7, - "snippet": { - "text": "manaMax" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2533, - "startColumn": 1, - "charOffset": 75662, - "charLength": 232, - "snippet": { - "text": "\t\t} else {\r\n\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\r\n\t\t\tmanaMax = std::max(0, manaMax - vocation->getManaGain());\r\n\t\t\tcapacity = std::max(0, capacity - vocation->getCapGain());\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "90c8270af225201d", - "equalIndicator/v1": "06cabf517114f142f1620baee4d61a400d9d2416d4e14f890959037851b8387f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6921, - "startColumn": 29, - "charOffset": 240347, - "charLength": 36, - "snippet": { - "text": "(damage.primary.value * damageBonus)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6919, - "startColumn": 1, - "charOffset": 240212, - "charLength": 264, - "snippet": { - "text": "\t\t\tint32_t damageBonus = attackerPlayer->wheel()->checkDivineGrenade(target);\r\n\t\t\tif (damageBonus != 0) {\r\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\r\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\r\n\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b5f7f55592b5f38b", - "equalIndicator/v1": "06d275c181a1264484c3f7d38415abcf9861c2b24ec01b9a42fa57be9b686e5f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'protocol' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'protocol' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/message/outputmessage.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 38, - "startColumn": 60, - "charOffset": 1114, - "charLength": 8, - "snippet": { - "text": "protocol" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 36, - "startColumn": 1, - "charOffset": 1050, - "charLength": 134, - "snippet": { - "text": "}\r\n\r\nvoid OutputMessagePool::addProtocolToAutosend(Protocol_ptr protocol) {\r\n\t// dispatcher thread\r\n\tif (bufferedProtocols.empty()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1f54ac55acd1575e", - "equalIndicator/v1": "06dfd02f58b12fb8cbaffce8c4c929afde424ed633c98c80c990ed984b092949" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 507, - "startColumn": 65, - "charOffset": 18047, - "charLength": 5, - "snippet": { - "text": "party" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 505, - "startColumn": 1, - "charOffset": 17978, - "charLength": 208, - "snippet": { - "text": "}\r\n\r\nvoid Events::eventPartyOnShareExperience(std::shared_ptr party, uint64_t &exp) {\r\n\t// Party:onShareExperience(exp) or Party.onShareExperience(self, exp)\r\n\tif (info.partyOnShareExperience == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a7140ac1e8b56e8b", - "equalIndicator/v1": "06eeadc3dc6337818258f9701e63a0f7329a462ad16ad2b890b5e83184b8d58e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7831, - "startColumn": 90, - "charOffset": 273772, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7829, - "startColumn": 1, - "charOffset": 273678, - "charLength": 294, - "snippet": { - "text": "}\r\n\r\nvoid Game::addCreatureHealth(const CreatureVector &spectators, std::shared_ptr target) {\r\n\tuint8_t healthPercent = std::ceil((static_cast(target->getHealth()) / std::max(target->getMaxHealth(), 1)) * 100);\r\n\tif (const auto &targetPlayer = target->getPlayer()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c961c67199f109c4", - "equalIndicator/v1": "071cbf6851b71eaf6e3142e771ec76dbcbd0e8a7173cc78d07e3a1ff28f60541" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1387, - "startColumn": 36, - "charOffset": 41694, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1385, - "startColumn": 1, - "charOffset": 41544, - "charLength": 185, - "snippet": { - "text": "\tvoid sendPartyCreatureHealth(std::shared_ptr creature, uint8_t healthPercent) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPartyCreatureHealth(creature, healthPercent);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "598b35dfcd0ce73d", - "equalIndicator/v1": "072c98d28dc4bf571af1aa0bd0b020ea880013f875093135c6cadd75b2543683" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/player_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2419, - "startColumn": 2, - "charOffset": 64769, - "charLength": 31, - "snippet": { - "text": "// player:addFamiliar(lookType)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2417, - "startColumn": 1, - "charOffset": 64707, - "charLength": 178, - "snippet": { - "text": "\r\nint PlayerFunctions::luaPlayerAddFamiliar(lua_State* L) {\r\n\t// player:addFamiliar(lookType)\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (player) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2741f6a7a7d47447", - "equalIndicator/v1": "073c858d29882621f023b5cb0d862a7e031102260a3182c53f299aa79bc50e23" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'", - "markdown": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 228, - "startColumn": 11, - "charOffset": 7041, - "charLength": 4, - "snippet": { - "text": "Item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 226, - "startColumn": 1, - "charOffset": 6982, - "charLength": 99, - "snippet": { - "text": "\tvirtual std::shared_ptr clone() const;\r\n\r\n\tvirtual ~Item() = default;\r\n\r\n\t// non-assignable\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fb4db60a48ccf4cd", - "equalIndicator/v1": "0749f465c408e854065ad8e1d599b8a236d7b88b1be675c80e0f8c31c3e2ccf0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'long double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'long double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5995, - "startColumn": 71, - "charOffset": 176107, - "charLength": 11, - "snippet": { - "text": "nextReqMana" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5993, - "startColumn": 1, - "charOffset": 176006, - "charLength": 210, - "snippet": { - "text": "\r\n\t\toldSkillValue = magLevel;\r\n\t\toldPercentToNextLevel = static_cast(manaSpent * 100) / nextReqMana;\r\n\r\n\t\tg_events().eventPlayerOnGainSkillTries(static_self_cast(), SKILL_MAGLEVEL, tries);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1b5373c7c59290bb", - "equalIndicator/v1": "0750f06a273e8bc4b10c62fd3f7554a746d2b1befefdda08b3747f2d1b9d11ef" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 669, - "startColumn": 72, - "charOffset": 18279, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 667, - "startColumn": 1, - "charOffset": 18203, - "charLength": 173, - "snippet": { - "text": "}\r\n\r\nvoid ConditionAttributes::updatePercentBuffs(std::shared_ptr creature) {\r\n\tfor (int32_t i = BUFF_FIRST; i <= BUFF_LAST; ++i) {\r\n\t\tif (buffsPercent[i] == 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "851b1112a7d2f171", - "equalIndicator/v1": "07c21d88685e187fe8120b6b7c738fa38d78f95f6b95afadb810b2df4c24837d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 9129, - "startColumn": 46, - "charOffset": 319098, - "charLength": 10, - "snippet": { - "text": "totalPrice" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 9127, - "startColumn": 1, - "charOffset": 318985, - "charLength": 230, - "snippet": { - "text": "\r\n\t\tplayer->setBankBalance(player->getBankBalance() + totalPrice);\r\n\t\tg_metrics().addCounter(\"balance_increase\", totalPrice, { { \"player\", player->getName() }, { \"context\", \"market_sale\" } });\r\n\r\n\t\tif (it.id == ITEM_STORE_COIN) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "056c5308e6614045", - "equalIndicator/v1": "07e165b7eb5f845b4bad3f842883de2d53f31703ffcfc58e890f00d5c0b804d6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Repeated branch body in conditional chain", - "markdown": "Repeated branch body in conditional chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4243, - "startColumn": 107, - "charOffset": 127988, - "charLength": 1, - "snippet": { - "text": "{" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4241, - "startColumn": 1, - "charOffset": 127844, - "charLength": 242, - "snippet": { - "text": "\t\t\tcheckLootContainers(container);\r\n\r\n\t\t\tif (container->isRemoved() || !Position::areInRange<1, 1, 0>(getPosition(), container->getPosition())) {\r\n\t\t\t\tautoCloseContainers(container);\r\n\t\t\t} else if (container->getTopParent() == getPlayer()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c7e779ffb1cb6f54", - "equalIndicator/v1": "07e283abb932206ed9ef9a3884a55159dd5aa0eb06b4969fec9fa92b62bbddbb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 420, - "startColumn": 2, - "charOffset": 15144, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 418, - "startColumn": 1, - "charOffset": 15137, - "charLength": 46, - "snippet": { - "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3e635c284111b6a8", - "equalIndicator/v1": "07e58e32a1c7e112ec3bdb9d1c651b621ae8176cce47494bcf48d643e248fee4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5571, - "startColumn": 17, - "charOffset": 165216, - "charLength": 17, - "snippet": { - "text": "getReflectPercent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5569, - "startColumn": 1, - "charOffset": 165195, - "charLength": 195, - "snippet": { - "text": "}\r\n\r\nint32_t Player::getReflectPercent(CombatType_t combat, bool useCharges) const {\r\n\tint32_t result = reflectPercent[combatTypeToIndex(combat)];\r\n\tfor (const auto &item : getEquippedItems()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "da04b22833ce20ac", - "equalIndicator/v1": "07fa49c1f5c2a0780d0f7c99aa847f8984385d67a66a7921a5aab77581dfffc8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1266, - "startColumn": 67, - "charOffset": 38882, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1264, - "startColumn": 1, - "charOffset": 38811, - "charLength": 166, - "snippet": { - "text": "}\r\n\r\nvoid Creature::onAttackedCreatureKilled(std::shared_ptr target) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (target != getCreature()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ec1e2bf11bfb7dc4", - "equalIndicator/v1": "0807724d2d2f0305c3c57a8efeffcadc9ef64cd912f3e73f5b36f4f3a18f77a7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 953, - "startColumn": 46, - "charOffset": 36402, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 951, - "startColumn": 1, - "charOffset": 36302, - "charLength": 164, - "snippet": { - "text": "\tgetScriptInterface()->pushFunction(getScriptId());\r\n\r\n\tLuaScriptInterface::pushUserdata(L, player);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4d3603f67e1a7519", - "equalIndicator/v1": "080821f3ea35efafcb90d48eb60eb8d27c738299ac62c5b843a02fdbfcd8fde6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iobestiary.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 361, - "startColumn": 4, - "charOffset": 11945, - "charLength": 88, - "snippet": { - "text": "case COMBAT_EARTHDAMAGE:\r\n\t\t\t\tdefaultMap[2] -= static_cast(elementEntry.second)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 359, - "startColumn": 1, - "charOffset": 11865, - "charLength": 212, - "snippet": { - "text": "\t\t\t\tdefaultMap[1] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_EARTHDAMAGE:\r\n\t\t\t\tdefaultMap[2] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_ENERGYDAMAGE:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8b1a976cd675bbd5", - "equalIndicator/v1": "086094af625c027cc201956132ca11d8fc4b84ed4a80f3fa8b5c6170442b7db7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1450, - "startColumn": 75, - "charOffset": 42486, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1448, - "startColumn": 1, - "charOffset": 42407, - "charLength": 163, - "snippet": { - "text": "}\r\n\r\nvoid Player::onApplyImbuement(Imbuement* imbuement, std::shared_ptr item, uint8_t slot, bool protectionCharm) {\r\n\tif (!imbuement || !item) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2015631eb94159b5", - "equalIndicator/v1": "086344ca59176339eb59d7539168694b0d44062b3faad3cd604f87618aa5cff9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6420, - "startColumn": 74, - "charOffset": 202823, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6418, - "startColumn": 1, - "charOffset": 202745, - "charLength": 180, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendPartyCreatureShowStatus(std::shared_ptr target, bool showStatus) {\r\n\tuint32_t cid = target->getID();\r\n\tif (!knownCreatureSet.contains(cid)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c4f268dfd1190c63", - "equalIndicator/v1": "0868448f3ec99464ce58af247c0f16de31fbebad708b1d3b061ab3654e49663d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1763, - "startColumn": 2, - "charOffset": 61475, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1761, - "startColumn": 1, - "charOffset": 61468, - "charLength": 47, - "snippet": { - "text": "\t}\r\n\r\n\tscriptInterface->resetScriptEnv();\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3c3aa44548f42d7d", - "equalIndicator/v1": "088de07babefd850fa90173a2fe2ce7e9b8f280234438b1de70d67e91b8ebaca" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '_Ilist', which is a reserved identifier", - "markdown": "Declaration uses identifier '_Ilist', which is a reserved identifier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/arraylist.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 39, - "startColumn": 40, - "charOffset": 1094, - "charLength": 6, - "snippet": { - "text": "_Ilist" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 37, - "startColumn": 1, - "charOffset": 1048, - "charLength": 95, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tvoid assign(std::initializer_list _Ilist) {\r\n\t\t\tbackContainer.assign(_Ilist);\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bd3cafddfcf745fc", - "equalIndicator/v1": "08e5bd95e89dd02893ce96af8d2676fcbec4f596cdb7589dad03e2899ff015b5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1635, - "startColumn": 7, - "charOffset": 57272, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1633, - "startColumn": 1, - "charOffset": 57128, - "charLength": 367, - "snippet": { - "text": "void TileCallback::onTileCombat(std::shared_ptr creature, std::shared_ptr tile) const {\r\n\t// onTileCombat(creature, pos)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[TileCallback::onTileCombat - Creature {} type {} on tile x: {} y: {} z: {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "62871b09f3ebfa9c", - "equalIndicator/v1": "09460b9d35ad96adb78c056aa359f5e752935cfdd439365c613aed8f66327cf0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The value returned by this function should not be disregarded; neglecting it may lead to errors", - "markdown": "The value returned by this function should not be disregarded; neglecting it may lead to errors" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/connection/connection.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 84, - "startColumn": 3, - "charOffset": 2556, - "charLength": 6, - "snippet": { - "text": "socket" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 82, - "startColumn": 1, - "charOffset": 2526, - "charLength": 247, - "snippet": { - "text": "\r\n\t\tstd::error_code error;\r\n\t\tsocket.shutdown(asio::ip::tcp::socket::shutdown_both, error);\r\n\t\tif (error && error != asio::error::not_connected) {\r\n\t\t\tg_logger().error(\"[Connection::closeSocket] - Failed to shutdown socket: {}\", error.message());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "79f105fffed4660a", - "equalIndicator/v1": "0954ad40d06ba04b0a29362d5d09a683b1e2834fdb0ee7d04c2eedf0087ac8ad" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1056, - "startColumn": 6, - "charOffset": 38069, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1054, - "startColumn": 1, - "charOffset": 38033, - "charLength": 173, - "snippet": { - "text": "\tlua_pushnumber(L, rawExp);\r\n\r\n\tif (scriptInterface.protectedCall(L, 4, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b4bb8ceafe503766", - "equalIndicator/v1": "09682e4e976e7defb3537fd552faa4da62993182de8e3be80b2e2fe564e4db16" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 644, - "startColumn": 76, - "charOffset": 20860, - "charLength": 14, - "snippet": { - "text": "attackerPlayer" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 642, - "startColumn": 1, - "charOffset": 20780, - "charLength": 180, - "snippet": { - "text": "}\r\n\r\nCombatDamage Combat::applyImbuementElementalDamage(std::shared_ptr attackerPlayer, std::shared_ptr item, CombatDamage damage) {\r\n\tif (!item) {\r\n\t\treturn damage;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e8494bd102a7bf15", - "equalIndicator/v1": "097968014b5a54eed184a625122a0e87f722840b94fb821afe9c989f014176a4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 555, - "startColumn": 9, - "charOffset": 17961, - "charLength": 13, - "snippet": { - "text": "elementDamage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 553, - "startColumn": 1, - "charOffset": 17897, - "charLength": 84, - "snippet": { - "text": "\r\nint16_t WeaponMelee::getElementDamageValue() const {\r\n\treturn elementDamage;\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5c8cc08005e6a389", - "equalIndicator/v1": "09cced22fc1823d1304908fad120e02c09c761f85c8a79bc090cdf28f834b628" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'getCharmPoints' can be made const", - "markdown": "Method 'getCharmPoints' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1937, - "startColumn": 11, - "charOffset": 57253, - "charLength": 14, - "snippet": { - "text": "getCharmPoints" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1935, - "startColumn": 1, - "charOffset": 57206, - "charLength": 93, - "snippet": { - "text": "\t\titemPriceMap[itemId] = price;\r\n\t}\r\n\tuint32_t getCharmPoints() {\r\n\t\treturn charmPoints;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6ae25befbb098402", - "equalIndicator/v1": "09e77b2911ff3840134fbb8ed766baebcb382c680383b78edc6d57ca63514943" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 832, - "startColumn": 2, - "charOffset": 31832, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 830, - "startColumn": 1, - "charOffset": 31825, - "charLength": 52, - "snippet": { - "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d28dec2cdb324626", - "equalIndicator/v1": "09f01ce3f2b8933100951f63cdce3ef5a9cddbaa2ed97634e42c76de9f7c9cef" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/imbuements/imbuements.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 288, - "startColumn": 64, - "charOffset": 10193, - "charLength": 7, - "snippet": { - "text": "percent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 286, - "startColumn": 1, - "charOffset": 10041, - "charLength": 279, - "snippet": { - "text": "\t\t\t\t\t\tuint32_t percent = std::min(100, pugi::cast(attr.value()));\r\n\r\n\t\t\t\t\t\timbuement.absorbPercent[combatTypeToIndex(combatType)] = percent;\r\n\t\t\t\t\t} else if (strcasecmp(effecttype.c_str(), \"speed\") == 0) {\r\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"value\"))) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "52d28152b378f983", - "equalIndicator/v1": "0a124a464cb135f89a4d862583e2deb4b1325a276e316ada2f48d2d30c91b42a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'getRequiredLevel' can be made const", - "markdown": "Method 'getRequiredLevel' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 220, - "startColumn": 11, - "charOffset": 7159, - "charLength": 16, - "snippet": { - "text": "getRequiredLevel" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 218, - "startColumn": 1, - "charOffset": 7132, - "charLength": 72, - "snippet": { - "text": "\t\tslot = s;\r\n\t}\r\n\tuint32_t getRequiredLevel() {\r\n\t\treturn reqLevel;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a873fc30c21cbaed", - "equalIndicator/v1": "0a4bc7604f8a06fc04d886d8dac4d74398f272151e119d494171f7120d27af3d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2576, - "startColumn": 44, - "charOffset": 76964, - "charLength": 14, - "snippet": { - "text": "nextLevelCount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2574, - "startColumn": 1, - "charOffset": 76915, - "charLength": 116, - "snippet": { - "text": "\t}\r\n\r\n\tdouble_t result = round(((count * 100.) / nextLevelCount) * 100.) / 100.;\r\n\tif (result > 100) {\r\n\t\treturn 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3d3b6b21c26ddf7a", - "equalIndicator/v1": "0a7f1522a8644c003b8ef39dad44df733f0e9b70f20ed5b7ff73a2813b30e3f0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1168, - "startColumn": 7, - "charOffset": 44429, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1166, - "startColumn": 1, - "charOffset": 44304, - "charLength": 278, - "snippet": { - "text": "\r\nbool EventCallback::zoneBeforeCreatureLeave(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneBeforeCreatureLeave - \"\r\n\t\t \"Zone {} Creature {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c8ea6676a4f89d52", - "equalIndicator/v1": "0a84645430e7d6e77141794be5fe90173e7ecd3c30282bda61d3eaf55bc9ad2d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructor does not initialize these fields: text", - "markdown": "Constructor does not initialize these fields: text" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/mapcache.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 22, - "startColumn": 8, - "charOffset": 569, - "charLength": 9, - "snippet": { - "text": "BasicItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 20, - "startColumn": 1, - "charOffset": 543, - "charLength": 89, - "snippet": { - "text": "\r\n#pragma pack(1)\r\nstruct BasicItem {\r\n\tstd::string text;\r\n\t// size_t description { 0 };\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "79d31b2df980bcc7", - "equalIndicator/v1": "0a969a7631d2c70d583fe0d2b252a2c6242e56ed4ed946aa2f8b23b7fe0db406" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 751, - "startColumn": 53, - "charOffset": 24677, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 749, - "startColumn": 1, - "charOffset": 24620, - "charLength": 180, - "snippet": { - "text": "}\r\n\r\nuint32_t Spell::getManaCost(std::shared_ptr player) const {\r\n\tWheelSpellGrade_t spellGrade = player->wheel()->getSpellUpgrade(getName());\r\n\tuint32_t manaRedution = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dd1a6915dd614028", - "equalIndicator/v1": "0aa8565d32f49a75d949fe8d264a57292d28d5a74c02f7f4febc2747635ea169" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 437, - "startColumn": 59, - "charOffset": 13087, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 435, - "startColumn": 1, - "charOffset": 13024, - "charLength": 221, - "snippet": { - "text": "}\r\n\r\nuint32_t MoveEvent::StepInField(std::shared_ptr creature, std::shared_ptr item, const Position &) {\r\n\tif (creature == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::StepInField] - Creature is nullptr\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7fce00f72210a3e2", - "equalIndicator/v1": "0aaef74e5734f0dca60fdb1345b190442d8ba43ea9d8fba55f4a9f069cdb4374" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3132, - "startColumn": 2, - "charOffset": 96031, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3130, - "startColumn": 1, - "charOffset": 95920, - "charLength": 227, - "snippet": { - "text": "void ProtocolGame::parseMarketAcceptOffer(NetworkMessage &msg) {\r\n\tuint32_t timestamp = msg.get();\r\n\tuint16_t counter = msg.get();\r\n\tuint16_t amount = msg.get();\r\n\tif (amount > 0 && counter > 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "00594876d401ec76", - "equalIndicator/v1": "0aaf62ed3b4d898322754c00a99fc959af2a5413dc1b7cb5928c04ae3adeea9e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 961, - "startColumn": 7, - "charOffset": 34630, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 959, - "startColumn": 1, - "charOffset": 34618, - "charLength": 154, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnTradeRequest - \"\r\n\t\t \"Player {} target {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5f1fe7ce1e25b319", - "equalIndicator/v1": "0ab4cbc2a4b8ce7444e225d12fc18ee9a7019358d592b87f67bff0733983ce91" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 226, - "startColumn": 10, - "charOffset": 6438, - "charLength": 7, - "snippet": { - "text": "maxBeds" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 224, - "startColumn": 1, - "charOffset": 6396, - "charLength": 57, - "snippet": { - "text": "\r\n\tint32_t getMaxBeds() const {\r\n\t\treturn maxBeds;\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f8d9b1d2d3b27bd1", - "equalIndicator/v1": "0ac3c84f6c168997f85a0c3968c37fe6e4119c3cc207b8e3d1d504470a59f7d8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 321, - "startColumn": 8, - "charOffset": 7987, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 319, - "startColumn": 1, - "charOffset": 7889, - "charLength": 214, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetCapacity(lua_State* L) {\r\n\t// itemType:getCapacity()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->maxItems);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c9148f75a60de6b9", - "equalIndicator/v1": "0acb0db6585dd2b5f2dcc19b801c4a238dc66c03ab7825f7fdfddc937af621d4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2128, - "startColumn": 2, - "charOffset": 65386, - "charLength": 15, - "snippet": { - "text": "HighscoreType_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2126, - "startColumn": 1, - "charOffset": 65379, - "charLength": 154, - "snippet": { - "text": "\t}\r\n\r\n\tHighscoreType_t type = static_cast(msg.getByte());\r\n\tuint8_t category = msg.getByte();\r\n\tuint32_t vocation = msg.get();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a2b9f3e86e896e88", - "equalIndicator/v1": "0ae459f987fc84989e7fad9ab8e5ac75c8466e4ad19a80daec04bbd5ccad1c67" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1205, - "startColumn": 29, - "charOffset": 35480, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1203, - "startColumn": 1, - "charOffset": 35349, - "charLength": 151, - "snippet": { - "text": "\tvoid sendCreatureIcon(std::shared_ptr creature) {\r\n\t\tif (client && !client->oldProtocol) {\r\n\t\t\tclient->sendCreatureIcon(creature);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0099d96430b2168e", - "equalIndicator/v1": "0b1813f2db8c84333de5287c12e8b3a9b753e75f033a98fda7c630caacaba5d6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'initBoolValue' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'initBoolValue' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/custom_attribute.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 22, - "startColumn": 52, - "charOffset": 812, - "charLength": 10, - "snippet": { - "text": "const bool" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 20, - "startColumn": 1, - "charOffset": 589, - "charLength": 295, - "snippet": { - "text": "\tCustomAttribute(const std::string &initStringKey, const std::string &initStringValue);\r\n\tCustomAttribute(const std::string &initStringKey, const double initDoubleValue);\r\n\tCustomAttribute(const std::string &initStringKey, const bool initBoolValue);\r\n\r\n\tconst std::string &getStringKey() const;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "aa87e150ff0c0731", - "equalIndicator/v1": "0b37b47d4f3f9be212b766e5e66c8766e9a65683070be0781e4949b9ff3731c6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'mType' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'mType' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/spawns/spawn_monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 274, - "startColumn": 112, - "charOffset": 8790, - "charLength": 5, - "snippet": { - "text": "mType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 272, - "startColumn": 1, - "charOffset": 8674, - "charLength": 246, - "snippet": { - "text": "}\r\n\r\nvoid SpawnMonster::scheduleSpawn(uint32_t spawnMonsterId, spawnBlock_t &sb, const std::shared_ptr mType, uint16_t interval, bool startup /*= false*/) {\r\n\tif (interval <= 0) {\r\n\t\tspawnMonster(spawnMonsterId, sb, mType, startup);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "934945c6a3a7c265", - "equalIndicator/v1": "0b38cbdabe599194ee31e04f4cb78cd7220a0845977a0b8d614811aa2b2b6b70" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7726, - "startColumn": 37, - "charOffset": 270238, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7724, - "startColumn": 1, - "charOffset": 270195, - "charLength": 193, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tauto manaLoss = std::min(target->getMana(), -manaChange);\r\n\t\tBlockType_t blockType = target->blockHit(attacker, COMBAT_MANADRAIN, manaLoss);\r\n\t\tif (blockType != BLOCK_NONE) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "990cc4809476c65e", - "equalIndicator/v1": "0b3f45de831b3797b8f1973e92e6a9a808d06f4978975d85f400a4022f17c88e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'isPremium' can be made const", - "markdown": "Method 'isPremium' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/imbuements/imbuements.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 97, - "startColumn": 7, - "charOffset": 2494, - "charLength": 9, - "snippet": { - "text": "isPremium" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 95, - "startColumn": 1, - "charOffset": 2482, - "charLength": 49, - "snippet": { - "text": "\t}\r\n\r\n\tbool isPremium() {\r\n\t\treturn premium;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e5eae05015f86ece", - "equalIndicator/v1": "0b6582080d2295196e1b9ac337ad41ad98a9a7a9a25d41c13bd0c6b306fb1bd6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 242, - "startColumn": 8, - "charOffset": 6009, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 240, - "startColumn": 1, - "charOffset": 5919, - "charLength": 198, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetName(lua_State* L) {\r\n\t// itemType:getName()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushString(L, itemType->name);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "75e2ee8c1bf2c493", - "equalIndicator/v1": "0b6c95013135a2ff74b136bc4cdc49d1baa149659e6563798b9577c3b26538cd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 670, - "startColumn": 61, - "charOffset": 21370, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 668, - "startColumn": 1, - "charOffset": 21305, - "charLength": 248, - "snippet": { - "text": "}\r\n\r\nvoid Spell::applyCooldownConditions(std::shared_ptr player) const {\r\n\tWheelSpellGrade_t spellGrade = player->wheel()->getSpellUpgrade(getName());\r\n\tbool isUpgraded = getWheelOfDestinyUpgraded() && static_cast(spellGrade) > 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7ed1dac496045d96", - "equalIndicator/v1": "0b98c22b49c93456978dc1278186d399931b355974e156a9369da58180499a2e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 202, - "startColumn": 80, - "charOffset": 5668, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 200, - "startColumn": 1, - "charOffset": 5584, - "charLength": 128, - "snippet": { - "text": "}\r\n\r\nbool House::kickPlayer(std::shared_ptr player, std::shared_ptr target) {\r\n\tif (!target) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "80a718ba540240fc", - "equalIndicator/v1": "0bb94f7e97fcffb357cf1ea3a1a4165635693c419cff8dd2f371fb1af48af44f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 902, - "startColumn": 52, - "charOffset": 29271, - "charLength": 8, - "snippet": { - "text": "attacker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 900, - "startColumn": 1, - "charOffset": 29215, - "charLength": 127, - "snippet": { - "text": "}\r\n\r\nvoid Creature::drainMana(std::shared_ptr attacker, int32_t manaLoss) {\r\n\tonAttacked();\r\n\tchangeMana(-manaLoss);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "477499c93ecc2d51", - "equalIndicator/v1": "0bcef6c1eb6a13fcce508d31fbefc96b6d6d0b2ecf82dc88f36e895b5ec0edfa" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1291, - "startColumn": 55, - "charOffset": 42847, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1289, - "startColumn": 1, - "charOffset": 42788, - "charLength": 305, - "snippet": { - "text": "}\r\n\r\nvoid Combat::doCombatHealth(std::shared_ptr caster, const Position &position, const std::unique_ptr &area, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tapplyExtensions(caster, nullptr, damage, params);\r\n\tconst auto origin = caster ? caster->getPosition() : Position();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bdf62cbfe2911424", - "equalIndicator/v1": "0be179621848755f2de485a89a55d84e521c513bd7a2cded9c27490cfe5d0458" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 958, - "startColumn": 27, - "charOffset": 30747, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 956, - "startColumn": 1, - "charOffset": 30715, - "charLength": 129, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\r\n\tenv->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6e25960ca0312694", - "equalIndicator/v1": "0c03eb26a70d6b7fea2f866fbd0a66ce110f00cbb0d88c656dc4f57b6d30115b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use '= default' to define a trivial destructor", - "markdown": "Use '= default' to define a trivial destructor" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/creaturecallback.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 20, - "startColumn": 3, - "charOffset": 662, - "charLength": 16, - "snippet": { - "text": "CreatureCallback" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 18, - "startColumn": 1, - "charOffset": 486, - "charLength": 248, - "snippet": { - "text": "\tCreatureCallback(LuaScriptInterface* scriptInterface, std::shared_ptr targetCreature) :\r\n\t\tscriptInterface(scriptInterface), m_targetCreature(targetCreature) {};\r\n\t~CreatureCallback() { }\r\n\r\n\tbool startScriptInterface(int32_t scriptId);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a0163640bc7684f4", - "equalIndicator/v1": "0c17e6b8eb5dd14fdfe11c882da5659ddc9d9de57b1b869133c681ba996f7f69" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 792, - "startColumn": 57, - "charOffset": 25774, - "charLength": 11, - "snippet": { - "text": "attackSkill" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 790, - "startColumn": 1, - "charOffset": 25659, - "charLength": 176, - "snippet": { - "text": "\r\n\tint32_t minValue = std::round(player->getLevel() / 5);\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue) / 2;\r\n\r\n\tif (target) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "113ea4f52e25822c", - "equalIndicator/v1": "0c76009ca120775e5773ec14ea73a215a392963e78bec811159019cfb5420b2c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 853, - "startColumn": 17, - "charOffset": 25475, - "charLength": 19, - "snippet": { - "text": "postAddNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 851, - "startColumn": 1, - "charOffset": 25454, - "charLength": 231, - "snippet": { - "text": "}\r\n\r\nvoid Container::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tstd::shared_ptr topParent = getTopParent();\r\n\tif (topParent->getCreature()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bf5a9dedb4e861e5", - "equalIndicator/v1": "0c8df03f11773a7f170cf6d0636190ead4eac2ce80fda9ce030a3cbb68a8c5f3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 740, - "startColumn": 27, - "charOffset": 23123, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 738, - "startColumn": 1, - "charOffset": 23091, - "charLength": 129, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\r\n\tenv->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a39dee61e517bbc9", - "equalIndicator/v1": "0c972b1f975c846ae34a24d3d9c71d18c43bd4f4ecbcb757ac6329416f2993ad" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1298, - "startColumn": 23, - "charOffset": 43349, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1296, - "startColumn": 1, - "charOffset": 43178, - "charLength": 246, - "snippet": { - "text": "\r\nvoid Combat::doCombatMana(std::shared_ptr caster, std::shared_ptr target, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tdoCombatMana(caster, target, caster ? caster->getPosition() : Position(), damage, params);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1f21b7b3709c816c", - "equalIndicator/v1": "0c9ba9f1fc8c6653cfb1e0d58d1df30ce81d8181db2fa081343b5b9320dedd03" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'getLockerItemsAndCountById' can be made const", - "markdown": "Method 'getLockerItemsAndCountById' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7016, - "startColumn": 65, - "charOffset": 207407, - "charLength": 26, - "snippet": { - "text": "getLockerItemsAndCountById" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7014, - "startColumn": 1, - "charOffset": 207338, - "charLength": 305, - "snippet": { - "text": "}\r\n\r\nstd::pair>, uint16_t> Player::getLockerItemsAndCountById(const std::shared_ptr &depotLocker, uint8_t tier, uint16_t itemId) {\r\n\tstd::vector> lockerItems;\r\n\tauto [itemVector, itemMap] = requestLockerItems(depotLocker, false, tier);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0b53e62203e503f1", - "equalIndicator/v1": "0cc2ba6090f2321688016ad11e234b99cc0f575fe894ec7429fff3f25a32bdcf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 393, - "startColumn": 8, - "charOffset": 9789, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 391, - "startColumn": 1, - "charOffset": 9693, - "charLength": 211, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetDefense(lua_State* L) {\r\n\t// itemType:getDefense()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->defense);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "491791f0f961f478", - "equalIndicator/v1": "0cd296c964b98891c7d06bbbcc9cb1916dd4cb0e7a9ff687acc6613ac7885197" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly", - "markdown": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2379, - "startColumn": 61, - "charOffset": 90428, - "charLength": 12, - "snippet": { - "text": "__FUNCTION__" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2377, - "startColumn": 1, - "charOffset": 90284, - "charLength": 187, - "snippet": { - "text": "\t\tauto autoContainer = Item::CreateItem(autoContainerId);\r\n\t\tif (!autoContainer) {\r\n\t\t\tg_logger().error(\"[{}] Failed to create auto container\", __FUNCTION__);\r\n\t\t\treturn toCylinder;\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "673525a785ee75b1", - "equalIndicator/v1": "0cd77114bf16ea63df97c39f55bc47c602f3998758021c6d28763eb0a46276bb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'door' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'door' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 405, - "startColumn": 43, - "charOffset": 11850, - "charLength": 4, - "snippet": { - "text": "door" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 403, - "startColumn": 1, - "charOffset": 11803, - "charLength": 128, - "snippet": { - "text": "}\r\n\r\nvoid House::addDoor(std::shared_ptr door) {\r\n\tdoorList.push_back(door);\r\n\tdoor->setHouse(static_self_cast());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3252cbc4676141cd", - "equalIndicator/v1": "0d275a7a4cb904fd5b4b3ed2bb82f89862d893905603dc136da7da70506e553c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'guild' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'guild' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/ioguild.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 36, - "startColumn": 54, - "charOffset": 1366, - "charLength": 5, - "snippet": { - "text": "guild" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 34, - "startColumn": 1, - "charOffset": 1308, - "charLength": 94, - "snippet": { - "text": "}\r\n\r\nvoid IOGuild::saveGuild(const std::shared_ptr guild) {\r\n\tif (!guild) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "66b08e2e4d664535", - "equalIndicator/v1": "0d35fc20a6dc1db927591a91cf6d10cc63a7084f78f6ea518a16fdd786c8e960" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use nullptr", - "markdown": "Use nullptr" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 399, - "startColumn": 61, - "charOffset": 12120, - "charLength": 4, - "snippet": { - "text": "NULL" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 397, - "startColumn": 1, - "charOffset": 12039, - "charLength": 198, - "snippet": { - "text": "\t\treturn false;\r\n\t}\r\n\tauto isContainerAndHasSomethingInside = (getContainer() != NULL) && (getContainer()->getItemList().size() > 0);\r\n\treturn (isStowable() || isContainerAndHasSomethingInside);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c6790fb62f6eb56e", - "equalIndicator/v1": "0d36666e79b6e08850eb1b237f15f1c03fb06d511da8a7b16a4f6efab264b43f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 501, - "startColumn": 33, - "charOffset": 14387, - "charLength": 9, - "snippet": { - "text": "spectator" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 499, - "startColumn": 1, - "charOffset": 14319, - "charLength": 239, - "snippet": { - "text": "\t// send to client\r\n\tsize_t i = 0;\r\n\tfor (std::shared_ptr spectator : spectators) {\r\n\t\tif (std::shared_ptr tmpPlayer = spectator->getPlayer()) {\r\n\t\t\ttmpPlayer->sendRemoveTileThing(cylinderMapPos, oldStackPosVector[i++]);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1cb413ff4b6f3a5d", - "equalIndicator/v1": "0d60f30d25703e7f4e5ce47a5149d332a3bdcd97784b8f1fd09919ea76b60d2e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 424, - "startColumn": 85, - "charOffset": 15278, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 422, - "startColumn": 1, - "charOffset": 15182, - "charLength": 194, - "snippet": { - "text": "\r\n// Party\r\nbool Events::eventPartyOnJoin(std::shared_ptr party, std::shared_ptr player) {\r\n\t// Party:onJoin(player) or Party.onJoin(self, player)\r\n\tif (info.partyOnJoin == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e63a2ba4874f48a8", - "equalIndicator/v1": "0d702d55a575747be4afafc8cd12e2752fb2f89a58b28517b75c1ae14bb14fda" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/mailbox/mailbox.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 18, - "startColumn": 22, - "charOffset": 606, - "charLength": 8, - "snippet": { - "text": "queryAdd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 16, - "startColumn": 1, - "charOffset": 552, - "charLength": 247, - "snippet": { - "text": "#include \"map/spectators.hpp\"\r\n\r\nReturnValue Mailbox::queryAdd(int32_t, const std::shared_ptr &thing, uint32_t, uint32_t, std::shared_ptr) {\r\n\tstd::shared_ptr item = thing->getItem();\r\n\tif (item && Mailbox::canSend(item)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "96225abee62a7a35", - "equalIndicator/v1": "0d8a0fbb8b71c45ec992414c411a49297e21561f9db9c4e359171e9bdb03b5af" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2645, - "startColumn": 47, - "charOffset": 99712, - "charLength": 8, - "snippet": { - "text": "cylinder" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2643, - "startColumn": 1, - "charOffset": 99661, - "charLength": 195, - "snippet": { - "text": "}\r\n\r\nvoid Game::addMoney(std::shared_ptr cylinder, uint64_t money, uint32_t flags /*= 0*/) {\r\n\tif (cylinder == nullptr) {\r\n\t\tg_logger().error(\"[{}] cylinder is nullptr\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1e938265e7859d1a", - "equalIndicator/v1": "0d99d672b74230b5e9ca9766aae537c9374fd998b746206bb0a705fcb0542bf3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1974, - "startColumn": 2, - "charOffset": 60483, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1972, - "startColumn": 1, - "charOffset": 60422, - "charLength": 159, - "snippet": { - "text": "\r\nvoid ProtocolGame::parseRemoveVip(NetworkMessage &msg) {\r\n\tuint32_t guid = msg.get();\r\n\tg_game().playerRequestRemoveVip(player->getID(), guid);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "11f027a087cef3f5", - "equalIndicator/v1": "0d9f422cd0bdfda969381a822ce786ed41571e5c5abf60ede0621c67479e1a69" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1257, - "startColumn": 55, - "charOffset": 41453, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1255, - "startColumn": 1, - "charOffset": 41394, - "charLength": 344, - "snippet": { - "text": "}\r\n\r\nvoid Combat::doCombatHealth(std::shared_ptr caster, std::shared_ptr target, const Position &origin, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\r\n\tif ((caster && target)\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6938b1dacdf0e0ab", - "equalIndicator/v1": "0dc8175d1d31997b0d6c304583cfb5b4384c78bc494835b0b4c635fda2cc197a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 446, - "startColumn": 15, - "charOffset": 12729, - "charLength": 18, - "snippet": { - "text": "onAttackedCreature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 444, - "startColumn": 1, - "charOffset": 12576, - "charLength": 328, - "snippet": { - "text": "\tvoid onTickCondition(ConditionType_t type, bool &bRemove);\r\n\tvirtual void onCombatRemoveCondition(std::shared_ptr condition);\r\n\tvirtual void onAttackedCreature(std::shared_ptr) { }\r\n\tvirtual void onAttacked();\r\n\tvirtual void onAttackedCreatureDrainHealth(std::shared_ptr target, int32_t points);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2909a10601ae0fa9", - "equalIndicator/v1": "0dd154510c6cb741380df6ab7e9ac118617c12efded28197c89ce3f76c1f37bb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 548, - "startColumn": 2, - "charOffset": 14591, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 546, - "startColumn": 1, - "charOffset": 14496, - "charLength": 235, - "snippet": { - "text": "\tdouble amount = getNumber(L, 4);\r\n\tuint16_t subType = getNumber(L, 5, 1);\r\n\tuint16_t actionId = getNumber(L, 6, 0);\r\n\tbool ignoreCap = getBoolean(L, 7, false);\r\n\tbool inBackpacks = getBoolean(L, 8, false);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "db9da1af80666057", - "equalIndicator/v1": "0dfc7a66c308a20a10ed2b768b61f0bd0e8627684abfa27a1f0b934053462dbc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 146, - "startColumn": 2, - "charOffset": 5063, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 144, - "startColumn": 1, - "charOffset": 5056, - "charLength": 72, - "snippet": { - "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n\treturn returnValue;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ab11e86e2a7eede2", - "equalIndicator/v1": "0e6c674d27b097a9748117d80f63047bde799980b20aed4f1e22432efaf754b7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 321, - "startColumn": 2, - "charOffset": 11929, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 319, - "startColumn": 1, - "charOffset": 11922, - "charLength": 52, - "snippet": { - "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f87715c6cc3a1f8d", - "equalIndicator/v1": "0e75527bd55a0df678cb494132be89c73f2209483699d33febf8d24fb4af4603" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 630, - "startColumn": 16, - "charOffset": 16948, - "charLength": 10, - "snippet": { - "text": "std::round" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 628, - "startColumn": 1, - "charOffset": 16914, - "charLength": 128, - "snippet": { - "text": "\t\t\tcontinue;\r\n\t\t}\r\n\t\tsetAbsorb(i, std::round((100 - creature->getAbsorbPercent(indexToCombatType(i))) * value / 100.f));\r\n\t}\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "249547746ac118e0", - "equalIndicator/v1": "0e7e00e1b2e03259bd496af8edd4b7da941fe35413f27f7e9dcdf2772c89267e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/map/tile_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 479, - "startColumn": 21, - "charOffset": 11272, - "charLength": 14, - "snippet": { - "text": "creatureVector" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 477, - "startColumn": 1, - "charOffset": 11246, - "charLength": 73, - "snippet": { - "text": "\t}\r\n\r\n\tlua_createtable(L, creatureVector->size(), 0);\r\n\r\n\tint index = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "55382831522e71a4", - "equalIndicator/v1": "0e7e494983ea12eed51c3578b8ce41790ff597b6e2bcef5485aa2eb8c772eebd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 285, - "startColumn": 41, - "charOffset": 10590, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 283, - "startColumn": 1, - "charOffset": 10544, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "50dd218cbc8d9cf1", - "equalIndicator/v1": "0e84443c4d240465e7887e009d1c638a48bb08f8fca0830ad42894008f52259a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1531, - "startColumn": 12, - "charOffset": 43807, - "charLength": 22, - "snippet": { - "text": "postRemoveNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1529, - "startColumn": 1, - "charOffset": 43791, - "charLength": 209, - "snippet": { - "text": "}\r\n\r\nvoid Tile::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tauto spectators = Spectators().find(getPosition(), true);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d6442d4db6bdaf17", - "equalIndicator/v1": "0e8dc867581e9fb7833cf55068f2fb3b77ddb2d13a91f3557e830522ac2d565e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 73, - "startColumn": 7, - "charOffset": 2387, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 71, - "startColumn": 1, - "charOffset": 2241, - "charLength": 308, - "snippet": { - "text": "\r\nReturnValue EventCallback::creatureOnAreaCombat(std::shared_ptr creature, std::shared_ptr tile, bool aggressive) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnAreaCombat - \"\r\n\t\t \"Creature {} on tile position {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ffa1b1c114f07897", - "equalIndicator/v1": "0ea2a432bde10ec0f17245026f15ba3df4f01221a5d119e7194ed91d7dc790ef" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1910, - "startColumn": 67, - "charOffset": 55164, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1908, - "startColumn": 1, - "charOffset": 55093, - "charLength": 150, - "snippet": { - "text": "}\r\n\r\nstd::string Item::parseImbuementDescription(std::shared_ptr item) {\r\n\tstd::ostringstream s;\r\n\tif (item && item->getImbuementSlot() >= 1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "46c2dc1579318a12", - "equalIndicator/v1": "0ec9082c837b92ef94d35bb3d33b8357a44beabda0ed83f06dc4132de7b6bc3c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6865, - "startColumn": 15, - "charOffset": 215068, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6863, - "startColumn": 1, - "charOffset": 215007, - "charLength": 99, - "snippet": { - "text": "\tmsg.addByte(cid);\r\n\tmsg.add(slot);\r\n\tAddItem(msg, item);\r\n\twriteToOutputBuffer(msg);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e3af63bcdd716b5d", - "equalIndicator/v1": "0f2f5c7333cd5b0968c5b4f98f0306aba5b0529fee12ce74b95582e0d27b4bc3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 612, - "startColumn": 40, - "charOffset": 18563, - "charLength": 10, - "snippet": { - "text": "resultList" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 610, - "startColumn": 1, - "charOffset": 18458, - "charLength": 167, - "snippet": { - "text": "\t\t\tif (!resultList.empty()) {\r\n\t\t\t\tauto it = resultList.begin();\r\n\t\t\t\tstd::advance(it, uniform_random(0, resultList.size() - 1));\r\n\t\t\t\treturn selectTarget(*it);\r\n\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "13820499c8017c55", - "equalIndicator/v1": "0f3d47117b912efd01448a9f085d5afd33251ecd5bb4fcf45070b3e8ec099cae" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/map/house_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 242, - "startColumn": 32, - "charOffset": 6889, - "charLength": 7, - "snippet": { - "text": "bedItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 240, - "startColumn": 1, - "charOffset": 6839, - "charLength": 140, - "snippet": { - "text": "\r\n\tint index = 0;\r\n\tfor (std::shared_ptr bedItem : beds) {\r\n\t\tpushUserdata(L, bedItem);\r\n\t\tsetItemMetatable(L, -1, bedItem);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f1d8a51783378faf", - "equalIndicator/v1": "0f697e3cddaf4d0a7389875b768d3129f6008895f5e6a0cd078c3018f2ceb6fb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1329, - "startColumn": 53, - "charOffset": 44738, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1327, - "startColumn": 1, - "charOffset": 44681, - "charLength": 303, - "snippet": { - "text": "}\r\n\r\nvoid Combat::doCombatMana(std::shared_ptr caster, const Position &position, const std::unique_ptr &area, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tapplyExtensions(caster, nullptr, damage, params);\r\n\tconst auto origin = caster ? caster->getPosition() : Position();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9309a671f5bbe613", - "equalIndicator/v1": "0f6eed27d3240ef31b72010db345c1f0950b50b83f67f3f8145898b036457bfd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 966, - "startColumn": 7, - "charOffset": 36837, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 964, - "startColumn": 1, - "charOffset": 36695, - "charLength": 266, - "snippet": { - "text": "\r\nbool EventCallback::playerOnRotateItem(std::shared_ptr player, std::shared_ptr item, const Position &position) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[{}] Call stack overflow\", __FUNCTION__);\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a40499dea31e72d3", - "equalIndicator/v1": "0f88d9f4621fd5304fff8ac6f9fcad4bb29cf85af99adf8df1ee970fe7dd2dc1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7968, - "startColumn": 69, - "charOffset": 250476, - "charLength": 6, - "snippet": { - "text": "corpse" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7966, - "startColumn": 1, - "charOffset": 250403, - "charLength": 171, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendKillTrackerUpdate(std::shared_ptr corpse, const std::string &name, const Outfit_t creatureOutfit) {\r\n\tif (oldProtocol) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c7e500db557bf79b", - "equalIndicator/v1": "0f93c585d775b2f8e5315900e0e6962c1b62e88fcf6b810f2c1dc1ae4080ff65" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 102, - "startColumn": 59, - "charOffset": 3467, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 100, - "startColumn": 1, - "charOffset": 3403, - "charLength": 147, - "snippet": { - "text": "\t}\r\n\r\n\tbool playerCanUseItemOnHouseTile(std::shared_ptr player, std::shared_ptr item) {\r\n\t\tif (!player || !item) {\r\n\t\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "73f9471c3a9efdd4", - "equalIndicator/v1": "0ff137a7fd5d9711f14353f87b0741a722ef95b0ecf2f319a4f7684a542c5480" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 786, - "startColumn": 56, - "charOffset": 25544, - "charLength": 1, - "snippet": { - "text": "," - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 784, - "startColumn": 1, - "charOffset": 25484, - "charLength": 210, - "snippet": { - "text": "}\r\n\r\nvoid Combat::CombatDispelFunc(std::shared_ptr, std::shared_ptr target, const CombatParams ¶ms, CombatDamage*) {\r\n\tif (target) {\r\n\t\ttarget->removeCombatCondition(params.dispelType);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "35081e79b2a0d47b", - "equalIndicator/v1": "0fffe54367d15494c0bf91485736743522fe0444f69cb5947d1fcd7442c11bc9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/cylinder.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 44, - "startColumn": 16, - "charOffset": 1122, - "charLength": 16, - "snippet": { - "text": "internalAddThing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 42, - "startColumn": 1, - "charOffset": 1102, - "charLength": 81, - "snippet": { - "text": "}\r\n\r\nvoid Cylinder::internalAddThing(uint32_t, std::shared_ptr) {\r\n\t//\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9b5b5c08bec6f5c5", - "equalIndicator/v1": "101cfc334f1eca8b10164e058ed29336efc49013711c7228e6a2fbf7f245ad81" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1374, - "startColumn": 61, - "charOffset": 41145, - "charLength": 4, - "snippet": { - "text": "tile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1372, - "startColumn": 1, - "charOffset": 41080, - "charLength": 158, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::GetTileDescription(std::shared_ptr tile, NetworkMessage &msg) {\r\n\tif (oldProtocol) {\r\n\t\tmsg.add(0x00); // Env effects\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cb5edd2108ae9083", - "equalIndicator/v1": "103c4d0fd6727d7c673347423cfa3c36ebeb0ea7a4c50e15a6b41b7caa6915b3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'compareItem' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'compareItem' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 242, - "startColumn": 41, - "charOffset": 8114, - "charLength": 11, - "snippet": { - "text": "compareItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 240, - "startColumn": 1, - "charOffset": 8069, - "charLength": 105, - "snippet": { - "text": "}\r\n\r\nbool Item::equals(std::shared_ptr compareItem) const {\r\n\tif (!compareItem) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c8346e0f12156595", - "equalIndicator/v1": "103e01350dcda241138a9084ce69857cf4d38a446d4ff5a24db65a2bc0df7823" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'getRewardsFromContainer' is within a recursive call chain", - "markdown": "Function 'getRewardsFromContainer' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1329, - "startColumn": 44, - "charOffset": 39149, - "charLength": 23, - "snippet": { - "text": "getRewardsFromContainer" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1327, - "startColumn": 1, - "charOffset": 39101, - "charLength": 193, - "snippet": { - "text": "}\r\n\r\nstd::vector> Player::getRewardsFromContainer(std::shared_ptr container) const {\r\n\tstd::vector> rewardItemsVector;\r\n\tif (container) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f42be0fc33d2e2ee", - "equalIndicator/v1": "105fd426da3c36297678936842109ad92dcea5e3ad1589b6ea6165731f701a20" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7550, - "startColumn": 64, - "charOffset": 263094, - "charLength": 56, - "snippet": { - "text": "charm->chance + attackerPlayer->getCharmChanceModifier()" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7548, - "startColumn": 1, - "charOffset": 262928, - "charLength": 429, - "snippet": { - "text": "\t activeCharm != CHARM_NONE) {\r\n\t\tconst auto charm = g_iobestiary().getBestiaryCharm(activeCharm);\r\n\t\tint8_t chance = charm->id == CHARM_CRIPPLE ? charm->chance : charm->chance + attackerPlayer->getCharmChanceModifier();\r\n\t\tg_logger().debug(\"charm chance: {}, base: {}, bonus: {}\", chance, charm->chance, attackerPlayer->getCharmChanceModifier());\r\n\t\tif (charm->type == CHARM_OFFENSIVE && (chance >= normal_random(0, 100))) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cac5caffc2d03451", - "equalIndicator/v1": "10b84d1cae216d65a261a2d19a6f3c2d2f937b78b6501da11a613c51ff919c4f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 298, - "startColumn": 93, - "charOffset": 7706, - "charLength": 5, - "snippet": { - "text": "ticks" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 296, - "startColumn": 1, - "charOffset": 7608, - "charLength": 132, - "snippet": { - "text": "\t}\r\n\r\n\treturn createCondition(static_cast(id), static_cast(type), ticks, 0, buff != 0, subId);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "42bccebb473cab30", - "equalIndicator/v1": "10bec48557ea88722a3fefbb734178cce2b35b38832c1839013dc30f18a5d990" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'virtual' is redundant since the function is already declared 'override'", - "markdown": "'virtual' is redundant since the function is already declared 'override'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 348, - "startColumn": 18, - "charOffset": 9962, - "charLength": 21, - "snippet": { - "text": "getElementDamageValue" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 346, - "startColumn": 1, - "charOffset": 9912, - "charLength": 151, - "snippet": { - "text": "\t\treturn params.combatType;\r\n\t}\r\n\tvirtual int16_t getElementDamageValue() const override;\r\n\tvoid setMinChange(int32_t change) {\r\n\t\tminChange = change;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "54111c5c0eeda6de", - "equalIndicator/v1": "110050b93a8d3710fb5f151d50a1441623f1d41445e4ec13b2866b11383d1fb9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 10015, - "startColumn": 8, - "charOffset": 348893, - "charLength": 25, - "snippet": { - "text": "auto [monsterId, monster]" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 10013, - "startColumn": 1, - "charOffset": 348740, - "charLength": 272, - "snippet": { - "text": "\t\t// If the forgeable monsters haven't been created\r\n\t\t// Then we'll create them so they don't return in the next if (forgeableMonsters.empty())\r\n\t\tfor (auto [monsterId, monster] : monsters) {\r\n\t\t\tauto monsterTile = monster->getTile();\r\n\t\t\tif (!monster || !monsterTile) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "924506ed2704c1df", - "equalIndicator/v1": "110ad18245f3651a199e6384b8d12d04ea405aa0d6a306382075b21ba753b5a7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/functions/iologindata_save_player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 767, - "startColumn": 65, - "charOffset": 29217, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 765, - "startColumn": 1, - "charOffset": 29148, - "charLength": 180, - "snippet": { - "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerStorage(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d1b7ca5264817701", - "equalIndicator/v1": "1135e902e21ab46e30a70f9b31d5fdf7aa33493de52a8f45953bdb9dd5dae30d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 783, - "startColumn": 41, - "charOffset": 30094, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 781, - "startColumn": 1, - "charOffset": 30048, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e239a5fc547feff1", - "equalIndicator/v1": "1158ebadb62572aab46707b1af298e15bd82e05798184fb79e2b640e91dadeb7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 391, - "startColumn": 41, - "charOffset": 14697, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 389, - "startColumn": 1, - "charOffset": 14651, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "887ada9be39af280", - "equalIndicator/v1": "116697cb6f4f128a886ddd93dad0c675138d67e7d67d9d81cbc5d48416efe483" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'newOwner' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'newOwner' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 514, - "startColumn": 94, - "charOffset": 15319, - "charLength": 8, - "snippet": { - "text": "newOwner" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 512, - "startColumn": 1, - "charOffset": 15221, - "charLength": 157, - "snippet": { - "text": "}\r\n\r\nbool House::executeTransfer(std::shared_ptr item, std::shared_ptr newOwner) {\r\n\tif (transferItem != item) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "44e2e600b43e9f95", - "equalIndicator/v1": "11713c70cccfb4d148ac7c9cc12027358a7ec86e176ecb6eb8b23ef92c7e0b21" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'onGainExperience' is within a recursive call chain", - "markdown": "Function 'onGainExperience' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1289, - "startColumn": 16, - "charOffset": 39635, - "charLength": 16, - "snippet": { - "text": "onGainExperience" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1287, - "startColumn": 1, - "charOffset": 39615, - "charLength": 172, - "snippet": { - "text": "}\r\n\r\nvoid Creature::onGainExperience(uint64_t gainExp, std::shared_ptr target) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tauto master = getMaster();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "75e323914019e42c", - "equalIndicator/v1": "118e3a24fa79d17ae23b08e65d61b4ce6b25e6ebc1b2fd161d457aff27459498" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to 'float'", - "markdown": "Narrowing conversion from 'int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 605, - "startColumn": 59, - "charOffset": 16319, - "charLength": 28, - "snippet": { - "text": "(skillsPercent[skill] - 100)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 603, - "startColumn": 1, - "charOffset": 16201, - "charLength": 165, - "snippet": { - "text": "\r\n\t\tint32_t unmodifiedSkill = player->getBaseSkill(skill);\r\n\t\tskills[skill] = static_cast(unmodifiedSkill * ((skillsPercent[skill] - 100) / 100.f));\r\n\t}\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "17bdb40224b0f798", - "equalIndicator/v1": "11a0c529ba3bb1f966183b0bed334a939c04fbd0c3e699f49679b1906ccb2296" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use std::make_unique instead", - "markdown": "Use std::make_unique instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/server.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 159, - "startColumn": 13, - "charOffset": 4362, - "charLength": 5, - "snippet": { - "text": "reset" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 157, - "startColumn": 1, - "charOffset": 4139, - "charLength": 368, - "snippet": { - "text": "\t\t\tacceptor.reset(new asio::ip::tcp::acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::address(asio::ip::address_v4::from_string(g_configManager().getString(IP, __FUNCTION__))), serverPort)));\r\n\t\t} else {\r\n\t\t\tacceptor.reset(new asio::ip::tcp::acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::address(asio::ip::address_v4(INADDR_ANY)), serverPort)));\r\n\t\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d1b644eb69e423e7", - "equalIndicator/v1": "1200409a003768d41a85db9779990b66199eb801a4fcdf96bec3a6df64ff280e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 526, - "startColumn": 8, - "charOffset": 13017, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 524, - "startColumn": 1, - "charOffset": 12921, - "charLength": 211, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetDecayId(lua_State* L) {\r\n\t// itemType:getDecayId()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->decayTo);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3595d2751d68a764", - "equalIndicator/v1": "1228eabedd5d8c4608e98d1f42d77579833fd5eabedd612d634bb721209459f5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'mType' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'mType' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 34, - "startColumn": 53, - "charOffset": 1118, - "charLength": 5, - "snippet": { - "text": "mType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 32, - "startColumn": 1, - "charOffset": 1061, - "charLength": 142, - "snippet": { - "text": "}\r\n\r\nMonster::Monster(const std::shared_ptr mType) :\r\n\tCreature(),\r\n\tnameDescription(asLowerCaseString(mType->nameDescription)),\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "58d70a9bb55d946b", - "equalIndicator/v1": "122fdb7ff6089e8e94f81ac4d68c9feae912b0c50e7fc76392b43c65e63aeddf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 808, - "startColumn": 20, - "charOffset": 20102, - "charLength": 18, - "snippet": { - "text": "luaItemSetDuration" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 806, - "startColumn": 1, - "charOffset": 20078, - "charLength": 244, - "snippet": { - "text": "}\r\n\r\nint ItemFunctions::luaItemSetDuration(lua_State* L) {\r\n\t// item:setDuration(minDuration, maxDuration = 0, decayTo = 0, showDuration = true)\r\n\t// Example: item:setDuration(10000, 20000, 2129, false) = random duration from range 10000/20000\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "358f1e0127ad7783", - "equalIndicator/v1": "125f89eb1ab2cddd1d3131955295c9aa7e39713ead40d3d0914e963f2b0c9319" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 792, - "startColumn": 89, - "charOffset": 25792, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 790, - "startColumn": 1, - "charOffset": 25699, - "charLength": 255, - "snippet": { - "text": "}\r\n\r\nvoid Combat::CombatNullFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage*) {\r\n\tCombatConditionFunc(caster, target, params, nullptr);\r\n\tCombatDispelFunc(caster, target, params, nullptr);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0ec1d9d7a30d4bbd", - "equalIndicator/v1": "12743b06c0cb50ac35327b86485d4346abfa4f84265e85f4f082423d0a66f59d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/scripts/script_environment.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 61, - "startColumn": 61, - "charOffset": 1693, - "charLength": 5, - "snippet": { - "text": "thing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 59, - "startColumn": 1, - "charOffset": 1628, - "charLength": 125, - "snippet": { - "text": "}\r\n\r\nuint32_t ScriptEnvironment::addThing(std::shared_ptr thing) {\r\n\tif (!thing || thing->isRemoved()) {\r\n\t\treturn 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d82af4b0f510cdbe", - "equalIndicator/v1": "1286bfea5d455c186adc20984cc1763eba49ffb338b75ac9d6b5cc0681638c77" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/creature_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1005, - "startColumn": 12, - "charOffset": 27961, - "charLength": 4, - "snippet": { - "text": "zone" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1003, - "startColumn": 1, - "charOffset": 27876, - "charLength": 145, - "snippet": { - "text": "\tlua_createtable(L, static_cast(zones.size()), 0);\r\n\tint index = 0;\r\n\tfor (auto zone : zones) {\r\n\t\tindex++;\r\n\t\tpushUserdata(L, zone);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4462430f479cbac8", - "equalIndicator/v1": "129326ca885278422dab62fb9717409de20f67676de6b0c21632b917cf2fd70f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'creature' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'creature' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1085, - "startColumn": 62, - "charOffset": 31682, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1083, - "startColumn": 1, - "charOffset": 31612, - "charLength": 255, - "snippet": { - "text": "\t\t}\r\n\t}\r\n\tvoid sendUpdateTileCreature(const std::shared_ptr creature) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendUpdateTileCreature(creature->getPosition(), creature->getTile()->getClientIndexOfCreature(static_self_cast(), creature), creature);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "71b309b996bfd431", - "equalIndicator/v1": "12a033ec8869d1fae589a735a22d37977442ae7423de67a96eba40fa0f13e772" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2037, - "startColumn": 96, - "charOffset": 60382, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2035, - "startColumn": 1, - "charOffset": 60282, - "charLength": 172, - "snippet": { - "text": "}\r\n\r\nvoid Player::onRemoveContainerItem(std::shared_ptr container, std::shared_ptr item) {\r\n\tif (tradeState != TRADE_TRANSFER) {\r\n\t\tcheckTradeState(item);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8167981ddf4657f1", - "equalIndicator/v1": "12da16983d01e7acbdc5215890db8314dd8148d3d215bed3dc3ba84ba762fce7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5617, - "startColumn": 63, - "charOffset": 166601, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5615, - "startColumn": 1, - "charOffset": 166534, - "charLength": 117, - "snippet": { - "text": "}\r\n\r\nPartyShields_t Player::getPartyShield(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\treturn SHIELD_NONE;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "131b46d7180b1dc8", - "equalIndicator/v1": "130a68b981fe8e1cacd893bd7a772efe62cdfbda5698a8e8d42bdb93d9385886" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1367, - "startColumn": 31, - "charOffset": 41081, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1365, - "startColumn": 1, - "charOffset": 40964, - "charLength": 137, - "snippet": { - "text": "\tvoid sendCreatureHealth(std::shared_ptr creature) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureHealth(creature);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "90efd39277f0c3ff", - "equalIndicator/v1": "131236725241ea8f5787ead29996e9ed6732696ec5101f276f8b4fcdd047ab63" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/functions/iologindata_save_player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 723, - "startColumn": 67, - "charOffset": 27951, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 721, - "startColumn": 1, - "charOffset": 27880, - "charLength": 182, - "snippet": { - "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerBosstiary(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6e2a249c34e53c05", - "equalIndicator/v1": "131537fc39cd553f0755d02c7854d97ff1eea94c376a9bd3636f8134f66cdd31" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 142, - "startColumn": 14, - "charOffset": 4031, - "charLength": 13, - "snippet": { - "text": "queryMaxCount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 140, - "startColumn": 1, - "charOffset": 3820, - "charLength": 668, - "snippet": { - "text": "\t// cylinder implementations\r\n\tvirtual ReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override final;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override final;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6d7f459cad2705eb", - "equalIndicator/v1": "132f39e960a159fa3447700cf9818e8aca59aaf0f00b16e91dabb2840dd20551" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/trashholder.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 29, - "startColumn": 14, - "charOffset": 830, - "charLength": 8, - "snippet": { - "text": "queryAdd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 27, - "startColumn": 1, - "charOffset": 785, - "charLength": 486, - "snippet": { - "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e90294d1ed7a4fd2", - "equalIndicator/v1": "133e0aec4dd5158973d4bd3c1a5a3b5a10486c9b1676251fc03a1bf6e87641de" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 121, - "startColumn": 41, - "charOffset": 4237, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 119, - "startColumn": 1, - "charOffset": 4191, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0db080d49074b3ef", - "equalIndicator/v1": "13747aa3d8cf8ff42f29a5d841dd049d849735fbe81f4af7bcd745c59d26c1bf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 900, - "startColumn": 96, - "charOffset": 28744, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 898, - "startColumn": 1, - "charOffset": 28644, - "charLength": 218, - "snippet": { - "text": "}\r\n\r\nbool InstantSpell::canThrowSpell(std::shared_ptr creature, std::shared_ptr target) const {\r\n\tconst Position &fromPos = creature->getPosition();\r\n\tconst Position &toPos = target->getPosition();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "12de0b1fc2839d64", - "equalIndicator/v1": "13784989bfa5dc27993122fa88847d51df890a4f66729a6884ca926a968d636e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'hmenu' declared with a const-qualified typedef; results in the type being 'HMENU__ *const' instead of 'const HMENU__ *'", - "markdown": "'hmenu' declared with a const-qualified typedef; results in the type being 'HMENU__ \\*const' instead of 'const HMENU__ \\*'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/canary_server.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 229, - "startColumn": 14, - "charOffset": 7847, - "charLength": 5, - "snippet": { - "text": "hmenu" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 227, - "startColumn": 1, - "charOffset": 7775, - "charLength": 162, - "snippet": { - "text": "#ifdef OS_WINDOWS\r\n\tconst HWND hwnd = GetConsoleWindow();\r\n\tconst HMENU hmenu = GetSystemMenu(hwnd, FALSE);\r\n\tEnableMenuItem(hmenu, SC_CLOSE, MF_GRAYED);\r\n#endif\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "202ff16d38a98230", - "equalIndicator/v1": "137e1649e71e784b37af3ff0d6e434a0784a2043bb10dfd2a2936469cb978762" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions", - "markdown": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/metrics/metrics.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 187, - "startColumn": 2, - "charOffset": 6878, - "charLength": 20, - "snippet": { - "text": "DEFINE_LATENCY_CLASS" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 185, - "startColumn": 1, - "charOffset": 6870, - "charLength": 162, - "snippet": { - "text": "\t\t}\r\n\r\n\tDEFINE_LATENCY_CLASS(method, \"method\", \"method\");\r\n\tDEFINE_LATENCY_CLASS(lua, \"lua\", \"scope\");\r\n\tDEFINE_LATENCY_CLASS(query, \"query\", \"truncated_query\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8ecbc58b89dcbd85", - "equalIndicator/v1": "137e52dde1846afc2a7429ce1f69c92bfc1a2959ca2107845e83696fa4ce9585" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1136, - "startColumn": 65, - "charOffset": 31658, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1134, - "startColumn": 1, - "charOffset": 31542, - "charLength": 228, - "snippet": { - "text": "\r\nstd::vector>\r\nItem::getDescriptions(const ItemType &it, std::shared_ptr item /*= nullptr*/) {\r\n\tstd::ostringstream ss;\r\n\tstd::vector> descriptions;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c4e2fc6694d20204", - "equalIndicator/v1": "138573f34414dd5743566051f9c08590317efe38ccddaf162c6c3e8b56fe3559" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/monster_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 85, - "startColumn": 12, - "charOffset": 2788, - "charLength": 9, - "snippet": { - "text": "healthMax" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 83, - "startColumn": 1, - "charOffset": 2666, - "charLength": 282, - "snippet": { - "text": "\t\tmonster->skull = mType->info.skull;\r\n\t\tmonster->health = mType->info.health * mType->getHealthMultiplier();\r\n\t\tmonster->healthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\t\tmonster->baseSpeed = mType->getBaseSpeed();\r\n\t\tmonster->internalLight = mType->info.light;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5b763c8c50de29ef", - "equalIndicator/v1": "139436863c9bdaf03057510af2966c517bcb8e2a4031a09687dd791ee1fca9a1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/grouping/party.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 769, - "startColumn": 53, - "charOffset": 24324, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 767, - "startColumn": 1, - "charOffset": 24267, - "charLength": 141, - "snippet": { - "text": "}\r\n\r\nvoid Party::addPlayerSupply(std::shared_ptr player, std::shared_ptr item) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ccc674bd46d3883d", - "equalIndicator/v1": "13bc8ed1c4309b7a08661815252ea441c1dcaed22b4f184ed642c8539a683f09" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 884, - "startColumn": 21, - "charOffset": 28142, - "charLength": 15, - "snippet": { - "text": "getWeaponDamage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 882, - "startColumn": 1, - "charOffset": 28117, - "charLength": 313, - "snippet": { - "text": "}\r\n\r\nint32_t WeaponWand::getWeaponDamage(std::shared_ptr player, std::shared_ptr, std::shared_ptr, bool maxDamage /* = false*/) const {\r\n\tif (!g_configManager().getBoolean(TOGGLE_CHAIN_SYSTEM, __FUNCTION__)) {\r\n\t\t// Returns maximum damage or a random value between minChange and maxChange\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "de96d150e611567c", - "equalIndicator/v1": "13dcdbe150406cfe2a2030340383c57f3efc4f13e7cba50832805492baed7abd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 467, - "startColumn": 27, - "charOffset": 16670, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 465, - "startColumn": 1, - "charOffset": 16638, - "charLength": 123, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.partyOnLeave, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "25da1ac2f1d1054d", - "equalIndicator/v1": "13f67782077dc9ddce73a32e88719699c68cc267bbc2a9e7f4fe03ee53234877" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2700, - "startColumn": 14, - "charOffset": 79830, - "charLength": 11, - "snippet": { - "text": "queryRemove" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2698, - "startColumn": 1, - "charOffset": 79510, - "charLength": 614, - "snippet": { - "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ffb8e3eb0904ae69", - "equalIndicator/v1": "13f69e45d6fafc8276df04531e184b903bf9edffc46d34c920e29b8795a2da86" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Move constructors should be marked noexcept", - "markdown": "Move constructors should be marked noexcept" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/items.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 113, - "startColumn": 2, - "charOffset": 2888, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 111, - "startColumn": 1, - "charOffset": 2830, - "charLength": 149, - "snippet": { - "text": "\tItemType &operator=(const ItemType &other) = delete;\r\n\r\n\tItemType(ItemType &&other) = default;\r\n\tItemType &operator=(ItemType &&other) = default;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a798465f00799c30", - "equalIndicator/v1": "13fd2870b3a4043fa09529112c4b4cddd7190a9b6dd4ff85eb87b78d3101b3b4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3093, - "startColumn": 101, - "charOffset": 115178, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3091, - "startColumn": 1, - "charOffset": 115073, - "charLength": 265, - "snippet": { - "text": "}\r\n\r\nReturnValue Game::internalCollectManagedItems(std::shared_ptr player, std::shared_ptr item, ObjectCategory_t category /* = OBJECTCATEGORY_DEFAULT*/, bool isLootContainer /* = true*/) {\r\n\tif (!player || !item) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a418343f262f42f6", - "equalIndicator/v1": "140030301d1e7b73b1f9ba322e5981a4de9f2cb048131f010f1aa9f643e9b8c4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 299, - "startColumn": 8, - "charOffset": 7447, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 297, - "startColumn": 1, - "charOffset": 7351, - "charLength": 211, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetCharges(lua_State* L) {\r\n\t// itemType:getCharges()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->charges);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "778360e0c82e8500", - "equalIndicator/v1": "1419f3b29c98ceeb3d4936fd7369622421aebda52f19acbc70d131b6390e7d50" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/map/tile_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 592, - "startColumn": 2, - "charOffset": 13848, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 590, - "startColumn": 1, - "charOffset": 13841, - "charLength": 175, - "snippet": { - "text": "\t}\r\n\r\n\tuint32_t subType = getNumber(L, 3, 1);\r\n\r\n\tstd::shared_ptr item = Item::CreateItem(itemId, std::min(subType, Item::items[itemId].stackSize));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bd927b3657703377", - "equalIndicator/v1": "141c5b3ed1ee08f8fca21d79d8552608d54c01dd743e9aa11487d9c3153caf53" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 651, - "startColumn": 18, - "charOffset": 17590, - "charLength": 10, - "snippet": { - "text": "std::round" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 649, - "startColumn": 1, - "charOffset": 17554, - "charLength": 147, - "snippet": { - "text": "\t\t\tcontinue;\r\n\t\t}\r\n\t\tsetIncrease(i, std::round((100 - creature->getIncreasePercent(indexToCombatType(i))) * increasePercentValue / 100.f));\r\n\t}\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "36bf79a6fc456ac2", - "equalIndicator/v1": "143c91fc3735b192ea0773244690036e9d5080c15824f3b007f10f903d23a0f7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 313, - "startColumn": 71, - "charOffset": 11248, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 311, - "startColumn": 1, - "charOffset": 11173, - "charLength": 109, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::AddItem(NetworkMessage &msg, std::shared_ptr item) {\r\n\tif (!item) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ee86a8f5dbaadfc8", - "equalIndicator/v1": "14569eddfdae31173c45939f8658cd0a33c9a9ee4c1d45a252cfbb140f9e930d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Move constructor initializes class member by calling a copy constructor", - "markdown": "Move constructor initializes class member by calling a copy constructor" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monsters.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 34, - "startColumn": 3, - "charOffset": 933, - "charLength": 5, - "snippet": { - "text": "spell" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 32, - "startColumn": 1, - "charOffset": 820, - "charLength": 181, - "snippet": { - "text": "\tspellBlock_t &operator=(const spellBlock_t &other) = delete;\r\n\tspellBlock_t(spellBlock_t &&other) noexcept :\r\n\t\tspell(other.spell),\r\n\t\tchance(other.chance),\r\n\t\tspeed(other.speed),\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9674191d0666b774", - "equalIndicator/v1": "146accb20dea487aa4b6b735ff7716ac51c4c53c1efae77f53fd1a81145fe418" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3862, - "startColumn": 38, - "charOffset": 115730, - "charLength": 14, - "snippet": { - "text": "amountToRemove" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3860, - "startColumn": 1, - "charOffset": 115559, - "charLength": 210, - "snippet": { - "text": "\t\t// If the item quantity is already needed, remove the quantity and stop the loop\r\n\t\tif (item->getItemAmount() >= amountToRemove) {\r\n\t\t\tg_game().internalRemoveItem(item, amountToRemove);\r\n\t\t\treturn true;\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1ef362c45a00a6b8", - "equalIndicator/v1": "146d67e122ebd92a33e97abd49fbe30d5609bef1c9ccabae2b9088accd6c46f1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'itemIds' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'itemIds' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 385, - "startColumn": 82, - "charOffset": 19872, - "charLength": 27, - "snippet": { - "text": "const std::vector" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 383, - "startColumn": 1, - "charOffset": 19619, - "charLength": 344, - "snippet": { - "text": "\tvoid playerOpenManagedContainer(uint32_t playerId, ObjectCategory_t category, bool isLootContainer);\r\n\tvoid playerSetQuickLootFallback(uint32_t playerId, bool fallback);\r\n\tvoid playerQuickLootBlackWhitelist(uint32_t playerId, QuickLootFilter_t filter, const std::vector itemIds);\r\n\r\n\tvoid playerRequestDepotItems(uint32_t playerId);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3d69c24edf3a0d7c", - "equalIndicator/v1": "148079d9a96e7bbbfb08dde39d1cf53e971c27ed78ed857529eedbe2cd2936d8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1340, - "startColumn": 92, - "charOffset": 45479, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1338, - "startColumn": 1, - "charOffset": 45383, - "charLength": 357, - "snippet": { - "text": "}\r\n\r\nvoid Combat::doCombatCondition(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms) {\r\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\r\n\tif ((caster == target || canCombat) && params.impactEffect != CONST_ME_NONE) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "18e036021615f85d", - "equalIndicator/v1": "14d039554f2403dc869afbdfa54cd1c2191dde6198d3777b5fbf1491bee0199b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1259, - "startColumn": 27, - "charOffset": 44803, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1257, - "startColumn": 1, - "charOffset": 44771, - "charLength": 134, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnInventoryUpdate, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "615266a73d3f5a03", - "equalIndicator/v1": "14d8d4c75f5516ea2ee9a205773f4ce3e5286d20ccf9ce8651d01a51825bdf14" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2092, - "startColumn": 8, - "charOffset": 57539, - "charLength": 4, - "snippet": { - "text": "mina" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2090, - "startColumn": 1, - "charOffset": 57411, - "charLength": 191, - "snippet": { - "text": "void ConditionSpeed::getFormulaValues(int32_t var, int32_t &min, int32_t &max) const {\r\n\tint32_t difference = var - 40;\r\n\tmin = mina * difference + minb;\r\n\tmax = maxa * difference + maxb;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c78d53a48c87d48c", - "equalIndicator/v1": "14e323249a761eb6aaa946e5bd51740d3e6ca2bf79aed035c53e21034d0db33b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/imbuements/imbuements.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 339, - "startColumn": 75, - "charOffset": 11764, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 337, - "startColumn": 1, - "charOffset": 11685, - "charLength": 157, - "snippet": { - "text": "}\r\n\r\nstd::vector Imbuements::getImbuements(std::shared_ptr player, std::shared_ptr item) {\r\n\tstd::vector imbuements;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1e52c75ab5939d5a", - "equalIndicator/v1": "14f0768f5cee99cbd8d4d3d702719e29558c8a8e9530169014ae056aebe3e892" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Std::move of the const variable 'initDescription' has no effect; remove std::move() or make the variable non-const", - "markdown": "Std::move of the const variable 'initDescription' has no effect; remove std::move() or make the variable non-const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creatures_definitions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1403, - "startColumn": 15, - "charOffset": 37043, - "charLength": 9, - "snippet": { - "text": "std::move" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1401, - "startColumn": 1, - "charOffset": 36980, - "charLength": 137, - "snippet": { - "text": "\t\tguid(initGuid),\r\n\t\tname(std::move(initName)),\r\n\t\tdescription(std::move(initDescription)),\r\n\t\ticon(initIcon),\r\n\t\tnotify(initNotify) { }\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b0e7db36be9d28f9", - "equalIndicator/v1": "150214f8efcfe819f6388798effbd41cbc1e96298a50243735ff7d05f94918ab" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1176, - "startColumn": 6, - "charOffset": 41952, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1174, - "startColumn": 1, - "charOffset": 41894, - "charLength": 195, - "snippet": { - "text": "\tLuaScriptInterface::pushCombatDamage(L, damage);\r\n\r\n\tif (scriptInterface.protectedCall(L, 8, 4) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "07b98791f23d6669", - "equalIndicator/v1": "153d17cb538e863e66f8acf83877b196eee08a41fe32f81d7e6a7348f42a5c60" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'item' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'item' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 259, - "startColumn": 37, - "charOffset": 10407, - "charLength": 27, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 257, - "startColumn": 1, - "charOffset": 10177, - "charLength": 325, - "snippet": { - "text": "\tbool internalCreatureSay(std::shared_ptr creature, SpeakClasses type, const std::string &text, bool ghostMode, Spectators* spectatorsPtr = nullptr, const Position* pos = nullptr);\r\n\r\n\tObjectCategory_t getObjectCategory(const std::shared_ptr item);\r\n\tObjectCategory_t getObjectCategory(const ItemType &it);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7712cebfcd93a72b", - "equalIndicator/v1": "1551a079ebd0fef2e576f6a085e94591dcb90519768f8c004baf084656cb5135" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'target' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'target' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 503, - "startColumn": 66, - "charOffset": 27181, - "charLength": 31, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 501, - "startColumn": 1, - "charOffset": 27020, - "charLength": 326, - "snippet": { - "text": "\t// Animation help functions\r\n\tvoid addCreatureHealth(const std::shared_ptr target);\r\n\tstatic void addCreatureHealth(const CreatureVector &spectators, const std::shared_ptr target);\r\n\tvoid addPlayerMana(const std::shared_ptr target);\r\n\tvoid addPlayerVocation(const std::shared_ptr target);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d866c7556d8500da", - "equalIndicator/v1": "15a705a5ccd9db5a154c94612aa1fdca810f87cd83e6b1e81423acf794a9e63d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 310, - "startColumn": 8, - "charOffset": 7718, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 308, - "startColumn": 1, - "charOffset": 7614, - "charLength": 223, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetFluidSource(lua_State* L) {\r\n\t// itemType:getFluidSource()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->fluidSource);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1368264523ad3df6", - "equalIndicator/v1": "15b28b34f3a967ab5fab945dc422c9e5250100d7291e41f354933f81c2035747" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'getXpBoostTime' can be made const", - "markdown": "Method 'getXpBoostTime' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1862, - "startColumn": 11, - "charOffset": 55268, - "charLength": 14, - "snippet": { - "text": "getXpBoostTime" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1860, - "startColumn": 1, - "charOffset": 55252, - "charLength": 62, - "snippet": { - "text": "\t}\r\n\r\n\tuint16_t getXpBoostTime() {\r\n\t\treturn xpBoostTime;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0a54feedb4c5e5b4", - "equalIndicator/v1": "15fb7dc6bc960b58d9da6ec40a4cbb680831508f8168e54f2a114c9b3fe1085d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'virtual' is redundant since the function is already declared 'override'", - "markdown": "'virtual' is redundant since the function is already declared 'override'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/cylinder.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 199, - "startColumn": 15, - "charOffset": 8218, - "charLength": 22, - "snippet": { - "text": "postRemoveNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 197, - "startColumn": 1, - "charOffset": 8065, - "charLength": 311, - "snippet": { - "text": "\r\n\tvirtual void postAddNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r\n\tvirtual void postRemoveNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r\n\r\n\tbool isPushable() override {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4dbd0c2ffb896c0a", - "equalIndicator/v1": "16037eb1713e2b0c7d034834212e4b121efa91f089aabcb811dd6ea46924fd97" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 94, - "startColumn": 68, - "charOffset": 2823, - "charLength": 6, - "snippet": { - "text": "action" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 92, - "startColumn": 1, - "charOffset": 2751, - "charLength": 168, - "snippet": { - "text": "}\r\n\r\nbool Actions::registerLuaActionEvent(const std::shared_ptr action) {\r\n\tauto actionIdVector = action->getActionIdsVector();\r\n\tif (actionIdVector.empty()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bdfa1a4fe6f94292", - "equalIndicator/v1": "16152b628580ca27fab95a054400b28e7836dd02e553fb4865868d497696552b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/map/tile_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 438, - "startColumn": 20, - "charOffset": 10366, - "charLength": 4, - "snippet": { - "text": "tile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 436, - "startColumn": 1, - "charOffset": 10341, - "charLength": 63, - "snippet": { - "text": "\t}\r\n\r\n\tlua_pushnumber(L, tile->getItemCount());\r\n\treturn 1;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9c9f7bcb9043ec36", - "equalIndicator/v1": "162476875a0f2cc42e82cb75e50ed01135549e621a3d8eddb67ede64dd248f86" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 44, - "startColumn": 8, - "charOffset": 1232, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 42, - "startColumn": 1, - "charOffset": 1144, - "charLength": 201, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeIsDoor(lua_State* L) {\r\n\t// itemType:isDoor()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isDoor());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "89262b407d4b0f53", - "equalIndicator/v1": "163aeb80e45083f52f94e59e70738ce5cb4f430d857eb5cf4dfdbd90dcbb6e24" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1299, - "startColumn": 9, - "charOffset": 38471, - "charLength": 5, - "snippet": { - "text": "items" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1297, - "startColumn": 1, - "charOffset": 38445, - "charLength": 61, - "snippet": { - "text": "\t\t\t}\r\n\t\t} else {\r\n\t\t\tn += items->getTopItemCount();\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ec13440e777a08ac", - "equalIndicator/v1": "16529d6c5e432f6b3eb57f7c29da690ebfae9041b4aeb4fc1e783229329ee37b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6840, - "startColumn": 36, - "charOffset": 236682, - "charLength": 6, - "snippet": { - "text": "damage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6838, - "startColumn": 1, - "charOffset": 236517, - "charLength": 298, - "snippet": { - "text": "\tfloat pvpDamageMultiplier = targetDamageReceivedMultiplier * attackerDamageDealtMultiplier * levelDifferenceDamageMultiplier;\r\n\r\n\tdamage.primary.value = std::round(damage.primary.value * pvpDamageMultiplier);\r\n\tdamage.secondary.value = std::round(damage.secondary.value * pvpDamageMultiplier);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c0a0fea28f804dc7", - "equalIndicator/v1": "1655a1d94576ddb110ff6e17620721b31506f593113dd02c072c0586fc80f464" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from '::std::_Common_float_type_t' (aka 'double') to 'float'", - "markdown": "Narrowing conversion from '::std::_Common_float_type_t' (aka 'double') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 347, - "startColumn": 10, - "charOffset": 9843, - "charLength": 10, - "snippet": { - "text": "multiplier" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 345, - "startColumn": 1, - "charOffset": 9742, - "charLength": 154, - "snippet": { - "text": "\tfloat getDefenseMultiplier() const {\r\n\t\tfloat multiplier = mType->getDefenseMultiplier();\r\n\t\treturn multiplier * std::pow(1.02f, getForgeStack());\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4ab7d1751ec71ddf", - "equalIndicator/v1": "16578122a38b99b875610d34edd0663f4f3bb823d629efdfc8643b8054c297a4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 113, - "startColumn": 32, - "charOffset": 3424, - "charLength": 32, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 111, - "startColumn": 1, - "charOffset": 3243, - "charLength": 329, - "snippet": { - "text": "\tbool registerLuaActionEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaUniqueEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaPositionEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaEvent(const std::shared_ptr event);\r\n\tvoid clear(bool isFromXML = false);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "03e81efa061fcf54", - "equalIndicator/v1": "167b247c3604431c98c2d38090d54f2c84fdc026c434212336912fc612c07d74" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6380, - "startColumn": 55, - "charOffset": 220327, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6378, - "startColumn": 1, - "charOffset": 220268, - "charLength": 144, - "snippet": { - "text": "}\r\n\r\nvoid Game::setCreatureSpeed(std::shared_ptr creature, int32_t speed) {\r\n\tcreature->setBaseSpeed(static_cast(speed));\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3df242853b837c55", - "equalIndicator/v1": "16b2c291f0cead58649948201123af703744045fea3fe9014a1b46902d64cc6e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'returnValue' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'returnValue' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 257, - "startColumn": 22, - "charOffset": 9487, - "charLength": 17, - "snippet": { - "text": "const ReturnValue" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 255, - "startColumn": 1, - "charOffset": 9416, - "charLength": 175, - "snippet": { - "text": "\tvoid sendForgingData();\r\n\tvoid sendOpenForge();\r\n\tvoid sendForgeError(const ReturnValue returnValue);\r\n\tvoid closeForgeWindow();\r\n\tvoid parseForgeEnter(NetworkMessage &msg);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "69d73e110a7280ec", - "equalIndicator/v1": "16d196811271c04bbb0c271ed4e7a9770b877d7d2f8312a9544128c239e0971a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Redundant call to 'c_str'", - "markdown": "Redundant call to 'c_str'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/account/account.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 283, - "startColumn": 22, - "charOffset": 8082, - "charLength": 8, - "snippet": { - "text": "password" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 281, - "startColumn": 1, - "charOffset": 7992, - "charLength": 146, - "snippet": { - "text": "\r\nbool Account::authenticatePassword(const std::string &password) {\r\n\tif (Argon2 {}.argon(password.c_str(), getPassword())) {\r\n\t\treturn true;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c207dcb6bc537774", - "equalIndicator/v1": "16d994a9345f7deaf60256622b6ac7f80a10c07bae39f3948e41b20bdb5ceb5b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5592, - "startColumn": 17, - "charOffset": 165850, - "charLength": 14, - "snippet": { - "text": "getReflectFlat" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5590, - "startColumn": 1, - "charOffset": 165829, - "charLength": 189, - "snippet": { - "text": "}\r\n\r\nint32_t Player::getReflectFlat(CombatType_t combat, bool useCharges) const {\r\n\tint32_t result = reflectFlat[combatTypeToIndex(combat)];\r\n\tfor (const auto &item : getEquippedItems()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "109ebed26f58c37a", - "equalIndicator/v1": "16e3b69b1870299428f7f05dcc3135750955fb94f3f84b6c81d0b120a21fe150" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", - "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/modules/modules.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 137, - "startColumn": 11, - "charOffset": 3813, - "charLength": 11, - "snippet": { - "text": "std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 135, - "startColumn": 1, - "charOffset": 3766, - "charLength": 69, - "snippet": { - "text": "\t\t\treturn \"onRecvbyte\";\r\n\t\tdefault:\r\n\t\t\treturn std::string();\r\n\t}\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "10a004c155f36b47", - "equalIndicator/v1": "17173f9a9f4c2cdc703495319ab6e87692d7a62607613b790fce6001e7bee766" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Std::move of the const variable 'initName' has no effect; remove std::move() or make the variable non-const", - "markdown": "Std::move of the const variable 'initName' has no effect; remove std::move() or make the variable non-const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creatures_definitions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1402, - "startColumn": 8, - "charOffset": 37006, - "charLength": 9, - "snippet": { - "text": "std::move" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1400, - "startColumn": 1, - "charOffset": 36847, - "charLength": 244, - "snippet": { - "text": "\tVIPEntry(uint32_t initGuid, const std::string &initName, const std::string &initDescription, uint32_t initIcon, bool initNotify) :\r\n\t\tguid(initGuid),\r\n\t\tname(std::move(initName)),\r\n\t\tdescription(std::move(initDescription)),\r\n\t\ticon(initIcon),\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3719ed87512de548", - "equalIndicator/v1": "172372ec666f9911ff0476c348a272a2038ca18b48bc01ef21f986b1769f49b2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'float'", - "markdown": "Narrowing conversion from 'double' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/combat/condition_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 160, - "startColumn": 3, - "charOffset": 4656, - "charLength": 49, - "snippet": { - "text": "condition->setFormulaVars(mina, minb, maxa, maxb)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 158, - "startColumn": 1, - "charOffset": 4516, - "charLength": 227, - "snippet": { - "text": "\tstd::shared_ptr condition = getUserdataShared(L, 1)->dynamic_self_cast();\r\n\tif (condition) {\r\n\t\tcondition->setFormulaVars(mina, minb, maxa, maxb);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "74209be36f304ca9", - "equalIndicator/v1": "172749740d97c2b7a11976e7e733c6465cf5371e3cef3199cdfceb4f45a732b4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 661, - "startColumn": 15, - "charOffset": 21640, - "charLength": 18, - "snippet": { - "text": "std::min" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 659, - "startColumn": 1, - "charOffset": 21600, - "charLength": 101, - "snippet": { - "text": "\t\t\t\tcase 1:\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tchance = std::min(skill, 74) + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a40f7ae37625a585", - "equalIndicator/v1": "172b6a9eaf6ecaaa49ce0a65156f13f6fee98bd89b69c77300c8add909c5cfa9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2440, - "startColumn": 17, - "charOffset": 72637, - "charLength": 8, - "snippet": { - "text": "vocation" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2438, - "startColumn": 1, - "charOffset": 72565, - "charLength": 172, - "snippet": { - "text": "\t\t\tcapacity += noneVocation->getCapGain();\r\n\t\t} else {\r\n\t\t\thealthMax += vocation->getHPGain();\r\n\t\t\thealth += vocation->getHPGain();\r\n\t\t\tmanaMax += vocation->getManaGain();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f185d3b04ec210c4", - "equalIndicator/v1": "172e020845e8aab6ea46e1aa3c8121b66702e6ca5d84411d6990da03546b7c4d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1064, - "startColumn": 98, - "charOffset": 30946, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1062, - "startColumn": 1, - "charOffset": 30821, - "charLength": 236, - "snippet": { - "text": "\t// tile\r\n\t// send methods\r\n\tvoid sendAddTileItem(std::shared_ptr itemTile, const Position &pos, std::shared_ptr item) {\r\n\t\tif (client) {\r\n\t\t\tint32_t stackpos = itemTile->getStackposOfItem(static_self_cast(), item);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fd8503b1c8cd044d", - "equalIndicator/v1": "1731632336120dcf8133b89f1f0ef0bf37be4e126661bc5aeacf8a4d1c766d7b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '_Where', which is a reserved identifier", - "markdown": "Declaration uses identifier '_Where', which is a reserved identifier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/vectorset.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 67, - "startColumn": 56, - "charOffset": 1746, - "charLength": 6, - "snippet": { - "text": "_Where" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 65, - "startColumn": 1, - "charOffset": 1684, - "charLength": 153, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tconstexpr auto insert(std::vector::const_iterator _Where, const T &_Val) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\treturn container.insert(_Where, _Val);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "77e512ac653b2480", - "equalIndicator/v1": "173772b4925c35187428ef44ca02f6e3d37674fe9802e18329ac15f7b9834563" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4424, - "startColumn": 60, - "charOffset": 159216, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4422, - "startColumn": 1, - "charOffset": 159152, - "charLength": 174, - "snippet": { - "text": "}\r\n\r\nstd::shared_ptr Game::wrapItem(std::shared_ptr item, std::shared_ptr house) {\r\n\tuint16_t hiddenCharges = 0;\r\n\tuint16_t amount = item->getItemCount();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "88a8c1e7841224e8", - "equalIndicator/v1": "177b0ddb2aeed4d06fe228840a0f28ab1a70d20b0bd069748a9d9460f629ff70" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use range-based for loop instead", - "markdown": "Use range-based for loop instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 296, - "startColumn": 4, - "charOffset": 7596, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 294, - "startColumn": 1, - "charOffset": 7575, - "charLength": 194, - "snippet": { - "text": "\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (auto it = creatures->rbegin(), end = creatures->rend(); it != end; ++it) {\r\n\t\t\t\tif (!(*it)->isInvisible()) {\r\n\t\t\t\t\tstd::shared_ptr player = (*it)->getPlayer();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fa81428f32f9537e", - "equalIndicator/v1": "1781fc8766fd48b5986d6ffd3c9b8a3ed82fb6d01f092492dede7f0b5a5674ed" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1364, - "startColumn": 55, - "charOffset": 46593, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1362, - "startColumn": 1, - "charOffset": 46534, - "charLength": 312, - "snippet": { - "text": "}\r\n\r\nvoid Combat::doCombatDispel(std::shared_ptr caster, const Position &position, const std::unique_ptr &area, const CombatParams ¶ms) {\r\n\tconst auto origin = caster ? caster->getPosition() : Position();\r\n\tCombatFunc(caster, origin, position, area, params, CombatDispelFunc, nullptr);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ae8ee9f227f6f07a", - "equalIndicator/v1": "1799a09932d19c0938dcecaaeae1a8efd3ce6288760cb3ea7377aee692bdb3c1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Repeated branch body in conditional chain", - "markdown": "Repeated branch body in conditional chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6604, - "startColumn": 120, - "charOffset": 194173, - "charLength": 1, - "snippet": { - "text": "{" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6602, - "startColumn": 1, - "charOffset": 193930, - "charLength": 349, - "snippet": { - "text": "\t\t\tif (!g_configManager().getBoolean(TASK_HUNTING_ENABLED, __FUNCTION__)) {\r\n\t\t\t\tslot->state = PreyTaskDataState_Inactive;\r\n\t\t\t} else if (slot->id == PreySlot_Three && !g_configManager().getBoolean(TASK_HUNTING_FREE_THIRD_SLOT, __FUNCTION__)) {\r\n\t\t\t\tslot->state = PreyTaskDataState_Locked;\r\n\t\t\t} else if (slot->id == PreySlot_Two && !isPremium()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8285f6e57fe0aebd", - "equalIndicator/v1": "17aaa5de91782f47c187515ad250c35605733af868f616246ece314d358a02fd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 261, - "startColumn": 114, - "charOffset": 8588, - "charLength": 4, - "snippet": { - "text": "tile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 259, - "startColumn": 1, - "charOffset": 8470, - "charLength": 179, - "snippet": { - "text": "}\r\n\r\nvoid Weapon::internalUseWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr tile) const {\r\n\tif (isLoadedCallback()) {\r\n\t\tLuaVariant var;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "db653183438ba301", - "equalIndicator/v1": "17e485deca5bcaaa3daa5499b07bb24999eedd28bd223dc7756a7ac03c1a79a0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 438, - "startColumn": 7, - "charOffset": 16490, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 436, - "startColumn": 1, - "charOffset": 16361, - "charLength": 279, - "snippet": { - "text": "\r\nbool EventCallback::playerOnLookInShop(std::shared_ptr player, const ItemType* itemType, uint8_t count) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLookInShop - \"\r\n\t\t \"Player {} itemType {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b3d0d48e39a06e96", - "equalIndicator/v1": "17ec75e7df4c1bfafd10e9d51a4e972cba95aebd0cc937459a51f00dc1b2fbe7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3041, - "startColumn": 56, - "charOffset": 113085, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3039, - "startColumn": 1, - "charOffset": 113025, - "charLength": 269, - "snippet": { - "text": "}\r\n\r\nbool Game::handleFallbackLogic(std::shared_ptr player, std::shared_ptr &lootContainer, ContainerIterator &containerIterator, const bool &fallbackConsumed) {\r\n\tif (fallbackConsumed || !player->quickLootFallbackToMainContainer) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2eb3f52d249e258c", - "equalIndicator/v1": "17f05e8cb36c3289dd8898292469c031d3fc171261672454b63c7648d8b17a3f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/game_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 167, - "startColumn": 20, - "charOffset": 5314, - "charLength": 17, - "snippet": { - "text": "luaGameGetPlayers" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 165, - "startColumn": 1, - "charOffset": 5290, - "charLength": 135, - "snippet": { - "text": "}\r\n\r\nint GameFunctions::luaGameGetPlayers(lua_State* L) {\r\n\t// Game.getPlayers()\r\n\tlua_createtable(L, g_game().getPlayersOnline(), 0);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "91c617c26caf3a7e", - "equalIndicator/v1": "181a51b8f870799b9d20e7428cd002fafd55b9ebd0da50685adcde7ae16505ce" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'weak_service' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'weak_service' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/server.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 143, - "startColumn": 59, - "charOffset": 3842, - "charLength": 12, - "snippet": { - "text": "weak_service" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 141, - "startColumn": 1, - "charOffset": 3779, - "charLength": 162, - "snippet": { - "text": "}\r\n\r\nvoid ServicePort::openAcceptor(std::weak_ptr weak_service, uint16_t port) {\r\n\tif (auto service = weak_service.lock()) {\r\n\t\tservice->open(port);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5d57f2cbe2e4a14a", - "equalIndicator/v1": "18256162ce3d3694ad8677df7a8a69edf1f3d9ecb6bb10a8f000d6523770fae3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1544, - "startColumn": 45, - "charOffset": 46183, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1542, - "startColumn": 1, - "charOffset": 46017, - "charLength": 187, - "snippet": { - "text": "\tvoid sendTradeItemRequest(const std::string &traderName, std::shared_ptr item, bool ack) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendTradeItemRequest(traderName, item, ack);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "15ec5ebff57da5fb", - "equalIndicator/v1": "189799b4544b8d2e9963616e6cda51d47aee0d1e5e7f930c20b804bb9944bcfb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Redundant string initialization", - "markdown": "Redundant string initialization" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monsters.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 165, - "startColumn": 66, - "charOffset": 4816, - "charLength": 11, - "snippet": { - "text": "variantName" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 163, - "startColumn": 1, - "charOffset": 4670, - "charLength": 186, - "snippet": { - "text": "\tMonsterType() = default;\r\n\texplicit MonsterType(const std::string &initName) :\r\n\t\tname(initName), typeName(initName), nameDescription(initName), variantName(\"\") {};\r\n\r\n\t// non-copyable\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8af845b66e164e78", - "equalIndicator/v1": "189de310621a7c971f007ae6b0e567ecbc914fb390d5e4b2b2dba7c723906e26" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'podium' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'podium' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1598, - "startColumn": 29, - "charOffset": 47594, - "charLength": 6, - "snippet": { - "text": "podium" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1596, - "startColumn": 1, - "charOffset": 47432, - "charLength": 208, - "snippet": { - "text": "\tvoid sendPodiumWindow(std::shared_ptr podium, const Position &position, uint16_t itemId, uint8_t stackpos) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPodiumWindow(podium, position, itemId, stackpos);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a923fca25636ac9d", - "equalIndicator/v1": "18ba5f62cb6d1deb5a126b85a21f88203728c582cb47852f37234e050730426e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1520, - "startColumn": 68, - "charOffset": 53149, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1518, - "startColumn": 1, - "charOffset": 53016, - "charLength": 207, - "snippet": { - "text": "//**********************************************************//\r\n\r\nuint32_t ValueCallback::getMagicLevelSkill(std::shared_ptr player, const CombatDamage &damage) const {\r\n\tif (!player) {\r\n\t\treturn 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "605b6510760c01c1", - "equalIndicator/v1": "18daf9fa5be439f7edd6964e9140a6790a4eb2e0c3ac18707457f1b73bc7ad74" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/database/database.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 209, - "startColumn": 19, - "charOffset": 6043, - "charLength": 16, - "snippet": { - "text": "mysql_num_fields" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 207, - "startColumn": 1, - "charOffset": 6007, - "charLength": 122, - "snippet": { - "text": "\thandle = res;\r\n\r\n\tint num_fields = mysql_num_fields(handle);\r\n\r\n\tconst MYSQL_FIELD* fields = mysql_fetch_fields(handle);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8b73e8a41769c1f0", - "equalIndicator/v1": "18f4378ff7f8efb411ded4d7ce19363a0c0be874e46be7bf66014e90bfc2706f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5317, - "startColumn": 46, - "charOffset": 157074, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5315, - "startColumn": 1, - "charOffset": 157024, - "charLength": 110, - "snippet": { - "text": "}\r\n\r\nbool Player::isInWar(std::shared_ptr player) const {\r\n\tif (!player || !guild) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "492790525f0c626d", - "equalIndicator/v1": "190eee4f7827851362d80ae2a8e714bdce908e2782f325ba77e32e9b52510082" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'time_t' (aka 'long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'time_t' (aka 'long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/player_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 606, - "startColumn": 2, - "charOffset": 16700, - "charLength": 27, - "snippet": { - "text": "// player:getFreeCapacity()" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 604, - "startColumn": 1, - "charOffset": 16634, - "charLength": 178, - "snippet": { - "text": "\r\nint PlayerFunctions::luaPlayerGetFreeCapacity(lua_State* L) {\r\n\t// player:getFreeCapacity()\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (player) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7fb92bdf7efc5472", - "equalIndicator/v1": "192c866bc9b2b224a510a5eb23937abba1ecb4286061d9b21ab223b59ff611d2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1890, - "startColumn": 50, - "charOffset": 55943, - "charLength": 3, - "snippet": { - "text": "npc" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1888, - "startColumn": 1, - "charOffset": 55889, - "charLength": 140, - "snippet": { - "text": "}\r\n\r\nbool Player::openShopWindow(std::shared_ptr npc, const std::vector &shopItems) {\r\n\tBenchmark brenchmark;\r\n\tif (!npc) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "73ac26877e43a0f5", - "equalIndicator/v1": "194a5eeae53591ecd1ce6a50309579af0d0b43a212117eac469cf06c171b64ff" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/trashholder.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 31, - "startColumn": 26, - "charOffset": 1088, - "charLength": 11, - "snippet": { - "text": "queryRemove" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 29, - "startColumn": 1, - "charOffset": 1058, - "charLength": 174, - "snippet": { - "text": "}\r\n\r\nReturnValue TrashHolder::queryRemove(const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr /*= nullptr*/) {\r\n\treturn RETURNVALUE_NOTPOSSIBLE;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5466f40106e4fe84", - "equalIndicator/v1": "194cfc17ea22ee01bbd9c672a66bc1fb898fa4ec165db9c3c400e131680d9895" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8322, - "startColumn": 66, - "charOffset": 288176, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8320, - "startColumn": 1, - "charOffset": 288106, - "charLength": 269, - "snippet": { - "text": "}\r\n\r\nvoid Game::playerCyclopediaCharacterInfo(std::shared_ptr player, uint32_t characterID, CyclopediaCharacterInfoType_t characterInfoType, uint16_t entriesPerPage, uint16_t page) {\r\n\tuint32_t playerGUID = player->getGUID();\r\n\tif (characterID != playerGUID) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "09b73c79007e8cc8", - "equalIndicator/v1": "1967e47e0cb21c8376cfad34774d269716518e6538e3aa633d752120232a03f1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 771, - "startColumn": 11, - "charOffset": 22441, - "charLength": 17, - "snippet": { - "text": "getBaseMagicLevel" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 769, - "startColumn": 1, - "charOffset": 22385, - "charLength": 103, - "snippet": { - "text": "\t\t\treturn manaMax;\r\n\t\tcase STAT_MAGICPOINTS:\r\n\t\t\treturn getBaseMagicLevel();\r\n\t\tdefault:\r\n\t\t\treturn 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "163feca789bf0b17", - "equalIndicator/v1": "19a7cd5ef99fcbf0e822a4bb7a9476e92bd1abee1941c8f0370ccf8f9f982a80" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2934, - "startColumn": 4, - "charOffset": 89723, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2932, - "startColumn": 1, - "charOffset": 89560, - "charLength": 294, - "snippet": { - "text": "\t\tstd::map mtype_list = g_game().getBestiaryList();\r\n\t\tfor (uint16_t monsterCount = 1; monsterCount <= monsterAmount; monsterCount++) {\r\n\t\t\tuint16_t raceid = msg.get();\r\n\t\t\tif (player->getBestiaryKillCount(raceid) > 0) {\r\n\t\t\t\tauto it = mtype_list.find(raceid);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a6da45cdde2eb648", - "equalIndicator/v1": "19f88238dc7f75aad8b6d30aed73bc0c6330a82a4dea9f89584b58be59b43e91" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'sendPlayerPartyIcons' can be made const", - "markdown": "Method 'sendPlayerPartyIcons' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5692, - "startColumn": 14, - "charOffset": 168178, - "charLength": 20, - "snippet": { - "text": "sendPlayerPartyIcons" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5690, - "startColumn": 1, - "charOffset": 168160, - "charLength": 142, - "snippet": { - "text": "}\r\n\r\nvoid Player::sendPlayerPartyIcons(std::shared_ptr player) {\r\n\tsendPartyCreatureShield(player);\r\n\tsendPartyCreatureSkull(player);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "191a7c0f239ab51d", - "equalIndicator/v1": "1a06b07fd46582643073108931ac9736ceee4d54356cbea67f5275d1b359a672" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 495, - "startColumn": 64, - "charOffset": 14744, - "charLength": 9, - "snippet": { - "text": "moveEvent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 493, - "startColumn": 1, - "charOffset": 14676, - "charLength": 263, - "snippet": { - "text": "}\r\n\r\nuint32_t MoveEvent::EquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool isCheck) {\r\n\tif (player == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "75947f05b7d5e8e9", - "equalIndicator/v1": "1a1dcaf4cd5aab886359739c4662790744b32cfdf829882eec38dc9b488c7d02" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1929, - "startColumn": 61, - "charOffset": 52365, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1927, - "startColumn": 1, - "charOffset": 52300, - "charLength": 208, - "snippet": { - "text": "}\r\n\r\nbool ConditionFeared::getFleePath(std::shared_ptr creature, const Position &pos, std::vector &dirList) {\r\n\tconst std::vector walkSize { 15, 9, 3, 1 };\r\n\tbool found = false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dd36db282bb27f8e", - "equalIndicator/v1": "1a59b1198bc482e95568aced48b67431b4efcfc6f12b89cbac448ddca942e4d2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iologindata.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 201, - "startColumn": 54, - "charOffset": 6643, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 199, - "startColumn": 1, - "charOffset": 6585, - "charLength": 173, - "snippet": { - "text": "}\r\n\r\nbool IOLoginData::savePlayer(std::shared_ptr player) {\r\n\tbool success = DBTransaction::executeWithinTransaction([player]() {\r\n\t\treturn savePlayerGuard(player);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "86af1a5763446da6", - "equalIndicator/v1": "1aa11b1e9fd1f515906c3c8ea6c5ccb0b75c9b7b6d26582e8bd293e7722fdb87" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 763, - "startColumn": 38, - "charOffset": 27435, - "charLength": 10, - "snippet": { - "text": "toCylinder" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 761, - "startColumn": 1, - "charOffset": 27343, - "charLength": 149, - "snippet": { - "text": "\r\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\r\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\r\n\r\n\treturn scriptInterface.callFunction(7);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "80fa9e9c5e9fbd63", - "equalIndicator/v1": "1aae59fb50e1b1efe4d60d22c579027e7825a62315d9abe76c886c1d76098c4d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1879, - "startColumn": 51, - "charOffset": 55713, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1877, - "startColumn": 1, - "charOffset": 55633, - "charLength": 128, - "snippet": { - "text": "\tvoid updateUIExhausted();\r\n\r\n\tbool isQuickLootListedItem(std::shared_ptr item) const {\r\n\t\tif (!item) {\r\n\t\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fb8b853c4bd9191c", - "equalIndicator/v1": "1ab17639e668a7af0347e8497b12a763b859af797e17128b31bf5c8a2fce102b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 732, - "startColumn": 60, - "charOffset": 26057, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 730, - "startColumn": 1, - "charOffset": 25993, - "charLength": 445, - "snippet": { - "text": "}\r\n\r\nbool Events::eventPlayerOnMoveItem(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) {\r\n\t// Player:onMoveItem(item, count, fromPosition, toPosition) or Player.onMoveItem(self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)\r\n\tif (info.playerOnMoveItem == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4766689b6a7a3fc0", - "equalIndicator/v1": "1b10b760543fe38432aaf171524634902f2231ac0c2c76211dee28f844dea0cd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 157, - "startColumn": 173, - "charOffset": 4743, - "charLength": 14, - "snippet": { - "text": "damageModifier" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 155, - "startColumn": 1, - "charOffset": 4545, - "charLength": 314, - "snippet": { - "text": "\r\n\t// Calculating damage\r\n\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(level, playerSkill, totalAttack, attackFactor, true) * player->getVocation()->meleeDamageMultiplier * damageModifier / 100);\r\n\tint32_t minDamage = level / 5;\r\n\tint32_t realDamage = normal_random(minDamage, maxDamage);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b955993d7d02c3f4", - "equalIndicator/v1": "1b1b9e64741006f59e8cdb6bdf53a38b6a9349154a9b4c7013cca0c23c9092dc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 989, - "startColumn": 31, - "charOffset": 29518, - "charLength": 5, - "snippet": { - "text": "mType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 987, - "startColumn": 1, - "charOffset": 29396, - "charLength": 195, - "snippet": { - "text": "\t\t\t\tif (targetChangeTicks >= mType->info.changeTargetSpeed) {\r\n\t\t\t\t\ttargetChangeTicks = 0;\r\n\t\t\t\t\tm_targetChangeCooldown = mType->info.changeTargetSpeed;\r\n\r\n\t\t\t\t\tif (challengeFocusDuration > 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e10599f2e47045c5", - "equalIndicator/v1": "1b2cccc60c84ad7ecfc2a4f216c7e7da9c3fe422a3843e4279fecca67afae1e0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/npcs/npc.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 41, - "startColumn": 11, - "charOffset": 1290, - "charLength": 7, - "snippet": { - "text": "npcType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 39, - "startColumn": 1, - "charOffset": 1160, - "charLength": 256, - "snippet": { - "text": "\tcurrentOutfit = npcType->info.outfit;\r\n\tfloat multiplier = g_configManager().getFloat(RATE_NPC_HEALTH, __FUNCTION__);\r\n\thealth = npcType->info.health * multiplier;\r\n\thealthMax = npcType->info.healthMax * multiplier;\r\n\tbaseSpeed = npcType->info.baseSpeed;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "04a577fa6a03204a", - "equalIndicator/v1": "1b30773692ecf29b8f2bdbec36f1655959955e4a8c93661115a262a15c157d17" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 408, - "startColumn": 65, - "charOffset": 15301, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 406, - "startColumn": 1, - "charOffset": 15232, - "charLength": 280, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::playerOnLookInTrade(std::shared_ptr player, std::shared_ptr partner, std::shared_ptr item, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLookInTrade - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a2f68bfd0b9f168a", - "equalIndicator/v1": "1b50c8d1e7dbebd1ae63e5550e4b1871dc3866950153a7c81d14114bc39fdda0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1274, - "startColumn": 53, - "charOffset": 37859, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1272, - "startColumn": 1, - "charOffset": 37802, - "charLength": 174, - "snippet": { - "text": "}\r\n\r\nvoid Tile::removeCreature(std::shared_ptr creature) {\r\n\tg_game().map.getMapSector(tilePos.x, tilePos.y)->removeCreature(creature);\r\n\tremoveThing(creature, 0);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e9fc92a381f3dddb", - "equalIndicator/v1": "1b6784819cd828f52550c03dc3671f6ce7d5651361ca7dc5e79b617f123de8f9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 680, - "startColumn": 27, - "charOffset": 21856, - "charLength": 8, - "snippet": { - "text": "cooldown" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 678, - "startColumn": 1, - "charOffset": 21806, - "charLength": 167, - "snippet": { - "text": "\r\n\tif (cooldown > 0) {\r\n\t\tint32_t spellCooldown = cooldown;\r\n\t\tif (isUpgraded) {\r\n\t\t\tspellCooldown -= getWheelOfDestinyBoost(WheelSpellBoost_t::COOLDOWN, spellGrade);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d94f924fb2a19189", - "equalIndicator/v1": "1b80669537b81eadfd69db063ae8393357509511c0cb45371252059e72011b52" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/creature_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 703, - "startColumn": 2, - "charOffset": 19319, - "charLength": 13, - "snippet": { - "text": "ConditionId_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 701, - "startColumn": 1, - "charOffset": 19248, - "charLength": 306, - "snippet": { - "text": "\r\n\tConditionType_t conditionType = getNumber(L, 2);\r\n\tConditionId_t conditionId = getNumber(L, 3, CONDITIONID_COMBAT);\r\n\tuint32_t subId = getNumber(L, 4, 0);\r\n\tconst std::shared_ptr condition = creature->getCondition(conditionType, conditionId, subId);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4eb80efbd9fb919a", - "equalIndicator/v1": "1b9d775f8774d8769c39a19dcde1a9b1fc38f69f664c6aaa3ff14e1c97b803a2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4282, - "startColumn": 55, - "charOffset": 129109, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4280, - "startColumn": 1, - "charOffset": 129001, - "charLength": 177, - "snippet": { - "text": "\r\n// i will keep this function so it can be reviewed\r\nbool Player::updateSaleShopList(std::shared_ptr item) {\r\n\tuint16_t itemId = item->getID();\r\n\tif (!itemId || !item) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6175ee7bca0d2037", - "equalIndicator/v1": "1bc8027cd60f90c87228fed3c99fcc35d794cb38b767e9c8af7356bfcc39f91b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Annotate this function with 'override' or (rarely) 'final'", - "markdown": "Annotate this function with 'override' or (rarely) 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocollogin.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 30, - "startColumn": 7, - "charOffset": 859, - "charLength": 18, - "snippet": { - "text": "onRecvFirstMessage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 28, - "startColumn": 1, - "charOffset": 818, - "charLength": 94, - "snippet": { - "text": "\t\tProtocol(loginConnection) { }\r\n\r\n\tvoid onRecvFirstMessage(NetworkMessage &msg);\r\n\r\nprivate:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b4117c1c3efef1ee", - "equalIndicator/v1": "1c02f13ffb525bb6bba727fd8d6011a42cf646b334f6e42b9b531c8a32200d96" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 779, - "startColumn": 28, - "charOffset": 23275, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 777, - "startColumn": 1, - "charOffset": 23241, - "charLength": 131, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\t\tenv->setScriptId(mType->info.thinkEvent, scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2babb7ee4f231ac9", - "equalIndicator/v1": "1c35a6bc79d8e17e50641a6a4858825f6fb131c921340c743b25f616f50b7737" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 556, - "startColumn": 17, - "charOffset": 26018, - "charLength": 18, - "snippet": { - "text": "parseAbsorbPercent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 554, - "startColumn": 1, - "charOffset": 25997, - "charLength": 214, - "snippet": { - "text": "}\r\n\r\nvoid ItemParse::parseAbsorbPercent(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\r\n\tstd::string stringValue = tmpStrValue;\r\n\tif (stringValue == \"absorbpercentall\") {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7ef3e9b624cf4344", - "equalIndicator/v1": "1c369f5fbbdab38070f6b3a16e5c7e069d9994efc30381613fb350dc5dc4433c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Result of integer division used in a floating point context; possible loss of precision", - "markdown": "Result of integer division used in a floating point context; possible loss of precision" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 74, - "startColumn": 96, - "charOffset": 2103, - "charLength": 5, - "snippet": { - "text": "level" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 72, - "startColumn": 1, - "charOffset": 1860, - "charLength": 377, - "snippet": { - "text": "int32_t Weapons::getMaxWeaponDamage(uint32_t level, int32_t attackSkill, int32_t attackValue, float attackFactor, bool isMelee) {\r\n\tif (isMelee) {\r\n\t\treturn static_cast(std::round((0.085 * attackFactor * attackValue * attackSkill) + (level / 5)));\r\n\t} else {\r\n\t\treturn static_cast(std::round((0.09 * attackFactor * attackValue * attackSkill) + (level / 5)));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "43918a4e62d920c5", - "equalIndicator/v1": "1c5e4b5a31cb70992d19cd3805f70b9c8a9c2c929c0b9e2ab217475cd1dd3f57" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 941, - "startColumn": 27, - "charOffset": 34002, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 939, - "startColumn": 1, - "charOffset": 33970, - "charLength": 123, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnTurn, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "83d6dde5afc00cfd", - "equalIndicator/v1": "1c6a90477552d7e9356791990cd0401e7321840f58dfb9a3adb3dfbbaf923036" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'connectionWeak' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'connectionWeak' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/connection/connection.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 395, - "startColumn": 51, - "charOffset": 13913, - "charLength": 14, - "snippet": { - "text": "connectionWeak" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 393, - "startColumn": 1, - "charOffset": 13858, - "charLength": 163, - "snippet": { - "text": "}\r\n\r\nvoid Connection::handleTimeout(ConnectionWeak_ptr connectionWeak, const std::error_code &error) {\r\n\tif (error == asio::error::operation_aborted) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6cc2baf21efd6696", - "equalIndicator/v1": "1c6fe60f12f707b9624ab439da6abedc1b74700b834f25a836821a6910013209" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7367, - "startColumn": 94, - "charOffset": 256472, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7365, - "startColumn": 1, - "charOffset": 256374, - "charLength": 142, - "snippet": { - "text": "}\r\n\r\nvoid Game::updatePlayerPartyHuntAnalyzer(const CombatDamage &damage, std::shared_ptr player) const {\r\n\tif (!player) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fc3fc446b562a951", - "equalIndicator/v1": "1c70365efa2dc75d0276ada3df63388a584e5d42b41d026466af309010a77151" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 251, - "startColumn": 62, - "charOffset": 7932, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 249, - "startColumn": 1, - "charOffset": 7866, - "charLength": 241, - "snippet": { - "text": "}\r\n\r\nReturnValue Actions::internalUseItem(std::shared_ptr player, const Position &pos, uint8_t index, std::shared_ptr item, bool isHotkey) {\r\n\tif (std::shared_ptr door = item->getDoor()) {\r\n\t\tif (!door->canUse(player)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2ad431aa828aab93", - "equalIndicator/v1": "1c7b5a1ba11d4063f956b3547d6f11cffc7c127a33edebd02244f963ac6a54ec" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3057, - "startColumn": 175, - "charOffset": 113759, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3055, - "startColumn": 1, - "charOffset": 113580, - "charLength": 252, - "snippet": { - "text": "}\r\n\r\nReturnValue Game::processMoveOrAddItemToLootContainer(std::shared_ptr item, std::shared_ptr lootContainer, uint32_t &remainderCount, std::shared_ptr player) {\r\n\tstd::shared_ptr moveItem = nullptr;\r\n\tReturnValue ret;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e7df6ec813583d8c", - "equalIndicator/v1": "1c7fa93209099249a6b651f0362a1c757c32fe2563dab30cceb530bbfff551b3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1128, - "startColumn": 47, - "charOffset": 33821, - "charLength": 4, - "snippet": { - "text": "tile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1126, - "startColumn": 1, - "charOffset": 33770, - "charLength": 210, - "snippet": { - "text": "}\r\n\r\nvoid Monster::pushItems(std::shared_ptr tile, const Direction &nextDirection) {\r\n\t// We can not use iterators here since we can push the item to another tile\r\n\t// which will invalidate the iterator.\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a807b8e346867682", - "equalIndicator/v1": "1ca0c174bfa9516f66be5b458fb7609d1d6cf7eb97e1ba8402dabb215de6201f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2861, - "startColumn": 93, - "charOffset": 106964, - "charLength": 6, - "snippet": { - "text": "corpse" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2859, - "startColumn": 1, - "charOffset": 106867, - "charLength": 172, - "snippet": { - "text": "}\r\n\r\nvoid Game::playerQuickLootCorpse(std::shared_ptr player, std::shared_ptr corpse, const Position &position) {\r\n\tif (!player || !corpse) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a2f17a2bc5f1f5c4", - "equalIndicator/v1": "1cb11e3e2be7c634e56842c9f60c3921e0b52431dc4d152d520e601850d1d516" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 804, - "startColumn": 7, - "charOffset": 25654, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 802, - "startColumn": 1, - "charOffset": 25565, - "charLength": 251, - "snippet": { - "text": "\t// onAddItem(moveitem, tileitem, pos)\r\n\t// onRemoveItem(moveitem, tileitem, pos)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[MoveEvent::executeAddRemItem - \"\r\n\t\t \"Item {} item on tile x: {} y: {} z: {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b54dca5677cf22db", - "equalIndicator/v1": "1cc3d12f47296b366d4647e2fa7012b1ce33f7e55f5e031ea4ff11530c694af8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'isMarketMenuAvailable' can be made const", - "markdown": "Method 'isMarketMenuAvailable' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 579, - "startColumn": 7, - "charOffset": 15840, - "charLength": 21, - "snippet": { - "text": "isMarketMenuAvailable" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 577, - "startColumn": 1, - "charOffset": 15807, - "charLength": 85, - "snippet": { - "text": "\t\treturn supplyStash;\r\n\t}\r\n\tbool isMarketMenuAvailable() {\r\n\t\treturn marketMenu;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1022d29540ada967", - "equalIndicator/v1": "1cd6f24177faf7abf852f8656135c3a77141e49ad329780e556c7cf42692f0a6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4441, - "startColumn": 44, - "charOffset": 133696, - "charLength": 17, - "snippet": { - "text": "getLostExperience" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4439, - "startColumn": 1, - "charOffset": 133390, - "charLength": 372, - "snippet": { - "text": "\t\tauto attackerPlayer = attacker->getPlayer();\r\n\t\tif (attackerPlayer && attackerPlayer.get() != this && skillLoss && std::abs(static_cast(attackerPlayer->getLevel() - level)) <= g_configManager().getNumber(EXP_FROM_PLAYERS_LEVEL_RANGE, __FUNCTION__)) {\r\n\t\t\treturn std::max(0, std::floor(getLostExperience() * getDamageRatio(attacker) * 0.75));\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f97ab1b1f76709f6", - "equalIndicator/v1": "1cddd0390501b32da1478576d45c3b9e4f1ba3ff572202c6c870c0529026f5f1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 915, - "startColumn": 13, - "charOffset": 29761, - "charLength": 26, - "snippet": { - "text": "(damage * getMitigation())" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 913, - "startColumn": 1, - "charOffset": 29578, - "charLength": 349, - "snippet": { - "text": "\tif (combatType != COMBAT_MANADRAIN && combatType != COMBAT_LIFEDRAIN && combatType != COMBAT_AGONYDAMAGE) { // Increase mitigate damage\r\n\t\tauto originalDamage = damage;\r\n\t\tdamage -= (damage * getMitigation()) / 100.;\r\n\t\tg_logger().trace(\"[mitigation] creature: {}, original damage: {}, mitigation damage: {}\", getName(), originalDamage, damage);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2b5727131d73bf06", - "equalIndicator/v1": "1ceaddaafcca2a0a9e236277dfcd143d22d10a3584c1ede907603f9a165eced7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 607, - "startColumn": 68, - "charOffset": 21554, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 605, - "startColumn": 1, - "charOffset": 21482, - "charLength": 311, - "snippet": { - "text": "}\r\n\r\nvoid Events::eventPlayerOnLookInBattleList(std::shared_ptr player, std::shared_ptr creature, int32_t lookDistance) {\r\n\t// Player:onLookInBattleList(creature, position, distance) or Player.onLookInBattleList(self, creature, position, distance)\r\n\tif (info.playerOnLookInBattleList == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5a0cfb382596b26b", - "equalIndicator/v1": "1d173f239485adb5e7847ac10174b7a245cf12aa95f7bd87c1987b92b22f12ea" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions", - "markdown": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/security/rsa.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 16, - "startColumn": 2, - "charOffset": 435, - "charLength": 3, - "snippet": { - "text": "RSA" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 14, - "startColumn": 1, - "charOffset": 412, - "charLength": 56, - "snippet": { - "text": "class RSA {\r\npublic:\r\n\tRSA(Logger &logger);\r\n\t~RSA();\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e77ea38ed92155ec", - "equalIndicator/v1": "1d180653ce03f2e45ffaf880688778f7452f3ea970f8a3784c840ae84cd3e831" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6865, - "startColumn": 85, - "charOffset": 237871, - "charLength": 14, - "snippet": { - "text": "attackerPlayer" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6863, - "startColumn": 1, - "charOffset": 237749, - "charLength": 260, - "snippet": { - "text": "\r\n// Wheel of destiny combat helpers\r\nvoid Game::applyWheelOfDestinyHealing(CombatDamage &damage, std::shared_ptr attackerPlayer, std::shared_ptr target) {\r\n\tdamage.primary.value += (damage.primary.value * damage.healingMultiplier) / 100.;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "31af5a89ba7eba9f", - "equalIndicator/v1": "1d22736dc1c150267f465fd3ed3b938a36ec0bf44674e3c2180df77df9b2d265" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2818, - "startColumn": 43, - "charOffset": 84125, - "charLength": 6, - "snippet": { - "text": "skills" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2816, - "startColumn": 1, - "charOffset": 84075, - "charLength": 204, - "snippet": { - "text": "\t\t\t}\r\n\r\n\t\t\tskills[i].tries = std::max(0, skills[i].tries - lostSkillTries);\r\n\t\t\tskills[i].percent = Player::getPercentLevel(skills[i].tries, vocation->getReqSkillTries(i, skills[i].level));\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a0989bf301592a00", - "equalIndicator/v1": "1d57cfc13847c2a0a1c4613c7ad2ef65fd27a4c2861386cf527e2cb282f6d694" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'partner' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'partner' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 426, - "startColumn": 46, - "charOffset": 16104, - "charLength": 7, - "snippet": { - "text": "partner" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 424, - "startColumn": 1, - "charOffset": 16004, - "charLength": 165, - "snippet": { - "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r\n\tLuaScriptInterface::pushUserdata(L, partner);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7d2ea91ab23ade66", - "equalIndicator/v1": "1d74ea8c4b6ecf6a45bdd485c763010a6b5346ea9136f56c865b607caf967b73" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/bed.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 257, - "startColumn": 28, - "charOffset": 6893, - "charLength": 9, - "snippet": { - "text": "sleptTime" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 255, - "startColumn": 1, - "charOffset": 6860, - "charLength": 118, - "snippet": { - "text": "\t}\r\n\r\n\tconst int32_t soulRegen = sleptTime / (60 * 15); // RATE_SOUL_REGEN_SPEED?\r\n\tplayer->changeSoul(soulRegen);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e51fba050f98d96a", - "equalIndicator/v1": "1d8d811affebe79d315683c82ba30ed08cf77c0982c84fab809644a89786ecf3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7403, - "startColumn": 53, - "charOffset": 257811, - "charLength": 14, - "snippet": { - "text": "attackerPlayer" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7401, - "startColumn": 1, - "charOffset": 257633, - "charLength": 320, - "snippet": { - "text": "void Game::sendMessages(\r\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\r\n\tconst Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetPlayer,\r\n\tTextMessage &message, const CreatureVector &spectators, int32_t realDamage\r\n) const {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "99f8a7d019707827", - "equalIndicator/v1": "1d9b75312423c8303ea99bd92dddcbd2a2827bd8b0a4b9c90ef2f104e60d9597" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 891, - "startColumn": 12, - "charOffset": 23708, - "charLength": 8, - "snippet": { - "text": "uint64_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 889, - "startColumn": 1, - "charOffset": 23691, - "charLength": 191, - "snippet": { - "text": "\t}\r\n\r\n\tif (const uint64_t writtenDate = getAttribute(ItemAttribute_t::DATE)) {\r\n\t\tpropWriteStream.write(ATTR_WRITTENDATE);\r\n\t\tpropWriteStream.write(writtenDate);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5ad2881659567fb2", - "equalIndicator/v1": "1dd05075695e6632209873011cc6ef452ba2b99b4cec2dbe41eb853f196276cf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/decay/decay.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 68, - "startColumn": 45, - "charOffset": 1949, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 66, - "startColumn": 1, - "charOffset": 1900, - "charLength": 200, - "snippet": { - "text": "}\r\n\r\nvoid Decay::stopDecay(std::shared_ptr item) {\r\n\tif (item->hasAttribute(ItemAttribute_t::DECAYSTATE)) {\r\n\t\tauto timestamp = item->getAttribute(ItemAttribute_t::DURATION_TIMESTAMP);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "79d2a9d6def445ce", - "equalIndicator/v1": "1dd6fad53e782d869a3e1a9f399e109c33102c541fa01dd89453109abb288ff4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 523, - "startColumn": 41, - "charOffset": 17439, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 521, - "startColumn": 1, - "charOffset": 17393, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0206377db9847d8b", - "equalIndicator/v1": "1de5431e50dc1be97e7a3b63271601ecbb3ec3a055cbc12eb0b7c7063fa3e748" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8441, - "startColumn": 4, - "charOffset": 267128, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8439, - "startColumn": 1, - "charOffset": 267046, - "charLength": 195, - "snippet": { - "text": "\t\tcase SUPPLY_STASH_ACTION_STOW_ITEM: {\r\n\t\t\tPosition pos = msg.getPosition();\r\n\t\t\tuint16_t itemId = msg.get();\r\n\t\t\tuint8_t stackpos = msg.getByte();\r\n\t\t\tuint32_t count = msg.getByte();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2681e71e970e3283", - "equalIndicator/v1": "1e0660c72ccd1a9665231be154ecfb540113ae39c294aae5f005694f9320ab0f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/ioprey.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 292, - "startColumn": 54, - "charOffset": 9023, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 290, - "startColumn": 1, - "charOffset": 8965, - "charLength": 274, - "snippet": { - "text": "}\r\n\r\nvoid IOPrey::parsePreyAction(std::shared_ptr player, PreySlot_t slotId, PreyAction_t action, PreyOption_t option, int8_t index, uint16_t raceId) const {\r\n\tconst auto &slot = player->getPreySlotById(slotId);\r\n\tif (!slot || slot->state == PreyDataState_Locked) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "58f2a89703c4ae1b", - "equalIndicator/v1": "1e0ff4234047f8775c810ad2389af1833373f4103de1fe110f8140a3d26ad239" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 894, - "startColumn": 2, - "charOffset": 34114, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 892, - "startColumn": 1, - "charOffset": 34107, - "charLength": 52, - "snippet": { - "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1b7cf44d7a2e11bb", - "equalIndicator/v1": "1e10da9bba18aab541f6cdceb02d85b86610b896f42f6a725e49bf84dd18e139" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 679, - "startColumn": 66, - "charOffset": 26026, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 677, - "startColumn": 1, - "charOffset": 25956, - "charLength": 259, - "snippet": { - "text": "}\r\n\r\nbool EventCallback::playerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeRequest - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3bc718617017d678", - "equalIndicator/v1": "1e46f0ea60a4ea3b7522f71a37514df6f966518476419d46f33f467bdeb62dfb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/rewards/rewardchest.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 44, - "startColumn": 19, - "charOffset": 1509, - "charLength": 10, - "snippet": { - "text": "removeItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 42, - "startColumn": 1, - "charOffset": 1392, - "charLength": 229, - "snippet": { - "text": "\r\n// Second argument is disabled by default because not need to send to client in the RewardChest\r\nvoid RewardChest::removeItem(std::shared_ptr thing, bool /* sendToClient = false*/) {\r\n\tif (thing == nullptr) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cefb919cba906aff", - "equalIndicator/v1": "1e4f6cc3c8bc0960aad2dbf2a77304be619320096d6e4424040930090fb3d204" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 144, - "startColumn": 83, - "charOffset": 3990, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 142, - "startColumn": 1, - "charOffset": 3903, - "charLength": 215, - "snippet": { - "text": "}\r\n\r\nCombatDamage Weapon::getCombatDamage(CombatDamage combat, std::shared_ptr player, std::shared_ptr item, int32_t damageModifier) const {\r\n\t// Local variables\r\n\tuint32_t level = player->getLevel();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "550e43e667693636", - "equalIndicator/v1": "1e5778a99782dc9b62f0a7239dfbe83eec50fe324d7b10394a2aa1849bcbb74a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 453, - "startColumn": 86, - "charOffset": 16242, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 451, - "startColumn": 1, - "charOffset": 16152, - "charLength": 191, - "snippet": { - "text": "}\r\n\r\nbool Events::eventPartyOnLeave(std::shared_ptr party, std::shared_ptr player) {\r\n\t// Party:onLeave(player) or Party.onLeave(self, player)\r\n\tif (info.partyOnLeave == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9646a78219d77687", - "equalIndicator/v1": "1e6408feac98be86c6b2f954944fdb065821d17f5bf418b90d37bab5e35b4e98" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 941, - "startColumn": 99, - "charOffset": 35924, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 939, - "startColumn": 1, - "charOffset": 35821, - "charLength": 257, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::playerOnInventoryUpdate(std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool equip) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[{}] Call stack overflow\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0027f87575a3ea23", - "equalIndicator/v1": "1e656dd164eb639ea6a55c7c8f43393e3945a67dcd126c78dea38fda38788e5e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1116, - "startColumn": 46, - "charOffset": 33240, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1114, - "startColumn": 1, - "charOffset": 33190, - "charLength": 214, - "snippet": { - "text": "}\r\n\r\nbool Monster::pushItem(std::shared_ptr item, const Direction &nextDirection) {\r\n\tconst Position ¢erPos = item->getPosition();\r\n\tfor (const auto &[x, y] : getPushItemLocationOptions(nextDirection)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "58dd7ffa9a869d3b", - "equalIndicator/v1": "1e65bf04b887e6ffaf1f1d58e64bcfaab1df98f009385933b68f0231ac17b3fb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Return type 'const std::string' (aka 'const basic_string, allocator>') is 'const'-qualified at the top level, which may reduce code readability without improving const correctness", - "markdown": "Return type 'const std::string' (aka 'const basic_string, allocator\\>') is 'const'-qualified at the top level, which may reduce code readability without improving const correctness" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 568, - "startColumn": 2, - "charOffset": 16696, - "charLength": 17, - "snippet": { - "text": "const std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 566, - "startColumn": 1, - "charOffset": 16665, - "charLength": 176, - "snippet": { - "text": "\t\treturn items[id].name;\r\n\t}\r\n\tconst std::string getPluralName() const {\r\n\t\tif (hasAttribute(ItemAttribute_t::PLURALNAME)) {\r\n\t\t\treturn getString(ItemAttribute_t::PLURALNAME);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a2df6ef06b8638dc", - "equalIndicator/v1": "1e67bccceb0b2811290358300e3bd968397e8531b362fffe1095b7933d511a6c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 382, - "startColumn": 8, - "charOffset": 9527, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 380, - "startColumn": 1, - "charOffset": 9433, - "charLength": 208, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetAttack(lua_State* L) {\r\n\t// itemType:getAttack()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->attack);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "090868364f4603f6", - "equalIndicator/v1": "1e74fb18a3b628da1790be2b4e8cc5c3ee6ffbeba0e82feb5b8df01186c1a347" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8016, - "startColumn": 57, - "charOffset": 279189, - "charLength": 4, - "snippet": { - "text": "name" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8014, - "startColumn": 1, - "charOffset": 279128, - "charLength": 142, - "snippet": { - "text": "}\r\n\r\nvoid Game::addBestiaryList(uint16_t raceid, std::string name) {\r\n\tauto it = BestiaryList.find(raceid);\r\n\tif (it != BestiaryList.end()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d4fd2af5365f7fec", - "equalIndicator/v1": "1e85a2cbcb9f543f48cae53e99a16ed9f5aeaa6dcf7c6ee21c6051aa8ba1b35a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 476, - "startColumn": 8, - "charOffset": 11793, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 474, - "startColumn": 1, - "charOffset": 11685, - "charLength": 202, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetElementDamage(lua_State* L) {\r\n\t// itemType:getElementDamage()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (!itemType) {\r\n\t\tlua_pushnil(L);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "93f1788e10bfb799", - "equalIndicator/v1": "1ebfedf25cfcbe3812e9c0eec22f8e0971059679711bb56cfde4dd5506396664" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1301, - "startColumn": 87, - "charOffset": 43511, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1299, - "startColumn": 1, - "charOffset": 43420, - "charLength": 342, - "snippet": { - "text": "}\r\n\r\nvoid Combat::doCombatMana(std::shared_ptr caster, std::shared_ptr target, const Position &origin, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\r\n\tif ((caster && target)\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "31c1234727212a5d", - "equalIndicator/v1": "1ec094c70c0e27583498180560d2347d47aa8a207e9ab8fb80a006f255334d67" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The value returned by this function should not be disregarded; neglecting it may lead to errors", - "markdown": "The value returned by this function should not be disregarded; neglecting it may lead to errors" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/server.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 179, - "startColumn": 3, - "charOffset": 5011, - "charLength": 8, - "snippet": { - "text": "acceptor" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 177, - "startColumn": 1, - "charOffset": 4942, - "charLength": 100, - "snippet": { - "text": "\tif (acceptor && acceptor->is_open()) {\r\n\t\tstd::error_code error;\r\n\t\tacceptor->close(error);\r\n\t}\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cea2648f2496047c", - "equalIndicator/v1": "1ec845615940da735088d83d305f0524c012c62f07a073d1cff49ac8c02201a2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/grouping/party.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 166, - "startColumn": 57, - "charOffset": 4539, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 164, - "startColumn": 1, - "charOffset": 4478, - "charLength": 184, - "snippet": { - "text": "}\r\n\r\nbool Party::passPartyLeadership(std::shared_ptr player) {\r\n\tauto leader = getLeader();\r\n\tif (!leader || !player || leader == player || player->getParty().get() != this) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "16ed13e9252572e2", - "equalIndicator/v1": "1edb1f9365a20edc7db408edca604659d7506d7d11ebf253bc792c762d638b8a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 594, - "startColumn": 44, - "charOffset": 30539, - "charLength": 4, - "snippet": { - "text": "tile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 592, - "startColumn": 1, - "charOffset": 30468, - "charLength": 114, - "snippet": { - "text": "\t\treturn tilesToClean;\r\n\t}\r\n\tvoid addTileToClean(std::shared_ptr tile) {\r\n\t\ttilesToClean.emplace(tile);\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e898fcfec18110e0", - "equalIndicator/v1": "1eede7fc13c30831582ef91ed31f34a883962cc075fbaa0df4f112a8d974b3f3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6321, - "startColumn": 65, - "charOffset": 200254, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6319, - "startColumn": 1, - "charOffset": 200185, - "charLength": 128, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureHealth(std::shared_ptr creature) {\r\n\tif (creature->isHealthHidden()) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d39e6eae897a079d", - "equalIndicator/v1": "1ef5628c57bb9fb55117b17f158e0090e16c6aecbe53d449372579057cccf50a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 777, - "startColumn": 64, - "charOffset": 23628, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 775, - "startColumn": 1, - "charOffset": 23501, - "charLength": 240, - "snippet": { - "text": "\r\n\tif (item->isStackable() && count != item->getItemCount()) {\r\n\t\tuint8_t newCount = static_cast(std::max(0, item->getItemCount() - count));\r\n\t\tconst int32_t oldWeight = item->getWeight();\r\n\t\titem->setItemCount(newCount);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c8ec3bab67f81ff7", - "equalIndicator/v1": "1effc41db45eaea9d0165a22384313394a17a254bae18bc5e55ba4a3a14714fd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'speaker' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'speaker' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 336, - "startColumn": 96, - "charOffset": 12058, - "charLength": 7, - "snippet": { - "text": "speaker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 334, - "startColumn": 1, - "charOffset": 11958, - "charLength": 234, - "snippet": { - "text": "}\r\n\r\nvoid Events::eventCreatureOnHear(std::shared_ptr creature, std::shared_ptr speaker, const std::string &words, SpeakClasses type) {\r\n\t// Creature:onHear(speaker, words, type)\r\n\tif (info.creatureOnHear == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a79f71c336bf4a80", - "equalIndicator/v1": "1f03c345c934cfe1ba9a9d5cbd02883485457c2cbd6383fa1f702649919c31de" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/map/tile_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 197, - "startColumn": 2, - "charOffset": 4826, - "charLength": 7, - "snippet": { - "text": "int32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 195, - "startColumn": 1, - "charOffset": 4816, - "charLength": 146, - "snippet": { - "text": "\t\t}\r\n\t}\r\n\tint32_t subType = getNumber(L, 3, -1);\r\n\r\n\tstd::shared_ptr item = g_game().findItemOfType(tile, itemId, false, subType);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "97461fd3bc33a0a9", - "equalIndicator/v1": "1f0703296025c17f43bb4cb1add0086833e0ba20e051a6be81630ec1f62a8b95" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1796, - "startColumn": 54, - "charOffset": 48467, - "charLength": 1, - "snippet": { - "text": "i" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1794, - "startColumn": 1, - "charOffset": 48389, - "charLength": 170, - "snippet": { - "text": "\t\t\tlist.push_back(i);\r\n\r\n\t\t\tx1 = std::fabs(1.0 - ((static_cast(sum)) + i) / med);\r\n\t\t\tx2 = std::fabs(1.0 - (static_cast(sum) / med));\r\n\t\t} while (x1 < x2);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5b0cc70f221c9dbf", - "equalIndicator/v1": "1f16ccea41454bf8a6ed0aff39b7cc5aa73f8f1542af128def9d39415cf200f4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/cylinder.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 117, - "startColumn": 15, - "charOffset": 4894, - "charLength": 22, - "snippet": { - "text": "postRemoveNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 115, - "startColumn": 1, - "charOffset": 4807, - "charLength": 239, - "snippet": { - "text": "\t * \\param link holds the relation the object has to the cylinder\r\n\t */\r\n\tvirtual void postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) = 0;\r\n\r\n\t/**\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "09ba5ed3808bfd81", - "equalIndicator/v1": "1f280d24641261b27219774dbdb01199a9223b8fea02fc8b3be4bd4cb24f12d4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/party_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 89, - "startColumn": 33, - "charOffset": 2330, - "charLength": 30, - "snippet": { - "text": "getUserdataShared(L, 1)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 87, - "startColumn": 1, - "charOffset": 2218, - "charLength": 179, - "snippet": { - "text": "int PartyFunctions::luaPartyGetMembers(lua_State* L) {\r\n\t// party:getMembers()\r\n\tstd::shared_ptr party = getUserdataShared(L, 1);\r\n\tif (!party) {\r\n\t\tlua_pushnil(L);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e40f6cef8672dab4", - "equalIndicator/v1": "1f40df8b71a02a14f7c7b6da576dde24b3a986c1e8b757b0ff84aa49ef2877f5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 81, - "startColumn": 10, - "charOffset": 2200, - "charLength": 5, - "snippet": { - "text": "mType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 79, - "startColumn": 1, - "charOffset": 2147, - "charLength": 105, - "snippet": { - "text": "\t}\r\n\tint32_t getDefense() const override {\r\n\t\treturn mType->info.defense * getDefenseMultiplier();\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "52b0beb11cdd0aad", - "equalIndicator/v1": "1f5a4c0dccc8c2b5c6188331cb058e322d624e87b718a91219c42749bc19b92f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1245, - "startColumn": 27, - "charOffset": 36604, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1243, - "startColumn": 1, - "charOffset": 36501, - "charLength": 123, - "snippet": { - "text": "\tvoid reloadCreature(std::shared_ptr creature) {\r\n\t\tif (client) {\r\n\t\t\tclient->reloadCreature(creature);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e06f8495c6f7e248", - "equalIndicator/v1": "1f96c8aeef18944e0d5cec61f06b14b64ec076e4c35deb70dfc19f16ef4bf808" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 569, - "startColumn": 57, - "charOffset": 18007, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 567, - "startColumn": 1, - "charOffset": 17946, - "charLength": 236, - "snippet": { - "text": "}\r\n\r\nvoid Combat::CombatHealthFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\r\n\tif (!data) {\r\n\t\tg_logger().error(\"[{}]: CombatDamage is nullptr\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c4640a6cd35c6754", - "equalIndicator/v1": "1f9b4b43e83acc304516dc0f8836b4f91cce9fa56e0ea5d54083e6aef6a50520" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1932, - "startColumn": 18, - "charOffset": 55723, - "charLength": 13, - "snippet": { - "text": "imbuementInfo" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1930, - "startColumn": 1, - "charOffset": 55698, - "charLength": 206, - "snippet": { - "text": "\t\t\t}\r\n\r\n\t\t\tint minutes = imbuementInfo.duration / 60;\r\n\t\t\tint hours = minutes / 60;\r\n\t\t\ts << fmt::format(\"{} {} {:02}:{:02}h\", baseImbuement->name, imbuementInfo.imbuement->getName(), hours, minutes % 60);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6838f7bce1d88bc8", - "equalIndicator/v1": "1fb211d7f5d7746448c1a12b9314ab030e94e0444e9c6016a7261961ad414bc5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 761, - "startColumn": 20, - "charOffset": 29350, - "charLength": 3, - "snippet": { - "text": "exp" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 759, - "startColumn": 1, - "charOffset": 29325, - "charLength": 62, - "snippet": { - "text": "\t}\r\n\r\n\tlua_pushnumber(L, exp);\r\n\tlua_pushnumber(L, rawExp);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "85ce9d0d5187628a", - "equalIndicator/v1": "1fbb44eda8eefbddc3ce7daa22f8003d656eb2cf7a8a09c6c3a05ce7eff7fc70" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1372, - "startColumn": 36, - "charOffset": 41229, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1370, - "startColumn": 1, - "charOffset": 41102, - "charLength": 147, - "snippet": { - "text": "\tvoid sendPartyCreatureUpdate(std::shared_ptr creature) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPartyCreatureUpdate(creature);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "895d4618783b245f", - "equalIndicator/v1": "1fbf085f13111597e2b733f2d8f43902b0143b0d18bdb78e627a6c498cb950f4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'house' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'house' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1435, - "startColumn": 14, - "charOffset": 42136, - "charLength": 5, - "snippet": { - "text": "house" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1433, - "startColumn": 1, - "charOffset": 42021, - "charLength": 148, - "snippet": { - "text": "void Player::setEditHouse(std::shared_ptr house, uint32_t listId /*= 0*/) {\r\n\twindowTextId++;\r\n\teditHouse = house;\r\n\teditListId = listId;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "168a5c6ff27da5a7", - "equalIndicator/v1": "1fc634ac6e46022a112759b0750829e11634ad8794e2ec983a84c1ab26988deb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 631, - "startColumn": 63, - "charOffset": 24203, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 629, - "startColumn": 1, - "charOffset": 24136, - "charLength": 265, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::playerOnReportBug(std::shared_ptr player, const std::string &message, const Position &position, uint8_t category) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnReportBug - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "278524400d4b3e09", - "equalIndicator/v1": "1fd342c145f7d223dc29bbdff7b0916f19fa6d663d63797f587c6f818f6c1711" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Replace loop by 'std::ranges::all_of()'", - "markdown": "Replace loop by 'std::ranges::all_of()'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 275, - "startColumn": 2, - "charOffset": 7636, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 273, - "startColumn": 1, - "charOffset": 7614, - "charLength": 141, - "snippet": { - "text": "\t\treturn false;\r\n\t}\r\n\tfor (const std::shared_ptr &tile : houseTiles) {\r\n\t\tif (!transferToDepot(player, tile)) {\r\n\t\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "11224c8c98bdb6f8", - "equalIndicator/v1": "1fd7e843691d5d536d9a1185e37e90ec3f857ef85bed53930e7bd5ba7b3e6b02" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1254, - "startColumn": 7, - "charOffset": 44658, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1252, - "startColumn": 1, - "charOffset": 44646, - "charLength": 124, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[{}] Call stack overflow\", __FUNCTION__);\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9643c11e0ff57d1a", - "equalIndicator/v1": "201d06afa316c2f6e1d7cbbc6b0eb61e2b18e0d3834d1212baab685c14b6038b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1922, - "startColumn": 20, - "charOffset": 66050, - "charLength": 1, - "snippet": { - "text": "x" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1920, - "startColumn": 1, - "charOffset": 65933, - "charLength": 165, - "snippet": { - "text": "\t\t\tfor (uint32_t y = 0; y < rows; ++y) {\r\n\t\t\t\t// calculate new coordinates using rotation center\r\n\t\t\t\tint32_t newX = x - centerX;\r\n\t\t\t\tint32_t newY = y - centerY;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "46b319ef78489c82", - "equalIndicator/v1": "201e5a7b07df9ff089184d45cd19a4cecb8f49b6f87b844cf4713381f469260d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8798, - "startColumn": 60, - "charOffset": 306886, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8796, - "startColumn": 1, - "charOffset": 306809, - "charLength": 247, - "snippet": { - "text": "} // namespace\r\n\r\nbool checkCanInitCreateMarketOffer(std::shared_ptr player, uint8_t type, const ItemType &it, uint16_t amount, uint64_t price, std::ostringstream &offerStatus) {\r\n\tif (!player) {\r\n\t\tofferStatus << \"Failed to load player\";\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1b724201006f48f6", - "equalIndicator/v1": "20236783fe64ca87e0274f92851e1d6fe1beb02418286f62a1910f5201bab647" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 437, - "startColumn": 64, - "charOffset": 16426, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 435, - "startColumn": 1, - "charOffset": 16358, - "charLength": 236, - "snippet": { - "text": "}\r\n\r\nbool EventCallback::playerOnLookInShop(std::shared_ptr player, const ItemType* itemType, uint8_t count) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLookInShop - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "974fc8d1e9f865be", - "equalIndicator/v1": "2024e4e5795ace18036b83fa44bb811d6cf57186cf007759c206a107f3569d9e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1283, - "startColumn": 7, - "charOffset": 45631, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1281, - "startColumn": 1, - "charOffset": 45619, - "charLength": 146, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventOnStorageUpdate - \"\r\n\t\t \"Player {} key {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "859d8a6a6ea28c71", - "equalIndicator/v1": "20300fb1cfb4225bcec563a15686ebfd25dec261aff2d89027cc4d73cd6d14cc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1816, - "startColumn": 3, - "charOffset": 54887, - "charLength": 16, - "snippet": { - "text": "ObjectCategory_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1814, - "startColumn": 1, - "charOffset": 54783, - "charLength": 266, - "snippet": { - "text": "\t\tg_game().playerClearManagedContainer(player->getID(), category, true);\r\n\t} else if (action == 2) {\r\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\r\n\t\tg_game().playerOpenManagedContainer(player->getID(), category, true);\r\n\t} else if (action == 3) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e17f9ff27382085f", - "equalIndicator/v1": "204f9e94b7ca01d09cf89bf11d4b92bee2b62f4c5adc9693270d1ae7ad2e8fe9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions", - "markdown": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/value_wrapper.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 41, - "startColumn": 18, - "charOffset": 1423, - "charLength": 12, - "snippet": { - "text": "ValueWrapper" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 39, - "startColumn": 1, - "charOffset": 1269, - "charLength": 396, - "snippet": { - "text": "\texplicit(false) ValueWrapper(int value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(double value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const phmap::flat_hash_map &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const std::initializer_list> &init_list, uint64_t timestamp = 0);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3063d4564dc4dc71", - "equalIndicator/v1": "205dd1b4e22d3efc5e106926290a4be82cdf440e8308bbf1f585f574c3f8a3a2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 161, - "startColumn": 10, - "charOffset": 4425, - "charLength": 13, - "snippet": { - "text": "getThrowRange" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 159, - "startColumn": 1, - "charOffset": 4410, - "charLength": 71, - "snippet": { - "text": "\t}\r\n\r\n\tint32_t getThrowRange() const override final {\r\n\t\treturn 1;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a109ae3f5884f137", - "equalIndicator/v1": "2064a6f2e7f2ea974605912e846c087f3c69ae9a6212545589a5ed2c627c65d6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'long long' to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'long long' to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/decay/decay.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 51, - "startColumn": 43, - "charOffset": 1417, - "charLength": 8, - "snippet": { - "text": "duration" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 49, - "startColumn": 1, - "charOffset": 1304, - "charLength": 189, - "snippet": { - "text": "\t\tif (decayMap.empty()) {\r\n\t\t\teventId = g_dispatcher().scheduleEvent(\r\n\t\t\t\tstd::max(SCHEDULER_MINTICKS, duration), [this] { checkDecay(); }, \"Decay::checkDecay\"\r\n\t\t\t);\r\n\t\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dc0a301b449d03d5", - "equalIndicator/v1": "20894c70490ccfeb0945614dce1477c72a0cfd7f970806136783330852d4bfe5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 997, - "startColumn": 41, - "charOffset": 37958, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 995, - "startColumn": 1, - "charOffset": 37912, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "18bbcbc020736b99", - "equalIndicator/v1": "20968bcfa8c784e7b241a51cb1fd5a967376cae02c89ce6f93ea21458ed94c61" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1061, - "startColumn": 7, - "charOffset": 31969, - "charLength": 10, - "snippet": { - "text": "const auto" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1059, - "startColumn": 1, - "charOffset": 31887, - "charLength": 208, - "snippet": { - "text": "\tint index = 0;\r\n\tlua_createtable(L, monsterType->info.summons.size(), 0);\r\n\tfor (const auto &summonBlock : monsterType->info.summons) {\r\n\t\tlua_createtable(L, 0, 3);\r\n\t\tsetField(L, \"name\", summonBlock.name);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "946edb1c89e85609", - "equalIndicator/v1": "20e5e930196462484b14182465ba2d1b2d9b12c9b5a68aabc1a9aeece291b6cc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to 'float'", - "markdown": "Narrowing conversion from 'int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 567, - "startColumn": 61, - "charOffset": 15283, - "charLength": 23, - "snippet": { - "text": "(statsPercent[i] - 100)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 565, - "startColumn": 1, - "charOffset": 15192, - "charLength": 140, - "snippet": { - "text": "\r\n\t\t\tcase STAT_MAXMANAPOINTS:\r\n\t\t\t\tstats[i] = static_cast(player->getMaxMana() * ((statsPercent[i] - 100) / 100.f));\r\n\t\t\t\tbreak;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "33cf6a50d7d49bb1", - "equalIndicator/v1": "2101e128ab860764df539abf22aac77789bebf0f3afbb3fad2b0fc9ab6a9c762" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2178, - "startColumn": 27, - "charOffset": 73789, - "charLength": 10, - "snippet": { - "text": "multiplier" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2176, - "startColumn": 1, - "charOffset": 73677, - "charLength": 169, - "snippet": { - "text": "\tif (chance != 0 && uniform_random(1, 10000) <= chance) {\r\n\t\tdamage.critical = true;\r\n\t\tdamage.primary.value *= multiplier;\r\n\t\tdamage.secondary.value *= multiplier;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "db23db335550efc7", - "equalIndicator/v1": "211eae7c7c9839aa31d1eca298b9e5926865e271473b9abdfe1b6547ee029b1b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/map/house_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 272, - "startColumn": 29, - "charOffset": 7580, - "charLength": 4, - "snippet": { - "text": "door" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 270, - "startColumn": 1, - "charOffset": 7533, - "charLength": 129, - "snippet": { - "text": "\r\n\tint index = 0;\r\n\tfor (std::shared_ptr door : doors) {\r\n\t\tpushUserdata(L, door);\r\n\t\tsetItemMetatable(L, -1, door);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ef2d773e35123cbf", - "equalIndicator/v1": "21328967236e9df90a9e2b6de34afa01c05a0966f06b2248c050b2de7b9f0bf8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use nullptr", - "markdown": "Use nullptr" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/utils/astarnodes.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 146, - "startColumn": 2, - "charOffset": 6295, - "charLength": 1477, - "snippet": { - "text": "auto _mm_sse2_min_epi32 = [](const __m128i a, const __m128i b) {\r\n\t\t__m128i mask = _mm_cmpgt_epi32(a, b);\r\n\t\treturn _mm_or_si128(_mm_and_si128(mask, b), _mm_andnot_si128(mask, a));\r\n\t};\r\n\r\n\tauto _mm_sse2_blendv_epi8 = [](const __m128i a, const __m128i b, __m128i mask) {\r\n\t\tmask = _mm_cmplt_epi8(mask, _mm_setzero_si128());\r\n\t\treturn _mm_or_si128(_mm_andnot_si128(mask, a), _mm_and_si128(mask, b));\r\n\t};\r\n\r\n\tconst __m128i increment = _mm_set1_epi32(4);\r\n\t__m128i indices = _mm_setr_epi32(0, 1, 2, 3);\r\n\t__m128i minindices = indices;\r\n\t__m128i minvalues = _mm_load_si128(reinterpret_cast(calculatedNodes));\r\n\tfor (int32_t pos = 4; pos < curNode; pos += 4) {\r\n\t\tconst __m128i values = _mm_load_si128(reinterpret_cast(&calculatedNodes[pos]));\r\n\t\tindices = _mm_add_epi32(indices, increment);\r\n\t\tminindices = _mm_sse2_blendv_epi8(minindices, indices, _mm_cmplt_epi32(values, minvalues));\r\n\t\tminvalues = _mm_sse2_min_epi32(values, minvalues);\r\n\t}\r\n\r\n\t__m128i res = _mm_sse2_min_epi32(minvalues, _mm_shuffle_epi32(minvalues, _MM_SHUFFLE(2, 3, 0, 1))); // Calculate horizontal minimum\r\n\tres = _mm_sse2_min_epi32(res, _mm_shuffle_epi32(res, _MM_SHUFFLE(0, 1, 2, 3))); // Calculate horizontal minimum\r\n\r\n\talignas(16) int32_t indices_array[4];\r\n\t_mm_store_si128(reinterpret_cast<__m128i*>(indices_array), minindices);\r\n\r\n\tint32_t best_node = indices_array[(_mm_ctz(_mm_movemask_epi8(_mm_cmpeq_epi32(minvalues, res))) >> 2)];\r\n\treturn (openNodes[best_node] " - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 144, - "startColumn": 1, - "charOffset": 6209, - "charLength": 1660, - "snippet": { - "text": "\treturn (openNodes[best_node] ? &nodes[best_node] : NULL);\r\n#elif defined(__SSE2__)\r\n\tauto _mm_sse2_min_epi32 = [](const __m128i a, const __m128i b) {\r\n\t\t__m128i mask = _mm_cmpgt_epi32(a, b);\r\n\t\treturn _mm_or_si128(_mm_and_si128(mask, b), _mm_andnot_si128(mask, a));\r\n\t};\r\n\r\n\tauto _mm_sse2_blendv_epi8 = [](const __m128i a, const __m128i b, __m128i mask) {\r\n\t\tmask = _mm_cmplt_epi8(mask, _mm_setzero_si128());\r\n\t\treturn _mm_or_si128(_mm_andnot_si128(mask, a), _mm_and_si128(mask, b));\r\n\t};\r\n\r\n\tconst __m128i increment = _mm_set1_epi32(4);\r\n\t__m128i indices = _mm_setr_epi32(0, 1, 2, 3);\r\n\t__m128i minindices = indices;\r\n\t__m128i minvalues = _mm_load_si128(reinterpret_cast(calculatedNodes));\r\n\tfor (int32_t pos = 4; pos < curNode; pos += 4) {\r\n\t\tconst __m128i values = _mm_load_si128(reinterpret_cast(&calculatedNodes[pos]));\r\n\t\tindices = _mm_add_epi32(indices, increment);\r\n\t\tminindices = _mm_sse2_blendv_epi8(minindices, indices, _mm_cmplt_epi32(values, minvalues));\r\n\t\tminvalues = _mm_sse2_min_epi32(values, minvalues);\r\n\t}\r\n\r\n\t__m128i res = _mm_sse2_min_epi32(minvalues, _mm_shuffle_epi32(minvalues, _MM_SHUFFLE(2, 3, 0, 1))); // Calculate horizontal minimum\r\n\tres = _mm_sse2_min_epi32(res, _mm_shuffle_epi32(res, _MM_SHUFFLE(0, 1, 2, 3))); // Calculate horizontal minimum\r\n\r\n\talignas(16) int32_t indices_array[4];\r\n\t_mm_store_si128(reinterpret_cast<__m128i*>(indices_array), minindices);\r\n\r\n\tint32_t best_node = indices_array[(_mm_ctz(_mm_movemask_epi8(_mm_cmpeq_epi32(minvalues, res))) >> 2)];\r\n\treturn (openNodes[best_node] ? &nodes[best_node] : NULL);\r\n#else\r\n\tint32_t best_node_f = std::numeric_limits::max();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "540101bb70293102", - "equalIndicator/v1": "2134cd5ad292ad008267bdc88ab1cf227cb9ad8349f4fa6c6b8d038153f3c4cd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'addCondition' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'addCondition' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 336, - "startColumn": 66, - "charOffset": 8490, - "charLength": 12, - "snippet": { - "text": "addCondition" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 334, - "startColumn": 1, - "charOffset": 8420, - "charLength": 153, - "snippet": { - "text": "}\r\n\r\nbool Condition::updateCondition(const std::shared_ptr addCondition) {\r\n\tif (conditionType != addCondition->getType()) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5472484c16977e7a", - "equalIndicator/v1": "215663a97be371a223947c3470f23bbe7f5f696b629e1a56b1d996634371314d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'lootContainer' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'lootContainer' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3057, - "startColumn": 110, - "charOffset": 113694, - "charLength": 13, - "snippet": { - "text": "lootContainer" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3055, - "startColumn": 1, - "charOffset": 113580, - "charLength": 252, - "snippet": { - "text": "}\r\n\r\nReturnValue Game::processMoveOrAddItemToLootContainer(std::shared_ptr item, std::shared_ptr lootContainer, uint32_t &remainderCount, std::shared_ptr player) {\r\n\tstd::shared_ptr moveItem = nullptr;\r\n\tReturnValue ret;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "48a753099094aa82", - "equalIndicator/v1": "216a60ea714df0c02a6295caed6ee26b6104862bdfd45e4db1e34b5a75cda71e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2092, - "startColumn": 15, - "charOffset": 57546, - "charLength": 10, - "snippet": { - "text": "difference" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2090, - "startColumn": 1, - "charOffset": 57411, - "charLength": 191, - "snippet": { - "text": "void ConditionSpeed::getFormulaValues(int32_t var, int32_t &min, int32_t &max) const {\r\n\tint32_t difference = var - 40;\r\n\tmin = mina * difference + minb;\r\n\tmax = maxa * difference + maxb;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2ab3db427aa8a53c", - "equalIndicator/v1": "217dade50c5c146fc42522e54078c4da7e5d2078b16810f1f0f15081790c5fdd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use nullptr", - "markdown": "Use nullptr" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 134, - "startColumn": 31, - "charOffset": 4090, - "charLength": 4, - "snippet": { - "text": "NULL" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 132, - "startColumn": 1, - "charOffset": 3994, - "charLength": 214, - "snippet": { - "text": "\tStashContainerList toReturnList;\r\n\tfor (auto item : itemlist) {\r\n\t\tif (item->getContainer() != NULL) {\r\n\t\t\tauto subContainer = item->getContainer()->getStowableItems();\r\n\t\t\tfor (auto subContItem : subContainer) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fabe43de897f76d4", - "equalIndicator/v1": "21ad8c6a5828ce583f6790532320bc0ab7e3383f69a4ca4b6d1406294ad25a57" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/game_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 886, - "startColumn": 63, - "charOffset": 25906, - "charLength": 1, - "snippet": { - "text": "{" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 884, - "startColumn": 1, - "charOffset": 25839, - "charLength": 186, - "snippet": { - "text": "}\r\n\r\nint GameFunctions::luaGameGetPublicAchievements(lua_State* L) {\r\n\t// Game.getPublicAchievements()\r\n\tconst std::vector &achievements = g_game().getPublicAchievements();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dd9fc8374449850f", - "equalIndicator/v1": "21c2981f041f5fb0a80e0cb230c0393c9a97b1aa5f2fd6b114a7c47076a8fa45" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int64_t' (aka 'long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/player_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 775, - "startColumn": 51, - "charOffset": 21183, - "charLength": 13, - "snippet": { - "text": "getDepotChest" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 773, - "startColumn": 1, - "charOffset": 21040, - "charLength": 235, - "snippet": { - "text": "\tuint32_t depotId = getNumber(L, 2);\r\n\tbool autoCreate = getBoolean(L, 3, false);\r\n\tstd::shared_ptr depotChest = player->getDepotChest(depotId, autoCreate);\r\n\tif (depotChest) {\r\n\t\tplayer->setLastDepotId(depotId);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b688cacd931d9bff", - "equalIndicator/v1": "21deeb6922fc3ecc381efb4287039f56ddd7451ba5c5f6cede0a3f81905fb1e5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 715, - "startColumn": 41, - "charOffset": 27603, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 713, - "startColumn": 1, - "charOffset": 27557, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "955a3734320e3650", - "equalIndicator/v1": "21e0a53ebfc7a04fcd73c30cc5bf30e0d78eb93bcbbd9ee13185407583641ad2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'event' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'event' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 57, - "startColumn": 49, - "charOffset": 1451, - "charLength": 5, - "snippet": { - "text": "event" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 55, - "startColumn": 1, - "charOffset": 1398, - "charLength": 140, - "snippet": { - "text": "}\r\n\r\nbool Weapons::registerLuaEvent(WeaponShared_ptr event, bool fromXML /*= false*/) {\r\n\tweapons[event->getID()] = event;\r\n\tif (fromXML) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e610cfc65efa8026", - "equalIndicator/v1": "21e0cb405ad316ca88fe6f96629fe4345966ff58964e1b4876573481f0ab8ff5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/rewards/reward.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 26, - "startColumn": 7, - "charOffset": 942, - "charLength": 22, - "snippet": { - "text": "postRemoveNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 24, - "startColumn": 1, - "charOffset": 784, - "charLength": 321, - "snippet": { - "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r\n\r\n\t// overrides\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3e55ae830fb9184b", - "equalIndicator/v1": "21f0993d6d38a89b28321415df28b752b70d97c2b778580122d8bf3912752c79" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/cylinder.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 199, - "startColumn": 15, - "charOffset": 8218, - "charLength": 22, - "snippet": { - "text": "postRemoveNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 197, - "startColumn": 1, - "charOffset": 8065, - "charLength": 311, - "snippet": { - "text": "\r\n\tvirtual void postAddNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r\n\tvirtual void postRemoveNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r\n\r\n\tbool isPushable() override {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4dbd0c2ffb896c0a", - "equalIndicator/v1": "21fbaf56fc39f2f9634b58c68b8b060692c70bb5e0560a9a23d0f8628f652765" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 211, - "startColumn": 6, - "charOffset": 7662, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 209, - "startColumn": 1, - "charOffset": 7606, - "charLength": 193, - "snippet": { - "text": "\tLuaScriptInterface::pushPosition(L, position);\r\n\r\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fc53fdf462e931ff", - "equalIndicator/v1": "2200040b7ce19f202070bf4e8a13526236207e041b589e8440ac653e22539005" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 52, - "startColumn": 24, - "charOffset": 1442, - "charLength": 5, - "snippet": { - "text": "clone" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 50, - "startColumn": 1, - "charOffset": 1365, - "charLength": 170, - "snippet": { - "text": "\tContainer &operator=(const Container &) = delete;\r\n\r\n\tstd::shared_ptr clone() const override final;\r\n\r\n\tstd::shared_ptr getContainer() override final {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7cf20ab33482a2ee", - "equalIndicator/v1": "2211afbfbc45e82208b9022eab5ddc5a30c3da91e8bc690a558855918b245573" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/grouping/party.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 564, - "startColumn": 55, - "charOffset": 15687, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 562, - "startColumn": 1, - "charOffset": 15628, - "charLength": 203, - "snippet": { - "text": "}\r\n\r\nvoid Party::updatePlayerTicks(std::shared_ptr player, uint32_t points) {\r\n\tif (points != 0 && !player->hasFlag(PlayerFlags_t::NotGainInFight)) {\r\n\t\tticksMap[player->getID()] = OTSYS_TIME();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c48ec2bb7da0ba66", - "equalIndicator/v1": "221671541403cb8a4ea321207380acf29a2ab921192dc3f4f424a17aad7bd0ee" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 711, - "startColumn": 121, - "charOffset": 23513, - "charLength": 27, - "snippet": { - "text": "spellSecondaryGroupCooldown" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 709, - "startColumn": 1, - "charOffset": 23346, - "charLength": 280, - "snippet": { - "text": "\t\t}\r\n\t\tif (spellSecondaryGroupCooldown > 0) {\r\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLGROUPCOOLDOWN, spellSecondaryGroupCooldown / rateCooldown, 0, false, secondaryGroup);\r\n\t\t\tplayer->addCondition(condition);\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e4ffd29b9b8e6ebd", - "equalIndicator/v1": "2229f73d1bd8febe7313b33659b2731e1a2ffd2bb31440aa134499273c8a2aba" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'getUsedRunesBit' can be made const", - "markdown": "Method 'getUsedRunesBit' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1952, - "startColumn": 10, - "charOffset": 57573, - "charLength": 15, - "snippet": { - "text": "getUsedRunesBit" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1950, - "startColumn": 1, - "charOffset": 57537, - "charLength": 84, - "snippet": { - "text": "\t\tUsedRunesBit = bit;\r\n\t}\r\n\tint32_t getUsedRunesBit() {\r\n\t\treturn UsedRunesBit;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cb89105af9f8fd0f", - "equalIndicator/v1": "222a2afd0b9003fc2eac5db6d9f2ac73828bc4d54796f6ab18374d088b235324" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'speaker' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'speaker' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6146, - "startColumn": 63, - "charOffset": 195419, - "charLength": 7, - "snippet": { - "text": "speaker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6144, - "startColumn": 1, - "charOffset": 195352, - "charLength": 165, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendPrivateMessage(std::shared_ptr speaker, SpeakClasses type, const std::string &text) {\r\n\tNetworkMessage msg;\r\n\tmsg.addByte(0xAA);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8d782654d5a33e7d", - "equalIndicator/v1": "224bba02c7ceb66a841d14830f31f95ed2601e1af498c3600ec5aa7262a809dd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6422, - "startColumn": 68, - "charOffset": 221764, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6420, - "startColumn": 1, - "charOffset": 221692, - "charLength": 210, - "snippet": { - "text": "}\r\n\r\nvoid Game::internalCreatureChangeVisible(std::shared_ptr creature, bool visible) {\r\n\t// Send to clients\r\n\tfor (const auto &spectator : Spectators().find(creature->getPosition(), true)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a524aa84e334c7d7", - "equalIndicator/v1": "228f28283e5ddc29fc9c7360e43af88014480327e4d94e7da487201bff24f79c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1832, - "startColumn": 3, - "charOffset": 55847, - "charLength": 16, - "snippet": { - "text": "ObjectCategory_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1830, - "startColumn": 1, - "charOffset": 55742, - "charLength": 244, - "snippet": { - "text": "\t\tg_game().playerClearManagedContainer(player->getID(), category, false);\r\n\t} else if (action == 6) {\r\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\r\n\t\tg_game().playerOpenManagedContainer(player->getID(), category, false);\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8fb6392313449172", - "equalIndicator/v1": "22936bb82e932e93682d7476af9c0d6b92b272a389f9b8542b0becf1240e8452" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 292, - "startColumn": 15, - "charOffset": 7576, - "charLength": 12, - "snippet": { - "text": "std::toupper" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 290, - "startColumn": 1, - "charOffset": 7524, - "charLength": 112, - "snippet": { - "text": "\t\t} else {\r\n\t\t\tif (capitalizeNext) {\r\n\t\t\t\tresult += std::toupper(ch);\r\n\t\t\t\tcapitalizeNext = false;\r\n\t\t\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f8be9f5e9cb67076", - "equalIndicator/v1": "229f1110388577dd4e513dab08df7e69c02e1ac9e8a294a45b460a9d03045aee" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2195, - "startColumn": 27, - "charOffset": 74477, - "charLength": 7, - "snippet": { - "text": "monster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2193, - "startColumn": 1, - "charOffset": 74422, - "charLength": 152, - "snippet": { - "text": "\t\t}\r\n\t} else if (monster) {\r\n\t\tdamage.primary.value *= monster->getAttackMultiplier();\r\n\t\tdamage.secondary.value *= monster->getAttackMultiplier();\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e8de382fdb78a809", - "equalIndicator/v1": "22a33d10aa1b5fd80475cc0847a404b504776be95d46db953c5edaadf43b4359" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 915, - "startColumn": 14, - "charOffset": 29762, - "charLength": 6, - "snippet": { - "text": "damage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 913, - "startColumn": 1, - "charOffset": 29578, - "charLength": 349, - "snippet": { - "text": "\tif (combatType != COMBAT_MANADRAIN && combatType != COMBAT_LIFEDRAIN && combatType != COMBAT_AGONYDAMAGE) { // Increase mitigate damage\r\n\t\tauto originalDamage = damage;\r\n\t\tdamage -= (damage * getMitigation()) / 100.;\r\n\t\tg_logger().trace(\"[mitigation] creature: {}, original damage: {}, mitigation damage: {}\", getName(), originalDamage, damage);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6bb08f7d5575c2f4", - "equalIndicator/v1": "22ae28dfee57028087efbb38361d1f79c9db43de8e92ffe266f91f71a0c471a1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/player_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1624, - "startColumn": 24, - "charOffset": 57254, - "charLength": 8, - "snippet": { - "text": "m_player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1622, - "startColumn": 1, - "charOffset": 57177, - "charLength": 162, - "snippet": { - "text": "\r\n\tif (m_player.getMana() > m_player.getMaxMana()) {\r\n\t\tint32_t difference = m_player.getMana() - m_player.getMaxMana();\r\n\t\tm_player.changeMana(-difference);\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "37406bedeec7afb4", - "equalIndicator/v1": "22e8a610f505efd15d7826c99594ae4e382887f722f40f4284beca071aae477a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1012, - "startColumn": 7, - "charOffset": 38537, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1010, - "startColumn": 1, - "charOffset": 38365, - "charLength": 319, - "snippet": { - "text": "\r\nvoid EventCallback::playerOnStorageUpdate(std::shared_ptr player, const uint32_t key, const int32_t value, int32_t oldValue, uint64_t currentTime) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::eventOnStorageUpdate - \"\r\n\t\t \"Player {} key {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6679ab75c83fc257", - "equalIndicator/v1": "22f2dd1e17efcdb1c0ca6734693af4140ccd85d4d4a9830b8f3f94ae72237e89" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'itemList' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'itemList' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 190, - "startColumn": 37, - "charOffset": 4590, - "charLength": 8, - "snippet": { - "text": "itemList" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 188, - "startColumn": 1, - "charOffset": 4549, - "charLength": 105, - "snippet": { - "text": "}\r\n\r\nuint16_t getStashSize(StashItemList itemList) {\r\n\tuint16_t size = 0;\r\n\tfor (auto item : itemList) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f759aa8df3b02d62", - "equalIndicator/v1": "22f8c620516dd64ad38514e0fb7f1ab58a4ce07cd00d7bc43b2b708eafe07246" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/modules/modules.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 155, - "startColumn": 56, - "charOffset": 4191, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 153, - "startColumn": 1, - "charOffset": 4131, - "charLength": 176, - "snippet": { - "text": "}\r\n\r\nvoid Module::executeOnRecvbyte(std::shared_ptr player, NetworkMessage &msg) {\r\n\t// onRecvbyte(player, msg, recvbyte)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "71e00f59d611787f", - "equalIndicator/v1": "230186f0ab54795bd2a0d8c0b9e6305cc66a3519abf808e0b513d0b9122d07e8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 445, - "startColumn": 100, - "charOffset": 20014, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 443, - "startColumn": 1, - "charOffset": 19910, - "charLength": 203, - "snippet": { - "text": "}\r\n\r\nvoid ItemParse::parseInvisible(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\r\n\tstd::string stringValue = tmpStrValue;\r\n\tif (stringValue == \"invisible\") {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a414cc48be1fecf8", - "equalIndicator/v1": "2305093f72173ffd3dc1893b149c7c4182256670b4c04b245717a7ea7fa88584" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1956, - "startColumn": 2, - "charOffset": 59847, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1954, - "startColumn": 1, - "charOffset": 59749, - "charLength": 216, - "snippet": { - "text": "void ProtocolGame::parseRequestTrade(NetworkMessage &msg) {\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tuint32_t playerId = msg.get();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1431eb0563e7bb52", - "equalIndicator/v1": "23067e2dffc883ea9073def66f176aff7096ced04a43a3f064f07f4ae04b83f0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1611, - "startColumn": 28, - "charOffset": 56563, - "charLength": 10, - "snippet": { - "text": "std::round" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1609, - "startColumn": 1, - "charOffset": 56383, - "charLength": 312, - "snippet": { - "text": "\t\tif (shouldCalculateSecondaryDamage) {\r\n\t\t\tdouble factor = (double)elementAttack / (double)attackValue; // attack value here is phys dmg + element dmg\r\n\t\t\tint32_t elementDamage = std::round(defaultDmg * factor);\r\n\t\t\tint32_t physDmg = std::round(defaultDmg * (1.0 - factor));\r\n\t\t\tdamage.primary.value = physDmg;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0445f2315deec401", - "equalIndicator/v1": "23178e33dcac1572735f6e053234d781934c6f0af0954f6dfbbbdc21eb2d7784" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first.", - "markdown": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1168, - "startColumn": 28, - "charOffset": 32700, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1166, - "startColumn": 1, - "charOffset": 32644, - "charLength": 126, - "snippet": { - "text": "\t\t\t\tseparator = true;\r\n\t\t\t}\r\n\t\t\tif (int32_t hitChance = item->getHitChance();\r\n\t\t\t hitChance != 0) {\r\n\t\t\t\tif (separator) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1acd24922d0f0f77", - "equalIndicator/v1": "234ac8d7e50168f33811f372f53fb826089e9128a3a416603c6355312f5fffca" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 126, - "startColumn": 47, - "charOffset": 3859, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 124, - "startColumn": 1, - "charOffset": 3808, - "charLength": 122, - "snippet": { - "text": "}\r\n\r\nvoid Container::addItem(std::shared_ptr item) {\r\n\titemlist.push_back(item);\r\n\titem->setParent(getContainer());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bdbc8ae5bd1588b0", - "equalIndicator/v1": "235f1d9c6af8bff20ea45596375e442482855f6a029cd5306e3f6162d88fc2d6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iologindata.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 107, - "startColumn": 54, - "charOffset": 3995, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 105, - "startColumn": 1, - "charOffset": 3937, - "charLength": 218, - "snippet": { - "text": "}\r\n\r\nbool IOLoginData::loadPlayer(std::shared_ptr player, DBResult_ptr result, bool disableIrrelevantInfo /* = false*/) {\r\n\tif (!result || !player) {\r\n\t\tstd::string nullptrType = !result ? \"Result\" : \"Player\";\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7ba688eff9fb1f77", - "equalIndicator/v1": "2373d610a72db123570bf96151160b9e2e81a9c207630bd28e9283c225e19b92" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'newTile' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'newTile' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/map.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 212, - "startColumn": 76, - "charOffset": 6265, - "charLength": 7, - "snippet": { - "text": "newTile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 210, - "startColumn": 1, - "charOffset": 6185, - "charLength": 220, - "snippet": { - "text": "}\r\n\r\nvoid Map::setTile(uint16_t x, uint16_t y, uint8_t z, std::shared_ptr newTile) {\r\n\tif (z >= MAP_MAX_LAYERS) {\r\n\t\tg_logger().error(\"Attempt to set tile on invalid coordinate: {}\", Position(x, y, z).toString());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d38a3a32ff5d8813", - "equalIndicator/v1": "238676e5b6f3350230b00adfd8ad77d63db1fe78f4956558f8e95d07325c0b14" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 913, - "startColumn": 48, - "charOffset": 29514, - "charLength": 3, - "snippet": { - "text": "max" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 911, - "startColumn": 1, - "charOffset": 29361, - "charLength": 164, - "snippet": { - "text": "\r\n\t// Returns the calculated maximum damage or a random value between the calculated minimum and maximum\r\n\treturn maxDamage ? -max : -normal_random(min, max);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "605ea9fe5336ff94", - "equalIndicator/v1": "238f882f0fad14dc6ae8ee4f5b75000a2d6048b768b091ce59ef052945d406a8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 493, - "startColumn": 8, - "charOffset": 12180, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 491, - "startColumn": 1, - "charOffset": 12066, - "charLength": 238, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetTransformEquipId(lua_State* L) {\r\n\t// itemType:getTransformEquipId()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->transformEquipTo);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f5c5f78303e32fb3", - "equalIndicator/v1": "239bb715ad6f589bc0a24922b4d10182a6dfad73d20f4e1074a317be013460f8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1226, - "startColumn": 7, - "charOffset": 43684, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1224, - "startColumn": 1, - "charOffset": 43672, - "charLength": 159, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnRequestQuestLine - \"\r\n\t\t \"Player {} questId {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9977737ed7e96f02", - "equalIndicator/v1": "239e3fe259219964955420266423dbfb2ed0f9450f23bcded8c04eb528a33e45" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'MoveEvent' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'MoveEvent' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 616, - "startColumn": 66, - "charOffset": 18724, - "charLength": 9, - "snippet": { - "text": "MoveEvent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 614, - "startColumn": 1, - "charOffset": 18654, - "charLength": 257, - "snippet": { - "text": "}\r\n\r\nuint32_t MoveEvent::DeEquipItem(const std::shared_ptr MoveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool) {\r\n\tif (player == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "936d0ececd2f6589", - "equalIndicator/v1": "23e3e5424886ff230c06fac28e0c480aa393a438a3bef0a58aad87ac7fdb14e5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/loot_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 126, - "startColumn": 30, - "charOffset": 3450, - "charLength": 19, - "snippet": { - "text": "getNumber" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 124, - "startColumn": 1, - "charOffset": 3356, - "charLength": 157, - "snippet": { - "text": "\tconst auto loot = getUserdataShared(L, 1);\r\n\tif (loot) {\r\n\t\tloot->lootBlock.actionId = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1b60ed4e14e5adc5", - "equalIndicator/v1": "23fc7955b9b8a7a026a457ec089deccaa82f1022d8c8c80c62fcec70616ccc0c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1018, - "startColumn": 57, - "charOffset": 29359, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1016, - "startColumn": 1, - "charOffset": 29298, - "charLength": 112, - "snippet": { - "text": "}\r\n\r\nbool Player::canWalkthroughEx(std::shared_ptr creature) {\r\n\tif (group->access) {\r\n\t\treturn true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d1eea023bde11ae8", - "equalIndicator/v1": "240e5a20305bd60aaa7d7051da61e90a52a34b2df23e91fdd5bdc3570368bd93" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6922, - "startColumn": 31, - "charOffset": 240423, - "charLength": 38, - "snippet": { - "text": "(damage.secondary.value * damageBonus)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6920, - "startColumn": 1, - "charOffset": 240291, - "charLength": 190, - "snippet": { - "text": "\t\t\tif (damageBonus != 0) {\r\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\r\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\r\n\t\t\t}\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2c6f9c80210e166e", - "equalIndicator/v1": "24200ca09b96267eb2c770f602ed90fa09f0800574062505b0dde3856bcc097e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The 'empty' method should be used to check for emptiness instead of 'size'", - "markdown": "The 'empty' method should be used to check for emptiness instead of 'size'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4081, - "startColumn": 7, - "charOffset": 123090, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4079, - "startColumn": 1, - "charOffset": 123039, - "charLength": 104, - "snippet": { - "text": "\r\n\tfor (const auto &item : equippedItems) {\r\n\t\tif (item->getAugments().size() < 1) {\r\n\t\t\tcontinue;\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a589b29c99a6ea68", - "equalIndicator/v1": "24233416e6602bddc3a7fec87e6587faea025efffcef170954d70e406c1800e7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6368, - "startColumn": 50, - "charOffset": 219907, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6366, - "startColumn": 1, - "charOffset": 219853, - "charLength": 188, - "snippet": { - "text": "}\r\n\r\nvoid Game::changeSpeed(std::shared_ptr creature, int32_t varSpeedDelta) {\r\n\tint32_t varSpeed = creature->getSpeed() - creature->getBaseSpeed();\r\n\tvarSpeed += varSpeedDelta;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "354123cb78a670b2", - "equalIndicator/v1": "242975d053f3b668e644ad2f48f10aa801a55a5803a20b95a00829dcccef9f42" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1335, - "startColumn": 58, - "charOffset": 45126, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1333, - "startColumn": 1, - "charOffset": 45064, - "charLength": 318, - "snippet": { - "text": "}\r\n\r\nvoid Combat::doCombatCondition(std::shared_ptr caster, const Position &position, const std::unique_ptr &area, const CombatParams ¶ms) {\r\n\tconst auto origin = caster ? caster->getPosition() : Position();\r\n\tCombatFunc(caster, origin, position, area, params, CombatConditionFunc, nullptr);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f243e01e915cb331", - "equalIndicator/v1": "2454d8260fc6e004177656075ae0124217e1c48db68b6ddbfaafa7e02b397dd5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/talkaction.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 82, - "startColumn": 53, - "charOffset": 2657, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 80, - "startColumn": 1, - "charOffset": 2600, - "charLength": 234, - "snippet": { - "text": "}\r\n\r\nbool TalkAction::executeSay(std::shared_ptr player, const std::string &words, const std::string ¶m, SpeakClasses type) const {\r\n\t// onSay(player, words, param, type)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8ca51c0b4039e613", - "equalIndicator/v1": "24850be0c669693693043581db8eec2b986769a85bf6e9b07659ee4f7ba5c691" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/player_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2361, - "startColumn": 68, - "charOffset": 81659, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2359, - "startColumn": 1, - "charOffset": 81587, - "charLength": 210, - "snippet": { - "text": "}\r\n\r\nint32_t PlayerWheel::checkDrainBodyLeech(std::shared_ptr target, skills_t skill) const {\r\n\tif (!target || !target->getMonster() || target->getWheelOfDestinyDrainBodyDebuff() == 0) {\r\n\t\treturn 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "20455e009c267243", - "equalIndicator/v1": "24b554167b5c85e22fca8ca06cc27fa96d97c7373b6b76832b3d79bbe29b84c5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/cylinder.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 185, - "startColumn": 22, - "charOffset": 7381, - "charLength": 11, - "snippet": { - "text": "queryRemove" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 183, - "startColumn": 1, - "charOffset": 7321, - "charLength": 211, - "snippet": { - "text": "\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r\n\tvirtual ReturnValue queryRemove(const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr = nullptr) override {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cb3d35a3e2819ca9", - "equalIndicator/v1": "24d97f34fb7182650accb84f04ed678178687d2c60de72da9c17ea5c0d7bbfb1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 577, - "startColumn": 51, - "charOffset": 17399, - "charLength": 2, - "snippet": { - "text": "it" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 575, - "startColumn": 1, - "charOffset": 17303, - "charLength": 134, - "snippet": { - "text": "\r\n\t\t\tif (it.abilities->getManaGain() != 0) {\r\n\t\t\t\tcondition->setParam(CONDITION_PARAM_MANAGAIN, it.abilities->getManaGain());\r\n\t\t\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "19f7c73163de45cc", - "equalIndicator/v1": "24f3a78e10d53812cde521ca7950b71afbcaa2dc69f6b448f647f58224ace0cb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 10568, - "startColumn": 52, - "charOffset": 367048, - "charLength": 4, - "snippet": { - "text": "name" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 10566, - "startColumn": 1, - "charOffset": 366992, - "charLength": 155, - "snippet": { - "text": "}\r\n\r\nAchievement Game::getAchievementByName(std::string name) {\r\n\tauto it = m_achievementsNameToId.find(name);\r\n\tif (it != m_achievementsNameToId.end()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7739729486773163", - "equalIndicator/v1": "24fb44631de37e67b8c6bee144ab47db834065c86f3c1641a1ab79ee001fa1cc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 165, - "startColumn": 7, - "charOffset": 5597, - "charLength": 22, - "snippet": { - "text": "postRemoveNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 163, - "startColumn": 1, - "charOffset": 5436, - "charLength": 382, - "snippet": { - "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r\n\tvoid internalAddThing(std::shared_ptr thing) override final;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a221f73ab5d82f1f", - "equalIndicator/v1": "253e070c0a5894c31d772f8f6e0f6bcf50fe714bb6c17527859bbdde7d297e85" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to 'float'", - "markdown": "Narrowing conversion from 'int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 416, - "startColumn": 29, - "charOffset": 10556, - "charLength": 7, - "snippet": { - "text": "(b - a)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 414, - "startColumn": 1, - "charOffset": 10473, - "charLength": 98, - "snippet": { - "text": "\r\n\tauto &&[a, b] = std::minmax(minNumber, maxNumber);\r\n\treturn a + std::lround(v * (b - a));\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e1dfe65673a5579e", - "equalIndicator/v1": "2540dff56f256e3cec8c765631d9c14b6c634c8d21b3971efefeebf7d6dc732b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 281, - "startColumn": 6, - "charOffset": 10110, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 279, - "startColumn": 1, - "charOffset": 10076, - "charLength": 202, - "snippet": { - "text": "\r\n\tReturnValue returnValue;\r\n\tif (scriptInterface.protectedCall(L, 3, 1) != 0) {\r\n\t\treturnValue = RETURNVALUE_NOTPOSSIBLE;\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c1b17867d38f4552", - "equalIndicator/v1": "2557263c4a65bd7777fdf7eac4af77a55bee5216d81e3fc8c41c789d5bc824e6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 438, - "startColumn": 51, - "charOffset": 11803, - "charLength": 7, - "snippet": { - "text": "oldItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 436, - "startColumn": 1, - "charOffset": 11748, - "charLength": 396, - "snippet": { - "text": "}\r\n\r\nvoid Tile::onUpdateTileItem(std::shared_ptr oldItem, const ItemType &oldType, std::shared_ptr newItem, const ItemType &newType) {\r\n\tif ((newItem->hasProperty(CONST_PROP_MOVABLE) || newItem->getContainer()) || (newItem->isWrapable() && newItem->hasProperty(CONST_PROP_MOVABLE) && !oldItem->hasProperty(CONST_PROP_BLOCKPATH))) {\r\n\t\tauto it = g_game().browseFields.find(getTile());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "da501f91bd8bff64", - "equalIndicator/v1": "256072035a23cb41f8122059c3adc707a1854588d184d56e98a5a8dc7b7324af" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6253, - "startColumn": 58, - "charOffset": 216125, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6251, - "startColumn": 1, - "charOffset": 216063, - "charLength": 251, - "snippet": { - "text": "}\r\n\r\nbool Game::internalCreatureSay(std::shared_ptr creature, SpeakClasses type, const std::string &text, bool ghostMode, Spectators* spectatorsPtr /* = nullptr*/, const Position* pos /* = nullptr*/) {\r\n\tif (text.empty()) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f2a2a786f6ec48d1", - "equalIndicator/v1": "256652c687a8e23d72fc7371e976ab250d49dd59262ec89a5b13e9263de069e3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Result of integer division used in a floating point context; possible loss of precision", - "markdown": "Result of integer division used in a floating point context; possible loss of precision" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iobestiary.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 421, - "startColumn": 3, - "charOffset": 13904, - "charLength": 6, - "snippet": { - "text": "return" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 419, - "startColumn": 1, - "charOffset": 13853, - "charLength": 110, - "snippet": { - "text": "\t\treturn 4;\r\n\t} else if (chanceInPercent < 1) {\r\n\t\treturn 3;\r\n\t} else if (chanceInPercent < 5) {\r\n\t\treturn 2;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e23f62820cc50220", - "equalIndicator/v1": "25670d8221f53bc214cd895a952fb66208989f9c69506b8e09656145e6c384ad" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/lua_functions_loader.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 313, - "startColumn": 94, - "charOffset": 9415, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 311, - "startColumn": 1, - "charOffset": 9317, - "charLength": 166, - "snippet": { - "text": "}\r\n\r\nvoid LuaFunctionsLoader::setItemMetatable(lua_State* L, int32_t index, std::shared_ptr item) {\r\n\tif (validateDispatcherContext(__FUNCTION__)) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ea847b0d07ea53b2", - "equalIndicator/v1": "257a4b69140f365d6f705a1738f172345236296d35e7d93426cb37e3ef630a42" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 645, - "startColumn": 53, - "charOffset": 20382, - "charLength": 6, - "snippet": { - "text": "damage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 643, - "startColumn": 1, - "charOffset": 20180, - "charLength": 357, - "snippet": { - "text": "\t\t\t\t\tconst float augmentPercent = augment->value / 100.0;\r\n\t\t\t\t\tdamage.primary.value += static_cast(damage.primary.value * augmentPercent);\r\n\t\t\t\t\tdamage.secondary.value += static_cast(damage.secondary.value * augmentPercent);\r\n\t\t\t\t} else if (augment->type != Augment_t::Cooldown) {\r\n\t\t\t\t\tconst int32_t augmentValue = augment->value * 100;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6620b1d1f96b3a3f", - "equalIndicator/v1": "258f35c82eab6e5cb8d9f9819a54795fb374908ba4608a9e4d8feb8ba37c8ac6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/management/waitlist.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 90, - "startColumn": 59, - "charOffset": 2596, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 88, - "startColumn": 1, - "charOffset": 2533, - "charLength": 177, - "snippet": { - "text": "}\r\n\r\nvoid WaitingList::addPlayerToList(std::shared_ptr player) {\r\n\tauto it = info->playerReferences.find(player->getGUID());\r\n\tif (it != info->playerReferences.end()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4f66d4a912ba6587", - "equalIndicator/v1": "2597aca85ca7060d201aee39351aa6c2bbd2fce35d648b4c60ab3ff70ea79e62" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/rewards/reward.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 49, - "startColumn": 1, - "charOffset": 1364, - "charLength": 4, - "snippet": { - "text": "void" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 47, - "startColumn": 1, - "charOffset": 1359, - "charLength": 228, - "snippet": { - "text": "}\r\n\r\nvoid Reward::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tstd::shared_ptr localParent = getParent();\r\n\tif (localParent != nullptr) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c968a18a98141463", - "equalIndicator/v1": "259ae1c4d8ecaabdea1f72fe615e05f612bab3dc3dff2a5116ce675f564fbf7f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::_Vector_iterator>>::value_type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'std::_Vector_iterator\\>\\>::value_type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 105, - "startColumn": 32, - "charOffset": 3140, - "charLength": 8, - "snippet": { - "text": "uniqueId" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 103, - "startColumn": 1, - "charOffset": 3059, - "charLength": 150, - "snippet": { - "text": "\r\n\tfor (const auto &uniqueId : uniqueIdVector) {\r\n\t\tif (registerEvent(moveEvent, uniqueId, uniqueIdMap)) {\r\n\t\t\ttmpVector.emplace_back(uniqueId);\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "75bdb316db2747da", - "equalIndicator/v1": "25b3332b17eed292cf325168ea9d5749e009ac5dfd714310e585834f68370b9b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'destination' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'destination' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/bank/bank.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 83, - "startColumn": 51, - "charOffset": 1949, - "charLength": 11, - "snippet": { - "text": "destination" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 81, - "startColumn": 1, - "charOffset": 1893, - "charLength": 175, - "snippet": { - "text": "};\r\n\r\nbool Bank::transferTo(const std::shared_ptr destination, uint64_t amount) {\r\n\tif (!destination) {\r\n\t\tg_logger().error(\"Bank::transferTo: destination is nullptr\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "79457339d77c6bf6", - "equalIndicator/v1": "25dd8d4b18a875834b11c0cfafe064e2c299201c9f7f790cdaeb6f5fdd168509" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1084, - "startColumn": 83, - "charOffset": 35438, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1082, - "startColumn": 1, - "charOffset": 35351, - "charLength": 230, - "snippet": { - "text": "}\r\n\r\nbool Combat::doCombat(std::shared_ptr caster, std::shared_ptr target, const Position &origin, int affected /* = 1 */) const {\r\n\t// target combat callback function\r\n\tif (params.combatType != COMBAT_NONE) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f34a7f68ba4d508c", - "equalIndicator/v1": "262d82a7e60dab8ea2c94c1e0f7a9f8afef6b4d33d0d79815b754c7331ef677f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/npcs/npc.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 207, - "startColumn": 23, - "charOffset": 6466, - "charLength": 8, - "snippet": { - "text": "interval" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 205, - "startColumn": 1, - "charOffset": 6320, - "charLength": 163, - "snippet": { - "text": "\tif (callback.startScriptInterface(npcType->info.thinkEvent)) {\r\n\t\tcallback.pushSpecificCreature(static_self_cast());\r\n\t\tcallback.pushNumber(interval);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e9385139f202934b", - "equalIndicator/v1": "262f2a819635cb6393c90f3f60a4beb0ae683d36333f0e3d8877f91a664c3f52" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'name' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'name' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/player_wheel.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 325, - "startColumn": 19, - "charOffset": 12128, - "charLength": 17, - "snippet": { - "text": "const std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 323, - "startColumn": 1, - "charOffset": 12002, - "charLength": 270, - "snippet": { - "text": "\tbool getInstant(WheelInstant_t type) const;\r\n\tbool getHealingLinkUpgrade(const std::string &spell) const;\r\n\tuint8_t getStage(const std::string name) const;\r\n\tuint8_t getStage(WheelStage_t type) const;\r\n\tWheelSpellGrade_t getSpellUpgrade(const std::string &name) const;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8a0486c2ed307a3b", - "equalIndicator/v1": "269750ad278e3d2a0115778f562784362e1e068969b211fe8273830cb6b10a79" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 707, - "startColumn": 7, - "charOffset": 27247, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 705, - "startColumn": 1, - "charOffset": 27064, - "charLength": 332, - "snippet": { - "text": "\r\nbool EventCallback::playerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeAccept - \"\r\n\t\t \"Player {} target {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a2aa26a20e1d2cb3", - "equalIndicator/v1": "26f394706871d6be6fefa59aaa1c21e4faa1806258838736b661d51238e59ccb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Redundant string initialization", - "markdown": "Redundant string initialization" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8473, - "startColumn": 17, - "charOffset": 295048, - "charLength": 12, - "snippet": { - "text": "loyaltyTitle" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8471, - "startColumn": 1, - "charOffset": 294878, - "charLength": 507, - "snippet": { - "text": "\t\t\t\tconst auto &voc = g_vocations().getVocation(result->getNumber(\"vocation\"));\r\n\t\t\t\tuint8_t characterVocation = voc ? voc->getClientId() : 0;\r\n\t\t\t\tstd::string loyaltyTitle = \"\"; // todo get loyalty title from player\r\n\t\t\t\tcharacters.emplace_back(std::move(result->getString(\"name\")), result->getNumber(\"points\"), result->getNumber(\"id\"), result->getNumber(\"rank\"), result->getNumber(\"level\"), characterVocation, loyaltyTitle);\r\n\t\t\t} while (result->next());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a6a0028b1ec49817", - "equalIndicator/v1": "272c5b0c8be3d8ebf75706582bacbbaa690899ed0ae8318d98285261e1b67e53" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/grouping/party.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 690, - "startColumn": 54, - "charOffset": 21399, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 688, - "startColumn": 1, - "charOffset": 21341, - "charLength": 135, - "snippet": { - "text": "}\r\n\r\nvoid Party::updatePlayerMana(std::shared_ptr player, uint8_t manaPercent) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fe8f2323704027b5", - "equalIndicator/v1": "273a6f2995ed7cfc4b56cea28e3d88829acdb48ade79facd62f0ae53ee8f064e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2087, - "startColumn": 22, - "charOffset": 80417, - "charLength": 1, - "snippet": { - "text": "m" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2085, - "startColumn": 1, - "charOffset": 80389, - "charLength": 88, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tint32_t newCount = m - n;\r\n\t\tif (newCount > 0) {\r\n\t\t\tmoveItem = item->clone();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5d5b10a8b57f800f", - "equalIndicator/v1": "27440b3dd627f18779d6c438ba414896e7161268b7fed28129aa18ea638343c4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7506, - "startColumn": 28, - "charOffset": 261421, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7504, - "startColumn": 1, - "charOffset": 261356, - "charLength": 191, - "snippet": { - "text": "\r\nvoid Game::buildMessageAsAttacker(\r\n\tstd::shared_ptr target, const CombatDamage &damage, TextMessage &message,\r\n\tstd::stringstream &ss, const std::string &damageString\r\n) const {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "27be09c19c82b87d", - "equalIndicator/v1": "274679c47f7facd87a0e33a465b63c7e33d433d39fb47db5bda916a46d478bd8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 501, - "startColumn": 54, - "charOffset": 15541, - "charLength": 1, - "snippet": { - "text": "," - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 499, - "startColumn": 1, - "charOffset": 15435, - "charLength": 187, - "snippet": { - "text": "\tvirtual void onFollowCreatureDisappear(bool) { }\r\n\r\n\tvirtual void onCreatureSay(std::shared_ptr, SpeakClasses, const std::string &) { }\r\n\r\n\tvirtual void onPlacedCreature() { }\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2cadd361b605b56f", - "equalIndicator/v1": "275cd2af332eb154af4551ca1cf9c52d2da58045556c3396260c854d279daf48" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6726, - "startColumn": 91, - "charOffset": 198268, - "charLength": 8, - "snippet": { - "text": "duration" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6724, - "startColumn": 1, - "charOffset": 197924, - "charLength": 472, - "snippet": { - "text": "\tif (getZoneType() != ZONE_PROTECTION && checkLastAggressiveActionWithin(2000) && ((OTSYS_TIME() / 1000) % 2) == 0 && chance > 0 && randomChance < chance) {\r\n\t\tint64_t duration = g_configManager().getNumber(TRANSCENDANCE_AVATAR_DURATION, __FUNCTION__);\r\n\t\tauto outfitCondition = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_OUTFIT, duration, 0)->static_self_cast();\r\n\t\tOutfit_t outfit;\r\n\t\toutfit.lookType = getVocation()->getAvatarLookType();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3ef56c3b965ba8f3", - "equalIndicator/v1": "27621f6b8a0d0194e29ace5e4242806a7f87edb5c7aa10f07d85fc9dbabc3a69" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7522, - "startColumn": 28, - "charOffset": 261948, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7520, - "startColumn": 1, - "charOffset": 261894, - "charLength": 179, - "snippet": { - "text": "\r\nvoid Game::sendEffects(\r\n\tstd::shared_ptr target, const CombatDamage &damage, const Position &targetPos, TextMessage &message,\r\n\tconst CreatureVector &spectators\r\n) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1e6ef13b30d1254b", - "equalIndicator/v1": "2776cd7803683a194b2eeae119f347befa2302603c50f09029c52bb8d01d8dec" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 454, - "startColumn": 26, - "charOffset": 24101, - "charLength": 31, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 452, - "startColumn": 1, - "charOffset": 23926, - "charLength": 345, - "snippet": { - "text": "\tvoid internalCreatureChangeVisible(std::shared_ptr creature, bool visible);\r\n\tvoid changeLight(const std::shared_ptr creature);\r\n\tvoid updateCreatureIcon(const std::shared_ptr creature);\r\n\tvoid reloadCreature(const std::shared_ptr creature);\r\n\tvoid updateCreatureSkull(std::shared_ptr player);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d2483b4ecaf91f85", - "equalIndicator/v1": "27b3555e99e6252baada8c12a8e20a5b3e2283f685e38fdb45440f08fd425beb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/imbuements/imbuements.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 126, - "startColumn": 4, - "charOffset": 4150, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 124, - "startColumn": 1, - "charOffset": 4139, - "charLength": 157, - "snippet": { - "text": "\t\t\t}\r\n\r\n\t\t\tuint16_t category = pugi::cast(categorybase.value());\r\n\t\t\tauto category_p = getCategoryByID(category);\r\n\t\t\tif (category_p == nullptr) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "eb0c613821ef2386", - "equalIndicator/v1": "27b38204122a2ce960f619e69d0f6a8233db8461a0584816f028e9b1aad45b04" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6883, - "startColumn": 28, - "charOffset": 238609, - "charLength": 91, - "snippet": { - "text": "(damage.primary.value * attackerPlayer->wheel()->checkBlessingGroveHealingByTarget(target))" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6881, - "startColumn": 1, - "charOffset": 238509, - "charLength": 209, - "snippet": { - "text": "\r\n\t\tif (attackerPlayer->wheel()->getInstant(\"Blessing of the Grove\")) {\r\n\t\t\tdamage.primary.value += (damage.primary.value * attackerPlayer->wheel()->checkBlessingGroveHealingByTarget(target)) / 100.;\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d4e7bb8d5e8d067d", - "equalIndicator/v1": "27b3c20259f7ee66db237fdaaf5546ab901fd40afdfe488b3fbacc95b6716f2d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1323, - "startColumn": 27, - "charOffset": 46942, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1321, - "startColumn": 1, - "charOffset": 46910, - "charLength": 128, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.monsterOnDropLoot, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "41e283729587845a", - "equalIndicator/v1": "27d3e25a045ca3c2538be6def47832030a7817182a6c1b31ddfdfb9419ab738d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructor does not initialize these fields: type", - "markdown": "Constructor does not initialize these fields: type" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iobestiary.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 19, - "startColumn": 7, - "charOffset": 564, - "charLength": 5, - "snippet": { - "text": "Charm" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 17, - "startColumn": 1, - "charOffset": 543, - "charLength": 59, - "snippet": { - "text": "class Game;\r\n\r\nclass Charm {\r\npublic:\r\n\tCharm() = default;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "12c3d66f9473ce1d", - "equalIndicator/v1": "27edb2249eefdeae6f4288c082b0d2039e74162f06e932da4e0b4c8f80006a0d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first.", - "markdown": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 735, - "startColumn": 12, - "charOffset": 23778, - "charLength": 2, - "snippet": { - "text": "it" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 733, - "startColumn": 1, - "charOffset": 23751, - "charLength": 47, - "snippet": { - "text": "\t\t}\r\n\t} else {\r\n\t\tchance = it.hitChance;\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "423ec0b3c8eb3c6d", - "equalIndicator/v1": "2823338925935ff8dbdfc0df47df06e399ff8fe4b20904a1b82af7d57ddd8831" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'virtual' is redundant since the function is already declared 'override'", - "markdown": "'virtual' is redundant since the function is already declared 'override'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/cylinder.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 192, - "startColumn": 15, - "charOffset": 7715, - "charLength": 8, - "snippet": { - "text": "addThing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 190, - "startColumn": 1, - "charOffset": 7695, - "charLength": 220, - "snippet": { - "text": "\t}\r\n\r\n\tvirtual void addThing(std::shared_ptr) override { }\r\n\tvirtual void addThing(int32_t, std::shared_ptr) override { }\r\n\tvirtual void updateThing(std::shared_ptr, uint16_t, uint32_t) override { }\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "56ca6e6ff50602af", - "equalIndicator/v1": "2828fe5e99fc8c2f21a3c2ce1fc54e4728430970035254025a1da3ec68baf8eb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", - "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/value_wrapper_proto.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 110, - "startColumn": 9, - "charOffset": 3793, - "charLength": 12, - "snippet": { - "text": "ValueWrapper" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 108, - "startColumn": 1, - "charOffset": 3770, - "charLength": 58, - "snippet": { - "text": "\t\t\tbreak;\r\n\t}\r\n\treturn ValueWrapper(data, timestamp);\r\n}\r\n" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8f9fc373df583e72", - "equalIndicator/v1": "283bf45a2fdcbd350dc43d1f0477af4f02567459e44e30041814eafa5bf6a266" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/game_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 206, - "startColumn": 43, - "charOffset": 6565, - "charLength": 9, - "snippet": { - "text": "lua_State" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 204, - "startColumn": 1, - "charOffset": 6518, - "charLength": 142, - "snippet": { - "text": "}\r\n\r\nint GameFunctions::luaGameGetMonsterCount(lua_State* L) {\r\n\t// Game.getMonsterCount()\r\n\tlua_pushnumber(L, g_game().getMonstersOnline());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0e8d47f46675542b", - "equalIndicator/v1": "285e9a2c5cec1e5e4c162fad37e9302232c6102e2c8addde32b79a4daeea8721" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monsters.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 299, - "startColumn": 6, - "charOffset": 10252, - "charLength": 80, - "snippet": { - "text": "// We will only return the MonsterType if it match the exact name of the monster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 297, - "startColumn": 1, - "charOffset": 10174, - "charLength": 241, - "snippet": { - "text": "\tif (auto it = monsters.find(lowerCaseName);\r\n\t it != monsters.end()\r\n\t // We will only return the MonsterType if it match the exact name of the monster\r\n\t && it->first.find(lowerCaseName) != it->first.npos) {\r\n\t\treturn it->second;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a016dae5ac3f77c1", - "equalIndicator/v1": "286209001eca15b4dc4b5cf21386fbf04b6dae3bc8e295c3e7544e8764c1b842" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8998, - "startColumn": 15, - "charOffset": 314566, - "charLength": 2, - "snippet": { - "text": "it" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8996, - "startColumn": 1, - "charOffset": 314504, - "charLength": 106, - "snippet": { - "text": "\t\t\tint32_t subType;\r\n\t\t\tif (it.charges != 0) {\r\n\t\t\t\tsubType = it.charges;\r\n\t\t\t} else {\r\n\t\t\t\tsubType = -1;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "624e044ee240cb18", - "equalIndicator/v1": "286225f936f4ce73d25aaf4df1b383b7343e29db102fee6b9e7eff659bb374b6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'unsigned long long'", - "markdown": "Narrowing conversion from 'float' to 'unsigned long long'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/scheduling/dispatcher.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 190, - "startColumn": 3, - "charOffset": 5444, - "charLength": 6, - "snippet": { - "text": "return" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 188, - "startColumn": 1, - "charOffset": 5435, - "charLength": 28, - "snippet": { - "text": "\t\t}\r\n\r\n\t\treturn list;\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "12db9b05e8de7764", - "equalIndicator/v1": "286502dd89459eea88574cd29a7ca2b1f5a92c35ccdba2764e5f7cb7e1414e0b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'newParty' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'newParty' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5697, - "startColumn": 56, - "charOffset": 168363, - "charLength": 8, - "snippet": { - "text": "newParty" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5695, - "startColumn": 1, - "charOffset": 168303, - "charLength": 190, - "snippet": { - "text": "}\r\n\r\nbool Player::addPartyInvitation(std::shared_ptr newParty) {\r\n\tauto it = std::find(invitePartyList.begin(), invitePartyList.end(), newParty);\r\n\tif (it != invitePartyList.end()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "02f08b537ef3aa81", - "equalIndicator/v1": "287e59bd86896e48c17d647839ea5ecacd020cb9a104057a312fc9897af0c648" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Qualified name 'Item::readAttr' refers to a member overridden in subclass; did you mean 'Container'?", - "markdown": "Qualified name 'Item::readAttr' refers to a member overridden in subclass; did you mean 'Container'?" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/depot/depotlocker.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 24, - "startColumn": 9, - "charOffset": 788, - "charLength": 14, - "snippet": { - "text": "Item::readAttr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 22, - "startColumn": 1, - "charOffset": 746, - "charLength": 81, - "snippet": { - "text": "\t\treturn ATTR_READ_CONTINUE;\r\n\t}\r\n\treturn Item::readAttr(attr, propStream);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bf9e89c796e03a71", - "equalIndicator/v1": "28e17c27594ddc9233a9527e5596de1d91348b374d65df0b21137c00f8a0dc55" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/grouping/party.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 741, - "startColumn": 51, - "charOffset": 23357, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 739, - "startColumn": 1, - "charOffset": 23302, - "charLength": 139, - "snippet": { - "text": "}\r\n\r\nvoid Party::addPlayerLoot(std::shared_ptr player, std::shared_ptr item) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bd3c2210d715b3f2", - "equalIndicator/v1": "28f272517721f59482201afa0b0a64b6b38cca96f0f6c48408e96013bdc69840" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Replace loop by 'std::ranges::any_of()'", - "markdown": "Replace loop by 'std::ranges::any_of()'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1160, - "startColumn": 2, - "charOffset": 35027, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1158, - "startColumn": 1, - "charOffset": 34954, - "charLength": 228, - "snippet": { - "text": "\tstd::shuffle(dirList.begin(), dirList.end(), getRandomGenerator());\r\n\r\n\tfor (Direction dir : dirList) {\r\n\t\tconst Position &tryPos = Spells::getCasterPosition(creature, dir);\r\n\t\tconst auto toTile = g_game().map.getTile(tryPos);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "67e5f16ea5930ca1", - "equalIndicator/v1": "28fb25ef35e6b6f2b5268199bd99ba15bae5b3bc008d57dde3a4c764d7dbd93a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/map/tile_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 565, - "startColumn": 3, - "charOffset": 13246, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 563, - "startColumn": 1, - "charOffset": 13180, - "charLength": 182, - "snippet": { - "text": "\tstd::shared_ptr thing = getThing(L, 2);\r\n\tif (thing) {\r\n\t\tuint32_t flags = getNumber(L, 3, 0);\r\n\t\tlua_pushnumber(L, tile->queryAdd(0, thing, 1, flags));\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "52183bd3d39ac243", - "equalIndicator/v1": "291bc8165c06d7da7589f67c8cfb00aff077dd55fb426efe742aeaf056a5ad60" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'sep' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'sep' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/talkaction.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 51, - "startColumn": 15, - "charOffset": 1311, - "charLength": 3, - "snippet": { - "text": "sep" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 49, - "startColumn": 1, - "charOffset": 1254, - "charLength": 68, - "snippet": { - "text": "\t}\r\n\tvoid setSeparator(std::string sep) {\r\n\t\tseparator = sep;\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "71e085cd43da236a", - "equalIndicator/v1": "29259d16cc263d3aba99401a30f860e13a74bd623ab6184e2f2569d8fe848fd5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 10269, - "startColumn": 54, - "charOffset": 357047, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 10267, - "startColumn": 1, - "charOffset": 356989, - "charLength": 179, - "snippet": { - "text": "}\r\n\r\nbool Game::addItemStoreInbox(std::shared_ptr player, uint32_t itemId) {\r\n\tstd::shared_ptr decoKit = Item::CreateItem(ITEM_DECORATION_KIT, 1);\r\n\tif (!decoKit) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "832e62204c238652", - "equalIndicator/v1": "29511d753d8ebd2d695830341f64c6a4402f2dce56e524b9c6b9eff5a37781c5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to 'float'", - "markdown": "Narrowing conversion from 'int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/global_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 140, - "startColumn": 75, - "charOffset": 4407, - "charLength": 2, - "snippet": { - "text": "it" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 138, - "startColumn": 1, - "charOffset": 4285, - "charLength": 145, - "snippet": { - "text": "\tif (it.hasSubType()) {\r\n\t\tif (it.stackable) {\r\n\t\t\titemCount = static_cast(std::ceil(static_cast(count) / it.stackSize));\r\n\t\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ed09e21d8ba953c2", - "equalIndicator/v1": "29654af01d2b0301004bc979e9eeadfb1ded3726f8b1edf129af25d6ace53a6e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1208, - "startColumn": 27, - "charOffset": 43117, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1206, - "startColumn": 1, - "charOffset": 43085, - "charLength": 134, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnRequestQuestLog, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "330357aac5eb3ceb", - "equalIndicator/v1": "29a090c25814c2f07bae2ed59fc1ad746c5caa97e033ca5494d478ce30a95d41" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use range-based for loop instead", - "markdown": "Use range-based for loop instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1372, - "startColumn": 3, - "charOffset": 39974, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1370, - "startColumn": 1, - "charOffset": 39912, - "charLength": 173, - "snippet": { - "text": "\r\n\tif (const CreatureVector* creatures = getCreatures()) {\r\n\t\tfor (auto it = creatures->rbegin(); it != creatures->rend(); ++it) {\r\n\t\t\tif (*it == creature) {\r\n\t\t\t\treturn n;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "973dfd0537f61d0b", - "equalIndicator/v1": "29a9e0edfac93f09626bb87ef3883524cf924f58afa3c0fc7c48e59afec13719" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 66, - "startColumn": 8, - "charOffset": 1773, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 64, - "startColumn": 1, - "charOffset": 1665, - "charLength": 231, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeIsFluidContainer(lua_State* L) {\r\n\t// itemType:isFluidContainer()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isFluidContainer());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d122d1fda38fbb34", - "equalIndicator/v1": "29d7939266029e5555040c32ea29b0af35178d73ae5301f682eea9d08c49b3b1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 897, - "startColumn": 19, - "charOffset": 27084, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 895, - "startColumn": 1, - "charOffset": 27002, - "charLength": 107, - "snippet": { - "text": "\titem->setParent(getContainer());\r\n\titemlist.push_front(item);\r\n\tupdateItemWeight(item->getWeight());\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "eddd52c2bdd4c52e", - "equalIndicator/v1": "29fcd513f23e8c9a076324e31921a2fc6972f803d7d1943c20cd481973091b98" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6429, - "startColumn": 50, - "charOffset": 222034, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6427, - "startColumn": 1, - "charOffset": 221980, - "charLength": 178, - "snippet": { - "text": "}\r\n\r\nvoid Game::changeLight(std::shared_ptr creature) {\r\n\t// Send to clients\r\n\tfor (const auto &spectator : Spectators().find(creature->getPosition(), true)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3d17603c0a08bece", - "equalIndicator/v1": "29fdf714f2317ede41072a4d404ac711d70c5ba6a49d887da2b47db4a5ed81a2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 268, - "startColumn": 45, - "charOffset": 9934, - "charLength": 5, - "snippet": { - "text": "party" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 266, - "startColumn": 1, - "charOffset": 9835, - "charLength": 161, - "snippet": { - "text": "\tgetScriptInterface()->pushFunction(getScriptId());\r\n\r\n\tLuaScriptInterface::pushUserdata(L, party);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Party\");\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b0bb047a13c69f8b", - "equalIndicator/v1": "2a733927013da26a991ecfee4bf605279892344db29a2d8fe64050d1a2874d1c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 170, - "startColumn": 60, - "charOffset": 4040, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 168, - "startColumn": 1, - "charOffset": 3976, - "charLength": 131, - "snippet": { - "text": "}\r\n\r\nbool Condition::executeCondition(std::shared_ptr creature, int32_t interval) {\r\n\tif (ticks == -1) {\r\n\t\treturn true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3a5b7a4682bc0533", - "equalIndicator/v1": "2a7b904d6cf46b78835bf38f9ab07495b38e7d8d1dc69fd751139a079628a714" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6945, - "startColumn": 57, - "charOffset": 241364, - "charLength": 8, - "snippet": { - "text": "attacker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6943, - "startColumn": 1, - "charOffset": 241303, - "charLength": 231, - "snippet": { - "text": "}\r\n\r\nbool Game::combatChangeHealth(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage, bool isEvent /*= false*/) {\r\n\tusing namespace std;\r\n\tconst Position &targetPos = target->getPosition();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3fcdd55d15be53fa", - "equalIndicator/v1": "2aafa068ceb73f6bd60dad7a1b7584454d3202e391e887b7be3f10145070435d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'virtual' is redundant since the function is already declared 'override'", - "markdown": "'virtual' is redundant since the function is already declared 'override'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/cylinder.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 182, - "startColumn": 22, - "charOffset": 7222, - "charLength": 13, - "snippet": { - "text": "queryMaxCount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 180, - "startColumn": 1, - "charOffset": 7162, - "charLength": 197, - "snippet": { - "text": "\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r\n\tvirtual ReturnValue queryMaxCount(int32_t, const std::shared_ptr &, uint32_t, uint32_t &, uint32_t) override {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cd24754635429e96", - "equalIndicator/v1": "2ae250fc4fe1ead707d65201528e7dd094a231fcfe3f5dddf3cf12670bcffbc8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 440, - "startColumn": 9, - "charOffset": 12213, - "charLength": 26, - "snippet": { - "text": "(defenseSkill / 4. + 2.23)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 438, - "startColumn": 1, - "charOffset": 12199, - "charLength": 120, - "snippet": { - "text": "\t}\r\n\r\n\treturn (defenseSkill / 4. + 2.23) * defenseValue * 0.15 * getDefenseFactor() * vocation->defenseMultiplier;\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ef05246437d4b792", - "equalIndicator/v1": "2ae78c6634ca30b0faacdc2170f8957e78aa8bd96f98c5f5e44b1e6da0655258" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/player_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3010, - "startColumn": 29, - "charOffset": 80369, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3008, - "startColumn": 1, - "charOffset": 80289, - "charLength": 181, - "snippet": { - "text": "\r\n\tstd::shared_ptr tile = player->getTile();\r\n\tconst Position &position = player->getPosition();\r\n\r\n\tfor (const auto &spectator : Spectators().find(position, true)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "022ca6acc643a135", - "equalIndicator/v1": "2b1d293178e22dd7b85859a21e6b8aecc1dfe6560eb39fdad3b8239df9ba553e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Return type 'const Outfit_t' is 'const'-qualified at the top level, which may reduce code readability without improving const correctness", - "markdown": "Return type 'const Outfit_t' is 'const'-qualified at the top level, which may reduce code readability without improving const correctness" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 275, - "startColumn": 2, - "charOffset": 6794, - "charLength": 14, - "snippet": { - "text": "const Outfit_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 273, - "startColumn": 1, - "charOffset": 6769, - "charLength": 96, - "snippet": { - "text": "\tvoid iconChanged();\r\n\r\n\tconst Outfit_t getCurrentOutfit() const {\r\n\t\treturn currentOutfit;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ab321d1afefe6f40", - "equalIndicator/v1": "2b356d37e9800c50965d644d4792ad2518db1005293087754e869253ff010528" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/ioprey.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 394, - "startColumn": 61, - "charOffset": 13858, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 392, - "startColumn": 1, - "charOffset": 13793, - "charLength": 275, - "snippet": { - "text": "}\r\n\r\nvoid IOPrey::parseTaskHuntingAction(std::shared_ptr player, PreySlot_t slotId, PreyTaskAction_t action, bool upgrade, uint16_t raceId) const {\r\n\tconst auto &slot = player->getTaskHuntingSlotById(slotId);\r\n\tif (!slot || slot->state == PreyTaskDataState_Locked) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b5c94e940c876d1a", - "equalIndicator/v1": "2b3b0c2e248e2e310daddf22ff4c4255fd6857dbfb4750a23d1d62de97b462fb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 955, - "startColumn": 126, - "charOffset": 34511, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 953, - "startColumn": 1, - "charOffset": 34381, - "charLength": 220, - "snippet": { - "text": "}\r\n\r\nbool Events::eventPlayerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) {\r\n\t// Player:onTradeRequest(target, item)\r\n\tif (info.playerOnTradeRequest == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ec25cdbf7bc3a3f7", - "equalIndicator/v1": "2b4971f48cc273d5bc04cc2ce31e6420715e4725958c794739ccbf9b8bba56d7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1912, - "startColumn": 2, - "charOffset": 58137, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1910, - "startColumn": 1, - "charOffset": 58079, - "charLength": 216, - "snippet": { - "text": "\r\nvoid ProtocolGame::parseFollow(NetworkMessage &msg) {\r\n\tuint32_t creatureId = msg.get();\r\n\t// msg.get(); creatureId (same as above)\r\n\tg_game().playerFollowCreature(player->getID(), creatureId);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bfb342996dd95560", - "equalIndicator/v1": "2b4d6e76ede29447092f36768a6c519b3d98961ed545b8b27962cd396c610525" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/guild_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 61, - "startColumn": 31, - "charOffset": 1597, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 59, - "startColumn": 1, - "charOffset": 1548, - "charLength": 139, - "snippet": { - "text": "\r\n\tint index = 0;\r\n\tfor (std::shared_ptr player : members) {\r\n\t\tpushUserdata(L, player);\r\n\t\tsetMetatable(L, -1, \"Player\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "632ec081d46e80eb", - "equalIndicator/v1": "2b623f5e4b0b14e7ec9b3f336a2e8e37f37c8c162555ce8d8af213cb544d614b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/container_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 233, - "startColumn": 2, - "charOffset": 6463, - "charLength": 7, - "snippet": { - "text": "int32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 231, - "startColumn": 1, - "charOffset": 6456, - "charLength": 134, - "snippet": { - "text": "\t}\r\n\r\n\tint32_t subType = getNumber(L, 3, -1);\r\n\tlua_pushnumber(L, container->getItemTypeCount(itemId, subType));\r\n\treturn 1;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bfd2ae08fec24839", - "equalIndicator/v1": "2b94a9427c08a5526126de39d726205b3681c6bf09df255f53f03c2671cc5a21" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2389, - "startColumn": 57, - "charOffset": 70628, - "charLength": 6, - "snippet": { - "text": "rawExp" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2387, - "startColumn": 1, - "charOffset": 70494, - "charLength": 227, - "snippet": { - "text": "\t\tg_metrics().addCounter(\"player_experience_actual\", exp, attrs);\r\n\t} else {\r\n\t\tg_metrics().addCounter(\"player_experience_bonus_raw\", rawExp, attrs);\r\n\t\tg_metrics().addCounter(\"player_experience_bonus_actual\", exp, attrs);\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "828e82e63b8894f0", - "equalIndicator/v1": "2b9afbb2c267e03ae569cee2d7d3ae91fe54824fc95f00ec58ec425ed0279474" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Redundant string initialization", - "markdown": "Redundant string initialization" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2314, - "startColumn": 14, - "charOffset": 66592, - "charLength": 4, - "snippet": { - "text": "text" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2312, - "startColumn": 1, - "charOffset": 66403, - "charLength": 226, - "snippet": { - "text": "\r\nstd::string Item::getDescription(const ItemType &it, int32_t lookDistance, std::shared_ptr item /*= nullptr*/, int32_t subType /*= -1*/, bool addArticle /*= true*/) {\r\n\tstd::string text = \"\";\r\n\r\n\tstd::ostringstream s;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "18f82c9fd9504e92", - "equalIndicator/v1": "2bbc100a6b884d11b3401146b319b8fecd13249a2760b4f10a56b949854683cd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Passing result of std::move() as a const reference argument; no move will actually happen", - "markdown": "Passing result of std::move() as a const reference argument; no move will actually happen" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3791, - "startColumn": 34, - "charOffset": 113566, - "charLength": 9, - "snippet": { - "text": "std::move" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3789, - "startColumn": 1, - "charOffset": 113482, - "charLength": 169, - "snippet": { - "text": "\t\t\tcount += itemCount;\r\n\t\t\tif (count >= amount) {\r\n\t\t\t\tg_game().internalRemoveItems(std::move(itemList), amount, Item::items[itemId].stackable);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cf885bd080a84ce0", - "equalIndicator/v1": "2be895c2aa8829cc2e974caedea756921b7fc767ebf866aa5118e290ec8f75ea" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/management/ban.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 61, - "startColumn": 2, - "charOffset": 1803, - "charLength": 7, - "snippet": { - "text": "int64_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 59, - "startColumn": 1, - "charOffset": 1796, - "charLength": 170, - "snippet": { - "text": "\t}\r\n\r\n\tint64_t expiresAt = result->getNumber(\"expires_at\");\r\n\tif (expiresAt != 0 && time(nullptr) > expiresAt) {\r\n\t\t// Move the ban to history if it has expired\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "211a56ceaae55117", - "equalIndicator/v1": "2beb90151916aaaef4f8e80352a1fd9bb9cadaf6cddc42e208b20946f2855577" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1719, - "startColumn": 2, - "charOffset": 51519, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1717, - "startColumn": 1, - "charOffset": 51426, - "charLength": 201, - "snippet": { - "text": "void ProtocolGame::parseUseItem(NetworkMessage &msg) {\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tuint8_t index = msg.getByte();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ec8db8e2a4b29217", - "equalIndicator/v1": "2bed0b78780cb9638c3d88b02c4497187758a979c3b1acb60c1ef0e248df94d5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1220, - "startColumn": 31, - "charOffset": 35923, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1218, - "startColumn": 1, - "charOffset": 35812, - "charLength": 131, - "snippet": { - "text": "\tvoid sendCreatureShield(std::shared_ptr creature) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureShield(creature);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3191de1f2a11a81e", - "equalIndicator/v1": "2c00eab67dd8e4df372c66576bb9991b6a9398b46bd2c548ab1b192e1cbf6170" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 144, - "startColumn": 28, - "charOffset": 4352, - "charLength": 16, - "snippet": { - "text": "queryDestination" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 142, - "startColumn": 1, - "charOffset": 4018, - "charLength": 534, - "snippet": { - "text": "\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override final;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override final;\r\n\r\n\tvoid addThing(std::shared_ptr thing) override final;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5bb15842f42256d5", - "equalIndicator/v1": "2c1697e99e300c551398cefd27141df74335c8f09d56efe235c9330c23b07cf3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 877, - "startColumn": 27, - "charOffset": 31843, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 875, - "startColumn": 1, - "charOffset": 31811, - "charLength": 138, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnReportRuleViolation, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b082a7a5d65e9d83", - "equalIndicator/v1": "2c46a4ed5c9b064c0f7ebf016810809186cf107c35058f1ac12bfd3d7430e953" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'actor' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'actor' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6474, - "startColumn": 148, - "charOffset": 223503, - "charLength": 5, - "snippet": { - "text": "actor" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6472, - "startColumn": 1, - "charOffset": 223351, - "charLength": 287, - "snippet": { - "text": "}\r\n\r\nvoid Game::sendDoubleSoundEffect(const Position &pos, SoundEffect_t mainSoundEffect, SoundEffect_t secondarySoundEffect, std::shared_ptr actor /* = nullptr*/) {\r\n\tif (secondarySoundEffect == SoundEffect_t::SILENCE) {\r\n\t\tsendSingleSoundEffect(pos, mainSoundEffect, actor);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4f085532007af75b", - "equalIndicator/v1": "2c4c53d5593f933f481b9a5a34dde9e8958fdcdea5d90a4f8b41c5abfc84e03d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/creature_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 887, - "startColumn": 21, - "charOffset": 24708, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 885, - "startColumn": 1, - "charOffset": 24682, - "charLength": 77, - "snippet": { - "text": "\t}\r\n\r\n\tlua_createtable(L, creature->getSummonCount(), 0);\r\n\r\n\tint index = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8f2b8ab940ab02b9", - "equalIndicator/v1": "2c4d3eeb9dd7c947f0eced1229a3234191661c019f291d89fb6a9b842d4f1edb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", - "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/movement/position.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 94, - "startColumn": 10, - "charOffset": 3121, - "charLength": 8, - "snippet": { - "text": "Position" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 92, - "startColumn": 1, - "charOffset": 3061, - "charLength": 106, - "snippet": { - "text": "\r\n\tPosition operator-(const Position &p1) const {\r\n\t\treturn Position(x - p1.x, y - p1.y, z - p1.z);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "03763ca0d07c7af6", - "equalIndicator/v1": "2c5c5dd78d6ede7657a99f3a9e6fe9aefb17921a5915985f2e8f81e2ef82a067" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5692, - "startColumn": 59, - "charOffset": 168223, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5690, - "startColumn": 1, - "charOffset": 168160, - "charLength": 142, - "snippet": { - "text": "}\r\n\r\nvoid Player::sendPlayerPartyIcons(std::shared_ptr player) {\r\n\tsendPartyCreatureShield(player);\r\n\tsendPartyCreatureSkull(player);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a2042ea58fee600a", - "equalIndicator/v1": "2c8fd558e70a369bf88c8224eb7e868f20e6815390221e1776a10002a6ab0d26" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", - "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/database/database.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 229, - "startColumn": 10, - "charOffset": 6576, - "charLength": 11, - "snippet": { - "text": "std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 227, - "startColumn": 1, - "charOffset": 6527, - "charLength": 107, - "snippet": { - "text": "\t}\r\n\tif (row[it->second] == nullptr) {\r\n\t\treturn std::string();\r\n\t}\r\n\treturn std::string(row[it->second]);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fd67b1352325e7fd", - "equalIndicator/v1": "2ca54248d6283e17fa3fc74e807393f06e63b65618278c1aa06398c4c398604d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 247, - "startColumn": 89, - "charOffset": 7522, - "charLength": 4, - "snippet": { - "text": "tile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 245, - "startColumn": 1, - "charOffset": 7429, - "charLength": 210, - "snippet": { - "text": "}\r\n\r\nReturnValue Combat::canDoCombat(std::shared_ptr caster, std::shared_ptr tile, bool aggressive) {\r\n\tif (tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) {\r\n\t\treturn RETURNVALUE_NOTENOUGHROOM;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e868eec7783a1aed", - "equalIndicator/v1": "2ce797960eecb5af127db0bcd2ba61518da0c05950907ff0a7ecf3cc537658ff" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 210, - "startColumn": 68, - "charOffset": 5766, - "charLength": 6, - "snippet": { - "text": "action" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 208, - "startColumn": 1, - "charOffset": 5693, - "charLength": 135, - "snippet": { - "text": "\t}\r\n\r\n\tvoid setActionId(uint16_t actionId, const std::shared_ptr action) {\r\n\t\tactionItemMap.try_emplace(actionId, action);\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bbf870f4a86531f3", - "equalIndicator/v1": "2d138927d381728b57d290403e3d45581289df49fd10891c1550bc881ea5cb5e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 209, - "startColumn": 17, - "charOffset": 5151, - "charLength": 3, - "snippet": { - "text": "key" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 207, - "startColumn": 1, - "charOffset": 5063, - "charLength": 102, - "snippet": { - "text": "\tfor (uint8_t i = 0; i < key.length(); ++i) {\r\n\t\tiKeyPad[i] ^= key[i];\r\n\t\toKeyPad[i] ^= key[i];\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "72fe595218e5ba87", - "equalIndicator/v1": "2d3ad2afda1681d95d7319c4083b9693503436937e1ab3d4c10585c0984f3eef" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead", - "markdown": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 663, - "startColumn": 57, - "charOffset": 17768, - "charLength": 9, - "snippet": { - "text": "std::atoi" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 661, - "startColumn": 1, - "charOffset": 17635, - "charLength": 180, - "snippet": { - "text": "\t\t\t\tremoveAttribute(ItemAttribute_t::SPECIAL);\r\n\t\t\t\t// Add custom attribute\r\n\t\t\t\tsetCustomAttribute(\"Hireling\", static_cast(std::atoi(special.c_str())));\r\n\t\t\t}\r\n\t\t\tbreak;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "21d736268e0f4d35", - "equalIndicator/v1": "2d3da65c6274e299b31c836bfe2d3102bbda3a2430f0f8d98af65c97711a4402" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1730, - "startColumn": 2, - "charOffset": 51928, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1728, - "startColumn": 1, - "charOffset": 51849, - "charLength": 267, - "snippet": { - "text": "\tuint8_t fromStackPos = msg.getByte();\r\n\tPosition toPos = msg.getPosition();\r\n\tuint16_t toItemId = msg.get();\r\n\tuint8_t toStackPos = msg.getByte();\r\n\tg_game().playerUseItemEx(player->getID(), fromPos, fromStackPos, fromItemId, toPos, toStackPos, toItemId);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8e50088f57a192ca", - "equalIndicator/v1": "2d42ea1713ef5be27464019c7e55dc4daff42a5a40633cf23f1e51c3fe76ca99" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6198, - "startColumn": 53, - "charOffset": 214298, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6196, - "startColumn": 1, - "charOffset": 214241, - "charLength": 188, - "snippet": { - "text": "}\r\n\r\nvoid Game::playerSpeakToNpc(std::shared_ptr player, const std::string &text) {\r\n\tif (player == nullptr) {\r\n\t\tg_logger().error(\"[Game::playerSpeakToNpc] - Player is nullptr\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "772e7fda692f8a42", - "equalIndicator/v1": "2d57b004b73d59359af05a67e1a350b4e8af7cf378822b0f92985811a409c21b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 360, - "startColumn": 8, - "charOffset": 8992, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 358, - "startColumn": 1, - "charOffset": 8892, - "charLength": 217, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetHitChance(lua_State* L) {\r\n\t// itemType:getHitChance()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->hitChance);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e08f5fbbc3363ec7", - "equalIndicator/v1": "2d5b6bab69b826b864ea3f93fbed14767f86c29f5f3f424a852be00a83d51ada" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'AddItem' can be made const", - "markdown": "Method 'AddItem' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 254, - "startColumn": 20, - "charOffset": 10097, - "charLength": 7, - "snippet": { - "text": "AddItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 252, - "startColumn": 1, - "charOffset": 10073, - "charLength": 139, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::AddItem(NetworkMessage &msg, uint16_t id, uint8_t count, uint8_t tier) {\r\n\tconst ItemType &it = Item::items[id];\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8e695e19ae023d34", - "equalIndicator/v1": "2d5ee958a923f0a7d8f4f7b3fed0612085ab140460ac2016d991a7ed7f9d28a1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6858, - "startColumn": 20, - "charOffset": 237669, - "charLength": 15, - "snippet": { - "text": "levelDifference" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6856, - "startColumn": 1, - "charOffset": 237516, - "charLength": 205, - "snippet": { - "text": "\t} else {\r\n\t\tfloat rateDamageReductionByLevel = g_configManager().getFloat(PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, __FUNCTION__) / 100;\r\n\t\tlevelDiffRate -= levelDifference * rateDamageReductionByLevel;\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cdbec88089ec0c9b", - "equalIndicator/v1": "2d92b4c91da3253c5fb509063c67597a0a2001e86e42a0429ad55a03f77eac7e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'mount' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'mount' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5949, - "startColumn": 52, - "charOffset": 174927, - "charLength": 5, - "snippet": { - "text": "mount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5947, - "startColumn": 1, - "charOffset": 174871, - "charLength": 113, - "snippet": { - "text": "}\r\n\r\nbool Player::hasMount(const std::shared_ptr mount) const {\r\n\tif (isAccessPlayer()) {\r\n\t\treturn true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9e6c7d576338c5d6", - "equalIndicator/v1": "2e032cad7b12d043a5e551390c78e3c2e71e162f5329df507237c656910c515c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1054, - "startColumn": 20, - "charOffset": 38052, - "charLength": 6, - "snippet": { - "text": "rawExp" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1052, - "startColumn": 1, - "charOffset": 38005, - "charLength": 111, - "snippet": { - "text": "\r\n\tlua_pushnumber(L, exp);\r\n\tlua_pushnumber(L, rawExp);\r\n\r\n\tif (scriptInterface.protectedCall(L, 4, 1) != 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0ff246aac40d4230", - "equalIndicator/v1": "2e1957ec451a846848693088d92c066f78b90a08fffc68fdb1e2ed1d63040b11" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use nullptr", - "markdown": "Use nullptr" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 507, - "startColumn": 20, - "charOffset": 29451, - "charLength": 1, - "snippet": { - "text": "0" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 505, - "startColumn": 1, - "charOffset": 29402, - "charLength": 117, - "snippet": { - "text": "\tserviceManager = manager;\r\n\r\n\ttime_t now = time(0);\r\n\tconst tm* tms = localtime(&now);\r\n\tint minutes = tms->tm_min;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "22ac3d33f0b80737", - "equalIndicator/v1": "2e32303df4cdf2f2a5dfc5f68e0b4acca7831d08e1a87698686800ac9c889fe3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6657, - "startColumn": 27, - "charOffset": 231422, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6655, - "startColumn": 1, - "charOffset": 231347, - "charLength": 127, - "snippet": { - "text": "\r\n\tif (damage.primary.type == COMBAT_HEALING) {\r\n\t\tdamage.primary.value *= target->getBuff(BUFF_HEALINGRECEIVED) / 100.;\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2af49459099c0b72", - "equalIndicator/v1": "2e37f9ad1be84700b15b1a4fec14d21e49d1024e221888b587cf6eb2ff6e21bd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8375, - "startColumn": 61, - "charOffset": 265510, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8373, - "startColumn": 1, - "charOffset": 265445, - "charLength": 128, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::reloadCreature(std::shared_ptr creature) {\r\n\tif (!creature || !canSee(creature)) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f41507ada27c09f7", - "equalIndicator/v1": "2e6c057a20d1c1a2a5c8d8789e96c48d8150ebd85f2e41ee3a996cdd9ec02ba6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 306, - "startColumn": 95, - "charOffset": 9640, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 304, - "startColumn": 1, - "charOffset": 9541, - "charLength": 178, - "snippet": { - "text": "}\r\n\r\nReturnValue Combat::canDoCombat(std::shared_ptr attacker, std::shared_ptr target, bool aggressive) {\r\n\tif (!aggressive) {\r\n\t\treturn RETURNVALUE_NOERROR;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fc8fe02ed675195e", - "equalIndicator/v1": "2e8a7f9289e7319106ca3a3a40bac451bb23f364efd776a2e8e399120cac8c64" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6495, - "startColumn": 75, - "charOffset": 224156, - "charLength": 8, - "snippet": { - "text": "attacker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6493, - "startColumn": 1, - "charOffset": 224077, - "charLength": 273, - "snippet": { - "text": "}\r\n\r\nbool Game::combatBlockHit(CombatDamage &damage, std::shared_ptr attacker, std::shared_ptr target, bool checkDefense, bool checkArmor, bool field) {\r\n\tif (damage.primary.type == COMBAT_NONE && damage.secondary.type == COMBAT_NONE) {\r\n\t\treturn true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0d63c89ed2938f8b", - "equalIndicator/v1": "2e925c7e0f27158782e85052748f801e706f2f2766474a2ceed7161f61cfabe3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3122, - "startColumn": 2, - "charOffset": 95750, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3120, - "startColumn": 1, - "charOffset": 95639, - "charLength": 246, - "snippet": { - "text": "void ProtocolGame::parseMarketCancelOffer(NetworkMessage &msg) {\r\n\tuint32_t timestamp = msg.get();\r\n\tuint16_t counter = msg.get();\r\n\tif (counter > 0) {\r\n\t\tg_game().playerCancelMarketOffer(player->getID(), timestamp, counter);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e2d70091d85e53d2", - "equalIndicator/v1": "2e931276f40852678f626787baffbc846540164d31e49ac85c5add6540a9f9bf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'addThing' is within a recursive call chain", - "markdown": "Function 'addThing' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 990, - "startColumn": 12, - "charOffset": 30152, - "charLength": 8, - "snippet": { - "text": "addThing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 988, - "startColumn": 1, - "charOffset": 30136, - "charLength": 121, - "snippet": { - "text": "}\r\n\r\nvoid Tile::addThing(int32_t, std::shared_ptr thing) {\r\n\tif (!thing) {\r\n\t\treturn /*RETURNVALUE_NOTPOSSIBLE*/;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d129fe84b1479bff", - "equalIndicator/v1": "2ea8a7d6e6dae367104247ab058474426776c9299d0530272607dcc0820ccb63" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/imbuements/imbuements.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 233, - "startColumn": 7, - "charOffset": 8038, - "charLength": 7, - "snippet": { - "text": "int32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 231, - "startColumn": 1, - "charOffset": 8005, - "charLength": 120, - "snippet": { - "text": "\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tint32_t bonus = pugi::cast(attr.value());\r\n\r\n\t\t\t\t\t\tif (usenormalskill == 1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cf95055e230e71ae", - "equalIndicator/v1": "2ebc53711dfad69663de2d08c10e6e3e0698c24f64fab52f7da7d81fb82404d0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1076, - "startColumn": 49, - "charOffset": 35092, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1074, - "startColumn": 1, - "charOffset": 35039, - "charLength": 214, - "snippet": { - "text": "}\r\n\r\nbool Combat::doCombat(std::shared_ptr caster, std::shared_ptr target) const {\r\n\tif (caster != nullptr && params.chainCallback) {\r\n\t\treturn doCombatChain(caster, target, params.aggressive);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b85e299a3a7e55fe", - "equalIndicator/v1": "2ecefdb7147dae97bfdc1f8c3c4cfe8df73bf222de4ad492e8f3acdf052eed2f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6818, - "startColumn": 74, - "charOffset": 213927, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6816, - "startColumn": 1, - "charOffset": 213849, - "charLength": 122, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendInventoryItem(Slots_t slot, std::shared_ptr item) {\r\n\tNetworkMessage msg;\r\n\tif (item) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9b91b0c732974d57", - "equalIndicator/v1": "2edaefbcc9e6ddc7cba29725ebf02f93e834c608e8a8d02c7985b01d54d99d86" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/lua_functions_loader.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 189, - "startColumn": 73, - "charOffset": 5939, - "charLength": 5, - "snippet": { - "text": "thing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 187, - "startColumn": 1, - "charOffset": 5862, - "charLength": 146, - "snippet": { - "text": "}\r\n\r\nvoid LuaFunctionsLoader::pushThing(lua_State* L, std::shared_ptr thing) {\r\n\tif (validateDispatcherContext(__FUNCTION__)) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0ba6b0f511997369", - "equalIndicator/v1": "2efe32d327d1fd95b2227da095dc9a2298cf8c68f3fabb8734351233671e0b87" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'applyWheelOfDestinyHealing' is within a recursive call chain", - "markdown": "Function 'applyWheelOfDestinyHealing' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6865, - "startColumn": 12, - "charOffset": 237798, - "charLength": 26, - "snippet": { - "text": "applyWheelOfDestinyHealing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6863, - "startColumn": 1, - "charOffset": 237749, - "charLength": 260, - "snippet": { - "text": "\r\n// Wheel of destiny combat helpers\r\nvoid Game::applyWheelOfDestinyHealing(CombatDamage &damage, std::shared_ptr attackerPlayer, std::shared_ptr target) {\r\n\tdamage.primary.value += (damage.primary.value * damage.healingMultiplier) / 100.;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9c0cacec1fc9315f", - "equalIndicator/v1": "2f39b3d878f0849cbfb538dedf4c2b0c8549dbff4564885ba4e346d782e54498" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 836, - "startColumn": 7, - "charOffset": 26818, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 834, - "startColumn": 1, - "charOffset": 26749, - "charLength": 231, - "snippet": { - "text": "\t// onaddItem(moveitem, pos)\r\n\t// onRemoveItem(moveitem, pos)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[MoveEvent::executeAddRemItem - \"\r\n\t\t \"Item {} item on tile x: {} y: {} z: {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b0d94b27f4f59ccd", - "equalIndicator/v1": "2f470433602c07e3c980ed84af5bb68cadd1f071295984e60a6bea473483fa22" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'virtual' is redundant since the function is already declared 'override'", - "markdown": "'virtual' is redundant since the function is already declared 'override'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/cylinder.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 198, - "startColumn": 15, - "charOffset": 8081, - "charLength": 19, - "snippet": { - "text": "postAddNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 196, - "startColumn": 1, - "charOffset": 7991, - "charLength": 354, - "snippet": { - "text": "\tvirtual void removeThing(std::shared_ptr, uint32_t) override { }\r\n\r\n\tvirtual void postAddNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r\n\tvirtual void postRemoveNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3f042b2848f49453", - "equalIndicator/v1": "2f53376349e4d9a7f598f1fec9cd1468927dce7b60ba39ee92f2c24b034b7fa3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1064, - "startColumn": 7, - "charOffset": 34815, - "charLength": 6, - "snippet": { - "text": "combat" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1062, - "startColumn": 1, - "charOffset": 34704, - "charLength": 264, - "snippet": { - "text": "\t\t\t\tdelay, [combat, caster, nextTarget, from, affected]() {\r\n\t\t\t\t\tif (combat && caster && nextTarget) {\r\n\t\t\t\t\t\tcombat->doChainEffect(from, nextTarget->getPosition(), combat->params.chainEffect);\r\n\t\t\t\t\t\tcombat->doCombat(caster, nextTarget, from, affected);\r\n\t\t\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5569c4415683c5d3", - "equalIndicator/v1": "2f548a058a49b9235268514499166a7b9e321e597ec7f0a699d18eae50189a0a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7593, - "startColumn": 108, - "charOffset": 265091, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7591, - "startColumn": 1, - "charOffset": 264941, - "charLength": 282, - "snippet": { - "text": "// Life leech\r\nvoid Game::applyLifeLeech(\r\n\tstd::shared_ptr attackerPlayer, std::shared_ptr targetMonster, std::shared_ptr target, const CombatDamage &damage, const int32_t &realDamage\r\n) const {\r\n\t// Wheel of destiny bonus - life leech chance and amount\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dcd28aa9a2940b30", - "equalIndicator/v1": "2f5e399cb46ba22039651da731b117ce7709f7eb46a94c41737652c73cee5d7c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6443, - "startColumn": 53, - "charOffset": 222521, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6441, - "startColumn": 1, - "charOffset": 222464, - "charLength": 151, - "snippet": { - "text": "}\r\n\r\nvoid Game::reloadCreature(std::shared_ptr creature) {\r\n\tif (!creature) {\r\n\t\tg_logger().error(\"[{}] Creature is nullptr\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "af6a4be9083ca96b", - "equalIndicator/v1": "2f6249e710dba9779c8f2ae8a47085bc9487abbe8c52d27740a976431a81db08" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 657, - "startColumn": 7, - "charOffset": 25223, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 655, - "startColumn": 1, - "charOffset": 25120, - "charLength": 235, - "snippet": { - "text": "\r\nbool EventCallback::playerOnTurn(std::shared_ptr player, Direction direction) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTurn - \"\r\n\t\t \"Player {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "db189e5ec7fe2327", - "equalIndicator/v1": "2f7b62c387f8da7e3ac3b22e48a9daa0ed0df5a74221a55a20b0bb3e3c4a8676" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1595, - "startColumn": 62, - "charOffset": 47623, - "charLength": 9, - "snippet": { - "text": "container" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1593, - "startColumn": 1, - "charOffset": 47546, - "charLength": 146, - "snippet": { - "text": "\r\n// container\r\nvoid Player::sendAddContainerItem(std::shared_ptr container, std::shared_ptr item) {\r\n\tif (!client) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2fdfd5a39d16e619", - "equalIndicator/v1": "2fc5e8446ecf34c2b640a6cd7df1c83491b60d8c6d942192e0cc29ea248da8bc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 825, - "startColumn": 6, - "charOffset": 31604, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 823, - "startColumn": 1, - "charOffset": 31569, - "charLength": 178, - "snippet": { - "text": "\tlua_pushnumber(L, tries);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 3, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9f5537fa2db83cb7", - "equalIndicator/v1": "2fc76c02f912e34755c366bdd4121e03bdf9e2ba0c8d9d78006fce03796d6a8b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 214, - "startColumn": 30, - "charOffset": 8485, - "charLength": 10, - "snippet": { - "text": "std::clamp" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 212, - "startColumn": 1, - "charOffset": 8415, - "charLength": 356, - "snippet": { - "text": "\r\n\t\t\tif (damageModifiers[i] != 10000) {\r\n\t\t\t\tint16_t clientModifier = std::clamp(10000 - static_cast(damageModifiers[i]), -10000, 10000);\r\n\t\t\t\tg_logger().debug(\"[{}] CombatType: {}, Damage Modifier: {}, Resulting Client Modifier: {}\", __FUNCTION__, i, damageModifiers[i], clientModifier);\r\n\t\t\t\tmsg.addByte(getCipbiaElement(indexToCombatType(i)));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e81023683120b932", - "equalIndicator/v1": "2fdf7f90d19eda166889d66d4e93d5b9f39af8420e1e39d33de6fb762c343bf5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')", - "markdown": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/vocations/vocation.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 80, - "startColumn": 10, - "charOffset": 2025, - "charLength": 13, - "snippet": { - "text": "gainSoulTicks" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 78, - "startColumn": 1, - "charOffset": 1976, - "charLength": 136, - "snippet": { - "text": "\r\n\tuint32_t getSoulGainTicks() const {\r\n\t\treturn gainSoulTicks / g_configManager().getFloat(RATE_SOUL_REGEN_SPEED, __FUNCTION__);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c2973b7a30d23123", - "equalIndicator/v1": "2fe9ee0621493647d12b6a2e722ca148d715dd299a8ec55cb66d1ed40ac6a156" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'res' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'res' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/scripts/script_environment.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 158, - "startColumn": 32, - "charOffset": 4076, - "charLength": 3, - "snippet": { - "text": "res" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 156, - "startColumn": 1, - "charOffset": 3984, - "charLength": 123, - "snippet": { - "text": "\r\nuint32_t ScriptEnvironment::addResult(DBResult_ptr res) {\r\n\ttempResults[++lastResultId] = res;\r\n\treturn lastResultId;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2eabe3e91e2da9ba", - "equalIndicator/v1": "2ff07dd55e995707c1427b1d3d294363576a1008981ca7a2d110545cce9a2390" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Replace loop by 'std::ranges::all_of()'", - "markdown": "Replace loop by 'std::ranges::all_of()'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/creatureevent.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 87, - "startColumn": 9, - "charOffset": 2571, - "charLength": 1, - "snippet": { - "text": "{" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 85, - "startColumn": 1, - "charOffset": 2522, - "charLength": 190, - "snippet": { - "text": "\tuint32_t oldLevel,\r\n\tuint32_t newLevel\r\n) const {\r\n\tfor ([[maybe_unused]] const auto &[eventName, eventPtr] : creatureEvents) {\r\n\t\tif (eventPtr->getEventType() == CREATURE_EVENT_ADVANCE) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "664cdfec7161b7a2", - "equalIndicator/v1": "2ff240d2bb3b03de896a9da7b6f2ab0db96e7343d1fd3afb4f3555a8b9c61e03" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/kv.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 59, - "startColumn": 38, - "charOffset": 1830, - "charLength": 3, - "snippet": { - "text": "get" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 57, - "startColumn": 1, - "charOffset": 1788, - "charLength": 175, - "snippet": { - "text": "}\r\n\r\nstd::optional KVStore::get(const std::string &key, bool forceLoad /*= false */) {\r\n\tlogger.trace(\"KVStore::get({})\", key);\r\n\tstd::scoped_lock lock(mutex_);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d5a07b3014bc6552", - "equalIndicator/v1": "300417850627a4b2ee35ab1e7c5d3441392d7a021891b8a8476f07ebae4fa92a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2150, - "startColumn": 2, - "charOffset": 66176, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2148, - "startColumn": 1, - "charOffset": 66104, - "charLength": 188, - "snippet": { - "text": "\tuint8_t action = msg.getByte();\r\n\tbool upgrade = msg.getByte() != 0;\r\n\tuint16_t raceId = msg.get();\r\n\r\n\tif (!g_configManager().getBoolean(TASK_HUNTING_ENABLED, __FUNCTION__)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d0b210d8c8cac3cf", - "equalIndicator/v1": "301cda11835a62b612086d28d8168eadecb4fc0304f8ca69b3389ddb17f208b5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6356, - "startColumn": 70, - "charOffset": 201199, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6354, - "startColumn": 1, - "charOffset": 201125, - "charLength": 159, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendPartyCreatureShield(std::shared_ptr target) {\r\n\tuint32_t cid = target->getID();\r\n\tif (!knownCreatureSet.contains(cid)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c891f070824fd4db", - "equalIndicator/v1": "304cd7db72902e303cb9de14be024863811a3441ff35c1a3b74771013465fdf6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 835, - "startColumn": 94, - "charOffset": 31971, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 833, - "startColumn": 1, - "charOffset": 31873, - "charLength": 271, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::playerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnCombat - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ff03a288e4cc2cd2", - "equalIndicator/v1": "30502476078e4750a6446c0239e647cb7358fcdbf7d2a907386ebc86b53955cf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'targetItem' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'targetItem' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 706, - "startColumn": 155, - "charOffset": 27220, - "charLength": 10, - "snippet": { - "text": "targetItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 704, - "startColumn": 1, - "charOffset": 27061, - "charLength": 291, - "snippet": { - "text": "}\r\n\r\nbool EventCallback::playerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeAccept - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a3cba6cb942bdfb9", - "equalIndicator/v1": "305174c396f63d39b1af2da9cf2902c709bcc3d7517f294cc343fc720f369944" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/movement/teleport.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 55, - "startColumn": 7, - "charOffset": 2275, - "charLength": 22, - "snippet": { - "text": "postRemoveNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 53, - "startColumn": 1, - "charOffset": 2114, - "charLength": 322, - "snippet": { - "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r\nprivate:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f752a861f91f4a21", - "equalIndicator/v1": "3052f9b9806658bfc5d15dc75bd4ab3aefc93ed83fba54f98df6501da470be00" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 667, - "startColumn": 50, - "charOffset": 20407, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 665, - "startColumn": 1, - "charOffset": 20353, - "charLength": 218, - "snippet": { - "text": "}\r\n\r\nbool Monster::isTarget(std::shared_ptr creature) {\r\n\tif (creature->isRemoved() || !creature->isAttackable() || creature->getZoneType() == ZONE_PROTECTION || !canSeeCreature(creature)) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d6f7b4c9201976bf", - "equalIndicator/v1": "3081a89ff127dc624e2b90032ea4c5d0f21ed9056906e262f4b167c8ea43cab8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/bed.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 194, - "startColumn": 46, - "charOffset": 5081, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 192, - "startColumn": 1, - "charOffset": 5031, - "charLength": 97, - "snippet": { - "text": "}\r\n\r\nvoid BedItem::wakeUp(std::shared_ptr player) {\r\n\tif (house == nullptr) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5b72f648cbbdda44", - "equalIndicator/v1": "309c6fd7c701ff033d35caf5d818024adc20bd464848934a4fdc44b88515ed83" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6152, - "startColumn": 47, - "charOffset": 212608, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6150, - "startColumn": 1, - "charOffset": 212557, - "charLength": 215, - "snippet": { - "text": "}\r\n\r\nbool Game::playerYell(std::shared_ptr player, const std::string &text) {\r\n\tif (player->getLevel() == 1) {\r\n\t\tplayer->sendTextMessage(MESSAGE_FAILURE, \"You may not yell as long as you are on level 1.\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "04b8fcf0ceb61577", - "equalIndicator/v1": "30cb2355afe21229af975f53e6785415f37c080e9d94f360482ee6d2b70460ab" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3960, - "startColumn": 82, - "charOffset": 119080, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3958, - "startColumn": 1, - "charOffset": 118943, - "charLength": 268, - "snippet": { - "text": "\r\nvoid Player::updateDamageReductionFromItemImbuement(\r\n\tstd::array &combatReductionArray, std::shared_ptr item, uint16_t combatTypeIndex\r\n) const {\r\n\tfor (uint8_t imbueSlotId = 0; imbueSlotId < item->getImbuementSlot(); imbueSlotId++) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b8b6edbb4a3de549", - "equalIndicator/v1": "30d2b220b63a6b6392ffaa17bcdf9656d73e1676c4d0ab270169c739d9238d2c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1210, - "startColumn": 31, - "charOffset": 35618, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1208, - "startColumn": 1, - "charOffset": 35501, - "charLength": 137, - "snippet": { - "text": "\tvoid sendUpdateCreature(std::shared_ptr creature) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendUpdateCreature(creature);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4fc51aa6596a1abe", - "equalIndicator/v1": "311812e0db12ad733fb988f3bfd5f8a40796cc85bec56ea7dbeb4f3d7822f83c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'vipGroupsId' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'vipGroupsId' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5853, - "startColumn": 55, - "charOffset": 204838, - "charLength": 11, - "snippet": { - "text": "vipGroupsId" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5851, - "startColumn": 1, - "charOffset": 204778, - "charLength": 79, - "snippet": { - "text": "\t}\r\n\r\n\tplayer->vip()->edit(guid, description, icon, notify, vipGroupsId);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "37b337e8dbc755a9", - "equalIndicator/v1": "311c272847441e5002a67cd60d45c054feb67f4d76e15d85de2cfa23a14c826b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')", - "markdown": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1261, - "startColumn": 10, - "charOffset": 34947, - "charLength": 9, - "snippet": { - "text": "manaTicks" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1259, - "startColumn": 1, - "charOffset": 34899, - "charLength": 129, - "snippet": { - "text": "\r\n\tif (player != nullptr && isBuff) {\r\n\t\treturn manaTicks / g_configManager().getFloat(RATE_SPELL_COOLDOWN, __FUNCTION__);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6957928e76c4b50e", - "equalIndicator/v1": "31235fc7258b507d53909cc6635a17f28bc95c2cab1fbf4bc056ede392e6c97b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'monster' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'monster' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 476, - "startColumn": 86, - "charOffset": 25159, - "charLength": 30, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 474, - "startColumn": 1, - "charOffset": 25045, - "charLength": 346, - "snippet": { - "text": "\r\n\t// Hazard combat helpers\r\n\tvoid handleHazardSystemAttack(CombatDamage &damage, std::shared_ptr player, const std::shared_ptr monster, bool isPlayerAttacker);\r\n\tvoid notifySpectators(const CreatureVector &spectators, const Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetMonster);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c6110e8c33daea2d", - "equalIndicator/v1": "3123c948c13447f6b405c472ab242a7e2c87d3cfb298160225df97f8652c651f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 939, - "startColumn": 15, - "charOffset": 30537, - "charLength": 10, - "snippet": { - "text": "std::round" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 937, - "startColumn": 1, - "charOffset": 30447, - "charLength": 137, - "snippet": { - "text": "\t\t\tvalue = attacker->getIncreasePercent(combatType);\r\n\t\t\tif (value != 0) {\r\n\t\t\t\tdamage += std::round(damage * value / 100.f);\r\n\t\t\t}\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b953564791a9c1ee", - "equalIndicator/v1": "312800ab77171ebe7869cb3225437abc982b0085b0e75dfa6b36dab63df51880" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1237, - "startColumn": 54, - "charOffset": 49709, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1235, - "startColumn": 1, - "charOffset": 49651, - "charLength": 234, - "snippet": { - "text": "}\r\n\r\nvoid Game::playerInspectItem(std::shared_ptr player, const Position &pos) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tstd::shared_ptr thing = internalGetThing(player, pos, 0, 0, STACKPOS_TOPDOWN_ITEM);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "29ef35c12c7408fa", - "equalIndicator/v1": "312a9fc7a8ce9665e2b0d2d2181e73a00e09ccaf9c56737f6c8b1d43febdb271" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1931, - "startColumn": 2, - "charOffset": 58838, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1929, - "startColumn": 1, - "charOffset": 58776, - "charLength": 187, - "snippet": { - "text": "\r\nvoid ProtocolGame::parseLookInShop(NetworkMessage &msg) {\r\n\tuint16_t id = msg.get();\r\n\tuint8_t count = msg.getByte();\r\n\tg_game().playerLookInShop(player->getID(), id, count);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "09732926dbf93a9e", - "equalIndicator/v1": "314b5de421e25d99077460cb031f9d5c0978589d475d67bad7bc44b4a281b42d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'float'", - "markdown": "Narrowing conversion from 'double' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/io_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 494, - "startColumn": 26, - "charOffset": 23837, - "charLength": 19, - "snippet": { - "text": "MITIGATION_INCREASE" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 492, - "startColumn": 1, - "charOffset": 23635, - "charLength": 348, - "snippet": { - "text": "// SLOT_GREEN_BOTTOM_150 = 7\r\nvoid IOWheel::slotGreenBottom150(const std::shared_ptr &player, uint16_t points, uint8_t, PlayerWheelMethodsBonusData &bonusData) const {\r\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\r\n\taddVesselResonance(player, bonusData, WheelSlots_t::SLOT_GREEN_BOTTOM_150, WheelGemAffinity_t::Green, points);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cb1b4ae82d717291", - "equalIndicator/v1": "3154430b0d5f54e74324fa02be2ae985740a98ee3c103ebd7dd3ebf7dc0b11d8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8437, - "startColumn": 2, - "charOffset": 266941, - "charLength": 22, - "snippet": { - "text": "Supply_Stash_Actions_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8435, - "startColumn": 1, - "charOffset": 266934, - "charLength": 152, - "snippet": { - "text": "\t}\r\n\r\n\tSupply_Stash_Actions_t action = static_cast(msg.getByte());\r\n\tswitch (action) {\r\n\t\tcase SUPPLY_STASH_ACTION_STOW_ITEM: {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3e7ec31ed0a518fc", - "equalIndicator/v1": "31687076a9eacc19f3bb47dcb0afdb874ff668b32e5b9f972c8f368e2817da92" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1822, - "startColumn": 3, - "charOffset": 55204, - "charLength": 16, - "snippet": { - "text": "ObjectCategory_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1820, - "startColumn": 1, - "charOffset": 55098, - "charLength": 246, - "snippet": { - "text": "\t\tg_game().playerSetQuickLootFallback(player->getID(), useMainAsFallback);\r\n\t} else if (action == 4) {\r\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\r\n\t\tPosition pos = msg.getPosition();\r\n\t\tuint16_t itemId = msg.get();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "021293f302eb722b", - "equalIndicator/v1": "31760ab5a475739fad72c999f0c08d1a19f810c032c0c7e16de20fecf2336bc0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/grouping/party.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 591, - "startColumn": 54, - "charOffset": 16418, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 589, - "startColumn": 1, - "charOffset": 16360, - "charLength": 235, - "snippet": { - "text": "}\r\n\r\nvoid Party::showPlayerStatus(std::shared_ptr player, std::shared_ptr member, bool showStatus) {\r\n\tplayer->sendPartyCreatureShowStatus(member, showStatus);\r\n\tmember->sendPartyCreatureShowStatus(player, showStatus);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "90b1bd8eed413a5c", - "equalIndicator/v1": "3194b78d350311b9a145c7bcbc26f82b723433db8163aa47a423b9b8524d8081" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Replace loop by 'std::ranges::any_of()'", - "markdown": "Replace loop by 'std::ranges::any_of()'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1118, - "startColumn": 2, - "charOffset": 33333, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1116, - "startColumn": 1, - "charOffset": 33195, - "charLength": 338, - "snippet": { - "text": "bool Monster::pushItem(std::shared_ptr item, const Direction &nextDirection) {\r\n\tconst Position ¢erPos = item->getPosition();\r\n\tfor (const auto &[x, y] : getPushItemLocationOptions(nextDirection)) {\r\n\t\tPosition tryPos(centerPos.x + x, centerPos.y + y, centerPos.z);\r\n\t\tstd::shared_ptr tile = g_game().map.getTile(tryPos);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "820c9416d1dc2248", - "equalIndicator/v1": "31c163e80e1ab2da9fe55a3b0de2478edbb06b0d6ef03a6ad3e45af9c6c4848c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions", - "markdown": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/value_wrapper.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 39, - "startColumn": 18, - "charOffset": 1286, - "charLength": 12, - "snippet": { - "text": "ValueWrapper" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 37, - "startColumn": 1, - "charOffset": 1119, - "charLength": 404, - "snippet": { - "text": "\texplicit(false) ValueWrapper(const std::string &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(bool value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(int value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(double value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const phmap::flat_hash_map &value, uint64_t timestamp = 0);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "74765a567eb1bd8b", - "equalIndicator/v1": "31d43d031db8373da14bf89146e3a043d6197f34251d175a88ab7d3b1d88c512" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 680, - "startColumn": 7, - "charOffset": 26109, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 678, - "startColumn": 1, - "charOffset": 25959, - "charLength": 300, - "snippet": { - "text": "\r\nbool EventCallback::playerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeRequest - \"\r\n\t\t \"Player {} target {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ca4f857380f7fb5f", - "equalIndicator/v1": "31da07c970451e978392e9ba7e823c8aacf2c8ccd26089c4218673b0f9571fce" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/housetile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 63, - "startColumn": 33, - "charOffset": 1632, - "charLength": 7, - "snippet": { - "text": "int32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 61, - "startColumn": 1, - "charOffset": 1595, - "charLength": 307, - "snippet": { - "text": "}\r\n\r\nReturnValue HouseTile::queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t tileFlags, std::shared_ptr actor /* = nullptr*/) {\r\n\tif (std::shared_ptr creature = thing->getCreature()) {\r\n\t\tif (std::shared_ptr player = creature->getPlayer()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "71f6ecc849f6cd2f", - "equalIndicator/v1": "31ec5ddda46cc4a16bec6dbeb51baa6b78419a2e46b9d23103a4d1007824c5ed" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 987, - "startColumn": 125, - "charOffset": 35671, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 985, - "startColumn": 1, - "charOffset": 35542, - "charLength": 263, - "snippet": { - "text": "}\r\n\r\nbool Events::eventPlayerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) {\r\n\t// Player:onTradeAccept(target, item, targetItem)\r\n\tif (info.playerOnTradeAccept == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "db4c9e750b9890c3", - "equalIndicator/v1": "31fd5dd3f033a24beb89f0e298adcdf221e9e0f37f7dacab770187dfb7fb36de" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'newGuildRank' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'newGuildRank' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 290, - "startColumn": 15, - "charOffset": 7581, - "charLength": 12, - "snippet": { - "text": "newGuildRank" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 288, - "startColumn": 1, - "charOffset": 7513, - "charLength": 88, - "snippet": { - "text": "\t}\r\n\tvoid setGuildRank(GuildRank_ptr newGuildRank) {\r\n\t\tguildRank = newGuildRank;\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "29a32bc0ffce72d5", - "equalIndicator/v1": "32346594c9d54f5c50828926511626e9f09c5cdeb1b7b21aa60899ec2a28fd94" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 221, - "startColumn": 68, - "charOffset": 7945, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 219, - "startColumn": 1, - "charOffset": 7863, - "charLength": 239, - "snippet": { - "text": "\r\n// Creature\r\nbool Events::eventCreatureOnChangeOutfit(std::shared_ptr creature, const Outfit_t &outfit) {\r\n\t// Creature:onChangeOutfit(outfit) or Creature.onChangeOutfit(self, outfit)\r\n\tif (info.creatureOnChangeOutfit == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3469800bab0b7baf", - "equalIndicator/v1": "3247bb10c43d5f009a4027a019736068ef446ab0bc74fe1070a58a2fe127c8b6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6756, - "startColumn": 63, - "charOffset": 211311, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6754, - "startColumn": 1, - "charOffset": 211244, - "charLength": 240, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendMoveCreature(std::shared_ptr creature, const Position &newPos, int32_t newStackPos, const Position &oldPos, int32_t oldStackPos, bool teleport) {\r\n\tif (creature == player) {\r\n\t\tif (oldStackPos >= 10) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0164160561c9f723", - "equalIndicator/v1": "3247d181d77bb69930129dda55d8c2b0f7a3a4525dce9a0eee1881d54fe38e80" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1330, - "startColumn": 64, - "charOffset": 39113, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1328, - "startColumn": 1, - "charOffset": 39045, - "charLength": 149, - "snippet": { - "text": "}\r\n\r\nint32_t Tile::getClientIndexOfCreature(std::shared_ptr player, std::shared_ptr creature) const {\r\n\tint32_t n;\r\n\tif (ground) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d06f66173341cf46", - "equalIndicator/v1": "324b715c54fe5ed7e5b8697a052220f9c27a80c1a9529e5d5d6601d5d0db0a85" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", - "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/security/rsa.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 126, - "startColumn": 10, - "charOffset": 3170, - "charLength": 11, - "snippet": { - "text": "std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 124, - "startColumn": 1, - "charOffset": 3136, - "charLength": 55, - "snippet": { - "text": "\r\n\tif (input.empty()) {\r\n\t\treturn std::string();\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9772480ddae4dacf", - "equalIndicator/v1": "3251a7a4e040a485a20506c2a89272bd6b4f483140402a4cdaba70096e0b8ab3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'bool'", - "markdown": "Narrowing conversion from 'double' to 'bool'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 995, - "startColumn": 53, - "charOffset": 31982, - "charLength": 18, - "snippet": { - "text": "weaponSkillFormula" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 993, - "startColumn": 1, - "charOffset": 31767, - "charLength": 364, - "snippet": { - "text": "\tauto setCommonValues = [this, weapon](double formula, SoundEffect_t impactSound, uint32_t effect) {\r\n\t\tdouble weaponSkillFormula = weapon->getChainSkillValue();\r\n\t\tsetPlayerCombatValues(COMBAT_FORMULA_SKILL, 0, 0, weaponSkillFormula ? weaponSkillFormula : formula, 0);\r\n\t\tsetParam(COMBAT_PARAM_IMPACTSOUND, impactSound);\r\n\t\tsetParam(COMBAT_PARAM_EFFECT, effect);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6bf99b359aa471d2", - "equalIndicator/v1": "3257f45504233b5112b8ae4f9f09073f15343598d926bd04414fb24c5f56dcce" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::list>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::list\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/map/house_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 239, - "startColumn": 21, - "charOffset": 6821, - "charLength": 4, - "snippet": { - "text": "beds" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 237, - "startColumn": 1, - "charOffset": 6761, - "charLength": 96, - "snippet": { - "text": "\r\n\tconst auto beds = house->getBeds();\r\n\tlua_createtable(L, beds.size(), 0);\r\n\r\n\tint index = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b15ce0769c4c17d3", - "equalIndicator/v1": "3280f69d3be9eb540842fa77c9f32f4c47e25a91a3d1bc019a0c52e640c3ba74" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 548, - "startColumn": 8, - "charOffset": 13555, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 546, - "startColumn": 1, - "charOffset": 13463, - "charLength": 186, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetSpeed(lua_State* L) {\r\n\t// itemType:getSpeed()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (!itemType) {\r\n\t\tlua_pushnil(L);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "069f2b597d127c77", - "equalIndicator/v1": "32b0f62c9fbeaf1b832248a6bb44a6535cb3140029ec72d3a327663809906119" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 987, - "startColumn": 95, - "charOffset": 35641, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 985, - "startColumn": 1, - "charOffset": 35542, - "charLength": 263, - "snippet": { - "text": "}\r\n\r\nbool Events::eventPlayerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) {\r\n\t// Player:onTradeAccept(target, item, targetItem)\r\n\tif (info.playerOnTradeAccept == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7ebb2d216a435051", - "equalIndicator/v1": "32b1e194b6a673832e53683cb2461c88ad854c35b99889322165580c0eb08818" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/grouping/party.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 469, - "startColumn": 82, - "charOffset": 13273, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 467, - "startColumn": 1, - "charOffset": 13187, - "charLength": 142, - "snippet": { - "text": "}\r\n\r\nSharedExpStatus_t Party::getMemberSharedExperienceStatus(std::shared_ptr player) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "70c67220a8769ea4", - "equalIndicator/v1": "32c2b135fdd040b3af0da8d79b393e2fcb90e2e46dea526a3ac08a625d9fb0bd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Nested namespaces can be concatenated", - "markdown": "Nested namespaces can be concatenated" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/value_wrapper_proto.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 24, - "startColumn": 1, - "charOffset": 806, - "charLength": 9, - "snippet": { - "text": "namespace" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 22, - "startColumn": 1, - "charOffset": 761, - "charLength": 105, - "snippet": { - "text": "\r\n// Forward declaration for protobuf class\r\nnamespace Canary {\r\n\tnamespace protobuf {\r\n\t\tnamespace kv {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "79bc887732bbb4cb", - "equalIndicator/v1": "32ea8bfc3a6f879faf32699387c018c62ca6d68ac488ca36d6902769476c70e4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Redundant string initialization", - "markdown": "Redundant string initialization" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 861, - "startColumn": 14, - "charOffset": 43168, - "charLength": 15, - "snippet": { - "text": "boostedCreature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 859, - "startColumn": 1, - "charOffset": 43105, - "charLength": 136, - "snippet": { - "text": "\r\n\tstd::map BestiaryList;\r\n\tstd::string boostedCreature = \"\";\r\n\r\n\tstd::vector> CharmList;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e2e035837b41ce6b", - "equalIndicator/v1": "333dea48e5fe1b77ec3bab3825591d1490fb89eb61ebfd1045a11077c0db2aae" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 255, - "startColumn": 81, - "charOffset": 6430, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 253, - "startColumn": 1, - "charOffset": 6345, - "charLength": 180, - "snippet": { - "text": "}\r\n\r\nstd::shared_ptr Tile::getTopVisibleCreature(std::shared_ptr creature) const {\r\n\tif (const CreatureVector* creatures = getCreatures()) {\r\n\t\tif (creature) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a2b9cea5d64c632c", - "equalIndicator/v1": "333df90e78553a1ad9ccd92983c301bbc797efc5a690adf02f840ff2131242e6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Move constructors should be marked noexcept", - "markdown": "Move constructors should be marked noexcept" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creatures_definitions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1488, - "startColumn": 2, - "charOffset": 38813, - "charLength": 13, - "snippet": { - "text": "MarketOfferEx" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1486, - "startColumn": 1, - "charOffset": 38759, - "charLength": 139, - "snippet": { - "text": "struct MarketOfferEx {\r\n\tMarketOfferEx() = default;\r\n\tMarketOfferEx(MarketOfferEx &&other) :\r\n\t\tid(other.id),\r\n\t\tplayerId(other.playerId),\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "437d8f799c581c99", - "equalIndicator/v1": "3347aeee74873507122d18b471000357c7e3d75ebf12bcb5e39ffedadde3fd03" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1840, - "startColumn": 67, - "charOffset": 71693, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1838, - "startColumn": 1, - "charOffset": 71622, - "charLength": 279, - "snippet": { - "text": "}\r\n\r\nReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::shared_ptr fromCylinder, std::shared_ptr toCylinder, std::shared_ptr item, Position toPos) {\r\n\tif (!player || !toCylinder || !item) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7e48ab433b64c7ca", - "equalIndicator/v1": "336212db702fd0c7b8ec60048d49a9cafd72286bd68fa2ba14385c5cb8f4a27f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned int' to 'float'", - "markdown": "Narrowing conversion from 'unsigned int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 696, - "startColumn": 37, - "charOffset": 22733, - "charLength": 18, - "snippet": { - "text": "std::min" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 694, - "startColumn": 1, - "charOffset": 22671, - "charLength": 128, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.55f);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f644cf5b2a9212a1", - "equalIndicator/v1": "33639e238b9d620ad88cab2f3bf8de2ca75bb3eaed998754d21c81cfe02a30a5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'isEnemyFaction' is within a recursive call chain", - "markdown": "Function 'isEnemyFaction' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 92, - "startColumn": 7, - "charOffset": 2433, - "charLength": 14, - "snippet": { - "text": "isEnemyFaction" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 90, - "startColumn": 1, - "charOffset": 2421, - "charLength": 125, - "snippet": { - "text": "\t}\r\n\r\n\tbool isEnemyFaction(Faction_t faction) const {\r\n\t\tauto master = getMaster();\r\n\t\tif (master && master->getMonster()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3d2dd8e3b8afa0dc", - "equalIndicator/v1": "336d4e2e59e1cc15e2b5c1f00a08c5f8aadd906e53b65a73703f229e5adb3b94" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructor does not initialize these fields: m_type", - "markdown": "Constructor does not initialize these fields: m_type" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/cyclopedia/player_badge.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 17, - "startColumn": 8, - "charOffset": 472, - "charLength": 5, - "snippet": { - "text": "Badge" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 15, - "startColumn": 1, - "charOffset": 452, - "charLength": 76, - "snippet": { - "text": "class KV;\r\n\r\nstruct Badge {\r\n\tuint8_t m_id = 0;\r\n\tCyclopediaBadge_t m_type;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "56793c6859226e17", - "equalIndicator/v1": "338ccdca6661610d57c09fb5d416f778975273315eeb7c02513b1ad0ee116a2c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", - "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/lua_functions_loader.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 395, - "startColumn": 10, - "charOffset": 11804, - "charLength": 11, - "snippet": { - "text": "std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 393, - "startColumn": 1, - "charOffset": 11716, - "charLength": 141, - "snippet": { - "text": "\tconst char* c_str = lua_tolstring(L, arg, &len);\r\n\tif (!c_str || len == 0) {\r\n\t\treturn std::string();\r\n\t}\r\n\treturn std::string(c_str, len);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f7cfb885810e181b", - "equalIndicator/v1": "339fdc1c8a0fb80c40e37586fbb608a9daf845b03a3b222572233b40a0bc289d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1727, - "startColumn": 2, - "charOffset": 51805, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1725, - "startColumn": 1, - "charOffset": 51706, - "charLength": 220, - "snippet": { - "text": "void ProtocolGame::parseUseItemEx(NetworkMessage &msg) {\r\n\tPosition fromPos = msg.getPosition();\r\n\tuint16_t fromItemId = msg.get();\r\n\tuint8_t fromStackPos = msg.getByte();\r\n\tPosition toPos = msg.getPosition();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "04a31cb80f797921", - "equalIndicator/v1": "33d7d9eb6632781bfdc7fb1480ca4cd377ea2a1bd1b970e00a860624fe979c06" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 927, - "startColumn": 56, - "charOffset": 33547, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 925, - "startColumn": 1, - "charOffset": 33487, - "charLength": 188, - "snippet": { - "text": "}\r\n\r\nbool Events::eventPlayerOnTurn(std::shared_ptr player, Direction direction) {\r\n\t// Player:onTurn(direction) or Player.onTurn(self, direction)\r\n\tif (info.playerOnTurn == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "28f2e2bfc127754d", - "equalIndicator/v1": "33f103fd1667b405707a8ce99f9db65e7ba4ea11f93bd3e4889018bab52d9230" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 228, - "startColumn": 10, - "charOffset": 7055, - "charLength": 13, - "snippet": { - "text": "getThingIndex" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 226, - "startColumn": 1, - "charOffset": 6985, - "charLength": 229, - "snippet": { - "text": "\tvoid removeCreature(std::shared_ptr creature);\r\n\r\n\tint32_t getThingIndex(std::shared_ptr thing) const override final;\r\n\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f3786b5533425cb3", - "equalIndicator/v1": "33f9445728184cbb03d6b0f55489f4f6b7f6781325b8859946e82d938b5ccd45" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 23, - "startColumn": 48, - "charOffset": 731, - "charLength": 4, - "snippet": { - "text": "tile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 21, - "startColumn": 1, - "charOffset": 664, - "charLength": 148, - "snippet": { - "text": "\tid(houseId) { }\r\n\r\nvoid House::addTile(std::shared_ptr tile) {\r\n\ttile->setFlag(TILESTATE_PROTECTIONZONE);\r\n\thouseTiles.push_back(tile);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "679e4e6a68112830", - "equalIndicator/v1": "3400c749f282fd6e6b42bc5f53d7ccdff10d8ef7dc5dfa167c26eca56d64c590" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iobestiary.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 80, - "startColumn": 48, - "charOffset": 3344, - "charLength": 34, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 78, - "startColumn": 1, - "charOffset": 3148, - "charLength": 397, - "snippet": { - "text": "\r\n\tstd::map getBestiaryKillCountByMonsterIDs(std::shared_ptr player, std::map mtype_list) const;\r\n\tstd::map getMonsterElements(const std::shared_ptr mtype) const;\r\n\tstd::map findRaceByName(const std::string &race, bool Onlystring = true, BestiaryType_t raceNumber = BESTY_RACE_NONE) const;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dd42228bbf0202f5", - "equalIndicator/v1": "341610e2017c89c17378240dde67d717756c186e75e6cce237399851b87cd403" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 229, - "startColumn": 87, - "charOffset": 8406, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 227, - "startColumn": 1, - "charOffset": 8308, - "charLength": 218, - "snippet": { - "text": "\r\n// Party\r\nbool EventCallback::partyOnJoin(std::shared_ptr party, std::shared_ptr player) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::partyOnJoin - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "64f7e9b4638453e5", - "equalIndicator/v1": "342621b5c4755cdb6264325078324d67009d3c4f56f3822a13141637bb4edb83" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/functions/game_reload.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 171, - "startColumn": 22, - "charOffset": 4937, - "charLength": 6, - "snippet": { - "text": "g_game" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 169, - "startColumn": 1, - "charOffset": 4879, - "charLength": 138, - "snippet": { - "text": "\r\nbool GameReload::reloadGroups() {\r\n\tconst bool result = g_game().groups.reload();\r\n\tlogReloadStatus(\"Groups\", result);\r\n\treturn result;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "88879e9f07e50f1f", - "equalIndicator/v1": "34333e774c2700193a20d6d6c2c02b3b2e95f1227df159711c5a2923f31cd4b5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6476, - "startColumn": 45, - "charOffset": 189543, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6474, - "startColumn": 1, - "charOffset": 189494, - "charLength": 188, - "snippet": { - "text": "}\r\n\r\nvoid Player::stowItem(std::shared_ptr item, uint32_t count, bool allItems) {\r\n\tif (!item || !item->isItemStorable()) {\r\n\t\tsendCancelMessage(\"This item cannot be stowed here.\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "78e504ca90a14b40", - "equalIndicator/v1": "3435f97aaca96ad099586446b19e39389be239be04f8d0ad11a16459e6e3647b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/raids.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 540, - "startColumn": 53, - "charOffset": 15524, - "charLength": 5, - "snippet": { - "text": "spawn" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 538, - "startColumn": 1, - "charOffset": 15378, - "charLength": 282, - "snippet": { - "text": "bool AreaSpawnEvent::executeEvent() {\r\n\tfor (const MonsterSpawn &spawn : spawnMonsterList) {\r\n\t\tuint32_t amount = uniform_random(spawn.minAmount, spawn.maxAmount);\r\n\t\tfor (uint32_t i = 0; i < amount; ++i) {\r\n\t\t\tstd::shared_ptr monster = Monster::createMonster(spawn.name);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ff697a50f18da69a", - "equalIndicator/v1": "3445244a2035f89609bbc8df7c2aae211027026f56885f04fd192ea909326e01" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'guild' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'guild' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/scheduling/save_manager.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 117, - "startColumn": 52, - "charOffset": 3388, - "charLength": 5, - "snippet": { - "text": "guild" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 115, - "startColumn": 1, - "charOffset": 3332, - "charLength": 145, - "snippet": { - "text": "}\r\n\r\nvoid SaveManager::saveGuild(std::shared_ptr guild) {\r\n\tif (!guild) {\r\n\t\tlogger.debug(\"Failed to save guild because guild is null.\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "283f071688eefa3d", - "equalIndicator/v1": "3446449593d6eced0dfdc32b0c642785c1a2ff959312df491b983742d942d417" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')", - "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2563, - "startColumn": 18, - "charOffset": 76602, - "charLength": 23, - "snippet": { - "text": "Player::getPercentLevel" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2561, - "startColumn": 1, - "charOffset": 76487, - "charLength": 228, - "snippet": { - "text": "\tuint64_t nextLevelExp = Player::getExpForLevel(level + 1);\r\n\tif (nextLevelExp > currLevelExp) {\r\n\t\tlevelPercent = Player::getPercentLevel(experience - currLevelExp, nextLevelExp - currLevelExp);\r\n\t} else {\r\n\t\tlevelPercent = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b87b97a0b12a9f38", - "equalIndicator/v1": "3457f0073e50f1f4d2f6935da2ece35adc7181bb1c9b2488966ce918c9f7f2c9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/libs/db_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 105, - "startColumn": 20, - "charOffset": 3234, - "charLength": 21, - "snippet": { - "text": "Database::getInstance" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 103, - "startColumn": 1, - "charOffset": 3155, - "charLength": 138, - "snippet": { - "text": "\r\nint DBFunctions::luaDatabaseLastInsertId(lua_State* L) {\r\n\tlua_pushnumber(L, Database::getInstance().getLastInsertId());\r\n\treturn 1;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b5483de1941090e0", - "equalIndicator/v1": "345ea1923d4817c1b8b8d1e01c4c7c1f5dccdeeb435de346631ec20844c7f877" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructor does not initialize these fields: channelId", - "markdown": "Constructor does not initialize these fields: channelId" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 41, - "startColumn": 8, - "charOffset": 1119, - "charLength": 11, - "snippet": { - "text": "TextMessage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 39, - "startColumn": 1, - "charOffset": 1053, - "charLength": 170, - "snippet": { - "text": "using ProtocolGame_ptr = std::shared_ptr;\r\n\r\nstruct TextMessage {\r\n\tTextMessage() = default;\r\n\tTextMessage(MessageClasses initType, std::string initText) :\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bee6439c34f217d2", - "equalIndicator/v1": "34adc6639b56bf21f0834ae9ae8d97441aa791906bf58696294c842b2f134f2d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'tile' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'tile' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/utils/mapsector.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 28, - "startColumn": 51, - "charOffset": 815, - "charLength": 4, - "snippet": { - "text": "tile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 26, - "startColumn": 1, - "charOffset": 694, - "charLength": 133, - "snippet": { - "text": "\r\n\tvoid setTile(uint16_t x, uint16_t y, std::shared_ptr tile) {\r\n\t\ttiles[x & SECTOR_MASK][y & SECTOR_MASK].first = tile;\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "190ce71137cefd8c", - "equalIndicator/v1": "34bcc5c796444d580e26cf5c289eb4123b28bafce7ae643b750aa1bd02e81a36" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 713, - "startColumn": 15, - "charOffset": 23142, - "charLength": 11, - "snippet": { - "text": "static_cast" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 711, - "startColumn": 1, - "charOffset": 23102, - "charLength": 132, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 30) * 3.20f) + 4;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "90199f3689687000", - "equalIndicator/v1": "34c204d50aff85ba512ed394567193fa88821cf89579c19f1d8604523cd84be7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/player_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 977, - "startColumn": 53, - "charOffset": 26621, - "charLength": 6, - "snippet": { - "text": "Player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 975, - "startColumn": 1, - "charOffset": 26455, - "charLength": 217, - "snippet": { - "text": "int PlayerFunctions::luaPlayerAddMana(lua_State* L) {\r\n\t// player:addMana(manaChange[, animationOnLoss = false])\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (!player) {\r\n\t\tlua_pushnil(L);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6e5dc581b400a29c", - "equalIndicator/v1": "34c4d6327624e86631ed876734f4dc7630b12774bbfe3e9cd0dce64e8539d607" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 42, - "startColumn": 25, - "charOffset": 1655, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 40, - "startColumn": 1, - "charOffset": 1625, - "charLength": 174, - "snippet": { - "text": "\t}\r\n\r\n\tint32_t levelFormula = player->getLevel() * 2 + (player->getMagicLevel() + player->getSpecializedMagicLevel(damage.primary.type, true)) * 3;\r\n\treturn levelFormula;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "64edc00beb5bbcb3", - "equalIndicator/v1": "34f80b96588968b2a20c9663938c6bcc1c39edf169d237ebb415716a95b968d3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1739, - "startColumn": 2, - "charOffset": 52308, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1737, - "startColumn": 1, - "charOffset": 52226, - "charLength": 222, - "snippet": { - "text": "\tuint16_t itemId = msg.get();\r\n\tuint8_t fromStackPos = msg.getByte();\r\n\tuint32_t creatureId = msg.get();\r\n\tg_game().playerUseWithCreature(player->getID(), fromPos, fromStackPos, creatureId, itemId);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9576b3a2eca84d2c", - "equalIndicator/v1": "35110e79c8aa0b70132b0a603179093960be103347ce37bcd1681bbdb3d28efa" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 899, - "startColumn": 14, - "charOffset": 24878, - "charLength": 8, - "snippet": { - "text": "blockHit" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 897, - "startColumn": 1, - "charOffset": 24841, - "charLength": 288, - "snippet": { - "text": "\t\treturn pzLocked;\r\n\t}\r\n\tBlockType_t blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense = false, bool checkArmor = false, bool field = false) override;\r\n\tvoid doAttacking(uint32_t interval) override;\r\n\tbool hasExtraSwing() override {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ffd5630ad3571c37", - "equalIndicator/v1": "3528adb2862ca4fc640069213bdc11de9ac7402b8629022730cc5854236d1bb4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 515, - "startColumn": 8, - "charOffset": 12752, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 513, - "startColumn": 1, - "charOffset": 12652, - "charLength": 217, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetDestroyId(lua_State* L) {\r\n\t// itemType:getDestroyId()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->destroyTo);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b3e9e3f932cf41ae", - "equalIndicator/v1": "352a1a86c6fdcaf0fc6434c3f362206ad458260fb0ce587528de06e533b710b1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 131, - "startColumn": 11, - "charOffset": 3651, - "charLength": 9, - "snippet": { - "text": "getWeight" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 129, - "startColumn": 1, - "charOffset": 3575, - "charLength": 140, - "snippet": { - "text": "\tuint32_t getContainerHoldingCount();\r\n\tuint16_t getFreeSlots();\r\n\tuint32_t getWeight() const override final;\r\n\r\n\tbool isUnlocked() const {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1e71562d59253294", - "equalIndicator/v1": "357412fc130d9f11294b07aaffaa8453442f888d83ad255a67b2d83f44a258e1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/kv.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 137, - "startColumn": 30, - "charOffset": 4488, - "charLength": 3, - "snippet": { - "text": "get" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 135, - "startColumn": 1, - "charOffset": 4453, - "charLength": 151, - "snippet": { - "text": "\t}\r\n\r\n\tstd::optional get(const std::string &key, bool forceLoad = false) override {\r\n\t\treturn rootKV_.get(buildKey(key), forceLoad);\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "423fc3eed3f8cff4", - "equalIndicator/v1": "35a179ebb883584c51ff0d4cc80807e970d98a8f7a2f60d56226f901a435ed32" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 665, - "startColumn": 79, - "charOffset": 18090, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 663, - "startColumn": 1, - "charOffset": 18007, - "charLength": 198, - "snippet": { - "text": "}\r\n\r\nvoid ConditionAttributes::updateCharmChanceModifier(std::shared_ptr creature) const {\r\n\tcreature->setCharmChanceModifier(creature->getCharmChanceModifier() + charmChanceModifier);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2fcca19c7d2fb684", - "equalIndicator/v1": "35a9e225f81b56f1e9b4a7d36d13eed78543649b42aac16dc3b8f1b70bec3df5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1382, - "startColumn": 35, - "charOffset": 41523, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1380, - "startColumn": 1, - "charOffset": 41398, - "charLength": 145, - "snippet": { - "text": "\tvoid sendPartyCreatureSkull(std::shared_ptr creature) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPartyCreatureSkull(creature);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9a0a96b4437f1e27", - "equalIndicator/v1": "35ba105d31f2d0917384017ddab0dcce35742e4acacb9b3bda728a3722b774d4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1554, - "startColumn": 2, - "charOffset": 46049, - "charLength": 7, - "snippet": { - "text": "uint8_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1552, - "startColumn": 1, - "charOffset": 45974, - "charLength": 170, - "snippet": { - "text": "void capitalizeWords(std::string &source) {\r\n\ttoLowerCaseString(source);\r\n\tuint8_t size = (uint8_t)source.size();\r\n\tfor (uint8_t i = 0; i < size; i++) {\r\n\t\tif (i == 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7e8f56c7c4cf8a8a", - "equalIndicator/v1": "35d4782c7c26e448d846f3bcacb8654ee278274374f600ead916c71a76bbad94" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 688, - "startColumn": 41, - "charOffset": 26466, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 686, - "startColumn": 1, - "charOffset": 26420, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "06502f70e80f318a", - "equalIndicator/v1": "35e008969ba230a3a03e237fc00ac430ec807488306529a818b16364ea0824bf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 670, - "startColumn": 15, - "charOffset": 21930, - "charLength": 11, - "snippet": { - "text": "static_cast" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 668, - "startColumn": 1, - "charOffset": 21890, - "charLength": 132, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.25f) + 3;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0ce13fcbe5a7bb13", - "equalIndicator/v1": "35e3f78dc176a190ceb718ccad73352a4bb9e6acb72fe94f7ccf1a067252e6de" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3952, - "startColumn": 127, - "charOffset": 118657, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3950, - "startColumn": 1, - "charOffset": 118526, - "charLength": 323, - "snippet": { - "text": "}\r\n\r\nvoid Player::calculateDamageReductionFromItem(std::array &combatReductionArray, std::shared_ptr item) const {\r\n\tfor (uint16_t combatTypeIndex = 0; combatTypeIndex < COMBAT_COUNT; combatTypeIndex++) {\r\n\t\tupdateDamageReductionFromItemImbuement(combatReductionArray, item, combatTypeIndex);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "309aa41fba2e12eb", - "equalIndicator/v1": "35e9c3e75799e731929eb30fa81aef18732bc2f4c45b782ca4099c89266882a1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::_Vector_iterator>>::value_type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'std::_Vector_iterator\\>\\>::value_type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 86, - "startColumn": 32, - "charOffset": 2625, - "charLength": 8, - "snippet": { - "text": "actionId" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 84, - "startColumn": 1, - "charOffset": 2544, - "charLength": 150, - "snippet": { - "text": "\r\n\tfor (const auto &actionId : actionIdVector) {\r\n\t\tif (registerEvent(moveEvent, actionId, actionIdMap)) {\r\n\t\t\ttmpVector.emplace_back(actionId);\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "03c4acfe0d4d3c33", - "equalIndicator/v1": "35f22517cca2ed2820d10e01e947e1c5242efecdfd800958322f051e89a161e4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/movement/teleport.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 123, - "startColumn": 16, - "charOffset": 3993, - "charLength": 22, - "snippet": { - "text": "postRemoveNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 121, - "startColumn": 1, - "charOffset": 3973, - "charLength": 223, - "snippet": { - "text": "}\r\n\r\nvoid Teleport::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tgetParent()->postRemoveNotification(thing, newParent, index, LINK_PARENT);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a90da50f72ca0869", - "equalIndicator/v1": "35f31ab26324c00ff2196474bee16157efcc6cdeb385f008b8d54795a1712939" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/lua_functions_loader.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 214, - "startColumn": 79, - "charOffset": 6584, - "charLength": 8, - "snippet": { - "text": "cylinder" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 212, - "startColumn": 1, - "charOffset": 6501, - "charLength": 155, - "snippet": { - "text": "}\r\n\r\nvoid LuaFunctionsLoader::pushCylinder(lua_State* L, std::shared_ptr cylinder) {\r\n\tif (validateDispatcherContext(__FUNCTION__)) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "571f1a3125aac472", - "equalIndicator/v1": "35f6777515ae43cc6c2cd72d4b2bc9f0e7475e7cdb249acc6d7328cec5a5cbe0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/housetile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 25, - "startColumn": 14, - "charOffset": 938, - "charLength": 11, - "snippet": { - "text": "queryRemove" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 23, - "startColumn": 1, - "charOffset": 765, - "charLength": 380, - "snippet": { - "text": "\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override;\r\n\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\r\n\tvoid addThing(int32_t index, std::shared_ptr thing) override;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "42d6e9975c892a69", - "equalIndicator/v1": "3615a1ad3c9ebeeb239dbea18230d7d99ebcf5db4fbce4554d4bc61dbb3cc2b9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/bank_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 38, - "startColumn": 21, - "charOffset": 992, - "charLength": 4, - "snippet": { - "text": "bank" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 36, - "startColumn": 1, - "charOffset": 940, - "charLength": 87, - "snippet": { - "text": "\t}\r\n\tif (lua_gettop(L) == 1) {\r\n\t\tlua_pushnumber(L, bank->balance());\r\n\t\treturn 1;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "99b5b2acf921dc93", - "equalIndicator/v1": "361651e90b6ac1a70da3425881816a2aee78a8e408651dc47583ab97853f0f3b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1644, - "startColumn": 3, - "charOffset": 57786, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1642, - "startColumn": 1, - "charOffset": 57668, - "charLength": 168, - "snippet": { - "text": "\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r\n\t\treturn;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6c12262419bf2628", - "equalIndicator/v1": "3620504309b833070cd29a41d13632587b0cfc4a921cfd34dcdea029797fd841" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 341, - "startColumn": 10, - "charOffset": 9576, - "charLength": 15, - "snippet": { - "text": "getWeaponDamage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 339, - "startColumn": 1, - "charOffset": 9512, - "charLength": 346, - "snippet": { - "text": "\tvoid configureWeapon(const ItemType &it) override;\r\n\r\n\tint32_t getWeaponDamage(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, bool maxDamage = false) const override;\r\n\tint32_t getElementDamage(std::shared_ptr, std::shared_ptr, std::shared_ptr) const override {\r\n\t\treturn 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2637e9e745472959", - "equalIndicator/v1": "3625a1062d62aa4aabcef90351863ca69510c66d83335889c9432cc41fc01c22" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8030, - "startColumn": 91, - "charOffset": 252239, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8028, - "startColumn": 1, - "charOffset": 252144, - "charLength": 148, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendUpdateInputAnalyzer(CombatType_t type, int32_t amount, std::string target) {\r\n\tif (!player || oldProtocol) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cb023ad7871b4621", - "equalIndicator/v1": "3626789c8a418503d4bb322cd5b9fdccbbc539880ddfbee8442315af4105be56" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1797, - "startColumn": 52, - "charOffset": 48530, - "charLength": 3, - "snippet": { - "text": "med" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1795, - "startColumn": 1, - "charOffset": 48412, - "charLength": 151, - "snippet": { - "text": "\r\n\t\t\tx1 = std::fabs(1.0 - ((static_cast(sum)) + i) / med);\r\n\t\t\tx2 = std::fabs(1.0 - (static_cast(sum) / med));\r\n\t\t} while (x1 < x2);\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "047060ceaafdd96e", - "equalIndicator/v1": "3639759d33ce8b063914006e5a81250052b726da95f1fab647ce579b2a011b97" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4216, - "startColumn": 14, - "charOffset": 126934, - "charLength": 22, - "snippet": { - "text": "postRemoveNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4214, - "startColumn": 1, - "charOffset": 126916, - "charLength": 222, - "snippet": { - "text": "}\r\n\r\nvoid Player::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link /*= LINK_OWNER*/) {\r\n\tif (link == LINK_OWNER) {\r\n\t\t// calling movement scripts\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fd537e5c281dc735", - "equalIndicator/v1": "363b9f168586ef737bbf321bb0ea599acc31d9f3f2dbe317d305528b52ea7fcc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'", - "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3478, - "startColumn": 20, - "charOffset": 106844, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3476, - "startColumn": 1, - "charOffset": 106722, - "charLength": 233, - "snippet": { - "text": "\tmsg.add(player->getBaseMagicLevel());\r\n\tmsg.add(player->getLoyaltyMagicLevel());\r\n\tmsg.add(player->getMagicLevelPercent() * 100);\r\n\r\n\tfor (uint8_t i = SKILL_FIRST; i < SKILL_CRITICAL_HIT_CHANCE; ++i) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "71c3cd35df808aa3", - "equalIndicator/v1": "3640d42fe3a9b7918803bdd0cf1b11da01e58f64213826433859c7d088ee0bd0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'long long' to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'long long' to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/libs/result_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 22, - "startColumn": 20, - "charOffset": 719, - "charLength": 3, - "snippet": { - "text": "res" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 20, - "startColumn": 1, - "charOffset": 656, - "charLength": 107, - "snippet": { - "text": "\r\n\tconst std::string &s = getString(L, 2);\r\n\tlua_pushnumber(L, res->getNumber(s));\r\n\treturn 1;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fa137ed0ed214d3a", - "equalIndicator/v1": "3673208f8622326839ea5f42db075dfe7ad00d9401ab084cb89ce36187129911" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 423, - "startColumn": 147, - "charOffset": 13873, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 421, - "startColumn": 1, - "charOffset": 13722, - "charLength": 328, - "snippet": { - "text": "}\r\n\r\nbool Actions::useItemEx(std::shared_ptr player, const Position &fromPos, const Position &toPos, uint8_t toStackPos, std::shared_ptr item, bool isHotkey, std::shared_ptr creature /* = nullptr*/) {\r\n\tconst ItemType &it = Item::items[item->getID()];\r\n\tif (it.isRune() || it.type == ITEM_TYPE_POTION) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4a1d35a4ed83b8bc", - "equalIndicator/v1": "36a267d0821b8e6f47e7dd0c2be661a01fd7042f7a1474a4298bf773870e48b7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 285, - "startColumn": 52, - "charOffset": 8777, - "charLength": 8, - "snippet": { - "text": "attacker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 283, - "startColumn": 1, - "charOffset": 8721, - "charLength": 188, - "snippet": { - "text": "}\r\n\r\nbool Combat::isInPvpZone(std::shared_ptr attacker, std::shared_ptr target) {\r\n\treturn attacker->getZoneType() == ZONE_PVP && target->getZoneType() == ZONE_PVP;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e63d2485726347d8", - "equalIndicator/v1": "36c8d72af91522912ff234aae3b61019978f4b9fd06dac5502af58328420f448" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1159, - "startColumn": 31, - "charOffset": 34133, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1157, - "startColumn": 1, - "charOffset": 34001, - "charLength": 159, - "snippet": { - "text": "\tvoid sendCreatureSquare(std::shared_ptr creature, SquareColor_t color) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureSquare(creature, color);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "669eeabc107f6fe5", - "equalIndicator/v1": "36e42bd0cecaaf282441ea9b8ff73d7a4f6103252ad7cafa160ce6cae9b1fb6b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1039, - "startColumn": 7, - "charOffset": 39507, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1037, - "startColumn": 1, - "charOffset": 39373, - "charLength": 279, - "snippet": { - "text": "// Monster\r\nvoid EventCallback::monsterOnDropLoot(std::shared_ptr monster, std::shared_ptr corpse) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::monsterOnDropLoot - \"\r\n\t\t \"Monster corpse {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d5487655ce8737c6", - "equalIndicator/v1": "36f8be059bbf2d81ca9ecc096454079b75b59ff3d689027c19e09c964fd142cd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1164, - "startColumn": 31, - "charOffset": 34302, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1162, - "startColumn": 1, - "charOffset": 34161, - "charLength": 169, - "snippet": { - "text": "\tvoid sendCreatureChangeOutfit(std::shared_ptr creature, const Outfit_t &outfit) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureOutfit(creature, outfit);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3aea5ab01483e8e6", - "equalIndicator/v1": "36fe908b0096a325ea26e51b50b3f16baafa1b7bc830ef29ab4ba98ac0d6601f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'targetPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'targetPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7403, - "startColumn": 93, - "charOffset": 257851, - "charLength": 12, - "snippet": { - "text": "targetPlayer" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7401, - "startColumn": 1, - "charOffset": 257633, - "charLength": 320, - "snippet": { - "text": "void Game::sendMessages(\r\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\r\n\tconst Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetPlayer,\r\n\tTextMessage &message, const CreatureVector &spectators, int32_t realDamage\r\n) const {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7ccf5e476e6b69b9", - "equalIndicator/v1": "370751d1f9cd9bc7be5927ddd92680762b465600f0156b082091c2a97ff929d4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2931, - "startColumn": 3, - "charOffset": 89513, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2929, - "startColumn": 1, - "charOffset": 89488, - "charLength": 231, - "snippet": { - "text": "\r\n\tif (search == 1) {\r\n\t\tuint16_t monsterAmount = msg.get();\r\n\t\tstd::map mtype_list = g_game().getBestiaryList();\r\n\t\tfor (uint16_t monsterCount = 1; monsterCount <= monsterAmount; monsterCount++) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "995776f7828a344c", - "equalIndicator/v1": "3712e733047bd44c6ad055342faf0ea58d05d66d87aefd82a9f732783fd16b72" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 144, - "startColumn": 113, - "charOffset": 4020, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 142, - "startColumn": 1, - "charOffset": 3903, - "charLength": 215, - "snippet": { - "text": "}\r\n\r\nCombatDamage Weapon::getCombatDamage(CombatDamage combat, std::shared_ptr player, std::shared_ptr item, int32_t damageModifier) const {\r\n\t// Local variables\r\n\tuint32_t level = player->getLevel();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "52c4efeb88949720", - "equalIndicator/v1": "371b27cb6aa5cd7d9907ca2b13098862cb80bc779266f6a3113bd7ca5fe1e8f9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'removeCreature' is within a recursive call chain", - "markdown": "Function 'removeCreature' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1147, - "startColumn": 12, - "charOffset": 46888, - "charLength": 14, - "snippet": { - "text": "removeCreature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1145, - "startColumn": 1, - "charOffset": 46872, - "charLength": 192, - "snippet": { - "text": "}\r\n\r\nbool Game::removeCreature(std::shared_ptr creature, bool isLogout /* = true*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!creature || creature->isRemoved()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d7f83589b5b35c1c", - "equalIndicator/v1": "3727d2800c900da9643a4b35ce0f2a113dfb510ad01b8a3cf285152c57fb4c84" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 151, - "startColumn": 7, - "charOffset": 5297, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 149, - "startColumn": 1, - "charOffset": 5129, - "charLength": 315, - "snippet": { - "text": "\r\nvoid EventCallback::creatureOnHear(std::shared_ptr creature, std::shared_ptr speaker, const std::string &words, SpeakClasses type) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnHear - \"\r\n\t\t \"Creature {} speaker {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9b793f2ed47c1ac5", - "equalIndicator/v1": "3799afb4b20c1369039d5a3342ad248c52370239fdca9750db7bd2ecd867078d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2696, - "startColumn": 2, - "charOffset": 83035, - "charLength": 21, - "snippet": { - "text": "PartyAnalyzerAction_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2694, - "startColumn": 1, - "charOffset": 83028, - "charLength": 161, - "snippet": { - "text": "\t}\r\n\r\n\tPartyAnalyzerAction_t action = static_cast(msg.getByte());\r\n\tif (action == PARTYANALYZERACTION_RESET) {\r\n\t\tparty->resetAnalyzer();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f4ee5d4382e267a9", - "equalIndicator/v1": "379bbdf7bbd4f39d1c6a02659cb171638436012fe003f9bad3afdd2b9c1bcd95" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6896, - "startColumn": 29, - "charOffset": 239199, - "charLength": 52, - "snippet": { - "text": "(damage.secondary.value * (damage.damageMultiplier))" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6894, - "startColumn": 1, - "charOffset": 239048, - "charLength": 218, - "snippet": { - "text": "\tif (damage.damageMultiplier > 0) {\r\n\t\tdamage.primary.value += (damage.primary.value * (damage.damageMultiplier)) / 100.;\r\n\t\tdamage.secondary.value += (damage.secondary.value * (damage.damageMultiplier)) / 100.;\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4e423c53f236d486", - "equalIndicator/v1": "37cc5ded1b22413a0333bf5e915ccd31be0a292adf0566695101583e12998f75" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 293, - "startColumn": 111, - "charOffset": 10555, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 291, - "startColumn": 1, - "charOffset": 10440, - "charLength": 246, - "snippet": { - "text": "}\r\n\r\nReturnValue Events::eventCreatureOnTargetCombat(std::shared_ptr creature, std::shared_ptr target) {\r\n\t// Creature:onTargetCombat(target) or Creature.onTargetCombat(self, target)\r\n\tif (info.creatureOnTargetCombat == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cc7d691849bdf6b4", - "equalIndicator/v1": "37dae1963685ec92b03400e8718890150225c076b5e22319dfbecc0d1e0fde79" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/bank/bank.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 122, - "startColumn": 46, - "charOffset": 3136, - "charLength": 6, - "snippet": { - "text": "amount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 120, - "startColumn": 1, - "charOffset": 3062, - "charLength": 169, - "snippet": { - "text": "\r\n\tif (destinationPlayer) {\r\n\t\tg_metrics().addCounter(\"balance_increase\", amount, { { \"player\", destinationPlayer->getName() }, { \"context\", \"bank_transfer\" } });\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d654df2567e8da37", - "equalIndicator/v1": "37e49ad5fecd1798f5ad91ad836e74d99845d622a8eb4c9d25b11439d3a484fb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::list>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'std::list\\>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/map/house_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 283, - "startColumn": 21, - "charOffset": 7880, - "charLength": 5, - "snippet": { - "text": "house" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 281, - "startColumn": 1, - "charOffset": 7774, - "charLength": 163, - "snippet": { - "text": "\t// house:getDoorCount()\r\n\tif (const auto &house = getUserdataShared(L, 1)) {\r\n\t\tlua_pushnumber(L, house->getDoors().size());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9e0a4456a45a65ec", - "equalIndicator/v1": "380d7ca63d6cf2c743ff936b8ed3dab762c8fc51099ef661f3607c54d8973a88" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/inbox/inbox.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 42, - "startColumn": 15, - "charOffset": 1240, - "charLength": 9, - "snippet": { - "text": "container" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 40, - "startColumn": 1, - "charOffset": 1106, - "charLength": 202, - "snippet": { - "text": "\tif (item->getTopParent().get() != this) { // MY\r\n\t\tif (std::shared_ptr container = item->getContainer()) {\r\n\t\t\taddCount = container->getItemHoldingCount() + 1;\r\n\t\t} else {\r\n\t\t\taddCount = 1;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5904e1e691f3fc3f", - "equalIndicator/v1": "38464be0b86bd901df599160d4862b553e966d0efeafe3eabc8fe898c5073848" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 381, - "startColumn": 27, - "charOffset": 13781, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 379, - "startColumn": 1, - "charOffset": 13749, - "charLength": 132, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.creatureOnDrainHealth, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "567fa7de4ee34f71", - "equalIndicator/v1": "388836dd34947a7674d913667866a9150d577792ef55d06972463ab1ac4a9a3f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to 'float_t' (aka 'float')", - "markdown": "Narrowing conversion from 'int' to 'float_t' (aka 'float')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/game_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 318, - "startColumn": 2, - "charOffset": 9417, - "charLength": 2, - "snippet": { - "text": "if" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 316, - "startColumn": 1, - "charOffset": 9370, - "charLength": 151, - "snippet": { - "text": "\r\n\tconst ItemType &it = Item::items[itemId];\r\n\tif (it.hasSubType()) {\r\n\t\tif (it.stackable) {\r\n\t\t\titemCount = std::ceil(count / (float_t)it.stackSize);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "42f5f57135d796c9", - "equalIndicator/v1": "389334791cd9eb4ced6368a30f136684da887027849909172e42f0a5b389cb0c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3417, - "startColumn": 59, - "charOffset": 125998, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3415, - "startColumn": 1, - "charOffset": 125935, - "charLength": 176, - "snippet": { - "text": "}\r\n\r\nbool Game::playerBroadcastMessage(std::shared_ptr player, const std::string &text) const {\r\n\tif (!player->hasFlag(PlayerFlags_t::CanBroadcast)) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4252e90f51ae8de2", - "equalIndicator/v1": "38b130d656003e825ea89019f8fbf7465d9fcc74cfd41254e79ad38f979b564c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/npcs/npc.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 437, - "startColumn": 23, - "charOffset": 15251, - "charLength": 9, - "snippet": { - "text": "totalCost" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 435, - "startColumn": 1, - "charOffset": 15157, - "charLength": 112, - "snippet": { - "text": "\t\tcallback.pushBoolean(ignore);\r\n\t\tcallback.pushString(itemType.name);\r\n\t\tcallback.pushNumber(totalCost);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "75453edc1fc43fc9", - "equalIndicator/v1": "38c1e99b6a26d4739007ed001f1c9fbbca61e84ff1ed038005913745428898d8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use range-based for loop instead", - "markdown": "Use range-based for loop instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 228, - "startColumn": 3, - "charOffset": 5759, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 226, - "startColumn": 1, - "charOffset": 5702, - "charLength": 185, - "snippet": { - "text": "\r\n\tif (const TileItemVector* items = getItemList()) {\r\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\r\n\t\t\tif ((*it)->getBed()) {\r\n\t\t\t\treturn (*it)->getBed();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6c1640281eff2afe", - "equalIndicator/v1": "38d60c6d04d55d625cd85962292e8f75fa0669876d6850707b310cd54864011f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 711, - "startColumn": 121, - "charOffset": 23513, - "charLength": 27, - "snippet": { - "text": "spellSecondaryGroupCooldown" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 709, - "startColumn": 1, - "charOffset": 23346, - "charLength": 280, - "snippet": { - "text": "\t\t}\r\n\t\tif (spellSecondaryGroupCooldown > 0) {\r\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLGROUPCOOLDOWN, spellSecondaryGroupCooldown / rateCooldown, 0, false, secondaryGroup);\r\n\t\t\tplayer->addCondition(condition);\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e4ffd29b9b8e6ebd", - "equalIndicator/v1": "3907af3482ae78ed2afb56031f4183a00209d0b8c669999c20e19303e98d6c14" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/functions/iologindata_save_player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 486, - "startColumn": 68, - "charOffset": 19375, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 484, - "startColumn": 1, - "charOffset": 19303, - "charLength": 183, - "snippet": { - "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerDepotItems(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6fe96ce7af5cb171", - "equalIndicator/v1": "390ccd42403ee1e7659e3cd2b057ab419ddaeea2717c1633d503a12b408853fe" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 638, - "startColumn": 63, - "charOffset": 22713, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 636, - "startColumn": 1, - "charOffset": 22646, - "charLength": 306, - "snippet": { - "text": "}\r\n\r\nvoid Events::eventPlayerOnLookInTrade(std::shared_ptr player, std::shared_ptr partner, std::shared_ptr item, int32_t lookDistance) {\r\n\t// Player:onLookInTrade(partner, item, distance) or Player.onLookInTrade(self, partner, item, distance)\r\n\tif (info.playerOnLookInTrade == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "89ff57bf68e8b7f3", - "equalIndicator/v1": "3916ba15bb027820ff5bdc357b38c5a3114155bcdcaf59c3ad2c62a0b4c8eaac" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'virtual' is redundant since the function is already declared 'override'", - "markdown": "'virtual' is redundant since the function is already declared 'override'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/cylinder.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 185, - "startColumn": 22, - "charOffset": 7381, - "charLength": 11, - "snippet": { - "text": "queryRemove" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 183, - "startColumn": 1, - "charOffset": 7321, - "charLength": 211, - "snippet": { - "text": "\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r\n\tvirtual ReturnValue queryRemove(const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr = nullptr) override {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cb3d35a3e2819ca9", - "equalIndicator/v1": "39215b3c99a56913b595d9373ffdf9a1649da7b0dcbd33ba4997c1cb7f712314" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 734, - "startColumn": 19, - "charOffset": 22450, - "charLength": 10, - "snippet": { - "text": "-oldWeight" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 732, - "startColumn": 1, - "charOffset": 22382, - "charLength": 130, - "snippet": { - "text": "\titem->setID(itemId);\r\n\titem->setSubType(count);\r\n\tupdateItemWeight(-oldWeight + item->getWeight());\r\n\r\n\t// send change to client\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9974e2e5b5fdeae0", - "equalIndicator/v1": "3945c287217f0d7f105f8422d9ee846a5506188d6aeffcc73877ea850d05b992" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2515, - "startColumn": 70, - "charOffset": 95908, - "charLength": 8, - "snippet": { - "text": "cylinder" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2513, - "startColumn": 1, - "charOffset": 95834, - "charLength": 245, - "snippet": { - "text": "}\r\n\r\nstd::shared_ptr Game::findItemOfType(std::shared_ptr cylinder, uint16_t itemId, bool depthSearch /*= true*/, int32_t subType /*= -1*/) const {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (cylinder == nullptr) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9b809aa061b7735e", - "equalIndicator/v1": "3945cb96beb3543c98d6bb45c1b9bfc6fe742e236f0683bdd68f3ed3727071cd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 574, - "startColumn": 3, - "charOffset": 27034, - "charLength": 73, - "snippet": { - "text": "abilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 572, - "startColumn": 1, - "charOffset": 26917, - "charLength": 342, - "snippet": { - "text": "\t\tint16_t value = pugi::cast(valueAttribute.value());\r\n\t\tAbilities &abilities = itemType.getAbilities();\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2a763f157f99ea92", - "equalIndicator/v1": "39692f3424f0c6e5a909f977fa4af870d76185be29f7333a7c2f1d594698d409" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/npcs/npc.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 464, - "startColumn": 58, - "charOffset": 15947, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 462, - "startColumn": 1, - "charOffset": 15885, - "charLength": 149, - "snippet": { - "text": "}\r\n\r\nvoid Npc::onPlayerCloseChannel(std::shared_ptr creature) {\r\n\tstd::shared_ptr player = creature->getPlayer();\r\n\tif (!player) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fcd49e320a697a14", - "equalIndicator/v1": "3970bd4f27ba02c8978b3b0ac6dc6c4b8bb23c560d2c015548c7358b0c7bfd22" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/player_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2283, - "startColumn": 26, - "charOffset": 79602, - "charLength": 10, - "snippet": { - "text": "std::round" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2281, - "startColumn": 1, - "charOffset": 79484, - "charLength": 276, - "snippet": { - "text": "\tint32_t healingBonus = 0;\r\n\tuint8_t stage = getStage(WheelStage_t::BLESSING_OF_THE_GROVE);\r\n\tint32_t healthPercent = std::round((static_cast(target->getHealth()) * 100) / static_cast(target->getMaxHealth()));\r\n\tif (healthPercent <= 30) {\r\n\t\tif (stage >= 3) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fe019caed52a5dd5", - "equalIndicator/v1": "39c274ed6c5eef32eb031a2306408de897da4126a0c2c9bfa87a549fcec74439" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 774, - "startColumn": 52, - "charOffset": 25167, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 772, - "startColumn": 1, - "charOffset": 25053, - "charLength": 232, - "snippet": { - "text": "\t\t\tauto conditionCopy = condition->clone();\r\n\t\t\tif (caster) {\r\n\t\t\t\tconditionCopy->setParam(CONDITION_PARAM_OWNER, caster->getID());\r\n\t\t\t\tconditionCopy->setPositionParam(CONDITION_PARAM_CASTER_POSITION, caster->getPosition());\r\n\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d748b1f90d9019ae", - "equalIndicator/v1": "39e056391954c198f671da5e592e593c66b3ad233e079ec7bc924ee8d8c95eee" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iobestiary.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 72, - "startColumn": 31, - "charOffset": 2806, - "charLength": 28, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 70, - "startColumn": 1, - "charOffset": 2687, - "charLength": 260, - "snippet": { - "text": "\tint32_t bitToggle(int32_t input, const std::shared_ptr charm, bool on) const;\r\n\r\n\tbool hasCharmUnlockedRuneBit(const std::shared_ptr charm, int32_t input) const;\r\n\r\n\tstd::list getCharmUsedRuneBitAll(std::shared_ptr player);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e4ce3bc1e8932837", - "equalIndicator/v1": "39f596abc408242c3354662c03b9da610a0b2cc3f70b2b8910500aa96dd40be8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use '= default' to define a trivial destructor", - "markdown": "Use '= default' to define a trivial destructor" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 107, - "startColumn": 11, - "charOffset": 2622, - "charLength": 4, - "snippet": { - "text": "Tile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 105, - "startColumn": 1, - "charOffset": 2544, - "charLength": 109, - "snippet": { - "text": "\tTile(uint16_t x, uint16_t y, uint8_t z) :\r\n\t\ttilePos(x, y, z) { }\r\n\tvirtual ~Tile() {};\r\n\r\n\t// non-copyable\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1703faaf0983e531", - "equalIndicator/v1": "3a0dbff7671ca0b8a062e65d7c3a16edfaa5042bf7d5795696bc8a4d21d59197" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/mailbox/mailbox.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 66, - "startColumn": 15, - "charOffset": 1967, - "charLength": 19, - "snippet": { - "text": "postAddNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 64, - "startColumn": 1, - "charOffset": 1948, - "charLength": 216, - "snippet": { - "text": "}\r\n\r\nvoid Mailbox::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tgetParent()->postAddNotification(thing, oldParent, index, LINK_PARENT);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fc331311e39a5dc6", - "equalIndicator/v1": "3a2500e778bd126468a28fc512a1cdbd41c3908450f5beb17fce1d3ad8a3a90a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 495, - "startColumn": 99, - "charOffset": 14779, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 493, - "startColumn": 1, - "charOffset": 14676, - "charLength": 263, - "snippet": { - "text": "}\r\n\r\nuint32_t MoveEvent::EquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool isCheck) {\r\n\tif (player == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e00063da595c6b31", - "equalIndicator/v1": "3a755c28a62405d7d5cb6a1e17e95eda0bcd0c74140896e58846fd096c592ff1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 124, - "startColumn": 10, - "charOffset": 3561, - "charLength": 6, - "snippet": { - "text": "health" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 122, - "startColumn": 1, - "charOffset": 3520, - "charLength": 83, - "snippet": { - "text": "\r\n\tint32_t getHealth() const {\r\n\t\treturn health;\r\n\t}\r\n\tvoid setHealth(int32_t h) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b75267324fdc7c58", - "equalIndicator/v1": "3aa48705bd621f0faea460cb1bee843b98a1d3c1e137ba7b87f90f79af2a7f4c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 466, - "startColumn": 17, - "charOffset": 12301, - "charLength": 9, - "snippet": { - "text": "shopBlock" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 464, - "startColumn": 1, - "charOffset": 12173, - "charLength": 237, - "snippet": { - "text": "\tauto playerGUID = getNumber(L, 2, 0);\r\n\tconst auto &shopItems = npc->getShopItemVector(playerGUID);\r\n\tfor (ShopBlock shopBlock : shopItems) {\r\n\t\tsetField(L, \"id\", shopBlock.itemId);\r\n\t\tsetField(L, \"name\", shopBlock.itemName);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "92f12847ce43e177", - "equalIndicator/v1": "3ac5c98a2210217d41564ef4d8eccc1365d0b4867577ee8badaad9290f28ab29" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with new to avoid duplicating the type name", - "markdown": "Use auto when initializing with new to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 216, - "startColumn": 4, - "charOffset": 7097, - "charLength": 18, - "snippet": { - "text": "ItemClassification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 214, - "startColumn": 1, - "charOffset": 7054, - "charLength": 191, - "snippet": { - "text": "\t\t\treturn *it;\r\n\t\t} else if (create) {\r\n\t\t\tItemClassification* itemClassification = new ItemClassification(id);\r\n\t\t\taddItemsClassification(itemClassification);\r\n\t\t\treturn itemClassification;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "588e318879a8ef69", - "equalIndicator/v1": "3ac7597e93de4c93f9e130d1a7a01ad14c63bea0040e40787de86b2a7bf6796d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 10331, - "startColumn": 60, - "charOffset": 359055, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 10329, - "startColumn": 1, - "charOffset": 358991, - "charLength": 178, - "snippet": { - "text": "}\r\n\r\nvoid Game::removePlayerUniqueLogin(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().error(\"Attempted to remove null player from unique player names list.\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5844c775e972047f", - "equalIndicator/v1": "3adce66d3cea6a804294df8310f289e2a067a2b38d6721591be2d8c1af15db3d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'float'", - "markdown": "Narrowing conversion from 'double' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/io_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 627, - "startColumn": 26, - "charOffset": 29475, - "charLength": 19, - "snippet": { - "text": "MITIGATION_INCREASE" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 625, - "startColumn": 1, - "charOffset": 29277, - "charLength": 346, - "snippet": { - "text": "// SLOT_RED_50 = 16\r\nvoid IOWheel::slotRed50(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\r\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\r\n\tif (isKnight(vocationCipId)) {\r\n\t\taddSpell(player, bonusData, WheelSlots_t::SLOT_RED_50, points, \"Fierce Berserk\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "33a9112f080fbf1d", - "equalIndicator/v1": "3af5239363679d74997899cb22d46e3be8edbd16845b894369237892983692e3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 917, - "startColumn": 29, - "charOffset": 27612, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 915, - "startColumn": 1, - "charOffset": 27517, - "charLength": 249, - "snippet": { - "text": "\tuint16_t counter = std::max(0, capacity() - size());\r\n\r\n\tfor (std::shared_ptr item : itemlist) {\r\n\t\tif (std::shared_ptr container = item->getContainer()) {\r\n\t\t\tcounter += std::max(0, container->getFreeSlots());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "837ea3b357a04b33", - "equalIndicator/v1": "3af68a056af047e19440df2e71cf24880c9cc9b86ca820c6311fb9a5b5e0a726" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2786, - "startColumn": 44, - "charOffset": 82933, - "charLength": 10, - "snippet": { - "text": "experience" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2784, - "startColumn": 1, - "charOffset": 82871, - "charLength": 311, - "snippet": { - "text": "\r\n\t\t// Level loss\r\n\t\tuint64_t expLoss = static_cast(experience * deathLossPercent);\r\n\t\tg_events().eventPlayerOnLoseExperience(static_self_cast(), expLoss);\r\n\t\tg_callbacks().executeCallback(EventCallback_t::playerOnLoseExperience, &EventCallback::playerOnLoseExperience, getPlayer(), expLoss);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6f1c9bccf117cf1a", - "equalIndicator/v1": "3b197a37a9226d03c9c8719033d919b7d9f6010d621d49f5b1fd217fa15e486c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5718, - "startColumn": 63, - "charOffset": 168940, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5716, - "startColumn": 1, - "charOffset": 168873, - "charLength": 128, - "snippet": { - "text": "}\r\n\r\nGuildEmblems_t Player::getGuildEmblem(std::shared_ptr player) const {\r\n\tif (!player) {\r\n\t\treturn GUILDEMBLEM_NONE;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "26587da9c5fa57e7", - "equalIndicator/v1": "3b268b21c874079c3273123e8f3834d9f3c0fdeeee1c00e9ae7bf2bb0cff5d43" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1274, - "startColumn": 69, - "charOffset": 39174, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1272, - "startColumn": 1, - "charOffset": 39101, - "charLength": 178, - "snippet": { - "text": "}\r\n\r\nbool Creature::deprecatedOnKilledCreature(std::shared_ptr target, bool lastHit) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tauto master = getMaster();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8581ef0c68924efa", - "equalIndicator/v1": "3b38f29a2335c8f2c706241c235af5d64624fe4614dd865776583bfce0a61ae4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1065, - "startColumn": 50, - "charOffset": 34949, - "charLength": 8, - "snippet": { - "text": "affected" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1063, - "startColumn": 1, - "charOffset": 34765, - "charLength": 211, - "snippet": { - "text": "\t\t\t\t\tif (combat && caster && nextTarget) {\r\n\t\t\t\t\t\tcombat->doChainEffect(from, nextTarget->getPosition(), combat->params.chainEffect);\r\n\t\t\t\t\t\tcombat->doCombat(caster, nextTarget, from, affected);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "eac454a00fd58203", - "equalIndicator/v1": "3b4f68ef70345b2f37d71981a02cbdd66f448a2e2726e1d076c0e5cf5d2fca07" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/player_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 989, - "startColumn": 26, - "charOffset": 26930, - "charLength": 10, - "snippet": { - "text": "manaChange" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 987, - "startColumn": 1, - "charOffset": 26870, - "charLength": 159, - "snippet": { - "text": "\t} else {\r\n\t\tCombatDamage damage;\r\n\t\tdamage.primary.value = manaChange;\r\n\t\tdamage.origin = ORIGIN_NONE;\r\n\t\tg_game().combatChangeMana(nullptr, player, damage);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dae2fe36e4a8393a", - "equalIndicator/v1": "3b51a04c39f72be6aed8bcc9b8536b2bb8bbeea5e8fab979d279234077409d75" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 495, - "startColumn": 129, - "charOffset": 14809, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 493, - "startColumn": 1, - "charOffset": 14676, - "charLength": 263, - "snippet": { - "text": "}\r\n\r\nuint32_t MoveEvent::EquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool isCheck) {\r\n\tif (player == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f55dcf8b98a5e739", - "equalIndicator/v1": "3b656ce6e1324f45532c1b0a248308f1d8239a4e8c0790a7ed9d1543f770fc8f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/npcs/npc.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 231, - "startColumn": 51, - "charOffset": 6970, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 229, - "startColumn": 1, - "charOffset": 6915, - "charLength": 241, - "snippet": { - "text": "}\r\n\r\nvoid Npc::onPlayerBuyItem(std::shared_ptr player, uint16_t itemId, uint8_t subType, uint16_t amount, bool ignore, bool inBackpacks) {\r\n\tif (player == nullptr) {\r\n\t\tg_logger().error(\"[Npc::onPlayerBuyItem] - Player is nullptr\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "afb90c4faf46c160", - "equalIndicator/v1": "3b6dcbddbb22797200651351630f93cd7b54bc88349a4cd014d3f4c8b9c88e35" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 294, - "startColumn": 67, - "charOffset": 8598, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 292, - "startColumn": 1, - "charOffset": 8526, - "charLength": 133, - "snippet": { - "text": "\t}\r\n\r\n\tstatic std::string parseAugmentDescription(std::shared_ptr item, bool inspect = false) {\r\n\t\tif (!item) {\r\n\t\t\treturn \"\";\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e50a4786a147ef5b", - "equalIndicator/v1": "3b8ca3ee9aae0cee1a9b060056661177887c6eba5688966ed15d42042a22cbd0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 655, - "startColumn": 69, - "charOffset": 17772, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 653, - "startColumn": 1, - "charOffset": 17699, - "charLength": 185, - "snippet": { - "text": "}\r\n\r\nvoid ConditionAttributes::updateIncreases(std::shared_ptr creature) const {\r\n\tfor (uint8_t i = 0; i < COMBAT_COUNT; i++) {\r\n\t\tauto increaseValue = getIncreaseByIndex(i);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9ad39b94463e0e55", - "equalIndicator/v1": "3b8d7f02c4398a39f0d2ad241031b059b0441a937af7a4e36d7b5da2590297ad" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 360, - "startColumn": 62, - "charOffset": 10261, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 358, - "startColumn": 1, - "charOffset": 10195, - "charLength": 190, - "snippet": { - "text": "}\r\n\r\nbool CombatSpell::executeCastSpell(std::shared_ptr creature, const LuaVariant &var) const {\r\n\t// onCastSpell(creature, var)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c1f02907cb10da30", - "equalIndicator/v1": "3b946eebddc657bf7c7ee5140e3cd4cf3759275dbedbfab5fbbd81d485f268e6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6908, - "startColumn": 31, - "charOffset": 239766, - "charLength": 38, - "snippet": { - "text": "(damage.secondary.value * damageBonus)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6906, - "startColumn": 1, - "charOffset": 239634, - "charLength": 190, - "snippet": { - "text": "\t\t\tif (damageBonus != 0) {\r\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\r\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\r\n\t\t\t}\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cf3fc91446068c8a", - "equalIndicator/v1": "3bac1831738bd2efd90bd314d07d4dd65d9b8de900c7b305f1173815786a55d3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/npc/shop_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 120, - "startColumn": 36, - "charOffset": 3401, - "charLength": 19, - "snippet": { - "text": "getNumber" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 118, - "startColumn": 1, - "charOffset": 3275, - "charLength": 189, - "snippet": { - "text": "\t// shop:setStorageKey(storage)\r\n\tif (const auto &shop = getUserdataShared(L, 1)) {\r\n\t\tshop->shopBlock.itemStorageKey = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "eb2f60b31e1cf1a2", - "equalIndicator/v1": "3bc94a5b84c26b3422e1afcf2d9a5056720368addd0d1d6dfab893c1962419f0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 574, - "startColumn": 3, - "charOffset": 27034, - "charLength": 9, - "snippet": { - "text": "abilities" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 572, - "startColumn": 1, - "charOffset": 26917, - "charLength": 342, - "snippet": { - "text": "\t\tint16_t value = pugi::cast(valueAttribute.value());\r\n\t\tAbilities &abilities = itemType.getAbilities();\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2a49346af508d3a9", - "equalIndicator/v1": "3bf3858dcd6a8b1573607a7554bed717868056d3968df8c7b23ab4bfd73f22fd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 592, - "startColumn": 13, - "charOffset": 28611, - "charLength": 11, - "snippet": { - "text": "stringValue" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 590, - "startColumn": 1, - "charOffset": 28419, - "charLength": 417, - "snippet": { - "text": "\t} else if (stringValue == \"absorbpercentdeath\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentlifedrain\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_LIFEDRAIN)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentmanadrain\") {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7106fcd6f00ff50f", - "equalIndicator/v1": "3bf428823e437bca7cb39f97c7196d81bfce2e81da4d127a79e102900474b173" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/movement/position.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 60, - "startColumn": 10, - "charOffset": 2171, - "charLength": 8, - "snippet": { - "text": "std::abs" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 58, - "startColumn": 1, - "charOffset": 2086, - "charLength": 208, - "snippet": { - "text": "\t}\r\n\tstatic int16_t getDistanceZ(const Position &p1, const Position &p2) {\r\n\t\treturn std::abs(Position::getOffsetZ(p1, p2));\r\n\t}\r\n\tstatic int32_t getDiagonalDistance(const Position &p1, const Position &p2) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "64ba9e376746bb51", - "equalIndicator/v1": "3c16a41f1f2a99dac4d2f24f4ab3b76ddfe062cb7aeacd64842a431fcfcdf7f2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable has narrower type 'uint8_t' than iteration's upper bound 'std::vector::size_type'", - "markdown": "Loop variable has narrower type 'uint8_t' than iteration's upper bound 'std::vector::size_type'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/player_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 912, - "startColumn": 22, - "charOffset": 31636, - "charLength": 1, - "snippet": { - "text": "i" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 910, - "startColumn": 1, - "charOffset": 31515, - "charLength": 190, - "snippet": { - "text": "uint8_t PlayerWheel::getGemIndex(const std::string &uuid) const {\r\n\tauto gems = getRevealedGems();\r\n\tfor (uint8_t i = 0; i < gems.size(); ++i) {\r\n\t\tif (gems[i].uuid == uuid) {\r\n\t\t\treturn i;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8a8ad58db5c594fe", - "equalIndicator/v1": "3c4329a9b5e1c3574ccae47568837f34eaac13743aea5d2c76ec87e24493de8f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2144, - "startColumn": 54, - "charOffset": 63056, - "charLength": 4, - "snippet": { - "text": "task" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2142, - "startColumn": 1, - "charOffset": 62998, - "charLength": 174, - "snippet": { - "text": "}\r\n\r\nvoid Player::setNextActionTask(std::shared_ptr task, bool resetIdleTime /*= true */) {\r\n\tif (actionTaskEvent != 0) {\r\n\t\tg_dispatcher().stopEvent(actionTaskEvent);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1e4e96456bd3c282", - "equalIndicator/v1": "3c504971573c35a17bc7557dd24d3dfe0ecb901b07712540bdd662e1097f87bb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6549, - "startColumn": 28, - "charOffset": 226041, - "charLength": 8, - "snippet": { - "text": "attacker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6547, - "startColumn": 1, - "charOffset": 225973, - "charLength": 189, - "snippet": { - "text": "\t\t\t\tdamageIncreaseMessage = true;\r\n\t\t\t}\r\n\t\t\tdamage.primary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\r\n\t\t}\r\n\t\tdamage.primary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5bd51413a044fb0b", - "equalIndicator/v1": "3c5c4119e875f5e0d1e2ae45cc4a7f5e1583ec0e5f475679b91d7bd043f7f8c6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 9847, - "startColumn": 30, - "charOffset": 344213, - "charLength": 6, - "snippet": { - "text": "amount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 9845, - "startColumn": 1, - "charOffset": 344085, - "charLength": 162, - "snippet": { - "text": "\t\tfor (const std::shared_ptr &item : itemVector) {\r\n\t\t\tif (item->getItemCount() > amount) {\r\n\t\t\t\tinternalRemoveItem(item, amount);\r\n\t\t\t\tbreak;\r\n\t\t\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2fd1a63ead55dcfc", - "equalIndicator/v1": "3c7dd4abf17a464884c39ac74276f3101a58ab02b6813d1987dd0e480b893322" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 847, - "startColumn": 24, - "charOffset": 24180, - "charLength": 1, - "snippet": { - "text": "7" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 845, - "startColumn": 1, - "charOffset": 24102, - "charLength": 188, - "snippet": { - "text": "\t\t} else {\r\n\t\t\tif (house->getPayRentWarnings() < 7) {\r\n\t\t\t\tint32_t daysLeft = 7 - house->getPayRentWarnings();\r\n\r\n\t\t\t\tstd::shared_ptr letter = Item::CreateItem(ITEM_LETTER_STAMPED);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e234b31c2303b1a8", - "equalIndicator/v1": "3c95bc7f99e55a170c7ff444f1530dd7f59ef004b6175362cd34cede60f5e251" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 881, - "startColumn": 41, - "charOffset": 28684, - "charLength": 10, - "snippet": { - "text": "getMaxMana" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 879, - "startColumn": 1, - "charOffset": 28571, - "charLength": 197, - "snippet": { - "text": "void Creature::changeMana(int32_t manaChange) {\r\n\tif (manaChange > 0) {\r\n\t\tmana += std::min(manaChange, getMaxMana() - mana);\r\n\t} else {\r\n\t\tmana = std::max(0, mana + manaChange);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "75d3222aa2432c06", - "equalIndicator/v1": "3ca165a9967cc059dfbdfc74500908f39fe1310ce39f18298fe028d3778a2626" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/loot_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 234, - "startColumn": 31, - "charOffset": 5948, - "charLength": 19, - "snippet": { - "text": "getNumber" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 232, - "startColumn": 1, - "charOffset": 5853, - "charLength": 158, - "snippet": { - "text": "\tconst auto loot = getUserdataShared(L, 1);\r\n\tif (loot) {\r\n\t\tloot->lootBlock.hitChance = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f1a7314ffc484f38", - "equalIndicator/v1": "3cae86459cfe72e115680fd1478475bfa231e0d30da7e548b37e86e1e5ae5b7c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 798, - "startColumn": 38, - "charOffset": 28878, - "charLength": 12, - "snippet": { - "text": "fromCylinder" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 796, - "startColumn": 1, - "charOffset": 28788, - "charLength": 158, - "snippet": { - "text": "\tLuaScriptInterface::pushPosition(L, toPosition);\r\n\r\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\r\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7487257be3518b82", - "equalIndicator/v1": "3cca1cac21a45552ed86ff710fc93cda447d6c5a16eaea21cb8166ce451cb6df" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1329, - "startColumn": 95, - "charOffset": 39200, - "charLength": 9, - "snippet": { - "text": "container" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1327, - "startColumn": 1, - "charOffset": 39101, - "charLength": 193, - "snippet": { - "text": "}\r\n\r\nstd::vector> Player::getRewardsFromContainer(std::shared_ptr container) const {\r\n\tstd::vector> rewardItemsVector;\r\n\tif (container) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "675cb78c1591e28b", - "equalIndicator/v1": "3cda93a6176f9ea8c5536a40039ef6bee980a69a4a45604b33328fef5e027246" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 365, - "startColumn": 48, - "charOffset": 9563, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 363, - "startColumn": 1, - "charOffset": 9511, - "charLength": 310, - "snippet": { - "text": "}\r\n\r\nvoid Tile::onAddTileItem(std::shared_ptr item) {\r\n\tif ((item->hasProperty(CONST_PROP_MOVABLE) || item->getContainer()) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) {\r\n\t\tauto it = g_game().browseFields.find(static_self_cast());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "374205e66337ef2e", - "equalIndicator/v1": "3ce7c003b2596c7eb8d20de2eb5869486e41e7c38a153da0ac42be0047108b17" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 514, - "startColumn": 49, - "charOffset": 16904, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 512, - "startColumn": 1, - "charOffset": 16851, - "charLength": 315, - "snippet": { - "text": "}\r\n\r\nbool Action::executeUse(std::shared_ptr player, std::shared_ptr item, const Position &fromPosition, std::shared_ptr target, const Position &toPosition, bool isHotkey) {\r\n\t// onUse(player, item, fromPosition, target, toPosition, isHotkey)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f91ade895e1c56a7", - "equalIndicator/v1": "3cec7ec8aee9a2c3a342369200a904346b0e1fc62df30c3dee3a36cd87e4a211" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/combat/spell_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 142, - "startColumn": 25, - "charOffset": 4573, - "charLength": 4, - "snippet": { - "text": "rune" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 140, - "startColumn": 1, - "charOffset": 4508, - "charLength": 168, - "snippet": { - "text": "\t\t\t\tiType.name = rune->getName();\r\n\t\t\t}\r\n\t\t\tiType.runeMagLevel = rune->getMagicLevel();\r\n\t\t\tiType.runeLevel = rune->getLevel();\r\n\t\t\tiType.charges = rune->getCharges();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e101facb128e28d7", - "equalIndicator/v1": "3d07227d3fda1feb6a4b071843d916627012c1386d47a1a5f149f91c2814e759" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 201, - "startColumn": 27, - "charOffset": 7318, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 199, - "startColumn": 1, - "charOffset": 7286, - "charLength": 121, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.npcOnSpawn, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a65b7a884ce835a0", - "equalIndicator/v1": "3d12d7553663327b03310fd9674ffe0b6cd081f2db56972828280e83776ca740" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/rewards/reward.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 21, - "startColumn": 21, - "charOffset": 590, - "charLength": 8, - "snippet": { - "text": "queryAdd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 19, - "startColumn": 1, - "charOffset": 565, - "charLength": 200, - "snippet": { - "text": "}\r\n\r\nReturnValue Reward::queryAdd(int32_t, const std::shared_ptr &thing, uint32_t, uint32_t, std::shared_ptr actor /* = nullptr*/) {\r\n\tif (actor) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d5230716367a8d8b", - "equalIndicator/v1": "3d27dbf34411c047da24de5a1dc86c646277c70852b7df1aafa952c8920a6113" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3105, - "startColumn": 48, - "charOffset": 93217, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3103, - "startColumn": 1, - "charOffset": 93165, - "charLength": 149, - "snippet": { - "text": "}\r\n\r\nbool Player::hasCapacity(std::shared_ptr item, uint32_t count) const {\r\n\tif (hasFlag(PlayerFlags_t::CannotPickupItem)) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fd5338683ba881e4", - "equalIndicator/v1": "3d50ce3c66cb5893f7245793c46272ea8f4ebb4979b7058a27c1058cc65c73cd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Repeated branch body in conditional chain", - "markdown": "Repeated branch body in conditional chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 407, - "startColumn": 27, - "charOffset": 12433, - "charLength": 1, - "snippet": { - "text": "{" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 405, - "startColumn": 1, - "charOffset": 12311, - "charLength": 176, - "snippet": { - "text": "\tif (it.isFluidContainer() || it.isSplash()) {\r\n\t\tsetAttribute(ItemAttribute_t::FLUIDTYPE, n);\r\n\t} else if (it.stackable) {\r\n\t\tsetItemCount(n);\r\n\t} else if (it.charges != 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7af9e671944377cd", - "equalIndicator/v1": "3d5260a101e34606f0ac26d3075b51e814e592d714fedf839d047404e0ffee27" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/functions/iologindata_save_player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 375, - "startColumn": 63, - "charOffset": 14949, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 373, - "startColumn": 1, - "charOffset": 14882, - "charLength": 178, - "snippet": { - "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerKills(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d59e156357ecfe17", - "equalIndicator/v1": "3d7773c65c5ffd1d09f1194291e2f3b5f3bcafb78e13fc3ec33dbfd57026d4ad" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3121, - "startColumn": 21, - "charOffset": 93659, - "charLength": 8, - "snippet": { - "text": "queryAdd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3119, - "startColumn": 1, - "charOffset": 93634, - "charLength": 221, - "snippet": { - "text": "}\r\n\r\nReturnValue Player::queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr) {\r\n\tstd::shared_ptr item = thing->getItem();\r\n\tif (item == nullptr) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5482d7758a703331", - "equalIndicator/v1": "3d832514ea962c6f9f9f7c5cf4ba5cf663bf0aa16af9592dc0218c290dfdbfc3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/functions/iologindata_save_player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 583, - "startColumn": 67, - "charOffset": 22272, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 581, - "startColumn": 1, - "charOffset": 22201, - "charLength": 182, - "snippet": { - "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerPreyClass(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c8c4401dd7d37f10", - "equalIndicator/v1": "3d98cf804f88958f544dbfb33fa01c283d51cb2867ce1647eb8fbc5ac5317f66" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 9793, - "startColumn": 43, - "charOffset": 342799, - "charLength": 3, - "snippet": { - "text": "npc" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 9791, - "startColumn": 1, - "charOffset": 342752, - "charLength": 85, - "snippet": { - "text": "}\r\n\r\nvoid Game::removeNpc(std::shared_ptr npc) {\r\n\tnpcs.erase(npc->getID());\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "962f0acda8125d89", - "equalIndicator/v1": "3da605df30fef5e4c462969297c59f1d04fce2baa19e450b80e94cca58e0dac6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/kv.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 112, - "startColumn": 35, - "charOffset": 3537, - "charLength": 10, - "snippet": { - "text": "loadPrefix" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 110, - "startColumn": 1, - "charOffset": 3355, - "charLength": 242, - "snippet": { - "text": "\tvirtual std::optional load(const std::string &key) = 0;\r\n\tvirtual bool save(const std::string &key, const ValueWrapper &value) = 0;\r\n\tvirtual std::vector loadPrefix(const std::string &prefix = \"\") = 0;\r\n\r\nprivate:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e60946919aa430a3", - "equalIndicator/v1": "3db2caf55e99c570d779ce717068fec36efcfb40b87d0210d19babbe424a7be8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3693, - "startColumn": 18, - "charOffset": 110682, - "charLength": 16, - "snippet": { - "text": "getItemTypeCount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3691, - "startColumn": 1, - "charOffset": 110660, - "charLength": 178, - "snippet": { - "text": "}\r\n\r\nuint32_t Player::getItemTypeCount(uint16_t itemId, int32_t subType /*= -1*/) const {\r\n\tuint32_t count = 0;\r\n\tfor (int32_t i = CONST_SLOT_FIRST; i <= CONST_SLOT_LAST; i++) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "75a9c725c4b138cb", - "equalIndicator/v1": "3db9418b5ad7a8a5cf7fc0c25a0016bbe8fdc5a1bfa0aceac22d76dbf6bb6092" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified variable 'realPath' is copy-constructed from a const reference; consider making it a const reference", - "markdown": "The const qualified variable 'realPath' is copy-constructed from a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/scripts/scripts.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 75, - "startColumn": 14, - "charOffset": 2730, - "charLength": 8, - "snippet": { - "text": "realPath" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 73, - "startColumn": 1, - "charOffset": 2588, - "charLength": 279, - "snippet": { - "text": "\tfor (const auto &entry : std::filesystem::recursive_directory_iterator(dir)) {\r\n\t\t// Get the filename of the entry as a string\r\n\t\tconst auto realPath = entry.path();\r\n\t\tstd::string fileFolder = realPath.parent_path().filename().string();\r\n\t\t// Script folder, example: \"actions\"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "44ee16e04b2590b5", - "equalIndicator/v1": "3dc4e1ea590f2a6d35a6ac4a20292dc1dd71b9ef1e7f9a097f16e2988b5ef33c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6891, - "startColumn": 80, - "charOffset": 215752, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6889, - "startColumn": 1, - "charOffset": 215668, - "charLength": 167, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendTextWindow(uint32_t windowTextId, std::shared_ptr item, uint16_t maxlen, bool canWrite) {\r\n\tNetworkMessage msg;\r\n\tmsg.addByte(0x96);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ac20ca7ff9214142", - "equalIndicator/v1": "3dde9da93d96fd95dd20b4b776096f0b5b1a256a0189ddc5171285a0019afa52" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1393, - "startColumn": 55, - "charOffset": 55116, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1391, - "startColumn": 1, - "charOffset": 55057, - "charLength": 264, - "snippet": { - "text": "}\r\n\r\nvoid Game::playerMoveCreature(std::shared_ptr player, std::shared_ptr movingCreature, const Position &movingCreatureOrigPos, std::shared_ptr toTile) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!player->canDoAction()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e35bd27937a2adf1", - "equalIndicator/v1": "3e0db3bbed9334b1289df8cff97cf25aa819097999c2748d0053cfe171a13f86" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/mailbox/mailbox.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 40, - "startColumn": 7, - "charOffset": 1713, - "charLength": 11, - "snippet": { - "text": "removeThing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 38, - "startColumn": 1, - "charOffset": 1629, - "charLength": 307, - "snippet": { - "text": "\tvoid replaceThing(uint32_t index, std::shared_ptr thing) override;\r\n\r\n\tvoid removeThing(std::shared_ptr thing, uint32_t count) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "19a8662b1580dd01", - "equalIndicator/v1": "3e1e9386a170630c7d9bef3e9d098f65917e31731afcef7b7681581d08180b7d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2531, - "startColumn": 35, - "charOffset": 75545, - "charLength": 7, - "snippet": { - "text": "manaMax" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2529, - "startColumn": 1, - "charOffset": 75361, - "charLength": 312, - "snippet": { - "text": "\t\t\tconst auto &noneVocation = g_vocations().getVocation(VOCATION_NONE);\r\n\t\t\thealthMax = std::max(0, healthMax - noneVocation->getHPGain());\r\n\t\t\tmanaMax = std::max(0, manaMax - noneVocation->getManaGain());\r\n\t\t\tcapacity = std::max(0, capacity - noneVocation->getCapGain());\r\n\t\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2a6fb4fa13bd0ce9", - "equalIndicator/v1": "3e3b6da74ec4266f67afe2916231097a1fc63295d3c1dd57f08e5d2379d955a3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'combatChangeHealth' is within a recursive call chain", - "markdown": "Function 'combatChangeHealth' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6945, - "startColumn": 12, - "charOffset": 241319, - "charLength": 18, - "snippet": { - "text": "combatChangeHealth" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6943, - "startColumn": 1, - "charOffset": 241303, - "charLength": 231, - "snippet": { - "text": "}\r\n\r\nbool Game::combatChangeHealth(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage, bool isEvent /*= false*/) {\r\n\tusing namespace std;\r\n\tconst Position &targetPos = target->getPosition();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "21020065985204f5", - "equalIndicator/v1": "3e494e2b885d1c51049b7700af051723853a0d63b801f4fd80503e19aaeb8777" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2834, - "startColumn": 36, - "charOffset": 84686, - "charLength": 7, - "snippet": { - "text": "manaMax" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2832, - "startColumn": 1, - "charOffset": 84563, - "charLength": 238, - "snippet": { - "text": "\t\t\t\t--level;\r\n\t\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\r\n\t\t\t\tmanaMax = std::max(0, manaMax - vocation->getManaGain());\r\n\t\t\t\tcapacity = std::max(0, capacity - vocation->getCapGain());\r\n\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "73120a62e350c272", - "equalIndicator/v1": "3e58bff6aadca36033eeb65ffe81e916268dc70623f8e1ae07d8c45c4d2ab84d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')", - "markdown": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5770, - "startColumn": 27, - "charOffset": 170386, - "charLength": 8, - "snippet": { - "text": "std::min" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5768, - "startColumn": 1, - "charOffset": 170199, - "charLength": 301, - "snippet": { - "text": "\t\tuint8_t dayProgress = std::min(std::round(dayKills / dayMax * 100), 100.0);\r\n\t\tuint8_t weekProgress = std::min(std::round(weekKills / weekMax * 100), 100.0);\r\n\t\tuint8_t monthProgress = std::min(std::round(monthKills / monthMax * 100), 100.0);\r\n\t\tuint8_t skullDuration = 0;\r\n\t\tif (skullTicks != 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e215d414c99678f7", - "equalIndicator/v1": "3e5ca81c469e0002561f48ff4c9e43134f8740fcce22e33d524ba27aa1c20984" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'newCombat' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'newCombat' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 263, - "startColumn": 56, - "charOffset": 7748, - "charLength": 9, - "snippet": { - "text": "newCombat" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 261, - "startColumn": 1, - "charOffset": 7688, - "charLength": 183, - "snippet": { - "text": "}\r\n\r\nCombatSpell::CombatSpell(const std::shared_ptr newCombat, bool newNeedTarget, bool newNeedDirection) :\r\n\tScript(&g_spells().getScriptInterface()),\r\n\tm_combat(newCombat),\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "59ceea0a3c73da9f", - "equalIndicator/v1": "3e5fd6f52006ea3e2dcc84c09deb749e9defc2d6628f8e3d9f8b6b6451040e7e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'float'", - "markdown": "Narrowing conversion from 'double' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/io_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 798, - "startColumn": 26, - "charOffset": 36761, - "charLength": 19, - "snippet": { - "text": "MITIGATION_INCREASE" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 796, - "startColumn": 1, - "charOffset": 36558, - "charLength": 370, - "snippet": { - "text": "// SLOT_PURPLE_BOTTOM_75 = 28\r\nvoid IOWheel::slotPurpleBottom75(const std::shared_ptr &player, uint16_t points, uint8_t, PlayerWheelMethodsBonusData &bonusData) const {\r\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\r\n\tif (isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_PURPLE_BOTTOM_75)) {\r\n\t\tbonusData.leech.manaLeech += MANA_LEECH_INCREASE;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d3bddff9da377e2e", - "equalIndicator/v1": "3e67b670078e2ba9cfc86d87df4e829ee91c238176268306ce59d2a56b77690b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1309, - "startColumn": 98, - "charOffset": 46533, - "charLength": 6, - "snippet": { - "text": "corpse" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1307, - "startColumn": 1, - "charOffset": 46422, - "charLength": 191, - "snippet": { - "text": "\r\n// Monster\r\nvoid Events::eventMonsterOnDropLoot(std::shared_ptr monster, std::shared_ptr corpse) {\r\n\t// Monster:onDropLoot(corpse)\r\n\tif (info.monsterOnDropLoot == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c120e7a01fc2c600", - "equalIndicator/v1": "3e6bbd867d1728143a732bf5a41fe329184a05ff88f21c5a3aae67146a47e2b4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 457, - "startColumn": 59, - "charOffset": 13604, - "charLength": 1, - "snippet": { - "text": "," - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 455, - "startColumn": 1, - "charOffset": 13541, - "charLength": 123, - "snippet": { - "text": "}\r\n\r\nuint32_t MoveEvent::StepOutField(std::shared_ptr, std::shared_ptr, const Position &) {\r\n\treturn 1;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c7bb62315d7556db", - "equalIndicator/v1": "3e6be90b03d97a6d07ffa89e2a7eee0f41a2d1e69b2a489e1d74eafe1cb9ecaa" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::_Tree, std::less, std::allocator>>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::_Tree, std::less, std::allocator\\>\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/game_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 253, - "startColumn": 13, - "charOffset": 7764, - "charLength": 6, - "snippet": { - "text": "houses" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 251, - "startColumn": 1, - "charOffset": 7677, - "charLength": 171, - "snippet": { - "text": "int GameFunctions::luaGameGetHouses(lua_State* L) {\r\n\t// Game.getHouses()\r\n\tconst auto houses = g_game().map.houses.getHouses();\r\n\tlua_createtable(L, houses.size(), 0);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f58e43111add61be", - "equalIndicator/v1": "3e78cb3d824455714c8f81fa7e5efbfefcbc32c3bcae302f0b6e418e586b5f7b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use range-based for loop instead", - "markdown": "Use range-based for loop instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocol.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 124, - "startColumn": 2, - "charOffset": 3848, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 122, - "startColumn": 1, - "charOffset": 3788, - "charLength": 168, - "snippet": { - "text": "\tuint32_t precachedControlSum[32][2];\r\n\tuint32_t sum = 0;\r\n\tfor (int32_t i = 0; i < 32; ++i) {\r\n\t\tprecachedControlSum[i][0] = (sum + newKey[sum & 3]);\r\n\t\tsum -= delta;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6c145cc0fa9774b6", - "equalIndicator/v1": "3e7937e5c01a4373bc44b08592088486819b70f2b7de722ec5427efaf7215f50" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 334, - "startColumn": 8, - "charOffset": 8311, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 332, - "startColumn": 1, - "charOffset": 8253, - "charLength": 152, - "snippet": { - "text": "\tuint16_t count = getNumber(L, 2, 1);\r\n\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (!itemType) {\r\n\t\tlua_pushnil(L);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "51d46fcc64f36852", - "equalIndicator/v1": "3ecc99b05245099b5695e05ae1474a2a20789eb74dadc0f154186a106bc2ce53" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6804, - "startColumn": 155, - "charOffset": 235276, - "charLength": 13, - "snippet": { - "text": "targetMonster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6802, - "startColumn": 1, - "charOffset": 235117, - "charLength": 251, - "snippet": { - "text": "}\r\n\r\nvoid Game::notifySpectators(const CreatureVector &spectators, const Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetMonster) {\r\n\tif (!spectators.empty()) {\r\n\t\tfor (const auto &spectator : spectators) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ce7513af86f431f1", - "equalIndicator/v1": "3ed787311e5d57495d7ed0a416941a6573c0bacd77cdd86940364bd212f845a6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/map/tile_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 633, - "startColumn": 2, - "charOffset": 14831, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 631, - "startColumn": 1, - "charOffset": 14824, - "charLength": 172, - "snippet": { - "text": "\t}\r\n\r\n\tuint32_t flags = getNumber(L, 3, 0);\r\n\tReturnValue ret = g_game().internalAddItem(tile, item, INDEX_WHEREEVER, flags);\r\n\tif (ret == RETURNVALUE_NOERROR) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2bbdb05890a87831", - "equalIndicator/v1": "3ef2adf0b0a26e8ff2015b907ff724799cdce03b2062ed4e9167f10d18a21dcc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 708, - "startColumn": 4, - "charOffset": 33826, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 706, - "startColumn": 1, - "charOffset": 33708, - "charLength": 228, - "snippet": { - "text": "\t\t\tstd::list damageList;\r\n\t\t\tConditionDamage::generateDamageList(combatDamage, combatStart, damageList);\r\n\t\t\tfor (int32_t damageValue : damageList) {\r\n\t\t\t\tconditionDamage->addDamage(1, combatTicks, -damageValue);\r\n\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "97b95824ef9cde7e", - "equalIndicator/v1": "3f2321a10d85447d76965686c4a3a0b52af659c267b73ce39cada8a739ce2c37" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'task' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'task' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2129, - "startColumn": 13, - "charOffset": 62733, - "charLength": 4, - "snippet": { - "text": "task" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2127, - "startColumn": 1, - "charOffset": 62715, - "charLength": 29, - "snippet": { - "text": "\t}\r\n\r\n\twalkTask = task;\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "33e1ae84f6921747", - "equalIndicator/v1": "3f2cd65364f16b8ed464681f0793be60addc8bd2dd6858ba061f2aed76b3555f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3974, - "startColumn": 82, - "charOffset": 119744, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3972, - "startColumn": 1, - "charOffset": 119609, - "charLength": 192, - "snippet": { - "text": "\r\nvoid Player::updateDamageReductionFromItemAbility(\r\n\tstd::array &combatReductionArray, std::shared_ptr item, uint16_t combatTypeIndex\r\n) const {\r\n\tif (!item) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "731f6a608ed9da93", - "equalIndicator/v1": "3f32dd418254e98f8173de2f758f1c37b72604f2f38884334cf1dd4f788479b8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 810, - "startColumn": 7, - "charOffset": 29173, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 808, - "startColumn": 1, - "charOffset": 29161, - "charLength": 142, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnChangeZone - \"\r\n\t\t \"Player {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4cd3a35469ccb9be", - "equalIndicator/v1": "3f42e3daa1a9b19edd15c185cb71aa29fc8611ac6c8f3a5d648ebc3586975677" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4899, - "startColumn": 55, - "charOffset": 175156, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4897, - "startColumn": 1, - "charOffset": 175097, - "charLength": 332, - "snippet": { - "text": "}\r\n\r\nbool Game::internalStartTrade(std::shared_ptr player, std::shared_ptr tradePartner, std::shared_ptr tradeItem) {\r\n\tif (player->tradeState != TRADE_NONE && !(player->tradeState == TRADE_ACKNOWLEDGE && player->tradePartner == tradePartner)) {\r\n\t\tplayer->sendCancelMessage(RETURNVALUE_YOUAREALREADYTRADING);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4690968e3f9bb6e7", - "equalIndicator/v1": "3fad4846d8a7fac9e44b6f19417a22261db70258d087eab9d85263ef2b08a9eb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'itemDict' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'itemDict' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3716, - "startColumn": 48, - "charOffset": 111340, - "charLength": 8, - "snippet": { - "text": "itemDict" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3714, - "startColumn": 1, - "charOffset": 111288, - "charLength": 154, - "snippet": { - "text": "}\r\n\r\nvoid Player::stashContainer(StashContainerList itemDict) {\r\n\tStashItemList stashItemDict; // ItemID - Count\r\n\tfor (const auto &it_dict : itemDict) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "52a94ed60b283225", - "equalIndicator/v1": "3fd54b7d899c273041ec1ad0dee1c1c904312470e4691ca3556525f9947c8acc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 27, - "startColumn": 57, - "charOffset": 1000, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 25, - "startColumn": 1, - "charOffset": 895, - "charLength": 220, - "snippet": { - "text": "#include \"lua/callbacks/events_callbacks.hpp\"\r\n\r\nint32_t Combat::getLevelFormula(std::shared_ptr player, const std::shared_ptr wheelSpell, const CombatDamage &damage) const {\r\n\tif (!player) {\r\n\t\treturn 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2c833d3cbf4778cb", - "equalIndicator/v1": "4036e47e24b77737ede628033db84e6b9855e3ff3bd1fdef9c14dd3821d9a610" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5335, - "startColumn": 40, - "charOffset": 157558, - "charLength": 20, - "snippet": { - "text": "getLoyaltyMagicLevel" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5333, - "startColumn": 1, - "charOffset": 157475, - "charLength": 243, - "snippet": { - "text": "\r\nuint32_t Player::getMagicLevel() const {\r\n\tuint32_t magic = std::max(0, getLoyaltyMagicLevel() + varStats[STAT_MAGICPOINTS]);\r\n\t// Wheel of destiny magic bonus\r\n\tmagic += m_wheelPlayer->getStat(WheelStat_t::MAGIC); // Regular bonus\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "003f9d639a0decfc", - "equalIndicator/v1": "4043e3b6034f016ce8e4121499e134ed0f62097e32d67cc6f9168addad0a199a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'getCallback' can be made const", - "markdown": "Method 'getCallback' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 543, - "startColumn": 19, - "charOffset": 17407, - "charLength": 11, - "snippet": { - "text": "getCallback" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 541, - "startColumn": 1, - "charOffset": 17384, - "charLength": 115, - "snippet": { - "text": "}\r\n\r\nCallBack* Combat::getCallback(CallBackParam_t key) {\r\n\tswitch (key) {\r\n\t\tcase CALLBACK_PARAM_LEVELMAGICVALUE:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "53b0dd1e2831790e", - "equalIndicator/v1": "4054bc07a1314e2efbd18d2a1812e4b5acda9a5a33cc4db9592de8fb7b10d8a8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1032, - "startColumn": 31, - "charOffset": 29889, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1030, - "startColumn": 1, - "charOffset": 29772, - "charLength": 137, - "snippet": { - "text": "\tvoid sendCreatureEmblem(std::shared_ptr creature) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureEmblem(creature);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b55b32df9bc012cb", - "equalIndicator/v1": "405e23c03519193774a09f71a24ccddf6f1355d0c6662011c492f1abe2dbc9f3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 703, - "startColumn": 93, - "charOffset": 25107, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 701, - "startColumn": 1, - "charOffset": 25010, - "charLength": 166, - "snippet": { - "text": "}\r\n\r\nbool Events::eventPlayerOnRemoveCount(std::shared_ptr player, std::shared_ptr item) {\r\n\t// Player:onMove()\r\n\tif (info.playerOnRemoveCount == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a56f9f269be8f1b0", - "equalIndicator/v1": "407bdcbb702a7ec9fec90bc6b12c9b6258d81a713de1509218666f9256818557" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 569, - "startColumn": 91, - "charOffset": 18041, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 567, - "startColumn": 1, - "charOffset": 17946, - "charLength": 236, - "snippet": { - "text": "}\r\n\r\nvoid Combat::CombatHealthFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\r\n\tif (!data) {\r\n\t\tg_logger().error(\"[{}]: CombatDamage is nullptr\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3260be18472be01c", - "equalIndicator/v1": "408f0ba41e0426fc07540bfc8b4f75eb98c041b76590dcf63b0cf5fd2499f24f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1766, - "startColumn": 103, - "charOffset": 61618, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1764, - "startColumn": 1, - "charOffset": 61511, - "charLength": 206, - "snippet": { - "text": "}\r\n\r\nbool ChainPickerCallback::onChainCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\t// onChainCombat(creature, target)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9f287db82dfa8c61", - "equalIndicator/v1": "40b3b22320b4e530d820aa31dfd4db2130f79b553d0a0959c673327f7bd9a369" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "String concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead", - "markdown": "String concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 45, - "startColumn": 33, - "charOffset": 1501, - "charLength": 44, - "snippet": { - "text": "coreFolder + \"/events/scripts/\" + scriptName" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 43, - "startColumn": 1, - "charOffset": 1332, - "charLength": 375, - "snippet": { - "text": "\t\t\tconst std::string &scriptName = lowercase + \".lua\";\r\n\t\t\tauto coreFolder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__);\r\n\t\t\tif (scriptInterface.loadFile(coreFolder + \"/events/scripts/\" + scriptName, scriptName) != 0) {\r\n\t\t\t\tg_logger().warn(\"{} - Can not load script: {}.lua\", __FUNCTION__, lowercase);\r\n\t\t\t\tg_logger().warn(scriptInterface.getLastLuaError());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1b7589741483e540", - "equalIndicator/v1": "40c00c840292cf8fa3ef4c22b54cf6afaeed2caff89357049763964c9be86d6a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 292, - "startColumn": 8, - "charOffset": 9502, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 290, - "startColumn": 1, - "charOffset": 9374, - "charLength": 300, - "snippet": { - "text": "\t\t// onCreatureSay(self, creature, type, message)\r\n\t\tLuaScriptInterface* scriptInterface = mType->info.scriptInterface;\r\n\t\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\t\tg_logger().error(\"Monster {} creature {}] Call stack overflow. Too many lua \"\r\n\t\t\t \"script calls being nested.\",\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ae8e4675eec743e0", - "equalIndicator/v1": "40c958637579a5261c35a35957d3f405d2c1fe520416a0833832d8eb5df9fb15" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3054, - "startColumn": 2, - "charOffset": 93109, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3052, - "startColumn": 1, - "charOffset": 93044, - "charLength": 168, - "snippet": { - "text": "\r\nvoid ProtocolGame::parseInviteToParty(NetworkMessage &msg) {\r\n\tuint32_t targetId = msg.get();\r\n\tg_game().playerInviteToParty(player->getID(), targetId);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "89fc36f1e45c5dbe", - "equalIndicator/v1": "40e08aa56a38f247ec8c53667696f03c209d65b88a7e249ab8e0743e7aed5c9b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 911, - "startColumn": 27, - "charOffset": 33004, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 909, - "startColumn": 1, - "charOffset": 32972, - "charLength": 128, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnReportBug, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1cc7c37fe4dc7557", - "equalIndicator/v1": "4102e4a1fdae5840d81598edec124e535278f1961cb2cbbd43e7f6938a786242" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 823, - "startColumn": 15, - "charOffset": 25069, - "charLength": 5, - "snippet": { - "text": "death" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 821, - "startColumn": 1, - "charOffset": 24959, - "charLength": 448, - "snippet": { - "text": "\t}\r\n\tvirtual void getPathSearchParams(const std::shared_ptr &, FindPathParams &fpp);\r\n\tvirtual void death(std::shared_ptr) { }\r\n\tvirtual bool dropCorpse(std::shared_ptr lastHitCreature, std::shared_ptr mostDamageCreature, bool lastHitUnjustified, bool mostDamageUnjustified);\r\n\tvirtual std::shared_ptr getCorpse(std::shared_ptr lastHitCreature, std::shared_ptr mostDamageCreature);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fc81072fa820e771", - "equalIndicator/v1": "410eb464be9bb1a6f9a866472379798f411fa19c039f656a521ff5786919d608" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 33, - "startColumn": 8, - "charOffset": 979, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 31, - "startColumn": 1, - "charOffset": 887, - "charLength": 205, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeIsCorpse(lua_State* L) {\r\n\t// itemType:isCorpse()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isCorpse);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5df427df7e52a811", - "equalIndicator/v1": "4114c37858b2cf720e0471936cac06c6efc4ebc5d2954941a69a6677dd756817" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 231, - "startColumn": 8, - "charOffset": 5757, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 229, - "startColumn": 1, - "charOffset": 5671, - "charLength": 196, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetId(lua_State* L) {\r\n\t// itemType:getId()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->id);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2a7e7ca37500f80b", - "equalIndicator/v1": "411de6a2e960975f68cea156ade5cf18d36c2f09e0efc73d3f483e19c5644592" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'short' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'short' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/imbuements/imbuements.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 268, - "startColumn": 56, - "charOffset": 9391, - "charLength": 7, - "snippet": { - "text": "percent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 266, - "startColumn": 1, - "charOffset": 9292, - "charLength": 232, - "snippet": { - "text": "\r\n\t\t\t\t\t\timbuement.combatType = combatType;\r\n\t\t\t\t\t\timbuement.elementDamage = std::min(100, percent);\r\n\t\t\t\t\t} else if (strcasecmp(effecttype.c_str(), \"reduction\") == 0) {\r\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"combat\"))) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d3d8f11b9af397ff", - "equalIndicator/v1": "4132fbee87f429e884eeaa632cdcad5b21510fb45e29775ae1a3310ee69c9bf6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 500, - "startColumn": 41, - "charOffset": 19002, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 498, - "startColumn": 1, - "charOffset": 18956, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1ec04c02d2a60a6c", - "equalIndicator/v1": "4152eeb54663a8a7de1a6239d5151cc44c23db711c1e226e2baa0d22eac4aa5a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Nested namespaces can be concatenated", - "markdown": "Nested namespaces can be concatenated" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 30, - "startColumn": 1, - "charOffset": 1044, - "charLength": 9, - "snippet": { - "text": "namespace" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 28, - "startColumn": 1, - "charOffset": 999, - "charLength": 114, - "snippet": { - "text": "\r\n// Forward declaration for protobuf class\r\nnamespace Canary {\r\n\tnamespace protobuf {\r\n\t\tnamespace appearances {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "12072fad1c06efbb", - "equalIndicator/v1": "415396496f51d42ee5fc4085fea72c4a6eb3283d3be4c318874b1b152b3dc6b4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iobestiary.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 63, - "startColumn": 62, - "charOffset": 2402, - "charLength": 28, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 61, - "startColumn": 1, - "charOffset": 2117, - "charLength": 376, - "snippet": { - "text": "\tvoid sendBuyCharmRune(std::shared_ptr player, charmRune_t runeID, uint8_t action, uint16_t raceid);\r\n\tvoid setCharmRuneCreature(std::shared_ptr player, const std::shared_ptr charm, uint16_t raceid);\r\n\tvoid resetCharmRuneCreature(std::shared_ptr player, const std::shared_ptr charm);\r\n\r\n\tint8_t calculateDifficult(uint32_t chance) const;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e3f92236c89219fa", - "equalIndicator/v1": "4153bfa9cbe6a8c6b720e723ffec33b10017c90727f5c5d91d178807e59c2597" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 9321, - "startColumn": 62, - "charOffset": 325814, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 9319, - "startColumn": 1, - "charOffset": 325748, - "charLength": 104, - "snippet": { - "text": "}\r\n\r\nvoid Game::sendOfflineTrainingDialog(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "02feb816b624359c", - "equalIndicator/v1": "415905b5aa8aabf34369661760c5960505f034e301775c99816eacc9ba0f10bd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 504, - "startColumn": 8, - "charOffset": 12474, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 502, - "startColumn": 1, - "charOffset": 12356, - "charLength": 244, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetTransformDeEquipId(lua_State* L) {\r\n\t// itemType:getTransformDeEquipId()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->transformDeEquipTo);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "41a8839d2f167460", - "equalIndicator/v1": "4164d9c4beb553abce49f526a2fef57efb441ed147c5496673deb404bf063c0c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use range-based for loop instead", - "markdown": "Use range-based for loop instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2416, - "startColumn": 3, - "charOffset": 75208, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2414, - "startColumn": 1, - "charOffset": 75168, - "charLength": 191, - "snippet": { - "text": "\r\n\t\tnewmsg.addByte(elements.size());\r\n\t\tfor (auto it = std::begin(elements), end = std::end(elements); it != end; it++) {\r\n\t\t\tnewmsg.addByte(it->first);\r\n\t\t\tnewmsg.add(it->second);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "451d46bb2e28b957", - "equalIndicator/v1": "417cfbdeb1c0db6baf06c3b8728a699284bdf088ef5a23025ff20737f779e87a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 332, - "startColumn": 2, - "charOffset": 11901, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 330, - "startColumn": 1, - "charOffset": 11894, - "charLength": 66, - "snippet": { - "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n\treturn returnValue;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1d010418e41f56a1", - "equalIndicator/v1": "419338101ca383260e69b79c6fdf9a9457f6146e9ba56a0fb54bbf5673e74687" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3121, - "startColumn": 2, - "charOffset": 95706, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3119, - "startColumn": 1, - "charOffset": 95637, - "charLength": 174, - "snippet": { - "text": "\r\nvoid ProtocolGame::parseMarketCancelOffer(NetworkMessage &msg) {\r\n\tuint32_t timestamp = msg.get();\r\n\tuint16_t counter = msg.get();\r\n\tif (counter > 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d91fc8a5cba5fc02", - "equalIndicator/v1": "41aba64e0618d172dbac64bbab0d600859583747246f9376eec0b59865b28390" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1834, - "startColumn": 59, - "charOffset": 49447, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1832, - "startColumn": 1, - "charOffset": 49384, - "charLength": 184, - "snippet": { - "text": "}\r\n\r\nbool ConditionFeared::canWalkTo(std::shared_ptr creature, Position pos, Direction moveDirection) const {\r\n\tpos = getNextPosition(moveDirection, pos);\r\n\tif (!creature) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ae363c3bdb949aee", - "equalIndicator/v1": "41b1fc0002f286a5edc6468c67028dc589d0e4f7bab3bdece8f761cfbb52135d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 125, - "startColumn": 70, - "charOffset": 3787, - "charLength": 6, - "snippet": { - "text": "action" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 123, - "startColumn": 1, - "charOffset": 3713, - "charLength": 170, - "snippet": { - "text": "}\r\n\r\nbool Actions::registerLuaPositionEvent(const std::shared_ptr action) {\r\n\tauto positionVector = action->getPositionsVector();\r\n\tif (positionVector.empty()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a8cb9a0f78254949", - "equalIndicator/v1": "41cd61a3eb266e1c12a7e4c63fc32db4cffd8642cc3bcc6b596a919ee75b4c94" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 886, - "startColumn": 58, - "charOffset": 28718, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 884, - "startColumn": 1, - "charOffset": 28656, - "charLength": 270, - "snippet": { - "text": "}\r\n\r\nvoid Combat::postCombatEffects(std::shared_ptr caster, const Position &origin, const Position &pos, const CombatParams ¶ms) {\r\n\tif (caster && params.distanceEffect != CONST_ANI_NONE) {\r\n\t\taddDistanceEffect(caster, origin, pos, params.distanceEffect);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "92e6518c7220aaeb", - "equalIndicator/v1": "41dbe6a1b9662ae51bc37c61c62fc0d009fa4c27376a7baed7c3d1b72d310a57" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 611, - "startColumn": 41, - "charOffset": 23541, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 609, - "startColumn": 1, - "charOffset": 23495, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "26ff33a21f5f67a1", - "equalIndicator/v1": "41ea107453be376b9e84ba3849ab9848742ac2748f67d82c5eae50716de08b4e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3131, - "startColumn": 67, - "charOffset": 116609, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3129, - "startColumn": 1, - "charOffset": 116538, - "charLength": 231, - "snippet": { - "text": "}\r\n\r\nReturnValue Game::collectRewardChestItems(std::shared_ptr player, uint32_t maxMoveItems /* = 0*/) {\r\n\t// Check if have item on player reward chest\r\n\tstd::shared_ptr rewardChest = player->getRewardChest();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "df688f2841f53b56", - "equalIndicator/v1": "41ebbcaaae524e92d03cadd4d1af88af098b73d05dbe189b82563012e222597c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'virtual' is redundant since the function is already declared 'override'", - "markdown": "'virtual' is redundant since the function is already declared 'override'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/cylinder.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 193, - "startColumn": 15, - "charOffset": 7776, - "charLength": 8, - "snippet": { - "text": "addThing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 191, - "startColumn": 1, - "charOffset": 7699, - "charLength": 291, - "snippet": { - "text": "\r\n\tvirtual void addThing(std::shared_ptr) override { }\r\n\tvirtual void addThing(int32_t, std::shared_ptr) override { }\r\n\tvirtual void updateThing(std::shared_ptr, uint16_t, uint32_t) override { }\r\n\tvirtual void replaceThing(uint32_t, std::shared_ptr) override { }\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f2b0c6d60c7371fd", - "equalIndicator/v1": "41ee6f43316def89e81044f0662a25c46c768c8d56a28b37f8af668ebb462288" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7537, - "startColumn": 79, - "charOffset": 235741, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7535, - "startColumn": 1, - "charOffset": 235625, - "charLength": 273, - "snippet": { - "text": "\r\n////////////// Add common messages\r\nvoid ProtocolGame::AddCreature(NetworkMessage &msg, std::shared_ptr creature, bool known, uint32_t remove) {\r\n\tCreatureType_t creatureType = creature->getType();\r\n\tstd::shared_ptr otherPlayer = creature->getPlayer();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "21fcd8037bbfe189", - "equalIndicator/v1": "41fb895486b1d3dbf3973aa5f934c2c5b762107deae62fad9f2179fc75bcacf2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 317, - "startColumn": 10, - "charOffset": 8704, - "charLength": 15, - "snippet": { - "text": "getWeaponDamage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 315, - "startColumn": 1, - "charOffset": 8566, - "charLength": 474, - "snippet": { - "text": "\tbool useWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target) const override;\r\n\r\n\tint32_t getWeaponDamage(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, bool maxDamage = false) const override;\r\n\tint32_t getElementDamage(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) const override;\r\n\tCombatType_t getElementType() const override {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "58bbb0d6936792dd", - "equalIndicator/v1": "420e12b415f12a0126d0676b01a88ef5b8c176d8aa9005424f0944cf6d824fe3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'healer' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'healer' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 887, - "startColumn": 53, - "charOffset": 28830, - "charLength": 6, - "snippet": { - "text": "healer" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 885, - "startColumn": 1, - "charOffset": 28773, - "charLength": 131, - "snippet": { - "text": "}\r\n\r\nvoid Creature::gainHealth(std::shared_ptr healer, int32_t healthGain) {\r\n\tchangeHealth(healthGain);\r\n\tif (healer) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c35e9de55c2247e2", - "equalIndicator/v1": "42361825b63ab5eb2dca2358075b216cf5016698e2fb16556d8d797248a01b0c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'target' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'target' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 504, - "startColumn": 21, - "charOffset": 27243, - "charLength": 29, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 502, - "startColumn": 1, - "charOffset": 27050, - "charLength": 357, - "snippet": { - "text": "\tvoid addCreatureHealth(const std::shared_ptr target);\r\n\tstatic void addCreatureHealth(const CreatureVector &spectators, const std::shared_ptr target);\r\n\tvoid addPlayerMana(const std::shared_ptr target);\r\n\tvoid addPlayerVocation(const std::shared_ptr target);\r\n\tvoid addMagicEffect(const Position &pos, uint16_t effect);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cd31d6e8cb9a20bb", - "equalIndicator/v1": "42637a6867dbf156da62122918614138e371185ed173d81150d74523f1985246" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 565, - "startColumn": 42, - "charOffset": 18417, - "charLength": 27, - "snippet": { - "text": "Weapons::getMaxWeaponDamage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 563, - "startColumn": 1, - "charOffset": 18335, - "charLength": 246, - "snippet": { - "text": "\tuint32_t level = player->getLevel();\r\n\r\n\tint32_t maxValue = static_cast(Weapons::getMaxWeaponDamage(level, attackSkill, attackValue, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\r\n\r\n\tint32_t minValue = level / 5;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6c0549890e26ba7a", - "equalIndicator/v1": "429fa8a22dafc18570152b360771ef4c31a818109e0d68c74722f8e1b18dcb19" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6845, - "startColumn": 28, - "charOffset": 236961, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6843, - "startColumn": 1, - "charOffset": 236816, - "charLength": 300, - "snippet": { - "text": "\r\nfloat Game::pvpLevelDifferenceDamageMultiplier(std::shared_ptr attacker, std::shared_ptr target) {\r\n\tint32_t levelDifference = target->getLevel() - attacker->getLevel();\r\n\tlevelDifference = std::abs(levelDifference);\r\n\tbool isLowerLevel = target->getLevel() < attacker->getLevel();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c78b85bd9e210482", - "equalIndicator/v1": "42aaf985ab8b010e14fb8261a4b6d30a35d88b46ee60dfc64cc32441cae24ced" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 619, - "startColumn": 8, - "charOffset": 15278, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 617, - "startColumn": 1, - "charOffset": 15168, - "charLength": 228, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetVocationString(lua_State* L) {\r\n\t// itemType:getVocationString()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushString(L, itemType->vocationString);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3fc6e2d996512d3f", - "equalIndicator/v1": "42be6b8620389977e361d669dc48fdef150c126709a55d3c961673944bfae9b7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Redundant string initialization", - "markdown": "Redundant string initialization" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creatures_definitions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1638, - "startColumn": 14, - "charOffset": 41941, - "charLength": 8, - "snippet": { - "text": "itemName" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1636, - "startColumn": 1, - "charOffset": 41876, - "charLength": 377, - "snippet": { - "text": "\tstd::vector childShop;\r\n\tShopBlock() :\r\n\t\titemId(0), itemName(\"\"), itemSubType(0), itemBuyPrice(0), itemSellPrice(0), itemStorageKey(0), itemStorageValue(0) { }\r\n\r\n\texplicit ShopBlock(uint16_t newItemId, std::string newName = \"\", int32_t newSubType = 0, uint32_t newBuyPrice = 0, uint32_t newSellPrice = 0, int32_t newStorageKey = 0, int32_t newStorageValue = 0) :\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5f2462a8d727e077", - "equalIndicator/v1": "42efff8effbf0fd5e2563bd86a354f99170884c1f615f3a3d6b079941a223a67" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iobestiary.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 66, - "startColumn": 24, - "charOffset": 2517, - "charLength": 34, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 64, - "startColumn": 1, - "charOffset": 2440, - "charLength": 244, - "snippet": { - "text": "\r\n\tint8_t calculateDifficult(uint32_t chance) const;\r\n\tuint8_t getKillStatus(const std::shared_ptr mtype, uint32_t killAmount) const;\r\n\r\n\tuint16_t getBestiaryRaceUnlocked(std::shared_ptr player, BestiaryType_t race) const;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3ab9731a6e00d528", - "equalIndicator/v1": "432cdc95eab390b5c0b7bb3a7f5017ed5b87b5b722cc4fef9da996c285ddaa24" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 72, - "startColumn": 107, - "charOffset": 2349, - "charLength": 4, - "snippet": { - "text": "tile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 70, - "startColumn": 1, - "charOffset": 2238, - "charLength": 255, - "snippet": { - "text": "}\r\n\r\nReturnValue EventCallback::creatureOnAreaCombat(std::shared_ptr creature, std::shared_ptr tile, bool aggressive) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnAreaCombat - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "979d833fe4afdac2", - "equalIndicator/v1": "43480bd7592e5de77a10b907263f09bee7e75d2f7521d3f7f433272201d470aa" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'newTile' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'newTile' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 290, - "startColumn": 54, - "charOffset": 7630, - "charLength": 7, - "snippet": { - "text": "newTile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 288, - "startColumn": 1, - "charOffset": 7572, - "charLength": 226, - "snippet": { - "text": "}\r\n\r\nvoid Creature::updateTileCache(std::shared_ptr newTile, int32_t dx, int32_t dy) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (std::abs(dx) <= maxWalkCacheWidth && std::abs(dy) <= maxWalkCacheHeight) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6bd4309d0f4e826c", - "equalIndicator/v1": "43676b58d28b3add37b6da1201165646c888cdd44c9cdc3ee0d21334e7450f85" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'long long' to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'long long' to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/decay/decay.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 57, - "startColumn": 44, - "charOffset": 1669, - "charLength": 8, - "snippet": { - "text": "duration" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 55, - "startColumn": 1, - "charOffset": 1541, - "charLength": 199, - "snippet": { - "text": "\t\t\t\tg_dispatcher().stopEvent(eventId);\r\n\t\t\t\teventId = g_dispatcher().scheduleEvent(\r\n\t\t\t\t\tstd::max(SCHEDULER_MINTICKS, duration), [this] { checkDecay(); }, \"Decay::checkDecay\"\r\n\t\t\t\t);\r\n\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3396627604aab0ba", - "equalIndicator/v1": "436abb4bcfc3ad1addf86fc43604271766bf1ac90002bcac6264ad98cb60b6a9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 141, - "startColumn": 22, - "charOffset": 3871, - "charLength": 8, - "snippet": { - "text": "queryAdd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 139, - "startColumn": 1, - "charOffset": 3818, - "charLength": 506, - "snippet": { - "text": "\r\n\t// cylinder implementations\r\n\tvirtual ReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override final;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e9421f4031cf4086", - "equalIndicator/v1": "436c4328e8b08711c76be4e4f582c5168730a8e25c465066b405bb4e710ed32a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 357, - "startColumn": 94, - "charOffset": 17098, - "charLength": 14, - "snippet": { - "text": "const uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 355, - "startColumn": 1, - "charOffset": 16837, - "charLength": 565, - "snippet": { - "text": "\tvoid playerUpdateContainer(uint32_t playerId, uint8_t cid);\r\n\tvoid playerRotateItem(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerConfigureShowOffSocket(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerSetShowOffSocket(uint32_t playerId, Outfit_t &outfit, const Position &pos, uint8_t stackPos, const uint16_t itemId, uint8_t podiumVisible, uint8_t direction);\r\n\tvoid playerWrapableItem(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1a985db0c292fc35", - "equalIndicator/v1": "4393e0d836561ea9da58a28446c1261a37bc7bed4c0a0b08fa5218f0f44547e9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'uint32_t' (aka 'unsigned int')", - "markdown": "Narrowing conversion from 'double' to 'uint32_t' (aka 'unsigned int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 584, - "startColumn": 92, - "charOffset": 15863, - "charLength": 6, - "snippet": { - "text": "amount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 582, - "startColumn": 1, - "charOffset": 15766, - "charLength": 199, - "snippet": { - "text": "\t}\r\n\r\n\tconst auto &[_, itemsPurchased, backpacksPurchased] = g_game().createItem(player, itemId, amount, subType, actionId, ignoreCap, inBackpacks ? ITEM_SHOPPING_BAG : 0);\r\n\r\n\tstd::stringstream ss;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3e6714af543c8e45", - "equalIndicator/v1": "43a289bbe691521d2d30bf975ba643ec4eeed03e145e92e3213b3a6900627380" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '_CRT_SECURE_NO_WARNINGS', which is a reserved identifier", - "markdown": "Declaration uses identifier '_CRT_SECURE_NO_WARNINGS', which is a reserved identifier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/definitions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 16, - "startColumn": 1, - "charOffset": 459, - "charLength": 7, - "snippet": { - "text": "#ifndef" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 14, - "startColumn": 1, - "charOffset": 449, - "charLength": 84, - "snippet": { - "text": "#endif\r\n\r\n#ifndef _CRT_SECURE_NO_WARNINGS\r\n\t#define _CRT_SECURE_NO_WARNINGS\r\n#endif\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5d24aa2ac5f37a99", - "equalIndicator/v1": "43c9a3854388f18b674bce795a41388d2e8b8407ef766e1dd0a1c73376436223" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 231, - "startColumn": 11, - "charOffset": 7225, - "charLength": 16, - "snippet": { - "text": "getItemTypeCount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 229, - "startColumn": 1, - "charOffset": 7122, - "charLength": 253, - "snippet": { - "text": "\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::shared_ptr getThing(size_t index) const override final;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "47db0f95390397f0", - "equalIndicator/v1": "43e850e2fa3a946f16c6a31e827431a82ef4193f92607da927b2a862c61753f2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/trashholder.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 31, - "startColumn": 14, - "charOffset": 1137, - "charLength": 11, - "snippet": { - "text": "queryRemove" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 29, - "startColumn": 1, - "charOffset": 817, - "charLength": 614, - "snippet": { - "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b445af53ef44374a", - "equalIndicator/v1": "441e91f6200e76e4174b00def76802cb403da502051e9d501ac6e13e077ae080" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 499, - "startColumn": 62, - "charOffset": 16334, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 497, - "startColumn": 1, - "charOffset": 16247, - "charLength": 187, - "snippet": { - "text": "\tScript(interface) { }\r\n\r\nReturnValue Action::canExecuteAction(std::shared_ptr player, const Position &toPos) {\r\n\tif (!allowFarUse) {\r\n\t\treturn g_actions().canUse(player, toPos);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5fdfa36f24f1f4b9", - "equalIndicator/v1": "44359924c116f61018806f96828a58620a0f257ffb06f134d82c4fdbc4f224eb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 836, - "startColumn": 7, - "charOffset": 32044, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 834, - "startColumn": 1, - "charOffset": 31876, - "charLength": 312, - "snippet": { - "text": "\r\nvoid EventCallback::playerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnCombat - \"\r\n\t\t \"Player {} target {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e7d94030d548a872", - "equalIndicator/v1": "4437b4a20c69dbff4d9e84b99aadd1ba920a3f65ff7020ca660f477e33e453fa" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned int' to 'float'", - "markdown": "Narrowing conversion from 'unsigned int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 687, - "startColumn": 37, - "charOffset": 22447, - "charLength": 18, - "snippet": { - "text": "std::min" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 685, - "startColumn": 1, - "charOffset": 22385, - "charLength": 132, - "snippet": { - "text": "\t\t\t\tcase 1:\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 74) * 1.20f) + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "44672b5486bfad55", - "equalIndicator/v1": "443dd37a22687766b6da269c64b04b1259c6c6e8861d261bd39eca4987c634ea" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1161, - "startColumn": 10, - "charOffset": 34684, - "charLength": 11, - "snippet": { - "text": "static_cast" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1159, - "startColumn": 1, - "charOffset": 34668, - "charLength": 64, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tpos -= static_cast(creatures->size());\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d21dfdb26fe80310", - "equalIndicator/v1": "4440f844bb8e6fe66873302d480e1b6dcd092877a45c3d4598544bcc1cfc7db1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'toCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'toCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1947, - "startColumn": 64, - "charOffset": 56256, - "charLength": 10, - "snippet": { - "text": "toCylinder" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1945, - "startColumn": 1, - "charOffset": 56188, - "charLength": 153, - "snippet": { - "text": "}\r\n\r\nSoundEffect_t Item::getMovementSound(std::shared_ptr toCylinder) const {\r\n\tif (!toCylinder) {\r\n\t\treturn SoundEffect_t::ITEM_MOVE_DEFAULT;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f3eae41610451ce8", - "equalIndicator/v1": "4457da6638fb64c5282ad0c91bd4d9d5aaa519bfd6f8a9a9c7061a8f9ac131d0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to 'float'", - "markdown": "Narrowing conversion from 'int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 600, - "startColumn": 123, - "charOffset": 18243, - "charLength": 37, - "snippet": { - "text": "(it.abilities->statsPercent[s] - 100)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 598, - "startColumn": 1, - "charOffset": 18078, - "charLength": 226, - "snippet": { - "text": "\r\n\t\t\tif (it.abilities->statsPercent[s]) {\r\n\t\t\t\tplayer->setVarStats(static_cast(s), static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\r\n\t\t\t}\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a445419c6b0189f9", - "equalIndicator/v1": "4489cf3fd0d4add8cb6b8eb1ee1f36b3da384891a95561db9f1dd56ab28ad589" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 700, - "startColumn": 15, - "charOffset": 22827, - "charLength": 18, - "snippet": { - "text": "std::min" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 698, - "startColumn": 1, - "charOffset": 22787, - "charLength": 98, - "snippet": { - "text": "\t\t\t\tcase 6:\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tchance = std::min(skill, 90);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3388d19863e5d42e", - "equalIndicator/v1": "4490773aa7ecdaf175b77da502ed861c89570c0cb632dad57f854ba5d43560ab" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 818, - "startColumn": 21, - "charOffset": 24515, - "charLength": 16, - "snippet": { - "text": "getItemTypeCount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 816, - "startColumn": 1, - "charOffset": 24490, - "charLength": 164, - "snippet": { - "text": "}\r\n\r\nuint32_t Container::getItemTypeCount(uint16_t itemId, int32_t subType /* = -1*/) const {\r\n\tuint32_t count = 0;\r\n\tfor (std::shared_ptr item : itemlist) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "080d670491961f0f", - "equalIndicator/v1": "449668c9864f056268ad54837b6b7f7fca7cc2c188545d47cf215e906fd1b3e7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'mount' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'mount' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 182, - "startColumn": 16, - "charOffset": 4742, - "charLength": 28, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 180, - "startColumn": 1, - "charOffset": 4655, - "charLength": 194, - "snippet": { - "text": "\tbool tameMount(uint8_t mountId);\r\n\tbool untameMount(uint8_t mountId);\r\n\tbool hasMount(const std::shared_ptr mount) const;\r\n\tbool hasAnyMount() const;\r\n\tuint8_t getRandomMountId() const;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "75ec49ae81059e3a", - "equalIndicator/v1": "449bcbc5e24267be4455ffe09952c7e757cb647169a58bc864a017051199e0e2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 573, - "startColumn": 54, - "charOffset": 17263, - "charLength": 2, - "snippet": { - "text": "it" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 571, - "startColumn": 1, - "charOffset": 17161, - "charLength": 143, - "snippet": { - "text": "\r\n\t\t\tif (it.abilities->getHealthTicks() != 0) {\r\n\t\t\t\tcondition->setParam(CONDITION_PARAM_HEALTHTICKS, it.abilities->getHealthTicks());\r\n\t\t\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7a6072e070f73f08", - "equalIndicator/v1": "44c7870fd23b363eaffb676e301cc9f1841a49908ecc72f4ecaa316fd2b846ae" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '_Where', which is a reserved identifier", - "markdown": "Declaration uses identifier '_Where', which is a reserved identifier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/vectorset.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 78, - "startColumn": 56, - "charOffset": 2102, - "charLength": 6, - "snippet": { - "text": "_Where" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 76, - "startColumn": 1, - "charOffset": 2003, - "charLength": 211, - "snippet": { - "text": "\r\n\t\ttemplate \r\n\t\tconstexpr auto insert(std::vector::const_iterator _Where, _Iter _First, _Iter _Last) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\treturn container.insert(_Where, _First, _Last);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "53908a457391f2a0", - "equalIndicator/v1": "450793c89621a3e4ef939ab39a3c6d7595dc3465e27c233af565786c8b5775fb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2861, - "startColumn": 58, - "charOffset": 106929, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2859, - "startColumn": 1, - "charOffset": 106867, - "charLength": 172, - "snippet": { - "text": "}\r\n\r\nvoid Game::playerQuickLootCorpse(std::shared_ptr player, std::shared_ptr corpse, const Position &position) {\r\n\tif (!player || !corpse) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b97593bc3f32ad80", - "equalIndicator/v1": "452ae2f90e81497c01c79d6758cacd5d17176ecfbb559008d8a6b96846214ee7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1047, - "startColumn": 41, - "charOffset": 39834, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1045, - "startColumn": 1, - "charOffset": 39788, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7bceb677072db636", - "equalIndicator/v1": "454eecb03b94cca7f9f738385c0c6c6fbf9ce87321cf40c231f7cbda9d332446" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'signed char' is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'signed char' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/spectators.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 121, - "startColumn": 54, - "charOffset": 4505, - "charLength": 9, - "snippet": { - "text": "centerPos" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 119, - "startColumn": 1, - "charOffset": 4309, - "charLength": 332, - "snippet": { - "text": "\t\tif (centerPos.z > MAP_INIT_SURFACE_LAYER) {\r\n\t\t\tminRangeZ = static_cast(std::max(centerPos.z - MAP_LAYER_VIEW_LIMIT, 0u));\r\n\t\t\tmaxRangeZ = static_cast(std::min(centerPos.z + MAP_LAYER_VIEW_LIMIT, MAP_MAX_LAYERS - 1));\r\n\t\t} else if (centerPos.z == MAP_INIT_SURFACE_LAYER - 1) {\r\n\t\t\tminRangeZ = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b8858c44924da010", - "equalIndicator/v1": "455ff528b9b1410e9ae0c073b296ecbd57577c71c5eae0e7802ff44db3f95ef5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned int' to 'float'", - "markdown": "Narrowing conversion from 'unsigned int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 664, - "startColumn": 37, - "charOffset": 21738, - "charLength": 18, - "snippet": { - "text": "std::min" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 662, - "startColumn": 1, - "charOffset": 21676, - "charLength": 132, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 2.40f) + 8;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "29f715d8e4b8779e", - "equalIndicator/v1": "456ca079d5a97757559f1660f245a86756f047afa73f52df29edc996e1dce2b3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/creature_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 485, - "startColumn": 39, - "charOffset": 12872, - "charLength": 19, - "snippet": { - "text": "getNumber" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 483, - "startColumn": 1, - "charOffset": 12828, - "charLength": 135, - "snippet": { - "text": "\t}\r\n\r\n\tcreature->health = std::min(getNumber(L, 2), creature->healthMax);\r\n\tg_game().addCreatureHealth(creature);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0a8ccd1ce86ee3dc", - "equalIndicator/v1": "457b7dcc5d68436dfa54c2927b49d26701c7b2171e1599df645bdf8cae1f9766" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iobestiary.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 358, - "startColumn": 4, - "charOffset": 11840, - "charLength": 87, - "snippet": { - "text": "case COMBAT_FIREDAMAGE:\r\n\t\t\t\tdefaultMap[1] -= static_cast(elementEntry.second)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 356, - "startColumn": 1, - "charOffset": 11760, - "charLength": 210, - "snippet": { - "text": "\t\t\t\tdefaultMap[0] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_FIREDAMAGE:\r\n\t\t\t\tdefaultMap[1] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_EARTHDAMAGE:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e4c6412cb31603d7", - "equalIndicator/v1": "459d52cc55a9334cb1e0ca814b9973534adb7bebbfd6f762b2f614e41ee6bafc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 187, - "startColumn": 55, - "charOffset": 5836, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 185, - "startColumn": 1, - "charOffset": 5777, - "charLength": 114, - "snippet": { - "text": "}\r\n\r\nbool Combat::isPlayerCombat(std::shared_ptr target) {\r\n\tif (target->getPlayer()) {\r\n\t\treturn true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "69c3b3d76c7b8c93", - "equalIndicator/v1": "45b5f5190debcddab005d909bddcbb25d7ad06ab7296b2afb92b4ce6296c41ba" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/player_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1971, - "startColumn": 2, - "charOffset": 52732, - "charLength": 77, - "snippet": { - "text": "// player:removeItem(itemId, count[, subType = -1[, ignoreEquipped = false]])" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1969, - "startColumn": 1, - "charOffset": 52671, - "charLength": 224, - "snippet": { - "text": "\r\nint PlayerFunctions::luaPlayerRemoveItem(lua_State* L) {\r\n\t// player:removeItem(itemId, count[, subType = -1[, ignoreEquipped = false]])\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (!player) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1f5c6819c978f847", - "equalIndicator/v1": "45d1093a75245f2ab0dd47e288a217fc96989bbd057afb8f9ce78b7cff23f369" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 612, - "startColumn": 18, - "charOffset": 18549, - "charLength": 17, - "snippet": { - "text": "getReflectPercent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 610, - "startColumn": 1, - "charOffset": 18456, - "charLength": 176, - "snippet": { - "text": "\t * @return The reflection percentage for the specified combat type.\r\n\t */\r\n\tvirtual int32_t getReflectPercent(CombatType_t combatType, bool useCharges = false) const;\r\n\r\n\t/**\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d0ecdcd288286679", - "equalIndicator/v1": "4602240ebc929f7e361e79c0fef3b2896c0a0a66ea9dbdb491e94acc3538593f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 621, - "startColumn": 18, - "charOffset": 18915, - "charLength": 14, - "snippet": { - "text": "getReflectFlat" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 619, - "startColumn": 1, - "charOffset": 18822, - "charLength": 173, - "snippet": { - "text": "\t * @return The flat reflection value for the specified combat type.\r\n\t */\r\n\tvirtual int32_t getReflectFlat(CombatType_t combatType, bool useCharges = false) const;\r\n\r\n\t/**\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fa991b138dab685e", - "equalIndicator/v1": "4621b8aa39a5b98544030da491abbbca3b6d962627ecbac8fac7f171b2991a7d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2803, - "startColumn": 4, - "charOffset": 83670, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2801, - "startColumn": 1, - "charOffset": 83627, - "charLength": 213, - "snippet": { - "text": "\t\t\tsumSkillTries += skills[i].tries;\r\n\r\n\t\t\tuint32_t lostSkillTries = static_cast(sumSkillTries * deathLossPercent);\r\n\t\t\twhile (lostSkillTries > skills[i].tries) {\r\n\t\t\t\tlostSkillTries -= skills[i].tries;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fa9686173b1a16da", - "equalIndicator/v1": "4665265f54082c34352a4ed98494ad5ce964632cf8f41044721b30157e55a780" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7687, - "startColumn": 39, - "charOffset": 240631, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7685, - "startColumn": 1, - "charOffset": 240482, - "charLength": 311, - "snippet": { - "text": "\t\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\r\n\t} else {\r\n\t\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\r\n\t\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6f2fb5066820d019", - "equalIndicator/v1": "468cf10316dec0005590ddacad2bc6d9956396575297241e15caf857318120b2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 444, - "startColumn": 45, - "charOffset": 15937, - "charLength": 5, - "snippet": { - "text": "party" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 442, - "startColumn": 1, - "charOffset": 15841, - "charLength": 158, - "snippet": { - "text": "\tscriptInterface.pushFunction(info.partyOnJoin);\r\n\r\n\tLuaScriptInterface::pushUserdata(L, party);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Party\");\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7fb147236cf49068", - "equalIndicator/v1": "46ab75fe8f73611bead815a417ce6dd4a1465d6b3ff6a67b68fa85b26b6404db" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'key' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'key' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 523, - "startColumn": 26, - "charOffset": 14180, - "charLength": 14, - "snippet": { - "text": "const uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 521, - "startColumn": 1, - "charOffset": 14060, - "charLength": 220, - "snippet": { - "text": "\r\n\tvoid addStorageValue(const uint32_t key, const int32_t value, const bool isLogin = false);\r\n\tint32_t getStorageValue(const uint32_t key) const;\r\n\r\n\tint32_t getStorageValueByName(const std::string &storageName) const;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0b59e87c166727c9", - "equalIndicator/v1": "46bf5a4d18ecd77c0441bb181370a15fff2ff2376c6fad04bed4ca091d36c305" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7678, - "startColumn": 28, - "charOffset": 268655, - "charLength": 14, - "snippet": { - "text": "realManaChange" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7676, - "startColumn": 1, - "charOffset": 268569, - "charLength": 152, - "snippet": { - "text": "\t\t\tTextMessage message;\r\n\t\t\tmessage.position = targetPos;\r\n\t\t\tmessage.primary.value = realManaChange;\r\n\t\t\tmessage.primary.color = TEXTCOLOR_MAYABLUE;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ee7881d860713151", - "equalIndicator/v1": "46e903cecb48f4d1546421b4cc4d429825d446756baf6ef7e07d75b01f387f34" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'podium' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'podium' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8933, - "startColumn": 66, - "charOffset": 283945, - "charLength": 6, - "snippet": { - "text": "podium" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8931, - "startColumn": 1, - "charOffset": 283875, - "charLength": 232, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendMonsterPodiumWindow(std::shared_ptr podium, const Position &position, uint16_t itemId, uint8_t stackPos) {\r\n\tif (!podium || oldProtocol) {\r\n\t\tg_logger().error(\"[{}] item is nullptr\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c9292f5cbfd59421", - "equalIndicator/v1": "47087be17f857ab98eeb12c2ec8061b74bd54223f0543220cdd973573e07f49b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 679, - "startColumn": 43, - "charOffset": 19254, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 677, - "startColumn": 1, - "charOffset": 19207, - "charLength": 95, - "snippet": { - "text": "}\r\n\r\nbool Door::canUse(std::shared_ptr player) const {\r\n\tif (!house) {\r\n\t\treturn true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e083c334d1ba45d5", - "equalIndicator/v1": "471d98744487a30ffe4cca3e5757c31d987e170324153d72737fcb7e9aff427b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::basic_string::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::basic_string::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1918, - "startColumn": 12, - "charOffset": 56472, - "charLength": 15, - "snippet": { - "text": "formattedNumber" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1916, - "startColumn": 1, - "charOffset": 56360, - "charLength": 199, - "snippet": { - "text": "std::string formatNumber(uint64_t number) {\r\n\tstd::string formattedNumber = std::to_string(number);\r\n\tint pos = formattedNumber.length() - 3;\r\n\twhile (pos > 0) {\r\n\t\tformattedNumber.insert(pos, \",\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "92fd1185f5809789", - "equalIndicator/v1": "4725bf0d26f5daae1587ed0e28558d074a8e37d35b274d68e82385dc8286b31d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'partner' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'partner' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 661, - "startColumn": 46, - "charOffset": 23637, - "charLength": 7, - "snippet": { - "text": "partner" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 659, - "startColumn": 1, - "charOffset": 23537, - "charLength": 165, - "snippet": { - "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r\n\tLuaScriptInterface::pushUserdata(L, partner);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b5dae28effd2dc25", - "equalIndicator/v1": "4730eece65509557ddb346ab101d41b226a3ba8a5603e57c7e70d145e054a6b5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Passing result of std::move() as a const reference argument; no move will actually happen", - "markdown": "Passing result of std::move() as a const reference argument; no move will actually happen" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3810, - "startColumn": 36, - "charOffset": 114359, - "charLength": 9, - "snippet": { - "text": "std::move" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3808, - "startColumn": 1, - "charOffset": 114242, - "charLength": 186, - "snippet": { - "text": "\t\t\t\t\t// It will remove items and stop the iteration\r\n\t\t\t\t\tif (count >= amount) {\r\n\t\t\t\t\t\tg_game().internalRemoveItems(std::move(itemList), amount, stackable);\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a783b249b88f5dd8", - "equalIndicator/v1": "4734b390e6be40d01a7ded04b6f78e4aa1f59db5bebe5d7abbfedd3764521d49" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 341, - "startColumn": 20, - "charOffset": 8535, - "charLength": 6, - "snippet": { - "text": "weight" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 339, - "startColumn": 1, - "charOffset": 8423, - "charLength": 136, - "snippet": { - "text": "\r\n\tuint64_t weight = static_cast(itemType->weight) * std::max(1, count);\r\n\tlua_pushnumber(L, weight);\r\n\treturn 1;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ea4826604f52bcd9", - "equalIndicator/v1": "47996c63a1304d6c53459065f6a4077dc2858c56bba0f6196ac7906d650d74ef" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 84, - "startColumn": 59, - "charOffset": 2376, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 82, - "startColumn": 1, - "charOffset": 2313, - "charLength": 239, - "snippet": { - "text": "}\r\n\r\nint32_t Weapon::playerWeaponCheck(std::shared_ptr player, std::shared_ptr target, uint8_t shootRange) const {\r\n\tconst Position &playerPos = player->getPosition();\r\n\tconst Position &targetPos = target->getPosition();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9c3b3b734819be78", - "equalIndicator/v1": "47b507ef65ea6c04a7c8b2d8d97ad9b954d4eed0e728673de9e5dafc67efb8fe" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 111, - "startColumn": 30, - "charOffset": 3272, - "charLength": 32, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 109, - "startColumn": 1, - "charOffset": 3168, - "charLength": 301, - "snippet": { - "text": "\r\n\tbool registerLuaItemEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaActionEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaUniqueEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaPositionEvent(const std::shared_ptr moveEvent);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3a50235118eb91f8", - "equalIndicator/v1": "47e63104efc7b938bd47e7fad54f60f65dca13723f7906b52d48fb1046fb295f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/player_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 885, - "startColumn": 60, - "charOffset": 30773, - "charLength": 16, - "snippet": { - "text": "supremeModifiers" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 883, - "startColumn": 1, - "charOffset": 30634, - "charLength": 235, - "snippet": { - "text": "\t}\r\n\tif (quality >= WheelGemQuality_t::Greater && !supremeModifiers.empty()) {\r\n\t\tgem.supremeModifier = supremeModifiers[uniform_random(0, supremeModifiers.size() - 1)];\r\n\t}\r\n\tg_logger().debug(\"[{}] {}\", __FUNCTION__, gem.toString());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "285c21a29e06f330", - "equalIndicator/v1": "47f4c48a46f4cd28e427bd2fca85f988b3f8914f5482bcad054a6707045c0d13" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iomarket.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 195, - "startColumn": 9, - "charOffset": 7031, - "charLength": 21, - "snippet": { - "text": "itemType.charges != 0" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 193, - "startColumn": 1, - "charOffset": 6988, - "charLength": 116, - "snippet": { - "text": "\t\t\t} else {\r\n\t\t\t\tint32_t subType;\r\n\t\t\t\tif (itemType.charges != 0) {\r\n\t\t\t\t\tsubType = itemType.charges;\r\n\t\t\t\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e98e913c95a257a3", - "equalIndicator/v1": "47ff9b31e31666c1c76a86dbe1b024d18697515d9af017e15fed9e68032265f2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1040, - "startColumn": 11, - "charOffset": 30048, - "charLength": 7, - "snippet": { - "text": "toupper" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1038, - "startColumn": 1, - "charOffset": 30032, - "charLength": 109, - "snippet": { - "text": "\t}\r\n\r\n\tstr[0] = toupper(str.front());\r\n\tfor (size_t i = 1; i < strLength; ++i) {\r\n\t\tif (str[i - 1] == ' ') {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a6b628729f307220", - "equalIndicator/v1": "480d43ca2485ffaa99ed2a53d82087e8a2a1ddefec72634730947ae8bc105ec1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 406, - "startColumn": 57, - "charOffset": 12695, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 404, - "startColumn": 1, - "charOffset": 12634, - "charLength": 154, - "snippet": { - "text": "}\r\n\r\nvoid Monster::onCreatureFound(std::shared_ptr creature, bool pushFront /* = false*/) {\r\n\tif (isFriend(creature)) {\r\n\t\taddFriend(creature);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "528da43e8e39f4e1", - "equalIndicator/v1": "480f32d4904063486d6b87272501a73c06ebbf78079ee50fbb57d99bca76c639" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions", - "markdown": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 224, - "startColumn": 2, - "charOffset": 6894, - "charLength": 4, - "snippet": { - "text": "Item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 222, - "startColumn": 1, - "charOffset": 6864, - "charLength": 164, - "snippet": { - "text": "\r\n\t// Constructor for items\r\n\tItem(const uint16_t type, uint16_t count = 0);\r\n\tItem(const std::shared_ptr &i);\r\n\tvirtual std::shared_ptr clone() const;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d380e2341e6afe3e", - "equalIndicator/v1": "481ac36109201eb36148453b76cfd50703f91dd41e30c5daad7abd1b399691b5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')", - "markdown": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/vocations/vocation.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 72, - "startColumn": 10, - "charOffset": 1835, - "charLength": 16, - "snippet": { - "text": "gainHealthAmount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 70, - "startColumn": 1, - "charOffset": 1783, - "charLength": 138, - "snippet": { - "text": "\r\n\tuint32_t getHealthGainAmount() const {\r\n\t\treturn gainHealthAmount * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9deeba4c3fb7cac8", - "equalIndicator/v1": "48398e8ec55a0287f1f9d3421bb4782301f599f9d770d82664cffdeae9c69fec" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'rune' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'rune' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 141, - "startColumn": 68, - "charOffset": 4588, - "charLength": 4, - "snippet": { - "text": "rune" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 139, - "startColumn": 1, - "charOffset": 4516, - "charLength": 134, - "snippet": { - "text": "}\r\n\r\nbool Spells::registerRuneLuaEvent(const std::shared_ptr rune) {\r\n\tif (rune) {\r\n\t\tuint16_t id = rune->getRuneItemId();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4517340156710613", - "equalIndicator/v1": "483e864cfd40182cba6e920b07e55ff6a34e1510f52de8177e097e55bbcd23d6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1247, - "startColumn": 74, - "charOffset": 34515, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1245, - "startColumn": 1, - "charOffset": 34437, - "charLength": 156, - "snippet": { - "text": "}\r\n\r\nuint32_t ConditionRegeneration::getHealthTicks(std::shared_ptr creature) const {\r\n\tstd::shared_ptr player = creature->getPlayer();\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d242c1342727c60a", - "equalIndicator/v1": "4847acc64ccfa72b9582ccecc975a842bd2cf93935c2bfbde2e8e9ff89f04e96" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 79, - "startColumn": 34, - "charOffset": 2465, - "charLength": 11, - "snippet": { - "text": "getCreature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 77, - "startColumn": 1, - "charOffset": 2388, - "charLength": 158, - "snippet": { - "text": "\t\treturn static_self_cast();\r\n\t}\r\n\tstd::shared_ptr getCreature() const override final {\r\n\t\treturn static_self_cast();\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "44db797ca05f6ae0", - "equalIndicator/v1": "484995cc799170a193db7d43900575b505a8a87b5ce9a26c23baafd4c53367c7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 777, - "startColumn": 67, - "charOffset": 22564, - "charLength": 9, - "snippet": { - "text": "container" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 775, - "startColumn": 1, - "charOffset": 22493, - "charLength": 114, - "snippet": { - "text": "}\r\n\r\nvoid Player::addContainer(uint8_t cid, std::shared_ptr container) {\r\n\tif (cid > 0xF) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1ef29293e27aa744", - "equalIndicator/v1": "4850516b5acd210da8d29052302b0cec4c8e2c33c9ce8f7840f3e895edc3bd72" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 831, - "startColumn": 98, - "charOffset": 29954, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 829, - "startColumn": 1, - "charOffset": 29852, - "charLength": 343, - "snippet": { - "text": "}\r\n\r\nbool Events::eventPlayerOnMoveCreature(std::shared_ptr player, std::shared_ptr creature, const Position &fromPosition, const Position &toPosition) {\r\n\t// Player:onMoveCreature(creature, fromPosition, toPosition) or Player.onMoveCreature(self, creature, fromPosition, toPosition)\r\n\tif (info.playerOnMoveCreature == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "00d4d67c8a39f642", - "equalIndicator/v1": "48505bdffa3077e8fab95257323fdc7a1b52ffc3c4f120b54e44d4e0c22bf80f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions", - "markdown": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/metrics/metrics.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 190, - "startColumn": 2, - "charOffset": 7034, - "charLength": 20, - "snippet": { - "text": "DEFINE_LATENCY_CLASS" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 188, - "startColumn": 1, - "charOffset": 6929, - "charLength": 198, - "snippet": { - "text": "\tDEFINE_LATENCY_CLASS(lua, \"lua\", \"scope\");\r\n\tDEFINE_LATENCY_CLASS(query, \"query\", \"truncated_query\");\r\n\tDEFINE_LATENCY_CLASS(task, \"task\", \"task\");\r\n\tDEFINE_LATENCY_CLASS(lock, \"lock\", \"scope\");\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bb2e875fbb41b2ac", - "equalIndicator/v1": "485ac41b4f226a9a795057a59941ce6607dd919f79ec46a451316f665c02cf9d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1194, - "startColumn": 67, - "charOffset": 42704, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1192, - "startColumn": 1, - "charOffset": 42633, - "charLength": 157, - "snippet": { - "text": "}\r\n\r\nvoid Events::eventPlayerOnRequestQuestLog(std::shared_ptr player) {\r\n\t// Player:onRequestQuestLog()\r\n\tif (info.playerOnRequestQuestLog == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "33dd2262321335c6", - "equalIndicator/v1": "48696ed7904bc59637d5e6a718f186e86e1fc1ae6ff41727cd3854ec525159c2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'id' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'id' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 179, - "startColumn": 31, - "charOffset": 6255, - "charLength": 14, - "snippet": { - "text": "const uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 177, - "startColumn": 1, - "charOffset": 6145, - "charLength": 144, - "snippet": { - "text": "\tbool isAnyKindOfRewardContainer();\r\n\tbool isBrowseFieldAndHoldsRewardChest();\r\n\tbool isInsideContainerWithId(const uint16_t id);\r\n\r\nprotected:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f81f15638a611ffd", - "equalIndicator/v1": "4882fdf1a6c2708f8dc3f33cf690444697642db22e4b62cca84896fd72478f45" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'target' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'target' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 505, - "startColumn": 25, - "charOffset": 27307, - "charLength": 29, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 503, - "startColumn": 1, - "charOffset": 27116, - "charLength": 412, - "snippet": { - "text": "\tstatic void addCreatureHealth(const CreatureVector &spectators, const std::shared_ptr target);\r\n\tvoid addPlayerMana(const std::shared_ptr target);\r\n\tvoid addPlayerVocation(const std::shared_ptr target);\r\n\tvoid addMagicEffect(const Position &pos, uint16_t effect);\r\n\tstatic void addMagicEffect(const std::vector> &players, const Position &pos, uint16_t effect);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7a3d2956513a9679", - "equalIndicator/v1": "48b001bc76935e9f4d2e8b0d96e02e20f4460e5a7aa921ea606539cbf7af8026" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'setAttackedCreature' is within a recursive call chain", - "markdown": "Function 'setAttackedCreature' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1010, - "startColumn": 16, - "charOffset": 32219, - "charLength": 19, - "snippet": { - "text": "setAttackedCreature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1008, - "startColumn": 1, - "charOffset": 32199, - "charLength": 128, - "snippet": { - "text": "}\r\n\r\nbool Creature::setAttackedCreature(std::shared_ptr creature) {\r\n\tif (creature) {\r\n\t\tauto monster = getMonster();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "58a2fd7bc0f1a265", - "equalIndicator/v1": "48c291c3caae9a88ec0d92473afb9f82f0f54cc5e1d4d8f0a8b94fe7182febf0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'isImmuneCleanse' can be made const", - "markdown": "Method 'isImmuneCleanse' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1965, - "startColumn": 7, - "charOffset": 57922, - "charLength": 15, - "snippet": { - "text": "isImmuneCleanse" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1963, - "startColumn": 1, - "charOffset": 57861, - "charLength": 195, - "snippet": { - "text": "\t\tcleanseCondition.second = OTSYS_TIME() + 10000;\r\n\t}\r\n\tbool isImmuneCleanse(ConditionType_t conditiontype) {\r\n\t\tuint64_t timenow = OTSYS_TIME();\r\n\t\tif ((cleanseCondition.first == conditiontype)\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "84a747f9251097af", - "equalIndicator/v1": "48c55d351d54c7323e43d24fd0eac8566af62d3512683f4997d8f350890b1e75" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'isSupplyStashMenuAvailable' can be made const", - "markdown": "Method 'isSupplyStashMenuAvailable' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 576, - "startColumn": 7, - "charOffset": 15775, - "charLength": 26, - "snippet": { - "text": "isSupplyStashMenuAvailable" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 574, - "startColumn": 1, - "charOffset": 15742, - "charLength": 91, - "snippet": { - "text": "\t\treturn depotSearch;\r\n\t}\r\n\tbool isSupplyStashMenuAvailable() {\r\n\t\treturn supplyStash;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "24ba172ec9fd958f", - "equalIndicator/v1": "48f187989f1024502011b56d1bd336dd4a1c0e29db82c921da4ada263d5d6281" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Move constructor should not be declared explicit", - "markdown": "Move constructor should not be declared explicit" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/di/shared.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 31, - "startColumn": 14, - "charOffset": 716, - "charLength": 5, - "snippet": { - "text": "scope" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 29, - "startColumn": 1, - "charOffset": 607, - "charLength": 260, - "snippet": { - "text": "#if !defined(BOOST_DI_NOT_THREAD_SAFE)\r\n\t\t\t\t//<>\r\n\t\t\t\texplicit scope(scope &&other) noexcept :\r\n\t\t\t\t\tscope(std::move(other), std::scoped_lock(other.mutex_)) { }\r\n\t\t\t\t//<>\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "92fbd106d7e2ab92", - "equalIndicator/v1": "490c055d11038d933f7c8673fbe1efe1cc28ed34fd512db89f5b9a9d6c643e40" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'getFreeSlots' is within a recursive call chain", - "markdown": "Function 'getFreeSlots' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 914, - "startColumn": 21, - "charOffset": 27499, - "charLength": 12, - "snippet": { - "text": "getFreeSlots" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 912, - "startColumn": 1, - "charOffset": 27474, - "charLength": 109, - "snippet": { - "text": "}\r\n\r\nuint16_t Container::getFreeSlots() {\r\n\tuint16_t counter = std::max(0, capacity() - size());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ab0fdc1e1cc0b6de", - "equalIndicator/v1": "49143e70fc6c7a18f535863404ca7c9e087052556f5e9b2d37f75b7d11bee868" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/loot_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 186, - "startColumn": 29, - "charOffset": 4805, - "charLength": 19, - "snippet": { - "text": "getNumber" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 184, - "startColumn": 1, - "charOffset": 4712, - "charLength": 156, - "snippet": { - "text": "\tconst auto loot = getUserdataShared(L, 1);\r\n\tif (loot) {\r\n\t\tloot->lootBlock.defense = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b40b7489af5cb3c1", - "equalIndicator/v1": "491ef4965dabfac3a4be69a2f4fc636d2b2e15d41cae655da15ed94634b3c018" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 597, - "startColumn": 47, - "charOffset": 30629, - "charLength": 4, - "snippet": { - "text": "tile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 595, - "startColumn": 1, - "charOffset": 30548, - "charLength": 122, - "snippet": { - "text": "\t\ttilesToClean.emplace(tile);\r\n\t}\r\n\tvoid removeTileToClean(std::shared_ptr tile) {\r\n\t\ttilesToClean.erase(tile);\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dc4af76d170dcb7e", - "equalIndicator/v1": "4924d215daa57b92c5f9cfd5fb55f84615f9457163f6e1fbc1cafd36cb44298d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3533, - "startColumn": 63, - "charOffset": 106804, - "charLength": 1, - "snippet": { - "text": "n" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3531, - "startColumn": 1, - "charOffset": 106734, - "charLength": 176, - "snippet": { - "text": "\t\t\t}\r\n\r\n\t\t\tif (n < tmpContainer->capacity() && tmpContainer->queryAdd(n, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) {\r\n\t\t\t\tindex = n;\r\n\t\t\t\t*destItem = nullptr;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2a5428162904bae6", - "equalIndicator/v1": "49255c88f1535c86447c89de69167a4fd18c4804ef17ad0548d1a36aa121c57c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 686, - "startColumn": 27, - "charOffset": 24501, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 684, - "startColumn": 1, - "charOffset": 24469, - "charLength": 129, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnLookInShop, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b3fbc660df3292e6", - "equalIndicator/v1": "493782a75e247da2e77411c3196305039dce6d85979f0673b943f3cedaf8967e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'time_t' (aka 'long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'time_t' (aka 'long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/player_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 254, - "startColumn": 18, - "charOffset": 6730, - "charLength": 6, - "snippet": { - "text": "Player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 252, - "startColumn": 1, - "charOffset": 6616, - "charLength": 231, - "snippet": { - "text": "int PlayerFunctions::luaPlayerGetLastLoginSaved(lua_State* L) {\r\n\t// player:getLastLoginSaved()\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (player) {\r\n\t\tlua_pushnumber(L, player->getLastLoginSaved());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b2a6a4083c645be4", - "equalIndicator/v1": "495d4db35d0e372191c011e9e0ebcdf23b1169ed5ec5e5e0821695542591af09" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 644, - "startColumn": 7, - "charOffset": 22976, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 642, - "startColumn": 1, - "charOffset": 22964, - "charLength": 143, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnLookInTrade - \"\r\n\t\t \"Player {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "309057b50eba770a", - "equalIndicator/v1": "498326d03137e02bbb360c15b16c5cf62b320671fc4b74945ef6807cb0617131" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/monster_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 239, - "startColumn": 3, - "charOffset": 7213, - "charLength": 14, - "snippet": { - "text": "lua_pushnumber" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 237, - "startColumn": 1, - "charOffset": 7123, - "charLength": 172, - "snippet": { - "text": "\tstd::shared_ptr monster = getUserdataShared(L, 1);\r\n\tif (monster) {\r\n\t\tlua_pushnumber(L, monster->getFriendList().size());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6850574d9de02153", - "equalIndicator/v1": "4991e8535cc250ddb9f3bbe3e87af2e74a160e35c110e1b561d949dc96c7f981" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 394, - "startColumn": 35, - "charOffset": 11580, - "charLength": 4, - "snippet": { - "text": "info" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 392, - "startColumn": 1, - "charOffset": 11496, - "charLength": 176, - "snippet": { - "text": "\tif (monsterType) {\r\n\t\tif (lua_gettop(L) == 1) {\r\n\t\t\tlua_pushnumber(L, monsterType->info.experience);\r\n\t\t} else {\r\n\t\t\tmonsterType->info.experience = getNumber(L, 2);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e1b105f0cfaa3bb9", - "equalIndicator/v1": "499281be825ce11c24d3305f4ab9b35b51f7d4ec2599febf4214428e18366d71" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 529, - "startColumn": 6, - "charOffset": 18811, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 527, - "startColumn": 1, - "charOffset": 18778, - "charLength": 170, - "snippet": { - "text": "\tlua_pushnumber(L, exp);\r\n\r\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "770850c9bc6d1082", - "equalIndicator/v1": "49a38967541e273ea77f5ba7bb2dc001c41a01a1ee0c9a88d7b8f9f2c9be83e8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 525, - "startColumn": 19, - "charOffset": 15602, - "charLength": 8, - "snippet": { - "text": "newOwner" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 523, - "startColumn": 1, - "charOffset": 15577, - "charLength": 99, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tsetNewOwnerGuid(newOwner->getGUID(), false);\r\n\t} else {\r\n\t\tsetOwner(newOwner->getGUID());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4ddd21e9d6c225b4", - "equalIndicator/v1": "49c039e4780bf4bbab854610ebc79a36dcc92ef6ebc33288ff61b02b4f4db5f5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/rewards/reward.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 25, - "startColumn": 7, - "charOffset": 792, - "charLength": 19, - "snippet": { - "text": "postAddNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 23, - "startColumn": 1, - "charOffset": 627, - "charLength": 463, - "snippet": { - "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) final;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a1e157cdd4f5b88d", - "equalIndicator/v1": "49c97260dc413ad534c927160e636bf161e57c4f0c18f27b5c24073aea418cf3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2078, - "startColumn": 89, - "charOffset": 61435, - "charLength": 7, - "snippet": { - "text": "newItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2076, - "startColumn": 1, - "charOffset": 61331, - "charLength": 178, - "snippet": { - "text": "\r\n// inventory\r\nvoid Player::onUpdateInventoryItem(std::shared_ptr oldItem, std::shared_ptr newItem) {\r\n\tif (oldItem != newItem) {\r\n\t\tonRemoveInventoryItem(oldItem);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "031025a87b712db7", - "equalIndicator/v1": "49cba00fa1986afc76c89ee949d99fdc8460ee7e5c771c49430c612cb5ec3a74" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1822, - "startColumn": 19, - "charOffset": 54616, - "charLength": 14, - "snippet": { - "text": "getReflectFlat" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1820, - "startColumn": 1, - "charOffset": 54593, - "charLength": 166, - "snippet": { - "text": "}\r\n\r\nint32_t Creature::getReflectFlat(CombatType_t combatType, bool useCharges /* = false*/) const {\r\n\ttry {\r\n\t\treturn reflectFlat.at(combatTypeToIndex(combatType));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a31de34f5143f2a1", - "equalIndicator/v1": "49e9afe9df0263c327a54f8d7e059fd4c2c59ee5cc01a76b61895961f02aa245" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1484, - "startColumn": 66, - "charOffset": 58953, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1482, - "startColumn": 1, - "charOffset": 58883, - "charLength": 181, - "snippet": { - "text": "}\r\n\r\nReturnValue Game::internalMoveCreature(std::shared_ptr creature, Direction direction, uint32_t flags /*= 0*/) {\r\n\tif (!creature) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "487a77d928bd4661", - "equalIndicator/v1": "49f471c46d5edcd063737b7377035fb889cca172e122842ede7f73d76da7f3ec" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1397, - "startColumn": 40, - "charOffset": 42050, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1395, - "startColumn": 1, - "charOffset": 41898, - "charLength": 184, - "snippet": { - "text": "\tvoid sendPartyCreatureShowStatus(std::shared_ptr creature, bool showStatus) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPartyCreatureShowStatus(creature, showStatus);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8df3c79bd4411c2c", - "equalIndicator/v1": "4a1674dab55cabca458c3f2dc70671f959e5b8fbd9b191391cd79685dceb5e39" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 156, - "startColumn": 29, - "charOffset": 4385, - "charLength": 8, - "snippet": { - "text": "getPrice" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 154, - "startColumn": 1, - "charOffset": 4302, - "charLength": 216, - "snippet": { - "text": "\r\n\tss << \" It is \" << getSize() << \" square meters.\";\r\n\tconst int32_t housePrice = getPrice();\r\n\tif (housePrice != -1) {\r\n\t\tif (g_configManager().getBoolean(HOUSE_PURSHASED_SHOW_PRICE, __FUNCTION__) || owner == 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2c188db107029f53", - "equalIndicator/v1": "4a3556fac4032a14efe69ff6410b61f55be2787fde96cc04550cac934a766bd8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 772, - "startColumn": 32, - "charOffset": 20813, - "charLength": 11, - "snippet": { - "text": "getCapacity" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 770, - "startColumn": 1, - "charOffset": 20721, - "charLength": 135, - "snippet": { - "text": "\t\t\treturn std::numeric_limits::max();\r\n\t\t} else {\r\n\t\t\treturn std::max(0, getCapacity() - inventoryWeight);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "68e70339d9ce10d4", - "equalIndicator/v1": "4a36e38a3c4cebf8c2bf2886f998dc5a0a4566e5e55fe4ce6af34fd8d07d5749" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6234, - "startColumn": 59, - "charOffset": 215645, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6232, - "startColumn": 1, - "charOffset": 215582, - "charLength": 148, - "snippet": { - "text": "}\r\n\r\nbool Game::internalCreatureTurn(std::shared_ptr creature, Direction dir) {\r\n\tif (creature->getDirection() == dir) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2581be5538cef3e2", - "equalIndicator/v1": "4a7b67e5aaed247d4ba329bef803ecd53ec3278a227915ff24e1cbae590aeea9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 526, - "startColumn": 61, - "charOffset": 14341, - "charLength": 13, - "snippet": { - "text": "const int32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 524, - "startColumn": 1, - "charOffset": 14208, - "charLength": 220, - "snippet": { - "text": "\r\n\tint32_t getStorageValueByName(const std::string &storageName) const;\r\n\tvoid addStorageValueByName(const std::string &storageName, const int32_t value, const bool isLogin = false);\r\n\r\n\tstd::shared_ptr kv() const {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "054d96a8409cc701", - "equalIndicator/v1": "4a88c76b734f16e639411de4c8a1848a2978b755c5812e0d746da3350d794499" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2047, - "startColumn": 3, - "charOffset": 62761, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2045, - "startColumn": 1, - "charOffset": 62624, - "charLength": 334, - "snippet": { - "text": "\t\tg_game().playerInspectItem(player, pos);\r\n\t} else if (inspectionType == INSPECT_NPCTRADE || inspectionType == INSPECT_CYCLOPEDIA) {\r\n\t\tuint16_t itemId = msg.get();\r\n\t\tuint16_t itemCount = msg.getByte();\r\n\t\tg_game().playerInspectItem(player, itemId, static_cast(itemCount), (inspectionType == INSPECT_CYCLOPEDIA));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ca14c8217f3e508e", - "equalIndicator/v1": "4a9d2a2df4e8284882da5ddb5477d630cf8a7035958c1d1bf41a2cbfb59ae637" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1549, - "startColumn": 27, - "charOffset": 54469, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1547, - "startColumn": 1, - "charOffset": 54437, - "charLength": 159, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "44852728f660e9ad", - "equalIndicator/v1": "4ab0b6bab44ca3f53c9a7be50ae722b799391ffc2fc38f67bc97b4a63475a6a3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 235, - "startColumn": 7, - "charOffset": 7541, - "charLength": 22, - "snippet": { - "text": "postRemoveNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 233, - "startColumn": 1, - "charOffset": 7374, - "charLength": 388, - "snippet": { - "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r\n\r\n\tvoid internalAddThing(std::shared_ptr thing) override;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "697eef31aa7df9db", - "equalIndicator/v1": "4ac21b76b7152b52e0f5dcc6154037ffed41f964cd8b6ea493c6606d64084fa5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'updateTile' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'updateTile' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1072, - "startColumn": 48, - "charOffset": 31197, - "charLength": 10, - "snippet": { - "text": "updateTile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1070, - "startColumn": 1, - "charOffset": 31141, - "charLength": 224, - "snippet": { - "text": "\t\t}\r\n\t}\r\n\tvoid sendUpdateTileItem(std::shared_ptr updateTile, const Position &pos, std::shared_ptr item) {\r\n\t\tif (client) {\r\n\t\t\tint32_t stackpos = updateTile->getStackposOfItem(static_self_cast(), item);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5a3d1bf7bbfec3f5", - "equalIndicator/v1": "4acea45cdbd395d4b7886606d65386d2b266f788b1f1dd63d9a4fc40f6795701" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '_Val', which is a reserved identifier", - "markdown": "Declaration uses identifier '_Val', which is a reserved identifier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/vectorset.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 72, - "startColumn": 68, - "charOffset": 1912, - "charLength": 4, - "snippet": { - "text": "_Val" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 70, - "startColumn": 1, - "charOffset": 1838, - "charLength": 159, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tconstexpr auto insert(std::vector::const_iterator _Where, T &&_Val) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\treturn container.insert(_Where, std::move(_Val));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "677f6d12e0124f8d", - "equalIndicator/v1": "4aefd58fef4ae6fbd02cad3c34d6152c24b7c5aff89cc65a60d475c220540aa8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/depot/depotchest.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 41, - "startColumn": 5, - "charOffset": 1301, - "charLength": 8, - "snippet": { - "text": "addCount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 39, - "startColumn": 1, - "charOffset": 1181, - "charLength": 201, - "snippet": { - "text": "\t\tif (item->getTopParent().get() != this) {\r\n\t\t\tif (std::shared_ptr container = item->getContainer()) {\r\n\t\t\t\taddCount = container->getItemHoldingCount() + 1;\r\n\t\t\t} else {\r\n\t\t\t\taddCount = 1;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a5629c801ec8425d", - "equalIndicator/v1": "4af60f92efa4112564e0a7759f0a55a15f4e5b9751a8f5ebfcb7ed3d6fb67a17" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 22, - "startColumn": 65, - "charOffset": 713, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 20, - "startColumn": 1, - "charOffset": 615, - "charLength": 146, - "snippet": { - "text": "Weapons::~Weapons() = default;\r\n\r\nconst WeaponShared_ptr Weapons::getWeapon(std::shared_ptr item) const {\r\n\tif (!item) {\r\n\t\treturn nullptr;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a3f07a0233d6da00", - "equalIndicator/v1": "4af7dfa84913933630ffa9563b62f35da99390a5e973b9088b8c0c3284dfb8fe" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/npcs/npc.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 585, - "startColumn": 59, - "charOffset": 18880, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 583, - "startColumn": 1, - "charOffset": 18817, - "charLength": 173, - "snippet": { - "text": "}\r\n\r\nvoid Npc::removePlayerInteraction(std::shared_ptr player) {\r\n\tif (playerInteractions.contains(player->getID())) {\r\n\t\tplayerInteractions.erase(player->getID());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "456233d07cb8b33c", - "equalIndicator/v1": "4b67be18d9354ee74d662fca808ac36b391779ea79ebe571c1c6cdca8d79eb71" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 522, - "startColumn": 43, - "charOffset": 14104, - "charLength": 13, - "snippet": { - "text": "const int32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 520, - "startColumn": 1, - "charOffset": 14014, - "charLength": 195, - "snippet": { - "text": "\tbool canOpenCorpse(uint32_t ownerId) const;\r\n\r\n\tvoid addStorageValue(const uint32_t key, const int32_t value, const bool isLogin = false);\r\n\tint32_t getStorageValue(const uint32_t key) const;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8b99d537436bf41e", - "equalIndicator/v1": "4b6d69ae0117ad430b215fbd323839c4392151f1276937aa613496b51f9eb759" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 253, - "startColumn": 88, - "charOffset": 9326, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 251, - "startColumn": 1, - "charOffset": 9234, - "charLength": 213, - "snippet": { - "text": "}\r\n\r\nbool EventCallback::partyOnLeave(std::shared_ptr party, std::shared_ptr player) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::partyOnLeave - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f4b6177e49cd6db8", - "equalIndicator/v1": "4b6f887d619dd83dab7298f54ff6935dc831eff776172fde019505a4ac2d3659" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1944, - "startColumn": 151, - "charOffset": 75849, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1942, - "startColumn": 1, - "charOffset": 75694, - "charLength": 444, - "snippet": { - "text": "}\r\n\r\nReturnValue Game::internalMoveItem(std::shared_ptr fromCylinder, std::shared_ptr toCylinder, int32_t index, std::shared_ptr item, uint32_t count, std::shared_ptr* movedItem, uint32_t flags /*= 0*/, std::shared_ptr actor /*=nullptr*/, std::shared_ptr tradeItem /* = nullptr*/, bool checkTile /* = true*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (fromCylinder == nullptr) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6b0d4ac5794df445", - "equalIndicator/v1": "4b8f1e64a06edfaac0485e0b8da6b73ce7352e8fd5b3bef939a0cb655d06c763" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 72, - "startColumn": 75, - "charOffset": 2317, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 70, - "startColumn": 1, - "charOffset": 2238, - "charLength": 255, - "snippet": { - "text": "}\r\n\r\nReturnValue EventCallback::creatureOnAreaCombat(std::shared_ptr creature, std::shared_ptr tile, bool aggressive) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnAreaCombat - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d9c8e968b105a7e9", - "equalIndicator/v1": "4b90f23889712061fa16a634af0e5406e70d9f76da322c057632c0b3ddb5033a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Replace loop by 'std::ranges::any_of()'", - "markdown": "Replace loop by 'std::ranges::any_of()'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5158, - "startColumn": 2, - "charOffset": 152227, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5156, - "startColumn": 1, - "charOffset": 152160, - "charLength": 302, - "snippet": { - "text": "\r\nbool Player::hasKilled(std::shared_ptr player) const {\r\n\tfor (const auto &kill : unjustifiedKills) {\r\n\t\tif (kill.target == player->getGUID() && (time(nullptr) - kill.time) < g_configManager().getNumber(ORANGE_SKULL_DURATION, __FUNCTION__) * 24 * 60 * 60 && kill.unavenged) {\r\n\t\t\treturn true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5dcce8e8ad9ce384", - "equalIndicator/v1": "4bb441924062d4c12402e29b36a30903fd66c57cec9b2b7cb59b87ae89528f14" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '_Val', which is a reserved identifier", - "markdown": "Declaration uses identifier '_Val', which is a reserved identifier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/arraylist.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 97, - "startColumn": 23, - "charOffset": 2202, - "charLength": 4, - "snippet": { - "text": "_Val" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 95, - "startColumn": 1, - "charOffset": 2173, - "charLength": 107, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tvoid push_front(T &&_Val) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\tfrontContainer.push_back(std::move(_Val));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c6d01226d1ecd32a", - "equalIndicator/v1": "4bd93aaf65d4feebfd11fbfd1be633aaea63c718fefc7ede9c7ca3a153778ad8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'vocName' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'vocName' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 165, - "startColumn": 35, - "charOffset": 4238, - "charLength": 7, - "snippet": { - "text": "vocName" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 163, - "startColumn": 1, - "charOffset": 4198, - "charLength": 140, - "snippet": { - "text": "\t}\r\n\r\n\tvoid addVocWeaponMap(std::string vocName) {\r\n\t\tint32_t vocationId = g_vocations().getVocationId(vocName);\r\n\t\tif (vocationId != -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3cefefb4587a8dfd", - "equalIndicator/v1": "4be0b679a15da5a2acab9d883029e647ebd566625001754a146866e7fadef006" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocol.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 172, - "startColumn": 2, - "charOffset": 5606, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 170, - "startColumn": 1, - "charOffset": 5599, - "charLength": 122, - "snippet": { - "text": "\t}\r\n\r\n\tuint16_t innerLength = msg.get();\r\n\tif (std::cmp_greater(innerLength, msgLength - 2)) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "eb81a5f907dd2dff", - "equalIndicator/v1": "4bead31fdd6a31d116421ac1a191b8672b7007180c5a85ad44cda11a98379274" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1143, - "startColumn": 99, - "charOffset": 43421, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1141, - "startColumn": 1, - "charOffset": 43318, - "charLength": 237, - "snippet": { - "text": "}\r\n\r\nbool EventCallback::zoneBeforeCreatureEnter(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneBeforeCreatureEnter - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0751c91e2737c77c", - "equalIndicator/v1": "4bfcbacdd796bd9d3aec9a7637646e8d722d100376a0c70a7e94e632e7e77c33" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #5 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #5 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 339, - "startColumn": 157, - "charOffset": 9231, - "charLength": 1, - "snippet": { - "text": "," - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 337, - "startColumn": 1, - "charOffset": 9070, - "charLength": 223, - "snippet": { - "text": "}\r\n\r\nvoid Creature::onUpdateTileItem(std::shared_ptr updateTile, const Position &pos, std::shared_ptr, const ItemType &oldType, std::shared_ptr, const ItemType &newType) {\r\n\tif (!isMapLoaded) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "812ae60a824901bf", - "equalIndicator/v1": "4c2289b6dcc5588e1fceb19180964760f88167d11d562bd87d5e934b89e2eed5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 733, - "startColumn": 60, - "charOffset": 23553, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 731, - "startColumn": 1, - "charOffset": 23489, - "charLength": 272, - "snippet": { - "text": "}\r\n\r\nvoid Combat::CombatConditionFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\r\n\tif (params.origin == ORIGIN_MELEE && data && data->primary.value == 0 && data->secondary.value == 0) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ef652b8659ed04cf", - "equalIndicator/v1": "4c33e4ff282627692523f00f9680a7f653c3a5f7f46e3e7f56d156995756d978" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5685, - "startColumn": 50, - "charOffset": 168062, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5683, - "startColumn": 1, - "charOffset": 168008, - "charLength": 114, - "snippet": { - "text": "}\r\n\r\nbool Player::isGuildMate(std::shared_ptr player) const {\r\n\tif (!player || !guild) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "abbe2fc26f75e1d2", - "equalIndicator/v1": "4c42fce3eb1c8112e07cc3ec4f0eb70ba40f397c5a5c49d09517150281007b50" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?", - "markdown": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2496, - "startColumn": 7, - "charOffset": 69698, - "charLength": 25, - "snippet": { - "text": "Condition::startCondition" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2494, - "startColumn": 1, - "charOffset": 69602, - "charLength": 156, - "snippet": { - "text": "\r\nbool ConditionSpellGroupCooldown::startCondition(std::shared_ptr creature) {\r\n\tif (!Condition::startCondition(creature)) {\r\n\t\treturn false;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "657723440c8607e4", - "equalIndicator/v1": "4c51226dfe1b01268c5513d8f9b42e627d4b736592e8aa0f88f410cc4406b8b9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions", - "markdown": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 225, - "startColumn": 2, - "charOffset": 6943, - "charLength": 4, - "snippet": { - "text": "Item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 223, - "startColumn": 1, - "charOffset": 6866, - "charLength": 164, - "snippet": { - "text": "\t// Constructor for items\r\n\tItem(const uint16_t type, uint16_t count = 0);\r\n\tItem(const std::shared_ptr &i);\r\n\tvirtual std::shared_ptr clone() const;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0268ccc5edda4196", - "equalIndicator/v1": "4c53538cc364e81449d9814b0b92982c40f146f0ff02cffe10aeb19c3d489c6a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 167, - "startColumn": 50, - "charOffset": 5884, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 165, - "startColumn": 1, - "charOffset": 5809, - "charLength": 195, - "snippet": { - "text": "\r\n\ttemplate \r\n\tT getCustomAttributeValue(std::shared_ptr item, const std::string &attributeName) {\r\n\t\tstatic_assert(std::is_integral::value, \"T must be an integral type\");\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "912d5ca23755b3b3", - "equalIndicator/v1": "4c5a7529c79faf765a4d7a9af7fcdcb08732548f760c31a068bd76d59b2716db" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2386, - "startColumn": 51, - "charOffset": 70477, - "charLength": 6, - "snippet": { - "text": "rawExp" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2384, - "startColumn": 1, - "charOffset": 70261, - "charLength": 310, - "snippet": { - "text": "\tstd::map attrs({ { \"player\", getName() }, { \"level\", std::to_string(getLevel()) }, { \"rate\", std::to_string(rate) } });\r\n\tif (sendText) {\r\n\t\tg_metrics().addCounter(\"player_experience_raw\", rawExp, attrs);\r\n\t\tg_metrics().addCounter(\"player_experience_actual\", exp, attrs);\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7a03374d95622f57", - "equalIndicator/v1": "4c6c260287f442056188f4580d510eb5c866906d8a395bcfc7fd966eb6d266d6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8456, - "startColumn": 4, - "charOffset": 267684, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8454, - "startColumn": 1, - "charOffset": 267601, - "charLength": 238, - "snippet": { - "text": "\t\tcase SUPPLY_STASH_ACTION_STOW_STACK: {\r\n\t\t\tPosition pos = msg.getPosition();\r\n\t\t\tuint16_t itemId = msg.get();\r\n\t\t\tuint8_t stackpos = msg.getByte();\r\n\t\t\tg_game().playerStowItem(player->getID(), pos, itemId, stackpos, 0, true);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "661e4e504254432b", - "equalIndicator/v1": "4c7be62b9c1a54dc3e05b93cf3b4d7f388b3771379a88c2ed27eb6ad90240ca3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'uint64_t' (aka 'unsigned long long')", - "markdown": "Narrowing conversion from 'double' to 'uint64_t' (aka 'unsigned long long')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2397, - "startColumn": 10, - "charOffset": 70993, - "charLength": 112, - "snippet": { - "text": "(exp * (1.75 * getHazardSystemPoints() * g_configManager().getFloat(HAZARD_EXP_BONUS_MULTIPLIER, __FUNCTION__)))" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2395, - "startColumn": 1, - "charOffset": 70856, - "charLength": 264, - "snippet": { - "text": "\tbool handleHazardExperience = monster && monster->getHazard() && getHazardSystemPoints() > 0;\r\n\tif (handleHazardExperience) {\r\n\t\texp += (exp * (1.75 * getHazardSystemPoints() * g_configManager().getFloat(HAZARD_EXP_BONUS_MULTIPLIER, __FUNCTION__))) / 100.;\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b2b0ceeb68e11860", - "equalIndicator/v1": "4c92dc3fee214c07474324436d8bb1f8075e46c2400a731e532c6d00ba6ed6f0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1088, - "startColumn": 39, - "charOffset": 32269, - "charLength": 5, - "snippet": { - "text": "mType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1086, - "startColumn": 1, - "charOffset": 32109, - "charLength": 260, - "snippet": { - "text": "\r\n\t\tif (!mType->info.voiceVector.empty() && (mType->info.yellChance >= static_cast(uniform_random(1, 100)))) {\r\n\t\t\tuint32_t index = uniform_random(0, mType->info.voiceVector.size() - 1);\r\n\t\t\tconst voiceBlock_t &vb = mType->info.voiceVector[index];\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cf8540c2cd142643", - "equalIndicator/v1": "4c9daffffc2aeed1822c82013e6d3854d391e8416b0c4b41f3e001832d3f8442" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'monsterType' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'monsterType' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/spawns/spawn_monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 169, - "startColumn": 111, - "charOffset": 5551, - "charLength": 11, - "snippet": { - "text": "monsterType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 167, - "startColumn": 1, - "charOffset": 5436, - "charLength": 225, - "snippet": { - "text": "}\r\n\r\nbool SpawnMonster::spawnMonster(uint32_t spawnMonsterId, spawnBlock_t &sb, const std::shared_ptr monsterType, bool startup /*= false*/) {\r\n\tif (spawnedMonsterMap.contains(spawnMonsterId)) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f5ab66acaed4771a", - "equalIndicator/v1": "4cb6ab4ef661f625e183b75903d069fb25fba5fe71598fcba865f9f290ba9bea" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1191, - "startColumn": 2, - "charOffset": 42598, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1189, - "startColumn": 1, - "charOffset": 42591, - "charLength": 46, - "snippet": { - "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "74d135433be5eb42", - "equalIndicator/v1": "4cbed029e4aaf39de2ace61a5e4210fbfc820d034ebfe23054f568ba833ab115" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1111, - "startColumn": 2, - "charOffset": 42274, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1109, - "startColumn": 1, - "charOffset": 42267, - "charLength": 52, - "snippet": { - "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c166beb5edf7f0dc", - "equalIndicator/v1": "4cc04f000d626af03eaf9ca07f8fdff8caeb610ccc4d8cbf402370753b402786" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6370, - "startColumn": 69, - "charOffset": 201568, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6368, - "startColumn": 1, - "charOffset": 201495, - "charLength": 145, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendPartyCreatureSkull(std::shared_ptr target) {\r\n\tif (g_game().getWorldType() != WORLD_TYPE_PVP) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "83035903335c0385", - "equalIndicator/v1": "4ce3c895b5af789d3f1d4edeb6769a9300f420051319bbe64a7ad06ec1fd3322" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 869, - "startColumn": 54, - "charOffset": 39484, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 867, - "startColumn": 1, - "charOffset": 39426, - "charLength": 126, - "snippet": { - "text": "}\r\n\r\nvoid Game::internalGetPosition(std::shared_ptr item, Position &pos, uint8_t &stackpos) {\r\n\tpos.x = 0;\r\n\tpos.y = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "83df64020b72a146", - "equalIndicator/v1": "4cf19ba10297fb0c7d401397903c85abbe69b4cc3ad646809f1e0c6a74f4fcee" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 374, - "startColumn": 31, - "charOffset": 12849, - "charLength": 8, - "snippet": { - "text": "listItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 372, - "startColumn": 1, - "charOffset": 12683, - "charLength": 327, - "snippet": { - "text": "\t\tif (container && containerType == 0 && item->isQuiver() && player->getThing(CONST_SLOT_RIGHT) == item) {\r\n\t\t\tuint16_t ammoTotal = 0;\r\n\t\t\tfor (std::shared_ptr listItem : container->getItemList()) {\r\n\t\t\t\tif (player->getLevel() >= Item::items[listItem->getID()].minReqLevel) {\r\n\t\t\t\t\tammoTotal += listItem->getItemCount();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d4bbc4a716e8cb28", - "equalIndicator/v1": "4cf7310725648ed61114fbd05e354243a72d4c8b741960518a3a6164a2e610d6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'npc' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'npc' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1496, - "startColumn": 21, - "charOffset": 44643, - "charLength": 3, - "snippet": { - "text": "npc" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1494, - "startColumn": 1, - "charOffset": 44556, - "charLength": 102, - "snippet": { - "text": "\tvoid sendShop(std::shared_ptr npc) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendShop(npc);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dfde05029836be22", - "equalIndicator/v1": "4cff83ca4fadf19a25b50ae6ae92e65fb5c03801abe0f3ba5261c213d2ca81e2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 429, - "startColumn": 77, - "charOffset": 12699, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 427, - "startColumn": 1, - "charOffset": 12618, - "charLength": 172, - "snippet": { - "text": "}\r\n\r\nvoid Container::onRemoveContainerItem(uint32_t index, std::shared_ptr item) {\r\n\tauto spectators = Spectators().find(getPosition(), false, 2, 2, 2, 2);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d5c034fca05b8e3f", - "equalIndicator/v1": "4d687b25b3b632b12eb6a938a080aa6fdcb69ffc77aeae14fa52baba8b8267bf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1250, - "startColumn": 13, - "charOffset": 56449, - "charLength": 14, - "snippet": { - "text": "vocationString" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1248, - "startColumn": 1, - "charOffset": 56350, - "charLength": 250, - "snippet": { - "text": "\t\tif (weapon->getWieldInfo() != 0) {\r\n\t\t\titemType.wieldInfo = weapon->getWieldInfo();\r\n\t\t\titemType.vocationString = weapon->getVocationString();\r\n\t\t\titemType.minReqLevel = weapon->getReqLevel();\r\n\t\t\titemType.minReqMagicLevel = weapon->getReqMagLv();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8e7ef42c35d189f4", - "equalIndicator/v1": "4daa76feceb45f8b934f680092ce316ae40632612cb875acd21291e9843fdb08" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 639, - "startColumn": 22, - "charOffset": 19412, - "charLength": 8, - "snippet": { - "text": "blockHit" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 637, - "startColumn": 1, - "charOffset": 19386, - "charLength": 307, - "snippet": { - "text": "}\r\n\r\nBlockType_t Monster::blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense /* = false*/, bool checkArmor /* = false*/, bool /* field = false */) {\r\n\tBlockType_t blockType = Creature::blockHit(attacker, combatType, damage, checkDefense, checkArmor);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "12214a189d50f3ef", - "equalIndicator/v1": "4dae9ed06858543268c85d0ba034724b1287d3aed94411fc113fb61d40a970e1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/loot_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 210, - "startColumn": 27, - "charOffset": 5374, - "charLength": 19, - "snippet": { - "text": "getNumber" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 208, - "startColumn": 1, - "charOffset": 5283, - "charLength": 154, - "snippet": { - "text": "\tconst auto loot = getUserdataShared(L, 1);\r\n\tif (loot) {\r\n\t\tloot->lootBlock.armor = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d1687e71fc339c5e", - "equalIndicator/v1": "4dc3670353cf585287e0d3832ac3451bd757a4e442eef674400fb8a079b184db" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6104, - "startColumn": 60, - "charOffset": 194152, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6102, - "startColumn": 1, - "charOffset": 194088, - "charLength": 183, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendToChannel(std::shared_ptr creature, SpeakClasses type, const std::string &text, uint16_t channelId) {\r\n\tNetworkMessage msg;\r\n\tmsg.addByte(0xAA);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "39d14f5c04473234", - "equalIndicator/v1": "4df0b7e87a858e3e6f23b298540a0c942b1ff1df8a902871f935cb2a0f4a3bdd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 605, - "startColumn": 17, - "charOffset": 29532, - "charLength": 17, - "snippet": { - "text": "parseSupressDrunk" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 603, - "startColumn": 1, - "charOffset": 29511, - "charLength": 204, - "snippet": { - "text": "}\r\n\r\nvoid ItemParse::parseSupressDrunk(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\r\n\tstd::string stringValue = tmpStrValue;\r\n\tif (valueAttribute.as_bool()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8a2933fbf40a4844", - "equalIndicator/v1": "4df34adb3fe2a38dc244416d0df664b0178807cf7e55c8ba66fd12bd01ca9ba5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/npcs/npc.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 67, - "startColumn": 53, - "charOffset": 2042, - "charLength": 5, - "snippet": { - "text": "range" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 65, - "startColumn": 1, - "charOffset": 1969, - "charLength": 86, - "snippet": { - "text": "\t\treturn false;\r\n\t}\r\n\treturn Creature::canSee(getPosition(), pos, range, range);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "84535aebc230ac3e", - "equalIndicator/v1": "4e1c394abe327cdc211bf2874d5f534fe6f8a21c15d96d043930ae8390e76993" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 248, - "startColumn": 73, - "charOffset": 8921, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 246, - "startColumn": 1, - "charOffset": 8844, - "charLength": 269, - "snippet": { - "text": "}\r\n\r\nReturnValue Events::eventCreatureOnAreaCombat(std::shared_ptr creature, std::shared_ptr tile, bool aggressive) {\r\n\t// Creature:onAreaCombat(tile, aggressive) or Creature.onAreaCombat(self, tile, aggressive)\r\n\tif (info.creatureOnAreaCombat == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a1090194e43d3e82", - "equalIndicator/v1": "4e338ae870575c1ac55cacfb58c25a623a43dd34455ba007ea8be4f01c1b2009" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/bed.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 254, - "startColumn": 22, - "charOffset": 6791, - "charLength": 5, - "snippet": { - "text": "regen" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 252, - "startColumn": 1, - "charOffset": 6667, - "charLength": 198, - "snippet": { - "text": "\r\n\t\tplayer->changeHealth(regen * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__), false);\r\n\t\tplayer->changeMana(regen * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__));\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c8b5093a106586b1", - "equalIndicator/v1": "4e37a3c9ea7f0458e63f84176fd723811dc8d8d4e6c0f8ec711bed8f621e46a3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 231, - "startColumn": 11, - "charOffset": 7225, - "charLength": 16, - "snippet": { - "text": "getItemTypeCount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 229, - "startColumn": 1, - "charOffset": 7122, - "charLength": 253, - "snippet": { - "text": "\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::shared_ptr getThing(size_t index) const override final;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "47db0f95390397f0", - "equalIndicator/v1": "4e51aae1ffd0ad60e072d02c5508117abfde2a6345feac070302bef1c53a33c3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 391, - "startColumn": 47, - "charOffset": 12558, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 389, - "startColumn": 1, - "charOffset": 12507, - "charLength": 243, - "snippet": { - "text": "}\r\n\r\nbool Actions::useItem(std::shared_ptr player, const Position &pos, uint8_t index, std::shared_ptr item, bool isHotkey) {\r\n\tconst ItemType &it = Item::items[item->getID()];\r\n\tif (it.isRune() || it.type == ITEM_TYPE_POTION) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9d53f8940e1144a5", - "equalIndicator/v1": "4e5b5437035b257b1f23a75ab31515cbbdb7194995c4bd15ed974d7347163e0e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 687, - "startColumn": 15, - "charOffset": 22425, - "charLength": 11, - "snippet": { - "text": "static_cast" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 685, - "startColumn": 1, - "charOffset": 22385, - "charLength": 132, - "snippet": { - "text": "\t\t\t\tcase 1:\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 74) * 1.20f) + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "492a8fac155073b9", - "equalIndicator/v1": "4e5e43df04594341b9417bf52e68888434c327dea10e7c857ad816aa260462a9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The 'empty' method should be used to check for emptiness instead of 'size'", - "markdown": "The 'empty' method should be used to check for emptiness instead of 'size'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1824, - "startColumn": 16, - "charOffset": 51361, - "charLength": 5, - "snippet": { - "text": "items" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1822, - "startColumn": 1, - "charOffset": 51248, - "charLength": 157, - "snippet": { - "text": "std::shared_ptr Tile::getDoorItem() const {\r\n\tconst TileItemVector* items = getItemList();\r\n\tif (!items || items->size() == 0) {\r\n\t\treturn ground;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8ad8134904d38221", - "equalIndicator/v1": "4e688ec29158d992079ead9b9ae6717255aedc76b30322ac4ad8b81615f5f8f7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Repeated branch body in conditional chain", - "markdown": "Repeated branch body in conditional chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3219, - "startColumn": 67, - "charOffset": 96930, - "charLength": 1, - "snippet": { - "text": "{" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3217, - "startColumn": 1, - "charOffset": 96764, - "charLength": 271, - "snippet": { - "text": "\t\t\t\tif (leftItem->getSlotPosition() & SLOTP_TWO_HAND) {\r\n\t\t\t\t\tret = RETURNVALUE_DROPTWOHANDEDITEM;\r\n\t\t\t\t} else if (item == leftItem && count == item->getItemCount()) {\r\n\t\t\t\t\tret = RETURNVALUE_NOERROR;\r\n\t\t\t\t} else if (leftType == WEAPON_SHIELD && type == WEAPON_SHIELD) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a602eba61fe110fd", - "equalIndicator/v1": "4e7046b27bf2babf4be050ebb9fa225f3ed0b47d2b9a68327f5fe5a23adc9c54" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 150, - "startColumn": 7, - "charOffset": 4686, - "charLength": 11, - "snippet": { - "text": "updateThing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 148, - "startColumn": 1, - "charOffset": 4630, - "charLength": 231, - "snippet": { - "text": "\tvoid addItemBack(std::shared_ptr item);\r\n\r\n\tvoid updateThing(std::shared_ptr thing, uint16_t itemId, uint32_t count) override final;\r\n\tvoid replaceThing(uint32_t index, std::shared_ptr thing) override final;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "268c320350f4752b", - "equalIndicator/v1": "4e744810293ca65f1f5a501d265f9448491c6d20da6960f12f888b33c309d31f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'getScheduledSaleUpdate' can be made const", - "markdown": "Method 'getScheduledSaleUpdate' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1794, - "startColumn": 7, - "charOffset": 53614, - "charLength": 22, - "snippet": { - "text": "getScheduledSaleUpdate" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1792, - "startColumn": 1, - "charOffset": 53602, - "charLength": 74, - "snippet": { - "text": "\t}\r\n\r\n\tbool getScheduledSaleUpdate() {\r\n\t\treturn scheduledSaleUpdate;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0b8be354cef530dc", - "equalIndicator/v1": "4e810159255ac1032cef228dbc32b8350d4f3b42174640c0ff2254baa9b397cd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1037, - "startColumn": 27, - "charOffset": 37514, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1035, - "startColumn": 1, - "charOffset": 37482, - "charLength": 133, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnGainExperience, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9927af386cbd390b", - "equalIndicator/v1": "4ea3fed105b61d2a8ca1032c1cb81298538793f40f543117d31b38b1f7575fca" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 736, - "startColumn": 68, - "charOffset": 28388, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 734, - "startColumn": 1, - "charOffset": 28316, - "charLength": 269, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::playerOnGainExperience(std::shared_ptr player, std::shared_ptr target, uint64_t &exp, uint64_t rawExp) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnGainExperience - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d7b64a89d16f98bc", - "equalIndicator/v1": "4ecd121d06032cd158727a4b59db294bdebb0fa215b039a263a6140e94e608e7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 518, - "startColumn": 27, - "charOffset": 18458, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 516, - "startColumn": 1, - "charOffset": 18426, - "charLength": 133, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.partyOnShareExperience, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "482c1ebadf5617e2", - "equalIndicator/v1": "4ed50c6404d8c742867b37afac89f5eda33580801572aa2689f7b7d3a1848fc2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", - "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iologindata.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 286, - "startColumn": 10, - "charOffset": 10124, - "charLength": 11, - "snippet": { - "text": "std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 284, - "startColumn": 1, - "charOffset": 10025, - "charLength": 154, - "snippet": { - "text": "\tDBResult_ptr result = Database::getInstance().storeQuery(query.str());\r\n\tif (!result) {\r\n\t\treturn std::string();\r\n\t}\r\n\treturn result->getString(\"name\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b9b1e67cfb788b3f", - "equalIndicator/v1": "4ed679199b700a4989f382b14a4b78319f2a41975c5b561f2fa53b4261313308" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 495, - "startColumn": 27, - "charOffset": 17632, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 493, - "startColumn": 1, - "charOffset": 17600, - "charLength": 125, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.partyOnDisband, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f46f413e2ced4508", - "equalIndicator/v1": "4ef2fee8b215b72198e14c938a35c35bb50bf6e0c61c2e3a7e759140984dc105" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Escaped string literal can be written as a raw string literal", - "markdown": "Escaped string literal can be written as a raw string literal" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/webhook/webhook.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 128, - "startColumn": 14, - "charOffset": 4037, - "charLength": 15, - "snippet": { - "text": "\"\\\"title\\\": \\\"\"" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 126, - "startColumn": 1, - "charOffset": 3974, - "charLength": 185, - "snippet": { - "text": "\tif (embed) {\r\n\t\tpayload << \"{ \\\"embeds\\\": [{ \";\r\n\t\tpayload << \"\\\"title\\\": \\\"\" << title << \"\\\", \";\r\n\t\tif (!message.empty()) {\r\n\t\t\tpayload << \"\\\"description\\\": \\\"\" << message << \"\\\", \";\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4732b9576c16492f", - "equalIndicator/v1": "4effe9193fcacd5228e55a1dda3ed782228918b1dc18fadbc52e6e0a82ecd1d3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 939, - "startColumn": 26, - "charOffset": 30548, - "charLength": 6, - "snippet": { - "text": "damage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 937, - "startColumn": 1, - "charOffset": 30447, - "charLength": 137, - "snippet": { - "text": "\t\t\tvalue = attacker->getIncreasePercent(combatType);\r\n\t\t\tif (value != 0) {\r\n\t\t\t\tdamage += std::round(damage * value / 100.f);\r\n\t\t\t}\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "07ef22c4dd91676d", - "equalIndicator/v1": "4f0af09ce1ccbf580e37e54a26801df5fc58c4ac4a48a37bdd3f9124ce3f35fc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1817, - "startColumn": 22, - "charOffset": 52089, - "charLength": 2, - "snippet": { - "text": "it" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1815, - "startColumn": 1, - "charOffset": 52041, - "charLength": 101, - "snippet": { - "text": "\r\n\t\tif (it.showCharges) {\r\n\t\t\tint32_t charges = it.charges;\r\n\t\t\tif (charges != 0) {\r\n\t\t\t\tss.str(\"\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a2d1f8027eb2aa82", - "equalIndicator/v1": "4f2a4c235b070516330dda7ea35a801b94fb7701e1ab75919c049168d3ac3fe5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'deprecatedOnKilledCreature' is within a recursive call chain", - "markdown": "Function 'deprecatedOnKilledCreature' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1274, - "startColumn": 16, - "charOffset": 39121, - "charLength": 26, - "snippet": { - "text": "deprecatedOnKilledCreature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1272, - "startColumn": 1, - "charOffset": 39101, - "charLength": 178, - "snippet": { - "text": "}\r\n\r\nbool Creature::deprecatedOnKilledCreature(std::shared_ptr target, bool lastHit) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tauto master = getMaster();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "15bafa3c754a4db6", - "equalIndicator/v1": "4f4d0fe47a6ed34d87a9758f2fe537300d717a73fc0ed78338d293e00a1ade45" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1542, - "startColumn": 7, - "charOffset": 54160, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1540, - "startColumn": 1, - "charOffset": 54004, - "charLength": 358, - "snippet": { - "text": "void ValueCallback::getMinMaxValues(std::shared_ptr player, CombatDamage &damage, bool useCharges) const {\r\n\t// onGetPlayerMinMaxValues(...)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[ValueCallback::getMinMaxValues - Player {} formula {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "11f9fd00fe08c4bc", - "equalIndicator/v1": "4f650122717af54ef6027b7869074a71ae12718cc415520d98a0245645d611ce" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", - "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3147, - "startColumn": 10, - "charOffset": 87295, - "charLength": 11, - "snippet": { - "text": "std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3145, - "startColumn": 1, - "charOffset": 87232, - "charLength": 121, - "snippet": { - "text": "\tuint32_t weight = getWeight();\r\n\tif (weight == 0) {\r\n\t\treturn std::string();\r\n\t}\r\n\treturn getWeightDescription(weight);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6c7d1ec2ba93d055", - "equalIndicator/v1": "4f76c8cc3711c2390ad52f50faf935b1376489295c9762aa565d484592193218" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1526, - "startColumn": 53, - "charOffset": 45337, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1524, - "startColumn": 1, - "charOffset": 45280, - "charLength": 105, - "snippet": { - "text": "}\r\n\r\nvoid Player::onClearImbuement(std::shared_ptr item, uint8_t slot) {\r\n\tif (!item) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "318e9b0b3c6c98ca", - "equalIndicator/v1": "4f8d40b166bb4025fb96f15adb960d79ba95bf15bb92366c742b90200503cc02" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '_Ilist', which is a reserved identifier", - "markdown": "Declaration uses identifier '_Ilist', which is a reserved identifier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/arraylist.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 30, - "startColumn": 47, - "charOffset": 885, - "charLength": 6, - "snippet": { - "text": "_Ilist" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 28, - "startColumn": 1, - "charOffset": 832, - "charLength": 102, - "snippet": { - "text": "\t\t}\r\n\r\n\t\texplicit arraylist(std::initializer_list _Ilist) {\r\n\t\t\tbackContainer.assign(_Ilist);\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0523d512b4d9c0c6", - "equalIndicator/v1": "4f92ff48f8703c70fc4321073ba76b535828763192f3ec4115fbb25089ac2930" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6833, - "startColumn": 73, - "charOffset": 236194, - "charLength": 8, - "snippet": { - "text": "attacker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6831, - "startColumn": 1, - "charOffset": 236083, - "charLength": 329, - "snippet": { - "text": "\r\n// Custom PvP System combat helpers\r\nvoid Game::applyPvPDamage(CombatDamage &damage, std::shared_ptr attacker, std::shared_ptr target) {\r\n\tfloat targetDamageReceivedMultiplier = target->vocation->pvpDamageReceivedMultiplier;\r\n\tfloat attackerDamageDealtMultiplier = attacker->vocation->pvpDamageDealtMultiplier;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d999aa6c7fd15529", - "equalIndicator/v1": "50416f2bebd49c61b243141fdb5bd4685697922dc9c602766174bd986e7c2fff" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2139, - "startColumn": 90, - "charOffset": 72236, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2137, - "startColumn": 1, - "charOffset": 72142, - "charLength": 284, - "snippet": { - "text": "}\r\n\r\nvoid Combat::applyExtensions(std::shared_ptr caster, std::shared_ptr target, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (damage.extension || !caster || damage.primary.type == COMBAT_HEALING) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "43d0b556ceeac45f", - "equalIndicator/v1": "5047b64f94bae6401ea97e07989f8333b73c12a7c044afdbcbfe5c8dfe1d4288" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3081, - "startColumn": 80, - "charOffset": 85675, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3079, - "startColumn": 1, - "charOffset": 85591, - "charLength": 207, - "snippet": { - "text": "}\r\n\r\nstd::string Item::getNameDescription(const ItemType &it, std::shared_ptr item /*= nullptr*/, int32_t subType /*= -1*/, bool addArticle /*= true*/) {\r\n\tif (item) {\r\n\t\tsubType = item->getSubType();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "889791cd2d262e89", - "equalIndicator/v1": "50514af916a4b489e2d4082bfacf157d68f225d994c22b66538f21e5bd86de8b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '_Val', which is a reserved identifier", - "markdown": "Declaration uses identifier '_Val', which is a reserved identifier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/vectorsort.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 76, - "startColumn": 22, - "charOffset": 1587, - "charLength": 4, - "snippet": { - "text": "_Val" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 74, - "startColumn": 1, - "charOffset": 1559, - "charLength": 101, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tvoid push_back(T &&_Val) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\tcontainer.push_back(std::move(_Val));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4942f860e6f66cc4", - "equalIndicator/v1": "509fc01897468c2865a507ab239fe8cdef9d4e1da5ffb6ff1105977d98dedc30" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'internalAddItem' is within a recursive call chain", - "markdown": "Function 'internalAddItem' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2197, - "startColumn": 19, - "charOffset": 83853, - "charLength": 15, - "snippet": { - "text": "internalAddItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2195, - "startColumn": 1, - "charOffset": 83830, - "charLength": 326, - "snippet": { - "text": "}\r\n\r\nReturnValue Game::internalAddItem(std::shared_ptr toCylinder, std::shared_ptr item, int32_t index /*= INDEX_WHEREEVER*/, uint32_t flags /* = 0*/, bool test /* = false*/) {\r\n\tuint32_t remainderCount = 0;\r\n\treturn internalAddItem(std::move(toCylinder), std::move(item), index, flags, test, remainderCount);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d17a14efbe99549b", - "equalIndicator/v1": "50b82e39225a85724fd2596cc0901a442ed9fdfb6ebf8e0253b8b28bc9b3484a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'callback' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'callback' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/database/databasetasks.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 34, - "startColumn": 93, - "charOffset": 1217, - "charLength": 8, - "snippet": { - "text": "callback" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 32, - "startColumn": 1, - "charOffset": 1120, - "charLength": 223, - "snippet": { - "text": "}\r\n\r\nvoid DatabaseTasks::store(const std::string &query, std::function callback /* nullptr */) {\r\n\tthreadPool.detach_task([this, query, callback]() {\r\n\t\tDBResult_ptr result = db.storeQuery(query);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d306a889f2890c3c", - "equalIndicator/v1": "50f5740a7892830d6f60f65725c36c2d55b022bcfaa045277891d7053a785c9d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'initInt64Value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'initInt64Value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/custom_attribute.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 19, - "startColumn": 52, - "charOffset": 557, - "charLength": 13, - "snippet": { - "text": "const int64_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 17, - "startColumn": 1, - "charOffset": 482, - "charLength": 278, - "snippet": { - "text": "\t~CustomAttribute();\r\n\r\n\tCustomAttribute(const std::string &initStringKey, const int64_t initInt64Value);\r\n\tCustomAttribute(const std::string &initStringKey, const std::string &initStringValue);\r\n\tCustomAttribute(const std::string &initStringKey, const double initDoubleValue);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e669c39ac22c0761", - "equalIndicator/v1": "511e4ba79d2efa63a467753a37b5352b0c0391653656b84e31fac05e8a474bd2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 289, - "startColumn": 2, - "charOffset": 10383, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 287, - "startColumn": 1, - "charOffset": 10376, - "charLength": 66, - "snippet": { - "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n\treturn returnValue;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5a1b748e1ce809d7", - "equalIndicator/v1": "51439a97d9b81bc45dab70e9109da53657d1994050d1d20307d7d499de0160ab" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/map/tile_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 419, - "startColumn": 21, - "charOffset": 9953, - "charLength": 10, - "snippet": { - "text": "itemVector" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 417, - "startColumn": 1, - "charOffset": 9927, - "charLength": 69, - "snippet": { - "text": "\t}\r\n\r\n\tlua_createtable(L, itemVector->size(), 0);\r\n\r\n\tint index = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8be67a2ccb6df4b8", - "equalIndicator/v1": "51456e2ece5ca668ed8e2e9968899ea2aadd4e986f8df26fe7e37d70809faf20" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 111, - "startColumn": 18, - "charOffset": 3268, - "charLength": 17, - "snippet": { - "text": "getReflectPercent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 109, - "startColumn": 1, - "charOffset": 3246, - "charLength": 218, - "snippet": { - "text": "}\r\n\r\nint32_t Monster::getReflectPercent(CombatType_t reflectType, bool useCharges) const {\r\n\tint32_t result = Creature::getReflectPercent(reflectType, useCharges);\r\n\tauto it = mType->info.reflectMap.find(reflectType);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5f8f6c7176d86c04", - "equalIndicator/v1": "516484b78d9707de50b0e6f00bada7af80ecf0d7cbd29c8def3f72c2b8c579c6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::list>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::list\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/map/house_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 269, - "startColumn": 21, - "charOffset": 7514, - "charLength": 5, - "snippet": { - "text": "doors" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 267, - "startColumn": 1, - "charOffset": 7452, - "charLength": 99, - "snippet": { - "text": "\r\n\tconst auto doors = house->getDoors();\r\n\tlua_createtable(L, doors.size(), 0);\r\n\r\n\tint index = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "349de30d1bc65bb0", - "equalIndicator/v1": "518a7d0cea247e168d26cf71d21587e1a21484f8883cb7c0de3207ea80948a72" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", - "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 253, - "startColumn": 11, - "charOffset": 6425, - "charLength": 12, - "snippet": { - "text": "CreatureIcon" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 251, - "startColumn": 1, - "charOffset": 6313, - "charLength": 166, - "snippet": { - "text": "\tvirtual CreatureIcon getIcon(const std::string &key) const {\r\n\t\tif (!creatureIcons.contains(key)) {\r\n\t\t\treturn CreatureIcon();\r\n\t\t}\r\n\t\treturn creatureIcons.at(key);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2cbb720e22bd0c11", - "equalIndicator/v1": "518b8ef75d72da7a346a1b01e13341ecc209d53eb56e9213edf9d693d2c0e6a4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", - "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/lua_functions_loader.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 397, - "startColumn": 9, - "charOffset": 11832, - "charLength": 11, - "snippet": { - "text": "std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 395, - "startColumn": 1, - "charOffset": 11795, - "charLength": 67, - "snippet": { - "text": "\t\treturn std::string();\r\n\t}\r\n\treturn std::string(c_str, len);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "05cc1b5cec28d1a4", - "equalIndicator/v1": "518f4cfbc4644795b0b872eb99e1f399355b12c26abd6e5047f219dc8a870856" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 778, - "startColumn": 62, - "charOffset": 25431, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 776, - "startColumn": 1, - "charOffset": 25365, - "charLength": 148, - "snippet": { - "text": "}\r\n\r\nbool InstantSpell::playerCastInstant(std::shared_ptr player, std::string ¶m) {\r\n\tif (!playerSpellCheck(player)) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "23675ad72f52ff89", - "equalIndicator/v1": "519a6afadd10cbb08c3c196ce4fc0f3abb03fff77f5756f0026c9cee2eeb9287" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 282, - "startColumn": 84, - "charOffset": 7181, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 280, - "startColumn": 1, - "charOffset": 7093, - "charLength": 183, - "snippet": { - "text": "}\r\n\r\nstd::shared_ptr Tile::getBottomVisibleCreature(std::shared_ptr creature) const {\r\n\tif (const CreatureVector* creatures = getCreatures()) {\r\n\t\tif (creature) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "094ae64eb9d32b99", - "equalIndicator/v1": "519eb666007e1f94bb2f7735732d1ae91afab90253c423bfc56af3b4d958067e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2076, - "startColumn": 15, - "charOffset": 61763, - "charLength": 12, - "snippet": { - "text": "changeHealth" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2074, - "startColumn": 1, - "charOffset": 61744, - "charLength": 289, - "snippet": { - "text": "}\r\n\r\nvoid Monster::changeHealth(int32_t healthChange, bool sendHealthChange /* = true*/) {\r\n\tif (mType && !mType->info.soundVector.empty() && mType->info.soundChance >= static_cast(uniform_random(1, 100))) {\r\n\t\tauto index = uniform_random(0, mType->info.soundVector.size() - 1);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0e6367beb65e674f", - "equalIndicator/v1": "51a7af034d367e205dc96e32bd5a67b3a503a6a4bd8527ddcee385bad70781ad" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2705, - "startColumn": 4, - "charOffset": 83468, - "charLength": 8, - "snippet": { - "text": "uint64_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2703, - "startColumn": 1, - "charOffset": 83380, - "charLength": 178, - "snippet": { - "text": "\t\tfor (uint16_t i = 1; i <= size; i++) {\r\n\t\t\tuint16_t itemId = msg.get();\r\n\t\t\tuint64_t price = msg.get();\r\n\t\t\tplayer->setItemCustomPrice(itemId, price);\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1e4ef03ce83d13c1", - "equalIndicator/v1": "51b280787dccdc7c5e337e54ede306a0dec58edc46ad5dd96258ae4440544cdd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/depot/depotchest.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 66, - "startColumn": 18, - "charOffset": 2103, - "charLength": 22, - "snippet": { - "text": "postRemoveNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 64, - "startColumn": 1, - "charOffset": 2081, - "charLength": 232, - "snippet": { - "text": "}\r\n\r\nvoid DepotChest::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tstd::shared_ptr localParent = getParent();\r\n\tif (localParent != nullptr) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bf40502f22404c40", - "equalIndicator/v1": "51c78c642d94932a469e1092e3cb34935d02f0ca9c70dc631ade0f705adf7f5d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7684, - "startColumn": 39, - "charOffset": 240423, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7682, - "startColumn": 1, - "charOffset": 240361, - "charLength": 231, - "snippet": { - "text": "\r\n\tif (!oldProtocol) {\r\n\t\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\r\n\t\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fafa93fc5faccd06", - "equalIndicator/v1": "51f0b348240c6df35f45f22654026c99f07fbb7065396dddb7c08667828baf80" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 300, - "startColumn": 112, - "charOffset": 12460, - "charLength": 14, - "snippet": { - "text": "const uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 298, - "startColumn": 1, - "charOffset": 12259, - "charLength": 414, - "snippet": { - "text": "\r\n\tvoid playerBosstiarySlot(uint32_t playerId, uint8_t slotId, uint32_t selectedBossId);\r\n\tvoid playerSetMonsterPodium(uint32_t playerId, uint32_t monsterRaceId, const Position &pos, uint8_t stackPos, const uint16_t itemId, uint8_t direction, const std::pair &podiumAndMonsterVisible);\r\n\tvoid playerRotatePodium(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b85fb9cfb7e95df2", - "equalIndicator/v1": "51f2f9efd5e2f91170cc5283135ca6e1927c4c3ebf9af818f285d78b4a38f6ea" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 580, - "startColumn": 13, - "charOffset": 27497, - "charLength": 11, - "snippet": { - "text": "stringValue" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 578, - "startColumn": 1, - "charOffset": 27334, - "charLength": 383, - "snippet": { - "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += value;\r\n\t} else if (stringValue == \"absorbpercentenergy\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentfire\") {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0edc503b5836fc77", - "equalIndicator/v1": "51fa1cd8681d1e8dc2f3ee394b86cf4a622430055e7b48e829fc8a45819c747d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 572, - "startColumn": 19, - "charOffset": 16330, - "charLength": 8, - "snippet": { - "text": "queryAdd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 570, - "startColumn": 1, - "charOffset": 16307, - "charLength": 212, - "snippet": { - "text": "}\r\n\r\nReturnValue Tile::queryAdd(int32_t, const std::shared_ptr &thing, uint32_t, uint32_t tileFlags, std::shared_ptr) {\r\n\tif (hasBitSet(FLAG_NOLIMIT, tileFlags)) {\r\n\t\treturn RETURNVALUE_NOERROR;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3a37531338c6d2aa", - "equalIndicator/v1": "52059bfa2e48c0889b21cd81688e01349eafe92ee790876d360aed938268d947" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3106, - "startColumn": 2, - "charOffset": 95142, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3104, - "startColumn": 1, - "charOffset": 95043, - "charLength": 233, - "snippet": { - "text": "void ProtocolGame::parseMarketCreateOffer(NetworkMessage &msg) {\r\n\tuint8_t type = msg.getByte();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t itemTier = 0;\r\n\tif (!oldProtocol && Item::items[itemId].upgradeClassification > 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2dbbc7f565961df9", - "equalIndicator/v1": "523fd05b6716f04ec0a4a21dba316fcac381d046e051415de39a736ad0abf89b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 186, - "startColumn": 64, - "charOffset": 5159, - "charLength": 6, - "snippet": { - "text": "action" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 184, - "startColumn": 1, - "charOffset": 5090, - "charLength": 126, - "snippet": { - "text": "\t}\r\n\r\n\tvoid setItemId(uint16_t itemId, const std::shared_ptr action) {\r\n\t\tuseItemMap.try_emplace(itemId, action);\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4b699050e92062f0", - "equalIndicator/v1": "5250e9560a22e5afe2c77ab96cef3a757f9cf550ffe29be7bec67ca11051e7be" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3071, - "startColumn": 60, - "charOffset": 114230, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3069, - "startColumn": 1, - "charOffset": 114166, - "charLength": 275, - "snippet": { - "text": "}\r\n\r\nReturnValue Game::processLootItems(std::shared_ptr player, std::shared_ptr lootContainer, std::shared_ptr item, bool &fallbackConsumed) {\r\n\tstd::shared_ptr lastSubContainer = nullptr;\r\n\tuint32_t remainderCount = item->getItemCount();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f2f029635c371580", - "equalIndicator/v1": "5260db933403767cef60889c1ccc2658971fbd9d34d5410e7c4f643912d37696" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/container_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 263, - "startColumn": 29, - "charOffset": 7416, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 261, - "startColumn": 1, - "charOffset": 7369, - "charLength": 101, - "snippet": { - "text": "\r\n\tint index = 0;\r\n\tfor (std::shared_ptr item : items) {\r\n\t\tindex++;\r\n\t\tpushUserdata(L, item);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "410185cc97fa24b9", - "equalIndicator/v1": "52afcef95609999700cf08f8159b6e42cbf3d585b137e6adcb4455e184dc0dc4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructor does not initialize these fields: recvbyte, delay", - "markdown": "Constructor does not initialize these fields: recvbyte, delay" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/modules/modules.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 96, - "startColumn": 9, - "charOffset": 2688, - "charLength": 6, - "snippet": { - "text": "Module" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 94, - "startColumn": 1, - "charOffset": 2675, - "charLength": 117, - "snippet": { - "text": "}\r\n\r\nModule::Module(LuaScriptInterface* interface) :\r\n\tEvent(interface), type(MODULE_TYPE_NONE), loaded(false) { }\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9c67a51fac0118e3", - "equalIndicator/v1": "52d6c8d8190b36517eddf546dd41cfe0f06c2d56bf278ad6231d6031e7ba0216" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1143, - "startColumn": 67, - "charOffset": 43389, - "charLength": 4, - "snippet": { - "text": "zone" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1141, - "startColumn": 1, - "charOffset": 43318, - "charLength": 237, - "snippet": { - "text": "}\r\n\r\nbool EventCallback::zoneBeforeCreatureEnter(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneBeforeCreatureEnter - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d9160335c2be92ae", - "equalIndicator/v1": "53085fcda9b242d4d77049130e5aa332698aa3cc1cd29d99cb3ea8a562775e96" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'creature' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'creature' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6526, - "startColumn": 115, - "charOffset": 205511, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6524, - "startColumn": 1, - "charOffset": 205392, - "charLength": 164, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendUpdateTileCreature(const Position &pos, uint32_t stackpos, const std::shared_ptr creature) {\r\n\tif (!canSee(pos)) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "168a043a8138ab30", - "equalIndicator/v1": "531a3e9cfdb8af63b8fb6fd8c43b17d8821728cf803f55044b55ee2843206c32" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'spellName' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'spellName' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/items.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 258, - "startColumn": 30, - "charOffset": 6301, - "charLength": 9, - "snippet": { - "text": "spellName" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 256, - "startColumn": 1, - "charOffset": 6169, - "charLength": 306, - "snippet": { - "text": "\tstd::string getFormattedAugmentDescription(const std::shared_ptr &augmentInfo) const;\r\n\r\n\tvoid addAugment(std::string spellName, Augment_t augmentType, int32_t value) {\r\n\t\tauto augmentInfo = std::make_shared(spellName, augmentType, value);\r\n\t\taugments.emplace_back(augmentInfo);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7b333420827668ac", - "equalIndicator/v1": "531b492696827af3fab809b507d92905fea8e0ee9f8c4de9645a5612cb4e7aa3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 802, - "startColumn": 55, - "charOffset": 25981, - "charLength": 8, - "snippet": { - "text": "maxValue" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 800, - "startColumn": 1, - "charOffset": 25921, - "charLength": 123, - "snippet": { - "text": "\t}\r\n\r\n\treturn -normal_random(minValue, static_cast(maxValue * player->getVocation()->distDamageMultiplier));\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "39cd3afef408fe2f", - "equalIndicator/v1": "532a5733625e51fbf59203cf34039e2f2d9bbdb02c365eabef37234ca3f2b772" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'getValueWrapper' is within a recursive call chain", - "markdown": "Function 'getValueWrapper' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/libs/kv_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 121, - "startColumn": 42, - "charOffset": 3042, - "charLength": 15, - "snippet": { - "text": "getValueWrapper" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 119, - "startColumn": 1, - "charOffset": 2996, - "charLength": 147, - "snippet": { - "text": "}\r\n\r\nstd::optional KVFunctions::getValueWrapper(lua_State* L) {\r\n\tif (isBoolean(L, -1)) {\r\n\t\treturn ValueWrapper(getBoolean(L, -1));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4dc16dd0f7de1163", - "equalIndicator/v1": "5338e7fb008fad768e69bbbb60bac8a6ccd165524012abf4ecf098b56293469b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 112, - "startColumn": 77, - "charOffset": 3797, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 110, - "startColumn": 1, - "charOffset": 3716, - "charLength": 248, - "snippet": { - "text": "}\r\n\r\nReturnValue EventCallback::creatureOnTargetCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnTargetCombat - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "226f91c4035c14af", - "equalIndicator/v1": "5363e4e16c200ecd4d0244f959ef52cae3a21d8727f2effdf6c8b6314b1415b1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 797, - "startColumn": 92, - "charOffset": 26051, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 795, - "startColumn": 1, - "charOffset": 25955, - "charLength": 226, - "snippet": { - "text": "}\r\n\r\nvoid Combat::combatTileEffects(const CreatureVector &spectators, std::shared_ptr caster, std::shared_ptr tile, const CombatParams ¶ms) {\r\n\tif (params.itemId != 0) {\r\n\t\tuint16_t itemId = params.itemId;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "80eb49a841109e1f", - "equalIndicator/v1": "537436ce3e8306a4514fd9c30529c69d4868542c8cd0ad461d1ee744e606d016" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4681, - "startColumn": 7, - "charOffset": 147659, - "charLength": 31, - "snippet": { - "text": "auto [category, containersPair]" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4679, - "startColumn": 1, - "charOffset": 147533, - "charLength": 325, - "snippet": { - "text": "\r\n\tstd::map, std::shared_ptr>> managedContainersMap;\r\n\tfor (auto [category, containersPair] : player->m_managedContainers) {\r\n\t\tif (containersPair.first && !containersPair.first->isRemoved()) {\r\n\t\t\tmanagedContainersMap[category].first = containersPair.first;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9350fec88460b306", - "equalIndicator/v1": "5375c10c6452aba335d2c670daf256e709c03404322c741c5da724e80ce71533" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 153, - "startColumn": 7, - "charOffset": 4868, - "charLength": 11, - "snippet": { - "text": "removeThing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 151, - "startColumn": 1, - "charOffset": 4778, - "charLength": 242, - "snippet": { - "text": "\tvoid replaceThing(uint32_t index, std::shared_ptr thing) override final;\r\n\r\n\tvoid removeThing(std::shared_ptr thing, uint32_t count) override final;\r\n\r\n\tint32_t getThingIndex(std::shared_ptr thing) const override final;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cb507c7c98cb7ad0", - "equalIndicator/v1": "53b2e7e1a635f96e4652ce1dae69ab99c293b11c7177e1d2c27f2cbac66e5e17" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1405, - "startColumn": 9, - "charOffset": 40710, - "charLength": 5, - "snippet": { - "text": "items" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1403, - "startColumn": 1, - "charOffset": 40684, - "charLength": 87, - "snippet": { - "text": "\t\t\t}\r\n\t\t} else {\r\n\t\t\tn += items->getTopItemCount();\r\n\t\t\tif (n >= 10) {\r\n\t\t\t\treturn -1;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "32da73a669fc7de4", - "equalIndicator/v1": "53b5e8a8021c2080ed6203e24d0aa19f599a3f0cd6e785f96f83a3442cbe2f69" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 804, - "startColumn": 68, - "charOffset": 30797, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 802, - "startColumn": 1, - "charOffset": 30725, - "charLength": 236, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::playerOnGainSkillTries(std::shared_ptr player, skills_t skill, uint64_t &tries) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnGainSkillTries - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a1d78094c0ec14ef", - "equalIndicator/v1": "53be4937e6877ea490758cf77ece1b0da7fa9360590483fe4f132f5d885092bc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::_Hash, std::equal_to>, std::allocator>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::_Hash, std::equal_to\\>, std::allocator\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/game_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 727, - "startColumn": 2, - "charOffset": 20624, - "charLength": 305, - "snippet": { - "text": "/**\r\n\t * @brief Retrieve dummy IDs categorized by type.\r\n\t * @details This function provides a table containing two sub-tables: one for free dummies and one for house (or premium) dummies.\r\n\r\n\t* @note usage on lua:\r\n\t local dummies = Game.getDummies()\r\n\t local rate = dummies[1] -- Retrieve dummy ra" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 725, - "startColumn": 1, - "charOffset": 20567, - "charLength": 372, - "snippet": { - "text": "\r\nint GameFunctions::luaGameGetDummies(lua_State* L) {\r\n\t/**\r\n\t * @brief Retrieve dummy IDs categorized by type.\r\n\t * @details This function provides a table containing two sub-tables: one for free dummies and one for house (or premium) dummies.\r\n\r\n\t* @note usage on lua:\r\n\t local dummies = Game.getDummies()\r\n\t local rate = dummies[1] -- Retrieve dummy rate\r\n\t*/\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d85ef15921df9568", - "equalIndicator/v1": "53e27a36a84e7168545ebff4b3a072c3f96793c957ee5c1ec2b76b6612b82187" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6310, - "startColumn": 52, - "charOffset": 184934, - "charLength": 8, - "snippet": { - "text": "vocation" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6308, - "startColumn": 1, - "charOffset": 184779, - "charLength": 350, - "snippet": { - "text": "\tif (condition) {\r\n\t\tcondition->setParam(CONDITION_PARAM_HEALTHGAIN, vocation->getHealthGainAmount());\r\n\t\tcondition->setParam(CONDITION_PARAM_HEALTHTICKS, vocation->getHealthGainTicks());\r\n\t\tcondition->setParam(CONDITION_PARAM_MANAGAIN, vocation->getManaGainAmount());\r\n\t\tcondition->setParam(CONDITION_PARAM_MANATICKS, vocation->getManaGainTicks());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4e95bbc0e54345b1", - "equalIndicator/v1": "53e576d45160dac125bd2ef64a9c10e69e4daf02f4221d7ae66273ea7097944e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')", - "markdown": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5769, - "startColumn": 26, - "charOffset": 170303, - "charLength": 8, - "snippet": { - "text": "std::min" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5767, - "startColumn": 1, - "charOffset": 170197, - "charLength": 277, - "snippet": { - "text": "\r\n\t\tuint8_t dayProgress = std::min(std::round(dayKills / dayMax * 100), 100.0);\r\n\t\tuint8_t weekProgress = std::min(std::round(weekKills / weekMax * 100), 100.0);\r\n\t\tuint8_t monthProgress = std::min(std::round(monthKills / monthMax * 100), 100.0);\r\n\t\tuint8_t skullDuration = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2f07e5522fc8876e", - "equalIndicator/v1": "53e9379a639e77ff5ad6eb79905b733147f1216c807dd92b062265512ff8502c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Redundant string initialization", - "markdown": "Redundant string initialization" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creatures_definitions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1408, - "startColumn": 14, - "charOffset": 37154, - "charLength": 4, - "snippet": { - "text": "name" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1406, - "startColumn": 1, - "charOffset": 37118, - "charLength": 100, - "snippet": { - "text": "\r\n\tuint32_t guid = 0;\r\n\tstd::string name = \"\";\r\n\tstd::string description = \"\";\r\n\tuint32_t icon = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ed7efdc343cdd82e", - "equalIndicator/v1": "540635abc7eeceae82ffa275c5c190ca74b0e399cba7025b938024580158b8c3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?", - "markdown": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 532, - "startColumn": 7, - "charOffset": 14300, - "charLength": 25, - "snippet": { - "text": "Condition::startCondition" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 530, - "startColumn": 1, - "charOffset": 14212, - "charLength": 148, - "snippet": { - "text": "\r\nbool ConditionAttributes::startCondition(std::shared_ptr creature) {\r\n\tif (!Condition::startCondition(creature)) {\r\n\t\treturn false;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a4bc6d65bd2bc8a6", - "equalIndicator/v1": "541c1d99c106f095d05dbdc49752abec8397f3a11e718f5e0b132bb08b2b50dc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3462, - "startColumn": 19, - "charOffset": 104561, - "charLength": 9, - "snippet": { - "text": "slotIndex" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3460, - "startColumn": 1, - "charOffset": 104449, - "charLength": 314, - "snippet": { - "text": "\t\t\t\tif (autoStack && isStackable) {\r\n\t\t\t\t\t// try find an already existing item to stack with\r\n\t\t\t\t\tif (queryAdd(slotIndex, item, item->getItemCount(), 0) == RETURNVALUE_NOERROR) {\r\n\t\t\t\t\t\tif (inventoryItem->equals(item) && inventoryItem->getItemCount() < inventoryItem->getStackSize()) {\r\n\t\t\t\t\t\t\tindex = slotIndex;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "72b173e663f67c78", - "equalIndicator/v1": "543197101bfb90befa262afc3cce15ca13af9b04f6a26fd3ae27a90f855b5cf6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 404, - "startColumn": 8, - "charOffset": 10062, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 402, - "startColumn": 1, - "charOffset": 9956, - "charLength": 226, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetExtraDefense(lua_State* L) {\r\n\t// itemType:getExtraDefense()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->extraDefense);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5c5c75ecbb56a256", - "equalIndicator/v1": "54973398887b0ca0a5e0455ba728591993148b3ab84adca0a6bee939e1898d3c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1642, - "startColumn": 27, - "charOffset": 57694, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1640, - "startColumn": 1, - "charOffset": 57662, - "charLength": 159, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cb71ba682e06db8d", - "equalIndicator/v1": "54a475664a98d9f680c04d01cf0e1f79dd98ff447fad887fe4888d3d789d5673" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/kv_sql.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 42, - "startColumn": 33, - "charOffset": 1362, - "charLength": 10, - "snippet": { - "text": "loadPrefix" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 40, - "startColumn": 1, - "charOffset": 1325, - "charLength": 177, - "snippet": { - "text": "}\r\n\r\nstd::vector KVSQL::loadPrefix(const std::string &prefix /* = \"\"*/) {\r\n\tstd::vector keys;\r\n\tstd::string keySearch = db.escapeString(prefix + \"%\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cd489c5b555e73c8", - "equalIndicator/v1": "54a93d5c59afcd09e5ffb57150e69dc275c39f26b0492083bf49323b1ca168d6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/talkaction.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 91, - "startColumn": 41, - "charOffset": 3164, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 89, - "startColumn": 1, - "charOffset": 3118, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "325535fa0e914331", - "equalIndicator/v1": "54c5ff8b876bbfcce4b5961e08778f83530eeab5e0c5bbac76d3635817cc468d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3482, - "startColumn": 3, - "charOffset": 107032, - "charLength": 8, - "snippet": { - "text": "skills_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3480, - "startColumn": 1, - "charOffset": 106886, - "charLength": 300, - "snippet": { - "text": "\tfor (uint8_t i = SKILL_FIRST; i < SKILL_CRITICAL_HIT_CHANCE; ++i) {\r\n\t\tstatic const uint8_t HardcodedSkillIds[] = { 11, 9, 8, 10, 7, 6, 13 };\r\n\t\tskills_t skill = static_cast(i);\r\n\t\tif (!oldProtocol && (skill == SKILL_LIFE_LEECH_CHANCE || skill == SKILL_MANA_LEECH_CHANCE)) {\r\n\t\t\tcontinue;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ccb0dc438f1e2c8f", - "equalIndicator/v1": "54edbf9e5657184d62ba4baaa6764e8c5588735c8c4da5e340a22b4b4442dbbb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'float'", - "markdown": "Narrowing conversion from 'double' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 340, - "startColumn": 18, - "charOffset": 9679, - "charLength": 27, - "snippet": { - "text": "(1.35 + (stacks - 1) * 0.1)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 338, - "startColumn": 1, - "charOffset": 9558, - "charLength": 177, - "snippet": { - "text": "\t\tfloat multiplier = mType->getAttackMultiplier();\r\n\t\tif (auto stacks = getForgeStack(); stacks > 0) {\r\n\t\t\tmultiplier *= (1.35 + (stacks - 1) * 0.1);\r\n\t\t}\r\n\t\treturn multiplier;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1cad02c475b1a1fc", - "equalIndicator/v1": "54ef398c51ff91d10f715bf92b777a72a667efcf230148f7c712dc132d400c6e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1134, - "startColumn": 6, - "charOffset": 43108, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1132, - "startColumn": 1, - "charOffset": 43052, - "charLength": 199, - "snippet": { - "text": "\tLuaScriptInterface::pushPosition(L, position);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d4999975948997d5", - "equalIndicator/v1": "55320d463e47741b2c86eb346612b6cf12091f0c85d05da419864fd82f668b5d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 894, - "startColumn": 54, - "charOffset": 29048, - "charLength": 8, - "snippet": { - "text": "attacker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 892, - "startColumn": 1, - "charOffset": 28990, - "charLength": 120, - "snippet": { - "text": "}\r\n\r\nvoid Creature::drainHealth(std::shared_ptr attacker, int32_t damage) {\r\n\tchangeHealth(-damage, false);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "14b6b546173a7432", - "equalIndicator/v1": "554933b970d2957314462353a627730b7519b7a6e103b133f8d670a8316aaf59" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'virtual' is redundant since the function is already declared 'override'", - "markdown": "'virtual' is redundant since the function is already declared 'override'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/housetile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 28, - "startColumn": 15, - "charOffset": 1160, - "charLength": 16, - "snippet": { - "text": "internalAddThing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 26, - "startColumn": 1, - "charOffset": 1073, - "charLength": 209, - "snippet": { - "text": "\r\n\tvoid addThing(int32_t index, std::shared_ptr thing) override;\r\n\tvoid virtual internalAddThing(uint32_t index, std::shared_ptr thing) override;\r\n\r\n\tstd::shared_ptr getHouse() override {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "de5bee2f6cc2ad95", - "equalIndicator/v1": "5570fca0a10ebef57a79685786c276d4ba941671152b62106fb50501f1cd76a6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')", - "markdown": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/vocations/vocation.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 60, - "startColumn": 10, - "charOffset": 1425, - "charLength": 13, - "snippet": { - "text": "gainManaTicks" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 58, - "startColumn": 1, - "charOffset": 1376, - "charLength": 136, - "snippet": { - "text": "\r\n\tuint32_t getManaGainTicks() const {\r\n\t\treturn gainManaTicks / g_configManager().getFloat(RATE_MANA_REGEN_SPEED, __FUNCTION__);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bd457d6b81d46a1e", - "equalIndicator/v1": "557d88b0becd74c9dfab33900f4fd4d7ceb40a18a6b3951f3696d036373f3f55" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/kv.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 95, - "startColumn": 34, - "charOffset": 2902, - "charLength": 4, - "snippet": { - "text": "keys" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 93, - "startColumn": 1, - "charOffset": 2796, - "charLength": 158, - "snippet": { - "text": "\r\n\tstd::shared_ptr scoped(const std::string &scope) override final;\r\n\tstd::unordered_set keys(const std::string &prefix = \"\");\r\n\r\nprotected:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dab161a9d384b6b8", - "equalIndicator/v1": "5598a6a5d26d9c8bb6b813a13ddbc5dcb2d28df972a810417b9ff1601d4d1d7b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1152, - "startColumn": 54, - "charOffset": 34820, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1150, - "startColumn": 1, - "charOffset": 34762, - "charLength": 132, - "snippet": { - "text": "}\r\n\r\nbool Monster::pushCreature(std::shared_ptr creature) {\r\n\tstatic std::vector dirList {\r\n\t\tDIRECTION_NORTH,\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b313edb24c2eea56", - "equalIndicator/v1": "55999daf8e7dcf4f162952a9706fae1f82fd68105fae003a97b8d65dcac3929a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 192, - "startColumn": 58, - "charOffset": 5995, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 190, - "startColumn": 1, - "charOffset": 5933, - "charLength": 195, - "snippet": { - "text": "}\r\n\r\nReturnValue Actions::canUseFar(std::shared_ptr creature, const Position &toPos, bool checkLineOfSight, bool checkFloor) {\r\n\tif (toPos.x == 0xFFFF) {\r\n\t\treturn RETURNVALUE_NOERROR;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7e6ebbe611a044e2", - "equalIndicator/v1": "55a482b2629c57d850918c96670d79743a9e101f2914fee77634237554cb4183" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1143, - "startColumn": 7, - "charOffset": 40944, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1141, - "startColumn": 1, - "charOffset": 40932, - "charLength": 148, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnCombat - \"\r\n\t\t \"Player {} target {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "613e576970800c8f", - "equalIndicator/v1": "55aceabd7dfd0710bf8f8c56ba7156b8e8bd76ffc49705f51f1f771aa6c57bf5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 9000, - "startColumn": 2, - "charOffset": 286766, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8998, - "startColumn": 1, - "charOffset": 286671, - "charLength": 207, - "snippet": { - "text": "\tuint16_t monsterRaceId = (uint16_t)msg.get();\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tuint8_t direction = msg.getByte();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "814b7dd84e447201", - "equalIndicator/v1": "55ebe99b509259ab3662d4326174a134cecb1f3029586e5b7e34b4435f0cd3ed" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions", - "markdown": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/metrics/metrics.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 189, - "startColumn": 2, - "charOffset": 6975, - "charLength": 20, - "snippet": { - "text": "DEFINE_LATENCY_CLASS" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 187, - "startColumn": 1, - "charOffset": 6877, - "charLength": 248, - "snippet": { - "text": "\tDEFINE_LATENCY_CLASS(method, \"method\", \"method\");\r\n\tDEFINE_LATENCY_CLASS(lua, \"lua\", \"scope\");\r\n\tDEFINE_LATENCY_CLASS(query, \"query\", \"truncated_query\");\r\n\tDEFINE_LATENCY_CLASS(task, \"task\", \"task\");\r\n\tDEFINE_LATENCY_CLASS(lock, \"lock\", \"scope\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dbadd63ce48721b3", - "equalIndicator/v1": "55f98898fbe27f5b25dfff541acc352247b8798bc95c86de1a1c7ddb716070fb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monsters.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 47, - "startColumn": 22, - "charOffset": 1804, - "charLength": 28, - "snippet": { - "text": "CONDITION_PARAM_TICKINTERVAL" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 45, - "startColumn": 1, - "charOffset": 1452, - "charLength": 517, - "snippet": { - "text": "std::shared_ptr Monsters::getDamageCondition(ConditionType_t conditionType, int32_t maxDamage, int32_t minDamage, int32_t startDamage, uint32_t tickInterval) {\r\n\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_COMBAT, conditionType, 0, 0)->static_self_cast();\r\n\tcondition->setParam(CONDITION_PARAM_TICKINTERVAL, tickInterval);\r\n\tcondition->setParam(CONDITION_PARAM_MINVALUE, minDamage);\r\n\tcondition->setParam(CONDITION_PARAM_MAXVALUE, maxDamage);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "936a24a58ce103aa", - "equalIndicator/v1": "5611b7d3b378dbcc361d90bee58d611557a6fbe0852a99c2e7748bce68ca5e96" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')", - "markdown": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1251, - "startColumn": 10, - "charOffset": 34640, - "charLength": 11, - "snippet": { - "text": "healthTicks" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1249, - "startColumn": 1, - "charOffset": 34592, - "charLength": 131, - "snippet": { - "text": "\r\n\tif (player != nullptr && isBuff) {\r\n\t\treturn healthTicks / g_configManager().getFloat(RATE_SPELL_COOLDOWN, __FUNCTION__);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2b408c742833826c", - "equalIndicator/v1": "561ea8a815ce356ed40848fa7311ca1bb41eba7fef122786b5b78492062b2f2a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/items.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 158, - "startColumn": 37, - "charOffset": 5170, - "charLength": 11, - "snippet": { - "text": "frame_group" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 156, - "startColumn": 1, - "charOffset": 5023, - "charLength": 229, - "snippet": { - "text": "\t\tif (supportAnimation) {\r\n\t\t\tfor (uint32_t frame_it = 0; frame_it < object.frame_group_size(); ++frame_it) {\r\n\t\t\t\tFrameGroup objectFrame = object.frame_group(frame_it);\r\n\t\t\t\tif (!objectFrame.has_sprite_info()) {\r\n\t\t\t\t\tcontinue;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "88916cc66624a9b7", - "equalIndicator/v1": "5643a93a8e5dce82d6c317ef0073223c89dd47df14725819000fcb5399d55f37" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'speaker' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'speaker' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 150, - "startColumn": 98, - "charOffset": 5228, - "charLength": 7, - "snippet": { - "text": "speaker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 148, - "startColumn": 1, - "charOffset": 5126, - "charLength": 271, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::creatureOnHear(std::shared_ptr creature, std::shared_ptr speaker, const std::string &words, SpeakClasses type) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnHear - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "df9058f0f00f3374", - "equalIndicator/v1": "564bcdf435d6b744a8cceb4c28581f2776c30c195df763ea68fd0b554b23af63" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1144, - "startColumn": 7, - "charOffset": 43446, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1142, - "startColumn": 1, - "charOffset": 43321, - "charLength": 278, - "snippet": { - "text": "\r\nbool EventCallback::zoneBeforeCreatureEnter(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneBeforeCreatureEnter - \"\r\n\t\t \"Zone {} Creature {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fbd518e4cdfd9c10", - "equalIndicator/v1": "565a19e9385c4d6c74c35c9fc58b9a681c174eadecbcd0dec10479c90b945544" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/bank/bank.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 137, - "startColumn": 45, - "charOffset": 3626, - "charLength": 6, - "snippet": { - "text": "amount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 135, - "startColumn": 1, - "charOffset": 3541, - "charLength": 181, - "snippet": { - "text": "\t}\r\n\tg_game().addMoney(player, amount);\r\n\tg_metrics().addCounter(\"balance_decrease\", amount, { { \"player\", player->getName() }, { \"context\", \"bank_withdraw\" } });\r\n\treturn true;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "08a8d2537de1f897", - "equalIndicator/v1": "56677defd85f105f911ab8789ad7001c30b3643f6a122a8d7d89bbd252f8f73d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Redundant return statement at the end of a function with a void return type", - "markdown": "Redundant return statement at the end of a function with a void return type" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1589, - "startColumn": 2, - "charOffset": 47193, - "charLength": 6, - "snippet": { - "text": "return" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1587, - "startColumn": 1, - "charOffset": 47174, - "charLength": 32, - "snippet": { - "text": "\t\tgetchar();\r\n\t}\r\n\treturn;\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "02147ae4f255b6f8", - "equalIndicator/v1": "56913809ea79e4f32e6a3fb901e02f28f2c3c412354e672c25e2f511ac3403df" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1101, - "startColumn": 49, - "charOffset": 35993, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1099, - "startColumn": 1, - "charOffset": 35940, - "charLength": 206, - "snippet": { - "text": "}\r\n\r\nbool Combat::doCombat(std::shared_ptr caster, const Position &position) const {\r\n\tif (caster != nullptr && params.chainCallback) {\r\n\t\treturn doCombatChain(caster, caster, params.aggressive);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "60d4b23fe045f368", - "equalIndicator/v1": "5696bd70339aec1c6118178c5bb045d47e97ac9ad91e5338988ffb16329c8d45" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/lua_functions_loader.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 685, - "startColumn": 20, - "charOffset": 20518, - "charLength": 22, - "snippet": { - "text": "std::hash" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 683, - "startColumn": 1, - "charOffset": 20460, - "charLength": 132, - "snippet": { - "text": "\r\n\t// className.metatable['h'] = hash\r\n\tlua_pushnumber(L, std::hash()(className));\r\n\tlua_rawseti(L, metatable, 'h');\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e996bae86c5767ca", - "equalIndicator/v1": "56a8c344e6d8a2705ed01f433e01b6b4932d4bcec4ebb97dcfd040b97c884fc0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'virtual' is redundant since the function is already declared 'override'", - "markdown": "'virtual' is redundant since the function is already declared 'override'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 322, - "startColumn": 18, - "charOffset": 9085, - "charLength": 21, - "snippet": { - "text": "getElementDamageValue" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 320, - "startColumn": 1, - "charOffset": 9041, - "charLength": 96, - "snippet": { - "text": "\t\treturn elementType;\r\n\t}\r\n\tvirtual int16_t getElementDamageValue() const override;\r\n\r\nprivate:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "514097b64ee535c0", - "equalIndicator/v1": "56b5b82f07383ddc3e5fca59062d3c2b4d14a246f8db1ffb01eec67a059a4909" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1493, - "startColumn": 51, - "charOffset": 45615, - "charLength": 8, - "snippet": { - "text": "interval" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1491, - "startColumn": 1, - "charOffset": 45496, - "charLength": 183, - "snippet": { - "text": "\twhile (it != end) {\r\n\t\tstd::shared_ptr condition = *it;\r\n\t\tif (!condition->executeCondition(getCreature(), interval)) {\r\n\t\t\tConditionType_t type = condition->getType();\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f2312085b46d24fa", - "equalIndicator/v1": "570fcdafea3868399476e3804c20300340d5484506e08cf69d90f2ce01b1a969" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructor does not initialize these fields: m_value", - "markdown": "Constructor does not initialize these fields: m_value" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/wheel_gems.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 214, - "startColumn": 11, - "charOffset": 6500, - "charLength": 29, - "snippet": { - "text": "GemModifierRevelationStrategy" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 212, - "startColumn": 1, - "charOffset": 6413, - "charLength": 260, - "snippet": { - "text": "class GemModifierRevelationStrategy : public GemModifierStrategy {\r\npublic:\r\n\texplicit GemModifierRevelationStrategy(PlayerWheel &wheel, WheelGemAffinity_t affinity, [[maybe_unused]] uint16_t value) :\r\n\t\tGemModifierStrategy(wheel),\r\n\t\tm_affinity(affinity) { }\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4aaa2e9c9cefa346", - "equalIndicator/v1": "5711f49998254f7fc9a210231eaec0bc0eb459befaa3d80734be5755448e262e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 365, - "startColumn": 108, - "charOffset": 10537, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 363, - "startColumn": 1, - "charOffset": 10425, - "charLength": 284, - "snippet": { - "text": "}\r\n\r\nvoid House::handleWrapableItem(ItemList &moveItemList, std::shared_ptr item, std::shared_ptr player, std::shared_ptr houseTile) const {\r\n\tif (item->isWrapContainer()) {\r\n\t\tg_logger().debug(\"[{}] found wrapable item '{}'\", __FUNCTION__, item->getName());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "651b35710a81e8e7", - "equalIndicator/v1": "57173845b53dda9263e63191b77e0bf2bb87d7a78e2a3234b28538dd102ab7e4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5671, - "startColumn": 49, - "charOffset": 167680, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5669, - "startColumn": 1, - "charOffset": 167627, - "charLength": 153, - "snippet": { - "text": "}\r\n\r\nbool Player::isInviting(std::shared_ptr player) const {\r\n\tif (!player || !m_party || m_party->getLeader().get() != this) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cb42d3a26dbcdf81", - "equalIndicator/v1": "571f5c4a8c5303cc5b23d0230e7d36d8b64bab1aa366c5647237369695d13778" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 78, - "startColumn": 10, - "charOffset": 2102, - "charLength": 5, - "snippet": { - "text": "mType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 76, - "startColumn": 1, - "charOffset": 2015, - "charLength": 175, - "snippet": { - "text": "\tfloat getMitigation() const override;\r\n\tint32_t getArmor() const override {\r\n\t\treturn mType->info.armor * getDefenseMultiplier();\r\n\t}\r\n\tint32_t getDefense() const override {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d732cdb3edbd9727", - "equalIndicator/v1": "5740824de7556c13a34fc5c3e286323eeeaed76c155556469e5cb17586ecc727" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Switch has 2 consecutive identical branches", - "markdown": "Switch has 2 consecutive identical branches" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/cyclopedia/player_title.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 216, - "startColumn": 3, - "charOffset": 6417, - "charLength": 4, - "snippet": { - "text": "case" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 214, - "startColumn": 1, - "charOffset": 6372, - "charLength": 183, - "snippet": { - "text": "\t\t\tfieldCheck = \"player_guid\";\r\n\t\t\tbreak;\r\n\t\tcase HighscoreCategories_t::DROME:\r\n\t\t\t// todo check if player is in the top 5 for the previous rota of the Tibiadrome.\r\n\t\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "eea903d72771759c", - "equalIndicator/v1": "57437ff658eda71e4b1bbffc59077154dbed007b399c8bb241a31e23774f4639" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1137, - "startColumn": 58, - "charOffset": 40696, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1135, - "startColumn": 1, - "charOffset": 40634, - "charLength": 286, - "snippet": { - "text": "}\r\n\r\nvoid Events::eventPlayerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) {\r\n\t// Player:onCombat(target, item, primaryDamage, primaryType, secondaryDamage, secondaryType)\r\n\tif (info.playerOnCombat == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7454487884653b87", - "equalIndicator/v1": "575394b2725e8c939b922ced031b154370e9abcaf27cc5da116e0f5e1938912f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/modules/modules.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 125, - "startColumn": 11, - "charOffset": 3575, - "charLength": 11, - "snippet": { - "text": "static_cast" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 123, - "startColumn": 1, - "charOffset": 3477, - "charLength": 153, - "snippet": { - "text": "\tpugi::xml_attribute delayAttribute = node.attribute(\"delay\");\r\n\tif (delayAttribute) {\r\n\t\tdelay = static_cast(delayAttribute.as_uint());\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "072d56a36ce282c4", - "equalIndicator/v1": "575886a6491325f225f60cdf768f0aeafa4a551300d981c83bb7ac52067503ae" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1395, - "startColumn": 73, - "charOffset": 48105, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1393, - "startColumn": 1, - "charOffset": 48028, - "charLength": 240, - "snippet": { - "text": "}\r\n\r\n[[maybe_unused]] void Combat::doCombatDefault(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms) {\r\n\tdoCombatDefault(caster, target, caster ? caster->getPosition() : Position(), params);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2a74db57fff783ae", - "equalIndicator/v1": "57610519b71aba1db7595a1477281040ee7e7ffc19195f39f6a9db2527a16faa" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 235, - "startColumn": 24, - "charOffset": 7207, - "charLength": 7, - "snippet": { - "text": "getItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 233, - "startColumn": 1, - "charOffset": 7126, - "charLength": 148, - "snippet": { - "text": "\tbool equals(std::shared_ptr compareItem) const;\r\n\r\n\tstd::shared_ptr getItem() override final {\r\n\t\treturn static_self_cast();\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d3a18068347b6a14", - "equalIndicator/v1": "57870e8ea6bf629439aba78fc98b2a5c69e45043b85c2e9aff8d4a481318511b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The 'empty' method should be used to check for emptiness instead of 'size'", - "markdown": "The 'empty' method should be used to check for emptiness instead of 'size'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 399, - "startColumn": 71, - "charOffset": 12130, - "charLength": 12, - "snippet": { - "text": "getContainer" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 397, - "startColumn": 1, - "charOffset": 12039, - "charLength": 198, - "snippet": { - "text": "\t\treturn false;\r\n\t}\r\n\tauto isContainerAndHasSomethingInside = (getContainer() != NULL) && (getContainer()->getItemList().size() > 0);\r\n\treturn (isStowable() || isContainerAndHasSomethingInside);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dee2e5f40397a5d3", - "equalIndicator/v1": "57e565168521cd3d7fa404a469f2c8ad2e44bbc005c2d3e25786a2ed6ddd84de" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 362, - "startColumn": 7, - "charOffset": 10341, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 360, - "startColumn": 1, - "charOffset": 10200, - "charLength": 338, - "snippet": { - "text": "bool CombatSpell::executeCastSpell(std::shared_ptr creature, const LuaVariant &var) const {\r\n\t// onCastSpell(creature, var)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[CombatSpell::executeCastSpell - Creature {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "664f7ad596ed7c60", - "equalIndicator/v1": "58273ac349554715587350030eecb784d75f78177939d1710ebcae660ae382bb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'func' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'func' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1122, - "startColumn": 188, - "charOffset": 36851, - "charLength": 4, - "snippet": { - "text": "func" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1120, - "startColumn": 1, - "charOffset": 36659, - "charLength": 269, - "snippet": { - "text": "}\r\n\r\nvoid Combat::CombatFunc(std::shared_ptr caster, const Position &origin, const Position &pos, const std::unique_ptr &area, const CombatParams ¶ms, CombatFunction func, CombatDamage* data) {\r\n\tstd::vector> tileList;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4e59325ffe0a74aa", - "equalIndicator/v1": "5851dfff41eee90a4db498d585a08e3528a2642d90ab2c5ececf9ea0e3651395" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 536, - "startColumn": 35, - "charOffset": 17903, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 534, - "startColumn": 1, - "charOffset": 17814, - "charLength": 151, - "snippet": { - "text": "\tLuaScriptInterface::pushPosition(L, fromPosition);\r\n\r\n\tLuaScriptInterface::pushThing(L, target);\r\n\tLuaScriptInterface::pushPosition(L, toPosition);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "eae5e0510b5e542d", - "equalIndicator/v1": "5874c2339379030cddc83b57873f4eec275d2bdb16d6fe570d7b60b61fb00795" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1234, - "startColumn": 27, - "charOffset": 44008, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1232, - "startColumn": 1, - "charOffset": 43976, - "charLength": 135, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnRequestQuestLine, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "faeee4f742cf88b5", - "equalIndicator/v1": "5877f0f54fda61ef4933b9a5dce8914604d9224b75058eba712bd93cd4f13a8f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6068, - "startColumn": 62, - "charOffset": 193164, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6066, - "startColumn": 1, - "charOffset": 193098, - "charLength": 201, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureSay(std::shared_ptr creature, SpeakClasses type, const std::string &text, const Position* pos /* = nullptr*/) {\r\n\tNetworkMessage msg;\r\n\tmsg.addByte(0xAA);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e8d81fea1dca1606", - "equalIndicator/v1": "587a83f56de5740728a35499f73d2461e115c1ff89f32a3126e9506dfefa17d9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6172, - "startColumn": 50, - "charOffset": 213291, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6170, - "startColumn": 1, - "charOffset": 213237, - "charLength": 220, - "snippet": { - "text": "}\r\n\r\nbool Game::playerSpeakTo(std::shared_ptr player, SpeakClasses type, const std::string &receiver, const std::string &text) {\r\n\tstd::shared_ptr toPlayer = getPlayerByName(receiver);\r\n\tif (!toPlayer) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9bbf6fd17f7a0bfd", - "equalIndicator/v1": "588008e7bf993a2a3eb0020a461cad24cecd9cf71baf7910f382dd8ad12b797e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 791, - "startColumn": 21, - "charOffset": 25681, - "charLength": 10, - "snippet": { - "text": "std::round" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 789, - "startColumn": 1, - "charOffset": 25609, - "charLength": 210, - "snippet": { - "text": "\tfloat attackFactor = player->getAttackFactor();\r\n\r\n\tint32_t minValue = std::round(player->getLevel() / 5);\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue) / 2;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5e7f382fbf862dcd", - "equalIndicator/v1": "58849d8ba7db424274230e7acb0b6294442f5699ff7041b6226de7449d6406c2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", - "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1680, - "startColumn": 11, - "charOffset": 50057, - "charLength": 11, - "snippet": { - "text": "std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1678, - "startColumn": 1, - "charOffset": 50005, - "charLength": 74, - "snippet": { - "text": "\t\t\treturn \"Unassigned Loot\";\r\n\t\tdefault:\r\n\t\t\treturn std::string();\r\n\t}\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ba05d67982d0e881", - "equalIndicator/v1": "58a1d162d5c8e450289693ec26fba4813920331aad9c4f13b521460694402d0f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/movement/teleport.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 119, - "startColumn": 16, - "charOffset": 3778, - "charLength": 19, - "snippet": { - "text": "postAddNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 117, - "startColumn": 1, - "charOffset": 3758, - "charLength": 217, - "snippet": { - "text": "}\r\n\r\nvoid Teleport::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tgetParent()->postAddNotification(thing, oldParent, index, LINK_PARENT);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "293fa8b33a70ea2b", - "equalIndicator/v1": "58b23a79185a1cbd832ebe9f9b74c4fa85b8145e3e6f356299a9b6c8b1dc1fc4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 508, - "startColumn": 33, - "charOffset": 14621, - "charLength": 9, - "snippet": { - "text": "spectator" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 506, - "startColumn": 1, - "charOffset": 14568, - "charLength": 170, - "snippet": { - "text": "\r\n\t// event methods\r\n\tfor (std::shared_ptr spectator : spectators) {\r\n\t\tspectator->onRemoveTileItem(static_self_cast(), cylinderMapPos, iType, item);\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8f297ffabbf1ad4e", - "equalIndicator/v1": "58c39645124c40c0e31b15a8f53283898f7409a6f092d5b6a107c1b5a2f907f6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7560, - "startColumn": 108, - "charOffset": 263613, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7558, - "startColumn": 1, - "charOffset": 263463, - "charLength": 282, - "snippet": { - "text": "// Mana leech\r\nvoid Game::applyManaLeech(\r\n\tstd::shared_ptr attackerPlayer, std::shared_ptr targetMonster, std::shared_ptr target, const CombatDamage &damage, const int32_t &realDamage\r\n) const {\r\n\t// Wheel of destiny bonus - mana leech chance and amount\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f0b4ec0bacdd28b2", - "equalIndicator/v1": "58d0f88862a13e514ef7bb22be1e7ff9cb2aae02203deb311f5d022db37d2929" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 578, - "startColumn": 13, - "charOffset": 27346, - "charLength": 13, - "snippet": { - "text": "absorbPercent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 576, - "startColumn": 1, - "charOffset": 27184, - "charLength": 353, - "snippet": { - "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += value;\r\n\t} else if (stringValue == \"absorbpercentenergy\") {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e32b35e7149bd992", - "equalIndicator/v1": "58e43a38813433557541236850e2da3af1d322c9de176ac720bb6dd0362760a1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 139, - "startColumn": 8, - "charOffset": 4176, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 137, - "startColumn": 1, - "charOffset": 4060, - "charLength": 317, - "snippet": { - "text": "\t\t// onCreatureAppear(self, creature)\r\n\t\tLuaScriptInterface* scriptInterface = mType->info.scriptInterface;\r\n\t\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\t\tg_logger().error(\"[Monster::onCreatureAppear - Monster {} creature {}] \"\r\n\t\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dea42bd8677ba618", - "equalIndicator/v1": "592a71f2a0eb4f0d461a99b7d81848bb63556c6f0aedf6573c5e9998cdb6a449" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 571, - "startColumn": 37, - "charOffset": 15396, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 569, - "startColumn": 1, - "charOffset": 15331, - "charLength": 145, - "snippet": { - "text": "\r\n\t\t\tcase STAT_MAGICPOINTS:\r\n\t\t\t\tstats[i] = static_cast(player->getBaseMagicLevel() * ((statsPercent[i] - 100) / 100.f));\r\n\t\t\t\tbreak;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e1aae118837cbcae", - "equalIndicator/v1": "594416bc6c234c82536838ea012f18ffa917ff0e2e584dcd640c199c77b8f4b4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/cylinder.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 16, - "startColumn": 19, - "charOffset": 560, - "charLength": 13, - "snippet": { - "text": "getThingIndex" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 14, - "startColumn": 1, - "charOffset": 434, - "charLength": 188, - "snippet": { - "text": "std::shared_ptr VirtualCylinder::virtualCylinder = std::make_shared();\r\n\r\nint32_t Cylinder::getThingIndex(std::shared_ptr) const {\r\n\treturn -1;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "37eaf2cdb9dc01c7", - "equalIndicator/v1": "594702255ccd12ab75a15cf5915b38eadf337bfa26d185aade5f6fc537e860ea" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7934, - "startColumn": 90, - "charOffset": 240490, - "charLength": 7, - "snippet": { - "text": "monster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7932, - "startColumn": 1, - "charOffset": 240396, - "charLength": 190, - "snippet": { - "text": "}\r\n\r\nvoid Player::parseAttackDealtHazardSystem(CombatDamage &damage, std::shared_ptr monster) {\r\n\tif (!g_configManager().getBoolean(TOGGLE_HAZARDSYSTEM, __FUNCTION__)) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6d3e208cb5390997", - "equalIndicator/v1": "595732069b8bff64c98a77c18918939737419fd6f0a68a5bade7de7f3d4f2d7b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::_Tree, std::allocator>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::_Tree, std::allocator\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 912, - "startColumn": 58, - "charOffset": 27826, - "charLength": 1, - "snippet": { - "text": "0" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 910, - "startColumn": 1, - "charOffset": 27763, - "charLength": 176, - "snippet": { - "text": "\t}\r\n\r\n\tlua_createtable(L, monsterType->info.elementMap.size(), 0);\r\n\tfor (const auto &elementEntry : monsterType->info.elementMap) {\r\n\t\tlua_pushnumber(L, elementEntry.second);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4f0f26a3dc0746b6", - "equalIndicator/v1": "595789c0b1edcc3d098e26724c80dadb876431252a4744abef65d13530da012c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 567, - "startColumn": 21, - "charOffset": 18570, - "charLength": 5, - "snippet": { - "text": "level" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 565, - "startColumn": 1, - "charOffset": 18376, - "charLength": 226, - "snippet": { - "text": "\tint32_t maxValue = static_cast(Weapons::getMaxWeaponDamage(level, attackSkill, attackValue, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\r\n\r\n\tint32_t minValue = level / 5;\r\n\r\n\tif (maxDamage) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "772670a2f71ce689", - "equalIndicator/v1": "5994bcd6f732215c991cd055c7ecf88c00e3c5dc73c05f2928d9a9b255c20e9a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 146, - "startColumn": 28, - "charOffset": 4478, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 144, - "startColumn": 1, - "charOffset": 4444, - "charLength": 140, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\t\tenv->setScriptId(mType->info.creatureAppearEvent, scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "82471a51e97f7925", - "equalIndicator/v1": "59b7690a3da973dfd4683a67853f671618d909c4681bbb42cc99033eb5526337" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'long double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'long double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6092, - "startColumn": 82, - "charOffset": 179338, - "charLength": 12, - "snippet": { - "text": "nextReqTries" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6090, - "startColumn": 1, - "charOffset": 179142, - "charLength": 242, - "snippet": { - "text": "\t\tif (nextReqTries > currReqTries) {\r\n\t\t\tnewPercent = Player::getPercentLevel(skills[skill].tries, nextReqTries);\r\n\t\t\tnewPercentToNextLevel = static_cast(skills[skill].tries * 100) / nextReqTries;\r\n\t\t} else {\r\n\t\t\tnewPercent = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "432c951bcce0a220", - "equalIndicator/v1": "59bebfed42b33bb8219efadb8a0b82750d6f61fed909726d2cc641bf05300a77" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6840, - "startColumn": 25, - "charOffset": 236671, - "charLength": 10, - "snippet": { - "text": "std::round" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6838, - "startColumn": 1, - "charOffset": 236517, - "charLength": 298, - "snippet": { - "text": "\tfloat pvpDamageMultiplier = targetDamageReceivedMultiplier * attackerDamageDealtMultiplier * levelDifferenceDamageMultiplier;\r\n\r\n\tdamage.primary.value = std::round(damage.primary.value * pvpDamageMultiplier);\r\n\tdamage.secondary.value = std::round(damage.secondary.value * pvpDamageMultiplier);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dada756f615dfc61", - "equalIndicator/v1": "59f511fa5ea3ce8267189511ae134150541fc0e70f35710fc9afeac071c9f32c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'target' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'target' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 502, - "startColumn": 25, - "charOffset": 27074, - "charLength": 31, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 500, - "startColumn": 1, - "charOffset": 27018, - "charLength": 264, - "snippet": { - "text": "\r\n\t// Animation help functions\r\n\tvoid addCreatureHealth(const std::shared_ptr target);\r\n\tstatic void addCreatureHealth(const CreatureVector &spectators, const std::shared_ptr target);\r\n\tvoid addPlayerMana(const std::shared_ptr target);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3ecef3bfbc1dd613", - "equalIndicator/v1": "59f84e60b28e4c03fab378791ceb8c1bce026696d6bcc408539e8d00c07bf0c5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1215, - "startColumn": 98, - "charOffset": 46358, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1213, - "startColumn": 1, - "charOffset": 46256, - "charLength": 235, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::zoneAfterCreatureLeave(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneAfterCreatureLeave - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "429012f7050e8a83", - "equalIndicator/v1": "5a115056e795994f4c17db6ccce51143798fc687342d839f03ed1946b7e24bc3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 348, - "startColumn": 115, - "charOffset": 12975, - "charLength": 5, - "snippet": { - "text": "thing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 346, - "startColumn": 1, - "charOffset": 12856, - "charLength": 279, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::playerOnLook(std::shared_ptr player, const Position &position, std::shared_ptr thing, uint8_t stackpos, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLook - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3826eeab5e60d7e7", - "equalIndicator/v1": "5a587c48a5f422b9ce3dfbcffbb74d3e66c499a4516d0118ebba40500bd218ed" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1872, - "startColumn": 21, - "charOffset": 64774, - "charLength": 5, - "snippet": { - "text": "input" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1870, - "startColumn": 1, - "charOffset": 64680, - "charLength": 173, - "snippet": { - "text": "\t\tfor (uint32_t y = 0; y < input->getRows(); ++y) {\r\n\t\t\tuint32_t rx = 0;\r\n\t\t\tfor (int32_t x = input->getCols(); --x >= 0;) {\r\n\t\t\t\t(*output)[y][rx++] = (*input)[y][x];\r\n\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "68a5702f2abce001", - "equalIndicator/v1": "5a63943b3d42294bb4e86d509c6fcfa68a9dee3611ad2cc833f80f5b1784449f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/management/waitlist.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 64, - "startColumn": 55, - "charOffset": 1726, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 62, - "startColumn": 1, - "charOffset": 1667, - "charLength": 196, - "snippet": { - "text": "}\r\n\r\nbool WaitingList::clientLogin(std::shared_ptr player) {\r\n\tif (player->hasFlag(PlayerFlags_t::CanAlwaysLogin) || player->getAccountType() >= ACCOUNT_TYPE_GAMEMASTER) {\r\n\t\treturn true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cea3c5d390bd8b98", - "equalIndicator/v1": "5a6e48e9c53db30d935d8a9e0a52e5b446334c44601ad1096fda688fb4bc1872" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/bed.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 254, - "startColumn": 22, - "charOffset": 6791, - "charLength": 5, - "snippet": { - "text": "regen" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 252, - "startColumn": 1, - "charOffset": 6667, - "charLength": 198, - "snippet": { - "text": "\r\n\t\tplayer->changeHealth(regen * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__), false);\r\n\t\tplayer->changeMana(regen * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__));\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c8b5093a106586b1", - "equalIndicator/v1": "5a7541f2f12e80adc4ce3607d1e40af523bf815c15570dd7f2641b4d05ba3820" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'", - "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7729, - "startColumn": 21, - "charOffset": 242479, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7727, - "startColumn": 1, - "charOffset": 242354, - "charLength": 226, - "snippet": { - "text": "\t\tmsg.add(player->getBaseMagicLevel());\r\n\t\tmsg.add(player->getLoyaltyMagicLevel());\r\n\t\tmsg.add(player->getMagicLevelPercent() * 100);\r\n\r\n\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; ++i) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e890f52b1d38acf8", - "equalIndicator/v1": "5af111dd317419de203086cafbf6d0d096b63acab19ab49bd0a6b6dea000883f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Result of integer division used in a floating point context; possible loss of precision", - "markdown": "Result of integer division used in a floating point context; possible loss of precision" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/io_bosstiary.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 219, - "startColumn": 32, - "charOffset": 7522, - "charLength": 4, - "snippet": { - "text": "37.5" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 217, - "startColumn": 1, - "charOffset": 7402, - "charLength": 241, - "snippet": { - "text": "\t\treturn static_cast(25 + bossPoints / 10);\r\n\t} else if (bossPoints < 1250) {\r\n\t\treturn static_cast(37.5 + bossPoints / 20);\r\n\t}\r\n\treturn static_cast(100 + 0.5 * (sqrt(8 * ((bossPoints - 1250) / 5) + 81) - 9));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "be343788d799a679", - "equalIndicator/v1": "5afaa106138b05462db332f6b03e75890922365d8129f02649cbea47c6eb5365" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2698, - "startColumn": 14, - "charOffset": 79523, - "charLength": 8, - "snippet": { - "text": "queryAdd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2696, - "startColumn": 1, - "charOffset": 79478, - "charLength": 486, - "snippet": { - "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "24ae7a52010df60a", - "equalIndicator/v1": "5b1c4743ccea194eaf4f1c8eb2298ebdb2e81cb6f47984030599c341083675ad" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 869, - "startColumn": 7, - "charOffset": 31536, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 867, - "startColumn": 1, - "charOffset": 31524, - "charLength": 151, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnReportRuleViolation - \"\r\n\t\t \"Player {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1c333825a8695bc9", - "equalIndicator/v1": "5b2b1701bce81ca8a3b8c66a6df8656733816f4ac8a01db002fa8d41d10b02f4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'key' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'key' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 522, - "startColumn": 23, - "charOffset": 14084, - "charLength": 14, - "snippet": { - "text": "const uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 520, - "startColumn": 1, - "charOffset": 14014, - "charLength": 195, - "snippet": { - "text": "\tbool canOpenCorpse(uint32_t ownerId) const;\r\n\r\n\tvoid addStorageValue(const uint32_t key, const int32_t value, const bool isLogin = false);\r\n\tint32_t getStorageValue(const uint32_t key) const;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ee2f3ef789a87b58", - "equalIndicator/v1": "5b493a4b6aec0be3ed23fd54adaf2b5cd6072ac0633bee94304ac681f8334716" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1682, - "startColumn": 4, - "charOffset": 50027, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1680, - "startColumn": 1, - "charOffset": 49953, - "charLength": 198, - "snippet": { - "text": "\t\t} else if (outfitType == 2) {\r\n\t\t\tPosition pos = msg.getPosition();\r\n\t\t\tuint16_t itemId = msg.get();\r\n\t\t\tuint8_t stackpos = msg.getByte();\r\n\t\t\tnewOutfit.lookMount = msg.get();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7822a32cab326cf5", - "equalIndicator/v1": "5b863b853241c0a20e409909c59387f7d080d132f4d241c78c7c359d1f906ba3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 527, - "startColumn": 20, - "charOffset": 18797, - "charLength": 3, - "snippet": { - "text": "exp" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 525, - "startColumn": 1, - "charOffset": 18724, - "charLength": 134, - "snippet": { - "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Party\");\r\n\r\n\tlua_pushnumber(L, exp);\r\n\r\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "74a3da5abd9c3b4c", - "equalIndicator/v1": "5b955e1bd8c4b8e0316ca4bd2696dad809e2e4fa5ca46c136a5065ce395f5032" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1812, - "startColumn": 2, - "charOffset": 62947, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1810, - "startColumn": 1, - "charOffset": 62940, - "charLength": 62, - "snippet": { - "text": "\t}\r\n\r\n\tscriptInterface->resetScriptEnv();\r\n\treturn result;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e35bd094a0a863fe", - "equalIndicator/v1": "5bd1216cd4e208d74b70a422fbd623b7ff62712d33bd6b30c93a2b4cd335db83" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 547, - "startColumn": 38, - "charOffset": 20879, - "charLength": 12, - "snippet": { - "text": "fromCylinder" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 545, - "startColumn": 1, - "charOffset": 20789, - "charLength": 158, - "snippet": { - "text": "\tLuaScriptInterface::pushPosition(L, toPosition);\r\n\r\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\r\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "16c28aa006699056", - "equalIndicator/v1": "5bd5e5aa12334d6dc0183ac45e54626f94e7d07b456d23f33771de9dda2910f3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/creaturecallback.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 30, - "startColumn": 46, - "charOffset": 945, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 28, - "startColumn": 1, - "charOffset": 894, - "charLength": 136, - "snippet": { - "text": "\t}\r\n\r\n\tvoid pushCreature(std::shared_ptr creature) {\r\n\t\tparams++;\r\n\t\tLuaScriptInterface::pushUserdata(L, creature);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0c41c6a38285247c", - "equalIndicator/v1": "5c052f251f8927b54d2cb3eba70f93bde3aef09977ae8919cb9a5be08de42c3f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 244, - "startColumn": 7, - "charOffset": 7933, - "charLength": 9, - "snippet": { - "text": "isRemoved" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 242, - "startColumn": 1, - "charOffset": 7921, - "charLength": 62, - "snippet": { - "text": "\t}\r\n\r\n\tbool isRemoved() override final {\r\n\t\treturn false;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a85896805723b772", - "equalIndicator/v1": "5c0a7ff9db4bce8bfee22eee9c1917317cbe11c10e0d13566681e8d728a657dd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iobestiary.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 370, - "startColumn": 4, - "charOffset": 12262, - "charLength": 87, - "snippet": { - "text": "case COMBAT_HOLYDAMAGE:\r\n\t\t\t\tdefaultMap[5] -= static_cast(elementEntry.second)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 368, - "startColumn": 1, - "charOffset": 12182, - "charLength": 210, - "snippet": { - "text": "\t\t\t\tdefaultMap[4] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_HOLYDAMAGE:\r\n\t\t\t\tdefaultMap[5] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_DEATHDAMAGE:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0ca4a693ca0980a7", - "equalIndicator/v1": "5c42d954d23af57e61b28c5920024c9d9d36d52ceca7d140c32ca9dcff9027ba" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1141, - "startColumn": 25, - "charOffset": 34251, - "charLength": 15, - "snippet": { - "text": "getTopItemCount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1139, - "startColumn": 1, - "charOffset": 34156, - "charLength": 182, - "snippet": { - "text": "\tTileItemVector* items = getItemList();\r\n\tif (items && !isInserted) {\r\n\t\tint32_t topItemSize = getTopItemCount();\r\n\t\tif (pos < topItemSize) {\r\n\t\t\tauto it = items->getBeginTopItem();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1566578a79253a99", - "equalIndicator/v1": "5c51ce46063d0b7bde800c839641d99ecbf776493f4be44abc2ea88ddcee2c22" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/npc/shop_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 131, - "startColumn": 38, - "charOffset": 3692, - "charLength": 19, - "snippet": { - "text": "getNumber" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 129, - "startColumn": 1, - "charOffset": 3564, - "charLength": 191, - "snippet": { - "text": "\t// shop:setStorageValue(value)\r\n\tif (const auto &shop = getUserdataShared(L, 1)) {\r\n\t\tshop->shopBlock.itemStorageValue = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "595d853127aace99", - "equalIndicator/v1": "5c60f930b6ca15338ddcbd3589b878ad58f95de7a3fcf2e195fb5eecf8fe73bc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 158, - "startColumn": 22, - "charOffset": 4788, - "charLength": 5, - "snippet": { - "text": "level" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 156, - "startColumn": 1, - "charOffset": 4547, - "charLength": 314, - "snippet": { - "text": "\t// Calculating damage\r\n\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(level, playerSkill, totalAttack, attackFactor, true) * player->getVocation()->meleeDamageMultiplier * damageModifier / 100);\r\n\tint32_t minDamage = level / 5;\r\n\tint32_t realDamage = normal_random(minDamage, maxDamage);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a2e6013d4ac299e1", - "equalIndicator/v1": "5c6d326ca21362d19151482061c55c7ba5715e604d9f4f6d7441ea0b281fe48b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')", - "markdown": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5775, - "startColumn": 94, - "charOffset": 170676, - "charLength": 8, - "snippet": { - "text": "std::max" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5773, - "startColumn": 1, - "charOffset": 170501, - "charLength": 287, - "snippet": { - "text": "\t\t\tskullDuration = std::floor(skullTicks / (24 * 60 * 60 * 1000));\r\n\t\t}\r\n\t\tclient->sendUnjustifiedPoints(dayProgress, std::max(dayMax - dayKills, 0.0), weekProgress, std::max(weekMax - weekKills, 0.0), monthProgress, std::max(monthMax - monthKills, 0.0), skullDuration);\r\n\t}\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "be91f90417619370", - "equalIndicator/v1": "5c78d6702e9ebe658f318053dfae306be382a0bfa999e87cea96a8f124ab01d9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use nullptr", - "markdown": "Use nullptr" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/mailbox/mailbox.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 93, - "startColumn": 21, - "charOffset": 2979, - "charLength": 1, - "snippet": { - "text": "0" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 91, - "startColumn": 1, - "charOffset": 2860, - "charLength": 258, - "snippet": { - "text": "\tstd::shared_ptr player = g_game().getPlayerByName(receiver, true);\r\n\tstd::string writer;\r\n\ttime_t date = time(0);\r\n\tstd::string text;\r\n\tif (item && item->getID() == ITEM_LETTER && !item->getAttribute(ItemAttribute_t::WRITER).empty()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "461c06188411a029", - "equalIndicator/v1": "5c938b2db48b413823d401cb4225b6228b8f96829a801f0870aa3f2e4ad8bed6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2139, - "startColumn": 56, - "charOffset": 72202, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2137, - "startColumn": 1, - "charOffset": 72142, - "charLength": 284, - "snippet": { - "text": "}\r\n\r\nvoid Combat::applyExtensions(std::shared_ptr caster, std::shared_ptr target, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (damage.extension || !caster || damage.primary.type == COMBAT_HEALING) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "acbf12c15dd7cb88", - "equalIndicator/v1": "5ca1238a5ab32c8c000b7f6381cfed664773e5545c91174b8911f9cc0157a02e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 158, - "startColumn": 11, - "charOffset": 5124, - "charLength": 16, - "snippet": { - "text": "getItemTypeCount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 156, - "startColumn": 1, - "charOffset": 5021, - "charLength": 365, - "snippet": { - "text": "\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::map &getAllItemTypeCount(std::map &countMap) const override final;\r\n\tstd::shared_ptr getThing(size_t index) const override final;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "24cc1db14c66aae3", - "equalIndicator/v1": "5cc1ff9a34acb68ffee90660fcc604eaab0a46f14c0941316621b54a5161b5c3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 159, - "startColumn": 41, - "charOffset": 5648, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 157, - "startColumn": 1, - "charOffset": 5602, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b61a4784d7600a59", - "equalIndicator/v1": "5cda7a9d7979e3b1f3143283d94c9b184c42fd1df821ccf2a11a97deb0c17f31" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 84, - "startColumn": 93, - "charOffset": 2410, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 82, - "startColumn": 1, - "charOffset": 2313, - "charLength": 239, - "snippet": { - "text": "}\r\n\r\nint32_t Weapon::playerWeaponCheck(std::shared_ptr player, std::shared_ptr target, uint8_t shootRange) const {\r\n\tconst Position &playerPos = player->getPosition();\r\n\tconst Position &targetPos = target->getPosition();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "714559f52c93104e", - "equalIndicator/v1": "5ce7560c77b00e66f9186a47240ec66d233c1f1adec9850b1ad57766f28bf061" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 430, - "startColumn": 7, - "charOffset": 15405, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 428, - "startColumn": 1, - "charOffset": 15393, - "charLength": 135, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPartyOnJoin - \"\r\n\t\t \"Player {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5f41033028c623a8", - "equalIndicator/v1": "5cf3fce5a3c1c3a817443bcfb8ce5eaa37ec7340613566c7d0668b5cb96964c5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 275, - "startColumn": 51, - "charOffset": 9116, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 273, - "startColumn": 1, - "charOffset": 9061, - "charLength": 209, - "snippet": { - "text": "}\r\n\r\nvoid Weapon::onUsedWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr destTile) const {\r\n\tif (!player->hasFlag(PlayerFlags_t::NotGainSkill)) {\r\n\t\tskills_t skillType;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a9ec957c5b694ad0", - "equalIndicator/v1": "5cf65364ff8514c60a8d01b5e480695d1b3fae76cf4f4fa62e17f4ebe43ff950" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 528, - "startColumn": 58, - "charOffset": 15831, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 526, - "startColumn": 1, - "charOffset": 15769, - "charLength": 147, - "snippet": { - "text": "}\r\n\r\nbool Spell::playerRuneSpellCheck(std::shared_ptr player, const Position &toPos) {\r\n\tif (!playerSpellCheck(player)) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a6fde91b62db1564", - "equalIndicator/v1": "5d313416b78f1d16c17d0397ec6cbc261040fffe083a7f0f3b51241d734072e8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'npc' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'npc' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 207, - "startColumn": 43, - "charOffset": 7549, - "charLength": 3, - "snippet": { - "text": "npc" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 205, - "startColumn": 1, - "charOffset": 7456, - "charLength": 198, - "snippet": { - "text": "\tscriptInterface.pushFunction(info.npcOnSpawn);\r\n\r\n\tLuaScriptInterface::pushUserdata(L, npc);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Npc\");\r\n\tLuaScriptInterface::pushPosition(L, position);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "87131fdb43d8a598", - "equalIndicator/v1": "5d4629b67c2ac890b1f2567415e1a5dd0823d5e027dc4975f560c88607806ad9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/trashholder.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 42, - "startColumn": 7, - "charOffset": 1814, - "charLength": 19, - "snippet": { - "text": "postAddNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 40, - "startColumn": 1, - "charOffset": 1731, - "charLength": 389, - "snippet": { - "text": "\tvoid removeThing(std::shared_ptr thing, uint32_t count) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n};\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "01e2500a2a4419da", - "equalIndicator/v1": "5d64718d3d308cae387fca582e8ff33de395c23867faeb4e6ffede8fe7e45158" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use range-based for loop instead", - "markdown": "Use range-based for loop instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocol.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 164, - "startColumn": 3, - "charOffset": 5315, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 162, - "startColumn": 1, - "charOffset": 5228, - "charLength": 302, - "snippet": { - "text": "\t\tstd::array vData = {};\r\n\t\tmemcpy(vData.data(), buffer + readPos, 8);\r\n\t\tfor (int32_t i = 0; i < 32; ++i) {\r\n\t\t\tvData[1] -= ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][0];\r\n\t\t\tvData[0] -= ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][1];\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3cc5033a483ebe94", - "equalIndicator/v1": "5db637c497f3a565509ec8b17a84de29413e8d864f0650026bcf8deadb7db22d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2130, - "startColumn": 2, - "charOffset": 65492, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2128, - "startColumn": 1, - "charOffset": 65385, - "charLength": 218, - "snippet": { - "text": "\tHighscoreType_t type = static_cast(msg.getByte());\r\n\tuint8_t category = msg.getByte();\r\n\tuint32_t vocation = msg.get();\r\n\tuint16_t page = 1;\r\n\tconst std::string worldName = msg.getString();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0bbe46ded7c3b69e", - "equalIndicator/v1": "5dc09ce09ec2a7dd630ff4ae9636caec23ab9bcba6deaa889dc344876fe2cb04" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Repeated branch body in conditional chain", - "markdown": "Repeated branch body in conditional chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3262, - "startColumn": 68, - "charOffset": 98583, - "charLength": 1, - "snippet": { - "text": "{" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3260, - "startColumn": 1, - "charOffset": 98415, - "charLength": 274, - "snippet": { - "text": "\t\t\t\tif (rightItem->getSlotPosition() & SLOTP_TWO_HAND) {\r\n\t\t\t\t\tret = RETURNVALUE_DROPTWOHANDEDITEM;\r\n\t\t\t\t} else if (item == rightItem && count == item->getItemCount()) {\r\n\t\t\t\t\tret = RETURNVALUE_NOERROR;\r\n\t\t\t\t} else if (rightType == WEAPON_SHIELD && type == WEAPON_SHIELD) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fc6101b8053de2ae", - "equalIndicator/v1": "5dd76a9f2c0f68c2ed54c4fb96043a054e20bc72dc5c91ad14767bb7be812711" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 558, - "startColumn": 21, - "charOffset": 26189, - "charLength": 18, - "snippet": { - "text": "\"absorbpercentall\"" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 556, - "startColumn": 1, - "charOffset": 26002, - "charLength": 324, - "snippet": { - "text": "void ItemParse::parseAbsorbPercent(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\r\n\tstd::string stringValue = tmpStrValue;\r\n\tif (stringValue == \"absorbpercentall\") {\r\n\t\tint16_t value = pugi::cast(valueAttribute.value());\r\n\t\tAbilities &abilities = itemType.getAbilities();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "25b4e7f59c509397", - "equalIndicator/v1": "5dea9402bfce0478cca11e0fa06c8176492402a6fe12deea564b310f139e20c8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 348, - "startColumn": 10, - "charOffset": 11473, - "charLength": 6, - "snippet": { - "text": "health" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 346, - "startColumn": 1, - "charOffset": 11372, - "charLength": 115, - "snippet": { - "text": "int32_t Weapon::getHealthCost(std::shared_ptr player) const {\r\n\tif (health != 0) {\r\n\t\treturn health;\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "66a5502140160188", - "equalIndicator/v1": "5e271821c5cbada739c1a1f3f4ec9f31b3b6fbf0367a7e25160239237b4f32e3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/player_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2333, - "startColumn": 26, - "charOffset": 80962, - "charLength": 10, - "snippet": { - "text": "std::round" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2331, - "startColumn": 1, - "charOffset": 80848, - "charLength": 272, - "snippet": { - "text": "\tint32_t damageBonus = 0;\r\n\tuint8_t stage = getStage(WheelStage_t::EXECUTIONERS_THROW);\r\n\tint32_t healthPercent = std::round((static_cast(target->getHealth()) * 100) / static_cast(target->getMaxHealth()));\r\n\tif (healthPercent <= 30) {\r\n\t\tif (stage >= 3) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "00a35cc4c78e6eaa", - "equalIndicator/v1": "5e33e0522d72bd08fbc66407c0fb17ebb84cd13b00c7900bc016c0103094e1d7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/spawns/spawn_monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 363, - "startColumn": 59, - "charOffset": 12462, - "charLength": 7, - "snippet": { - "text": "monster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 361, - "startColumn": 1, - "charOffset": 12399, - "charLength": 155, - "snippet": { - "text": "}\r\n\r\nvoid SpawnMonster::removeMonster(std::shared_ptr monster) {\r\n\tuint32_t spawnMonsterId = 0;\r\n\tfor (const auto &[id, m] : spawnedMonsterMap) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "85aa61d5e2592161", - "equalIndicator/v1": "5e4868fd5fef5f377f87c78d31c2dc6b0c3ca2b6b478d845e191bb5ac6ce519c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/rewards/rewardchest.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 29, - "startColumn": 19, - "charOffset": 836, - "charLength": 19, - "snippet": { - "text": "postAddNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 27, - "startColumn": 1, - "charOffset": 813, - "charLength": 204, - "snippet": { - "text": "}\r\n\r\nvoid RewardChest::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tauto parentLocked = m_parent.lock();\r\n\tif (parentLocked) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2e48c612f0b775fc", - "equalIndicator/v1": "5e716f4e38df88babeedee396b16ea1433fac8367121fde8a5d984422e1ce999" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'tradePartner' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'tradePartner' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4899, - "startColumn": 87, - "charOffset": 175188, - "charLength": 12, - "snippet": { - "text": "tradePartner" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4897, - "startColumn": 1, - "charOffset": 175097, - "charLength": 332, - "snippet": { - "text": "}\r\n\r\nbool Game::internalStartTrade(std::shared_ptr player, std::shared_ptr tradePartner, std::shared_ptr tradeItem) {\r\n\tif (player->tradeState != TRADE_NONE && !(player->tradeState == TRADE_ACKNOWLEDGE && player->tradePartner == tradePartner)) {\r\n\t\tplayer->sendCancelMessage(RETURNVALUE_YOUAREALREADYTRADING);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "01ceb3071fb2756e", - "equalIndicator/v1": "5e881fc856c76a51f8def15f9949b43d9e7ff1294460c45bdc417a871c3c23b2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 676, - "startColumn": 15, - "charOffset": 22144, - "charLength": 11, - "snippet": { - "text": "static_cast" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 674, - "startColumn": 1, - "charOffset": 22104, - "charLength": 134, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 104) * 0.70f) + 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6fa18c5ab6b9767b", - "equalIndicator/v1": "5e8ad01bb254b49d4eac340fb102d00ac32583d6611de4d43613d9531e14130f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly", - "markdown": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/canary_server.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 103, - "startColumn": 60, - "charOffset": 3494, - "charLength": 12, - "snippet": { - "text": "__FUNCTION__" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 101, - "startColumn": 1, - "charOffset": 3350, - "charLength": 265, - "snippet": { - "text": "\t\t\t\tg_game().start(&serviceManager);\r\n\t\t\t\tg_game().setGameState(GAME_STATE_NORMAL);\r\n\t\t\t\tif (g_configManager().getBoolean(TOGGLE_MAINTAIN_MODE, __FUNCTION__)) {\r\n\t\t\t\t\tg_game().setGameState(GAME_STATE_CLOSED);\r\n\t\t\t\t\tg_logger().warn(\"Initialized in maintain mode!\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5974bec543f47942", - "equalIndicator/v1": "5e8b07f12ef5ccd8716ab1fc1bf49a79db091538dfddd759d9287b48d2b977d1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 42, - "startColumn": 14, - "charOffset": 1401, - "charLength": 5, - "snippet": { - "text": "mType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 40, - "startColumn": 1, - "charOffset": 1297, - "charLength": 271, - "snippet": { - "text": "\tskull = mType->info.skull;\r\n\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();\r\n\tbaseSpeed = mType->getBaseSpeed();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1a000597b7acfff3", - "equalIndicator/v1": "5ea5ed13adfb6430f83d0fe2a6851ce53270f017dc9615305986aa0b5798e770" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Std::move of the const variable 'name' has no effect; remove std::move() or make the variable non-const", - "markdown": "Std::move of the const variable 'name' has no effect; remove std::move() or make the variable non-const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/vip/player_vip.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 24, - "startColumn": 16, - "charOffset": 711, - "charLength": 9, - "snippet": { - "text": "std::move" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 22, - "startColumn": 1, - "charOffset": 603, - "charLength": 180, - "snippet": { - "text": "\tVIPGroup() = default;\r\n\tVIPGroup(uint8_t id, const std::string &name, bool customizable) :\r\n\t\tid(id), name(std::move(name)), customizable(customizable) { }\r\n};\r\nclass PlayerVIP {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "82e6b203885f7edc", - "equalIndicator/v1": "5eafc660cf0da056db5d9e91a5941fe6f5a78a854402fe62eacb91b06990b0f6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Prefer a lambda to std::bind", - "markdown": "Prefer a lambda to std::bind" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/io_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 119, - "startColumn": 10, - "charOffset": 5112, - "charLength": 9, - "snippet": { - "text": "std::bind" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 117, - "startColumn": 1, - "charOffset": 4996, - "charLength": 243, - "snippet": { - "text": "\ttemplate \r\n\tauto bindMapFunction(Object object, Function function) {\r\n\t\treturn std::bind(function, object, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "075589323943450d", - "equalIndicator/v1": "5ec30f00bfc14cf6c36dae207e35a2eb4101e0205392b4587e4564ab2a0ce6b9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 154, - "startColumn": 62, - "charOffset": 4663, - "charLength": 6, - "snippet": { - "text": "action" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 152, - "startColumn": 1, - "charOffset": 4597, - "charLength": 252, - "snippet": { - "text": "}\r\n\r\nbool Actions::registerLuaEvent(const std::shared_ptr action) {\r\n\t// Call all register lua events\r\n\tif (registerLuaItemEvent(action) || registerLuaUniqueEvent(action) || registerLuaActionEvent(action) || registerLuaPositionEvent(action)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5e08bd123bd5ad60", - "equalIndicator/v1": "5edd3768b06a64a21012b33890f9aff3a0194ff1f4fc88a48115cf8b4f51ef32" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1214, - "startColumn": 26, - "charOffset": 33839, - "charLength": 8, - "snippet": { - "text": "manaGain" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1212, - "startColumn": 1, - "charOffset": 33726, - "charLength": 135, - "snippet": { - "text": "\t\t\t\tcreature->changeMana(manaGain * 2); // Double regen from daily reward\r\n\t\t\t} else {\r\n\t\t\t\tcreature->changeMana(manaGain);\r\n\t\t\t}\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c75b3b7ba023df7c", - "equalIndicator/v1": "5ee132f93395ec86c09c21085e6346ff964d4775dd1d3e2802de290529a46be2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iobestiary.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 353, - "startColumn": 2, - "charOffset": 11636, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 351, - "startColumn": 1, - "charOffset": 11607, - "charLength": 152, - "snippet": { - "text": "\t\tdefaultMap[i] = 100;\r\n\t}\r\n\tfor (const auto &elementEntry : mtype->info.elementMap) {\r\n\t\tswitch (elementEntry.first) {\r\n\t\t\tcase COMBAT_PHYSICALDAMAGE:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "884b5fd8d98f62c2", - "equalIndicator/v1": "5ee6929428dfe6f598af707156a590976005eb4252f2b42975554d10127de848" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6551, - "startColumn": 27, - "charOffset": 226117, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6549, - "startColumn": 1, - "charOffset": 226014, - "charLength": 276, - "snippet": { - "text": "\t\t\tdamage.primary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\r\n\t\t}\r\n\t\tdamage.primary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\r\n\r\n\t\tprimaryBlockType = target->blockHit(attacker, damage.primary.type, damage.primary.value, checkDefense, checkArmor, field);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "411c88700f8dc530", - "equalIndicator/v1": "5f139cfb3400b3110ad4e8fe13befb8ed002004c74755e6929ad66bdb3bb9d32" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 768, - "startColumn": 91, - "charOffset": 27588, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 766, - "startColumn": 1, - "charOffset": 27493, - "charLength": 449, - "snippet": { - "text": "}\r\n\r\nvoid Events::eventPlayerOnItemMoved(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) {\r\n\t// Player:onItemMoved(item, count, fromPosition, toPosition) or Player.onItemMoved(self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)\r\n\tif (info.playerOnItemMoved == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "033bf62988316347", - "equalIndicator/v1": "5f171d62e3dbd69d821ae2d1fd78cea95fe87e7a510103d4b09ebe8a97bfc3cf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 10301, - "startColumn": 57, - "charOffset": 358021, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 10299, - "startColumn": 1, - "charOffset": 357960, - "charLength": 169, - "snippet": { - "text": "}\r\n\r\nvoid Game::addPlayerUniqueLogin(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().error(\"Attempted to add null player to unique player names list\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "aa1e9b0c4c33d8b1", - "equalIndicator/v1": "5f48af9c42c39bce29aef073e50beb8a751fab0f3f3b745da4d895ab5e2fc801" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Annotate this function with 'override' or (rarely) 'final'", - "markdown": "Annotate this function with 'override' or (rarely) 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/kv.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 95, - "startColumn": 34, - "charOffset": 2902, - "charLength": 4, - "snippet": { - "text": "keys" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 93, - "startColumn": 1, - "charOffset": 2796, - "charLength": 158, - "snippet": { - "text": "\r\n\tstd::shared_ptr scoped(const std::string &scope) override final;\r\n\tstd::unordered_set keys(const std::string &prefix = \"\");\r\n\r\nprotected:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dab161a9d384b6b8", - "equalIndicator/v1": "5f59051439d0f8672cfa2050bf5ad45083c84ba11bea42437e8daec47933c17d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1737, - "startColumn": 2, - "charOffset": 52227, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1735, - "startColumn": 1, - "charOffset": 52122, - "charLength": 229, - "snippet": { - "text": "void ProtocolGame::parseUseWithCreature(NetworkMessage &msg) {\r\n\tPosition fromPos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t fromStackPos = msg.getByte();\r\n\tuint32_t creatureId = msg.get();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8df6d111baae344d", - "equalIndicator/v1": "5f602e9541fefbda96a5132e4bebc79b11056ee560f65ce191c626d65db0728a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3229, - "startColumn": 64, - "charOffset": 99044, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3227, - "startColumn": 1, - "charOffset": 98976, - "charLength": 118, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureLight(std::shared_ptr creature) {\r\n\tif (!canSee(creature)) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "67a887fa15511b0d", - "equalIndicator/v1": "5f7c197508078ac1bbc9152324a5441cba87ab64eeef1c5f408e0ed5fc1b3165" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 977, - "startColumn": 46, - "charOffset": 37274, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 975, - "startColumn": 1, - "charOffset": 37174, - "charLength": 164, - "snippet": { - "text": "\tgetScriptInterface()->pushFunction(getScriptId());\r\n\r\n\tLuaScriptInterface::pushUserdata(L, player);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "23767fcf4ca26818", - "equalIndicator/v1": "5f7f621e276d0d645feea8fbc7b99c110f4d83ea77d37b699d2cc67cac752bcc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'operator bool' must be marked explicit to avoid unintentional implicit conversions", - "markdown": "'operator bool' must be marked explicit to avoid unintentional implicit conversions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/value_wrapper.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 104, - "startColumn": 27, - "charOffset": 3141, - "charLength": 4, - "snippet": { - "text": "bool" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 102, - "startColumn": 1, - "charOffset": 3109, - "charLength": 81, - "snippet": { - "text": "\t}\r\n\r\n\texplicit(false) operator bool() const {\r\n\t\treturn get();\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0b685ed19ba323f3", - "equalIndicator/v1": "5f8aeec9169d9500d8c48cc8508719cec0b2bb310174ba6a2e9cef88d8f9e52b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/depot/depotchest.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 24, - "startColumn": 14, - "charOffset": 676, - "charLength": 8, - "snippet": { - "text": "queryAdd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 22, - "startColumn": 1, - "charOffset": 631, - "charLength": 346, - "snippet": { - "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f4a56ce7b5153fe3", - "equalIndicator/v1": "5f8d6d63a65ff2ff1e325da4a3fdd25d2e710600319c3779425c9e668baf9200" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 855, - "startColumn": 68, - "charOffset": 27889, - "charLength": 1, - "snippet": { - "text": "," - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 853, - "startColumn": 1, - "charOffset": 27817, - "charLength": 178, - "snippet": { - "text": "}\r\n\r\nstd::shared_ptr Creature::getCorpse(std::shared_ptr, std::shared_ptr) {\r\n\tif (getLookCorpse() != 0) {\r\n\t\treturn Item::CreateItem(getLookCorpse());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a7b9c0fe0b77850c", - "equalIndicator/v1": "5fa868c14c210b2dff6e13eedd618ef9dbd5f2eba4edbaab4e86ca1da00af50b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1703, - "startColumn": 2, - "charOffset": 50959, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1701, - "startColumn": 1, - "charOffset": 50863, - "charLength": 274, - "snippet": { - "text": "void ProtocolGame::parseApplyImbuement(NetworkMessage &msg) {\r\n\tuint8_t slot = msg.getByte();\r\n\tuint32_t imbuementId = msg.get();\r\n\tbool protectionCharm = msg.getByte() != 0x00;\r\n\tg_game().playerApplyImbuement(player->getID(), imbuementId, slot, protectionCharm);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5001c13c992f75d2", - "equalIndicator/v1": "5fcbb1f50494c625d7f3401c3021e3711b7fb9d5685fbac777250c46da8dc6ce" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/npcs/npc.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 445, - "startColumn": 53, - "charOffset": 15378, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 443, - "startColumn": 1, - "charOffset": 15321, - "charLength": 129, - "snippet": { - "text": "}\r\n\r\nvoid Npc::onPlayerCheckItem(std::shared_ptr player, uint16_t itemId, uint8_t subType) {\r\n\tif (!player) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e634b5104a6f9936", - "equalIndicator/v1": "5fd04a5170c6834d027f664afd76bb531c7e636a7f9eebe954a4cc8f329662ee" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'getRequiredMagLevel' can be made const", - "markdown": "Method 'getRequiredMagLevel' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 226, - "startColumn": 11, - "charOffset": 7282, - "charLength": 19, - "snippet": { - "text": "getRequiredMagLevel" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 224, - "startColumn": 1, - "charOffset": 7247, - "charLength": 86, - "snippet": { - "text": "\t\treqLevel = level;\r\n\t}\r\n\tuint32_t getRequiredMagLevel() {\r\n\t\treturn reqMagLevel;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8bc739743ff40182", - "equalIndicator/v1": "5fdaf9bb6d1ed5223dd438ea7c17006d46e705549fd8c1cb284b064a507ebf05" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3059, - "startColumn": 2, - "charOffset": 93274, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3057, - "startColumn": 1, - "charOffset": 93213, - "charLength": 160, - "snippet": { - "text": "\r\nvoid ProtocolGame::parseJoinParty(NetworkMessage &msg) {\r\n\tuint32_t targetId = msg.get();\r\n\tg_game().playerJoinParty(player->getID(), targetId);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7fff02fa252615cc", - "equalIndicator/v1": "60068b6900671db7f82033ab58a3f7c0b1b6bec38ae9e4a438eea8292b26edb2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/player_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 596, - "startColumn": 3, - "charOffset": 16463, - "charLength": 22, - "snippet": { - "text": "pushBoolean(L, false);" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 594, - "startColumn": 1, - "charOffset": 16376, - "charLength": 185, - "snippet": { - "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (!player) {\r\n\t\tpushBoolean(L, false);\r\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\r\n\t\treturn 1;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ad99aff36d5850c5", - "equalIndicator/v1": "601312e4b8aa0b9eb4ab285db759ad778721d2a2ad6afac119617ffe7cb14ee0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'", - "markdown": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 25, - "startColumn": 11, - "charOffset": 884, - "charLength": 9, - "snippet": { - "text": "Condition" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 23, - "startColumn": 1, - "charOffset": 706, - "charLength": 270, - "snippet": { - "text": "\t\tendTime(initTicks == -1 ? std::numeric_limits::max() : 0),\r\n\t\tsubId(initSubId), ticks(initTicks), conditionType(initType), id(initId), isBuff(initBuff) { }\r\n\tvirtual ~Condition() = default;\r\n\r\n\tvirtual bool startCondition(std::shared_ptr creature);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "feb21b329c228042", - "equalIndicator/v1": "60459eb08506edff7836e9fab512709685a454b1fab03e54922c6d4955870257" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 466, - "startColumn": 57, - "charOffset": 14277, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 464, - "startColumn": 1, - "charOffset": 14216, - "charLength": 124, - "snippet": { - "text": "}\r\n\r\nvoid Monster::onCreatureLeave(std::shared_ptr creature) {\r\n\t// update friendList\r\n\tif (isFriend(creature)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fa029a7b7eaf2a41", - "equalIndicator/v1": "604d1e4275f64810e30056ace2cec2fc60a9ef5e7fe761e012013b2c84e12965" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'destination' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'destination' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/bank/bank.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 153, - "startColumn": 48, - "charOffset": 4066, - "charLength": 11, - "snippet": { - "text": "destination" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 151, - "startColumn": 1, - "charOffset": 4014, - "charLength": 123, - "snippet": { - "text": "}\r\n\r\nbool Bank::deposit(const std::shared_ptr destination, uint64_t amount) {\r\n\tif (!destination) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b7e62e6ffbe62d44", - "equalIndicator/v1": "6088d5f3dffb7f0a151bf70d36c6e0ae076f29f4832af373ba8abc7830e6ef94" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6683, - "startColumn": 81, - "charOffset": 232142, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6681, - "startColumn": 1, - "charOffset": 232057, - "charLength": 190, - "snippet": { - "text": "}\r\n\r\nvoid Game::combatGetTypeInfo(CombatType_t combatType, std::shared_ptr target, TextColor_t &color, uint16_t &effect) {\r\n\tswitch (combatType) {\r\n\t\tcase COMBAT_PHYSICALDAMAGE: {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e458f051e837b85c", - "equalIndicator/v1": "608f62f14405fa2e55252ee82f4d888e33e4fcdde3e4521f9c8828b948974c14" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 425, - "startColumn": 14, - "charOffset": 11447, - "charLength": 8, - "snippet": { - "text": "tileItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 423, - "startColumn": 1, - "charOffset": 11399, - "charLength": 189, - "snippet": { - "text": "\r\n\t\t\t// Clear any existing carpet\r\n\t\t\tfor (auto tileItem : *tile->getItemList()) {\r\n\t\t\t\tif (tileItem && tileItem->isCarpet()) {\r\n\t\t\t\t\ttile->removeThing(tileItem, tileItem->getItemCount());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c22fc65a9ca6c549", - "equalIndicator/v1": "60a626baa27ba3b5650a1f40bdb4b664aa7b4b0be7092cd615809be8e6c36494" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2441, - "startColumn": 14, - "charOffset": 72674, - "charLength": 8, - "snippet": { - "text": "vocation" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2439, - "startColumn": 1, - "charOffset": 72609, - "charLength": 165, - "snippet": { - "text": "\t\t} else {\r\n\t\t\thealthMax += vocation->getHPGain();\r\n\t\t\thealth += vocation->getHPGain();\r\n\t\t\tmanaMax += vocation->getManaGain();\r\n\t\t\tmana += vocation->getManaGain();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "71f53e333ac376f2", - "equalIndicator/v1": "60b8394a865085491098a3b42ddee4e37c77d559cdedf7ab286c54bab407b7b9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 30, - "startColumn": 66, - "charOffset": 930, - "charLength": 6, - "snippet": { - "text": "action" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 28, - "startColumn": 1, - "charOffset": 860, - "charLength": 160, - "snippet": { - "text": "}\r\n\r\nbool Actions::registerLuaItemEvent(const std::shared_ptr action) {\r\n\tauto itemIdVector = action->getItemIdsVector();\r\n\tif (itemIdVector.empty()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a7ecf1a8adf3f4e5", - "equalIndicator/v1": "60bdc476dc489cbec0b73e040cfa2d033665d5c502f181e30e1d056bf9678c8c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iologindata.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 104, - "startColumn": 20, - "charOffset": 3876, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 102, - "startColumn": 1, - "charOffset": 3750, - "charLength": 191, - "snippet": { - "text": "\tstd::ostringstream query;\r\n\tquery << \"SELECT * FROM `players` WHERE `name` = \" << db.escapeString(name);\r\n\treturn loadPlayer(player, db.storeQuery(query.str()), disableIrrelevantInfo);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cd189b7ceae309ef", - "equalIndicator/v1": "60ddb91c95014c54593fb33ddff7d55894c4c884c587592e8ccd7f75efae5f72" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1191, - "startColumn": 98, - "charOffset": 45386, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1189, - "startColumn": 1, - "charOffset": 45284, - "charLength": 235, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::zoneAfterCreatureEnter(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneAfterCreatureEnter - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5d800900ddc8e40d", - "equalIndicator/v1": "60f201a0227e516171e50331df680f5d893db99e74f58b5eda4b1bb2139bd64e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 686, - "startColumn": 55, - "charOffset": 22249, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 684, - "startColumn": 1, - "charOffset": 22190, - "charLength": 234, - "snippet": { - "text": "}\r\n\r\nvoid Combat::CombatManaFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\r\n\tif (!data) {\r\n\t\tg_logger().error(\"[{}]: CombatDamage is nullptr\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5c3f23a9100f0f51", - "equalIndicator/v1": "610476bbd76f8ace6b70073f8398d5d82980b7dead60a0105b931b274ea64f1b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Redundant call to 'data'", - "markdown": "Redundant call to 'data'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1273, - "startColumn": 5, - "charOffset": 57484, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1271, - "startColumn": 1, - "charOffset": 57330, - "charLength": 320, - "snippet": { - "text": "\t\t\t\tg_logger().trace(\"Registering moveevent for item id '{}', name '{}'\", itemType.id, itemType.name);\r\n\t\t\t\tMoveEvent_t eventType = MOVE_EVENT_NONE;\r\n\t\t\t\tfor (auto subAttributeNode : attributeNode.children()) {\r\n\t\t\t\t\tpugi::xml_attribute subKeyAttribute = subAttributeNode.attribute(\"key\");\r\n\t\t\t\t\tif (!subKeyAttribute) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6031dbbfe20f504f", - "equalIndicator/v1": "610da8d1b4729f5e1512fcc63363b4051c5f4839b2f67daf52c99ebc11d4e532" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 426, - "startColumn": 8, - "charOffset": 10607, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 424, - "startColumn": 1, - "charOffset": 10515, - "charLength": 205, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetArmor(lua_State* L) {\r\n\t// itemType:getArmor()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->armor);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "75ccd23fa082cc15", - "equalIndicator/v1": "611a8f8f5b05f4d719539d09b751e222671044fb0d41ee3f627ef8a3156aa1b8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7732, - "startColumn": 4, - "charOffset": 242584, - "charLength": 8, - "snippet": { - "text": "skills_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7730, - "startColumn": 1, - "charOffset": 242519, - "charLength": 270, - "snippet": { - "text": "\r\n\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; ++i) {\r\n\t\t\tskills_t skill = static_cast(i);\r\n\t\t\tmsg.add(std::min(player->getSkillLevel(skill), std::numeric_limits::max()));\r\n\t\t\tmsg.add(player->getBaseSkill(skill));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "325919b45a3144f9", - "equalIndicator/v1": "611cb9fe224446f3edb7bbf2028b25fe25432202e97c56eedf46f666c5ad36eb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 797, - "startColumn": 122, - "charOffset": 26081, - "charLength": 4, - "snippet": { - "text": "tile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 795, - "startColumn": 1, - "charOffset": 25955, - "charLength": 226, - "snippet": { - "text": "}\r\n\r\nvoid Combat::combatTileEffects(const CreatureVector &spectators, std::shared_ptr caster, std::shared_ptr tile, const CombatParams ¶ms) {\r\n\tif (params.itemId != 0) {\r\n\t\tuint16_t itemId = params.itemId;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fd3cb6d56e4bfc6f", - "equalIndicator/v1": "612ef6bc060a45c757486553e64fdc7323bb069b289b5ad7d11bcbf65c68b0d8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6499, - "startColumn": 15, - "charOffset": 204824, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6497, - "startColumn": 1, - "charOffset": 204739, - "charLength": 123, - "snippet": { - "text": "\tmsg.addPosition(pos);\r\n\tmsg.addByte(static_cast(stackpos));\r\n\tAddItem(msg, item);\r\n\twriteToOutputBuffer(msg);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3595a8c0925ec4cc", - "equalIndicator/v1": "614b8cfbee3c6c2fda954411cfda4e6c68bda03cfa4b8bdc8f5e253a38d397b7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to 'float'", - "markdown": "Narrowing conversion from 'int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/global_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 49, - "startColumn": 75, - "charOffset": 1945, - "charLength": 2, - "snippet": { - "text": "it" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 47, - "startColumn": 1, - "charOffset": 1816, - "charLength": 176, - "snippet": { - "text": "\t} else if (it.hasSubType()) {\r\n\t\tif (it.stackable) {\r\n\t\t\titemCount = static_cast(std::ceil(static_cast(count) / it.stackSize));\r\n\t\t} else {\r\n\t\t\titemCount = 1;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c4a9f33062e5885a", - "equalIndicator/v1": "61b3427b41826f249481ff29d8900852d6b6f59c1764a02b4611bd0c86c483d4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::list>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'std::list\\>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/map/house_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 355, - "startColumn": 21, - "charOffset": 9497, - "charLength": 5, - "snippet": { - "text": "house" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 353, - "startColumn": 1, - "charOffset": 9391, - "charLength": 163, - "snippet": { - "text": "\t// house:getTileCount()\r\n\tif (const auto &house = getUserdataShared(L, 1)) {\r\n\t\tlua_pushnumber(L, house->getTiles().size());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fc88169d29319524", - "equalIndicator/v1": "61b9c9e6f61dcfb58e60061047ce811acfddc96b14a0f4cb288d177402f1f428" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6841, - "startColumn": 27, - "charOffset": 236754, - "charLength": 10, - "snippet": { - "text": "std::round" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6839, - "startColumn": 1, - "charOffset": 236645, - "charLength": 172, - "snippet": { - "text": "\r\n\tdamage.primary.value = std::round(damage.primary.value * pvpDamageMultiplier);\r\n\tdamage.secondary.value = std::round(damage.secondary.value * pvpDamageMultiplier);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "20fb2ba04a2faf95", - "equalIndicator/v1": "61e0598f04ab91cec4f4053e32fa3b58c1f4e7251cb1d9983af68a8d942cdcac" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 134, - "startColumn": 48, - "charOffset": 3613, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 132, - "startColumn": 1, - "charOffset": 3561, - "charLength": 244, - "snippet": { - "text": "}\r\n\r\nbool Weapon::useWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target) const {\r\n\tint32_t damageModifier = playerWeaponCheck(player, target, item->getShootRange());\r\n\tif (damageModifier == 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ef427fa975c108f0", - "equalIndicator/v1": "61e3d4aed705f58716c7aa373299e44e0d92460030660afad28a6302a49b0cbf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8058, - "startColumn": 57, - "charOffset": 280512, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8056, - "startColumn": 1, - "charOffset": 280451, - "charLength": 103, - "snippet": { - "text": "}\r\n\r\nvoid Game::updateCreatureType(std::shared_ptr creature) {\r\n\tif (!creature) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "47469ec5f293645f", - "equalIndicator/v1": "61faf6b8a9da4f2535fe93a6f904e4589292bff66f10e4d5b59517dc9e5b0238" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 187, - "startColumn": 35, - "charOffset": 5884, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 185, - "startColumn": 1, - "charOffset": 5765, - "charLength": 167, - "snippet": { - "text": "\tconst std::shared_ptr action = getAction(item);\r\n\tif (action != nullptr) {\r\n\t\treturn action->canExecuteAction(player, pos);\r\n\t}\r\n\treturn RETURNVALUE_NOERROR;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "06a87daa8f3a43f3", - "equalIndicator/v1": "6208c2e630ac4fdd24fa68ce42bfdb27c752a357c42247f4f5925035d65db60d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'event' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'event' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 114, - "startColumn": 24, - "charOffset": 3493, - "charLength": 32, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 112, - "startColumn": 1, - "charOffset": 3318, - "charLength": 256, - "snippet": { - "text": "\tbool registerLuaUniqueEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaPositionEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaEvent(const std::shared_ptr event);\r\n\tvoid clear(bool isFromXML = false);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "34c46a800c87b9d2", - "equalIndicator/v1": "621acc01d547ae20e20dfe8189c369e9a4788b2f2bc67d12d39139e2e0452336" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'onAddTileItem' is within a recursive call chain", - "markdown": "Function 'onAddTileItem' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 365, - "startColumn": 12, - "charOffset": 9527, - "charLength": 13, - "snippet": { - "text": "onAddTileItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 363, - "startColumn": 1, - "charOffset": 9511, - "charLength": 310, - "snippet": { - "text": "}\r\n\r\nvoid Tile::onAddTileItem(std::shared_ptr item) {\r\n\tif ((item->hasProperty(CONST_PROP_MOVABLE) || item->getContainer()) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) {\r\n\t\tauto it = g_game().browseFields.find(static_self_cast());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ea8a20c2903808e7", - "equalIndicator/v1": "622af232721de89a3d242e85c76f631713327eeac9be8fa4c943bc4a6d60f204" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7125, - "startColumn": 28, - "charOffset": 247949, - "charLength": 8, - "snippet": { - "text": "attacker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7123, - "startColumn": 1, - "charOffset": 247825, - "charLength": 247, - "snippet": { - "text": "\t\t}\r\n\t\tif (damage.origin != ORIGIN_NONE && attacker && damage.primary.type != COMBAT_HEALING) {\r\n\t\t\tdamage.primary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\r\n\t\t\tdamage.secondary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a39caca97332c725", - "equalIndicator/v1": "622b825394b72d1559cb74921c8f028358733c8d9bc24581c1a1043f8dc491a4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 210, - "startColumn": 14, - "charOffset": 5852, - "charLength": 8, - "snippet": { - "text": "queryAdd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 208, - "startColumn": 1, - "charOffset": 5807, - "charLength": 496, - "snippet": { - "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t tileFlags, std::shared_ptr actor = nullptr) override;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d7091fa8cbab5ce1", - "equalIndicator/v1": "623d49786c914b39e5b7f66eeba76b02fe8651c12b49cc3d53870203b1078f07" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1742, - "startColumn": 7, - "charOffset": 52078, - "charLength": 22, - "snippet": { - "text": "postRemoveNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1740, - "startColumn": 1, - "charOffset": 51917, - "charLength": 349, - "snippet": { - "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r\n\tvoid setNextAction(int64_t time) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "535afdc80427174f", - "equalIndicator/v1": "62429fd451a9008ab5d0ca959d18bf3790b7ef12ed356848e0fea50e5baeb121" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')", - "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6091, - "startColumn": 17, - "charOffset": 179196, - "charLength": 23, - "snippet": { - "text": "Player::getPercentLevel" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6089, - "startColumn": 1, - "charOffset": 179119, - "charLength": 245, - "snippet": { - "text": "\t\tuint8_t newPercent;\r\n\t\tif (nextReqTries > currReqTries) {\r\n\t\t\tnewPercent = Player::getPercentLevel(skills[skill].tries, nextReqTries);\r\n\t\t\tnewPercentToNextLevel = static_cast(skills[skill].tries * 100) / nextReqTries;\r\n\t\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ed87edbb6b75c7d5", - "equalIndicator/v1": "624bc5b04cd6748b63e6c08538831f7e8a4c3499adf15e40f57726b226f2c388" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 150, - "startColumn": 65, - "charOffset": 4379, - "charLength": 9, - "snippet": { - "text": "moveEvent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 148, - "startColumn": 1, - "charOffset": 4310, - "charLength": 214, - "snippet": { - "text": "}\r\n\r\nbool MoveEvents::registerEvent(const std::shared_ptr moveEvent, int32_t id, std::map &moveListMap) const {\r\n\tauto it = moveListMap.find(id);\r\n\tif (it == moveListMap.end()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "910bb614443cd8d2", - "equalIndicator/v1": "6292fbe56f9cac23e46f5e4129943514c668b0f5dba1557f8d705ae9fa0aef47" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 702, - "startColumn": 19, - "charOffset": 21598, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 700, - "startColumn": 1, - "charOffset": 21516, - "charLength": 131, - "snippet": { - "text": "\titem->setParent(getContainer());\r\n\titemlist.push_front(item);\r\n\tupdateItemWeight(item->getWeight());\r\n\r\n\t// send change to client\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e6cab6e1702e0d28", - "equalIndicator/v1": "62aa4df65b73c79f1c3ba926fffc9bfb6a169254d06fea2423a11f8d32456f1c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 965, - "startColumn": 94, - "charOffset": 36790, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 963, - "startColumn": 1, - "charOffset": 36692, - "charLength": 252, - "snippet": { - "text": "}\r\n\r\nbool EventCallback::playerOnRotateItem(std::shared_ptr player, std::shared_ptr item, const Position &position) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[{}] Call stack overflow\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0c444fd3ba049e45", - "equalIndicator/v1": "62bbbf3ec854ca29acc341e41f6423ee2d6008c05afdb2a4e2cb9bb36fba0da6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 846, - "startColumn": 30, - "charOffset": 25364, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 844, - "startColumn": 1, - "charOffset": 25319, - "charLength": 105, - "snippet": { - "text": "\t\t}\r\n\t} else {\r\n\t\tfor (std::shared_ptr item : itemlist) {\r\n\t\t\tcontainerItems.push_back(item);\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ea13ec6c8ae984f9", - "equalIndicator/v1": "62dec7587f0d7e881ebde29d6bf1e89ea7124cba43d88088096ea062d472e030" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 143, - "startColumn": 14, - "charOffset": 4184, - "charLength": 11, - "snippet": { - "text": "queryRemove" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 141, - "startColumn": 1, - "charOffset": 3850, - "charLength": 640, - "snippet": { - "text": "\tvirtual ReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override final;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override final;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d297ee665198d08d", - "equalIndicator/v1": "62ed387182897e375f5f9aa111470cdfc7fbb87fc62fe2d5924453d6cb8ec006" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8462, - "startColumn": 4, - "charOffset": 267899, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8460, - "startColumn": 1, - "charOffset": 267851, - "charLength": 167, - "snippet": { - "text": "\t\t}\r\n\t\tcase SUPPLY_STASH_ACTION_WITHDRAW: {\r\n\t\t\tuint16_t itemId = msg.get();\r\n\t\t\tuint32_t count = msg.get();\r\n\t\t\tuint8_t stackpos = msg.getByte();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e2e09b7ec1283ff2", - "equalIndicator/v1": "62f7869cd566fbff5e2ca68c03d7bfe47d82ec00f4667ebba78ab3db59ed8ba7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 551, - "startColumn": 55, - "charOffset": 17834, - "charLength": 8, - "snippet": { - "text": "maxValue" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 549, - "startColumn": 1, - "charOffset": 17746, - "charLength": 152, - "snippet": { - "text": "\tint32_t minValue = level / 5;\r\n\r\n\treturn -normal_random(minValue, static_cast(maxValue * player->getVocation()->meleeDamageMultiplier));\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fac32dccdaabf21c", - "equalIndicator/v1": "63029716a1fb140c66f275f27824adf64bf152bd2ea4568b7c57f763e67de66e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 221, - "startColumn": 7, - "charOffset": 6726, - "charLength": 11, - "snippet": { - "text": "updateThing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 219, - "startColumn": 1, - "charOffset": 6659, - "charLength": 242, - "snippet": { - "text": "\r\n\tvoid updateTileFlags(const std::shared_ptr &item);\r\n\tvoid updateThing(std::shared_ptr thing, uint16_t itemId, uint32_t count) override final;\r\n\tvoid replaceThing(uint32_t index, std::shared_ptr thing) override final;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b659817adde89131", - "equalIndicator/v1": "630ad154285abad3222c3277f555d5246984a7854fec17c14f0424d15c611a4a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 81, - "startColumn": 10, - "charOffset": 2200, - "charLength": 5, - "snippet": { - "text": "mType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 79, - "startColumn": 1, - "charOffset": 2147, - "charLength": 105, - "snippet": { - "text": "\t}\r\n\tint32_t getDefense() const override {\r\n\t\treturn mType->info.defense * getDefenseMultiplier();\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "52b0beb11cdd0aad", - "equalIndicator/v1": "631b9a502f7b1c403caf2dc41cade05cf66b0a22e5d9d58d851e9a9f97098694" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 830, - "startColumn": 85, - "charOffset": 26985, - "charLength": 8, - "snippet": { - "text": "minValue" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 828, - "startColumn": 1, - "charOffset": 26854, - "charLength": 182, - "snippet": { - "text": "\r\n\tint32_t minValue = player->getLevel() / 5;\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue);\r\n\tif (maxDamage) {\r\n\t\treturn -maxValue;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a194a6dd2f028421", - "equalIndicator/v1": "631dec9062f3393a5dead2bac5eccd4dfacc8a330d1b8e6d77211dac8d329659" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '_Valty', which is a reserved identifier", - "markdown": "Declaration uses identifier '_Valty', which is a reserved identifier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/arraylist.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 116, - "startColumn": 22, - "charOffset": 2641, - "charLength": 6, - "snippet": { - "text": "_Valty" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 114, - "startColumn": 1, - "charOffset": 2613, - "charLength": 152, - "snippet": { - "text": "\t\t}\r\n\r\n\t\ttemplate \r\n\t\tdecltype(auto) emplace_back(_Valty &&... v) {\r\n\t\t\treturn backContainer.emplace_back(std::forward<_Valty>(v)...);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ba4475f82c3106d8", - "equalIndicator/v1": "632721c790022f51a6804fea9980dbc7458cf009269f264ab7520b7b15689aa1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1355, - "startColumn": 61, - "charOffset": 39655, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1353, - "startColumn": 1, - "charOffset": 39590, - "charLength": 146, - "snippet": { - "text": "}\r\n\r\nint32_t Tile::getStackposOfCreature(std::shared_ptr player, std::shared_ptr creature) const {\r\n\tint32_t n;\r\n\tif (ground) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "65d5122b6bf93382", - "equalIndicator/v1": "6340062f557471a488f3af3080a9a447dc57237d0d2ff911c94183198993770a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2835, - "startColumn": 37, - "charOffset": 84759, - "charLength": 8, - "snippet": { - "text": "capacity" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2833, - "startColumn": 1, - "charOffset": 84577, - "charLength": 226, - "snippet": { - "text": "\t\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\r\n\t\t\t\tmanaMax = std::max(0, manaMax - vocation->getManaGain());\r\n\t\t\t\tcapacity = std::max(0, capacity - vocation->getCapGain());\r\n\t\t\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f91c7820ec66ebed", - "equalIndicator/v1": "634b7a9c1e45df1abed231ce3209075f3f84568a95fa313c5e310f43502a02a8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'condition' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'condition' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1376, - "startColumn": 62, - "charOffset": 42127, - "charLength": 9, - "snippet": { - "text": "condition" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1374, - "startColumn": 1, - "charOffset": 42061, - "charLength": 241, - "snippet": { - "text": "}\r\n\r\nbool Creature::addCombatCondition(std::shared_ptr condition, bool attackerPlayer /* = false*/) {\r\n\t// Caution: condition variable could be deleted after the call to addCondition\r\n\tConditionType_t type = condition->getType();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "953a9ead5d6ee794", - "equalIndicator/v1": "634cee16db8f44dd8f425675bba15ed670692ed3765fa68400d897555a203ede" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8448, - "startColumn": 2, - "charOffset": 293680, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8446, - "startColumn": 1, - "charOffset": 293673, - "charLength": 150, - "snippet": { - "text": "\t}\r\n\r\n\tuint16_t page = result->getNumber(\"page\");\r\n\tuint32_t pages = result->getNumber(\"entries\");\r\n\tpages += entriesPerPage - 1;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d0a12723abc4eea6", - "equalIndicator/v1": "635698beed4e30de8207ce933df15d9f083cfbe47dadc0ad5fc4a64738fc9a0c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 197, - "startColumn": 86, - "charOffset": 6153, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 195, - "startColumn": 1, - "charOffset": 6063, - "charLength": 260, - "snippet": { - "text": "}\r\n\r\nvoid Weapon::internalUseWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target, int32_t damageModifier, int32_t cleavePercent) const {\r\n\tif (player) {\r\n\t\tif (params.soundCastEffect == SoundEffect_t::SILENCE) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "96f2a1c447b2bdc5", - "equalIndicator/v1": "636e273ea57282296ab6941d6c4ee9d7d6720b29dbabec9d41eee1b543cef324" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5036, - "startColumn": 83, - "charOffset": 180143, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5034, - "startColumn": 1, - "charOffset": 180056, - "charLength": 156, - "snippet": { - "text": "}\r\n\r\nstd::string Game::getTradeErrorDescription(ReturnValue ret, std::shared_ptr item) {\r\n\tif (item) {\r\n\t\tif (ret == RETURNVALUE_NOTENOUGHCAPACITY) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4014b93a847d469c", - "equalIndicator/v1": "638a31c0770687f49b561f40e8fd9a43ba16878a90ea1f3303b7ccd1610cf878" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'long double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'long double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6051, - "startColumn": 81, - "charOffset": 177865, - "charLength": 12, - "snippet": { - "text": "nextReqTries" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6049, - "startColumn": 1, - "charOffset": 177743, - "charLength": 223, - "snippet": { - "text": "\r\n\t\toldSkillValue = skills[skill].level;\r\n\t\toldPercentToNextLevel = static_cast(skills[skill].tries * 100) / nextReqTries;\r\n\r\n\t\tg_events().eventPlayerOnGainSkillTries(static_self_cast(), skill, tries);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9ac98c1a43b05dd9", - "equalIndicator/v1": "63a7601f50270f1069f28b45e10be3d28b6996d95fd1d2d60a7e85b7bfd0cedd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/kv_sql.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 28, - "startColumn": 27, - "charOffset": 706, - "charLength": 10, - "snippet": { - "text": "loadPrefix" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 26, - "startColumn": 1, - "charOffset": 668, - "charLength": 233, - "snippet": { - "text": "\r\nprivate:\r\n\tstd::vector loadPrefix(const std::string &prefix = \"\") override;\r\n\tstd::optional load(const std::string &key) override;\r\n\tbool save(const std::string &key, const ValueWrapper &value) override;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "63c02b254b223793", - "equalIndicator/v1": "63a77515dc61b816a831b97ea9789c0ec4d94ef70b3a3fc94b6ce98acba8037f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'defaultItem' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'defaultItem' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5376, - "startColumn": 125, - "charOffset": 189760, - "charLength": 11, - "snippet": { - "text": "defaultItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5374, - "startColumn": 1, - "charOffset": 189631, - "charLength": 257, - "snippet": { - "text": "}\r\n\r\nvoid Game::playerQuickLoot(uint32_t playerId, const Position &pos, uint16_t itemId, uint8_t stackPos, std::shared_ptr defaultItem, bool lootAllCorpses, bool autoLoot) {\r\n\tstd::shared_ptr player = getPlayerByID(playerId);\r\n\tif (!player) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1e14bd3f53d43126", - "equalIndicator/v1": "63ac6dc00346bbd1260324e3bf2c42c9a2e0afef425329a8dfc3b5feaf688a04" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 348, - "startColumn": 58, - "charOffset": 12918, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 346, - "startColumn": 1, - "charOffset": 12856, - "charLength": 279, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::playerOnLook(std::shared_ptr player, const Position &position, std::shared_ptr thing, uint8_t stackpos, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLook - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "df90fd8a8817f9b1", - "equalIndicator/v1": "63b429dcebc96cf5ab8ba0cdb9578640a999b1524b164365131bf6687f4c61b0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 863, - "startColumn": 71, - "charOffset": 31227, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 861, - "startColumn": 1, - "charOffset": 31152, - "charLength": 360, - "snippet": { - "text": "}\r\n\r\nvoid Events::eventPlayerOnReportRuleViolation(std::shared_ptr player, const std::string &targetName, uint8_t reportType, uint8_t reportReason, const std::string &comment, const std::string &translation) {\r\n\t// Player:onReportRuleViolation(targetName, reportType, reportReason, comment, translation)\r\n\tif (info.playerOnReportRuleViolation == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6f49373812ed9a5a", - "equalIndicator/v1": "63bc921056c5eb70bb908ef2e74ba599893471756dd853b4fd4d0e5e75f25cc9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 607, - "startColumn": 102, - "charOffset": 21588, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 605, - "startColumn": 1, - "charOffset": 21482, - "charLength": 311, - "snippet": { - "text": "}\r\n\r\nvoid Events::eventPlayerOnLookInBattleList(std::shared_ptr player, std::shared_ptr creature, int32_t lookDistance) {\r\n\t// Player:onLookInBattleList(creature, position, distance) or Player.onLookInBattleList(self, creature, position, distance)\r\n\tif (info.playerOnLookInBattleList == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cfaac4102178c4a6", - "equalIndicator/v1": "640379f76bc7c70ad0d7babcec3142fe3af52be4696cbd911f6ebb00546b8bd1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 262, - "startColumn": 41, - "charOffset": 9669, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 260, - "startColumn": 1, - "charOffset": 9623, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bcfbecc6b7be737d", - "equalIndicator/v1": "6412ad68f225eeeb65d19ff1064952f5b4f3b932abd680a679896bb42ed43dc3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'float'", - "markdown": "Narrowing conversion from 'double' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/io_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 418, - "startColumn": 26, - "charOffset": 20801, - "charLength": 19, - "snippet": { - "text": "MITIGATION_INCREASE" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 416, - "startColumn": 1, - "charOffset": 20605, - "charLength": 360, - "snippet": { - "text": "// SLOT_GREEN_TOP_150 = 2\r\nvoid IOWheel::slotGreenTop150(const std::shared_ptr &player, uint16_t points, uint8_t, PlayerWheelMethodsBonusData &bonusData) const {\r\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\r\n\tif (isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_GREEN_TOP_150)) {\r\n\t\tbonusData.leech.manaLeech += MANA_LEECH_INCREASE;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "db4711d221b7a25c", - "equalIndicator/v1": "641a2be599e43ab6afb58055cf8b99d6273e56cd95919c4c5ca066ed05c2ac38" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1224, - "startColumn": 41, - "charOffset": 46736, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1222, - "startColumn": 1, - "charOffset": 46690, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8155f20ac47ab8ab", - "equalIndicator/v1": "641b3f74f619081fb6065185177e2b9b0feafacb29186e2b44ea70c8b5f979f1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1043, - "startColumn": 13, - "charOffset": 30154, - "charLength": 7, - "snippet": { - "text": "toupper" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1041, - "startColumn": 1, - "charOffset": 30071, - "charLength": 109, - "snippet": { - "text": "\tfor (size_t i = 1; i < strLength; ++i) {\r\n\t\tif (str[i - 1] == ' ') {\r\n\t\t\tstr[i] = toupper(str[i]);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cc3d1f21b277b469", - "equalIndicator/v1": "641d59d127219122c3c9e9c0cab5648bdbdd08f7d4da1838f7057a866f47dc82" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8634, - "startColumn": 58, - "charOffset": 272023, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8632, - "startColumn": 1, - "charOffset": 271961, - "charLength": 237, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::getForgeInfoMap(std::shared_ptr item, std::map> &itemsMap) const {\r\n\tstd::map itemInfo;\r\n\titemInfo.insert({ item->getTier(), item->getItemCount() });\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "31710a20a4e7a1ab", - "equalIndicator/v1": "643aecfc6c29a9c3eeecb558a8c73f4f774a80f638658d6103277bf6f3f62548" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1095, - "startColumn": 41, - "charOffset": 41717, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1093, - "startColumn": 1, - "charOffset": 41671, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "79634c1f7ff01a18", - "equalIndicator/v1": "646aafba4294be74bd726ae64a1f6e0ea6c2673fc6605f560d7f9fa8ec509186" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 69, - "startColumn": 18, - "charOffset": 2147, - "charLength": 15, - "snippet": { - "text": "getWeaponDamage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 67, - "startColumn": 1, - "charOffset": 2002, - "charLength": 481, - "snippet": { - "text": "\tvirtual bool useWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target) const;\r\n\r\n\tvirtual int32_t getWeaponDamage(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, bool maxDamage = false) const = 0;\r\n\tvirtual int32_t getElementDamage(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) const = 0;\r\n\tvirtual CombatType_t getElementType() const = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2b5b395dfae61030", - "equalIndicator/v1": "647e396c46e9d6433d4a950ebdbedbbbf62ab3e18771a379b5d8cb2d87f2de36" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 217, - "startColumn": 2, - "charOffset": 7825, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 215, - "startColumn": 1, - "charOffset": 7818, - "charLength": 46, - "snippet": { - "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3db4d7113755102a", - "equalIndicator/v1": "64877a00dc3c6e69a4022c43f9336304ab6445bb0885eedd10c005161d30ba1c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/grouping/party.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 640, - "startColumn": 56, - "charOffset": 19017, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 638, - "startColumn": 1, - "charOffset": 18957, - "charLength": 164, - "snippet": { - "text": "}\r\n\r\nvoid Party::updatePlayerStatus(std::shared_ptr player, const Position &oldPos, const Position &newPos) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "89a226754cb536a6", - "equalIndicator/v1": "648bb0606e6c5b152f11026d20587a3aed710791fcda0bf7db0dd8f4114cc750" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'servicePort' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'servicePort' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/connection/connection.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 18, - "startColumn": 103, - "charOffset": 733, - "charLength": 11, - "snippet": { - "text": "servicePort" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 16, - "startColumn": 1, - "charOffset": 599, - "charLength": 259, - "snippet": { - "text": "#include \"server/server.hpp\"\r\n\r\nConnection_ptr ConnectionManager::createConnection(asio::io_service &io_service, ConstServicePort_ptr servicePort) {\r\n\tauto connection = std::make_shared(io_service, servicePort);\r\n\tconnections.emplace(connection);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3dcb45d225b106eb", - "equalIndicator/v1": "64c561221c50a5e5a9e758b571ec0e1aad6fb547e7c596b951018596c2aef0cc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned int' to 'float'", - "markdown": "Narrowing conversion from 'unsigned int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 690, - "startColumn": 37, - "charOffset": 22554, - "charLength": 18, - "snippet": { - "text": "std::min" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 688, - "startColumn": 1, - "charOffset": 22492, - "charLength": 128, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 3.20f);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "20a0253bfc049d25", - "equalIndicator/v1": "650723f1896c3bd988ef5000e233edfe9e5f2de84d31ed9d6991a45174485150" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 670, - "startColumn": 30, - "charOffset": 20817, - "charLength": 8, - "snippet": { - "text": "listItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 668, - "startColumn": 1, - "charOffset": 20724, - "charLength": 252, - "snippet": { - "text": "\t\t// try find a suitable item to stack with\r\n\t\tuint32_t n = 0;\r\n\t\tfor (std::shared_ptr listItem : itemlist) {\r\n\t\t\tif (listItem != item && listItem->equals(item) && listItem->getItemCount() < listItem->getStackSize()) {\r\n\t\t\t\t*destItem = listItem;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "87e4f469fe66407a", - "equalIndicator/v1": "651c30b4158b9cc4767f4a92def64fb9ed52b3844c9ac618e9a8b4839da1f025" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1180, - "startColumn": 58, - "charOffset": 36590, - "charLength": 8, - "snippet": { - "text": "attacker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1178, - "startColumn": 1, - "charOffset": 36528, - "charLength": 134, - "snippet": { - "text": "}\r\n\r\nvoid Creature::addDamagePoints(std::shared_ptr attacker, int32_t damagePoints) {\r\n\tif (damagePoints <= 0) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6d6dcb5025c0b443", - "equalIndicator/v1": "654f1fba3818dcf294b00b85c71496d56b9eb7d1dd727af0cdb42b5035c2df77" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1595, - "startColumn": 4, - "charOffset": 56012, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1593, - "startColumn": 1, - "charOffset": 55914, - "charLength": 150, - "snippet": { - "text": "\t\tdefault: {\r\n\t\t\tg_logger().warn(\"[ValueCallback::getMinMaxValues] - Unknown callback type\");\r\n\t\t\tscriptInterface->resetScriptEnv();\r\n\t\t\treturn;\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7a90e0cbf1313375", - "equalIndicator/v1": "65583fa8d877989935ab599c46b7ef736037aadc5c1136a609e7239f70a7e09e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1436, - "startColumn": 108, - "charOffset": 49795, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1434, - "startColumn": 1, - "charOffset": 49683, - "charLength": 364, - "snippet": { - "text": "}\r\n\r\nstd::vector>> Combat::pickChainTargets(std::shared_ptr caster, const CombatParams ¶ms, uint8_t chainDistance, uint8_t maxTargets, bool backtracking, bool aggressive, std::shared_ptr initialTarget /* = nullptr */) {\r\n\tBenchmark bm_pickChain;\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "26ef6611793c5dc0", - "equalIndicator/v1": "655fd1e8cb8c57934ec4dca511169f61a82570b800eb158105068b59da568ab4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 831, - "startColumn": 64, - "charOffset": 29920, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 829, - "startColumn": 1, - "charOffset": 29852, - "charLength": 343, - "snippet": { - "text": "}\r\n\r\nbool Events::eventPlayerOnMoveCreature(std::shared_ptr player, std::shared_ptr creature, const Position &fromPosition, const Position &toPosition) {\r\n\t// Player:onMoveCreature(creature, fromPosition, toPosition) or Player.onMoveCreature(self, creature, fromPosition, toPosition)\r\n\tif (info.playerOnMoveCreature == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f7ac8c15bd4f0ba1", - "equalIndicator/v1": "656dfb8d2e52ebab0f8be36ca86b345311fc956d613ec884526e02940a01fc18" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 898, - "startColumn": 7, - "charOffset": 34251, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 896, - "startColumn": 1, - "charOffset": 34158, - "charLength": 236, - "snippet": { - "text": "\r\nvoid EventCallback::playerOnRequestQuestLog(std::shared_ptr player) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnRequestQuestLog - \"\r\n\t\t \"Player {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "416d834b10a5d8cd", - "equalIndicator/v1": "6580e06fb7eadb58265b59093e894d92d1fd64f02de9551ba6190ae47a2fc892" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 900, - "startColumn": 60, - "charOffset": 28708, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 898, - "startColumn": 1, - "charOffset": 28644, - "charLength": 218, - "snippet": { - "text": "}\r\n\r\nbool InstantSpell::canThrowSpell(std::shared_ptr creature, std::shared_ptr target) const {\r\n\tconst Position &fromPos = creature->getPosition();\r\n\tconst Position &toPos = target->getPosition();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "91323b81309b408a", - "equalIndicator/v1": "65948bd2a12eb8049c81bda13f552c9ba67d0f6802677258a050a1d8adeb7cb3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2803, - "startColumn": 52, - "charOffset": 83718, - "charLength": 13, - "snippet": { - "text": "sumSkillTries" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2801, - "startColumn": 1, - "charOffset": 83627, - "charLength": 213, - "snippet": { - "text": "\t\t\tsumSkillTries += skills[i].tries;\r\n\r\n\t\t\tuint32_t lostSkillTries = static_cast(sumSkillTries * deathLossPercent);\r\n\t\t\twhile (lostSkillTries > skills[i].tries) {\r\n\t\t\t\tlostSkillTries -= skills[i].tries;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "78bf13c541a18414", - "equalIndicator/v1": "6595d5d7c9d7aa599f8c2393eec153566d9834145556b7fdf76d19a9ee28cbcc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 574, - "startColumn": 7, - "charOffset": 20359, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 572, - "startColumn": 1, - "charOffset": 20347, - "charLength": 136, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnLook - \"\r\n\t\t \"Player {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "002fae6ecf4d4b3a", - "equalIndicator/v1": "65c12f5458ddfc18831170cd2da5b26ebf0251848cd0354e79d52da5ed8a3524" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2768, - "startColumn": 36, - "charOffset": 82433, - "charLength": 7, - "snippet": { - "text": "sumMana" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2766, - "startColumn": 1, - "charOffset": 82391, - "charLength": 123, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tlostMana = static_cast(sumMana * deathLossPercent);\r\n\r\n\t\twhile (lostMana > manaSpent && magLevel > 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d31b9752f02157c9", - "equalIndicator/v1": "65c1b13ef53fefea8fbb709b6b80d8fa1c01c11ca1632955b18264977960a3a4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7194, - "startColumn": 38, - "charOffset": 250896, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7192, - "startColumn": 1, - "charOffset": 250829, - "charLength": 116, - "snippet": { - "text": "\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tmanaDamage = std::min(target->getMana(), healthChange);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0f7b1ae873ca4897", - "equalIndicator/v1": "65daedd4a68627965ee066b12a29ea54b31a0e8af90bfbd93e11cced22d1f250" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructor does not initialize these fields: interface, scriptId, callbackId, timerEvent", - "markdown": "Constructor does not initialize these fields: interface, scriptId, callbackId, timerEvent" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/scripts/script_environment.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 16, - "startColumn": 20, - "charOffset": 533, - "charLength": 17, - "snippet": { - "text": "ScriptEnvironment" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 14, - "startColumn": 1, - "charOffset": 465, - "charLength": 107, - "snippet": { - "text": "#include \"lua/scripts/script_environment.hpp\"\r\n\r\nScriptEnvironment::ScriptEnvironment() {\r\n\tresetEnv();\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d70a5e2a42a7a676", - "equalIndicator/v1": "65f22c13ce19e53954976b6ce5e42cb05305711cd33fa20b00c03b8d32b3f433" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/cyclopedia/player_title.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 53, - "startColumn": 53, - "charOffset": 1291, - "charLength": 21, - "snippet": { - "text": "(OTSYS_TIME() / 1000)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 51, - "startColumn": 1, - "charOffset": 1233, - "charLength": 197, - "snippet": { - "text": "\t}\r\n\r\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\r\n\tgetUnlockedKV()->set(title.m_maleName, toSaveTimeStamp);\r\n\tm_titlesUnlocked.emplace_back(title, toSaveTimeStamp);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b848fa3b9f7136e0", - "equalIndicator/v1": "65f4a18db19320b20eb998beab291c5145c35ba07a878d6126f9017a7a7a208c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/mailbox/mailbox.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 29, - "startColumn": 2, - "charOffset": 794, - "charLength": 11, - "snippet": { - "text": "ReturnValue" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 27, - "startColumn": 1, - "charOffset": 761, - "charLength": 486, - "snippet": { - "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "87fa69effe8b7bd5", - "equalIndicator/v1": "6601a5c4c9f84b65d37e7dbdcb16cf5e33fdbf74b3835d484c95984a6d95823f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1094, - "startColumn": 60, - "charOffset": 34489, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1092, - "startColumn": 1, - "charOffset": 34425, - "charLength": 213, - "snippet": { - "text": "}\r\n\r\nbool RuneSpell::executeCastSpell(std::shared_ptr creature, const LuaVariant &var, bool isHotkey) const {\r\n\t// onCastSpell(creature, var, isHotkey)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0d375d7287cba553", - "equalIndicator/v1": "66365ad498bec1bbecc314765ebd05b94b7b7565ba49f4ce3cf9941bdf893343" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 84, - "startColumn": 9, - "charOffset": 2562, - "charLength": 12, - "snippet": { - "text": "stepDuration" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 82, - "startColumn": 1, - "charOffset": 2548, - "charLength": 51, - "snippet": { - "text": "\t}\r\n\r\n\treturn stepDuration - (ct - lastStep);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ce298b98d54a4425", - "equalIndicator/v1": "666d940cd5d4c7b33e7096c1185045f25c2b0e4929c2d9818d3c9e66266c8296" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Dynamic exception specification 'throw()' is deprecated; consider using 'noexcept' instead", - "markdown": "Dynamic exception specification 'throw()' is deprecated; consider using 'noexcept' instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/database/database.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 286, - "startColumn": 35, - "charOffset": 8351, - "charLength": 5, - "snippet": { - "text": "throw" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 284, - "startColumn": 1, - "charOffset": 8291, - "charLength": 101, - "snippet": { - "text": "\t\tmessage(message) { }\r\n\r\n\tvirtual const char* what() const throw() {\r\n\t\treturn message.c_str();\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "02b30fc68c4154c4", - "equalIndicator/v1": "667d4f4ded97a0aad016d196430d7a0686766179222e1fbb36ed74402676bcea" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 644, - "startColumn": 51, - "charOffset": 20289, - "charLength": 6, - "snippet": { - "text": "damage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 642, - "startColumn": 1, - "charOffset": 20034, - "charLength": 446, - "snippet": { - "text": "\t\t\t\tif (augment->type == Augment_t::IncreasedDamage || augment->type == Augment_t::PowerfulImpact || augment->type == Augment_t::StrongImpact) {\r\n\t\t\t\t\tconst float augmentPercent = augment->value / 100.0;\r\n\t\t\t\t\tdamage.primary.value += static_cast(damage.primary.value * augmentPercent);\r\n\t\t\t\t\tdamage.secondary.value += static_cast(damage.secondary.value * augmentPercent);\r\n\t\t\t\t} else if (augment->type != Augment_t::Cooldown) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7ecbae8c12ea19b6", - "equalIndicator/v1": "6693b48028ebf3d6562a8a1e689d2a04c3649037e2861cad34d07e25cd4a0b2f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 363, - "startColumn": 59, - "charOffset": 9902, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 361, - "startColumn": 1, - "charOffset": 9839, - "charLength": 176, - "snippet": { - "text": "}\r\n\r\nvoid Creature::onCreatureAppear(std::shared_ptr creature, bool isLogin) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (creature == getCreature()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1649ee3236181acc", - "equalIndicator/v1": "669b69e4cc15d9ff1291caf27accc637f467ccec75f87389cfa4eb5ef3604b2e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8890, - "startColumn": 2, - "charOffset": 282436, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8888, - "startColumn": 1, - "charOffset": 282395, - "charLength": 167, - "snippet": { - "text": "\r\n\tuint8_t slotBossId = msg.getByte();\r\n\tuint32_t selectedBossId = msg.get();\r\n\r\n\tg_game().playerBosstiarySlot(player->getID(), slotBossId, selectedBossId);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "53141a25f61aef86", - "equalIndicator/v1": "66a1e004d0bd3fcd745e91bfdf88b48f2193c7cbf44bad2bb1899d15701e22fa" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1829, - "startColumn": 3, - "charOffset": 55680, - "charLength": 16, - "snippet": { - "text": "ObjectCategory_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1827, - "startColumn": 1, - "charOffset": 55554, - "charLength": 290, - "snippet": { - "text": "\t\tg_game().playerSetManagedContainer(player->getID(), category, pos, itemId, stackpos, false);\r\n\t} else if (action == 5) {\r\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\r\n\t\tg_game().playerClearManagedContainer(player->getID(), category, false);\r\n\t} else if (action == 6) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "809cc00c0f82676c", - "equalIndicator/v1": "66a3ad74559624492e98f0fce6e9896e73baab03c6ae6b7b1a941eb6828834fd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 988, - "startColumn": 58, - "charOffset": 37606, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 986, - "startColumn": 1, - "charOffset": 37544, - "charLength": 198, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::playerOnWalk(std::shared_ptr player, Direction &dir) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::eventOnWalk - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c4c7570beb1d2958", - "equalIndicator/v1": "66a85bf96dd4ee12c460afa462b43a9fa89c60c0c1b1cfc947a7703348bb49ca" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/grouping/party.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 807, - "startColumn": 54, - "charOffset": 25630, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 805, - "startColumn": 1, - "charOffset": 25572, - "charLength": 181, - "snippet": { - "text": "}\r\n\r\nvoid Party::addPlayerHealing(std::shared_ptr player, uint64_t amount) {\r\n\tauto playerAnalyzer = getPlayerPartyAnalyzerStruct(player->getID());\r\n\tif (!playerAnalyzer) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "91faf3aff5a06afb", - "equalIndicator/v1": "67020d22b9a8bd8e0d373aa0d2b1ae02a684b41ee045b9d8a5333b2ce24a43e9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1925, - "startColumn": 2, - "charOffset": 58622, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1923, - "startColumn": 1, - "charOffset": 58527, - "charLength": 245, - "snippet": { - "text": "void ProtocolGame::parseHouseWindow(NetworkMessage &msg) {\r\n\tuint8_t doorId = msg.getByte();\r\n\tuint32_t id = msg.get();\r\n\tconst std::string text = msg.getString();\r\n\tg_game().playerUpdateHouseWindow(player->getID(), doorId, id, text);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b40af9ed34351ac8", - "equalIndicator/v1": "670a050dace1c2bc7376b516650e8e1a812698b755400c87e1ac44c5eea65115" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 415, - "startColumn": 8, - "charOffset": 10342, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 413, - "startColumn": 1, - "charOffset": 10234, - "charLength": 229, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetImbuementSlot(lua_State* L) {\r\n\t// itemType:getImbuementSlot()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->imbuementSlot);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c7a861edf10c82f1", - "equalIndicator/v1": "672586d7d1c2dc6a54947d655a02c9871c47dcfb7214d6ddd3f33fb0663ac932" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3596, - "startColumn": 39, - "charOffset": 111681, - "charLength": 27, - "snippet": { - "text": "Weapons::getMaxWeaponDamage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3594, - "startColumn": 1, - "charOffset": 111387, - "charLength": 498, - "snippet": { - "text": "\t\t\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\r\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\r\n\t\t\t\tmaxDamage += static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, it.abilities->elementDamage, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\r\n\t\t\t}\r\n\t\t\tmsg.add(maxDamage >> 1);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a07fb0f75824f258", - "equalIndicator/v1": "6737ac69ab0d8f16277e3569e659587fd6fee1d6d7295fab819c12683e8d65e6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2078, - "startColumn": 58, - "charOffset": 61404, - "charLength": 7, - "snippet": { - "text": "oldItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2076, - "startColumn": 1, - "charOffset": 61331, - "charLength": 178, - "snippet": { - "text": "\r\n// inventory\r\nvoid Player::onUpdateInventoryItem(std::shared_ptr oldItem, std::shared_ptr newItem) {\r\n\tif (oldItem != newItem) {\r\n\t\tonRemoveInventoryItem(oldItem);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "67b82e07c327275d", - "equalIndicator/v1": "673ee4c39ecb8cd6adfb9163f3d76840d52d3d203bfddaf45cbb26da38492462" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5157, - "startColumn": 48, - "charOffset": 152209, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5155, - "startColumn": 1, - "charOffset": 152157, - "charLength": 288, - "snippet": { - "text": "}\r\n\r\nbool Player::hasKilled(std::shared_ptr player) const {\r\n\tfor (const auto &kill : unjustifiedKills) {\r\n\t\tif (kill.target == player->getGUID() && (time(nullptr) - kill.time) < g_configManager().getNumber(ORANGE_SKULL_DURATION, __FUNCTION__) * 24 * 60 * 60 && kill.unavenged) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "27044835c5d59e70", - "equalIndicator/v1": "674dc0633cb27665e7a5c6a5c8c924f9fab5151efbcec201aa9b5cc6d0d155df" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7550, - "startColumn": 48, - "charOffset": 263078, - "charLength": 5, - "snippet": { - "text": "charm" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7548, - "startColumn": 1, - "charOffset": 262928, - "charLength": 429, - "snippet": { - "text": "\t activeCharm != CHARM_NONE) {\r\n\t\tconst auto charm = g_iobestiary().getBestiaryCharm(activeCharm);\r\n\t\tint8_t chance = charm->id == CHARM_CRIPPLE ? charm->chance : charm->chance + attackerPlayer->getCharmChanceModifier();\r\n\t\tg_logger().debug(\"charm chance: {}, base: {}, bonus: {}\", chance, charm->chance, attackerPlayer->getCharmChanceModifier());\r\n\t\tif (charm->type == CHARM_OFFENSIVE && (chance >= normal_random(0, 100))) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5b49e82189b507ab", - "equalIndicator/v1": "6752377aa8df2f997ee0b20e4a4ba2685b8509363d92e6b04e05e5788b7ff0ff" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'targetCreature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'targetCreature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/creaturecallback.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 18, - "startColumn": 82, - "charOffset": 567, - "charLength": 14, - "snippet": { - "text": "targetCreature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 16, - "startColumn": 1, - "charOffset": 451, - "charLength": 234, - "snippet": { - "text": "class CreatureCallback {\r\npublic:\r\n\tCreatureCallback(LuaScriptInterface* scriptInterface, std::shared_ptr targetCreature) :\r\n\t\tscriptInterface(scriptInterface), m_targetCreature(targetCreature) {};\r\n\t~CreatureCallback() { }\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "19d76f601efbe9cd", - "equalIndicator/v1": "6771aa2bd92c731e5211fd09c3ba9264457e81e3ea9b94e73eb4d77abfa35a44" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1651, - "startColumn": 65, - "charOffset": 49079, - "charLength": 9, - "snippet": { - "text": "container" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1649, - "startColumn": 1, - "charOffset": 49010, - "charLength": 125, - "snippet": { - "text": "}\r\n\r\nvoid Player::sendRemoveContainerItem(std::shared_ptr container, uint16_t slot) {\r\n\tif (!client) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "659b73e8c0f81708", - "equalIndicator/v1": "6785a33ef3f15faa3c0461077ba09d35dd757802f345f2ccf623d0a5b854f430" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')", - "markdown": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5768, - "startColumn": 25, - "charOffset": 170223, - "charLength": 8, - "snippet": { - "text": "std::min" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5766, - "startColumn": 1, - "charOffset": 170095, - "charLength": 349, - "snippet": { - "text": "\t\tauto monthMax = ((isRed ? 2 : 1) * g_configManager().getNumber(MONTH_KILLS_TO_RED, __FUNCTION__));\r\n\r\n\t\tuint8_t dayProgress = std::min(std::round(dayKills / dayMax * 100), 100.0);\r\n\t\tuint8_t weekProgress = std::min(std::round(weekKills / weekMax * 100), 100.0);\r\n\t\tuint8_t monthProgress = std::min(std::round(monthKills / monthMax * 100), 100.0);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2111a6aca4a12ab5", - "equalIndicator/v1": "67a40339c1f714d4964f6e2b1b1eba64c1393db1fee1b39926a3dce178b0cab0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 942, - "startColumn": 7, - "charOffset": 35971, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 940, - "startColumn": 1, - "charOffset": 35824, - "charLength": 265, - "snippet": { - "text": "\r\nvoid EventCallback::playerOnInventoryUpdate(std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool equip) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[{}] Call stack overflow\", __FUNCTION__);\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e9a5c0487ae8f27d", - "equalIndicator/v1": "67a43df932e0a580c99f9ed3bd0195b314d4b22165b42a8a404cec9b58c54f7b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 830, - "startColumn": 71, - "charOffset": 26971, - "charLength": 11, - "snippet": { - "text": "attackValue" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 828, - "startColumn": 1, - "charOffset": 26854, - "charLength": 182, - "snippet": { - "text": "\r\n\tint32_t minValue = player->getLevel() / 5;\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue);\r\n\tif (maxDamage) {\r\n\t\treturn -maxValue;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "32a289197bb1e990", - "equalIndicator/v1": "67d60e723ebc24ba0d9b7f1ff8097d7b1ca122e746de7528899a5feaccce7959" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 9789, - "startColumn": 40, - "charOffset": 342716, - "charLength": 3, - "snippet": { - "text": "npc" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 9787, - "startColumn": 1, - "charOffset": 342672, - "charLength": 82, - "snippet": { - "text": "}\r\n\r\nvoid Game::addNpc(std::shared_ptr npc) {\r\n\tnpcs[npc->getID()] = npc;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7b9d4712ecee4314", - "equalIndicator/v1": "6804e87afd32eb85ea4e1ff6ebc565e9d863ecd172da83d1399b1ff543cb8e55" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Std::move of the const variable 'initName' has no effect; remove std::move() or make the variable non-const", - "markdown": "Std::move of the const variable 'initName' has no effect; remove std::move() or make the variable non-const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creatures_definitions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1417, - "startColumn": 8, - "charOffset": 37380, - "charLength": 9, - "snippet": { - "text": "std::move" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1415, - "startColumn": 1, - "charOffset": 37272, - "charLength": 170, - "snippet": { - "text": "\tVIPGroupEntry(uint8_t initId, const std::string &initName, bool initCustomizable) :\r\n\t\tid(initId),\r\n\t\tname(std::move(initName)),\r\n\t\tcustomizable(initCustomizable) { }\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b855f114bf65c4f5", - "equalIndicator/v1": "68274ca7542aef287c0b68228931708b77d17782f0d146167ceed10ed18963a4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1906, - "startColumn": 2, - "charOffset": 57912, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1904, - "startColumn": 1, - "charOffset": 57854, - "charLength": 221, - "snippet": { - "text": "\r\nvoid ProtocolGame::parseAttack(NetworkMessage &msg) {\r\n\tuint32_t creatureId = msg.get();\r\n\t// msg.get(); creatureId (same as above)\r\n\tg_game().playerSetAttackedCreature(player->getID(), creatureId);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b3c713caa7fc9898", - "equalIndicator/v1": "6849494cc12d1619f868aeb8aeadab61b138971f75f38034e5451801b88ea7a6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 913, - "startColumn": 21, - "charOffset": 29487, - "charLength": 4, - "snippet": { - "text": "-max" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 911, - "startColumn": 1, - "charOffset": 29361, - "charLength": 164, - "snippet": { - "text": "\r\n\t// Returns the calculated maximum damage or a random value between the calculated minimum and maximum\r\n\treturn maxDamage ? -max : -normal_random(min, max);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "416d1f3db1e4e6dc", - "equalIndicator/v1": "685de3de7e532ad321f2ed884f8acf66f0c631fef270b3fc1b5d7adf75f5fdbb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 365, - "startColumn": 14, - "charOffset": 9013, - "charLength": 12, - "snippet": { - "text": "std::tolower" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 363, - "startColumn": 1, - "charOffset": 8956, - "charLength": 84, - "snippet": { - "text": "\t\t\tresult += std::toupper(ch);\r\n\t\t} else {\r\n\t\t\tresult += std::tolower(ch);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f630beebab9279ba", - "equalIndicator/v1": "685f05250e8a0ec62b5408064ef67e7287dd5c2fe07952497e3ec7f8d72f1639" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 584, - "startColumn": 13, - "charOffset": 27857, - "charLength": 11, - "snippet": { - "text": "stringValue" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 582, - "startColumn": 1, - "charOffset": 27667, - "charLength": 447, - "snippet": { - "text": "\t} else if (stringValue == \"absorbpercentfire\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentpoison\" || stringValue == \"absorbpercentearth\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentice\") {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "32579405c551ff00", - "equalIndicator/v1": "686a696b7020f4cf49ea5dc6f2a61864521ad03e02ad84670261f485a5099993" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::_Tree, std::less>, std::allocator>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::_Tree, std::less\\>, std::allocator\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 249, - "startColumn": 21, - "charOffset": 6819, - "charLength": 7, - "snippet": { - "text": "npcType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 247, - "startColumn": 1, - "charOffset": 6780, - "charLength": 173, - "snippet": { - "text": "\r\n\tint index = 0;\r\n\tlua_createtable(L, npcType->info.scripts.size(), 0);\r\n\tfor (const std::string &creatureEvent : npcType->info.scripts) {\r\n\t\tpushString(L, creatureEvent);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2ef13d320de496f5", - "equalIndicator/v1": "686ce62ed411323a46423da0c8075ce1e440cb40eae33c6a01dd16e1d14ad40a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 652, - "startColumn": 16, - "charOffset": 33331, - "charLength": 21, - "snippet": { - "text": "IOMarket::getInstance" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 650, - "startColumn": 1, - "charOffset": 33268, - "charLength": 268, - "snippet": { - "text": "\r\n\t// Update active buy offers (market_offers)\r\n\tauto offers = IOMarket::getInstance().getActiveOffers(MARKETACTION_BUY);\r\n\tfor (const auto &offer : offers) {\r\n\t\titemsPriceMap[offer.itemId][offer.tier] = std::max(itemsPriceMap[offer.itemId][offer.tier], offer.price);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "de19aebc6cb6da7e", - "equalIndicator/v1": "68737bbf9aaaf6f58be2d7c6d955835e67f58fb199cbcca8416e9b6cda574b3d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'name' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'name' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/player_wheel.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 333, - "startColumn": 18, - "charOffset": 12575, - "charLength": 17, - "snippet": { - "text": "const std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 331, - "startColumn": 1, - "charOffset": 12415, - "charLength": 235, - "snippet": { - "text": "\tint32_t getMajorStatConditional(const std::string &instant, WheelMajor_t major) const;\r\n\tint64_t getOnThinkTimer(WheelOnThink_t type) const;\r\n\tbool getInstant(const std::string name) const;\r\n\tdouble getMitigationMultiplier() const;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "65617b9f4f96396e", - "equalIndicator/v1": "687e351269df419d095b9cc16c50c13804e3156751b58292e9cd546c415d42bb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1840, - "startColumn": 175, - "charOffset": 71801, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1838, - "startColumn": 1, - "charOffset": 71622, - "charLength": 279, - "snippet": { - "text": "}\r\n\r\nReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::shared_ptr fromCylinder, std::shared_ptr toCylinder, std::shared_ptr item, Position toPos) {\r\n\tif (!player || !toCylinder || !item) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "547286440128a85d", - "equalIndicator/v1": "688b63281d228b85a33d943c3664e017e89ec73f8cdfe45566abcd00df546f36" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Redundant string initialization", - "markdown": "Redundant string initialization" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monsters.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 217, - "startColumn": 14, - "charOffset": 6277, - "charLength": 10, - "snippet": { - "text": "scriptName" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 215, - "startColumn": 1, - "charOffset": 6237, - "charLength": 83, - "snippet": { - "text": "\r\n\tstd::string name = \"\";\r\n\tstd::string scriptName = \"\";\r\n\r\n\tuint8_t chance = 100;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3f1bbb5f580fb3ca", - "equalIndicator/v1": "688bc72c9079e47f5ced55ca29933fcf02a968063b70662a29f694bc85b719e0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 177, - "startColumn": 8, - "charOffset": 5448, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 175, - "startColumn": 1, - "charOffset": 5329, - "charLength": 323, - "snippet": { - "text": "\t\t// onCreatureDisappear(self, creature)\r\n\t\tLuaScriptInterface* scriptInterface = mType->info.scriptInterface;\r\n\t\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\t\tg_logger().error(\"[Monster::onCreatureDisappear - Monster {} creature {}] \"\r\n\t\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1db6e44ae9db1f5a", - "equalIndicator/v1": "689cca6b8ac9f9be863d609c1ad26cafc33480c8fe97bdb182d81ddda8903f6c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 54, - "startColumn": 29, - "charOffset": 1503, - "charLength": 12, - "snippet": { - "text": "getContainer" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 52, - "startColumn": 1, - "charOffset": 1419, - "charLength": 161, - "snippet": { - "text": "\tstd::shared_ptr clone() const override final;\r\n\r\n\tstd::shared_ptr getContainer() override final {\r\n\t\treturn static_self_cast();\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9fe8a8887d9047f4", - "equalIndicator/v1": "68c17c15c5e7a01c8c7c7c7c9b3a6bd127f905ef2071755bcb05178db02bbc4f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1340, - "startColumn": 58, - "charOffset": 45445, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1338, - "startColumn": 1, - "charOffset": 45383, - "charLength": 357, - "snippet": { - "text": "}\r\n\r\nvoid Combat::doCombatCondition(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms) {\r\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\r\n\tif ((caster == target || canCombat) && params.impactEffect != CONST_ME_NONE) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4e8edb5521f9c1e9", - "equalIndicator/v1": "68f0c8bb3894a46a55c3c16ebee92f9230b644d1e5e1c5009e04409a06ede10e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int_fast32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int_fast32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1766, - "startColumn": 34, - "charOffset": 53004, - "charLength": 2, - "snippet": { - "text": "dx" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1764, - "startColumn": 1, - "charOffset": 52941, - "charLength": 91, - "snippet": { - "text": "\tfloat tan;\r\n\tif (dx != 0) {\r\n\t\ttan = static_cast(dy) / dx;\r\n\t} else {\r\n\t\ttan = 10;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "81ec756a34002e96", - "equalIndicator/v1": "68f369fdd297d6b6666d1d53864e4caa10df2741b2c45b02d01b2c60ab9a6267" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to 'float'", - "markdown": "Narrowing conversion from 'int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 651, - "startColumn": 29, - "charOffset": 17601, - "charLength": 58, - "snippet": { - "text": "(100 - creature->getIncreasePercent(indexToCombatType(i)))" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 649, - "startColumn": 1, - "charOffset": 17554, - "charLength": 147, - "snippet": { - "text": "\t\t\tcontinue;\r\n\t\t}\r\n\t\tsetIncrease(i, std::round((100 - creature->getIncreasePercent(indexToCombatType(i))) * increasePercentValue / 100.f));\r\n\t}\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "50f97e4349d69bdd", - "equalIndicator/v1": "68f9d51082f3a456b40512a48fc723631dd27c07a3502e22ee5d9ac435fac101" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4569, - "startColumn": 74, - "charOffset": 144151, - "charLength": 9, - "snippet": { - "text": "container" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4567, - "startColumn": 1, - "charOffset": 144073, - "charLength": 156, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendContainer(uint8_t cid, std::shared_ptr container, bool hasParent, uint16_t firstIndex) {\r\n\tif (!player) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7198e2a605d37833", - "equalIndicator/v1": "692074324d8abdbab88d75f1d27d4b05393dcf1c47867794f2d227b9fcbeb162" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 437, - "startColumn": 8, - "charOffset": 10874, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 435, - "startColumn": 1, - "charOffset": 10772, - "charLength": 220, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetWeaponType(lua_State* L) {\r\n\t// itemType:getWeaponType()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->weaponType);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e1de2bfca2abde49", - "equalIndicator/v1": "6928b961893bb95d01a28db6ed1bad89b28ae8250f90d9e3404de7d8a7569d6e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/functions/iologindata_save_player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 94, - "startColumn": 30, - "charOffset": 2996, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 92, - "startColumn": 1, - "charOffset": 2927, - "charLength": 159, - "snippet": { - "text": "\r\n\t\t// Loop through items in container\r\n\t\tfor (std::shared_ptr item : container->getItemList()) {\r\n\t\t\tif (!item) {\r\n\t\t\t\tcontinue; // Check for null item\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f02b7a9138fdd5ba", - "equalIndicator/v1": "6929c2d9a2eb66e66afaaccd15e6cd6318a54b9fe07c9e99c47c860dc111d4f8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1491, - "startColumn": 26, - "charOffset": 44512, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1489, - "startColumn": 1, - "charOffset": 44341, - "charLength": 214, - "snippet": { - "text": "\tvoid sendToChannel(std::shared_ptr creature, SpeakClasses type, const std::string &text, uint16_t channelId) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendToChannel(creature, type, text, channelId);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b56bff71c58f3555", - "equalIndicator/v1": "6945e6a0b70611030a98bda77f8b1e48058830b50cacebda69cfd8e10affbbc2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1853, - "startColumn": 66, - "charOffset": 50096, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1851, - "startColumn": 1, - "charOffset": 50026, - "charLength": 134, - "snippet": { - "text": "}\r\n\r\nbool ConditionFeared::getFleeDirection(std::shared_ptr creature) {\r\n\tPosition creaturePos = creature->getPosition();\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d2207832b488e3bb", - "equalIndicator/v1": "6962b0a69e86c517f91fc9278c6f0c0a5dae87c62af89f4b57e6aa1689f9d86b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1551, - "startColumn": 3, - "charOffset": 54561, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1549, - "startColumn": 1, - "charOffset": 54443, - "charLength": 168, - "snippet": { - "text": "\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r\n\t\treturn;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a21bc347e3d74978", - "equalIndicator/v1": "6976d824bbca0b842dc4424c4014352d261682fc9847ad79cb85bde78395de84" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'toCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'toCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1840, - "startColumn": 141, - "charOffset": 71767, - "charLength": 10, - "snippet": { - "text": "toCylinder" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1838, - "startColumn": 1, - "charOffset": 71622, - "charLength": 279, - "snippet": { - "text": "}\r\n\r\nReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::shared_ptr fromCylinder, std::shared_ptr toCylinder, std::shared_ptr item, Position toPos) {\r\n\tif (!player || !toCylinder || !item) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6c2723b40251449e", - "equalIndicator/v1": "69790d4c772068de8050992ae29246618833b58cf1147038d25a04723c3187c5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 918, - "startColumn": 70, - "charOffset": 35026, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 916, - "startColumn": 1, - "charOffset": 34952, - "charLength": 225, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::playerOnRequestQuestLine(std::shared_ptr player, uint16_t questId) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnRequestQuestLine - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "59eeb1d6d3d938c6", - "equalIndicator/v1": "69a01a01c7e005adbf2ff1e6d6c5e4b244b6acfd5a1058e30dccd10ead8ffc42" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1768, - "startColumn": 7, - "charOffset": 61678, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1766, - "startColumn": 1, - "charOffset": 61516, - "charLength": 360, - "snippet": { - "text": "bool ChainPickerCallback::onChainCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\t// onChainCombat(creature, target)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[ChainPickerCallback::onTargetCombat - Creature {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3307ceaf20c99f0a", - "equalIndicator/v1": "69a9b24c764118ff4bc7e30673d2195ff021b224d84490504c9eb7eaed11ea4a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 347, - "startColumn": 8, - "charOffset": 8662, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 345, - "startColumn": 1, - "charOffset": 8562, - "charLength": 194, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetStackSize(lua_State* L) {\r\n\t// itemType:getStackSize()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (!itemType) {\r\n\t\tlua_pushnil(L);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a43741fed6b71dfb", - "equalIndicator/v1": "69ae1cc5368add68948f84e14f38d4fc6646601ff606c4fb0a7c76fdd1a7227b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 805, - "startColumn": 7, - "charOffset": 30853, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 803, - "startColumn": 1, - "charOffset": 30728, - "charLength": 276, - "snippet": { - "text": "\r\nvoid EventCallback::playerOnGainSkillTries(std::shared_ptr player, skills_t skill, uint64_t &tries) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnGainSkillTries - \"\r\n\t\t \"Player {} skill {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "141df54c99b543a6", - "equalIndicator/v1": "69ae84d3a56aea27d92e5b32e0bf22e91efc5c97fceb8109d76ec66d756cd690" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'getStowableItems' is within a recursive call chain", - "markdown": "Function 'getStowableItems' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 131, - "startColumn": 31, - "charOffset": 3966, - "charLength": 16, - "snippet": { - "text": "getStowableItems" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 129, - "startColumn": 1, - "charOffset": 3931, - "charLength": 128, - "snippet": { - "text": "}\r\n\r\nStashContainerList Container::getStowableItems() const {\r\n\tStashContainerList toReturnList;\r\n\tfor (auto item : itemlist) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c518b54e3eb2e0f3", - "equalIndicator/v1": "69b9f179a366d1f0bcf57c0b9d81ab10bac14780dda8f2dfccf15efb516c980a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", - "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/message/networkmessage.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 32, - "startColumn": 9, - "charOffset": 967, - "charLength": 11, - "snippet": { - "text": "std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 30, - "startColumn": 1, - "charOffset": 834, - "charLength": 165, - "snippet": { - "text": "\tchar* v = reinterpret_cast(buffer) + info.position; // does not break strict aliasing\r\n\tinfo.position += stringLen;\r\n\treturn std::string(v, stringLen);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f19d493e64e03dc5", - "equalIndicator/v1": "69c910c7b2cfd1e1aa019a84fa537913fceb5d56bfb4acc48692323cdcc4978c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/rewards/rewardchest.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 23, - "startColumn": 14, - "charOffset": 684, - "charLength": 8, - "snippet": { - "text": "queryAdd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 21, - "startColumn": 1, - "charOffset": 639, - "charLength": 340, - "snippet": { - "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) final;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7c4c83195fae80b8", - "equalIndicator/v1": "69cab1acc60f7b7482c91a1a201d8892054ff480398ae11fc72db7d782198ba1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/vocations/vocation.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 88, - "startColumn": 10, - "charOffset": 2227, - "charLength": 11, - "snippet": { - "text": "attackSpeed" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 86, - "startColumn": 1, - "charOffset": 2180, - "charLength": 128, - "snippet": { - "text": "\r\n\tuint32_t getAttackSpeed() const {\r\n\t\treturn attackSpeed / g_configManager().getFloat(RATE_ATTACK_SPEED, __FUNCTION__);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bc53ff9fbd662b97", - "equalIndicator/v1": "69d49e28f5a3b33414c6033d58b84ca469eba0bd9b4d471698e5cd10b61e09b3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/player_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2305, - "startColumn": 71, - "charOffset": 80180, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2303, - "startColumn": 1, - "charOffset": 80105, - "charLength": 155, - "snippet": { - "text": "}\r\n\r\nint32_t PlayerWheel::checkTwinBurstByTarget(std::shared_ptr target) const {\r\n\tif (!target || target == m_player.getPlayer()) {\r\n\t\treturn 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "41ee9cd98d460784", - "equalIndicator/v1": "69d6730852b7db4d5c9d4b0530cb3828d2ae7b6adeee51e364983a9a5945173b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/weapon_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 256, - "startColumn": 25, - "charOffset": 7182, - "charLength": 19, - "snippet": { - "text": "getNumber" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 254, - "startColumn": 1, - "charOffset": 7078, - "charLength": 197, - "snippet": { - "text": "\t\tweapon->setMinChange(getNumber(L, 2));\r\n\t\tif (lua_gettop(L) > 2) {\r\n\t\t\tweapon->setMaxChange(getNumber(L, 3));\r\n\t\t} else {\r\n\t\t\tweapon->setMaxChange(getNumber(L, 2));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e9e00e5314e7946d", - "equalIndicator/v1": "6a404488771aabd9d75ba57beace3058b828e3fb197c0dd0473ed8fc1a3c0567" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4693, - "startColumn": 7, - "charOffset": 148111, - "charLength": 31, - "snippet": { - "text": "auto [category, containersPair]" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4691, - "startColumn": 1, - "charOffset": 148059, - "charLength": 167, - "snippet": { - "text": "\tmsg.skipBytes(1);\r\n\tuint8_t containers = 0;\r\n\tfor (auto [category, containersPair] : managedContainersMap) {\r\n\t\tif (!isValidObjectCategory(category)) {\r\n\t\t\tcontinue;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3071f8188a318bb1", - "equalIndicator/v1": "6ae1938f595111810ae4da3501d720ba5e78f2a541593cb21e39794d4283f6f5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 227, - "startColumn": 7, - "charOffset": 8131, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 225, - "startColumn": 1, - "charOffset": 8119, - "charLength": 209, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventCreatureOnChangeOutfit - Creature {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4ba606b46c6e1ccf", - "equalIndicator/v1": "6b4075f9b472c46b92c59140cee36da5dd2b767aa0ffd8cf4b6f0f0da4aa9fcf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1261, - "startColumn": 10, - "charOffset": 34947, - "charLength": 9, - "snippet": { - "text": "manaTicks" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1259, - "startColumn": 1, - "charOffset": 34899, - "charLength": 129, - "snippet": { - "text": "\r\n\tif (player != nullptr && isBuff) {\r\n\t\treturn manaTicks / g_configManager().getFloat(RATE_SPELL_COOLDOWN, __FUNCTION__);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6957928e76c4b50e", - "equalIndicator/v1": "6b4686e5f80c6e6ba52af5ecf9e8a89886ccdc48156a1dde4a67698787e1eade" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 737, - "startColumn": 7, - "charOffset": 28477, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 735, - "startColumn": 1, - "charOffset": 28319, - "charLength": 310, - "snippet": { - "text": "\r\nvoid EventCallback::playerOnGainExperience(std::shared_ptr player, std::shared_ptr target, uint64_t &exp, uint64_t rawExp) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnGainExperience - \"\r\n\t\t \"Player {} target {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a92553c2411f7cb4", - "equalIndicator/v1": "6b4a52b4049ec54d6d5a546a74b34bf7842192edfe648cadc244cb001f193350" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '__METHOD_NAME__', which is a reserved identifier", - "markdown": "Declaration uses identifier '__METHOD_NAME__', which is a reserved identifier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/pch.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 182, - "startColumn": 2, - "charOffset": 4173, - "charLength": 55, - "snippet": { - "text": "#define __METHOD_NAME__ methodName(__PRETTY_FUNCTION__)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 180, - "startColumn": 1, - "charOffset": 4125, - "charLength": 179, - "snippet": { - "text": "\r\n#if defined(__GNUC__) || defined(__clang__)\r\n\t#define __METHOD_NAME__ methodName(__PRETTY_FUNCTION__)\r\n#elif defined(_MSC_VER)\r\n\t#define __METHOD_NAME__ methodName(__FUNCSIG__)\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "64abb4eaa9ce2fc6", - "equalIndicator/v1": "6b4e4e719a0b3abb3cdcea040c927e3aa1ef538195412e18ac1e5ec0fa7e8398" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8588, - "startColumn": 2, - "charOffset": 270879, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8586, - "startColumn": 1, - "charOffset": 270872, - "charLength": 125, - "snippet": { - "text": "\t}\r\n\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t itemTier = 0;\r\n\tif (Item::items[itemId].upgradeClassification > 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2c058415ea678f06", - "equalIndicator/v1": "6b8a269e4dc8448f80561b9658d179a554a66961111933454f61d6dd21e3e510" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 572, - "startColumn": 39, - "charOffset": 26955, - "charLength": 14, - "snippet": { - "text": "valueAttribute" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 570, - "startColumn": 1, - "charOffset": 26791, - "charLength": 317, - "snippet": { - "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;\r\n\t} else if (stringValue == \"absorbpercentmagic\") {\r\n\t\tint16_t value = pugi::cast(valueAttribute.value());\r\n\t\tAbilities &abilities = itemType.getAbilities();\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0ce35f913ba1f5d4", - "equalIndicator/v1": "6bbe965b27756e1325bb11b422bd8c99d3b932454659cd449cac0d7f78243b67" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 124, - "startColumn": 10, - "charOffset": 3110, - "charLength": 13, - "snippet": { - "text": "getThrowRange" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 122, - "startColumn": 1, - "charOffset": 3095, - "charLength": 71, - "snippet": { - "text": "\t}\r\n\r\n\tint32_t getThrowRange() const override final {\r\n\t\treturn 0;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "19a7c6c82231d09f", - "equalIndicator/v1": "6bd60f1808304a6ca301a0aa4bdb730e38df797bd7ff5041c3c41ed1a5c0379a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/container_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 161, - "startColumn": 2, - "charOffset": 4470, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 159, - "startColumn": 1, - "charOffset": 4406, - "charLength": 190, - "snippet": { - "text": "\r\n\tint32_t index = getNumber(L, 4, INDEX_WHEREEVER);\r\n\tuint32_t flags = getNumber(L, 5, 0);\r\n\r\n\tReturnValue ret = g_game().internalAddItem(container, item, index, flags);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "60af0811eb33776b", - "equalIndicator/v1": "6be871e358296586bbb248ed632b5f32d4aa8aa046265faa49b8abc2f94d9ad6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1909, - "startColumn": 50, - "charOffset": 56655, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1907, - "startColumn": 1, - "charOffset": 56505, - "charLength": 168, - "snippet": { - "text": "\tvoid updateInputAnalyzer(CombatType_t type, int32_t amount, std::string target) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendUpdateInputAnalyzer(type, amount, target);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4dec9ecc9ead50ae", - "equalIndicator/v1": "6bf1b42a80da0eeaf35428220b8b7f3356d60e5140f92520f580546472b3f941" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '_Valty', which is a reserved identifier", - "markdown": "Declaration uses identifier '_Valty', which is a reserved identifier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/vectorset.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 51, - "startColumn": 22, - "charOffset": 1278, - "charLength": 6, - "snippet": { - "text": "_Valty" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 49, - "startColumn": 1, - "charOffset": 1250, - "charLength": 93, - "snippet": { - "text": "\t\t}\r\n\r\n\t\ttemplate \r\n\t\tauto emplace(_Valty &&... v) {\r\n\t\t\tneedUpdate = true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b9814ab7a2c6b926", - "equalIndicator/v1": "6bf2bfaf629be5685ba52beacdf05efcb7d5ff29b4e6da2bf0b4baee42cd2b5c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 583, - "startColumn": 3, - "charOffset": 27720, - "charLength": 8, - "snippet": { - "text": "itemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 581, - "startColumn": 1, - "charOffset": 27538, - "charLength": 526, - "snippet": { - "text": "\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentfire\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentpoison\" || stringValue == \"absorbpercentearth\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += pugi::cast(valueAttribute.value());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "231b7a59d83f7f8a", - "equalIndicator/v1": "6c04a25c59642bfd565deeac35f2715a42eff77d283f945b1dfe3614cfc4b2d8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iobestiary.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 77, - "startColumn": 65, - "charOffset": 3104, - "charLength": 34, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 75, - "startColumn": 1, - "charOffset": 2948, - "charLength": 348, - "snippet": { - "text": "\tstd::vector getBestiaryFinished(const std::shared_ptr &player) const;\r\n\r\n\tcharmRune_t getCharmFromTarget(std::shared_ptr player, const std::shared_ptr mtype);\r\n\r\n\tstd::map getBestiaryKillCountByMonsterIDs(std::shared_ptr player, std::map mtype_list) const;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "190dc287d0c8f1da", - "equalIndicator/v1": "6c06a08fc8b43684cf655e06a251f1d5d9122801335de79273b19c6c0e3323e7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1010, - "startColumn": 62, - "charOffset": 32265, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1008, - "startColumn": 1, - "charOffset": 32199, - "charLength": 128, - "snippet": { - "text": "}\r\n\r\nbool Creature::setAttackedCreature(std::shared_ptr creature) {\r\n\tif (creature) {\r\n\t\tauto monster = getMonster();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b76dc599eafcfd4e", - "equalIndicator/v1": "6c0bbe307f505ca87946d7d670d77bb5e8eac9842eb7651b52a58a2655ecc4ea" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 121, - "startColumn": 21, - "charOffset": 3729, - "charLength": 32, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 119, - "startColumn": 1, - "charOffset": 3647, - "charLength": 435, - "snippet": { - "text": "\tvoid clearPosMap(std::map &map);\r\n\r\n\tbool registerEvent(const std::shared_ptr moveEvent, int32_t id, std::map &moveListMap) const;\r\n\tbool registerEvent(const std::shared_ptr moveEvent, const Position &position, std::map &moveListMap) const;\r\n\tstd::shared_ptr getEvent(const std::shared_ptr &tile, MoveEvent_t eventType);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bc5ab8901161bdf8", - "equalIndicator/v1": "6c11518f6edd2d4d2f1b9e316c3c88c2ba77bba52b5aa94a82a89109f84f855a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 459, - "startColumn": 7, - "charOffset": 16372, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 457, - "startColumn": 1, - "charOffset": 16360, - "charLength": 136, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPartyOnLeave - \"\r\n\t\t \"Player {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7f6de6624d243893", - "equalIndicator/v1": "6c1705793dd3cb14307d7e8ddba531ad5a7d52de59b15c1c3f3482a9da63818d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4424, - "startColumn": 89, - "charOffset": 159245, - "charLength": 5, - "snippet": { - "text": "house" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4422, - "startColumn": 1, - "charOffset": 159152, - "charLength": 174, - "snippet": { - "text": "}\r\n\r\nstd::shared_ptr Game::wrapItem(std::shared_ptr item, std::shared_ptr house) {\r\n\tuint16_t hiddenCharges = 0;\r\n\tuint16_t amount = item->getItemCount();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ac9a14f846d1853b", - "equalIndicator/v1": "6c23319fe33ae356166d05fd50a191dd6746afbdd158dca2c882ff9eecc6ca98" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3256, - "startColumn": 63, - "charOffset": 99793, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3254, - "startColumn": 1, - "charOffset": 99726, - "charLength": 135, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureIcon(std::shared_ptr creature) {\r\n\tif (!creature || !player || oldProtocol) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "896d7f40911ba863", - "equalIndicator/v1": "6c3a1a0af5b686d3ecd5ae2764d0b95c2ab203bd0f385ba12979a7357212f966" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8163, - "startColumn": 84, - "charOffset": 258189, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8161, - "startColumn": 1, - "charOffset": 258101, - "charLength": 187, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::MoveDownCreature(NetworkMessage &msg, std::shared_ptr creature, const Position &newPos, const Position &oldPos) {\r\n\tif (creature != player) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "eb337d3f332861da", - "equalIndicator/v1": "6c6253c2eb2de8d639a2d2940afba89b9e142a5d5bf4aa0cd58e5f99366db796" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6108, - "startColumn": 51, - "charOffset": 211133, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6106, - "startColumn": 1, - "charOffset": 211078, - "charLength": 158, - "snippet": { - "text": "}\r\n\r\nbool Game::playerSaySpell(std::shared_ptr player, SpeakClasses type, const std::string &text) {\r\n\tif (player->walkExhausted()) {\r\n\t\treturn true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9ac3ff3903f3987a", - "equalIndicator/v1": "6cac23fcf63c11072b9b08a95b2f2f40730b7dcf0cdd6d8676b36511e45c7a90" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/npcs/npc.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 147, - "startColumn": 50, - "charOffset": 4529, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 145, - "startColumn": 1, - "charOffset": 4475, - "charLength": 167, - "snippet": { - "text": "}\r\n\r\nvoid Npc::onPlayerAppear(std::shared_ptr player) {\r\n\tif (player->hasFlag(PlayerFlags_t::IgnoredByNpcs) || playerSpectators.contains(player)) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8425648025948950", - "equalIndicator/v1": "6caedfc6434b93d20c8c29a97aba96ef32ea37bb05f82de3852f89649b779d5f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 927, - "startColumn": 41, - "charOffset": 35413, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 925, - "startColumn": 1, - "charOffset": 35367, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1ce647d932d46d4a", - "equalIndicator/v1": "6cc6aac323b8c87cc1fbd51ffb38de8058904daf0dc0a5049f1c9359f4a660b1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 919, - "startColumn": 7, - "charOffset": 35067, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 917, - "startColumn": 1, - "charOffset": 34955, - "charLength": 267, - "snippet": { - "text": "\r\nvoid EventCallback::playerOnRequestQuestLine(std::shared_ptr player, uint16_t questId) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnRequestQuestLine - \"\r\n\t\t \"Player {} questId {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e18f24993e120630", - "equalIndicator/v1": "6ce15e2708401d22124a7eaa5e9585224aa133b8cdef43b40bf609408a85c299" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Repeated branch body in conditional chain", - "markdown": "Repeated branch body in conditional chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/player_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1766, - "startColumn": 32, - "charOffset": 47238, - "charLength": 26, - "snippet": { - "text": "LUA_ERROR_PLAYER_NOT_FOUND" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1764, - "startColumn": 1, - "charOffset": 47122, - "charLength": 185, - "snippet": { - "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (!player) {\r\n\t\treportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));\r\n\t\tpushBoolean(L, false);\r\n\t\treturn 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "78223711a98f8f73", - "equalIndicator/v1": "6ce4f7f03a90d2bdc694a47027c9e50507c565f7fedcfba31d07c698ebb08a8f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/trashholder.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 43, - "startColumn": 7, - "charOffset": 1967, - "charLength": 22, - "snippet": { - "text": "postRemoveNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 41, - "startColumn": 1, - "charOffset": 1806, - "charLength": 315, - "snippet": { - "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n};\r\n" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "051903942b2f6ed6", - "equalIndicator/v1": "6ce5fc3467c48dbc5101a711216dc9470e6216cb26fa89b0dddfd64699fcee85" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/ioguild.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 71, - "startColumn": 3, - "charOffset": 2401, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 69, - "startColumn": 1, - "charOffset": 2390, - "charLength": 134, - "snippet": { - "text": "\r\n\tdo {\r\n\t\tuint32_t guild1 = result->getNumber(\"guild1\");\r\n\t\tif (guildId != guild1) {\r\n\t\t\tguildWarVector.push_back(guild1);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7980a7cf5f007b07", - "equalIndicator/v1": "6cf481b298a928c5b401525db55a03593576a74057f76df4aa6a2fc5588ca812" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Repeated branch body in conditional chain", - "markdown": "Repeated branch body in conditional chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/cyclopedia/player_title.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 244, - "startColumn": 30, - "charOffset": 7421, - "charLength": 1, - "snippet": { - "text": "{" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 242, - "startColumn": 1, - "charOffset": 7255, - "charLength": 266, - "snippet": { - "text": "bool PlayerTitle::checkBestiary(const std::string &name, uint16_t race, bool isBoss /* = false*/, uint32_t amount) {\r\n\tif (race == 0) {\r\n\t\tif (name == \"Executioner\") {\r\n\t\t\t// todo check if player has unlocked all bestiary\r\n\t\t} else if (name == \"Boss Executioner\") {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "97bd5d9def354cba", - "equalIndicator/v1": "6d0a284204da0662c79079f594c0753f96b18aa27e327435da0d1abd35c9c08d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 172, - "startColumn": 15, - "charOffset": 5986, - "charLength": 10, - "snippet": { - "text": "removeItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 170, - "startColumn": 1, - "charOffset": 5938, - "charLength": 171, - "snippet": { - "text": "\tvoid stopDecaying() override;\r\n\r\n\tvirtual void removeItem(std::shared_ptr thing, bool sendUpdateToClient = false);\r\n\r\n\tuint32_t getOwnerId() const override final;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7e1f97b3415cb78e", - "equalIndicator/v1": "6d13658d5b790e00a8898393965bb3857b7f7a43e93d85635950482f23471479" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 356, - "startColumn": 82, - "charOffset": 16980, - "charLength": 14, - "snippet": { - "text": "const uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 354, - "startColumn": 1, - "charOffset": 16775, - "charLength": 519, - "snippet": { - "text": "\tvoid playerMoveUpContainer(uint32_t playerId, uint8_t cid);\r\n\tvoid playerUpdateContainer(uint32_t playerId, uint8_t cid);\r\n\tvoid playerRotateItem(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerConfigureShowOffSocket(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerSetShowOffSocket(uint32_t playerId, Outfit_t &outfit, const Position &pos, uint8_t stackPos, const uint16_t itemId, uint8_t podiumVisible, uint8_t direction);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ff46fb4d148be6cc", - "equalIndicator/v1": "6d5d627ff21ed8b27aee82ead133fa9153cab8e27bfe65001c708de57c71fb62" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 153, - "startColumn": 28, - "charOffset": 4131, - "charLength": 29, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 151, - "startColumn": 1, - "charOffset": 3978, - "charLength": 330, - "snippet": { - "text": "\tReturnValue canUseFar(std::shared_ptr creature, const Position &toPos, bool checkLineOfSight, bool checkFloor);\r\n\r\n\tbool registerLuaItemEvent(const std::shared_ptr action);\r\n\tbool registerLuaUniqueEvent(const std::shared_ptr action);\r\n\tbool registerLuaActionEvent(const std::shared_ptr action);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6997594f772272b4", - "equalIndicator/v1": "6d75e364eb9303810016c16557e225b01a963904e4d491db3b398359bd163aaa" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2051, - "startColumn": 58, - "charOffset": 60749, - "charLength": 9, - "snippet": { - "text": "container" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2049, - "startColumn": 1, - "charOffset": 60687, - "charLength": 103, - "snippet": { - "text": "}\r\n\r\nvoid Player::onCloseContainer(std::shared_ptr container) {\r\n\tif (!client) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7922279f35faed7f", - "equalIndicator/v1": "6d8a07cfabfa28133fba2c67cd0f01eb06459e77d83a14b9dd9019a4317857ee" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 186, - "startColumn": 41, - "charOffset": 6885, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 184, - "startColumn": 1, - "charOffset": 6839, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e635aee8f50dfbd7", - "equalIndicator/v1": "6d946befef12d0bf59d09c80c5c75b066e986b1e839092e9493c8bc55a49609a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::basic_string::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::basic_string::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/player_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2047, - "startColumn": 29, - "charOffset": 54771, - "charLength": 8, - "snippet": { - "text": "uint64_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2045, - "startColumn": 1, - "charOffset": 54659, - "charLength": 213, - "snippet": { - "text": "int PlayerFunctions::luaPlayerAddMoney(lua_State* L) {\r\n\t// player:addMoney(money)\r\n\tuint64_t money = getNumber(L, 2);\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (player) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d4b1458d998289fe", - "equalIndicator/v1": "6daa92bd36dd6d55a742cafcd920b141cd59f179fb6d47a1c00a81e8ae7d85e4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 197, - "startColumn": 56, - "charOffset": 6123, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 195, - "startColumn": 1, - "charOffset": 6063, - "charLength": 260, - "snippet": { - "text": "}\r\n\r\nvoid Weapon::internalUseWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target, int32_t damageModifier, int32_t cleavePercent) const {\r\n\tif (player) {\r\n\t\tif (params.soundCastEffect == SoundEffect_t::SILENCE) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5dffedf23a54884d", - "equalIndicator/v1": "6dd564378eeedf601c8e76509e1380ff9d390de5398ce2ca814a2ec0ff5fd70f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 897, - "startColumn": 61, - "charOffset": 32499, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 895, - "startColumn": 1, - "charOffset": 32434, - "charLength": 238, - "snippet": { - "text": "}\r\n\r\nbool Events::eventPlayerOnReportBug(std::shared_ptr player, const std::string &message, const Position &position, uint8_t category) {\r\n\t// Player:onReportBug(message, position, category)\r\n\tif (info.playerOnReportBug == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5e6dda52eea85ea0", - "equalIndicator/v1": "6ddab777e2468b22f09db05184613b92c8af061817422ecfb140db041e51899e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 351, - "startColumn": 9, - "charOffset": 12158, - "charLength": 29, - "snippet": { - "text": "auto [category, containerMap]" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 349, - "startColumn": 1, - "charOffset": 12092, - "charLength": 190, - "snippet": { - "text": "\t\t\tuint32_t lootFlags = 0;\r\n\t\t\tuint32_t obtainFlags = 0;\r\n\t\t\tfor (auto [category, containerMap] : player->m_managedContainers) {\r\n\t\t\t\tif (!isValidObjectCategory(category)) {\r\n\t\t\t\t\tcontinue;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2d8ecbd7f17095d6", - "equalIndicator/v1": "6e22aac5a75620a4a25e2713d1eaee327e914a70c15e31d1eac6109302d77563" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/network/webhook_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 27, - "startColumn": 43, - "charOffset": 1062, - "charLength": 5, - "snippet": { - "text": "color" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 25, - "startColumn": 1, - "charOffset": 969, - "charLength": 128, - "snippet": { - "text": "\t\tg_webhook().sendMessage(title, url);\r\n\t} else {\r\n\t\tg_webhook().sendMessage(title, message, color, url);\r\n\t}\r\n\tlua_pushnil(L);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a33f36df74f919e0", - "equalIndicator/v1": "6e2797e2689f79205342c6f92b94c09663650b942035ff22e8194fdb7131f13a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1176, - "startColumn": 41, - "charOffset": 44789, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1174, - "startColumn": 1, - "charOffset": 44743, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2cb0f2146d68d814", - "equalIndicator/v1": "6e3040c89580658c4a861199464f0fb10c74a95b82e10c61b66f0214b4918eb0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'removeThing' is within a recursive call chain", - "markdown": "Function 'removeThing' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1189, - "startColumn": 12, - "charOffset": 35368, - "charLength": 11, - "snippet": { - "text": "removeThing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1187, - "startColumn": 1, - "charOffset": 35352, - "charLength": 155, - "snippet": { - "text": "}\r\n\r\nvoid Tile::removeThing(std::shared_ptr thing, uint32_t count) {\r\n\tstd::shared_ptr creature = thing->getCreature();\r\n\tif (creature) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d565d81ef00f0e69", - "equalIndicator/v1": "6e35eea883cfad0866aec121c384b188ae42a172177a5625f427ba77271da0dc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'virtual' is redundant since the function is already declared 'override'", - "markdown": "'virtual' is redundant since the function is already declared 'override'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/cylinder.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 196, - "startColumn": 15, - "charOffset": 8005, - "charLength": 11, - "snippet": { - "text": "removeThing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 194, - "startColumn": 1, - "charOffset": 7832, - "charLength": 371, - "snippet": { - "text": "\tvirtual void updateThing(std::shared_ptr, uint16_t, uint32_t) override { }\r\n\tvirtual void replaceThing(uint32_t, std::shared_ptr) override { }\r\n\tvirtual void removeThing(std::shared_ptr, uint32_t) override { }\r\n\r\n\tvirtual void postAddNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a27b359ece1bb1ad", - "equalIndicator/v1": "6e3e206993a464859324ce46fc4fc4a81726e670cfbbc493f89423d358981481" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 672, - "startColumn": 28, - "charOffset": 21766, - "charLength": 6, - "snippet": { - "text": "damage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 670, - "startColumn": 1, - "charOffset": 21673, - "charLength": 205, - "snippet": { - "text": "\r\n\t\tdamage.secondary.type = imbuementInfo.imbuement->combatType;\r\n\t\tdamage.secondary.value = damage.primary.value * (damagePercent);\r\n\t\tdamage.primary.value = damage.primary.value * (1 - damagePercent);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "700f72283a214988", - "equalIndicator/v1": "6e6dea4507863cd34b42e05d10fe516dab42618e7a9e4aa92c2ab2bbcc85c3aa" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1735, - "startColumn": 3, - "charOffset": 60653, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1733, - "startColumn": 1, - "charOffset": 60535, - "charLength": 168, - "snippet": { - "text": "\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r\n\t\treturn;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f78b85f66a6c4198", - "equalIndicator/v1": "6eda787ab81b8a54b4f90a82a935c561c4676ff963f5ab4c0d547b0ec4b058fc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6945, - "startColumn": 93, - "charOffset": 241400, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6943, - "startColumn": 1, - "charOffset": 241303, - "charLength": 231, - "snippet": { - "text": "}\r\n\r\nbool Game::combatChangeHealth(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage, bool isEvent /*= false*/) {\r\n\tusing namespace std;\r\n\tconst Position &targetPos = target->getPosition();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "be92f382057cecf8", - "equalIndicator/v1": "6f0a0f2414499558949fdeae96e7df566ec414868f7e5484a2f0f63ea7d9c05f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The 'empty' method should be used to check for emptiness instead of 'size'", - "markdown": "The 'empty' method should be used to check for emptiness instead of 'size'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1811, - "startColumn": 16, - "charOffset": 51088, - "charLength": 5, - "snippet": { - "text": "items" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1809, - "startColumn": 1, - "charOffset": 50963, - "charLength": 169, - "snippet": { - "text": "std::shared_ptr Tile::getUseItem(int32_t index) const {\r\n\tconst TileItemVector* items = getItemList();\r\n\tif (!items || items->size() == 0) {\r\n\t\treturn ground;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0a52ee166527afd7", - "equalIndicator/v1": "6f178155111934f5223f1e6ead213e78af64a036b01ad60d608a93eeca2329fa" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 408, - "startColumn": 6, - "charOffset": 14567, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 406, - "startColumn": 1, - "charOffset": 14523, - "charLength": 181, - "snippet": { - "text": "\tlua_pushnumber(L, colorSecondary);\r\n\r\n\tif (scriptInterface.protectedCall(L, 8, 6) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c6d4430cb3e3e201", - "equalIndicator/v1": "6f48a7e66608a04d857f86f6b8cc75514b8eec222bbcd54aa794474f322d8677" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2020, - "startColumn": 2, - "charOffset": 61833, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2018, - "startColumn": 1, - "charOffset": 61737, - "charLength": 217, - "snippet": { - "text": "void ProtocolGame::parseRotateItem(NetworkMessage &msg) {\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tconst auto &itemType = Item::items[itemId];\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "167cfbe03712b05a", - "equalIndicator/v1": "6fa4d9657cbb33966f6d0c22cb3a3ecafb93b39b05c6c93c0ab3512c908b5950" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/movement/teleport.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 42, - "startColumn": 23, - "charOffset": 1463, - "charLength": 11, - "snippet": { - "text": "queryRemove" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 40, - "startColumn": 1, - "charOffset": 1436, - "charLength": 168, - "snippet": { - "text": "}\r\n\r\nReturnValue Teleport::queryRemove(const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr /*= nullptr */) {\r\n\treturn RETURNVALUE_NOERROR;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b3ce75e13a049d37", - "equalIndicator/v1": "6fada6a8b11ac963c89e02c13639ac826627dda083909e2553c470f2fb247924" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 186, - "startColumn": 2, - "charOffset": 4756, - "charLength": 12, - "snippet": { - "text": "SpeakClasses" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 184, - "startColumn": 1, - "charOffset": 4713, - "charLength": 219, - "snippet": { - "text": "\tbool ghost = getBoolean(L, 4, false);\r\n\r\n\tSpeakClasses type = getNumber(L, 3, TALKTYPE_PRIVATE_NP);\r\n\tconst std::string &text = getString(L, 2);\r\n\tstd::shared_ptr npc = getUserdataShared(L, 1);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c1eca87de86f8b1a", - "equalIndicator/v1": "6fcef2573de4130df221e57fe8499b5788622ddeaf5284654077833587f5c02d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1150, - "startColumn": 25, - "charOffset": 37535, - "charLength": 4, - "snippet": { - "text": "maxY" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1148, - "startColumn": 1, - "charOffset": 37456, - "charLength": 129, - "snippet": { - "text": "\r\n\tconst int32_t rangeX = maxX + MAP_MAX_VIEW_PORT_X;\r\n\tconst int32_t rangeY = maxY + MAP_MAX_VIEW_PORT_Y;\r\n\r\n\tint affected = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f105274975075af8", - "equalIndicator/v1": "6ff075c9e4c51cb70eecd6776e0b029ae65e9b956cdff7d7a4f723847fbae4dc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Repeated branch body in conditional chain", - "markdown": "Repeated branch body in conditional chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 628, - "startColumn": 37, - "charOffset": 19449, - "charLength": 1, - "snippet": { - "text": "{" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 626, - "startColumn": 1, - "charOffset": 19407, - "charLength": 96, - "snippet": { - "text": "\t}\r\n\r\n\tif (index == 255 /*add wherever*/) {\r\n\t\tindex = INDEX_WHEREEVER;\r\n\t\t*destItem = nullptr;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "51a468e572b6d5ee", - "equalIndicator/v1": "7004a7dfa03cde67081793f19c39d74f5ec0d6c187de5dd7e508e9a701aa0f7b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1137, - "startColumn": 122, - "charOffset": 40760, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1135, - "startColumn": 1, - "charOffset": 40634, - "charLength": 286, - "snippet": { - "text": "}\r\n\r\nvoid Events::eventPlayerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) {\r\n\t// Player:onCombat(target, item, primaryDamage, primaryType, secondaryDamage, secondaryType)\r\n\tif (info.playerOnCombat == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cd48e25f6cb7eef2", - "equalIndicator/v1": "7016129827f426a3207534a953ad4d8e14e679ba3b1b9e7d4ea98e523c12960e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2195, - "startColumn": 11, - "charOffset": 65753, - "charLength": 5, - "snippet": { - "text": "mType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2193, - "startColumn": 1, - "charOffset": 65664, - "charLength": 210, - "snippet": { - "text": "\tmonsterForgeClassification = ForgeClassifications_t::FORGE_NORMAL_MONSTER;\r\n\r\n\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "86b6c62b6e2b560d", - "equalIndicator/v1": "7018eb3a32b1e2ae4784e8b41d6f2d0ad2fbe997be2500fd5d687837d5b4b50e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use emplace_back instead of push_back", - "markdown": "Use emplace_back instead of push_back" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 141, - "startColumn": 17, - "charOffset": 4475, - "charLength": 9, - "snippet": { - "text": "push_back" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 139, - "startColumn": 1, - "charOffset": 4413, - "charLength": 177, - "snippet": { - "text": "\t\t\t}\r\n\t\t} else if (item->isItemStorable()) {\r\n\t\t\ttoReturnList.push_back(std::pair, uint32_t>(item, static_cast(item->getItemCount())));\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4d56c6ea3a083e29", - "equalIndicator/v1": "7026086dc9dc809c6d82e498a00364fe7638d52edbaf1d3728711c350989fd21" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 248, - "startColumn": 105, - "charOffset": 8953, - "charLength": 4, - "snippet": { - "text": "tile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 246, - "startColumn": 1, - "charOffset": 8844, - "charLength": 269, - "snippet": { - "text": "}\r\n\r\nReturnValue Events::eventCreatureOnAreaCombat(std::shared_ptr creature, std::shared_ptr tile, bool aggressive) {\r\n\t// Creature:onAreaCombat(tile, aggressive) or Creature.onAreaCombat(self, tile, aggressive)\r\n\tif (info.creatureOnAreaCombat == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b87aab409c694e52", - "equalIndicator/v1": "70376750c8cee8b2b365f36287576697485bd39d64e00ea8a7deb970eb914949" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1664, - "startColumn": 63, - "charOffset": 58338, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1662, - "startColumn": 1, - "charOffset": 58210, - "charLength": 264, - "snippet": { - "text": "//**********************************************************//\r\n\r\nvoid TargetCallback::onTargetCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\t// onTargetCombat(creature, target)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "de1e56f631b2b3da", - "equalIndicator/v1": "703e75e2f078acb3e9febbab2c3669f5454aca76e43b740996b8ad909a8a29a3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/management/ban.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 95, - "startColumn": 2, - "charOffset": 3108, - "charLength": 7, - "snippet": { - "text": "int64_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 93, - "startColumn": 1, - "charOffset": 3101, - "charLength": 151, - "snippet": { - "text": "\t}\r\n\r\n\tint64_t expiresAt = result->getNumber(\"expires_at\");\r\n\tif (expiresAt != 0 && time(nullptr) > expiresAt) {\r\n\t\tquery.str(std::string());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "401c7a8e8c5889d4", - "equalIndicator/v1": "703e912605f2ff730f3beef5081aea8d130d1e73e9f8c75d9ca6c9c9c687ec3b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/movement/teleport.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 23, - "startColumn": 28, - "charOffset": 671, - "charLength": 11, - "snippet": { - "text": "getCylinder" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 21, - "startColumn": 1, - "charOffset": 638, - "charLength": 93, - "snippet": { - "text": "\t}\r\n\r\n\tstd::shared_ptr getCylinder() override final {\r\n\t\treturn getTeleport();\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "76fda9ea69e14ef6", - "equalIndicator/v1": "705a76816bf1a9760442fb935d29c5d923bc803be7ef8b21f41630897855a514" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 417, - "startColumn": 41, - "charOffset": 15728, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 415, - "startColumn": 1, - "charOffset": 15682, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0540a223792e0a65", - "equalIndicator/v1": "708798bd501657d986878a4d8b5fbd68b4d71a9f78a8b3be70a945cad6774785" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1399, - "startColumn": 56, - "charOffset": 48326, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1397, - "startColumn": 1, - "charOffset": 48266, - "charLength": 364, - "snippet": { - "text": "}\r\n\r\nvoid Combat::doCombatDefault(std::shared_ptr caster, std::shared_ptr target, const Position &origin, const CombatParams ¶ms) {\r\n\tif (!params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR)) {\r\n\t\tauto spectators = Spectators().find(target->getPosition(), true);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8fbed7471dff97f1", - "equalIndicator/v1": "70ad54f196b2c41f6c66eccfa0e4edb864f48f190fbc10b3de75df86a076cbf1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 549, - "startColumn": 21, - "charOffset": 17766, - "charLength": 5, - "snippet": { - "text": "level" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 547, - "startColumn": 1, - "charOffset": 17641, - "charLength": 252, - "snippet": { - "text": "\r\n\tint32_t maxValue = Weapons::getMaxWeaponDamage(level, attackSkill, attackValue, attackFactor, true);\r\n\tint32_t minValue = level / 5;\r\n\r\n\treturn -normal_random(minValue, static_cast(maxValue * player->getVocation()->meleeDamageMultiplier));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5a55b080306a9c74", - "equalIndicator/v1": "70f36a7ebd05c0b567f904ab5623cc98ade15bdb79e710c9514cf2215470f361" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Repeated branch body in conditional chain", - "markdown": "Repeated branch body in conditional chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6576, - "startColumn": 112, - "charOffset": 193148, - "charLength": 1, - "snippet": { - "text": "{" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6574, - "startColumn": 1, - "charOffset": 192925, - "charLength": 325, - "snippet": { - "text": "\t\t\tif (!g_configManager().getBoolean(PREY_ENABLED, __FUNCTION__)) {\r\n\t\t\t\tslot->state = PreyDataState_Inactive;\r\n\t\t\t} else if (slot->id == PreySlot_Three && !g_configManager().getBoolean(PREY_FREE_THIRD_SLOT, __FUNCTION__)) {\r\n\t\t\t\tslot->state = PreyDataState_Locked;\r\n\t\t\t} else if (slot->id == PreySlot_Two && !isPremium()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ff62ac3b5160763f", - "equalIndicator/v1": "710c7c4033c77938d5a95629af517e8c60ff6b9d6dbb51d281b5b11482b2b814" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 706, - "startColumn": 127, - "charOffset": 27192, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 704, - "startColumn": 1, - "charOffset": 27061, - "charLength": 291, - "snippet": { - "text": "}\r\n\r\nbool EventCallback::playerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeAccept - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b81489c069dbfda8", - "equalIndicator/v1": "7114a54f9eb2ef9d0dadd5cb02993e73c382fab9acae182583a6198277764b50" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/talkaction.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 28, - "startColumn": 53, - "charOffset": 897, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 26, - "startColumn": 1, - "charOffset": 840, - "charLength": 333, - "snippet": { - "text": "}\r\n\r\nbool TalkActions::checkWord(std::shared_ptr player, SpeakClasses type, const std::string &words, const std::string_view &word, const TalkAction_ptr &talkActionPtr) const {\r\n\tauto spacePos = std::ranges::find_if(words.begin(), words.end(), ::isspace);\r\n\tstd::string firstWord = words.substr(0, spacePos - words.begin());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "54b14981f6a0b58b", - "equalIndicator/v1": "7116bb25fd6b0089314a2cad4cd2ebcf217414870b6fbcf7e2affaa81c7e5f61" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/depot/depotlocker.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 38, - "startColumn": 19, - "charOffset": 1297, - "charLength": 22, - "snippet": { - "text": "postRemoveNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 36, - "startColumn": 1, - "charOffset": 1274, - "charLength": 207, - "snippet": { - "text": "}\r\n\r\nvoid DepotLocker::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tauto parentLocked = m_parent.lock();\r\n\tif (parentLocked) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "79ee7193c3582fe4", - "equalIndicator/v1": "712d187c11a9f7d96764410fa3a831a8ea9ef6db5d529a217602a6692f0ce200" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '_Valty', which is a reserved identifier", - "markdown": "Declaration uses identifier '_Valty', which is a reserved identifier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/vectorsort.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 109, - "startColumn": 22, - "charOffset": 2569, - "charLength": 6, - "snippet": { - "text": "_Valty" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 107, - "startColumn": 1, - "charOffset": 2541, - "charLength": 108, - "snippet": { - "text": "\t\t}\r\n\r\n\t\ttemplate \r\n\t\tdecltype(auto) emplace_back(_Valty &&... v) {\r\n\t\t\tneedUpdate = true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c3d06573d38b5019", - "equalIndicator/v1": "713fd57eb0194a0bce8643899f66bfb94616a686809b0b35aadd78bf26afe6ec" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7688, - "startColumn": 39, - "charOffset": 240729, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7686, - "startColumn": 1, - "charOffset": 240582, - "charLength": 331, - "snippet": { - "text": "\t} else {\r\n\t\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\r\n\t\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\r\n\r\n\t\tmsg.addByte(static_cast(std::min(player->getMagicLevel(), std::numeric_limits::max())));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6e72a0637477257e", - "equalIndicator/v1": "714d041705ef86ee86abfb909fd0139efcd9354dc439fc6c1bfe6f0810a15931" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '__targetPos', which is a reserved identifier", - "markdown": "Declaration uses identifier '__targetPos', which is a reserved identifier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/map.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 642, - "startColumn": 86, - "charOffset": 18802, - "charLength": 11, - "snippet": { - "text": "__targetPos" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 640, - "startColumn": 1, - "charOffset": 18712, - "charLength": 347, - "snippet": { - "text": "}\r\n\r\nbool Map::getPathMatching(const std::shared_ptr &creature, const Position &__targetPos, std::vector &dirList, const FrozenPathingConditionCall &pathCondition, const FindPathParams &fpp) {\r\n\tstatic int_fast32_t allNeighbors[8][2] = {\r\n\t\t{ -1, 0 }, { 0, 1 }, { 1, 0 }, { 0, -1 }, { -1, -1 }, { 1, -1 }, { 1, 1 }, { -1, 1 }\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "669ecd881d70d184", - "equalIndicator/v1": "714d3ee9959abf2c1abd0ea4c9d2b0c0acccc6829d57b8639ad3891bb23cf2dc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1101, - "startColumn": 66, - "charOffset": 39503, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1099, - "startColumn": 1, - "charOffset": 39433, - "charLength": 199, - "snippet": { - "text": "}\r\n\r\nvoid Events::eventPlayerOnGainSkillTries(std::shared_ptr player, skills_t skill, uint64_t &tries) {\r\n\t// Player:onGainSkillTries(skill, tries)\r\n\tif (info.playerOnGainSkillTries == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "462986abc2487a4c", - "equalIndicator/v1": "7179bf87fd13d21ddad16123eb156b5c7b62384374a08dc6ea4d7090e026afef" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 373, - "startColumn": 7, - "charOffset": 13443, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 371, - "startColumn": 1, - "charOffset": 13431, - "charLength": 159, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventCreatureOnDrainHealth - \"\r\n\t\t \"Creature {} attacker {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "809dd163d23b7e00", - "equalIndicator/v1": "71be8907808a078d4e014cd4eb8d1c2e20cad475a8e4ee8d9a4418dfcba97b30" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 567, - "startColumn": 37, - "charOffset": 15259, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 565, - "startColumn": 1, - "charOffset": 15192, - "charLength": 140, - "snippet": { - "text": "\r\n\t\t\tcase STAT_MAXMANAPOINTS:\r\n\t\t\t\tstats[i] = static_cast(player->getMaxMana() * ((statsPercent[i] - 100) / 100.f));\r\n\t\t\t\tbreak;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "05476630e87a7af9", - "equalIndicator/v1": "71bfffc6686ce4e3775d5382b507212c1d3eca6ad9909c38a8be70352b5289e9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/kv.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 32, - "startColumn": 38, - "charOffset": 1114, - "charLength": 3, - "snippet": { - "text": "get" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 30, - "startColumn": 1, - "charOffset": 1000, - "charLength": 200, - "snippet": { - "text": "\tvirtual void set(const std::string &key, const ValueWrapper &value) = 0;\r\n\r\n\tvirtual std::optional get(const std::string &key, bool forceLoad = false) = 0;\r\n\r\n\tvirtual bool saveAll() {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cc364cd5a2406ac1", - "equalIndicator/v1": "71d5973dde843d3799a5c6dd86601cd97ff3f6d99fedd3d113d2f03aef602f2c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 55, - "startColumn": 8, - "charOffset": 1495, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 53, - "startColumn": 1, - "charOffset": 1397, - "charLength": 216, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeIsContainer(lua_State* L) {\r\n\t// itemType:isContainer()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isContainer());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8daac3d4c6a97522", - "equalIndicator/v1": "71d6523c6e57816c55bcfa1b33f215c4f167ea5dfd9d717c2e183bb778e09882" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4860, - "startColumn": 26, - "charOffset": 145370, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4858, - "startColumn": 1, - "charOffset": 145252, - "charLength": 132, - "snippet": { - "text": "\r\nvoid Player::onGainSharedExperience(uint64_t gainExp, std::shared_ptr target) {\r\n\tgainExperience(gainExp, target);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "237c1ed5d7202b52", - "equalIndicator/v1": "71f21225f8ade28965b13a61450960ffa48566325e0f01caa4bac1cb8364c6ff" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/cylinder.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 33, - "startColumn": 22, - "charOffset": 1201, - "charLength": 8, - "snippet": { - "text": "queryAdd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 31, - "startColumn": 1, - "charOffset": 1125, - "charLength": 225, - "snippet": { - "text": "\t * \\returns ReturnValue holds the return value\r\n\t */\r\n\tvirtual ReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) = 0;\r\n\r\n\t/**\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ac911400b207d83f", - "equalIndicator/v1": "71fdd484817aac290e2afc01cf583b03677f12110baee71445a371409b769102" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/modules/modules.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 162, - "startColumn": 27, - "charOffset": 4457, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 160, - "startColumn": 1, - "charOffset": 4425, - "charLength": 114, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tenv->setScriptId(scriptId, scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "600b46b72817fda1", - "equalIndicator/v1": "7225d5e3bb0f54f11a5c0a0da72d5b8056376c41acf0f9cb5802fafdea057b95" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5522, - "startColumn": 2, - "charOffset": 175196, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5520, - "startColumn": 1, - "charOffset": 175096, - "charLength": 219, - "snippet": { - "text": "\tauto actionType = static_cast(msg.getByte());\r\n\tbool convergence = msg.getByte();\r\n\tuint16_t firstItem = msg.get();\r\n\tuint8_t tier = msg.getByte();\r\n\tuint16_t secondItem = msg.get();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2af5bebc427abeea", - "equalIndicator/v1": "7245ddf7b226e6b74b49aab592a0dc3b71e9b019627c39ecd067f373e69c124f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned int' to 'float'", - "markdown": "Narrowing conversion from 'unsigned int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 710, - "startColumn": 37, - "charOffset": 23057, - "charLength": 18, - "snippet": { - "text": "std::min" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 708, - "startColumn": 1, - "charOffset": 22995, - "charLength": 132, - "snippet": { - "text": "\t\t\t\tcase 1:\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 73) * 1.35f) + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8d28701c70050d28", - "equalIndicator/v1": "7257cddded56ba0467d7abc2f3e887e58a2237dcdfa8e73a754fbee813fbfb55" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/functions/iologindata_save_player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 346, - "startColumn": 64, - "charOffset": 14151, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 344, - "startColumn": 1, - "charOffset": 14083, - "charLength": 179, - "snippet": { - "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerSpells(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "239e0122e113a743", - "equalIndicator/v1": "729992148ff9031f826ed65ee669072f5bfb138002b3793ad655208a2ee9778c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 666, - "startColumn": 35, - "charOffset": 18143, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 664, - "startColumn": 1, - "charOffset": 18010, - "charLength": 197, - "snippet": { - "text": "\r\nvoid ConditionAttributes::updateCharmChanceModifier(std::shared_ptr creature) const {\r\n\tcreature->setCharmChanceModifier(creature->getCharmChanceModifier() + charmChanceModifier);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a62e6c44628b7327", - "equalIndicator/v1": "72b0ed4f03692a8dbdc601219114ed1e3da2b768e43361045ec4b3db42198609" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1032, - "startColumn": 20, - "charOffset": 39306, - "charLength": 11, - "snippet": { - "text": "currentTime" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1030, - "startColumn": 1, - "charOffset": 39228, - "charLength": 139, - "snippet": { - "text": "\tlua_pushnumber(L, value);\r\n\tlua_pushnumber(L, oldValue);\r\n\tlua_pushnumber(L, currentTime);\r\n\r\n\tgetScriptInterface()->callVoidFunction(5);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4db0937a1ad96722", - "equalIndicator/v1": "72b34e4556da8a76d58139d29cf969a2396b415206cada264a6a0b0b82e0fa4c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6338, - "startColumn": 70, - "charOffset": 200753, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6336, - "startColumn": 1, - "charOffset": 200679, - "charLength": 127, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendPartyCreatureUpdate(std::shared_ptr target) {\r\n\tif (!player || oldProtocol) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b6f4660366d5e6c4", - "equalIndicator/v1": "72d97cb6a223fdd4183fbb79f9dda7b6d5786c6cb31a1925aa8a69809aa27985" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 325, - "startColumn": 10, - "charOffset": 10239, - "charLength": 13, - "snippet": { - "text": "getThrowRange" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 323, - "startColumn": 1, - "charOffset": 10203, - "charLength": 116, - "snippet": { - "text": "\t\treturn isMovable();\r\n\t}\r\n\tint32_t getThrowRange() const override final {\r\n\t\treturn (isPickupable() ? 15 : 2);\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "903b3969bc0a3010", - "equalIndicator/v1": "72dba6502675a8c24bebcef7443ddf23684115c4adfe240ee4ff2e179e67fec7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 716, - "startColumn": 34, - "charOffset": 19659, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 714, - "startColumn": 1, - "charOffset": 19619, - "charLength": 120, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tplayer->setCharmChanceModifier(player->getCharmChanceModifier() - charmChanceModifier);\r\n\r\n\t\tif (needUpdate) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "214d2ea233296672", - "equalIndicator/v1": "732a4550ded4efeb9a9ffb4d6fc8aae9d5a12aac4c082c89592ae0f5cf154393" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/rewards/reward.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 23, - "startColumn": 14, - "charOffset": 640, - "charLength": 8, - "snippet": { - "text": "queryAdd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 21, - "startColumn": 1, - "charOffset": 595, - "charLength": 340, - "snippet": { - "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) final;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1204032b25f3ff1f", - "equalIndicator/v1": "7355183510799eca3afbaef45f6b40a1379825dbf9cd78feb4dba70f8a8c5bae" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6888, - "startColumn": 93, - "charOffset": 238816, - "charLength": 14, - "snippet": { - "text": "attackerPlayer" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6886, - "startColumn": 1, - "charOffset": 238719, - "charLength": 311, - "snippet": { - "text": "}\r\n\r\nvoid Game::applyWheelOfDestinyEffectsToDamage(CombatDamage &damage, std::shared_ptr attackerPlayer, std::shared_ptr target) const {\r\n\t// If damage is 0, it means the target is immune to the damage type, or that we missed.\r\n\tif (damage.primary.value == 0 && damage.secondary.value == 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c30439361bfcfbb6", - "equalIndicator/v1": "735b95520975e78e4a34aff4cef28da7fb76ed6e60304af596187f91d5c4170c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 165, - "startColumn": 8, - "charOffset": 4201, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 163, - "startColumn": 1, - "charOffset": 4101, - "charLength": 219, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeIsMagicField(lua_State* L) {\r\n\t// itemType:isMagicField()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isMagicField());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4f64063d2e9a580a", - "equalIndicator/v1": "73644ea38f376f9ed7de2f8c0041f76c55ba772b12360caa1109f34c6ccb4172" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'isExerciseTraining' can be made const", - "markdown": "Method 'isExerciseTraining' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 582, - "startColumn": 7, - "charOffset": 15899, - "charLength": 18, - "snippet": { - "text": "isExerciseTraining" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 580, - "startColumn": 1, - "charOffset": 15867, - "charLength": 87, - "snippet": { - "text": "\t\treturn marketMenu;\r\n\t}\r\n\tbool isExerciseTraining() {\r\n\t\treturn exerciseTraining;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e311187d72738773", - "equalIndicator/v1": "7388f98af811a42d2bf6bc90d4974c2aa89395b1a82d276785c7f09b01749d0e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 790, - "startColumn": 2, - "charOffset": 27370, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 788, - "startColumn": 1, - "charOffset": 27338, - "charLength": 204, - "snippet": { - "text": "\r\n\t// OTCv8 version detection\r\n\tuint16_t otcV8StringLength = msg.get();\r\n\tif (otcV8StringLength == 5 && msg.getString(5) == \"OTCv8\") {\r\n\t\totclientV8 = msg.get(); // 253, 260, 261, ...\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e70004ebcc900477", - "equalIndicator/v1": "73a9eebbdfaf700f110a41d503531381ebff61f7dc05138839bf4bf9c0f575d0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 211, - "startColumn": 14, - "charOffset": 6012, - "charLength": 13, - "snippet": { - "text": "queryMaxCount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 209, - "startColumn": 1, - "charOffset": 5809, - "charLength": 652, - "snippet": { - "text": "\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t tileFlags, std::shared_ptr actor = nullptr) override;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e6579f2d6bb6640f", - "equalIndicator/v1": "73b7f7ebba03289c182b951e6f4cade3185e003551b870e36b8ad3bbc17fffd2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1511, - "startColumn": 59, - "charOffset": 52512, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1509, - "startColumn": 1, - "charOffset": 52449, - "charLength": 412, - "snippet": { - "text": "}\r\n\r\nbool Combat::isValidChainTarget(std::shared_ptr caster, std::shared_ptr currentTarget, std::shared_ptr potentialTarget, const CombatParams ¶ms, bool aggressive) {\r\n\tbool canCombat = canDoCombat(caster, potentialTarget, aggressive) == RETURNVALUE_NOERROR;\r\n\tbool pick = params.chainPickerCallback ? params.chainPickerCallback->onChainCombat(caster, potentialTarget) : true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5087b22f137dbd0a", - "equalIndicator/v1": "73b82148efa285e559090731b3b729d71a58cf7656ecd56eac48f5f001ce9ea4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3461, - "startColumn": 38, - "charOffset": 105956, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3459, - "startColumn": 1, - "charOffset": 105720, - "charLength": 382, - "snippet": { - "text": "\tmsg.add(std::min(player->getMaxHealth(), std::numeric_limits::max()));\r\n\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\r\n\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\r\n\tmsg.addByte(player->getSoul());\r\n\tmsg.add(player->getStaminaMinutes());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "56d59e992c3fa8e0", - "equalIndicator/v1": "73c63e35896940d6cad5a202d66acd016ec3e68ecce8d249ed320224fe429c2f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3464, - "startColumn": 16, - "charOffset": 104752, - "charLength": 9, - "snippet": { - "text": "slotIndex" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3462, - "startColumn": 1, - "charOffset": 104543, - "charLength": 283, - "snippet": { - "text": "\t\t\t\t\tif (queryAdd(slotIndex, item, item->getItemCount(), 0) == RETURNVALUE_NOERROR) {\r\n\t\t\t\t\t\tif (inventoryItem->equals(item) && inventoryItem->getItemCount() < inventoryItem->getStackSize()) {\r\n\t\t\t\t\t\t\tindex = slotIndex;\r\n\t\t\t\t\t\t\t*destItem = inventoryItem;\r\n\t\t\t\t\t\t\treturn getPlayer();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5c9f50cedd6d5158", - "equalIndicator/v1": "73c694520d3d1002e98732fe21f5141b5c0a9282e96f774495efd95bc32441ce" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/kv.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 94, - "startColumn": 22, - "charOffset": 2819, - "charLength": 6, - "snippet": { - "text": "scoped" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 92, - "startColumn": 1, - "charOffset": 2792, - "charLength": 150, - "snippet": { - "text": "\t}\r\n\r\n\tstd::shared_ptr scoped(const std::string &scope) override final;\r\n\tstd::unordered_set keys(const std::string &prefix = \"\");\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "560bba5f65be1163", - "equalIndicator/v1": "73d488ae61621626e19632daa4e809b208e3cf96ed4cf834a915922bcb61f82f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/mailbox/mailbox.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 70, - "startColumn": 15, - "charOffset": 2181, - "charLength": 22, - "snippet": { - "text": "postRemoveNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 68, - "startColumn": 1, - "charOffset": 2162, - "charLength": 222, - "snippet": { - "text": "}\r\n\r\nvoid Mailbox::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tgetParent()->postRemoveNotification(thing, newParent, index, LINK_PARENT);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9743ef89e722fa17", - "equalIndicator/v1": "73dd23d31333bf723aacaae729b34eaa32517a4336937311180dc584c1d762a3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'items' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'items' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8282, - "startColumn": 91, - "charOffset": 262610, - "charLength": 5, - "snippet": { - "text": "items" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8280, - "startColumn": 1, - "charOffset": 262515, - "charLength": 136, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendInventoryImbuements(const std::map> items) {\r\n\tif (oldProtocol) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "82b3ef1bfbe2ff70", - "equalIndicator/v1": "7408912e1a7017404f0e48812b366e1a3e9638dc5e5e4b8ef87bcaadaa8e00f5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 197, - "startColumn": 118, - "charOffset": 6185, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 195, - "startColumn": 1, - "charOffset": 6063, - "charLength": 260, - "snippet": { - "text": "}\r\n\r\nvoid Weapon::internalUseWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target, int32_t damageModifier, int32_t cleavePercent) const {\r\n\tif (player) {\r\n\t\tif (params.soundCastEffect == SoundEffect_t::SILENCE) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f6125818ed6a8591", - "equalIndicator/v1": "740a92b0d45c44e645c538336cb17ab052a4965626a94c5cc075653d7d165805" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 632, - "startColumn": 7, - "charOffset": 24298, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 630, - "startColumn": 1, - "charOffset": 24139, - "charLength": 296, - "snippet": { - "text": "\r\nvoid EventCallback::playerOnReportBug(std::shared_ptr player, const std::string &message, const Position &position, uint8_t category) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnReportBug - \"\r\n\t\t \"Player {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6464e7f299dda47c", - "equalIndicator/v1": "744459995a39df1f50f71853f281db8a3e9f28967bcc193838d0a75dcce0c3ab" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 829, - "startColumn": 21, - "charOffset": 26876, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 827, - "startColumn": 1, - "charOffset": 26804, - "charLength": 211, - "snippet": { - "text": "\tfloat attackFactor = player->getAttackFactor();\r\n\r\n\tint32_t minValue = player->getLevel() / 5;\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue);\r\n\tif (maxDamage) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0cd6c2dc75852bec", - "equalIndicator/v1": "74526d3526d82d1d0246f246ba5bac189c334a4ff4c359719c129779fe01dc59" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2179, - "startColumn": 29, - "charOffset": 73830, - "charLength": 10, - "snippet": { - "text": "multiplier" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2177, - "startColumn": 1, - "charOffset": 73736, - "charLength": 112, - "snippet": { - "text": "\t\tdamage.critical = true;\r\n\t\tdamage.primary.value *= multiplier;\r\n\t\tdamage.secondary.value *= multiplier;\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "849c84fe189f3653", - "equalIndicator/v1": "7460148f9dbedb5b5ff5e191e74716142093cea27d11351735115f9b25b623fb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6883, - "startColumn": 111, - "charOffset": 238692, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6881, - "startColumn": 1, - "charOffset": 238509, - "charLength": 209, - "snippet": { - "text": "\r\n\t\tif (attackerPlayer->wheel()->getInstant(\"Blessing of the Grove\")) {\r\n\t\t\tdamage.primary.value += (damage.primary.value * attackerPlayer->wheel()->checkBlessingGroveHealingByTarget(target)) / 100.;\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5b45fa585f5c0385", - "equalIndicator/v1": "74b1f2371b51d9b515e242150e796ca823d1bfae89a5b7502ca9fe2aed548b46" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 652, - "startColumn": 27, - "charOffset": 23275, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 650, - "startColumn": 1, - "charOffset": 23243, - "charLength": 130, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnLookInTrade, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ecf2be5bde3d2090", - "equalIndicator/v1": "74c29eab0ba8407a01efdc27f17ed945aaded7dec04ab0f5f40fe19e79dc3eb0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'owner' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'owner' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 840, - "startColumn": 15, - "charOffset": 23146, - "charLength": 5, - "snippet": { - "text": "owner" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 838, - "startColumn": 1, - "charOffset": 23062, - "charLength": 97, - "snippet": { - "text": "\t// shop functions\r\n\tvoid setShopOwner(std::shared_ptr owner) {\r\n\t\tshopOwner = owner;\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dd8f34a08278f682", - "equalIndicator/v1": "74ef1ad7a7288380c4aab9c5c78e933ec26d29a1ddc5d0d36ffc598c9994db5a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1927, - "startColumn": 5, - "charOffset": 66202, - "charLength": 7, - "snippet": { - "text": "int32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1925, - "startColumn": 1, - "charOffset": 66099, - "charLength": 235, - "snippet": { - "text": "\t\t\t\t// perform rotation\r\n\t\t\t\tint32_t rotatedX = static_cast(round(newX * a + newY * b));\r\n\t\t\t\tint32_t rotatedY = static_cast(round(newX * c + newY * d));\r\n\r\n\t\t\t\t// write in the output matrix using rotated coordinates\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ea9e5f9758fceb5e", - "equalIndicator/v1": "74fc2b88888b4f4bcb5511abbf6d27e6d1da1e9ba6ee55566c02f81e6197b67c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1170, - "startColumn": 51, - "charOffset": 35409, - "charLength": 4, - "snippet": { - "text": "tile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1168, - "startColumn": 1, - "charOffset": 35354, - "charLength": 184, - "snippet": { - "text": "}\r\n\r\nvoid Monster::pushCreatures(std::shared_ptr tile) {\r\n\t// We can not use iterators here since we can push a creature to another tile\r\n\t// which will invalidate the iterator.\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "22374351fc58021b", - "equalIndicator/v1": "7518ec82be8f805953bfeb907f7a4792b6dfeec659774fdb40d414e8194598db" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'createMonsterTypeLootLuaTable' is within a recursive call chain", - "markdown": "Function 'createMonsterTypeLootLuaTable' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 20, - "startColumn": 28, - "charOffset": 722, - "charLength": 29, - "snippet": { - "text": "createMonsterTypeLootLuaTable" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 18, - "startColumn": 1, - "charOffset": 657, - "charLength": 195, - "snippet": { - "text": "#include \"lua/scripts/scripts.hpp\"\r\n\r\nvoid MonsterTypeFunctions::createMonsterTypeLootLuaTable(lua_State* L, const std::vector &lootList) {\r\n\tlua_createtable(L, lootList.size(), 0);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "32666d572d11c39d", - "equalIndicator/v1": "752c4fd834a28bdea151064cdaec39d05824baa462486cc5686510d53c63f4ac" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 424, - "startColumn": 15, - "charOffset": 11673, - "charLength": 12, - "snippet": { - "text": "changeHealth" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 422, - "startColumn": 1, - "charOffset": 11653, - "charLength": 135, - "snippet": { - "text": "\t}\r\n\r\n\tvirtual void changeHealth(int32_t healthChange, bool sendHealthChange = true);\r\n\tvirtual void changeMana(int32_t manaChange);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "431d4d0aeb775aa3", - "equalIndicator/v1": "753610255e85adb2e1f62229b61b890d35cb083e4f72c202f51401db82c616b3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 459, - "startColumn": 33, - "charOffset": 24426, - "charLength": 31, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 457, - "startColumn": 1, - "charOffset": 24272, - "charLength": 235, - "snippet": { - "text": "\tvoid updatePlayerShield(std::shared_ptr player);\r\n\tvoid updateCreatureType(std::shared_ptr creature);\r\n\tvoid updateCreatureWalkthrough(const std::shared_ptr creature);\r\n\r\n\tGameState_t getGameState() const;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f8817d12d783282f", - "equalIndicator/v1": "7550749eeafcd57557bfce8e40279687a53ea2831b5dc2e6c6980b19c18fcfd2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'setAttackedCreature' is within a recursive call chain", - "markdown": "Function 'setAttackedCreature' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4343, - "startColumn": 14, - "charOffset": 130765, - "charLength": 19, - "snippet": { - "text": "setAttackedCreature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4341, - "startColumn": 1, - "charOffset": 130747, - "charLength": 149, - "snippet": { - "text": "}\r\n\r\nbool Player::setAttackedCreature(std::shared_ptr creature) {\r\n\tif (!Creature::setAttackedCreature(creature)) {\r\n\t\tsendCancelTarget();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5359e2d43e30d5fa", - "equalIndicator/v1": "75526824f4c2866a3371fe2e145d2e6453ef1c46f7f927549e9698c0e28058b9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 792, - "startColumn": 55, - "charOffset": 25758, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 790, - "startColumn": 1, - "charOffset": 25699, - "charLength": 255, - "snippet": { - "text": "}\r\n\r\nvoid Combat::CombatNullFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage*) {\r\n\tCombatConditionFunc(caster, target, params, nullptr);\r\n\tCombatDispelFunc(caster, target, params, nullptr);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f1b36dec3127f461", - "equalIndicator/v1": "75565dba64d93d8336b5b74899b401d37e70dc31dff4dd72c7016afd85473daf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'uint16_t' (aka 'unsigned short')", - "markdown": "Narrowing conversion from 'double' to 'uint16_t' (aka 'unsigned short')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4063, - "startColumn": 29, - "charOffset": 145882, - "charLength": 10, - "snippet": { - "text": "std::floor" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4061, - "startColumn": 1, - "charOffset": 145778, - "charLength": 268, - "snippet": { - "text": "\r\n\tif (parentContainer->hasPagination() && parentContainer->hasParent()) {\r\n\t\tuint16_t indexContainer = std::floor(parentContainer->getThingIndex(container) / parentContainer->capacity()) * parentContainer->capacity();\r\n\t\tplayer->addContainer(cid, parentContainer);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8fdbd129cc63b242", - "equalIndicator/v1": "756d2bf483d692bb5ec101c532fc39ad5c47329c3934fa089e62f36ce970afbb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 575, - "startColumn": 100, - "charOffset": 21928, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 573, - "startColumn": 1, - "charOffset": 21824, - "charLength": 293, - "snippet": { - "text": "}\r\n\r\nbool EventCallback::playerOnMoveCreature(std::shared_ptr player, std::shared_ptr creature, const Position &fromPosition, const Position &toPosition) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnMoveCreature - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8d35408a14b16b58", - "equalIndicator/v1": "757f91d8f9f2f1e04a9b05ee6c8d4d94389488a4e0ddde67d1de516cf5ff89f5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 571, - "startColumn": 13, - "charOffset": 26877, - "charLength": 11, - "snippet": { - "text": "stringValue" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 569, - "startColumn": 1, - "charOffset": 26715, - "charLength": 316, - "snippet": { - "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;\r\n\t} else if (stringValue == \"absorbpercentmagic\") {\r\n\t\tint16_t value = pugi::cast(valueAttribute.value());\r\n\t\tAbilities &abilities = itemType.getAbilities();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5ad5ce5374731cd3", - "equalIndicator/v1": "75ab118da2d74b9bfbef4c3b434096ce0147a65b79f0390305d707b9ebe6c556" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1122, - "startColumn": 29, - "charOffset": 32999, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1120, - "startColumn": 1, - "charOffset": 32787, - "charLength": 284, - "snippet": { - "text": "\tvoid sendCreatureMove(std::shared_ptr creature, const Position &newPos, int32_t newStackPos, const Position &oldPos, int32_t oldStackPos, bool teleport) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendMoveCreature(creature, newPos, newStackPos, oldPos, oldStackPos, teleport);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "020800a2b707255d", - "equalIndicator/v1": "75e1c945f1dae83bbe82f63f768dee3df8bda9dd5f747f6e9a60a6831c5cbd15" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1356, - "startColumn": 56, - "charOffset": 39965, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1354, - "startColumn": 1, - "charOffset": 39905, - "charLength": 161, - "snippet": { - "text": "}\r\n\r\nvoid Player::updateSupplyTracker(std::shared_ptr item) {\r\n\tconst auto &iType = Item::items.getItemType(item->getID());\r\n\tauto value = iType.buyPrice;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "872361a2e512affe", - "equalIndicator/v1": "75e355dfa2be40740219fb44e892b10fd61755588133c14a144e2dc057ad7b28" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 224, - "startColumn": 7, - "charOffset": 6908, - "charLength": 11, - "snippet": { - "text": "removeThing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 222, - "startColumn": 1, - "charOffset": 6818, - "charLength": 225, - "snippet": { - "text": "\tvoid replaceThing(uint32_t index, std::shared_ptr thing) override final;\r\n\r\n\tvoid removeThing(std::shared_ptr thing, uint32_t count) override final;\r\n\r\n\tvoid removeCreature(std::shared_ptr creature);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c2f0152fe9cde81c", - "equalIndicator/v1": "760a8a2ab4689a40d416950b3cba50cbd6cc0284866c36d5a1bdedbf2de26e5f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2009, - "startColumn": 72, - "charOffset": 57763, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2007, - "startColumn": 1, - "charOffset": 57687, - "charLength": 161, - "snippet": { - "text": "}\r\n\r\nstd::string Item::parseClassificationDescription(std::shared_ptr item) {\r\n\tstd::ostringstream string;\r\n\tif (item && item->getClassification() >= 1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4cf78cc094481858", - "equalIndicator/v1": "761491e5dbf9401595988963422fd6a9e86a01438bc46d7c9f3eba3fba98e0bc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int64_t' (aka 'long long') is implementation-defined", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int64_t' (aka 'long long') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2483, - "startColumn": 24, - "charOffset": 73890, - "charLength": 6, - "snippet": { - "text": "rawExp" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2481, - "startColumn": 1, - "charOffset": 73848, - "charLength": 61, - "snippet": { - "text": "\t}\r\n\tsendStats();\r\n\tsendExperienceTracker(rawExp, exp);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "142df757317fd326", - "equalIndicator/v1": "761518cbdf14978579626712d5637da3f09b96b3539085e068a430ed8259c14c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 283, - "startColumn": 88, - "charOffset": 7872, - "charLength": 4, - "snippet": { - "text": "tile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 281, - "startColumn": 1, - "charOffset": 7780, - "charLength": 155, - "snippet": { - "text": "}\r\n\r\nbool House::transferToDepot(std::shared_ptr player, std::shared_ptr tile) const {\r\n\tif (townId == 0 || !player) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a109aefd5b04b8d6", - "equalIndicator/v1": "76571e287ce1bcada74dfc5461f9f18d0865ea0ab58e3682ee3a7f303e046a77" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'title' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'title' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2349, - "startColumn": 18, - "charOffset": 67478, - "charLength": 5, - "snippet": { - "text": "title" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2347, - "startColumn": 1, - "charOffset": 67413, - "charLength": 116, - "snippet": { - "text": "\t}\r\n\tvoid setLoyaltyTitle(std::string title) {\r\n\t\tloyaltyTitle = title;\r\n\t}\r\n\tstd::string getLoyaltyTitle() const {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e00590efce3f8795", - "equalIndicator/v1": "765b70fa248c51149e8d8f2d9fafe2f23070acbd2f0cba8df0d4b237e774364f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1889, - "startColumn": 27, - "charOffset": 65267, - "charLength": 23, - "snippet": { - "text": "(output->getCols() / 2)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1887, - "startColumn": 1, - "charOffset": 65215, - "charLength": 155, - "snippet": { - "text": "\t} else {\r\n\t\t// rotation\r\n\t\tint32_t rotateCenterX = (output->getCols() / 2) - 1;\r\n\t\tint32_t rotateCenterY = (output->getRows() / 2) - 1;\r\n\t\tint32_t angle;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "382e9642e7041a70", - "equalIndicator/v1": "7666914ea9987d48b509c5c739287ad33f40658eacdd6aff3e001a2b66879476" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 717, - "startColumn": 27, - "charOffset": 25528, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 715, - "startColumn": 1, - "charOffset": 25496, - "charLength": 130, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnRemoveCount, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bd13bfdf8e15bcd6", - "equalIndicator/v1": "767a2ebde0c91fdbb324407e6795a9b340ee7fc42a3bbebadadd6a836f07ed1d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'spellName' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'spellName' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 431, - "startColumn": 86, - "charOffset": 13227, - "charLength": 9, - "snippet": { - "text": "spellName" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 429, - "startColumn": 1, - "charOffset": 13108, - "charLength": 262, - "snippet": { - "text": "\t\treturn items[id].augments;\r\n\t}\r\n\tstd::vector> getAugmentsBySpellNameAndType(std::string spellName, Augment_t augmentType) const {\r\n\t\tstd::vector> augments;\r\n\t\tfor (auto &augment : items[id].augments) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "40d3b6f1d2983e2d", - "equalIndicator/v1": "7687283d427a66f7abab9e63c1a0ba9511a18e4348320105213d57c4347bbaf5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/global_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 38, - "startColumn": 2, - "charOffset": 1537, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 36, - "startColumn": 1, - "charOffset": 1443, - "charLength": 189, - "snippet": { - "text": "\tint32_t count = getNumber(L, 3, 1);\r\n\tbool canDropOnMap = getBoolean(L, 4, true);\r\n\tuint16_t subType = getNumber(L, 5, 1);\r\n\r\n\tconst ItemType &it = Item::items[itemId];\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ac1ec55f93d9b1cd", - "equalIndicator/v1": "76e3bf69de73d47d18271a2f1a8ed63c031b844e27acfbfb5872831b08ab3d3a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 112, - "startColumn": 113, - "charOffset": 3833, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 110, - "startColumn": 1, - "charOffset": 3716, - "charLength": 248, - "snippet": { - "text": "}\r\n\r\nReturnValue EventCallback::creatureOnTargetCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnTargetCombat - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5e13a85daa1a9dee", - "equalIndicator/v1": "771cffe10c7d13cda7495373c77ac9148a6004746bff5c120c1589becac8f92c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly", - "markdown": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2390, - "startColumn": 58, - "charOffset": 90934, - "charLength": 12, - "snippet": { - "text": "__FUNCTION__" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2388, - "startColumn": 1, - "charOffset": 90805, - "charLength": 172, - "snippet": { - "text": "\t\tauto container = autoContainer->getContainer();\r\n\t\tif (!container) {\r\n\t\t\tg_logger().error(\"[{}] Failed to get auto container\", __FUNCTION__);\r\n\t\t\treturn toCylinder;\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ee671f31876f6339", - "equalIndicator/v1": "773a8ade7d07426eb814fb376aa9c7ed6277f7cf03c5a9d375e7252fb49c845b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 782, - "startColumn": 2, - "charOffset": 27151, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 780, - "startColumn": 1, - "charOffset": 27144, - "charLength": 161, - "snippet": { - "text": "\t}\r\n\r\n\tuint32_t timeStamp = msg.get();\r\n\tuint8_t randNumber = msg.getByte();\r\n\tif (challengeTimestamp != timeStamp || challengeRandom != randNumber) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d21666f5c71b6f58", - "equalIndicator/v1": "77460e5c686ba2d6052013ab939be18a5e0f3f93d8f724ca8995a78944bba167" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/party_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 106, - "startColumn": 2, - "charOffset": 2731, - "charLength": 25, - "snippet": { - "text": "// party:getMemberCount()" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 104, - "startColumn": 1, - "charOffset": 2668, - "charLength": 169, - "snippet": { - "text": "\r\nint PartyFunctions::luaPartyGetMemberCount(lua_State* L) {\r\n\t// party:getMemberCount()\r\n\tstd::shared_ptr party = getUserdataShared(L, 1);\r\n\tif (party) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "64142423970bf366", - "equalIndicator/v1": "776f5fbc4b6f24d7074f6a3a87c7816362f527b034256b168d8703519922f3f1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7483, - "startColumn": 28, - "charOffset": 260599, - "charLength": 8, - "snippet": { - "text": "attacker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7481, - "startColumn": 1, - "charOffset": 260536, - "charLength": 260, - "snippet": { - "text": "\r\nvoid Game::buildMessageAsTarget(\r\n\tstd::shared_ptr attacker, const CombatDamage &damage, std::shared_ptr attackerPlayer,\r\n\tstd::shared_ptr targetPlayer, TextMessage &message, std::stringstream &ss,\r\n\tconst std::string &damageString\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e9c7fffccaf5c40f", - "equalIndicator/v1": "777136d5a8576105222098c2b1bb3b9c3dd7c3c4f7db7ff83051ad729ae762b0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 523, - "startColumn": 7, - "charOffset": 19927, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 521, - "startColumn": 1, - "charOffset": 19660, - "charLength": 412, - "snippet": { - "text": "\r\nvoid EventCallback::playerOnItemMoved(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnItemMoved - \"\r\n\t\t \"Player {} item {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1c4ee200ef1bb122", - "equalIndicator/v1": "777f074b5fc8b85d1bbfe61d47de4dd80723b91cd6681c4ef694e5ae044ea286" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 989, - "startColumn": 7, - "charOffset": 37645, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 987, - "startColumn": 1, - "charOffset": 37547, - "charLength": 229, - "snippet": { - "text": "\r\nvoid EventCallback::playerOnWalk(std::shared_ptr player, Direction &dir) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::eventOnWalk - \"\r\n\t\t \"Player {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c051b7c4c0860485", - "equalIndicator/v1": "778a6a5ad07fa5fcbdf8499503f3368c4a37012993f3ed2ec3722016d6a37d0d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7875, - "startColumn": 89, - "charOffset": 238115, - "charLength": 7, - "snippet": { - "text": "monster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7873, - "startColumn": 1, - "charOffset": 238022, - "charLength": 158, - "snippet": { - "text": "}\r\n\r\nvoid Player::parseAttackRecvHazardSystem(CombatDamage &damage, std::shared_ptr monster) {\r\n\tif (!monster || !monster->getHazard()) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "28b39efad2fc68bf", - "equalIndicator/v1": "778dc885ab2143a648ea718c09e78563b22d0a16a65554cb51385188f47f18f8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 326, - "startColumn": 41, - "charOffset": 8561, - "charLength": 34, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 324, - "startColumn": 1, - "charOffset": 8515, - "charLength": 254, - "snippet": { - "text": "\t}\r\n\r\n\tvoid addMonsterToCyclopediaTrackerList(const std::shared_ptr mtype, bool isBoss, bool reloadClient = false);\r\n\r\n\tvoid removeMonsterFromCyclopediaTrackerList(std::shared_ptr mtype, bool isBoss, bool reloadClient = false);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "961f8deb4ea3d20d", - "equalIndicator/v1": "77a446aaffbdb325082657fd5f5ca7b27c0f2a92b4f5aef6d2cc8c977391f02c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 736, - "startColumn": 102, - "charOffset": 28422, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 734, - "startColumn": 1, - "charOffset": 28316, - "charLength": 269, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::playerOnGainExperience(std::shared_ptr player, std::shared_ptr target, uint64_t &exp, uint64_t rawExp) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnGainExperience - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c5bca4738ddbdcb6", - "equalIndicator/v1": "77b37671aa515b558820981225164b45a9268a3abaa84795a253561aa547a7ff" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2196, - "startColumn": 29, - "charOffset": 74538, - "charLength": 7, - "snippet": { - "text": "monster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2194, - "startColumn": 1, - "charOffset": 74427, - "charLength": 150, - "snippet": { - "text": "\t} else if (monster) {\r\n\t\tdamage.primary.value *= monster->getAttackMultiplier();\r\n\t\tdamage.secondary.value *= monster->getAttackMultiplier();\r\n\t}\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "902909e7f3414fa6", - "equalIndicator/v1": "77b84680fa6f1b34f7a80872670b92d5caec02bf9dcd1fc018b0945eb01bfbba" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 602, - "startColumn": 73, - "charOffset": 23056, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 600, - "startColumn": 1, - "charOffset": 22979, - "charLength": 346, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::playerOnReportRuleViolation(std::shared_ptr player, const std::string &targetName, uint8_t reportType, uint8_t reportReason, const std::string &comment, const std::string &translation) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnReportRuleViolation - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e794697d00e53f54", - "equalIndicator/v1": "77c4ed346c3d9b9ca3766ffbda4bc67218c81559ef17de02d2b02e84cbbf2d4e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iobestiary.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 368, - "startColumn": 5, - "charOffset": 12186, - "charLength": 10, - "snippet": { - "text": "defaultMap" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 366, - "startColumn": 1, - "charOffset": 12143, - "charLength": 143, - "snippet": { - "text": "\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_ICEDAMAGE:\r\n\t\t\t\tdefaultMap[4] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_HOLYDAMAGE:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a59e3866bbbf83f0", - "equalIndicator/v1": "77c678475b26cbf25e4061a0b19e5148a6c0d7b9ad36ee4eac0e401dca1773f9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 230, - "startColumn": 9, - "charOffset": 7177, - "charLength": 12, - "snippet": { - "text": "getLastIndex" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 228, - "startColumn": 1, - "charOffset": 7046, - "charLength": 327, - "snippet": { - "text": "\tint32_t getThingIndex(std::shared_ptr thing) const override final;\r\n\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::shared_ptr getThing(size_t index) const override final;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "91fb173dc4dae49a", - "equalIndicator/v1": "77d102ae3ef904243af6f901c28475462a8f3a85e9f6e5fc2adfffd6ae4cba02" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 617, - "startColumn": 16, - "charOffset": 17869, - "charLength": 8, - "snippet": { - "text": "duration" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 615, - "startColumn": 1, - "charOffset": 17785, - "charLength": 104, - "snippet": { - "text": "\t\tuint32_t duration = getDefaultDuration();\r\n\t\tif (duration != 0) {\r\n\t\t\tsetDuration(duration);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3f306ac9f8b2adcb", - "equalIndicator/v1": "77db55f7be6edba0e641af629e3bdd14fb301f3125457b3b3ff980f7cab5bbaf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'itemTile' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'itemTile' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1064, - "startColumn": 45, - "charOffset": 30893, - "charLength": 8, - "snippet": { - "text": "itemTile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1062, - "startColumn": 1, - "charOffset": 30821, - "charLength": 236, - "snippet": { - "text": "\t// tile\r\n\t// send methods\r\n\tvoid sendAddTileItem(std::shared_ptr itemTile, const Position &pos, std::shared_ptr item) {\r\n\t\tif (client) {\r\n\t\t\tint32_t stackpos = itemTile->getStackposOfItem(static_self_cast(), item);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "554e101ac407552b", - "equalIndicator/v1": "77f82fd1eb9da7899e861a50787515605af7a1b5bda1c114c2e0c91c2d75b015" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1091, - "startColumn": 6, - "charOffset": 39178, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1089, - "startColumn": 1, - "charOffset": 39145, - "charLength": 170, - "snippet": { - "text": "\tlua_pushnumber(L, exp);\r\n\r\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e892e6abfb9a8aa4", - "equalIndicator/v1": "781db4edd8cbafbe6da3284953da8e66426db8e278d98dfd4e53d275504469de" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 709, - "startColumn": 94, - "charOffset": 21511, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 707, - "startColumn": 1, - "charOffset": 21413, - "charLength": 232, - "snippet": { - "text": "}\r\n\r\nbool MoveEvent::executeStep(const std::shared_ptr &creature, std::shared_ptr item, const Position &pos) const {\r\n\t// onStepIn(creature, item, pos, fromPosition)\r\n\t// onStepOut(creature, item, pos, fromPosition)\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7d1b51db5025150d", - "equalIndicator/v1": "78210d47bb7298d1841a51e413ffffd8a0ea9caf74aee02688294ab6425029ba" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 10552, - "startColumn": 57, - "charOffset": 366508, - "charLength": 4, - "snippet": { - "text": "name" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 10550, - "startColumn": 1, - "charOffset": 366447, - "charLength": 206, - "snippet": { - "text": "}\r\n\r\nvoid Game::registerAchievement(uint16_t id, std::string name, std::string description, bool secret, uint8_t grade, uint8_t points) {\r\n\tm_achievements[id] = Achievement();\r\n\tm_achievements[id].id = id;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5cba62407b40f4f6", - "equalIndicator/v1": "7856502dcc656e8a19a677120ecb30536750599cfd27a40802c1a2bc6488ec48" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 725, - "startColumn": 15, - "charOffset": 23570, - "charLength": 11, - "snippet": { - "text": "static_cast" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 723, - "startColumn": 1, - "charOffset": 23530, - "charLength": 133, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 1.10f) + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e5283521d9e060b2", - "equalIndicator/v1": "7858cc26fd2ce0ea3e99a48ae7b1dda4ba4c9fb574618896516a03f898a927bc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 114, - "startColumn": 76, - "charOffset": 3371, - "charLength": 9, - "snippet": { - "text": "moveEvent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 112, - "startColumn": 1, - "charOffset": 3291, - "charLength": 182, - "snippet": { - "text": "}\r\n\r\nbool MoveEvents::registerLuaPositionEvent(const std::shared_ptr moveEvent) {\r\n\tauto positionVector = moveEvent->getPositionsVector();\r\n\tif (positionVector.empty()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fba97e7f70d3b552", - "equalIndicator/v1": "7903e99891a63d72a07611e8774212238ea85cb3d58f85ce88ae9dd3f8cb3662" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/npcs/npc.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 494, - "startColumn": 39, - "charOffset": 16807, - "charLength": 7, - "snippet": { - "text": "npcType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 492, - "startColumn": 1, - "charOffset": 16643, - "charLength": 268, - "snippet": { - "text": "\r\n\t\tif (!npcType->info.voiceVector.empty() && (npcType->info.yellChance >= static_cast(uniform_random(1, 100)))) {\r\n\t\t\tuint32_t index = uniform_random(0, npcType->info.voiceVector.size() - 1);\r\n\t\t\tconst voiceBlock_t &vb = npcType->info.voiceVector[index];\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "42d401bce3ec9147", - "equalIndicator/v1": "7908f7f70402b8a0a82b02f534f8fb78f1f6f87d96fe44cbb777dcfff64a6b6d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8998, - "startColumn": 2, - "charOffset": 286672, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8996, - "startColumn": 1, - "charOffset": 286577, - "charLength": 228, - "snippet": { - "text": "\r\n\t// For some reason the cip sends uint32_t, but we use uint16_t, so let's just ignore that\r\n\tuint16_t monsterRaceId = (uint16_t)msg.get();\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a22acab0afd0e913", - "equalIndicator/v1": "7991f0aa1844ae8ad425648b992ec44e6fde0e8eb6e1991d602d2a2f8b96b2d3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1149, - "startColumn": 25, - "charOffset": 37482, - "charLength": 4, - "snippet": { - "text": "maxX" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1147, - "startColumn": 1, - "charOffset": 37452, - "charLength": 113, - "snippet": { - "text": "\t}\r\n\r\n\tconst int32_t rangeX = maxX + MAP_MAX_VIEW_PORT_X;\r\n\tconst int32_t rangeY = maxY + MAP_MAX_VIEW_PORT_Y;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ae3b04f874a338a6", - "equalIndicator/v1": "799b0a6122a1603ec1736497b8e17d8c570adff139d17567e4bd14c0d42d6cd4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 115, - "startColumn": 81, - "charOffset": 6897, - "charLength": 13, - "snippet": { - "text": "const int32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 113, - "startColumn": 1, - "charOffset": 6658, - "charLength": 576, - "snippet": { - "text": "\tvoid playerOnRequestQuestLog(std::shared_ptr player) const;\r\n\tvoid playerOnRequestQuestLine(std::shared_ptr player, uint16_t questId) const;\r\n\tvoid playerOnStorageUpdate(std::shared_ptr player, const uint32_t key, const int32_t value, int32_t oldValue, uint64_t currentTime) const;\r\n\tvoid playerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) const;\r\n\tvoid playerOnInventoryUpdate(std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool equip) const;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "228b20c348991950", - "equalIndicator/v1": "79a7fe9dee4c45c787040bb952590691691592e2f470ed0403b114abc80c1930" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1861, - "startColumn": 2, - "charOffset": 56615, - "charLength": 12, - "snippet": { - "text": "SpeakClasses" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1859, - "startColumn": 1, - "charOffset": 56590, - "charLength": 134, - "snippet": { - "text": "\tuint16_t channelId;\r\n\r\n\tSpeakClasses type = static_cast(msg.getByte());\r\n\tswitch (type) {\r\n\t\tcase TALKTYPE_PRIVATE_TO:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f7155714b1a680fc", - "equalIndicator/v1": "79a85a095244f807479fdbebc34a1213ae413a50372719c85b6caf0dd383eecf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'items' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'items' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 470, - "startColumn": 31, - "charOffset": 20485, - "charLength": 46, - "snippet": { - "text": "const std::map>" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 468, - "startColumn": 1, - "charOffset": 20399, - "charLength": 163, - "snippet": { - "text": "\r\n\tvoid parseInventoryImbuements(NetworkMessage &msg);\r\n\tvoid sendInventoryImbuements(const std::map> items);\r\n\r\n\t// reloadCreature\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ae9b9a8d7bc41c71", - "equalIndicator/v1": "79d3f4f2426cdc027903099a9de19a79e76bb080062d5691c1493e1a9f8d6cb9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 76, - "startColumn": 74, - "charOffset": 2339, - "charLength": 9, - "snippet": { - "text": "moveEvent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 74, - "startColumn": 1, - "charOffset": 2261, - "charLength": 180, - "snippet": { - "text": "}\r\n\r\nbool MoveEvents::registerLuaActionEvent(const std::shared_ptr moveEvent) {\r\n\tauto actionIdVector = moveEvent->getActionIdsVector();\r\n\tif (actionIdVector.empty()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a86530fe94d9558b", - "equalIndicator/v1": "79d76c8d0ff2f3915526aa054f000378d9b58afa993374144c94f395d99907b8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3312, - "startColumn": 65, - "charOffset": 101104, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3310, - "startColumn": 1, - "charOffset": 101035, - "charLength": 147, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureEmblem(std::shared_ptr creature) {\r\n\tif (!creature || !canSee(creature) || oldProtocol) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "217625cdb3d484a7", - "equalIndicator/v1": "79db706621cf34fc48a5399a550fca75042c3b4c3a46f435d34b1b3657100624" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7126, - "startColumn": 30, - "charOffset": 248023, - "charLength": 8, - "snippet": { - "text": "attacker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7124, - "startColumn": 1, - "charOffset": 247830, - "charLength": 332, - "snippet": { - "text": "\t\tif (damage.origin != ORIGIN_NONE && attacker && damage.primary.type != COMBAT_HEALING) {\r\n\t\t\tdamage.primary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\r\n\t\t\tdamage.secondary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\r\n\t\t}\r\n\t\tif (damage.origin != ORIGIN_NONE && target && damage.primary.type != COMBAT_HEALING) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9d6debab5635e8bf", - "equalIndicator/v1": "79e6ad3c06d709d95cc37926edb130fab24b7de5ef64f383d91449505fdd6efe" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3476, - "startColumn": 24, - "charOffset": 105145, - "charLength": 9, - "snippet": { - "text": "slotIndex" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3474, - "startColumn": 1, - "charOffset": 105073, - "charLength": 208, - "snippet": { - "text": "\t\t\t\t\tcontainers.push_back(subContainer);\r\n\t\t\t\t}\r\n\t\t\t} else if (queryAdd(slotIndex, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) { // empty slot\r\n\t\t\t\tindex = slotIndex;\r\n\t\t\t\t*destItem = nullptr;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "67b6a422856f430a", - "equalIndicator/v1": "7a2e89b82c67ad5c7ad1141f0d055509365bbe0a1ca2d66589b577b3c78b2f73" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 599, - "startColumn": 3, - "charOffset": 16102, - "charLength": 8, - "snippet": { - "text": "skills_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 597, - "startColumn": 1, - "charOffset": 15963, - "charLength": 232, - "snippet": { - "text": "void ConditionAttributes::updatePercentSkills(std::shared_ptr player) {\r\n\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\r\n\t\tskills_t skill = static_cast(i);\r\n\t\tif (skillsPercent[skill] == 0) {\r\n\t\t\tcontinue;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fbbcf0b9699211aa", - "equalIndicator/v1": "7a343c672eeacb8323b98d5368efe70659401017e3ba1c07fa928b1a0800e17a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 9950, - "startColumn": 57, - "charOffset": 346979, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 9948, - "startColumn": 1, - "charOffset": 346918, - "charLength": 103, - "snippet": { - "text": "}\r\n\r\nvoid Game::sendUpdateCreature(std::shared_ptr creature) {\r\n\tif (!creature) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8066c7ff5df2c2bb", - "equalIndicator/v1": "7a3506d94c898aa08dffcd9d0f136f33ec5fbe8e3bb26e355e604a40fdfb1e63" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 673, - "startColumn": 26, - "charOffset": 21832, - "charLength": 6, - "snippet": { - "text": "damage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 671, - "startColumn": 1, - "charOffset": 21675, - "charLength": 276, - "snippet": { - "text": "\t\tdamage.secondary.type = imbuementInfo.imbuement->combatType;\r\n\t\tdamage.secondary.value = damage.primary.value * (damagePercent);\r\n\t\tdamage.primary.value = damage.primary.value * (1 - damagePercent);\r\n\r\n\t\tif (imbuementInfo.imbuement->soundEffect != SoundEffect_t::SILENCE) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e106233adea1337b", - "equalIndicator/v1": "7a3aefd11bf4d6a4387f910068c640848649104e71a1cd4e6159bc3331a3a722" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Repeated branch body in conditional chain", - "markdown": "Repeated branch body in conditional chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/ioprey.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 446, - "startColumn": 34, - "charOffset": 16675, - "charLength": 1, - "snippet": { - "text": "{" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 444, - "startColumn": 1, - "charOffset": 16589, - "charLength": 221, - "snippet": { - "text": "\t\t\tplayer->sendMessageDialog(ss.str());\r\n\t\t\treturn;\r\n\t\t} else if (!slot->canSelect()) {\r\n\t\t\tplayer->sendMessageDialog(\"There was an error while processing your action. Please try reopening the task window.\");\r\n\t\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4ce8143159c1d63d", - "equalIndicator/v1": "7a601279f5bb6238b5c3bf8d0c1f4f10ec67eaa5c3dcfe3abae93b085c0970e5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned int' to 'float'", - "markdown": "Narrowing conversion from 'unsigned int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 716, - "startColumn": 37, - "charOffset": 23271, - "charLength": 18, - "snippet": { - "text": "std::min" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 714, - "startColumn": 1, - "charOffset": 23209, - "charLength": 132, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 48) * 2.05f) + 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "75a9c8e8c06ecf2e", - "equalIndicator/v1": "7a7198bc24c678e77ae3052e6f9ce3dfef6827bdb8adce97b2fd5d256f77929d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 732, - "startColumn": 90, - "charOffset": 26087, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 730, - "startColumn": 1, - "charOffset": 25993, - "charLength": 445, - "snippet": { - "text": "}\r\n\r\nbool Events::eventPlayerOnMoveItem(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) {\r\n\t// Player:onMoveItem(item, count, fromPosition, toPosition) or Player.onMoveItem(self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)\r\n\tif (info.playerOnMoveItem == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8b490f21e77ad421", - "equalIndicator/v1": "7a863cbf027d32e9ef3e9ba6bf537b8c8db75aaf40ae91f47cb25b1de5d2a5c7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'stringToIgnore' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'stringToIgnore' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1564, - "startColumn": 75, - "charOffset": 46380, - "charLength": 14, - "snippet": { - "text": "stringToIgnore" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1562, - "startColumn": 1, - "charOffset": 46301, - "charLength": 177, - "snippet": { - "text": "}\r\n\r\nvoid capitalizeWordsIgnoringString(std::string &source, const std::string stringToIgnore) {\r\n\ttoLowerCaseString(source);\r\n\tauto size = static_cast(source.size());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8b96143702df8253", - "equalIndicator/v1": "7ac92e9640263fddbb11534f0bd14c78f2a601b9f75d0d02e200f0b0fc4464c1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'context' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'context' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 100, - "startColumn": 105, - "charOffset": 3169, - "charLength": 7, - "snippet": { - "text": "context" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 98, - "startColumn": 1, - "charOffset": 3060, - "charLength": 197, - "snippet": { - "text": "}\r\n\r\nstd::shared_ptr Player::createPlayerTask(uint32_t delay, std::function f, std::string context) {\r\n\treturn std::make_shared(std::move(f), std::move(context), delay);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0c82a63fbe3eefce", - "equalIndicator/v1": "7afdf0234aa81e242634f1923fed239be37f0787bdde3d4b980f0955583fe948" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 149, - "startColumn": 7, - "charOffset": 4502, - "charLength": 12, - "snippet": { - "text": "changeHealth" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 147, - "startColumn": 1, - "charOffset": 4413, - "charLength": 317, - "snippet": { - "text": "\r\n\tvoid drainHealth(std::shared_ptr attacker, int32_t damage) override;\r\n\tvoid changeHealth(int32_t healthChange, bool sendHealthChange = true) override;\r\n\tbool getNextStep(Direction &direction, uint32_t &flags) override;\r\n\tvoid onFollowCreatureComplete(const std::shared_ptr &creature) override;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "54709a2bfa767dba", - "equalIndicator/v1": "7b02e0288994cb3c0ec1ab933c49db5b178ab63c4e19c73215184c950c4b3ed9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/vocations/vocation.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 80, - "startColumn": 10, - "charOffset": 2025, - "charLength": 13, - "snippet": { - "text": "gainSoulTicks" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 78, - "startColumn": 1, - "charOffset": 1976, - "charLength": 136, - "snippet": { - "text": "\r\n\tuint32_t getSoulGainTicks() const {\r\n\t\treturn gainSoulTicks / g_configManager().getFloat(RATE_SOUL_REGEN_SPEED, __FUNCTION__);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c2973b7a30d23123", - "equalIndicator/v1": "7b05155aa4d9f56d5219612874a1bb49440c149d9c0680d629747e2bd1c6b940" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 27, - "startColumn": 67, - "charOffset": 895, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 25, - "startColumn": 1, - "charOffset": 797, - "charLength": 248, - "snippet": { - "text": "Spells::~Spells() = default;\r\n\r\nTalkActionResult_t Spells::playerSaySpell(std::shared_ptr player, std::string &words) {\r\n\tauto maxOnline = g_configManager().getNumber(MAX_PLAYERS_PER_ACCOUNT, __FUNCTION__);\r\n\tauto tile = player->getTile();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6adbc29876f193a4", - "equalIndicator/v1": "7b326173ef0f2ff56c65b050cee435a9caf9f40f4b876814df8f1808c64e1c03" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'mtype' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'mtype' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6655, - "startColumn": 81, - "charOffset": 195466, - "charLength": 5, - "snippet": { - "text": "mtype" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6653, - "startColumn": 1, - "charOffset": 195381, - "charLength": 133, - "snippet": { - "text": "}\r\n\r\nbool Player::isCreatureUnlockedOnTaskHunting(const std::shared_ptr mtype) const {\r\n\tif (!mtype) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "14f81e6d482a5079", - "equalIndicator/v1": "7b497a347d78e99e767c0fa8e3e27127df9504c82dfa01e7be6c3b5666a5c0d1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/depot/depotlocker.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 38, - "startColumn": 7, - "charOffset": 1186, - "charLength": 19, - "snippet": { - "text": "postAddNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 36, - "startColumn": 1, - "charOffset": 1018, - "charLength": 472, - "snippet": { - "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "648811d3568fe8bc", - "equalIndicator/v1": "7b6985eebd85486a5c7ccf54857fc682e5d7b19ebf98a5e1978bbd454d8fb110" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/modules/modules.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 157, - "startColumn": 7, - "charOffset": 4268, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 155, - "startColumn": 1, - "charOffset": 4136, - "charLength": 288, - "snippet": { - "text": "void Module::executeOnRecvbyte(std::shared_ptr player, NetworkMessage &msg) {\r\n\t// onRecvbyte(player, msg, recvbyte)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"Call stack overflow. Too many lua script calls being nested {}\", player->getName());\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "748158d5f9cfbd83", - "equalIndicator/v1": "7b7515f8063c1a7b3a6d45e50f32c0ecc274b307036f6013e033a986a9c1b356" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/talkaction.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 64, - "startColumn": 85, - "charOffset": 2057, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 62, - "startColumn": 1, - "charOffset": 1968, - "charLength": 276, - "snippet": { - "text": "}\r\n\r\nTalkActionResult_t TalkActions::checkPlayerCanSayTalkAction(std::shared_ptr player, SpeakClasses type, const std::string &words) const {\r\n\tfor (const auto &[talkactionWords, talkActionPtr] : talkActions) {\r\n\t\tif (talkactionWords.find(',') != std::string::npos) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a7cc87d4c81eb120", - "equalIndicator/v1": "7b814f4941ed6d5d8d8ad101b06dbe845ad990644045de5424297059881411d9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 883, - "startColumn": 31, - "charOffset": 28748, - "charLength": 4, - "snippet": { - "text": "mana" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 881, - "startColumn": 1, - "charOffset": 28644, - "charLength": 131, - "snippet": { - "text": "\t\tmana += std::min(manaChange, getMaxMana() - mana);\r\n\t} else {\r\n\t\tmana = std::max(0, mana + manaChange);\r\n\t}\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "04da05ebcb5427ed", - "equalIndicator/v1": "7b928278c17257e2b89b2ddd743c9c69da826e688255e68f5b190d7af8ac4699" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1340, - "startColumn": 8, - "charOffset": 39301, - "charLength": 5, - "snippet": { - "text": "items" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1338, - "startColumn": 1, - "charOffset": 39232, - "charLength": 101, - "snippet": { - "text": "\tconst TileItemVector* items = getItemList();\r\n\tif (items) {\r\n\t\tn += items->getTopItemCount();\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "45149716e850cb2e", - "equalIndicator/v1": "7bae93ae6836cf89a698001e18f381d452cb6565c208dc17f2e67ed14d81d29c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 566, - "startColumn": 18, - "charOffset": 17053, - "charLength": 11, - "snippet": { - "text": "getPosition" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 564, - "startColumn": 1, - "charOffset": 17030, - "charLength": 78, - "snippet": { - "text": "\t}\r\n\r\n\tconst Position &getPosition() override final {\r\n\t\treturn position;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4494932e5a312baa", - "equalIndicator/v1": "7bb7bfe20a8d55c54ea36817c54e5b714aa179024cc3b3d291a8bf5e11d1dc10" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/vocations/vocation.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 60, - "startColumn": 10, - "charOffset": 1425, - "charLength": 13, - "snippet": { - "text": "gainManaTicks" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 58, - "startColumn": 1, - "charOffset": 1376, - "charLength": 136, - "snippet": { - "text": "\r\n\tuint32_t getManaGainTicks() const {\r\n\t\treturn gainManaTicks / g_configManager().getFloat(RATE_MANA_REGEN_SPEED, __FUNCTION__);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bd457d6b81d46a1e", - "equalIndicator/v1": "7bc0067e7a6b926a3aa43b9b7690cb0c3e21e973d043afcf44779824c398ad73" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The variable 'oldSplash' is copy-constructed from a const reference but is only used as const reference; consider making it a const reference", - "markdown": "The variable 'oldSplash' is copy-constructed from a const reference but is only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1035, - "startColumn": 28, - "charOffset": 31609, - "charLength": 9, - "snippet": { - "text": "oldSplash" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1033, - "startColumn": 1, - "charOffset": 31429, - "charLength": 271, - "snippet": { - "text": "\t\t\t\t// remove old splash if exists\r\n\t\t\t\tfor (ItemVector::const_iterator it = items->getBeginTopItem(), end = items->getEndTopItem(); it != end; ++it) {\r\n\t\t\t\t\tstd::shared_ptr oldSplash = *it;\r\n\t\t\t\t\tif (!Item::items[oldSplash->getID()].isSplash()) {\r\n\t\t\t\t\t\tcontinue;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4d88dc4c67a9d2d9", - "equalIndicator/v1": "7be68d2d7a6352f9587a8e62555e03f38af5d029b635c5b0770b521fe63f3873" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6620, - "startColumn": 29, - "charOffset": 229508, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6618, - "startColumn": 1, - "charOffset": 229401, - "charLength": 274, - "snippet": { - "text": "\t\t\tdamage.secondary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\r\n\t\t}\r\n\t\tdamage.secondary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\r\n\r\n\t\tsecondaryBlockType = target->blockHit(attacker, damage.secondary.type, damage.secondary.value, false, false, field);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b310c0540268ecbf", - "equalIndicator/v1": "7bf8ae23aca31f9414141be0ed46bd078bcaf0198746a3a484b67b929aa62577" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 409, - "startColumn": 7, - "charOffset": 15407, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 407, - "startColumn": 1, - "charOffset": 15235, - "charLength": 311, - "snippet": { - "text": "\r\nvoid EventCallback::playerOnLookInTrade(std::shared_ptr player, std::shared_ptr partner, std::shared_ptr item, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLookInTrade - \"\r\n\t\t \"Player {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "be241a5f0bcf24f1", - "equalIndicator/v1": "7c0932f4eab7d364ff2acd7013c43b2364a4bf51a72ab389f673424a3f77ca5f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'", - "markdown": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/database/database.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 286, - "startColumn": 22, - "charOffset": 8338, - "charLength": 4, - "snippet": { - "text": "what" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 284, - "startColumn": 1, - "charOffset": 8291, - "charLength": 101, - "snippet": { - "text": "\t\tmessage(message) { }\r\n\r\n\tvirtual const char* what() const throw() {\r\n\t\treturn message.c_str();\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6ec47a17c1f36474", - "equalIndicator/v1": "7c17e6306473abffc497e4ecc247b8b8d8b71154ca44a37a866aa99b5948a864" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned int' to 'float'", - "markdown": "Narrowing conversion from 'unsigned int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 676, - "startColumn": 37, - "charOffset": 22166, - "charLength": 18, - "snippet": { - "text": "std::min" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 674, - "startColumn": 1, - "charOffset": 22104, - "charLength": 134, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 104) * 0.70f) + 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c3b65c649392b52c", - "equalIndicator/v1": "7c17f6f9b6a420d78ba4ce4db9c659dc391da58553bd1c975a798f5fdf1cdb01" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creatureOutfit' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'creatureOutfit' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 423, - "startColumn": 89, - "charOffset": 18364, - "charLength": 14, - "snippet": { - "text": "const Outfit_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 421, - "startColumn": 1, - "charOffset": 18259, - "charLength": 264, - "snippet": { - "text": "\r\n\t// analyzers\r\n\tvoid sendKillTrackerUpdate(std::shared_ptr corpse, const std::string &name, const Outfit_t creatureOutfit);\r\n\tvoid sendUpdateSupplyTracker(std::shared_ptr item);\r\n\tvoid sendUpdateImpactTracker(CombatType_t type, int32_t amount);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "953b377f136bc415", - "equalIndicator/v1": "7c2bef3ac18f489312fe6d8b608fb84f3553c2a58018805e48b1c97a0cbb84b2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2666, - "startColumn": 16, - "charOffset": 79196, - "charLength": 10, - "snippet": { - "text": "std::round" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2664, - "startColumn": 1, - "charOffset": 79074, - "charLength": 258, - "snippet": { - "text": "\t\t\t\tauto charges = item->getAttribute(ItemAttribute_t::CHARGES);\r\n\t\t\t\tif (absorbPercent != 0) {\r\n\t\t\t\t\tdamage -= std::round(damage * (absorbPercent / 100.));\r\n\t\t\t\t\tif (charges != 0) {\r\n\t\t\t\t\t\tg_game().transformItem(item, item->getID(), charges - 1);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ff45634785e36062", - "equalIndicator/v1": "7c41e08cbdfc817aae05482cf312a72f3595dfd0dd3d3a2690eb4cd2c9e89575" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Replace loop by 'std::ranges::all_of()'", - "markdown": "Replace loop by 'std::ranges::all_of()'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/creatureevent.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 71, - "startColumn": 2, - "charOffset": 2190, - "charLength": 37, - "snippet": { - "text": "// fire global event if is registered" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 69, - "startColumn": 1, - "charOffset": 2112, - "charLength": 219, - "snippet": { - "text": "\r\nbool CreatureEvents::playerLogout(std::shared_ptr player) const {\r\n\t// fire global event if is registered\r\n\tfor (const auto &it : creatureEvents) {\r\n\t\tif (it.second->getEventType() == CREATURE_EVENT_LOGOUT) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f4c1f0a448a8541e", - "equalIndicator/v1": "7c4f3d0d75750de27382caa2f756280132bc1c121de6ebf5808ac5b98df67df7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double_t' (aka 'double') to 'uint32_t' (aka 'unsigned int')", - "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'uint32_t' (aka 'unsigned int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 720, - "startColumn": 16, - "charOffset": 21364, - "charLength": 23, - "snippet": { - "text": "Player::getPercentLevel" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 718, - "startColumn": 1, - "charOffset": 21289, - "charLength": 165, - "snippet": { - "text": "\tuint32_t newPercent;\r\n\tif (nextReqTries > currReqTries) {\r\n\t\tnewPercent = Player::getPercentLevel(skills[skill].tries, nextReqTries);\r\n\t} else {\r\n\t\tnewPercent = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "71b1ccbc32f9111a", - "equalIndicator/v1": "7c6d617cc3c2e065f95149eade573cc402e7786339cd7eeca5ef6a6ed19f663c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructor does not initialize these fields: mapSectors", - "markdown": "Constructor does not initialize these fields: mapSectors" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/mapcache.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 82, - "startColumn": 7, - "charOffset": 1742, - "charLength": 8, - "snippet": { - "text": "MapCache" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 80, - "startColumn": 1, - "charOffset": 1718, - "charLength": 77, - "snippet": { - "text": "#pragma pack()\r\n\r\nclass MapCache {\r\npublic:\r\n\tvirtual ~MapCache() = default;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "da47c3683b2746a1", - "equalIndicator/v1": "7c85466ca4fb8c6db30783818d4d82680778134061e3522b0d77a6081fc0c401" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3370, - "startColumn": 65, - "charOffset": 102684, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3368, - "startColumn": 1, - "charOffset": 102615, - "charLength": 140, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureSquare(std::shared_ptr creature, SquareColor_t color) {\r\n\tif (!canSee(creature)) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bcc53ae39e756fed", - "equalIndicator/v1": "7ccccb9b221f94a10522b081ceaaf1664635c32952463a98807b50ab93819e7f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'spellName' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'spellName' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 441, - "startColumn": 79, - "charOffset": 13626, - "charLength": 9, - "snippet": { - "text": "spellName" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 439, - "startColumn": 1, - "charOffset": 13524, - "charLength": 222, - "snippet": { - "text": "\t\treturn augments;\r\n\t}\r\n\tstd::vector> getAugmentsBySpellName(std::string spellName) const {\r\n\t\tstd::vector> augments;\r\n\t\tfor (auto &augment : items[id].augments) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ae1103e01586fdbc", - "equalIndicator/v1": "7cd500aa66f2ee1eb859ccfc55899c32377af60d85bda76e90867fdf840a8efc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1066, - "startColumn": 66, - "charOffset": 38394, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1064, - "startColumn": 1, - "charOffset": 38324, - "charLength": 172, - "snippet": { - "text": "}\r\n\r\nvoid Events::eventPlayerOnLoseExperience(std::shared_ptr player, uint64_t &exp) {\r\n\t// Player:onLoseExperience(exp)\r\n\tif (info.playerOnLoseExperience == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "aa0a3962052f85d2", - "equalIndicator/v1": "7ce246bda1dd52c8f3f83416014e7d1d8b4ca8518bb4c26d75e5546b1718cd82" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'initialTarget' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'initialTarget' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1436, - "startColumn": 249, - "charOffset": 49936, - "charLength": 13, - "snippet": { - "text": "initialTarget" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1434, - "startColumn": 1, - "charOffset": 49683, - "charLength": 364, - "snippet": { - "text": "}\r\n\r\nstd::vector>> Combat::pickChainTargets(std::shared_ptr caster, const CombatParams ¶ms, uint8_t chainDistance, uint8_t maxTargets, bool backtracking, bool aggressive, std::shared_ptr initialTarget /* = nullptr */) {\r\n\tBenchmark bm_pickChain;\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c55f1fc5996fe74c", - "equalIndicator/v1": "7ce580b65a73fbc26c073c2943e7f895f1b702231790899f918d09499ca4e9a8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 487, - "startColumn": 62, - "charOffset": 18389, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 485, - "startColumn": 1, - "charOffset": 18323, - "charLength": 332, - "snippet": { - "text": "}\r\n\r\nbool EventCallback::playerOnMoveItem(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPos, const Position &toPos, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) const {\r\n\tif (!getScriptInterface()) {\r\n\t\tg_logger().error(\"script interface nullptr\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "de5601ad12b47871", - "equalIndicator/v1": "7cf8142cfa585fba8b681427fc1a4e720995ea9f36e3ce1ac7d8afc38c459c7a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2714, - "startColumn": 11, - "charOffset": 80659, - "charLength": 16, - "snippet": { - "text": "getItemTypeCount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2712, - "startColumn": 1, - "charOffset": 80568, - "charLength": 294, - "snippet": { - "text": "\tsize_t getFirstIndex() const override;\r\n\tsize_t getLastIndex() const override;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override;\r\n\tvoid stashContainer(StashContainerList itemDict);\r\n\tItemsTierCountList getInventoryItemsId(bool ignoreStoreInbox = false) const;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f0d79a03525bbe8e", - "equalIndicator/v1": "7cfd84dee6354e8a02760dc7b5afaff3f48a449fc62f3148bc0e89726925de48" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'combatChangeMana' is within a recursive call chain", - "markdown": "Function 'combatChangeMana' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7627, - "startColumn": 12, - "charOffset": 266751, - "charLength": 16, - "snippet": { - "text": "combatChangeMana" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7625, - "startColumn": 1, - "charOffset": 266735, - "charLength": 247, - "snippet": { - "text": "}\r\n\r\nbool Game::combatChangeMana(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage) {\r\n\tconst Position &targetPos = target->getPosition();\r\n\tauto manaChange = damage.primary.value + damage.secondary.value;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1a323fec81421fa2", - "equalIndicator/v1": "7d15de7297896ec81cf71d99366d08996902ee317882a9a36a373fd3ff91341d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/cylinder.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 198, - "startColumn": 15, - "charOffset": 8081, - "charLength": 19, - "snippet": { - "text": "postAddNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 196, - "startColumn": 1, - "charOffset": 7991, - "charLength": 354, - "snippet": { - "text": "\tvirtual void removeThing(std::shared_ptr, uint32_t) override { }\r\n\r\n\tvirtual void postAddNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r\n\tvirtual void postRemoveNotification(std::shared_ptr, std::shared_ptr, int32_t, CylinderLink_t = LINK_OWNER) override { }\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3f042b2848f49453", - "equalIndicator/v1": "7d1ab237bcbbcf36b0e4124f28c022d1cbb5151d7780d1198b9e40eca9955842" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6312, - "startColumn": 50, - "charOffset": 185098, - "charLength": 8, - "snippet": { - "text": "vocation" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6310, - "startColumn": 1, - "charOffset": 184883, - "charLength": 253, - "snippet": { - "text": "\t\tcondition->setParam(CONDITION_PARAM_HEALTHTICKS, vocation->getHealthGainTicks());\r\n\t\tcondition->setParam(CONDITION_PARAM_MANAGAIN, vocation->getManaGainAmount());\r\n\t\tcondition->setParam(CONDITION_PARAM_MANATICKS, vocation->getManaGainTicks());\r\n\t}\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f1f6cbce35525ff2", - "equalIndicator/v1": "7d2d8368f5d9d838062a432aa15fd7cbfc5d0d0a3325332f189b4638fa0a8c26" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'charm' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'charm' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 607, - "startColumn": 49, - "charOffset": 30971, - "charLength": 5, - "snippet": { - "text": "charm" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 605, - "startColumn": 1, - "charOffset": 30810, - "charLength": 231, - "snippet": { - "text": "\tvoid playerInspectItem(std::shared_ptr player, uint16_t itemId, uint8_t itemCount, bool cyclopedia);\r\n\r\n\tvoid addCharmRune(const std::shared_ptr charm) {\r\n\t\tCharmList.push_back(charm);\r\n\t\tCharmList.shrink_to_fit();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "052136e094384ca7", - "equalIndicator/v1": "7d726fe7d3dd8a289e0b98e65f80992946cf31d9e57576892d344fd7a9ccf5f7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1152, - "startColumn": 41, - "charOffset": 43806, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1150, - "startColumn": 1, - "charOffset": 43760, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2a190bf0636d763f", - "equalIndicator/v1": "7d952e229e5085088e86654234ad1d77e0f6d1b826d117177a357e60aaf31ecc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3204, - "startColumn": 65, - "charOffset": 98397, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3202, - "startColumn": 1, - "charOffset": 98328, - "charLength": 143, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureOutfit(std::shared_ptr creature, const Outfit_t &outfit) {\r\n\tif (!canSee(creature)) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "59968cca44bb43bb", - "equalIndicator/v1": "7da7d3007c6ffe94be277b43dd800c0ec1a4636fa5037dbd20fc37235bd22969" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '_Val', which is a reserved identifier", - "markdown": "Declaration uses identifier '_Val', which is a reserved identifier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/arraylist.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 112, - "startColumn": 22, - "charOffset": 2558, - "charLength": 4, - "snippet": { - "text": "_Val" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 110, - "startColumn": 1, - "charOffset": 2530, - "charLength": 87, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tvoid push_back(T &&_Val) {\r\n\t\t\tbackContainer.push_back(std::move(_Val));\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "610c3cfb270dda32", - "equalIndicator/v1": "7db39134499f7b891870a457ed188c8c0859e4c508d38eb25a0aeca560b7182f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1561, - "startColumn": 56, - "charOffset": 46737, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1559, - "startColumn": 1, - "charOffset": 46677, - "charLength": 105, - "snippet": { - "text": "}\r\n\r\nvoid Player::openImbuementWindow(std::shared_ptr item) {\r\n\tif (!client || !item) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b1381b3de6b089a6", - "equalIndicator/v1": "7dc42d74ed83527165685b75cf1ee6da301c75d621deb9393da09e4c265c380d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned int' to 'float'", - "markdown": "Narrowing conversion from 'unsigned int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 667, - "startColumn": 37, - "charOffset": 21845, - "charLength": 18, - "snippet": { - "text": "std::min" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 665, - "startColumn": 1, - "charOffset": 21783, - "charLength": 132, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 45) * 1.55f) + 6;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c8f263725b2c3111", - "equalIndicator/v1": "7dd12342d460ea4281c268e8fdefd18bd413aa933fa497686e2c3b9408931d21" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 306, - "startColumn": 59, - "charOffset": 9604, - "charLength": 8, - "snippet": { - "text": "attacker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 304, - "startColumn": 1, - "charOffset": 9541, - "charLength": 178, - "snippet": { - "text": "}\r\n\r\nReturnValue Combat::canDoCombat(std::shared_ptr attacker, std::shared_ptr target, bool aggressive) {\r\n\tif (!aggressive) {\r\n\t\treturn RETURNVALUE_NOERROR;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "aa68f39a8ee83b08", - "equalIndicator/v1": "7de9b89fd7258424b178ad0359cde967ccfa0ce80169d4b2a5169732eb1857c5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 212, - "startColumn": 26, - "charOffset": 5939, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 210, - "startColumn": 1, - "charOffset": 5908, - "charLength": 142, - "snippet": { - "text": "\t}\r\n\r\n\tif (getHouseAccessLevel(player) < getHouseAccessLevel(target) || target->hasFlag(PlayerFlags_t::CanEditHouses)) {\r\n\t\treturn false;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "07f83b827d619720", - "equalIndicator/v1": "7def474c75d3a2125f4683b966c7b5626bd676f3f2d527947e812c3dd068745f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3413, - "startColumn": 21, - "charOffset": 102991, - "charLength": 11, - "snippet": { - "text": "queryRemove" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3411, - "startColumn": 1, - "charOffset": 102966, - "charLength": 210, - "snippet": { - "text": "}\r\n\r\nReturnValue Player::queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr /*= nullptr*/) {\r\n\tint32_t index = getThingIndex(thing);\r\n\tif (index == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "623a3d6d838119ec", - "equalIndicator/v1": "7df5413f5033a8a486eb424d42d919752c56721f0f8d4bd2b458b261db93daee" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 955, - "startColumn": 96, - "charOffset": 34481, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 953, - "startColumn": 1, - "charOffset": 34381, - "charLength": 220, - "snippet": { - "text": "}\r\n\r\nbool Events::eventPlayerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) {\r\n\t// Player:onTradeRequest(target, item)\r\n\tif (info.playerOnTradeRequest == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "19bf49a6e25e0626", - "equalIndicator/v1": "7e0d0e68c591b13a3b89dca05bf6ee1ff7e350a0efee5ecb5cbb2e9f1a116e0d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 903, - "startColumn": 7, - "charOffset": 32701, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 901, - "startColumn": 1, - "charOffset": 32689, - "charLength": 141, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnReportBug - \"\r\n\t\t \"Player {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b8977965bd8f272a", - "equalIndicator/v1": "7e115e50518cf9b1e1da3e90090ce4c16ff382f77f4a656de7cce42652a39fae" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8189, - "startColumn": 56, - "charOffset": 284606, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8187, - "startColumn": 1, - "charOffset": 284546, - "charLength": 98, - "snippet": { - "text": "}\r\n\r\nvoid Game::updatePlayerHelpers(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "27dbcabc74774955", - "equalIndicator/v1": "7e1958aa5df88cb8c140aeb4d2f03e8064b4878e51ae9f57016d860f481ed2c2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/mailbox/mailbox.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 122, - "startColumn": 30, - "charOffset": 4197, - "charLength": 13, - "snippet": { - "text": "containerItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 120, - "startColumn": 1, - "charOffset": 4086, - "charLength": 257, - "snippet": { - "text": "\tstd::shared_ptr container = item->getContainer();\r\n\tif (container) {\r\n\t\tfor (std::shared_ptr containerItem : container->getItemList()) {\r\n\t\t\tif (containerItem->getID() == ITEM_LABEL && getReceiver(containerItem, name)) {\r\n\t\t\t\treturn true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5fa1b55644d1604b", - "equalIndicator/v1": "7e34fc852b23eb37776562b44bfdbdf357ab1a0e8339a0ec2d276aee3c20d761" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 563, - "startColumn": 37, - "charOffset": 15118, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 561, - "startColumn": 1, - "charOffset": 15038, - "charLength": 155, - "snippet": { - "text": "\t\tswitch (i) {\r\n\t\t\tcase STAT_MAXHITPOINTS:\r\n\t\t\t\tstats[i] = static_cast(player->getMaxHealth() * ((statsPercent[i] - 100) / 100.f));\r\n\t\t\t\tbreak;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7224b20bc0491b6d", - "equalIndicator/v1": "7e659ed8c4564c9259032a02de113081864ed97937001e1f2f57cd8c07fa9c8d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 575, - "startColumn": 37, - "charOffset": 15537, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 573, - "startColumn": 1, - "charOffset": 15475, - "charLength": 131, - "snippet": { - "text": "\r\n\t\t\tcase STAT_CAPACITY:\r\n\t\t\t\tstats[i] = static_cast(player->getCapacity() * (statsPercent[i] / 100.f));\r\n\t\t\t\tbreak;\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7cc89bfc17834eb1", - "equalIndicator/v1": "7e777c97107f9f4ddc245b90a664e88e6b5d6e9a5559c082d75eff4d8b5455f9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 264, - "startColumn": 8, - "charOffset": 6538, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 262, - "startColumn": 1, - "charOffset": 6442, - "charLength": 207, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetArticle(lua_State* L) {\r\n\t// itemType:getArticle()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushString(L, itemType->article);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a21322c13c5b0fde", - "equalIndicator/v1": "7e7aa1fb13123273d3d35917eff78c2ff7a2299c37d8d67b259f08114a4c8748" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'float'", - "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/scheduling/dispatcher.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 185, - "startColumn": 67, - "charOffset": 5267, - "charLength": 10, - "snippet": { - "text": "threadPool" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 183, - "startColumn": 1, - "charOffset": 5151, - "charLength": 283, - "snippet": { - "text": "\t\tlist.reserve(threadPool.get_thread_count());\r\n\r\n\t\tconst auto size_per_block = std::ceil(size / static_cast(threadPool.get_thread_count()));\r\n\t\tfor (uint_fast64_t i = 0; i < size; i += size_per_block) {\r\n\t\t\tlist.emplace_back(i, std::min(size, i + size_per_block));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "66fbb7cd84b6609a", - "equalIndicator/v1": "7ea865ae181f8a9c7b704abfdf90c63a33b4156695e817afc1ee898bd6dcdce9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 848, - "startColumn": 19, - "charOffset": 26164, - "charLength": 11, - "snippet": { - "text": "queryRemove" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 846, - "startColumn": 1, - "charOffset": 26141, - "charLength": 213, - "snippet": { - "text": "}\r\n\r\nReturnValue Tile::queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t tileFlags, std::shared_ptr /*= nullptr */) {\r\n\tint32_t index = getThingIndex(thing);\r\n\tif (index == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d419e29d98947a4d", - "equalIndicator/v1": "7ebae88656307fbf79fa49b1a7a3d37dcf25718a893ee6cee529ac4092d4c99c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 665, - "startColumn": 41, - "charOffset": 25543, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 663, - "startColumn": 1, - "charOffset": 25497, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e15fca064f4070e8", - "equalIndicator/v1": "7f173a70e9c86f626e52e745443ce70458fceb96c5d8c0e11c17fc5f03f17113" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1120, - "startColumn": 52, - "charOffset": 46062, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1118, - "startColumn": 1, - "charOffset": 46006, - "charLength": 263, - "snippet": { - "text": "}\r\n\r\nbool Game::placeCreature(std::shared_ptr creature, const Position &pos, bool extendedPos /*=false*/, bool forced /*= false*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!internalPlaceCreature(creature, pos, extendedPos, forced)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5b61af4ab190d055", - "equalIndicator/v1": "7f521a7c476a143d34d798b47c2e1fe0399af2b77f51931da042120bfeaf073b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'items' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'items' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2527, - "startColumn": 78, - "charOffset": 73325, - "charLength": 5, - "snippet": { - "text": "items" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2525, - "startColumn": 1, - "charOffset": 73242, - "charLength": 159, - "snippet": { - "text": "\t}\r\n\r\n\tvoid sendInventoryImbuements(const std::map> items) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendInventoryImbuements(items);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "56bfd54b40e9d487", - "equalIndicator/v1": "7f686ddef0bfb03fdb6b3dcbcf6409ef871b10dce74916ad1a8e3aff406b9fcb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2532, - "startColumn": 36, - "charOffset": 75621, - "charLength": 8, - "snippet": { - "text": "capacity" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2530, - "startColumn": 1, - "charOffset": 75434, - "charLength": 312, - "snippet": { - "text": "\t\t\thealthMax = std::max(0, healthMax - noneVocation->getHPGain());\r\n\t\t\tmanaMax = std::max(0, manaMax - noneVocation->getManaGain());\r\n\t\t\tcapacity = std::max(0, capacity - noneVocation->getCapGain());\r\n\t\t} else {\r\n\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d5dfc1f568804c8d", - "equalIndicator/v1": "7f8a5e270b2efbffb4b3c960d6ca5467af602d8e977f2200bf1ac7a30a1f1837" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 719, - "startColumn": 16, - "charOffset": 34169, - "charLength": 10, - "snippet": { - "text": "combatType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 717, - "startColumn": 1, - "charOffset": 33974, - "charLength": 286, - "snippet": { - "text": "void ItemParse::parseField(const std::string &tmpStrValue, pugi::xml_node attributeNode, pugi::xml_attribute valueAttribute, ItemType &itemType) {\r\n\tif (tmpStrValue == \"field\") {\r\n\t\tCombatType_t combatType = COMBAT_NONE;\r\n\t\tstd::shared_ptr conditionDamage = nullptr;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0baff317600b1beb", - "equalIndicator/v1": "7fa81a995d8e71939e8d5627c37d9d51112ef9c50f2553f02f75f698860a4811" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 78, - "startColumn": 29, - "charOffset": 2695, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 76, - "startColumn": 1, - "charOffset": 2528, - "charLength": 224, - "snippet": { - "text": "std::shared_ptr Container::clone() const {\r\n\tstd::shared_ptr clone = std::static_pointer_cast(Item::clone());\r\n\tfor (std::shared_ptr item : itemlist) {\r\n\t\tclone->addItem(item->clone());\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "aed0abbffcaebb80", - "equalIndicator/v1": "7fd05d16b0bf8edd43a7dc966648998f0406ecf1bcf939984b7dd45752992cc3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'long double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'long double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6031, - "startColumn": 72, - "charOffset": 177283, - "charLength": 11, - "snippet": { - "text": "nextReqMana" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6029, - "startColumn": 1, - "charOffset": 177110, - "charLength": 218, - "snippet": { - "text": "\t\tif (nextReqMana > currReqMana) {\r\n\t\t\tnewPercent = Player::getPercentLevel(manaSpent, nextReqMana);\r\n\t\t\tnewPercentToNextLevel = static_cast(manaSpent * 100) / nextReqMana;\r\n\t\t} else {\r\n\t\t\tnewPercent = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "feab87d4eeaf701b", - "equalIndicator/v1": "7fd791ec0dca3eef1f3677b60e5c83afdf24449e87bc416e92cd39fcb65ead24" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/player_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3143, - "startColumn": 35, - "charOffset": 110561, - "charLength": 5, - "snippet": { - "text": "skill" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3141, - "startColumn": 1, - "charOffset": 110521, - "charLength": 281, - "snippet": { - "text": "\t}\r\n\r\n\tfloat mitigation = std::ceil(((((skill * m_player.vocation->mitigationFactor) + (shieldFactor * (float)defenseValue)) / 100.0f) * fightFactor * distanceFactor) * 100.0f) / 100.0f;\r\n\tmitigation += (mitigation * (float)getMitigationMultiplier()) / 100.f;\r\n\treturn mitigation;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ef315b88092006ff", - "equalIndicator/v1": "7fdb3814cb896892fc7d39b91e858d065ad879fd775fbd76bf6278d146ba1cf4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1415, - "startColumn": 49, - "charOffset": 41623, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1413, - "startColumn": 1, - "charOffset": 41570, - "charLength": 114, - "snippet": { - "text": "}\r\n\r\nvoid Player::setWriteItem(std::shared_ptr item, uint16_t maxWriteLength /*= 0*/) {\r\n\twindowTextId++;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "36d9ad3c561c3d75", - "equalIndicator/v1": "7fdb85882d981f8334353739064f5b560b0d84aa3912c8b934029809dc05b7b0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'canFollowMaster' can be made const", - "markdown": "Method 'canFollowMaster' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1112, - "startColumn": 16, - "charOffset": 34882, - "charLength": 15, - "snippet": { - "text": "canFollowMaster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1110, - "startColumn": 1, - "charOffset": 34862, - "charLength": 86, - "snippet": { - "text": "}\r\n\r\nbool Creature::canFollowMaster() {\r\n\tauto master = getMaster();\r\n\tif (!master) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "348ea50ad869364d", - "equalIndicator/v1": "7fe742821577182a37bfc055cc3345f22482042c10c7948614cafcba715a8aee" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'newGuild' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'newGuild' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6277, - "startColumn": 52, - "charOffset": 184204, - "charLength": 8, - "snippet": { - "text": "newGuild" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6275, - "startColumn": 1, - "charOffset": 184148, - "charLength": 106, - "snippet": { - "text": "}\r\n\r\nvoid Player::setGuild(const std::shared_ptr newGuild) {\r\n\tif (newGuild == guild) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "31ac441d2a073ae0", - "equalIndicator/v1": "7ff236245274926d4e7ff4a62020640275bea80281d16345d0c35148f46b0346" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 520, - "startColumn": 13, - "charOffset": 15031, - "charLength": 7, - "snippet": { - "text": "toCheck" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 518, - "startColumn": 1, - "charOffset": 14996, - "charLength": 106, - "snippet": { - "text": "\r\n\t\tbool ret = false;\r\n\t\tfor (auto toCheck : *items) {\r\n\t\t\tif (toCheck->isCleanable()) {\r\n\t\t\t\tret = true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a34ea0fd1d05ac3b", - "equalIndicator/v1": "7ff443f579b9e53757aa9e1d44cc58235b0a48a76d3500456050aca520e425b6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/functions/iologindata_save_player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 151, - "startColumn": 63, - "charOffset": 4735, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 149, - "startColumn": 1, - "charOffset": 4668, - "charLength": 178, - "snippet": { - "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerFirst(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "59846e03779f5c14", - "equalIndicator/v1": "7ff61540c8025ad97e4a75d3dafda81d8d03555c80edb02a3693b1348444323a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'newMaster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'newMaster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1320, - "startColumn": 52, - "charOffset": 40572, - "charLength": 9, - "snippet": { - "text": "newMaster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1318, - "startColumn": 1, - "charOffset": 40516, - "charLength": 209, - "snippet": { - "text": "}\r\n\r\nbool Creature::setMaster(std::shared_ptr newMaster, bool reloadCreature /* = false*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\t// Persists if this creature has ever been a summon\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "714336dcfa2ebef5", - "equalIndicator/v1": "80111d7b39a5150c78339526422428fdf841afc1648ac684163bcaa56e15e812" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 139, - "startColumn": 63, - "charOffset": 4662, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 137, - "startColumn": 1, - "charOffset": 4594, - "charLength": 204, - "snippet": { - "text": "\t}\r\n\r\n\tbool playerCanUseItemWithOnHouseTile(std::shared_ptr player, std::shared_ptr item, const Position &toPos, int toStackPos, int toItemId) {\r\n\t\tif (!player || !item) {\r\n\t\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c6c2e4f818600cad", - "equalIndicator/v1": "802cf30c68c306ca053a51bda7619f2ac5e810e4d214a74c2f669e5145e15b1b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 531, - "startColumn": 41, - "charOffset": 20271, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 529, - "startColumn": 1, - "charOffset": 20225, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "da47117c1debc51b", - "equalIndicator/v1": "809949f7d3bccb85c8ce757c88c4fdf78a3661a2ca677b2e253d6bf68effd1f0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/movement/teleport.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 43, - "startColumn": 14, - "charOffset": 1445, - "charLength": 11, - "snippet": { - "text": "queryRemove" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 41, - "startColumn": 1, - "charOffset": 1125, - "charLength": 614, - "snippet": { - "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1b8f9b4c15da1abc", - "equalIndicator/v1": "80b2a9427d317045565e28d112943a7305c23b9032668d99f1a5a129f6f4dda9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 358, - "startColumn": 106, - "charOffset": 17228, - "charLength": 14, - "snippet": { - "text": "const uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 356, - "startColumn": 1, - "charOffset": 16899, - "charLength": 594, - "snippet": { - "text": "\tvoid playerRotateItem(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerConfigureShowOffSocket(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerSetShowOffSocket(uint32_t playerId, Outfit_t &outfit, const Position &pos, uint8_t stackPos, const uint16_t itemId, uint8_t podiumVisible, uint8_t direction);\r\n\tvoid playerWrapableItem(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerWriteItem(uint32_t playerId, uint32_t windowTextId, const std::string &text);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "11d270c84c19d271", - "equalIndicator/v1": "80d140c13e3159c1bbf5f16b3d2b0954b9a53b4cc17da19821068f260205a028" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'msg' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'msg' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocol.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 51, - "startColumn": 30, - "charOffset": 1487, - "charLength": 3, - "snippet": { - "text": "msg" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 49, - "startColumn": 1, - "charOffset": 1452, - "charLength": 122, - "snippet": { - "text": "\t}\r\n\r\n\tvoid send(OutputMessage_ptr msg) const {\r\n\t\tif (auto connection = getConnection();\r\n\t\t connection != nullptr) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "be99042248814e19", - "equalIndicator/v1": "80dcf03a5c5c52f23305417db99ce428fb7aebbbdd2c950b993b3fd5d5e170cb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Redundant string initialization", - "markdown": "Redundant string initialization" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 255, - "startColumn": 14, - "charOffset": 6638, - "charLength": 14, - "snippet": { - "text": "vocationString" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 253, - "startColumn": 1, - "charOffset": 6559, - "charLength": 221, - "snippet": { - "text": "\tbool wieldUnproperly = false;\r\n\tbool m_isDisabledChain = false;\r\n\tstd::string vocationString = \"\";\r\n\r\n\tvoid onUsedWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr destTile) const;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c6acba5fb110e4f5", - "equalIndicator/v1": "80eaf4ed8618affdc23151454afa9a157bb256c8f6c000d59aead7f77eb36bc3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7402, - "startColumn": 28, - "charOffset": 257686, - "charLength": 8, - "snippet": { - "text": "attacker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7400, - "startColumn": 1, - "charOffset": 257631, - "charLength": 311, - "snippet": { - "text": "\r\nvoid Game::sendMessages(\r\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\r\n\tconst Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetPlayer,\r\n\tTextMessage &message, const CreatureVector &spectators, int32_t realDamage\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9b12ee8a2a48c9b7", - "equalIndicator/v1": "80ff2db85e0893d5d0818ca2ba4e4d6c5b7b2b36b349508a8b0449ebc36377ae" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/mailbox/mailbox.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 31, - "startColumn": 22, - "charOffset": 1108, - "charLength": 11, - "snippet": { - "text": "queryRemove" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 29, - "startColumn": 1, - "charOffset": 1082, - "charLength": 171, - "snippet": { - "text": "}\r\n\r\nReturnValue Mailbox::queryRemove(const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr /*= nullptr */) {\r\n\treturn RETURNVALUE_NOTPOSSIBLE;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "866a095aa6e97cf8", - "equalIndicator/v1": "8123233efc6ed3c37374c3da4460ff03ceef0d32e6178fdff42f095fdbc506aa" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 678, - "startColumn": 7, - "charOffset": 24158, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 676, - "startColumn": 1, - "charOffset": 24146, - "charLength": 154, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnLookInShop - \"\r\n\t\t \"Player {} itemType {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cb3a257bdc6ecde5", - "equalIndicator/v1": "81240401f0e6c2634eed13714554a3199931768a7312cd974d7912e2e576e897" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 609, - "startColumn": 64, - "charOffset": 16432, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 607, - "startColumn": 1, - "charOffset": 16364, - "charLength": 113, - "snippet": { - "text": "}\r\n\r\nvoid ConditionAttributes::updateSkills(std::shared_ptr player) {\r\n\tbool needUpdateSkills = false;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "143759e3d7125d4e", - "equalIndicator/v1": "813355645ae9554c1a77dde72c402cc039dcb5f13b300e07004d0a92129ec853" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1248, - "startColumn": 97, - "charOffset": 44507, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1246, - "startColumn": 1, - "charOffset": 44406, - "charLength": 228, - "snippet": { - "text": "}\r\n\r\nvoid Events::eventPlayerOnInventoryUpdate(std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool equip) {\r\n\t// Player:onInventoryUpdate(item, slot, equip)\r\n\tif (info.playerOnInventoryUpdate == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "48ed36bb640a9637", - "equalIndicator/v1": "815722908dcdeac1a44b34ad31c96a15b89c952d7dd045eba04fb7e277b27012" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 569, - "startColumn": 53, - "charOffset": 17122, - "charLength": 2, - "snippet": { - "text": "it" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 567, - "startColumn": 1, - "charOffset": 17022, - "charLength": 140, - "snippet": { - "text": "\r\n\t\t\tif (it.abilities->getHealthGain() != 0) {\r\n\t\t\t\tcondition->setParam(CONDITION_PARAM_HEALTHGAIN, it.abilities->getHealthGain());\r\n\t\t\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "29f9fdae2bbda93e", - "equalIndicator/v1": "815bab9a368ddede35aca29bcb2e538a2c4537ef7212b6b0613e98d8c1db11a3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1071, - "startColumn": 41, - "charOffset": 40794, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1069, - "startColumn": 1, - "charOffset": 40748, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "248d02cd87a3f5e6", - "equalIndicator/v1": "81770f69559da9777dc7c6a6a90e572811e63a688b7203ae67c1b43d3cc87de9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 603, - "startColumn": 7, - "charOffset": 23212, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 601, - "startColumn": 1, - "charOffset": 22982, - "charLength": 377, - "snippet": { - "text": "\r\nvoid EventCallback::playerOnReportRuleViolation(std::shared_ptr player, const std::string &targetName, uint8_t reportType, uint8_t reportReason, const std::string &comment, const std::string &translation) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnReportRuleViolation - \"\r\n\t\t \"Player {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dbd1e4fa7ce9bf0a", - "equalIndicator/v1": "81964ef979200fbc4fa8940a9c274f3ec55b23907bd2d4a9f8d803888de6643b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions", - "markdown": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/value_wrapper.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 38, - "startColumn": 18, - "charOffset": 1218, - "charLength": 12, - "snippet": { - "text": "ValueWrapper" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 36, - "startColumn": 1, - "charOffset": 1036, - "charLength": 369, - "snippet": { - "text": "\texplicit(false) ValueWrapper(const ValueVariant &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const std::string &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(bool value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(int value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(double value, uint64_t timestamp = 0);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c37009ce43adce02", - "equalIndicator/v1": "81a69b9347869a81170c51ed509122ecc3e501f6333222e64b2d676d99aaaf3e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 213, - "startColumn": 6, - "charOffset": 7681, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 211, - "startColumn": 1, - "charOffset": 7637, - "charLength": 187, - "snippet": { - "text": "\tlua_pushnumber(L, colorSecondary);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 8, 6) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7885d9bb6a560f1c", - "equalIndicator/v1": "81ed899311ac1c6508fcebe738b2b8f6d6a4170e978b82e1973e2147919d9bd0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Switch has 2 consecutive identical branches", - "markdown": "Switch has 2 consecutive identical branches" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 187, - "startColumn": 3, - "charOffset": 6799, - "charLength": 4, - "snippet": { - "text": "case" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 185, - "startColumn": 1, - "charOffset": 6732, - "charLength": 157, - "snippet": { - "text": "\t\tcase COMBAT_MANADRAIN:\r\n\t\t\treturn CIPBIA_ELEMENTAL_MANADRAIN;\r\n\t\tcase COMBAT_AGONYDAMAGE:\r\n\t\t\treturn CIPBIA_ELEMENTAL_AGONY;\r\n\t\tcase COMBAT_NEUTRALDAMAGE:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cb5de1520b195047", - "equalIndicator/v1": "81fb2c50a23e7c92ecb2283d39b235f82ab76ab18d9dec6ae45a3b6213348034" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?", - "markdown": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2465, - "startColumn": 7, - "charOffset": 68890, - "charLength": 25, - "snippet": { - "text": "Condition::startCondition" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2463, - "startColumn": 1, - "charOffset": 68799, - "charLength": 151, - "snippet": { - "text": "\r\nbool ConditionSpellCooldown::startCondition(std::shared_ptr creature) {\r\n\tif (!Condition::startCondition(creature)) {\r\n\t\treturn false;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "061448583c72b8bf", - "equalIndicator/v1": "8213505e894001718a053fbce4df889b3fa5bfdbfe147b2a90ae2fb2f2094bdc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructor does not initialize these fields: category", - "markdown": "Constructor does not initialize these fields: category" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creatures_definitions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1362, - "startColumn": 8, - "charOffset": 35684, - "charLength": 12, - "snippet": { - "text": "CreatureIcon" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1360, - "startColumn": 1, - "charOffset": 35671, - "charLength": 58, - "snippet": { - "text": "};\r\n\r\nstruct CreatureIcon {\r\n\tCreatureIcon() = default;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "eede2ccf0ab4c9c0", - "equalIndicator/v1": "8230457ec29670c8bb5122e36c50652d21fc222187344e148f5e225519280fb9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/movement/teleport.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 54, - "startColumn": 7, - "charOffset": 2122, - "charLength": 19, - "snippet": { - "text": "postAddNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 52, - "startColumn": 1, - "charOffset": 2039, - "charLength": 387, - "snippet": { - "text": "\tvoid removeThing(std::shared_ptr thing, uint32_t count) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ea01fb01d8562800", - "equalIndicator/v1": "823332fcdbf3be3bbfb6da2f2ed5d64570f52a17eba4c955b1f17d34b2e0c127" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/scheduling/dispatcher.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 158, - "startColumn": 12, - "charOffset": 4195, - "charLength": 7, - "snippet": { - "text": "uint8_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 156, - "startColumn": 1, - "charOffset": 4084, - "charLength": 244, - "snippet": { - "text": "// Merge only async thread events with main dispatch events\r\nvoid Dispatcher::mergeAsyncEvents() {\r\n\tconstexpr uint8_t start = static_cast(TaskGroup::GenericParallel);\r\n\tconstexpr uint8_t end = static_cast(TaskGroup::Last);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4329df7f9ea01aa0", - "equalIndicator/v1": "825c960ce11bc1801e71635bbfc968a4339df613c15941b6ba0ea6a50786752e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6914, - "startColumn": 29, - "charOffset": 240023, - "charLength": 36, - "snippet": { - "text": "(damage.primary.value * damageBonus)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6912, - "startColumn": 1, - "charOffset": 239884, - "charLength": 268, - "snippet": { - "text": "\t\t\tint32_t damageBonus = attackerPlayer->wheel()->checkExecutionersThrow(target);\r\n\t\t\tif (damageBonus != 0) {\r\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\r\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\r\n\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "66a1f2b2fd18f2cb", - "equalIndicator/v1": "8273ade1b8fd115145076bd80318b197d1372cc6beedc346997fcf583f6a87fb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/events_callbacks.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 41, - "startColumn": 12, - "charOffset": 1363, - "charLength": 8, - "snippet": { - "text": "callback" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 39, - "startColumn": 1, - "charOffset": 1179, - "charLength": 265, - "snippet": { - "text": "std::vector> EventsCallbacks::getCallbacksByType(EventCallback_t type) const {\r\n\tstd::vector> eventCallbacks;\r\n\tfor (auto callback : getCallbacks()) {\r\n\t\tif (callback->getType() != type) {\r\n\t\t\tcontinue;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4a8a70c1681e8a9b", - "equalIndicator/v1": "828f8e4b34c22669f505280b7fc33d53d5d92d0a044c31688dee5ac5e14e027a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'float'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/map.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1047, - "startColumn": 145, - "charOffset": 30503, - "charLength": 13, - "snippet": { - "text": "(end - start)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1045, - "startColumn": 1, - "charOffset": 30326, - "charLength": 223, - "snippet": { - "text": "\r\n\tuint64_t end = OTSYS_TIME();\r\n\tg_logger().info(\"CLEAN: Removed {} item{} from {} tile{} in {} seconds\", count, (count != 1 ? \"s\" : \"\"), qntTiles, (qntTiles != 1 ? \"s\" : \"\"), (end - start) / (1000.f));\r\n\treturn count;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "62aa7d09a1b66d55", - "equalIndicator/v1": "82a6a3bd7f9ef71d5a8ec63b87e90bfaf318db44183ddff04feefa3884fd0c69" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructor does not initialize these fields: type", - "markdown": "Constructor does not initialize these fields: type" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 53, - "startColumn": 7, - "charOffset": 1481, - "charLength": 14, - "snippet": { - "text": "TargetCallback" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 51, - "startColumn": 1, - "charOffset": 1469, - "charLength": 161, - "snippet": { - "text": "};\r\n\r\nclass TargetCallback final : public CallBack {\r\npublic:\r\n\tvoid onTargetCombat(std::shared_ptr creature, std::shared_ptr target) const;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5523d4a454555970", - "equalIndicator/v1": "82bf27ed558062b50234254f71eb84bfc3d5e5030e5341650c63683102963123" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/bed.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 82, - "startColumn": 46, - "charOffset": 2315, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 80, - "startColumn": 1, - "charOffset": 2265, - "charLength": 152, - "snippet": { - "text": "}\r\n\r\nbool BedItem::canUse(std::shared_ptr player) {\r\n\tif ((player == nullptr) || (house == nullptr) || !player->isPremium()) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "485a3681112c8b2e", - "equalIndicator/v1": "82cfde0bcbdc716e6efa04686d99d0513804f605d61bfddb3dc02e2687d42317" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'", - "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7736, - "startColumn": 22, - "charOffset": 242866, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7734, - "startColumn": 1, - "charOffset": 242738, - "charLength": 176, - "snippet": { - "text": "\t\t\tmsg.add(player->getBaseSkill(skill));\r\n\t\t\tmsg.add(player->getLoyaltySkill(skill));\r\n\t\t\tmsg.add(player->getSkillPercent(skill) * 100);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ab42adf619831db0", - "equalIndicator/v1": "82e00db84037d20e42b1b7f7fb6707e1f2fedc2ec8223454424f9e2b4c504adc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 638, - "startColumn": 126, - "charOffset": 22776, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 636, - "startColumn": 1, - "charOffset": 22646, - "charLength": 306, - "snippet": { - "text": "}\r\n\r\nvoid Events::eventPlayerOnLookInTrade(std::shared_ptr player, std::shared_ptr partner, std::shared_ptr item, int32_t lookDistance) {\r\n\t// Player:onLookInTrade(partner, item, distance) or Player.onLookInTrade(self, partner, item, distance)\r\n\tif (info.playerOnLookInTrade == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e9729f44ae017822", - "equalIndicator/v1": "8320df8500aef70238228eded681fa9987b198cc00a3722bfaee5e9ac7102968" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 575, - "startColumn": 66, - "charOffset": 21894, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 573, - "startColumn": 1, - "charOffset": 21824, - "charLength": 293, - "snippet": { - "text": "}\r\n\r\nbool EventCallback::playerOnMoveCreature(std::shared_ptr player, std::shared_ptr creature, const Position &fromPosition, const Position &toPosition) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnMoveCreature - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0bdc976aa8a83eae", - "equalIndicator/v1": "832c608098ea0255c7abc3b7164c76a478ef37658a589bc0e1a4f9c0f918b8ee" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1200, - "startColumn": 7, - "charOffset": 42814, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1198, - "startColumn": 1, - "charOffset": 42802, - "charLength": 147, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnRequestQuestLog - \"\r\n\t\t \"Player {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "43759119ee5b0ead", - "equalIndicator/v1": "833842659f6d6c17fb3af038c7a7a2e1fd3f775786a614b01aa21a0d3108f90c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'virtual' is redundant since the function is already declared 'override'", - "markdown": "'virtual' is redundant since the function is already declared 'override'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 141, - "startColumn": 22, - "charOffset": 3871, - "charLength": 8, - "snippet": { - "text": "queryAdd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 139, - "startColumn": 1, - "charOffset": 3818, - "charLength": 506, - "snippet": { - "text": "\r\n\t// cylinder implementations\r\n\tvirtual ReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override final;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e9421f4031cf4086", - "equalIndicator/v1": "834a8588687b46040c8ea4c119ee0c42ab4e1084a367e29f75591cc71280d6ca" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/map/tile_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 498, - "startColumn": 20, - "charOffset": 11721, - "charLength": 4, - "snippet": { - "text": "tile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 496, - "startColumn": 1, - "charOffset": 11696, - "charLength": 67, - "snippet": { - "text": "\t}\r\n\r\n\tlua_pushnumber(L, tile->getCreatureCount());\r\n\treturn 1;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0917524b8e113c67", - "equalIndicator/v1": "835fed54a7e971aad6cde3f69d0717146aae78a3918a1e5da705fc7bb76a8c78" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3574, - "startColumn": 45, - "charOffset": 110314, - "charLength": 27, - "snippet": { - "text": "Weapons::getMaxWeaponDamage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3572, - "startColumn": 1, - "charOffset": 110153, - "charLength": 604, - "snippet": { - "text": "\t\t\tint32_t attackSkill = player->getSkillLevel(SKILL_DISTANCE);\r\n\t\t\tfloat attackFactor = player->getAttackFactor();\r\n\t\t\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor, true) * player->getVocation()->distDamageMultiplier);\r\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\r\n\t\t\t\tmaxDamage += static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue - weapon->getAttack() + it.abilities->elementDamage, attackFactor, true) * player->getVocation()->distDamageMultiplier);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5a60e15866fc382d", - "equalIndicator/v1": "8364b096eb3eb3528bfcea3b16038f765ee1b6c217b088d083f5f65857eb415f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6866, - "startColumn": 26, - "charOffset": 237949, - "charLength": 49, - "snippet": { - "text": "(damage.primary.value * damage.healingMultiplier)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6864, - "startColumn": 1, - "charOffset": 237751, - "charLength": 282, - "snippet": { - "text": "// Wheel of destiny combat helpers\r\nvoid Game::applyWheelOfDestinyHealing(CombatDamage &damage, std::shared_ptr attackerPlayer, std::shared_ptr target) {\r\n\tdamage.primary.value += (damage.primary.value * damage.healingMultiplier) / 100.;\r\n\r\n\tif (attackerPlayer) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "94fbf54d5f6ec097", - "equalIndicator/v1": "8367dcfd8141373da8e051755da25a53179c777923ed8309c8e00c32ad77c843" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'float'", - "markdown": "Narrowing conversion from 'double' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/io_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 719, - "startColumn": 26, - "charOffset": 33476, - "charLength": 19, - "snippet": { - "text": "MITIGATION_INCREASE" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 717, - "startColumn": 1, - "charOffset": 33265, - "charLength": 369, - "snippet": { - "text": "// SLOT_PURPLE_TOP_75 = 23\r\nvoid IOWheel::slotPurpleTop75(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\r\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\r\n\tauto pointsInSlot = isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_PURPLE_TOP_75);\r\n\tif (isKnight(vocationCipId)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8a6e7be58d521cd3", - "equalIndicator/v1": "8375a2e38fe685e52b8b0c0b3554762509f4efb283344b83a8b54abd3df87462" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8968, - "startColumn": 46, - "charOffset": 313495, - "charLength": 5, - "snippet": { - "text": "offer" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8966, - "startColumn": 1, - "charOffset": 313328, - "charLength": 369, - "snippet": { - "text": "\tif (offer.type == MARKETACTION_BUY) {\r\n\t\tplayer->setBankBalance(player->getBankBalance() + offer.price * offer.amount);\r\n\t\tg_metrics().addCounter(\"balance_decrease\", offer.price * offer.amount, { { \"player\", player->getName() }, { \"context\", \"market_purchase\" } });\r\n\t\t// Send market window again for update stats\r\n\t\tplayer->sendMarketEnter(player->getLastDepotId());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b8f274a553b2d95e", - "equalIndicator/v1": "83a2f6f66884beeb6065f28b1ed5f3d3751dac13872218e93b5660ebcb9524b7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 132, - "startColumn": 8, - "charOffset": 3369, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 130, - "startColumn": 1, - "charOffset": 3273, - "charLength": 213, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeIsWritable(lua_State* L) {\r\n\t// itemType:isWritable()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->canWriteText);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fecbfee0a7344972", - "equalIndicator/v1": "83b6083a60415fcb315fecf453596e92afb772f2c60601f46b6dc06c22871433" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'getForgeItemFromId' can be made const", - "markdown": "Method 'getForgeItemFromId' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4142, - "startColumn": 31, - "charOffset": 124790, - "charLength": 18, - "snippet": { - "text": "getForgeItemFromId" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4140, - "startColumn": 1, - "charOffset": 124755, - "charLength": 168, - "snippet": { - "text": "}\r\n\r\nstd::shared_ptr Player::getForgeItemFromId(uint16_t itemId, uint8_t tier) {\r\n\tfor (auto item : getAllInventoryItems(true)) {\r\n\t\tif (item->hasImbuements()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f10a7c788cb2f725", - "equalIndicator/v1": "83c7898f903cf5ddb28345d322a78c74af1fe05c4b35ab4e67f77aa328cd66e3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 897, - "startColumn": 69, - "charOffset": 34228, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 895, - "startColumn": 1, - "charOffset": 34155, - "charLength": 205, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::playerOnRequestQuestLog(std::shared_ptr player) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnRequestQuestLog - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d60cae31049fa3be", - "equalIndicator/v1": "83cd4d677e1bdc61787c1b9b70c91dce7cf7eff5c4feacb0cf5885bf6770f746" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2787, - "startColumn": 3, - "charOffset": 85256, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2785, - "startColumn": 1, - "charOffset": 85210, - "charLength": 177, - "snippet": { - "text": "\t\tplayer->sendTeamFinderList();\r\n\t} else {\r\n\t\tuint32_t leaderID = msg.get();\r\n\t\tstd::shared_ptr leader = g_game().getPlayerByGUID(leaderID);\r\n\t\tif (!leader) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "571c3eb07fc3bc95", - "equalIndicator/v1": "83da22252258ca33488a665ca7df51a295b12a0fed9dd2f9c4eac58e014bc390" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 732, - "startColumn": 13, - "charOffset": 23736, - "charLength": 12, - "snippet": { - "text": "maxHitChance" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 730, - "startColumn": 1, - "charOffset": 23706, - "charLength": 60, - "snippet": { - "text": "\t\t\t}\r\n\t\t} else {\r\n\t\t\tchance = maxHitChance;\r\n\t\t}\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1b30f1afa43c9cba", - "equalIndicator/v1": "83e67846b7fc0ae6764972a3190bcb1d6bd70ebbc596cb92456b6ef82a95e145" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 945, - "startColumn": 23, - "charOffset": 30616, - "charLength": 8, - "snippet": { - "text": "blockHit" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 943, - "startColumn": 1, - "charOffset": 30589, - "charLength": 247, - "snippet": { - "text": "}\r\n\r\nBlockType_t Creature::blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense /* = false */, bool checkArmor /* = false */, bool /* field = false */) {\r\n\tBlockType_t blockType = BLOCK_NONE;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "280b03377f315c8a", - "equalIndicator/v1": "841d7b4a47b17ebb571f2d63b0d440a2d8a63a4ff994d271fd39f806b76dafe0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1369, - "startColumn": 55, - "charOffset": 46906, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1367, - "startColumn": 1, - "charOffset": 46847, - "charLength": 298, - "snippet": { - "text": "}\r\n\r\nvoid Combat::doCombatDispel(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms) {\r\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\r\n\tif ((caster && target)\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3f43a94fcc471f43", - "equalIndicator/v1": "8430d27dbeb524e928545475dd30cdd62a4403ee4787a619dd7ac6a4dd937ad7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 769, - "startColumn": 11, - "charOffset": 22395, - "charLength": 7, - "snippet": { - "text": "manaMax" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 767, - "startColumn": 1, - "charOffset": 22335, - "charLength": 127, - "snippet": { - "text": "\t\t\treturn healthMax;\r\n\t\tcase STAT_MAXMANAPOINTS:\r\n\t\t\treturn manaMax;\r\n\t\tcase STAT_MAGICPOINTS:\r\n\t\t\treturn getBaseMagicLevel();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e43530ae45a004ac", - "equalIndicator/v1": "84582db627bd4324bb7196e04e179996dae1dfe9bb42c048ff18e86e4fcd1c8a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 293, - "startColumn": 75, - "charOffset": 10519, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 291, - "startColumn": 1, - "charOffset": 10440, - "charLength": 246, - "snippet": { - "text": "}\r\n\r\nReturnValue Events::eventCreatureOnTargetCombat(std::shared_ptr creature, std::shared_ptr target) {\r\n\t// Creature:onTargetCombat(target) or Creature.onTargetCombat(self, target)\r\n\tif (info.creatureOnTargetCombat == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8542ef0daec09de0", - "equalIndicator/v1": "846ab527628f1f0788ef9ee1d87967badb91b085856ba16a484b8340a3ac5c7b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1076, - "startColumn": 83, - "charOffset": 35126, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1074, - "startColumn": 1, - "charOffset": 35039, - "charLength": 214, - "snippet": { - "text": "}\r\n\r\nbool Combat::doCombat(std::shared_ptr caster, std::shared_ptr target) const {\r\n\tif (caster != nullptr && params.chainCallback) {\r\n\t\treturn doCombatChain(caster, target, params.aggressive);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9b0478bb40a9ba8c", - "equalIndicator/v1": "848b4a84f4453dd07e3ace653986eb66b5587dd37f4f7e7af73ed1225d233ac4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/creature_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 670, - "startColumn": 2, - "charOffset": 18228, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 668, - "startColumn": 1, - "charOffset": 18077, - "charLength": 306, - "snippet": { - "text": "\tConditionType_t conditionType = getNumber(L, 2);\r\n\tConditionId_t conditionId = getNumber(L, 3, CONDITIONID_COMBAT);\r\n\tuint32_t subId = getNumber(L, 4, 0);\r\n\r\n\tconst std::shared_ptr condition = creature->getCondition(conditionType, conditionId, subId);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1f83e388b04628ed", - "equalIndicator/v1": "848f1eb27fe15ffcc3858f6aff8749d7a6bb90c1b626e170a70246ad3fff1ab7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 719, - "startColumn": 15, - "charOffset": 23356, - "charLength": 11, - "snippet": { - "text": "static_cast" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 717, - "startColumn": 1, - "charOffset": 23316, - "charLength": 132, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 65) * 1.50f) + 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3d0708affa6aa96d", - "equalIndicator/v1": "84a014af1aa77cdf8971b86783b6cb58756445fa2f395e78bf008e131bca829a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3142, - "startColumn": 2, - "charOffset": 96331, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3140, - "startColumn": 1, - "charOffset": 96262, - "charLength": 172, - "snippet": { - "text": "\r\nvoid ProtocolGame::parseModalWindowAnswer(NetworkMessage &msg) {\r\n\tuint32_t id = msg.get();\r\n\tuint8_t button = msg.getByte();\r\n\tuint8_t choice = msg.getByte();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ec2847515bd92797", - "equalIndicator/v1": "84b34c61ecf4ece2929f454b2143ed8dfbd17fc637ca041da6fc4adcb3b62142" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead", - "markdown": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iomarket.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 20, - "startColumn": 35, - "charOffset": 722, - "charLength": 9, - "snippet": { - "text": "std::atoi" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 18, - "startColumn": 1, - "charOffset": 613, - "charLength": 317, - "snippet": { - "text": "\r\nuint8_t IOMarket::getTierFromDatabaseTable(const std::string &string) {\r\n\tauto tier = static_cast(std::atoi(string.c_str()));\r\n\tif (tier > g_configManager().getNumber(FORGE_MAX_ITEM_TIER, __FUNCTION__)) {\r\n\t\tg_logger().error(\"{} - Failed to get number value {} for tier table result\", __FUNCTION__, tier);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ca93225499e1390a", - "equalIndicator/v1": "84b6ebd4c7a9dca6d62216448ae51d6f02e704dcd8d98ab8bc5c91bc4b16df51" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')", - "markdown": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5775, - "startColumn": 46, - "charOffset": 170628, - "charLength": 8, - "snippet": { - "text": "std::max" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5773, - "startColumn": 1, - "charOffset": 170501, - "charLength": 287, - "snippet": { - "text": "\t\t\tskullDuration = std::floor(skullTicks / (24 * 60 * 60 * 1000));\r\n\t\t}\r\n\t\tclient->sendUnjustifiedPoints(dayProgress, std::max(dayMax - dayKills, 0.0), weekProgress, std::max(weekMax - weekKills, 0.0), monthProgress, std::max(monthMax - monthKills, 0.0), skullDuration);\r\n\t}\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "df07f981822657bf", - "equalIndicator/v1": "84b7aae92bdadc5fe89ee106f2f5c66669aeba97c5b56970dcc33ea17ee3670b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6895, - "startColumn": 27, - "charOffset": 239111, - "charLength": 50, - "snippet": { - "text": "(damage.primary.value * (damage.damageMultiplier))" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6893, - "startColumn": 1, - "charOffset": 239046, - "charLength": 218, - "snippet": { - "text": "\r\n\tif (damage.damageMultiplier > 0) {\r\n\t\tdamage.primary.value += (damage.primary.value * (damage.damageMultiplier)) / 100.;\r\n\t\tdamage.secondary.value += (damage.secondary.value * (damage.damageMultiplier)) / 100.;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cafe6d66966b4d3a", - "equalIndicator/v1": "84c863489bdfa19e8472483c88b204c35a0a339ea34152a828cb9149569499d5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 187, - "startColumn": 8, - "charOffset": 4737, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 185, - "startColumn": 1, - "charOffset": 4637, - "charLength": 219, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeIsPickupable(lua_State* L) {\r\n\t// itemType:isPickupable()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isPickupable());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ff70e9478cf884d6", - "equalIndicator/v1": "84ca960e8ead10ea90d5993a83ae1bf31528729765d683da7846b6cf5c1d08c3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/housetile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 117, - "startColumn": 24, - "charOffset": 3961, - "charLength": 11, - "snippet": { - "text": "queryRemove" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 115, - "startColumn": 1, - "charOffset": 3933, - "charLength": 222, - "snippet": { - "text": "}\r\n\r\nReturnValue HouseTile::queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor /*= nullptr*/) {\r\n\tstd::shared_ptr item = thing->getItem();\r\n\tif (!item) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fdd3cd057c041b2c", - "equalIndicator/v1": "84ce4b8b6ac1aab1c6194680981053d2c786939499522f6fb969421f212fde6b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'inbox' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'inbox' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/depot/depotlocker.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 45, - "startColumn": 54, - "charOffset": 1623, - "charLength": 5, - "snippet": { - "text": "inbox" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 43, - "startColumn": 1, - "charOffset": 1565, - "charLength": 163, - "snippet": { - "text": "}\r\n\r\nvoid DepotLocker::removeInbox(std::shared_ptr inbox) {\r\n\tauto cit = std::find(itemlist.begin(), itemlist.end(), inbox);\r\n\tif (cit == itemlist.end()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e2afd0277c5af2e9", - "equalIndicator/v1": "84d68e88d976137349fbe50e84bf8533482d406a6161cfb395b0eb2e55a34f65" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 336, - "startColumn": 60, - "charOffset": 12022, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 334, - "startColumn": 1, - "charOffset": 11958, - "charLength": 234, - "snippet": { - "text": "}\r\n\r\nvoid Events::eventCreatureOnHear(std::shared_ptr creature, std::shared_ptr speaker, const std::string &words, SpeakClasses type) {\r\n\t// Creature:onHear(speaker, words, type)\r\n\tif (info.creatureOnHear == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1fbc564e15a9f5ae", - "equalIndicator/v1": "852e17aea5fa9fe81b482949c618434af414628f405122244e463f507a1826fc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/grouping/party.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 449, - "startColumn": 76, - "charOffset": 12522, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 447, - "startColumn": 1, - "charOffset": 12442, - "charLength": 151, - "snippet": { - "text": "}\r\n\r\nvoid Party::shareExperience(uint64_t experience, std::shared_ptr target /* = nullptr*/) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1a403ea4a6eb0db7", - "equalIndicator/v1": "85350433829775e600b3e727f467bd89bf02830fccb032127262b41da965951c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7627, - "startColumn": 55, - "charOffset": 266794, - "charLength": 8, - "snippet": { - "text": "attacker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7625, - "startColumn": 1, - "charOffset": 266735, - "charLength": 247, - "snippet": { - "text": "}\r\n\r\nbool Game::combatChangeMana(std::shared_ptr attacker, std::shared_ptr target, CombatDamage &damage) {\r\n\tconst Position &targetPos = target->getPosition();\r\n\tauto manaChange = damage.primary.value + damage.secondary.value;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9a0750d5a85873ae", - "equalIndicator/v1": "854305211bb25dc7a1f64e52b547380ec2c2f9574a2c5a730d590158ca2186af" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/player_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1437, - "startColumn": 41, - "charOffset": 50982, - "charLength": 17, - "snippet": { - "text": "m_playerBonusData" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1435, - "startColumn": 1, - "charOffset": 50929, - "charLength": 180, - "snippet": { - "text": "\r\n\t// Leech\r\n\tsetPlayerCombatStats(COMBAT_LIFEDRAIN, m_playerBonusData.leech.lifeLeech * 100);\r\n\tsetPlayerCombatStats(COMBAT_MANADRAIN, m_playerBonusData.leech.manaLeech * 100);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b5af103ceb33f1ff", - "equalIndicator/v1": "8543153d2d49b8de25032443c4a8ef308d1cef14c69b532940401d4ecd72831e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2322, - "startColumn": 2, - "charOffset": 72298, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2320, - "startColumn": 1, - "charOffset": 72291, - "charLength": 120, - "snippet": { - "text": "\t}\r\n\r\n\tuint16_t raceId = msg.get();\r\n\tstd::string Class = \"\";\r\n\tstd::shared_ptr mtype = nullptr;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1c748247b567b6a9", - "equalIndicator/v1": "854c61a3600dcd0f9866dae47247cbdd22ff8461bd1d721fd23d0a00d9dd4cb9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/map.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 225, - "startColumn": 78, - "charOffset": 6686, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 223, - "startColumn": 1, - "charOffset": 6604, - "charLength": 213, - "snippet": { - "text": "}\r\n\r\nbool Map::placeCreature(const Position ¢erPos, std::shared_ptr creature, bool extendedPos /* = false*/, bool forceLogin /* = false*/) {\r\n\tauto monster = creature->getMonster();\r\n\tif (monster) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "21b802bfed659689", - "equalIndicator/v1": "8554e880223b4d694a57eb6172f39c679e000077ae95aa838a362dd445fcbacb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1251, - "startColumn": 10, - "charOffset": 34640, - "charLength": 11, - "snippet": { - "text": "healthTicks" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1249, - "startColumn": 1, - "charOffset": 34592, - "charLength": 131, - "snippet": { - "text": "\r\n\tif (player != nullptr && isBuff) {\r\n\t\treturn healthTicks / g_configManager().getFloat(RATE_SPELL_COOLDOWN, __FUNCTION__);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2b408c742833826c", - "equalIndicator/v1": "85596cde6332d81057a877e94a616f11348ca6471363b68028b19f9ac8408b20" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/depot/depotchest.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 59, - "startColumn": 18, - "charOffset": 1794, - "charLength": 19, - "snippet": { - "text": "postAddNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 57, - "startColumn": 1, - "charOffset": 1772, - "charLength": 229, - "snippet": { - "text": "}\r\n\r\nvoid DepotChest::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tstd::shared_ptr localParent = getParent();\r\n\tif (localParent != nullptr) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "064ea766fa05ed36", - "equalIndicator/v1": "8565c2a58e4b81fc3cb28f6916f364daf2071d95c6a59fc39016e4a72ec004df" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'owner' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'owner' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1038, - "startColumn": 46, - "charOffset": 29047, - "charLength": 5, - "snippet": { - "text": "owner" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1036, - "startColumn": 1, - "charOffset": 28997, - "charLength": 98, - "snippet": { - "text": "}\r\n\r\nbool Item::isOwner(std::shared_ptr owner) const {\r\n\tif (!owner) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3fef2afd3d9494eb", - "equalIndicator/v1": "858c617afef66b22e7bba2d50119fb7affb55f0fa96f9b203b59a16a223aa0fc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'actor' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'actor' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6454, - "startColumn": 104, - "charOffset": 222883, - "charLength": 5, - "snippet": { - "text": "actor" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6452, - "startColumn": 1, - "charOffset": 222775, - "charLength": 186, - "snippet": { - "text": "}\r\n\r\nvoid Game::sendSingleSoundEffect(const Position &pos, SoundEffect_t soundId, std::shared_ptr actor /* = nullptr*/) {\r\n\tif (soundId == SoundEffect_t::SILENCE) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2511f6a683abf69d", - "equalIndicator/v1": "8598f51d1ee090219989f5b5073b37ccf0a51e2d02e8771ceddd7e02dee13a00" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1813, - "startColumn": 3, - "charOffset": 54721, - "charLength": 16, - "snippet": { - "text": "ObjectCategory_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1811, - "startColumn": 1, - "charOffset": 54596, - "charLength": 288, - "snippet": { - "text": "\t\tg_game().playerSetManagedContainer(player->getID(), category, pos, itemId, stackpos, true);\r\n\t} else if (action == 1) {\r\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\r\n\t\tg_game().playerClearManagedContainer(player->getID(), category, true);\r\n\t} else if (action == 2) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fc8423c5c82b5b1c", - "equalIndicator/v1": "85a216b5000a95fc99067bdb986f1f1de5b2dc5d79f98c66f53df10ca8f1721e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1022, - "startColumn": 66, - "charOffset": 36931, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1020, - "startColumn": 1, - "charOffset": 36861, - "charLength": 255, - "snippet": { - "text": "}\r\n\r\nvoid Events::eventPlayerOnGainExperience(std::shared_ptr player, std::shared_ptr target, uint64_t &exp, uint64_t rawExp) {\r\n\t// Player:onGainExperience(target, exp, rawExp)\r\n\t// rawExp gives the original exp which is not multiplied\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "55a29f7d7d8699c4", - "equalIndicator/v1": "86061a7c75d8fd4e701736e34e46b7dcf40646789445ded1927198c30a1b9adc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1923, - "startColumn": 20, - "charOffset": 66083, - "charLength": 1, - "snippet": { - "text": "y" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1921, - "startColumn": 1, - "charOffset": 65975, - "charLength": 148, - "snippet": { - "text": "\t\t\t\t// calculate new coordinates using rotation center\r\n\t\t\t\tint32_t newX = x - centerX;\r\n\t\t\t\tint32_t newY = y - centerY;\r\n\r\n\t\t\t\t// perform rotation\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d495f0885005ea90", - "equalIndicator/v1": "8616dca46b3c33e55145620b9dcdfdd9255cd12a6b46ab43b14cf6b15517689f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3093, - "startColumn": 71, - "charOffset": 115148, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3091, - "startColumn": 1, - "charOffset": 115073, - "charLength": 265, - "snippet": { - "text": "}\r\n\r\nReturnValue Game::internalCollectManagedItems(std::shared_ptr player, std::shared_ptr item, ObjectCategory_t category /* = OBJECTCATEGORY_DEFAULT*/, bool isLootContainer /* = true*/) {\r\n\tif (!player || !item) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "59a1a2c31b9828cf", - "equalIndicator/v1": "861e4027dd9f59663a3a2967ccbfc2355bb4981fb4493746603cd2977fe39ee0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'row' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'row' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/database/database.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 175, - "startColumn": 14, - "charOffset": 5335, - "charLength": 22, - "snippet": { - "text": "const std::string_view" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 173, - "startColumn": 1, - "charOffset": 5226, - "charLength": 196, - "snippet": { - "text": "\texplicit DBInsert(std::string query);\r\n\tvoid upsert(const std::vector &columns);\r\n\tbool addRow(const std::string_view row);\r\n\tbool addRow(std::ostringstream &row);\r\n\tbool execute();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "67f42a6f4e01d0cd", - "equalIndicator/v1": "862b845df39bd9ae4c20c41f050497b6da4277accca66a9d4f6cf4f3e405946e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1265, - "startColumn": 46, - "charOffset": 45063, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1263, - "startColumn": 1, - "charOffset": 44954, - "charLength": 173, - "snippet": { - "text": "\tscriptInterface.pushFunction(info.playerOnInventoryUpdate);\r\n\r\n\tLuaScriptInterface::pushUserdata(L, player);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c67e425b43731f62", - "equalIndicator/v1": "862f0911d16f4144dcc3b6f5f8d82705a7b6ea641c226bad72fcbcd432ce966f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1490, - "startColumn": 12, - "charOffset": 42449, - "charLength": 19, - "snippet": { - "text": "postAddNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1488, - "startColumn": 1, - "charOffset": 42433, - "charLength": 323, - "snippet": { - "text": "}\r\n\r\nvoid Tile::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link /*= LINK_OWNER*/) {\r\n\tfor (const auto &spectator : Spectators().find(getPosition(), true)) {\r\n\t\tspectator->getPlayer()->postAddNotification(thing, oldParent, index, LINK_NEAR);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8960385ece3c2a76", - "equalIndicator/v1": "8661739e8a2b25a3e2eb8706fece418755aac4cd085009930843504fcb183598" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1399, - "startColumn": 90, - "charOffset": 48360, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1397, - "startColumn": 1, - "charOffset": 48266, - "charLength": 364, - "snippet": { - "text": "}\r\n\r\nvoid Combat::doCombatDefault(std::shared_ptr caster, std::shared_ptr target, const Position &origin, const CombatParams ¶ms) {\r\n\tif (!params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR)) {\r\n\t\tauto spectators = Spectators().find(target->getPosition(), true);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "adf951155788fc04", - "equalIndicator/v1": "8663201d0d8094b4d60557a8b95b1085e5c6c880f704dceca4f04b5edaa697ea" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 371, - "startColumn": 8, - "charOffset": 9263, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 369, - "startColumn": 1, - "charOffset": 9161, - "charLength": 220, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetShootRange(lua_State* L) {\r\n\t// itemType:getShootRange()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->shootRange);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2b2d8bffddaa6f59", - "equalIndicator/v1": "8680d094caf7a2f2a2c28bf59abe417e2b76470d7fb874db58c5d5058e3ec463" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 143, - "startColumn": 8, - "charOffset": 3634, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 141, - "startColumn": 1, - "charOffset": 3538, - "charLength": 240, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeIsBlocking(lua_State* L) {\r\n\t// itemType:isBlocking()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->blockProjectile || itemType->blockSolid);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "71358653253885cc", - "equalIndicator/v1": "8684f207488a45ba9922f35c4b5eacb8ccddb4e22b9507ca83bd0e8cd463e4e0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1063, - "startColumn": 7, - "charOffset": 40465, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1061, - "startColumn": 1, - "charOffset": 40339, - "charLength": 273, - "snippet": { - "text": "\r\nvoid EventCallback::monsterPostDropLoot(std::shared_ptr monster, std::shared_ptr corpse) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::monsterPostDropLoot - \"\r\n\t\t \"Monster corpse {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "187d2a470ede4312", - "equalIndicator/v1": "86932966f11e826bee42adbcd88e86c9b5f100bd1400e84e2625aa9dbbbba33b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 154, - "startColumn": 8, - "charOffset": 3930, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 152, - "startColumn": 1, - "charOffset": 3830, - "charLength": 219, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeIsGroundTile(lua_State* L) {\r\n\t// itemType:isGroundTile()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isGroundTile());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "aebc9d7af3139121", - "equalIndicator/v1": "86b82848c5f1dce4227ab35fabae9852c7783a87f1403f953750c6d6ea8c7ae6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1439, - "startColumn": 53, - "charOffset": 42224, - "charLength": 5, - "snippet": { - "text": "house" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1437, - "startColumn": 1, - "charOffset": 42167, - "charLength": 117, - "snippet": { - "text": "}\r\n\r\nvoid Player::sendHouseWindow(std::shared_ptr house, uint32_t listId) const {\r\n\tif (!client) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2c2e6ef1dd8ac3e4", - "equalIndicator/v1": "86bb2e72817cff2555c83f26e8389cb3597889be8bc47b583a9a24abc6039384" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1001, - "startColumn": 27, - "charOffset": 36168, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 999, - "startColumn": 1, - "charOffset": 36136, - "charLength": 130, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnTradeAccept, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6c22602cb9629f51", - "equalIndicator/v1": "86e4208ba121cdd7c451875e69a545983887c2e95f5a20e0a3481cf327701441" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1377, - "startColumn": 36, - "charOffset": 41377, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1375, - "startColumn": 1, - "charOffset": 41250, - "charLength": 147, - "snippet": { - "text": "\tvoid sendPartyCreatureShield(std::shared_ptr creature) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPartyCreatureShield(creature);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "799e0db7a2587352", - "equalIndicator/v1": "86e5e05b7cecdecc1dd17349d961842b3d3f01ddcbb801be1d6aa7475230f490" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 57, - "startColumn": 57, - "charOffset": 1921, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 55, - "startColumn": 1, - "charOffset": 1860, - "charLength": 154, - "snippet": { - "text": "}\r\n\r\nbool Creature::canSeeCreature(std::shared_ptr creature) const {\r\n\tif (!canSeeInvisibility() && creature->isInvisible()) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a8a859ad9494a8a9", - "equalIndicator/v1": "86ee2f5225fbf77570ff02d855ccd4e2461512bb20f3c29e6ffdb6ca58778bd4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/bank/bank.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 132, - "startColumn": 45, - "charOffset": 3472, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 130, - "startColumn": 1, - "charOffset": 3423, - "charLength": 117, - "snippet": { - "text": "}\r\n\r\nbool Bank::withdraw(std::shared_ptr player, uint64_t amount) {\r\n\tif (!debit(amount)) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7402dc9fb7918b64", - "equalIndicator/v1": "8709688dc071e487a9d8a3f1b1eb2000871458cb5ccaa1cf3a7b0af03c53abbd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8399, - "startColumn": 54, - "charOffset": 266060, - "charLength": 8, - "snippet": { - "text": "stackpos" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8397, - "startColumn": 1, - "charOffset": 265955, - "charLength": 129, - "snippet": { - "text": "\t\tAddCreature(msg, creature, false, 0);\r\n\t} else {\r\n\t\tsendAddCreature(creature, creature->getPosition(), stackpos, false);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b464a438f4f53d00", - "equalIndicator/v1": "8730b1f2424a1aea971b38e68b62d0b1cea7edec7efa8ff79535bc0c8e75ca49" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 553, - "startColumn": 31, - "charOffset": 16859, - "charLength": 13, - "snippet": { - "text": "containerItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 551, - "startColumn": 1, - "charOffset": 16717, - "charLength": 392, - "snippet": { - "text": "\t\t\t// Iterate through every item and check how much free stackable slots there is.\r\n\t\t\tuint32_t slotIndex = 0;\r\n\t\t\tfor (std::shared_ptr containerItem : itemlist) {\r\n\t\t\t\tif (containerItem != item && containerItem->equals(item) && containerItem->getItemCount() < containerItem->getStackSize()) {\r\n\t\t\t\t\tuint32_t remainder = (containerItem->getStackSize() - containerItem->getItemCount());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f7d94c231d1a199b", - "equalIndicator/v1": "873e7817a68524c80dc0cb9efd596a71ea7c8dfe19b73d6ed05b472461b822ed" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Repeated branch body in conditional chain", - "markdown": "Repeated branch body in conditional chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 569, - "startColumn": 46, - "charOffset": 17243, - "charLength": 1, - "snippet": { - "text": "{" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 567, - "startColumn": 1, - "charOffset": 17101, - "charLength": 267, - "snippet": { - "text": "\r\n\tconst std::shared_ptr topVisibleCreature = tile->getBottomVisibleCreature(player);\r\n\tif (blockingCreature && topVisibleCreature) {\r\n\t\tplayer->sendCancelMessage(RETURNVALUE_NOTENOUGHROOM);\r\n\t\tg_game().addMagicEffect(player->getPosition(), CONST_ME_POFF);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "49bd168b9e03dbf8", - "equalIndicator/v1": "8751243ba9a903317dc585d6ecee97339419e465c3bd137ce78e32195ab32d9c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned int' to 'float'", - "markdown": "Narrowing conversion from 'unsigned int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 673, - "startColumn": 37, - "charOffset": 22059, - "charLength": 18, - "snippet": { - "text": "std::min" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 671, - "startColumn": 1, - "charOffset": 21997, - "charLength": 132, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 0.80f) + 3;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3bf811f539ad3fea", - "equalIndicator/v1": "8767bbdf6cc342dba4e6ff23b0850ae5f6892e7b6933947873cb49f4d1ecb7e2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 307, - "startColumn": 27, - "charOffset": 11089, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 305, - "startColumn": 1, - "charOffset": 11057, - "charLength": 133, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.creatureOnTargetCombat, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4f85a99f74433c79", - "equalIndicator/v1": "87911739799c3f89563f079aba3dbd5f5ba45c943360b440a11e313810ff5ef9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 587, - "startColumn": 8, - "charOffset": 14460, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 585, - "startColumn": 1, - "charOffset": 14354, - "charLength": 227, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetShowDuration(lua_State* L) {\r\n\t// itemType:getShowDuration()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushboolean(L, itemType->showDuration);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dc8b4ab40f49e3f3", - "equalIndicator/v1": "879adf284f4861432524119ec0b9c1308198258856685d2d7362dc94e1f21c36" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/io_bosstiary.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 63, - "startColumn": 56, - "charOffset": 1824, - "charLength": 34, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 61, - "startColumn": 1, - "charOffset": 1685, - "charLength": 325, - "snippet": { - "text": "\tstd::shared_ptr getMonsterTypeByBossRaceId(uint16_t raceId) const;\r\n\r\n\tvoid addBosstiaryKill(std::shared_ptr player, const std::shared_ptr mtype, uint32_t amount = 1) const;\r\n\tuint16_t calculateLootBonus(uint32_t bossPoints) const;\r\n\tuint32_t calculateBossPoints(uint16_t lootBonus) const;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d9f5a8cfc02b2091", - "equalIndicator/v1": "87b70f98badc4ed392a77249b965b8798916568489bc5854451b1d3ae185ee0e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'inPushEvent' can be made const", - "markdown": "Method 'inPushEvent' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1798, - "startColumn": 7, - "charOffset": 53685, - "charLength": 11, - "snippet": { - "text": "inPushEvent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1796, - "startColumn": 1, - "charOffset": 53673, - "charLength": 59, - "snippet": { - "text": "\t}\r\n\r\n\tbool inPushEvent() {\r\n\t\treturn inEventMovePush;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0451d3092a713cc8", - "equalIndicator/v1": "87c27bd74ccff016c27c70af5b6379c161835b6f264e99e5fd2f96cb6db89272" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 139, - "startColumn": 93, - "charOffset": 4692, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 137, - "startColumn": 1, - "charOffset": 4594, - "charLength": 204, - "snippet": { - "text": "\t}\r\n\r\n\tbool playerCanUseItemWithOnHouseTile(std::shared_ptr player, std::shared_ptr item, const Position &toPos, int toStackPos, int toItemId) {\r\n\t\tif (!player || !item) {\r\n\t\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c392fc259cca1f85", - "equalIndicator/v1": "8814603e6d35227ffd3d835ee5c8160e816a25eaeba9738c9e94b04de81e3e7d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/monster_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 84, - "startColumn": 12, - "charOffset": 2716, - "charLength": 6, - "snippet": { - "text": "health" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 82, - "startColumn": 1, - "charOffset": 2618, - "charLength": 283, - "snippet": { - "text": "\t\tmonster->currentOutfit = mType->info.outfit;\r\n\t\tmonster->skull = mType->info.skull;\r\n\t\tmonster->health = mType->info.health * mType->getHealthMultiplier();\r\n\t\tmonster->healthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\t\tmonster->baseSpeed = mType->getBaseSpeed();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "940ced98c6b70e5e", - "equalIndicator/v1": "88361cff7089b37dc67945ac4d50e08a748e6b96fccbf741cbb6e7c5ea4c3637" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 945, - "startColumn": 58, - "charOffset": 30651, - "charLength": 8, - "snippet": { - "text": "attacker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 943, - "startColumn": 1, - "charOffset": 30589, - "charLength": 247, - "snippet": { - "text": "}\r\n\r\nBlockType_t Creature::blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense /* = false */, bool checkArmor /* = false */, bool /* field = false */) {\r\n\tBlockType_t blockType = BLOCK_NONE;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c1ced9f34fdf228a", - "equalIndicator/v1": "883d24ac3a051f968b2e0c6a65929cbcbba085421f9552a9a4ad2e0a4f10bf33" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/grouping/party.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 709, - "startColumn": 58, - "charOffset": 22282, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 707, - "startColumn": 1, - "charOffset": 22220, - "charLength": 118, - "snippet": { - "text": "}\r\n\r\nvoid Party::updatePlayerVocation(std::shared_ptr player) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "295ddff3915a8959", - "equalIndicator/v1": "886e44f7ec8284f1c4d4f26c6ab0cfbb7dda44c7ff0c40b28daec6c47d4ef071" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 656, - "startColumn": 58, - "charOffset": 25179, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 654, - "startColumn": 1, - "charOffset": 25117, - "charLength": 204, - "snippet": { - "text": "}\r\n\r\nbool EventCallback::playerOnTurn(std::shared_ptr player, Direction direction) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTurn - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a2d9008381336e89", - "equalIndicator/v1": "8872686b9fccb2950c8328ee66cf51f65deef1653ecdcfc40fc118237a47e105" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 324, - "startColumn": 6, - "charOffset": 11628, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 322, - "startColumn": 1, - "charOffset": 11594, - "charLength": 202, - "snippet": { - "text": "\r\n\tReturnValue returnValue;\r\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\r\n\t\treturnValue = RETURNVALUE_NOTPOSSIBLE;\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "820b95af2577b69a", - "equalIndicator/v1": "88b0add17400ecbe80a1d991ca3090e8e77c684cec95fb9bf9803462ed8378f4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 567, - "startColumn": 70, - "charOffset": 26632, - "charLength": 5, - "snippet": { - "text": "value" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 565, - "startColumn": 1, - "charOffset": 26448, - "charLength": 342, - "snippet": { - "text": "\t\tint16_t value = pugi::cast(valueAttribute.value());\r\n\t\tAbilities &abilities = itemType.getAbilities();\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += value;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "80b63859ec1f29bc", - "equalIndicator/v1": "88bb684683efe56ba3639e8032dd6d84f2f0c63e14e93dddb9115a86188db5d5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/grouping/party.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 769, - "startColumn": 83, - "charOffset": 24354, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 767, - "startColumn": 1, - "charOffset": 24267, - "charLength": 141, - "snippet": { - "text": "}\r\n\r\nvoid Party::addPlayerSupply(std::shared_ptr player, std::shared_ptr item) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "18742166120611af", - "equalIndicator/v1": "88be11cf2d0822b574b509f9263241a80af189a0755bc80b3ca770587fb53eae" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 624, - "startColumn": 74, - "charOffset": 16789, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 622, - "startColumn": 1, - "charOffset": 16711, - "charLength": 181, - "snippet": { - "text": "}\r\n\r\nvoid ConditionAttributes::updatePercentAbsorbs(std::shared_ptr creature) {\r\n\tfor (uint8_t i = 0; i < COMBAT_COUNT; i++) {\r\n\t\tauto value = getAbsorbPercentByIndex(i);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cf5784d068d5538d", - "equalIndicator/v1": "88c82eb5aad123d25cfbbac379a3a7d42c82d727b058007fb8b3e22e160a7358" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 709, - "startColumn": 2, - "charOffset": 24608, - "charLength": 17, - "snippet": { - "text": "OperatingSystem_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 707, - "startColumn": 1, - "charOffset": 24601, - "charLength": 151, - "snippet": { - "text": "\t}\r\n\r\n\tOperatingSystem_t operatingSystem = static_cast(msg.get());\r\n\tversion = msg.get(); // Protocol version\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4f1817a2341da0b1", - "equalIndicator/v1": "88c88b850c0be2036185d55714b11b82e66772887e4dd991cd65c1147ae8e1ee" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 262, - "startColumn": 27, - "charOffset": 9537, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 260, - "startColumn": 1, - "charOffset": 9505, - "charLength": 131, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.creatureOnAreaCombat, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cdfcd1169b91af28", - "equalIndicator/v1": "8959a1d5e606c05c1ebb2b65db5cbb8c5f16626fd7b7b7351563cc4869ca7928" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'parent' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'parent' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/npcs/npc.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 361, - "startColumn": 172, - "charOffset": 12500, - "charLength": 6, - "snippet": { - "text": "parent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 359, - "startColumn": 1, - "charOffset": 12324, - "charLength": 228, - "snippet": { - "text": "}\r\n\r\nvoid Npc::onPlayerSellItem(std::shared_ptr player, uint16_t itemId, uint8_t subType, uint16_t amount, bool ignore, uint64_t &totalPrice, std::shared_ptr parent /*= nullptr*/) {\r\n\tif (!player) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "090b15b07586d240", - "equalIndicator/v1": "897187955548493187f47844cce9d1779c7023c909b8e0f7efb6a6cf80ebcbe4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'b' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'b' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 455, - "startColumn": 13, - "charOffset": 12379, - "charLength": 1, - "snippet": { - "text": "b" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 453, - "startColumn": 1, - "charOffset": 12315, - "charLength": 73, - "snippet": { - "text": "\t}\r\n\tvoid setBedItem(std::shared_ptr b) {\r\n\t\tbedItem = b;\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a66e971be3c5330b", - "equalIndicator/v1": "89a78210a224ad95072b595ba0e778e24c1eecec9fc8150547d6a59a835b9176" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7593, - "startColumn": 26, - "charOffset": 265009, - "charLength": 14, - "snippet": { - "text": "attackerPlayer" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7591, - "startColumn": 1, - "charOffset": 264941, - "charLength": 282, - "snippet": { - "text": "// Life leech\r\nvoid Game::applyLifeLeech(\r\n\tstd::shared_ptr attackerPlayer, std::shared_ptr targetMonster, std::shared_ptr target, const CombatDamage &damage, const int32_t &realDamage\r\n) const {\r\n\t// Wheel of destiny bonus - life leech chance and amount\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "08627cd07b1b80b7", - "equalIndicator/v1": "89b09e57a1c8660f90ac26d284957880e7d6e6e7f3291c7dfc6d21406bdc2587" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1301, - "startColumn": 53, - "charOffset": 43477, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1299, - "startColumn": 1, - "charOffset": 43420, - "charLength": 342, - "snippet": { - "text": "}\r\n\r\nvoid Combat::doCombatMana(std::shared_ptr caster, std::shared_ptr target, const Position &origin, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\r\n\tif ((caster && target)\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f9022d2b1b3b5914", - "equalIndicator/v1": "89c8ea41c6b82c55a9532b22618ccb4b6d3d9b4c132f0ea05215dca92defe8fe" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first.", - "markdown": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1581, - "startColumn": 28, - "charOffset": 45264, - "charLength": 2, - "snippet": { - "text": "it" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1579, - "startColumn": 1, - "charOffset": 45208, - "charLength": 118, - "snippet": { - "text": "\t\t\t\tseparator = true;\r\n\t\t\t}\r\n\t\t\tif (int32_t hitChance = it.hitChance;\r\n\t\t\t hitChance != 0) {\r\n\t\t\t\tif (separator) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bd7f64cc212ff18e", - "equalIndicator/v1": "89d174f966c891e21ac84750d6b1336362827333a231a17f592ee3c17e40a8bd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/attribute.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 141, - "startColumn": 50, - "charOffset": 4262, - "charLength": 13, - "snippet": { - "text": "const int64_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 139, - "startColumn": 1, - "charOffset": 4126, - "charLength": 306, - "snippet": { - "text": "\tconst CustomAttribute* getCustomAttribute(const std::string &attributeName) const;\r\n\r\n\tvoid setCustomAttribute(const std::string &key, const int64_t value);\r\n\tvoid setCustomAttribute(const std::string &key, const std::string &value);\r\n\tvoid setCustomAttribute(const std::string &key, const double value);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "06a6a51fbd222548", - "equalIndicator/v1": "89d43eeab3cd0ede108b4e4f5391a787748b0c2b4cfb8567be701795e808b1a1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 951, - "startColumn": 7, - "charOffset": 30436, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 949, - "startColumn": 1, - "charOffset": 30294, - "charLength": 349, - "snippet": { - "text": "bool InstantSpell::executeCastSpell(std::shared_ptr creature, const LuaVariant &var) const {\r\n\t// onCastSpell(creature, var)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[InstantSpell::executeCastSpell - Creature {} words {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7b5ecc604cf063aa", - "equalIndicator/v1": "89d60bf5e812e1ab20205104a0b848da4af0677b1878081162305c78483579ca" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructor does not initialize these fields: id", - "markdown": "Constructor does not initialize these fields: id" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/items_classification.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 20, - "startColumn": 7, - "charOffset": 616, - "charLength": 18, - "snippet": { - "text": "ItemClassification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 18, - "startColumn": 1, - "charOffset": 552, - "charLength": 128, - "snippet": { - "text": "\r\n// Classification class for forging system and market.\r\nclass ItemClassification {\r\npublic:\r\n\tItemClassification() = default;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "12b3c3865fbef238", - "equalIndicator/v1": "89e71f043d4ce335e7cef542e2dfd5f24988ecc6af74ebf6187f261d1a969028" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 449, - "startColumn": 67, - "charOffset": 12971, - "charLength": 1, - "snippet": { - "text": "," - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 447, - "startColumn": 1, - "charOffset": 12780, - "charLength": 279, - "snippet": { - "text": "\tvirtual void onAttacked();\r\n\tvirtual void onAttackedCreatureDrainHealth(std::shared_ptr target, int32_t points);\r\n\tvirtual void onTargetCreatureGainHealth(std::shared_ptr, int32_t) { }\r\n\tvoid onAttackedCreatureKilled(std::shared_ptr target);\r\n\t/**\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "45cfa072eeb2c6e3", - "equalIndicator/v1": "89f00e2260216e8d9fee94a4d12001bd2d35a6e5518b0aad80795a01b4869b73" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7129, - "startColumn": 28, - "charOffset": 248190, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7127, - "startColumn": 1, - "charOffset": 248068, - "charLength": 247, - "snippet": { - "text": "\t\t}\r\n\t\tif (damage.origin != ORIGIN_NONE && target && damage.primary.type != COMBAT_HEALING) {\r\n\t\t\tdamage.primary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\r\n\t\t\tdamage.secondary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2485e5a4ca9b3df3", - "equalIndicator/v1": "89fa48c0ed96530fdeb6d274a117363c8a0e5113e69c66274c2f0a4025ba39c6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 278, - "startColumn": 7, - "charOffset": 10240, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 276, - "startColumn": 1, - "charOffset": 10158, - "charLength": 283, - "snippet": { - "text": "\r\nbool EventCallback::partyOnDisband(std::shared_ptr party) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::partyOnDisband - Party leader {}] Call stack \"\r\n\t\t \"overflow. Too many lua script calls being nested.\",\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fb9069b4678cfd0e", - "equalIndicator/v1": "8a06e7077b5936f7ca521f1d2ac759e4d809bc0fd4a5e1515267abd901c019fd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 607, - "startColumn": 6, - "charOffset": 29687, - "charLength": 24, - "snippet": { - "text": "valueAttribute.as_bool()" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 605, - "startColumn": 1, - "charOffset": 29516, - "charLength": 291, - "snippet": { - "text": "void ItemParse::parseSupressDrunk(const std::string &tmpStrValue, pugi::xml_attribute valueAttribute, ItemType &itemType) {\r\n\tstd::string stringValue = tmpStrValue;\r\n\tif (valueAttribute.as_bool()) {\r\n\t\tConditionType_t conditionType = CONDITION_NONE;\r\n\t\tif (stringValue == \"suppressdrunk\") {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a1dadec3cf85ca81", - "equalIndicator/v1": "8a18ef2e09a6a54022df51e857ac41d819f439e02189957e07bca969157bf3b4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 689, - "startColumn": 116, - "charOffset": 22555, - "charLength": 13, - "snippet": { - "text": "spellCooldown" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 687, - "startColumn": 1, - "charOffset": 22366, - "charLength": 283, - "snippet": { - "text": "\t\tspellCooldown -= augmentCooldownReduction;\r\n\t\tif (spellCooldown > 0) {\r\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLCOOLDOWN, spellCooldown / rateCooldown, 0, false, m_spellId);\r\n\t\t\tplayer->addCondition(condition);\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6a1e4cfe0408be5e", - "equalIndicator/v1": "8a3ba5c477a29b3f9cca7ef20ca232022f3c2faf38abe7a1446a6e21f49c90f2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 935, - "startColumn": 17, - "charOffset": 28005, - "charLength": 10, - "snippet": { - "text": "removeItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 933, - "startColumn": 1, - "charOffset": 27984, - "charLength": 139, - "snippet": { - "text": "}\r\n\r\nvoid Container::removeItem(std::shared_ptr thing, bool sendUpdateToClient /* = false*/) {\r\n\tif (thing == nullptr) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "386a5296317fd094", - "equalIndicator/v1": "8a414d76abcafd2431bb84aa919483cf603cdd1e17533b12c7ec21d593a11bd2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 225, - "startColumn": 2, - "charOffset": 8264, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 223, - "startColumn": 1, - "charOffset": 8257, - "charLength": 52, - "snippet": { - "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e286cd0bf7b7f2fd", - "equalIndicator/v1": "8a794715c827a66fa56a6fd4d9da8f122271daa8fddf76e3489b4a00e623b377" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4449, - "startColumn": 45, - "charOffset": 160140, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4447, - "startColumn": 1, - "charOffset": 160091, - "charLength": 248, - "snippet": { - "text": "}\r\n\r\nvoid Game::unwrapItem(std::shared_ptr item, uint16_t unWrapId, std::shared_ptr house, std::shared_ptr player) {\r\n\tif (item->hasOwner() && !item->isOwner(player)) {\r\n\t\tplayer->sendCancelMessage(RETURNVALUE_ITEMISNOTYOURS);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0624b6a876fc4230", - "equalIndicator/v1": "8a99076b710598091468348377352fe362db24f08ef689a6ffe965ceebda60b7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1165, - "startColumn": 26, - "charOffset": 34788, - "charLength": 16, - "snippet": { - "text": "getDownItemCount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1163, - "startColumn": 1, - "charOffset": 34731, - "charLength": 153, - "snippet": { - "text": "\r\n\tif (items && !isInserted) {\r\n\t\tint32_t downItemSize = getDownItemCount();\r\n\t\tif (pos < downItemSize) {\r\n\t\t\tauto it = items->getBeginDownItem() + pos;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1b739cfd9b088bfa", - "equalIndicator/v1": "8ab23a61f11ad784811bf06eb64c1f334a8c5cb47dddf5f82246214f40cffb4f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '_mm_ctz', which is reserved in the global namespace", - "markdown": "Declaration uses identifier '_mm_ctz', which is reserved in the global namespace" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/simd.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 59, - "startColumn": 28, - "charOffset": 1497, - "charLength": 7, - "snippet": { - "text": "_mm_ctz" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 57, - "startColumn": 1, - "charOffset": 1431, - "charLength": 149, - "snippet": { - "text": "#ifdef _MSC_VER\r\n\t#include \r\n__forceinline unsigned int _mm_ctz(unsigned int value) {\r\n\tunsigned long i = 0;\r\n\t_BitScanForward(&i, value);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "54fe5b9685e5094b", - "equalIndicator/v1": "8ad017a320447521f779651fa53440e6728a6f3562f310926b4d212a85a854df" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 332, - "startColumn": 2, - "charOffset": 8254, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 330, - "startColumn": 1, - "charOffset": 8155, - "charLength": 212, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetWeight(lua_State* L) {\r\n\t// itemType:getWeight([count = 1])\r\n\tuint16_t count = getNumber(L, 2, 1);\r\n\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ccc6094024e32bf0", - "equalIndicator/v1": "8adb6734d6d8a4d578f063b866574612e7cba9b18a12c6524d30ae69867db77c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 634, - "startColumn": 51, - "charOffset": 18313, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 632, - "startColumn": 1, - "charOffset": 18258, - "charLength": 110, - "snippet": { - "text": "}\r\n\r\nbool AccessList::isInList(std::shared_ptr player) const {\r\n\tif (allowEveryone) {\r\n\t\treturn true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a1b04ac2c76ad178", - "equalIndicator/v1": "8ae3fb49039cc1265d15a806a03808d362fb5f7b9a2f1f80c81068a1b0645897" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 835, - "startColumn": 124, - "charOffset": 32001, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 833, - "startColumn": 1, - "charOffset": 31873, - "charLength": 271, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::playerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnCombat - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "109a1e3727fa260a", - "equalIndicator/v1": "8af87cea9adbb1e9dbdce4a0cf5af8c273b1b0d56560fba491b032b3431e2d44" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 516, - "startColumn": 7, - "charOffset": 17122, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 514, - "startColumn": 1, - "charOffset": 16856, - "charLength": 462, - "snippet": { - "text": "bool Action::executeUse(std::shared_ptr player, std::shared_ptr item, const Position &fromPosition, std::shared_ptr target, const Position &toPosition, bool isHotkey) {\r\n\t// onUse(player, item, fromPosition, target, toPosition, isHotkey)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Action::executeUse - Player {}, on item {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "14fc298e46fe8cad", - "equalIndicator/v1": "8b285363d1537fa789a653de9a3291d03dc7c50329d9f8cad37af65fc7ab5016" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'targetItem' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'targetItem' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 987, - "startColumn": 153, - "charOffset": 35699, - "charLength": 10, - "snippet": { - "text": "targetItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 985, - "startColumn": 1, - "charOffset": 35542, - "charLength": 263, - "snippet": { - "text": "}\r\n\r\nbool Events::eventPlayerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) {\r\n\t// Player:onTradeAccept(target, item, targetItem)\r\n\tif (info.playerOnTradeAccept == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2600da812c0153c4", - "equalIndicator/v1": "8b37a6e03c94962520b1ddeab86e19715dbc279a7bf6f143c91a07559f86557d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2483, - "startColumn": 65, - "charOffset": 94645, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2481, - "startColumn": 1, - "charOffset": 94576, - "charLength": 258, - "snippet": { - "text": "}\r\n\r\nReturnValue Game::internalPlayerAddItem(std::shared_ptr player, std::shared_ptr item, bool dropOnMap /*= true*/, Slots_t slot /*= CONST_SLOT_WHEREEVER*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tuint32_t remainderCount = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5461e94fb106dc0d", - "equalIndicator/v1": "8b4e57283fd4800bbce20ce9ffef5ff365bde928dd4300e76d3d0c15f89c4635" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/npcs/npc.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 667, - "startColumn": 52, - "charOffset": 21035, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 665, - "startColumn": 1, - "charOffset": 20979, - "charLength": 156, - "snippet": { - "text": "}\r\n\r\nvoid Npc::handlePlayerMove(std::shared_ptr player, const Position &newPos) {\r\n\tif (!canInteract(newPos)) {\r\n\t\tremovePlayerInteraction(player);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2237ace7f6e1bb42", - "equalIndicator/v1": "8b5672dc4e2e4706277928d05da86609ee896b5a11eb4e349d97161ccd9bced7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'refreshCyclopediaMonsterTracker' can be made const", - "markdown": "Method 'refreshCyclopediaMonsterTracker' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 336, - "startColumn": 7, - "charOffset": 8903, - "charLength": 31, - "snippet": { - "text": "refreshCyclopediaMonsterTracker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 334, - "startColumn": 1, - "charOffset": 8891, - "charLength": 155, - "snippet": { - "text": "\t}\r\n\r\n\tvoid refreshCyclopediaMonsterTracker(bool isBoss = false) {\r\n\t\trefreshCyclopediaMonsterTracker(getCyclopediaMonsterTrackerSet(isBoss), isBoss);\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ed99e0ebf271a612", - "equalIndicator/v1": "8b697986a1cfb6c10cff6851d5f7b4ac2a2ff75dbbce0fda9b0eec15349003af" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", - "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/global/globalevent.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 187, - "startColumn": 11, - "charOffset": 5178, - "charLength": 14, - "snippet": { - "text": "GlobalEventMap" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 185, - "startColumn": 1, - "charOffset": 5151, - "charLength": 52, - "snippet": { - "text": "\t\t}\r\n\t\tdefault:\r\n\t\t\treturn GlobalEventMap();\r\n\t}\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8abe9fcc360caf54", - "equalIndicator/v1": "8bdd4f4ecfd2ec3f20f39b1785a7d916849e01f362ee25c118c32a41ef8161de" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2871, - "startColumn": 27, - "charOffset": 87679, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2869, - "startColumn": 1, - "charOffset": 87647, - "charLength": 144, - "snippet": { - "text": "\t}\r\n\r\n\tint32_t removeRuneCost = player->getLevel() * 100;\r\n\tif (player->hasCharmExpansion()) {\r\n\t\tremoveRuneCost = (removeRuneCost * 75) / 100;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "586b8fcc2cae76e3", - "equalIndicator/v1": "8c1ca67b0dc390523b945841e44b55fb17f6902e9039f898ccbb63e79716e81e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')", - "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6030, - "startColumn": 17, - "charOffset": 177162, - "charLength": 23, - "snippet": { - "text": "Player::getPercentLevel" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6028, - "startColumn": 1, - "charOffset": 177087, - "charLength": 221, - "snippet": { - "text": "\t\tuint8_t newPercent;\r\n\t\tif (nextReqMana > currReqMana) {\r\n\t\t\tnewPercent = Player::getPercentLevel(manaSpent, nextReqMana);\r\n\t\t\tnewPercentToNextLevel = static_cast(manaSpent * 100) / nextReqMana;\r\n\t\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "182596c3b6d116b3", - "equalIndicator/v1": "8c623245ad7b16a96ea03b291bd47ca26e5cce36a1e8411fa89ba57358fe44e3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3350, - "startColumn": 63, - "charOffset": 102079, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3348, - "startColumn": 1, - "charOffset": 102012, - "charLength": 144, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureType(std::shared_ptr creature, uint8_t creatureType) {\r\n\tNetworkMessage msg;\r\n\tmsg.addByte(0x95);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "632393fb22613035", - "equalIndicator/v1": "8cb2e7b197000abc1f65c6c143724ec7b1fec6cb1b45c5213a96b8f78dd1c53f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 231, - "startColumn": 51, - "charOffset": 5927, - "charLength": 1, - "snippet": { - "text": "," - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 229, - "startColumn": 1, - "charOffset": 5865, - "charLength": 140, - "snippet": { - "text": "\r\nprivate:\r\n\tvirtual bool getSkillType(std::shared_ptr, std::shared_ptr, skills_t &, uint32_t &) const {\r\n\t\treturn false;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "17b5c911d220d30d", - "equalIndicator/v1": "8cd6f4909ace2bacd691a9544427ae8282970a027bda118d5b481a606c6fb384" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/combat/combat_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 92, - "startColumn": 2, - "charOffset": 2715, - "charLength": 6, - "snippet": { - "text": "Combat" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 90, - "startColumn": 1, - "charOffset": 2601, - "charLength": 232, - "snippet": { - "text": "\t// combat:addCondition(condition)\r\n\tstd::shared_ptr condition = getUserdataShared(L, 2);\r\n\tCombat* combat = getUserdata(L, 1);\r\n\tif (combat && condition) {\r\n\t\tcombat->addCondition(condition->clone());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "39344829f001fc17", - "equalIndicator/v1": "8ce96e993ca0de5ff5a0aa7cfb999995779a07f091fdbf1f6063c16e86e7b627" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2093, - "startColumn": 8, - "charOffset": 57573, - "charLength": 4, - "snippet": { - "text": "maxa" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2091, - "startColumn": 1, - "charOffset": 57499, - "charLength": 105, - "snippet": { - "text": "\tint32_t difference = var - 40;\r\n\tmin = mina * difference + minb;\r\n\tmax = maxa * difference + maxb;\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e49d30a9fdb9d1df", - "equalIndicator/v1": "8d06a74681527401dc7cbcbd9651dd61c9f088ea337dcb63ffd918f25929e230" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1101, - "startColumn": 47, - "charOffset": 41984, - "charLength": 7, - "snippet": { - "text": "monster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1099, - "startColumn": 1, - "charOffset": 41883, - "charLength": 214, - "snippet": { - "text": "\tgetScriptInterface()->pushFunction(getScriptId());\r\n\r\n\tLuaScriptInterface::pushUserdata(L, monster);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Monster\");\r\n\tLuaScriptInterface::pushPosition(L, position);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "94ce2cd72c5531bf", - "equalIndicator/v1": "8d219f423510bc9b9318db81186bf0711e69fcdb62e47beaebbfc268445f9f52" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use range-based for loop instead", - "markdown": "Use range-based for loop instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 209, - "startColumn": 3, - "charOffset": 5348, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 207, - "startColumn": 1, - "charOffset": 5291, - "charLength": 193, - "snippet": { - "text": "\r\n\tif (const TileItemVector* items = getItemList()) {\r\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\r\n\t\t\tif ((*it)->getMailbox()) {\r\n\t\t\t\treturn (*it)->getMailbox();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7e43edf79a32b8da", - "equalIndicator/v1": "8d43baaa573d5b38ffc3ecf64c7fc0fd2c7097b2e800b1f3f9d493ffef0c393f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Repeated branch body in conditional chain", - "markdown": "Repeated branch body in conditional chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1556, - "startColumn": 15, - "charOffset": 46142, - "charLength": 1, - "snippet": { - "text": "{" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1554, - "startColumn": 1, - "charOffset": 46048, - "charLength": 201, - "snippet": { - "text": "\tuint8_t size = (uint8_t)source.size();\r\n\tfor (uint8_t i = 0; i < size; i++) {\r\n\t\tif (i == 0) {\r\n\t\t\tsource[i] = (char)toupper(source[i]);\r\n\t\t} else if (source[i - 1] == ' ' || source[i - 1] == '\\'') {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "926c21839dd37917", - "equalIndicator/v1": "8d5d2dbe8c3ab80792bc77ec5665fe4fc246b54216d15e222cd19aa1c98b21dd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use range-based for loop instead", - "markdown": "Use range-based for loop instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocol.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 156, - "startColumn": 2, - "charOffset": 5015, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 154, - "startColumn": 1, - "charOffset": 4946, - "charLength": 185, - "snippet": { - "text": "\tuint32_t precachedControlSum[32][2];\r\n\tuint32_t sum = 0xC6EF3720;\r\n\tfor (int32_t i = 0; i < 32; ++i) {\r\n\t\tprecachedControlSum[i][0] = (sum + newKey[(sum >> 11) & 3]);\r\n\t\tsum += delta;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e7fd1721712b68e3", - "equalIndicator/v1": "8d86d5017a6c1594a7f183e19f64096b22d4a835cf5562d7bff593a9917a7254" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'guild' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'guild' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 284, - "startColumn": 16, - "charOffset": 7399, - "charLength": 28, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 282, - "startColumn": 1, - "charOffset": 7363, - "charLength": 128, - "snippet": { - "text": "\t\treturn guild;\r\n\t}\r\n\tvoid setGuild(const std::shared_ptr guild);\r\n\r\n\t[[nodiscard]] GuildRank_ptr getGuildRank() const {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "21122ba2caa01c4e", - "equalIndicator/v1": "8d8cac0d9e8084b74bb191570f295df441ce48db0640cf6d3b127f241efa6aa3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 605, - "startColumn": 40, - "charOffset": 16300, - "charLength": 15, - "snippet": { - "text": "unmodifiedSkill" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 603, - "startColumn": 1, - "charOffset": 16201, - "charLength": 165, - "snippet": { - "text": "\r\n\t\tint32_t unmodifiedSkill = player->getBaseSkill(skill);\r\n\t\tskills[skill] = static_cast(unmodifiedSkill * ((skillsPercent[skill] - 100) / 100.f));\r\n\t}\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1d7de08585d47594", - "equalIndicator/v1": "8da3f22651bb96ee3c31b335baab1c929970d7162a638154ce93e4454f5aa540" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/inbox/inbox.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 55, - "startColumn": 13, - "charOffset": 1472, - "charLength": 19, - "snippet": { - "text": "postAddNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 53, - "startColumn": 1, - "charOffset": 1455, - "charLength": 224, - "snippet": { - "text": "}\r\n\r\nvoid Inbox::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tstd::shared_ptr localParent = getParent();\r\n\tif (localParent != nullptr) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d603a9b2d7972016", - "equalIndicator/v1": "8db62f93983b018c4994235c25b4d2d361f7a10cb66026ca64649539f13e1be1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 150, - "startColumn": 62, - "charOffset": 5192, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 148, - "startColumn": 1, - "charOffset": 5126, - "charLength": 271, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::creatureOnHear(std::shared_ptr creature, std::shared_ptr speaker, const std::string &words, SpeakClasses type) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnHear - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "545c122a0b4001e5", - "equalIndicator/v1": "8dc4a86c778d92355a93d1f187694ac1ad95fd814b763929bad93df84b63db10" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'guild' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'guild' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/ioguild.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 18, - "startColumn": 24, - "charOffset": 568, - "charLength": 28, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 16, - "startColumn": 1, - "charOffset": 475, - "charLength": 267, - "snippet": { - "text": "public:\r\n\tstatic std::shared_ptr loadGuild(uint32_t guildId);\r\n\tstatic void saveGuild(const std::shared_ptr guild);\r\n\tstatic uint32_t getGuildIdByName(const std::string &name);\r\n\tstatic void getWarList(uint32_t guildId, GuildWarVector &guildWarVector);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6d0e60f0fd6dd2f2", - "equalIndicator/v1": "8dcbbf3d2cff4fca324e827fb147983a59bc2104e476f93e94feb4ec837fd649" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", - "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/zones/zone.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 83, - "startColumn": 27, - "charOffset": 2319, - "charLength": 11, - "snippet": { - "text": "endPosition" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 81, - "startColumn": 1, - "charOffset": 2151, - "charLength": 197, - "snippet": { - "text": "\tPositionIterator end() const {\r\n\t\tPosition endPosition(from.x, from.y, to.z + 1); // z is incremented so it's past the last valid position.\r\n\t\treturn PositionIterator(endPosition, *this);\r\n\t}\r\n};\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d1bda70d41f85d75", - "equalIndicator/v1": "8e13ea32fb669634255b758fea8fe76bc9e87c289d976d0c2d2eafec3ddba746" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 159, - "startColumn": 32, - "charOffset": 5234, - "charLength": 19, - "snippet": { - "text": "getAllItemTypeCount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 157, - "startColumn": 1, - "charOffset": 5068, - "charLength": 320, - "snippet": { - "text": "\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::map &getAllItemTypeCount(std::map &countMap) const override final;\r\n\tstd::shared_ptr getThing(size_t index) const override final;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "86d131f589ae152a", - "equalIndicator/v1": "8e1ee2ff8b80b8face41b4a65b377ca1e3bcab905bda690333ac66ef802c2ec8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1063, - "startColumn": 2, - "charOffset": 38289, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1061, - "startColumn": 1, - "charOffset": 38282, - "charLength": 46, - "snippet": { - "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5ab14065346bcf47", - "equalIndicator/v1": "8e360c60962adf027f57009980297d80a162c7689ee10355f9a9650b84564500" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 706, - "startColumn": 41, - "charOffset": 23184, - "charLength": 22, - "snippet": { - "text": "secondaryGroupCooldown" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 704, - "startColumn": 1, - "charOffset": 23106, - "charLength": 239, - "snippet": { - "text": "\r\n\tif (secondaryGroupCooldown > 0) {\r\n\t\tint32_t spellSecondaryGroupCooldown = secondaryGroupCooldown;\r\n\t\tif (isUpgraded) {\r\n\t\t\tspellSecondaryGroupCooldown -= getWheelOfDestinyBoost(WheelSpellBoost_t::SECONDARY_GROUP_COOLDOWN, spellGrade);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4f839058a80c3029", - "equalIndicator/v1": "8e3b8e0f6fcad15ecf4c44e4354a3dfc86fe63ebd96cc41a67795e3a89681bef" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/thing.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 39, - "startColumn": 15, - "charOffset": 951, - "charLength": 9, - "snippet": { - "text": "setParent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 37, - "startColumn": 1, - "charOffset": 931, - "charLength": 67, - "snippet": { - "text": "\t}\r\n\r\n\tvirtual void setParent(std::weak_ptr) {\r\n\t\t//\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a15ba06bd308de9e", - "equalIndicator/v1": "8e55dba0fb7d547c79f62b43f0705f464e2bc27f6f01adecad0cf2c152710616" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Replace loop by 'std::ranges::any_of()'", - "markdown": "Replace loop by 'std::ranges::any_of()'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5801, - "startColumn": 2, - "charOffset": 171361, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5799, - "startColumn": 1, - "charOffset": 171273, - "charLength": 166, - "snippet": { - "text": "bool Player::hasAnyMount() const {\r\n\tconst auto mounts = g_game().mounts.getMounts();\r\n\tfor (const auto &mount : mounts) {\r\n\t\tif (hasMount(mount)) {\r\n\t\t\treturn true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b920ae25591d11e7", - "equalIndicator/v1": "8e5730a362f1c8e80b3bca8a0a70cb2b08d3d27756926ed7dc9307953ecda171" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3133, - "startColumn": 2, - "charOffset": 96073, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3131, - "startColumn": 1, - "charOffset": 95986, - "charLength": 243, - "snippet": { - "text": "\tuint32_t timestamp = msg.get();\r\n\tuint16_t counter = msg.get();\r\n\tuint16_t amount = msg.get();\r\n\tif (amount > 0 && counter > 0) {\r\n\t\tg_game().playerAcceptMarketOffer(player->getID(), timestamp, counter, amount);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ed8972f1bc955a6e", - "equalIndicator/v1": "8e62d86f5908afb7e100f7ab9830d2a1c274f8898bd139fa77e31419db564622" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2093, - "startColumn": 15, - "charOffset": 57580, - "charLength": 10, - "snippet": { - "text": "difference" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2091, - "startColumn": 1, - "charOffset": 57499, - "charLength": 105, - "snippet": { - "text": "\tint32_t difference = var - 40;\r\n\tmin = mina * difference + minb;\r\n\tmax = maxa * difference + maxb;\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ee0431c15dd8c41b", - "equalIndicator/v1": "8e6c30ab9d2fdd6d2a892723c57194af6fdae24c21a482fd4534dcef1ab383a5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1844, - "startColumn": 2, - "charOffset": 56170, - "charLength": 17, - "snippet": { - "text": "QuickLootFilter_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1842, - "startColumn": 1, - "charOffset": 56163, - "charLength": 107, - "snippet": { - "text": "\t}\r\n\r\n\tQuickLootFilter_t filter = (QuickLootFilter_t)msg.getByte();\r\n\tstd::vector listedItems;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1246fea2ea0b2233", - "equalIndicator/v1": "8e780ea0e8134ac7250a6b0c62ab16ec9864dc918d2c17a6e2cde20b5a97760d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::list::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::list::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/scripts/lua_environment.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 174, - "startColumn": 16, - "charOffset": 4398, - "charLength": 14, - "snippet": { - "text": "timerEventDesc" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 172, - "startColumn": 1, - "charOffset": 4306, - "charLength": 211, - "snippet": { - "text": "\t\tenv->setTimerEvent();\r\n\t\tenv->setScriptId(timerEventDesc.scriptId, this);\r\n\t\tcallFunction(timerEventDesc.parameters.size());\r\n\t} else {\r\n\t\tg_logger().error(\"[LuaEnvironment::executeTimerEvent - Lua file {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d817546e002f0a73", - "equalIndicator/v1": "8e915ef620b6d3faa40ecdf1bded0d11b79b279b15a2561a04e0574fc77b7dbc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 62, - "startColumn": 28, - "charOffset": 1730, - "charLength": 11, - "snippet": { - "text": "getCylinder" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 60, - "startColumn": 1, - "charOffset": 1697, - "charLength": 94, - "snippet": { - "text": "\t}\r\n\r\n\tstd::shared_ptr getCylinder() override final {\r\n\t\treturn getContainer();\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d0ab6634b470f9e7", - "equalIndicator/v1": "8e9714cc31f24c4be554d1a29143f00ad77852e15bc356ece4f22650e3baa11a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 131, - "startColumn": 24, - "charOffset": 3250, - "charLength": 7, - "snippet": { - "text": "getTile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 129, - "startColumn": 1, - "charOffset": 3221, - "charLength": 96, - "snippet": { - "text": "\t}\r\n\r\n\tstd::shared_ptr getTile() override final {\r\n\t\treturn static_self_cast();\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "73fb796652142a78", - "equalIndicator/v1": "8eb1b13a6d93ae20d4d0b066a3145ad0b3fd374d09cd221a38b7600a8a4df252" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'leader' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'leader' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/grouping/party.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 20, - "startColumn": 62, - "charOffset": 689, - "charLength": 6, - "snippet": { - "text": "leader" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 18, - "startColumn": 1, - "charOffset": 579, - "charLength": 190, - "snippet": { - "text": "#include \"lua/callbacks/events_callbacks.hpp\"\r\n\r\nstd::shared_ptr Party::create(std::shared_ptr leader) {\r\n\tauto party = std::make_shared();\r\n\tparty->m_leader = leader;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7b1d3108fe8b8e46", - "equalIndicator/v1": "8eb620bf818a938e1b531a12cf2c6a30383f8bdbd3c943f06464d7aa310d6f91" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1121, - "startColumn": 60, - "charOffset": 35178, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1119, - "startColumn": 1, - "charOffset": 35114, - "charLength": 146, - "snippet": { - "text": "}\r\n\r\nbool Creature::setFollowCreature(std::shared_ptr creature) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (creature) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ce4cd84c8c6f776e", - "equalIndicator/v1": "8eb8c735e734fdf4b925b5067f56a1f21008cb039f7ba3e57e8bacc6e6c47ab7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 170, - "startColumn": 53, - "charOffset": 5277, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 168, - "startColumn": 1, - "charOffset": 5220, - "charLength": 167, - "snippet": { - "text": "}\r\n\r\nReturnValue Actions::canUse(std::shared_ptr player, const Position &pos) {\r\n\tif (pos.x != 0xFFFF) {\r\n\t\tconst Position &playerPos = player->getPosition();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "59ef8b3287eb12f3", - "equalIndicator/v1": "8ebbc9d7480a0768c18fc2b19c2f9391552c85d819b4f396fcc321090e770168" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/player_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1673, - "startColumn": 3, - "charOffset": 58731, - "charLength": 18, - "snippet": { - "text": "WheelGemAffinity_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1671, - "startColumn": 1, - "charOffset": 58722, - "charLength": 239, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tWheelGemAffinity_t affinity = static_cast(i);\r\n\t\tstd::string affinityName(magic_enum::enum_name(affinity));\r\n\t\tg_logger().debug(\" Affinity: {} count: {}\", affinityName, bonusData.unlockedVesselResonances[i]);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9c88bff365e95652", - "equalIndicator/v1": "8ebf6c4234cfefd5df5f9b846c94ea3045aa06bf56532d1e1e911d3c265780a6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Redundant string initialization", - "markdown": "Redundant string initialization" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/libs/kv_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 99, - "startColumn": 14, - "charOffset": 2592, - "charLength": 6, - "snippet": { - "text": "prefix" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 97, - "startColumn": 1, - "charOffset": 2480, - "charLength": 152, - "snippet": { - "text": "\t// KV.keys([prefix = \"\"]) | scopedKV:keys([prefix = \"\"])\r\n\tstd::unordered_set keys;\r\n\tstd::string prefix = \"\";\r\n\r\n\tif (isString(L, -1)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f29d962c5f938dad", - "equalIndicator/v1": "8ecb1604a2d3dd788d1ea397f75929648a236c29af24b1b278539f16e660200f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 446, - "startColumn": 41, - "charOffset": 16855, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 444, - "startColumn": 1, - "charOffset": 16809, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7ddd45bc9b2202d4", - "equalIndicator/v1": "8eee1c066d17835e6bc53e0bad380edc18dd383ba22dd629dcdfd91a861992c7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Macro replacement list should be enclosed in parentheses", - "markdown": "Macro replacement list should be enclosed in parentheses" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/pch.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 118, - "startColumn": 9, - "charOffset": 2744, - "charLength": 20, - "snippet": { - "text": "MAGIC_ENUM_RANGE_MIN" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 116, - "startColumn": 1, - "charOffset": 2668, - "charLength": 163, - "snippet": { - "text": " * @note Sets the upper limit of the enum value range to 500.\r\n */\r\n#define MAGIC_ENUM_RANGE_MIN -500\r\n#define MAGIC_ENUM_RANGE_MAX 500\r\n#include \r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6bcf9a8eb308eca1", - "equalIndicator/v1": "8f02a675860af19e24502f63773a271a6788d8acf488658affa2a60df165d0cd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2702, - "startColumn": 3, - "charOffset": 83342, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2700, - "startColumn": 1, - "charOffset": 83246, - "charLength": 218, - "snippet": { - "text": "\t\tparty->switchAnalyzerPriceType();\r\n\t} else if (action == PARTYANALYZERACTION_PRICEVALUE) {\r\n\t\tuint16_t size = msg.get();\r\n\t\tfor (uint16_t i = 1; i <= size; i++) {\r\n\t\t\tuint16_t itemId = msg.get();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dca87a24fe0b3e8b", - "equalIndicator/v1": "8f0fe3620179358483372c99e9bf41a4991c0e60b2149ddb7eac129633d88749" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Pass by value and use std::move", - "markdown": "Pass by value and use std::move" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/value_wrapper.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 18, - "startColumn": 28, - "charOffset": 605, - "charLength": 18, - "snippet": { - "text": "const ValueVariant" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 16, - "startColumn": 1, - "charOffset": 514, - "charLength": 218, - "snippet": { - "text": "\ttimestamp_(timestamp == 0 ? getTimeMsNow() : timestamp) { }\r\n\r\nValueWrapper::ValueWrapper(const ValueVariant &value, uint64_t timestamp) :\r\n\tdata_(value), timestamp_(timestamp == 0 ? getTimeMsNow() : timestamp) { }\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8045ddeb4eaf8a8f", - "equalIndicator/v1": "8f24ed47809a6923fbb666a8a7f8a55e712a31f9741a72419b2e3851ce8f937c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 108, - "startColumn": 2, - "charOffset": 3653, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 106, - "startColumn": 1, - "charOffset": 3646, - "charLength": 72, - "snippet": { - "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n\treturn returnValue;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "030baf17c006a25a", - "equalIndicator/v1": "8f524e9e7dc24b580d6627938ca553204a6d2130244d9e561188f50b5ddd0039" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 640, - "startColumn": 41, - "charOffset": 24617, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 638, - "startColumn": 1, - "charOffset": 24571, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e0e44e9a775454e8", - "equalIndicator/v1": "8f566a5b8c4d3d64b7364605959996f7f0f1c186d4366da0797f4dfe1ad0f3de" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Pass by value and use std::move", - "markdown": "Pass by value and use std::move" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/custom_attribute.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 20, - "startColumn": 34, - "charOffset": 655, - "charLength": 17, - "snippet": { - "text": "const std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 18, - "startColumn": 1, - "charOffset": 592, - "charLength": 174, - "snippet": { - "text": "\r\n// Constructor for int64_t\r\nCustomAttribute::CustomAttribute(const std::string &initStringKey, const int64_t initInt64) :\r\n\tstringKey(initStringKey), value(initInt64) {\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a8ee49a322813449", - "equalIndicator/v1": "8f67d48af21d8624b365fb5cac88d4c279201b03a33b8e9db9a902c5a8ef13f8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/player_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 878, - "startColumn": 67, - "charOffset": 30425, - "charLength": 25, - "snippet": { - "text": "wheelGemBasicSlot1Allowed" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 876, - "startColumn": 1, - "charOffset": 30262, - "charLength": 258, - "snippet": { - "text": "\tgem.affinity = static_cast(uniform_random(0, 3));\r\n\tgem.quality = quality;\r\n\tgem.basicModifier1 = wheelGemBasicSlot1Allowed[uniform_random(0, wheelGemBasicSlot1Allowed.size() - 1)];\r\n\tgem.basicModifier2 = {};\r\n\tgem.supremeModifier = {};\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c5af1f7030ab964d", - "equalIndicator/v1": "8f81c9aec3b222701dc797956f00d6f9e8528c388422867b85be8f5f1bbe0d8c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/grouping/party.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 571, - "startColumn": 55, - "charOffset": 15924, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 569, - "startColumn": 1, - "charOffset": 15865, - "charLength": 143, - "snippet": { - "text": "}\r\n\r\nvoid Party::clearPlayerPoints(std::shared_ptr player) {\r\n\tauto it = ticksMap.find(player->getID());\r\n\tif (it != ticksMap.end()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6624ac3a34d65797", - "equalIndicator/v1": "8f8fb410e7bf1d42784c550de7ece19f9bec9c3951040d8ab9a6cc74537a4a6b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 823, - "startColumn": 20, - "charOffset": 31588, - "charLength": 5, - "snippet": { - "text": "tries" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 821, - "startColumn": 1, - "charOffset": 31539, - "charLength": 118, - "snippet": { - "text": "\r\n\tlua_pushnumber(L, skill);\r\n\tlua_pushnumber(L, tries);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 3, 1) != 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c74fc1d08c411ab9", - "equalIndicator/v1": "8f919b72f47ae209c01be7cb90dfe193a655f075d1ca2e0b7f949eaf591e27ca" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'container' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'container' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3073, - "startColumn": 35, - "charOffset": 93347, - "charLength": 32, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3071, - "startColumn": 1, - "charOffset": 93282, - "charLength": 156, - "snippet": { - "text": "\r\n\tvoid removeEmptyRewards();\r\n\tbool hasOtherRewardContainerOpen(const std::shared_ptr container) const;\r\n\r\n\tvoid checkAndShowBlessingMessage();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6490c7c3cef78dbc", - "equalIndicator/v1": "8fc3c398ebe209793002cffcf3344309c2199615ce3bd62705796bdb97dc044c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructor does not initialize these fields: buffer", - "markdown": "Constructor does not initialize these fields: buffer" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/message/networkmessage.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 21, - "startColumn": 7, - "charOffset": 537, - "charLength": 14, - "snippet": { - "text": "NetworkMessage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 19, - "startColumn": 1, - "charOffset": 517, - "charLength": 76, - "snippet": { - "text": "class RSA;\r\n\r\nclass NetworkMessage {\r\npublic:\r\n\tusing MsgSize_t = uint16_t;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c1529d280ac9f798", - "equalIndicator/v1": "8fdd79691d8e2f5286ca8bdefcdaad7fc3ef515ed395b1ae3013ecf1032b9d80" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/vocations/vocation.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 38, - "startColumn": 3, - "charOffset": 1138, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 36, - "startColumn": 1, - "charOffset": 1129, - "charLength": 205, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tuint16_t id = pugi::cast(attr.value());\r\n\r\n\t\tauto res = vocationsMap.emplace(std::piecewise_construct, std::forward_as_tuple(id), std::forward_as_tuple(std::make_shared(id)));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "59a56592b1549c48", - "equalIndicator/v1": "900141ff0d86969ea0cd2b73e07f494918c86a46120b7ec6c4aee0a8f24dcbad" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 812, - "startColumn": 27, - "charOffset": 26024, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 810, - "startColumn": 1, - "charOffset": 25992, - "charLength": 129, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\r\n\tenv->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b32344e5b1f322a2", - "equalIndicator/v1": "900764377eff7c0ab272b8d534bd0dd47ce8ffaae030ddf1c28a3051aa759bc1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'vocName' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'vocName' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 181, - "startColumn": 34, - "charOffset": 6228, - "charLength": 7, - "snippet": { - "text": "vocName" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 179, - "startColumn": 1, - "charOffset": 6168, - "charLength": 164, - "snippet": { - "text": "\t\treturn vocEquipMap;\r\n\t}\r\n\tvoid addVocEquipMap(std::string vocName) {\r\n\t\tuint16_t vocationId = g_vocations().getVocationId(vocName);\r\n\t\tif (vocationId != 65535) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f889e787dee30fc0", - "equalIndicator/v1": "900a8ba5ca6e721c8cf7c0b934f6def1c1a0256182165b2b69f123f10233af67" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 443, - "startColumn": 24, - "charOffset": 13112, - "charLength": 8, - "snippet": { - "text": "queryAdd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 441, - "startColumn": 1, - "charOffset": 13084, - "charLength": 261, - "snippet": { - "text": "}\r\n\r\nReturnValue Container::queryAdd(int32_t addIndex, const std::shared_ptr &addThing, uint32_t addCount, uint32_t flags, std::shared_ptr actor /* = nullptr*/) {\r\n\tbool childIsOwner = hasBitSet(FLAG_CHILDISOWNER, flags);\r\n\tif (childIsOwner) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "05d23f7603ede807", - "equalIndicator/v1": "909134cb414150fd128201d2c261eb1ee26534269dc04da63efe4fec34be225e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 597, - "startColumn": 71, - "charOffset": 16033, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 595, - "startColumn": 1, - "charOffset": 15958, - "charLength": 187, - "snippet": { - "text": "}\r\n\r\nvoid ConditionAttributes::updatePercentSkills(std::shared_ptr player) {\r\n\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {\r\n\t\tskills_t skill = static_cast(i);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "22914ccc28c41e2c", - "equalIndicator/v1": "90f143b6335374e7cbc9950c511091b59d761096b99262c1d421ec50bd0619af" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 771, - "startColumn": 2, - "charOffset": 29619, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 769, - "startColumn": 1, - "charOffset": 29612, - "charLength": 52, - "snippet": { - "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "feb110afcf068ab3", - "equalIndicator/v1": "91033633d2a16f72263e93a00e48fdf560b74d8100ba8f34cffff53b652f2682" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 382, - "startColumn": 104, - "charOffset": 14324, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 380, - "startColumn": 1, - "charOffset": 14216, - "charLength": 265, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::playerOnLookInBattleList(std::shared_ptr player, std::shared_ptr creature, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLookInBattleList - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1d3241f400d86c34", - "equalIndicator/v1": "9127f462b1d25ff145c9aaffb59bc5d20fc722281ad84c9762784b58ea53ddbc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/creature_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 729, - "startColumn": 2, - "charOffset": 20156, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 727, - "startColumn": 1, - "charOffset": 20085, - "charLength": 194, - "snippet": { - "text": "\r\n\tConditionType_t conditionType = getNumber(L, 2);\r\n\tuint32_t subId = getNumber(L, 3, 0);\r\n\tpushBoolean(L, creature->hasCondition(conditionType, subId));\r\n\treturn 1;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e8877753d063bccf", - "equalIndicator/v1": "9138b7da2182691ce30dfc31d8b7c25a6a265bf0913e87bec097ec3411bc619f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 464, - "startColumn": 53, - "charOffset": 13710, - "charLength": 1, - "snippet": { - "text": "," - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 462, - "startColumn": 1, - "charOffset": 13567, - "charLength": 266, - "snippet": { - "text": "\tvirtual void onAttackedCreatureBlockHit(BlockType_t) { }\r\n\tvirtual void onBlockHit() { }\r\n\tvirtual void onTakeDamage(std::shared_ptr, int32_t) { }\r\n\tvirtual void onChangeZone(ZoneType_t zone);\r\n\tvirtual void onAttackedCreatureChangeZone(ZoneType_t zone);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ecbf65fda3ade29e", - "equalIndicator/v1": "913d2619f918f670617c9ef13e2bea9e16c8b0901c3a30bbecf515d17ca5b004" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1759, - "startColumn": 57, - "charOffset": 52743, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1757, - "startColumn": 1, - "charOffset": 52682, - "charLength": 193, - "snippet": { - "text": "}\r\n\r\nvoid Creature::turnToCreature(std::shared_ptr creature) {\r\n\tconst Position &creaturePos = creature->getPosition();\r\n\tconst auto dx = Position::getOffsetX(position, creaturePos);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ec75666469939256", - "equalIndicator/v1": "916e5d71c03a8f6d6991c201d746e3263d53feba4f34c9afd6ec513823f51268" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6647, - "startColumn": 38, - "charOffset": 231017, - "charLength": 9, - "snippet": { - "text": "std::ceil" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6645, - "startColumn": 1, - "charOffset": 230904, - "charLength": 353, - "snippet": { - "text": "\t\t\t\t} else {\r\n\t\t\t\t\tdamageReflected.secondary.type = damage.secondary.type;\r\n\t\t\t\t\tdamageReflected.primary.value = std::ceil(damage.secondary.value * secondaryReflectPercent / 100.) + std::max(-static_cast(std::ceil(attacker->getMaxHealth() * 0.01)), std::max(damage.secondary.value, -(static_cast(secondaryReflectFlat))));\r\n\t\t\t\t}\r\n\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ffaad8e52eed9477", - "equalIndicator/v1": "917b39f76df221082b4d40f6fdceb9c8ad2ec3ba5f8d4853363f9520eba92963" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7402, - "startColumn": 64, - "charOffset": 257722, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7400, - "startColumn": 1, - "charOffset": 257631, - "charLength": 311, - "snippet": { - "text": "\r\nvoid Game::sendMessages(\r\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\r\n\tconst Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetPlayer,\r\n\tTextMessage &message, const CreatureVector &spectators, int32_t realDamage\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "03c5a25df884f396", - "equalIndicator/v1": "91830235f9e19a726e4730c2bbaa6e4c06bbd40df60c6c76842c3efaba9039ef" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 594, - "startColumn": 13, - "charOffset": 28793, - "charLength": 11, - "snippet": { - "text": "stringValue" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 592, - "startColumn": 1, - "charOffset": 28599, - "charLength": 415, - "snippet": { - "text": "\t} else if (stringValue == \"absorbpercentlifedrain\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_LIFEDRAIN)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentmanadrain\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_MANADRAIN)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentdrown\") {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "eaba432d3e045cf7", - "equalIndicator/v1": "919b981a7945d444058c3b9c4e7ab4859d41b9c9e39051f17012895cdf803b08" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 703, - "startColumn": 63, - "charOffset": 25077, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 701, - "startColumn": 1, - "charOffset": 25010, - "charLength": 166, - "snippet": { - "text": "}\r\n\r\nbool Events::eventPlayerOnRemoveCount(std::shared_ptr player, std::shared_ptr item) {\r\n\t// Player:onMove()\r\n\tif (info.playerOnRemoveCount == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dd6742a3fbca66b4", - "equalIndicator/v1": "91f58d1cffbadaf97ed877dc15e652cf63c273100bc2c2db839a3a3beb8f117e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iobestiary.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 59, - "startColumn": 24, - "charOffset": 1847, - "charLength": 28, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 57, - "startColumn": 1, - "charOffset": 1611, - "charLength": 615, - "snippet": { - "text": "\tstd::shared_ptr getBestiaryCharm(charmRune_t activeCharm, bool force = false) const;\r\n\tvoid addBestiaryKill(std::shared_ptr player, const std::shared_ptr mtype, uint32_t amount = 1);\r\n\tbool parseCharmCombat(const std::shared_ptr charm, std::shared_ptr player, std::shared_ptr target, int32_t realDamage, bool dueToPotion = false, bool checkArmor = false);\r\n\tvoid addCharmPoints(std::shared_ptr player, uint16_t amount, bool negative = false);\r\n\tvoid sendBuyCharmRune(std::shared_ptr player, charmRune_t runeID, uint8_t action, uint16_t raceid);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "24dfdbf745085383", - "equalIndicator/v1": "91fc4a7777ce836bbbe09ae654dae5435272c459499d0ca553cd269c9dce91a0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1646, - "startColumn": 58, - "charOffset": 44545, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1644, - "startColumn": 1, - "charOffset": 44483, - "charLength": 283, - "snippet": { - "text": "}\r\n\r\nbool ConditionDamage::doDamage(std::shared_ptr creature, int32_t healthChange) {\r\n\tauto attacker = g_game().getPlayerByGUID(owner) ? g_game().getPlayerByGUID(owner)->getCreature() : g_game().getCreatureByID(owner);\r\n\tbool isPlayer = attacker && attacker->getPlayer();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "de46a04fb8d36e4c", - "equalIndicator/v1": "921ec8b33c278c9f26234d07623db081cb18b5d211441f6aba58b4278a00cf82" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'mtype' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'mtype' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 506, - "startColumn": 83, - "charOffset": 13913, - "charLength": 5, - "snippet": { - "text": "mtype" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 504, - "startColumn": 1, - "charOffset": 13826, - "charLength": 170, - "snippet": { - "text": "}\r\n\r\nvoid Player::addMonsterToCyclopediaTrackerList(const std::shared_ptr mtype, bool isBoss, bool reloadClient /* = false */) {\r\n\tif (!client) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "eb500a60bb5e4eab", - "equalIndicator/v1": "92237836154d4ab003ed14d10074c45e641c51fd73f33c2dcc12f07a524d3848" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'needPremium' can be made const", - "markdown": "Method 'needPremium' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 232, - "startColumn": 7, - "charOffset": 7413, - "charLength": 11, - "snippet": { - "text": "needPremium" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 230, - "startColumn": 1, - "charOffset": 7379, - "charLength": 73, - "snippet": { - "text": "\t\treqMagLevel = level;\r\n\t}\r\n\tbool needPremium() {\r\n\t\treturn premium;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b5596a4fcd3606d2", - "equalIndicator/v1": "92367e4c269959085b9a638022d02547d65fa0873f6ba8148b48204c6d986ffe" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 689, - "startColumn": 116, - "charOffset": 22555, - "charLength": 13, - "snippet": { - "text": "spellCooldown" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 687, - "startColumn": 1, - "charOffset": 22366, - "charLength": 283, - "snippet": { - "text": "\t\tspellCooldown -= augmentCooldownReduction;\r\n\t\tif (spellCooldown > 0) {\r\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLCOOLDOWN, spellCooldown / rateCooldown, 0, false, m_spellId);\r\n\t\t\tplayer->addCondition(condition);\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6a1e4cfe0408be5e", - "equalIndicator/v1": "924dd968530ebf791e4f5e4be280539c121aad2a5d1eb08a85b769019794c6e0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 553, - "startColumn": 64, - "charOffset": 21061, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 551, - "startColumn": 1, - "charOffset": 20993, - "charLength": 212, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::playerOnChangeZone(std::shared_ptr player, ZoneType_t zone) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnChangeZone - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "92828f9ab346cb02", - "equalIndicator/v1": "9258b25d2eee35f9ea25312e82728728a5cf27d8770050d52c72516bdd51b44a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 234, - "startColumn": 7, - "charOffset": 7382, - "charLength": 19, - "snippet": { - "text": "postAddNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 232, - "startColumn": 1, - "charOffset": 7304, - "charLength": 394, - "snippet": { - "text": "\tstd::shared_ptr getThing(size_t index) const override final;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b32275e5108f38fd", - "equalIndicator/v1": "926082c013176027968ef2144f404d4ac6757b8396f0a06960daab0eafab3dc4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3490, - "startColumn": 33, - "charOffset": 105677, - "charLength": 12, - "snippet": { - "text": "tmpContainer" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3488, - "startColumn": 1, - "charOffset": 105561, - "charLength": 280, - "snippet": { - "text": "\t\t\t\tuint32_t n = tmpContainer->capacity() - tmpContainer->size();\r\n\t\t\t\twhile (n) {\r\n\t\t\t\t\tif (tmpContainer->queryAdd(tmpContainer->capacity() - n, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) {\r\n\t\t\t\t\t\tindex = tmpContainer->capacity() - n;\r\n\t\t\t\t\t\t*destItem = nullptr;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3ba2fab826d731e4", - "equalIndicator/v1": "9263e1289e0b08ead9f5b95e367e2407727e66ad7b9599efd1bcf6f84100b216" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 818, - "startColumn": 50, - "charOffset": 24869, - "charLength": 1, - "snippet": { - "text": "," - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 816, - "startColumn": 1, - "charOffset": 24803, - "charLength": 155, - "snippet": { - "text": "\t\treturn 0;\r\n\t}\r\n\tvirtual void dropLoot(std::shared_ptr, std::shared_ptr) { }\r\n\tvirtual uint16_t getLookCorpse() const {\r\n\t\treturn 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fc57e532ce804d53", - "equalIndicator/v1": "926d9f034cbe53d56c652076c7c959bf8c6a203c1b89dfd88ae33e0039a70b83" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/cylinder.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 28, - "startColumn": 20, - "charOffset": 761, - "charLength": 16, - "snippet": { - "text": "getItemTypeCount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 26, - "startColumn": 1, - "charOffset": 737, - "charLength": 83, - "snippet": { - "text": "}\r\n\r\nuint32_t Cylinder::getItemTypeCount(uint16_t, int32_t) const {\r\n\treturn 0;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2e6c01acfddd966a", - "equalIndicator/v1": "9293cb9521a2738cbc2f2a5d837b67e668da71cea0a1ce3feb384d8b739fe968" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use range-based for loop instead", - "markdown": "Use range-based for loop instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocol.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 132, - "startColumn": 3, - "charOffset": 4148, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 130, - "startColumn": 1, - "charOffset": 4061, - "charLength": 302, - "snippet": { - "text": "\t\tstd::array vData = {};\r\n\t\tmemcpy(vData.data(), buffer + readPos, 8);\r\n\t\tfor (int32_t i = 0; i < 32; ++i) {\r\n\t\t\tvData[0] += ((vData[1] << 4 ^ vData[1] >> 5) + vData[1]) ^ precachedControlSum[i][0];\r\n\t\t\tvData[1] += ((vData[0] << 4 ^ vData[0] >> 5) + vData[0]) ^ precachedControlSum[i][1];\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cc21e677a29cdcfa", - "equalIndicator/v1": "92949d6fa5f9c2eb8d4501fb0940c497fcd575c59b3835973efb1873e330eabf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7383, - "startColumn": 64, - "charOffset": 256879, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7381, - "startColumn": 1, - "charOffset": 256773, - "charLength": 326, - "snippet": { - "text": "\r\nvoid Game::sendDamageMessageAndEffects(\r\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\r\n\tconst Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetPlayer,\r\n\tTextMessage &message, const CreatureVector &spectators, int32_t realDamage\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c4bf15d5a9bceb46", - "equalIndicator/v1": "92abb408c8ccdace748a9e4357ffe273ada9a9c9c1d77ba803f2e04fa3b778a4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 442, - "startColumn": 8, - "charOffset": 26914, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 440, - "startColumn": 1, - "charOffset": 26901, - "charLength": 119, - "snippet": { - "text": "\t}\r\n\r\n\tconst uint16_t oldRace = result->getNumber(\"raceid\");\r\n\tconst auto monsterlist = getBestiaryList();\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f95c376393f05702", - "equalIndicator/v1": "92d567b563d08e101519f0f84278c0d13a368451a76e175e59774644622a004f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 775, - "startColumn": 7, - "charOffset": 29770, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 773, - "startColumn": 1, - "charOffset": 29663, - "charLength": 249, - "snippet": { - "text": "\r\nvoid EventCallback::playerOnLoseExperience(std::shared_ptr player, uint64_t &exp) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLoseExperience - \"\r\n\t\t \"Player {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "92c3769ed29e4050", - "equalIndicator/v1": "92e458bc78aac3031d8d320b311ab9cb8ccb40f2e6d1f35cf07823763f904b71" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1588, - "startColumn": 2, - "charOffset": 47036, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1586, - "startColumn": 1, - "charOffset": 46972, - "charLength": 168, - "snippet": { - "text": "\r\nvoid ProtocolGame::parseCloseChannel(NetworkMessage &msg) {\r\n\tuint16_t channelId = msg.get();\r\n\tg_game().playerCloseChannel(player->getID(), channelId);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bd64884ce73be21f", - "equalIndicator/v1": "934222cd040177142c8a492e0111c9a46f10377b45c027d181b61c6d28d219a2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 792, - "startColumn": 71, - "charOffset": 25788, - "charLength": 11, - "snippet": { - "text": "attackValue" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 790, - "startColumn": 1, - "charOffset": 25659, - "charLength": 176, - "snippet": { - "text": "\r\n\tint32_t minValue = std::round(player->getLevel() / 5);\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue) / 2;\r\n\r\n\tif (target) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9b25504c683c80f0", - "equalIndicator/v1": "93493f32ee9c0ffc6d90f7919349baee734d457f041f38ea16e88e408f88651d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 251, - "startColumn": 28, - "charOffset": 8119, - "charLength": 32, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 249, - "startColumn": 1, - "charOffset": 7974, - "charLength": 443, - "snippet": { - "text": "\tstatic uint32_t RemoveItemField(std::shared_ptr item, std::shared_ptr tileItem, const Position &pos);\r\n\r\n\tstatic uint32_t EquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool boolean);\r\n\tstatic uint32_t DeEquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool boolean);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "16f8a57ac3de8ae7", - "equalIndicator/v1": "939b9a8ccb5e4cf3da13135fb4b45c68ce5618b17b119578ebc18a547ff00651" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 176, - "startColumn": 8, - "charOffset": 4468, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 174, - "startColumn": 1, - "charOffset": 4372, - "charLength": 213, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeIsMultiUse(lua_State* L) {\r\n\t// itemType:isMultiUse()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isMultiUse());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "db280b0f92fae188", - "equalIndicator/v1": "93c6570b8dad04de594ef6581779478874bca50d62c4e31de23017423d7800ed" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1396, - "startColumn": 26, - "charOffset": 48203, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1394, - "startColumn": 1, - "charOffset": 48031, - "charLength": 239, - "snippet": { - "text": "\r\n[[maybe_unused]] void Combat::doCombatDefault(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms) {\r\n\tdoCombatDefault(caster, target, caster ? caster->getPosition() : Position(), params);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "07d2c994699f9860", - "equalIndicator/v1": "94081fc938e01c76fe70a9c3ec055ee78533f222bae31f4d43ec591d903282a5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'getManagedContainer' is within a recursive call chain", - "markdown": "Function 'getManagedContainer' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1107, - "startColumn": 36, - "charOffset": 32292, - "charLength": 19, - "snippet": { - "text": "getManagedContainer" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1105, - "startColumn": 1, - "charOffset": 32252, - "charLength": 215, - "snippet": { - "text": "}\r\n\r\nstd::shared_ptr Player::getManagedContainer(ObjectCategory_t category, bool isLootContainer) const {\r\n\tif (category != OBJECTCATEGORY_DEFAULT && !isPremium()) {\r\n\t\tcategory = OBJECTCATEGORY_DEFAULT;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8fe59e9c7c4e6294", - "equalIndicator/v1": "940ae7e35f92f34fa542bb21299aa4014b6331f1699d70375347a23e4bc4a884" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", - "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/server.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 74, - "startColumn": 10, - "charOffset": 1842, - "charLength": 11, - "snippet": { - "text": "std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 72, - "startColumn": 1, - "charOffset": 1752, - "charLength": 111, - "snippet": { - "text": "std::string ServicePort::get_protocol_names() const {\r\n\tif (services.empty()) {\r\n\t\treturn std::string();\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d6653c4f91f26cc7", - "equalIndicator/v1": "9413de63a9d534530594905ca6273a56370b7f35e25279864a14e1748f368f6a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 969, - "startColumn": 27, - "charOffset": 34965, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 967, - "startColumn": 1, - "charOffset": 34933, - "charLength": 131, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnTradeRequest, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8b3203f9f05e1ebe", - "equalIndicator/v1": "941a0443fb55508ba806a2637d6eab8da090af430e8120f26018f1f48b126756" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 558, - "startColumn": 22, - "charOffset": 18003, - "charLength": 15, - "snippet": { - "text": "getWeaponDamage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 556, - "startColumn": 1, - "charOffset": 17977, - "charLength": 242, - "snippet": { - "text": "}\r\n\r\nint32_t WeaponMelee::getWeaponDamage(std::shared_ptr player, std::shared_ptr, std::shared_ptr item, bool maxDamage /*= false*/) const {\r\n\tusing namespace std;\r\n\tint32_t attackSkill = player->getWeaponSkill(item);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3ab04ba569f5b5e1", - "equalIndicator/v1": "942778b553435d3b88f5002097809b41de64b5c331d85bec7142cb53af635f62" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 799, - "startColumn": 38, - "charOffset": 28931, - "charLength": 10, - "snippet": { - "text": "toCylinder" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 797, - "startColumn": 1, - "charOffset": 28839, - "charLength": 146, - "snippet": { - "text": "\r\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\r\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\r\n\r\n\tscriptInterface.callVoidFunction(7);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "180ea1929fdcaf24", - "equalIndicator/v1": "943bf9cc7f7a9fc916d893349d9706d222ce7c2bdf2b00ab81ae70c709709a85" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/cylinder.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 54, - "startColumn": 22, - "charOffset": 2301, - "charLength": 11, - "snippet": { - "text": "queryRemove" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 52, - "startColumn": 1, - "charOffset": 2225, - "charLength": 207, - "snippet": { - "text": "\t * \\returns ReturnValue holds the return value\r\n\t */\r\n\tvirtual ReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr = nullptr) = 0;\r\n\r\n\t/**\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bd24c38664047aed", - "equalIndicator/v1": "945061710e3e765357a80260f884df86cf9c15bcd15533620a593c08f4e595af" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 185, - "startColumn": 51, - "charOffset": 5815, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 183, - "startColumn": 1, - "charOffset": 5651, - "charLength": 247, - "snippet": { - "text": "\r\nReturnValue Actions::canUse(std::shared_ptr player, const Position &pos, std::shared_ptr item) {\r\n\tconst std::shared_ptr action = getAction(item);\r\n\tif (action != nullptr) {\r\n\t\treturn action->canExecuteAction(player, pos);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7977580e99a73d01", - "equalIndicator/v1": "9461fe1758245e8d2c92660da3ee6d5d998ec8d463a0366cde49a4cb5f633543" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Local copy 'oldLeader' of the variable 'leader' is never modified; consider avoiding the copy", - "markdown": "Local copy 'oldLeader' of the variable 'leader' is never modified; consider avoiding the copy" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/grouping/party.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 182, - "startColumn": 7, - "charOffset": 5040, - "charLength": 9, - "snippet": { - "text": "oldLeader" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 180, - "startColumn": 1, - "charOffset": 4965, - "charLength": 118, - "snippet": { - "text": "\tbroadcastPartyMessage(MESSAGE_PARTY_MANAGEMENT, ss.str(), true);\r\n\r\n\tauto oldLeader = leader;\r\n\tm_leader = player;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1f403c7e882a53ea", - "equalIndicator/v1": "949e9a084e25120de4d5732647ae5e15cb1eb91b313220c2a8cd6a7f23d56b3b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 168, - "startColumn": 7, - "charOffset": 5825, - "charLength": 16, - "snippet": { - "text": "internalAddThing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 166, - "startColumn": 1, - "charOffset": 5747, - "charLength": 222, - "snippet": { - "text": "\r\n\tvoid internalAddThing(std::shared_ptr thing) override final;\r\n\tvoid internalAddThing(uint32_t index, std::shared_ptr thing) override final;\r\n\tvoid startDecaying() override;\r\n\tvoid stopDecaying() override;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7d510c9fa4f78756", - "equalIndicator/v1": "94b0b8e1d624fb670debd595cc9245398161e479d846629add93156b0f166cd2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1733, - "startColumn": 27, - "charOffset": 60561, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1731, - "startColumn": 1, - "charOffset": 60529, - "charLength": 159, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d2cd6f32a1f2731b", - "equalIndicator/v1": "94dc6a760add1337934c64f4a2922870d87c4374b762bd9c199d00fc5b86ac74" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'itemIds' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'itemIds' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5651, - "startColumn": 115, - "charOffset": 198860, - "charLength": 7, - "snippet": { - "text": "itemIds" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5649, - "startColumn": 1, - "charOffset": 198741, - "charLength": 207, - "snippet": { - "text": "}\r\n\r\nvoid Game::playerQuickLootBlackWhitelist(uint32_t playerId, QuickLootFilter_t filter, const std::vector itemIds) {\r\n\tstd::shared_ptr player = getPlayerByID(playerId);\r\n\tif (!player) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b5ad26ed98b17e34", - "equalIndicator/v1": "94ddf55c6243bea5f40aa0fef292309d2f0941c31f6886769ee6afd322af7b86" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 751, - "startColumn": 26, - "charOffset": 22074, - "charLength": 10, - "snippet": { - "text": "getMaxMana" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 749, - "startColumn": 1, - "charOffset": 21983, - "charLength": 188, - "snippet": { - "text": "\t\tcase STAT_MAXMANAPOINTS: {\r\n\t\t\tif (getMana() > getMaxMana()) {\r\n\t\t\t\tCreature::changeMana(getMaxMana() - getMana());\r\n\t\t\t} else {\r\n\t\t\t\tg_game().addPlayerMana(static_self_cast());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ef4c6806f496d71a", - "equalIndicator/v1": "9542d7042bb02d59717d875bd324c01f7d725424a4bff737b8ce30dfbea7ea00" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'float'", - "markdown": "Narrowing conversion from 'double' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/io_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 869, - "startColumn": 26, - "charOffset": 39954, - "charLength": 19, - "snippet": { - "text": "MITIGATION_INCREASE" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 867, - "startColumn": 1, - "charOffset": 39739, - "charLength": 379, - "snippet": { - "text": "// SLOT_BLUE_BOTTOM_100 = 33\r\nvoid IOWheel::slotBlueBottom100(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\r\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\r\n\tbool onSlot = isMaxPointAddedToSlot(player, points, WheelSlots_t::SLOT_BLUE_BOTTOM_100);\r\n\tif (isKnight(vocationCipId) && onSlot) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "aa29d8935493a3c3", - "equalIndicator/v1": "954f5167fdfeaf2fd23347d943913389b24c14c3774bb8f1f08bc170133210bf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/imbuement_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 62, - "startColumn": 2, - "charOffset": 1650, - "charLength": 15, - "snippet": { - "text": "lua_createtable" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 60, - "startColumn": 1, - "charOffset": 1603, - "charLength": 147, - "snippet": { - "text": "\tconst auto items = imbuement->getItems();\r\n\r\n\tlua_createtable(L, items.size(), 0);\r\n\tfor (const auto &itm : items) {\r\n\t\tlua_createtable(L, 0, 2);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3f5d144db73569a7", - "equalIndicator/v1": "9553f9c9a60c7d91ac2c9910b1dc73263da2167ec874eb884b522a469f87b2a3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'unserializeItemNode' is within a recursive call chain", - "markdown": "Function 'unserializeItemNode' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/mapcache.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 253, - "startColumn": 69, - "charOffset": 7222, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 251, - "startColumn": 1, - "charOffset": 7149, - "charLength": 155, - "snippet": { - "text": "}\r\n\r\nbool BasicItem::unserializeItemNode(FileStream &stream, uint16_t x, uint16_t y, uint8_t z) {\r\n\tif (stream.isProp(OTB::Node::END)) {\r\n\t\tstream.back();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ce0c335d089eef18", - "equalIndicator/v1": "9570c9eb8523b354c0b0936d191535972e1610f1f6872eef835a2307aa08f1ba" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 353, - "startColumn": 2, - "charOffset": 8777, - "charLength": 8, - "snippet": { - "text": "uint64_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 351, - "startColumn": 1, - "charOffset": 8770, - "charLength": 116, - "snippet": { - "text": "\t}\r\n\r\n\tuint64_t stackSize = static_cast(itemType->stackSize);\r\n\tlua_pushnumber(L, stackSize);\r\n\treturn 1;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f0cf870d47bcd30c", - "equalIndicator/v1": "959a0ca0af95d4d886ed38ad2769b1d9645690edfa99492a217b78c334fa5896" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/scheduling/dispatcher.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 174, - "startColumn": 12, - "charOffset": 4772, - "charLength": 7, - "snippet": { - "text": "uint8_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 172, - "startColumn": 1, - "charOffset": 4677, - "charLength": 194, - "snippet": { - "text": "// Merge thread events with main dispatch events\r\nvoid Dispatcher::mergeEvents() {\r\n\tconstexpr uint8_t serial = static_cast(TaskGroup::Serial);\r\n\r\n\tfor (const auto &thread : threads) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "087f5338b4477f5a", - "equalIndicator/v1": "959c6cbe6537f6eb6196a82aa7625f6b4b4f160a570534dc3f3b8c25f998d314" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 251, - "startColumn": 128, - "charOffset": 7998, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 249, - "startColumn": 1, - "charOffset": 7866, - "charLength": 241, - "snippet": { - "text": "}\r\n\r\nReturnValue Actions::internalUseItem(std::shared_ptr player, const Position &pos, uint8_t index, std::shared_ptr item, bool isHotkey) {\r\n\tif (std::shared_ptr door = item->getDoor()) {\r\n\t\tif (!door->canUse(player)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4555aba0e22aa188", - "equalIndicator/v1": "95c478333cbe42aac7bf65896e73ff144e9b4ced6d1588f86c4cf5a55c88207e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/player_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 978, - "startColumn": 2, - "charOffset": 26638, - "charLength": 2, - "snippet": { - "text": "if" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 976, - "startColumn": 1, - "charOffset": 26510, - "charLength": 175, - "snippet": { - "text": "\t// player:addMana(manaChange[, animationOnLoss = false])\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (!player) {\r\n\t\tlua_pushnil(L);\r\n\t\treturn 1;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0f492ff82a909f9a", - "equalIndicator/v1": "95caee0d3802cc0169a3831532a78f847a50a1f34822e54539b02c234d013bec" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/map/tile_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 91, - "startColumn": 21, - "charOffset": 2401, - "charLength": 4, - "snippet": { - "text": "tile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 89, - "startColumn": 1, - "charOffset": 2305, - "charLength": 150, - "snippet": { - "text": "\tstd::shared_ptr tile = getUserdataShared(L, 1);\r\n\tif (tile) {\r\n\t\tlua_pushnumber(L, tile->getThingCount());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "84d7d5502966ecea", - "equalIndicator/v1": "95ed201206b421c50581b6aeef385ea6a8b30e85ca48b858dfaa4d49fb73c111" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 971, - "startColumn": 41, - "charOffset": 37008, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 969, - "startColumn": 1, - "charOffset": 36962, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "566684bc302e0510", - "equalIndicator/v1": "95ee614eaf1b5183d60c6c7b095e21c59cb72b1ea8673df98b304983f7c1ed27" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 172, - "startColumn": 71, - "charOffset": 5046, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 170, - "startColumn": 1, - "charOffset": 4971, - "charLength": 131, - "snippet": { - "text": "}\r\n\r\nAccessHouseLevel_t House::getHouseAccessLevel(std::shared_ptr player) const {\r\n\tif (!player) {\r\n\t\treturn HOUSE_OWNER;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2f747badab691748", - "equalIndicator/v1": "9602c3e15dd8146e8f454669b91c6b176d418135e34a98aabab2edc7e638a2dc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1796, - "startColumn": 59, - "charOffset": 48472, - "charLength": 3, - "snippet": { - "text": "med" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1794, - "startColumn": 1, - "charOffset": 48389, - "charLength": 170, - "snippet": { - "text": "\t\t\tlist.push_back(i);\r\n\r\n\t\t\tx1 = std::fabs(1.0 - ((static_cast(sum)) + i) / med);\r\n\t\t\tx2 = std::fabs(1.0 - (static_cast(sum) / med));\r\n\t\t} while (x1 < x2);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5a7dfa03b3acdeef", - "equalIndicator/v1": "960b8e495d424487f6c438bea78eede74baf7c3da1de0e9b1920e2631e988937" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 514, - "startColumn": 64, - "charOffset": 15289, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 512, - "startColumn": 1, - "charOffset": 15221, - "charLength": 157, - "snippet": { - "text": "}\r\n\r\nbool House::executeTransfer(std::shared_ptr item, std::shared_ptr newOwner) {\r\n\tif (transferItem != item) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8c8b63e9f84524bb", - "equalIndicator/v1": "96257d7e4da6dd8b8f438e511282b533ee4946426c237532de65a98305c26871" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 269, - "startColumn": 65, - "charOffset": 7982, - "charLength": 9, - "snippet": { - "text": "moveEvent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 267, - "startColumn": 1, - "charOffset": 7913, - "charLength": 235, - "snippet": { - "text": "}\r\n\r\nbool MoveEvents::registerEvent(const std::shared_ptr moveEvent, const Position &position, std::map &moveListMap) const {\r\n\tauto it = moveListMap.find(position);\r\n\tif (it == moveListMap.end()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "11d52a6117aa7296", - "equalIndicator/v1": "9633b8aeb34a7c948129fd59f1c14e4923b6b970323c2f6fdb0832907438df74" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from '::std::_Common_float_type_t' (aka 'double') to 'unsigned long long'", - "markdown": "Narrowing conversion from '::std::_Common_float_type_t' (aka 'double') to 'unsigned long long'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/vocations/vocation.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 286, - "startColumn": 42, - "charOffset": 9335, - "charLength": 4, - "snippet": { - "text": "1600" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 284, - "startColumn": 1, - "charOffset": 9288, - "charLength": 176, - "snippet": { - "text": "\t}\r\n\r\n\tuint64_t reqMana = std::floor(1600 * std::pow(manaMultiplier, static_cast(magLevel) - 1));\r\n\tcacheMana[magLevel] = reqMana;\r\n\treturn reqMana;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4a18234718c67264", - "equalIndicator/v1": "963d7cc2763e53b751c33be06f5ad27ed018d843a993fc4178dfa38623e7f945" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/loot_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 198, - "startColumn": 34, - "charOffset": 5101, - "charLength": 19, - "snippet": { - "text": "getNumber" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 196, - "startColumn": 1, - "charOffset": 5003, - "charLength": 161, - "snippet": { - "text": "\tconst auto loot = getUserdataShared(L, 1);\r\n\tif (loot) {\r\n\t\tloot->lootBlock.extraDefense = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4af0ec27ad603057", - "equalIndicator/v1": "964a5c18480e428334b9f6b8ebfae6e7ba715f08e5fda467dae05854cb7cfdfe" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 368, - "startColumn": 27, - "charOffset": 12095, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 366, - "startColumn": 1, - "charOffset": 12063, - "charLength": 129, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\r\n\tenv->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5b09f07f125c15af", - "equalIndicator/v1": "96527fc22547959f4c928b293e23f43a20ff89192392e34cb8d2309e65014697" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1033, - "startColumn": 54, - "charOffset": 33663, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1031, - "startColumn": 1, - "charOffset": 33605, - "charLength": 208, - "snippet": { - "text": "}\r\n\r\nbool Combat::doCombatChain(std::shared_ptr caster, std::shared_ptr target, bool aggressive) const {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!params.chainCallback) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dbeffa71fdca1bff", - "equalIndicator/v1": "966cc5d455cbd7d1901334580db78a5b105474125dfa68cff51c2911b459edeb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1486, - "startColumn": 41, - "charOffset": 44306, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1484, - "startColumn": 1, - "charOffset": 44159, - "charLength": 181, - "snippet": { - "text": "\tvoid sendTextWindow(std::shared_ptr item, uint16_t maxlen, bool canWrite) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendTextWindow(windowTextId, item, maxlen, canWrite);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bb8677eca9529f10", - "equalIndicator/v1": "96864fe7f27cbea4dbf9d4f3845bc77cc63d71629feaf336076fcd6889aad79b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 222, - "startColumn": 7, - "charOffset": 6824, - "charLength": 12, - "snippet": { - "text": "replaceThing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 220, - "startColumn": 1, - "charOffset": 6661, - "charLength": 321, - "snippet": { - "text": "\tvoid updateTileFlags(const std::shared_ptr &item);\r\n\tvoid updateThing(std::shared_ptr thing, uint16_t itemId, uint32_t count) override final;\r\n\tvoid replaceThing(uint32_t index, std::shared_ptr thing) override final;\r\n\r\n\tvoid removeThing(std::shared_ptr thing, uint32_t count) override final;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "90facd474638b5aa", - "equalIndicator/v1": "9688ab73216d679aa6c93c98b50f4d59ca20c313821f12af98bab57a2c35d7b9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 110, - "startColumn": 8, - "charOffset": 2819, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 108, - "startColumn": 1, - "charOffset": 2723, - "charLength": 234, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeIsStowable(lua_State* L) {\r\n\t// itemType:isStowable()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->stackable && itemType->wareId > 0);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bb3e4cf31884f7b4", - "equalIndicator/v1": "9694d3a4105b9ed651a62999d34ce558d24ffa1f476069da20d2cced3f864b36" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Redundant string initialization", - "markdown": "Redundant string initialization" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2323, - "startColumn": 14, - "charOffset": 72351, - "charLength": 5, - "snippet": { - "text": "Class" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2321, - "startColumn": 1, - "charOffset": 72295, - "charLength": 191, - "snippet": { - "text": "\r\n\tuint16_t raceId = msg.get();\r\n\tstd::string Class = \"\";\r\n\tstd::shared_ptr mtype = nullptr;\r\n\tstd::map mtype_list = g_game().getBestiaryList();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "423c5ba391435eae", - "equalIndicator/v1": "96a7dda31075f7170d0df1ffd1f623d721372386dc39c65a6f7695bc749f965c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2024, - "startColumn": 18, - "charOffset": 59980, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2022, - "startColumn": 1, - "charOffset": 59886, - "charLength": 106, - "snippet": { - "text": "// container\r\nvoid Player::onAddContainerItem(std::shared_ptr item) {\r\n\tcheckTradeState(item);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1636cee3136e72c3", - "equalIndicator/v1": "96b1187c775fa8613ecf412aa7c26afa993d99e152e087694869030882c6aa4a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/scheduling/save_manager.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 109, - "startColumn": 54, - "charOffset": 3215, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 107, - "startColumn": 1, - "charOffset": 3157, - "charLength": 123, - "snippet": { - "text": "}\r\n\r\nbool SaveManager::savePlayer(std::shared_ptr player) {\r\n\tif (player->isOnline()) {\r\n\t\tschedulePlayer(player);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4f0eb3618b3f837c", - "equalIndicator/v1": "96b8c126ce2a617ce934cefe0618beba51e844fb4f438923df49dc29fafb4891" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'isLogin' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'isLogin' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 526, - "startColumn": 82, - "charOffset": 14362, - "charLength": 10, - "snippet": { - "text": "const bool" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 524, - "startColumn": 1, - "charOffset": 14208, - "charLength": 220, - "snippet": { - "text": "\r\n\tint32_t getStorageValueByName(const std::string &storageName) const;\r\n\tvoid addStorageValueByName(const std::string &storageName, const int32_t value, const bool isLogin = false);\r\n\r\n\tstd::shared_ptr kv() const {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6e33a01ff8e24b80", - "equalIndicator/v1": "96bc84641b83061fe8c4d64b15420363bfec025cfff27a59eb7f5bb51d68c9b8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7744, - "startColumn": 3, - "charOffset": 243097, - "charLength": 8, - "snippet": { - "text": "skills_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7742, - "startColumn": 1, - "charOffset": 243076, - "charLength": 224, - "snippet": { - "text": "\t\t\tcontinue;\r\n\t\t}\r\n\t\tskills_t skill = static_cast(i);\r\n\t\tmsg.add(std::min(player->getSkillLevel(skill), std::numeric_limits::max()));\r\n\t\tmsg.add(player->getBaseSkill(skill));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c7882b728e897d1f", - "equalIndicator/v1": "96d39129a6a22de84a64d483efd186f61c921e17f1974ead315310bcb06ebc5e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iologindata.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 213, - "startColumn": 59, - "charOffset": 6944, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 211, - "startColumn": 1, - "charOffset": 6881, - "charLength": 178, - "snippet": { - "text": "}\r\n\r\nbool IOLoginData::savePlayerGuard(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tthrow DatabaseException(\"Player nullptr in function: \" + std::string(__FUNCTION__));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "585694ee4e4aa4c7", - "equalIndicator/v1": "96d44a0b17dee055f00bc78f29d4cb04482aa4dfa1179308a21fabaf31d9d8bf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1624, - "startColumn": 50, - "charOffset": 48427, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1622, - "startColumn": 1, - "charOffset": 48252, - "charLength": 203, - "snippet": { - "text": "\tvoid sendItemInspection(uint16_t itemId, uint8_t itemCount, std::shared_ptr item, bool cyclopedia) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendItemInspection(itemId, itemCount, item, cyclopedia);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "faf0ba727db860b7", - "equalIndicator/v1": "96de3f98d8f7f5df4c0033d4368e96d819bacc61490f702037853b2ac51bf009" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", - "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/zones/zone.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 75, - "startColumn": 9, - "charOffset": 2203, - "charLength": 8, - "snippet": { - "text": "Position" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 73, - "startColumn": 1, - "charOffset": 2126, - "charLength": 94, - "snippet": { - "text": "\t\treturn creature->getPlayer()->getTown()->getTemplePosition();\r\n\t}\r\n\treturn Position();\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d66cb4b63e54ec70", - "equalIndicator/v1": "96f0b521e92d1a4e60395203565ee9eef6648c783c95356b4c21ea0c9d5e9358" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1783, - "startColumn": 2, - "charOffset": 53759, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1781, - "startColumn": 1, - "charOffset": 53691, - "charLength": 178, - "snippet": { - "text": "\r\nvoid ProtocolGame::parseLookInBattleList(NetworkMessage &msg) {\r\n\tuint32_t creatureId = msg.get();\r\n\tg_game().playerLookInBattleList(player->getID(), creatureId);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d9107bb39de43316", - "equalIndicator/v1": "971ca52f26824b1cbf8a7fa76fa88c6f3b351ef1d59cbf7b12a66d89e817dca1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2729, - "startColumn": 4, - "charOffset": 83954, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2727, - "startColumn": 1, - "charOffset": 83933, - "charLength": 154, - "snippet": { - "text": "\t\t}\r\n\t\tcase 2: {\r\n\t\t\tuint32_t memberID = msg.get();\r\n\t\t\tstd::shared_ptr member = g_game().getPlayerByGUID(memberID);\r\n\t\t\tif (!member) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e7cccaba716c09ee", - "equalIndicator/v1": "9743201492370d2de1e33e26a23019b30908b66533ead493557423d90b912296" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'targetPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'targetPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7451, - "startColumn": 26, - "charOffset": 259608, - "charLength": 12, - "snippet": { - "text": "targetPlayer" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7449, - "startColumn": 1, - "charOffset": 259446, - "charLength": 297, - "snippet": { - "text": "void Game::buildMessageAsSpectator(\r\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\r\n\tstd::shared_ptr targetPlayer, TextMessage &message, std::stringstream &ss,\r\n\tconst std::string &damageString, std::string &spectatorMessage\r\n) const {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "74b5798a21666c97", - "equalIndicator/v1": "975dc2f9d95e2ddf51db380f751cd59e8210d4967f12c7c862131748c9508e47" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3288, - "startColumn": 70, - "charOffset": 100508, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3286, - "startColumn": 1, - "charOffset": 100434, - "charLength": 142, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureWalkthrough(std::shared_ptr creature, bool walkthrough) {\r\n\tif (!canSee(creature)) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ad7370d48f640a39", - "equalIndicator/v1": "975e912b340a3fdf9cf8c7e3f80a6f5eff374c6e6e87690c0f94341f8f7baef8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'getReceiver' is within a recursive call chain", - "markdown": "Function 'getReceiver' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/mailbox/mailbox.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 119, - "startColumn": 15, - "charOffset": 4018, - "charLength": 11, - "snippet": { - "text": "getReceiver" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 117, - "startColumn": 1, - "charOffset": 3999, - "charLength": 168, - "snippet": { - "text": "}\r\n\r\nbool Mailbox::getReceiver(std::shared_ptr item, std::string &name) const {\r\n\tstd::shared_ptr container = item->getContainer();\r\n\tif (container) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "387e1ddb03e96bba", - "equalIndicator/v1": "976887b2c07cad1ac549c02bac34e5abfe5d90be3a8932218f421d4c988eae32" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolstatus.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 58, - "startColumn": 4, - "charOffset": 1870, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 56, - "startColumn": 1, - "charOffset": 1817, - "charLength": 247, - "snippet": { - "text": "\t\t// Another ServerInfo protocol\r\n\t\tcase 0x01: {\r\n\t\t\tuint16_t requestedInfo = msg.get(); // only a Byte is necessary, though we could add new info here\r\n\t\t\tstd::string characterName;\r\n\t\t\tif (requestedInfo & REQUEST_PLAYER_STATUS_INFO) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "aeee02219cbdfecc", - "equalIndicator/v1": "976dd4dad03f9b3b867606f6725e776e5182e7e0df665f04621ae8a1fe842c27" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 554, - "startColumn": 7, - "charOffset": 21101, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 552, - "startColumn": 1, - "charOffset": 20996, - "charLength": 243, - "snippet": { - "text": "\r\nvoid EventCallback::playerOnChangeZone(std::shared_ptr player, ZoneType_t zone) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnChangeZone - \"\r\n\t\t \"Player {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "19d6bbafef7ec7b9", - "equalIndicator/v1": "978e78e7df0b487dc403b5fdc7b68ea1f30164753ff4d17491f95e25cc3c252d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'instant' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'instant' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 117, - "startColumn": 74, - "charOffset": 3714, - "charLength": 7, - "snippet": { - "text": "instant" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 115, - "startColumn": 1, - "charOffset": 3636, - "charLength": 177, - "snippet": { - "text": "}\r\n\r\nbool Spells::registerInstantLuaEvent(const std::shared_ptr instant) {\r\n\tif (instant) {\r\n\t\t// If the spell not have the \"spell:words()\" return a error message\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "588049dc50d28306", - "equalIndicator/v1": "97a4b7494737ce3c73825da4b2878197d644e9f3482ee24195f11dc457c764e6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'sscanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead", - "markdown": "'sscanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/scheduling/events_scheduler.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 43, - "startColumn": 3, - "charOffset": 1638, - "charLength": 6, - "snippet": { - "text": "sscanf" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 41, - "startColumn": 1, - "charOffset": 1509, - "charLength": 360, - "snippet": { - "text": "\t\tint16_t endDay;\r\n\t\tsscanf(eventNode.attribute(\"startdate\").as_string(), \"%hd/%hd/%hd\", &startMonth, &startDay, &startYear);\r\n\t\tsscanf(eventNode.attribute(\"enddate\").as_string(), \"%hd/%hd/%hd\", &endMonth, &endDay, &endYear);\r\n\t\tint startDays = ((startYear * 365) + (startMonth * 30) + startDay);\r\n\t\tint endDays = ((endYear * 365) + (endMonth * 30) + endDay);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7e0ada696dcfd259", - "equalIndicator/v1": "97cb5b6ccbb1f55ada79b26a67b62c50573ee09dac6e322dcad1951b78587044" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'message' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'message' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 249, - "startColumn": 27, - "charOffset": 9309, - "charLength": 17, - "snippet": { - "text": "const std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 247, - "startColumn": 1, - "charOffset": 9225, - "charLength": 145, - "snippet": { - "text": "\r\n\tvoid openImbuementWindow(std::shared_ptr item);\r\n\tvoid sendImbuementResult(const std::string message);\r\n\tvoid closeImbuementWindow();\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "24beabd82db05fd1", - "equalIndicator/v1": "981024ddf97b0da2eca468b0d9c58a47d98196a5643dd90398e7c01cfe6233d6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7171, - "startColumn": 43, - "charOffset": 250045, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7169, - "startColumn": 1, - "charOffset": 249899, - "charLength": 257, - "snippet": { - "text": "\r\n\t\tif (target->hasCondition(CONDITION_MANASHIELD) && damage.primary.type != COMBAT_UNDEFINEDDAMAGE) {\r\n\t\t\tint32_t manaDamage = std::min(target->getMana(), healthChange);\r\n\t\t\tuint32_t manaShield = target->getManaShield();\r\n\t\t\tif (manaShield > 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "419d2d631d4e3cf1", - "equalIndicator/v1": "9825929ad3e2e687e667cce89ad2443f4f16a7abf0affc77c5eec858161022ef" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/lua_functions_loader.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 328, - "startColumn": 102, - "charOffset": 9835, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 326, - "startColumn": 1, - "charOffset": 9729, - "charLength": 178, - "snippet": { - "text": "}\r\n\r\nvoid LuaFunctionsLoader::setCreatureMetatable(lua_State* L, int32_t index, std::shared_ptr creature) {\r\n\tif (validateDispatcherContext(__FUNCTION__)) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "16136a196037cab6", - "equalIndicator/v1": "982a9a9593443ac7b5917fe25464571b4d8261d7433d2b90781d8d8f4e913f4e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 102, - "startColumn": 89, - "charOffset": 3497, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 100, - "startColumn": 1, - "charOffset": 3403, - "charLength": 147, - "snippet": { - "text": "\t}\r\n\r\n\tbool playerCanUseItemOnHouseTile(std::shared_ptr player, std::shared_ptr item) {\r\n\t\tif (!player || !item) {\r\n\t\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6e9329886e69be45", - "equalIndicator/v1": "982dd4a086a61750f3be11ae7c7f9078d6b316a581555ccbdbb22ebf02fc49ec" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 562, - "startColumn": 41, - "charOffset": 21421, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 560, - "startColumn": 1, - "charOffset": 21375, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "95a1aee27e8d7e32", - "equalIndicator/v1": "98542ffdd9492390c237c90c75fcca0922edebc8cc26842a2ba9ffe0ffd5c4c4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Switch has 3 consecutive identical branches", - "markdown": "Switch has 3 consecutive identical branches" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4405, - "startColumn": 4, - "charOffset": 139387, - "charLength": 4, - "snippet": { - "text": "case" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4403, - "startColumn": 1, - "charOffset": 139366, - "charLength": 100, - "snippet": { - "text": "\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase MESSAGE_BOOSTED_CREATURE: {\r\n\t\t\t\tinternalType = MESSAGE_LOOT;\r\n\t\t\t\tbreak;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cdee605150133b93", - "equalIndicator/v1": "98590e3d2db5b196aa7fcc8d557945e9381bf6ff77be530355e57ef27569b184" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int8_t' (aka 'signed char') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1567, - "startColumn": 25, - "charOffset": 46164, - "charLength": 5, - "snippet": { - "text": "myPos" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1565, - "startColumn": 1, - "charOffset": 46050, - "charLength": 402, - "snippet": { - "text": "\r\n\t// negative offset means that the action taken place is on a lower floor than ourself\r\n\tconst int8_t offsetz = myPos.getZ() - z;\r\n\treturn (x >= myPos.getX() - MAP_MAX_CLIENT_VIEW_PORT_X + offsetz) && (x <= myPos.getX() + (MAP_MAX_CLIENT_VIEW_PORT_X + 1) + offsetz) && (y >= myPos.getY() - MAP_MAX_CLIENT_VIEW_PORT_Y + offsetz) && (y <= myPos.getY() + (MAP_MAX_CLIENT_VIEW_PORT_Y + 1) + offsetz);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3fddda0e5cd00b7d", - "equalIndicator/v1": "987bd80e975642c11c0528a414502408cd9ea86e8df92d22acf2d5f6e9dbca21" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Return type 'const std::shared_ptr' (aka 'const shared_ptr, allocator>>') is 'const'-qualified at the top level, which may reduce code readability without improving const correctness", - "markdown": "Return type 'const std::shared_ptr' (aka 'const shared_ptr, allocator\\>\\>') is 'const'-qualified at the top level, which may reduce code readability without improving const correctness" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/attribute.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 119, - "startColumn": 2, - "charOffset": 3508, - "charLength": 34, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 117, - "startColumn": 1, - "charOffset": 3501, - "charLength": 190, - "snippet": { - "text": "\t}\r\n\r\n\tconst std::shared_ptr getString() const {\r\n\t\tif (std::holds_alternative>(value)) {\r\n\t\t\treturn std::get>(value);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "162657424ddc51ad", - "equalIndicator/v1": "989766816e9ac0a9d25752fc19d1a24b60eace5e3a44d46658fbbc41a74ec43d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2833, - "startColumn": 38, - "charOffset": 84614, - "charLength": 9, - "snippet": { - "text": "healthMax" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2831, - "startColumn": 1, - "charOffset": 84493, - "charLength": 302, - "snippet": { - "text": "\t\t\twhile (level > 1 && experience < Player::getExpForLevel(level)) {\r\n\t\t\t\t--level;\r\n\t\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\r\n\t\t\t\tmanaMax = std::max(0, manaMax - vocation->getManaGain());\r\n\t\t\t\tcapacity = std::max(0, capacity - vocation->getCapGain());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c4a8ded26d1f3ebf", - "equalIndicator/v1": "98c63205eace5c1b502d5be7fc16d4fb6fa863d21601768f396c574b28ab855c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 314, - "startColumn": 6, - "charOffset": 11703, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 312, - "startColumn": 1, - "charOffset": 11670, - "charLength": 176, - "snippet": { - "text": "\tlua_pushnumber(L, exp);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b2ef5744429ff2ab", - "equalIndicator/v1": "98d11d22fce499dc088200978871e9575d961d662f7ac3e58797c695320dd253" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 511, - "startColumn": 35, - "charOffset": 16794, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 509, - "startColumn": 1, - "charOffset": 16730, - "charLength": 125, - "snippet": { - "text": "\t\treturn targetCreature;\r\n\t}\r\n\treturn g_game().internalGetThing(player, toPosition, toStackPos, 0, STACKPOS_USETARGET);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cf08c40c4bf0fc8a", - "equalIndicator/v1": "98de186dd967c37b0a5b3d48e2d28c55ad953385db1e0787f098f19e97d07587" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'newHouseName' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'newHouseName' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 129, - "startColumn": 21, - "charOffset": 3653, - "charLength": 12, - "snippet": { - "text": "newHouseName" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 127, - "startColumn": 1, - "charOffset": 3588, - "charLength": 122, - "snippet": { - "text": "\r\n\tvoid setName(std::string newHouseName) {\r\n\t\tthis->houseName = newHouseName;\r\n\t}\r\n\tconst std::string &getName() const {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ebe02faa2698c791", - "equalIndicator/v1": "99020cc772d31bd384c6f78c69fafbd5e843834ffa41784c9068ec0ddb195abe" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6401, - "startColumn": 67, - "charOffset": 221140, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6399, - "startColumn": 1, - "charOffset": 221069, - "charLength": 185, - "snippet": { - "text": "}\r\n\r\nvoid Game::internalCreatureChangeOutfit(std::shared_ptr creature, const Outfit_t &outfit) {\r\n\tif (!g_events().eventCreatureOnChangeOutfit(creature, outfit)) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3d3be5317e546823", - "equalIndicator/v1": "994caf7d06bdf90e94126af3c0d99cc1980bbc6846bb40fe7f0265601ce4852b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/vocations/vocation.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 68, - "startColumn": 10, - "charOffset": 1693, - "charLength": 15, - "snippet": { - "text": "gainHealthTicks" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 66, - "startColumn": 1, - "charOffset": 1642, - "charLength": 142, - "snippet": { - "text": "\r\n\tuint32_t getHealthGainTicks() const {\r\n\t\treturn gainHealthTicks / g_configManager().getFloat(RATE_HEALTH_REGEN_SPEED, __FUNCTION__);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c601fed17e1b9925", - "equalIndicator/v1": "995bd35051f280fc4d4a20a091909165b6a4a7ed1f566b871f89e6748f9a7136" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1664, - "startColumn": 99, - "charOffset": 58374, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1662, - "startColumn": 1, - "charOffset": 58210, - "charLength": 264, - "snippet": { - "text": "//**********************************************************//\r\n\r\nvoid TargetCallback::onTargetCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\t// onTargetCombat(creature, target)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2dd94d8c3859f24b", - "equalIndicator/v1": "996993538a3e6907be09a610f0c50945e54871994f7736d3f4967125d1071ee2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Pass by value and use std::move", - "markdown": "Pass by value and use std::move" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/custom_attribute.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 28, - "startColumn": 34, - "charOffset": 1016, - "charLength": 17, - "snippet": { - "text": "const std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 26, - "startColumn": 1, - "charOffset": 953, - "charLength": 185, - "snippet": { - "text": "}\r\n// Constructor for double\r\nCustomAttribute::CustomAttribute(const std::string &initStringKey, const double initDoubleValue) :\r\n\tstringKey(initStringKey), value(initDoubleValue) {\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "52995c5068bc32b7", - "equalIndicator/v1": "9973092ddd2646093147d3cb83c5cd048ba9bd6e0889b4da82b9f160de2bb356" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 136, - "startColumn": 14, - "charOffset": 4178, - "charLength": 11, - "snippet": { - "text": "subContItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 134, - "startColumn": 1, - "charOffset": 4060, - "charLength": 352, - "snippet": { - "text": "\t\tif (item->getContainer() != NULL) {\r\n\t\t\tauto subContainer = item->getContainer()->getStowableItems();\r\n\t\t\tfor (auto subContItem : subContainer) {\r\n\t\t\t\tstd::shared_ptr containerItem = subContItem.first;\r\n\t\t\t\ttoReturnList.push_back(std::pair, uint32_t>(containerItem, static_cast(containerItem->getItemCount())));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b6c14ac3d46f2305", - "equalIndicator/v1": "99ad4dc7d51e3bc0663052daf532d83a0ebefc7363b417f82624f90db34f1293" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Redundant string initialization", - "markdown": "Redundant string initialization" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creatures_definitions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1421, - "startColumn": 14, - "charOffset": 37474, - "charLength": 4, - "snippet": { - "text": "name" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1419, - "startColumn": 1, - "charOffset": 37441, - "charLength": 77, - "snippet": { - "text": "\r\n\tuint8_t id = 0;\r\n\tstd::string name = \"\";\r\n\tbool customizable = false;\r\n};\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ccb856fae27826ee", - "equalIndicator/v1": "99b04662c5ec6f1c6280d8cf6941b7d0b9b80023dff2cd921aa7e0164d019251" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'corpse' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1062, - "startColumn": 102, - "charOffset": 40442, - "charLength": 6, - "snippet": { - "text": "corpse" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1060, - "startColumn": 1, - "charOffset": 40336, - "charLength": 234, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::monsterPostDropLoot(std::shared_ptr monster, std::shared_ptr corpse) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::monsterPostDropLoot - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ce78250f07315edc", - "equalIndicator/v1": "99d0ac7a7b4dfbf664bc2c12d92847da482477b1283f957dc54652459b8f735f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 493, - "startColumn": 7, - "charOffset": 18685, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 491, - "startColumn": 1, - "charOffset": 18673, - "charLength": 208, - "snippet": { - "text": "\t}\r\n\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Action::executeUse - Player {}, on item {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2f9bebe28fefb0ef", - "equalIndicator/v1": "99d4642b10a3547896c3513f31768512312f4ec468119fde2fbc273d3543cc8c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')", - "markdown": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/vocations/vocation.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 64, - "startColumn": 10, - "charOffset": 1561, - "charLength": 14, - "snippet": { - "text": "gainManaAmount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 62, - "startColumn": 1, - "charOffset": 1511, - "charLength": 132, - "snippet": { - "text": "\r\n\tuint32_t getManaGainAmount() const {\r\n\t\treturn gainManaAmount * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2211595e285600f2", - "equalIndicator/v1": "9a043555cfce9b51d7d0a583036dd394debd2eb445159cbf472e6eba1914aae2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 156, - "startColumn": 9, - "charOffset": 5029, - "charLength": 13, - "snippet": { - "text": "getFirstIndex" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 154, - "startColumn": 1, - "charOffset": 4943, - "charLength": 259, - "snippet": { - "text": "\r\n\tint32_t getThingIndex(std::shared_ptr thing) const override final;\r\n\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "eeae3cb15d76afd0", - "equalIndicator/v1": "9a0f3fd89117c2edeb28cf656153d7e97dba67df44e49afb8f35cd1cf6f70a1b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6512, - "startColumn": 15, - "charOffset": 205141, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6510, - "startColumn": 1, - "charOffset": 205056, - "charLength": 123, - "snippet": { - "text": "\tmsg.addPosition(pos);\r\n\tmsg.addByte(static_cast(stackpos));\r\n\tAddItem(msg, item);\r\n\twriteToOutputBuffer(msg);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8057e3925303a658", - "equalIndicator/v1": "9a146fc22ae55700fd12205e0edef0ce18b0fe2caef05320b472661c9c84b634" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'internalAddItem' is within a recursive call chain", - "markdown": "Function 'internalAddItem' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2202, - "startColumn": 19, - "charOffset": 84180, - "charLength": 15, - "snippet": { - "text": "internalAddItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2200, - "startColumn": 1, - "charOffset": 84157, - "charLength": 258, - "snippet": { - "text": "}\r\n\r\nReturnValue Game::internalAddItem(std::shared_ptr toCylinder, std::shared_ptr item, int32_t index, uint32_t flags, bool test, uint32_t &remainderCount) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (toCylinder == nullptr) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "66430a7f71d75ba0", - "equalIndicator/v1": "9a4906666fb48610c39f4e6ca0abff3ef6cf2fdd496c07372b290924a5956ce7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/decay/decay.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 22, - "startColumn": 46, - "charOffset": 648, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 20, - "startColumn": 1, - "charOffset": 598, - "charLength": 84, - "snippet": { - "text": "}\r\n\r\nvoid Decay::startDecay(std::shared_ptr item) {\r\n\tif (!item) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "871af2692b29bdbc", - "equalIndicator/v1": "9a511f61a9e53afa1770bee52172abd0992de84f41934e7921cd86f4f2b01a13" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'find' called with a string literal consisting of a single character; consider using the more effective overload accepting a character", - "markdown": "'find' called with a string literal consisting of a single character; consider using the more effective overload accepting a character" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/combat/spell_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 613, - "startColumn": 34, - "charOffset": 16777, - "charLength": 3, - "snippet": { - "text": "\";\"" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 611, - "startColumn": 1, - "charOffset": 16592, - "charLength": 364, - "snippet": { - "text": "\t\t\tint parameters = lua_gettop(L) - 1; // - 1 because self is a parameter aswell, which we want to skip ofc\r\n\t\t\tfor (int i = 0; i < parameters; ++i) {\r\n\t\t\t\tif (getString(L, 2 + i).find(\";\") != std::string::npos) {\r\n\t\t\t\t\tstd::vector vocList = explodeString(getString(L, 2 + i), \";\");\r\n\t\t\t\t\tint32_t vocationId = g_vocations().getVocationId(vocList[0]);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ef5ecd0ca84eb437", - "equalIndicator/v1": "9a57ddfc10c31a73b108656fe1b3c092f6783e6e96cd61d9419ad6e34a4353b8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Repeated branch body in conditional chain", - "markdown": "Repeated branch body in conditional chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/player_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2675, - "startColumn": 3, - "charOffset": 71872, - "charLength": 15, - "snippet": { - "text": "reportErrorFunc" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2673, - "startColumn": 1, - "charOffset": 71794, - "charLength": 153, - "snippet": { - "text": "\r\n\tif (player->getAccount()->save() != enumToValue(AccountErrors_t::Ok)) {\r\n\t\treportErrorFunc(\"failed to save account\");\r\n\t\tlua_pushnil(L);\r\n\t\treturn 1;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c84f224eda3468bc", - "equalIndicator/v1": "9a828778e2cc422f118070bd2bee2f3c06b1eeaa8e4f379b03e13dc7de26fe9f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7995, - "startColumn": 66, - "charOffset": 251437, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7993, - "startColumn": 1, - "charOffset": 251367, - "charLength": 130, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendUpdateSupplyTracker(std::shared_ptr item) {\r\n\tif (oldProtocol || !player || !item) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2c34b64b1c47cec4", - "equalIndicator/v1": "9a96cb0b04e7bd71490817f82acb201987d4ff9b6b1bc59db21185596b16cc1a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 155, - "startColumn": 30, - "charOffset": 4269, - "charLength": 29, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 153, - "startColumn": 1, - "charOffset": 4104, - "charLength": 338, - "snippet": { - "text": "\tbool registerLuaItemEvent(const std::shared_ptr action);\r\n\tbool registerLuaUniqueEvent(const std::shared_ptr action);\r\n\tbool registerLuaActionEvent(const std::shared_ptr action);\r\n\tbool registerLuaPositionEvent(const std::shared_ptr action);\r\n\tbool registerLuaEvent(const std::shared_ptr action);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5d5bf23f656e97dd", - "equalIndicator/v1": "9ab761770db41e6db95f47f9abc934969198e25c03cc681ef68ef84d18da403d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The 'empty' method should be used to check for emptiness instead of 'size'", - "markdown": "The 'empty' method should be used to check for emptiness instead of 'size'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/combat/spell_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 616, - "startColumn": 10, - "charOffset": 16966, - "charLength": 7, - "snippet": { - "text": "vocList" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 614, - "startColumn": 1, - "charOffset": 16807, - "charLength": 260, - "snippet": { - "text": "\t\t\t\t\tstd::vector vocList = explodeString(getString(L, 2 + i), \";\");\r\n\t\t\t\t\tint32_t vocationId = g_vocations().getVocationId(vocList[0]);\r\n\t\t\t\t\tif (vocList.size() > 0) {\r\n\t\t\t\t\t\tif (vocList[1] == \"true\") {\r\n\t\t\t\t\t\t\tspell->addVocMap(vocationId, true);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "95af475d9ee0a916", - "equalIndicator/v1": "9aca61106ab21a87cbefc7dff4adf0f1ffee7a1c11d354a333e2249e96532d63" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Uninitialized record type: 'combatReductionArray'", - "markdown": "Uninitialized record type: 'combatReductionArray'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3930, - "startColumn": 2, - "charOffset": 117764, - "charLength": 34, - "snippet": { - "text": "std::array" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3928, - "startColumn": 1, - "charOffset": 117683, - "charLength": 236, - "snippet": { - "text": "\r\nstd::array Player::getFinalDamageReduction() const {\r\n\tstd::array combatReductionArray;\r\n\tcombatReductionArray.fill(0);\r\n\tcalculateDamageReductionFromEquipedItems(combatReductionArray);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a43ed23614926d94", - "equalIndicator/v1": "9ad9aaf33641d6e18700a650fe45358b4607d00755e4eb36973753b0b831e05b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6438, - "startColumn": 68, - "charOffset": 203252, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6436, - "startColumn": 1, - "charOffset": 203180, - "charLength": 110, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendPartyPlayerVocation(std::shared_ptr target) {\r\n\tif (!target) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e4bee5f95889999b", - "equalIndicator/v1": "9af2186c49889445c599cc44050c7cf421561c9ff600afdec64aaa8fc3bbebac" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Pass by value and use std::move", - "markdown": "Pass by value and use std::move" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/custom_attribute.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 32, - "startColumn": 34, - "charOffset": 1200, - "charLength": 17, - "snippet": { - "text": "const std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 30, - "startColumn": 1, - "charOffset": 1136, - "charLength": 180, - "snippet": { - "text": "}\r\n// Constructor for boolean\r\nCustomAttribute::CustomAttribute(const std::string &initStringKey, const bool initBoolValue) :\r\n\tstringKey(initStringKey), value(initBoolValue) {\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "94299a3cac4cc8f6", - "equalIndicator/v1": "9b003ddbe527619c3375f630c3af697967f1ac400fb70fce1886f302f7db11ee" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'currentTarget' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'currentTarget' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1511, - "startColumn": 93, - "charOffset": 52546, - "charLength": 13, - "snippet": { - "text": "currentTarget" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1509, - "startColumn": 1, - "charOffset": 52449, - "charLength": 412, - "snippet": { - "text": "}\r\n\r\nbool Combat::isValidChainTarget(std::shared_ptr caster, std::shared_ptr currentTarget, std::shared_ptr potentialTarget, const CombatParams ¶ms, bool aggressive) {\r\n\tbool canCombat = canDoCombat(caster, potentialTarget, aggressive) == RETURNVALUE_NOERROR;\r\n\tbool pick = params.chainPickerCallback ? params.chainPickerCallback->onChainCombat(caster, potentialTarget) : true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "450ea90db1ec7d99", - "equalIndicator/v1": "9b07af81d665a667271ba7654df3c0405fe208ca0bc8ac63dc513a71db5bf8b1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/raids.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 238, - "startColumn": 76, - "charOffset": 6729, - "charLength": 12, - "snippet": { - "text": "newRaidEvent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 236, - "startColumn": 1, - "charOffset": 6629, - "charLength": 286, - "snippet": { - "text": "\r\n\t\tif (newRaidEvent) {\r\n\t\t\tuint32_t ticks = static_cast(std::max(RAID_MINTICKS, newRaidEvent->getDelay() - raidEvent->getDelay()));\r\n\t\t\tnextEventEvent = g_dispatcher().scheduleEvent(\r\n\t\t\t\tticks, [this, newRaidEvent] { executeRaidEvent(newRaidEvent); }, __FUNCTION__\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a8a685cada368fdf", - "equalIndicator/v1": "9b08ea49d0cc8fc12fad195a67fab4748b2d961182563958f7582f8dc5967d3f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 167, - "startColumn": 7, - "charOffset": 5755, - "charLength": 16, - "snippet": { - "text": "internalAddThing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 165, - "startColumn": 1, - "charOffset": 5591, - "charLength": 346, - "snippet": { - "text": "\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r\n\tvoid internalAddThing(std::shared_ptr thing) override final;\r\n\tvoid internalAddThing(uint32_t index, std::shared_ptr thing) override final;\r\n\tvoid startDecaying() override;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "acfa47385c65b183", - "equalIndicator/v1": "9b0c88060e584f9aa20dc3597dbb81c4a9e9df761551522178a2fcafbc44d7ad" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1140, - "startColumn": 2, - "charOffset": 43277, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1138, - "startColumn": 1, - "charOffset": 43270, - "charLength": 52, - "snippet": { - "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4ad66bf29fe1646a", - "equalIndicator/v1": "9b112796c5648a10ac6ba63545bc27bea730c202f24b02842c756617c9ec3917" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 231, - "startColumn": 74, - "charOffset": 5950, - "charLength": 1, - "snippet": { - "text": "," - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 229, - "startColumn": 1, - "charOffset": 5865, - "charLength": 140, - "snippet": { - "text": "\r\nprivate:\r\n\tvirtual bool getSkillType(std::shared_ptr, std::shared_ptr, skills_t &, uint32_t &) const {\r\n\t\treturn false;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9e070a195533e776", - "equalIndicator/v1": "9b3620972fc60605c2b8bc93e73af2a9702150c3cf761f752753c5f8f086e587" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use range-based for loop instead", - "markdown": "Use range-based for loop instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 190, - "startColumn": 3, - "charOffset": 4917, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 188, - "startColumn": 1, - "charOffset": 4860, - "charLength": 201, - "snippet": { - "text": "\r\n\tif (const TileItemVector* items = getItemList()) {\r\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\r\n\t\t\tif ((*it)->getTrashHolder()) {\r\n\t\t\t\treturn (*it)->getTrashHolder();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "55bc51d440458823", - "equalIndicator/v1": "9b3fd57a5e6a4c60180c2863313e3bbe1ef8563abe49551ffd4efa73a6f23573" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Potential uncovered code path; add a default label", - "markdown": "Potential uncovered code path; add a default label" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2366, - "startColumn": 3, - "charOffset": 73739, - "charLength": 6, - "snippet": { - "text": "switch" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2364, - "startColumn": 1, - "charOffset": 73704, - "charLength": 99, - "snippet": { - "text": "\t\tbool shouldAddItem = false;\r\n\r\n\t\tswitch (currentLevel) {\r\n\t\t\tcase 1:\r\n\t\t\t\tshouldAddItem = false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "74d42efe426e6d51", - "equalIndicator/v1": "9b41bb97a80e9a193099c83980606928ce92647d9e9b8b0d8d81133b73370284" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'potentialTarget' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'potentialTarget' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1511, - "startColumn": 134, - "charOffset": 52587, - "charLength": 15, - "snippet": { - "text": "potentialTarget" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1509, - "startColumn": 1, - "charOffset": 52449, - "charLength": 412, - "snippet": { - "text": "}\r\n\r\nbool Combat::isValidChainTarget(std::shared_ptr caster, std::shared_ptr currentTarget, std::shared_ptr potentialTarget, const CombatParams ¶ms, bool aggressive) {\r\n\tbool canCombat = canDoCombat(caster, potentialTarget, aggressive) == RETURNVALUE_NOERROR;\r\n\tbool pick = params.chainPickerCallback ? params.chainPickerCallback->onChainCombat(caster, potentialTarget) : true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b97c9ad52871d30f", - "equalIndicator/v1": "9b4d0fd3c5276bdd91fa15e96f04370084e2eb22b7e4d96c08332f07de97e29e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1540, - "startColumn": 61, - "charOffset": 54064, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1538, - "startColumn": 1, - "charOffset": 53999, - "charLength": 200, - "snippet": { - "text": "}\r\n\r\nvoid ValueCallback::getMinMaxValues(std::shared_ptr player, CombatDamage &damage, bool useCharges) const {\r\n\t// onGetPlayerMinMaxValues(...)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e7134f456c8dc499", - "equalIndicator/v1": "9b56d31cad337b7d6d8e623c1230bef1da3838a25b568d5988233cbb3f80fee3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 77, - "startColumn": 8, - "charOffset": 2042, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 75, - "startColumn": 1, - "charOffset": 1948, - "charLength": 206, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeIsMovable(lua_State* L) {\r\n\t// itemType:isMovable()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->movable);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "488f8ef1dee325ed", - "equalIndicator/v1": "9b778624b5d33a38088a90cb5fbf58e0fcc536fb1f7304f2b97da3f9f2e68819" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1257, - "startColumn": 72, - "charOffset": 34822, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1255, - "startColumn": 1, - "charOffset": 34746, - "charLength": 154, - "snippet": { - "text": "}\r\n\r\nuint32_t ConditionRegeneration::getManaTicks(std::shared_ptr creature) const {\r\n\tstd::shared_ptr player = creature->getPlayer();\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "269d2678f1639218", - "equalIndicator/v1": "9bb43fb9ac4f3044beff8505de976aa6907daf9ab4cd37faa6d26a9265630b41" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Return type 'const Outfit_t' is 'const'-qualified at the top level, which may reduce code readability without improving const correctness", - "markdown": "Return type 'const Outfit_t' is 'const'-qualified at the top level, which may reduce code readability without improving const correctness" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 281, - "startColumn": 2, - "charOffset": 6941, - "charLength": 14, - "snippet": { - "text": "const Outfit_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 279, - "startColumn": 1, - "charOffset": 6909, - "charLength": 103, - "snippet": { - "text": "\t\tcurrentOutfit = outfit;\r\n\t}\r\n\tconst Outfit_t getDefaultOutfit() const {\r\n\t\treturn defaultOutfit;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "aca6d32514942180", - "equalIndicator/v1": "9be936d2f4e0ef94829b2ea5059cd7107dda75445fa6e058482ab88da00fb5d4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::list>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::list\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/guild_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 58, - "startColumn": 21, - "charOffset": 1527, - "charLength": 7, - "snippet": { - "text": "members" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 56, - "startColumn": 1, - "charOffset": 1455, - "charLength": 111, - "snippet": { - "text": "\r\n\tconst auto members = guild->getMembersOnline();\r\n\tlua_createtable(L, members.size(), 0);\r\n\r\n\tint index = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c81142678a65f0e6", - "equalIndicator/v1": "9bf2267415e07a13467a131d08a7fb565d71bc27c24beb6b4fc863833ec83e98" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/player_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 681, - "startColumn": 4, - "charOffset": 18732, - "charLength": 4, - "snippet": { - "text": "else" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 679, - "startColumn": 1, - "charOffset": 18659, - "charLength": 110, - "snippet": { - "text": "\t\tpushUserdata(L, reward);\r\n\t\tsetItemMetatable(L, -1, reward);\r\n\t} else {\r\n\t\tpushBoolean(L, false);\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f092d1e48cc1c884", - "equalIndicator/v1": "9c3677bc949ebb22f97bf1d671a3d51224208aeadf679005e52bc98b80ff5094" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 616, - "startColumn": 131, - "charOffset": 18789, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 614, - "startColumn": 1, - "charOffset": 18654, - "charLength": 257, - "snippet": { - "text": "}\r\n\r\nuint32_t MoveEvent::DeEquipItem(const std::shared_ptr MoveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool) {\r\n\tif (player == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8ecd626ad1fcf6a5", - "equalIndicator/v1": "9c471621c1435e29d44345bb84294302d92d4b792fc5671164a98a94976fe738" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 311, - "startColumn": 14, - "charOffset": 9694, - "charLength": 14, - "snippet": { - "text": "getDescription" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 309, - "startColumn": 1, - "charOffset": 9579, - "charLength": 248, - "snippet": { - "text": "\tstatic std::string getWeightDescription(const ItemType &it, uint32_t weight, uint32_t count = 1);\r\n\r\n\tstd::string getDescription(int32_t lookDistance) override final;\r\n\tstd::string getNameDescription();\r\n\tstd::string getWeightDescription() const;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f9f30454e7c94b04", - "equalIndicator/v1": "9c5b3d72ddf6f74a0c2d84ce6d3bec6ca5377bcf23cb07c8dd6e6fafd86eba15" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Replace loop by 'std::ranges::all_of()'", - "markdown": "Replace loop by 'std::ranges::all_of()'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/creatureevent.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 59, - "startColumn": 2, - "charOffset": 1873, - "charLength": 37, - "snippet": { - "text": "// fire global event if is registered" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 57, - "startColumn": 1, - "charOffset": 1796, - "charLength": 217, - "snippet": { - "text": "\r\nbool CreatureEvents::playerLogin(std::shared_ptr player) const {\r\n\t// fire global event if is registered\r\n\tfor (const auto &it : creatureEvents) {\r\n\t\tif (it.second->getEventType() == CREATURE_EVENT_LOGIN) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "55ff26bb68dabc45", - "equalIndicator/v1": "9c726a101bb7708dd12c81175cc00d7030dacb0accfbebc104c0f820444141a0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 551, - "startColumn": 13, - "charOffset": 25814, - "charLength": 11, - "snippet": { - "text": "stringValue" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 549, - "startColumn": 1, - "charOffset": 25614, - "charLength": 382, - "snippet": { - "text": "\t} else if (stringValue == \"fieldabsorbpercentfire\") {\r\n\t\titemType.getAbilities().fieldAbsorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"fieldabsorbpercentpoison\") {\r\n\t\titemType.getAbilities().fieldAbsorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "15812fe7e855b9d9", - "equalIndicator/v1": "9c8c397a0c1f4fad56afd6fd5b19716ae9b3b4c2c9c46cb7e8d31c330105bdd4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/scripts/script_environment.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 148, - "startColumn": 62, - "charOffset": 3820, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 146, - "startColumn": 1, - "charOffset": 3754, - "charLength": 181, - "snippet": { - "text": "}\r\n\r\nvoid ScriptEnvironment::removeTempItem(std::shared_ptr item) {\r\n\tfor (auto it = tempItems.begin(), end = tempItems.end(); it != end; ++it) {\r\n\t\tif (it->second == item) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d344fd9ec0b3711a", - "equalIndicator/v1": "9ca9acee81f110752ca6f7ef5756926a5711443aa4bc3d18aefa3870bd12a774" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 705, - "startColumn": 65, - "charOffset": 22916, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 703, - "startColumn": 1, - "charOffset": 22847, - "charLength": 128, - "snippet": { - "text": "}\r\n\r\nbool Combat::checkFearConditionAffected(std::shared_ptr player) {\r\n\tif (player->isImmuneFear()) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c1f73b12f9c33593", - "equalIndicator/v1": "9cc3f131136d91f45755cc62672ffcdf3967c5eb62ace381968a55e390e40083" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1369, - "startColumn": 89, - "charOffset": 46940, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1367, - "startColumn": 1, - "charOffset": 46847, - "charLength": 298, - "snippet": { - "text": "}\r\n\r\nvoid Combat::doCombatDispel(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms) {\r\n\tbool canCombat = !params.aggressive || (caster != target && Combat::canDoCombat(caster, target, params.aggressive) == RETURNVALUE_NOERROR);\r\n\tif ((caster && target)\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "50a0e0ea30f3b3a9", - "equalIndicator/v1": "9cc6d7ca2e701f662ea84dc51ec477f0e44e684988bbcaed358ff5d126750b61" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 862, - "startColumn": 16, - "charOffset": 28038, - "charLength": 12, - "snippet": { - "text": "changeHealth" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 860, - "startColumn": 1, - "charOffset": 28018, - "charLength": 124, - "snippet": { - "text": "}\r\n\r\nvoid Creature::changeHealth(int32_t healthChange, bool sendHealthChange /* = true*/) {\r\n\tint32_t oldHealth = health;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a0f5545e05301d7b", - "equalIndicator/v1": "9ccffd4077e0935f8f98207452f33612b56929b5ce0cee1cb0701deabb779fcb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/npcs/npc.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 67, - "startColumn": 46, - "charOffset": 2035, - "charLength": 5, - "snippet": { - "text": "range" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 65, - "startColumn": 1, - "charOffset": 1969, - "charLength": 86, - "snippet": { - "text": "\t\treturn false;\r\n\t}\r\n\treturn Creature::canSee(getPosition(), pos, range, range);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1e2620b523bb424b", - "equalIndicator/v1": "9d3bfe1d69fcb101e7fbfe3a0683c846608fa5e7e328c3be54f7577d61471690" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned int' to 'float'", - "markdown": "Narrowing conversion from 'unsigned int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 722, - "startColumn": 37, - "charOffset": 23485, - "charLength": 18, - "snippet": { - "text": "std::min" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 720, - "startColumn": 1, - "charOffset": 23423, - "charLength": 132, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 87) * 1.20f) - 4;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bb5fd591fbc95f89", - "equalIndicator/v1": "9d5d69567b89187afa669d0a1e89fa800af90a9e1acfa2f8f588f6f735bd623f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1860, - "startColumn": 26, - "charOffset": 54684, - "charLength": 12, - "snippet": { - "text": "std::tolower" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1858, - "startColumn": 1, - "charOffset": 54653, - "charLength": 276, - "snippet": { - "text": "\t}\r\n\r\n\tconst char &character = std::tolower(modifiedValue.front());\r\n\tauto article = character == 'a' || character == 'e' || character == 'i' || character == 'o' || character == 'u' ? \"an\" : \"a\";\r\n\treturn fmt::format(\"{}{} {}.\", withSpace ? \" \" : \"\", article, modifiedValue);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3edbc5f6996818c1", - "equalIndicator/v1": "9d5e5b460f29244fbf1e00363d9556faa4ec7bc7dd5a0b9b8871c8a1f2faf937" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1392, - "startColumn": 32, - "charOffset": 41866, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1390, - "startColumn": 1, - "charOffset": 41730, - "charLength": 167, - "snippet": { - "text": "\tvoid sendPartyPlayerMana(std::shared_ptr player, uint8_t manaPercent) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPartyPlayerMana(player, manaPercent);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "19c583a076c8a95d", - "equalIndicator/v1": "9d6b64206d413dfa93d25fcdaa25edc29f0a64d66e50d8c2bbd5fec648a47563" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 645, - "startColumn": 76, - "charOffset": 17400, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 643, - "startColumn": 1, - "charOffset": 17320, - "charLength": 197, - "snippet": { - "text": "}\r\n\r\nvoid ConditionAttributes::updatePercentIncreases(std::shared_ptr creature) {\r\n\tfor (uint8_t i = 0; i < COMBAT_COUNT; i++) {\r\n\t\tauto increasePercentValue = getIncreasePercentById(i);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2e49f37f96b73e1e", - "equalIndicator/v1": "9db0d1d71260c34f2510a695c25ef2db95a7244e2377947b008d67dbe3028130" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3117, - "startColumn": 47, - "charOffset": 116134, - "charLength": 5, - "snippet": { - "text": "money" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3115, - "startColumn": 1, - "charOffset": 116020, - "charLength": 219, - "snippet": { - "text": "\t\t\t}\r\n\t\t\tplayer->setBankBalance(player->getBankBalance() + money);\r\n\t\t\tg_metrics().addCounter(\"balance_increase\", money, { { \"player\", player->getName() }, { \"context\", \"loot\" } });\r\n\t\t\treturn RETURNVALUE_NOERROR;\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b26246bb272a67e0", - "equalIndicator/v1": "9dc0e047b4f9e77e1032f08350f5d795249564b9792702bf8e07eb71c6813f7b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 581, - "startColumn": 63, - "charOffset": 15678, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 579, - "startColumn": 1, - "charOffset": 15611, - "charLength": 106, - "snippet": { - "text": "}\r\n\r\nvoid ConditionAttributes::updateStats(std::shared_ptr player) {\r\n\tbool needUpdate = false;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "859a2fd4747960a3", - "equalIndicator/v1": "9dc84619f0d87f0898795ee579a3abc27ce0b35f1ecef40da5309f04850b9b62" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use range-based for loop instead", - "markdown": "Use range-based for loop instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1405, - "startColumn": 3, - "charOffset": 41849, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1403, - "startColumn": 1, - "charOffset": 41799, - "charLength": 210, - "snippet": { - "text": "\tif (creatures) {\r\n\t\tbool playerAdded = false;\r\n\t\tfor (auto it = creatures->rbegin(); it != creatures->rend(); ++it) {\r\n\t\t\tstd::shared_ptr creature = *it;\r\n\t\t\tif (!player->canSeeCreature(creature)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "23ec1024c534fea4", - "equalIndicator/v1": "9de8d2d6d98ebd41d31a9eb480ca3f6e2ce90a3e05aaabcd0c83b51678b6b516" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/player_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1305, - "startColumn": 8, - "charOffset": 44960, - "charLength": 19, - "snippet": { - "text": "auto [townid, town]" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1303, - "startColumn": 1, - "charOffset": 44811, - "charLength": 309, - "snippet": { - "text": "\t// Check if is in the temple range (we assume the temple is within the range of 10 sqms)\r\n\tif (m_player.getZoneType() == ZONE_PROTECTION) {\r\n\t\tfor (auto [townid, town] : g_game().map.towns.getTowns()) {\r\n\t\t\tif (Position::areInRange<1, 10>(town->getTemplePosition(), m_player.getPosition())) {\r\n\t\t\t\treturn 1;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "40dbc7e9328c7a12", - "equalIndicator/v1": "9def61a375008c43524dabc91c8f55c3f0c99a7bcd794f5c9d2e4b68c2a293f2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1037, - "startColumn": 30, - "charOffset": 30025, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1035, - "startColumn": 1, - "charOffset": 29910, - "charLength": 135, - "snippet": { - "text": "\tvoid sendCreatureSkull(std::shared_ptr creature) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureSkull(creature);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cef42669a91863bc", - "equalIndicator/v1": "9e1ab49d5fb61d3fb4c11366d997ae5f4f113cf6ff09916f2595c8c0db264a29" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7593, - "startColumn": 67, - "charOffset": 265050, - "charLength": 13, - "snippet": { - "text": "targetMonster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7591, - "startColumn": 1, - "charOffset": 264941, - "charLength": 282, - "snippet": { - "text": "// Life leech\r\nvoid Game::applyLifeLeech(\r\n\tstd::shared_ptr attackerPlayer, std::shared_ptr targetMonster, std::shared_ptr target, const CombatDamage &damage, const int32_t &realDamage\r\n) const {\r\n\t// Wheel of destiny bonus - life leech chance and amount\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9dc0e6a8f612aa5d", - "equalIndicator/v1": "9e4506b3fad52add9a96ccbbbe5a67c2b98d5c2f73456f7b19c8430d55198418" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1215, - "startColumn": 66, - "charOffset": 46326, - "charLength": 4, - "snippet": { - "text": "zone" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1213, - "startColumn": 1, - "charOffset": 46256, - "charLength": 235, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::zoneAfterCreatureLeave(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneAfterCreatureLeave - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cb7096e65b4f88d7", - "equalIndicator/v1": "9e497669d29412226a054d992bdf292e5eb2d1314319bcaa2651281f7cce0213" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2042, - "startColumn": 59, - "charOffset": 59023, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2040, - "startColumn": 1, - "charOffset": 58960, - "charLength": 100, - "snippet": { - "text": "}\r\n\r\nstd::string Item::parseShowDuration(std::shared_ptr item) {\r\n\tif (!item) {\r\n\t\treturn {};\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "29adf78fd3176426", - "equalIndicator/v1": "9e4a4a2f2299168e19dea11285b5debe67bb63e9cd07100c4c6d96e3e7358c3d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 774, - "startColumn": 68, - "charOffset": 29732, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 772, - "startColumn": 1, - "charOffset": 29660, - "charLength": 218, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::playerOnLoseExperience(std::shared_ptr player, uint64_t &exp) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLoseExperience - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8948d856fc39a42e", - "equalIndicator/v1": "9e5153ea144899392645b311a6dfbcf0b1573bf5b25aeb946c0024eeb7a912ae" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2027, - "startColumn": 127, - "charOffset": 60119, - "charLength": 7, - "snippet": { - "text": "newItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2025, - "startColumn": 1, - "charOffset": 59988, - "charLength": 216, - "snippet": { - "text": "}\r\n\r\nvoid Player::onUpdateContainerItem(std::shared_ptr container, std::shared_ptr oldItem, std::shared_ptr newItem) {\r\n\tif (oldItem != newItem) {\r\n\t\tonRemoveContainerItem(container, oldItem);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "30e40ab411cb8896", - "equalIndicator/v1": "9e5284d7d8adcdf2653cdef501d2b2f900d19001482a2848728a28b6f8763e05" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'depotLocker' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'depotLocker' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6967, - "startColumn": 57, - "charOffset": 205819, - "charLength": 11, - "snippet": { - "text": "depotLocker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6965, - "startColumn": 1, - "charOffset": 205665, - "charLength": 317, - "snippet": { - "text": "\r\nstd::pair>, std::map>>\r\nPlayer::requestLockerItems(std::shared_ptr depotLocker, bool sendToClient /*= false*/, uint8_t tier /*= 0*/) const {\r\n\tif (!depotLocker) {\r\n\t\tg_logger().error(\"{} - Depot locker is nullptr\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "73d8289a0ebb4b54", - "equalIndicator/v1": "9e89c6d94dfe0685e604d14e3e63812d1adadd4591e0f1f9c1c5594f79b120d2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3740, - "startColumn": 56, - "charOffset": 112147, - "charLength": 13, - "snippet": { - "text": "stashIterator" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3738, - "startColumn": 1, - "charOffset": 111987, - "charLength": 304, - "snippet": { - "text": "\tfor (const auto &stashIterator : itemDict) {\r\n\t\tuint16_t iteratorCID = (stashIterator.first)->getID();\r\n\t\tif (g_game().internalRemoveItem(stashIterator.first, stashIterator.second) == RETURNVALUE_NOERROR) {\r\n\t\t\taddItemOnStash(iteratorCID, stashIterator.second);\r\n\t\t\ttotalStowed += stashIterator.second;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "75f998a1c51b6f93", - "equalIndicator/v1": "9e93c792aac3e4e6b456ed1c4f24b83968c5fafe7370a54f5a875246b36ca9c0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/mailbox/mailbox.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 74, - "startColumn": 46, - "charOffset": 2432, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 72, - "startColumn": 1, - "charOffset": 2382, - "charLength": 126, - "snippet": { - "text": "}\r\n\r\nbool Mailbox::sendItem(std::shared_ptr item) const {\r\n\tstd::string receiver;\r\n\tif (!getReceiver(item, receiver)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a1ebcc4aba1adce7", - "equalIndicator/v1": "9ea05d30f959c7c207c24534c253db4fcec5b7cfa3a10ba7a938b4bd5518fa41" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 853, - "startColumn": 58, - "charOffset": 24612, - "charLength": 9, - "snippet": { - "text": "container" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 851, - "startColumn": 1, - "charOffset": 24550, - "charLength": 166, - "snippet": { - "text": "}\r\n\r\nint8_t Player::getContainerID(std::shared_ptr container) const {\r\n\tfor (const auto &it : openContainers) {\r\n\t\tif (it.second.container == container) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1762e7559b857a5d", - "equalIndicator/v1": "9ec11a3e78ee86ad29cc95fe376489cfd5407539bf4e355137caf04626bc4fb0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 536, - "startColumn": 2, - "charOffset": 19031, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 534, - "startColumn": 1, - "charOffset": 19024, - "charLength": 46, - "snippet": { - "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6f228a0a531d9308", - "equalIndicator/v1": "9ec9694dbfe8ae262e070435198b5376bb1be542f94b2bc5d1f256e8492a5b00" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 162, - "startColumn": 25, - "charOffset": 4916, - "charLength": 10, - "snippet": { - "text": "realDamage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 160, - "startColumn": 1, - "charOffset": 4860, - "charLength": 180, - "snippet": { - "text": "\r\n\t// Setting damage to combat\r\n\tcombat.primary.value = realDamage * weaponAttackProportion;\r\n\tcombat.secondary.value = realDamage * (1 - weaponAttackProportion);\r\n\treturn combat;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "609a43040a83bbf1", - "equalIndicator/v1": "9ecc37efaa1a82ebd28b51611c178e881e3931f1ace9993851ba4086f8abf02f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/rewards/rewardchest.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 32, - "startColumn": 7, - "charOffset": 1197, - "charLength": 10, - "snippet": { - "text": "removeItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 30, - "startColumn": 1, - "charOffset": 1185, - "charLength": 95, - "snippet": { - "text": "\t}\r\n\r\n\tvoid removeItem(std::shared_ptr thing, bool sendToClient = false) override;\r\n};\r\n" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e467a0440896f230", - "equalIndicator/v1": "9ecd8a11164e0002d3466158aeb71d7493b2e9d83b92a166d34d5e63e0e650cd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'container' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'container' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1257, - "startColumn": 31, - "charOffset": 37189, - "charLength": 9, - "snippet": { - "text": "container" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1255, - "startColumn": 1, - "charOffset": 37031, - "charLength": 202, - "snippet": { - "text": "\tvoid sendContainer(uint8_t cid, std::shared_ptr container, bool hasParent, uint16_t firstIndex) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendContainer(cid, container, hasParent, firstIndex);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "02aceec4cca6e04a", - "equalIndicator/v1": "9eea83d94287f6a04d54d062107639183bfebb3c7fb03834534f2394011bb9bc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/grouping/party.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 421, - "startColumn": 57, - "charOffset": 11712, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 419, - "startColumn": 1, - "charOffset": 11651, - "charLength": 187, - "snippet": { - "text": "}\r\n\r\nbool Party::setSharedExperience(std::shared_ptr player, bool newSharedExpActive, bool silent /*= false*/) {\r\n\tauto leader = getLeader();\r\n\tif (!player || leader != player) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "82a2e32eb772f9a0", - "equalIndicator/v1": "9f615cc2380f558bd166f2f14116050d6cb05a549f80263436f2b41742307133" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 242, - "startColumn": 21, - "charOffset": 6892, - "charLength": 9, - "snippet": { - "text": "creatures" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 240, - "startColumn": 1, - "charOffset": 6751, - "charLength": 282, - "snippet": { - "text": "\tfor (const std::shared_ptr &tile : houseTiles) {\r\n\t\tif (CreatureVector* creatures = tile->getCreatures()) {\r\n\t\t\tfor (int32_t i = creatures->size(); --i >= 0;) {\r\n\t\t\t\tstd::shared_ptr player = (*creatures)[i]->getPlayer();\r\n\t\t\t\tif (player && !isInvited(player)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c8ea7d01a6acc4dc", - "equalIndicator/v1": "9f7ca9ad6ceff14e09fe3aec71889bf4d29e9394e6a6c044f7fadb4beb33ff20" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1386, - "startColumn": 24, - "charOffset": 38579, - "charLength": 8, - "snippet": { - "text": "soulGain" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1384, - "startColumn": 1, - "charOffset": 38486, - "charLength": 115, - "snippet": { - "text": "\t\t\tif (internalSoulTicks >= soulTicks) {\r\n\t\t\t\tinternalSoulTicks = 0;\r\n\t\t\t\tplayer->changeSoul(soulGain);\r\n\t\t\t}\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bc7c5cc5e81d1430", - "equalIndicator/v1": "9f9298ee6be1bab3dc61683f4380f2de60e101c11ac68f69d4bd38f574cdd5a5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/bed.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 261, - "startColumn": 56, - "charOffset": 7036, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 259, - "startColumn": 1, - "charOffset": 6976, - "charLength": 144, - "snippet": { - "text": "}\r\n\r\nvoid BedItem::updateAppearance(std::shared_ptr player) {\r\n\tconst ItemType &it = Item::items[id];\r\n\tif (it.type == ITEM_TYPE_BED) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3e2d47a4fa53d9f9", - "equalIndicator/v1": "9faf1a56e0062519a8d40470f096e8594c6531414188fb4637bc52d07eca8b07" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/guild_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 76, - "startColumn": 20, - "charOffset": 1953, - "charLength": 5, - "snippet": { - "text": "guild" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 74, - "startColumn": 1, - "charOffset": 1917, - "charLength": 77, - "snippet": { - "text": "\t\treturn 1;\r\n\t}\r\n\tlua_pushnumber(L, guild->getBankBalance());\r\n\treturn 1;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5138dd3a6f600284", - "equalIndicator/v1": "9fb5b3028b521bca5fde579d81f55f058e21c1fc078a0d4561b1c34289583dfd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'message' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'message' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7876, - "startColumn": 58, - "charOffset": 247671, - "charLength": 7, - "snippet": { - "text": "message" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7874, - "startColumn": 1, - "charOffset": 247609, - "charLength": 116, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendImbuementResult(const std::string message) {\r\n\tNetworkMessage msg;\r\n\tmsg.addByte(0xED);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "52bf1083e09c7bf1", - "equalIndicator/v1": "9fb8e03d96da0afbff94a4ffaf18d646b56a7a8b9c7d453e18122d5dbefa0043" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/map/tile_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 302, - "startColumn": 2, - "charOffset": 7234, - "charLength": 7, - "snippet": { - "text": "int32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 300, - "startColumn": 1, - "charOffset": 7227, - "charLength": 76, - "snippet": { - "text": "\t}\r\n\r\n\tint32_t subType = getNumber(L, 3, -1);\r\n\r\n\tuint16_t itemId;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e87acde0f79a7020", - "equalIndicator/v1": "9fc5ddc3860d87728f591561815a151f3fd876b93c851752eb443b8a91bd270a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 275, - "startColumn": 81, - "charOffset": 9146, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 273, - "startColumn": 1, - "charOffset": 9061, - "charLength": 209, - "snippet": { - "text": "}\r\n\r\nvoid Weapon::onUsedWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr destTile) const {\r\n\tif (!player->hasFlag(PlayerFlags_t::NotGainSkill)) {\r\n\t\tskills_t skillType;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dcd97edf99d1065b", - "equalIndicator/v1": "9ffcc64490ee1ddcabd303cb6df7c1c7581db6604df96e1f617daca75ede9237" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'checkImbuements' can be made const", - "markdown": "Method 'checkImbuements' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7907, - "startColumn": 12, - "charOffset": 276573, - "charLength": 15, - "snippet": { - "text": "checkImbuements" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7905, - "startColumn": 1, - "charOffset": 276557, - "charLength": 119, - "snippet": { - "text": "}\r\n\r\nvoid Game::checkImbuements() {\r\n\tfor (const auto &[mapPlayerId, mapPlayer] : getPlayers()) {\r\n\t\tif (!mapPlayer) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "667d084c5c4261fb", - "equalIndicator/v1": "a0143a86fe39f223409d999d6e165e52d57d6a7b56e592280377e4ace65c1570" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 157, - "startColumn": 43, - "charOffset": 4613, - "charLength": 27, - "snippet": { - "text": "Weapons::getMaxWeaponDamage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 155, - "startColumn": 1, - "charOffset": 4545, - "charLength": 314, - "snippet": { - "text": "\r\n\t// Calculating damage\r\n\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(level, playerSkill, totalAttack, attackFactor, true) * player->getVocation()->meleeDamageMultiplier * damageModifier / 100);\r\n\tint32_t minDamage = level / 5;\r\n\tint32_t realDamage = normal_random(minDamage, maxDamage);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "71261164c37bac35", - "equalIndicator/v1": "a02d3015366bb9a80f29bab3bbdedb6a55861724006b9bf3226d38fb670535cf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/housetile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 21, - "startColumn": 14, - "charOffset": 616, - "charLength": 8, - "snippet": { - "text": "queryAdd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 19, - "startColumn": 1, - "charOffset": 571, - "charLength": 351, - "snippet": { - "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e48a714e9089befc", - "equalIndicator/v1": "a03badd690152495f4405547978d4a0c3c83fc4101ba22c3d6f9e7378cc7403b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5276, - "startColumn": 89, - "charOffset": 156093, - "charLength": 10, - "snippet": { - "text": "experience" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5274, - "startColumn": 1, - "charOffset": 155932, - "charLength": 204, - "snippet": { - "text": "\tif (level >= 24) {\r\n\t\tdouble tmpLevel = level + (levelPercent / 100.);\r\n\t\tlossPercent = ((tmpLevel + 50) * 50 * ((tmpLevel * tmpLevel) - (5 * tmpLevel) + 8)) / experience;\r\n\t} else {\r\n\t\tlossPercent = 5;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "50ea7e3202378cb2", - "equalIndicator/v1": "a0588a17196f0dc9affcbb59e3293155f38e34e5b94e02b4c09527c1c8cdae0b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6436, - "startColumn": 57, - "charOffset": 222280, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6434, - "startColumn": 1, - "charOffset": 222219, - "charLength": 185, - "snippet": { - "text": "}\r\n\r\nvoid Game::updateCreatureIcon(std::shared_ptr creature) {\r\n\t// Send to clients\r\n\tfor (const auto &spectator : Spectators().find(creature->getPosition(), true)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7450b3734c2da82b", - "equalIndicator/v1": "a066b885068dcbdbc1ff45cee192bb976a30cb365f3bedd506c45b22843c0576" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1177, - "startColumn": 58, - "charOffset": 36505, - "charLength": 17, - "snippet": { - "text": "getLostExperience" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1175, - "startColumn": 1, - "charOffset": 36362, - "charLength": 170, - "snippet": { - "text": "\r\nuint64_t Creature::getGainedExperience(std::shared_ptr attacker) const {\r\n\treturn std::floor(getDamageRatio(std::move(attacker)) * getLostExperience());\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "88be1e29e35b061a", - "equalIndicator/v1": "a0a452993f44801a28736a2a96f3be68dc6a6e29bb2c33e735f98e237e1dd5c6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/mailbox/mailbox.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 140, - "startColumn": 45, - "charOffset": 4620, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 138, - "startColumn": 1, - "charOffset": 4571, - "charLength": 154, - "snippet": { - "text": "}\r\n\r\nbool Mailbox::canSend(std::shared_ptr item) {\r\n\treturn !item->hasOwner() && (item->getID() == ITEM_PARCEL || item->getID() == ITEM_LETTER);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "726d2b8244e1f885", - "equalIndicator/v1": "a0cc8103a7fd2032a800a2a5cb70f8be84413b5de9e13f8fce87ebc6e3e8354e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use range-based for loop instead", - "markdown": "Use range-based for loop instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 290, - "startColumn": 4, - "charOffset": 7427, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 288, - "startColumn": 1, - "charOffset": 7416, - "charLength": 151, - "snippet": { - "text": "\t\t\t}\r\n\r\n\t\t\tfor (auto it = creatures->rbegin(), end = creatures->rend(); it != end; ++it) {\r\n\t\t\t\tif (creature->canSeeCreature(*it)) {\r\n\t\t\t\t\treturn *it;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8c6b8bbb08aba993", - "equalIndicator/v1": "a0d13d2832d160b95739cef75e8bb51dac8dc7649507f40b76f986830ce08acf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructor does not initialize these fields: imbuement", - "markdown": "Constructor does not initialize these fields: imbuement" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/items_definitions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 623, - "startColumn": 8, - "charOffset": 15628, - "charLength": 13, - "snippet": { - "text": "ImbuementInfo" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 621, - "startColumn": 1, - "charOffset": 15615, - "charLength": 78, - "snippet": { - "text": "};\r\n\r\nstruct ImbuementInfo {\r\n\tImbuement* imbuement;\r\n\tuint32_t duration = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b3d904eb36bf850d", - "equalIndicator/v1": "a0f694aa096915172697ed90ea87f2ac5e1d433db041e1ef7441df53363a2b29" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 679, - "startColumn": 128, - "charOffset": 26088, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 677, - "startColumn": 1, - "charOffset": 25956, - "charLength": 259, - "snippet": { - "text": "}\r\n\r\nbool EventCallback::playerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeRequest - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6c29d322826aafdc", - "equalIndicator/v1": "a1017bc01f42191c1259305a8032ca678b84bbd6ae20f9ec4a72f98b9429274e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'toCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'toCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1836, - "startColumn": 76, - "charOffset": 71472, - "charLength": 10, - "snippet": { - "text": "toCylinder" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1834, - "startColumn": 1, - "charOffset": 71392, - "charLength": 232, - "snippet": { - "text": "}\r\n\r\nbool Game::isTryingToStow(const Position &toPos, std::shared_ptr toCylinder) const {\r\n\treturn toCylinder->getContainer() && toCylinder->getItem()->getID() == ITEM_LOCKER && toPos.getZ() == ITEM_SUPPLY_STASH_INDEX;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "102bd249dee20cc4", - "equalIndicator/v1": "a104a4f73e2fbc52a918d92bdc8af4a87fc47d8067da22d33531f64ed8c0dde6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 555, - "startColumn": 70, - "charOffset": 14921, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 553, - "startColumn": 1, - "charOffset": 14847, - "charLength": 169, - "snippet": { - "text": "}\r\n\r\nvoid ConditionAttributes::updatePercentStats(std::shared_ptr player) {\r\n\tfor (int32_t i = STAT_FIRST; i <= STAT_LAST; ++i) {\r\n\t\tif (statsPercent[i] == 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f15bbef5c338e342", - "equalIndicator/v1": "a108101febd64f3b7decd49facc5783b439f339b771e20bb70cfd443c07f5df9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6388, - "startColumn": 70, - "charOffset": 201993, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6386, - "startColumn": 1, - "charOffset": 201919, - "charLength": 182, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendPartyCreatureHealth(std::shared_ptr target, uint8_t healthPercent) {\r\n\tuint32_t cid = target->getID();\r\n\tif (!knownCreatureSet.contains(cid)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ea80a75d33f4565e", - "equalIndicator/v1": "a145768b1150bf9cc353a8f77836fb4a9869e9e096ee04def257148a683fb3b6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/grouping/party.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 668, - "startColumn": 90, - "charOffset": 20420, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 666, - "startColumn": 1, - "charOffset": 20326, - "charLength": 173, - "snippet": { - "text": "}\r\n\r\nvoid Party::updatePlayerHealth(std::shared_ptr player, std::shared_ptr target, uint8_t healthPercent) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2b826ec9cff8c95a", - "equalIndicator/v1": "a14f1385c93b28951dae307e56a7a494e0a46f6951a341ac5f50d5ad4425de0f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to 'float'", - "markdown": "Narrowing conversion from 'int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 660, - "startColumn": 124, - "charOffset": 20186, - "charLength": 37, - "snippet": { - "text": "(it.abilities->statsPercent[s] - 100)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 658, - "startColumn": 1, - "charOffset": 19967, - "charLength": 280, - "snippet": { - "text": "\t\tfor (int32_t s = STAT_FIRST; s <= STAT_LAST; ++s) {\r\n\t\t\tif (it.abilities->statsPercent[s]) {\r\n\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\r\n\t\t\t}\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f0c1966cf657b581", - "equalIndicator/v1": "a15444486b2cd5773b3a378b7cc6eb74257489fff5e1e15492b88c23df1c30a1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1765, - "startColumn": 2, - "charOffset": 53176, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1763, - "startColumn": 1, - "charOffset": 53081, - "charLength": 212, - "snippet": { - "text": "void ProtocolGame::parseThrow(NetworkMessage &msg) {\r\n\tPosition fromPos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t fromStackpos = msg.getByte();\r\n\tPosition toPos = msg.getPosition();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9bfc3af36e05af67", - "equalIndicator/v1": "a15fb8dd9b9f87fc5287e58e2bae489abd40a1ec20159db24878dabecd76d01c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructor does not initialize these fields: sleepStart, sleeperGUID", - "markdown": "Constructor does not initialize these fields: sleepStart, sleeperGUID" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/bed.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 18, - "startColumn": 10, - "charOffset": 583, - "charLength": 7, - "snippet": { - "text": "BedItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 16, - "startColumn": 1, - "charOffset": 527, - "charLength": 119, - "snippet": { - "text": "#include \"game/scheduling/save_manager.hpp\"\r\n\r\nBedItem::BedItem(uint16_t id) :\r\n\tItem(id) {\r\n\tinternalRemoveSleeper();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fe9cdfacdcec47d8", - "equalIndicator/v1": "a162ea2e1c0a20c3d963618dd7cb069181470865b2d0cdafc83acbe2aad25b1e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint_fast64_t' (aka 'unsigned long long') to 'float'", - "markdown": "Narrowing conversion from 'uint_fast64_t' (aka 'unsigned long long') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/scheduling/dispatcher.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 190, - "startColumn": 3, - "charOffset": 5444, - "charLength": 6, - "snippet": { - "text": "return" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 188, - "startColumn": 1, - "charOffset": 5435, - "charLength": 28, - "snippet": { - "text": "\t\t}\r\n\r\n\t\treturn list;\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "12db9b05e8de7764", - "equalIndicator/v1": "a16ba724fb79c1df9b36df1b7bca53468e7c3dc3570df375bc105e9f546c4562" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1072, - "startColumn": 103, - "charOffset": 31252, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1070, - "startColumn": 1, - "charOffset": 31141, - "charLength": 224, - "snippet": { - "text": "\t\t}\r\n\t}\r\n\tvoid sendUpdateTileItem(std::shared_ptr updateTile, const Position &pos, std::shared_ptr item) {\r\n\t\tif (client) {\r\n\t\t\tint32_t stackpos = updateTile->getStackposOfItem(static_self_cast(), item);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0b5c12c6c0830279", - "equalIndicator/v1": "a1865a4e75142f97b9d16b280ff9892f2a418fc1be2259b9616bb1a78ce72f2f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'id' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'id' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 126, - "startColumn": 27, - "charOffset": 3518, - "charLength": 14, - "snippet": { - "text": "const uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 124, - "startColumn": 1, - "charOffset": 3382, - "charLength": 192, - "snippet": { - "text": "\tstd::shared_ptr getItemByIndex(size_t index) const;\r\n\tbool isHoldingItem(std::shared_ptr item);\r\n\tbool isHoldingItemWithId(const uint16_t id);\r\n\r\n\tuint32_t getItemHoldingCount();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4d6abb2aefd1adb4", - "equalIndicator/v1": "a18853908af1947befb58cbd7bcf4a8967864140ac9af2a673664e769ed7b1bb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/raids.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 540, - "startColumn": 36, - "charOffset": 15507, - "charLength": 5, - "snippet": { - "text": "spawn" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 538, - "startColumn": 1, - "charOffset": 15378, - "charLength": 282, - "snippet": { - "text": "bool AreaSpawnEvent::executeEvent() {\r\n\tfor (const MonsterSpawn &spawn : spawnMonsterList) {\r\n\t\tuint32_t amount = uniform_random(spawn.minAmount, spawn.maxAmount);\r\n\t\tfor (uint32_t i = 0; i < amount; ++i) {\r\n\t\t\tstd::shared_ptr monster = Monster::createMonster(spawn.name);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "26b096fc8994e794", - "equalIndicator/v1": "a18a16f3dc1ffdf026bbe25d83f90504df7f0712319c2c099b8b6745affeed54" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2220, - "startColumn": 14, - "charOffset": 64964, - "charLength": 8, - "snippet": { - "text": "interval" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2218, - "startColumn": 1, - "charOffset": 64818, - "charLength": 384, - "snippet": { - "text": "\tauto playerTile = getTile();\r\n\tconst bool vipStaysOnline = isVip() && g_configManager().getBoolean(VIP_STAY_ONLINE, __FUNCTION__);\r\n\tidleTime += interval;\r\n\tif (playerTile && !playerTile->hasFlag(TILESTATE_NOLOGOUT) && !isAccessPlayer() && !isExerciseTraining() && !vipStaysOnline) {\r\n\t\tconst int32_t kickAfterMinutes = g_configManager().getNumber(KICK_AFTER_MINUTES, __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e4fb0c909a91af1c", - "equalIndicator/v1": "a19901e65fe01693aa7e257382155e71ddc191f01c05b69bcfb18783303f9030" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int64_t' (aka 'long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/global_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 831, - "startColumn": 20, - "charOffset": 25010, - "charLength": 10, - "snippet": { - "text": "OTSYS_TIME" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 829, - "startColumn": 1, - "charOffset": 24921, - "charLength": 119, - "snippet": { - "text": "int GlobalFunctions::luaSystemTime(lua_State* L) {\r\n\t// systemTime()\r\n\tlua_pushnumber(L, OTSYS_TIME());\r\n\treturn 1;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5f72128591e9594b", - "equalIndicator/v1": "a1f430d45fc982182260d252c362e3acf83c7e7f139bbe44aacfcd12e7f9895f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'virtual' is redundant since the function is already declared 'override'", - "markdown": "'virtual' is redundant since the function is already declared 'override'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/cylinder.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 194, - "startColumn": 15, - "charOffset": 7846, - "charLength": 11, - "snippet": { - "text": "updateThing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 192, - "startColumn": 1, - "charOffset": 7701, - "charLength": 363, - "snippet": { - "text": "\tvirtual void addThing(std::shared_ptr) override { }\r\n\tvirtual void addThing(int32_t, std::shared_ptr) override { }\r\n\tvirtual void updateThing(std::shared_ptr, uint16_t, uint32_t) override { }\r\n\tvirtual void replaceThing(uint32_t, std::shared_ptr) override { }\r\n\tvirtual void removeThing(std::shared_ptr, uint32_t) override { }\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bc70c89286f75c78", - "equalIndicator/v1": "a21ab1b1c50e28b4956498c0ef5530c5eea20ae700ea7fffb2fa7ce6211085db" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1096, - "startColumn": 7, - "charOffset": 34594, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1094, - "startColumn": 1, - "charOffset": 34430, - "charLength": 369, - "snippet": { - "text": "bool RuneSpell::executeCastSpell(std::shared_ptr creature, const LuaVariant &var, bool isHotkey) const {\r\n\t// onCastSpell(creature, var, isHotkey)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[RuneSpell::executeCastSpell - Creature {} runeId {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a5af786247be3f2f", - "equalIndicator/v1": "a21c334df7bb6ebe4b4b19809d603cb958ab9b4e167ab461be0fcae8e3bd3eb5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/global_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 145, - "startColumn": 36, - "charOffset": 4497, - "charLength": 5, - "snippet": { - "text": "count" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 143, - "startColumn": 1, - "charOffset": 4431, - "charLength": 80, - "snippet": { - "text": "\t\tsubType = count;\r\n\t} else {\r\n\t\titemCount = std::max(1, count);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0df475e5c28e500e", - "equalIndicator/v1": "a21e60d986b181623d2273df640fecaaead1a3ab65cfd6ec9dbb27b55e4d4804" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Pass by value and use std::move", - "markdown": "Pass by value and use std::move" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/custom_attribute.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 24, - "startColumn": 34, - "charOffset": 827, - "charLength": 17, - "snippet": { - "text": "const std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 22, - "startColumn": 1, - "charOffset": 764, - "charLength": 191, - "snippet": { - "text": "}\r\n// Constructor for string\r\nCustomAttribute::CustomAttribute(const std::string &initStringKey, const std::string &initStringValue) :\r\n\tstringKey(initStringKey), value(initStringValue) {\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "38d6a43246526051", - "equalIndicator/v1": "a242cf3b3550a54ce778725c9d2f051c6686745b449c193b4ddc433ff68744a9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Repeated branch body in conditional chain", - "markdown": "Repeated branch body in conditional chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/raids.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 302, - "startColumn": 38, - "charOffset": 8533, - "charLength": 1, - "snippet": { - "text": "{" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 300, - "startColumn": 1, - "charOffset": 8419, - "charLength": 199, - "snippet": { - "text": "\t\tif (tmpStrValue == \"warning\") {\r\n\t\t\tmessageType = MESSAGE_GAME_HIGHLIGHT;\r\n\t\t} else if (tmpStrValue == \"event\") {\r\n\t\t\tmessageType = MESSAGE_EVENT_ADVANCE;\r\n\t\t} else if (tmpStrValue == \"default\") {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ab2427f88401fb90", - "equalIndicator/v1": "a2525fe5ca77767f08e987f06ced15973a9b6326c8476dd6867f6ecdd7a1f9dc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2507, - "startColumn": 27, - "charOffset": 74643, - "charLength": 7, - "snippet": { - "text": "lostExp" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2505, - "startColumn": 1, - "charOffset": 74530, - "charLength": 193, - "snippet": { - "text": "\t\tTextMessage message(MESSAGE_EXPERIENCE, expString);\r\n\t\tmessage.position = position;\r\n\t\tmessage.primary.value = lostExp;\r\n\t\tmessage.primary.color = TEXTCOLOR_RED;\r\n\t\tsendTextMessage(message);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7f2566d85a3bb8fa", - "equalIndicator/v1": "a26562dad18de6f13d7f311ddf02b4ea63d660194832989247406c2306afb394" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'uint_fast64_t' (aka 'unsigned long long')", - "markdown": "Narrowing conversion from 'float' to 'uint_fast64_t' (aka 'unsigned long long')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/scheduling/dispatcher.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 187, - "startColumn": 9, - "charOffset": 5371, - "charLength": 12, - "snippet": { - "text": "emplace_back" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 185, - "startColumn": 1, - "charOffset": 5201, - "charLength": 240, - "snippet": { - "text": "\t\tconst auto size_per_block = std::ceil(size / static_cast(threadPool.get_thread_count()));\r\n\t\tfor (uint_fast64_t i = 0; i < size; i += size_per_block) {\r\n\t\t\tlist.emplace_back(i, std::min(size, i + size_per_block));\r\n\t\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "71b1ca9113f6e840", - "equalIndicator/v1": "a275b494b45500a379aaa570d88ccc272ef2af4ed83a865003a8f7f8fa2e2bab" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", - "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 433, - "startColumn": 11, - "charOffset": 13004, - "charLength": 11, - "snippet": { - "text": "std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 431, - "startColumn": 1, - "charOffset": 12937, - "charLength": 89, - "snippet": { - "text": "\t\t\t\tgetScriptInterface()->getLoadingScriptName()\r\n\t\t\t);\r\n\t\t\treturn std::string();\r\n\t}\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8a00af57ab4b1e17", - "equalIndicator/v1": "a2ca6d653bba5ecb220524a5344f584827397ff0e79615edb1468988fcb248d9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 491, - "startColumn": 58, - "charOffset": 14618, - "charLength": 1, - "snippet": { - "text": "," - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 489, - "startColumn": 1, - "charOffset": 14556, - "charLength": 122, - "snippet": { - "text": "}\r\n\r\nuint32_t MoveEvent::RemoveItemField(std::shared_ptr, std::shared_ptr, const Position &) {\r\n\treturn 1;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f9d8ab916315a78a", - "equalIndicator/v1": "a2f6dd8fd583af1f443a00a0b80b7af4f7166c979b2ca5e68fe9a3e587b74fe1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 232, - "startColumn": 25, - "charOffset": 7328, - "charLength": 8, - "snippet": { - "text": "getThing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 230, - "startColumn": 1, - "charOffset": 7169, - "charLength": 365, - "snippet": { - "text": "\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::shared_ptr getThing(size_t index) const override final;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3bf363a4dc830a8a", - "equalIndicator/v1": "a321e45242f40ed0410728e4f82b259701d40374638ca5096a3b65461b795971" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 219, - "startColumn": 58, - "charOffset": 6720, - "charLength": 14, - "snippet": { - "text": "const uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 217, - "startColumn": 1, - "charOffset": 6482, - "charLength": 381, - "snippet": { - "text": "\t// Factory member to create item of right type based on type\r\n\tstatic std::shared_ptr CreateItem(const uint16_t type, uint16_t count = 0, Position* itemPosition = nullptr);\r\n\tstatic std::shared_ptr CreateItemAsContainer(const uint16_t type, uint16_t size);\r\n\tstatic std::shared_ptr CreateItem(uint16_t itemId, Position &itemPosition);\r\n\tstatic Items items;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0b0be11666168435", - "equalIndicator/v1": "a32ca9f9f22bb50731ed18f8007aab77bf0ebe40a18255828275427eb6fe4702" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 133, - "startColumn": 12, - "charOffset": 4040, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 131, - "startColumn": 1, - "charOffset": 3936, - "charLength": 228, - "snippet": { - "text": "StashContainerList Container::getStowableItems() const {\r\n\tStashContainerList toReturnList;\r\n\tfor (auto item : itemlist) {\r\n\t\tif (item->getContainer() != NULL) {\r\n\t\t\tauto subContainer = item->getContainer()->getStowableItems();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "59e6b07fe75e7047", - "equalIndicator/v1": "a339f875a3bc8cbfbcab4fcf473859ebdea2b15ec1506c1d4ff6749361410ce4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/loot_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 222, - "startColumn": 32, - "charOffset": 5662, - "charLength": 19, - "snippet": { - "text": "getNumber" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 220, - "startColumn": 1, - "charOffset": 5566, - "charLength": 159, - "snippet": { - "text": "\tconst auto loot = getUserdataShared(L, 1);\r\n\tif (loot) {\r\n\t\tloot->lootBlock.shootRange = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "71ba8dd87dac353c", - "equalIndicator/v1": "a3472a0ff829ba336039ed846046f9557b2eb91e423bc69ca165561d82d444ab" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7853, - "startColumn": 95, - "charOffset": 274716, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7851, - "startColumn": 1, - "charOffset": 274514, - "charLength": 289, - "snippet": { - "text": "void Game::addPlayerMana(std::shared_ptr target) {\r\n\tif (const auto &party = target->getParty()) {\r\n\t\tuint8_t manaPercent = std::ceil((static_cast(target->getMana()) / std::max(target->getMaxMana(), 1)) * 100);\r\n\t\tparty->updatePlayerMana(target, manaPercent);\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cc8d25f253c890b2", - "equalIndicator/v1": "a35208a94da33e20a8583eec236494435c8ba1b7ae652bbdfb678f6cc5fe2290" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4674, - "startColumn": 20, - "charOffset": 167186, - "charLength": 67, - "snippet": { - "text": "((freeSlots) - (count < it.stackSize ? 1 : (count / it.stackSize)))" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4672, - "startColumn": 1, - "charOffset": 167161, - "charLength": 152, - "snippet": { - "text": "\t}\r\n\r\n\tint32_t NDSlots = ((freeSlots) - (count < it.stackSize ? 1 : (count / it.stackSize)));\r\n\tuint32_t SlotsWith = count;\r\n\tuint32_t noSlotsWith = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d3e27532c267f3d3", - "equalIndicator/v1": "a39bb8edee1aa7df9c856d76ba20a5385c1d42ee259f6bb10b80e3d978fb8fc1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable has narrower type 'uint8_t' than iteration's upper bound 'std::basic_string::size_type'", - "markdown": "Loop variable has narrower type 'uint8_t' than iteration's upper bound 'std::basic_string::size_type'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 221, - "startColumn": 22, - "charOffset": 5423, - "charLength": 1, - "snippet": { - "text": "i" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 219, - "startColumn": 1, - "charOffset": 5325, - "charLength": 221, - "snippet": { - "text": "\r\n\t// hmac concat outer pad with message, conversion from hex to int needed\r\n\tfor (uint8_t i = 0; i < message.length(); i += 2) {\r\n\t\toKeyPad.push_back(static_cast(std::stol(message.substr(i, 2), nullptr, 16)));\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4d9d089bdd37e526", - "equalIndicator/v1": "a3a5e62cd8b05bf6798c1faa9789eaac65a2ce28eaa094831236b9f0b4153fe9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/grouping/party.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 605, - "startColumn": 109, - "charOffset": 17572, - "charLength": 6, - "snippet": { - "text": "member" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 603, - "startColumn": 1, - "charOffset": 17160, - "charLength": 602, - "snippet": { - "text": "\t\tplayer->sendPartyCreatureHealth(member, std::ceil((static_cast(member->getHealth()) / std::max(member->getMaxHealth(), 1)) * 100));\r\n\t\tmember->sendPartyCreatureHealth(player, std::ceil((static_cast(player->getHealth()) / std::max(player->getMaxHealth(), 1)) * 100));\r\n\t\tplayer->sendPartyPlayerMana(member, std::ceil((static_cast(member->getMana()) / std::max(member->getMaxMana(), 1)) * 100));\r\n\t\tmember->sendPartyPlayerMana(player, std::ceil((static_cast(player->getMana()) / std::max(player->getMaxMana(), 1)) * 100));\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "838065d565d12abc", - "equalIndicator/v1": "a3b1aace525c419c7529f9449fb3fd019854acdf56ce38aa50be023ce5321ec7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 143, - "startColumn": 14, - "charOffset": 4184, - "charLength": 11, - "snippet": { - "text": "queryRemove" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 141, - "startColumn": 1, - "charOffset": 3850, - "charLength": 640, - "snippet": { - "text": "\tvirtual ReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override final;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override final;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d297ee665198d08d", - "equalIndicator/v1": "a3b57895ecf4a5d05992be2881648a76b8218264a23ecef12fa801dcd6154cd8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8034, - "startColumn": 64, - "charOffset": 279680, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8032, - "startColumn": 1, - "charOffset": 279612, - "charLength": 192, - "snippet": { - "text": "}\r\n\r\nvoid Game::updateCreatureWalkthrough(std::shared_ptr creature) {\r\n\t// Send to clients\r\n\tfor (const auto &spectator : Spectators().find(creature->getPosition(), true)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "616a64811503e0e8", - "equalIndicator/v1": "a3cae27c33a61ed10caad0a069fc565b005bb4f0f5f9305b89cba827dc5fb452" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 792, - "startColumn": 20, - "charOffset": 30444, - "charLength": 3, - "snippet": { - "text": "exp" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 790, - "startColumn": 1, - "charOffset": 30370, - "charLength": 141, - "snippet": { - "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r\n\tlua_pushnumber(L, exp);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9320533925081067", - "equalIndicator/v1": "a3d7bc7281854de23fda56e87f09a6d68b8fc06dcee87deb943b47c5053a72be" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2628, - "startColumn": 43, - "charOffset": 99282, - "charLength": 5, - "snippet": { - "text": "money" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2626, - "startColumn": 1, - "charOffset": 99130, - "charLength": 294, - "snippet": { - "text": "\t\t} else if (moneyEntry.first > money) {\r\n\t\t\tconst uint32_t worth = moneyEntry.first / item->getItemCount();\r\n\t\t\tconst uint32_t removeCount = std::ceil(money / static_cast(worth));\r\n\t\t\taddMoney(cylinder, (worth * removeCount) - money, flags);\r\n\t\t\tinternalRemoveItem(item, removeCount);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "503dd8d9e23b4a41", - "equalIndicator/v1": "a3dcc00990b959f7acae707565c5fe8f3d328b70a5e26f7c963b45fc9e84ed8b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Replace loop by 'std::ranges::any_of()'", - "markdown": "Replace loop by 'std::ranges::any_of()'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1514, - "startColumn": 2, - "charOffset": 46048, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1512, - "startColumn": 1, - "charOffset": 46011, - "charLength": 167, - "snippet": { - "text": "\r\n\tint64_t timeNow = OTSYS_TIME();\r\n\tfor (const auto &condition : conditions) {\r\n\t\tif (condition->getType() != type || condition->getSubId() != subId) {\r\n\t\t\tcontinue;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "337e9da516558343", - "equalIndicator/v1": "a3e0ac336fb3b4abb6bb4c197e250b36d1df932fb65ffd342b2be1c201a88450" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 844, - "startColumn": 41, - "charOffset": 32389, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 842, - "startColumn": 1, - "charOffset": 32343, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "afeb7e7eb1f9d052", - "equalIndicator/v1": "a3f8b25b77133f7955bb1eadba1cb219b146e1867025ff1cf27ba44340666013" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Escaped string literal can be written as a raw string literal", - "markdown": "Escaped string literal can be written as a raw string literal" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/webhook/webhook.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 140, - "startColumn": 14, - "charOffset": 4434, - "charLength": 19, - "snippet": { - "text": "\"{ \\\"content\\\": \\\"\"" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 138, - "startColumn": 1, - "charOffset": 4387, - "charLength": 124, - "snippet": { - "text": "\t\tpayload << \" }] }\";\r\n\t} else {\r\n\t\tpayload << \"{ \\\"content\\\": \\\"\" << (!message.empty() ? message : title) << \"\\\" }\";\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5d1b7ccc978f0cd2", - "equalIndicator/v1": "a4034e62dbf3ab525a4f38c8bef97d83bb3cb176045d9983289e56beb0ead709" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/vocations/vocation.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 64, - "startColumn": 10, - "charOffset": 1561, - "charLength": 14, - "snippet": { - "text": "gainManaAmount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 62, - "startColumn": 1, - "charOffset": 1511, - "charLength": 132, - "snippet": { - "text": "\r\n\tuint32_t getManaGainAmount() const {\r\n\t\treturn gainManaAmount * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2211595e285600f2", - "equalIndicator/v1": "a4059c65f4aafe23b96300ce0188f6ce8668396789fc5e7ac5d83d23c8460ca6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 9230, - "startColumn": 15, - "charOffset": 322596, - "charLength": 2, - "snippet": { - "text": "it" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 9228, - "startColumn": 1, - "charOffset": 322534, - "charLength": 106, - "snippet": { - "text": "\t\t\tint32_t subType;\r\n\t\t\tif (it.charges != 0) {\r\n\t\t\t\tsubType = it.charges;\r\n\t\t\t} else {\r\n\t\t\t\tsubType = -1;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3036b629f7e281a5", - "equalIndicator/v1": "a41abc111e35e86fff2001ae579e29eae51f8fb952675a7193be81435e32763e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 117, - "startColumn": 80, - "charOffset": 6043, - "charLength": 13, - "snippet": { - "text": "const int32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 115, - "startColumn": 1, - "charOffset": 5807, - "charLength": 565, - "snippet": { - "text": "\tvoid eventPlayerOnRequestQuestLog(std::shared_ptr player);\r\n\tvoid eventPlayerOnRequestQuestLine(std::shared_ptr player, uint16_t questId);\r\n\tvoid eventOnStorageUpdate(std::shared_ptr player, const uint32_t key, const int32_t value, int32_t oldValue, uint64_t currentTime);\r\n\tvoid eventPlayerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage);\r\n\tvoid eventPlayerOnInventoryUpdate(std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool equip);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ddff0aefef1b7130", - "equalIndicator/v1": "a424e7f4005553a8bb84d400d3129bf013ae56744cbed7764c3e2b8c59694420" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", - "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 187, - "startColumn": 9, - "charOffset": 4520, - "charLength": 11, - "snippet": { - "text": "std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 185, - "startColumn": 1, - "charOffset": 4460, - "charLength": 93, - "snippet": { - "text": "\t\thexstring[index + 1] = hexDigits[byte & 15];\r\n\t}\r\n\treturn std::string(hexstring, 40);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "480d71a45c846517", - "equalIndicator/v1": "a425e132efdb8bcea9a6d59b243dffc9917cf234ed8b14f5d70b8d5ac0d50851" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2253, - "startColumn": 2, - "charOffset": 70185, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2251, - "startColumn": 1, - "charOffset": 70146, - "charLength": 195, - "snippet": { - "text": "\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tg_game().playerConfigureShowOffSocket(player->getID(), pos, stackpos, itemId);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1938b379c11fea8c", - "equalIndicator/v1": "a43e8cfce356f78ab0547c5c771af635b2dc5f0adc2ca3d6a51c16f2a8621224" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 240, - "startColumn": 18, - "charOffset": 7870, - "charLength": 11, - "snippet": { - "text": "getPosition" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 238, - "startColumn": 1, - "charOffset": 7763, - "charLength": 161, - "snippet": { - "text": "\tvoid virtual internalAddThing(uint32_t index, std::shared_ptr thing) override;\r\n\r\n\tconst Position &getPosition() override final {\r\n\t\treturn tilePos;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1fbf0012b7b0f92f", - "equalIndicator/v1": "a444ba39481bf0d90f73dbc9c2e9f8c50bbd344aa6100295ecc54ea49c3a6ca6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 965, - "startColumn": 31, - "charOffset": 28927, - "charLength": 8, - "snippet": { - "text": "interval" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 963, - "startColumn": 1, - "charOffset": 28857, - "charLength": 112, - "snippet": { - "text": "\r\n\t\t\tif (challengeFocusDuration > 0) {\r\n\t\t\t\tchallengeFocusDuration -= interval;\r\n\t\t\t\tcanChangeTarget = false;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8ebc979032ad1290", - "equalIndicator/v1": "a45d312c7969d7fb1cbab831d5e89109462c3e7d8069ce2cc84caa7811a84070" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/grouping/party.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 796, - "startColumn": 53, - "charOffset": 25248, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 794, - "startColumn": 1, - "charOffset": 25191, - "charLength": 180, - "snippet": { - "text": "}\r\n\r\nvoid Party::addPlayerDamage(std::shared_ptr player, uint64_t amount) {\r\n\tauto playerAnalyzer = getPlayerPartyAnalyzerStruct(player->getID());\r\n\tif (!playerAnalyzer) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "43f6c08bbe221ffd", - "equalIndicator/v1": "a48b67b31cbf511b24100e8bd8320aa61c09d538fb437631a304917fd11b5c03" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 134, - "startColumn": 110, - "charOffset": 3675, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 132, - "startColumn": 1, - "charOffset": 3561, - "charLength": 244, - "snippet": { - "text": "}\r\n\r\nbool Weapon::useWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target) const {\r\n\tint32_t damageModifier = playerWeaponCheck(player, target, item->getShootRange());\r\n\tif (damageModifier == 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2c3abd7a6952e1e5", - "equalIndicator/v1": "a4cfd4797ca078b75e4689822a6aa040015037fc67468a7aa044687931741f19" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 567, - "startColumn": 33, - "charOffset": 16206, - "charLength": 9, - "snippet": { - "text": "spectator" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 565, - "startColumn": 1, - "charOffset": 16151, - "charLength": 155, - "snippet": { - "text": "\r\n\t// send to clients\r\n\tfor (std::shared_ptr spectator : spectators) {\r\n\t\tspectator->getPlayer()->sendUpdateTile(getTile(), cylinderMapPos);\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1c9b3134b86150c8", - "equalIndicator/v1": "a4dbb49fab6725ff3473f6cff232aa14fcbfb1c501338ca510a82d398db7b833" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/container_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 194, - "startColumn": 2, - "charOffset": 5433, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 192, - "startColumn": 1, - "charOffset": 5369, - "charLength": 224, - "snippet": { - "text": "\r\n\tint32_t index = getNumber(L, 3, INDEX_WHEREEVER);\r\n\tuint32_t flags = getNumber(L, 4, 0);\r\n\tReturnValue ret = g_game().internalAddItem(container, item, index, flags);\r\n\tif (ret == RETURNVALUE_NOERROR) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cb303a54eb61a762", - "equalIndicator/v1": "a559cf467953e95b18e8eab3ec36e8077f21301a1375ad895893dd2aedba29c2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The value returned by this function should not be disregarded; neglecting it may lead to errors", - "markdown": "The value returned by this function should not be disregarded; neglecting it may lead to errors" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/connection/connection.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 33, - "startColumn": 5, - "charOffset": 1184, - "charLength": 10, - "snippet": { - "text": "connection" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 31, - "startColumn": 1, - "charOffset": 1142, - "charLength": 259, - "snippet": { - "text": "\t\t\ttry {\r\n\t\t\t\tstd::error_code error;\r\n\t\t\t\tconnection->socket.shutdown(asio::ip::tcp::socket::shutdown_both, error);\r\n\t\t\t\tif (error) {\r\n\t\t\t\t\tg_logger().error(\"[ConnectionManager::closeAll] - Failed to close connection, system error code {}\", error.message());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0e5d6d17ca236115", - "equalIndicator/v1": "a57d97574da661a75f663e59c40e7008f945a3d2194f7d3f37eb0ca22c207bff" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned int' to 'float'", - "markdown": "Narrowing conversion from 'unsigned int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 719, - "startColumn": 37, - "charOffset": 23378, - "charLength": 18, - "snippet": { - "text": "std::min" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 717, - "startColumn": 1, - "charOffset": 23316, - "charLength": 132, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 65) * 1.50f) + 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "96e845c31ba9bddf", - "equalIndicator/v1": "a5b7f184fa6ad03c6fa8b9536e8b61ece27c720dfb2fb0fa4e7cde8e99af9189" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Replace loop by 'std::ranges::any_of()'", - "markdown": "Replace loop by 'std::ranges::any_of()'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5309, - "startColumn": 2, - "charOffset": 156847, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5307, - "startColumn": 1, - "charOffset": 156840, - "charLength": 158, - "snippet": { - "text": "\t}\r\n\r\n\tfor (const auto &learnedSpellName : learnedInstantSpellList) {\r\n\t\tif (strcasecmp(learnedSpellName.c_str(), spellName.c_str()) == 0) {\r\n\t\t\treturn true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0bc0ad7376d0ac90", - "equalIndicator/v1": "a5be0bce111adf85798406c4ac934357cbe58ab277e2e2f297ea634decbf96e1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/bank/bank.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 165, - "startColumn": 46, - "charOffset": 4385, - "charLength": 6, - "snippet": { - "text": "amount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 163, - "startColumn": 1, - "charOffset": 4294, - "charLength": 225, - "snippet": { - "text": "\t}\r\n\tif (bankable->getPlayer() != nullptr) {\r\n\t\tg_metrics().addCounter(\"balance_decrease\", amount, { { \"player\", bankable->getPlayer()->getName() }, { \"context\", \"bank_deposit\" } });\r\n\t}\r\n\treturn destination->credit(amount);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "93af2f887fd4521f", - "equalIndicator/v1": "a5c9e81fc47e21e1572ac6ff210bf832539c8651c3802f54e083a7fc665c6f41" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 438, - "startColumn": 27, - "charOffset": 15702, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 436, - "startColumn": 1, - "charOffset": 15670, - "charLength": 122, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.partyOnJoin, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f11b511a07d50fa8", - "equalIndicator/v1": "a5cc03294e3b74386640ccff4284c510dd21b0cb8e6c47ffb18985fe812e5a81" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/inbox/inbox.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 23, - "startColumn": 14, - "charOffset": 647, - "charLength": 8, - "snippet": { - "text": "queryAdd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 21, - "startColumn": 1, - "charOffset": 602, - "charLength": 346, - "snippet": { - "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9912eb9df885d344", - "equalIndicator/v1": "a60d41855369274f552bf32a1b0c66e26059a5a012aba34f82a1c1cef272bc47" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to 'float'", - "markdown": "Narrowing conversion from 'int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/decay/decay.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 189, - "startColumn": 125, - "charOffset": 6099, - "charLength": 37, - "snippet": { - "text": "(it.abilities->statsPercent[s] - 100)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 187, - "startColumn": 1, - "charOffset": 5882, - "charLength": 280, - "snippet": { - "text": "\t\t\t\tif (it.abilities && it.abilities->statsPercent[s] != 0) {\r\n\t\t\t\t\tneedUpdateStats = true;\r\n\t\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\r\n\t\t\t\t}\r\n\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "827afec8c8323752", - "equalIndicator/v1": "a61f93e6a1f87e594ddf4254472e8d1a8c4e1bb73123ad5b540f428a61e65084" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Redundant string initialization", - "markdown": "Redundant string initialization" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creatures_definitions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1409, - "startColumn": 14, - "charOffset": 37179, - "charLength": 11, - "snippet": { - "text": "description" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1407, - "startColumn": 1, - "charOffset": 37120, - "charLength": 121, - "snippet": { - "text": "\tuint32_t guid = 0;\r\n\tstd::string name = \"\";\r\n\tstd::string description = \"\";\r\n\tuint32_t icon = 0;\r\n\tbool notify = false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "15777295a647aacf", - "equalIndicator/v1": "a625c2eddc18383b62820c534138a55dc744695478b2204f68c4043998448a63" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 738, - "startColumn": 51, - "charOffset": 24305, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 736, - "startColumn": 1, - "charOffset": 24250, - "charLength": 160, - "snippet": { - "text": "}\r\n\r\nvoid Spell::postCastSpell(std::shared_ptr player, uint32_t manaCost, uint32_t soulCost) {\r\n\tif (manaCost > 0) {\r\n\t\tplayer->addManaSpent(manaCost);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b4ee5e0912087370", - "equalIndicator/v1": "a6337e0562142959afc618b896218f40ef685954401f556c7cb18a3ec4eaec7e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'toTile' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'toTile' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1393, - "startColumn": 166, - "charOffset": 55227, - "charLength": 6, - "snippet": { - "text": "toTile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1391, - "startColumn": 1, - "charOffset": 55057, - "charLength": 264, - "snippet": { - "text": "}\r\n\r\nvoid Game::playerMoveCreature(std::shared_ptr player, std::shared_ptr movingCreature, const Position &movingCreatureOrigPos, std::shared_ptr toTile) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!player->canDoAction()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0079c6d12bfd5f70", - "equalIndicator/v1": "a638daf5a2ab9d0f5399ed63994ffbf99b62adf71a837231690e5fff68d3bf33" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iobestiary.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 364, - "startColumn": 4, - "charOffset": 12051, - "charLength": 89, - "snippet": { - "text": "case COMBAT_ENERGYDAMAGE:\r\n\t\t\t\tdefaultMap[3] -= static_cast(elementEntry.second)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 362, - "startColumn": 1, - "charOffset": 11971, - "charLength": 210, - "snippet": { - "text": "\t\t\t\tdefaultMap[2] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_ENERGYDAMAGE:\r\n\t\t\t\tdefaultMap[3] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_ICEDAMAGE:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "437022d7eb876dea", - "equalIndicator/v1": "a674399fc9e4965242e53ce49d5feeefaaed413ecd48388b31184fe33bce31db" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2085, - "startColumn": 72, - "charOffset": 60390, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2083, - "startColumn": 1, - "charOffset": 60314, - "charLength": 195, - "snippet": { - "text": "}\r\n\r\nstd::string Item::parseShowAttributesDescription(std::shared_ptr item, const uint16_t itemId) {\r\n\tstd::ostringstream itemDescription;\r\n\tconst ItemType &itemType = Item::items[itemId];\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "25538780df1f5a2b", - "equalIndicator/v1": "a6d51169c844392b226cb3c534c933fa7b1607bea01247df215823fb7fd73c27" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'achievementsUnlocked' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'achievementsUnlocked' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3707, - "startColumn": 128, - "charOffset": 115434, - "charLength": 20, - "snippet": { - "text": "achievementsUnlocked" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3705, - "startColumn": 1, - "charOffset": 115302, - "charLength": 199, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendCyclopediaCharacterAchievements(uint16_t secretsUnlocked, std::vector> achievementsUnlocked) {\r\n\tif (!player || oldProtocol) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a0ed85899f7f7fc3", - "equalIndicator/v1": "a6e953a61e25d24f707cc46935556a36dc85c5b8d8ddc6f2f2d276c595287af1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1029, - "startColumn": 7, - "charOffset": 37183, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1027, - "startColumn": 1, - "charOffset": 37171, - "charLength": 156, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnGainExperience - \"\r\n\t\t \"Player {} target {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "aa8c809f0d03856f", - "equalIndicator/v1": "a6fb2939ea543c2cb1a2bc762ba13d2ea5cc9957cb4535c520e92554e4dffe42" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'callback' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'callback' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/database/databasetasks.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 25, - "startColumn": 95, - "charOffset": 847, - "charLength": 8, - "snippet": { - "text": "callback" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 23, - "startColumn": 1, - "charOffset": 748, - "charLength": 220, - "snippet": { - "text": "}\r\n\r\nvoid DatabaseTasks::execute(const std::string &query, std::function callback /* nullptr */) {\r\n\tthreadPool.detach_task([this, query, callback]() {\r\n\t\tbool success = db.executeQuery(query);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e5ba48941dc49e63", - "equalIndicator/v1": "a70881b71fd4ff5a57a09eef935337af23bee1b34d6da4e4d58d3a15bb8c498d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 808, - "startColumn": 20, - "charOffset": 20102, - "charLength": 18, - "snippet": { - "text": "luaItemSetDuration" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 806, - "startColumn": 1, - "charOffset": 20078, - "charLength": 244, - "snippet": { - "text": "}\r\n\r\nint ItemFunctions::luaItemSetDuration(lua_State* L) {\r\n\t// item:setDuration(minDuration, maxDuration = 0, decayTo = 0, showDuration = true)\r\n\t// Example: item:setDuration(10000, 20000, 2129, false) = random duration from range 10000/20000\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "358f1e0127ad7783", - "equalIndicator/v1": "a7263c046ac51a1912b73efcd74ee4c888d01a169595107b0bc3016fe8e433e0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/global_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 143, - "startColumn": 13, - "charOffset": 4443, - "charLength": 5, - "snippet": { - "text": "count" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 141, - "startColumn": 1, - "charOffset": 4424, - "charLength": 81, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tsubType = count;\r\n\t} else {\r\n\t\titemCount = std::max(1, count);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "199d8d38274ed6b4", - "equalIndicator/v1": "a76656794173fd958939c2c7217413d66498ca6c4c2b93a8a89d11cb3dcb193b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'hash' is within a recursive call chain", - "markdown": "Function 'hash' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/mapcache.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 234, - "startColumn": 32, - "charOffset": 6788, - "charLength": 3, - "snippet": { - "text": "arr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 232, - "startColumn": 1, - "charOffset": 6714, - "charLength": 198, - "snippet": { - "text": "\r\nvoid BasicItem::hash(size_t &h) const {\r\n\tconst std::array arr = { id, charges, actionId, uniqueId, destX, destY, destZ, doorOrDepotId };\r\n\tfor (const auto v : arr) {\r\n\t\tif (v > 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "10709ed55c043ae9", - "equalIndicator/v1": "a7931042341be761edd3f03fd3e5adde4011be548fcc5d4361378a57f194548d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1726, - "startColumn": 7, - "charOffset": 60283, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1724, - "startColumn": 1, - "charOffset": 60110, - "charLength": 365, - "snippet": { - "text": "void ChainCallback::onChainCombat(std::shared_ptr creature, uint8_t &maxTargets, uint8_t &chainDistance, bool &backtracking) {\r\n\t// onChainCombat(creature)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[ChainCallback::onTargetCombat - Creature {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f33c5708c5200682", - "equalIndicator/v1": "a796d244ce296e0639d75d6edc916180791ea6b52fb65e7130a9a498764d2560" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructor does not initialize these fields: quickLootFilter", - "markdown": "Constructor does not initialize these fields: quickLootFilter" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 47, - "startColumn": 9, - "charOffset": 1786, - "charLength": 6, - "snippet": { - "text": "Player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 45, - "startColumn": 1, - "charOffset": 1740, - "charLength": 115, - "snippet": { - "text": "MuteCountMap Player::muteCountMap;\r\n\r\nPlayer::Player(ProtocolGame_ptr p) :\r\n\tCreature(),\r\n\tlastPing(OTSYS_TIME()),\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "515a9dbb26d92357", - "equalIndicator/v1": "a79b11b1e97c42938dfa03c6a7347258a774229abfaf84136da9164fee2109ce" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2173, - "startColumn": 60, - "charOffset": 63783, - "charLength": 4, - "snippet": { - "text": "task" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2171, - "startColumn": 1, - "charOffset": 63719, - "charLength": 160, - "snippet": { - "text": "}\r\n\r\nvoid Player::setNextPotionActionTask(std::shared_ptr task) {\r\n\tif (actionPotionTaskEvent != 0) {\r\n\t\tg_dispatcher().stopEvent(actionPotionTaskEvent);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4ed9692277d81fbe", - "equalIndicator/v1": "a7a3c596a0ab6d51d20fac750f22b88d712e26c853b132293333189e4ef2f8c5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1105, - "startColumn": 6, - "charOffset": 42105, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1103, - "startColumn": 1, - "charOffset": 42049, - "charLength": 199, - "snippet": { - "text": "\tLuaScriptInterface::pushPosition(L, position);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fff805f32807f16a", - "equalIndicator/v1": "a7d95a0deec1d47237a3cdd3fa49f68ec94a8b78e29a4ef7818cfc911eed2fe5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 397, - "startColumn": 62, - "charOffset": 10990, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 395, - "startColumn": 1, - "charOffset": 10924, - "charLength": 188, - "snippet": { - "text": "}\r\n\r\nvoid Creature::onCreatureDisappear(std::shared_ptr creature, bool isLogout) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (getAttackedCreature() == creature) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c2a4b99074d2be79", - "equalIndicator/v1": "a87e257a1b986cd1a396c26b0c97b1a611a88b190680c2a4a78c7be98629f358" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1103, - "startColumn": 27, - "charOffset": 34908, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1101, - "startColumn": 1, - "charOffset": 34876, - "charLength": 129, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\r\n\tenv->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "549a61344d2d0bc7", - "equalIndicator/v1": "a8830e8a2f9b781085d567e822a0e0d98991db946fd908eb791ed301501f3ccb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1125, - "startColumn": 20, - "charOffset": 40361, - "charLength": 5, - "snippet": { - "text": "tries" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1123, - "startColumn": 1, - "charOffset": 40312, - "charLength": 112, - "snippet": { - "text": "\r\n\tlua_pushnumber(L, skill);\r\n\tlua_pushnumber(L, tries);\r\n\r\n\tif (scriptInterface.protectedCall(L, 3, 1) != 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "244371c7372706b8", - "equalIndicator/v1": "a893537de4d70b1e1a58a0d94150371ff4464dfa59857e54c891c575e717b452" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 177, - "startColumn": 69, - "charOffset": 6302, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 175, - "startColumn": 1, - "charOffset": 6229, - "charLength": 403, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::creatureOnDrainHealth(std::shared_ptr creature, std::shared_ptr attacker, CombatType_t &typePrimary, int32_t &damagePrimary, CombatType_t &typeSecondary, int32_t &damageSecondary, TextColor_t &colorPrimary, TextColor_t &colorSecondary) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnDrainHealth - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "90dc15e258a9bdab", - "equalIndicator/v1": "a8aa71c403585fb0020ad0c5f0b007e4875614a892b81a0e640041d1ee350f3b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 801, - "startColumn": 2, - "charOffset": 30684, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 799, - "startColumn": 1, - "charOffset": 30677, - "charLength": 52, - "snippet": { - "text": "\t}\r\n\r\n\tgetScriptInterface()->resetScriptEnv();\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5b4718ce325c85ed", - "equalIndicator/v1": "a8bc8a7ea31a18bedbd033a84edbf1bd579549a47c60b88b391cf36c5ca1882c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1633, - "startColumn": 91, - "charOffset": 57218, - "charLength": 4, - "snippet": { - "text": "tile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1631, - "startColumn": 1, - "charOffset": 57062, - "charLength": 249, - "snippet": { - "text": "//**********************************************************//\r\n\r\nvoid TileCallback::onTileCombat(std::shared_ptr creature, std::shared_ptr tile) const {\r\n\t// onTileCombat(creature, pos)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ae4a4ca8fd03e6d0", - "equalIndicator/v1": "a8d7ddd180c458e0ddd98b0f7ce257b73d792aa4536bdd77549e6f9d74a1db76" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 667, - "startColumn": 15, - "charOffset": 21823, - "charLength": 11, - "snippet": { - "text": "static_cast" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 665, - "startColumn": 1, - "charOffset": 21783, - "charLength": 132, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 45) * 1.55f) + 6;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b8d184daa674c817", - "equalIndicator/v1": "a8f2432972dc2423ebb96329ea2422c7abb6041aca094ae4361d77a27f3fe417" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 762, - "startColumn": 38, - "charOffset": 27382, - "charLength": 12, - "snippet": { - "text": "fromCylinder" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 760, - "startColumn": 1, - "charOffset": 27292, - "charLength": 158, - "snippet": { - "text": "\tLuaScriptInterface::pushPosition(L, toPosition);\r\n\r\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\r\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8bcab81f4aef3634", - "equalIndicator/v1": "a9144add867f9066a884bd7bbec1624b0d4ca1c510c79eb5ee6733b2d6229fb3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 433, - "startColumn": 8, - "charOffset": 26694, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 431, - "startColumn": 1, - "charOffset": 26681, - "charLength": 125, - "snippet": { - "text": "\t}\r\n\r\n\tconst uint16_t date = result->getNumber(\"date\");\r\n\tconst time_t now = time(0);\r\n\ttm* ltm = localtime(&now);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4cd90784aa8e9691", - "equalIndicator/v1": "a9328183c9e3ef8820dcb6bfcb6ac7d29cb1cc00ec742c3f303813e15481334a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3007, - "startColumn": 44, - "charOffset": 90910, - "charLength": 10, - "snippet": { - "text": "experience" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3005, - "startColumn": 1, - "charOffset": 90786, - "charLength": 166, - "snippet": { - "text": "\tdouble getLostPercent() const;\r\n\tuint64_t getLostExperience() const override {\r\n\t\treturn skillLoss ? static_cast(experience * getLostPercent()) : 0;\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "03c3eef343e0ef42", - "equalIndicator/v1": "a9366af11b3325a7b469261b2de33f4ea0adb0d2d2e70461502ad9bf90e8451c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 804, - "startColumn": 62, - "charOffset": 29052, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 802, - "startColumn": 1, - "charOffset": 28986, - "charLength": 163, - "snippet": { - "text": "}\r\n\r\nvoid Events::eventPlayerOnChangeZone(std::shared_ptr player, ZoneType_t zone) {\r\n\t// Player:onChangeZone(zone)\r\n\tif (info.playerOnChangeZone == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6405b6fef7c5f798", - "equalIndicator/v1": "a96f347413210ec2ef864f53f8e70f57711ffd17841ab7c4f0f6a68ee903e01d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 381, - "startColumn": 59, - "charOffset": 10374, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 379, - "startColumn": 1, - "charOffset": 10311, - "charLength": 172, - "snippet": { - "text": "}\r\n\r\nvoid Creature::onRemoveCreature(std::shared_ptr creature, bool) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tonCreatureDisappear(creature, true);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ca3cfb6409b3fe14", - "equalIndicator/v1": "a972ddfa07d0440e378d3d9f058b4146d37e4d7102512f5d9f60130ea56166ca" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/cyclopedia/player_title.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 53, - "startColumn": 41, - "charOffset": 1279, - "charLength": 9, - "snippet": { - "text": "timestamp" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 51, - "startColumn": 1, - "charOffset": 1233, - "charLength": 197, - "snippet": { - "text": "\t}\r\n\r\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\r\n\tgetUnlockedKV()->set(title.m_maleName, toSaveTimeStamp);\r\n\tm_titlesUnlocked.emplace_back(title, toSaveTimeStamp);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7c9ae79046d9c288", - "equalIndicator/v1": "a98908235a7c8a6ce9b9b8ad8761475dcf1e0c806097e19264a6d9254939806e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 209, - "startColumn": 8, - "charOffset": 5250, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 207, - "startColumn": 1, - "charOffset": 5158, - "charLength": 207, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeIsQuiver(lua_State* L) {\r\n\t// itemType:isQuiver()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isQuiver());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3f17400ca71a1d5d", - "equalIndicator/v1": "a98b99b66ca08699f5d15863efc5a29ec572358df79be2081d9fb11e0c4fca2e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 898, - "startColumn": 58, - "charOffset": 29294, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 896, - "startColumn": 1, - "charOffset": 29232, - "charLength": 195, - "snippet": { - "text": "}\r\n\r\nvoid Combat::addDistanceEffect(std::shared_ptr caster, const Position &fromPos, const Position &toPos, uint16_t effect) {\r\n\tif (effect == CONST_ANI_WEAPONTYPE) {\r\n\t\tif (!caster) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "98c383fb2a877c18", - "equalIndicator/v1": "a9bb7924c6bfb894baaeb973b5d77196698853b86e1e4279f2fe326f49fbfa7a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1385, - "startColumn": 57, - "charOffset": 40267, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1383, - "startColumn": 1, - "charOffset": 40206, - "charLength": 138, - "snippet": { - "text": "}\r\n\r\nint32_t Tile::getStackposOfItem(std::shared_ptr player, std::shared_ptr item) const {\r\n\tint32_t n = 0;\r\n\tif (ground) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "922f48baee6a0cf1", - "equalIndicator/v1": "aa17ebbcac8b0ba4bba5f1763e13cfaa945c02fec7b3055e486d706ecd6b2b0f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8449, - "startColumn": 4, - "charOffset": 267428, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8447, - "startColumn": 1, - "charOffset": 267341, - "charLength": 243, - "snippet": { - "text": "\t\tcase SUPPLY_STASH_ACTION_STOW_CONTAINER: {\r\n\t\t\tPosition pos = msg.getPosition();\r\n\t\t\tuint16_t itemId = msg.get();\r\n\t\t\tuint8_t stackpos = msg.getByte();\r\n\t\t\tg_game().playerStowItem(player->getID(), pos, itemId, stackpos, 0, false);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0546c8d1ccafcdd0", - "equalIndicator/v1": "aa1c7aa11b9bd574d6da47bf44b3ce9bf2021507d3d1d2558c1f71ce552c250a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2441, - "startColumn": 2, - "charOffset": 75947, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2439, - "startColumn": 1, - "charOffset": 75871, - "charLength": 207, - "snippet": { - "text": "\r\nvoid ProtocolGame::parseCyclopediaMonsterTracker(NetworkMessage &msg) {\r\n\tuint16_t monsterRaceId = msg.get();\r\n\t// Bosstiary tracker: 0 = disabled, 1 = enabled\r\n\t// Bestiary tracker: 1 = enabled\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "afcaaf1309b7b968", - "equalIndicator/v1": "aa3f6392e0faeabf375d4eca6459ca414762e36885fef89c514cc71548541c9e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3071, - "startColumn": 132, - "charOffset": 114302, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3069, - "startColumn": 1, - "charOffset": 114166, - "charLength": 275, - "snippet": { - "text": "}\r\n\r\nReturnValue Game::processLootItems(std::shared_ptr player, std::shared_ptr lootContainer, std::shared_ptr item, bool &fallbackConsumed) {\r\n\tstd::shared_ptr lastSubContainer = nullptr;\r\n\tuint32_t remainderCount = item->getItemCount();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3d8a541a53bce4fc", - "equalIndicator/v1": "aa414e097cf92c8ac12961f253ecd4fcbbd4a45fbad68a62a9a64c70558a8cb4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 184, - "startColumn": 28, - "charOffset": 5753, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 182, - "startColumn": 1, - "charOffset": 5719, - "charLength": 143, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\t\tenv->setScriptId(mType->info.creatureDisappearEvent, scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f31db5d2cfae964b", - "equalIndicator/v1": "aa51f9992a5b00de24ac58ef5d35c6d0c0d2cac6e71e234f9161105276461832" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/bed.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 235, - "startColumn": 56, - "charOffset": 6012, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 233, - "startColumn": 1, - "charOffset": 5952, - "charLength": 135, - "snippet": { - "text": "}\r\n\r\nvoid BedItem::regeneratePlayer(std::shared_ptr player) const {\r\n\tconst uint32_t sleptTime = time(nullptr) - sleepStart;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "76eee41497b4daa4", - "equalIndicator/v1": "aa72f6cd96dc019e3c472d9b827a0a48793511bd93d1659c0ed8a64232005f2e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 577, - "startColumn": 17, - "charOffset": 15612, - "charLength": 9, - "snippet": { - "text": "shopBlock" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 575, - "startColumn": 1, - "charOffset": 15497, - "charLength": 252, - "snippet": { - "text": "\tuint64_t pricePerUnit = 0;\r\n\tconst auto &shopVector = npc->getShopItemVector(player->getGUID());\r\n\tfor (ShopBlock shopBlock : shopVector) {\r\n\t\tif (itemId == shopBlock.itemId && shopBlock.itemBuyPrice != 0) {\r\n\t\t\tpricePerUnit = shopBlock.itemBuyPrice;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "13cdc2567a9b2933", - "equalIndicator/v1": "aa7a751c2dea6b105f3797bcd32760d36d3f56c0d90dc852674f180cb362e5be" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 154, - "startColumn": 30, - "charOffset": 4200, - "charLength": 29, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 152, - "startColumn": 1, - "charOffset": 4102, - "charLength": 277, - "snippet": { - "text": "\r\n\tbool registerLuaItemEvent(const std::shared_ptr action);\r\n\tbool registerLuaUniqueEvent(const std::shared_ptr action);\r\n\tbool registerLuaActionEvent(const std::shared_ptr action);\r\n\tbool registerLuaPositionEvent(const std::shared_ptr action);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fc60aa923c843561", - "equalIndicator/v1": "aab95ef15b799f39dfc3e040091d67fa5a2d55dc14267ab17fa566775ba021e0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'virtual' is redundant since the function is already declared 'override'", - "markdown": "'virtual' is redundant since the function is already declared 'override'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/cylinder.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 188, - "startColumn": 36, - "charOffset": 7568, - "charLength": 16, - "snippet": { - "text": "queryDestination" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 186, - "startColumn": 1, - "charOffset": 7494, - "charLength": 204, - "snippet": { - "text": "\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r\n\tvirtual std::shared_ptr queryDestination(int32_t &, const std::shared_ptr &, std::shared_ptr*, uint32_t &) override {\r\n\t\treturn nullptr;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a1f3f114bc87c5ed", - "equalIndicator/v1": "aad15c8debf55f29af635a3281ddd456d648583ac9d011d76e2c4d2f4f48703e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 357, - "startColumn": 41, - "charOffset": 13351, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 355, - "startColumn": 1, - "charOffset": 13305, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "49360c3bc0eacd3f", - "equalIndicator/v1": "aad3282eba08e3a58e8a3383aa33d727feca46653f1b27baad2539f19adaced9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'std::map::mapped_type' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'std::map::mapped_type' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 10117, - "startColumn": 44, - "charOffset": 352258, - "charLength": 12, - "snippet": { - "text": "g_dispatcher" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 10115, - "startColumn": 1, - "charOffset": 352169, - "charLength": 166, - "snippet": { - "text": "\t\t\t\"Game::updateFiendishMonsterStatus\"\r\n\t\t);\r\n\t\tforgeMonsterEventIds[monster->getID()] = g_dispatcher().scheduleEvent(schedulerTask);\r\n\t\treturn monster->getID();\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "18f119f361eb093e", - "equalIndicator/v1": "ab02622823466b155f645e36f07c3d5dbe3ca4d8789d30c663790700b88c8a5b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 947, - "startColumn": 41, - "charOffset": 36136, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 945, - "startColumn": 1, - "charOffset": 36090, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "911249341845a145", - "equalIndicator/v1": "ab0cbbf01fbe8f4891f6ab0065a9ffc1d66805d33e3216162d8c274e83c44f47" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3069, - "startColumn": 2, - "charOffset": 93626, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3067, - "startColumn": 1, - "charOffset": 93555, - "charLength": 180, - "snippet": { - "text": "\r\nvoid ProtocolGame::parsePassPartyLeadership(NetworkMessage &msg) {\r\n\tuint32_t targetId = msg.get();\r\n\tg_game().playerPassPartyLeadership(player->getID(), targetId);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0e7a02189d9bd48f", - "equalIndicator/v1": "ab10f7b3ae6b3b7e1ecf73ecfc374cd13911a9977be8bb49363c247a0d51a9b5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 10253, - "startColumn": 58, - "charOffset": 356465, - "charLength": 7, - "snippet": { - "text": "monster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 10251, - "startColumn": 1, - "charOffset": 356403, - "charLength": 258, - "snippet": { - "text": "}\r\n\r\nbool Game::addInfluencedMonster(std::shared_ptr monster) {\r\n\tif (monster && monster->canBeForgeMonster()) {\r\n\t\tif (auto maxInfluencedMonsters = static_cast(g_configManager().getNumber(FORGE_INFLUENCED_CREATURES_LIMIT, __FUNCTION__));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2d3a4f6ab170dcbd", - "equalIndicator/v1": "ab35388e9c479514d4a41483fe304fe35ad902d802c589366a5340ed444ddf02" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 382, - "startColumn": 70, - "charOffset": 14290, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 380, - "startColumn": 1, - "charOffset": 14216, - "charLength": 265, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::playerOnLookInBattleList(std::shared_ptr player, std::shared_ptr creature, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLookInBattleList - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "946b1eb4cf706239", - "equalIndicator/v1": "ab43534a07499daba6e0f39caee34b73af21b36b0d95a8260bbc11bb5a812f07" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/game_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 218, - "startColumn": 20, - "charOffset": 6849, - "charLength": 18, - "snippet": { - "text": "luaGameGetNpcCount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 216, - "startColumn": 1, - "charOffset": 6825, - "charLength": 130, - "snippet": { - "text": "}\r\n\r\nint GameFunctions::luaGameGetNpcCount(lua_State* L) {\r\n\t// Game.getNpcCount()\r\n\tlua_pushnumber(L, g_game().getNpcsOnline());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dfdbf945c13f8e0d", - "equalIndicator/v1": "ab78c3103b57a45048132aaa77dc54229e7c0e8e344cd9e5006dc30861099d8f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/vocation_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 95, - "startColumn": 21, - "charOffset": 2721, - "charLength": 8, - "snippet": { - "text": "vocation" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 93, - "startColumn": 1, - "charOffset": 2598, - "charLength": 205, - "snippet": { - "text": "\t\tskills_t skillType = getNumber(L, 2);\r\n\t\tuint16_t skillLevel = getNumber(L, 3);\r\n\t\tlua_pushnumber(L, vocation->getReqSkillTries(skillType, skillLevel));\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "63151c3bc961d530", - "equalIndicator/v1": "ab7b56837c90afd075bfd2befce20e9f920dd9076075ffc0a7c0cc720ca123c8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to 'float_t' (aka 'float')", - "markdown": "Narrowing conversion from 'int' to 'float_t' (aka 'float')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/player_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1771, - "startColumn": 18, - "charOffset": 47331, - "charLength": 120, - "snippet": { - "text": "\"The function 'player:getStorageValueByName' is deprecated and will be removed in future versions, please use KV system\"" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1769, - "startColumn": 1, - "charOffset": 47308, - "charLength": 235, - "snippet": { - "text": "\t}\r\n\r\n\tg_logger().warn(\"The function 'player:getStorageValueByName' is deprecated and will be removed in future versions, please use KV system\");\r\n\tauto name = getString(L, 2);\r\n\tlua_pushnumber(L, player->getStorageValueByName(name));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "34bceeff11c7a733", - "equalIndicator/v1": "ab812d87c367dba992ffae0c3f55dbb941a0a4b5455bf53d44797db6b7c314d5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7560, - "startColumn": 67, - "charOffset": 263572, - "charLength": 13, - "snippet": { - "text": "targetMonster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7558, - "startColumn": 1, - "charOffset": 263463, - "charLength": 282, - "snippet": { - "text": "// Mana leech\r\nvoid Game::applyManaLeech(\r\n\tstd::shared_ptr attackerPlayer, std::shared_ptr targetMonster, std::shared_ptr target, const CombatDamage &damage, const int32_t &realDamage\r\n) const {\r\n\t// Wheel of destiny bonus - mana leech chance and amount\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a7aa35458db14db9", - "equalIndicator/v1": "ab940d4ce44ac96f9a3c2165e5a84cadccfedb1fc4c020ee468d6ce1b3017f40" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')", - "markdown": "Narrowing conversion from 'double' to 'uint8_t' (aka 'unsigned char')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5775, - "startColumn": 145, - "charOffset": 170727, - "charLength": 8, - "snippet": { - "text": "std::max" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5773, - "startColumn": 1, - "charOffset": 170501, - "charLength": 287, - "snippet": { - "text": "\t\t\tskullDuration = std::floor(skullTicks / (24 * 60 * 60 * 1000));\r\n\t\t}\r\n\t\tclient->sendUnjustifiedPoints(dayProgress, std::max(dayMax - dayKills, 0.0), weekProgress, std::max(weekMax - weekKills, 0.0), monthProgress, std::max(monthMax - monthKills, 0.0), skullDuration);\r\n\t}\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "926953c1438a5841", - "equalIndicator/v1": "abb036aeaeb753abfe591e1a373724c5f83b5bd36693596b80370d10e8f30d07" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/bed.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 242, - "startColumn": 62, - "charOffset": 6344, - "charLength": 9, - "snippet": { - "text": "sleptTime" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 240, - "startColumn": 1, - "charOffset": 6226, - "charLength": 294, - "snippet": { - "text": "\t\tuint32_t regen;\r\n\t\tif (condition->getTicks() != -1) {\r\n\t\t\tregen = std::min((condition->getTicks() / 1000), sleptTime) / 30; // RATE_HEALTH_REGEN_SPEED and RATE_MANA_REGEN_SPEED?\r\n\t\t\tconst int32_t newRegenTicks = condition->getTicks() - (regen * 30000);\r\n\t\t\tif (newRegenTicks <= 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8c71f91a77c2e450", - "equalIndicator/v1": "abc302140104303d44b042f3181996c98c0b5fba637c4e89d389e490e8b81344" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead", - "markdown": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/database/database.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 252, - "startColumn": 37, - "charOffset": 7185, - "charLength": 9, - "snippet": { - "text": "std::atoi" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 250, - "startColumn": 1, - "charOffset": 7048, - "charLength": 354, - "snippet": { - "text": "\r\nuint8_t DBResult::getU8FromString(const std::string &string, const std::string &function) const {\r\n\tauto result = static_cast(std::atoi(string.c_str()));\r\n\tif (result > std::numeric_limits::max()) {\r\n\t\tg_logger().error(\"[{}] Failed to get number value {} for tier table result, on function call: {}\", __FUNCTION__, result, function);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2dc54152bed3529a", - "equalIndicator/v1": "abc7a4e83be0a8c18118ffe498be334639acec174126fb99f311f664cc66ced6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2413, - "startColumn": 27, - "charOffset": 71670, - "charLength": 3, - "snippet": { - "text": "exp" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2411, - "startColumn": 1, - "charOffset": 71495, - "charLength": 257, - "snippet": { - "text": "\t\tTextMessage message(MESSAGE_EXPERIENCE, \"You gained \" + expString + (handleHazardExperience ? \" (Hazard)\" : \"\"));\r\n\t\tmessage.position = position;\r\n\t\tmessage.primary.value = exp;\r\n\t\tmessage.primary.color = TEXTCOLOR_WHITE_EXP;\r\n\t\tsendTextMessage(message);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "aee1dd0b7be18a77", - "equalIndicator/v1": "abcae7d49cb56e96516db186077f088d6399ef97d8ba0211fa9b499a24dfbcdc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7178, - "startColumn": 19, - "charOffset": 250323, - "charLength": 10, - "snippet": { - "text": "manaShield" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7176, - "startColumn": 1, - "charOffset": 250247, - "charLength": 163, - "snippet": { - "text": "\t\t\t\t\tmanaShield = manaShield - manaDamage;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmanaDamage = manaShield;\r\n\t\t\t\t\ttarget->removeCondition(CONDITION_MANASHIELD);\r\n\t\t\t\t\tmanaShield = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "02de79757004ac33", - "equalIndicator/v1": "abe6a15f756a65a7ea41978848560f45397ea4ea927279e267f327dad6dd72ee" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/monster_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 283, - "startColumn": 2, - "charOffset": 8325, - "charLength": 15, - "snippet": { - "text": "lua_createtable" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 281, - "startColumn": 1, - "charOffset": 8270, - "charLength": 116, - "snippet": { - "text": "\r\n\tconst auto targetList = monster->getTargetList();\r\n\tlua_createtable(L, targetList.size(), 0);\r\n\r\n\tint index = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f12074e33f389e78", - "equalIndicator/v1": "abf80abf3137534983acabf833411db81e94bb0cf75c90870d1da51c9de2f2df" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 288, - "startColumn": 8, - "charOffset": 7179, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 286, - "startColumn": 1, - "charOffset": 7073, - "charLength": 226, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetSlotPosition(lua_State* L) {\r\n\t// itemType:getSlotPosition()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->slotPosition);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "764f4c4a59a9acf0", - "equalIndicator/v1": "ac0483f74d62ef4f3f0a762cac7d5bed2fd5151c9cc979193731c851f02529f4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 253, - "startColumn": 8, - "charOffset": 6271, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 251, - "startColumn": 1, - "charOffset": 6169, - "charLength": 221, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetPluralName(lua_State* L) {\r\n\t// itemType:getPluralName()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushString(L, itemType->getPluralName());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d4eb82102fd29c5a", - "equalIndicator/v1": "acda0da238a00557135bca615ca7d9653bcd51a776b36af6e47775380c421267" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1127, - "startColumn": 6, - "charOffset": 40377, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1125, - "startColumn": 1, - "charOffset": 40342, - "charLength": 172, - "snippet": { - "text": "\tlua_pushnumber(L, tries);\r\n\r\n\tif (scriptInterface.protectedCall(L, 3, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d3ca2479e3c733fe", - "equalIndicator/v1": "ace64ca0c54b349e005d10c54cf297f3b2bf62a8c93e290daafb75070705100f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5195, - "startColumn": 57, - "charOffset": 153196, - "charLength": 8, - "snippet": { - "text": "attacked" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5193, - "startColumn": 1, - "charOffset": 153135, - "charLength": 213, - "snippet": { - "text": "}\r\n\r\nvoid Player::addUnjustifiedDead(std::shared_ptr attacked) {\r\n\tif (hasFlag(PlayerFlags_t::NotGainInFight) || attacked == getPlayer() || g_game().getWorldType() == WORLD_TYPE_PVP_ENFORCED) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3c65e82d56b161f3", - "equalIndicator/v1": "acfa33fa58efb4bdff44e9efa96c1078453bd327cea6a18b2bd6842849e44b7a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1149, - "startColumn": 27, - "charOffset": 33796, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1147, - "startColumn": 1, - "charOffset": 33689, - "charLength": 127, - "snippet": { - "text": "\tvoid sendCreatureReload(std::shared_ptr creature) {\r\n\t\tif (client) {\r\n\t\t\tclient->reloadCreature(creature);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d66588bfb8e36e99", - "equalIndicator/v1": "acfc958dd3db482761acb0847865497be93456bda94fa78e6c928c8de942ced7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/party_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 134, - "startColumn": 21, - "charOffset": 3419, - "charLength": 23, - "snippet": { - "text": "luaPartyGetInviteeCount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 132, - "startColumn": 1, - "charOffset": 3394, - "charLength": 159, - "snippet": { - "text": "}\r\n\r\nint PartyFunctions::luaPartyGetInviteeCount(lua_State* L) {\r\n\t// party:getInviteeCount()\r\n\tstd::shared_ptr party = getUserdataShared(L, 1);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dd28c6607a686cd3", - "equalIndicator/v1": "ad12e1e9e72f67c9684aa4ec36c1946d26e0bc3b3e6e569577ad273b7086f293" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'guild' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'guild' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 9828, - "startColumn": 50, - "charOffset": 343683, - "charLength": 5, - "snippet": { - "text": "guild" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 9826, - "startColumn": 1, - "charOffset": 343629, - "charLength": 90, - "snippet": { - "text": "}\r\n\r\nvoid Game::addGuild(const std::shared_ptr guild) {\r\n\tif (!guild) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b90e623d5abb5df4", - "equalIndicator/v1": "ad35356c0ccacc312a619e6b5139512681e3cb5820b360034ced3de9099430bf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1673, - "startColumn": 27, - "charOffset": 58714, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1671, - "startColumn": 1, - "charOffset": 58682, - "charLength": 159, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "747a946a292800ad", - "equalIndicator/v1": "ad4423d6d22176e63f0ac86ee3672f1ff63fe70b3438a5dca0a8914ad9302ffd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Repeated branch body in conditional chain", - "markdown": "Repeated branch body in conditional chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monsters.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 211, - "startColumn": 54, - "charOffset": 7514, - "charLength": 1, - "snippet": { - "text": "," - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 209, - "startColumn": 1, - "charOffset": 7357, - "charLength": 212, - "snippet": { - "text": "\t\tif (spell->conditionType == CONDITION_NONE) {\r\n\t\t\tg_logger().error(\"[Monsters::deserializeSpell] - \"\r\n\t\t\t \"{} condition is not set for: {}\",\r\n\t\t\t description, spell->name);\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "94d640697421825d", - "equalIndicator/v1": "ad47cc66070521fecafc2a78297a0e1ac1ff02cbeac849a24b8ed644d4c54262" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1022, - "startColumn": 100, - "charOffset": 36965, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1020, - "startColumn": 1, - "charOffset": 36861, - "charLength": 255, - "snippet": { - "text": "}\r\n\r\nvoid Events::eventPlayerOnGainExperience(std::shared_ptr player, std::shared_ptr target, uint64_t &exp, uint64_t rawExp) {\r\n\t// Player:onGainExperience(target, exp, rawExp)\r\n\t// rawExp gives the original exp which is not multiplied\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "34ca943a1588cb4e", - "equalIndicator/v1": "ad4ae00acf3f6d4d1747a0ff12948fad43912f12cf4447a1d00bd1ec1d59a720" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/monster_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 224, - "startColumn": 2, - "charOffset": 6788, - "charLength": 15, - "snippet": { - "text": "lua_createtable" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 222, - "startColumn": 1, - "charOffset": 6732, - "charLength": 117, - "snippet": { - "text": "\r\n\tconst auto &friendList = monster->getFriendList();\r\n\tlua_createtable(L, friendList.size(), 0);\r\n\r\n\tint index = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "33d3cc4c8a95809d", - "equalIndicator/v1": "adb60b1c13c6584baaa8bb8a41dd1c92ac884d06c6d1441b11cc25a0ea203e03" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'float'", - "markdown": "Narrowing conversion from 'double' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/combat/condition_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 160, - "startColumn": 14, - "charOffset": 4667, - "charLength": 14, - "snippet": { - "text": "setFormulaVars" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 158, - "startColumn": 1, - "charOffset": 4516, - "charLength": 227, - "snippet": { - "text": "\tstd::shared_ptr condition = getUserdataShared(L, 1)->dynamic_self_cast();\r\n\tif (condition) {\r\n\t\tcondition->setFormulaVars(mina, minb, maxa, maxb);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8d9721d3c018689a", - "equalIndicator/v1": "adb90a58f25a5ea406637a6ad6452606d3d63121640c07d8dfcce54429c5db23" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '__FUNCTION__', which is a reserved identifier", - "markdown": "Declaration uses identifier '__FUNCTION__', which is a reserved identifier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/definitions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 12, - "startColumn": 1, - "charOffset": 395, - "charLength": 7, - "snippet": { - "text": "#ifndef" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 10, - "startColumn": 1, - "charOffset": 379, - "charLength": 77, - "snippet": { - "text": "#pragma once\r\n\r\n#ifndef __FUNCTION__\r\n\t#define __FUNCTION__ __func__\r\n#endif\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e86d7e09b3820f86", - "equalIndicator/v1": "addbfb555556c9afa2c729a621e28e4ed8a9306f31d8bbdeb95f7883cf8d7d4d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2027, - "startColumn": 96, - "charOffset": 60088, - "charLength": 7, - "snippet": { - "text": "oldItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2025, - "startColumn": 1, - "charOffset": 59988, - "charLength": 216, - "snippet": { - "text": "}\r\n\r\nvoid Player::onUpdateContainerItem(std::shared_ptr container, std::shared_ptr oldItem, std::shared_ptr newItem) {\r\n\tif (oldItem != newItem) {\r\n\t\tonRemoveContainerItem(container, oldItem);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "49143d009bd30042", - "equalIndicator/v1": "ade267027c0f84167203e444cc4b53680da806422a1f9d6807219df047f05e18" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6001, - "startColumn": 94, - "charOffset": 191303, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5999, - "startColumn": 1, - "charOffset": 191205, - "charLength": 140, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendTradeItemRequest(const std::string &traderName, std::shared_ptr item, bool ack) {\r\n\tNetworkMessage msg;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e33ead68a6592f87", - "equalIndicator/v1": "ae186bca3b86fb0e07e3971d2760ddac6ec43640b44380ee4bff19504c2fc0fe" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 487, - "startColumn": 92, - "charOffset": 18419, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 485, - "startColumn": 1, - "charOffset": 18323, - "charLength": 332, - "snippet": { - "text": "}\r\n\r\nbool EventCallback::playerOnMoveItem(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPos, const Position &toPos, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) const {\r\n\tif (!getScriptInterface()) {\r\n\t\tg_logger().error(\"script interface nullptr\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b6710043c5619627", - "equalIndicator/v1": "ae44223faf04ea3b24c576889572c0dd0bb1aef2a5b60e86b5ac656e194220d5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 9775, - "startColumn": 46, - "charOffset": 342205, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 9773, - "startColumn": 1, - "charOffset": 342155, - "charLength": 182, - "snippet": { - "text": "}\r\n\r\nvoid Game::addPlayer(std::shared_ptr player) {\r\n\tconst std::string &lowercase_name = asLowerCaseString(player->getName());\r\n\tmappedPlayerNames[lowercase_name] = player;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9dfe4c880beecf38", - "equalIndicator/v1": "ae4a5d156503c737faee0ca94512220e1d611da395d1d9ab85894ee9614a1777" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'operator flat_hash_map' must be marked explicit to avoid unintentional implicit conversions", - "markdown": "'operator flat_hash_map' must be marked explicit to avoid unintentional implicit conversions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/value_wrapper.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 120, - "startColumn": 27, - "charOffset": 3452, - "charLength": 7, - "snippet": { - "text": "MapType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 118, - "startColumn": 1, - "charOffset": 3420, - "charLength": 80, - "snippet": { - "text": "\t}\r\n\r\n\texplicit(false) operator MapType() const {\r\n\t\treturn get();\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f05dcf31b04503a3", - "equalIndicator/v1": "ae5417f71f8c594826694982dafc80ed6d8ac3b5dc97303d95f2b9297dc84c2e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/creaturecallback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 53, - "startColumn": 74, - "charOffset": 1697, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 51, - "startColumn": 1, - "charOffset": 1619, - "charLength": 123, - "snippet": { - "text": "}\r\n\r\nstd::string CreatureCallback::getCreatureClass(std::shared_ptr creature) {\r\n\tif (!creature) {\r\n\t\treturn \"\";\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "00c75da12f303c81", - "equalIndicator/v1": "ae6923ad229eb3b6d7e49a2b43723bb075beb87545af41b82ba40209c30ed19b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 575, - "startColumn": 62, - "charOffset": 15562, - "charLength": 12, - "snippet": { - "text": "statsPercent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 573, - "startColumn": 1, - "charOffset": 15475, - "charLength": 131, - "snippet": { - "text": "\r\n\t\t\tcase STAT_CAPACITY:\r\n\t\t\t\tstats[i] = static_cast(player->getCapacity() * (statsPercent[i] / 100.f));\r\n\t\t\t\tbreak;\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bfebbd47248881ba", - "equalIndicator/v1": "ae7028ae42f56dad00bb5dfc2d2f057f9343069cec58f527dde031946f65f668" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 42, - "startColumn": 14, - "charOffset": 1401, - "charLength": 5, - "snippet": { - "text": "mType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 40, - "startColumn": 1, - "charOffset": 1297, - "charLength": 271, - "snippet": { - "text": "\tskull = mType->info.skull;\r\n\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();\r\n\tbaseSpeed = mType->getBaseSpeed();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1a000597b7acfff3", - "equalIndicator/v1": "ae7efc2e6bbef7bc541483a280918f41df15f6a259be44716baa0f4268eeb460" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/depot/depotlocker.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 27, - "startColumn": 26, - "charOffset": 853, - "charLength": 8, - "snippet": { - "text": "queryAdd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 25, - "startColumn": 1, - "charOffset": 823, - "charLength": 168, - "snippet": { - "text": "}\r\n\r\nReturnValue DepotLocker::queryAdd(int32_t, const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr) {\r\n\treturn RETURNVALUE_NOTENOUGHROOM;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a1c781bbb681c105", - "equalIndicator/v1": "ae841e0098df173388d7c306af07d6d499ddd7c661d744155d00879480657db7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 690, - "startColumn": 15, - "charOffset": 22532, - "charLength": 11, - "snippet": { - "text": "static_cast" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 688, - "startColumn": 1, - "charOffset": 22492, - "charLength": 128, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 3.20f);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "127ed4119858a877", - "equalIndicator/v1": "ae96f96c331d8d8ffcf0adb77b677e285c56945e7de595be257ae943851a4011" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 634, - "startColumn": 67, - "charOffset": 17111, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 632, - "startColumn": 1, - "charOffset": 17040, - "charLength": 173, - "snippet": { - "text": "}\r\n\r\nvoid ConditionAttributes::updateAbsorbs(std::shared_ptr creature) const {\r\n\tfor (uint8_t i = 0; i < COMBAT_COUNT; i++) {\r\n\t\tauto value = getAbsorbByIndex(i);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c618cc67aa92d566", - "equalIndicator/v1": "ae9ca6131ab6750c1117492305cb5e7c75a8435f92ecc0422c9d696bee2397c1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 600, - "startColumn": 71, - "charOffset": 18191, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 598, - "startColumn": 1, - "charOffset": 18078, - "charLength": 226, - "snippet": { - "text": "\r\n\t\t\tif (it.abilities->statsPercent[s]) {\r\n\t\t\t\tplayer->setVarStats(static_cast(s), static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\r\n\t\t\t}\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "56fafca9a30312c5", - "equalIndicator/v1": "aeca1b3f50a6d8867612f4cc8b3100a0abbd7a8bbff8a912a9b5c69c1407a2e5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2435, - "startColumn": 14, - "charOffset": 72452, - "charLength": 12, - "snippet": { - "text": "noneVocation" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2433, - "startColumn": 1, - "charOffset": 72322, - "charLength": 242, - "snippet": { - "text": "\t\t\tconst auto &noneVocation = g_vocations().getVocation(VOCATION_NONE);\r\n\t\t\thealthMax += noneVocation->getHPGain();\r\n\t\t\thealth += noneVocation->getHPGain();\r\n\t\t\tmanaMax += noneVocation->getManaGain();\r\n\t\t\tmana += noneVocation->getManaGain();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "10a4b670c485d7fa", - "equalIndicator/v1": "aecdfc181d309c46d00a7ae8f396ed722552558c5856ddb1d2cfd6ee73042ede" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1107, - "startColumn": 7, - "charOffset": 39656, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1105, - "startColumn": 1, - "charOffset": 39644, - "charLength": 155, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnGainSkillTries - \"\r\n\t\t \"Player {} skill {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3a782457e6b25212", - "equalIndicator/v1": "aed0c0120cef6cc723700fe00225db224dd6f6696437b3ce0d81e239fc47d5c2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3000, - "startColumn": 2, - "charOffset": 91569, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2998, - "startColumn": 1, - "charOffset": 91512, - "charLength": 149, - "snippet": { - "text": "\r\nvoid ProtocolGame::parseGreet(NetworkMessage &msg) {\r\n\tuint32_t npcId = msg.get();\r\n\tg_game().playerNpcGreet(player->getID(), npcId);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a3fa32ea22a56bb0", - "equalIndicator/v1": "aed92ffafd46668b80c21d513ee3ec47c0b708772cf2c31022db6194cbb4dac4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 369, - "startColumn": 27, - "charOffset": 10630, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 367, - "startColumn": 1, - "charOffset": 10598, - "charLength": 129, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\r\n\tenv->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "77b5755aa994f4b8", - "equalIndicator/v1": "aeea0e7a6f2124d85f4505f78bfa06572a53b42d6ed7cd5a488fca757c3b7e97" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions", - "markdown": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/metrics/metrics.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 191, - "startColumn": 2, - "charOffset": 7080, - "charLength": 20, - "snippet": { - "text": "DEFINE_LATENCY_CLASS" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 189, - "startColumn": 1, - "charOffset": 6974, - "charLength": 201, - "snippet": { - "text": "\tDEFINE_LATENCY_CLASS(query, \"query\", \"truncated_query\");\r\n\tDEFINE_LATENCY_CLASS(task, \"task\", \"task\");\r\n\tDEFINE_LATENCY_CLASS(lock, \"lock\", \"scope\");\r\n\r\n\tconst std::vector latencyNames {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3e38cf7d936efdab", - "equalIndicator/v1": "af0b2266b278dd6a688fd3fd47bd1c056b23191518afd959a8e3d57d04a4a25d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/thread/thread_pool.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 29, - "startColumn": 32, - "charOffset": 956, - "charLength": 16, - "snippet": { - "text": "getNumberOfCores" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 27, - "startColumn": 1, - "charOffset": 881, - "charLength": 155, - "snippet": { - "text": "\r\nThreadPool::ThreadPool(Logger &logger) :\r\n\tBS::thread_pool(std::max(getNumberOfCores(), DEFAULT_NUMBER_OF_THREADS)), logger(logger) {\r\n\tstart();\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "94206e61ce82d4c9", - "equalIndicator/v1": "af0c780a3197eaf23d011f8d98342a5804c8c60e32dbac3454b14d609472007a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 46, - "startColumn": 100, - "charOffset": 1901, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 44, - "startColumn": 1, - "charOffset": 1797, - "charLength": 176, - "snippet": { - "text": "}\r\n\r\nCombatDamage Combat::getCombatDamage(std::shared_ptr creature, std::shared_ptr target) const {\r\n\tCombatDamage damage;\r\n\tdamage.origin = params.origin;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c7a08d9db327c815", - "equalIndicator/v1": "af14612ea3b148bee2ab5a710df5fdc30317fd44875fff9b01b5a9bfc119ce5b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Pass by value and use std::move", - "markdown": "Pass by value and use std::move" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/kv.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 124, - "startColumn": 44, - "charOffset": 3932, - "charLength": 17, - "snippet": { - "text": "const std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 122, - "startColumn": 1, - "charOffset": 3844, - "charLength": 175, - "snippet": { - "text": "class ScopedKV final : public KV {\r\npublic:\r\n\tScopedKV(Logger &logger, KVStore &rootKV, const std::string &prefix) :\r\n\t\tlogger(logger), rootKV_(rootKV), prefix_(prefix) { }\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "da817ae96b4d7d51", - "equalIndicator/v1": "af558eb809eb41389247d1bf6221f7fcd141ba1dd42fd29db6a3206ce52ce5bb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')", - "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2478, - "startColumn": 18, - "charOffset": 73734, - "charLength": 23, - "snippet": { - "text": "Player::getPercentLevel" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2476, - "startColumn": 1, - "charOffset": 73678, - "charLength": 169, - "snippet": { - "text": "\r\n\tif (nextLevelExp > currLevelExp) {\r\n\t\tlevelPercent = Player::getPercentLevel(experience - currLevelExp, nextLevelExp - currLevelExp);\r\n\t} else {\r\n\t\tlevelPercent = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3b98ab978600f729", - "equalIndicator/v1": "af71416114686ae14371af8830dd75d2e72998e21b5fe4d4302397d3fce6ce5e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/container_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 147, - "startColumn": 2, - "charOffset": 4080, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 145, - "startColumn": 1, - "charOffset": 4073, - "charLength": 120, - "snippet": { - "text": "\t}\r\n\r\n\tuint32_t count = getNumber(L, 3, 1);\r\n\tconst ItemType &it = Item::items[itemId];\r\n\tif (it.stackable) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b1a71f9e053b8060", - "equalIndicator/v1": "af719cf489615ea2989250557ead04c129692cf1f8672c7fbc8dabfe64673132" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5383, - "startColumn": 30, - "charOffset": 159190, - "charLength": 7, - "snippet": { - "text": "manaMax" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5381, - "startColumn": 1, - "charOffset": 159120, - "charLength": 160, - "snippet": { - "text": "\r\nuint32_t Player::getMaxMana() const {\r\n\treturn std::max(0, manaMax + varStats[STAT_MAXMANAPOINTS] + m_wheelPlayer->getStat(WheelStat_t::MANA));\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fe96767726a5db0a", - "equalIndicator/v1": "af7572f5bfb65b16577c116b9e2208272bd98b2da38a708bdd8a30f2f26fbc90" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1918, - "startColumn": 2, - "charOffset": 58361, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1916, - "startColumn": 1, - "charOffset": 58299, - "charLength": 222, - "snippet": { - "text": "\r\nvoid ProtocolGame::parseTextWindow(NetworkMessage &msg) {\r\n\tuint32_t windowTextId = msg.get();\r\n\tconst std::string newText = msg.getString();\r\n\tg_game().playerWriteItem(player->getID(), windowTextId, newText);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3ac7d68a070d784c", - "equalIndicator/v1": "af8c182fa11295e5eef267c145c27c2ad7e8b2e02b1e6cb286314977d8d8e886" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/mailbox/mailbox.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 42, - "startColumn": 143, - "charOffset": 1926, - "charLength": 8, - "snippet": { - "text": "override" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 40, - "startColumn": 1, - "charOffset": 1707, - "charLength": 387, - "snippet": { - "text": "\tvoid removeThing(std::shared_ptr thing, uint32_t count) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "954923152d17ed1e", - "equalIndicator/v1": "af8cb0a7735b0445a523da1e2502244345f79f0e638363d3b67cb05324f44892" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?", - "markdown": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1101, - "startColumn": 7, - "charOffset": 29646, - "charLength": 25, - "snippet": { - "text": "Condition::startCondition" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1099, - "startColumn": 1, - "charOffset": 29556, - "charLength": 150, - "snippet": { - "text": "\r\nbool ConditionRegeneration::startCondition(std::shared_ptr creature) {\r\n\tif (!Condition::startCondition(creature)) {\r\n\t\treturn false;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a8aa6e9d445c6c4c", - "equalIndicator/v1": "afa40049cb255c20bec923e7f20f8aabc6730903501bce97be5f9d3e4776f548" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 459, - "startColumn": 8, - "charOffset": 11414, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 457, - "startColumn": 1, - "charOffset": 11310, - "charLength": 198, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetElementType(lua_State* L) {\r\n\t// itemType:getElementType()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (!itemType) {\r\n\t\tlua_pushnil(L);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fee76af27f7ec76b", - "equalIndicator/v1": "afacc9071ef82f20ccd39634b33296084168a7f4e6e7016cf19a9c7a5ee0545b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3000, - "startColumn": 79, - "charOffset": 111474, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2998, - "startColumn": 1, - "charOffset": 111391, - "charLength": 334, - "snippet": { - "text": "}\r\n\r\nstd::shared_ptr Game::findManagedContainer(std::shared_ptr player, bool &fallbackConsumed, ObjectCategory_t category, bool isLootContainer) {\r\n\tauto lootContainer = player->getManagedContainer(category, isLootContainer);\r\n\tif (!lootContainer && player->quickLootFallbackToMainContainer && !fallbackConsumed) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3ef7a6037553e6b4", - "equalIndicator/v1": "afb493aeaec1844e1b1b718da00b3f960f8a8993ede3f31593052363ec5e43c6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'c' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'c' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1530, - "startColumn": 53, - "charOffset": 45220, - "charLength": 1, - "snippet": { - "text": "c" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1528, - "startColumn": 1, - "charOffset": 45163, - "charLength": 126, - "snippet": { - "text": "}\r\n\r\nbool ProtocolGame::canSee(std::shared_ptr c) const {\r\n\tif (!c || !player || c->isRemoved()) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6c1df0c4fa2b1571", - "equalIndicator/v1": "afc7e90126be418558b1219884caf1e2519227b91cdef3a076772e9b242cf76d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 358, - "startColumn": 55, - "charOffset": 11651, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 356, - "startColumn": 1, - "charOffset": 11592, - "charLength": 179, - "snippet": { - "text": "}\r\n\r\nbool Weapon::executeUseWeapon(std::shared_ptr player, const LuaVariant &var) const {\r\n\t// onUseWeapon(player, var)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "aa18fee78b149f21", - "equalIndicator/v1": "afcd1c5484c14c204205db4ca5fef0ae8170a0f177b798d3967d8016ccd95c47" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'virtual' is redundant since the function is already declared 'override'", - "markdown": "'virtual' is redundant since the function is already declared 'override'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 294, - "startColumn": 18, - "charOffset": 7987, - "charLength": 21, - "snippet": { - "text": "getElementDamageValue" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 292, - "startColumn": 1, - "charOffset": 7943, - "charLength": 96, - "snippet": { - "text": "\t\treturn elementType;\r\n\t}\r\n\tvirtual int16_t getElementDamageValue() const override;\r\n\r\nprivate:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "18354faf39f8cbb4", - "equalIndicator/v1": "afe051aa93dd63bb7d38dcf35b3572e58052daed0462e2d46d2bc5218f480028" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/scheduling/dispatcher.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 159, - "startColumn": 12, - "charOffset": 4273, - "charLength": 7, - "snippet": { - "text": "uint8_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 157, - "startColumn": 1, - "charOffset": 4145, - "charLength": 222, - "snippet": { - "text": "void Dispatcher::mergeAsyncEvents() {\r\n\tconstexpr uint8_t start = static_cast(TaskGroup::GenericParallel);\r\n\tconstexpr uint8_t end = static_cast(TaskGroup::Last);\r\n\r\n\tfor (const auto &thread : threads) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e38bb690bc0a6448", - "equalIndicator/v1": "afe526d061a73be86760d781dd3b3642a86507e8f22cddadbb4409ef2b532b6d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 289, - "startColumn": 10, - "charOffset": 7606, - "charLength": 15, - "snippet": { - "text": "getWeaponDamage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 287, - "startColumn": 1, - "charOffset": 7468, - "charLength": 474, - "snippet": { - "text": "\tbool useWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target) const override;\r\n\r\n\tint32_t getWeaponDamage(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, bool maxDamage = false) const override;\r\n\tint32_t getElementDamage(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) const override;\r\n\tCombatType_t getElementType() const override {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "951e5b5c7faa7498", - "equalIndicator/v1": "b00468f6816e973a6e8759f0a2e2df4e27f3a57c4b06f5c0efcef8cd0e904a64" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'lastHitCreature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'lastHitCreature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4882, - "startColumn": 56, - "charOffset": 145883, - "charLength": 15, - "snippet": { - "text": "lastHitCreature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4880, - "startColumn": 1, - "charOffset": 145823, - "charLength": 122, - "snippet": { - "text": "}\r\n\r\nbool Player::lastHitIsPlayer(std::shared_ptr lastHitCreature) {\r\n\tif (!lastHitCreature) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b860ed1eb896cb1d", - "equalIndicator/v1": "b02cba2a0322550a497a73cad09a705ee6de531343326ec261f9f959d43d1160" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1077, - "startColumn": 47, - "charOffset": 41061, - "charLength": 7, - "snippet": { - "text": "monster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1075, - "startColumn": 1, - "charOffset": 40960, - "charLength": 167, - "snippet": { - "text": "\tgetScriptInterface()->pushFunction(getScriptId());\r\n\r\n\tLuaScriptInterface::pushUserdata(L, monster);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Monster\");\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9c3d3f74e6815148", - "equalIndicator/v1": "b0495d6f018824dfce61d42734404cb7e894ff5b012b788e282b34f083e9357d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 576, - "startColumn": 7, - "charOffset": 22011, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 574, - "startColumn": 1, - "charOffset": 21827, - "charLength": 336, - "snippet": { - "text": "\r\nbool EventCallback::playerOnMoveCreature(std::shared_ptr player, std::shared_ptr creature, const Position &fromPosition, const Position &toPosition) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnMoveCreature - \"\r\n\t\t \"Player {} creature {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a69c546e8dbd9e92", - "equalIndicator/v1": "b04d5db42b428fbbfb068af35621b81b69bd6b5d83bacd7be94826c51646a4fb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/npcs/npc.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 418, - "startColumn": 47, - "charOffset": 14450, - "charLength": 9, - "snippet": { - "text": "totalCost" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 416, - "startColumn": 1, - "charOffset": 14355, - "charLength": 263, - "snippet": { - "text": "\t\t\t\tg_game().addMoney(player, totalCost);\r\n\t\t\t}\r\n\t\t\tg_metrics().addCounter(\"balance_increase\", totalCost, { { \"player\", player->getName() }, { \"context\", \"npc_sale\" } });\r\n\t\t} else {\r\n\t\t\tstd::shared_ptr newItem = Item::CreateItem(getCurrency(), totalCost);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8d4bb227491c47f7", - "equalIndicator/v1": "b04e8999924fc4c1ef11c6ae62d89dfdf64c5fc7577c0c835dee8dd6aa62880d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3477, - "startColumn": 13, - "charOffset": 105244, - "charLength": 9, - "snippet": { - "text": "slotIndex" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3475, - "startColumn": 1, - "charOffset": 105115, - "charLength": 191, - "snippet": { - "text": "\t\t\t\t}\r\n\t\t\t} else if (queryAdd(slotIndex, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) { // empty slot\r\n\t\t\t\tindex = slotIndex;\r\n\t\t\t\t*destItem = nullptr;\r\n\t\t\t\treturn getPlayer();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e4adf84e5ae229f4", - "equalIndicator/v1": "b0503d137c2b186eb1b8275b204f8234535cf37d173cdf2a5c8fe3b9bd22e5ce" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'actor' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'actor' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1944, - "startColumn": 257, - "charOffset": 75955, - "charLength": 5, - "snippet": { - "text": "actor" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1942, - "startColumn": 1, - "charOffset": 75694, - "charLength": 444, - "snippet": { - "text": "}\r\n\r\nReturnValue Game::internalMoveItem(std::shared_ptr fromCylinder, std::shared_ptr toCylinder, int32_t index, std::shared_ptr item, uint32_t count, std::shared_ptr* movedItem, uint32_t flags /*= 0*/, std::shared_ptr actor /*=nullptr*/, std::shared_ptr tradeItem /* = nullptr*/, bool checkTile /* = true*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (fromCylinder == nullptr) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3a71eb2003383527", - "equalIndicator/v1": "b06985432618a591286f3c66c8ac829d732a9004b27f318556e6febfc6336c70" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1134, - "startColumn": 2, - "charOffset": 40599, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1132, - "startColumn": 1, - "charOffset": 40592, - "charLength": 46, - "snippet": { - "text": "\t}\r\n\r\n\tscriptInterface.resetScriptEnv();\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a278d7224541af57", - "equalIndicator/v1": "b09789129abb6852a79308d7b8628cd00ae4bc8345a49b30a0ede46b91ab1e51" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 295, - "startColumn": 15, - "charOffset": 7651, - "charLength": 12, - "snippet": { - "text": "std::tolower" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 293, - "startColumn": 1, - "charOffset": 7595, - "charLength": 85, - "snippet": { - "text": "\t\t\t\tcapitalizeNext = false;\r\n\t\t\t} else {\r\n\t\t\t\tresult += std::tolower(ch);\r\n\t\t\t}\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cbbb4b52890c1509", - "equalIndicator/v1": "b09a7d26ff935fbdf6b161533c39a4dfafdf96522bdc49400518e883eda0112d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_classification_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 32, - "startColumn": 2, - "charOffset": 1142, - "charLength": 18, - "snippet": { - "text": "ItemClassification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 30, - "startColumn": 1, - "charOffset": 956, - "charLength": 326, - "snippet": { - "text": "int ItemClassificationFunctions::luaItemClassificationAddTier(lua_State* L) {\r\n\t// itemClassification:addTier(id, core, regularPrice, convergenceFusionPrice, convergenceTransferPrice)\r\n\tItemClassification* itemClassification = getUserdata(L, 1);\r\n\tif (itemClassification) {\r\n\t\titemClassification->addTier(\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c85794ae5e1ad7c0", - "equalIndicator/v1": "b0c33fb1280b1952d26a32e19284e80b154d16816ffdcd8b3d070a0518207f30" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 299, - "startColumn": 7, - "charOffset": 10730, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 297, - "startColumn": 1, - "charOffset": 10718, - "charLength": 158, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventCreatureOnTargetCombat - \"\r\n\t\t \"Creature {} target {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4a3f6f0b9eb32b5c", - "equalIndicator/v1": "b10ec3bf40c6bcfd0cad6b133632ba8998ced1db02380d75f263e95ed1cd65dc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 488, - "startColumn": 7, - "charOffset": 17304, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 486, - "startColumn": 1, - "charOffset": 17292, - "charLength": 205, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPartyOnDisband - Party leader {}] Call stack \"\r\n\t\t \"overflow. Too many lua script calls being nested.\",\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1bd2eeb6e752673f", - "equalIndicator/v1": "b13d081deab60a133e72bf25fbb59c511b51beb378ae9576a1682d016dfc51ec" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1027, - "startColumn": 8, - "charOffset": 29866, - "charLength": 7, - "snippet": { - "text": "toupper" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1025, - "startColumn": 1, - "charOffset": 29816, - "charLength": 78, - "snippet": { - "text": "\tfor (char &i : str) {\r\n\t\tif (i != ' ') {\r\n\t\t\ti = toupper(i);\r\n\t\t\tbreak;\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e87f06c34ea2ff73", - "equalIndicator/v1": "b148204d73b8be38263daed7ecec1488b0a49e70e05d055e09241730f991f3cc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/cyclopedia/player_badge.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 47, - "startColumn": 2, - "charOffset": 1193, - "charLength": 13, - "snippet": { - "text": "getUnlockedKV" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 45, - "startColumn": 1, - "charOffset": 1114, - "charLength": 225, - "snippet": { - "text": "\r\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\r\n\tgetUnlockedKV()->set(badge.m_name, toSaveTimeStamp);\r\n\tm_badgesUnlocked.emplace_back(badge, toSaveTimeStamp);\r\n\tm_badgesUnlocked.shrink_to_fit();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2078c43a2b1c4faa", - "equalIndicator/v1": "b183c2841005edbe1ef7a58092949ced768a4fb1afba2b6df1ee50f722e36b35" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3576, - "startColumn": 39, - "charOffset": 110563, - "charLength": 27, - "snippet": { - "text": "Weapons::getMaxWeaponDamage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3574, - "startColumn": 1, - "charOffset": 110270, - "charLength": 532, - "snippet": { - "text": "\t\t\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor, true) * player->getVocation()->distDamageMultiplier);\r\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\r\n\t\t\t\tmaxDamage += static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue - weapon->getAttack() + it.abilities->elementDamage, attackFactor, true) * player->getVocation()->distDamageMultiplier);\r\n\t\t\t}\r\n\t\t\tmsg.add(maxDamage >> 1);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "622e75b601e9bc56", - "equalIndicator/v1": "b1886cd82ee8f119bf1ca23ff1509df6a994ad1e81c1454d26b85d62e654a51e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1011, - "startColumn": 67, - "charOffset": 38433, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1009, - "startColumn": 1, - "charOffset": 38362, - "charLength": 281, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::playerOnStorageUpdate(std::shared_ptr player, const uint32_t key, const int32_t value, int32_t oldValue, uint64_t currentTime) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::eventOnStorageUpdate - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7a8e0347998360f9", - "equalIndicator/v1": "b190e22d4d4a87502706bfbf0aa284a01ede8bc67157ed6085de835fffeea304" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 247, - "startColumn": 59, - "charOffset": 7492, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 245, - "startColumn": 1, - "charOffset": 7429, - "charLength": 210, - "snippet": { - "text": "}\r\n\r\nReturnValue Combat::canDoCombat(std::shared_ptr caster, std::shared_ptr tile, bool aggressive) {\r\n\tif (tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) {\r\n\t\treturn RETURNVALUE_NOTENOUGHROOM;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "eaa02a07e638a511", - "equalIndicator/v1": "b1d8b9271e14ca350a0cff77f4e2734cb0ec08d08bb240a2cb88a3f18af49245" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'podium' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'podium' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7155, - "startColumn": 59, - "charOffset": 224037, - "charLength": 6, - "snippet": { - "text": "podium" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7153, - "startColumn": 1, - "charOffset": 223974, - "charLength": 225, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendPodiumWindow(std::shared_ptr podium, const Position &position, uint16_t itemId, uint8_t stackpos) {\r\n\tif (!podium || oldProtocol) {\r\n\t\tg_logger().error(\"[{}] item is nullptr\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f293ab0ffd3c5cd4", - "equalIndicator/v1": "b1fdfe37b250ee28527a9fec3ff11428f24ee7cb3e59b1e8ebec3d2e17367828" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when declaring iterators", - "markdown": "Use auto when declaring iterators" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 214, - "startColumn": 3, - "charOffset": 6081, - "charLength": 42, - "snippet": { - "text": "std::map::iterator" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 212, - "startColumn": 1, - "charOffset": 6022, - "charLength": 307, - "snippet": { - "text": "\r\n\tif (item->hasAttribute(ItemAttribute_t::ACTIONID)) {\r\n\t\tstd::map::iterator it = actionIdMap.find(item->getAttribute(ItemAttribute_t::ACTIONID));\r\n\t\tif (it != actionIdMap.end()) {\r\n\t\t\tstd::list> moveEventList = it->second.moveEvent[eventType];\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a10513ccd1719d93", - "equalIndicator/v1": "b21f2d62f433aa3929cb4d1d0a954d57b0c762e83adf3bdd1c4ce0781f5da83a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1089, - "startColumn": 20, - "charOffset": 39164, - "charLength": 3, - "snippet": { - "text": "exp" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1087, - "startColumn": 1, - "charOffset": 39090, - "charLength": 135, - "snippet": { - "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\r\n\tlua_pushnumber(L, exp);\r\n\r\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5da4af7447beee92", - "equalIndicator/v1": "b2405a0fe157e1841f71932fe9b6bd7988e6a78af0187e4e398b570381ee4b7b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2196, - "startColumn": 14, - "charOffset": 65818, - "charLength": 5, - "snippet": { - "text": "mType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2194, - "startColumn": 1, - "charOffset": 65741, - "charLength": 156, - "snippet": { - "text": "\r\n\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\r\n\tremoveIcon(\"forge\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "67ade26b2aa4b6a4", - "equalIndicator/v1": "b25e244e6c8cc21c04ad10c9f2f34ed73947f2d683e8cad4f98d280f13d0cefa" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'initDoubleValue' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'initDoubleValue' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/custom_attribute.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 21, - "startColumn": 52, - "charOffset": 729, - "charLength": 12, - "snippet": { - "text": "const double" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 19, - "startColumn": 1, - "charOffset": 506, - "charLength": 335, - "snippet": { - "text": "\tCustomAttribute(const std::string &initStringKey, const int64_t initInt64Value);\r\n\tCustomAttribute(const std::string &initStringKey, const std::string &initStringValue);\r\n\tCustomAttribute(const std::string &initStringKey, const double initDoubleValue);\r\n\tCustomAttribute(const std::string &initStringKey, const bool initBoolValue);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b71746026567b5f1", - "equalIndicator/v1": "b294b22d6c88b21ece400e26394e055cee580a76e9f58891cd1a9b50f038c81a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 285, - "startColumn": 88, - "charOffset": 8813, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 283, - "startColumn": 1, - "charOffset": 8721, - "charLength": 188, - "snippet": { - "text": "}\r\n\r\nbool Combat::isInPvpZone(std::shared_ptr attacker, std::shared_ptr target) {\r\n\treturn attacker->getZoneType() == ZONE_PVP && target->getZoneType() == ZONE_PVP;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c931ce83ed72e3a0", - "equalIndicator/v1": "b29568ac747c938549aa0b9f13e4cbca2b08e361b2d7acc4a84d73df6afb4d20" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructor does not initialize these fields: n, d", - "markdown": "Constructor does not initialize these fields: n, d" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/security/rsa.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 15, - "startColumn": 6, - "charOffset": 470, - "charLength": 3, - "snippet": { - "text": "RSA" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 13, - "startColumn": 1, - "charOffset": 434, - "charLength": 92, - "snippet": { - "text": "#include \"security/rsa.hpp\"\r\n\r\nRSA::RSA(Logger &logger) :\r\n\tlogger(logger) {\r\n\tmpz_init(n);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8722b532ea120822", - "equalIndicator/v1": "b2c26d3b2468eb678865433fbab82fbe33b7058982dffe6f10d048bbc002a3cd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/rewards/rewardchest.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 36, - "startColumn": 19, - "charOffset": 1121, - "charLength": 22, - "snippet": { - "text": "postRemoveNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 34, - "startColumn": 1, - "charOffset": 1098, - "charLength": 207, - "snippet": { - "text": "}\r\n\r\nvoid RewardChest::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tauto parentLocked = m_parent.lock();\r\n\tif (parentLocked) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0d0a17b1fba6910e", - "equalIndicator/v1": "b2c52c7ad096e2523b3e70d5e0c81e87b4991692bb330a02f1d4e04995ccdb53" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 193, - "startColumn": 7, - "charOffset": 7032, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 191, - "startColumn": 1, - "charOffset": 7020, - "charLength": 112, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"{} - \"\r\n\t\t \"Position {}\"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "645ec026d2a7b36d", - "equalIndicator/v1": "b2c55e372e11133f91b85b0c744e94d9c84158f91386cc76683a3e4677909eff" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 198, - "startColumn": 8, - "charOffset": 4994, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 196, - "startColumn": 1, - "charOffset": 4908, - "charLength": 198, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeIsKey(lua_State* L) {\r\n\t// itemType:isKey()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isKey());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "754369d188779ed3", - "equalIndicator/v1": "b2e00dbbd5474a3fdca363e39e584c3840f750a175b4ae7539f10f76fae601bb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Redundant string initialization", - "markdown": "Redundant string initialization" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/vip/player_vip.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 18, - "startColumn": 14, - "charOffset": 512, - "charLength": 4, - "snippet": { - "text": "name" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 16, - "startColumn": 1, - "charOffset": 462, - "charLength": 138, - "snippet": { - "text": "struct VIPGroup {\r\n\tuint8_t id = 0;\r\n\tstd::string name = \"\";\r\n\tbool customizable = false;\r\n\tphmap::flat_hash_set vipGroupGuids;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "78f269a0ac75bb7e", - "equalIndicator/v1": "b31987475bb72c85bd720122ea7fa9267d2d1f882934c573b6257735a2c416ba" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7244, - "startColumn": 48, - "charOffset": 216504, - "charLength": 4, - "snippet": { - "text": "cost" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7242, - "startColumn": 1, - "charOffset": 216436, - "charLength": 165, - "snippet": { - "text": "\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tg_metrics().addCounter(\"balance_decrease\", cost, { { \"player\", getName() }, { \"context\", \"forge_fuse\" } });\r\n\t\t\t\thistory.cost = cost;\r\n\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "db77c7b9bce4b718", - "equalIndicator/v1": "b330ed0530a69ec58482b2d3ff70b9463eb74fa5f11673039e809a794b96c40a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 764, - "startColumn": 6, - "charOffset": 29393, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 762, - "startColumn": 1, - "charOffset": 29357, - "charLength": 179, - "snippet": { - "text": "\tlua_pushnumber(L, rawExp);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 4, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "44da2ba15a4f4bb8", - "equalIndicator/v1": "b33736d86b67eb897ce07a8e3881f633612138797e35d39513ab31906715e04d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/player_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2444, - "startColumn": 53, - "charOffset": 65495, - "charLength": 6, - "snippet": { - "text": "Player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2442, - "startColumn": 1, - "charOffset": 65350, - "charLength": 226, - "snippet": { - "text": "int PlayerFunctions::luaPlayerHasFamiliar(lua_State* L) {\r\n\t// player:hasFamiliar(lookType)\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (player) {\r\n\t\tuint16_t lookType = getNumber(L, 2);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b527efc5c6fabecb", - "equalIndicator/v1": "b346ccd03c74a58840190d472188907e705ddc85ac668866a1ddb2571a01f3a5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/player_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 809, - "startColumn": 4, - "charOffset": 22029, - "charLength": 4, - "snippet": { - "text": "else" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 807, - "startColumn": 1, - "charOffset": 21963, - "charLength": 96, - "snippet": { - "text": "\tif (player) {\r\n\t\tlua_pushnumber(L, player->getSkullTicks());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "544c6f1b75eb68e7", - "equalIndicator/v1": "b34eee0356b1bdee2e63461f0eb24d424c7a5ef56a0bfd90b1cceb1da21709ef" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 298, - "startColumn": 7, - "charOffset": 11074, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 296, - "startColumn": 1, - "charOffset": 10969, - "charLength": 326, - "snippet": { - "text": "\r\nvoid EventCallback::partyOnShareExperience(std::shared_ptr party, uint64_t &exp) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"Party leader {}. Call stack overflow. Too many lua script calls being nested.\", party->getLeader() ? party->getLeader()->getName() : \"unknown\");\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4aeb66b366a092a5", - "equalIndicator/v1": "b35a5da8f474e3312e46c71be1e0900bbfd0df39d60166b71efc423c14635a1a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'callback' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'callback' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/events_callbacks.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 52, - "startColumn": 19, - "charOffset": 1539, - "charLength": 36, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 50, - "startColumn": 1, - "charOffset": 1450, - "charLength": 145, - "snippet": { - "text": "\t * @param callback Pointer to the EventCallback object to add.\r\n\t */\r\n\tvoid addCallback(const std::shared_ptr callback);\r\n\r\n\t/**\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3e8688d59c812630", - "equalIndicator/v1": "b364a213dede21b7d791051da4d8b979e0ec0ce0fa707586138355ebff2b4de0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 271, - "startColumn": 53, - "charOffset": 7565, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 269, - "startColumn": 1, - "charOffset": 7508, - "charLength": 122, - "snippet": { - "text": "}\r\n\r\nbool House::transferToDepot(std::shared_ptr player) const {\r\n\tif (townId == 0 || !player) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a6878e0b54ddb495", - "equalIndicator/v1": "b371442d6ebc74774b823254408173134afc9952b0819ea195a9a9e89a98914e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 679, - "startColumn": 98, - "charOffset": 26058, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 677, - "startColumn": 1, - "charOffset": 25956, - "charLength": 259, - "snippet": { - "text": "}\r\n\r\nbool EventCallback::playerOnTradeRequest(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnTradeRequest - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cda02686c0457c10", - "equalIndicator/v1": "b3d4ded7be497a384199e4b6a47f621a29f21d38823086945ed6e1cf49ba4ec1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6402, - "startColumn": 64, - "charOffset": 202374, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6400, - "startColumn": 1, - "charOffset": 202306, - "charLength": 174, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendPartyPlayerMana(std::shared_ptr target, uint8_t manaPercent) {\r\n\tuint32_t cid = target->getID();\r\n\tif (!knownCreatureSet.contains(cid)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1a567c763be66043", - "equalIndicator/v1": "b3dc1a004d686251ab23d99bad7beb629d75bd81e2978d2429dd849fd860d279" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'newParty' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'newParty' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 376, - "startColumn": 13, - "charOffset": 9922, - "charLength": 8, - "snippet": { - "text": "newParty" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 374, - "startColumn": 1, - "charOffset": 9857, - "charLength": 123, - "snippet": { - "text": "\r\n\tvoid setParty(std::shared_ptr newParty) {\r\n\t\tm_party = newParty;\r\n\t}\r\n\tstd::shared_ptr getParty() const {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ce6b198a6d1bfb35", - "equalIndicator/v1": "b3df7ecf4f7fdd057548030d46a35941a2e6142bc319a3f76577571e96aca697" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2630, - "startColumn": 29, - "charOffset": 99410, - "charLength": 11, - "snippet": { - "text": "removeCount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2628, - "startColumn": 1, - "charOffset": 99240, - "charLength": 213, - "snippet": { - "text": "\t\t\tconst uint32_t removeCount = std::ceil(money / static_cast(worth));\r\n\t\t\taddMoney(cylinder, (worth * removeCount) - money, flags);\r\n\t\t\tinternalRemoveItem(item, removeCount);\r\n\t\t\treturn true;\r\n\t\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6bf63b913db1ea79", - "equalIndicator/v1": "b3e3498267d7e8905ddc46f8c4874dc01ca62192e9aea1c5eef5d86434d55a24" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 949, - "startColumn": 63, - "charOffset": 30356, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 947, - "startColumn": 1, - "charOffset": 30289, - "charLength": 191, - "snippet": { - "text": "}\r\n\r\nbool InstantSpell::executeCastSpell(std::shared_ptr creature, const LuaVariant &var) const {\r\n\t// onCastSpell(creature, var)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2f36700443a4e20d", - "equalIndicator/v1": "b44a08071ca197738f9cd1c9a00f5025f0532f69377ffc6fce16e07a3894de84" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 544, - "startColumn": 7, - "charOffset": 16461, - "charLength": 9, - "snippet": { - "text": "setParent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 542, - "startColumn": 1, - "charOffset": 16449, - "charLength": 149, - "snippet": { - "text": "\t}\r\n\r\n\tvoid setParent(std::weak_ptr cylinder) override final {\r\n\t\tconst auto oldGroundSpeed = walk.groundSpeed;\r\n\t\twalk.groundSpeed = 150;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dbd86e22990e7390", - "equalIndicator/v1": "b4693e63e115377efc33ff4a343b69163411ab3aa4492c1c70e97b1dd239df23" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'", - "markdown": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 107, - "startColumn": 11, - "charOffset": 2622, - "charLength": 4, - "snippet": { - "text": "Tile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 105, - "startColumn": 1, - "charOffset": 2544, - "charLength": 109, - "snippet": { - "text": "\tTile(uint16_t x, uint16_t y, uint8_t z) :\r\n\t\ttilePos(x, y, z) { }\r\n\tvirtual ~Tile() {};\r\n\r\n\t// non-copyable\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1703faaf0983e531", - "equalIndicator/v1": "b4700d4013d2093460e52c918cdfd19c57c3dd2e124e192d1f24510fac5d9ba9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Redundant string initialization", - "markdown": "Redundant string initialization" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 745, - "startColumn": 14, - "charOffset": 25828, - "charLength": 8, - "snippet": { - "text": "password" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 743, - "startColumn": 1, - "charOffset": 25725, - "charLength": 151, - "snippet": { - "text": "\tstd::string sessionKey = msg.getString();\r\n\tstd::string accountDescriptor = sessionKey;\r\n\tstd::string password = \"\";\r\n\r\n\tif (authType != \"session\") {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bc44bc011fe50475", - "equalIndicator/v1": "b4b0b680968915e50ab2ed17a668259758321a787a5a48d52d04657f5402a4b1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/bed.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 153, - "startColumn": 45, - "charOffset": 4061, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 151, - "startColumn": 1, - "charOffset": 4012, - "charLength": 102, - "snippet": { - "text": "}\r\n\r\nbool BedItem::sleep(std::shared_ptr player) {\r\n\tif (house == nullptr) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4e018670f1cff9f7", - "equalIndicator/v1": "b4ce5efc294e799aa6247d6eb0b3f9d97a93036abba197a1037d1f65f70f7b6f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 739, - "startColumn": 3, - "charOffset": 20506, - "charLength": 7, - "snippet": { - "text": "int32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 737, - "startColumn": 1, - "charOffset": 20497, - "charLength": 129, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tint32_t houseId = pugi::cast(houseIdAttribute.value());\r\n\r\n\t\tstd::shared_ptr house = getHouse(houseId);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bb5e89db5e42ded5", - "equalIndicator/v1": "b4ed3c79778f2593accc9e56598493d58fb4e1ba816f5fe2f3071f80ba34652b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/kv.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 154, - "startColumn": 22, - "charOffset": 4902, - "charLength": 6, - "snippet": { - "text": "scoped" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 152, - "startColumn": 1, - "charOffset": 4875, - "charLength": 207, - "snippet": { - "text": "\t}\r\n\r\n\tstd::shared_ptr scoped(const std::string &scope) override final {\r\n\t\tlogger.trace(\"ScopedKV::scoped({})\", buildKey(scope));\r\n\t\treturn std::make_shared(logger, rootKV_, buildKey(scope));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "281280c7441739bc", - "equalIndicator/v1": "b5016e1b5112050b7c77119417db8cb18dac95777bae6bcc9ff1ebe4f9e428b5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1125, - "startColumn": 50, - "charOffset": 33121, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1123, - "startColumn": 1, - "charOffset": 33063, - "charLength": 102, - "snippet": { - "text": "\t\t}\r\n\t}\r\n\tvoid sendCreatureTurn(std::shared_ptr creature) {\r\n\t\tif (!creature) {\r\n\t\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "06d34e024d30f2c4", - "equalIndicator/v1": "b50ea0961e4bb7bbe72f259fbf938c5f9dd130f69689ee52693e06cf5747952e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2387, - "startColumn": 54, - "charOffset": 70547, - "charLength": 3, - "snippet": { - "text": "exp" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2385, - "startColumn": 1, - "charOffset": 70409, - "charLength": 235, - "snippet": { - "text": "\tif (sendText) {\r\n\t\tg_metrics().addCounter(\"player_experience_raw\", rawExp, attrs);\r\n\t\tg_metrics().addCounter(\"player_experience_actual\", exp, attrs);\r\n\t} else {\r\n\t\tg_metrics().addCounter(\"player_experience_bonus_raw\", rawExp, attrs);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f113ca6765d8e625", - "equalIndicator/v1": "b5357044e9478cb1b04a21bd465f434f451a4c79e27715046cdefeb603804da6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/cyclopedia/player_badge.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 47, - "startColumn": 2, - "charOffset": 1193, - "charLength": 15, - "snippet": { - "text": "getUnlockedKV()" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 45, - "startColumn": 1, - "charOffset": 1114, - "charLength": 225, - "snippet": { - "text": "\r\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\r\n\tgetUnlockedKV()->set(badge.m_name, toSaveTimeStamp);\r\n\tm_badgesUnlocked.emplace_back(badge, toSaveTimeStamp);\r\n\tm_badgesUnlocked.shrink_to_fit();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bed7edc8216e86a0", - "equalIndicator/v1": "b559afe32148dd9c48f64e15e5da1ee184b5c0644a27bf1b4b808030a3847612" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 63, - "startColumn": 68, - "charOffset": 1861, - "charLength": 6, - "snippet": { - "text": "action" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 61, - "startColumn": 1, - "charOffset": 1789, - "charLength": 168, - "snippet": { - "text": "}\r\n\r\nbool Actions::registerLuaUniqueEvent(const std::shared_ptr action) {\r\n\tauto uniqueIdVector = action->getUniqueIdsVector();\r\n\tif (uniqueIdVector.empty()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "86d52fc9569c886d", - "equalIndicator/v1": "b57b7a91b176b3350292e37dd7f71e3bfea0fe7851a184314252bcdc259561e6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 865, - "startColumn": 2, - "charOffset": 39340, - "charLength": 7, - "snippet": { - "text": "Slots_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 863, - "startColumn": 1, - "charOffset": 39322, - "charLength": 106, - "snippet": { - "text": "\r\n\t// inventory\r\n\tSlots_t slot = static_cast(pos.y);\r\n\treturn player->getInventoryItem(slot);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8f0597c1c71b3687", - "equalIndicator/v1": "b5859a26a781f473044c777ebec9115d4d023690331534d1845a38b9eec33e98" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1389, - "startColumn": 45, - "charOffset": 42089, - "charLength": 7, - "snippet": { - "text": "dirList" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1387, - "startColumn": 1, - "charOffset": 41948, - "charLength": 183, - "snippet": { - "text": "\tif (!dirList.empty()) {\r\n\t\tstd::shuffle(dirList.begin(), dirList.end(), getRandomGenerator());\r\n\t\tmoveDirection = dirList[uniform_random(0, dirList.size() - 1)];\r\n\t\treturn true;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f99b78e11de31cd6", - "equalIndicator/v1": "b5a26a7a8b9985554cf4423b0d6482f557b2c154b80385e2ee00554dccff4d28" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/player_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1640, - "startColumn": 2, - "charOffset": 43994, - "charLength": 22, - "snippet": { - "text": "// player:getStamina()" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1638, - "startColumn": 1, - "charOffset": 43933, - "charLength": 168, - "snippet": { - "text": "\r\nint PlayerFunctions::luaPlayerGetStamina(lua_State* L) {\r\n\t// player:getStamina()\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (player) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "039bb507859a2f06", - "equalIndicator/v1": "b5a6d6970bbfeb5588339c8ba7f6007928fa622bc1df82baf2da758d30240ca8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 575, - "startColumn": 7, - "charOffset": 16045, - "charLength": 16, - "snippet": { - "text": "auto [key, item]" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 573, - "startColumn": 1, - "charOffset": 15980, - "charLength": 161, - "snippet": { - "text": "\r\n\t// Iterate through all items in the player's inventory\r\n\tfor (auto [key, item] : getAllSlotItems()) {\r\n\t\t// Iterate through all imbuement slots on the item\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b1166bc1624bd983", - "equalIndicator/v1": "b5f26713fa2d5174035bba9af016e17be943d5ca3f0491e4cd75110db3328caf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'", - "markdown": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 82, - "startColumn": 34, - "charOffset": 2580, - "charLength": 9, - "snippet": { - "text": "getPlayer" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 80, - "startColumn": 1, - "charOffset": 2503, - "charLength": 114, - "snippet": { - "text": "\t\treturn static_self_cast();\r\n\t}\r\n\tvirtual std::shared_ptr getPlayer() {\r\n\t\treturn nullptr;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8588d363733ec888", - "equalIndicator/v1": "b6017b53c4cfeba16f754d7dcc840198c9e2a8e404694a938b16bb32f79a3041" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/vocations/vocation.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 257, - "startColumn": 2, - "charOffset": 8563, - "charLength": 8, - "snippet": { - "text": "uint64_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 255, - "startColumn": 1, - "charOffset": 8556, - "charLength": 203, - "snippet": { - "text": "\t}\r\n\r\n\tuint64_t tries = static_cast(skillBase[skill] * std::pow(static_cast(skillMultipliers[skill]), level - (minSkillLevel + 1)));\r\n\tcacheSkill[skill][level] = tries;\r\n\treturn tries;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "28f9cb3437b6af8d", - "equalIndicator/v1": "b606824b4adc4a89f4faab875c4e29891e9e2a8e2dba7ceab8d129796272f9d0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 973, - "startColumn": 52, - "charOffset": 31227, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 971, - "startColumn": 1, - "charOffset": 31171, - "charLength": 146, - "snippet": { - "text": "}\r\n\r\nbool InstantSpell::canCast(std::shared_ptr player) const {\r\n\tif (player->hasFlag(PlayerFlags_t::CannotUseSpells)) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "288c42e65d5d7454", - "equalIndicator/v1": "b62932d872a6c259ab44a03e02c33623c3b9b8bf9862305516cf2756597d9bce" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'targetPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'targetPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7484, - "startColumn": 26, - "charOffset": 260703, - "charLength": 12, - "snippet": { - "text": "targetPlayer" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7482, - "startColumn": 1, - "charOffset": 260538, - "charLength": 269, - "snippet": { - "text": "void Game::buildMessageAsTarget(\r\n\tstd::shared_ptr attacker, const CombatDamage &damage, std::shared_ptr attackerPlayer,\r\n\tstd::shared_ptr targetPlayer, TextMessage &message, std::stringstream &ss,\r\n\tconst std::string &damageString\r\n) const {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b8c7596627fbb9f1", - "equalIndicator/v1": "b65a9b6fa5fd92a5e867297fe7dea7c8e93204a6499bb3fdd21eb9117149b69f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", - "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/movement/position.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 90, - "startColumn": 10, - "charOffset": 3016, - "charLength": 8, - "snippet": { - "text": "Position" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 88, - "startColumn": 1, - "charOffset": 2956, - "charLength": 106, - "snippet": { - "text": "\r\n\tPosition operator+(const Position &p1) const {\r\n\t\treturn Position(x + p1.x, y + p1.y, z + p1.z);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2cc7421a0279e259", - "equalIndicator/v1": "b67b2cd4d40ee721dbbd0f72933af673e760aea088826b618fcfeff011fe47d6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'houseTile' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'houseTile' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 365, - "startColumn": 143, - "charOffset": 10572, - "charLength": 9, - "snippet": { - "text": "houseTile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 363, - "startColumn": 1, - "charOffset": 10425, - "charLength": 284, - "snippet": { - "text": "}\r\n\r\nvoid House::handleWrapableItem(ItemList &moveItemList, std::shared_ptr item, std::shared_ptr player, std::shared_ptr houseTile) const {\r\n\tif (item->isWrapContainer()) {\r\n\t\tg_logger().debug(\"[{}] found wrapable item '{}'\", __FUNCTION__, item->getName());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5a2e601e36159e53", - "equalIndicator/v1": "b67fc1ea9b4cc3c24440b82814f64e494a3360f026aa4ba262451dde39fe67f7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2115, - "startColumn": 27, - "charOffset": 63096, - "charLength": 8, - "snippet": { - "text": "duration" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2113, - "startColumn": 1, - "charOffset": 62992, - "charLength": 145, - "snippet": { - "text": "\r\n\tbool shouldUpdate = mType->info.targetDistance > distance ? true : false;\r\n\tchallengeMeleeDuration = duration;\r\n\ttargetDistance = distance;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "907c2ce45f2829a1", - "equalIndicator/v1": "b68291aefde02fa6b163ffd646f5dff09dbb181a2de3b9aeb4c094c1671b455e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/kv.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 159, - "startColumn": 34, - "charOffset": 5122, - "charLength": 4, - "snippet": { - "text": "keys" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 157, - "startColumn": 1, - "charOffset": 5083, - "charLength": 133, - "snippet": { - "text": "\t}\r\n\r\n\tstd::unordered_set keys(const std::string &prefix = \"\") override {\r\n\t\treturn rootKV_.keys(buildKey(prefix));\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f9deadab3c9202f5", - "equalIndicator/v1": "b6a1cf1050c693a5ea2e963321f4d25ab1e8edc018ff645c922f7f78f1417fd2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1847, - "startColumn": 2, - "charOffset": 56272, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1845, - "startColumn": 1, - "charOffset": 56232, - "charLength": 108, - "snippet": { - "text": "\tstd::vector listedItems;\r\n\r\n\tuint16_t size = msg.get();\r\n\tlistedItems.reserve(size);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "667fe3c859ee1c23", - "equalIndicator/v1": "b6b367ad90f850b4ed29fba6b00630f7d40ffee884ec27c5a74a07a00a6a5be6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iomarket.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 256, - "startColumn": 2, - "charOffset": 9099, - "charLength": 13, - "snippet": { - "text": "MarketOfferEx" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 254, - "startColumn": 1, - "charOffset": 9013, - "charLength": 213, - "snippet": { - "text": "\r\nMarketOfferEx IOMarket::getOfferByCounter(uint32_t timestamp, uint16_t counter) {\r\n\tMarketOfferEx offer;\r\n\r\n\tconst int32_t created = timestamp - g_configManager().getNumber(MARKET_OFFER_DURATION, __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6bdb2daab0a56f5b", - "equalIndicator/v1": "b6e99d45ed26f00e63e501b55955fb27f1e07b6f670f1885447ebd4d5038ca19" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1151, - "startColumn": 27, - "charOffset": 41267, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1149, - "startColumn": 1, - "charOffset": 41235, - "charLength": 125, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnCombat, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "829451f9cd122ed4", - "equalIndicator/v1": "b6f2aced6bd292c4708f59c5a7ef4c23889b1b76ff36204f3e804e8158c76f3b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use std::make_unique instead", - "markdown": "Use std::make_unique instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/server.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 157, - "startColumn": 13, - "charOffset": 4151, - "charLength": 5, - "snippet": { - "text": "reset" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 155, - "startColumn": 1, - "charOffset": 4052, - "charLength": 448, - "snippet": { - "text": "\ttry {\r\n\t\tif (g_configManager().getBoolean(BIND_ONLY_GLOBAL_ADDRESS, __FUNCTION__)) {\r\n\t\t\tacceptor.reset(new asio::ip::tcp::acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::address(asio::ip::address_v4::from_string(g_configManager().getString(IP, __FUNCTION__))), serverPort)));\r\n\t\t} else {\r\n\t\t\tacceptor.reset(new asio::ip::tcp::acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::address(asio::ip::address_v4(INADDR_ANY)), serverPort)));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "256cc78d5ea2cfb2", - "equalIndicator/v1": "b6f63f1976c50d0b0d0256fe293079c7f3aa163bb43c18b278ba8db70878e329" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructor does not initialize these fields: nodesTable, calculatedNodes", - "markdown": "Constructor does not initialize these fields: nodesTable, calculatedNodes" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/utils/astarnodes.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 16, - "startColumn": 13, - "charOffset": 525, - "charLength": 10, - "snippet": { - "text": "AStarNodes" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 14, - "startColumn": 1, - "charOffset": 471, - "charLength": 163, - "snippet": { - "text": "#include \"creatures/combat/combat.hpp\"\r\n\r\nAStarNodes::AStarNodes(uint32_t x, uint32_t y, int_fast32_t extraCost) :\r\n\topenNodes(), nodes() {\r\n#if defined(__AVX2__)\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "05e77cfde4fd3aa7", - "equalIndicator/v1": "b74fc40db36f6b92710d390fb5669cc4919b15797515a6dc980ead5c4325f7ed" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 301, - "startColumn": 84, - "charOffset": 12647, - "charLength": 14, - "snippet": { - "text": "const uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 299, - "startColumn": 1, - "charOffset": 12261, - "charLength": 492, - "snippet": { - "text": "\tvoid playerBosstiarySlot(uint32_t playerId, uint8_t slotId, uint32_t selectedBossId);\r\n\tvoid playerSetMonsterPodium(uint32_t playerId, uint32_t monsterRaceId, const Position &pos, uint8_t stackPos, const uint16_t itemId, uint8_t direction, const std::pair &podiumAndMonsterVisible);\r\n\tvoid playerRotatePodium(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\r\n\tvoid playerRequestInventoryImbuements(uint32_t playerId, bool isTrackerOpen);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "090b9bfbaff156e4", - "equalIndicator/v1": "b74fe1203a57df8d558356bac1bcdbb48dd5c6b8b324a5da8d11e3947139c30c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::_Tree, std::less>, std::allocator>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::_Tree, std::less\\>, std::allocator\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 995, - "startColumn": 2, - "charOffset": 30134, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 993, - "startColumn": 1, - "charOffset": 30057, - "charLength": 211, - "snippet": { - "text": "\tint index = 0;\r\n\tlua_createtable(L, monsterType->info.scripts.size(), 0);\r\n\tfor (const std::string &creatureEvent : monsterType->info.scripts) {\r\n\t\tpushString(L, creatureEvent);\r\n\t\tlua_rawseti(L, -2, ++index);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "49ef07c9dbe31692", - "equalIndicator/v1": "b7558bcfd2e068059f3eaae778c5dd9f1fa0162b415bc57ad490a78038bb7d42" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1724, - "startColumn": 61, - "charOffset": 60170, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1722, - "startColumn": 1, - "charOffset": 60103, - "charLength": 219, - "snippet": { - "text": "\t}\r\n}\r\nvoid ChainCallback::onChainCombat(std::shared_ptr creature, uint8_t &maxTargets, uint8_t &chainDistance, bool &backtracking) {\r\n\t// onChainCombat(creature)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "99c306a83af5764e", - "equalIndicator/v1": "b786b1ce9f45ed9c997a6e2815a31e777c488725d72d1a9f28f103896f1173a6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'result' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'result' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8435, - "startColumn": 49, - "charOffset": 293354, - "charLength": 6, - "snippet": { - "text": "result" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8433, - "startColumn": 1, - "charOffset": 293301, - "charLength": 229, - "snippet": { - "text": "}\r\n\r\nvoid Game::processHighscoreResults(DBResult_ptr result, uint32_t playerID, uint8_t category, uint32_t vocation, uint8_t entriesPerPage) {\r\n\tstd::shared_ptr player = g_game().getPlayerByID(playerID);\r\n\tif (!player) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "aae1e2c0123de377", - "equalIndicator/v1": "b7b018b313dfcf97529c88fe592a0e2d4ee67a6f1a57bea17bfbe389e0d45d9e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6915, - "startColumn": 31, - "charOffset": 240099, - "charLength": 38, - "snippet": { - "text": "(damage.secondary.value * damageBonus)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6913, - "startColumn": 1, - "charOffset": 239967, - "charLength": 190, - "snippet": { - "text": "\t\t\tif (damageBonus != 0) {\r\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\r\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\r\n\t\t\t}\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2eca040cc8389a90", - "equalIndicator/v1": "b7d0972c7e41fb86caf010c1624429bb644d0c1012d67696fc71034148809883" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'guild' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'guild' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 565, - "startColumn": 16, - "charOffset": 29537, - "charLength": 28, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 563, - "startColumn": 1, - "charOffset": 29342, - "charLength": 272, - "snippet": { - "text": "\tstd::shared_ptr getGuild(uint32_t id, bool allowOffline = false) const;\r\n\tstd::shared_ptr getGuildByName(const std::string &name, bool allowOffline = false) const;\r\n\tvoid addGuild(const std::shared_ptr guild);\r\n\tvoid removeGuild(uint32_t guildId);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1405918100b1863d", - "equalIndicator/v1": "b8172ebdfb1c0f414da73e48a1ceb3bd40422b18c36891dacd6385b755a57fac" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'name' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'name' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/raids.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 205, - "startColumn": 16, - "charOffset": 4775, - "charLength": 4, - "snippet": { - "text": "name" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 203, - "startColumn": 1, - "charOffset": 4715, - "charLength": 72, - "snippet": { - "text": "\t}\r\n\tvoid setScriptName(std::string name) {\r\n\t\tscriptName = name;\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "26797eddd083ecbe", - "equalIndicator/v1": "b85d61a72690d0a6a38ae19415e95139a866dc09b512a7c1e1daa9e87ccc8d47" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int64_t' (aka 'long long') is implementation-defined", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int64_t' (aka 'long long') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2483, - "startColumn": 32, - "charOffset": 73898, - "charLength": 3, - "snippet": { - "text": "exp" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2481, - "startColumn": 1, - "charOffset": 73848, - "charLength": 61, - "snippet": { - "text": "\t}\r\n\tsendStats();\r\n\tsendExperienceTracker(rawExp, exp);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "56d4e80384a3fb3c", - "equalIndicator/v1": "b8614a966843ce9095cc9ee829e0598895fbcc0a6fbbd997f9a36a9988a8568f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'door' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'door' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 411, - "startColumn": 46, - "charOffset": 12009, - "charLength": 4, - "snippet": { - "text": "door" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 409, - "startColumn": 1, - "charOffset": 11959, - "charLength": 151, - "snippet": { - "text": "}\r\n\r\nvoid House::removeDoor(std::shared_ptr door) {\r\n\tauto it = std::find(doorList.begin(), doorList.end(), door);\r\n\tif (it != doorList.end()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b919e7577a6fb48c", - "equalIndicator/v1": "b86e38d5653908903629ca164203020be750228eabaff06fdb54cc6ee40d7b74" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use range-based for loop instead", - "markdown": "Use range-based for loop instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1344, - "startColumn": 3, - "charOffset": 39394, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1342, - "startColumn": 1, - "charOffset": 39332, - "charLength": 173, - "snippet": { - "text": "\r\n\tif (const CreatureVector* creatures = getCreatures()) {\r\n\t\tfor (auto it = creatures->rbegin(); it != creatures->rend(); ++it) {\r\n\t\t\tif (*it == creature) {\r\n\t\t\t\treturn n;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "33782713e833e59f", - "equalIndicator/v1": "b87baf031bd0cc2513e9836635bdbcc05773ae7425ba157f0229ec926a841191" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to 'float'", - "markdown": "Narrowing conversion from 'int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 630, - "startColumn": 27, - "charOffset": 16959, - "charLength": 56, - "snippet": { - "text": "(100 - creature->getAbsorbPercent(indexToCombatType(i)))" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 628, - "startColumn": 1, - "charOffset": 16914, - "charLength": 128, - "snippet": { - "text": "\t\t\tcontinue;\r\n\t\t}\r\n\t\tsetAbsorb(i, std::round((100 - creature->getAbsorbPercent(indexToCombatType(i))) * value / 100.f));\r\n\t}\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "136b3592728a2493", - "equalIndicator/v1": "b8ac133beb52d3a6b91b7410593caa849cc6b500df2783047bd7d10cf748b777" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3491, - "startColumn": 15, - "charOffset": 105783, - "charLength": 12, - "snippet": { - "text": "tmpContainer" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3489, - "startColumn": 1, - "charOffset": 105628, - "charLength": 241, - "snippet": { - "text": "\t\t\t\twhile (n) {\r\n\t\t\t\t\tif (tmpContainer->queryAdd(tmpContainer->capacity() - n, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) {\r\n\t\t\t\t\t\tindex = tmpContainer->capacity() - n;\r\n\t\t\t\t\t\t*destItem = nullptr;\r\n\t\t\t\t\t\treturn tmpContainer;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4b14cbcc02825520", - "equalIndicator/v1": "b8b69af396730b5f04a90381d7668d473b50ed2aab4118de59fc3a27ec6b42eb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/cylinder.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 40, - "startColumn": 16, - "charOffset": 1053, - "charLength": 16, - "snippet": { - "text": "internalAddThing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 38, - "startColumn": 1, - "charOffset": 1033, - "charLength": 71, - "snippet": { - "text": "}\r\n\r\nvoid Cylinder::internalAddThing(std::shared_ptr) {\r\n\t//\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f5870b2214122e7e", - "equalIndicator/v1": "b8ce5609a4d56f1ea544b7190848cfc80256bb47edbabe84c95c7621669c8bdd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 590, - "startColumn": 13, - "charOffset": 28431, - "charLength": 11, - "snippet": { - "text": "stringValue" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 588, - "startColumn": 1, - "charOffset": 28241, - "charLength": 413, - "snippet": { - "text": "\t} else if (stringValue == \"absorbpercentholy\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentdeath\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentlifedrain\") {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cdedfbebc46519d6", - "equalIndicator/v1": "b92fde3b733b3a940c6bff93f4fc9438e8c53408d1b9edd34b60988ba3192d21" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 355, - "startColumn": 9, - "charOffset": 11543, - "charLength": 40, - "snippet": { - "text": "(player->getMaxHealth() * healthPercent)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 353, - "startColumn": 1, - "charOffset": 11529, - "charLength": 67, - "snippet": { - "text": "\t}\r\n\r\n\treturn (player->getMaxHealth() * healthPercent) / 100;\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b0abbdedf36c042e", - "equalIndicator/v1": "b94131d9dee1d2988a656feb6ffc8a6624e83c0a2523285acde1a19f74cdc9dd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 58, - "startColumn": 35, - "charOffset": 1617, - "charLength": 12, - "snippet": { - "text": "getContainer" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 56, - "startColumn": 1, - "charOffset": 1577, - "charLength": 123, - "snippet": { - "text": "\t}\r\n\r\n\tstd::shared_ptr getContainer() const override final {\r\n\t\treturn static_self_cast();\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1b57bed8c87f043e", - "equalIndicator/v1": "b941683b25e869c07b2a856f6bb772b997f4ed36adc39f83948a2fbc949aadad" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 173, - "startColumn": 47, - "charOffset": 6504, - "charLength": 7, - "snippet": { - "text": "monster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 171, - "startColumn": 1, - "charOffset": 6403, - "charLength": 214, - "snippet": { - "text": "\tscriptInterface.pushFunction(info.monsterOnSpawn);\r\n\r\n\tLuaScriptInterface::pushUserdata(L, monster);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Monster\");\r\n\tLuaScriptInterface::pushPosition(L, position);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7d2bcec969a60dcf", - "equalIndicator/v1": "b952d02d2339bc17be7bfb0bc47b8b1a5eef2b9b58a1a8fbfa0c032cc3b06648" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 397, - "startColumn": 70, - "charOffset": 17132, - "charLength": 31, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 395, - "startColumn": 1, - "charOffset": 16900, - "charLength": 349, - "snippet": { - "text": "\tvoid sendUpdateTileItem(const Position &pos, uint32_t stackpos, std::shared_ptr item);\r\n\tvoid sendRemoveTileThing(const Position &pos, uint32_t stackpos);\r\n\tvoid sendUpdateTileCreature(const Position &pos, uint32_t stackpos, const std::shared_ptr creature);\r\n\tvoid sendUpdateTile(std::shared_ptr tile, const Position &pos);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bd570a2792e1442b", - "equalIndicator/v1": "b975affac7d829f71a2ef53c8af4a45bd9c40860ca5a675db68caf3c7b90dbf3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 381, - "startColumn": 55, - "charOffset": 12564, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 379, - "startColumn": 1, - "charOffset": 12505, - "charLength": 127, - "snippet": { - "text": "}\r\n\r\nvoid Weapon::decrementItemCount(std::shared_ptr item) {\r\n\tuint16_t count = item->getItemCount();\r\n\tif (count > 1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cc5162903f5dc3bb", - "equalIndicator/v1": "b979f32720469306d33e3292b251ba11b5582c482f4c7706aa2eb7ae4d1fb4c8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'exclude' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'exclude' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 60, - "startColumn": 46, - "charOffset": 2128, - "charLength": 7, - "snippet": { - "text": "exclude" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 58, - "startColumn": 1, - "charOffset": 2078, - "charLength": 167, - "snippet": { - "text": "}\r\n\r\nbool Tile::hasProperty(std::shared_ptr exclude, ItemProperty prop) const {\r\n\tif (!exclude) {\r\n\t\tg_logger().error(\"[{}]: exclude is nullptr\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "80269993f729f9aa", - "equalIndicator/v1": "b97a812ec4e53d3dcf3564a1eb3b51160417ff880c7b64368053b948d984078f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 473, - "startColumn": 45, - "charOffset": 16907, - "charLength": 5, - "snippet": { - "text": "party" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 471, - "startColumn": 1, - "charOffset": 16810, - "charLength": 159, - "snippet": { - "text": "\tscriptInterface.pushFunction(info.partyOnLeave);\r\n\r\n\tLuaScriptInterface::pushUserdata(L, party);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Party\");\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4ea6b43a2d976d71", - "equalIndicator/v1": "b98777237896234e8a09b8b6bb87a4f2edf17591b0411b48d54f4998679edc61" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'owner' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'owner' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1030, - "startColumn": 47, - "charOffset": 28857, - "charLength": 5, - "snippet": { - "text": "owner" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1028, - "startColumn": 1, - "charOffset": 28806, - "charLength": 121, - "snippet": { - "text": "}\r\n\r\nvoid Item::setOwner(std::shared_ptr owner) {\r\n\tauto ownerId = owner->getID();\r\n\tif (owner->getPlayer()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "79e397becc2f6712", - "equalIndicator/v1": "b9acb47438f81a9c3435f9eccfe5f4affb246b0deb8ef50495966a4aec822125" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 303, - "startColumn": 80, - "charOffset": 9030, - "charLength": 14, - "snippet": { - "text": "const uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 301, - "startColumn": 1, - "charOffset": 8810, - "charLength": 327, - "snippet": { - "text": "\tstatic std::string parseShowDurationSpeed(int32_t speed, bool &begin);\r\n\tstatic std::string parseShowDuration(std::shared_ptr item);\r\n\tstatic std::string parseShowAttributesDescription(std::shared_ptr item, const uint16_t itemId);\r\n\tstatic std::string parseClassificationDescription(std::shared_ptr item);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9bb6503f8845321f", - "equalIndicator/v1": "b9b6605603fa23fdcf4fa038511fd8529eca4b4c9a54c05528df522bee62a862" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/creaturecallback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 38, - "startColumn": 71, - "charOffset": 1131, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 36, - "startColumn": 1, - "charOffset": 1056, - "charLength": 192, - "snippet": { - "text": "}\r\n\r\nvoid CreatureCallback::pushSpecificCreature(std::shared_ptr creature) {\r\n\tif (std::shared_ptr npc = creature->getNpc()) {\r\n\t\tLuaScriptInterface::pushUserdata(L, npc);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7505d9d72ef24c4a", - "equalIndicator/v1": "b9d3a7627af97c5fd6e3f72346e3dd407f03ed5bc567b8341cf9049d047f938a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 218, - "startColumn": 8, - "charOffset": 6952, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 216, - "startColumn": 1, - "charOffset": 6812, - "charLength": 339, - "snippet": { - "text": "\t\t// onCreatureMove(self, creature, oldPosition, newPosition)\r\n\t\tLuaScriptInterface* scriptInterface = mType->info.scriptInterface;\r\n\t\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\t\tg_logger().error(\"[Monster::onCreatureMove - Monster {} creature {}] \"\r\n\t\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "eab79466dd035d3e", - "equalIndicator/v1": "ba288255bb788647ac97b0bcc9c8ce327bde5f3adab4af5a0006a6fe1864ff97" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 730, - "startColumn": 71, - "charOffset": 35925, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 728, - "startColumn": 1, - "charOffset": 35850, - "charLength": 234, - "snippet": { - "text": "}\r\n\r\nstd::shared_ptr Game::internalGetThing(std::shared_ptr player, const Position &pos, int32_t index, uint32_t itemId, StackPosType_t type) {\r\n\tif (pos.x != 0xFFFF) {\r\n\t\tstd::shared_ptr tile = map.getTile(pos);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "90530e80b87e2982", - "equalIndicator/v1": "ba298a4f506fda05fa9f16b824316ea9667beac22435cb15ed3ea522100191ed" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/player_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1405, - "startColumn": 35, - "charOffset": 49101, - "charLength": 17, - "snippet": { - "text": "m_playerBonusData" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1403, - "startColumn": 1, - "charOffset": 48933, - "charLength": 335, - "snippet": { - "text": "\taddStat(WheelStat_t::MANA, m_playerBonusData.stats.mana);\r\n\taddStat(WheelStat_t::CAPACITY, m_playerBonusData.stats.capacity * 100);\r\n\taddStat(WheelStat_t::MITIGATION, m_playerBonusData.mitigation * 100);\r\n\taddStat(WheelStat_t::DAMAGE, m_playerBonusData.stats.damage);\r\n\taddStat(WheelStat_t::HEALING, m_playerBonusData.stats.healing);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a129cf8012047e07", - "equalIndicator/v1": "ba2b4026ba8031943d673bbe5d8e213925073a462ac50ade23fd7b363e710476" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1303, - "startColumn": 20, - "charOffset": 46363, - "charLength": 11, - "snippet": { - "text": "currentTime" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1301, - "startColumn": 1, - "charOffset": 46285, - "charLength": 133, - "snippet": { - "text": "\tlua_pushnumber(L, value);\r\n\tlua_pushnumber(L, oldValue);\r\n\tlua_pushnumber(L, currentTime);\r\n\r\n\tscriptInterface.callVoidFunction(5);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "879cdac0387c621c", - "equalIndicator/v1": "ba304b27deea222a8cab37119f1ccb5ddfa38d4145449f60a672b704bdda2da0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 28, - "startColumn": 2, - "charOffset": 836, - "charLength": 6, - "snippet": { - "text": "size_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 26, - "startColumn": 1, - "charOffset": 813, - "charLength": 128, - "snippet": { - "text": "\tstd::string line;\r\n\r\n\tsize_t offset = static_cast(result.offset);\r\n\tsize_t lineOffsetPosition = 0;\r\n\tsize_t index = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c28dfbff83e9eca4", - "equalIndicator/v1": "ba3a4cfa8fcb1dc62091138dc69216c98b413502ea6c040dbe0ea64aecd33cce" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3277, - "startColumn": 64, - "charOffset": 121419, - "charLength": 9, - "snippet": { - "text": "container" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3275, - "startColumn": 1, - "charOffset": 121351, - "charLength": 308, - "snippet": { - "text": "}\r\n\r\nstd::shared_ptr searchForItem(std::shared_ptr container, uint16_t itemId, bool hasTier /* = false*/, uint8_t tier /* = 0*/) {\r\n\tfor (ContainerIterator it = container->iterator(); it.hasNext(); it.advance()) {\r\n\t\tif ((*it)->getID() == itemId && (!hasTier || (*it)->getTier() == tier)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bca041fbbd216611", - "equalIndicator/v1": "ba4c07e477f7fddb2e14224555e833d96d74684c31a352deb61954eae9a0a40b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 289, - "startColumn": 84, - "charOffset": 8995, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 287, - "startColumn": 1, - "charOffset": 8907, - "charLength": 276, - "snippet": { - "text": "}\r\n\r\nbool Combat::isProtected(std::shared_ptr attacker, std::shared_ptr target) {\r\n\tuint32_t protectionLevel = g_configManager().getNumber(PROTECTION_LEVEL, __FUNCTION__);\r\n\tif (target->getLevel() < protectionLevel || attacker->getLevel() < protectionLevel) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a8e39ac610231395", - "equalIndicator/v1": "ba52c76dfc358e2c719425821c7b8921163437d162c1633a5a6d0e6d6b4bff0e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3655, - "startColumn": 65, - "charOffset": 109869, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3653, - "startColumn": 1, - "charOffset": 109761, - "charLength": 176, - "snippet": { - "text": "\t\t\tinventory[index] = nullptr;\r\n\t\t} else {\r\n\t\t\tuint8_t newCount = static_cast(std::max(0, item->getItemCount() - count));\r\n\t\t\titem->setItemCount(newCount);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9439f873341587a7", - "equalIndicator/v1": "ba792a986d4256f6c7b7092558fc24b17e4008e983ab0e2921d8dce7f76760c6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/inbox/inbox.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 26, - "startColumn": 7, - "charOffset": 955, - "charLength": 22, - "snippet": { - "text": "postRemoveNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 24, - "startColumn": 1, - "charOffset": 794, - "charLength": 346, - "snippet": { - "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r\n\tbool isInbox() const override {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "85ad79c6b878e037", - "equalIndicator/v1": "ba949f6d4d7fba0f9f5a527254f77f279d5f5610422d3adca675905e047df15b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1115, - "startColumn": 27, - "charOffset": 39991, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1113, - "startColumn": 1, - "charOffset": 39959, - "charLength": 133, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnGainSkillTries, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "37761705e03b1d24", - "equalIndicator/v1": "baad084a5181d6e603c861aa56f7853d95d05cc1e83ef35c048acdbf45f697e8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6543, - "startColumn": 57, - "charOffset": 205922, - "charLength": 4, - "snippet": { - "text": "tile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6541, - "startColumn": 1, - "charOffset": 205861, - "charLength": 123, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendUpdateTile(std::shared_ptr tile, const Position &pos) {\r\n\tif (!canSee(pos)) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "370438f7b26532e4", - "equalIndicator/v1": "babcc6116ada04d09c5891af43faae92efd1554b2793296ed2ef1e9e3d05935b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 78, - "startColumn": 21, - "charOffset": 2186, - "charLength": 9, - "snippet": { - "text": "creatures" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 76, - "startColumn": 1, - "charOffset": 2061, - "charLength": 250, - "snippet": { - "text": "\tfor (const auto &tile : houseTiles) {\r\n\t\tif (const CreatureVector* creatures = tile->getCreatures()) {\r\n\t\t\tfor (int32_t i = creatures->size(); --i >= 0;) {\r\n\t\t\t\tconst auto creature = (*creatures)[i];\r\n\t\t\t\tkickPlayer(nullptr, creature->getPlayer());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fba61608409f7651", - "equalIndicator/v1": "bac56c4810c0ff9be41a538a9f2498f27e2efd8999ee16ed9ea3761c87f1e289" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'target' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4841, - "startColumn": 16, - "charOffset": 144717, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4839, - "startColumn": 1, - "charOffset": 144696, - "charLength": 50, - "snippet": { - "text": "\t}\r\n\r\n\taddExperience(target, gainExp, true);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9a856dd95af61b8a", - "equalIndicator/v1": "bac94d54c87d1c8db42700b813082a826830f7836f1273ca484dc1bf4f18a006" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'container' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'container' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2029, - "startColumn": 25, - "charOffset": 60183, - "charLength": 9, - "snippet": { - "text": "container" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2027, - "startColumn": 1, - "charOffset": 59993, - "charLength": 217, - "snippet": { - "text": "void Player::onUpdateContainerItem(std::shared_ptr container, std::shared_ptr oldItem, std::shared_ptr newItem) {\r\n\tif (oldItem != newItem) {\r\n\t\tonRemoveContainerItem(container, oldItem);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fc00a8d8f036f272", - "equalIndicator/v1": "bb071858e0b1bba92cbd54ef8707b53f1221ed3dfbb8a34889a1193252f99d3a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1126, - "startColumn": 61, - "charOffset": 32951, - "charLength": 9, - "snippet": { - "text": "container" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1124, - "startColumn": 1, - "charOffset": 32886, - "charLength": 109, - "snippet": { - "text": "}\r\n\r\nvoid Player::checkLootContainers(std::shared_ptr container) {\r\n\tif (!container) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "67a11ff8bfebdf4d", - "equalIndicator/v1": "bb252e4c1720cd3163db8bd2c9ace9f37c8f9a4205adb19697048ab85a7dfb24" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 360, - "startColumn": 7, - "charOffset": 11727, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 358, - "startColumn": 1, - "charOffset": 11597, - "charLength": 322, - "snippet": { - "text": "bool Weapon::executeUseWeapon(std::shared_ptr player, const LuaVariant &var) const {\r\n\t// onUseWeapon(player, var)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tstd::string playerName = player ? player->getName() : \"Player nullptr\";\r\n\t\tg_logger().error(\"[Weapon::executeUseWeapon - Player {} weaponId {}]\"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f5e64fd2ead17942", - "equalIndicator/v1": "bb4a30c083d788dca157b436b27d835284453d4493e414d39159d8bd56f4dc6f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2032, - "startColumn": 2, - "charOffset": 62242, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2030, - "startColumn": 1, - "charOffset": 62144, - "charLength": 244, - "snippet": { - "text": "void ProtocolGame::parseWrapableItem(NetworkMessage &msg) {\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tg_game().playerWrapableItem(player->getID(), pos, stackpos, itemId);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8eb05c3a05d8775d", - "equalIndicator/v1": "bb505c042e9468713625242ff06bdce356181676d4dcb04fdc61879c7aa663b0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Replace loop by 'std::ranges::any_of()'", - "markdown": "Replace loop by 'std::ranges::any_of()'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/attribute.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 161, - "startColumn": 3, - "charOffset": 5118, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 159, - "startColumn": 1, - "charOffset": 5064, - "charLength": 158, - "snippet": { - "text": "\r\n\tbool hasAttribute(ItemAttribute_t type) const {\r\n\t\tfor (const auto &attr : attributeVector) {\r\n\t\t\tif (attr.getAttributeType() == type) {\r\n\t\t\t\treturn true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4589fb673eb863f7", - "equalIndicator/v1": "bb5e5944ee413f788e3fec2fff4320c19f99c305baa95117d9655cfc1832cf98" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'playerPtr' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'playerPtr' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/scheduling/save_manager.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 53, - "startColumn": 56, - "charOffset": 1400, - "charLength": 9, - "snippet": { - "text": "playerPtr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 51, - "startColumn": 1, - "charOffset": 1340, - "charLength": 136, - "snippet": { - "text": "}\r\n\r\nvoid SaveManager::schedulePlayer(std::weak_ptr playerPtr) {\r\n\tauto playerToSave = playerPtr.lock();\r\n\tif (!playerToSave) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1d657e4012c148f8", - "equalIndicator/v1": "bb651f09f9f9fef9721d0fa9907c5cccdc8a65ab1c360cc2cc55fa0fb39d058a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/weapon_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 254, - "startColumn": 24, - "charOffset": 7101, - "charLength": 19, - "snippet": { - "text": "getNumber" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 252, - "startColumn": 1, - "charOffset": 7002, - "charLength": 208, - "snippet": { - "text": "\tconst auto &weapon = getUserdataShared(L, 1);\r\n\tif (weapon) {\r\n\t\tweapon->setMinChange(getNumber(L, 2));\r\n\t\tif (lua_gettop(L) > 2) {\r\n\t\t\tweapon->setMaxChange(getNumber(L, 3));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "97179b35de9ae7ce", - "equalIndicator/v1": "bbcfef467714423b0d34639514112b143d502d33d5583d4af454d7f632061ac9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 46, - "startColumn": 64, - "charOffset": 1865, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 44, - "startColumn": 1, - "charOffset": 1797, - "charLength": 176, - "snippet": { - "text": "}\r\n\r\nCombatDamage Combat::getCombatDamage(std::shared_ptr creature, std::shared_ptr target) const {\r\n\tCombatDamage damage;\r\n\tdamage.origin = params.origin;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "766aa76056900bb9", - "equalIndicator/v1": "bbe4ed4b7fc336f9c08b28b23ead159832a038f3e2e84845edb4dd4db9a70ada" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructor does not initialize these fields: delay", - "markdown": "Constructor does not initialize these fields: delay" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/raids.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 141, - "startColumn": 7, - "charOffset": 3345, - "charLength": 9, - "snippet": { - "text": "RaidEvent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 139, - "startColumn": 1, - "charOffset": 3333, - "charLength": 67, - "snippet": { - "text": "};\r\n\r\nclass RaidEvent {\r\npublic:\r\n\tvirtual ~RaidEvent() = default;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9a3dfdd73fd6ad1d", - "equalIndicator/v1": "bbef9aa54de097416dd3be632d896524b6b6462e40b5e2452b8954a2dc1445f9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 277, - "startColumn": 59, - "charOffset": 10218, - "charLength": 5, - "snippet": { - "text": "party" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 275, - "startColumn": 1, - "charOffset": 10155, - "charLength": 213, - "snippet": { - "text": "}\r\n\r\nbool EventCallback::partyOnDisband(std::shared_ptr party) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::partyOnDisband - Party leader {}] Call stack \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "291567f21a0aedf4", - "equalIndicator/v1": "bc084c804b340f653187055083b0ef90318032ac8b27ced3a2cd6342096f69e2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 178, - "startColumn": 7, - "charOffset": 6525, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 176, - "startColumn": 1, - "charOffset": 6232, - "charLength": 448, - "snippet": { - "text": "\r\nvoid EventCallback::creatureOnDrainHealth(std::shared_ptr creature, std::shared_ptr attacker, CombatType_t &typePrimary, int32_t &damagePrimary, CombatType_t &typeSecondary, int32_t &damageSecondary, TextColor_t &colorPrimary, TextColor_t &colorSecondary) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnDrainHealth - \"\r\n\t\t \"Creature {} attacker {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bb75a1b24d849a1a", - "equalIndicator/v1": "bc11f6e783428234efaad76aaf30825e7aeb5c9ae02c31d023afef7066ff4d05" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/imbuements/imbuements.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 295, - "startColumn": 25, - "charOffset": 10460, - "charLength": 20, - "snippet": { - "text": "pugi::cast" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 293, - "startColumn": 1, - "charOffset": 10425, - "charLength": 192, - "snippet": { - "text": "\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\timbuement.speed = pugi::cast(attr.value());\r\n\t\t\t\t\t} else if (strcasecmp(effecttype.c_str(), \"capacity\") == 0) {\r\n\t\t\t\t\t\tif (!(attr = childNode.attribute(\"value\"))) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "31cf4026ee2cd779", - "equalIndicator/v1": "bc16b7f137d3fed68cc680e64491feddc1ce761431b9df70edaba9d5165ddffb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'getIsLootTrackeable' can be made const", - "markdown": "Method 'getIsLootTrackeable' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 268, - "startColumn": 7, - "charOffset": 8014, - "charLength": 19, - "snippet": { - "text": "getIsLootTrackeable" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 266, - "startColumn": 1, - "charOffset": 8002, - "charLength": 68, - "snippet": { - "text": "\t}\r\n\r\n\tbool getIsLootTrackeable() {\r\n\t\treturn isLootTrackeable;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "42259d07ec94020b", - "equalIndicator/v1": "bc2730bad868ff1d9474f49d042ac20c1d7997395c1e8f65903307f9c6342567" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int64_t' (aka 'long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/creature_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 873, - "startColumn": 24, - "charOffset": 24377, - "charLength": 11, - "snippet": { - "text": "damageEntry" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 871, - "startColumn": 1, - "charOffset": 24274, - "charLength": 176, - "snippet": { - "text": "\t\tlua_createtable(L, 0, 2);\r\n\t\tsetField(L, \"total\", damageEntry.second.total);\r\n\t\tsetField(L, \"ticks\", damageEntry.second.ticks);\r\n\t\tlua_rawseti(L, -2, damageEntry.first);\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bbe18e66c7a0e76d", - "equalIndicator/v1": "bc393a7e9dff1756ddd2f32352dbcb0fdf58a7010c3ae95578eced756455da42" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 334, - "startColumn": 41, - "charOffset": 12426, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 332, - "startColumn": 1, - "charOffset": 12380, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "65ecab3dc4af74b0", - "equalIndicator/v1": "bc6826e8b09e4876999f164eddf67da7d273875ed0b7d47fae9923d5b73e465a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7190, - "startColumn": 46, - "charOffset": 214099, - "charLength": 4, - "snippet": { - "text": "cost" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7188, - "startColumn": 1, - "charOffset": 214037, - "charLength": 174, - "snippet": { - "text": "\t\t\treturn;\r\n\t\t}\r\n\t\tg_metrics().addCounter(\"balance_decrease\", cost, { { \"player\", getName() }, { \"context\", \"forge_convergence_fuse\" } });\r\n\t\thistory.cost = cost;\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "640ed643f5e8bc43", - "equalIndicator/v1": "bca84f4b18cd91bbc322da2cdf79d8f8c3fb8aa2a667b1ba4df5d9bba1382b7c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 376, - "startColumn": 2, - "charOffset": 12411, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 374, - "startColumn": 1, - "charOffset": 12302, - "charLength": 202, - "snippet": { - "text": "\tLuaScriptInterface::pushUserdata(L, player);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Player\");\r\n\tgetScriptInterface()->pushVariant(L, var);\r\n\r\n\treturn getScriptInterface()->callFunction(2);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "79df5129bbb86b32", - "equalIndicator/v1": "bcb2274f84d4af1120dd9b35765e9eba6b79b84b0615e50d0e32ce0ef18b0519" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6794, - "startColumn": 83, - "charOffset": 234825, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6792, - "startColumn": 1, - "charOffset": 234715, - "charLength": 263, - "snippet": { - "text": "\r\n// Hazard combat helpers\r\nvoid Game::handleHazardSystemAttack(CombatDamage &damage, std::shared_ptr player, std::shared_ptr monster, bool isPlayerAttacker) {\r\n\tif (damage.primary.value != 0 && monster->getHazard()) {\r\n\t\tif (isPlayerAttacker) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8ab29dc5a3c84856", - "equalIndicator/v1": "bcc43c187a72c87bf16a1377306c5d9bf997a06b5996e03507129fa7acff12d7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 731, - "startColumn": 28, - "charOffset": 22362, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 729, - "startColumn": 1, - "charOffset": 22329, - "charLength": 102, - "snippet": { - "text": "\t}\r\n\r\n\tconst int32_t oldWeight = item->getWeight();\r\n\titem->setID(itemId);\r\n\titem->setSubType(count);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "731b12dea705c446", - "equalIndicator/v1": "bcdb3343ac3f1b7918dc042732e6ae0f6573c9debca06fe401970a9d6dc0489c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'newRunning' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'newRunning' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/raids.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 59, - "startColumn": 46, - "charOffset": 1529, - "charLength": 10, - "snippet": { - "text": "newRunning" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 57, - "startColumn": 1, - "charOffset": 1461, - "charLength": 111, - "snippet": { - "text": "\t\treturn running;\r\n\t}\r\n\tvoid setRunning(const std::shared_ptr newRunning) {\r\n\t\trunning = newRunning;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "71ae3c07e32d7224", - "equalIndicator/v1": "bcfbd815b53b74dfa4a516c4fb36aaf7212534b50816b2480957daec0cd58f1b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iobestiary.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 62, - "startColumn": 60, - "charOffset": 2286, - "charLength": 28, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 60, - "startColumn": 1, - "charOffset": 2022, - "charLength": 419, - "snippet": { - "text": "\tvoid addCharmPoints(std::shared_ptr player, uint16_t amount, bool negative = false);\r\n\tvoid sendBuyCharmRune(std::shared_ptr player, charmRune_t runeID, uint8_t action, uint16_t raceid);\r\n\tvoid setCharmRuneCreature(std::shared_ptr player, const std::shared_ptr charm, uint16_t raceid);\r\n\tvoid resetCharmRuneCreature(std::shared_ptr player, const std::shared_ptr charm);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8f6b90841129e655", - "equalIndicator/v1": "bcfcd9cdbc41068fc81d1318873fe6bae653cbec77350fdb9752e1991b7bb543" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 50, - "startColumn": 70, - "charOffset": 1440, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 48, - "startColumn": 1, - "charOffset": 1340, - "charLength": 270, - "snippet": { - "text": "// Lua functions\r\n// Creature\r\nbool EventCallback::creatureOnChangeOutfit(std::shared_ptr creature, const Outfit_t &outfit) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnChangeOutfit - Creature {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5ab4e2cd9f89f02c", - "equalIndicator/v1": "bd05ad01dfa4a31cd9aa2b04aafdb5ac1799dcd40acc728c974165263d4342f5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2103, - "startColumn": 52, - "charOffset": 62049, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2101, - "startColumn": 1, - "charOffset": 61993, - "charLength": 127, - "snippet": { - "text": "}\r\n\r\nvoid Player::checkTradeState(std::shared_ptr item) {\r\n\tif (!tradeItem || tradeState == TRADE_TRANSFER) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5e72d5d5f2a21572", - "equalIndicator/v1": "bd10227f54bd7788dd20380a5a062cae69e0011f3a45bf368d1363d9be95f936" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The value returned by this function should not be disregarded; neglecting it may lead to errors", - "markdown": "The value returned by this function should not be disregarded; neglecting it may lead to errors" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/connection/connection.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 89, - "startColumn": 3, - "charOffset": 2783, - "charLength": 6, - "snippet": { - "text": "socket" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 87, - "startColumn": 1, - "charOffset": 2774, - "charLength": 182, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tsocket.close(error);\r\n\t\tif (error && error != asio::error::not_connected) {\r\n\t\t\tg_logger().error(\"[Connection::closeSocket] - Failed to close socket: {}\", error.message());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c77558111e0ee32b", - "equalIndicator/v1": "bd2402ffe0be7d68f18db3cdc8cbde15426b3e57ac83d604fd48e920e8d4ae03" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 700, - "startColumn": 121, - "charOffset": 23006, - "charLength": 18, - "snippet": { - "text": "spellGroupCooldown" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 698, - "startColumn": 1, - "charOffset": 22848, - "charLength": 253, - "snippet": { - "text": "\t\t}\r\n\t\tif (spellGroupCooldown > 0) {\r\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLGROUPCOOLDOWN, spellGroupCooldown / rateCooldown, 0, false, group);\r\n\t\t\tplayer->addCondition(condition);\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "db98d9708b78c328", - "equalIndicator/v1": "bd2eaed58218b7e08f8ccc41aef31b8112a4dcdabb1d21d880a1e649a4263a2f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1291, - "startColumn": 88, - "charOffset": 51888, - "charLength": 2, - "snippet": { - "text": "it" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1289, - "startColumn": 1, - "charOffset": 51695, - "charLength": 212, - "snippet": { - "text": "\t\t// Registering missile effects\r\n\t\tfor (uint32_t it = 0; it < m_appearancesPtr->missile_size(); it++) {\r\n\t\t\tregisteredDistanceEffects.push_back(static_cast(m_appearancesPtr->missile(it).id()));\r\n\t\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f98a92ea6016ba04", - "equalIndicator/v1": "bd3fd899fcecf49096758d7d4118c393b589081b4d15f7b29b4b3ae426217c4d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", - "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/database/database.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 226, - "startColumn": 10, - "charOffset": 6511, - "charLength": 11, - "snippet": { - "text": "std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 224, - "startColumn": 1, - "charOffset": 6403, - "charLength": 163, - "snippet": { - "text": "\tif (it == listNames.end()) {\r\n\t\tg_logger().error(\"Column '{}' does not exist in result set\", s);\r\n\t\treturn std::string();\r\n\t}\r\n\tif (row[it->second] == nullptr) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d72cc4df4e599270", - "equalIndicator/v1": "bd8bba250da04dbe1217a548f3294ee39f7805f0c2416cdafb58f6aa4fa62c92" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 855, - "startColumn": 33, - "charOffset": 27854, - "charLength": 9, - "snippet": { - "text": "getCorpse" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 853, - "startColumn": 1, - "charOffset": 27817, - "charLength": 178, - "snippet": { - "text": "}\r\n\r\nstd::shared_ptr Creature::getCorpse(std::shared_ptr, std::shared_ptr) {\r\n\tif (getLookCorpse() != 0) {\r\n\t\treturn Item::CreateItem(getLookCorpse());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6fe35fd8940d204f", - "equalIndicator/v1": "bd8f7371a766c282242bdf9e83e3f7ac78e1c56d85d367220440faf8e7234472" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/events/global_event_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 140, - "startColumn": 3, - "charOffset": 4466, - "charLength": 6, - "snippet": { - "text": "time_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 138, - "startColumn": 1, - "charOffset": 4435, - "charLength": 208, - "snippet": { - "text": "\t\ttimeinfo->tm_sec = sec;\r\n\r\n\t\ttime_t difference = static_cast(difftime(mktime(timeinfo), current_time));\r\n\t\t// If the difference is negative, add 86400 seconds (1 day) to it\r\n\t\tif (difference < 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5630eb6fbdb25cc9", - "equalIndicator/v1": "bd9c8e61930f9d69bea21d6dedaeb3dbb237e37acb7cf6ed715f12ccc108bab1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 134, - "startColumn": 78, - "charOffset": 3643, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 132, - "startColumn": 1, - "charOffset": 3561, - "charLength": 244, - "snippet": { - "text": "}\r\n\r\nbool Weapon::useWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr target) const {\r\n\tint32_t damageModifier = playerWeaponCheck(player, target, item->getShootRange());\r\n\tif (damageModifier == 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "62072f087909cec2", - "equalIndicator/v1": "bdaee783d294ef6f0ec6f4c97b0a1b1ebb6d633bff62a5a35a14658aa8f6924e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 299, - "startColumn": 28, - "charOffset": 9775, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 297, - "startColumn": 1, - "charOffset": 9741, - "charLength": 137, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\t\tenv->setScriptId(mType->info.creatureSayEvent, scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "041ad22d877d2823", - "equalIndicator/v1": "bdd22e94df0116b96b03ea5519eefcf2f77cfa8a4a177e7e2777f1a3bb8063c0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/map/house_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 141, - "startColumn": 26, - "charOffset": 3847, - "charLength": 4, - "snippet": { - "text": "guid" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 139, - "startColumn": 1, - "charOffset": 3771, - "charLength": 126, - "snippet": { - "text": "\r\n\t\tuint32_t guid = getNumber(L, 2, 0);\r\n\t\thouse->setNewOwnerGuid(guid, false);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7483ec093dc30cfa", - "equalIndicator/v1": "bdd5821fa610d704c83b53d927b7e5f8eb2104b542d1978d953c1b4567defa80" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", - "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/zones/zone.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 78, - "startColumn": 27, - "charOffset": 2130, - "charLength": 4, - "snippet": { - "text": "from" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 76, - "startColumn": 1, - "charOffset": 2067, - "charLength": 83, - "snippet": { - "text": "\r\n\tPositionIterator begin() const {\r\n\t\treturn PositionIterator(from, *this);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ef52dd19a3c31415", - "equalIndicator/v1": "bdebbd97fdfcba7dcde7bb1afd81d49ef6cd65b80766cc9e668be27467566f45" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3534, - "startColumn": 13, - "charOffset": 106881, - "charLength": 1, - "snippet": { - "text": "n" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3532, - "startColumn": 1, - "charOffset": 106740, - "charLength": 196, - "snippet": { - "text": "\r\n\t\t\tif (n < tmpContainer->capacity() && tmpContainer->queryAdd(n, item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) {\r\n\t\t\t\tindex = n;\r\n\t\t\t\t*destItem = nullptr;\r\n\t\t\t\treturn tmpContainer;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d91d3c9dfd13ce78", - "equalIndicator/v1": "be14f40f934ceac4c0bb2ce01a2b8663cfea7a7af4b88f44b39aa77a1381a518" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'name' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'name' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/player_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2799, - "startColumn": 49, - "charOffset": 98337, - "charLength": 4, - "snippet": { - "text": "name" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2797, - "startColumn": 1, - "charOffset": 98284, - "charLength": 170, - "snippet": { - "text": "}\r\n\r\nuint8_t PlayerWheel::getStage(const std::string name) const {\r\n\tif (name == \"Battle Instinct\") {\r\n\t\treturn PlayerWheel::getInstant(WheelInstant_t::BATTLE_INSTINCT);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c6dedc4d4558de18", - "equalIndicator/v1": "be30e6bdc128a471bc4b969b10bb64db18f3db3a88bc4929729037a9badfe83d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 588, - "startColumn": 13, - "charOffset": 28253, - "charLength": 34, - "snippet": { - "text": "stringValue == \"absorbpercentholy\"" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 586, - "startColumn": 1, - "charOffset": 28065, - "charLength": 405, - "snippet": { - "text": "\t} else if (stringValue == \"absorbpercentice\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentholy\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentdeath\") {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fae2faa002b1fb49", - "equalIndicator/v1": "be4c36d804a5b22a38d34c26caf743b36a361575dde6851a60349de4dfb76067" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'updateCreatureSkull' can be made const", - "markdown": "Method 'updateCreatureSkull' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8042, - "startColumn": 12, - "charOffset": 279964, - "charLength": 19, - "snippet": { - "text": "updateCreatureSkull" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8040, - "startColumn": 1, - "charOffset": 279948, - "charLength": 127, - "snippet": { - "text": "}\r\n\r\nvoid Game::updateCreatureSkull(std::shared_ptr creature) {\r\n\tif (getWorldType() != WORLD_TYPE_PVP) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ae812b726ee28e1c", - "equalIndicator/v1": "be4f45a527090727b34dc9be0988fbabbb31b1d85f24eb781fb66a264d188447" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 460, - "startColumn": 50, - "charOffset": 27419, - "charLength": 10, - "snippet": { - "text": "m_monsters" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 458, - "startColumn": 1, - "charOffset": 27338, - "charLength": 115, - "snippet": { - "text": "\r\n\t\tif (!m_monsters.empty()) {\r\n\t\t\tselectedMonster = m_monsters[normal_random(0, m_monsters.size() - 1)];\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "df13332ff1a99aae", - "equalIndicator/v1": "be539084d4fb6b78e2d54739d7946368f400a9deb290c1cdc886a85e53cbc1e9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 164, - "startColumn": 7, - "charOffset": 5444, - "charLength": 19, - "snippet": { - "text": "postAddNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 162, - "startColumn": 1, - "charOffset": 5389, - "charLength": 359, - "snippet": { - "text": "\tItemVector getItems(bool recursive = false);\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "01d0e5771c0c8bc1", - "equalIndicator/v1": "be5a3574a33c9ba392b4cff5e8a12b496410af17d8c0dddc4a02f73491e808d9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 461, - "startColumn": 56, - "charOffset": 13722, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 459, - "startColumn": 1, - "charOffset": 13662, - "charLength": 202, - "snippet": { - "text": "}\r\n\r\nuint32_t MoveEvent::AddItemField(std::shared_ptr item, std::shared_ptr, const Position &) {\r\n\tif (item == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::AddItemField] - Item is nullptr\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5c991ee0bf0842f7", - "equalIndicator/v1": "be69cd1186857d0ac7f1881855d3add9291da4c37b993e992e7c37c55d701bc0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 10489, - "startColumn": 70, - "charOffset": 364092, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 10487, - "startColumn": 1, - "charOffset": 364018, - "charLength": 289, - "snippet": { - "text": "}\r\n\r\nReturnValue Game::beforeCreatureZoneChange(std::shared_ptr creature, const std::unordered_set> &fromZones, const std::unordered_set> &toZones, bool force /* = false*/) const {\r\n\tif (!creature) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2e1737f50efd8f79", - "equalIndicator/v1": "be6d3e46264f219efefe50349248698778b6e580679b96f601440a8655b826aa" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4635, - "startColumn": 26, - "charOffset": 138397, - "charLength": 5, - "snippet": { - "text": "delay" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4633, - "startColumn": 1, - "charOffset": 138299, - "charLength": 247, - "snippet": { - "text": "\t\tif (!canDoAction()) {\r\n\t\t\tconst uint32_t delay = getNextActionTime();\r\n\t\t\tconst int32_t ticks = delay - (delay % EVENT_CREATURE_THINK_INTERVAL);\r\n\t\t\tif (ticks < 0 || condition->getType() == CONDITION_PARALYZE) {\r\n\t\t\t\tremoveCondition(condition);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f881ee6792f10113", - "equalIndicator/v1": "be737705062d9a4a4a2b1bfdbdcac6848376c0a70d71a57391013769c5db71fa" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iobestiary.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 58, - "startColumn": 55, - "charOffset": 1759, - "charLength": 34, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 56, - "startColumn": 1, - "charOffset": 1609, - "charLength": 507, - "snippet": { - "text": "\r\n\tstd::shared_ptr getBestiaryCharm(charmRune_t activeCharm, bool force = false) const;\r\n\tvoid addBestiaryKill(std::shared_ptr player, const std::shared_ptr mtype, uint32_t amount = 1);\r\n\tbool parseCharmCombat(const std::shared_ptr charm, std::shared_ptr player, std::shared_ptr target, int32_t realDamage, bool dueToPotion = false, bool checkArmor = false);\r\n\tvoid addCharmPoints(std::shared_ptr player, uint16_t amount, bool negative = false);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f222bc876d6afbed", - "equalIndicator/v1": "be8242a6c8fb466aa913b2ab8c2d1d1624d7d085f38ef8ebb7ff16b64eb3e0b4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Redundant string initialization", - "markdown": "Redundant string initialization" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/combat/spell_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 653, - "startColumn": 16, - "charOffset": 17972, - "charLength": 3, - "snippet": { - "text": "sep" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 651, - "startColumn": 1, - "charOffset": 17931, - "charLength": 109, - "snippet": { - "text": "\t\t\treturn 2;\r\n\t\t} else {\r\n\t\t\tstd::string sep = \"\";\r\n\t\t\tif (lua_gettop(L) == 3) {\r\n\t\t\t\tsep = getString(L, 3);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "80e0896426a41b26", - "equalIndicator/v1": "be90da537749777144ffe8fc4033ece6dcfe6c32436f563cce78ec262b67d067" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 616, - "startColumn": 101, - "charOffset": 18759, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 614, - "startColumn": 1, - "charOffset": 18654, - "charLength": 257, - "snippet": { - "text": "}\r\n\r\nuint32_t MoveEvent::DeEquipItem(const std::shared_ptr MoveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool) {\r\n\tif (player == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::EquipItem] - Player is nullptr\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9e9a87486651f830", - "equalIndicator/v1": "be965cc8f3f7eb048a00be69fb768d30c557b6623c77e1bca36df1126349f68f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 307, - "startColumn": 27, - "charOffset": 9967, - "charLength": 5, - "snippet": { - "text": "depot" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 305, - "startColumn": 1, - "charOffset": 9845, - "charLength": 187, - "snippet": { - "text": "\t\t\tmyDepotLocker->setParent(depot->getParent()->getTile());\r\n\t\t\topenContainer = myDepotLocker;\r\n\t\t\tplayer->setLastDepotId(depot->getDepotId());\r\n\t\t} else {\r\n\t\t\topenContainer = container;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2680360d0fc8ee1f", - "equalIndicator/v1": "beb9fbf6e757f4ca09f991076af94938a2e3ef1e5dd8018e6678a13bec5ad424" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1705, - "startColumn": 22, - "charOffset": 48722, - "charLength": 7, - "snippet": { - "text": "toupper" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1703, - "startColumn": 1, - "charOffset": 48547, - "charLength": 278, - "snippet": { - "text": "\t\t\t\t\tss << std::showpos << it.abilities->specializedMagicLevel[i] << std::noshowpos;\r\n\t\t\t\t\tstd::string combatName = getCombatName(indexToCombatType(i));\r\n\t\t\t\t\tcombatName[0] = toupper(combatName[0]);\r\n\t\t\t\t\tdescriptions.emplace_back(combatName + \" Magic Level\", ss.str());\r\n\t\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3d8be761dec40a07", - "equalIndicator/v1": "bec39f7346b9b2114647397062955ee0b63fe841959ac54ab48d48dce58ce49d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly", - "markdown": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2384, - "startColumn": 59, - "charOffset": 90754, - "charLength": 12, - "snippet": { - "text": "__FUNCTION__" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2382, - "startColumn": 1, - "charOffset": 90472, - "charLength": 327, - "snippet": { - "text": "\t\tif (internalAddItem(toCylinder, autoContainer, CONST_SLOT_WHEREEVER, flags) != RETURNVALUE_NOERROR) {\r\n\t\t\tif (internalAddItem(toCylinder->getTile(), autoContainer, INDEX_WHEREEVER, FLAG_NOLIMIT) != RETURNVALUE_NOERROR) {\r\n\t\t\t\tg_logger().error(\"[{}] Failed to add auto container\", __FUNCTION__);\r\n\t\t\t\treturn toCylinder;\r\n\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5a95fab3a2a33932", - "equalIndicator/v1": "bef118456a8305364ae47f51b83895ee2a4fe718ebecce4ef81fdd41f3a018bc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 570, - "startColumn": 24, - "charOffset": 17134, - "charLength": 7, - "snippet": { - "text": "getTile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 568, - "startColumn": 1, - "charOffset": 17105, - "charLength": 85, - "snippet": { - "text": "\t}\r\n\r\n\tstd::shared_ptr getTile() override final {\r\n\t\treturn m_tile.lock();\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cbf84c411f56a50a", - "equalIndicator/v1": "bf00b83e7cb370ebe54aac4cc5d83337466404dbee0fc5ae0c08d23d229c8e29" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 137, - "startColumn": 10, - "charOffset": 3646, - "charLength": 17, - "snippet": { - "text": "getReflectPercent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 135, - "startColumn": 1, - "charOffset": 3631, - "charLength": 167, - "snippet": { - "text": "\t}\r\n\r\n\tint32_t getReflectPercent(CombatType_t combatType, bool useCharges = false) const override;\r\n\tuint32_t getHealingCombatValue(CombatType_t healingType) const;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "026b5c7157d91110", - "equalIndicator/v1": "bf16ae4106bc87d856e2566af0a6b63fc0ce1590a642db11717ec2051ffd5d1c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1286, - "startColumn": 84, - "charOffset": 51675, - "charLength": 2, - "snippet": { - "text": "it" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1284, - "startColumn": 1, - "charOffset": 51486, - "charLength": 208, - "snippet": { - "text": "\t\t// Registering distance effects\r\n\t\tfor (uint32_t it = 0; it < m_appearancesPtr->effect_size(); it++) {\r\n\t\t\tregisteredMagicEffects.push_back(static_cast(m_appearancesPtr->effect(it).id()));\r\n\t\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5c38b79d11c5a02e", - "equalIndicator/v1": "bf29059df928b88b12cd67b858bd5dc001d68078c0be818fbe8579230d8c0427" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1167, - "startColumn": 67, - "charOffset": 44372, - "charLength": 4, - "snippet": { - "text": "zone" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1165, - "startColumn": 1, - "charOffset": 44301, - "charLength": 237, - "snippet": { - "text": "}\r\n\r\nbool EventCallback::zoneBeforeCreatureLeave(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneBeforeCreatureLeave - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1d779dea83573cc3", - "equalIndicator/v1": "bf5b629864ee6abe35d03635de658b3ed200645750bc8a54323485691a96863c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 522, - "startColumn": 93, - "charOffset": 19754, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 520, - "startColumn": 1, - "charOffset": 19657, - "charLength": 373, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::playerOnItemMoved(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnItemMoved - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "62195ff1d3227024", - "equalIndicator/v1": "bf7d31c2b62f6772fe916bcf88e44c6e6b59f8e7e35df36e7b822e8bb6567fb5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'key' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'key' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 115, - "startColumn": 61, - "charOffset": 6877, - "charLength": 14, - "snippet": { - "text": "const uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 113, - "startColumn": 1, - "charOffset": 6658, - "charLength": 576, - "snippet": { - "text": "\tvoid playerOnRequestQuestLog(std::shared_ptr player) const;\r\n\tvoid playerOnRequestQuestLine(std::shared_ptr player, uint16_t questId) const;\r\n\tvoid playerOnStorageUpdate(std::shared_ptr player, const uint32_t key, const int32_t value, int32_t oldValue, uint64_t currentTime) const;\r\n\tvoid playerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) const;\r\n\tvoid playerOnInventoryUpdate(std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool equip) const;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a3c0f3466064dab3", - "equalIndicator/v1": "bf7f465f0fec0a0ee331b0108de5229ec94c7d8ed6cf129343cc3d85eee347c9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 340, - "startColumn": 55, - "charOffset": 8872, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 338, - "startColumn": 1, - "charOffset": 8729, - "charLength": 186, - "snippet": { - "text": "\r\nstd::shared_ptr Tile::getTopVisibleThing(std::shared_ptr creature) {\r\n\tstd::shared_ptr thing = getTopVisibleCreature(creature);\r\n\tif (thing) {\r\n\t\treturn thing;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bccbb90beb83bace", - "equalIndicator/v1": "bfaf411758a9773bc74e96ec056f666a8bd3ae6cc136362ce744861b1dd357c1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 163, - "startColumn": 27, - "charOffset": 4980, - "charLength": 10, - "snippet": { - "text": "realDamage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 161, - "startColumn": 1, - "charOffset": 4862, - "charLength": 181, - "snippet": { - "text": "\t// Setting damage to combat\r\n\tcombat.primary.value = realDamage * weaponAttackProportion;\r\n\tcombat.secondary.value = realDamage * (1 - weaponAttackProportion);\r\n\treturn combat;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "aaf73d6cdb65019f", - "equalIndicator/v1": "bfbd8a26a049b162cb0e3e1b0b4ad79e52b0cccfc9c8f070d85b32d390e5f225" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/functions/iologindata_save_player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 689, - "startColumn": 70, - "charOffset": 26840, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 687, - "startColumn": 1, - "charOffset": 26766, - "charLength": 185, - "snippet": { - "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerForgeHistory(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b08abd3f5db35360", - "equalIndicator/v1": "c010f37984b8fe5dc15ddaa68f0108973d96354297ce2c8337191e0560594a64" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1777, - "startColumn": 2, - "charOffset": 53547, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1775, - "startColumn": 1, - "charOffset": 53455, - "charLength": 232, - "snippet": { - "text": "void ProtocolGame::parseLookAt(NetworkMessage &msg) {\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tg_game().playerLookAt(player->getID(), itemId, pos, stackpos);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0963cb2aca137149", - "equalIndicator/v1": "c020e7c57be903917ebf8870e39b246d70b9feffd5290521ec3dac7cf134968e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1369, - "startColumn": 2, - "charOffset": 40897, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1367, - "startColumn": 1, - "charOffset": 40890, - "charLength": 189, - "snippet": { - "text": "\t}\r\n\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t tier = msg.get();\r\n\tg_game().playerEquipItem(player->getID(), itemId, Item::items[itemId].upgradeClassification > 0, tier);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "73aab12543c7917f", - "equalIndicator/v1": "c024ef514e26cb328a6e028c284c4f97b09e540199c0d469310ab3688b08d654" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '_Kty', which is a reserved identifier", - "markdown": "Declaration uses identifier '_Kty', which is a reserved identifier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/hash.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4, - "startColumn": 18, - "charOffset": 53, - "charLength": 4, - "snippet": { - "text": "_Kty" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2, - "startColumn": 1, - "charOffset": 14, - "charLength": 81, - "snippet": { - "text": "\r\nnamespace stdext {\r\n\ttemplate \r\n\tusing hash = phmap::Hash<_Kty>;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3af3641d28bc93b3", - "equalIndicator/v1": "c02aaf6f19c59d865729f3741ee48bcfb0dd49998be40d5c13a281d5baa1c8c6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions", - "markdown": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/value_wrapper.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 37, - "startColumn": 18, - "charOffset": 1136, - "charLength": 12, - "snippet": { - "text": "ValueWrapper" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 35, - "startColumn": 1, - "charOffset": 987, - "charLength": 348, - "snippet": { - "text": "\texplicit ValueWrapper(uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const ValueVariant &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const std::string &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(bool value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(int value, uint64_t timestamp = 0);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "02f3f1918bd1d065", - "equalIndicator/v1": "c039cf6b84fc24e1a495f08b4b4acd78da21c5623da739e9369082ae716afc73" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1385, - "startColumn": 87, - "charOffset": 40297, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1383, - "startColumn": 1, - "charOffset": 40206, - "charLength": 138, - "snippet": { - "text": "}\r\n\r\nint32_t Tile::getStackposOfItem(std::shared_ptr player, std::shared_ptr item) const {\r\n\tint32_t n = 0;\r\n\tif (ground) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f5963609377c9a87", - "equalIndicator/v1": "c04ac5335438ad5ac53bb60420b72b2bd8513a9842cfe2b38192a105d841d945" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '_Where', which is a reserved identifier", - "markdown": "Declaration uses identifier '_Where', which is a reserved identifier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/vectorset.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 72, - "startColumn": 56, - "charOffset": 1900, - "charLength": 6, - "snippet": { - "text": "_Where" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 70, - "startColumn": 1, - "charOffset": 1838, - "charLength": 159, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tconstexpr auto insert(std::vector::const_iterator _Where, T &&_Val) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\treturn container.insert(_Where, std::move(_Val));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bebc90960f5c4810", - "equalIndicator/v1": "c07ca9a6b5b37ac0bb1b30552973635a689c3b98521be5ac88e51152cb20ec60" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/npcs/npc.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 42, - "startColumn": 14, - "charOffset": 1339, - "charLength": 7, - "snippet": { - "text": "npcType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 40, - "startColumn": 1, - "charOffset": 1200, - "charLength": 255, - "snippet": { - "text": "\tfloat multiplier = g_configManager().getFloat(RATE_NPC_HEALTH, __FUNCTION__);\r\n\thealth = npcType->info.health * multiplier;\r\n\thealthMax = npcType->info.healthMax * multiplier;\r\n\tbaseSpeed = npcType->info.baseSpeed;\r\n\tinternalLight = npcType->info.light;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8cbf6660ee1c096e", - "equalIndicator/v1": "c089a5e683d9628194b2138d1a78164b2ed26b6d75c9ff1f1945fdfaabe6ce53" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/game_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 527, - "startColumn": 2, - "charOffset": 14800, - "charLength": 26, - "snippet": { - "text": "// Game.getBestiaryCharm()" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 525, - "startColumn": 1, - "charOffset": 14737, - "charLength": 177, - "snippet": { - "text": "\r\nint GameFunctions::luaGameGetBestiaryCharm(lua_State* L) {\r\n\t// Game.getBestiaryCharm()\r\n\tconst auto c_list = g_game().getCharmList();\r\n\tlua_createtable(L, c_list.size(), 0);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "69f7f1220986ce8e", - "equalIndicator/v1": "c09ca4086976e13a31204e6fd87d707a93e833fd32b603193bfd33f2fad4d2b9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/talkaction.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 84, - "startColumn": 7, - "charOffset": 2790, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 82, - "startColumn": 1, - "charOffset": 2605, - "charLength": 397, - "snippet": { - "text": "bool TalkAction::executeSay(std::shared_ptr player, const std::string &words, const std::string ¶m, SpeakClasses type) const {\r\n\t// onSay(player, words, param, type)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[TalkAction::executeSay - Player {} words {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested. Script name {}\",\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "62085dd929bd2a96", - "equalIndicator/v1": "c09ef862b48497c212c8144acca12f272285f5583931bd91253d92bc46388e50" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/bed.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 278, - "startColumn": 58, - "charOffset": 7723, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 276, - "startColumn": 1, - "charOffset": 7661, - "charLength": 142, - "snippet": { - "text": "}\r\n\r\nvoid BedItem::internalSetSleeper(std::shared_ptr player) {\r\n\tstd::string desc_str = player->getName() + \" is sleeping there.\";\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8131ecb0f1d40ad9", - "equalIndicator/v1": "c0b025a37399902d8b7fed395b53a01e9a78a5c0782bccc6e20ce562c81a6e31" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/container_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 34, - "startColumn": 21, - "charOffset": 1057, - "charLength": 9, - "snippet": { - "text": "container" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 32, - "startColumn": 1, - "charOffset": 941, - "charLength": 166, - "snippet": { - "text": "\tstd::shared_ptr container = getUserdataShared(L, 1);\r\n\tif (container) {\r\n\t\tlua_pushnumber(L, container->size());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1baf3f104f4ccf05", - "equalIndicator/v1": "c0ce619dc1d13e78da05a8d030ea65f7164b8fc954e3a86e6b829befdd3ccb28" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6874, - "startColumn": 15, - "charOffset": 215315, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6872, - "startColumn": 1, - "charOffset": 215254, - "charLength": 99, - "snippet": { - "text": "\tmsg.addByte(cid);\r\n\tmsg.add(slot);\r\n\tAddItem(msg, item);\r\n\twriteToOutputBuffer(msg);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "da1cece9b4882d55", - "equalIndicator/v1": "c10668394c9adc5f7a39537c505acc6cc5e3604ee1b870c58aee90a2079dab69" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'npc' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4734, - "startColumn": 50, - "charOffset": 149248, - "charLength": 3, - "snippet": { - "text": "npc" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4732, - "startColumn": 1, - "charOffset": 149194, - "charLength": 107, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendShop(std::shared_ptr npc) {\r\n\tBenchmark brenchmark;\r\n\tNetworkMessage msg;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "071f0576baac9a5d", - "equalIndicator/v1": "c114037d2653b12ddedbbad5749ac8898317780747c45bfae3506133098b6c9f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/npcs/npc.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 41, - "startColumn": 11, - "charOffset": 1290, - "charLength": 7, - "snippet": { - "text": "npcType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 39, - "startColumn": 1, - "charOffset": 1160, - "charLength": 256, - "snippet": { - "text": "\tcurrentOutfit = npcType->info.outfit;\r\n\tfloat multiplier = g_configManager().getFloat(RATE_NPC_HEALTH, __FUNCTION__);\r\n\thealth = npcType->info.health * multiplier;\r\n\thealthMax = npcType->info.healthMax * multiplier;\r\n\tbaseSpeed = npcType->info.baseSpeed;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "04a577fa6a03204a", - "equalIndicator/v1": "c1141ea43445804bfc4b8955f151eb147dddd5b1d46214f329c102c3970c7b98" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/bank/bank.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 126, - "startColumn": 46, - "charOffset": 3308, - "charLength": 6, - "snippet": { - "text": "amount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 124, - "startColumn": 1, - "charOffset": 3230, - "charLength": 177, - "snippet": { - "text": "\r\n\tif (bankable->getPlayer()) {\r\n\t\tg_metrics().addCounter(\"balance_decrease\", amount, { { \"player\", bankable->getPlayer()->getName() }, { \"context\", \"bank_transfer\" } });\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9412f3c28392d277", - "equalIndicator/v1": "c12c88c5b0caef11b8d302a0723ea9ad7a339fe244555ecb57620410a4d97357" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 76, - "startColumn": 28, - "charOffset": 2356, - "charLength": 11, - "snippet": { - "text": "getCreature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 74, - "startColumn": 1, - "charOffset": 2277, - "charLength": 154, - "snippet": { - "text": "\tCreature &operator=(const Creature &) = delete;\r\n\r\n\tstd::shared_ptr getCreature() override final {\r\n\t\treturn static_self_cast();\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "47ab6d62b9ba94b4", - "equalIndicator/v1": "c13b3547ea03278ae82819e7e99bc1d66ef0d4dc84a8f0810cef7bb07e468514" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2063, - "startColumn": 57, - "charOffset": 60994, - "charLength": 9, - "snippet": { - "text": "container" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2061, - "startColumn": 1, - "charOffset": 60933, - "charLength": 116, - "snippet": { - "text": "}\r\n\r\nvoid Player::onSendContainer(std::shared_ptr container) {\r\n\tif (!client || !container) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2fbd2b6c5d09cac8", - "equalIndicator/v1": "c154ef108933580003acc4bda100deef709db91262d86977722df7842c59b3aa" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3300, - "startColumn": 65, - "charOffset": 100805, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3298, - "startColumn": 1, - "charOffset": 100736, - "charLength": 119, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureShield(std::shared_ptr creature) {\r\n\tif (!canSee(creature)) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bdbc6af35ea53b19", - "equalIndicator/v1": "c1657cc6d68743b28bfa8ab1bd2c044a0d637232f49a39c63481c9fc3d33219c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'speaker' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'speaker' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1154, - "startColumn": 31, - "charOffset": 33969, - "charLength": 7, - "snippet": { - "text": "speaker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1152, - "startColumn": 1, - "charOffset": 33817, - "charLength": 183, - "snippet": { - "text": "\tvoid sendPrivateMessage(std::shared_ptr speaker, SpeakClasses type, const std::string &text) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPrivateMessage(speaker, type, text);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "eda073cf7a7f3ddf", - "equalIndicator/v1": "c17ed58fe2d32e27685a8ad0372801af1711f22b23f879267ab268726c1152dd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 660, - "startColumn": 72, - "charOffset": 20134, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 658, - "startColumn": 1, - "charOffset": 19967, - "charLength": 280, - "snippet": { - "text": "\t\tfor (int32_t s = STAT_FIRST; s <= STAT_LAST; ++s) {\r\n\t\t\tif (it.abilities->statsPercent[s]) {\r\n\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\r\n\t\t\t}\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "437d1c44cf32c8d2", - "equalIndicator/v1": "c1cb3458da8e491f37e8c5baab2375c643ae8df474c874fdeeffe62fc7c51b98" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 159, - "startColumn": 7, - "charOffset": 5975, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 157, - "startColumn": 1, - "charOffset": 5963, - "charLength": 112, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"{} - \"\r\n\t\t \"Position {}\"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a4004dbbd452b4c0", - "equalIndicator/v1": "c1db9c28bc65f861f0cea13ec4df719920968b9b18ac9e2d1266c133238b42c1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5183, - "startColumn": 53, - "charOffset": 152962, - "charLength": 8, - "snippet": { - "text": "attacked" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5181, - "startColumn": 1, - "charOffset": 152905, - "charLength": 126, - "snippet": { - "text": "}\r\n\r\nvoid Player::removeAttacked(std::shared_ptr attacked) {\r\n\tif (!attacked || attacked == getPlayer()) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1f3808705648fd71", - "equalIndicator/v1": "c1e10c74acc8771804f74f6135999553d6201490c4611ac551286d1864bd550a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/kv.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 86, - "startColumn": 30, - "charOffset": 2632, - "charLength": 3, - "snippet": { - "text": "get" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 84, - "startColumn": 1, - "charOffset": 2529, - "charLength": 193, - "snippet": { - "text": "\tvoid set(const std::string &key, const ValueWrapper &value) override;\r\n\r\n\tstd::optional get(const std::string &key, bool forceLoad = false) override;\r\n\r\n\tvoid flush() override {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "03969a1f6b525eb0", - "equalIndicator/v1": "c24b89b3fb884c75fb09af0ffe82c94b83f61cc54a1804ab9de5e762949086df" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1793, - "startColumn": 2, - "charOffset": 54005, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1791, - "startColumn": 1, - "charOffset": 53966, - "charLength": 153, - "snippet": { - "text": "\r\n\tPosition pos = msg.getPosition();\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tbool lootAllCorpses = msg.getByte();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f9ff848363e88fba", - "equalIndicator/v1": "c29aac759a32ef6e82d1c9835a70bc18b24b40bba8b76ec33b58bd33f4bd2ebb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 147, - "startColumn": 7, - "charOffset": 4559, - "charLength": 8, - "snippet": { - "text": "addThing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 145, - "startColumn": 1, - "charOffset": 4489, - "charLength": 190, - "snippet": { - "text": "\r\n\tvoid addThing(std::shared_ptr thing) override final;\r\n\tvoid addThing(int32_t index, std::shared_ptr thing) override final;\r\n\tvoid addItemBack(std::shared_ptr item);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0d008b07ce96b602", - "equalIndicator/v1": "c29b0b3c5eb15097ec7de3f90e0e5d0a7975cba65c6f881082ef0b7072346100" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1407, - "startColumn": 31, - "charOffset": 42338, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1405, - "startColumn": 1, - "charOffset": 42225, - "charLength": 131, - "snippet": { - "text": "\tvoid sendPlayerVocation(std::shared_ptr player) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPlayerVocation(player);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b2e4a415531f5dc9", - "equalIndicator/v1": "c29cb9efb0272ef95b58ff8361003ad39e467e83e2cf01e0e928a5fb4b85429a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions", - "markdown": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/metrics/metrics.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 188, - "startColumn": 2, - "charOffset": 6930, - "charLength": 20, - "snippet": { - "text": "DEFINE_LATENCY_CLASS" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 186, - "startColumn": 1, - "charOffset": 6875, - "charLength": 203, - "snippet": { - "text": "\r\n\tDEFINE_LATENCY_CLASS(method, \"method\", \"method\");\r\n\tDEFINE_LATENCY_CLASS(lua, \"lua\", \"scope\");\r\n\tDEFINE_LATENCY_CLASS(query, \"query\", \"truncated_query\");\r\n\tDEFINE_LATENCY_CLASS(task, \"task\", \"task\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9fe21a55d5ea3fd2", - "equalIndicator/v1": "c2a01748caa609b8947c249b238fa2762b7cfdeded904abcbe996b982763fb6d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 522, - "startColumn": 63, - "charOffset": 19724, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 520, - "startColumn": 1, - "charOffset": 19657, - "charLength": 373, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::playerOnItemMoved(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnItemMoved - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "95d86829b916ff45", - "equalIndicator/v1": "c2c37d727d7d2b62a7068cd07f1bf3743d38d27ace304484abaf5b4a816a3c86" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/grouping/party.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 741, - "startColumn": 81, - "charOffset": 23387, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 739, - "startColumn": 1, - "charOffset": 23302, - "charLength": 139, - "snippet": { - "text": "}\r\n\r\nvoid Party::addPlayerLoot(std::shared_ptr player, std::shared_ptr item) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f7b5746f14c38fc1", - "equalIndicator/v1": "c3066f8d65a99d3fc71d5c618f6bb511e55d7631a69e0dfe8ae163139374fc0a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 554, - "startColumn": 14, - "charOffset": 15857, - "charLength": 8, - "snippet": { - "text": "tileItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 552, - "startColumn": 1, - "charOffset": 15836, - "charLength": 176, - "snippet": { - "text": "\t\t\t}\r\n\r\n\t\t\tfor (auto tileItem : *tile->getItemList()) {\r\n\t\t\t\tif (tileItem && tileItem->getID() == item->getID()) {\r\n\t\t\t\t\ttile->removeThing(tileItem, tileItem->getItemCount());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "242c823482c0a50b", - "equalIndicator/v1": "c31b02b15d7a074d70561fc1744aa2b8a6b814f7a07131d0d1cbba27e3c7782f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 585, - "startColumn": 103, - "charOffset": 28039, - "charLength": 14, - "snippet": { - "text": "valueAttribute" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 583, - "startColumn": 1, - "charOffset": 27718, - "charLength": 522, - "snippet": { - "text": "\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentpoison\" || stringValue == \"absorbpercentearth\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_EARTHDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentice\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += pugi::cast(valueAttribute.value());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b0b7bd718cd354e9", - "equalIndicator/v1": "c34a061f00d1d8fdd116e00a22f97c6a95b38f7fe03fcf318ffc9fa708c3e2b5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iobestiary.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 373, - "startColumn": 4, - "charOffset": 12367, - "charLength": 88, - "snippet": { - "text": "case COMBAT_DEATHDAMAGE:\r\n\t\t\t\tdefaultMap[6] -= static_cast(elementEntry.second)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 371, - "startColumn": 1, - "charOffset": 12287, - "charLength": 207, - "snippet": { - "text": "\t\t\t\tdefaultMap[5] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_DEATHDAMAGE:\r\n\t\t\t\tdefaultMap[6] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_HEALING:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5734cc58448cf5f8", - "equalIndicator/v1": "c3656cff8ff21d88f120404e6fb5536c04fa4e3bbd69e35605176af95ab3daf3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/imbuements/imbuements.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 154, - "startColumn": 6, - "charOffset": 5077, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 152, - "startColumn": 1, - "charOffset": 5047, - "charLength": 114, - "snippet": { - "text": "\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tuint16_t sourceId = pugi::cast(attr.value());\r\n\r\n\t\t\t\t\tuint16_t count = 1;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9fbd7962898970f3", - "equalIndicator/v1": "c36fb7b781603139df6bffc2f9948864102000a496adaf965a34293acb79b54e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1315, - "startColumn": 7, - "charOffset": 46637, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1313, - "startColumn": 1, - "charOffset": 46625, - "charLength": 149, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventMonsterOnDropLoot - \"\r\n\t\t \"Monster corpse {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d5df04e310733545", - "equalIndicator/v1": "c38da5b6799100f1308d72b43951dae871cfd9559be7d6a520db079b6f03f28f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5517, - "startColumn": 57, - "charOffset": 194247, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5515, - "startColumn": 1, - "charOffset": 194186, - "charLength": 212, - "snippet": { - "text": "}\r\n\r\nvoid Game::playerLootAllCorpses(std::shared_ptr player, const Position &pos, bool lootAllCorpses) {\r\n\tif (lootAllCorpses) {\r\n\t\tstd::shared_ptr tile = g_game().map.getTile(pos.x, pos.y, pos.z);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "71a466e3f759c985", - "equalIndicator/v1": "c39b169925ec84a1990b5dbf87bc001f615f1e6fed383a4e426d6f879c824395" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6309, - "startColumn": 51, - "charOffset": 184848, - "charLength": 8, - "snippet": { - "text": "vocation" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6307, - "startColumn": 1, - "charOffset": 184679, - "charLength": 369, - "snippet": { - "text": "\tstd::shared_ptr condition = getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT);\r\n\tif (condition) {\r\n\t\tcondition->setParam(CONDITION_PARAM_HEALTHGAIN, vocation->getHealthGainAmount());\r\n\t\tcondition->setParam(CONDITION_PARAM_HEALTHTICKS, vocation->getHealthGainTicks());\r\n\t\tcondition->setParam(CONDITION_PARAM_MANAGAIN, vocation->getManaGainAmount());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ef5d5617a169e6ef", - "equalIndicator/v1": "c3b910edc023bc86e0cd73239bd64bde13ba78ecd84438cddd267eb2da892cdf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 782, - "startColumn": 27, - "charOffset": 28288, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 780, - "startColumn": 1, - "charOffset": 28256, - "charLength": 128, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnItemMoved, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5584d755862c201e", - "equalIndicator/v1": "c3cd3b597d954be51092a366504bae11dc26a5261755aa7fa4bffa3b9b9d8c54" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'lastItem' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'lastItem' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6878, - "startColumn": 94, - "charOffset": 215449, - "charLength": 8, - "snippet": { - "text": "lastItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6876, - "startColumn": 1, - "charOffset": 215351, - "charLength": 153, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendRemoveContainerItem(uint8_t cid, uint16_t slot, std::shared_ptr lastItem) {\r\n\tNetworkMessage msg;\r\n\tmsg.addByte(0x72);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "39aa4814cf76582b", - "equalIndicator/v1": "c40b43c7012ede4df3a8ef21bbed15149eb59596e1eae2f31131622ed7394db1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'condition' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'condition' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1447, - "startColumn": 59, - "charOffset": 44152, - "charLength": 9, - "snippet": { - "text": "condition" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1445, - "startColumn": 1, - "charOffset": 44089, - "charLength": 180, - "snippet": { - "text": "}\r\n\r\nvoid Creature::removeCondition(std::shared_ptr condition) {\r\n\tauto it = std::find(conditions.begin(), conditions.end(), condition);\r\n\tif (it == conditions.end()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5bfc567e765c329c", - "equalIndicator/v1": "c4242648b5d13705d0185276600224350ad66325fdbde21110efbf300f4c16e9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 112, - "startColumn": 30, - "charOffset": 3347, - "charLength": 32, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 110, - "startColumn": 1, - "charOffset": 3170, - "charLength": 364, - "snippet": { - "text": "\tbool registerLuaItemEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaActionEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaUniqueEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaPositionEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaEvent(const std::shared_ptr event);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1b12238c6227a6ce", - "equalIndicator/v1": "c43f79316cffa44c896902425e91ffa824c3bc350e1432bae9ecc08520e7fe4d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/decay/decay.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 189, - "startColumn": 73, - "charOffset": 6047, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 187, - "startColumn": 1, - "charOffset": 5882, - "charLength": 280, - "snippet": { - "text": "\t\t\t\tif (it.abilities && it.abilities->statsPercent[s] != 0) {\r\n\t\t\t\t\tneedUpdateStats = true;\r\n\t\t\t\t\tplayer->setVarStats(static_cast(s), -static_cast(player->getDefaultStats(static_cast(s)) * ((it.abilities->statsPercent[s] - 100) / 100.f)));\r\n\t\t\t\t}\r\n\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d082d9a41bdb6667", - "equalIndicator/v1": "c44ad9f66a938fcbf2b1a0812e9ce767fc97a9594212e28a0cf960ef6b3be72e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/attribute.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 144, - "startColumn": 50, - "charOffset": 4482, - "charLength": 10, - "snippet": { - "text": "const bool" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 142, - "startColumn": 1, - "charOffset": 4285, - "charLength": 309, - "snippet": { - "text": "\tvoid setCustomAttribute(const std::string &key, const std::string &value);\r\n\tvoid setCustomAttribute(const std::string &key, const double value);\r\n\tvoid setCustomAttribute(const std::string &key, const bool value);\r\n\r\n\tvoid addCustomAttribute(const std::string &key, const CustomAttribute &customAttribute);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ffb4d30ab4859b7a", - "equalIndicator/v1": "c45136c2c783d055b31379c46c4ad140bb99e71ff01f9dedb5d2acc3e20fc4c2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 408, - "startColumn": 128, - "charOffset": 15364, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 406, - "startColumn": 1, - "charOffset": 15232, - "charLength": 280, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::playerOnLookInTrade(std::shared_ptr player, std::shared_ptr partner, std::shared_ptr item, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLookInTrade - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b5430fdca4406a6e", - "equalIndicator/v1": "c456eb9ea7effd58e2ad0d36f9763b9782108ff047cd6c4732f49efc9751f000" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 738, - "startColumn": 7, - "charOffset": 26467, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 736, - "startColumn": 1, - "charOffset": 26455, - "charLength": 148, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnMoveItem - \"\r\n\t\t \"Player {} item {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e53967257884b96e", - "equalIndicator/v1": "c47a969c49f50aa7bfd58fbbe718116413a0756af03a4eb2228efb2a57a491ad" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/inbox/inbox.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 62, - "startColumn": 13, - "charOffset": 1776, - "charLength": 22, - "snippet": { - "text": "postRemoveNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 60, - "startColumn": 1, - "charOffset": 1759, - "charLength": 227, - "snippet": { - "text": "}\r\n\r\nvoid Inbox::postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t) {\r\n\tstd::shared_ptr localParent = getParent();\r\n\tif (localParent != nullptr) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c6a2cf5fd516bafd", - "equalIndicator/v1": "c49b4ab63284acd01a9de1f656841f5829ecd659380d4b2eff93580f2f654189" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3170, - "startColumn": 2, - "charOffset": 97331, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3168, - "startColumn": 1, - "charOffset": 97227, - "charLength": 262, - "snippet": { - "text": "void ProtocolGame::parseSeekInContainer(NetworkMessage &msg) {\r\n\tuint8_t containerId = msg.getByte();\r\n\tuint16_t index = msg.get();\r\n\tauto primaryType = msg.getByte();\r\n\tg_game().playerSeekInContainer(player->getID(), containerId, index, primaryType);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "82e4c66730c1127f", - "equalIndicator/v1": "c49b4eb797e034063b26f37ab680050a71b14715c503312736b11512faf27c5b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')", - "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2348, - "startColumn": 23, - "charOffset": 69278, - "charLength": 15, - "snippet": { - "text": "magLevelPercent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2346, - "startColumn": 1, - "charOffset": 69231, - "charLength": 169, - "snippet": { - "text": "\tmanaSpent += amount;\r\n\r\n\tuint8_t oldPercent = magLevelPercent;\r\n\tif (nextReqMana > currReqMana) {\r\n\t\tmagLevelPercent = Player::getPercentLevel(manaSpent, nextReqMana);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "221e0f48c1c62109", - "equalIndicator/v1": "c4c472b0fc7247c862bee667f17d7240c3755157a796d1688fb5a93de219cd47" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'float'", - "markdown": "Narrowing conversion from 'double' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 669, - "startColumn": 25, - "charOffset": 21624, - "charLength": 13, - "snippet": { - "text": "imbuementInfo" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 667, - "startColumn": 1, - "charOffset": 21593, - "charLength": 145, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tfloat damagePercent = imbuementInfo.imbuement->elementDamage / 100.0;\r\n\r\n\t\tdamage.secondary.type = imbuementInfo.imbuement->combatType;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6fd9933bfc57e814", - "equalIndicator/v1": "c4e5c09e93ade4fe25e0e3b3b06ae066e18a0a47d59b98f95b95f899c68a02bf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 342, - "startColumn": 7, - "charOffset": 12216, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 340, - "startColumn": 1, - "charOffset": 12204, - "charLength": 151, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventCreatureOnHear - \"\r\n\t\t \"Creature {} speaker {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "df430db853e3405a", - "equalIndicator/v1": "c50a562ce854877de50169c8d9241725633cd5ef8456b94929eb1633b00da053" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/spawns/spawn_monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 420, - "startColumn": 44, - "charOffset": 14073, - "charLength": 11, - "snippet": { - "text": "totalWeight" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 418, - "startColumn": 1, - "charOffset": 14000, - "charLength": 254, - "snippet": { - "text": "\t\ttotalWeight += weight;\r\n\t}\r\n\tuint32_t randomWeight = uniform_random(0, totalWeight - 1);\r\n\t// order monsters by weight DESC\r\n\tstd::vector, uint32_t>> orderedMonsterTypes(monsterTypes.begin(), monsterTypes.end());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8d39539351d51b0a", - "equalIndicator/v1": "c51cb20090ae289c2650bca69bd66eafffaade0e3792effed82bb53d36f4998a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'acc' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'acc' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1076, - "startColumn": 89, - "charOffset": 44817, - "charLength": 3, - "snippet": { - "text": "acc" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1074, - "startColumn": 1, - "charOffset": 44724, - "charLength": 243, - "snippet": { - "text": "}\r\n\r\nstd::vector> Game::getPlayersByAccount(std::shared_ptr acc, bool allowOffline /* = false */) {\r\n\tauto [accountPlayers, error] = acc->getAccountPlayers();\r\n\tif (error != enumToValue(AccountErrors_t::Ok)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cbb4e0d0f2fd2890", - "equalIndicator/v1": "c528686be44f51c2cd9faa1f003e684b558fba2901679f3675c276d4d261dedf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 673, - "startColumn": 13, - "charOffset": 20989, - "charLength": 1, - "snippet": { - "text": "n" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 671, - "startColumn": 1, - "charOffset": 20841, - "charLength": 185, - "snippet": { - "text": "\t\t\tif (listItem != item && listItem->equals(item) && listItem->getItemCount() < listItem->getStackSize()) {\r\n\t\t\t\t*destItem = listItem;\r\n\t\t\t\tindex = n;\r\n\t\t\t\treturn getContainer();\r\n\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8d257f92716a83d2", - "equalIndicator/v1": "c52b45e075bf83914916f9b28b2f77c170eaa0b3dc1459e18a782919d2ebf8f0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/utils/astarnodes.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 218, - "startColumn": 2, - "charOffset": 8998, - "charLength": 1271, - "snippet": { - "text": "const __m128i key = _mm_set1_epi32(xy);\r\n\r\n\tint32_t pos = 0;\r\n\tint32_t curRound = curNode - 16;\r\n\tfor (; pos <= curRound; pos += 16) {\r\n\t\t__m128i v[4];\r\n\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);\r\n\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);\r\n\t\tv[2] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 8])), key);\r\n\t\tv[3] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 12])), key);\r\n\t\tconst uint32_t mask = _mm_movemask_epi8(_mm_packs_epi16(_mm_packs_epi32(v[0], v[1]), _mm_packs_epi32(v[2], v[3])));\r\n\t\tif (mask != 0) {\r\n\t\t\treturn &nodes[pos + _mm_ctz(mask)];\r\n\t\t}\r\n\t}\r\n\tcurRound = curNode - 8;\r\n\tif (pos <= curRound) {\r\n\t\t__m128i v[2];\r\n\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);\r\n\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);\r\n\t\tconst uint32_t mask = _mm_movemask_epi8(_mm_packs_epi32(v[0], v[1]));\r\n\t\tif (mask != 0) {\r\n\t\t\treturn &nodes[pos + (_mm_ctz(mask) >> 1)];\r\n\t\t}\r\n\t\tpos += 8;\r\n\t}\r\n\tfor (; pos < curNode; ++pos) {\r\n\t\tif (nodesTable[pos] == xy) {\r\n\t\t\treturn &nodes[p" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 216, - "startColumn": 1, - "charOffset": 8943, - "charLength": 1340, - "snippet": { - "text": "\tuint32_t xy = (x << 16) | y;\r\n#if defined(__SSE2__)\r\n\tconst __m128i key = _mm_set1_epi32(xy);\r\n\r\n\tint32_t pos = 0;\r\n\tint32_t curRound = curNode - 16;\r\n\tfor (; pos <= curRound; pos += 16) {\r\n\t\t__m128i v[4];\r\n\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);\r\n\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);\r\n\t\tv[2] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 8])), key);\r\n\t\tv[3] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 12])), key);\r\n\t\tconst uint32_t mask = _mm_movemask_epi8(_mm_packs_epi16(_mm_packs_epi32(v[0], v[1]), _mm_packs_epi32(v[2], v[3])));\r\n\t\tif (mask != 0) {\r\n\t\t\treturn &nodes[pos + _mm_ctz(mask)];\r\n\t\t}\r\n\t}\r\n\tcurRound = curNode - 8;\r\n\tif (pos <= curRound) {\r\n\t\t__m128i v[2];\r\n\t\tv[0] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos])), key);\r\n\t\tv[1] = _mm_cmpeq_epi32(_mm_load_si128(reinterpret_cast(&nodesTable[pos + 4])), key);\r\n\t\tconst uint32_t mask = _mm_movemask_epi8(_mm_packs_epi32(v[0], v[1]));\r\n\t\tif (mask != 0) {\r\n\t\t\treturn &nodes[pos + (_mm_ctz(mask) >> 1)];\r\n\t\t}\r\n\t\tpos += 8;\r\n\t}\r\n\tfor (; pos < curNode; ++pos) {\r\n\t\tif (nodesTable[pos] == xy) {\r\n\t\t\treturn &nodes[pos];\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2569dd1f870b8550", - "equalIndicator/v1": "c52cda06c5a8c3733e7e3915e3536e11da244a38394fd7a78aa7f899d042d4ff" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 845, - "startColumn": 27, - "charOffset": 30563, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 843, - "startColumn": 1, - "charOffset": 30531, - "charLength": 131, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnMoveCreature, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b2ac02eb64c4b1b3", - "equalIndicator/v1": "c5446e061b157c2dacbd577c37217df180c236aeea08a2dbdacf803ceedd8354" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 157, - "startColumn": 9, - "charOffset": 5076, - "charLength": 12, - "snippet": { - "text": "getLastIndex" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 155, - "startColumn": 1, - "charOffset": 4945, - "charLength": 371, - "snippet": { - "text": "\tint32_t getThingIndex(std::shared_ptr thing) const override final;\r\n\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::map &getAllItemTypeCount(std::map &countMap) const override final;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "95dd1c6854b0cfc9", - "equalIndicator/v1": "c544f6796049eea4c57088e68a8d0a1b709a0af2d5865dfdd7cb25b6e84f5d0e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1355, - "startColumn": 95, - "charOffset": 39689, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1353, - "startColumn": 1, - "charOffset": 39590, - "charLength": 146, - "snippet": { - "text": "}\r\n\r\nint32_t Tile::getStackposOfCreature(std::shared_ptr player, std::shared_ptr creature) const {\r\n\tint32_t n;\r\n\tif (ground) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c279195c2c2b1d8b", - "equalIndicator/v1": "c54a45b62a52f1656f4260bbdf99bb2e955bde3f7dc1649832a73b62f7c7a7a9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 174, - "startColumn": 11, - "charOffset": 6074, - "charLength": 10, - "snippet": { - "text": "getOwnerId" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 172, - "startColumn": 1, - "charOffset": 5972, - "charLength": 172, - "snippet": { - "text": "\tvirtual void removeItem(std::shared_ptr thing, bool sendUpdateToClient = false);\r\n\r\n\tuint32_t getOwnerId() const override final;\r\n\r\n\tbool isAnyKindOfRewardChest();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c9ad7219df6b5f34", - "equalIndicator/v1": "c56697eb89cd1c2a74a0d2f0c180e07fa698a0770b7099ec72883b34cc790ac7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1330, - "startColumn": 98, - "charOffset": 39147, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1328, - "startColumn": 1, - "charOffset": 39045, - "charLength": 149, - "snippet": { - "text": "}\r\n\r\nint32_t Tile::getClientIndexOfCreature(std::shared_ptr player, std::shared_ptr creature) const {\r\n\tint32_t n;\r\n\tif (ground) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f6aae94d1160f9f5", - "equalIndicator/v1": "c5753511ce143392588f957af49d9d3308067c98f217f249966d194a41298fdc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned long long' to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'unsigned long long' to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/network/network_message_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 60, - "startColumn": 21, - "charOffset": 1826, - "charLength": 7, - "snippet": { - "text": "message" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 58, - "startColumn": 1, - "charOffset": 1724, - "charLength": 159, - "snippet": { - "text": "\tconst auto &message = getUserdataShared(L, 1);\r\n\tif (message) {\r\n\t\tlua_pushnumber(L, message->get());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d7e538b021992147", - "equalIndicator/v1": "c5b008c65fc0c51e807436105002509ce165766efa69b53e2cc05edd13cd6bc5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/scripts/script_environment.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 44, - "startColumn": 4, - "charOffset": 1172, - "charLength": 9, - "snippet": { - "text": "interface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 42, - "startColumn": 1, - "charOffset": 1110, - "charLength": 133, - "snippet": { - "text": "\t\t// nested callbacks are not allowed\r\n\t\tif (interface) {\r\n\t\t\tinterface->reportErrorFunc(\"Nested callbacks!\");\r\n\t\t}\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8a69b51faf72a437", - "equalIndicator/v1": "c5b085bc62aa61c4cebdf388a1306a9261bd152d152733ddc85cffe1389c48e8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 673, - "startColumn": 15, - "charOffset": 22037, - "charLength": 11, - "snippet": { - "text": "static_cast" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 671, - "startColumn": 1, - "charOffset": 21997, - "charLength": 132, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 0.80f) + 3;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "76df6092bb5abdf8", - "equalIndicator/v1": "c5b4c63b47509a54d65e54c6fe2bc50cc5592aaadfd3b8a9931bd7178d8f33b5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Annotate this function with 'override' or (rarely) 'final'", - "markdown": "Annotate this function with 'override' or (rarely) 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 126, - "startColumn": 3, - "charOffset": 3334, - "charLength": 6, - "snippet": { - "text": "Player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 124, - "startColumn": 1, - "charOffset": 3291, - "charLength": 73, - "snippet": { - "text": "\r\n\texplicit Player(ProtocolGame_ptr p);\r\n\t~Player();\r\n\r\n\t// non-copyable\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e5cc0ef2b54b51b5", - "equalIndicator/v1": "c5c8d296eca93224ab6736e08968a2c3faa18529b34f3d243528b56d63de29ab" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'virtual' is redundant since the function is already declared 'override'", - "markdown": "'virtual' is redundant since the function is already declared 'override'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 238, - "startColumn": 15, - "charOffset": 7777, - "charLength": 16, - "snippet": { - "text": "internalAddThing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 236, - "startColumn": 1, - "charOffset": 7697, - "charLength": 204, - "snippet": { - "text": "\r\n\tvoid internalAddThing(std::shared_ptr thing) override;\r\n\tvoid virtual internalAddThing(uint32_t index, std::shared_ptr thing) override;\r\n\r\n\tconst Position &getPosition() override final {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "59fda8d8486aa759", - "equalIndicator/v1": "c5cad44afbd5a0c38ab95993abfae8ca135120e2b503298e9d089c0883c50554" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1811, - "startColumn": 68, - "charOffset": 48879, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1809, - "startColumn": 1, - "charOffset": 48807, - "charLength": 163, - "snippet": { - "text": "}\r\n\r\nbool ConditionFeared::getRandomDirection(std::shared_ptr creature, Position pos) {\r\n\tstatic std::vector directions {\r\n\t\tDIRECTION_NORTH,\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e4622e03576065fd", - "equalIndicator/v1": "c5cf73d707f68a3e3a0887e91d3681970e80077e21a9816a727246edd7ded4bd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1122, - "startColumn": 51, - "charOffset": 36714, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1120, - "startColumn": 1, - "charOffset": 36659, - "charLength": 269, - "snippet": { - "text": "}\r\n\r\nvoid Combat::CombatFunc(std::shared_ptr caster, const Position &origin, const Position &pos, const std::unique_ptr &area, const CombatParams ¶ms, CombatFunction func, CombatDamage* data) {\r\n\tstd::vector> tileList;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c89a05eb5c859d55", - "equalIndicator/v1": "c61643ef5611f631f37fa5b593fc97077dc0f08f44074eb7f771de5ae8177a07" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::_Tree, std::shared_ptr, std::less>, std::allocator, std::shared_ptr>>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::_Tree, std::shared_ptr, std::less\\>, std::allocator, std::shared_ptr\\>\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/game_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 224, - "startColumn": 57, - "charOffset": 7029, - "charLength": 1, - "snippet": { - "text": "{" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 222, - "startColumn": 1, - "charOffset": 6968, - "charLength": 134, - "snippet": { - "text": "}\r\n\r\nint GameFunctions::luaGameGetMonsterTypes(lua_State* L) {\r\n\t// Game.getMonsterTypes()\r\n\tconst auto type = g_monsters().monsters;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f51483a865158482", - "equalIndicator/v1": "c622f8b5bb64f14f4b9bcad5fd38b458f6206531e1b84cddd1e8249222fa8298" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 762, - "startColumn": 20, - "charOffset": 29376, - "charLength": 6, - "snippet": { - "text": "rawExp" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 760, - "startColumn": 1, - "charOffset": 29329, - "charLength": 117, - "snippet": { - "text": "\r\n\tlua_pushnumber(L, exp);\r\n\tlua_pushnumber(L, rawExp);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 4, 1) != 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "05604dab05f94c34", - "equalIndicator/v1": "c636be510befa2112bf26e390fc80cdccd574d04a0c58f71ea04da7f680eedb2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/player_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1438, - "startColumn": 41, - "charOffset": 51065, - "charLength": 17, - "snippet": { - "text": "m_playerBonusData" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1436, - "startColumn": 1, - "charOffset": 50931, - "charLength": 191, - "snippet": { - "text": "\t// Leech\r\n\tsetPlayerCombatStats(COMBAT_LIFEDRAIN, m_playerBonusData.leech.lifeLeech * 100);\r\n\tsetPlayerCombatStats(COMBAT_MANADRAIN, m_playerBonusData.leech.manaLeech * 100);\r\n\r\n\t// Instant\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ceb82c988fc16068", - "equalIndicator/v1": "c66efbbeb4874b943afe2d66b101e1a237618eb8ac8d0ec9d7c8b19473dd1ca8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 727, - "startColumn": 7, - "charOffset": 22521, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 725, - "startColumn": 1, - "charOffset": 22509, - "charLength": 166, - "snippet": { - "text": "\t}\r\n\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tif (item != nullptr) {\r\n\t\t\tg_logger().error(\"[MoveEvent::executeStep - Creature {} item {}, position {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0caf87f2eff1d176", - "equalIndicator/v1": "c67d366eebdaf1f5bcc0e06c4476abc6781d19a18fb169fb7c1f521541187398" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructor does not initialize these fields: type", - "markdown": "Constructor does not initialize these fields: type" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 45, - "startColumn": 7, - "charOffset": 1293, - "charLength": 12, - "snippet": { - "text": "TileCallback" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 43, - "startColumn": 1, - "charOffset": 1281, - "charLength": 151, - "snippet": { - "text": "};\r\n\r\nclass TileCallback final : public CallBack {\r\npublic:\r\n\tvoid onTileCombat(std::shared_ptr creature, std::shared_ptr tile) const;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "33e2f02baf2d43be", - "equalIndicator/v1": "c681bccd36523227faa7d865883c6ff5c13df24a83cf0b2696e678e6c8391ec6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'fromCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'fromCylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1840, - "startColumn": 101, - "charOffset": 71727, - "charLength": 12, - "snippet": { - "text": "fromCylinder" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1838, - "startColumn": 1, - "charOffset": 71622, - "charLength": 279, - "snippet": { - "text": "}\r\n\r\nReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::shared_ptr fromCylinder, std::shared_ptr toCylinder, std::shared_ptr item, Position toPos) {\r\n\tif (!player || !toCylinder || !item) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6f48521851f5764e", - "equalIndicator/v1": "c689838cd09db5c407ccc11d8d683d767579be4e89a5ee7647cf9773fd3d450e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 167, - "startColumn": 46, - "charOffset": 5091, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 165, - "startColumn": 1, - "charOffset": 5041, - "charLength": 194, - "snippet": { - "text": "}\r\n\r\nbool Weapon::useFist(std::shared_ptr player, std::shared_ptr target) {\r\n\tif (!Position::areInRange<1, 1>(player->getPosition(), target->getPosition())) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4d5ccd204a7b62cc", - "equalIndicator/v1": "c690ba6c46480e214e4d5cd1689b3c7f4296a14b0d5f46e1612e7f1e7036c352" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 695, - "startColumn": 32, - "charOffset": 22714, - "charLength": 13, - "snippet": { - "text": "groupCooldown" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 693, - "startColumn": 1, - "charOffset": 22654, - "charLength": 193, - "snippet": { - "text": "\r\n\tif (groupCooldown > 0) {\r\n\t\tint32_t spellGroupCooldown = groupCooldown;\r\n\t\tif (isUpgraded) {\r\n\t\t\tspellGroupCooldown -= getWheelOfDestinyBoost(WheelSpellBoost_t::GROUP_COOLDOWN, spellGrade);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1e35cc6c80c0afcc", - "equalIndicator/v1": "c6c5aa5973961541f53c648a8c0702317ded2357ef1d20bfeb17c7a7648c38df" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 709, - "startColumn": 7, - "charOffset": 25205, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 707, - "startColumn": 1, - "charOffset": 25193, - "charLength": 144, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnMove - \"\r\n\t\t \"Player {} item {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f16469b190dbc16d", - "equalIndicator/v1": "c6d4289d59536fa7cebc67910952d087a29235beb1a977338c8d064a8afd1572" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1628, - "startColumn": 2, - "charOffset": 57021, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1626, - "startColumn": 1, - "charOffset": 57014, - "charLength": 47, - "snippet": { - "text": "\t}\r\n\r\n\tscriptInterface->resetScriptEnv();\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c01e49200c472193", - "equalIndicator/v1": "c7041a26e75f99842f99c46ec476a3d78cefaed58292f4a6b34669f3b191f036" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 21, - "startColumn": 21, - "charOffset": 829, - "charLength": 8, - "snippet": { - "text": "lootList" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 19, - "startColumn": 1, - "charOffset": 693, - "charLength": 176, - "snippet": { - "text": "\r\nvoid MonsterTypeFunctions::createMonsterTypeLootLuaTable(lua_State* L, const std::vector &lootList) {\r\n\tlua_createtable(L, lootList.size(), 0);\r\n\r\n\tint index = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2180dd10f2cb0815", - "equalIndicator/v1": "c7060fd2a9d4f9d84ecd1eebdd4dc12c6d4ccd3ff322ad2d7223bbc7bb765e46" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'uint16_t' (aka 'unsigned short')", - "markdown": "Narrowing conversion from 'double' to 'uint16_t' (aka 'unsigned short')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 177, - "startColumn": 27, - "charOffset": 7133, - "charLength": 64, - "snippet": { - "text": "(std::floor(100. - itemType.abilities->absorbPercent[i]) / 100.)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 175, - "startColumn": 1, - "charOffset": 7055, - "charLength": 152, - "snippet": { - "text": "\r\n\t\t\tfor (uint16_t i = 0; i < COMBAT_COUNT; ++i) {\r\n\t\t\t\tdamageModifiers[i] *= (std::floor(100. - itemType.abilities->absorbPercent[i]) / 100.);\r\n\t\t\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f4832481af521118", - "equalIndicator/v1": "c7150dbf34dabaaa6c4307794f10555fc29e70ba86a9d28aa65997ef7f642956" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1157, - "startColumn": 59, - "charOffset": 35985, - "charLength": 8, - "snippet": { - "text": "attacker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1155, - "startColumn": 1, - "charOffset": 35922, - "charLength": 140, - "snippet": { - "text": "}\r\n\r\ndouble Creature::getDamageRatio(std::shared_ptr attacker) const {\r\n\tuint32_t totalDamage = 0;\r\n\tuint32_t attackerDamage = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "75ee2c0bedc22d4d", - "equalIndicator/v1": "c72b19527a45d6329084b249eb0e2c1df51e7e680388da089dfdd32b307d9a7e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/npcs/npc.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 194, - "startColumn": 35, - "charOffset": 5955, - "charLength": 7, - "snippet": { - "text": "npcType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 192, - "startColumn": 1, - "charOffset": 5794, - "charLength": 325, - "snippet": { - "text": "\r\n\t\tif (!npcType->info.soundVector.empty() && (npcType->info.soundChance >= static_cast(uniform_random(1, 100)))) {\r\n\t\t\tauto index = uniform_random(0, npcType->info.soundVector.size() - 1);\r\n\t\t\tg_game().sendSingleSoundEffect(static_self_cast()->getPosition(), npcType->info.soundVector[index], getNpc());\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d6d47c4df238210a", - "equalIndicator/v1": "c734043385011a3681916f2e59994b1f5e8fb5220abdf8bdb7b9c97fa3e6e172" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2820, - "startColumn": 2, - "charOffset": 86185, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2818, - "startColumn": 1, - "charOffset": 86086, - "charLength": 208, - "snippet": { - "text": "\tcharmRune_t runeID = static_cast(msg.getByte());\r\n\tuint8_t action = msg.getByte();\r\n\tuint16_t raceid = msg.get();\r\n\tg_iobestiary().sendBuyCharmRune(player, runeID, action, raceid);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "eda7271e53576830", - "equalIndicator/v1": "c7423f69c53112458ab8c4acab235ec815bd2c2038a830c4096a083235083308" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 50, - "startColumn": 72, - "charOffset": 1532, - "charLength": 9, - "snippet": { - "text": "moveEvent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 48, - "startColumn": 1, - "charOffset": 1456, - "charLength": 172, - "snippet": { - "text": "}\r\n\r\nbool MoveEvents::registerLuaItemEvent(const std::shared_ptr moveEvent) {\r\n\tauto itemIdVector = moveEvent->getItemIdsVector();\r\n\tif (itemIdVector.empty()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "31515f3bc266444d", - "equalIndicator/v1": "c74adb46bbecf343c07fae2c69aa09d9368b881cb562061b0d0eb1c7ada01dfe" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'condition' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'condition' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 322, - "startColumn": 53, - "charOffset": 10709, - "charLength": 9, - "snippet": { - "text": "condition" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 320, - "startColumn": 1, - "charOffset": 10626, - "charLength": 149, - "snippet": { - "text": "\t\treturn area != nullptr;\r\n\t}\r\n\tvoid addCondition(const std::shared_ptr condition) {\r\n\t\tparams.conditionList.emplace_back(condition);\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f31f7f5af9e0b868", - "equalIndicator/v1": "c74c59d7e2e3603e15c26529bbea0ee5c5219e48a16519822111cc9171a3a514" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Escaped string literal can be written as a raw string literal", - "markdown": "Escaped string literal can be written as a raw string literal" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/webhook/webhook.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 130, - "startColumn": 15, - "charOffset": 4115, - "charLength": 21, - "snippet": { - "text": "\"\\\"description\\\": \\\"\"" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 128, - "startColumn": 1, - "charOffset": 4024, - "charLength": 214, - "snippet": { - "text": "\t\tpayload << \"\\\"title\\\": \\\"\" << title << \"\\\", \";\r\n\t\tif (!message.empty()) {\r\n\t\t\tpayload << \"\\\"description\\\": \\\"\" << message << \"\\\", \";\r\n\t\t}\r\n\t\tif (g_configManager().getBoolean(DISCORD_SEND_FOOTER, __FUNCTION__)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a04986faf44daca0", - "equalIndicator/v1": "c7dfed97573832fbeb4e5acbfdba4f3febbdf1f26c888f4df5868ab5c9a8cb0e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/functions/iologindata_save_player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 555, - "startColumn": 63, - "charOffset": 21427, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 553, - "startColumn": 1, - "charOffset": 21360, - "charLength": 178, - "snippet": { - "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerInbox(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "eb52c5fefc6ff7c9", - "equalIndicator/v1": "c7eb2991aa51aad8283b5d5eb2b53072f546d4eddc7750a49ba37b9d7ed5df2d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6132, - "startColumn": 50, - "charOffset": 211804, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6130, - "startColumn": 1, - "charOffset": 211750, - "charLength": 280, - "snippet": { - "text": "}\r\n\r\nvoid Game::playerWhisper(std::shared_ptr player, const std::string &text) {\r\n\tauto spectators = Spectators().find(player->getPosition(), false, MAP_MAX_CLIENT_VIEW_PORT_X, MAP_MAX_CLIENT_VIEW_PORT_X, MAP_MAX_CLIENT_VIEW_PORT_Y, MAP_MAX_CLIENT_VIEW_PORT_Y);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "16707216cd193c8a", - "equalIndicator/v1": "c7fa12677e8aa5aad50a501a528bd9c61cd99d00e06804aa04cdbca51f70b930" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/bed.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 137, - "startColumn": 48, - "charOffset": 3694, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 135, - "startColumn": 1, - "charOffset": 3642, - "charLength": 118, - "snippet": { - "text": "}\r\n\r\nbool BedItem::trySleep(std::shared_ptr player) {\r\n\tif (!house || player->isRemoved()) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8d13adac225c8da5", - "equalIndicator/v1": "c817b69075ffe9293d81490e2c00041058e59af8ef48693015b13448e25f711c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'nextBedItem' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'nextBedItem' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/bed.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 120, - "startColumn": 54, - "charOffset": 3173, - "charLength": 11, - "snippet": { - "text": "nextBedItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 118, - "startColumn": 1, - "charOffset": 3115, - "charLength": 115, - "snippet": { - "text": "}\r\n\r\nbool BedItem::isBedComplete(std::shared_ptr nextBedItem) {\r\n\tconst ItemType &it = Item::items[id];\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e474df5cab30c691", - "equalIndicator/v1": "c820a9831ff96ff4c814fe5b25283678eec5682c1b0d7abbe78246c878171cc3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2786, - "startColumn": 3, - "charOffset": 82892, - "charLength": 8, - "snippet": { - "text": "uint64_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2784, - "startColumn": 1, - "charOffset": 82871, - "charLength": 311, - "snippet": { - "text": "\r\n\t\t// Level loss\r\n\t\tuint64_t expLoss = static_cast(experience * deathLossPercent);\r\n\t\tg_events().eventPlayerOnLoseExperience(static_self_cast(), expLoss);\r\n\t\tg_callbacks().executeCallback(EventCallback_t::playerOnLoseExperience, &EventCallback::playerOnLoseExperience, getPlayer(), expLoss);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "729b71945485428f", - "equalIndicator/v1": "c82632a935a69a1f90047b5b2143ea8dfa20e511d9785fc14e0248debfcfa192" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'podium' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'podium' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2517, - "startColumn": 36, - "charOffset": 73072, - "charLength": 6, - "snippet": { - "text": "podium" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2515, - "startColumn": 1, - "charOffset": 72890, - "charLength": 228, - "snippet": { - "text": "\tvoid sendMonsterPodiumWindow(std::shared_ptr podium, const Position &position, uint16_t itemId, uint8_t stackpos) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendMonsterPodiumWindow(podium, position, itemId, stackpos);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bbd1fae3b8dca35f", - "equalIndicator/v1": "c8334dd5010068e15c804981b424037eccbb1bb02a21811e4729b6b66eb47e4c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead", - "markdown": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/database/database.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 262, - "startColumn": 36, - "charOffset": 7579, - "charLength": 9, - "snippet": { - "text": "std::atoi" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 260, - "startColumn": 1, - "charOffset": 7442, - "charLength": 353, - "snippet": { - "text": "\r\nint8_t DBResult::getInt8FromString(const std::string &string, const std::string &function) const {\r\n\tauto result = static_cast(std::atoi(string.c_str()));\r\n\tif (result > std::numeric_limits::max()) {\r\n\t\tg_logger().error(\"[{}] Failed to get number value {} for tier table result, on function call: {}\", __FUNCTION__, result, function);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "91e07de85fa66505", - "equalIndicator/v1": "c842267f9db77c8462b617a91c77e5dd04efd9b606352aa64de1a93ae84045f8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Redundant string initialization", - "markdown": "Redundant string initialization" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monsters.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 245, - "startColumn": 14, - "charOffset": 6903, - "charLength": 13, - "snippet": { - "text": "outfitMonster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 243, - "startColumn": 1, - "charOffset": 6864, - "charLength": 88, - "snippet": { - "text": "\r\n\tOutfit_t outfit = {};\r\n\tstd::string outfitMonster = \"\";\r\n\tuint16_t outfitItem = 0;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "609266acbf2abd50", - "equalIndicator/v1": "c8452effc6d3a52e84715f5b167e4dbb4b8eafeafc78709962134b007a88eebc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'event' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'event' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/creatureevent.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 87, - "startColumn": 24, - "charOffset": 3324, - "charLength": 36, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 85, - "startColumn": 1, - "charOffset": 3200, - "charLength": 215, - "snippet": { - "text": "\tstd::shared_ptr getEventByName(const std::string &name, bool forceLoaded = true);\r\n\r\n\tbool registerLuaEvent(const std::shared_ptr event);\r\n\tvoid removeInvalidEvents();\r\n\tvoid clear();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c5736a0a2fef186c", - "equalIndicator/v1": "c8a2afe364d6733c71f5943cca3de39ac42b212f8c7ee9a296ce2edde4e78619" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/weapon_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 258, - "startColumn": 25, - "charOffset": 7247, - "charLength": 19, - "snippet": { - "text": "getNumber" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 256, - "startColumn": 1, - "charOffset": 7158, - "charLength": 147, - "snippet": { - "text": "\t\t\tweapon->setMaxChange(getNumber(L, 3));\r\n\t\t} else {\r\n\t\t\tweapon->setMaxChange(getNumber(L, 2));\r\n\t\t}\r\n\t\tpushBoolean(L, true);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7279865bb942fa18", - "equalIndicator/v1": "c8c83d3ecf891febc5faac0541dac775f3ff41495220a434174739dfce63086f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/party_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 116, - "startColumn": 21, - "charOffset": 2956, - "charLength": 19, - "snippet": { - "text": "luaPartyGetInvitees" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 114, - "startColumn": 1, - "charOffset": 2931, - "charLength": 151, - "snippet": { - "text": "}\r\n\r\nint PartyFunctions::luaPartyGetInvitees(lua_State* L) {\r\n\t// party:getInvitees()\r\n\tstd::shared_ptr party = getUserdataShared(L, 1);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a1c6e6110662a6e4", - "equalIndicator/v1": "c8d7b1417d417a430bf230cebf890dfd75a6e22fdef520ffbf1edded597a804c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1169, - "startColumn": 67, - "charOffset": 34207, - "charLength": 9, - "snippet": { - "text": "container" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1167, - "startColumn": 1, - "charOffset": 34136, - "charLength": 115, - "snippet": { - "text": "}\r\n\r\nvoid Player::setMainBackpackUnassigned(std::shared_ptr container) {\r\n\tif (!container) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9031f9cd5ab672dc", - "equalIndicator/v1": "c8dd75f46cf1aaa6e9ec77d6fbce09951d8da08d2f19b0c0d21aa27db59d8bd4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'updateTile' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'updateTile' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1092, - "startColumn": 27, - "charOffset": 31999, - "charLength": 10, - "snippet": { - "text": "updateTile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1090, - "startColumn": 1, - "charOffset": 31877, - "charLength": 149, - "snippet": { - "text": "\tvoid sendUpdateTile(std::shared_ptr updateTile, const Position &pos) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendUpdateTile(updateTile, pos);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6d1373dc3e620c82", - "equalIndicator/v1": "c8e5fbabfc23700805c908a65157a1f5d0f2ba88c0b78a5088764cae18383e69" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1284, - "startColumn": 36, - "charOffset": 38045, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1282, - "startColumn": 1, - "charOffset": 37924, - "charLength": 137, - "snippet": { - "text": "\tvoid sendInventoryItem(Slots_t slot, std::shared_ptr item) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendInventoryItem(slot, item);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9846affbd9b3dae5", - "equalIndicator/v1": "c921d5e0a527525e2cce217d615ef0ae9149cdb852c06ac74e19a5d5c2538a50" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 383, - "startColumn": 7, - "charOffset": 14371, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 381, - "startColumn": 1, - "charOffset": 14219, - "charLength": 296, - "snippet": { - "text": "\r\nvoid EventCallback::playerOnLookInBattleList(std::shared_ptr player, std::shared_ptr creature, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLookInBattleList - \"\r\n\t\t \"Player {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f185586b5e2d73a2", - "equalIndicator/v1": "c9357842f32fa40234089a0072fafa1cce312be136ad92704854c343cd0afee9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", - "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/database/database.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 231, - "startColumn": 9, - "charOffset": 6604, - "charLength": 11, - "snippet": { - "text": "std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 229, - "startColumn": 1, - "charOffset": 6567, - "charLength": 72, - "snippet": { - "text": "\t\treturn std::string();\r\n\t}\r\n\treturn std::string(row[it->second]);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8a6873eed3ffff5e", - "equalIndicator/v1": "c95134353dccc39fef735ba1ee965bc1e57ad0f7a200d99122bf7a3a4107667b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/trashholder.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 15, - "startColumn": 26, - "charOffset": 488, - "charLength": 8, - "snippet": { - "text": "queryAdd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 13, - "startColumn": 1, - "charOffset": 435, - "charLength": 237, - "snippet": { - "text": "#include \"game/game.hpp\"\r\n\r\nReturnValue TrashHolder::queryAdd(int32_t, const std::shared_ptr &thing, uint32_t, uint32_t, std::shared_ptr actor) {\r\n\tstd::shared_ptr item = thing->getItem();\r\n\tif (item == nullptr) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a7613bbc0f6a04d7", - "equalIndicator/v1": "c9515e696a6a3c1efca2fcf8a904af1695576eeeabe323cc64a87969f9f5ed81" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'isLogin' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'isLogin' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 522, - "startColumn": 64, - "charOffset": 14125, - "charLength": 10, - "snippet": { - "text": "const bool" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 520, - "startColumn": 1, - "charOffset": 14014, - "charLength": 195, - "snippet": { - "text": "\tbool canOpenCorpse(uint32_t ownerId) const;\r\n\r\n\tvoid addStorageValue(const uint32_t key, const int32_t value, const bool isLogin = false);\r\n\tint32_t getStorageValue(const uint32_t key) const;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f706fb9b653d6c94", - "equalIndicator/v1": "c9555d14255db2c576ecc849f03ed7d353f49ce1a5f17badcabdac65bb9f5402" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2534, - "startColumn": 37, - "charOffset": 75710, - "charLength": 9, - "snippet": { - "text": "healthMax" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2532, - "startColumn": 1, - "charOffset": 75586, - "charLength": 303, - "snippet": { - "text": "\t\t\tcapacity = std::max(0, capacity - noneVocation->getCapGain());\r\n\t\t} else {\r\n\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\r\n\t\t\tmanaMax = std::max(0, manaMax - vocation->getManaGain());\r\n\t\t\tcapacity = std::max(0, capacity - vocation->getCapGain());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "747f50c225e5ce15", - "equalIndicator/v1": "c972394a8afdcc5ee4c1b4e906b5540c12f09a7f062134bef94067dc507acd18" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4449, - "startColumn": 93, - "charOffset": 160188, - "charLength": 5, - "snippet": { - "text": "house" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4447, - "startColumn": 1, - "charOffset": 160091, - "charLength": 248, - "snippet": { - "text": "}\r\n\r\nvoid Game::unwrapItem(std::shared_ptr item, uint16_t unWrapId, std::shared_ptr house, std::shared_ptr player) {\r\n\tif (item->hasOwner() && !item->isOwner(player)) {\r\n\t\tplayer->sendCancelMessage(RETURNVALUE_ITEMISNOTYOURS);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6e9c105fb4b84549", - "equalIndicator/v1": "c9847fae1b0027f477f60c8ae09ed94f357f0ea70953843a27e1ef5f3acddbf7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable has narrower type 'uint8_t' than iteration's upper bound 'std::array::size_type'", - "markdown": "Loop variable has narrower type 'uint8_t' than iteration's upper bound 'std::array::size_type'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/player_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1208, - "startColumn": 22, - "charOffset": 42461, - "charLength": 1, - "snippet": { - "text": "i" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1206, - "startColumn": 1, - "charOffset": 42376, - "charLength": 167, - "snippet": { - "text": "\tPropWriteStream stream;\r\n\tconst auto wheelSlots = getSlots();\r\n\tfor (uint8_t i = 1; i < wheelSlots.size(); ++i) {\r\n\t\tauto value = wheelSlots[i];\r\n\t\tif (value == 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3557dbeec76d87f1", - "equalIndicator/v1": "c99b9004ced40230570e267ce07498af64b6b6e944a46d8cf9bec5116c0aa045" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/loot_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 174, - "startColumn": 28, - "charOffset": 4524, - "charLength": 19, - "snippet": { - "text": "getNumber" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 172, - "startColumn": 1, - "charOffset": 4432, - "charLength": 155, - "snippet": { - "text": "\tconst auto loot = getUserdataShared(L, 1);\r\n\tif (loot) {\r\n\t\tloot->lootBlock.attack = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b87995649bc6744c", - "equalIndicator/v1": "c99ce84797e15508b4012c7d14ff3cfb9c8da3ee6709f90565d69c1e88bc4929" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'achievementsUnlocked' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'achievementsUnlocked' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6184, - "startColumn": 64, - "charOffset": 181749, - "charLength": 20, - "snippet": { - "text": "achievementsUnlocked" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6182, - "startColumn": 1, - "charOffset": 181524, - "charLength": 255, - "snippet": { - "text": "void Player::sendCyclopediaCharacterAchievements(uint16_t secretsUnlocked, std::vector> achievementsUnlocked) {\r\n\tif (client) {\r\n\t\tclient->sendCyclopediaCharacterAchievements(secretsUnlocked, achievementsUnlocked);\r\n\t}\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "95a0e4abb4b75193", - "equalIndicator/v1": "c9ae76cc9c5dad4bb1c2a692bce961203a6ff60ceb7c7f91ea820dc1a71b13b4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1365, - "startColumn": 8, - "charOffset": 39843, - "charLength": 5, - "snippet": { - "text": "items" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1363, - "startColumn": 1, - "charOffset": 39774, - "charLength": 128, - "snippet": { - "text": "\tconst TileItemVector* items = getItemList();\r\n\tif (items) {\r\n\t\tn += items->getTopItemCount();\r\n\t\tif (n >= 10) {\r\n\t\t\treturn -1;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5123391bd292e89d", - "equalIndicator/v1": "c9c8ba9f855aab4ec6e424106018a6d6575ffe00fcfec6076e0e6f8190234ad8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2313, - "startColumn": 98, - "charOffset": 66502, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2311, - "startColumn": 1, - "charOffset": 66400, - "charLength": 205, - "snippet": { - "text": "}\r\n\r\nstd::string Item::getDescription(const ItemType &it, int32_t lookDistance, std::shared_ptr item /*= nullptr*/, int32_t subType /*= -1*/, bool addArticle /*= true*/) {\r\n\tstd::string text = \"\";\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c813a5fd011ccea3", - "equalIndicator/v1": "c9fd785164eb9c9fba19fdf832400ca1c5d5856e6c756069a62a02ba7fbe772a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 128, - "startColumn": 60, - "charOffset": 3822, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 126, - "startColumn": 1, - "charOffset": 3742, - "charLength": 128, - "snippet": { - "text": "\t\treturn skull;\r\n\t}\r\n\tvirtual Skulls_t getSkullClient(std::shared_ptr creature) {\r\n\t\treturn creature->getSkull();\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "250226c04c46c758", - "equalIndicator/v1": "ca074188d2b75119bea6d6c7870ad7497ac27bc1815bdf20a0b99bcad8670488" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1777, - "startColumn": 3, - "charOffset": 62059, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1775, - "startColumn": 1, - "charOffset": 61941, - "charLength": 173, - "snippet": { - "text": "\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r\n\t\treturn true;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "65e613a8a3fd601a", - "equalIndicator/v1": "ca110eab22a95fc71739226c9d49a1af1f46c309bc1accd3db1bfc15b5453caf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Repeated branch body in conditional chain", - "markdown": "Repeated branch body in conditional chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/cyclopedia/player_title.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 276, - "startColumn": 45, - "charOffset": 8492, - "charLength": 1, - "snippet": { - "text": "{" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 274, - "startColumn": 1, - "charOffset": 8372, - "charLength": 261, - "snippet": { - "text": "\t\tauto rank = m_player.getGuildRank();\r\n\t\treturn rank && rank->level == 3;\r\n\t} else if (name == \"Proconsul of Iksupan\") {\r\n\t\t// Win Ancient Aucar Outfits complete so fight with Atab and be teleported to the arena.\r\n\t} else if (name == \"Admirer of the Crown\") {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9e76e7833bed8968", - "equalIndicator/v1": "ca11e4b2dae080c970fb9882c4caddc65a91912b46349da41e0eeb6655e0c41d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '_Val', which is a reserved identifier", - "markdown": "Declaration uses identifier '_Val', which is a reserved identifier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/vectorset.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 67, - "startColumn": 73, - "charOffset": 1763, - "charLength": 4, - "snippet": { - "text": "_Val" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 65, - "startColumn": 1, - "charOffset": 1684, - "charLength": 153, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tconstexpr auto insert(std::vector::const_iterator _Where, const T &_Val) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\treturn container.insert(_Where, _Val);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "50f6fd67650c2236", - "equalIndicator/v1": "ca207b9faea9f705c48840b6ed85f7b9d1e8bd0ed1b3760cb5efbc0e7cc30022" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 43, - "startColumn": 18, - "charOffset": 1473, - "charLength": 5, - "snippet": { - "text": "mType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 41, - "startColumn": 1, - "charOffset": 1326, - "charLength": 279, - "snippet": { - "text": "\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();\r\n\tbaseSpeed = mType->getBaseSpeed();\r\n\tinternalLight = mType->info.light;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "273034a42204e834", - "equalIndicator/v1": "ca50da4890eaa18f3b64111017ae865a871234dd1db1958bd2f7bfd219b8c69e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1277, - "startColumn": 59, - "charOffset": 45410, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1275, - "startColumn": 1, - "charOffset": 45347, - "charLength": 260, - "snippet": { - "text": "}\r\n\r\nvoid Events::eventOnStorageUpdate(std::shared_ptr player, const uint32_t key, const int32_t value, int32_t oldValue, uint64_t currentTime) {\r\n\t// Player::onStorageUpdate(key, value, oldValue, currentTime)\r\n\tif (info.playerOnStorageUpdate == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8650b30bc399e3d0", - "equalIndicator/v1": "ca5ab84eb94be14305cf349475e88aa01139b973071e7235ad874d9b875d8a36" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/player_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2276, - "startColumn": 82, - "charOffset": 79397, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2274, - "startColumn": 1, - "charOffset": 79311, - "charLength": 166, - "snippet": { - "text": "}\r\n\r\nint32_t PlayerWheel::checkBlessingGroveHealingByTarget(std::shared_ptr target) const {\r\n\tif (!target || target == m_player.getPlayer()) {\r\n\t\treturn 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3a5b8757e7142743", - "equalIndicator/v1": "ca62c6548650960ee53ba7d5affc7489f4c48e377f4a8b16ff0eba6e1103152f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/combat/spell_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 143, - "startColumn": 22, - "charOffset": 4618, - "charLength": 4, - "snippet": { - "text": "rune" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 141, - "startColumn": 1, - "charOffset": 4543, - "charLength": 138, - "snippet": { - "text": "\t\t\t}\r\n\t\t\tiType.runeMagLevel = rune->getMagicLevel();\r\n\t\t\tiType.runeLevel = rune->getLevel();\r\n\t\t\tiType.charges = rune->getCharges();\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5cfd173c0fb33469", - "equalIndicator/v1": "ca987078b08902fbc281d7c9833b4bf4c18f7035404483b93b6996bd992227f8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8524, - "startColumn": 53, - "charOffset": 297460, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8522, - "startColumn": 1, - "charOffset": 297403, - "charLength": 261, - "snippet": { - "text": "}\r\n\r\nvoid Game::playerHighscores(std::shared_ptr player, HighscoreType_t type, uint8_t category, uint32_t vocation, const std::string &, uint16_t page, uint8_t entriesPerPage) {\r\n\tif (player->hasAsyncOngoingTask(PlayerAsyncTask_Highscore)) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1731b6b36c69228b", - "equalIndicator/v1": "caa7fbb6329ebdb2a331e9b3a569cbd25da9687f18164b6f8e56697b71fece0d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'initConnection' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'initConnection' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 250, - "startColumn": 11, - "charOffset": 10026, - "charLength": 14, - "snippet": { - "text": "initConnection" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 248, - "startColumn": 1, - "charOffset": 9953, - "charLength": 122, - "snippet": { - "text": "\r\nProtocolGame::ProtocolGame(Connection_ptr initConnection) :\r\n\tProtocol(initConnection) {\r\n\tversion = CLIENT_VERSION;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e084b284fe6ec853", - "equalIndicator/v1": "cac05fb1d4310b2b8f59808e13d570067f19878532101e345b07c27293652174" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 283, - "startColumn": 53, - "charOffset": 7837, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 281, - "startColumn": 1, - "charOffset": 7780, - "charLength": 155, - "snippet": { - "text": "}\r\n\r\nbool House::transferToDepot(std::shared_ptr player, std::shared_ptr tile) const {\r\n\tif (townId == 0 || !player) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e6679dc0cdb654d5", - "equalIndicator/v1": "cad2965dd9e5de2823c357494e9772fc1ea655c90dbf19e481c2e50ca818ac36" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'createNpcTypeShopLuaTable' is within a recursive call chain", - "markdown": "Function 'createNpcTypeShopLuaTable' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 17, - "startColumn": 24, - "charOffset": 587, - "charLength": 25, - "snippet": { - "text": "createNpcTypeShopLuaTable" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 15, - "startColumn": 1, - "charOffset": 536, - "charLength": 181, - "snippet": { - "text": "#include \"game/game.hpp\"\r\n\r\nvoid NpcTypeFunctions::createNpcTypeShopLuaTable(lua_State* L, const std::vector &shopVector) {\r\n\tlua_createtable(L, shopVector.size(), 0);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cba8fb68cc526fd5", - "equalIndicator/v1": "caddf65b53df686d2c3a887cd52de1024dfeacc7d0de857f7302662aa42e9e6e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'long long' is implementation-defined", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'long long' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2498, - "startColumn": 36, - "charOffset": 74349, - "charLength": 10, - "snippet": { - "text": "experience" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2496, - "startColumn": 1, - "charOffset": 74279, - "charLength": 109, - "snippet": { - "text": "\r\n\tuint64_t lostExp = experience;\r\n\texperience = std::max(0, experience - exp);\r\n\r\n\tif (sendText) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "462ceff742f5a27d", - "equalIndicator/v1": "cb10675c69787ac7ab1c26bca00884a1bcc443de54eb618cc421348dfef491da" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 344, - "startColumn": 14, - "charOffset": 8579, - "charLength": 12, - "snippet": { - "text": "std::tolower" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 342, - "startColumn": 1, - "charOffset": 8520, - "charLength": 143, - "snippet": { - "text": "\t\tif (std::isupper(ch)) {\r\n\t\t\tresult += '-';\r\n\t\t\tresult += std::tolower(ch);\r\n\t\t} else if (std::isspace(ch) || ch == '_') {\r\n\t\t\tresult += '-';\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "022c391b13fe1d66", - "equalIndicator/v1": "cb30ee381d1cd172e420163c165e46e347a74ca84ba191f8d6a35faa5297d740" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 158, - "startColumn": 53, - "charOffset": 6439, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 156, - "startColumn": 1, - "charOffset": 6295, - "charLength": 353, - "snippet": { - "text": "\t * @param[in] player The pointer to the player whose equipped items are considered.\r\n\t */\r\n\tvoid calculateAbsorbValues(std::shared_ptr player, NetworkMessage &msg, uint8_t &combats) {\r\n\t\talignas(16) uint16_t damageModifiers[COMBAT_COUNT] = { 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000 };\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "357e28b6052a6a57", - "equalIndicator/v1": "cb318a9b613a478e8ff19b60de11b063f6f2ec0a912f01cbadf9d514d9522b73" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/game_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 868, - "startColumn": 63, - "charOffset": 25258, - "charLength": 1, - "snippet": { - "text": "{" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 866, - "startColumn": 1, - "charOffset": 25191, - "charLength": 186, - "snippet": { - "text": "}\r\n\r\nint GameFunctions::luaGameGetSecretAchievements(lua_State* L) {\r\n\t// Game.getSecretAchievements()\r\n\tconst std::vector &achievements = g_game().getSecretAchievements();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b1431330ea6fc05b", - "equalIndicator/v1": "cb4bce2f723e80e9d9731c55cf0355d38711efb68d43b25a0da2bd0b447fcdce" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 238, - "startColumn": 41, - "charOffset": 8748, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 236, - "startColumn": 1, - "charOffset": 8702, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ad0d02a752f8a18e", - "equalIndicator/v1": "cb4e5718fee91369ab78258b51792acf9d66e2349c5dfb4498ef0c7ac0d50563" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 463, - "startColumn": 95, - "charOffset": 17485, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 461, - "startColumn": 1, - "charOffset": 17386, - "charLength": 218, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::playerOnRemoveCount(std::shared_ptr player, std::shared_ptr item) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnMove - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a41037a0e08be717", - "equalIndicator/v1": "cb7e8742b3d48f2b05575ecc09b3550d98aa5e3290e31736281044d0e5e95b42" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'destTile' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'destTile' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 275, - "startColumn": 109, - "charOffset": 9174, - "charLength": 8, - "snippet": { - "text": "destTile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 273, - "startColumn": 1, - "charOffset": 9061, - "charLength": 209, - "snippet": { - "text": "}\r\n\r\nvoid Weapon::onUsedWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr destTile) const {\r\n\tif (!player->hasFlag(PlayerFlags_t::NotGainSkill)) {\r\n\t\tskills_t skillType;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9708f525b6758435", - "equalIndicator/v1": "cb81817531851e51e5aeb09ba8d15dfa34ad06cd7d7dc5a52fe258c7dc6a25ef" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructor does not initialize these fields: m_cost, t_cost, parallelism", - "markdown": "Constructor does not initialize these fields: m_cost, t_cost, parallelism" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/security/argon.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 21, - "startColumn": 9, - "charOffset": 720, - "charLength": 6, - "snippet": { - "text": "Argon2" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 19, - "startColumn": 1, - "charOffset": 600, - "charLength": 155, - "snippet": { - "text": "const std::string Argon2::base64_chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\r\n\r\nArgon2::Argon2() {\r\n\tupdateConstants();\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ab38ea0476f52601", - "equalIndicator/v1": "cbc434f065bccde457a2129c3348d5620b892f689bde2b61eba383e788293ff8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1666, - "startColumn": 7, - "charOffset": 58435, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1664, - "startColumn": 1, - "charOffset": 58276, - "charLength": 352, - "snippet": { - "text": "void TargetCallback::onTargetCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\t// onTargetCombat(creature, target)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[TargetCallback::onTargetCombat - Creature {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "29418000251213f1", - "equalIndicator/v1": "cbccec5d6fb9072e098683529048f00e1faed34b5725a82e84ff049c58abbcf6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6855, - "startColumn": 20, - "charOffset": 237473, - "charLength": 15, - "snippet": { - "text": "levelDifference" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6853, - "startColumn": 1, - "charOffset": 237317, - "charLength": 332, - "snippet": { - "text": "\tif (isLowerLevel) {\r\n\t\tfloat rateDamageTakenByLevel = g_configManager().getFloat(PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, __FUNCTION__) / 100;\r\n\t\tlevelDiffRate += levelDifference * rateDamageTakenByLevel;\r\n\t} else {\r\n\t\tfloat rateDamageReductionByLevel = g_configManager().getFloat(PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, __FUNCTION__) / 100;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6717ce3e867a529e", - "equalIndicator/v1": "cc84a9c5d97d854086f8c56c5c338fa800785988906da75abdae6d9f4124a387" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'newName' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'newName' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 56, - "startColumn": 25, - "charOffset": 1844, - "charLength": 22, - "snippet": { - "text": "const std::string_view" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 54, - "startColumn": 1, - "charOffset": 1753, - "charLength": 132, - "snippet": { - "text": "\t * @param newName The new name to set for the script type.\r\n\t */\r\n\tvoid setScriptTypeName(const std::string_view newName);\r\n\r\n\t/**\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fa2da6a0ca66b431", - "equalIndicator/v1": "cc8748f702f66b23c596ef4f33008b3e695968992f9b6f31e7de8e78b5224c12" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'", - "markdown": "Prefer using 'override' or (rarely) 'final' instead of 'virtual'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 70, - "startColumn": 11, - "charOffset": 2205, - "charLength": 8, - "snippet": { - "text": "Creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 68, - "startColumn": 1, - "charOffset": 2148, - "charLength": 89, - "snippet": { - "text": "\tstatic constexpr double speedC = -4795.01;\r\n\r\n\tvirtual ~Creature();\r\n\r\n\t// non-copyable\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "24f8154fa42f563b", - "equalIndicator/v1": "cc98a78eaa7a0a0f2f7adfd4e5b49dca39ab74f92ec7a07f2156b85ffa9f3ef1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 303, - "startColumn": 41, - "charOffset": 11342, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 301, - "startColumn": 1, - "charOffset": 11296, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0c67deeffda2b377", - "equalIndicator/v1": "ccdd28e6a58182f8eb084705128a21c80e3b7e21515d7404bab148888ec2597f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'uint16_t' (aka 'unsigned short') to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 806, - "startColumn": 9, - "charOffset": 26110, - "charLength": 13, - "snippet": { - "text": "elementDamage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 804, - "startColumn": 1, - "charOffset": 26043, - "charLength": 87, - "snippet": { - "text": "\r\nint16_t WeaponDistance::getElementDamageValue() const {\r\n\treturn elementDamage;\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1fbec82dfdaf6103", - "equalIndicator/v1": "cce70086cdc860c21d952b82cc35e1b6401948f5d8ad6010008d7d62de74c8f8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to 'float'", - "markdown": "Narrowing conversion from 'int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 676, - "startColumn": 49, - "charOffset": 18492, - "charLength": 23, - "snippet": { - "text": "(buffsPercent[i] - 100)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 674, - "startColumn": 1, - "charOffset": 18396, - "charLength": 138, - "snippet": { - "text": "\r\n\t\tint32_t actualBuff = creature->getBuff(i);\r\n\t\tbuffs[i] = static_cast(actualBuff * ((buffsPercent[i] - 100) / 100.f));\r\n\t}\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "29d8c7184b47cf50", - "equalIndicator/v1": "cd0fa11194916da83fe4567b5acdecfbd2d9d4397f0cb9b6fe410b5feea3984e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 568, - "startColumn": 113, - "charOffset": 20157, - "charLength": 5, - "snippet": { - "text": "thing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 566, - "startColumn": 1, - "charOffset": 20040, - "charLength": 295, - "snippet": { - "text": "}\r\n\r\nvoid Events::eventPlayerOnLook(std::shared_ptr player, const Position &position, std::shared_ptr thing, uint8_t stackpos, int32_t lookDistance) {\r\n\t// Player:onLook(thing, position, distance) or Player.onLook(self, thing, position, distance)\r\n\tif (info.playerOnLook == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4fbfe9e54d44881d", - "equalIndicator/v1": "cd116ebbcfd4f801ce676b14569285c863c618cedec005e40a67edc67beff89f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/functions/iologindata_save_player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 521, - "startColumn": 63, - "charOffset": 20363, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 519, - "startColumn": 1, - "charOffset": 20296, - "charLength": 178, - "snippet": { - "text": "}\r\n\r\nbool IOLoginDataSave::saveRewardItems(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dc3a121be3ed2bcd", - "equalIndicator/v1": "cd1258ebb7b6eac4f1c7d3e337b4dae87536e40b71c4d5ecd1d89f557f680cdb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'loginConnection' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'loginConnection' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocollogin.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 28, - "startColumn": 12, - "charOffset": 829, - "charLength": 15, - "snippet": { - "text": "loginConnection" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 26, - "startColumn": 1, - "charOffset": 757, - "charLength": 143, - "snippet": { - "text": "\r\n\texplicit ProtocolLogin(Connection_ptr loginConnection) :\r\n\t\tProtocol(loginConnection) { }\r\n\r\n\tvoid onRecvFirstMessage(NetworkMessage &msg);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "40ecea0fc4dc4b0e", - "equalIndicator/v1": "cd210aa6250fa864508986c59b03152212ded6cb6b762df580ad45eea49d31d0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 491, - "startColumn": 81, - "charOffset": 14641, - "charLength": 1, - "snippet": { - "text": "," - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 489, - "startColumn": 1, - "charOffset": 14556, - "charLength": 122, - "snippet": { - "text": "}\r\n\r\nuint32_t MoveEvent::RemoveItemField(std::shared_ptr, std::shared_ptr, const Position &) {\r\n\treturn 1;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8e6c3e38e1491bea", - "equalIndicator/v1": "cd316636e782810c1530a35113782fb04153685e849e3772b11794cb082a78c5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use nullptr", - "markdown": "Use nullptr" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 434, - "startColumn": 26, - "charOffset": 26773, - "charLength": 1, - "snippet": { - "text": "0" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 432, - "startColumn": 1, - "charOffset": 26685, - "charLength": 123, - "snippet": { - "text": "\r\n\tconst uint16_t date = result->getNumber(\"date\");\r\n\tconst time_t now = time(0);\r\n\ttm* ltm = localtime(&now);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "66a16b429530b713", - "equalIndicator/v1": "cd447b5c8ce52ddff59d20264441f01174c11a83f79778cda1de137e36f51909" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1946, - "startColumn": 2, - "charOffset": 59434, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1944, - "startColumn": 1, - "charOffset": 59366, - "charLength": 252, - "snippet": { - "text": "\r\nvoid ProtocolGame::parsePlayerSellOnShop(NetworkMessage &msg) {\r\n\tuint16_t id = msg.get();\r\n\tuint8_t count = std::max(msg.getByte(), (uint8_t)1);\r\n\tuint16_t amount = oldProtocol ? static_cast(msg.getByte()) : msg.get();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "464b58620b20e032", - "equalIndicator/v1": "cd53731fa086ec81da51e49d81507b20ab76f43dc637ff470636047e8591855a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'operator basic_string' must be marked explicit to avoid unintentional implicit conversions", - "markdown": "'operator basic_string' must be marked explicit to avoid unintentional implicit conversions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/value_wrapper.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 100, - "startColumn": 27, - "charOffset": 3057, - "charLength": 11, - "snippet": { - "text": "std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 98, - "startColumn": 1, - "charOffset": 2979, - "charLength": 133, - "snippet": { - "text": "\tbool operator==(const ValueWrapper &rhs) const;\r\n\r\n\texplicit(false) operator std::string() const {\r\n\t\treturn get();\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3e54bef897fda93f", - "equalIndicator/v1": "cd5dab4050dd2b733a0cde76cef51d473515fa15bebd6bfe0f973f7dc82a0a54" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1627, - "startColumn": 113, - "charOffset": 48566, - "charLength": 7, - "snippet": { - "text": "newItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1625, - "startColumn": 1, - "charOffset": 48449, - "charLength": 156, - "snippet": { - "text": "}\r\n\r\nvoid Player::sendUpdateContainerItem(std::shared_ptr container, uint16_t slot, std::shared_ptr newItem) {\r\n\tif (!client) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d84394e96e6bcbe3", - "equalIndicator/v1": "cd6c5f63533d687c8d718e91c1e4209dad71a815ba39441c383c1fb4d8975529" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", - "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1076, - "startColumn": 11, - "charOffset": 30777, - "charLength": 11, - "snippet": { - "text": "std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1074, - "startColumn": 1, - "charOffset": 30733, - "charLength": 66, - "snippet": { - "text": "\t\t\treturn \"missile\";\r\n\t\tdefault:\r\n\t\t\treturn std::string();\r\n\t}\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "011de28de5249aa4", - "equalIndicator/v1": "cd83f140d0ca63cdf30ba00606733c42f2269703cd6cf128ed5b0811edbb2de9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/depot/depotlocker.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 36, - "startColumn": 14, - "charOffset": 1031, - "charLength": 8, - "snippet": { - "text": "queryAdd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 34, - "startColumn": 1, - "charOffset": 986, - "charLength": 346, - "snippet": { - "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "260495c4e4c32ed4", - "equalIndicator/v1": "cd96db046997770a83140e33937b8a57b7c40785539670fd504672818ea10e91" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'initConnection' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'initConnection' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocol.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 17, - "startColumn": 35, - "charOffset": 596, - "charLength": 14, - "snippet": { - "text": "initConnection" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 15, - "startColumn": 1, - "charOffset": 487, - "charLength": 166, - "snippet": { - "text": "class Protocol : public std::enable_shared_from_this {\r\npublic:\r\n\texplicit Protocol(Connection_ptr initConnection) :\r\n\t\tconnectionPtr(initConnection) { }\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5f0307fcbb6bfa23", - "equalIndicator/v1": "cda65f82b68fb39377c7511e739a538b285c39756d811a3130944ab8b10d3eca" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/trashholder.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 83, - "startColumn": 65, - "charOffset": 2493, - "charLength": 1, - "snippet": { - "text": "{" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 81, - "startColumn": 1, - "charOffset": 2424, - "charLength": 79, - "snippet": { - "text": "}\r\n\r\nvoid TrashHolder::removeThing(std::shared_ptr, uint32_t) {\r\n\t//\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b361df66f0f50796", - "equalIndicator/v1": "cda9d43532d75af35fd886317ef80c592184ce1f270a41096da6794f79bf467f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Annotate this function with 'override' or (rarely) 'final'", - "markdown": "Annotate this function with 'override' or (rarely) 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 42, - "startColumn": 3, - "charOffset": 1036, - "charLength": 9, - "snippet": { - "text": "Container" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 40, - "startColumn": 1, - "charOffset": 907, - "charLength": 203, - "snippet": { - "text": "\texplicit Container(uint16_t type);\r\n\tContainer(uint16_t type, uint16_t size, bool unlocked = true, bool pagination = false);\r\n\t~Container();\r\n\r\n\tstatic std::shared_ptr create(uint16_t type);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8b4092e451abcb4f", - "equalIndicator/v1": "cdb75fd06462757255dabe7e9fa81910fbba2160e24a4de2bd32f3936dd57b72" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 350, - "startColumn": 27, - "charOffset": 12545, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 348, - "startColumn": 1, - "charOffset": 12513, - "charLength": 125, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.creatureOnHear, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "19b2f1c2afc3d4b1", - "equalIndicator/v1": "cdbae4ff22bf44d3e811851fe449b5d50603b201c36146bae3fad8cb2b1896c8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 345, - "startColumn": 22, - "charOffset": 9211, - "charLength": 8, - "snippet": { - "text": "blockHit" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 343, - "startColumn": 1, - "charOffset": 9082, - "charLength": 414, - "snippet": { - "text": "\t */\r\n\tvoid mitigateDamage(const CombatType_t &combatType, BlockType_t &blockType, int32_t &damage) const;\r\n\tvirtual BlockType_t blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense = false, bool checkArmor = false, bool field = false);\r\n\r\n\tvoid applyAbsorbDamageModifications(std::shared_ptr attacker, int32_t &damage, CombatType_t combatType) const;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "407c33bb4201c9a4", - "equalIndicator/v1": "cddc89111b649f28c190c4d83e23b9a8c61a6501a7650ead479c20a0ce6f1707" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/trashholder.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 88, - "startColumn": 2, - "charOffset": 2646, - "charLength": 71, - "snippet": { - "text": "getParent()->postAddNotification(thing, oldParent, index, LINK_PARENT);" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 86, - "startColumn": 1, - "charOffset": 2504, - "charLength": 219, - "snippet": { - "text": "\r\nvoid TrashHolder::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tgetParent()->postAddNotification(thing, oldParent, index, LINK_PARENT);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "afe8c8e837bd84ec", - "equalIndicator/v1": "cde2789d9ab8835c4c90b79d523f083eaac243ddb55787db2c2f06373a71a98d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 9801, - "startColumn": 51, - "charOffset": 342994, - "charLength": 7, - "snippet": { - "text": "monster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 9799, - "startColumn": 1, - "charOffset": 342939, - "charLength": 105, - "snippet": { - "text": "}\r\n\r\nvoid Game::removeMonster(std::shared_ptr monster) {\r\n\tmonsters.erase(monster->getID());\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f2aa64df1c6d21d4", - "equalIndicator/v1": "ce0107342cb8e14e33e61c0b542e0a6773834d436e0f0a2cd692c9fe6181c858" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'cylinder' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2563, - "startColumn": 50, - "charOffset": 97273, - "charLength": 8, - "snippet": { - "text": "cylinder" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2561, - "startColumn": 1, - "charOffset": 97219, - "charLength": 227, - "snippet": { - "text": "}\r\n\r\nbool Game::removeMoney(std::shared_ptr cylinder, uint64_t money, uint32_t flags /*= 0*/, bool useBalance /*= false*/) {\r\n\tif (cylinder == nullptr) {\r\n\t\tg_logger().error(\"[{}] cylinder is nullptr\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ab9866911fe0bee0", - "equalIndicator/v1": "ce1a379e9a34a18476017126697c433440577da8eb41b88d83f14364355add16" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'getIconID' can be made const", - "markdown": "Method 'getIconID' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/imbuements/imbuements.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 119, - "startColumn": 11, - "charOffset": 2877, - "charLength": 9, - "snippet": { - "text": "getIconID" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 117, - "startColumn": 1, - "charOffset": 2861, - "charLength": 65, - "snippet": { - "text": "\t}\r\n\r\n\tuint16_t getIconID() {\r\n\t\treturn icon + (baseid - 1);\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4afe8098bb769b20", - "equalIndicator/v1": "ce2f5fc2a9a29cd4abf32713b8c16e86d782373b0529506bf5380f8dc68f1bf8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 568, - "startColumn": 56, - "charOffset": 20100, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 566, - "startColumn": 1, - "charOffset": 20040, - "charLength": 295, - "snippet": { - "text": "}\r\n\r\nvoid Events::eventPlayerOnLook(std::shared_ptr player, const Position &position, std::shared_ptr thing, uint8_t stackpos, int32_t lookDistance) {\r\n\t// Player:onLook(thing, position, distance) or Player.onLook(self, thing, position, distance)\r\n\tif (info.playerOnLook == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7c7c33ca185ca10f", - "equalIndicator/v1": "ce3ee7261e4e9e74acbe7709a444a09019231b9d56f18dae6494c9c24b3a4e8e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1192, - "startColumn": 7, - "charOffset": 45411, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1190, - "startColumn": 1, - "charOffset": 45287, - "charLength": 276, - "snippet": { - "text": "\r\nvoid EventCallback::zoneAfterCreatureEnter(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneAfterCreatureEnter - \"\r\n\t\t \"Zone {} Creature {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0e8b8097dc0ab271", - "equalIndicator/v1": "ce41ca9a1ac229581d3fc65b39eb6997eae088ad5b5417b77c9bb41abadfacd6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 88, - "startColumn": 8, - "charOffset": 2294, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 86, - "startColumn": 1, - "charOffset": 2206, - "charLength": 201, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeIsRune(lua_State* L) {\r\n\t// itemType:isRune()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->isRune());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "49cbd00229e399c1", - "equalIndicator/v1": "ce66311a576f1dcbcabee6129d52058b4530d7b909870981e5116e49d4ccc400" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'float'", - "markdown": "Narrowing conversion from 'double' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 643, - "startColumn": 35, - "charOffset": 20214, - "charLength": 7, - "snippet": { - "text": "augment" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 641, - "startColumn": 1, - "charOffset": 20027, - "charLength": 397, - "snippet": { - "text": "\t\t\t\t}\r\n\t\t\t\tif (augment->type == Augment_t::IncreasedDamage || augment->type == Augment_t::PowerfulImpact || augment->type == Augment_t::StrongImpact) {\r\n\t\t\t\t\tconst float augmentPercent = augment->value / 100.0;\r\n\t\t\t\t\tdamage.primary.value += static_cast(damage.primary.value * augmentPercent);\r\n\t\t\t\t\tdamage.secondary.value += static_cast(damage.secondary.value * augmentPercent);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "80531f06673a7e96", - "equalIndicator/v1": "ceb90e6d76a624c52b430274ab0630dcd426c384aef970a07906811348192e91" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 384, - "startColumn": 54, - "charOffset": 11112, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 382, - "startColumn": 1, - "charOffset": 11054, - "charLength": 148, - "snippet": { - "text": "}\r\n\r\nbool Spell::playerSpellCheck(std::shared_ptr player) const {\r\n\tif (player->hasFlag(PlayerFlags_t::CannotUseSpells)) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "97486e04c7f6707b", - "equalIndicator/v1": "cec42e6cf344058e52aaec36f4fd416fde2b03119b88d9e8f0956b9249769e39" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1225, - "startColumn": 29, - "charOffset": 36073, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1223, - "startColumn": 1, - "charOffset": 35944, - "charLength": 163, - "snippet": { - "text": "\tvoid sendCreatureType(std::shared_ptr creature, uint8_t creatureType) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureType(creature, creatureType);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4716779d817b5a0a", - "equalIndicator/v1": "ceee5971c9533b27053d94af8988f92e113c161819f674c9edb451eba87a2601" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 191, - "startColumn": 20, - "charOffset": 5746, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 189, - "startColumn": 1, - "charOffset": 5707, - "charLength": 78, - "snippet": { - "text": "\r\n\t\taddItem(item);\r\n\t\tupdateItemWeight(item->getWeight());\r\n\t}\r\n\treturn true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c1aebafdaa87ee23", - "equalIndicator/v1": "cef1f8190e96f94fa516d8aae3d4535783342bc8119a5eaa0f54db8380a86773" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'reloadAll' is within a recursive call chain", - "markdown": "Function 'reloadAll' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/functions/game_reload.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 85, - "startColumn": 18, - "charOffset": 2681, - "charLength": 9, - "snippet": { - "text": "reloadAll" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 83, - "startColumn": 1, - "charOffset": 2589, - "charLength": 202, - "snippet": { - "text": " * Changing this to public may cause some unexpected behavior or bug\r\n */\r\nbool GameReload::reloadAll() {\r\n\tstd::vector reloadResults;\r\n\treloadResults.reserve(magic_enum::enum_count());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a5d791785ca1c016", - "equalIndicator/v1": "cf12453c25f68eb3f0f1b652461963c53ea058613bdbbb127f3685ac691ee40d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/functions/iologindata_save_player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 508, - "startColumn": 31, - "charOffset": 20079, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 506, - "startColumn": 1, - "charOffset": 19984, - "charLength": 177, - "snippet": { - "text": "\r\n\t\tfor (const auto &[pid, depotChest] : player->depotChests) {\r\n\t\t\tfor (std::shared_ptr item : depotChest->getItemList()) {\r\n\t\t\t\tdepotList.emplace_back(pid, item);\r\n\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e71b1fdc797587b0", - "equalIndicator/v1": "cf2c30c15a542e42284b302d869d79e52c7d8b5c37f62c7849b7a63089ae44a3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1137, - "startColumn": 92, - "charOffset": 40730, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1135, - "startColumn": 1, - "charOffset": 40634, - "charLength": 286, - "snippet": { - "text": "}\r\n\r\nvoid Events::eventPlayerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage) {\r\n\t// Player:onCombat(target, item, primaryDamage, primaryType, secondaryDamage, secondaryType)\r\n\tif (info.playerOnCombat == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "990f8b9fcbfc1fed", - "equalIndicator/v1": "cf4d8bcf72c65a683d4ed3c9b239a2cec00fe8c7b9d102633cef8acc4dc0c4d6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 43, - "startColumn": 18, - "charOffset": 1473, - "charLength": 5, - "snippet": { - "text": "mType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 41, - "startColumn": 1, - "charOffset": 1326, - "charLength": 279, - "snippet": { - "text": "\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();\r\n\tbaseSpeed = mType->getBaseSpeed();\r\n\tinternalLight = mType->info.light;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "273034a42204e834", - "equalIndicator/v1": "cf52bf143b34ea3e085776bd14850d3bf5331f4fa5a545f4e8e870717ece2539" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7858, - "startColumn": 54, - "charOffset": 274862, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7856, - "startColumn": 1, - "charOffset": 274804, - "charLength": 156, - "snippet": { - "text": "}\r\n\r\nvoid Game::addPlayerVocation(std::shared_ptr target) {\r\n\tif (const auto &party = target->getParty()) {\r\n\t\tparty->updatePlayerVocation(target);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "859389ce836c2c57", - "equalIndicator/v1": "cf54a63b817c4226b48ac9fb114684b79d8cf7dfcff4c964c55aedfcde8d59a3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iobestiary.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 421, - "startColumn": 3, - "charOffset": 13904, - "charLength": 6, - "snippet": { - "text": "return" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 419, - "startColumn": 1, - "charOffset": 13853, - "charLength": 110, - "snippet": { - "text": "\t\treturn 4;\r\n\t} else if (chanceInPercent < 1) {\r\n\t\treturn 3;\r\n\t} else if (chanceInPercent < 5) {\r\n\t\treturn 2;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e23f62820cc50220", - "equalIndicator/v1": "cf58ac7c782c13bd06657941cf161ae2b142698bc4d62ecc5e81d2253ff90e8a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned int' to 'float'", - "markdown": "Narrowing conversion from 'unsigned int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 670, - "startColumn": 37, - "charOffset": 21952, - "charLength": 18, - "snippet": { - "text": "std::min" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 668, - "startColumn": 1, - "charOffset": 21890, - "charLength": 132, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.25f) + 3;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1e3e202c5d5f2105", - "equalIndicator/v1": "cf8af8e2d026635c4ccc450f835a716e15d27591b27ad9d5d6c21b16fced788f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6804, - "startColumn": 114, - "charOffset": 235235, - "charLength": 14, - "snippet": { - "text": "attackerPlayer" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6802, - "startColumn": 1, - "charOffset": 235117, - "charLength": 251, - "snippet": { - "text": "}\r\n\r\nvoid Game::notifySpectators(const CreatureVector &spectators, const Position &targetPos, std::shared_ptr attackerPlayer, std::shared_ptr targetMonster) {\r\n\tif (!spectators.empty()) {\r\n\t\tfor (const auto &spectator : spectators) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "82d0892864069cc6", - "equalIndicator/v1": "cf9ce2c44820666bde6874faa738b120e156da5c231d9a94bdf15995134c0a50" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/bed.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 253, - "startColumn": 24, - "charOffset": 6692, - "charLength": 5, - "snippet": { - "text": "regen" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 251, - "startColumn": 1, - "charOffset": 6662, - "charLength": 201, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tplayer->changeHealth(regen * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__), false);\r\n\t\tplayer->changeMana(regen * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__));\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "886591dc0bec17cd", - "equalIndicator/v1": "cf9e9ed4e19a8da6a20b12bae224540abc06f07be35fbdb9cd1d07b11c9bfefb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 545, - "startColumn": 40, - "charOffset": 16604, - "charLength": 8, - "snippet": { - "text": "capacity" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 543, - "startColumn": 1, - "charOffset": 16559, - "charLength": 101, - "snippet": { - "text": "\t}\r\n\r\n\tint32_t freeSlots = std::max(capacity() - size(), 0);\r\n\r\n\tif (item->isStackable()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d1f9e13e4672f0fb", - "equalIndicator/v1": "cfccc5207c1b6ac5a8524e8e53342c3932106095d0dd15b76d941aa7c110518f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first.", - "markdown": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 679, - "startColumn": 15, - "charOffset": 22253, - "charLength": 2, - "snippet": { - "text": "it" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 677, - "startColumn": 1, - "charOffset": 22212, - "charLength": 74, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tchance = it.hitChance;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d9512e3ea8d0367b", - "equalIndicator/v1": "cfcef4de1668c9d2ec141a6d93277f73daf4e76ba5c844e3c51d73232a1a4213" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::_Tree, std::less, std::allocator>>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::_Tree, std::less, std::allocator\\>\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/game_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 239, - "startColumn": 2, - "charOffset": 7406, - "charLength": 10, - "snippet": { - "text": "const auto" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 237, - "startColumn": 1, - "charOffset": 7332, - "charLength": 165, - "snippet": { - "text": "int GameFunctions::luaGameGetTowns(lua_State* L) {\r\n\t// Game.getTowns()\r\n\tconst auto towns = g_game().map.towns.getTowns();\r\n\tlua_createtable(L, towns.size(), 0);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7ff71daffcbce398", - "equalIndicator/v1": "cfe72cc1be801e3ecf891a0433d2fb41c3a6d0a8e5f5b3d9d92f01fa8bcd2031" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3083, - "startColumn": 61, - "charOffset": 92619, - "charLength": 9, - "snippet": { - "text": "container" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3081, - "startColumn": 1, - "charOffset": 92512, - "charLength": 197, - "snippet": { - "text": "\r\n// close container and its child containers\r\nvoid Player::autoCloseContainers(std::shared_ptr container) {\r\n\tstd::vector closeList;\r\n\tfor (const auto &it : openContainers) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4970b8598459fde4", - "equalIndicator/v1": "cff086b035890e26b2c53903a181d973f7db1f7fc7d8b939d0a53e2e4e3ec81e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/global_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 222, - "startColumn": 20, - "charOffset": 6441, - "charLength": 6, - "snippet": { - "text": "uptime" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 220, - "startColumn": 1, - "charOffset": 6329, - "charLength": 136, - "snippet": { - "text": "\t// getWorldUpTime()\r\n\tuint64_t uptime = (OTSYS_TIME(true) - ProtocolStatus::start) / 1000;\r\n\tlua_pushnumber(L, uptime);\r\n\treturn 1;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5151ec61110c1a5c", - "equalIndicator/v1": "d01dfe708011c6fc9821feef0851187a861f09bec12c54693420b4ae37e5aea1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 113, - "startColumn": 7, - "charOffset": 3856, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 111, - "startColumn": 1, - "charOffset": 3719, - "charLength": 291, - "snippet": { - "text": "\r\nReturnValue EventCallback::creatureOnTargetCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnTargetCombat - \"\r\n\t\t \"Creature {} target {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5c5cef372182c58d", - "equalIndicator/v1": "d0ac9dbd0c85103096ef86e7e2dbded592fce9cee137e45f13f3c73218c8f5e9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 513, - "startColumn": 7, - "charOffset": 18210, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 511, - "startColumn": 1, - "charOffset": 18198, - "charLength": 227, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"Party leader {}. Call stack overflow. Too many lua script calls being nested.\", party->getLeader() ? party->getLeader()->getName() : \"unknown\");\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f029d91262371d61", - "equalIndicator/v1": "d0f968e0907bb768c8ba9c9135a9775402d24c1bace287596527cdc722f98cf8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6844, - "startColumn": 106, - "charOffset": 236923, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6842, - "startColumn": 1, - "charOffset": 236813, - "charLength": 238, - "snippet": { - "text": "}\r\n\r\nfloat Game::pvpLevelDifferenceDamageMultiplier(std::shared_ptr attacker, std::shared_ptr target) {\r\n\tint32_t levelDifference = target->getLevel() - attacker->getLevel();\r\n\tlevelDifference = std::abs(levelDifference);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bb6a8bf8ff62ca22", - "equalIndicator/v1": "d0ff4014b5e06f1b6e49f479c634f9dc2aa8f305788861a0df1fa9f9aea6a495" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 208, - "startColumn": 17, - "charOffset": 5126, - "charLength": 3, - "snippet": { - "text": "key" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 206, - "startColumn": 1, - "charOffset": 5011, - "charLength": 152, - "snippet": { - "text": "\tstd::string iKeyPad(64, 0x36), oKeyPad(64, 0x5C);\r\n\tfor (uint8_t i = 0; i < key.length(); ++i) {\r\n\t\tiKeyPad[i] ^= key[i];\r\n\t\toKeyPad[i] ^= key[i];\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "608ee0c0c3afe73d", - "equalIndicator/v1": "d10b1888ad6e849af70949f6f52ff5b2cf06615f88c0974985733a7c4ea5a63f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 774, - "startColumn": 7, - "charOffset": 27966, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 772, - "startColumn": 1, - "charOffset": 27954, - "charLength": 149, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnItemMoved - \"\r\n\t\t \"Player {} item {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c758912590acc6e1", - "equalIndicator/v1": "d12d92816a0b9416834fb6405d9cbb7958221e171f8fe35c4c0c4625d5d96c0c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 9200, - "startColumn": 46, - "charOffset": 321497, - "charLength": 10, - "snippet": { - "text": "totalPrice" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 9198, - "startColumn": 1, - "charOffset": 321399, - "charLength": 219, - "snippet": { - "text": "\t\t\tg_game().removeMoney(player, remainsPrice);\r\n\t\t}\r\n\t\tg_metrics().addCounter(\"balance_decrease\", totalPrice, { { \"player\", player->getName() }, { \"context\", \"market_purchase\" } });\r\n\r\n\t\tif (it.id == ITEM_STORE_COIN) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ae93b9732efa83d5", - "equalIndicator/v1": "d13158035ed0a0cc67d2fc14a6db44fc1a1d8eb49e22a9b9cc8ba88592648109" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocol.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 60, - "startColumn": 3, - "charOffset": 2001, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 58, - "startColumn": 1, - "charOffset": 1898, - "charLength": 230, - "snippet": { - "text": "bool Protocol::onRecvMessage(NetworkMessage &msg) {\r\n\tif (checksumMethod != CHECKSUM_METHOD_NONE) {\r\n\t\tuint32_t recvChecksum = msg.get();\r\n\t\tif (checksumMethod == CHECKSUM_METHOD_SEQUENCE) {\r\n\t\t\tif (recvChecksum == 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fbdcc1bc61e41aed", - "equalIndicator/v1": "d16d09c895c4f681845d1cbf3995f6c418b359d611116e581d05e5f4457e922d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 157, - "startColumn": 24, - "charOffset": 4403, - "charLength": 29, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 155, - "startColumn": 1, - "charOffset": 4240, - "charLength": 248, - "snippet": { - "text": "\tbool registerLuaActionEvent(const std::shared_ptr action);\r\n\tbool registerLuaPositionEvent(const std::shared_ptr action);\r\n\tbool registerLuaEvent(const std::shared_ptr action);\r\n\t// Clear maps for reloading\r\n\tvoid clear();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2d32dd0fa207c1a9", - "equalIndicator/v1": "d175e908d66ab4a92eaae37162098bc7fe227caad7d67d2d3f8d993b6291e298" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6928, - "startColumn": 81, - "charOffset": 240571, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6926, - "startColumn": 1, - "charOffset": 240486, - "charLength": 149, - "snippet": { - "text": "}\r\n\r\nint32_t Game::applyHealthChange(CombatDamage &damage, std::shared_ptr target) const {\r\n\tint32_t targetHealth = target->getHealth();\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "50268917af52f5cd", - "equalIndicator/v1": "d17fa58ae5cc939c77b55519205412235fdc2b155d31a2f2653b09f777065247" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'newHouse' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'newHouse' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 89, - "startColumn": 18, - "charOffset": 2468, - "charLength": 8, - "snippet": { - "text": "newHouse" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 87, - "startColumn": 1, - "charOffset": 2385, - "charLength": 181, - "snippet": { - "text": "\r\n\texplicit HouseTransferItem(std::shared_ptr newHouse) :\r\n\t\tItem(0), house(newHouse) { }\r\n\r\n\tvoid onTradeEvent(TradeEvents_t event, std::shared_ptr owner) override;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e8981aad2f6765bf", - "equalIndicator/v1": "d18596c3c3e1475ac2489b2b208b253359bd3ff1e8dd70c80057055f6c3b787d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 328, - "startColumn": 14, - "charOffset": 8275, - "charLength": 12, - "snippet": { - "text": "std::tolower" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 326, - "startColumn": 1, - "charOffset": 8216, - "charLength": 143, - "snippet": { - "text": "\t\tif (std::isupper(ch)) {\r\n\t\t\tresult += '_';\r\n\t\t\tresult += std::tolower(ch);\r\n\t\t} else if (std::isspace(ch) || ch == '-') {\r\n\t\t\tresult += '_';\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "14a8b88d22bf521a", - "equalIndicator/v1": "d19a55c045d556022c892e3a398d3ab003fd7dd0dbfe03ba54ab00b9db3c3386" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'movingCreature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'movingCreature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1393, - "startColumn": 89, - "charOffset": 55150, - "charLength": 14, - "snippet": { - "text": "movingCreature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1391, - "startColumn": 1, - "charOffset": 55057, - "charLength": 264, - "snippet": { - "text": "}\r\n\r\nvoid Game::playerMoveCreature(std::shared_ptr player, std::shared_ptr movingCreature, const Position &movingCreatureOrigPos, std::shared_ptr toTile) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!player->canDoAction()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a305f9cfdd7cd379", - "equalIndicator/v1": "d1ab6e8a0e993b6106acac19b1dd5864c900bb5d7cd92887e6632352de703c2d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/trashholder.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 24, - "startColumn": 28, - "charOffset": 721, - "charLength": 11, - "snippet": { - "text": "getCylinder" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 22, - "startColumn": 1, - "charOffset": 688, - "charLength": 96, - "snippet": { - "text": "\t}\r\n\r\n\tstd::shared_ptr getCylinder() override final {\r\n\t\treturn getTrashHolder();\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1caf3420f12edf46", - "equalIndicator/v1": "d23dadd0fde8cf83b99ed19b272b9166d925f4b37ed6dd3e0e985e9484bb8c54" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7451, - "startColumn": 45, - "charOffset": 225068, - "charLength": 4, - "snippet": { - "text": "cost" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7449, - "startColumn": 1, - "charOffset": 224997, - "charLength": 250, - "snippet": { - "text": "\t}\r\n\thistory.cost = cost;\r\n\tg_metrics().addCounter(\"balance_decrease\", cost, { { \"player\", getName() }, { \"context\", \"forge_transfer\" } });\r\n\r\n\treturnValue = g_game().internalAddItem(static_self_cast(), exaltationContainer, INDEX_WHEREEVER);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "660a94fa7930e16f", - "equalIndicator/v1": "d24684db571ec8a94447ecdf06edc793d8348ee759cb5054750d6f6f1ac1fc0a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 772, - "startColumn": 8, - "charOffset": 23036, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 770, - "startColumn": 1, - "charOffset": 22929, - "charLength": 266, - "snippet": { - "text": "\t\t// onThink(self, interval)\r\n\t\tLuaScriptInterface* scriptInterface = mType->info.scriptInterface;\r\n\t\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\t\tg_logger().error(\"Monster {} Call stack overflow. Too many lua script calls \"\r\n\t\t\t \"being nested.\",\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "457e16007ecdb09d", - "equalIndicator/v1": "d28f9f7124c0086375661ad4827ee15d131bb20f95bb59f636ad0c1ec01b029f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3594, - "startColumn": 45, - "charOffset": 111431, - "charLength": 27, - "snippet": { - "text": "Weapons::getMaxWeaponDamage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3592, - "startColumn": 1, - "charOffset": 111277, - "charLength": 563, - "snippet": { - "text": "\t\t\tint32_t attackSkill = player->getWeaponSkill(weapon);\r\n\t\t\tfloat attackFactor = player->getAttackFactor();\r\n\t\t\tint32_t maxDamage = static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\r\n\t\t\tif (it.abilities && it.abilities->elementType != COMBAT_NONE) {\r\n\t\t\t\tmaxDamage += static_cast(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, it.abilities->elementDamage, attackFactor, true) * player->getVocation()->meleeDamageMultiplier);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "09aa2e32e0166553", - "equalIndicator/v1": "d290af30aa686b1cfb5b21e1995f1432e1d8d1ee40e49e0fcce81bfeec7ba886" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8449, - "startColumn": 2, - "charOffset": 293735, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8447, - "startColumn": 1, - "charOffset": 293677, - "charLength": 173, - "snippet": { - "text": "\r\n\tuint16_t page = result->getNumber(\"page\");\r\n\tuint32_t pages = result->getNumber(\"entries\");\r\n\tpages += entriesPerPage - 1;\r\n\tpages /= entriesPerPage;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "29761348984c3231", - "equalIndicator/v1": "d297d2851fee87130ea66bf842abb38fc2ae1ba31a66dcf9899d59da972a46f9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'moveEvent' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 133, - "startColumn": 68, - "charOffset": 3881, - "charLength": 9, - "snippet": { - "text": "moveEvent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 131, - "startColumn": 1, - "charOffset": 3809, - "charLength": 154, - "snippet": { - "text": "}\r\n\r\nbool MoveEvents::registerLuaEvent(const std::shared_ptr moveEvent) {\r\n\t// Check if event is correct\r\n\tif (registerLuaItemEvent(moveEvent)\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "040d26612fd53830", - "equalIndicator/v1": "d29ce73ac73b0b1de9b2571de32bd601bf532a06393befb0bc197c7a3ec9765b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2078, - "startColumn": 34, - "charOffset": 61996, - "charLength": 5, - "snippet": { - "text": "mType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2076, - "startColumn": 1, - "charOffset": 61749, - "charLength": 413, - "snippet": { - "text": "void Monster::changeHealth(int32_t healthChange, bool sendHealthChange /* = true*/) {\r\n\tif (mType && !mType->info.soundVector.empty() && mType->info.soundChance >= static_cast(uniform_random(1, 100))) {\r\n\t\tauto index = uniform_random(0, mType->info.soundVector.size() - 1);\r\n\t\tg_game().sendSingleSoundEffect(static_self_cast()->getPosition(), mType->info.soundVector[index], getMonster());\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9c12e9c41aec37ec", - "equalIndicator/v1": "d2a5d18a2845b5709465adb85b532049ace7f1e80fd77b8c5d4d2516ca3675bf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3057, - "startColumn": 77, - "charOffset": 113661, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3055, - "startColumn": 1, - "charOffset": 113580, - "charLength": 252, - "snippet": { - "text": "}\r\n\r\nReturnValue Game::processMoveOrAddItemToLootContainer(std::shared_ptr item, std::shared_ptr lootContainer, uint32_t &remainderCount, std::shared_ptr player) {\r\n\tstd::shared_ptr moveItem = nullptr;\r\n\tReturnValue ret;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "84ad88c29c7c161e", - "equalIndicator/v1": "d2e1cdf2c15778af3993e8e4d3e87c9943304136ea305eca25b9eb18985c93cb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/monster_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 85, - "startColumn": 12, - "charOffset": 2788, - "charLength": 9, - "snippet": { - "text": "healthMax" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 83, - "startColumn": 1, - "charOffset": 2666, - "charLength": 282, - "snippet": { - "text": "\t\tmonster->skull = mType->info.skull;\r\n\t\tmonster->health = mType->info.health * mType->getHealthMultiplier();\r\n\t\tmonster->healthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\t\tmonster->baseSpeed = mType->getBaseSpeed();\r\n\t\tmonster->internalLight = mType->info.light;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5b763c8c50de29ef", - "equalIndicator/v1": "d2fe495491f1f1a3b856dd707098196091a14cbfa400824f12a2d7ea23b85a61" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7851, - "startColumn": 50, - "charOffset": 274563, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7849, - "startColumn": 1, - "charOffset": 274509, - "charLength": 241, - "snippet": { - "text": "}\r\n\r\nvoid Game::addPlayerMana(std::shared_ptr target) {\r\n\tif (const auto &party = target->getParty()) {\r\n\t\tuint8_t manaPercent = std::ceil((static_cast(target->getMana()) / std::max(target->getMaxMana(), 1)) * 100);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cc6693e77a0c71bb", - "equalIndicator/v1": "d349fa74e41b89c7ee10e35a673da16f5dd865a95efebb42b6f806a8ba28782e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly", - "markdown": "Inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/canary_server.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 63, - "startColumn": 132, - "charOffset": 1906, - "charLength": 12, - "snippet": { - "text": "__FUNCTION__" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 61, - "startColumn": 1, - "charOffset": 1751, - "charLength": 260, - "snippet": { - "text": "\t\t\t\tloadConfigLua();\r\n\r\n\t\t\t\tlogger.info(\"Server protocol: {}.{}{}\", CLIENT_VERSION_UPPER, CLIENT_VERSION_LOWER, g_configManager().getBoolean(OLD_PROTOCOL, __FUNCTION__) ? \" and 10x allowed!\" : \"\");\r\n#ifdef FEATURE_METRICS\r\n\t\t\t\tmetrics::Options metricsOptions;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c1f91383e925332a", - "equalIndicator/v1": "d3ab372d8cabd67603deec407ada2ef4ce6d0edde62f42081b9cabf2025f57cc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'operator double' must be marked explicit to avoid unintentional implicit conversions", - "markdown": "'operator double' must be marked explicit to avoid unintentional implicit conversions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/value_wrapper.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 112, - "startColumn": 27, - "charOffset": 3292, - "charLength": 6, - "snippet": { - "text": "double" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 110, - "startColumn": 1, - "charOffset": 3260, - "charLength": 82, - "snippet": { - "text": "\t}\r\n\r\n\texplicit(false) operator double() const {\r\n\t\treturn get();\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c6e2b9905f607f85", - "equalIndicator/v1": "d3b6b2a64dd5a7988c697d2f9f28a1320e151fa3210fb0b8c7f5b20d725363fb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1212, - "startColumn": 26, - "charOffset": 33751, - "charLength": 8, - "snippet": { - "text": "manaGain" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1210, - "startColumn": 1, - "charOffset": 33591, - "charLength": 259, - "snippet": { - "text": "\t\t\tinternalManaTicks = 0;\r\n\t\t\tif (creature->getZoneType() == ZONE_PROTECTION && dailyStreak >= DAILY_REWARD_DOUBLE_MP_REGENERATION) {\r\n\t\t\t\tcreature->changeMana(manaGain * 2); // Double regen from daily reward\r\n\t\t\t} else {\r\n\t\t\t\tcreature->changeMana(manaGain);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4340e88809cd595c", - "equalIndicator/v1": "d3c99d9278aa72e6a2c0cd61003d441f6eb4f6946f86a78c900ed54e61864d27" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to 'float'", - "markdown": "Narrowing conversion from 'int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 571, - "startColumn": 68, - "charOffset": 15427, - "charLength": 23, - "snippet": { - "text": "(statsPercent[i] - 100)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 569, - "startColumn": 1, - "charOffset": 15331, - "charLength": 145, - "snippet": { - "text": "\r\n\t\t\tcase STAT_MAGICPOINTS:\r\n\t\t\t\tstats[i] = static_cast(player->getBaseMagicLevel() * ((statsPercent[i] - 100) / 100.f));\r\n\t\t\t\tbreak;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2369069044a3fa97", - "equalIndicator/v1": "d3d04794cadc15678f6cdec9db9dc376dd61b44905bf3971c6b70e8da1bd2392" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 368, - "startColumn": 67, - "charOffset": 13167, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 366, - "startColumn": 1, - "charOffset": 13096, - "charLength": 334, - "snippet": { - "text": "}\r\n\r\nvoid Events::eventCreatureOnDrainHealth(std::shared_ptr creature, std::shared_ptr attacker, CombatType_t &typePrimary, int32_t &damagePrimary, CombatType_t &typeSecondary, int32_t &damageSecondary, TextColor_t &colorPrimary, TextColor_t &colorSecondary) {\r\n\tif (info.creatureOnDrainHealth == -1) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "35744ac34fa299fe", - "equalIndicator/v1": "d3e479d6aa50d2aa29ed477e843f1fdc27e4a2f253b8166a9a0f6d652d2827a0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 368, - "startColumn": 30, - "charOffset": 10446, - "charLength": 5, - "snippet": { - "text": "armor" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 366, - "startColumn": 1, - "charOffset": 10408, - "charLength": 79, - "snippet": { - "text": "\t\t}\r\n\t}\r\n\treturn static_cast(armor * vocation->armorMultiplier);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "eb6a3e6d5f61a320", - "equalIndicator/v1": "d3f0dc2b3585185ad5b1bcf763d8d7c43b2c325d4ebfff727bd5b7257ff2a0e4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 598, - "startColumn": 13, - "charOffset": 29155, - "charLength": 11, - "snippet": { - "text": "stringValue" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 596, - "startColumn": 1, - "charOffset": 28963, - "charLength": 419, - "snippet": { - "text": "\t} else if (stringValue == \"absorbpercentdrown\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_DROWNDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentphysical\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercenthealing\") {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "764f42d2b4ebc1d7", - "equalIndicator/v1": "d4608860d9099049148f2b4eb0425cdb08dfc2abe29bb0b203025bd5cf3c04c0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'getRecvbyte' can be made const", - "markdown": "Method 'getRecvbyte' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/modules/modules.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 41, - "startColumn": 10, - "charOffset": 1090, - "charLength": 11, - "snippet": { - "text": "getRecvbyte" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 39, - "startColumn": 1, - "charOffset": 1074, - "charLength": 56, - "snippet": { - "text": "\t//\r\n\r\n\tuint8_t getRecvbyte() {\r\n\t\treturn recvbyte;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3f23a2a4621f0710", - "equalIndicator/v1": "d46b4b9c31b617a4eb07502c7858416cfd1d164443d094aee45f6458945bca11" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 51, - "startColumn": 7, - "charOffset": 1489, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 49, - "startColumn": 1, - "charOffset": 1358, - "charLength": 336, - "snippet": { - "text": "// Creature\r\nbool EventCallback::creatureOnChangeOutfit(std::shared_ptr creature, const Outfit_t &outfit) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnChangeOutfit - Creature {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e41969123b8205ac", - "equalIndicator/v1": "d46d2d7b63b6c7c6e0d266309fc0c04242a78ea3b4e3460c65dddfcd2f6ef19f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 177, - "startColumn": 6, - "charOffset": 6625, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 175, - "startColumn": 1, - "charOffset": 6569, - "charLength": 193, - "snippet": { - "text": "\tLuaScriptInterface::pushPosition(L, position);\r\n\r\n\tif (scriptInterface.protectedCall(L, 2, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ea09aba65d510c28", - "equalIndicator/v1": "d481f122609313b73eba7201202b39b9802740ff0b083d9d8aa22ed43363d147" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7948, - "startColumn": 84, - "charOffset": 249927, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7946, - "startColumn": 1, - "charOffset": 249839, - "charLength": 156, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::AddCreatureLight(NetworkMessage &msg, std::shared_ptr creature) {\r\n\tLightInfo lightInfo = creature->getCreatureLight();\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bcaa199d6d9b2ff7", - "equalIndicator/v1": "d4918f31744119c3372614ccbf9081f24ac11159b611e5f59a83781b386420fa" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'bankable' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'bankable' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/bank/bank.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 19, - "startColumn": 44, - "charOffset": 646, - "charLength": 8, - "snippet": { - "text": "bankable" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 17, - "startColumn": 1, - "charOffset": 565, - "charLength": 121, - "snippet": { - "text": "#include \"lib/metrics/metrics.hpp\"\r\n\r\nBank::Bank(const std::shared_ptr bankable) :\r\n\tm_bankable(bankable) {\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "af1488c1c02f02f8", - "equalIndicator/v1": "d49ec58c32a307be010f0a30fad68aa4bf73648f9e12ec831302814a1a5f56f6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions", - "markdown": "Single-argument constructors must be marked explicit to avoid unintentional implicit conversions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/di/runtime_provider.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 124, - "startColumn": 21, - "charOffset": 3508, - "charLength": 8, - "snippet": { - "text": "injector" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 122, - "startColumn": 1, - "charOffset": 3463, - "charLength": 117, - "snippet": { - "text": "\r\n\t\t\ttemplate \r\n\t\t\t/*non explicit*/ injector(const T &bindings) :\r\n\t\t\t\tinjector() {\r\n\t\t\t\tinstall(bindings);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "337353b0b082036a", - "equalIndicator/v1": "d4c6dc9688192f0a5f79c33d22427ef3984bd3a7bfe9bcf490e0fce26994db46" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 582, - "startColumn": 27, - "charOffset": 20651, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 580, - "startColumn": 1, - "charOffset": 20619, - "charLength": 123, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnLook, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "39c90811686981f1", - "equalIndicator/v1": "d4cc2d477e01fb6ca958b02439dae43b8981a87e7a9d839c7fb00b493fa6c70b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Switch has 2 consecutive identical branches", - "markdown": "Switch has 2 consecutive identical branches" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 462, - "startColumn": 3, - "charOffset": 12823, - "charLength": 4, - "snippet": { - "text": "case" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 460, - "startColumn": 1, - "charOffset": 12719, - "charLength": 157, - "snippet": { - "text": "\t\tcase FIGHTMODE_BALANCED:\r\n\t\t\treturn (OTSYS_TIME() - lastAttack) < getAttackSpeed() ? 0.75f : 1.0f;\r\n\t\tcase FIGHTMODE_DEFENSE:\r\n\t\t\treturn 1.0f;\r\n\t\tdefault:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0a64c2dfa0c0907b", - "equalIndicator/v1": "d4e849e80b9c53686e588a81f08829c01b7710d7f45448825bbfa44df351cf25" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 307, - "startColumn": 2, - "charOffset": 8027, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 305, - "startColumn": 1, - "charOffset": 7909, - "charLength": 183, - "snippet": { - "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\r\n\tstd::shared_ptr creature = getCreature(L, 2);\r\n\tuint32_t topicId = getNumber(L, 3, 0);\r\n\r\n\tif (!npc) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f65ba4ff4636d4fd", - "equalIndicator/v1": "d4eca4310d6a5837c34432a6ac284d7a0086b2fe7f1838ae7cc736b7aabe2398" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 672, - "startColumn": 28, - "charOffset": 21766, - "charLength": 6, - "snippet": { - "text": "damage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 670, - "startColumn": 1, - "charOffset": 21673, - "charLength": 205, - "snippet": { - "text": "\r\n\t\tdamage.secondary.type = imbuementInfo.imbuement->combatType;\r\n\t\tdamage.secondary.value = damage.primary.value * (damagePercent);\r\n\t\tdamage.primary.value = damage.primary.value * (1 - damagePercent);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "700f72283a214988", - "equalIndicator/v1": "d516502307fd679b4a59ce3127123a67f9f393f9641284f42473ad62eb4e2de5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'party' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'party' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 356, - "startColumn": 34, - "charOffset": 15267, - "charLength": 28, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 354, - "startColumn": 1, - "charOffset": 15111, - "charLength": 283, - "snippet": { - "text": "\tvoid sendTradeItemRequest(const std::string &traderName, std::shared_ptr item, bool ack);\r\n\tvoid sendCloseTrade();\r\n\tvoid updatePartyTrackerAnalyzer(const std::shared_ptr party);\r\n\r\n\tvoid sendTextWindow(uint32_t windowTextId, uint32_t itemId, const std::string &text);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6801263d3d20e5ff", - "equalIndicator/v1": "d52139143a5e5caf4b3442392f79ef30f318a9874a014221c34232606ea4e8ef" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 146, - "startColumn": 7, - "charOffset": 4497, - "charLength": 8, - "snippet": { - "text": "addThing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 144, - "startColumn": 1, - "charOffset": 4325, - "charLength": 352, - "snippet": { - "text": "\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override final;\r\n\r\n\tvoid addThing(std::shared_ptr thing) override final;\r\n\tvoid addThing(int32_t index, std::shared_ptr thing) override final;\r\n\tvoid addItemBack(std::shared_ptr item);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "147f4be394a20f8b", - "equalIndicator/v1": "d5346eacc7630dcf170a9e3f8567c6e5f24b353780147eccb1cf158da2df94cb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 203, - "startColumn": 14, - "charOffset": 5439, - "charLength": 14, - "snippet": { - "text": "getDescription" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 201, - "startColumn": 1, - "charOffset": 5388, - "charLength": 216, - "snippet": { - "text": "\tbool hasHeight(uint32_t n) const;\r\n\r\n\tstd::string getDescription(int32_t lookDistance) override final;\r\n\r\n\tint32_t getClientIndexOfCreature(std::shared_ptr player, std::shared_ptr creature) const;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ed102d3b942b4c79", - "equalIndicator/v1": "d5428e20ce42e319968cb3ac91ed459c16ed3d691031584215fc3358c8b2793e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 312, - "startColumn": 15, - "charOffset": 7971, - "charLength": 12, - "snippet": { - "text": "std::toupper" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 310, - "startColumn": 1, - "charOffset": 7919, - "charLength": 112, - "snippet": { - "text": "\t\t} else {\r\n\t\t\tif (capitalizeNext) {\r\n\t\t\t\tresult += std::toupper(ch);\r\n\t\t\t\tcapitalizeNext = false;\r\n\t\t\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ba01be090d311590", - "equalIndicator/v1": "d564553e306b7ab39c94b0c7aaf4477465ab828fdf95536e7a941c749be1fbdf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 75, - "startColumn": 73, - "charOffset": 2879, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 73, - "startColumn": 1, - "charOffset": 2801, - "charLength": 345, - "snippet": { - "text": "\t}\r\n\r\n\tvoid addOutfitAndMountBytes(NetworkMessage &msg, std::shared_ptr item, const CustomAttribute* attribute, const std::string &head, const std::string &body, const std::string &legs, const std::string &feet, bool addAddon = false, bool addByte = false) {\r\n\t\tauto look = attribute->getAttribute();\r\n\t\tmsg.add(look);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "47b58038252b7085", - "equalIndicator/v1": "d567d244bb2f6d58fb192dd08c01d1fe92f242dfe1976ca44b4daa5c804029f6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/network/webhook_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 20, - "startColumn": 2, - "charOffset": 795, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 18, - "startColumn": 1, - "charOffset": 714, - "charLength": 188, - "snippet": { - "text": "\tstd::string title = getString(L, 1);\r\n\tstd::string message = getString(L, 2);\r\n\tuint32_t color = getNumber(L, 3, 0);\r\n\tstd::string url = getString(L, -1);\r\n\tif (url == title) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4539113fff4fd03e", - "equalIndicator/v1": "d56d0c48e622972f006c9231c991657fd8d10ab1e20607039ed743cc12ad040b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 517, - "startColumn": 38, - "charOffset": 19593, - "charLength": 10, - "snippet": { - "text": "toCylinder" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 515, - "startColumn": 1, - "charOffset": 19501, - "charLength": 155, - "snippet": { - "text": "\r\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\r\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\r\n\r\n\treturn getScriptInterface()->callFunction(7);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0684e317875bd302", - "equalIndicator/v1": "d577d6f28a431edc0723c38463160105500a426b7058c64b15741f26cfcb8391" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1262, - "startColumn": 72, - "charOffset": 38719, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1260, - "startColumn": 1, - "charOffset": 38643, - "charLength": 170, - "snippet": { - "text": "}\r\n\r\nvoid Creature::onAttackedCreatureDrainHealth(std::shared_ptr target, int32_t points) {\r\n\ttarget->addDamagePoints(static_self_cast(), points);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "93ef5c610a3d74ea", - "equalIndicator/v1": "d57d7ef842bf8faace37aaf96ecb0e21e5df9867a53ca9fa41dda5f4cf1b76b8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/npcs/npc.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 361, - "startColumn": 52, - "charOffset": 12380, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 359, - "startColumn": 1, - "charOffset": 12324, - "charLength": 228, - "snippet": { - "text": "}\r\n\r\nvoid Npc::onPlayerSellItem(std::shared_ptr player, uint16_t itemId, uint8_t subType, uint16_t amount, bool ignore, uint64_t &totalPrice, std::shared_ptr parent /*= nullptr*/) {\r\n\tif (!player) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "23efbbc66c8c32c4", - "equalIndicator/v1": "d58bfb5531d07db3f432d20253525f3401efeb92d83c9d27c927c6464f0244a0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 717, - "startColumn": 51, - "charOffset": 23686, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 715, - "startColumn": 1, - "charOffset": 23631, - "charLength": 207, - "snippet": { - "text": "}\r\n\r\nvoid Spell::postCastSpell(std::shared_ptr player, bool finishedCast /*= true*/, bool payCost /*= true*/) const {\r\n\tif (finishedCast) {\r\n\t\tif (!player->hasFlag(PlayerFlags_t::HasNoExhaustion)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9fd5f028298370de", - "equalIndicator/v1": "d5bbc434afb6d40d34b6f76debe235a43b1a139ff78e9149c911025bd974dd50" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1926, - "startColumn": 5, - "charOffset": 66128, - "charLength": 7, - "snippet": { - "text": "int32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1924, - "startColumn": 1, - "charOffset": 66097, - "charLength": 176, - "snippet": { - "text": "\r\n\t\t\t\t// perform rotation\r\n\t\t\t\tint32_t rotatedX = static_cast(round(newX * a + newY * b));\r\n\t\t\t\tint32_t rotatedY = static_cast(round(newX * c + newY * d));\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cf32d1db9299ff6b", - "equalIndicator/v1": "d5c0d01b60491fae267f80a0f28ef9fb44d543302a131e32b40c2301269bbaaf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7450, - "startColumn": 64, - "charOffset": 259546, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7448, - "startColumn": 1, - "charOffset": 259444, - "charLength": 288, - "snippet": { - "text": "\r\nvoid Game::buildMessageAsSpectator(\r\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\r\n\tstd::shared_ptr targetPlayer, TextMessage &message, std::stringstream &ss,\r\n\tconst std::string &damageString, std::string &spectatorMessage\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c1481dc9f389015d", - "equalIndicator/v1": "d5c9a473d7d0d8159ea755d5465e4981ae1121310140899c7462cef388445d83" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 792, - "startColumn": 85, - "charOffset": 25802, - "charLength": 8, - "snippet": { - "text": "minValue" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 790, - "startColumn": 1, - "charOffset": 25659, - "charLength": 176, - "snippet": { - "text": "\r\n\tint32_t minValue = std::round(player->getLevel() / 5);\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue) / 2;\r\n\r\n\tif (target) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2998cc461ad4e54e", - "equalIndicator/v1": "d5cd95bf64b2758e32f2932081dbe0eaab79a4032e3d375f4cc4cdf5633c2f37" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6841, - "startColumn": 38, - "charOffset": 236765, - "charLength": 6, - "snippet": { - "text": "damage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6839, - "startColumn": 1, - "charOffset": 236645, - "charLength": 172, - "snippet": { - "text": "\r\n\tdamage.primary.value = std::round(damage.primary.value * pvpDamageMultiplier);\r\n\tdamage.secondary.value = std::round(damage.secondary.value * pvpDamageMultiplier);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4994fa0a89946d48", - "equalIndicator/v1": "d5ce6ed15d182b1689832d95b0bcd2bb4977497ba451dad04839db7fdeed06e2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2195, - "startColumn": 11, - "charOffset": 65753, - "charLength": 5, - "snippet": { - "text": "mType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2193, - "startColumn": 1, - "charOffset": 65664, - "charLength": 210, - "snippet": { - "text": "\tmonsterForgeClassification = ForgeClassifications_t::FORGE_NORMAL_MONSTER;\r\n\r\n\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "86b6c62b6e2b560d", - "equalIndicator/v1": "d5e854d4d4988d26bac2feabfb09c73d04695371ae8023cc2cb0cc5b2f190029" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 475, - "startColumn": 60, - "charOffset": 15658, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 473, - "startColumn": 1, - "charOffset": 15594, - "charLength": 145, - "snippet": { - "text": "}\r\n\r\nvoid Actions::showUseHotkeyMessage(std::shared_ptr player, std::shared_ptr item, uint32_t count) {\r\n\tstd::ostringstream ss;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "48d62e61fa98db69", - "equalIndicator/v1": "d603b75eae0cda8ea6cc19d2d10482a198561f631213a8bc823f134ca02a9ba4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'createItem' is within a recursive call chain", - "markdown": "Function 'createItem' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/mapcache.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 77, - "startColumn": 33, - "charOffset": 2521, - "charLength": 10, - "snippet": { - "text": "createItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 75, - "startColumn": 1, - "charOffset": 2484, - "charLength": 186, - "snippet": { - "text": "}\r\n\r\nstd::shared_ptr MapCache::createItem(const std::shared_ptr &BasicItem, Position position) {\r\n\tauto item = Item::CreateItem(BasicItem->id, position);\r\n\tif (!item) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "657ff0f3aa391727", - "equalIndicator/v1": "d62124be4ba6e4eb4dd91c3f4bab8a2e08a7976b790dea4ecc49d4f0d94cc88f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/cylinder.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 179, - "startColumn": 22, - "charOffset": 7043, - "charLength": 8, - "snippet": { - "text": "queryAdd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 177, - "startColumn": 1, - "charOffset": 6961, - "charLength": 239, - "snippet": { - "text": "\tstatic std::shared_ptr virtualCylinder;\r\n\r\n\tvirtual ReturnValue queryAdd(int32_t, const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr = nullptr) override {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "05ca809f11aa95c3", - "equalIndicator/v1": "d6355914ab8886482f190f8517fe7912afc0643cabc8a1f2fcc2a6d26cd71858" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/game_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 105, - "startColumn": 51, - "charOffset": 3702, - "charLength": 9, - "snippet": { - "text": "minRangeX" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 103, - "startColumn": 1, - "charOffset": 3547, - "charLength": 206, - "snippet": { - "text": "\t\tspectators.find(position, multifloor, minRangeX, maxRangeX, minRangeY, maxRangeY);\r\n\t} else {\r\n\t\tspectators.find(position, multifloor, minRangeX, maxRangeX, minRangeY, maxRangeY);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9b906220deee162b", - "equalIndicator/v1": "d669e55f7d6248892612aa99ec5edd96ad9080ad24275d3ceabc2c70a6245cc1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/grouping/party.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 536, - "startColumn": 52, - "charOffset": 14933, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 534, - "startColumn": 1, - "charOffset": 14877, - "charLength": 140, - "snippet": { - "text": "}\r\n\r\nbool Party::isPlayerActive(std::shared_ptr player) {\r\n\tauto it = ticksMap.find(player->getID());\r\n\tif (it == ticksMap.end()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1f49093b471a75be", - "equalIndicator/v1": "d67444c5d1a0d33c70de4abf72b909a720d5250deca882ae518309e6b5b74046" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'getWieldInfo' can be made const", - "markdown": "Method 'getWieldInfo' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 238, - "startColumn": 11, - "charOffset": 7515, - "charLength": 12, - "snippet": { - "text": "getWieldInfo" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 236, - "startColumn": 1, - "charOffset": 7485, - "charLength": 72, - "snippet": { - "text": "\t\tpremium = b;\r\n\t}\r\n\tuint32_t getWieldInfo() {\r\n\t\treturn wieldInfo;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "45fe1b20a69dd2f6", - "equalIndicator/v1": "d6b8fb4a628e9910bf01bfc34fb61bca26f2d46f27916b9ca1353702309d1c1e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/modules/modules.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 78, - "startColumn": 7, - "charOffset": 1966, - "charLength": 5, - "snippet": { - "text": "clear" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 76, - "startColumn": 1, - "charOffset": 1824, - "charLength": 221, - "snippet": { - "text": "\tEvent_ptr getEvent(const std::string &nodeName) override;\r\n\tbool registerEvent(Event_ptr event, const pugi::xml_node &node) override;\r\n\tvoid clear(bool) override final;\r\n\r\n\ttypedef std::map ModulesList;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "298b28568834ecba", - "equalIndicator/v1": "d6d7a2fd98f43cfa7faba6ac3a31076471f78207f053b3884f71a50bcc68d828" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'tradeItem' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'tradeItem' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1944, - "startColumn": 299, - "charOffset": 75997, - "charLength": 9, - "snippet": { - "text": "tradeItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1942, - "startColumn": 1, - "charOffset": 75694, - "charLength": 444, - "snippet": { - "text": "}\r\n\r\nReturnValue Game::internalMoveItem(std::shared_ptr fromCylinder, std::shared_ptr toCylinder, int32_t index, std::shared_ptr item, uint32_t count, std::shared_ptr* movedItem, uint32_t flags /*= 0*/, std::shared_ptr actor /*=nullptr*/, std::shared_ptr tradeItem /* = nullptr*/, bool checkTile /* = true*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (fromCylinder == nullptr) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7137dc9529856530", - "equalIndicator/v1": "d6e4c3e03dc3b8906cb63ae26f634f1a0d9155b9254843510b385f50e5f0e50b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 608, - "startColumn": 8, - "charOffset": 14999, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 606, - "startColumn": 1, - "charOffset": 14903, - "charLength": 213, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeHasSubType(lua_State* L) {\r\n\t// itemType:hasSubType()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->hasSubType());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8aa6635055568cd2", - "equalIndicator/v1": "d714b332e286575ff04368bd17361ae0f2aa2c120a690958f77efede65b8e92b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 401, - "startColumn": 58, - "charOffset": 11749, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 399, - "startColumn": 1, - "charOffset": 11687, - "charLength": 153, - "snippet": { - "text": "}\r\n\r\nvoid Container::onAddContainerItem(std::shared_ptr item) {\r\n\tauto spectators = Spectators().find(getPosition(), false, 2, 2, 2, 2);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "268c2eae96b2313a", - "equalIndicator/v1": "d732f1328e1529685d365a9dac6627c17f7620e6c58bc1f668a1d9783dc483a5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1180, - "startColumn": 28, - "charOffset": 32507, - "charLength": 10, - "snippet": { - "text": "healthGain" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1178, - "startColumn": 1, - "charOffset": 32388, - "charLength": 199, - "snippet": { - "text": "\t\t\t\tcreature->changeHealth(healthGain * 2); // Double regen from daily reward\r\n\t\t\t} else {\r\n\t\t\t\tcreature->changeHealth(healthGain);\r\n\t\t\t}\r\n\t\t\trealHealthGain = creature->getHealth() - realHealthGain;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8a3f45bcdfcebb15", - "equalIndicator/v1": "d73ffb68a117077f5b4236a074f1f4a6f9082b6c2bf52916dd265cdd69c8c397" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Redundant string initialization", - "markdown": "Redundant string initialization" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2927, - "startColumn": 14, - "charOffset": 89442, - "charLength": 4, - "snippet": { - "text": "text" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2925, - "startColumn": 1, - "charOffset": 89359, - "charLength": 130, - "snippet": { - "text": "\tstd::ostringstream ss;\r\n\tstd::map race = {};\r\n\tstd::string text = \"\";\r\n\tuint8_t search = msg.getByte();\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f6559bcaafa73e32", - "equalIndicator/v1": "d7539fc9fcd41a40d4b129df663417a2bca91bd6a6e3e4ca2b18ba53fda085ef" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Repeated branch body in conditional chain", - "markdown": "Repeated branch body in conditional chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 343, - "startColumn": 77, - "charOffset": 10996, - "charLength": 1, - "snippet": { - "text": "{" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 341, - "startColumn": 1, - "charOffset": 10849, - "charLength": 382, - "snippet": { - "text": "\t\t\t\t// nopvp-zone\r\n\t\t\t\tauto attackerTile = attackerPlayer->getTile();\r\n\t\t\t\tif (targetPlayerTile && targetPlayerTile->hasFlag(TILESTATE_NOPVPZONE)) {\r\n\t\t\t\t\treturn RETURNVALUE_ACTIONNOTPERMITTEDINANOPVPZONE;\r\n\t\t\t\t} else if (attackerTile && attackerTile->hasFlag(TILESTATE_NOPVPZONE) && targetPlayerTile && !targetPlayerTile->hasFlag(TILESTATE_NOPVPZONE | TILESTATE_PROTECTIONZONE)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b76b6d4a51e79608", - "equalIndicator/v1": "d786b4adda357359ea43eff9844a38115c6756cc4b03a73248b09c5f50914c6b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 547, - "startColumn": 2, - "charOffset": 14540, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 545, - "startColumn": 1, - "charOffset": 14449, - "charLength": 236, - "snippet": { - "text": "\tuint16_t itemId = getNumber(L, 3);\r\n\tdouble amount = getNumber(L, 4);\r\n\tuint16_t subType = getNumber(L, 5, 1);\r\n\tuint16_t actionId = getNumber(L, 6, 0);\r\n\tbool ignoreCap = getBoolean(L, 7, false);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "20785f8294676b95", - "equalIndicator/v1": "d7a3688876716fb1e979d5996f3ed0f32a64ea39c5da7a80947ac31bd5b147c7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7130, - "startColumn": 30, - "charOffset": 248265, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7128, - "startColumn": 1, - "charOffset": 248073, - "charLength": 312, - "snippet": { - "text": "\t\tif (damage.origin != ORIGIN_NONE && target && damage.primary.type != COMBAT_HEALING) {\r\n\t\t\tdamage.primary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\r\n\t\t\tdamage.secondary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\r\n\t\t}\r\n\t\tauto healthChange = damage.primary.value + damage.secondary.value;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5d85db4496b94175", - "equalIndicator/v1": "d7c67966e159a70909c437aed4aa2946779c426b05c1aae9cd8c519a621cb2dc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8607, - "startColumn": 65, - "charOffset": 271443, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8605, - "startColumn": 1, - "charOffset": 271374, - "charLength": 137, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendUpdateCreature(std::shared_ptr creature) {\r\n\tif (oldProtocol || !creature || !player) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d37969ba902b340e", - "equalIndicator/v1": "d7cd340a3b99b3f36fe4ab1269cd7f0732599701a05be1d6e4513d671fbbacd9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1144, - "startColumn": 28, - "charOffset": 33651, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1142, - "startColumn": 1, - "charOffset": 33471, - "charLength": 217, - "snippet": { - "text": "\tvoid sendCreatureSay(std::shared_ptr creature, SpeakClasses type, const std::string &text, const Position* pos = nullptr) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureSay(creature, type, text, pos);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4c4e115e088fdd8c", - "equalIndicator/v1": "d7cfe0be11fbddb83543e3fd6bff00a128364c5dcb694296d17451222acc336d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 869, - "startColumn": 6, - "charOffset": 33098, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 867, - "startColumn": 1, - "charOffset": 33040, - "charLength": 201, - "snippet": { - "text": "\tLuaScriptInterface::pushCombatDamage(L, damage);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 8, 4) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "50f5b92d49c9727b", - "equalIndicator/v1": "d7e5d05cbf68b853cb20ca2c69a7d0229991bbf8f06e29cc3e0140d821e5956b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 712, - "startColumn": 19, - "charOffset": 21854, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 710, - "startColumn": 1, - "charOffset": 21760, - "charLength": 143, - "snippet": { - "text": "void Container::addItemBack(std::shared_ptr item) {\r\n\taddItem(item);\r\n\tupdateItemWeight(item->getWeight());\r\n\r\n\t// send change to client\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ed228824368dd43a", - "equalIndicator/v1": "d7f6201e788d77ac4a3969d8d2c48ec7f6f1420953545726584b8da5e4cacc03" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 70, - "startColumn": 30, - "charOffset": 2460, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 68, - "startColumn": 1, - "charOffset": 2424, - "charLength": 94, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tfor (std::shared_ptr item : itemlist) {\r\n\t\t\titem->setParent(getParent());\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c776b20815bb3328", - "equalIndicator/v1": "d7f8abca9fe8062c88fc770228f5a3b5926035472ec7c3332a6075a427ebf10e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'onRemoveTileItem' is within a recursive call chain", - "markdown": "Function 'onRemoveTileItem' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 480, - "startColumn": 12, - "charOffset": 13563, - "charLength": 16, - "snippet": { - "text": "onRemoveTileItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 478, - "startColumn": 1, - "charOffset": 13547, - "charLength": 379, - "snippet": { - "text": "}\r\n\r\nvoid Tile::onRemoveTileItem(const CreatureVector &spectators, const std::vector &oldStackPosVector, std::shared_ptr item) {\r\n\tif ((item->hasProperty(CONST_PROP_MOVABLE) || item->getContainer()) || (item->isWrapable() && !item->hasProperty(CONST_PROP_MOVABLE) && !item->hasProperty(CONST_PROP_BLOCKPATH))) {\r\n\t\tauto it = g_game().browseFields.find(getTile());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e34b97f5f8e34209", - "equalIndicator/v1": "d8320bd1343a084400314ac5e5c86a16cf96e09b0c7cd2286715d8c21b326016" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 892, - "startColumn": 7, - "charOffset": 24648, - "charLength": 12, - "snippet": { - "text": "changeHealth" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 890, - "startColumn": 1, - "charOffset": 24564, - "charLength": 246, - "snippet": { - "text": "\tvoid stowItem(std::shared_ptr item, uint32_t count, bool allItems);\r\n\r\n\tvoid changeHealth(int32_t healthChange, bool sendHealthChange = true) override;\r\n\tvoid changeMana(int32_t manaChange) override;\r\n\tvoid changeSoul(int32_t soulChange);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f5e2291f33a28514", - "equalIndicator/v1": "d8324b78ad07ede17684793012b1564fbb7d6f2729958570527c889129d8e932" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8574, - "startColumn": 2, - "charOffset": 270537, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8572, - "startColumn": 1, - "charOffset": 270530, - "charLength": 125, - "snippet": { - "text": "\t}\r\n\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t itemTier = 0;\r\n\tif (Item::items[itemId].upgradeClassification > 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5ec79cd01680f466", - "equalIndicator/v1": "d834c992c0478711fa0d87f55f8eb5229a37bb91ec0d283871ffae92518d43b4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '_Last', which is a reserved identifier", - "markdown": "Declaration uses identifier '_Last', which is a reserved identifier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/vectorset.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 78, - "startColumn": 84, - "charOffset": 2130, - "charLength": 5, - "snippet": { - "text": "_Last" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 76, - "startColumn": 1, - "charOffset": 2003, - "charLength": 211, - "snippet": { - "text": "\r\n\t\ttemplate \r\n\t\tconstexpr auto insert(std::vector::const_iterator _Where, _Iter _First, _Iter _Last) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\treturn container.insert(_Where, _First, _Last);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b2804e91d9b12033", - "equalIndicator/v1": "d850e7ab03a13eedbd37db4d76c67fda6b895c3db787e15294f84b9e74fb18f4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1675, - "startColumn": 3, - "charOffset": 58806, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1673, - "startColumn": 1, - "charOffset": 58688, - "charLength": 168, - "snippet": { - "text": "\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r\n\t\treturn;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "500554d73e16e1f4", - "equalIndicator/v1": "d858e631f0163b77c1f8c431284c34d04ad304c32c9560b7d028c933881cb6a1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/inbox/inbox.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 25, - "startColumn": 7, - "charOffset": 802, - "charLength": 19, - "snippet": { - "text": "postAddNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 23, - "startColumn": 1, - "charOffset": 634, - "charLength": 472, - "snippet": { - "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e09c4ce7cb1682e7", - "equalIndicator/v1": "d87c41ee5dd693b94a7764ca74f51b3fbac3941a9b392e5523b6ebf540b51411" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/kv.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 79, - "startColumn": 42, - "charOffset": 2375, - "charLength": 4, - "snippet": { - "text": "keys" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 77, - "startColumn": 1, - "charOffset": 2329, - "charLength": 162, - "snippet": { - "text": "}\r\n\r\nstd::unordered_set KVStore::keys(const std::string &prefix /*= \"\"*/) {\r\n\tstd::scoped_lock lock(mutex_);\r\n\tstd::unordered_set keys;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "28be17e8cbb7ffaf", - "equalIndicator/v1": "d87e45a63c0980cd6824b14f0992be6d0af41c0dfb0b2b6545b9b1f26dc16d7d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1980, - "startColumn": 2, - "charOffset": 60677, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1978, - "startColumn": 1, - "charOffset": 60584, - "charLength": 270, - "snippet": { - "text": "void ProtocolGame::parseEditVip(NetworkMessage &msg) {\r\n\tstd::vector vipGroupsId;\r\n\tuint32_t guid = msg.get();\r\n\tconst std::string description = msg.getString();\r\n\tuint32_t icon = std::min(10, msg.get()); // 10 is max icon in 9.63\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f9c7214e0a0b9291", - "equalIndicator/v1": "d89114cbebd48bb1959d9f5bc85e784b0110fdb80a488bf26c02d6c27ac55a44" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Switch has 2 consecutive identical branches", - "markdown": "Switch has 2 consecutive identical branches" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4381, - "startColumn": 4, - "charOffset": 138875, - "charLength": 4, - "snippet": { - "text": "case" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4379, - "startColumn": 1, - "charOffset": 138854, - "charLength": 98, - "snippet": { - "text": "\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase MESSAGE_TUTORIAL_HINT: {\r\n\t\t\t\tinternalType = MESSAGE_LOGIN;\r\n\t\t\t\tbreak;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0a8fe9e7a9b0c63d", - "equalIndicator/v1": "d8a6531efe1068c6e1d920fc72ff9d28afc33b4d3b99219c8273773d06556b2b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 230, - "startColumn": 7, - "charOffset": 8429, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 228, - "startColumn": 1, - "charOffset": 8310, - "charLength": 250, - "snippet": { - "text": "// Party\r\nbool EventCallback::partyOnJoin(std::shared_ptr party, std::shared_ptr player) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::partyOnJoin - \"\r\n\t\t \"Player {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "75ad0e0f6e58a0a3", - "equalIndicator/v1": "d8dd3654ee57238ab7907751df8d2cdfe02321b338dc6446000555ac5db51862" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 212, - "startColumn": 14, - "charOffset": 6165, - "charLength": 11, - "snippet": { - "text": "queryRemove" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 210, - "startColumn": 1, - "charOffset": 5839, - "charLength": 624, - "snippet": { - "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override final;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t tileFlags, std::shared_ptr actor = nullptr) override;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5ecd70e9f8ce3822", - "equalIndicator/v1": "d8e780fc55b34ae64aa6578662fefa9c1c45f38901c43929617102f26ebb17dd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Replace loop by 'std::ranges::any_of()'", - "markdown": "Replace loop by 'std::ranges::any_of()'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5060, - "startColumn": 2, - "charOffset": 150028, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5058, - "startColumn": 1, - "charOffset": 150021, - "charLength": 124, - "snippet": { - "text": "\t}\r\n\r\n\tfor (const FamiliarEntry &familiarEntry : familiars) {\r\n\t\tif (familiarEntry.lookType == lookType) {\r\n\t\t\treturn true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8d6a694c6f684d16", - "equalIndicator/v1": "d8e7a4deb2027650070232e960193c98e52d0d7ab87c3da43f9f26f04d8517f8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/connection/connection.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 250, - "startColumn": 4, - "charOffset": 8944, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 248, - "startColumn": 1, - "charOffset": 8933, - "charLength": 147, - "snippet": { - "text": "\t\t\t}\r\n\r\n\t\t\tuint32_t recvChecksum = msg.get();\r\n\t\t\tif (recvChecksum != checksum) {\r\n\t\t\t\t// it might not have been the checksum, step back\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d4d7fc2e6f75fc08", - "equalIndicator/v1": "d90819b2dae26efc160a4064f2f0b3dec3c3e93303b98a349de050b0ef6a4813" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 768, - "startColumn": 61, - "charOffset": 27558, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 766, - "startColumn": 1, - "charOffset": 27493, - "charLength": 449, - "snippet": { - "text": "}\r\n\r\nvoid Events::eventPlayerOnItemMoved(std::shared_ptr player, std::shared_ptr item, uint16_t count, const Position &fromPosition, const Position &toPosition, std::shared_ptr fromCylinder, std::shared_ptr toCylinder) {\r\n\t// Player:onItemMoved(item, count, fromPosition, toPosition) or Player.onItemMoved(self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)\r\n\tif (info.playerOnItemMoved == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "25039de2b89798ad", - "equalIndicator/v1": "d919d559c1958677a840392360346cce99582880d0fdcb89964aea7e2675707b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/player_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2326, - "startColumn": 71, - "charOffset": 80761, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2324, - "startColumn": 1, - "charOffset": 80686, - "charLength": 155, - "snippet": { - "text": "}\r\n\r\nint32_t PlayerWheel::checkExecutionersThrow(std::shared_ptr target) const {\r\n\tif (!target || target == m_player.getPlayer()) {\r\n\t\treturn 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1ae7da2160c38ea8", - "equalIndicator/v1": "d92682ba31d75812bde4676bb6f47fdb05ede3dee4ef667f809b2df0067b34ea" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 710, - "startColumn": 51, - "charOffset": 21810, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 708, - "startColumn": 1, - "charOffset": 21755, - "charLength": 119, - "snippet": { - "text": "}\r\n\r\nvoid Container::addItemBack(std::shared_ptr item) {\r\n\taddItem(item);\r\n\tupdateItemWeight(item->getWeight());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "33a110409f1e1234", - "equalIndicator/v1": "d932f03ec1c82c8b5b1ae33b95bb2f6d471828ac2adc5d864ed23c7bc34d730f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1296, - "startColumn": 81, - "charOffset": 52085, - "charLength": 2, - "snippet": { - "text": "it" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1294, - "startColumn": 1, - "charOffset": 51908, - "charLength": 198, - "snippet": { - "text": "\t\t// Registering outfits\r\n\t\tfor (uint32_t it = 0; it < m_appearancesPtr->outfit_size(); it++) {\r\n\t\t\tregisteredLookTypes.push_back(static_cast(m_appearancesPtr->outfit(it).id()));\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c3e33ca9dc9f6f04", - "equalIndicator/v1": "d94a12c5062c12a5000fc2450bae2b30aeec6c9df4d583e63e5a444fb1bd7f69" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'key' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'key' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 117, - "startColumn": 60, - "charOffset": 6023, - "charLength": 14, - "snippet": { - "text": "const uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 115, - "startColumn": 1, - "charOffset": 5807, - "charLength": 565, - "snippet": { - "text": "\tvoid eventPlayerOnRequestQuestLog(std::shared_ptr player);\r\n\tvoid eventPlayerOnRequestQuestLine(std::shared_ptr player, uint16_t questId);\r\n\tvoid eventOnStorageUpdate(std::shared_ptr player, const uint32_t key, const int32_t value, int32_t oldValue, uint64_t currentTime);\r\n\tvoid eventPlayerOnCombat(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, CombatDamage &damage);\r\n\tvoid eventPlayerOnInventoryUpdate(std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool equip);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "03cde0f23103c208", - "equalIndicator/v1": "d95c7f06dcc5e6dcff00ba6c8c14a82cb227b0f03ff5246945f1b5d30860aaa3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", - "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/message/networkmessage.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 27, - "startColumn": 10, - "charOffset": 812, - "charLength": 11, - "snippet": { - "text": "std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 25, - "startColumn": 1, - "charOffset": 772, - "charLength": 61, - "snippet": { - "text": "\r\n\tif (!canRead(stringLen)) {\r\n\t\treturn std::string();\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bc8a43412c84a312", - "equalIndicator/v1": "d95fa3e827053fb22017d083f6c9f3d544cc53396c8d346b338a39191b71d0fa" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Redundant string initialization", - "markdown": "Redundant string initialization" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/imbuements/imbuements.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 142, - "startColumn": 33, - "charOffset": 3433, - "charLength": 8, - "snippet": { - "text": "subgroup" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 140, - "startColumn": 1, - "charOffset": 3340, - "charLength": 162, - "snippet": { - "text": "\tuint32_t storage = 0;\r\n\tuint16_t id, baseid, category = 0;\r\n\tstd::string name, description, subgroup = \"\";\r\n\r\n\tstd::vector> items;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "afa69c06ebb4bc58", - "equalIndicator/v1": "d9727160403e89e18826bc0ffe27c428652f10cee0de5e2bb6792791dda37522" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Redundant string initialization", - "markdown": "Redundant string initialization" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2284, - "startColumn": 15, - "charOffset": 71331, - "charLength": 9, - "snippet": { - "text": "BestClass" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2282, - "startColumn": 1, - "charOffset": 71176, - "charLength": 234, - "snippet": { - "text": "\tstd::map mtype_list = g_game().getBestiaryList();\r\n\tfor (uint8_t i = BESTY_RACE_FIRST; i <= BESTY_RACE_LAST; i++) {\r\n\t\tstd::string BestClass = \"\";\r\n\t\tuint16_t count = 0;\r\n\t\tfor (const auto &rit : mtype_list) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "904287fdda2fda12", - "equalIndicator/v1": "d9d75b826bf923589f0f14b21cf7d3db38fa36a309a74de72b2242904692e89c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/functions/iologindata_save_player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 317, - "startColumn": 63, - "charOffset": 13348, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 315, - "startColumn": 1, - "charOffset": 13281, - "charLength": 178, - "snippet": { - "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerStash(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2381d6fd49c9476b", - "equalIndicator/v1": "d9eda1b3d7122c4c131dc926c7f5438af1bd43a05f103e77d8ff3dfa5b6b7644" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'time_t' (aka 'long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'time_t' (aka 'long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/player_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 242, - "startColumn": 6, - "charOffset": 6471, - "charLength": 7, - "snippet": { - "text": "!player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 240, - "startColumn": 1, - "charOffset": 6371, - "charLength": 174, - "snippet": { - "text": "\t// player:getAccountId()\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (!player || player->getAccountId() == 0) {\r\n\t\tlua_pushnil(L);\r\n\t\treturn 1;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "69231420356bc88c", - "equalIndicator/v1": "d9f9265a5bdf8e558dece20e1ae9f17103bd3536c1eb2de44f21c13481233881" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Potential uncovered code path; add a default label", - "markdown": "Potential uncovered code path; add a default label" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 561, - "startColumn": 3, - "charOffset": 15040, - "charLength": 6, - "snippet": { - "text": "switch" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 559, - "startColumn": 1, - "charOffset": 15031, - "charLength": 148, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tswitch (i) {\r\n\t\t\tcase STAT_MAXHITPOINTS:\r\n\t\t\t\tstats[i] = static_cast(player->getMaxHealth() * ((statsPercent[i] - 100) / 100.f));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8b2860a4c5960afc", - "equalIndicator/v1": "da0e82f4de9d14aaa36ec5af058cca98bab61782b41cabeb773b0989795229e7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1020, - "startColumn": 41, - "charOffset": 38871, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1018, - "startColumn": 1, - "charOffset": 38825, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "57e5b4f4faf6755b", - "equalIndicator/v1": "da1ae489a1ce451b2c2c3788c69983ad7aaa39029740640460f2013786acef45" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 733, - "startColumn": 94, - "charOffset": 23587, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 731, - "startColumn": 1, - "charOffset": 23489, - "charLength": 272, - "snippet": { - "text": "}\r\n\r\nvoid Combat::CombatConditionFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\r\n\tif (params.origin == ORIGIN_MELEE && data && data->primary.value == 0 && data->secondary.value == 0) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b77cfe4de4a1cc47", - "equalIndicator/v1": "da1fb12ee6db1bb9e9799bb544d7874c2de7ea35d9bdc99d6333f2f568d03823" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/mailbox/mailbox.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 31, - "startColumn": 2, - "charOffset": 1101, - "charLength": 11, - "snippet": { - "text": "ReturnValue" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 29, - "startColumn": 1, - "charOffset": 793, - "charLength": 614, - "snippet": { - "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tstd::shared_ptr queryDestination(int32_t &index, const std::shared_ptr &thing, std::shared_ptr* destItem, uint32_t &flags) override;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9f3c9a0ecc5dfaba", - "equalIndicator/v1": "da45a183576d0cc1cb71c9b520278b6492fd296e8123907c7aeaa7b47508a2cb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1890, - "startColumn": 27, - "charOffset": 65323, - "charLength": 23, - "snippet": { - "text": "(output->getRows() / 2)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1888, - "startColumn": 1, - "charOffset": 65226, - "charLength": 146, - "snippet": { - "text": "\t\t// rotation\r\n\t\tint32_t rotateCenterX = (output->getCols() / 2) - 1;\r\n\t\tint32_t rotateCenterY = (output->getRows() / 2) - 1;\r\n\t\tint32_t angle;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6f935d296d234774", - "equalIndicator/v1": "da4bfb96cdcf303795736521154dd6963a1f2f4e279fa816b2de9e7de521649e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 68, - "startColumn": 58, - "charOffset": 1879, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 66, - "startColumn": 1, - "charOffset": 1817, - "charLength": 140, - "snippet": { - "text": "}\r\n\r\nbool House::tryTransferOwnership(std::shared_ptr player, bool serverStartup) {\r\n\tbool transferSuccess = false;\r\n\tif (player) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "383a8219a78e2dfa", - "equalIndicator/v1": "da4e9ee4ceb8b66245d03f831f2a2812b0e90d7165d8a84c1e1eb78a04db218f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3131, - "startColumn": 2, - "charOffset": 95987, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3129, - "startColumn": 1, - "charOffset": 95918, - "charLength": 194, - "snippet": { - "text": "\r\nvoid ProtocolGame::parseMarketAcceptOffer(NetworkMessage &msg) {\r\n\tuint32_t timestamp = msg.get();\r\n\tuint16_t counter = msg.get();\r\n\tuint16_t amount = msg.get();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "77517ad6e4125ec6", - "equalIndicator/v1": "da587644f4bf7f5130d94ce1d35e8ad4ab535730205ccfb275bc4867ab30e90b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2434, - "startColumn": 17, - "charOffset": 72411, - "charLength": 12, - "snippet": { - "text": "noneVocation" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2432, - "startColumn": 1, - "charOffset": 72263, - "charLength": 260, - "snippet": { - "text": "\t\tif (vocation->getId() != VOCATION_NONE && level <= 8) {\r\n\t\t\tconst auto &noneVocation = g_vocations().getVocation(VOCATION_NONE);\r\n\t\t\thealthMax += noneVocation->getHPGain();\r\n\t\t\thealth += noneVocation->getHPGain();\r\n\t\t\tmanaMax += noneVocation->getManaGain();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9e2bdc7e1ae62c38", - "equalIndicator/v1": "da6681724456ca438fe7bae839669b54abec277cd269a8dd2722c7af4fe5e600" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/player_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2272, - "startColumn": 20, - "charOffset": 79244, - "charLength": 26, - "snippet": { - "text": "getGiftOfLifeTotalCooldown" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2270, - "startColumn": 1, - "charOffset": 79205, - "charLength": 108, - "snippet": { - "text": "\r\n\t// Set cooldown\r\n\tsetGiftOfCooldown(getGiftOfLifeTotalCooldown(), false);\r\n\tsendGiftOfLifeCooldown();\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a0568b6168b24572", - "equalIndicator/v1": "da6962216051706146829df8eb527fb9518e1835d9f4c06f27038736e17df239" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1583, - "startColumn": 2, - "charOffset": 46868, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1581, - "startColumn": 1, - "charOffset": 46805, - "charLength": 166, - "snippet": { - "text": "\r\nvoid ProtocolGame::parseOpenChannel(NetworkMessage &msg) {\r\n\tuint16_t channelId = msg.get();\r\n\tg_game().playerOpenChannel(player->getID(), channelId);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "84f919059d6ac2ec", - "equalIndicator/v1": "da7b77dba1c44ffab66c354c9a9f475e409e8508eeaaf5f362584a8995b707d8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 229, - "startColumn": 9, - "charOffset": 7130, - "charLength": 13, - "snippet": { - "text": "getFirstIndex" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 227, - "startColumn": 1, - "charOffset": 7044, - "charLength": 259, - "snippet": { - "text": "\r\n\tint32_t getThingIndex(std::shared_ptr thing) const override final;\r\n\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a33288df1153e768", - "equalIndicator/v1": "da85036eb2d54925d71b943a556a7ca92b62f712b60b7a7aa22a5f49d5c29693" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'tile' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 48, - "startColumn": 68, - "charOffset": 1670, - "charLength": 4, - "snippet": { - "text": "tile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 46, - "startColumn": 1, - "charOffset": 1598, - "charLength": 215, - "snippet": { - "text": "}\r\n\r\nstd::shared_ptr Container::create(std::shared_ptr tile) {\r\n\tauto container = std::make_shared(ITEM_BROWSEFIELD, 30, false, true);\r\n\tTileItemVector* itemVector = tile->getItemList();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c301bb550100a68d", - "equalIndicator/v1": "da91051234d9d57445b0cfe5d0bd05e341ab0471008ede444769d58aa3d385cb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Replace loop by 'std::ranges::any_of()'", - "markdown": "Replace loop by 'std::ranges::any_of()'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1824, - "startColumn": 2, - "charOffset": 49216, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1822, - "startColumn": 1, - "charOffset": 49129, - "charLength": 210, - "snippet": { - "text": "\r\n\tstd::ranges::shuffle(directions.begin(), directions.end(), getRandomGenerator());\r\n\tfor (Direction dir : directions) {\r\n\t\tif (canWalkTo(creature, pos, dir)) {\r\n\t\t\tthis->fleeIndx = static_cast(dir);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d82849ac568da6f2", - "equalIndicator/v1": "daa295bcf3d27456dd372386c3b73858603d25cebfb83c55e736e219930d4158" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 334, - "startColumn": 54, - "charOffset": 11211, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 332, - "startColumn": 1, - "charOffset": 11153, - "charLength": 109, - "snippet": { - "text": "}\r\n\r\nuint32_t Weapon::getManaCost(std::shared_ptr player) const {\r\n\tif (mana != 0) {\r\n\t\treturn mana;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ee655d74588d1c8a", - "equalIndicator/v1": "dabd20eb9aaeae25c1a3959c5ff3fcb0b62f123a7e89b7659d0169ceb085ca38" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 151, - "startColumn": 7, - "charOffset": 4784, - "charLength": 12, - "snippet": { - "text": "replaceThing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 149, - "startColumn": 1, - "charOffset": 4678, - "charLength": 264, - "snippet": { - "text": "\r\n\tvoid updateThing(std::shared_ptr thing, uint16_t itemId, uint32_t count) override final;\r\n\tvoid replaceThing(uint32_t index, std::shared_ptr thing) override final;\r\n\r\n\tvoid removeThing(std::shared_ptr thing, uint32_t count) override final;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8113ab9b05f3f34a", - "equalIndicator/v1": "dadfec16f572456de55be8bef65bf982215fed38d1ed75f2ae5c55c50604d81e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 696, - "startColumn": 15, - "charOffset": 22711, - "charLength": 11, - "snippet": { - "text": "static_cast" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 694, - "startColumn": 1, - "charOffset": 22671, - "charLength": 128, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 58) * 1.55f);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c46797479c1c2125", - "equalIndicator/v1": "db09e8b8b09d08c4549ca3985081034875c146fa2641316d120f9bf8966b64dd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/bed.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 243, - "startColumn": 34, - "charOffset": 6449, - "charLength": 9, - "snippet": { - "text": "condition" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 241, - "startColumn": 1, - "charOffset": 6245, - "charLength": 316, - "snippet": { - "text": "\t\tif (condition->getTicks() != -1) {\r\n\t\t\tregen = std::min((condition->getTicks() / 1000), sleptTime) / 30; // RATE_HEALTH_REGEN_SPEED and RATE_MANA_REGEN_SPEED?\r\n\t\t\tconst int32_t newRegenTicks = condition->getTicks() - (regen * 30000);\r\n\t\t\tif (newRegenTicks <= 0) {\r\n\t\t\t\tplayer->removeCondition(condition);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9f5f892e92d19d8a", - "equalIndicator/v1": "db1df8f79282b371e7d9ab742fef68fe63b864fa966176f1a670f987e8446852" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when declaring iterators", - "markdown": "Use auto when declaring iterators" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4628, - "startColumn": 8, - "charOffset": 145976, - "charLength": 25, - "snippet": { - "text": "ItemDeque::const_iterator" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4626, - "startColumn": 1, - "charOffset": 145948, - "charLength": 186, - "snippet": { - "text": "\r\n\t\tuint32_t i = 0;\r\n\t\tfor (ItemDeque::const_iterator it = itemList.begin() + firstIndex, end = itemList.end(); i < maxItemsToSend && it != end; ++it, ++i) {\r\n\t\t\tAddItem(msg, *it);\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "92a13542b342545a", - "equalIndicator/v1": "db2121309bc1a5e80c993044f53d47dbcf414a7b14aa1fb4ee06e22a84ea67bf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::_Tree, std::allocator>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::_Tree, std::allocator\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/creature_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 869, - "startColumn": 21, - "charOffset": 24192, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 867, - "startColumn": 1, - "charOffset": 24166, - "charLength": 136, - "snippet": { - "text": "\t}\r\n\r\n\tlua_createtable(L, creature->damageMap.size(), 0);\r\n\tfor (auto damageEntry : creature->damageMap) {\r\n\t\tlua_createtable(L, 0, 2);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "00aebadd91b5b7b8", - "equalIndicator/v1": "db2bcc21b4a214046e039dda85f808aac88b3ac7abae637ac173e26348cc67e4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'targetMonster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7542, - "startColumn": 27, - "charOffset": 262595, - "charLength": 13, - "snippet": { - "text": "targetMonster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7540, - "startColumn": 1, - "charOffset": 262539, - "charLength": 225, - "snippet": { - "text": "\r\nvoid Game::applyCharmRune(\r\n\tstd::shared_ptr targetMonster, std::shared_ptr attackerPlayer, std::shared_ptr target, const int32_t &realDamage\r\n) const {\r\n\tif (!targetMonster || !attackerPlayer) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "63a848f1da10cee5", - "equalIndicator/v1": "db32ab8741bdb430f4cf28fba3d231f150297bad0206a59d60aded1bbb8d03c6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 582, - "startColumn": 24, - "charOffset": 17849, - "charLength": 11, - "snippet": { - "text": "queryRemove" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 580, - "startColumn": 1, - "charOffset": 17821, - "charLength": 220, - "snippet": { - "text": "}\r\n\r\nReturnValue Container::queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor /*= nullptr */) {\r\n\tint32_t index = getThingIndex(thing);\r\n\tif (index == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "18572333494fcb0e", - "equalIndicator/v1": "db4a7395deadf3108ffb0544a96849422a633e3eec087283ad6e77042278e540" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 565, - "startColumn": 8, - "charOffset": 13920, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 563, - "startColumn": 1, - "charOffset": 13820, - "charLength": 213, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetBaseSpeed(lua_State* L) {\r\n\t// itemType:getBaseSpeed()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->speed);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "71995b38240f29a7", - "equalIndicator/v1": "db5e5f39360dd4e540d5e0e88eff73595e773a214b4547e0a24efd9d4a431e40" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4895, - "startColumn": 14, - "charOffset": 146158, - "charLength": 12, - "snippet": { - "text": "changeHealth" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4893, - "startColumn": 1, - "charOffset": 146140, - "charLength": 163, - "snippet": { - "text": "}\r\n\r\nvoid Player::changeHealth(int32_t healthChange, bool sendHealthChange /* = true*/) {\r\n\tCreature::changeHealth(healthChange, sendHealthChange);\r\n\tsendStats();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d27052b92133f051", - "equalIndicator/v1": "db61e285a055967c1efa18472fd9762465e6b176013fc693b8006741e4562314" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/creaturecallback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 27, - "startColumn": 2, - "charOffset": 872, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 25, - "startColumn": 1, - "charOffset": 865, - "charLength": 88, - "snippet": { - "text": "\t}\r\n\r\n\tscriptInterface\r\n\t\t->getScriptEnv()\r\n\t\t->setScriptId(scriptId, scriptInterface);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2e98a48ca173804c", - "equalIndicator/v1": "dbbc64eab6da6bbe35c9a45b21314bdf5511f399eeb2508c8f923460191acc14" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'mtype' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'mtype' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 526, - "startColumn": 82, - "charOffset": 14496, - "charLength": 5, - "snippet": { - "text": "mtype" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 524, - "startColumn": 1, - "charOffset": 14410, - "charLength": 169, - "snippet": { - "text": "}\r\n\r\nvoid Player::removeMonsterFromCyclopediaTrackerList(std::shared_ptr mtype, bool isBoss, bool reloadClient /* = false */) {\r\n\tif (!client) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cf50d49c01b73465", - "equalIndicator/v1": "dbccb7ee7d73f60f1b0ce43695815cafd7da2b2a26fd932195d5bf259b16a89e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int64_t' (aka 'long long') is implementation-defined", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int64_t' (aka 'long long') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 70, - "startColumn": 20, - "charOffset": 2241, - "charLength": 23, - "snippet": { - "text": "OTSYS_TIME() - lastStep" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 68, - "startColumn": 1, - "charOffset": 2170, - "charLength": 139, - "snippet": { - "text": "\r\nint64_t Creature::getTimeSinceLastMove() const {\r\n\treturn lastStep ? OTSYS_TIME() - lastStep : std::numeric_limits::max();\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "283ed81767fa7a13", - "equalIndicator/v1": "dc3c222d90cd688f42f2806044f3f0fe221f4a7022e75fc7ca5f8692790e2a36" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::_Vector_iterator>>::value_type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'std::_Vector_iterator\\>\\>::value_type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 67, - "startColumn": 32, - "charOffset": 2120, - "charLength": 6, - "snippet": { - "text": "itemId" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 65, - "startColumn": 1, - "charOffset": 2028, - "charLength": 155, - "snippet": { - "text": "\t\t\tit.vocationString = moveEvent->getVocationString();\r\n\t\t}\r\n\t\tif (registerEvent(moveEvent, itemId, itemIdMap)) {\r\n\t\t\ttmpVector.emplace_back(itemId);\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "95d691f60fdbeb7e", - "equalIndicator/v1": "dc5d80eda3e84d2eda07db8759fb409e0b45c02a92c0b1770a69fe05936e2449" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '_First', which is a reserved identifier", - "markdown": "Declaration uses identifier '_First', which is a reserved identifier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/vectorset.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 78, - "startColumn": 70, - "charOffset": 2116, - "charLength": 6, - "snippet": { - "text": "_First" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 76, - "startColumn": 1, - "charOffset": 2003, - "charLength": 211, - "snippet": { - "text": "\r\n\t\ttemplate \r\n\t\tconstexpr auto insert(std::vector::const_iterator _Where, _Iter _First, _Iter _Last) {\r\n\t\t\tneedUpdate = true;\r\n\t\t\treturn container.insert(_Where, _First, _Last);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ab28227d2beed1ae", - "equalIndicator/v1": "dc60c72735e9da8b84c499bd4f6d9cd48f95f6243d596fde06f68f8f2ec465c6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/player_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1074, - "startColumn": 29, - "charOffset": 29172, - "charLength": 6, - "snippet": { - "text": "skills" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1072, - "startColumn": 1, - "charOffset": 29033, - "charLength": 195, - "snippet": { - "text": "\tstd::shared_ptr player = getUserdataShared(L, 1);\r\n\tif (player && skillType <= SKILL_LAST) {\r\n\t\tlua_pushnumber(L, player->skills[skillType].level);\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f0ec4e71076ca522", - "equalIndicator/v1": "dc63625451f43eea95686f853227cd3cf964db3385ca1337340195d4234a08a1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/map/tile_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 600, - "startColumn": 2, - "charOffset": 14071, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 598, - "startColumn": 1, - "charOffset": 14064, - "charLength": 138, - "snippet": { - "text": "\t}\r\n\r\n\tuint32_t flags = getNumber(L, 4, 0);\r\n\r\n\tReturnValue ret = g_game().internalAddItem(tile, item, INDEX_WHEREEVER, flags);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "46ce24373ceb28f9", - "equalIndicator/v1": "dc66df5f8afefd10a295505d6b3e63487045e3efe0b3e1019c54062a26449ad5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/monster_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 84, - "startColumn": 12, - "charOffset": 2716, - "charLength": 6, - "snippet": { - "text": "health" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 82, - "startColumn": 1, - "charOffset": 2618, - "charLength": 283, - "snippet": { - "text": "\t\tmonster->currentOutfit = mType->info.outfit;\r\n\t\tmonster->skull = mType->info.skull;\r\n\t\tmonster->health = mType->info.health * mType->getHealthMultiplier();\r\n\t\tmonster->healthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\t\tmonster->baseSpeed = mType->getBaseSpeed();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "940ced98c6b70e5e", - "equalIndicator/v1": "dc8149b6893d88ec707fea0ee62360ebed0e04c1e09bd534cd0e0503d6684cd9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/global_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 36, - "startColumn": 2, - "charOffset": 1444, - "charLength": 7, - "snippet": { - "text": "int32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 34, - "startColumn": 1, - "charOffset": 1394, - "charLength": 192, - "snippet": { - "text": "\r\n\tuint16_t itemId = getNumber(L, 2);\r\n\tint32_t count = getNumber(L, 3, 1);\r\n\tbool canDropOnMap = getBoolean(L, 4, true);\r\n\tuint16_t subType = getNumber(L, 5, 1);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e948f993c3da7c7b", - "equalIndicator/v1": "dc9908e4ec71d001949f301f582a00b28f8f8c7b4a3c01a6d5c9a4733ad5458f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'creature' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 453, - "startColumn": 19, - "charOffset": 24032, - "charLength": 31, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 451, - "startColumn": 1, - "charOffset": 23830, - "charLength": 379, - "snippet": { - "text": "\tvoid internalCreatureChangeOutfit(std::shared_ptr creature, const Outfit_t &oufit);\r\n\tvoid internalCreatureChangeVisible(std::shared_ptr creature, bool visible);\r\n\tvoid changeLight(const std::shared_ptr creature);\r\n\tvoid updateCreatureIcon(const std::shared_ptr creature);\r\n\tvoid reloadCreature(const std::shared_ptr creature);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c2bf3b292a091245", - "equalIndicator/v1": "dcd4d9bc0dfc1ee7697c8a75f65bf07e39ceee0db86ce4df752b635e8502dd6c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Local copy 'castItem' of the variable 'item' is never modified; consider avoiding the copy", - "markdown": "Local copy 'castItem' of the variable 'item' is never modified; consider avoiding the copy" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1415, - "startColumn": 16, - "charOffset": 40141, - "charLength": 8, - "snippet": { - "text": "castItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1413, - "startColumn": 1, - "charOffset": 40052, - "charLength": 144, - "snippet": { - "text": "\t\t\t\tslotName = fmt::format(\"Imbuement Slot {}\", i + 1);\r\n\t\t\t\tss.str(\"\");\r\n\t\t\t\tconst auto castItem = item;\r\n\t\t\t\tif (!castItem) {\r\n\t\t\t\t\tcontinue;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "65cccc289cf3638b", - "equalIndicator/v1": "dce3eab3e59ea6df7764b0f6e40e60ba2baa2f0d2fde8ae1ab92b0ac68659f1c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2390, - "startColumn": 60, - "charOffset": 70704, - "charLength": 3, - "snippet": { - "text": "exp" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2388, - "startColumn": 1, - "charOffset": 70561, - "charLength": 162, - "snippet": { - "text": "\t} else {\r\n\t\tg_metrics().addCounter(\"player_experience_bonus_raw\", rawExp, attrs);\r\n\t\tg_metrics().addCounter(\"player_experience_bonus_actual\", exp, attrs);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bafab6fb1e91dd81", - "equalIndicator/v1": "dd03608f91e9a8b3452604442c1200afad67ae7448ba4a72391b0439b4f0b35e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 801, - "startColumn": 29, - "charOffset": 24270, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 799, - "startColumn": 1, - "charOffset": 24149, - "charLength": 182, - "snippet": { - "text": "int32_t Container::getThingIndex(std::shared_ptr thing) const {\r\n\tint32_t index = 0;\r\n\tfor (std::shared_ptr item : itemlist) {\r\n\t\tif (item == thing) {\r\n\t\t\treturn index;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "46f564d4375eec7c", - "equalIndicator/v1": "dd8408799d0a50c1b4aa52898501d666ee7cd278055e8fe499cfe47fac29855b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/player_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2240, - "startColumn": 67, - "charOffset": 78256, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2238, - "startColumn": 1, - "charOffset": 78185, - "charLength": 151, - "snippet": { - "text": "}\r\n\r\nint32_t PlayerWheel::checkDivineGrenade(std::shared_ptr target) const {\r\n\tif (!target || target == m_player.getPlayer()) {\r\n\t\treturn 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4b94c2c9ff3fc10e", - "equalIndicator/v1": "dd94dc115f0646342f77ac00218a82bcc7c2f705c8e39863e96dbc3ad1bb47af" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/cyclopedia/player_title.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 223, - "startColumn": 28, - "charOffset": 6728, - "charLength": 6, - "snippet": { - "text": "g_game" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 221, - "startColumn": 1, - "charOffset": 6671, - "charLength": 211, - "snippet": { - "text": "\t\t\treturn false;\r\n\t\tdefault:\r\n\t\t\tstd::string skillName = g_game().getSkillNameById(skill);\r\n\t\t\tquery = fmt::format(\r\n\t\t\t\t\"SELECT * FROM `players` WHERE `group_id` < {} AND `{}` > 10 ORDER BY `{}` DESC LIMIT 1\",\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3fe0c820777f214d", - "equalIndicator/v1": "ddb209b3dc679862b392dae8dae0695304938a90b3bd177f2807d01372911982" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 78, - "startColumn": 10, - "charOffset": 2102, - "charLength": 5, - "snippet": { - "text": "mType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 76, - "startColumn": 1, - "charOffset": 2015, - "charLength": 175, - "snippet": { - "text": "\tfloat getMitigation() const override;\r\n\tint32_t getArmor() const override {\r\n\t\treturn mType->info.armor * getDefenseMultiplier();\r\n\t}\r\n\tint32_t getDefense() const override {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d732cdb3edbd9727", - "equalIndicator/v1": "ddca8b34a53409ac3a078e8a220bd90ab92c03dd1668bae7bc2cfafb1a69ec15" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 929, - "startColumn": 14, - "charOffset": 30278, - "charLength": 10, - "snippet": { - "text": "std::round" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 927, - "startColumn": 1, - "charOffset": 30195, - "charLength": 162, - "snippet": { - "text": "\t\tint32_t value = getAbsorbPercent(combatType);\r\n\t\tif (value != 0) {\r\n\t\t\tdamage -= std::round(damage * value / 100.f);\r\n\t\t}\r\n\t\tvalue = getAbsorbFlat(combatType);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7fd24b1a5fd39b14", - "equalIndicator/v1": "ddd5a7cc4610e6b976a3afffea77fea7db8ffe1a0fa024cf1f1f538eee85e117" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use range-based for loop instead", - "markdown": "Use range-based for loop instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 152, - "startColumn": 3, - "charOffset": 4029, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 150, - "startColumn": 1, - "charOffset": 3972, - "charLength": 195, - "snippet": { - "text": "\r\n\tif (const TileItemVector* items = getItemList()) {\r\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\r\n\t\t\tif ((*it)->getTeleport()) {\r\n\t\t\t\treturn (*it)->getTeleport();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a6d9b8600fe82ad2", - "equalIndicator/v1": "ddf32f78177d968ff3d516f8936fd71a1dea852a9fc8dddf3fc46db6e1bbcf45" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 913, - "startColumn": 43, - "charOffset": 29509, - "charLength": 3, - "snippet": { - "text": "min" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 911, - "startColumn": 1, - "charOffset": 29361, - "charLength": 164, - "snippet": { - "text": "\r\n\t// Returns the calculated maximum damage or a random value between the calculated minimum and maximum\r\n\treturn maxDamage ? -max : -normal_random(min, max);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3e73cfe68939bf75", - "equalIndicator/v1": "de15eeb76c8761954578d533b68856d805dbca5fac143d7999b579da887747d4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 155, - "startColumn": 10, - "charOffset": 4954, - "charLength": 13, - "snippet": { - "text": "getThingIndex" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 153, - "startColumn": 1, - "charOffset": 4862, - "charLength": 251, - "snippet": { - "text": "\tvoid removeThing(std::shared_ptr thing, uint32_t count) override final;\r\n\r\n\tint32_t getThingIndex(std::shared_ptr thing) const override final;\r\n\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "df5fcab1dd2e86f7", - "equalIndicator/v1": "de1c8f4fe48beb6b41a3df70caae378a62fbc44a9ddbdf2a68bad8026f22595a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'virtual' is redundant since the function is already declared 'override'", - "markdown": "'virtual' is redundant since the function is already declared 'override'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/cylinder.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 195, - "startColumn": 15, - "charOffset": 7930, - "charLength": 12, - "snippet": { - "text": "replaceThing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 193, - "startColumn": 1, - "charOffset": 7762, - "charLength": 304, - "snippet": { - "text": "\tvirtual void addThing(int32_t, std::shared_ptr) override { }\r\n\tvirtual void updateThing(std::shared_ptr, uint16_t, uint32_t) override { }\r\n\tvirtual void replaceThing(uint32_t, std::shared_ptr) override { }\r\n\tvirtual void removeThing(std::shared_ptr, uint32_t) override { }\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b5d9fd9fd7664e2e", - "equalIndicator/v1": "de300035a89da36bf943669982ad984ee039274e71287fce4082ff013c4a459a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 423, - "startColumn": 194, - "charOffset": 13920, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 421, - "startColumn": 1, - "charOffset": 13722, - "charLength": 328, - "snippet": { - "text": "}\r\n\r\nbool Actions::useItemEx(std::shared_ptr player, const Position &fromPos, const Position &toPos, uint8_t toStackPos, std::shared_ptr item, bool isHotkey, std::shared_ptr creature /* = nullptr*/) {\r\n\tconst ItemType &it = Item::items[item->getID()];\r\n\tif (it.isRune() || it.type == ITEM_TYPE_POTION) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "081618dc86e2c064", - "equalIndicator/v1": "de33a367014e20cfb72d92acb9ebbdc69086852cd770fec92e6c5668f2babf05" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 325, - "startColumn": 65, - "charOffset": 12050, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 323, - "startColumn": 1, - "charOffset": 11973, - "charLength": 231, - "snippet": { - "text": "\r\n// Player\r\nbool EventCallback::playerOnBrowseField(std::shared_ptr player, const Position &position) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnBrowseField - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "73da8225ff3dfbc2", - "equalIndicator/v1": "de6a828b364e86bd9aee66e76720e5857115690f788cdd8717dec2939c2be7ce" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int'", - "markdown": "Narrowing conversion from 'float' to 'int'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4910, - "startColumn": 29, - "charOffset": 146620, - "charLength": 10, - "snippet": { - "text": "soulChange" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4908, - "startColumn": 1, - "charOffset": 146521, - "charLength": 265, - "snippet": { - "text": "void Player::changeSoul(int32_t soulChange) {\r\n\tif (soulChange > 0) {\r\n\t\tsoul += std::min(soulChange * g_configManager().getFloat(RATE_SOUL_REGEN, __FUNCTION__), vocation->getSoulMax() - soul);\r\n\t} else {\r\n\t\tsoul = std::max(0, soul + soulChange);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "62231767ac5348d7", - "equalIndicator/v1": "de83f43925dc967c252e2ff2b69bf209c326a8bbc170246883c166db7472456c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2483, - "startColumn": 95, - "charOffset": 94675, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2481, - "startColumn": 1, - "charOffset": 94576, - "charLength": 258, - "snippet": { - "text": "}\r\n\r\nReturnValue Game::internalPlayerAddItem(std::shared_ptr player, std::shared_ptr item, bool dropOnMap /*= true*/, Slots_t slot /*= CONST_SLOT_WHEREEVER*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tuint32_t remainderCount = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b74be174858f16fe", - "equalIndicator/v1": "de842552529750cfe1f801241fccd0b7498a02836b31146b702b46f044ee56bf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2281, - "startColumn": 108, - "charOffset": 67197, - "charLength": 8, - "snippet": { - "text": "muteTime" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2279, - "startColumn": 1, - "charOffset": 66999, - "charLength": 250, - "snippet": { - "text": "\t\t\tuint32_t muteTime = 5 * muteCount * muteCount;\r\n\t\t\tmuteCountMap[guid] = muteCount + 1;\r\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_MUTED, muteTime * 1000, 0);\r\n\t\t\taddCondition(condition);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3d9fdacd4f3de672", - "equalIndicator/v1": "deb6107c839745d20c31033c9bf9fdc9f6af955c8f75b3c3a588a98508ac0b12" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1124, - "startColumn": 41, - "charOffset": 42732, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1122, - "startColumn": 1, - "charOffset": 42686, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f953ddbc714a9add", - "equalIndicator/v1": "dee799f85dccef76df64529cef302ec3a39716fecfd3c7604334d774f644830a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 99, - "startColumn": 8, - "charOffset": 2557, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 97, - "startColumn": 1, - "charOffset": 2459, - "charLength": 212, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeIsStackable(lua_State* L) {\r\n\t// itemType:isStackable()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->stackable);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b3064fd06d5b0c82", - "equalIndicator/v1": "deeb944841cc02cc0f8bc532f25672eb21b11bc6caae5b586488c445d515a76e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/achievement/player_achievement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 36, - "startColumn": 53, - "charOffset": 1118, - "charLength": 21, - "snippet": { - "text": "(OTSYS_TIME() / 1000)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 34, - "startColumn": 1, - "charOffset": 1031, - "charLength": 241, - "snippet": { - "text": "\r\n\taddPoints(achievement.points);\r\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\r\n\tgetUnlockedKV()->set(achievement.name, toSaveTimeStamp);\r\n\tm_achievementsUnlocked.emplace_back(achievement.id, toSaveTimeStamp);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0cf0875934c0cece", - "equalIndicator/v1": "defe494e427b1af553a9f7f528b8648e65d6da104341c5d9fcc500d5ca4e3d6b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/account/account.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 189, - "startColumn": 17, - "charOffset": 5301, - "charLength": 9, - "snippet": { - "text": "m_account" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 187, - "startColumn": 1, - "charOffset": 5132, - "charLength": 253, - "snippet": { - "text": "void Account::addPremiumDays(const int32_t &days) {\r\n\tauto timeLeft = std::max(0, static_cast((m_account.premiumLastDay - getTimeNow()) % 86400));\r\n\tsetPremiumDays(m_account.premiumRemainingDays + days);\r\n\tm_account.premiumDaysPurchased += days;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bb0d7bfcdd11f9d5", - "equalIndicator/v1": "df4ce53ff28c43d14ea348e64a2a7b5882758ef1e9fa8c6b45f79039954de7f7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 120, - "startColumn": 74, - "charOffset": 5224, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 118, - "startColumn": 1, - "charOffset": 5055, - "charLength": 260, - "snippet": { - "text": "\t * @param player Pointer to the player for whom the imbuement damage should be handled.\r\n\t */\r\n\tvoid handleImbuementDamage(NetworkMessage &msg, std::shared_ptr player) {\r\n\t\tbool imbueDmg = false;\r\n\t\tstd::shared_ptr weapon = player->getWeapon();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5c8034dc5b52e7f9", - "equalIndicator/v1": "df5f3cea64c23b2df489832f3effb528d15d4371b52b469b1a77b05d19063fa5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8463, - "startColumn": 4, - "charOffset": 267942, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8461, - "startColumn": 1, - "charOffset": 267856, - "charLength": 238, - "snippet": { - "text": "\t\tcase SUPPLY_STASH_ACTION_WITHDRAW: {\r\n\t\t\tuint16_t itemId = msg.get();\r\n\t\t\tuint32_t count = msg.get();\r\n\t\t\tuint8_t stackpos = msg.getByte();\r\n\t\t\tg_game().playerStashWithdraw(player->getID(), itemId, count, stackpos);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2875b0cf0b8ee485", - "equalIndicator/v1": "df5fd52fe2ae230ad596eac6dc657fbbb5b9d24f608bf76812aeb89d5b528aaf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1135, - "startColumn": 26, - "charOffset": 34168, - "charLength": 4, - "snippet": { - "text": "tile" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1133, - "startColumn": 1, - "charOffset": 34087, - "charLength": 191, - "snippet": { - "text": "\t\tuint32_t moveCount = 0;\r\n\t\tuint32_t removeCount = 0;\r\n\t\tint32_t downItemSize = tile->getDownItemCount();\r\n\t\tfor (int32_t i = downItemSize; --i >= 0;) {\r\n\t\t\tconst auto &item = items->at(i);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "887b2f783f504967", - "equalIndicator/v1": "df660a6ab3db2080b0ad21af4260e256ba0bedb379f1b0bf53d5c28c01613f3c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 830, - "startColumn": 21, - "charOffset": 26921, - "charLength": 10, - "snippet": { - "text": "std::round" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 828, - "startColumn": 1, - "charOffset": 26854, - "charLength": 182, - "snippet": { - "text": "\r\n\tint32_t minValue = player->getLevel() / 5;\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue);\r\n\tif (maxDamage) {\r\n\t\treturn -maxValue;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f02f18f8a3b9e60f", - "equalIndicator/v1": "df6659994e6e9674c520b7983a58a1d361dce624b9197d5ce93f48bbde524bb1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'setFollowCreature' is within a recursive call chain", - "markdown": "Function 'setFollowCreature' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4330, - "startColumn": 14, - "charOffset": 130454, - "charLength": 17, - "snippet": { - "text": "setFollowCreature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4328, - "startColumn": 1, - "charOffset": 130436, - "charLength": 153, - "snippet": { - "text": "}\r\n\r\nbool Player::setFollowCreature(std::shared_ptr creature) {\r\n\tif (!Creature::setFollowCreature(creature)) {\r\n\t\tsetFollowCreature(nullptr);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cb87b1e277590c43", - "equalIndicator/v1": "df68a34b796c984c77ddcae51907a1617221fea12903f896bb0cca63833c769d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'itemId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 359, - "startColumn": 84, - "charOffset": 17378, - "charLength": 14, - "snippet": { - "text": "const uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 357, - "startColumn": 1, - "charOffset": 17005, - "charLength": 554, - "snippet": { - "text": "\tvoid playerConfigureShowOffSocket(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerSetShowOffSocket(uint32_t playerId, Outfit_t &outfit, const Position &pos, uint8_t stackPos, const uint16_t itemId, uint8_t podiumVisible, uint8_t direction);\r\n\tvoid playerWrapableItem(uint32_t playerId, const Position &pos, uint8_t stackPos, const uint16_t itemId);\r\n\tvoid playerWriteItem(uint32_t playerId, uint32_t windowTextId, const std::string &text);\r\n\tvoid playerBrowseField(uint32_t playerId, const Position &pos);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4a2044982ac64ebd", - "equalIndicator/v1": "df690514d559144459cf8bcbbce2163db288add89170937aa85a28cf1650bce0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'unsigned int'", - "markdown": "Narrowing conversion from 'double' to 'unsigned int'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/message/networkmessage.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 65, - "startColumn": 16, - "charOffset": 2101, - "charLength": 53, - "snippet": { - "text": "(value * std::pow(static_cast(10), precision))" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 63, - "startColumn": 1, - "charOffset": 1988, - "charLength": 212, - "snippet": { - "text": "void NetworkMessage::addDouble(double value, uint8_t precision /* = 2*/) {\r\n\taddByte(precision);\r\n\tadd((value * std::pow(static_cast(10), precision)) + std::numeric_limits::max());\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3115fb7b019f0d58", - "equalIndicator/v1": "df74a49724e7b1b99fad3aff627d790eafb0fdcbf0b5096a8289990386d42c79" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5678, - "startColumn": 48, - "charOffset": 167880, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5676, - "startColumn": 1, - "charOffset": 167828, - "charLength": 138, - "snippet": { - "text": "}\r\n\r\nbool Player::isPartner(std::shared_ptr player) const {\r\n\tif (!player || !m_party || player.get() == this) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "90610bc1b44379b6", - "equalIndicator/v1": "df8136683b8f1a75e83f12bcab17f1dbccff5c91eb44ba4c2742af3b908bea9f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 818, - "startColumn": 27, - "charOffset": 29471, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 816, - "startColumn": 1, - "charOffset": 29439, - "charLength": 129, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnChangeZone, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "557cb4bc50a1d79f", - "equalIndicator/v1": "df965d56a4c4e390fc10b29fc6986ae17d3b582c77846da227ac240965b7b34d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7826, - "startColumn": 56, - "charOffset": 273543, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7824, - "startColumn": 1, - "charOffset": 273483, - "charLength": 194, - "snippet": { - "text": "}\r\n\r\nvoid Game::addCreatureHealth(std::shared_ptr target) {\r\n\tauto spectators = Spectators().find(target->getPosition(), true);\r\n\taddCreatureHealth(spectators.data(), target);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "77e133fcedcc8d6f", - "equalIndicator/v1": "dfafbfdaed00a620886fd9b16ca7f0648f0bd7405025bde4d40cf6769f5c84eb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/creature_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 874, - "startColumn": 22, - "charOffset": 24426, - "charLength": 11, - "snippet": { - "text": "damageEntry" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 872, - "startColumn": 1, - "charOffset": 24303, - "charLength": 159, - "snippet": { - "text": "\t\tsetField(L, \"total\", damageEntry.second.total);\r\n\t\tsetField(L, \"ticks\", damageEntry.second.ticks);\r\n\t\tlua_rawseti(L, -2, damageEntry.first);\r\n\t}\r\n\treturn 1;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "be030f983f8ddb24", - "equalIndicator/v1": "dff2fdd346c0722a8b75c8e19b61ff4813040fa67f22b8e9b6736cbe1a392269" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1807, - "startColumn": 3, - "charOffset": 54418, - "charLength": 16, - "snippet": { - "text": "ObjectCategory_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1805, - "startColumn": 1, - "charOffset": 54361, - "charLength": 197, - "snippet": { - "text": "\tuint8_t action = msg.getByte();\r\n\tif (action == 0) {\r\n\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\r\n\t\tPosition pos = msg.getPosition();\r\n\t\tuint16_t itemId = msg.get();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "60221a0174ca8e5c", - "equalIndicator/v1": "e0040f367f4631b2b49aef25b738240d3eaf1a7bdac28918b07a4130898b78a3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 238, - "startColumn": 30, - "charOffset": 7304, - "charLength": 7, - "snippet": { - "text": "getItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 236, - "startColumn": 1, - "charOffset": 7235, - "charLength": 142, - "snippet": { - "text": "\t\treturn static_self_cast();\r\n\t}\r\n\tstd::shared_ptr getItem() const override final {\r\n\t\treturn static_self_cast();\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "523c561293b70b9f", - "equalIndicator/v1": "e0168f7bccd1be9c76a84b3a565c9991f52d495417008f7dc7317b87cee2000b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5167, - "startColumn": 50, - "charOffset": 152544, - "charLength": 8, - "snippet": { - "text": "attacked" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5165, - "startColumn": 1, - "charOffset": 152490, - "charLength": 150, - "snippet": { - "text": "}\r\n\r\nbool Player::hasAttacked(std::shared_ptr attacked) const {\r\n\tif (hasFlag(PlayerFlags_t::NotGainInFight) || !attacked) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e0e90e812cd4889a", - "equalIndicator/v1": "e03d898450160b7d5e1842d5bd9b944bb5484d51f3abe2663b2bead1b46f80c2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 913, - "startColumn": 28, - "charOffset": 29494, - "charLength": 24, - "snippet": { - "text": "-normal_random(min, max)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 911, - "startColumn": 1, - "charOffset": 29361, - "charLength": 164, - "snippet": { - "text": "\r\n\t// Returns the calculated maximum damage or a random value between the calculated minimum and maximum\r\n\treturn maxDamage ? -max : -normal_random(min, max);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "be189bfe5c3e6860", - "equalIndicator/v1": "e054894de001dbc656e53118d057ee6a640eea57bea120ff2f82ebf4b3ced3db" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 600, - "startColumn": 13, - "charOffset": 29341, - "charLength": 11, - "snippet": { - "text": "stringValue" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 598, - "startColumn": 1, - "charOffset": 29143, - "charLength": 367, - "snippet": { - "text": "\t} else if (stringValue == \"absorbpercentphysical\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_PHYSICALDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercenthealing\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_HEALING)] += pugi::cast(valueAttribute.value());\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "82e7a1040fd0e9d8", - "equalIndicator/v1": "e05c738438cc1e39737b28acd18166d4e7c4144c852af632874d5f4101912392" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 438, - "startColumn": 107, - "charOffset": 11859, - "charLength": 7, - "snippet": { - "text": "newItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 436, - "startColumn": 1, - "charOffset": 11748, - "charLength": 396, - "snippet": { - "text": "}\r\n\r\nvoid Tile::onUpdateTileItem(std::shared_ptr oldItem, const ItemType &oldType, std::shared_ptr newItem, const ItemType &newType) {\r\n\tif ((newItem->hasProperty(CONST_PROP_MOVABLE) || newItem->getContainer()) || (newItem->isWrapable() && newItem->hasProperty(CONST_PROP_MOVABLE) && !oldItem->hasProperty(CONST_PROP_BLOCKPATH))) {\r\n\t\tauto it = g_game().browseFields.find(getTile());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "62b0c41e8d17a4aa", - "equalIndicator/v1": "e08270b54180eadec70e46e168bb4141cdc7940d3ec457bf752cb7312688c032" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/grouping/party.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 617, - "startColumn": 56, - "charOffset": 18065, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 615, - "startColumn": 1, - "charOffset": 18005, - "charLength": 116, - "snippet": { - "text": "}\r\n\r\nvoid Party::updatePlayerStatus(std::shared_ptr player) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a454e50588c84941", - "equalIndicator/v1": "e09cd03b0454912ccb9b4daf5a09a481d2c3709573c99bf9e794e3fa55af44c9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 127, - "startColumn": 7, - "charOffset": 3173, - "charLength": 10, - "snippet": { - "text": "isPushable" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 125, - "startColumn": 1, - "charOffset": 3150, - "charLength": 74, - "snippet": { - "text": "\t\treturn 0;\r\n\t}\r\n\tbool isPushable() override final {\r\n\t\treturn false;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c7dd50b66432735d", - "equalIndicator/v1": "e0c7708b6aa30e0cfef1e9fb521bd974969ae958ec4e9f5167dd1979ebe0afb0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3095, - "startColumn": 3, - "charOffset": 94766, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3093, - "startColumn": 1, - "charOffset": 94676, - "charLength": 221, - "snippet": { - "text": "\t\tg_game().playerBrowseMarketOwnHistory(player->getID());\r\n\t} else if (!oldProtocol) {\r\n\t\tuint16_t itemId = msg.get();\r\n\t\tuint8_t tier = msg.get();\r\n\t\tplayer->sendMarketEnter(player->getLastDepotId());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1da6567d68fa1f0f", - "equalIndicator/v1": "e0c8e3d253de104c6dae76bc6cbb8ba61cbc29897a6eda26402885daeb74594d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1766, - "startColumn": 67, - "charOffset": 61582, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1764, - "startColumn": 1, - "charOffset": 61511, - "charLength": 206, - "snippet": { - "text": "}\r\n\r\nbool ChainPickerCallback::onChainCombat(std::shared_ptr creature, std::shared_ptr target) const {\r\n\t// onChainCombat(creature, target)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "051065488f0fb0c5", - "equalIndicator/v1": "e0d85dbbd12d7167eafbd3f9fe90f59dca7d34257ae554ea02782d4002ac7300" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3096, - "startColumn": 3, - "charOffset": 94808, - "charLength": 7, - "snippet": { - "text": "uint8_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3094, - "startColumn": 1, - "charOffset": 94735, - "charLength": 225, - "snippet": { - "text": "\t} else if (!oldProtocol) {\r\n\t\tuint16_t itemId = msg.get();\r\n\t\tuint8_t tier = msg.get();\r\n\t\tplayer->sendMarketEnter(player->getLastDepotId());\r\n\t\tg_game().playerBrowseMarket(player->getID(), itemId, tier);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ef7de789c8ae999b", - "equalIndicator/v1": "e0f295919f98977c31b3d1a6974317e4baa339a24f9e3ace8192606a630ea486" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1627, - "startColumn": 65, - "charOffset": 48518, - "charLength": 9, - "snippet": { - "text": "container" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1625, - "startColumn": 1, - "charOffset": 48449, - "charLength": 156, - "snippet": { - "text": "}\r\n\r\nvoid Player::sendUpdateContainerItem(std::shared_ptr container, uint16_t slot, std::shared_ptr newItem) {\r\n\tif (!client) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "58410848146135af", - "equalIndicator/v1": "e0f627132a8ef43be0dd021b5c15592ddc88b581865cb0f7c42e51c85709fa0f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1612, - "startColumn": 22, - "charOffset": 56618, - "charLength": 10, - "snippet": { - "text": "std::round" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1610, - "startColumn": 1, - "charOffset": 56424, - "charLength": 315, - "snippet": { - "text": "\t\t\tdouble factor = (double)elementAttack / (double)attackValue; // attack value here is phys dmg + element dmg\r\n\t\t\tint32_t elementDamage = std::round(defaultDmg * factor);\r\n\t\t\tint32_t physDmg = std::round(defaultDmg * (1.0 - factor));\r\n\t\t\tdamage.primary.value = physDmg;\r\n\t\t\tdamage.secondary.value = elementDamage;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "98903326b81028fe", - "equalIndicator/v1": "e10627227bc49c81139e7b100dbc98266492de5af797f870c219206040ae5c67" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')", - "markdown": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/vocations/vocation.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 68, - "startColumn": 10, - "charOffset": 1693, - "charLength": 15, - "snippet": { - "text": "gainHealthTicks" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 66, - "startColumn": 1, - "charOffset": 1642, - "charLength": 142, - "snippet": { - "text": "\r\n\tuint32_t getHealthGainTicks() const {\r\n\t\treturn gainHealthTicks / g_configManager().getFloat(RATE_HEALTH_REGEN_SPEED, __FUNCTION__);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c601fed17e1b9925", - "equalIndicator/v1": "e10fdfb492c1dc47c155f54476b10f0bf16496205c2f34cedb9f015660a90596" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/container_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 160, - "startColumn": 2, - "charOffset": 4409, - "charLength": 7, - "snippet": { - "text": "int32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 158, - "startColumn": 1, - "charOffset": 4402, - "charLength": 117, - "snippet": { - "text": "\t}\r\n\r\n\tint32_t index = getNumber(L, 4, INDEX_WHEREEVER);\r\n\tuint32_t flags = getNumber(L, 5, 0);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2433f91ef6a705db", - "equalIndicator/v1": "e117575b4eea790f164b121736a1011832c9538efa05e3dea69d08d420528aa1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1775, - "startColumn": 27, - "charOffset": 61967, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1773, - "startColumn": 1, - "charOffset": 61935, - "charLength": 159, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\tif (!env->setCallbackId(scriptId, scriptInterface)) {\r\n\t\tscriptInterface->resetScriptEnv();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "937417e4ae84ec3e", - "equalIndicator/v1": "e11f5f524d92f2f4861b3fd2a3c9d9552285c4e063a70e3128c654c3909342f0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/npcs/npc.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 297, - "startColumn": 23, - "charOffset": 10442, - "charLength": 9, - "snippet": { - "text": "totalCost" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 295, - "startColumn": 1, - "charOffset": 10349, - "charLength": 111, - "snippet": { - "text": "\t\tcallback.pushBoolean(ignore);\r\n\t\tcallback.pushBoolean(inBackpacks);\r\n\t\tcallback.pushNumber(totalCost);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1bb92ffa5c129d02", - "equalIndicator/v1": "e12af17179c60386f794ae6257b5f579713fb580397403aa39c54794d72501bb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '_WIN32_WINNT', which is a reserved identifier", - "markdown": "Declaration uses identifier '_WIN32_WINNT', which is a reserved identifier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/definitions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 52, - "startColumn": 2, - "charOffset": 1694, - "charLength": 7, - "snippet": { - "text": "#ifndef" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 50, - "startColumn": 1, - "charOffset": 1659, - "charLength": 111, - "snippet": { - "text": "\t#define strncasecmp _strnicmp\r\n\r\n\t#ifndef _WIN32_WINNT\r\n\t\t// 0x0602: Windows 7\r\n\t\t#define _WIN32_WINNT 0x0602\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1622cfcd200858a8", - "equalIndicator/v1": "e14a6ec59e233f33df53b9c1013c3832c4836cdc900c9321df9457c235608d0c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2536, - "startColumn": 36, - "charOffset": 75853, - "charLength": 8, - "snippet": { - "text": "capacity" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2534, - "startColumn": 1, - "charOffset": 75674, - "charLength": 269, - "snippet": { - "text": "\t\t\thealthMax = std::max(0, healthMax - vocation->getHPGain());\r\n\t\t\tmanaMax = std::max(0, manaMax - vocation->getManaGain());\r\n\t\t\tcapacity = std::max(0, capacity - vocation->getCapGain());\r\n\t\t}\r\n\t\tcurrLevelExp = Player::getExpForLevel(level);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "899e8243466226b1", - "equalIndicator/v1": "e17b128affcf018f3483268e8c67c1620612b2bfd9721587e9edf40f285915e6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::list::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::list::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5164, - "startColumn": 93, - "charOffset": 162566, - "charLength": 3, - "snippet": { - "text": "810" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5162, - "startColumn": 1, - "charOffset": 162413, - "charLength": 303, - "snippet": { - "text": "\tuint32_t i = 0;\r\n\tstd::map counterMap;\r\n\tuint32_t buyOffersToSend = std::min(buyOffers.size(), 810 + std::max(0, 810 - sellOffers.size()));\r\n\tuint32_t sellOffersToSend = std::min(sellOffers.size(), 810 + std::max(0, 810 - buyOffers.size()));\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "71f215890b023059", - "equalIndicator/v1": "e1a71dfeb13bc90f2302d3d50cd29f30753db60dbf570dcccebdad9becf8143a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Result of integer division used in a floating point context; possible loss of precision", - "markdown": "Result of integer division used in a floating point context; possible loss of precision" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2187, - "startColumn": 28, - "charOffset": 74114, - "charLength": 14, - "snippet": { - "text": "uniform_random" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2185, - "startColumn": 1, - "charOffset": 73963, - "charLength": 266, - "snippet": { - "text": "\t\t playerWeapon != nullptr && playerWeapon->getTier() > 0) {\r\n\t\t\tdouble_t fatalChance = playerWeapon->getFatalChance();\r\n\t\t\tdouble_t randomChance = uniform_random(0, 10000) / 100;\r\n\t\t\tif (fatalChance > 0 && randomChance < fatalChance) {\r\n\t\t\t\tdamage.fatal = true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2af6ee8d99a76827", - "equalIndicator/v1": "e1cf2bd8f29aafaed0565bea610999cdc4990c63ef9827a23b10783774febd75" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 10422, - "startColumn": 88, - "charOffset": 362192, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 10420, - "startColumn": 1, - "charOffset": 362100, - "charLength": 258, - "snippet": { - "text": "}\r\n\r\nbool Game::tryRetrieveStashItems(std::shared_ptr player, std::shared_ptr item) {\r\n\tObjectCategory_t category = getObjectCategory(item);\r\n\treturn internalCollectManagedItems(std::move(player), item, category, false) == RETURNVALUE_NOERROR;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "37d6d72e2e05d912", - "equalIndicator/v1": "e1d59d2ef8b489603a34c73182132ab150f7d324ee26c8ada5e85bc3f838172c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1370, - "startColumn": 2, - "charOffset": 40938, - "charLength": 7, - "snippet": { - "text": "uint8_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1368, - "startColumn": 1, - "charOffset": 40894, - "charLength": 188, - "snippet": { - "text": "\r\n\tuint16_t itemId = msg.get();\r\n\tuint8_t tier = msg.get();\r\n\tg_game().playerEquipItem(player->getID(), itemId, Item::items[itemId].upgradeClassification > 0, tier);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "06367183e490a3b2", - "equalIndicator/v1": "e1d8e05c31634284728176bf177203155fc5fa6312b698f2bdb0e61dd100de1b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1805, - "startColumn": 19, - "charOffset": 53966, - "charLength": 17, - "snippet": { - "text": "getReflectPercent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1803, - "startColumn": 1, - "charOffset": 53943, - "charLength": 171, - "snippet": { - "text": "}\r\n\r\nint32_t Creature::getReflectPercent(CombatType_t combatType, bool useCharges /*= false*/) const {\r\n\ttry {\r\n\t\treturn reflectPercent.at(combatTypeToIndex(combatType));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3a7b906cd85e8d43", - "equalIndicator/v1": "e1eea4e776f500c73b4cebf1313a54adcdffa9c40d7c09ba6f448a3ef188b6ed" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '_SECURE_SCL', which is a reserved identifier", - "markdown": "Declaration uses identifier '_SECURE_SCL', which is a reserved identifier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/definitions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 35, - "startColumn": 12, - "charOffset": 857, - "charLength": 11, - "snippet": { - "text": "_SECURE_SCL" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 33, - "startColumn": 1, - "charOffset": 811, - "charLength": 107, - "snippet": { - "text": "\t#ifdef _MSC_VER\r\n\t\t#ifdef NDEBUG\r\n\t\t\t#define _SECURE_SCL 0\r\n\t\t\t#define HAS_ITERATOR_DEBUGGING 0\r\n\t\t#endif\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c9f91aed9cf278db", - "equalIndicator/v1": "e20da032e950b6cee85c8ec9d821c1bf79822aab633b7e12635fdadbd6d662a2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/scheduling/dispatcher.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 107, - "startColumn": 7, - "charOffset": 2725, - "charLength": 12, - "snippet": { - "text": "uint_fast8_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 105, - "startColumn": 1, - "charOffset": 2655, - "charLength": 248, - "snippet": { - "text": "\r\nvoid Dispatcher::executeEvents(const TaskGroup startGroup) {\r\n\tfor (uint_fast8_t groupId = static_cast(startGroup); groupId < static_cast(TaskGroup::Last); ++groupId) {\r\n\t\tauto &tasks = m_tasks[groupId];\r\n\t\tif (tasks.empty()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8ba5383c3c4f6556", - "equalIndicator/v1": "e2695e90c9fa6de341bf6287efcaaf712e44a2fba79ceeb70a1b8f86baed9d85" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'party' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 244, - "startColumn": 45, - "charOffset": 9013, - "charLength": 5, - "snippet": { - "text": "party" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 242, - "startColumn": 1, - "charOffset": 8914, - "charLength": 161, - "snippet": { - "text": "\tgetScriptInterface()->pushFunction(getScriptId());\r\n\r\n\tLuaScriptInterface::pushUserdata(L, party);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Party\");\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b7289bb1e4c119d9", - "equalIndicator/v1": "e26fa325e877eb39ace9852b05c3422046baa8bb0dd001cb15d46fff34b419e8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1147, - "startColumn": 53, - "charOffset": 46929, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1145, - "startColumn": 1, - "charOffset": 46872, - "charLength": 192, - "snippet": { - "text": "}\r\n\r\nbool Game::removeCreature(std::shared_ptr creature, bool isLogout /* = true*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!creature || creature->isRemoved()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f04c8ccf06d29181", - "equalIndicator/v1": "e299d0718b582e3aa0941f59ed8072ebaf80b02ed70bd994039159f8dfd44f03" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')", - "markdown": "Narrowing conversion from 'float' to 'uint32_t' (aka 'unsigned int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/vocations/vocation.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 88, - "startColumn": 10, - "charOffset": 2227, - "charLength": 11, - "snippet": { - "text": "attackSpeed" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 86, - "startColumn": 1, - "charOffset": 2180, - "charLength": 128, - "snippet": { - "text": "\r\n\tuint32_t getAttackSpeed() const {\r\n\t\treturn attackSpeed / g_configManager().getFloat(RATE_ATTACK_SPEED, __FUNCTION__);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bc53ff9fbd662b97", - "equalIndicator/v1": "e2a0de878dc7ce1a94bed7fad679d17eaf312cede657001a6276cfa5cc39e7ba" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 463, - "startColumn": 65, - "charOffset": 17455, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 461, - "startColumn": 1, - "charOffset": 17386, - "charLength": 218, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::playerOnRemoveCount(std::shared_ptr player, std::shared_ptr item) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnMove - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "835d7b50afdde077", - "equalIndicator/v1": "e2a1a3a655cd745a631b9ee1a696702a3697daab072e2b4e213cafe992ed839b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/depot/depotlocker.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 39, - "startColumn": 7, - "charOffset": 1339, - "charLength": 22, - "snippet": { - "text": "postRemoveNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 37, - "startColumn": 1, - "charOffset": 1178, - "charLength": 348, - "snippet": { - "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r\n\tbool canRemove() const override {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6d01b7d1d46d4201", - "equalIndicator/v1": "e2d55d3f325661b0843e7210f59be7b5b6e6e8fdf409c305afef5acbaaeac771" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/scripts/script_environment.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 144, - "startColumn": 59, - "charOffset": 3712, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 142, - "startColumn": 1, - "charOffset": 3649, - "charLength": 107, - "snippet": { - "text": "}\r\n\r\nvoid ScriptEnvironment::addTempItem(std::shared_ptr item) {\r\n\ttempItems.emplace(this, item);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2c5e4c833785813c", - "equalIndicator/v1": "e2dc0a90e02f761b863d952276e509ca47e931226f101472d5d8c21078a69cab" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 354, - "startColumn": 20, - "charOffset": 8862, - "charLength": 9, - "snippet": { - "text": "stackSize" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 352, - "startColumn": 1, - "charOffset": 8774, - "charLength": 115, - "snippet": { - "text": "\r\n\tuint64_t stackSize = static_cast(itemType->stackSize);\r\n\tlua_pushnumber(L, stackSize);\r\n\treturn 1;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c3cd2d7db8963c4c", - "equalIndicator/v1": "e2fd85ac86541ae97bf2a500b3a2aa2a6abcbee4023e6db98d098fcfb3396ff5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1055, - "startColumn": 12, - "charOffset": 30303, - "charLength": 7, - "snippet": { - "text": "tolower" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1053, - "startColumn": 1, - "charOffset": 30286, - "charLength": 88, - "snippet": { - "text": "\t}\r\n\r\n\tchar ch = tolower(str.front());\r\n\treturn ch != 'f' && ch != 'n' && ch != '0';\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0e3393ccd19a354a", - "equalIndicator/v1": "e314fc671b8566cedb157f0293b81a586a5fff03a6bc1bcabfeb5bb6ffe2ca85" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'hwnd' declared with a const-qualified typedef; results in the type being 'HWND__ *const' instead of 'const HWND__ *'", - "markdown": "'hwnd' declared with a const-qualified typedef; results in the type being 'HWND__ \\*const' instead of 'const HWND__ \\*'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/canary_server.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 228, - "startColumn": 13, - "charOffset": 7806, - "charLength": 4, - "snippet": { - "text": "hwnd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 226, - "startColumn": 1, - "charOffset": 7728, - "charLength": 201, - "snippet": { - "text": "void CanaryServer::toggleForceCloseButton() {\r\n#ifdef OS_WINDOWS\r\n\tconst HWND hwnd = GetConsoleWindow();\r\n\tconst HMENU hmenu = GetSystemMenu(hwnd, FALSE);\r\n\tEnableMenuItem(hmenu, SC_CLOSE, MF_GRAYED);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "92620f7d7ad17802", - "equalIndicator/v1": "e32c96e1298c759c9b52355cef044486a5ebe378046bb707f4b8fee420cd90d8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'fromProto' is within a recursive call chain", - "markdown": "Function 'fromProto' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/value_wrapper_proto.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 78, - "startColumn": 33, - "charOffset": 2681, - "charLength": 9, - "snippet": { - "text": "fromProto" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 76, - "startColumn": 1, - "charOffset": 2644, - "charLength": 181, - "snippet": { - "text": "}\r\n\r\nValueWrapper ProtoSerializable::fromProto(const Canary::protobuf::kv::ValueWrapper &protoValue, uint64_t timestamp) {\r\n\tValueVariant data;\r\n\tswitch (protoValue.value_case()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b0eccdf4f7bf4094", - "equalIndicator/v1": "e34012941ea5bec08309a00f01688bf255d500100bdc56f4eb51833f1f657879" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 993, - "startColumn": 7, - "charOffset": 35834, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 991, - "startColumn": 1, - "charOffset": 35822, - "charLength": 153, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnTradeAccept - \"\r\n\t\t \"Player {} target {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "09c1014765ced971", - "equalIndicator/v1": "e34ee90e452e5dcda165a4ed63369dac5768eb679fabf306f5bd4e98125283ad" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 946, - "startColumn": 2, - "charOffset": 28802, - "charLength": 59, - "snippet": { - "text": "lua_createtable(L, monsterType->info.voiceVector.size(), 0)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 944, - "startColumn": 1, - "charOffset": 28782, - "charLength": 175, - "snippet": { - "text": "\r\n\tint index = 0;\r\n\tlua_createtable(L, monsterType->info.voiceVector.size(), 0);\r\n\tfor (const auto &voiceBlock : monsterType->info.voiceVector) {\r\n\t\tlua_createtable(L, 0, 2);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "62a80c7a8b6526c8", - "equalIndicator/v1": "e359a14b6d18b0768a2134ea25960ed1544f197df1c2b929c4fd61e56f5c199c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 322, - "startColumn": 7, - "charOffset": 10172, - "charLength": 10, - "snippet": { - "text": "isPushable" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 320, - "startColumn": 1, - "charOffset": 10094, - "charLength": 135, - "snippet": { - "text": "\tvirtual void serializeAttr(PropWriteStream &propWriteStream) const;\r\n\r\n\tbool isPushable() override final {\r\n\t\treturn isMovable();\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "123b21db7669c97b", - "equalIndicator/v1": "e36b2c910b9cc1de1c8afd60407666b9ba55d0b554401f35919497ff24a2b21f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 9782, - "startColumn": 49, - "charOffset": 342468, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 9780, - "startColumn": 1, - "charOffset": 342415, - "charLength": 182, - "snippet": { - "text": "}\r\n\r\nvoid Game::removePlayer(std::shared_ptr player) {\r\n\tconst std::string &lowercase_name = asLowerCaseString(player->getName());\r\n\tmappedPlayerNames.erase(lowercase_name);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1cffaf8a50352c7d", - "equalIndicator/v1": "e36e1cea3e530d99c45f15693aa4ab0d51b55535e93b1c13a0c78faf34b96bb1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'std::basic_string::value_type' (aka 'char') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1302, - "startColumn": 22, - "charOffset": 36596, - "charLength": 7, - "snippet": { - "text": "toupper" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1300, - "startColumn": 1, - "charOffset": 36421, - "charLength": 278, - "snippet": { - "text": "\t\t\t\t\tss << std::showpos << it.abilities->specializedMagicLevel[i] << std::noshowpos;\r\n\t\t\t\t\tstd::string combatName = getCombatName(indexToCombatType(i));\r\n\t\t\t\t\tcombatName[0] = toupper(combatName[0]);\r\n\t\t\t\t\tdescriptions.emplace_back(combatName + \" Magic Level\", ss.str());\r\n\t\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5938b5245335c311", - "equalIndicator/v1": "e37724ade5c94afb7bd5ca713441aab0aa57342cd704bfabb93bab7d9b9b05f8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The variable 'item' is copy-constructed from a const reference but is only used as const reference; consider making it a const reference", - "markdown": "The variable 'item' is copy-constructed from a const reference but is only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 323, - "startColumn": 7, - "charOffset": 9581, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 321, - "startColumn": 1, - "charOffset": 9569, - "charLength": 106, - "snippet": { - "text": "\t}\r\n\r\n\tauto item = filteredItems[index];\r\n\r\n\tauto it = std::find(itemlist.begin(), itemlist.end(), item);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0b62891b22958842", - "equalIndicator/v1": "e3afb1940246b798ef9628a8f627147ea2bcd15e0e2b218547ed0aacc4dd112f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 437, - "startColumn": 91, - "charOffset": 13119, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 435, - "startColumn": 1, - "charOffset": 13024, - "charLength": 221, - "snippet": { - "text": "}\r\n\r\nuint32_t MoveEvent::StepInField(std::shared_ptr creature, std::shared_ptr item, const Position &) {\r\n\tif (creature == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::StepInField] - Creature is nullptr\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fd3c7b3ddce02440", - "equalIndicator/v1": "e3b3ac28d4e0e38ec42698ecb6eeeef0f78f6ab44589a1011b425340a4c06a71" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 167, - "startColumn": 27, - "charOffset": 6261, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 165, - "startColumn": 1, - "charOffset": 6229, - "charLength": 125, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.monsterOnSpawn, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a337aea61fab8c6f", - "equalIndicator/v1": "e401d2c4c1fed85b6166188c179a40556ce8b38e0361912863e0f7aec1f70272" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'operator int' must be marked explicit to avoid unintentional implicit conversions", - "markdown": "'operator int' must be marked explicit to avoid unintentional implicit conversions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/value_wrapper.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 108, - "startColumn": 27, - "charOffset": 3219, - "charLength": 3, - "snippet": { - "text": "int" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 106, - "startColumn": 1, - "charOffset": 3187, - "charLength": 76, - "snippet": { - "text": "\t}\r\n\r\n\texplicit(false) operator int() const {\r\n\t\treturn get();\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7a4edd0d5bd8c7be", - "equalIndicator/v1": "e404897ce6014414b8c4bb257bb7b586ccef4077b601787fa23b5d9b1f7c404c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'container' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1051, - "startColumn": 114, - "charOffset": 30499, - "charLength": 9, - "snippet": { - "text": "container" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1049, - "startColumn": 1, - "charOffset": 30381, - "charLength": 352, - "snippet": { - "text": "}\r\n\r\nstd::shared_ptr Player::refreshManagedContainer(ObjectCategory_t category, std::shared_ptr container, bool isLootContainer, bool loading /* = false*/) {\r\n\tstd::shared_ptr previousContainer = nullptr;\r\n\tauto toSetAttribute = isLootContainer ? ItemAttribute_t::QUICKLOOTCONTAINER : ItemAttribute_t::OBTAINCONTAINER;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "990b7b0c9d845e20", - "equalIndicator/v1": "e404bae48fae92613a9784afa2f85fbaeb848c1b1910ae20388d7728a20f73ba" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when declaring iterators", - "markdown": "Use auto when declaring iterators" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/modules/modules.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 71, - "startColumn": 2, - "charOffset": 1957, - "charLength": 21, - "snippet": { - "text": "ModulesList::iterator" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 69, - "startColumn": 1, - "charOffset": 1885, - "charLength": 204, - "snippet": { - "text": "\r\nModule* Modules::getEventByRecvbyte(uint8_t recvbyte, bool force) {\r\n\tModulesList::iterator it = recvbyteList.find(recvbyte);\r\n\tif (it != recvbyteList.end()) {\r\n\t\tif (!force || it->second.isLoaded()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d24728e765a97d0f", - "equalIndicator/v1": "e404d89ce20f5acb6e56d7a0212174cd863314b48539f7799112ffc34708eda6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'float'", - "markdown": "Narrowing conversion from 'double' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/io_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 770, - "startColumn": 26, - "charOffset": 35482, - "charLength": 19, - "snippet": { - "text": "MITIGATION_INCREASE" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 768, - "startColumn": 1, - "charOffset": 35267, - "charLength": 378, - "snippet": { - "text": "// SLOT_BLUE_MIDDLE_100 = 26\r\nvoid IOWheel::slotBlueMiddle100(const std::shared_ptr &player, uint16_t points, uint8_t vocationCipId, PlayerWheelMethodsBonusData &bonusData) const {\r\n\tbonusData.mitigation += MITIGATION_INCREASE * points;\r\n\tif (isKnight(vocationCipId)) {\r\n\t\taddSpell(player, bonusData, WheelSlots_t::SLOT_BLUE_MIDDLE_100, points, \"Chivalrous Challenge\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5f7c3441927807d4", - "equalIndicator/v1": "e4213df1cb6d8018bcb85d411e17a58241842cc2224119ddd78a98963814ef5e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 110, - "startColumn": 28, - "charOffset": 3197, - "charLength": 32, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 108, - "startColumn": 1, - "charOffset": 3071, - "charLength": 321, - "snippet": { - "text": "\tstd::shared_ptr getEvent(const std::shared_ptr &item, MoveEvent_t eventType);\r\n\r\n\tbool registerLuaItemEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaActionEvent(const std::shared_ptr moveEvent);\r\n\tbool registerLuaUniqueEvent(const std::shared_ptr moveEvent);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "61cf037f48722fa0", - "equalIndicator/v1": "e44029dfc0c569b4560a7f044ad353967c84400e5b017b75dfa05050c15df1a2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1080, - "startColumn": 27, - "charOffset": 38822, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1078, - "startColumn": 1, - "charOffset": 38790, - "charLength": 133, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnLoseExperience, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a1d1a5defa1a3d73", - "equalIndicator/v1": "e44be812b943453d8bebe2778fa5b71f6f7f139fe06c958cd2c6487c6a353acf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Pass by value and use std::move", - "markdown": "Pass by value and use std::move" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 88, - "startColumn": 29, - "charOffset": 2415, - "charLength": 22, - "snippet": { - "text": "std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 86, - "startColumn": 1, - "charOffset": 2286, - "charLength": 198, - "snippet": { - "text": "\tstatic std::shared_ptr createHouseTransferItem(std::shared_ptr house);\r\n\r\n\texplicit HouseTransferItem(std::shared_ptr newHouse) :\r\n\t\tItem(0), house(newHouse) { }\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d1aaa68693c301e0", - "equalIndicator/v1": "e4594ffced5c8ab0d262ba5eaeaf64a45c33e9883029b8b6e8c4eab01974ae47" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 701, - "startColumn": 100, - "charOffset": 21245, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 699, - "startColumn": 1, - "charOffset": 21141, - "charLength": 211, - "snippet": { - "text": "}\r\n\r\nuint32_t MoveEvent::fireStepEvent(const std::shared_ptr &creature, std::shared_ptr item, const Position &pos) const {\r\n\tif (isLoadedCallback()) {\r\n\t\treturn executeStep(creature, item, pos);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "022e5d26dc184835", - "equalIndicator/v1": "e46c6823fdebd5b064123fb9548bb0d74f68675b9db699ea9adae869b8d72f64" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 780, - "startColumn": 20, - "charOffset": 23761, - "charLength": 10, - "snippet": { - "text": "-oldWeight" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 778, - "startColumn": 1, - "charOffset": 23661, - "charLength": 163, - "snippet": { - "text": "\t\tconst int32_t oldWeight = item->getWeight();\r\n\t\titem->setItemCount(newCount);\r\n\t\tupdateItemWeight(-oldWeight + item->getWeight());\r\n\r\n\t\t// send change to client\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5cd27242d1efff9f", - "equalIndicator/v1": "e4735d534314f91d77575206e84e639b9374a4a7137bcee4ce10d6a0c14d28dd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/depot/depotlocker.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 31, - "startColumn": 19, - "charOffset": 1012, - "charLength": 19, - "snippet": { - "text": "postAddNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 29, - "startColumn": 1, - "charOffset": 989, - "charLength": 204, - "snippet": { - "text": "}\r\n\r\nvoid DepotLocker::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tauto parentLocked = m_parent.lock();\r\n\tif (parentLocked) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "99294fbd93c6d491", - "equalIndicator/v1": "e479a761b1a0d0b1fa05c64501754d0803267bfd2546805922e0ceaa2deb9808" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'wheelSpell' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'wheelSpell' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 27, - "startColumn": 94, - "charOffset": 1037, - "charLength": 10, - "snippet": { - "text": "wheelSpell" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 25, - "startColumn": 1, - "charOffset": 895, - "charLength": 220, - "snippet": { - "text": "#include \"lua/callbacks/events_callbacks.hpp\"\r\n\r\nint32_t Combat::getLevelFormula(std::shared_ptr player, const std::shared_ptr wheelSpell, const CombatDamage &damage) const {\r\n\tif (!player) {\r\n\t\treturn 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3c0bc71555e31c0b", - "equalIndicator/v1": "e480f7e1b08bf99a7ef0f96838991baa5d68b89a57b7f54cb3dab2849e15869b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iologindata.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 97, - "startColumn": 20, - "charOffset": 3507, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 95, - "startColumn": 1, - "charOffset": 3402, - "charLength": 170, - "snippet": { - "text": "\tstd::ostringstream query;\r\n\tquery << \"SELECT * FROM `players` WHERE `id` = \" << id;\r\n\treturn loadPlayer(player, db.storeQuery(query.str()), disableIrrelevantInfo);\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bcbb668dab7bc4c0", - "equalIndicator/v1": "e4a82558c3ae8fb83edbb5589e2e8ebf5b50fa66d22b9a6ae31a2849aa18737c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 81, - "startColumn": 41, - "charOffset": 2789, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 79, - "startColumn": 1, - "charOffset": 2743, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "831accab21375d01", - "equalIndicator/v1": "e4d1c2d299d600631c3acf4ec1a92dde9dc2f3b13b4c973ed11e4841b55dd50e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2640, - "startColumn": 21, - "charOffset": 78212, - "charLength": 8, - "snippet": { - "text": "blockHit" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2638, - "startColumn": 1, - "charOffset": 78187, - "charLength": 328, - "snippet": { - "text": "}\r\n\r\nBlockType_t Player::blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense /* = false*/, bool checkArmor /* = false*/, bool field /* = false*/) {\r\n\tBlockType_t blockType = Creature::blockHit(attacker, combatType, damage, checkDefense, checkArmor, field);\r\n\tif (attacker) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "46107df59e96d8a4", - "equalIndicator/v1": "e50347e87e9ec6f47ce02e1455558de9ea0f70e945eaa47b0b54de1a3d5e581d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'getUnlockedRunesBit' can be made const", - "markdown": "Method 'getUnlockedRunesBit' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1958, - "startColumn": 10, - "charOffset": 57704, - "charLength": 19, - "snippet": { - "text": "getUnlockedRunesBit" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1956, - "startColumn": 1, - "charOffset": 57664, - "charLength": 96, - "snippet": { - "text": "\t\tUnlockedRunesBit = bit;\r\n\t}\r\n\tint32_t getUnlockedRunesBit() {\r\n\t\treturn UnlockedRunesBit;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f5ef080c5e579feb", - "equalIndicator/v1": "e512b77a2068cb6a4194e932e9a8f65857ae1ca223f76975ed144a2cebce2b2c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1362, - "startColumn": 28, - "charOffset": 40933, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1360, - "startColumn": 1, - "charOffset": 40803, - "charLength": 160, - "snippet": { - "text": "\tvoid sendChangeSpeed(std::shared_ptr creature, uint16_t newSpeed) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendChangeSpeed(creature, newSpeed);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "47e722ecc620e026", - "equalIndicator/v1": "e5259af6ef785317f40b46903f13701bb2667cfd6aac0f7eb1fc22d8aee0db91" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2530, - "startColumn": 37, - "charOffset": 75470, - "charLength": 9, - "snippet": { - "text": "healthMax" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2528, - "startColumn": 1, - "charOffset": 75302, - "charLength": 359, - "snippet": { - "text": "\t\tif (vocation->getId() != VOCATION_NONE && level <= 8) {\r\n\t\t\tconst auto &noneVocation = g_vocations().getVocation(VOCATION_NONE);\r\n\t\t\thealthMax = std::max(0, healthMax - noneVocation->getHPGain());\r\n\t\t\tmanaMax = std::max(0, manaMax - noneVocation->getManaGain());\r\n\t\t\tcapacity = std::max(0, capacity - noneVocation->getCapGain());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4ac7d80b1211f0f4", - "equalIndicator/v1": "e549b35447f338624848941b07a7232ae68ee4eb5fef96af059a8b750b4458d9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/grouping/party.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 606, - "startColumn": 109, - "charOffset": 17716, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 604, - "startColumn": 1, - "charOffset": 17312, - "charLength": 503, - "snippet": { - "text": "\t\tmember->sendPartyCreatureHealth(player, std::ceil((static_cast(player->getHealth()) / std::max(player->getMaxHealth(), 1)) * 100));\r\n\t\tplayer->sendPartyPlayerMana(member, std::ceil((static_cast(member->getMana()) / std::max(member->getMaxMana(), 1)) * 100));\r\n\t\tmember->sendPartyPlayerMana(player, std::ceil((static_cast(player->getMana()) / std::max(player->getMaxMana(), 1)) * 100));\r\n\t} else {\r\n\t\tfor (const auto &summon : player->getSummons()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "98cdb8ded16d5ba8", - "equalIndicator/v1": "e58bc7d7db464fcda82c62782e84b4c3b73797f50d7d3d6a6a62c4966d155d37" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions", - "markdown": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/value_wrapper.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 40, - "startColumn": 18, - "charOffset": 1353, - "charLength": 12, - "snippet": { - "text": "ValueWrapper" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 38, - "startColumn": 1, - "charOffset": 1201, - "charLength": 462, - "snippet": { - "text": "\texplicit(false) ValueWrapper(bool value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(int value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(double value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const phmap::flat_hash_map &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const std::initializer_list> &init_list, uint64_t timestamp = 0);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4546bd76d05fbb98", - "equalIndicator/v1": "e5927ecda707d957591f42ab1dd04a8f973a21736f71750d819cd772eab08ccc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'npc' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'npc' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1130, - "startColumn": 43, - "charOffset": 42995, - "charLength": 3, - "snippet": { - "text": "npc" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1128, - "startColumn": 1, - "charOffset": 42898, - "charLength": 202, - "snippet": { - "text": "\tgetScriptInterface()->pushFunction(getScriptId());\r\n\r\n\tLuaScriptInterface::pushUserdata(L, npc);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Npc\");\r\n\tLuaScriptInterface::pushPosition(L, position);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "631029885e313dbb", - "equalIndicator/v1": "e59e46f496a2afafda22982f206f7682e35f9880821e6b3ec418c8fe19bad8dc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/creature_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 840, - "startColumn": 2, - "charOffset": 23371, - "charLength": 12, - "snippet": { - "text": "SpeakClasses" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 838, - "startColumn": 1, - "charOffset": 23328, - "charLength": 235, - "snippet": { - "text": "\tbool ghost = getBoolean(L, 4, false);\r\n\r\n\tSpeakClasses type = getNumber(L, 3, TALKTYPE_MONSTER_SAY);\r\n\tconst std::string &text = getString(L, 2);\r\n\tstd::shared_ptr creature = getUserdataShared(L, 1);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1c52ff89ee9d7805", - "equalIndicator/v1": "e5ad9b8fe8872e3ecfb8659f4191c4e96b2e78d469780ccd67ffd5e65bee49e0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 579, - "startColumn": 13, - "charOffset": 27421, - "charLength": 13, - "snippet": { - "text": "absorbPercent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 577, - "startColumn": 1, - "charOffset": 27260, - "charLength": 406, - "snippet": { - "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_ICEDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_HOLYDAMAGE)] += value;\r\n\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += value;\r\n\t} else if (stringValue == \"absorbpercentenergy\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b7babbdd57eab56f", - "equalIndicator/v1": "e5bcc3b8f59aa00d8d103663dd5ee4f7a00bb53f803232c60d23c650514247f7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1167, - "startColumn": 59, - "charOffset": 34389, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1165, - "startColumn": 1, - "charOffset": 34322, - "charLength": 136, - "snippet": { - "text": "\t\t}\r\n\t}\r\n\tvoid sendCreatureChangeVisible(std::shared_ptr creature, bool visible) {\r\n\t\tif (!client || !creature) {\r\n\t\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0fd7a82aed2ed982", - "equalIndicator/v1": "e5c84840f8e52c9595b78798108b4d2a9f2023174e2a5f8c2f196c67d7ef79b4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/player_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 753, - "startColumn": 22, - "charOffset": 20498, - "charLength": 24, - "snippet": { - "text": "luaPlayerGetStashCounter" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 751, - "startColumn": 1, - "charOffset": 20472, - "charLength": 163, - "snippet": { - "text": "}\r\n\r\nint PlayerFunctions::luaPlayerGetStashCounter(lua_State* L) {\r\n\t// player:getStashCount()\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4734564b8868009f", - "equalIndicator/v1": "e5d16336ec9619d1354ca6858202a5118bb4c56d68e78f280aab9f6599c36dee" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/ioprey.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 249, - "startColumn": 55, - "charOffset": 7059, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 247, - "startColumn": 1, - "charOffset": 6968, - "charLength": 151, - "snippet": { - "text": "\r\n// Prey/Task hunting global class\r\nvoid IOPrey::checkPlayerPreys(std::shared_ptr player, uint8_t amount) const {\r\n\tif (!player) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2bdae2a2b4ee083d", - "equalIndicator/v1": "e5dd9a5dbb5ecab954b8931a24b2376a2fc17b68a4827b643c81c4508510708f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2236, - "startColumn": 25, - "charOffset": 65770, - "charLength": 8, - "snippet": { - "text": "interval" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2234, - "startColumn": 1, - "charOffset": 65740, - "charLength": 128, - "snippet": { - "text": "\t}\r\n\r\n\taddOfflineTrainingTime(interval);\r\n\tif (lastStatsTrainingTime != getOfflineTrainingTime() / 60 / 1000) {\r\n\t\tsendStats();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d3571f9c0ddaf0d4", - "equalIndicator/v1": "e5e1ffc17df65fc3d662fbe72be541a056b997b7480f64b98e89c5f07b90489d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned int' to 'float'", - "markdown": "Narrowing conversion from 'unsigned int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 725, - "startColumn": 37, - "charOffset": 23592, - "charLength": 18, - "snippet": { - "text": "std::min" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 723, - "startColumn": 1, - "charOffset": 23530, - "charLength": 133, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 90) * 1.10f) + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "087494f2cbe97d5f", - "equalIndicator/v1": "e60e81809f3fd506031ac77482c2fe5f13e0cc6909dcac0b6ec2d7792023de29" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 160, - "startColumn": 25, - "charOffset": 5341, - "charLength": 8, - "snippet": { - "text": "getThing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 158, - "startColumn": 1, - "charOffset": 5114, - "charLength": 321, - "snippet": { - "text": "\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::map &getAllItemTypeCount(std::map &countMap) const override final;\r\n\tstd::shared_ptr getThing(size_t index) const override final;\r\n\r\n\tItemVector getItems(bool recursive = false);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "705d4b268343892d", - "equalIndicator/v1": "e650c9d45f96dc1db2222527fab3e901d3ecdc80198fdc66bc8d474e777f3f8b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2675, - "startColumn": 17, - "charOffset": 79528, - "charLength": 10, - "snippet": { - "text": "std::round" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2673, - "startColumn": 1, - "charOffset": 79368, - "charLength": 303, - "snippet": { - "text": "\t\t\t\t\tconst int16_t &fieldAbsorbPercent = it.abilities->fieldAbsorbPercent[combatTypeToIndex(combatType)];\r\n\t\t\t\t\tif (fieldAbsorbPercent != 0) {\r\n\t\t\t\t\t\tdamage -= std::round(damage * (fieldAbsorbPercent / 100.));\r\n\t\t\t\t\t\tif (charges != 0) {\r\n\t\t\t\t\t\t\tg_game().transformItem(item, item->getID(), charges - 1);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "61e3c68f72489b0e", - "equalIndicator/v1": "e658c9f020e14e7d779d60ea28f954729c6da50ed9a738f1acc702c7753777f2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use emplace_back instead of push_back", - "markdown": "Use emplace_back instead of push_back" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6464, - "startColumn": 12, - "charOffset": 189168, - "charLength": 9, - "snippet": { - "text": "push_back" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6462, - "startColumn": 1, - "charOffset": 188987, - "charLength": 278, - "snippet": { - "text": "void sendStowItems(const std::shared_ptr &item, const std::shared_ptr &stowItem, StashContainerList &itemDict) {\r\n\tif (stowItem->getID() == item->getID()) {\r\n\t\titemDict.push_back(std::pair, uint32_t>(stowItem, stowItem->getItemCount()));\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7f2d2b32d994a4bc", - "equalIndicator/v1": "e65d8ad4d4ba28d171b45b704f3a033fcd36d510ed5221c90c76b31c4d6926da" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 722, - "startColumn": 15, - "charOffset": 23463, - "charLength": 11, - "snippet": { - "text": "static_cast" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 720, - "startColumn": 1, - "charOffset": 23423, - "charLength": 132, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 87) * 1.20f) - 4;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7adc5c11bc8c9178", - "equalIndicator/v1": "e6778dae0b3b9c22ce25e9b2bcf14ce49cd90f1ffb55f65dd7eacc722f4d3d6a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6181, - "startColumn": 62, - "charOffset": 196442, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6179, - "startColumn": 1, - "charOffset": 196376, - "charLength": 137, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendChangeSpeed(std::shared_ptr creature, uint16_t speed) {\r\n\tNetworkMessage msg;\r\n\tmsg.addByte(0x8F);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "88d76933cd3d6ce4", - "equalIndicator/v1": "e68fa702bc1e5d637c644ca487e9a073e8aa1c9a12190c22c591000801c09be6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2246, - "startColumn": 19, - "charOffset": 85869, - "charLength": 1, - "snippet": { - "text": "m" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2244, - "startColumn": 1, - "charOffset": 85768, - "charLength": 169, - "snippet": { - "text": "\t\ttoCylinder->updateThing(toItem, toItem->getID(), toItem->getItemCount() + n);\r\n\r\n\t\tint32_t count = m - n;\r\n\t\tif (count > 0) {\r\n\t\t\tif (item->getItemCount() != count) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "985312d2ba4f37e5", - "equalIndicator/v1": "e6be114f6e262a58c3757d196102017215853786d30dbb2b8ed1a2d218f92ad9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'member' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'member' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/grouping/party.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 591, - "startColumn": 86, - "charOffset": 16450, - "charLength": 6, - "snippet": { - "text": "member" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 589, - "startColumn": 1, - "charOffset": 16360, - "charLength": 235, - "snippet": { - "text": "}\r\n\r\nvoid Party::showPlayerStatus(std::shared_ptr player, std::shared_ptr member, bool showStatus) {\r\n\tplayer->sendPartyCreatureShowStatus(member, showStatus);\r\n\tmember->sendPartyCreatureShowStatus(player, showStatus);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "75d51c1f0a57d2e4", - "equalIndicator/v1": "e6d0fddcc9e924580a77c1add2446a726f3af458f7e3830e0913c64d587fae92" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 929, - "startColumn": 25, - "charOffset": 30289, - "charLength": 6, - "snippet": { - "text": "damage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 927, - "startColumn": 1, - "charOffset": 30195, - "charLength": 162, - "snippet": { - "text": "\t\tint32_t value = getAbsorbPercent(combatType);\r\n\t\tif (value != 0) {\r\n\t\t\tdamage -= std::round(damage * value / 100.f);\r\n\t\t}\r\n\t\tvalue = getAbsorbFlat(combatType);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "587f071a61e10ee6", - "equalIndicator/v1": "e6f62cb753ba69d907586486eb7ce962fa27a5589cd926ec8d7ea184052f9b60" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'registerWheelSpellTable' is within a recursive call chain", - "markdown": "Function 'registerWheelSpellTable' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/io_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 53, - "startColumn": 7, - "charOffset": 2151, - "charLength": 23, - "snippet": { - "text": "registerWheelSpellTable" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 51, - "startColumn": 1, - "charOffset": 2115, - "charLength": 239, - "snippet": { - "text": "\t */\r\n\ttemplate \r\n\tvoid registerWheelSpellTable(const T &spellData, const std::string &name, WheelSpellGrade_t gradeType) {\r\n\t\tif (name == \"Any_Focus_Mage_Spell\") {\r\n\t\t\tfor (const std::string &focusSpellName : m_focusSpells) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "59f58a383226b809", - "equalIndicator/v1": "e73ecdb50f6532e2d2b769df5c838ed1136960435344fb5fe7c7b6b746703298" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use range-based for loop instead", - "markdown": "Use range-based for loop instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 171, - "startColumn": 3, - "charOffset": 4468, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 169, - "startColumn": 1, - "charOffset": 4411, - "charLength": 199, - "snippet": { - "text": "\r\n\tif (const TileItemVector* items = getItemList()) {\r\n\t\tfor (auto it = items->rbegin(), end = items->rend(); it != end; ++it) {\r\n\t\t\tif ((*it)->getMagicField()) {\r\n\t\t\t\treturn (*it)->getMagicField();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fddde8ed3284647b", - "equalIndicator/v1": "e74007ccac1695b8fb378d7e82f456f0204e66176df2bf3ccfc2aaec451db456" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 844, - "startColumn": 27, - "charOffset": 27188, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 842, - "startColumn": 1, - "charOffset": 27156, - "charLength": 129, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\r\n\tenv->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7df1f1d5a6c9f04f", - "equalIndicator/v1": "e74904d766bb504a85a2a135bcc7a76660feb921bc967648e680ef7721f6d619" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 10184, - "startColumn": 7, - "charOffset": 354405, - "charLength": 25, - "snippet": { - "text": "auto [monsterId, monster]" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 10182, - "startColumn": 1, - "charOffset": 354330, - "charLength": 180, - "snippet": { - "text": "void Game::updateForgeableMonsters() {\r\n\tforgeableMonsters.clear();\r\n\tfor (auto [monsterId, monster] : monsters) {\r\n\t\tauto monsterTile = monster->getTile();\r\n\t\tif (!monsterTile) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "81bdae38b5526989", - "equalIndicator/v1": "e7592ee1cae62ea2f1111636ae3495f0c298d37ee353682fea21c842409663b1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Initializer-list constructor should not be declared explicit", - "markdown": "Initializer-list constructor should not be declared explicit" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/arraylist.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 30, - "startColumn": 12, - "charOffset": 850, - "charLength": 9, - "snippet": { - "text": "arraylist" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 28, - "startColumn": 1, - "charOffset": 832, - "charLength": 102, - "snippet": { - "text": "\t\t}\r\n\r\n\t\texplicit arraylist(std::initializer_list _Ilist) {\r\n\t\t\tbackContainer.assign(_Ilist);\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bb06eaf1874f6fbf", - "equalIndicator/v1": "e787685f6f4014b0897a1aa1429f516024e26a7067548aff1a8c86ca5adac934" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1610, - "startColumn": 19, - "charOffset": 47933, - "charLength": 3, - "snippet": { - "text": "str" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1608, - "startColumn": 1, - "charOffset": 47909, - "charLength": 98, - "snippet": { - "text": "\t}\r\n\r\n\tfor (std::string str : toks) {\r\n\t\tif (str.length() < 2) {\r\n\t\t\treturn INVALID_TOKEN_LENGTH;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ccd24c604704ff28", - "equalIndicator/v1": "e79319300de51772fdf2fb362ebf683944f5a1af0e53ec977c04ac165b357ce9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 177, - "startColumn": 105, - "charOffset": 6338, - "charLength": 8, - "snippet": { - "text": "attacker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 175, - "startColumn": 1, - "charOffset": 6229, - "charLength": 403, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::creatureOnDrainHealth(std::shared_ptr creature, std::shared_ptr attacker, CombatType_t &typePrimary, int32_t &damagePrimary, CombatType_t &typeSecondary, int32_t &damageSecondary, TextColor_t &colorPrimary, TextColor_t &colorSecondary) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::creatureOnDrainHealth - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0805ceaf739a5254", - "equalIndicator/v1": "e7954e7b9e024b39400bffb705f1298ca029da0fa52b55f87762ec165b6dea3a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'creature' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1200, - "startColumn": 30, - "charOffset": 35328, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1198, - "startColumn": 1, - "charOffset": 35219, - "charLength": 129, - "snippet": { - "text": "\tvoid sendCreatureLight(std::shared_ptr creature) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendCreatureLight(creature);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fb573f8211bb8fbb", - "equalIndicator/v1": "e7ae4493ae6ab9d1d79f01be2034d1987fe6d3c35f8ea54d0baa1103f6a98397" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 794, - "startColumn": 6, - "charOffset": 30458, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 792, - "startColumn": 1, - "charOffset": 30425, - "charLength": 176, - "snippet": { - "text": "\tlua_pushnumber(L, exp);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5f5a7b101b81252b", - "equalIndicator/v1": "e7b6624599358d4b19426d7efd43bcccf7222bcb3c7ba640ba54b6fe1089be94" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint8_t' (aka 'unsigned char') to signed type 'int8_t' (aka 'signed char') is implementation-defined", - "markdown": "Narrowing conversion from 'uint8_t' (aka 'unsigned char') to signed type 'int8_t' (aka 'signed char') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3025, - "startColumn": 11, - "charOffset": 92324, - "charLength": 3, - "snippet": { - "text": "msg" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3023, - "startColumn": 1, - "charOffset": 92222, - "charLength": 210, - "snippet": { - "text": "\tuint16_t raceId = 0;\r\n\tif (action == static_cast(PreyAction_MonsterSelection)) {\r\n\t\tindex = msg.getByte();\r\n\t} else if (action == static_cast(PreyAction_Option)) {\r\n\t\toption = msg.getByte();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e2d9ae2151453f6c", - "equalIndicator/v1": "e7bada78a4eee82534c8678776b28c50ce55d99feb3c29dd8a207d9fbd90311a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 829, - "startColumn": 29, - "charOffset": 24898, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 827, - "startColumn": 1, - "charOffset": 24758, - "charLength": 215, - "snippet": { - "text": "\r\nstd::map &Container::getAllItemTypeCount(std::map &countMap) const {\r\n\tfor (std::shared_ptr item : itemlist) {\r\n\t\tcountMap[item->getID()] += item->getItemCount();\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c56dcd084ce50fd2", - "equalIndicator/v1": "e7fb45d61016a812d48ecdc64866ab2d3fd864a14203d7b4b94fd7a2e5f53c6b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 676, - "startColumn": 35, - "charOffset": 18478, - "charLength": 10, - "snippet": { - "text": "actualBuff" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 674, - "startColumn": 1, - "charOffset": 18396, - "charLength": 138, - "snippet": { - "text": "\r\n\t\tint32_t actualBuff = creature->getBuff(i);\r\n\t\tbuffs[i] = static_cast(actualBuff * ((buffsPercent[i] - 100) / 100.f));\r\n\t}\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d699e038b9161ce4", - "equalIndicator/v1": "e849924e9bd14bd4d8532c1c75b3d1a64d6d91551527c14570a04fed91c4065c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 121, - "startColumn": 8, - "charOffset": 3105, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 119, - "startColumn": 1, - "charOffset": 3009, - "charLength": 212, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeIsReadable(lua_State* L) {\r\n\t// itemType:isReadable()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tpushBoolean(L, itemType->canReadText);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b61ca221b50939c7", - "equalIndicator/v1": "e84d880ea8947e6f07902d825dbe23fdaf0a4652763c804ba0f9568f8d1960ce" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'npc' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'npc' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/scripts/script_environment.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 65, - "startColumn": 12, - "charOffset": 1813, - "charLength": 3, - "snippet": { - "text": "npc" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 63, - "startColumn": 1, - "charOffset": 1758, - "charLength": 104, - "snippet": { - "text": "\r\n\tvoid setNpc(std::shared_ptr npc) {\r\n\t\tcurNpc = npc;\r\n\t}\r\n\tstd::shared_ptr getNpc() const {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f09f687787dc908e", - "equalIndicator/v1": "e859e297d96aee967dce70c52de188019669b868dfaf1b77409ced376feacf01" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 199, - "startColumn": 97, - "charOffset": 6101, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 197, - "startColumn": 1, - "charOffset": 6000, - "charLength": 186, - "snippet": { - "text": "}\r\n\r\nReturnValue Combat::canTargetCreature(std::shared_ptr player, std::shared_ptr target) {\r\n\tif (player == target) {\r\n\t\treturn RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "84952e39927f50ec", - "equalIndicator/v1": "e88ba4881271c3cce217f618f2809b70307ddd639b8e7bfaec9dade648d9e271" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6833, - "startColumn": 107, - "charOffset": 236228, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6831, - "startColumn": 1, - "charOffset": 236083, - "charLength": 329, - "snippet": { - "text": "\r\n// Custom PvP System combat helpers\r\nvoid Game::applyPvPDamage(CombatDamage &damage, std::shared_ptr attacker, std::shared_ptr target) {\r\n\tfloat targetDamageReceivedMultiplier = target->vocation->pvpDamageReceivedMultiplier;\r\n\tfloat attackerDamageDealtMultiplier = attacker->vocation->pvpDamageDealtMultiplier;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6f761bb1681bebea", - "equalIndicator/v1": "e8a467cf76b6c8e5bd18c419170ee54b33807ed1337a872a99ed8042ddfc4c0f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1312, - "startColumn": 27, - "charOffset": 40395, - "charLength": 7, - "snippet": { - "text": "gainExp" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1310, - "startColumn": 1, - "charOffset": 40289, - "charLength": 163, - "snippet": { - "text": "\t\tmessage.position = position;\r\n\t\tmessage.primary.color = TEXTCOLOR_WHITE_EXP;\r\n\t\tmessage.primary.value = gainExp;\r\n\r\n\t\tfor (const auto &spectator : spectators) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "da9467c9f563d3c0", - "equalIndicator/v1": "e8aa13e7fe1ed3651f8d42d1334d2f634a51bcfdb8a3e3ba03fa89cd317d99b1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/rewards/rewardchest.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 26, - "startColumn": 7, - "charOffset": 986, - "charLength": 22, - "snippet": { - "text": "postRemoveNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 24, - "startColumn": 1, - "charOffset": 828, - "charLength": 339, - "snippet": { - "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r\n\r\n\tbool canRemove() const final {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8bb3f4d0e156949b", - "equalIndicator/v1": "e8ae86585802f47587535d8b9f2fcb86c337d5b4b8cf4079481abda5760b6fc2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 235, - "startColumn": 7, - "charOffset": 7541, - "charLength": 22, - "snippet": { - "text": "postRemoveNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 233, - "startColumn": 1, - "charOffset": 7374, - "charLength": 388, - "snippet": { - "text": "\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r\n\r\n\tvoid internalAddThing(std::shared_ptr thing) override;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "697eef31aa7df9db", - "equalIndicator/v1": "e8ced94548a8af43e9c679205b7ef4e6d6fca34d14f5dfc7277eebb312b3fb02" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2162, - "startColumn": 58, - "charOffset": 63513, - "charLength": 4, - "snippet": { - "text": "task" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2160, - "startColumn": 1, - "charOffset": 63451, - "charLength": 154, - "snippet": { - "text": "}\r\n\r\nvoid Player::setNextActionPushTask(std::shared_ptr task) {\r\n\tif (actionTaskEventPush != 0) {\r\n\t\tg_dispatcher().stopEvent(actionTaskEventPush);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0c6afde2e1ec2358", - "equalIndicator/v1": "e8d395bcf0fe0747bdabb7ea49537a1a25919a1f85c3f79d049a554cce843f25" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 254, - "startColumn": 7, - "charOffset": 9157, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 252, - "startColumn": 1, - "charOffset": 9145, - "charLength": 166, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventCreatureOnAreaCombat - \"\r\n\t\t \"Creature {} on tile position {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "31370b4af68088f5", - "equalIndicator/v1": "e8f92a0fdfb254834c441d991d68d13f579b393cad0788c2ce66663abf8edbb3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7685, - "startColumn": 39, - "charOffset": 240520, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7683, - "startColumn": 1, - "charOffset": 240363, - "charLength": 327, - "snippet": { - "text": "\tif (!oldProtocol) {\r\n\t\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\r\n\t\tmsg.add(std::min(player->getMaxMana(), std::numeric_limits::max()));\r\n\t} else {\r\n\t\tmsg.add(std::min(player->getMana(), std::numeric_limits::max()));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8111618cabb0a616", - "equalIndicator/v1": "e9058446e04b0ce3b3cac2e665a54d3a3f47a960d5a90e2f6b1e28fea3f28467" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 540, - "startColumn": 63, - "charOffset": 19144, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 538, - "startColumn": 1, - "charOffset": 19069, - "charLength": 227, - "snippet": { - "text": "\r\n// Player\r\nbool Events::eventPlayerOnBrowseField(std::shared_ptr player, const Position &position) {\r\n\t// Player:onBrowseField(position) or Player.onBrowseField(self, position)\r\n\tif (info.playerOnBrowseField == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0349298568cf7400", - "equalIndicator/v1": "e90ec8c71a32cd8a178e42b8f4a57d9229221d14c6c878515b80e351c378d078" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Repeated branch body in conditional chain", - "markdown": "Repeated branch body in conditional chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4406, - "startColumn": 35, - "charOffset": 132398, - "charLength": 1, - "snippet": { - "text": "{" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4404, - "startColumn": 1, - "charOffset": 132345, - "charLength": 190, - "snippet": { - "text": "\r\n\t\tif (weapon) {\r\n\t\t\tif (!weapon->interruptSwing()) {\r\n\t\t\t\tresult = weapon->useWeapon(static_self_cast(), tool, attackedCreature);\r\n\t\t\t} else if (!classicSpeed && !canDoAction()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cae82827d730b556", - "equalIndicator/v1": "e96d085f35e21f371c0ab579c754d91e56902d649fd137d44e0ce40fdf14dbd1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 241, - "startColumn": 2, - "charOffset": 6310, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 239, - "startColumn": 1, - "charOffset": 6192, - "charLength": 183, - "snippet": { - "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\r\n\tstd::shared_ptr creature = getCreature(L, 2);\r\n\tuint16_t topicId = getNumber(L, 3, 0);\r\n\r\n\tif (!npc) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6a069b0e28cb99d9", - "equalIndicator/v1": "e9d66fb3cdff3ce9ef85167603ab24bff5b1cc1250eefc05906b20529637c76e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned int' to 'float_t' (aka 'float')", - "markdown": "Narrowing conversion from 'unsigned int' to 'float_t' (aka 'float')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 193, - "startColumn": 16, - "charOffset": 4670, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 191, - "startColumn": 1, - "charOffset": 4603, - "charLength": 145, - "snippet": { - "text": "\tuint16_t size = 0;\r\n\tfor (auto item : itemList) {\r\n\t\tsize += ceil(item.second / (float_t)Item::items[item.first].stackSize);\r\n\t}\r\n\treturn size;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4d1fc7159247346c", - "equalIndicator/v1": "e9d9ed784283a7a3dc76d0c1af07478eab6fc5be6f1a5a223ca06a344d22d88b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1251, - "startColumn": 4, - "charOffset": 56499, - "charLength": 8, - "snippet": { - "text": "itemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1249, - "startColumn": 1, - "charOffset": 56388, - "charLength": 217, - "snippet": { - "text": "\t\t\titemType.wieldInfo = weapon->getWieldInfo();\r\n\t\t\titemType.vocationString = weapon->getVocationString();\r\n\t\t\titemType.minReqLevel = weapon->getReqLevel();\r\n\t\t\titemType.minReqMagicLevel = weapon->getReqMagLv();\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3d32b67d9f745704", - "equalIndicator/v1": "e9ef52f454c78daefb5cd83c8bcc657058f2a5cbae047643a6b9800b7788f5ae" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/scheduling/save_manager.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 86, - "startColumn": 56, - "charOffset": 2521, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 84, - "startColumn": 1, - "charOffset": 2461, - "charLength": 153, - "snippet": { - "text": "}\r\n\r\nbool SaveManager::doSavePlayer(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tlogger.debug(\"Failed to save player because player is null.\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ac060da41f850f21", - "equalIndicator/v1": "ea0e70fca7a775cbb0386445e7e93b4ab298b02013e7b2e13686c47d286c7d97" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'fromCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 516, - "startColumn": 38, - "charOffset": 19540, - "charLength": 12, - "snippet": { - "text": "fromCylinder" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 514, - "startColumn": 1, - "charOffset": 19455, - "charLength": 153, - "snippet": { - "text": "\tLuaScriptInterface::pushPosition(L, toPos);\r\n\r\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\r\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "70b4c043e91f9cd4", - "equalIndicator/v1": "ea526a15149ab987e09f8a5ccf12ee8400228cbd98cb2379a88a77c900ff2636" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'nick' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'nick' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 299, - "startColumn": 15, - "charOffset": 7799, - "charLength": 4, - "snippet": { - "text": "nick" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 297, - "startColumn": 1, - "charOffset": 7741, - "charLength": 70, - "snippet": { - "text": "\t}\r\n\tvoid setGuildNick(std::string nick) {\r\n\t\tguildNick = nick;\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "324b26ed7d4636a3", - "equalIndicator/v1": "ea87a466a1e4fa4a3daa9eef6034fe835ff0ba4a7f7a84696cfd2e98c9292f08" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/npc/npc_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 18, - "startColumn": 21, - "charOffset": 692, - "charLength": 10, - "snippet": { - "text": "shopVector" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 16, - "startColumn": 1, - "charOffset": 562, - "charLength": 172, - "snippet": { - "text": "\r\nvoid NpcTypeFunctions::createNpcTypeShopLuaTable(lua_State* L, const std::vector &shopVector) {\r\n\tlua_createtable(L, shopVector.size(), 0);\r\n\r\n\tint index = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "61d32b6a8fbc4a3c", - "equalIndicator/v1": "eab0867192389838c1bc688e78716405cb2d9cf13d217604de0d258235f87b2b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 540, - "startColumn": 28, - "charOffset": 16398, - "charLength": 9, - "snippet": { - "text": "getParent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 538, - "startColumn": 1, - "charOffset": 16312, - "charLength": 140, - "snippet": { - "text": "\tbool unregisterCreatureEvent(const std::string &name);\r\n\r\n\tstd::shared_ptr getParent() override final {\r\n\t\treturn getTile();\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "79063744f923f86e", - "equalIndicator/v1": "eab2587d7321ceb0795952b9475f602a2ee9970ba2a5abaa5621e49eb6fe4ff4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3079, - "startColumn": 2, - "charOffset": 94003, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3077, - "startColumn": 1, - "charOffset": 93942, - "charLength": 162, - "snippet": { - "text": "\r\nvoid ProtocolGame::parseQuestLine(NetworkMessage &msg) {\r\n\tuint16_t questId = msg.get();\r\n\tg_game().playerShowQuestLine(player->getID(), questId);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "24c02f61526b791c", - "equalIndicator/v1": "eab3fc214b1f22945d7ba1690ac5d83d21ff95d2135c46a5b82e830109f77a3f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'sscanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead", - "markdown": "'sscanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/scheduling/events_scheduler.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 42, - "startColumn": 3, - "charOffset": 1530, - "charLength": 6, - "snippet": { - "text": "sscanf" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 40, - "startColumn": 1, - "charOffset": 1488, - "charLength": 318, - "snippet": { - "text": "\t\tint16_t endMonth;\r\n\t\tint16_t endDay;\r\n\t\tsscanf(eventNode.attribute(\"startdate\").as_string(), \"%hd/%hd/%hd\", &startMonth, &startDay, &startYear);\r\n\t\tsscanf(eventNode.attribute(\"enddate\").as_string(), \"%hd/%hd/%hd\", &endMonth, &endDay, &endYear);\r\n\t\tint startDays = ((startYear * 365) + (startMonth * 30) + startDay);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b908b7240d797549", - "equalIndicator/v1": "eac7d1e8d91ba20c2c5152a581c2d00c4fbb9807929c319ca7fa06c8fbedbce1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1707, - "startColumn": 2, - "charOffset": 59600, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1705, - "startColumn": 1, - "charOffset": 59593, - "charLength": 47, - "snippet": { - "text": "\t}\r\n\r\n\tscriptInterface->resetScriptEnv();\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3ffd9c3db2cf5a4f", - "equalIndicator/v1": "eacb409dccd8db01257c8eb1662cf50e06e972ca0ee9697005329680451eb13e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use emplace_back instead of push_back", - "markdown": "Use emplace_back instead of push_back" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/global_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 589, - "startColumn": 13, - "charOffset": 18417, - "charLength": 9, - "snippet": { - "text": "push_back" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 587, - "startColumn": 1, - "charOffset": 18291, - "charLength": 185, - "snippet": { - "text": "\t\t\tLuaData_t type = getNumber(L, -1);\r\n\t\t\tif (type != LuaData_t::Unknown && type <= LuaData_t::Npc) {\r\n\t\t\t\tindexes.push_back({ i, type });\r\n\t\t\t}\r\n\t\t\tlua_pop(globalState, 2);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9f7c4b1423c33a25", - "equalIndicator/v1": "ead804fcb54aaaa4e645b49f073c6d3d3918f213782cf5d398613acbf57aeb21" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 301, - "startColumn": 17, - "charOffset": 7757, - "charLength": 14, - "snippet": { - "text": "startCondition" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 299, - "startColumn": 1, - "charOffset": 7736, - "charLength": 119, - "snippet": { - "text": "}\r\n\r\nbool Condition::startCondition(std::shared_ptr) {\r\n\tif (ticks > 0) {\r\n\t\tendTime = ticks + OTSYS_TIME();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "56206bce903f040c", - "equalIndicator/v1": "eade5552d4fa9df46b2b4c44f52830abdbf899f9e01c5924696affd922155696" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/container_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 193, - "startColumn": 2, - "charOffset": 5372, - "charLength": 7, - "snippet": { - "text": "int32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 191, - "startColumn": 1, - "charOffset": 5365, - "charLength": 192, - "snippet": { - "text": "\t}\r\n\r\n\tint32_t index = getNumber(L, 3, INDEX_WHEREEVER);\r\n\tuint32_t flags = getNumber(L, 4, 0);\r\n\tReturnValue ret = g_game().internalAddItem(container, item, index, flags);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "27569699b2234573", - "equalIndicator/v1": "eae63c416f0c33ed646e41879fd3ebd58dcf1930da315bd53779e34af80cfdcd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 974, - "startColumn": 31, - "charOffset": 29127, - "charLength": 8, - "snippet": { - "text": "interval" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 972, - "startColumn": 1, - "charOffset": 29057, - "charLength": 122, - "snippet": { - "text": "\r\n\t\t\tif (m_targetChangeCooldown > 0) {\r\n\t\t\t\tm_targetChangeCooldown -= interval;\r\n\r\n\t\t\t\tif (m_targetChangeCooldown <= 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c3b844240615f728", - "equalIndicator/v1": "eb03549e794d30ab612f75f7a5068fddb55ebc50b7d761b75c145bca4280de63" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7560, - "startColumn": 26, - "charOffset": 263531, - "charLength": 14, - "snippet": { - "text": "attackerPlayer" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7558, - "startColumn": 1, - "charOffset": 263463, - "charLength": 282, - "snippet": { - "text": "// Mana leech\r\nvoid Game::applyManaLeech(\r\n\tstd::shared_ptr attackerPlayer, std::shared_ptr targetMonster, std::shared_ptr target, const CombatDamage &damage, const int32_t &realDamage\r\n) const {\r\n\t// Wheel of destiny bonus - mana leech chance and amount\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6b54e1fc1fa8acc2", - "equalIndicator/v1": "eb08632965d769a4344b4f89464db67cdb3ca419ed28c6e7a0226254b0038c19" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/grouping/party.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 80, - "startColumn": 48, - "charOffset": 2413, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 78, - "startColumn": 1, - "charOffset": 2361, - "charLength": 96, - "snippet": { - "text": "}\r\n\r\nbool Party::leaveParty(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f0d2570db5bb8522", - "equalIndicator/v1": "eb0cf57b4a2ec706820b7d7c426c938039da1f7383a4f749072f917cd7b17d1b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 716, - "startColumn": 15, - "charOffset": 23249, - "charLength": 11, - "snippet": { - "text": "static_cast" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 714, - "startColumn": 1, - "charOffset": 23209, - "charLength": 132, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 48) * 2.05f) + 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "82ecc6eed30070fc", - "equalIndicator/v1": "eb16cca0935b6b21c7e90ce2d2433d5275049c25053e99872dde27d521717071" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 837, - "startColumn": 7, - "charOffset": 30224, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 835, - "startColumn": 1, - "charOffset": 30212, - "charLength": 156, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnMoveCreature - \"\r\n\t\t \"Player {} creature {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9a65781743f725ba", - "equalIndicator/v1": "eb2c33c1d66054b295a9119a71897797de5406392f9489b8437e29248580bb3b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 482, - "startColumn": 57, - "charOffset": 17183, - "charLength": 5, - "snippet": { - "text": "party" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 480, - "startColumn": 1, - "charOffset": 17122, - "charLength": 153, - "snippet": { - "text": "}\r\n\r\nbool Events::eventPartyOnDisband(std::shared_ptr party) {\r\n\t// Party:onDisband() or Party.onDisband(self)\r\n\tif (info.partyOnDisband == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c9cc8a5f285bdd31", - "equalIndicator/v1": "eb5090b1411693450090981cfe1d0436019e5c99f623db1631f540a05aa13663" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'item' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1412, - "startColumn": 16, - "charOffset": 41563, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1410, - "startColumn": 1, - "charOffset": 41487, - "charLength": 87, - "snippet": { - "text": "\r\nvoid Player::setImbuingItem(std::shared_ptr item) {\r\n\timbuingItem = item;\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c2c0e5f672bc96f4", - "equalIndicator/v1": "eba16c7b04e76d38a35f75acf176bbcfbb8bfa7314ed36938b2e575d2317f90c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'rewardId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'rewardId' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 798, - "startColumn": 36, - "charOffset": 21579, - "charLength": 14, - "snippet": { - "text": "const uint64_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 796, - "startColumn": 1, - "charOffset": 21504, - "charLength": 224, - "snippet": { - "text": "\tvoid removeConditionSuppressions();\r\n\r\n\tstd::shared_ptr getReward(const uint64_t rewardId, const bool autoCreate);\r\n\tvoid removeReward(uint64_t rewardId);\r\n\tvoid getRewardList(std::vector &rewards) const;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "49f2e966947566be", - "equalIndicator/v1": "ebafdfea646b9e9a4c4b5739c097b197c4a5a6e1bad0308676ea7d617e203e55" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 461, - "startColumn": 83, - "charOffset": 13749, - "charLength": 1, - "snippet": { - "text": "," - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 459, - "startColumn": 1, - "charOffset": 13662, - "charLength": 202, - "snippet": { - "text": "}\r\n\r\nuint32_t MoveEvent::AddItemField(std::shared_ptr item, std::shared_ptr, const Position &) {\r\n\tif (item == nullptr) {\r\n\t\tg_logger().error(\"[MoveEvent::AddItemField] - Item is nullptr\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b3b664717cade792", - "equalIndicator/v1": "ebb50ce8c743d140b11f533c8e53a41a3ee76293c5fd71688b2745de2ce31001" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/mailbox/mailbox.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 119, - "startColumn": 49, - "charOffset": 4052, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 117, - "startColumn": 1, - "charOffset": 3999, - "charLength": 168, - "snippet": { - "text": "}\r\n\r\nbool Mailbox::getReceiver(std::shared_ptr item, std::string &name) const {\r\n\tstd::shared_ptr container = item->getContainer();\r\n\tif (container) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "70e59878ecd936c6", - "equalIndicator/v1": "ebd42f3ee77a4718ab701feb6dac800d0e9fcd0e720abc6b73be678574188a0c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 600, - "startColumn": 52, - "charOffset": 17451, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 598, - "startColumn": 1, - "charOffset": 17394, - "charLength": 172, - "snippet": { - "text": "\t}\r\n\r\n\tstatic uint32_t countByType(std::shared_ptr item, int32_t subType) {\r\n\t\tif (subType == -1 || subType == item->getSubType()) {\r\n\t\t\treturn item->getItemCount();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "74599e21ad898141", - "equalIndicator/v1": "ebe667ab41d77bd45e13f5a00074f98a036631516cbf9d85b9721cc4283943cb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6311, - "startColumn": 49, - "charOffset": 185016, - "charLength": 8, - "snippet": { - "text": "vocation" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6309, - "startColumn": 1, - "charOffset": 184798, - "charLength": 335, - "snippet": { - "text": "\t\tcondition->setParam(CONDITION_PARAM_HEALTHGAIN, vocation->getHealthGainAmount());\r\n\t\tcondition->setParam(CONDITION_PARAM_HEALTHTICKS, vocation->getHealthGainTicks());\r\n\t\tcondition->setParam(CONDITION_PARAM_MANAGAIN, vocation->getManaGainAmount());\r\n\t\tcondition->setParam(CONDITION_PARAM_MANATICKS, vocation->getManaGainTicks());\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "395796f78db9caab", - "equalIndicator/v1": "ebf3473cc768d0de31f18a99947eb8c8543c2cedd141e70c3274583572e1fada" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1741, - "startColumn": 7, - "charOffset": 51925, - "charLength": 19, - "snippet": { - "text": "postAddNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1739, - "startColumn": 1, - "charOffset": 51873, - "charLength": 356, - "snippet": { - "text": "\tvoid onThink(uint32_t interval) override;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ebf2f2597e594acd", - "equalIndicator/v1": "ec09ac782114f763c4893e98ee1a890ccf65e5659ae6d05a890b5094c252b0b1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 581, - "startColumn": 52, - "charOffset": 17534, - "charLength": 2, - "snippet": { - "text": "it" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 579, - "startColumn": 1, - "charOffset": 17436, - "charLength": 137, - "snippet": { - "text": "\r\n\t\t\tif (it.abilities->getManaTicks() != 0) {\r\n\t\t\t\tcondition->setParam(CONDITION_PARAM_MANATICKS, it.abilities->getManaTicks());\r\n\t\t\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "51112c13fd75f8c0", - "equalIndicator/v1": "ec1c10919d1de58f728982d18962e28e064ccafeced3470b960eb56c763c24f5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 448, - "startColumn": 8, - "charOffset": 11142, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 446, - "startColumn": 1, - "charOffset": 11044, - "charLength": 214, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetAmmoType(lua_State* L) {\r\n\t// itemType:getAmmoType()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->ammoType);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1cc2d052ca5332db", - "equalIndicator/v1": "ec32e983379b526ecbcfa3d159c07cbdf4e04b0c7e23b187247f2795ce157284" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 710, - "startColumn": 15, - "charOffset": 23035, - "charLength": 11, - "snippet": { - "text": "static_cast" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 708, - "startColumn": 1, - "charOffset": 22995, - "charLength": 132, - "snippet": { - "text": "\t\t\t\tcase 1:\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 73) * 1.35f) + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "aaf6264be038a212", - "equalIndicator/v1": "ec6366c0637a57777aba95d3c8be63454ac04d416e5f2feb9a6cd220f413ba54" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 581, - "startColumn": 27, - "charOffset": 27564, - "charLength": 13, - "snippet": { - "text": "absorbPercent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 579, - "startColumn": 1, - "charOffset": 27409, - "charLength": 435, - "snippet": { - "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += value;\r\n\t} else if (stringValue == \"absorbpercentenergy\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentfire\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "01de480c2c4b154f", - "equalIndicator/v1": "ec65b2e13b8eb4c667c7ddaf4e3ad1322de4ee670097ca005d13d7c5df3a0653" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 693, - "startColumn": 15, - "charOffset": 22635, - "charLength": 18, - "snippet": { - "text": "std::min" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 691, - "startColumn": 1, - "charOffset": 22595, - "charLength": 101, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tchance = std::min(skill, 45) * 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e78dcccb0189324b", - "equalIndicator/v1": "ec6c3c3e6609b07c78edfbddc93895da563807dd1259df176bc58864e50fba15" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'newGroup' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'newGroup' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 535, - "startColumn": 11, - "charOffset": 14605, - "charLength": 8, - "snippet": { - "text": "newGroup" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 533, - "startColumn": 1, - "charOffset": 14542, - "charLength": 121, - "snippet": { - "text": "\r\n\tvoid setGroup(std::shared_ptr newGroup) {\r\n\t\tgroup = newGroup;\r\n\t}\r\n\tstd::shared_ptr getGroup() const {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ffd1621a2943d7b5", - "equalIndicator/v1": "ec7c9cba6f6008373ce095f401b580f3de99d9ccee54994c5d0053ff3ab94384" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 359, - "startColumn": 53, - "charOffset": 10361, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 357, - "startColumn": 1, - "charOffset": 10304, - "charLength": 159, - "snippet": { - "text": "}\r\n\r\nbool Container::isHoldingItem(std::shared_ptr item) {\r\n\tfor (ContainerIterator it = iterator(); it.hasNext(); it.advance()) {\r\n\t\tif (*it == item) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3a53aae330e890e2", - "equalIndicator/v1": "ec883ca982af98156587974bb8d3b665948f0a38c01a61e745e21049b5a269a6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 830, - "startColumn": 57, - "charOffset": 26957, - "charLength": 11, - "snippet": { - "text": "attackSkill" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 828, - "startColumn": 1, - "charOffset": 26854, - "charLength": 182, - "snippet": { - "text": "\r\n\tint32_t minValue = player->getLevel() / 5;\r\n\tint32_t maxValue = std::round((0.09f * attackFactor) * attackSkill * attackValue + minValue);\r\n\tif (maxDamage) {\r\n\t\treturn -maxValue;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "57149693a593a67b", - "equalIndicator/v1": "eca9dc8bbf21abbf2d899cb9013f2bc62722d28d350b4d67f30e44fd3f0a5b82" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6461, - "startColumn": 63, - "charOffset": 203711, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6459, - "startColumn": 1, - "charOffset": 203644, - "charLength": 131, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendPlayerVocation(std::shared_ptr target) {\r\n\tif (!player || !target || oldProtocol) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "29291ba7c4978e80", - "equalIndicator/v1": "ecc808091c90c787b894d4130c4925e15c41f2689051078c8d624a973b4928f3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/game_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 212, - "startColumn": 20, - "charOffset": 6697, - "charLength": 21, - "snippet": { - "text": "luaGameGetPlayerCount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 210, - "startColumn": 1, - "charOffset": 6673, - "charLength": 139, - "snippet": { - "text": "}\r\n\r\nint GameFunctions::luaGameGetPlayerCount(lua_State* L) {\r\n\t// Game.getPlayerCount()\r\n\tlua_pushnumber(L, g_game().getPlayersOnline());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "88339eeea3b8cfd2", - "equalIndicator/v1": "eccb77372d1415a68422fe4a2b9ef49c9b956942d88ed6047cc371c7d9575480" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 320, - "startColumn": 54, - "charOffset": 9394, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 318, - "startColumn": 1, - "charOffset": 9336, - "charLength": 124, - "snippet": { - "text": "}\r\n\r\nint32_t Player::getWeaponSkill(std::shared_ptr item) const {\r\n\tif (!item) {\r\n\t\treturn getSkillLevel(SKILL_FIST);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "650a174783e0e6e8", - "equalIndicator/v1": "ecf6d3f5232963177e932db81a47363dab56377102e29c5b39ad7b1cf11cad83" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 122, - "startColumn": 21, - "charOffset": 3860, - "charLength": 32, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 120, - "startColumn": 1, - "charOffset": 3707, - "charLength": 377, - "snippet": { - "text": "\r\n\tbool registerEvent(const std::shared_ptr moveEvent, int32_t id, std::map &moveListMap) const;\r\n\tbool registerEvent(const std::shared_ptr moveEvent, const Position &position, std::map &moveListMap) const;\r\n\tstd::shared_ptr getEvent(const std::shared_ptr &tile, MoveEvent_t eventType);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6a6587e657833927", - "equalIndicator/v1": "ed0761012445034b4ab7b4e8b6cc864699a435c5104506a7361e766adbfe3b55" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4449, - "startColumn": 124, - "charOffset": 160219, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4447, - "startColumn": 1, - "charOffset": 160091, - "charLength": 248, - "snippet": { - "text": "}\r\n\r\nvoid Game::unwrapItem(std::shared_ptr item, uint16_t unWrapId, std::shared_ptr house, std::shared_ptr player) {\r\n\tif (item->hasOwner() && !item->isOwner(player)) {\r\n\t\tplayer->sendCancelMessage(RETURNVALUE_ITEMISNOTYOURS);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2f93a8439a4aca5e", - "equalIndicator/v1": "ed0a60e3bea0fe0b4c33633a4105748a7e42765a6d5f4b38ef195c8bdbecb4f3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 349, - "startColumn": 7, - "charOffset": 13037, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 347, - "startColumn": 1, - "charOffset": 12859, - "charLength": 310, - "snippet": { - "text": "\r\nvoid EventCallback::playerOnLook(std::shared_ptr player, const Position &position, std::shared_ptr thing, uint8_t stackpos, int32_t lookDistance) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnLook - \"\r\n\t\t \"Player {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f4db5e5883498e6b", - "equalIndicator/v1": "ed1a53159f9ea05b64afdef7c44383eff7a5f0210b1b5df1c96c8501e61bd942" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '_Iter', which is a reserved identifier", - "markdown": "Declaration uses identifier '_Iter', which is a reserved identifier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/vectorset.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 77, - "startColumn": 35, - "charOffset": 2039, - "charLength": 5, - "snippet": { - "text": "_Iter" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 75, - "startColumn": 1, - "charOffset": 1998, - "charLength": 164, - "snippet": { - "text": "\t\t}\r\n\r\n\t\ttemplate \r\n\t\tconstexpr auto insert(std::vector::const_iterator _Where, _Iter _First, _Iter _Last) {\r\n\t\t\tneedUpdate = true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5e9a76d70d9d50ec", - "equalIndicator/v1": "ed25b49314ca36d4a4308bedd58aaf401aa8dbc70db821af811e68ac8019fed3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8119, - "startColumn": 82, - "charOffset": 255741, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8117, - "startColumn": 1, - "charOffset": 255655, - "charLength": 185, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::MoveUpCreature(NetworkMessage &msg, std::shared_ptr creature, const Position &newPos, const Position &oldPos) {\r\n\tif (creature != player) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "47df83ef147ad791", - "equalIndicator/v1": "ed3058b7df75663459e49587e7e2519ab60d3be3ee800c548eb96a17ea0ccb08" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'message' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'message' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1586, - "startColumn": 45, - "charOffset": 47252, - "charLength": 7, - "snippet": { - "text": "message" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1584, - "startColumn": 1, - "charOffset": 47085, - "charLength": 237, - "snippet": { - "text": "\tvoid onClearImbuement(std::shared_ptr item, uint8_t slot);\r\n\tvoid openImbuementWindow(std::shared_ptr item);\r\n\tvoid sendImbuementResult(const std::string message) {\r\n\t\tif (client) {\r\n\t\t\tclient->sendImbuementResult(message);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "99083de4f492d607", - "equalIndicator/v1": "ed53aa3140a065d63c1f95426d3cd51f79f2b69d37e4f8ba162afdf42b3baba9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 755, - "startColumn": 19, - "charOffset": 22984, - "charLength": 48, - "snippet": { - "text": "-static_cast(replacedItem->getWeight())" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 753, - "startColumn": 1, - "charOffset": 22905, - "charLength": 179, - "snippet": { - "text": "\titemlist[index] = item;\r\n\titem->setParent(getContainer());\r\n\tupdateItemWeight(-static_cast(replacedItem->getWeight()) + item->getWeight());\r\n\r\n\t// send change to client\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b74d1642e688b356", - "equalIndicator/v1": "ed83a4a018e06f89fa74f4efa9eaf2d1bf29e845452c164fe6caf6aa71779043" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3064, - "startColumn": 2, - "charOffset": 93443, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3062, - "startColumn": 1, - "charOffset": 93374, - "charLength": 180, - "snippet": { - "text": "\r\nvoid ProtocolGame::parseRevokePartyInvite(NetworkMessage &msg) {\r\n\tuint32_t targetId = msg.get();\r\n\tg_game().playerRevokePartyInvitation(player->getID(), targetId);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "785849dc6622cbdb", - "equalIndicator/v1": "ed8506c863afd8a3f5d2acb832485046a3d5a922667ea11ad21cd15d013c28d1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 41, - "startColumn": 11, - "charOffset": 1336, - "charLength": 5, - "snippet": { - "text": "mType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 39, - "startColumn": 1, - "charOffset": 1259, - "charLength": 272, - "snippet": { - "text": "\tcurrentOutfit = mType->info.outfit;\r\n\tskull = mType->info.skull;\r\n\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c80fa09f90f8ae34", - "equalIndicator/v1": "edfd23abf47f8e76aa7ba7fc3aa8d79617af7f6606d295bf5260643fa83ac4f7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 326, - "startColumn": 7, - "charOffset": 12099, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 324, - "startColumn": 1, - "charOffset": 11975, - "charLength": 263, - "snippet": { - "text": "// Player\r\nbool EventCallback::playerOnBrowseField(std::shared_ptr player, const Position &position) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::playerOnBrowseField - \"\r\n\t\t \"Player {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a323ec5ee9f279e8", - "equalIndicator/v1": "edfed2ab7f78587543029da491c974652f9cc2f2da30e1e287ee6c8c0e75a255" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7542, - "startColumn": 66, - "charOffset": 262634, - "charLength": 14, - "snippet": { - "text": "attackerPlayer" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7540, - "startColumn": 1, - "charOffset": 262539, - "charLength": 225, - "snippet": { - "text": "\r\nvoid Game::applyCharmRune(\r\n\tstd::shared_ptr targetMonster, std::shared_ptr attackerPlayer, std::shared_ptr target, const int32_t &realDamage\r\n) const {\r\n\tif (!targetMonster || !attackerPlayer) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6493cf596980ff30", - "equalIndicator/v1": "ee08b67dd0490aecbf97b87ccd4db42c5d080bec786706f242d3fa5a1eb42e02" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'mtype' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2242, - "startColumn": 39, - "charOffset": 64358, - "charLength": 34, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2240, - "startColumn": 1, - "charOffset": 64263, - "charLength": 219, - "snippet": { - "text": "\t// Task hunting system\r\n\tvoid initializeTaskHunting();\r\n\tbool isCreatureUnlockedOnTaskHunting(const std::shared_ptr mtype) const;\r\n\r\n\tbool setTaskHuntingSlotClass(std::unique_ptr &slot) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b5b796ad0453aa1b", - "equalIndicator/v1": "ee1c7be6c281f4984074602bcf700db74837a7c3a012de554d82af299aba9fd6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first.", - "markdown": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 703, - "startColumn": 15, - "charOffset": 22900, - "charLength": 2, - "snippet": { - "text": "it" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 701, - "startColumn": 1, - "charOffset": 22859, - "charLength": 74, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tchance = it.hitChance;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6828352bf2e97cf0", - "equalIndicator/v1": "ee29fcc6106e3c396e8eef04b6fc447c4fe01f1c865a098df7a5ae02f00cc88f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int64_t' (aka 'long long') is implementation-defined", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to signed type 'int64_t' (aka 'long long') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/management/ban.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 34, - "startColumn": 21, - "charOffset": 1034, - "charLength": 11, - "snippet": { - "text": "currentTime" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 32, - "startColumn": 1, - "charOffset": 1008, - "charLength": 134, - "snippet": { - "text": "\t}\r\n\r\n\tint64_t timeDiff = currentTime - connectBlock.lastAttempt;\r\n\tconnectBlock.lastAttempt = currentTime;\r\n\tif (timeDiff <= 5000) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "20ab6e96065def51", - "equalIndicator/v1": "ee2c00dcff5feae2af27ea5db91a8a7d894c079d863badbf94f28e341f003ee2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6618, - "startColumn": 30, - "charOffset": 229430, - "charLength": 8, - "snippet": { - "text": "attacker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6616, - "startColumn": 1, - "charOffset": 229360, - "charLength": 193, - "snippet": { - "text": "\t\t\t\tdamageIncreaseMessage = true;\r\n\t\t\t}\r\n\t\t\tdamage.secondary.value *= attacker->getBuff(BUFF_DAMAGEDEALT) / 100.;\r\n\t\t}\r\n\t\tdamage.secondary.value *= target->getBuff(BUFF_DAMAGERECEIVED) / 100.;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "59d4dd1abb589d99", - "equalIndicator/v1": "ee4a7710e5f92816b671b9415eb5cb567dcb3a9929bc2c46d389498ac3e7cc93" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 613, - "startColumn": 7, - "charOffset": 21817, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 611, - "startColumn": 1, - "charOffset": 21805, - "charLength": 148, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnLookInBattleList - \"\r\n\t\t \"Player {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6f58d0c4bcaaa43e", - "equalIndicator/v1": "ee4ef6f4d087f10efc6b04c11ad11e68ec6d8130e18164f4b5265f7ab858e09c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?", - "markdown": "Qualified name 'Condition::startCondition' refers to a member overridden in subclass; did you mean 'ConditionGeneric'?" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2233, - "startColumn": 7, - "charOffset": 61445, - "charLength": 25, - "snippet": { - "text": "Condition::startCondition" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2231, - "startColumn": 1, - "charOffset": 61358, - "charLength": 147, - "snippet": { - "text": "\r\nbool ConditionInvisible::startCondition(std::shared_ptr creature) {\r\n\tif (!Condition::startCondition(creature)) {\r\n\t\treturn false;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9f202d907bab44dd", - "equalIndicator/v1": "ee68b41a252821e18820e5f2704a23fdc5a1107889fb11d74282a12df979e41c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 138, - "startColumn": 6, - "charOffset": 4784, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 136, - "startColumn": 1, - "charOffset": 4750, - "charLength": 208, - "snippet": { - "text": "\r\n\tReturnValue returnValue;\r\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\r\n\t\treturnValue = RETURNVALUE_NOTPOSSIBLE;\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dd25bce6fb2d8121", - "equalIndicator/v1": "ee86c94051fe3b4223f3588e56e4bd51c92637e983d15ab1a56b0e82edf73984" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 700, - "startColumn": 121, - "charOffset": 23006, - "charLength": 18, - "snippet": { - "text": "spellGroupCooldown" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 698, - "startColumn": 1, - "charOffset": 22848, - "charLength": 253, - "snippet": { - "text": "\t\t}\r\n\t\tif (spellGroupCooldown > 0) {\r\n\t\t\tstd::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLGROUPCOOLDOWN, spellGroupCooldown / rateCooldown, 0, false, group);\r\n\t\t\tplayer->addCondition(condition);\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "db98d9708b78c328", - "equalIndicator/v1": "ee88a6628a17b37f802bc68bd9274b1d2a0084014d4e255afda4c49cbe390d07" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use emplace_back instead of push_back", - "markdown": "Use emplace_back instead of push_back" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 138, - "startColumn": 18, - "charOffset": 4288, - "charLength": 9, - "snippet": { - "text": "push_back" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 136, - "startColumn": 1, - "charOffset": 4165, - "charLength": 293, - "snippet": { - "text": "\t\t\tfor (auto subContItem : subContainer) {\r\n\t\t\t\tstd::shared_ptr containerItem = subContItem.first;\r\n\t\t\t\ttoReturnList.push_back(std::pair, uint32_t>(containerItem, static_cast(containerItem->getItemCount())));\r\n\t\t\t}\r\n\t\t} else if (item->isItemStorable()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f7540cd2f07e198c", - "equalIndicator/v1": "ee94b484986d4d9e7403b7f5ef62254beb531187364aa58cf6937302573bf4b6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'char' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 363, - "startColumn": 14, - "charOffset": 8969, - "charLength": 12, - "snippet": { - "text": "std::toupper" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 361, - "startColumn": 1, - "charOffset": 8930, - "charLength": 101, - "snippet": { - "text": "\t\t\t\tresult += ' ';\r\n\t\t\t}\r\n\t\t\tresult += std::toupper(ch);\r\n\t\t} else {\r\n\t\t\tresult += std::tolower(ch);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c7c4bee5bb823759", - "equalIndicator/v1": "eed27725f30837d856ceb1dde81d5155ccc4a7c2c5bd1d6d93e4dfd29fb9dd74" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iobestiary.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 333, - "startColumn": 10, - "charOffset": 10959, - "charLength": 16, - "snippet": { - "text": "(fee * 75) / 100" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 331, - "startColumn": 1, - "charOffset": 10869, - "charLength": 115, - "snippet": { - "text": "\t\tint32_t fee = player->getLevel() * 100;\r\n\t\tif (player->hasCharmExpansion()) {\r\n\t\t\tfee = (fee * 75) / 100;\r\n\t\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8cc8b244afd1aeac", - "equalIndicator/v1": "eed55b8322f7a4796d5a9e03f21605740f83f40b3a365ad8b41d00eca4b643fa" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 275, - "startColumn": 30, - "charOffset": 7816, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 273, - "startColumn": 1, - "charOffset": 7719, - "charLength": 213, - "snippet": { - "text": "\tItemDeque storeInboxFilteredList;\r\n\tif (isStoreInboxFiltered()) {\r\n\t\tfor (std::shared_ptr item : getItemList()) {\r\n\t\t\tauto itemId = item->getID();\r\n\t\t\tauto attribute = item->getCustomAttribute(\"unWrapId\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8de587fe8961a0bd", - "equalIndicator/v1": "eef49e896e43114f9016dd32d21f27523fe7792d3873e6e41c2b7b5f4a505ed1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'float'", - "markdown": "Narrowing conversion from 'double' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/combat/condition_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 160, - "startColumn": 33, - "charOffset": 4686, - "charLength": 1, - "snippet": { - "text": "," - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 158, - "startColumn": 1, - "charOffset": 4516, - "charLength": 227, - "snippet": { - "text": "\tstd::shared_ptr condition = getUserdataShared(L, 1)->dynamic_self_cast();\r\n\tif (condition) {\r\n\t\tcondition->setFormulaVars(mina, minb, maxa, maxb);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f996c0d2ae93ab81", - "equalIndicator/v1": "ef2e45a6c80e817e53677e904cc8e7afc31329e0fd0090ec470f1bdb76d21363" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2196, - "startColumn": 14, - "charOffset": 65818, - "charLength": 5, - "snippet": { - "text": "mType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2194, - "startColumn": 1, - "charOffset": 65741, - "charLength": 156, - "snippet": { - "text": "\r\n\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\r\n\tremoveIcon(\"forge\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "67ade26b2aa4b6a4", - "equalIndicator/v1": "ef408170792058d481482ab8352d36c4c765c7b3c0725ad90ff0b7469b49ef95" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'instant' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'instant' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 61, - "startColumn": 84, - "charOffset": 1975, - "charLength": 7, - "snippet": { - "text": "instant" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 59, - "startColumn": 1, - "charOffset": 1821, - "charLength": 209, - "snippet": { - "text": "\t[[nodiscard]] bool hasInstantSpell(const std::string &word) const;\r\n\r\n\tvoid setInstantSpell(const std::string &word, const std::shared_ptr instant) {\r\n\t\tinstants.try_emplace(word, instant);\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5289e10489c7d7f4", - "equalIndicator/v1": "ef50b36e95a73dee987f3afda0acb86894369f67bbaf1d133762200b0aa76573" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'size_t' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 426, - "startColumn": 36, - "charOffset": 12509, - "charLength": 4, - "snippet": { - "text": "info" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 424, - "startColumn": 1, - "charOffset": 12424, - "charLength": 137, - "snippet": { - "text": "\tif (monsterType) {\r\n\t\tif (lua_gettop(L) == 1) {\r\n\t\t\tlua_createtable(L, monsterType->info.enemyFactions.size(), 0);\r\n\t\t\tint index = 0;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7624c119a5710d7a", - "equalIndicator/v1": "ef52564861f6d1905da70c665227c9364103574525ef0e2cd5880c0f34ffd013" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 786, - "startColumn": 84, - "charOffset": 25572, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 784, - "startColumn": 1, - "charOffset": 25484, - "charLength": 210, - "snippet": { - "text": "}\r\n\r\nvoid Combat::CombatDispelFunc(std::shared_ptr, std::shared_ptr target, const CombatParams ¶ms, CombatDamage*) {\r\n\tif (target) {\r\n\t\ttarget->removeCombatCondition(params.dispelType);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9bf9f21492a54484", - "equalIndicator/v1": "ef8a9f6aab28f9434b61bf25abb22bf63c9255b53271481a9e22413cd641079d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 664, - "startColumn": 15, - "charOffset": 21716, - "charLength": 11, - "snippet": { - "text": "static_cast" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 662, - "startColumn": 1, - "charOffset": 21676, - "charLength": 132, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 28) * 2.40f) + 8;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "acd68f015a76a060", - "equalIndicator/v1": "efc57ee074aa4a8e5b7d32ed69f82b28dc073267786a9e5a148e308bb35d95a8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 158, - "startColumn": 11, - "charOffset": 5124, - "charLength": 16, - "snippet": { - "text": "getItemTypeCount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 156, - "startColumn": 1, - "charOffset": 5021, - "charLength": 365, - "snippet": { - "text": "\tsize_t getFirstIndex() const override final;\r\n\tsize_t getLastIndex() const override final;\r\n\tuint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const override final;\r\n\tstd::map &getAllItemTypeCount(std::map &countMap) const override final;\r\n\tstd::shared_ptr getThing(size_t index) const override final;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "24cc1db14c66aae3", - "equalIndicator/v1": "efd1f012d1dd57e4fba285ed93373c31f1bb94555e43f368c7048fe7dc4073bd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 225, - "startColumn": 28, - "charOffset": 7252, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 223, - "startColumn": 1, - "charOffset": 7218, - "charLength": 138, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tScriptEnvironment* env = scriptInterface->getScriptEnv();\r\n\t\tenv->setScriptId(mType->info.creatureMoveEvent, scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "42e91edc9cbede7c", - "equalIndicator/v1": "f00887c58037fb71b2099a195ab46521e6ba6e9d80af7a892b32af9307feb364" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/map/house_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 140, - "startColumn": 3, - "charOffset": 3775, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 138, - "startColumn": 1, - "charOffset": 3766, - "charLength": 120, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tuint32_t guid = getNumber(L, 2, 0);\r\n\t\thouse->setNewOwnerGuid(guid, false);\r\n\t\tpushBoolean(L, true);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a8a06fd74583b0ef", - "equalIndicator/v1": "f02834b5acdb5648b922beca1df71f62d55c00b8dd62cbba6bb39a02c8c024f2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6844, - "startColumn": 72, - "charOffset": 236889, - "charLength": 8, - "snippet": { - "text": "attacker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6842, - "startColumn": 1, - "charOffset": 236813, - "charLength": 238, - "snippet": { - "text": "}\r\n\r\nfloat Game::pvpLevelDifferenceDamageMultiplier(std::shared_ptr attacker, std::shared_ptr target) {\r\n\tint32_t levelDifference = target->getLevel() - attacker->getLevel();\r\n\tlevelDifference = std::abs(levelDifference);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1a06c90490aa67f4", - "equalIndicator/v1": "f02acac470f5463d0994a3e866b5d9b5362c14ac3053100ec760b3e488891a2f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1633, - "startColumn": 59, - "charOffset": 57186, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1631, - "startColumn": 1, - "charOffset": 57062, - "charLength": 249, - "snippet": { - "text": "//**********************************************************//\r\n\r\nvoid TileCallback::onTileCombat(std::shared_ptr creature, std::shared_ptr tile) const {\r\n\t// onTileCombat(creature, pos)\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6011d80201b150ec", - "equalIndicator/v1": "f0405ef2ac7e2906b2d699b56ea4777840fb87a4e1ffbf38e3279641e751b8d8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 818, - "startColumn": 15, - "charOffset": 24834, - "charLength": 8, - "snippet": { - "text": "dropLoot" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 816, - "startColumn": 1, - "charOffset": 24803, - "charLength": 155, - "snippet": { - "text": "\t\treturn 0;\r\n\t}\r\n\tvirtual void dropLoot(std::shared_ptr, std::shared_ptr) { }\r\n\tvirtual uint16_t getLookCorpse() const {\r\n\t\treturn 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "420d0b755a3a9a82", - "equalIndicator/v1": "f0469f6b50eb05d1149e1c57d3efbf8b5531d31a4f56094d4deb8a8bbb750cc1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/items.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 127, - "startColumn": 32, - "charOffset": 4085, - "charLength": 16, - "snippet": { - "text": "m_appearancesPtr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 125, - "startColumn": 1, - "charOffset": 3891, - "charLength": 314, - "snippet": { - "text": "\tbool supportAnimation = g_configManager().getBoolean(OLD_PROTOCOL, __FUNCTION__);\r\n\tfor (uint32_t it = 0; it < g_game().m_appearancesPtr->object_size(); ++it) {\r\n\t\tAppearance object = g_game().m_appearancesPtr->object(it);\r\n\r\n\t\t// This scenario should never happen but on custom assets this can break the loader.\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5fcf700ea14b8938", - "equalIndicator/v1": "f04b1961a588a4267a3ea17294fbe99d91cec274bc65c0632d514dc0819f8bd8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1809, - "startColumn": 3, - "charOffset": 54519, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1807, - "startColumn": 1, - "charOffset": 54416, - "charLength": 274, - "snippet": { - "text": "\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\r\n\t\tPosition pos = msg.getPosition();\r\n\t\tuint16_t itemId = msg.get();\r\n\t\tuint8_t stackpos = msg.getByte();\r\n\t\tg_game().playerSetManagedContainer(player->getID(), category, pos, itemId, stackpos, true);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f217a8c72447b590", - "equalIndicator/v1": "f06b73f82ef9c31663ec98d69dc2016cdef5e0b73b2cf29375b5604adbcaebf4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to 'float'", - "markdown": "Narrowing conversion from 'int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 563, - "startColumn": 63, - "charOffset": 15144, - "charLength": 23, - "snippet": { - "text": "(statsPercent[i] - 100)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 561, - "startColumn": 1, - "charOffset": 15038, - "charLength": 155, - "snippet": { - "text": "\t\tswitch (i) {\r\n\t\t\tcase STAT_MAXHITPOINTS:\r\n\t\t\t\tstats[i] = static_cast(player->getMaxHealth() * ((statsPercent[i] - 100) / 100.f));\r\n\t\t\t\tbreak;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6bf92b9fab714b5f", - "equalIndicator/v1": "f07a28f4f3b8a70b9af89ae8d621106aca58f0fdac4ccb7b00d3a6b53404c192" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 811, - "startColumn": 53, - "charOffset": 24731, - "charLength": 4, - "snippet": { - "text": "size" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 809, - "startColumn": 1, - "charOffset": 24673, - "charLength": 89, - "snippet": { - "text": "\t}\r\n\r\n\tlua_createtable(L, monsterType->info.defenseSpells.size(), 0);\r\n\r\n\tint index = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7ae7f85d631d0cb9", - "equalIndicator/v1": "f0820593b4cdfac8c2af90232722e836c1ac6478a97a04ba92bce83c4c2078f3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'toCylinder' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 548, - "startColumn": 38, - "charOffset": 20932, - "charLength": 10, - "snippet": { - "text": "toCylinder" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 546, - "startColumn": 1, - "charOffset": 20840, - "charLength": 152, - "snippet": { - "text": "\r\n\tLuaScriptInterface::pushCylinder(L, fromCylinder);\r\n\tLuaScriptInterface::pushCylinder(L, toCylinder);\r\n\r\n\tgetScriptInterface()->callVoidFunction(7);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "75e7750937f18639", - "equalIndicator/v1": "f088164b8c00a017d336df424201a8d4a4d4eadec0afb0b33a0eb8c8531c08c4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/inbox/inbox.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 20, - "startColumn": 20, - "charOffset": 624, - "charLength": 8, - "snippet": { - "text": "queryAdd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 18, - "startColumn": 1, - "charOffset": 600, - "charLength": 160, - "snippet": { - "text": "}\r\n\r\nReturnValue Inbox::queryAdd(int32_t, const std::shared_ptr &thing, uint32_t, uint32_t flags, std::shared_ptr) {\r\n\tint32_t addCount = 0;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4cf1808c3c9c713e", - "equalIndicator/v1": "f09b7575dfdff18fad7588c23a6884960ad8948dec9dce798bf86971ef50680a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 380, - "startColumn": 75, - "charOffset": 11229, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 378, - "startColumn": 1, - "charOffset": 11150, - "charLength": 227, - "snippet": { - "text": "}\r\n\r\nvoid House::handleContainer(ItemList &moveItemList, std::shared_ptr item) const {\r\n\tif (const auto container = item->getContainer()) {\r\n\t\tfor (const std::shared_ptr &containerItem : container->getItemList()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "65f9bf505589631a", - "equalIndicator/v1": "f0abf57a25d35daef24e8408494bc628cfd5448c0c9825f6f0dea281f12ad6db" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 254, - "startColumn": 7, - "charOffset": 9349, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 252, - "startColumn": 1, - "charOffset": 9237, - "charLength": 244, - "snippet": { - "text": "\r\nbool EventCallback::partyOnLeave(std::shared_ptr party, std::shared_ptr player) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::partyOnLeave - \"\r\n\t\t \"Player {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d31039a2cf7285bc", - "equalIndicator/v1": "f0b09c35af1c3bfbbaa430eaae9a08259b68b15e6575a44e7b0eb91e1223247d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'remParty' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'remParty' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5707, - "startColumn": 59, - "charOffset": 168637, - "charLength": 8, - "snippet": { - "text": "remParty" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5705, - "startColumn": 1, - "charOffset": 168574, - "charLength": 119, - "snippet": { - "text": "}\r\n\r\nvoid Player::removePartyInvitation(std::shared_ptr remParty) {\r\n\tstd::erase(invitePartyList, remParty);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "244ce201da13adcd", - "equalIndicator/v1": "f0be8d29d7b3fe65a20f0fa79d789d37b620f39554167a372641660e218a7d90" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2289, - "startColumn": 60, - "charOffset": 87212, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2287, - "startColumn": 1, - "charOffset": 87148, - "charLength": 244, - "snippet": { - "text": "}\r\n\r\nReturnValue Game::internalRemoveItem(std::shared_ptr item, int32_t count /*= -1*/, bool test /*= false*/, uint32_t flags /*= 0*/, bool force /*= false*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (item == nullptr) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "979e01d1b771cdd7", - "equalIndicator/v1": "f0c6e31457bd45c8bb34a85a8697914caa6031a28bd202deaccf663f36753071" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1253, - "startColumn": 55, - "charOffset": 41193, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1251, - "startColumn": 1, - "charOffset": 41134, - "charLength": 262, - "snippet": { - "text": "}\r\n\r\nvoid Combat::doCombatHealth(std::shared_ptr caster, std::shared_ptr target, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tdoCombatHealth(caster, std::move(target), caster ? caster->getPosition() : Position(), damage, params);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8390b9c73a57d475", - "equalIndicator/v1": "f0d03bce090d48fe3a536034bdde0fb9d09641b321e13b4106904cd8fa5976b2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '_USE_MATH_DEFINES', which is a reserved identifier", - "markdown": "Declaration uses identifier '_USE_MATH_DEFINES', which is a reserved identifier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/definitions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 20, - "startColumn": 1, - "charOffset": 536, - "charLength": 7, - "snippet": { - "text": "#ifndef" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 18, - "startColumn": 1, - "charOffset": 526, - "charLength": 72, - "snippet": { - "text": "#endif\r\n\r\n#ifndef _USE_MATH_DEFINES\r\n\t#define _USE_MATH_DEFINES\r\n#endif\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ddd5394a7e2768d1", - "equalIndicator/v1": "f0fd42892d702d66cde8fb1eff5fa57b3ae40899c45d30cf79c1be8f78e7e892" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/npcs/npc.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 155, - "startColumn": 53, - "charOffset": 4756, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 153, - "startColumn": 1, - "charOffset": 4699, - "charLength": 195, - "snippet": { - "text": "}\r\n\r\nvoid Npc::onPlayerDisappear(std::shared_ptr player) {\r\n\tremovePlayerInteraction(player);\r\n\tif (!player->hasFlag(PlayerFlags_t::IgnoredByNpcs) && playerSpectators.contains(player)) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "930816ad954da373", - "equalIndicator/v1": "f12ac0fe7598a44716f9660998cdb151a53363ad9d820090707a66c35f1b76ee" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned char' to signed type 'int8_t' (aka 'signed char') is implementation-defined", - "markdown": "Narrowing conversion from 'unsigned char' to signed type 'int8_t' (aka 'signed char') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 856, - "startColumn": 11, - "charOffset": 24727, - "charLength": 2, - "snippet": { - "text": "it" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 854, - "startColumn": 1, - "charOffset": 24632, - "charLength": 114, - "snippet": { - "text": "\tfor (const auto &it : openContainers) {\r\n\t\tif (it.second.container == container) {\r\n\t\t\treturn it.first;\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b164a4771e8add04", - "equalIndicator/v1": "f12faea87150d1d181d975683d3485578cd6e96b7fd430b2670865f6614bf79a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'lastHitCreature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'lastHitCreature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 758, - "startColumn": 53, - "charOffset": 24141, - "charLength": 15, - "snippet": { - "text": "lastHitCreature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 756, - "startColumn": 1, - "charOffset": 24084, - "charLength": 262, - "snippet": { - "text": "}\r\n\r\nbool Creature::dropCorpse(std::shared_ptr lastHitCreature, std::shared_ptr mostDamageCreature, bool lastHitUnjustified, bool mostDamageUnjustified) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!lootDrop && getMonster()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8a1fce36f7ac620a", - "equalIndicator/v1": "f13bcac6b3ea8f177b269bbd96260471075be7bf3526da416f6bba618605038d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'init' is within a recursive call chain", - "markdown": "Function 'init' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/functions/game_reload.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 25, - "startColumn": 18, - "charOffset": 819, - "charLength": 4, - "snippet": { - "text": "init" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 23, - "startColumn": 1, - "charOffset": 762, - "charLength": 146, - "snippet": { - "text": "GameReload::~GameReload() = default;\r\n\r\nbool GameReload::init(Reload_t reloadTypes) {\r\n\tswitch (reloadTypes) {\r\n\t\tcase Reload_t::RELOAD_TYPE_ALL:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "43e31015226c323c", - "equalIndicator/v1": "f1459ce47df02ce79a96980a4a4f60ebe2455c4b219b785dcbd99fd5e2600f1e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8917, - "startColumn": 46, - "charOffset": 311367, - "charLength": 10, - "snippet": { - "text": "totalPrice" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8915, - "startColumn": 1, - "charOffset": 311266, - "charLength": 188, - "snippet": { - "text": "\r\n\t\tg_game().removeMoney(player, totalPrice, 0, true);\r\n\t\tg_metrics().addCounter(\"balance_decrease\", totalPrice, { { \"player\", player->getName() }, { \"context\", \"market_offer\" } });\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "923d6cf84a0abba8", - "equalIndicator/v1": "f14e51754bb1cb087aa08aa51a071c56db6242ee97694dbe9fb3ffc00d0901dd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1254, - "startColumn": 54, - "charOffset": 50270, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1252, - "startColumn": 1, - "charOffset": 50212, - "charLength": 243, - "snippet": { - "text": "}\r\n\r\nvoid Game::playerInspectItem(std::shared_ptr player, uint16_t itemId, uint8_t itemCount, bool cyclopedia) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tplayer->sendItemInspection(itemId, itemCount, nullptr, cyclopedia);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cdd5795d29992405", - "equalIndicator/v1": "f15de941dc7e62e50519aa171b0d7db5e4ccc2d4b262d21f4c14a9e890a5b045" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1840, - "startColumn": 42, - "charOffset": 51629, - "charLength": 4, - "snippet": { - "text": "zone" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1838, - "startColumn": 1, - "charOffset": 51583, - "charLength": 114, - "snippet": { - "text": "}\r\n\r\nvoid Tile::addZone(std::shared_ptr zone) {\r\n\tzones.emplace(zone);\r\n\tconst auto &items = getItemList();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b83fc4e009d9ddf3", - "equalIndicator/v1": "f171b5b4aa8b65f20bcb93a69cb914f1e3a39ca9ec0cf1980380ba3561654ad9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 224, - "startColumn": 7, - "charOffset": 6899, - "charLength": 14, - "snippet": { - "text": "const uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 222, - "startColumn": 1, - "charOffset": 6864, - "charLength": 164, - "snippet": { - "text": "\r\n\t// Constructor for items\r\n\tItem(const uint16_t type, uint16_t count = 0);\r\n\tItem(const std::shared_ptr &i);\r\n\tvirtual std::shared_ptr clone() const;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "08e51e6fb4e3d701", - "equalIndicator/v1": "f17b02139346f92b899cb1d52c0875868c1525e4809a812e7db19ac7cc4af527" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Pass by value and use std::move", - "markdown": "Pass by value and use std::move" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/database/database.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 283, - "startColumn": 29, - "charOffset": 8260, - "charLength": 17, - "snippet": { - "text": "const std::string" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 281, - "startColumn": 1, - "charOffset": 8172, - "charLength": 144, - "snippet": { - "text": "class DatabaseException : public std::exception {\r\npublic:\r\n\texplicit DatabaseException(const std::string &message) :\r\n\t\tmessage(message) { }\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "724b60ed3f78ba40", - "equalIndicator/v1": "f17d0780c578fc091da190939026a88104e3ede6d03815d3597bf8b7dae49fb5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/vocations/vocation.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 127, - "startColumn": 6, - "charOffset": 3928, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 125, - "startColumn": 1, - "charOffset": 3823, - "charLength": 312, - "snippet": { - "text": "\t\t\t\tpugi::xml_attribute skillIdAttribute = childNode.attribute(\"id\");\r\n\t\t\t\tif (skillIdAttribute) {\r\n\t\t\t\t\tuint16_t skill_id = pugi::cast(skillIdAttribute.value());\r\n\t\t\t\t\tif (skill_id <= SKILL_LAST) {\r\n\t\t\t\t\t\tvoc->skillMultipliers[skill_id] = pugi::cast(childNode.attribute(\"multiplier\").value());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "45c9e7d74b79dff3", - "equalIndicator/v1": "f1976c7fa4c3ff06f927180030dea5974ba009ae31688b05d2dcfc25855bf66b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'action' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 198, - "startColumn": 68, - "charOffset": 5460, - "charLength": 6, - "snippet": { - "text": "action" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 196, - "startColumn": 1, - "charOffset": 5387, - "charLength": 135, - "snippet": { - "text": "\t}\r\n\r\n\tvoid setUniqueId(uint16_t uniqueId, const std::shared_ptr action) {\r\n\t\tuniqueItemMap.try_emplace(uniqueId, action);\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1dff7dca5b213b41", - "equalIndicator/v1": "f1c890f049b8c97cc9008a7eba4419f60308eadcd6e34c48bd1b83c77048068d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 745, - "startColumn": 41, - "charOffset": 28830, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 743, - "startColumn": 1, - "charOffset": 28784, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "201384ab0031809a", - "equalIndicator/v1": "f1cdf2b5cc73762ec3b54145b32ecee03c80588b2dcdd17a449bdc7948d89eff" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6888, - "startColumn": 135, - "charOffset": 238858, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6886, - "startColumn": 1, - "charOffset": 238719, - "charLength": 311, - "snippet": { - "text": "}\r\n\r\nvoid Game::applyWheelOfDestinyEffectsToDamage(CombatDamage &damage, std::shared_ptr attackerPlayer, std::shared_ptr target) const {\r\n\t// If damage is 0, it means the target is immune to the damage type, or that we missed.\r\n\tif (damage.primary.value == 0 && damage.secondary.value == 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0df9487155fa4a42", - "equalIndicator/v1": "f1f006c1b8ae37f0634f337ddff32dd4249983c298ef682b3c843d4634d312e4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'player' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1402, - "startColumn": 36, - "charOffset": 42206, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1400, - "startColumn": 1, - "charOffset": 42083, - "charLength": 141, - "snippet": { - "text": "\tvoid sendPartyPlayerVocation(std::shared_ptr player) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendPartyPlayerVocation(player);\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3129d5be1a660bcd", - "equalIndicator/v1": "f1fb1e93ee91f5e354f214861007465d1e77bade4c1ed7ff35f3f57519396789" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2202, - "startColumn": 95, - "charOffset": 84256, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2200, - "startColumn": 1, - "charOffset": 84157, - "charLength": 258, - "snippet": { - "text": "}\r\n\r\nReturnValue Game::internalAddItem(std::shared_ptr toCylinder, std::shared_ptr item, int32_t index, uint32_t flags, bool test, uint32_t &remainderCount) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (toCylinder == nullptr) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "946bf3c9c7da257e", - "equalIndicator/v1": "f1fd7c630528a4fe712bdd90c4bd697e05113eeb8994dd0763ccf9e73c74f7db" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1442, - "startColumn": 16, - "charOffset": 41382, - "charLength": 16, - "snippet": { - "text": "getItemTypeCount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1440, - "startColumn": 1, - "charOffset": 41362, - "charLength": 155, - "snippet": { - "text": "}\r\n\r\nuint32_t Tile::getItemTypeCount(uint16_t itemId, int32_t subType /*= -1*/) const {\r\n\tuint32_t count = 0;\r\n\tif (ground && ground->getID() == itemId) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b19379d699107a41", - "equalIndicator/v1": "f200f381aa91a2a936ff8f43c27889496c819d0283d5d560157cb7bfbb6ca84f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 9153, - "startColumn": 15, - "charOffset": 320016, - "charLength": 2, - "snippet": { - "text": "it" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 9151, - "startColumn": 1, - "charOffset": 319954, - "charLength": 106, - "snippet": { - "text": "\t\t\tint32_t subType;\r\n\t\t\tif (it.charges != 0) {\r\n\t\t\t\tsubType = it.charges;\r\n\t\t\t} else {\r\n\t\t\t\tsubType = -1;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "777bd726d8699cdf", - "equalIndicator/v1": "f26dbc3089ae0aed8aedd0016c41139b61afd0229ef11bcc3f373be54bd259bd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 346, - "startColumn": 55, - "charOffset": 11426, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 344, - "startColumn": 1, - "charOffset": 11367, - "charLength": 114, - "snippet": { - "text": "}\r\n\r\nint32_t Weapon::getHealthCost(std::shared_ptr player) const {\r\n\tif (health != 0) {\r\n\t\treturn health;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4f2c931c77aaa675", - "equalIndicator/v1": "f27293daf371e562628e97524b81202f4b9ed6b7c69ea1e3be6bcc3b036cb227" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/game_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 199, - "startColumn": 19, - "charOffset": 6403, - "charLength": 31, - "snippet": { - "text": "\"Level must be greater than 0.\"" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 197, - "startColumn": 1, - "charOffset": 6313, - "charLength": 188, - "snippet": { - "text": "\tconst uint32_t level = getNumber(L, 1);\r\n\tif (level == 0) {\r\n\t\treportErrorFunc(\"Level must be greater than 0.\");\r\n\t} else {\r\n\t\tlua_pushnumber(L, Player::getExpForLevel(level));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e4d9da58fea31d47", - "equalIndicator/v1": "f28f41ce6b48e55bad73c63288a0b22fe2fb86f9794a38fddef144563e43b7f6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'zone' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1191, - "startColumn": 66, - "charOffset": 45354, - "charLength": 4, - "snippet": { - "text": "zone" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1189, - "startColumn": 1, - "charOffset": 45284, - "charLength": 235, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::zoneAfterCreatureEnter(std::shared_ptr zone, std::shared_ptr creature) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[EventCallback::zoneAfterCreatureEnter - \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "68847b58b0846063", - "equalIndicator/v1": "f2a781d4189ab77712ea0af2c09feb99a925d37eb60dd5374d2ce73f84b91898" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8042, - "startColumn": 58, - "charOffset": 280010, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8040, - "startColumn": 1, - "charOffset": 279948, - "charLength": 127, - "snippet": { - "text": "}\r\n\r\nvoid Game::updateCreatureSkull(std::shared_ptr creature) {\r\n\tif (getWorldType() != WORLD_TYPE_PVP) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7fd801487d9710a7", - "equalIndicator/v1": "f2aabce89bc455227b31210b6b6d250e749ac1927476ede0c4227831e94154ba" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 746, - "startColumn": 27, - "charOffset": 26794, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 744, - "startColumn": 1, - "charOffset": 26762, - "charLength": 127, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnMoveItem, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6d899e01c14b78b9", - "equalIndicator/v1": "f2b65759c545d01a25407c53270c0010f1789472064f2838fd417bfea607668b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructor does not initialize these fields: id, playerId, timestamp, price, amount, counter, itemId, type, tier", - "markdown": "Constructor does not initialize these fields: id, playerId, timestamp, price, amount, counter, itemId, type, tier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creatures_definitions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1486, - "startColumn": 8, - "charOffset": 38766, - "charLength": 13, - "snippet": { - "text": "MarketOfferEx" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1484, - "startColumn": 1, - "charOffset": 38753, - "charLength": 99, - "snippet": { - "text": "};\r\n\r\nstruct MarketOfferEx {\r\n\tMarketOfferEx() = default;\r\n\tMarketOfferEx(MarketOfferEx &&other) :\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "536eb6e322b30f22", - "equalIndicator/v1": "f2baa722464c60ac6e47542391365d859e64e5dd355b455968b0a971a463af2e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 970, - "startColumn": 55, - "charOffset": 27776, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 968, - "startColumn": 1, - "charOffset": 27717, - "charLength": 139, - "snippet": { - "text": "}\r\n\r\nbool Player::canWalkthrough(std::shared_ptr creature) {\r\n\tif (group->access || creature->isInGhostMode()) {\r\n\t\treturn true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "61fb06bab718e83c", - "equalIndicator/v1": "f2c47f346113b4751285eb51d34632b19dbd51b1b1ddcad0c66e852514afcf45" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 576, - "startColumn": 8, - "charOffset": 14185, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 574, - "startColumn": 1, - "charOffset": 14085, - "charLength": 217, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetDecayTime(lua_State* L) {\r\n\t// itemType:getDecayTime()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->decayTime);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "81dbc6f47dc761ad", - "equalIndicator/v1": "f2e6639f9c3cc2e63f5a1114e491dfba52a072ad359aa7e8cd430accd7702add" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 546, - "startColumn": 7, - "charOffset": 19325, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 544, - "startColumn": 1, - "charOffset": 19313, - "charLength": 143, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnBrowseField - \"\r\n\t\t \"Player {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2a66791caaa22780", - "equalIndicator/v1": "f302408fdee23a1ae23c7fd62b7a42dba776f555e0cd2290df4a3b3eb13dbffb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8052, - "startColumn": 55, - "charOffset": 280292, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8050, - "startColumn": 1, - "charOffset": 280233, - "charLength": 213, - "snippet": { - "text": "}\r\n\r\nvoid Game::updatePlayerShield(std::shared_ptr player) {\r\n\tfor (const auto &spectator : Spectators().find(player->getPosition(), true)) {\r\n\t\tspectator->getPlayer()->sendCreatureShield(player);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9ef1ba599b8accef", - "equalIndicator/v1": "f309ea07b13443db1385596d7685bc9562c93ad91e8bff348d7acd82d359bcaf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/functions/iologindata_save_player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 637, - "startColumn": 74, - "charOffset": 24587, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 635, - "startColumn": 1, - "charOffset": 24509, - "charLength": 189, - "snippet": { - "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerTaskHuntingClass(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "65545ecc19e10d66", - "equalIndicator/v1": "f313b88dfa672c1b3628e8549792cca8dd81a2dcca8720cd77270cc33643c522" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/decay/decay.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 151, - "startColumn": 53, - "charOffset": 4400, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 149, - "startColumn": 1, - "charOffset": 4343, - "charLength": 265, - "snippet": { - "text": "}\r\n\r\nvoid Decay::internalDecayItem(std::shared_ptr item) {\r\n\tconst ItemType &it = Item::items[item->getID()];\r\n\t// Remove the item and halt the decay process if a player triggers a bug where the item's decay ID matches its equip or de-equip transformation ID\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "edd6d3607f7b1ff9", - "equalIndicator/v1": "f31d8c3383a7c073e28245e0a5e4e43e1025b6b7e602058afaddbc2c86a8ac6b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 9915, - "startColumn": 3, - "charOffset": 345863, - "charLength": 11, - "snippet": { - "text": "ShootType_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 9913, - "startColumn": 1, - "charOffset": 345746, - "charLength": 213, - "snippet": { - "text": "bool Game::hasDistanceEffect(uint16_t effectId) {\r\n\tfor (uint16_t i = CONST_ANI_NONE; i <= CONST_ANI_LAST; i++) {\r\n\t\tShootType_t effect = static_cast(i);\r\n\t\tif (effect == effectId) {\r\n\t\t\treturn true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "490f5f1213b636d4", - "equalIndicator/v1": "f32b4a24d0e9bd12741ff4195ce34c57f9bcfe90c8cd9b801c51eba03a654c29" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first.", - "markdown": "'signed char' to 'int32_t' (aka 'int') conversion; consider casting to 'unsigned char' first." - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1194, - "startColumn": 23, - "charOffset": 33591, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1192, - "startColumn": 1, - "charOffset": 33562, - "charLength": 147, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tint32_t hitChance = item->getHitChance();\r\n\t\tif (hitChance != 0) {\r\n\t\t\tdescriptions.emplace_back(\"HitChance\", std::to_string(hitChance));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2ee32cf20a2f74e9", - "equalIndicator/v1": "f32e945e22bacba3bd777d107682a1bd1228630a191a3b45874633abec11a4fc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8313, - "startColumn": 61, - "charOffset": 287884, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8311, - "startColumn": 1, - "charOffset": 287819, - "charLength": 174, - "snippet": { - "text": "}\r\n\r\nvoid Game::playerFriendSystemAction(std::shared_ptr player, uint8_t type, uint8_t titleId) {\r\n\tif (type == 0x0E) {\r\n\t\tplayer->title()->setCurrentTitle(titleId);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4845aafddea175c9", - "equalIndicator/v1": "f34664aa2a39142fa2f00aa6c33c7f4aa985414776a39231c9d3e3e59a3f5949" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'party' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 297, - "startColumn": 67, - "charOffset": 11037, - "charLength": 5, - "snippet": { - "text": "party" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 295, - "startColumn": 1, - "charOffset": 10966, - "charLength": 318, - "snippet": { - "text": "}\r\n\r\nvoid EventCallback::partyOnShareExperience(std::shared_ptr party, uint64_t &exp) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"Party leader {}. Call stack overflow. Too many lua script calls being nested.\", party->getLeader() ? party->getLeader()->getName() : \"unknown\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8b9753c3bae1841d", - "equalIndicator/v1": "f38e0b0d0727aeac5b5596757379a14fd3274fc4cf1074d9d1d1341c3261bbac" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/grouping/party.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 668, - "startColumn": 56, - "charOffset": 20386, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 666, - "startColumn": 1, - "charOffset": 20326, - "charLength": 173, - "snippet": { - "text": "}\r\n\r\nvoid Party::updatePlayerHealth(std::shared_ptr player, std::shared_ptr target, uint8_t healthPercent) {\r\n\tauto leader = getLeader();\r\n\tif (!leader) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6070edce5204c405", - "equalIndicator/v1": "f3aebdad8aaf72d6cd22a7bf76f2d7ef8bb849cd6dd2df5d138cb425e1290ab5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'bed' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'bed' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 418, - "startColumn": 45, - "charOffset": 12187, - "charLength": 3, - "snippet": { - "text": "bed" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 416, - "startColumn": 1, - "charOffset": 12138, - "charLength": 127, - "snippet": { - "text": "}\r\n\r\nvoid House::addBed(std::shared_ptr bed) {\r\n\tbedsList.push_back(bed);\r\n\tbed->setHouse(static_self_cast());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4579701cdeb6a7b7", - "equalIndicator/v1": "f3b4b331bd6789e0065e0a3512040093fa4956f9d10ecab3ed72c0a550ce50e5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1220, - "startColumn": 68, - "charOffset": 43553, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1218, - "startColumn": 1, - "charOffset": 43481, - "charLength": 179, - "snippet": { - "text": "}\r\n\r\nvoid Events::eventPlayerOnRequestQuestLine(std::shared_ptr player, uint16_t questId) {\r\n\t// Player::onRequestQuestLine()\r\n\tif (info.playerOnRequestQuestLine == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "47eff2ea31a10787", - "equalIndicator/v1": "f3b7e9312700b92bf3dda1ce995f4a1722c28cdf4623f8e3bb8f9dde3d9167bc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/imbuements/imbuements.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 339, - "startColumn": 105, - "charOffset": 11794, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 337, - "startColumn": 1, - "charOffset": 11685, - "charLength": 157, - "snippet": { - "text": "}\r\n\r\nstd::vector Imbuements::getImbuements(std::shared_ptr player, std::shared_ptr item) {\r\n\tstd::vector imbuements;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ca5a23bedc59ecca", - "equalIndicator/v1": "f3c272e1a53cb0f7b8e0bdf4f09583854a2bc1218c0ef742ecf348e1c70c93e9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 760, - "startColumn": 39, - "charOffset": 23092, - "charLength": 12, - "snippet": { - "text": "attackSpells" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 758, - "startColumn": 1, - "charOffset": 23048, - "charLength": 88, - "snippet": { - "text": "\t}\r\n\r\n\tlua_createtable(L, monsterType->info.attackSpells.size(), 0);\r\n\r\n\tint index = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2ec9649287ba9c4e", - "equalIndicator/v1": "f3cff170b98fd09e0eb87f5e0a040f447b2a723ac10998260e3dfad7277caa66" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1087, - "startColumn": 7, - "charOffset": 41411, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1085, - "startColumn": 1, - "charOffset": 41299, - "charLength": 218, - "snippet": { - "text": "\r\nvoid EventCallback::monsterOnSpawn(std::shared_ptr monster, const Position &position) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"{} - \"\r\n\t\t \"Position {}\"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ef2d24dacb368f44", - "equalIndicator/v1": "f3f40aac36e98fc77fe931b7cbd76a93fa96918ae180d837d75007ead88b3093" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/vocation_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 107, - "startColumn": 21, - "charOffset": 3108, - "charLength": 8, - "snippet": { - "text": "vocation" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 105, - "startColumn": 1, - "charOffset": 3018, - "charLength": 155, - "snippet": { - "text": "\tif (vocation) {\r\n\t\tuint32_t magicLevel = getNumber(L, 2);\r\n\t\tlua_pushnumber(L, vocation->getReqMana(magicLevel));\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fbdffb09b0f05c57", - "equalIndicator/v1": "f40083326310e9d0a95fde2936312186d0b20094133dde3af31339b43b5fc23b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5524, - "startColumn": 2, - "charOffset": 175272, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5522, - "startColumn": 1, - "charOffset": 175195, - "charLength": 192, - "snippet": { - "text": "\tuint16_t firstItem = msg.get();\r\n\tuint8_t tier = msg.getByte();\r\n\tuint16_t secondItem = msg.get();\r\n\tbool usedCore = msg.getByte();\r\n\tbool reduceTierLoss = msg.getByte();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f3b7d34660303085", - "equalIndicator/v1": "f4105c25a21d6180d4fc682a0a8831d070bd89d852c04ce9d5fc6560ec633412" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attackerPlayer' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7483, - "startColumn": 90, - "charOffset": 260661, - "charLength": 14, - "snippet": { - "text": "attackerPlayer" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7481, - "startColumn": 1, - "charOffset": 260536, - "charLength": 260, - "snippet": { - "text": "\r\nvoid Game::buildMessageAsTarget(\r\n\tstd::shared_ptr attacker, const CombatDamage &damage, std::shared_ptr attackerPlayer,\r\n\tstd::shared_ptr targetPlayer, TextMessage &message, std::stringstream &ss,\r\n\tconst std::string &damageString\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "60191d6a45d46637", - "equalIndicator/v1": "f4340a13aee6f4d600dae7739c351a75c3ae536484b89715519474fe6b547bf9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The 'empty' method should be used to check for emptiness instead of comparing to an empty object", - "markdown": "The 'empty' method should be used to check for emptiness instead of comparing to an empty object" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/mailbox/mailbox.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 103, - "startColumn": 62, - "charOffset": 3639, - "charLength": 6, - "snippet": { - "text": "writer" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 101, - "startColumn": 1, - "charOffset": 3344, - "charLength": 429, - "snippet": { - "text": "\t\tif (g_game().internalMoveItem(item->getParent(), player->getInbox(), INDEX_WHEREEVER, item, item->getItemCount(), nullptr, FLAG_NOLIMIT) == RETURNVALUE_NOERROR) {\r\n\t\t\tauto newItem = g_game().transformItem(item, item->getID() + 1);\r\n\t\t\tif (newItem && newItem->getID() == ITEM_LETTER_STAMPED && writer != \"\") {\r\n\t\t\t\tnewItem->setAttribute(ItemAttribute_t::WRITER, writer);\r\n\t\t\t\tnewItem->setAttribute(ItemAttribute_t::DATE, date);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "90040e2a70419239", - "equalIndicator/v1": "f43ba1a39ed5f3efde1a900786fb68d428402d008e9cfeb55d026a5add1371c8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/achievement/player_achievement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 36, - "startColumn": 41, - "charOffset": 1106, - "charLength": 9, - "snippet": { - "text": "timestamp" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 34, - "startColumn": 1, - "charOffset": 1031, - "charLength": 241, - "snippet": { - "text": "\r\n\taddPoints(achievement.points);\r\n\tint toSaveTimeStamp = timestamp != 0 ? timestamp : (OTSYS_TIME() / 1000);\r\n\tgetUnlockedKV()->set(achievement.name, toSaveTimeStamp);\r\n\tm_achievementsUnlocked.emplace_back(achievement.id, toSaveTimeStamp);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ca0abdff34ea7cef", - "equalIndicator/v1": "f44867ec4ecab683db937e97a613252b6a7eaffcf364b11fa53a829ccb9bb3dd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::list, unsigned char>>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'std::list, unsigned char\\>\\>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/modal_window_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 102, - "startColumn": 21, - "charOffset": 2845, - "charLength": 6, - "snippet": { - "text": "window" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 100, - "startColumn": 1, - "charOffset": 2748, - "charLength": 152, - "snippet": { - "text": "\tconst auto &window = getUserdataShared(L, 1);\r\n\tif (window) {\r\n\t\tlua_pushnumber(L, window->choices.size());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3f59fe5db515fe22", - "equalIndicator/v1": "f44d19591c353821e43533617007cfeea235c0070be5128a40521086a7beeb20" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Redundant string initialization", - "markdown": "Redundant string initialization" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monsters.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 216, - "startColumn": 14, - "charOffset": 6252, - "charLength": 4, - "snippet": { - "text": "name" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 214, - "startColumn": 1, - "charOffset": 6179, - "charLength": 117, - "snippet": { - "text": "\tMonsterSpell &operator=(const MonsterSpell &) = delete;\r\n\r\n\tstd::string name = \"\";\r\n\tstd::string scriptName = \"\";\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4dc7ea26595785f9", - "equalIndicator/v1": "f485f947679f22ee3906d1d508134b6adaa4da7e9e705e87e6329393e39c6aa7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/rewards/reward.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 42, - "startColumn": 1, - "charOffset": 1059, - "charLength": 4, - "snippet": { - "text": "void" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 40, - "startColumn": 1, - "charOffset": 1054, - "charLength": 225, - "snippet": { - "text": "}\r\n\r\nvoid Reward::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t) {\r\n\tstd::shared_ptr localParent = getParent();\r\n\tif (localParent != nullptr) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9d93d33f662db925", - "equalIndicator/v1": "f4a956f1e68cce80578b5b138f73ece105b244f2801a33f9a2d7892d936a6a51" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'mostDamageCreature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'mostDamageCreature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 758, - "startColumn": 96, - "charOffset": 24184, - "charLength": 18, - "snippet": { - "text": "mostDamageCreature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 756, - "startColumn": 1, - "charOffset": 24084, - "charLength": 262, - "snippet": { - "text": "}\r\n\r\nbool Creature::dropCorpse(std::shared_ptr lastHitCreature, std::shared_ptr mostDamageCreature, bool lastHitUnjustified, bool mostDamageUnjustified) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (!lootDrop && getMonster()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "95740ab037b7890f", - "equalIndicator/v1": "f4b14b7e7b90a07ac8a76c127c7f95ef603233ed434f39c904a29873cc44b7b3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 472, - "startColumn": 41, - "charOffset": 17845, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 470, - "startColumn": 1, - "charOffset": 17799, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3feb1ddf5de9b417", - "equalIndicator/v1": "f4ce2dc6c8a1cd91b5461ccdc8218b21b457d697210a70892ef4787100c75559" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 906, - "startColumn": 41, - "charOffset": 34576, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 904, - "startColumn": 1, - "charOffset": 34530, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "740c014e321f4171", - "equalIndicator/v1": "f4cee5247232bdd99e4790a06adf0bd441cd736ad7b5990fdc3f5ad1420fb6d5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/npcs/npc.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 42, - "startColumn": 14, - "charOffset": 1339, - "charLength": 7, - "snippet": { - "text": "npcType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 40, - "startColumn": 1, - "charOffset": 1200, - "charLength": 255, - "snippet": { - "text": "\tfloat multiplier = g_configManager().getFloat(RATE_NPC_HEALTH, __FUNCTION__);\r\n\thealth = npcType->info.health * multiplier;\r\n\thealthMax = npcType->info.healthMax * multiplier;\r\n\tbaseSpeed = npcType->info.baseSpeed;\r\n\tinternalLight = npcType->info.light;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8cbf6660ee1c096e", - "equalIndicator/v1": "f4f5154c22ae7caaf9251ddae15bfe2ca34dac0d83de1d6736d5724a9b1e1dcf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1291, - "startColumn": 27, - "charOffset": 45938, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1289, - "startColumn": 1, - "charOffset": 45906, - "charLength": 132, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = scriptInterface.getScriptEnv();\r\n\tenv->setScriptId(info.playerOnStorageUpdate, &scriptInterface);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ff0811de6a9b3fd4", - "equalIndicator/v1": "f51d3ad18429dae8021db28c28be69c197526b4c228d497bc7503522d951856d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 8907, - "startColumn": 46, - "charOffset": 310964, - "charLength": 3, - "snippet": { - "text": "fee" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 8905, - "startColumn": 1, - "charOffset": 310870, - "charLength": 218, - "snippet": { - "text": "\r\n\t\tg_game().removeMoney(player, fee, 0, true);\r\n\t\tg_metrics().addCounter(\"balance_decrease\", fee, { { \"player\", player->getName() }, { \"context\", \"market_fee\" } });\r\n\t} else {\r\n\t\tuint64_t totalPrice = price * amount;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "42e089830249f727", - "equalIndicator/v1": "f5454abddfe3cd8ef6ae126b50169ea8670859be916253414258e7e492a13b0b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1178, - "startColumn": 28, - "charOffset": 32415, - "charLength": 10, - "snippet": { - "text": "healthGain" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1176, - "startColumn": 1, - "charOffset": 32228, - "charLength": 292, - "snippet": { - "text": "\t\t\tint32_t realHealthGain = creature->getHealth();\r\n\t\t\tif (creature->getZoneType() == ZONE_PROTECTION && dailyStreak >= DAILY_REWARD_DOUBLE_HP_REGENERATION) {\r\n\t\t\t\tcreature->changeHealth(healthGain * 2); // Double regen from daily reward\r\n\t\t\t} else {\r\n\t\t\t\tcreature->changeHealth(healthGain);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6f31a89eb09f2393", - "equalIndicator/v1": "f5482c5d4f8f5a2fbe25e14b913ace1f7e7bb6747dc9a9706a5fc5366d5138d9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6052, - "startColumn": 63, - "charOffset": 192687, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6050, - "startColumn": 1, - "charOffset": 192620, - "charLength": 136, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureTurn(std::shared_ptr creature, uint32_t stackPos) {\r\n\tif (!canSee(creature)) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bded1c26c17c6471", - "equalIndicator/v1": "f5507ba4add50f816319a90d5ec8d2b6039954d8d27830a26786e8e4887bcf17" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #1 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 431, - "startColumn": 58, - "charOffset": 12083, - "charLength": 1, - "snippet": { - "text": "," - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 429, - "startColumn": 1, - "charOffset": 11944, - "charLength": 207, - "snippet": { - "text": "\tvirtual void drainMana(std::shared_ptr attacker, int32_t manaLoss);\r\n\r\n\tvirtual bool challengeCreature(std::shared_ptr, [[maybe_unused]] int targetChangeCooldown) {\r\n\t\treturn false;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5f476a2eb63b093b", - "equalIndicator/v1": "f5729e0f6efa94051079e25c6ea1db5fea1956d3a0c5b1985e456d7b1df22c8b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3522, - "startColumn": 3, - "charOffset": 108396, - "charLength": 8, - "snippet": { - "text": "skills_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3520, - "startColumn": 1, - "charOffset": 108375, - "charLength": 198, - "snippet": { - "text": "\t\t\tcontinue;\r\n\t\t}\r\n\t\tskills_t skill = static_cast(i);\r\n\t\tmsg.add(std::min(player->getSkillLevel(skill), std::numeric_limits::max()));\r\n\t\tmsg.add(0);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7798bf5d6ad4cf1e", - "equalIndicator/v1": "f580c5989a4141824612dd3748f076d4290dbed4db05388322079230187269a5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Repeated branch body in conditional chain", - "markdown": "Repeated branch body in conditional chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iomapserialize.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 171, - "startColumn": 13, - "charOffset": 4965, - "charLength": 8, - "snippet": { - "text": "findItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 169, - "startColumn": 1, - "charOffset": 4881, - "charLength": 196, - "snippet": { - "text": "\t\t\tfor (auto &findItem : *items) {\r\n\t\t\t\tif (findItem->getID() == id) {\r\n\t\t\t\t\titem = findItem;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else if (iType.m_transformOnUse && findItem->getID() == iType.m_transformOnUse) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "415125fe4730093c", - "equalIndicator/v1": "f5966fac55aee20777c2fdb8f1448a2a964c07146f3d0a52c54108a6c5b715dc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 218, - "startColumn": 42, - "charOffset": 6586, - "charLength": 14, - "snippet": { - "text": "const uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 216, - "startColumn": 1, - "charOffset": 6473, - "charLength": 368, - "snippet": { - "text": "public:\r\n\t// Factory member to create item of right type based on type\r\n\tstatic std::shared_ptr CreateItem(const uint16_t type, uint16_t count = 0, Position* itemPosition = nullptr);\r\n\tstatic std::shared_ptr CreateItemAsContainer(const uint16_t type, uint16_t size);\r\n\tstatic std::shared_ptr CreateItem(uint16_t itemId, Position &itemPosition);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e3557ec330cf23ed", - "equalIndicator/v1": "f59c74572efbbd67ca69e5f493825dac5b0831447d85da65c4b41c1b63755757" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 514, - "startColumn": 79, - "charOffset": 16934, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 512, - "startColumn": 1, - "charOffset": 16851, - "charLength": 315, - "snippet": { - "text": "}\r\n\r\nbool Action::executeUse(std::shared_ptr player, std::shared_ptr item, const Position &fromPosition, std::shared_ptr target, const Position &toPosition, bool isHotkey) {\r\n\t// onUse(player, item, fromPosition, target, toPosition, isHotkey)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "61ea2480a3b18b30", - "equalIndicator/v1": "f5a21cac8c59ce933247677673e91b14d4834ebc860464e7d388489c4f34bc56" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'addThing' is within a recursive call chain", - "markdown": "Function 'addThing' is within a recursive call chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 986, - "startColumn": 12, - "charOffset": 30072, - "charLength": 8, - "snippet": { - "text": "addThing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 984, - "startColumn": 1, - "charOffset": 30056, - "charLength": 82, - "snippet": { - "text": "}\r\n\r\nvoid Tile::addThing(std::shared_ptr thing) {\r\n\taddThing(0, thing);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "74b8347852972220", - "equalIndicator/v1": "f5a72fe48493e6a1cd435feb88c34e864b33a932fcd0f9977baf1c4f67b7226d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'oldItem' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 415, - "startColumn": 77, - "charOffset": 12185, - "charLength": 7, - "snippet": { - "text": "oldItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 413, - "startColumn": 1, - "charOffset": 12104, - "charLength": 206, - "snippet": { - "text": "}\r\n\r\nvoid Container::onUpdateContainerItem(uint32_t index, std::shared_ptr oldItem, std::shared_ptr newItem) {\r\n\tauto spectators = Spectators().find(getPosition(), false, 2, 2, 2, 2);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2bfcd9bdbaa7e8c0", - "equalIndicator/v1": "f5b58b79d3b2de20be21556b91f36229cc9da9673410f461ca87585131857322" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/creature_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 669, - "startColumn": 2, - "charOffset": 18146, - "charLength": 13, - "snippet": { - "text": "ConditionId_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 667, - "startColumn": 1, - "charOffset": 18075, - "charLength": 202, - "snippet": { - "text": "\r\n\tConditionType_t conditionType = getNumber(L, 2);\r\n\tConditionId_t conditionId = getNumber(L, 3, CONDITIONID_COMBAT);\r\n\tuint32_t subId = getNumber(L, 4, 0);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7249219986ed6cca", - "equalIndicator/v1": "f5bd21b20204444b6c20d1c6b070844382c0f7f04db6c6a084518eaf4c61070a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'typename std::enable_if::value || std::is_floating_point::value, unsigned int>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'typename std::enable_if::value \\|\\| std::is_floating_point::value, unsigned int\\>::type' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/npc/shop_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 87, - "startColumn": 33, - "charOffset": 2552, - "charLength": 19, - "snippet": { - "text": "getNumber" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 85, - "startColumn": 1, - "charOffset": 2436, - "charLength": 179, - "snippet": { - "text": "\t// shop:setCount(count)\r\n\tif (const auto &shop = getUserdataShared(L, 1)) {\r\n\t\tshop->shopBlock.itemSubType = getNumber(L, 2);\r\n\t\tpushBoolean(L, true);\r\n\t} else {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9c425d922ec49bd6", - "equalIndicator/v1": "f5ded62bc6bfdaa539e921b407953c061babd75ac378b11414bc8d478b8c899c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/bed.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 253, - "startColumn": 24, - "charOffset": 6692, - "charLength": 5, - "snippet": { - "text": "regen" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 251, - "startColumn": 1, - "charOffset": 6662, - "charLength": 201, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tplayer->changeHealth(regen * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__), false);\r\n\t\tplayer->changeMana(regen * g_configManager().getFloat(RATE_MANA_REGEN, __FUNCTION__));\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "886591dc0bec17cd", - "equalIndicator/v1": "f5ff62aec2c721c62d5f7c5866c243beda61abf909640b5cc900ba5e342b2885" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 220, - "startColumn": 8, - "charOffset": 5507, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 218, - "startColumn": 1, - "charOffset": 5417, - "charLength": 202, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetType(lua_State* L) {\r\n\t// itemType:getType()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->type);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a6c9bf0ef1e56d97", - "equalIndicator/v1": "f604458f363a760ac670c207865ff06110b60b9395bb55fc73f92d0449c9bb83" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 9905, - "startColumn": 3, - "charOffset": 345605, - "charLength": 18, - "snippet": { - "text": "MagicEffectClasses" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 9903, - "startColumn": 1, - "charOffset": 345499, - "charLength": 216, - "snippet": { - "text": "bool Game::hasEffect(uint16_t effectId) {\r\n\tfor (uint16_t i = CONST_ME_NONE; i < CONST_ME_LAST; i++) {\r\n\t\tMagicEffectClasses effect = static_cast(i);\r\n\t\tif (effect == effectId) {\r\n\t\t\treturn true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e304252b2e409ff2", - "equalIndicator/v1": "f607fda45b7ae048ae1e38d585490e2e75fa897500535165b7f23956b1bb1c38" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1329, - "startColumn": 47, - "charOffset": 47191, - "charLength": 7, - "snippet": { - "text": "monster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1327, - "startColumn": 1, - "charOffset": 47087, - "charLength": 170, - "snippet": { - "text": "\tscriptInterface.pushFunction(info.monsterOnDropLoot);\r\n\r\n\tLuaScriptInterface::pushUserdata(L, monster);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Monster\");\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "53817cd306a8960a", - "equalIndicator/v1": "f60cd8373208072b24e88faf453a423c7ab70ada8889f1b71799e0641d87a6d3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use range-based for loop instead", - "markdown": "Use range-based for loop instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 24, - "startColumn": 4, - "charOffset": 778, - "charLength": 3, - "snippet": { - "text": "for" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 22, - "startColumn": 1, - "charOffset": 725, - "charLength": 198, - "snippet": { - "text": "\t\t\tMoveEventList &moveEventList = pair.second;\r\n\r\n\t\t\tfor (int moveEventType = 0; moveEventType < MOVE_EVENT_LAST; ++moveEventType) {\r\n\t\t\t\tauto &eventList = moveEventList.moveEvent[moveEventType];\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "163811abdf7878f8", - "equalIndicator/v1": "f60d1c38823c30f03c88c1c6e8d7731281204ba202172619bf4ebc9bb4ea0c1c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 421, - "startColumn": 10, - "charOffset": 11297, - "charLength": 14, - "snippet": { - "text": "getReflectFlat" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 419, - "startColumn": 1, - "charOffset": 11196, - "charLength": 245, - "snippet": { - "text": "\tint32_t getReflectPercent(CombatType_t combat, bool useCharges = false) const override;\r\n\r\n\tint32_t getReflectFlat(CombatType_t combat, bool useCharges = false) const override;\r\n\r\n\tPartyShields_t getPartyShield(std::shared_ptr player);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2e9ab2fa797e801b", - "equalIndicator/v1": "f61639b2f989966d35a5d78a088336cea8228a044f77f3b519bc8b53ddcfbac4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/creaturecallback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 17, - "startColumn": 7, - "charOffset": 546, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 15, - "startColumn": 1, - "charOffset": 534, - "charLength": 122, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface->reserveScriptEnv()) {\r\n\t\tauto targetCreature = m_targetCreature.lock();\r\n\t\tg_logger().error(\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "074c5352083cee12", - "equalIndicator/v1": "f61c4b26db3cf925f48f28b7d037f58afcd0222b47ff02bd449f3a52cc4db595" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'", - "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'unsigned short'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3490, - "startColumn": 21, - "charOffset": 107464, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3488, - "startColumn": 1, - "charOffset": 107339, - "charLength": 170, - "snippet": { - "text": "\t\tmsg.add(player->getBaseSkill(skill));\r\n\t\tmsg.add(player->getLoyaltySkill(skill));\r\n\t\tmsg.add(player->getSkillPercent(skill) * 100);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3104c6c4c658f648", - "equalIndicator/v1": "f634628a25dffefe37064671a3369a23314f21df6b7e4527a5aa8b1a2f97408e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6907, - "startColumn": 29, - "charOffset": 239690, - "charLength": 36, - "snippet": { - "text": "(damage.primary.value * damageBonus)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6905, - "startColumn": 1, - "charOffset": 239551, - "charLength": 268, - "snippet": { - "text": "\t\t\tint32_t damageBonus = attackerPlayer->wheel()->checkTwinBurstByTarget(target);\r\n\t\t\tif (damageBonus != 0) {\r\n\t\t\t\tdamage.primary.value += (damage.primary.value * damageBonus) / 100.;\r\n\t\t\t\tdamage.secondary.value += (damage.secondary.value * damageBonus) / 100.;\r\n\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8b75fa52c95401c3", - "equalIndicator/v1": "f64abb795c7f78062fa5e20618b3aa1eede64c36ea8ba785b1112493dd5dedee" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1106, - "startColumn": 52, - "charOffset": 32483, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1104, - "startColumn": 1, - "charOffset": 32423, - "charLength": 139, - "snippet": { - "text": "\t\t}\r\n\t}\r\n\tvoid sendCreatureAppear(std::shared_ptr creature, const Position &pos, bool isLogin) {\r\n\t\tif (!creature) {\r\n\t\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f17e32c6e6ed6df9", - "equalIndicator/v1": "f64ac47058e1e00c751b7ec195861e92b5421c93ecff559a0c9361afedd6157c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int64_t' (aka 'long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'int64_t' (aka 'long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/combat/condition_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 89, - "startColumn": 3, - "charOffset": 2697, - "charLength": 14, - "snippet": { - "text": "lua_pushnumber" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 87, - "startColumn": 1, - "charOffset": 2599, - "charLength": 172, - "snippet": { - "text": "\tstd::shared_ptr condition = getUserdataShared(L, 1);\r\n\tif (condition) {\r\n\t\tlua_pushnumber(L, condition->getEndTime());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6f6ead4a14a75b0b", - "equalIndicator/v1": "f667fe2ba01a92160a3287605683482b451b9e68850cb53bb047f01c8ea16667" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Result of integer division used in a floating point context; possible loss of precision", - "markdown": "Result of integer division used in a floating point context; possible loss of precision" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 76, - "startColumn": 95, - "charOffset": 2223, - "charLength": 5, - "snippet": { - "text": "level" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 74, - "startColumn": 1, - "charOffset": 2008, - "charLength": 236, - "snippet": { - "text": "\t\treturn static_cast(std::round((0.085 * attackFactor * attackValue * attackSkill) + (level / 5)));\r\n\t} else {\r\n\t\treturn static_cast(std::round((0.09 * attackFactor * attackValue * attackSkill) + (level / 5)));\r\n\t}\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "66b30b8d9c58778e", - "equalIndicator/v1": "f6734e7a1cc49e0874710014b3ed90ed8e0b41d9eabd1fe8cf78e498b850e4ae" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::list, unsigned char>>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'std::list, unsigned char\\>\\>::size_type' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/modal_window_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 91, - "startColumn": 21, - "charOffset": 2565, - "charLength": 6, - "snippet": { - "text": "window" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 89, - "startColumn": 1, - "charOffset": 2468, - "charLength": 152, - "snippet": { - "text": "\tconst auto &window = getUserdataShared(L, 1);\r\n\tif (window) {\r\n\t\tlua_pushnumber(L, window->buttons.size());\r\n\t} else {\r\n\t\tlua_pushnil(L);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "29055e996be48b63", - "equalIndicator/v1": "f67fa33b6bc2d49157f9ac48f5722732d08840d67af1c409458157dbbf7bb4ec" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2131, - "startColumn": 52, - "charOffset": 72072, - "charLength": 7, - "snippet": { - "text": "ownerId" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2129, - "startColumn": 1, - "charOffset": 71917, - "charLength": 176, - "snippet": { - "text": "\r\n\t\t\tif (!harmfulField || (OTSYS_TIME() - createTime <= 5000) || creature->hasBeenAttacked(ownerId)) {\r\n\t\t\t\tconditionCopy->setParam(CONDITION_PARAM_OWNER, ownerId);\r\n\t\t\t}\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f23d59c5dfaf007e", - "equalIndicator/v1": "f68c1f6a01df5e81e6a578abfb4bef6749228663152ab4e239a7da7d515517ad" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1881, - "startColumn": 21, - "charOffset": 65063, - "charLength": 5, - "snippet": { - "text": "input" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1879, - "startColumn": 1, - "charOffset": 64969, - "charLength": 173, - "snippet": { - "text": "\t\tfor (uint32_t x = 0; x < input->getCols(); ++x) {\r\n\t\t\tuint32_t ry = 0;\r\n\t\t\tfor (int32_t y = input->getRows(); --y >= 0;) {\r\n\t\t\t\t(*output)[ry++][x] = (*input)[y][x];\r\n\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "111cfb3dabd90a79", - "equalIndicator/v1": "f690c96e8d7dbfd35e3674534d8e82addd720b874f93349a2dece90e66833c85" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4163, - "startColumn": 14, - "charOffset": 125251, - "charLength": 19, - "snippet": { - "text": "postAddNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4161, - "startColumn": 1, - "charOffset": 125233, - "charLength": 219, - "snippet": { - "text": "}\r\n\r\nvoid Player::postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link /*= LINK_OWNER*/) {\r\n\tif (link == LINK_OWNER) {\r\n\t\t// calling movement scripts\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "80fcebe24b92df8e", - "equalIndicator/v1": "f6b8cc9c4a23f89a30605f5a3259a4991dda30446e476d5e4ef5ddc2293e96d0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 423, - "startColumn": 49, - "charOffset": 13775, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 421, - "startColumn": 1, - "charOffset": 13722, - "charLength": 328, - "snippet": { - "text": "}\r\n\r\nbool Actions::useItemEx(std::shared_ptr player, const Position &fromPos, const Position &toPos, uint8_t toStackPos, std::shared_ptr item, bool isHotkey, std::shared_ptr creature /* = nullptr*/) {\r\n\tconst ItemType &it = Item::items[item->getID()];\r\n\tif (it.isRune() || it.type == ITEM_TYPE_POTION) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "429978fddb95a719", - "equalIndicator/v1": "f6bd764d973805431460e0ac4c91c85c5d0cd8fa47ef1086f228acd43bd722be" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7317, - "startColumn": 47, - "charOffset": 219631, - "charLength": 4, - "snippet": { - "text": "cost" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7315, - "startColumn": 1, - "charOffset": 219566, - "charLength": 157, - "snippet": { - "text": "\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tg_metrics().addCounter(\"balance_decrease\", cost, { { \"player\", getName() }, { \"context\", \"forge_fuse\" } });\r\n\r\n\t\t\thistory.cost = cost;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "65534a57a203f4bc", - "equalIndicator/v1": "f6be9fd9d7a7eaf7002816c1c6ed4486ec9b9bc0e34dc2b65445d699fa3b6794" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2063, - "startColumn": 97, - "charOffset": 63327, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2061, - "startColumn": 1, - "charOffset": 63226, - "charLength": 158, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendItemInspection(uint16_t itemId, uint8_t itemCount, std::shared_ptr item, bool cyclopedia) {\r\n\tif (oldProtocol) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a19bdae768966884", - "equalIndicator/v1": "f6c8e4b308cea5191d5dbf7ccf801682b8381e50e3e4004a3c759d3ec2d51773" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 285, - "startColumn": 14, - "charOffset": 8151, - "charLength": 8, - "snippet": { - "text": "blockHit" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 283, - "startColumn": 1, - "charOffset": 8110, - "charLength": 245, - "snippet": { - "text": "\tvoid clearFriendList();\r\n\r\n\tBlockType_t blockHit(std::shared_ptr attacker, CombatType_t combatType, int32_t &damage, bool checkDefense = false, bool checkArmor = false, bool field = false) override;\r\n\r\n\tstatic uint32_t monsterAutoID;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "989ec2abb37c6189", - "equalIndicator/v1": "f6d46477db46eba7a64f7bf897ac16de16aa49e2cc177215898e775852cfc89d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Switch has 2 consecutive identical branches", - "markdown": "Switch has 2 consecutive identical branches" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 699, - "startColumn": 3, - "charOffset": 18491, - "charLength": 4, - "snippet": { - "text": "case" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 697, - "startColumn": 1, - "charOffset": 18471, - "charLength": 105, - "snippet": { - "text": "\r\n\t\t// Bed class\r\n\t\tcase ATTR_SLEEPERGUID: {\r\n\t\t\tif (!propStream.skip(4)) {\r\n\t\t\t\treturn ATTR_READ_ERROR;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8746ae38830d2110", - "equalIndicator/v1": "f6db9bb7100ae87f7074fc95a9f41e7716346de9ecfbbd71e94665f88a9815b4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/npc/npc_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 329, - "startColumn": 2, - "charOffset": 8616, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 327, - "startColumn": 1, - "charOffset": 8508, - "charLength": 171, - "snippet": { - "text": "\tstd::shared_ptr npc = getUserdataShared(L, 1);\r\n\tconst Position &position = getPosition(L, 2);\r\n\tuint32_t range = getNumber(L, 3, 4);\r\n\r\n\tif (!npc) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fe9b06ce06b8d186", - "equalIndicator/v1": "f6ed7f8cda02bb52126daf6aee73e7456def3f7bf6d5ce06d2a96f428efe6149" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 289, - "startColumn": 50, - "charOffset": 8961, - "charLength": 8, - "snippet": { - "text": "attacker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 287, - "startColumn": 1, - "charOffset": 8907, - "charLength": 276, - "snippet": { - "text": "}\r\n\r\nbool Combat::isProtected(std::shared_ptr attacker, std::shared_ptr target) {\r\n\tuint32_t protectionLevel = g_configManager().getNumber(PROTECTION_LEVEL, __FUNCTION__);\r\n\tif (target->getLevel() < protectionLevel || attacker->getLevel() < protectionLevel) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c172b90f5f1c2fb9", - "equalIndicator/v1": "f6f011a5d2737dadc15ca9661a5c377a14cf45f8afe71151aaa27e9d886cd212" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attacker' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7450, - "startColumn": 28, - "charOffset": 259510, - "charLength": 8, - "snippet": { - "text": "attacker" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7448, - "startColumn": 1, - "charOffset": 259444, - "charLength": 288, - "snippet": { - "text": "\r\nvoid Game::buildMessageAsSpectator(\r\n\tstd::shared_ptr attacker, std::shared_ptr target, const CombatDamage &damage,\r\n\tstd::shared_ptr targetPlayer, TextMessage &message, std::stringstream &ss,\r\n\tconst std::string &damageString, std::string &spectatorMessage\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8d98b88a4cbdcf33", - "equalIndicator/v1": "f701bf361355453cbc6bd5a52bc3c296b7f6b569600770e62297fa9c1b92e637" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 778, - "startColumn": 29, - "charOffset": 23689, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 776, - "startColumn": 1, - "charOffset": 23503, - "charLength": 291, - "snippet": { - "text": "\tif (item->isStackable() && count != item->getItemCount()) {\r\n\t\tuint8_t newCount = static_cast(std::max(0, item->getItemCount() - count));\r\n\t\tconst int32_t oldWeight = item->getWeight();\r\n\t\titem->setItemCount(newCount);\r\n\t\tupdateItemWeight(-oldWeight + item->getWeight());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a0854365e336b7b6", - "equalIndicator/v1": "f714f921f44081d26fefc4faf9397b0804138cbfa57bfa93490bb9191fff4e48" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1958, - "startColumn": 2, - "charOffset": 59924, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1956, - "startColumn": 1, - "charOffset": 59846, - "charLength": 203, - "snippet": { - "text": "\tuint16_t itemId = msg.get();\r\n\tuint8_t stackpos = msg.getByte();\r\n\tuint32_t playerId = msg.get();\r\n\tg_game().playerRequestTrade(player->getID(), pos, stackpos, playerId, itemId);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "267a46e6c3ef8c63", - "equalIndicator/v1": "f7160a12be770d196732dd4733d27f39adecd8e5be5a2f81f3dcb5de3889f197" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'action' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 156, - "startColumn": 32, - "charOffset": 4340, - "charLength": 29, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 154, - "startColumn": 1, - "charOffset": 4171, - "charLength": 301, - "snippet": { - "text": "\tbool registerLuaUniqueEvent(const std::shared_ptr action);\r\n\tbool registerLuaActionEvent(const std::shared_ptr action);\r\n\tbool registerLuaPositionEvent(const std::shared_ptr action);\r\n\tbool registerLuaEvent(const std::shared_ptr action);\r\n\t// Clear maps for reloading\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "51130631ddf68101", - "equalIndicator/v1": "f71ccde461f32d760f403269586870c3ae39e572d393cc5be524483eef8f53bd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/kv.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 40, - "startColumn": 42, - "charOffset": 1334, - "charLength": 4, - "snippet": { - "text": "keys" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 38, - "startColumn": 1, - "charOffset": 1223, - "charLength": 194, - "snippet": { - "text": "\tvirtual std::shared_ptr scoped(const std::string &scope) = 0;\r\n\r\n\tvirtual std::unordered_set keys(const std::string &prefix = \"\") = 0;\r\n\r\n\tvoid remove(const std::string &key);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f5ff5866a02c1589", - "equalIndicator/v1": "f723ba63b3afce84ff85def5565160dc412395dfbadefd991c9f830644694816" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'moveEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 252, - "startColumn": 30, - "charOffset": 8282, - "charLength": 32, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 250, - "startColumn": 1, - "charOffset": 8090, - "charLength": 364, - "snippet": { - "text": "\r\n\tstatic uint32_t EquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool boolean);\r\n\tstatic uint32_t DeEquipItem(const std::shared_ptr moveEvent, std::shared_ptr player, std::shared_ptr item, Slots_t slot, bool boolean);\r\n\r\n\tvoid setFromXML(bool newFromXML) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "079599d3461d5aa6", - "equalIndicator/v1": "f7566a953ba63e3bafec6093bf3d710e58936cdc870db41648048ede414b7427" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1116, - "startColumn": 7, - "charOffset": 42426, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1114, - "startColumn": 1, - "charOffset": 42320, - "charLength": 212, - "snippet": { - "text": "// Npc\r\nvoid EventCallback::npcOnSpawn(std::shared_ptr npc, const Position &position) const {\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"{} - \"\r\n\t\t \"Position {}\"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c877c58a599bcb70", - "equalIndicator/v1": "f7a32f19d1f2cc5357a395136110c5e11bccb7d864c57f87d05d916fac8012de" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'destination' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'destination' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/bank/bank.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 141, - "startColumn": 48, - "charOffset": 3772, - "charLength": 11, - "snippet": { - "text": "destination" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 139, - "startColumn": 1, - "charOffset": 3720, - "charLength": 119, - "snippet": { - "text": "}\r\n\r\nbool Bank::deposit(const std::shared_ptr destination) {\r\n\tauto bankable = getBankable();\r\n\tif (!bankable) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e978aaab3bfe5d1d", - "equalIndicator/v1": "f7aa950171aaa7b18d9cd69f524bf1d1299e2ff2705a291c1128f9759ffd85e5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Either cast from 'uint32_t' (aka 'unsigned int') to 'uint64_t' (aka 'unsigned long long') is ineffective, or there is loss of precision before the conversion", - "markdown": "Either cast from 'uint32_t' (aka 'unsigned int') to 'uint64_t' (aka 'unsigned long long') is ineffective, or there is loss of precision before the conversion" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/npcs/npc.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 408, - "startColumn": 19, - "charOffset": 13871, - "charLength": 11, - "snippet": { - "text": "static_cast" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 406, - "startColumn": 1, - "charOffset": 13810, - "charLength": 329, - "snippet": { - "text": "\r\n\tauto totalRemoved = amount - toRemove;\r\n\tauto totalCost = static_cast(sellPrice * totalRemoved);\r\n\tg_logger().debug(\"[Npc::onPlayerSellItem] - Removing items from player {} amount {} of items with id {} on shop for npc {}\", player->getName(), toRemove, itemId, getName());\r\n\tif (totalRemoved > 0 && totalCost > 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "82210e66cf401e95", - "equalIndicator/v1": "f7cb503d77a4947509a4c969f6958aa82d124f9dbade64352a879ff2618175cd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 312, - "startColumn": 20, - "charOffset": 11689, - "charLength": 3, - "snippet": { - "text": "exp" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 310, - "startColumn": 1, - "charOffset": 11616, - "charLength": 140, - "snippet": { - "text": "\tLuaScriptInterface::setMetatable(L, -1, \"Party\");\r\n\r\n\tlua_pushnumber(L, exp);\r\n\r\n\tif (getScriptInterface()->protectedCall(L, 2, 1) != 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "121a22d03ea39955", - "equalIndicator/v1": "f806b4cf3b9258eee22bdcc97e1a821521b6f26802e7515fd84f6b31f93b4c7a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'std::map::mapped_type' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iobestiary.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 377, - "startColumn": 5, - "charOffset": 12499, - "charLength": 10, - "snippet": { - "text": "defaultMap" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 375, - "startColumn": 1, - "charOffset": 12458, - "charLength": 126, - "snippet": { - "text": "\t\t\t\tbreak;\r\n\t\t\tcase COMBAT_HEALING:\r\n\t\t\t\tdefaultMap[7] -= static_cast(elementEntry.second);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "11218b6ae94021d7", - "equalIndicator/v1": "f80e1d1b3bada975bb95793b658b7551a186083e18ec44cee1fceb0bf605d552" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/functions/iologindata_save_player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 404, - "startColumn": 72, - "charOffset": 15783, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 402, - "startColumn": 1, - "charOffset": 15707, - "charLength": 187, - "snippet": { - "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerBestiarySystem(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ce79a3f40ffd38a9", - "equalIndicator/v1": "f82eac19d72af237dc713805b2fe21e1346499656f7a3a8b48d9444375375159" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'connection' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'connection' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/server.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 95, - "startColumn": 43, - "charOffset": 2467, - "charLength": 10, - "snippet": { - "text": "connection" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 93, - "startColumn": 1, - "charOffset": 2420, - "charLength": 134, - "snippet": { - "text": "}\r\n\r\nvoid ServicePort::onAccept(Connection_ptr connection, const std::error_code &error) {\r\n\tif (!error) {\r\n\t\tif (services.empty()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "77f7fd7d50c6421c", - "equalIndicator/v1": "f82f9cf20d00f2f4bb320a7b7d5741608644c833b163047bccced983c9f7f6b2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::_Tree, std::allocator>, false>>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'std::_Tree, std::allocator\\>, false\\>\\>::size_type' (aka 'unsigned long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/game_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 904, - "startColumn": 57, - "charOffset": 26548, - "charLength": 1, - "snippet": { - "text": "{" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 902, - "startColumn": 1, - "charOffset": 26487, - "charLength": 175, - "snippet": { - "text": "}\r\n\r\nint GameFunctions::luaGameGetAchievements(lua_State* L) {\r\n\t// Game.getAchievements()\r\n\tconst std::map &achievements = g_game().getAchievements();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7668e2423d3f8a48", - "equalIndicator/v1": "f836cc29cbcf5d8252c1600e147d14b7581a3c34d341be9bc74726a2b62bb7bb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'condition' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'condition' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1353, - "startColumn": 56, - "charOffset": 41454, - "charLength": 9, - "snippet": { - "text": "condition" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1351, - "startColumn": 1, - "charOffset": 41394, - "charLength": 189, - "snippet": { - "text": "}\r\n\r\nbool Creature::addCondition(std::shared_ptr condition, bool attackerPlayer /* = false*/) {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tif (condition == nullptr) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fd9e77d469124781", - "equalIndicator/v1": "f845ed7c7668c35f50e814b30026b049b2ebe5e12cc411939a42c2d8279d6f9f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Repeated branch body in conditional chain", - "markdown": "Repeated branch body in conditional chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3153, - "startColumn": 231, - "charOffset": 95021, - "charLength": 1, - "snippet": { - "text": "{" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3151, - "startColumn": 1, - "charOffset": 94750, - "charLength": 359, - "snippet": { - "text": "\t\tret = RETURNVALUE_NOERROR;\r\n\t} else {\r\n\t\tif ((slotPosition & SLOTP_HEAD) || (slotPosition & SLOTP_NECKLACE) || (slotPosition & SLOTP_BACKPACK) || (slotPosition & SLOTP_ARMOR) || (slotPosition & SLOTP_LEGS) || (slotPosition & SLOTP_FEET) || (slotPosition & SLOTP_RING)) {\r\n\t\t\tret = RETURNVALUE_CANNOTBEDRESSED;\r\n\t\t} else if (slotPosition & SLOTP_TWO_HAND) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fa705348a9b4c20b", - "equalIndicator/v1": "f870f7207342126e974574cd9622625f597c0275e3a549c5d5d5affd9e15f45e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'float' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 673, - "startColumn": 26, - "charOffset": 21832, - "charLength": 6, - "snippet": { - "text": "damage" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 671, - "startColumn": 1, - "charOffset": 21675, - "charLength": 276, - "snippet": { - "text": "\t\tdamage.secondary.type = imbuementInfo.imbuement->combatType;\r\n\t\tdamage.secondary.value = damage.primary.value * (damagePercent);\r\n\t\tdamage.primary.value = damage.primary.value * (1 - damagePercent);\r\n\r\n\t\tif (imbuementInfo.imbuement->soundEffect != SoundEffect_t::SILENCE) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e106233adea1337b", - "equalIndicator/v1": "f87311de167ac4fba7ca0f8fdc490add710111e3bc6815b62e7f6d527109f9a8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 686, - "startColumn": 89, - "charOffset": 22283, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 684, - "startColumn": 1, - "charOffset": 22190, - "charLength": 234, - "snippet": { - "text": "}\r\n\r\nvoid Combat::CombatManaFunc(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms, CombatDamage* data) {\r\n\tif (!data) {\r\n\t\tg_logger().error(\"[{}]: CombatDamage is nullptr\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "83b76a0d3119aba7", - "equalIndicator/v1": "f8825a847015e55637d56619b8c00de157232b6455b0034baa6b16903390f384" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')", - "markdown": "Narrowing conversion from 'double' to 'int32_t' (aka 'int')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/player_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2312, - "startColumn": 26, - "charOffset": 80373, - "charLength": 10, - "snippet": { - "text": "std::round" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2310, - "startColumn": 1, - "charOffset": 80267, - "charLength": 263, - "snippet": { - "text": "\tint32_t damageBonus = 0;\r\n\tuint8_t stage = getStage(WheelStage_t::TWIN_BURST);\r\n\tint32_t healthPercent = std::round((static_cast(target->getHealth()) * 100) / static_cast(target->getMaxHealth()));\r\n\tif (healthPercent > 60) {\r\n\t\tif (stage >= 3) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "39541f2a17d206e9", - "equalIndicator/v1": "f8829ad454c9d5206a63f43b1f86a528acc9484fed3739f549287ea07c04a604" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'bed' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'bed' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 423, - "startColumn": 48, - "charOffset": 12318, - "charLength": 3, - "snippet": { - "text": "bed" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 421, - "startColumn": 1, - "charOffset": 12266, - "charLength": 109, - "snippet": { - "text": "}\r\n\r\nvoid House::removeBed(std::shared_ptr bed) {\r\n\tbed->setHouse(nullptr);\r\n\tbedsList.remove(bed);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a10eff04ab860be5", - "equalIndicator/v1": "f8ac0c6eec729dca276239bfec16459c1cf5a6334600790685105bbda1e2a06d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3334, - "startColumn": 64, - "charOffset": 101727, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3332, - "startColumn": 1, - "charOffset": 101659, - "charLength": 142, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendCreatureSkull(std::shared_ptr creature) {\r\n\tif (g_game().getWorldType() != WORLD_TYPE_PVP) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9f04fd5c5c1f2074", - "equalIndicator/v1": "f8bd669d5379675d00a0efe42343f6a709bc47a285af59f8ae4772023cff4abf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 365, - "startColumn": 78, - "charOffset": 10507, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 363, - "startColumn": 1, - "charOffset": 10425, - "charLength": 284, - "snippet": { - "text": "}\r\n\r\nvoid House::handleWrapableItem(ItemList &moveItemList, std::shared_ptr item, std::shared_ptr player, std::shared_ptr houseTile) const {\r\n\tif (item->isWrapContainer()) {\r\n\t\tg_logger().debug(\"[{}] found wrapable item '{}'\", __FUNCTION__, item->getName());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "58f1103db3ef5fda", - "equalIndicator/v1": "f8c4ed2b6977b461faf10f9a23ac66d60dc7151441e03ad8fd840046b44201f6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector>::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector\\>::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1312, - "startColumn": 9, - "charOffset": 38727, - "charLength": 9, - "snippet": { - "text": "creatures" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1310, - "startColumn": 1, - "charOffset": 38701, - "charLength": 54, - "snippet": { - "text": "\t\t\t}\r\n\t\t} else {\r\n\t\t\tn += creatures->size();\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "91a9dacffe85202a", - "equalIndicator/v1": "f8cb34adc57375caa4782c2938e21c7c0ebd860be0eeb66fb8e3173a7d842352" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/movement/teleport.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 41, - "startColumn": 14, - "charOffset": 1138, - "charLength": 8, - "snippet": { - "text": "queryAdd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 39, - "startColumn": 1, - "charOffset": 1093, - "charLength": 486, - "snippet": { - "text": "\r\n\t// cylinder implementations\r\n\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r\n\tReturnValue queryMaxCount(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t &maxQueryCount, uint32_t flags) override;\r\n\tReturnValue queryRemove(const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) override;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "615ac66cc2c2c17a", - "equalIndicator/v1": "f8d27c0ff4abd829895b93c273f91f80ca94dd90724c5ba1b06796a16ecf829f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1072, - "startColumn": 7, - "charOffset": 38520, - "charLength": 15, - "snippet": { - "text": "scriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1070, - "startColumn": 1, - "charOffset": 38508, - "charLength": 146, - "snippet": { - "text": "\t}\r\n\r\n\tif (!scriptInterface.reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[Events::eventPlayerOnLoseExperience - \"\r\n\t\t \"Player {}] \"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b630deeff2ae07ae", - "equalIndicator/v1": "f8d8b0aaad7e81c7e343ad2ca7c32454de774995a0306bec1f5c52a7c3828857" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/player_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 193, - "startColumn": 46, - "charOffset": 5186, - "charLength": 9, - "snippet": { - "text": "lua_State" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 191, - "startColumn": 1, - "charOffset": 5136, - "charLength": 163, - "snippet": { - "text": "}\r\n\r\nint PlayerFunctions::luaPlayeraddCharmPoints(lua_State* L) {\r\n\t// player:addCharmPoints()\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "806cf2be93c9fcf1", - "equalIndicator/v1": "f8f82bbd0f4ab744a0dbce7b3492059fa37952eb0f440c2be091014318ba0320" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable is copied but only used as const reference; consider making it a const reference", - "markdown": "Loop variable is copied but only used as const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 820, - "startColumn": 29, - "charOffset": 24635, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 818, - "startColumn": 1, - "charOffset": 24495, - "charLength": 234, - "snippet": { - "text": "uint32_t Container::getItemTypeCount(uint16_t itemId, int32_t subType /* = -1*/) const {\r\n\tuint32_t count = 0;\r\n\tfor (std::shared_ptr item : itemlist) {\r\n\t\tif (item->getID() == itemId) {\r\n\t\t\tcount += countByType(item, subType);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9f416abf71ddf75d", - "equalIndicator/v1": "f912cb459254cf9f048f184e18ae5d6081d0571d974cdfbf9665cbf95eb04d33" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 326, - "startColumn": 15, - "charOffset": 10266, - "charLength": 11, - "snippet": { - "text": "newDuration" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 324, - "startColumn": 1, - "charOffset": 10127, - "charLength": 160, - "snippet": { - "text": "\tif (newDuration > 0 && (!prevIt.stopTime || !hasAttribute(ItemAttribute_t::DURATION))) {\r\n\t\tsetDecaying(DECAYING_PENDING);\r\n\t\tsetDuration(newDuration);\r\n\t}\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3baa8f8d795c8755", - "equalIndicator/v1": "f91bd30f51923902852f8093b9b0bb3b0cc9f0a0d860cd98905c47193e6c4ac1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/rewards/rewardchest.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 21, - "startColumn": 26, - "charOffset": 606, - "charLength": 8, - "snippet": { - "text": "queryAdd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 19, - "startColumn": 1, - "charOffset": 576, - "charLength": 200, - "snippet": { - "text": "}\r\n\r\nReturnValue RewardChest::queryAdd(int32_t, const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr actor /* = nullptr*/) {\r\n\tif (actor) {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "46747c0e53836096", - "equalIndicator/v1": "f9448637a9e36efa51ff5bd64e085174f022d224a4575b5071b8aa3877f7e374" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Repeated branch body in conditional chain", - "markdown": "Repeated branch body in conditional chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 715, - "startColumn": 19, - "charOffset": 21505, - "charLength": 18, - "snippet": { - "text": "CONDITION_BLEEDING" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 713, - "startColumn": 1, - "charOffset": 21405, - "charLength": 194, - "snippet": { - "text": "\tConditionType_t conditionType = CONDITION_NONE;\r\n\tif (immunity == \"physical\") {\r\n\t\tconditionType = CONDITION_BLEEDING;\r\n\t} else if (immunity == \"energy\") {\r\n\t\tconditionType = CONDITION_ENERGY;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1ea6b0c5a138c88d", - "equalIndicator/v1": "f950cc463fc00e42de40c0962bef5e6f0f7d737fa04c1cf8244bf97dab53e41b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Avoid repeating the return type from the declaration; use a braced initializer list instead", - "markdown": "Avoid repeating the return type from the declaration; use a braced initializer list instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/zones/zone.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 67, - "startColumn": 10, - "charOffset": 2004, - "charLength": 8, - "snippet": { - "text": "Position" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 65, - "startColumn": 1, - "charOffset": 1846, - "charLength": 215, - "snippet": { - "text": "Position Zone::getRemoveDestination(const std::shared_ptr &creature /* = nullptr */) const {\r\n\tif (!creature || !creature->getPlayer()) {\r\n\t\treturn Position();\r\n\t}\r\n\tif (removeDestination != Position()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cbefed57fb0ede36", - "equalIndicator/v1": "f9875bfa6bcf8f36b194b03f893cd5af9fad5daf51e4283e870c0b115a0323f6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 771, - "startColumn": 7, - "charOffset": 24353, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 769, - "startColumn": 1, - "charOffset": 24261, - "charLength": 289, - "snippet": { - "text": "\t// onEquip(player, item, slot, isCheck)\r\n\t// onDeEquip(player, item, slot, isCheck)\r\n\tif (!getScriptInterface()->reserveScriptEnv()) {\r\n\t\tg_logger().error(\"[MoveEvent::executeEquip - Player {} item {}] \"\r\n\t\t \"Call stack overflow. Too many lua script calls being nested.\",\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0c0f495d7d9b5bf3", - "equalIndicator/v1": "f9ab86c266543c57e58d84c631d76e9f2e88a5fc0bf7419d69201839a7477b0a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 556, - "startColumn": 19, - "charOffset": 17128, - "charLength": 9, - "snippet": { - "text": "slotIndex" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 554, - "startColumn": 1, - "charOffset": 16888, - "charLength": 334, - "snippet": { - "text": "\t\t\t\tif (containerItem != item && containerItem->equals(item) && containerItem->getItemCount() < containerItem->getStackSize()) {\r\n\t\t\t\t\tuint32_t remainder = (containerItem->getStackSize() - containerItem->getItemCount());\r\n\t\t\t\t\tif (queryAdd(slotIndex++, item, remainder, flags) == RETURNVALUE_NOERROR) {\r\n\t\t\t\t\t\tn += remainder;\r\n\t\t\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "78350605d26183aa", - "equalIndicator/v1": "f9b9d9e0ca7772dcc41beb260bf19612142411a7ba19ca5f74e1bbb0e252bbe2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4910, - "startColumn": 29, - "charOffset": 146620, - "charLength": 10, - "snippet": { - "text": "soulChange" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4908, - "startColumn": 1, - "charOffset": 146521, - "charLength": 265, - "snippet": { - "text": "void Player::changeSoul(int32_t soulChange) {\r\n\tif (soulChange > 0) {\r\n\t\tsoul += std::min(soulChange * g_configManager().getFloat(RATE_SOUL_REGEN, __FUNCTION__), vocation->getSoulMax() - soul);\r\n\t} else {\r\n\t\tsoul = std::max(0, soul + soulChange);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "62231767ac5348d7", - "equalIndicator/v1": "f9fbe356a8ef25a69a844b84cdd03f3b679c8e17674d99e7cf25d1da5e2333ba" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined", - "markdown": "Narrowing conversion from 'int' to signed type 'int16_t' (aka 'short') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 581, - "startColumn": 104, - "charOffset": 27641, - "charLength": 14, - "snippet": { - "text": "valueAttribute" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 579, - "startColumn": 1, - "charOffset": 27409, - "charLength": 435, - "snippet": { - "text": "\t\tabilities.absorbPercent[combatTypeToIndex(COMBAT_DEATHDAMAGE)] += value;\r\n\t} else if (stringValue == \"absorbpercentenergy\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_ENERGYDAMAGE)] += pugi::cast(valueAttribute.value());\r\n\t} else if (stringValue == \"absorbpercentfire\") {\r\n\t\titemType.getAbilities().absorbPercent[combatTypeToIndex(COMBAT_FIREDAMAGE)] += pugi::cast(valueAttribute.value());\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a1ffe3ae11ba0388", - "equalIndicator/v1": "fa0433b6494a084c7b0c8f2a51f423e7f5cc1daa57271247fc1c948e168f34a8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'item' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3174, - "startColumn": 64, - "charOffset": 118278, - "charLength": 4, - "snippet": { - "text": "item" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3172, - "startColumn": 1, - "charOffset": 118210, - "charLength": 145, - "snippet": { - "text": "}\r\n\r\nObjectCategory_t Game::getObjectCategory(std::shared_ptr item) {\r\n\tObjectCategory_t category = OBJECTCATEGORY_DEFAULT;\r\n\tif (!item) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1cf3a0f37473ee1a", - "equalIndicator/v1": "fa0b34eaa96ae6f3fb6ce2f4b06c0d1227773da34ce76dd102f6da867ea245c5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #4 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #4 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 351, - "startColumn": 16, - "charOffset": 9513, - "charLength": 16, - "snippet": { - "text": "onRemoveTileItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 349, - "startColumn": 1, - "charOffset": 9493, - "charLength": 173, - "snippet": { - "text": "}\r\n\r\nvoid Creature::onRemoveTileItem(std::shared_ptr updateTile, const Position &pos, const ItemType &iType, std::shared_ptr) {\r\n\tif (!isMapLoaded) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "25996123a270dfbc", - "equalIndicator/v1": "fa0c9dfcd753696cf576fa616272d6ee3a9a6280d6ae2f342aa18d72ebc14272" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2132, - "startColumn": 52, - "charOffset": 62796, - "charLength": 4, - "snippet": { - "text": "task" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2130, - "startColumn": 1, - "charOffset": 62740, - "charLength": 136, - "snippet": { - "text": "}\r\n\r\nvoid Player::setNextWalkTask(std::shared_ptr task) {\r\n\tif (nextStepEvent != 0) {\r\n\t\tg_dispatcher().stopEvent(nextStepEvent);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c124241a66ac389e", - "equalIndicator/v1": "fa18b6d3d2e0e072cc58cd11704ac845beb2b88b5142e9804511f8fdc6dd0095" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #3 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #3 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 339, - "startColumn": 109, - "charOffset": 9183, - "charLength": 1, - "snippet": { - "text": "," - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 337, - "startColumn": 1, - "charOffset": 9070, - "charLength": 223, - "snippet": { - "text": "}\r\n\r\nvoid Creature::onUpdateTileItem(std::shared_ptr updateTile, const Position &pos, std::shared_ptr, const ItemType &oldType, std::shared_ptr, const ItemType &newType) {\r\n\tif (!isMapLoaded) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1d584352e3b1f46f", - "equalIndicator/v1": "fa1a7790bbf5ed1bd261ea17a5e747d416e9be118accb68415df2d9e331ef722" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 167, - "startColumn": 80, - "charOffset": 5125, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 165, - "startColumn": 1, - "charOffset": 5041, - "charLength": 194, - "snippet": { - "text": "}\r\n\r\nbool Weapon::useFist(std::shared_ptr player, std::shared_ptr target) {\r\n\tif (!Position::areInRange<1, 1>(player->getPosition(), target->getPosition())) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b8b8ed2b29b82aac", - "equalIndicator/v1": "fa1e4c0f255772dd08f8bc3907b4a08a4c392ff5c9c313b4b89db0755cca4a19" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Std::move of the variable 'newTargetPos' of the trivially-copyable type 'Position' has no effect; remove std::move()", - "markdown": "Std::move of the variable 'newTargetPos' of the trivially-copyable type 'Position' has no effect; remove std::move()" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 43, - "startColumn": 13, - "charOffset": 1432, - "charLength": 9, - "snippet": { - "text": "std::move" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 41, - "startColumn": 1, - "charOffset": 1348, - "charLength": 242, - "snippet": { - "text": "public:\r\n\texplicit FrozenPathingConditionCall(Position newTargetPos) :\r\n\t\ttargetPos(std::move(newTargetPos)) { }\r\n\r\n\tbool operator()(const Position &startPos, const Position &testPos, const FindPathParams &fpp, int32_t &bestMatchDist) const;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b46ce5c0085f19c1", - "equalIndicator/v1": "fa2dc86c0aa412fe2560544493ce4b64c544c963d55d75c7d0f8e3aa91cd1cdd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'time_t' (aka 'long long') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'time_t' (aka 'long long') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1740, - "startColumn": 36, - "charOffset": 51827, - "charLength": 4, - "snippet": { - "text": "time" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1738, - "startColumn": 1, - "charOffset": 51656, - "charLength": 250, - "snippet": { - "text": "\t\tif (getLastLogout() != 0) {\r\n\t\t\t// Not counting more than 21 days to prevent overflow when multiplying with 1000 (for milliseconds).\r\n\t\t\tofflineTime = std::min(time(nullptr) - getLastLogout(), 86400 * 21);\r\n\t\t} else {\r\n\t\t\tofflineTime = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "37ace78b5bd56f9a", - "equalIndicator/v1": "fa5bccdb8798a8adb52624090521b962f3ed3e0e861d1d596e28e562ce49f466" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'virtual' is redundant since the function is already declared 'override'", - "markdown": "'virtual' is redundant since the function is already declared 'override'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/cylinder.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 179, - "startColumn": 22, - "charOffset": 7043, - "charLength": 8, - "snippet": { - "text": "queryAdd" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 177, - "startColumn": 1, - "charOffset": 6961, - "charLength": 239, - "snippet": { - "text": "\tstatic std::shared_ptr virtualCylinder;\r\n\r\n\tvirtual ReturnValue queryAdd(int32_t, const std::shared_ptr &, uint32_t, uint32_t, std::shared_ptr = nullptr) override {\r\n\t\treturn RETURNVALUE_NOTPOSSIBLE;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "05ca809f11aa95c3", - "equalIndicator/v1": "fa6e8800c011bb9bacaca55729712e63fb6c25f378e62b06afe3996129e979f2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1091, - "startColumn": 60, - "charOffset": 45264, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1089, - "startColumn": 1, - "charOffset": 45200, - "charLength": 242, - "snippet": { - "text": "}\r\n\r\nbool Game::internalPlaceCreature(std::shared_ptr creature, const Position &pos, bool extendedPos /*=false*/, bool forced /*= false*/, bool creatureCheck /*= false*/) {\r\n\tif (creature->getParent() != nullptr) {\r\n\t\treturn false;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a2e70ee0e4ec949f", - "equalIndicator/v1": "fa7848e9828adbff2e6a5ea5bfd0d73933942b85ec3a904fd292272793c4d91a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'caster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1297, - "startColumn": 53, - "charOffset": 43232, - "charLength": 6, - "snippet": { - "text": "caster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1295, - "startColumn": 1, - "charOffset": 43175, - "charLength": 247, - "snippet": { - "text": "}\r\n\r\nvoid Combat::doCombatMana(std::shared_ptr caster, std::shared_ptr target, CombatDamage &damage, const CombatParams ¶ms) {\r\n\tdoCombatMana(caster, target, caster ? caster->getPosition() : Position(), damage, params);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6bc0af5c5d3b3d9a", - "equalIndicator/v1": "fa7cf22e465d1d45821f1157d4c5e2db9181ad842c3cf1ad2ede4c65991799dc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'party' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'party' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7908, - "startColumn": 76, - "charOffset": 248562, - "charLength": 5, - "snippet": { - "text": "party" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7906, - "startColumn": 1, - "charOffset": 248482, - "charLength": 165, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::updatePartyTrackerAnalyzer(const std::shared_ptr party) {\r\n\tif (oldProtocol || !player || !party || !party->getLeader()) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "171bd686e93db3ac", - "equalIndicator/v1": "fa7d13d811aee71cb50a03e246497881c17581529e042d06c2a72f29af34bd1d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/cylinder.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 150, - "startColumn": 19, - "charOffset": 6030, - "charLength": 16, - "snippet": { - "text": "getItemTypeCount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 148, - "startColumn": 1, - "charOffset": 5949, - "charLength": 152, - "snippet": { - "text": "\t * \\returns the amount of items of the asked item type\r\n\t */\r\n\tvirtual uint32_t getItemTypeCount(uint16_t itemId, int32_t subType = -1) const;\r\n\r\n\t/**\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d78af08df7f4f220", - "equalIndicator/v1": "fa8875fd16565f49b28cfea164394050e6a1beffe8cec959ed577964fb340d94" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Do not use 'compare' to test equality of strings; use the string equality operator instead", - "markdown": "Do not use 'compare' to test equality of strings; use the string equality operator instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2315, - "startColumn": 48, - "charOffset": 64378, - "charLength": 15, - "snippet": { - "text": "conditionOutfit" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2313, - "startColumn": 1, - "charOffset": 64217, - "charLength": 330, - "snippet": { - "text": "\r\n\t\tconst std::shared_ptr &conditionOutfit = addCondition->static_self_cast();\r\n\t\tif (!conditionOutfit->monsterName.empty() && conditionOutfit->monsterName.compare(monsterName) != 0) {\r\n\t\t\tconst auto monsterType = g_monsters().getMonsterType(conditionOutfit->monsterName);\r\n\t\t\tif (monsterType) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "802af88dbf594e3c", - "equalIndicator/v1": "faa32a73a27247902a99a6d409eb0ba8bf281dd8f0bd6ea5c8149ae36e358da8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/attribute.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 143, - "startColumn": 50, - "charOffset": 4411, - "charLength": 12, - "snippet": { - "text": "const double" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 141, - "startColumn": 1, - "charOffset": 4213, - "charLength": 290, - "snippet": { - "text": "\tvoid setCustomAttribute(const std::string &key, const int64_t value);\r\n\tvoid setCustomAttribute(const std::string &key, const std::string &value);\r\n\tvoid setCustomAttribute(const std::string &key, const double value);\r\n\tvoid setCustomAttribute(const std::string &key, const bool value);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0b1e91c84ac15b06", - "equalIndicator/v1": "fab45b19c9584886816991191311b0163247b1698714821aa0e5f31b08e50000" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2704, - "startColumn": 4, - "charOffset": 83425, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2702, - "startColumn": 1, - "charOffset": 83340, - "charLength": 213, - "snippet": { - "text": "\t\tuint16_t size = msg.get();\r\n\t\tfor (uint16_t i = 1; i <= size; i++) {\r\n\t\t\tuint16_t itemId = msg.get();\r\n\t\t\tuint64_t price = msg.get();\r\n\t\t\tplayer->setItemCustomPrice(itemId, price);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f5ece12efcac857b", - "equalIndicator/v1": "fad39377d6b89a507e3eb87fe2891da5bb70371d020c1d0a3d846dd1493ddc64" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'house' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 479, - "startColumn": 102, - "charOffset": 13737, - "charLength": 5, - "snippet": { - "text": "house" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 477, - "startColumn": 1, - "charOffset": 13631, - "charLength": 252, - "snippet": { - "text": "}\r\n\r\nstd::shared_ptr HouseTransferItem::createHouseTransferItem(std::shared_ptr house) {\r\n\tstd::shared_ptr transferItem = std::make_shared(house);\r\n\ttransferItem->setID(ITEM_DOCUMENT_RO);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a216eb5e49bafb69", - "equalIndicator/v1": "fafbfbc78302e9946702e21f1140f88399336a5f79399e04b619c9ad9b042ce8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'thing' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 935, - "startColumn": 51, - "charOffset": 28039, - "charLength": 5, - "snippet": { - "text": "thing" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 933, - "startColumn": 1, - "charOffset": 27984, - "charLength": 139, - "snippet": { - "text": "}\r\n\r\nvoid Container::removeItem(std::shared_ptr thing, bool sendUpdateToClient /* = false*/) {\r\n\tif (thing == nullptr) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e8b63a247adc9178", - "equalIndicator/v1": "fb0326b71a595c7319638cb975eab4c042a21cfb8a4193c2a9e4904a7becd983" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3239, - "startColumn": 83, - "charOffset": 99273, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3237, - "startColumn": 1, - "charOffset": 99186, - "charLength": 155, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::addCreatureIcon(NetworkMessage &msg, std::shared_ptr creature) {\r\n\tif (!creature || !player || oldProtocol) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "661bb71cb1195a8b", - "equalIndicator/v1": "fb0e3ebfd1759f2e598b87055ef306d3acdb6ad02117ebec8ff72bbe2cd2f5cd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Declaration uses identifier '_Ilist', which is a reserved identifier", - "markdown": "Declaration uses identifier '_Ilist', which is a reserved identifier" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/arraylist.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 34, - "startColumn": 49, - "charOffset": 985, - "charLength": 6, - "snippet": { - "text": "_Ilist" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 32, - "startColumn": 1, - "charOffset": 930, - "charLength": 117, - "snippet": { - "text": "\t\t}\r\n\r\n\t\tarraylist &operator=(std::initializer_list _Ilist) {\r\n\t\t\tbackContainer.assign(_Ilist);\r\n\t\t\treturn *this;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c14295f041c52e26", - "equalIndicator/v1": "fb1281d5c0891308d2d203e206c3fc593ba817c81196734d5e787350a9df7428" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/creature_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 704, - "startColumn": 2, - "charOffset": 19401, - "charLength": 8, - "snippet": { - "text": "uint32_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 702, - "startColumn": 1, - "charOffset": 19250, - "charLength": 323, - "snippet": { - "text": "\tConditionType_t conditionType = getNumber(L, 2);\r\n\tConditionId_t conditionId = getNumber(L, 3, CONDITIONID_COMBAT);\r\n\tuint32_t subId = getNumber(L, 4, 0);\r\n\tconst std::shared_ptr condition = creature->getCondition(conditionType, conditionId, subId);\r\n\tif (condition) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7cbd9d2377eced67", - "equalIndicator/v1": "fb23e46f1b344f36bd378f578463a0f3f9249b3654329a907b78aa79c4154f19" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 9255, - "startColumn": 46, - "charOffset": 323299, - "charLength": 10, - "snippet": { - "text": "totalPrice" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 9253, - "startColumn": 1, - "charOffset": 323174, - "charLength": 313, - "snippet": { - "text": "\r\n\t\tsellerPlayer->setBankBalance(sellerPlayer->getBankBalance() + totalPrice);\r\n\t\tg_metrics().addCounter(\"balance_increase\", totalPrice, { { \"player\", sellerPlayer->getName() }, { \"context\", \"market_sale\" } });\r\n\t\tif (it.id == ITEM_STORE_COIN) {\r\n\t\t\tconst auto &tranferable = enumToValue(CoinType::Transferable);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d0e000cdf44c24b9", - "equalIndicator/v1": "fb3b1caddbff1327843ed81b48984db958bc92bd89080d2c9766ce4aed7a4a8e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2576, - "startColumn": 28, - "charOffset": 76948, - "charLength": 5, - "snippet": { - "text": "count" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2574, - "startColumn": 1, - "charOffset": 76915, - "charLength": 116, - "snippet": { - "text": "\t}\r\n\r\n\tdouble_t result = round(((count * 100.) / nextLevelCount) * 100.) / 100.;\r\n\tif (result > 100) {\r\n\t\treturn 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4c2b6f32ca004161", - "equalIndicator/v1": "fb8710e1397a54cb3f9f04fd174414a0aceb097cfc2556407da71b5e0b8b973e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'hasImbuementType' can be made const", - "markdown": "Method 'hasImbuementType' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 694, - "startColumn": 7, - "charOffset": 19972, - "charLength": 16, - "snippet": { - "text": "hasImbuementType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 692, - "startColumn": 1, - "charOffset": 19916, - "charLength": 237, - "snippet": { - "text": "\t\treturn setImbuement(slot, imbuementId, 0);\r\n\t}\r\n\tbool hasImbuementType(ImbuementTypes_t imbuementType, uint16_t imbuementTier) {\r\n\t\tauto it = items[id].imbuementTypes.find(imbuementType);\r\n\t\tif (it != items[id].imbuementTypes.end()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "703f55fe09c41955", - "equalIndicator/v1": "fb9036614ab1a2a60b17020e47567e5aa4aa75389a71d11a1eeba685ddb5bb27" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double' to 'uint16_t' (aka 'unsigned short')", - "markdown": "Narrowing conversion from 'double' to 'uint16_t' (aka 'unsigned short')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 201, - "startColumn": 34, - "charOffset": 8046, - "charLength": 50, - "snippet": { - "text": "(std::floor(100. - imbuementAbsorbPercent) / 100.)" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 199, - "startColumn": 1, - "charOffset": 7816, - "charLength": 297, - "snippet": { - "text": "\t\t\t\t\t\tg_logger().debug(\"[cyclopedia damage reduction] imbued item {}, reduced {} percent, for element {}\", item->getName(), imbuementAbsorbPercent, combatTypeToName(indexToCombatType(combat)));\r\n\r\n\t\t\t\t\t\tdamageModifiers[combat] *= (std::floor(100. - imbuementAbsorbPercent) / 100.);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2acebe8fc7a6b7c7", - "equalIndicator/v1": "fb95cd9089e0713102ca8e6eb4e32f2d223c10182c7b901dc4fdacf615da25fb" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'target' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2365, - "startColumn": 54, - "charOffset": 69634, - "charLength": 6, - "snippet": { - "text": "target" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2363, - "startColumn": 1, - "charOffset": 69576, - "charLength": 228, - "snippet": { - "text": "}\r\n\r\nvoid Player::addExperience(std::shared_ptr target, uint64_t exp, bool sendText /* = false*/) {\r\n\tuint64_t currLevelExp = Player::getExpForLevel(level);\r\n\tuint64_t nextLevelExp = Player::getExpForLevel(level + 1);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "556b260a6ccd9364", - "equalIndicator/v1": "fba4d0d3fa7775c272f1a64361b454f3b67e49d55184f86748065e2d78419e0b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead", - "markdown": "'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 10082, - "startColumn": 32, - "charOffset": 350963, - "charLength": 9, - "snippet": { - "text": "std::atoi" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 10080, - "startColumn": 1, - "charOffset": 350791, - "charLength": 319, - "snippet": { - "text": "\t// Get interval time to fiendish\r\n\tstd::string saveIntervalType = g_configManager().getString(FORGE_FIENDISH_INTERVAL_TYPE, __FUNCTION__);\r\n\tauto saveIntervalConfigTime = std::atoi(g_configManager().getString(FORGE_FIENDISH_INTERVAL_TIME, __FUNCTION__).c_str());\r\n\tint intervalTime = 0;\r\n\ttime_t timeToChangeFiendish;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c92c2c24856a6bc7", - "equalIndicator/v1": "fbb732660ae23471da5da0999580e57e20b04704859a9edcf89dee15e3fc8091" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The const qualified parameter 'callback' is copied for each invocation; consider making it a reference", - "markdown": "The const qualified parameter 'callback' is copied for each invocation; consider making it a reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/events_callbacks.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 31, - "startColumn": 72, - "charOffset": 1014, - "charLength": 8, - "snippet": { - "text": "callback" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 29, - "startColumn": 1, - "charOffset": 938, - "charLength": 126, - "snippet": { - "text": "}\r\n\r\nvoid EventsCallbacks::addCallback(const std::shared_ptr callback) {\r\n\tm_callbacks.push_back(callback);\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "72b7911f68ae2d21", - "equalIndicator/v1": "fbe3d1fa65988ebf65fdcf696776a08fe8655b088b67906e360c56473b62f9f0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int' is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/creaturecallback.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 27, - "startColumn": 54, - "charOffset": 884, - "charLength": 6, - "snippet": { - "text": "params" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 25, - "startColumn": 1, - "charOffset": 802, - "charLength": 97, - "snippet": { - "text": "\r\n\tbool persistLuaState() {\r\n\t\treturn params > 0 && scriptInterface->callFunction(params);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "62ea56e7b107ac6e", - "equalIndicator/v1": "fbe610fc5f8f50b225f3c28fd99b6365ef6254bf7786aa7414011ae776b94c6e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 796, - "startColumn": 29, - "charOffset": 23768, - "charLength": 8, - "snippet": { - "text": "interval" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 794, - "startColumn": 1, - "charOffset": 23701, - "charLength": 147, - "snippet": { - "text": "\r\n\tif (challengeMeleeDuration != 0) {\r\n\t\tchallengeMeleeDuration -= interval;\r\n\t\tif (challengeMeleeDuration <= 0) {\r\n\t\t\tchallengeMeleeDuration = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fe8aa7d004c7498a", - "equalIndicator/v1": "fbef7e0e0704cc74b3d46e2284d1155c59b9879c38da0c72dbaeb957ec0f672b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 987, - "startColumn": 63, - "charOffset": 35609, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 985, - "startColumn": 1, - "charOffset": 35542, - "charLength": 263, - "snippet": { - "text": "}\r\n\r\nbool Events::eventPlayerOnTradeAccept(std::shared_ptr player, std::shared_ptr target, std::shared_ptr item, std::shared_ptr targetItem) {\r\n\t// Player:onTradeAccept(target, item, targetItem)\r\n\tif (info.playerOnTradeAccept == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ec9728a0206466c7", - "equalIndicator/v1": "fc0a3b51ed9a35555647ef0ecf7b7cad83303a19a8c564154fb89c2d0ea97540" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'creatureEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'creatureEvent' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/creatureevent.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 43, - "startColumn": 17, - "charOffset": 1077, - "charLength": 36, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 41, - "startColumn": 1, - "charOffset": 1038, - "charLength": 109, - "snippet": { - "text": "\r\n\tvoid clearEvent();\r\n\tvoid copyEvent(const std::shared_ptr creatureEvent);\r\n\r\n\t// scripting\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "11cf9cc01962d0c0", - "equalIndicator/v1": "fc0bd8ee395ea2d1f9fd0a06946d0c5cf5d0745df716a08ac9350a60a2191fa4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'monster' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1053, - "startColumn": 47, - "charOffset": 40101, - "charLength": 7, - "snippet": { - "text": "monster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1051, - "startColumn": 1, - "charOffset": 40000, - "charLength": 167, - "snippet": { - "text": "\tgetScriptInterface()->pushFunction(getScriptId());\r\n\r\n\tLuaScriptInterface::pushUserdata(L, monster);\r\n\tLuaScriptInterface::setMetatable(L, -1, \"Monster\");\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "947caad6c801224e", - "equalIndicator/v1": "fc2282e09a6d82fd7dd2132e3c16b3756160dbe16d746fc4197e585e1489db61" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'std::vector::size_type' (aka 'unsigned long long') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/player_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3151, - "startColumn": 58, - "charOffset": 111049, - "charLength": 25, - "snippet": { - "text": "wheelGemBasicSlot2Allowed" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3149, - "startColumn": 1, - "charOffset": 110910, - "charLength": 202, - "snippet": { - "text": "\tWheelGemBasicModifier_t modifier = modifier1;\r\n\twhile (modifier == modifier1) {\r\n\t\tmodifier = wheelGemBasicSlot2Allowed[uniform_random(0, wheelGemBasicSlot2Allowed.size() - 1)];\r\n\t}\r\n\treturn modifier;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ce9928d408514f17", - "equalIndicator/v1": "fc359bc154afcba151aec0b9d0cfa4b156b1cf410dcdbf31256840d75d8e5d93" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1824, - "startColumn": 3, - "charOffset": 55305, - "charLength": 8, - "snippet": { - "text": "uint16_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1822, - "startColumn": 1, - "charOffset": 55202, - "charLength": 351, - "snippet": { - "text": "\t\tObjectCategory_t category = (ObjectCategory_t)msg.getByte();\r\n\t\tPosition pos = msg.getPosition();\r\n\t\tuint16_t itemId = msg.get();\r\n\t\tuint8_t stackpos = msg.getByte();\r\n\t\tg_logger().debug(\"[{}] action {}, category {}, pos {}, itemId {}, stackPos {}\", __FUNCTION__, action, static_cast(category), pos.toString(), itemId, stackpos);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a0be7b5be0329ae1", - "equalIndicator/v1": "fc3e8db31f7bcc67eecf2623fa1a66700fe06948d05185b6b428df3ed2876e59" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 672, - "startColumn": 62, - "charOffset": 23951, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 670, - "startColumn": 1, - "charOffset": 23885, - "charLength": 244, - "snippet": { - "text": "}\r\n\r\nbool Events::eventPlayerOnLookInShop(std::shared_ptr player, const ItemType* itemType, uint8_t count) {\r\n\t// Player:onLookInShop(itemType, count) or Player.onLookInShop(self, itemType, count)\r\n\tif (info.playerOnLookInShop == -1) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "20e92fc51a412f30", - "equalIndicator/v1": "fc5f9917617062fce4263a08d216a152adf1ac1a39d596304641f69ef4782248" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')", - "markdown": "Narrowing conversion from 'double_t' (aka 'double') to 'uint8_t' (aka 'unsigned char')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2847, - "startColumn": 20, - "charOffset": 85194, - "charLength": 23, - "snippet": { - "text": "Player::getPercentLevel" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2845, - "startColumn": 1, - "charOffset": 85073, - "charLength": 238, - "snippet": { - "text": "\t\t\tuint64_t nextLevelExp = Player::getExpForLevel(level + 1);\r\n\t\t\tif (nextLevelExp > currLevelExp) {\r\n\t\t\t\tlevelPercent = Player::getPercentLevel(experience - currLevelExp, nextLevelExp - currLevelExp);\r\n\t\t\t} else {\r\n\t\t\t\tlevelPercent = 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b3e8a6a9f94c0eb8", - "equalIndicator/v1": "fc64c6315ecbbf2cff96f7ead645438e1ae1a57ffadeddb8b289e4bd5ba3bd0f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Loop variable has narrower type 'uint8_t' than iteration's upper bound 'std::basic_string::size_type'", - "markdown": "Loop variable has narrower type 'uint8_t' than iteration's upper bound 'std::basic_string::size_type'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 207, - "startColumn": 22, - "charOffset": 5084, - "charLength": 1, - "snippet": { - "text": "i" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 205, - "startColumn": 1, - "charOffset": 4982, - "charLength": 177, - "snippet": { - "text": "\t// hmac key pad generation\r\n\tstd::string iKeyPad(64, 0x36), oKeyPad(64, 0x5C);\r\n\tfor (uint8_t i = 0; i < key.length(); ++i) {\r\n\t\tiKeyPad[i] ^= key[i];\r\n\t\toKeyPad[i] ^= key[i];\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "82fe6bceb042ed5a", - "equalIndicator/v1": "fc8008ac8b028b2fc823d3d095aefa5b7d9d8f840a7cbc87b81933200e7675b0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/cylinder.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 109, - "startColumn": 15, - "charOffset": 4469, - "charLength": 19, - "snippet": { - "text": "postAddNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 107, - "startColumn": 1, - "charOffset": 4382, - "charLength": 236, - "snippet": { - "text": "\t * \\param link holds the relation the object has to the cylinder\r\n\t */\r\n\tvirtual void postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) = 0;\r\n\r\n\t/**\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "861a6b09a3337af5", - "equalIndicator/v1": "fc8ea8160699819801e2f102fc5c8d9be11d88eccecc6c1c8bef6ad285eded45" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 633, - "startColumn": 58, - "charOffset": 19661, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 631, - "startColumn": 1, - "charOffset": 19599, - "charLength": 210, - "snippet": { - "text": "}\r\n\r\nvoid Spell::getCombatDataAugment(std::shared_ptr player, CombatDamage &damage) {\r\n\tif (!(damage.instantSpellName).empty()) {\r\n\t\tconst auto equippedAugmentItems = player->getEquippedAugmentItems();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "17cc2e9585e3253f", - "equalIndicator/v1": "fc953feb3b1046cc6acd69cfc280639a935bc495038c7cbf1bc2e587553debe4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 680, - "startColumn": 65, - "charOffset": 18601, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 678, - "startColumn": 1, - "charOffset": 18532, - "charLength": 162, - "snippet": { - "text": "}\r\n\r\nvoid ConditionAttributes::updateBuffs(std::shared_ptr creature) {\r\n\tbool needUpdate = false;\r\n\tfor (int32_t i = BUFF_FIRST; i <= BUFF_LAST; ++i) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d2c960aa981d3ccf", - "equalIndicator/v1": "fce2a562ed6897565bd8f04304a77c804f378a7caaa7106b763a201a7c8a89db" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'hasCharmExpansion' can be made const", - "markdown": "Method 'hasCharmExpansion' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1943, - "startColumn": 7, - "charOffset": 57376, - "charLength": 17, - "snippet": { - "text": "hasCharmExpansion" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1941, - "startColumn": 1, - "charOffset": 57341, - "charLength": 87, - "snippet": { - "text": "\t\tcharmPoints = points;\r\n\t}\r\n\tbool hasCharmExpansion() {\r\n\t\treturn charmExpansion;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6b148f9f78734ac2", - "equalIndicator/v1": "fcf38c3a9345b2005bdea4503d502b9c14489c28d15b4aeda83fe90968219e28" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions", - "markdown": "Constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/kv/value_wrapper.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 36, - "startColumn": 18, - "charOffset": 1053, - "charLength": 12, - "snippet": { - "text": "ValueWrapper" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 34, - "startColumn": 1, - "charOffset": 978, - "charLength": 290, - "snippet": { - "text": "public:\r\n\texplicit ValueWrapper(uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const ValueVariant &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(const std::string &value, uint64_t timestamp = 0);\r\n\texplicit(false) ValueWrapper(bool value, uint64_t timestamp = 0);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9382eb905ad3f89d", - "equalIndicator/v1": "fd077f1a11ef56513a984fefc8a96685cd05a215fa10530640cf16051ad4865e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 584, - "startColumn": 41, - "charOffset": 22372, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 582, - "startColumn": 1, - "charOffset": 22326, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dffcd8168b9b4295", - "equalIndicator/v1": "fd12e632dd37d2019a7cfd5fa00f066513b46cd60e362d7f11e15e9d088d3f8b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 778, - "startColumn": 27, - "charOffset": 24657, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 776, - "startColumn": 1, - "charOffset": 24625, - "charLength": 129, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* env = getScriptInterface()->getScriptEnv();\r\n\tenv->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "529714da03de7e7e", - "equalIndicator/v1": "fd19da8910a2e6b0dd7ee6298c202564b268978f6792632fffe20ce7eb6aa518" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'creature' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6601, - "startColumn": 62, - "charOffset": 207050, - "charLength": 8, - "snippet": { - "text": "creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6599, - "startColumn": 1, - "charOffset": 206984, - "charLength": 164, - "snippet": { - "text": "}\r\n\r\nvoid ProtocolGame::sendAddCreature(std::shared_ptr creature, const Position &pos, int32_t stackpos, bool isLogin) {\r\n\tif (!canSee(pos)) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "00220d92c46bd70b", - "equalIndicator/v1": "fd300cba6f2b62cbab287a1745092a3a6a038905382199c04a164ab841353a7d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 7720, - "startColumn": 4, - "charOffset": 241990, - "charLength": 8, - "snippet": { - "text": "skills_t" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 7718, - "startColumn": 1, - "charOffset": 241906, - "charLength": 289, - "snippet": { - "text": "\tif (oldProtocol) {\r\n\t\tfor (uint8_t i = SKILL_FIRST; i <= SKILL_FISHING; ++i) {\r\n\t\t\tskills_t skill = static_cast(i);\r\n\t\t\tmsg.add(std::min(player->getSkillLevel(skill), std::numeric_limits::max()));\r\n\t\t\tmsg.add(player->getBaseSkill(skill));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ac47d1411270c5ca", - "equalIndicator/v1": "fd37b3fa4fa81aacf53140ed2e644c4b97e87f5a074ca443850b7aa972d8d316" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Method 'getDelay' can be made const", - "markdown": "Method 'getDelay' can be made const" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/modules/modules.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 45, - "startColumn": 10, - "charOffset": 1142, - "charLength": 8, - "snippet": { - "text": "getDelay" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 43, - "startColumn": 1, - "charOffset": 1127, - "charLength": 49, - "snippet": { - "text": "\t}\r\n\r\n\tint16_t getDelay() {\r\n\t\treturn delay;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8660219ff38c66da", - "equalIndicator/v1": "fd43a0fb7ef158e563ea6e0c0b0684e0ba37e7f5ef77b2029e3f533a97b94f4b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Use auto when initializing with a template cast to avoid duplicating the type name", - "markdown": "Use auto when initializing with a template cast to avoid duplicating the type name" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/item_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 537, - "startColumn": 8, - "charOffset": 13292, - "charLength": 8, - "snippet": { - "text": "ItemType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 535, - "startColumn": 1, - "charOffset": 13184, - "charLength": 227, - "snippet": { - "text": "int ItemTypeFunctions::luaItemTypeGetRequiredLevel(lua_State* L) {\r\n\t// itemType:getRequiredLevel()\r\n\tconst ItemType* itemType = getUserdata(L, 1);\r\n\tif (itemType) {\r\n\t\tlua_pushnumber(L, itemType->minReqLevel);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "73a88f36eaa5749a", - "equalIndicator/v1": "fd5be17e15a348c689218470b94055aa2d767a12bdbaaadebdfff7dead8b0583" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Default arguments on virtual or override methods are prohibited", - "markdown": "Default arguments on virtual or override methods are prohibited" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/rewards/rewardchest.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 25, - "startColumn": 7, - "charOffset": 836, - "charLength": 19, - "snippet": { - "text": "postAddNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 23, - "startColumn": 1, - "charOffset": 671, - "charLength": 463, - "snippet": { - "text": "\tReturnValue queryAdd(int32_t index, const std::shared_ptr &thing, uint32_t count, uint32_t flags, std::shared_ptr actor = nullptr) final;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) final;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4dad444e688dfca5", - "equalIndicator/v1": "fda419b1bd949da687893d4a93b52a4bfb61d5a5ba622369e974ce750513d94c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Std::move of the variable 'pos' of the trivially-copyable type 'Position' has no effect; remove std::move()", - "markdown": "Std::move of the variable 'pos' of the trivially-copyable type 'Position' has no effect; remove std::move()" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/movement/teleport.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 35, - "startColumn": 13, - "charOffset": 1012, - "charLength": 9, - "snippet": { - "text": "std::move" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 33, - "startColumn": 1, - "charOffset": 962, - "charLength": 72, - "snippet": { - "text": "\t}\r\n\tvoid setDestPos(Position pos) {\r\n\t\tdestPos = std::move(pos);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "46a790406cd33f10", - "equalIndicator/v1": "fdb5738557b13cad17ea980527df2e3526622aa9c31e8c51a54c131602e2b265" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/functions/iologindata_save_player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 454, - "startColumn": 62, - "charOffset": 18228, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 452, - "startColumn": 1, - "charOffset": 18162, - "charLength": 177, - "snippet": { - "text": "}\r\n\r\nbool IOLoginDataSave::savePlayerItem(std::shared_ptr player) {\r\n\tif (!player) {\r\n\t\tg_logger().warn(\"[IOLoginData::savePlayer] - Player nullptr: {}\", __FUNCTION__);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3b24c185b123f9d5", - "equalIndicator/v1": "fdb74f39ca1bd439054ce03b5e5f8a4506e94a99571efc7648352baccf0ccf59" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Repeated branch body in conditional chain", - "markdown": "Repeated branch body in conditional chain" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/global_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 44, - "startColumn": 22, - "charOffset": 1712, - "charLength": 1, - "snippet": { - "text": "{" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 42, - "startColumn": 1, - "charOffset": 1654, - "charLength": 161, - "snippet": { - "text": "\r\n\tauto parameters = lua_gettop(L);\r\n\tif (parameters > 4) {\r\n\t\t// subtype already supplied, count then is the amount\r\n\t\titemCount = std::max(1, count);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fb74a5e5ad2976b8", - "equalIndicator/v1": "fdc28a526325a933c9628527f843bd320034b831720b7ec3bdb2db8fe79c7daf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 100, - "startColumn": 6, - "charOffset": 3374, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 98, - "startColumn": 1, - "charOffset": 3340, - "charLength": 208, - "snippet": { - "text": "\r\n\tReturnValue returnValue;\r\n\tif (getScriptInterface()->protectedCall(L, 3, 1) != 0) {\r\n\t\treturnValue = RETURNVALUE_NOTPOSSIBLE;\r\n\t\tLuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(L));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "741bb00463bcd403", - "equalIndicator/v1": "fe27a6a0a3c9ba1f110b2077ce11bdf1b50a2422b6d43870151cf47a80cd78fd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 9797, - "startColumn": 48, - "charOffset": 342887, - "charLength": 7, - "snippet": { - "text": "monster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 9795, - "startColumn": 1, - "charOffset": 342835, - "charLength": 106, - "snippet": { - "text": "}\r\n\r\nvoid Game::addMonster(std::shared_ptr monster) {\r\n\tmonsters[monster->getID()] = monster;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6e248f82c476ac4a", - "equalIndicator/v1": "fe3bfa9c32de317f0db8012664f1d85e398f8a6396655a9787689f1c13e0bff6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/management/waitlist.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 116, - "startColumn": 64, - "charOffset": 3753, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 114, - "startColumn": 1, - "charOffset": 3685, - "charLength": 182, - "snippet": { - "text": "}\r\n\r\nstd::size_t WaitingList::getClientSlot(std::shared_ptr player) {\r\n\tauto it = info->playerReferences.find(player->getGUID());\r\n\tif (it == info->playerReferences.end()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "241fd88ae86a17e8", - "equalIndicator/v1": "fe476c50f60c6bb98b001eb6ebda951125fe9bfb1d1a1651d42cc436cdd7c2a0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'attacked' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 5175, - "startColumn": 50, - "charOffset": 152748, - "charLength": 8, - "snippet": { - "text": "attacked" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 5173, - "startColumn": 1, - "charOffset": 152694, - "charLength": 165, - "snippet": { - "text": "}\r\n\r\nvoid Player::addAttacked(std::shared_ptr attacked) {\r\n\tif (hasFlag(PlayerFlags_t::NotGainInFight) || !attacked || attacked == getPlayer()) {\r\n\t\treturn;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "932d1293fdb2b7d9", - "equalIndicator/v1": "fe48d706fe3e97b83b6059bbbcb65629e7ab14162aebbe9bb4655e0a4c1ba3b3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 167, - "startColumn": 7, - "charOffset": 4554, - "charLength": 9, - "snippet": { - "text": "isRemoved" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 165, - "startColumn": 1, - "charOffset": 4513, - "charLength": 103, - "snippet": { - "text": "\t\treturn getWalkDelay() <= 0;\r\n\t}\r\n\tbool isRemoved() override final {\r\n\t\treturn isInternalRemoved;\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1a6f61aef85803b6", - "equalIndicator/v1": "fe4d8938cc401c31ca18ebb268772a8d464641878596228f287657859636b543" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "'override' is redundant since the function is already declared 'final'", - "markdown": "'override' is redundant since the function is already declared 'final'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 234, - "startColumn": 7, - "charOffset": 7382, - "charLength": 19, - "snippet": { - "text": "postAddNotification" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 232, - "startColumn": 1, - "charOffset": 7304, - "charLength": 394, - "snippet": { - "text": "\tstd::shared_ptr getThing(size_t index) const override final;\r\n\r\n\tvoid postAddNotification(std::shared_ptr thing, std::shared_ptr oldParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r\n\tvoid postRemoveNotification(std::shared_ptr thing, std::shared_ptr newParent, int32_t index, CylinderLink_t link = LINK_OWNER) override final;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b32275e5108f38fd", - "equalIndicator/v1": "fe55bc9b756bf2f8e1dc27003a55689835287fa3a1cdb6e09e412bb5f1318247" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'double'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2397, - "startColumn": 11, - "charOffset": 70994, - "charLength": 3, - "snippet": { - "text": "exp" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2395, - "startColumn": 1, - "charOffset": 70856, - "charLength": 264, - "snippet": { - "text": "\tbool handleHazardExperience = monster && monster->getHazard() && getHazardSystemPoints() > 0;\r\n\tif (handleHazardExperience) {\r\n\t\texp += (exp * (1.75 * getHazardSystemPoints() * g_configManager().getFloat(HAZARD_EXP_BONUS_MULTIPLIER, __FUNCTION__))) / 100.;\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ef3f836cd3a8fb34", - "equalIndicator/v1": "fe5e812e5ce499ba35395abe67fdbfebc73f24d81ff95ad2d85fb7b24fd3f23b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'corpse' is passed by value and only copied once; consider moving it to avoid unnecessary copies", - "markdown": "Parameter 'corpse' is passed by value and only copied once; consider moving it to avoid unnecessary copies" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1890, - "startColumn": 34, - "charOffset": 56096, - "charLength": 6, - "snippet": { - "text": "corpse" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1888, - "startColumn": 1, - "charOffset": 55916, - "charLength": 239, - "snippet": { - "text": "\tbool updateKillTracker(std::shared_ptr corpse, const std::string &playerName, const Outfit_t creatureOutfit) const {\r\n\t\tif (client) {\r\n\t\t\tclient->sendKillTrackerUpdate(corpse, playerName, creatureOutfit);\r\n\t\t\treturn true;\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "522d45789685e98b", - "equalIndicator/v1": "fe7060497841a72a203189e97d1b263512f8781e43b15772aed983aebe958a87" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Static member accessed through instance", - "markdown": "Static member accessed through instance" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/callbacks/event_callback.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 813, - "startColumn": 41, - "charOffset": 31210, - "charLength": 18, - "snippet": { - "text": "getScriptInterface" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 811, - "startColumn": 1, - "charOffset": 31164, - "charLength": 157, - "snippet": { - "text": "\t}\r\n\r\n\tScriptEnvironment* scriptEnvironment = getScriptInterface()->getScriptEnv();\r\n\tscriptEnvironment->setScriptId(getScriptId(), getScriptInterface());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7568f60ed8bd87a1", - "equalIndicator/v1": "fe91dcad3464def3b5a75d473661627bddbd1111b01df44ebcf549983cd290e5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 488, - "startColumn": 61, - "charOffset": 14532, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 486, - "startColumn": 1, - "charOffset": 14467, - "charLength": 147, - "snippet": { - "text": "}\r\n\r\nbool Spell::playerInstantSpellCheck(std::shared_ptr player, const Position &toPos) const {\r\n\tif (toPos.x == 0xFFFF) {\r\n\t\treturn true;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "be410f4c19a92b7a", - "equalIndicator/v1": "fe98d3d92e5abc49399d5ab1f07814b22956aee110078f066c9c4502d8194616" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned int' to 'float'", - "markdown": "Narrowing conversion from 'unsigned int' to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 713, - "startColumn": 37, - "charOffset": 23164, - "charLength": 18, - "snippet": { - "text": "std::min" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 711, - "startColumn": 1, - "charOffset": 23102, - "charLength": 132, - "snippet": { - "text": "\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tchance = static_cast(std::min(skill, 30) * 3.20f) + 4;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2c2bf1f80cc81659", - "equalIndicator/v1": "fea6d385988ca4b84d7b6b51dffd2453733667253756a87f948d9b00cd51b3d6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'autoCreate' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'autoCreate' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 798, - "startColumn": 61, - "charOffset": 21604, - "charLength": 10, - "snippet": { - "text": "const bool" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 796, - "startColumn": 1, - "charOffset": 21504, - "charLength": 224, - "snippet": { - "text": "\tvoid removeConditionSuppressions();\r\n\r\n\tstd::shared_ptr getReward(const uint64_t rewardId, const bool autoCreate);\r\n\tvoid removeReward(uint64_t rewardId);\r\n\tvoid getRewardList(std::vector &rewards) const;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e8c6886d807d86f6", - "equalIndicator/v1": "feb09cf7314b855e5ebb6394571eb9898d2100162520341feec992e153b6bf5a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Return type 'const WeaponShared_ptr' (aka 'const shared_ptr') is 'const'-qualified at the top level, which may reduce code readability without improving const correctness", - "markdown": "Return type 'const WeaponShared_ptr' (aka 'const shared_ptr') is 'const'-qualified at the top level, which may reduce code readability without improving const correctness" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 22, - "startColumn": 1, - "charOffset": 649, - "charLength": 22, - "snippet": { - "text": "const WeaponShared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 20, - "startColumn": 1, - "charOffset": 615, - "charLength": 146, - "snippet": { - "text": "Weapons::~Weapons() = default;\r\n\r\nconst WeaponShared_ptr Weapons::getWeapon(std::shared_ptr item) const {\r\n\tif (!item) {\r\n\t\treturn nullptr;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1004a1f3daa0b5a1", - "equalIndicator/v1": "fec0a8a88c9cb77bcb282c4bcdae1193e49c84e210080e25dd568057fd0c4ecc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1606, - "startColumn": 51, - "charOffset": 63139, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1604, - "startColumn": 1, - "charOffset": 63084, - "charLength": 314, - "snippet": { - "text": "}\r\n\r\nvoid Game::playerMoveItem(std::shared_ptr player, const Position &fromPos, uint16_t itemId, uint8_t fromStackPos, const Position &toPos, uint8_t count, std::shared_ptr item, std::shared_ptr toCylinder) {\r\n\tif (!player->canDoAction()) {\r\n\t\tuint32_t delay = player->getNextActionTime();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ab1cfe111026f07e", - "equalIndicator/v1": "fec598d40f8c19405d71273579612c081656291cee983e88515c5c905b66a32c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'tradeItem' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'tradeItem' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 4899, - "startColumn": 123, - "charOffset": 175224, - "charLength": 9, - "snippet": { - "text": "tradeItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 4897, - "startColumn": 1, - "charOffset": 175097, - "charLength": 332, - "snippet": { - "text": "}\r\n\r\nbool Game::internalStartTrade(std::shared_ptr player, std::shared_ptr tradePartner, std::shared_ptr tradeItem) {\r\n\tif (player->tradeState != TRADE_NONE && !(player->tradeState == TRADE_ACKNOWLEDGE && player->tradePartner == tradePartner)) {\r\n\t\tplayer->sendCancelMessage(RETURNVALUE_YOUAREALREADYTRADING);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c149dc01ba37f0f5", - "equalIndicator/v1": "fec9a9d1f9115a7ed968063d1d58b3ea83ba111884cddd7c01b29092dd83d99c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/mapcache.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 89, - "startColumn": 44, - "charOffset": 3007, - "charLength": 10, - "snippet": { - "text": "itemInsede" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 87, - "startColumn": 1, - "charOffset": 2849, - "charLength": 195, - "snippet": { - "text": "\t\t\tif (auto itemInsede = createItem(BasicItemInside, position)) {\r\n\t\t\t\titem->getContainer()->addItem(itemInsede);\r\n\t\t\t\titem->getContainer()->updateItemWeight(itemInsede->getWeight());\r\n\t\t\t}\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3ccb34cbf0b62f40", - "equalIndicator/v1": "fece863dacce43aec9d18f05d8b03b5148d63ae4449055df84330397156dff8d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'monster' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 6794, - "startColumn": 116, - "charOffset": 234858, - "charLength": 7, - "snippet": { - "text": "monster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 6792, - "startColumn": 1, - "charOffset": 234715, - "charLength": 263, - "snippet": { - "text": "\r\n// Hazard combat helpers\r\nvoid Game::handleHazardSystemAttack(CombatDamage &damage, std::shared_ptr player, std::shared_ptr monster, bool isPlayerAttacker) {\r\n\tif (damage.primary.value != 0 && monster->getHazard()) {\r\n\t\tif (isPlayerAttacker) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1af761f9197748a5", - "equalIndicator/v1": "fed05e1afb1af7a0f9ad4ef7915b454b004e1a83941960cc8c34dd8cacd885df" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 633, - "startColumn": 15, - "charOffset": 18150, - "charLength": 12, - "snippet": { - "text": "onTradeEvent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 631, - "startColumn": 1, - "charOffset": 18104, - "charLength": 137, - "snippet": { - "text": "\t}\r\n\tvirtual void onRemoved();\r\n\tvirtual void onTradeEvent(TradeEvents_t, std::shared_ptr) { }\r\n\r\n\tvirtual void startDecaying();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "75fcce6de7279f6e", - "equalIndicator/v1": "fefe60e79ba4e9525fe356f402a7b738d8e2ca3ab541c43d7059bb3690a4a7ba" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined", - "markdown": "Narrowing conversion from 'unsigned int' to signed type 'int32_t' (aka 'int') is implementation-defined" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/imbuements/imbuements.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 243, - "startColumn": 18, - "charOffset": 8437, - "charLength": 18, - "snippet": { - "text": "std::min" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 241, - "startColumn": 1, - "charOffset": 8336, - "charLength": 175, - "snippet": { - "text": "\t\t\t\t\t\t\tint32_t chance = 100;\r\n\t\t\t\t\t\t\tif ((attr = childNode.attribute(\"chance\"))) {\r\n\t\t\t\t\t\t\t\tchance = std::min(10000, pugi::cast(attr.value()));\r\n\t\t\t\t\t\t\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7d8ef3c9b42d3482", - "equalIndicator/v1": "ff040bcf69b318d773a3e26a40416549a2d5014984b3994dca6484e4806bd1c7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')", - "markdown": "Narrowing conversion from 'uint64_t' (aka 'unsigned long long') to 'lua_Number' (aka 'double')" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/events.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1053, - "startColumn": 20, - "charOffset": 38026, - "charLength": 3, - "snippet": { - "text": "exp" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1051, - "startColumn": 1, - "charOffset": 38001, - "charLength": 62, - "snippet": { - "text": "\t}\r\n\r\n\tlua_pushnumber(L, exp);\r\n\tlua_pushnumber(L, rawExp);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d45c94c9adf0b833", - "equalIndicator/v1": "ff06e0cdd891f8127babec48dce001da7c6b65e358307bd5e3952335722bfb8b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter #2 is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 457, - "startColumn": 82, - "charOffset": 13627, - "charLength": 1, - "snippet": { - "text": "," - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 455, - "startColumn": 1, - "charOffset": 13541, - "charLength": 123, - "snippet": { - "text": "}\r\n\r\nuint32_t MoveEvent::StepOutField(std::shared_ptr, std::shared_ptr, const Position &) {\r\n\treturn 1;\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "286bce640bf055b5", - "equalIndicator/v1": "ff22f5307d2b5e1136eb2663b3bedd074d7fd633db5eed242eb38ceff67e1f19" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'newItem' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 415, - "startColumn": 108, - "charOffset": 12216, - "charLength": 7, - "snippet": { - "text": "newItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 413, - "startColumn": 1, - "charOffset": 12104, - "charLength": 206, - "snippet": { - "text": "}\r\n\r\nvoid Container::onUpdateContainerItem(uint32_t index, std::shared_ptr oldItem, std::shared_ptr newItem) {\r\n\tauto spectators = Spectators().find(getPosition(), false, 2, 2, 2, 2);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2a55aa736a0d3cc5", - "equalIndicator/v1": "ff329532afb04900f6b765d6438748dc7429e07f7ed5229c48ca732f34a51d5c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'", - "markdown": "Narrowing conversion from 'int32_t' (aka 'int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 41, - "startColumn": 11, - "charOffset": 1336, - "charLength": 5, - "snippet": { - "text": "mType" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 39, - "startColumn": 1, - "charOffset": 1259, - "charLength": 272, - "snippet": { - "text": "\tcurrentOutfit = mType->info.outfit;\r\n\tskull = mType->info.skull;\r\n\thealth = mType->info.health * mType->getHealthMultiplier();\r\n\thealthMax = mType->info.healthMax * mType->getHealthMultiplier();\r\n\trunAwayHealth = mType->info.runAwayHealth * mType->getHealthMultiplier();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c80fa09f90f8ae34", - "equalIndicator/v1": "ff5d494ae04ebaf0e608f9f445e121c12b6095b1992581215aabea6b7114fced" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 657, - "startColumn": 79, - "charOffset": 20911, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 655, - "startColumn": 1, - "charOffset": 20827, - "charLength": 225, - "snippet": { - "text": "};\r\n\r\nint32_t Spell::calculateAugmentSpellCooldownReduction(std::shared_ptr player) const {\r\n\tint32_t spellCooldown = 0;\r\n\tconst auto equippedAugmentItems = player->getEquippedAugmentItemsByType(Augment_t::Cooldown);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "20fe4806a352bb35", - "equalIndicator/v1": "ff6c27fe18f91684a88390c7e3538791a9412c18f921261b6670e557461e29da" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions", - "markdown": "Parameter 'charm' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iobestiary.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 70, - "startColumn": 35, - "charOffset": 2721, - "charLength": 28, - "snippet": { - "text": "const std::shared_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 68, - "startColumn": 1, - "charOffset": 2590, - "charLength": 274, - "snippet": { - "text": "\tuint16_t getBestiaryRaceUnlocked(std::shared_ptr player, BestiaryType_t race) const;\r\n\r\n\tint32_t bitToggle(int32_t input, const std::shared_ptr charm, bool on) const;\r\n\r\n\tbool hasCharmUnlockedRuneBit(const std::shared_ptr charm, int32_t input) const;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "46c8362f05118d87", - "equalIndicator/v1": "ff78756d43f00c5e5d6b4a4a05f6f593b435c50f567b95313c2b7449450c96c6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'", - "markdown": "Narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/vocations/vocation.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 72, - "startColumn": 10, - "charOffset": 1835, - "charLength": 16, - "snippet": { - "text": "gainHealthAmount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 70, - "startColumn": 1, - "charOffset": 1783, - "charLength": 138, - "snippet": { - "text": "\r\n\tuint32_t getHealthGainAmount() const {\r\n\t\treturn gainHealthAmount * g_configManager().getFloat(RATE_HEALTH_REGEN, __FUNCTION__);\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9deeba4c3fb7cac8", - "equalIndicator/v1": "ff7e77045d22c9781f5051e6825e1f6827c20bfdcbf493a8d68b460ddde41bc9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "ClangTidy", - "kind": "fail", - "level": "warning", - "message": { - "text": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference", - "markdown": "The parameter 'player' is copied for each invocation but only used as a const reference; consider making it a const reference" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 261, - "startColumn": 56, - "charOffset": 8530, - "charLength": 6, - "snippet": { - "text": "player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 259, - "startColumn": 1, - "charOffset": 8470, - "charLength": 179, - "snippet": { - "text": "}\r\n\r\nvoid Weapon::internalUseWeapon(std::shared_ptr player, std::shared_ptr item, std::shared_ptr tile) const {\r\n\tif (isLoadedCallback()) {\r\n\t\tLuaVariant var;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0638a64f903bd842", - "equalIndicator/v1": "ffc4bcffea854c25a62945778882259f7253fe86dc566bac22dd3403e1b76637" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "NotImplementedFunctions", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'addConditionSuppression' is not implemented", - "markdown": "Function 'addConditionSuppression' is not implemented" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 3011, - "startColumn": 2, - "charOffset": 91040, - "charLength": 113, - "snippet": { - "text": "void addConditionSuppression(const std::array &addConditions);" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 3009, - "startColumn": 1, - "charOffset": 90951, - "charLength": 248, - "snippet": { - "text": "\r\n\tbool isSuppress(ConditionType_t conditionType, bool attackerPlayer) const override;\r\n\tvoid addConditionSuppression(const std::array &addConditions);\r\n\r\n\tuint16_t getLookCorpse() const override;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4f270df86e978570", - "equalIndicator/v1": "10f8f7e223f98cb78c4118e8e06f9f06faa6dfde20554d49cfd11b67ec654df7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "NotImplementedFunctions", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'luaPlayerSendForgeError' is not implemented", - "markdown": "Function 'luaPlayerSendForgeError' is not implemented" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/player_functions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 667, - "startColumn": 2, - "charOffset": 36769, - "charLength": 49, - "snippet": { - "text": "static int luaPlayerSendForgeError(lua_State* L);" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 665, - "startColumn": 1, - "charOffset": 36673, - "charLength": 199, - "snippet": { - "text": "\tstatic int luaPlayerOpenForge(lua_State* L);\r\n\tstatic int luaPlayerCloseForge(lua_State* L);\r\n\tstatic int luaPlayerSendForgeError(lua_State* L);\r\n\r\n\tstatic int luaPlayerAddForgeDusts(lua_State* L);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d4fb45eb461032fa", - "equalIndicator/v1": "357f489d16c39045b8ca2bcebca5fb0f236f36b1a2d45f5fa6fdd8e088f07b52" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "NotImplementedFunctions", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'playerMoveThingFromDepotSearch' is not implemented", - "markdown": "Function 'playerMoveThingFromDepotSearch' is not implemented" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 392, - "startColumn": 2, - "charOffset": 20304, - "charLength": 185, - "snippet": { - "text": "void playerMoveThingFromDepotSearch(std::shared_ptr player, uint16_t itemId, uint8_t tier, uint8_t count, const Position &fromPos, const Position &toPos, bool allItems = false);" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 390, - "startColumn": 1, - "charOffset": 20108, - "charLength": 456, - "snippet": { - "text": "\tvoid playerRequestDepotSearchRetrieve(uint32_t playerId, uint16_t itemId, uint8_t tier, uint8_t type);\r\n\tvoid playerRequestOpenContainerFromDepotSearch(uint32_t playerId, const Position &pos);\r\n\tvoid playerMoveThingFromDepotSearch(std::shared_ptr player, uint16_t itemId, uint8_t tier, uint8_t count, const Position &fromPos, const Position &toPos, bool allItems = false);\r\n\r\n\tvoid playerRequestAddVip(uint32_t playerId, const std::string &name);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "48f0d3f3330da0db", - "equalIndicator/v1": "358f1745921c077cc1bb743de705a15026c999a89764a146d3c7e8f1e948de5d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "NotImplementedFunctions", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'sendInventory' is not implemented", - "markdown": "Function 'sendInventory' is not implemented" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 508, - "startColumn": 2, - "charOffset": 21481, - "charLength": 21, - "snippet": { - "text": "void sendInventory();" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 506, - "startColumn": 1, - "charOffset": 21456, - "charLength": 119, - "snippet": { - "text": "\tbool isOTC = false;\r\n\r\n\tvoid sendInventory();\r\n\tvoid sendOpenStash();\r\n\tvoid parseStashWithdraw(NetworkMessage &msg);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "caa417ac6332b127", - "equalIndicator/v1": "3b7c355dc7ab8fba5e720bc3b86a93cb4d34e5818edec03d32e030cd02f19c29" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "NotImplementedFunctions", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'addMagicEffect' is not implemented", - "markdown": "Function 'addMagicEffect' is not implemented" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 507, - "startColumn": 2, - "charOffset": 27409, - "charLength": 118, - "snippet": { - "text": "static void addMagicEffect(const std::vector> &players, const Position &pos, uint16_t effect);" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 505, - "startColumn": 1, - "charOffset": 27283, - "charLength": 411, - "snippet": { - "text": "\tvoid addPlayerVocation(const std::shared_ptr target);\r\n\tvoid addMagicEffect(const Position &pos, uint16_t effect);\r\n\tstatic void addMagicEffect(const std::vector> &players, const Position &pos, uint16_t effect);\r\n\tstatic void addMagicEffect(const CreatureVector &spectators, const Position &pos, uint16_t effect);\r\n\tvoid removeMagicEffect(const Position &pos, uint16_t effect);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "eec02da3543a8e48", - "equalIndicator/v1": "416603f82a0c34322e450928b424b11c1aa2197f735d3a685ea12e1ec31c5941" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "NotImplementedFunctions", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'luaPlayerIsSupplyStashAvailable' is not implemented", - "markdown": "Function 'luaPlayerIsSupplyStashAvailable' is not implemented" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/player_functions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 521, - "startColumn": 2, - "charOffset": 30932, - "charLength": 57, - "snippet": { - "text": "static int luaPlayerIsSupplyStashAvailable(lua_State* L);" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 519, - "startColumn": 1, - "charOffset": 30883, - "charLength": 207, - "snippet": { - "text": "\tstatic int luaPlayerSetGroup(lua_State* L);\r\n\r\n\tstatic int luaPlayerIsSupplyStashAvailable(lua_State* L);\r\n\tstatic int luaPlayerGetStashCounter(lua_State* L);\r\n\tstatic int luaPlayerOpenStash(lua_State* L);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "02e4bae876dbac77", - "equalIndicator/v1": "4355dd44111d32cfb5d68969979fed72ffcc81fc3bc958ee3cc18b33f4ffe74f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "NotImplementedFunctions", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'luaNpcTypeRespawnType' is not implemented", - "markdown": "Function 'luaNpcTypeRespawnType' is not implemented" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/npc/npc_type_functions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 80, - "startColumn": 2, - "charOffset": 4466, - "charLength": 47, - "snippet": { - "text": "static int luaNpcTypeRespawnType(lua_State* L);" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 78, - "startColumn": 1, - "charOffset": 4413, - "charLength": 150, - "snippet": { - "text": "\tstatic int luaNpcTypeFloorChange(lua_State* L);\r\n\r\n\tstatic int luaNpcTypeRespawnType(lua_State* L);\r\n\tstatic int luaNpcTypeCanSpawn(lua_State* L);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d1036850887c3d0d", - "equalIndicator/v1": "44536b63bc47318cfcf7f6a0452c49370237668d105ab602b98848f18b072655" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "NotImplementedFunctions", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'clearPosMap' is not implemented", - "markdown": "Function 'clearPosMap' is not implemented" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 119, - "startColumn": 2, - "charOffset": 3648, - "charLength": 57, - "snippet": { - "text": "void clearPosMap(std::map &map);" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 117, - "startColumn": 1, - "charOffset": 3575, - "charLength": 264, - "snippet": { - "text": "private:\r\n\tvoid clearMap(std::map &map) const;\r\n\tvoid clearPosMap(std::map &map);\r\n\r\n\tbool registerEvent(const std::shared_ptr moveEvent, int32_t id, std::map &moveListMap) const;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "3d52f68ab778dc9a", - "equalIndicator/v1": "44de03239e685456188e66c85ee675188513687c4cea2a6cb4141da4def26605" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "NotImplementedFunctions", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'sendForgeFusionItem' is not implemented", - "markdown": "Function 'sendForgeFusionItem' is not implemented" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 261, - "startColumn": 2, - "charOffset": 9646, - "charLength": 137, - "snippet": { - "text": "void sendForgeFusionItem(\r\n\t\tuint16_t itemId,\r\n\t\tuint8_t tier,\r\n\t\tbool success,\r\n\t\tuint8_t bonus,\r\n\t\tuint8_t coreCount,\r\n\t\tbool convergen" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 259, - "startColumn": 1, - "charOffset": 9547, - "charLength": 440, - "snippet": { - "text": "\tvoid parseForgeEnter(NetworkMessage &msg);\r\n\tvoid parseForgeBrowseHistory(NetworkMessage &msg);\r\n\tvoid sendForgeFusionItem(\r\n\t\tuint16_t itemId,\r\n\t\tuint8_t tier,\r\n\t\tbool success,\r\n\t\tuint8_t bonus,\r\n\t\tuint8_t coreCount,\r\n\t\tbool convergence\r\n\t);\r\n\tvoid sendForgeResult(ForgeAction_t actionType, uint16_t leftItemId, uint8_t leftTier, uint16_t rightItemId, uint8_t rightTier, bool success, uint8_t bonus, uint8_t coreCount, bool convergence);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d88c05a32b95fa39", - "equalIndicator/v1": "48878d7611ff7d7926ccdf826c1b9232eaf4c3973981a052260461624eddc25a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "NotImplementedFunctions", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'luaMonsterTypeRespawnType' is not implemented", - "markdown": "Function 'luaMonsterTypeRespawnType' is not implemented" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/monster_type_functions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 163, - "startColumn": 2, - "charOffset": 11274, - "charLength": 51, - "snippet": { - "text": "static int luaMonsterTypeRespawnType(lua_State* L);" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 161, - "startColumn": 1, - "charOffset": 11167, - "charLength": 212, - "snippet": { - "text": "\tstatic int luaMonsterTypeFamiliar(lua_State* L);\r\n\tstatic int luaMonsterTypeIsRewardBoss(lua_State* L);\r\n\tstatic int luaMonsterTypeRespawnType(lua_State* L);\r\n\tstatic int luaMonsterTypeCanSpawn(lua_State* L);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "92ac68337533431c", - "equalIndicator/v1": "58dc31b5f6aa2202d0efc7829865016a5e019f6b1d398d113c2322ff6f2ca2b5" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "NotImplementedFunctions", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'getNPCSkips' is not implemented", - "markdown": "Function 'getNPCSkips' is not implemented" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 969, - "startColumn": 2, - "charOffset": 26960, - "charLength": 46, - "snippet": { - "text": "std::unordered_set getNPCSkips();" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 967, - "startColumn": 1, - "charOffset": 26953, - "charLength": 128, - "snippet": { - "text": "\t}\r\n\r\n\tstd::unordered_set getNPCSkips();\r\n\r\n\tstd::shared_ptr getWeapon(Slots_t slot, bool ignoreAmmo) const;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "27552b78c1c9cfff", - "equalIndicator/v1": "657e4cbc0fb8704441faaa6181df8d30e0030ec6f0a967f25979539d818fbaf4" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "NotImplementedFunctions", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'luaDeleteLoot' is not implemented", - "markdown": "Function 'luaDeleteLoot' is not implemented" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/loot_functions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 41, - "startColumn": 2, - "charOffset": 2075, - "charLength": 39, - "snippet": { - "text": "static int luaDeleteLoot(lua_State* L);" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 39, - "startColumn": 1, - "charOffset": 2022, - "charLength": 183, - "snippet": { - "text": "private:\r\n\tstatic int luaCreateLoot(lua_State* L);\r\n\tstatic int luaDeleteLoot(lua_State* L);\r\n\tstatic int luaLootSetId(lua_State* L);\r\n\tstatic int luaLootSetIdFromName(lua_State* L);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2c30a4894e433ab6", - "equalIndicator/v1": "8e300459d85e9c651011963a2e128ff87f0c0faabf29df7462ea5710d09066c7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "NotImplementedFunctions", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'parseObjectInfo' is not implemented", - "markdown": "Function 'parseObjectInfo' is not implemented" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 165, - "startColumn": 2, - "charOffset": 5800, - "charLength": 42, - "snippet": { - "text": "void parseObjectInfo(NetworkMessage &msg);" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 163, - "startColumn": 1, - "charOffset": 5682, - "charLength": 206, - "snippet": { - "text": "\tvoid parseBestiarysendMonsterData(NetworkMessage &msg);\r\n\tvoid parseCyclopediaMonsterTracker(NetworkMessage &msg);\r\n\tvoid parseObjectInfo(NetworkMessage &msg);\r\n\r\n\tvoid parseTeleport(NetworkMessage &msg);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f0dd45fbec8894d8", - "equalIndicator/v1": "90a56cfecb506b2e4de288ad597df2b3f2448a42ed1cfef1744b9dd32051e02b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "NotImplementedFunctions", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'getMitigationMultiplier' is not implemented", - "markdown": "Function 'getMitigationMultiplier' is not implemented" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 987, - "startColumn": 2, - "charOffset": 27803, - "charLength": 39, - "snippet": { - "text": "double getMitigationMultiplier() const;" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 985, - "startColumn": 1, - "charOffset": 27719, - "charLength": 171, - "snippet": { - "text": "\tfloat getDefenseFactor() const override;\r\n\tfloat getMitigation() const override;\r\n\tdouble getMitigationMultiplier() const;\r\n\r\n\tvoid addInFightTicks(bool pzlock = false);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5c021cb3b99f7570", - "equalIndicator/v1": "acd87e6b0915b1f4d1a2bd8983e8779161717dbac4e638968e7b7849d7604fd2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "NotImplementedFunctions", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'try_create' is not implemented", - "markdown": "Function 'try_create' is not implemented" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/di/shared.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 41, - "startColumn": 5, - "charOffset": 1126, - "charLength": 183, - "snippet": { - "text": "template \r\n\t\t\t\tstatic auto try_create(const TProvider &provider)\r\n\t\t\t\t\t-> decltype(wrappers::shared { std::shared_ptr { provider.get() } }" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 39, - "startColumn": 1, - "charOffset": 1029, - "charLength": 294, - "snippet": { - "text": "\t\t\t\tusing is_referable = typename wrappers::shared::template is_referable;\r\n\r\n\t\t\t\ttemplate \r\n\t\t\t\tstatic auto try_create(const TProvider &provider)\r\n\t\t\t\t\t-> decltype(wrappers::shared { std::shared_ptr { provider.get() } });\r\n\r\n\t\t\t\t/**\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "863c152667a4ea57", - "equalIndicator/v1": "cf0d8beff5544e3551db2be07291db8f3408d09cc327c4b9c4cde8e6ce66990f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "NotImplementedFunctions", - "kind": "fail", - "level": "warning", - "message": { - "text": "Function 'clearMap' is not implemented", - "markdown": "Function 'clearMap' is not implemented" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 118, - "startColumn": 2, - "charOffset": 3586, - "charLength": 59, - "snippet": { - "text": "void clearMap(std::map &map) const;" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 116, - "startColumn": 1, - "charOffset": 3573, - "charLength": 135, - "snippet": { - "text": "\r\nprivate:\r\n\tvoid clearMap(std::map &map) const;\r\n\tvoid clearPosMap(std::map &map);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "89fc0c03c0e88841", - "equalIndicator/v1": "d083d734640d5f69f399a26918046a629111e88158ab61f30e31a55d48ba3961" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "note", - "message": { - "text": "The file is too complex to perform the data-flow analysis", - "markdown": "The file is too complex to perform the data-flow analysis" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/combat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 27, - "startColumn": 17, - "charOffset": 960, - "charLength": 15, - "snippet": { - "text": "getLevelFormula" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 25, - "startColumn": 1, - "charOffset": 895, - "charLength": 220, - "snippet": { - "text": "#include \"lua/callbacks/events_callbacks.hpp\"\r\n\r\nint32_t Combat::getLevelFormula(std::shared_ptr player, const std::shared_ptr wheelSpell, const CombatDamage &damage) const {\r\n\tif (!player) {\r\n\t\treturn 0;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ab761d93c2e78b04", - "equalIndicator/v1": "0abbba1fb8aea2f8138832ce31a046712f1078d0da3ca63164669b8f6f05dd27" - }, - "properties": { - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "warning", - "message": { - "text": "Index may have a value of '5' which is out of bounds", - "markdown": "Index may have a value of '5' which is out of bounds" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/imbuements/imbuements.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 238, - "startColumn": 8, - "charOffset": 8217, - "charLength": 24, - "snippet": { - "text": "imbuement.stats[skillId]" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 236, - "startColumn": 1, - "charOffset": 8126, - "charLength": 209, - "snippet": { - "text": "\t\t\t\t\t\t\timbuement.skills[skillId] = bonus;\r\n\t\t\t\t\t\t} else if (usenormalskill == 2) {\r\n\t\t\t\t\t\t\timbuement.stats[skillId] = bonus;\r\n\t\t\t\t\t\t} else if (usenormalskill == 3) {\r\n\t\t\t\t\t\t\timbuement.skills[skillId] = bonus;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "22535eccbe923376", - "equalIndicator/v1": "14e003fc980e3e8e84a9d39bb0d4ed66ca49d24ac521c6fd187e0dfc951b7eb3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "warning", - "message": { - "text": "Unreachable code", - "markdown": "Unreachable code" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/npcs/spawns/spawn_npc.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 40, - "startColumn": 28, - "charOffset": 1246, - "charLength": 5, - "snippet": { - "text": "child" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 38, - "startColumn": 1, - "charOffset": 1198, - "charLength": 165, - "snippet": { - "text": "\tsetLoaded(true);\r\n\r\n\tfor (auto spawnNode : doc.child(\"npcs\").children()) {\r\n\t\tPosition centerPos(\r\n\t\t\tpugi::cast(spawnNode.attribute(\"centerx\").value()),\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "277e83c71b5c6b79", - "equalIndicator/v1": "1b9d6ec2818f4e7f49c4183c3d0ba09eb56dc7764a63aa5158ebd07bfaf180ae" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "warning", - "message": { - "text": "Local variable 'measure' is only assigned but never accessed", - "markdown": "Local variable 'measure' is only assigned but never accessed" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/database/database.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 136, - "startColumn": 25, - "charOffset": 4111, - "charLength": 7, - "snippet": { - "text": "measure" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 134, - "startColumn": 1, - "charOffset": 4063, - "charLength": 167, - "snippet": { - "text": "\tmeasureLock.stop();\r\n\r\n\tmetrics::query_latency measure(query.substr(0, 50));\r\n\tbool success = retryQuery(query, 10);\r\n\tmysql_free_result(mysql_store_result(handle));\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ba9d5d56c569c73c", - "equalIndicator/v1": "1cba6483aad051220b82c1adda6cc42dee160af1fbcfcced1bc1df5752faa1d6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "warning", - "message": { - "text": "Unreachable code", - "markdown": "Unreachable code" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/game_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 172, - "startColumn": 13, - "charOffset": 5457, - "charLength": 4, - "snippet": { - "text": "auto" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 170, - "startColumn": 1, - "charOffset": 5426, - "charLength": 158, - "snippet": { - "text": "\r\n\tint index = 0;\r\n\tfor (const auto &playerEntry : g_game().getPlayers()) {\r\n\t\tpushUserdata(L, playerEntry.second);\r\n\t\tsetMetatable(L, -1, \"Player\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "78638c4c37fe593a", - "equalIndicator/v1": "2492c632200cc8e2b59ff8e32affd5b49b945fde162b3a8ce06c625fe1fba0f7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "warning", - "message": { - "text": "Unreachable code", - "markdown": "Unreachable code" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/npcs/spawns/spawn_npc.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 62, - "startColumn": 25, - "charOffset": 2022, - "charLength": 9, - "snippet": { - "text": "spawnNode" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 60, - "startColumn": 1, - "charOffset": 1896, - "charLength": 272, - "snippet": { - "text": "\t\tconst auto &spawnNpc = spawnNpcList.emplace_back(std::make_shared(centerPos, radius));\r\n\r\n\t\tfor (auto childNode : spawnNode.children()) {\r\n\t\t\tif (strcasecmp(childNode.name(), \"npc\") == 0) {\r\n\t\t\t\tpugi::xml_attribute nameAttribute = childNode.attribute(\"name\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4abe65d6fae1fde0", - "equalIndicator/v1": "2641b1dccb85062c785181760fb9135f2e643eb3c15ae34b53b1077732c1cc06" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "note", - "message": { - "text": "The file is too complex to perform the data-flow analysis", - "markdown": "The file is too complex to perform the data-flow analysis" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 43, - "startColumn": 7, - "charOffset": 1634, - "charLength": 5, - "snippet": { - "text": "House" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 41, - "startColumn": 1, - "charOffset": 1577, - "charLength": 102, - "snippet": { - "text": "#include \"creatures/players/vip/player_vip.hpp\"\r\n\r\nclass House;\r\nclass NetworkMessage;\r\nclass Weapon;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "751895ef872011ef", - "equalIndicator/v1": "274f53d859bafa12f3e24c804c5bcb1cc120693e7f08b78f3464da47efb7218b" - }, - "properties": { - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "note", - "message": { - "text": "The file is too complex to perform the data-flow analysis", - "markdown": "The file is too complex to perform the data-flow analysis" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/item_parse.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 18, - "startColumn": 17, - "charOffset": 614, - "charLength": 9, - "snippet": { - "text": "initParse" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 16, - "startColumn": 1, - "charOffset": 556, - "charLength": 297, - "snippet": { - "text": "#include \"creatures/combat/combat.hpp\"\r\n\r\nvoid ItemParse::initParse(const std::string &tmpStrValue, pugi::xml_node attributeNode, pugi::xml_attribute valueAttribute, ItemType &itemType) {\r\n\t// Parse all item attributes\r\n\tItemParse::parseType(tmpStrValue, attributeNode, valueAttribute, itemType);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "30e522e0c10f11d9", - "equalIndicator/v1": "2d451231da035cd3b875bc29386b11f5a0f769b27cd940186483527ab4ac43b2" - }, - "properties": { - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "warning", - "message": { - "text": "Unreachable code", - "markdown": "Unreachable code" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/interactions/chat.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 281, - "startColumn": 30, - "charOffset": 8669, - "charLength": 5, - "snippet": { - "text": "child" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 279, - "startColumn": 1, - "charOffset": 8634, - "charLength": 222, - "snippet": { - "text": "\t}\r\n\r\n\tfor (auto channelNode : doc.child(\"channels\").children()) {\r\n\t\tuint16_t channelId = pugi::cast(channelNode.attribute(\"id\").value());\r\n\t\tstd::string channelName = channelNode.attribute(\"name\").as_string();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c6078671ae825078", - "equalIndicator/v1": "30c58a02e50e29f55fad5e1a53ec7d6776bdf2a3c75bf01d49d580c612079fd8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "note", - "message": { - "text": "The file is too complex to perform the data-flow analysis", - "markdown": "The file is too complex to perform the data-flow analysis" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/lua_enums.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 65, - "startColumn": 16, - "charOffset": 3721, - "charLength": 4, - "snippet": { - "text": "init" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 63, - "startColumn": 1, - "charOffset": 3694, - "charLength": 93, - "snippet": { - "text": "\tvoid(0)\r\n\r\nvoid LuaEnums::init(lua_State* L) {\r\n\tinitOthersEnums(L);\r\n\tinitAccountEnums(L);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "87c609a13bef03aa", - "equalIndicator/v1": "36e6bab31a1fd98d9da0dafd8aec27e30197972b55d0580e5435bb37c9621814" - }, - "properties": { - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "note", - "message": { - "text": "The file is too complex to perform the data-flow analysis", - "markdown": "The file is too complex to perform the data-flow analysis" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/wheel/player_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 82, - "startColumn": 7, - "charOffset": 3960, - "charLength": 14, - "snippet": { - "text": "checkSpellArea" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 80, - "startColumn": 1, - "charOffset": 3909, - "charLength": 252, - "snippet": { - "text": "namespace {\r\n\ttemplate \r\n\tbool checkSpellArea(const std::array &spellsTable, const std::string &spellName, uint8_t stage) {\r\n\t\tfor (const auto &spellTable : spellsTable) {\r\n\t\t\tauto size = std::ssize(spellTable.grade);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c4cc770d4bac92c8", - "equalIndicator/v1": "3ef605dd0b4d4a710e51495f862aa5fb547368adac6fac223d6916211d70f4e7" - }, - "properties": { - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "note", - "message": { - "text": "The file is too complex to perform the data-flow analysis", - "markdown": "The file is too complex to perform the data-flow analysis" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 30, - "startColumn": 29, - "charOffset": 978, - "charLength": 10, - "snippet": { - "text": "CreateItem" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 28, - "startColumn": 1, - "charOffset": 928, - "charLength": 327, - "snippet": { - "text": "Items Item::items;\r\n\r\nstd::shared_ptr Item::CreateItem(const uint16_t type, uint16_t count /*= 0*/, Position* itemPosition /*= nullptr*/) {\r\n\t// A map which contains items that, when on creating, should be transformed to the default type.\r\n\tstatic const phmap::flat_hash_map ItemTransformationMap = {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "6cf0f2812c973015", - "equalIndicator/v1": "3f7a3e31ebd9dd1d8b0d7313dac567977fecf3fb71583d2eade29a0cdbcd6c88" - }, - "properties": { - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "note", - "message": { - "text": "The file is too complex to perform the data-flow analysis", - "markdown": "The file is too complex to perform the data-flow analysis" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 60, - "startColumn": 7, - "charOffset": 2173, - "charLength": 15, - "snippet": { - "text": "sendBlockEffect" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 58, - "startColumn": 1, - "charOffset": 2139, - "charLength": 253, - "snippet": { - "text": "\r\nnamespace InternalGame {\r\n\tvoid sendBlockEffect(BlockType_t blockType, CombatType_t combatType, const Position &targetPos, std::shared_ptr source) {\r\n\t\tif (blockType == BLOCK_DEFENSE) {\r\n\t\t\tg_game().addMagicEffect(targetPos, CONST_ME_POFF);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "b6665bfaf19f3236", - "equalIndicator/v1": "4337642edb3e13f026e4d6d54409f2ee9f7bbbe7811428fb15b7642a273978bb" - }, - "properties": { - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "warning", - "message": { - "text": "Unreachable code", - "markdown": "Unreachable code" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/appearance/outfit/outfit.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 37, - "startColumn": 29, - "charOffset": 1066, - "charLength": 5, - "snippet": { - "text": "child" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 35, - "startColumn": 1, - "charOffset": 1032, - "charLength": 164, - "snippet": { - "text": "\t}\r\n\r\n\tfor (auto outfitNode : doc.child(\"outfits\").children()) {\r\n\t\tpugi::xml_attribute attr;\r\n\t\tif ((attr = outfitNode.attribute(\"enabled\")) && !attr.as_bool()) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c420aed2bdd7037c", - "equalIndicator/v1": "4b5483c5d8013268dd675549a391b1b4ed98d939d09bdfe5dfd5d9a95152c948" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "warning", - "message": { - "text": "Condition is always true", - "markdown": "Condition is always true" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/items.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 214, - "startColumn": 43, - "charOffset": 5302, - "charLength": 25, - "snippet": { - "text": "weaponType != WEAPON_NONE" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 212, - "startColumn": 1, - "charOffset": 5230, - "charLength": 130, - "snippet": { - "text": "\t}\r\n\tbool isRanged() const {\r\n\t\treturn weaponType == WEAPON_DISTANCE && weaponType != WEAPON_NONE;\r\n\t}\r\n\tbool isMissile() const {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ec98fee2a5d2a695", - "equalIndicator/v1": "4ff9bf773f7fad947f28bdf308733da82ccbef1d7a69459501d28d25d0caee98" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "note", - "message": { - "text": "The file is too complex to perform the data-flow analysis", - "markdown": "The file is too complex to perform the data-flow analysis" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/monster/monster_type_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 20, - "startColumn": 28, - "charOffset": 722, - "charLength": 29, - "snippet": { - "text": "createMonsterTypeLootLuaTable" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 18, - "startColumn": 1, - "charOffset": 657, - "charLength": 195, - "snippet": { - "text": "#include \"lua/scripts/scripts.hpp\"\r\n\r\nvoid MonsterTypeFunctions::createMonsterTypeLootLuaTable(lua_State* L, const std::vector &lootList) {\r\n\tlua_createtable(L, lootList.size(), 0);\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5dc36c4bd579b824", - "equalIndicator/v1": "58a37db3fb1bca56ff8bd43145383a6088d5be0700acb1ca33c8eba7e8c8aef9" - }, - "properties": { - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "warning", - "message": { - "text": "Local variable 'measure' is only assigned but never accessed", - "markdown": "Local variable 'measure' is only assigned but never accessed" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/scripts/luascript.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 268, - "startColumn": 23, - "charOffset": 7047, - "charLength": 7, - "snippet": { - "text": "measure" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 266, - "startColumn": 1, - "charOffset": 6970, - "charLength": 163, - "snippet": { - "text": "\r\nbool LuaScriptInterface::callFunction(int params) {\r\n\tmetrics::lua_latency measure(getMetricsScope());\r\n\tbool result = false;\r\n\tint size = lua_gettop(luaState);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e25f279e4b471b45", - "equalIndicator/v1": "5bd66c68e2f58cbd6e21c4a3313f6e178a50d2245c96d9b67f97da3085aec0ea" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "warning", - "message": { - "text": "Local variable 'success' is only assigned but never accessed", - "markdown": "Local variable 'success' is only assigned but never accessed" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/database/databasetasks.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 27, - "startColumn": 8, - "charOffset": 934, - "charLength": 7, - "snippet": { - "text": "success" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 25, - "startColumn": 1, - "charOffset": 753, - "charLength": 355, - "snippet": { - "text": "void DatabaseTasks::execute(const std::string &query, std::function callback /* nullptr */) {\r\n\tthreadPool.detach_task([this, query, callback]() {\r\n\t\tbool success = db.executeQuery(query);\r\n\t\tif (callback != nullptr) {\r\n\t\t\tg_dispatcher().addEvent([callback, success]() { callback(nullptr, success); }, \"DatabaseTasks::execute\");\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "121f3bf500b8fec3", - "equalIndicator/v1": "5eed351711de2c00c083377be60608ee9faa7f0968d2d949de262e04ace1ea24" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "note", - "message": { - "text": "The file is too complex to perform the data-flow analysis", - "markdown": "The file is too complex to perform the data-flow analysis" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/monsters/monster.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 26, - "startColumn": 35, - "charOffset": 881, - "charLength": 13, - "snippet": { - "text": "createMonster" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 24, - "startColumn": 1, - "charOffset": 798, - "charLength": 196, - "snippet": { - "text": "uint32_t Monster::monsterAutoID = 0x50000001;\r\n\r\nstd::shared_ptr Monster::createMonster(const std::string &name) {\r\n\tconst auto mType = g_monsters().getMonsterType(name);\r\n\tif (!mType) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e6bf098d1beae520", - "equalIndicator/v1": "6001040e49b1ba6bb201336db6a57ffc1060d5e39462077e768b870691d99335" - }, - "properties": { - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "warning", - "message": { - "text": "Condition is always true", - "markdown": "Condition is always true" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/items.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 217, - "startColumn": 42, - "charOffset": 5402, - "charLength": 25, - "snippet": { - "text": "weaponType != WEAPON_NONE" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 215, - "startColumn": 1, - "charOffset": 5330, - "charLength": 105, - "snippet": { - "text": "\t}\r\n\tbool isMissile() const {\r\n\t\treturn weaponType == WEAPON_MISSILE && weaponType != WEAPON_NONE;\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bfe13f3e86c7b4f2", - "equalIndicator/v1": "6b64f3f2f4879ec077567cff0a78b5e99cd9ec30e14ab8e89dda785dc0481a88" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "note", - "message": { - "text": "The file is too complex to perform the data-flow analysis", - "markdown": "The file is too complex to perform the data-flow analysis" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 56, - "startColumn": 11, - "charOffset": 2347, - "charLength": 25, - "snippet": { - "text": "getIterationIncreaseCount" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 54, - "startColumn": 1, - "charOffset": 2300, - "charLength": 182, - "snippet": { - "text": "namespace {\r\n\ttemplate \r\n\tuint16_t getIterationIncreaseCount(T &map) {\r\n\t\tuint16_t totalIterationCount = 0;\r\n\t\tfor ([[maybe_unused]] const auto &[first, second] : map) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e2215423f0cb7935", - "equalIndicator/v1": "6c3b81de00c889d4e6e06528c89b0e05d5799e3df440503d9838d136bb6e636a" - }, - "properties": { - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "warning", - "message": { - "text": "Local variable is only assigned but never accessed", - "markdown": "Local variable is only assigned but never accessed" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/mapcache.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 329, - "startColumn": 5, - "charOffset": 8930, - "charLength": 20, - "snippet": { - "text": "// if (!str.empty())" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 327, - "startColumn": 1, - "charOffset": 8862, - "charLength": 122, - "snippet": { - "text": "\t\t\tcase ATTR_DESC: {\r\n\t\t\t\tconst auto str = stream.getString();\r\n\t\t\t\t// if (!str.empty())\r\n\t\t\t\t//\ttext = str;\r\n\t\t\t} break;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "af6d3b16a52aff71", - "equalIndicator/v1": "75e740ffe92e5307dd4e95efb1618c9de5feecd91cfcecbd8f6944bae8914304" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "note", - "message": { - "text": "The file is too complex to perform the data-flow analysis", - "markdown": "The file is too complex to perform the data-flow analysis" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 47, - "startColumn": 9, - "charOffset": 1786, - "charLength": 6, - "snippet": { - "text": "Player" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 45, - "startColumn": 1, - "charOffset": 1740, - "charLength": 115, - "snippet": { - "text": "MuteCountMap Player::muteCountMap;\r\n\r\nPlayer::Player(ProtocolGame_ptr p) :\r\n\tCreature(),\r\n\tlastPing(OTSYS_TIME()),\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "e10d02c0e55e9976", - "equalIndicator/v1": "769448563f42af1dbca688526ba6cd8dd7e32a044add200481922820ccaf3752" - }, - "properties": { - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "note", - "message": { - "text": "The file is too complex to perform the data-flow analysis", - "markdown": "The file is too complex to perform the data-flow analysis" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 22, - "startColumn": 33, - "charOffset": 681, - "charLength": 9, - "snippet": { - "text": "getWeapon" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 20, - "startColumn": 1, - "charOffset": 615, - "charLength": 146, - "snippet": { - "text": "Weapons::~Weapons() = default;\r\n\r\nconst WeaponShared_ptr Weapons::getWeapon(std::shared_ptr item) const {\r\n\tif (!item) {\r\n\t\treturn nullptr;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "76daf66dde4f80c2", - "equalIndicator/v1": "797d0a5095f18b684878e2ea79ef62e3f223dc1785daa3ceb06ecd766b50c5a5" - }, - "properties": { - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "note", - "message": { - "text": "The file is too complex to perform the data-flow analysis", - "markdown": "The file is too complex to perform the data-flow analysis" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/config/configmanager.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 22, - "startColumn": 31, - "charOffset": 666, - "charLength": 11, - "snippet": { - "text": "getInstance" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 20, - "startColumn": 1, - "charOffset": 626, - "charLength": 93, - "snippet": { - "text": "#endif\r\n\r\nConfigManager &ConfigManager::getInstance() {\r\n\treturn inject();\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "65b7b8044261fc29", - "equalIndicator/v1": "8ccea17d2e28870a92153e5ec0123cf0f95c354e15414660a0965142c3dc501c" - }, - "properties": { - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "note", - "message": { - "text": "The file is too complex to perform the data-flow analysis", - "markdown": "The file is too complex to perform the data-flow analysis" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/io_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 53, - "startColumn": 7, - "charOffset": 2151, - "charLength": 23, - "snippet": { - "text": "registerWheelSpellTable" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 51, - "startColumn": 1, - "charOffset": 2115, - "charLength": 239, - "snippet": { - "text": "\t */\r\n\ttemplate \r\n\tvoid registerWheelSpellTable(const T &spellData, const std::string &name, WheelSpellGrade_t gradeType) {\r\n\t\tif (name == \"Any_Focus_Mage_Spell\") {\r\n\t\t\tfor (const std::string &focusSpellName : m_focusSpells) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "464987a0a65381a7", - "equalIndicator/v1": "9014067abe6006abe1722748acef0b1591bca6c4a2480703cdc444714feffa82" - }, - "properties": { - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "note", - "message": { - "text": "The file is too complex to perform the data-flow analysis", - "markdown": "The file is too complex to perform the data-flow analysis" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/tools.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 16, - "startColumn": 6, - "charOffset": 484, - "charLength": 13, - "snippet": { - "text": "printXMLError" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 14, - "startColumn": 1, - "charOffset": 449, - "charLength": 235, - "snippet": { - "text": "#include \"utils/tools.hpp\"\r\n\r\nvoid printXMLError(const std::string &where, const std::string &fileName, const pugi::xml_parse_result &result) {\r\n\tg_logger().error(\"[{}] Failed to load {}: {}\", where, fileName, result.description());\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1ea7b986a4d7c520", - "equalIndicator/v1": "9506e05bc39d8ba502425a035bf44e597c8bbb57af8a5d8284bd176954fee2dd" - }, - "properties": { - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "note", - "message": { - "text": "The file is too complex to perform the data-flow analysis", - "markdown": "The file is too complex to perform the data-flow analysis" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/creatures/player/player_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 34, - "startColumn": 22, - "charOffset": 1284, - "charLength": 22, - "snippet": { - "text": "luaPlayerSendInventory" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 32, - "startColumn": 1, - "charOffset": 1225, - "charLength": 194, - "snippet": { - "text": "#include \"enums/account_coins.hpp\"\r\n\r\nint PlayerFunctions::luaPlayerSendInventory(lua_State* L) {\r\n\t// player:sendInventory()\r\n\tstd::shared_ptr player = getUserdataShared(L, 1);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f4a64902032e3c2b", - "equalIndicator/v1": "97780d4c5b9c9c43b7e45d456ea5fffcf29da5afb43d47dddb76d6552f7591fe" - }, - "properties": { - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "note", - "message": { - "text": "The file is too complex to perform the data-flow analysis", - "markdown": "The file is too complex to perform the data-flow analysis" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/condition.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 22, - "startColumn": 17, - "charOffset": 619, - "charLength": 8, - "snippet": { - "text": "setParam" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 20, - "startColumn": 1, - "charOffset": 596, - "charLength": 125, - "snippet": { - "text": " */\r\n\r\nbool Condition::setParam(ConditionParam_t param, int32_t value) {\r\n\tswitch (param) {\r\n\t\tcase CONDITION_PARAM_TICKS: {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1815774cc2eb9d7c", - "equalIndicator/v1": "a23d30f799cf29bc073484a8981eadaf01fbf587d0c5a56e593ee8126112a2c1" - }, - "properties": { - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "note", - "message": { - "text": "The file is too complex to perform the data-flow analysis", - "markdown": "The file is too complex to perform the data-flow analysis" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 20, - "startColumn": 8, - "charOffset": 637, - "charLength": 5, - "snippet": { - "text": "House" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 18, - "startColumn": 1, - "charOffset": 592, - "charLength": 91, - "snippet": { - "text": "#include \"lib/metrics/metrics.hpp\"\r\n\r\nHouse::House(uint32_t houseId) :\r\n\tid(houseId) { }\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "79db7a1923a323c5", - "equalIndicator/v1": "b112e4c28cea6d39ac6b92cadbf22bb9df22e8ab82cd2b1e4b0b7a64a971b6ed" - }, - "properties": { - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "note", - "message": { - "text": "The file is too complex to perform the data-flow analysis", - "markdown": "The file is too complex to perform the data-flow analysis" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 27, - "startColumn": 28, - "charOffset": 856, - "charLength": 14, - "snippet": { - "text": "playerSaySpell" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 25, - "startColumn": 1, - "charOffset": 797, - "charLength": 248, - "snippet": { - "text": "Spells::~Spells() = default;\r\n\r\nTalkActionResult_t Spells::playerSaySpell(std::shared_ptr player, std::string &words) {\r\n\tauto maxOnline = g_configManager().getNumber(MAX_PLAYERS_PER_ACCOUNT, __FUNCTION__);\r\n\tauto tile = player->getTile();\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5c4a73d4b8c53b57", - "equalIndicator/v1": "b878397f6916ab8db1bcaac04d4441bb5e4547a79fabe7dbaccfaf5e83154e25" - }, - "properties": { - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "note", - "message": { - "text": "The file is too complex to perform the data-flow analysis", - "markdown": "The file is too complex to perform the data-flow analysis" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/tile.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 29, - "startColumn": 12, - "charOffset": 1018, - "charLength": 11, - "snippet": { - "text": "hasProperty" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 27, - "startColumn": 1, - "charOffset": 935, - "charLength": 171, - "snippet": { - "text": "const std::shared_ptr &Tile::nullptr_tile = real_nullptr_tile;\r\n\r\nbool Tile::hasProperty(ItemProperty prop) const {\r\n\tswitch (prop) {\r\n\t\tcase CONST_PROP_BLOCKSOLID:\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4aa05e2de6559114", - "equalIndicator/v1": "ba281f3c00b67bdc9839a0ea3ac2f28b5f7884a02b18d1d6dd87d40f4d1d79d3" - }, - "properties": { - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "note", - "message": { - "text": "The file is too complex to perform the data-flow analysis", - "markdown": "The file is too complex to perform the data-flow analysis" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/item.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 21, - "startColumn": 7, - "charOffset": 670, - "charLength": 8, - "snippet": { - "text": "Creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 19, - "startColumn": 1, - "charOffset": 632, - "charLength": 81, - "snippet": { - "text": "#include \"io/fileloader.hpp\"\r\n\r\nclass Creature;\r\nclass Player;\r\nclass Container;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "9ce9dc6427c00d28", - "equalIndicator/v1": "c4ee3a22da3ac3586f08e41b93caa44df4e61bde56e9068a2c98e658bb56caa9" - }, - "properties": { - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "warning", - "message": { - "text": "Local variable 'measure' is only assigned but never accessed", - "markdown": "Local variable 'measure' is only assigned but never accessed" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/database/database.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 154, - "startColumn": 25, - "charOffset": 4603, - "charLength": 7, - "snippet": { - "text": "measure" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 152, - "startColumn": 1, - "charOffset": 4555, - "charLength": 134, - "snippet": { - "text": "\tmeasureLock.stop();\r\n\r\n\tmetrics::query_latency measure(query.substr(0, 50));\r\nretry:\r\n\tif (mysql_query(handle, query.data()) != 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "be4fd8ace12f2f8c", - "equalIndicator/v1": "cdc783d5e576fc6cc513df4cf5bd1aaf5b17b4649f0dfa9733ef2215a3186305" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "warning", - "message": { - "text": "The address of the local variable 'it' may escape the function", - "markdown": "The address of the local variable 'it' may escape the function" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/ioprey.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 620, - "startColumn": 3, - "charOffset": 23198, - "charLength": 11, - "snippet": { - "text": "return *it;" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 618, - "startColumn": 1, - "charOffset": 23162, - "charLength": 54, - "snippet": { - "text": "\r\n\tif (it != taskOption.end()) {\r\n\t\treturn *it;\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d87721e4362a2fdf", - "equalIndicator/v1": "d445e824245ff897e398d54274d84039c5705644a1d2dcdbdc9440cf7ca42267" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "warning", - "message": { - "text": "Local variable 'measure' is only assigned but never accessed", - "markdown": "Local variable 'measure' is only assigned but never accessed" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/scripts/luascript.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 287, - "startColumn": 23, - "charOffset": 7620, - "charLength": 7, - "snippet": { - "text": "measure" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 285, - "startColumn": 1, - "charOffset": 7539, - "charLength": 193, - "snippet": { - "text": "\r\nvoid LuaScriptInterface::callVoidFunction(int params) {\r\n\tmetrics::lua_latency measure(getMetricsScope());\r\n\tint size = lua_gettop(luaState);\r\n\tif (protectedCall(luaState, params, 0) != 0) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ce00ededcaac50a4", - "equalIndicator/v1": "d528fd5e71b2753006d5e4aacd7078b4ee81878469f28d676ec006ffcc2c923f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "warning", - "message": { - "text": "Unreachable code", - "markdown": "Unreachable code" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/zones/zone.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 209, - "startColumn": 14, - "charOffset": 5864, - "charLength": 10, - "snippet": { - "text": "clearZones" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 207, - "startColumn": 1, - "charOffset": 5842, - "charLength": 116, - "snippet": { - "text": "\t\t}\r\n\t}\r\n\tstatic void clearZones();\r\n\r\n\tstatic bool loadFromXML(const std::string &fileName, uint16_t shiftID = 0);\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a096ad8ff05c1410", - "equalIndicator/v1": "e2fae79eec162188968f3f393881b783f0ec0980a42009be7669d68263ba9bee" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "note", - "message": { - "text": "The file is too complex to perform the data-flow analysis", - "markdown": "The file is too complex to perform the data-flow analysis" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/map.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 23, - "startColumn": 11, - "charOffset": 702, - "charLength": 4, - "snippet": { - "text": "load" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 21, - "startColumn": 1, - "charOffset": 659, - "charLength": 132, - "snippet": { - "text": "#include \"map/spectators.hpp\"\r\n\r\nvoid Map::load(const std::string &identifier, const Position &pos) {\r\n\ttry {\r\n\t\tpath = identifier;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7c9a678a600abc52", - "equalIndicator/v1": "e3aa1417e9b5720082c906581a4101cedf72ca58634e5b0df2c5cb301714a263" - }, - "properties": { - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "warning", - "message": { - "text": "Unreachable code", - "markdown": "Unreachable code" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/actions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 166, - "startColumn": 2, - "charOffset": 5077, - "charLength": 140, - "snippet": { - "text": "g_logger().debug(\"[{}] missing or incorrect script: {}\", __FUNCTION__, action->getScriptInterface()->getLoadingScriptName());\r\n\treturn false" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 164, - "startColumn": 1, - "charOffset": 5055, - "charLength": 169, - "snippet": { - "text": "\t\treturn false;\r\n\t}\r\n\tg_logger().debug(\"[{}] missing or incorrect script: {}\", __FUNCTION__, action->getScriptInterface()->getLoadingScriptName());\r\n\treturn false;\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f64b601cfc5fa081", - "equalIndicator/v1": "f07556ec12ee794ea1ac1e12e3c2f9fd4cac130d42b234b6414cab4c13d02f31" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "warning", - "message": { - "text": "Unreachable code", - "markdown": "Unreachable code" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/functions/item/custom_attribute.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 41, - "startColumn": 3, - "charOffset": 1318, - "charLength": 10, - "snippet": { - "text": "return {};" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 39, - "startColumn": 1, - "charOffset": 1304, - "charLength": 31, - "snippet": { - "text": "\t\t\t);\r\n\t\t}\r\n\t\treturn {};\r\n\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c43bf1dfc06febde", - "equalIndicator/v1": "f5e66ca4a7d1e7dc04b75eecea40ac2fe9793842ec71f94b419e348133ac3941" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "note", - "message": { - "text": "The file is too complex to perform the data-flow analysis", - "markdown": "The file is too complex to perform the data-flow analysis" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 21, - "startColumn": 11, - "charOffset": 688, - "charLength": 8, - "snippet": { - "text": "Creature" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 19, - "startColumn": 1, - "charOffset": 640, - "charLength": 82, - "snippet": { - "text": "#include \"lib/metrics/metrics.hpp\"\r\n\r\nCreature::Creature() {\r\n\tonIdleStatus();\r\n}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8927424b7a19c8b5", - "equalIndicator/v1": "fa3423b22348d0ef0581b6769c29a2d831c931702e15d7f3a8556106e0ff2427" - }, - "properties": { - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCDFA", - "kind": "fail", - "level": "warning", - "message": { - "text": "Local variable 'measure' is only assigned but never accessed", - "markdown": "Local variable 'measure' is only assigned but never accessed" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/scripts/luascript.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 241, - "startColumn": 26, - "charOffset": 6325, - "charLength": 7, - "snippet": { - "text": "measure" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 239, - "startColumn": 1, - "charOffset": 6245, - "charLength": 148, - "snippet": { - "text": "\r\nstd::string LuaScriptInterface::getMetricsScope() {\r\n\tmetrics::method_latency measure(__METHOD_NAME__);\r\n\tint32_t scriptId;\r\n\tint32_t callbackId;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "761ce4891d7fcf1a", - "equalIndicator/v1": "ffbba6ed3d53658d7d0d4a0a1a154a4d29a3e2460d42ef182036c53b953f58d2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedIncludeDirective", - "kind": "fail", - "level": "warning", - "message": { - "text": "Unused \"#include \"lua/scripts/scripts.hpp\"\"", - "markdown": "Unused \"#include \"lua/scripts/scripts.hpp\"\"" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/events/global_event_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 15, - "startColumn": 1, - "charOffset": 526, - "charLength": 34, - "snippet": { - "text": "#include \"lua/scripts/scripts.hpp\"" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 13, - "startColumn": 1, - "charOffset": 461, - "charLength": 130, - "snippet": { - "text": "#include \"game/game.hpp\"\r\n#include \"lua/global/globalevent.hpp\"\r\n#include \"lua/scripts/scripts.hpp\"\r\n#include \"utils/tools.hpp\"\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "da75861ef4afa179", - "equalIndicator/v1": "24be6c828aa95d9f567d39b5c277e340d454127b7e27d2a71cefa23271eb152f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedIncludeDirective", - "kind": "fail", - "level": "warning", - "message": { - "text": "Unused \"#include \"utils/definitions.hpp\"\"", - "markdown": "Unused \"#include \"utils/definitions.hpp\"\"" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/account/account.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 16, - "startColumn": 1, - "charOffset": 518, - "charLength": 32, - "snippet": { - "text": "#include \"utils/definitions.hpp\"" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 14, - "startColumn": 1, - "charOffset": 435, - "charLength": 175, - "snippet": { - "text": "#include \"account/account_repository_db.hpp\"\r\n#include \"config/configmanager.hpp\"\r\n#include \"utils/definitions.hpp\"\r\n#include \"security/argon.hpp\"\r\n#include \"utils/tools.hpp\"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7c79a1d71b9af08c", - "equalIndicator/v1": "2b088538da68694f59ae093b47427041b099cf1af4fdc42c49bf869d8fe81d25" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedIncludeDirective", - "kind": "fail", - "level": "warning", - "message": { - "text": "Unused \"#include \"items/item.hpp\"\"", - "markdown": "Unused \"#include \"items/item.hpp\"\"" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/map/teleport_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 13, - "startColumn": 1, - "charOffset": 440, - "charLength": 25, - "snippet": { - "text": "#include \"items/item.hpp\"" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 11, - "startColumn": 1, - "charOffset": 399, - "charLength": 122, - "snippet": { - "text": "\r\n#include \"game/movement/teleport.hpp\"\r\n#include \"items/item.hpp\"\r\n#include \"lua/functions/map/teleport_functions.hpp\"\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "11af23bb01d66a4d", - "equalIndicator/v1": "6a712870aafd9b7285ba27d9817ed115e05c2796c248a19fc25908cac8ebe191" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedIncludeDirective", - "kind": "fail", - "level": "warning", - "message": { - "text": "Unused \"#include \"config/configmanager.hpp\"\"", - "markdown": "Unused \"#include \"config/configmanager.hpp\"\"" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/lua_enums.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 17, - "startColumn": 1, - "charOffset": 594, - "charLength": 35, - "snippet": { - "text": "#include \"config/configmanager.hpp\"" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 15, - "startColumn": 1, - "charOffset": 504, - "charLength": 190, - "snippet": { - "text": "#include \"creatures/players/wheel/wheel_definitions.hpp\"\r\n#include \"io/io_bosstiary.hpp\"\r\n#include \"config/configmanager.hpp\"\r\n#include \"creatures/creature.hpp\"\r\n#include \"declarations.hpp\"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2725270849793c78", - "equalIndicator/v1": "a1455cccd8f4c444a611ce72404f83815ce7297e6777d7f4ad1877c76da1ea1e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedIncludeDirective", - "kind": "fail", - "level": "warning", - "message": { - "text": "Unused \"#include \"creatures/players/cyclopedia/player_title.hpp\"\"", - "markdown": "Unused \"#include \"creatures/players/cyclopedia/player_title.hpp\"\"" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 32, - "startColumn": 1, - "charOffset": 1259, - "charLength": 56, - "snippet": { - "text": "#include \"creatures/players/cyclopedia/player_title.hpp\"" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 30, - "startColumn": 1, - "charOffset": 1138, - "charLength": 284, - "snippet": { - "text": "#include \"creatures/players/cyclopedia/player_badge.hpp\"\r\n#include \"creatures/players/cyclopedia/player_cyclopedia.hpp\"\r\n#include \"creatures/players/cyclopedia/player_title.hpp\"\r\n#include \"creatures/players/grouping/familiars.hpp\"\r\n#include \"server/network/protocol/protocolgame.hpp\"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8e0f044ad2fe46c1", - "equalIndicator/v1": "b566d92129891052ca756d355f6b3dac415d4c0430e5d668bc5aa7e6b017e62a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedIncludeDirective", - "kind": "fail", - "level": "warning", - "message": { - "text": "Unused \"#include \"creatures/players/wheel/wheel_gems.hpp\"\"", - "markdown": "Unused \"#include \"creatures/players/wheel/wheel_gems.hpp\"\"" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/core/game/lua_enums.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 14, - "startColumn": 1, - "charOffset": 453, - "charLength": 49, - "snippet": { - "text": "#include \"creatures/players/wheel/wheel_gems.hpp\"" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 12, - "startColumn": 1, - "charOffset": 401, - "charLength": 192, - "snippet": { - "text": "#include \"lua/functions/core/game/lua_enums.hpp\"\r\n\r\n#include \"creatures/players/wheel/wheel_gems.hpp\"\r\n#include \"creatures/players/wheel/wheel_definitions.hpp\"\r\n#include \"io/io_bosstiary.hpp\"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "30c587723d22f75d", - "equalIndicator/v1": "b58a32a360fd8831d026948c4671d10477fdc26f1d8b6e28e2629082ad4b790a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedIncludeDirective", - "kind": "fail", - "level": "warning", - "message": { - "text": "Unused \"#include \"lua/scripts/scripts.hpp\"\"", - "markdown": "Unused \"#include \"lua/scripts/scripts.hpp\"\"" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/functions/items/weapon_functions.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 17, - "startColumn": 1, - "charOffset": 553, - "charLength": 34, - "snippet": { - "text": "#include \"lua/scripts/scripts.hpp\"" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 15, - "startColumn": 1, - "charOffset": 482, - "charLength": 136, - "snippet": { - "text": "#include \"items/item.hpp\"\r\n#include \"lua/scripts/lua_environment.hpp\"\r\n#include \"lua/scripts/scripts.hpp\"\r\n#include \"utils/tools.hpp\"\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fa1263d0ee3552be", - "equalIndicator/v1": "c7bb0459a57ff0f20f08917a64e929fd9d52962f9bc9654bd659ad444c267369" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedIncludeDirective", - "kind": "fail", - "level": "warning", - "message": { - "text": "Unused \"#include \"utils/tools.hpp\"\"", - "markdown": "Unused \"#include \"utils/tools.hpp\"\"" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/io_wheel.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 18, - "startColumn": 1, - "charOffset": 567, - "charLength": 26, - "snippet": { - "text": "#include \"utils/tools.hpp\"" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 16, - "startColumn": 1, - "charOffset": 525, - "charLength": 105, - "snippet": { - "text": "#include \"creatures/combat/spells.hpp\"\r\n\r\n#include \"utils/tools.hpp\"\r\n\r\n#define MITIGATION_INCREASE 0.03\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4c81ed0ddee9fcc3", - "equalIndicator/v1": "dbd7fd96c420f47e1b5bb6c4a04186bd34d303a2d48040b6b1f798c0ff3e911b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedIncludeDirective", - "kind": "fail", - "level": "warning", - "message": { - "text": "Unused \"#include \"config/configmanager.hpp\"\"", - "markdown": "Unused \"#include \"config/configmanager.hpp\"\"" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/account/account.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 15, - "startColumn": 1, - "charOffset": 481, - "charLength": 35, - "snippet": { - "text": "#include \"config/configmanager.hpp\"" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 13, - "startColumn": 1, - "charOffset": 433, - "charLength": 149, - "snippet": { - "text": "\r\n#include \"account/account_repository_db.hpp\"\r\n#include \"config/configmanager.hpp\"\r\n#include \"utils/definitions.hpp\"\r\n#include \"security/argon.hpp\"\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "02ca4c2ec7cafe96", - "equalIndicator/v1": "e3f992a58b4da2184f96f9b51afa7f78647548a068c584d878ce7274d4f116b2" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedMacro", - "kind": "fail", - "level": "warning", - "message": { - "text": "Macro 'appendCommandListener' is never used", - "markdown": "Macro 'appendCommandListener' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/messaging/command.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 30, - "startColumn": 1, - "charOffset": 971, - "charLength": 98, - "snippet": { - "text": "#define appendCommandListener(type, block) dispatcher.appendListener(type, commandCallback(block))" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 28, - "startColumn": 1, - "charOffset": 905, - "charLength": 166, - "snippet": { - "text": "}\r\n#define commandCallback(block) [this](const ICommand &) block\r\n#define appendCommandListener(type, block) dispatcher.appendListener(type, commandCallback(block))\r\n" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7a7a714d4b454c25", - "equalIndicator/v1": "21b83173a48b82a7d7a1837b5f6a7711032118205f16884cb93cb7c20defb127" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedMacro", - "kind": "fail", - "level": "warning", - "message": { - "text": "Macro '_SECURE_SCL' is never used", - "markdown": "Macro '_SECURE_SCL' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/definitions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 35, - "startColumn": 4, - "charOffset": 849, - "charLength": 21, - "snippet": { - "text": "#define _SECURE_SCL 0" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 33, - "startColumn": 1, - "charOffset": 811, - "charLength": 107, - "snippet": { - "text": "\t#ifdef _MSC_VER\r\n\t\t#ifdef NDEBUG\r\n\t\t\t#define _SECURE_SCL 0\r\n\t\t\t#define HAS_ITERATOR_DEBUGGING 0\r\n\t\t#endif\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "611d7273d28e559c", - "equalIndicator/v1": "5345ca9a0f6f881d6bb1eaff3500b20420ccfff0b8a81ffd9b3d7964a29217ce" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedMacro", - "kind": "fail", - "level": "warning", - "message": { - "text": "Macro 'MAGIC_ENUM_RANGE_MIN' is never used", - "markdown": "Macro 'MAGIC_ENUM_RANGE_MIN' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/pch.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 118, - "startColumn": 1, - "charOffset": 2736, - "charLength": 33, - "snippet": { - "text": "#define MAGIC_ENUM_RANGE_MIN -500" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 116, - "startColumn": 1, - "charOffset": 2668, - "charLength": 163, - "snippet": { - "text": " * @note Sets the upper limit of the enum value range to 500.\r\n */\r\n#define MAGIC_ENUM_RANGE_MIN -500\r\n#define MAGIC_ENUM_RANGE_MAX 500\r\n#include \r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cfff89558b3b19e7", - "equalIndicator/v1": "7e4f6b2282556ecff7d26da257ea6d717fd8da2ccbe94ed88883c0464bfe044a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedMacro", - "kind": "fail", - "level": "warning", - "message": { - "text": "Macro 'HAS_ITERATOR_DEBUGGING' is never used", - "markdown": "Macro 'HAS_ITERATOR_DEBUGGING' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/definitions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 36, - "startColumn": 4, - "charOffset": 875, - "charLength": 32, - "snippet": { - "text": "#define HAS_ITERATOR_DEBUGGING 0" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 34, - "startColumn": 1, - "charOffset": 829, - "charLength": 91, - "snippet": { - "text": "\t\t#ifdef NDEBUG\r\n\t\t\t#define _SECURE_SCL 0\r\n\t\t\t#define HAS_ITERATOR_DEBUGGING 0\r\n\t\t#endif\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2f6fce06519d868e", - "equalIndicator/v1": "adaa110430c5f456ba74ceb59eb260e591724d9b76e2f19bdd8bac28705ab194" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedMacro", - "kind": "fail", - "level": "warning", - "message": { - "text": "Macro 'appendEventListener' is never used", - "markdown": "Macro 'appendEventListener' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/messaging/event.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 26, - "startColumn": 1, - "charOffset": 893, - "charLength": 94, - "snippet": { - "text": "#define appendEventListener(type, block) dispatcher.appendListener(type, eventCallback(block))" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 24, - "startColumn": 1, - "charOffset": 831, - "charLength": 158, - "snippet": { - "text": "}\r\n#define eventCallback(block) [this](const IEvent &) block\r\n#define appendEventListener(type, block) dispatcher.appendListener(type, eventCallback(block))\r\n" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "06b76f470bd83308", - "equalIndicator/v1": "c5483970e45b12cd151f4b1d5bcc927f2fba5f24f51b411ef3f0879d06cc2a05" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedMacro", - "kind": "fail", - "level": "warning", - "message": { - "text": "Macro 'MAGIC_ENUM_RANGE_MAX' is never used", - "markdown": "Macro 'MAGIC_ENUM_RANGE_MAX' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/pch.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 119, - "startColumn": 1, - "charOffset": 2771, - "charLength": 32, - "snippet": { - "text": "#define MAGIC_ENUM_RANGE_MAX 500" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 117, - "startColumn": 1, - "charOffset": 2731, - "charLength": 102, - "snippet": { - "text": " */\r\n#define MAGIC_ENUM_RANGE_MIN -500\r\n#define MAGIC_ENUM_RANGE_MAX 500\r\n#include \r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bd4b4e130baa774f", - "equalIndicator/v1": "ccae340d317b71e8fa776082f2905b4aa00c3e5ded6b7a026ea5a2617d7722a6" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedStruct", - "kind": "fail", - "level": "warning", - "message": { - "text": "Struct 'scope_traits' is never used", - "markdown": "Struct 'scope_traits' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/di/shared.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 96, - "startColumn": 10, - "charOffset": 2728, - "charLength": 12, - "snippet": { - "text": "scope_traits" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 94, - "startColumn": 1, - "charOffset": 2695, - "charLength": 92, - "snippet": { - "text": "\r\n\t\ttemplate \r\n\t\tstruct scope_traits {\r\n\t\t\tusing type = detail::shared;\r\n\t\t};\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "61177577eed530a1", - "equalIndicator/v1": "0caf549c16b88527d984ac3cae1a7ab083b59713330156009d5c8508e42dba5f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedStruct", - "kind": "fail", - "level": "warning", - "message": { - "text": "Class 'CombatInfo' is never used", - "markdown": "Class 'CombatInfo' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/game/game.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 42, - "startColumn": 7, - "charOffset": 1292, - "charLength": 10, - "snippet": { - "text": "CombatInfo" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 40, - "startColumn": 1, - "charOffset": 1258, - "charLength": 75, - "snippet": { - "text": "class Monster;\r\nclass Npc;\r\nclass CombatInfo;\r\nclass Charm;\r\nclass IOPrey;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "de706612a2bfcf77", - "equalIndicator/v1": "23df6d5536469b368bf15e1060ca4f1cea206d8fe0d0d29e269b495642443906" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedStruct", - "kind": "fail", - "level": "warning", - "message": { - "text": "Struct 'scope_traits>' is never used", - "markdown": "Struct 'scope_traits\\>' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/di/shared.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 106, - "startColumn": 10, - "charOffset": 2929, - "charLength": 12, - "snippet": { - "text": "scope_traits" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 104, - "startColumn": 1, - "charOffset": 2896, - "charLength": 109, - "snippet": { - "text": "\r\n\t\ttemplate \r\n\t\tstruct scope_traits> {\r\n\t\t\tusing type = detail::shared;\r\n\t\t};\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0e61e841259c5bcd", - "equalIndicator/v1": "4bb0bc88be44f05b13877f3a2bdc26f840abb450e4ebc1777adcec0dd2f31d86" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedStruct", - "kind": "fail", - "level": "warning", - "message": { - "text": "Struct 'scope_traits>' is never used", - "markdown": "Struct 'scope_traits\\>' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/di/shared.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 101, - "startColumn": 10, - "charOffset": 2821, - "charLength": 12, - "snippet": { - "text": "scope_traits" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 99, - "startColumn": 1, - "charOffset": 2788, - "charLength": 107, - "snippet": { - "text": "\r\n\t\ttemplate \r\n\t\tstruct scope_traits> {\r\n\t\t\tusing type = detail::shared;\r\n\t\t};\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "94c9e48f4f87b830", - "equalIndicator/v1": "5adda4aa18e429bd8d87430956c4d8c5bfb2cd91b7ea7c2aa0bd6cdc37897a0b" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedStruct", - "kind": "fail", - "level": "warning", - "message": { - "text": "Class 'Houses' is never used", - "markdown": "Class 'Houses' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/house/house.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 277, - "startColumn": 7, - "charOffset": 7760, - "charLength": 6, - "snippet": { - "text": "Houses" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 275, - "startColumn": 1, - "charOffset": 7690, - "charLength": 110, - "snippet": { - "text": "using HouseMap = std::map>;\r\n\r\nclass Houses {\r\npublic:\r\n\tHouses() = default;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "26e52e927fe04760", - "equalIndicator/v1": "5b21f42288939d95605be46f37489a91ec75388c5a0c7d801a9bb22966e353a3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedStruct", - "kind": "fail", - "level": "warning", - "message": { - "text": "Class 'Bed' is never used", - "markdown": "Class 'Bed' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 49, - "startColumn": 7, - "charOffset": 1734, - "charLength": 3, - "snippet": { - "text": "Bed" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 47, - "startColumn": 1, - "charOffset": 1701, - "charLength": 70, - "snippet": { - "text": "class Party;\r\nclass Task;\r\nclass Bed;\r\nclass Guild;\r\nclass Imbuement;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "1b5cf388f12ee889", - "equalIndicator/v1": "74080b19664227faff2e0a38fa434da1be2d89f6faf2cb523b8407d0f78e2e13" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedStruct", - "kind": "fail", - "level": "warning", - "message": { - "text": "Class 'PlayerLock' is never used", - "markdown": "Class 'PlayerLock' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/players/player.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 2661, - "startColumn": 15, - "charOffset": 77896, - "charLength": 10, - "snippet": { - "text": "PlayerLock" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 2659, - "startColumn": 1, - "charOffset": 77870, - "charLength": 60, - "snippet": { - "text": "\r\nprivate:\r\n\tfriend class PlayerLock;\r\n\tstd::mutex mutex;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5bbd8c1732b9798e", - "equalIndicator/v1": "7728f76ea477eec4df40b20ff0861b5e81da3224ce6ab4c3ae67dc5f263a1948" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedStruct", - "kind": "fail", - "level": "warning", - "message": { - "text": "Struct 'scope_traits>' is never used", - "markdown": "Struct 'scope_traits\\>' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/di/shared.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 111, - "startColumn": 10, - "charOffset": 3039, - "charLength": 12, - "snippet": { - "text": "scope_traits" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 109, - "startColumn": 1, - "charOffset": 3006, - "charLength": 105, - "snippet": { - "text": "\r\n\t\ttemplate \r\n\t\tstruct scope_traits> {\r\n\t\t\tusing type = detail::shared;\r\n\t\t};\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d75840260ed9197c", - "equalIndicator/v1": "8a3ce7ee13cf34ae506ad76b6be71f53b6b4cb3527efbddb9a43acd54d4ab32c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedStruct", - "kind": "fail", - "level": "warning", - "message": { - "text": "Class 'Quest' is never used", - "markdown": "Class 'Quest' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/server/network/protocol/protocolgame.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 28, - "startColumn": 7, - "charOffset": 881, - "charLength": 5, - "snippet": { - "text": "Quest" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 26, - "startColumn": 1, - "charOffset": 843, - "charLength": 83, - "snippet": { - "text": "class Tile;\r\nclass Connection;\r\nclass Quest;\r\nclass ProtocolGame;\r\nclass PreySlot;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "bba88118484685b6", - "equalIndicator/v1": "8bf2fdac4a5c2d35944ca3ff59b7b3c0a13530ec8aea8a605f77d2f180d5f2c9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedStruct", - "kind": "fail", - "level": "warning", - "message": { - "text": "Class 'arraylist' is never used", - "markdown": "Class 'arraylist' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/arraylist.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 22, - "startColumn": 8, - "charOffset": 711, - "charLength": 9, - "snippet": { - "text": "arraylist" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 20, - "startColumn": 1, - "charOffset": 660, - "charLength": 99, - "snippet": { - "text": "namespace stdext {\r\n\ttemplate \r\n\tclass arraylist {\r\n\tpublic:\r\n\t\tarraylist() = default;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c444c58e732639c6", - "equalIndicator/v1": "abdadaa4d87f78ae998783506fe9f058b25d326fc34e7aabc6ddf8f3f5e607b3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedStruct", - "kind": "fail", - "level": "warning", - "message": { - "text": "Struct 'scope_traits' is never used", - "markdown": "Struct 'scope_traits' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/di/shared.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 91, - "startColumn": 10, - "charOffset": 2612, - "charLength": 12, - "snippet": { - "text": "scope_traits" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 89, - "startColumn": 1, - "charOffset": 2571, - "charLength": 123, - "snippet": { - "text": "\tpublic:\r\n\t\ttemplate \r\n\t\tstruct scope_traits {\r\n\t\t\tusing type = typename di::config::scope_traits::type;\r\n\t\t};\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "69ffbae48aded6d9", - "equalIndicator/v1": "b92639f88e78831592750f1f353610aab33e4ea6eab5554e7673ac7b1f8037ff" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedStruct", - "kind": "fail", - "level": "warning", - "message": { - "text": "Class 'vector_sort' is never used", - "markdown": "Class 'vector_sort' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/utils/vectorsort.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 20, - "startColumn": 8, - "charOffset": 564, - "charLength": 11, - "snippet": { - "text": "vector_sort" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 18, - "startColumn": 1, - "charOffset": 513, - "charLength": 106, - "snippet": { - "text": "namespace stdext {\r\n\ttemplate \r\n\tclass vector_sort {\r\n\tpublic:\r\n\t\tbool contains(const T &v) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4fdd5249401d1cd6", - "equalIndicator/v1": "c3489ab16ac890bec249e021df3ccc706f51da688ee9f7e83b4b33315382ae6e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedStruct", - "kind": "fail", - "level": "warning", - "message": { - "text": "Struct 'is_creatable' is never used", - "markdown": "Struct 'is_creatable' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/di/runtime_provider.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 41, - "startColumn": 11, - "charOffset": 1083, - "charLength": 12, - "snippet": { - "text": "is_creatable" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 39, - "startColumn": 1, - "charOffset": 1047, - "charLength": 99, - "snippet": { - "text": "\r\n\t\t\ttemplate \r\n\t\t\tstruct is_creatable {\r\n\t\t\t\tstatic constexpr auto value = true;\r\n\t\t\t};\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "64b1ff696522edf0", - "equalIndicator/v1": "c84535d5e7554aa968b1dc8cd5a40d8c4dbd3640e57e4f6c23852c8433abb9f7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedStruct", - "kind": "fail", - "level": "warning", - "message": { - "text": "Class 'scope' is never used", - "markdown": "Class 'scope' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/di/shared.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 25, - "startColumn": 10, - "charOffset": 551, - "charLength": 5, - "snippet": { - "text": "scope" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 23, - "startColumn": 1, - "charOffset": 501, - "charLength": 103, - "snippet": { - "text": "\t\tpublic:\r\n\t\t\ttemplate \r\n\t\t\tclass scope {\r\n\t\t\tpublic:\r\n\t\t\t\tscope() noexcept = default;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0c3bd96613d297a5", - "equalIndicator/v1": "ca2750d5ec1b5678a0764bb7ccbbc21d3c8e98e0663228fea31ca58c6e27cfb8" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedStruct", - "kind": "fail", - "level": "warning", - "message": { - "text": "Struct 'ProtocolFamiliars' is never used", - "markdown": "Struct 'ProtocolFamiliars' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creatures_definitions.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 1535, - "startColumn": 8, - "charOffset": 39869, - "charLength": 17, - "snippet": { - "text": "ProtocolFamiliars" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 1533, - "startColumn": 1, - "charOffset": 39856, - "charLength": 153, - "snippet": { - "text": "*/\r\n\r\nstruct ProtocolFamiliars {\r\n\tProtocolFamiliars(const std::string &initName, uint16_t initLookType) :\r\n\t\tname(initName), lookType(initLookType) { }\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cf9d5b50cabdb602", - "equalIndicator/v1": "e9eeeea261f64448b4b0fde5c2e465bfe5556b14f253f4a2701800662d6af7b1" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedStruct", - "kind": "fail", - "level": "warning", - "message": { - "text": "Struct 'formatter, char>>' is never used", - "markdown": "Struct 'formatter, char\\>\\>' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/pch.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 87, - "startColumn": 13, - "charOffset": 1852, - "charLength": 9, - "snippet": { - "text": "formatter" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 85, - "startColumn": 1, - "charOffset": 1782, - "charLength": 244, - "snippet": { - "text": "// FMT Custom Formatter for Enums\r\ntemplate \r\nstruct fmt::formatter, char>> : formatter> {\r\n\ttemplate \r\n\tauto format(E e, FormatContext &ctx) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "f36a85dd204e79ad", - "equalIndicator/v1": "f94b8e56d9bd7b09ba1470a4ffe31644f1a69fe3374491dbcb3f393e9ef4b25e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedStruct", - "kind": "fail", - "level": "warning", - "message": { - "text": "Class 'Towns' is never used", - "markdown": "Class 'Towns' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/map/town.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 44, - "startColumn": 7, - "charOffset": 987, - "charLength": 5, - "snippet": { - "text": "Towns" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 42, - "startColumn": 1, - "charOffset": 919, - "charLength": 106, - "snippet": { - "text": "using TownMap = std::map>;\r\n\r\nclass Towns {\r\npublic:\r\n\tTowns() = default;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "d9c313bdbb61a823", - "equalIndicator/v1": "fc0ddcb169b459328c65c39ff8fbd606dd1111d09ba8677505beba3565d6676e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedTemplateParameter", - "kind": "fail", - "level": "warning", - "message": { - "text": "Type parameter 'TProvider' is never used", - "markdown": "Type parameter 'TProvider' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/di/shared.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 41, - "startColumn": 35, - "charOffset": 1156, - "charLength": 9, - "snippet": { - "text": "TProvider" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 39, - "startColumn": 1, - "charOffset": 1029, - "charLength": 283, - "snippet": { - "text": "\t\t\t\tusing is_referable = typename wrappers::shared::template is_referable;\r\n\r\n\t\t\t\ttemplate \r\n\t\t\t\tstatic auto try_create(const TProvider &provider)\r\n\t\t\t\t\t-> decltype(wrappers::shared { std::shared_ptr { provider.get() } });\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "2c03226c541cf0c7", - "equalIndicator/v1": "57642bf391d59b3bab14e1d61094c138299b06cc2f587222d4b9e1a66a287597" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedTypeAlias", - "kind": "fail", - "level": "warning", - "message": { - "text": "Using 'EventRemover' is never used", - "markdown": "Using 'EventRemover' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/messaging/event.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 20, - "startColumn": 7, - "charOffset": 721, - "charLength": 12, - "snippet": { - "text": "EventRemover" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 18, - "startColumn": 1, - "charOffset": 607, - "charLength": 197, - "snippet": { - "text": "using EventListeners = MessageListeners;\r\nusing EventDispatcher = MessageDispatcher;\r\nusing EventRemover = MessageRemover;\r\n\r\ninline IEvent event(EventType type) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "0272a3125e6ec04d", - "equalIndicator/v1": "0fc924ccaca3e8aea20c2bb811c6e3b215b5c00b92aea9471e2493e1854e71dd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedTypeAlias", - "kind": "fail", - "level": "warning", - "message": { - "text": "Using 'EventDispatcher' is never used", - "markdown": "Using 'EventDispatcher' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/messaging/event.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 19, - "startColumn": 7, - "charOffset": 666, - "charLength": 15, - "snippet": { - "text": "EventDispatcher" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 17, - "startColumn": 1, - "charOffset": 555, - "charLength": 210, - "snippet": { - "text": "using EventListener = IMessageListener;\r\nusing EventListeners = MessageListeners;\r\nusing EventDispatcher = MessageDispatcher;\r\nusing EventRemover = MessageRemover;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "17c23a1502fa25cc", - "equalIndicator/v1": "109d5714d62fc5e6416bec478dcfa9876d03a19c88843b3c973ce2782c3c58fa" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedTypeAlias", - "kind": "fail", - "level": "warning", - "message": { - "text": "Using 'EventListener' is never used", - "markdown": "Using 'EventListener' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/messaging/event.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 17, - "startColumn": 7, - "charOffset": 561, - "charLength": 13, - "snippet": { - "text": "EventListener" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 15, - "startColumn": 1, - "charOffset": 459, - "charLength": 255, - "snippet": { - "text": "using EventHandler = MessageHandler;\r\nusing EventPolicy = MessagePolicy;\r\nusing EventListener = IMessageListener;\r\nusing EventListeners = MessageListeners;\r\nusing EventDispatcher = MessageDispatcher;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "4fd5e869c89e14ad", - "equalIndicator/v1": "169e40a4de5066634f7e35d994fc2b25c015e5e2d6981d26a00c435735decbaf" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedTypeAlias", - "kind": "fail", - "level": "warning", - "message": { - "text": "Using 'NameMap' is never used", - "markdown": "Using 'NameMap' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/items.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 387, - "startColumn": 8, - "charOffset": 9915, - "charLength": 7, - "snippet": { - "text": "NameMap" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 385, - "startColumn": 1, - "charOffset": 9884, - "charLength": 140, - "snippet": { - "text": "class Items {\r\npublic:\r\n\tusing NameMap = std::unordered_multimap;\r\n\tusing InventoryVector = std::vector;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "ba486f9dafd02a70", - "equalIndicator/v1": "345ea36b6946287fbbb2e9e80436ed190744c129e474133785c564513b214147" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedTypeAlias", - "kind": "fail", - "level": "warning", - "message": { - "text": "Using 'EventPolicy' is never used", - "markdown": "Using 'EventPolicy' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/messaging/event.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 16, - "startColumn": 7, - "charOffset": 514, - "charLength": 11, - "snippet": { - "text": "EventPolicy" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 14, - "startColumn": 1, - "charOffset": 423, - "charLength": 236, - "snippet": { - "text": "using IEvent = Message;\r\nusing EventHandler = MessageHandler;\r\nusing EventPolicy = MessagePolicy;\r\nusing EventListener = IMessageListener;\r\nusing EventListeners = MessageListeners;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "384a7db9201797fa", - "equalIndicator/v1": "469af02a1ec0144162966ea1c932f250121b233dbfa508c591fb0ec07f57459e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedTypeAlias", - "kind": "fail", - "level": "warning", - "message": { - "text": "Using 'is_referable' is never used", - "markdown": "Using 'is_referable' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/di/shared.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 39, - "startColumn": 11, - "charOffset": 1039, - "charLength": 12, - "snippet": { - "text": "is_referable" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 37, - "startColumn": 1, - "charOffset": 995, - "charLength": 172, - "snippet": { - "text": "\r\n\t\t\t\ttemplate \r\n\t\t\t\tusing is_referable = typename wrappers::shared::template is_referable;\r\n\r\n\t\t\t\ttemplate \r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "05ca36c90a091ea8", - "equalIndicator/v1": "4bc03c675e90ffb884964cd18484ab513f3c29b21b949bc16f8ecaaf39341537" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedTypeAlias", - "kind": "fail", - "level": "warning", - "message": { - "text": "Using 'RuneSpellFunction' is never used", - "markdown": "Using 'RuneSpellFunction' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/combat/spells.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 78, - "startColumn": 7, - "charOffset": 2407, - "charLength": 17, - "snippet": { - "text": "RuneSpellFunction" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 76, - "startColumn": 1, - "charOffset": 2351, - "charLength": 213, - "snippet": { - "text": "constexpr auto g_spells = Spells::getInstance;\r\n\r\nusing RuneSpellFunction = std::function spell, std::shared_ptr player, const Position &posTo)>;\r\n\r\nclass BaseSpell {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "51297eb8ecbc45e9", - "equalIndicator/v1": "616312916fb518c9d658219d1d0a93994c3d2273e936ecf6518330d659c05602" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedTypeAlias", - "kind": "fail", - "level": "warning", - "message": { - "text": "Using 'WeaponUnique_ptr' is never used", - "markdown": "Using 'WeaponUnique_ptr' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/weapons/weapons.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 26, - "startColumn": 7, - "charOffset": 752, - "charLength": 16, - "snippet": { - "text": "WeaponUnique_ptr" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 24, - "startColumn": 1, - "charOffset": 724, - "charLength": 125, - "snippet": { - "text": "struct LuaVariant;\r\n\r\nusing WeaponUnique_ptr = std::unique_ptr;\r\nusing WeaponShared_ptr = std::shared_ptr;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fb8dda5ab4eccf10", - "equalIndicator/v1": "61d2fee0a364ab6eacaf3ccd6e9d54aea6bba7af3e3d9bc588d97990967b5a1d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedTypeAlias", - "kind": "fail", - "level": "warning", - "message": { - "text": "Using 'CommandListener' is never used", - "markdown": "Using 'CommandListener' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/messaging/command.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 21, - "startColumn": 7, - "charOffset": 611, - "charLength": 15, - "snippet": { - "text": "CommandListener" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 19, - "startColumn": 1, - "charOffset": 501, - "charLength": 275, - "snippet": { - "text": "using CommandHandler = MessageHandler;\r\nusing CommandPolicy = MessagePolicy;\r\nusing CommandListener = IMessageListener;\r\nusing CommandListeners = MessageListeners;\r\nusing CommandDispatcher = MessageDispatcher;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "427eedea6c7eacf9", - "equalIndicator/v1": "84089ba1506cbc6e8190ed6d0bb1be1510010e5a626b809de4c3b4ffcbf1f95a" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedTypeAlias", - "kind": "fail", - "level": "warning", - "message": { - "text": "Using 'StorageMap' is never used", - "markdown": "Using 'StorageMap' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/scripts/script_environment.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 77, - "startColumn": 8, - "charOffset": 2112, - "charLength": 10, - "snippet": { - "text": "StorageMap" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 75, - "startColumn": 1, - "charOffset": 2093, - "charLength": 119, - "snippet": { - "text": "\r\nprivate:\r\n\tusing StorageMap = std::map;\r\n\tusing DBResultMap = std::map;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "c13da41c2e472ecb", - "equalIndicator/v1": "8e5ce11f1915034338017cf4eb0948761e21e5b5059849168a364a4267f19eb9" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedTypeAlias", - "kind": "fail", - "level": "warning", - "message": { - "text": "Using 'CommandListeners' is never used", - "markdown": "Using 'CommandListeners' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/messaging/command.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 22, - "startColumn": 7, - "charOffset": 667, - "charLength": 16, - "snippet": { - "text": "CommandListeners" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 20, - "startColumn": 1, - "charOffset": 554, - "charLength": 275, - "snippet": { - "text": "using CommandPolicy = MessagePolicy;\r\nusing CommandListener = IMessageListener;\r\nusing CommandListeners = MessageListeners;\r\nusing CommandDispatcher = MessageDispatcher;\r\nusing CommandRemover = MessageRemover;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "fdef2abe14fb9b4e", - "equalIndicator/v1": "901ac8e56b5cab19d1abfb24b5a56f2cf6e887f0120603085c0a9adb35de8b7d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedTypeAlias", - "kind": "fail", - "level": "warning", - "message": { - "text": "Using 'CommandHandler' is never used", - "markdown": "Using 'CommandHandler' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/messaging/command.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 19, - "startColumn": 7, - "charOffset": 507, - "charLength": 14, - "snippet": { - "text": "CommandHandler" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 17, - "startColumn": 1, - "charOffset": 459, - "charLength": 201, - "snippet": { - "text": "\r\nusing ICommand = Message;\r\nusing CommandHandler = MessageHandler;\r\nusing CommandPolicy = MessagePolicy;\r\nusing CommandListener = IMessageListener;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "186366deb536037c", - "equalIndicator/v1": "9dde7576662b5d2770758cb5e7c38c0239948c200ada1dd1a9ed4a72027222dd" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedTypeAlias", - "kind": "fail", - "level": "warning", - "message": { - "text": "Using 'CommandRemover' is never used", - "markdown": "Using 'CommandRemover' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/messaging/command.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 24, - "startColumn": 7, - "charOffset": 783, - "charLength": 14, - "snippet": { - "text": "CommandRemover" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 22, - "startColumn": 1, - "charOffset": 661, - "charLength": 215, - "snippet": { - "text": "using CommandListeners = MessageListeners;\r\nusing CommandDispatcher = MessageDispatcher;\r\nusing CommandRemover = MessageRemover;\r\n\r\ninline ICommand command(CommandType type) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "672875cf37b0e339", - "equalIndicator/v1": "9fc6fb5458a05d66dac45bd1bb1373a74796f760b499db28d7d4003b19ea99b7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedTypeAlias", - "kind": "fail", - "level": "warning", - "message": { - "text": "Using 'VocEquipMap' is never used", - "markdown": "Using 'VocEquipMap' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/creature/movement.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 24, - "startColumn": 7, - "charOffset": 724, - "charLength": 11, - "snippet": { - "text": "VocEquipMap" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 22, - "startColumn": 1, - "charOffset": 712, - "charLength": 97, - "snippet": { - "text": "};\r\n\r\nusing VocEquipMap = std::map;\r\n\r\nclass MoveEvents final : public Scripts {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8491542fb0032e11", - "equalIndicator/v1": "ae2a5f6e28b74452001ebbd91253e082b128be8658e082d47c7434025e4591a3" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedTypeAlias", - "kind": "fail", - "level": "warning", - "message": { - "text": "Using 'ItemBlockList' is never used", - "markdown": "Using 'ItemBlockList' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/io/iologindata.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 16, - "startColumn": 7, - "charOffset": 510, - "charLength": 13, - "snippet": { - "text": "ItemBlockList" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 14, - "startColumn": 1, - "charOffset": 468, - "charLength": 135, - "snippet": { - "text": "#include \"database/database.hpp\"\r\n\r\nusing ItemBlockList = std::list>>;\r\n\r\nclass IOLoginData {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "77cde0ef28f9cc43", - "equalIndicator/v1": "af9ed124bfd454f0ede2dbb764b4492048209edfd3f2f8465ca524fccb0e1b08" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedTypeAlias", - "kind": "fail", - "level": "warning", - "message": { - "text": "Using 'scope_traits' is never used", - "markdown": "Using 'scope_traits' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/di/runtime_provider.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 71, - "startColumn": 9, - "charOffset": 2034, - "charLength": 12, - "snippet": { - "text": "scope_traits" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 69, - "startColumn": 1, - "charOffset": 1994, - "charLength": 130, - "snippet": { - "text": "\tpublic:\r\n\t\ttemplate \r\n\t\tusing scope_traits = typename TScopeTraits::template scope_traits;\r\n\r\n\t\tauto provider(...) {\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "42961bb2c38e7787", - "equalIndicator/v1": "ba87516efaf76f3074659a053f7b40d14bc175ac0a6ed1789fbd38eb56d1725f" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedTypeAlias", - "kind": "fail", - "level": "warning", - "message": { - "text": "Using 'CommandPolicy' is never used", - "markdown": "Using 'CommandPolicy' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/messaging/command.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 20, - "startColumn": 7, - "charOffset": 560, - "charLength": 13, - "snippet": { - "text": "CommandPolicy" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 18, - "startColumn": 1, - "charOffset": 461, - "charLength": 256, - "snippet": { - "text": "using ICommand = Message;\r\nusing CommandHandler = MessageHandler;\r\nusing CommandPolicy = MessagePolicy;\r\nusing CommandListener = IMessageListener;\r\nusing CommandListeners = MessageListeners;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "a76ad8c286b22089", - "equalIndicator/v1": "c3a1efd9919c45ab8757c0e65bdac17b45e0c3ee78d409410308d0995eada011" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedTypeAlias", - "kind": "fail", - "level": "warning", - "message": { - "text": "Using 'EventListeners' is never used", - "markdown": "Using 'EventListeners' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/messaging/event.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 18, - "startColumn": 7, - "charOffset": 613, - "charLength": 14, - "snippet": { - "text": "EventListeners" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 16, - "startColumn": 1, - "charOffset": 508, - "charLength": 255, - "snippet": { - "text": "using EventPolicy = MessagePolicy;\r\nusing EventListener = IMessageListener;\r\nusing EventListeners = MessageListeners;\r\nusing EventDispatcher = MessageDispatcher;\r\nusing EventRemover = MessageRemover;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "dbbc6a144211c4a2", - "equalIndicator/v1": "d88b96d3ffd0aa4c1bbcb1b0d92ed8955a4f9b898cf1ec446d842fa4a6092bf7" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedTypeAlias", - "kind": "fail", - "level": "warning", - "message": { - "text": "Using 'EventHandler' is never used", - "markdown": "Using 'EventHandler' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/messaging/event.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 15, - "startColumn": 7, - "charOffset": 465, - "charLength": 12, - "snippet": { - "text": "EventHandler" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 13, - "startColumn": 1, - "charOffset": 421, - "charLength": 185, - "snippet": { - "text": "\r\nusing IEvent = Message;\r\nusing EventHandler = MessageHandler;\r\nusing EventPolicy = MessagePolicy;\r\nusing EventListener = IMessageListener;\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "da960281f5977bdd", - "equalIndicator/v1": "e403a4acae22708c8b1e9124d54705aec4ac6d7c9b50f1c281ebce4a81106423" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "OCUnusedTypeAlias", - "kind": "fail", - "level": "warning", - "message": { - "text": "Using 'CommandDispatcher' is never used", - "markdown": "Using 'CommandDispatcher' is never used" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lib/messaging/command.hpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 23, - "startColumn": 7, - "charOffset": 724, - "charLength": 17, - "snippet": { - "text": "CommandDispatcher" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 21, - "startColumn": 1, - "charOffset": 605, - "charLength": 226, - "snippet": { - "text": "using CommandListener = IMessageListener;\r\nusing CommandListeners = MessageListeners;\r\nusing CommandDispatcher = MessageDispatcher;\r\nusing CommandRemover = MessageRemover;\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "67d81a6bff225b67", - "equalIndicator/v1": "ef4bf17bdb137916cec7ea41972ad639a08938634591b6ab1a3c6d13574ad7d0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "VirtualCallInCtorOrDtor", - "kind": "fail", - "level": "warning", - "message": { - "text": "Do not invoke virtual member functions from destructor", - "markdown": "Do not invoke virtual member functions from destructor" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 66, - "startColumn": 22, - "charOffset": 2340, - "charLength": 9, - "snippet": { - "text": "getParent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 64, - "startColumn": 1, - "charOffset": 2255, - "charLength": 173, - "snippet": { - "text": "Container::~Container() {\r\n\tif (getID() == ITEM_BROWSEFIELD) {\r\n\t\tif (getParent() && getParent()->getTile()) {\r\n\t\t\tg_game().browseFields.erase(getParent()->getTile());\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "05e1b7c9bd62db1a", - "equalIndicator/v1": "119f1cdad6dc5e1e024a4637f5bd4bde2c64d37028fedc4f5f2992ec18968ea0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "VirtualCallInCtorOrDtor", - "kind": "fail", - "level": "warning", - "message": { - "text": "Do not invoke virtual member functions from constructor", - "markdown": "Do not invoke virtual member functions from constructor" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/creatures/creature.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 22, - "startColumn": 2, - "charOffset": 703, - "charLength": 12, - "snippet": { - "text": "onIdleStatus" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 20, - "startColumn": 1, - "charOffset": 676, - "charLength": 48, - "snippet": { - "text": "\r\nCreature::Creature() {\r\n\tonIdleStatus();\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7450f53cc604b72c", - "equalIndicator/v1": "461aeab752528abaeae55ce5113567e4e501afb325f42d037a68e48894ee2e2c" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "VirtualCallInCtorOrDtor", - "kind": "fail", - "level": "warning", - "message": { - "text": "Do not invoke virtual member functions from destructor", - "markdown": "Do not invoke virtual member functions from destructor" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/scripts/lua_environment.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 30, - "startColumn": 2, - "charOffset": 921, - "charLength": 10, - "snippet": { - "text": "closeState" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 28, - "startColumn": 1, - "charOffset": 879, - "charLength": 61, - "snippet": { - "text": "\r\n\tLuaEnvironment::shuttingDown = true;\r\n\tcloseState();\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "724ed90fdf87c817", - "equalIndicator/v1": "7d4a0f856edcbe1ab60b0d383d5670e83af95291ff16b992d65eb2446c928e2e" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "VirtualCallInCtorOrDtor", - "kind": "fail", - "level": "warning", - "message": { - "text": "Do not invoke virtual member functions from destructor", - "markdown": "Do not invoke virtual member functions from destructor" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/lua/scripts/luascript.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 28, - "startColumn": 2, - "charOffset": 1000, - "charLength": 10, - "snippet": { - "text": "closeState" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 26, - "startColumn": 1, - "charOffset": 952, - "charLength": 67, - "snippet": { - "text": "\r\nLuaScriptInterface::~LuaScriptInterface() {\r\n\tcloseState();\r\n}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "8f8aa0b2ebcc949a", - "equalIndicator/v1": "8ce6c2a51e45e768d68e2a84348a7c90dce237197b8765ff641e0e698bf7c03d" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "VirtualCallInCtorOrDtor", - "kind": "fail", - "level": "warning", - "message": { - "text": "Do not invoke virtual member functions from destructor", - "markdown": "Do not invoke virtual member functions from destructor" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 67, - "startColumn": 32, - "charOffset": 2398, - "charLength": 9, - "snippet": { - "text": "getParent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 65, - "startColumn": 1, - "charOffset": 2282, - "charLength": 148, - "snippet": { - "text": "\tif (getID() == ITEM_BROWSEFIELD) {\r\n\t\tif (getParent() && getParent()->getTile()) {\r\n\t\t\tg_game().browseFields.erase(getParent()->getTile());\r\n\t\t}\r\n\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "5bcbc336298ce3cf", - "equalIndicator/v1": "b72f751e1a834d2cda1e4e29aef74fcd3d86cf56266613bfdefe632b83a8c8d0" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "VirtualCallInCtorOrDtor", - "kind": "fail", - "level": "warning", - "message": { - "text": "Do not invoke virtual member functions from destructor", - "markdown": "Do not invoke virtual member functions from destructor" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 66, - "startColumn": 7, - "charOffset": 2325, - "charLength": 9, - "snippet": { - "text": "getParent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 64, - "startColumn": 1, - "charOffset": 2255, - "charLength": 173, - "snippet": { - "text": "Container::~Container() {\r\n\tif (getID() == ITEM_BROWSEFIELD) {\r\n\t\tif (getParent() && getParent()->getTile()) {\r\n\t\t\tg_game().browseFields.erase(getParent()->getTile());\r\n\t\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "7a88e498355d72af", - "equalIndicator/v1": "b91584fc575ef933c62679406d356a292078d026e430c74710a782242aa00293" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - }, - { - "ruleId": "VirtualCallInCtorOrDtor", - "kind": "fail", - "level": "warning", - "message": { - "text": "Do not invoke virtual member functions from destructor", - "markdown": "Do not invoke virtual member functions from destructor" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/items/containers/container.cpp", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 71, - "startColumn": 20, - "charOffset": 2499, - "charLength": 9, - "snippet": { - "text": "getParent" - }, - "sourceLanguage": "ObjectiveC" - }, - "contextRegion": { - "startLine": 69, - "startColumn": 1, - "charOffset": 2429, - "charLength": 93, - "snippet": { - "text": "\r\n\t\tfor (std::shared_ptr item : itemlist) {\r\n\t\t\titem->setParent(getParent());\r\n\t\t}\r\n\t}\r" - }, - "sourceLanguage": "ObjectiveC" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "canary-opentibia", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "11de239a7cacaabb", - "equalIndicator/v1": "d007daab3480f59d07a0936eb0c71e50d35c6bcdbdffc5b01c6acae765223adc" - }, - "properties": { - "ideaSeverity": "WARNING", - "qodanaSeverity": "High", - "tags": [ - "ObjectiveC" - ] - } - } - ], - "automationDetails": { - "id": "canary/qodana/2024-08-04", - "guid": "7be05d40-d865-411d-aa6b-241c32279c4e", - "properties": { - "jobUrl": "" - } - }, - "newlineSequences": [ - "\r\n", - "\n" - ], - "properties": { - "configProfile": "recommended", - "deviceId": "131123170079767-8100-48ff-b489-333788c6b484", - "qodanaNewResultSummary": { - "high": 2881, - "moderate": 23, - "total": 2904 - } - } - } - ], - "properties": { - "runTimestamp": "1722822687214" - } -} \ No newline at end of file diff --git a/qodana.yml b/qodana.yml index f8ba4ca7b76..1621c979a9d 100644 --- a/qodana.yml +++ b/qodana.yml @@ -3,7 +3,23 @@ version: "1.0" profile: name: qodana.recommended -inspections: +bootstrap: | + set -e + sudo apt-get update && sudo apt-get -y dist-upgrade + sudo apt-get purge -y libclang* + sudo apt-get install -y cmake git unzip build-essential ca-certificates curl zip unzip tar pkg-config ninja-build autoconf automake libtool python3 + cd ~ + git clone https://github.com/Microsoft/vcpkg.git + cd vcpkg + ./bootstrap-vcpkg.sh + cd /data/project + rm -rf build + mkdir -p build + cd build + export CC=/usr/bin/cc + export CXX=/usr/bin/c++ + cmake -DCMAKE_TOOLCHAIN_FILE=~/vcpkg/scripts/buildsystems/vcpkg.cmake .. --preset linux-debug || true + sudo apt-get install -y clang-16 clang-format-16 clang-tidy-16 clang-tools-16 libclang-common-16-dev libclang-cpp16 libclang-rt-16-dev libclang1-16 llvm-16-dev include: From 645237babf066ed20271a177089bbb59712f9876 Mon Sep 17 00:00:00 2001 From: HT Cesta <58153179+htc16@users.noreply.github.com> Date: Fri, 16 Aug 2024 18:17:44 -0300 Subject: [PATCH 23/24] fix: quests from version 8.00 to 8.74 revised (#2765) --- data-canary/scripts/actions/other/fluids.lua | 1 + data-otservbr-global/lib/core/quests.lua | 325 +++-- data-otservbr-global/lib/core/storages.lua | 1198 +++++++++-------- .../lib/quests/svargrond_arena.lua | 16 +- .../monster/humanoids/goblin_leader.lua | 4 + .../travelling_merchant.lua | 95 ++ data-otservbr-global/npc/a_restless_soul.lua | 13 +- .../npc/a_sleeping_dragon.lua | 67 +- data-otservbr-global/npc/a_starving_dog.lua | 6 +- data-otservbr-global/npc/ahmet.lua | 11 +- data-otservbr-global/npc/amanda.lua | 3 +- data-otservbr-global/npc/angus.lua | 7 +- data-otservbr-global/npc/ariella.lua | 4 +- data-otservbr-global/npc/arito.lua | 57 +- data-otservbr-global/npc/arkulius.lua | 10 +- data-otservbr-global/npc/armenius.lua | 18 +- data-otservbr-global/npc/avar_tar.lua | 8 +- .../npc/awarness_of_the_emperor.lua | 21 +- data-otservbr-global/npc/barry.lua | 6 +- data-otservbr-global/npc/bashira.lua | 1 + data-otservbr-global/npc/bertram.lua | 4 +- data-otservbr-global/npc/bezil.lua | 1 + data-otservbr-global/npc/bolfona.lua | 7 +- data-otservbr-global/npc/boozer.lua | 4 + data-otservbr-global/npc/bozo.lua | 198 +-- data-otservbr-global/npc/brasith.lua | 1 + data-otservbr-global/npc/briasol.lua | 4 +- data-otservbr-global/npc/bruce.lua | 6 +- data-otservbr-global/npc/buddel.lua | 10 +- data-otservbr-global/npc/buddel_helheim.lua | 8 +- data-otservbr-global/npc/buddel_okolnir.lua | 10 +- .../npc/buddel_raider_camp.lua | 10 +- data-otservbr-global/npc/buddel_tyrsung.lua | 10 +- data-otservbr-global/npc/budrik.lua | 23 +- .../npc/bunny_bonecrusher.lua | 45 + data-otservbr-global/npc/cael.lua | 1 + data-otservbr-global/npc/captain_bluebear.lua | 2 +- data-otservbr-global/npc/captain_fearless.lua | 2 +- .../npc/captain_greyhound.lua | 2 +- data-otservbr-global/npc/captain_haba.lua | 36 +- .../npc/captain_haba_open_sea.lua | 44 +- data-otservbr-global/npc/captain_max.lua | 4 +- data-otservbr-global/npc/captain_seagull.lua | 2 +- data-otservbr-global/npc/captain_sinbeard.lua | 2 +- data-otservbr-global/npc/carina.lua | 4 +- data-otservbr-global/npc/carlos.lua | 62 +- data-otservbr-global/npc/chantalle.lua | 6 +- data-otservbr-global/npc/charles.lua | 2 +- data-otservbr-global/npc/chartan.lua | 22 +- data-otservbr-global/npc/chester_kahs.lua | 92 +- data-otservbr-global/npc/chief_grarkharok.lua | 4 +- data-otservbr-global/npc/chrak.lua | 3 + data-otservbr-global/npc/clyde.lua | 3 + data-otservbr-global/npc/curos.lua | 4 +- data-otservbr-global/npc/dane.lua | 2 + data-otservbr-global/npc/daniel_steelsoul.lua | 42 +- data-otservbr-global/npc/dankwart.lua | 1 + data-otservbr-global/npc/dorian.lua | 95 +- data-otservbr-global/npc/emma.lua | 107 +- data-otservbr-global/npc/emperor_rehal.lua | 50 +- data-otservbr-global/npc/eroth.lua | 38 + data-otservbr-global/npc/frafnar.lua | 22 +- data-otservbr-global/npc/freezhild.lua | 6 +- data-otservbr-global/npc/gabel.lua | 12 +- data-otservbr-global/npc/gamel.lua | 8 +- data-otservbr-global/npc/gate_guardian.lua | 8 +- .../npc/ghost_of_a_priest.lua | 14 +- data-otservbr-global/npc/gree_dee.lua | 1 + data-otservbr-global/npc/grizzly_adams.lua | 98 +- data-otservbr-global/npc/grof_the_guard.lua | 8 +- data-otservbr-global/npc/grombur.lua | 16 +- data-otservbr-global/npc/hairycles.lua | 7 +- data-otservbr-global/npc/hal.lua | 6 +- data-otservbr-global/npc/halif.lua | 1 + data-otservbr-global/npc/halvar.lua | 8 +- data-otservbr-global/npc/harlow.lua | 4 +- data-otservbr-global/npc/harog.lua | 2 +- data-otservbr-global/npc/henricus.lua | 169 +-- data-otservbr-global/npc/herbert.lua | 2 +- data-otservbr-global/npc/hjaern.lua | 74 +- data-otservbr-global/npc/iskan.lua | 36 +- data-otservbr-global/npc/izsh.lua | 5 +- data-otservbr-global/npc/jack.lua | 168 +-- data-otservbr-global/npc/jack_fate.lua | 2 +- data-otservbr-global/npc/jean_pierre.lua | 584 ++++---- data-otservbr-global/npc/jerom.lua | 8 +- data-otservbr-global/npc/julius.lua | 83 +- data-otservbr-global/npc/karith.lua | 72 +- data-otservbr-global/npc/karl.lua | 5 +- data-otservbr-global/npc/kazzan.lua | 38 +- data-otservbr-global/npc/kulag_the_guard.lua | 8 +- data-otservbr-global/npc/lazaran.lua | 88 +- data-otservbr-global/npc/leeland.lua | 1 + data-otservbr-global/npc/lisander.lua | 6 +- .../npc/lizard_tunnel_guard.lua | 4 +- data-otservbr-global/npc/lorbas.lua | 6 +- data-otservbr-global/npc/lugri.lua | 20 +- data-otservbr-global/npc/lurik.lua | 21 +- data-otservbr-global/npc/malor.lua | 12 +- data-otservbr-global/npc/maria.lua | 2 + data-otservbr-global/npc/maris.lua | 6 +- data-otservbr-global/npc/maris_mistrock.lua | 4 +- data-otservbr-global/npc/maritima.lua | 9 +- data-otservbr-global/npc/markwin.lua | 4 +- data-otservbr-global/npc/melfar.lua | 7 +- data-otservbr-global/npc/miles_the_guard.lua | 8 +- data-otservbr-global/npc/mirabell.lua | 11 +- data-otservbr-global/npc/miraia.lua | 8 +- data-otservbr-global/npc/mother_of_jack.lua | 18 +- data-otservbr-global/npc/mr._west.lua | 26 +- data-otservbr-global/npc/muhad.lua | 25 +- data-otservbr-global/npc/muriel.lua | 31 +- data-otservbr-global/npc/nah_bob.lua | 4 +- data-otservbr-global/npc/nezil.lua | 1 + data-otservbr-global/npc/nilsor.lua | 56 +- data-otservbr-global/npc/nokmir.lua | 12 +- data-otservbr-global/npc/nor.lua | 4 +- data-otservbr-global/npc/norma.lua | 3 + data-otservbr-global/npc/nurik.lua | 8 +- data-otservbr-global/npc/oldrak.lua | 18 +- data-otservbr-global/npc/oliver.lua | 6 +- data-otservbr-global/npc/ongulf.lua | 35 +- data-otservbr-global/npc/ortheus.lua | 6 +- data-otservbr-global/npc/oswald.lua | 4 +- data-otservbr-global/npc/palimuth.lua | 180 +-- data-otservbr-global/npc/percybald.lua | 87 +- data-otservbr-global/npc/peter.lua | 8 +- data-otservbr-global/npc/petros.lua | 2 +- data-otservbr-global/npc/pugwah.lua | 3 + .../npc/pythius_the_rotten.lua | 2 +- data-otservbr-global/npc/rabaz.lua | 10 +- data-otservbr-global/npc/ramina.lua | 3 +- data-otservbr-global/npc/rashid.lua | 57 +- data-otservbr-global/npc/rashid_custom.lua | 54 +- data-otservbr-global/npc/raymond_striker.lua | 16 +- data-otservbr-global/npc/red_lilly.lua | 1 + data-otservbr-global/npc/reed.lua | 6 +- data-otservbr-global/npc/rehon.lua | 4 +- data-otservbr-global/npc/rottin_wood.lua | 153 ++- data-otservbr-global/npc/sam.lua | 7 +- data-otservbr-global/npc/santiago.lua | 80 +- data-otservbr-global/npc/satsu.lua | 5 + data-otservbr-global/npc/serafin.lua | 7 +- data-otservbr-global/npc/shoddy_beggar.lua | 16 +- data-otservbr-global/npc/siflind.lua | 70 +- data-otservbr-global/npc/simon_the_beggar.lua | 7 +- data-otservbr-global/npc/sinatuki.lua | 2 +- data-otservbr-global/npc/sinclair.lua | 33 +- data-otservbr-global/npc/sister_of_jack.lua | 16 +- data-otservbr-global/npc/snake_eye.lua | 10 +- data-otservbr-global/npc/spectulus.lua | 559 ++------ data-otservbr-global/npc/storkus.lua | 76 +- data-otservbr-global/npc/sven.lua | 85 +- data-otservbr-global/npc/swolt.lua | 2 + data-otservbr-global/npc/tamerin.lua | 34 +- data-otservbr-global/npc/tanaro.lua | 2 + data-otservbr-global/npc/tehlim.lua | 4 +- data-otservbr-global/npc/thanita.lua | 37 + data-otservbr-global/npc/the_orc_king.lua | 4 +- .../npc/theodore_loveless.lua | 2 +- data-otservbr-global/npc/tim_the_guard.lua | 13 +- data-otservbr-global/npc/timothy.lua | 6 +- data-otservbr-global/npc/tony.lua | 6 +- data-otservbr-global/npc/ulala.lua | 45 +- data-otservbr-global/npc/uncle.lua | 90 +- data-otservbr-global/npc/urkalio.lua | 3 + data-otservbr-global/npc/uzgod.lua | 4 +- data-otservbr-global/npc/uzon.lua | 2 +- data-otservbr-global/npc/walter_the_guard.lua | 10 +- data-otservbr-global/npc/willard.lua | 4 +- data-otservbr-global/npc/wyda.lua | 6 +- data-otservbr-global/npc/wyrdin.lua | 23 +- data-otservbr-global/npc/xorlosh.lua | 20 +- data-otservbr-global/npc/yalahari.lua | 164 +-- data-otservbr-global/npc/yaman.lua | 4 +- data-otservbr-global/npc/zalamon.lua | 130 +- data-otservbr-global/npc/zirella.lua | 46 +- data-otservbr-global/npc/zizzle.lua | 30 +- data-otservbr-global/npc/zlak.lua | 22 +- data-otservbr-global/npc/zumtah.lua | 10 +- .../scripts/actions/other/enchanting.lua | 4 +- .../actions/other/others/quest_system1.lua | 16 +- .../actions/other/others/quest_system2.lua | 42 +- .../actions/quests/barbarian_test/mead.lua | 34 - .../mission3_chest.lua | 18 - .../actions/quests/ice_islands/charm.lua | 49 - .../rottin_wood_and_married_men/trap.lua | 72 - .../quests/tibia_tales/exterminator_flask.lua | 18 - .../actions/quests/what_a_foolish/flask.lua | 29 - .../quests/what_a_foolish/worn_cloth.lua | 19 - .../scripts/actions/tools/crowbar.lua | 39 - .../scripts/actions/tools/hammer.lua | 4 +- .../scripts/actions/tools/lock_pick.lua | 4 +- .../scripts/actions/tools/present.lua | 2 +- .../scripts/actions/tools/skinning.lua | 13 +- .../creaturescripts/customs/freequests.lua | 266 ++-- .../creaturescripts/others/player_death.lua | 4 +- .../diseased_trio_kill.lua | 27 - .../scripts/movements/teleport/citizen.lua | 2 +- .../movements/teleport/citizen_svargrond.lua | 2 +- .../a_pirates_tail/actions_cheesy_key.lua} | 0 .../actions_rascacoon_shortcut.lua} | 0 ...creaturescripts_a_pirates_tail_bosses.lua} | 0 .../creaturescripts_ratmiral_death.lua} | 0 .../creaturescripts_tentugly_death.lua} | 0 .../adventurers_guild/actions_treasure.lua} | 0 .../actions_warrior_skeleton.lua} | 0 ...creaturescripts_the_great_dragon_hunt.lua} | 0 .../actions_galthens_tree.lua} | 0 .../actions_idol_of_tukh.lua} | 0 .../actions_iksupan_entrance.lua} | 0 .../actions_iksupan_exit.lua} | 0 .../actions_yselda_entrances.lua} | 0 .../actions_yselda_shortcut.lua} | 0 .../actions_crystal_ball.lua} | 0 .../creaturescripts_renegade_orc_kill.lua} | 6 +- .../movements_erayo_house.lua} | 0 .../barbarian_test/action_horn.lua} | 27 +- .../quests/barbarian_test/action_mead.lua | 34 + .../bigfoot_burden/actions_beer.lua} | 0 .../bigfoot_burden/actions_crystal.lua} | 0 .../bigfoot_burden/actions_extractor.lua} | 0 .../bigfoot_burden/actions_matchmaker.lua} | 0 .../bigfoot_burden/actions_mouthpiece.lua} | 0 .../bigfoot_burden/actions_mushroom.lua} | 0 .../bigfoot_burden/actions_music.lua} | 0 .../bigfoot_burden/actions_package.lua} | 0 .../bigfoot_burden/actions_pig.lua} | 0 .../bigfoot_burden/actions_repair.lua} | 0 .../bigfoot_burden/actions_rewards.lua} | 0 .../bigfoot_burden/actions_shooting.lua} | 0 .../bigfoot_burden/actions_spores.lua} | 0 .../bigfoot_burden/actions_stone.lua} | 0 .../actions_warzone1_crystal.lua} | 0 .../creaturescripts_boss_room_kick.lua} | 0 .../creaturescripts_bosses_warzone.lua} | 0 .../creaturescripts_parasite.lua} | 0 .../creaturescripts_versperoth_kill.lua} | 0 .../creaturescripts_wiggler_kill.lua} | 0 .../movements_gnomebase_teleport.lua} | 0 .../bigfoot_burden/movements_task_ear.lua} | 0 .../movements_task_endurance.lua} | 0 .../movements_task_shooting.lua} | 0 .../movements_task_truffles.lua} | 0 .../bigfoot_burden/movements_task_x_ray.lua} | 0 .../movements_versperoth_spawn.lua} | 0 .../movements_warzone_boss.lua} | 0 .../movements_warzone_teleport.lua} | 0 .../chayenne_realm/actions_lever.lua} | 0 .../chayenne_realm/actions_reward.lua} | 0 .../chayenne_realm/movements_enter_realm.lua} | 0 .../actions_mission3_chest.lua | 16 + .../actions_mission3_poison_water.lua} | 6 +- .../actions_mission4_grease_oil.lua} | 7 +- .../actions_mission4_levers_puzzle.lua} | 6 +- .../actions_zalamon_door.lua} | 2 +- .../movements_click.lua} | 10 +- .../movements_spy.lua} | 8 +- .../movements_stair.lua} | 4 +- .../movements_symbol.lua} | 6 +- .../movements_teleport.lua} | 2 +- .../movements_temple.lua} | 6 +- .../cults_of_tibia/actions_analyser.lua} | 0 .../cults_of_tibia/actions_bosses_levers.lua} | 0 .../cults_of_tibia/actions_counter_agent.lua} | 0 .../cults_of_tibia/actions_crate.lua} | 0 .../cults_of_tibia/actions_cult_symbol.lua} | 0 .../cults_of_tibia/actions_document.lua} | 0 .../cults_of_tibia/actions_last_object.lua} | 0 .../cults_of_tibia/actions_lever_mota.lua} | 0 .../cults_of_tibia/actions_magnifier.lua} | 0 .../cults_of_tibia/actions_misguided.lua} | 0 .../cults_of_tibia/actions_torch.lua} | 0 .../creaturescripts_bosses_mission_cults.lua} | 0 .../creaturescripts_carlin_vortex_spawn.lua} | 0 .../creaturescripts_check_tile.lua} | 0 .../creaturescripts_destroyed_pillar.lua} | 0 .../creaturescripts_essence_of_malice.lua} | 0 .../creaturescripts_evaporate.lua} | 0 ...reaturescripts_glowing_rubbish_amulet.lua} | 0 .../creaturescripts_leiden_heal.lua} | 0 .../creaturescripts_machine.lua} | 0 .../creaturescripts_minotaur_task_count.lua} | 0 .../creaturescripts_pillar_health.lua} | 0 .../creaturescripts_sandking.lua} | 0 .../creaturescripts_spawn_boss.lua} | 0 .../creaturescripts_splash.lua} | 0 ...eaturescripts_zarcorix_reflect_damage.lua} | 0 .../cults_of_tibia/movements_begin_task.lua} | 0 .../cults_of_tibia/movements_boss_timer.lua} | 0 .../cults_of_tibia/movements_check_oasis.lua} | 0 .../movements_energy_fence.lua} | 0 .../cults_of_tibia/movements_geyser.lua} | 0 .../cults_of_tibia/movements_ice.lua} | 0 .../cults_of_tibia/movements_ice_death.lua} | 0 .../cults_of_tibia/movements_looktype.lua} | 0 ...nts_movement-cults-of-carlin-teleport.lua} | 0 .../movements_orc_teleport.lua} | 0 .../movements_river_teleport.lua} | 0 .../movements_sand_entrance.lua} | 0 .../cults_of_tibia/movements_sandking.lua} | 0 .../cults_of_tibia/movements_tar.lua} | 0 .../movements_task_teleport.lua} | 0 ...ments_teleport_from_essence_of_malice.lua} | 0 .../actions_crude_lava_pump.lua} | 0 .../actions_crude_lava_pump_achievements.lua} | 0 .../dangerous_depth/actions_gnome_chart.lua} | 0 .../dangerous_depth/actions_gnome_items.lua} | 0 .../actions_gnome_trignometre.lua} | 0 .../actions_gnomish_chest.lua} | 0 .../actions_gnomish_pesticide.lua} | 0 .../dangerous_depth/actions_lever_barrel.lua} | 0 .../actions_using_crystals.lua} | 0 .../actions_warzone_crystals.lua} | 0 .../dangerous_depth/actions_wooden_trash.lua} | 0 ...creaturescripts_bosses_mission_depths.lua} | 0 .../creaturescripts_fiery_heart.lua} | 0 .../creaturescripts_lost_exile_task.lua} | 0 .../creaturescripts_snail_slime_kill.lua} | 0 .../creaturescripts_the_baron_from_below.lua} | 0 .../movements_boss_entrance.lua} | 0 .../movements_energy_entrance.lua} | 0 .../movements_gnome_avalanche.lua} | 0 .../movements_gnome_ordnance.lua} | 0 .../movements_gnomes_ordnance_end.lua} | 0 .../movements_lava_damage.lua} | 0 .../movements_lost_exiles.lua} | 0 .../movements_warzone_entrance.lua} | 0 .../dark_trails/actions_corpse.lua} | 0 .../actions_lever_death_priest_shargon.lua} | 0 .../actions_lever_the_ravager.lua} | 0 ...turescripts_kill_death_priest_shargon.lua} | 0 .../creaturescripts_kill_the_ravager.lua} | 0 ...reaturescripts_think_the_ravager_heal.lua} | 0 .../movements_necrometer_tile_access.lua} | 0 .../dawnport/actions_legion_helmet.lua} | 0 .../dawnport/actions_the_rare_herb.lua} | 0 .../dawnport/actions_vocation_reward.lua} | 0 .../dawnport/creaturescripts_goblin_kill.lua} | 0 .../creaturescripts_minotaur_kill.lua} | 0 .../dawnport/creaturescripts_troll_kill.lua} | 0 .../dawnport/movements_legion_helmet.lua} | 0 .../actions_boxramp.lua} | 0 .../deeplings_worldchange/actions_coral.lua} | 0 .../actions_crystal.lua} | 0 .../actions_crystalvortex.lua} | 0 .../actions_golden_anchor.lua} | 0 .../actions_questfirst.lua} | 0 .../deeplings_worldchange/actions_statue.lua} | 0 .../movements_deepling_bosses.lua} | 0 .../demon_oak/actions_demon_oak.lua} | 12 +- .../demon_oak/actions_demon_oak_chest.lua} | 4 +- .../actions_demon_oak_gravestone.lua} | 2 +- .../globalevents_demon_oak_voices.lua} | 0 .../demon_oak/movements_area_damage.lua} | 0 .../demon_oak/movements_entrance.lua} | 6 +- .../demon_oak/movements_squares.lua} | 4 +- .../actions_desert_dungeon_lever.lua} | 0 .../devil_helmet/movements_sewer.lua} | 0 ...ts_druid_outfits_blooming_griffinclaw.lua} | 0 .../edron_rope/movements_rope.lua} | 0 .../elemental_spheres/actions_lever.lua} | 4 +- .../actions_lord_of_elements_lever.lua} | 6 +- .../elemental_spheres/actions_machine1.lua} | 4 +- .../elemental_spheres/actions_machine2.lua} | 0 .../elemental_spheres/actions_soils1.lua} | 0 .../elemental_spheres/actions_soils2.lua} | 0 .../creaturescripts_overlord_kill.lua} | 8 +- .../movements_aoe_teleport_out.lua} | 0 .../movements_soil_entrance.lua} | 0 .../movements_soil_exit.lua} | 0 .../movements_summon_overlord.lua} | 8 +- .../movements_extension_mota.lua} | 0 .../fathers_burden/actions_corpse.lua} | 0 .../actions_bosses_killed.lua} | 0 .../feaster_of_souls/actions_entrances.lua} | 0 .../actions_portal_brain_head.lua} | 0 .../actions_portal_minis_feaster.lua} | 0 .../actions_portal_pale_worm.lua} | 0 .../actions_rock_entrance.lua} | 0 .../feaster_of_souls/actions_slab.lua} | 0 .../creaturescripts_pale_worm_death.lua} | 0 .../actions_bone_flute.lua} | 0 .../actions_bone_flute_wall.lua} | 0 .../actions_boots_of_homecoming.lua} | 0 .../actions_color_levers.lua} | 0 .../actions_ferumbras_amulet.lua} | 0 .../actions_ferumbras_lever.lua} | 0 .../actions_ferumbras_mana_keg.lua} | 0 .../actions_flower_puzzle_lever.lua} | 0 .../actions_grave_flower.lua} | 0 .../actions_habitat_corrupted.lua} | 0 .../actions_habitat_desert.lua} | 0 .../actions_habitat_dimension.lua} | 0 .../actions_habitat_grass.lua} | 0 .../actions_habitat_ice.lua} | 0 .../actions_habitat_lever.lua} | 0 .../actions_habitat_mushroom.lua} | 0 .../actions_habitat_roshamuul.lua} | 0 .../actions_habitat_venom.lua} | 0 .../actions_lever_first.lua} | 0 .../actions_lever_four.lua} | 0 .../actions_lever_second.lua} | 0 .../actions_lever_third.lua} | 0 .../actions_mysterious_scroll.lua} | 0 .../actions_purified_soul.lua} | 0 .../actions_rat_lever.lua} | 0 .../ferumbras_ascendant/actions_reward.lua} | 0 .../actions_sacrifice.lua} | 0 .../ferumbras_ascendant/actions_statue.lua} | 0 .../actions_tarbaz_notes.lua} | 0 .../actions_teleportation_rod.lua} | 0 .../actions_the_shatterer_lever.lua} | 0 .../actions_the_shatterer_levers.lua} | 0 .../creaturescripts_bone_capsule.lua} | 0 .../creaturescripts_bosses_kill.lua} | 0 .../creaturescripts_death_dragon.lua} | 0 ...creaturescripts_disgusting_ooze_death.lua} | 0 ...escripts_ferumbras_mortal_shell_death.lua} | 0 ...eaturescripts_ferumbras_soul_splinter.lua} | 0 .../creaturescripts_rift_invader_death.lua} | 0 .../creaturescripts_the_shatterer_kill.lua} | 0 .../creaturescripts_zamulosh_clone.lua} | 0 ...alevents_ferumbras_ascendant_effect_1.lua} | 0 ...alevents_ferumbras_ascendant_effect_2.lua} | 0 .../movements_blue_gem.lua} | 0 .../movements_boss_teleport.lua} | 0 .../movements_desperate_soul.lua} | 0 .../movements_entrance.lua} | 0 .../movements_flower_puzzle.lua} | 0 .../movements_gate_of_deathstruction.lua} | 0 .../movements_green_gem.lua} | 0 .../movements_habitats_access.lua} | 0 .../movements_lovely_monsters.lua} | 0 .../movements_mazoran_fire.lua} | 0 .../movements_plagirath_access.lua} | 0 .../movements_razzagorn_access.lua} | 0 .../movements_red_gem.lua} | 0 .../ferumbras_ascendant/movements_seal.lua} | 0 .../movements_shulgrax_lever.lua} | 0 .../ferumbras_ascendant/movements_stair.lua} | 0 .../ferumbras_ascendant/movements_vortex.lua} | 0 .../movements_zamulosh_teleport.lua} | 0 .../actions_bird_cage.lua} | 0 .../forgotten_knowledge/actions_fount.lua} | 0 .../actions_girl_picture.lua} | 0 .../forgotten_knowledge/actions_lantern.lua} | 0 .../actions_lost_time.lua} | 0 .../forgotten_knowledge/actions_old_desk.lua} | 0 .../forgotten_knowledge/actions_plant.lua} | 0 .../actions_secret_wall.lua} | 0 .../actions_servants_mechanism.lua} | 0 .../actions_time_machine.lua} | 0 .../creaturescripts_astral_glyph_death.lua} | 0 .../creaturescripts_astral_source.lua} | 0 .../creaturescripts_bosses_kill.lua} | 0 .../creaturescripts_bound_astral_power.lua} | 0 .../creaturescripts_corrupted_soul.lua} | 0 .../creaturescripts_distorted_source.lua} | 0 .../creaturescripts_dragon_egg.lua} | 0 .../creaturescripts_energy_prism.lua} | 0 .../creaturescripts_energy_prism_death.lua} | 0 ...reaturescripts_healthchange_forgotten.lua} | 0 .../creaturescripts_lloyd_preparedeath.lua} | 0 .../creaturescripts_melting_death.lua} | 0 .../creaturescripts_possessed_tree.lua} | 0 .../creaturescripts_replica_servants.lua} | 0 .../creaturescripts_soulcatcher_summon.lua} | 0 .../creaturescripts_thorn_knight_death.lua} | 0 .../creaturescripts_time_guardian_health.lua} | 0 .../movements_cave_entrance.lua} | 0 .../movements_challenger.lua} | 0 .../movements_dragonking_vortex.lua} | 0 .../movements_entrance_teleport.lua} | 0 .../forgotten_knowledge/movements_fount.lua} | 0 .../movements_ice_teleport.lua} | 0 .../movements_lava_teleport.lua} | 0 .../movements_servant_teleport.lua} | 0 .../movements_teleport_tree.lua} | 0 .../formogar_mine_hoist/movements_hoist.lua} | 0 .../grave_danger/actions_bosses_killed.lua} | 0 .../cobra_bastion/actions_scarlett.lua} | 0 .../creaturescripts_scarlett.lua} | 0 .../creaturescripts_ugly_monster.lua} | 0 .../grave_danger/creaturescripts_sirs.lua} | 0 .../creaturescripts_zelosDeath.lua} | 0 .../globalevents_cobra_minis_custodian.lua} | 0 .../globalevents_cobra_minis_gaffir.lua} | 0 .../globalevents_cobra_minis_quaid.lua} | 0 .../movements_firewall_gaffir.lua} | 0 .../movements_teleport_king_zelos.lua} | 0 .../gravedigger/actions_amforas.lua} | 0 .../gravedigger/actions_ashes.lua} | 0 .../gravedigger/actions_blood.lua} | 0 .../gravedigger/actions_bones.lua} | 0 .../gravedigger/actions_bookcase.lua} | 0 .../gravedigger/actions_brain.lua} | 0 .../gravedigger/actions_caixa.lua} | 0 .../gravedigger/actions_candles.lua} | 0 .../gravedigger/actions_cape.lua} | 0 .../gravedigger/actions_chalk.lua} | 0 .../gravedigger/actions_flask.lua} | 0 .../gravedigger/actions_hallowed.lua} | 0 .../gravedigger/actions_inscriptions.lua} | 0 .../gravedigger/actions_key1.lua} | 0 .../gravedigger/actions_key2.lua} | 0 .../gravedigger/actions_monks.lua} | 0 .../gravedigger/actions_palanca.lua} | 0 .../gravedigger/actions_pyramids1.lua} | 0 .../gravedigger/actions_pyramids2.lua} | 0 .../gravedigger/actions_sacrifice.lua} | 0 .../gravedigger/actions_scroll.lua} | 0 .../gravedigger/actions_statue.lua} | 0 .../gravedigger/actions_tears.lua} | 0 .../gravedigger/actions_tincture.lua} | 0 .../actions_ancient_feud_entrances.lua} | 0 .../actions_closed_silvered_trap.lua} | 0 .../actions_portal_minis_ancient_feud.lua} | 0 .../actions_portal_minis_grimvale.lua} | 0 .../grimvale/actions_silver_liquid.lua} | 0 .../creaturescripts_feroxa_transform.lua} | 0 .../globalevents_grimvale_feroxa.lua} | 0 .../grimvale/movements_silvered_trap.lua} | 0 .../movements_strangely_glowing_mark.lua} | 0 .../actions_charges_lever.lua} | 0 .../actions_cracklers_lever.lua} | 0 .../actions_devourer_access.lua} | 0 .../actions_final_lever.lua} | 0 .../heart_of_destruction/actions_reward.lua} | 0 .../actions_sparks_lever.lua} | 0 .../creaturescripts_aftershock_transform.lua} | 0 .../creaturescripts_anomaly_transform.lua} | 0 ...creaturescripts_charged_anomaly_death.lua} | 0 ...escripts_charged_disruption_transform.lua} | 0 .../creaturescripts_charger_spawn.lua} | 0 .../creaturescripts_charging_out_death.lua} | 0 .../creaturescripts_crackler_transform.lua} | 0 .../creaturescripts_depolarized_death.lua} | 0 ...creaturescripts_depolarized_transform.lua} | 0 ...creaturescripts_devourer_player_death.lua} | 0 .../creaturescripts_disruption_transform.lua} | 0 .../creaturescripts_eradicator_transform.lua} | 0 .../creaturescripts_foreshock_transform.lua} | 0 .../creaturescripts_heart_boss_death.lua} | 0 .../creaturescripts_heart_minion_death.lua} | 0 .../creaturescripts_outburst_charge.lua} | 0 .../creaturescripts_overcharge_death.lua} | 0 .../creaturescripts_rupture_heal.lua} | 0 .../creaturescripts_rupture_resonance.lua} | 0 .../creaturescripts_shocks_death.lua} | 0 .../creaturescripts_spark_death.lua} | 0 .../creaturescripts_spark_devourer_death.lua} | 0 .../movements_ice_crack.lua} | 0 .../movements_teleport.lua} | 0 .../movements_teleport_heart.lua} | 0 .../movements_vortex_anomaly.lua} | 0 .../movements_vortex_crackler.lua} | 0 .../movements_vortex_hunger.lua} | 0 .../actions_machines_deep_terror.lua} | 0 .../actions_machines_glooth_horror.lua} | 0 .../actions_machines_lava.lua} | 0 .../actions_machines_professor_maxxen.lua} | 0 .../actions_raging_corpse.lua} | 0 .../hero_of_rathleton/actions_reward.lua} | 0 .../creaturescripts_bosses_kill.lua} | 0 .../creaturescripts_glooth_horror.lua} | 0 .../creaturescripts_tentacle.lua} | 0 .../movements_deep_terror.lua} | 0 .../hero_of_rathleton/movements_exit.lua} | 0 .../hero_of_rathleton/movements_fast_way.lua} | 0 .../movements_glooth_horror.lua} | 0 .../hero_of_rathleton/movements_lava.lua} | 0 .../movements_professor_maxxen.lua} | 0 .../hot_cuisine/actions_cookbook1.lua} | 0 .../hot_cuisine/actions_cookbook2.lua} | 0 .../in_service_of_yalahar/actions_charm.lua} | 2 +- .../actions_formula.lua} | 2 +- .../in_service_of_yalahar/actions_ghost.lua} | 4 +- .../actions_last_fight.lua} | 8 +- .../in_service_of_yalahar/actions_matrix.lua} | 8 +- .../actions_mechanism.lua} | 2 +- .../actions_morik_summon.lua} | 4 +- .../actions_mr_west_door.lua} | 8 +- .../in_service_of_yalahar/actions_reward.lua} | 18 +- .../actions_yalahar_machine_war_golems.lua} | 4 +- .../creaturescritps_azerus_kill.lua} | 0 .../creaturescritps_diseased_trio_kill.lua | 27 + .../movements_demon_teleport.lua} | 0 .../movements_last_fight_teleport.lua} | 6 +- .../movements_morik.lua} | 6 +- .../movements_quara_vortex.lua} | 0 .../movements_yalahar_machine_war_golems.lua} | 4 +- .../quara_leader_kill.lua | 12 +- .../creaturescripts_boss_kill.lua} | 0 .../creaturescripts_monster_kill.lua} | 20 +- .../movements_boss.lua} | 14 +- .../kilmaresh/actions_augerfun.lua} | 0 .../kilmaresh/actions_basin.lua} | 0 .../kilmaresh/actions_books.lua} | 0 .../kilmaresh/actions_cagekey.lua} | 0 .../kilmaresh/actions_coruja.lua} | 0 .../kilmaresh/actions_glasshoneyfun.lua} | 0 .../kilmaresh/actions_lyre.lua} | 0 .../kilmaresh/actions_peeler.lua} | 0 .../kilmaresh/actions_peelerfun.lua} | 0 .../kilmaresh/actions_pickenchanted.lua} | 0 .../actions_portal_minis_kilmaresh.lua} | 0 .../kilmaresh/actions_sangra.lua} | 0 .../kilmaresh/actions_scissors.lua} | 0 .../kilmaresh/actions_scissorsfun.lua} | 0 .../kilmaresh/actions_tortoise.lua} | 0 .../kilmaresh/actions_tumulo.lua} | 0 .../kilmaresh/actions_tumuloerro.lua} | 0 .../kilmaresh/creaturescripts_bragrumol.lua} | 0 .../kilmaresh/creaturescripts_fafnar.lua} | 0 .../kilmaresh/creaturescripts_mozradek.lua} | 0 .../kilmaresh/creaturescripts_xogixath.lua} | 0 .../kilmaresh/movements_firetp.lua} | 0 .../kilmaresh/movements_steptile.lua} | 0 .../kilmaresh/movements_tpvoc.lua} | 0 .../action_bag.lua} | 0 .../action_boss.lua} | 6 +- .../action_switch.lua} | 1 + .../krailos/movements_access_depot.lua} | 0 .../lions_rock/actions_lions_rock.lua} | 0 .../lions_rock/movements_lions_rock.lua} | 0 .../liquid_black/actions_chairteleport.lua} | 0 .../actions_notescoordinates.lua} | 0 .../liquid_black/actions_seashell_key.lua} | 0 .../creaturescripts_deepling_boss_kill.lua} | 0 .../liquid_black/movements_ladder.lua} | 0 .../liquid_black/movements_quick_access.lua} | 0 .../liquid_black/movements_shortcut.lua} | 0 .../lower_roshamuul/actions_bone.lua} | 0 .../lower_roshamuul/actions_chalk.lua} | 0 .../lower_roshamuul/actions_gravel.lua} | 0 .../lower_roshamuul/actions_mixture.lua} | 0 .../lower_roshamuul/actions_mortar.lua} | 0 .../actions_resonance_chamber.lua} | 0 .../lower_roshamuul/actions_trough.lua} | 0 .../marapur/actions_boss_timira_fight.lua} | 0 .../marapur/actions_teleports_timira.lua} | 0 .../actions_devil_helmet_lever.lua} | 0 .../actions_mysterious_metal_egg.lua} | 0 .../oramond/actions_glooth_fairy_lever.lua} | 0 .../chavis_tasks/actions_to_take_roots.lua} | 0 .../actions_the_ancient_sewers.lua} | 0 .../others/actions_calassa_comb_door.lua} | 0 .../actions_deeper_banuta_shortcut.lua} | 0 .../others/actions_ectoplasm_container.lua} | 0 .../others/actions_exterminator_flask.lua | 40 + .../others/actions_fire_bug.lua} | 4 +- .../others/actions_gooey_mass.lua} | 0 .../others/actions_hellgate_lever.lua} | 0 .../others/actions_holy_water.lua} | 76 +- .../others/actions_orc_edron_lever.lua} | 0 .../actions_serpentine_tower_lever.lua} | 0 .../actions_serpentine_tower_torch.lua} | 0 .../others/actions_steal_from_thieves.lua} | 0 ...urescripts_energized_raging_mage_kill.lua} | 0 .../creaturescripts_raging_mage_1.lua} | 0 .../creaturescripts_raging_mage_2.lua} | 0 .../creaturescripts_raging_mage_kill.lua} | 0 .../creaturescripts_yielothax_kill.lua} | 0 .../actions_broken_wall.lua} | 4 +- .../actions_corpse.lua} | 8 +- .../actions_trap.lua | 115 ++ .../sea_of_light/actions_sea_of_light.lua} | 12 +- .../actions_amazon_disguise_kit.lua} | 0 .../secret_service/actions_lever.lua} | 1 + .../secret_service/actions_ring.lua} | 4 +- .../secret_service/actions_rust_bugs.lua} | 4 +- .../secret_service/actions_tools.lua} | 0 .../creaturescripts_black_knight_kill.lua} | 6 +- .../secret_service/movements_amazon.lua} | 4 +- .../secret_service/movements_pirate.lua} | 4 +- .../soul_war/actions_bosses_killed.lua} | 0 .../soul_war/actions_portal_megalomania.lua} | 0 .../actions_portal_reward_soulwar.lua} | 0 .../soul_war/actions_reward_soul_war.lua} | 0 .../soul_war/actions_soulwar_entrances.lua} | 0 .../spike_tasks/actions_fertilizer.lua} | 0 .../spike_tasks/actions_ghost_detector.lua} | 0 .../spike_tasks/actions_lode_stone.lua} | 0 .../spike_tasks/actions_nests.lua} | 0 .../spike_tasks/actions_spirit_shovel.lua} | 0 .../spike_tasks/actions_thermometer.lua} | 0 .../spike_tasks/actions_tuning_fork.lua} | 0 .../creaturescripts_lower_spike_kill.lua} | 0 .../creaturescripts_middle_spike_kill.lua} | 0 .../creaturescripts_upper_spike_kill.lua} | 0 .../actions_magical_device.lua} | 16 +- .../creaturescripts_arena_kill.lua} | 6 +- .../movements_arena_enter.lua} | 4 +- .../svargrond_arena/movements_arena_pit.lua} | 16 +- .../movements_arena_trophy.lua} | 0 .../thais_quest/actions_life_ring_lever.lua} | 0 .../actions_ruins_instruments.lua | 2 +- .../the_cursed_crystal/actions_MedusaOil.lua} | 0 .../the_cursed_crystal/actions_Misc.lua} | 0 .../the_cursed_crystal/actions_Ointment.lua} | 0 .../movements_StepIn_CursedCrystal.lua} | 0 .../actions_bosses_killed.lua} | 0 .../actions_dream_courts_lever.lua} | 0 .../actions_entrances_dream_courts.lua} | 0 .../actions_portal_nightmare_beast.lua} | 0 ...ovements_faceless_bane_step_positions.lua} | 0 .../the_dream_courts/movements_teleport.lua} | 0 .../actions_lair_entrance.lua} | 0 .../the_first_dragon/actions_lever.lua} | 0 .../the_first_dragon/actions_rewards.lua} | 0 .../actions_sacrifice_items.lua} | 0 .../actions_treasure_chest.lua} | 0 .../creaturescripts_death_angry_plant.lua} | 0 .../creaturescripts_death_dragon_essence.lua} | 0 .../creaturescripts_death_fallen.lua} | 0 .../creaturescripts_death_first_dragon.lua} | 0 ...eaturescripts_death_somewhat_beatable.lua} | 0 .../creaturescripts_kill_dragon.lua} | 0 .../movements_entrance_teleport.lua} | 0 .../movements_exit_teleport.lua} | 0 .../movements_flower_bowl.lua} | 0 .../movements_heaven_blossom.lua} | 0 .../movements_last_teleport.lua} | 0 .../movements_zorvorax_secrets.lua} | 0 .../movements_dormitory_teleport.lua} | 0 .../movements_necromancer_servant.lua} | 0 .../movements_sacrifice_teleport.lua} | 0 .../movements_teleport.lua} | 0 .../actions_bargate_lever.lua} | 0 .../actions_ladder.lua} | 0 .../actions_levers.lua} | 1 + .../actions_ore_wagon.lua} | 10 +- ...eaturescripts_pythius_the_rotten_kill.lua} | 0 .../moviments_bellow.lua} | 0 .../moviments_elevator.lua} | 2 +- .../moviments_gap.lua} | 0 .../moviments_ore_wagon.lua} | 4 +- .../moviments_pythius_boss_teleport.lua} | 0 .../moviments_pythius_teleport.lua} | 2 +- .../moviments_tunnel.lua} | 0 .../actions_bait.lua} | 30 +- .../movements_teleports.lua} | 0 .../actions_anthill.lua} | 13 +- .../the_ice_islands_quest/actions_charm.lua | 50 + .../the_ice_islands_quest/actions_cure.lua} | 2 +- .../the_ice_islands_quest/actions_paint.lua} | 10 +- .../actions_yakchal.lua} | 0 .../creaturescripts_husky_kill.lua} | 4 +- .../movements_helheim.lua} | 6 +- .../movements_nibelor_dog_led.lua} | 8 +- .../actions_brother_lever.lua} | 0 .../actions_rewards.lua} | 8 +- .../actions_ungreez_door.lua} | 3 +- .../actions_vampire_hunt.lua} | 7 +- .../creaturescripts_inquisition_boss.lua} | 0 .../creaturescripts_inquisition_ungreez.lua} | 6 +- .../movements_entrance.lua} | 23 +- .../movements_reward_room_text.lua} | 4 +- .../movements_teleport_main.lua} | 10 +- .../actions_asura_mirror.lua} | 0 .../{action-arena.lua => action_arena.lua} | 0 .../{action-beaver.lua => action_beaver.lua} | 0 ...ction-elevator.lua => action_elevator.lua} | 0 ...hidden_note.lua => action_hidden_note.lua} | 0 .../{action-outfit.lua => action_outfit.lua} | 0 ...oor.lua => action_prision_secret_door.lua} | 0 .../{action-vine.lua => action_vine.lua} | 0 ...aturescripts_shard_of_corruption_kill.lua} | 0 ...ll.lua => creaturescripts_tirecz_kill.lua} | 0 ..._hole.lua => movement_corruption_hole.lua} | 0 ...t-jail_exit.lua => movement_jail_exit.lua} | 0 ...ur_boss.lua => movement_minotaur_boss.lua} | 0 ...ion_trap.lua => movement_prision_trap.lua} | 0 ...ovement-wayout.lua => movement_wayout.lua} | 0 ....lua => movements_snake_head_teleport.lua} | 0 .../the_outlaw_camp/actions_oven.lua} | 0 .../the_outlaw_camp/actions_power_burn.lua} | 0 .../the_outlaw_camp/actions_power_switch.lua} | 0 .../actions_the_outlaw_camp_quest.lua} | 0 .../the_outlaw_camp/movements_entrance.lua} | 0 .../globalevents_pits_of_inferno_bosses.lua} | 0 .../actions_package.lua} | 0 .../actions_present.lua} | 0 .../actions_waldos_posthorn.lua} | 0 .../creaturescripts_magma_bubble_death.lua} | 0 ...aturescripts_the_primal_menace_killed.lua} | 0 .../actions_asura_mirror.lua} | 0 .../actions_basinfire.lua} | 0 .../actions_bastion_access.lua} | 0 .../actions_blacktp.lua} | 0 .../actions_bluetp.lua} | 0 .../actions_boattp.lua} | 0 .../actions_bone.lua} | 0 .../actions_bonedoor.lua} | 0 .../actions_book.lua} | 0 .../actions_bosses_killed.lua} | 0 .../actions_corpse.lua} | 0 .../actions_energybasin.lua} | 0 .../actions_enterlibrary.lua} | 0 .../actions_eyekey.lua} | 0 .../actions_fish.lua} | 0 .../actions_greentp.lua} | 0 .../actions_leverdoor.lua} | 0 .../actions_leverruby.lua} | 0 .../actions_library_entrances.lua} | 0 .../actions_lotuskey.lua} | 0 .../actions_peacock.lua} | 0 .../actions_pinktp.lua} | 0 .../actions_sealedbook.lua} | 0 .../actions_skullground.lua} | 0 .../actions_statuedeeplings.lua} | 0 .../actions_strandhair.lua} | 0 .../actions_telescop.lua} | 0 .../creaturescripts_falcon_minibosses.lua} | 0 ...ts_secret_library_grand_canon_dominus.lua} | 0 ...secret_library_grand_chaplain_gaunder.lua} | 0 ...secret_library_grand_commander_soeren.lua} | 0 ...vents_secret_library_preceptor_lazare.lua} | 0 ...balevents_secret_library_spawn_damage.lua} | 0 .../movements_boat.lua} | 0 .../movements_golem_teleport.lua} | 0 .../movements_pink_teleport.lua} | 0 .../movements_teleport.lua} | 0 .../movements_geomantic_charges.lua} | 0 .../movements_spike_teleport.lua} | 0 .../the_tainted_soul/actions_star_herb.lua} | 0 .../actions_climbing_vine.lua} | 1 + .../actions_dwarf_disguise_kit.lua} | 0 .../actions_fish_napping_door.lua} | 2 +- .../actions_fish_napping_key.lua} | 2 +- .../the_thieves_guild_quest/actions_note.lua} | 5 +- .../actions_outlaw_camp_door.lua} | 2 +- .../actions_slime_gobbler.lua} | 0 .../creaturescripts_mage_death.lua} | 0 .../creaturescripts_servant_death.lua} | 0 ...balevents_their_master_voice_mad_mage.lua} | 0 .../movements_entrance.lua} | 0 .../creaturescripts_nomad_kill.lua} | 4 +- .../actions_ultimate_booze_beer_bottle.lua} | 0 .../tinder_box/actions_reward.lua} | 0 .../tinder_box/actions_tinder_box.lua} | 0 .../to_blind_the_enemy_quest/mirror.lua | 31 + .../creaturescripts_goblin_leader_kill.lua | 13 + .../actions_triangle_tower_lever.lua} | 0 .../troll_sabotage/movements_teleport.lua} | 4 +- .../actions_mission5_ray_of_light.lua} | 6 +- ...vements_mission2_all_around_the_world.lua} | 4 +- ...ements_mission3_dance_dance_evolution.lua} | 18 +- .../waterfall/movements_waterfall.lua} | 0 .../action_cat_basket.lua} | 4 +- .../what_a_foolish_quest/action_contract.lua} | 2 +- .../what_a_foolish_quest/action_crate.lua} | 2 +- .../what_a_foolish_quest/action_cushion.lua} | 4 +- .../what_a_foolish_quest/action_disguise.lua} | 0 .../what_a_foolish_quest/action_watch.lua} | 2 +- .../action_worn_cloth.lua | 20 + .../movements_destroy_pies.lua} | 4 +- .../white_pearl/movements_white_pearl.lua} | 0 .../actions_mission01_crate.lua} | 2 +- .../actions_mission01_lights.lua} | 24 +- ...ission02_firstcontact_repair_teleport.lua} | 6 +- .../actions_mission03_the_keeper.lua} | 16 +- ...sion04_sacrament_of_the_snake_sceptre.lua} | 6 +- .../actions_mission08_doors.lua} | 0 ...ions_mission08_uninvited_guests_lever.lua} | 0 ...mission09_the_sleeping_dragon_mixture.lua} | 4 +- ...ission10_a_message_of_freedom_sceptre.lua} | 30 +- .../actions_mission11_payback_time_lever.lua} | 6 +- .../actions_mission12_just_rewards.lua} | 9 +- .../creaturescripts_bosses_kill.lua} | 10 +- .../creaturescripts_keeper_kill.lua} | 2 +- ...eaturescripts_lizard_magistratus_kill.lua} | 6 +- .../creaturescripts_lizard_noble_kill.lua} | 4 +- .../creaturescripts_zalamon_kill.lua} | 2 +- .../globalevents_crate.lua | 40 + .../movements_boss_teleport.lua} | 19 +- .../wrath_of_the_emperor/movements_crate.lua} | 12 +- .../movements_keeper.lua} | 0 .../movements_prison.lua} | 8 +- .../movements_teleports_access.lua} | 14 +- .../raids/bosses/battlemaster_zunzu.lua | 22 + data-otservbr-global/startup/tables/chest.lua | 769 +++++++++-- .../startup/tables/corpse.lua | 11 + .../startup/tables/door_quest.lua | 127 +- data-otservbr-global/startup/tables/item.lua | 714 +++++++++- data-otservbr-global/startup/tables/lever.lua | 54 + .../startup/tables/teleport.lua | 7 + .../startup/tables/teleport_item.lua | 13 + .../startup/tables/writeable.lua | 9 +- data/libs/functions/player.lua | 20 +- data/npclib/npc_system/modules.lua | 6 +- data/scripts/actions/tools/crowbar.lua | 8 + .../scripts/actions/tools/kitchen_knife.lua | 0 data/scripts/lib/register_actions.lua | 170 +-- 895 files changed, 6298 insertions(+), 4604 deletions(-) create mode 100644 data-otservbr-global/monster/quests/rottin_wood_and_the_married_men_quest/travelling_merchant.lua delete mode 100644 data-otservbr-global/scripts/actions/quests/barbarian_test/mead.lua delete mode 100644 data-otservbr-global/scripts/actions/quests/children_of_the_revolution/mission3_chest.lua delete mode 100644 data-otservbr-global/scripts/actions/quests/ice_islands/charm.lua delete mode 100644 data-otservbr-global/scripts/actions/quests/rottin_wood_and_married_men/trap.lua delete mode 100644 data-otservbr-global/scripts/actions/quests/tibia_tales/exterminator_flask.lua delete mode 100644 data-otservbr-global/scripts/actions/quests/what_a_foolish/flask.lua delete mode 100644 data-otservbr-global/scripts/actions/quests/what_a_foolish/worn_cloth.lua delete mode 100644 data-otservbr-global/scripts/actions/tools/crowbar.lua delete mode 100644 data-otservbr-global/scripts/creaturescripts/quests/in_service_of_yalahar/diseased_trio_kill.lua rename data-otservbr-global/scripts/{actions/quests/a_pirates_tail/cheesy_key.lua => quests/a_pirates_tail/actions_cheesy_key.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/a_pirates_tail/rascacoon_shortcut.lua => quests/a_pirates_tail/actions_rascacoon_shortcut.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/a_pirates_tail/a_pirates_tail_bosses.lua => quests/a_pirates_tail/creaturescripts_a_pirates_tail_bosses.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/a_pirates_tail/ratmiral_death.lua => quests/a_pirates_tail/creaturescripts_ratmiral_death.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/a_pirates_tail/tentugly_death.lua => quests/a_pirates_tail/creaturescripts_tentugly_death.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/adventurers_guild/treasure.lua => quests/adventurers_guild/actions_treasure.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/adventurers_guild/warrior_skeleton.lua => quests/adventurers_guild/actions_warrior_skeleton.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/adventurers_guild/the_great_dragon_hunt.lua => quests/adventurers_guild/creaturescripts_the_great_dragon_hunt.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/adventures_of_galthen/galthens_tree.lua => quests/adventures_of_galthen/actions_galthens_tree.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/adventures_of_galthen/idol_of_tukh.lua => quests/adventures_of_galthen/actions_idol_of_tukh.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/adventures_of_galthen/iksupan_entrance.lua => quests/adventures_of_galthen/actions_iksupan_entrance.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/adventures_of_galthen/iksupan_exit.lua => quests/adventures_of_galthen/actions_iksupan_exit.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/adventures_of_galthen/yselda_entrances.lua => quests/adventures_of_galthen/actions_yselda_entrances.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/adventures_of_galthen/yselda_shortcut.lua => quests/adventures_of_galthen/actions_yselda_shortcut.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/an_uneasy_alliance/crystal_ball.lua => quests/an_uneasy_alliance/actions_crystal_ball.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/an_uneasy_alliance/renegade_orc_kill.lua => quests/an_uneasy_alliance/creaturescripts_renegade_orc_kill.lua} (62%) rename data-otservbr-global/scripts/{movements/quests/assassin_outfit/erayo_house.lua => quests/assassin_outfit/movements_erayo_house.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/barbarian_test/horn.lua => quests/barbarian_test/action_horn.lua} (58%) create mode 100644 data-otservbr-global/scripts/quests/barbarian_test/action_mead.lua rename data-otservbr-global/scripts/{actions/quests/bigfoot_burden/beer.lua => quests/bigfoot_burden/actions_beer.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/bigfoot_burden/crystal.lua => quests/bigfoot_burden/actions_crystal.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/bigfoot_burden/extractor.lua => quests/bigfoot_burden/actions_extractor.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/bigfoot_burden/matchmaker.lua => quests/bigfoot_burden/actions_matchmaker.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/bigfoot_burden/mouthpiece.lua => quests/bigfoot_burden/actions_mouthpiece.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/bigfoot_burden/mushroom.lua => quests/bigfoot_burden/actions_mushroom.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/bigfoot_burden/music.lua => quests/bigfoot_burden/actions_music.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/bigfoot_burden/package.lua => quests/bigfoot_burden/actions_package.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/bigfoot_burden/pig.lua => quests/bigfoot_burden/actions_pig.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/bigfoot_burden/repair.lua => quests/bigfoot_burden/actions_repair.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/bigfoot_burden/rewards.lua => quests/bigfoot_burden/actions_rewards.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/bigfoot_burden/shooting.lua => quests/bigfoot_burden/actions_shooting.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/bigfoot_burden/spores.lua => quests/bigfoot_burden/actions_spores.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/bigfoot_burden/stone.lua => quests/bigfoot_burden/actions_stone.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/bigfoot_burden/warzone1_crystal.lua => quests/bigfoot_burden/actions_warzone1_crystal.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/bigfoot_burden/boss_room_kick.lua => quests/bigfoot_burden/creaturescripts_boss_room_kick.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/bigfoot_burden/bosses_warzone.lua => quests/bigfoot_burden/creaturescripts_bosses_warzone.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/bigfoot_burden/parasite.lua => quests/bigfoot_burden/creaturescripts_parasite.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/bigfoot_burden/versperoth_kill.lua => quests/bigfoot_burden/creaturescripts_versperoth_kill.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/bigfoot_burden/wiggler_kill.lua => quests/bigfoot_burden/creaturescripts_wiggler_kill.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/bigfoot_burden/gnomebase_teleport.lua => quests/bigfoot_burden/movements_gnomebase_teleport.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/bigfoot_burden/task_ear.lua => quests/bigfoot_burden/movements_task_ear.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/bigfoot_burden/task_endurance.lua => quests/bigfoot_burden/movements_task_endurance.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/bigfoot_burden/task_shooting.lua => quests/bigfoot_burden/movements_task_shooting.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/bigfoot_burden/task_truffles.lua => quests/bigfoot_burden/movements_task_truffles.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/bigfoot_burden/task_x_ray.lua => quests/bigfoot_burden/movements_task_x_ray.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/bigfoot_burden/versperoth_spawn.lua => quests/bigfoot_burden/movements_versperoth_spawn.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/bigfoot_burden/warzone_boss.lua => quests/bigfoot_burden/movements_warzone_boss.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/bigfoot_burden/warzone_teleport.lua => quests/bigfoot_burden/movements_warzone_teleport.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/chayenne_realm/lever.lua => quests/chayenne_realm/actions_lever.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/chayenne_realm/reward.lua => quests/chayenne_realm/actions_reward.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/chayenne_realm/enter_realm.lua => quests/chayenne_realm/movements_enter_realm.lua} (100%) create mode 100644 data-otservbr-global/scripts/quests/children_of_the_revolution/actions_mission3_chest.lua rename data-otservbr-global/scripts/{actions/quests/children_of_the_revolution/mission3_poison_water.lua => quests/children_of_the_revolution/actions_mission3_poison_water.lua} (56%) rename data-otservbr-global/scripts/{actions/quests/children_of_the_revolution/mission4_grease_oil.lua => quests/children_of_the_revolution/actions_mission4_grease_oil.lua} (51%) rename data-otservbr-global/scripts/{actions/quests/children_of_the_revolution/mission4_levers_puzzle.lua => quests/children_of_the_revolution/actions_mission4_levers_puzzle.lua} (89%) rename data-otservbr-global/scripts/{actions/quests/children_of_the_revolution/zalamon_door.lua => quests/children_of_the_revolution/actions_zalamon_door.lua} (87%) rename data-otservbr-global/scripts/{movements/quests/children_of_the_revolution/click.lua => quests/children_of_the_revolution/movements_click.lua} (83%) rename data-otservbr-global/scripts/{movements/quests/children_of_the_revolution/spy.lua => quests/children_of_the_revolution/movements_spy.lua} (70%) rename data-otservbr-global/scripts/{movements/quests/children_of_the_revolution/stair.lua => quests/children_of_the_revolution/movements_stair.lua} (82%) rename data-otservbr-global/scripts/{movements/quests/children_of_the_revolution/symbol.lua => quests/children_of_the_revolution/movements_symbol.lua} (56%) rename data-otservbr-global/scripts/{movements/quests/children_of_the_revolution/teleport.lua => quests/children_of_the_revolution/movements_teleport.lua} (89%) rename data-otservbr-global/scripts/{movements/quests/children_of_the_revolution/temple.lua => quests/children_of_the_revolution/movements_temple.lua} (63%) rename data-otservbr-global/scripts/{actions/quests/cults_of_tibia/analyser.lua => quests/cults_of_tibia/actions_analyser.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/cults_of_tibia/bosses_levers.lua => quests/cults_of_tibia/actions_bosses_levers.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/cults_of_tibia/counter_agent.lua => quests/cults_of_tibia/actions_counter_agent.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/cults_of_tibia/crate.lua => quests/cults_of_tibia/actions_crate.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/cults_of_tibia/cult_symbol.lua => quests/cults_of_tibia/actions_cult_symbol.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/cults_of_tibia/document.lua => quests/cults_of_tibia/actions_document.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/cults_of_tibia/last_object.lua => quests/cults_of_tibia/actions_last_object.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/cults_of_tibia/lever_mota.lua => quests/cults_of_tibia/actions_lever_mota.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/cults_of_tibia/magnifier.lua => quests/cults_of_tibia/actions_magnifier.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/cults_of_tibia/misguided.lua => quests/cults_of_tibia/actions_misguided.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/cults_of_tibia/torch.lua => quests/cults_of_tibia/actions_torch.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/cults_of_tibia/bosses_mission_cults.lua => quests/cults_of_tibia/creaturescripts_bosses_mission_cults.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/cults_of_tibia/carlin_vortex_spawn.lua => quests/cults_of_tibia/creaturescripts_carlin_vortex_spawn.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/cults_of_tibia/check_tile.lua => quests/cults_of_tibia/creaturescripts_check_tile.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/cults_of_tibia/destroyed_pillar.lua => quests/cults_of_tibia/creaturescripts_destroyed_pillar.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/cults_of_tibia/essence_of_malice.lua => quests/cults_of_tibia/creaturescripts_essence_of_malice.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/cults_of_tibia/evaporate.lua => quests/cults_of_tibia/creaturescripts_evaporate.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/cults_of_tibia/glowing_rubbish_amulet.lua => quests/cults_of_tibia/creaturescripts_glowing_rubbish_amulet.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/cults_of_tibia/leiden_heal.lua => quests/cults_of_tibia/creaturescripts_leiden_heal.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/cults_of_tibia/machine.lua => quests/cults_of_tibia/creaturescripts_machine.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/cults_of_tibia/minotaur_task_count.lua => quests/cults_of_tibia/creaturescripts_minotaur_task_count.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/cults_of_tibia/pillar_health.lua => quests/cults_of_tibia/creaturescripts_pillar_health.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/cults_of_tibia/sandking.lua => quests/cults_of_tibia/creaturescripts_sandking.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/cults_of_tibia/spawn_boss.lua => quests/cults_of_tibia/creaturescripts_spawn_boss.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/cults_of_tibia/splash.lua => quests/cults_of_tibia/creaturescripts_splash.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/cults_of_tibia/zarcorix_reflect_damage.lua => quests/cults_of_tibia/creaturescripts_zarcorix_reflect_damage.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/cults_of_tibia/begin_task.lua => quests/cults_of_tibia/movements_begin_task.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/cults_of_tibia/boss_timer.lua => quests/cults_of_tibia/movements_boss_timer.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/cults_of_tibia/check_oasis.lua => quests/cults_of_tibia/movements_check_oasis.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/cults_of_tibia/energy_fence.lua => quests/cults_of_tibia/movements_energy_fence.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/cults_of_tibia/geyser.lua => quests/cults_of_tibia/movements_geyser.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/cults_of_tibia/ice.lua => quests/cults_of_tibia/movements_ice.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/cults_of_tibia/ice_death.lua => quests/cults_of_tibia/movements_ice_death.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/cults_of_tibia/looktype.lua => quests/cults_of_tibia/movements_looktype.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/cults_of_tibia/movement-cults-of-carlin-teleport.lua => quests/cults_of_tibia/movements_movement-cults-of-carlin-teleport.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/cults_of_tibia/orc_teleport.lua => quests/cults_of_tibia/movements_orc_teleport.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/cults_of_tibia/river_teleport.lua => quests/cults_of_tibia/movements_river_teleport.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/cults_of_tibia/sand_entrance.lua => quests/cults_of_tibia/movements_sand_entrance.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/cults_of_tibia/sandking.lua => quests/cults_of_tibia/movements_sandking.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/cults_of_tibia/tar.lua => quests/cults_of_tibia/movements_tar.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/cults_of_tibia/task_teleport.lua => quests/cults_of_tibia/movements_task_teleport.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/cults_of_tibia/teleport_from_essence_of_malice.lua => quests/cults_of_tibia/movements_teleport_from_essence_of_malice.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/dangerous_depth/crude_lava_pump.lua => quests/dangerous_depth/actions_crude_lava_pump.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/dangerous_depth/crude_lava_pump_achievements.lua => quests/dangerous_depth/actions_crude_lava_pump_achievements.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/dangerous_depth/gnome_chart.lua => quests/dangerous_depth/actions_gnome_chart.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/dangerous_depth/gnome_items.lua => quests/dangerous_depth/actions_gnome_items.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/dangerous_depth/gnome_trignometre.lua => quests/dangerous_depth/actions_gnome_trignometre.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/dangerous_depth/gnomish_chest.lua => quests/dangerous_depth/actions_gnomish_chest.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/dangerous_depth/gnomish_pesticide.lua => quests/dangerous_depth/actions_gnomish_pesticide.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/dangerous_depth/lever_barrel.lua => quests/dangerous_depth/actions_lever_barrel.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/dangerous_depth/using_crystals.lua => quests/dangerous_depth/actions_using_crystals.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/dangerous_depth/warzone_crystals.lua => quests/dangerous_depth/actions_warzone_crystals.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/dangerous_depth/wooden_trash.lua => quests/dangerous_depth/actions_wooden_trash.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/dangerous_depths/bosses_mission_depths.lua => quests/dangerous_depth/creaturescripts_bosses_mission_depths.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/dangerous_depths/fiery_heart.lua => quests/dangerous_depth/creaturescripts_fiery_heart.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/dangerous_depths/lost_exile_task.lua => quests/dangerous_depth/creaturescripts_lost_exile_task.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/dangerous_depths/snail_slime_kill.lua => quests/dangerous_depth/creaturescripts_snail_slime_kill.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/dangerous_depths/the_baron_from_below.lua => quests/dangerous_depth/creaturescripts_the_baron_from_below.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/dangerous_depth/boss_entrance.lua => quests/dangerous_depth/movements_boss_entrance.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/dangerous_depth/energy_entrance.lua => quests/dangerous_depth/movements_energy_entrance.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/dangerous_depth/gnome_avalanche.lua => quests/dangerous_depth/movements_gnome_avalanche.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/dangerous_depth/gnome_ordnance.lua => quests/dangerous_depth/movements_gnome_ordnance.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/dangerous_depth/gnomes_ordnance_end.lua => quests/dangerous_depth/movements_gnomes_ordnance_end.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/dangerous_depth/lava_damage.lua => quests/dangerous_depth/movements_lava_damage.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/dangerous_depth/lost_exiles.lua => quests/dangerous_depth/movements_lost_exiles.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/dangerous_depth/warzone_entrance.lua => quests/dangerous_depth/movements_warzone_entrance.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/dark_trails/corpse.lua => quests/dark_trails/actions_corpse.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/dark_trails/lever_death_priest_shargon.lua => quests/dark_trails/actions_lever_death_priest_shargon.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/dark_trails/lever_the_ravager.lua => quests/dark_trails/actions_lever_the_ravager.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/dark_trails/kill_death_priest_shargon.lua => quests/dark_trails/creaturescripts_kill_death_priest_shargon.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/dark_trails/kill_the_ravager.lua => quests/dark_trails/creaturescripts_kill_the_ravager.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/dark_trails/think_the_ravager_heal.lua => quests/dark_trails/creaturescripts_think_the_ravager_heal.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/dark_trails/necrometer_tile_access.lua => quests/dark_trails/movements_necrometer_tile_access.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/dawnport/legion_helmet.lua => quests/dawnport/actions_legion_helmet.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/dawnport/the_rare_herb.lua => quests/dawnport/actions_the_rare_herb.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/dawnport/vocation_reward.lua => quests/dawnport/actions_vocation_reward.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/dawnport/goblin_kill.lua => quests/dawnport/creaturescripts_goblin_kill.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/dawnport/minotaur_kill.lua => quests/dawnport/creaturescripts_minotaur_kill.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/dawnport/troll_kill.lua => quests/dawnport/creaturescripts_troll_kill.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/dawnport/legion_helmet.lua => quests/dawnport/movements_legion_helmet.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/deepling_worldchange/boxramp.lua => quests/deeplings_worldchange/actions_boxramp.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/deepling_worldchange/coral.lua => quests/deeplings_worldchange/actions_coral.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/deepling_worldchange/crystal.lua => quests/deeplings_worldchange/actions_crystal.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/deepling_worldchange/crystalvortex.lua => quests/deeplings_worldchange/actions_crystalvortex.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/deepling_worldchange/golden_anchor.lua => quests/deeplings_worldchange/actions_golden_anchor.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/deepling_worldchange/questfirst.lua => quests/deeplings_worldchange/actions_questfirst.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/deepling_worldchange/statue.lua => quests/deeplings_worldchange/actions_statue.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/deeplings_worldchange/deepling_bosses.lua => quests/deeplings_worldchange/movements_deepling_bosses.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/demon_oak/demon_oak.lua => quests/demon_oak/actions_demon_oak.lua} (91%) rename data-otservbr-global/scripts/{actions/quests/demon_oak/demon_oak_chest.lua => quests/demon_oak/actions_demon_oak_chest.lua} (85%) rename data-otservbr-global/scripts/{actions/quests/demon_oak/demon_oak_gravestone.lua => quests/demon_oak/actions_demon_oak_gravestone.lua} (80%) rename data-otservbr-global/scripts/{globalevents/quests/demon_oak_voices.lua => quests/demon_oak/globalevents_demon_oak_voices.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/demon_oak/area_damage.lua => quests/demon_oak/movements_area_damage.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/demon_oak/entrance.lua => quests/demon_oak/movements_entrance.lua} (87%) rename data-otservbr-global/scripts/{movements/quests/demon_oak/squares.lua => quests/demon_oak/movements_squares.lua} (84%) rename data-otservbr-global/scripts/{actions/quests/desert_dungeon_quest/desert_dungeon_lever.lua => quests/desert_dungeon_quest/actions_desert_dungeon_lever.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/devil_helmet/sewer.lua => quests/devil_helmet/movements_sewer.lua} (100%) rename data-otservbr-global/scripts/{globalevents/quests/druid_outfits_blooming_griffinclaw.lua => quests/druid_outfits_quest/globalevents_druid_outfits_blooming_griffinclaw.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/edron_rope/rope.lua => quests/edron_rope/movements_rope.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/elemental_spheres/lever.lua => quests/elemental_spheres/actions_lever.lua} (91%) rename data-otservbr-global/scripts/{actions/quests/elemental_spheres/lord_of_elements_lever.lua => quests/elemental_spheres/actions_lord_of_elements_lever.lua} (93%) rename data-otservbr-global/scripts/{actions/quests/elemental_spheres/machine1.lua => quests/elemental_spheres/actions_machine1.lua} (88%) rename data-otservbr-global/scripts/{actions/quests/elemental_spheres/machine2.lua => quests/elemental_spheres/actions_machine2.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/elemental_spheres/soils1.lua => quests/elemental_spheres/actions_soils1.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/elemental_spheres/soils2.lua => quests/elemental_spheres/actions_soils2.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/elemental_spheres/overlord_kill.lua => quests/elemental_spheres/creaturescripts_overlord_kill.lua} (55%) rename data-otservbr-global/scripts/{movements/quests/elemental_spheres/aoe_teleport_out.lua => quests/elemental_spheres/movements_aoe_teleport_out.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/elemental_spheres/soil_entrance.lua => quests/elemental_spheres/movements_soil_entrance.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/elemental_spheres/soil_exit.lua => quests/elemental_spheres/movements_soil_exit.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/elemental_spheres/summon_overlord.lua => quests/elemental_spheres/movements_summon_overlord.lua} (91%) rename data-otservbr-global/scripts/{movements/quests/extension_mota/extension_mota.lua => quests/extension_mota/movements_extension_mota.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/fathers_burden/corpse.lua => quests/fathers_burden/actions_corpse.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/feaster_of_souls/bosses_killed.lua => quests/feaster_of_souls/actions_bosses_killed.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/feaster_of_souls/entrances.lua => quests/feaster_of_souls/actions_entrances.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/feaster_of_souls/portal_brain_head.lua => quests/feaster_of_souls/actions_portal_brain_head.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/feaster_of_souls/portal_minis_feaster.lua => quests/feaster_of_souls/actions_portal_minis_feaster.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/feaster_of_souls/portal_pale_worm.lua => quests/feaster_of_souls/actions_portal_pale_worm.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/feaster_of_souls/rock_entrance.lua => quests/feaster_of_souls/actions_rock_entrance.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/feaster_of_souls/slab.lua => quests/feaster_of_souls/actions_slab.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/feaster_of_souls/pale_worm_death.lua => quests/feaster_of_souls/creaturescripts_pale_worm_death.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/bone_flute.lua => quests/ferumbras_ascendant/actions_bone_flute.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/bone_flute_wall.lua => quests/ferumbras_ascendant/actions_bone_flute_wall.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/boots_of_homecoming.lua => quests/ferumbras_ascendant/actions_boots_of_homecoming.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/color_levers.lua => quests/ferumbras_ascendant/actions_color_levers.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/ferumbras_amulet.lua => quests/ferumbras_ascendant/actions_ferumbras_amulet.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/ferumbras_lever.lua => quests/ferumbras_ascendant/actions_ferumbras_lever.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/ferumbras_mana_keg.lua => quests/ferumbras_ascendant/actions_ferumbras_mana_keg.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/flower_puzzle_lever.lua => quests/ferumbras_ascendant/actions_flower_puzzle_lever.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/grave_flower.lua => quests/ferumbras_ascendant/actions_grave_flower.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/habitat_corrupted.lua => quests/ferumbras_ascendant/actions_habitat_corrupted.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/habitat_desert.lua => quests/ferumbras_ascendant/actions_habitat_desert.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/habitat_dimension.lua => quests/ferumbras_ascendant/actions_habitat_dimension.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/habitat_grass.lua => quests/ferumbras_ascendant/actions_habitat_grass.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/habitat_ice.lua => quests/ferumbras_ascendant/actions_habitat_ice.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/habitat_lever.lua => quests/ferumbras_ascendant/actions_habitat_lever.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/habitat_mushroom.lua => quests/ferumbras_ascendant/actions_habitat_mushroom.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/habitat_roshamuul.lua => quests/ferumbras_ascendant/actions_habitat_roshamuul.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/habitat_venom.lua => quests/ferumbras_ascendant/actions_habitat_venom.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/lever_first.lua => quests/ferumbras_ascendant/actions_lever_first.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/lever_four.lua => quests/ferumbras_ascendant/actions_lever_four.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/lever_second.lua => quests/ferumbras_ascendant/actions_lever_second.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/lever_third.lua => quests/ferumbras_ascendant/actions_lever_third.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/mysterious_scroll.lua => quests/ferumbras_ascendant/actions_mysterious_scroll.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/purified_soul.lua => quests/ferumbras_ascendant/actions_purified_soul.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/rat_lever.lua => quests/ferumbras_ascendant/actions_rat_lever.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/reward.lua => quests/ferumbras_ascendant/actions_reward.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/sacrifice.lua => quests/ferumbras_ascendant/actions_sacrifice.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/statue.lua => quests/ferumbras_ascendant/actions_statue.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/tarbaz_notes.lua => quests/ferumbras_ascendant/actions_tarbaz_notes.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/teleportation_rod.lua => quests/ferumbras_ascendant/actions_teleportation_rod.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/the_shatterer_lever.lua => quests/ferumbras_ascendant/actions_the_shatterer_lever.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ferumbras_ascendant/the_shatterer_levers.lua => quests/ferumbras_ascendant/actions_the_shatterer_levers.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/ferumbras_ascendant/bone_capsule.lua => quests/ferumbras_ascendant/creaturescripts_bone_capsule.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/ferumbras_ascendant/bosses_kill.lua => quests/ferumbras_ascendant/creaturescripts_bosses_kill.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/ferumbras_ascendant/death_dragon.lua => quests/ferumbras_ascendant/creaturescripts_death_dragon.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/ferumbras_ascendant/disgusting_ooze_death.lua => quests/ferumbras_ascendant/creaturescripts_disgusting_ooze_death.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/ferumbras_ascendant/ferumbras_mortal_shell_death.lua => quests/ferumbras_ascendant/creaturescripts_ferumbras_mortal_shell_death.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/ferumbras_ascendant/ferumbras_soul_splinter.lua => quests/ferumbras_ascendant/creaturescripts_ferumbras_soul_splinter.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/ferumbras_ascendant/rift_invader_death.lua => quests/ferumbras_ascendant/creaturescripts_rift_invader_death.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/ferumbras_ascendant/the_shatterer_kill.lua => quests/ferumbras_ascendant/creaturescripts_the_shatterer_kill.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/ferumbras_ascendant/zamulosh_clone.lua => quests/ferumbras_ascendant/creaturescripts_zamulosh_clone.lua} (100%) rename data-otservbr-global/scripts/{globalevents/quests/ferumbras_ascendant_effect_1.lua => quests/ferumbras_ascendant/globalevents_ferumbras_ascendant_effect_1.lua} (100%) rename data-otservbr-global/scripts/{globalevents/quests/ferumbras_ascendant_effect_2.lua => quests/ferumbras_ascendant/globalevents_ferumbras_ascendant_effect_2.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/ferumbras_ascendant/blue_gem.lua => quests/ferumbras_ascendant/movements_blue_gem.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/ferumbras_ascendant/boss_teleport.lua => quests/ferumbras_ascendant/movements_boss_teleport.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/ferumbras_ascendant/desperate_soul.lua => quests/ferumbras_ascendant/movements_desperate_soul.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/ferumbras_ascendant/entrance.lua => quests/ferumbras_ascendant/movements_entrance.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/ferumbras_ascendant/flower_puzzle.lua => quests/ferumbras_ascendant/movements_flower_puzzle.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/ferumbras_ascendant/gate_of_deathstruction.lua => quests/ferumbras_ascendant/movements_gate_of_deathstruction.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/ferumbras_ascendant/green_gem.lua => quests/ferumbras_ascendant/movements_green_gem.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/ferumbras_ascendant/habitats_access.lua => quests/ferumbras_ascendant/movements_habitats_access.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/ferumbras_ascendant/lovely_monsters.lua => quests/ferumbras_ascendant/movements_lovely_monsters.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/ferumbras_ascendant/mazoran_fire.lua => quests/ferumbras_ascendant/movements_mazoran_fire.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/ferumbras_ascendant/plagirath_access.lua => quests/ferumbras_ascendant/movements_plagirath_access.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/ferumbras_ascendant/razzagorn_access.lua => quests/ferumbras_ascendant/movements_razzagorn_access.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/ferumbras_ascendant/red_gem.lua => quests/ferumbras_ascendant/movements_red_gem.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/ferumbras_ascendant/seal.lua => quests/ferumbras_ascendant/movements_seal.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/ferumbras_ascendant/shulgrax_lever.lua => quests/ferumbras_ascendant/movements_shulgrax_lever.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/ferumbras_ascendant/stair.lua => quests/ferumbras_ascendant/movements_stair.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/ferumbras_ascendant/vortex.lua => quests/ferumbras_ascendant/movements_vortex.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/ferumbras_ascendant/zamulosh_teleport.lua => quests/ferumbras_ascendant/movements_zamulosh_teleport.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/forgotten_knowledge/bird_cage.lua => quests/forgotten_knowledge/actions_bird_cage.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/forgotten_knowledge/fount.lua => quests/forgotten_knowledge/actions_fount.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/forgotten_knowledge/girl_picture.lua => quests/forgotten_knowledge/actions_girl_picture.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/forgotten_knowledge/lantern.lua => quests/forgotten_knowledge/actions_lantern.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/forgotten_knowledge/lost_time.lua => quests/forgotten_knowledge/actions_lost_time.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/forgotten_knowledge/old_desk.lua => quests/forgotten_knowledge/actions_old_desk.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/forgotten_knowledge/plant.lua => quests/forgotten_knowledge/actions_plant.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/forgotten_knowledge/secret_wall.lua => quests/forgotten_knowledge/actions_secret_wall.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/forgotten_knowledge/servants_mechanism.lua => quests/forgotten_knowledge/actions_servants_mechanism.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/forgotten_knowledge/time_machine.lua => quests/forgotten_knowledge/actions_time_machine.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/forgotten_knowledge/astral_glyph_death.lua => quests/forgotten_knowledge/creaturescripts_astral_glyph_death.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/forgotten_knowledge/astral_source.lua => quests/forgotten_knowledge/creaturescripts_astral_source.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/forgotten_knowledge/bosses_kill.lua => quests/forgotten_knowledge/creaturescripts_bosses_kill.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/forgotten_knowledge/bound_astral_power.lua => quests/forgotten_knowledge/creaturescripts_bound_astral_power.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/forgotten_knowledge/corrupted_soul.lua => quests/forgotten_knowledge/creaturescripts_corrupted_soul.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/forgotten_knowledge/distorted_source.lua => quests/forgotten_knowledge/creaturescripts_distorted_source.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/forgotten_knowledge/dragon_egg.lua => quests/forgotten_knowledge/creaturescripts_dragon_egg.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/forgotten_knowledge/energy_prism.lua => quests/forgotten_knowledge/creaturescripts_energy_prism.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/forgotten_knowledge/energy_prism_death.lua => quests/forgotten_knowledge/creaturescripts_energy_prism_death.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/forgotten_knowledge/healthchange_forgotten.lua => quests/forgotten_knowledge/creaturescripts_healthchange_forgotten.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/forgotten_knowledge/lloyd_preparedeath.lua => quests/forgotten_knowledge/creaturescripts_lloyd_preparedeath.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/forgotten_knowledge/melting_death.lua => quests/forgotten_knowledge/creaturescripts_melting_death.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/forgotten_knowledge/possessed_tree.lua => quests/forgotten_knowledge/creaturescripts_possessed_tree.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/forgotten_knowledge/replica_servants.lua => quests/forgotten_knowledge/creaturescripts_replica_servants.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/forgotten_knowledge/soulcatcher_summon.lua => quests/forgotten_knowledge/creaturescripts_soulcatcher_summon.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/forgotten_knowledge/thorn_knight_death.lua => quests/forgotten_knowledge/creaturescripts_thorn_knight_death.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/forgotten_knowledge/time_guardian_health.lua => quests/forgotten_knowledge/creaturescripts_time_guardian_health.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/forgotten_knowledge/cave_entrance.lua => quests/forgotten_knowledge/movements_cave_entrance.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/forgotten_knowledge/challenger.lua => quests/forgotten_knowledge/movements_challenger.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/forgotten_knowledge/dragonking_vortex.lua => quests/forgotten_knowledge/movements_dragonking_vortex.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/forgotten_knowledge/entrance_teleport.lua => quests/forgotten_knowledge/movements_entrance_teleport.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/forgotten_knowledge/fount.lua => quests/forgotten_knowledge/movements_fount.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/forgotten_knowledge/ice_teleport.lua => quests/forgotten_knowledge/movements_ice_teleport.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/forgotten_knowledge/lava_teleport.lua => quests/forgotten_knowledge/movements_lava_teleport.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/forgotten_knowledge/servant_teleport.lua => quests/forgotten_knowledge/movements_servant_teleport.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/forgotten_knowledge/teleport_tree.lua => quests/forgotten_knowledge/movements_teleport_tree.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/formogar_mine_hoist/hoist.lua => quests/formogar_mine_hoist/movements_hoist.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/grave_danger/bosses_killed.lua => quests/grave_danger/actions_bosses_killed.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/grave_danger/cobra_bastion/scarlett.lua => quests/grave_danger/cobra_bastion/actions_scarlett.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/grave_danger/cobra_bastion/scarlett.lua => quests/grave_danger/cobra_bastion/creaturescripts_scarlett.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/grave_danger/cobra_bastion/ugly_monster.lua => quests/grave_danger/cobra_bastion/creaturescripts_ugly_monster.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/grave_danger/sirs.lua => quests/grave_danger/creaturescripts_sirs.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/grave_danger/zelosDeath.lua => quests/grave_danger/creaturescripts_zelosDeath.lua} (100%) rename data-otservbr-global/scripts/{globalevents/quests/cobra_minis_custodian.lua => quests/grave_danger/globalevents_cobra_minis_custodian.lua} (100%) rename data-otservbr-global/scripts/{globalevents/quests/cobra_minis_gaffir.lua => quests/grave_danger/globalevents_cobra_minis_gaffir.lua} (100%) rename data-otservbr-global/scripts/{globalevents/quests/cobra_minis_quaid.lua => quests/grave_danger/globalevents_cobra_minis_quaid.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/grave_danger/firewall_gaffir.lua => quests/grave_danger/movements_firewall_gaffir.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/grave_danger/teleport_king_zelos.lua => quests/grave_danger/movements_teleport_king_zelos.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/gravedigger/amforas.lua => quests/gravedigger/actions_amforas.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/gravedigger/ashes.lua => quests/gravedigger/actions_ashes.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/gravedigger/blood.lua => quests/gravedigger/actions_blood.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/gravedigger/bones.lua => quests/gravedigger/actions_bones.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/gravedigger/bookcase.lua => quests/gravedigger/actions_bookcase.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/gravedigger/brain.lua => quests/gravedigger/actions_brain.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/gravedigger/caixa.lua => quests/gravedigger/actions_caixa.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/gravedigger/candles.lua => quests/gravedigger/actions_candles.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/gravedigger/cape.lua => quests/gravedigger/actions_cape.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/gravedigger/chalk.lua => quests/gravedigger/actions_chalk.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/gravedigger/flask.lua => quests/gravedigger/actions_flask.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/gravedigger/hallowed.lua => quests/gravedigger/actions_hallowed.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/gravedigger/inscriptions.lua => quests/gravedigger/actions_inscriptions.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/gravedigger/key1.lua => quests/gravedigger/actions_key1.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/gravedigger/key2.lua => quests/gravedigger/actions_key2.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/gravedigger/monks.lua => quests/gravedigger/actions_monks.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/gravedigger/palanca.lua => quests/gravedigger/actions_palanca.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/gravedigger/pyramids1.lua => quests/gravedigger/actions_pyramids1.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/gravedigger/pyramids2.lua => quests/gravedigger/actions_pyramids2.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/gravedigger/sacrifice.lua => quests/gravedigger/actions_sacrifice.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/gravedigger/scroll.lua => quests/gravedigger/actions_scroll.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/gravedigger/statue.lua => quests/gravedigger/actions_statue.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/gravedigger/tears.lua => quests/gravedigger/actions_tears.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/gravedigger/tincture.lua => quests/gravedigger/actions_tincture.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/grimvale/ancient_feud_entrances.lua => quests/grimvale/actions_ancient_feud_entrances.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/grimvale/closed_silvered_trap.lua => quests/grimvale/actions_closed_silvered_trap.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/grimvale/portal_minis_ancient_feud.lua => quests/grimvale/actions_portal_minis_ancient_feud.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/grimvale/portal_minis_grimvale.lua => quests/grimvale/actions_portal_minis_grimvale.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/grimvale/silver_liquid.lua => quests/grimvale/actions_silver_liquid.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/grimvale/feroxa_transform.lua => quests/grimvale/creaturescripts_feroxa_transform.lua} (100%) rename data-otservbr-global/scripts/{globalevents/quests/grimvale_feroxa.lua => quests/grimvale/globalevents_grimvale_feroxa.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/grimvale/silvered_trap.lua => quests/grimvale/movements_silvered_trap.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/grimvale/strangely_glowing_mark.lua => quests/grimvale/movements_strangely_glowing_mark.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/heart_of_destruction/charges_lever.lua => quests/heart_of_destruction/actions_charges_lever.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/heart_of_destruction/cracklers_lever.lua => quests/heart_of_destruction/actions_cracklers_lever.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/heart_of_destruction/devourer_access.lua => quests/heart_of_destruction/actions_devourer_access.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/heart_of_destruction/final_lever.lua => quests/heart_of_destruction/actions_final_lever.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/heart_of_destruction/reward.lua => quests/heart_of_destruction/actions_reward.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/heart_of_destruction/sparks_lever.lua => quests/heart_of_destruction/actions_sparks_lever.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/heart_of_destruction/aftershock_transform.lua => quests/heart_of_destruction/creaturescripts_aftershock_transform.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/heart_of_destruction/anomaly_transform.lua => quests/heart_of_destruction/creaturescripts_anomaly_transform.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/heart_of_destruction/charged_anomaly_death.lua => quests/heart_of_destruction/creaturescripts_charged_anomaly_death.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/heart_of_destruction/charged_disruption_transform.lua => quests/heart_of_destruction/creaturescripts_charged_disruption_transform.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/heart_of_destruction/charger_spawn.lua => quests/heart_of_destruction/creaturescripts_charger_spawn.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/heart_of_destruction/charging_out_death.lua => quests/heart_of_destruction/creaturescripts_charging_out_death.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/heart_of_destruction/crackler_transform.lua => quests/heart_of_destruction/creaturescripts_crackler_transform.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/heart_of_destruction/depolarized_death.lua => quests/heart_of_destruction/creaturescripts_depolarized_death.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/heart_of_destruction/depolarized_transform.lua => quests/heart_of_destruction/creaturescripts_depolarized_transform.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/heart_of_destruction/devourer_player_death.lua => quests/heart_of_destruction/creaturescripts_devourer_player_death.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/heart_of_destruction/disruption_transform.lua => quests/heart_of_destruction/creaturescripts_disruption_transform.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/heart_of_destruction/eradicator_transform.lua => quests/heart_of_destruction/creaturescripts_eradicator_transform.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/heart_of_destruction/foreshock_transform.lua => quests/heart_of_destruction/creaturescripts_foreshock_transform.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/heart_of_destruction/heart_boss_death.lua => quests/heart_of_destruction/creaturescripts_heart_boss_death.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/heart_of_destruction/heart_minion_death.lua => quests/heart_of_destruction/creaturescripts_heart_minion_death.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/heart_of_destruction/outburst_charge.lua => quests/heart_of_destruction/creaturescripts_outburst_charge.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/heart_of_destruction/overcharge_death.lua => quests/heart_of_destruction/creaturescripts_overcharge_death.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/heart_of_destruction/rupture_heal.lua => quests/heart_of_destruction/creaturescripts_rupture_heal.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/heart_of_destruction/rupture_resonance.lua => quests/heart_of_destruction/creaturescripts_rupture_resonance.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/heart_of_destruction/shocks_death.lua => quests/heart_of_destruction/creaturescripts_shocks_death.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/heart_of_destruction/spark_death.lua => quests/heart_of_destruction/creaturescripts_spark_death.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/heart_of_destruction/spark_devourer_death.lua => quests/heart_of_destruction/creaturescripts_spark_devourer_death.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/heart_of_destruction/ice_crack.lua => quests/heart_of_destruction/movements_ice_crack.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/heart_of_destruction/teleport.lua => quests/heart_of_destruction/movements_teleport.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/heart_of_destruction/teleport_heart.lua => quests/heart_of_destruction/movements_teleport_heart.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/heart_of_destruction/vortex_anomaly.lua => quests/heart_of_destruction/movements_vortex_anomaly.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/heart_of_destruction/vortex_crackler.lua => quests/heart_of_destruction/movements_vortex_crackler.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/heart_of_destruction/vortex_hunger.lua => quests/heart_of_destruction/movements_vortex_hunger.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/hero_of_rathleton/machines_deep_terror.lua => quests/hero_of_rathleton/actions_machines_deep_terror.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/hero_of_rathleton/machines_glooth_horror.lua => quests/hero_of_rathleton/actions_machines_glooth_horror.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/hero_of_rathleton/machines_lava.lua => quests/hero_of_rathleton/actions_machines_lava.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/hero_of_rathleton/machines_professor_maxxen.lua => quests/hero_of_rathleton/actions_machines_professor_maxxen.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/hero_of_rathleton/raging_corpse.lua => quests/hero_of_rathleton/actions_raging_corpse.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/hero_of_rathleton/reward.lua => quests/hero_of_rathleton/actions_reward.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/hero_of_rathleton/bosses_kill.lua => quests/hero_of_rathleton/creaturescripts_bosses_kill.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/hero_of_rathleton/glooth_horror.lua => quests/hero_of_rathleton/creaturescripts_glooth_horror.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/hero_of_rathleton/tentacle.lua => quests/hero_of_rathleton/creaturescripts_tentacle.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/hero_of_rathleton/deep_terror.lua => quests/hero_of_rathleton/movements_deep_terror.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/hero_of_rathleton/exit.lua => quests/hero_of_rathleton/movements_exit.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/hero_of_rathleton/fast_way.lua => quests/hero_of_rathleton/movements_fast_way.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/hero_of_rathleton/glooth_horror.lua => quests/hero_of_rathleton/movements_glooth_horror.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/hero_of_rathleton/lava.lua => quests/hero_of_rathleton/movements_lava.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/hero_of_rathleton/professor_maxxen.lua => quests/hero_of_rathleton/movements_professor_maxxen.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/hot_cuisine/cookbook1.lua => quests/hot_cuisine/actions_cookbook1.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/hot_cuisine/cookbook2.lua => quests/hot_cuisine/actions_cookbook2.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/in_service_of_yalahar/charm.lua => quests/in_service_of_yalahar/actions_charm.lua} (87%) rename data-otservbr-global/scripts/{actions/quests/in_service_of_yalahar/formula.lua => quests/in_service_of_yalahar/actions_formula.lua} (86%) rename data-otservbr-global/scripts/{actions/quests/in_service_of_yalahar/ghost.lua => quests/in_service_of_yalahar/actions_ghost.lua} (78%) rename data-otservbr-global/scripts/{actions/quests/in_service_of_yalahar/last_fight.lua => quests/in_service_of_yalahar/actions_last_fight.lua} (89%) rename data-otservbr-global/scripts/{actions/quests/in_service_of_yalahar/matrix.lua => quests/in_service_of_yalahar/actions_matrix.lua} (57%) rename data-otservbr-global/scripts/{actions/quests/in_service_of_yalahar/mechanism.lua => quests/in_service_of_yalahar/actions_mechanism.lua} (94%) rename data-otservbr-global/scripts/{actions/quests/in_service_of_yalahar/morik_summon.lua => quests/in_service_of_yalahar/actions_morik_summon.lua} (60%) rename data-otservbr-global/scripts/{actions/quests/in_service_of_yalahar/mr_west_door.lua => quests/in_service_of_yalahar/actions_mr_west_door.lua} (59%) rename data-otservbr-global/scripts/{actions/quests/in_service_of_yalahar/reward.lua => quests/in_service_of_yalahar/actions_reward.lua} (50%) rename data-otservbr-global/scripts/{actions/quests/in_service_of_yalahar/yalahar_machine_war_golems.lua => quests/in_service_of_yalahar/actions_yalahar_machine_war_golems.lua} (91%) rename data-otservbr-global/scripts/{creaturescripts/quests/in_service_of_yalahar/azerus_kill.lua => quests/in_service_of_yalahar/creaturescritps_azerus_kill.lua} (100%) create mode 100644 data-otservbr-global/scripts/quests/in_service_of_yalahar/creaturescritps_diseased_trio_kill.lua rename data-otservbr-global/scripts/{movements/quests/in_service_of_yalahar/demon_teleport.lua => quests/in_service_of_yalahar/movements_demon_teleport.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/in_service_of_yalahar/last_fight_teleport.lua => quests/in_service_of_yalahar/movements_last_fight_teleport.lua} (77%) rename data-otservbr-global/scripts/{movements/quests/in_service_of_yalahar/morik.lua => quests/in_service_of_yalahar/movements_morik.lua} (69%) rename data-otservbr-global/scripts/{movements/quests/in_service_of_yalahar/quara_vortex.lua => quests/in_service_of_yalahar/movements_quara_vortex.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/in_service_of_yalahar/yalahar_machine_war_golems.lua => quests/in_service_of_yalahar/movements_yalahar_machine_war_golems.lua} (89%) rename data-otservbr-global/scripts/{creaturescripts => }/quests/in_service_of_yalahar/quara_leader_kill.lua (57%) rename data-otservbr-global/scripts/{creaturescripts/quests/killing_in_the_name_of/boss_kill.lua => quests/killing_in_the_name_of/creaturescripts_boss_kill.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/killing_in_the_name_of/monster_kill.lua => quests/killing_in_the_name_of/creaturescripts_monster_kill.lua} (65%) rename data-otservbr-global/scripts/{movements/quests/killing_in_the_name_of/boss.lua => quests/killing_in_the_name_of/movements_boss.lua} (96%) rename data-otservbr-global/scripts/{actions/quests/kilmaresh/augerfun.lua => quests/kilmaresh/actions_augerfun.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/kilmaresh/basin.lua => quests/kilmaresh/actions_basin.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/kilmaresh/books.lua => quests/kilmaresh/actions_books.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/kilmaresh/cagekey.lua => quests/kilmaresh/actions_cagekey.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/kilmaresh/coruja.lua => quests/kilmaresh/actions_coruja.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/kilmaresh/glasshoneyfun.lua => quests/kilmaresh/actions_glasshoneyfun.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/kilmaresh/lyre.lua => quests/kilmaresh/actions_lyre.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/kilmaresh/peeler.lua => quests/kilmaresh/actions_peeler.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/kilmaresh/peelerfun.lua => quests/kilmaresh/actions_peelerfun.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/kilmaresh/pickenchanted.lua => quests/kilmaresh/actions_pickenchanted.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/kilmaresh/portal_minis_kilmaresh.lua => quests/kilmaresh/actions_portal_minis_kilmaresh.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/kilmaresh/sangra.lua => quests/kilmaresh/actions_sangra.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/kilmaresh/scissors.lua => quests/kilmaresh/actions_scissors.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/kilmaresh/scissorsfun.lua => quests/kilmaresh/actions_scissorsfun.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/kilmaresh/tortoise.lua => quests/kilmaresh/actions_tortoise.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/kilmaresh/tumulo.lua => quests/kilmaresh/actions_tumulo.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/kilmaresh/tumuloerro.lua => quests/kilmaresh/actions_tumuloerro.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/kilmaresh/bragrumol.lua => quests/kilmaresh/creaturescripts_bragrumol.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/kilmaresh/fafnar.lua => quests/kilmaresh/creaturescripts_fafnar.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/kilmaresh/mozradek.lua => quests/kilmaresh/creaturescripts_mozradek.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/kilmaresh/xogixath.lua => quests/kilmaresh/creaturescripts_xogixath.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/kilmaresh/firetp.lua => quests/kilmaresh/movements_firetp.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/kilmaresh/steptile.lua => quests/kilmaresh/movements_steptile.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/kilmaresh/tpvoc.lua => quests/kilmaresh/movements_tpvoc.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/koshei_amulet/bag.lua => quests/koshei_the_deathless_quest/action_bag.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/koshei_amulet/boss.lua => quests/koshei_the_deathless_quest/action_boss.lua} (76%) rename data-otservbr-global/scripts/{actions/quests/koshei_amulet/switch.lua => quests/koshei_the_deathless_quest/action_switch.lua} (99%) rename data-otservbr-global/scripts/{movements/quests/krailos/access_depot.lua => quests/krailos/movements_access_depot.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/lions_rock/lions_rock.lua => quests/lions_rock/actions_lions_rock.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/lions_rock/lions_rock.lua => quests/lions_rock/movements_lions_rock.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/liquid_black/chairteleport.lua => quests/liquid_black/actions_chairteleport.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/liquid_black/notescoordinates.lua => quests/liquid_black/actions_notescoordinates.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/liquid_black/seashell_key.lua => quests/liquid_black/actions_seashell_key.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/liquid_black/deepling_boss_kill.lua => quests/liquid_black/creaturescripts_deepling_boss_kill.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/liquid_black/ladder.lua => quests/liquid_black/movements_ladder.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/liquid_black/quick_access.lua => quests/liquid_black/movements_quick_access.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/liquid_black/shortcut.lua => quests/liquid_black/movements_shortcut.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/lower_roshamuul/bone.lua => quests/lower_roshamuul/actions_bone.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/lower_roshamuul/chalk.lua => quests/lower_roshamuul/actions_chalk.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/lower_roshamuul/gravel.lua => quests/lower_roshamuul/actions_gravel.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/lower_roshamuul/mixture.lua => quests/lower_roshamuul/actions_mixture.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/lower_roshamuul/mortar.lua => quests/lower_roshamuul/actions_mortar.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/lower_roshamuul/resonance_chamber.lua => quests/lower_roshamuul/actions_resonance_chamber.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/lower_roshamuul/trough.lua => quests/lower_roshamuul/actions_trough.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/marapur/boss_timira_fight.lua => quests/marapur/actions_boss_timira_fight.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/marapur/teleports_timira.lua => quests/marapur/actions_teleports_timira.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/mintwallin_quest/devil_helmet_lever.lua => quests/mintwallin_quest/actions_devil_helmet_lever.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/mysterious_ornate/mysterious_metal_egg.lua => quests/mysterious_ornate/actions_mysterious_metal_egg.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/oramond/glooth_fairy_lever.lua => quests/oramond/actions_glooth_fairy_lever.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/oramond/chavis_tasks/to_take_roots.lua => quests/oramond/chavis_tasks/actions_to_take_roots.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/oramond/the_glooth_brothers_tasks/the_ancient_sewers.lua => quests/oramond/the_glooth_brothers_tasks/actions_the_ancient_sewers.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/others/calassa_comb_door.lua => quests/others/actions_calassa_comb_door.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/others/deeper_banuta_shortcut.lua => quests/others/actions_deeper_banuta_shortcut.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/others/ectoplasm_container.lua => quests/others/actions_ectoplasm_container.lua} (100%) create mode 100644 data-otservbr-global/scripts/quests/others/actions_exterminator_flask.lua rename data-otservbr-global/scripts/{actions/quests/others/fire_bug.lua => quests/others/actions_fire_bug.lua} (96%) rename data-otservbr-global/scripts/{actions/quests/others/gooey_mass.lua => quests/others/actions_gooey_mass.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/others/hellgate_lever.lua => quests/others/actions_hellgate_lever.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/others/holy_water.lua => quests/others/actions_holy_water.lua} (59%) rename data-otservbr-global/scripts/{actions/quests/others/orc_edron_lever.lua => quests/others/actions_orc_edron_lever.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/others/serpentine_tower_lever.lua => quests/others/actions_serpentine_tower_lever.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/others/serpentine_tower_torch.lua => quests/others/actions_serpentine_tower_torch.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/others/steal_from_thieves.lua => quests/others/actions_steal_from_thieves.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/raging_mage_tower/energized_raging_mage_kill.lua => quests/raging_mage_tower/creaturescripts_energized_raging_mage_kill.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/raging_mage_tower/raging_mage_1.lua => quests/raging_mage_tower/creaturescripts_raging_mage_1.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/raging_mage_tower/raging_mage_2.lua => quests/raging_mage_tower/creaturescripts_raging_mage_2.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/raging_mage_tower/raging_mage_kill.lua => quests/raging_mage_tower/creaturescripts_raging_mage_kill.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/raging_mage_tower/yielothax_kill.lua => quests/raging_mage_tower/creaturescripts_yielothax_kill.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/rottin_wood_and_married_men/broken_wall.lua => quests/rottin_wood_and_married_men/actions_broken_wall.lua} (75%) rename data-otservbr-global/scripts/{actions/quests/rottin_wood_and_married_men/corpse.lua => quests/rottin_wood_and_married_men/actions_corpse.lua} (60%) create mode 100644 data-otservbr-global/scripts/quests/rottin_wood_and_married_men/actions_trap.lua rename data-otservbr-global/scripts/{actions/quests/sea_of_light/sea_of_light.lua => quests/sea_of_light/actions_sea_of_light.lua} (58%) rename data-otservbr-global/scripts/{actions/quests/secret_service/amazon_disguise_kit.lua => quests/secret_service/actions_amazon_disguise_kit.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/secret_service/lever.lua => quests/secret_service/actions_lever.lua} (99%) rename data-otservbr-global/scripts/{actions/quests/secret_service/ring.lua => quests/secret_service/actions_ring.lua} (68%) rename data-otservbr-global/scripts/{actions/quests/secret_service/rust_bugs.lua => quests/secret_service/actions_rust_bugs.lua} (72%) rename data-otservbr-global/scripts/{actions/quests/secret_service/tools.lua => quests/secret_service/actions_tools.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/secret_service/black_knight_kill.lua => quests/secret_service/creaturescripts_black_knight_kill.lua} (57%) rename data-otservbr-global/scripts/{movements/quests/secret_service/amazon.lua => quests/secret_service/movements_amazon.lua} (73%) rename data-otservbr-global/scripts/{movements/quests/secret_service/pirate.lua => quests/secret_service/movements_pirate.lua} (70%) rename data-otservbr-global/scripts/{actions/quests/soul_war/bosses_killed.lua => quests/soul_war/actions_bosses_killed.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/soul_war/portal_megalomania.lua => quests/soul_war/actions_portal_megalomania.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/soul_war/portal_reward_soulwar.lua => quests/soul_war/actions_portal_reward_soulwar.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/soul_war/reward_soul_war.lua => quests/soul_war/actions_reward_soul_war.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/soul_war/soulwar_entrances.lua => quests/soul_war/actions_soulwar_entrances.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/spike_tasks/fertilizer.lua => quests/spike_tasks/actions_fertilizer.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/spike_tasks/ghost_detector.lua => quests/spike_tasks/actions_ghost_detector.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/spike_tasks/lode_stone.lua => quests/spike_tasks/actions_lode_stone.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/spike_tasks/nests.lua => quests/spike_tasks/actions_nests.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/spike_tasks/spirit_shovel.lua => quests/spike_tasks/actions_spirit_shovel.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/spike_tasks/thermometer.lua => quests/spike_tasks/actions_thermometer.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/spike_tasks/tuning_fork.lua => quests/spike_tasks/actions_tuning_fork.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/spike_tasks/lower_spike_kill.lua => quests/spike_tasks/creaturescripts_lower_spike_kill.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/spike_tasks/middle_spike_kill.lua => quests/spike_tasks/creaturescripts_middle_spike_kill.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/spike_tasks/upper_spike_kill.lua => quests/spike_tasks/creaturescripts_upper_spike_kill.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/spirit_hunters/magical_device.lua => quests/spirit_hunters/actions_magical_device.lua} (67%) rename data-otservbr-global/scripts/{creaturescripts/quests/svargrond_arena/arena_kill.lua => quests/svargrond_arena/creaturescripts_arena_kill.lua} (85%) rename data-otservbr-global/scripts/{movements/quests/svargrond_arena/arena_enter.lua => quests/svargrond_arena/movements_arena_enter.lua} (88%) rename data-otservbr-global/scripts/{movements/quests/svargrond_arena/arena_pit.lua => quests/svargrond_arena/movements_arena_pit.lua} (76%) rename data-otservbr-global/scripts/{movements/quests/svargrond_arena/arena_trophy.lua => quests/svargrond_arena/movements_arena_trophy.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/thais_quest/life_ring_lever.lua => quests/thais_quest/actions_life_ring_lever.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_cursed_crystal/MedusaOil.lua => quests/the_cursed_crystal/actions_MedusaOil.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_cursed_crystal/Misc.lua => quests/the_cursed_crystal/actions_Misc.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_cursed_crystal/Ointment.lua => quests/the_cursed_crystal/actions_Ointment.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/the_cursed_crystal/StepIn_CursedCrystal.lua => quests/the_cursed_crystal/movements_StepIn_CursedCrystal.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_dream_courts/bosses_killed.lua => quests/the_dream_courts/actions_bosses_killed.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_dream_courts/dream_courts_lever.lua => quests/the_dream_courts/actions_dream_courts_lever.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_dream_courts/entrances_dream_courts.lua => quests/the_dream_courts/actions_entrances_dream_courts.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_dream_courts/portal_nightmare_beast.lua => quests/the_dream_courts/actions_portal_nightmare_beast.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/the_dream_courts/faceless_bane_step_positions.lua => quests/the_dream_courts/movements_faceless_bane_step_positions.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/the_dream_courts/teleport.lua => quests/the_dream_courts/movements_teleport.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/first_dragon/lair_entrance.lua => quests/the_first_dragon/actions_lair_entrance.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/first_dragon/lever.lua => quests/the_first_dragon/actions_lever.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/first_dragon/rewards.lua => quests/the_first_dragon/actions_rewards.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/first_dragon/sacrifice_items.lua => quests/the_first_dragon/actions_sacrifice_items.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/first_dragon/treasure_chest.lua => quests/the_first_dragon/actions_treasure_chest.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/the_first_dragon/death_angry_plant.lua => quests/the_first_dragon/creaturescripts_death_angry_plant.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/the_first_dragon/death_dragon_essence.lua => quests/the_first_dragon/creaturescripts_death_dragon_essence.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/the_first_dragon/death_fallen.lua => quests/the_first_dragon/creaturescripts_death_fallen.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/the_first_dragon/death_first_dragon.lua => quests/the_first_dragon/creaturescripts_death_first_dragon.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/the_first_dragon/death_somewhat_beatable.lua => quests/the_first_dragon/creaturescripts_death_somewhat_beatable.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/the_first_dragon/kill_dragon.lua => quests/the_first_dragon/creaturescripts_kill_dragon.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/first_dragon/entrance_teleport.lua => quests/the_first_dragon/movements_entrance_teleport.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/first_dragon/exit_teleport.lua => quests/the_first_dragon/movements_exit_teleport.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/first_dragon/flower_bowl.lua => quests/the_first_dragon/movements_flower_bowl.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/first_dragon/heaven_blossom.lua => quests/the_first_dragon/movements_heaven_blossom.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/first_dragon/last_teleport.lua => quests/the_first_dragon/movements_last_teleport.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/first_dragon/zorvorax_secrets.lua => quests/the_first_dragon/movements_zorvorax_secrets.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/the_gravedigger_of_drefia/dormitory_teleport.lua => quests/the_gravedigger_of_drefia/movements_dormitory_teleport.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/the_gravedigger_of_drefia/necromancer_servant.lua => quests/the_gravedigger_of_drefia/movements_necromancer_servant.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/the_gravedigger_of_drefia/sacrifice_teleport.lua => quests/the_gravedigger_of_drefia/movements_sacrifice_teleport.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/the_gravedigger_of_drefia/teleport.lua => quests/the_gravedigger_of_drefia/movements_teleport.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_hidden_city_of_beregar/bargate_lever.lua => quests/the_hidden_city_of_beregar/actions_bargate_lever.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_hidden_city_of_beregar/ladder.lua => quests/the_hidden_city_of_beregar/actions_ladder.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_hidden_city_of_beregar/levers.lua => quests/the_hidden_city_of_beregar/actions_levers.lua} (99%) rename data-otservbr-global/scripts/{actions/quests/the_hidden_city_of_beregar/ore wagon.lua => quests/the_hidden_city_of_beregar/actions_ore_wagon.lua} (95%) rename data-otservbr-global/scripts/{creaturescripts/quests/firewalker_boots/pythius_the_rotten_kill.lua => quests/the_hidden_city_of_beregar/creaturescripts_pythius_the_rotten_kill.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/the_hidden_city_of_beregar/bellow.lua => quests/the_hidden_city_of_beregar/moviments_bellow.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/the_hidden_city_of_beregar/elevator.lua => quests/the_hidden_city_of_beregar/moviments_elevator.lua} (88%) rename data-otservbr-global/scripts/{movements/quests/the_hidden_city_of_beregar/gap.lua => quests/the_hidden_city_of_beregar/moviments_gap.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/the_hidden_city_of_beregar/ore_wagon.lua => quests/the_hidden_city_of_beregar/moviments_ore_wagon.lua} (70%) rename data-otservbr-global/scripts/{movements/quests/the_hidden_city_of_beregar/pythius_boss_teleport.lua => quests/the_hidden_city_of_beregar/moviments_pythius_boss_teleport.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/the_hidden_city_of_beregar/pythius_teleport.lua => quests/the_hidden_city_of_beregar/moviments_pythius_teleport.lua} (87%) rename data-otservbr-global/scripts/{movements/quests/the_hidden_city_of_beregar/tunnel.lua => quests/the_hidden_city_of_beregar/moviments_tunnel.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_hunt_for_the_sea_serpent/bait.lua => quests/the_hunt_for_the_sea_serpent/actions_bait.lua} (63%) rename data-otservbr-global/scripts/{movements/quests/the_hunt_for_the_sea_serpent/teleports.lua => quests/the_hunt_for_the_sea_serpent/movements_teleports.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/ice_islands/anthill.lua => quests/the_ice_islands_quest/actions_anthill.lua} (58%) create mode 100644 data-otservbr-global/scripts/quests/the_ice_islands_quest/actions_charm.lua rename data-otservbr-global/scripts/{actions/quests/ice_islands/cure.lua => quests/the_ice_islands_quest/actions_cure.lua} (81%) rename data-otservbr-global/scripts/{actions/quests/ice_islands/paint.lua => quests/the_ice_islands_quest/actions_paint.lua} (61%) rename data-otservbr-global/scripts/{actions/quests/ice_islands/yakchal.lua => quests/the_ice_islands_quest/actions_yakchal.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/the_ice_islands/husky_kill.lua => quests/the_ice_islands_quest/creaturescripts_husky_kill.lua} (53%) rename data-otservbr-global/scripts/{movements/quests/the_ice_islands/helheim.lua => quests/the_ice_islands_quest/movements_helheim.lua} (76%) rename data-otservbr-global/scripts/{movements/quests/the_ice_islands/nibelor_dog_led.lua => quests/the_ice_islands_quest/movements_nibelor_dog_led.lua} (84%) rename data-otservbr-global/scripts/{actions/quests/inquisition/brother_lever.lua => quests/the_inquisition_quest/actions_brother_lever.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/inquisition/rewards.lua => quests/the_inquisition_quest/actions_rewards.lua} (68%) rename data-otservbr-global/scripts/{actions/quests/inquisition/ungreez_door.lua => quests/the_inquisition_quest/actions_ungreez_door.lua} (88%) rename data-otservbr-global/scripts/{actions/quests/inquisition/vampire_hunt.lua => quests/the_inquisition_quest/actions_vampire_hunt.lua} (67%) rename data-otservbr-global/scripts/{creaturescripts/quests/inquisition/inquisition_boss.lua => quests/the_inquisition_quest/creaturescripts_inquisition_boss.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/inquisition/inquisition_ungreez.lua => quests/the_inquisition_quest/creaturescripts_inquisition_ungreez.lua} (56%) rename data-otservbr-global/scripts/{movements/quests/inquisition/entrance.lua => quests/the_inquisition_quest/movements_entrance.lua} (59%) rename data-otservbr-global/scripts/{movements/quests/inquisition/reward_room_text.lua => quests/the_inquisition_quest/movements_reward_room_text.lua} (72%) rename data-otservbr-global/scripts/{movements/quests/inquisition/teleport_main.lua => quests/the_inquisition_quest/movements_teleport_main.lua} (90%) rename data-otservbr-global/scripts/{actions/quests/the_lost_brother/asura_mirror.lua => quests/the_lost_brother/actions_asura_mirror.lua} (100%) rename data-otservbr-global/scripts/quests/the_new_frontier/{action-arena.lua => action_arena.lua} (100%) rename data-otservbr-global/scripts/quests/the_new_frontier/{action-beaver.lua => action_beaver.lua} (100%) rename data-otservbr-global/scripts/quests/the_new_frontier/{action-elevator.lua => action_elevator.lua} (100%) rename data-otservbr-global/scripts/quests/the_new_frontier/{action-hidden_note.lua => action_hidden_note.lua} (100%) rename data-otservbr-global/scripts/quests/the_new_frontier/{action-outfit.lua => action_outfit.lua} (100%) rename data-otservbr-global/scripts/quests/the_new_frontier/{action-prision_secret_door.lua => action_prision_secret_door.lua} (100%) rename data-otservbr-global/scripts/quests/the_new_frontier/{action-vine.lua => action_vine.lua} (100%) rename data-otservbr-global/scripts/quests/the_new_frontier/{shard_of_corruption_kill.lua => creaturescripts_shard_of_corruption_kill.lua} (100%) rename data-otservbr-global/scripts/quests/the_new_frontier/{tirecz_kill.lua => creaturescripts_tirecz_kill.lua} (100%) rename data-otservbr-global/scripts/quests/the_new_frontier/{corruption_hole.lua => movement_corruption_hole.lua} (100%) rename data-otservbr-global/scripts/quests/the_new_frontier/{movement-jail_exit.lua => movement_jail_exit.lua} (100%) rename data-otservbr-global/scripts/quests/the_new_frontier/{movement-minotaur_boss.lua => movement_minotaur_boss.lua} (100%) rename data-otservbr-global/scripts/quests/the_new_frontier/{movement-prision_trap.lua => movement_prision_trap.lua} (100%) rename data-otservbr-global/scripts/quests/the_new_frontier/{movement-wayout.lua => movement_wayout.lua} (100%) rename data-otservbr-global/scripts/quests/the_new_frontier/{snake_head_teleport.lua => movements_snake_head_teleport.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_outlaw_camp/oven.lua => quests/the_outlaw_camp/actions_oven.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_outlaw_camp/power_burn.lua => quests/the_outlaw_camp/actions_power_burn.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_outlaw_camp/power_switch.lua => quests/the_outlaw_camp/actions_power_switch.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_outlaw_camp/the_outlaw_camp_quest.lua => quests/the_outlaw_camp/actions_the_outlaw_camp_quest.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/the_outlaw_camp/entrance.lua => quests/the_outlaw_camp/movements_entrance.lua} (100%) rename data-otservbr-global/scripts/{globalevents/quests/pits_of_inferno_bosses.lua => quests/the_pits_of_inferno_quest/globalevents_pits_of_inferno_bosses.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/postman/package.lua => quests/the_postman_missions_quest/actions_package.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/postman/present.lua => quests/the_postman_missions_quest/actions_present.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/postman/waldos_posthorn.lua => quests/the_postman_missions_quest/actions_waldos_posthorn.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/the_primal_ordeal/magma_bubble_death.lua => quests/the_primal_ordeal/creaturescripts_magma_bubble_death.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/the_primal_ordeal/the_primal_menace_killed.lua => quests/the_primal_ordeal/creaturescripts_the_primal_menace_killed.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_secret_library/asura_mirror.lua => quests/the_secret_library_quest/actions_asura_mirror.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_secret_library/basinfire.lua => quests/the_secret_library_quest/actions_basinfire.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_secret_library/bastion_access.lua => quests/the_secret_library_quest/actions_bastion_access.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_secret_library/blacktp.lua => quests/the_secret_library_quest/actions_blacktp.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_secret_library/bluetp.lua => quests/the_secret_library_quest/actions_bluetp.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_secret_library/boattp.lua => quests/the_secret_library_quest/actions_boattp.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_secret_library/bone.lua => quests/the_secret_library_quest/actions_bone.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_secret_library/bonedoor.lua => quests/the_secret_library_quest/actions_bonedoor.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_secret_library/book.lua => quests/the_secret_library_quest/actions_book.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/secret_library/bosses_killed.lua => quests/the_secret_library_quest/actions_bosses_killed.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_secret_library/corpse.lua => quests/the_secret_library_quest/actions_corpse.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_secret_library/energybasin.lua => quests/the_secret_library_quest/actions_energybasin.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_secret_library/enterlibrary.lua => quests/the_secret_library_quest/actions_enterlibrary.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_secret_library/eyekey.lua => quests/the_secret_library_quest/actions_eyekey.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_secret_library/fish.lua => quests/the_secret_library_quest/actions_fish.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_secret_library/greentp.lua => quests/the_secret_library_quest/actions_greentp.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_secret_library/leverdoor.lua => quests/the_secret_library_quest/actions_leverdoor.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_secret_library/leverruby.lua => quests/the_secret_library_quest/actions_leverruby.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/secret_library/library_entrances.lua => quests/the_secret_library_quest/actions_library_entrances.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_secret_library/lotuskey.lua => quests/the_secret_library_quest/actions_lotuskey.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_secret_library/peacock.lua => quests/the_secret_library_quest/actions_peacock.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_secret_library/pinktp.lua => quests/the_secret_library_quest/actions_pinktp.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_secret_library/sealedbook.lua => quests/the_secret_library_quest/actions_sealedbook.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_secret_library/skullground.lua => quests/the_secret_library_quest/actions_skullground.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_secret_library/statuedeeplings.lua => quests/the_secret_library_quest/actions_statuedeeplings.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_secret_library/strandhair.lua => quests/the_secret_library_quest/actions_strandhair.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_secret_library/telescop.lua => quests/the_secret_library_quest/actions_telescop.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/the_secret_library/falcon_minibosses.lua => quests/the_secret_library_quest/creaturescripts_falcon_minibosses.lua} (100%) rename data-otservbr-global/scripts/{globalevents/quests/secret_library_grand_canon_dominus.lua => quests/the_secret_library_quest/globalevents_secret_library_grand_canon_dominus.lua} (100%) rename data-otservbr-global/scripts/{globalevents/quests/secret_library_grand_chaplain_gaunder.lua => quests/the_secret_library_quest/globalevents_secret_library_grand_chaplain_gaunder.lua} (100%) rename data-otservbr-global/scripts/{globalevents/quests/secret_library_grand_commander_soeren.lua => quests/the_secret_library_quest/globalevents_secret_library_grand_commander_soeren.lua} (100%) rename data-otservbr-global/scripts/{globalevents/quests/secret_library_preceptor_lazare.lua => quests/the_secret_library_quest/globalevents_secret_library_preceptor_lazare.lua} (100%) rename data-otservbr-global/scripts/{globalevents/quests/secret_library_spawn_damage.lua => quests/the_secret_library_quest/globalevents_secret_library_spawn_damage.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/the_secret_library/boat.lua => quests/the_secret_library_quest/movements_boat.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/the_secret_library/golem_teleport.lua => quests/the_secret_library_quest/movements_golem_teleport.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/the_secret_library/pink_teleport.lua => quests/the_secret_library_quest/movements_pink_teleport.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/the_secret_library/teleport.lua => quests/the_secret_library_quest/movements_teleport.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/the_spike_tasks/geomantic_charges.lua => quests/the_spike_tasks/movements_geomantic_charges.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/the_spike_tasks/spike_teleport.lua => quests/the_spike_tasks/movements_spike_teleport.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_tainted_soul/star_herb.lua => quests/the_tainted_soul/actions_star_herb.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_thieves_guild/climbing_vine.lua => quests/the_thieves_guild_quest/actions_climbing_vine.lua} (99%) rename data-otservbr-global/scripts/{actions/quests/the_thieves_guild/dwarf_disguise_kit.lua => quests/the_thieves_guild_quest/actions_dwarf_disguise_kit.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/the_thieves_guild/fish_napping_door.lua => quests/the_thieves_guild_quest/actions_fish_napping_door.lua} (77%) rename data-otservbr-global/scripts/{actions/quests/the_thieves_guild/fish_napping_key.lua => quests/the_thieves_guild_quest/actions_fish_napping_key.lua} (84%) rename data-otservbr-global/scripts/{actions/quests/the_thieves_guild/note.lua => quests/the_thieves_guild_quest/actions_note.lua} (76%) rename data-otservbr-global/scripts/{actions/quests/the_travelling_trader/outlaw_camp_door.lua => quests/the_travelling_trader/actions_outlaw_camp_door.lua} (82%) rename data-otservbr-global/scripts/{actions/quests/their_master_voice/slime_gobbler.lua => quests/their_masters_voice/actions_slime_gobbler.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/their_masters_voice/mage_death.lua => quests/their_masters_voice/creaturescripts_mage_death.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/their_masters_voice/servant_death.lua => quests/their_masters_voice/creaturescripts_servant_death.lua} (100%) rename data-otservbr-global/scripts/{globalevents/quests/their_master_voice_mad_mage.lua => quests/their_masters_voice/globalevents_their_master_voice_mad_mage.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/their_master_voice/entrance.lua => quests/their_masters_voice/movements_entrance.lua} (100%) rename data-otservbr-global/scripts/{creaturescripts/quests/thieves_guild/nomad_kill.lua => quests/thieves_guild/creaturescripts_nomad_kill.lua} (59%) rename data-otservbr-global/scripts/{actions/quests/tibia_tales/ultimate_booze_beer_bottle.lua => quests/tibia_tales/actions_ultimate_booze_beer_bottle.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/tinder_box/reward.lua => quests/tinder_box/actions_reward.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/tinder_box/tinder_box.lua => quests/tinder_box/actions_tinder_box.lua} (100%) create mode 100644 data-otservbr-global/scripts/quests/to_blind_the_enemy_quest/mirror.lua create mode 100644 data-otservbr-global/scripts/quests/tower_defence_quest/creaturescripts_goblin_leader_kill.lua rename data-otservbr-global/scripts/{actions/quests/triangle_tower_quest/triangle_tower_lever.lua => quests/triangle_tower_quest/actions_triangle_tower_lever.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/troll_sabotage/teleport.lua => quests/troll_sabotage/movements_teleport.lua} (92%) rename data-otservbr-global/scripts/{actions/quests/unnatural_selection/mission5_ray_of_light.lua => quests/unnatural_selection/actions_mission5_ray_of_light.lua} (54%) rename data-otservbr-global/scripts/{movements/quests/unnatural_selection/mission2_all_around_the_world.lua => quests/unnatural_selection/movements_mission2_all_around_the_world.lua} (92%) rename data-otservbr-global/scripts/{movements/quests/unnatural_selection/mission3_dance_dance_evolution.lua => quests/unnatural_selection/movements_mission3_dance_dance_evolution.lua} (67%) rename data-otservbr-global/scripts/{movements/quests/waterfall/waterfall.lua => quests/waterfall/movements_waterfall.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/what_a_foolish/cat_basket.lua => quests/what_a_foolish_quest/action_cat_basket.lua} (81%) rename data-otservbr-global/scripts/{actions/quests/what_a_foolish/contract.lua => quests/what_a_foolish_quest/action_contract.lua} (83%) rename data-otservbr-global/scripts/{actions/quests/what_a_foolish/crate.lua => quests/what_a_foolish_quest/action_crate.lua} (85%) rename data-otservbr-global/scripts/{actions/quests/what_a_foolish/cushion.lua => quests/what_a_foolish_quest/action_cushion.lua} (65%) rename data-otservbr-global/scripts/{actions/quests/what_a_foolish/disguise.lua => quests/what_a_foolish_quest/action_disguise.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/what_a_foolish/watch.lua => quests/what_a_foolish_quest/action_watch.lua} (89%) create mode 100644 data-otservbr-global/scripts/quests/what_a_foolish_quest/action_worn_cloth.lua rename data-otservbr-global/scripts/{movements/quests/what_a_foolish/destroy_pies.lua => quests/what_a_foolish_quest/movements_destroy_pies.lua} (79%) rename data-otservbr-global/scripts/{movements/quests/white_pearl/white_pearl.lua => quests/white_pearl/movements_white_pearl.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/wrath_of_the_emperor/mission01_crate.lua => quests/wrath_of_the_emperor/actions_mission01_crate.lua} (87%) rename data-otservbr-global/scripts/{actions/quests/wrath_of_the_emperor/mission01_lights.lua => quests/wrath_of_the_emperor/actions_mission01_lights.lua} (68%) rename data-otservbr-global/scripts/{actions/quests/wrath_of_the_emperor/mission02_firstcontact_repair_teleport.lua => quests/wrath_of_the_emperor/actions_mission02_firstcontact_repair_teleport.lua} (87%) rename data-otservbr-global/scripts/{actions/quests/wrath_of_the_emperor/mission03_the_keeper.lua => quests/wrath_of_the_emperor/actions_mission03_the_keeper.lua} (51%) rename data-otservbr-global/scripts/{actions/quests/wrath_of_the_emperor/mission04_sacrament_of_the_snake_sceptre.lua => quests/wrath_of_the_emperor/actions_mission04_sacrament_of_the_snake_sceptre.lua} (67%) rename data-otservbr-global/scripts/{actions/quests/wrath_of_the_emperor/mission08_doors.lua => quests/wrath_of_the_emperor/actions_mission08_doors.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/wrath_of_the_emperor/mission08_uninvited_guests_lever.lua => quests/wrath_of_the_emperor/actions_mission08_uninvited_guests_lever.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/wrath_of_the_emperor/mission09_the_sleeping_dragon_mixture.lua => quests/wrath_of_the_emperor/actions_mission09_the_sleeping_dragon_mixture.lua} (63%) rename data-otservbr-global/scripts/{actions/quests/wrath_of_the_emperor/mission10_a_message_of_freedom_sceptre.lua => quests/wrath_of_the_emperor/actions_mission10_a_message_of_freedom_sceptre.lua} (54%) rename data-otservbr-global/scripts/{actions/quests/wrath_of_the_emperor/mission11_payback_time_lever.lua => quests/wrath_of_the_emperor/actions_mission11_payback_time_lever.lua} (85%) rename data-otservbr-global/scripts/{actions/quests/wrath_of_the_emperor/mission12_just_rewards.lua => quests/wrath_of_the_emperor/actions_mission12_just_rewards.lua} (62%) rename data-otservbr-global/scripts/{creaturescripts/quests/wrath_of_the_emperor/bosses_kill.lua => quests/wrath_of_the_emperor/creaturescripts_bosses_kill.lua} (68%) rename data-otservbr-global/scripts/{creaturescripts/quests/wrath_of_the_emperor/keeper_kill.lua => quests/wrath_of_the_emperor/creaturescripts_keeper_kill.lua} (63%) rename data-otservbr-global/scripts/{creaturescripts/quests/wrath_of_the_emperor/lizard_magistratus_kill.lua => quests/wrath_of_the_emperor/creaturescripts_lizard_magistratus_kill.lua} (56%) rename data-otservbr-global/scripts/{creaturescripts/quests/wrath_of_the_emperor/lizard_noble_kill.lua => quests/wrath_of_the_emperor/creaturescripts_lizard_noble_kill.lua} (62%) rename data-otservbr-global/scripts/{creaturescripts/quests/wrath_of_the_emperor/zalamon_kill.lua => quests/wrath_of_the_emperor/creaturescripts_zalamon_kill.lua} (93%) create mode 100644 data-otservbr-global/scripts/quests/wrath_of_the_emperor/globalevents_crate.lua rename data-otservbr-global/scripts/{movements/quests/wrath_of_the_emperor/boss_teleport.lua => quests/wrath_of_the_emperor/movements_boss_teleport.lua} (70%) rename data-otservbr-global/scripts/{movements/quests/wrath_of_the_emperor/crate.lua => quests/wrath_of_the_emperor/movements_crate.lua} (95%) rename data-otservbr-global/scripts/{movements/quests/wrath_of_the_emperor/keeper.lua => quests/wrath_of_the_emperor/movements_keeper.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/wrath_of_the_emperor/prison.lua => quests/wrath_of_the_emperor/movements_prison.lua} (60%) rename data-otservbr-global/scripts/{movements/quests/wrath_of_the_emperor/teleports_access.lua => quests/wrath_of_the_emperor/movements_teleports_access.lua} (68%) create mode 100644 data-otservbr-global/scripts/raids/bosses/battlemaster_zunzu.lua create mode 100644 data/scripts/actions/tools/crowbar.lua rename {data-otservbr-global => data}/scripts/actions/tools/kitchen_knife.lua (100%) diff --git a/data-canary/scripts/actions/other/fluids.lua b/data-canary/scripts/actions/other/fluids.lua index 7c197890568..1fccb3a4b88 100644 --- a/data-canary/scripts/actions/other/fluids.lua +++ b/data-canary/scripts/actions/other/fluids.lua @@ -81,6 +81,7 @@ function fluid.onUse(player, item, fromPosition, target, toPosition, isHotkey) item:transform(item:getId(), 0) end end + return true end diff --git a/data-otservbr-global/lib/core/quests.lua b/data-otservbr-global/lib/core/quests.lua index 2e1741beeba..433803b9b21 100644 --- a/data-otservbr-global/lib/core/quests.lua +++ b/data-otservbr-global/lib/core/quests.lua @@ -518,12 +518,12 @@ if not Quests then }, [6] = { name = "Children of the Revolution", - startStorageId = Storage.ChildrenoftheRevolution.Questline, + startStorageId = Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline, startStorageValue = 1, missions = { [1] = { name = "Prove Your Worzz!", - storageId = Storage.ChildrenoftheRevolution.Mission00, + storageId = Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission00, missionId = 1058, startValue = 1, endValue = 2, @@ -535,7 +535,7 @@ if not Quests then }, [2] = { name = "Mission 1: Corruption", - storageId = Storage.ChildrenoftheRevolution.Mission01, + storageId = Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission01, missionId = 1059, startValue = 1, endValue = 3, @@ -547,7 +547,7 @@ if not Quests then }, [3] = { name = "Mission 2: Imperial Zzecret Weaponzz", - storageId = Storage.ChildrenoftheRevolution.Mission02, + storageId = Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission02, missionId = 1060, startValue = 1, endValue = 5, @@ -562,7 +562,7 @@ if not Quests then }, [4] = { name = "Mission 3: Zee Killing Fieldzz", - storageId = Storage.ChildrenoftheRevolution.Mission03, + storageId = Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission03, missionId = 1061, startValue = 1, endValue = 3, @@ -576,7 +576,7 @@ if not Quests then }, [5] = { name = "Mission 4: Zze Way of Zztonezz", - storageId = Storage.ChildrenoftheRevolution.Mission04, + storageId = Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission04, missionId = 1062, startValue = 1, endValue = 6, @@ -594,7 +594,7 @@ if not Quests then }, [6] = { name = "Mission 5: Phantom Army", - storageId = Storage.ChildrenoftheRevolution.Mission05, + storageId = Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission05, missionId = 1063, startValue = 1, endValue = 3, @@ -705,12 +705,12 @@ if not Quests then }, [9] = { name = "Hot Cuisine", - startStorageId = Storage.HotCuisineQuest.QuestStart, + startStorageId = Storage.Quest.U8_5.HotCuisineQuest.QuestStart, startStorageValue = 1, missions = { [1] = { name = "Hot Cuisine", - storageId = Storage.HotCuisineQuest.QuestLog, + storageId = Storage.Quest.U8_5.HotCuisineQuest.QuestLog, missionId = 1070, startValue = 1, endValue = 16, @@ -752,12 +752,12 @@ if not Quests then }, [10] = { name = "In Service of Yalahar", - startStorageId = Storage.InServiceofYalahar.Questline, + startStorageId = Storage.Quest.U8_4.InServiceOfYalahar.Questline, startStorageValue = 5, missions = { [1] = { name = "Mission 01: Something Rotten", - storageId = Storage.InServiceofYalahar.Mission01, + storageId = Storage.Quest.U8_4.InServiceOfYalahar.Mission01, missionId = 1071, startValue = 1, endValue = 6, @@ -773,7 +773,7 @@ if not Quests then }, [2] = { name = "Mission 02: Watching the Watchmen", - storageId = Storage.InServiceofYalahar.Mission02, + storageId = Storage.Quest.U8_4.InServiceOfYalahar.Mission02, missionId = 1072, startValue = 1, endValue = 8, @@ -791,7 +791,7 @@ if not Quests then }, [3] = { name = "Mission 03: Death to the Deathbringer", - storageId = Storage.InServiceofYalahar.Mission03, + storageId = Storage.Quest.U8_4.InServiceOfYalahar.Mission03, missionId = 1073, startValue = 1, endValue = 6, @@ -808,7 +808,7 @@ if not Quests then }, [4] = { name = "Mission 04: Good to be Kingpin", - storageId = Storage.InServiceofYalahar.Mission04, + storageId = Storage.Quest.U8_4.InServiceOfYalahar.Mission04, missionId = 1074, startValue = 1, endValue = 6, @@ -825,7 +825,7 @@ if not Quests then }, [5] = { name = "Mission 05: Food or Fight", - storageId = Storage.InServiceofYalahar.Mission05, + storageId = Storage.Quest.U8_4.InServiceOfYalahar.Mission05, missionId = 1075, startValue = 1, endValue = 8, @@ -846,7 +846,7 @@ if not Quests then }, [6] = { name = "Mission 06: Frightening Fuel", - storageId = Storage.InServiceofYalahar.Mission06, + storageId = Storage.Quest.U8_4.InServiceOfYalahar.Mission06, missionId = 1076, startValue = 1, endValue = 5, @@ -865,7 +865,7 @@ if not Quests then }, [7] = { name = "Mission 07: A Fishy Mission", - storageId = Storage.InServiceofYalahar.Mission07, + storageId = Storage.Quest.U8_4.InServiceOfYalahar.Mission07, missionId = 1077, startValue = 1, endValue = 5, @@ -882,7 +882,7 @@ if not Quests then }, [8] = { name = "Mission 08: Dangerous Machinations", - storageId = Storage.InServiceofYalahar.Mission08, + storageId = Storage.Quest.U8_4.InServiceOfYalahar.Mission08, missionId = 1078, startValue = 1, endValue = 4, @@ -897,7 +897,7 @@ if not Quests then }, [9] = { name = "Mission 09: Decision", - storageId = Storage.InServiceofYalahar.Mission09, + storageId = Storage.Quest.U8_4.InServiceOfYalahar.Mission09, missionId = 1079, startValue = 1, endValue = 2, @@ -910,7 +910,7 @@ if not Quests then }, [10] = { name = "Mission 10: The Final Battle", - storageId = Storage.InServiceofYalahar.Mission10, + storageId = Storage.Quest.U8_4.InServiceOfYalahar.Mission10, missionId = 1080, startValue = 1, endValue = 5, @@ -934,17 +934,17 @@ if not Quests then missions = { [1] = { name = "Paw and Fur - Hunting Elite", - storageId = Storage.KillingInTheNameOf.QuestLogEntry, + storageId = Storage.Quest.U8_5.KillingInTheNameOf.QuestLogEntry, missionId = 1081, startValue = 0, endValue = 1, description = function(player) - return string.format("You joined the 'Paw and Fur - Hunting Elite'. Ask Grizzly Adams for some hunting tasks. You already gained %d points. You currently have %d boss points.", (math.max(player:getStorageValue(POINTSSTORAGE), 0)), (math.max(player:getStorageValue(Storage.KillingInTheNameOf.BossPoints), 0))) + return string.format("You joined the 'Paw and Fur - Hunting Elite'. Ask Grizzly Adams for some hunting tasks. You already gained %d points. You currently have %d boss points.", (math.max(player:getStorageValue(POINTSSTORAGE), 0)), (math.max(player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BossPoints), 0))) end, }, [2] = { name = "Paw and Fur - Rank: Huntsman", - storageId = Storage.KillingInTheNameOf.PawAndFurRank, + storageId = Storage.Quest.U8_5.KillingInTheNameOf.PawAndFurRank, missionId = 1082, startValue = 0, endValue = 1, @@ -952,7 +952,7 @@ if not Quests then }, [3] = { name = "Paw and Fur - Rank: Ranger", - storageId = Storage.KillingInTheNameOf.PawAndFurRank, + storageId = Storage.Quest.U8_5.KillingInTheNameOf.PawAndFurRank, missionId = 1083, startValue = 2, endValue = 3, @@ -960,7 +960,7 @@ if not Quests then }, [4] = { name = "Paw and Fur - Rank: Big Game Hunter", - storageId = Storage.KillingInTheNameOf.PawAndFurRank, + storageId = Storage.Quest.U8_5.KillingInTheNameOf.PawAndFurRank, missionId = 1084, startValue = 4, endValue = 5, @@ -968,7 +968,7 @@ if not Quests then }, [5] = { name = "Paw and Fur - Rank: Trophy Hunter", - storageId = Storage.KillingInTheNameOf.PawAndFurRank, + storageId = Storage.Quest.U8_5.KillingInTheNameOf.PawAndFurRank, missionId = 1085, startValue = 5, endValue = 6, @@ -976,7 +976,7 @@ if not Quests then }, [6] = { name = "Paw and Fur - Rank: Elite Hunter", - storageId = Storage.KillingInTheNameOf.PawAndFurRank, + storageId = Storage.Quest.U8_5.KillingInTheNameOf.PawAndFurRank, missionId = 1086, startValue = 7, endValue = 8, @@ -1929,7 +1929,7 @@ if not Quests then }, [77] = { name = "Paw and Fur: Tiquandas Revenge", - storageId = Storage.KillingInTheNameOf.MissionTiquandasRevenge, + storageId = Storage.Quest.U8_5.KillingInTheNameOf.MissionTiquandasRevenge, missionId = 10157, startValue = 1, endValue = 3, @@ -1941,7 +1941,7 @@ if not Quests then }, [78] = { name = "Paw and Fur: Demodras", - storageId = Storage.KillingInTheNameOf.MissionDemodras, + storageId = Storage.Quest.U8_5.KillingInTheNameOf.MissionDemodras, missionId = 10158, startValue = 1, endValue = 3, @@ -1953,7 +1953,7 @@ if not Quests then }, [79] = { -- Others name = "The Marid: Green Djinns", - storageId = Storage.KillingInTheNameOf.GreenDjinnTask, + storageId = Storage.Quest.U8_5.KillingInTheNameOf.GreenDjinnTask, missionId = 10159, startValue = 0, endValue = 3, @@ -1968,7 +1968,7 @@ if not Quests then }, [80] = { name = "The Efreet: Blue Djinns", - storageId = Storage.KillingInTheNameOf.BlueDjinnTask, + storageId = Storage.Quest.U8_5.KillingInTheNameOf.BlueDjinnTask, missionId = 10160, startValue = 0, endValue = 3, @@ -1983,7 +1983,7 @@ if not Quests then }, [81] = { name = "Meriana Rebels: Pirates", - storageId = Storage.KillingInTheNameOf.PirateTask, + storageId = Storage.Quest.U8_5.KillingInTheNameOf.PirateTask, missionId = 10161, startValue = 0, endValue = 3, @@ -2004,7 +2004,7 @@ if not Quests then }, [82] = { name = "Turmoil of War", - storageId = Storage.KillingInTheNameOf.BudrikMinos, + storageId = Storage.Quest.U8_5.KillingInTheNameOf.BudrikMinos, missionId = 10162, startValue = 0, endValue = 2, @@ -2024,7 +2024,7 @@ if not Quests then }, [83] = { name = "Lugri: Necromancers and Priestesses", - storageId = Storage.KillingInTheNameOf.LugriNecromancers, + storageId = Storage.Quest.U8_5.KillingInTheNameOf.LugriNecromancers, missionId = 10163, startValue = 0, endValue = 4, @@ -2056,7 +2056,7 @@ if not Quests then }, [84] = { name = "Edron City: Trolls", - storageId = Storage.KillingInTheNameOf.TrollTask, + storageId = Storage.Quest.U8_5.KillingInTheNameOf.TrollTask, missionId = 10164, startValue = 0, endValue = 1, @@ -2069,7 +2069,7 @@ if not Quests then }, [85] = { name = "Edron City: Goblins", - storageId = Storage.KillingInTheNameOf.GoblinTask, + storageId = Storage.Quest.U8_5.KillingInTheNameOf.GoblinTask, missionId = 10165, startValue = 0, endValue = 1, @@ -2087,7 +2087,7 @@ if not Quests then }, [86] = { name = "Edron City: Rotworms", - storageId = Storage.KillingInTheNameOf.RotwormTask, + storageId = Storage.Quest.U8_5.KillingInTheNameOf.RotwormTask, missionId = 10166, startValue = 0, endValue = 1, @@ -2100,7 +2100,7 @@ if not Quests then }, [87] = { name = "Edron City: Cyclops", - storageId = Storage.KillingInTheNameOf.CyclopsTask, + storageId = Storage.Quest.U8_5.KillingInTheNameOf.CyclopsTask, missionId = 10167, startValue = 0, endValue = 1, @@ -2321,7 +2321,7 @@ if not Quests then }, [12] = { name = "Norseman Outfit Quest", - storageId = Storage.OutfitQuest.NorsemanAddon, + storageId = Storage.Quest.U8_0.TheIceIslands.NorsemanOutfit, missionId = 10179, startValue = 1, endValue = 3, @@ -2461,12 +2461,12 @@ if not Quests then }, [14] = { name = "Sea of Light", - startStorageId = Storage.SeaOfLight.Questline, + startStorageId = Storage.Quest.U8_54.SeaOfLight.Questline, startStorageValue = 1, missions = { [1] = { name = "Mission 1: The Plans", - storageId = Storage.SeaOfLight.Mission1, + storageId = Storage.Quest.U8_54.SeaOfLight.Mission1, missionId = 10188, startValue = 1, endValue = 4, @@ -2485,7 +2485,7 @@ if not Quests then }, [2] = { name = "Mission 2: The Collector", - storageId = Storage.SeaOfLight.Mission2, + storageId = Storage.Quest.U8_54.SeaOfLight.Mission2, missionId = 10189, startValue = 1, endValue = 3, @@ -2499,7 +2499,7 @@ if not Quests then }, [3] = { name = "Mission 3: The Mirror Crystal", - storageId = Storage.SeaOfLight.Mission3, + storageId = Storage.Quest.U8_54.SeaOfLight.Mission3, missionId = 10190, startValue = 1, endValue = 4, @@ -2519,12 +2519,12 @@ if not Quests then }, [15] = { name = "Secret Service", - startStorageId = Storage.SecretService.Quest, + startStorageId = Storage.Quest.U8_1.SecretService.Quest, startStorageValue = 1, missions = { [1] = { name = "Mission 1: From Thais with Love", - storageId = Storage.SecretService.TBIMission01, + storageId = Storage.Quest.U8_1.SecretService.TBIMission01, missionId = 10191, startValue = 1, endValue = 3, @@ -2537,7 +2537,7 @@ if not Quests then }, [2] = { name = "Mission 1: For Your Eyes Only", - storageId = Storage.SecretService.AVINMission01, + storageId = Storage.Quest.U8_1.SecretService.AVINMission01, missionId = 10192, startValue = 1, endValue = 4, @@ -2551,7 +2551,7 @@ if not Quests then }, [3] = { name = "Mission 1: Borrowed Knowledge", - storageId = Storage.SecretService.CGBMission01, + storageId = Storage.Quest.U8_1.SecretService.CGBMission01, missionId = 10193, startValue = 1, endValue = 2, @@ -2562,7 +2562,7 @@ if not Quests then }, [4] = { name = "Mission 2: Operation Green Claw", - storageId = Storage.SecretService.TBIMission02, + storageId = Storage.Quest.U8_1.SecretService.TBIMission02, missionId = 10194, startValue = 1, endValue = 2, @@ -2574,7 +2574,7 @@ if not Quests then }, [5] = { name = "Mission 2: A File Between Friends", - storageId = Storage.SecretService.AVINMission02, + storageId = Storage.Quest.U8_1.SecretService.AVINMission02, missionId = 10195, startValue = 1, endValue = 2, @@ -2585,7 +2585,7 @@ if not Quests then }, [6] = { name = "Mission 2: Codename:Lumberjack", - storageId = Storage.SecretService.CGBMission02, + storageId = Storage.Quest.U8_1.SecretService.CGBMission02, missionId = 10196, startValue = 1, endValue = 2, @@ -2597,7 +2597,7 @@ if not Quests then }, [7] = { name = "Mission 3: Treachery in Port Hope", - storageId = Storage.SecretService.TBIMission03, + storageId = Storage.Quest.U8_1.SecretService.TBIMission03, missionId = 10197, startValue = 1, endValue = 3, @@ -2609,7 +2609,7 @@ if not Quests then }, [8] = { name = "Mission 3: What Men are Made of", - storageId = Storage.SecretService.AVINMission03, + storageId = Storage.Quest.U8_1.SecretService.AVINMission03, missionId = 10198, startValue = 1, endValue = 4, @@ -2623,7 +2623,7 @@ if not Quests then }, [9] = { name = "Mission 3: Rust in Peace", - storageId = Storage.SecretService.CGBMission03, + storageId = Storage.Quest.U8_1.SecretService.CGBMission03, missionId = 10199, startValue = 1, endValue = 3, @@ -2636,7 +2636,7 @@ if not Quests then }, [10] = { name = "Mission 4: Objective Hellgate", - storageId = Storage.SecretService.TBIMission04, + storageId = Storage.Quest.U8_1.SecretService.TBIMission04, missionId = 10200, startValue = 1, endValue = 2, @@ -2647,7 +2647,7 @@ if not Quests then }, [11] = { name = "Mission 4: Pawn Captures Knight", - storageId = Storage.SecretService.AVINMission04, + storageId = Storage.Quest.U8_1.SecretService.AVINMission04, missionId = 10201, startValue = 1, endValue = 3, @@ -2659,7 +2659,7 @@ if not Quests then }, [12] = { name = "Mission 4: Plot for A Plan", - storageId = Storage.SecretService.CGBMission04, + storageId = Storage.Quest.U8_1.SecretService.CGBMission04, missionId = 10202, startValue = 1, endValue = 2, @@ -2670,7 +2670,7 @@ if not Quests then }, [13] = { name = "Mission 5: Coldfinger", - storageId = Storage.SecretService.TBIMission05, + storageId = Storage.Quest.U8_1.SecretService.TBIMission05, missionId = 10203, startValue = 1, endValue = 3, @@ -2682,7 +2682,7 @@ if not Quests then }, [14] = { name = "Mission 5: A Cryptic Mission", - storageId = Storage.SecretService.AVINMission05, + storageId = Storage.Quest.U8_1.SecretService.AVINMission05, missionId = 10204, startValue = 1, endValue = 2, @@ -2693,7 +2693,7 @@ if not Quests then }, [15] = { name = "Mission 5: No Admittance", - storageId = Storage.SecretService.CGBMission05, + storageId = Storage.Quest.U8_1.SecretService.CGBMission05, missionId = 10205, startValue = 1, endValue = 2, @@ -2704,7 +2704,7 @@ if not Quests then }, [16] = { name = "Mission 6: The Weakest Spot", - storageId = Storage.SecretService.TBIMission06, + storageId = Storage.Quest.U8_1.SecretService.TBIMission06, missionId = 10206, startValue = 1, endValue = 3, @@ -2717,7 +2717,7 @@ if not Quests then }, [17] = { name = "Mission 6: A Little Bribe Won't Hurt", - storageId = Storage.SecretService.AVINMission06, + storageId = Storage.Quest.U8_1.SecretService.AVINMission06, missionId = 10207, startValue = 1, endValue = 3, @@ -2729,7 +2729,7 @@ if not Quests then }, [18] = { name = "Mission 6: News From the Past", - storageId = Storage.SecretService.CGBMission06, + storageId = Storage.Quest.U8_1.SecretService.CGBMission06, missionId = 10208, startValue = 1, endValue = 2, @@ -2740,7 +2740,7 @@ if not Quests then }, [19] = { name = "Mission 7: Licence to Kill", - storageId = Storage.SecretService.Mission07, + storageId = Storage.Quest.U8_1.SecretService.Mission07, missionId = 10209, startValue = 1, endValue = 2, @@ -2894,12 +2894,12 @@ if not Quests then }, [18] = { name = "The Beginning", - startStorageId = Storage.RookgaardTutorialIsland.SantiagoQuestLog, + startStorageId = Storage.Quest.U8_2.TheBeginningQuest.SantiagoQuestLog, startStorageValue = 1, missions = { [1] = { name = "The Cockroach Plague", - storageId = Storage.RookgaardTutorialIsland.SantiagoQuestLog, + storageId = Storage.Quest.U8_2.TheBeginningQuest.SantiagoQuestLog, missionId = 10218, startValue = 1, endValue = 11, @@ -2926,7 +2926,7 @@ if not Quests then }, [2] = { name = "Collecting Wood", - storageId = Storage.RookgaardTutorialIsland.ZirellaQuestLog, + storageId = Storage.Quest.U8_2.TheBeginningQuest.ZirellaQuestLog, missionId = 10219, startValue = 1, endValue = 8, @@ -2948,7 +2948,7 @@ if not Quests then }, [3] = { name = "A Hungry Tailor", - storageId = Storage.RookgaardTutorialIsland.CarlosQuestLog, + storageId = Storage.Quest.U8_2.TheBeginningQuest.CarlosQuestLog, missionId = 10220, startValue = 1, endValue = 8, @@ -3077,12 +3077,12 @@ if not Quests then }, [21] = { name = "The Hidden City of Beregar", - startStorageId = Storage.HiddenCityOfBeregar.DefaultStart, + startStorageId = Storage.Quest.U8_4.TheHiddenCityOfBeregar.DefaultStart, startStorageValue = 1, missions = { [1] = { name = "Going Down", - storageId = Storage.HiddenCityOfBeregar.GoingDown, + storageId = Storage.Quest.U8_4.TheHiddenCityOfBeregar.GoingDown, missionId = 10228, startValue = 1, endValue = 2, @@ -3094,7 +3094,7 @@ if not Quests then }, [2] = { name = "Justice for All", - storageId = Storage.HiddenCityOfBeregar.JusticeForAll, + storageId = Storage.Quest.U8_4.TheHiddenCityOfBeregar.JusticeForAll, missionId = 10229, startValue = 1, endValue = 6, @@ -3122,7 +3122,7 @@ if not Quests then }, [4] = { name = "Sweet as Chocolate Cake", - storageId = Storage.HiddenCityOfBeregar.SweetAsChocolateCake, + storageId = Storage.Quest.U8_4.TheHiddenCityOfBeregar.SweetAsChocolateCake, missionId = 10231, startValue = 1, endValue = 3, @@ -3135,7 +3135,7 @@ if not Quests then }, [5] = { name = "The Good Guard", - storageId = Storage.HiddenCityOfBeregar.TheGoodGuard, + storageId = Storage.Quest.U8_4.TheHiddenCityOfBeregar.TheGoodGuard, missionId = 10232, startValue = 1, endValue = 2, @@ -3149,12 +3149,12 @@ if not Quests then }, [22] = { name = "The Ice Islands Quest", - startStorageId = Storage.TheIceIslands.Questline, + startStorageId = Storage.Quest.U8_0.TheIceIslands.Questline, startStorageValue = 1, missions = { [1] = { name = "Befriending the Musher", - storageId = Storage.TheIceIslands.Mission01, + storageId = Storage.Quest.U8_0.TheIceIslands.Mission01, missionId = 10233, startValue = 1, endValue = 3, @@ -3169,7 +3169,7 @@ if not Quests then }, [2] = { name = "Nibelor 1: Breaking the Ice", - storageId = Storage.TheIceIslands.Mission02, + storageId = Storage.Quest.U8_0.TheIceIslands.Mission02, missionId = 10234, startValue = 1, endValue = 5, @@ -3184,7 +3184,7 @@ if not Quests then }, [3] = { name = "Nibelor 2: Ecological Terrorism", - storageId = Storage.TheIceIslands.Mission03, + storageId = Storage.Quest.U8_0.TheIceIslands.Mission03, missionId = 10235, startValue = 1, endValue = 3, @@ -3199,7 +3199,7 @@ if not Quests then }, [4] = { name = "Nibelor 3: Artful Sabotage", - storageId = Storage.TheIceIslands.Mission04, + storageId = Storage.Quest.U8_0.TheIceIslands.Mission04, missionId = 10236, startValue = 1, endValue = 2, @@ -3211,7 +3211,7 @@ if not Quests then }, [5] = { name = "Nibelor 4: Berserk Brewery", - storageId = Storage.TheIceIslands.Mission05, + storageId = Storage.Quest.U8_0.TheIceIslands.Mission05, missionId = 10237, startValue = 1, endValue = 6, @@ -3226,7 +3226,7 @@ if not Quests then }, [6] = { name = "Nibelor 5: Cure the Dogs", - storageId = Storage.TheIceIslands.Mission06, + storageId = Storage.Quest.U8_0.TheIceIslands.Mission06, missionId = 10238, startValue = 1, endValue = 8, @@ -3253,20 +3253,19 @@ if not Quests then }, [7] = { name = "The Secret of Helheim", - storageId = Storage.TheIceIslands.Mission07, + storageId = Storage.Quest.U8_0.TheIceIslands.Mission07, missionId = 10239, startValue = 1, endValue = 3, states = { [1] = "Hjaern might have a mission for you. So maybe you go and talk to him.", - [2] = "Hjaern send you to find someone in Svargrond who can give you a passage to \z - Helheim and seek the reason for the unrest there.", + [2] = "Hjaern send you to find someone in Svargrond who can give you a passage to Helheim and seek the reason for the unrest there.", [3] = "You discovered the necromantic altar and should report Hjaern about it.", }, }, [8] = { name = "The Contact", - storageId = Storage.TheIceIslands.Mission08, + storageId = Storage.Quest.U8_0.TheIceIslands.Mission08, missionId = 10240, startValue = 1, endValue = 4, @@ -3281,7 +3280,7 @@ if not Quests then }, [9] = { name = "Formorgar Mines 1: The Mission", - storageId = Storage.TheIceIslands.Mission09, + storageId = Storage.Quest.U8_0.TheIceIslands.Mission09, missionId = 10241, startValue = 1, endValue = 2, @@ -3294,7 +3293,7 @@ if not Quests then }, [10] = { name = "Formorgar Mines 2: Ghostwhisperer", - storageId = Storage.TheIceIslands.Mission10, + storageId = Storage.Quest.U8_0.TheIceIslands.Mission10, missionId = 10242, startValue = 1, endValue = 2, @@ -3305,7 +3304,7 @@ if not Quests then }, [11] = { name = "Formorgar Mines 3: The Secret", - storageId = Storage.TheIceIslands.Mission11, + storageId = Storage.Quest.U8_0.TheIceIslands.Mission11, missionId = 10243, startValue = 1, endValue = 2, @@ -3318,7 +3317,7 @@ if not Quests then }, [12] = { name = "Formorgar Mines 4: Retaliation", - storageId = Storage.TheIceIslands.Mission12, + storageId = Storage.Quest.U8_0.TheIceIslands.Mission12, missionId = 10244, startValue = 1, endValue = 6, @@ -3334,7 +3333,7 @@ if not Quests then }, [13] = { name = "Barbarian Test 1: Barbarian Booze", - storageId = Storage.BarbarianTest.Mission01, + storageId = Storage.Quest.U8_0.BarbarianTest.Mission01, missionId = 1055, startValue = 1, endValue = 3, @@ -3346,7 +3345,7 @@ if not Quests then }, [14] = { name = "Barbarian Test 2: The Bear Hugging", - storageId = Storage.BarbarianTest.Mission02, + storageId = Storage.Quest.U8_0.BarbarianTest.Mission02, missionId = 1056, startValue = 1, endValue = 2, @@ -3357,7 +3356,7 @@ if not Quests then }, [15] = { name = "Barbarian Test 3: The Mammoth Pushing", - storageId = Storage.BarbarianTest.Mission03, + storageId = Storage.Quest.U8_0.BarbarianTest.Mission03, missionId = 1057, startValue = 1, endValue = 2, @@ -3368,7 +3367,7 @@ if not Quests then }, [16] = { name = "The Honorary Barbarian", - storageId = Storage.BarbarianTest.Questline, + storageId = Storage.Quest.U8_0.BarbarianTest.Questline, missionId = 10099, startValue = 8, endValue = 8, @@ -3380,12 +3379,12 @@ if not Quests then }, [23] = { name = "The Inquisition", - startStorageId = Storage.TheInquisition.Questline, + startStorageId = Storage.Quest.U8_2.TheInquisitionQuest.Questline, startStorageValue = 2, missions = { [1] = { name = "Mission 1: Interrogation", - storageId = Storage.TheInquisition.Mission01, + storageId = Storage.Quest.U8_2.TheInquisitionQuest.Mission01, missionId = 10245, startValue = 1, endValue = 7, @@ -3402,7 +3401,7 @@ if not Quests then }, [2] = { name = "Mission 2: Eclipse", - storageId = Storage.TheInquisition.Mission02, + storageId = Storage.Quest.U8_2.TheInquisitionQuest.Mission02, missionId = 10246, startValue = 1, endValue = 3, @@ -3417,7 +3416,7 @@ if not Quests then }, [3] = { name = "Mission 3: Vampire Hunt", - storageId = Storage.TheInquisition.Mission03, + storageId = Storage.Quest.U8_2.TheInquisitionQuest.Mission03, missionId = 10247, startValue = 1, endValue = 6, @@ -3435,7 +3434,7 @@ if not Quests then }, [4] = { name = "Mission 4: The Haunted Ruin", - storageId = Storage.TheInquisition.Mission04, + storageId = Storage.Quest.U8_2.TheInquisitionQuest.Mission04, missionId = 10248, startValue = 1, endValue = 3, @@ -3448,7 +3447,7 @@ if not Quests then }, [5] = { name = "Mission 5: Essential Gathering", - storageId = Storage.TheInquisition.Mission05, + storageId = Storage.Quest.U8_2.TheInquisitionQuest.Mission05, missionId = 10249, startValue = 1, endValue = 3, @@ -3460,7 +3459,7 @@ if not Quests then }, [6] = { name = "Mission 6: The Demon Ungreez", - storageId = Storage.TheInquisition.Mission06, + storageId = Storage.Quest.U8_2.TheInquisitionQuest.Mission06, missionId = 10250, startValue = 1, endValue = 3, @@ -3472,7 +3471,7 @@ if not Quests then }, [7] = { name = "Mission 7: The Shadow Nexus", - storageId = Storage.TheInquisition.Mission07, + storageId = Storage.Quest.U8_2.TheInquisitionQuest.Mission07, missionId = 10251, startValue = 1, endValue = 5, @@ -3896,12 +3895,12 @@ if not Quests then }, [26] = { name = "The Thieves Guild", - startStorageId = Storage.ThievesGuild.Quest, + startStorageId = Storage.Quest.U8_2.TheThievesGuildQuest.Questline, startStorageValue = 1, missions = { [1] = { name = "Mission 1: Ivory Poaching", - storageId = Storage.ThievesGuild.Mission01, + storageId = Storage.Quest.U8_2.TheThievesGuildQuest.Mission01, missionId = 10280, startValue = 1, endValue = 2, @@ -3912,7 +3911,7 @@ if not Quests then }, [2] = { name = "Mission 2: Burglary", - storageId = Storage.ThievesGuild.Mission02, + storageId = Storage.Quest.U8_2.TheThievesGuildQuest.Mission02, missionId = 10281, startValue = 1, endValue = 3, @@ -3924,7 +3923,7 @@ if not Quests then }, [3] = { name = "Mission 3: Invitation", - storageId = Storage.ThievesGuild.Mission03, + storageId = Storage.Quest.U8_2.TheThievesGuildQuest.Mission03, missionId = 10282, startValue = 1, endValue = 3, @@ -3936,7 +3935,7 @@ if not Quests then }, [4] = { name = "Mission 4: Bridge Robbery", - storageId = Storage.ThievesGuild.Mission04, + storageId = Storage.Quest.U8_2.TheThievesGuildQuest.Mission04, missionId = 10283, startValue = 1, endValue = 8, @@ -3953,7 +3952,7 @@ if not Quests then }, [5] = { name = "Mission 5: Enforcing Debts", - storageId = Storage.ThievesGuild.Mission05, + storageId = Storage.Quest.U8_2.TheThievesGuildQuest.Mission05, missionId = 10284, startValue = 1, endValue = 2, @@ -3965,7 +3964,7 @@ if not Quests then }, [6] = { name = "Mission 6: Fishnapping", - storageId = Storage.ThievesGuild.Mission06, + storageId = Storage.Quest.U8_2.TheThievesGuildQuest.Mission06, missionId = 10285, startValue = 1, endValue = 4, @@ -3979,7 +3978,7 @@ if not Quests then }, [7] = { name = "Mission 7: Blackmail", - storageId = Storage.ThievesGuild.Mission07, + storageId = Storage.Quest.U8_2.TheThievesGuildQuest.Mission07, missionId = 10286, startValue = 1, endValue = 2, @@ -3991,7 +3990,7 @@ if not Quests then }, [8] = { name = "Mission 8: Message", - storageId = Storage.ThievesGuild.Mission08, + storageId = Storage.Quest.U8_2.TheThievesGuildQuest.Mission08, missionId = 10287, startValue = 1, endValue = 3, @@ -4006,12 +4005,12 @@ if not Quests then }, [27] = { name = "The Travelling Trader Quest", - startStorageId = Storage.TravellingTrader.Mission01, + startStorageId = Storage.Quest.U8_1.TheTravellingTrader.Mission01, startStorageValue = 1, missions = { [1] = { name = "Mission 1: Trophy", - storageId = Storage.TravellingTrader.Mission01, + storageId = Storage.Quest.U8_1.TheTravellingTrader.Mission01, missionId = 10288, startValue = 1, endValue = 2, @@ -4023,7 +4022,7 @@ if not Quests then }, [2] = { name = "Mission 2: Delivery", - storageId = Storage.TravellingTrader.Mission02, + storageId = Storage.Quest.U8_1.TheTravellingTrader.Mission02, missionId = 10289, startValue = 1, endValue = 5, @@ -4038,7 +4037,7 @@ if not Quests then }, [3] = { name = "Mission 3: Cheese", - storageId = Storage.TravellingTrader.Mission03, + storageId = Storage.Quest.U8_1.TheTravellingTrader.Mission03, missionId = 10290, startValue = 1, endValue = 3, @@ -4051,7 +4050,7 @@ if not Quests then }, [4] = { name = "Mission 4: Vase", - storageId = Storage.TravellingTrader.Mission04, + storageId = Storage.Quest.U8_1.TheTravellingTrader.Mission04, missionId = 10291, startValue = 1, endValue = 3, @@ -4065,7 +4064,7 @@ if not Quests then }, [5] = { name = "Mission 5: Make a deal", - storageId = Storage.TravellingTrader.Mission05, + storageId = Storage.Quest.U8_1.TheTravellingTrader.Mission05, missionId = 10292, startValue = 1, endValue = 3, @@ -4078,7 +4077,7 @@ if not Quests then }, [6] = { name = "Mission 6: Goldfish", - storageId = Storage.TravellingTrader.Mission06, + storageId = Storage.Quest.U8_1.TheTravellingTrader.Mission06, missionId = 10293, startValue = 1, endValue = 2, @@ -4089,7 +4088,7 @@ if not Quests then }, [7] = { name = "Mission 7: Declare", - storageId = Storage.TravellingTrader.Mission07, + storageId = Storage.Quest.U8_1.TheTravellingTrader.Mission07, missionId = 10294, startValue = 1, endValue = 1, @@ -4343,12 +4342,12 @@ if not Quests then }, [29] = { name = "The Ultimate Challenges", - startStorageId = Storage.SvargrondArena.QuestLogGreenhorn, + startStorageId = Storage.Quest.U8_0.BarbarianArena.QuestLogGreenhorn, startStorageValue = 1, missions = { [1] = { name = "Barbarian Arena - Greenhorn Mode", - storageId = Storage.SvargrondArena.QuestLogGreenhorn, + storageId = Storage.Quest.U8_0.BarbarianArena.QuestLogGreenhorn, missionId = 10312, startValue = 1, endValue = 2, @@ -4359,7 +4358,7 @@ if not Quests then }, [2] = { name = "Barbarian Arena - Scrapper Mode", - storageId = Storage.SvargrondArena.QuestLogScrapper, + storageId = Storage.Quest.U8_0.BarbarianArena.QuestLogScrapper, missionId = 10313, startValue = 1, endValue = 2, @@ -4370,7 +4369,7 @@ if not Quests then }, [3] = { name = "Barbarian Arena - Warlord Mode", - storageId = Storage.SvargrondArena.QuestLogWarlord, + storageId = Storage.Quest.U8_0.BarbarianArena.QuestLogWarlord, missionId = 10314, startValue = 1, endValue = 2, @@ -4523,7 +4522,7 @@ if not Quests then }, [5] = { name = "An Interest In Botany", - storageId = Storage.TibiaTales.AnInterestInBotany, + storageId = Storage.TibiaTales.AnInterestInBotany.Questline, missionId = 10321, startValue = 1, endValue = 4, @@ -4676,7 +4675,7 @@ if not Quests then }, [14] = { name = "To Outfox a Fox", - storageId = Storage.ToOutfoxAFoxQuest, + storageId = Storage.TibiaTales.ToOutfoxAFoxQuest, missionId = 10432, startValue = 1, endValue = 2, @@ -4687,7 +4686,7 @@ if not Quests then }, [15] = { name = "Fish for a Serpent", - storageId = Storage.Quest.U8_2.FishForASerpent.QuestLine, + storageId = Storage.Quest.U8_2.TheHuntForTheSeaSerpent.FishForASerpent, missionId = 10097, startValue = 1, endValue = 5, @@ -4725,12 +4724,12 @@ if not Quests then }, [32] = { name = "Unnatural Selection", - startStorageId = Storage.UnnaturalSelection.Questline, + startStorageId = Storage.Quest.U8_54.UnnaturalSelection.Questline, startStorageValue = 1, missions = { [1] = { name = "Mission 1: Skulled", - storageId = Storage.UnnaturalSelection.Mission01, + storageId = Storage.Quest.U8_54.UnnaturalSelection.Mission01, missionId = 10330, startValue = 1, endValue = 3, @@ -4743,7 +4742,7 @@ if not Quests then }, [2] = { name = "Mission 2: All Around the World", - storageId = Storage.UnnaturalSelection.Mission02, + storageId = Storage.Quest.U8_54.UnnaturalSelection.Mission02, missionId = 10331, startValue = 1, endValue = 13, @@ -4777,7 +4776,7 @@ if not Quests then }, [3] = { name = "Mission 3: Dance Dance Evolution", - storageId = Storage.UnnaturalSelection.Mission03, + storageId = Storage.Quest.U8_54.UnnaturalSelection.Mission03, missionId = 10332, startValue = 1, endValue = 3, @@ -4790,7 +4789,7 @@ if not Quests then }, [4] = { name = "Mission 4: Bits and Pieces", - storageId = Storage.UnnaturalSelection.Mission04, + storageId = Storage.Quest.U8_54.UnnaturalSelection.Mission04, missionId = 10333, startValue = 1, endValue = 2, @@ -4802,7 +4801,7 @@ if not Quests then }, [5] = { name = "Mission 5: Ray of Light", - storageId = Storage.UnnaturalSelection.Mission05, + storageId = Storage.Quest.U8_54.UnnaturalSelection.Mission05, missionId = 10334, startValue = 1, endValue = 3, @@ -4815,7 +4814,7 @@ if not Quests then }, [6] = { name = "Mission 6: Firewater Burn", - storageId = Storage.UnnaturalSelection.Mission06, + storageId = Storage.Quest.U8_54.UnnaturalSelection.Mission06, missionId = 10335, startValue = 1, endValue = 3, @@ -4829,12 +4828,12 @@ if not Quests then }, [33] = { name = "What a foolish Quest", - startStorageId = Storage.WhatAFoolish.Questline, + startStorageId = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, startStorageValue = 1, missions = { [1] = { name = "What a foolish Quest - Tasks of a Fool", - storageId = Storage.WhatAFoolish.Mission1, + storageId = Storage.Quest.U8_1.WhatAFoolishQuest.Mission1, missionId = 10336, startValue = 1, endValue = 2, @@ -4845,7 +4844,7 @@ if not Quests then }, [2] = { name = "What a foolish Quest - That stinks!", - storageId = Storage.WhatAFoolish.Mission2, + storageId = Storage.Quest.U8_1.WhatAFoolishQuest.Mission2, missionId = 10337, startValue = 1, endValue = 2, @@ -4858,7 +4857,7 @@ if not Quests then }, [3] = { name = "What a foolish Quest - A Piece of Cake", - storageId = Storage.WhatAFoolish.Mission3, + storageId = Storage.Quest.U8_1.WhatAFoolishQuest.Mission3, missionId = 10338, startValue = 1, endValue = 2, @@ -4869,7 +4868,7 @@ if not Quests then }, [4] = { name = "What a foolish Quest - Fool Spirits", - storageId = Storage.WhatAFoolish.Mission4, + storageId = Storage.Quest.U8_1.WhatAFoolishQuest.Mission4, missionId = 10339, startValue = 1, endValue = 3, @@ -4881,7 +4880,7 @@ if not Quests then }, [5] = { name = "What a foolish Quest - Watch out for the foolish", - storageId = Storage.WhatAFoolish.Mission5, + storageId = Storage.Quest.U8_1.WhatAFoolishQuest.Mission5, missionId = 10340, startValue = 1, endValue = 3, @@ -4895,7 +4894,7 @@ if not Quests then }, [6] = { name = "What a foolish Quest - The queen of farts", - storageId = Storage.WhatAFoolish.Mission6, + storageId = Storage.Quest.U8_1.WhatAFoolishQuest.Mission6, missionId = 10341, startValue = 1, endValue = 5, @@ -4909,7 +4908,7 @@ if not Quests then }, [7] = { name = "What a foolish Quest - For your mice only", - storageId = Storage.WhatAFoolish.Mission7, + storageId = Storage.Quest.U8_1.WhatAFoolishQuest.Mission7, missionId = 10342, startValue = 1, endValue = 2, @@ -4920,7 +4919,7 @@ if not Quests then }, [8] = { name = "What a foolish Quest - Smoking is a foolish thing", - storageId = Storage.WhatAFoolish.Mission8, + storageId = Storage.Quest.U8_1.WhatAFoolishQuest.Mission8, missionId = 10343, startValue = 1, endValue = 5, @@ -4934,7 +4933,7 @@ if not Quests then }, [9] = { name = "What a foolish Quest - A fool's bargain", - storageId = Storage.WhatAFoolish.Mission9, + storageId = Storage.Quest.U8_1.WhatAFoolishQuest.Mission9, missionId = 10344, startValue = 1, endValue = 5, @@ -4950,7 +4949,7 @@ if not Quests then }, [10] = { name = "What a foolish Quest - A sweet surprise", - storageId = Storage.WhatAFoolish.Mission10, + storageId = Storage.Quest.U8_1.WhatAFoolishQuest.Mission10, missionId = 10345, startValue = 1, endValue = 2, @@ -4962,7 +4961,7 @@ if not Quests then }, [11] = { name = "What a foolish Quest - The final foolishness", - storageId = Storage.WhatAFoolish.Mission11, + storageId = Storage.Quest.U8_1.WhatAFoolishQuest.Mission11, missionId = 10346, startValue = 1, endValue = 4, @@ -4977,7 +4976,7 @@ if not Quests then }, [12] = { name = "What a foolish Quest - To become a complete fool", - storageId = Storage.WhatAFoolish.JesterOutfit, + storageId = Storage.Quest.U8_1.WhatAFoolishQuest.JesterOutfit, missionId = 10347, startValue = 4, endValue = 4, @@ -4989,12 +4988,12 @@ if not Quests then }, [34] = { name = "Wrath of the Emperor", - startStorageId = Storage.WrathoftheEmperor.Questline, + startStorageId = Storage.Quest.U8_6.WrathOfTheEmperor.Questline, startStorageValue = 1, missions = { [1] = { name = "Mission 01: Catering the Lions Den", - storageId = Storage.WrathoftheEmperor.Mission01, + storageId = Storage.Quest.U8_6.WrathOfTheEmperor.Mission01, missionId = 10348, startValue = 1, endValue = 3, @@ -5008,7 +5007,7 @@ if not Quests then }, [2] = { name = "Mission 02: First Contact", - storageId = Storage.WrathoftheEmperor.Mission02, + storageId = Storage.Quest.U8_6.WrathOfTheEmperor.Mission02, missionId = 10349, startValue = 1, endValue = 3, @@ -5023,7 +5022,7 @@ if not Quests then }, [3] = { name = "Mission 03: The Keeper", - storageId = Storage.WrathoftheEmperor.Mission03, + storageId = Storage.Quest.U8_6.WrathOfTheEmperor.Mission03, missionId = 10350, startValue = 1, endValue = 3, @@ -5036,7 +5035,7 @@ if not Quests then }, [4] = { name = "Mission 04: Sacrament of the Snake", - storageId = Storage.WrathoftheEmperor.Mission04, + storageId = Storage.Quest.U8_6.WrathOfTheEmperor.Mission04, missionId = 10351, startValue = 1, endValue = 3, @@ -5052,7 +5051,7 @@ if not Quests then }, [5] = { name = "Mission 05: New in Town", - storageId = Storage.WrathoftheEmperor.Mission05, + storageId = Storage.Quest.U8_6.WrathOfTheEmperor.Mission05, missionId = 10352, startValue = 1, endValue = 3, @@ -5064,27 +5063,27 @@ if not Quests then }, [6] = { name = "Mission 06: The Office Job", - storageId = Storage.WrathoftheEmperor.Mission06, + storageId = Storage.Quest.U8_6.WrathOfTheEmperor.Mission06, missionId = 10353, startValue = 0, - endValue = 4, + endValue = 5, description = function(player) - return string.format("Kill four Magistrati in the office building. Then report back to Zlak. You have killed %d magistrati so far.", (math.max(player:getStorageValue(Storage.WrathoftheEmperor.Mission06), 0))) + return string.format("Kill four Magistrati in the office building. Then report back to Zlak. You have killed %d magistrati so far.", (math.max(player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission06), 1))) end, }, [7] = { name = "Mission 07: A Noble Cause", - storageId = Storage.WrathoftheEmperor.Mission07, + storageId = Storage.Quest.U8_6.WrathOfTheEmperor.Mission07, missionId = 10354, startValue = 0, endValue = 6, description = function(player) - return string.format("Kill six nobles in the city and report back to Zlak. You have killed %d nobles so far.", (math.max(player:getStorageValue(Storage.WrathoftheEmperor.Mission07), 0))) + return string.format("Kill six nobles in the city and report back to Zlak. You have killed %d nobles so far.", (math.max(player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission07), 0))) end, }, [8] = { name = "Mission 08: Uninvited Guests", - storageId = Storage.WrathoftheEmperor.Mission08, + storageId = Storage.Quest.U8_6.WrathOfTheEmperor.Mission08, missionId = 10355, startValue = 1, endValue = 2, @@ -5095,7 +5094,7 @@ if not Quests then }, [9] = { name = "Mission 09: The Sleeping Dragon", - storageId = Storage.WrathoftheEmperor.Mission09, + storageId = Storage.Quest.U8_6.WrathOfTheEmperor.Mission09, missionId = 10356, startValue = 1, endValue = 2, @@ -5107,7 +5106,7 @@ if not Quests then }, [10] = { name = "Mission 10: A Message of Freedom", - storageId = Storage.WrathoftheEmperor.Mission10, + storageId = Storage.Quest.U8_6.WrathOfTheEmperor.Mission10, missionId = 10357, startValue = 1, endValue = 6, @@ -5129,7 +5128,7 @@ if not Quests then }, [11] = { name = "Mission 11: Payback Time", - storageId = Storage.WrathoftheEmperor.Mission11, + storageId = Storage.Quest.U8_6.WrathOfTheEmperor.Mission11, missionId = 10358, startValue = 1, endValue = 2, @@ -5141,7 +5140,7 @@ if not Quests then }, [12] = { name = "Mission 12: Just Rewards", - storageId = Storage.WrathoftheEmperor.Mission12, + storageId = Storage.Quest.U8_6.WrathOfTheEmperor.Mission12, missionId = 10359, startValue = 0, endValue = 1, @@ -6174,12 +6173,12 @@ if not Quests then }, [45] = { name = "Spirithunters Quest", - startStorageId = Storage.SpiritHunters.Mission01, + startStorageId = Storage.Quest.U8_7.SpiritHunters.Mission01, startStorageValue = 1, missions = { [1] = { name = "Method", - storageId = Storage.SpiritHunters.Mission01, + storageId = Storage.Quest.U8_7.SpiritHunters.Mission01, missionId = 10426, startValue = 1, endValue = 2, @@ -6190,7 +6189,7 @@ if not Quests then }, [2] = { name = "First Mission", - storageId = Storage.SpiritHunters.Mission01, + storageId = Storage.Quest.U8_7.SpiritHunters.Mission01, missionId = 10427, startValue = 2, endValue = 4, @@ -6201,7 +6200,7 @@ if not Quests then }, [3] = { name = "Second Mission", - storageId = Storage.SpiritHunters.Mission01, + storageId = Storage.Quest.U8_7.SpiritHunters.Mission01, missionId = 10428, startValue = 4, endValue = 6, diff --git a/data-otservbr-global/lib/core/storages.lua b/data-otservbr-global/lib/core/storages.lua index fa7537eeb3c..72a532ef3da 100644 --- a/data-otservbr-global/lib/core/storages.lua +++ b/data-otservbr-global/lib/core/storages.lua @@ -85,7 +85,6 @@ Storage = { EmoteSpells = 30008, WagonTicket = 30009, FirstMageWeapon = 30011, - ToOutfoxAFoxQuest = 30012, KawillBlessing = 30014, RentedHorseTimer = 30015, FountainOfLife = 30016, @@ -516,21 +515,6 @@ Storage = { AmuletTimer = 50520, AmuletStatus = 50521, }, - TravellingTrader = { - -- Reserved storage from 50600 - 50619 - Mission01 = 50600, - Mission02 = 50601, - Mission03 = 50602, - Mission04 = 50603, - Mission05 = 50604, - Mission06 = 50605, - Mission07 = 50606, - -- unused packageDoor = 50607 - }, - VampireHunter = { - -- Reserved storage from 50650 - 50659 - Rank = 50650, - }, BigfootBurden = { -- Reserved storage from 50660 - 50719 QuestLine = 50660, @@ -587,16 +571,6 @@ Storage = { SlimeGobblerTimeout = 50720, SlimeGobblerReceived = 50721, }, - KosheiTheDeathless = { - -- Reserved storage from 50740 - 50749 - RewardDoor = 50740, - }, - ElementalSphere = { - -- Reserved storage from 50750 - 50759 - QuestLine = 50750, - BossStorage = 50751, - MachineGemCount = 50752, - }, GravediggerOfDrefia = { -- Reserved storage from 50760 - 50849 QuestStart = 50760, @@ -741,185 +715,11 @@ Storage = { -- Until all outfit quests are completed DefaultStart = 50960, Ref = 50961, - -- Norseman-outfit Quest - NorsemanAddon = 51004, -- Golden Outfit GoldenOutfit = 51015, DeeplingAnchor = 51023, RoyalCostumeOutfit = 51026, }, - TheInquisition = { - -- Reserved storage from 51110 - 51139 - Questline = 51110, - Mission01 = 51111, - Mission02 = 51112, - Mission03 = 51113, - Mission04 = 51114, - Mission05 = 51115, - Mission06 = 51116, - Mission07 = 51117, - RewardDoor = 51118, - GrofGuard = 51120, - KulagGuard = 51121, - MilesGuard = 51122, - TimGuard = 51123, - WalterGuard = 51124, - StorkusVampiredust = 51125, - EnterTeleport = 51126, - Reward = 51127, - RewardRoomText = 51128, - }, - BarbarianTest = { - -- Reserved storage from 51140 - 51159 - Questline = 51140, - Mission01 = 51141, - Mission02 = 51142, - Mission03 = 51143, - MeadTotalSips = 51144, - MeadSuccessSips = 51145, - }, - TheIceIslands = { - -- Reserved storage from 51160 - 51199 - Questline = 51160, - Mission01 = 51161, -- Befriending the Musher - Mission02 = 51162, -- Nibelor 1: Breaking the Ice - Mission03 = 51163, -- Nibelor 2: Ecological Terrorism - Mission04 = 51164, -- Nibelor 3: Artful Sabotage - Mission05 = 51165, -- Nibelor 4: Berserk Brewery - Mission06 = 51166, -- Nibelor 5: Cure the Dogs - Mission07 = 51167, -- The Secret of Helheim - Mission08 = 51168, -- The Contact - Mission09 = 51169, -- Formorgar Mines 1: The Mission - Mission10 = 51170, -- Formorgar Mines 2: Ghostwhisperer - Mission11 = 51171, -- Formorgar Mines 3: The Secret - Mission12 = 51172, -- Formorgar Mines 4: Retaliation - PickAmount = 51173, - PaintSeal = 51174, - SulphurLava = 51175, - SporesMushroom = 51176, - FrostbiteHerb = 51177, - FlowerCactus = 51178, - FlowerBush = 51179, - MemoryCrystal = 51180, - Obelisk01 = 51181, - Obelisk02 = 51182, - Obelisk03 = 51183, - Obelisk04 = 51184, - yakchalDoor = 51185, - HuskyKill = 51186, - HuskyKillStatus = 51187, - }, - TheWayToYalahar = { - -- Reserved storage from 51200 - 51209 - QuestLine = 51200, - }, - InServiceofYalahar = { - -- Reserved storage from 51210 - 51259 - Questline = 51210, - Mission01 = 51211, - Mission02 = 51212, - Mission03 = 51213, - Mission04 = 51214, - Mission05 = 51215, - Mission06 = 51216, - Mission07 = 51217, - Mission08 = 51218, - Mission09 = 51219, - Mission10 = 51220, - SewerPipe01 = 51221, - SewerPipe02 = 51222, - SewerPipe03 = 51223, - SewerPipe04 = 51224, - DiseasedDan = 51225, - DiseasedBill = 55226, - DiseasedFred = 55227, - AlchemistFormula = 51228, - BadSide = 51229, - GoodSide = 55230, - MrWestDoor = 51231, - MrWestStatus = 51232, - TamerinStatus = 55233, - MorikSummon = 51234, - QuaraState = 51235, - QuaraSplasher = 51236, - QuaraSharptooth = 51237, - QuaraInky = 51238, - MatrixState = 51239, - SideDecision = 51240, - MatrixReward = 51241, - NotesPalimuth = 51242, - NotesAzerus = 51243, - DoorToAzerus = 51244, - DoorToBog = 55136, - DoorToLastFight = 55137, - DoorToMatrix = 51247, - DoorToQuara = 51248, - DoorToReward = 51249, - }, - ChildrenoftheRevolution = { - -- Reserved storage from 55145 - 51279 - Questline = 55145, - Mission00 = 55146, -- Prove Your Worzz! - Mission01 = 51262, - Mission02 = 51263, - Mission03 = 51264, - Mission04 = 55148, - Mission05 = 51266, - SpyBuilding01 = 51267, - SpyBuilding02 = 51268, - SpyBuilding03 = 51269, - StrangeSymbols = 55154, - teleportAccess = 55155, - }, - UnnaturalSelection = { - -- Reserved storage from 55159 - 51299 - Questline = 55159, - Mission01 = 51281, - Mission02 = 51282, - Mission03 = 51283, - Mission04 = 51284, - Mission05 = 51285, - Mission06 = 51286, - DanceStatus = 51287, - }, - WrathoftheEmperor = { - -- Reserved storage from 51300 - 51339 - Questline = 51300, - Mission01 = 51301, - Mission02 = 51302, - Mission03 = 51303, - Mission04 = 51304, - Mission05 = 51305, - Mission06 = 51306, - Mission07 = 51307, - Mission08 = 51308, - Mission09 = 51309, - Mission10 = 51310, - Mission11 = 51311, - Mission12 = 51312, - Message = 51313, --1068 - GuardcaughtYou = 51314, --1062 - ZumtahStatus = 51315, --1066 - PrisonReleaseStatus = 51316, --1067 - GhostOfAPriest01 = 51317, --1070 - GhostOfAPriest02 = 51318, --1071 - GhostOfAPriest03 = 51319, --1072 - InterdimensionalPotion = 51320, --1084 - BossStatus = 51321, --1090 - -- unused platinumReward = 51322, - -- unused backpackReward = 51323, - MainReward = 51324, - TeleportAccess = { - Rebel = 51325, - Zlak = 51326, - Zizzle = 51327, - SleepingDragon = 51328, - InnerSanctum = 51329, - AwarnessEmperor = 51330, - Wote10 = 51331, - BossRoom = 51332, - }, - }, Postman = { -- Reserved storage from 51360 - 51389 Mission01 = 51360, @@ -945,167 +745,75 @@ Storage = { MeasurementsChrystal = 51380, MeasurementsOlrik = 51381, }, - ThievesGuild = { - -- Reserved storage from 515206 - 51409 - Quest = 515206, - Mission01 = 515207, - Mission02 = 515208, - Mission03 = 515209, - Mission04 = 51394, - Mission05 = 56395, - Mission06 = 51396, - Mission07 = 51397, - Mission08 = 51398, - Door = 51399, - Reward = 51400, - TheatreScript = 51401, - }, TheHuntForTheSeaSerpent = { -- Reserved storage from 51410 - 51419 }, - SecretService = { - -- Reserved storage from 51420 - 51449 - Quest = 51420, - TBIMission01 = 51421, - AVINMission01 = 51422, - CGBMission01 = 51423, - TBIMission02 = 51424, - AVINMission02 = 51425, - CGBMission02 = 51426, - TBIMission03 = 51427, - AVINMission03 = 51428, - CGBMission03 = 51429, - TBIMission04 = 51430, - AVINMission04 = 51431, - CGBMission04 = 51432, - TBIMission05 = 51433, - AVINMission05 = 51434, - CGBMission05 = 51435, - TBIMission06 = 51436, - AVINMission06 = 51437, - CGBMission06 = 51438, - Mission07 = 51439, - RottenTree = 51440, - }, - HiddenCityOfBeregar = { - -- Reserved storage from 51450 - 51479 - DefaultStart = 51450, - WayToBeregar = 51451, - OreWagon = 51452, - GoingDown = 51453, - JusticeForAll = 51454, - GearWheel = 51455, - SweetAsChocolateCake = 51456, - RoyalRescue = 51457, - TheGoodGuard = 51458, - PythiusTheRotten = 51459, - DoorNorthMine = 51460, - DoorWestMine = 51461, - DoorSouthMine = 51462, - BrownMushrooms = 51463, - TunnellingGuide = 51464, - }, TibiaTales = { -- Reserved storage from 51480 - 51539 DefaultStart = 51480, UltimateBoozeQuest = 51481, AgainstTheSpiderCult = 51482, - AnInterestInBotany = 51483, - AnInterestInBotanyChestDoor = 51484, - AritosTask = 51485, - ToAppeaseTheMightyQuest = 51486, - IntoTheBonePit = 51487, - TheExterminator = 51488, - AritosTaskDoor = 51489, + AnInterestInBotany = { + Questline = 51483, + ChestDoor = 51484, + BotanyAlmanach = 51485, + }, + AritosTask = 51486, + ToAppeaseTheMightyQuest = 51487, + IntoTheBonePit = 51488, + TheExterminator = 51489, + AritosTaskDoor = 51490, RestInHallowedGround = { - Questline = 51495, - HolyWater = 51496, + Questline = 51491, + HolyWater = 51492, Graves = { - Grave1 = 51501, - Grave2 = 51502, - Grave3 = 51503, - Grave4 = 51504, - Grave5 = 51505, - Grave6 = 51506, - Grave7 = 51507, - Grave8 = 51508, - Grave9 = 51509, - Grave10 = 51510, - Grave11 = 51511, - Grave12 = 51512, - Grave13 = 51513, - Grave14 = 51514, - Grave15 = 51515, - Grave16 = 51516, + Grave1 = 51493, + Grave2 = 51494, + Grave3 = 51495, + Grave4 = 51496, + Grave5 = 51497, + Grave6 = 51498, + Grave7 = 51499, + Grave8 = 51500, + Grave9 = 51501, + Grave10 = 51502, + Grave11 = 51503, + Grave12 = 51504, + Grave13 = 51505, + Grave14 = 51506, + Grave15 = 51507, + Grave16 = 51508, }, }, JackFutureQuest = { - QuestLine = 51520, - Furniture01 = 51521, - Furniture02 = 51522, - Furniture03 = 51523, - Furniture04 = 51524, - Furniture05 = 51525, - Mother = 51526, - Sister = 51527, - Statue = 51528, - LastMissionState = 51529, + QuestLine = 51509, + Furniture01 = 51510, + Furniture02 = 51511, + Furniture03 = 51512, + Furniture04 = 51513, + Furniture05 = 51514, + Mother = 51515, + Sister = 51516, + Statue = 51517, + LastMissionState = 51518, }, TheCursedCrystal = { Oneeyedjoe = 51530, MedusaOil = 51531, Questline = 51532, }, - }, - SearoutesAroundYalahar = { - -- Reserved storage from 51590 - 51609 - TownsCounter = 51590, - AbDendriel = 51591, - Darashia = 51592, - Venore = 51593, - Ankrahmun = 51594, - PortHope = 51595, - Thais = 51596, - LibertyBay = 51597, - Carlin = 51598, - }, - KillingInTheNameOf = { - -- Reserved storage from 51610 - 51629 - LugriNecromancers = 51610, - BudrikMinos = 51611, - MissionTiquandasRevenge = 51612, - MissionDemodras = 51613, - BossPoints = 51614, - QuestLogEntry = 51615, - PawAndFurRank = 51616, - GreenDjinnTask = 51617, - BlueDjinnTask = 51618, - PirateTask = 51619, - TrollTask = 51620, - GoblinTask = 51621, - RotwormTask = 51622, - CyclopsTask = 51623, - }, - HotCuisineQuest = { - -- Reserved storage from 51650 - 51659 - QuestStart = 51650, - CurrentDish = 51651, - QuestLog = 51652, - CookbookDoor = 51653, - }, - RookgaardTutorialIsland = { - -- Reserved storage from 51660 - 51679 - TutorialHintsStorage = 51665, - SantiagoNpcGreetStorage = 51666, - SantiagoQuestLog = 51667, - -- unused cockroachKillStorage = 51668, - -- unused cockroachLegsMsgStorage = 51669, - -- unused cockroachBodyMsgStorage = 51670, - ZirellaNpcGreetStorage = 51671, - ZirellaQuestLog = 51672, - CarlosNpcTradeStorage = 51673, - CarlosNpcGreetStorage = 51677, - CarlosQuestLog = 51678, + ToBlindTheEnemy = { + Questline = 51533, + DwarvenShield = 51534, + MorningStar = 51535, + BP1 = 51536, + BP2 = 51537, + }, + ToOutfoxAFoxQuest = { + Questline = 51538, + MiningHelmet = 51539, + }, + -- TowerDefenceQuest: when there is space, bring this quest that is in update 8.1 to Tibia Tales }, TheRookieGuard = { --Reserved storage 52360 - 52395 @@ -1146,44 +854,18 @@ Storage = { -- Reserved storage from 51680 - 51689 DeeperBanutaShortcut = 51680, }, - DemonOak = { - -- Reserved storage from 51700 - 51709 - Done = 51700, - Progress = 51701, - Squares = 51702, - AxeBlowsBird = 51703, - AxeBlowsLeft = 51704, - AxeBlowsRight = 51705, - AxeBlowsFace = 51706, - }, - SvargrondArena = { - -- Reserved storage from 51710 - 51729 - Arena = 51710, - PitDoor = 51711, - QuestLogGreenhorn = 51712, - QuestLogScrapper = 51713, - QuestLogWarlord = 51714, - RewardGreenhorn = 51715, - RewardScrapper = 51716, - RewardWarlord = 51717, - TrophyGreenhorn = 51718, - TrophyScrapper = 51719, - TrophyWarlord = 51720, - GreenhornDoor = 51721, - ScrapperDoor = 51722, - WarlordDoor = 51723, - }, QuestChests = { -- Reserved storage from 51730 - 51999 - KosheiTheDeathlessLegs = 51730, - KosheiTheDeathlessGold = 51731, + TutorialShovel = 51732, TutorialRope = 51733, FormorgarMinesHoistSkeleton = 51737, FormorgarMinesHoistChest = 51738, -- Custom Quests, currently not using system.lua (aid 2000) - KosheiAmulet1 = 51742, - KosheiAmulet2 = 51743, + BlackKnightTreeCrownShield = 51739, + BlackKnightTreeCrownArmor = 51740, + BlackKnightTreeKey = 51741, + SilverBrooch = 51744, FamilyBrooch = 51745, DCQGhoul = 51746, FirewalkerBoots = 51747, @@ -1239,67 +921,6 @@ Storage = { Sinew = 52052, }, }, - WhatAFoolish = { - -- Reserved storage from 52060 - 52099 - Questline = 52060, - Mission1 = 52061, - Mission2 = 52062, - Mission3 = 52063, - Mission4 = 52064, - Mission5 = 52065, - Mission6 = 52066, - Mission7 = 52067, - Mission8 = 52068, - Mission9 = 52069, - Mission10 = 52070, - Mission11 = 52071, - PieBuying = 52072, - PieBoxTimer = 52073, - TriangleTowerDoor = 52074, - EmperorBeardShave = 52075, - JesterOutfit = 52076, - WhoopeeCushion = 52077, - QueenEloiseCatDoor = 52078, - CatBasket = 52079, - ScaredCarina = 52080, - InflammableSulphur = 52081, - SpecialLeaves = 52082, - Cigar = 52083, - Contract = 52084, - CookieDelivery = { - SimonTheBeggar = 52085, - Markwin = 52086, - Ariella = 52087, - Hairycles = 52088, - Djinn = 52089, - AvarTar = 52090, - OrcKing = 52091, - Lorbas = 52092, - Wyda = 52093, - Hjaern = 52094, - }, - OldWornCloth = 52095, - LostDisguise = 52096, - ScaredKazzan = 52097, - }, - SpiritHunters = { - -- Reserved storage from 52100 - 52109 - Mission01 = 52100, - TombUse = 52101, - CharmUse = 52102, - NightstalkerUse = 52103, - SouleaterUse = 52104, - GhostUse = 52105, - }, - SeaOfLight = { - -- Reserved storage from 52110 - 52119 - Questline = 52110, - Mission1 = 52111, - Mission2 = 52112, - Mission3 = 52113, - StudyTimer = 52114, - LostMinesCrystal = 52115, - }, Diapason = { -- Reserved storage from 52120 - 52129 Lyre = 52120, @@ -1421,15 +1042,6 @@ Storage = { Questline = 52311, }, }, - RottinWoodAndMaried = { - -- Reserved storage from 52340 - 52349 - Questline = 52340, - RottinStart = 52341, - Trap = 52342, - Corpse = 52343, - Time = 52344, - Mission03 = 52345, - }, TheMummysCurse = { -- Reserved storage from 52350 - 52359 Time1 = 52351, @@ -1933,71 +1545,284 @@ Storage = { }, }, U8_0 = { -- update 8.0 - Reserved Storages 41151 - 41350 - BarbarianArena = {}, - BarbarianTest = {}, - BerserkPotion = {}, - FishingBox = {}, - FormorgarMinesHoist = {}, - FormorgarMines = {}, - FrostDragon = {}, - Inukaya = {}, - LionTrophy = {}, - MastermindPotion = {}, - NorsemanOutfits = {}, - Sinatuki = {}, - SkeletonDecoration = {}, - TheIceIslands = {}, - WaterskinOfMead = {}, + BarbarianArena = { + Arena = 41151, + PitDoor = 41152, + QuestLogGreenhorn = 41153, + QuestLogScrapper = 41154, + QuestLogWarlord = 41155, + RewardGreenhorn = 41156, + RewardGreenhornWeapons = 41157, + RewardGreenhornBP = 41158, + RewardGreenhornPresent = 41159, + RewardScrapper = 41160, + RewardScrapperWeapons = 41161, + RewardScrapperBP = 41162, + RewardScrapperPresent = 41163, + RewardWarlord = 41164, + RewardWarlordWeapons = 41165, + RewardWarlordBP = 41166, + RewardWarlordPresent = 41167, + TrophyGreenhorn = 41168, + TrophyScrapper = 41169, + TrophyWarlord = 41170, + GreenhornDoor = 41171, + ScrapperDoor = 41172, + WarlordDoor = 41173, + }, + BarbarianTest = { + Questline = 41174, + Mission01 = 41175, + Mission02 = 41176, + Mission03 = 41177, + MeadTotalSips = 41178, + MeadSuccessSips = 41179, + }, + FishingBox = 41180, + ShardsofAncientWinters = { + Inukaya = 41271, + Tyrsung = 41272, + Okolnir = 41273, + Helheim = 41274, + FormorgarMines = 41275, + }, + TheIceIslands = { + Questline = 41276, + Mission01 = 41277, -- Befriending the Musher + Mission02 = 41278, -- Nibelor 1: Breaking the Ice + Mission03 = 41279, -- Nibelor 2: Ecological Terrorism + Mission04 = 41280, -- Nibelor 3: Artful Sabotage + Mission05 = 41281, -- Nibelor 4: Berserk Brewery + Mission06 = 41282, -- Nibelor 5: Cure the Dogs + Mission07 = 41283, -- The Secret of Helheim + Mission08 = 41284, -- The Contact + Mission09 = 41285, -- Formorgar Mines 1: The Mission + Mission10 = 41286, -- Formorgar Mines 2: Ghostwhisperer + Mission11 = 41287, -- Formorgar Mines 3: The Secret + Mission12 = 41288, -- Formorgar Mines 4: Retaliation + PaintSeal = 41289, + SulphurLava = 41290, + SporesMushroom = 41291, + FrostbiteHerb = 41292, + FlowerCactus = 41293, + FlowerBush = 41294, + MemoryCrystal = 41295, + Obelisk01 = 41296, + Obelisk02 = 41297, + Obelisk03 = 41298, + Obelisk04 = 41299, + yakchalDoor = 41300, + HuskyKill = 41301, + HuskyKillStatus = 41302, + FormorgarMinesDoor = 41303, + FormorgarGlacierSkeleton = 41304, + FormorgarGlacierChest = 41305, + NorsemanOutfit = 41306, + NoblemanFirstAddon = 41307, + NoblemanSecondAddon = 41308, + }, }, U8_1 = { -- update 8.1 - Reserved Storages 41351 - 41650 - AgainstTheSpiderCult = {}, - AritosTask = {}, - OutfitBrotherhoodMaleAddon = {}, - IntoTheBonePit = {}, KissingAPig = {}, - KosheiTheDeathless = {}, - OutfitNightmareMaleAddon = {}, - NomadsLand = {}, - RestInHallowedGround = {}, - SecretService = {}, - StealFromThieves = {}, + KosheiTheDeathless = { + RewardDoor = 41351, + KosheiTheDeathlessLegs = 41352, + KosheiTheDeathlessGold = 41353, + KosheiTheDeathlessPlatinum = 41354, + KosheiAmuletPart1 = 41355, + KosheiAmuletPart2 = 41356, + KosheiAmuletPart3 = 41357, + KosheiAmuletPart4 = 41358, + }, + SecretService = { + Quest = 41359, + TBIMission01 = 41360, + AVINMission01 = 41361, + CGBMission01 = 41362, + TBIMission02 = 41363, + AVINMission02 = 41364, + CGBMission02 = 41365, + TBIMission03 = 41366, + AVINMission03 = 41367, + CGBMission03 = 41368, + TBIMission04 = 41369, + AVINMission04 = 41370, + CGBMission04 = 41371, + TBIMission05 = 41372, + AVINMission05 = 41373, + CGBMission05 = 41374, + TBIMission06 = 41375, + AVINMission06 = 41376, + CGBMission06 = 41377, + Mission07 = 41378, + RottenTree = 41379, + AHX17L89 = 41380, + FamilySignetRing = 41381, + MagicSpellbook = 41382, + BuildingPlans = 41383, + SuspiciousDocuments = 41384, + Book = 41385, + RottenHeartOfTree = 41386, + LotteryTicket = 41387, + PoemScroll = 41388, + IntelligenceReports = 41389, + }, StrongPotions = { - Reward = 10043, - }, - TheExterminator = {}, - TheTravellingTrader = {}, - TheUltimateBooze = {}, - ToAppeaseTheMighty = {}, - ToBlindTheEnemy = {}, - ToOutfoxAFox = {}, - TowerDefence = {}, - Waterfall = {}, - WhatAFoolish = {}, + Reward = 41390, + }, + TheTravellingTrader = { + Mission01 = 41391, + Mission02 = 41392, + Mission03 = 41393, + Mission04 = 41394, + Mission05 = 41395, + Mission06 = 41396, + Mission07 = 41397, + }, + TowerDefenceQuest = { + Questline = 41398, + Door = 41399, + }, + WaterfallQuest = 41400, + WhatAFoolishQuest = { + Questline = 41401, + Mission1 = 41402, + Mission2 = 41403, + Mission3 = 41404, + Mission4 = 41405, + Mission5 = 41406, + Mission6 = 41407, + Mission7 = 41408, + Mission8 = 41409, + Mission9 = 41410, + Mission10 = 41411, + Mission11 = 41412, + PieBuying = 41413, + PieBoxTimer = 41414, + TriangleTowerDoor = 41415, + EmperorBeardShave = 41416, + JesterOutfit = 41417, + WhoopeeCushion = 41418, + QueenEloiseCatDoor = 41419, + CatBasket = 41420, + ScaredCarina = 41421, + InflammableSulphur = 41422, + SpecialLeaves = 41423, + Cigar = 41424, + Contract = 41425, + CookieDelivery = { + SimonTheBeggar = 41426, + Markwin = 41427, + Ariella = 41428, + Hairycles = 41429, + Djinn = 41430, + AvarTar = 41431, + OrcKing = 41432, + Lorbas = 41433, + Wyda = 41434, + Hjaern = 41435, + }, + OldWornCloth = 41436, + LostDisguise = 41437, + ScaredKazzan = 41438, + MagicalWatch = 41439, + BagBookKnife = 41440, + }, }, U8_2 = { -- update 8.2 - Reserved Storages 41651 - 41900 - ElementalSpheres = {}, - MachineryOfWar = {}, - TheBeginning = {}, - TheDemonOak = {}, - FishForASerpent = { + ElementalSpheres = { QuestLine = 41651, + BossStorage = 41652, + MachineGemCount = 41653, + BossRoom = 41654, + KnightBoss = 41655, + SorcererBoss = 41656, + PaladinBoss = 41657, + DruidBoss = 41658, + Machine1 = 41659, + Machine2 = 41660, + Machine3 = 41661, + Machine4 = 41662, + }, + MachineryOfWar = {}, + TheBeginningQuest = { + TutorialHintsStorage = 41670, + SantiagoNpcGreetStorage = 41671, + SantiagoQuestLog = 41672, + ZirellaNpcGreetStorage = 41673, + ZirellaQuestLog = 41674, + CarlosNpcTradeStorage = 41675, + CarlosNpcGreetStorage = 41676, + CarlosQuestLog = 41677, + }, + TheDemonOak = { + Done = 41678, + Progress = 41679, + Squares = 41680, + AxeBlowsBird = 41681, + AxeBlowsLeft = 41682, + AxeBlowsRight = 41683, + AxeBlowsFace = 41684, }, TheHuntForTheSeaSerpent = { - QuestLine = 41652, - SuccessSwitch = 41653, - Bait = 41654, - Direction = 41655, - Access = 41656, - }, - TheInquisition = {}, - TheThievesGuild = {}, - TrollSabotage = { - Questline = 41840, - JumpTimer = 41841, - }, - VampireHunter = {}, + QuestLine = 41685, + SuccessSwitch = 41686, + Bait = 41687, + Direction = 41688, + Access = 41689, + FishForASerpent = 41690, + }, + TheInquisitionQuest = { + Questline = 41691, + Mission01 = 41692, + Mission02 = 41693, + Mission03 = 41694, + Mission04 = 41695, + Mission05 = 41696, + Mission06 = 41697, + Mission07 = 41698, + RewardDoor = 41699, + GrofGuard = 41700, + KulagGuard = 41701, + MilesGuard = 41702, + TimGuard = 41703, + WalterGuard = 41704, + StorkusVampiredust = 41705, + EnterTeleport = 41706, + Reward = 41707, + RewardRoomText = 41708, + WitchesGrimoire = 41709, + }, + TheThievesGuildQuest = { + Questline = 41710, + Mission01 = 41711, + Mission02 = 41712, + Mission03 = 41713, + Mission04 = 41714, + Mission05 = 41715, + Mission06 = 41716, + Mission07 = 41717, + Mission08 = 41718, + Door = 41719, + Reward = 41720, + TheatreScript = 41721, + RewardOasis = 41722, + RewardBook = 41723, + GoldenGoblet = 41724, + CompromisingLetter = 41725, + RewardEnd = 41726, + }, + TrollSabotageQuest = { + Questline = 41727, + JumpTimer = 41728, + }, + VampireHunterQuest = { + Rank = 41729, + Door = 41730, + BloodSkull = 41731, + }, TheMutatedPumpkin = { - Skinned = 41860, + Skinned = 41732, }, }, U8_4 = { -- update 8.4 - Reserved Storages 41901 - 42145 @@ -2017,71 +1842,180 @@ Storage = { Mission04 = 41911, VengothAccess = 41912, }, - InServiceOfYalahar = {}, - TheHiddenCityOfBeregar = {}, + InServiceOfYalahar = { + TheWayToYalahar = 41950, + Questline = 41951, + Mission01 = 41952, + Mission02 = 41953, + Mission03 = 41954, + Mission04 = 41955, + Mission05 = 41956, + Mission06 = 41957, + Mission07 = 41958, + Mission08 = 41959, + Mission09 = 41960, + Mission10 = 41961, + SewerPipe01 = 41962, + SewerPipe02 = 41963, + SewerPipe03 = 41964, + SewerPipe04 = 41965, + DiseasedDan = 41966, + DiseasedBill = 41967, + DiseasedFred = 41968, + AlchemistFormula = 41969, + BadSide = 41970, + GoodSide = 41971, + MrWestDoor = 41972, + MrWestStatus = 41973, + TamerinStatus = 41974, + MorikSummon = 41975, + QuaraState = 41976, + QuaraSplasher = 41977, + QuaraSharptooth = 41978, + QuaraInky = 41979, + MatrixState = 41980, + SideDecision = 41981, + MatrixReward = 41982, + NotesPalimuth = 41983, + NotesAzerus = 41984, + DoorToAzerus = 41985, + DoorToBog = 41986, + DoorToLastFight = 41987, + DoorToMatrix = 41988, + DoorToQuara = 41989, + DoorToReward = 41990, + LastFight = 41991, + WarGolemsMachine1 = 41992, + WarGolemsMachine2 = 41993, + SearoutesAroundYalahar = { + TownsCounter = 41994, + AbDendriel = 41995, + Darashia = 41996, + Venore = 41997, + Ankrahmun = 41998, + PortHope = 41999, + Thais = 42000, + LibertyBay = 42001, + Carlin = 42002, + }, + }, + TheHiddenCityOfBeregar = { + DefaultStart = 42003, + WayToBeregar = 42004, + OreWagon = 42005, + GoingDown = 42006, + JusticeForAll = 42007, + GearWheel = 42008, + SweetAsChocolateCake = 42009, + RoyalRescue = 42010, + TheGoodGuard = 42011, + PythiusTheRotten = 42012, + DoorNorthMine = 42013, + DoorWestMine = 42014, + DoorSouthMine = 42015, + BrownMushrooms = 42016, + TunnellingGuide = 42017, + CorpseGoldIngot = 42018, + CorpseSmallTopazes = 42019, + CorpseRustedArmor = 42020, + PrisonCellKey = 42021, + BPTheUndeathStare = 42022, + FirewalkerBoots = 42023, + }, TopOfTheCity = {}, - YalaharianOutfits = {}, }, U8_5 = { -- update 8.5 - Reserved Storages 42146 - 42550 - Braindeath = {}, - DarashiaDragon = {}, - HotCuisine = {}, + DarashiaDragon = 42146, + HotCuisineQuest = { + QuestStart = 42147, + CurrentDish = 42148, + QuestLog = 42149, + CookbookDoor = 42150, + LastInteractionDate2 = 42151, + LastInteractionDate3 = 42152, + LastInteractionDate4 = 42153, + LastInteractionDate5 = 42154, + LastInteractionDate6 = 42155, + LastInteractionDate7 = 42156, + LastInteractionDate8 = 42157, + LastInteractionDate9 = 42158, + LastInteractionDate10 = 42159, + LastInteractionDate11 = 42160, + LastInteractionDate12 = 42161, + LastInteractionDate13 = 42162, + LastInteractionDate14 = 42163, + LastInteractionDate15 = 42164, + }, KillingInTheNameOf = { + LugriNecromancers = 42165, + BudrikMinos = 42166, + MissionTiquandasRevenge = 42167, + MissionDemodras = 42168, + BossPoints = 42169, + QuestLogEntry = 42170, + PawAndFurRank = 42171, + GreenDjinnTask = 42172, + BlueDjinnTask = 42173, + PirateTask = 42174, + TrollTask = 42175, + GoblinTask = 42176, + RotwormTask = 42177, + CyclopsTask = 42178, MonsterKillCount = { - KillCount = 42150, + KillCount = 42179, -- Grizzly Adams - CrocodileCount = 42151, - BadgerCount = 42152, - TarantulaCount = 42153, - CarniphilasCount = 42154, - StoneGolemCount = 42155, - MammothCount = 42156, - GnarlhoundCount = 42157, - TerramiteCount = 42158, - ApesCount = 42159, - ThornbackTortoiseCount = 42160, - GargoyleCount = 42161, - IceGolemCount = 42162, - QuaraScoutsCount = 42163, - MutatedRatCount = 42164, - AncientScarabCount = 42165, - WyvernCount = 42166, - LancerBeetleCount = 42167, - WailingWidowCount = 42168, - KillerCaimanCount = 42169, - BonebeastCount = 42170, - CrystalSpiderCount = 42171, - MutatedTigerCount = 42172, - UnderwaterQuarasCount = 42173, - GiantSpiderCount = 42174, - WerewolveCount = 42175, - NightmareCount = 42176, - HellspawnCount = 42177, - HighClassLizardCount = 42178, - StamporCount = 42179, - BrimstoneBugCount = 42180, - MutatedBatCount = 42181, - HydraCount = 42182, - SerpentSpawnCount = 42183, - MedusaCount = 42184, - BehemothCount = 42185, - SeaSerpentsCount = 42186, - HellhoundCount = 42187, - GhastlyDragonCount = 42188, - DrakenCount = 42189, - DestroyerCount = 42190, - UndeadDragonCount = 42191, - DemonCount = 42192, + CrocodileCount = 42180, + BadgerCount = 42181, + TarantulaCount = 42182, + CarniphilasCount = 42183, + StoneGolemCount = 42184, + MammothCount = 42185, + GnarlhoundCount = 42186, + TerramiteCount = 42187, + ApesCount = 42188, + ThornbackTortoiseCount = 42189, + GargoyleCount = 42190, + IceGolemCount = 42191, + QuaraScoutsCount = 42192, + MutatedRatCount = 42193, + AncientScarabCount = 42194, + WyvernCount = 42195, + LancerBeetleCount = 42196, + WailingWidowCount = 42197, + KillerCaimanCount = 42198, + BonebeastCount = 42199, + CrystalSpiderCount = 42200, + MutatedTigerCount = 42201, + UnderwaterQuarasCount = 42202, + GiantSpiderCount = 42203, + WerewolveCount = 42204, + NightmareCount = 42205, + HellspawnCount = 42206, + HighClassLizardCount = 42207, + StamporCount = 42208, + BrimstoneBugCount = 42209, + MutatedBatCount = 42210, + HydraCount = 42211, + SerpentSpawnCount = 42212, + MedusaCount = 42213, + BehemothCount = 42214, + SeaSerpentsCount = 42215, + HellhoundCount = 42216, + GhastlyDragonCount = 42217, + DrakenCount = 42218, + DestroyerCount = 42219, + UndeadDragonCount = 42220, + DemonCount = 42221, -- Others - GreenDjinnCount = 42193, - BlueDjinnCount = 42194, - PirateCount = 42195, - MinotaurCount = 42196, - NecromancerCount = 42197, - TrollCount = 42198, - GoblinCount = 42199, - RotwormCount = 42200, - CyclopsCount = 42201, + GreenDjinnCount = 42222, + BlueDjinnCount = 42223, + PirateCount = 42224, + MinotaurCount = 42225, + NecromancerCount = 42226, + TrollCount = 42227, + GoblinCount = 42228, + RotwormCount = 42229, + CyclopsCount = 42230, }, BossKillCount = { -- Grizzly Adams @@ -2196,7 +2130,7 @@ Storage = { CyclopsSmithCount = 42502, }, }, - LoneMedusa = {}, + LoneMedusa = 42503, PilgrimageOfAshes = {}, ShadowsOfYalahar = {}, TheIsleOfEvil = {}, @@ -2209,8 +2143,31 @@ Storage = { Questline = 42551, QuestDoor = 42552, }, -- 42551 - 42600 - ChildrenOfTheRevolution = {}, -- 42601 - 42650 - SeaOfLight = {}, -- 42651 - 42700 + ChildrenOfTheRevolution = { + Questline = 42601, + Mission00 = 42602, -- Prove Your Worzz! + Mission01 = 42603, + Mission02 = 42604, + Mission03 = 42605, + Mission04 = 42606, + Mission05 = 42607, + SpyBuilding01 = 42608, + SpyBuilding02 = 42609, + SpyBuilding03 = 42610, + StrangeSymbols = 42611, + teleportAccess = 42612, + ChestTomeOfKnowledge1 = 42613, + FlaskOfExtraGreasyOil = 42614, + ChestTomeOfKnowledge2 = 42615, + }, + SeaOfLight = { + Questline = 42616, + Mission1 = 42617, + Mission2 = 42618, + Mission3 = 42619, + StudyTimer = 42620, + LostMinesCrystal = 42621, + }, TheNewFrontier = { -- 42701 - 42750 Questline = 42701, FarmineFirstTravel = 42702, @@ -2261,6 +2218,8 @@ Storage = { ZaoPalaceDoors = 42730, -- 10th Tome: Zao Palace SnakeHeadTeleport = 42731, -- 7th Tome: Snake Head Teleport CorruptionHole = 42732, -- 8th Tome: Corruption Hole + ChestTomeOfKnowledge1 = 42733, + ChestTomeOfKnowledge2 = 42734, }, TomesOfKnowledge = { OrcCamp = 42751, @@ -2275,16 +2234,76 @@ Storage = { CobraHead = 42760, OrcRaid = 42761, ZaoPalace = 42762, - }, - UnnaturalSelection = {}, -- 42781 - 42830 - WarmasterOutfits = {}, -- 42831 - 42840 + ChestTomeOfKnowledge1 = 42763, + ChestTomeOfKnowledge2 = 42764, + ChestTomeOfKnowledge3 = 42765, + ChestTomeOfKnowledge4 = 42766, + }, + UnnaturalSelection = { + Questline = 42781, + Mission01 = 42782, + Mission02 = 42783, + Mission03 = 42784, + Mission04 = 42785, + Mission05 = 42786, + Mission06 = 42787, + DanceStatus = 42788, + }, -- 42781 - 42830 }, U8_6 = { -- update 8.6 - Reserved Storages 42951 - 43200 AFathersBurden = {}, - AnInterestInBotany = {}, TheSpiritWillGetYou = {}, WayfarerOutfits = {}, - WrathOfTheEmperor = {}, + WrathOfTheEmperor = { + Questline = 43000, + Mission01 = 43001, + Mission02 = 43002, + Mission03 = 43003, + Mission04 = 43004, + Mission05 = 43005, + Mission06 = 43006, + Mission07 = 43007, + Mission08 = 43008, + Mission09 = 43009, + Mission10 = 43010, + Mission11 = 43011, + Mission12 = 43012, + Message = 43013, --1068 + GuardcaughtYou = 43014, --1062 + ZumtahStatus = 43015, --1066 + PrisonReleaseStatus = 43017, --1067 + GhostOfAPriest01 = 43018, --1070 + GhostOfAPriest02 = 43019, --1071 + GhostOfAPriest03 = 43020, --1072 + InterdimensionalPotion = 43021, --1084 + BossStatus = 43022, --1090 + -- unused platinumReward = 43023, + -- unused backpackReward = 43024, + MainReward = 43025, + TeleportAccess = { + Rebel = 43026, + Zlak = 43027, + Zizzle = 43028, + SleepingDragon = 43029, + InnerSanctum = 43030, + AwarnessEmperor = 43031, + Wote10 = 43032, + BossRoom = 43033, + }, + Chest100PlatinumCoins = 43034, + ChestBag = 43035, + ChestItems = 43036, + Light01 = 43037, + Light02 = 43038, + Light03 = 43039, + Light04 = 43040, + Bosses = { + Fury = 43041, + Wrath = 43042, + Scorn = 43043, + Spite = 43044, + }, + }, }, U8_61 = { -- update 8.61 - Reserved Storages 43201 - 43230 RiseOfDevovorga = {}, @@ -2295,11 +2314,25 @@ Storage = { AnnualAutumnVintage = {}, Bewitched = {}, DemonsLullaby = {}, - JackToTheFuture = {}, LastCreepStanding = {}, ResearchAndDevelopment = {}, - RottinWoodAndTheMarriedMen = {}, - Spirithunters = {}, + RottinWoodAndTheMarriedMen = { + Questline = 43231, + RottinStart = 43232, + Trap = 43233, + Corpse = 43234, + Time = 43235, + Mission03 = 43236, + FirstTime = 43237, + }, + SpiritHunters = { + Mission01 = 43238, + TombUse = 43239, + CharmUse = 43240, + NightstalkerUse = 43241, + SouleaterUse = 43242, + GhostUse = 43243, + }, TheColoursOfMagic = {}, }, U9_1 = { --update 9.1 - Reserved Storages 43351 - 43550 @@ -2806,12 +2839,6 @@ GlobalStorage = { AstralPowerCounter = 60095, AstralGlyph = 60096, }, - InServiceOfYalahar = { - -- Reserved storage from 60100 - 60109 - LastFight = 60100, - WarGolemsMachine1 = 60101, - WarGolemsMachine2 = 60102, - }, BigfootBurden = { -- Reserved storage from 60110 - 60119 Warzones = 60110, @@ -2822,31 +2849,6 @@ GlobalStorage = { }, Mouthpiece = 60114, }, - WrathOfTheEmperor = { - -- Reserved storage from 60120 - 60139 - Light01 = 60120, - Light02 = 60121, - Light03 = 60122, - Light04 = 60123, - Bosses = { - Fury = 60130, - Wrath = 60131, - Scorn = 60132, - Spite = 60133, - }, - }, - ElementalSphere = { - -- Reserved storage from 60140 - 60159 - BossRoom = 60140, - KnightBoss = 60141, - SorcererBoss = 60142, - PaladinBoss = 60143, - DruidBoss = 60144, - Machine1 = 60145, - Machine2 = 60146, - Machine3 = 60147, - Machine4 = 60148, - }, TheOrderOfTheLion = { -- Reserved storage from 60170 - 60171 Drume = { diff --git a/data-otservbr-global/lib/quests/svargrond_arena.lua b/data-otservbr-global/lib/quests/svargrond_arena.lua index 660426cb64b..e2c983bd4a0 100644 --- a/data-otservbr-global/lib/quests/svargrond_arena.lua +++ b/data-otservbr-global/lib/quests/svargrond_arena.lua @@ -119,7 +119,7 @@ ARENA = { [1] = { name = "Greenhorn", price = 1000, - questLog = Storage.SvargrondArena.QuestLogGreenhorn, + questLog = Storage.Quest.U8_0.BarbarianArena.QuestLogGreenhorn, achievement = "Greenhorn", creatures = { [1] = "frostfur", @@ -137,7 +137,7 @@ ARENA = { [2] = { name = "Scrapper", price = 5000, - questLog = Storage.SvargrondArena.QuestLogScrapper, + questLog = Storage.Quest.U8_0.BarbarianArena.QuestLogScrapper, achievement = "Scrapper", creatures = { [1] = "avalanche", @@ -155,7 +155,7 @@ ARENA = { [3] = { name = "Warlord", price = 10000, - questLog = Storage.SvargrondArena.QuestLogWarlord, + questLog = Storage.Quest.U8_0.BarbarianArena.QuestLogWarlord, achievement = "Warlord of Svargrond", creatures = { [1] = "webster", @@ -175,17 +175,17 @@ ARENA = { ARENA_TROPHY = { [3264] = { trophy = 5807, - trophyStorage = Storage.SvargrondArena.TrophyGreenhorn, + trophyStorage = Storage.Quest.U8_0.BarbarianArena.TrophyGreenhorn, desc = "It is given to the courageous victor of the barbarian arena in greenhorn difficulty. Awarded to %s", }, [3265] = { trophy = 5806, - trophyStorage = Storage.SvargrondArena.TrophyScrapper, + trophyStorage = Storage.Quest.U8_0.BarbarianArena.TrophyScrapper, desc = "It is given to the courageous victor of the barbarian arena in scrapper difficulty. Awarded to %s.", }, [3266] = { trophy = 5805, - trophyStorage = Storage.SvargrondArena.TrophyWarlord, + trophyStorage = Storage.Quest.U8_0.BarbarianArena.TrophyWarlord, desc = "It is given to the courageous victor of the barbarian arena in warlord difficulty. Awarded to %s.", }, } @@ -263,10 +263,10 @@ function SvargrondArena.kickPlayer(cid, hideMessage) return end - if player:getStorageValue(Storage.SvargrondArena.PitDoor) > 0 then + if player:getStorageValue(Storage.Quest.U8_0.BarbarianArena.PitDoor) > 0 then player:teleportTo(SvargrondArena.kickPosition) SvargrondArena.kickPosition:sendMagicEffect(CONST_ME_TELEPORT) - player:setStorageValue(Storage.SvargrondArena.PitDoor, 0) + player:setStorageValue(Storage.Quest.U8_0.BarbarianArena.PitDoor, 0) if not hideMessage then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your time ran out!") end diff --git a/data-otservbr-global/monster/humanoids/goblin_leader.lua b/data-otservbr-global/monster/humanoids/goblin_leader.lua index 0f6f5d62a44..a442d25574b 100644 --- a/data-otservbr-global/monster/humanoids/goblin_leader.lua +++ b/data-otservbr-global/monster/humanoids/goblin_leader.lua @@ -42,6 +42,10 @@ monster.strategiesTarget = { nearest = 100, } +monster.events = { + "GoblinLeaderDeath", +} + monster.flags = { summonable = true, attackable = true, diff --git a/data-otservbr-global/monster/quests/rottin_wood_and_the_married_men_quest/travelling_merchant.lua b/data-otservbr-global/monster/quests/rottin_wood_and_the_married_men_quest/travelling_merchant.lua new file mode 100644 index 00000000000..aafe9482199 --- /dev/null +++ b/data-otservbr-global/monster/quests/rottin_wood_and_the_married_men_quest/travelling_merchant.lua @@ -0,0 +1,95 @@ +local mType = Game.createMonsterType("Travelling Merchant") +local monster = {} + +monster.description = "a travelling merchant" +monster.experience = 0 +monster.outfit = { + lookType = 132, + lookHead = 112, + lookBody = 109, + lookLegs = 109, + lookFeet = 95, + lookAddons = 0, + lookMount = 0, +} + +monster.health = 110 +monster.maxHealth = 110 +monster.race = "blood" +monster.corpse = 18042 +monster.speed = 86 +monster.manaCost = 390 + +monster.changeTarget = { + interval = 4000, + chance = 10, +} + +monster.strategiesTarget = { + nearest = 100, +} + +monster.flags = { + summonable = true, + attackable = true, + hostile = true, + convinceable = true, + pushable = true, + rewardBoss = false, + illusionable = true, + canPushItems = true, + canPushCreatures = false, + staticAttackChance = 90, + targetDistance = 4, + runHealth = 0, + healthHidden = false, + isBlockable = false, + canWalkOnEnergy = false, + canWalkOnFire = false, + canWalkOnPoison = false, +} + +monster.light = { + level = 0, + color = 0, +} + +monster.voices = { + interval = 5000, + chance = 10, +} + +monster.loot = {} + +monster.attacks = { + { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -45 }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -40, range = 5, shootEffect = CONST_ANI_THROWINGKNIFE, target = false }, +} + +monster.defenses = { + defense = 10, + armor = 10, + mitigation = 0.28, +} + +monster.elements = { + { type = COMBAT_PHYSICALDAMAGE, percent = -5 }, + { type = COMBAT_ENERGYDAMAGE, percent = 0 }, + { type = COMBAT_EARTHDAMAGE, percent = 0 }, + { type = COMBAT_FIREDAMAGE, percent = 0 }, + { type = COMBAT_LIFEDRAIN, percent = 0 }, + { type = COMBAT_MANADRAIN, percent = 0 }, + { type = COMBAT_DROWNDAMAGE, percent = 0 }, + { type = COMBAT_ICEDAMAGE, percent = 0 }, + { type = COMBAT_HOLYDAMAGE, percent = 0 }, + { type = COMBAT_DEATHDAMAGE, percent = -5 }, +} + +monster.immunities = { + { type = "paralyze", condition = false }, + { type = "outfit", condition = false }, + { type = "invisible", condition = false }, + { type = "bleed", condition = false }, +} + +mType:register(monster) diff --git a/data-otservbr-global/npc/a_restless_soul.lua b/data-otservbr-global/npc/a_restless_soul.lua index e6535b38f99..89b0696fcfe 100644 --- a/data-otservbr-global/npc/a_restless_soul.lua +++ b/data-otservbr-global/npc/a_restless_soul.lua @@ -49,10 +49,10 @@ local function greetCallback(npc, creature) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.TheIceIslands.Questline) < 37 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) < 37 then npcHandler:setMessage(MESSAGE_GREET, "Uhhhh...") return false - elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 37 then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 37 then npcHandler:setMessage(MESSAGE_GREET, "Ahhhh! At last someone that can listen to my {story}!") end return true @@ -68,17 +68,18 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "story") then local player = Player(creature) - if player:getStorageValue(Storage.TheIceIslands.Questline) == 37 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 37 then npcHandler:say({ "I was captured and tortured to death by the cultists here. They worship a being that they call Ghazbaran ...", "In his name they have claimed the mines and started to melt the ice to free an army of vile demons that have been frozen here for ages ...", "Their plan is to create a new demon army for their master to conquer the world. Hjaern and the other shamans must learn about it! Hurry before its too late.", }, npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 38) - player:setStorageValue(Storage.TheIceIslands.Mission10, 2) -- Questlog The Ice Islands Quest, Formorgar Mines 2: Ghostwhisperer - player:setStorageValue(Storage.TheIceIslands.Mission11, 1) -- Questlog The Ice Islands Quest, Formorgar Mines 3: The Secret + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 38) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission10, 2) -- Questlog The Ice Islands Quest, Formorgar Mines 2: Ghostwhisperer + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission11, 1) -- Questlog The Ice Islands Quest, Formorgar Mines 3: The Secret end end + return true end diff --git a/data-otservbr-global/npc/a_sleeping_dragon.lua b/data-otservbr-global/npc/a_sleeping_dragon.lua index 698533ebf1a..89f98bf9da8 100644 --- a/data-otservbr-global/npc/a_sleeping_dragon.lua +++ b/data-otservbr-global/npc/a_sleeping_dragon.lua @@ -47,7 +47,7 @@ end local function greetCallback(npc, creature) local playerId = creature:getId() - if Player(creature):getStorageValue(Storage.WrathoftheEmperor.Questline) == 27 then + if Player(creature):getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 27 then npcHandler:setMessage(MESSAGE_GREET, "ZzzzZzzZz...chrrr...") else npcHandler:setMessage(MESSAGE_GREET, "Greetings, {wayfarer}.") @@ -63,8 +63,8 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 27 then - if (message == "SOLOSARASATIQUARIUM") and player:getStorageValue(Storage.WrathoftheEmperor.InterdimensionalPotion) == 1 then + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 27 then + if (message == "SOLOSARASATIQUARIUM") and player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.InterdimensionalPotion) == 1 then npcHandler:say({ "Dragon dreams are golden. ...", "A broad darkness surrounds you as if a heavy curtain is closing before your eyes. After what seems like minutes of floating through emptiness, you get the feeling as if a hole opens in the dark before you. ...", @@ -123,25 +123,21 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("You head north passing countless stones in the crimson sea of stones beneath your feet.", npc, creature) npcHandler:setTopic(playerId, 14) elseif message:lower() == "use attachment" and npcHandler:getTopic(playerId) == 14 then + npcHandler:say("Avoiding the bright light, you carefully put the attachment on top of the strange socket. ...", npc, creature) + npcHandler:setTopic(playerId, 15) + elseif message:lower() == "take mirror" and npcHandler:getTopic(playerId) == 15 then npcHandler:say({ - "Avoiding the bright light, you carefully put the attachment on top of the strange socket. ...", "As your eyes adjust to the sudden reduction of brightness, you see the giant wings of the gate before you move to the side. You can also make out something shiny on the ground.", + "You pick the mirror from the ground.", }, npc, creature) - npcHandler:setTopic(playerId, 15) - elseif message:lower() == "take mirror" and npcHandler:getTopic(playerId) == 15 then - npcHandler:say("You pick the mirror from the ground.", npc, creature) npcHandler:setTopic(playerId, 16) elseif message:lower() == "north" and npcHandler:getTopic(playerId) == 16 then - npcHandler:say({ - "Your path to the north is open. You pass the gigantic gate wings to your left and right as you advance. After about an hour of travel you hear a slight rustling in the distance. You head further into that direction. ...", - "The rustling gets louder until you come to a small dune. Behind it you find the source of the noise.", - }, npc, creature) + npcHandler:say("Your path to the north is open. You pass the gigantic gate wings to your left and right as you advance. After about an hour of travel you hear a slight rustling in the distance. You head further into that direction. ...", npc, creature) npcHandler:setTopic(playerId, 17) elseif message:lower() == "use model" and npcHandler:getTopic(playerId) == 17 then npcHandler:say({ "You lunge out and throw the model far into the water. As nothing happens, you turn your back to the ocean. ...", "The very moment you walk down the dune to head back south, rays of light burst over your head in a shock wave that makes you tumble down the rest of the hill. ...", - "You can also hear a deep loud scraping for several minutes somewhere far in the west.", }, npc, creature) npcHandler:setTopic(playerId, 18) elseif message:lower() == "south" and npcHandler:getTopic(playerId) == 18 then @@ -162,34 +158,31 @@ local function creatureSayCallback(npc, creature, type, message) elseif message:lower() == "west" and npcHandler:getTopic(playerId) == 23 then npcHandler:say("You leave the massive open gate behind you and go to the west. ", npc, creature) npcHandler:setTopic(playerId, 24) - elseif message:lower() == "bastesh" and npcHandler:getTopic(playerId) == 24 then - npcHandler:say("This huge statue of Bastesh is made from onyx, and thrones on a large plateau which can be reached by a sprawling stairway. She holds a large {sapphire} in her hands. ", npc, creature) + elseif message:lower() == "take sapphire" and npcHandler:getTopic(playerId) == 24 then + npcHandler:say("You carefully remove the sapphire from Bastesh's grasp.", npc, creature) npcHandler:setTopic(playerId, 25) - elseif message:lower() == "take sapphire" and npcHandler:getTopic(playerId) == 25 then - npcHandler:say("You carefully remove the sapphire from Bastesh's grasp. ", npc, creature) + elseif message:lower() == "east" and npcHandler:getTopic(playerId) == 25 then + npcHandler:say("You head back to the east and to the plateau.", npc, creature) npcHandler:setTopic(playerId, 26) - elseif message:lower() == "east" and npcHandler:getTopic(playerId) == 26 then - npcHandler:say("You head back to the east and to the plateau. ", npc, creature) + elseif message:lower() == "south" and npcHandler:getTopic(playerId) == 26 then + npcHandler:say("You head back south to the site with the onyx lookout.", npc, creature) npcHandler:setTopic(playerId, 27) - elseif message:lower() == "south" and npcHandler:getTopic(playerId) == 27 then - npcHandler:say("You head back south to the site with the onyx lookout. ", npc, creature) + elseif message:lower() == "east" and npcHandler:getTopic(playerId) == 27 then + npcHandler:say("You return to the plateau in the east.", npc, creature) npcHandler:setTopic(playerId, 28) - elseif message:lower() == "east" and npcHandler:getTopic(playerId) == 28 then - npcHandler:say("You return to the plateau in the east. ", npc, creature) + elseif message:lower() == "use stand" and npcHandler:getTopic(playerId) == 28 then + npcHandler:say("You put the stand into a small recess you find near the middle of the plateau.", npc, creature) npcHandler:setTopic(playerId, 29) - elseif message:lower() == "use stand" and npcHandler:getTopic(playerId) == 29 then - npcHandler:say("You put the stand into a small recess you find near the middle of the plateau. ", npc, creature) + elseif message:lower() == "use ruby" and npcHandler:getTopic(playerId) == 29 then + npcHandler:say("As the ruby slips into the notch, the strong red of the stone intensifies a thousandfold. You fear to hurt your eyes and turn away immediately. The ray seems to be directed to the centre of the plateau with astounding precision.", npc, creature) npcHandler:setTopic(playerId, 30) - elseif message:lower() == "use ruby" and npcHandler:getTopic(playerId) == 30 then - npcHandler:say("As the ruby slips into the notch, the strong red of the stone intensifies a thousandfold. You fear to hurt your eyes and turn away immediately. The ray seems to be directed to the centre of the plateau with astounding precision. ", npc, creature) + elseif message:lower() == "use sapphire" and npcHandler:getTopic(playerId) == 30 then + npcHandler:say("As the sapphire slips into the notch, the deep blue of the stone intensifies a thousandfold. You fear to hurt your eyes and turn away immediately. The ray seems to be directed to the centre of the plateau with astounding precision.", npc, creature) npcHandler:setTopic(playerId, 31) - elseif message:lower() == "use sapphire" and npcHandler:getTopic(playerId) == 31 then - npcHandler:say("As the sapphire slips into the notch, the deep blue of the stone intensifies a thousandfold. You fear to hurt your eyes and turn away immediately. The ray seems to be directed to the centre of the plateau with astounding precision. ", npc, creature) + elseif message:lower() == "use emerald" and npcHandler:getTopic(playerId) == 31 then + npcHandler:say("As the emerald slips into the notch, the vibrant green of the stone intensifies a thousandfold. You fear to hurt your eyes and turn away immediately. The ray seems to be directed to the centre of the plateau with astounding precision.", npc, creature) npcHandler:setTopic(playerId, 32) - elseif message:lower() == "use emerald" and npcHandler:getTopic(playerId) == 32 then - npcHandler:say("As the emerald slips into the notch, the vibrant green of the stone intensifies a thousandfold. You fear to hurt your eyes and turn away immediately. The ray seems to be directed to the centre of the plateau with astounding precision. ", npc, creature) - npcHandler:setTopic(playerId, 33) - elseif message:lower() == "use mirror" and npcHandler:getTopic(playerId) == 33 then + elseif message:lower() == "use mirror" and npcHandler:getTopic(playerId) == 32 then npcHandler:say({ "With your eyes covered and avoiding direct sight of the rays, you put the mirror into the stand. ...", "Instinctively you run to a larger emerald bluff near the raise to find cover. Mere seconds after you claimed the sturdy shelter, a deep dark humming starts to swirl through the air. ...", @@ -200,11 +193,11 @@ local function creatureSayCallback(npc, creature, type, message) "The growl transforms into a scream, everything around you seems to compress. As you press yourself tightly against the bluff, everything falls silent and in a split second, the dark being dissolves into bursts of blackness. You wake.", }, npc, creature) player:addAchievement("Wayfarer") - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 28) - player:setStorageValue(Storage.WrathoftheEmperor.Mission09, 2) --Questlog, Wrath of the Emperor "Mission 09: The Sleeping Dragon" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 28) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission09, 2) --Questlog, Wrath of the Emperor "Mission 09: The Sleeping Dragon" npcHandler:setTopic(playerId, 0) end - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 28 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 28 then if MsgContains(message, "wayfarer") then npcHandler:say("I call you the wayfarer. You travelled through my dreams. You ultimately freed my mind. My mind accepted you and so will I.", npc, creature) elseif MsgContains(message, "mission") then @@ -223,8 +216,8 @@ local function creatureSayCallback(npc, creature, type, message) "The transfer was successful. ...", "You are now prepared to enter the realm of the evildoer. I am grateful for your help, wayfarer. Should you seek my council, use this charm I cede to you. For my spirit will guide you wherever you are. May you enjoy a sheltered future, you shall prevail.", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 29) - player:setStorageValue(Storage.WrathoftheEmperor.Mission10, 1) --Questlog, Wrath of the Emperor "Mission 10: A Message of Freedom" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 29) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission10, 1) --Questlog, Wrath of the Emperor "Mission 10: A Message of Freedom" player:addItem(10343, 1) npcHandler:setTopic(playerId, 0) end diff --git a/data-otservbr-global/npc/a_starving_dog.lua b/data-otservbr-global/npc/a_starving_dog.lua index 246c7dc4e75..52957464476 100644 --- a/data-otservbr-global/npc/a_starving_dog.lua +++ b/data-otservbr-global/npc/a_starving_dog.lua @@ -56,9 +56,9 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "meat") then if player:removeItem(3577, 1) then npcHandler:say("", npc, creature) - if player:getStorageValue(Storage.TheIceIslands.Mission01) == 1 then - player:setStorageValue(Storage.TheIceIslands.Questline, 2) - player:setStorageValue(Storage.TheIceIslands.Mission01, 2) -- Questlog The Ice Islands Quest, Befriending the Musher + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission01) == 1 then + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 2) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission01, 2) -- Questlog The Ice Islands Quest, Befriending the Musher end npcHandler:removeInteraction(npc, creature) end diff --git a/data-otservbr-global/npc/ahmet.lua b/data-otservbr-global/npc/ahmet.lua index 3cb712f088e..b9d8ecc914b 100644 --- a/data-otservbr-global/npc/ahmet.lua +++ b/data-otservbr-global/npc/ahmet.lua @@ -49,6 +49,7 @@ npcConfig.shop = { -- Sellable items { itemName = "shovel", clientId = 3457, buy = 10, sell = 8 }, { itemName = "torch", clientId = 2920, buy = 2 }, { itemName = "vial of oil", clientId = 2874, buy = 20, count = 7 }, + { itemName = "vial of water", clientId = 2874, buy = 40, count = 1 }, { itemName = "watch", clientId = 2906, buy = 20, sell = 6 }, { itemName = "waterskin of water", clientId = 2901, buy = 40, count = 1 }, { itemName = "wooden hammer", clientId = 3459, sell = 15 }, @@ -103,13 +104,13 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "documents") then - if player:getStorageValue(Storage.ThievesGuild.Mission04) == 2 then - player:setStorageValue(Storage.ThievesGuild.Mission04, 3) + if player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission04) == 2 then + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission04, 3) npcHandler:say({ "You need some forged documents? But I will only forge something for a friend. ...", "The nomads at the northern oasis killed someone dear to me. Go and kill at least one of them, then we talk about your document.", }, npc, creature) - elseif player:getStorageValue(Storage.ThievesGuild.Mission04) == 4 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.RewardOasis) == 1 then npcHandler:say("The slayer of my enemies is my friend! For a mere 1000 gold I will create the documents you need. Are you interested?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -131,7 +132,7 @@ local function creatureSayCallback(npc, creature, type, message) if npcHandler:getTopic(playerId) == 1 then if player:removeMoneyBank(1000) then player:addItem(7866, 1) - player:setStorageValue(Storage.ThievesGuild.Mission04, 5) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission04, 5) npcHandler:say("And here they are! Now forget where you got them from.", npc, creature) else npcHandler:say("You don't have enough money.", npc, creature) @@ -177,6 +178,8 @@ local function creatureSayCallback(npc, creature, type, message) return true end +npcHandler:setMessage(MESSAGE_GREET, "Be mourned pilgrim in flesh. I'm selling general goods.") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/amanda.lua b/data-otservbr-global/npc/amanda.lua index 12c011481c0..1b4630cfcee 100644 --- a/data-otservbr-global/npc/amanda.lua +++ b/data-otservbr-global/npc/amanda.lua @@ -68,7 +68,8 @@ local function addMissionKeyword(text, value, newValue, addItem) end if addItem then - player:addItem(892, 1) + player:addItem(268, 5) + player:addItem(266, 5) end end) end diff --git a/data-otservbr-global/npc/angus.lua b/data-otservbr-global/npc/angus.lua index 46579692d26..30e4e087ff6 100644 --- a/data-otservbr-global/npc/angus.lua +++ b/data-otservbr-global/npc/angus.lua @@ -77,14 +77,17 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "bluff") and player:getStorageValue(TheNewFrontier.Mission05.AngusKeyword) == 1 and player:getStorageValue(TheNewFrontier.Questline) == 14 and player:getStorageValue(TheNewFrontier.Mission05.Angus) == 1 then if npcHandler:getTopic(playerId) == 1 or npcHandler:getTopic(playerId) == 2 then if player:getStorageValue(TheNewFrontier.Mission05.Angus) == 1 then - npcHandler:say({ "Those stories are just amazing! Men with faces on their stomach instead of heads you say? And hens that lay golden eggs? Whereas, most amazing is this fountain of youth you've mentioned! ...", "I'll immediately send some of our most dedicated explorers to check those things out!" }, npc, creature) + npcHandler:say({ + "Those stories are just amazing! Men with faces on their stomach instead of heads you say? And hens that lay golden eggs? Whereas, most amazing is this fountain of youth you've mentioned! ...", + "I'll immediately send some of our most dedicated explorers to check those things out!", + }, npc, creature) player:setStorageValue(TheNewFrontier.Mission05.Angus, 3) end end elseif MsgContains(message, "impress") and player:getStorageValue(TheNewFrontier.Mission05.AngusKeyword) == 2 and player:getStorageValue(TheNewFrontier.Questline) == 14 and player:getStorageValue(TheNewFrontier.Mission05.Angus) == 1 then if npcHandler:getTopic(playerId) == 1 then if player:getStorageValue(TheNewFrontier.Mission05.Angus) == 1 then - npcHandler:say({ "A whole new land is indeed very tempting. I can hardly imagine all the wonders that await us there. I doubt I could stop our explorers from going there even if I tried to." }, npc, creature) + npcHandler:say("A whole new land is indeed very tempting. I can hardly imagine all the wonders that await us there. I doubt I could stop our explorers from going there even if I tried to.", npc, creature) player:setStorageValue(TheNewFrontier.Mission05.Angus, 3) end elseif npcHandler:getTopic(playerId) == 2 then diff --git a/data-otservbr-global/npc/ariella.lua b/data-otservbr-global/npc/ariella.lua index b9565a9b28f..483e50515ea 100644 --- a/data-otservbr-global/npc/ariella.lua +++ b/data-otservbr-global/npc/ariella.lua @@ -65,7 +65,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "cookie") then - if player:getStorageValue(Storage.WhatAFoolish.Questline) == 31 and player:getStorageValue(Storage.WhatAFoolish.CookieDelivery.Ariella) ~= 1 then + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline) == 31 and player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.Ariella) ~= 1 then npcHandler:say("So you brought a cookie to a pirate?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -100,7 +100,7 @@ local function creatureSayCallback(npc, creature, type, message) return true end - player:setStorageValue(Storage.WhatAFoolish.CookieDelivery.Ariella, 1) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.Ariella, 1) if player:getCookiesDelivered() == 10 then player:addAchievement("Allow Cookies?") end diff --git a/data-otservbr-global/npc/arito.lua b/data-otservbr-global/npc/arito.lua index a885cc91e20..caa33f8348f 100644 --- a/data-otservbr-global/npc/arito.lua +++ b/data-otservbr-global/npc/arito.lua @@ -50,6 +50,16 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function greetCallback(npc, player) + if player:getStorageValue(Storage.TibiaTales.AritosTask) == 2 then + npcHandler:setMessage(MESSAGE_GREET, "Thank god you are back!! Did you find....err...what we were talking about??") + else + npcHandler:setMessage(MESSAGE_GREET, "Be mourned, pilgrim in flesh. Be mourned in my tavern.") + end + + return true +end + local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() @@ -59,27 +69,43 @@ local function creatureSayCallback(npc, creature, type, message) end local AritosTask = player:getStorageValue(Storage.TibiaTales.AritosTask) - -- START TASK + + -- Check if the message contains "nomads" if MsgContains(message, "nomads") then - if player:getStorageValue(Storage.TibiaTales.AritosTask) <= 0 and player:getItemCount(7533) >= 0 then + if AritosTask <= 0 and player:getItemCount(7533) > 0 then npcHandler:say({ "What?? My name on a deathlist which you retrieved from a nomad?? Show me!! ...", - "Oh my god! They found me! You must help me! Please !!!!", + "Oh my god! They found me! You must help me! Please !!!! Are you willing to do that?", + }, npc, creature) + npcHandler:setTopic(playerId, 1) + end + -- Check if the message contains "yes" + elseif MsgContains(message, "yes") then + local topic = npcHandler:getTopic(playerId) + if topic == 1 then + npcHandler:say({ + "Thank you thousand times! Well, I think I start telling you what I think they are after...", + "You have to know, I was one of them before I opened that shop here. Sure they fear about their hideout being revealed by me. Please go to the north, there is a small cave in the mountains with a rock in the middle. ...", + "If you stand in front of it, place a scimitar - which is the weapon of the nomads - left of you and make a sacrifice to the earth by pouring some water on the floor to your right. ...", + "The entrance to their hideout will be revealed in front of you. I don't know who is in charge there right now but please tell him that I won't spoil their secret...", + "... well, I just told you but anyway .... I won't tell it to anybody else. Now hurry up before they get here!!", }, npc, creature) if player:getStorageValue(Storage.TibiaTales.DefaultStart) <= 0 then player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) end player:setStorageValue(Storage.TibiaTales.AritosTask, 1) - -- END TASK - elseif player:getStorageValue(Storage.TibiaTales.AritosTask) == 2 then - npcHandler:say({ - "These are great news!! Thank you for your help! I don't have much, but without you I wouldn't have anything so please take this as a reward.", - }, npc, creature) - player:setStorageValue(Storage.TibiaTales.AritosTask, 3) - player:addItem(3035, 50) + elseif AritosTask == 2 then + npcHandler:say("And what did they say?? Do I have to give up everything here? Come on tell me!!", npc, creature) + npcHandler:setTopic(playerId, 2) end - return true + -- Check if the message contains "Acquitted" and topic is 2 + elseif MsgContains(message, "Acquitted") and npcHandler:getTopic(playerId) == 2 then + npcHandler:say("These are great news!! Thank you for your help! I don't have much, but without you I wouldn't have anything so please take this as a reward.", npc, creature) + player:setStorageValue(Storage.TibiaTales.AritosTask, 3) + player:addItem(3035, 100) end + + return true end npcConfig.voices = { @@ -88,11 +114,13 @@ npcConfig.voices = { { text = "Come in, have a drink and something to eat." }, } -npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) -npcHandler:setMessage(MESSAGE_GREET, "Be mourned, pilgrim in flesh. Be mourned in my tavern.") npcHandler:setMessage(MESSAGE_FAREWELL, "Do visit us again.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Do visit us again.") npcHandler:setMessage(MESSAGE_SENDTRADE, "Sure, browse through my offers.") + +npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) +npcHandler:setCallback(CALLBACK_GREET, greetCallback) + npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) npcConfig.shop = { @@ -106,6 +134,9 @@ npcConfig.shop = { { itemName = "mug of lemonade", clientId = 2880, buy = 2, count = 12 }, { itemName = "mug of water", clientId = 2880, buy = 1, count = 1 }, { itemName = "mug of wine", clientId = 2880, buy = 3, count = 2 }, + { itemName = "vial of beer", clientId = 2874, buy = 2, count = 1, subType = 3 }, + { itemName = "vial of wine", clientId = 2874, buy = 3, count = 1, subType = 2 }, + { itemName = "vial of water", clientId = 2874, buy = 1, count = 1 }, } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/arkulius.lua b/data-otservbr-global/npc/arkulius.lua index 64abb564d17..49b0e9f618c 100644 --- a/data-otservbr-global/npc/arkulius.lua +++ b/data-otservbr-global/npc/arkulius.lua @@ -102,7 +102,7 @@ local function creatureSayCallback(npc, creature, type, message) }, npc, creature) npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "mission") or MsgContains(message, "quest") then - local value = player:getStorageValue(Storage.ElementalSphere.QuestLine) + local value = player:getStorageValue(Storage.Quest.U8_2.ElementalSpheres.QuestLine) if value < 1 then if player:getLevel() >= 80 then if player:isSorcerer() then @@ -142,7 +142,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 1) elseif value == 1 then if player:getItemCount(player:isSorcerer() and 946 or player:isDruid() and 947 or player:isPaladin() and 942 or player:isKnight() and 948) > 0 then - player:setStorageValue(Storage.ElementalSphere.QuestLine, 2) + player:setStorageValue(Storage.Quest.U8_2.ElementalSpheres.QuestLine, 2) npcHandler:say({ "Impressive!! Let me take a look.......Ahh, " .. ( @@ -159,14 +159,14 @@ local function creatureSayCallback(npc, creature, type, message) end npcHandler:setTopic(playerId, 0) elseif value == 2 then - if player:removeItem(954, 1) and player:getStorageValue(Storage.ElementalSphere.QuestLine) < 3 then + if player:removeItem(954, 1) and player:getStorageValue(Storage.Quest.U8_2.ElementalSpheres.QuestLine) < 3 then npcHandler:say("AMAZING!! I'm going to start immediately with the research. If it turns out the way I expect it, Alverus will be revived soon!! Here, take this as a reward and try to collect more of this substance. I'll make you a good offer, I promise. ", npc, creature) player:addItem(player:isSorcerer() and 8039 or player:isDruid() and 8041 or player:isPaladin() and 8025 or player:isKnight() and 8055, 1) - player:setStorageValue(Storage.ElementalSphere.QuestLine, 3) + player:setStorageValue(Storage.Quest.U8_2.ElementalSpheres.QuestLine, 3) end end elseif npcHandler:getTopic(playerId) == 1 and MsgContains(message, "yes") then - player:setStorageValue(Storage.ElementalSphere.QuestLine, 1) + player:setStorageValue(Storage.Quest.U8_2.ElementalSpheres.QuestLine, 1) npcHandler:say("Good, don't waste time! Come back here when you have the elemental object!", npc, creature) npcHandler:setTopic(playerId, 0) end diff --git a/data-otservbr-global/npc/armenius.lua b/data-otservbr-global/npc/armenius.lua index 045a53af2c8..8b24dc1d419 100644 --- a/data-otservbr-global/npc/armenius.lua +++ b/data-otservbr-global/npc/armenius.lua @@ -56,7 +56,7 @@ local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() if message == "cookie" then - if player:getStorageValue(BloodBrothers.Mission02) == 1 and player:getItemCount(8199) > 0 and player:getStorageValue(BloodBrothers.Cookies.Armenius) < 0 then + if player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission02) == 1 and player:getItemCount(8199) > 0 and player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Armenius) < 0 then npcHandler:say("What kind of strange offer is this? You're actually offering me a cookie?", npc, creature) npcHandler:setTopic(playerId, 1) else @@ -65,22 +65,18 @@ local function creatureSayCallback(npc, creature, type, message) elseif message == "yes" then if npcHandler:getTopic(playerId) == 1 and player:removeItem(8199, 1) then -- garlic cookie npcHandler:say("Errrkss - coughcough - what the - heck did you put in there? Get out of my sight!", npc, creature) - player:setStorageValue(BloodBrothers.Cookies.Armenius, 1) + player:setStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Armenius, 1) npcHandler:setTopic(playerId, 0) end - elseif message:lower() == "alori mort" and player:getStorageValue(BloodBrothers.Mission03) == 1 then + elseif message:lower() == "alori mort" and player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission03) == 1 then if npcHandler:getTopic(playerId) == 2 then local rand = math.random(2) - local randMessage = { "Oh, the nerve. Go to the rats which raised you.", "Oh, the nerve. Sod off." } - npcHandler:setMessage(MESSAGE_WALKAWAY, randMessage[rand]) + npcHandler:setMessage(MESSAGE_WALKAWAY, "Oh, the nerve. Go to the rats which raised you.") player:teleportTo(Position(32759, 31241, 9)) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - player:setStorageValue(BloodBrothers.Mission03, 2) + player:setStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission03, 2) else - npcHandler:say({ - "...... ...... ....", - "HAHAHAHAHA! What the... HAHAHAHA! Come on, say it again, just because it's so funny - and then I'll get rid of you, little mouse!", - }, npc, creature) + npcHandler:say("Oh, the nerve. Sod off.", npc, creature) npcHandler:setTopic(playerId, 2) end end @@ -101,6 +97,8 @@ npcConfig.shop = { { itemName = "mug of rum", clientId = 2880, buy = 10, count = 13 }, { itemName = "mug of wine", clientId = 2880, buy = 4, count = 2 }, { itemName = "tomato", clientId = 3596, buy = 3 }, + { itemName = "vial of beer", clientId = 2874, buy = 3, count = 1, subType = 3 }, + { itemName = "vial of wine", clientId = 2874, buy = 4, count = 1, subType = 2 }, } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/avar_tar.lua b/data-otservbr-global/npc/avar_tar.lua index 79d95f91862..5b8a291966d 100644 --- a/data-otservbr-global/npc/avar_tar.lua +++ b/data-otservbr-global/npc/avar_tar.lua @@ -64,7 +64,7 @@ local function creatureSayCallback(npc, creature, type, message) }, npc, creature) npcHandler:setTopic(playerId, 1) elseif MsgContains(message, "cookie") then - if player:getStorageValue(Storage.WhatAFoolish.Questline) == 31 and player:getStorageValue(Storage.WhatAFoolish.CookieDelivery.AvarTar) ~= 1 then + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline) == 31 and player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.AvarTar) ~= 1 then npcHandler:say("Do you really think you could bribe a hero like me with a meagre cookie?", npc, creature) npcHandler:setTopic(playerId, 3) end @@ -80,7 +80,7 @@ local function creatureSayCallback(npc, creature, type, message) return true end - player:setStorageValue(Storage.WhatAFoolish.CookieDelivery.AvarTar, 1) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.AvarTar, 1) if player:getCookiesDelivered() == 10 then player:addAchievement("Allow Cookies?") end @@ -119,11 +119,11 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 2) end elseif MsgContains(message, "helmet") then - if player:getStorageValue(Storage.Quest.U7_24.TheAnnihilator.Reward) == 2 and player:getStorageValue(Storage.DemonOak.Done) == 3 then + if player:getStorageValue(Storage.Quest.U7_24.TheAnnihilator.Reward) == 2 and player:getStorageValue(Storage.Quest.U8_2.TheDemonOak.Done) == 3 then player:addOutfitAddon(541, 2) player:addOutfitAddon(542, 2) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - player:setStorageValue(Storage.DemonOak.Done, 4) + player:setStorageValue(Storage.Quest.U8_2.TheDemonOak.Done, 4) npcHandler:say("Receive the helmet, |PLAYERNAME|.", npc, creature) else npcHandler:say("The helmet is for those who have hunted down all 6666 demons and finished the demon oak as well, |PLAYERNAME|.", npc, creature) diff --git a/data-otservbr-global/npc/awarness_of_the_emperor.lua b/data-otservbr-global/npc/awarness_of_the_emperor.lua index b8dd66675ca..ab8269493d3 100644 --- a/data-otservbr-global/npc/awarness_of_the_emperor.lua +++ b/data-otservbr-global/npc/awarness_of_the_emperor.lua @@ -46,7 +46,7 @@ npcType.onCloseChannel = function(npc, creature) end local function greetCallback(npc, creature) - if Player(creature):getStorageValue(Storage.WrathoftheEmperor.Questline) < 31 then + if Player(creature):getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) < 31 then npcHandler:setMessage(MESSAGE_GREET, "I am not here to fight you, fool. Like it or not, we will have to work together to stop the catastrophe you and that priest have initiated.") else npcHandler:setMessage(MESSAGE_GREET, "Greetings, mortal. Be aware that you are trying my patience while we are talking.") @@ -64,7 +64,7 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "mission") then local player = Player(creature) - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 30 and player:getStorageValue(Storage.WrathoftheEmperor.BossStatus) == 5 then + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 30 and player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.BossStatus) == 5 then npcHandler:say({ "The amplified force of the snake god is tearing the land apart. It is using my crystals in a reverse way to drain the vital force from the land and its inhabitants to fuel its power. ...", "I will withstand its influence as good as possible and slow this process. You will have to fight its worldly incarnation though. ...", @@ -74,7 +74,7 @@ local function creatureSayCallback(npc, creature, type, message) "Be prepared for the fight of your life! Are you ready?", }, npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 32 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 32 then npcHandler:say({ "So you have mastered the crisis you invoked with your foolishness. I should crush you for your involvement right here and now. ...", "But such an act would bring me down to your own barbaric level and only fuel the corruption that destroys the land that I own. Therefore I will not only spare your miserable life but show your the generosity of the dragon emperor. ...", @@ -82,19 +82,18 @@ local function creatureSayCallback(npc, creature, type, message) "I grant you three chests - filled to the lid with platinum coins, a house in the city in which you may reside, a set of the finest armor Zao has to offer, and a casket of never-ending mana. ...", "Speak with magistrate Izsh in the ministry about your reward. And now leave before I change my mind!", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.TeleportAccess.SleepingDragon, 2) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 33) - player:setStorageValue(Storage.WrathoftheEmperor.Mission12, 0) --Questlog, Wrath of the Emperor "Mission 12: Just Rewards" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.SleepingDragon, 2) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 33) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then local player = Player(creature) player:teleportTo(Position(33360, 31397, 9)) - player:setStorageValue(Storage.WrathoftheEmperor.TeleportAccess.AwarnessEmperor, 1) - player:setStorageValue(Storage.WrathoftheEmperor.TeleportAccess.Wote10, 1) - player:setStorageValue(Storage.WrathoftheEmperor.TeleportAccess.BossRoom, 1) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 31) - player:setStorageValue(Storage.WrathoftheEmperor.Mission11, 1) --Questlog, Wrath of the Emperor "Mission 11: Payback Time" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.AwarnessEmperor, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Wote10, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.BossRoom, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 31) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission11, 1) --Questlog, Wrath of the Emperor "Mission 11: Payback Time" npcHandler:say("So be it!", npc, creature) npcHandler:setTopic(playerId, 0) end diff --git a/data-otservbr-global/npc/barry.lua b/data-otservbr-global/npc/barry.lua index a017418d571..63249dae3dc 100644 --- a/data-otservbr-global/npc/barry.lua +++ b/data-otservbr-global/npc/barry.lua @@ -60,10 +60,10 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "report") then local player = Player(creature) - if table.contains({ 9, 11 }, player:getStorageValue(Storage.InServiceofYalahar.Questline)) then + if table.contains({ 9, 11 }, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline)) then npcHandler:say("Oh my, where to begin with .. .", npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, player:getStorageValue(Storage.InServiceofYalahar.Questline) + 1) - player:setStorageValue(Storage.InServiceofYalahar.Mission02, player:getStorageValue(Storage.InServiceofYalahar.Mission02) + 1) -- StorageValue for Questlog 'Mission 02: Watching the Watchmen' + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) + 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission02, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission02) + 1) -- StorageValue for Questlog 'Mission 02: Watching the Watchmen' end elseif MsgContains(message, "pass") then npcHandler:say("You can {pass} either to the {Magician Quarter} or {Sunken Quarter}. Which one will it be?", npc, creature) diff --git a/data-otservbr-global/npc/bashira.lua b/data-otservbr-global/npc/bashira.lua index cad33258c39..6a1f987cc2a 100644 --- a/data-otservbr-global/npc/bashira.lua +++ b/data-otservbr-global/npc/bashira.lua @@ -97,6 +97,7 @@ npcConfig.shop = { { itemName = "waterskin of water", clientId = 2901, buy = 10, count = 1 }, { itemName = "wooden hammer", clientId = 3459, sell = 15 }, { itemName = "worm", clientId = 3492, buy = 1 }, + { itemName = "vial of water", clientId = 2874, buy = 10, count = 1 }, } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/bertram.lua b/data-otservbr-global/npc/bertram.lua index 27252c06086..876c8ddf79d 100644 --- a/data-otservbr-global/npc/bertram.lua +++ b/data-otservbr-global/npc/bertram.lua @@ -59,11 +59,11 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "key") then - if player:getStorageValue(Storage.ThievesGuild.Mission06) == 1 and player:getSex() == PLAYERSEX_FEMALE then + if player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission06) == 1 and player:getSex() == PLAYERSEX_FEMALE then local headItem = player:getSlotItem(CONST_SLOT_HEAD) if headItem and headItem.itemid == 3576 and player:getStorageValue(Storage.Postman.Rank) == 5 then player:addItem(7934, 1) - player:setStorageValue(Storage.ThievesGuild.Mission06, 2) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission06, 2) npcHandler:say( "Oh my! You look so great in your uniform! \z You archpostwomen are not only daring but also beautiful. \z diff --git a/data-otservbr-global/npc/bezil.lua b/data-otservbr-global/npc/bezil.lua index 8a28bd473e5..39f366ef309 100644 --- a/data-otservbr-global/npc/bezil.lua +++ b/data-otservbr-global/npc/bezil.lua @@ -80,6 +80,7 @@ npcConfig.shop = { { itemName = "waterskin of water", clientId = 2901, buy = 40, count = 1 }, { itemName = "wooden hammer", clientId = 3459, sell = 15 }, { itemName = "worm", clientId = 3492, buy = 1 }, + { itemName = "vial of water", clientId = 2874, buy = 10, count = 1 }, } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/bolfona.lua b/data-otservbr-global/npc/bolfona.lua index 84028bfd03b..83ee91f7ac9 100644 --- a/data-otservbr-global/npc/bolfona.lua +++ b/data-otservbr-global/npc/bolfona.lua @@ -58,10 +58,10 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "chocolate cake") then - if player:getStorageValue(Storage.HiddenCityOfBeregar.SweetAsChocolateCake) == 1 and player:getItemCount(8019) >= 1 then + if player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.SweetAsChocolateCake) == 1 and player:getItemCount(8019) >= 1 then npcHandler:say("Is that for me?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.HiddenCityOfBeregar.SweetAsChocolateCake) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.SweetAsChocolateCake) == 2 then npcHandler:say("So did you tell her that the cake came from me?", npc, creature) npcHandler:setTopic(playerId, 2) end @@ -70,7 +70,7 @@ local function creatureSayCallback(npc, creature, type, message) if player:removeItem(8019, 1) then npcHandler:say("Err, thanks. I doubt it's from you. Who sent it?", npc, creature) npcHandler:setTopic(playerId, 2) - player:setStorageValue(Storage.HiddenCityOfBeregar.SweetAsChocolateCake, 2) + player:setStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.SweetAsChocolateCake, 2) else npcHandler:say("Oh, I thought you have one.", npc, creature) npcHandler:setTopic(playerId, 0) @@ -103,6 +103,7 @@ npcConfig.shop = { { itemName = "ham", clientId = 3582, buy = 8 }, { itemName = "meat", clientId = 3577, buy = 5 }, { itemName = "mug of beer", clientId = 2880, buy = 2, count = 3 }, + { itemName = "vial of beer", clientId = 2874, buy = 2, count = 1, subType = 3 }, } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/boozer.lua b/data-otservbr-global/npc/boozer.lua index ad959f07722..a2eaa22d179 100644 --- a/data-otservbr-global/npc/boozer.lua +++ b/data-otservbr-global/npc/boozer.lua @@ -81,6 +81,8 @@ local function creatureSayCallback(npc, creature, type, message) return true end +npcHandler:setMessage(MESSAGE_GREET, "Welcome to the Hard Rock Racing Track, |PLAYERNAME|.") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) @@ -96,6 +98,8 @@ npcConfig.shop = { { itemName = "mug of lemonade", clientId = 2880, buy = 2, count = 12 }, { itemName = "mug of water", clientId = 2880, buy = 2, count = 1 }, { itemName = "mug of wine", clientId = 2880, buy = 3, count = 2 }, + { itemName = "vial of beer", clientId = 2874, buy = 2, count = 1, subType = 3 }, + { itemName = "vial of wine", clientId = 2874, buy = 3, count = 1, subType = 2 }, } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/bozo.lua b/data-otservbr-global/npc/bozo.lua index 51d5c4aca7a..7ebb30bd214 100644 --- a/data-otservbr-global/npc/bozo.lua +++ b/data-otservbr-global/npc/bozo.lua @@ -69,8 +69,8 @@ local config = { yes = true, removeItem = { itemId = 102 }, updateStorages = { - { key = Storage.WhatAFoolish.Mission1, value = 2 }, - { key = Storage.WhatAFoolish.Questline, value = 2 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission1, value = 2 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 2 }, }, }, [2] = { @@ -82,10 +82,10 @@ local config = { "Take this special vial and fill it with the perfect stench. Then return here and we will talk about your mission.", }, }, - addItem = { itemId = 107 }, + addItem = { itemId = 135 }, updateStorages = { - { key = Storage.WhatAFoolish.Mission2, value = 1 }, - { key = Storage.WhatAFoolish.Questline, value = 3 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission2, value = 1 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 3 }, }, }, [3] = { @@ -95,10 +95,10 @@ local config = { [3] = "Ugh. You got some efficient stuff there. I have to admit you have a talent for such distasteful matters. Perhaps you feel ready for another mission. Just ask me about it.", }, yes = true, - removeItem = { itemId = 9170 }, + removeItem = { itemId = 107 }, updateStorages = { - { key = Storage.WhatAFoolish.Mission2, value = 2 }, - { key = Storage.WhatAFoolish.Questline, value = 4 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission2, value = 2 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 4 }, }, }, [4] = { @@ -111,8 +111,8 @@ local config = { }, }, updateStorages = { - { key = Storage.WhatAFoolish.Mission3, value = 1 }, - { key = Storage.WhatAFoolish.Questline, value = 5 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission3, value = 1 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 5 }, }, }, [5] = { @@ -129,8 +129,8 @@ local config = { removeItem = { itemId = 119 }, pie = true, updateStorages = { - { key = Storage.WhatAFoolish.Mission3, value = 2 }, - { key = Storage.WhatAFoolish.Questline, value = 6 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission3, value = 2 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 6 }, }, }, [6] = { @@ -141,8 +141,8 @@ local config = { }, }, updateStorages = { - { key = Storage.WhatAFoolish.Mission4, value = 1 }, - { key = Storage.WhatAFoolish.Questline, value = 7 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission4, value = 1 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 7 }, }, }, [7] = { @@ -156,10 +156,10 @@ local config = { }, }, yes = true, - removeItem = { itemId = 2874, count = 18, subType = 15 }, + removeItem = { itemId = 2874, count = 18, subType = 2 }, updateStorages = { - { key = Storage.WhatAFoolish.Mission4, value = 2 }, - { key = Storage.WhatAFoolish.Questline, value = 8 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission4, value = 2 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 8 }, }, addItem = { itemId = 117 }, }, @@ -172,8 +172,8 @@ local config = { yes = true, removeItem = { itemId = 118 }, updateStorages = { - { key = Storage.WhatAFoolish.Mission4, value = 3 }, - { key = Storage.WhatAFoolish.Questline, value = 9 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission4, value = 3 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 9 }, }, }, [9] = { @@ -185,9 +185,9 @@ local config = { }, }, updateStorages = { - { key = Storage.WhatAFoolish.Mission5, value = 1 }, - { key = Storage.WhatAFoolish.TriangleTowerDoor, value = 1 }, - { key = Storage.WhatAFoolish.Questline, value = 10 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission5, value = 1 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.TriangleTowerDoor, value = 1 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 10 }, }, }, [10] = { @@ -205,8 +205,8 @@ local config = { yes = true, checkItemCount = 112, updateStorages = { - { key = Storage.WhatAFoolish.Mission5, value = 2 }, - { key = Storage.WhatAFoolish.Questline, value = 11 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission5, value = 2 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 11 }, }, }, [11] = { @@ -219,11 +219,11 @@ local config = { }, }, yes = true, - checkStorage = Storage.WhatAFoolish.EmperorBeardShave, + checkStorage = Storage.Quest.U8_1.WhatAFoolishQuest.EmperorBeardShave, removeItem = { itemId = 113 }, updateStorages = { - { key = Storage.WhatAFoolish.Mission5, value = 3 }, - { key = Storage.WhatAFoolish.Questline, value = 12 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission5, value = 3 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 12 }, }, }, [12] = { @@ -236,8 +236,8 @@ local config = { [1] = "You know, nothing has brought more fun and joy to humanity than the whoopee cushion. Its creation is a delicate matter though. Bring me 4 pieces of minotaur leather first and then lets talk about this mission.", }, updateStorages = { - { key = Storage.WhatAFoolish.Mission6, value = 1 }, - { key = Storage.WhatAFoolish.Questline, value = 14 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission6, value = 1 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 14 }, }, }, [14] = { @@ -249,8 +249,8 @@ local config = { yes = true, removeItem = { itemId = 5878, count = 4 }, updateStorages = { - { key = Storage.WhatAFoolish.Mission6, value = 2 }, - { key = Storage.WhatAFoolish.Questline, value = 15 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission6, value = 2 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 15 }, }, }, [15] = { @@ -262,8 +262,8 @@ local config = { yes = true, removeItem = { itemId = 5879 }, updateStorages = { - { key = Storage.WhatAFoolish.Mission6, value = 3 }, - { key = Storage.WhatAFoolish.Questline, value = 16 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission6, value = 3 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 16 }, }, effect = CONST_ME_POFF, }, @@ -276,8 +276,8 @@ local config = { }, addItem = { itemId = 121 }, updateStorages = { - { key = Storage.WhatAFoolish.Mission6, value = 4 }, - { key = Storage.WhatAFoolish.Questline, value = 17 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission6, value = 4 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 17 }, }, }, [17] = { @@ -287,10 +287,10 @@ local config = { [3] = "This will cause quite a commotion in Carlin. I think we should play some pranks in many more places to spread humour all over the world. Talk to me about your next mission to learn more about it.", }, yes = true, - checkStorage = Storage.WhatAFoolish.WhoopeeCushion, + checkStorage = Storage.Quest.U8_1.WhatAFoolishQuest.WhoopeeCushion, updateStorages = { - { key = Storage.WhatAFoolish.Mission6, value = 5 }, - { key = Storage.WhatAFoolish.Questline, value = 18 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission6, value = 5 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 18 }, }, }, [18] = { @@ -301,9 +301,9 @@ local config = { }, }, updateStorages = { - { key = Storage.WhatAFoolish.Mission7, value = 1 }, - { key = Storage.WhatAFoolish.QueenEloiseCatDoor, value = 1 }, - { key = Storage.WhatAFoolish.Questline, value = 19 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission7, value = 1 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.QueenEloiseCatDoor, value = 1 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 19 }, }, }, [19] = { @@ -313,10 +313,10 @@ local config = { [3] = "Excellent. The Venoreans have been safe from my pranks far too long. If you are ready for another mission, talk to me.", }, yes = true, - checkStorage = Storage.WhatAFoolish.ScaredCarina, + checkStorage = Storage.Quest.U8_1.WhatAFoolishQuest.ScaredCarina, updateStorages = { - { key = Storage.WhatAFoolish.Mission7, value = 2 }, - { key = Storage.WhatAFoolish.Questline, value = 20 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission7, value = 2 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 20 }, }, }, [20] = { @@ -327,8 +327,8 @@ local config = { }, }, updateStorages = { - { key = Storage.WhatAFoolish.Mission8, value = 1 }, - { key = Storage.WhatAFoolish.Questline, value = 21 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission8, value = 1 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 21 }, }, }, [21] = { @@ -340,8 +340,8 @@ local config = { yes = true, removeItem = { itemId = 124 }, updateStorages = { - { key = Storage.WhatAFoolish.Mission8, value = 2 }, - { key = Storage.WhatAFoolish.Questline, value = 22 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission8, value = 2 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 22 }, }, }, [22] = { @@ -353,8 +353,8 @@ local config = { yes = true, removeItem = { itemId = 3129 }, updateStorages = { - { key = Storage.WhatAFoolish.Mission8, value = 3 }, - { key = Storage.WhatAFoolish.Questline, value = 23 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission8, value = 3 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 23 }, }, }, [23] = { @@ -366,21 +366,21 @@ local config = { }, addItem = { itemId = 141 }, updateStorages = { - { key = Storage.WhatAFoolish.Mission8, value = 4 }, - { key = Storage.WhatAFoolish.Questline, value = 24 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission8, value = 4 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 24 }, }, }, [24] = { text = { - [1] = "Have you [1]ed the exploding cigar to Theodore Loveless?", + [1] = "Have you delivered the exploding cigar to Theodore Loveless?", [2] = "No, you haven't! Why do only fools apply for the fools guild?", [3] = "You're hell of a guy, I bet you enjoyed it. As you represent everything a fool stands for, I give you this fool's sceptre to spiceup your jester outfit. If you are interested, there are even more missions for a fool like yourself. Just ask about them.", }, yes = true, - checkStorage = Storage.WhatAFoolish.Cigar, + checkStorage = Storage.Quest.U8_1.WhatAFoolishQuest.Cigar, updateStorages = { - { key = Storage.WhatAFoolish.Mission8, value = 5 }, - { key = Storage.WhatAFoolish.Questline, value = 25 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission8, value = 5 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 25 }, }, addItem = { itemId = 895 }, addon = 1, @@ -393,10 +393,10 @@ local config = { }, }, updateStorages = { - { key = Storage.WhatAFoolish.Mission9, value = 1 }, - { key = Storage.WhatAFoolish.Questline, value = 26 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission9, value = 1 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 26 }, }, - addItem = { itemId = 107 }, + addItem = { itemId = 135 }, }, [26] = { text = { @@ -410,10 +410,10 @@ local config = { yes = true, removeItem = { itemId = 125 }, updateStorages = { - { key = Storage.WhatAFoolish.Mission9, value = 2 }, - { key = Storage.WhatAFoolish.Questline, value = 27 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission9, value = 2 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 27 }, }, - addItem = { itemId = 107 }, + addItem = { itemId = 135 }, }, [27] = { text = { @@ -424,8 +424,8 @@ local config = { yes = true, removeItem = { itemId = 9149 }, updateStorages = { - { key = Storage.WhatAFoolish.Mission9, value = 3 }, - { key = Storage.WhatAFoolish.Questline, value = 28 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission9, value = 3 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 28 }, }, }, [28] = { @@ -438,8 +438,8 @@ local config = { }, }, updateStorages = { - { key = Storage.WhatAFoolish.Mission9, value = 4 }, - { key = Storage.WhatAFoolish.Questline, value = 29 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission9, value = 4 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 29 }, }, addItem = { itemId = 127 }, }, @@ -450,10 +450,10 @@ local config = { [3] = "What a splendid prank! If you are ready for more, ask me about the next mission.", }, yes = true, - checkStorage = Storage.WhatAFoolish.Contract, + checkStorage = Storage.Quest.U8_1.WhatAFoolishQuest.Contract, updateStorages = { - { key = Storage.WhatAFoolish.Mission9, value = 5 }, - { key = Storage.WhatAFoolish.Questline, value = 30 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission9, value = 5 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 30 }, }, }, [30] = { @@ -472,8 +472,8 @@ local config = { }, yes = true, updateStorages = { - { key = Storage.WhatAFoolish.Mission10, value = 1 }, - { key = Storage.WhatAFoolish.Questline, value = 31 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission10, value = 1 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 31 }, }, addItem = { itemId = 130, count = 10 }, }, @@ -485,8 +485,8 @@ local config = { yes = true, cookiesDelivery = true, updateStorages = { - { key = Storage.WhatAFoolish.Mission10, value = 2 }, - { key = Storage.WhatAFoolish.Questline, value = 32 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission10, value = 2 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 32 }, }, }, [32] = { @@ -497,8 +497,8 @@ local config = { }, }, updateStorages = { - { key = Storage.WhatAFoolish.Mission11, value = 1 }, - { key = Storage.WhatAFoolish.Questline, value = 33 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission11, value = 1 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 33 }, }, }, [33] = { @@ -514,8 +514,8 @@ local config = { yes = true, removeItem = { itemId = 5909, count = 5 }, updateStorages = { - { key = Storage.WhatAFoolish.Mission11, value = 2 }, - { key = Storage.WhatAFoolish.Questline, value = 34 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission11, value = 2 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 34 }, }, addItem = { itemId = 142 }, }, @@ -532,8 +532,8 @@ local config = { yes = true, removeItem = { itemId = 143 }, updateStorages = { - { key = Storage.WhatAFoolish.Mission11, value = 3 }, - { key = Storage.WhatAFoolish.Questline, value = 35 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission11, value = 3 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 35 }, }, addItem = { itemId = 144 }, }, @@ -544,10 +544,10 @@ local config = { [3] = "By Kurik, I knew you have it in you. You are a fool after my fancy. Take this jester hat, you deserve it. It will go nicely with your jester costume.", }, yes = true, - checkStorage = Storage.WhatAFoolish.ScaredKazzan, + checkStorage = Storage.Quest.U8_1.WhatAFoolishQuest.ScaredKazzan, updateStorages = { - { key = Storage.WhatAFoolish.Mission11, value = 4 }, - { key = Storage.WhatAFoolish.Questline, value = 36 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Mission11, value = 4 }, + { key = Storage.Quest.U8_1.WhatAFoolishQuest.Questline, value = 36 }, }, addItem = { itemId = 894 }, addon = 2, @@ -622,7 +622,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "join") then - if player:getStorageValue(Storage.WhatAFoolish.Questline) ~= -1 then + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline) ~= -1 then npcHandler:say("Wow, your stupidity would be pride and joy for every fool. You've already applied as a member. Let's rather talk about your current mission.", npc, creature) return true end @@ -630,7 +630,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Do you wish to become a jester and join the fools guild?", npc, creature) npcHandler:setTopic(playerId, 1) elseif MsgContains(message, "mission") then - local targetValue = config[player:getStorageValue(Storage.WhatAFoolish.Questline)] + local targetValue = config[player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline)] if not targetValue then return true end @@ -654,8 +654,8 @@ local function creatureSayCallback(npc, creature, type, message) value[playerId] = targetValue end elseif MsgContains(message, "jester outfit") then - if player:getStorageValue(Storage.WhatAFoolish.Questline) == 12 then - local targetValue = jesterOutfit[player:getStorageValue(Storage.WhatAFoolish.JesterOutfit)] + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline) == 12 then + local targetValue = jesterOutfit[player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.JesterOutfit)] if not targetValue then return true end @@ -675,9 +675,9 @@ local function creatureSayCallback(npc, creature, type, message) }, npc, creature) npcHandler:setTopic(playerId, 2) elseif npcHandler:getTopic(playerId) == 2 then - player:setStorageValue(Storage.WhatAFoolish.Questline, 1) - player:setStorageValue(Storage.WhatAFoolish.Questlog, 1) - player:setStorageValue(Storage.WhatAFoolish.Mission1, 1) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline, 1) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questlog, 1) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Mission1, 1) npcHandler:say({ "What a foolish decision! You are indeed a worthy candidate! But let's talk about business ...", "Being a jester is not just about telling jokes. A good jester heavily relies on requisites ...", @@ -712,7 +712,7 @@ local function creatureSayCallback(npc, creature, type, message) end end - if targetValue.cookiesDeliveryy then + if targetValue.cookiesDelivery then if player:getCookiesDelivered() ~= 10 then npcHandler:say("No, you aren't! Why do only fools apply for the fools guild?", npc, creature) npcHandler:setTopic(playerId, 0) @@ -721,7 +721,7 @@ local function creatureSayCallback(npc, creature, type, message) end if targetValue.pie then - if player:getStorageValue(Storage.WhatAFoolish.PieBoxTimer) > 0 and player:getStorageValue(Storage.WhatAFoolish.PieBoxTimer) < os.time() then + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.PieBoxTimer) > 0 and player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.PieBoxTimer) < os.time() then npcHandler:say("Eeeek! What have you done?? These pies are crawling with bugs! Those must be the infamous parcel bugs! Get some new pies at once you wannabe fool, and this time without any bugs!", npc, creature) npcHandler:setTopic(playerId, 0) return true @@ -764,11 +764,11 @@ local function creatureSayCallback(npc, creature, type, message) return true end - player:setStorageValue(Storage.WhatAFoolish.JesterOutfit, targetValue.newValue) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.JesterOutfit, targetValue.newValue) if targetValue.addOutfit then player:addOutfit(270) player:addOutfit(273) - player:setStorageValue(Storage.WhatAFoolish.Questline, 13) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline, 13) end npcHandler:say(targetValue.text[2], npc, creature) if not targetValue.last then @@ -781,18 +781,18 @@ local function creatureSayCallback(npc, creature, type, message) if table.contains({ 1, 2 }, npcHandler:getTopic(playerId)) then npcHandler:say("Too bad, I'm convinced you have it in you.", npc, creature) elseif table.contains({ 3, 4 }, npcHandler:getTopic(playerId)) then - if player:getStorageValue(Storage.WhatAFoolish.Questline) == 11 and player:getStorageValue(Storage.WhatAFoolish.EmperorBeardShave) == 1 then - player:setStorageValue(Storage.WhatAFoolish.Questline, 12) - player:setStorageValue(Storage.WhatAFoolish.Mission5, 3) + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline) == 11 and player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.EmperorBeardShave) == 1 then + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline, 12) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Mission5, 3) npcHandler:say({ "You shaved the emperor, but lost the beard? What kind of fool are you? Well, at least he will have a nice surprise when he wakes up ...", "Still, as a small recognition of your accomplishments I'm willing to tell you how to get your own jester outfit. If you are interested in more fun and adventures, ask me for more missions.", }, npc, creature) - elseif player:getStorageValue(Storage.WhatAFoolish.Questline) == 30 then + elseif player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline) == 30 then npcHandler:say("You won't be successful in the fool's world with such an attitude.", npc, creature) - elseif player:getStorageValue(Storage.WhatAFoolish.Questline) == 35 and player:getStorageValue(Storage.WhatAFoolish.LostDisguise) ~= 1 then + elseif player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline) == 35 and player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.LostDisguise) ~= 1 then player:addItem(144, 1) - player:setStorageValue(Storage.WhatAFoolish.LostDisguise, 1) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.LostDisguise, 1) npcHandler:say("You wasted the disguise?? Why do only fools apply for the fools guild? Here... try again, but be wittier this time.", npc, creature) else npcHandler:say("Oh boy, why do only fools apply for the fools guild?", npc, creature) diff --git a/data-otservbr-global/npc/brasith.lua b/data-otservbr-global/npc/brasith.lua index b2939eb081b..7160ee8c03b 100644 --- a/data-otservbr-global/npc/brasith.lua +++ b/data-otservbr-global/npc/brasith.lua @@ -77,6 +77,7 @@ npcConfig.shop = { { itemName = "potato", clientId = 8010, buy = 4 }, { itemName = "pumpkin", clientId = 3594, buy = 10 }, { itemName = "strawberry", clientId = 3591, buy = 1 }, + { itemName = "vial of milk", clientId = 2874, buy = 15, count = 1, subType = 9 }, } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/briasol.lua b/data-otservbr-global/npc/briasol.lua index 999e09482f5..5c424ecd12f 100644 --- a/data-otservbr-global/npc/briasol.lua +++ b/data-otservbr-global/npc/briasol.lua @@ -64,7 +64,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "fine vase") then - if player:getStorageValue(Storage.TravellingTrader.Mission04) == 1 then + if player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission04) == 1 then npcHandler:say({ "Rashid sent you, I suppose. Before I sell you that vase, one word of advice. ...", "Make room in your backpack so that I can place the vase carefully inside it. If it falls to the floor, it will most likely shatter or break if you try to pick it up again. ...", @@ -76,7 +76,7 @@ local function creatureSayCallback(npc, creature, type, message) if npcHandler:getTopic(playerId) == 1 then if player:getMoney() + player:getBankBalance() >= 1000 then npcHandler:say("Here it is.", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission04, 2) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission04, 2) player:addItem(227, 1) player:removeMoneyBank(1000) else diff --git a/data-otservbr-global/npc/bruce.lua b/data-otservbr-global/npc/bruce.lua index 55eada7766d..a76d5578420 100644 --- a/data-otservbr-global/npc/bruce.lua +++ b/data-otservbr-global/npc/bruce.lua @@ -60,10 +60,10 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "report") then local player = Player(creature) - if table.contains({ 9, 11 }, player:getStorageValue(Storage.InServiceofYalahar.Questline)) then + if table.contains({ 9, 11 }, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline)) then npcHandler:say("Well, .. .", npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, player:getStorageValue(Storage.InServiceofYalahar.Questline) + 1) - player:setStorageValue(Storage.InServiceofYalahar.Mission02, player:getStorageValue(Storage.InServiceofYalahar.Mission02) + 1) -- StorageValue for Questlog 'Mission 02: Watching the Watchmen' + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) + 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission02, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission02) + 1) -- StorageValue for Questlog 'Mission 02: Watching the Watchmen' end elseif MsgContains(message, "pass") then npcHandler:say("You can {pass} either to the {Alchemist Quarter} or {Cemetery Quarter}. Which one will it be?", npc, creature) diff --git a/data-otservbr-global/npc/buddel.lua b/data-otservbr-global/npc/buddel.lua index 051e79a2299..ac891b3ee04 100644 --- a/data-otservbr-global/npc/buddel.lua +++ b/data-otservbr-global/npc/buddel.lua @@ -82,7 +82,7 @@ addTravelKeyword("okolnir", "It's nice there. Except of the ice dragons which ar end, function() return math.random(5) > 1 end, function(player) - return player:getStorageValue(Storage.BarbarianTest.Questline) < 8 + return player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) == 8 end, function(player) return player:getItemCount(3097) > 0 end, function(player) @@ -93,20 +93,20 @@ addTravelKeyword("helheim", "T'at is a small island to the east.", Position(3246 end, function() return math.random(5) > 1 end, function(player) - return player:getStorageValue(Storage.BarbarianTest.Questline) < 8 + return player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) == 8 end, function(player) return player:getItemCount(3097) > 0 end, function(player) return player:removeItem(3097, 1) end, function(player) - return player:getStorageValue(Storage.TheIceIslands.Questline) < 30 + return player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) < 30 end) addTravelKeyword("tyrsung", "*HICKS* Big, big island east of here. Venorian hunters settled there ..... I could bring you north of their camp.", Position(32333, 31227, 7), function() return randomDestination[math.random(#randomDestination)] end, function() return math.random(5) > 1 end, function(player) - return player:getStorageValue(Storage.BarbarianTest.Questline) < 8 + return player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) == 8 end, function(player) return player:getItemCount(3097) > 0 end, function(player) @@ -117,7 +117,7 @@ addTravelKeyword("camp", "Both of you look like you could defend yourself! If yo end, function() return math.random(5) > 1 end, function(player) - return player:getStorageValue(Storage.BarbarianTest.Questline) < 8 + return player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) == 8 end, function(player) return player:getItemCount(3097) > 0 end, function(player) diff --git a/data-otservbr-global/npc/buddel_helheim.lua b/data-otservbr-global/npc/buddel_helheim.lua index b38470616aa..88f94ccfa27 100644 --- a/data-otservbr-global/npc/buddel_helheim.lua +++ b/data-otservbr-global/npc/buddel_helheim.lua @@ -79,7 +79,7 @@ addTravelKeyword("svargrond", "You know a town nicer than this? NICER DICER! Apr end, function() return math.random(5) > 1 end, function(player) - return player:getStorageValue(Storage.BarbarianTest.Questline) < 8 + return player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) < 8 end, function(player) return player:getItemCount(3097) > 0 end, function(player) @@ -90,7 +90,7 @@ addTravelKeyword("okolnir", "It's nice there. Except of the ice dragons which ar end, function() return math.random(5) > 1 end, function(player) - return player:getStorageValue(Storage.BarbarianTest.Questline) < 8 + return player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) < 8 end, function(player) return player:getItemCount(3097) > 0 end, function(player) @@ -101,7 +101,7 @@ addTravelKeyword("tyrsung", "*HICKS* Big, big island east of here. Venorian hunt end, function() return math.random(5) > 1 end, function(player) - return player:getStorageValue(Storage.BarbarianTest.Questline) < 8 + return player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) < 8 end, function(player) return player:getItemCount(3097) > 0 end, function(player) @@ -112,7 +112,7 @@ addTravelKeyword("camp", "Both of you look like you could defend yourself! If yo end, function() return math.random(5) > 1 end, function(player) - return player:getStorageValue(Storage.BarbarianTest.Questline) < 8 + return player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) < 8 end, function(player) return player:getItemCount(3097) > 0 end, function(player) diff --git a/data-otservbr-global/npc/buddel_okolnir.lua b/data-otservbr-global/npc/buddel_okolnir.lua index 387009f9df1..f21ff049f4b 100644 --- a/data-otservbr-global/npc/buddel_okolnir.lua +++ b/data-otservbr-global/npc/buddel_okolnir.lua @@ -82,7 +82,7 @@ addTravelKeyword("svargrond", "You know a town nicer than this? NICER DICER! Apr end, function() return math.random(5) > 1 end, function(player) - return player:getStorageValue(Storage.BarbarianTest.Questline) < 8 + return player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) < 8 end, function(player) return player:getItemCount(3097) > 0 end, function(player) @@ -93,7 +93,7 @@ addTravelKeyword("camp", "Both of you look like you could defend yourself! If yo end, function() return math.random(5) > 1 end, function(player) - return player:getStorageValue(Storage.BarbarianTest.Questline) < 8 + return player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) < 8 end, function(player) return player:getItemCount(3097) > 0 end, function(player) @@ -104,20 +104,20 @@ addTravelKeyword("helheim", "T'at is a small island to the east.", Position(3246 end, function() return math.random(5) > 1 end, function(player) - return player:getStorageValue(Storage.BarbarianTest.Questline) < 8 + return player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) < 8 end, function(player) return player:getItemCount(3097) > 0 end, function(player) return player:removeItem(3097, 1) end, function(player) - return player:getStorageValue(Storage.TheIceIslands.Questline) < 30 + return player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) < 30 end) addTravelKeyword("tyrsung", "*HICKS* Big, big island east of here. Venorian hunters settled there ..... I could bring you north of their camp.", Position(32333, 31227, 7), function() return randomDestination[math.random(#randomDestination)] end, function() return math.random(5) > 1 end, function(player) - return player:getStorageValue(Storage.BarbarianTest.Questline) < 8 + return player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) < 8 end, function(player) return player:getItemCount(3097) > 0 end, function(player) diff --git a/data-otservbr-global/npc/buddel_raider_camp.lua b/data-otservbr-global/npc/buddel_raider_camp.lua index 2c6d9781296..06b69175967 100644 --- a/data-otservbr-global/npc/buddel_raider_camp.lua +++ b/data-otservbr-global/npc/buddel_raider_camp.lua @@ -82,7 +82,7 @@ addTravelKeyword("svargrond", "You know a town nicer than this? NICER DICER! Apr end, function() return math.random(5) > 1 end, function(player) - return player:getStorageValue(Storage.BarbarianTest.Questline) < 8 + return player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) < 8 end, function(player) return player:getItemCount(3097) > 0 end, function(player) @@ -93,7 +93,7 @@ addTravelKeyword("okolnir", "It's nice there. Except of the ice dragons which ar end, function() return math.random(5) > 1 end, function(player) - return player:getStorageValue(Storage.BarbarianTest.Questline) < 8 + return player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) < 8 end, function(player) return player:getItemCount(3097) > 0 end, function(player) @@ -104,20 +104,20 @@ addTravelKeyword("helheim", "T'at is a small island to the east.", Position(3246 end, function() return math.random(5) > 1 end, function(player) - return player:getStorageValue(Storage.BarbarianTest.Questline) < 8 + return player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) < 8 end, function(player) return player:getItemCount(3097) > 0 end, function(player) return player:removeItem(3097, 1) end, function(player) - return player:getStorageValue(Storage.TheIceIslands.Questline) < 30 + return player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) < 30 end) addTravelKeyword("tyrsung", "*HICKS* Big, big island east of here. Venorian hunters settled there ..... I could bring you north of their camp.", Position(32333, 31227, 7), function() return randomDestination[math.random(#randomDestination)] end, function() return math.random(5) > 1 end, function(player) - return player:getStorageValue(Storage.BarbarianTest.Questline) < 8 + return player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) < 8 end, function(player) return player:getItemCount(3097) > 0 end, function(player) diff --git a/data-otservbr-global/npc/buddel_tyrsung.lua b/data-otservbr-global/npc/buddel_tyrsung.lua index 541739f2f53..cb9025b1a91 100644 --- a/data-otservbr-global/npc/buddel_tyrsung.lua +++ b/data-otservbr-global/npc/buddel_tyrsung.lua @@ -82,7 +82,7 @@ addTravelKeyword("svargrond", "You know a town nicer than this? NICER DICER! Apr end, function() return math.random(5) > 1 end, function(player) - return player:getStorageValue(Storage.BarbarianTest.Questline) < 8 + return player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) < 8 end, function(player) return player:getItemCount(3097) > 0 end, function(player) @@ -93,7 +93,7 @@ addTravelKeyword("okolnir", "It's nice there. Except of the ice dragons which ar end, function() return math.random(5) > 1 end, function(player) - return player:getStorageValue(Storage.BarbarianTest.Questline) < 8 + return player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) < 8 end, function(player) return player:getItemCount(3097) > 0 end, function(player) @@ -104,20 +104,20 @@ addTravelKeyword("helheim", "T'at is a small island to the east.", Position(3246 end, function() return math.random(5) > 1 end, function(player) - return player:getStorageValue(Storage.BarbarianTest.Questline) < 8 + return player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) < 8 end, function(player) return player:getItemCount(3097) > 0 end, function(player) return player:removeItem(3097, 1) end, function(player) - return player:getStorageValue(Storage.TheIceIslands.Questline) < 30 + return player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) < 30 end) addTravelKeyword("camp", "Both of you look like you could defend yourself! If you want to go there, ask me for a passage.", Position(32021, 31294, 7), function() return randomDestination[math.random(#randomDestination)] end, function() return math.random(5) > 1 end, function(player) - return player:getStorageValue(Storage.BarbarianTest.Questline) < 8 + return player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) < 8 end, function(player) return player:getItemCount(3097) > 0 end, function(player) diff --git a/data-otservbr-global/npc/budrik.lua b/data-otservbr-global/npc/budrik.lua index 6261e3d4c82..e874f8b91f5 100644 --- a/data-otservbr-global/npc/budrik.lua +++ b/data-otservbr-global/npc/budrik.lua @@ -58,40 +58,40 @@ local function creatureSayCallback(npc, creature, type, message) end if table.contains({ "mission", "quest" }, message:lower()) then - if player:getStorageValue(Storage.ToOutfoxAFoxQuest) < 1 then + if player:getStorageValue(Storage.TibiaTales.ToOutfoxAFoxQuest.Questline) < 1 then npcHandler:say({ "Funny that you are asking me for a mission! There is indeed something you can do for me. Ever heard about The Horned Fox? Anyway, yesterday his gang has stolen my mining helmet during a raid. ...", "It belonged to my father and before that to my grandfather. That helmet is at least 600 years old! I need it back. Are you willing to help me?", }, npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.ToOutfoxAFoxQuest) == 1 then + elseif player:getStorageValue(Storage.TibiaTales.ToOutfoxAFoxQuest.Questline) == 1 then if player:removeItem(139, 1) then - player:setStorageValue(Storage.ToOutfoxAFoxQuest, 2) + player:setStorageValue(Storage.TibiaTales.ToOutfoxAFoxQuest.Questline, 2) player:addItem(875, 1) npcHandler:say("As I was just saying to the others, 'this brave fellow will bring me my mining helmet back' and here you are with it!! Here take my spare helmet, I don't need it anymore!", npc, creature) else npcHandler:say("We presume the hideout of The Horned Fox is somewhere in the south-west near the coast, good luck finding my mining helmet!", npc, creature) end - elseif player:getStorageValue(Storage.ToOutfoxAFoxQuest) == 2 and player:getLevel() <= 40 and player:getStorageValue(Storage.KillingInTheNameOf.BudrikMinos) < 0 then + elseif player:getStorageValue(Storage.TibiaTales.ToOutfoxAFoxQuest.Questline) == 2 and player:getLevel() <= 40 and player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BudrikMinos) < 0 then npcHandler:say({ "I am so angry I could spit grit! That damn {Horned Fox} and his attacks! Let's show those bull-heads that they have messed with the wrong people....", "I want you to kill 5000 minotaurs - no matter where - for me and all the dwarfs of Kazordoon! Are you willing to do that?", }, npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.KillingInTheNameOf.BudrikMinos) == 0 then + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BudrikMinos) == 0 then if player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.MinotaurCount) >= 5000 then npcHandler:say({ "By all that is holy! You are a truly great warrior! With much patience! I have just found out the location the hideout of The Horned Fox! I have marked the spot on your map so you can find it. Go there and slay him!! ...", "BUT, you will have only this ONE chance to catch him! Good luck!", }, npc, creature) - player:setStorageValue(Storage.KillingInTheNameOf.BudrikMinos, 1) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BudrikMinos, 1) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BossKillCount.FoxCount, 0) else npcHandler:say("Come back when you have slain {5000 minotaurs!}", npc, creature) end - elseif player:getStorageValue(Storage.KillingInTheNameOf.BudrikMinos) == 2 and player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BossKillCount.FoxCount) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BudrikMinos) == 2 and player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BossKillCount.FoxCount) == 1 then npcHandler:say("It was very decent of you to help me, and I am thankful, really I am, but now I have to get back to my duties as a foreman.", npc, creature) - elseif player:getLevel() > 40 and player:getStorageValue(Storage.KillingInTheNameOf.BudrikMinos) < 0 then + elseif player:getLevel() > 40 and player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BudrikMinos) < 0 then npcHandler:say("Well, I could need help with that damn Horned Fox and his gang, but I guess since you are rather experienced, killing minotaurs would bore you to death. I'll wait for someone else. But thanks!", npc, creature) else npcHandler:say("Hum... what, {task}?", npc, creature) @@ -100,11 +100,14 @@ local function creatureSayCallback(npc, creature, type, message) if npcHandler:getTopic(playerId) == 1 then npcHandler:say("I knew you have the guts for that task! We presume the hideout of The Horned Fox somewhere in the south-west near the coast. Good luck!", npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.ToOutfoxAFoxQuest, 1) + if player:getStorageValue(Storage.TibiaTales.DefaultStart) <= 0 then + player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) + end + player:setStorageValue(Storage.TibiaTales.ToOutfoxAFoxQuest.Questline, 1) elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say("Hussah! Let's bring war to those hoof-legged, dirt-necked, bull-headed minotaurs!! Come back to me when you are done with your {mission}.", npc, creature) player:setStorageValue(JOIN_STOR, 1) - player:setStorageValue(Storage.KillingInTheNameOf.BudrikMinos, 0) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BudrikMinos, 0) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.MinotaurCount, 0) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.MinotaurCount, 0) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.MinotaurGuardCount, 0) diff --git a/data-otservbr-global/npc/bunny_bonecrusher.lua b/data-otservbr-global/npc/bunny_bonecrusher.lua index 6a926df382a..2e9a3624c4e 100644 --- a/data-otservbr-global/npc/bunny_bonecrusher.lua +++ b/data-otservbr-global/npc/bunny_bonecrusher.lua @@ -50,6 +50,45 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function creatureSayCallback(npc, creature, type, message) + local player = Player(creature) + local playerId = player:getId() + + -- Check if NPC can interact with the creature + if not npcHandler:checkInteraction(npc, creature) then + return false + end + + -- Check if the message contains "mission" + if MsgContains(message, "mission") then + if player:getStorageValue(Storage.Quest.U8_1.TowerDefenceQuest.Questline) < 1 then + npcHandler:say({ + "Normally we don't assign missions to civilians - and particularly to MALE civilians - but in this case I think we can make an exception. ...", + "I need a courier to deliver a parcel to the watchtower in Femor Hills. You think you can handle that??", + }, npc, creature) + npcHandler:setTopic(playerId, 1) + elseif player:getStorageValue(Storage.Quest.U8_1.TowerDefenceQuest.Questline) == 4 then + npcHandler:say("Alright, you delivered the parcel. So what is the password Thanita told you?", npc, creature) + npcHandler:setTopic(playerId, 2) + end + elseif npcHandler:getTopic(playerId) == 1 and MsgContains(message, "yes") then + npcHandler:say("I am not sure if I should be glad now or not but anyway ... you will get a password so I will know if you just threw it away or actually delivered it. Here is the parcel. See you ....or not.", npc, creature) + player:addItem(140, 1) + player:setStorageValue(Storage.Quest.U8_1.TowerDefenceQuest.Questline, 1) + npcHandler:setTopic(playerId, 0) + elseif npcHandler:getTopic(playerId) == 2 and MsgContains(message, "password*") then + npcHandler:say("That's right. Here is your reward some elementary arrows. You did pretty well on your mission!", npc, creature) + player:addItem(762, 50) + player:addItem(774, 50) + player:addItem(763, 50) + player:addItem(761, 50) + player:setStorageValue(Storage.Quest.U8_1.TowerDefenceQuest.Questline, 5) + npcHandler:setTopic(playerId, 0) + end + + return true +end + keywordHandler:addKeyword({ "hail general" }, StdModule.say, { npcHandler = npcHandler, text = "Salutations, commoner |PLAYERNAME|!" }) keywordHandler:addKeyword({ "how", "are", "you" }, StdModule.say, { npcHandler = npcHandler, text = "We are in constant training and in perfect health." }) keywordHandler:addKeyword({ "job" }, StdModule.say, { npcHandler = npcHandler, text = "I am the general of the queen's army. I don't have time to explain this concept to you." }) @@ -67,6 +106,12 @@ keywordHandler:addKeyword({ "green ferrets" }, StdModule.say, { npcHandler = npc keywordHandler:addKeyword({ "join" }, StdModule.say, { npcHandler = npcHandler, text = "Join what?" }) keywordHandler:addKeyword({ "join army" }, StdModule.say, { npcHandler = npcHandler, text = "Sorry, we don't recruit foreigners. Maybe you can join if you prove yourself in a mission for the queen." }) +npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) + +npcHandler:setMessage(MESSAGE_GREET, "Address me properly |PLAYERNAME|!") +npcHandler:setMessage(MESSAGE_WALKAWAY, "LONG LIVE THE QUEEN!") +npcHandler:setMessage(MESSAGE_FAREWELL, "LONG LIVE THE QUEEN!") + npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- npcType registering the npcConfig table diff --git a/data-otservbr-global/npc/cael.lua b/data-otservbr-global/npc/cael.lua index f377cdae411..d4033fca165 100644 --- a/data-otservbr-global/npc/cael.lua +++ b/data-otservbr-global/npc/cael.lua @@ -389,6 +389,7 @@ local function onTradeRequest(npc, creature) return true end +npcHandler:setMessage(MESSAGE_GREET, "Greetings, |PLAYERNAME|! You must have come around quite a bit. I'm always interested in learning new things about Zao.") npcHandler:setMessage(MESSAGE_SENDTRADE, "Keep in mind you won't find better offers here. Just browse through my wares.") npcHandler:setCallback(CALLBACK_ON_TRADE_REQUEST, onTradeRequest) diff --git a/data-otservbr-global/npc/captain_bluebear.lua b/data-otservbr-global/npc/captain_bluebear.lua index a535403a61e..8c0100583d4 100644 --- a/data-otservbr-global/npc/captain_bluebear.lua +++ b/data-otservbr-global/npc/captain_bluebear.lua @@ -81,7 +81,7 @@ addTravelKeyword("roshamuul", 210, Position(33494, 32567, 7)) addTravelKeyword("svargrond", 180, Position(32341, 31108, 6)) addTravelKeyword("liberty bay", 180, Position(32285, 32892, 6)) addTravelKeyword("yalahar", 200, Position(32816, 31272, 6), nil, function(player) - return player:getStorageValue(Storage.SearoutesAroundYalahar.Thais) ~= 1 and player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) < 5 + return player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Thais) ~= 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) < 5 end) addTravelKeyword("oramond", 150, Position(33479, 31985, 7)) addTravelKeyword("krailos", 230, Position(33492, 31712, 6)) diff --git a/data-otservbr-global/npc/captain_fearless.lua b/data-otservbr-global/npc/captain_fearless.lua index e9e53eae9bc..20645de30f3 100644 --- a/data-otservbr-global/npc/captain_fearless.lua +++ b/data-otservbr-global/npc/captain_fearless.lua @@ -77,7 +77,7 @@ addTravelKeyword("port hope", 160, Position(32527, 32784, 6)) addTravelKeyword("svargrond", 150, Position(32341, 31108, 6)) addTravelKeyword("liberty bay", 180, Position(32285, 32892, 6)) addTravelKeyword("yalahar", 185, Position(32816, 31272, 6), function(player) - return player:getStorageValue(Storage.SearoutesAroundYalahar.Venore) ~= 1 and player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) < 5 + return player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Venore) ~= 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) < 5 end) addTravelKeyword("ankrahmun", 150, Position(33092, 32883, 6)) addTravelKeyword("issavi", 130, Position(33900, 31463, 6)) diff --git a/data-otservbr-global/npc/captain_greyhound.lua b/data-otservbr-global/npc/captain_greyhound.lua index 9f42bf412ed..3378a269807 100644 --- a/data-otservbr-global/npc/captain_greyhound.lua +++ b/data-otservbr-global/npc/captain_greyhound.lua @@ -67,7 +67,7 @@ addTravelKeyword("edron", 110, Position(33175, 31764, 6)) addTravelKeyword("venore", 130, Position(32954, 32022, 6)) addTravelKeyword("svargrond", 110, Position(32341, 31108, 6)) addTravelKeyword("yalahar", 185, Position(32816, 31272, 6), function(player) - return player:getStorageValue(Storage.SearoutesAroundYalahar.Carlin) ~= 1 and player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) < 5 + return player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Carlin) ~= 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) < 5 end) -- Kick diff --git a/data-otservbr-global/npc/captain_haba.lua b/data-otservbr-global/npc/captain_haba.lua index 559f7d16377..2d5bdef598a 100644 --- a/data-otservbr-global/npc/captain_haba.lua +++ b/data-otservbr-global/npc/captain_haba.lua @@ -59,12 +59,12 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end -local FishForASerpent = Storage.Quest.U8_2.FishForASerpent +local FishForASerpent = Storage.Quest.U8_2.TheHuntForTheSeaSerpent.FishForASerpent local TheHuntForTheSeaSerpent = Storage.Quest.U8_2.TheHuntForTheSeaSerpent local function greetCallback(npc, creature) local player = Player(creature) - if player:getStorageValue(TheHuntForTheSeaSerpent.QuestLine) == 2 then + if player:getStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.QuestLine) == 2 then npcHandler:setMessage(MESSAGE_GREET, "Harrr, landlubber wha'd ya want? Askin' for a {passage}?") else npcHandler:setMessage(MESSAGE_GREET, "Harrr, landlubber wha'd ya want?") @@ -82,17 +82,17 @@ local function creatureSayCallback(npc, creature, type, message) if table.contains({ "mission", "hunt", "passage" }, message:lower()) then if MsgContains(message, "passage") then - if player:getStorageValue(FishForASerpent.QuestLine) < 5 then + if player:getStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.FishForASerpent) < 5 then npcHandler:say("Hold your horses! First we need to get more {bait} fo' the sea serpent. Bring me the fish I requested and we can set sails immediately.", npc, creature) return true end end - if player:getStorageValue(FishForASerpent.QuestLine) < 0 then + if player:getStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.FishForASerpent) < 0 then npcHandler:say("Ya wanna join the hunt fo' the {sea serpent}? Be warned ya may pay with ya life! Are ya in to it?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(FishForASerpent.QuestLine) < 5 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.FishForASerpent) < 5 then npcHandler:say("You got any {baits} for me?", npc, creature) - elseif player:getStorageValue(FishForASerpent.QuestLine) >= 5 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.FishForASerpent) >= 5 then npcHandler:say("A'right, wanna put out to sea?", npc, creature) npcHandler:setTopic(playerId, 2) end @@ -100,39 +100,39 @@ local function creatureSayCallback(npc, creature, type, message) if npcHandler:getTopic(playerId) == 1 then npcHandler:say("A'right, we are here to resupply our stock of baits to catch the sea serpent. Your first task is to bring me 5 fish they are easy to catch. When you got them ask me for the {bait} again.", npc, creature) player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) - player:setStorageValue(FishForASerpent.QuestLine, 1) + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.FishForASerpent, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say("Let's go fo' a {hunt} and bring the beast down!", npc, creature) --test player:teleportTo(Position(31942, 31047, 6)) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - if player:getStorageValue(TheHuntForTheSeaSerpent.QuestLine) < 0 then - player:setStorageValue(TheHuntForTheSeaSerpent.QuestLine, 1) + if player:getStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.QuestLine) < 0 then + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.QuestLine, 1) end npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "bait") then - if player:getStorageValue(FishForASerpent.QuestLine) == 1 then + if player:getStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.FishForASerpent) == 1 then if player:removeItem(3578, 5) then npcHandler:say("Excellent, now bring me 5 northern pike.", npc, creature) - player:setStorageValue(FishForASerpent.QuestLine, 2) + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.FishForASerpent, 2) end - elseif player:getStorageValue(FishForASerpent.QuestLine) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.FishForASerpent) == 2 then if player:removeItem(3580, 5) then npcHandler:say("Excellent, now bring me 5 green perch.", npc, creature) - player:setStorageValue(FishForASerpent.QuestLine, 3) + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.FishForASerpent, 3) end - elseif player:getStorageValue(FishForASerpent.QuestLine) == 3 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.FishForASerpent) == 3 then if player:removeItem(7159, 5) then npcHandler:say("Excellent, now bring me 5 rainbow trout.", npc, creature) - player:setStorageValue(FishForASerpent.QuestLine, 4) + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.FishForASerpent, 4) end - elseif player:getStorageValue(FishForASerpent.QuestLine) == 4 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.FishForASerpent) == 4 then if player:removeItem(7158, 5) then npcHandler:say("Excellent, that should be enough fish to make the bait. Tell me when ya're ready fo' the {hunt}.", npc, creature) - player:setStorageValue(FishForASerpent.QuestLine, 5) + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.FishForASerpent, 5) end - elseif player:getStorageValue(FishForASerpent.QuestLine) >= 5 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.FishForASerpent) >= 5 then npcHandler:say("The bait is ready, tell me if ya're ready to start the hunt.", npc, creature) end end diff --git a/data-otservbr-global/npc/captain_haba_open_sea.lua b/data-otservbr-global/npc/captain_haba_open_sea.lua index 140ca090393..069f3fa02d2 100644 --- a/data-otservbr-global/npc/captain_haba_open_sea.lua +++ b/data-otservbr-global/npc/captain_haba_open_sea.lua @@ -54,9 +54,9 @@ local TheHuntForTheSeaSerpent = Storage.Quest.U8_2.TheHuntForTheSeaSerpent local function greetCallback(npc, creature) local player = Player(creature) - if player:getStorageValue(TheHuntForTheSeaSerpent.QuestLine) == 1 then + if player:getStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.QuestLine) == 1 then npcHandler:setMessage(MESSAGE_GREET, "Wha'd ya want? Ask me 'bout the {instructions} if you don't know what to do! If you wanna head back to {Svargrond}, let me know.") - elseif player:getStorageValue(TheHuntForTheSeaSerpent.QuestLine) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.QuestLine) == 2 then npcHandler:setMessage(MESSAGE_GREET, "You found the spot |PLAYERNAME|!! Grab yourself a helmet of the deep and go explore the {caves} down there.") end return true @@ -115,41 +115,41 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message:lower(), "straight") then randomMessagesResult = randomMessages.straight[math.random(#randomMessages.straight)] npcHandler:say(randomMessagesResult, npc, creature) - if player:getStorageValue(TheHuntForTheSeaSerpent.Direction) == 1 then - player:setStorageValue(TheHuntForTheSeaSerpent.SuccessSwitch, 1) - player:setStorageValue(TheHuntForTheSeaSerpent.Direction, 0) + if player:getStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.Direction) == 1 then + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.SuccessSwitch, 1) + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.Direction, 0) else - player:setStorageValue(TheHuntForTheSeaSerpent.SuccessSwitch, 0) - player:setStorageValue(TheHuntForTheSeaSerpent.Direction, 0) + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.SuccessSwitch, 0) + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.Direction, 0) end elseif MsgContains(message:lower(), "starboard") then randomMessagesResult = randomMessages.starboard[math.random(#randomMessages.starboard)] npcHandler:say(randomMessagesResult, npc, creature) - if player:getStorageValue(TheHuntForTheSeaSerpent.Direction) == 2 then - player:setStorageValue(TheHuntForTheSeaSerpent.SuccessSwitch, 1) - player:setStorageValue(TheHuntForTheSeaSerpent.Direction, 0) + if player:getStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.Direction) == 2 then + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.SuccessSwitch, 1) + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.Direction, 0) else - player:setStorageValue(TheHuntForTheSeaSerpent.SuccessSwitch, 0) - player:setStorageValue(TheHuntForTheSeaSerpent.Direction, 0) + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.SuccessSwitch, 0) + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.Direction, 0) end elseif MsgContains(message:lower(), "larboard") then randomMessagesResult = randomMessages.larboard[math.random(#randomMessages.larboard)] npcHandler:say(randomMessagesResult, npc, creature) - if player:getStorageValue(TheHuntForTheSeaSerpent.Direction) == 3 then - player:setStorageValue(TheHuntForTheSeaSerpent.SuccessSwitch, 1) - player:setStorageValue(TheHuntForTheSeaSerpent.Direction, 0) + if player:getStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.Direction) == 3 then + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.SuccessSwitch, 1) + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.Direction, 0) else - player:setStorageValue(TheHuntForTheSeaSerpent.SuccessSwitch, 0) - player:setStorageValue(TheHuntForTheSeaSerpent.Direction, 0) + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.SuccessSwitch, 0) + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.Direction, 0) end elseif MsgContains(message:lower(), "speed") then npcHandler:say("IS THAT ALL?!? SPEED UP, TIGHTEN THE MAINSAIL!!!", npc, creature) - if player:getStorageValue(TheHuntForTheSeaSerpent.Direction) == 4 then - player:setStorageValue(TheHuntForTheSeaSerpent.SuccessSwitch, 1) - player:setStorageValue(TheHuntForTheSeaSerpent.Direction, 0) + if player:getStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.Direction) == 4 then + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.SuccessSwitch, 1) + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.Direction, 0) else - player:setStorageValue(TheHuntForTheSeaSerpent.SuccessSwitch, 0) - player:setStorageValue(TheHuntForTheSeaSerpent.Direction, 0) + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.SuccessSwitch, 0) + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.Direction, 0) end elseif table.contains({ "god", "svargrond", "back", "hunt", "passage", "trip" }, message:lower()) then if table.contains({ "god", "svargrond", "back", "hunt" }, message:lower()) then diff --git a/data-otservbr-global/npc/captain_max.lua b/data-otservbr-global/npc/captain_max.lua index e72008fd526..c8d6191db32 100644 --- a/data-otservbr-global/npc/captain_max.lua +++ b/data-otservbr-global/npc/captain_max.lua @@ -65,7 +65,7 @@ local function addTravelKeyword(keyword, text, cost, destination) if keyword == "yalahar" then keywordHandler:addKeyword({ keyword }, StdModule.say, { npcHandler = npcHandler, text = "I'm sorry but we don't serve this route." }, function(player) - return player:getStorageValue(Storage.TheWayToYalahar.QuestLine) < 1 + return player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.TheWayToYalahar) < 1 end) end @@ -75,7 +75,7 @@ local function addTravelKeyword(keyword, text, cost, destination) end addTravelKeyword("calassa", "Should I bring you to Calassa for 200 gold?", 200, Position(31911, 32710, 6)) -addTravelKeyword("yalahar", "That is quite a long unprofitable travel. I'll bring you to Yalahar for 400 gold though. Is that ok with you?", 400, Position(32816, 31272, 6)) +addTravelKeyword("yalahar", "That is quite a long unprofitable travel. I'll bring you to Yalahar for 400 gold though. Is that ok with you?", 400, Position(32804, 31270, 6)) keywordHandler:addKeyword({ "sail" }, StdModule.say, { npcHandler = npcHandler, text = "Welcome on board, noble |PLAYERNAME|. I can bring you to {Calassa} or {Yalahar}, but only if you have the according mission from {Berenice} or {Wyrdin}." }) keywordHandler:addKeyword({ "passage" }, StdModule.say, { npcHandler = npcHandler, text = "Welcome on board, noble |PLAYERNAME|. I can bring you to {Calassa} or {Yalahar}, but only if you have the according mission from {Berenice} or {Wyrdin}." }) diff --git a/data-otservbr-global/npc/captain_seagull.lua b/data-otservbr-global/npc/captain_seagull.lua index f738a41a632..7e7ebd5016a 100644 --- a/data-otservbr-global/npc/captain_seagull.lua +++ b/data-otservbr-global/npc/captain_seagull.lua @@ -67,7 +67,7 @@ addTravelKeyword("gray island", 150, Position(33196, 31984, 7)) addTravelKeyword("edron", 70, Position(33175, 31764, 6)) addTravelKeyword("venore", 90, Position(32954, 32022, 6)) addTravelKeyword("yalahar", 160, Position(32816, 31272, 6), function(player) - return player:getStorageValue(Storage.SearoutesAroundYalahar.AbDendriel) ~= 1 and player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) < 5 + return player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.AbDendriel) ~= 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) < 5 end) -- Kick diff --git a/data-otservbr-global/npc/captain_sinbeard.lua b/data-otservbr-global/npc/captain_sinbeard.lua index 277d80544de..2f6b2207ec6 100644 --- a/data-otservbr-global/npc/captain_sinbeard.lua +++ b/data-otservbr-global/npc/captain_sinbeard.lua @@ -67,7 +67,7 @@ addTravelKeyword("port hope", 80, Position(32527, 32784, 6)) addTravelKeyword("liberty bay", 90, Position(32285, 32892, 6)) addTravelKeyword("darashia", 100, Position(33289, 32480, 6)) addTravelKeyword("yalahar", 230, Position(32816, 31272, 6), function(player) - return player:getStorageValue(Storage.SearoutesAroundYalahar.Ankrahmun) ~= 1 and player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) < 5 + return player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Ankrahmun) ~= 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) < 5 end) -- Kick diff --git a/data-otservbr-global/npc/carina.lua b/data-otservbr-global/npc/carina.lua index d5373f30356..c759bb25899 100644 --- a/data-otservbr-global/npc/carina.lua +++ b/data-otservbr-global/npc/carina.lua @@ -81,7 +81,7 @@ local function creatureSayCallback(npc, creature, type, message) return true end - player:setStorageValue(Storage.WhatAFoolish.ScaredCarina, 1) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.ScaredCarina, 1) npcHandler:say("IIIEEEEEK!", npc, creature) npcHandler:setTopic(playerId, 0) end @@ -94,6 +94,8 @@ local function creatureSayCallback(npc, creature, type, message) return true end +npcHandler:setMessage(MESSAGE_GREET, "Welcome, |PLAYERNAME|. I am looking forward to trade with you.") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/carlos.lua b/data-otservbr-global/npc/carlos.lua index df70b6ddb59..fe3253bc085 100644 --- a/data-otservbr-global/npc/carlos.lua +++ b/data-otservbr-global/npc/carlos.lua @@ -82,27 +82,27 @@ local function greetCallback(npc, creature) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.RookgaardTutorialIsland.CarlosNpcGreetStorage) < 1 then + if player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosNpcGreetStorage) < 1 then npcHandler:setMessage(MESSAGE_GREET, "Be greeted, |PLAYERNAME|! As a tailor and merchant I have to say - we need to do something about your {outfit}, shall we?") - player:setStorageValue(Storage.RookgaardTutorialIsland.CarlosNpcGreetStorage, 1) - player:setStorageValue(Storage.RookgaardTutorialIsland.CarlosQuestLog, 1) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosNpcGreetStorage, 1) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosQuestLog, 1) storeTalkCid[playerId] = 1 - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.CarlosNpcGreetStorage) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosNpcGreetStorage) == 1 then npcHandler:setMessage(MESSAGE_GREET, "Hey, I thought you were going to run away, but luckily you came back. I'll show you how to change your {outfit}, okay?") storeTalkCid[playerId] = 1 - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.CarlosNpcGreetStorage) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosNpcGreetStorage) == 2 then npcHandler:setMessage(MESSAGE_GREET, "Welcome back! You know, after providing my little outfit service, I like to ask a little favour of you. Can you {help} me?") storeTalkCid[playerId] = 2 - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.CarlosNpcGreetStorage) == 3 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosNpcGreetStorage) == 3 then npcHandler:setMessage(MESSAGE_GREET, "Oh hey |PLAYERNAME|, you didn't answer my question yet - could you help me get some {food}? I'll even give you some gold for it.") storeTalkCid[playerId] = 3 - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.CarlosNpcGreetStorage) == 4 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosNpcGreetStorage) == 4 then npcHandler:setMessage(MESSAGE_GREET, "Welcome back |PLAYERNAME|, I hope you changed your mind and will bring me some {meat}? I'll even give you some gold for it.") storeTalkCid[playerId] = 4 - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.CarlosNpcGreetStorage) == 5 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosNpcGreetStorage) == 5 then npcHandler:setMessage(MESSAGE_GREET, "Welcome back, |PLAYERNAME|! Did you have a successful hunt and carry a piece of {meat} or ham with you?") storeTalkCid[playerId] = 5 - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.CarlosNpcGreetStorage) == 6 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosNpcGreetStorage) == 6 then if player:getItemCount(3577) > 0 or player:getItemCount(3582) > 0 then npcHandler:setMessage(MESSAGE_GREET, "Welcome back, Isleth Eagonst! Do you still have that piece of meat or ham? If so, please ask me for a {trade} and I'll give you some gold for it.") storeTalkCid[playerId] = 6 @@ -111,13 +111,13 @@ local function greetCallback(npc, creature) npcHandler:removeInteraction(npc, creature) npcHandler:resetNpc(creature) end - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.CarlosNpcGreetStorage) == 7 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosNpcGreetStorage) == 7 then npcHandler:setMessage(MESSAGE_GREET, "Hey there, |PLAYERNAME|! Well, that's how trading with NPCs like me works. I think you are ready now to cross the bridge to Rookgaard! Take care!") - player:setStorageValue(Storage.RookgaardTutorialIsland.CarlosQuestLog, 7) - player:setStorageValue(Storage.RookgaardTutorialIsland.CarlosNpcGreetStorage, 8) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosQuestLog, 7) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosNpcGreetStorage, 8) npcHandler:removeInteraction(npc, creature) npcHandler:resetNpc(creature) - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.CarlosNpcGreetStorage) == 8 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosNpcGreetStorage) == 8 then npcHandler:setMessage(MESSAGE_GREET, "Hello again, |PLAYERNAME|! What are you still doing here? You should head over the bridge to Rookgaard village now!") npcHandler:removeInteraction(npc, creature) npcHandler:resetNpc(creature) @@ -145,33 +145,33 @@ local function creatureSayCallback(npc, creature, type, message) if table.contains({ "yes", "help", "ok" }, message) then if storeTalkCid[playerId] == 1 then npcHandler:say("Very well. Just choose an outfit and a colour combination that suits you. You can open this dialogue anytime by right-clicking on yourself and selecting 'Set Outfit'. Just try it and then talk to me again!", npc, creature) - player:setStorageValue(Storage.RookgaardTutorialIsland.CarlosNpcGreetStorage, 2) - player:setStorageValue(Storage.RookgaardTutorialIsland.CarlosQuestLog, 2) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosNpcGreetStorage, 2) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosQuestLog, 2) player:sendTutorial(12) npcHandler:removeInteraction(npc, creature) npcHandler:resetNpc(creature) elseif storeTalkCid[playerId] == 2 then npcHandler:say("You see, I'm quite hungry from standing here all day. Could you get me some {food}?", npc, creature) - player:setStorageValue(Storage.RookgaardTutorialIsland.CarlosNpcGreetStorage, 3) - player:setStorageValue(Storage.RookgaardTutorialIsland.CarlosQuestLog, 3) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosNpcGreetStorage, 3) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosQuestLog, 3) storeTalkCid[playerId] = 3 elseif storeTalkCid[playerId] == 3 then npcHandler:say("Thank you! I would do it myself, but I don't have a weapon. Just kill a few rabbits or deer, loot food from them and bring me one piece of {meat} or ham, will you?", npc, creature) - player:setStorageValue(Storage.RookgaardTutorialIsland.CarlosNpcGreetStorage, 4) - player:setStorageValue(Storage.RookgaardTutorialIsland.CarlosQuestLog, 4) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosNpcGreetStorage, 4) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosQuestLog, 4) storeTalkCid[playerId] = 4 elseif storeTalkCid[playerId] == 4 then npcHandler:say("Splendid. I'll be awaiting your return eagerly. Don't forget that you can click on the 'Chase Opponent' button to run after those fast creatures. Good {bye} for now!", npc, creature) - player:setStorageValue(Storage.RookgaardTutorialIsland.CarlosNpcGreetStorage, 5) - player:setStorageValue(Storage.RookgaardTutorialIsland.CarlosQuestLog, 5) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosNpcGreetStorage, 5) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosQuestLog, 5) npcHandler:removeInteraction(npc, creature) npcHandler:resetNpc(creature) elseif storeTalkCid[playerId] == 5 then if player:getItemCount(3577) > 0 or player:getItemCount(3582) > 0 then npcHandler:say("What's that delicious smell? That must be a piece of meat! Please hurry, simply ask me for a {trade} and I'll give you two gold pieces for it!", npc, creature) - player:setStorageValue(Storage.RookgaardTutorialIsland.CarlosQuestLog, 6) - player:setStorageValue(Storage.RookgaardTutorialIsland.CarlosNpcGreetStorage, 6) - player:setStorageValue(Storage.RookgaardTutorialIsland.CarlosNpcTradeStorage, 1) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosQuestLog, 6) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosNpcGreetStorage, 6) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosNpcTradeStorage, 1) storeTalkCid[playerId] = 6 else npcHandler:say("Hmm. No, I don't think you have something with you that I'd like to eat. Please come back once you looted a piece of meat or a piece of ham from a rabbit or deer.", npc, creature) @@ -184,8 +184,8 @@ local function creatureSayCallback(npc, creature, type, message) "And by the way: if you thought all of this was boring and you'd rather skip the tutorial with your next character, just say 'skip tutorial' to Santiago. ...", "Then you'll miss out on those nice items and experience though. Hehehe! It's your choice. Well, take care for now!", }, npc, creature) - player:setStorageValue(Storage.RookgaardTutorialIsland.CarlosQuestLog, 7) - player:setStorageValue(Storage.RookgaardTutorialIsland.CarlosNpcGreetStorage, 8) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosQuestLog, 7) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosNpcGreetStorage, 8) npcHandler:removeInteraction(npc, creature) npcHandler:resetNpc(creature) end @@ -196,8 +196,8 @@ local function creatureSayCallback(npc, creature, type, message) "And by the way: if you thought all of this was boring and you'd rather skip the tutorial with your next character, just say 'skip tutorial' to Santiago. ...", "Then you'll miss out on those nice items and experience though. Hehehe! It's your choice. Well, take care for now!", }, npc, creature) - player:setStorageValue(Storage.RookgaardTutorialIsland.CarlosQuestLog, 7) - player:setStorageValue(Storage.RookgaardTutorialIsland.CarlosNpcGreetStorage, 8) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosQuestLog, 7) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosNpcGreetStorage, 8) addEvent(function() releasePlayer(npc, creature) end, 1000) @@ -209,8 +209,8 @@ local function creatureSayCallback(npc, creature, type, message) "And by the way: if you thought all of this was boring and you'd rather skip the tutorial with your next character, just say 'skip tutorial' to Santiago. ...", "Then you'll miss out on those nice items and experience though. Hehehe! It's your choice. Well, take care for now!", }, npc, creature) - player:setStorageValue(Storage.RookgaardTutorialIsland.CarlosQuestLog, 7) - player:setStorageValue(Storage.RookgaardTutorialIsland.CarlosNpcGreetStorage, 8) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosQuestLog, 7) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosNpcGreetStorage, 8) addEvent(function() releasePlayer(npc, creature) end, 5000) @@ -223,7 +223,7 @@ local function onTradeRequest(npc, creature) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.RookgaardTutorialIsland.CarlosNpcTradeStorage) ~= 1 then + if player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.CarlosNpcTradeStorage) ~= 1 then return false end diff --git a/data-otservbr-global/npc/chantalle.lua b/data-otservbr-global/npc/chantalle.lua index dceb2ac2736..7986419417a 100644 --- a/data-otservbr-global/npc/chantalle.lua +++ b/data-otservbr-global/npc/chantalle.lua @@ -59,15 +59,15 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "key") then - if player:getStorageValue(Storage.ThievesGuild.Mission06) == 1 then + if player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission06) == 1 then local headItem = player:getSlotItem(CONST_SLOT_HEAD) if headItem and headItem.itemid == 3576 and player:getStorageValue(Storage.Postman.Rank) == 5 and player:getSex() ~= PLAYERSEX_FEMALE then player:addItem(7934) - player:setStorageValue(Storage.ThievesGuild.Mission06, 2) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission06, 2) npcHandler:say("Oh my! You look so great in your uniform! You archpostmen are not only daring but also handsome. Here take it, that's the key you wanted. Just promise to visit me now and then!", npc, creature) elseif player:removeItem(7939, 1) then player:addItem(7934) - player:setStorageValue(Storage.ThievesGuild.Mission06, 2) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission06, 2) npcHandler:say("Oh my, such a lovely necklace! Here take it, that's the key you wanted. Now let me admire my precious necklace alone.", npc, creature) else npcHandler:say("I am sorry, I am not interested in your money. Maybe you should try your luck with Herbert, the postman instead.", npc, creature) diff --git a/data-otservbr-global/npc/charles.lua b/data-otservbr-global/npc/charles.lua index a33f3188b2b..9622620006a 100644 --- a/data-otservbr-global/npc/charles.lua +++ b/data-otservbr-global/npc/charles.lua @@ -70,7 +70,7 @@ end addTravelKeyword("edron", 150, Position(33173, 31764, 6)) addTravelKeyword("venore", 160, Position(32954, 32022, 6)) addTravelKeyword("yalahar", 260, Position(32816, 31272, 6), function(player) - return player:getStorageValue(Storage.SearoutesAroundYalahar.PortHope) ~= 1 and player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) < 5 + return player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.PortHope) ~= 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) < 5 end) addTravelKeyword("ankrahmun", 110, Position(33092, 32883, 6)) addTravelKeyword("darashia", 180, Position(33289, 32480, 6)) diff --git a/data-otservbr-global/npc/chartan.lua b/data-otservbr-global/npc/chartan.lua index 8be69fc06da..41be66800c9 100644 --- a/data-otservbr-global/npc/chartan.lua +++ b/data-otservbr-global/npc/chartan.lua @@ -54,13 +54,13 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 2 then + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 2 then npcHandler:say("Mhm, what are you doing here. Who zent you? ", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 3 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 3 then npcHandler:say("Zo are you ready to get zomezing done?", npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 5 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 5 then npcHandler:say("Zo? Did you find a way to reztore ze teleporter? ", npc, creature) npcHandler:setTopic(playerId, 3) end @@ -74,8 +74,8 @@ local function creatureSayCallback(npc, creature, type, message) "I zee. Interezting. ... ", "You being here meanz we have eztablished connectionz to ze zouz. Finally. And you are going to help uz. Well, zere iz zertainly a lot for you to do. Zo better get ztarted. ", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 3) - player:setStorageValue(Storage.WrathoftheEmperor.Mission01, 3) --Questlog, Wrath of the Emperor "Mission 01: Catering the Lions Den" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 3) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission01, 3) --Questlog, Wrath of the Emperor "Mission 01: Catering the Lions Den" npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "yes") then @@ -87,23 +87,25 @@ local function creatureSayCallback(npc, creature, type, message) "Zere were meanz to activate teleporterz zomewhere in ze complex. But zinze you cannot reach all ze roomz, I guezz you will have to improvize. ... ", "Here iz ze key to ze entranze to ze complex. Figure zomezing out, reztore ze teleporter zo we can get back to ze plainz in ze zouz. ", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 4) - player:setStorageValue(Storage.WrathoftheEmperor.Mission02, 1) --Questlog, Wrath of the Emperor "Mission 02: First Contact" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 4) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission02, 1) --Questlog, Wrath of the Emperor "Mission 02: First Contact" npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then npcHandler:say({ "You did it! Zere waz zome kind of zparkle and I zink it iz working again - oh pleaze feel free to try it, I uhm, I will wait here and be ready juzt in caze zomezing uhm happenz to you. ... ", "And if you head to Zalamon, be zure to inform him about our zituation. Food rationz are running low and we are ztill not well equipped. We need to eztablish a working zupply line. ", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.TeleportAccess.Rebel, 1) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 6) - player:setStorageValue(Storage.WrathoftheEmperor.Mission02, 3) --Questlog, Wrath of the Emperor "Mission 02: First Contact" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Rebel, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 6) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission02, 3) --Questlog, Wrath of the Emperor "Mission 02: First Contact" npcHandler:setTopic(playerId, 0) end end return true end +npcHandler:setMessage(MESSAGE_GREET, "Great Znake forgive me to converze wiz ziz unworzy blankzkin.") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/chester_kahs.lua b/data-otservbr-global/npc/chester_kahs.lua index 796c3dfcb57..c885ef84f1b 100644 --- a/data-otservbr-global/npc/chester_kahs.lua +++ b/data-otservbr-global/npc/chester_kahs.lua @@ -98,27 +98,27 @@ local function creatureSayCallback(npc, creature, type, message) end npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 5 then - player:setStorageValue(Storage.SecretService.Quest, 1) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 1) npcHandler:say("Then I welcome you to the TBI. This is a great moment for you, remember it well. Talk to me about your missions whenever you feel ready.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 6 then - player:setStorageValue(Storage.SecretService.TBIMission01, 3) - player:setStorageValue(Storage.SecretService.Quest, 3) + player:setStorageValue(Storage.Quest.U8_1.SecretService.TBIMission01, 3) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 3) npcHandler:say("I think they understood the warning the way it was meant. If not, you will have to visit Venore soon again. But for now it's settled.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 7 then if player:removeItem(5956, 1) then - player:setStorageValue(Storage.SecretService.TBIMission02, 2) - player:setStorageValue(Storage.SecretService.Quest, 5) - npcHandler:say("Thank you, we can finally let them have some closure regarding this.", npc, creature) + player:setStorageValue(Storage.Quest.U8_1.SecretService.TBIMission02, 2) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 5) + npcHandler:say("I can only hope that this information are as valuable as we expected it. A good man died for them.", npc, creature) else npcHandler:say("Please bring me some proof of his whereabouts.", npc, creature) end npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 8 then if player:removeItem(5952, 1) then - player:setStorageValue(Storage.SecretService.TBIMission03, 3) - player:setStorageValue(Storage.SecretService.Quest, 7) + player:setStorageValue(Storage.Quest.U8_1.SecretService.TBIMission03, 3) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 7) npcHandler:say("I can only hope that this information are as valuable as we expected it. A good man died for them.", npc, creature) else npcHandler:say("Please bring me some valuable information!", npc, creature) @@ -126,21 +126,21 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 9 then if player:removeItem(348, 1) then - player:setStorageValue(Storage.SecretService.TBIMission04, 2) - player:setStorageValue(Storage.SecretService.Quest, 9) + player:setStorageValue(Storage.Quest.U8_1.SecretService.TBIMission04, 2) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 9) npcHandler:say("Ah yes, very interesting. Almost as I suspected. It's a good thing that we got those documents in our hands.", npc, creature) else npcHandler:say("We need those intelligence reports, do whatever you need to do agent!", npc, creature) end npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 10 then - player:setStorageValue(Storage.SecretService.TBIMission05, 3) - player:setStorageValue(Storage.SecretService.Quest, 11) + player:setStorageValue(Storage.Quest.U8_1.SecretService.TBIMission05, 3) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 11) npcHandler:say("Now that Venore is of nearly no importance anymore, there is only Carlin left to deal with.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 11 then - player:setStorageValue(Storage.SecretService.TBIMission06, 3) - player:setStorageValue(Storage.SecretService.Quest, 13) + player:setStorageValue(Storage.Quest.U8_1.SecretService.TBIMission06, 3) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 13) npcHandler:say("I already heard that our little trick worked quite well. Several officials of Carlin are already on their way to repair the damage done to their diplomatic efforts. It will not only cost them much money but also quite some time.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 12 then @@ -153,8 +153,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 13 then if player:removeItem(396, 1) then - player:setStorageValue(Storage.SecretService.Mission07, 2) - player:setStorageValue(Storage.SecretService.Quest, 15) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Mission07, 2) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 15) player:addItem(897, 1) npcHandler:say("You have done superb work agent, I grant you the title of Top Agent! Here's a little gift you might find useful.", npc, creature) else @@ -188,7 +188,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Do you need the healing now?", npc, creature) npcHandler:setTopic(playerId, 4) elseif MsgContains(message, "join") then - if player:getStorageValue(Storage.SecretService.Quest) < 1 then + if player:getStorageValue(Storage.Quest.U8_1.SecretService.Quest) < 1 then npcHandler:say({ "Our bureau is an old and traditional branch of the Thaian government. It takes more than lip service to join our ranks ...", "Absolute loyalty to the crown and the Thaian cause as well as courage face-to-face with the enemy is the least we expect from our members ...", @@ -197,9 +197,9 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 5) end elseif MsgContains(message, "mission") then - if player:getStorageValue(Storage.SecretService.Quest) == 1 and player:getStorageValue(Storage.SecretService.AVINMission01) < 1 and player:getStorageValue(Storage.SecretService.CGBMission01) < 1 then - player:setStorageValue(Storage.SecretService.Quest, 2) - player:setStorageValue(Storage.SecretService.TBIMission01, 1) + if player:getStorageValue(Storage.Quest.U8_1.SecretService.Quest) == 1 and player:getStorageValue(Storage.Quest.U8_1.SecretService.AVINMission01) < 1 and player:getStorageValue(Storage.Quest.U8_1.SecretService.CGBMission01) < 1 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 2) + player:setStorageValue(Storage.Quest.U8_1.SecretService.TBIMission01, 1) npcHandler:say({ "Your first task is to deliver a warning. Illegally, the Venoreans are crafting more ships than the Thaian authorities have allowed them ...", "Our sources have told us that those ships often end up in the hands of pirates or smugglers ...", @@ -209,12 +209,12 @@ local function creatureSayCallback(npc, creature, type, message) "If you get captured or killed during your mission, we will deny any contact with you.", }, npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.SecretService.TBIMission01) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.TBIMission01) == 2 then npcHandler:say("Have you fulfilled your current mission?", npc, creature) npcHandler:setTopic(playerId, 6) - elseif player:getStorageValue(Storage.SecretService.TBIMission01) == 3 and player:getStorageValue(Storage.SecretService.Quest) == 3 then - player:setStorageValue(Storage.SecretService.Quest, 4) - player:setStorageValue(Storage.SecretService.TBIMission02, 1) + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.TBIMission01) == 3 and player:getStorageValue(Storage.Quest.U8_1.SecretService.Quest) == 3 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 4) + player:setStorageValue(Storage.Quest.U8_1.SecretService.TBIMission02, 1) npcHandler:say({ "Your next mission concerns an internal matter for our agency. Some decades ago, one of our most talented field agents vanished in the Green Claw Swamp ...", "Nowadays, that more and more adventurers are swarming this area, there is an increasing number of reports on some sinister goings-on and mysterious ruins in the middle of the swamp ...", @@ -225,24 +225,24 @@ local function creatureSayCallback(npc, creature, type, message) "As a small incentive I think its worthy to mention that he was wearing a quite impressive armor. You may keep it for yourself if you stumble across it.", }, npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.SecretService.TBIMission02) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.TBIMission02) == 1 then npcHandler:say("Have you fulfilled your current mission?", npc, creature) npcHandler:setTopic(playerId, 7) - elseif player:getStorageValue(Storage.SecretService.TBIMission02) == 2 and player:getStorageValue(Storage.SecretService.Quest) == 5 then - player:setStorageValue(Storage.SecretService.Quest, 6) - player:setStorageValue(Storage.SecretService.TBIMission03, 1) + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.TBIMission02) == 2 and player:getStorageValue(Storage.Quest.U8_1.SecretService.Quest) == 5 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 6) + player:setStorageValue(Storage.Quest.U8_1.SecretService.TBIMission03, 1) npcHandler:say({ "One of our agents is missing. He was investigating the cause for the slow growth of our colony Port Hope ...", "You will continue these investigations at the point where the information that the lost agent has sent us ends. Some of the traders in Port Hope must have connections to persons who are interested in sabotaging our efforts in Tiquanda ...", "Search their personal belongings to find some sort of evidence that we could need!", }, npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.SecretService.TBIMission03) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.TBIMission03) == 2 then npcHandler:say("Have you fulfilled your current mission?", npc, creature) npcHandler:setTopic(playerId, 8) - elseif player:getStorageValue(Storage.SecretService.TBIMission03) == 3 and player:getStorageValue(Storage.SecretService.Quest) == 7 then - player:setStorageValue(Storage.SecretService.Quest, 8) - player:setStorageValue(Storage.SecretService.TBIMission04, 1) + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.TBIMission03) == 3 and player:getStorageValue(Storage.Quest.U8_1.SecretService.Quest) == 7 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 8) + player:setStorageValue(Storage.Quest.U8_1.SecretService.TBIMission04, 1) npcHandler:say({ "Just recently we were able to secretly help our elven friends to exposure an agitator sent by Carlin to poison our connections with them. The elves' reaction wasswift and without compromise ...", "They banished the delinquent in a place they call 'Hellgate'. Unfortunately, we learnt later that the convict was sent there with several of his belongings and it is very likely that he took vital papers with him ...", @@ -250,12 +250,12 @@ local function creatureSayCallback(npc, creature, type, message) "We don't care how you get them. Do whatever you think is necessary.", }, npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.SecretService.TBIMission04) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.TBIMission04) == 1 then npcHandler:say("Have you fulfilled your current mission?", npc, creature) npcHandler:setTopic(playerId, 9) - elseif player:getStorageValue(Storage.SecretService.TBIMission04) == 2 and player:getStorageValue(Storage.SecretService.Quest) == 9 then - player:setStorageValue(Storage.SecretService.Quest, 10) - player:setStorageValue(Storage.SecretService.TBIMission05, 1) + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.TBIMission04) == 2 and player:getStorageValue(Storage.Quest.U8_1.SecretService.Quest) == 9 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 10) + player:setStorageValue(Storage.Quest.U8_1.SecretService.TBIMission05, 1) player:addItem(349, 1) npcHandler:say({ "It's bad enough that Carlin got a solid foothold in the far North but now the Venoreans also try to move in. They try to gain influence on the barbarian raiders by bribing their leaders or making them great promises ...", @@ -263,12 +263,12 @@ local function creatureSayCallback(npc, creature, type, message) "Here is a signet ring that the Venorean emissaries use to wear. 'Lose' the ring in the north-western corner of the highest level of the tower. They will surely find it there.", }, npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.SecretService.TBIMission05) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.TBIMission05) == 2 then npcHandler:say("Have you fulfilled your current mission?", npc, creature) npcHandler:setTopic(playerId, 10) - elseif player:getStorageValue(Storage.SecretService.TBIMission05) == 3 and player:getStorageValue(Storage.SecretService.Quest) == 11 then - player:setStorageValue(Storage.SecretService.Quest, 12) - player:setStorageValue(Storage.SecretService.TBIMission06, 1) + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.TBIMission05) == 3 and player:getStorageValue(Storage.Quest.U8_1.SecretService.Quest) == 11 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 12) + player:setStorageValue(Storage.Quest.U8_1.SecretService.TBIMission06, 1) player:addItem(397, 1) npcHandler:say({ "The women of Carlin have the northern city Svargrond in the firm grip of her manicured hands. At the moment, there is little we can do about it but there is one thing that plays into our hands ...", @@ -276,24 +276,24 @@ local function creatureSayCallback(npc, creature, type, message) "If some amazonian warrior would smash a beer or ale cask in front of some witnesses, the relationship would surely suffer a bit. So go and disguise yourself as an amazon. Then use a crowbar to destroy a cask.", }, npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.SecretService.TBIMission06) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.TBIMission06) == 2 then npcHandler:say("Have you fulfilled your current mission?", npc, creature) npcHandler:setTopic(playerId, 11) - elseif player:getStorageValue(Storage.SecretService.TBIMission06) == 3 and player:getStorageValue(Storage.SecretService.Quest) == 13 then - player:setStorageValue(Storage.SecretService.Quest, 14) - player:setStorageValue(Storage.SecretService.Mission07, 1) + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.TBIMission06) == 3 and player:getStorageValue(Storage.Quest.U8_1.SecretService.Quest) == 13 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 14) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Mission07, 1) npcHandler:say({ "Great, you are here. We need your service in a mission of utmost urgency ...", "A mad dwarven technomancer that listens to the name of Blowbeard sent us a blackmailing letter. He demands to deliver all of Thais's gold to him. Else he will destroy the city with an artificial earthquake caused by one of his machines! ...", "We need you to find his base in Kazordoon and to kill him before he can use his infernal machine. Bring us his beard as proof of your success.", }, npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.SecretService.TBIMission06) == 3 and player:getStorageValue(Storage.SecretService.Mission07) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.TBIMission06) == 3 and player:getStorageValue(Storage.Quest.U8_1.SecretService.Mission07) == 1 then npcHandler:say("Have you fulfilled your current mission?", npc, creature) npcHandler:setTopic(playerId, 13) end elseif MsgContains(message, "disguise") then - if player:getStorageValue(Storage.SecretService.TBIMission06) == 1 then + if player:getStorageValue(Storage.Quest.U8_1.SecretService.TBIMission06) == 1 then npcHandler:say("If you lost or wasted your disguise kit I can replace it. It will cost you 1000 gold though since you lost royal property. Is that ok for you?", npc, creature) npcHandler:setTopic(playerId, 12) end diff --git a/data-otservbr-global/npc/chief_grarkharok.lua b/data-otservbr-global/npc/chief_grarkharok.lua index 49020883194..53b806073dd 100644 --- a/data-otservbr-global/npc/chief_grarkharok.lua +++ b/data-otservbr-global/npc/chief_grarkharok.lua @@ -53,7 +53,7 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end -local mission = Storage.Quest.U8_2.TrollSabotage +local mission = Storage.Quest.U8_2.TrollSabotageQuest local ThreatenedDreams = Storage.Quest.U11_40.ThreatenedDreams local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) @@ -71,7 +71,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "kill") or MsgContains(message, "hurt") or MsgContains(message, "pain") then - if player:getStorageValue(Storage.Quest.U8_2.TrollSabotage.Questline) == 1 then + if player:getStorageValue(Storage.Quest.U8_2.TrollSabotageQuest.Questline) == 1 then npcHandler:setTopic(playerId, 1) end npcHandler:say("Hrhrhrhr! Me no fear of human! Me Chief Grarkharok!!", npc, creature) diff --git a/data-otservbr-global/npc/chrak.lua b/data-otservbr-global/npc/chrak.lua index 4c5e8b4d654..fe2241247c8 100644 --- a/data-otservbr-global/npc/chrak.lua +++ b/data-otservbr-global/npc/chrak.lua @@ -89,6 +89,9 @@ local function creatureSayCallback(npc, creature, type, message) end return true end + +npcHandler:setMessage(MESSAGE_GREET, "Greetingz, competitor.") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/clyde.lua b/data-otservbr-global/npc/clyde.lua index fcaf9ea011a..4142cee2cbc 100644 --- a/data-otservbr-global/npc/clyde.lua +++ b/data-otservbr-global/npc/clyde.lua @@ -64,6 +64,9 @@ npcConfig.shop = { { itemName = "mug of water", clientId = 2880, buy = 2, count = 1 }, { itemName = "mug of wine", clientId = 2880, buy = 3, count = 2 }, { itemName = "tomato", clientId = 3596, buy = 3 }, + { itemName = "vial of beer", clientId = 2874, buy = 2, count = 1, subType = 3 }, + { itemName = "vial of wine", clientId = 2874, buy = 3, count = 1, subType = 2 }, + { itemName = "vial of water", clientId = 2874, buy = 1, count = 1 }, } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/curos.lua b/data-otservbr-global/npc/curos.lua index d17f36937f1..4fdffd8e90b 100644 --- a/data-otservbr-global/npc/curos.lua +++ b/data-otservbr-global/npc/curos.lua @@ -67,7 +67,7 @@ local function creatureSayCallback(npc, creature, type, message) }, npc, creature) player:setStorageValue(TheNewFrontier.Questline, 19) player:setStorageValue(TheNewFrontier.Mission06, 4) --Questlog, The New Frontier Quest "Mission 06: Days Of Doom" - elseif player:getStorageValue(TheNewFrontier.Mission06) >= 4 and player:getStorageValue(AnUneasyAlliance.Questline) < 1 then --An Uneasy Alliance Quest + elseif player:getStorageValue(TheNewFrontier.Mission06) >= 5 and player:getStorageValue(AnUneasyAlliance.Questline) < 1 then --An Uneasy Alliance Quest npcHandler:say({ "So you still think you can be of any use for us? Words are cheap and easy. Admittedly, you've passed our first test but even some resilient beast might have accomplished that. ...", "Your actions will tell if you are only yelping for attention like a puppy or if you have the teeth of a wolf. ...", @@ -81,7 +81,7 @@ local function creatureSayCallback(npc, creature, type, message) player:setStorageValue(AnUneasyAlliance.Questline, 1) player:setStorageValue(AnUneasyAlliance.QuestDoor, 0) elseif player:getStorageValue(AnUneasyAlliance.Questline) == 1 and player:getStorageValue(AnUneasyAlliance.QuestDoor) == 1 then - npcHandler:say({ "With the death of their leader, the rebels return to our camps one by one, deeply humiliated. It might be a wise decision to let a useful tool like you continue to exist." }, npc, creature) + npcHandler:say("With the death of their leader, the rebels return to our camps one by one, deeply humiliated. It might be a wise decision to let a useful tool like you continue to exist.", npc, creature) player:setStorageValue(AnUneasyAlliance.Questline, 2) elseif player:getStorageValue(AnUneasyAlliance.Questline) == 2 then npcHandler:say({ diff --git a/data-otservbr-global/npc/dane.lua b/data-otservbr-global/npc/dane.lua index c2e3c612414..f2dd71762c0 100644 --- a/data-otservbr-global/npc/dane.lua +++ b/data-otservbr-global/npc/dane.lua @@ -67,6 +67,8 @@ npcConfig.shop = { { itemName = "bottle of lemonade", clientId = 2875, buy = 12, count = 12 }, { itemName = "bottle of milk", clientId = 2875, buy = 4, count = 9 }, { itemName = "bottle of water", clientId = 2875, buy = 2, count = 1 }, + { itemName = "vial of milk", clientId = 2874, buy = 4, count = 1, subType = 9 }, + { itemName = "vial of water", clientId = 2874, buy = 2, count = 1 }, } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/daniel_steelsoul.lua b/data-otservbr-global/npc/daniel_steelsoul.lua index 88c652e9d51..9f3427a9b1e 100644 --- a/data-otservbr-global/npc/daniel_steelsoul.lua +++ b/data-otservbr-global/npc/daniel_steelsoul.lua @@ -74,45 +74,45 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("What? YOU DID IT?!?! That's...that's...er.... like I expected!! Here is your reward.", npc, creature) end elseif MsgContains(message, "task") then - if player:getStorageValue(Storage.KillingInTheNameOf.TrollTask) == 0 then + if player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.TrollTask) == 0 then if player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.TrollCount) >= 100 then npcHandler:say("Very nice, |PLAYERNAME|. That will push the trolls' forces back a little. Here is your reward!", npc, creature) player:addExperience(200, true) player:addMoney(200) - player:setStorageValue(Storage.KillingInTheNameOf.TrollTask, 1) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.TrollTask, 1) return true else npcHandler:say("Your current task is to kill 100 trolls. You have already killed " .. player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.TrollCount) .. " of them. Keep going!", npc, creature) return true end - elseif player:getStorageValue(Storage.KillingInTheNameOf.GoblinTask) == 0 then + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.GoblinTask) == 0 then if player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.GoblinCount) >= 150 then npcHandler:say("Congratulations, you've fought well against the goblin plague. Thank you! Here is your reward!", npc, creature) player:addExperience(300, true) player:addMoney(250) - player:setStorageValue(Storage.KillingInTheNameOf.GoblinTask, 1) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.GoblinTask, 1) return true else npcHandler:say("Your current task is to kill 150 goblins. You have already killed " .. player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.GoblinCount) .. " of them. Keep going!", npc, creature) return true end - elseif player:getStorageValue(Storage.KillingInTheNameOf.RotwormTask) == 0 then + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.RotwormTask) == 0 then if player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.RotwormCount) >= 300 then npcHandler:say("Well done! Thanks to you the city is a bit safer. Here's your reward!", npc, creature) player:addExperience(1000, true) player:addMoney(400) - player:setStorageValue(Storage.KillingInTheNameOf.RotwormTask, 1) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.RotwormTask, 1) return true else npcHandler:say("Your current task is to kill 300 rotworms. You have already killed " .. player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.RotwormCount) .. " of them. Keep going!", npc, creature) return true end - elseif player:getStorageValue(Storage.KillingInTheNameOf.CyclopsTask) == 0 then + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.CyclopsTask) == 0 then if player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.CyclopsCount) >= 500 then npcHandler:say("Very good job, |PLAYERNAME|. You've been a great help. Here's your reward!", npc, creature) player:addExperience(3000, true) player:addMoney(800) - player:setStorageValue(Storage.KillingInTheNameOf.CyclopsTask, 1) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.CyclopsTask, 1) return true else npcHandler:say("Your current task is to kill 500 cyclops. You have already killed " .. player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.CyclopsCount) .. " of them. Keep going!", npc, creature) @@ -120,16 +120,16 @@ local function creatureSayCallback(npc, creature, type, message) end end if player:getLevel() < 20 then - if player:getStorageValue(Storage.KillingInTheNameOf.TrollTask) < 0 then + if player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.TrollTask) < 0 then npcHandler:say({ "The trolls living west of our city have become quite a nuisance lately. Not that they are really dangerous to us, but still, we must show them that there's a line they shouldn't cross. ...", "I want you to kill 100 of them. If you succeed, I'll provide you some pretty coins and experience. Are you willing to take on this task?", }, npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.KillingInTheNameOf.TrollTask) == 1 and player:getStorageValue(Storage.KillingInTheNameOf.GoblinTask) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.TrollTask) == 1 and player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.GoblinTask) == 1 then npcHandler:say("Currently there is no new task I could entrust you with. However, you can repeat killing {goblins} or {trolls}. Which would you prefer?", npc, creature) npcHandler:setTopic(playerId, 4) - elseif player:getStorageValue(Storage.KillingInTheNameOf.TrollTask) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.TrollTask) == 1 then npcHandler:say({ "It's not only the trolls invading from the west coast. Goblins also have a lair there where they constantly prepare for their next attack. ...", "If you could kill 150 goblins for us, that'd be a good start. Would you be willing to help us in this matter?", @@ -138,7 +138,7 @@ local function creatureSayCallback(npc, creature, type, message) end end if player:getLevel() >= 30 and player:getLevel() < 60 then - if player:getStorageValue(Storage.KillingInTheNameOf.CyclopsTask) < 0 or player:getStorageValue(Storage.KillingInTheNameOf.CyclopsTask) == 1 then + if player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.CyclopsTask) < 0 or player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.CyclopsTask) == 1 then npcHandler:say({ "We've successfully driven the minotaurs off this island, but the underground city of the cyclopes - Cyclopolis - is still standing. ...", "We're always looking for adventurers who'd help us decimate the number of cyclopes. Will you assist the city of Edron by killing 500 of them?", @@ -148,7 +148,7 @@ local function creatureSayCallback(npc, creature, type, message) end end if player:getLevel() >= 20 and player:getLevel() < 40 then - if player:getStorageValue(Storage.KillingInTheNameOf.RotwormTask) < 0 or player:getStorageValue(Storage.KillingInTheNameOf.RotwormTask) == 1 then + if player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.RotwormTask) < 0 or player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.RotwormTask) == 1 then npcHandler:say("Maybe you have noticed the numerous rotworms that burrowed under Edron. They're quite a pest. You look strong enough to be able to vanquish a few for us. Do you think you can kill 300 rotworms?", npc, creature) npcHandler:setTopic(playerId, 5) return true @@ -160,7 +160,7 @@ local function creatureSayCallback(npc, creature, type, message) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.TrollCount, 0) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.TrollCount, 0) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.TrollChampionCount, 0) - player:setStorageValue(Storage.KillingInTheNameOf.TrollTask, 0) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.TrollTask, 0) npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "goblins") and npcHandler:getTopic(playerId) == 4 then npcHandler:say("Fine then! You can kill normal goblins as well as scavengers and assassins on the lower levels, but beware, they are a bit harder. Have a good hunt!", npc, creature) @@ -169,7 +169,7 @@ local function creatureSayCallback(npc, creature, type, message) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.GoblinCount, 0) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.GoblinScavengerCount, 0) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.GoblinAssassinCount, 0) - player:setStorageValue(Storage.KillingInTheNameOf.GoblinTask, 0) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.GoblinTask, 0) npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then @@ -185,7 +185,7 @@ local function creatureSayCallback(npc, creature, type, message) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.TrollCount, 0) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.TrollCount, 0) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.TrollChampionCount, 0) - player:setStorageValue(Storage.KillingInTheNameOf.TrollTask, 0) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.TrollTask, 0) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then npcHandler:say("Fine then! I'll show you the Goblin den on your map, here. Use the same passage you did when hunting for trolls. You can kill normal goblins as well as scavengers and assassins on the lower levels, but beware, they are a bit harder.", npc, creature) @@ -194,7 +194,7 @@ local function creatureSayCallback(npc, creature, type, message) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.GoblinCount, 0) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.GoblinScavengerCount, 0) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.GoblinAssassinCount, 0) - player:setStorageValue(Storage.KillingInTheNameOf.GoblinTask, 0) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.GoblinTask, 0) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 5 then npcHandler:say({ @@ -205,7 +205,7 @@ local function creatureSayCallback(npc, creature, type, message) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.RotwormCount, 0) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.RotwormCount, 0) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.CarrionWormnCount, 0) - player:setStorageValue(Storage.KillingInTheNameOf.RotwormTask, 0) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.RotwormTask, 0) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 6 then npcHandler:say({ @@ -218,7 +218,7 @@ local function creatureSayCallback(npc, creature, type, message) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.CyclopsCount, 0) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.CyclopsDroneCount, 0) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.CyclopsSmithCount, 0) - player:setStorageValue(Storage.KillingInTheNameOf.CyclopsTask, 0) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.CyclopsTask, 0) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "no") then @@ -229,12 +229,12 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Another option if you want to do a task for Edron would be to repeat killing 100 trolls. Would that suit your taste better?", npc, creature) npcHandler:setTopic(playerId, 2) elseif npcHandler:getTopic(playerId) == 5 and player:getLevel() >= 30 then - if player:getStorageValue(Storage.KillingInTheNameOf.CyclopsTask) < 0 then + if player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.CyclopsTask) < 0 then npcHandler:say("Another option if you want to do a task for Edron would be to killing 500 cyclops. Would that suit your taste better?", npc, creature) npcHandler:setTopic(playerId, 6) end elseif npcHandler:getTopic(playerId) == 6 and player:getLevel() < 40 then - if player:getStorageValue(Storage.KillingInTheNameOf.RotwormTask) < 0 or player:getStorageValue(Storage.KillingInTheNameOf.RotwormTask) == 1 then + if player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.RotwormTask) < 0 or player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.RotwormTask) == 1 then npcHandler:say("Another option if you want to do a task for Edron would be to killing 300 rotworms. Would that suit your taste better?", npc, creature) npcHandler:setTopic(playerId, 5) end diff --git a/data-otservbr-global/npc/dankwart.lua b/data-otservbr-global/npc/dankwart.lua index dfc7bc2802d..ce7bea847c7 100644 --- a/data-otservbr-global/npc/dankwart.lua +++ b/data-otservbr-global/npc/dankwart.lua @@ -59,6 +59,7 @@ npcConfig.shop = { { itemName = "meat", clientId = 3577, buy = 5 }, { itemName = "mug of mead", clientId = 2880, buy = 5, count = 16 }, { itemName = "mug of tea", clientId = 2880, buy = 3, count = 17 }, + { itemName = "vial of mead", clientId = 2874, buy = 5, count = 1, subType = 16 }, } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/dorian.lua b/data-otservbr-global/npc/dorian.lua index bdf1b61a8d0..bddcea03ccb 100644 --- a/data-otservbr-global/npc/dorian.lua +++ b/data-otservbr-global/npc/dorian.lua @@ -59,17 +59,17 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.ThievesGuild.Quest) == 1 and player:getStorageValue(Storage.ThievesGuild.Mission01) < 1 then - player:setStorageValue(Storage.ThievesGuild.Mission01, 1) + if player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Questline) == 1 and player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission01) < 1 then + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission01, 1) npcHandler:say({ "Your first job is quite easy. The Thaian officials are unwilling to share the wealth they've accumulated in their new town Port Hope. ...", "They insist that most resources belong to the crown. This is quite sad, especially ivory is in high demand. Collect 10 elephant tusks and bring them to me.", }, npc, creature) - elseif player:getStorageValue(Storage.ThievesGuild.Mission01) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission01) == 1 then npcHandler:say("Have you finished your mission?", npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.ThievesGuild.Quest) == 2 and player:getStorageValue(Storage.ThievesGuild.Mission02) < 1 then - player:setStorageValue(Storage.ThievesGuild.Mission02, 1) + elseif player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Questline) == 2 and player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission02) < 1 then + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission02, 1) npcHandler:say({ "A client of our guild would like to get a certain vase. Unfortunately, it's not for sale. Well, by the original owner, that is. ...", "We, on the other hand, would gladly sell him the vase. Therefore, it would come in handy if we get this vase in our hands. ...", @@ -77,21 +77,21 @@ local function creatureSayCallback(npc, creature, type, message) "You'll still need some lock picks to get the chest open in which the vase is stored. Must be your lucky day, as I'm selling lock picks for a fair price. ...", "You might need some of them to get that chest open. The soon to be ex-owner of that vase is Sarina, the proprietor of Carlin's general store.", }, npc, creature) - elseif player:getStorageValue(Storage.ThievesGuild.Mission02) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission02) == 2 then npcHandler:say("Have you finished your mission?", npc, creature) npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.ThievesGuild.Quest) == 3 and player:getStorageValue(Storage.ThievesGuild.Mission03) < 1 then - player:setStorageValue(Storage.ThievesGuild.Mission03, 1) + elseif player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Questline) == 3 and player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission03) < 1 then + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission03, 1) npcHandler:say({ "Our beloved king will hold a great festivity at the end of the month. Unfortunately he forgot to invite one of our guild's representatives. ...", "Of course it would be rude to point out this mistake to the king. It will be your job to get us an invitation to the ball. ...", "Moreover, It will be a great chance to check the castle for, well, opportunities. I'm sure you understand. However, it's up to that pest Oswald to give out invitations, so he's the man you're looking for.", }, npc, creature) - elseif player:getStorageValue(Storage.ThievesGuild.Mission03) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission03) == 2 then npcHandler:say("Have you finished your mission?", npc, creature) npcHandler:setTopic(playerId, 4) - elseif player:getStorageValue(Storage.ThievesGuild.Quest) == 4 and player:getStorageValue(Storage.ThievesGuild.Mission04) < 1 then - player:setStorageValue(Storage.ThievesGuild.Mission04, 1) + elseif player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Questline) == 4 and player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission04) < 1 then + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission04, 1) npcHandler:say({ "Your next mission is somewhat bigger and I'm sure much fun for you. Some new-rich merchant is being a bit more greedy than it's good for him. ...", "The good thing is he's as stupid as greedy, so we have a little but cunning plan. We arranged the boring correspondence in advance, so you'll come in when the fun starts. ...", @@ -100,36 +100,40 @@ local function creatureSayCallback(npc, creature, type, message) "Secondly, you'll need a disguise. Percybald in Carlin is an eccentric actor that might help you with that. ...", "As soon as you got both things, travel to Venore and find the merchant Nurik. Trade the false documents for the famous painting of Mina Losa and bring it to me.", }, npc, creature) - elseif player:getStorageValue(Storage.ThievesGuild.Mission04) == 7 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission04) == 7 then npcHandler:say("Have you finished your mission?", npc, creature) npcHandler:setTopic(playerId, 5) - elseif player:getStorageValue(Storage.ThievesGuild.Quest) == 5 and player:getStorageValue(Storage.ThievesGuild.Mission05) < 1 then - player:setStorageValue(Storage.ThievesGuild.Mission05, 1) - npcHandler:say("Some smugglers underneath Tiquanda, north west of Port Hope owe us some debts. Go there and steal their Golden Goblet and bring it to me.", npc, creature) - elseif player:getStorageValue(Storage.ThievesGuild.Mission05) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Questline) == 5 and player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission05) < 1 then + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission05, 1) + npcHandler:say({ + "Your next mission will lead you to Tiquanda. There is a hidden smugglers cave, north of town. ...", + "These smugglers think they don't have to pay us respect and try to withhold our share of the profit. Recently, they got hold of a certain valuable goblet. ...", + "Find them and get us this goblet as rightful payment. If you have to bash some noses during your mission, even better.", + }, npc, creature) + elseif player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission05) == 1 then npcHandler:say("Have you finished your mission?", npc, creature) npcHandler:setTopic(playerId, 6) - elseif player:getStorageValue(Storage.ThievesGuild.Quest) == 6 and player:getStorageValue(Storage.ThievesGuild.Mission06) < 1 then - player:setStorageValue(Storage.ThievesGuild.Mission06, 1) + elseif player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Questline) == 6 and player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission06) < 1 then + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission06, 1) npcHandler:say({ "Your next job will be kidnapping. You'll get us the only creature that this scrupulous trader Theodore Loveless in Liberty Bay holds dear. ...", "His little goldfish! To get that fish, you'll have to get in his room somehow. ...", "As you might know I sell lock picks, but I fear unless you're extremely lucky, you won't crack this expensive masterpiece of a lock. However, get us that fish, regardless how.", }, npc, creature) - elseif player:getStorageValue(Storage.ThievesGuild.Mission06) == 3 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission06) == 3 then npcHandler:say("Have you finished your mission?", npc, creature) npcHandler:setTopic(playerId, 7) - elseif player:getStorageValue(Storage.ThievesGuild.Quest) == 7 and player:getStorageValue(Storage.ThievesGuild.Mission07) < 1 then - player:setStorageValue(Storage.ThievesGuild.Mission07, 1) + elseif player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Questline) == 7 and player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission07) < 1 then + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission07, 1) npcHandler:say({ "We'd like to ease our lives somewhat. Therefore, we would appreciate the cooperation with one of the Venore city guards. ...", "Find some dirt about one of them. It's unimportant what it is. As soon as we have a foothold, we'll convince him to cooperate. Bring me whatever you may find.", }, npc, creature) - elseif player:getStorageValue(Storage.ThievesGuild.Mission07) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission07) == 1 then npcHandler:say("Have you finished your mission?", npc, creature) npcHandler:setTopic(playerId, 8) - elseif player:getStorageValue(Storage.ThievesGuild.Quest) == 8 and player:getStorageValue(Storage.ThievesGuild.Mission08) < 1 then - player:setStorageValue(Storage.ThievesGuild.Mission08, 1) + elseif player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Questline) == 8 and player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission08) < 1 then + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission08, 1) player:addItem(7873, 1) npcHandler:say({ "Competition might be an interesting challenge but our guild isn't really keen on competition. ...", @@ -137,13 +141,13 @@ local function creatureSayCallback(npc, creature, type, message) "Travel to the Plains of Havoc and find the base of our competitors under the ruins of the dark cathedral ...", "On the lowest level, you'll find a wall with two trophies. Place a message of our guild on the wall, right between the trophies. On your way, get rid of as many of our competitors as you can.", }, npc, creature) - elseif player:getStorageValue(Storage.ThievesGuild.Mission08) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission08) == 2 then npcHandler:say("Have you finished your mission?", npc, creature) npcHandler:setTopic(playerId, 9) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then - player:setStorageValue(Storage.ThievesGuild.Quest, 1) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Questline, 1) npcHandler:say({ "Excellent. You'll learn this trade from scratch. Our operations cover many fields of work. Some aren't even illegal. ...", "Well, as long as you don't get caught at least. Ask me for a mission whenever you're ready.", @@ -151,22 +155,22 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then if player:removeItem(3044, 10) then - player:setStorageValue(Storage.ThievesGuild.Mission01, 2) - player:setStorageValue(Storage.ThievesGuild.Quest, 2) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission01, 2) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Questline, 2) npcHandler:say("What a fine material. That will be worth a coin or two. So far, so good. Ask me for another mission if you're ready for it.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 3 then if player:removeItem(227, 1) then - player:setStorageValue(Storage.ThievesGuild.Mission02, 3) - player:setStorageValue(Storage.ThievesGuild.Quest, 3) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission02, 3) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Questline, 3) npcHandler:say("What an ugly vase. But who am I to question the taste of our customers? Anyway, I might have another mission in store for you.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 4 then if player:removeItem(7933, 1) then - player:setStorageValue(Storage.ThievesGuild.Mission03, 3) - player:setStorageValue(Storage.ThievesGuild.Quest, 4) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission03, 3) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Questline, 4) npcHandler:say({ "Ah, the key to untold riches. Don't worry, we'll make sure that no one will connect you to the disappearance of certain royal possessions. ...", "You're too valuable to us. Speaking about your value, I might have some other mission for you.", @@ -175,29 +179,29 @@ local function creatureSayCallback(npc, creature, type, message) end elseif npcHandler:getTopic(playerId) == 5 then if player:removeItem(7871, 1) then - player:setStorageValue(Storage.ThievesGuild.Mission04, 8) - player:setStorageValue(Storage.ThievesGuild.Quest, 5) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission04, 8) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Questline, 5) npcHandler:say("Excellent, that serves this fool right. I fear in your next mission, you'll have to get your hands dirty. Just ask me to learn more about it.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 6 then if player:removeItem(7369, 1) then - player:setStorageValue(Storage.ThievesGuild.Mission05, 2) - player:setStorageValue(Storage.ThievesGuild.Quest, 6) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission05, 2) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Questline, 6) npcHandler:say("That goblet is hardly worth all this trouble but we had to insist on our payment. However, I assume you are eager for more missions, so just ask.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 7 then if player:removeItem(7936, 1) then - player:setStorageValue(Storage.ThievesGuild.Mission06, 4) - player:setStorageValue(Storage.ThievesGuild.Quest, 7) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission06, 4) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Questline, 7) npcHandler:say("This little goldfish will bring us a hefty ransom! Just ask me if you're ready for another mission.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 8 then if player:removeItem(7935, 1) then - player:setStorageValue(Storage.ThievesGuild.Mission07, 2) - player:setStorageValue(Storage.ThievesGuild.Quest, 8) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission07, 2) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Questline, 8) npcHandler:say({ "Excellent, that little letter will do the trick for sure ...", "I think you're really capable and if you finish another mission, I'll allow you full access to our black market of lost and found items. Just ask me to learn more about that mission.", @@ -205,9 +209,9 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 9 then - player:setStorageValue(Storage.ThievesGuild.Mission08, 3) - player:setStorageValue(Storage.ThievesGuild.Quest, 9) - player:setStorageValue(Storage.ThievesGuild.Door, 1) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission08, 3) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Questline, 9) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Door, 1) npcHandler:say({ "Once again you've finished your job, and I'll keep my promise. From now on, you can trade with old Black Bert somewhere upstairs to get access to certain items that mightbe of value to someone like you. ...", "If you like, you can also enter the room to the left and pick one item of your choice.", @@ -215,7 +219,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "thieves") or MsgContains(message, "join") then - if player:getStorageValue(Storage.ThievesGuild.Quest) < 1 then + if player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Questline) < 1 then npcHandler:say("Hm. Well, we could use some fresh blood. Ahum. Do you want to join the thieves guild, |PLAYERNAME|?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -227,7 +231,8 @@ end npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye, |PLAYERNAME|!") npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye, |PLAYERNAME|!") -npcHandler:setMessage(MESSAGE_GREET, "Greetings, |PLAYERNAME|!") +npcHandler:setMessage(MESSAGE_GREET, "Greetings, |PLAYERNAME|! Why do you disturb me?") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/emma.lua b/data-otservbr-global/npc/emma.lua index 36a4a9f4e3e..d958a81f7c8 100644 --- a/data-otservbr-global/npc/emma.lua +++ b/data-otservbr-global/npc/emma.lua @@ -59,14 +59,14 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then - player:setStorageValue(Storage.SecretService.Quest, 1) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 1) player:addAchievement("Secret Agent") npcHandler:say("I am still a bit sceptical, but well, welcome to the girls brigade.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then if player:removeItem(648, 1) then - player:setStorageValue(Storage.SecretService.CGBMission01, 2) - player:setStorageValue(Storage.SecretService.Quest, 3) + player:setStorageValue(Storage.Quest.U8_1.SecretService.CGBMission01, 2) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 3) npcHandler:say("How unnecessarily complicated, but that's the way those Thaians are. In the end we got what we wanted and they can't do anything about it.", npc, creature) else npcHandler:say("Bring me the spellbook.", npc, creature) @@ -74,22 +74,22 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then if player:removeItem(652, 1) then - player:setStorageValue(Storage.SecretService.CGBMission02, 2) - player:setStorageValue(Storage.SecretService.Quest, 5) + player:setStorageValue(Storage.Quest.U8_1.SecretService.CGBMission02, 2) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 5) npcHandler:say("I think the druids will be pleased to hear that the immediate threat has been averted.", npc, creature) else npcHandler:say("Bring me the heart as proof.", npc, creature) end npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 4 then - player:setStorageValue(Storage.SecretService.CGBMission03, 3) - player:setStorageValue(Storage.SecretService.Quest, 7) + player:setStorageValue(Storage.Quest.U8_1.SecretService.CGBMission03, 3) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 7) npcHandler:say("Great! This blow strikes them where it hurts most: profit.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 5 then if player:removeItem(399, 1) then - player:setStorageValue(Storage.SecretService.CGBMission04, 2) - player:setStorageValue(Storage.SecretService.Quest, 9) + player:setStorageValue(Storage.Quest.U8_1.SecretService.CGBMission04, 2) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 9) npcHandler:say("I hope our craftsmen can do something with this stuff. For me it makes hardly any sense.", npc, creature) else npcHandler:say("You need to bring me those plans!", npc, creature) @@ -97,8 +97,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 6 then if player:removeItem(400, 1) then - player:setStorageValue(Storage.SecretService.CGBMission05, 2) - player:setStorageValue(Storage.SecretService.Quest, 11) + player:setStorageValue(Storage.Quest.U8_1.SecretService.CGBMission05, 2) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 11) npcHandler:say("I will have this correspondence examined by our specialists. I am sure they are quite revealing.", npc, creature) else npcHandler:say("Bring me back some hints or something!", npc, creature) @@ -106,8 +106,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 7 then if player:removeItem(401, 1) then - player:setStorageValue(Storage.SecretService.CGBMission06, 2) - player:setStorageValue(Storage.SecretService.Quest, 13) + player:setStorageValue(Storage.Quest.U8_1.SecretService.CGBMission06, 2) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 13) npcHandler:say("I hope this old book will do those researches any good. Personally I see little use to proof some bloodlines after we cut all ties to Thais.", npc, creature) else npcHandler:say("You need to bring us that book of family trees!", npc, creature) @@ -115,8 +115,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 8 then if player:removeItem(396, 1) then - player:setStorageValue(Storage.SecretService.Mission07, 2) - player:setStorageValue(Storage.SecretService.Quest, 15) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Mission07, 2) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 15) player:addAchievement("Top CGB Agent") player:addItem(898, 1) npcHandler:say({ @@ -133,41 +133,36 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("As you wish.", npc, creature) npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "join") then - if player:getStorageValue(Storage.SecretService.Quest) < 1 then + if player:getStorageValue(Storage.Quest.U8_1.SecretService.Quest) < 1 then if player:getSex() == PLAYERSEX_FEMALE then - npcHandler:say({ - "The girls brigade is the foremost front on which we fight the numerous enemies of our city ...", - "It's a constant race to stay ahead of our enemies. Absolute loyalty and the willingness to put ones life at stake are attributes that are vital for this brigade ...", - "If you join, you dedicate your service to Carlin alone! Do you truly think that you are girl enough to join the brigade?", - }, npc, creature) + npcHandler:say( + "The girls brigade is the foremost front on which we fight the numerous enemies of our city ... It's a constant race to stay ahead of our enemies. Absolute loyalty and the willingness to put ones life at stake are attributes that are vital for this brigade ... If you join, you dedicate your service to Carlin alone! Do you truly think that you are girl enough to join the brigade?", + npc, + creature + ) else - npcHandler:say({ - "A man in the girls brigade? Come on this is hilarious, this is outright stupid, this is ...", - "exactly what no one would expect. Mhm, on second thought the element of surprise might offset your male inferiority. The girls brigade is the foremost front on which we fight the numerous enemies of our city ...", - "It's a constant race to stay ahead of our enemies. Absolute loyalty and the willingness to put ones life at stake are attributes that are vital for this brigade ...", - "If you join, you dedicate your service to Carlin alone! Do you truly think that you are girl enough to join the brigade?", - }, npc, creature) + npcHandler:say("A man in the girls brigade? Come on this is hilarious, this is outright stupid, this is ... exactly what no one would expect. Mhm, on second thought the element of surprise might offset your male inferiority.", npc, creature) end npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.SecretService.TBIMission01) > 0 or player:getStorageValue(Storage.SecretService.AVINMission01) > 0 then + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.TBIMission01) > 0 or player:getStorageValue(Storage.Quest.U8_1.SecretService.AVINMission01) > 0 then npcHandler:say("Don't try to fool me. We are perfectly aware to whom you are loyal.", npc, creature) end elseif MsgContains(message, "mission") then - if player:getStorageValue(Storage.SecretService.Quest) == 1 and player:getStorageValue(Storage.SecretService.TBIMission01) < 1 and player:getStorageValue(Storage.SecretService.CGBMission01) < 1 then - player:setStorageValue(Storage.SecretService.Quest, 2) - player:setStorageValue(Storage.SecretService.CGBMission01, 1) + if player:getStorageValue(Storage.Quest.U8_1.SecretService.Quest) == 1 and player:getStorageValue(Storage.Quest.U8_1.SecretService.TBIMission01) < 1 and player:getStorageValue(Storage.Quest.U8_1.SecretService.CGBMission01) < 1 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 2) + player:setStorageValue(Storage.Quest.U8_1.SecretService.CGBMission01, 1) npcHandler:say({ "Our relations with Thais can be called strained at best. Therefore, it's not really astounding that the Thaian financed Edron's academy but refuse to share some knowledge with our druids ..", "But we won't accept this so easily. With the help of divination, we learnt that the knowledge our druids are looking for is found in a certain book ...", "It will be your task to enter the academy and to steal this book for us.", }, npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.SecretService.CGBMission01) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.CGBMission01) == 1 then npcHandler:say("Have you been successful?", npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.SecretService.CGBMission01) == 2 and player:getStorageValue(Storage.SecretService.Quest) == 3 then - player:setStorageValue(Storage.SecretService.Quest, 4) - player:setStorageValue(Storage.SecretService.CGBMission02, 1) + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.CGBMission01) == 2 and player:getStorageValue(Storage.Quest.U8_1.SecretService.Quest) == 3 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 4) + player:setStorageValue(Storage.Quest.U8_1.SecretService.CGBMission02, 1) npcHandler:say({ "The druids have asked the brigade for a favour. Given that we heavily rely on their resources and they are important supporters of our cities, we can't deny them the request ...", "A wandering druid has recently visited the Green Claw Swamp, located north west of that corrupted hell hole Venore. While gathering herbs, he noticed some malignant presence in the said area ...", @@ -178,12 +173,12 @@ local function creatureSayCallback(npc, creature, type, message) "Travel to Green Claw Swamp and rip out the heart out of the master tree. Without it, the unnatural trees will wither soon. Bring me the heart as proof.", }, npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.SecretService.CGBMission02) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.CGBMission02) == 1 then npcHandler:say("Have you been successful?", npc, creature) npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.SecretService.CGBMission02) == 2 and player:getStorageValue(Storage.SecretService.Quest) == 5 then - player:setStorageValue(Storage.SecretService.Quest, 6) - player:setStorageValue(Storage.SecretService.CGBMission03, 1) + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.CGBMission02) == 2 and player:getStorageValue(Storage.Quest.U8_1.SecretService.Quest) == 5 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 6) + player:setStorageValue(Storage.Quest.U8_1.SecretService.CGBMission03, 1) player:addItem(350, 1) npcHandler:say({ "The scheming Venoreans are a constant thorn in our side. They supply our enemies with all kind of equipment to boost the threat they pose to our freedom. It will be your task to hinder future weapon deliveries significantly ...", @@ -191,53 +186,53 @@ local function creatureSayCallback(npc, creature, type, message) "Take this box of rust bugs and use them on the keyhole of the smithy in the Ironhouse. These 'pets' will ruin all metal there and it will take them a while to get rid of them.", }, npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.SecretService.CGBMission03) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.CGBMission03) == 2 then npcHandler:say("Have you been successful?", npc, creature) npcHandler:setTopic(playerId, 4) - elseif player:getStorageValue(Storage.SecretService.CGBMission03) == 3 and player:getStorageValue(Storage.SecretService.Quest) == 7 then - player:setStorageValue(Storage.SecretService.Quest, 8) - player:setStorageValue(Storage.SecretService.CGBMission04, 1) + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.CGBMission03) == 3 and player:getStorageValue(Storage.Quest.U8_1.SecretService.Quest) == 7 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 8) + player:setStorageValue(Storage.Quest.U8_1.SecretService.CGBMission04, 1) npcHandler:say({ "Venore has plans for a new kind of ship. It will be faster and more resilient than any other known ship. It will surely improve their dominance over the sea trade. Unless we get those plans for ourselves ...", "And this is where you come into play. Find the ship plans in the Venorean shipyard or perhaps at the harbour and bring them here immediately.", }, npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.SecretService.CGBMission04) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.CGBMission04) == 1 then npcHandler:say("Have you been successful?", npc, creature) npcHandler:setTopic(playerId, 5) - elseif player:getStorageValue(Storage.SecretService.CGBMission04) == 2 and player:getStorageValue(Storage.SecretService.Quest) == 9 then - player:setStorageValue(Storage.SecretService.Quest, 10) - player:setStorageValue(Storage.SecretService.CGBMission05, 1) + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.CGBMission04) == 2 and player:getStorageValue(Storage.Quest.U8_1.SecretService.Quest) == 9 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 10) + player:setStorageValue(Storage.Quest.U8_1.SecretService.CGBMission05, 1) npcHandler:say({ "Ruins of some ancient cathedral are found south west of Venore. It was a project that the Thaians never finished. However, our scouts reported some suspicious activities there ...", "There is a continual coming and going which hints on something big hiding there. We ask you to enter the ruins of the cathedral and to find out what all these people are doing there ...", "You might find several hints there, but I am sure you will know exactly when you have found what we are looking for.", }, npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.SecretService.CGBMission05) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.CGBMission05) == 1 then npcHandler:say("Have you been successful?", npc, creature) npcHandler:setTopic(playerId, 6) - elseif player:getStorageValue(Storage.SecretService.CGBMission05) == 2 and player:getStorageValue(Storage.SecretService.Quest) == 11 then - player:setStorageValue(Storage.SecretService.Quest, 12) - player:setStorageValue(Storage.SecretService.CGBMission06, 1) + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.CGBMission05) == 2 and player:getStorageValue(Storage.Quest.U8_1.SecretService.Quest) == 11 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 12) + player:setStorageValue(Storage.Quest.U8_1.SecretService.CGBMission06, 1) npcHandler:say({ "As you might know, once the old aristocracy of our city shared blood-ties with the noblemen of Thais. There are many unresolved claims for titles and family heirlooms and Thais does little to help in this matter ...", "Therefore, we will take matters into our own hands. There is a grave in the crypts on the Isle of the Kings in which we assume a book containing ancient family histories and family trees ...", "We need this book! We will not ask how you acquired it.", }, npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.SecretService.CGBMission06) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.CGBMission06) == 1 then npcHandler:say("Have you been successful?", npc, creature) npcHandler:setTopic(playerId, 7) - elseif player:getStorageValue(Storage.SecretService.CGBMission06) == 2 and player:getStorageValue(Storage.SecretService.Quest) == 13 then - player:setStorageValue(Storage.SecretService.Quest, 14) - player:setStorageValue(Storage.SecretService.Mission07, 1) + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.CGBMission06) == 2 and player:getStorageValue(Storage.Quest.U8_1.SecretService.Quest) == 13 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 14) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Mission07, 1) npcHandler:say({ "I have bad news: a mad dwarf threatens to destroy our beloved city. He claims to have invented some device that enables him to destroy the whole city ...", "He has a laboratory somewhere in Kazordoon, probably somewhere near the technomancer hall. Find him and kill him! Bring me his beard as a proof!", }, npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.SecretService.CGBMission06) == 2 and player:getStorageValue(Storage.SecretService.Mission07) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.CGBMission06) == 2 and player:getStorageValue(Storage.Quest.U8_1.SecretService.Mission07) == 1 then npcHandler:say("Have you been successful?", npc, creature) npcHandler:setTopic(playerId, 8) end diff --git a/data-otservbr-global/npc/emperor_rehal.lua b/data-otservbr-global/npc/emperor_rehal.lua index 2f5411e7b84..253156c4aa8 100644 --- a/data-otservbr-global/npc/emperor_rehal.lua +++ b/data-otservbr-global/npc/emperor_rehal.lua @@ -50,46 +50,66 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end -keywordHandler:addKeyword({ "hi" }, StdModule.say, { npcHandler = npcHandler, onlyUnfocus = true }) -keywordHandler:addKeyword({ "hello" }, StdModule.say, { npcHandler = npcHandler, onlyUnfocus = true }) +local function endConversationWithDelay(npcHandler, npc, creature) + addEvent(function() + npcHandler:unGreet(npc, creature) + end, 1000) +end + +local function greetCallback(npc, creature, message) + local player = Player(creature) + local playerId = player:getId() + + if not MsgContains(message, "hail emperor") then + endConversationWithDelay(npcHandler, npc, creature) + return false + end + + npcHandler:say("May Fire and Earth bless you, stranger. What leads you to Beregar, the dwarven city?", npc, creature) + npcHandler:setInteraction(npc, creature) + + return true +end local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() if MsgContains(message, "nokmir") then - if player:getStorageValue(Storage.HiddenCityOfBeregar.JusticeForAll) == 1 then + if player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.JusticeForAll) == 1 then npcHandler:say("I always liked him and I still can't believe that he really stole that ring.", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.HiddenCityOfBeregar.JusticeForAll) == 4 and player:removeItem(8777, 1) then + elseif player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.JusticeForAll) == 4 and player:removeItem(8777, 1) then npcHandler:say("Interesting. The fact that you have the ring means that Nokmir can't have stolen it. Combined with the information Grombur gave you, the case appears in a completely different light. ...", npc, creature) npcHandler:say("Let there be justice for all. Nokmir is innocent and acquitted from all charges! And Rerun... I want him in prison for this malicious act!", npc, creature) - player:setStorageValue(Storage.HiddenCityOfBeregar.JusticeForAll, 5) + player:setStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.JusticeForAll, 5) end elseif MsgContains(message, "grombur") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("He's very ambitious and always volunteers for the long shifts.", npc, creature) - player:setStorageValue(Storage.HiddenCityOfBeregar.JusticeForAll, 2) + player:setStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.JusticeForAll, 2) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "mission") then - if player:getStorageValue(Storage.HiddenCityOfBeregar.RoyalRescue) < 1 and player:getStorageValue(Storage.HiddenCityOfBeregar.JusticeForAll) > 4 then + if player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.RoyalRescue) < 1 and player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.JusticeForAll) > 4 then npcHandler:say("As you have proven yourself trustworthy I'm going to assign you a special mission. Are you interested?", npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.HiddenCityOfBeregar.RoyalRescue) == 7 then + elseif player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.RoyalRescue) == 7 then npcHandler:say("My son was captured by trolls? Doesn't sound like him, but if you say so. Now you want a reward, huh? ...", npc, creature) npcHandler:setTopic(playerId, 3) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 2 then - npcHandler:say("Splendid! My son Rehon set off on an expedition to the deeper mines. He and a group of dwarfs were to search for new veins of crystal. Unfortunately they have been missing for 2 weeks now. ...", npc, creature) - npcHandler:say("Find my son and if he's alive bring him back. You will find a reactivated ore wagon tunnel at the entrance of the great citadel which leades to the deeper mines. If you encounter problems within the tunnel go ask Xorlosh, he can help you.", npc, creature) - player:setStorageValue(Storage.HiddenCityOfBeregar.RoyalRescue, 1) + npcHandler:say({ + "Splendid! My son Rehon set off on an expedition to the deeper mines. He and a group of dwarfs were to search for new veins of crystal. Unfortunately they have been missing for 2 weeks now. ...", + "Find my son and if he's alive bring him back. You will find a reactivated ore wagon tunnel at the entrance of the great citadel which leades to the deeper mines. If you encounter problems within the tunnel go ask Xorlosh, he can help you.", + }, npc, creature) + player:setStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.RoyalRescue, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then npcHandler:say("Look at these dwarven legs. They were forged years ago by a dwarf who was rather tall for our kind. I want you to have them. Thank you for rescuing my son |PLAYERNAME|.", npc, creature) player:addItem(3398, 1) - player:setStorageValue(Storage.HiddenCityOfBeregar.RoyalRescue, 8) + player:setStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.RoyalRescue, 8) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "no") then @@ -101,14 +121,12 @@ local function creatureSayCallback(npc, creature, type, message) return true end +keywordHandler:addCustomGreetKeyword({ "hail emperor" }, greetCallback, { npcHandler = npcHandler }) + local node1 = keywordHandler:addKeyword({ "promot" }, StdModule.say, { npcHandler = npcHandler, onlyFocus = true, text = "I can promote you for 20000 gold coins. Do you want me to promote you?" }) node1:addChildKeyword({ "yes" }, StdModule.promotePlayer, { npcHandler = npcHandler, cost = 20000, level = 20, promotion = 1, text = "Congratulations! You are now promoted." }) node1:addChildKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, onlyFocus = true, text = "Alright then, come back when you are ready.", reset = true }) --- Greeting message -keywordHandler:addGreetKeyword({ "hail emperor" }, { npcHandler = npcHandler, text = "May fire and earth bless you, stranger. What leads you to Beregar, the dwarven city?" }) -keywordHandler:addGreetKeyword({ "salutations emperor" }, { npcHandler = npcHandler, text = "May fire and earth bless you, stranger. What leads you to Beregar, the dwarven city?" }) - npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:setCallback(CALLBACK_GREET, greetCallback) diff --git a/data-otservbr-global/npc/eroth.lua b/data-otservbr-global/npc/eroth.lua index 6e54910817a..e8b59fa681f 100644 --- a/data-otservbr-global/npc/eroth.lua +++ b/data-otservbr-global/npc/eroth.lua @@ -45,6 +45,44 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function creatureSayCallback(npc, creature, type, message) + local player = Player(creature) + local playerId = player:getId() + + -- Check if NPC can interact with the creature + if not npcHandler:checkInteraction(npc, creature) then + return false + end + + -- Check if the message contains "mission" + if MsgContains(message, "mission") then + -- Check if player is starting the quest + if player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.Questline) < 1 then + npcHandler:say("Have you ever heard of Elvenbane? It is the castle west of Ab'Dendriel which is inhabited by villains from all over the continent. Any support in this war is welcome. Are you willing to help?", npc, creature) + npcHandler:setTopic(playerId, 1) + -- Check if player has completed certain objectives + elseif player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.Questline) == 2 and player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.DwarvenShield) == 1 and player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.MorningStar) == 1 and player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.BP1) == 1 and player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.BP2) == 1 then + npcHandler:say("I heard the blow! The reflection must have caused a overcharge of magical energy leading to the contraction and the implosion. Just like I hoped! Please take this as a reward. Thank you very much.", npc, creature) + player:addItem(3082, 1) + player:addItem(3035, 10) + player:setStorageValue(Storage.TibiaTales.ToBlindTheEnemy.Questline, 3) + npcHandler:setTopic(playerId, 0) + end + -- Check if the player has accepted the mission + elseif npcHandler:getTopic(playerId) == 1 and MsgContains(message, "yes") then + npcHandler:say({ + "Recently we found out that they are in the possession of a scrying crystal ball. They can hear all our discussions about tactics and upcoming attacks. ...", + "No wonder that they always have been so well prepared. Now you come into play, destroy the scrying crystal ball in Elvenbane. It should be on the top floor. ...", + "We don't really know how to destroy it but we suppose it may work if you reflect the invisible power of the ball. The beam should be adjusted to Ab'Dendriel. Take this mirror and give it a try. Good luck.", + }, npc, creature) + player:addItem(3463, 1) + player:setStorageValue(Storage.TibiaTales.ToBlindTheEnemy.Questline, 1) + npcHandler:setTopic(playerId, 0) + end + + return true +end + keywordHandler:addKeyword({ "job" }, StdModule.say, { npcHandler = npcHandler, text = "I am the leader of the Cenath caste." }) keywordHandler:addKeyword({ "kuridai" }, StdModule.say, { npcHandler = npcHandler, text = "The Kuridai are aggressive and victims of their instincts. Without our help they would surely die in a foolish war." }) keywordHandler:addKeyword({ "crunor" }, StdModule.say, { npcHandler = npcHandler, text = "Gods are for the weak. We will master the world on our own. We need no gods." }) diff --git a/data-otservbr-global/npc/frafnar.lua b/data-otservbr-global/npc/frafnar.lua index 21824471796..288d8d22732 100644 --- a/data-otservbr-global/npc/frafnar.lua +++ b/data-otservbr-global/npc/frafnar.lua @@ -58,25 +58,31 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.HiddenCityOfBeregar.SweetAsChocolateCake) < 1 then + if player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.SweetAsChocolateCake) < 1 then npcHandler:say("There is indeed something you could do for me. You must know, I'm in love with Bolfana. I'm sure she'd have a beer with me if I got her a chocolate cake. Problem is that I can't leave this door as I'm on duty. Would you be so kind and help me?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.HiddenCityOfBeregar.SweetAsChocolateCake) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.SweetAsChocolateCake) == 2 then npcHandler:say("So did you tell her that the cake came from me?", npc, creature) npcHandler:setTopic(playerId, 2) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then - player:setStorageValue(Storage.HiddenCityOfBeregar.SweetAsChocolateCake, 1) - player:setStorageValue(Storage.HiddenCityOfBeregar.DefaultStart, 1) + player:setStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.SweetAsChocolateCake, 1) + player:setStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.DefaultStart, 1) npcHandler:say("Great! She works in the tavern of Beregar. It's situated in the western part of the city. Bring her a chocolate cake and tell her that it was me who sent it.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then - player:setStorageValue(Storage.HiddenCityOfBeregar.SweetAsChocolateCake, 3) - player:setStorageValue(Storage.HiddenCityOfBeregar.DoorWestMine, 1) - npcHandler:say("Great! That's my breakthrough. Now she can't refuse to go out with me. I grant you access to the western part of the mine.", npc, creature) - npcHandler:setTopic(playerId, 0) + npcHandler:say({ + "Great! That's my breakthrough. Now she can't refuse to go out with me. I grant you access to the western part of the mine.", + "So did you tell her that the cake came from me?", + }, npc, creature) + npcHandler:setTopic(playerId, 3) end + elseif MsgContains(message, "no") and npcHandler:getTopic(playerId) == 3 then + npcHandler:say("I hope your kidding 'cause I'll find out WHAT you've told her and I can get reeeeaaaalllly angry. I grant you access to the western part of the mine.....for NOW.", npc, creature) + player:setStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.SweetAsChocolateCake, 3) + player:setStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.DoorWestMine, 1) + npcHandler:setTopic(playerId, 0) end return true end diff --git a/data-otservbr-global/npc/freezhild.lua b/data-otservbr-global/npc/freezhild.lua index f1fde236040..d7d90d93b5b 100644 --- a/data-otservbr-global/npc/freezhild.lua +++ b/data-otservbr-global/npc/freezhild.lua @@ -59,15 +59,15 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "weapons") then - if player:getStorageValue(Storage.SecretService.AVINMission06) == 1 then + if player:getStorageValue(Storage.Quest.U8_1.SecretService.AVINMission06) == 1 then npcHandler:say("Crate of weapons you say.. for me?", npc, creature) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then if player:removeItem(405, 1) then - player:setStorageValue(Storage.SecretService.AVINMission06, 2) - npcHandler:say("Why thank you |PLAYERNAME|.", npc, creature) + player:setStorageValue(Storage.Quest.U8_1.SecretService.AVINMission06, 2) + npcHandler:say("I'm wondering why you are doing this. Well, we accept the gift. Don't think that this makes you a friend though.", npc, creature) else npcHandler:say("You don't have any crate of weapons!", npc, creature) end diff --git a/data-otservbr-global/npc/gabel.lua b/data-otservbr-global/npc/gabel.lua index 85eabcc2882..58b5d1b31cb 100644 --- a/data-otservbr-global/npc/gabel.lua +++ b/data-otservbr-global/npc/gabel.lua @@ -139,29 +139,29 @@ local function creatureSayCallback(npc, creature, type, message) end npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "task") and player:getStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission03) == 3 then - if player:getStorageValue(Storage.KillingInTheNameOf.GreenDjinnTask) < 0 or player:getStorageValue(Storage.KillingInTheNameOf.GreenDjinnTask) == 3 then + if player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.GreenDjinnTask) < 0 or player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.GreenDjinnTask) == 3 then npcHandler:say({ "You've proven to be an experienced soldier, human. Though I still hope the war to be over soon, the Efreet are still threatening our tower. ...", "Thus we need your help in killing the green ones. If you kill 500 green djinns or Efreet for us, I'll reward you with bonus experience and some extra gold pieces. Do you agree?", }, npc, creature) npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.KillingInTheNameOf.GreenDjinnTask) == 0 then + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.GreenDjinnTask) == 0 then if player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.GreenDjinnCount) >= 500 then npcHandler:say({ "You've done it, human! Daraman be praised! Take this for your efforts. ...", "What's left to do now is seek out Merikh the Slaughterer, an especially cruel Efreet. He hides somewhere in Yalahar. I don't know if you can kill him, but you should at least try.", }, npc, creature) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BossKillCount.MerikhCount, 0) - player:setStorageValue(Storage.KillingInTheNameOf.GreenDjinnTask, 1) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.GreenDjinnTask, 1) else npcHandler:say("Come back when you kill 500 green djinns or Efreet.", npc, creature) end - elseif player:getStorageValue(Storage.KillingInTheNameOf.GreenDjinnTask) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.GreenDjinnTask) == 2 then npcHandler:say({ "So you've been there and faced Merikh the Slaughterer! Whether you killed him or not, I hope your presence at least scared him. He is so mighty that we can only hope to truly defeat him one day. ...", "When you've recovered from your fight and would like to kill green djinns in our service again, just talk to me about that task.", }, npc, creature) - player:setStorageValue(Storage.KillingInTheNameOf.GreenDjinnTask, 3) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.GreenDjinnTask, 3) player:addExperience(10000, true) player:addMoney(5000) end @@ -171,7 +171,7 @@ local function creatureSayCallback(npc, creature, type, message) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.GreenDjinnCount, 0) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.GreenDjinnCount, 0) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.EfreetCount, 0) - player:setStorageValue(Storage.KillingInTheNameOf.GreenDjinnTask, 0) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.GreenDjinnTask, 0) end return true end diff --git a/data-otservbr-global/npc/gamel.lua b/data-otservbr-global/npc/gamel.lua index 96e9cb0540d..f6b50617a3b 100644 --- a/data-otservbr-global/npc/gamel.lua +++ b/data-otservbr-global/npc/gamel.lua @@ -60,8 +60,8 @@ local function greetCallback(npc, creature) local playerId = creature:getId() local player = Player(creature) - if player:getStorageValue(Storage.SecretService.AVINMission01) == 1 and player:getItemCount(402) > 0 then - player:setStorageValue(Storage.SecretService.AVINMission01, 2) + if player:getStorageValue(Storage.Quest.U8_1.SecretService.AVINMission01) == 1 and player:getItemCount(402) > 0 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.AVINMission01, 2) npcHandler:say("I don't like the way you look. Help me boys!", npc, creature) for i = 1, 2 do Game.createMonster("Bandit", npc:getPosition()) @@ -82,14 +82,14 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "letter") then - if player:getStorageValue(Storage.SecretService.AVINMission01) == 2 then + if player:getStorageValue(Storage.Quest.U8_1.SecretService.AVINMission01) == 2 then npcHandler:say("You have a letter for me?", npc, creature) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then if player:removeItem(402, 1) then - player:setStorageValue(Storage.SecretService.AVINMission01, 3) + player:setStorageValue(Storage.Quest.U8_1.SecretService.AVINMission01, 3) npcHandler:say("Oh well. I guess I am still on the hook. Tell your 'uncle' I will proceed as he suggested.", npc, creature) else npcHandler:say("You don't have any letter!", npc, creature) diff --git a/data-otservbr-global/npc/gate_guardian.lua b/data-otservbr-global/npc/gate_guardian.lua index 026db634934..cef450aedb2 100644 --- a/data-otservbr-global/npc/gate_guardian.lua +++ b/data-otservbr-global/npc/gate_guardian.lua @@ -54,15 +54,15 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") or MsgContains(message, "pass") then - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 13 then + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 13 then npcHandler:say("You want entranzzze to zzze zzzity?", npc, creature) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("Mh, zzzezzze paperzzz zzzeem legit, I have orderzzz to let you pazzz. Zzzo be it.", npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 22) - player:setStorageValue(Storage.WrathoftheEmperor.Mission05, 2) --Questlog, Wrath of the Emperor "Mission 05: New in Town" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 22) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission05, 2) --Questlog, Wrath of the Emperor "Mission 05: New in Town" player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:teleportTo(Position(33114, 31197, 7), false) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) @@ -72,6 +72,8 @@ local function creatureSayCallback(npc, creature, type, message) return true end +npcHandler:setMessage(MESSAGE_GREET, "Chhhhzzz. Ugly humanzzz! You better have a good reazzzon to be here!") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/ghost_of_a_priest.lua b/data-otservbr-global/npc/ghost_of_a_priest.lua index b73a40fbea1..0469ec86d5d 100644 --- a/data-otservbr-global/npc/ghost_of_a_priest.lua +++ b/data-otservbr-global/npc/ghost_of_a_priest.lua @@ -54,8 +54,8 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") or MsgContains(message, "sceptre") then - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 10 then - if player:getPosition().z == 12 and player:getStorageValue(Storage.WrathoftheEmperor.GhostOfAPriest01) < 1 and npcHandler:getTopic(playerId) ~= 1 then + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 10 then + if player:getPosition().z == 12 and player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.GhostOfAPriest01) < 1 and npcHandler:getTopic(playerId) ~= 1 then npcHandler:say({ "Although we are willing to hand this item to you, there is something you have to understand: There is no such thing as 'the' sceptre. ...", "Those sceptres are created for special purposes each time anew. Therefore you will have to create one on your own. It will be your {mission} to find us three keepers and to get the three parts of the holy sceptre. ...", @@ -68,13 +68,13 @@ local function creatureSayCallback(npc, creature, type, message) "The equivalent of 5000 gold will do. Are you willing to make such a donation?", }, npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getPosition().z == 13 and player:getStorageValue(Storage.WrathoftheEmperor.GhostOfAPriest02) < 1 then + elseif player:getPosition().z == 13 and player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.GhostOfAPriest02) < 1 then npcHandler:say({ "Even though we are spirits, we can't create anything out of thin air. You will have to donate some precious metal which we can drain for energy and substance. ...", "The equivalent of 5000 gold will do. Are you willing to make such a donation?", }, npc, creature) npcHandler:setTopic(playerId, 3) - elseif player:getPosition().z == 14 and player:getStorageValue(Storage.WrathoftheEmperor.GhostOfAPriest03) < 1 then + elseif player:getPosition().z == 14 and player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.GhostOfAPriest03) < 1 then npcHandler:say({ "Even though we are spirits, we can't create anything out of thin air. You will have to donate some precious metal which we can drain for energy and substance. ...", "The equivalent of 5000 gold will do. Are you willing to make such a donation?", @@ -85,7 +85,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 2 then if player:getMoney() + player:getBankBalance() >= 5000 then - player:setStorageValue(Storage.WrathoftheEmperor.GhostOfAPriest01, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.GhostOfAPriest01, 1) player:removeMoneyBank(5000) player:addItem(11368, 1) npcHandler:say("So be it! Here is my part of the sceptre. Combine it with the other parts on the altar of the Great Snake in the depths of this temple.", npc, creature) @@ -93,7 +93,7 @@ local function creatureSayCallback(npc, creature, type, message) end elseif npcHandler:getTopic(playerId) == 3 then if player:getMoney() + player:getBankBalance() >= 5000 then - player:setStorageValue(Storage.WrathoftheEmperor.GhostOfAPriest02, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.GhostOfAPriest02, 1) player:removeMoneyBank(5000) player:addItem(11369, 1) npcHandler:say("So be it! Here is my part of the sceptre. Combine it with the other parts on the altar of the Great Snake in the depths of this temple.", npc, creature) @@ -101,7 +101,7 @@ local function creatureSayCallback(npc, creature, type, message) end elseif npcHandler:getTopic(playerId) == 4 then if player:getMoney() + player:getBankBalance() >= 5000 then - player:setStorageValue(Storage.WrathoftheEmperor.GhostOfAPriest03, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.GhostOfAPriest03, 1) player:removeMoneyBank(5000) player:addItem(11370, 1) npcHandler:say("So be it! Here is my part of the sceptre. Combine it with the other parts on the altar of the Great Snake in the depths of this temple.", npc, creature) diff --git a/data-otservbr-global/npc/gree_dee.lua b/data-otservbr-global/npc/gree_dee.lua index 9415ef79105..287edb79a1b 100644 --- a/data-otservbr-global/npc/gree_dee.lua +++ b/data-otservbr-global/npc/gree_dee.lua @@ -84,6 +84,7 @@ npcConfig.shop = { { itemName = "waterskin of water", clientId = 2901, buy = 40, count = 1 }, { itemName = "wooden hammer", clientId = 3459, sell = 15 }, { itemName = "worm", clientId = 3492, buy = 1 }, + { itemName = "vial of water", clientId = 2874, buy = 10, count = 1 }, } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/grizzly_adams.lua b/data-otservbr-global/npc/grizzly_adams.lua index b51e8ddf2ce..178c15a9bd2 100644 --- a/data-otservbr-global/npc/grizzly_adams.lua +++ b/data-otservbr-global/npc/grizzly_adams.lua @@ -132,14 +132,14 @@ local function greetCallback(npc, creature) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.KillingInTheNameOf.QuestLogEntry) ~= 0 then + if player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.QuestLogEntry) ~= 0 then npcHandler:setMessage(MESSAGE_GREET, "Hi there, do you want to to {join} the 'Paw and Fur - Hunting Elite'?") elseif - player:getStorageValue(Storage.KillingInTheNameOf.PawAndFurRank) < 0 and player:getStorageValue(POINTSSTORAGE) >= 10 and player:getLevel() >= 6 -- to Huntsman Rank - or player:getStorageValue(Storage.KillingInTheNameOf.PawAndFurRank) == 0 and player:getStorageValue(POINTSSTORAGE) >= 20 and player:getLevel() >= 6 -- to Ranger Rank - or player:getStorageValue(Storage.KillingInTheNameOf.PawAndFurRank) == 2 and player:getStorageValue(POINTSSTORAGE) >= 40 and player:getLevel() >= 50 -- to Big Game Hunter Rank - or player:getStorageValue(Storage.KillingInTheNameOf.PawAndFurRank) == 4 and player:getStorageValue(POINTSSTORAGE) >= 70 and player:getLevel() >= 80 -- to Trophy Hunter Rank - or player:getStorageValue(Storage.KillingInTheNameOf.PawAndFurRank) == 6 and player:getStorageValue(POINTSSTORAGE) >= 100 and player:getLevel() >= 130 + player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PawAndFurRank) < 0 and player:getStorageValue(POINTSSTORAGE) >= 10 and player:getLevel() >= 6 -- to Huntsman Rank + or player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PawAndFurRank) == 0 and player:getStorageValue(POINTSSTORAGE) >= 20 and player:getLevel() >= 6 -- to Ranger Rank + or player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PawAndFurRank) == 2 and player:getStorageValue(POINTSSTORAGE) >= 40 and player:getLevel() >= 50 -- to Big Game Hunter Rank + or player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PawAndFurRank) == 4 and player:getStorageValue(POINTSSTORAGE) >= 70 and player:getLevel() >= 80 -- to Trophy Hunter Rank + or player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PawAndFurRank) == 6 and player:getStorageValue(POINTSSTORAGE) >= 100 and player:getLevel() >= 130 then -- to Elite Hunter Rank npcHandler:setMessage(MESSAGE_GREET, "Good to see you again |PLAYERNAME|. You gained " .. player:getStorageValue(POINTSSTORAGE) .. " points for our society. Ask me for {promotion} to advance your rank!") else @@ -357,8 +357,8 @@ local function checkX(npc, player, d, message) npcHandler:say(messageBossStart[tasks.GrizzlyAdams[m].bossId], npc, player) player:setStorageValue(tasks.GrizzlyAdams[m].rewards[n].value[1], 1) player:setStorageValue(tasks.GrizzlyAdams[m].rewards[n].value[2], 0) - player:setStorageValue(Storage.KillingInTheNameOf.BossPoints, player:getStorageValue(Storage.KillingInTheNameOf.BossPoints) - 1) - player:setStorageValue(Storage.KillingInTheNameOf.QuestLogEntry, player:getStorageValue(Storage.KillingInTheNameOf.QuestLogEntry)) -- fake update + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BossPoints, player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BossPoints) - 1) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.QuestLogEntry, player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.QuestLogEntry)) -- fake update return true else npcHandler:say("You have '" .. tasks.GrizzlyAdams[m].bossName .. "' task active.", npc, player) @@ -409,10 +409,10 @@ local function creatureSayCallback(npc, creature, type, message) return string.upper(a) .. b end) - if (MsgContains("join", message) or MsgContains("yes", message)) and npcHandler:getTopic(playerId) == 0 and player:getStorageValue(Storage.KillingInTheNameOf.QuestLogEntry) ~= 0 then + if (MsgContains("join", message) or MsgContains("yes", message)) and npcHandler:getTopic(playerId) == 0 and player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.QuestLogEntry) ~= 0 then player:setStorageValue(JOIN_STOR, 1) - player:setStorageValue(Storage.KillingInTheNameOf.BossPoints, 0) - player:setStorageValue(Storage.KillingInTheNameOf.QuestLogEntry, 0) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BossPoints, 0) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.QuestLogEntry, 0) player:setStorageValue(POINTSSTORAGE, 0) npcHandler:say("Great! A warm welcome to our newest member: |PLAYERNAME|! Ask me for a {task} if you want to go on a hunt.", npc, creature) elseif table.contains({ "report", "reports" }, message:lower()) then @@ -422,18 +422,18 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("You have nothing to report.", npc, creature) end elseif table.contains({ "tasks", "task", "mission" }, message:lower()) then - if player:getStorageValue(Storage.KillingInTheNameOf.QuestLogEntry) ~= 0 then + if player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.QuestLogEntry) ~= 0 then return npcHandler:say("You'll have to {join}, to get any {tasks}.", npc, creature) end if checkZ(npc, player, message) == true then return true end if - player:getStorageValue(Storage.KillingInTheNameOf.PawAndFurRank) < 0 and player:getStorageValue(POINTSSTORAGE) >= 10 and player:getLevel() >= 6 -- to Huntsman Rank - or player:getStorageValue(Storage.KillingInTheNameOf.PawAndFurRank) == 0 and player:getStorageValue(POINTSSTORAGE) >= 20 and player:getLevel() >= 6 -- to Ranger Rank - or player:getStorageValue(Storage.KillingInTheNameOf.PawAndFurRank) == 2 and player:getStorageValue(POINTSSTORAGE) >= 40 and player:getLevel() >= 50 -- to Big Game Hunter Rank - or player:getStorageValue(Storage.KillingInTheNameOf.PawAndFurRank) == 4 and player:getStorageValue(POINTSSTORAGE) >= 70 and player:getLevel() >= 80 -- to Trophy Hunter Rank - or player:getStorageValue(Storage.KillingInTheNameOf.PawAndFurRank) == 6 and player:getStorageValue(POINTSSTORAGE) >= 100 and player:getLevel() >= 130 + player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PawAndFurRank) < 0 and player:getStorageValue(POINTSSTORAGE) >= 10 and player:getLevel() >= 6 -- to Huntsman Rank + or player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PawAndFurRank) == 0 and player:getStorageValue(POINTSSTORAGE) >= 20 and player:getLevel() >= 6 -- to Ranger Rank + or player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PawAndFurRank) == 2 and player:getStorageValue(POINTSSTORAGE) >= 40 and player:getLevel() >= 50 -- to Big Game Hunter Rank + or player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PawAndFurRank) == 4 and player:getStorageValue(POINTSSTORAGE) >= 70 and player:getLevel() >= 80 -- to Trophy Hunter Rank + or player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PawAndFurRank) == 6 and player:getStorageValue(POINTSSTORAGE) >= 100 and player:getLevel() >= 130 then -- to Elite Hunter Rank npcHandler:say("You are ready to advance one rank in our society |PLAYERNAME|. Ask me for a {promotion} first.", npc, creature) return true @@ -468,7 +468,7 @@ local function creatureSayCallback(npc, creature, type, message) messageAltExtra = true end elseif table.contains({ 1, 2 }, player:getStorageValue(reward.value[1])) then - player:setStorageValue(Storage.KillingInTheNameOf.BossPoints, player:getStorageValue(Storage.KillingInTheNameOf.BossPoints) + 1) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BossPoints, player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BossPoints) + 1) else player:setStorageValue(reward.value[1], reward.value[3]) player:setStorageValue(reward.value[2], reward.value[4]) @@ -488,20 +488,20 @@ local function creatureSayCallback(npc, creature, type, message) player:setStorageValue(POINTSSTORAGE, getPlayerTasksPoints(creature) + pointsToReceive + 3) messageAltExtraPoints = true extraValue = 3 - player:setStorageValue(Storage.KillingInTheNameOf.QuestLogEntry, player:getStorageValue(Storage.KillingInTheNameOf.QuestLogEntry)) -- fake update + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.QuestLogEntry, player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.QuestLogEntry)) -- fake update elseif player:getLevel() >= 130 and player:getStorageValue(POINTSSTORAGE) <= 40 then player:setStorageValue(POINTSSTORAGE, getPlayerTasksPoints(creature) + pointsToReceive + 2) messageAltExtraPoints = true extraValue = 2 - player:setStorageValue(Storage.KillingInTheNameOf.QuestLogEntry, player:getStorageValue(Storage.KillingInTheNameOf.QuestLogEntry)) -- fake update + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.QuestLogEntry, player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.QuestLogEntry)) -- fake update elseif player:getLevel() >= 130 and player:getStorageValue(POINTSSTORAGE) <= 70 then player:setStorageValue(POINTSSTORAGE, getPlayerTasksPoints(creature) + pointsToReceive + 1) messageAltExtraPoints = true extraValue = 1 - player:setStorageValue(Storage.KillingInTheNameOf.QuestLogEntry, player:getStorageValue(Storage.KillingInTheNameOf.QuestLogEntry)) -- fake update + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.QuestLogEntry, player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.QuestLogEntry)) -- fake update else player:setStorageValue(POINTSSTORAGE, getPlayerTasksPoints(creature) + pointsToReceive) - player:setStorageValue(Storage.KillingInTheNameOf.QuestLogEntry, player:getStorageValue(Storage.KillingInTheNameOf.QuestLogEntry)) -- fake update + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.QuestLogEntry, player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.QuestLogEntry)) -- fake update end elseif table.contains({ REWARD_ITEM, "item", "items", "object" }, reward.type:lower()) and not deny then player:addItem(reward.value[1], reward.value[2]) @@ -659,7 +659,7 @@ local function creatureSayCallback(npc, creature, type, message) else npcHandler:say(messageStartTaskAlt[message:lower()], npc, creature) end - elseif table.contains({ "demons", "demon" }, message:lower()) and player:getStorageValue(Storage.KillingInTheNameOf.PawAndFurRank) == 7 then + elseif table.contains({ "demons", "demon" }, message:lower()) and player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PawAndFurRank) == 7 then npcHandler:say("The spawn of pure evil must be erased from Tibia. You'll find demons lurking in the northern ruins of Edron as well as in some other deeper dungeons of Tibia. Slay 6666 demons for the greater good! Do you think you can handle this task?", npc, creature) else npcHandler:say("In this task you must defeat " .. tasks.GrizzlyAdams[task].killsRequired .. " " .. tasks.GrizzlyAdams[task].raceName .. ". Are you sure that you want to start this task?", npc, creature) @@ -739,33 +739,33 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("You haven't started any task yet.", npc, creature) end elseif table.contains({ "promotion", "promotions" }, message:lower()) then - if player:getStorageValue(Storage.KillingInTheNameOf.PawAndFurRank) < 0 and player:getStorageValue(POINTSSTORAGE) >= 10 and player:getLevel() >= 6 then -- to Huntsman Rank + if player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PawAndFurRank) < 0 and player:getStorageValue(POINTSSTORAGE) >= 10 and player:getLevel() >= 6 then -- to Huntsman Rank npcHandler:say({ "You gained 10 points! Let me promote you to the first rank: 'Huntsman'. Congratulations! ...", "If you find any trophies - either monster heads or other parts of monsters that you don't need - feel free to ask me for a trade.", }, npc, creature) - player:setStorageValue(Storage.KillingInTheNameOf.PawAndFurRank, 0) - elseif player:getStorageValue(Storage.KillingInTheNameOf.PawAndFurRank) == 0 and player:getStorageValue(POINTSSTORAGE) >= 20 and player:getLevel() >= 6 then -- to Ranger Rank + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PawAndFurRank, 0) + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PawAndFurRank) == 0 and player:getStorageValue(POINTSSTORAGE) >= 20 and player:getLevel() >= 6 then -- to Ranger Rank npcHandler:say({ "You gained 20 points. It's time for a promotion. You advance to the rank of a 'Ranger'. Congratulations! ...", "Oh, I made a deal with Lorek. He ships Rangers from our society - and higher ranks of course - to Banuta, Chor or near the mountain pass to Darama. Just ask him for a passage.", }, npc, creature) - player:setStorageValue(Storage.KillingInTheNameOf.PawAndFurRank, 2) - elseif player:getStorageValue(Storage.KillingInTheNameOf.PawAndFurRank) == 2 and player:getStorageValue(POINTSSTORAGE) >= 40 and player:getLevel() >= 50 then -- to Big Game Hunter Rank + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PawAndFurRank, 2) + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PawAndFurRank) == 2 and player:getStorageValue(POINTSSTORAGE) >= 40 and player:getLevel() >= 50 then -- to Big Game Hunter Rank npcHandler:say({ "Good show! You gained 40 points for the 'Paw and Fur - Hunting Elite'. You have earned the right to join the ranks of those known as 'Big game hunter'. Congratulations! ...", "From now on I'll buy more trophies from you!", }, npc, creature) - player:setStorageValue(Storage.KillingInTheNameOf.PawAndFurRank, 4) - elseif player:getStorageValue(Storage.KillingInTheNameOf.PawAndFurRank) == 4 and player:getStorageValue(POINTSSTORAGE) >= 70 and player:getLevel() >= 80 then -- to Trophy Hunter Rank + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PawAndFurRank, 4) + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PawAndFurRank) == 4 and player:getStorageValue(POINTSSTORAGE) >= 70 and player:getLevel() >= 80 then -- to Trophy Hunter Rank npcHandler:say({ "Spiffing! You gained 70 hunting points! From now on you can call yourself a 'Trophy hunter'. As a reward I have this special backpack for you and in addition, you can sell some more rare trophies to me. ...", "Ask me for {special} tasks from time to time.", }, npc, creature) - player:setStorageValue(Storage.KillingInTheNameOf.PawAndFurRank, 6) - elseif player:getStorageValue(Storage.KillingInTheNameOf.PawAndFurRank) == 6 and player:getStorageValue(POINTSSTORAGE) >= 100 and player:getLevel() >= 130 then -- to Elite Hunter Rank + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PawAndFurRank, 6) + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PawAndFurRank) == 6 and player:getStorageValue(POINTSSTORAGE) >= 100 and player:getLevel() >= 130 then -- to Elite Hunter Rank npcHandler:say("Congratulations, |PLAYERNAME|! You have gained the highest rank: 'Elite hunter'. If you haven't done yet, ask me for the {special} task.", npc, creature) - player:setStorageValue(Storage.KillingInTheNameOf.PawAndFurRank, 7) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PawAndFurRank, 7) else npcHandler:say("You have not enough points for promotion.", npc, creature) end @@ -773,7 +773,7 @@ local function creatureSayCallback(npc, creature, type, message) if checkZ(npc, player, message) == true then return true end - if player:getStorageValue(Storage.KillingInTheNameOf.BossPoints) > 0 then + if player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BossPoints) > 0 then if player:getLevel() < 50 then npcHandler:say("You can choose between the {Snapper}, {Hide}, {Deathbine} and the {Bloodtusk}.", npc, creature) npcHandler:setTopic(playerId, 4) @@ -797,7 +797,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 7) end else - npcHandler:say("You have " .. player:getStorageValue(Storage.KillingInTheNameOf.BossPoints) .. " boss points.", npc, creature) + npcHandler:say("You have " .. player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BossPoints) .. " boss points.", npc, creature) end elseif table.contains({ "snapper", "hide", "deathbine", "bloodtusk" }, message:lower()) and npcHandler:getTopic(playerId) >= 4 and npcHandler:getTopic(playerId) <= 7 then checkX(npc, player, 50, message) @@ -815,7 +815,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say(messageBossStart[tasks.GrizzlyAdams[w].bossId], npc, creature) player:setStorageValue(tasks.GrizzlyAdams[w].rewards[y].value[1], 1) player:setStorageValue(tasks.GrizzlyAdams[w].rewards[y].value[2], 0) - player:setStorageValue(Storage.KillingInTheNameOf.BossPoints, player:getStorageValue(Storage.KillingInTheNameOf.BossPoints) - 1) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BossPoints, player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BossPoints) - 1) return true else npcHandler:say("You have '" .. tasks.GrizzlyAdams[w].bossName .. "' task active.", npc, creature) @@ -914,30 +914,30 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) elseif table.contains({ "special", "special task" }, message:lower()) then if player:getPawAndFurPoints() >= 70 and player:getLevel() >= 80 then - if player:getStorageValue(Storage.KillingInTheNameOf.MissionTiquandasRevenge) < 1 then + if player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MissionTiquandasRevenge) < 1 then npcHandler:say({ "Have you heard about {Tiquanda's Revenge}? It is said that the jungle itself is alive and takes revenge for all the bad things people have done to it. ...", "I myself believe that there is some truth in this clap-trap. Something 'real' which must have a hideout somewhere. Go find it and take revenge yourself! Ask me about the {special} task when you're done.", }, npc, creature) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BossKillCount.TiquandasCount, 0) - player:setStorageValue(Storage.KillingInTheNameOf.MissionTiquandasRevenge, 1) - elseif player:getStorageValue(Storage.KillingInTheNameOf.MissionTiquandasRevenge) <= 2 and player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BossKillCount.TiquandasCount) == 0 then + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MissionTiquandasRevenge, 1) + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MissionTiquandasRevenge) <= 2 and player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BossKillCount.TiquandasCount) == 0 then npcHandler:say("You have already started the task. Go find Tiquandas Revenge and take revenge yourself!", npc, creature) - player:setStorageValue(Storage.KillingInTheNameOf.MissionTiquandasRevenge, 1) -- for death scenario - elseif player:getStorageValue(Storage.KillingInTheNameOf.MissionTiquandasRevenge) == 2 and player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BossKillCount.TiquandasCount) == 1 then + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MissionTiquandasRevenge, 1) -- for death scenario + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MissionTiquandasRevenge) == 2 and player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BossKillCount.TiquandasCount) == 1 then npcHandler:say("Great achievement, old chap! You are an outstanding hunter, no doubt about it!", npc, creature) - player:setStorageValue(Storage.KillingInTheNameOf.MissionTiquandasRevenge, 3) - elseif player:getStorageValue(Storage.KillingInTheNameOf.MissionDemodras) < 1 then + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MissionTiquandasRevenge, 3) + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MissionDemodras) < 1 then npcHandler:say("This task is a very dangerous one. I want you to look for {Demodras'} hideout. It might be somewhere under the {Plains of Havoc}. Good luck, old chap, come back in one piece and ask me about the special task when you're done.", npc, creature) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BossKillCount.DemodrasCount, 0) - player:setStorageValue(Storage.KillingInTheNameOf.MissionDemodras, 1) - elseif player:getStorageValue(Storage.KillingInTheNameOf.MissionDemodras) <= 2 and player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BossKillCount.DemodrasCount) == 0 then + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MissionDemodras, 1) + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MissionDemodras) <= 2 and player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BossKillCount.DemodrasCount) == 0 then npcHandler:say("You have already started the special task. Find Demodras and kill it.", npc, creature) - player:setStorageValue(Storage.KillingInTheNameOf.MissionDemodras, 1) -- for death scenario - elseif player:getStorageValue(Storage.KillingInTheNameOf.MissionDemodras) == 2 and player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BossKillCount.DemodrasCount) == 1 then + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MissionDemodras, 1) -- for death scenario + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MissionDemodras) == 2 and player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BossKillCount.DemodrasCount) == 1 then npcHandler:say("Jolly good show! You can cross swords with any creature in this world! I bow to you.", npc, creature) - player:setStorageValue(Storage.KillingInTheNameOf.MissionDemodras, 3) - elseif player:getStorageValue(Storage.KillingInTheNameOf.MissionDemodras) == 3 and player:getStorageValue(Storage.KillingInTheNameOf.MissionTiquandasRevenge) == 3 then + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MissionDemodras, 3) + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MissionDemodras) == 3 and player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MissionTiquandasRevenge) == 3 then npcHandler:say("You have already finished all special tasks.", npc, creature) end npcHandler:setTopic(playerId, 0) diff --git a/data-otservbr-global/npc/grof_the_guard.lua b/data-otservbr-global/npc/grof_the_guard.lua index 95dd3e1969a..5dbc8d51071 100644 --- a/data-otservbr-global/npc/grof_the_guard.lua +++ b/data-otservbr-global/npc/grof_the_guard.lua @@ -58,16 +58,16 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "trouble") and player:getStorageValue(Storage.TheInquisition.GrofGuard) < 1 and player:getStorageValue(Storage.TheInquisition.Mission01) ~= -1 then + if MsgContains(message, "trouble") and player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.GrofGuard) < 1 and player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission01) ~= -1 then npcHandler:say("I think it'll rain soon and I left some laundry out for drying.", npc, creature) npcHandler:setTopic(playerId, 1) elseif MsgContains(message, "authorities") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("Yes I'm pretty sure they have failed to send the laundry police to take care of it, you fool.", npc, creature) npcHandler:setTopic(playerId, 0) - if player:getStorageValue(Storage.TheInquisition.GrofGuard) < 1 then - player:setStorageValue(Storage.TheInquisition.GrofGuard, 1) - player:setStorageValue(Storage.TheInquisition.Mission01, player:getStorageValue(Storage.TheInquisition.Mission01) + 1) -- The Inquisition Questlog- "Mission 1: Interrogation" + if player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.GrofGuard) < 1 then + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.GrofGuard, 1) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission01, player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission01) + 1) -- The Inquisition Questlog- "Mission 1: Interrogation" player:getPosition():sendMagicEffect(CONST_ME_HOLYAREA) end end diff --git a/data-otservbr-global/npc/grombur.lua b/data-otservbr-global/npc/grombur.lua index 1501463f1d8..850d0db28e4 100644 --- a/data-otservbr-global/npc/grombur.lua +++ b/data-otservbr-global/npc/grombur.lua @@ -58,29 +58,29 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "nokmir") then - if player:getStorageValue(Storage.HiddenCityOfBeregar.JusticeForAll) == 2 then + if player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.JusticeForAll) == 2 then npcHandler:say("Oh well, I liked Nokmir. He used to be a good dwarf until that day on which he stole the ring from {Rerun}.", npc, creature) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "rerun") then if npcHandler:getTopic(playerId) == 1 then - player:setStorageValue(Storage.HiddenCityOfBeregar.JusticeForAll, 3) + player:setStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.JusticeForAll, 3) npcHandler:say("Yeah, he's the lucky guy in this whole story. I heard rumours that emperor Rehal had plans to promote Nokmir, but after this whole thievery story, he might pick Rerun instead.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "mission") then - if player:getStorageValue(Storage.HiddenCityOfBeregar.TheGoodGuard) < 1 then + if player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.TheGoodGuard) < 1 then npcHandler:say("Got any dwarven brown ale?? I DON'T THINK SO....and Bolfana, the tavern keeper, won't sell you anything. I'm sure about that...she doesn't like humans... I tell you what, if you get me a cask of dwarven brown ale, I allow you to enter the mine. Alright?", npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.HiddenCityOfBeregar.TheGoodGuard) == 1 and player:removeItem(8774, 1) then - player:setStorageValue(Storage.HiddenCityOfBeregar.TheGoodGuard, 2) - player:setStorageValue(Storage.HiddenCityOfBeregar.DoorSouthMine, 1) + elseif player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.TheGoodGuard) == 1 and player:removeItem(8774, 1) then + player:setStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.TheGoodGuard, 2) + player:setStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.DoorSouthMine, 1) npcHandler:say("HOW?....WHERE?....AHHHH, I don't mind....SLUUUUUURP....tastes a little flat but I had worse. Thank you. Just don't tell anyone that I let you in.", npc, creature) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 2 then - player:setStorageValue(Storage.HiddenCityOfBeregar.TheGoodGuard, 1) - player:setStorageValue(Storage.HiddenCityOfBeregar.DefaultStart, 1) + player:setStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.TheGoodGuard, 1) + player:setStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.DefaultStart, 1) npcHandler:say("Haha, fine! Don't waste time and get me the ale. See you.", npc, creature) npcHandler:setTopic(playerId, 0) end diff --git a/data-otservbr-global/npc/hairycles.lua b/data-otservbr-global/npc/hairycles.lua index 9af42751219..1c407cdc383 100644 --- a/data-otservbr-global/npc/hairycles.lua +++ b/data-otservbr-global/npc/hairycles.lua @@ -204,6 +204,11 @@ local function creatureSayCallback(npc, creature, type, message) "You go there and take good moss from evil dworcs. Talk with me about mission when having moss.", }, npc, creature) end + elseif MsgContains(message, "cookie") then + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline) == 31 and player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.Hairycles) ~= 1 then + npcHandler:say("Oh you bring cookie for old Hairycles?", npc, creature) + npcHandler:setTopic(playerId, 19) + end elseif MsgContains(message, "outfit") or MsgContains(message, "shamanic") then if questProgress == 18 then if player:getStorageValue(Storage.Quest.U7_6.TheApeCity.ShamanOutfit) ~= 1 then @@ -461,7 +466,7 @@ local function creatureSayCallback(npc, creature, type, message) return true end - player:setStorageValue(Storage.WhatAFoolish.CookieDelivery.Hairycles, 1) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.Hairycles, 1) if player:getCookiesDelivered() == 10 then player:addAchievement("Allow Cookies?") end diff --git a/data-otservbr-global/npc/hal.lua b/data-otservbr-global/npc/hal.lua index 334db27203d..80bd7664699 100644 --- a/data-otservbr-global/npc/hal.lua +++ b/data-otservbr-global/npc/hal.lua @@ -59,10 +59,10 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "report") then - if player:getStorageValue(Storage.InServiceofYalahar.Questline) == 8 or player:getStorageValue(Storage.InServiceofYalahar.Questline) == 12 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 8 or player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 12 then npcHandler:say("Hicks! I... I... . ", npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, player:getStorageValue(Storage.InServiceofYalahar.Questline) + 1) - player:setStorageValue(Storage.InServiceofYalahar.Mission02, player:getStorageValue(Storage.InServiceofYalahar.Mission02) + 1) -- StorageValue for Questlog "Mission 02: Watching the Watchmen" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) + 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission02, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission02) + 1) -- StorageValue for Questlog "Mission 02: Watching the Watchmen" npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "pass") then diff --git a/data-otservbr-global/npc/halif.lua b/data-otservbr-global/npc/halif.lua index e2e55484d37..27317ec6692 100644 --- a/data-otservbr-global/npc/halif.lua +++ b/data-otservbr-global/npc/halif.lua @@ -76,6 +76,7 @@ npcConfig.shop = { { itemName = "shovel", clientId = 3457, buy = 10, sell = 8 }, { itemName = "torch", clientId = 2920, buy = 2 }, { itemName = "vial of oil", clientId = 2874, buy = 20, count = 7 }, + { itemName = "vial of water", clientId = 2874, buy = 40, count = 1 }, { itemName = "watch", clientId = 2906, buy = 20, sell = 6 }, { itemName = "waterskin of water", clientId = 2901, buy = 40, count = 1 }, { itemName = "wooden hammer", clientId = 3459, sell = 15 }, diff --git a/data-otservbr-global/npc/halvar.lua b/data-otservbr-global/npc/halvar.lua index 1790b73657c..0c448947d2f 100644 --- a/data-otservbr-global/npc/halvar.lua +++ b/data-otservbr-global/npc/halvar.lua @@ -71,16 +71,16 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local arenaId = player:getStorageValue(Storage.SvargrondArena.Arena) + local arenaId = player:getStorageValue(Storage.Quest.U8_0.BarbarianArena.Arena) if MsgContains(message, "fight") or MsgContains(message, "pit") or MsgContains(message, "challenge") or MsgContains(message, "arena") then - if player:getStorageValue(Storage.SvargrondArena.PitDoor) == 1 then + if player:getStorageValue(Storage.Quest.U8_0.BarbarianArena.PitDoor) == 1 then npcHandler:say("You already paid the fee, go and fight!", npc, creature) return true end if arenaId < 1 then arenaId = 1 - player:setStorageValue(Storage.SvargrondArena.Arena, arenaId) + player:setStorageValue(Storage.Quest.U8_0.BarbarianArena.Arena, arenaId) end if ARENA[arenaId] then @@ -98,7 +98,7 @@ local function creatureSayCallback(npc, creature, type, message) end if player:removeMoneyBank(ARENA[arenaId].price) then - player:setStorageValue(Storage.SvargrondArena.PitDoor, 1) + player:setStorageValue(Storage.Quest.U8_0.BarbarianArena.PitDoor, 1) npcHandler:say("As you wish! You can pass the door now and enter the teleporter to the pits.", npc, creature) local cStorage = ARENA[arenaId].questLog diff --git a/data-otservbr-global/npc/harlow.lua b/data-otservbr-global/npc/harlow.lua index b39b00600fe..73c18a0148b 100644 --- a/data-otservbr-global/npc/harlow.lua +++ b/data-otservbr-global/npc/harlow.lua @@ -60,14 +60,14 @@ local function creatureSayCallback(npc, creature, type, message) end --Travel local travelNode = keywordHandler:addKeyword({ "vengoth" }, StdModule.say, { npcHandler = npcHandler, text = "So you are saying you're looking for someone to take you to Vengoth?" }, function(player) - return player:getStorageValue(BloodBrothers.VengothAccess) == 1 + return player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.VengothAccess) == 1 end) travelNode:addChildKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, reset = true, text = "Oh well." }) local travelNodeYes = travelNode:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "I could do that, it's not far from here. I don't run a charity organisation, though. Tell you what. Give me 100 gold pieces, and me and my boat are yours for the trip. Okay?" }) travelNodeYes:addChildKeyword({ "yes" }, StdModule.travel, { npcHandler = npcHandler, text = "Okay. Enjoy.", premium = false, cost = 100, destination = Position(32858, 31549, 7) }) travelNodeYes:addChildKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, reset = true, text = "Oh well." }) travelNode = keywordHandler:addKeyword({ "transportation" }, StdModule.say, { npcHandler = npcHandler, text = "Want me to bring you to Vengoth again for 100 gold?" }, function(player) - return player:getStorageValue(BloodBrothers.VengothAccess) == 1 + return player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.VengothAccess) == 1 end) travelNode:addChildKeyword({ "yes" }, StdModule.travel, { npcHandler = npcHandler, text = "Okay. Enjoy.", premium = false, cost = 100, destination = Position(32858, 31549, 7) }) travelNode:addChildKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, reset = true, text = "Oh well." }) diff --git a/data-otservbr-global/npc/harog.lua b/data-otservbr-global/npc/harog.lua index 421356ec62e..c29ecec296e 100644 --- a/data-otservbr-global/npc/harog.lua +++ b/data-otservbr-global/npc/harog.lua @@ -25,7 +25,7 @@ npcConfig.flags = { npcConfig.shop = { { name = "metal fitting", clientId = 9115, buy = 500 }, { name = "nail", clientId = 953, sell = 10 }, - { name = "flask of rust remover", clientId = 9016, buy = 50, storageKey = Storage.HiddenCityOfBeregar.JusticeForAll, storageValue = 6 }, + { name = "flask of rust remover", clientId = 9016, buy = 50, storageKey = Storage.Quest.U8_4.TheHiddenCityOfBeregar.JusticeForAll, storageValue = 6 }, } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/henricus.lua b/data-otservbr-global/npc/henricus.lua index d6d7beda8f4..827fa930637 100644 --- a/data-otservbr-global/npc/henricus.lua +++ b/data-otservbr-global/npc/henricus.lua @@ -65,12 +65,12 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "inquisitor") then npcHandler:say("The churches of the gods entrusted me with the enormous and responsible task to lead the inquisition. I leave the field work to inquisitors who I recruit from fitting people that cross my way.", npc, creature) elseif MsgContains(message, "join") then - if player:getStorageValue(Storage.TheInquisition.Questline) < 1 then + if player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) < 1 then npcHandler:say("Do you want to join the inquisition?", npc, creature) npcHandler:setTopic(playerId, 2) end elseif MsgContains(message, "blessing") or MsgContains(message, "bless") then - if player:getStorageValue(Storage.TheInquisition.Questline) == 25 then --if quest is done + if player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 25 then --if quest is done npcHandler:say("Do you want to receive the blessing of the inquisition - which means " .. (missing == 5 and "all five available" or missing) .. " blessings - for " .. totalBlessPrice .. " gold?", npc, creature) npcHandler:setTopic(playerId, 7) else @@ -78,7 +78,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "flask") or MsgContains(message, "special flask") then - if player:getStorageValue(Storage.TheInquisition.Questline) >= 12 then -- give player the ability to purchase the flask. + if player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) >= 12 then -- give player the ability to purchase the flask. npcHandler:say("Do you want to buy the special flask of holy water for " .. flaskCost .. " gold?", npc, creature) npcHandler:setTopic(playerId, 8) else @@ -86,167 +86,159 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "mission") or MsgContains(message, "report") then - if player:getStorageValue(Storage.TheInquisition.Questline) < 1 then + if player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) < 1 then npcHandler:say("Do you want to join the inquisition?", npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.TheInquisition.Questline) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 1 then npcHandler:say({ "Let's see if you are worthy. Take an inquisitor's field guide from the box in the back room. ...", "Follow the instructions in the guide to talk to the Thaian guards that protect the walls and gates of the city and test their loyalty. Then report to me about your {mission}.", }, npc, creature) - player:setStorageValue(Storage.TheInquisition.Questline, 2) - player:setStorageValue(Storage.TheInquisition.Mission01, 1) -- The Inquisition Questlog- "Mission 1: Interrogation" + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline, 2) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission01, 1) -- The Inquisition Questlog- "Mission 1: Interrogation" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TheInquisition.Questline) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 2 then npcHandler:say("Your current mission is to investigate the reliability of certain guards. Are you done with that mission?", npc, creature) npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.TheInquisition.Questline) == 3 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 3 then npcHandler:say({ "Listen, we have information about a heretic coven that hides in a mountain called the Big Old One. The witches reach this cursed place on flying brooms and think they are safe there. ...", "I've arranged a flying carpet that will bring you to their hideout. Travel to Femor Hills and tell the carpet pilot the codeword 'eclipse' ...", "He'll bring you to your destination. At their meeting place, you'll find a cauldron in which they cook some forbidden brew ...", "Use this vial of holy water to destroy the brew. Also steal their grimoire and bring it to me.", }, npc, creature) - player:setStorageValue(Storage.TheInquisition.Questline, 4) - player:setStorageValue(Storage.TheInquisition.Mission02, 1) -- The Inquisition Questlog- "Mission 2: Eclipse" + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline, 4) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission02, 1) -- The Inquisition Questlog- "Mission 2: Eclipse" player:addItem(133, 1) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TheInquisition.Questline) == 5 then - if player:removeItem(7874, 1) then - npcHandler:say({ - "I think it's time to truly test your abilities. One of our allies has requested assistance. I think you are just the right person to help him ...", - "Storkus is an old and grumpy dwarf who works as a vampire hunter since many, many decades. He's quite successful but even hehas his limits. ...", - "So occasionally, we send him help. In return he trains and tests our recruits. It's an advantageous agreement for both sides ...", - "You'll find him in his cave at the mountain outside of Kazordoon. He'll tell you about your next mission.", - }, npc, creature) - player:setStorageValue(Storage.TheInquisition.Questline, 6) - player:setStorageValue(Storage.TheInquisition.Mission02, 3) -- The Inquisition Questlog- "Mission 2: Eclipse" - player:setStorageValue(Storage.TheInquisition.Mission03, 1) -- The Inquisition Questlog- "Mission 3: Vampire Hunt" - else - npcHandler:say("You need bring me the witches' grimoire.", npc, creature) - end + elseif player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 5 then + npcHandler:say("Your current mission is to destroy this coven. Are you done with that mission?", npc, creature) + npcHandler:setTopic(playerId, 9) + elseif player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 6 then + npcHandler:say({ + "I think it's time to truly test your abilities. One of our allies has requested assistance. I think you are just the right person to help him ...", + "Storkus is an old and grumpy dwarf who works as a vampire hunter since many, many decades. He's quite successful but even hehas his limits. ...", + "So occasionally, we send him help. In return he trains and tests our recruits. It's an advantageous agreement for both sides ...", + "You'll find him in his cave at the mountain outside of Kazordoon. He'll tell you about your next mission.", + }, npc, creature) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission03, 1) -- The Inquisition Questlog- "Mission 3: Vampire Hunt" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TheInquisition.Questline) > 5 and player:getStorageValue(Storage.TheInquisition.Questline) < 11 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) > 6 and player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) < 11 then npcHandler:say("Your current mission is to help the vampire hunter Storkus. Are you done with that mission? ", npc, creature) npcHandler:setTopic(playerId, 4) - elseif player:getStorageValue(Storage.TheInquisition.Questline) == 11 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 11 then npcHandler:say({ "We've got a report about an abandoned and haunted house in Liberty Bay. I want you to examine this house. It's the only ruin in Liberty Bay so you should have no trouble finding it. ...", "There's an evil being somewhere. I assume that it will be easier to find the right spot at night. Use this vial of holy water on that spot to drive out the evil being.", }, npc, creature) - player:setStorageValue(Storage.TheInquisition.Questline, 12) - player:setStorageValue(Storage.TheInquisition.Mission04, 1) -- The Inquisition Questlog- "Mission 4: The Haunted Ruin" + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline, 12) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission04, 1) -- The Inquisition Questlog- "Mission 4: The Haunted Ruin" player:addItem(133, 1) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TheInquisition.Questline) == 12 or player:getStorageValue(Storage.TheInquisition.Questline) == 13 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 12 or player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 13 then npcHandler:say("Your current mission is to exorcise an evil being from a house in Liberty Bay. Are you done with that mission? ", npc, creature) npcHandler:setTopic(playerId, 5) - elseif player:getStorageValue(Storage.TheInquisition.Questline) == 14 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 14 then npcHandler:say({ "You've handled heretics, witches, vampires and ghosts. Now be prepared to face the most evil creatures we are fighting - demons. Your new task is extremely simple, though far from easy. ...", "Go and slay demonic creatures wherever you find them. Bring me 20 of their essences as a proof of your accomplishments.", }, npc, creature) - player:setStorageValue(Storage.TheInquisition.Questline, 15) - player:setStorageValue(Storage.TheInquisition.Mission05, 1) -- The Inquisition Questlog- "Mission 5: Essential Gathering" + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline, 15) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission05, 1) -- The Inquisition Questlog- "Mission 5: Essential Gathering" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TheInquisition.Questline) == 15 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 15 then if player:removeItem(6499, 20) then npcHandler:say({ "You're indeed a dedicated protector of the true believers. Don't stop now. Kill as many of these creatures as you can. ...", "I also have a reward for your great efforts. Talk to me about your {demon hunter outfit} anytime from now on. Afterwards, let's talk about the next mission that's awaiting you.", }, npc, creature) - player:setStorageValue(Storage.TheInquisition.Questline, 16) - player:setStorageValue(Storage.TheInquisition.Mission05, 2) -- The Inquisition Questlog- "Mission 5: Essential Gathering" + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline, 16) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission05, 2) -- The Inquisition Questlog- "Mission 5: Essential Gathering" else npcHandler:say("You need 20 of them.", npc, creature) end npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TheInquisition.Questline) == 17 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 17 then npcHandler:say({ "We've got information about something very dangerous going on on the isle of Edron. The demons are preparing something there ...", "Something that is a threat to all of us. Our investigators were able to acquire vital information before some of them were slain by a demon named Ungreez. ...", "It'll be your task to take revenge and to kill that demon. You'll find him in the depths of Edron. Good luck.", }, npc, creature) - player:setStorageValue(Storage.TheInquisition.Questline, 18) - player:setStorageValue(Storage.TheInquisition.Mission06, 1) -- The Inquisition Questlog- "Mission 6: The Demon Ungreez" + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline, 18) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission06, 1) -- The Inquisition Questlog- "Mission 6: The Demon Ungreez" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TheInquisition.Questline) == 19 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 19 then npcHandler:say({ "So the beast is finally dead! Thank the gods. At least some things work out in our favour ...", "Our other operatives were not that lucky, though. But you will learn more about that in your next {mission}.", }, npc, creature) - player:setStorageValue(Storage.TheInquisition.Questline, 20) - player:setStorageValue(Storage.TheInquisition.Mission06, 3) -- The Inquisition Questlog- "Mission 6: The Demon Ungreez" - player:addOutfitAddon(288, 1) - player:addOutfitAddon(289, 1) - player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline, 20) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission06, 3) -- The Inquisition Questlog- "Mission 6: The Demon Ungreez" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TheInquisition.Questline) == 20 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 20 then npcHandler:say("Destroy the shadow nexus using this vial of holy water and kill all demon lords.", npc, creature) - player:setStorageValue(Storage.TheInquisition.Questline, 21) - player:setStorageValue(Storage.TheInquisition.Mission07, 1) -- The Inquisition Questlog- "Mission 7: The Shadow Nexus" + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline, 21) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission07, 1) -- The Inquisition Questlog- "Mission 7: The Shadow Nexus" player:addItem(133, 1) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TheInquisition.Questline) == 21 or player:getStorageValue(Storage.TheInquisition.Questline) == 22 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 21 or player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 22 then npcHandler:say("Your current mission is to destroy the shadow nexus in the Demon Forge. Are you done with that mission?", npc, creature) npcHandler:setTopic(playerId, 6) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 2 then npcHandler:say("So be it. Now you are a member of the inquisition. You might ask me for a {mission} to raise in my esteem.", npc, creature) - player:setStorageValue(Storage.TheInquisition.Questline, 1) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then - if player:getStorageValue(Storage.TheInquisition.WalterGuard) == 1 and player:getStorageValue(Storage.TheInquisition.KulagGuard) == 1 and player:getStorageValue(Storage.TheInquisition.GrofGuard) == 1 and player:getStorageValue(Storage.TheInquisition.MilesGuard) == 1 and player:getStorageValue(Storage.TheInquisition.TimGuard) == 1 then + if + player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.WalterGuard) == 1 + and player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.KulagGuard) == 1 + and player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.GrofGuard) == 1 + and player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.MilesGuard) == 1 + and player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.TimGuard) == 1 + then npcHandler:say({ "Indeed, this is exactly what my other sources told me. Of course I knew the outcome of this investigation in advance. This was just a test. ...", "Well, now that you've proven yourself as useful, you can ask me for another mission. Let's see if you can handle some field duty, too.", }, npc, creature) - player:setStorageValue(Storage.TheInquisition.Questline, 3) - player:setStorageValue(Storage.TheInquisition.Mission01, 7) -- The Inquisition Questlog- "Mission 1: Interrogation" + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline, 3) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission01, 7) -- The Inquisition Questlog- "Mission 1: Interrogation" else npcHandler:say("You haven't done your mission yet.", npc, creature) end npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 4 then - if player:getStorageValue(Storage.TheInquisition.Questline) == 10 then + if player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 10 then npcHandler:say("Good, you've returned. Your skill in practical matters seems to be useful. If you're ready for a further mission, just ask. ", npc, creature) - player:setStorageValue(Storage.TheInquisition.Questline, 11) - player:setStorageValue(Storage.TheInquisition.Mission03, 6) -- The Inquisition Questlog- "Mission 3: Vampire Hunt" + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline, 11) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission03, 6) -- The Inquisition Questlog- "Mission 3: Vampire Hunt" else npcHandler:say("You haven't done your mission with {Storkus} yet.", npc, creature) end npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 5 then - if player:getStorageValue(Storage.TheInquisition.Questline) == 13 then + if player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 13 then npcHandler:say("Well, this was an easy task, but your next mission will be much more challenging. ", npc, creature) - player:setStorageValue(Storage.TheInquisition.Questline, 14) - player:setStorageValue(Storage.TheInquisition.Mission04, 3) -- The Inquisition Questlog- "Mission 4: The Haunted Ruin" + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline, 14) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission04, 3) -- The Inquisition Questlog- "Mission 4: The Haunted Ruin" else npcHandler:say("You haven't done your mission with {Storkus} yet.", npc, creature) end npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 6 then - if player:getStorageValue(Storage.TheInquisition.Questline) == 22 then + if player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 22 then npcHandler:say({ "Incredible! You're a true defender of faith! I grant you the title of a High Inquisitor for your noble deeds. From now on you can obtain the blessing of the inquisition which makes the pilgrimage of ashes obsolete ...", "The blessing of the inquisition will bestow upon you all available blessings for the price of 110000 gold. Also, don't forget to ask me about your {outfit} to receive the final addon as demon hunter.", }, npc, creature) - player:setStorageValue(Storage.TheInquisition.Questline, 23) - player:setStorageValue(Storage.TheInquisition.Mission07, 3) -- The Inquisition Questlog- "Mission 7: The Shadow Nexus" + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline, 23) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission07, 3) -- The Inquisition Questlog- "Mission 7: The Shadow Nexus" player:addAchievement("High Inquisitor") else npcHandler:say("Come back when you have destroyed the shadow nexus.", npc, creature) end npcHandler:setTopic(playerId, 0) - elseif npcHandler:getTopic(playerId) == 8 then - if player:removeMoneyBank(flaskCost) then - npcHandler:say("Here is your new flask!, |PLAYERNAME|.", npc, creature) - player:addItem(133, 1) - else - npcHandler:say("Come back when you have enough money.", npc, creature) - end - npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 7 then if missing == 0 then npcHandler:say("You already have been blessed!", npc, creature) @@ -257,6 +249,23 @@ local function creatureSayCallback(npc, creature, type, message) else npcHandler:say("Come back when you have enough money.", npc, creature) end + npcHandler:setTopic(playerId, 0) + elseif npcHandler:getTopic(playerId) == 8 then + if player:removeMoneyBank(flaskCost) then + npcHandler:say("Here is your new flask!, |PLAYERNAME|.", npc, creature) + player:addItem(133, 1) + else + npcHandler:say("Come back when you have enough money.", npc, creature) + end + npcHandler:setTopic(playerId, 0) + elseif npcHandler:getTopic(playerId) == 9 then + if player:removeItem(7874, 1) then + npcHandler:say("Fine, fine. You have proven that you can work efficiently. Still, only further missions will show if you are truly capable. Ask me for another mission if you're ready.", npc, creature) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline, 6) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission02, 3) -- The Inquisition Questlog- "Mission 2: Eclipse" + else + npcHandler:say("You need bring me the witches' grimoire.", npc, creature) + end end npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "no") then @@ -265,21 +274,25 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "outfit") then - if player:getStorageValue(Storage.TheInquisition.Questline) == 16 then + if player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 16 then npcHandler:say("Here is your demon hunter outfit. You deserve it. Unlock more addons by completing more missions.", npc, creature) - player:setStorageValue(Storage.TheInquisition.Questline, 17) - player:setStorageValue(Storage.TheInquisition.Mission05, 3) -- The Inquisition Questlog- "Mission 5: Essential Gathering" + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline, 17) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission05, 3) -- The Inquisition Questlog- "Mission 5: Essential Gathering" player:addOutfit(288, 0) player:addOutfit(289, 0) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TheInquisition.Questline) == 23 then - npcHandler:say("Here is the final addon for your demon hunter outfit. Congratulations!", npc, creature) - player:setStorageValue(Storage.TheInquisition.Questline, 24) - player:setStorageValue(Storage.TheInquisition.Mission07, 4) -- The Inquisition Questlog- "Mission 7: The Shadow Nexus" - player:setStorageValue(Storage.TheInquisition.RewardDoor, 1) + elseif player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) >= 19 and player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) <= 22 then + npcHandler:say("Here is your demon hunter outfit. You deserve it. Unlock more addons by completing more missions.!", npc, creature) player:addOutfitAddon(288, 1) player:addOutfitAddon(289, 1) + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + npcHandler:setTopic(playerId, 0) + elseif player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 23 then + npcHandler:say("Here is the final addon for your demon hunter outfit. Congratulations!", npc, creature) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline, 24) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission07, 4) -- The Inquisition Questlog- "Mission 7: The Shadow Nexus" + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.RewardDoor, 1) player:addOutfitAddon(288, 2) player:addOutfitAddon(289, 2) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) diff --git a/data-otservbr-global/npc/herbert.lua b/data-otservbr-global/npc/herbert.lua index c8ccbd337c3..1414896db74 100644 --- a/data-otservbr-global/npc/herbert.lua +++ b/data-otservbr-global/npc/herbert.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "letter") then - if player:getStorageValue(Storage.ThievesGuild.Mission06) == 1 then + if player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission06) == 1 then npcHandler:say("You would like Chantalle's letter? only if you are willing to pay a price. {gold} maybe?", npc, creature) npcHandler:setTopic(playerId, 1) end diff --git a/data-otservbr-global/npc/hjaern.lua b/data-otservbr-global/npc/hjaern.lua index 42dbd2bb9c8..c367fba653b 100644 --- a/data-otservbr-global/npc/hjaern.lua +++ b/data-otservbr-global/npc/hjaern.lua @@ -59,23 +59,23 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.TheIceIslands.Questline) == 3 then - if player:getStorageValue(Storage.TheIceIslands.Mission02) < 1 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 3 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission02) < 1 then npcHandler:say({ "We could indeed need some help. These are very cold times. The ice is growing and becoming thicker everywhere ...", "The problem is that the chakoyas may use the ice for a passage to the west and attack Svargrond ...", "We need you to get a pick and to destroy the ice at certain places to the east. You will quickly recognise those spots by their unstable look ...", "Use the pickaxe on at least three of these places and the chakoyas probably won't be able to pass the ice. Once you are done, return here and report about your mission.", }, npc, creature) - player:setStorageValue(Storage.TheIceIslands.Mission02, 1) -- Questlog The Ice Islands Quest, Nibelor 1: Breaking the Ice + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission02, 1) -- Questlog The Ice Islands Quest, Nibelor 1: Breaking the Ice npcHandler:setTopic(playerId, 0) end - elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 4 then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 4 then npcHandler:say("The spirits are at peace now. The threat of the chakoyas is averted for now. I thank you for your help. Perhaps you should ask Silfind if you can help her in some matters. ", npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 5) - player:setStorageValue(Storage.TheIceIslands.Mission02, 5) -- Questlog The Ice Islands Quest, Nibelor 1: Breaking the Ice + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 5) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission02, 5) -- Questlog The Ice Islands Quest, Nibelor 1: Breaking the Ice npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 29 then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 29 then npcHandler:say({ "There is indeed an important mission. For a long time, the spirits have been worried and have called us for help. It seems that some of our dead have not reached the happy hunting grounds of after life ...", "Everything we were able to find out leads to a place where none of our people is allowed to go. Just like we would never allow a stranger to go to that place ...", @@ -84,14 +84,14 @@ local function creatureSayCallback(npc, creature, type, message) "There you find for sure the cause for the unrest of the spirits. Find someone in Svargrond who can give you a passage to Helheim and seek for the cause. Are you willing to do that?", }, npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 31 then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 31 then npcHandler:say({ "There is no need to report about your mission. To be honest, Ive sent a divination spirit with you as well as a couple of destruction spirits that were unleashed when you approached the altar ...", "Forgive me my secrecy but you are not familiar with the spirits and you might have get frightened. The spirits are at work now, destroying the magic with that those evil creatures have polluted Helheim ...", "I cant thank you enough for what you have done for the spirits of my people. Still I have to ask: Would you do us another favour?", }, npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 38 then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 38 then npcHandler:say({ "These are alarming news and we have to act immediately. Take this spirit charm of cold. Travel to the mines and find four special obelisks to mark them with the charm ...", "I can feel their resonance in the spirits world but we cant reach them with our magic yet. They have to get into contact with us in a spiritual way first ...", @@ -99,17 +99,17 @@ local function creatureSayCallback(npc, creature, type, message) "Report about your mission when you are done. Then we can begin with the great ritual of summoning the children of Chyll ...", "I will also inform Lurik about the events. Now go, fast!", }, npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 39) - player:setStorageValue(Storage.TheIceIslands.Mission11, 2) -- Questlog The Ice Islands Quest, Formorgar Mines 3: The Secret - player:setStorageValue(Storage.TheIceIslands.Mission12, 1) -- Questlog The Ice Islands Quest, Formorgar Mines 4: Retaliation + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 39) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission11, 2) -- Questlog The Ice Islands Quest, Formorgar Mines 3: The Secret + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission12, 1) -- Questlog The Ice Islands Quest, Formorgar Mines 4: Retaliation player:addItem(7289, 1) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 39 and player:getStorageValue(Storage.TheIceIslands.Obelisk01) == 5 and player:getStorageValue(Storage.TheIceIslands.Obelisk02) == 5 and player:getStorageValue(Storage.TheIceIslands.Obelisk03) == 5 and player:getStorageValue(Storage.TheIceIslands.Obelisk04) == 5 then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 39 and player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Obelisk01) == 5 and player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Obelisk02) == 5 and player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Obelisk03) == 5 and player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Obelisk04) == 5 then if player:removeItem(7289, 1) then - player:setStorageValue(Storage.TheIceIslands.Questline, 40) - player:setStorageValue(Storage.TheIceIslands.yakchalDoor, 1) - player:setStorageValue(Storage.TheIceIslands.Mission12, 6) -- Questlog The Ice Islands Quest, Formorgar Mines 4: Retaliation - player:setStorageValue(Storage.OutfitQuest.NorsemanAddon, 1) -- Questlog Norseman Outfit Quest + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 40) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.yakchalDoor, 1) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission12, 6) -- Questlog The Ice Islands Quest, Formorgar Mines 4: Retaliation + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.NorsemanOutfit, 1) -- Questlog Norseman Outfit Quest player:setStorageValue(Storage.OutfitQuest.DefaultStart, 1) --this for default start of Outfit and Addon Quests player:addOutfit(251, 0) player:addOutfit(252, 0) @@ -127,54 +127,54 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "shard") then - if player:getStorageValue(Storage.TheIceIslands.Questline) == 40 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 40 then npcHandler:say("Do you bring frostheart shards for our spell?", npc, creature) npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 42 then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 42 then npcHandler:say("Do you bring frostheart shards for our spell? ", npc, creature) npcHandler:setTopic(playerId, 4) - elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 44 then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 44 then npcHandler:say("Do you want to sell all your shards for 2000 gold coins per each? ", npc, creature) npcHandler:setTopic(playerId, 5) end elseif MsgContains(message, "reward") then - if player:getStorageValue(Storage.TheIceIslands.Questline) == 41 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 41 then npcHandler:say("Take this. It might suit your Nordic outfit fine. ", npc, creature) player:addOutfitAddon(252, 1) player:addOutfitAddon(251, 1) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - player:setStorageValue(Storage.TheIceIslands.Questline, 42) - player:setStorageValue(Storage.OutfitQuest.NorsemanAddon, 2) -- Questlog Norseman Outfit Quest + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 42) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.NorsemanOutfit, 2) -- Questlog Norseman Outfit Quest npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 43 then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 43 then player:addOutfitAddon(252, 2) player:addOutfitAddon(251, 2) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) npcHandler:say("Take this. It might suit your Nordic outfit fine. From now on we only can give you 2000 gold pieces for each shard. ", npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 44) - player:setStorageValue(Storage.OutfitQuest.NorsemanAddon, 3) -- Questlog Norseman Outfit Quest + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 44) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.NorsemanOutfit, 3) -- Questlog Norseman Outfit Quest npcHandler:setTopic(playerId, 4) end elseif MsgContains(message, "tylaf") then - if player:getStorageValue(Storage.TheIceIslands.Questline) == 36 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 36 then npcHandler:say({ "You encountered the restless ghost of my apprentice Tylaf in the old mines? We must find out what has happened to him. I enable you to talk to his spirit ...", "Talk to him and then report to me about your mission.", }, npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 37) - player:setStorageValue(Storage.TheIceIslands.Mission10, 1) -- Questlog The Ice Islands Quest, Formorgar Mines 2: Ghostwhisperer + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 37) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission10, 1) -- Questlog The Ice Islands Quest, Formorgar Mines 2: Ghostwhisperer npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "cookie") then - if player:getStorageValue(Storage.WhatAFoolish.Questline) == 31 and player:getStorageValue(Storage.WhatAFoolish.CookieDelivery.Hjaern) ~= 1 then + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline) == 31 and player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.Hjaern) ~= 1 then npcHandler:say("You want to sacrifice a cookie to the spirits?", npc, creature) npcHandler:setTopic(playerId, 6) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("This is good news. As I explained, travel to Helheim, seek the reason for the unrest there and then report to me about your mission. ", npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 30) - player:setStorageValue(Storage.TheIceIslands.Mission07, 2) -- Questlog The Ice Islands Quest, The Secret of Helheim + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 30) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission07, 2) -- Questlog The Ice Islands Quest, The Secret of Helheim npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say({ @@ -182,19 +182,19 @@ local function creatureSayCallback(npc, creature, type, message) "You know their ways better than my people do and are probably best suited to represent us in this matter.", "Search for Lurik and talk to him about aprobable mission he might have for you.", }, npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 32) - player:setStorageValue(Storage.TheIceIslands.Mission08, 1) -- Questlog The Ice Islands Quest, The Contact + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 32) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission08, 1) -- Questlog The Ice Islands Quest, The Contact npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then if player:removeItem(7290, 5) then npcHandler:say("Excellent, you collected 5 of them. If you have collected 5 or more, talk to me about your {reward}. ", npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 41) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 41) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 4 then if player:removeItem(7290, 10) then npcHandler:say("Excellent, you collected 10 of them. If you have collected 15 or more, talk to me about your {reward}. ", npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 43) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 43) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 5 then @@ -212,7 +212,7 @@ local function creatureSayCallback(npc, creature, type, message) return true end - player:setStorageValue(Storage.WhatAFoolish.CookieDelivery.Hjaern, 1) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.Hjaern, 1) if player:getCookiesDelivered() == 10 then player:addAchievement("Allow Cookies?") end diff --git a/data-otservbr-global/npc/iskan.lua b/data-otservbr-global/npc/iskan.lua index e6c0632f5b9..0ceaeee4aec 100644 --- a/data-otservbr-global/npc/iskan.lua +++ b/data-otservbr-global/npc/iskan.lua @@ -51,13 +51,13 @@ npcType.onCloseChannel = function(npc, creature) end local function greetCallback(npc, player) - if player:getStorageValue(Storage.BarbarianTest.Questline) < 8 then + if player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) < 8 then npcHandler:setMessage(MESSAGE_GREET, "You are not one of us. I don't want to talk to you.") - elseif player:getStorageValue(Storage.TheIceIslands.HuskyKill) >= 1 then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.HuskyKill) >= 1 then npcHandler:setMessage(MESSAGE_GREET, "I was told you have been killing huskies here in Svargrond! Never do that again, okay? They are precious animals for us. Give me 500 gold and I will forget that incident without telling it to Jarl Sven. Okay?") elseif player:hasAchievement("Warlord of Svargrond") then npcHandler:setMessage(MESSAGE_GREET, "HAIL to the Warlord of the arena! |PLAYERNAME|, Hero of Svargrond! What can I {do for you}?") - elseif player:getStorageValue(Storage.BarbarianTest.Questline) == 8 then + elseif player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) == 8 then npcHandler:setMessage(MESSAGE_GREET, "Greetings. What can I {do for you}?") end return true @@ -69,28 +69,28 @@ local function creatureSayCallback(npc, creature, type, message) if not npcHandler:checkInteraction(npc, creature) then return false end - if player:getStorageValue(Storage.BarbarianTest.Questline) < 8 then + if player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) < 8 then return true end if MsgContains(message, "passage") then - if player:getStorageValue(Storage.TheIceIslands.Questline) >= 3 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) >= 3 then npcHandler:say("So, do you want a passage to Nibelor my friend?", npc, creature) else npcHandler:say("Do you want to Nibelor?", npc, creature) end npcHandler:setTopic(playerId, 2) elseif MsgContains(message, "mission") then - if player:getStorageValue(Storage.BarbarianTest.Questline) >= 8 then -- if Barbarian Test absolved - if player:getStorageValue(Storage.TheIceIslands.Questline) == 1 then + if player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) >= 8 then -- if Barbarian Test absolved + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 1 then npcHandler:say({ "Well, one of the boys has run away. I think he got the scent of some beast. He's young and inexperienced so I can't blame the cub ...", "I would like you to see after him. He should be somewhere north west of the town. He is probably marking his territory so you should be able to find his trace. Are you willing to do that?", }, npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 2 then npcHandler:say("You are a friend of mine and the boys now. I tell you something. If you ever need to go to the isle of Nibelor, just ask me for a {passage}.", npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 3) - player:setStorageValue(Storage.TheIceIslands.Mission01, 3) -- Questlog The Ice Islands Quest, Befriending the Musher + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 3) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission01, 3) -- Questlog The Ice Islands Quest, Befriending the Musher npcHandler:setTopic(playerId, 0) else npcHandler:say("I have now no mission for you.", npc, creature) @@ -100,11 +100,11 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Sorry but I only give missions to those who are considered a true Barbarian. ", npc, creature) end elseif MsgContains(message, "yes") then - if player:getStorageValue(Storage.TheIceIslands.HuskyKill) >= 1 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.HuskyKill) >= 1 then if player:removeMoneyBank(500) then npcHandler:say("Alright, we are even!", npc, creature) - player:setStorageValue(Storage.TheIceIslands.HuskyKillStatus, 0) - player:setStorageValue(Storage.TheIceIslands.HuskyKill, 0) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.HuskyKillStatus, 0) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.HuskyKill, 0) else npcHandler:say("You don't have enough. Bring me the money and I will forget about it.", npc, creature) end @@ -113,11 +113,11 @@ local function creatureSayCallback(npc, creature, type, message) "That's surprising. Take a piece of meat. If you find the boy, feed it to him. That will give him enough strength and incentive to return to his pack ...", "Talk to him by calling his name 'Sniffler' and tell him you got meat for him. After he has eaten the meat, return here to talk to me about your mission.", }, npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 1) - player:setStorageValue(Storage.TheIceIslands.Mission01, 1) -- Questlog The Ice Islands Quest, Befriending the Musher + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 1) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission01, 1) -- Questlog The Ice Islands Quest, Befriending the Musher npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then - if player:getStorageValue(Storage.TheIceIslands.Questline) >= 3 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) >= 3 then player:teleportTo(Position(32325, 31049, 7)) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) npcHandler:setTopic(playerId, 0) @@ -127,9 +127,9 @@ local function creatureSayCallback(npc, creature, type, message) end end elseif MsgContains(message, "no") then - if player:getStorageValue(Storage.TheIceIslands.HuskyKill) >= 1 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.HuskyKill) >= 1 then npcHandler:say("Mhmm, you leave me no other choice than to inform the Jarl.", npc, creature) - player:setStorageValue(Storage.TheIceIslands.HuskyKillStatus, 1) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.HuskyKillStatus, 1) end end return true diff --git a/data-otservbr-global/npc/izsh.lua b/data-otservbr-global/npc/izsh.lua index 2da27ccc1a5..05573cf44aa 100644 --- a/data-otservbr-global/npc/izsh.lua +++ b/data-otservbr-global/npc/izsh.lua @@ -54,7 +54,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if Player(creature):getStorageValue(Storage.WrathoftheEmperor.Questline) == 33 then + if Player(creature):getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 33 then npcHandler:say("Oh yez, let me zee ze documentz. Here we go: zree cheztz filled wiz platinum, one houze, a zet of elite armor, and an unending mana cazket. Iz ziz correct?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -71,7 +71,8 @@ local function creatureSayCallback(npc, creature, type, message) "You will find your rewardz in one of ze old zupply zellarz. Beware of ze ratz zough. ...", "Ze rednezz of your faze and ze zound you make wiz your teez iz obviouzly a zign of gratitude of your zpeziez! I am flattered, but pleaze leave now az I have to attend to zome important buzinezz.", }, npc, creature) - Player(creature):setStorageValue(Storage.WrathoftheEmperor.Questline, 34) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 34) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission12, 0) --Questlog, Wrath of the Emperor "Mission 12: Just Rewards" npcHandler:setTopic(playerId, 0) end return true diff --git a/data-otservbr-global/npc/jack.lua b/data-otservbr-global/npc/jack.lua index 0b18bddd5d5..c92bdf9491c 100644 --- a/data-otservbr-global/npc/jack.lua +++ b/data-otservbr-global/npc/jack.lua @@ -23,31 +23,56 @@ npcConfig.flags = { floorchange = false, } -local function greetCallback(npc, creature) - local playerId = creature:getId() +npcConfig.voices = { + interval = 15000, + chance = 50, + { text = "Now I need to clean up everything again." }, + { text = "So much to do, so little time, they say..." }, + { text = "Could it be...? No. No way." }, + { text = "Mh..." }, +} + +local keywordHandler = KeywordHandler:new() +local npcHandler = NpcHandler:new(keywordHandler) + +npcType.onThink = function(npc, interval) + npcHandler:onThink(npc, interval) +end + +npcType.onAppear = function(npc, creature) + npcHandler:onAppear(npc, creature) +end + +npcType.onDisappear = function(npc, creature) + npcHandler:onDisappear(npc, creature) +end + +npcType.onMove = function(npc, creature, fromPosition, toPosition) + npcHandler:onMove(npc, creature, fromPosition, toPosition) +end + +npcType.onSay = function(npc, creature, type, message) + npcHandler:onSay(npc, creature, type, message) +end + +npcType.onCloseChannel = function(npc, creature) + npcHandler:onCloseChannel(npc, creature) +end + +local function greetCallback(npc, creature, message) local player = Player(creature) + local playerId = player:getId() if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 7 then - npcHandler:setMessage( - MESSAGE_GREET, - "You!! What have you told my family? They are mad at me and I don't even know why! \z - They think I lied to them about working in Edron in secrecy! Why should I even do that!" - ) + npcHandler:setMessage(MESSAGE_GREET, "You!! What have you told my family? They are mad at me and I don't even know why! They think I lied to them about working in Edron in secrecy! Why should I even do that!") elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 8 then npcHandler:setMessage(MESSAGE_GREET, { - "What did you do to my SCULPTURE? You simply DESTROYED it? Why? You... you ruined everything... \z - my house, my hobby, my life. My family even refuses to talk to me anymore. ...", - "Alright, alright you win. I am done for. You... you must be right, yes. Yes, I was working as an \z - intern... in the academy in Edron... yes... Just... tell this Spectulus guy I want to see him. \z - I have nothing left. I am ready.", + "What did you do to my SCULPTURE? You simply DESTROYED it? Why? You... you ruined everything... my house, my hobby, my life. My family even refuses to talk to me anymore. ...", + "Alright, alright you win. I am done for. You... you must be right, yes. Yes, I was working as an intern... in the academy in Edron... yes... Just... tell this Spectulus guy I want to see him. I have nothing left. I am ready.", }) player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 9) elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 10 then - npcHandler:setMessage( - MESSAGE_GREET, - "So, you've returned to Spectulus? What did he say, is anything wrong? You have this strange expression \z - on your face - is there anything wrong? You DID tell me the truth here, didn't you?" - ) + npcHandler:setMessage(MESSAGE_GREET, "So, you've returned to Spectulus? What did he say, is anything wrong? You have this strange expression on your face - is there anything wrong? You DID tell me the truth here, didn't you?") else npcHandler:setMessage(MESSAGE_GREET, "Yes? What can I do for you? I hope this won't take long, though.") end @@ -71,31 +96,15 @@ local function creatureSayCallback(npc, creature, type, message) if npcHandler:getTopic(playerId) == 3 then npcHandler:say({ "So it's that name again. You are really determined, aren't you. ...", - "So if he thinks I'm someone he knew who is now 'lost' and needs to come back or whatever - \z - tell him he is WRONG. I always lived here with my mother and sister, I'm happy here and I \z - certainly don't want to go to that academy of yours.", + "So if he thinks I'm someone he knew who is now 'lost' and needs to come back or whatever - tell him he is WRONG. I always lived here with my mother and sister, I'm happy here and I certainly don't want to go to that academy of yours.", }, npc, creature, 1000) player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 4) end end elseif MsgContains(message, "furniture") then if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 3 then - if - (player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Furniture01) == 1) - and (player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Furniture02) == 1) - and (player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Furniture03) == 1) - and (player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Furniture04) == 1) - and (player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Furniture05) == 1) - then - npcHandler:say( - "What have you done? What are all these pieces of furniture doing here? Those are ugly at \z - best and - hey! Stop! Leave the wallpaper alone! Alright, alright! Just tell me, why are you \z - doing this? Who's behind all this?", - npc, - creature - ) - npcHandler:setTopic(playerId, 3) - end + npcHandler:say("What have you done? What are all these pieces of furniture doing here? Those are ugly at best and - hey! Stop! Leave the wallpaper alone! Alright, alright! Just tell me, why are you doing this? Who's behind all this?", npc, creature) + npcHandler:setTopic(playerId, 3) end elseif MsgContains(message, "no") then if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 10 then @@ -104,12 +113,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 5) elseif npcHandler:getTopic(playerId) == 5 then npcHandler:say({ - "So... so this wasn't EVEN REAL? You brought all this ugly furniture here, you destroyed \z - my sculpture... and on top of that you actually CONVINCED mother and my sister!? How can \z - I possibly explain all that? ...", - "I... I... Well, at least you told me the truth. I don't know if I can accept this as an \z - excuse but it's a start. Now let me return to my work, I need to fix this statue and then \z - the rest of this... mess.", + "So... so this wasn't EVEN REAL? You brought all this ugly furniture here, you destroyed my sculpture... and on top of that you actually CONVINCED mother and my sister!? How can I possibly explain all that? ...", + "I... I... Well, at least you told me the truth. I don't know if I can accept this as an excuse but it's a start. Now let me return to my work, I need to fix this statue and then the rest of this... mess.", }, npc, creature) player:addAchievement("Truth Be Told") player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 11) @@ -120,19 +125,14 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say({ - "Oh hm, I've got a handkerchief here somewhere - ah, oh no it's already used, I'm sorry. \z - So, you say that's a real person? Spectulus? I mean - what kind of weirdo thinks \z - of a name like that anyway. ...", - "And he does what? Hm. Here in Edron? I see. And I was - what? No way. Where? What! \z - Why? And you say you are telling the truth?", + "Oh hm, I've got a handkerchief here somewhere - ah, oh no it's already used, I'm sorry. So, you say that's a real person? Spectulus? I mean - what kind of weirdo thinks of a name like that anyway. ...", + "And he does what? Hm. Here in Edron? I see. And I was - what? No way. Where? What! Why? And you say you are telling the truth?", }, npc, creature) npcHandler:setTopic(playerId, 2) elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say({ - "I see. Well for starters, I think you're crazy. If I would have 'travelled' in some \z - kind of - device? - that thing should be around here somewhere, or not? ...", - "What? 'Dimensional fold?' Well, thanks for the information and please close the door \z - behind you when you leave my house. Now.", + "I see. Well for starters, I think you're crazy. If I would have 'travelled' in some kind of - device? - that thing should be around here somewhere, or not? ...", + "What? 'Dimensional fold?' Well, thanks for the information and please close the door behind you when you leave my house. Now.", }, npc, creature) npcHandler:setTopic(playerId, 0) player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 2) @@ -143,12 +143,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("So that's it? Really?", npc, creature) npcHandler:setTopic(playerId, 6) elseif npcHandler:getTopic(playerId) == 6 then - npcHandler:say( - "Yeah, yeah... so what are you still doing here? I guess I... will have to seek out this \z - Spectulus now, see what he has to say. There is nothing left for me in this place.", - npc, - creature - ) + npcHandler:say("Yeah, yeah... so what are you still doing here? I guess I... will have to seek out this Spectulus now, see what he has to say. There is nothing left for me in this place.", npc, creature) player:addAchievement("You Don't Know Jack") player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 11) player:setStorageValue(Storage.TibiaTales.JackFutureQuest.LastMissionState, 2) @@ -157,69 +152,26 @@ local function creatureSayCallback(npc, creature, type, message) end elseif MsgContains(message, "hobbies") or MsgContains(message, "hobby") then if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 7 then - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Statue) < 1 then + if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Statue) < 0 then npcHandler:say({ - "Ah, also a keen lover of arts I assume? You might have already caught a glimpse of that \z - humble masterpiece over there in the corner - I sculpt sulky sculptures! ...", - "Sculpting sculptures was my passion since childhood... ...and it was there at my first \z - sandcastle when... ...and it formed... ...and it developed into... ...years of enduring \z - sculpting... ...carved of something like... ...sulky... ...", - "And that's what I like to do to this very day - hey, hey will you wake up? Were you even \z - listening to me?", - }, creature, false, true, 200) + "Ah, also a keen lover of arts I assume? You might have already caught a glimpse of that humble masterpiece over there in the corner - I sculpt sulky sculptures! ...", + "Sculpting sculptures was my passion since childhood... ...and it was there at my first sandcastle when... ...and it formed... ...and it developed into... ...years of enduring sculpting... ...carved of something like... ...sulky... ...", + "And that's what I like to do to this very day - hey, hey will you wake up? Were you even listening to me?", + }, npc, creature) player:setStorageValue(Storage.TibiaTales.JackFutureQuest.Statue, 1) npcHandler:setTopic(playerId, 0) end elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 8 then - npcHandler:say( - "I... was... sculpting sulky sculptures. For all my life. Until you came in here and DESTROYED \z - MY MASTERPIECE. Go away. I don't like you.", - npc, - creature - ) + npcHandler:say("I... was... sculpting sulky sculptures. For all my life. Until you came in here and DESTROYED MY MASTERPIECE. Go away. I don't like you.", npc, creature) npcHandler:setTopic(playerId, 0) end end return true end -npcConfig.voices = { - interval = 15000, - chance = 50, - { text = "Now I need to clean up everything again." }, - { text = "So much to do, so little time, they say..." }, - { text = "Could it be...? No. No way." }, - { text = "Mh..." }, -} - -local keywordHandler = KeywordHandler:new() -local npcHandler = NpcHandler:new(keywordHandler) - -npcType.onThink = function(npc, interval) - npcHandler:onThink(npc, interval) -end - -npcType.onAppear = function(npc, creature) - npcHandler:onAppear(npc, creature) -end - -npcType.onDisappear = function(npc, creature) - npcHandler:onDisappear(npc, creature) -end - -npcType.onMove = function(npc, creature, fromPosition, toPosition) - npcHandler:onMove(npc, creature, fromPosition, toPosition) -end - -npcType.onSay = function(npc, creature, type, message) - npcHandler:onSay(npc, creature, type, message) -end - -npcType.onCloseChannel = function(npc, creature) - npcHandler:onCloseChannel(npc, creature) -end -npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:setCallback(CALLBACK_GREET, greetCallback) +npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) + npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- npcType registering the npcConfig table diff --git a/data-otservbr-global/npc/jack_fate.lua b/data-otservbr-global/npc/jack_fate.lua index 5a98b0eb288..8aa31c14002 100644 --- a/data-otservbr-global/npc/jack_fate.lua +++ b/data-otservbr-global/npc/jack_fate.lua @@ -80,7 +80,7 @@ addTravelKeyword("darashia", 200, Position(33289, 32480, 6)) addTravelKeyword("ankrahmun", 90, Position(33092, 32883, 6)) addTravelKeyword("goroma", 0, Position(32161, 32558, 6), "Ugh. You really want to go back to Goroma? I'll surely have to repair my ship afterwards, so I won't charge. Okay?") addTravelKeyword("yalahar", 275, Position(32816, 31272, 6), nil, function(player) - return player:getStorageValue(Storage.SearoutesAroundYalahar.LibertyBay) ~= 1 and player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) < 5 + return player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.LibertyBay) ~= 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) < 5 end) -- Thais diff --git a/data-otservbr-global/npc/jean_pierre.lua b/data-otservbr-global/npc/jean_pierre.lua index df20c85c72d..75fe49bda01 100644 --- a/data-otservbr-global/npc/jean_pierre.lua +++ b/data-otservbr-global/npc/jean_pierre.lua @@ -47,16 +47,16 @@ end local ingredients = { [1] = { { 3577, 2 }, { 8010, 20 }, { 8015, 1 }, { 8197, 1 }, { 3603, 5 }, { 2874, 2, 3 } }, - [2] = { { 7250, 2 }, { 3596, 2 }, { 8014, 1 }, { 3606, 2 }, { 3741, 1 }, { 2874, 1, 15 } }, + [2] = { { 7250, 2 }, { 3596, 2 }, { 8014, 1 }, { 3606, 2 }, { 3741, 1 }, { 2874, 1, 2 } }, [3] = { { 4363, 1 }, { 8016, 3 }, { 3602, 5 }, { 3606, 2 }, { 3739, 1 }, { 3724, 5 } }, - [4] = { { 4330, 1 }, { 8013, 2 }, { 3586, 2 }, { 5096, 2 }, { 2874, 2, 14 }, { 3735, 1 } }, - [5] = { { 6574, 1 }, { 904, 1 }, { 3587, 2 }, { 2874, 2, 6 }, { 3738, 1 }, { 3736, 1 } }, + [4] = { { 4330, 1 }, { 8013, 2 }, { 3586, 2 }, { 5096, 2 }, { 2874, 2, 15 }, { 3735, 1 } }, + [5] = { { 6574, 1 }, { 6393, 1 }, { 3587, 2 }, { 2874, 2, 9 }, { 3738, 1 }, { 3736, 1 } }, [6] = { { 3595, 2 }, { 3596, 2 }, { 3597, 2 }, { 8014, 2 }, { 8015, 1 }, { 8197, 1 }, { 3607, 1 }, { 3723, 20 }, { 3725, 5 } }, - [7] = { { 8016, 10 }, { 3607, 2 }, { 3741, 1 }, { 3740, 1 }, { 2874, 1, 43 }, { 3606, 2 } }, + [7] = { { 8016, 10 }, { 3607, 2 }, { 3741, 1 }, { 3740, 1 }, { 2874, 1, 16 }, { 3606, 2 } }, [8] = { { 3582, 1 }, { 8011, 5 }, { 8015, 1 }, { 8017, 2 }, { 3594, 1 }, { 8016, 2 } }, [9] = { { 3580, 1 }, { 7158, 1 }, { 7159, 1 }, { 3581, 5 }, { 3601, 2 }, { 3737, 1 } }, - [10] = { { 3595, 5 }, { 2874, 1, 6 }, { 8013, 1 }, { 3603, 10 }, { 3606, 2 }, { 3598, 10 }, { 841, 2 } }, - [11] = { { 2874, 5, 14 }, { 3725, 5 }, { 3724, 5 }, { 10329, 10 }, { 3581, 10 } }, + [10] = { { 3595, 5 }, { 2874, 1, 9 }, { 8013, 1 }, { 3603, 10 }, { 3606, 2 }, { 3598, 10 }, { 841, 2 } }, + [11] = { { 2874, 5, 15 }, { 3725, 5 }, { 3724, 5 }, { 10329, 10 }, { 3581, 10 } }, [12] = { { 10456, 5 }, { 2874, 2, 1 }, { 3595, 20 }, { 8010, 10 }, { 8016, 3 } }, [13] = { { 6569, 3 }, { 3599, 3 }, { 6574, 2 }, { 6500, 15 }, { 6558, 1 } }, [14] = { { 3606, 40 }, { 5096, 20 }, { 5902, 10 }, { 8758, 1 }, { 5942, 1 } }, @@ -64,7 +64,7 @@ local ingredients = { local function playerHasIngredients(creature) local player = Player(creature) - local table = ingredients[player:getStorageValue(Storage.HotCuisineQuest.CurrentDish)] + local table = ingredients[player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish)] if table then for i = 1, #table do local itemCount = player:getItemCount(table[i][1], table[i][3] or -1) @@ -80,15 +80,44 @@ local function playerHasIngredients(creature) end return true end + +local function endConversationWithDelay(npcHandler, npc, creature) + addEvent(function() + npcHandler:unGreet(npc, creature) + end, 1000) +end + +local function canCookToday(player, lastInteractionKey) + local currentDate = os.time() + local lastInteractionDate = player:getStorageValue(lastInteractionKey) + + if lastInteractionDate == -1 then + return true + end + + local lastDateTable = os.date("*t", lastInteractionDate) + local currentDateTable = os.date("*t", currentDate) + + if currentDateTable.month == 8 and (currentDateTable.year > lastDateTable.year or lastDateTable.month ~= 8) then + return true + end + + return false +end + local function greetCallback(npc, creature) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.HotCuisineQuest.QuestStart) < 1 then + local currentDate = os.time() + local currentDateTable = os.date("*t", currentDate) + + if currentDateTable.month == 8 then npcHandler:setMessage(MESSAGE_GREET, "Greetings, |PLAYERNAME|. What are you doing out here?") else - npcHandler:setMessage(MESSAGE_GREET, "Hello there again, |PLAYERNAME|! I guess you're back for some cooking - let's get going then!") + endConversationWithDelay(npcHandler, npc, creature) end + return true end @@ -100,8 +129,10 @@ local function creatureSayCallback(npc, creature, type, message) return false end + local currentDate = os.time() + if MsgContains(message, "cook") then - if player:getStorageValue(Storage.HotCuisineQuest.QuestStart) < 1 then + if player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestStart) < 1 then npcHandler:say("Well, I'm not a simple cook. I travel the whole Tibian continent for the most artfully seasoned {recipes} and constantly develop new ones.", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -110,72 +141,72 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("You're interested in my recipes? Well. They are not for sale, but if you want to become my {apprentice}, I'll share my knowledge with you.", npc, creature) npcHandler:setTopic(playerId, 2) end - if player:getStorageValue(Storage.HotCuisineQuest.QuestStart) == 1 then - if player:getStorageValue(Storage.HotCuisineQuest.CurrentDish) == 1 then + if player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestStart) >= 1 then + if player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish) == 1 then npcHandler:say({ "The first dish we are going to prepare together is called {Rotworm Stew}. Now, don't be scared off. Of course we won't eat those nasty and dirty earth-crawlers! ...", "The name is just for the effect it has on people. Bring me the following ingredients and I'll show you how it's done. ...", "Two pieces of meat, two vials of beer, twenty potatoes, one onion, one bulb of garlic and five ounces of flour. Make sure that the ingredients are fresh and smell good.", }, npc, creature) npcHandler:setTopic(playerId, 4) - elseif player:getStorageValue(Storage.HotCuisineQuest.CurrentDish) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish) == 2 then npcHandler:say({ "The next dish we are going to prepare together is called {Hydra Tongue Salad}. The common hydra tongue is a pest plant with an surprisingly aromatic taste. ...", "We'll add some other vegetables and spices for the delicate and distinctive taste. Bring me the following ingredients and I'll show you how it's done. ...", "Two hydra tongue plants, two tomatoes, one cucumber, two eggs, one troll green and one vial of wine.", }, npc, creature) npcHandler:setTopic(playerId, 6) - elseif player:getStorageValue(Storage.HotCuisineQuest.CurrentDish) == 3 then + elseif player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish) == 3 then npcHandler:say({ "The next dish we are going to prepare together is called {Roasted Dragon Wings}. Oh, don't give me that look! Of course you don't have to bring a whole dragon up here. ...", "The 'dragon' part derives from the fiery afterburn of this meal, but the wings we use are much smaller, though similar in shape. Bring me the following ingredients and I'll show you how it's done. ...", "One fresh dead bat, three jalapeño peppers, five brown breads, two eggs, one powder herb and five red mushrooms.", }, npc, creature) npcHandler:setTopic(playerId, 8) - elseif player:getStorageValue(Storage.HotCuisineQuest.CurrentDish) == 4 then + elseif player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish) == 4 then npcHandler:say({ "The next dish we are going to prepare together is called {Tropical Fried Terrorbird}. You might have guessed it, we're not going to use a terrorbird. But! ...", "The dish is quite fried and tropical. Bring me the following ingredients and we're going to prepare it: One fresh dead chicken, two lemons, two oranges, two mangos, one stone herb and two vials of coconut milk.", }, npc, creature) npcHandler:setTopic(playerId, 10) - elseif player:getStorageValue(Storage.HotCuisineQuest.CurrentDish) == 5 then + elseif player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish) == 5 then npcHandler:say({ "The next dish we are going to prepare together is called {Banana Chocolate Shake}. After all those spicy dishes you should treat your guests with a sweet surprise. ...", "Bring me the following ingredients and we'll make one hell of a drink: one bar of chocolate, one cream cake, two bananas, two vials of milk, one sling herb and one star herb.", }, npc, creature) npcHandler:setTopic(playerId, 12) - elseif player:getStorageValue(Storage.HotCuisineQuest.CurrentDish) == 6 then + elseif player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish) == 6 then npcHandler:say({ "The next dish we are going to prepare together is called {Veggie Casserole}. This one is going to be your masterpiece so far, I'm telling you. ...", "It's also quite healthy! - Well, that's what I keep telling me when I eat the third serving, hehehe. Bring me the following ingredients and I'll show you how it's done. ...", "Two carrots, two tomatoes, two corncobs, two cucumbers, one onion, one bulb of garlic, one piece of cheese, twenty white mushrooms and five brown mushrooms.", }, npc, creature) npcHandler:setTopic(playerId, 14) - elseif player:getStorageValue(Storage.HotCuisineQuest.CurrentDish) == 7 then + elseif player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish) == 7 then npcHandler:say({ "The next dish we are going to prepare together is called {Filled Jalapeño Peppers}. It's a great snack and quite spicy, for those who like it hot. ...", "Bring me the following ingredients and I'll show you how it's done: Ten jalapeño peppers, two pieces of cheese, one troll green, one shadow herb, one vial of mead and two eggs.", }, npc, creature) npcHandler:setTopic(playerId, 16) - elseif player:getStorageValue(Storage.HotCuisineQuest.CurrentDish) == 8 then + elseif player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish) == 8 then npcHandler:say({ "The next dish we are going to prepare together is called {Blessed Steak}. I'm sorry, I couldn't resist the pun with this one. ...", "Don't worry, there's no temple trip awaiting you. Just bring me the following: one piece of ham, five plums, one onion, two beetroots, one pumpkin and two jalapeño peppers.", }, npc, creature) npcHandler:setTopic(playerId, 18) - elseif player:getStorageValue(Storage.HotCuisineQuest.CurrentDish) == 9 then + elseif player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish) == 9 then npcHandler:say({ "The next dish we are going to prepare together is called {Northern Fishburger}. I hope you like fish, not everyone does. This one is a specialty I picked up in Svargrond. ...", "Bring me the following ingredients and I'll show you how it's done: one northern pike, one rainbow trout, one green perch, five shrimps, two rolls and one fern.", }, npc, creature) npcHandler:setTopic(playerId, 20) - elseif player:getStorageValue(Storage.HotCuisineQuest.CurrentDish) == 10 then + elseif player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish) == 10 then npcHandler:say({ "The last dish we are going to prepare together is called {Carrot Cake}. Yes, it's a real cake, we need a tasty desert to complete our cooking course. ...", "Bring me the following ingredients and I'll lead you through it: five carrots, one vial of milk, one lemon, ten ounces of flour, two eggs, ten cookies and two peanuts.", }, npc, creature) npcHandler:setTopic(playerId, 22) - elseif player:getStorageValue(Storage.HotCuisineQuest.CurrentDish) == 11 then + elseif player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish) == 11 then npcHandler:say({ "Yes, you heard that right! Even though I was laying sick on my divan for weeks, I have some new dishes for you. Ehem. Of course I couldn't have done it without my little helpers travelling around the world and discovering recipes. ...", "So... ... each good menu needs an amazing starter to awaken and stimulate all the little taste buds on your tongue. We're going to cook a nice portion of {Coconut Shrimp Bake}! ...", @@ -183,7 +214,7 @@ local function creatureSayCallback(npc, creature, type, message) "... because of the dish, I mean, of course. Ehem. Bring me the following ingredients and we'll get started: Five vials of coconut milk, five brown mushrooms, five red mushrooms, ten rice balls and ten shrimps.", }, npc, creature) npcHandler:setTopic(playerId, 24) - elseif player:getStorageValue(Storage.HotCuisineQuest.CurrentDish) == 12 then + elseif player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish) == 12 then npcHandler:say({ "After this wonderful and tasty starter we're all set for a special dish I learnt from a brave adventurer who almost starved when he got lost in the mountains between Ankrahmun and Port Hope, or so he told me. ...", "Luckily, he was saved by nomads - can you imagine? - and they fed him a special local dish that's very cheap and easy to prepare, yet rich in vitamins and spending energy for hours. ...", @@ -192,7 +223,7 @@ local function creatureSayCallback(npc, creature, type, message) "Bring me the following ingredients - if you dare - and I'll show you the secret of {Blackjack}: Five sandcrawler shells, two vials of water, twenty carrots, ten potatoes and three jalapeño peppers.", }, npc, creature) npcHandler:setTopic(playerId, 26) - elseif player:getStorageValue(Storage.HotCuisineQuest.CurrentDish) == 13 then + elseif player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish) == 13 then npcHandler:say({ "Weren't you surprised by the great taste of our main dish? In case you still have some space left in your tummy, we're in for a sweet and fun dessert - but beware unwanted side effects! ...", "It was introduced to me by a fearless knight who invented this recipe rather by accident when a bottle of demonic blood broke in his backpack and spilled its contents over his bag of candy balls. ...", @@ -201,7 +232,7 @@ local function creatureSayCallback(npc, creature, type, message) "In any case, bring me the following ingredients and we'll make some {Demonic Candy Balls}, if you like: Three candies, three candy canes, two bars of chocolate, fifteen gingerbread men and one concentrated demonic blood.", }, npc, creature) npcHandler:setTopic(playerId, 28) - elseif player:getStorageValue(Storage.HotCuisineQuest.CurrentDish) == 14 then + elseif player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish) == 14 then npcHandler:say({ "Did you dare eat all of your Demonic Candy Balls...? Hehehe! Well, I almost forgot one of the most essential parts for a perfect dinner. A drink! I have one for you, almost a designer drink you could say. ...", "Its inventor seems to have done some scientific research in order to achieve his desired effect, which is - charging magical rings. You have to drink it while you're wearing one for a miraculous effect! ...", @@ -210,7 +241,7 @@ local function creatureSayCallback(npc, creature, type, message) }, npc, creature) npcHandler:setTopic(playerId, 30) end - elseif player:getStorageValue(Storage.HotCuisineQuest.QuestStart) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestStart) == 2 then npcHandler:say("You can now cook any dish you want from this list: {Rotworm Stew, Hydra Tongue Salad, Roasted Dragon Wings, Tropical Fried Terrorbird, Banana Chocolate Shake, Veggie Casserole, Filled Jalapeno Peppers, Blessed Steak, Northern Fishburger, Carrot Cake, Coconut Shrimp Bake, Blackjack, Demonic Candy Balls, Sweet Mangonaise Elixir}.", npc, creature) end elseif MsgContains(message, "apprentice") then @@ -221,330 +252,401 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 3 then npcHandler:say("Fine, young human. Ask me for a {recipe} anytime and I'll teach you what I know.", npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.QuestStart, 1) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 1) - player:setStorageValue(Storage.HotCuisineQuest.QuestLog, 1) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestStart, 1) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish, 1) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestLog, 1) elseif npcHandler:getTopic(playerId) == 5 then - if playerHasIngredients(creature) then - npcHandler:say({ - "Aah, so let's see! We cook the meat in a large pot together with the chopped onion until it's separated from the bones. Now we also have a fine meat broth! ...", - "Cut the potatoes into small pieces and add them to the pot. Add some flour to thicken the stew. Finally, spice it up with some garlic and add beer for the typical dwarvish taste! ...", - "And voilà, we're done. I developed this recipe while talking to Maryza in the Jolly Axeman. She said to eat it when one's health is low. Enjoy!", - }, npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 2) - player:setStorageValue(Storage.HotCuisineQuest.QuestLog, 2) - player:addItem(9079, 1) - npcHandler:setTopic(playerId, 0) + if canCookToday(player, Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate2) then + if playerHasIngredients(creature) then + npcHandler:say({ + "Aah, so let's see! We cook the meat in a large pot together with the chopped onion until it's separated from the bones. Now we also have a fine meat broth! ...", + "Cut the potatoes into small pieces and add them to the pot. Add some flour to thicken the stew. Finally, spice it up with some garlic and add beer for the typical dwarvish taste! ...", + "And voilà, we're done. I developed this recipe while talking to Maryza in the Jolly Axeman. She said to eat it when one's health is low. Enjoy!", + }, npc, creature) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish, 2) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestLog, 2) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate2, currentDate) + player:addItem(9079, 1) + npcHandler:setTopic(playerId, 0) + else + npcHandler:say("Make sure that you have all the ingredients with you.", npc, creature) + npcHandler:setTopic(playerId, 0) + end else - npcHandler:say("Make sure that you have all the ingredients, with you.", npc, creature) + npcHandler:say("It seems you have already cooked this dish this year. Please come back next year in August.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 7 then - if playerHasIngredients(creature) then - npcHandler:say({ - "Okay, here we go! This one is easy, just chop the hydra tongues, tomatoes and cucumber into tiny pieces. ...", - "Now for the sauce - our base is wine, in which we mix the raw eggs until it got a nice smooth consistency. Add grinded troll green, whose flavour is quite similar to basil and shake the sauce in a mug. ...", - "Pour it over the salad, and voilà, we're done! This is a Venorean recipe and very tasty. I recommend eating it when you're suffering from some kind of dangerous condition. Enjoy!", - }, npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 3) - player:setStorageValue(Storage.HotCuisineQuest.QuestLog, 3) - player:addItem(9080, 1) - npcHandler:setTopic(playerId, 0) + if canCookToday(player, Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate3) then + if playerHasIngredients(creature) then + npcHandler:say({ + "Okay, here we go! This one is easy, just chop the hydra tongues, tomatoes and cucumber into tiny pieces. ...", + "Now for the sauce - our base is wine, in which we mix the raw eggs until it got a nice smooth consistency. Add grinded troll green, whose flavour is quite similar to basil and shake the sauce in a mug. ...", + "Pour it over the salad, and voilà, we're done! This is a Venorean recipe and very tasty. I recommend eating it when you're suffering from some kind of dangerous condition. Enjoy!", + }, npc, creature) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish, 3) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestLog, 3) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate3, currentDate) + player:addItem(9080, 1) + npcHandler:setTopic(playerId, 0) + else + npcHandler:say("Make sure that you have all the ingredients with you.", npc, creature) + npcHandler:setTopic(playerId, 0) + end else - npcHandler:say("Make sure that you have all the ingredients, with you.", npc, creature) + npcHandler:say("It seems you have already cooked this dish this year. Please come back next year in August.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 9 then - if playerHasIngredients(creature) then - npcHandler:say({ - "Let's get started! The trick with this one is the crunchy crust around the wings. ...", - "First, we grate the dry brown bread into very small crumbs and mix that with the two eggs. Add grinded peppers for the spicy taste and the powder herb for a hint of curry flavour. ...", - "Carefully separate the bat wings, clean them of any possible hairs and coat them in our mixture. Roast them in a pan together with sliced mushrooms and serve. ...", - "Voilà, we're done! This recipe is from the area around Thais and should help you protect yourself in your battles. Enjoy!", - }, npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 4) - player:setStorageValue(Storage.HotCuisineQuest.QuestLog, 4) - player:addItem(9081, 1) - npcHandler:setTopic(playerId, 0) + if canCookToday(player, Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate4) then + if playerHasIngredients(creature) then + npcHandler:say({ + "Let's get started! The trick with this one is the crunchy crust around the wings. ...", + "First, we grate the dry brown bread into very small crumbs and mix that with the two eggs. Add grinded peppers for the spicy taste and the powder herb for a hint of curry flavour. ...", + "Carefully separate the bat wings, clean them of any possible hairs and coat them in our mixture. Roast them in a pan together with sliced mushrooms and serve. ...", + "Voilà, we're done! This recipe is from the area around Thais and should help you protect yourself in your battles. Enjoy!", + }, npc, creature) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate4, currentDate) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish, 4) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestLog, 4) + player:addItem(9081, 1) + npcHandler:setTopic(playerId, 0) + else + npcHandler:say("Make sure that you have all the ingredients with you.", npc, creature) + npcHandler:setTopic(playerId, 0) + end else - npcHandler:say("Make sure that you have all the ingredients, with you.", npc, creature) + npcHandler:say("It seems you have already cooked this dish this year. Please come back next year in August.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 11 then - if playerHasIngredients(creature) then - npcHandler:say({ - "This is a recipe right from the jungles of Tiquanda! Grind the stone herb and mix it with the coconut milk, then bathe the chicken in it for a while. ...", - "In the meantime, peel the oranges and mangos, chop them into pieces and add them to the mix. Take the chicken out of its bath and fry it, preferably over open fire. ...", - "Take the fruits out of the spicy coconut milk and heat them on an oven. Once the chicken is fried, add the fruits and spray some squeezed lemon over it. ...", - "Voilà, we're done! They say that this dish has magical abilities and can awaken secret powers in you during your battles. Enjoy!", - }, npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 5) - player:setStorageValue(Storage.HotCuisineQuest.QuestLog, 5) - player:addItem(9082, 1) - npcHandler:setTopic(playerId, 0) + if canCookToday(player, Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate5) then + if playerHasIngredients(creature) then + npcHandler:say({ + "This is a recipe right from the jungles of Tiquanda! Grind the stone herb and mix it with the coconut milk, then bathe the chicken in it for a while. ...", + "In the meantime, peel the oranges and mangos, chop them into pieces and add them to the mix. Take the chicken out of its bath and fry it, preferably over open fire. ...", + "Take the fruits out of the spicy coconut milk and heat them on an oven. Once the chicken is fried, add the fruits and spray some squeezed lemon over it. ...", + "Voilà, we're done! They say that this dish has magical abilities and can awaken secret powers in you during your battles. Enjoy!", + }, npc, creature) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate5, currentDate) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish, 5) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestLog, 5) + player:addItem(9082, 1) + npcHandler:setTopic(playerId, 0) + else + npcHandler:say("Make sure that you have all the ingredients with you.", npc, creature) + npcHandler:setTopic(playerId, 0) + end else - npcHandler:say("Make sure that you have all the ingredients, with you.", npc, creature) + npcHandler:say("It seems you have already cooked this dish this year. Please come back next year in August.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 13 then - if playerHasIngredients(creature) then - npcHandler:say({ - "Great! Let's get it done! An easy one again, but you'll get right into holiday mood, like the Meriana beach dwellers I got that recipe from. ...", - "Melt the chocolate in a hot-water bath and add the grinded herbs - did you know, those herbs have a flavour like cinnamon and vanilla, yummy! Keep at gentle heat and add the milk. ...", - "Mash the banana and stir it really well into the chocolate-milk mixture. Gosh, do you smell that? Pure goodness! Now finally, we take just a bit of the creamcake and fold it in. ...", - "Voilà, we're done! To be honest, I don't know what this drink does, but at least it makes me really happy. Drink together with a loved one and enjoy!", - }, npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 6) - player:setStorageValue(Storage.HotCuisineQuest.QuestLog, 6) - player:addItem(9083, 1) - npcHandler:setTopic(playerId, 0) + if canCookToday(player, Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate6) then + if playerHasIngredients(creature) then + npcHandler:say({ + "Great! Let's get it done! An easy one again, but you'll get right into holiday mood, like the Meriana beach dwellers I got that recipe from. ...", + "Melt the chocolate in a hot-water bath and add the grinded herbs - did you know, those herbs have a flavour like cinnamon and vanilla, yummy! Keep at gentle heat and add the milk. ...", + "Mash the banana and stir it really well into the chocolate-milk mixture. Gosh, do you smell that? Pure goodness! Now finally, we take just a bit of the creamcake and fold it in. ...", + "Voilà, we're done! To be honest, I don't know what this drink does, but at least it makes me really happy. Drink together with a loved one and enjoy!", + }, npc, creature) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate6, currentDate) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish, 6) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestLog, 6) + player:addItem(9083, 1) + npcHandler:setTopic(playerId, 0) + else + npcHandler:say("Make sure that you have all the ingredients with you.", npc, creature) + npcHandler:setTopic(playerId, 0) + end else - npcHandler:say("Make sure that you have all the ingredients, with you.", npc, creature) + npcHandler:say("It seems you have already cooked this dish this year. Please come back next year in August.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 15 then - if playerHasIngredients(creature) then - npcHandler:say({ - "So let's start! This is a dish especially famous in the area around Ab'Dendriel! Chop the onions into little cubes and sweat them in a pan until they are glassy. ...", - "Add garlic and mushrooms and fry gently until the mushrooms have shrunk up. Now, we add the peeled tomatoes and corn and have it all nicely cook together. ...", - "Put in carrot pieces and cucumber at the very end, so they will stay crisp! Finally put the cheese over it like a little blanket have it melt on the oven until it's slightly brownish. ...", - "And voilà, we're done! This dish will help you in your battles and supply you with enough power to hit really hard! Enjoy!", - }, npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 7) - player:setStorageValue(Storage.HotCuisineQuest.QuestLog, 7) - player:addItem(9084, 1) - npcHandler:setTopic(playerId, 0) + if canCookToday(player, Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate7) then + if playerHasIngredients(creature) then + npcHandler:say({ + "So let's start! This is a dish especially famous in the area around Ab'Dendriel! Chop the onions into little cubes and sweat them in a pan until they are glassy. ...", + "Add garlic and mushrooms and fry gently until the mushrooms have shrunk up. Now, we add the peeled tomatoes and corn and have it all nicely cook together. ...", + "Put in carrot pieces and cucumber at the very end, so they will stay crisp! Finally put the cheese over it like a little blanket have it melt on the oven until it's slightly brownish. ...", + "And voilà, we're done! This dish will help you in your battles and supply you with enough power to hit really hard! Enjoy!", + }, npc, creature) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate7, currentDate) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish, 7) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestLog, 7) + player:addItem(9084, 1) + npcHandler:setTopic(playerId, 0) + else + npcHandler:say("Make sure that you have all the ingredients with you.", npc, creature) + npcHandler:setTopic(playerId, 0) + end else - npcHandler:say("Make sure that you have all the ingredients, with you.", npc, creature) + npcHandler:say("It seems you have already cooked this dish this year. Please come back next year in August.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 17 then - if playerHasIngredients(creature) then - npcHandler:say({ - "Okay! So after all of these heavy dishes, we're going to create a fast little snack. ...", - "First of all, remove the top of the jalapeño peppers and clean their inside, so that you have space for the filling. Now for the filling, we grate the cheese and mix it with the mead and the eggs, until it has a nice consistency. ...", - "We add the grinded herbs and blend it well. Push a spoonful in each jalapeño pepper until they are nicely stuffed. Now, we shortly fry the jalapeño peppers in a pan to heat them up. ...", - "The filling will melt nicely, just be careful that it doesn't drip out! And voilà, we're done! ...", - "This famous dish from Ankrahmun is quite hot and spicy, so only eat one at a time. It's also possible that you get the urge to run really fast afterwards. Enjoy!", - }, npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 8) - player:setStorageValue(Storage.HotCuisineQuest.QuestLog, 8) - player:addItem(9085, 1) - npcHandler:setTopic(playerId, 0) + if canCookToday(player, Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate8) then + if playerHasIngredients(creature) then + npcHandler:say({ + "Okay! So after all of these heavy dishes, we're going to create a fast little snack. ...", + "First of all, remove the top of the jalapeño peppers and clean their inside, so that you have space for the filling. Now for the filling, we grate the cheese and mix it with the mead and the eggs, until it has a nice consistency. ...", + "We add the grinded herbs and blend it well. Push a spoonful in each jalapeño pepper until they are nicely stuffed. Now, we shortly fry the jalapeño peppers in a pan to heat them up. ...", + "The filling will melt nicely, just be careful that it doesn't drip out! And voilà, we're done! ...", + "This famous dish from Ankrahmun is quite hot and spicy, so only eat one at a time. It's also possible that you get the urge to run really fast afterwards. Enjoy!", + }, npc, creature) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate8, currentDate) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish, 8) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestLog, 8) + player:addItem(9085, 1) + npcHandler:setTopic(playerId, 0) + else + npcHandler:say("Make sure that you have all the ingredients with you.", npc, creature) + npcHandler:setTopic(playerId, 0) + end else - npcHandler:say("Make sure that you have all the ingredients, with you.", npc, creature) + npcHandler:say("It seems you have already cooked this dish this year. Please come back next year in August.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 19 then - if playerHasIngredients(creature) then - npcHandler:say({ - "Here we go! This will break through the meat fibres, making our steak more tender for this fine Daramanian dish. ...", - "It's easy to prepare, just chop and sweat the onions and add small pieces of pumpkin, beetroot, plums and peppers. Put the steak into the pan too to let it absorb some of the sweet and fruity flavour. ...", - "Finally, remove the fruits and onions from the pan and fry the steak from both sides until it's crisp and crusty. Put on a plate and decorate with the fruit mix. ...", - "The people of Darashia say that it has magical abilities and will help you if you feel totally drained. Enjoy!", - }, npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 9) - player:setStorageValue(Storage.HotCuisineQuest.QuestLog, 9) - player:addItem(9086, 1) - npcHandler:setTopic(playerId, 0) + if canCookToday(player, Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate9) then + if playerHasIngredients(creature) then + npcHandler:say({ + "Here we go! This will break through the meat fibres, making our steak more tender for this fine Daramanian dish. ...", + "It's easy to prepare, just chop and sweat the onions and add small pieces of pumpkin, beetroot, plums and peppers. Put the steak into the pan too to let it absorb some of the sweet and fruity flavour. ...", + "Finally, remove the fruits and onions from the pan and fry the steak from both sides until it's crisp and crusty. Put on a plate and decorate with the fruit mix. ...", + "The people of Darashia say that it has magical abilities and will help you if you feel totally drained. Enjoy!", + }, npc, creature) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate9, currentDate) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish, 9) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestLog, 9) + player:addItem(9086, 1) + npcHandler:setTopic(playerId, 0) + else + npcHandler:say("Make sure that you have all the ingredients with you.", npc, creature) + npcHandler:setTopic(playerId, 0) + end else - npcHandler:say("Make sure that you have all the ingredients, with you.", npc, creature) + npcHandler:say("It seems you have already cooked this dish this year. Please come back next year in August.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 21 then - if playerHasIngredients(creature) then - npcHandler:say({ - "Great! After all this meat, we shouldn't neglect to prepare some fish. ...", - "This easy dish from Svargrond is what you'd call fast food, but its outstanding taste justifies to put it in my book about {Hot Cuisine}. ...", - "Simply cut the rolls in half, shortly fry one slice of each fish type, put in the shrimps and spice up with grinded fern, which, by the way, tastes slightly like dill. ...", - "Nicely decorate it on a plate, and voilr, we're done already! Can't tell you much about the effects, but fishermen in Svargrond seem to love it. Enjoy!", - }, npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 10) - player:setStorageValue(Storage.HotCuisineQuest.QuestLog, 10) - player:addItem(9088, 1) - npcHandler:setTopic(playerId, 0) + if canCookToday(player, Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate10) then + if playerHasIngredients(creature) then + npcHandler:say({ + "Great! After all this meat, we shouldn't neglect to prepare some fish. ...", + "This easy dish from Svargrond is what you'd call fast food, but its outstanding taste justifies to put it in my book about {Hot Cuisine}. ...", + "Simply cut the rolls in half, shortly fry one slice of each fish type, put in the shrimps and spice up with grinded fern, which, by the way, tastes slightly like dill. ...", + "Nicely decorate it on a plate, and voilà, we're done already! Can't tell you much about the effects, but fishermen in Svargrond seem to love it. Enjoy!", + }, npc, creature) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate10, currentDate) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish, 10) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestLog, 10) + player:addItem(9088, 1) + npcHandler:setTopic(playerId, 0) + else + npcHandler:say("Make sure that you have all the ingredients with you.", npc, creature) + npcHandler:setTopic(playerId, 0) + end else - npcHandler:say("Make sure that you have all the ingredients, with you.", npc, creature) + npcHandler:say("It seems you have already cooked this dish this year. Please come back next year in August.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 23 then - if playerHasIngredients(creature) then - npcHandler:say({ - "So, now for our final dish - a grand dessert from the amazon girls at Carlin! ...", - "It's easy as it can be - mix a normal cake dough with milk, flour and eggs, then add some cookie crumbs for the crunchy effect later on. ...", - "Stir in the grated carrots and tiny peanut pieces and bake it for about thirty minutes! Now we'll make a great topping with sugar and lemon juice, pour it over the cake and decorate it. ...", - "And voilà, we're done! The girls of Carlin swear that it sharpens their eyesight, at least for a while. I'm sure it will somehow aid you in your battles. Enjoy! ...", - "Oh, which reminds me - my little apprentice, we are finished with our cooking course. I think you did great and if it was my decision, you could open your own tavern. ...", - "But anyway, it's up to you what you make of your newly discovered skills! In case you forget my recipes, please feel free to take a copy of the cookbook upstairs. ...", - "You can drop by and practice cooking those dishes, at least during the time that I'm at home. I promise that I will cook each dish once with you, but then I have to take care of my other apprentices. Cheers to you!", - }, npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 11) - player:setStorageValue(Storage.HotCuisineQuest.QuestLog, 11) - player:setStorageValue(Storage.HotCuisineQuest.CookbookDoor, 1) - player:addItem(10000, 1) - npcHandler:setTopic(playerId, 0) + if canCookToday(player, Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate11) then + if playerHasIngredients(creature) then + npcHandler:say({ + "So, now for our final dish - a grand dessert from the amazon girls at Carlin! ...", + "It's easy as it can be - mix a normal cake dough with milk, flour and eggs, then add some cookie crumbs for the crunchy effect later on. ...", + "Stir in the grated carrots and tiny peanut pieces and bake it for about thirty minutes! Now we'll make a great topping with sugar and lemon juice, pour it over the cake and decorate it. ...", + "And voilà, we're done! The girls of Carlin swear that it sharpens their eyesight, at least for a while. I'm sure it will somehow aid you in your battles. Enjoy! ...", + "Oh, which reminds me - my little apprentice, we are finished with our cooking course. I think you did great and if it was my decision, you could open your own tavern. ...", + "But anyway, it's up to you what you make of your newly discovered skills! In case you forget my recipes, please feel free to take a copy of the cookbook upstairs. ...", + "You can drop by and practice cooking those dishes, at least during the time that I'm at home. I promise that I will cook each dish once with you, but then I have to take care of my other apprentices. Cheers to you!", + }, npc, creature) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate11, currentDate) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish, 11) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestLog, 11) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CookbookDoor, 1) + player:addItem(10000, 1) + npcHandler:setTopic(playerId, 0) + else + npcHandler:say("Make sure that you have all the ingredients with you.", npc, creature) + npcHandler:setTopic(playerId, 0) + end else - npcHandler:say("Make sure that you have all the ingredients, with you.", npc, creature) + npcHandler:say("It seems you have already cooked this dish this year. Please come back next year in August.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 25 then - if playerHasIngredients(creature) then - npcHandler:say({ - "Yum! Just the thought of it makes me drool. ...", - "I see you brought real Zaoan rice balls! That saves us a lot of time as we don't have to cook the rice anymore. Now we just flatten them out nice and medium thick on this baking tray. ...", - "In the meantime, our shrimps have absorbed some of the coconut milk and we can now add them on top of the rice. ...", - "Now we just need to add the mushrooms , pour the rest of the coconut milk over it and put it into the oven! ...", - "... dum di dum ... ...", - "Aaaaaaand there you go! Sweet coconut goodness! And psst - the shrimps add some submarine flavour to this dish. You should definitely eat it while walking underwater and wearing a helmet of the deep. Just in case. Enjoy!", - }, npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 12) - player:setStorageValue(Storage.HotCuisineQuest.QuestLog, 13) - player:addItem(11584, 1) - npcHandler:setTopic(playerId, 0) + if canCookToday(player, Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate12) then + if playerHasIngredients(creature) then + npcHandler:say({ + "Yum! Just the thought of it makes me drool. ...", + "I see you brought real Zaoan rice balls! That saves us a lot of time as we don't have to cook the rice anymore. Now we just flatten them out nice and medium thick on this baking tray. ...", + "In the meantime, our shrimps have absorbed some of the coconut milk and we can now add them on top of the rice. ...", + "Now we just need to add the mushrooms , pour the rest of the coconut milk over it and put it into the oven! ...", + "... dum di dum ... ...", + "Aaaaaaand there you go! Sweet coconut goodness! And psst - the shrimps add some submarine flavour to this dish. You should definitely eat it while walking underwater and wearing a helmet of the deep. Just in case. Enjoy!", + }, npc, creature) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate12, currentDate) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish, 12) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestLog, 13) + player:addItem(11584, 1) + npcHandler:setTopic(playerId, 0) + else + npcHandler:say("Make sure that you have all the ingredients with you.", npc, creature) + npcHandler:setTopic(playerId, 0) + end else - npcHandler:say("Make sure that you have all the ingredients, with you.", npc, creature) + npcHandler:say("It seems you have already cooked this dish this year. Please come back next year in August.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 27 then - if playerHasIngredients(creature) then - npcHandler:say({ - "Awesome! Let's go! Let's start with preparing the sandcrawlers ...", - "I understand your scepticism, but believe me, all will be well! As you can see, they change colour from dark to light red, and that's when they also start turning soft. ...", - "Now add whole potatoes and let everything cook at high temperature until the potatoes are so soft they're basically falling apart. ...", - "Yes yes, I know, don't give me that look! You'll be surprised! Now just add the chopped carrots and chili for a healthy portion of vitamins and spices, keep stiring and mashing and let it simmer for about an hour. ...", - "You're wondering why I chose a simple recipe like that for my famous menu? You'll know when you taste it! ...", - "Heeeeeere you are - just a few spoons of this great stew make you so full that the bowl I give you will last for a long time until it's finally depleted. Enjoy!", - }, npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 13) - player:setStorageValue(Storage.HotCuisineQuest.QuestLog, 14) - player:addItem(11586, 1) - npcHandler:setTopic(playerId, 0) + if canCookToday(player, Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate13) then + if playerHasIngredients(creature) then + npcHandler:say({ + "Awesome! Let's go! Let's start with preparing the sandcrawlers ...", + "I understand your scepticism, but believe me, all will be well! As you can see, they change colour from dark to light red, and that's when they also start turning soft. ...", + "Now add whole potatoes and let everything cook at high temperature until the potatoes are so soft they're basically falling apart. ...", + "Yes yes, I know, don't give me that look! You'll be surprised! Now just add the chopped carrots and chili for a healthy portion of vitamins and spices, keep stiring and mashing and let it simmer for about an hour. ...", + "You're wondering why I chose a simple recipe like that for my famous menu? You'll know when you taste it! ...", + "Heeeeeere you are - just a few spoons of this great stew make you so full that the bowl I give you will last for a long time until it's finally depleted. Enjoy!", + }, npc, creature) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate13, currentDate) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish, 13) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestLog, 14) + player:addItem(11586, 1) + npcHandler:setTopic(playerId, 0) + else + npcHandler:say("Make sure that you have all the ingredients with you.", npc, creature) + npcHandler:setTopic(playerId, 0) + end else - npcHandler:say("Make sure that you have all the ingredients, with you.", npc, creature) + npcHandler:say("It seems you have already cooked this dish this year. Please come back next year in August.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 29 then - if playerHasIngredients(creature) then - npcHandler:say({ - "Very nice! I'm ready for action! ...", - "After having crushed all those sweets, we need to melt the chocolate into a thick liquid... ...", - "... and form little balls together with the sweets! ...", - "Now, carefully, we add the demonic blood... ...", - "Here you go, but beware possible side effects! You never know for sure what will happen and so far all of those I tried had awesome effects, so of course I don't hope for nasty surprises! Enjoy!", - }, npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 14) - player:setStorageValue(Storage.HotCuisineQuest.QuestLog, 15) - player:addItem(11587, 1) - npcHandler:setTopic(playerId, 0) + if canCookToday(player, Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate14) then + if playerHasIngredients(creature) then + npcHandler:say({ + "Very nice! I'm ready for action! ...", + "After having crushed all those sweets, we need to melt the chocolate into a thick liquid... ...", + "... and form little balls together with the sweets! ...", + "Now, carefully, we add the demonic blood... ...", + "Here you go, but beware possible side effects! You never know for sure what will happen and so far all of those I tried had awesome effects, so of course I don't hope for nasty surprises! Enjoy!", + }, npc, creature) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate14, currentDate) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish, 14) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestLog, 15) + player:addItem(11587, 1) + npcHandler:setTopic(playerId, 0) + else + npcHandler:say("Make sure that you have all the ingredients with you.", npc, creature) + npcHandler:setTopic(playerId, 0) + end else - npcHandler:say("Make sure that you have all the ingredients, with you.", npc, creature) + npcHandler:say("It seems you have already cooked this dish this year. Please come back next year in August.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 31 then - if playerHasIngredients(creature) then - npcHandler:say({ - "Time to have a sweet drink! Let's pour the bug milk into my cauldron and heat it over fire until it's boiling... there! ...", - "Now we're breaking all of the eggs into there - 1, 2, 10, 20, 40 crumble the honeycombs and toss the sliced mangoes into the hot mix. ...", - "Now we just have to let it simmer and stir using a blessed wooden stake for thirty minutes. ...", - "By now, the power of the blessed wooden stake will have been transferred into our elixir, so let's put out the fire and let it cool down. ...", - " There! Its inventor said it had amazing effects on the ring you're wearing, as long as the ring is based on time, not on charges. Enjoy! ...", - "And by the way... since those were all the recipes from this year and you cooked them so nicely, you may take the cookbook containing them from upstairs, if you like!", - }, npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.QuestStart, 2) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 15) - player:setStorageValue(Storage.HotCuisineQuest.QuestLog, 16) - player:addItem(11588, 1) - npcHandler:setTopic(playerId, 0) + if canCookToday(player, Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate15) then + if playerHasIngredients(creature) then + npcHandler:say({ + "Time to have a sweet drink! Let's pour the bug milk into my cauldron and heat it over fire until it's boiling... there! ...", + "Now we're breaking all of the eggs into there - 1, 2, 10, 20, 40 crumble the honeycombs and toss the sliced mangoes into the hot mix. ...", + "Now we just have to let it simmer and stir using a blessed wooden stake for thirty minutes. ...", + "By now, the power of the blessed wooden stake will have been transferred into our elixir, so let's put out the fire and let it cool down. ...", + " There! Its inventor said it had amazing effects on the ring you're wearing, as long as the ring is based on time, not on charges. Enjoy! ...", + "And by the way... since those were all the recipes from this year and you cooked them so nicely, you may take the cookbook containing them from upstairs, if you like!", + }, npc, creature) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.LastInteractionDate15, currentDate) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestStart, 2) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish, 15) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestLog, 16) + player:addItem(11588, 1) + npcHandler:setTopic(playerId, 0) + else + npcHandler:say("Make sure that you have all the ingredients with you.", npc, creature) + npcHandler:setTopic(playerId, 0) + end else - npcHandler:say("Make sure that you have all the ingredients, with you.", npc, creature) + npcHandler:say("It seems you have already cooked this dish this year. Please come back next year in August.", npc, creature) npcHandler:setTopic(playerId, 0) end end --Dishes first time elseif MsgContains(message, "rotworm stew") then - if npcHandler:getTopic(playerId) == 4 or player:getStorageValue(Storage.HotCuisineQuest.QuestStart) == 2 then + if npcHandler:getTopic(playerId) == 4 or player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestStart) >= 1 then npcHandler:say("Did you gather all necessary ingredients to cook Rotworm Stew with me?", npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 1) npcHandler:setTopic(playerId, 5) end elseif MsgContains(message, "hydra tongue salad") then - if npcHandler:getTopic(playerId) == 6 or player:getStorageValue(Storage.HotCuisineQuest.QuestStart) == 2 then + if npcHandler:getTopic(playerId) == 6 or player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestStart) >= 1 then npcHandler:say("Did you gather all necessary ingredients to prepare a Hydra Tongue Salad with me?", npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 2) npcHandler:setTopic(playerId, 7) end elseif MsgContains(message, "roasted dragon wings") then - if npcHandler:getTopic(playerId) == 8 or player:getStorageValue(Storage.HotCuisineQuest.QuestStart) == 2 then + if npcHandler:getTopic(playerId) == 8 or player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestStart) >= 1 then npcHandler:say("Did you gather all necessary ingredients to prepare Roasted Dragon Wings with me?", npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 3) npcHandler:setTopic(playerId, 9) end elseif MsgContains(message, "tropical fried terrorbird") then - if npcHandler:getTopic(playerId) == 10 or player:getStorageValue(Storage.HotCuisineQuest.QuestStart) == 2 then + if npcHandler:getTopic(playerId) == 10 or player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestStart) >= 1 then npcHandler:say("Did you gather all necessary ingredients to prepare a Tropical Fried Terrorbird with me?", npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 4) npcHandler:setTopic(playerId, 11) end elseif MsgContains(message, "banana chocolate shake") then - if npcHandler:getTopic(playerId) == 12 or player:getStorageValue(Storage.HotCuisineQuest.QuestStart) == 2 then + if npcHandler:getTopic(playerId) == 12 or player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestStart) >= 1 then npcHandler:say("Did you gather all necessary ingredients to make a Banana Chocolate Shake with me?", npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 5) npcHandler:setTopic(playerId, 13) end elseif MsgContains(message, "veggie casserole") then - if npcHandler:getTopic(playerId) == 14 or player:getStorageValue(Storage.HotCuisineQuest.QuestStart) == 2 then + if npcHandler:getTopic(playerId) == 14 or player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestStart) >= 1 then npcHandler:say("Did you gather all necessary ingredients to cook a Veggie Casserole with me?", npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 6) npcHandler:setTopic(playerId, 15) end - elseif MsgContains(message, "filled jalapeño peppers") then - if npcHandler:getTopic(playerId) == 16 or player:getStorageValue(Storage.HotCuisineQuest.QuestStart) == 2 then + elseif MsgContains(message, "filled") or MsgContains(message, "jalapeño") or MsgContains(message, "peppers") then + if npcHandler:getTopic(playerId) == 16 or player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestStart) >= 1 then npcHandler:say("Did you gather all necessary ingredients to prepare Filled Jalapeño Peppers with me?", npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 7) npcHandler:setTopic(playerId, 17) end elseif MsgContains(message, "blessed steak") then - if npcHandler:getTopic(playerId) == 18 or player:getStorageValue(Storage.HotCuisineQuest.QuestStart) == 2 then + if npcHandler:getTopic(playerId) == 18 or player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestStart) >= 1 then npcHandler:say("Did you gather all necessary ingredients to prepare a Blessed Steak with me?", npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 8) npcHandler:setTopic(playerId, 19) end elseif MsgContains(message, "northern fishburger") then - if npcHandler:getTopic(playerId) == 20 or player:getStorageValue(Storage.HotCuisineQuest.QuestStart) == 2 then + if npcHandler:getTopic(playerId) == 20 or player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestStart) >= 1 then npcHandler:say("Did you gather all necessary ingredients to make a Northern Fishburger with me?", npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 9) npcHandler:setTopic(playerId, 21) end elseif MsgContains(message, "carrot cake") then - if npcHandler:getTopic(playerId) == 22 or player:getStorageValue(Storage.HotCuisineQuest.QuestStart) == 2 then + if npcHandler:getTopic(playerId) == 22 or player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestStart) >= 1 then npcHandler:say("Did you gather all necessary ingredients to bake a Carrot Cake with me?", npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 10) npcHandler:setTopic(playerId, 23) end elseif MsgContains(message, "coconut shrimp bake") then - if npcHandler:getTopic(playerId) == 24 or player:getStorageValue(Storage.HotCuisineQuest.QuestStart) == 2 then + if npcHandler:getTopic(playerId) == 24 or player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestStart) >= 1 then npcHandler:say("Did you gather all necessary ingredients to prepare a Coconut Shrimp Bake with me?", npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 11) npcHandler:setTopic(playerId, 25) end elseif MsgContains(message, "blackjack") then - if npcHandler:getTopic(playerId) == 26 or player:getStorageValue(Storage.HotCuisineQuest.QuestStart) == 2 then + if npcHandler:getTopic(playerId) == 26 or player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestStart) >= 1 then npcHandler:say("Did you gather all necessary ingredients to cook a Blackjack with me?", npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 12) npcHandler:setTopic(playerId, 27) end elseif MsgContains(message, "demonic candy ball") then - if npcHandler:getTopic(playerId) == 28 or player:getStorageValue(Storage.HotCuisineQuest.QuestStart) == 2 then + if npcHandler:getTopic(playerId) == 28 or player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestStart) >= 1 then npcHandler:say("Did you gather all necessary ingredients to make Demonic Candy Balls with me?", npc, creature) - player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 13) npcHandler:setTopic(playerId, 29) end - --elseif MsgContains(message, "sweet mangonaise elixir") then - -- if npcHandler:getTopic(playerId) == 30 or player:getStorageValue(Storage.HotCuisineQuest.QuestStart) == 2 then - -- npcHandler:say("Did you gather all necessary ingredients to mix Sweet Mangonaise Elixir with me?", npc, creature) - -- player:setStorageValue(Storage.HotCuisineQuest.CurrentDish, 14) - -- npcHandler:setTopic(playerId, 31) - --end + elseif MsgContains(message, "sweet mangonaise elixir") then + if npcHandler:getTopic(playerId) == 30 or player:getStorageValue(Storage.Quest.U8_5.HotCuisineQuest.QuestStart) >= 1 then + npcHandler:say("Did you gather all necessary ingredients to mix Sweet Mangonaise Elixir with me?", npc, creature) + player:setStorageValue(Storage.Quest.U8_5.HotCuisineQuest.CurrentDish, 14) + npcHandler:setTopic(playerId, 31) + end elseif MsgContains(message, "no") then npcHandler:say("No?, come back when you are ready to cook.", npc, creature) npcHandler:setTopic(playerId, 0) diff --git a/data-otservbr-global/npc/jerom.lua b/data-otservbr-global/npc/jerom.lua index 3cbbde34ac2..08d41cab412 100644 --- a/data-otservbr-global/npc/jerom.lua +++ b/data-otservbr-global/npc/jerom.lua @@ -65,22 +65,22 @@ local function creatureSayCallback(npc, creature, type, message) return false end if MsgContains(message, "mission") or MsgContains(message, "quest") then - if player:getStorageValue(mission.Questline) < 1 then + if player:getStorageValue(Storage.Quest.U8_2.TrollSabotageQuest.Questline) < 1 then npcHandler:say({ "I'm not sure but I suppose that an evil troll lives in the mountains here! I saw him rummaging in the ruins of my house. ...", "I took a closer look and found my family casket ripped open. It contained a precious necklace. If I had it back, I could sell it and start over! ...", "Could you look for this mean beast, find out why he did and either get me some money ormy necklace to rebuild my business?", }, npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(mission.Questline) == 2 and player:removeItem(7754, 1) then + elseif player:getStorageValue(Storage.Quest.U8_2.TrollSabotageQuest.Questline) == 2 and player:removeItem(7754, 1) then npcHandler:say("Thank you sooo much . Well, you know I lost everything, but recently I found this strange rope here. I don't need it, here take it!", npc, creature) - player:setStorageValue(mission.Questline, 3) + player:setStorageValue(Storage.Quest.U8_2.TrollSabotageQuest.Questline, 3) player:addItem(646, 1) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("Great! Finally, some light at the end of the tunnel! Come back and ask me for the quest when you solved this mystery!", npc, creature) - player:setStorageValue(mission.Questline, 1) + player:setStorageValue(Storage.Quest.U8_2.TrollSabotageQuest.Questline, 1) end end return true diff --git a/data-otservbr-global/npc/julius.lua b/data-otservbr-global/npc/julius.lua index 47e8e123760..5309d8800c3 100644 --- a/data-otservbr-global/npc/julius.lua +++ b/data-otservbr-global/npc/julius.lua @@ -54,9 +54,9 @@ local BloodBrothers = Storage.Quest.U8_4.BloodBrothers local function greetCallback(npc, creature) local player = Player(creature) - if player:getStorageValue(BloodBrothers.QuestLine) < 0 then + if player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.QuestLine) < 0 then npcHandler:setMessage(MESSAGE_GREET, "Be greeted, adventurer |PLAYERNAME|. I assume you have read the {note} about the {vampire} threat in this city.") - elseif player:getStorageValue(BloodBrothers.QuestLine) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.QuestLine) == 1 then npcHandler:setMessage(MESSAGE_GREET, "Be greeted, adventurer |PLAYERNAME|. Please excuse me if I appear {distracted}!") end return true @@ -65,15 +65,16 @@ end local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() + if table.contains({ "mission", "note", "vampire" }, message:lower()) then - if player:getStorageValue(BloodBrothers.QuestLine) < 0 then + if player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.QuestLine) < 0 then npcHandler:say("Our nightly blood-sucking visitors put the inhabitants of Yalahar in constant danger. The worst thing is that anyone in this city could be a vampire. Maybe an outsider like you could help us. Would you try?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(BloodBrothers.Mission01) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission01) == 1 then if player:getSlotItem(CONST_SLOT_NECKLACE) then if player:getSlotItem(CONST_SLOT_NECKLACE).itemid == 3083 then npcHandler:say("Hmm, I see, I see. That necklace is only a small indication though... I think I need another proof, just to make sure. Say... have you ever baked {garlic bread}?", npc, creature) - player:setStorageValue(BloodBrothers.Mission01, 2) + player:setStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission01, 2) npcHandler:setTopic(playerId, 2) else npcHandler:say("I fear that will not do. Sorry.", npc, creature) @@ -81,25 +82,25 @@ local function creatureSayCallback(npc, creature, type, message) else npcHandler:say("I fear that will not do. Sorry.", npc, creature) end - elseif player:getStorageValue(BloodBrothers.Mission01) == 3 then + elseif player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission01) == 3 then npcHandler:say("Let me check - yes indeed, there's garlic in it. Now eat one, in front of my eyes. Right now! Say '{aaah}' when you've chewed it all down so that I can see you're not hiding it!", npc, creature) npcHandler:setTopic(playerId, 4) - elseif player:getStorageValue(BloodBrothers.Mission01) == 4 and player:getStorageValue(BloodBrothers.Mission02) < 0 then + elseif player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission01) == 4 and player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission02) < 0 then npcHandler:say("So, are you ready for your first real task?", npc, creature) npcHandler:setTopic(playerId, 5) - elseif player:getStorageValue(BloodBrothers.Mission02) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission02) == 1 then npcHandler:say("Are you back with confirmed names of possible vampires?", npc, creature) npcHandler:setTopic(playerId, 7) - elseif player:getStorageValue(BloodBrothers.Mission02) == 2 and player:getStorageValue(BloodBrothers.Mission03) < 0 then + elseif player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission02) == 2 and player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission03) < 0 then npcHandler:say({ "Listen, I thought of something. If we could somehow figure out who among those five is their leader and manage to defeat him,the others might give up too. ...", "Without their leader they will at least be much weaker. Before I explain my plan, do you think you could do that?", }, npc, creature) npcHandler:setTopic(playerId, 9) - elseif player:getStorageValue(BloodBrothers.Mission03) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission03) == 2 then npcHandler:say("Oh! You look horrible - I mean, rather weary. What happened? Who is the master vampire?", npc, creature) npcHandler:setTopic(playerId, 11) - elseif player:getStorageValue(BloodBrothers.Mission03) == 3 and player:getStorageValue(BloodBrothers.Mission04) < 0 then + elseif player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission03) == 3 and player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission04) < 0 then npcHandler:say({ "You know, I came to think that the spell didn't work because there is another, greater power behind all of this. I fear that if we don't find the source of the vampire threat we can't defeat them. ...", "I heard that there is an island not far from here. Unholy and fearsome things are said to happen there, and maybe that means vampires are not far away. ...", @@ -111,13 +112,13 @@ local function creatureSayCallback(npc, creature, type, message) elseif message == "yes" then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("Well, there's one problem. How would I know I can trust you? You might be one of them... hm. Can you think of something really unlikely for a vampire? If you know a way to prove it to me, ask me about your {mission}.", npc, creature) - player:setStorageValue(BloodBrothers.QuestLine, 1) - player:setStorageValue(BloodBrothers.Mission01, 1) + player:setStorageValue(Storage.Quest.U8_4.BloodBrothers.QuestLine, 1) + player:setStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission01, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then npcHandler:say("Fine then. Talk to me again about your mission once you have the garlic bread. You can get holy water from a member of the inquisition.", npc, creature) - player:setStorageValue(BloodBrothers.Mission01, 3) - elseif npcHandler:getTopic(playerId) == 5 and player:getStorageValue(BloodBrothers.Mission01) == 4 then + player:setStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission01, 3) + elseif npcHandler:getTopic(playerId) == 5 and player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission01) == 4 then npcHandler:say({ "As I already told you, anyone in this city could really be a vampire, even the most unsuspicious citizen. I want you to find that brood. ...", "You can possibly identify the vampires by using a trick with hidden garlic, but better put it into something unsuspicious, like... cookies maybe! ...", @@ -127,7 +128,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 6) elseif npcHandler:getTopic(playerId) == 6 then npcHandler:say("Fine. Good luck! Talk to me again about your mission once you have confirmed the names of five suspects.", npc, creature) - player:setStorageValue(BloodBrothers.Mission02, 1) + player:setStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission02, 1) elseif npcHandler:getTopic(playerId) == 7 then npcHandler:say("Alright, wait a moment. Tell me one name at a time so I can note them down carefully. Who is a suspect?", npc, creature) npcHandler:setTopic(playerId, 8) @@ -144,8 +145,8 @@ local function creatureSayCallback(npc, creature, type, message) "Also, they say there is a castle on this island. That mark HAS to be included, it's far too important to leave it out. Good luck!", }, npc, creature) player:addItem(8200) - player:setStorageValue(BloodBrothers.Mission04, 1) - player:setStorageValue(BloodBrothers.VengothAccess, 1) + player:setStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission04, 1) + player:setStorageValue(Storage.Quest.U8_4.BloodBrothers.VengothAccess, 1) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "garlic bread") or message == "no" then @@ -153,9 +154,15 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Well, you need to mix flour with holy water and use that dough on garlic to create a special dough. Bake it like normal bread, but I guarantee that no vampire can eat that. Are you following me?", npc, creature) npcHandler:setTopic(playerId, 3) elseif npcHandler:getTopic(playerId) == 8 then - if player:getStorageValue(BloodBrothers.Cookies.Serafin) == 2 and player:getStorageValue(BloodBrothers.Cookies.Lisander) == 2 and player:getStorageValue(BloodBrothers.Cookies.Ortheus) == 2 and player:getStorageValue(BloodBrothers.Cookies.Maris) == 2 and player:getStorageValue(BloodBrothers.Cookies.Armenius) == 2 then + if + player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Serafin) == 2 + and player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Lisander) == 2 + and player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Ortheus) == 2 + and player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Maris) == 2 + and player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Armenius) == 2 + then npcHandler:say("I guess Armenius, Lisander, Maris, Ortheus and Serafin are all the names we can get for now. Let me think for a moment what we are going to do, talk to me about your mission again later.", npc, creature) - player:setStorageValue(BloodBrothers.Mission02, 2) + player:setStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission02, 2) npcHandler:setTopic(playerId, 0) else npcHandler:say("No, no, I was asking for one of the names.", npc, creature) @@ -165,53 +172,53 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "aaah") then if npcHandler:getTopic(playerId) == 4 and player:removeItem(8194, 1) then npcHandler:say("Very well. I think I can trust you now. Sorry that I had to put you through this embarassing procedure, but I'm sure you understand. So, are you ready for your first real task?", npc, creature) - player:setStorageValue(BloodBrothers.Mission01, 4) + player:setStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission01, 4) npcHandler:setTopic(playerId, 5) else npcHandler:say("No, no, you didn't eat it! Vampire Brood! Say '{aaah}' once you have eaten the bread or get out of her instantly!", npc, creature) end elseif table.contains({ "maris", "ortheus", "serafin", "lisander", "armenius" }, message:lower()) and npcHandler:getTopic(playerId) == 8 then if MsgContains(message, "maris") then - if player:getStorageValue(BloodBrothers.Cookies.Maris) == 1 then + if player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Maris) == 1 then npcHandler:say("He really doesn't look like the man of the sea he pretends to be, does he? Noted down! Any other name?", npc, creature) - player:setStorageValue(BloodBrothers.Cookies.Maris, 2) - elseif player:getStorageValue(BloodBrothers.Cookies.Maris) == 2 then + player:setStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Maris, 2) + elseif player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Maris) == 2 then npcHandler:say("You already reported that name. Any new ones?", npc, creature) else npcHandler:say("Hm. You don't look so sure about that one. You should not report suspects that you did not confirm yourself! Any others?", npc, creature) end elseif MsgContains(message, "ortheus") then - if player:getStorageValue(BloodBrothers.Cookies.Ortheus) == 1 then + if player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Ortheus) == 1 then npcHandler:say("I always thought that there is not really a poor beggar hidden under those ragged clothes. Noted down! Any other name?", npc, creature) - player:setStorageValue(BloodBrothers.Cookies.Ortheus, 2) - elseif player:getStorageValue(BloodBrothers.Cookies.Ortheus) == 2 then + player:setStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Ortheus, 2) + elseif player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Ortheus) == 2 then npcHandler:say("You already reported that name. Any new ones?", npc, creature) else npcHandler:say("Hm. You don't look so sure about that one. You should not report suspects that you did not confirm yourself! Any others?", npc, creature) end elseif MsgContains(message, "serafin") then - if player:getStorageValue(BloodBrothers.Cookies.Serafin) == 1 then + if player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Serafin) == 1 then npcHandler:say("Nice angelic name for a vampire. But he didn't escape your attention, well done. Noted down! Any other name?", npc, creature) - player:setStorageValue(BloodBrothers.Cookies.Serafin, 2) - elseif player:getStorageValue(BloodBrothers.Cookies.Serafin) == 2 then + player:setStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Serafin, 2) + elseif player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Serafin) == 2 then npcHandler:say("You already reported that name. Any new ones?", npc, creature) else npcHandler:say("Hm. You don't look so sure about that one. You should not report suspects that you did not confirm yourself! Any others?", npc, creature) end elseif MsgContains(message, "lisander") then - if player:getStorageValue(BloodBrothers.Cookies.Lisander) == 1 then + if player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Lisander) == 1 then npcHandler:say("Yes, that pale skin and those black eyes speak volumes. Noted down! Any other name?", npc, creature) - player:setStorageValue(BloodBrothers.Cookies.Lisander, 2) - elseif player:getStorageValue(BloodBrothers.Cookies.Lisander) == 2 then + player:setStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Lisander, 2) + elseif player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Lisander) == 2 then npcHandler:say("You already reported that name. Any new ones?", npc, creature) else npcHandler:say("Hm. You don't look so sure about that one. You should not report suspects that you did not confirm yourself! Any others?", npc, creature) end elseif MsgContains(message, "armenius") then - if player:getStorageValue(BloodBrothers.Cookies.Armenius) == 1 then + if player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Armenius) == 1 then npcHandler:say("Ahh, I always thought something was suspicious about him. Noted down! Any other name?", npc, creature) - player:setStorageValue(BloodBrothers.Cookies.Armenius, 2) - elseif player:getStorageValue(BloodBrothers.Cookies.Armenius) == 2 then + player:setStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Armenius, 2) + elseif player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Armenius) == 2 then npcHandler:say("You already reported that name. Any new ones?", npc, creature) else npcHandler:say("Hm. You don't look so sure about that one. You should not report suspects that you did not confirm yourself! Any others?", npc, creature) @@ -224,11 +231,11 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Hm. You don't look so sure about that one. You should not report suspects that you did not confirm yourself! Any others?", npc, creature) elseif message:lower() == "alori mort" and npcHandler:getTopic(playerId) == 10 then npcHandler:say("Good. Don't play around with the spell, only use it when standing in front of those vampires. Come back and report to me about your progress later.", npc, creature) - player:setStorageValue(BloodBrothers.Mission03, 1) + player:setStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission03, 1) npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "armenius") and npcHandler:getTopic(playerId) == 11 then npcHandler:say("I see... so Armenius is the master, and the spell didn't even cause a scratch on him... Well, that went worse than expected. Let me think for a moment and then ask me about a mission again.", npc, creature) - player:setStorageValue(BloodBrothers.Mission03, 3) + player:setStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission03, 3) npcHandler:setTopic(playerId, 0) else npcHandler:say("Getting cold feet, eh?", npc, creature) diff --git a/data-otservbr-global/npc/karith.lua b/data-otservbr-global/npc/karith.lua index 204846c0f39..b1838760ea7 100644 --- a/data-otservbr-global/npc/karith.lua +++ b/data-otservbr-global/npc/karith.lua @@ -60,9 +60,9 @@ local function greetCallback(npc, creature) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) == -1 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) == -1 then npcHandler:setMessage(MESSAGE_GREET, "Hello! Tell me what's on your mind. Time is money.") - player:setStorageValue(Storage.SearoutesAroundYalahar.TownsCounter, 0) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter, 0) else npcHandler:setMessage(MESSAGE_GREET, "Hello! Tell me what's on your mind. Time is money.") end @@ -78,14 +78,14 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "passage") or MsgContains(message, "sail") then - if player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) < 5 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) < 5 then npcHandler:say({ "I see no reason to establish ship routes to other cities. There is nothing that would be worth the effort. ...", "But since you won't stop bugging me, let's make a deal: If you can prove that at least five of your so-called 'cities' are not worthless, I might reconsider my position. ...", "Bring me something SPECIAL! The local bar tenders usually know what's interesting about their city.", }, npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) >= 5 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) >= 5 then npcHandler:say({ "For the sake of profit, we established ship routes to {Ab'Dendriel}, {Darashia}, {Venore}, {Ankrahmun}, {Port Hope}, {Thais}, {Liberty Bay} and {Carlin}.", }, npc, creature) @@ -94,12 +94,12 @@ local function creatureSayCallback(npc, creature, type, message) return false end elseif MsgContains(message, "Ab'Dendriel") then - if player:getStorageValue(Storage.SearoutesAroundYalahar.AbDendriel) ~= 1 and player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) < 5 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.AbDendriel) ~= 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) < 5 then npcHandler:say({ "I've never been there. I doubt the elves there came up with something noteworthy. Or did you find something interesting there?", }, npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.SearoutesAroundYalahar.AbDendriel) == 1 or player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) >= 5 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.AbDendriel) == 1 or player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) >= 5 then npcHandler:say({ "Do you want a passage to Ab'Dendriel for 160 gold?", ---missing line }, npc, creature) @@ -108,12 +108,12 @@ local function creatureSayCallback(npc, creature, type, message) return false end elseif MsgContains(message, "Darashia") then - if player:getStorageValue(Storage.SearoutesAroundYalahar.Darashia) ~= 1 and player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) < 5 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Darashia) ~= 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) < 5 then npcHandler:say({ "From all what I have heard, it is an unremarkable pile of huts in the desert. Or did you find something interesting there?", }, npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.SearoutesAroundYalahar.Darashia) == 1 or player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) >= 5 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Darashia) == 1 or player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) >= 5 then npcHandler:say({ "Of course it is merely superstition that the darashian sand wasp honey brings back youth and vitality, but as long people pay a decent price, I couldn't care less. Do you want a passage to Darashia for 210 gold?", }, npc, creature) @@ -122,24 +122,24 @@ local function creatureSayCallback(npc, creature, type, message) return false end elseif MsgContains(message, "Venore") then - if player:getStorageValue(Storage.SearoutesAroundYalahar.Venore) ~= 1 and player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) < 5 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Venore) ~= 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) < 5 then npcHandler:say({ "Another port full of smelly humans, fittingly located in a swamp. Or did you find something interesting there?", }, npc, creature) npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.SearoutesAroundYalahar.Venore) == 1 or player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) >= 5 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Venore) == 1 or player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) >= 5 then npcHandler:say({ "The swamp spice will turn out very lucrative considering that it helps to make even the most disgusting dish taste good. Do you want a passage to Venore for 185 gold?" }, npc, creature) npcHandler:setTopic(playerId, 13) else return false end elseif MsgContains(message, "Ankrahmun") then - if player:getStorageValue(Storage.SearoutesAroundYalahar.Ankrahmun) ~= 1 and player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) < 5 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Ankrahmun) ~= 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) < 5 then npcHandler:say({ "A city full of mad death worshippers, no thanks. Or did you find something interesting there?", }, npc, creature) npcHandler:setTopic(playerId, 4) - elseif player:getStorageValue(Storage.SearoutesAroundYalahar.Ankrahmun) == 1 or player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) >= 5 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Ankrahmun) == 1 or player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) >= 5 then npcHandler:say({ "The Yalahari seem to be obsessed with conserving their dead, so I guess the embalming fluid will be a great success in Yalahar. Do you want a passage to Ankrahmun for 230 gold?", }, npc, creature) @@ -148,12 +148,12 @@ local function creatureSayCallback(npc, creature, type, message) return false end elseif MsgContains(message, "Port Hope") then - if player:getStorageValue(Storage.SearoutesAroundYalahar.PortHope) ~= 1 and player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) < 5 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.PortHope) ~= 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) < 5 then npcHandler:say({ "Another pointless human settlement. Or did you find something interesting there?", }, npc, creature) npcHandler:setTopic(playerId, 5) - elseif player:getStorageValue(Storage.SearoutesAroundYalahar.PortHope) == 1 or player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) >= 5 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.PortHope) == 1 or player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) >= 5 then npcHandler:say({ "Ivory is highly prized by the artisans of the Yalahari. Do you want a passage to Port Hope for 260 gold?", }, npc, creature) @@ -162,12 +162,12 @@ local function creatureSayCallback(npc, creature, type, message) return false end elseif MsgContains(message, "Thais") then - if player:getStorageValue(Storage.SearoutesAroundYalahar.Thais) ~= 1 and player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) < 5 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Thais) ~= 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) < 5 then npcHandler:say({ "Thais must be a hell hole if only half of the stories we hear about it are true. Or did you find something interesting there?", }, npc, creature) npcHandler:setTopic(playerId, 6) - elseif player:getStorageValue(Storage.SearoutesAroundYalahar.Thais) == 1 or player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) >= 5 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Thais) == 1 or player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) >= 5 then npcHandler:say({ "Astonishing enough the royal satin seems to suit the exquisite taste of the Yalahari. Do you want a passage to Thais for 200 gold?", }, npc, creature) @@ -176,12 +176,12 @@ local function creatureSayCallback(npc, creature, type, message) return false end elseif MsgContains(message, "Liberty Bay") then - if player:getStorageValue(Storage.SearoutesAroundYalahar.LibertyBay) ~= 1 and player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) < 5 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.LibertyBay) ~= 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) < 5 then npcHandler:say({ "Which sane captain would sail his ship to a pirate town? Or did you find something interesting there?", }, npc, creature) npcHandler:setTopic(playerId, 7) - elseif player:getStorageValue(Storage.SearoutesAroundYalahar.LibertyBay) == 1 or player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) >= 5 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.LibertyBay) == 1 or player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) >= 5 then npcHandler:say({ "Do you want a passage to Liberty Bay for 275 gold?", ---missing line }, npc, creature) @@ -190,12 +190,12 @@ local function creatureSayCallback(npc, creature, type, message) return false end elseif MsgContains(message, "Carlin") then - if player:getStorageValue(Storage.SearoutesAroundYalahar.Carlin) ~= 1 and player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) < 5 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Carlin) ~= 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) < 5 then npcHandler:say({ "An unremarkable town compared to the wonders of Yalahar. Or did you find something interesting there?", }, npc, creature) npcHandler:setTopic(playerId, 8) - elseif player:getStorageValue(Storage.SearoutesAroundYalahar.Carlin) == 1 or player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) >= 5 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Carlin) == 1 or player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) >= 5 then npcHandler:say({ "The evergreen flower pots are an amusing item that might find some customers here. Do you want a passage to Carlin for 185 gold?", }, npc, creature) @@ -206,43 +206,43 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 and player:removeItem(8758, 1) then npcHandler:say("What's that? Bug milk? Hm, perhaps I can find some customers for that! ", npc, creature) - player:setStorageValue(Storage.SearoutesAroundYalahar.AbDendriel, 1) - player:setStorageValue(Storage.SearoutesAroundYalahar.TownsCounter, player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) + 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.AbDendriel, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) + 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 and player:removeItem(8760, 1) then npcHandler:say("Sand wasp honey? Hm, interesting at least!", npc, creature) - player:setStorageValue(Storage.SearoutesAroundYalahar.Darashia, 1) - player:setStorageValue(Storage.SearoutesAroundYalahar.TownsCounter, player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) + 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Darashia, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) + 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 and player:removeItem(8759, 1) then npcHandler:say("Some special spice might be of value indeed.", npc, creature) - player:setStorageValue(Storage.SearoutesAroundYalahar.Venore, 1) - player:setStorageValue(Storage.SearoutesAroundYalahar.TownsCounter, player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) + 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Venore, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) + 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 4 and player:removeItem(8761, 1) then npcHandler:say("I can hardly imagine that someone is interested in embalming fluid, but I'll give it a try.", npc, creature) - player:setStorageValue(Storage.SearoutesAroundYalahar.Ankrahmun, 1) - player:setStorageValue(Storage.SearoutesAroundYalahar.TownsCounter, player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) + 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Ankrahmun, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) + 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 5 and player:removeItem(3044, 1) then npcHandler:say("Of course! Ivory! Its value is quite obvious.", npc, creature) - player:setStorageValue(Storage.SearoutesAroundYalahar.PortHope, 1) - player:setStorageValue(Storage.SearoutesAroundYalahar.TownsCounter, player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) + 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.PortHope, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) + 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 6 and player:removeItem(8762, 1) then npcHandler:say("This royal satin is indeed of acceptable quality.", npc, creature) - player:setStorageValue(Storage.SearoutesAroundYalahar.Thais, 1) - player:setStorageValue(Storage.SearoutesAroundYalahar.TownsCounter, player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) + 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Thais, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) + 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 7 and player:removeItem(5552, 1, 13) then npcHandler:say("I doubt that the esteemed Yalahari will indulge into something profane as rum. But who knows, I'll give it a try.", npc, creature) - player:setStorageValue(Storage.SearoutesAroundYalahar.LibertyBay, 1) - player:setStorageValue(Storage.SearoutesAroundYalahar.TownsCounter, player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) + 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.LibertyBay, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) + 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 8 and player:removeItem(8763, 1) then npcHandler:say("I doubt that these flowers will stay fresh and healthy forever. But if they do, they could be indeed valuable.", npc, creature) - player:setStorageValue(Storage.SearoutesAroundYalahar.Carlin, 1) - player:setStorageValue(Storage.SearoutesAroundYalahar.TownsCounter, player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) + 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Carlin, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) + 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 11 then if player:removeMoneyBank(160) then diff --git a/data-otservbr-global/npc/karl.lua b/data-otservbr-global/npc/karl.lua index fc8e3945afd..710a7009be9 100644 --- a/data-otservbr-global/npc/karl.lua +++ b/data-otservbr-global/npc/karl.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "barrel") then - if player:getStorageValue(Storage.SecretService.AVINMission03) == 2 then + if player:getStorageValue(Storage.Quest.U8_1.SecretService.AVINMission03) == 2 then npcHandler:say("Do you bring me a barrel of beer??", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -71,7 +71,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then if player:removeItem(404, 1) then - player:setStorageValue(Storage.SecretService.AVINMission03, 3) + player:setStorageValue(Storage.Quest.U8_1.SecretService.AVINMission03, 3) npcHandler:say("Three cheers for the noble |PLAYERNAME|.", npc, creature) else npcHandler:say("You don't have any barrel of beer!", npc, creature) @@ -102,6 +102,7 @@ npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) npcConfig.shop = { { itemName = "bottle of whisper beer", clientId = 6106, buy = 80 }, { itemName = "mug of beer", clientId = 2880, buy = 20, count = 3 }, + { itemName = "vial of beer", clientId = 2874, buy = 20, count = 1, subType = 3 }, } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/kazzan.lua b/data-otservbr-global/npc/kazzan.lua index b20352dd1d7..797bf28fe67 100644 --- a/data-otservbr-global/npc/kazzan.lua +++ b/data-otservbr-global/npc/kazzan.lua @@ -50,11 +50,29 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end -local function greetCallback(npc, creature) - local playerId = creature:getId() - npcHandler:setTopic(playerId, 0) +local function endConversationWithDelay(npcHandler, npc, creature) + addEvent(function() + npcHandler:unGreet(npc, creature) + end, 1000) +end + +local function greetCallback(npc, creature, message) + local player = Player(creature) + local playerId = player:getId() + + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline) == 35 and player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.ScaredKazzan) ~= 1 and player:getOutfit().lookType == 65 then + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.ScaredKazzan, 1) + npcHandler:say("WAAAAAHHH!!!", npc, creature) + endConversationWithDelay(npcHandler, npc, creature) + return false + end + + npcHandler:say("Feel welcome in the lands of the children of the enlightened Daraman, |PLAYERNAME|.", npc, creature) + npcHandler:setInteraction(npc, creature) + return true end + local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() @@ -63,12 +81,9 @@ local function creatureSayCallback(npc, creature, type, message) return false end - -- Pegando a quest if MsgContains(message, "mission") and player:getStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest) < 1 then if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.Faction.MaridDoor) < 1 and player:getStorageValue(Storage.Quest.U7_4.DjinnWar.Faction.EfreetDoor) < 1 then - npcHandler:say({ - "Do you know the location of the djinn fortresses in the mountains south of here?", - }, npc, creature) + npcHandler:say("Do you know the location of the djinn fortresses in the mountains south of here?", npc, creature) npcHandler:setTopic(playerId, 1) end elseif npcHandler:getTopic(playerId) == 1 and MsgContains(message, "yes") then @@ -88,18 +103,11 @@ local function creatureSayCallback(npc, creature, type, message) player:setStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest, 1) -- Entregando elseif player:getStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest) == 3 then - npcHandler:say({ - "Well, I don't blame you for that. I am sure you did your best. Now we can just hope that peace remains. Here, take this small gratification for your effort to help and Daraman may bless you!", - }, npc, creature) + npcHandler:say("Well, I don't blame you for that. I am sure you did your best. Now we can just hope that peace remains. Here, take this small gratification for your effort to help and Daraman may bless you!", npc, creature) player:setStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest, player:getStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest) + 1) player:addItem(3035, 20) end - if player:getStorageValue(Storage.WhatAFoolish.Questline) == 35 and player:getStorageValue(Storage.WhatAFoolish.ScaredKazzan) ~= 1 and player:getOutfit().lookType == 65 then - player:setStorageValue(Storage.WhatAFoolish.ScaredKazzan, 1) - npcHandler:say("WAAAAAHHH!!!", npc, creature) - return false - end return true end diff --git a/data-otservbr-global/npc/kulag_the_guard.lua b/data-otservbr-global/npc/kulag_the_guard.lua index 8a6cc5748f2..e0c89dd81d3 100644 --- a/data-otservbr-global/npc/kulag_the_guard.lua +++ b/data-otservbr-global/npc/kulag_the_guard.lua @@ -58,15 +58,15 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "trouble") and player:getStorageValue(Storage.TheInquisition.KulagGuard) < 1 and player:getStorageValue(Storage.TheInquisition.Mission01) ~= -1 then + if MsgContains(message, "trouble") and player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.KulagGuard) < 1 and player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission01) ~= -1 then npcHandler:say("You adventurers become more and more of a pest.", npc, creature) npcHandler:setTopic(playerId, 1) elseif MsgContains(message, "authorities") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("They should throw you all into jail instead of giving you all those quests and rewards an honest watchman can only dream about.", npc, creature) - if player:getStorageValue(Storage.TheInquisition.KulagGuard) < 1 then - player:setStorageValue(Storage.TheInquisition.KulagGuard, 1) - player:setStorageValue(Storage.TheInquisition.Mission01, player:getStorageValue(Storage.TheInquisition.Mission01) + 1) -- The Inquisition Questlog- "Mission 1: Interrogation" + if player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.KulagGuard) < 1 then + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.KulagGuard, 1) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission01, player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission01) + 1) -- The Inquisition Questlog- "Mission 1: Interrogation" player:getPosition():sendMagicEffect(CONST_ME_HOLYAREA) end npcHandler:setTopic(playerId, 0) diff --git a/data-otservbr-global/npc/lazaran.lua b/data-otservbr-global/npc/lazaran.lua index 8c7b59c1ffe..58e3317a1f6 100644 --- a/data-otservbr-global/npc/lazaran.lua +++ b/data-otservbr-global/npc/lazaran.lua @@ -49,7 +49,6 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end -local TheNewFrontier = Storage.Quest.U8_54.TheNewFrontier local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() @@ -58,66 +57,71 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "mission") and player:getStorageValue(TheNewFrontier.Questline) == 8 then - if npcHandler:getTopic(playerId) == 0 then + local TheNewFrontier = Storage.Quest.U8_54.TheNewFrontier + local UnnaturalSelection = Storage.Quest.U8_54.UnnaturalSelection + + if MsgContains(message, "mission") then + if npcHandler:getTopic(playerId) == 0 and player:getStorageValue(TheNewFrontier.Questline) == 8 then npcHandler:say("Me people wanting {peace}. No war with others. No war with {little men}. We few. We weak. Need {help}. We not wanting make {war}. No hurt.", npc, creature) npcHandler:setTopic(playerId, 10) - end - elseif MsgContains(message, "peace") and npcHandler:getTopic(playerId) == 10 and player:getStorageValue(TheNewFrontier.Questline) == 8 then - npcHandler:say("Me people wanting peace. No war with others. No war with little men.", npc, creature) - player:setStorageValue(TheNewFrontier.Questline, 9) - player:setStorageValue(TheNewFrontier.Mission03, 2) --Questlog, The New Frontier Quest "Mission 03: Strangers in the Night" - npcHandler:setTopic(playerId, 0) - elseif MsgContains(message, "help") then - npcHandler:say("You mean you want help us?", npc, creature) - npcHandler:setTopic(playerId, 11) - elseif MsgContains(message, "mission") and npcHandler:getTopic(playerId) == 12 and player:getStorageValue(Storage.UnnaturalSelection.Questline) < 1 and player:getStorageValue(TheNewFrontier.Mission03) == 3 then - npcHandler:say({ - "Big problem we have! Skull of first leader gone. He ancestor of whole tribe but died long ago in war. We have keep his skull on our sacred place. ...", - "Then one night, green men came with wolves... and one of wolves took skull and ran off chewing on it! We need back - many wisdom and power is in skull. Maybe they took to north fortress. But can be hard getting in. You try get our holy skull back?", - }, npc, creature) - npcHandler:setTopic(playerId, 1) - elseif MsgContains(message, "mission") and player:getStorageValue(Storage.UnnaturalSelection.Questline) >= 1 then - if player:getStorageValue(Storage.UnnaturalSelection.Questline) == 1 then + elseif npcHandler:getTopic(playerId) == 12 then + if player:getStorageValue(TheNewFrontier.Mission03) == 3 and player:getStorageValue(UnnaturalSelection.Questline) < 0 then + npcHandler:say({ + "Big problem we have! Skull of first leader gone. He ancestor of whole tribe but died long ago in war. We have keep his skull on our sacred place. ...", + "Then one night, green men came with wolves... and one of wolves took skull and ran off chewing on it! We need back - many wisdom and power is in skull. Maybe they took to north fortress. But can be hard getting in. You try get our holy skull back?", + }, npc, creature) + npcHandler:setTopic(playerId, 1) + end + elseif player:getStorageValue(UnnaturalSelection.Questline) == 1 then npcHandler:say("Oh! You found holy skull? In bone pile you found?! Thank Pandor you brought! Me can have it back?", npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.UnnaturalSelection.Questline) == 2 then + elseif player:getStorageValue(UnnaturalSelection.Questline) == 2 then npcHandler:say({ "You brought back skull of first leader. Hero of tribe! But we more missions to do. ...", "Me and Ulala talk about land outside. We wanting to see more of land! Land over big water! But us no can leave tribe. No can cross water. Only way is skull of first leader. ...", "What holy skull sees, tribe sees. That we believe. Can you bring holy skull over big water and show places?", }, npc, creature) npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.UnnaturalSelection.Questline) == 3 then + elseif player:getStorageValue(UnnaturalSelection.Questline) == 3 then npcHandler:say("You say you was to where sun is hot and burning? And where trees grow as high as mountain? And where Fasuon cries white tears? Me can't wait to see!! Can have holy skull back?", npc, creature) npcHandler:setTopic(playerId, 4) - elseif player:getStorageValue(Storage.UnnaturalSelection.Questline) == 4 then + elseif player:getStorageValue(UnnaturalSelection.Questline) == 4 then npcHandler:say("We been weak for too long! We prepare for great hunt. But still need many doings! You can help us?", npc, creature) npcHandler:setTopic(playerId, 5) - elseif player:getStorageValue(Storage.UnnaturalSelection.Questline) == 13 then + elseif player:getStorageValue(UnnaturalSelection.Questline) == 13 then npcHandler:say({ "You well did! Great hunt is under best signs now. We prepare weapons and paint faces and then go! ...", "No no, you no need to help us. But can prepare afterparty! Little men sent us stuff some time ago. Was strange water in there. Brown and stinky! But when we tried all tribe became veeeeeeery happy. ...", "Now brown water is gone and we sad! Can you bring POT of brown water for party after great hunt? Just bring to me and me trade for shiny treasure.", }, npc, creature) - player:setStorageValue(Storage.UnnaturalSelection.Questline, 14) - player:setStorageValue(Storage.UnnaturalSelection.Mission06, 2) --Questlog, Unnatural Selection Quest "Mission 6: Firewater Burn" + player:setStorageValue(UnnaturalSelection.Questline, 14) + player:setStorageValue(UnnaturalSelection.Mission06, 2) -- Questlog, Unnatural Selection Quest "Mission 6: Firewater Burn" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.UnnaturalSelection.Questline) == 14 then + elseif player:getStorageValue(UnnaturalSelection.Questline) == 14 then npcHandler:say("You bring us big pot of strange water from little men?", npc, creature) npcHandler:setTopic(playerId, 6) end + elseif MsgContains(message, "peace") then + if npcHandler:getTopic(playerId) == 10 and player:getStorageValue(TheNewFrontier.Questline) == 8 then + npcHandler:say("Me people wanting peace. No war with others. No war with little men.", npc, creature) + player:setStorageValue(TheNewFrontier.Questline, 9) + player:setStorageValue(TheNewFrontier.Mission03, 2) -- Questlog, The New Frontier Quest "Mission 03: Strangers in the Night" + npcHandler:setTopic(playerId, 0) + end + elseif MsgContains(message, "help") then + npcHandler:say("You mean you want help us?", npc, creature) + npcHandler:setTopic(playerId, 11) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("You hero of our tribe if bring back holy skull!", npc, creature) - player:setStorageValue(Storage.UnnaturalSelection.Questline, 1) - player:setStorageValue(Storage.UnnaturalSelection.Mission01, 1) --Questlog, Unnatural Selection Quest "Mission 1: Skulled" + player:setStorageValue(UnnaturalSelection.Questline, 1) + player:setStorageValue(UnnaturalSelection.Mission01, 1) -- Questlog, Unnatural Selection Quest "Mission 1: Skulled" npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then if player:removeItem(10159, 1) then npcHandler:say("Me thank you much! All wisdom safe again now.", npc, creature) - player:setStorageValue(Storage.UnnaturalSelection.Questline, 2) - player:setStorageValue(Storage.UnnaturalSelection.Mission01, 3) --Questlog, Unnatural Selection Quest "Mission 1: Skulled" + player:setStorageValue(UnnaturalSelection.Questline, 2) + player:setStorageValue(UnnaturalSelection.Mission01, 3) -- Questlog, Unnatural Selection Quest "Mission 1: Skulled" npcHandler:setTopic(playerId, 0) else npcHandler:say("You do not have it!", npc, creature) @@ -126,15 +130,15 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 3 then npcHandler:say("Here take holy skull. You bring where you think is good. See as much as possible! See where other people live!", npc, creature) player:addItem(10159, 1) - player:setStorageValue(Storage.UnnaturalSelection.Questline, 3) - player:setStorageValue(Storage.UnnaturalSelection.Mission02, 1) --Questlog, Unnatural Selection Quest "Mission 2: All Around the World" + player:setStorageValue(UnnaturalSelection.Questline, 3) + player:setStorageValue(UnnaturalSelection.Mission02, 1) -- Questlog, Unnatural Selection Quest "Mission 2: All Around the World" npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 4 then - if player:getStorageValue(Storage.UnnaturalSelection.Mission02) == 12 and player:getItemCount(10159) >= 1 then + if player:getStorageValue(UnnaturalSelection.Mission02) == 12 and player:getItemCount(10159) >= 1 then npcHandler:say("We make big ritual soon and learn much about world outside. Me thank you many times for teaching us world. Very wise and adventurous you are!", npc, creature) player:removeItem(10159, 1) - player:setStorageValue(Storage.UnnaturalSelection.Questline, 4) - player:setStorageValue(Storage.UnnaturalSelection.Mission02, 13) --Questlog, Unnatural Selection Quest "Mission 2: All Around the World" + player:setStorageValue(UnnaturalSelection.Questline, 4) + player:setStorageValue(UnnaturalSelection.Mission02, 13) -- Questlog, Unnatural Selection Quest "Mission 2: All Around the World" npcHandler:setTopic(playerId, 0) else npcHandler:say("The skull have not seen all yet!", npc, creature) @@ -142,15 +146,15 @@ local function creatureSayCallback(npc, creature, type, message) end elseif npcHandler:getTopic(playerId) == 5 then npcHandler:say("We need to calm and make happy gods. Best go to Ulala. She is priest of us and can tell what needs doing.", npc, creature) - player:setStorageValue(Storage.UnnaturalSelection.Questline, 5) - player:setStorageValue(Storage.UnnaturalSelection.Mission03, 1) --Questlog, Unnatural Selection Quest "Mission 3: Dance Dance Evolution" + player:setStorageValue(UnnaturalSelection.Questline, 5) + player:setStorageValue(UnnaturalSelection.Mission03, 1) -- Questlog, Unnatural Selection Quest "Mission 3: Dance Dance Evolution" npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 6 then if player:removeItem(3465, 1, 3) then npcHandler:say("We make big ritual soon and learn much about world outside. Me thank you many times for teaching us world. Very wise and adventurous you are!", npc, creature) player:addItem(10198, 1) - player:setStorageValue(Storage.UnnaturalSelection.Questline, 15) - player:setStorageValue(Storage.UnnaturalSelection.Mission06, 3) --Questlog, Unnatural Selection Quest "Mission 6: Firewater Burn" + player:setStorageValue(UnnaturalSelection.Questline, 15) + player:setStorageValue(UnnaturalSelection.Mission06, 3) -- Questlog, Unnatural Selection Quest "Mission 6: Firewater Burn" npcHandler:setTopic(playerId, 0) else npcHandler:say("You do not have the brown strange water!", npc, creature) @@ -165,8 +169,12 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "little men") then npcHandler:say("We come and see little men. They like us, only very little. They having good weapon and armor, like the greens.", npc, creature) end + return true end + +npcHandler:setMessage(MESSAGE_GREET, "Me greet. You no enemy of tribe.") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/leeland.lua b/data-otservbr-global/npc/leeland.lua index 19bb03d1f5d..a07a33fc595 100644 --- a/data-otservbr-global/npc/leeland.lua +++ b/data-otservbr-global/npc/leeland.lua @@ -51,6 +51,7 @@ npcType.onCloseChannel = function(npc, creature) end local TheNewFrontier = Storage.Quest.U8_54.TheNewFrontier + local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() diff --git a/data-otservbr-global/npc/lisander.lua b/data-otservbr-global/npc/lisander.lua index a1c59f966a1..308b7e143c0 100644 --- a/data-otservbr-global/npc/lisander.lua +++ b/data-otservbr-global/npc/lisander.lua @@ -55,7 +55,7 @@ local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() if message == "cookie" then - if player:getStorageValue(BloodBrothers.Mission02) == 1 and player:getItemCount(8199) > 0 and player:getStorageValue(BloodBrothers.Cookies.Lisander) < 0 then + if player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission02) == 1 and player:getItemCount(8199) > 0 and player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Lisander) < 0 then npcHandler:say("A cookie? Sure, is it for free?", npc, creature) npcHandler:setTopic(playerId, 1) else @@ -64,14 +64,14 @@ local function creatureSayCallback(npc, creature, type, message) elseif message == "yes" then if npcHandler:getTopic(playerId) == 1 and player:removeItem(8199, 1) then -- garlic cookie npcHandler:say("Errrkss - coughcough - what the - heck did you put in there? Get out of my sight!", npc, creature) - player:setStorageValue(BloodBrothers.Cookies.Lisander, 1) + player:setStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Lisander, 1) npcHandler:setTopic(playerId, 0) end end end --Basic keywordHandler:addKeyword({ "alori mort" }, StdModule.say, { npcHandler = npcHandler, text = "Hold your tongue." }, function(player) - return player:getStorageValue(BloodBrothers.Mission03) == 1 + return player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission03) == 1 end) npcHandler:setMessage(MESSAGE_GREET, "I'd rather be left in {peace}. Keep it short.") diff --git a/data-otservbr-global/npc/lizard_tunnel_guard.lua b/data-otservbr-global/npc/lizard_tunnel_guard.lua index 4fa13285212..dc836ebcebf 100644 --- a/data-otservbr-global/npc/lizard_tunnel_guard.lua +++ b/data-otservbr-global/npc/lizard_tunnel_guard.lua @@ -49,8 +49,8 @@ local function greetCallback(npc, creature) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) >= 2 then - player:setStorageValue(Storage.WrathoftheEmperor.GuardcaughtYou, 1) + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) >= 2 then + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.GuardcaughtYou, 1) player:removeCondition(CONDITION_OUTFIT) player:removeItem(11328, 1) player:teleportTo(Position(33361, 31206, 8)) diff --git a/data-otservbr-global/npc/lorbas.lua b/data-otservbr-global/npc/lorbas.lua index 55f8953fd26..c43ca131c15 100644 --- a/data-otservbr-global/npc/lorbas.lua +++ b/data-otservbr-global/npc/lorbas.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "cookie") then - if player:getStorageValue(Storage.WhatAFoolish.Questline) == 31 and player:getStorageValue(Storage.WhatAFoolish.CookieDelivery.Lorbas) ~= 1 then + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline) == 31 and player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.Lorbas) ~= 1 then npcHandler:say("You want me to eat this cookie?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -71,7 +71,7 @@ local function creatureSayCallback(npc, creature, type, message) return true end - player:setStorageValue(Storage.WhatAFoolish.CookieDelivery.Lorbas, 1) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.Lorbas, 1) if player:getCookiesDelivered() == 10 then player:addAchievement("Allow Cookies?") end @@ -90,6 +90,8 @@ local function creatureSayCallback(npc, creature, type, message) return true end +npcHandler:setMessage(MESSAGE_GREET, "Be greeted, dear traveller.") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/lugri.lua b/data-otservbr-global/npc/lugri.lua index d1a313b2d75..e79af832fe2 100644 --- a/data-otservbr-global/npc/lugri.lua +++ b/data-otservbr-global/npc/lugri.lua @@ -86,40 +86,40 @@ local function creatureSayCallback(npc, creature, type, message) ------------Task Part------------- elseif MsgContains(message, "task") then - if player:getStorageValue(Storage.KillingInTheNameOf.LugriNecromancers) < 0 and player:getLevel() >= 60 then + if player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.LugriNecromancers) < 0 and player:getLevel() >= 60 then npcHandler:say({ "What? Who are you to imply I need help from a worm like you? ...", "I don't need help. But if you desperately wish to do something to earn the favour of Zathroth, feel free. Don't expect any reward though. ...", "Do you want to help and serve Zathroth out of your own free will, without demanding payment or recognition?", }, npc, creature) npcHandler:setTopic(playerId, 7) - elseif player:getStorageValue(Storage.KillingInTheNameOf.LugriNecromancers) == 0 then + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.LugriNecromancers) == 0 then if player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.NecromancerCount) >= 4000 then npcHandler:say({ "You've slain a mere " .. player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.NecromancerCount) .. " necromancers and priestesses. Still, you've shown some dedication. Maybe that means you can kill one of those so-called 'leaders' too. ...", "Deep under Drefia, a necromancer called Necropharus is hiding in the Halls of Sacrifice. I'll place a spell on you with which you will be able to pass his weak protective gate. ...", "Know that this will be your only chance to enter his room. If you leave it or die, you won't be able to return. We'll see if you really dare enter those halls.", }, npc, creature) - player:setStorageValue(Storage.KillingInTheNameOf.LugriNecromancers, 1) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.LugriNecromancers, 1) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BossKillCount.NecropharusCount, 0) else npcHandler:say("Come back when you have slain 4000 necromancers and priestesses!", npc, creature) end - elseif player:getStorageValue(Storage.KillingInTheNameOf.LugriNecromancers) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.LugriNecromancers) == 2 then npcHandler:say({ "Hrm. So you had the guts to enter that room. Well, it's all fake magic anyway and no real threat. ...", "What are you looking at me for? Waiting for something? I told you that there was no reward. Despite being allowed to stand before me without being squashed like a bug. Get out of my sight!", }, npc, creature) - player:setStorageValue(Storage.KillingInTheNameOf.LugriNecromancers, 4) - elseif player:getStorageValue(Storage.KillingInTheNameOf.LugriNecromancers) == 3 then + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.LugriNecromancers, 4) + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.LugriNecromancers) == 3 then if player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.NecromancerCount) >= 1000 then npcHandler:say("Good job!", npc, creature) player:addExperience(40000, true) - player:setStorageValue(Storage.KillingInTheNameOf.LugriNecromancers, 4) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.LugriNecromancers, 4) else npcHandler:say("Come back when you have slain 1000 necromancers and priestesses!", npc, creature) end - elseif player:getStorageValue(Storage.KillingInTheNameOf.LugriNecromancers) == 4 then + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.LugriNecromancers) == 4 then npcHandler:say("You can't live without serving, can you? Although you are quite annoying, you're still somewhat useful. Continue killing Necromancers and Priestesses for me. 1000 are enough this time. What do you say?", npc, creature) npcHandler:setTopic(playerId, 8) end @@ -180,7 +180,7 @@ local function creatureSayCallback(npc, creature, type, message) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.BloodPriestCount, 0) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.BloodHandCount, 0) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.ShadowPupilCount, 0) - player:setStorageValue(Storage.KillingInTheNameOf.LugriNecromancers, 0) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.LugriNecromancers, 0) elseif npcHandler:getTopic(playerId) == 8 then npcHandler:say("Good. Then go.", npc, creature) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.NecromancerCount, 0) @@ -189,7 +189,7 @@ local function creatureSayCallback(npc, creature, type, message) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.BloodPriestCount, 0) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.BloodHandCount, 0) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.ShadowPupilCount, 0) - player:setStorageValue(Storage.KillingInTheNameOf.LugriNecromancers, 3) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.LugriNecromancers, 3) end elseif MsgContains(message, "no") then if npcHandler:getTopic(playerId) > 1 then diff --git a/data-otservbr-global/npc/lurik.lua b/data-otservbr-global/npc/lurik.lua index 14119ba0d72..88bbd0bf6a5 100644 --- a/data-otservbr-global/npc/lurik.lua +++ b/data-otservbr-global/npc/lurik.lua @@ -102,21 +102,22 @@ local function creatureSayCallback(npc, creature, type, message) "We need you to recover this crystal. Travel to the southern camp of the raiders and find our contact man there. Get the memory crystal and bring ithere. The society and the shamans will then decide our next steps. Do you think you can do this?", }, npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 33 then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 33 then npcHandler:say("Have you retrieved the memory crystal?", npc, creature) npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 34 and player:getStorageValue(Storage.TheIceIslands.MemoryCrystal) > os.time() then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 34 and player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.MemoryCrystal) > os.time() then npcHandler:say("Give me some more time!", npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 34 and player:getStorageValue(Storage.TheIceIslands.MemoryCrystal) < os.time() then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 34 and player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.MemoryCrystal) < os.time() then npcHandler:say({ "The information was quite useful. What worries me most are not the raiders but those that have driven them from the old mines...", "We need to investigate the mines. Most entrances collapsed due to the lack of maintenance but there should be some possibilities to get in ...", "In case you find a door, Ill tell you the old trick of the Carlin mining company to open it . Find some hint or someone who is willing to talk about what is going on there.", }, npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.TheIceIslands.Questline, 35) - player:setStorageValue(Storage.TheIceIslands.Mission09, 1) -- Questlog The Ice Islands Quest, Formorgar Mines 1: The Mission + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 35) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission09, 1) -- Questlog The Ice Islands Quest, Formorgar Mines 1: The Mission + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.FormorgarMinesDoor, 1) end elseif MsgContains(message, "yes") then -- ISLAND OF DRAGONS @@ -133,15 +134,15 @@ local function creatureSayCallback(npc, creature, type, message) -- ISLAND OF DRAGONS elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say("Excellent. Just report about your mission when you got the memory crystal.", npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 33) - player:setStorageValue(Storage.TheIceIslands.Mission08, 2) -- Questlog The Ice Islands Quest, The Contact + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 33) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission08, 2) -- Questlog The Ice Islands Quest, The Contact npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then if player:removeItem(7281, 1) then npcHandler:say("Ah, great. Please give me some time to evaluate the information. Then talk to me again about your mission. ", npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 34) - player:setStorageValue(Storage.TheIceIslands.Mission08, 4) -- Questlog The Ice Islands Quest, The Contact - player:setStorageValue(Storage.TheIceIslands.MemoryCrystal, os.time() + 5 * 60) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 34) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission08, 4) -- Questlog The Ice Islands Quest, The Contact + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.MemoryCrystal, os.time() + 5 * 60) npcHandler:setTopic(playerId, 0) end end diff --git a/data-otservbr-global/npc/malor.lua b/data-otservbr-global/npc/malor.lua index 646bb32205d..0502fd10d3c 100644 --- a/data-otservbr-global/npc/malor.lua +++ b/data-otservbr-global/npc/malor.lua @@ -153,10 +153,10 @@ local function creatureSayCallback(npc, creature, type, message) end npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "task") and player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission03) == 3 then - if player:getStorageValue(Storage.KillingInTheNameOf.BlueDjinnTask) < 0 or player:getStorageValue(Storage.KillingInTheNameOf.BlueDjinnTask) == 3 then + if player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BlueDjinnTask) < 0 or player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BlueDjinnTask) == 3 then npcHandler:say("There are still blue djinns everywhere! We can't let a single one of them live. I guess a start would be for you to kill 500 blue djinns and Marid. Will you assist us?", npc, creature) npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.KillingInTheNameOf.BlueDjinnTask) == 0 then + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BlueDjinnTask) == 0 then if player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.BlueDjinnCount) >= 500 then npcHandler:say({ "Well well, human. Not bad. I'm not surprised, since you have done acceptably well in the past. So I suppose I can ask you for another thing. ...", @@ -164,16 +164,16 @@ local function creatureSayCallback(npc, creature, type, message) "I suggest you teach that joke of a djinn a lesson he won't forget.", }, npc, creature) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BossKillCount.FahimCount, 0) - player:setStorageValue(Storage.KillingInTheNameOf.BlueDjinnTask, 1) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BlueDjinnTask, 1) else npcHandler:say("Come back when you kill 500 blue djinns and Marid.", npc, creature) end - elseif player:getStorageValue(Storage.KillingInTheNameOf.BlueDjinnTask) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BlueDjinnTask) == 2 then npcHandler:say({ "You've met Fahim the Wise? That's good. I'm pretty sure it was easy to give him a nice beating. ...", "If you should feel like killing blue djinns in our service again, just talk to me about that task.", }, npc, creature) - player:setStorageValue(Storage.KillingInTheNameOf.BlueDjinnTask, 3) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BlueDjinnTask, 3) player:addExperience(10000, true) player:addMoney(5000) end @@ -183,7 +183,7 @@ local function creatureSayCallback(npc, creature, type, message) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.BlueDjinnCount, 0) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.BlueDjinnCount, 0) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.MaridCount, 0) - player:setStorageValue(Storage.KillingInTheNameOf.BlueDjinnTask, 0) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BlueDjinnTask, 0) end return true end diff --git a/data-otservbr-global/npc/maria.lua b/data-otservbr-global/npc/maria.lua index 7c63e11ac02..74780e4a85a 100644 --- a/data-otservbr-global/npc/maria.lua +++ b/data-otservbr-global/npc/maria.lua @@ -65,6 +65,8 @@ npcConfig.shop = { { itemName = "mug of wine", clientId = 2880, buy = 3, count = 2 }, { itemName = "tomato", clientId = 3596, buy = 5 }, { itemName = "valentine's cake", clientId = 6392, buy = 100 }, + { itemName = "vial of beer", clientId = 2874, buy = 2, count = 1, subType = 3 }, + { itemName = "vial of wine", clientId = 2874, buy = 3, count = 1, subType = 2 }, } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/maris.lua b/data-otservbr-global/npc/maris.lua index a89bee81021..857fca0ee85 100644 --- a/data-otservbr-global/npc/maris.lua +++ b/data-otservbr-global/npc/maris.lua @@ -55,7 +55,7 @@ local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() if message == "cookie" then - if player:getStorageValue(BloodBrothers.Mission02) == 1 and player:getItemCount(8199) > 0 and player:getStorageValue(BloodBrothers.Cookies.Maris) < 0 then + if player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission02) == 1 and player:getItemCount(8199) > 0 and player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Maris) < 0 then npcHandler:say("The good thing about cookies is that they last for a long time. So they are well suited for a boat trip. I'll take some of those, okay?", npc, creature) npcHandler:setTopic(playerId, 1) else @@ -64,7 +64,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif message == "yes" then if npcHandler:getTopic(playerId) == 1 and player:removeItem(8199, 1) then -- garlic cookie npcHandler:say("Let's try that stuff first - ARRRRRRHH! That must have been the worst cookie I've ever eaten. Get off my ship.", npc, creature) - player:setStorageValue(BloodBrothers.Cookies.Maris, 1) + player:setStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Maris, 1) npcHandler:setTopic(playerId, 0) end end @@ -85,7 +85,7 @@ keywordHandler:addAliasKeyword({ "passage" }) keywordHandler:addKeyword({ "job" }, StdModule.say, { npcHandler = npcHandler, text = "I am Maris, Captain of this ship." }) keywordHandler:addAliasKeyword({ "captain" }) keywordHandler:addKeyword({ "alori mort" }, StdModule.say, { npcHandler = npcHandler, text = "Stop mumbling and don't bug me." }, function(player) - return player:getStorageValue(BloodBrothers.Mission03) == 1 + return player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission03) == 1 end) npcHandler:setMessage(MESSAGE_GREET, "I hope you have a good reason to step near my {ship}, |PLAYERNAME|.") diff --git a/data-otservbr-global/npc/maris_mistrock.lua b/data-otservbr-global/npc/maris_mistrock.lua index f34e82b85b0..c5ee2657cd4 100644 --- a/data-otservbr-global/npc/maris_mistrock.lua +++ b/data-otservbr-global/npc/maris_mistrock.lua @@ -76,8 +76,8 @@ keywordHandler:addKeyword( }, nil, function(player) - if player:getStorageValue(Storage.HiddenCityOfBeregar.WayToBeregar) ~= 1 then - player:setStorageValue(Storage.HiddenCityOfBeregar.WayToBeregar, 1) + if player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.WayToBeregar) ~= 1 then + player:setStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.WayToBeregar, 1) end end ) diff --git a/data-otservbr-global/npc/maritima.lua b/data-otservbr-global/npc/maritima.lua index 80de0a82e31..49bc72a5d0d 100644 --- a/data-otservbr-global/npc/maritima.lua +++ b/data-otservbr-global/npc/maritima.lua @@ -54,14 +54,15 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "quara") then - if player:getStorageValue(Storage.InServiceofYalahar.Questline) == 41 and player:getStorageValue(Storage.InServiceofYalahar.QuaraInky) < 1 and player:getStorageValue(Storage.InServiceofYalahar.QuaraSplasher) < 1 and player:getStorageValue(Storage.InServiceofYalahar.QuaraSharptooth) < 1 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 41 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.QuaraInky) < 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.QuaraSplasher) < 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.QuaraSharptooth) < 1 then npcHandler:say({ "The quara in this area are a strange race that seeks for inner perfection rather than physical one. ...", + "Considering that they are quara, they are rather peaceful as long no one enters their territory. ...", "However, recently the quara got mad because their area is flooded with toxic sewage from the city. If you could inform someone about it, they might stop the sewage and the quara could return to their own business.", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 42) - player:setStorageValue(Storage.InServiceofYalahar.Mission07, 3) -- StorageValue for Questlog "Mission 07: A Fishy Mission" - player:setStorageValue(Storage.InServiceofYalahar.QuaraState, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 42) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission07, 3) -- StorageValue for Questlog "Mission 07: A Fishy Mission" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.QuaraState, 1) npcHandler:setTopic(playerId, 0) end end diff --git a/data-otservbr-global/npc/markwin.lua b/data-otservbr-global/npc/markwin.lua index f0b2e055f5f..c30dd0242f3 100644 --- a/data-otservbr-global/npc/markwin.lua +++ b/data-otservbr-global/npc/markwin.lua @@ -93,7 +93,7 @@ local function creatureSayCallback(npc, creature, type, message) end end elseif MsgContains(message, "cookie") then - if player:getStorageValue(Storage.WhatAFoolish.Questline) == 31 and player:getStorageValue(Storage.WhatAFoolish.CookieDelivery.Markwin) ~= 1 then + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline) == 31 and player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.Markwin) ~= 1 then npcHandler:say("You bring me ... a cookie???", npc, creature) npcHandler:setTopic(playerId, 2) end @@ -110,7 +110,7 @@ local function creatureSayCallback(npc, creature, type, message) return true end - player:setStorageValue(Storage.WhatAFoolish.CookieDelivery.Markwin, 1) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.Markwin, 1) if player:getCookiesDelivered() == 10 then player:addAchievement("Allow Cookies?") end diff --git a/data-otservbr-global/npc/melfar.lua b/data-otservbr-global/npc/melfar.lua index 5decb928643..cfbda35ae10 100644 --- a/data-otservbr-global/npc/melfar.lua +++ b/data-otservbr-global/npc/melfar.lua @@ -100,8 +100,9 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say({ - "So take this beaver bait. It will work best on dwarf trees. I'll mark the three trees on your map. Here .. here .. and here! So now mark those trees with the beaver bait. ... ", - "If you're unlucky enough to meet one of the giant beavers, try to stay calm. Don't do any hectic moves, don't yell, don't draw any weapon, and if you should carry anything wooden on you, throw it away as far as you can. ", + "So take this beaver bait. It will work best on dwarf trees. I'll mark the three trees on your map. Here .. here .. and here! So now mark those trees with the beaver bait. ...", + "If you're unlucky enough to meet one of the giant beavers, try to stay calm. Don't do any hectic moves, don't yell, don't draw any weapon, and if you should carry anything wooden on you, throw it away as far as you can.", + "Just great, another disturbance. Just what I need.", }, npc, creature) player:setStorageValue(TheNewFrontier.Questline, 5) player:setStorageValue(TheNewFrontier.Mission02[1], 2) --Questlog, The New Frontier Quest "Mission 02: From Kazordoon With Love" @@ -131,6 +132,8 @@ local function creatureSayCallback(npc, creature, type, message) return true end +npcHandler:setMessage(MESSAGE_GREET, "Just great, another disturbance. Just what I need.") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/miles_the_guard.lua b/data-otservbr-global/npc/miles_the_guard.lua index d97861a78ac..063e60281cf 100644 --- a/data-otservbr-global/npc/miles_the_guard.lua +++ b/data-otservbr-global/npc/miles_the_guard.lua @@ -58,7 +58,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "trouble") and npcHandler:getTopic(playerId) ~= 3 and player:getStorageValue(Storage.TheInquisition.MilesGuard) < 1 and player:getStorageValue(Storage.TheInquisition.Mission01) ~= -1 then + if MsgContains(message, "trouble") and npcHandler:getTopic(playerId) ~= 3 and player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.MilesGuard) < 1 and player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission01) ~= -1 then npcHandler:say("I'm fine. There's no trouble at all.", npc, creature) npcHandler:setTopic(playerId, 1) elseif MsgContains(message, "foresight of the authorities") and npcHandler:getTopic(playerId) == 1 then @@ -70,9 +70,9 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "trouble will arise in the near future") and npcHandler:getTopic(playerId) == 3 then npcHandler:say("I think the gods and the government do their best to keep away harm from the citizens.", npc, creature) npcHandler:setTopic(playerId, 0) - if player:getStorageValue(Storage.TheInquisition.MilesGuard) < 1 then - player:setStorageValue(Storage.TheInquisition.MilesGuard, 1) - player:setStorageValue(Storage.TheInquisition.Mission01, player:getStorageValue(Storage.TheInquisition.Mission01) + 1) -- The Inquisition Questlog- "Mission 1: Interrogation" + if player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.MilesGuard) < 1 then + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.MilesGuard, 1) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission01, player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission01) + 1) -- The Inquisition Questlog- "Mission 1: Interrogation" player:getPosition():sendMagicEffect(CONST_ME_HOLYAREA) end end diff --git a/data-otservbr-global/npc/mirabell.lua b/data-otservbr-global/npc/mirabell.lua index 5bb5070245a..06362976254 100644 --- a/data-otservbr-global/npc/mirabell.lua +++ b/data-otservbr-global/npc/mirabell.lua @@ -65,7 +65,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "pies") then - if player:getStorageValue(Storage.WhatAFoolish.PieBuying) == -1 then + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.PieBuying) == -1 then npcHandler:say("Oh you've heard about my excellent pies, didn't you? I am flattered. Unfortunately I'm completely out of flour. I need 2 portions of flour for one pie. Just tell me when you have enough flour for your pies.", npc, creature) return true end @@ -83,7 +83,7 @@ local function creatureSayCallback(npc, creature, type, message) return true end - player:setStorageValue(Storage.WhatAFoolish.PieBuying, player:getStorageValue(Storage.WhatAFoolish.PieBuying) + 1) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.PieBuying, player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.PieBuying) + 1) npcHandler:say("Excellent. Now I can start baking the pies. As you helped me, I will make you a good price for them.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then @@ -94,8 +94,8 @@ local function creatureSayCallback(npc, creature, type, message) end player:addItem(119, 1) - player:setStorageValue(Storage.WhatAFoolish.PieBuying, player:getStorageValue(Storage.WhatAFoolish.PieBuying) - 1) - player:setStorageValue(Storage.WhatAFoolish.PieBoxTimer, os.time() + 1200) -- 20 minutes to deliver + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.PieBuying, player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.PieBuying) - 1) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.PieBoxTimer, os.time() + 1200) -- 20 minutes to deliver npcHandler:say({ "Here they are. Wait! Two things you should know: Firstly, they won't last long in the sun so you better get them to their destination as quickly as possible ...", "Secondly, since my pies are that delicious it is forbidden to leave the town with them. We can't afford to attract more tourists to Edron.", @@ -134,6 +134,9 @@ npcConfig.shop = { { itemName = "mug of lemonade", clientId = 2880, buy = 2, count = 12 }, { itemName = "mug of water", clientId = 2880, buy = 1, count = 1 }, { itemName = "mug of wine", clientId = 2880, buy = 3, count = 2 }, + { itemName = "vial of beer", clientId = 2874, buy = 2, count = 1, subType = 3 }, + { itemName = "vial of wine", clientId = 2874, buy = 3, count = 1, subType = 2 }, + { itemName = "vial of water", clientId = 2874, buy = 1, count = 1 }, } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/miraia.lua b/data-otservbr-global/npc/miraia.lua index bcc2cb88076..ad74b08040e 100644 --- a/data-otservbr-global/npc/miraia.lua +++ b/data-otservbr-global/npc/miraia.lua @@ -119,9 +119,9 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say(config[message].text[2], npc, creature) end elseif MsgContains(message, "scarab cheese") then - if player:getStorageValue(Storage.TravellingTrader.Mission03) == 1 then + if player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission03) == 1 then npcHandler:say("Let me cover my nose before I get this for you... Would you REALLY like to buy scarab cheese for 100 gold?", npc, creature) - elseif player:getStorageValue(Storage.TravellingTrader.Mission03) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission03) == 2 then npcHandler:say("Oh the last cheese molded? Would you like to buy another one for 100 gold?", npc, creature) end npcHandler:setTopic(playerId, 4) @@ -159,7 +159,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 4 then if player:getMoney() + player:getBankBalance() >= 100 then - player:setStorageValue(Storage.TravellingTrader.Mission03, 2) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission03, 2) player:addItem(169, 1) player:removeMoneyBank(100) npcHandler:say("Here it is.", npc, creature) @@ -200,6 +200,8 @@ npcConfig.shop = { { itemName = "mug of milk", clientId = 2880, buy = 5, count = 9 }, { itemName = "mug of water", clientId = 2880, buy = 2, count = 1 }, { itemName = "scarab cheese", clientId = 169, buy = 100 }, + { itemName = "vial of milk", clientId = 2874, buy = 5, count = 1, subType = 9 }, + { itemName = "vial of water", clientId = 2874, buy = 2, count = 1 }, } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/mother_of_jack.lua b/data-otservbr-global/npc/mother_of_jack.lua index 02339c5f1a6..3f7d693cb56 100644 --- a/data-otservbr-global/npc/mother_of_jack.lua +++ b/data-otservbr-global/npc/mother_of_jack.lua @@ -70,23 +70,13 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "jack") then if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 5 then if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Mother) < 1 then - npcHandler:say( - "What about him? He's downstairs as he always has been. He never went away from home \z - any further than into the forest nearby. He rarely ever took a walk to Edron, did he?", - npc, - creature - ) + npcHandler:say("What about him? He's downstairs as he always has been. He never went away from home any further than into the forest nearby. He rarely ever took a walk to Edron, did he?", npc, creature) npcHandler:setTopic(playerId, 1) end end elseif MsgContains(message, "no") then if npcHandler:getTopic(playerId) == 2 then - npcHandler:say( - "Thought so. Of course he wouldn't do anything wrong. And he went where? Edron. Hm. I can \z - see nothing wrong with that. But... he wasn't there often, was he?", - npc, - creature - ) + npcHandler:say("Thought so. Of course he wouldn't do anything wrong. And he went where? Edron. Hm. I can see nothing wrong with that. But... he wasn't there often, was he?", npc, creature) npcHandler:setTopic(playerId, 3) end elseif MsgContains(message, "yes") then @@ -96,9 +86,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 3 then npcHandler:say({ "Oh my... he did what? Why was he there? Edron Academy? ...", - "I see... this cannot be. Spectrofuss? Who? Jack! When? How? But why did he do that? Jack!! \z - JACK!! When I find him he owes me an EXPLANATION. Thanks for telling \z - me what he is actually doing in his FREE TIME. ...", + "I see... this cannot be. Spectrofuss? Who? Jack! When? How? But why did he do that? Jack!! JACK!! When I find him he owes me an EXPLANATION. Thanks for telling me what he is actually doing in his FREE TIME. ...", "JAAAAACK!", }, npc, creature) npcHandler:setTopic(playerId, 0) diff --git a/data-otservbr-global/npc/mr._west.lua b/data-otservbr-global/npc/mr._west.lua index 32e0f340d35..d3fc4a402bc 100644 --- a/data-otservbr-global/npc/mr._west.lua +++ b/data-otservbr-global/npc/mr._west.lua @@ -54,10 +54,10 @@ local function greetCallback(npc, creature) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.InServiceofYalahar.MrWestDoor) == 1 then - npcHandler:setMessage(MESSAGE_GREET, "Wh .. What? How did you get here? Where are all the guards? You .. you could have killed me but yet you chose to talk? What a relief! ... So what brings you here my friend, if I might call you like that? ") - elseif player:getStorageValue(Storage.InServiceofYalahar.MrWestDoor) == 2 then - npcHandler:setMessage(MESSAGE_GREET, "Murderer! But .. I give in, you won! ... Dictate me your conditions but please, I beg you, spare my life. What do you want?") + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.MrWestDoor) == 1 then + npcHandler:setMessage(MESSAGE_GREET, { "Wh .. What? How did you get here? Where are all the guards? You .. you could have killed me but yet you chose to talk? What a relief! ...", "So what brings you here my friend, if I might call you like that?" }) + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.MrWestDoor) == 2 then + npcHandler:setMessage(MESSAGE_GREET, { "Murderer! But .. I give in, you won!", "Dictate me your conditions but please, I beg you, spare my life. What do you want?" }) end return true end @@ -71,18 +71,18 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.InServiceofYalahar.Questline) == 24 then - if player:getStorageValue(Storage.InServiceofYalahar.MrWestDoor) == 1 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 24 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.MrWestDoor) == 1 then npcHandler:say("Indeed, I can see the benefits of a mutual agreement. I will later read the details and send a letter to your superior. ", npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 25) - player:setStorageValue(Storage.InServiceofYalahar.Mission04, 3) -- StorageValue for Questlog "Mission 04: Good to be Kingpin" - player:setStorageValue(Storage.InServiceofYalahar.MrWestStatus, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 25) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission04, 3) -- StorageValue for Questlog "Mission 04: Good to be Kingpin" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.MrWestStatus, 1) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.MrWestDoor) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.MrWestDoor) == 2 then npcHandler:say("Yes, for the sake of my life I'll accept those terms. I know when I have lost. Tell your master I will comply with his orders. ", npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 25) - player:setStorageValue(Storage.InServiceofYalahar.Mission04, 4) -- StorageValue for Questlog "Mission 04: Good to be Kingpin" - player:setStorageValue(Storage.InServiceofYalahar.MrWestStatus, 2) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 25) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission04, 4) -- StorageValue for Questlog "Mission 04: Good to be Kingpin" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.MrWestStatus, 2) npcHandler:setTopic(playerId, 0) end end diff --git a/data-otservbr-global/npc/muhad.lua b/data-otservbr-global/npc/muhad.lua index 6228a1b0ebc..f55754cbc94 100644 --- a/data-otservbr-global/npc/muhad.lua +++ b/data-otservbr-global/npc/muhad.lua @@ -53,7 +53,7 @@ end keywordHandler:addKeyword({ "here" }, StdModule.say, { npcHandler = npcHandler, text = "I am the leader of the true sons of {Daraman}." }) keywordHandler:addKeyword({ "job" }, StdModule.say, { npcHandler = npcHandler, text = "I am the leader of the true sons of {Daraman}." }) keywordHandler:addKeyword({ "daraman" }, StdModule.say, { npcHandler = npcHandler, text = "This is our home - the land of the desert." }) -keywordHandler:addKeyword({ "ankrahmun" }, StdModule.say, { npcHandler = npcHandler, text = "We will fight that city until we get back what belongs to us." }) +keywordHandler:addKeyword({ "{Ankrahmun}" }, StdModule.say, { npcHandler = npcHandler, text = "We will fight that city until we get back what belongs to us." }) keywordHandler:addKeyword({ "darashia" }, StdModule.say, { npcHandler = npcHandler, text = "We avoid these places you call cities." }) keywordHandler:addKeyword({ "city" }, StdModule.say, { npcHandler = npcHandler, text = "I would go crazy living in a cage like that." }) keywordHandler:addKeyword({ "offer" }, StdModule.say, { npcHandler = npcHandler, text = "We have nothing that would be of value for you." }) @@ -70,25 +70,38 @@ local function creatureSayCallback(npc, creature, type, message) local AritosTask = player:getStorageValue(Storage.TibiaTales.AritosTask) - -- AritosTask + -- Check if the message contains "arito" if MsgContains(message, "arito") then - if player:getStorageValue(Storage.TibiaTales.AritosTask) == 1 then + if AritosTask == 1 then npcHandler:say({ - "I don't know how something like this ever could be possible. He met a girl from {Ankrahmun} and she must have twisted his head. Arito started to tell stories about the Pharaoh and about Ankrahmun. ...", + "I don't know how something like this ever could be possible. He met a girl from {Ankrahmun} and she must have twisted his head. Arito started to tell stories about the Pharaoh and about {Ankrahmun}. ...", "In the wink of an eye he left us and was never seen again. I think he feared revenge for leaving us - which partially is not without reason. Why are you asking me about him? Did he send you to me?", }, npc, creature) npcHandler:setTopic(playerId, 1) end - elseif npcHandler:getTopic(playerId) == 1 then - if MsgContains(message, "yes") then + -- Check if the message contains "yes" + elseif MsgContains(message, "yes") then + local topic = npcHandler:getTopic(playerId) + if topic == 1 then npcHandler:say({ "Ahh, I know that some of my people fear that Arito tells the old secrets of our race and want to see him dead but I don't bear him a grudge. I will have to have a serious word with my people. ...", "Tell him that he can consider himself as acquitted. He is not the reason for our attacks towards {Ankrahmun}.", }, npc, creature) + npcHandler:setTopic(playerId, 2) + elseif topic == 2 then + npcHandler:say({ + "I appreciate your will to help the sons of the desert. Recently a bunch of thieves have stolen something very valuable from us. It is a secret the true sons kept for aeons and I am not allowed to tell you about it. ...", + "All we know about the thieves is that they have their hideout somewhere in {Ankrahmun}. We managed to catch one of them and he told us that there is a pillar in {Ankrahmun} with a hidden mechanism. ...", + "If you press the eye of the hawk symbol a secret passage will appear that leads to their hideout. Once inside you have to look for a small casket. ...", + "Try to sneak in undetectedly and bring back our treasure as soon as you obtain it. May Daraman hold his protective hand over you on your mission. I wish you good luck. ...", + "One last thing before you leave. Take the path behind me and you will get out of our hideout unharmed.", + }, npc, creature) player:setStorageValue(Storage.TibiaTales.AritosTask, 2) player:setStorageValue(Storage.TibiaTales.AritosTaskDoor, 1) + npcHandler:setTopic(playerId, 0) end end + return true end diff --git a/data-otservbr-global/npc/muriel.lua b/data-otservbr-global/npc/muriel.lua index fdb5d42b5c4..df5d4770ebb 100644 --- a/data-otservbr-global/npc/muriel.lua +++ b/data-otservbr-global/npc/muriel.lua @@ -50,15 +50,6 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end -local function releasePlayer(npc, creature) - if not Player(creature) then - return - end - - npcHandler:removeInteraction(npc, creature) - npcHandler:resetNpc(creature) -end - local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() @@ -70,9 +61,6 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "mission") then if player:getLevel() < 35 then npcHandler:say("Indeed there is something to be done, but I need someone more experienced. Come back later if you want to.", npc, creature) - addEvent(function() - releasePlayer(npc, creature) - end, 1000) return true end @@ -88,9 +76,6 @@ local function creatureSayCallback(npc, creature, type, message) "The rotworms dug deep into the soil north of Thais. Rumours say that you can access a place of endless moaning from there. ...", "No one knows how old that common grave is but the people who died there are cursed and never come to rest. A bone from that pit would be perfect for my studies.", }, npc, creature) - addEvent(function() - releasePlayer(npc, creature) - end, 1000) elseif player:getStorageValue(Storage.TibiaTales.IntoTheBonePit) == 2 then player:setStorageValue(Storage.TibiaTales.IntoTheBonePit, 3) if player:removeItem(131, 1) then @@ -102,33 +87,21 @@ local function creatureSayCallback(npc, creature, type, message) "I thought you have been haunted and killed by the undead. I'm glad that this is not the case. Thank you for your help.", }, npc, creature) end - addEvent(function() - releasePlayer(npc, creature) - end, 1000) else npcHandler:say("I am very glad you helped me, but I am very busy at the moment.", npc, creature) - addEvent(function() - releasePlayer(npc, creature) - end, 1000) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then - player:addItem(4852, 1) - player:setStorageValue(Storage.TibiaTales.IntoTheBonePit, 1) npcHandler:say({ "Great! Here is the container for the bone. Once, I used it to collect ectoplasma of ghosts, but it will work here as well. ...", "If you lose it, you can buy a new one from the explorer's society in North Port or Port Hope. Ask me about the mission when you come back.", }, npc, creature) - addEvent(function() - releasePlayer(npc, creature) - end, 1000) + player:addItem(4852, 1) + player:setStorageValue(Storage.TibiaTales.IntoTheBonePit, 1) end elseif MsgContains(message, "no") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("Ohh, then I need to find another adventurer who wants to earn a great reward. Bye!", npc, creature) - addEvent(function() - releasePlayer(npc, creature) - end, 1000) end end return true diff --git a/data-otservbr-global/npc/nah_bob.lua b/data-otservbr-global/npc/nah_bob.lua index a2511034e06..5514e0a8075 100644 --- a/data-otservbr-global/npc/nah_bob.lua +++ b/data-otservbr-global/npc/nah_bob.lua @@ -85,7 +85,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "cookie") then - if player:getStorageValue(Storage.WhatAFoolish.Questline) == 31 and player:getStorageValue(Storage.WhatAFoolish.CookieDelivery.Djinn) ~= 1 then + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline) == 31 and player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.Djinn) ~= 1 then npcHandler:say("You brought cookies! How nice of you! Can I have one?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -97,7 +97,7 @@ local function creatureSayCallback(npc, creature, type, message) return true end - player:setStorageValue(Storage.WhatAFoolish.CookieDelivery.Djinn, 1) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.Djinn, 1) if player:getCookiesDelivered() == 10 then player:addAchievement("Allow Cookies?") end diff --git a/data-otservbr-global/npc/nezil.lua b/data-otservbr-global/npc/nezil.lua index 5bb7cd4f5fb..260a01bce4e 100644 --- a/data-otservbr-global/npc/nezil.lua +++ b/data-otservbr-global/npc/nezil.lua @@ -80,6 +80,7 @@ npcConfig.shop = { { itemName = "waterskin of water", clientId = 2901, buy = 40, count = 1 }, { itemName = "wooden hammer", clientId = 3459, sell = 15 }, { itemName = "worm", clientId = 3492, buy = 1 }, + { itemName = "vial of water", clientId = 2874, buy = 10, count = 1 }, } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/nilsor.lua b/data-otservbr-global/npc/nilsor.lua index 7de765db4d5..0cedbc0a730 100644 --- a/data-otservbr-global/npc/nilsor.lua +++ b/data-otservbr-global/npc/nilsor.lua @@ -70,22 +70,22 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.TheIceIslands.Questline) == 20 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 20 then npcHandler:say({ "I am in dire need of help. A plague has befallen my dogs. I even called a druid of Carlin for help but all he could do was to recommend some strong medicine ...", "The thing is the ingredients of the medicine are extremely rare and some only exist in far away and distant lands. If you could help me collecting the ingredients, I would be eternally grateful ...", "Are you willing to help me?", }, npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 28 then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 28 then npcHandler:say({ "Thank you. Now I have all necessary ingredients. As a reward I grant you the use of our dog sled, which is located to the east of here. ...", "The dogs can be a bit moody, but if you always carry some ham with you there shouldnt be any problems. Oh, and Hjaern might have a mission for you. So maybe you go and talk to him.", }, npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 29) - player:setStorageValue(Storage.TheIceIslands.Mission07, 1) -- Questlog The Ice Islands Quest, The Secret of Helheim + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 29) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission07, 1) -- Questlog The Ice Islands Quest, The Secret of Helheim npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TheIceIslands.Questline) > 20 and player:getStorageValue(Storage.TheIceIslands.Questline) < 28 then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) > 20 and player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) < 28 then npcHandler:say("What for ingredient do you have?", npc, creature) npcHandler:setTopic(playerId, 0) else @@ -96,12 +96,12 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Do you want to buy a waterskin for 25 gold?", npc, creature) npcHandler:setTopic(playerId, 2) elseif MsgContains(message, "cactus") then - if player:getStorageValue(Storage.TheIceIslands.Questline) == 21 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 21 then npcHandler:say("You will find this kind of cactus at places that are called deserts. Only an ordinary kitchen knife will be precise enough to produce the ingredient weneed. Do you have a part of that cactus with you?", npc, creature) npcHandler:setTopic(playerId, 3) end elseif MsgContains(message, "water") then - if player:getStorageValue(Storage.TheIceIslands.Questline) == 22 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 22 then npcHandler:say({ "You will need a specially prepared waterskin to collect the water. You can buy one from me ...", "Use it on a geyser that is NOT active. The water of active geysers is far too hot. You can find inactive geysers on Okolnir. Do you have some geyser water with you?", @@ -109,27 +109,27 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 4) end elseif MsgContains(message, "sulphur") then - if player:getStorageValue(Storage.TheIceIslands.Questline) == 23 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 23 then npcHandler:say("I need fine sulphur of an inactive lava hole. No other sulphur will do. Use an ordinary kitchen spoon on an inactive lava hole. Do you have fine sulphur with you?", npc, creature) npcHandler:setTopic(playerId, 5) end elseif MsgContains(message, "herb") then - if player:getStorageValue(Storage.TheIceIslands.Questline) == 24 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 24 then npcHandler:say("The frostbite herb is a local plant but its quite rare. You can find it on mountain peaks. You will need to cut it with a fine kitchen knife. Do you have a frostbite herb with you?", npc, creature) npcHandler:setTopic(playerId, 6) end elseif MsgContains(message, "blossom") then - if player:getStorageValue(Storage.TheIceIslands.Questline) == 25 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 25 then npcHandler:say("The purple kiss is a plant that grows in a place called jungle. You will have to use a kitchen knife to harvest its blossom. Do you have a blossom of a purple kiss with you?", npc, creature) npcHandler:setTopic(playerId, 7) end elseif MsgContains(message, "hydra tongue") then - if player:getStorageValue(Storage.TheIceIslands.Questline) == 26 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 26 then npcHandler:say("The hydra tongue is a common pest plant in warmer regions. You might find one in a shop. Do you have a hydra tongue with you?", npc, creature) npcHandler:setTopic(playerId, 8) end elseif MsgContains(message, "spores") then - if player:getStorageValue(Storage.TheIceIslands.Questline) == 27 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 27 then npcHandler:say("The giant glimmercap mushroom exists in caves and other preferably warm and humid places. Use an ordinary kitchen spoon on a mushroom to collectits spores. Do you have the glimmercap spores?", npc, creature) npcHandler:setTopic(playerId, 9) end @@ -140,8 +140,8 @@ local function creatureSayCallback(npc, creature, type, message) "I need a part of the sun adorer cactus, a vial of geyser water, sulphur of a lava hole, a frostbite herb, a blossom of a purple kiss, a hydra tongue and spores of a giant glimmercap mushroom ...", "Turn them in individually by talking about them to me. As soon as I obtained them all, talk to me about the medicine. First time bring a Part of the Sun Adorer {Cactus}.", }, npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 21) - player:setStorageValue(Storage.TheIceIslands.Mission06, 1) -- Questlog The Ice Islands Quest, Nibelor 5: Cure the Dogs + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 21) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission06, 1) -- Questlog The Ice Islands Quest, Nibelor 5: Cure the Dogs npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then if player:getMoney() + player:getBankBalance() >= 25 then @@ -155,8 +155,8 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 3 then if player:removeItem(7245, 1) then npcHandler:say("Thank you for this ingredient. Now bring me Geyser {Water} in a Waterskin. ", npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 22) - player:setStorageValue(Storage.TheIceIslands.Mission06, 2) -- Questlog The Ice Islands Quest, Nibelor 5: Cure the Dogs + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 22) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission06, 2) -- Questlog The Ice Islands Quest, Nibelor 5: Cure the Dogs else npcHandler:say("Come back when you have the ingredient.", npc, creature) end @@ -164,8 +164,8 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 4 then if player:removeItem(7246, 1) then npcHandler:say("Thank you for this ingredient. Now bring me Fine {Sulphur}.", npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 23) - player:setStorageValue(Storage.TheIceIslands.Mission06, 3) -- Questlog The Ice Islands Quest, Nibelor 5: Cure the Dogs + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 23) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission06, 3) -- Questlog The Ice Islands Quest, Nibelor 5: Cure the Dogs else npcHandler:say("Come back when you have the ingredient.", npc, creature) end @@ -173,8 +173,8 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 5 then if player:removeItem(7247, 1) then npcHandler:say("Thank you for this ingredient. Now bring me the Frostbite {Herb}", npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 24) - player:setStorageValue(Storage.TheIceIslands.Mission06, 4) -- Questlog The Ice Islands Quest, Nibelor 5: Cure the Dogs + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 24) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission06, 4) -- Questlog The Ice Islands Quest, Nibelor 5: Cure the Dogs else npcHandler:say("Come back when you have the ingredient.", npc, creature) end @@ -182,8 +182,8 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 6 then if player:removeItem(7248, 1) then npcHandler:say("Thank you for this ingredient Now bring me Purple Kiss {Blossom}.", npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 25) - player:setStorageValue(Storage.TheIceIslands.Mission06, 5) -- Questlog The Ice Islands Quest, Nibelor 5: Cure the Dogs + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 25) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission06, 5) -- Questlog The Ice Islands Quest, Nibelor 5: Cure the Dogs else npcHandler:say("Come back when you have the ingredient.", npc, creature) end @@ -191,8 +191,8 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 7 then if player:removeItem(7249, 1) then npcHandler:say("Thank you for this ingredient. Now bring me the {Hydra Tongue}", npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 26) - player:setStorageValue(Storage.TheIceIslands.Mission06, 6) -- Questlog The Ice Islands Quest, Nibelor 5: Cure the Dogs + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 26) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission06, 6) -- Questlog The Ice Islands Quest, Nibelor 5: Cure the Dogs else npcHandler:say("Come back when you have the ingredient. ", npc, creature) end @@ -200,8 +200,8 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 8 then if player:removeItem(7250, 1) then npcHandler:say("Thank you for this ingredient. Now bring me {Spores} of a Giant Glimmercap Mushroom.", npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 27) - player:setStorageValue(Storage.TheIceIslands.Mission06, 7) -- Questlog The Ice Islands Quest, Nibelor 5: Cure the Dogs + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 27) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission06, 7) -- Questlog The Ice Islands Quest, Nibelor 5: Cure the Dogs else npcHandler:say("Come back when you have the ingredient.", npc, creature) end @@ -209,8 +209,8 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 9 then if player:removeItem(7251, 1) then npcHandler:say("Thank you for this ingredient. Now you finish your {mission}", npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 28) - player:setStorageValue(Storage.TheIceIslands.Mission06, 8) -- Questlog The Ice Islands Quest, Nibelor 5: Cure the Dogs + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 28) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission06, 8) -- Questlog The Ice Islands Quest, Nibelor 5: Cure the Dogs else npcHandler:say("Come back when you have the ingredient.", npc, creature) end diff --git a/data-otservbr-global/npc/nokmir.lua b/data-otservbr-global/npc/nokmir.lua index 672875fa9c1..8507783df47 100644 --- a/data-otservbr-global/npc/nokmir.lua +++ b/data-otservbr-global/npc/nokmir.lua @@ -58,12 +58,12 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.HiddenCityOfBeregar.JusticeForAll) < 1 then + if player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.JusticeForAll) < 1 then npcHandler:say("I don't see how you could help me. I'm in deep, deep trouble. I'm accused of having stolen a {ring} from Rerun, but I haven't.", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.HiddenCityOfBeregar.JusticeForAll) == 5 then - player:setStorageValue(Storage.HiddenCityOfBeregar.JusticeForAll, 6) - player:setStorageValue(Storage.HiddenCityOfBeregar.DoorNorthMine, 1) + elseif player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.JusticeForAll) == 5 then + player:setStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.JusticeForAll, 6) + player:setStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.DoorNorthMine, 1) npcHandler:say("WHAT?! I can't believe it. You saved my life... well, at least one week of it 'cause that would have been the time I had to spend in jail. If you want to, you can pass the door now and take a look at the northern mines. Have fun!", npc, creature) end elseif MsgContains(message, "ring") then @@ -86,8 +86,8 @@ local function creatureSayCallback(npc, creature, type, message) end elseif MsgContains(message, "rehal") then if npcHandler:getTopic(playerId) == 4 then - player:setStorageValue(Storage.HiddenCityOfBeregar.DefaultStart, 1) - player:setStorageValue(Storage.HiddenCityOfBeregar.JusticeForAll, 1) + player:setStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.DefaultStart, 1) + player:setStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.JusticeForAll, 1) npcHandler:say("He's a good emperor but I doubt he is wise enough to see the truth behind that false accusation against me. If just someone would find out the truth about that whole mess.", npc, creature) npcHandler:setTopic(playerId, 0) end diff --git a/data-otservbr-global/npc/nor.lua b/data-otservbr-global/npc/nor.lua index d055f44a092..5245e59888e 100644 --- a/data-otservbr-global/npc/nor.lua +++ b/data-otservbr-global/npc/nor.lua @@ -59,11 +59,11 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "crystal") then - if player:getStorageValue(Storage.TheIceIslands.Mission08) == 2 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission08) == 2 then npcHandler:say("Here, take the memory crystal and leave immediately.", npc, creature) npcHandler:setTopic(playerId, 0) player:addItem(7281, 1) - player:setStorageValue(Storage.TheIceIslands.Mission08, 3) -- Questlog The Ice Islands Quest, The Contact + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission08, 3) -- Questlog The Ice Islands Quest, The Contact end end return true diff --git a/data-otservbr-global/npc/norma.lua b/data-otservbr-global/npc/norma.lua index 693dc7fadbb..769bf7b7b3f 100644 --- a/data-otservbr-global/npc/norma.lua +++ b/data-otservbr-global/npc/norma.lua @@ -200,6 +200,9 @@ npcConfig.shop = { { itemName = "mug of milk", clientId = 2880, buy = 2, count = 6 }, { itemName = "mug of wine", clientId = 2880, buy = 3, count = 2 }, { itemName = "party cake", clientId = 6279, buy = 50 }, + { itemName = "vial of beer", clientId = 2874, buy = 3, count = 1, subType = 3 }, + { itemName = "vial of wine", clientId = 2874, buy = 3, count = 1, subType = 2 }, + { itemName = "vial of milk", clientId = 2874, buy = 2, count = 1, subType = 9 }, } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/nurik.lua b/data-otservbr-global/npc/nurik.lua index 6bb40ce48c4..0c190a72d94 100644 --- a/data-otservbr-global/npc/nurik.lua +++ b/data-otservbr-global/npc/nurik.lua @@ -54,7 +54,7 @@ local function greetCallback(npc, creature) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.ThievesGuild.Mission04) ~= 6 or player:getOutfit().lookType ~= 66 then + if player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission04) ~= 6 or player:getOutfit().lookType ~= 66 then npcHandler:say("Excuse me, but I'm waiting for someone important!", npc, creature) return false end @@ -90,13 +90,12 @@ local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) if player:removeItem(7866, 1) then player:addItem(7871, 1) - player:setStorageValue(Storage.ThievesGuild.Mission04, 7) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission04, 7) npcHandler:say({ "Excellent! Here is the painting you requested. It's quite precious to my father, but imagine his joy when I tell him about my clever deal! ...", "Now leave me alone please. I have to prepare for my departure. Now my family will not call me a squandering fool anymore!", }, npc, creature) - npcHandler:removeInteraction(npc, creature) - npcHandler:resetNpc(creature) + npcHandler:setTopic(playerId, 0) end end end @@ -104,6 +103,7 @@ local function creatureSayCallback(npc, creature, type, message) end npcHandler:setMessage(MESSAGE_GREET, "It's .. It's YOU! At last!! So what's this special proposal you would like to make, my friend?") + npcHandler:setCallback(CALLBACK_GREET, greetCallback) npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/oldrak.lua b/data-otservbr-global/npc/oldrak.lua index cc064dfd8c6..d4a0ffdb82f 100644 --- a/data-otservbr-global/npc/oldrak.lua +++ b/data-otservbr-global/npc/oldrak.lua @@ -100,31 +100,31 @@ local function creatureSayCallback(npc, creature, type, message) -- Demon oak quest if MsgContains(message, "mission") or MsgContains(message, "demon oak") then - if player:getStorageValue(Storage.DemonOak.Done) < 1 then + if player:getStorageValue(Storage.Quest.U8_2.TheDemonOak.Done) < 1 then npcHandler:say("How do you know? Did you go into the infested area?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.DemonOak.Progress) == 2 and player:getStorageValue(Storage.DemonOak.Done) < 1 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheDemonOak.Progress) == 2 and player:getStorageValue(Storage.Quest.U8_2.TheDemonOak.Done) < 1 then npcHandler:say("You better don't return here until you've defeated the Demon Oak.", npc, creature) - elseif player:getStorageValue(Storage.DemonOak.Done) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheDemonOak.Done) == 1 then npcHandler:say({ "You chopped down the demon oak?!? Unbelievable!! Let's hope it doesn't come back. As long as evil is still existent in the soil of the plains, it won't be over. Still, the demons suffered a setback, that's for sure. ...", "For your brave action, I tell you a secret which has been kept for many many years. There is an old house south of the location where you found the demon oak. There should be a grave with the name 'Yesim Adeit' somewhere close by. ...", "It belongs to a Daramian nobleman named 'Teme Saiyid'. I knew him well and he told me -almost augured- that someone will come who is worthy to obtain his treasure. I'm sure this 'someone' is you. Good luck in finding it!", }, npc, creature) - player:setStorageValue(Storage.DemonOak.Done, 2) + player:setStorageValue(Storage.Quest.U8_2.TheDemonOak.Done, 2) end elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 1 then - player:setStorageValue(Storage.DemonOak.Progress, 1) - if player:getStorageValue(Storage.DemonOak.Progress) == 1 then + player:setStorageValue(Storage.Quest.U8_2.TheDemonOak.Progress, 1) + if player:getStorageValue(Storage.Quest.U8_2.TheDemonOak.Progress) == 1 then npcHandler:say("A demon oak?!? May the gods be on our side. You'll need a {hallowed axe} to harm that tree. Bring me a simple {axe} and I'll prepare it for you.", npc, creature) - player:setStorageValue(Storage.DemonOak.Progress, 2) + player:setStorageValue(Storage.Quest.U8_2.TheDemonOak.Progress, 2) npcHandler:setTopic(playerId, 0) else npcHandler:say("I don't believe a word of it! How rude to lie to a monk!", npc, creature) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "axe") then - if player:getStorageValue(Storage.DemonOak.Progress) == 2 then + if player:getStorageValue(Storage.Quest.U8_2.TheDemonOak.Progress) == 2 then npcHandler:say("Ahh, you've got an axe. Very good. I can make a hallowed axe out of it. It will cost you... er... a donation of 1,000 gold. Alright?", npc, creature) npcHandler:setTopic(playerId, 2) else @@ -132,7 +132,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 2 then - if player:getStorageValue(Storage.DemonOak.Progress) == 2 then + if player:getStorageValue(Storage.Quest.U8_2.TheDemonOak.Progress) == 2 then if player:getMoney() + player:getBankBalance() >= 1000 then if player:removeItem(3274, 1) and player:removeMoneyBank(1000) then npcHandler:say("Let's see........here we go. The blessing on this axe will be absorbed by all the demonic energy around here. I presume it will not last very long, so better hurry. Actually, I can refresh the blessing as often as you like.", npc, creature) diff --git a/data-otservbr-global/npc/oliver.lua b/data-otservbr-global/npc/oliver.lua index 5cda196805f..193514c20ac 100644 --- a/data-otservbr-global/npc/oliver.lua +++ b/data-otservbr-global/npc/oliver.lua @@ -59,10 +59,10 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "report") then - if player:getStorageValue(Storage.InServiceofYalahar.Questline) == 8 or player:getStorageValue(Storage.InServiceofYalahar.Questline) == 12 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 8 or player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 12 then npcHandler:say("Nobody knows the trouble I've seen .. . ", npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, player:getStorageValue(Storage.InServiceofYalahar.Questline) + 1) - player:setStorageValue(Storage.InServiceofYalahar.Mission02, player:getStorageValue(Storage.InServiceofYalahar.Mission02) + 1) -- StorageValue for Questlog "Mission 02: Watching the Watchmen" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) + 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission02, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission02) + 1) -- StorageValue for Questlog "Mission 02: Watching the Watchmen" npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "pass") then diff --git a/data-otservbr-global/npc/ongulf.lua b/data-otservbr-global/npc/ongulf.lua index 9dd2cc38e90..aff4fe2df5e 100644 --- a/data-otservbr-global/npc/ongulf.lua +++ b/data-otservbr-global/npc/ongulf.lua @@ -95,24 +95,21 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say({ " Well, we have found this place here full of promising resources and plan to create a new mining outpost. Of course this takes a lot of effort and organisation. ...", "For some of the tasks at hand we need help, even from outsiders like you. So if you are interested in some missions, let me know.", - "Listen, I can handle the organisation down here and my boys will handle the construction of the base fine enough. Actually, all you do down here is to stand in the workers' way. ...", - "But there might be something for you to do outside the base. We need to learn more about the land up there. Take the lift and do some exploring. Find a passage leading out of the mountains. ...", - "Do not explore any further though. You never know whom you might be messing with.", }, npc, creature) - player:setStorageValue(TheNewFrontier.Questline, 1) - player:setStorageValue(TheNewFrontier.Mission01, 1) -- Questlog, The New Frontier Quest "Mission 01: New Land" - npcHandler:setTopic(playerId, 0) + npcHandler:setTopic(playerId, 2) end elseif MsgContains(message, "mission") then - if player:getStorageValue(TheNewFrontier.Questline) < 1 and npcHandler:getTopic(playerId) == 2 then - npcHandler:say({ - "Listen, I can handle the organisation down here and my boys will handle the construction of the base fine enough. Actually, all you do down here is to stand in the workers' way. ...", - "But there might be something for you to do outside the base. We need to learn more about the land up there. Take the lift and do some exploring. Find a passage leading out of the mountains. ...", - "Do not explore any further though. You never know whom you might be messing with.", - }, npc, creature) - player:setStorageValue(TheNewFrontier.Questline, 1) - player:setStorageValue(TheNewFrontier.Mission01, 1) -- Questlog, The New Frontier Quest "Mission 01: New Land" - npcHandler:setTopic(playerId, 0) + if npcHandler:getTopic(playerId) == 2 then + if player:getStorageValue(TheNewFrontier.Questline) < 1 and npcHandler:getTopic(playerId) == 2 then + npcHandler:say({ + "Listen, I can handle the organisation down here and my boys will handle the construction of the base fine enough. Actually, all you do down here is to stand in the workers' way. ...", + "But there might be something for you to do outside the base. We need to learn more about the land up there. Take the lift and do some exploring. Find a passage leading out of the mountains. ...", + "Do not explore any further though. You never know whom you might be messing with.", + }, npc, creature) + player:setStorageValue(TheNewFrontier.Questline, 1) + player:setStorageValue(TheNewFrontier.Mission01, 1) -- Questlog, The New Frontier Quest "Mission 01: New Land" + npcHandler:setTopic(playerId, 0) + end elseif player:getStorageValue(TheNewFrontier.Questline) == 2 then npcHandler:say("Excellent. Although we have no idea what awaits us in this foreign land, it is always good to know something more about our surroundings.", npc, creature) player:setStorageValue(TheNewFrontier.Questline, 3) @@ -142,7 +139,10 @@ local function creatureSayCallback(npc, creature, type, message) player:setStorageValue(TheNewFrontier.Mission03, 1) -- Questlog, The New Frontier Quest "Mission 03: Strangers in the Night" npcHandler:setTopic(playerId, 0) elseif player:getStorageValue(TheNewFrontier.Questline) == 9 then - npcHandler:say({ "Primitive humans you say? These are most startling news, that's for sure. Well, I guess I'll send some victuals we can spare as a sign of our good will. ...", "However, our miners encountered another problem in the meantime. I'm afraid this will be your next {mission}" }, npc, creature) + npcHandler:say({ + "Primitive humans you say? These are most startling news, that's for sure. Well, I guess I'll send some victuals we can spare as a sign of our good will. ...", + "However, our miners encountered another problem in the meantime. I'm afraid this will be your next {mission}", + }, npc, creature) player:setStorageValue(TheNewFrontier.Questline, 10) player:setStorageValue(TheNewFrontier.Mission03, 3) -- Questlog, The New Frontier Quest "Mission 03: Strangers in the Night" npcHandler:setTopic(playerId, 0) @@ -242,9 +242,6 @@ local function creatureSayCallback(npc, creature, type, message) "Oh and one last thing: We convinced a carpet pilot to join us here. You'll find him on top of our lift in the mountains. I think he can offer you fast access to some cities back home.", }, npc, creature) player:addExperience(8000, true) - player:addOutfit(335) - player:addOutfit(336) - player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) player:setStorageValue(TheNewFrontier.Questline, 29) player:setStorageValue(TheNewFrontier.Mission10[1], 2) -- Questlog, "Mission 10: New Horizons" player:setStorageValue(TheNewFrontier.Mission10.MagicCarpetDoor, 1) diff --git a/data-otservbr-global/npc/ortheus.lua b/data-otservbr-global/npc/ortheus.lua index f688d51cda8..ccd9097e881 100644 --- a/data-otservbr-global/npc/ortheus.lua +++ b/data-otservbr-global/npc/ortheus.lua @@ -55,7 +55,7 @@ local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() if message == "cookie" then - if player:getStorageValue(BloodBrothers.Mission02) == 1 and player:getItemCount(8199) > 0 and player:getStorageValue(BloodBrothers.Cookies.Ortheus) < 0 then + if player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission02) == 1 and player:getItemCount(8199) > 0 and player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Ortheus) < 0 then npcHandler:say("A cookie? Well... I have to admit I haven't had one for ages. Can I have it?", npc, creature) npcHandler:setTopic(playerId, 1) else @@ -64,7 +64,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif message == "yes" then if npcHandler:getTopic(playerId) == 1 and player:removeItem(8199, 1) then -- garlic cookie npcHandler:say("Well thanks, it looks tasty, I'll just take a bi - COUGH! Are you trying to poison me?? Get out of here before I forget myself!", npc, creature) - player:setStorageValue(BloodBrothers.Cookies.Ortheus, 1) + player:setStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Ortheus, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then if player:removeItem(2880, 17) then -- mug of tea @@ -100,7 +100,7 @@ keywordHandler:addKeyword({ "serafin" }, StdModule.say, { npcHandler = npcHandle keywordHandler:addKeyword({ "yalahar" }, StdModule.say, { npcHandler = npcHandler, text = "Though the city has seen better days, the quality of life is still much better than in most other cities." }) keywordHandler:addKeyword({ "quarter" }, StdModule.say, { npcHandler = npcHandler, text = "I can't imagine a better place to live" }) keywordHandler:addKeyword({ "alori mort" }, StdModule.say, { npcHandler = npcHandler, text = "Whatever that's supposed to mean." }, function(player) - return player:getStorageValue(BloodBrothers.Mission03) == 1 + return player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission03) == 1 end) keywordHandler:addKeyword({ "reward" }, StdModule.say, { npcHandler = npcHandler, text = "I don't have anything that I could give you as a reward. Guess you aren't so selfless after all, huh?" }) keywordHandler:addKeyword({ "augur" }, StdModule.say, { npcHandler = npcHandler, text = "They try to protect the city and do a decent job. Well - no, a poor job, I mean a poor job." }) diff --git a/data-otservbr-global/npc/oswald.lua b/data-otservbr-global/npc/oswald.lua index 2f9ca00cbda..e8c47aa165d 100644 --- a/data-otservbr-global/npc/oswald.lua +++ b/data-otservbr-global/npc/oswald.lua @@ -92,7 +92,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "invitation") then - if player:getStorageValue(Storage.ThievesGuild.Mission03) == 1 then + if player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission03) == 1 then npcHandler:say("What? So why in the world should I give you an invitation? It's not as if you were someone important, are you?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -103,7 +103,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 3 then if player:removeMoneyBank(1000) then player:addItem(7933, 1) - player:setStorageValue(Storage.ThievesGuild.Mission03, 2) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission03, 2) npcHandler:say("Excellent! Here is your invitation!", npc, creature) else npcHandler:say("You don't have enough money.", npc, creature) diff --git a/data-otservbr-global/npc/palimuth.lua b/data-otservbr-global/npc/palimuth.lua index 10b77930451..80a292828ca 100644 --- a/data-otservbr-global/npc/palimuth.lua +++ b/data-otservbr-global/npc/palimuth.lua @@ -58,27 +58,27 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if player:getStorageValue(Storage.InServiceofYalahar.Questline) < 1 then - player:setStorageValue(Storage.InServiceofYalahar.Questline, 3) + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) < 1 then + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 3) end - if MsgContains(message, "job") and not player:getStorageValue(Storage.InServiceofYalahar.Questline) == 54 then + if MsgContains(message, "job") and not player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 54 then npcHandler:say("I'm an Augur of the city of Yalahar. My special duty consists of coordinating the efforts to keep the city and its services running.", npc, creature) elseif MsgContains(message, "job") then - if player:getStorageValue(Storage.InServiceofYalahar.Questline) == 54 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 54 then npcHandler:say("Did you bring me the vampiric crest?", npc, creature) npcHandler:setTopic(playerId, 6) end elseif MsgContains(message, "mission") then - if player:getStorageValue(Storage.InServiceofYalahar.Questline) == 3 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 3 then npcHandler:say({ "You probably heard that we have numerous problems in different quarters of our city. Our forces are limited, so we really could need some help from outsiders. ...", "Would you like to assist us in re-establishing order in our city?", }, npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 4 then - player:setStorageValue(Storage.InServiceofYalahar.Mission01, 1) -- StorageValue for Questlog "Mission 01: Something Rotten" - player:setStorageValue(Storage.InServiceofYalahar.Questline, 5) + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 4 then + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission01, 1) -- StorageValue for Questlog "Mission 01: Something Rotten" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 5) npcHandler:say({ "I hope your first mission will not scare you off. Even though, we cut off our sewer system from other parts of the city to prevent the worst, it still has deteriorated in the last decades. ...", "Certain parts of the controls are rusty and the drains are stuffed with garbage. Get yourself a crowbar, loosen the controls and clean the pipes from the garbage. ...", @@ -89,153 +89,159 @@ local function creatureSayCallback(npc, creature, type, message) player:addMapMark(Position(32842, 31250, 8), 4, "Sewer Problem 3") player:addMapMark(Position(32796, 31192, 8), 4, "Sewer Problem 4") npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 5 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 5 then npcHandler:say("So are you done with your work?", npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 6 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 6 then npcHandler:say({ "We are still present at each quarter's city wall, even though we can do little to stop the chaos from spreading. Still, our garrisons are necessary to maintain some sort of order in the city. ...", "My superiors ask for a first hand report about the current situation in the single city quarters. I need someone to travel to our garrisons to get the reports from the guards. Are you willing to do that?", }, npc, creature) npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) >= 7 and player:getStorageValue(Storage.InServiceofYalahar.Questline) <= 14 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) >= 7 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) <= 14 then npcHandler:say("Did you get all the reports my superiors asked for? ", npc, creature) npcHandler:setTopic(playerId, 4) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 15 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 15 then npcHandler:say({ "I did my best to impress my superiors with your accomplishments and it seems that it worked quite well. They want you for their own missions now. ...", "Missions that are more important than the ones you've fulfilled for me. However, before you leave, there are still some things I need to tell you. ...", "Listen, I can't explain you everything in detail right now and here. You never know who might be eavesdropping. ...", "I left some notes in the small room there. Get them and read them. Talk to me again when you've read the notes.", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Mission03, 1) -- StorageValue for Questlog "Mission 03: Death to the Deathbringer" - player:setStorageValue(Storage.InServiceofYalahar.Questline, 16) - player:setStorageValue(Storage.InServiceofYalahar.NotesPalimuth, 0) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission03, 1) -- StorageValue for Questlog "Mission 03: Death to the Deathbringer" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 16) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.NotesPalimuth, 1) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.NotesPalimuth) == 1 and player:getStorageValue(Storage.InServiceofYalahar.Questline) == 16 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.NotesPalimuth) == 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 16 then npcHandler:say({ "Now you know as much as we do about the things happening in Yalahar. It's up to you what you do with this information. ...", "Now leave and talk to my superior Azerus in the city centre to get your next mission. I urge you, though, to talk to me whenever he sends you on a new mission. ...", "I think it is important that you hear my opinion about them. Now hurry. I suppose Azerus is already waiting.", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Mission03, 2) -- StorageValue for Questlog "Mission 03: Death to the Deathbringer" - player:setStorageValue(Storage.InServiceofYalahar.Questline, 17) - player:setStorageValue(Storage.InServiceofYalahar.DoorToAzerus, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission03, 2) -- StorageValue for Questlog "Mission 03: Death to the Deathbringer" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 17) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.DoorToAzerus, 1) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 20 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 20 then npcHandler:say({ "This quarter has been sealed off years ago. To send someone there poses a high risk to spread the plague. I assume these research notes you've mentioned must be very important. ...", "After all those years it is more than strange that someone shows interest in these notes now. Considering what has happened to the alchemists, it is rather unlikely that they contain harmless information. ...", "I fear these notes will be used to turn the plague into some kind of weapon. Someone with this plague at his disposal could subdue the whole city by blackmailing. ...", "I beg you to destroy these notes. Just put them into some burning oven to get rid of them and report that you did not find the notes.", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 21) - player:setStorageValue(Storage.InServiceofYalahar.DoorToBog, 1) - player:setStorageValue(Storage.InServiceofYalahar.Mission03, 5) -- StorageValue for Questlog "Mission 03: Death to the Deathbringer" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 21) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.DoorToBog, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission03, 5) -- StorageValue for Questlog "Mission 03: Death to the Deathbringer" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 23 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 23 then npcHandler:say({ "Mr. West is a little paranoid. That's the reason for his immense private army of bodyguards. He could surely be helpful, especially as he rules over the former trade quarter. ...", "If you were able to reach him without killing his henchmen, you could probably convince him that you mean no harm to him. ...", "That would certainly cement our relationship without any needless bloodshed. Perhaps you could use the way through the sewers to avoid his men. ...", "Mr. West is not a bad man. We should be able to work out some plans to reconstruct the city's safety as soon as he overcomes his paranoia towards us.", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 24) - player:setStorageValue(Storage.InServiceofYalahar.Mission04, 2) -- StorageValue for Questlog "Mission 04: Good to be Kingpin" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 24) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission04, 2) -- StorageValue for Questlog "Mission 04: Good to be Kingpin" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 25 and player:getStorageValue(Storage.InServiceofYalahar.MrWestStatus) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 25 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.MrWestStatus) == 1 then npcHandler:say({ "You did quite well in gaining a new friend who will work together with us. ...", "I'm sure he'll still try to gain some profit but that's still better than his former one-man rule during which he dictated his own laws.", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.GoodSide, player:getStorageValue(Storage.InServiceofYalahar.GoodSide) >= 0 and player:getStorageValue(Storage.InServiceofYalahar.GoodSide) + 1 or 0) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 26) - player:setStorageValue(Storage.InServiceofYalahar.Mission04, 5) -- StorageValue for Questlog "Mission 04: Good to be Kingpin" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.GoodSide, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.GoodSide) >= 0 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.GoodSide) + 1 or 0) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 26) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission04, 5) -- StorageValue for Questlog "Mission 04: Good to be Kingpin" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 28 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 28 then npcHandler:say({ "Warbeasts? Is this true? People are already starving. ...", "How can we afford to feed an army of hungry beasts? They will not only strengthen the power of the Yalahari over the citizens, they also mean starvation and deathfor the poor. ...", "Instead of breeding warbeasts, this druid should breed cattle to feed our people. Please I beg you, convince him to do that!", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 29) - player:setStorageValue(Storage.InServiceofYalahar.TamerinStatus, 0) - player:setStorageValue(Storage.InServiceofYalahar.Mission05, 2) -- StorageValue for Questlog "Mission 05: Food or Fight" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 29) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.TamerinStatus, 0) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission05, 2) -- StorageValue for Questlog "Mission 05: Food or Fight" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 32 and player:getStorageValue(Storage.InServiceofYalahar.TamerinStatus) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 32 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.TamerinStatus) == 1 then npcHandler:say("These are great news indeed. The people of Yalahar will be grateful. The Yalahari probably not, so take care of yourself. ", npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.GoodSide, player:getStorageValue(Storage.InServiceofYalahar.GoodSide) >= 0 and player:getStorageValue(Storage.InServiceofYalahar.GoodSide) + 1 or 0) -- Side Storage - player:setStorageValue(Storage.InServiceofYalahar.Questline, 33) - player:setStorageValue(Storage.InServiceofYalahar.Mission05, 8) -- StorageValue for Questlog "Mission 05: Food or Fight" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.GoodSide, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.GoodSide) >= 0 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.GoodSide) + 1 or 0) -- Side Storage + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 33) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission05, 8) -- StorageValue for Questlog "Mission 05: Food or Fight" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 35 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 32 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.TamerinStatus) == 2 then + npcHandler:say("Rumours travel fast in Yalahar. So the Yalahari will soon have some new toys at their disposal. I strongly doubt this has any positive effect.", npc, creature) + npcHandler:setTopic(playerId, 0) + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 35 then npcHandler:say({ "What a sick idea to misuse tortured souls to power some device! Though, this charm might be useful to free these poor souls. ...", "Please capture the souls as you have been instructed and then bring the charm to me. I will see to it that the souls are freed to go to the afterlife in peace.", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 36) - player:setStorageValue(Storage.InServiceofYalahar.Mission06, 2) -- StorageValue for Questlog "Mission 06: Frightening Fuel" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 36) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission06, 2) -- StorageValue for Questlog "Mission 06: Frightening Fuel" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 37 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 37 then if player:removeItem(8827, 1) then npcHandler:say({ "I thank you also in the name of these poor lost souls. I will send the charm to a priest who is able to release them. ...", "Tell the Yalahari that the charm was destroyed by the energy it contained.", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 38) - player:setStorageValue(Storage.InServiceofYalahar.Mission06, 4) -- StorageValue for Questlog "Mission 06: Frightening Fuel" - player:setStorageValue(Storage.InServiceofYalahar.QuaraState, 1) - player:setStorageValue(Storage.InServiceofYalahar.GoodSide, player:getStorageValue(Storage.InServiceofYalahar.GoodSide) >= 0 and player:getStorageValue(Storage.InServiceofYalahar.GoodSide) + 1 or 0) -- Side Storage + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 38) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission06, 4) -- StorageValue for Questlog "Mission 06: Frightening Fuel" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.QuaraState, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.GoodSide, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.GoodSide) >= 0 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.GoodSide) + 1 or 0) -- Side Storage npcHandler:setTopic(playerId, 0) end - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 40 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 40 then npcHandler:say({ "The quara are indeed a threat. Yet, they are numerous and reproduce quickly. Slaying some of them will only enrage them even more. ...", "The quara have been there for many generations. They have never threatened anyone who stayed out of their watery realm. ...", "It would be much more useful to find out what the quara are so upset about. Better avoid slaying their leaders as this will only further the animosities.", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 41) - player:setStorageValue(Storage.InServiceofYalahar.DoorToQuara, 1) - player:setStorageValue(Storage.InServiceofYalahar.Mission07, 2) -- StorageValue for Questlog "Mission 07: A Fishy Mission" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 41) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.DoorToQuara, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission07, 2) -- StorageValue for Questlog "Mission 07: A Fishy Mission" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 42 and player:getStorageValue(Storage.InServiceofYalahar.QuaraState) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 42 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.QuaraState) == 1 then npcHandler:say("Oh no! So that's the reason for the quara attacks! I will do my best to close these sewage pipes. We will have to use other drains. ", npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 43) - player:setStorageValue(Storage.InServiceofYalahar.Mission07, 5) -- StorageValue for Questlog "Mission 07: A Fishy Mission" - player:setStorageValue(Storage.InServiceofYalahar.GoodSide, player:getStorageValue(Storage.InServiceofYalahar.GoodSide) >= 0 and player:getStorageValue(Storage.InServiceofYalahar.GoodSide) + 1 or 0) -- Side Storage + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 43) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission07, 5) -- StorageValue for Questlog "Mission 07: A Fishy Mission" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.GoodSide, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.GoodSide) >= 0 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.GoodSide) + 1 or 0) -- Side Storage npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 44 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 44 then npcHandler:say({ "The constant unrest in the city is to a great extent caused by the lack of food. Weapons will only serve to suppress the poor. ...", "The factory you were sent to was once used for the production of food. Somewhere in the factory you might find an old pattern crystal for the production of food. ...", "If you use it on the controls instead of the weapon pattern, you will ensure that our people are supplied with the desperately needed food. ...", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 45) - player:setStorageValue(Storage.InServiceofYalahar.DoorToMatrix, 1) - player:setStorageValue(Storage.InServiceofYalahar.Mission08, 2) -- StorageValue for Questlog "Mission 08: Dangerous Machinations" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 45) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.DoorToMatrix, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission08, 2) -- StorageValue for Questlog "Mission 08: Dangerous Machinations" + npcHandler:setTopic(playerId, 0) + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 46 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.MatrixState) == 1 then + npcHandler:say("You can be proud of your decision, my friend.", npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 48 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 48 then npcHandler:say({ "Listen, I know you have worked for Azerus and his friends, but it is not too late to change your mind! I beg you to rethink your loyalties. ...", "The fate of the whole city might depend on your decision! Think about your options carefully.", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 49) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 49) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 49 or player:getStorageValue(Storage.InServiceofYalahar.Questline) == 48 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 49 or player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 48 then npcHandler:say("So do you want to side with me? ", npc, creature) npcHandler:setTopic(playerId, 5) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 50 and player:getStorageValue(Storage.InServiceofYalahar.SideDecision) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 50 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SideDecision) == 1 then npcHandler:say({ "I cannot tell you how we acquired this information, but we have heard that a circle of Yalahari is planning some kind of ritual. ...", "They plan to create a portal for some powerful demons and to unleash them in the city to 'purge' it once and for all. ...", "I doubt those poor fools will be able to control such entities. I can't figure out how they came up with such an insane idea, but they have to be stopped. ...", "The entrance to their inner sanctum has been opened for you. Please hurry and stop them before it's too late. Be prepared for a HARD battle! Better gather some friends to assist you.", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 51) - player:setStorageValue(Storage.InServiceofYalahar.DoorToLastFight, 1) - player:setStorageValue(Storage.InServiceofYalahar.Mission10, 2) -- StorageValue for Questlog "Mission 10: The Final Battle" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 51) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.DoorToLastFight, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission10, 2) -- StorageValue for Questlog "Mission 10: The Final Battle" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 52 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 52 then npcHandler:say({ "So the Yalahari that opposed us are dead or fled from the city. This should bring us more stability and perhaps a true chance to rebuild the city. ...", "Still, I wonder from where they gained some of the Yalahari secrets. Did they find some source of knowledge? ...", @@ -245,9 +251,9 @@ local function creatureSayCallback(npc, creature, type, message) "I allow you to enter the Yalaharian treasure room. I'm sure that you can put what you find inside to better use than them. Choose one chest, but think before takingone! ...", "Also, take this Yalaharian outfit. Depending on which side you chose previously, you can also acquire one specific addon. Thank you again for your help.", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 53) - player:setStorageValue(Storage.InServiceofYalahar.DoorToReward, 1) - player:setStorageValue(Storage.InServiceofYalahar.Mission10, 4) -- StorageValue for Questlog "Mission 10: The Final Battle" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 53) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.DoorToReward, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission10, 4) -- StorageValue for Questlog "Mission 10: The Final Battle" player:addOutfit(324, 0) player:addOutfit(325, 0) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) @@ -255,7 +261,7 @@ local function creatureSayCallback(npc, creature, type, message) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then - player:setStorageValue(Storage.InServiceofYalahar.Questline, 4) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 4) npcHandler:say({ "I'm pleased to hear that. Rarely we meet outsiders that care about our problems. Most people come here looking for wealth and luxury. ...", "However, I have to tell you that our ranking system is quite rigid. So, I'm not allowed to entrust you with important missions as long as you haven't proven yourself as reliable. ...", @@ -263,24 +269,24 @@ local function creatureSayCallback(npc, creature, type, message) }, npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then - if player:getStorageValue(Storage.InServiceofYalahar.SewerPipe01) == 1 and player:getStorageValue(Storage.InServiceofYalahar.SewerPipe02) == 1 and player:getStorageValue(Storage.InServiceofYalahar.SewerPipe03) == 1 and player:getStorageValue(Storage.InServiceofYalahar.SewerPipe04) == 1 then - player:setStorageValue(Storage.InServiceofYalahar.Questline, 6) - player:setStorageValue(Storage.InServiceofYalahar.Mission01, 6) -- StorageValue for Questlog "Mission 01: Something Rotten" + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SewerPipe01) == 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SewerPipe02) == 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SewerPipe03) == 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SewerPipe04) == 1 then + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 6) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission01, 6) -- StorageValue for Questlog "Mission 01: Something Rotten" npcHandler:say("Thank you very much. You have no idea how hard it was to find someone volunteering for that job. If you feel ready for further {missions}, just tell me.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 3 then - player:setStorageValue(Storage.InServiceofYalahar.Mission02, 1) -- StorageValue for Questlog "Mission 02: Watching the Watchmen" - player:setStorageValue(Storage.InServiceofYalahar.Questline, 7) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission02, 1) -- StorageValue for Questlog "Mission 02: Watching the Watchmen" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 7) npcHandler:say({ "You'll find our seven guards at the gates of each quarter. Just ask them for their report and they will tell you all you need to know.", "I must warn you, the quarters are in a horrible state. I strongly advise you to stay on the main roads whenever possible while you get those reports. ...", }, npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 4 then - if player:getStorageValue(Storage.InServiceofYalahar.Questline) == 14 then - player:setStorageValue(Storage.InServiceofYalahar.Mission02, 8) -- StorageValue for Questlog "Mission 02: Watching the Watchmen" - player:setStorageValue(Storage.InServiceofYalahar.Questline, 15) + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 14 then + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission02, 8) -- StorageValue for Questlog "Mission 02: Watching the Watchmen" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 15) npcHandler:say("Excellent! My superiors will be pleased to get these reports. I will for sure emphasise your efforts in this mission. Please come back soon to see if there are any more {missions} available for you. ", npc, creature) npcHandler:setTopic(playerId, 0) else @@ -288,18 +294,18 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 5 then - player:setStorageValue(Storage.InServiceofYalahar.Questline, 50) - player:setStorageValue(Storage.InServiceofYalahar.Mission09, 2) -- StorageValue for Questlog "Mission 09: Decision" - player:setStorageValue(Storage.InServiceofYalahar.Mission10, 1) -- StorageValue for Questlog "Mission 10: The Final Battle" - player:setStorageValue(Storage.InServiceofYalahar.SideDecision, 1) - npcHandler:say("I knew that you were smart enough to make the right decision! Your next mission will be a special one! ", npc, creature) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 50) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission09, 2) -- StorageValue for Questlog "Mission 09: Decision" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission10, 1) -- StorageValue for Questlog "Mission 10: The Final Battle" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SideDecision, 1) + npcHandler:say("You have no idea how much I hoped to hear that, my friend! But I have an urgent mission for you!", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 6 then - if player:getItemCount(9041) > 0 and player:getStorageValue(Storage.InServiceofYalahar.Questline) == 54 then - player:setStorageValue(Storage.InServiceofYalahar.Questline, 55) + if player:getItemCount(9041) > 0 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 54 then + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 55) npcHandler:say("Great! Here, take this yalaharian addon in a return.", npc, creature) - player:addOutfitAddon(325, player:getStorageValue(Storage.InServiceofYalahar.SideDecision) == 1 and 1 or 2) - player:addOutfitAddon(324, player:getStorageValue(Storage.InServiceofYalahar.SideDecision) == 1 and 1 or 2) + player:addOutfitAddon(325, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SideDecision) == 1 and 1 or 2) + player:addOutfitAddon(324, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SideDecision) == 1 and 1 or 2) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) npcHandler:setTopic(playerId, 0) else diff --git a/data-otservbr-global/npc/percybald.lua b/data-otservbr-global/npc/percybald.lua index 5ecb521302e..d6e6d162495 100644 --- a/data-otservbr-global/npc/percybald.lua +++ b/data-otservbr-global/npc/percybald.lua @@ -59,15 +59,15 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "disguise") then - if player:getStorageValue(Storage.ThievesGuild.TheatreScript) < 0 then + if player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.TheatreScript) < 0 then npcHandler:say({ "Hmpf. Why should I waste my time to help some amateur? I'm afraid I can only offer my assistance to actors that are as great as I am. ...", "Though, your futile attempt to prove your worthiness could be amusing. Grab a copy of a script from the prop room at the theatre cellar. Then talk to me again about your test!", }, npc, creature) - player:setStorageValue(Storage.ThievesGuild.TheatreScript, 0) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.TheatreScript, 0) end elseif MsgContains(message, "test") then - if player:getStorageValue(Storage.ThievesGuild.Mission04) == 5 then + if player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission04) == 5 then npcHandler:say("I hope you learnt your role! I'll tell you a line from the script and you'll have to answer with the corresponding line! Ready?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -82,14 +82,17 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("What's this? Behind the doctor?", npc, creature) npcHandler:setTopic(playerId, 6) elseif npcHandler:getTopic(playerId) == 7 then - npcHandler:say("Grrr!", npc, creature) + npcHandler:say("Haha! You may not fear for your own life, but how about hers!?", npc, creature) npcHandler:setTopic(playerId, 8) elseif npcHandler:getTopic(playerId) == 9 then - npcHandler:say("You're such a monster!", npc, creature) + npcHandler:say("Grrr!", npc, creature) npcHandler:setTopic(playerId, 10) elseif npcHandler:getTopic(playerId) == 11 then + npcHandler:say("You're such a monster!", npc, creature) + npcHandler:setTopic(playerId, 12) + elseif npcHandler:getTopic(playerId) == 13 then npcHandler:say("Ah well, I think you passed the test! Here is your disguise kit! Now get lost, fate awaits me!", npc, creature) - player:setStorageValue(Storage.ThievesGuild.Mission04, 6) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission04, 6) player:addItem(7865, 1) npcHandler:setTopic(playerId, 0) end @@ -118,7 +121,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 8 then - if MsgContains(message, "Ahhhhhh!") then + if MsgContains(message, "Oh no! Look! It's Princess Buttercup! He's holding her hostage!") then npcHandler:say("Ok, ok. You've got this one right! Ready for the next one?", npc, creature) npcHandler:setTopic(playerId, 9) else @@ -126,33 +129,39 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 10 then - if MsgContains(message, "Hahaha! Now drop your weapons or else...") then + if MsgContains(message, "Ahhhhhh!") then npcHandler:say("Ok, ok. You've got this one right! Ready for the next one?", npc, creature) npcHandler:setTopic(playerId, 11) else npcHandler:say("No no no! That is not correct!", npc, creature) npcHandler:setTopic(playerId, 0) end + elseif npcHandler:getTopic(playerId) == 12 then + if MsgContains(message, "Hahaha! Now drop your weapons or else...") then + npcHandler:say("Ok, ok. You've got this one right! Ready for the next one?", npc, creature) + npcHandler:setTopic(playerId, 13) + else + npcHandler:say("No no no! That is not correct!", npc, creature) + npcHandler:setTopic(playerId, 0) + end end + -- Additional dialogue options related to outfits if MsgContains(message, "outfit") or MsgContains(message, "addon") or MsgContains(message, "royal") then npcHandler:say("In exchange for a generous donation of gold and silver tokens, I can offer you a special outfit. Would you like to donate?", npc, creature) - npcHandler:setTopic(playerId, 12) + npcHandler:setTopic(playerId, 14) elseif MsgContains(message, "yes") then - -- Topic 12: Initial explanation about the outfit - if npcHandler:getTopic(playerId) == 12 then + if npcHandler:getTopic(playerId) == 14 then npcHandler:say({ "Great! To clarify, donating 30,000 silver tokens and 25,000 gold tokens will entitle you to a unique outfit. ...", "For 15,000 silver tokens and 12,500 gold tokens, you will receive the {armor}. For an additional 7,500 silver tokens and 6,250 gold tokens each, you can also receive the {shield} and {crown}. ...", "What will you choose?", }, npc, creature) - npcHandler:setTopic(playerId, 13) - - -- Topic 13: User already accepted to learn about donations, further actions here - elseif npcHandler:getTopic(playerId) == 13 then + npcHandler:setTopic(playerId, 15) + elseif npcHandler:getTopic(playerId) == 15 then npcHandler:say("If you haven't made up your mind, please come back when you are ready.", npc, creature) npcHandler:setTopic(playerId, 0) - elseif npcHandler:getTopic(playerId) == 14 then + elseif npcHandler:getTopic(playerId) == 16 then if player:getStorageValue(Storage.OutfitQuest.RoyalCostumeOutfit) < 1 then if player:removeItem(22516, 15000) and player:removeItem(22721, 12500) then npcHandler:say("Take this armor as a token of great gratitude. Let us forever remember this day, my friend!", npc, creature) @@ -164,67 +173,57 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("You do not have enough tokens to donate that amount.", npc, creature) end else - npcHandler:say("You alread have that addon.", npc, creature) + npcHandler:say("You already have that addon.", npc, creature) end - npcHandler:setTopic(playerId, 13) - elseif npcHandler:getTopic(playerId) == 15 then + npcHandler:setTopic(playerId, 15) + elseif npcHandler:getTopic(playerId) == 17 then if player:getStorageValue(Storage.OutfitQuest.RoyalCostumeOutfit) == 1 then if player:getStorageValue(Storage.OutfitQuest.RoyalCostumeOutfit) < 2 then if player:removeItem(22516, 7500) and player:removeItem(22721, 6250) then - npcHandler:say("Take this sheild as a token of great gratitude. Let us forever remember this day, my friend. ", npc, creature) + npcHandler:say("Take this shield as a token of great gratitude. Let us forever remember this day, my friend.", npc, creature) player:addOutfitAddon(1457, 1) player:addOutfitAddon(1456, 1) player:getPosition():sendMagicEffect(171) player:setStorageValue(Storage.OutfitQuest.RoyalCostumeOutfit, 2) - npcHandler:setTopic(playerId, 13) else npcHandler:say("You do not have enough tokens to donate that amount.", npc, creature) - npcHandler:setTopic(playerId, 13) end else - npcHandler:say("You alread have that outfit.", npc, creature) - npcHandler:setTopic(playerId, 13) + npcHandler:say("You already have that outfit.", npc, creature) end else - npcHandler:say("You need to donate {armor} outfit first.", npc, creature) - npcHandler:setTopic(playerId, 13) + npcHandler:say("You need to donate the {armor} outfit first.", npc, creature) end - npcHandler:setTopic(playerId, 13) - elseif npcHandler:getTopic(playerId) == 16 then + npcHandler:setTopic(playerId, 15) + elseif npcHandler:getTopic(playerId) == 18 then if player:getStorageValue(Storage.OutfitQuest.RoyalCostumeOutfit) == 2 then if player:getStorageValue(Storage.OutfitQuest.RoyalCostumeOutfit) < 3 then if player:removeItem(22516, 7500) and player:removeItem(22721, 6250) then - npcHandler:say("Take this crown as a token of great gratitude. Let us forever remember this day, my friend. ", npc, creature) + npcHandler:say("Take this crown as a token of great gratitude. Let us forever remember this day, my friend.", npc, creature) player:addOutfitAddon(1457, 2) player:addOutfitAddon(1456, 2) player:getPosition():sendMagicEffect(171) player:setStorageValue(Storage.OutfitQuest.RoyalCostumeOutfit, 3) - npcHandler:setTopic(playerId, 13) else npcHandler:say("You do not have enough tokens to donate that amount.", npc, creature) - npcHandler:setTopic(playerId, 13) end else - npcHandler:say("You alread have that outfit.", npc, creature) - npcHandler:setTopic(playerId, 13) + npcHandler:say("You already have that outfit.", npc, creature) end else - npcHandler:say("You need to donate {shield} addon first.", npc, creature) - npcHandler:setTopic(playerId, 13) + npcHandler:say("You need to donate the {shield} addon first.", npc, creature) end - npcHandler:setTopic(playerId, 13) + npcHandler:setTopic(playerId, 15) end - - -- Handle options for armor, shield, and crown - elseif MsgContains(message, "armor") and npcHandler:getTopic(playerId) == 13 then + elseif MsgContains(message, "armor") and npcHandler:getTopic(playerId) == 15 then npcHandler:say("Would you like to donate 15,000 silver tokens and 12,500 gold tokens for a unique red armor?", npc, creature) - npcHandler:setTopic(playerId, 14) - elseif MsgContains(message, "shield") and npcHandler:getTopic(playerId) == 13 then + npcHandler:setTopic(playerId, 16) + elseif MsgContains(message, "shield") and npcHandler:getTopic(playerId) == 15 then npcHandler:say("Would you like to donate 7,500 silver tokens and 6,250 gold tokens for a unique shield?", npc, creature) - npcHandler:setTopic(playerId, 15) - elseif MsgContains(message, "crown") and npcHandler:getTopic(playerId) == 13 then + npcHandler:setTopic(playerId, 17) + elseif MsgContains(message, "crown") and npcHandler:getTopic(playerId) == 15 then npcHandler:say("Would you like to donate 7,500 silver tokens and 6,250 gold tokens for a unique crown?", npc, creature) - npcHandler:setTopic(playerId, 16) + npcHandler:setTopic(playerId, 18) end return true diff --git a/data-otservbr-global/npc/peter.lua b/data-otservbr-global/npc/peter.lua index 851d085b90b..b815b67d1a8 100644 --- a/data-otservbr-global/npc/peter.lua +++ b/data-otservbr-global/npc/peter.lua @@ -59,14 +59,14 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "report") then - if player:getStorageValue(Storage.InServiceofYalahar.Questline) == 7 or player:getStorageValue(Storage.InServiceofYalahar.Questline) == 13 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 7 or player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 13 then npcHandler:say("A report? What do they think is happening here? . ", npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, player:getStorageValue(Storage.InServiceofYalahar.Questline) + 1) - player:setStorageValue(Storage.InServiceofYalahar.Mission02, player:getStorageValue(Storage.InServiceofYalahar.Mission02) + 1) -- StorageValue for Questlog "Mission 02: Watching the Watchmen" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) + 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission02, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission02) + 1) -- StorageValue for Questlog "Mission 02: Watching the Watchmen" npcHandler:setTopic(playerId, 0) end elseif table.contains({ "pass", "gate" }, message:lower()) then - npcHandler:say("Pass the gate? If it must be. Are you headed for the {factory} or the former {trade} quarter?", npc, creature) + npcHandler:say("Pass the gate? If it must be. Are you headed for the {factory} or the former {trade quarter}?", npc, creature) npcHandler:setTopic(playerId, 1) elseif MsgContains(message, "factory") then if npcHandler:getTopic(playerId) == 1 then diff --git a/data-otservbr-global/npc/petros.lua b/data-otservbr-global/npc/petros.lua index 228a3d7e4cb..50e6c9f26bc 100644 --- a/data-otservbr-global/npc/petros.lua +++ b/data-otservbr-global/npc/petros.lua @@ -66,7 +66,7 @@ addTravelKeyword("port hope", 50, Position(32527, 32784, 6)) addTravelKeyword("liberty bay", 140, Position(32285, 32892, 6)) addTravelKeyword("ankrahmun", 150, Position(33092, 32883, 6)) addTravelKeyword("yalahar", 210, Position(32816, 31272, 6), function(player) - return player:getStorageValue(Storage.SearoutesAroundYalahar.Darashia) ~= 1 and player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) < 5 + return player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Darashia) ~= 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter) < 5 end) addTravelKeyword("gray island", 160, Position(33196, 31984, 7)) addTravelKeyword("krailos", 200, Position(33493, 31712, 6)) diff --git a/data-otservbr-global/npc/pugwah.lua b/data-otservbr-global/npc/pugwah.lua index 9e9007a7667..e9c0874d5aa 100644 --- a/data-otservbr-global/npc/pugwah.lua +++ b/data-otservbr-global/npc/pugwah.lua @@ -61,6 +61,9 @@ npcConfig.shop = { { itemName = "mug of lemonade", clientId = 2880, buy = 2, count = 12 }, { itemName = "mug of milk", clientId = 2880, buy = 2, count = 6 }, { itemName = "mug of wine", clientId = 2880, buy = 3, count = 2 }, + { itemName = "vial of beer", clientId = 2874, buy = 3, count = 1, subType = 3 }, + { itemName = "vial of wine", clientId = 2874, buy = 4, count = 1, subType = 2 }, + { itemName = "vial of water", clientId = 2874, buy = 2, count = 1 }, } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/pythius_the_rotten.lua b/data-otservbr-global/npc/pythius_the_rotten.lua index f6c86c8b240..3165a91e786 100644 --- a/data-otservbr-global/npc/pythius_the_rotten.lua +++ b/data-otservbr-global/npc/pythius_the_rotten.lua @@ -57,7 +57,7 @@ mugKeyword:addChildKeyword({ "golden mug" }, StdModule.say, { npcHandler = npcHa return player:getItemCount(2903) > 0 end, function(player) player:removeItem(2903, 1) - player:setStorageValue(Storage.HiddenCityOfBeregar.PythiusTheRotten, os.time() + 180) + player:setStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.PythiusTheRotten, os.time() + 180) end) mugKeyword:addChildKeyword({ "golden mug" }, StdModule.say, { npcHandler = npcHandler, text = "THIS IS NOT WORTH BEING PART OF MY TREASURE! BRING ME SOMETHING ELSE.", reset = true }) mugKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "THIS IS NOT WORTH BEING PART OF MY TREASURE! BRING ME SOMETHING ELSE", reset = true }) diff --git a/data-otservbr-global/npc/rabaz.lua b/data-otservbr-global/npc/rabaz.lua index e532e7def66..79786f59cc4 100644 --- a/data-otservbr-global/npc/rabaz.lua +++ b/data-otservbr-global/npc/rabaz.lua @@ -147,7 +147,7 @@ local function creatureSayCallback(npc, creature, type, message) local categoryTable = itemsTable[message:lower()] if MsgContains(message, "mission") then - if player:getStorageValue(Storage.TibiaTales.AnInterestInBotany) < 1 then + if player:getStorageValue(Storage.TibiaTales.AnInterestInBotany.Questline) < 1 then npcHandler:setTopic(playerId, 1) npcHandler:say({ "Why yes, there is indeed some minor issue I could need your help with. I was always a friend of nature and it was not recently I discovered the joys of plants, growths, of all the flora around us. ...", @@ -160,15 +160,15 @@ local function creatureSayCallback(npc, creature, type, message) "Once you find what I need, best use a knife to carefully cut and gather a leaf or a scrap of their integument and press it directly under their appropriate entry into my botanical almanach. ...", "Simply return to me after you have done that and we will discuss your reward. What do you say, are you in?", }, npc, creature) - elseif player:getStorageValue(Storage.TibiaTales.AnInterestInBotany) == 3 then + elseif player:getStorageValue(Storage.TibiaTales.AnInterestInBotany.Questline) == 3 then npcHandler:setTopic(playerId, 2) npcHandler:say("Well fantastic work, you gathered both samples! Now I can continue my work on the almanach, thank you very much for your help indeed. Can I take a look at my book please?", npc, creature) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) - player:setStorageValue(Storage.TibiaTales.AnInterestInBotany, 1) - player:setStorageValue(Storage.TibiaTales.AnInterestInBotanyChestDoor, 0) + player:setStorageValue(Storage.TibiaTales.AnInterestInBotany.Questline, 1) + player:setStorageValue(Storage.TibiaTales.AnInterestInBotany.ChestDoor, 0) npcHandler:say("Yes? Yes! That's the enthusiasm I need! Remember to bring a sharp knife to gather the samples, plants - even mutated deformed plants - are very sensitive you know. Off you go and be careful out there, Zao is no place for the feint hearted mind you.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then @@ -176,7 +176,7 @@ local function creatureSayCallback(npc, creature, type, message) player:addItem(11700, 1) player:addItem(3035, 10) player:addExperience(3000, true) - player:setStorageValue(Storage.TibiaTales.AnInterestInBotany, 4) + player:setStorageValue(Storage.TibiaTales.AnInterestInBotany.Questline, 4) npcHandler:say({ "Ah, thank you. Now look at that texture and fine colour, simply marvellous. ...", "I hope the sun in the steppe did not exhaust you too much? Shellshock. A dangerous foe in the world of field science and exploration. ...", diff --git a/data-otservbr-global/npc/ramina.lua b/data-otservbr-global/npc/ramina.lua index 78972d2a78f..d88b305aaeb 100644 --- a/data-otservbr-global/npc/ramina.lua +++ b/data-otservbr-global/npc/ramina.lua @@ -65,7 +65,8 @@ npcConfig.shop = { { itemName = "orange", clientId = 3586, buy = 12 }, { itemName = "peas", clientId = 11683, buy = 5 }, { itemName = "vial of fruit juice", clientId = 2874, buy = 10, count = 14 }, - { itemName = "vial of water", clientId = 2874, buy = 6, count = 1 }, + { itemName = "vial of water", clientId = 2874, buy = 2, count = 1 }, + { itemName = "vial of wine", clientId = 2874, buy = 15, count = 1, subType = 2 }, } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/rashid.lua b/data-otservbr-global/npc/rashid.lua index 7c719f0c655..4fda8a6c788 100644 --- a/data-otservbr-global/npc/rashid.lua +++ b/data-otservbr-global/npc/rashid.lua @@ -60,57 +60,57 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "mission") then if os.date("%A") == "Monday" then - if player:getStorageValue(Storage.TravellingTrader.Mission01) < 1 then + if player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission01) < 1 then npcHandler:say("Well, you could attempt the mission to become a recognised trader, but it requires a lot of travelling. Are you willing to try?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.TravellingTrader.Mission01) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission01) == 1 then npcHandler:say("Have you managed to obtain a rare deer trophy for my customer?", npc, creature) npcHandler:setTopic(playerId, 3) end elseif os.date("%A") == "Tuesday" then - if player:getStorageValue(Storage.TravellingTrader.Mission01) == 2 and player:getStorageValue(Storage.TravellingTrader.Mission02) < 1 then + if player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission01) == 2 and player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission02) < 1 then npcHandler:say("So, my friend, are you willing to proceed to the next mission to become a recognised trader?", npc, creature) npcHandler:setTopic(playerId, 4) - elseif player:getStorageValue(Storage.TravellingTrader.Mission02) == 4 then + elseif player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission02) == 4 then npcHandler:say("Did you bring me the package?", npc, creature) npcHandler:setTopic(playerId, 6) end elseif os.date("%A") == "Wednesday" then - if player:getStorageValue(Storage.TravellingTrader.Mission02) == 5 and player:getStorageValue(Storage.TravellingTrader.Mission03) < 1 then + if player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission02) == 5 and player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission03) < 1 then npcHandler:say("So, my friend, are you willing to proceed to the next mission to become a recognised trader?", npc, creature) npcHandler:setTopic(playerId, 7) - elseif player:getStorageValue(Storage.TravellingTrader.Mission03) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission03) == 2 then npcHandler:say("Have you brought the cheese?", npc, creature) npcHandler:setTopic(playerId, 9) end elseif os.date("%A") == "Thursday" then - if player:getStorageValue(Storage.TravellingTrader.Mission03) == 3 and player:getStorageValue(Storage.TravellingTrader.Mission04) < 1 then + if player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission03) == 3 and player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission04) < 1 then npcHandler:say("So, my friend, are you willing to proceed to the next mission to become a recognised trader?", npc, creature) npcHandler:setTopic(playerId, 10) - elseif player:getStorageValue(Storage.TravellingTrader.Mission04) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission04) == 2 then npcHandler:say("Have you brought the vase?", npc, creature) npcHandler:setTopic(playerId, 12) end elseif os.date("%A") == "Friday" then - if player:getStorageValue(Storage.TravellingTrader.Mission04) == 3 and player:getStorageValue(Storage.TravellingTrader.Mission05) < 1 then + if player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission04) == 3 and player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission05) < 1 then npcHandler:say("So, my friend, are you willing to proceed to the next mission to become a recognised trader?", npc, creature) npcHandler:setTopic(playerId, 13) - elseif player:getStorageValue(Storage.TravellingTrader.Mission05) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission05) == 2 then npcHandler:say("Have you brought a cheap but good crimson sword?", npc, creature) npcHandler:setTopic(playerId, 15) end elseif os.date("%A") == "Saturday" then - if player:getStorageValue(Storage.TravellingTrader.Mission05) == 3 and player:getStorageValue(Storage.TravellingTrader.Mission06) < 1 then + if player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission05) == 3 and player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission06) < 1 then npcHandler:say("So, my friend, are you willing to proceed to the next mission to become a recognised trader?", npc, creature) npcHandler:setTopic(playerId, 16) - elseif player:getStorageValue(Storage.TravellingTrader.Mission06) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission06) == 1 then npcHandler:say("Have you brought me a gold fish??", npc, creature) npcHandler:setTopic(playerId, 18) end elseif os.date("%A") == "Sunday" then - if player:getStorageValue(Storage.TravellingTrader.Mission06) == 2 and player:getStorageValue(Storage.TravellingTrader.Mission07) ~= 1 then - npcHandler:say("Ah, right. I hereby declare you - one of my recognised traders! Feel free to offer me your wares!", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission07, 1) + if player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission06) == 2 and player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission07) ~= 1 then + npcHandler:say("Ah, right. I hereby declare you - one of my recognised traders! Feel free to offer me your wares, just ask me for a {trade}!", npc, creature) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission07, 1) player:addAchievement("Recognised Trader") npcHandler:setTopic(playerId, 0) end @@ -128,12 +128,12 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 2) elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say("Fine. Then get a hold of that deer trophy and bring it to me while I'm in Svargrond. Just ask me about your mission.", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission01, 1) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission01, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then if player:removeItem(7397, 1) then npcHandler:say("Well done! I'll take that from you. Come see me another day, I'll be busy for a while now. ", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission01, 2) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission01, 2) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 4 then @@ -145,12 +145,12 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 5) elseif npcHandler:getTopic(playerId) == 5 then npcHandler:say("Fine. Then off you go, just ask Willard about the 'package for Rashid'.", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission02, 1) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission02, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 6 then if player:removeItem(145, 1) then npcHandler:say("Great. Just place it over there - yes, thanks, that's it. Come see me another day, I'll be busy for a while now. ", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission02, 5) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission02, 5) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 7 then @@ -164,12 +164,12 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 8) elseif npcHandler:getTopic(playerId) == 8 then npcHandler:say("Okay, then please find Miraia in Darashia and ask her about the {'scarab cheese'}.", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission03, 1) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission03, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 9 then if player:removeItem(169, 1) then npcHandler:say("Mmmhh, the lovely odeur of scarab cheese! I really can't understand why most people can't stand it. Thanks, well done! ", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission03, 3) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission03, 3) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 10 then @@ -181,13 +181,13 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 11) elseif npcHandler:getTopic(playerId) == 11 then npcHandler:say("Okay, then please find {Briasol} in {Ab'Dendriel} and ask for a {'fine vase'}.", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission04, 1) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission04, 1) player:addMoney(1000) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 12 then if player:removeItem(227, 1) then npcHandler:say("I'm surprised that you managed to bring this vase without a single crack. That was what I needed to know, thank you. ", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission04, 3) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission04, 3) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 13 then @@ -197,17 +197,16 @@ local function creatureSayCallback(npc, creature, type, message) "Dwarves are said to be the most stubborn of all traders. Travel to {Kazordoon} and try to get the smith {Uzgod} to sell a {crimson sword} to you. ...", "Of course, it has to be cheap. Don't come back with anything more expensive than 400 gold. ...", "And the quality must not suffer, of course! Everything clear and understood?", - "Dwarves are said to be the most stubborn of all traders. Travel to Kazordoon and try to get the smith Uzgod to sell a crimson sword to you. ...", }, npc, creature) npcHandler:setTopic(playerId, 14) elseif npcHandler:getTopic(playerId) == 14 then npcHandler:say("Okay, I'm curious how you will do with {Uzgod}. Good luck!", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission05, 1) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission05, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 15 then if player:removeItem(7385, 1) then npcHandler:say("Ha! You are clever indeed, well done! I'll take this from you. Come see me tomorrow, I think we two might get into business after all.", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission05, 3) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission05, 3) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 16 then @@ -220,12 +219,12 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 17) elseif npcHandler:getTopic(playerId) == 17 then npcHandler:say("Thanks so much! I'll be waiting eagerly for your return then.", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission06, 1) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission06, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 18 then if player:removeItem(5929, 1) then npcHandler:say("Thank you!! Ah, this makes my day! I'll take the rest of the day off to get to know this little guy. Come see me tomorrow, if you like.", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission06, 2) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission06, 2) npcHandler:setTopic(playerId, 0) end end @@ -262,7 +261,7 @@ npcHandler:setMessage(MESSAGE_WALKAWAY, "Come back soon!") npcHandler:setMessage(MESSAGE_SENDTRADE, "Take all the time you need to decide what you want!") local function onTradeRequest(npc, creature) - if Player(creature):getStorageValue(Storage.TravellingTrader.Mission07) ~= 1 then + if Player(creature):getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission07) ~= 1 then npcHandler:say("Sorry, but you do not belong to my exclusive customers. I have to make sure that I can trust in the quality of your wares.", npc, creature) return false end diff --git a/data-otservbr-global/npc/rashid_custom.lua b/data-otservbr-global/npc/rashid_custom.lua index 421427ee795..46b2f35abad 100644 --- a/data-otservbr-global/npc/rashid_custom.lua +++ b/data-otservbr-global/npc/rashid_custom.lua @@ -62,57 +62,57 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "mission") then if os.date("%A") == "Monday" then - if player:getStorageValue(Storage.TravellingTrader.Mission01) < 1 then + if player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission01) < 1 then npcHandler:say("Well, you could attempt the mission to become a recognised trader, but it requires a lot of travelling. Are you willing to try?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.TravellingTrader.Mission01) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission01) == 1 then npcHandler:say("Have you managed to obtain a rare deer trophy for my customer?", npc, creature) npcHandler:setTopic(playerId, 3) end elseif os.date("%A") == "Tuesday" then - if player:getStorageValue(Storage.TravellingTrader.Mission01) == 2 and player:getStorageValue(Storage.TravellingTrader.Mission02) < 1 then + if player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission01) == 2 and player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission02) < 1 then npcHandler:say("So, my friend, are you willing to proceed to the next mission to become a recognised trader?", npc, creature) npcHandler:setTopic(playerId, 4) - elseif player:getStorageValue(Storage.TravellingTrader.Mission02) == 4 then + elseif player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission02) == 4 then npcHandler:say("Did you bring me the package?", npc, creature) npcHandler:setTopic(playerId, 6) end elseif os.date("%A") == "Wednesday" then - if player:getStorageValue(Storage.TravellingTrader.Mission02) == 5 and player:getStorageValue(Storage.TravellingTrader.Mission03) < 1 then + if player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission02) == 5 and player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission03) < 1 then npcHandler:say("So, my friend, are you willing to proceed to the next mission to become a recognised trader?", npc, creature) npcHandler:setTopic(playerId, 7) - elseif player:getStorageValue(Storage.TravellingTrader.Mission03) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission03) == 2 then npcHandler:say("Have you brought the cheese?", npc, creature) npcHandler:setTopic(playerId, 9) end elseif os.date("%A") == "Thursday" then - if player:getStorageValue(Storage.TravellingTrader.Mission03) == 3 and player:getStorageValue(Storage.TravellingTrader.Mission04) < 1 then + if player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission03) == 3 and player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission04) < 1 then npcHandler:say("So, my friend, are you willing to proceed to the next mission to become a recognised trader?", npc, creature) npcHandler:setTopic(playerId, 10) - elseif player:getStorageValue(Storage.TravellingTrader.Mission04) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission04) == 2 then npcHandler:say("Have you brought the vase?", npc, creature) npcHandler:setTopic(playerId, 12) end elseif os.date("%A") == "Friday" then - if player:getStorageValue(Storage.TravellingTrader.Mission04) == 3 and player:getStorageValue(Storage.TravellingTrader.Mission05) < 1 then + if player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission04) == 3 and player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission05) < 1 then npcHandler:say("So, my friend, are you willing to proceed to the next mission to become a recognised trader?", npc, creature) npcHandler:setTopic(playerId, 13) - elseif player:getStorageValue(Storage.TravellingTrader.Mission05) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission05) == 2 then npcHandler:say("Have you brought a cheap but good crimson sword?", npc, creature) npcHandler:setTopic(playerId, 15) end elseif os.date("%A") == "Saturday" then - if player:getStorageValue(Storage.TravellingTrader.Mission05) == 3 and player:getStorageValue(Storage.TravellingTrader.Mission06) < 1 then + if player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission05) == 3 and player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission06) < 1 then npcHandler:say("So, my friend, are you willing to proceed to the next mission to become a recognised trader?", npc, creature) npcHandler:setTopic(playerId, 16) - elseif player:getStorageValue(Storage.TravellingTrader.Mission06) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission06) == 1 then npcHandler:say("Have you brought me a gold fish??", npc, creature) npcHandler:setTopic(playerId, 18) end elseif os.date("%A") == "Sunday" then - if player:getStorageValue(Storage.TravellingTrader.Mission06) == 2 and player:getStorageValue(Storage.TravellingTrader.Mission07) ~= 1 then + if player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission06) == 2 and player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission07) ~= 1 then npcHandler:say("Ah, right. I hereby declare you - one of my recognised traders! Feel free to offer me your wares!", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission07, 1) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission07, 1) player:addAchievement("Recognised Trader") npcHandler:setTopic(playerId, 0) end @@ -130,12 +130,12 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 2) elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say("Fine. Then get a hold of that deer trophy and bring it to me while I'm in Svargrond. Just ask me about your mission.", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission01, 1) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission01, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then if player:removeItem(7397, 1) then npcHandler:say("Well done! I'll take that from you. Come see me another day, I'll be busy for a while now. ", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission01, 2) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission01, 2) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 4 then @@ -147,12 +147,12 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 5) elseif npcHandler:getTopic(playerId) == 5 then npcHandler:say("Fine. Then off you go, just ask Willard about the 'package for Rashid'.", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission02, 1) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission02, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 6 then if player:removeItem(145, 1) then npcHandler:say("Great. Just place it over there - yes, thanks, that's it. Come see me another day, I'll be busy for a while now. ", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission02, 5) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission02, 5) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 7 then @@ -166,12 +166,12 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 8) elseif npcHandler:getTopic(playerId) == 8 then npcHandler:say("Okay, then please find Miraia in Darashia and ask her about the {'scarab cheese'}.", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission03, 1) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission03, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 9 then if player:removeItem(169, 1) then npcHandler:say("Mmmhh, the lovely odeur of scarab cheese! I really can't understand why most people can't stand it. Thanks, well done! ", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission03, 3) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission03, 3) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 10 then @@ -183,13 +183,13 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 11) elseif npcHandler:getTopic(playerId) == 11 then npcHandler:say("Okay, then please find {Briasol} in {Ab'Dendriel} and ask for a {'fine vase'}.", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission04, 1) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission04, 1) player:addMoney(1000) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 12 then if player:removeItem(227, 1) then npcHandler:say("I'm surprised that you managed to bring this vase without a single crack. That was what I needed to know, thank you. ", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission04, 3) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission04, 3) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 13 then @@ -204,12 +204,12 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 14) elseif npcHandler:getTopic(playerId) == 14 then npcHandler:say("Okay, I'm curious how you will do with {Uzgod}. Good luck!", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission05, 1) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission05, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 15 then if player:removeItem(7385, 1) then npcHandler:say("Ha! You are clever indeed, well done! I'll take this from you. Come see me tomorrow, I think we two might get into business after all.", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission05, 3) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission05, 3) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 16 then @@ -222,12 +222,12 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 17) elseif npcHandler:getTopic(playerId) == 17 then npcHandler:say("Thanks so much! I'll be waiting eagerly for your return then.", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission06, 1) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission06, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 18 then if player:removeItem(5929, 1) then npcHandler:say("Thank you!! Ah, this makes my day! I'll take the rest of the day off to get to know this little guy. Come see me tomorrow, if you like.", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission06, 2) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission06, 2) npcHandler:setTopic(playerId, 0) end end @@ -264,7 +264,7 @@ npcHandler:setMessage(MESSAGE_WALKAWAY, "Come back soon!") npcHandler:setMessage(MESSAGE_SENDTRADE, "Take all the time you need to decide what you want!") local function onTradeRequest(npc, creature) - if toggleRashidStorage and Player(creature):getStorageValue(Storage.TravellingTrader.Mission07) ~= 1 then + if toggleRashidStorage and Player(creature):getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission07) ~= 1 then npcHandler:say("Sorry, but you do not belong to my exclusive customers. I have to make sure that I can trust in the quality of your wares.", npc, creature) return false end diff --git a/data-otservbr-global/npc/raymond_striker.lua b/data-otservbr-global/npc/raymond_striker.lua index e31e737321c..da694aed8da 100644 --- a/data-otservbr-global/npc/raymond_striker.lua +++ b/data-otservbr-global/npc/raymond_striker.lua @@ -151,14 +151,14 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "task") and player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.RaysMission4) == 5 then - if player:getStorageValue(Storage.KillingInTheNameOf.PirateTask) < 0 then + if player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PirateTask) < 0 then npcHandler:say({ "The pirates on Nargor are becoming more and more of a threat to us each day. I wish someone could get rid of them once and for all, but unfortunately they just keep coming! ...", "Only a dead pirate is a good pirate. I think killing a large number of them would definitely help us to make Sabrehaven a safer place. ...", "It doesn't matter how long it takes, but... would you be willing to kill 3000 pirates for us?", }, npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.KillingInTheNameOf.PirateTask) == 0 then + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PirateTask) == 0 then if player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.PirateCount) >= 3000 then if player:getStorageValue(REPEATSTORAGE_BASE + #tasks.GrizzlyAdams + 1) <= 2 then npcHandler:say({ @@ -166,7 +166,7 @@ local function creatureSayCallback(npc, creature, type, message) "One of our spies told us about a secret hideout somewhere on Nargor. Supposedly, one of the four pirate leaders can be found there sometimes. If you dare go there, you might be able to face him or her in one on one combat. ...", "Beware though - prepare yourself well and only flee if you must. This might be your only chance to get into there, so be careful and don't die!", }, npc, creature) - player:setStorageValue(Storage.KillingInTheNameOf.PirateTask, 1) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PirateTask, 1) player:addExperience(10000, true) player:addMoney(5000) elseif player:getStorageValue(REPEATSTORAGE_BASE + #tasks.GrizzlyAdams + 1) == 3 then @@ -174,25 +174,25 @@ local function creatureSayCallback(npc, creature, type, message) "This was probably the last time you will be able to enter that hideout. Well done, my friend, our thanks are with you. ...", "You are most welcome to keep on killing pirates for us though for some bucks and experience. If you want to do so, just ask me about a {task} anytime.", }, npc, creature) - player:setStorageValue(Storage.KillingInTheNameOf.PirateTask, 1) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PirateTask, 1) player:addExperience(10000, true) player:addMoney(5000) elseif player:getStorageValue(REPEATSTORAGE_BASE + #tasks.GrizzlyAdams + 1) > 3 then npcHandler:say("Ahh, thank you, my friend! What would we do without you? Here, take this reward for your efforts. If you want to continue to help us killing pirates, just ask me about that {task}.", npc, creature) - player:setStorageValue(Storage.KillingInTheNameOf.PirateTask, 3) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PirateTask, 3) player:addExperience(10000, true) player:addMoney(5000) end else npcHandler:say("Go kill more pirates.", npc, creature) end - elseif player:getStorageValue(Storage.KillingInTheNameOf.PirateTask) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PirateTask) == 2 then npcHandler:say({ "So you went into the leaders' hideout? I hope you were successful and got what you were looking for! Thank you, my friend. Pirates still keep coming here, unfortunately. ...", "Do you, by chance, would like to kill pirates again for us?", }, npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.KillingInTheNameOf.PirateTask) == 3 then + elseif player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PirateTask) == 3 then npcHandler:say("Do you, by chance, would like to kill pirates again for us?", npc, creature) npcHandler:setTopic(playerId, 2) end @@ -205,7 +205,7 @@ local function creatureSayCallback(npc, creature, type, message) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.PirateCutthroadCount, 0) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.PirateBuccaneerCount, 0) player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.PirateCorsairCount, 0) - player:setStorageValue(Storage.KillingInTheNameOf.PirateTask, 0) + player:setStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.PirateTask, 0) player:setStorageValue(REPEATSTORAGE_BASE + #tasks.GrizzlyAdams + 1, math.max(player:getStorageValue(REPEATSTORAGE_BASE + #tasks.GrizzlyAdams + 1), 0)) player:setStorageValue(REPEATSTORAGE_BASE + #tasks.GrizzlyAdams + 1, player:getStorageValue(REPEATSTORAGE_BASE + #tasks.GrizzlyAdams + 1) + 1) npcHandler:setTopic(playerId, 0) diff --git a/data-otservbr-global/npc/red_lilly.lua b/data-otservbr-global/npc/red_lilly.lua index eb91a4aa813..357cb02775b 100644 --- a/data-otservbr-global/npc/red_lilly.lua +++ b/data-otservbr-global/npc/red_lilly.lua @@ -85,6 +85,7 @@ npcConfig.shop = { { itemName = "torch", clientId = 2920, buy = 2 }, { itemName = "vial", clientId = 2874, sell = 5 }, { itemName = "vial of oil", clientId = 2874, buy = 20, count = 7 }, + { itemName = "vial of water", clientId = 2874, buy = 10, count = 1 }, { itemName = "watch", clientId = 2906, buy = 20, sell = 6 }, { itemName = "waterskin of water", clientId = 2901, buy = 10, count = 1 }, { itemName = "wooden hammer", clientId = 3459, sell = 15 }, diff --git a/data-otservbr-global/npc/reed.lua b/data-otservbr-global/npc/reed.lua index 08f70a744bf..7e1ca73c331 100644 --- a/data-otservbr-global/npc/reed.lua +++ b/data-otservbr-global/npc/reed.lua @@ -59,10 +59,10 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "report") then - if player:getStorageValue(Storage.InServiceofYalahar.Questline) == 10 or player:getStorageValue(Storage.InServiceofYalahar.Questline) == 11 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 10 or player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 11 then npcHandler:say("You have NO idea what we have to endure each day .. . ", npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, player:getStorageValue(Storage.InServiceofYalahar.Questline) + 1) - player:setStorageValue(Storage.InServiceofYalahar.Mission02, player:getStorageValue(Storage.InServiceofYalahar.Mission02) + 1) -- StorageValue for Questlog "Mission 02: Watching the Watchmen" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) + 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission02, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission02) + 1) -- StorageValue for Questlog "Mission 02: Watching the Watchmen" npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "pass") then diff --git a/data-otservbr-global/npc/rehon.lua b/data-otservbr-global/npc/rehon.lua index 4744851df00..87794faf7ff 100644 --- a/data-otservbr-global/npc/rehon.lua +++ b/data-otservbr-global/npc/rehon.lua @@ -55,8 +55,8 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "mission") then local player = Player(creature) - if player:getStorageValue(Storage.HiddenCityOfBeregar.RoyalRescue) == 6 and player:removeItem(9172, 1) then - player:setStorageValue(Storage.HiddenCityOfBeregar.RoyalRescue, 7) + if player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.RoyalRescue) == 6 and player:removeItem(9172, 1) then + player:setStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.RoyalRescue, 7) npcHandler:say("By the Gods! You have the key to the cell! Thank you sooo much, mate. And now leave. I'll wait here until the air is clean and then I'm out of here.", npc, creature) npcHandler:setTopic(playerId, 0) end diff --git a/data-otservbr-global/npc/rottin_wood.lua b/data-otservbr-global/npc/rottin_wood.lua index b815737c4f3..380d5036d6d 100644 --- a/data-otservbr-global/npc/rottin_wood.lua +++ b/data-otservbr-global/npc/rottin_wood.lua @@ -51,58 +51,90 @@ local function creatureSayCallback(npc, creature, type, message) local playerId = player:getId() if MsgContains(message, "mission") or MsgContains(message, "task") then - if (getPlayerStorageValue(creature, Storage.RottinWoodAndMaried.Mission03) < 1) and getPlayerStorageValue(creature, Storage.RottinWoodAndMaried.Time) <= os.time() then - npcHandler:say("Oh, you want some work? You can help us, alright. Did you know that the people of the city think those rabbit feet are actually lucky charms?", npc, creature) - npcHandler:setTopic(playerId, 1) - elseif getPlayerStorageValue(creature, Storage.RottinWoodAndMaried.Mission03) == 1 then + -- Checks if the mission has not yet started and the cooldown has expired + if getPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Mission03) < 1 then + if getPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Time) <= os.time() then + npcHandler:say("Oh, you want some work? You can help us, alright. Did you know that the people of the city think those rabbit feet are actually lucky charms?", npc, creature) + npcHandler:setTopic(playerId, 1) + else + npcHandler:say("You need to wait some hours to take another mission again or you are still on a mission.", npc, creature) + end + + -- Checks if the player is already on the rabbit feet collection mission + elseif getPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Mission03) == 1 then npcHandler:say("Good to see you back. Now, did you bring us the lucky charms?", npc, creature) npcHandler:setTopic(playerId, 3) - elseif getPlayerStorageValue(creature, Storage.RottinWoodAndMaried.Time) > os.time() then - npcHandler:say("You need wait some hours to take other mission again or you are still on a mission.", npc, creature) - ------------------------ FINISH MISSION 01 ------------------------ - elseif getPlayerStorageValue(creature, Storage.RottinWoodAndMaried.Mission03) == 2 then - npcHandler:say({ - "Of course, of course, there is indeed something you can help us with. Remember that we also have some tasks for you. So, are you ready for another quest to help the men of the forest?", - "There is a problem with one of our deer stands. Right. Well, there are two problems, our deer stands - and some of the walls of the buildings in the camp are broken. ...", - "You know, the guys built all of that themselves. Sure, at first it didn't quite work out as we planned and in the end we had to tear down half the forest - but - it was worth it. ...", - "Still, most of the camp is kind of... broken now. And someone with a good hammer and a steady hand needs to fix that. Or I am afraid we will have to freeze... during the cold evenings... well you know, hard times. ...", - "So what do you say, in for this one?", - }, npc, creature) - npcHandler:setTopic(playerId, 4) - elseif (getPlayerStorageValue(creature, Storage.RottinWoodAndMaried.Mission03) == 3) and getPlayerStorageValue(creature, Storage.RottinWoodAndMaried.RottinStart) > 4 then - npcHandler:say("Ah there you are. So, did you repair all the broken structures?", npc, creature) - npcHandler:setTopic(playerId, 5) - ------------------------ FINISH MISSION 02 ------------------------ - elseif getPlayerStorageValue(creature, Storage.RottinWoodAndMaried.Mission03) == 4 then - npcHandler:say({ - "Oh my good friend, good to see you! Today you will help us with a very important task. Very important indeed. ...", - "You know, a large group of merchants is travelling from Thais to Venore and they are crossing the forest to shorten their way - can you believe it? ...", - "They will enter the forest near our camp which is where you come in - uhm I mean you do want to help us with this, right?", - }, npc, creature) - npcHandler:setTopic(playerId, 6) - elseif (getPlayerStorageValue(creature, Storage.RottinWoodAndMaried.Mission03) == 5) and getPlayerStorageValue(creature, Storage.RottinWoodAndMaried.Corpse) == 4 then - npcHandler:say("You did it!! And I assume you took only what you needed? Heh. No, I know it. Because my men took the rest. Thanks for helping us, you did a very good job. In fact I have a little 'extra' for you here, thanks again.", npc, creature) - ------------------ RESET STORAGE -------------------- - setPlayerStorageValue(creature, Storage.RottinWoodAndMaried.Mission03, -1) -- reset storage - setPlayerStorageValue(creature, Storage.RottinWoodAndMaried.RottinStart, -1) -- reset storage - setPlayerStorageValue(creature, Storage.RottinWoodAndMaried.Trap, -1) -- reset storage - setPlayerStorageValue(creature, Storage.RottinWoodAndMaried.Corpse, -1) -- reset storage - ----------------------------------------------------- - setPlayerStorageValue(creature, Storage.RottinWoodAndMaried.Time, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) -- set time to start mission again - setPlayerStorageValue(creature, Storage.RottinWoodAndMaried.Questline, 2) -- quest log - ------------------- ITEM RANDOM -------------------- - local items = { - [0] = { id = 3035, count = 3, chance = 100 }, - [1] = { id = 3053, count = 1, chance = 80 }, - [2] = { id = 12260, count = 1, chance = 25 }, - } - for i = 0, #items do - if items[i].chance > math.random(1, 100) then - doPlayerAddItem(creature, items[i].id, items[i].count) - ---------------------------------------------------- - npcHandler:setTopic(playerId, 0) + -- Checks if Mission 03 is completed and the cooldown has expired + elseif getPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Mission03) == 2 then + if getPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Time) <= os.time() then + npcHandler:say({ + "Of course, of course, there is indeed something you can help us with. Remember that we also have some tasks for you. So, are you ready for another quest to help the men of the forest?", + "There is a problem with one of our deer stands. Right. Well, there are two problems, our deer stands - and some of the walls of the buildings in the camp are broken. ...", + "You know, the guys built all of that themselves. Sure, at first it didn't quite work out as we planned and in the end we had to tear down half the forest - but - it was worth it. ...", + "Still, most of the camp is kind of... broken now. And someone with a good hammer and a steady hand needs to fix that. Or I am afraid we will have to freeze... during the cold evenings... well you know, hard times. ...", + "So what do you say, in for this one?", + }, npc, creature) + npcHandler:setTopic(playerId, 4) + else + npcHandler:say("You need to wait some hours to take another mission again or you are still on a mission.", npc, creature) + end + + -- Checks if Mission 04 is completed and the cooldown has expired + elseif (getPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Mission03) == 3) and getPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.RottinStart) >= 4 then + if getPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Time) <= os.time() then + npcHandler:say("Ah there you are. So, did you repair all the broken structures?", npc, creature) + npcHandler:setTopic(playerId, 5) + else + npcHandler:say("You need to wait some hours to take another mission again or you are still on a mission.", npc, creature) + end + + -- Checks if Mission 05 is completed and the cooldown has expired + elseif getPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Mission03) == 4 then + if getPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Time) <= os.time() then + npcHandler:say({ + "Oh |PLAYERNAME| my good friend, good to see you! Today you will help us with a very important task. Very important indeed. ...", + "You know, a large group of merchants is travelling from Thais to Venore and they are crossing the forest to shorten their way - can you believe it? ...", + "They will enter the forest near our camp which is where you come in - uhm I mean you do want to help us with this, right?", + }, npc, creature) + npcHandler:setTopic(playerId, 6) + else + npcHandler:say("You need to wait some hours to take another mission again or you are still on a mission.", npc, creature) + end + + -- Checks if Mission 06 is completed and the cooldown has expired + elseif (getPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Mission03) == 5) and getPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Corpse) == 4 then + if getPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Time) <= os.time() then + npcHandler:say("You did it!! And I assume you took only what you needed? Heh. No, I know it. Because my men took the rest. Thanks for helping us, you did a very good job. In fact I have a little 'extra' for you here, thanks again.", npc, creature) + -- Checks if this is the first time the quest is completed + if getPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.FirstTime) == 0 then + player:addExperience(1000, true) -- Adds 1000 experience on the first time + setPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.FirstTime, 1) -- Marks the quest as completed for the first time + else + player:addExperience(100, true) -- Adds 100 experience on subsequent completions + end + -- Resets storage values to start new missions + setPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Mission03, -1) -- reset storage + setPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.RottinStart, -1) -- reset storage + setPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Trap, -1) -- reset storage + setPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Corpse, -1) -- reset storage + -- Sets the time to start a new mission + setPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Time, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) -- set time to start mission again + setPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Questline, 2) -- quest log + -- Gives a reward item to the player + local items = { + [0] = { id = 3035, count = 3, chance = 100 }, + [1] = { id = 3053, count = 1, chance = 80 }, + [2] = { id = 12260, count = 1, chance = 25 }, + } + for i = 0, #items do + if items[i].chance > math.random(1, 100) then + doPlayerAddItem(creature, items[i].id, items[i].count) + npcHandler:setTopic(playerId, 0) + end end + else + npcHandler:say("You need to wait some hours to take another mission again or you are still on a mission.", npc, creature) end end ------------------------ FINISH MISSION 03 ------------------------ @@ -117,32 +149,33 @@ local function creatureSayCallback(npc, creature, type, message) "We will need at least seven. And seven is a lucky number, don't you think? Heh. ...", "If you need some more ribbons just come back to me and ask.", }, npc, creature) - setPlayerStorageValue(creature, Storage.RottinWoodAndMaried.Mission03, 1) - setPlayerStorageValue(creature, Storage.RottinWoodAndMaried.Questline, 1) -- quest log + setPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Mission03, 1) + setPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Questline, 1) -- quest log doPlayerAddItem(creature, 12171, 7) npcHandler:setTopic(playerId, 0) elseif (npcHandler:getTopic(playerId) == 3) and getPlayerItemCount(creature, 12173) >= 7 then npcHandler:say("Good hunt. That will be enough to help us uhm... get through the winter yes. Now if you want to help us getting even more lucky charms, you can always ask.", npc, creature) doPlayerRemoveItem(creature, 12173, 7) - setPlayerStorageValue(creature, Storage.RottinWoodAndMaried.Mission03, 2) - setPlayerStorageValue(creature, Storage.RottinWoodAndMaried.Questline, 4) -- quest log + setPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Mission03, 2) + setPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Questline, 4) -- quest log + setPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Time, os.time() + (20 * 3600)) -- 20 hours npcHandler:setTopic(playerId, 0) elseif (npcHandler:getTopic(playerId) == 3) and getPlayerItemCount(creature, 12173) <= 6 then npcHandler:say("You do not have sufficient rabbit's foot.", npc, creature) - ------------------------ FINISH MISSION 01 ------------------------ elseif npcHandler:getTopic(playerId) == 4 then npcHandler:say("Good, good. Do you remember the old saying? If it ain't broken, it was not made by us. Now, off you go!", npc, creature) - setPlayerStorageValue(creature, Storage.RottinWoodAndMaried.Mission03, 3) - setPlayerStorageValue(creature, Storage.RottinWoodAndMaried.Questline, 3) -- quest log + setPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Mission03, 3) + setPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Questline, 3) -- quest log npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 5 then npcHandler:say({ "Mmmmh, I have to say - good workmanship. No doubt. Yes, the person who made that tool you used to fix all this was a pure professional. Something I can't say about your work, though. ...", "The walls look as if they will come off in a matter of hours. Oh well, you can always come back and repair this mess, ask me for a task if you want to. Yeah, yeah and here's your reward for today.", }, npc, creature) - setPlayerStorageValue(creature, Storage.RottinWoodAndMaried.Mission03, 4) - setPlayerStorageValue(creature, Storage.RottinWoodAndMaried.Questline, 6) -- quest log + setPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Mission03, 4) + setPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Questline, 6) -- quest log + setPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Time, os.time() + (20 * 3600)) -- 20 hours doPlayerAddItem(creature, 3035, 5) npcHandler:setTopic(playerId, 0) ------------------------ FINISH MISSION 02 ------------------------ @@ -165,8 +198,8 @@ local function creatureSayCallback(npc, creature, type, message) "Off you go and - good hunt, heh.", }, npc, creature) doPlayerAddItem(creature, 12186, 5) - setPlayerStorageValue(creature, Storage.RottinWoodAndMaried.Mission03, 5) - setPlayerStorageValue(creature, Storage.RottinWoodAndMaried.Questline, 5) -- quest log + setPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Mission03, 5) + setPlayerStorageValue(creature, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Questline, 5) -- quest log npcHandler:setTopic(playerId, 0) ------------------------ FINISH MISSION 03 ------------------------ end @@ -174,6 +207,8 @@ local function creatureSayCallback(npc, creature, type, message) return true end +npcHandler:setMessage(MESSAGE_GREET, "Hunter's greeting! I assume you want something from me since you came all the way out here on your own. This is a dangerous place to be, I doubt that all my men will accept strangers like I do. You don't seem to have any problems with that, though.") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/sam.lua b/data-otservbr-global/npc/sam.lua index 0fb2e8e1b5a..77b082ec02e 100644 --- a/data-otservbr-global/npc/sam.lua +++ b/data-otservbr-global/npc/sam.lua @@ -94,7 +94,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "2000 steel shields") then - if player:getStorageValue(Storage.WhatAFoolish.Questline) ~= 29 or player:getStorageValue(Storage.WhatAFoolish.Contract) == 2 then + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline) ~= 29 or player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Contract) == 2 then npcHandler:say("My offers are weapons, armors, helmets, legs, and shields. If you'd like to see my offers, ask me for a {trade}.", npc, creature) return true end @@ -102,7 +102,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("What? You want to buy 2000 steel shields??", npc, creature) npcHandler:setTopic(playerId, 2) elseif MsgContains(message, "contract") then - if player:getStorageValue(Storage.WhatAFoolish.Contract) == 0 then + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Contract) == 0 then npcHandler:say("Have you signed the contract?", npc, creature) npcHandler:setTopic(playerId, 4) end @@ -124,7 +124,6 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 3) elseif npcHandler:getTopic(playerId) == 3 then player:addItem(129, 1) - player:setStorageValue(Storage.WhatAFoolish.Contract, 1) npcHandler:say("Fine! Here is the contract. Please sign it. Talk to me about it again when you're done.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 4 then @@ -134,7 +133,7 @@ local function creatureSayCallback(npc, creature, type, message) return true end - player:setStorageValue(Storage.WhatAFoolish.Contract, 2) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Contract, 1) npcHandler:say("Excellent! I will start working right away! Now that I am going to be rich, I will take the opportunity to tell some people what I REALLY think about them!", npc, creature) npcHandler:setTopic(playerId, 0) end diff --git a/data-otservbr-global/npc/santiago.lua b/data-otservbr-global/npc/santiago.lua index a893dd66e86..c55210f3b5c 100644 --- a/data-otservbr-global/npc/santiago.lua +++ b/data-otservbr-global/npc/santiago.lua @@ -64,58 +64,58 @@ local function greetCallback(npc, creature) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage) < 1 then - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage, 1) - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoQuestLog, 1) + if player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage) < 1 then + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage, 1) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoQuestLog, 1) npcHandler:setMessage(MESSAGE_GREET, "Hello |PLAYERNAME|, nice to see you on Rookgaard! I saw you walking by and wondered if you could help me. Could you? Please, say {yes}!") storeTalkCid[playerId] = 0 - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage) == 1 then npcHandler:setMessage(MESSAGE_GREET, "Oh, |PLAYERNAME|, it's you again! It's probably impolite to disturb a busy adventurer like you, but I really need help. Please, say {yes}!") storeTalkCid[playerId] = 0 - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage) == 2 then npcHandler:say("Oh, what's wrong? As I said, simply go to my house south of here and go upstairs. Then come back and we'll continue our chat.", npc, creature) Position(32033, 32277, 6):sendMagicEffect(CONST_ME_TUTORIALARROW) return false - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage) == 3 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage) == 3 then npcHandler:setMessage(MESSAGE_GREET, "Welcome back, |PLAYERNAME|! Ahh, you found my chest. Let me take a look at you. You put on that coat, {yes}?") storeTalkCid[playerId] = 2 - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage) == 4 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage) == 4 then npcHandler:setMessage(MESSAGE_GREET, "Hey, I want to give you a weapon for free! You should not refuse that, in fact you should say '{yes}'!") storeTalkCid[playerId] = 2 - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage) == 5 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage) == 5 then npcHandler:say("I've forgotten to tell you something. Of course I need proof that you killed cockroaches. Please bring me at least 3 of their legs. Good luck!", npc, creature) return false - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage) == 6 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage) == 6 then if player:removeItem(7882, 3) then npcHandler:setMessage(MESSAGE_GREET, "Good job! For that, I'll grant you 100 experience points! Oh - what was that? I think you advanced a level, {right}?") player:addExperience(100, true) player:getPosition():sendMagicEffect(CONST_ME_GIFT_WRAPS) - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoQuestLog, 5) - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage, 7) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoQuestLog, 5) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage, 7) storeTalkCid[playerId] = 4 else npcHandler:say("I've forgotten to tell you something. Of course I need proof that you killed cockroaches. Please bring me at least 3 of their legs. Good luck!", npc, creature) return false end - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage) == 7 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage) == 7 then npcHandler:setMessage(MESSAGE_GREET, "Welcome back! Where were we... ? Ah, right, I asked you if you saw your 'level up'! You did, {right}?") storeTalkCid[playerId] = 4 - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage) == 8 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage) == 8 then npcHandler:setMessage(MESSAGE_GREET, "Welcome back! Where were we... ? Ah, right, I asked you if those nasty cockroaches {hurt} you! Did they?") storeTalkCid[playerId] = 5 - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage) == 9 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage) == 9 then npcHandler:setMessage(MESSAGE_GREET, "Welcome back! Where were we... ? Ah, right, I asked you if I should demonstrate some damage on you. Let's do it, {okay}?") storeTalkCid[playerId] = 6 - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage) == 10 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage) == 10 then npcHandler:setMessage(MESSAGE_GREET, "Welcome back! Where were we... ? Ah, right, I was about to show you how you regain health, right?") storeTalkCid[playerId] = 7 - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage) == 11 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage) == 11 then npcHandler:setMessage(MESSAGE_GREET, "Welcome back! Where were we... ? Ah, right, I gave you a fish to eat?") storeTalkCid[playerId] = 8 - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage) == 12 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage) == 12 then npcHandler:setMessage(MESSAGE_GREET, "Welcome back! Where were we... ? Ah, right, I asked you if you saw Zirella! Did you?") storeTalkCid[playerId] = 9 - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage) == 13 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage) == 13 then npcHandler:setMessage(MESSAGE_GREET, "Hello again, |PLAYERNAME|! It's great to see you. If you like, we can chat a little. Just use the highlighted {keywords} again to choose a {topic}.") end return true @@ -136,8 +136,8 @@ local function creatureSayCallback(npc, creature, type, message) storeTalkCid[playerId] = 1 elseif storeTalkCid[playerId] == 1 then npcHandler:say("Alright! Do you see the button called 'Quest Log'? There you can check the status of quests, like this one. {Bye} for now!", npc, creature) - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage, 2) - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoQuestLog, 2) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage, 2) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoQuestLog, 2) player:sendTutorial(3) npcHandler:removeInteraction(npc, creature) npcHandler:resetNpc(creature) @@ -146,7 +146,7 @@ local function creatureSayCallback(npc, creature, type, message) local coatSlot = player:getSlotItem(CONST_SLOT_ARMOR) if coatSlot then npcHandler:say("Ah, no need to say anything, I can see it suits you perfectly. Now we're getting to the fun part, let's get you armed! Are you ready for some {action}?", npc, creature) - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage, 4) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage, 4) storeTalkCid[playerId] = 3 else npcHandler:say("Oh, you don't wear it properly yet. You need to drag and drop it from your bag to your armor slot. Here, let me show you again. Is it a little {clearer} now?", npc, creature) @@ -160,30 +160,30 @@ local function creatureSayCallback(npc, creature, type, message) end elseif storeTalkCid[playerId] == 3 then npcHandler:say("I knew I could count on you. Here, take this good and sturdy weapon in your hand. Then go back to my house and down the ladder. Good luck, and {bye} for now!", npc, creature) - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoQuestLog, 4) - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage, 5) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoQuestLog, 4) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage, 5) Position(32036, 32277, 6):sendMagicEffect(CONST_ME_TUTORIALARROW) player:addItem(3270, 1) npcHandler:removeInteraction(npc, creature) npcHandler:resetNpc(creature) elseif storeTalkCid[playerId] == 4 then npcHandler:say("That's just great! Now you have more health points, can carry more stuff and walk faster. Talking about health, did you get {hurt} by those cockroaches?", npc, creature) - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage, 8) - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoQuestLog, 6) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage, 8) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoQuestLog, 6) storeTalkCid[playerId] = 5 elseif storeTalkCid[playerId] == 5 then npcHandler:say("Really? You look fine to me, must have been just a scratch. Well, there are much more dangerous monsters than cockroaches out there. Take a look at your status bar. You have 155 Health right now. I'll show you something, {yes}?", npc, creature) player:sendTutorial(19) - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage, 9) - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoQuestLog, 7) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage, 9) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoQuestLog, 7) storeTalkCid[playerId] = 6 elseif storeTalkCid[playerId] == 6 then npcHandler:say("This is an important lesson from me - an experienced veteran fighter. Take this! Look at your status bar again. As you can see, you've lost health. Now I'll tell you how to heal that, {yes}?", npc, creature) player:getPosition():sendMagicEffect(CONST_ME_MORTAREA) npc:getPosition():sendMagicEffect(CONST_ME_MORTAREA) player:addHealth(-20, COMBAT_PHYSICALDAMAGE) - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage, 10) - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoQuestLog, 8) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage, 10) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoQuestLog, 8) player:sendTutorial(19) storeTalkCid[playerId] = 7 elseif storeTalkCid[playerId] == 7 then @@ -191,19 +191,19 @@ local function creatureSayCallback(npc, creature, type, message) "Here, take this fish which I've caught myself. Find it in your inventory, then 'Use' it to eat it. This will slowly refill your health. ...", "By the way: If your hitpoints are below 150, you will regenerate back to 150 hitpoints after few seconds as long as you are not hungry, outside a protection zone and do not have a battle sign. {Easy}, yes?", }, npc, creature) - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoQuestLog, 9) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoQuestLog, 9) player:addItem(3578, 1) - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage, 11) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage, 11) storeTalkCid[playerId] = 8 elseif storeTalkCid[playerId] == 8 then npcHandler:say("I knew you'd get it right away. You can loot food from many creatures, such as deer and rabbits. You can find them in the forest nearby. By the way... have you seen {Zirella}?", npc, creature) - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage, 12) - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoQuestLog, 10) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage, 12) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoQuestLog, 10) storeTalkCid[playerId] = 9 elseif storeTalkCid[playerId] == 9 then npcHandler:say("Really?? She was looking for someone to help her. Maybe you could go and see her. She lives just to the east and down the mountain. So, thank you again and {bye} for now!", npc, creature) - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage, 13) - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoQuestLog, 11) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage, 13) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoQuestLog, 11) player:addMapMark(Position(32045, 32270, 6), MAPMARK_GREENSOUTH, "To Zirella") npcHandler:removeInteraction(npc, creature) npcHandler:resetNpc(creature) @@ -214,15 +214,15 @@ local function creatureSayCallback(npc, creature, type, message) player:getPosition():sendMagicEffect(CONST_ME_MORTAREA) npc:getPosition():sendMagicEffect(CONST_ME_MORTAREA) player:addHealth(-20, COMBAT_PHYSICALDAMAGE) - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage, 8) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage, 8) player:sendTutorial(19) storeTalkCid[playerId] = 7 end elseif MsgContains(message, "action") then if storeTalkCid[playerId] == 3 then npcHandler:say("I knew I could count on you. Here, take this good and sturdy weapon in your hand. Then go back to my house and down the ladder. Good luck, and {bye} for now!", npc, creature) - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoQuestLog, 4) - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage, 5) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoQuestLog, 4) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage, 5) Position(32036, 32277, 6):sendMagicEffect(CONST_ME_TUTORIALARROW) player:addItem(3270, 1) npcHandler:removeInteraction(npc, creature) @@ -231,8 +231,8 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "easy") then if storeTalkCid[playerId] == 8 then npcHandler:say("I knew you'd get it right away. You can loot food from many creatures, such as deer and rabbits. You can find them in the forest nearby. By the way... have you seen {Zirella}?", npc, creature) - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage, 11) - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoQuestLog, 10) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage, 11) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoQuestLog, 10) storeTalkCid[playerId] = 9 end end diff --git a/data-otservbr-global/npc/satsu.lua b/data-otservbr-global/npc/satsu.lua index d925e5b5d37..481f48d3925 100644 --- a/data-otservbr-global/npc/satsu.lua +++ b/data-otservbr-global/npc/satsu.lua @@ -63,6 +63,11 @@ npcConfig.shop = { { itemName = "cocktail glass of tea", clientId = 9232, buy = 52, count = 17 }, { itemName = "cocktail glass of water", clientId = 9232, buy = 52, count = 1 }, { itemName = "cocktail glass of wine", clientId = 9232, buy = 52, count = 2 }, + { itemName = "vial of beer", clientId = 2874, buy = 52, count = 1, subType = 3 }, + { itemName = "vial of wine", clientId = 2874, buy = 52, count = 1, subType = 2 }, + { itemName = "vial of milk", clientId = 2874, buy = 52, count = 1, subType = 9 }, + { itemName = "vial of mead", clientId = 2874, buy = 52, count = 1, subType = 16 }, + { itemName = "vial of water", clientId = 2874, buy = 52, count = 1 }, } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/serafin.lua b/data-otservbr-global/npc/serafin.lua index fe6a57ca249..913a1f63953 100644 --- a/data-otservbr-global/npc/serafin.lua +++ b/data-otservbr-global/npc/serafin.lua @@ -54,8 +54,9 @@ local BloodBrothers = Storage.Quest.U8_4.BloodBrothers local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() + if message == "cookie" then - if player:getStorageValue(BloodBrothers.Mission02) == 1 and player:getItemCount(8199) > 0 and player:getStorageValue(BloodBrothers.Cookies.Serafin) < 0 then + if player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission02) == 1 and player:getItemCount(8199) > 0 and player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Serafin) < 0 then npcHandler:say("Oh, no I don't sell cookies. Or, do you mean you'd like to give me one?", npc, creature) npcHandler:setTopic(playerId, 1) else @@ -64,14 +65,14 @@ local function creatureSayCallback(npc, creature, type, message) elseif message == "yes" then if npcHandler:getTopic(playerId) == 1 and player:removeItem(8199, 1) then -- garlic cookie npcHandler:say("COUGH?! What kind of a mean trick is that? Get out of my shop!", npc, creature) - player:setStorageValue(BloodBrothers.Cookies.Serafin, 1) + player:setStorageValue(Storage.Quest.U8_4.BloodBrothers.Cookies.Serafin, 1) npcHandler:setTopic(playerId, 0) end end end --Basic keywordHandler:addKeyword({ "alori mort" }, StdModule.say, { npcHandler = npcHandler, text = "There's something about these words which makes me feel awkward. Or maybe it's you who causes that feeling. You better get lost." }, function(player) - return player:getStorageValue(BloodBrothers.Mission03) == 1 + return player:getStorageValue(Storage.Quest.U8_4.BloodBrothers.Mission03) == 1 end) npcHandler:setMessage(MESSAGE_GREET, "Welcome to my fruit and vegetable store, |PLAYERNAME|! Ask me for a {trade} if you'd like to see my wares.") diff --git a/data-otservbr-global/npc/shoddy_beggar.lua b/data-otservbr-global/npc/shoddy_beggar.lua index 14707c2e050..76ebd24b6b2 100644 --- a/data-otservbr-global/npc/shoddy_beggar.lua +++ b/data-otservbr-global/npc/shoddy_beggar.lua @@ -71,23 +71,27 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Hmm, if you can spare a coin... we can talk. What do you say?", npc, creature) npcHandler:setTopic(playerId, 1) elseif MsgContains(message, "device") then - if player:getStorageValue(Storage.SeaOfLight.Questline) == 1 then + if player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) == 1 then npcHandler:say("Persistent little nuisance, aren't we? Well, I like your spirit so I will tell you a secret. I may not look the part but I was once a {scientist}. The academy seemed to not like my... attitude and never actually invited me.", npc, creature) end elseif MsgContains(message, "scientist") then - if player:getStorageValue(Storage.SeaOfLight.Questline) == 1 then + if player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) == 1 then npcHandler:say("Indeed, I was one myself a long time ago. I may seem a little... distracted by now, but I was working on many important projects. I even created a device to... well, it will cost you another gold coin if you want me to tell you the whole story. You're in?", npc, creature) npcHandler:setTopic(playerId, 2) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then if not player:removeMoneyBank(1) then - npcHandler:say(player:getStorageValue(Storage.SeaOfLight.Questline) ~= 1 and "Is that all you have? That would be less than I have... *mumbles*" or "Mh, it seems you don't have any coins.", npc, creature) + npcHandler:say(player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) ~= 1 and "Is that all you have? That would be less than I have... *mumbles*" or "Mh, it seems you don't have any coins.", npc, creature) npcHandler:setTopic(playerId, 0) return true end - npcHandler:say(player:getStorageValue(Storage.SeaOfLight.Questline) ~= 1 and "Very kind indeed. Maybe you are not such a bad guy after all. Maybe I can even give it back to you one day... you know I was not always like that *mumbles*." or "Thank you very much... plans you say? I don't know what you are talking about. Plans for a magic... device? And the people call ME crazy.", npc, creature) + npcHandler:say( + player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) ~= 1 and "Very kind indeed. Maybe you are not such a bad guy after all. Maybe I can even give it back to you one day... you know I was not always like that *mumbles*." or "Thank you very much... plans you say? I don't know what you are talking about. Plans for a magic... device? And the people call ME crazy.", + npc, + creature + ) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then if not player:removeMoneyBank(1) then @@ -124,8 +128,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 11 then player:addItem(9696, 1) - player:setStorageValue(Storage.SeaOfLight.Questline, 2) - player:setStorageValue(Storage.SeaOfLight.Mission1, 2) + player:setStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline, 2) + player:setStorageValue(Storage.Quest.U8_54.SeaOfLight.Mission1, 2) npcHandler:say("Well, to be honest, I envy him a little. He can continue his research in his laboratory. He still has working equipment... I sometimes read his publications. He is an able man, but completely on the wrong track... give these plans to him.", npc, creature) npcHandler:setTopic(playerId, 0) end diff --git a/data-otservbr-global/npc/siflind.lua b/data-otservbr-global/npc/siflind.lua index 5ac37322855..fc4fc111da8 100644 --- a/data-otservbr-global/npc/siflind.lua +++ b/data-otservbr-global/npc/siflind.lua @@ -59,54 +59,54 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.TheIceIslands.Questline) == 5 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 5 then npcHandler:say("I heard you have already helped our cause. Are you interested in another mission, even when it requires you to travel to a distant land?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 7 then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 7 then npcHandler:say("Well done. The termites caused just the distraction that we needed. Are you ready for the next step of my plan?", npc, creature) npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 9 then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 9 then npcHandler:say("You saved the lives of many innocent animals. Thank you very much. If you are looking for another mission, just ask me.", npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 10) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 10) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 10 then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 10 then npcHandler:say("Our warriors need a more potent yet more secure berserker elixir to fight our enemies. To brew it, I need several ingredients. The first things needed are 5 bat wings. Bring them to me and Ill tell you the next ingredients we need.", npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 11) - player:setStorageValue(Storage.TheIceIslands.Mission05, 1) -- Questlog The Ice Islands Quest, Nibelor 4: Berserk Brewery + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 11) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission05, 1) -- Questlog The Ice Islands Quest, Nibelor 4: Berserk Brewery npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 11 then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 11 then npcHandler:say("Do you have the 5 bat wings I requested?", npc, creature) npcHandler:setTopic(playerId, 5) - elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 12 then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 12 then npcHandler:say("The second things needed are 4 bear paws. Bring them to me and Ill tell you the next ingredients we need.", npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 13) - player:setStorageValue(Storage.TheIceIslands.Mission05, 2) -- Questlog The Ice Islands Quest, Nibelor 4: Berserk Brewery + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 13) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission05, 2) -- Questlog The Ice Islands Quest, Nibelor 4: Berserk Brewery npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 13 then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 13 then npcHandler:say("Do you have the 4 bear paws I requested?", npc, creature) npcHandler:setTopic(playerId, 6) - elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 14 then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 14 then npcHandler:say("The next things needed are 3 bonelord eyes. Bring them to me and Ill tell you the next ingredients we need.", npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 15) - player:setStorageValue(Storage.TheIceIslands.Mission05, 3) -- Questlog The Ice Islands Quest, Nibelor 4: Berserk Brewery + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 15) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission05, 3) -- Questlog The Ice Islands Quest, Nibelor 4: Berserk Brewery npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 15 then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 15 then npcHandler:say("Do you have the 3 bonelord eyes I requested?", npc, creature) npcHandler:setTopic(playerId, 7) - elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 16 then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 16 then npcHandler:say("The next things needed are 2 fish fins. Bring them to me and Ill tell you the next ingredients we need.", npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 17) - player:setStorageValue(Storage.TheIceIslands.Mission05, 4) -- Questlog The Ice Islands Quest, Nibelor 4: Berserk Brewery + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 17) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission05, 4) -- Questlog The Ice Islands Quest, Nibelor 4: Berserk Brewery npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 17 then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 17 then npcHandler:say("Do you have the 2 fish fins I requested?", npc, creature) npcHandler:setTopic(playerId, 8) - elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 18 then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 18 then npcHandler:say("The last thing needed is a green dragon scale. Bring them to me and Ill tell you the next ingredients we need.", npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 19) - player:setStorageValue(Storage.TheIceIslands.Mission05, 5) -- Questlog The Ice Islands Quest, Nibelor 4: Berserk Brewery + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 19) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission05, 5) -- Questlog The Ice Islands Quest, Nibelor 4: Berserk Brewery npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TheIceIslands.Questline) == 19 then + elseif player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 19 then npcHandler:say("Do you have the green dragon scale I requested?", npc, creature) npcHandler:setTopic(playerId, 9) else @@ -123,8 +123,8 @@ local function creatureSayCallback(npc, creature, type, message) "Take this jug here and travel to the jungle of Tiquanda. There you will find a race of wood eating ants called termites. Use the jug on one of their hills to catch some of them ...", "Then find someone in Svargrond that brings you to Tyrsung. There, release the termites on the bottom of a mast in the hull of the hunters' ship. If you are done, report to me about your mission.", }, npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 6) - player:setStorageValue(Storage.TheIceIslands.Mission03, 1) -- Questlog The Ice Islands Quest, Nibelor 2: Ecological Terrorism + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 6) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission03, 1) -- Questlog The Ice Islands Quest, Nibelor 2: Ecological Terrorism player:addItem(7243, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then @@ -140,13 +140,13 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 4 then npcHandler:say("So let's proceed. Take this vial of paint. Travel to Tyrsung again and ruin as many pelts of baby seals as possible before the paint runs dry or freezes. Then return here to report about your mission. ", npc, creature) player:addItem(7253, 1) - player:setStorageValue(Storage.TheIceIslands.Questline, 8) - player:setStorageValue(Storage.TheIceIslands.Mission04, 1) -- Questlog The Ice Islands Quest, Nibelor 3: Artful Sabotage + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 8) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission04, 1) -- Questlog The Ice Islands Quest, Nibelor 3: Artful Sabotage npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 5 then -- Wings if player:removeItem(5894, 5) then npcHandler:say("Thank you very much.", npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 12) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 12) npcHandler:setTopic(playerId, 0) else npcHandler:say("Come back when you do.", npc, creature) @@ -155,7 +155,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 6 then -- Paws if player:removeItem(5896, 4) then npcHandler:say("Thank you very much.", npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 14) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 14) npcHandler:setTopic(playerId, 0) else npcHandler:say("Come back when you do.", npc, creature) @@ -164,7 +164,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 7 then -- Eyes if player:removeItem(5898, 3) then npcHandler:say("Thank you very much.", npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 16) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 16) npcHandler:setTopic(playerId, 0) else npcHandler:say("Come back when you do.", npc, creature) @@ -173,7 +173,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 8 then -- Fins if player:removeItem(5895, 2) then npcHandler:say("Thank you very much.", npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 18) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 18) npcHandler:setTopic(playerId, 0) else npcHandler:say("Come back when you do.", npc, creature) @@ -182,8 +182,8 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 9 then -- Scale if player:removeItem(5920, 1) then npcHandler:say("Thank you very much. This will help us to defend Svargrond. But I heard young Nilsor is in dire need of help. Please contact him immediately.", npc, creature) - player:setStorageValue(Storage.TheIceIslands.Questline, 20) - player:setStorageValue(Storage.TheIceIslands.Mission05, 6) -- Questlog The Ice Islands Quest, Nibelor 4: Berserk Brewery + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 20) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission05, 6) -- Questlog The Ice Islands Quest, Nibelor 4: Berserk Brewery npcHandler:setTopic(playerId, 0) else npcHandler:say("Come back when you do.", npc, creature) @@ -192,7 +192,7 @@ local function creatureSayCallback(npc, creature, type, message) end end if MsgContains(message, "buy animal cure") or MsgContains(message, "animal cure") then -- animal cure for in service of yalahar - if player:getStorageValue(Storage.InServiceofYalahar.Questline) >= 30 and player:getStorageValue(Storage.InServiceofYalahar.Questline) <= 54 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) >= 30 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) <= 54 then npcHandler:say("You want to buy animal cure for 400 gold coins?", npc, creature) npcHandler:setTopic(playerId, 13) else diff --git a/data-otservbr-global/npc/simon_the_beggar.lua b/data-otservbr-global/npc/simon_the_beggar.lua index 1706321d132..d54c1de811d 100644 --- a/data-otservbr-global/npc/simon_the_beggar.lua +++ b/data-otservbr-global/npc/simon_the_beggar.lua @@ -230,7 +230,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "cookie") then - if player:getStorageValue(Storage.WhatAFoolish.Questline) == 31 and player:getStorageValue(Storage.WhatAFoolish.CookieDelivery.SimonTheBeggar) ~= 1 then + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline) == 31 and player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.SimonTheBeggar) ~= 1 then npcHandler:say("Have you brought a cookie for the poor?", npc, creature) npcHandler:setTopic(playerId, 8) end @@ -239,12 +239,13 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 9) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 8 then - if not player:removeItem(130, 8) then + if not player:removeItem(130, 1) then npcHandler:say("You have no cookie that I'd like.", npc, creature) npcHandler:setTopic(playerId, 0) return true end - player:setStorageValue(Storage.WhatAFoolish.CookieDelivery.SimonTheBeggar, 1) + + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.SimonTheBeggar, 1) if player:getCookiesDelivered() == 10 then player:addAchievement("Allow Cookies?") end diff --git a/data-otservbr-global/npc/sinatuki.lua b/data-otservbr-global/npc/sinatuki.lua index 74809d5a351..95a2232b730 100644 --- a/data-otservbr-global/npc/sinatuki.lua +++ b/data-otservbr-global/npc/sinatuki.lua @@ -57,7 +57,7 @@ local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) if MsgContains(message, "Nupi") then - if player:getStorageValue(Storage.BarbarianTest.Questline) >= 3 and player:getStorageValue(Storage.TheIceIslands.Questline) >= 5 then + if player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) >= 3 and player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) >= 5 then for i = 1, #fishsID do if player:getItemCount(fishsID[i]) >= 100 then player:removeItem(fishsID[i], 100) diff --git a/data-otservbr-global/npc/sinclair.lua b/data-otservbr-global/npc/sinclair.lua index d2f47964d89..82c3bffa513 100644 --- a/data-otservbr-global/npc/sinclair.lua +++ b/data-otservbr-global/npc/sinclair.lua @@ -59,15 +59,6 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end -local function releasePlayer(npc, creature) - if not Player(creature) then - return - end - - npcHandler:removeInteraction(npc, creature) - npcHandler:resetNpc(creature) -end - local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() @@ -77,7 +68,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - local qStorage = player:getStorageValue(Storage.SpiritHunters.Mission01) + local qStorage = player:getStorageValue(Storage.Quest.U8_7.SpiritHunters.Mission01) if qStorage == 3 then npcHandler:say("So, did you find anything worth examining? Did you actually catch a ghost?", npc, creature) npcHandler:setTopic(playerId, 3) @@ -101,11 +92,11 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 2) elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say("Good, now all you need to do is find a ghost, defeat it and catch its very essence with the cage. Once you have it, return to me and Spectulus and I will move it into our chamber device. Good luck, return to me as soon as you are prepared.", npc, creature) - player:setStorageValue(Storage.SpiritHunters.Mission01, 3) + player:setStorageValue(Storage.Quest.U8_7.SpiritHunters.Mission01, 3) player:addItem(4050, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then - if player:getStorageValue(Storage.SpiritHunters.CharmUse) == 1 then + if player:getStorageValue(Storage.Quest.U8_7.SpiritHunters.CharmUse) == 1 then npcHandler:say({ "Fascinating, let me see. ...", "Amazing! I will transfer this to our spirit chamber right about - now! ...", @@ -113,11 +104,8 @@ local function creatureSayCallback(npc, creature, type, message) "Well, you did! You really helped us pulling this off. Thank you Lord Stalks! ...", "I doubt we will have much time to hunt for new specimens ourselves in the near future. If you like, you can continue helping us by finding and capturing more and different ghosts. Just talk to me to receive a new task.", }, npc, creature) - player:setStorageValue(Storage.SpiritHunters.Mission01, 4) + player:setStorageValue(Storage.Quest.U8_7.SpiritHunters.Mission01, 4) player:addExperience(500, true) - addEvent(function() - releasePlayer(npc, creature) - end, 1000) npcHandler:setTopic(playerId, 0) else npcHandler:say("Go and use the machine in a dead ghost!", npc, creature) @@ -131,21 +119,18 @@ local function creatureSayCallback(npc, creature, type, message) "Furhtermore, to successfully bind Nightstalkers to the cage, you will need to have caught at least 5 Ghosts. To bind Souleaters, you will need at least 5 Ghosts and 5 Nightstalkers. ...", "The higher the amount of spirit energy in the cage, the higher its effective capacity. Oh and always come back and tell me if you lose your spirit cage.", }, npc, creature) - player:setStorageValue(Storage.SpiritHunters.Mission01, 5) + player:setStorageValue(Storage.Quest.U8_7.SpiritHunters.Mission01, 5) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 5 then npcHandler:say("Good, of course you will also receive an additional monetary reward for your troubles. Are you fine with that?", npc, creature) npcHandler:setTopic(playerId, 6) elseif npcHandler:getTopic(playerId) == 6 then - local nightstalkers, souleaters, ghost = player:getStorageValue(Storage.SpiritHunters.NightstalkerUse), player:getStorageValue(Storage.SpiritHunters.SouleaterUse), player:getStorageValue(Storage.SpiritHunters.GhostUse) + local nightstalkers, souleaters, ghost = player:getStorageValue(Storage.Quest.U8_7.SpiritHunters.NightstalkerUse), player:getStorageValue(Storage.Quest.U8_7.SpiritHunters.SouleaterUse), player:getStorageValue(Storage.Quest.U8_7.SpiritHunters.GhostUse) if nightstalkers >= 4 and souleaters >= 4 and ghost >= 4 then npcHandler:say("Alright, let us see how many ghosts you caught!", npc, creature) - player:setStorageValue(Storage.SpiritHunters.Mission01, 6) - player:addExperience(8000, true) + player:setStorageValue(Storage.Quest.U8_7.SpiritHunters.Mission01, 6) + player:addExperience(10000, true) player:addItem(3035, 60) - addEvent(function() - releasePlayer(npc, creature) - end, 1000) npcHandler:setTopic(playerId, 0) else npcHandler:say("You didnt catch the ghost pieces.", npc, creature) @@ -153,7 +138,7 @@ local function creatureSayCallback(npc, creature, type, message) end end elseif MsgContains(message, "research") then - local qStorage = player:getStorageValue(Storage.SpiritHunters.Mission01) + local qStorage = player:getStorageValue(Storage.Quest.U8_7.SpiritHunters.Mission01) if qStorage == 4 then npcHandler:say({ "We are still in need of more research concerning environmental as well as psychic ecto-magical influences. Besides more common ghosts we also need some of the harder to come by nightstalkers and - if you're really hardboiled - souleaters. ...", diff --git a/data-otservbr-global/npc/sister_of_jack.lua b/data-otservbr-global/npc/sister_of_jack.lua index 6414d9ad56f..a93950dcf28 100644 --- a/data-otservbr-global/npc/sister_of_jack.lua +++ b/data-otservbr-global/npc/sister_of_jack.lua @@ -76,21 +76,14 @@ local function creatureSayCallback(npc, creature, type, message) end elseif MsgContains(message, "spectulus") then if npcHandler:getTopic(playerId) == 3 then - npcHandler:say( - "Spelltolust?! That sounds awfully nasty! What was he doing there - are you telling \z - me he lived an alternate life and he didn't even tell {mother}?", - npc, - creature - ) + npcHandler:say("Spelltolust?! That sounds awfully nasty! What was he doing there - are you telling me he lived an alternate life and he didn't even tell {mother}?", npc, creature) npcHandler:setTopic(playerId, 4) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say({ - "I knew it! He likes taking extended walks outside, leaving all the cleaning to me - \z - especially when he is working on this sculpture, this... 'thing' he tries to create. ...", - "What did he do? Since you look like a guy from the city, I bet he went to Edron in \z - secrecy or something like that, didn't he? And you are here because of that?", + "I knew it! He likes taking extended walks outside, leaving all the cleaning to me - especially when he is working on this sculpture, this... 'thing' he tries to create. ...", + "What did he do? Since you look like a guy from the city, I bet he went to Edron in secrecy or something like that, didn't he? And you are here because of that?", }, npc, creature) npcHandler:setTopic(playerId, 2) elseif npcHandler:getTopic(playerId) == 2 then @@ -98,8 +91,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 3) elseif npcHandler:getTopic(playerId) == 4 then npcHandler:say({ - "Yesss! So this time he will get it for a change! And he lived there...? He helped whom? \z - Ha! He won't get away this time! What did he do there? I see... interesting! ...", + "Yesss! So this time he will get it for a change! And he lived there...? He helped whom? Ha! He won't get away this time! What did he do there? I see... interesting! ...", "Wait till mother hears that! Oh he will be in for a surprise, I can tell you that. Ma!! Maaaaa!!", }, npc, creature) npcHandler:setTopic(playerId, 0) diff --git a/data-otservbr-global/npc/snake_eye.lua b/data-otservbr-global/npc/snake_eye.lua index 4eade5af763..d8f9db4c1f9 100644 --- a/data-otservbr-global/npc/snake_eye.lua +++ b/data-otservbr-global/npc/snake_eye.lua @@ -59,14 +59,14 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "package for rashid") then - if player:getStorageValue(Storage.TravellingTrader.Mission02) >= 1 and player:getStorageValue(Storage.TravellingTrader.Mission02) < 3 then + if player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission02) >= 1 and player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission02) < 3 then npcHandler:say("So you're the delivery boy? Go ahead, but I warn you, it's quite heavy. You can take it from the box over there.", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission02, 3) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission02, 3) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "documents") then - if player:getStorageValue(Storage.ThievesGuild.Mission04) == 1 then - player:setStorageValue(Storage.ThievesGuild.Mission04, 2) + if player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission04) == 1 then + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission04, 2) npcHandler:say("Funny thing that everyone thinks we have forgers for fake documents here. But no, we don't. The best forger is old Ahmet in Ankrahmun.", npc, creature) end end @@ -82,6 +82,8 @@ npcConfig.shop = { { itemName = "meat", clientId = 3577, buy = 6 }, { itemName = "mug of beer", clientId = 2880, buy = 5, count = 3 }, { itemName = "mug of wine", clientId = 2880, buy = 6, count = 2 }, + { itemName = "vial of beer", clientId = 2874, buy = 5, count = 1, subType = 3 }, + { itemName = "vial of wine", clientId = 2874, buy = 6, count = 1, subType = 2 }, } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/spectulus.lua b/data-otservbr-global/npc/spectulus.lua index 1b00895c4ec..442b03498cb 100644 --- a/data-otservbr-global/npc/spectulus.lua +++ b/data-otservbr-global/npc/spectulus.lua @@ -63,7 +63,7 @@ local function greetCallback(npc, creature) local playerId = creature:getId() local player = Player(creature) - if player:getStorageValue(Storage.SeaOfLight.Questline) < 10 then + if player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) < 10 then npcHandler:setMessage(MESSAGE_GREET, "Hello |PLAYERNAME|! You're late, do you have no concept of time? My mission is of utmost importance. If you are not interested in helping me, you might as well just leave.") npcHandler:setTopic(playerId, 0) else @@ -73,15 +73,6 @@ local function greetCallback(npc, creature) return true end -local function releasePlayer(npc, creature) - if not Player(creature) then - return - end - - npcHandler:removeInteraction(npc, creature) - npcHandler:resetNpc(creature) -end - local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() @@ -90,22 +81,20 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "research") then - local qStorage = player:getStorageValue(Storage.SpiritHunters.Mission01) - local tombsStorage = player:getStorageValue(Storage.SpiritHunters.TombUse) + if MsgContains(message, "research") and player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 11 then + local qStorage = player:getStorageValue(Storage.Quest.U8_7.SpiritHunters.Mission01) + local tombsStorage = player:getStorageValue(Storage.Quest.U8_7.SpiritHunters.TombUse) if qStorage == -1 then if npcHandler:getTopic(playerId) == 17 then npcHandler:say({ "Alright. Let's go. At first we need to find out more about ghosts in general. ...", - "I still need more information and values to properly calibrate the magical orientation of orange \z - and turquoise sparkle attractors which we will need to actually contain ghost-emissions. ...", + "I still need more information and values to properly calibrate the magical orientation of orange and turquoise sparkle attractors which we will need to actually contain ghost-emissions. ...", "So are you in?", }, npc, creature) npcHandler:setTopic(playerId, 18) else npcHandler:say({ - "I fine-tuned another set of devices. You are the lucky candidate to first lay eyes on some revolutionary \z - new concepts. ...", + "I fine-tuned another set of devices. You are the lucky candidate to first lay eyes on some revolutionary new concepts. ...", "Are you ready to help science once again?", }, npc, creature) npcHandler:setTopic(playerId, 12) @@ -115,260 +104,130 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 19) elseif qStorage == 2 then npcHandler:say({ - "Alright, now that we have enough results, the analysing can start. While I do this, I will need you \z - to test the magically enhanced cage Sinclair developed to contain spirits effectively. ...", - "Take the spirit cage from him and use it on the essence of a common ghost. Its essence will then be \z - sucked into the cage and we can study him right here in the safety of the academy walls.", + "Alright, now that we have enough results, the analysing can start. While I do this, I will need you to test the magically enhanced cage Sinclair developed to contain spirits effectively. ...", + "Take the spirit cage from him and use it on the essence of a common ghost. Its essence will then be sucked into the cage and we can study him right here in the safety of the academy walls.", }, npc, creature) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "mission") then - if player:getStorageValue(Storage.SeaOfLight.Questline) == -1 then - npcHandler:say( - "Alright, you look bright enough to fulfil my requests - at least you do not fall asleep while standing there. \z - Ahem... I heard about a certain inventor who created a {magic device} to actually sail the {sea of light}. \z - Will you help me find him?", - npc, - creature - ) + if player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) == -1 then + npcHandler:say("Alright, you look bright enough to fulfil my requests - at least you do not fall asleep while standing there. Ahem... I heard about a certain inventor who created a {magic device} to actually sail the {sea of light}. Will you help me find him?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.SeaOfLight.Questline) == 1 then - npcHandler:say( - "You should find the beggar somewhere in Edron. Stay persistent, \z - I'm sure he knows more than he wants to tell us.", - npc, - creature - ) - elseif player:getStorageValue(Storage.SeaOfLight.Questline) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) == 1 then + npcHandler:say("You should find the beggar somewhere in Edron. Stay persistent, I'm sure he knows more than he wants to tell us.", npc, creature) + elseif player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) == 2 then if not player:removeItem(9696, 1) then - npcHandler:say( - "o have you talked to the beggar? What did he tell you? Where are the plans...? Wh...? He did? He is? \z - You've already got the plans? Beautiful!! Amazing! Alright it will take some time to recapitulate these plans.", - npc, - creature - ) + npcHandler:say("o have you talked to the beggar? What did he tell you? Where are the plans...? Wh...? He did? He is? You've already got the plans? Beautiful!! Amazing! Alright it will take some time to recapitulate these plans.", npc, creature) return true end player:addExperience(400, true) - player:setStorageValue(Storage.SeaOfLight.Questline, 3) - player:setStorageValue(Storage.SeaOfLight.Mission1, 3) - player:setStorageValue(Storage.SeaOfLight.StudyTimer, os.time() + 1800) - npcHandler:say( - "So have you talked to the beggar? What did he tell you? Where are the plans...? Wh...? He did? He is? \z - You've already got the plans? Beautiful!! Amazing! Alright it will take some time to recapitulate these plans.", - npc, - creature - ) - addEvent(function() - releasePlayer(npc, creature) - end, 1000) - elseif player:getStorageValue(Storage.SeaOfLight.Questline) == 3 then - local timeStorage = player:getStorageValue(Storage.SeaOfLight.StudyTimer) + player:setStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline, 3) + player:setStorageValue(Storage.Quest.U8_54.SeaOfLight.Mission1, 3) + player:setStorageValue(Storage.Quest.U8_54.SeaOfLight.StudyTimer, os.time() + 1800) + npcHandler:say("So have you talked to the beggar? What did he tell you? Where are the plans...? Wh...? He did? He is? You've already got the plans? Beautiful!! Amazing! Alright it will take some time to recapitulate these plans.", npc, creature) + npcHandler:setTopic(playerId, 0) + elseif player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) == 3 then + local timeStorage = player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.StudyTimer) if timeStorage > os.time() then - npcHandler:say( - "It will take some time to work out the initial problem of the device. Come back when I've found the \z - component needed to finish it. Alright, B connects to D and another two nails marked with S go... hmmm.", - npc, - creature - ) + npcHandler:say("It will take some time to work out the initial problem of the device. Come back when I've found the component needed to finish it. Alright, B connects to D and another two nails marked with S go... hmmm.", npc, creature) elseif timeStorage > 0 and timeStorage < os.time() then - npcHandler:say( - "...connects to N942. Alright!! That's it! I just finished a prototype device! And it looks like I \z - figured out the initial failure. A very special crystal is needed for the device to work. Aren't \z - you as curious as me to know what went wrong?", - npc, - creature - ) + npcHandler:say("...connects to N942. Alright!! That's it! I just finished a prototype device! And it looks like I figured out the initial failure. A very special crystal is needed for the device to work. Aren't you as curious as me to know what went wrong?", npc, creature) npcHandler:setTopic(playerId, 2) end - elseif player:getStorageValue(Storage.SeaOfLight.Questline) == 4 then - npcHandler:say( - "Did you enter the Lost Mines yet? They are west of Edron, close to the sea. You will also need a \z - pick once you get to the crystal deposit.", - npc, - creature - ) - elseif player:getStorageValue(Storage.SeaOfLight.Questline) == 5 then + elseif player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) == 4 then + npcHandler:say("Did you enter the Lost Mines yet? They are west of Edron, close to the sea. You will also need a pick once you get to the crystal deposit.", npc, creature) + elseif player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) == 5 then if player:getItemCount(9697) == 0 then - npcHandler:say( - "Hm, so did you find a rare crystal? Show me... hey! That's not a rare crystal. What... where did \z - you get that anyway? Please return to me with the right crystal.", - npc, - creature - ) + npcHandler:say("Hm, so did you find a rare crystal? Show me... hey! That's not a rare crystal. What... where did you get that anyway? Please return to me with the right crystal.", npc, creature) return true end player:addExperience(500, true) - player:setStorageValue(Storage.SeaOfLight.Questline, 6) - player:setStorageValue(Storage.SeaOfLight.Mission2, 3) + player:setStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline, 6) + player:setStorageValue(Storage.Quest.U8_54.SeaOfLight.Mission2, 3) npcHandler:say({ - "Did you find a rare crystal? Show me... Amazing, absolutely amazing. This crystal alone is worth \z - a small fortune. Ahem, of course I'm glad you brought it to me for further research instead of \z - bringing it to a merchant. ...", + "Did you find a rare crystal? Show me... Amazing, absolutely amazing. This crystal alone is worth a small fortune. Ahem, of course I'm glad you brought it to me for further research instead of bringing it to a merchant. ...", "Please return here if you want to continue helping me with another mission.", }, npc, creature) - addEvent(function() - releasePlayer(npc, creature) - end, 3000) - elseif player:getStorageValue(Storage.SeaOfLight.Questline) == 6 then - npcHandler:say( - "Well, the only thing left to do would be to offer the crystal at the well of the collector. There \z - must be a pedestal near the well, where you need to put your donation. Ha, do you think you could do that?", - npc, - creature - ) + npcHandler:setTopic(playerId, 0) + elseif player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) == 6 then + npcHandler:say("Well, the only thing left to do would be to offer the crystal at the well of the collector. There must be a pedestal near the well, where you need to put your donation. Ha, do you think you could do that?", npc, creature) npcHandler:setTopic(playerId, 5) - elseif player:getStorageValue(Storage.SeaOfLight.Questline) == 7 then - npcHandler:say( - "Found the well yet? Look on one of the ice isles near Carlin. I'm perfectly sure that the well \z - with the pedestal is located on one of them. And be careful with the carrying device, I only have \z - this one prototype.", - npc, - creature - ) - elseif player:getStorageValue(Storage.SeaOfLight.Questline) == 8 then - npcHandler:say( - "So have you found the well and entered the lair? I hope you can find the {mirror crystal}\z - in there. It is the only way to finish the {Lightboat}.", - npc, - creature - ) - elseif player:getStorageValue(Storage.SeaOfLight.Questline) == 9 then + elseif player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) == 7 then + npcHandler:say("Found the well yet? Look on one of the ice isles near Carlin. I'm perfectly sure that the well with the pedestal is located on one of them. And be careful with the carrying device, I only have this one prototype.", npc, creature) + elseif player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) == 8 then + npcHandler:say("So have you found the well and entered the lair? I hope you can find the {mirror crystal} in there. It is the only way to finish the {Lightboat}.", npc, creature) + elseif player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) == 9 then if player:getItemCount(9699) == 0 then - npcHandler:say( - "Put the mirror crystal into the special carrying device \z - I gave you and bring it directly to me.", - npc, - creature - ) + npcHandler:say("Put the mirror crystal into the special carrying device I gave you and bring it directly to me.", npc, creature) return true end - npcHandler:say( - "Do you have the mirror crystal? Unbelievable! Alright I will extract the crystal from the device \z - myself, would you please give me the device with the crystal and step back?", - npc, - creature - ) + npcHandler:say("Do you have the mirror crystal? Unbelievable! Alright I will extract the crystal from the device myself, would you please give me the device with the crystal and step back?", npc, creature) npcHandler:setTopic(playerId, 7) - elseif (player:getStorageValue(Storage.SeaOfLight.Questline) == 10) and (player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) < 1) then - npcHandler:say( - "After the debacle with the crystal, I started focussing on other things. There are also some {tasks} \z - that still need to be done. If you can spare the time to continue helping me, it shall not be to your \z - disadvantage. So are you in for another mission?", - npc, - creature - ) + elseif (player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) == 10) and (player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) < 1) then + npcHandler:say("After the debacle with the crystal, I started focussing on other things. There are also some {tasks} that still need to be done. If you can spare the time to continue helping me, it shall not be to your disadvantage. So are you in for another mission?", npc, creature) npcHandler:setTopic(playerId, 27) elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 2 then npcHandler:say("So you found him? Have you talked to {Jack} yet?", npc, creature) npcHandler:setTopic(playerId, 30) elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 4 then - npcHandler:say( - "You're back from {Jack}! Mh, by the looks of your face I doubt our little redecoration \z - project yielded any success. But I had an even better idea while you were gone - ready to give it another try?", - npc, - creature - ) + npcHandler:say("You're back from {Jack}! Mh, by the looks of your face I doubt our little redecoration project yielded any success. But I had an even better idea while you were gone - ready to give it another try?", npc, creature) npcHandler:setTopic(playerId, 32) elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 6 then npcHandler:say("So, did you talk to his family? Were you able to convince them?", npc, creature) npcHandler:setTopic(playerId, 33) elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 8 then - npcHandler:say( - "Did you find out what hobby {Jack} has? Did you separate him from this activity? \z - Only if he has a free mind, he can truly get back to his former self! Now all you need to do is talk to him again!", - npc, - creature - ) + npcHandler:say("Did you find out what hobby {Jack} has? Did you separate him from this activity? Only if he has a free mind, he can truly get back to his former self! Now all you need to do is talk to him again!", npc, creature) npcHandler:setTopic(playerId, 0) elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 9 then npcHandler:say({ - "Oh you are back already. Hm... I doubt it worked, did it? It DID? Oh well... good job. Really! \z - Now... the thing is - the actual {Jack} wrote. No, no wait. Calm down first. ...", - "You remember me explaining the fold in time, causing a tiny disturbance in infinity? Well, as I \z - already told you, {Jack} was indeed not transported to the future... but to the past. ...", - "I received some kind of letter this morning that has been stored for me by the Academy for \z - about 70 years now. ...", - "It said it should be opened at a specific day 20 years ago to prevent this whole incident but I \z - wasn't even at the Academy by that time. Someone just found the letter earlier today and brought \z - it to my attention. ...", - "So our {Jack} here was in fact... a completely different person. Now, now... don't get upset, \z - there was no chance for me to warn you earlier! ...", - "And it wasn't all that bad, was it? Heh... I mean... everyone needs a change in life now and then! \z - And he can still come here if he likes to! ...", - "Or wait - erm... better not tell him where exactly I live, I have some kind of presentiment concerning \z - that whole affair... yes, we should just leave everything as it is now, indeed we should. ...", + "Oh you are back already. Hm... I doubt it worked, did it? It DID? Oh well... good job. Really! Now... the thing is - the actual {Jack} wrote. No, no wait. Calm down first. ...", + "You remember me explaining the fold in time, causing a tiny disturbance in infinity? Well, as I already told you, {Jack} was indeed not transported to the future... but to the past. ...", + "I received some kind of letter this morning that has been stored for me by the Academy for about 70 years now. ...", + "It said it should be opened at a specific day 20 years ago to prevent this whole incident but I wasn't even at the Academy by that time. Someone just found the letter earlier today and brought it to my attention. ...", + "So our {Jack} here was in fact... a completely different person. Now, now... don't get upset, there was no chance for me to warn you earlier! ...", + "And it wasn't all that bad, was it? Heh... I mean... everyone needs a change in life now and then! And he can still come here if he likes to! ...", + "Or wait - erm... better not tell him where exactly I live, I have some kind of presentiment concerning that whole affair... yes, we should just leave everything as it is now, indeed we should. ...", "Anyway you did a great job and I thank you for... putting your hands into my fire Player... once again.", }, npc, creature) player:addExperience(6000, true) player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 10) npcHandler:setTopic(playerId, 0) end - elseif MsgContains(message, "yes") and player:getStorageValue(Storage.SeaOfLight.Questline) < 1 then - if npcHandler:getTopic(playerId) == 1 then + elseif MsgContains(message, "yes") then + if npcHandler:getTopic(playerId) == 1 and player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) < 1 then player:addExperience(100, true) - player:setStorageValue(Storage.SeaOfLight.Questline, 1) - player:setStorageValue(Storage.SeaOfLight.Mission1, 1) + player:setStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline, 1) + player:setStorageValue(Storage.Quest.U8_54.SeaOfLight.Mission1, 1) npcHandler:say({ "That's the spirit! As time is of the essence, we should start right now. ...", - "A beggar here in Edron brags about how smart he is and that he knows about a man who lost his \z - sanity because of an experiment, but he won't tell anyone any details. Maybe he knows more.", + "A beggar here in Edron brags about how smart he is and that he knows about a man who lost his sanity because of an experiment, but he won't tell anyone any details. Maybe he knows more.", }, npc, creature) - addEvent(function() - releasePlayer(npc, creature) - end, 3000) + npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then - npcHandler:say( - "The device needs a special crystal. It's called {mirror crystal}. The inventor somehow damaged it \z - - with fatal results. He had to give up, as no second crystal was left to try. I, however, know of \z - another one... but are you up to the task?", - npc, - creature - ) + npcHandler:say("The device needs a special crystal. It's called {mirror crystal}. The inventor somehow damaged it - with fatal results. He had to give up, as no second crystal was left to try. I, however, know of another one... but are you up to the task?", npc, creature) npcHandler:setTopic(playerId, 3) elseif npcHandler:getTopic(playerId) == 3 then - npcHandler:say( - "One remaining mirror crystal is in the hands of a creature called the collector which collects all \z - kinds of crystals. The only way to get access to its lair is to donate a very rare crystal to a secret \z - well. I need you to get one, will you help me?", - npc, - creature - ) + npcHandler:say("One remaining mirror crystal is in the hands of a creature called the collector which collects all kinds of crystals. The only way to get access to its lair is to donate a very rare crystal to a secret well. I need you to get one, will you help me?", npc, creature) npcHandler:setTopic(playerId, 4) elseif npcHandler:getTopic(playerId) == 4 then - player:setStorageValue(Storage.SeaOfLight.Questline, 4) - player:setStorageValue(Storage.SeaOfLight.Mission1, 4) - player:setStorageValue(Storage.SeaOfLight.Mission2, 1) + player:setStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline, 4) + player:setStorageValue(Storage.Quest.U8_54.SeaOfLight.Mission1, 4) + player:setStorageValue(Storage.Quest.U8_54.SeaOfLight.Mission2, 1) player:addMapMark(Position(33103, 31811, 7), MAPMARK_CROSS, "Lost Mines") npcHandler:say({ - "Alright, now listen. West of Edron, near the ocean, you'll find the Lost Mines. Go down there \z - to recover one of its rare crystals. But beware, people say the mine workers who died there years \z - ago in an horrible accident are still digging. ...", - "I will mark the location of the mines on your map. Be careful when entering these muddy depths and \z - don't forget that you will need a pick to gather the crystals.", + "Alright, now listen. West of Edron, near the ocean, you'll find the Lost Mines. Go down there to recover one of its rare crystals. But beware, people say the mine workers who died there years ago in an horrible accident are still digging. ...", + "I will mark the location of the mines on your map. Be careful when entering these muddy depths and don't forget that you will need a pick to gather the crystals.", }, npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 5 then - npcHandler:say( - "Good, because if you wouldn't do it... listen, this well is on one of the isles near Carlin. \z - There you offer the crystal. Once you get access to its lair, find the collector and... convince it to give \z - you the mirror crystal. Understood?", - npc, - creature - ) + npcHandler:say("Good, because if you wouldn't do it... listen, this well is on one of the isles near Carlin. There you offer the crystal. Once you get access to its lair, find the collector and... convince it to give you the mirror crystal. Understood?", npc, creature) npcHandler:setTopic(playerId, 6) elseif npcHandler:getTopic(playerId) == 6 then - player:setStorageValue(Storage.SeaOfLight.Questline, 7) - player:setStorageValue(Storage.SeaOfLight.Mission3, 1) + player:setStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline, 7) + player:setStorageValue(Storage.Quest.U8_54.SeaOfLight.Mission3, 1) player:addItem(9698, 1) - npcHandler:say( - "To collect the unbelievably rare, practically unique mirror crystal, you will need to use this \z - special carrying device I developed. If you find the crystal, use it to store it and transport it \z - safely to me. There is no second one.", - npc, - creature - ) + npcHandler:say("To collect the unbelievably rare, practically unique mirror crystal, you will need to use this special carrying device I developed. If you find the crystal, use it to store it and transport it safely to me. There is no second one.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 7 then if not player:removeItem(9699, 1) then @@ -379,172 +238,103 @@ local function creatureSayCallback(npc, creature, type, message) player:addItem(3028, 10) player:addItem(3037, 1) player:addExperience(1000, true) - player:setStorageValue(Storage.SeaOfLight.Mission3, 4) - player:setStorageValue(Storage.SeaOfLight.Questline, 10) + player:setStorageValue(Storage.Quest.U8_54.SeaOfLight.Mission3, 4) + player:setStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline, 10) npcHandler:say({ "Ah yes, slowly, carefully, careful ...", "...and how shiny it is, almost there ...", "...now wh- no, NO, NOOO! It just ...", "...slipped. And cracked. Don't look at me like that ...", - "...I need some time to get over this. What? Oh, yes you can take the remains if you like. \z - Just get it out of my sight.", + "...I need some time to get over this. What? Oh, yes you can take the remains if you like. Just get it out of my sight.", + "A debacle, catastrophe, disaster - I need time to fully understand what chance just slipped through our hands here... hm? Oh yes, yes through my hands, my hands of course. Now would you please leave me alone?!", }, npc, creature) - addEvent(function() - releasePlayer(npc, creature) - end, 5000) + npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 12 then - npcHandler:say( - "Of course you are. And here we go. I have to ask some questions first. One: You aint \z - afraid of no ghost, right?", - npc, - creature - ) + npcHandler:say("Of course you are. And here we go. I have to ask some questions first. One: You aint afraid of no ghost, right?", npc, creature) npcHandler:setTopic(playerId, 13) elseif npcHandler:getTopic(playerId) == 13 then - npcHandler:say( - "Good. Two: You know that ghosts exist and/or have found and/or defeated \z - one or more of them?", - npc, - creature - ) + npcHandler:say("Good. Two: You know that ghosts exist and/or have found and/or defeated one or more of them?", npc, creature) npcHandler:setTopic(playerId, 14) elseif npcHandler:getTopic(playerId) == 14 then npcHandler:say({ "Alright. Let's see - yes. ...", - "Three: You can explain at least three of the following terms, infestations, \z - collective apparitions, ectoplasmic segregations, ecto-magical field phenomena, \z - neuro-speculative sub-conscious awareness of spirits, ghosts and/or ghasts.", + "Three: You can explain at least three of the following terms, infestations, collective apparitions, ectoplasmic segregations, ecto-magical field phenomena, neuro-speculative sub-conscious awareness of spirits, ghosts and/or ghasts.", }, npc, creature) npcHandler:setTopic(playerId, 15) elseif npcHandler:getTopic(playerId) == 16 then npcHandler:say({ - "I recently teamed up with a fellow scientist and friend Sinclair, who is also more \z - of an explorer than me, to combine our discoveries in the field of complex phenomena \z - not that easily to describe just by today's state of magic. ...", - "Of course I am talking about ghosts. I know, I know. Hard to believe in those times \z - of highly advanced magic we live in. Yet there are some things, we fail to explain. ...", - "And that is exactly where we come in! Oh, and you of course. We will not only explain \z - them - we will ''remove'' them. Just tell me whenever you are ready to help us with our research.", + "I recently teamed up with a fellow scientist and friend Sinclair, who is also more of an explorer than me, to combine our discoveries in the field of complex phenomena not that easily to describe just by today's state of magic. ...", + "Of course I am talking about ghosts. I know, I know. Hard to believe in those times of highly advanced magic we live in. Yet there are some things, we fail to explain. ...", + "And that is exactly where we come in! Oh, and you of course. We will not only explain them - we will ''remove'' them. Just tell me whenever you are ready to help us with our research.", }, npc, creature) npcHandler:setTopic(playerId, 17) elseif npcHandler:getTopic(playerId) == 18 then - npcHandler:say( - "Good. Take this wand - we call it a spirit meter - and go to the graveyard I have \z - marked on your map and take a few measurements on the graves.", - npc, - creature - ) - player:setStorageValue(Storage.SpiritHunters.Mission01, 1) + npcHandler:say("Good. Take this wand - we call it a spirit meter - and go to the graveyard I have marked on your map and take a few measurements on the graves.", npc, creature) + player:setStorageValue(Storage.Quest.U8_7.SpiritHunters.Mission01, 1) player:addItem(4049, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 19 then - npcHandler:say( - "Let me see the spirit meter. Hmmm... those are grave news you bring - uhm, you \z - know what I mean. But this is awesome! Now I know for sure that the calibration is \z - only some short bursts of magically enhanced energy away.", - npc, - creature - ) + npcHandler:say("Let me see the spirit meter. Hmmm... those are grave news you bring - uhm, you know what I mean. But this is awesome! Now I know for sure that the calibration is only some short bursts of magically enhanced energy away.", npc, creature) player:addExperience(500, true) player:addItem(3035, 5) - addEvent(function() - releasePlayer(npc, creature) - end, 1000) - player:setStorageValue(Storage.SpiritHunters.Mission01, 2) + player:setStorageValue(Storage.Quest.U8_7.SpiritHunters.Mission01, 2) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 27 then npcHandler:say({ - "Very well, hmmm, but this one might get a bit - unpleasant. What? No no, not for you. Probably only \z - for the person I want you to help me with. You know, I once had an {intern}. His name was {Jack}. ...", - "He was as eager as you to help me - quite a nice person, really. At the time he was still around I was \z - working on a device to transport its user to any specified point in time - be it back or to the future \z - if you know what I mean. ...", - "He was helping me quite a lot, no matter which task I applied to him. And one day we finally did it, our \z - tempus machina was up and running. He was certainly all man of action when he actually stepped into the \z - machine for our first run. ...", - "The device was designed for one person with enough room for some provisions and one or two books for reading \z - if one would land in some drab solitude. You never know, you know? So we fired it up and yes, it actually \z - worked! ...", + "Very well, hmmm, but this one might get a bit - unpleasant. What? No no, not for you. Probably only for the person I want you to help me with. You know, I once had an {intern}. His name was {Jack}. ...", + "He was as eager as you to help me - quite a nice person, really. At the time he was still around I was working on a device to transport its user to any specified point in time - be it back or to the future if you know what I mean. ...", + "He was helping me quite a lot, no matter which task I applied to him. And one day we finally did it, our tempus machina was up and running. He was certainly all man of action when he actually stepped into the machine for our first run. ...", + "The device was designed for one person with enough room for some provisions and one or two books for reading if one would land in some drab solitude. You never know, you know? So we fired it up and yes, it actually worked! ...", "He completely disappeared right before my eyes! Eureka! Well ahem, there was but one tiny little problem. ...", - "As all magical calibration was done from my lab I never thought about adding some sort of control to its \z - interior. In other words {Jack} has travelled in time, without any means to come back. ...", - "Sleepless days of intensive research, however, brought me to the conclusion that he was not actually \z - travelling to the future, but to another {dimension}, {parallel} to ours. There is still a chance to rescue \z - him - and you can help me. What do you say?", + "As all magical calibration was done from my lab I never thought about adding some sort of control to its interior. In other words {Jack} has travelled in time, without any means to come back. ...", + "Sleepless days of intensive research, however, brought me to the conclusion that he was not actually travelling to the future, but to another {dimension}, {parallel} to ours. There is still a chance to rescue him - and you can help me. What do you say?", }, npc, creature) npcHandler:setTopic(playerId, 28) elseif npcHandler:getTopic(playerId) == 28 then npcHandler:say({ - "You know, in some way you remind me of {Jack}. Well, I am glad you are up to this task - we just have \z - to get him back. I owe that to him and I owe it to science. Alright, now let me explain that whole \z - {dimensional} problem. ...", - "The bad news is, using the device at that state was not a good idea. We effectively caused a magical \z - distortion in the fabric of time, space and thus folded infinity - just a little. ...", + "You know, in some way you remind me of {Jack}. Well, I am glad you are up to this task - we just have to get him back. I owe that to him and I owe it to science. Alright, now let me explain that whole {dimensional} problem. ...", + "The bad news is, using the device at that state was not a good idea. We effectively caused a magical distortion in the fabric of time, space and thus folded infinity - just a little. ...", "The good news is that {Jack} is still on our world, and not even inconveniently far away. ...", - "Unfortunately in the current state of time, he was never interested in attending Edron Academy, he \z - never looked for a job to finance his studies and of course has never been one of my interns. ...", - "Since he was in the magic sphere during the launch, the time fold only affected his own {dimensional} \z - anchoring. ...", - "The number of parallel {dimensions} is endless and the fold made him slip into one completely different \z - course of time where he never was the person I once knew. ...", + "Unfortunately in the current state of time, he was never interested in attending Edron Academy, he never looked for a job to finance his studies and of course has never been one of my interns. ...", + "Since he was in the magic sphere during the launch, the time fold only affected his own {dimensional} anchoring. ...", + "The number of parallel {dimensions} is endless and the fold made him slip into one completely different course of time where he never was the person I once knew. ...", "Now you know it all. Still want to help?", }, npc, creature) npcHandler:setTopic(playerId, 29) elseif npcHandler:getTopic(playerId) == 29 then npcHandler:say({ - "Thank you. So here we are - now how to get {Jack} back to our {dimension}? Well, the answer to that \z - is easy. It is simply not possible. All my tests concerning the reversal of the process failed. ...", - "But {Jack} is not yet lost to us - if we can get him back to his former self! You have to tell him \z - about his former life, convince him, change his environment. But at first you will need to talk to him \z - and find out who exactly we are dealing with now. ...", + "Thank you. So here we are - now how to get {Jack} back to our {dimension}? Well, the answer to that is easy. It is simply not possible. All my tests concerning the reversal of the process failed. ...", + "But {Jack} is not yet lost to us - if we can get him back to his former self! You have to tell him about his former life, convince him, change his environment. But at first you will need to talk to him and find out who exactly we are dealing with now. ...", "I will mark his current location on your map, just ask him about me and see what happens - good luck.", }, npc, creature) - player:setStorageValue(Storage.SeaOfLight.Questline, 11) + player:setStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline, 11) player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 30 then - npcHandler:say( - "Yes? And he didn't remember anything? Not even me? That's not good. Then we will have to \z - do everything ourselves. Are you ready to continue?", - npc, - creature - ) + npcHandler:say("Yes? And he didn't remember anything? Not even me? That's not good. Then we will have to do everything ourselves. Are you ready to continue?", npc, creature) npcHandler:setTopic(playerId, 31) elseif npcHandler:getTopic(playerId) == 31 then npcHandler:say({ - "A trigger is needed to make him recall what happened. First thing should be to change his \z - environment to be more... familiar. As soon as he will have the things he used to have around \z - him, his memories will come back. ...", - "I know that he used to have a very comfy red cushioned chair and an old globe which sat near \z - the middle of the room. He also used a smaller telescope and he had that extremely large amphora \z - in a corner. And... there was one other thing. ...", - "A rocking horse. He just loved it! Find these items, buy them if you need to and place them \z - where {Jack} lives. Ask him about the furniture and don't forget to tell me about his reaction!", + "A trigger is needed to make him recall what happened. First thing should be to change his environment to be more... familiar. As soon as he will have the things he used to have around him, his memories will come back. ...", + "I know that he used to have a very comfy red cushioned chair and an old globe which sat near the middle of the room. He also used a smaller telescope and he had that extremely large amphora in a corner. And... there was one other thing. ...", + "A rocking horse. He just loved it! Find these items, buy them if you need to and place them where {Jack} lives. Ask him about the furniture and don't forget to tell me about his reaction!", }, npc, creature) player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 3) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 32 then npcHandler:say({ - "Alright listen. As long as his social environment accepts him as the person he is now, \z - he will never come free from the shackles that bind him to this alternate self. ...", + "Alright listen. As long as his social environment accepts him as the person he is now, he will never come free from the shackles that bind him to this alternate self. ...", "Oh, he has a sister you say? And his mother is living with them? ...", - "Hm... that's strange, I don't even recall his family. Never knew he had a mother and a \z - sister. Tell them the truth about him - maybe they will understand and even help him getting \z - this over with. ...", - "But be careful, the {dimensional} shift could mean that they will not even know what you're \z - talking about since they are more closely linked to him than anyone else.", + "Hm... that's strange, I don't even recall his family. Never knew he had a mother and a sister. Tell them the truth about him - maybe they will understand and even help him getting this over with. ...", + "But be careful, the {dimensional} shift could mean that they will not even know what you're talking about since they are more closely linked to him than anyone else.", }, npc, creature) player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 5) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 33 then npcHandler:say({ - "Success!! Now it will be far easier to convince him of his true self! Excellent work. \z - Now the only thing left to do is to separate him from whatever still binds him to that place. \z - Did he develop any habits perhaps? ...", - "A hobby or something! Yes, ask him about his hobbies! Convince him somehow that anything he is \z - doing there does not match his true self - he didn't have any hobbies except a healthy interest in \z - science - you MUST convince him, no matter what! ...", + "Success!! Now it will be far easier to convince him of his true self! Excellent work. Now the only thing left to do is to separate him from whatever still binds him to that place. Did he develop any habits perhaps? ...", + "A hobby or something! Yes, ask him about his hobbies! Convince him somehow that anything he is doing there does not match his true self - he didn't have any hobbies except a healthy interest in science - you MUST convince him, no matter what! ...", "Or everything we achieved would be in vain. We can still save Jack! Now go and do what you must do.", }, npc, creature) player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 7) @@ -553,45 +343,25 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "jack") then if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 10 then npcHandler:say({ - "Well you know Jack - after all you talked to him in person. He will get over it. \z - As for the real Jack, my former intern... I am glad that nothing serious happened to him. ...", - "According to his letter, he did just fine so many years ago. He somehow managed to make a \z - name of himself when he cast some magic we enhanced through our research - of course no one \z - back then had ever seen such spells. ...", - "Oh and he sends his regards to... how did he put it - 'whoever is currently helping me getting \z - out of whatever mess I am currently in'. I... don't really know how this was meant but I \z - guess this is directed at... you!", + "Well you know Jack - after all you talked to him in person. He will get over it. As for the real Jack, my former intern... I am glad that nothing serious happened to him. ...", + "According to his letter, he did just fine so many years ago. He somehow managed to make a name of himself when he cast some magic we enhanced through our research - of course no one back then had ever seen such spells. ...", + "Oh and he sends his regards to... how did he put it - 'whoever is currently helping me getting out of whatever mess I am currently in'. I... don't really know how this was meant but I guess this is directed at... you!", }, npc, creature) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "collective apparitions") then - local qStorage = player:getStorageValue(Storage.SpiritHunters.Mission01) + local qStorage = player:getStorageValue(Storage.Quest.U8_7.SpiritHunters.Mission01) if qStorage == -1 then if npcHandler:getTopic(playerId) == 15 then - npcHandler:say( - "Ah well, let's forget about the scientific details - you will do just fine as \z - long as you do exactly what I say. Ready for me to go on with your task?", - npc, - creature - ) + npcHandler:say("Ah well, let's forget about the scientific details - you will do just fine as long as you do exactly what I say. Ready for me to go on with your task?", npc, creature) npcHandler:setTopic(playerId, 16) end end elseif MsgContains(message, "no") then if npcHandler:getTopic(playerId) == 1 then - npcHandler:say( - "Yes, maybe it was the right decision. Astronomical research is \z - nothing for the faint-hearted.", - npc, - creature - ) + npcHandler:say("Yes, maybe it was the right decision. Astronomical research is nothing for the faint-hearted.", npc, creature) elseif npcHandler:getTopic(playerId) == 2 then - npcHandler:say( - "Well, the... what? You... mean you're no longer interested? I see, well \z - maybe I overestimated your spirit after all.", - npc, - creature - ) + npcHandler:say("Well, the... what? You... mean you're no longer interested? I see, well maybe I overestimated your spirit after all.", npc, creature) elseif npcHandler:getTopic(playerId) == 3 then npcHandler:say("Alright, alright. You'll never find out the true secrets of life with such attitude, hm.", npc, creature) elseif npcHandler:getTopic(playerId) == 4 then @@ -608,32 +378,20 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "machine") and player:getStorageValue(Storage.LiquidBlackQuest.Visitor) == 3 then npcHandler:say({ - "Ah, the machine you found at that island. Well, I built this thing to venture far beneath \z - the very soil we walk on. I suspected something there. Something deep down below. Something evil. \z - Even more so than the dreaded bugs which are crawling my study. ...", - "Drilling hole after hole only to get stuck in another hard, unbreakable sediment again and again, \z - I was about to quit this pointless enterprise. ...", - "However, the very last day I lingered on that island, I finally fell into a large hollow right \z - under the beach. My drill was shattered and the machine was not mobile anymore. ...", - "I am well aware that this may sound laughable now - at this part all of my colleagues burst into \z - laughter anyway - but suddenly there were stairs. Incredibly large stairs that led to the underworld. \z - A world deep under the sea - can you believe this?", + "Ah, the machine you found at that island. Well, I built this thing to venture far beneath the very soil we walk on. I suspected something there. Something deep down below. Something evil. Even more so than the dreaded bugs which are crawling my study. ...", + "Drilling hole after hole only to get stuck in another hard, unbreakable sediment again and again, I was about to quit this pointless enterprise. ...", + "However, the very last day I lingered on that island, I finally fell into a large hollow right under the beach. My drill was shattered and the machine was not mobile anymore. ...", + "I am well aware that this may sound laughable now - at this part all of my colleagues burst into laughter anyway - but suddenly there were stairs. Incredibly large stairs that led to the underworld. A world deep under the sea - can you believe this?", }, npc, creature) npcHandler:setTopic(playerId, 21) elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 21 and player:getStorageValue(Storage.LiquidBlackQuest.Visitor) == 3 then if player:getStorageValue(Storage.LiquidBlackQuest.Visitor) == 3 then npcHandler:say({ "You do? Well, the end of this story was that I had to leave the place. ...", - "I couldnt explore what lies below the stairs as there was an unpredictable stream. Diving \z - into these waters would have been an uncontrollable risk, even with the means to survive without any air. ...", - "So I used the portable teleporting device I installed into my machine in case of an emergency and went home. \z - I could only take the most important research documents with me and had to leave \z - most of my equipment in the cave. ...", - "Of course I also left my final notes with the coordinates there. And for the life of me I cannot remember where \z - I dug that stupid hole. ...", - "When I arrived at home I immediately started looking for a way to manoeuvre in these chaotic conditions once \z - I rediscovered the lost entrance. I never remembered it, but it seems you found it as you \z - indeed have my original notes. ...", + "I couldnt explore what lies below the stairs as there was an unpredictable stream. Diving into these waters would have been an uncontrollable risk, even with the means to survive without any air. ...", + "So I used the portable teleporting device I installed into my machine in case of an emergency and went home. I could only take the most important research documents with me and had to leave most of my equipment in the cave. ...", + "Of course I also left my final notes with the coordinates there. And for the life of me I cannot remember where I dug that stupid hole. ...", + "When I arrived at home I immediately started looking for a way to manoeuvre in these chaotic conditions once I rediscovered the lost entrance. I never remembered it, but it seems you found it as you indeed have my original notes. ...", "Oh and just in case you want to complete what I have started - feel free to do so. Up to it?", }, npc, creature) npcHandler:setTopic(playerId, 22) @@ -641,52 +399,34 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 22 and player:getStorageValue(Storage.LiquidBlackQuest.Visitor) == 3 then if player:getStorageValue(Storage.LiquidBlackQuest.Visitor) == 3 then npcHandler:say({ - "Well, if you really want to delve into this - I could use some help. So you have \z - found my {machine} on that island? And you found the notes with the coordinates? \z - Then you can find the entrance! ...", - "Just look for a large staircase with sprawling steps. There is an unpassable stream \z - there that will prevent you from venturing further on. But fear not, you can indeed \z - travel down there - with these small {enhancements} I created. ...", - "At first, take this gold for the passage by ship and return to the Gray Island from \z - where I started my expedition many years ago. From there you should find a way to reach \z - the Gray Beach of Quirefang as no ordinary ship can land there. ...", - "I will put this under your footgear. Here you go. And this in your nose. There. And \z - there will be no further problems for you down there. Except- ah, well youll find \z - out yourself soon enough, wont you?", + "Well, if you really want to delve into this - I could use some help. So you have found my {machine} on that island? And you found the notes with the coordinates? Then you can find the entrance! ...", + "Just look for a large staircase with sprawling steps. There is an unpassable stream there that will prevent you from venturing further on. But fear not, you can indeed travel down there - with these small {enhancements} I created. ...", + "At first, take this gold for the passage by ship and return to the Gray Island from where I started my expedition many years ago. From there you should find a way to reach the Gray Beach of Quirefang as no ordinary ship can land there. ...", + "I will put this under your footgear. Here you go. And this in your nose. There. And there will be no further problems for you down there. Except- ah, well youll find out yourself soon enough, wont you?", }, npc, creature) npcHandler:setTopic(playerId, 23) end elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 23 and player:getStorageValue(Storage.LiquidBlackQuest.Visitor) == 3 then if player:getStorageValue(Storage.LiquidBlackQuest.Visitor) == 3 then - npcHandler:say({ - "Then off you go! Im sorry that I cannot offer you any further help but Im \z - sure you will find support along your way. And - be careful. The sea can \z - appear pitch black down there.", - }, npc, creature) + npcHandler:say("Then off you go! Im sorry that I cannot offer you any further help but Im sure you will find support along your way. And - be careful. The sea can appear pitch black down there.", npc, creature) player:setStorageValue(Storage.LiquidBlackQuest.Visitor, 4) npcHandler:setTopic(playerId, 24) end elseif MsgContains(message, "task") then - if player:getStorageValue(Storage.SeaOfLight.Mission3) == 4 then + if player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Mission3) == 4 then end end if MsgContains(message, "rumours") then npcHandler:say({ - "There are rumours of aggressive fishmen in northern Tiquanda. We have to \z - find out if this is even remotely connected to the Njey. ...", - "What's puzzling me is that they were sighted above ground and then retreated \z - into a temple ruin. If we find that ruin, we could find out if there's a relation. ...", + "There are rumours of aggressive fishmen in northern Tiquanda. We have to find out if this is even remotely connected to the Njey. ...", + "What's puzzling me is that they were sighted above ground and then retreated into a temple ruin. If we find that ruin, we could find out if there's a relation. ...", "Are you willing to help me?", }, npc, creature) npcHandler:setTopic(playerId, 25) elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 25 then if npcHandler:getTopic(playerId) == 25 then - npcHandler:say({ - "Excellent, excellent. The rumours pointed to the north of Tiquanda, a \z - sunken temple probably half drowned in water. Return to me if you find \z - anything interesting!", - }, npc, creature) + npcHandler:say("Excellent, excellent. The rumours pointed to the north of Tiquanda, a sunken temple probably half drowned in water. Return to me if you find anything interesting!", npc, creature) player:setStorageValue(Storage.TheSecretLibrary.LiquidDeath, 1) npcHandler:setTopic(playerId, 0) end @@ -694,59 +434,36 @@ local function creatureSayCallback(npc, creature, type, message) return true end -keywordHandler:addKeyword({ "jack" }, StdModule.say, { - npcHandler = npcHandler, - text = "He was the first one I ever hired as an intern to help me with my studies and research. He \z - did an exceptionally good job and I certainly don't know where I would stand today without him. \z - We have to save him |PLAYERNAME|!", -}) keywordHandler:addKeyword({ "device" }, StdModule.say, { npcHandler = npcHandler, - text = "I heard of a device which would allow man to sail the sea of light. I call it the {Lightboat}, \z - probably the most important invention in our history. And I will not rest until I have found a way to \z - put the plan of its inventor into action.", + text = "I heard of a device which would allow man to sail the sea of light. I call it the {Lightboat}, probably the most important invention in our history. And I will not rest until I have found a way to put the plan of its inventor into action.", }) keywordHandler:addKeyword({ "lightboat" }, StdModule.say, { npcHandler = npcHandler, - text = "I heard of a device which would allow man to sail the sea of light. I call it the {Lightboat}, \z - probably the most important invention in our history. And I will not rest until I have found a way to \z - put the plan of its inventor into action.", + text = "I heard of a device which would allow man to sail the sea of light. I call it the {Lightboat}, probably the most important invention in our history. And I will not rest until I have found a way to put the plan of its inventor into action.", }) keywordHandler:addKeyword({ "magic device" }, StdModule.say, { npcHandler = npcHandler, - text = "I heard of a device which would allow man to sail the sea of light. I call it the {Lightboat}, \z - probably the most important invention in our history. And I will not rest until I have found a way to \z - put the plan of its inventor into action.", + text = "I heard of a device which would allow man to sail the sea of light. I call it the {Lightboat}, probably the most important invention in our history. And I will not rest until I have found a way to put the plan of its inventor into action.", }) keywordHandler:addKeyword({ "sea of light" }, StdModule.say, { npcHandler = npcHandler, - text = "The sea of light is what I call the endless arrangement of shiny stars in the night sky. If we \z - fail to complete the {magic device}, science will probably never uncover its secrets.", + text = "The sea of light is what I call the endless arrangement of shiny stars in the night sky. If we fail to complete the {magic device}, science will probably never uncover its secrets.", }) keywordHandler:addKeyword({ "mirror crystal" }, StdModule.say, { npcHandler = npcHandler, - text = "I found the cause of the initial failure. A rare component, a mirror crystal was used to store \z - magical energy. Miscalculations within the construction damaged this fragile power source. The unleashed \z - energy must have been devastating.", + text = "I found the cause of the initial failure. A rare component, a mirror crystal was used to store magical energy. Miscalculations within the construction damaged this fragile power source. The unleashed energy must have been devastating.", }) keywordHandler:addKeyword({ "lost mines" }, StdModule.say, { npcHandler = npcHandler, - text = "The people of Edron were digging there for minerals and gold. It seemed all that work was of \z - no avail when they finally hit the motherlode. Gems, rare crystals and... water. So much that it flooded \z - the whole system. And not a single soul escaped.", + text = "The people of Edron were digging there for minerals and gold. It seemed all that work was of no avail when they finally hit the motherlode. Gems, rare crystals and... water. So much that it flooded the whole system. And not a single soul escaped.", }) keywordHandler:addKeyword({ "collector" }, StdModule.say, { npcHandler = npcHandler, - text = "I heard rumours of a fabled creature whose traces were found on an island near Carlin. It \z - lives solely to collect all kinds of rare gems, crystals and minerals. Offering an item it does not \z - already own, reportedly allows passage into its lair.", + text = "I heard rumours of a fabled creature whose traces were found on an island near Carlin. It lives solely to collect all kinds of rare gems, crystals and minerals. Offering an item it does not already own, reportedly allows passage into its lair.", }) -npcHandler:setMessage( - MESSAGE_GREET, - "Hello |PLAYERNAME|! You're late, do you have no concept of time? \z -My mission is of utmost importance. If you are not interested in helping me, you might as well just leave." -) +npcHandler:setMessage(MESSAGE_GREET, "Hello |PLAYERNAME|! You're late, do you have no concept of time? My mission is of utmost importance. If you are not interested in helping me, you might as well just leave.") npcHandler:setMessage(MESSAGE_FAREWELL, "Yes yes. Goodbye |PLAYERNAME|.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Yes yes. Goodbye |PLAYERNAME|.") diff --git a/data-otservbr-global/npc/storkus.lua b/data-otservbr-global/npc/storkus.lua index f6c763f9a68..d8465a6a2c1 100644 --- a/data-otservbr-global/npc/storkus.lua +++ b/data-otservbr-global/npc/storkus.lua @@ -58,20 +58,20 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.TheInquisition.Questline) == 6 then - if player:getStorageValue(Storage.TheInquisition.StorkusVampiredust) < 0 then - player:setStorageValue(Storage.TheInquisition.StorkusVampiredust, 0) - end - if player:getStorageValue(Storage.TheInquisition.StorkusVampiredust) < 20 then + if player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 6 then + if player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.StorkusVampiredust) == 0 then + npcHandler:say("So they've sent another one? I just hope ye' better than the last one. Are ye' ready for a mission?", npc, creature) + npcHandler:setTopic(playerId, 9) + elseif player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.StorkusVampiredust) >= 1 and player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.StorkusVampiredust) <= 20 then npcHandler:say("So far ye've brought me " .. player:getItemCount(5905) .. " of 20 {vampire dusts}. Do ye' have any more with ye'? ", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.TheInquisition.StorkusVampiredust) == 20 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.StorkusVampiredust) == 21 then npcHandler:say("Fine, you're done! Ye' should talk to me about your {mission} again now.", npc, creature) npcHandler:setTopic(playerId, 2) - player:setStorageValue(Storage.TheInquisition.Questline, 7) - player:setStorageValue(Storage.TheInquisition.Mission03, 2) -- The Inquisition Questlog- "Mission 3: Vampire Hunt" + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline, 7) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission03, 2) -- The Inquisition Questlog- "Mission 3: Vampire Hunt" end - elseif player:getStorageValue(Storage.TheInquisition.Questline) == 7 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 7 then npcHandler:say({ "While ye' were keeping the lower ranks busy, I could get valuable information about some vampire lords. ...", "One of them is hiding somewhere beneath the Green Claw Swamp. I expect ye' to find him and kill him. ...", @@ -79,10 +79,10 @@ local function creatureSayCallback(npc, creature, type, message) "Before ye' open his coffin and drag that beast out to destroy it, I advise ye' to place some garlic necklaces on the stone slabs next to his coffin. That will weaken him considerably. ...", "Bring me his ring as proof for his death. And now hurry and good hunt to ye'.", }, npc, creature) - player:setStorageValue(Storage.TheInquisition.Questline, 8) - player:setStorageValue(Storage.TheInquisition.Mission03, 3) -- The Inquisition Questlog- "Mission 3: Vampire Hunt" + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline, 8) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission03, 3) -- The Inquisition Questlog- "Mission 3: Vampire Hunt" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TheInquisition.Questline) == 8 or player:getStorageValue(Storage.TheInquisition.Questline) == 9 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 8 or player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 9 then if player:removeItem(7924, 1) then npcHandler:say({ "Ding, dong, the vampire is dead, eh? So I guess ye' can return to Henricus and tell him that ye' finished your job here. I'm quite sure he has some more challenging task up his sleeve. ...", @@ -90,48 +90,59 @@ local function creatureSayCallback(npc, creature, type, message) "They are quite hard to find. If ye' stumble across one of them and manage to kill him, he will surely drop some token that proves his death. Bring me these tokens. ...", "If ye' kill enough of them, I might have a little surprise for ye'.", }, npc, creature) - player:setStorageValue(Storage.TheInquisition.Questline, 10) - player:setStorageValue(Storage.TheInquisition.Mission03, 5) -- The Inquisition Questlog- "Mission 3: Vampire Hunt" + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline, 10) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission03, 5) -- The Inquisition Questlog- "Mission 3: Vampire Hunt" else npcHandler:say("Have ye' killed the vampire lord? Because ye' have no his ring.", npc, creature) end npcHandler:setTopic(playerId, 0) end - elseif MsgContains(message, "vampire lord token") and player:getStorageValue(Storage.TheInquisition.Questline) == 10 then - if player:getStorageValue(Storage.VampireHunter.Rank) < 1 then + elseif MsgContains(message, "vampire lord token") and player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) >= 11 then + if player:getStorageValue(Storage.Quest.U8_2.VampireHunterQuest.Rank) < 1 then npcHandler:say("Would ye' like to give me vampire tokens?", npc, creature) npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.VampireHunter.Rank) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_2.VampireHunterQuest.Rank) == 1 then npcHandler:say("Would ye' like to give me vampire tokens?", npc, creature) npcHandler:setTopic(playerId, 4) - elseif player:getStorageValue(Storage.VampireHunter.Rank) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_2.VampireHunterQuest.Rank) == 2 then npcHandler:say("Would ye' like to give me vampire tokens?", npc, creature) npcHandler:setTopic(playerId, 5) - elseif player:getStorageValue(Storage.VampireHunter.Rank) == 3 then + elseif player:getStorageValue(Storage.Quest.U8_2.VampireHunterQuest.Rank) == 3 then npcHandler:say("Would ye' like to give me vampire tokens?", npc, creature) npcHandler:setTopic(playerId, 6) - elseif player:getStorageValue(Storage.VampireHunter.Rank) == 4 then + elseif player:getStorageValue(Storage.Quest.U8_2.VampireHunterQuest.Rank) == 4 then npcHandler:say("Would ye' like to give me vampire tokens?", npc, creature) npcHandler:setTopic(playerId, 7) - elseif player:getStorageValue(Storage.VampireHunter.Rank) == 5 then + elseif player:getStorageValue(Storage.Quest.U8_2.VampireHunterQuest.Rank) == 5 then npcHandler:say("Would ye' like to give me vampire tokens?", npc, creature) npcHandler:setTopic(playerId, 8) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then local count = player:getItemCount(5905) - local requiredCount = 20 - player:getStorageValue(Storage.TheInquisition.StorkusVampiredust) + local currentStorage = player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.StorkusVampiredust) + local requiredCount = 21 - currentStorage if count > requiredCount then count = requiredCount end - player:setStorageValue(Storage.TheInquisition.StorkusVampiredust, player:getStorageValue(Storage.TheInquisition.StorkusVampiredust) + count) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.StorkusVampiredust, currentStorage + count) player:removeItem(5905, count) - npcHandler:say("Ye've brought me " .. count .. " vampire dusts. " .. (20 - player:getStorageValue(Storage.TheInquisition.StorkusVampiredust)) == 0 and "Ask me for a {mission} to continue your quest." or ("Ye' need to bring " .. (20 - player:getStorageValue(Storage.TheInquisition.StorkusVampiredust)) .. " more."), npc, creature) + + local newStorage = player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.StorkusVampiredust) + local remainingDusts = 20 - newStorage + + local message + if remainingDusts <= 0 then + message = "Ask me for a {mission} to continue your quest." + else + message = "Ye' need to bring " .. remainingDusts .. " more." + end + npcHandler:say("Ye've brought me " .. count .. " vampire dusts. " .. message, npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then if player:removeItem(8192, 1) then npcHandler:say("Ye' brought the token needed to advance to the first vampire hunter rank. I consider that a fluke, but still, congrats! Let me share some of my experience with ye'.", npc, creature) - player:setStorageValue(Storage.VampireHunter.Rank, 1) + player:setStorageValue(Storage.Quest.U8_2.VampireHunterQuest.Rank, 1) player:addExperience(1000, true) else npcHandler:say("Ye' don't have enought tokens.", npc, creature) @@ -140,7 +151,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 4 then if player:removeItem(8192, 4) then npcHandler:say("Ye' brought the four tokens needed to advance to the second vampire hunter rank. Pretty lucky ye' are! Let me share some of my experience with ye'.", npc, creature) - player:setStorageValue(Storage.VampireHunter.Rank, 2) + player:setStorageValue(Storage.Quest.U8_2.VampireHunterQuest.Rank, 2) player:addExperience(5 * 1000, true) else npcHandler:say("Ye' don't have enought tokens.", npc, creature) @@ -149,7 +160,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 5 then if player:removeItem(8192, 5) then npcHandler:say("Ye' brought the five tokens needed to advance to the third vampire hunter rank. Wow, you're pretty determined! Let me share some of my experience with ye'.", npc, creature) - player:setStorageValue(Storage.VampireHunter.Rank, 3) + player:setStorageValue(Storage.Quest.U8_2.VampireHunterQuest.Rank, 3) player:addExperience(10 * 1000, true) else npcHandler:say("Ye' don't have enought tokens.", npc, creature) @@ -158,7 +169,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 6 then if player:removeItem(8192, 10) then npcHandler:say("Ye' brought the ten tokens needed to advance to the fourth vampire hunter rank. You're absolutely painstaking! Let me share some of my experience with ye'.", npc, creature) - player:setStorageValue(Storage.VampireHunter.Rank, 4) + player:setStorageValue(Storage.Quest.U8_2.VampireHunterQuest.Rank, 4) player:addExperience(20 * 1000, true) else npcHandler:say("Ye' don't have enought tokens.", npc, creature) @@ -167,7 +178,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 7 then if player:removeItem(8192, 30) then npcHandler:say("Ye' brought the thirty tokens needed to advance to the fifth vampire hunter rank. You're completely obliterative, kid! Let me share some of my experience with ye'.", npc, creature) - player:setStorageValue(Storage.VampireHunter.Rank, 5) + player:setStorageValue(Storage.Quest.U8_2.VampireHunterQuest.Rank, 5) player:addExperience(50 * 1000, true) else npcHandler:say("Ye' don't have enought tokens.", npc, creature) @@ -176,13 +187,18 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 8 then if player:removeItem(8192, 50) then npcHandler:say("Ye' brought the fifty tokens needed to advance to the last vampire hunter rank. Now that's something. You're razing-amazing! Let me share some of my experience and a little something with ye'!", npc, creature) - player:setStorageValue(Storage.VampireHunter.Rank, 6) player:addItem(8191, 1) player:addExperience(100 * 1000, true) + player:setStorageValue(Storage.Quest.U8_2.VampireHunterQuest.Rank, 6) + player:setStorageValue(Storage.Quest.U8_2.VampireHunterQuest.Door, 1) else npcHandler:say("Ye' don't have enought tokens.", npc, creature) end npcHandler:setTopic(playerId, 0) + elseif npcHandler:getTopic(playerId) == 9 then + npcHandler:say("As they might have told ye', I'm a vampire hunter. If ye' want to be of any help, ye' can assist me with some of my tasks and bring me 20 ounces of vampire dust. This gives me some time to concentrate on a bigger project.", npc, creature) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.StorkusVampiredust, 1) + npcHandler:setTopic(playerId, 0) end end return true diff --git a/data-otservbr-global/npc/sven.lua b/data-otservbr-global/npc/sven.lua index c141daec378..425d5085750 100644 --- a/data-otservbr-global/npc/sven.lua +++ b/data-otservbr-global/npc/sven.lua @@ -51,13 +51,14 @@ npcType.onCloseChannel = function(npc, creature) end local function greetCallback(npc, player) - if player:getStorageValue(Storage.TheIceIslands.HuskyKillStatus) == 1 then - npcHandler:setMessage(MESSAGE_GREET, "Iskan told me that you killed huskies here in Svargrond. I will be lenient towards you and won't ban you from Svargrond. But you have to pay me a compensation of 1500 gold for each husky you have killed. Are you willing to pay " .. player:getStorageValue(Storage.TheIceIslands.HuskyKill) * 1500 .. "?") + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.HuskyKillStatus) == 1 then + npcHandler:setMessage(MESSAGE_GREET, "Iskan told me that you killed huskies here in Svargrond. I will be lenient towards you and won't ban you from Svargrond. But you have to pay me a compensation of 1500 gold for each husky you have killed. Are you willing to pay " .. player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.HuskyKill) * 1500 .. "?") else npcHandler:setMessage(MESSAGE_GREET, "Be greeted, |PLAYERNAME|! What brings you {here}?") end return true end + local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() @@ -66,60 +67,56 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "barbarian") then - if player:getStorageValue(Storage.BarbarianTest.Questline) < 1 then - npcHandler:say("A true barbarian is something special among our people. Everyone who wants to become a barbarian will have to pass the barbarian {test}.", npc, creature) - npcHandler:setTopic(playerId, 1) - end + if MsgContains(message, "barbarian") and player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) < 1 then + npcHandler:say("A true barbarian is something special among our people. Everyone who wants to become a barbarian will have to pass the barbarian {test}.", npc, creature) + npcHandler:setTopic(playerId, 1) elseif MsgContains(message, "test") then npcHandler:say({ "All of our juveniles have to take the barbarian test to become a true member of our community. Foreigners who manage to master the test are granted the title of an honorary barbarian and the respect of our people ...", "Are you willing to take the barbarian test?", }, npc, creature) npcHandler:setTopic(playerId, 2) - elseif MsgContains(message, "mead") then - if player:getStorageValue(Storage.BarbarianTest.Questline) == 1 then - npcHandler:say("Do you have some honey with you?", npc, creature) - npcHandler:setTopic(playerId, 4) - elseif player:getStorageValue(Storage.BarbarianTest.Questline) == 3 then - npcHandler:say({ - "An impressive start. Here, take your own mead horn to fill it at the mead bucket as often as you like ...", - "But there is much left to be done. Your next test will be to hug a bear ...", - "You will find one in a cave north of the town. If you are lucky, it's still sleeping. If not ... well that might hurt ...", - "Unless you feel that you hugged the bear, the test is not passed. Once you are done, talk to me about the bear hugging.", - }, npc, creature) - player:setStorageValue(Storage.BarbarianTest.Questline, 4) - player:setStorageValue(Storage.BarbarianTest.Mission02, 1) -- Questlog Barbarian Test Quest Barbarian Test 2: The Bear Hugging - player:addItem(7140, 1) - npcHandler:setTopic(playerId, 0) - end + elseif MsgContains(message, "mead") and player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) == 1 then + npcHandler:say("Do you have some honey with you?", npc, creature) + npcHandler:setTopic(playerId, 4) + elseif MsgContains(message, "barbarian mead") and player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) == 3 then + npcHandler:say({ + "An impressive start. Here, take your own mead horn to fill it at the mead bucket as often as you like ...", + "But there is much left to be done. Your next test will be to hug a bear ...", + "You will find one in a cave north of the town. If you are lucky, it's still sleeping. If not ... well that might hurt ...", + "Unless you feel that you hugged the bear, the test is not passed. Once you are done, talk to me about the bear hugging.", + }, npc, creature) + player:setStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline, 4) + player:setStorageValue(Storage.Quest.U8_0.BarbarianTest.Mission02, 1) -- Questlog Barbarian Test Quest Barbarian Test 2: The Bear Hugging + player:addItem(7140, 1) + npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "hug") then - if player:getStorageValue(Storage.BarbarianTest.Questline) == 5 then + if player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) == 5 then npcHandler:say({ "Amazing. That was as clever and brave as a barbarian is supposed to be. But a barbarian also has to be strong and fearless. To prove that you will have to knock over a mammoth ...", "Did your face just turn into the color of fresh snow? However, you will find a lonely mammoth north west of the town in the wilderness. Knock it over to prove to be a true barbarian ...", "Return to me and talk about the {mammoth} pushing when you are done.", }, npc, creature) - player:setStorageValue(Storage.BarbarianTest.Questline, 6) - player:setStorageValue(Storage.BarbarianTest.Mission03, 1) -- Questlog Barbarian Test Quest Barbarian Test 3: The Mammoth Pushing + player:setStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline, 6) + player:setStorageValue(Storage.Quest.U8_0.BarbarianTest.Mission03, 1) -- Questlog Barbarian Test Quest Barbarian Test 3: The Mammoth Pushing npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "mammoth") then - if player:getStorageValue(Storage.BarbarianTest.Questline) == 7 then + if player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) == 7 then npcHandler:say({ "As you have passed all three tests, I welcome you in our town as an honorary barbarian. You can now become a citizen. Don't forget to talk to the people here. Some of them might need some help ...", "We usually solve our problems on our own but some of the people might have a mission for you. Old Iskan, on the ice in the northern part of the town had some trouble with his dogs lately.", }, npc, creature) - player:setStorageValue(Storage.BarbarianTest.Questline, 8) + player:setStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline, 8) player:addAchievement("Honorary Barbarian") npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "yes") then - if player:getStorageValue(Storage.TheIceIslands.HuskyKillStatus) == 1 and player:getStorageValue(Storage.BarbarianTest.Questline) == 8 then - if player:removeMoneyBank(player:getStorageValue(Storage.TheIceIslands.HuskyKill) * 1500) then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.HuskyKillStatus) == 1 and player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) == 8 then + if player:removeMoneyBank(player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.HuskyKill) * 1500) then npcHandler:say("Alright, we are even!", npc, creature) - player:setStorageValue(Storage.TheIceIslands.HuskyKillStatus, 0) - player:setStorageValue(Storage.TheIceIslands.HuskyKill, 0) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.HuskyKillStatus, 0) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.HuskyKill, 0) npcHandler:setTopic(playerId, 0) else npcHandler:say("You don't have enough. Bring me the money and I will forget about it.", npc, creature) @@ -138,28 +135,28 @@ local function creatureSayCallback(npc, creature, type, message) "Therefore, you have to get your own honey. You'll probably need more than one try so better get some extra honeycombs. Then talk to me again about barbarian {mead}.", }, npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.BarbarianTest.Questline, 1) - player:setStorageValue(Storage.TheIceIslands.Questline, 1) - player:setStorageValue(Storage.BarbarianTest.Mission01, 1) -- Questlog Barbarian Test Quest Barbarian Test 1: Barbarian Booze + player:setStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline, 1) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 1) + player:setStorageValue(Storage.Quest.U8_0.BarbarianTest.Mission01, 1) -- Questlog Barbarian Test Quest Barbarian Test 1: Barbarian Booze elseif npcHandler:getTopic(playerId) == 4 then if player:removeItem(5902, 1) then npcHandler:say("Good, for this honeycomb I allow you 20 sips from the mead bucket over there. Talk to me again about barbarian mead if you have passed the test.", npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.BarbarianTest.Questline, 2) - player:setStorageValue(Storage.BarbarianTest.Mission01, 2) -- Questlog Barbarian Test Quest Barbarian Test 1: Barbarian Booze - player:setStorageValue(Storage.BarbarianTest.MeadTotalSips, 0) + player:setStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline, 2) + player:setStorageValue(Storage.Quest.U8_0.BarbarianTest.Mission01, 2) -- Questlog Barbarian Test Quest Barbarian Test 1: Barbarian Booze + player:setStorageValue(Storage.Quest.U8_0.BarbarianTest.MeadTotalSips, 0) end end elseif MsgContains(message, "no") then - if player:getStorageValue(Storage.TheIceIslands.HuskyKillStatus) == 1 and npcHandler:getTopic(playerId) == 0 then - npcHandler:say("I don't know if you realise the consequences. You won't be a member of our community anymore. I ask you for the last time: Are you willing to pay " .. player:getStorageValue(Storage.TheIceIslands.HuskyKill) * 1500 .. " gold as a compensation?", npc, creature) + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.HuskyKillStatus) == 1 and npcHandler:getTopic(playerId) == 0 then + npcHandler:say("I don't know if you realise the consequences. You won't be a member of our community anymore. I ask you for the last time: Are you willing to pay " .. player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.HuskyKill) * 1500 .. " gold as a compensation?", npc, creature) npcHandler:setTopic(playerId, 10) elseif npcHandler:getTopic(playerId) == 10 then npcHandler:say("Alright, it's your choice. If you regret your decision and want to be a barbarian again, talk to me about the {barbarian} test.", npc, creature) - player:setStorageValue(Storage.BarbarianTest.Questline, -1) - player:setStorageValue(Storage.BarbarianTest.Mission01, -1) - player:setStorageValue(Storage.BarbarianTest.Mission02, -1) - player:setStorageValue(Storage.BarbarianTest.Mission03, -1) + player:setStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline, -1) + player:setStorageValue(Storage.Quest.U8_0.BarbarianTest.Mission01, -1) + player:setStorageValue(Storage.Quest.U8_0.BarbarianTest.Mission02, -1) + player:setStorageValue(Storage.Quest.U8_0.BarbarianTest.Mission03, -1) end end return true diff --git a/data-otservbr-global/npc/swolt.lua b/data-otservbr-global/npc/swolt.lua index 5d8a7b48830..7caa8aa4160 100644 --- a/data-otservbr-global/npc/swolt.lua +++ b/data-otservbr-global/npc/swolt.lua @@ -86,6 +86,8 @@ npcConfig.shop = { { itemName = "mug of beer", clientId = 2880, buy = 2, count = 3 }, { itemName = "mug of water", clientId = 2880, buy = 1, count = 1 }, { itemName = "terramite eggs", clientId = 10453, sell = 50 }, + { itemName = "vial of beer", clientId = 2874, buy = 2, count = 1, subType = 3 }, + { itemName = "vial of water", clientId = 2874, buy = 1, count = 1 }, } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/tamerin.lua b/data-otservbr-global/npc/tamerin.lua index 83bef272577..3f64fce0eb3 100644 --- a/data-otservbr-global/npc/tamerin.lua +++ b/data-otservbr-global/npc/tamerin.lua @@ -54,9 +54,9 @@ local function greetCallback(npc, creature) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.InServiceofYalahar.Questline) == 30 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 30 then npcHandler:setMessage(MESSAGE_GREET, "Have you the {animal cure}?") - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 31 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 31 then npcHandler:setMessage(MESSAGE_GREET, "Have you killed {morik}?") else npcHandler:setMessage(MESSAGE_GREET, "Hello, what brings you here?") @@ -73,21 +73,21 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.InServiceofYalahar.Questline) == 29 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 29 then npcHandler:say({ "Why should I do something for another human being? I have been on my own for all those years. Hmm, but actually there is something I could need some assistance with. ... ", "If you help me to solve my problems, I will help you with your mission. Do you accept?", }, npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 32 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 32 then npcHandler:say("You have kept your promise. Now, it's time to fulfil my part of the bargain. What kind of animals shall I raise? {Warbeasts} or {cattle}?", npc, creature) npcHandler:setTopic(playerId, 2) end elseif MsgContains(message, "animal cure") then - if player:getStorageValue(Storage.InServiceofYalahar.Questline) == 30 and player:removeItem(8819, 1) then - player:setStorageValue(Storage.InServiceofYalahar.Questline, 31) - player:setStorageValue(Storage.InServiceofYalahar.MorikSummon, 0) - player:setStorageValue(Storage.InServiceofYalahar.Mission05, 4) -- StorageValue for Questlog "Mission 05: Food or Fight" + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 30 and player:removeItem(8819, 1) then + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 31) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.MorikSummon, 0) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission05, 4) -- StorageValue for Questlog "Mission 05: Food or Fight" npcHandler:say("Thank you very much. As I said, as soon as you have helped me to solve both of my problems, we will talk about your mission. Have you killed {morik}?", npc, creature) npcHandler:setTopic(playerId, 0) else @@ -95,22 +95,22 @@ local function creatureSayCallback(npc, creature, type, message) end elseif MsgContains(message, "cattle") then if npcHandler:getTopic(playerId) == 2 then - player:setStorageValue(Storage.InServiceofYalahar.TamerinStatus, 1) - player:setStorageValue(Storage.InServiceofYalahar.Mission05, 6) -- StorageValue for Questlog "Mission 05: Food or Fight" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.TamerinStatus, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission05, 6) -- StorageValue for Questlog "Mission 05: Food or Fight" npcHandler:say("So be it!", npc, creature) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "warbeast") then if npcHandler:getTopic(playerId) == 2 then - player:setStorageValue(Storage.InServiceofYalahar.TamerinStatus, 2) - player:setStorageValue(Storage.InServiceofYalahar.Mission05, 7) -- StorageValue for Questlog "Mission 05: Food or Fight" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.TamerinStatus, 2) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission05, 7) -- StorageValue for Questlog "Mission 05: Food or Fight" npcHandler:say("So be it!", npc, creature) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "morik") then - if player:getStorageValue(Storage.InServiceofYalahar.Questline) == 31 and player:removeItem(8820, 1) then - player:setStorageValue(Storage.InServiceofYalahar.Questline, 32) - player:setStorageValue(Storage.InServiceofYalahar.Mission05, 5) -- StorageValue for Questlog "Mission 05: Food or Fight" + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 31 and player:removeItem(8820, 1) then + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 32) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission05, 5) -- StorageValue for Questlog "Mission 05: Food or Fight" npcHandler:say("So he finally got what he deserved. As I said, as soon as you have helped me to solve both of my problems, we will talk about your {mission}.", npc, creature) npcHandler:setTopic(playerId, 0) else @@ -118,8 +118,8 @@ local function creatureSayCallback(npc, creature, type, message) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then - player:setStorageValue(Storage.InServiceofYalahar.Questline, 30) - player:setStorageValue(Storage.InServiceofYalahar.Mission05, 3) -- StorageValue for Questlog "Mission 05: Food or Fight" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 30) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission05, 3) -- StorageValue for Questlog "Mission 05: Food or Fight" npcHandler:say("I ask you for two things! For one thing, I need an animal cure and for another thing, I ask you to get rid of the gladiator Morik for me.", npc, creature) npcHandler:setTopic(playerId, 0) end diff --git a/data-otservbr-global/npc/tanaro.lua b/data-otservbr-global/npc/tanaro.lua index bf43db15d79..467b70989ae 100644 --- a/data-otservbr-global/npc/tanaro.lua +++ b/data-otservbr-global/npc/tanaro.lua @@ -67,6 +67,8 @@ npcConfig.shop = { { itemName = "salmon", clientId = 3579, buy = 6 }, { itemName = "valentine's cake", clientId = 6392, buy = 100 }, { itemName = "white mushroom", clientId = 3723, buy = 6 }, + { itemName = "vial of wine", clientId = 2874, buy = 3, count = 1, subType = 2 }, + { itemName = "vial of water", clientId = 2874, buy = 2, count = 1 }, } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/tehlim.lua b/data-otservbr-global/npc/tehlim.lua index f91c17adf39..4cec6b072bc 100644 --- a/data-otservbr-global/npc/tehlim.lua +++ b/data-otservbr-global/npc/tehlim.lua @@ -59,13 +59,13 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if Player(creature):getStorageValue(Storage.HiddenCityOfBeregar.RoyalRescue) == 5 then + if Player(creature):getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.RoyalRescue) == 5 then npcHandler:say("I warn you, those trolls are WAY more dangerous than the usual kind. Alone, I can't do anything for my brothers. Find a way to the trolls' hideout and rescue my brothers. Are you willing to help me?", npc, creature) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then - Player(creature):setStorageValue(Storage.HiddenCityOfBeregar.RoyalRescue, 6) + Player(creature):setStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.RoyalRescue, 6) npcHandler:say(" Great! I hope you find my brothers. Good luck!", npc, creature) npcHandler:setTopic(playerId, 0) end diff --git a/data-otservbr-global/npc/thanita.lua b/data-otservbr-global/npc/thanita.lua index 43a61f8e0d7..014ee8d1fe3 100644 --- a/data-otservbr-global/npc/thanita.lua +++ b/data-otservbr-global/npc/thanita.lua @@ -50,6 +50,43 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function creatureSayCallback(npc, creature, type, message) + local player = Player(creature) + local playerId = player:getId() + + -- Check if NPC can interact with the creature + if not npcHandler:checkInteraction(npc, creature) then + return false + end + + -- Check if the message contains "mission" + if MsgContains(message, "mission") then + if player:getStorageValue(Storage.Quest.U8_1.TowerDefenceQuest.Questline) == 1 and player:removeItem(140, 1) then + npcHandler:say({ + "Oh great! Supplies from Carlin! Let me see ......ahh, nothing meaningful at all, like always. Well, before I give you the password for the delivery, you have to help me! ...", + "I have massive problems with the goblin tribe that lives here. You look strong enough to face their leader but you need to be smart to lure him out. ...", + "I heard they don't like fire very much, maybe that's worth a try. Their beds are mostly made of straw which is known as easily inflammable. ...", + "The entrance to their cave is at the pond south east of here.", + }, npc, creature) + player:setStorageValue(Storage.Quest.U8_1.TowerDefenceQuest.Questline, 2) + player:setStorageValue(Storage.Quest.U8_1.TowerDefenceQuest.Door, 2) + npcHandler:setTopic(playerId, 0) + elseif player:getStorageValue(Storage.Quest.U8_1.TowerDefenceQuest.Questline) == 3 then + npcHandler:say("Impressive!! I could need someone like you here at the watchtower! Okay, the password you need to tell Bunny is ' password* '. Come back and visit me if you like to!", npc, creature) + player:setStorageValue(Storage.Quest.U8_1.TowerDefenceQuest.Questline, 4) + npcHandler:setTopic(playerId, 0) + end + end + + return true +end + +npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) + +npcHandler:setMessage(MESSAGE_GREET, "How could you sneak up on me like this? I thought you were one of THEM! Well, since you are not, what brings you to this wilderness?") +npcHandler:setMessage(MESSAGE_WALKAWAY, "Take good care of yourself traveller. Would be a shame to lose such a courageous wanderer to those green monsters.") +npcHandler:setMessage(MESSAGE_FAREWELL, "Take good care of yourself traveller. Would be a shame to lose such a courageous wanderer to those green monsters.") + npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- npcType registering the npcConfig table diff --git a/data-otservbr-global/npc/the_orc_king.lua b/data-otservbr-global/npc/the_orc_king.lua index c7450c7dfdb..b2a736c117d 100644 --- a/data-otservbr-global/npc/the_orc_king.lua +++ b/data-otservbr-global/npc/the_orc_king.lua @@ -86,7 +86,7 @@ local function creatureSayCallback(npc, creature, type, message) end end elseif MsgContains(message, "cookie") then - if player:getStorageValue(Storage.WhatAFoolish.Questline) == 31 and player:getStorageValue(Storage.WhatAFoolish.CookieDelivery.OrcKing) ~= 1 then + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline) == 31 and player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.OrcKing) ~= 1 then npcHandler:say("You bring me a stinking cookie???", npc, creature) npcHandler:setTopic(playerId, 2) end @@ -115,7 +115,7 @@ local function creatureSayCallback(npc, creature, type, message) return true end - player:setStorageValue(Storage.WhatAFoolish.CookieDelivery.OrcKing, 1) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.OrcKing, 1) if player:getCookiesDelivered() == 10 then player:addAchievement("Allow Cookies?") end diff --git a/data-otservbr-global/npc/theodore_loveless.lua b/data-otservbr-global/npc/theodore_loveless.lua index 23182106883..4e98c45cbf1 100644 --- a/data-otservbr-global/npc/theodore_loveless.lua +++ b/data-otservbr-global/npc/theodore_loveless.lua @@ -68,7 +68,7 @@ local function creatureSayCallback(npc, creature, type, message) return true end - player:setStorageValue(Storage.WhatAFoolish.Cigar, 1) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Cigar, 1) npc:getPosition():sendMagicEffect(CONST_ME_EXPLOSIONHIT) npcHandler:say({ "Ah what a fine blend. I really ...", diff --git a/data-otservbr-global/npc/tim_the_guard.lua b/data-otservbr-global/npc/tim_the_guard.lua index d5920f42205..627231b00a0 100644 --- a/data-otservbr-global/npc/tim_the_guard.lua +++ b/data-otservbr-global/npc/tim_the_guard.lua @@ -58,7 +58,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "trouble") and player:getStorageValue(Storage.TheInquisition.TimGuard) < 1 and player:getStorageValue(Storage.TheInquisition.Mission01) ~= -1 then + if MsgContains(message, "trouble") and player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.TimGuard) < 1 and player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission01) ~= -1 then npcHandler:say("Ah, well. Just this morning my new toothbrush fell into the toilet.", npc, creature) npcHandler:setTopic(playerId, 1) elseif MsgContains(message, "authorities") then @@ -73,11 +73,14 @@ local function creatureSayCallback(npc, creature, type, message) end elseif MsgContains(message, "gods would allow") then if npcHandler:getTopic(playerId) == 3 then - npcHandler:say("It's not a drama!! I think there is just no god who's responsible for toothbrush safety, that's all ... ", npc, creature) + npcHandler:say({ + "It's not a drama!! I think there is just no god who's responsible for toothbrush safety, that's all ...", + "And even IF through some miracle the stupid toothbrush had jumped out of the toilet into my hand, I honestly doubt I would ever use it again.", + }, npc, creature) npcHandler:setTopic(playerId, 0) - if player:getStorageValue(Storage.TheInquisition.TimGuard) < 1 then - player:setStorageValue(Storage.TheInquisition.TimGuard, 1) - player:setStorageValue(Storage.TheInquisition.Mission01, player:getStorageValue(Storage.TheInquisition.Mission01) + 1) -- The Inquisition Questlog- "Mission 1: Interrogation" + if player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.TimGuard) < 1 then + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.TimGuard, 1) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission01, player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission01) + 1) -- The Inquisition Questlog- "Mission 1: Interrogation" player:getPosition():sendMagicEffect(CONST_ME_HOLYAREA) end end diff --git a/data-otservbr-global/npc/timothy.lua b/data-otservbr-global/npc/timothy.lua index 601043bebf3..6da55c31e57 100644 --- a/data-otservbr-global/npc/timothy.lua +++ b/data-otservbr-global/npc/timothy.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "research notes") then - if player:getStorageValue(Storage.TheWayToYalahar.QuestLine) == 1 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.TheWayToYalahar) == 1 then npcHandler:say({ "Oh, you are the contact person of the academy? Here are the notes that contain everything I have found out so far. ...", "This city is absolutely fascinating, I tell you! If there hadn't been all this trouble and chaos in the past, this city would certainly be the greatest centre of knowledge in the world. ...", @@ -70,7 +70,7 @@ local function creatureSayCallback(npc, creature, type, message) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then - player:setStorageValue(Storage.TheWayToYalahar.QuestLine, 2) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.TheWayToYalahar, 2) npcHandler:say("Excellent! You will find Palimuth near the entrance of the city centre. Just ask him if you can assist him in a few missions.", npc, creature) player:addItem(9171, 1) npcHandler:setTopic(playerId, 0) @@ -79,6 +79,8 @@ local function creatureSayCallback(npc, creature, type, message) return true end +npcHandler:setMessage(MESSAGE_GREET, "Oh, hello! It's a pleasure to see a visitor from the continent.") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/tony.lua b/data-otservbr-global/npc/tony.lua index c35b9288494..991182d2b8e 100644 --- a/data-otservbr-global/npc/tony.lua +++ b/data-otservbr-global/npc/tony.lua @@ -59,10 +59,10 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "report") then - if player:getStorageValue(Storage.InServiceofYalahar.Questline) == 7 or player:getStorageValue(Storage.InServiceofYalahar.Questline) == 13 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 7 or player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 13 then npcHandler:say("Uhm, report, eh? . ", npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, math.max(1, player:getStorageValue(Storage.InServiceofYalahar.Questline) + 1)) - player:setStorageValue(Storage.InServiceofYalahar.Mission02, math.max(1, player:getStorageValue(Storage.InServiceofYalahar.Mission02) + 1)) -- StorageValue for Questlog "Mission 02: Watching the Watchmen" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, math.max(1, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) + 1)) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission02, math.max(1, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission02) + 1)) -- StorageValue for Questlog "Mission 02: Watching the Watchmen" npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "pass") then diff --git a/data-otservbr-global/npc/ulala.lua b/data-otservbr-global/npc/ulala.lua index 46582cfc734..d5d1063bc4c 100644 --- a/data-otservbr-global/npc/ulala.lua +++ b/data-otservbr-global/npc/ulala.lua @@ -58,60 +58,60 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.UnnaturalSelection.Questline) == 5 then + if player:getStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Questline) == 5 then npcHandler:say({ "The great hunt! About to begin, but gods are not in favour of us yet. We need all help we get. We please Krunus with special nature dance. ...", "You seen Krunus altar south in camp, on mountain top? This is where dance is. If you do right steps Krunus will give you sign. If wrong, he not pleased. ...", "Do Krunus dance for us! Step and dance and turn around! You will know when you do good. Make {Krunus} happy and support our great hunt!", }, npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.UnnaturalSelection.Questline) == 6 then + elseif player:getStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Questline) == 6 then npcHandler:say("Come back if you finished the dance.", npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.UnnaturalSelection.Questline) == 7 then + elseif player:getStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Questline) == 7 then npcHandler:say({ "You born dancer! Krunus is pleased and support the great hunt. But he easy to please! Pandor much harder. We weak, so he sad about us. ...", "Maybe we can please with sacrifice of body parts of our enemies. But you need help us get it! We much too weak. ...", "If you bring us 5 teeth of green men, 5 skin of horned ones and 5 skin of snakemen that already be good. Please help tribe make Pandor happy!", }, npc, creature) - player:setStorageValue(Storage.UnnaturalSelection.Questline, 8) - player:setStorageValue(Storage.UnnaturalSelection.Mission04, 1) --Questlog, Unnatural Selection Quest "Mission 4: Bits and Pieces" + player:setStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Questline, 8) + player:setStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Mission04, 1) --Questlog, Unnatural Selection Quest "Mission 4: Bits and Pieces" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.UnnaturalSelection.Questline) == 8 then + elseif player:getStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Questline) == 8 then npcHandler:say("Please help tribe make Pandor happy! Did you bring us what I asked?", npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.UnnaturalSelection.Questline) == 9 then + elseif player:getStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Questline) == 9 then npcHandler:say({ "We need make sure Fasuon is on our side. There is laaaaaaaarge crystal on top of mountain. Don't know where come from, was there before us. Problem is - way is infested with creatures! ...", "Creatures from the other side of mountain. Bony! Scary! We too weak to go through there, can just run and hope to survive.. but you do better! ...", "Please find great crystal of Fasuon and pray there for his support!", }, npc, creature) - player:setStorageValue(Storage.UnnaturalSelection.Questline, 10) - player:setStorageValue(Storage.UnnaturalSelection.Mission05, 1) --Questlog, Unnatural Selection Quest "Mission 5: Ray of Light" + player:setStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Questline, 10) + player:setStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Mission05, 1) --Questlog, Unnatural Selection Quest "Mission 5: Ray of Light" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.UnnaturalSelection.Questline) == 10 then + elseif player:getStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Questline) == 10 then npcHandler:say("Please find great crystal of Fasuon and pray there for his support!", npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.UnnaturalSelection.Questline) == 11 then + elseif player:getStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Questline) == 11 then npcHandler:say("You prayed to Fasuon! Me saw ray of lights on mountain top! Beautiful it was. Me thank you for your help. Great hunt almost can't go wrong now!", npc, creature) - player:setStorageValue(Storage.UnnaturalSelection.Questline, 12) - player:setStorageValue(Storage.UnnaturalSelection.Mission05, 3) --Questlog, Unnatural Selection Quest "Mission 5: Ray of Light" + player:setStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Questline, 12) + player:setStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Mission05, 3) --Questlog, Unnatural Selection Quest "Mission 5: Ray of Light" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.UnnaturalSelection.Questline) == 12 then + elseif player:getStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Questline) == 12 then npcHandler:say({ "Uzroth very easy to anger. You been great help so far but me think that need to pray to Uzroth meself. Only me understand what he wants at time and he is veeeeeery moody. Cannot risk to make angry! ...", "So me will do when you gone. But me thank you very much. Go speak Lazaran and tell the gods are pleased now.", }, npc, creature) - player:setStorageValue(Storage.UnnaturalSelection.Questline, 13) - player:setStorageValue(Storage.UnnaturalSelection.Mission06, 1) --Questlog, Unnatural Selection Quest "Mission 6: Firewater Burn" + player:setStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Questline, 13) + player:setStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Mission06, 1) --Questlog, Unnatural Selection Quest "Mission 6: Firewater Burn" npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "krunus") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("Krunus is God for plants and birth. He hidden in all that grows.", npc, creature) - player:setStorageValue(Storage.UnnaturalSelection.Questline, 6) - player:setStorageValue(Storage.UnnaturalSelection.Mission03, 2) --Questlog, Unnatural Selection Quest "Mission 3: Dance Dance Evolution" - player:setStorageValue(Storage.UnnaturalSelection.DanceStatus, 1) + player:setStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Questline, 6) + player:setStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Mission03, 2) --Questlog, Unnatural Selection Quest "Mission 3: Dance Dance Evolution" + player:setStorageValue(Storage.Quest.U8_54.UnnaturalSelection.DanceStatus, 1) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "yes") then @@ -121,8 +121,8 @@ local function creatureSayCallback(npc, creature, type, message) player:removeItem(5878, 5) player:removeItem(5876, 5) npcHandler:say("Me thank you! Me will bring sacrifice for Pandor. He surely be pleased with our work. Well your work, but me won't tell him. Teehee.", npc, creature) - player:setStorageValue(Storage.UnnaturalSelection.Questline, 9) - player:setStorageValue(Storage.UnnaturalSelection.Mission04, 2) --Questlog, Unnatural Selection Quest "Mission 4: Bits and Pieces" + player:setStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Questline, 9) + player:setStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Mission04, 2) --Questlog, Unnatural Selection Quest "Mission 4: Bits and Pieces" npcHandler:setTopic(playerId, 0) else npcHandler:say("You do not have these things!", npc, creature) @@ -132,6 +132,9 @@ local function creatureSayCallback(npc, creature, type, message) end return true end + +npcHandler:setMessage(MESSAGE_GREET, "Spirits welcome you.") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/uncle.lua b/data-otservbr-global/npc/uncle.lua index cfe4b85d5f2..e5dac50d0a2 100644 --- a/data-otservbr-global/npc/uncle.lua +++ b/data-otservbr-global/npc/uncle.lua @@ -59,52 +59,52 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then - player:setStorageValue(Storage.SecretService.Quest, 1) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 1) player:addAchievement("Secret Agent") npcHandler:say("Then welcome to the family.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then - player:setStorageValue(Storage.SecretService.AVINMission01, 4) - player:setStorageValue(Storage.SecretService.Quest, 3) + player:setStorageValue(Storage.Quest.U8_1.SecretService.AVINMission01, 4) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 3) npcHandler:say("I hope you did not make this little pest too nervous. He isn't serving us too well by hiding under some stone or something like that. However, nicely done for your first job.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then if player:removeItem(403, 1) then - player:setStorageValue(Storage.SecretService.AVINMission02, 2) - player:setStorageValue(Storage.SecretService.Quest, 5) + player:setStorageValue(Storage.Quest.U8_1.SecretService.AVINMission02, 2) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 5) npcHandler:say("Ah, yes. This will be a most interesting lecture.", npc, creature) else npcHandler:say("Please bring me the file AH-X17L89.", npc, creature) end npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 4 then - player:setStorageValue(Storage.SecretService.AVINMission03, 4) - player:setStorageValue(Storage.SecretService.Quest, 7) + player:setStorageValue(Storage.Quest.U8_1.SecretService.AVINMission03, 4) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 7) npcHandler:say("Does it not warm up your heart if you can bring a little joy to the people while doing your job? Well, don't get carried away, most part of your job is not warming up hearts but tearing them out.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 5 then - player:setStorageValue(Storage.SecretService.AVINMission04, 3) - player:setStorageValue(Storage.SecretService.Quest, 9) + player:setStorageValue(Storage.Quest.U8_1.SecretService.AVINMission04, 3) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 9) npcHandler:say("Good work getting rid of that nuisance.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 6 then if player:removeItem(406, 1) then - player:setStorageValue(Storage.SecretService.AVINMission05, 2) - player:setStorageValue(Storage.SecretService.Quest, 11) + player:setStorageValue(Storage.Quest.U8_1.SecretService.AVINMission05, 2) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 11) npcHandler:say("Fine, fine. This will serve us quite well. Ah, don't give me that look... you are not that stupid, are you?", npc, creature) else npcHandler:say("Come back when you've found the ring.", npc, creature) end npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 7 then - player:setStorageValue(Storage.SecretService.AVINMission06, 3) - player:setStorageValue(Storage.SecretService.Quest, 13) + player:setStorageValue(Storage.Quest.U8_1.SecretService.AVINMission06, 3) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 13) npcHandler:say("Even if the present has not improved our relations, the weapons will enable the barbarians to put more pressure on Svargrond and Carlin. So in any case we profited from the present.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 8 then if player:removeItem(396, 1) then - player:setStorageValue(Storage.SecretService.Mission07, 2) - player:setStorageValue(Storage.SecretService.Quest, 15) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Mission07, 2) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 15) player:addAchievement("Top AVIN Agent") player:addItem(899, 1) npcHandler:say({ @@ -120,7 +120,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("As you wish.", npc, creature) npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "join") then - if player:getStorageValue(Storage.SecretService.Quest) < 1 then + if player:getStorageValue(Storage.Quest.U8_1.SecretService.Quest) < 1 then npcHandler:say({ "Well, well, well! As you might know, we are entrusted by the Venorean tradesmen to ensure the safety of their ventures ...", "This task often puts our representatives in rather dangerous and challenging situations. On the other hand, you can expect a generous compensation for your efforts on our behalf...", @@ -130,42 +130,42 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "mission") then - if player:getStorageValue(Storage.SecretService.Quest) == 1 and player:getStorageValue(Storage.SecretService.TBIMission01) < 1 and player:getStorageValue(Storage.SecretService.CGBMission01) < 1 then - player:setStorageValue(Storage.SecretService.Quest, 2) - player:setStorageValue(Storage.SecretService.AVINMission01, 1) + if player:getStorageValue(Storage.Quest.U8_1.SecretService.Quest) == 1 and player:getStorageValue(Storage.Quest.U8_1.SecretService.TBIMission01) < 1 and player:getStorageValue(Storage.Quest.U8_1.SecretService.CGBMission01) < 1 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 2) + player:setStorageValue(Storage.Quest.U8_1.SecretService.AVINMission01, 1) player:addItem(402, 1) npcHandler:say("Let's start with a rather simple job. There is a contact in Thais with that we need to get in touch again. Deliver this note to Gamel in Thais. Get an answer from him. If he is a bit reluctant, be 'persuasive'.", npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.SecretService.AVINMission01) == 3 then + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.AVINMission01) == 3 then npcHandler:say("Do you have news to make old Uncle happy?", npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.SecretService.AVINMission01) == 4 and player:getStorageValue(Storage.SecretService.Quest) == 3 then - player:setStorageValue(Storage.SecretService.Quest, 4) - player:setStorageValue(Storage.SecretService.AVINMission02, 1) + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.AVINMission01) == 4 and player:getStorageValue(Storage.Quest.U8_1.SecretService.Quest) == 3 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 4) + player:setStorageValue(Storage.Quest.U8_1.SecretService.AVINMission02, 1) npcHandler:say({ "Our Thaian allies are sometimes a bit forgetful. For this reason we are not always informed timely about certain activities. We won't insult our great king by pointing out this flaw ...", "Still, we are in dire need of these information so we are forced to take action on our own. Travel to the Thaian castle and 'find' the documents we need. They have the file name AH-X17L89. ...", "Now go to Thaian castle and get the File.", }, npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.SecretService.AVINMission02) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.AVINMission02) == 1 then npcHandler:say("Do you have news to make old Uncle happy?", npc, creature) npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.SecretService.AVINMission02) == 2 and player:getStorageValue(Storage.SecretService.Quest) == 5 then - player:setStorageValue(Storage.SecretService.Quest, 6) - player:setStorageValue(Storage.SecretService.AVINMission03, 1) + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.AVINMission02) == 2 and player:getStorageValue(Storage.Quest.U8_1.SecretService.Quest) == 5 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 6) + player:setStorageValue(Storage.Quest.U8_1.SecretService.AVINMission03, 1) player:addItem(404, 1) npcHandler:say({ "The oppression of Carlin's men by their lunatic women is unbearable to some of our authorities. We see it as our honourable duty to support the male resistance in Carlin ...", "The poor guys have some speakeasy in the sewers. Bring them this barrel of beer with our kind regards to strengthen their resistance.", }, npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.SecretService.AVINMission03) == 3 then - npcHandler:say("Do you have news to make old Uncle happy?", npc, creature) + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.AVINMission03) == 3 then + npcHandler:say("Do you have news to make old Uncle happy? Don't tell me you need another barrel of beer, though.", npc, creature) npcHandler:setTopic(playerId, 4) - elseif player:getStorageValue(Storage.SecretService.AVINMission03) == 4 and player:getStorageValue(Storage.SecretService.Quest) == 7 then - player:setStorageValue(Storage.SecretService.Quest, 8) - player:setStorageValue(Storage.SecretService.AVINMission04, 1) + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.AVINMission03) == 4 and player:getStorageValue(Storage.Quest.U8_1.SecretService.Quest) == 7 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 8) + player:setStorageValue(Storage.Quest.U8_1.SecretService.AVINMission04, 1) npcHandler:say({ "As you know, our lovely city is a bastion of civilisation surrounded by numerous hazards. The nearby Plains of Havoc and the hostile elven town Shadowthorn are only a few of the obstacles we have to overcome on an almost daily basis ...", "Against all odds, we managed to gain some modest profit by exploiting these circumstances in one way or the other. Recently though, one of our neighbours went too far...", @@ -175,20 +175,20 @@ local function creatureSayCallback(npc, creature, type, message) "Even though we can live with this loss, it becomes obvious that the knight's madness gets worse which makes him unbearable as a neighbour. Find him in his hideout in the Green Claw Swamp and get rid of him.", }, npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.SecretService.AVINMission04) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.AVINMission04) == 2 then npcHandler:say("Do you have news to make old Uncle happy?", npc, creature) npcHandler:setTopic(playerId, 5) - elseif player:getStorageValue(Storage.SecretService.AVINMission04) == 3 and player:getStorageValue(Storage.SecretService.Quest) == 9 then - player:setStorageValue(Storage.SecretService.Quest, 10) - player:setStorageValue(Storage.SecretService.AVINMission05, 1) + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.AVINMission04) == 3 and player:getStorageValue(Storage.Quest.U8_1.SecretService.Quest) == 9 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 10) + player:setStorageValue(Storage.Quest.U8_1.SecretService.AVINMission05, 1) npcHandler:say("I need you to locate a lost ring on the Isle of the Kings for me, get back to me once you have it.", npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.SecretService.AVINMission05) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.AVINMission05) == 1 then npcHandler:say("Do you have news to make old Uncle happy?", npc, creature) npcHandler:setTopic(playerId, 6) - elseif player:getStorageValue(Storage.SecretService.AVINMission05) == 2 and player:getStorageValue(Storage.SecretService.Quest) == 11 then - player:setStorageValue(Storage.SecretService.Quest, 12) - player:setStorageValue(Storage.SecretService.AVINMission06, 1) + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.AVINMission05) == 2 and player:getStorageValue(Storage.Quest.U8_1.SecretService.Quest) == 11 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 12) + player:setStorageValue(Storage.Quest.U8_1.SecretService.AVINMission06, 1) player:addItem(405, 1) npcHandler:say({ "We try to establish new trade agreements with various potential customers. Sometimes we have to offer some presents in advance to ensure that trade is prospering and flourishing. It will be your task to deliver one of those little presents ...", @@ -197,19 +197,19 @@ local function creatureSayCallback(npc, creature, type, message) "Unfortunately, most of them will attack you on sight. It will probably take some time until you find somebody that is willing to talk to you and to accept the weapons.", }, npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.SecretService.AVINMission06) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.AVINMission06) == 2 then npcHandler:say("Do you have news to make old Uncle happy?", npc, creature) npcHandler:setTopic(playerId, 7) - elseif player:getStorageValue(Storage.SecretService.AVINMission06) == 3 and player:getStorageValue(Storage.SecretService.Quest) == 13 then - player:setStorageValue(Storage.SecretService.Quest, 14) - player:setStorageValue(Storage.SecretService.Mission07, 1) + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.AVINMission06) == 3 and player:getStorageValue(Storage.Quest.U8_1.SecretService.Quest) == 13 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.Quest, 14) + player:setStorageValue(Storage.Quest.U8_1.SecretService.Mission07, 1) npcHandler:say({ "Some dwarven criminal called Blowbeard dares to blackmail our city. He threatens to destroy the whole city and demands an insane amount of gold ...", "Of course we are not willing to give him a single gold coin. It will be your job to get rid of this problem. Go and kill this infamous dwarf ...", "His laboratory is near the technomancer hall. Bring me his beard as proof of his demise.", }, npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.SecretService.AVINMission06) == 3 and player:getStorageValue(Storage.SecretService.Mission07) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_1.SecretService.AVINMission06) == 3 and player:getStorageValue(Storage.Quest.U8_1.SecretService.Mission07) == 1 then npcHandler:say("Do you have news to make old Uncle happy?", npc, creature) npcHandler:setTopic(playerId, 8) end diff --git a/data-otservbr-global/npc/urkalio.lua b/data-otservbr-global/npc/urkalio.lua index dbcbbc238b1..5919a42d761 100644 --- a/data-otservbr-global/npc/urkalio.lua +++ b/data-otservbr-global/npc/urkalio.lua @@ -62,6 +62,9 @@ npcConfig.shop = { { itemName = "mug of lemonade", clientId = 2880, buy = 2, count = 12 }, { itemName = "mug of water", clientId = 2880, buy = 1, count = 1 }, { itemName = "mug of wine", clientId = 2880, buy = 3, count = 2 }, + { itemName = "vial of beer", clientId = 2874, buy = 2, count = 1, subType = 3 }, + { itemName = "vial of wine", clientId = 2874, buy = 3, count = 1, subType = 2 }, + { itemName = "vial of water", clientId = 2874, buy = 1, count = 1 }, } -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/uzgod.lua b/data-otservbr-global/npc/uzgod.lua index db9ec364b58..d7c1c4bb457 100644 --- a/data-otservbr-global/npc/uzgod.lua +++ b/data-otservbr-global/npc/uzgod.lua @@ -80,7 +80,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "crimson sword") then - if player:getStorageValue(Storage.TravellingTrader.Mission05) == 1 then + if player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission05) == 1 then npcHandler:say("Me don't sell crimson sword.", npc, creature) npcHandler:setTopic(playerId, 5) end @@ -123,7 +123,7 @@ local function creatureSayCallback(npc, creature, type, message) if player:removeMoneyBank(250) and player:removeItem(5880, 3) then npcHandler:say("Ah, that's how me like me customers. Ok, me do this... ... another fine swing of the hammer here and there... ... here you have it!", npc, creature) player:addItem(7385, 1) - player:setStorageValue(Storage.TravellingTrader.Mission05, 2) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission05, 2) npcHandler:setTopic(playerId, 0) end end diff --git a/data-otservbr-global/npc/uzon.lua b/data-otservbr-global/npc/uzon.lua index bc53d46b60c..112dee20086 100644 --- a/data-otservbr-global/npc/uzon.lua +++ b/data-otservbr-global/npc/uzon.lua @@ -69,7 +69,7 @@ local function addTravelKeyword(keyword, text, cost, destination, condition, act end addTravelKeyword("eclipse", "Oh no, so the time has come? Do you really want me to fly you to this unholy place?", 110, Position(32659, 31915, 0), function(player) - return player:getStorageValue(Storage.TheInquisition.Questline) ~= 4 and player:getStorageValue(Storage.TheInquisition.Questline) ~= 5 + return player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) ~= 4 and player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) ~= 5 end) addTravelKeyword("farmine", "Do you seek a ride to Farmine for |TRAVELCOST|?", 60, Position(32983, 31539, 1), function(player) return player:getStorageValue(TheNewFrontier.Mission10[1]) ~= 2 diff --git a/data-otservbr-global/npc/walter_the_guard.lua b/data-otservbr-global/npc/walter_the_guard.lua index bb059f82df4..f3417ce3b27 100644 --- a/data-otservbr-global/npc/walter_the_guard.lua +++ b/data-otservbr-global/npc/walter_the_guard.lua @@ -58,7 +58,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "trouble") and player:getStorageValue(Storage.TheInquisition.WalterGuard) < 1 and player:getStorageValue(Storage.TheInquisition.Mission01) ~= -1 then + if MsgContains(message, "trouble") and player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.WalterGuard) < 1 and player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission01) ~= -1 then npcHandler:say("I think there is a pickpocket in town.", npc, creature) npcHandler:setTopic(playerId, 1) elseif MsgContains(message, "authorities") then @@ -75,9 +75,9 @@ local function creatureSayCallback(npc, creature, type, message) if npcHandler:getTopic(playerId) == 3 then npcHandler:say("If the gods had created the world a paradise, no one had to steal at all.", npc, creature) npcHandler:setTopic(playerId, 0) - if player:getStorageValue(Storage.TheInquisition.WalterGuard) < 1 then - player:setStorageValue(Storage.TheInquisition.WalterGuard, 1) - player:setStorageValue(Storage.TheInquisition.Mission01, player:getStorageValue(Storage.TheInquisition.Mission01) + 1) -- The Inquisition Questlog- "Mission 1: Interrogation" + if player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.WalterGuard) < 1 then + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.WalterGuard, 1) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission01, player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission01) + 1) -- The Inquisition Questlog- "Mission 1: Interrogation" player:getPosition():sendMagicEffect(CONST_ME_HOLYAREA) end end @@ -85,6 +85,8 @@ local function creatureSayCallback(npc, creature, type, message) return true end +npcHandler:setMessage(MESSAGE_GREET, "LONG LIVE THE KING!") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/willard.lua b/data-otservbr-global/npc/willard.lua index f35d20ad231..f6395476ba7 100644 --- a/data-otservbr-global/npc/willard.lua +++ b/data-otservbr-global/npc/willard.lua @@ -65,7 +65,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "package for rashid") then - if player:getStorageValue(Storage.TravellingTrader.Mission02) >= 1 and player:getStorageValue(Storage.TravellingTrader.Mission02) < 3 then + if player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission02) >= 1 and player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission02) < 3 then npcHandler:say({ "Oooh, damn, I completely forgot about that. I was supposed to pick it up from the Outlaw Camp. ...", "I can't leave my shop here right now, please go and talk to Snake Eye about that package... I promise he won't make any trouble. ...", @@ -76,7 +76,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("Thank you, I appreciate it. Don't forget to mention the package to Snake.", npc, creature) - player:setStorageValue(Storage.TravellingTrader.Mission02, player:getStorageValue(Storage.TravellingTrader.Mission02) + 1) + player:setStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission02, player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission02) + 1) npcHandler:setTopic(playerId, 0) end end diff --git a/data-otservbr-global/npc/wyda.lua b/data-otservbr-global/npc/wyda.lua index 340e21db0f8..6037122dfd7 100644 --- a/data-otservbr-global/npc/wyda.lua +++ b/data-otservbr-global/npc/wyda.lua @@ -62,7 +62,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "cookie") then - if player:getStorageValue(Storage.WhatAFoolish.Questline) == 31 and player:getStorageValue(Storage.WhatAFoolish.CookieDelivery.Wyda) ~= 1 then + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline) == 31 and player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.Wyda) ~= 1 then npcHandler:say("You brought me a cookie?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -91,7 +91,7 @@ local function creatureSayCallback(npc, creature, type, message) return true end - player:setStorageValue(Storage.WhatAFoolish.CookieDelivery.Wyda, 1) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.Wyda, 1) player:addCondition(condition) if player:getCookiesDelivered() == 10 then player:addAchievement("Allow Cookies?") @@ -129,6 +129,8 @@ local function creatureSayCallback(npc, creature, type, message) return true end +npcHandler:setMessage(MESSAGE_GREET, "What? A mundane talking to me? Amusing.") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/wyrdin.lua b/data-otservbr-global/npc/wyrdin.lua index 6e66b007db7..fd172008c81 100644 --- a/data-otservbr-global/npc/wyrdin.lua +++ b/data-otservbr-global/npc/wyrdin.lua @@ -77,7 +77,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.TheWayToYalahar.QuestLine) < 1 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.JoiningTheExplorers) >= 4 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) >= 4 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.TheWayToYalahar) < 1 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.QuestLine) >= 5 and player:getStorageValue(Storage.Quest.U7_6.ExplorerSociety.JoiningTheExplorers) >= 5 then npcHandler:say({ "There is indeed something that needs our attention. In the far north, a new city named Yalahar was discovered. It seems to be incredibly huge. ...", "According to travelers, it's a city of glory and wonders. We need to learn as much as we can about this city and its inhabitants. ...", @@ -85,27 +85,29 @@ local function creatureSayCallback(npc, creature, type, message) "Please look for the explorer's society's captain Maximilian in Liberty Bay. Ask him for a passage to Yalahar. There visit Timothy of the explorer's society and get his research notes. ...", "It might be a good idea to explore the city a bit on your own before you deliver the notes here, but please make sure you don't lose them.", }, npc, creature) - player:setStorageValue(Storage.TheWayToYalahar.QuestLine, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.TheWayToYalahar, 1) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TheWayToYalahar.QuestLine) == 2 then - npcHandler:say("Did you bring the papers I asked you for?", npc, creature) + end + elseif MsgContains(message, "research") or MsgContains(message, "notes") then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.TheWayToYalahar) == 2 then + npcHandler:say("Do you have the papers I asked you for with you?", npc, creature) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then if player:removeItem(9171, 1) then - player:setStorageValue(Storage.TheWayToYalahar.QuestLine, 3) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.TheWayToYalahar, 3) npcHandler:say("Oh marvellous, please excuse me. I need to read this text immediately. Here, take this small reward of 500 gold pieces for your efforts.", npc, creature) player:addMoney(500) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 3 then if player:getStorageValue(TheNewFrontier.Mission05.Wyrdin) == 2 and player:removeItem(10025, 1) then - npcHandler:say( - { "By Uman! That's one of the rare almanacs of Origus! I had no idea that you are a scholar yourself! And a generous one on top of it! ...", "This book must be worth some thousand crystal coins on the free market. Look at the signature here, it's Origus' very own! ...", "Of course we should talk again about your request. What do you say makes Farmine important?" }, - npc, - creature - ) + npcHandler:say({ + "By Uman! That's one of the rare almanacs of Origus! I had no idea that you are a scholar yourself! And a generous one on top of it! ...", + "This book must be worth some thousand crystal coins on the free market. Look at the signature here, it's Origus' very own! ...", + "Of course we should talk again about your request. What do you say makes Farmine important?", + }, npc, creature) player:setStorageValue(TheNewFrontier.Mission05.Wyrdin, 1) npcHandler:setTopic(playerId, 2) end @@ -150,6 +152,7 @@ local function creatureSayCallback(npc, creature, type, message) end npcHandler:setMessage(MESSAGE_GREET, "Hello, what brings you here?") +npcHandler:setMessage(MESSAGE_FAREWELL, "Good luck for your travels, |PLAYERNAME|.") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/xorlosh.lua b/data-otservbr-global/npc/xorlosh.lua index db2b49d85aa..1ebcf535e0d 100644 --- a/data-otservbr-global/npc/xorlosh.lua +++ b/data-otservbr-global/npc/xorlosh.lua @@ -58,34 +58,40 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.HiddenCityOfBeregar.GoingDown) < 1 then + if player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.GoingDown) < 1 then npcHandler:say("Hmmmm, you could indeed help me. See this mechanism? Some son of a rotworm put WAY too much stuff on this elevator and now it's broken. I need 3 gear wheels to fix it. You think you could get them for me?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.HiddenCityOfBeregar.GoingDown) == 1 and player:removeItem(8775, 3) then - player:setStorageValue(Storage.HiddenCityOfBeregar.GoingDown, 2) + elseif player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.GoingDown) == 1 and player:removeItem(8775, 3) then + player:setStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.GoingDown, 2) npcHandler:say("HOLY MOTHER OF ALL ROTWORMS! You did it and they are of even better quality than the old ones. You should be the first one to try the elevator, just jump on it. See you my friend.", npc, creature) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then - player:setStorageValue(Storage.HiddenCityOfBeregar.GoingDown, 1) - player:setStorageValue(Storage.HiddenCityOfBeregar.DefaultStart, 1) + player:setStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.GoingDown, 1) + player:setStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.DefaultStart, 1) npcHandler:say("That would be great! Maybe a blacksmith can forge you some. Come back when you got them and ask me about your mission.", npc, creature) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "tunnel") then - if player:getStorageValue(Storage.HiddenCityOfBeregar.RoyalRescue) == 1 then + if player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.RoyalRescue) == 1 then npcHandler:say({ "There should be a book in our library about tunnelling. I don't have that much time to talk to you about that. ...", - "The book about tunnelling is in the library which is located in the north eastern wing of Beregar city.", + "If you want to have some information, you'll just have to find that book. If you need some equipment, go ask Harog. You'll find the library in the north eastern wing of Beregar city.", }, npc, creature) end + elseif MsgContains(message, "book") then + if player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.RoyalRescue) == 1 then + npcHandler:say("The book about tunnelling is in the library which is located in the north eastern wing of Beregar city.", npc, creature) + end end + return true end npcHandler:setMessage(MESSAGE_WALKAWAY, "See you my friend.") npcHandler:setMessage(MESSAGE_FAREWELL, "See you my friend.") npcHandler:setMessage(MESSAGE_GREET, "Who are you? Are you a genius in mechanics? You don't look like one.") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/yalahari.lua b/data-otservbr-global/npc/yalahari.lua index b679064fb77..ce9348a2343 100644 --- a/data-otservbr-global/npc/yalahari.lua +++ b/data-otservbr-global/npc/yalahari.lua @@ -59,24 +59,24 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.InServiceofYalahar.Questline) == 17 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 17 then npcHandler:say({ "With all the coming and going of strangers here, it would be quite tedious to explain everything again and again. So we have written a manifesto. ...", "Grab a copy from the room behind me. Let's talk about your further career in our ranks once you've read it.", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 18) - player:setStorageValue(Storage.InServiceofYalahar.Mission03, 3) -- StorageValue for Questlog "Mission 03: Death to the Deathbringer" - player:setStorageValue(Storage.InServiceofYalahar.NotesAzerus, 0) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 18) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission03, 3) -- StorageValue for Questlog "Mission 03: Death to the Deathbringer" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.NotesAzerus, 1) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.NotesAzerus) == 1 and player:getStorageValue(Storage.InServiceofYalahar.Questline) == 18 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.NotesAzerus) == 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 18 then npcHandler:say({ "I'm mildly impressed by your previous deeds in our service. So I'm willing to grant you some more important {missions}. ...", "If you please us, a life of luxury as an important person in our city is ensured. If you fail, you will be replaced by someone more capable than you. ...", "So if you are up for a challenge, ask me for a {mission}.", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 19) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 19) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 19 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 19 then npcHandler:say({ "The former alchemist quarter was struck by even more disasters than the rest of the city. Fires, explosions, poisonous fumes - all sorts of catastrophes. ...", "The worst plague, however, are unknown diseases that have spread in this quarter and eradicated any human population. We must stop it before other quarters areafflicted. We already identified certain carriers responsible for spreading the plague. ...", @@ -85,41 +85,41 @@ local function creatureSayCallback(npc, creature, type, message) "At least we have to make sure that these scientists did not die in vain, and honour their researches. So please bring us these research notes. ...", "Also, I will inform the guards that you are allowed to pass the centre gate to the alchemist quarter. Just use the gate mechanism to pass.", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 20) - player:setStorageValue(Storage.InServiceofYalahar.Mission03, 4) -- StorageValue for Questlog "Mission 03: Death to the Deathbringer" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 20) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission03, 4) -- StorageValue for Questlog "Mission 03: Death to the Deathbringer" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 21 and player:getStorageValue(Storage.InServiceofYalahar.AlchemistFormula) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 21 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.AlchemistFormula) == 1 then npcHandler:say("So you have killed the plague carriers. Have you also retrieved the research papers? ", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 22 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 22 then npcHandler:say({ "We surely cannot allow some underworld kingpin to rule a significant part of the city. Although, I have to admit that his firm grip on the former trade quarter might be useful....", "I expect you to fight your way through his minions and to show him that we are determined and powerful enough to retake the quarter, if necessary by force. Talk to himafter killing some of his henchmen. ...", "I'm sure he'll understand that he will succumb to a greater power. That's how his little empire has worked after all. ...", "Also, I will inform the guards that you are allowed to pass the centre gate to the trade quarter now. Just use the gate mechanism to pass.", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 23) - player:setStorageValue(Storage.InServiceofYalahar.Mission04, 1) -- StorageValue for Questlog "Mission 04: Good to be Kingpin" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 23) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission04, 1) -- StorageValue for Questlog "Mission 04: Good to be Kingpin" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 26 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 26 then npcHandler:say({ "So he has been too uncooperative for you? Well, you weren't the first we have sent and you won't be the last. ...", "However, if you cannot even serve us as a bully, we might have to rethink if you are the right person for us. That was a bad job and we don't tolerate many of them.", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 27) - player:setStorageValue(Storage.InServiceofYalahar.Mission04, 6) -- StorageValue for Questlog "Mission 04: Good to be Kingpin" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 27) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission04, 6) -- StorageValue for Questlog "Mission 04: Good to be Kingpin" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 25 and player:getStorageValue(Storage.InServiceofYalahar.MrWestStatus) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 25 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.MrWestStatus) == 2 then npcHandler:say({ "I hope you gave this criminal a real scare! I'm sure he'll remember what he has to expect if he arouses our anger again. ...", "You have proven yourself as quite valuable with this mission! That was just the first step on your rise through the ranks of our helpers. ...", "Just ask me for more missions and we will see what you are capable of!", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.BadSide, player:getStorageValue(Storage.InServiceofYalahar.BadSide) >= 0 and player:getStorageValue(Storage.InServiceofYalahar.BadSide) + 1 or 0) -- Side Storage - player:setStorageValue(Storage.InServiceofYalahar.Questline, 27) - player:setStorageValue(Storage.InServiceofYalahar.Mission04, 6) -- StorageValue for Questlog "Mission 04: Good to be Kingpin" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.BadSide, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.BadSide) >= 0 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.BadSide) + 1 or 0) -- Side Storage + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 27) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission04, 6) -- StorageValue for Questlog "Mission 04: Good to be Kingpin" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 27 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 27 then npcHandler:say({ "As you probably noticed, once our city had a park and a zoo around a grand arena. It was a favourite pastime of our citizens to visit this quarter in their spare time. ...", "Nowadays, the quarter is lost. The animals are on the loose, and an attempt to revitalise the city with new arena games resulted in a revolt of the foreign gladiators. ...", @@ -128,26 +128,26 @@ local function creatureSayCallback(npc, creature, type, message) "We lack the manpower to retake all quarters, or just to defend ourselves adequately. If he bred us some guards and warbeasts, we could strengthen our positionconsiderably. ...", "Travel to the arena quarter and gain his assistance for us. I will inform the guards that you are allowed to pass the centre gate to the arena quarter now. Just use thegate mechanism to pass.", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 28) - player:setStorageValue(Storage.InServiceofYalahar.Mission05, 1) -- StorageValue for Questlog "Mission 05: Food or Fight" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 28) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission05, 1) -- StorageValue for Questlog "Mission 05: Food or Fight" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 33 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 33 then npcHandler:say({ "This druid dares to affront us? We will look into this when we have enough time. But there are other things that needs to be settled. ...", "Although, we probably should not do so after your last failure, we are willing to grant you another mission.", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 34) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 34) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 32 and player:getStorageValue(Storage.InServiceofYalahar.TamerinStatus) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 32 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.TamerinStatus) == 2 then npcHandler:say({ "So have you won us a new ally? Excellent. I knew you would not dare to ruin this mission. Soon we might be able to strengthen our defences and even relocate some of our guards. ...", "Perhaps some day soon, you lead your own unit of men. However, there are more missions that need to be accomplished. Let's talk about them.", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.BadSide, player:getStorageValue(Storage.InServiceofYalahar.BadSide) >= 0 and player:getStorageValue(Storage.InServiceofYalahar.BadSide) + 1 or 0) -- Side Storage - player:setStorageValue(Storage.InServiceofYalahar.Questline, 34) - player:setStorageValue(Storage.InServiceofYalahar.Mission05, 8) -- StorageValue for Questlog "Mission 05: Food or Fight" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.BadSide, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.BadSide) >= 0 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.BadSide) + 1 or 0) -- Side Storage + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 34) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission05, 8) -- StorageValue for Questlog "Mission 05: Food or Fight" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 34 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 34 then npcHandler:say({ "The old cemetery of the city has been abandoned decades ago when the activity of the various undead there became unbearable. The reason for their appearance was never found out or researched. ...", "However, those undead could be useful, at least some of them. Particular ghosts consist of a substance that is very similar to the energy source that powered some of our devices. ...", @@ -155,93 +155,99 @@ local function creatureSayCallback(npc, creature, type, message) "Use it to attract ghosts and slay them. Then use the residues of the ghosts on the charm to capture the essence. ...", "Once it is filled, ghosts will not be attracted any longer. Then return the charm to me. I will inform the guards that you are allowed to pass the centre gate to the cemetery quarter now. Just use the gate mechanism to pass.", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 35) - player:setStorageValue(Storage.InServiceofYalahar.Mission06, 1) -- StorageValue for Questlog "Mission 06: Frightening Fuel" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 35) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission06, 1) -- StorageValue for Questlog "Mission 06: Frightening Fuel" player:addItem(8822, 1) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 38 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 38 then npcHandler:say({ "Destroyed you say? That's impossible! I'm not sure if I can trust you in this matter? One might assume, you fled from the ghosts in terror and left the charm there. ...", "You will have to work twice as hard on your next missions to restore the trust you have lost.", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 39) - player:setStorageValue(Storage.InServiceofYalahar.Mission06, 5) -- StorageValue for Questlog "Mission 06: Frightening Fuel" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 39) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission06, 5) -- StorageValue for Questlog "Mission 06: Frightening Fuel" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 37 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 37 then if player:removeItem(8827, 1) then npcHandler:say({ "Ah, what an unexpected sight. I can almost feel the energy of the charm. It will help to recover some of the past wealth. ...", "You did quite an impressive job. I'm considering to introduce you to my ma.. to my direct superior one day. But there are still other missions to fulfil.", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 39) - player:setStorageValue(Storage.InServiceofYalahar.Mission06, 5) -- StorageValue for Questlog "Mission 06: Frightening Fuel" - player:setStorageValue(Storage.InServiceofYalahar.QuaraState, 2) - player:setStorageValue(Storage.InServiceofYalahar.BadSide, player:getStorageValue(Storage.InServiceofYalahar.BadSide) >= 0 and player:getStorageValue(Storage.InServiceofYalahar.BadSide) + 1 or 0) -- Side Storage + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 39) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission06, 5) -- StorageValue for Questlog "Mission 06: Frightening Fuel" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.QuaraState, 2) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.BadSide, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.BadSide) >= 0 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.BadSide) + 1 or 0) -- Side Storage npcHandler:setTopic(playerId, 0) end - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 39 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 39 then npcHandler:say({ "Recently, our fishermen have been attacked by a maritime race called the quara. They live in the sunken quarter and are a significant threat to our people. I ask you to enter the sunken quarter and slay all their leaders. ...", "We believe that there are three leaders in this area. Your task is simple enough, so you better don't fail! ...", "I will inform the guards that you are allowed to pass the centre gate to the sunken quarter now. Just use the gate mechanism to pass.", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 40) - player:setStorageValue(Storage.InServiceofYalahar.Mission07, 1) -- StorageValue for Questlog "Mission 07: A Fishy Mission" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 40) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission07, 1) -- StorageValue for Questlog "Mission 07: A Fishy Mission" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 41 and player:getStorageValue(Storage.InServiceofYalahar.QuaraInky) == 1 and player:getStorageValue(Storage.InServiceofYalahar.QuaraSharptooth) == 1 and player:getStorageValue(Storage.InServiceofYalahar.QuaraSplasher) == 1 and player:getStorageValue(Storage.InServiceofYalahar.QuaraState) == 2 then + elseif + player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 41 + and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.QuaraInky) == 1 + and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.QuaraSharptooth) == 1 + and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.QuaraSplasher) == 1 + and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.QuaraState) == 2 + then npcHandler:say("This will teach these fishmen who is the ruler of that area. You have earned yourself a special privilege. But we will talk about that when we speak about your next mission. ", npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 43) - player:setStorageValue(Storage.InServiceofYalahar.Mission07, 5) -- StorageValue for Questlog "Mission 07: A Fishy Mission" - player:setStorageValue(Storage.InServiceofYalahar.BadSide, player:getStorageValue(Storage.InServiceofYalahar.BadSide) >= 0 and player:getStorageValue(Storage.InServiceofYalahar.BadSide) + 1 or 0) -- Side Storage + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 43) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission07, 5) -- StorageValue for Questlog "Mission 07: A Fishy Mission" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.BadSide, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.BadSide) >= 0 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.BadSide) + 1 or 0) -- Side Storage npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 43 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 43 then npcHandler:say({ "In the past, we had many magical factories providing the citizens with everything they needed. Now that most of these factories are shut down, we have trouble getting enough supplies. ...", "We need you to enter one of the lesser damaged factories. Go to the factory district and look for a pattern crystal used for weapon production. Use it on the factory controller. ...", "It will ensure that the factory will provide us with a suitable amount of weapons which we dearly need to reclaim and secure the most dangerous parts of the city. ...", "I will inform the guards that you are allowed to pass the centre gate to the factory quarter now. Just use the gate mechanism to pass.", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 44) - player:setStorageValue(Storage.InServiceofYalahar.Mission08, 1) -- StorageValue for Questlog "Mission 08: Dangerous Machinations" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 44) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission08, 1) -- StorageValue for Questlog "Mission 08: Dangerous Machinations" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 46 then - if player:getStorageValue(Storage.InServiceofYalahar.MatrixState) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 46 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.MatrixState) == 1 then npcHandler:say("Your failure is an outrage! I think we have to talk about the missions you have accomplished so far. ", npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.GoodSide, player:getStorageValue(Storage.InServiceofYalahar.GoodSide) >= 0 and player:getStorageValue(Storage.InServiceofYalahar.GoodSide) + 1 or 0) -- Side Storage - elseif player:getStorageValue(Storage.InServiceofYalahar.MatrixState) == 2 then + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.GoodSide, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.GoodSide) >= 0 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.GoodSide) + 1 or 0) -- Side Storage + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.MatrixState) == 2 then npcHandler:say("Now we will have power we truly deserve!...", npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.BadSide, player:getStorageValue(Storage.InServiceofYalahar.BadSide) >= 0 and player:getStorageValue(Storage.InServiceofYalahar.BadSide) + 1 or 0) -- Side Storage + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.BadSide, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.BadSide) >= 0 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.BadSide) + 1 or 0) -- Side Storage end - player:setStorageValue(Storage.InServiceofYalahar.Questline, 47) - player:setStorageValue(Storage.InServiceofYalahar.Mission08, 4) -- StorageValue for Questlog "Mission 08: Dangerous Machinations" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 47) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission08, 4) -- StorageValue for Questlog "Mission 08: Dangerous Machinations" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 47 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 47 then npcHandler:say({ "I'm impressed by your support for our cause. Still, I'm aware that this scheming Palimuth tried to influence you. Think about who are your real friends and who can assist you in your career. ...", "Come back if you have decided to which side you want to belong.", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 48) - player:setStorageValue(Storage.InServiceofYalahar.Mission09, 1) -- StorageValue for Questlog "Mission 09: Decision" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 48) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission09, 1) -- StorageValue for Questlog "Mission 09: Decision" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 49 or player:getStorageValue(Storage.InServiceofYalahar.Questline) == 48 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 49 or player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 48 then npcHandler:say("So do you want to side with me |PLAYERNAME|? ", npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 50 and player:getStorageValue(Storage.InServiceofYalahar.SideDecision) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 50 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SideDecision) == 2 then npcHandler:say({ "For your noble deeds, we would like to invite you to a special celebration ceremony. ...", "Only the most prominent Yalahari are allowed to join the festivities. I assume you can imagine what honour it is that you'vebeen invited to join us. Meet us in the inner city's centre. ...", "As our most trusted ally, you may pass all doors to reach the festivity hall. There you will receive your reward for the achievements you have gained so far. ...", "I'm convinced your reward will be beyond your wildest dreams. And that is just the beginning!", }, npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 51) - player:setStorageValue(Storage.InServiceofYalahar.DoorToLastFight, 1) - player:setStorageValue(Storage.InServiceofYalahar.Mission10, 2) -- StorageValue for Questlog "Mission 10: The Final Battle" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 51) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.DoorToLastFight, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission10, 2) -- StorageValue for Questlog "Mission 10: The Final Battle" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.InServiceofYalahar.Questline) == 52 and player:getStorageValue(Storage.InServiceofYalahar.SideDecision) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 52 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SideDecision) == 2 then npcHandler:say("Great work, take this outfit and you are able to open the door to the reward room.", npc, creature) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 53) - player:setStorageValue(Storage.InServiceofYalahar.DoorToReward, 1) - player:setStorageValue(Storage.InServiceofYalahar.Mission10, 4) -- StorageValue for Questlog "Mission 10: The Final Battle" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 53) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.DoorToReward, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission10, 4) -- StorageValue for Questlog "Mission 10: The Final Battle" player:addOutfit(324, 0) player:addOutfit(325, 0) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) @@ -250,24 +256,24 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then if player:removeItem(8818, 1) then - player:setStorageValue(Storage.InServiceofYalahar.BadSide, 1) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 22) - player:setStorageValue(Storage.InServiceofYalahar.Mission03, 6) -- StorageValue for Questlog "Mission 03: Death to the Deathbringer" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.BadSide, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 22) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission03, 6) -- StorageValue for Questlog "Mission 03: Death to the Deathbringer" npcHandler:say("Impressive indeed! Someone with your skills will quickly raise in our ranks of helpers. You have great potential, and if you are upfor further missions, just ask for them. ", npc, creature) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 2 then - player:setStorageValue(Storage.InServiceofYalahar.Questline, 50) - player:setStorageValue(Storage.InServiceofYalahar.SideDecision, 2) - player:setStorageValue(Storage.InServiceofYalahar.Mission09, 2) -- StorageValue for Questlog "Mission 09: Decision" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 50) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SideDecision, 2) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission09, 2) -- StorageValue for Questlog "Mission 09: Decision" npcHandler:say("I knew that you were smart enough to make the right decision! Your next mission will be a special one! ", npc, creature) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "no") then - if npcHandler:getTopic(playerId) == 1 and player:getStorageValue(Storage.InServiceofYalahar.GoodSide) == 0 then - player:setStorageValue(Storage.InServiceofYalahar.GoodSide, 1) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 22) - player:setStorageValue(Storage.InServiceofYalahar.Mission03, 6) -- StorageValue for Questlog "Mission 03: Death to the Deathbringer" + if npcHandler:getTopic(playerId) == 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.GoodSide) == 0 then + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.GoodSide, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 22) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission03, 6) -- StorageValue for Questlog "Mission 03: Death to the Deathbringer" npcHandler:say({ "Hm, no sign of any notes you say? That's odd - odd and a bit suspicious. I doubt you have tried hard enough. ...", "There are only a few chances to impress us. For those who please us great rewards are in store. If you fail though, you might lose more than you can imagine.", diff --git a/data-otservbr-global/npc/yaman.lua b/data-otservbr-global/npc/yaman.lua index cb86fd7346f..85620c0d79e 100644 --- a/data-otservbr-global/npc/yaman.lua +++ b/data-otservbr-global/npc/yaman.lua @@ -100,7 +100,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("I trade Enchanted Chicken Wing for Boots of Haste, Warrior Sweat for 4 Warrior Helmets, Fighting Spirit for 2 Royal Helmet Magic Sulphur for 3 Fire Swords", npc, creature) npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "cookie") then - if player:getStorageValue(Storage.WhatAFoolish.Questline) == 31 and player:getStorageValue(Storage.WhatAFoolish.CookieDelivery.Djinn) ~= 1 then + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline) == 31 and player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.Djinn) ~= 1 then npcHandler:say("You brought cookies! How nice of you! Can I have one?", npc, creature) npcHandler:setTopic(playerId, 5) end @@ -126,7 +126,7 @@ local function creatureSayCallback(npc, creature, type, message) return true end - player:setStorageValue(Storage.WhatAFoolish.CookieDelivery.Djinn, 1) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.Djinn, 1) if player:getCookiesDelivered() == 10 then player:addAchievement("Allow Cookies?") end diff --git a/data-otservbr-global/npc/zalamon.lua b/data-otservbr-global/npc/zalamon.lua index ea643f2ff69..555f1349471 100644 --- a/data-otservbr-global/npc/zalamon.lua +++ b/data-otservbr-global/npc/zalamon.lua @@ -68,16 +68,16 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "mission") then -- CHILDREN OF REVOLUTION QUEST - if player:getStorageValue(Storage.ChildrenoftheRevolution.Questline) < 1 then + if player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline) < 1 then npcHandler:say({ "Zzo you are offering your help to a lizzard? Hmm, unuzzual. I don't know if I can fully truzzt you yet. ...", "You'll have to work to earn my truzzt. Are you zzure you want to offer me your help?", }, npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.ChildrenoftheRevolution.Questline) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline) == 2 then npcHandler:say("What newzz do you bring? Did you find any cluezz about zzeir whereaboutzz? ", npc, creature) npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.ChildrenoftheRevolution.Questline) == 3 then + elseif player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline) == 3 then npcHandler:say({ "Zzurely you have zzeen zze black pondzz and puddlezz all over zze mountain pazz, palezzkin. It izz zze corruption zzat pervadezz zze landzz. It would be wizze not to drink or tazzte from zzem. ... ", "It zzoakzz zze land, itzz people and even zze air itzzelf. But zzere are zztill zzpotzz not tainted by zze darknezz. ... ", @@ -85,16 +85,16 @@ local function creatureSayCallback(npc, creature, type, message) "No one made it zzrough zze mountainzz for quite zzome time now - exzzept you. Maybe you can find out what happened zzere? ", }, npc, creature) npcHandler:setTopic(playerId, 5) - elseif player:getStorageValue(Storage.ChildrenoftheRevolution.Questline) == 5 then + elseif player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline) == 5 then npcHandler:say({ "Zzo you found zze temple... lozzt you zzay. It wazz our lazzt remaining bazztion of hope for help from wizzin zze plainzz. ... ", "Zzat meanzz zze plainzz are now in zze handzz of zze emperor and hizz army. I'm afraid zzat even zze great gate izz zzealed and zze landzz beyond it tainted azz well. ... ", "Dark timezz, and I fear we know nozzing about our enemy yet. ", }, npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.ChildrenoftheRevolution.Questline, 6) - player:setStorageValue(Storage.ChildrenoftheRevolution.Mission01, 3) --Questlog, Children of the Revolution "Mission 1: Corruption" - elseif player:getStorageValue(Storage.ChildrenoftheRevolution.Questline) == 6 then + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline, 6) + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission01, 3) --Questlog, Children of the Revolution "Mission 1: Corruption" + elseif player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline) == 6 then npcHandler:say({ "Large partzz of zze empire are tainted. I zzee now zzat zzere izz almozzt nozzing left of our onzze zzo zztrong zzivilizzation. But I zztill don't know which danger our enemy really pozzezz. ... ", "Zzere uzzed to be a remote and quiet zzettlement in zze middle of zze valley. If it hazz not been dezztroyed by zze corruption, I'm zzure zze army of zze emperor will have confizzcated it to gazzer rezzourzzezz. ... ", @@ -103,51 +103,51 @@ local function creatureSayCallback(npc, creature, type, message) "Are you prepared for zzizz mizzion? ", }, npc, creature) npcHandler:setTopic(playerId, 6) - elseif player:getStorageValue(Storage.ChildrenoftheRevolution.Questline) == 7 then - if player:getStorageValue(Storage.ChildrenoftheRevolution.SpyBuilding01) == 1 and player:getStorageValue(Storage.ChildrenoftheRevolution.SpyBuilding02) == 1 and player:getStorageValue(Storage.ChildrenoftheRevolution.SpyBuilding03) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline) == 7 then + if player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.SpyBuilding01) == 1 and player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.SpyBuilding02) == 1 and player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.SpyBuilding03) == 1 then npcHandler:say({ "Zzizz izz mozzt unfortunate. Zzo many warriorzz? Large amountzz of food? And how many weaponzz did you zzay? I zzee, hmm. ... ", "Direct confrontation izz futile. We'll have to find ozzer wayzz to approach zze emperor and hizz army. ", }, npc, creature) - player:setStorageValue(Storage.ChildrenoftheRevolution.Questline, 8) - player:setStorageValue(Storage.ChildrenoftheRevolution.Mission02, 5) --Questlog, Children of the Revolution "Mission 2: Imperial Zzecret Weaponzz" + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline, 8) + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission02, 5) --Questlog, Children of the Revolution "Mission 2: Imperial Zzecret Weaponzz" npcHandler:setTopic(playerId, 0) end - elseif player:getStorageValue(Storage.ChildrenoftheRevolution.Questline) == 8 then + elseif player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline) == 8 then npcHandler:say({ "Your lazzt excurzzion revealed a terrifying truzz. Zze enemy'zz forzzezz are overwhelming, zzeir zztrengzz probably unrivaled. We cannot attack an army of zzizz zzize unlezz - unlezz we zzin out zzeir rankzz a little. ... ", "A zzingle individual can be azz zztrong azz an army if he zztrikezz zze army azz a whole. ... ", "Are you ready for your nexzzt tazzk? ", }, npc, creature) npcHandler:setTopic(playerId, 7) - elseif player:getStorageValue(Storage.ChildrenoftheRevolution.Questline) == 11 then + elseif player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline) == 11 then npcHandler:say({ "You accomplished an important tazzk in breaking zze defenzze of zze emperor. Not everyzzing might be lozzt yet. ... ", "I've got anozzer mizzion for you which will be even more dangerouzz zzan zze lazzt one. Return to me when you're ready. ", }, npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.ChildrenoftheRevolution.Questline, 12) - player:setStorageValue(Storage.ChildrenoftheRevolution.Mission03, 3) --Questlog, Children of the Revolution "Mission 3: Zee Killing Fieldzz" - elseif player:getStorageValue(Storage.ChildrenoftheRevolution.Questline) == 12 then + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline, 12) + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission03, 3) --Questlog, Children of the Revolution "Mission 3: Zee Killing Fieldzz" + elseif player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline) == 12 then npcHandler:say({ "Wizz zze enemy'zz forzzezz weakened like zzizz, we will be able to zzneak pazzt zze defenzze and furzzer inzzpect zze norzz. You should travel to zze mountain range furzzer eazzt of zze village. ... ", "Zze old route to zze gate hazz been taken by darknezz. You'll have to find ozzer wayzz. Are you up to zzizz, palezzkin? ", }, npc, creature) npcHandler:setTopic(playerId, 10) - elseif player:getStorageValue(Storage.ChildrenoftheRevolution.Questline) == 17 then + elseif player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline) == 17 then npcHandler:say({ "You have zzolved zze riddle? Imprezzive, palezzkin. Zze humming you hear in zze chamber mozzt zzertainly comezz from a magic portal zzomewhere in zze temple. ...", "Have you zzearched zze ozzer chamberzz for any magical devizzezz or portalzz?", }, npc, creature) npcHandler:setTopic(playerId, 12) - elseif player:getStorageValue(Storage.ChildrenoftheRevolution.Questline) == 18 then + elseif player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline) == 18 then npcHandler:say({ "If I'm correct, zze portal in zze chamber beyond zze mechanizzm will lead you to zze great gate. It izz perfectly pozzible, however, zzat you will not be tranzzported directly into zze area. ...", "You will razzer be brought to a plazze clozze by your goal. Where exzzactly, I cannot zzay. ...", "Take all your courage and walk zze pazz zzrough zze portal. At leazzt TRY it - after all, I didn't make you my pupil for nozzing, Kohei. Are you prepared?", }, npc, creature) npcHandler:setTopic(playerId, 13) - elseif player:getStorageValue(Storage.ChildrenoftheRevolution.Questline) == 20 then + elseif player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline) == 20 then npcHandler:say({ "Too clozze, far too clozze. I felt a huge impact not long after you left. Zze war machinery of zze emperor muzzt finally have been zztarted. ...", "I focuzzed and could only hope zzat I would reach you before everyzzing wazz too late. If I hadn't been able to tranzzport you here, our cauzze would have been lozzt. ...", @@ -155,24 +155,24 @@ local function creatureSayCallback(npc, creature, type, message) "You've helped uzz a great deal during zzezze dark hourzz, I've got zzomezzing for you my friend. Pleazze, take zzizz zzerpent crezzt azz a zzign of my deep rezzpect. ...", "Rezzt for now, you will need it - you have earned it.", }, npc, creature) - player:setStorageValue(Storage.ChildrenoftheRevolution.Questline, 21) - player:setStorageValue(Storage.ChildrenoftheRevolution.Mission05, 3) --Questlog, Children of the Revolution "Mission 5: Phantom Army" + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline, 21) + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission05, 3) --Questlog, Children of the Revolution "Mission 5: Phantom Army" player:addItem(10199, 1) player:addExperience(10000, true) npcHandler:setTopic(playerId, 0) -- CHILDREN OF REVOLUTION QUEST -- WRATH OF THE EMPEROR QUEST - elseif player:getStorageValue(Storage.ChildrenoftheRevolution.Questline) == 21 and player:getStorageValue(Storage.WrathoftheEmperor.Questline) < 1 then + elseif player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline) == 21 and player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) < 1 then npcHandler:say({ "Zze attackzz have weakened our enemy zzignificantly. Yet, your quezzt continuezz. Bezzidezz zzome tazzkzz you could take, zze zzreat of zze emperor izz zztill hanging over our headzz like a rain cloud. ... ", "Zzo, are you indeed willing to continue zze fight for our cauzze? ", }, npc, creature) npcHandler:setTopic(playerId, 14) - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 1 then npcHandler:say("Ah you have returned. I azzume you already found zzome itemzz to build a proper dizzguizze? ", npc, creature) npcHandler:setTopic(playerId, 16) - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 6 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 6 then npcHandler:say({ "You ezztablished zze connection to zze hideout, good. But zzizz izz no time to rezzt. Your new tazzk will be quite different. ... ", "Zze gardenzz are plagued by a creature. Zze former keeper of zzizz garden became an abomination of madnezz zzat needzz to be zztopped. ... ", @@ -181,10 +181,10 @@ local function creatureSayCallback(npc, creature, type, message) "Now go - what are you waiting for, zzoftzzkin? Ready to finish what needzz to be finished? ", }, npc, creature) npcHandler:setTopic(playerId, 19) - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 8 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 8 then npcHandler:say("Zzo... you finished him. Show me hizz head, will you? ", npc, creature) npcHandler:setTopic(playerId, 20) - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 9 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 9 then npcHandler:say({ "At zze dawn of time, zze children of zze Great Zznake were numerouzz. Zzey daringly colonizzed many partzz of zze world. But all bravery did not help againzzt zze sheer number of enemiezz zzey encountered. ... ", "And while zze entitiezz zze unbelieverzz call godzz battled for power out of vanity, zze fazze of zze world changed violently. ... ", @@ -197,13 +197,13 @@ local function creatureSayCallback(npc, creature, type, message) "A shaft, a cuzzp, and an emerald form a zzeptre of zzuch power zzat zze partzz were hidden and are now guarded by vile creaturezz. ... ", "Find it. Retrieve it. And bring it back to me. ", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 10) - player:setStorageValue(Storage.WrathoftheEmperor.Mission04, 1) --Questlog, Wrath of the Emperor "Mission 04: Sacrament of the Snake" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 10) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission04, 1) --Questlog, Wrath of the Emperor "Mission 04: Sacrament of the Snake" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 11 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 11 then npcHandler:say("You - azzembled zze zzeptre? Hand it out, give it to me, will you? ", npc, creature) npcHandler:setTopic(playerId, 21) - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 12 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 12 then npcHandler:say({ "Now we need to get clozzer to zze emperor himzzelf. A hive of beezz would defend zzeir queen wizz zzeir lives in cazze an enemy gained entranzze. Zzizz makezz a formidable defenzze line, nearly inviolable. ... ", "But a zztranger directly in zze midzzt of zze hive will be acczzepted - after all it izz not pozzible to overcome zzuch a formidable defenzze which izz nearly inviolable, or izz it? Ha. ... ", @@ -212,8 +212,8 @@ local function creatureSayCallback(npc, creature, type, message) "We have alzzo forged zome paperzz for you and zzent zzem to zze zzity. Your victory in zze arena iz well known in our land. Wizz zze help of zzezze paperzz you will pretend zzat zzome of zze higher officialzz want to talk to you about your battle. ... ", "Zzizz way you will be able to enter zze zzity of zze dragon emperor and meet our contact zzere in zze imperial offizze. He will give you zze next inzztructionzz. ", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 13) - player:setStorageValue(Storage.WrathoftheEmperor.Mission05, 1) --Questlog, Wrath of the Emperor "Mission 05: New in Town" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 13) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission05, 1) --Questlog, Wrath of the Emperor "Mission 05: New in Town" npcHandler:setTopic(playerId, 0) -- WRATH OF THE EMPEROR QUEST end @@ -228,7 +228,7 @@ local function creatureSayCallback(npc, creature, type, message) -- CHILDREN OF REVOLUTION QUEST elseif MsgContains(message, "symbols") then - if player:getStorageValue(Storage.ChildrenoftheRevolution.StrangeSymbols) == 1 then + if player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.StrangeSymbols) == 1 then npcHandler:say({ "Mh, zze zzymbolzz of zze chamber you dezzcribe are very common in our culture, palezzkin. You should have come accrozz zzem in many a plazze already. ...", "Zze zzymbolzz zzeem to be arranged in zzome way you zzay? Were zzere any notizzeable devizzezz? Zzwitchezz or leverzz? ", @@ -237,7 +237,7 @@ local function creatureSayCallback(npc, creature, type, message) end -- CHILDREN OF REVOLUTION QUEST elseif MsgContains(message, "poison") or MsgContains(message, "poizzon") then - if player:getStorageValue(Storage.ChildrenoftheRevolution.Questline) == 9 then + if player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline) == 9 then npcHandler:say("Zze emperor of zze dragonzz hazz tranzzformed himzzelf into an undead creature to lazzt for all eternity, to cheat deazz. Hizz corruption flowzz to zzozze he bound, and from zzem to zzozze zzey bound, and from zzem into zze land.", npc, creature) npcHandler:setTopic(playerId, 0) end @@ -256,8 +256,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 2) elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say("Be warned. Zze mountain pazzezz have been dezzerted for zzeveral weekzz now. No one made it acrozz and I fear you won't meet a zzingle friendly zzoul up zzere.", npc, creature) - player:setStorageValue(Storage.ChildrenoftheRevolution.Questline, 1) - player:setStorageValue(Storage.ChildrenoftheRevolution.Mission00, 1) --Questlog, Children of the Revolution "Prove Your Worzz!" + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline, 1) + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission00, 1) --Questlog, Children of the Revolution "Prove Your Worzz!" npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then npcHandler:say("Exzztraordinary. We are mozzt fortunate to have zzezze documentzz in our handzz now. Zzizz would zzertainly help me to build an effective rezzizztanzze. Will you give zzem to me? ", npc, creature) @@ -268,14 +268,14 @@ local function creatureSayCallback(npc, creature, type, message) "Aaah, zzezze look zzertainly interezzting. Zzezze manuzzcriptzz show uzz zzeveral locationzz of zze enemy troopzz. ... ", "I'm imprezzed, zzoftzzkin. Maybe you can be of zzome more help. ", }, npc, creature) - player:setStorageValue(Storage.ChildrenoftheRevolution.Questline, 3) - player:setStorageValue(Storage.ChildrenoftheRevolution.Mission00, 2) --Questlog, Children of the Revolution "Prove Your Worzz!" + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline, 3) + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission00, 2) --Questlog, Children of the Revolution "Prove Your Worzz!" npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 5 then npcHandler:say("I've marked itzz location on your map. Go and find out what happened zzere. In zze pazzt it wazz known azz zze Temple of Equilibrium. ", npc, creature) - player:setStorageValue(Storage.ChildrenoftheRevolution.Questline, 4) - player:setStorageValue(Storage.ChildrenoftheRevolution.Mission01, 1) --Questlog, Children of the Revolution "Mission 1: Corruption" + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline, 4) + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission01, 1) --Questlog, Children of the Revolution "Mission 1: Corruption" player:addMapMark(Position(33177, 31193, 7), 5, "Temple of Equilibrium") npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 6 then @@ -283,8 +283,8 @@ local function creatureSayCallback(npc, creature, type, message) "I'll mark zze entranzze to Chaochai on your map. ... ", "Conzzentrate on one location at a time. Zze one who chazzezz after two harezz, won't catch even one. ", }, npc, creature) - player:setStorageValue(Storage.ChildrenoftheRevolution.Questline, 7) - player:setStorageValue(Storage.ChildrenoftheRevolution.Mission02, 1) --Questlog, Children of the Revolution "Mission 2: Imperial Zzecret Weaponzz" + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline, 7) + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission02, 1) --Questlog, Children of the Revolution "Mission 2: Imperial Zzecret Weaponzz" for i = 1, #marks.ChildrenOfTheRevolution do local mark = marks.ChildrenOfTheRevolution[i] player:addMapMark(mark.position, mark.type, mark.description) @@ -302,17 +302,17 @@ local function creatureSayCallback(npc, creature, type, message) "Good. Zze fieldzz should be not far from Xiachai in zze eazzt. Go to zze top terrazze and mix zze poizzon wizz zze water. ... ", "{Poizzon} izz often uzzed by cowardzz, yet it grantzz great power to zze opprezzed. ", }, npc, creature) - player:setStorageValue(Storage.ChildrenoftheRevolution.Questline, 9) - player:setStorageValue(Storage.ChildrenoftheRevolution.Mission03, 1) --Questlog, Children of the Revolution "Mission 3: Zee Killing Fieldzz" + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline, 9) + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission03, 1) --Questlog, Children of the Revolution "Mission 3: Zee Killing Fieldzz" npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 10 then npcHandler:say({ "Perhapzz you can find a way to enter zze norzz of zze valley and find a pazzage to zze great gate itzzelf. Zzearch any templezz or zzettlementzz you come accrozz for hidden pazzagezz. ... ", "I wish for a zzafe return wizz good newzz. ", }, npc, creature) - player:setStorageValue(Storage.ChildrenoftheRevolution.Questline, 13) - if player:getStorageValue(Storage.ChildrenoftheRevolution.Mission04) <= 1 then - player:setStorageValue(Storage.ChildrenoftheRevolution.Mission04, 1) --Questlog, Children of the Revolution "Mission 4: Zze Way of Zztonezz" + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline, 13) + if player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission04) <= 1 then + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission04, 1) --Questlog, Children of the Revolution "Mission 4: Zze Way of Zztonezz" end npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 11 then @@ -321,8 +321,8 @@ local function creatureSayCallback(npc, creature, type, message) "Not too far from zze lever, zzere muzzt be a hint of zzome zzort. An image of how zze zzymbolzz muzzt be arranged. Zzurely zze mechanizzm will trigger a zzecret pazzage, maybe a moving wall or a portal. ... ", "Zzizz should be our pazz to zze great gate. Head to zze zztorage onzze again. Zzere should be zzome extra greazzy oil which should work wizz zzuch a large mechanizzm. Zze leverzz should zzen be movable again. ", }, npc, creature) - player:setStorageValue(Storage.ChildrenoftheRevolution.StrangeSymbols, 2) - player:setStorageValue(Storage.ChildrenoftheRevolution.Mission04, 3) --Questlog, Children of the Revolution "Mission 4: Zze Way of Zztonezz" + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.StrangeSymbols, 2) + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission04, 3) --Questlog, Children of the Revolution "Mission 4: Zze Way of Zztonezz" npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 12 then npcHandler:say({ @@ -331,17 +331,17 @@ local function creatureSayCallback(npc, creature, type, message) "I may alzzo have anozzer mizzion for you if you are interezzted.", }, npc, creature) player:addItem(10217, 1) - player:setStorageValue(Storage.ChildrenoftheRevolution.Questline, 18) - player:setStorageValue(Storage.ChildrenoftheRevolution.Mission04, 6) --Questlog, Children of the Revolution "Mission 4: Zze Way of Zztonezz" + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline, 18) + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission04, 6) --Questlog, Children of the Revolution "Mission 4: Zze Way of Zztonezz" npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 13 then npcHandler:say({ "You did well on your quezzt zzo far. I hope you will reach zze great gate in time. If we are lucky, it will zztill be open. ...", "If not, it will already be overrun by enemy zzoldierzz. Direct confrontation will be inevitable in zzat cazze, palezzkin. Now clear your mind and approach zze portal.", }, npc, creature) - player:setStorageValue(Storage.ChildrenoftheRevolution.teleportAccess, 1) - player:setStorageValue(Storage.ChildrenoftheRevolution.Questline, 19) - player:setStorageValue(Storage.ChildrenoftheRevolution.Mission05, 1) --Questlog, Children of the Revolution "Mission 5: Phantom Army" + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.teleportAccess, 1) + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline, 19) + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission05, 1) --Questlog, Children of the Revolution "Mission 5: Phantom Army" npcHandler:setTopic(playerId, 0) -- CHILDREN OF REVOLUTION QUEST @@ -360,8 +360,8 @@ local function creatureSayCallback(npc, creature, type, message) "One of zzem izz uzzed azz a maintenanzze connection by enemy lizardzz. To enter it, you will have to uzze a dizzguizze. Zzomezzing like a crate perhapzz. ... ", "Mh, if you can find zzome nailzz - 3 should be enough - and 1 piezze of wood, I should be able to create an appropriate cazzing. Return to me if you found zze itemzz and we will talk about zze next zztep. ", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 1) - player:setStorageValue(Storage.WrathoftheEmperor.Mission01, 1) --Questlog, Wrath of the Emperor "Mission 01: Catering the Lions Den" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission01, 1) --Questlog, Wrath of the Emperor "Mission 01: Catering the Lions Den" npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 16 then npcHandler:say({ @@ -373,8 +373,8 @@ local function creatureSayCallback(npc, creature, type, message) if player:getItemCount(953) >= 3 and player:getItemCount(5901) >= 1 then player:removeItem(5901, 1) player:removeItem(953, 3) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 2) - player:setStorageValue(Storage.WrathoftheEmperor.Mission01, 2) --Questlog, Wrath of the Emperor "Mission 01: Catering the Lions Den" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 2) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission01, 2) --Questlog, Wrath of the Emperor "Mission 01: Catering the Lions Den" player:addItem(11328, 1) npcHandler:say({ "Alright. Let uzz create a crate. Hm. Let me zzee. ... ", @@ -394,21 +394,21 @@ local function creatureSayCallback(npc, creature, type, message) "Fine. I guezz poizzoning zzome of hizz plantzz will be enough to lure him out of hizz conzzealment. Zzizz plant poizzon here should allow you to do zzome zzignificant damage, take it. ... ", "You can find him eazzt of zze corrupted gardenzz. Zzere uzzed to be a zzmall domizzile zzere but it hazz probably been conzzumed by zze corruption zzo beware. And now - go. ", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 7) - player:setStorageValue(Storage.WrathoftheEmperor.Mission03, 1) --Questlog, Wrath of the Emperor "Mission 03: The Keeper" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 7) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission03, 1) --Questlog, Wrath of the Emperor "Mission 03: The Keeper" player:addItem(11364, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 20 then if player:removeItem(11367, 1) then npcHandler:say("Zzizz izz not hizz head but clearly belonged to zze keeper. I - I am imprezzed. You can go now. Leave me alone for a zzecond. ", npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 9) - player:setStorageValue(Storage.WrathoftheEmperor.Mission03, 3) --Questlog, Wrath of the Emperor "Mission 03: The Keeper" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 9) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission03, 3) --Questlog, Wrath of the Emperor "Mission 03: The Keeper" npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 21 then if player:removeItem(11371, 1) then - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 12) - player:setStorageValue(Storage.WrathoftheEmperor.Mission04, 3) --Questlog, Wrath of the Emperor "Mission 04: Sacrament of the Snake" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 12) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission04, 3) --Questlog, Wrath of the Emperor "Mission 04: Sacrament of the Snake" npcHandler:say("Finally. At lazzt. Zze zzeptre izz - ourzz. Ourzz of courzze. A weapon we should uzze wizzely for our cauzze. I need a zzecond or two. Do you leave me already? ", npc, creature) npcHandler:setTopic(playerId, 0) end @@ -418,6 +418,8 @@ local function creatureSayCallback(npc, creature, type, message) return true end +npcHandler:setMessage(MESSAGE_GREET, "Not many travellerzz zzezze dayzz. I hope you bring good newzz.") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/zirella.lua b/data-otservbr-global/npc/zirella.lua index 335d0384969..1b9058cff0c 100644 --- a/data-otservbr-global/npc/zirella.lua +++ b/data-otservbr-global/npc/zirella.lua @@ -63,31 +63,31 @@ local function greetCallback(npc, creature) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.RookgaardTutorialIsland.ZirellaNpcGreetStorage) < 1 then + if player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.ZirellaNpcGreetStorage) < 1 then npcHandler:setMessage(MESSAGE_GREET, "Oh, heaven must have sent you! Could you please help me with a {quest}?") storeTalkCid[playerId] = 0 - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.ZirellaNpcGreetStorage) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.ZirellaNpcGreetStorage) == 1 then npcHandler:setMessage(MESSAGE_GREET, "Welcome back, darling... so about that firewood, could you please {help} me?") storeTalkCid[playerId] = 2 - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.ZirellaNpcGreetStorage) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.ZirellaNpcGreetStorage) == 2 then npcHandler:setMessage(MESSAGE_GREET, "Welcome back, darling... so about the {dead trees}, let me explain that a little more, {yes}?") storeTalkCid[playerId] = 3 - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.ZirellaNpcGreetStorage) == 3 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.ZirellaNpcGreetStorage) == 3 then npcHandler:setMessage(MESSAGE_GREET, "Welcome back, darling... so about the {branches}, let me explain that a little more, {yes}?") storeTalkCid[playerId] = 4 - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.ZirellaNpcGreetStorage) == 4 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.ZirellaNpcGreetStorage) == 4 then npcHandler:setMessage(MESSAGE_GREET, "Welcome back, darling... so about the {pushing}, let me explain that a little more, {yes}?") storeTalkCid[playerId] = 5 - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.ZirellaNpcGreetStorage) == 5 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.ZirellaNpcGreetStorage) == 5 then npcHandler:setMessage(MESSAGE_GREET, "Welcome back, darling... so about the {cart}, let me explain that a little more, {yes}?") storeTalkCid[playerId] = 6 - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.ZirellaNpcGreetStorage) == 6 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.ZirellaNpcGreetStorage) == 6 then npcHandler:setMessage(MESSAGE_GREET, "Oh, sweetheart, is there a problem with the quest? Should I {explain} it again?") storeTalkCid[playerId] = 7 - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.ZirellaNpcGreetStorage) == 7 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.ZirellaNpcGreetStorage) == 7 then npcHandler:setMessage(MESSAGE_GREET, "Right, thank you sweetheart! This will be enough to heat my oven. Oh, and you are probably waiting for your reward, {yes}?") storeTalkCid[playerId] = 8 - elseif player:getStorageValue(Storage.RookgaardTutorialIsland.ZirellaNpcGreetStorage) == 8 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.ZirellaNpcGreetStorage) == 8 then npcHandler:setMessage(MESSAGE_GREET, "Oh, welcome back, dear Isleth Eagonst! Are you here for a little chat? Just use the highlighted {keywords} again to choose a {topic}.") end return true @@ -107,28 +107,28 @@ local function creatureSayCallback(npc, creature, type, message) storeTalkCid[playerId] = 1 elseif storeTalkCid[playerId] == 1 then npcHandler:say("Thank you so much for your kindness. I'm an old woman and I desperately need firewood for my oven. Could you please help me?", npc, creature) - player:setStorageValue(Storage.RookgaardTutorialIsland.ZirellaQuestLog, 1) - player:setStorageValue(Storage.RookgaardTutorialIsland.ZirellaNpcGreetStorage, 1) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.ZirellaQuestLog, 1) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.ZirellaNpcGreetStorage, 1) storeTalkCid[playerId] = 2 elseif storeTalkCid[playerId] == 2 then npcHandler:say("You're such a treasure. In the forest south of here, there are {dead trees} without any leaves. The first thing you have to do is search for one, {okay}?", npc, creature) - player:setStorageValue(Storage.RookgaardTutorialIsland.ZirellaQuestLog, 2) - player:setStorageValue(Storage.RookgaardTutorialIsland.ZirellaNpcGreetStorage, 2) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.ZirellaQuestLog, 2) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.ZirellaNpcGreetStorage, 2) storeTalkCid[playerId] = 3 elseif storeTalkCid[playerId] == 3 then npcHandler:say("Splendid, once you've found one, 'Use' it to break a branch from it. Did you understand that so far?", npc, creature) - player:setStorageValue(Storage.RookgaardTutorialIsland.ZirellaQuestLog, 3) - player:setStorageValue(Storage.RookgaardTutorialIsland.ZirellaNpcGreetStorage, 3) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.ZirellaQuestLog, 3) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.ZirellaNpcGreetStorage, 3) storeTalkCid[playerId] = 4 elseif storeTalkCid[playerId] == 4 then npcHandler:say("Good... so after you broke a branch, please push it here and select 'use with'. That will turn your mouse cursor into crosshairs. Then left-click on my cart. {Alright}?", npc, creature) - player:setStorageValue(Storage.RookgaardTutorialIsland.ZirellaQuestLog, 4) - player:setStorageValue(Storage.RookgaardTutorialIsland.ZirellaNpcGreetStorage, 4) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.ZirellaQuestLog, 4) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.ZirellaNpcGreetStorage, 4) storeTalkCid[playerId] = 5 elseif storeTalkCid[playerId] == 5 then npcHandler:say("To push the branch, drag and drop it on the grass by holding the left mousebutton and moving the cursor to where you want to throw the branch. Just push it near my cart before you 'Use' it, {alright}?", npc, creature) - player:setStorageValue(Storage.RookgaardTutorialIsland.ZirellaQuestLog, 5) - player:setStorageValue(Storage.RookgaardTutorialIsland.ZirellaNpcGreetStorage, 5) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.ZirellaQuestLog, 5) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.ZirellaNpcGreetStorage, 5) storeTalkCid[playerId] = 6 elseif storeTalkCid[playerId] == 6 then npcHandler:say({ @@ -137,8 +137,8 @@ local function creatureSayCallback(npc, creature, type, message) "Don't put it in your inventory like before, but instead DRAG it over the map by LEFT-CLICKING the loose branch, HOLDING the LEFT MOUSE BUTTON and moving it over the map. ...", "When you are close to my cart, USE the branch WITH the cart: RIGHT-CLICK the branch on the floor and select 'USE WITH', Then LEFT-CLICK on the cart. Don't worry, you will see what I mean on the way. Thanks and {bye} for now!", }, npc, creature) - player:setStorageValue(Storage.RookgaardTutorialIsland.ZirellaQuestLog, 6) - player:setStorageValue(Storage.RookgaardTutorialIsland.ZirellaNpcGreetStorage, 6) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.ZirellaQuestLog, 6) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.ZirellaNpcGreetStorage, 6) Position(32064, 32273, 7):sendMagicEffect(CONST_ME_TUTORIALARROW) npcHandler:removeInteraction(npc, creature) npcHandler:resetNpc(creature) @@ -154,8 +154,8 @@ local function creatureSayCallback(npc, creature, type, message) player:addExperience(50, true) Position(32058, 32266, 6):sendMagicEffect(CONST_ME_TUTORIALARROW) player:getPosition():sendMagicEffect(CONST_ME_GIFT_WRAPS) - player:setStorageValue(Storage.RookgaardTutorialIsland.ZirellaQuestLog, 8) - player:setStorageValue(Storage.RookgaardTutorialIsland.ZirellaNpcGreetStorage, 8) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.ZirellaQuestLog, 8) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.ZirellaNpcGreetStorage, 8) npcHandler:removeInteraction(npc, creature) npcHandler:resetNpc(creature) end diff --git a/data-otservbr-global/npc/zizzle.lua b/data-otservbr-global/npc/zizzle.lua index 4313f142a9b..e0f87074172 100644 --- a/data-otservbr-global/npc/zizzle.lua +++ b/data-otservbr-global/npc/zizzle.lua @@ -54,14 +54,14 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 25 then + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 25 then npcHandler:say("You made it! Az zoon az you are prepared, I will brief you for your nexzt mizzion. ", npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.Mission08, 2) --Questlog, Wrath of the Emperor "Mission 08: Uninvited Guests" - player:setStorageValue(Storage.WrathoftheEmperor.Mission09, 0) --door access - player:setStorageValue(Storage.WrathoftheEmperor.TeleportAccess.Zizzle, 3) --teleport access - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 26) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission08, 2) --Questlog, Wrath of the Emperor "Mission 08: Uninvited Guests" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission09, 0) --door access + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Zizzle, 3) --teleport access + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 26) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 26 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 26 then npcHandler:say({ "Ze dragon emperor controlz ze whole empire wiz hiz willpower. But even he iz not powerful enough to uze ziz control continuouzly wizout zome form of aid. ... ", "Wiz ze ancient zeptre zat you acquired for uz earlier, I can charge ozer zeptrez wiz azpectz of power of ze Great Znake. If you manage to touch one of ze tranzmitter cryztalz wiz ze zeptre, itz godly power will realign ze cryztal. ...", @@ -72,8 +72,8 @@ local function creatureSayCallback(npc, creature, type, message) "A zignificant part of ze emperor'z power iz uzed to reztrain ze dragon. Ze only way to free him will be to enter hiz dreamz. Are you prepared for ziz?", }, npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 29 then - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) < 30 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 29 then + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) < 30 then npcHandler:say({ "You freed ze dragon! And you pozzezz ze key to enter ze inner realmz of ze emperor, well done. ...", "Now you are ready to reach ze inner zanctum of ze emperor. Zalamon'z revelationz showed him zat zere are four cryztalz channelling ze will of ze emperor into ze land. ...", @@ -84,10 +84,10 @@ local function creatureSayCallback(npc, creature, type, message) "I recommend not to go alone becauze it will be very dangerouz - but ALL of you will have to uze zeir zeptre replicaz on ze emperor'z remainz to prozeed! ...", "You will need it. Now go to the north of Sleeping Dragon room, {dont need talk} with he! Good luck.", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.TeleportAccess.InnerSanctum, 1) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 30) - player:setStorageValue(Storage.WrathoftheEmperor.Mission10, 2) --Questlog, Wrath of the Emperor "Mission 10: A Message of Freedom" - player:setStorageValue(Storage.WrathoftheEmperor.BossStatus, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.InnerSanctum, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 30) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission10, 2) --Questlog, Wrath of the Emperor "Mission 10: A Message of Freedom" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.BossStatus, 1) player:addItem(11362, 1) npcHandler:setTopic(playerId, 0) else @@ -101,9 +101,9 @@ local function creatureSayCallback(npc, creature, type, message) "Drink it and when you are cloze to ze dragon zpeak: Z...z.. well, juzt take ze sheet wiz ze word and read it yourzelf. A lot of rebelz have died to retrieve ziz information, uze it wizely. ...", "Now go and try to find a way to reach ze emperor and to free ze land from it'z opprezzor. Onze you have found a way, return to me and I will explain what to do wiz ze cryztalz. May ze Great Znake guide you!", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.TeleportAccess.SleepingDragon, 1) - player:setStorageValue(Storage.WrathoftheEmperor.Mission09, 1) --Questlog, Wrath of the Emperor "Mission 08: Uninvited Guests" - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 27) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.SleepingDragon, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission09, 1) --Questlog, Wrath of the Emperor "Mission 08: Uninvited Guests" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 27) player:addItem(11372, 1) player:addItem(11426, 1) end diff --git a/data-otservbr-global/npc/zlak.lua b/data-otservbr-global/npc/zlak.lua index c1dd6fc5802..3a2030bab96 100644 --- a/data-otservbr-global/npc/zlak.lua +++ b/data-otservbr-global/npc/zlak.lua @@ -54,27 +54,27 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 22 then + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 22 then npcHandler:say({ "Ze rumour mill iz quite fazt. Ezpecially when zomeone unuzual az you enterz ze zity. Zoon zey will learn zat you have no reazon to be here and our raze will be buzted. ...", "Zo we have to ztrike fazt and quickly. You will have to eliminate zome high ranking key officialz. I zink killing four of zem should be enough. ...", "Ziz will dizrupt ze order in ze zity zignificantly zinze zo much dependz on bureaucracy and ze chain of command. Only chaoz and dizorganization will enable me to help you with ze next ztep in ze plan.", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.TeleportAccess.Zlak, 1) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 23) - player:setStorageValue(Storage.WrathoftheEmperor.Mission05, 3) --Questlog, Wrath of the Emperor "Mission 05: New in Town" - player:setStorageValue(Storage.WrathoftheEmperor.Mission06, 0) --Questlog, Wrath of the Emperor "Mission 06: The Office Job" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Zlak, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 23) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission05, 3) --Questlog, Wrath of the Emperor "Mission 05: New in Town" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission06, 0) --Questlog, Wrath of the Emperor "Mission 06: The Office Job" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 23 and player:getStorageValue(Storage.WrathoftheEmperor.Mission06) == 4 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 23 and player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission06) == 5 then npcHandler:say({ "Chaoz and panic are already zpreading. Your barbaric brutality iz frightening effectively. I could acquire a key zat we need to get you into ze palaze itzelf. But zere are ztill too many guardz and elite zquadz even for you to fight. ...", "I need you to enter ze zity and zlay at leazt zix noblez. Ze otherz will feel zreatened and call guardz to zemzelvez, and ze dragon kingz will accuze each ozer to be rezponzible for zlaying zeir pet noblez. ...", "Zat should enable uz to give you at leazt a chanze to attack ze palaze.", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 24) - player:setStorageValue(Storage.WrathoftheEmperor.Mission07, 0) --Questlog, Wrath of the Emperor "Mission 07: A Noble Cause" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 24) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission07, 0) --Questlog, Wrath of the Emperor "Mission 07: A Noble Cause" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 24 and player:getStorageValue(Storage.WrathoftheEmperor.Mission07) == 6 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 24 and player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission07) == 6 then if npcHandler:getTopic(playerId) ~= 1 then npcHandler:say({ "Word of your deedz iz already zpreading like a wildfire. Zalamon'z plan to unleash zome murderouz beaztz in ze zity workz almozt too well. You are already becoming zome kind of legend with which motherz frighten zeir unruly hatchlingz. ...", @@ -88,8 +88,8 @@ local function creatureSayCallback(npc, creature, type, message) "Meanwhile, you will take ze old ezcape tunnel zat leadz from ze abandoned bazement in ze norz of ze miniztry to a lift zat endz zomewhere in ze palaze. ...", "When everyzing workz according to ze plan, you will meet Zalamon zomewhere in the underground part of ze palaze.", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.Mission08, 1) --Questlog, Wrath of the Emperor "Mission 08: Uninvited Guests" - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 25) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission08, 1) --Questlog, Wrath of the Emperor "Mission 08: Uninvited Guests" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 25) npcHandler:setTopic(playerId, 0) end end diff --git a/data-otservbr-global/npc/zumtah.lua b/data-otservbr-global/npc/zumtah.lua index 97ba7b3c779..b4d1e1d45e1 100644 --- a/data-otservbr-global/npc/zumtah.lua +++ b/data-otservbr-global/npc/zumtah.lua @@ -58,7 +58,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "exit") then - if player:getStorageValue(Storage.WrathoftheEmperor.ZumtahStatus) ~= 1 then + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.ZumtahStatus) ~= 1 then if npcHandler:getTopic(playerId) < 1 then npcHandler:say("You are searching for the way out? Do you want to go home? Are you homesick, nostalgic, allergic? I am sorry. You will stay. Muhahahaha. Haha. Are you giving up then?", npc, creature) npcHandler:setTopic(playerId, 1) @@ -66,7 +66,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("A what? I don't even know what you're talking about, human. If you aren't just giving up - will you kindly change the topic please?", npc, creature) npcHandler:setTopic(playerId, 4) elseif npcHandler:getTopic(playerId) == 6 then - npcHandler:say("I'm not sure, there is an entry, though. Muhahaha. And isn't that enough after all?", npc, creature) + npcHandler:say("Haha, no! No. Why don't you just stop asking me that and start enjoying your stay here?", npc, creature) npcHandler:setTopic(playerId, 7) elseif npcHandler:getTopic(playerId) == 10 then npcHandler:say("Oh, you mean - if I have ever been out of here in those 278 years? Well, I - I can't remember. No, I can't remember. Sorry.", npc, creature) @@ -87,13 +87,13 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 14 then npcHandler:say({ "Alright, as I said you are free now. There will not be an outside for the next three centuries, but you - go. ...", "Oh and I recovered the strange crate you where hiding in, it will wait for you at the exit since you can't carry it as... a beetle, muhaha. Yes, you shall now crawl through the passage as a beetle. There you go." }, npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.WrathoftheEmperor.ZumtahStatus, 1) - player:setStorageValue(Storage.WrathoftheEmperor.PrisonReleaseStatus, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.ZumtahStatus, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.PrisonReleaseStatus, 1) player:addCondition(condition) end else npcHandler:say("It's you, why did they throw you in here again? Anyway, I will just transform you once more. I also recovered your crate which will wait for you at the exit. There, feel free to go.", npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.PrisonReleaseStatus, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.PrisonReleaseStatus, 1) player:addCondition(condition) end elseif MsgContains(message, "no") then diff --git a/data-otservbr-global/scripts/actions/other/enchanting.lua b/data-otservbr-global/scripts/actions/other/enchanting.lua index 3f7418ba7c4..ef6d648d15e 100644 --- a/data-otservbr-global/scripts/actions/other/enchanting.lua +++ b/data-otservbr-global/scripts/actions/other/enchanting.lua @@ -44,14 +44,14 @@ local enchantedItems = { local enchanting = Action() function enchanting.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if table.contains({ 33268, 33269 }, toPosition.x) and toPosition.y == 31830 and toPosition.z == 10 and player:getStorageValue(Storage.ElementalSphere.QuestLine) > 0 then + if table.contains({ 33268, 33269 }, toPosition.x) and toPosition.y == 31830 and toPosition.z == 10 and player:getStorageValue(Storage.Quest.U8_2.ElementalSpheres.QuestLine) > 0 then if not table.contains(spheres[item.itemid], player:getVocation():getBaseId()) then return false elseif table.contains({ 842, 843 }, target.itemid) then player:say("Turn off the machine first.", TALKTYPE_MONSTER_SAY) return true else - player:setStorageValue(Storage.ElementalSphere.MachineGemCount, math.max(1, player:getStorageValue(Storage.ElementalSphere.MachineGemCount) + 1)) + player:setStorageValue(Storage.Quest.U8_2.ElementalSpheres.MachineGemCount, math.max(1, player:getStorageValue(Storage.Quest.U8_2.ElementalSpheres.MachineGemCount) + 1)) toPosition:sendMagicEffect(CONST_ME_PURPLEENERGY) item:transform(item.itemid, item.type - 1) return true diff --git a/data-otservbr-global/scripts/actions/other/others/quest_system1.lua b/data-otservbr-global/scripts/actions/other/others/quest_system1.lua index 1783d8454a3..ea7e629a95f 100644 --- a/data-otservbr-global/scripts/actions/other/others/quest_system1.lua +++ b/data-otservbr-global/scripts/actions/other/others/quest_system1.lua @@ -1,13 +1,13 @@ local specialQuests = { -- {x = 32311, y = 32211, z = 8} - [51400] = Storage.ThievesGuild.Reward, - [51324] = Storage.WrathoftheEmperor.MainReward, + [51400] = Storage.Quest.U8_2.TheThievesGuildQuest.Reward, + [51324] = Storage.Quest.U8_6.WrathOfTheEmperor.MainReward, -- {x = 32232, y = 31066, z = 7} - [51715] = Storage.SvargrondArena.RewardGreenhorn, + [51715] = Storage.Quest.U8_0.BarbarianArena.RewardGreenhorn, -- {x = 32232, y = 31059, z = 7} - [51716] = Storage.SvargrondArena.RewardScrapper, + [51716] = Storage.Quest.U8_0.BarbarianArena.RewardScrapper, -- {x = 32232, y = 31052, z = 7} - [51717] = Storage.SvargrondArena.RewardWarlord, + [51717] = Storage.Quest.U8_0.BarbarianArena.RewardWarlord, } local questsExperience = { @@ -15,7 +15,7 @@ local questsExperience = { } local questLog = { - [8213] = Storage.HiddenCityOfBeregar.DefaultStart, + [8213] = Storage.Quest.U8_4.TheHiddenCityOfBeregar.DefaultStart, } local tutorialIds = { @@ -57,7 +57,7 @@ function questSystem1.onUse(player, item, fromPosition, target, toPosition, isHo end if storage == 23644 or storage == 24632 or storage == 14338 then - player:setStorageValue(Storage.SvargrondArena.PitDoor, -1) + player:setStorageValue(Storage.Quest.U8_0.BarbarianArena.PitDoor, -1) end if player:getStorageValue(storage) > 0 and player:getGroup():getId() < GROUP_TYPE_GAMEMASTER then @@ -167,7 +167,7 @@ function questSystem1.onUse(player, item, fromPosition, target, toPosition, isHo if tutorialIds[storage] then player:sendTutorial(tutorialIds[storage]) if item.uid == 50080 then - player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage, 3) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.SantiagoNpcGreetStorage, 3) end end diff --git a/data-otservbr-global/scripts/actions/other/others/quest_system2.lua b/data-otservbr-global/scripts/actions/other/others/quest_system2.lua index 4f8dbd32546..1fc69647305 100644 --- a/data-otservbr-global/scripts/actions/other/others/quest_system2.lua +++ b/data-otservbr-global/scripts/actions/other/others/quest_system2.lua @@ -27,7 +27,7 @@ local config = { items = { { itemId = 145 }, }, - storage = Storage.TravellingTrader.Mission02, + storage = Storage.Quest.U8_1.TheTravellingTrader.Mission02, formerValue = 3, newValue = 4, }, @@ -41,38 +41,26 @@ local config = { needItem = { itemId = 3231 }, effect = CONST_ME_MAGIC_RED, }, - [3062] = { - items = { - { itemId = 7528 }, - }, - storage = Storage.QuestChests.KosheiAmulet1, - }, - [3064] = { - items = { - { itemId = 7530 }, - }, - storage = Storage.QuestChests.KosheiAmulet2, - }, [3084] = { items = { { itemId = 8829 }, }, - storage = Storage.InServiceofYalahar.MatrixReward, + storage = Storage.Quest.U8_4.InServiceOfYalahar.MatrixReward, }, [3085] = { items = { { itemId = 8828 }, }, - storage = Storage.InServiceofYalahar.MatrixReward, + storage = Storage.Quest.U8_4.InServiceOfYalahar.MatrixReward, }, [3112] = { items = { { itemId = 2820, text = " Tylaf, apprentice of Hjaern" }, }, - storage = Storage.TheIceIslands.Questline, + storage = Storage.Quest.U8_0.TheIceIslands.Questline, formerValue = 35, newValue = 36, - missionStorage = { key = Storage.TheIceIslands.Mission09, value = 2 }, + missionStorage = { key = Storage.Quest.U8_0.TheIceIslands.Mission09, value = 2 }, }, [3116] = { items = { @@ -94,7 +82,7 @@ local config = { items = { { itemId = 637 }, }, - storage = Storage.ChildrenoftheRevolution.Questline, + storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline, formerValue = 1, newValue = 2, say = "A batch of documents has been stashed in the shelf. These might be of interest to Zalamon.", @@ -138,7 +126,7 @@ local config = { items = { { itemId = 10159 }, }, - storage = Storage.UnnaturalSelection.Mission01, + storage = Storage.Quest.U8_54.UnnaturalSelection.Mission01, formerValue = 1, newValue = 2, say = "You dig out a skull from the pile of bones. That must be the skull Lazaran talked about.", @@ -147,7 +135,7 @@ local config = { items = { { itemId = 7936 }, }, - storage = Storage.ThievesGuild.Mission06, + storage = Storage.Quest.U8_2.TheThievesGuildQuest.Mission06, formerValue = 2, newValue = 3, say = "To buy some time you replace the fish with a piece of carrot.", @@ -156,19 +144,19 @@ local config = { items = { { itemId = 652 }, }, - storage = Storage.SecretService.RottenTree, + storage = Storage.Quest.U8_1.SecretService.RottenTree, }, [50112] = { items = { { itemId = 3725, count = 10 }, }, - storage = Storage.HiddenCityOfBeregar.BrownMushrooms, + storage = Storage.Quest.U8_4.TheHiddenCityOfBeregar.BrownMushrooms, }, [50125] = { items = { { itemId = 8777 }, }, - storage = Storage.HiddenCityOfBeregar.JusticeForAll, + storage = Storage.Quest.U8_4.TheHiddenCityOfBeregar.JusticeForAll, formerValue = 3, newValue = 4, }, @@ -221,7 +209,7 @@ So they decided to recruit Augur on their own. This way most of our forefathers name = "History of the Augur, Part I", }, }, - storage = Storage.InServiceofYalahar.NotesPalimuth, + storage = Storage.Quest.U8_4.InServiceOfYalahar.NotesPalimuth, formerValue = 0, newValue = 1, }, @@ -252,7 +240,7 @@ To some extent, we have to work like a gardener. The rotten parts have to be cut name = "Manifest of the Yalahari, Part I", }, }, - storage = Storage.InServiceofYalahar.NotesAzerus, + storage = Storage.Quest.U8_4.InServiceOfYalahar.NotesAzerus, formerValue = 0, newValue = 1, }, @@ -260,7 +248,7 @@ To some extent, we have to work like a gardener. The rotten parts have to be cut items = { { itemId = 8818 }, }, - storage = Storage.InServiceofYalahar.AlchemistFormula, + storage = Storage.Quest.U8_4.InServiceOfYalahar.AlchemistFormula, formerValue = 0, newValue = 1, }, @@ -298,7 +286,7 @@ Gromward Hammerfist]], name = "Tunnelling Guide", }, }, - storage = Storage.HiddenCityOfBeregar.TunnellingGuide, + storage = Storage.Quest.U8_4.TheHiddenCityOfBeregar.TunnellingGuide, }, [20003] = { items = { diff --git a/data-otservbr-global/scripts/actions/quests/barbarian_test/mead.lua b/data-otservbr-global/scripts/actions/quests/barbarian_test/mead.lua deleted file mode 100644 index de2a579ce30..00000000000 --- a/data-otservbr-global/scripts/actions/quests/barbarian_test/mead.lua +++ /dev/null @@ -1,34 +0,0 @@ -local condition = Condition(CONDITION_OUTFIT) -condition:setOutfit({ lookTypeEx = 111 }) -condition:setTicks(1000) -local barbarianMead = Action() -function barbarianMead.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.BarbarianTest.Questline) == 2 and player:getStorageValue(Storage.BarbarianTest.MeadTotalSips) <= 20 then - if math.random(5) > 1 then - player:say("The world seems to spin but you manage to stay on your feet.", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.BarbarianTest.MeadSuccessSips, player:getStorageValue(Storage.BarbarianTest.MeadSuccessSips) + 1) - if player:getStorageValue(Storage.BarbarianTest.MeadSuccessSips) == 9 then -- 9 sips here cause local player at start - player:say("10 sips in a row. Yeah!", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.BarbarianTest.Questline, 3) - player:setStorageValue(Storage.BarbarianTest.Mission01, 3) -- Questlog Barbarian Test Quest Barbarian Test 1: Barbarian Booze - return true - end - else - player:say("The mead was too strong. You passed out for a moment.", TALKTYPE_MONSTER_SAY) - player:addCondition(condition) - player:getPosition():sendMagicEffect(CONST_ME_HITBYPOISON) - player:setStorageValue(Storage.BarbarianTest.MeadSuccessSips, 0) - end - player:setStorageValue(Storage.BarbarianTest.MeadTotalSips, player:getStorageValue(Storage.BarbarianTest.MeadTotalSips) + 1) - elseif player:getStorageValue(Storage.BarbarianTest.MeadTotalSips) > 20 then - player:say("Ask Sven for another round.", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.BarbarianTest.Questline, 1) - player:setStorageValue(Storage.BarbarianTest.Mission01, 1) -- Questlog Barbarian Test Quest Barbarian Test 1: Barbarian Booze - elseif player:getStorageValue(Storage.BarbarianTest.Questline) >= 3 then - player:say("You already passed the test, no need to torture yourself anymore.", TALKTYPE_MONSTER_SAY) - end - return true -end - -barbarianMead:position({ x = 32201, y = 31154, z = 7 }) -barbarianMead:register() diff --git a/data-otservbr-global/scripts/actions/quests/children_of_the_revolution/mission3_chest.lua b/data-otservbr-global/scripts/actions/quests/children_of_the_revolution/mission3_chest.lua deleted file mode 100644 index c4685e0d7da..00000000000 --- a/data-otservbr-global/scripts/actions/quests/children_of_the_revolution/mission3_chest.lua +++ /dev/null @@ -1,18 +0,0 @@ -local childrenMission3 = Action() -function childrenMission3.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.ChildrenoftheRevolution.Questline) == 9 then - player:setStorageValue(Storage.ChildrenoftheRevolution.Questline, 10) - player:addItem(10183, 1) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a flask of poison.") - elseif player:getStorageValue(Storage.ChildrenoftheRevolution.StrangeSymbols) == 2 then - player:setStorageValue(Storage.ChildrenoftheRevolution.StrangeSymbols, 3) - player:addItem(10189, 1) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a flask of extra greasy oil.") - else - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The chest is empty.") - end - return true -end - -childrenMission3:uid(3164) -childrenMission3:register() diff --git a/data-otservbr-global/scripts/actions/quests/ice_islands/charm.lua b/data-otservbr-global/scripts/actions/quests/ice_islands/charm.lua deleted file mode 100644 index d45ee1711a8..00000000000 --- a/data-otservbr-global/scripts/actions/quests/ice_islands/charm.lua +++ /dev/null @@ -1,49 +0,0 @@ -local iceCharm = Action() -function iceCharm.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if target.itemid ~= 1841 then - return false - end - - if player:getStorageValue(Storage.TheIceIslands.Questline) ~= 39 then - return true - end - - local obelisk1 = { x = 32138, y = 31113, z = 14 } - local obelisk2 = { x = 32119, y = 30992, z = 14 } - local obelisk3 = { x = 32180, y = 31069, z = 14 } - local obelisk4 = { x = 32210, y = 31027, z = 14 } - - if toPosition.x == obelisk1.x and toPosition.y == obelisk1.y and toPosition.z == obelisk1.z then - if player:getStorageValue(Storage.TheIceIslands.Obelisk01) < 5 then - player:setStorageValue(Storage.TheIceIslands.Obelisk01, 5) - player:setStorageValue(Storage.TheIceIslands.Mission12, player:getStorageValue(Storage.TheIceIslands.Mission12) + 1) -- Questlog The Ice Islands Quest, Formorgar Mines 4: Retaliation - toPosition:sendMagicEffect(CONST_ME_FIREWORK_BLUE) - player:say("You mark an obelisk with the frost charm.", TALKTYPE_MONSTER_SAY) - end - elseif toPosition.x == obelisk2.x and toPosition.y == obelisk2.y and toPosition.z == obelisk2.z then - if player:getStorageValue(Storage.TheIceIslands.Obelisk02) < 5 then - player:setStorageValue(Storage.TheIceIslands.Obelisk02, 5) - player:setStorageValue(Storage.TheIceIslands.Mission12, player:getStorageValue(Storage.TheIceIslands.Mission12) + 1) -- Questlog The Ice Islands Quest, Formorgar Mines 4: Retaliation - toPosition:sendMagicEffect(CONST_ME_FIREWORK_BLUE) - player:say("You mark an obelisk with the frost charm.", TALKTYPE_MONSTER_SAY) - end - elseif toPosition.x == obelisk3.x and toPosition.y == obelisk3.y and toPosition.z == obelisk3.z then - if player:getStorageValue(Storage.TheIceIslands.Obelisk03) < 5 then - player:setStorageValue(Storage.TheIceIslands.Obelisk03, 5) - player:setStorageValue(Storage.TheIceIslands.Mission12, player:getStorageValue(Storage.TheIceIslands.Mission12) + 1) -- Questlog The Ice Islands Quest, Formorgar Mines 4: Retaliation - toPosition:sendMagicEffect(CONST_ME_FIREWORK_BLUE) - player:say("You mark an obelisk with the frost charm.", TALKTYPE_MONSTER_SAY) - end - elseif toPosition.x == obelisk4.x and toPosition.y == obelisk4.y and toPosition.z == obelisk4.z then - if player:getStorageValue(Storage.TheIceIslands.Obelisk04) < 5 then - player:setStorageValue(Storage.TheIceIslands.Obelisk04, 5) - player:setStorageValue(Storage.TheIceIslands.Mission12, player:getStorageValue(Storage.TheIceIslands.Mission12) + 1) -- Questlog The Ice Islands Quest, Formorgar Mines 4: Retaliation - toPosition:sendMagicEffect(CONST_ME_FIREWORK_BLUE) - player:say("You mark an obelisk with the frost charm.", TALKTYPE_MONSTER_SAY) - end - end - return true -end - -iceCharm:id(7289) -iceCharm:register() diff --git a/data-otservbr-global/scripts/actions/quests/rottin_wood_and_married_men/trap.lua b/data-otservbr-global/scripts/actions/quests/rottin_wood_and_married_men/trap.lua deleted file mode 100644 index 4d324bb7cd2..00000000000 --- a/data-otservbr-global/scripts/actions/quests/rottin_wood_and_married_men/trap.lua +++ /dev/null @@ -1,72 +0,0 @@ -function removeMonster() - doRemoveItem(getTileItemById({ x = 32662, y = 32190, z = 7 }, 2768).uid, 1) - Position(32662, 32190, 7):sendMagicEffect(CONST_ME_STONES) - local TOP_LEFT_CORNER = { x = 32651, y = 32178, z = 7 } - local BOTTOM_RIGHT_CORNER = { x = 32668, y = 32190, z = 7 } - - for Py = TOP_LEFT_CORNER.y, BOTTOM_RIGHT_CORNER.y do - for Px = TOP_LEFT_CORNER.x, BOTTOM_RIGHT_CORNER.x do - local tile = Tile(Position({ x = Px, y = Py, z = 7 })) - if tile then - local monster = tile:getTopCreature() - if monster and monster:isMonster() and monster:getName() == "Travelling Merchant" then - -- monster:remove() - monster:getPosition():sendMagicEffect(CONST_ME_STONES) - --setPlayerStorageValue(cid, Storage.RottinWoodAndMaried.Trap, -1) - end - end - end - end - return true -end - -function removeTrap() - local TOP_LEFT_CORNER = { x = 32651, y = 32178, z = 7, stackpos = 253 } - local BOTTOM_RIGHT_CORNER = { x = 32668, y = 32190, z = 7, stackpos = 253 } - for Py = TOP_LEFT_CORNER.y, BOTTOM_RIGHT_CORNER.y do - for Px = TOP_LEFT_CORNER.x, BOTTOM_RIGHT_CORNER.x do - local trap = getTileItemById({ x = Px, y = Py, z = 7 }, 12187) - if trap then - setPlayerStorageValue(cid, Storage.RottinWoodAndMaried.Trap, -1) - doRemoveItem(trap.uid, 1) - end - end - end - return true -end - -local rottinWoodtrap = Action() -function rottinWoodtrap.onUse(cid, item, fromPosition, itemEx, toPosition, isHotkey) - if item.itemid == 12186 then - if itemEx.itemid == 10480 then - if (getPlayerStorageValue(cid, Storage.RottinWoodAndMaried.Mission03) == 5) and getPlayerStorageValue(cid, Storage.RottinWoodAndMaried.Trap) < 3 then - doCreatureSay(cid, "You place the trap carefully on the ground. Between twigs and leaves it is almost invisible.", TALKTYPE_MONSTER_SAY) - doRemoveItem(item.uid, 1) - Game.createItem(12187, 1, toPosition) - setPlayerStorageValue(cid, Storage.RottinWoodAndMaried.Trap, getPlayerStorageValue(cid, Storage.RottinWoodAndMaried.Trap) + 1) - else - if getPlayerStorageValue(cid, Storage.RottinWoodAndMaried.Trap) == 3 then - doCreatureSay(cid, "It looks like the merchants are about to arrive, better hide somewhere where you can see whats going on in the area.", TALKTYPE_MONSTER_SAY) - doRemoveItem(item.uid, 1) - Game.createItem(12187, 1, toPosition) - doTeleportThing(cid, { x = 32660, y = 32193, z = 7 }) - Player(cid):getPosition():sendMagicEffect(CONST_ME_STONES) - Game.createItem(2768, 1, { x = 32662, y = 32190, z = 7 }) -- small fir tree - ----------------------- SUMMON MERCHANT ----------------------------- - doSummonCreature("Travelling Merchant", { x = 32656, y = 32182, z = 7 }) - doSummonCreature("Travelling Merchant", { x = 32660, y = 32181, z = 7 }) - doSummonCreature("Travelling Merchant", { x = 32661, y = 32184, z = 7 }) - doSummonCreature("Travelling Merchant", { x = 32662, y = 32181, z = 7 }) - doSummonCreature("Travelling Merchant", { x = 32657, y = 32185, z = 7 }) - ---------------------------------------------------------------------- - addEvent(removeMonster, 5 * 60 * 1000) - addEvent(removeTrap, 5 * 60 * 1000) - end - end - end - end - return true -end - -rottinWoodtrap:id(12186) -rottinWoodtrap:register() diff --git a/data-otservbr-global/scripts/actions/quests/tibia_tales/exterminator_flask.lua b/data-otservbr-global/scripts/actions/quests/tibia_tales/exterminator_flask.lua deleted file mode 100644 index 448c7a17b71..00000000000 --- a/data-otservbr-global/scripts/actions/quests/tibia_tales/exterminator_flask.lua +++ /dev/null @@ -1,18 +0,0 @@ -local exterminatorFlask = Action() -function exterminatorFlask.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if target.actionid ~= 4207 then - return false - end - - if player:getStorageValue(Storage.TibiaTales.TheExterminator) ~= 1 then - return false - end - - player:setStorageValue(Storage.TibiaTales.TheExterminator, 2) - item:transform(2874, 0) - toPosition:sendMagicEffect(CONST_ME_GREEN_RINGS) - return true -end - -exterminatorFlask:id(135) -exterminatorFlask:register() diff --git a/data-otservbr-global/scripts/actions/quests/what_a_foolish/flask.lua b/data-otservbr-global/scripts/actions/quests/what_a_foolish/flask.lua deleted file mode 100644 index 221fb1bddec..00000000000 --- a/data-otservbr-global/scripts/actions/quests/what_a_foolish/flask.lua +++ /dev/null @@ -1,29 +0,0 @@ -local config = { - [2127] = { text = "This mission stinks ... and now you do as well!", condition = true, transformId = 9170 }, - [6065] = { text = "You carefully gather the quara ink", transformId = 9149 }, - [18233] = { text = "You carefully gather the stalker blood.", transformId = 125 }, -} - -local poisonField = Condition(CONDITION_OUTFIT) -poisonField:setTicks(8000) -poisonField:setOutfit({ lookTypeEx = 1496 }) - -local whatFoolishFlask = Action() -function whatFoolishFlask.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local targetItem = config[target.itemid] - if not targetItem then - return false - end - - if targetItem.condition then - player:addCondition(poisonField) - end - - player:say(targetItem.text, TALKTYPE_MONSTER_SAY) - player:getPosition():sendMagicEffect(CONST_ME_HITBYPOISON) - item:transform(targetItem.transformId) - return true -end - -whatFoolishFlask:id(107) -whatFoolishFlask:register() diff --git a/data-otservbr-global/scripts/actions/quests/what_a_foolish/worn_cloth.lua b/data-otservbr-global/scripts/actions/quests/what_a_foolish/worn_cloth.lua deleted file mode 100644 index c65580e58de..00000000000 --- a/data-otservbr-global/scripts/actions/quests/what_a_foolish/worn_cloth.lua +++ /dev/null @@ -1,19 +0,0 @@ -local whatFoolishWorn = Action() -function whatFoolishWorn.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if target.actionid ~= 4204 then - return false - end - - if player:getStorageValue(Storage.WhatAFoolish.Questline) ~= 34 or player:getStorageValue(Storage.WhatAFoolish.OldWornCloth) == 1 then - return false - end - - player:setStorageValue(Storage.WhatAFoolish.OldWornCloth, 1) - player:say("Amazing! That was quite fast!", TALKTYPE_MONSTER_SAY) - toPosition:sendMagicEffect(CONST_ME_BLOCKHIT) - item:transform(143) - return true -end - -whatFoolishWorn:id(142) -whatFoolishWorn:register() diff --git a/data-otservbr-global/scripts/actions/tools/crowbar.lua b/data-otservbr-global/scripts/actions/tools/crowbar.lua deleted file mode 100644 index 0981bd61d24..00000000000 --- a/data-otservbr-global/scripts/actions/tools/crowbar.lua +++ /dev/null @@ -1,39 +0,0 @@ -local function the_ape_city(player, item, target, toPosition) - if target:getActionId() == 40041 and target:getId() == 4848 then - local storageValue = player:getStorageValue(Storage.Quest.U7_6.TheApeCity.Casks) - if storageValue < 0 then - storageValue = 0 - end - - if storageValue >= 3 then - return true - end - - player:setStorageValue(Storage.Quest.U7_6.TheApeCity.Casks, storageValue + 1) - - return true - end - return false -end - -local crowbarActions = { - the_ape_city = the_ape_city, -} - -local function onUseCrowbar(player, item, fromPosition, target, toPosition, isHotkey) - for actionName, actionFunction in pairs(crowbarActions) do - if actionFunction(player, item, target, toPosition) then - return true - end - end - return true -end - -local crowbar = Action() - -function crowbar.onUse(player, item, fromPosition, target, toPosition, isHotkey) - return onUseCrowbar(player, item, fromPosition, target, toPosition, isHotkey) -end - -crowbar:id(3304) -crowbar:register() diff --git a/data-otservbr-global/scripts/actions/tools/hammer.lua b/data-otservbr-global/scripts/actions/tools/hammer.lua index 3473a76fd4f..e5889a20a7d 100644 --- a/data-otservbr-global/scripts/actions/tools/hammer.lua +++ b/data-otservbr-global/scripts/actions/tools/hammer.lua @@ -72,7 +72,7 @@ function hammer.onUse(player, item, fromPosition, target, toPosition, isHotkey) end -- Rottin wood and maried quest - if player:getStorageValue(Storage.RottinWoodAndMaried.RottinStart) < 6 then + if player:getStorageValue(Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.RottinStart) < 6 then local setting = settingTable[target:getActionId()] if setting then local woodenPosition = Position(setting.position) @@ -83,7 +83,7 @@ function hammer.onUse(player, item, fromPosition, target, toPosition, isHotkey) addEvent(createWooden, 2 * 60 * 1000, setting.position, setting.removeItem, setting.createItem, setting) end - player:setStorageValue(Storage.RottinWoodAndMaried.RottinStart, player:getStorageValue(Storage.RottinWoodAndMaried.RottinStart) + 1) + player:setStorageValue(Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.RottinStart, player:getStorageValue(Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.RottinStart) + 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You fixed this broken wall.") return true end diff --git a/data-otservbr-global/scripts/actions/tools/lock_pick.lua b/data-otservbr-global/scripts/actions/tools/lock_pick.lua index ac24cf02a49..c8e18275089 100644 --- a/data-otservbr-global/scripts/actions/tools/lock_pick.lua +++ b/data-otservbr-global/scripts/actions/tools/lock_pick.lua @@ -6,9 +6,9 @@ function lockPick.onUse(player, item, fromPosition, target, toPosition, isHotkey end if math.random(100) <= 30 then - if player:getStorageValue(Storage.ThievesGuild.Mission02) == 1 then + if player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission02) == 1 then player:addItem(227, 1) - player:setStorageValue(Storage.ThievesGuild.Mission02, 2) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission02, 2) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your lock pick open this chest!") end else diff --git a/data-otservbr-global/scripts/actions/tools/present.lua b/data-otservbr-global/scripts/actions/tools/present.lua index af9bf394378..284e858ec40 100644 --- a/data-otservbr-global/scripts/actions/tools/present.lua +++ b/data-otservbr-global/scripts/actions/tools/present.lua @@ -3,7 +3,7 @@ local present = Action() function present.onUse(cid, item, fromPosition, itemEx, toPosition) if item.itemid == 12171 then if itemEx.itemid == 12172 then - if getPlayerStorageValue(cid, Storage.RottinWoodAndMaried.Mission03) == 1 then + if getPlayerStorageValue(cid, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Mission03) == 1 then doRemoveItem(item.uid, 1) doRemoveItem(itemEx.uid, 1) doPlayerAddItem(cid, 12173, 1) diff --git a/data-otservbr-global/scripts/actions/tools/skinning.lua b/data-otservbr-global/scripts/actions/tools/skinning.lua index f6785f91378..2461dfb7e80 100644 --- a/data-otservbr-global/scripts/actions/tools/skinning.lua +++ b/data-otservbr-global/scripts/actions/tools/skinning.lua @@ -150,13 +150,13 @@ function skinning.onUse(player, item, fromPosition, target, toPosition, isHotkey player:say("You carve a solid bowl of the chunk of wood.", TALKTYPE_MONSTER_SAY) return true -- An Interest In Botany Quest - elseif target.itemid == 10735 and player:getItemCount(11699) > 0 and player:getStorageValue(Storage.TibiaTales.AnInterestInBotany) == 1 then + elseif target.itemid == 10735 and player:getItemCount(11699) > 0 and player:getStorageValue(Storage.TibiaTales.AnInterestInBotany.Questline) == 1 then player:say("The plant feels cold but dry and very soft. You streak the plant gently with your knife and put a fragment in the almanach.", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.TibiaTales.AnInterestInBotany, 2) + player:setStorageValue(Storage.TibiaTales.AnInterestInBotany.Questline, 2) return true - elseif target.itemid == 10697 and player:getItemCount(11699) > 0 and player:getStorageValue(Storage.TibiaTales.AnInterestInBotany) == 2 then + elseif target.itemid == 10697 and player:getItemCount(11699) > 0 and player:getStorageValue(Storage.TibiaTales.AnInterestInBotany.Questline) == 2 then player:say("You cut a leaf from a branch and put it in the almanach. It smells strangely sweet and awfully bitter at the same time.", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.TibiaTales.AnInterestInBotany, 3) + player:setStorageValue(Storage.TibiaTales.AnInterestInBotany.Questline, 3) return true elseif target.itemid == 8181 and player:getStorageValue(789100) <= 1 then player:say("You got Neutral matter.", TALKTYPE_MONSTER_SAY) @@ -168,6 +168,11 @@ function skinning.onUse(player, item, fromPosition, target, toPosition, isHotkey player:addItem(954, 1) player:setStorageValue(789100, 2) return true + -- Rottin Wood and the Married Men Quest + elseif target.itemid == 4301 then + player:say("You successfully gathered a rabbit's food in excellent condition.", TALKTYPE_MONSTER_SAY) + player:addItem(12172, 1) + return true end end diff --git a/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua b/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua index da3c346e34d..d3d8fb36bc4 100644 --- a/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua +++ b/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua @@ -22,43 +22,43 @@ local questTable = { { storage = Storage.DangerousDepths.Dwarves.Status, storageValue = 10 }, { storage = Storage.DangerousDepths.Scouts.Status, storageValue = 10 }, { storage = Storage.DangerousDepths.Gnomes.Status, storageValue = 10 }, - { storage = Storage.InServiceofYalahar.Questline, storageValue = 51 }, - { storage = Storage.InServiceofYalahar.Mission01, storageValue = 6 }, - { storage = Storage.InServiceofYalahar.Mission02, storageValue = 8 }, - { storage = Storage.InServiceofYalahar.Mission03, storageValue = 6 }, - { storage = Storage.InServiceofYalahar.Mission04, storageValue = 6 }, - { storage = Storage.InServiceofYalahar.Mission05, storageValue = 8 }, - { storage = Storage.InServiceofYalahar.Mission06, storageValue = 5 }, - { storage = Storage.InServiceofYalahar.Mission07, storageValue = 5 }, - { storage = Storage.InServiceofYalahar.Mission08, storageValue = 4 }, - { storage = Storage.InServiceofYalahar.Mission09, storageValue = 2 }, - { storage = Storage.InServiceofYalahar.Mission10, storageValue = 1 }, - { storage = Storage.InServiceofYalahar.SewerPipe01, storageValue = 1 }, - { storage = Storage.InServiceofYalahar.SewerPipe02, storageValue = 1 }, - { storage = Storage.InServiceofYalahar.SewerPipe03, storageValue = 1 }, - { storage = Storage.InServiceofYalahar.SewerPipe04, storageValue = 1 }, - { storage = Storage.InServiceofYalahar.DiseasedDan, storageValue = 1 }, - { storage = Storage.InServiceofYalahar.DiseasedBill, storageValue = 1 }, - { storage = Storage.InServiceofYalahar.DiseasedFred, storageValue = 1 }, - { storage = Storage.InServiceofYalahar.AlchemistFormula, storageValue = 1 }, - { storage = Storage.InServiceofYalahar.BadSide, storageValue = 1 }, - { storage = Storage.InServiceofYalahar.GoodSide, storageValue = 1 }, - { storage = Storage.InServiceofYalahar.MrWestDoor, storageValue = 1 }, - { storage = Storage.InServiceofYalahar.MrWestStatus, storageValue = 1 }, - { storage = Storage.InServiceofYalahar.TamerinStatus, storageValue = 1 }, - { storage = Storage.InServiceofYalahar.MorikSummon, storageValue = 1 }, - { storage = Storage.InServiceofYalahar.QuaraState, storageValue = 1 }, - { storage = Storage.InServiceofYalahar.QuaraSplasher, storageValue = 1 }, - { storage = Storage.InServiceofYalahar.QuaraSharptooth, storageValue = 1 }, - { storage = Storage.InServiceofYalahar.QuaraInky, storageValue = 1 }, - { storage = Storage.InServiceofYalahar.MatrixState, storageValue = 1 }, - { storage = Storage.InServiceofYalahar.NotesPalimuth, storageValue = 1 }, - { storage = Storage.InServiceofYalahar.NotesAzerus, storageValue = 1 }, - { storage = Storage.InServiceofYalahar.DoorToAzerus, storageValue = 1 }, - { storage = Storage.InServiceofYalahar.DoorToBog, storageValue = 1 }, - { storage = Storage.InServiceofYalahar.DoorToLastFight, storageValue = 1 }, - { storage = Storage.InServiceofYalahar.DoorToMatrix, storageValue = 1 }, - { storage = Storage.InServiceofYalahar.DoorToQuara, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.Questline, storageValue = 51 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission01, storageValue = 6 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission02, storageValue = 8 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission03, storageValue = 6 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission04, storageValue = 6 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission05, storageValue = 8 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission06, storageValue = 5 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission07, storageValue = 5 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission08, storageValue = 4 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission09, storageValue = 2 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.Mission10, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.SewerPipe01, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.SewerPipe02, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.SewerPipe03, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.SewerPipe04, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.DiseasedDan, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.DiseasedBill, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.DiseasedFred, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.AlchemistFormula, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.BadSide, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.GoodSide, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.MrWestDoor, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.MrWestStatus, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.TamerinStatus, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.MorikSummon, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.QuaraState, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.QuaraSplasher, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.QuaraSharptooth, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.QuaraInky, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.MatrixState, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.NotesPalimuth, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.NotesAzerus, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.DoorToAzerus, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.DoorToBog, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.DoorToLastFight, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.DoorToMatrix, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.DoorToQuara, storageValue = 1 }, { storage = Storage.CultsOfTibia.Questline, storageValue = 7 }, { storage = Storage.CultsOfTibia.Minotaurs.JamesfrancisTask, storageValue = 1 }, { storage = Storage.CultsOfTibia.Minotaurs.Mission, storageValue = 1 }, @@ -120,21 +120,21 @@ local questTable = { { storage = Storage.ForgottenKnowledge.LadyTenebrisKilled, storageValue = 1 }, { storage = Storage.ForgottenKnowledge.AccessMachine, storageValue = 1 }, { storage = Storage.ForgottenKnowledge.AccessLavaTeleport, storageValue = 1 }, - { storage = Storage.BarbarianTest.Questline, storageValue = 8 }, - { storage = Storage.BarbarianTest.Mission01, storageValue = 3 }, - { storage = Storage.BarbarianTest.Mission02, storageValue = 3 }, - { storage = Storage.BarbarianTest.Mission03, storageValue = 3 }, - { storage = Storage.ChildrenoftheRevolution.Questline, storageValue = 21 }, - { storage = Storage.ChildrenoftheRevolution.Mission00, storageValue = 2 }, - { storage = Storage.ChildrenoftheRevolution.Mission01, storageValue = 3 }, - { storage = Storage.ChildrenoftheRevolution.Mission02, storageValue = 5 }, - { storage = Storage.ChildrenoftheRevolution.Mission03, storageValue = 3 }, - { storage = Storage.ChildrenoftheRevolution.Mission04, storageValue = 6 }, - { storage = Storage.ChildrenoftheRevolution.Mission05, storageValue = 3 }, - { storage = Storage.ChildrenoftheRevolution.SpyBuilding01, storageValue = 1 }, - { storage = Storage.ChildrenoftheRevolution.SpyBuilding02, storageValue = 1 }, - { storage = Storage.ChildrenoftheRevolution.SpyBuilding03, storageValue = 1 }, - { storage = Storage.ChildrenoftheRevolution.StrangeSymbols, storageValue = 1 }, + { storage = Storage.Quest.U8_0.BarbarianTest.Questline, storageValue = 8 }, + { storage = Storage.Quest.U8_0.BarbarianTest.Mission01, storageValue = 3 }, + { storage = Storage.Quest.U8_0.BarbarianTest.Mission02, storageValue = 3 }, + { storage = Storage.Quest.U8_0.BarbarianTest.Mission03, storageValue = 3 }, + { storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline, storageValue = 21 }, + { storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission00, storageValue = 2 }, + { storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission01, storageValue = 3 }, + { storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission02, storageValue = 5 }, + { storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission03, storageValue = 3 }, + { storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission04, storageValue = 6 }, + { storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission05, storageValue = 3 }, + { storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.SpyBuilding01, storageValue = 1 }, + { storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.SpyBuilding02, storageValue = 1 }, + { storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.SpyBuilding03, storageValue = 1 }, + { storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.StrangeSymbols, storageValue = 1 }, { storage = Storage.Quest.U7_4.DjinnWar.Faction.Greeting, storageValue = 2 }, { storage = Storage.Quest.U7_4.DjinnWar.Faction.MaridDoor, storageValue = 2 }, { storage = Storage.Quest.U7_4.DjinnWar.Faction.EfreetDoor, storageValue = 2 }, @@ -147,46 +147,46 @@ local questTable = { { storage = Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission02, storageValue = 2 }, { storage = Storage.Quest.U7_4.DjinnWar.MaridFaction.RataMari, storageValue = 2 }, { storage = Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission03, storageValue = 3 }, - { storage = Storage.TheWayToYalahar.QuestLine, storageValue = 1 }, - { storage = Storage.SearoutesAroundYalahar.TownsCounter, storageValue = 5 }, - { storage = Storage.SearoutesAroundYalahar.AbDendriel, storageValue = 1 }, - { storage = Storage.SearoutesAroundYalahar.Darashia, storageValue = 1 }, - { storage = Storage.SearoutesAroundYalahar.Venore, storageValue = 1 }, - { storage = Storage.SearoutesAroundYalahar.Ankrahmun, storageValue = 1 }, - { storage = Storage.SearoutesAroundYalahar.PortHope, storageValue = 1 }, - { storage = Storage.SearoutesAroundYalahar.Thais, storageValue = 1 }, - { storage = Storage.SearoutesAroundYalahar.LibertyBay, storageValue = 1 }, - { storage = Storage.SearoutesAroundYalahar.Carlin, storageValue = 1 }, - { storage = Storage.HiddenCityOfBeregar.DefaultStart, storageValue = 1 }, - { storage = Storage.HiddenCityOfBeregar.GoingDown, storageValue = 1 }, - { storage = Storage.HiddenCityOfBeregar.WayToBeregar, storageValue = 1 }, - { storage = Storage.TheIceIslands.Questline, storageValue = 40 }, - { storage = Storage.TheIceIslands.Mission01, storageValue = 3 }, - { storage = Storage.TheIceIslands.Mission02, storageValue = 5 }, - { storage = Storage.TheIceIslands.Mission03, storageValue = 3 }, - { storage = Storage.TheIceIslands.Mission04, storageValue = 2 }, - { storage = Storage.TheIceIslands.Mission05, storageValue = 6 }, - { storage = Storage.TheIceIslands.Mission06, storageValue = 8 }, - { storage = Storage.TheIceIslands.Mission07, storageValue = 3 }, - { storage = Storage.TheIceIslands.Mission08, storageValue = 4 }, - { storage = Storage.TheIceIslands.Mission09, storageValue = 2 }, - { storage = Storage.TheIceIslands.Mission10, storageValue = 2 }, - { storage = Storage.TheIceIslands.Mission11, storageValue = 2 }, - { storage = Storage.TheIceIslands.Mission12, storageValue = 6 }, - { storage = Storage.TheIceIslands.yakchalDoor, storageValue = 1 }, - { storage = Storage.TheInquisition.Questline, storageValue = 25 }, - { storage = Storage.TheInquisition.Mission01, storageValue = 7 }, - { storage = Storage.TheInquisition.Mission02, storageValue = 3 }, - { storage = Storage.TheInquisition.Mission03, storageValue = 6 }, - { storage = Storage.TheInquisition.Mission04, storageValue = 3 }, - { storage = Storage.TheInquisition.Mission05, storageValue = 3 }, - { storage = Storage.TheInquisition.Mission06, storageValue = 3 }, - { storage = Storage.TheInquisition.Mission07, storageValue = 1 }, - { storage = Storage.TheInquisition.GrofGuard, storageValue = 1 }, - { storage = Storage.TheInquisition.KulagGuard, storageValue = 1 }, - { storage = Storage.TheInquisition.TimGuard, storageValue = 1 }, - { storage = Storage.TheInquisition.WalterGuard, storageValue = 1 }, - { storage = Storage.TheInquisition.StorkusVampiredust, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.TheWayToYalahar, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.TownsCounter, storageValue = 5 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.AbDendriel, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Darashia, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Venore, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Ankrahmun, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.PortHope, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Thais, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.LibertyBay, storageValue = 1 }, + { storage = Storage.Quest.U8_4.InServiceOfYalahar.SearoutesAroundYalahar.Carlin, storageValue = 1 }, + { storage = Storage.Quest.U8_4.TheHiddenCityOfBeregar.DefaultStart, storageValue = 1 }, + { storage = Storage.Quest.U8_4.TheHiddenCityOfBeregar.GoingDown, storageValue = 1 }, + { storage = Storage.Quest.U8_4.TheHiddenCityOfBeregar.WayToBeregar, storageValue = 1 }, + { storage = Storage.Quest.U8_0.TheIceIslands.Questline, storageValue = 40 }, + { storage = Storage.Quest.U8_0.TheIceIslands.Mission01, storageValue = 3 }, + { storage = Storage.Quest.U8_0.TheIceIslands.Mission02, storageValue = 5 }, + { storage = Storage.Quest.U8_0.TheIceIslands.Mission03, storageValue = 3 }, + { storage = Storage.Quest.U8_0.TheIceIslands.Mission04, storageValue = 2 }, + { storage = Storage.Quest.U8_0.TheIceIslands.Mission05, storageValue = 6 }, + { storage = Storage.Quest.U8_0.TheIceIslands.Mission06, storageValue = 8 }, + { storage = Storage.Quest.U8_0.TheIceIslands.Mission07, storageValue = 3 }, + { storage = Storage.Quest.U8_0.TheIceIslands.Mission08, storageValue = 4 }, + { storage = Storage.Quest.U8_0.TheIceIslands.Mission09, storageValue = 2 }, + { storage = Storage.Quest.U8_0.TheIceIslands.Mission10, storageValue = 2 }, + { storage = Storage.Quest.U8_0.TheIceIslands.Mission11, storageValue = 2 }, + { storage = Storage.Quest.U8_0.TheIceIslands.Mission12, storageValue = 6 }, + { storage = Storage.Quest.U8_0.TheIceIslands.yakchalDoor, storageValue = 1 }, + { storage = Storage.Quest.U8_2.TheInquisitionQuest.Questline, storageValue = 25 }, + { storage = Storage.Quest.U8_2.TheInquisitionQuest.Mission01, storageValue = 7 }, + { storage = Storage.Quest.U8_2.TheInquisitionQuest.Mission02, storageValue = 3 }, + { storage = Storage.Quest.U8_2.TheInquisitionQuest.Mission03, storageValue = 6 }, + { storage = Storage.Quest.U8_2.TheInquisitionQuest.Mission04, storageValue = 3 }, + { storage = Storage.Quest.U8_2.TheInquisitionQuest.Mission05, storageValue = 3 }, + { storage = Storage.Quest.U8_2.TheInquisitionQuest.Mission06, storageValue = 3 }, + { storage = Storage.Quest.U8_2.TheInquisitionQuest.Mission07, storageValue = 1 }, + { storage = Storage.Quest.U8_2.TheInquisitionQuest.GrofGuard, storageValue = 1 }, + { storage = Storage.Quest.U8_2.TheInquisitionQuest.KulagGuard, storageValue = 1 }, + { storage = Storage.Quest.U8_2.TheInquisitionQuest.TimGuard, storageValue = 1 }, + { storage = Storage.Quest.U8_2.TheInquisitionQuest.WalterGuard, storageValue = 1 }, + { storage = Storage.Quest.U8_2.TheInquisitionQuest.StorkusVampiredust, storageValue = 1 }, { storage = Storage.Quest.U8_54.TheNewFrontier.Questline, storageValue = 29 }, { storage = Storage.Quest.U8_54.TheNewFrontier.Mission01, storageValue = 3 }, { storage = Storage.Quest.U8_54.TheNewFrontier.Mission02[1], storageValue = 4 }, @@ -220,24 +220,24 @@ local questTable = { { storage = Storage.Quest.U7_8.TheShatteredIsles.Shipwrecked, storageValue = 2 }, { storage = Storage.Quest.U7_8.TheShatteredIsles.DragahsSpellbook, storageValue = 1 }, { storage = Storage.Quest.U7_8.TheShatteredIsles.TheCounterspell, storageValue = 4 }, - { storage = Storage.ThievesGuild.Quest, storageValue = 1 }, - { storage = Storage.ThievesGuild.Mission01, storageValue = 2 }, - { storage = Storage.ThievesGuild.Mission02, storageValue = 3 }, - { storage = Storage.ThievesGuild.Mission03, storageValue = 3 }, - { storage = Storage.ThievesGuild.Mission04, storageValue = 8 }, - { storage = Storage.ThievesGuild.Mission05, storageValue = 2 }, - { storage = Storage.ThievesGuild.Mission06, storageValue = 4 }, - { storage = Storage.ThievesGuild.Mission07, storageValue = 2 }, - { storage = Storage.ThievesGuild.Mission08, storageValue = 1 }, - { storage = Storage.TravellingTrader.Mission01, storageValue = 1 }, - { storage = Storage.TravellingTrader.Mission01, storageValue = 2 }, - { storage = Storage.TravellingTrader.Mission02, storageValue = 5 }, - { storage = Storage.TravellingTrader.Mission03, storageValue = 3 }, - { storage = Storage.TravellingTrader.Mission04, storageValue = 3 }, - { storage = Storage.TravellingTrader.Mission05, storageValue = 3 }, - { storage = Storage.TravellingTrader.Mission06, storageValue = 2 }, - { storage = Storage.TravellingTrader.Mission07, storageValue = 1 }, - { storage = Storage.SvargrondArena.QuestLogGreenhorn, storageValue = 1 }, + { storage = Storage.Quest.U8_2.TheThievesGuildQuest.Questline, storageValue = 1 }, + { storage = Storage.Quest.U8_2.TheThievesGuildQuest.Mission01, storageValue = 2 }, + { storage = Storage.Quest.U8_2.TheThievesGuildQuest.Mission02, storageValue = 3 }, + { storage = Storage.Quest.U8_2.TheThievesGuildQuest.Mission03, storageValue = 3 }, + { storage = Storage.Quest.U8_2.TheThievesGuildQuest.Mission04, storageValue = 8 }, + { storage = Storage.Quest.U8_2.TheThievesGuildQuest.Mission05, storageValue = 2 }, + { storage = Storage.Quest.U8_2.TheThievesGuildQuest.Mission06, storageValue = 4 }, + { storage = Storage.Quest.U8_2.TheThievesGuildQuest.Mission07, storageValue = 2 }, + { storage = Storage.Quest.U8_2.TheThievesGuildQuest.Mission08, storageValue = 1 }, + { storage = Storage.Quest.U8_1.TheTravellingTrader.Mission01, storageValue = 1 }, + { storage = Storage.Quest.U8_1.TheTravellingTrader.Mission01, storageValue = 2 }, + { storage = Storage.Quest.U8_1.TheTravellingTrader.Mission02, storageValue = 5 }, + { storage = Storage.Quest.U8_1.TheTravellingTrader.Mission03, storageValue = 3 }, + { storage = Storage.Quest.U8_1.TheTravellingTrader.Mission04, storageValue = 3 }, + { storage = Storage.Quest.U8_1.TheTravellingTrader.Mission05, storageValue = 3 }, + { storage = Storage.Quest.U8_1.TheTravellingTrader.Mission06, storageValue = 2 }, + { storage = Storage.Quest.U8_1.TheTravellingTrader.Mission07, storageValue = 1 }, + { storage = Storage.Quest.U8_0.BarbarianArena.QuestLogGreenhorn, storageValue = 1 }, { storage = Storage.TibiaTales.DefaultStart, storageValue = 1 }, { storage = Storage.TibiaTales.ToAppeaseTheMightyQuest, storageValue = 1 }, { storage = 12450, storageValue = 6 }, @@ -249,17 +249,17 @@ local questTable = { { storage = Storage.Quest.U7_8.FriendsAndTraders.TheMermaidMarina, storageValue = 2 }, { storage = Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake, storageValue = 12 }, { storage = 100157, storageValue = 1 }, - { storage = Storage.WrathoftheEmperor.Questline, storageValue = 29 }, - { storage = Storage.WrathoftheEmperor.Mission01, storageValue = 3 }, - { storage = Storage.WrathoftheEmperor.Mission02, storageValue = 3 }, - { storage = Storage.WrathoftheEmperor.Mission03, storageValue = 3 }, - { storage = Storage.WrathoftheEmperor.Mission04, storageValue = 3 }, - { storage = Storage.WrathoftheEmperor.Mission05, storageValue = 3 }, - { storage = Storage.WrathoftheEmperor.Mission06, storageValue = 4 }, - { storage = Storage.WrathoftheEmperor.Mission07, storageValue = 6 }, - { storage = Storage.WrathoftheEmperor.Mission08, storageValue = 2 }, - { storage = Storage.WrathoftheEmperor.Mission09, storageValue = 2 }, - { storage = Storage.WrathoftheEmperor.Mission10, storageValue = 1 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Questline, storageValue = 29 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission01, storageValue = 3 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission02, storageValue = 3 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission03, storageValue = 3 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission04, storageValue = 3 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission05, storageValue = 3 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission06, storageValue = 4 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission07, storageValue = 6 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission08, storageValue = 2 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission09, storageValue = 2 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission10, storageValue = 1 }, { storage = Storage.Quest.U7_6.TheApeCity.Started, storageValue = 1 }, { storage = Storage.Quest.U7_6.TheApeCity.Questline, storageValue = 18 }, { storage = Storage.BanutaSecretTunnel.DeeperBanutaShortcut, storageValue = 1 }, @@ -319,14 +319,14 @@ local questTable = { { storage = Storage.Quest.U12_00.TheDreamCourts.AndrewDoor, storageValue = 1 }, - { storage = Storage.WrathoftheEmperor.TeleportAccess.AwarnessEmperor, storageValue = 1 }, - { storage = Storage.WrathoftheEmperor.TeleportAccess.BossRoom, storageValue = 1 }, - { storage = Storage.WrathoftheEmperor.TeleportAccess.InnerSanctum, storageValue = 1 }, - { storage = Storage.WrathoftheEmperor.TeleportAccess.Rebel, storageValue = 1 }, - { storage = Storage.WrathoftheEmperor.TeleportAccess.SleepingDragon, storageValue = 2 }, - { storage = Storage.WrathoftheEmperor.TeleportAccess.Wote10, storageValue = 1 }, - { storage = Storage.WrathoftheEmperor.TeleportAccess.Zizzle, storageValue = 1 }, - { storage = Storage.WrathoftheEmperor.TeleportAccess.Zlak, storageValue = 1 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.AwarnessEmperor, storageValue = 1 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.BossRoom, storageValue = 1 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.InnerSanctum, storageValue = 1 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Rebel, storageValue = 1 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.SleepingDragon, storageValue = 2 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Wote10, storageValue = 1 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Zizzle, storageValue = 1 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Zlak, storageValue = 1 }, { storage = Storage.TheSecretLibrary.FalconBastionAccess, storageValue = 1 }, { storage = Storage.TheSecretLibrary.LowerBastionAccess, storageValue = 1 }, @@ -360,8 +360,8 @@ local questTable = { { storage = Storage.Quest.U8_4.BloodBrothers.VengothAccess, storageValue = 1 }, -- Assassin Outfit quests - { storage = Storage.KillingInTheNameOf.BudrikMinos, storageValue = 0 }, - { storage = Storage.ToOutfoxAFoxQuest, storageValue = 2 }, + { storage = Storage.Quest.U8_5.KillingInTheNameOf.BudrikMinos, storageValue = 0 }, + { storage = Storage.TibiaTales.ToOutfoxAFoxQuest.Questline, storageValue = 2 }, -- Hunter Outfit quests { storage = Storage.Quest.U7_8.HunterOutfits.HunterMusicSheet01, storageValue = 1 }, @@ -370,7 +370,7 @@ local questTable = { { storage = Storage.Quest.U7_8.HunterOutfits.HunterMusicSheet04, storageValue = 1 }, -- Norseman - { storage = Storage.OutfitQuest.NorsemanAddon, storageValue = 1 }, + { storage = Storage.Quest.U8_0.TheIceIslands.NorsemanOutfit, storageValue = 1 }, { storage = Storage.OutfitQuest.DefaultStart, storageValue = 1 }, { storage = Storage.HeroRathleton.AccessDoor, storageValue = 1 }, @@ -379,7 +379,7 @@ local questTable = { { storage = Storage.HeroRathleton.AccessTeleport3, storageValue = 1 }, -- Sea Serpent Quest - { storage = Storage.Quest.U8_2.FishForASerpent.QuestLine, storageValue = 5 }, + { storage = Storage.Quest.U8_2.TheHuntForTheSeaSerpent.FishForASerpent, storageValue = 5 }, { storage = Storage.Quest.U8_2.TheHuntForTheSeaSerpent.QuestLine, storageValue = 2 }, --The White Raven Monastery diff --git a/data-otservbr-global/scripts/creaturescripts/others/player_death.lua b/data-otservbr-global/scripts/creaturescripts/others/player_death.lua index b4756addfee..f3a84454cfd 100644 --- a/data-otservbr-global/scripts/creaturescripts/others/player_death.lua +++ b/data-otservbr-global/scripts/creaturescripts/others/player_death.lua @@ -2,8 +2,8 @@ local deathListEnabled = true local playerDeath = CreatureEvent("PlayerDeath") function playerDeath.onDeath(player, corpse, killer, mostDamageKiller, unjustified, mostDamageUnjustified) - if player:getStorageValue(Storage.SvargrondArena.PitDoor) > 0 then - player:setStorageValue(Storage.SvargrondArena.PitDoor, 0) + if player:getStorageValue(Storage.Quest.U8_0.BarbarianArena.PitDoor) > 0 then + player:setStorageValue(Storage.Quest.U8_0.BarbarianArena.PitDoor, 0) end if not deathListEnabled then diff --git a/data-otservbr-global/scripts/creaturescripts/quests/in_service_of_yalahar/diseased_trio_kill.lua b/data-otservbr-global/scripts/creaturescripts/quests/in_service_of_yalahar/diseased_trio_kill.lua deleted file mode 100644 index b9a0aea39b3..00000000000 --- a/data-otservbr-global/scripts/creaturescripts/quests/in_service_of_yalahar/diseased_trio_kill.lua +++ /dev/null @@ -1,27 +0,0 @@ -local diseasedTrio = { - ["diseased bill"] = Storage.InServiceofYalahar.DiseasedBill, - ["diseased dan"] = Storage.InServiceofYalahar.DiseasedDan, - ["diseased fred"] = Storage.InServiceofYalahar.DiseasedFred, -} - -local diseasedTrioKill = CreatureEvent("DiseasedTrioDeath") -function diseasedTrioKill.onDeath(creature) - local bossStorage = diseasedTrio[creature:getName():lower()] - if not bossStorage then - return true - end - - onDeathForDamagingPlayers(creature, function(creature, player) - if player:getStorageValue(bossStorage) < 1 then - player:setStorageValue(bossStorage, 1) - player:say("You slayed " .. creature:getName() .. ".", TALKTYPE_MONSTER_SAY) - end - - if player:getStorageValue(Storage.InServiceofYalahar.DiseasedDan) == 1 and player:getStorageValue(Storage.InServiceofYalahar.DiseasedBill) == 1 and player:getStorageValue(Storage.InServiceofYalahar.DiseasedFred) == 1 and player:getStorageValue(Storage.InServiceofYalahar.AlchemistFormula) ~= 1 then - player:setStorageValue(Storage.InServiceofYalahar.AlchemistFormula, 0) - end - end) - return true -end - -diseasedTrioKill:register() diff --git a/data-otservbr-global/scripts/movements/teleport/citizen.lua b/data-otservbr-global/scripts/movements/teleport/citizen.lua index fa12efa5d0a..6e0d939eba2 100644 --- a/data-otservbr-global/scripts/movements/teleport/citizen.lua +++ b/data-otservbr-global/scripts/movements/teleport/citizen.lua @@ -36,7 +36,7 @@ function citizen.onStepIn(creature, item, position, fromPosition) return true end - if town:getId() == TOWNS_LIST.SVARGROND and player:getStorageValue(Storage.BarbarianTest.Questline) < 8 then + if town:getId() == TOWNS_LIST.SVARGROND and player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) < 8 then player:sendTextMessage(MESSAGE_GAME_HIGHLIGHT, "You first need to absolve the Barbarian Test Quest to become citizen!") player:teleportTo(town:getTemplePosition()) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) diff --git a/data-otservbr-global/scripts/movements/teleport/citizen_svargrond.lua b/data-otservbr-global/scripts/movements/teleport/citizen_svargrond.lua index 1e7b146fab2..3bcdc5e72a9 100644 --- a/data-otservbr-global/scripts/movements/teleport/citizen_svargrond.lua +++ b/data-otservbr-global/scripts/movements/teleport/citizen_svargrond.lua @@ -6,7 +6,7 @@ function citizenSvargrond.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.BarbarianTest.Mission03) == 3 then + if player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) == 8 then player:teleportTo(Position(32212, 31131, 5)) else player:teleportTo(Position(32210, 31134, 7)) diff --git a/data-otservbr-global/scripts/actions/quests/a_pirates_tail/cheesy_key.lua b/data-otservbr-global/scripts/quests/a_pirates_tail/actions_cheesy_key.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/a_pirates_tail/cheesy_key.lua rename to data-otservbr-global/scripts/quests/a_pirates_tail/actions_cheesy_key.lua diff --git a/data-otservbr-global/scripts/actions/quests/a_pirates_tail/rascacoon_shortcut.lua b/data-otservbr-global/scripts/quests/a_pirates_tail/actions_rascacoon_shortcut.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/a_pirates_tail/rascacoon_shortcut.lua rename to data-otservbr-global/scripts/quests/a_pirates_tail/actions_rascacoon_shortcut.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/a_pirates_tail/a_pirates_tail_bosses.lua b/data-otservbr-global/scripts/quests/a_pirates_tail/creaturescripts_a_pirates_tail_bosses.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/a_pirates_tail/a_pirates_tail_bosses.lua rename to data-otservbr-global/scripts/quests/a_pirates_tail/creaturescripts_a_pirates_tail_bosses.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/a_pirates_tail/ratmiral_death.lua b/data-otservbr-global/scripts/quests/a_pirates_tail/creaturescripts_ratmiral_death.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/a_pirates_tail/ratmiral_death.lua rename to data-otservbr-global/scripts/quests/a_pirates_tail/creaturescripts_ratmiral_death.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/a_pirates_tail/tentugly_death.lua b/data-otservbr-global/scripts/quests/a_pirates_tail/creaturescripts_tentugly_death.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/a_pirates_tail/tentugly_death.lua rename to data-otservbr-global/scripts/quests/a_pirates_tail/creaturescripts_tentugly_death.lua diff --git a/data-otservbr-global/scripts/actions/quests/adventurers_guild/treasure.lua b/data-otservbr-global/scripts/quests/adventurers_guild/actions_treasure.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/adventurers_guild/treasure.lua rename to data-otservbr-global/scripts/quests/adventurers_guild/actions_treasure.lua diff --git a/data-otservbr-global/scripts/actions/quests/adventurers_guild/warrior_skeleton.lua b/data-otservbr-global/scripts/quests/adventurers_guild/actions_warrior_skeleton.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/adventurers_guild/warrior_skeleton.lua rename to data-otservbr-global/scripts/quests/adventurers_guild/actions_warrior_skeleton.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/adventurers_guild/the_great_dragon_hunt.lua b/data-otservbr-global/scripts/quests/adventurers_guild/creaturescripts_the_great_dragon_hunt.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/adventurers_guild/the_great_dragon_hunt.lua rename to data-otservbr-global/scripts/quests/adventurers_guild/creaturescripts_the_great_dragon_hunt.lua diff --git a/data-otservbr-global/scripts/actions/quests/adventures_of_galthen/galthens_tree.lua b/data-otservbr-global/scripts/quests/adventures_of_galthen/actions_galthens_tree.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/adventures_of_galthen/galthens_tree.lua rename to data-otservbr-global/scripts/quests/adventures_of_galthen/actions_galthens_tree.lua diff --git a/data-otservbr-global/scripts/actions/quests/adventures_of_galthen/idol_of_tukh.lua b/data-otservbr-global/scripts/quests/adventures_of_galthen/actions_idol_of_tukh.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/adventures_of_galthen/idol_of_tukh.lua rename to data-otservbr-global/scripts/quests/adventures_of_galthen/actions_idol_of_tukh.lua diff --git a/data-otservbr-global/scripts/actions/quests/adventures_of_galthen/iksupan_entrance.lua b/data-otservbr-global/scripts/quests/adventures_of_galthen/actions_iksupan_entrance.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/adventures_of_galthen/iksupan_entrance.lua rename to data-otservbr-global/scripts/quests/adventures_of_galthen/actions_iksupan_entrance.lua diff --git a/data-otservbr-global/scripts/actions/quests/adventures_of_galthen/iksupan_exit.lua b/data-otservbr-global/scripts/quests/adventures_of_galthen/actions_iksupan_exit.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/adventures_of_galthen/iksupan_exit.lua rename to data-otservbr-global/scripts/quests/adventures_of_galthen/actions_iksupan_exit.lua diff --git a/data-otservbr-global/scripts/actions/quests/adventures_of_galthen/yselda_entrances.lua b/data-otservbr-global/scripts/quests/adventures_of_galthen/actions_yselda_entrances.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/adventures_of_galthen/yselda_entrances.lua rename to data-otservbr-global/scripts/quests/adventures_of_galthen/actions_yselda_entrances.lua diff --git a/data-otservbr-global/scripts/actions/quests/adventures_of_galthen/yselda_shortcut.lua b/data-otservbr-global/scripts/quests/adventures_of_galthen/actions_yselda_shortcut.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/adventures_of_galthen/yselda_shortcut.lua rename to data-otservbr-global/scripts/quests/adventures_of_galthen/actions_yselda_shortcut.lua diff --git a/data-otservbr-global/scripts/actions/quests/an_uneasy_alliance/crystal_ball.lua b/data-otservbr-global/scripts/quests/an_uneasy_alliance/actions_crystal_ball.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/an_uneasy_alliance/crystal_ball.lua rename to data-otservbr-global/scripts/quests/an_uneasy_alliance/actions_crystal_ball.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/an_uneasy_alliance/renegade_orc_kill.lua b/data-otservbr-global/scripts/quests/an_uneasy_alliance/creaturescripts_renegade_orc_kill.lua similarity index 62% rename from data-otservbr-global/scripts/creaturescripts/quests/an_uneasy_alliance/renegade_orc_kill.lua rename to data-otservbr-global/scripts/quests/an_uneasy_alliance/creaturescripts_renegade_orc_kill.lua index dbff7a11b45..8d1ecd7810b 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/an_uneasy_alliance/renegade_orc_kill.lua +++ b/data-otservbr-global/scripts/quests/an_uneasy_alliance/creaturescripts_renegade_orc_kill.lua @@ -1,10 +1,12 @@ local renegadeOrcKill = CreatureEvent("RenegadeOrcDeath") -function renegadeOrcKill.onDeath(creature, _corpse, _lastHitKiller, player, mostDamageKiller) - onDeathForParty(creature, mostDamageKiller, function(creature, player) + +function renegadeOrcKill.onDeath(creature) + onDeathForDamagingPlayers(creature, function(creature, player) if player:getStorageValue(Storage.Quest.U8_54.AnUneasyAlliance.QuestDoor) == 0 then player:setStorageValue(Storage.Quest.U8_54.AnUneasyAlliance.QuestDoor, 1) end end) + return true end diff --git a/data-otservbr-global/scripts/movements/quests/assassin_outfit/erayo_house.lua b/data-otservbr-global/scripts/quests/assassin_outfit/movements_erayo_house.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/assassin_outfit/erayo_house.lua rename to data-otservbr-global/scripts/quests/assassin_outfit/movements_erayo_house.lua diff --git a/data-otservbr-global/scripts/actions/quests/barbarian_test/horn.lua b/data-otservbr-global/scripts/quests/barbarian_test/action_horn.lua similarity index 58% rename from data-otservbr-global/scripts/actions/quests/barbarian_test/horn.lua rename to data-otservbr-global/scripts/quests/barbarian_test/action_horn.lua index e4a98d2ce85..5ed2c03e740 100644 --- a/data-otservbr-global/scripts/actions/quests/barbarian_test/horn.lua +++ b/data-otservbr-global/scripts/quests/barbarian_test/action_horn.lua @@ -3,21 +3,24 @@ local function sendSleepEffect(position) end local barbarianHorn = Action() + function barbarianHorn.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if target.uid == 3110 and item.itemid == 7140 then + if item.itemid == 7140 and Tile(Position(32201, 31154, 7)):getItemById(7142) then player:say("You fill your horn with ale.", TALKTYPE_MONSTER_SAY) item:transform(7141) toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) - elseif target.itemid == 7174 and item.itemid == 7141 then - player:say("The bear is now unconcious.", TALKTYPE_MONSTER_SAY) - item:transform(7140) - target:transform(7175) - toPosition:sendMagicEffect(CONST_ME_STUN) + elseif item.itemid == 7141 and Tile(Position(32253, 31049, 5)):getItemById(7174) then + local targetItem = Tile(Position(32253, 31049, 5)):getItemById(7174) + if targetItem then + player:say("The bear is now unconscious.", TALKTYPE_MONSTER_SAY) + targetItem:transform(7175) + toPosition:sendMagicEffect(CONST_ME_STUN) + end elseif item.itemid == 7175 then - if player:getStorageValue(Storage.BarbarianTest.Questline) == 4 then + if player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) == 4 then player:say("You hug the unconcious bear.", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.BarbarianTest.Questline, 5) - player:setStorageValue(Storage.BarbarianTest.Mission02, 2) -- Questlog Barbarian Test Quest Barbarian Test 2: The Bear Hugging + player:setStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline, 5) + player:setStorageValue(Storage.Quest.U8_0.BarbarianTest.Mission02, 2) -- Questlog Barbarian Test Quest Barbarian Test 2: The Bear Hugging player:addAchievement("Bearhugger") item:transform(7174) toPosition:sendMagicEffect(CONST_ME_SLEEP) @@ -29,11 +32,11 @@ function barbarianHorn.onUse(player, item, fromPosition, target, toPosition, isH player:say("The bear is not amused by the disturbance.", TALKTYPE_MONSTER_SAY) doAreaCombatHealth(player, COMBAT_PHYSICALDAMAGE, player:getPosition(), 0, -10, -30, CONST_ME_POFF) elseif item.itemid == 7176 then - if player:getStorageValue(Storage.BarbarianTest.Questline) == 6 then + if player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) == 6 then if player:getCondition(CONDITION_DRUNK) then player:say("You hustle the mammoth. What a fun. *hicks*.", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.BarbarianTest.Questline, 7) - player:setStorageValue(Storage.BarbarianTest.Mission03, 2) -- Questlog Barbarian Test Quest Barbarian Test 3: The Mammoth Pushing + player:setStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline, 7) + player:setStorageValue(Storage.Quest.U8_0.BarbarianTest.Mission03, 2) -- Questlog Barbarian Test Quest Barbarian Test 3: The Mammoth Pushing item:transform(7177) item:decay() addEvent(sendSleepEffect, 60 * 1000, toPosition) diff --git a/data-otservbr-global/scripts/quests/barbarian_test/action_mead.lua b/data-otservbr-global/scripts/quests/barbarian_test/action_mead.lua new file mode 100644 index 00000000000..2ad86677a7b --- /dev/null +++ b/data-otservbr-global/scripts/quests/barbarian_test/action_mead.lua @@ -0,0 +1,34 @@ +local condition = Condition(CONDITION_OUTFIT) +condition:setOutfit({ lookTypeEx = 111 }) +condition:setTicks(1000) +local barbarianMead = Action() +function barbarianMead.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) == 2 and player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.MeadTotalSips) <= 20 then + if math.random(5) > 1 then + player:say("The world seems to spin but you manage to stay on your feet.", TALKTYPE_MONSTER_SAY) + player:setStorageValue(Storage.Quest.U8_0.BarbarianTest.MeadSuccessSips, player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.MeadSuccessSips) + 1) + if player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.MeadSuccessSips) == 9 then -- 9 sips here cause local player at start + player:say("10 sips in a row. Yeah!", TALKTYPE_MONSTER_SAY) + player:setStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline, 3) + player:setStorageValue(Storage.Quest.U8_0.BarbarianTest.Mission01, 3) -- Questlog Barbarian Test Quest Barbarian Test 1: Barbarian Booze + return true + end + else + player:say("The mead was too strong. You passed out for a moment.", TALKTYPE_MONSTER_SAY) + player:addCondition(condition) + player:getPosition():sendMagicEffect(CONST_ME_HITBYPOISON) + player:setStorageValue(Storage.Quest.U8_0.BarbarianTest.MeadSuccessSips, 0) + end + player:setStorageValue(Storage.Quest.U8_0.BarbarianTest.MeadTotalSips, player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.MeadTotalSips) + 1) + elseif player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.MeadTotalSips) > 20 then + player:say("Ask Sven for another round.", TALKTYPE_MONSTER_SAY) + player:setStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline, 1) + player:setStorageValue(Storage.Quest.U8_0.BarbarianTest.Mission01, 1) -- Questlog Barbarian Test Quest Barbarian Test 1: Barbarian Booze + elseif player:getStorageValue(Storage.Quest.U8_0.BarbarianTest.Questline) >= 3 then + player:say("You already passed the test, no need to torture yourself anymore.", TALKTYPE_MONSTER_SAY) + end + return true +end + +barbarianMead:position({ x = 32201, y = 31154, z = 7 }) +barbarianMead:register() diff --git a/data-otservbr-global/scripts/actions/quests/bigfoot_burden/beer.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_beer.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/bigfoot_burden/beer.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/actions_beer.lua diff --git a/data-otservbr-global/scripts/actions/quests/bigfoot_burden/crystal.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_crystal.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/bigfoot_burden/crystal.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/actions_crystal.lua diff --git a/data-otservbr-global/scripts/actions/quests/bigfoot_burden/extractor.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_extractor.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/bigfoot_burden/extractor.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/actions_extractor.lua diff --git a/data-otservbr-global/scripts/actions/quests/bigfoot_burden/matchmaker.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_matchmaker.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/bigfoot_burden/matchmaker.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/actions_matchmaker.lua diff --git a/data-otservbr-global/scripts/actions/quests/bigfoot_burden/mouthpiece.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_mouthpiece.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/bigfoot_burden/mouthpiece.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/actions_mouthpiece.lua diff --git a/data-otservbr-global/scripts/actions/quests/bigfoot_burden/mushroom.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_mushroom.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/bigfoot_burden/mushroom.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/actions_mushroom.lua diff --git a/data-otservbr-global/scripts/actions/quests/bigfoot_burden/music.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_music.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/bigfoot_burden/music.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/actions_music.lua diff --git a/data-otservbr-global/scripts/actions/quests/bigfoot_burden/package.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_package.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/bigfoot_burden/package.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/actions_package.lua diff --git a/data-otservbr-global/scripts/actions/quests/bigfoot_burden/pig.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_pig.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/bigfoot_burden/pig.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/actions_pig.lua diff --git a/data-otservbr-global/scripts/actions/quests/bigfoot_burden/repair.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_repair.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/bigfoot_burden/repair.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/actions_repair.lua diff --git a/data-otservbr-global/scripts/actions/quests/bigfoot_burden/rewards.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_rewards.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/bigfoot_burden/rewards.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/actions_rewards.lua diff --git a/data-otservbr-global/scripts/actions/quests/bigfoot_burden/shooting.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_shooting.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/bigfoot_burden/shooting.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/actions_shooting.lua diff --git a/data-otservbr-global/scripts/actions/quests/bigfoot_burden/spores.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_spores.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/bigfoot_burden/spores.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/actions_spores.lua diff --git a/data-otservbr-global/scripts/actions/quests/bigfoot_burden/stone.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_stone.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/bigfoot_burden/stone.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/actions_stone.lua diff --git a/data-otservbr-global/scripts/actions/quests/bigfoot_burden/warzone1_crystal.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_warzone1_crystal.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/bigfoot_burden/warzone1_crystal.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/actions_warzone1_crystal.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/bigfoot_burden/boss_room_kick.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/creaturescripts_boss_room_kick.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/bigfoot_burden/boss_room_kick.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/creaturescripts_boss_room_kick.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/bigfoot_burden/bosses_warzone.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/creaturescripts_bosses_warzone.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/bigfoot_burden/bosses_warzone.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/creaturescripts_bosses_warzone.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/bigfoot_burden/parasite.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/creaturescripts_parasite.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/bigfoot_burden/parasite.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/creaturescripts_parasite.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/bigfoot_burden/versperoth_kill.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/creaturescripts_versperoth_kill.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/bigfoot_burden/versperoth_kill.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/creaturescripts_versperoth_kill.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/bigfoot_burden/wiggler_kill.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/creaturescripts_wiggler_kill.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/bigfoot_burden/wiggler_kill.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/creaturescripts_wiggler_kill.lua diff --git a/data-otservbr-global/scripts/movements/quests/bigfoot_burden/gnomebase_teleport.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/movements_gnomebase_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/bigfoot_burden/gnomebase_teleport.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/movements_gnomebase_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/bigfoot_burden/task_ear.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/movements_task_ear.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/bigfoot_burden/task_ear.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/movements_task_ear.lua diff --git a/data-otservbr-global/scripts/movements/quests/bigfoot_burden/task_endurance.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/movements_task_endurance.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/bigfoot_burden/task_endurance.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/movements_task_endurance.lua diff --git a/data-otservbr-global/scripts/movements/quests/bigfoot_burden/task_shooting.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/movements_task_shooting.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/bigfoot_burden/task_shooting.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/movements_task_shooting.lua diff --git a/data-otservbr-global/scripts/movements/quests/bigfoot_burden/task_truffles.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/movements_task_truffles.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/bigfoot_burden/task_truffles.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/movements_task_truffles.lua diff --git a/data-otservbr-global/scripts/movements/quests/bigfoot_burden/task_x_ray.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/movements_task_x_ray.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/bigfoot_burden/task_x_ray.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/movements_task_x_ray.lua diff --git a/data-otservbr-global/scripts/movements/quests/bigfoot_burden/versperoth_spawn.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/movements_versperoth_spawn.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/bigfoot_burden/versperoth_spawn.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/movements_versperoth_spawn.lua diff --git a/data-otservbr-global/scripts/movements/quests/bigfoot_burden/warzone_boss.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/movements_warzone_boss.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/bigfoot_burden/warzone_boss.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/movements_warzone_boss.lua diff --git a/data-otservbr-global/scripts/movements/quests/bigfoot_burden/warzone_teleport.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/movements_warzone_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/bigfoot_burden/warzone_teleport.lua rename to data-otservbr-global/scripts/quests/bigfoot_burden/movements_warzone_teleport.lua diff --git a/data-otservbr-global/scripts/actions/quests/chayenne_realm/lever.lua b/data-otservbr-global/scripts/quests/chayenne_realm/actions_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/chayenne_realm/lever.lua rename to data-otservbr-global/scripts/quests/chayenne_realm/actions_lever.lua diff --git a/data-otservbr-global/scripts/actions/quests/chayenne_realm/reward.lua b/data-otservbr-global/scripts/quests/chayenne_realm/actions_reward.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/chayenne_realm/reward.lua rename to data-otservbr-global/scripts/quests/chayenne_realm/actions_reward.lua diff --git a/data-otservbr-global/scripts/movements/quests/chayenne_realm/enter_realm.lua b/data-otservbr-global/scripts/quests/chayenne_realm/movements_enter_realm.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/chayenne_realm/enter_realm.lua rename to data-otservbr-global/scripts/quests/chayenne_realm/movements_enter_realm.lua diff --git a/data-otservbr-global/scripts/quests/children_of_the_revolution/actions_mission3_chest.lua b/data-otservbr-global/scripts/quests/children_of_the_revolution/actions_mission3_chest.lua new file mode 100644 index 00000000000..4f0aa47bdfa --- /dev/null +++ b/data-otservbr-global/scripts/quests/children_of_the_revolution/actions_mission3_chest.lua @@ -0,0 +1,16 @@ +local childrenMission3 = Action() + +function childrenMission3.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline) == 9 then + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline, 10) + player:addItem(10183, 1) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a flask of poison.") + else + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The chest is empty.") + end + + return true +end + +childrenMission3:uid(3164) +childrenMission3:register() diff --git a/data-otservbr-global/scripts/actions/quests/children_of_the_revolution/mission3_poison_water.lua b/data-otservbr-global/scripts/quests/children_of_the_revolution/actions_mission3_poison_water.lua similarity index 56% rename from data-otservbr-global/scripts/actions/quests/children_of_the_revolution/mission3_poison_water.lua rename to data-otservbr-global/scripts/quests/children_of_the_revolution/actions_mission3_poison_water.lua index e45bfeda7b7..9d958cac389 100644 --- a/data-otservbr-global/scripts/actions/quests/children_of_the_revolution/mission3_poison_water.lua +++ b/data-otservbr-global/scripts/quests/children_of_the_revolution/actions_mission3_poison_water.lua @@ -4,9 +4,9 @@ function childrenPoison.onUse(player, item, fromPosition, target, toPosition, is return false end - if player:getStorageValue(Storage.ChildrenoftheRevolution.Questline) == 10 then - player:setStorageValue(Storage.ChildrenoftheRevolution.Questline, 11) - player:setStorageValue(Storage.ChildrenoftheRevolution.Mission03, 2) --Questlog, Children of the Revolution "Mission 3: Zee Killing Fieldzz" + if player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline) == 10 then + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline, 11) + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission03, 2) --Questlog, Children of the Revolution "Mission 3: Zee Killing Fieldzz" item:remove() player:say("The rice has been poisoned. This will weaken the Emperor's army significantly. Return and tell Zalamon about your success.", TALKTYPE_MONSTER_SAY) end diff --git a/data-otservbr-global/scripts/actions/quests/children_of_the_revolution/mission4_grease_oil.lua b/data-otservbr-global/scripts/quests/children_of_the_revolution/actions_mission4_grease_oil.lua similarity index 51% rename from data-otservbr-global/scripts/actions/quests/children_of_the_revolution/mission4_grease_oil.lua rename to data-otservbr-global/scripts/quests/children_of_the_revolution/actions_mission4_grease_oil.lua index d392557dc34..b85d537ac88 100644 --- a/data-otservbr-global/scripts/actions/quests/children_of_the_revolution/mission4_grease_oil.lua +++ b/data-otservbr-global/scripts/quests/children_of_the_revolution/actions_mission4_grease_oil.lua @@ -1,12 +1,13 @@ local childrenGrease = Action() + function childrenGrease.onUse(player, item, fromPosition, target, toPosition, isHotkey) if target.actionid ~= 8013 then return false end - if player:getStorageValue(Storage.ChildrenoftheRevolution.Questline) == 13 then - player:setStorageValue(Storage.ChildrenoftheRevolution.Questline, 14) - player:setStorageValue(Storage.ChildrenoftheRevolution.Mission04, 4) --Questlog, Children of the Revolution "Mission 4: Zze Way of Zztonezz" + if player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline) == 13 then + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline, 14) + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission04, 4) --Questlog, Children of the Revolution "Mission 4: Zze Way of Zztonezz" item:remove() player:say("Due to being extra greasy, the leavers can now be moved.", TALKTYPE_MONSTER_SAY) end diff --git a/data-otservbr-global/scripts/actions/quests/children_of_the_revolution/mission4_levers_puzzle.lua b/data-otservbr-global/scripts/quests/children_of_the_revolution/actions_mission4_levers_puzzle.lua similarity index 89% rename from data-otservbr-global/scripts/actions/quests/children_of_the_revolution/mission4_levers_puzzle.lua rename to data-otservbr-global/scripts/quests/children_of_the_revolution/actions_mission4_levers_puzzle.lua index e25116b1f11..4ffad53435d 100644 --- a/data-otservbr-global/scripts/actions/quests/children_of_the_revolution/mission4_levers_puzzle.lua +++ b/data-otservbr-global/scripts/quests/children_of_the_revolution/actions_mission4_levers_puzzle.lua @@ -18,7 +18,7 @@ local function revertLever(fromPosition) end local childrenGrease = Action() function childrenGrease.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.ChildrenoftheRevolution.Questline) == 14 then + if player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline) == 14 then if fromPosition == Position(33349, 31123, 5) or fromPosition == Position(33349, 31124, 5) then puzzle(puzzlePositions[1], 9935, 9933) puzzle(puzzlePositions[2], 9936, 9937) @@ -38,8 +38,8 @@ function childrenGrease.onUse(player, item, fromPosition, target, toPosition, is end if Tile(puzzlePositions[1]):getItemById(9933) and Tile(puzzlePositions[2]):getItemById(9936) and Tile(puzzlePositions[3]):getItemById(9939) and Tile(puzzlePositions[4]):getItemById(9938) then player:say("After a cracking noise a deep humming suddenly starts from somewhere below.", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.ChildrenoftheRevolution.Questline, 17) - player:setStorageValue(Storage.ChildrenoftheRevolution.Mission04, 5) + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline, 17) + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission04, 5) end item:transform(item.itemid == 9125 and 9126 or 9125) if Tile(fromPosition):getItemById(9126) then diff --git a/data-otservbr-global/scripts/actions/quests/children_of_the_revolution/zalamon_door.lua b/data-otservbr-global/scripts/quests/children_of_the_revolution/actions_zalamon_door.lua similarity index 87% rename from data-otservbr-global/scripts/actions/quests/children_of_the_revolution/zalamon_door.lua rename to data-otservbr-global/scripts/quests/children_of_the_revolution/actions_zalamon_door.lua index 82932833c41..ecb3ecd9843 100644 --- a/data-otservbr-global/scripts/actions/quests/children_of_the_revolution/zalamon_door.lua +++ b/data-otservbr-global/scripts/quests/children_of_the_revolution/actions_zalamon_door.lua @@ -3,7 +3,7 @@ local TheNewFrontier = Storage.Quest.U8_54.TheNewFrontier local childrenZalamon = Action() function childrenZalamon.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(TheNewFrontier.Mission08) >= 2 and player:getStorageValue(Storage.WrathoftheEmperor.Mission11) < 2 then + if player:getStorageValue(TheNewFrontier.Mission08) >= 2 and player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission11) < 2 then if item.itemid == 9874 then player:teleportTo(toPosition, true) item:transform(item.itemid + 1) diff --git a/data-otservbr-global/scripts/movements/quests/children_of_the_revolution/click.lua b/data-otservbr-global/scripts/quests/children_of_the_revolution/movements_click.lua similarity index 83% rename from data-otservbr-global/scripts/movements/quests/children_of_the_revolution/click.lua rename to data-otservbr-global/scripts/quests/children_of_the_revolution/movements_click.lua index b2a7bde94f2..c8571cdf5a0 100644 --- a/data-otservbr-global/scripts/movements/quests/children_of_the_revolution/click.lua +++ b/data-otservbr-global/scripts/quests/children_of_the_revolution/movements_click.lua @@ -22,7 +22,7 @@ local config = { } function doClearMissionArea() - Game.setStorageValue(Storage.ChildrenoftheRevolution.Mission05, -1) + Game.setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission05, -1) local spectators, spectator = Game.getSpectators(config.areaCenter, false, true, 26, 26, 20, 20) for i = 1, #spectators do @@ -30,8 +30,8 @@ function doClearMissionArea() if spectator:isPlayer() then spectator:teleportTo(config.zalamonPosition) spectator:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - if spectator:getStorageValue(Storage.ChildrenoftheRevolution.Questline) == 19 then - spectator:setStorageValue(Storage.ChildrenoftheRevolution.Questline, 20) + if spectator:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline) == 19 then + spectator:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline, 20) end else spectator:remove() @@ -66,7 +66,7 @@ function click.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.ChildrenoftheRevolution.Questline) ~= 19 or Game.getStorageValue(Storage.ChildrenoftheRevolution.Mission05) == 1 then + if player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline) ~= 19 or Game.getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission05) == 1 then return true end @@ -92,7 +92,7 @@ function click.onStepIn(creature, item, position, fromPosition) if stair then stair:transform(1977) end - Game.setStorageValue(Storage.ChildrenoftheRevolution.Mission05, 1) + Game.setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission05, 1) for wave = 1, #config.waves do addEvent(summonWave, wave * 30 * 1000, wave) diff --git a/data-otservbr-global/scripts/movements/quests/children_of_the_revolution/spy.lua b/data-otservbr-global/scripts/quests/children_of_the_revolution/movements_spy.lua similarity index 70% rename from data-otservbr-global/scripts/movements/quests/children_of_the_revolution/spy.lua rename to data-otservbr-global/scripts/quests/children_of_the_revolution/movements_spy.lua index 2f57f794100..f96a613927b 100644 --- a/data-otservbr-global/scripts/movements/quests/children_of_the_revolution/spy.lua +++ b/data-otservbr-global/scripts/quests/children_of_the_revolution/movements_spy.lua @@ -1,14 +1,14 @@ local config = { [8009] = { - storage = Storage.ChildrenoftheRevolution.SpyBuilding01, + storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.SpyBuilding01, text = "An impressive ammount of fish is stored here.", }, [8010] = { - storage = Storage.ChildrenoftheRevolution.SpyBuilding02, + storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.SpyBuilding02, text = "A seemingly endless array of weapon stretches before you into the darkness.", }, [8011] = { - storage = Storage.ChildrenoftheRevolution.SpyBuilding03, + storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.SpyBuilding03, text = "These barracks seem to be home for quite a lot of soldiers.", }, } @@ -28,7 +28,7 @@ function spy.onStepIn(creature, item, position, fromPosition) if player:getStorageValue(targetTile.storage) < 1 then --Questlog, Children of the Revolution "Mission 2: Imperial Zzecret Weaponzz" - player:setStorageValue(Storage.ChildrenoftheRevolution.Mission02, player:getStorageValue(Storage.ChildrenoftheRevolution.Mission02) + 1) + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission02, player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission02) + 1) player:setStorageValue(targetTile.storage, 1) player:say(targetTile.text, TALKTYPE_MONSTER_SAY) end diff --git a/data-otservbr-global/scripts/movements/quests/children_of_the_revolution/stair.lua b/data-otservbr-global/scripts/quests/children_of_the_revolution/movements_stair.lua similarity index 82% rename from data-otservbr-global/scripts/movements/quests/children_of_the_revolution/stair.lua rename to data-otservbr-global/scripts/quests/children_of_the_revolution/movements_stair.lua index 9fe3e6db9ba..38566a32901 100644 --- a/data-otservbr-global/scripts/movements/quests/children_of_the_revolution/stair.lua +++ b/data-otservbr-global/scripts/quests/children_of_the_revolution/movements_stair.lua @@ -24,9 +24,9 @@ function stair.onStepIn(creature, item, position, fromPosition) end player:say("The area around the gate is suspiciously quiet, you have a bad feeling about this.", TALKTYPE_MONSTER_SAY) - if player:getStorageValue(Storage.ChildrenoftheRevolution.Mission05) == 1 then + if player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission05) == 1 then --Questlog, Children of the Revolution 'Mission 5: Phantom Army' - player:setStorageValue(Storage.ChildrenoftheRevolution.Mission05, 2) + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission05, 2) end return true end diff --git a/data-otservbr-global/scripts/movements/quests/children_of_the_revolution/symbol.lua b/data-otservbr-global/scripts/quests/children_of_the_revolution/movements_symbol.lua similarity index 56% rename from data-otservbr-global/scripts/movements/quests/children_of_the_revolution/symbol.lua rename to data-otservbr-global/scripts/quests/children_of_the_revolution/movements_symbol.lua index ac12a11b0c1..592973a78d0 100644 --- a/data-otservbr-global/scripts/movements/quests/children_of_the_revolution/symbol.lua +++ b/data-otservbr-global/scripts/quests/children_of_the_revolution/movements_symbol.lua @@ -6,10 +6,10 @@ function symbol.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.ChildrenoftheRevolution.StrangeSymbols) < 1 and player:getStorageValue(Storage.ChildrenoftheRevolution.Mission03) >= 2 then + if player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.StrangeSymbols) < 1 and player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission03) >= 2 then --Questlog, Children of the Revolution 'Mission 4: Zze Way of Zztonezz' - player:setStorageValue(Storage.ChildrenoftheRevolution.Mission04, 2) - player:setStorageValue(Storage.ChildrenoftheRevolution.StrangeSymbols, 1) + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission04, 2) + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.StrangeSymbols, 1) player:say("A part of the floor before you displays an arrangement of strange symbols.", TALKTYPE_MONSTER_SAY) end return true diff --git a/data-otservbr-global/scripts/movements/quests/children_of_the_revolution/teleport.lua b/data-otservbr-global/scripts/quests/children_of_the_revolution/movements_teleport.lua similarity index 89% rename from data-otservbr-global/scripts/movements/quests/children_of_the_revolution/teleport.lua rename to data-otservbr-global/scripts/quests/children_of_the_revolution/movements_teleport.lua index 50148b07d2f..004d7fb8b45 100644 --- a/data-otservbr-global/scripts/movements/quests/children_of_the_revolution/teleport.lua +++ b/data-otservbr-global/scripts/quests/children_of_the_revolution/movements_teleport.lua @@ -10,7 +10,7 @@ function teleport.onStepIn(creature, item, position, fromPosition) if not creature or not player then return true end - if player:getStorageValue(Storage.ChildrenoftheRevolution.teleportAccess) == 1 then + if player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.teleportAccess) == 1 then if player:getPosition() == Position(positions[1]) then player:teleportTo(Position(33261, 31077, 8)) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) diff --git a/data-otservbr-global/scripts/movements/quests/children_of_the_revolution/temple.lua b/data-otservbr-global/scripts/quests/children_of_the_revolution/movements_temple.lua similarity index 63% rename from data-otservbr-global/scripts/movements/quests/children_of_the_revolution/temple.lua rename to data-otservbr-global/scripts/quests/children_of_the_revolution/movements_temple.lua index c178493a27d..eb1a0d84138 100644 --- a/data-otservbr-global/scripts/movements/quests/children_of_the_revolution/temple.lua +++ b/data-otservbr-global/scripts/quests/children_of_the_revolution/movements_temple.lua @@ -6,10 +6,10 @@ function temple.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.ChildrenoftheRevolution.Questline) == 4 then + if player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline) == 4 then --Questlog, Children of the Revolution 'Mission 1: Corruption' - player:setStorageValue(Storage.ChildrenoftheRevolution.Mission01, 2) - player:setStorageValue(Storage.ChildrenoftheRevolution.Questline, 5) + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission01, 2) + player:setStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline, 5) player:say("The temple has been corrupted and is lost. Zalamon should be informed about this as soon as possible.", TALKTYPE_MONSTER_SAY) end return true diff --git a/data-otservbr-global/scripts/actions/quests/cults_of_tibia/analyser.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/actions_analyser.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/cults_of_tibia/analyser.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/actions_analyser.lua diff --git a/data-otservbr-global/scripts/actions/quests/cults_of_tibia/bosses_levers.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/actions_bosses_levers.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/cults_of_tibia/bosses_levers.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/actions_bosses_levers.lua diff --git a/data-otservbr-global/scripts/actions/quests/cults_of_tibia/counter_agent.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/actions_counter_agent.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/cults_of_tibia/counter_agent.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/actions_counter_agent.lua diff --git a/data-otservbr-global/scripts/actions/quests/cults_of_tibia/crate.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/actions_crate.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/cults_of_tibia/crate.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/actions_crate.lua diff --git a/data-otservbr-global/scripts/actions/quests/cults_of_tibia/cult_symbol.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/actions_cult_symbol.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/cults_of_tibia/cult_symbol.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/actions_cult_symbol.lua diff --git a/data-otservbr-global/scripts/actions/quests/cults_of_tibia/document.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/actions_document.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/cults_of_tibia/document.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/actions_document.lua diff --git a/data-otservbr-global/scripts/actions/quests/cults_of_tibia/last_object.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/actions_last_object.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/cults_of_tibia/last_object.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/actions_last_object.lua diff --git a/data-otservbr-global/scripts/actions/quests/cults_of_tibia/lever_mota.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/actions_lever_mota.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/cults_of_tibia/lever_mota.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/actions_lever_mota.lua diff --git a/data-otservbr-global/scripts/actions/quests/cults_of_tibia/magnifier.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/actions_magnifier.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/cults_of_tibia/magnifier.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/actions_magnifier.lua diff --git a/data-otservbr-global/scripts/actions/quests/cults_of_tibia/misguided.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/actions_misguided.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/cults_of_tibia/misguided.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/actions_misguided.lua diff --git a/data-otservbr-global/scripts/actions/quests/cults_of_tibia/torch.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/actions_torch.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/cults_of_tibia/torch.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/actions_torch.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/bosses_mission_cults.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_bosses_mission_cults.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/bosses_mission_cults.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_bosses_mission_cults.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/carlin_vortex_spawn.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_carlin_vortex_spawn.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/carlin_vortex_spawn.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_carlin_vortex_spawn.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/check_tile.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_check_tile.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/check_tile.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_check_tile.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/destroyed_pillar.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_destroyed_pillar.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/destroyed_pillar.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_destroyed_pillar.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/essence_of_malice.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_essence_of_malice.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/essence_of_malice.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_essence_of_malice.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/evaporate.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_evaporate.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/evaporate.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_evaporate.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/glowing_rubbish_amulet.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_glowing_rubbish_amulet.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/glowing_rubbish_amulet.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_glowing_rubbish_amulet.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/leiden_heal.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_leiden_heal.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/leiden_heal.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_leiden_heal.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/machine.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_machine.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/machine.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_machine.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/minotaur_task_count.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_minotaur_task_count.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/minotaur_task_count.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_minotaur_task_count.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/pillar_health.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_pillar_health.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/pillar_health.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_pillar_health.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/sandking.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_sandking.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/sandking.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_sandking.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/spawn_boss.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_spawn_boss.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/spawn_boss.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_spawn_boss.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/splash.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_splash.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/splash.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_splash.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/zarcorix_reflect_damage.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_zarcorix_reflect_damage.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/zarcorix_reflect_damage.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/creaturescripts_zarcorix_reflect_damage.lua diff --git a/data-otservbr-global/scripts/movements/quests/cults_of_tibia/begin_task.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/movements_begin_task.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/cults_of_tibia/begin_task.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/movements_begin_task.lua diff --git a/data-otservbr-global/scripts/movements/quests/cults_of_tibia/boss_timer.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/movements_boss_timer.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/cults_of_tibia/boss_timer.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/movements_boss_timer.lua diff --git a/data-otservbr-global/scripts/movements/quests/cults_of_tibia/check_oasis.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/movements_check_oasis.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/cults_of_tibia/check_oasis.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/movements_check_oasis.lua diff --git a/data-otservbr-global/scripts/movements/quests/cults_of_tibia/energy_fence.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/movements_energy_fence.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/cults_of_tibia/energy_fence.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/movements_energy_fence.lua diff --git a/data-otservbr-global/scripts/movements/quests/cults_of_tibia/geyser.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/movements_geyser.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/cults_of_tibia/geyser.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/movements_geyser.lua diff --git a/data-otservbr-global/scripts/movements/quests/cults_of_tibia/ice.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/movements_ice.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/cults_of_tibia/ice.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/movements_ice.lua diff --git a/data-otservbr-global/scripts/movements/quests/cults_of_tibia/ice_death.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/movements_ice_death.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/cults_of_tibia/ice_death.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/movements_ice_death.lua diff --git a/data-otservbr-global/scripts/movements/quests/cults_of_tibia/looktype.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/movements_looktype.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/cults_of_tibia/looktype.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/movements_looktype.lua diff --git a/data-otservbr-global/scripts/movements/quests/cults_of_tibia/movement-cults-of-carlin-teleport.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/movements_movement-cults-of-carlin-teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/cults_of_tibia/movement-cults-of-carlin-teleport.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/movements_movement-cults-of-carlin-teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/cults_of_tibia/orc_teleport.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/movements_orc_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/cults_of_tibia/orc_teleport.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/movements_orc_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/cults_of_tibia/river_teleport.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/movements_river_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/cults_of_tibia/river_teleport.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/movements_river_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/cults_of_tibia/sand_entrance.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/movements_sand_entrance.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/cults_of_tibia/sand_entrance.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/movements_sand_entrance.lua diff --git a/data-otservbr-global/scripts/movements/quests/cults_of_tibia/sandking.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/movements_sandking.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/cults_of_tibia/sandking.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/movements_sandking.lua diff --git a/data-otservbr-global/scripts/movements/quests/cults_of_tibia/tar.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/movements_tar.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/cults_of_tibia/tar.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/movements_tar.lua diff --git a/data-otservbr-global/scripts/movements/quests/cults_of_tibia/task_teleport.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/movements_task_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/cults_of_tibia/task_teleport.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/movements_task_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/cults_of_tibia/teleport_from_essence_of_malice.lua b/data-otservbr-global/scripts/quests/cults_of_tibia/movements_teleport_from_essence_of_malice.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/cults_of_tibia/teleport_from_essence_of_malice.lua rename to data-otservbr-global/scripts/quests/cults_of_tibia/movements_teleport_from_essence_of_malice.lua diff --git a/data-otservbr-global/scripts/actions/quests/dangerous_depth/crude_lava_pump.lua b/data-otservbr-global/scripts/quests/dangerous_depth/actions_crude_lava_pump.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/dangerous_depth/crude_lava_pump.lua rename to data-otservbr-global/scripts/quests/dangerous_depth/actions_crude_lava_pump.lua diff --git a/data-otservbr-global/scripts/actions/quests/dangerous_depth/crude_lava_pump_achievements.lua b/data-otservbr-global/scripts/quests/dangerous_depth/actions_crude_lava_pump_achievements.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/dangerous_depth/crude_lava_pump_achievements.lua rename to data-otservbr-global/scripts/quests/dangerous_depth/actions_crude_lava_pump_achievements.lua diff --git a/data-otservbr-global/scripts/actions/quests/dangerous_depth/gnome_chart.lua b/data-otservbr-global/scripts/quests/dangerous_depth/actions_gnome_chart.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/dangerous_depth/gnome_chart.lua rename to data-otservbr-global/scripts/quests/dangerous_depth/actions_gnome_chart.lua diff --git a/data-otservbr-global/scripts/actions/quests/dangerous_depth/gnome_items.lua b/data-otservbr-global/scripts/quests/dangerous_depth/actions_gnome_items.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/dangerous_depth/gnome_items.lua rename to data-otservbr-global/scripts/quests/dangerous_depth/actions_gnome_items.lua diff --git a/data-otservbr-global/scripts/actions/quests/dangerous_depth/gnome_trignometre.lua b/data-otservbr-global/scripts/quests/dangerous_depth/actions_gnome_trignometre.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/dangerous_depth/gnome_trignometre.lua rename to data-otservbr-global/scripts/quests/dangerous_depth/actions_gnome_trignometre.lua diff --git a/data-otservbr-global/scripts/actions/quests/dangerous_depth/gnomish_chest.lua b/data-otservbr-global/scripts/quests/dangerous_depth/actions_gnomish_chest.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/dangerous_depth/gnomish_chest.lua rename to data-otservbr-global/scripts/quests/dangerous_depth/actions_gnomish_chest.lua diff --git a/data-otservbr-global/scripts/actions/quests/dangerous_depth/gnomish_pesticide.lua b/data-otservbr-global/scripts/quests/dangerous_depth/actions_gnomish_pesticide.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/dangerous_depth/gnomish_pesticide.lua rename to data-otservbr-global/scripts/quests/dangerous_depth/actions_gnomish_pesticide.lua diff --git a/data-otservbr-global/scripts/actions/quests/dangerous_depth/lever_barrel.lua b/data-otservbr-global/scripts/quests/dangerous_depth/actions_lever_barrel.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/dangerous_depth/lever_barrel.lua rename to data-otservbr-global/scripts/quests/dangerous_depth/actions_lever_barrel.lua diff --git a/data-otservbr-global/scripts/actions/quests/dangerous_depth/using_crystals.lua b/data-otservbr-global/scripts/quests/dangerous_depth/actions_using_crystals.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/dangerous_depth/using_crystals.lua rename to data-otservbr-global/scripts/quests/dangerous_depth/actions_using_crystals.lua diff --git a/data-otservbr-global/scripts/actions/quests/dangerous_depth/warzone_crystals.lua b/data-otservbr-global/scripts/quests/dangerous_depth/actions_warzone_crystals.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/dangerous_depth/warzone_crystals.lua rename to data-otservbr-global/scripts/quests/dangerous_depth/actions_warzone_crystals.lua diff --git a/data-otservbr-global/scripts/actions/quests/dangerous_depth/wooden_trash.lua b/data-otservbr-global/scripts/quests/dangerous_depth/actions_wooden_trash.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/dangerous_depth/wooden_trash.lua rename to data-otservbr-global/scripts/quests/dangerous_depth/actions_wooden_trash.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/dangerous_depths/bosses_mission_depths.lua b/data-otservbr-global/scripts/quests/dangerous_depth/creaturescripts_bosses_mission_depths.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/dangerous_depths/bosses_mission_depths.lua rename to data-otservbr-global/scripts/quests/dangerous_depth/creaturescripts_bosses_mission_depths.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/dangerous_depths/fiery_heart.lua b/data-otservbr-global/scripts/quests/dangerous_depth/creaturescripts_fiery_heart.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/dangerous_depths/fiery_heart.lua rename to data-otservbr-global/scripts/quests/dangerous_depth/creaturescripts_fiery_heart.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/dangerous_depths/lost_exile_task.lua b/data-otservbr-global/scripts/quests/dangerous_depth/creaturescripts_lost_exile_task.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/dangerous_depths/lost_exile_task.lua rename to data-otservbr-global/scripts/quests/dangerous_depth/creaturescripts_lost_exile_task.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/dangerous_depths/snail_slime_kill.lua b/data-otservbr-global/scripts/quests/dangerous_depth/creaturescripts_snail_slime_kill.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/dangerous_depths/snail_slime_kill.lua rename to data-otservbr-global/scripts/quests/dangerous_depth/creaturescripts_snail_slime_kill.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/dangerous_depths/the_baron_from_below.lua b/data-otservbr-global/scripts/quests/dangerous_depth/creaturescripts_the_baron_from_below.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/dangerous_depths/the_baron_from_below.lua rename to data-otservbr-global/scripts/quests/dangerous_depth/creaturescripts_the_baron_from_below.lua diff --git a/data-otservbr-global/scripts/movements/quests/dangerous_depth/boss_entrance.lua b/data-otservbr-global/scripts/quests/dangerous_depth/movements_boss_entrance.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/dangerous_depth/boss_entrance.lua rename to data-otservbr-global/scripts/quests/dangerous_depth/movements_boss_entrance.lua diff --git a/data-otservbr-global/scripts/movements/quests/dangerous_depth/energy_entrance.lua b/data-otservbr-global/scripts/quests/dangerous_depth/movements_energy_entrance.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/dangerous_depth/energy_entrance.lua rename to data-otservbr-global/scripts/quests/dangerous_depth/movements_energy_entrance.lua diff --git a/data-otservbr-global/scripts/movements/quests/dangerous_depth/gnome_avalanche.lua b/data-otservbr-global/scripts/quests/dangerous_depth/movements_gnome_avalanche.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/dangerous_depth/gnome_avalanche.lua rename to data-otservbr-global/scripts/quests/dangerous_depth/movements_gnome_avalanche.lua diff --git a/data-otservbr-global/scripts/movements/quests/dangerous_depth/gnome_ordnance.lua b/data-otservbr-global/scripts/quests/dangerous_depth/movements_gnome_ordnance.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/dangerous_depth/gnome_ordnance.lua rename to data-otservbr-global/scripts/quests/dangerous_depth/movements_gnome_ordnance.lua diff --git a/data-otservbr-global/scripts/movements/quests/dangerous_depth/gnomes_ordnance_end.lua b/data-otservbr-global/scripts/quests/dangerous_depth/movements_gnomes_ordnance_end.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/dangerous_depth/gnomes_ordnance_end.lua rename to data-otservbr-global/scripts/quests/dangerous_depth/movements_gnomes_ordnance_end.lua diff --git a/data-otservbr-global/scripts/movements/quests/dangerous_depth/lava_damage.lua b/data-otservbr-global/scripts/quests/dangerous_depth/movements_lava_damage.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/dangerous_depth/lava_damage.lua rename to data-otservbr-global/scripts/quests/dangerous_depth/movements_lava_damage.lua diff --git a/data-otservbr-global/scripts/movements/quests/dangerous_depth/lost_exiles.lua b/data-otservbr-global/scripts/quests/dangerous_depth/movements_lost_exiles.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/dangerous_depth/lost_exiles.lua rename to data-otservbr-global/scripts/quests/dangerous_depth/movements_lost_exiles.lua diff --git a/data-otservbr-global/scripts/movements/quests/dangerous_depth/warzone_entrance.lua b/data-otservbr-global/scripts/quests/dangerous_depth/movements_warzone_entrance.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/dangerous_depth/warzone_entrance.lua rename to data-otservbr-global/scripts/quests/dangerous_depth/movements_warzone_entrance.lua diff --git a/data-otservbr-global/scripts/actions/quests/dark_trails/corpse.lua b/data-otservbr-global/scripts/quests/dark_trails/actions_corpse.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/dark_trails/corpse.lua rename to data-otservbr-global/scripts/quests/dark_trails/actions_corpse.lua diff --git a/data-otservbr-global/scripts/actions/quests/dark_trails/lever_death_priest_shargon.lua b/data-otservbr-global/scripts/quests/dark_trails/actions_lever_death_priest_shargon.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/dark_trails/lever_death_priest_shargon.lua rename to data-otservbr-global/scripts/quests/dark_trails/actions_lever_death_priest_shargon.lua diff --git a/data-otservbr-global/scripts/actions/quests/dark_trails/lever_the_ravager.lua b/data-otservbr-global/scripts/quests/dark_trails/actions_lever_the_ravager.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/dark_trails/lever_the_ravager.lua rename to data-otservbr-global/scripts/quests/dark_trails/actions_lever_the_ravager.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/dark_trails/kill_death_priest_shargon.lua b/data-otservbr-global/scripts/quests/dark_trails/creaturescripts_kill_death_priest_shargon.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/dark_trails/kill_death_priest_shargon.lua rename to data-otservbr-global/scripts/quests/dark_trails/creaturescripts_kill_death_priest_shargon.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/dark_trails/kill_the_ravager.lua b/data-otservbr-global/scripts/quests/dark_trails/creaturescripts_kill_the_ravager.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/dark_trails/kill_the_ravager.lua rename to data-otservbr-global/scripts/quests/dark_trails/creaturescripts_kill_the_ravager.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/dark_trails/think_the_ravager_heal.lua b/data-otservbr-global/scripts/quests/dark_trails/creaturescripts_think_the_ravager_heal.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/dark_trails/think_the_ravager_heal.lua rename to data-otservbr-global/scripts/quests/dark_trails/creaturescripts_think_the_ravager_heal.lua diff --git a/data-otservbr-global/scripts/movements/quests/dark_trails/necrometer_tile_access.lua b/data-otservbr-global/scripts/quests/dark_trails/movements_necrometer_tile_access.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/dark_trails/necrometer_tile_access.lua rename to data-otservbr-global/scripts/quests/dark_trails/movements_necrometer_tile_access.lua diff --git a/data-otservbr-global/scripts/actions/quests/dawnport/legion_helmet.lua b/data-otservbr-global/scripts/quests/dawnport/actions_legion_helmet.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/dawnport/legion_helmet.lua rename to data-otservbr-global/scripts/quests/dawnport/actions_legion_helmet.lua diff --git a/data-otservbr-global/scripts/actions/quests/dawnport/the_rare_herb.lua b/data-otservbr-global/scripts/quests/dawnport/actions_the_rare_herb.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/dawnport/the_rare_herb.lua rename to data-otservbr-global/scripts/quests/dawnport/actions_the_rare_herb.lua diff --git a/data-otservbr-global/scripts/actions/quests/dawnport/vocation_reward.lua b/data-otservbr-global/scripts/quests/dawnport/actions_vocation_reward.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/dawnport/vocation_reward.lua rename to data-otservbr-global/scripts/quests/dawnport/actions_vocation_reward.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/dawnport/goblin_kill.lua b/data-otservbr-global/scripts/quests/dawnport/creaturescripts_goblin_kill.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/dawnport/goblin_kill.lua rename to data-otservbr-global/scripts/quests/dawnport/creaturescripts_goblin_kill.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/dawnport/minotaur_kill.lua b/data-otservbr-global/scripts/quests/dawnport/creaturescripts_minotaur_kill.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/dawnport/minotaur_kill.lua rename to data-otservbr-global/scripts/quests/dawnport/creaturescripts_minotaur_kill.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/dawnport/troll_kill.lua b/data-otservbr-global/scripts/quests/dawnport/creaturescripts_troll_kill.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/dawnport/troll_kill.lua rename to data-otservbr-global/scripts/quests/dawnport/creaturescripts_troll_kill.lua diff --git a/data-otservbr-global/scripts/movements/quests/dawnport/legion_helmet.lua b/data-otservbr-global/scripts/quests/dawnport/movements_legion_helmet.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/dawnport/legion_helmet.lua rename to data-otservbr-global/scripts/quests/dawnport/movements_legion_helmet.lua diff --git a/data-otservbr-global/scripts/actions/quests/deepling_worldchange/boxramp.lua b/data-otservbr-global/scripts/quests/deeplings_worldchange/actions_boxramp.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/deepling_worldchange/boxramp.lua rename to data-otservbr-global/scripts/quests/deeplings_worldchange/actions_boxramp.lua diff --git a/data-otservbr-global/scripts/actions/quests/deepling_worldchange/coral.lua b/data-otservbr-global/scripts/quests/deeplings_worldchange/actions_coral.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/deepling_worldchange/coral.lua rename to data-otservbr-global/scripts/quests/deeplings_worldchange/actions_coral.lua diff --git a/data-otservbr-global/scripts/actions/quests/deepling_worldchange/crystal.lua b/data-otservbr-global/scripts/quests/deeplings_worldchange/actions_crystal.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/deepling_worldchange/crystal.lua rename to data-otservbr-global/scripts/quests/deeplings_worldchange/actions_crystal.lua diff --git a/data-otservbr-global/scripts/actions/quests/deepling_worldchange/crystalvortex.lua b/data-otservbr-global/scripts/quests/deeplings_worldchange/actions_crystalvortex.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/deepling_worldchange/crystalvortex.lua rename to data-otservbr-global/scripts/quests/deeplings_worldchange/actions_crystalvortex.lua diff --git a/data-otservbr-global/scripts/actions/quests/deepling_worldchange/golden_anchor.lua b/data-otservbr-global/scripts/quests/deeplings_worldchange/actions_golden_anchor.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/deepling_worldchange/golden_anchor.lua rename to data-otservbr-global/scripts/quests/deeplings_worldchange/actions_golden_anchor.lua diff --git a/data-otservbr-global/scripts/actions/quests/deepling_worldchange/questfirst.lua b/data-otservbr-global/scripts/quests/deeplings_worldchange/actions_questfirst.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/deepling_worldchange/questfirst.lua rename to data-otservbr-global/scripts/quests/deeplings_worldchange/actions_questfirst.lua diff --git a/data-otservbr-global/scripts/actions/quests/deepling_worldchange/statue.lua b/data-otservbr-global/scripts/quests/deeplings_worldchange/actions_statue.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/deepling_worldchange/statue.lua rename to data-otservbr-global/scripts/quests/deeplings_worldchange/actions_statue.lua diff --git a/data-otservbr-global/scripts/movements/quests/deeplings_worldchange/deepling_bosses.lua b/data-otservbr-global/scripts/quests/deeplings_worldchange/movements_deepling_bosses.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/deeplings_worldchange/deepling_bosses.lua rename to data-otservbr-global/scripts/quests/deeplings_worldchange/movements_deepling_bosses.lua diff --git a/data-otservbr-global/scripts/actions/quests/demon_oak/demon_oak.lua b/data-otservbr-global/scripts/quests/demon_oak/actions_demon_oak.lua similarity index 91% rename from data-otservbr-global/scripts/actions/quests/demon_oak/demon_oak.lua rename to data-otservbr-global/scripts/quests/demon_oak/actions_demon_oak.lua index a3de22b2240..d00b2818f11 100644 --- a/data-otservbr-global/scripts/actions/quests/demon_oak/demon_oak.lua +++ b/data-otservbr-global/scripts/quests/demon_oak/actions_demon_oak.lua @@ -47,10 +47,10 @@ local config = { }, }, storages = { - [914] = Storage.DemonOak.AxeBlowsBird, - [915] = Storage.DemonOak.AxeBlowsLeft, - [916] = Storage.DemonOak.AxeBlowsRight, - [917] = Storage.DemonOak.AxeBlowsFace, + [914] = Storage.Quest.U8_2.TheDemonOak.AxeBlowsBird, + [915] = Storage.Quest.U8_2.TheDemonOak.AxeBlowsLeft, + [916] = Storage.Quest.U8_2.TheDemonOak.AxeBlowsRight, + [917] = Storage.Quest.U8_2.TheDemonOak.AxeBlowsFace, }, } @@ -86,8 +86,8 @@ function demonOak.onUse(player, item, fromPosition, target, toPosition, isHotkey if isDefeated then player:teleportTo(DEMON_OAK_KICK_POSITION) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Tell Oldrak about your great victory against the demon oak.") - player:setStorageValue(Storage.DemonOak.Done, 1) - player:setStorageValue(Storage.DemonOak.Progress, 3) + player:setStorageValue(Storage.Quest.U8_2.TheDemonOak.Done, 1) + player:setStorageValue(Storage.Quest.U8_2.TheDemonOak.Progress, 3) return true end diff --git a/data-otservbr-global/scripts/actions/quests/demon_oak/demon_oak_chest.lua b/data-otservbr-global/scripts/quests/demon_oak/actions_demon_oak_chest.lua similarity index 85% rename from data-otservbr-global/scripts/actions/quests/demon_oak/demon_oak_chest.lua rename to data-otservbr-global/scripts/quests/demon_oak/actions_demon_oak_chest.lua index edb598c276d..6e11d288c42 100644 --- a/data-otservbr-global/scripts/actions/quests/demon_oak/demon_oak_chest.lua +++ b/data-otservbr-global/scripts/quests/demon_oak/actions_demon_oak_chest.lua @@ -8,7 +8,7 @@ local chests = { local demonOakChest = Action() function demonOakChest.onUse(player, item, fromPosition, target, toPosition, isHotkey) if chests[item.uid] then - if player:getStorageValue(Storage.DemonOak.Done) ~= 2 then + if player:getStorageValue(Storage.Quest.U8_2.TheDemonOak.Done) ~= 2 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "It's empty.") return true end @@ -21,7 +21,7 @@ function demonOakChest.onUse(player, item, fromPosition, target, toPosition, isH end player:addItem(chest.itemid, chest.count) - player:setStorageValue(Storage.DemonOak.Done, 3) + player:setStorageValue(Storage.Quest.U8_2.TheDemonOak.Done, 3) end return true end diff --git a/data-otservbr-global/scripts/actions/quests/demon_oak/demon_oak_gravestone.lua b/data-otservbr-global/scripts/quests/demon_oak/actions_demon_oak_gravestone.lua similarity index 80% rename from data-otservbr-global/scripts/actions/quests/demon_oak/demon_oak_gravestone.lua rename to data-otservbr-global/scripts/quests/demon_oak/actions_demon_oak_gravestone.lua index f89be56069a..12fcae5df3b 100644 --- a/data-otservbr-global/scripts/actions/quests/demon_oak/demon_oak_gravestone.lua +++ b/data-otservbr-global/scripts/quests/demon_oak/actions_demon_oak_gravestone.lua @@ -1,6 +1,6 @@ local demonOakGrave = Action() function demonOakGrave.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.DemonOak.Done) == 2 then + if player:getStorageValue(Storage.Quest.U8_2.TheDemonOak.Done) == 2 then player:teleportTo(DEMON_OAK_REWARDROOM_POSITION) DEMON_OAK_REWARDROOM_POSITION:sendMagicEffect(CONST_ME_TELEPORT) return true diff --git a/data-otservbr-global/scripts/globalevents/quests/demon_oak_voices.lua b/data-otservbr-global/scripts/quests/demon_oak/globalevents_demon_oak_voices.lua similarity index 100% rename from data-otservbr-global/scripts/globalevents/quests/demon_oak_voices.lua rename to data-otservbr-global/scripts/quests/demon_oak/globalevents_demon_oak_voices.lua diff --git a/data-otservbr-global/scripts/movements/quests/demon_oak/area_damage.lua b/data-otservbr-global/scripts/quests/demon_oak/movements_area_damage.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/demon_oak/area_damage.lua rename to data-otservbr-global/scripts/quests/demon_oak/movements_area_damage.lua diff --git a/data-otservbr-global/scripts/movements/quests/demon_oak/entrance.lua b/data-otservbr-global/scripts/quests/demon_oak/movements_entrance.lua similarity index 87% rename from data-otservbr-global/scripts/movements/quests/demon_oak/entrance.lua rename to data-otservbr-global/scripts/quests/demon_oak/movements_entrance.lua index 6e99d0f8edf..cd7e79657cf 100644 --- a/data-otservbr-global/scripts/movements/quests/demon_oak/entrance.lua +++ b/data-otservbr-global/scripts/quests/demon_oak/movements_entrance.lua @@ -6,7 +6,7 @@ function entrance.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.DemonOak.Done) >= 1 then + if player:getStorageValue(Storage.Quest.U8_2.TheDemonOak.Done) >= 1 then player:teleportTo(DEMON_OAK_KICK_POSITION) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) return true @@ -21,7 +21,7 @@ function entrance.onStepIn(creature, item, position, fromPosition) if #Game.getSpectators(DEMON_OAK_POSITION, false, true, 9, 9, 6, 6) == 0 then if player:getItemCount(9388) == 0 then - if player:getStorageValue(Storage.DemonOak.Progress) < 1 then + if player:getStorageValue(Storage.Quest.U8_2.TheDemonOak.Progress) < 1 then player:say("You need finish the demons task!", TALKTYPE_MONSTER_YELL, false, player, DEMON_OAK_KICK_POSITION) player:teleportTo(DEMON_OAK_KICK_POSITION) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) @@ -36,7 +36,7 @@ function entrance.onStepIn(creature, item, position, fromPosition) player:removeItem(9388, 1) player:teleportTo(DEMON_OAK_ENTER_POSITION) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - player:setStorageValue(Storage.DemonOak.Progress, 1) + player:setStorageValue(Storage.Quest.U8_2.TheDemonOak.Progress, 1) player:say("I AWAITED YOU! COME HERE AND GET YOUR REWARD!", TALKTYPE_MONSTER_YELL, false, player, DEMON_OAK_POSITION) else player:teleportTo(DEMON_OAK_KICK_POSITION) diff --git a/data-otservbr-global/scripts/movements/quests/demon_oak/squares.lua b/data-otservbr-global/scripts/quests/demon_oak/movements_squares.lua similarity index 84% rename from data-otservbr-global/scripts/movements/quests/demon_oak/squares.lua rename to data-otservbr-global/scripts/quests/demon_oak/movements_squares.lua index f0b704f8e0c..7c15cd88296 100644 --- a/data-otservbr-global/scripts/movements/quests/demon_oak/squares.lua +++ b/data-otservbr-global/scripts/quests/demon_oak/movements_squares.lua @@ -16,10 +16,10 @@ function squares.onStepIn(creature, item, position, fromPosition) return true end - local status = math.max(player:getStorageValue(Storage.DemonOak.Squares), 0) + local status = math.max(player:getStorageValue(Storage.Quest.U8_2.TheDemonOak.Squares), 0) local startUid = 9000 if item.uid - startUid == status + 1 then - player:setStorageValue(Storage.DemonOak.Squares, status + 1) + player:setStorageValue(Storage.Quest.U8_2.TheDemonOak.Squares, status + 1) player:say(voices[math.random(#voices)], TALKTYPE_MONSTER_YELL, false, player, DEMON_OAK_POSITION) end return true diff --git a/data-otservbr-global/scripts/actions/quests/desert_dungeon_quest/desert_dungeon_lever.lua b/data-otservbr-global/scripts/quests/desert_dungeon_quest/actions_desert_dungeon_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/desert_dungeon_quest/desert_dungeon_lever.lua rename to data-otservbr-global/scripts/quests/desert_dungeon_quest/actions_desert_dungeon_lever.lua diff --git a/data-otservbr-global/scripts/movements/quests/devil_helmet/sewer.lua b/data-otservbr-global/scripts/quests/devil_helmet/movements_sewer.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/devil_helmet/sewer.lua rename to data-otservbr-global/scripts/quests/devil_helmet/movements_sewer.lua diff --git a/data-otservbr-global/scripts/globalevents/quests/druid_outfits_blooming_griffinclaw.lua b/data-otservbr-global/scripts/quests/druid_outfits_quest/globalevents_druid_outfits_blooming_griffinclaw.lua similarity index 100% rename from data-otservbr-global/scripts/globalevents/quests/druid_outfits_blooming_griffinclaw.lua rename to data-otservbr-global/scripts/quests/druid_outfits_quest/globalevents_druid_outfits_blooming_griffinclaw.lua diff --git a/data-otservbr-global/scripts/movements/quests/edron_rope/rope.lua b/data-otservbr-global/scripts/quests/edron_rope/movements_rope.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/edron_rope/rope.lua rename to data-otservbr-global/scripts/quests/edron_rope/movements_rope.lua diff --git a/data-otservbr-global/scripts/actions/quests/elemental_spheres/lever.lua b/data-otservbr-global/scripts/quests/elemental_spheres/actions_lever.lua similarity index 91% rename from data-otservbr-global/scripts/actions/quests/elemental_spheres/lever.lua rename to data-otservbr-global/scripts/quests/elemental_spheres/actions_lever.lua index 14e88c58f2a..c2612a17283 100644 --- a/data-otservbr-global/scripts/actions/quests/elemental_spheres/lever.lua +++ b/data-otservbr-global/scripts/quests/elemental_spheres/actions_lever.lua @@ -37,7 +37,7 @@ function elementalSpheresLever.onUse(player, item, fromPosition, target, toPosit end local spectators = Game.getSpectators(Position(33268, 31836, 12), false, true, 30, 30, 30, 30) - if #spectators > 0 or Game.getStorageValue(GlobalStorage.ElementalSphere.BossRoom) > 0 then + if #spectators > 0 or Game.getStorageValue(Storage.Quest.U8_2.ElementalSpheres.BossRoom) > 0 then player:say("Wait for the current team to exit.", TALKTYPE_MONSTER_SAY, false, 0, Position(33268, 31835, 10)) return true end @@ -51,7 +51,7 @@ function elementalSpheresLever.onUse(player, item, fromPosition, target, toPosit end local vocationId = creature:getVocation():getBaseId() - if vocationId ~= config[i].vocationId or creature:getItemCount(config[i].itemid) < 1 or creature:getStorageValue(Storage.ElementalSphere.QuestLine) < 1 then + if vocationId ~= config[i].vocationId or creature:getItemCount(config[i].itemid) < 1 or creature:getStorageValue(Storage.Quest.U8_2.ElementalSpheres.QuestLine) < 1 then player:say("You need one player of each vocation having completed the Elemental Spheres quest and also carrying the elemental rare item.", TALKTYPE_MONSTER_SAY, false, 0, Position(33268, 31835, 10)) return true end diff --git a/data-otservbr-global/scripts/actions/quests/elemental_spheres/lord_of_elements_lever.lua b/data-otservbr-global/scripts/quests/elemental_spheres/actions_lord_of_elements_lever.lua similarity index 93% rename from data-otservbr-global/scripts/actions/quests/elemental_spheres/lord_of_elements_lever.lua rename to data-otservbr-global/scripts/quests/elemental_spheres/actions_lord_of_elements_lever.lua index 3e90bf6ac90..080565bc77e 100644 --- a/data-otservbr-global/scripts/actions/quests/elemental_spheres/lord_of_elements_lever.lua +++ b/data-otservbr-global/scripts/quests/elemental_spheres/actions_lord_of_elements_lever.lua @@ -26,7 +26,7 @@ local config = { from = Position(33261, 31829, 12), to = Position(33274, 31842, 12), }, - machineStorages = { GlobalStorage.ElementalSphere.Machine1, GlobalStorage.ElementalSphere.Machine2, GlobalStorage.ElementalSphere.Machine3, GlobalStorage.ElementalSphere.Machine4 }, + machineStorages = { Storage.Quest.U8_2.ElementalSpheres.Machine1, Storage.Quest.U8_2.ElementalSpheres.Machine2, Storage.Quest.U8_2.ElementalSpheres.Machine3, Storage.Quest.U8_2.ElementalSpheres.Machine4 }, centerPosition = Position(33267, 31836, 12), effectPositions = { Position(33261, 31829, 12), @@ -93,7 +93,7 @@ local function resetRoom(players) end end - Game.setStorageValue(GlobalStorage.ElementalSphere.BossRoom, -1) + Game.setStorageValue(Storage.Quest.U8_2.ElementalSpheres.BossRoom, -1) for i = 1, #config.machineStorages do Game.setStorageValue(config.machineStorages[i], -1) end @@ -173,7 +173,7 @@ function elementalSpheresLordLever.onUse(player, item, fromPosition, target, toP end end - Game.setStorageValue(GlobalStorage.ElementalSphere.BossRoom, 1) + Game.setStorageValue(Storage.Quest.U8_2.ElementalSpheres.BossRoom, 1) Game.createMonster("Lord of the Elements", config.centerPosition) player:say("You have 10 minutes from now on until you get teleported out.", TALKTYPE_MONSTER_YELL, false, 0, config.centerPosition) addEvent(warnPlayers, 5 * 60 * 1000, players) diff --git a/data-otservbr-global/scripts/actions/quests/elemental_spheres/machine1.lua b/data-otservbr-global/scripts/quests/elemental_spheres/actions_machine1.lua similarity index 88% rename from data-otservbr-global/scripts/actions/quests/elemental_spheres/machine1.lua rename to data-otservbr-global/scripts/quests/elemental_spheres/actions_machine1.lua index 807556d0efd..7cbf6a1e462 100644 --- a/data-otservbr-global/scripts/actions/quests/elemental_spheres/machine1.lua +++ b/data-otservbr-global/scripts/quests/elemental_spheres/actions_machine1.lua @@ -9,10 +9,10 @@ local elementalSpheresMachine1 = Action() function elementalSpheresMachine1.onUse(player, item, fromPosition, target, toPosition, isHotkey) local destination = config[player:getVocation():getBaseId()] if table.contains({ 842, 843 }, item.itemid) then - local gemCount = player:getStorageValue(Storage.ElementalSphere.MachineGemCount) + local gemCount = player:getStorageValue(Storage.Quest.U8_2.ElementalSpheres.MachineGemCount) if table.contains({ 33268, 33269 }, toPosition.x) and toPosition.y == 31830 and toPosition.z == 10 and gemCount >= 20 then player:teleportTo(destination, false) - player:setStorageValue(Storage.ElementalSphere.MachineGemCount, gemCount - 20) + player:setStorageValue(Storage.Quest.U8_2.ElementalSpheres.MachineGemCount, gemCount - 20) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) end diff --git a/data-otservbr-global/scripts/actions/quests/elemental_spheres/machine2.lua b/data-otservbr-global/scripts/quests/elemental_spheres/actions_machine2.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/elemental_spheres/machine2.lua rename to data-otservbr-global/scripts/quests/elemental_spheres/actions_machine2.lua diff --git a/data-otservbr-global/scripts/actions/quests/elemental_spheres/soils1.lua b/data-otservbr-global/scripts/quests/elemental_spheres/actions_soils1.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/elemental_spheres/soils1.lua rename to data-otservbr-global/scripts/quests/elemental_spheres/actions_soils1.lua diff --git a/data-otservbr-global/scripts/actions/quests/elemental_spheres/soils2.lua b/data-otservbr-global/scripts/quests/elemental_spheres/actions_soils2.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/elemental_spheres/soils2.lua rename to data-otservbr-global/scripts/quests/elemental_spheres/actions_soils2.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/elemental_spheres/overlord_kill.lua b/data-otservbr-global/scripts/quests/elemental_spheres/creaturescripts_overlord_kill.lua similarity index 55% rename from data-otservbr-global/scripts/creaturescripts/quests/elemental_spheres/overlord_kill.lua rename to data-otservbr-global/scripts/quests/elemental_spheres/creaturescripts_overlord_kill.lua index 2d5b7b98f91..5f1ea523224 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/elemental_spheres/overlord_kill.lua +++ b/data-otservbr-global/scripts/quests/elemental_spheres/creaturescripts_overlord_kill.lua @@ -1,8 +1,8 @@ local overlords = { - ["energy overlord"] = { storage = Storage.ElementalSphere.BossStorage, globalStorage = GlobalStorage.ElementalSphere.KnightBoss }, - ["fire overlord"] = { storage = Storage.ElementalSphere.BossStorage, globalStorage = GlobalStorage.ElementalSphere.SorcererBoss }, - ["ice overlord"] = { storage = Storage.ElementalSphere.BossStorage, globalStorage = GlobalStorage.ElementalSphere.PaladinBoss }, - ["earth overlord"] = { storage = Storage.ElementalSphere.BossStorage, globalStorage = GlobalStorage.ElementalSphere.DruidBoss }, + ["energy overlord"] = { storage = Storage.Quest.U8_2.ElementalSpheres.BossStorage, globalStorage = Storage.Quest.U8_2.ElementalSpheres.KnightBoss }, + ["fire overlord"] = { storage = Storage.Quest.U8_2.ElementalSpheres.BossStorage, globalStorage = Storage.Quest.U8_2.ElementalSpheres.SorcererBoss }, + ["ice overlord"] = { storage = Storage.Quest.U8_2.ElementalSpheres.BossStorage, globalStorage = Storage.Quest.U8_2.ElementalSpheres.PaladinBoss }, + ["earth overlord"] = { storage = Storage.Quest.U8_2.ElementalSpheres.BossStorage, globalStorage = Storage.Quest.U8_2.ElementalSpheres.DruidBoss }, ["lord of the elements"] = {}, } diff --git a/data-otservbr-global/scripts/movements/quests/elemental_spheres/aoe_teleport_out.lua b/data-otservbr-global/scripts/quests/elemental_spheres/movements_aoe_teleport_out.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/elemental_spheres/aoe_teleport_out.lua rename to data-otservbr-global/scripts/quests/elemental_spheres/movements_aoe_teleport_out.lua diff --git a/data-otservbr-global/scripts/movements/quests/elemental_spheres/soil_entrance.lua b/data-otservbr-global/scripts/quests/elemental_spheres/movements_soil_entrance.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/elemental_spheres/soil_entrance.lua rename to data-otservbr-global/scripts/quests/elemental_spheres/movements_soil_entrance.lua diff --git a/data-otservbr-global/scripts/movements/quests/elemental_spheres/soil_exit.lua b/data-otservbr-global/scripts/quests/elemental_spheres/movements_soil_exit.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/elemental_spheres/soil_exit.lua rename to data-otservbr-global/scripts/quests/elemental_spheres/movements_soil_exit.lua diff --git a/data-otservbr-global/scripts/movements/quests/elemental_spheres/summon_overlord.lua b/data-otservbr-global/scripts/quests/elemental_spheres/movements_summon_overlord.lua similarity index 91% rename from data-otservbr-global/scripts/movements/quests/elemental_spheres/summon_overlord.lua rename to data-otservbr-global/scripts/quests/elemental_spheres/movements_summon_overlord.lua index fc50d2f0577..a839d3f060c 100644 --- a/data-otservbr-global/scripts/movements/quests/elemental_spheres/summon_overlord.lua +++ b/data-otservbr-global/scripts/quests/elemental_spheres/movements_summon_overlord.lua @@ -1,6 +1,6 @@ local config = { [7738] = { - storage = GlobalStorage.ElementalSphere.KnightBoss, + storage = Storage.Quest.U8_2.ElementalSpheres.KnightBoss, corpse = 8139, charged = 2126, inactive = 0, @@ -19,7 +19,7 @@ local config = { }, }, [7739] = { - storage = GlobalStorage.ElementalSphere.SorcererBoss, + storage = Storage.Quest.U8_2.ElementalSpheres.SorcererBoss, corpse = 8141, charged = 7745, inactive = 7743, @@ -38,7 +38,7 @@ local config = { }, }, [7740] = { - storage = GlobalStorage.ElementalSphere.PaladinBoss, + storage = Storage.Quest.U8_2.ElementalSpheres.PaladinBoss, corpse = 8140, charged = 7744, inactive = 7741, @@ -58,7 +58,7 @@ local config = { }, }, [7748] = { - storage = GlobalStorage.ElementalSphere.DruidBoss, + storage = Storage.Quest.U8_2.ElementalSpheres.DruidBoss, corpse = 8106, charged = 7746, inactive = 7742, diff --git a/data-otservbr-global/scripts/movements/quests/extension_mota/extension_mota.lua b/data-otservbr-global/scripts/quests/extension_mota/movements_extension_mota.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/extension_mota/extension_mota.lua rename to data-otservbr-global/scripts/quests/extension_mota/movements_extension_mota.lua diff --git a/data-otservbr-global/scripts/actions/quests/fathers_burden/corpse.lua b/data-otservbr-global/scripts/quests/fathers_burden/actions_corpse.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/fathers_burden/corpse.lua rename to data-otservbr-global/scripts/quests/fathers_burden/actions_corpse.lua diff --git a/data-otservbr-global/scripts/actions/quests/feaster_of_souls/bosses_killed.lua b/data-otservbr-global/scripts/quests/feaster_of_souls/actions_bosses_killed.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/feaster_of_souls/bosses_killed.lua rename to data-otservbr-global/scripts/quests/feaster_of_souls/actions_bosses_killed.lua diff --git a/data-otservbr-global/scripts/actions/quests/feaster_of_souls/entrances.lua b/data-otservbr-global/scripts/quests/feaster_of_souls/actions_entrances.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/feaster_of_souls/entrances.lua rename to data-otservbr-global/scripts/quests/feaster_of_souls/actions_entrances.lua diff --git a/data-otservbr-global/scripts/actions/quests/feaster_of_souls/portal_brain_head.lua b/data-otservbr-global/scripts/quests/feaster_of_souls/actions_portal_brain_head.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/feaster_of_souls/portal_brain_head.lua rename to data-otservbr-global/scripts/quests/feaster_of_souls/actions_portal_brain_head.lua diff --git a/data-otservbr-global/scripts/actions/quests/feaster_of_souls/portal_minis_feaster.lua b/data-otservbr-global/scripts/quests/feaster_of_souls/actions_portal_minis_feaster.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/feaster_of_souls/portal_minis_feaster.lua rename to data-otservbr-global/scripts/quests/feaster_of_souls/actions_portal_minis_feaster.lua diff --git a/data-otservbr-global/scripts/actions/quests/feaster_of_souls/portal_pale_worm.lua b/data-otservbr-global/scripts/quests/feaster_of_souls/actions_portal_pale_worm.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/feaster_of_souls/portal_pale_worm.lua rename to data-otservbr-global/scripts/quests/feaster_of_souls/actions_portal_pale_worm.lua diff --git a/data-otservbr-global/scripts/actions/quests/feaster_of_souls/rock_entrance.lua b/data-otservbr-global/scripts/quests/feaster_of_souls/actions_rock_entrance.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/feaster_of_souls/rock_entrance.lua rename to data-otservbr-global/scripts/quests/feaster_of_souls/actions_rock_entrance.lua diff --git a/data-otservbr-global/scripts/actions/quests/feaster_of_souls/slab.lua b/data-otservbr-global/scripts/quests/feaster_of_souls/actions_slab.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/feaster_of_souls/slab.lua rename to data-otservbr-global/scripts/quests/feaster_of_souls/actions_slab.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/feaster_of_souls/pale_worm_death.lua b/data-otservbr-global/scripts/quests/feaster_of_souls/creaturescripts_pale_worm_death.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/feaster_of_souls/pale_worm_death.lua rename to data-otservbr-global/scripts/quests/feaster_of_souls/creaturescripts_pale_worm_death.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/bone_flute.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_bone_flute.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/bone_flute.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_bone_flute.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/bone_flute_wall.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_bone_flute_wall.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/bone_flute_wall.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_bone_flute_wall.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/boots_of_homecoming.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_boots_of_homecoming.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/boots_of_homecoming.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_boots_of_homecoming.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/color_levers.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_color_levers.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/color_levers.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_color_levers.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/ferumbras_amulet.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_ferumbras_amulet.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/ferumbras_amulet.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_ferumbras_amulet.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/ferumbras_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_ferumbras_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/ferumbras_lever.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_ferumbras_lever.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/ferumbras_mana_keg.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_ferumbras_mana_keg.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/ferumbras_mana_keg.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_ferumbras_mana_keg.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/flower_puzzle_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_flower_puzzle_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/flower_puzzle_lever.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_flower_puzzle_lever.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/grave_flower.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_grave_flower.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/grave_flower.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_grave_flower.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_corrupted.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_corrupted.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_corrupted.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_corrupted.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_desert.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_desert.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_desert.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_desert.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_dimension.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_dimension.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_dimension.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_dimension.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_grass.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_grass.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_grass.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_grass.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_ice.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_ice.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_ice.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_ice.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_lever.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_lever.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_mushroom.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_mushroom.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_mushroom.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_mushroom.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_roshamuul.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_roshamuul.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_roshamuul.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_roshamuul.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_venom.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_venom.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/habitat_venom.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_venom.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/lever_first.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_first.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/lever_first.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_first.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/lever_four.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_four.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/lever_four.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_four.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/lever_second.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_second.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/lever_second.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_second.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/lever_third.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_third.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/lever_third.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_third.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/mysterious_scroll.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_mysterious_scroll.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/mysterious_scroll.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_mysterious_scroll.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/purified_soul.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_purified_soul.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/purified_soul.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_purified_soul.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/rat_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_rat_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/rat_lever.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_rat_lever.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/reward.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_reward.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/reward.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_reward.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/sacrifice.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_sacrifice.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/sacrifice.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_sacrifice.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/statue.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_statue.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/statue.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_statue.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/tarbaz_notes.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_tarbaz_notes.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/tarbaz_notes.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_tarbaz_notes.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/teleportation_rod.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_teleportation_rod.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/teleportation_rod.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_teleportation_rod.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/the_shatterer_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_the_shatterer_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/the_shatterer_lever.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_the_shatterer_lever.lua diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/the_shatterer_levers.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_the_shatterer_levers.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/the_shatterer_levers.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_the_shatterer_levers.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/bone_capsule.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_bone_capsule.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/bone_capsule.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_bone_capsule.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/bosses_kill.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_bosses_kill.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/bosses_kill.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_bosses_kill.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/death_dragon.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_death_dragon.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/death_dragon.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_death_dragon.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/disgusting_ooze_death.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_disgusting_ooze_death.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/disgusting_ooze_death.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_disgusting_ooze_death.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/ferumbras_mortal_shell_death.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_ferumbras_mortal_shell_death.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/ferumbras_mortal_shell_death.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_ferumbras_mortal_shell_death.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/ferumbras_soul_splinter.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_ferumbras_soul_splinter.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/ferumbras_soul_splinter.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_ferumbras_soul_splinter.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/rift_invader_death.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_rift_invader_death.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/rift_invader_death.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_rift_invader_death.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/the_shatterer_kill.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_the_shatterer_kill.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/the_shatterer_kill.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_the_shatterer_kill.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/zamulosh_clone.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_zamulosh_clone.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/zamulosh_clone.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_zamulosh_clone.lua diff --git a/data-otservbr-global/scripts/globalevents/quests/ferumbras_ascendant_effect_1.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/globalevents_ferumbras_ascendant_effect_1.lua similarity index 100% rename from data-otservbr-global/scripts/globalevents/quests/ferumbras_ascendant_effect_1.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/globalevents_ferumbras_ascendant_effect_1.lua diff --git a/data-otservbr-global/scripts/globalevents/quests/ferumbras_ascendant_effect_2.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/globalevents_ferumbras_ascendant_effect_2.lua similarity index 100% rename from data-otservbr-global/scripts/globalevents/quests/ferumbras_ascendant_effect_2.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/globalevents_ferumbras_ascendant_effect_2.lua diff --git a/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/blue_gem.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_blue_gem.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/blue_gem.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_blue_gem.lua diff --git a/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/boss_teleport.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_boss_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/boss_teleport.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_boss_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/desperate_soul.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_desperate_soul.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/desperate_soul.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_desperate_soul.lua diff --git a/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/entrance.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_entrance.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/entrance.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_entrance.lua diff --git a/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/flower_puzzle.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_flower_puzzle.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/flower_puzzle.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_flower_puzzle.lua diff --git a/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/gate_of_deathstruction.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_gate_of_deathstruction.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/gate_of_deathstruction.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_gate_of_deathstruction.lua diff --git a/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/green_gem.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_green_gem.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/green_gem.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_green_gem.lua diff --git a/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/habitats_access.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_habitats_access.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/habitats_access.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_habitats_access.lua diff --git a/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/lovely_monsters.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_lovely_monsters.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/lovely_monsters.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_lovely_monsters.lua diff --git a/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/mazoran_fire.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_mazoran_fire.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/mazoran_fire.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_mazoran_fire.lua diff --git a/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/plagirath_access.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_plagirath_access.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/plagirath_access.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_plagirath_access.lua diff --git a/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/razzagorn_access.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_razzagorn_access.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/razzagorn_access.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_razzagorn_access.lua diff --git a/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/red_gem.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_red_gem.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/red_gem.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_red_gem.lua diff --git a/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/seal.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_seal.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/seal.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_seal.lua diff --git a/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/shulgrax_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_shulgrax_lever.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/shulgrax_lever.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_shulgrax_lever.lua diff --git a/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/stair.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_stair.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/stair.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_stair.lua diff --git a/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/vortex.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_vortex.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/vortex.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_vortex.lua diff --git a/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/zamulosh_teleport.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_zamulosh_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/zamulosh_teleport.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_zamulosh_teleport.lua diff --git a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/bird_cage.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/actions_bird_cage.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/forgotten_knowledge/bird_cage.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/actions_bird_cage.lua diff --git a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/fount.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/actions_fount.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/forgotten_knowledge/fount.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/actions_fount.lua diff --git a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/girl_picture.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/actions_girl_picture.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/forgotten_knowledge/girl_picture.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/actions_girl_picture.lua diff --git a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/lantern.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/actions_lantern.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/forgotten_knowledge/lantern.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/actions_lantern.lua diff --git a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/lost_time.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/actions_lost_time.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/forgotten_knowledge/lost_time.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/actions_lost_time.lua diff --git a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/old_desk.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/actions_old_desk.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/forgotten_knowledge/old_desk.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/actions_old_desk.lua diff --git a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/plant.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/actions_plant.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/forgotten_knowledge/plant.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/actions_plant.lua diff --git a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/secret_wall.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/actions_secret_wall.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/forgotten_knowledge/secret_wall.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/actions_secret_wall.lua diff --git a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/servants_mechanism.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/actions_servants_mechanism.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/forgotten_knowledge/servants_mechanism.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/actions_servants_mechanism.lua diff --git a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/time_machine.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/actions_time_machine.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/forgotten_knowledge/time_machine.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/actions_time_machine.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/astral_glyph_death.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_astral_glyph_death.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/astral_glyph_death.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_astral_glyph_death.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/astral_source.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_astral_source.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/astral_source.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_astral_source.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/bosses_kill.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_bosses_kill.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/bosses_kill.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_bosses_kill.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/bound_astral_power.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_bound_astral_power.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/bound_astral_power.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_bound_astral_power.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/corrupted_soul.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_corrupted_soul.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/corrupted_soul.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_corrupted_soul.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/distorted_source.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_distorted_source.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/distorted_source.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_distorted_source.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/dragon_egg.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_dragon_egg.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/dragon_egg.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_dragon_egg.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/energy_prism.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_energy_prism.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/energy_prism.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_energy_prism.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/energy_prism_death.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_energy_prism_death.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/energy_prism_death.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_energy_prism_death.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/healthchange_forgotten.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_healthchange_forgotten.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/healthchange_forgotten.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_healthchange_forgotten.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/lloyd_preparedeath.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_lloyd_preparedeath.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/lloyd_preparedeath.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_lloyd_preparedeath.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/melting_death.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_melting_death.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/melting_death.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_melting_death.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/possessed_tree.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_possessed_tree.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/possessed_tree.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_possessed_tree.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/replica_servants.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_replica_servants.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/replica_servants.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_replica_servants.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/soulcatcher_summon.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_soulcatcher_summon.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/soulcatcher_summon.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_soulcatcher_summon.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/thorn_knight_death.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_thorn_knight_death.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/thorn_knight_death.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_thorn_knight_death.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/time_guardian_health.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_time_guardian_health.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/forgotten_knowledge/time_guardian_health.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/creaturescripts_time_guardian_health.lua diff --git a/data-otservbr-global/scripts/movements/quests/forgotten_knowledge/cave_entrance.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/movements_cave_entrance.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/forgotten_knowledge/cave_entrance.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/movements_cave_entrance.lua diff --git a/data-otservbr-global/scripts/movements/quests/forgotten_knowledge/challenger.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/movements_challenger.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/forgotten_knowledge/challenger.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/movements_challenger.lua diff --git a/data-otservbr-global/scripts/movements/quests/forgotten_knowledge/dragonking_vortex.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/movements_dragonking_vortex.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/forgotten_knowledge/dragonking_vortex.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/movements_dragonking_vortex.lua diff --git a/data-otservbr-global/scripts/movements/quests/forgotten_knowledge/entrance_teleport.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/movements_entrance_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/forgotten_knowledge/entrance_teleport.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/movements_entrance_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/forgotten_knowledge/fount.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/movements_fount.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/forgotten_knowledge/fount.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/movements_fount.lua diff --git a/data-otservbr-global/scripts/movements/quests/forgotten_knowledge/ice_teleport.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/movements_ice_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/forgotten_knowledge/ice_teleport.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/movements_ice_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/forgotten_knowledge/lava_teleport.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/movements_lava_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/forgotten_knowledge/lava_teleport.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/movements_lava_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/forgotten_knowledge/servant_teleport.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/movements_servant_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/forgotten_knowledge/servant_teleport.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/movements_servant_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/forgotten_knowledge/teleport_tree.lua b/data-otservbr-global/scripts/quests/forgotten_knowledge/movements_teleport_tree.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/forgotten_knowledge/teleport_tree.lua rename to data-otservbr-global/scripts/quests/forgotten_knowledge/movements_teleport_tree.lua diff --git a/data-otservbr-global/scripts/movements/quests/formogar_mine_hoist/hoist.lua b/data-otservbr-global/scripts/quests/formogar_mine_hoist/movements_hoist.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/formogar_mine_hoist/hoist.lua rename to data-otservbr-global/scripts/quests/formogar_mine_hoist/movements_hoist.lua diff --git a/data-otservbr-global/scripts/actions/quests/grave_danger/bosses_killed.lua b/data-otservbr-global/scripts/quests/grave_danger/actions_bosses_killed.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/grave_danger/bosses_killed.lua rename to data-otservbr-global/scripts/quests/grave_danger/actions_bosses_killed.lua diff --git a/data-otservbr-global/scripts/actions/quests/grave_danger/cobra_bastion/scarlett.lua b/data-otservbr-global/scripts/quests/grave_danger/cobra_bastion/actions_scarlett.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/grave_danger/cobra_bastion/scarlett.lua rename to data-otservbr-global/scripts/quests/grave_danger/cobra_bastion/actions_scarlett.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/grave_danger/cobra_bastion/scarlett.lua b/data-otservbr-global/scripts/quests/grave_danger/cobra_bastion/creaturescripts_scarlett.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/grave_danger/cobra_bastion/scarlett.lua rename to data-otservbr-global/scripts/quests/grave_danger/cobra_bastion/creaturescripts_scarlett.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/grave_danger/cobra_bastion/ugly_monster.lua b/data-otservbr-global/scripts/quests/grave_danger/cobra_bastion/creaturescripts_ugly_monster.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/grave_danger/cobra_bastion/ugly_monster.lua rename to data-otservbr-global/scripts/quests/grave_danger/cobra_bastion/creaturescripts_ugly_monster.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/grave_danger/sirs.lua b/data-otservbr-global/scripts/quests/grave_danger/creaturescripts_sirs.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/grave_danger/sirs.lua rename to data-otservbr-global/scripts/quests/grave_danger/creaturescripts_sirs.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/grave_danger/zelosDeath.lua b/data-otservbr-global/scripts/quests/grave_danger/creaturescripts_zelosDeath.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/grave_danger/zelosDeath.lua rename to data-otservbr-global/scripts/quests/grave_danger/creaturescripts_zelosDeath.lua diff --git a/data-otservbr-global/scripts/globalevents/quests/cobra_minis_custodian.lua b/data-otservbr-global/scripts/quests/grave_danger/globalevents_cobra_minis_custodian.lua similarity index 100% rename from data-otservbr-global/scripts/globalevents/quests/cobra_minis_custodian.lua rename to data-otservbr-global/scripts/quests/grave_danger/globalevents_cobra_minis_custodian.lua diff --git a/data-otservbr-global/scripts/globalevents/quests/cobra_minis_gaffir.lua b/data-otservbr-global/scripts/quests/grave_danger/globalevents_cobra_minis_gaffir.lua similarity index 100% rename from data-otservbr-global/scripts/globalevents/quests/cobra_minis_gaffir.lua rename to data-otservbr-global/scripts/quests/grave_danger/globalevents_cobra_minis_gaffir.lua diff --git a/data-otservbr-global/scripts/globalevents/quests/cobra_minis_quaid.lua b/data-otservbr-global/scripts/quests/grave_danger/globalevents_cobra_minis_quaid.lua similarity index 100% rename from data-otservbr-global/scripts/globalevents/quests/cobra_minis_quaid.lua rename to data-otservbr-global/scripts/quests/grave_danger/globalevents_cobra_minis_quaid.lua diff --git a/data-otservbr-global/scripts/movements/quests/grave_danger/firewall_gaffir.lua b/data-otservbr-global/scripts/quests/grave_danger/movements_firewall_gaffir.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/grave_danger/firewall_gaffir.lua rename to data-otservbr-global/scripts/quests/grave_danger/movements_firewall_gaffir.lua diff --git a/data-otservbr-global/scripts/movements/quests/grave_danger/teleport_king_zelos.lua b/data-otservbr-global/scripts/quests/grave_danger/movements_teleport_king_zelos.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/grave_danger/teleport_king_zelos.lua rename to data-otservbr-global/scripts/quests/grave_danger/movements_teleport_king_zelos.lua diff --git a/data-otservbr-global/scripts/actions/quests/gravedigger/amforas.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_amforas.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/gravedigger/amforas.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_amforas.lua diff --git a/data-otservbr-global/scripts/actions/quests/gravedigger/ashes.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_ashes.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/gravedigger/ashes.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_ashes.lua diff --git a/data-otservbr-global/scripts/actions/quests/gravedigger/blood.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_blood.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/gravedigger/blood.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_blood.lua diff --git a/data-otservbr-global/scripts/actions/quests/gravedigger/bones.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_bones.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/gravedigger/bones.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_bones.lua diff --git a/data-otservbr-global/scripts/actions/quests/gravedigger/bookcase.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_bookcase.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/gravedigger/bookcase.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_bookcase.lua diff --git a/data-otservbr-global/scripts/actions/quests/gravedigger/brain.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_brain.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/gravedigger/brain.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_brain.lua diff --git a/data-otservbr-global/scripts/actions/quests/gravedigger/caixa.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_caixa.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/gravedigger/caixa.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_caixa.lua diff --git a/data-otservbr-global/scripts/actions/quests/gravedigger/candles.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_candles.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/gravedigger/candles.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_candles.lua diff --git a/data-otservbr-global/scripts/actions/quests/gravedigger/cape.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_cape.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/gravedigger/cape.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_cape.lua diff --git a/data-otservbr-global/scripts/actions/quests/gravedigger/chalk.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_chalk.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/gravedigger/chalk.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_chalk.lua diff --git a/data-otservbr-global/scripts/actions/quests/gravedigger/flask.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_flask.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/gravedigger/flask.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_flask.lua diff --git a/data-otservbr-global/scripts/actions/quests/gravedigger/hallowed.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_hallowed.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/gravedigger/hallowed.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_hallowed.lua diff --git a/data-otservbr-global/scripts/actions/quests/gravedigger/inscriptions.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_inscriptions.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/gravedigger/inscriptions.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_inscriptions.lua diff --git a/data-otservbr-global/scripts/actions/quests/gravedigger/key1.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_key1.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/gravedigger/key1.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_key1.lua diff --git a/data-otservbr-global/scripts/actions/quests/gravedigger/key2.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_key2.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/gravedigger/key2.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_key2.lua diff --git a/data-otservbr-global/scripts/actions/quests/gravedigger/monks.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_monks.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/gravedigger/monks.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_monks.lua diff --git a/data-otservbr-global/scripts/actions/quests/gravedigger/palanca.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_palanca.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/gravedigger/palanca.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_palanca.lua diff --git a/data-otservbr-global/scripts/actions/quests/gravedigger/pyramids1.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_pyramids1.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/gravedigger/pyramids1.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_pyramids1.lua diff --git a/data-otservbr-global/scripts/actions/quests/gravedigger/pyramids2.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_pyramids2.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/gravedigger/pyramids2.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_pyramids2.lua diff --git a/data-otservbr-global/scripts/actions/quests/gravedigger/sacrifice.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_sacrifice.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/gravedigger/sacrifice.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_sacrifice.lua diff --git a/data-otservbr-global/scripts/actions/quests/gravedigger/scroll.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_scroll.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/gravedigger/scroll.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_scroll.lua diff --git a/data-otservbr-global/scripts/actions/quests/gravedigger/statue.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_statue.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/gravedigger/statue.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_statue.lua diff --git a/data-otservbr-global/scripts/actions/quests/gravedigger/tears.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_tears.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/gravedigger/tears.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_tears.lua diff --git a/data-otservbr-global/scripts/actions/quests/gravedigger/tincture.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_tincture.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/gravedigger/tincture.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_tincture.lua diff --git a/data-otservbr-global/scripts/actions/quests/grimvale/ancient_feud_entrances.lua b/data-otservbr-global/scripts/quests/grimvale/actions_ancient_feud_entrances.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/grimvale/ancient_feud_entrances.lua rename to data-otservbr-global/scripts/quests/grimvale/actions_ancient_feud_entrances.lua diff --git a/data-otservbr-global/scripts/actions/quests/grimvale/closed_silvered_trap.lua b/data-otservbr-global/scripts/quests/grimvale/actions_closed_silvered_trap.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/grimvale/closed_silvered_trap.lua rename to data-otservbr-global/scripts/quests/grimvale/actions_closed_silvered_trap.lua diff --git a/data-otservbr-global/scripts/actions/quests/grimvale/portal_minis_ancient_feud.lua b/data-otservbr-global/scripts/quests/grimvale/actions_portal_minis_ancient_feud.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/grimvale/portal_minis_ancient_feud.lua rename to data-otservbr-global/scripts/quests/grimvale/actions_portal_minis_ancient_feud.lua diff --git a/data-otservbr-global/scripts/actions/quests/grimvale/portal_minis_grimvale.lua b/data-otservbr-global/scripts/quests/grimvale/actions_portal_minis_grimvale.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/grimvale/portal_minis_grimvale.lua rename to data-otservbr-global/scripts/quests/grimvale/actions_portal_minis_grimvale.lua diff --git a/data-otservbr-global/scripts/actions/quests/grimvale/silver_liquid.lua b/data-otservbr-global/scripts/quests/grimvale/actions_silver_liquid.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/grimvale/silver_liquid.lua rename to data-otservbr-global/scripts/quests/grimvale/actions_silver_liquid.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/grimvale/feroxa_transform.lua b/data-otservbr-global/scripts/quests/grimvale/creaturescripts_feroxa_transform.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/grimvale/feroxa_transform.lua rename to data-otservbr-global/scripts/quests/grimvale/creaturescripts_feroxa_transform.lua diff --git a/data-otservbr-global/scripts/globalevents/quests/grimvale_feroxa.lua b/data-otservbr-global/scripts/quests/grimvale/globalevents_grimvale_feroxa.lua similarity index 100% rename from data-otservbr-global/scripts/globalevents/quests/grimvale_feroxa.lua rename to data-otservbr-global/scripts/quests/grimvale/globalevents_grimvale_feroxa.lua diff --git a/data-otservbr-global/scripts/movements/quests/grimvale/silvered_trap.lua b/data-otservbr-global/scripts/quests/grimvale/movements_silvered_trap.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/grimvale/silvered_trap.lua rename to data-otservbr-global/scripts/quests/grimvale/movements_silvered_trap.lua diff --git a/data-otservbr-global/scripts/movements/quests/grimvale/strangely_glowing_mark.lua b/data-otservbr-global/scripts/quests/grimvale/movements_strangely_glowing_mark.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/grimvale/strangely_glowing_mark.lua rename to data-otservbr-global/scripts/quests/grimvale/movements_strangely_glowing_mark.lua diff --git a/data-otservbr-global/scripts/actions/quests/heart_of_destruction/charges_lever.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/actions_charges_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/heart_of_destruction/charges_lever.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/actions_charges_lever.lua diff --git a/data-otservbr-global/scripts/actions/quests/heart_of_destruction/cracklers_lever.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/actions_cracklers_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/heart_of_destruction/cracklers_lever.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/actions_cracklers_lever.lua diff --git a/data-otservbr-global/scripts/actions/quests/heart_of_destruction/devourer_access.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/actions_devourer_access.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/heart_of_destruction/devourer_access.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/actions_devourer_access.lua diff --git a/data-otservbr-global/scripts/actions/quests/heart_of_destruction/final_lever.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/actions_final_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/heart_of_destruction/final_lever.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/actions_final_lever.lua diff --git a/data-otservbr-global/scripts/actions/quests/heart_of_destruction/reward.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/actions_reward.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/heart_of_destruction/reward.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/actions_reward.lua diff --git a/data-otservbr-global/scripts/actions/quests/heart_of_destruction/sparks_lever.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/actions_sparks_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/heart_of_destruction/sparks_lever.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/actions_sparks_lever.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/aftershock_transform.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_aftershock_transform.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/aftershock_transform.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_aftershock_transform.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/anomaly_transform.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_anomaly_transform.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/anomaly_transform.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_anomaly_transform.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/charged_anomaly_death.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_charged_anomaly_death.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/charged_anomaly_death.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_charged_anomaly_death.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/charged_disruption_transform.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_charged_disruption_transform.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/charged_disruption_transform.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_charged_disruption_transform.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/charger_spawn.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_charger_spawn.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/charger_spawn.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_charger_spawn.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/charging_out_death.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_charging_out_death.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/charging_out_death.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_charging_out_death.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/crackler_transform.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_crackler_transform.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/crackler_transform.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_crackler_transform.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/depolarized_death.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_depolarized_death.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/depolarized_death.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_depolarized_death.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/depolarized_transform.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_depolarized_transform.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/depolarized_transform.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_depolarized_transform.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/devourer_player_death.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_devourer_player_death.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/devourer_player_death.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_devourer_player_death.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/disruption_transform.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_disruption_transform.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/disruption_transform.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_disruption_transform.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/eradicator_transform.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_eradicator_transform.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/eradicator_transform.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_eradicator_transform.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/foreshock_transform.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_foreshock_transform.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/foreshock_transform.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_foreshock_transform.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/heart_boss_death.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_heart_boss_death.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/heart_boss_death.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_heart_boss_death.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/heart_minion_death.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_heart_minion_death.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/heart_minion_death.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_heart_minion_death.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/outburst_charge.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_outburst_charge.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/outburst_charge.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_outburst_charge.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/overcharge_death.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_overcharge_death.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/overcharge_death.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_overcharge_death.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/rupture_heal.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_rupture_heal.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/rupture_heal.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_rupture_heal.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/rupture_resonance.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_rupture_resonance.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/rupture_resonance.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_rupture_resonance.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/shocks_death.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_shocks_death.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/shocks_death.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_shocks_death.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/spark_death.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_spark_death.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/spark_death.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_spark_death.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/spark_devourer_death.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_spark_devourer_death.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/spark_devourer_death.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/creaturescripts_spark_devourer_death.lua diff --git a/data-otservbr-global/scripts/movements/quests/heart_of_destruction/ice_crack.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/movements_ice_crack.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/heart_of_destruction/ice_crack.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/movements_ice_crack.lua diff --git a/data-otservbr-global/scripts/movements/quests/heart_of_destruction/teleport.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/movements_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/heart_of_destruction/teleport.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/movements_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/heart_of_destruction/teleport_heart.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/movements_teleport_heart.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/heart_of_destruction/teleport_heart.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/movements_teleport_heart.lua diff --git a/data-otservbr-global/scripts/movements/quests/heart_of_destruction/vortex_anomaly.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/movements_vortex_anomaly.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/heart_of_destruction/vortex_anomaly.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/movements_vortex_anomaly.lua diff --git a/data-otservbr-global/scripts/movements/quests/heart_of_destruction/vortex_crackler.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/movements_vortex_crackler.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/heart_of_destruction/vortex_crackler.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/movements_vortex_crackler.lua diff --git a/data-otservbr-global/scripts/movements/quests/heart_of_destruction/vortex_hunger.lua b/data-otservbr-global/scripts/quests/heart_of_destruction/movements_vortex_hunger.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/heart_of_destruction/vortex_hunger.lua rename to data-otservbr-global/scripts/quests/heart_of_destruction/movements_vortex_hunger.lua diff --git a/data-otservbr-global/scripts/actions/quests/hero_of_rathleton/machines_deep_terror.lua b/data-otservbr-global/scripts/quests/hero_of_rathleton/actions_machines_deep_terror.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/hero_of_rathleton/machines_deep_terror.lua rename to data-otservbr-global/scripts/quests/hero_of_rathleton/actions_machines_deep_terror.lua diff --git a/data-otservbr-global/scripts/actions/quests/hero_of_rathleton/machines_glooth_horror.lua b/data-otservbr-global/scripts/quests/hero_of_rathleton/actions_machines_glooth_horror.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/hero_of_rathleton/machines_glooth_horror.lua rename to data-otservbr-global/scripts/quests/hero_of_rathleton/actions_machines_glooth_horror.lua diff --git a/data-otservbr-global/scripts/actions/quests/hero_of_rathleton/machines_lava.lua b/data-otservbr-global/scripts/quests/hero_of_rathleton/actions_machines_lava.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/hero_of_rathleton/machines_lava.lua rename to data-otservbr-global/scripts/quests/hero_of_rathleton/actions_machines_lava.lua diff --git a/data-otservbr-global/scripts/actions/quests/hero_of_rathleton/machines_professor_maxxen.lua b/data-otservbr-global/scripts/quests/hero_of_rathleton/actions_machines_professor_maxxen.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/hero_of_rathleton/machines_professor_maxxen.lua rename to data-otservbr-global/scripts/quests/hero_of_rathleton/actions_machines_professor_maxxen.lua diff --git a/data-otservbr-global/scripts/actions/quests/hero_of_rathleton/raging_corpse.lua b/data-otservbr-global/scripts/quests/hero_of_rathleton/actions_raging_corpse.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/hero_of_rathleton/raging_corpse.lua rename to data-otservbr-global/scripts/quests/hero_of_rathleton/actions_raging_corpse.lua diff --git a/data-otservbr-global/scripts/actions/quests/hero_of_rathleton/reward.lua b/data-otservbr-global/scripts/quests/hero_of_rathleton/actions_reward.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/hero_of_rathleton/reward.lua rename to data-otservbr-global/scripts/quests/hero_of_rathleton/actions_reward.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/hero_of_rathleton/bosses_kill.lua b/data-otservbr-global/scripts/quests/hero_of_rathleton/creaturescripts_bosses_kill.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/hero_of_rathleton/bosses_kill.lua rename to data-otservbr-global/scripts/quests/hero_of_rathleton/creaturescripts_bosses_kill.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/hero_of_rathleton/glooth_horror.lua b/data-otservbr-global/scripts/quests/hero_of_rathleton/creaturescripts_glooth_horror.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/hero_of_rathleton/glooth_horror.lua rename to data-otservbr-global/scripts/quests/hero_of_rathleton/creaturescripts_glooth_horror.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/hero_of_rathleton/tentacle.lua b/data-otservbr-global/scripts/quests/hero_of_rathleton/creaturescripts_tentacle.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/hero_of_rathleton/tentacle.lua rename to data-otservbr-global/scripts/quests/hero_of_rathleton/creaturescripts_tentacle.lua diff --git a/data-otservbr-global/scripts/movements/quests/hero_of_rathleton/deep_terror.lua b/data-otservbr-global/scripts/quests/hero_of_rathleton/movements_deep_terror.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/hero_of_rathleton/deep_terror.lua rename to data-otservbr-global/scripts/quests/hero_of_rathleton/movements_deep_terror.lua diff --git a/data-otservbr-global/scripts/movements/quests/hero_of_rathleton/exit.lua b/data-otservbr-global/scripts/quests/hero_of_rathleton/movements_exit.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/hero_of_rathleton/exit.lua rename to data-otservbr-global/scripts/quests/hero_of_rathleton/movements_exit.lua diff --git a/data-otservbr-global/scripts/movements/quests/hero_of_rathleton/fast_way.lua b/data-otservbr-global/scripts/quests/hero_of_rathleton/movements_fast_way.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/hero_of_rathleton/fast_way.lua rename to data-otservbr-global/scripts/quests/hero_of_rathleton/movements_fast_way.lua diff --git a/data-otservbr-global/scripts/movements/quests/hero_of_rathleton/glooth_horror.lua b/data-otservbr-global/scripts/quests/hero_of_rathleton/movements_glooth_horror.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/hero_of_rathleton/glooth_horror.lua rename to data-otservbr-global/scripts/quests/hero_of_rathleton/movements_glooth_horror.lua diff --git a/data-otservbr-global/scripts/movements/quests/hero_of_rathleton/lava.lua b/data-otservbr-global/scripts/quests/hero_of_rathleton/movements_lava.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/hero_of_rathleton/lava.lua rename to data-otservbr-global/scripts/quests/hero_of_rathleton/movements_lava.lua diff --git a/data-otservbr-global/scripts/movements/quests/hero_of_rathleton/professor_maxxen.lua b/data-otservbr-global/scripts/quests/hero_of_rathleton/movements_professor_maxxen.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/hero_of_rathleton/professor_maxxen.lua rename to data-otservbr-global/scripts/quests/hero_of_rathleton/movements_professor_maxxen.lua diff --git a/data-otservbr-global/scripts/actions/quests/hot_cuisine/cookbook1.lua b/data-otservbr-global/scripts/quests/hot_cuisine/actions_cookbook1.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/hot_cuisine/cookbook1.lua rename to data-otservbr-global/scripts/quests/hot_cuisine/actions_cookbook1.lua diff --git a/data-otservbr-global/scripts/actions/quests/hot_cuisine/cookbook2.lua b/data-otservbr-global/scripts/quests/hot_cuisine/actions_cookbook2.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/hot_cuisine/cookbook2.lua rename to data-otservbr-global/scripts/quests/hot_cuisine/actions_cookbook2.lua diff --git a/data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/charm.lua b/data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_charm.lua similarity index 87% rename from data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/charm.lua rename to data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_charm.lua index 3b79b84639a..d7085e9f10b 100644 --- a/data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/charm.lua +++ b/data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_charm.lua @@ -1,7 +1,7 @@ local inServiceYalaharCharm = Action() function inServiceYalaharCharm.onUse(player, item, fromPosition, target, toPosition, isHotkey) if target.actionid == 100 and target.itemid == 596 then - if player:getStorageValue(Storage.InServiceofYalahar.Questline) == 36 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 36 then player:removeItem(8822, 1) Game.createItem(8823, 1, toPosition) toPosition:sendMagicEffect(CONST_ME_CARNIPHILA) diff --git a/data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/formula.lua b/data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_formula.lua similarity index 86% rename from data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/formula.lua rename to data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_formula.lua index 49827363a9a..41501b5de74 100644 --- a/data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/formula.lua +++ b/data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_formula.lua @@ -3,7 +3,7 @@ function inServiceYalaharFormula.onUse(player, item, fromPosition, target, toPos if not table.contains({ 2535, 2536, 2537, 2538, 2539, 2540, 2541, 2542, 8997 }, target.itemid) then return false end - player:setStorageValue(Storage.InServiceofYalahar.GoodSide, 0) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.GoodSide, 0) item:remove(1) toPosition:sendMagicEffect(CONST_ME_MAGIC_GREEN) player:say("You burned the alchemist formula.", TALKTYPE_MONSTER_SAY) diff --git a/data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/ghost.lua b/data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_ghost.lua similarity index 78% rename from data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/ghost.lua rename to data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_ghost.lua index f9c873247d2..cca54ef4bed 100644 --- a/data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/ghost.lua +++ b/data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_ghost.lua @@ -26,8 +26,8 @@ function inServiceYalaharGhost.onUse(player, item, fromPosition, target, toPosit player:say("The ghost charm is charging.", TALKTYPE_MONSTER_SAY) if target.itemid == 8859 then - player:setStorageValue(Storage.InServiceofYalahar.Questline, 37) - player:setStorageValue(Storage.InServiceofYalahar.Mission06, 3) -- StorageValue for Questlog "Mission 06: Frightening Fuel" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 37) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission06, 3) -- StorageValue for Questlog "Mission 06: Frightening Fuel" player:removeItem(8822, 1) end return true diff --git a/data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/last_fight.lua b/data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_last_fight.lua similarity index 89% rename from data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/last_fight.lua rename to data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_last_fight.lua index 7423821b69a..ca5f655ec56 100644 --- a/data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/last_fight.lua +++ b/data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_last_fight.lua @@ -20,7 +20,7 @@ local effectPositions = { } local function doClearAreaAzerus() - if Game.getStorageValue(GlobalStorage.InServiceOfYalahar.LastFight) == 1 then + if Game.getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.LastFight) == 1 then local spectators, spectator = Game.getSpectators(Position(32783, 31166, 10), false, false, 10, 10, 10, 10) for i = 1, #spectators do spectator = spectators[i] @@ -29,7 +29,7 @@ local function doClearAreaAzerus() spectator:remove() end end - Game.setStorageValue(GlobalStorage.InServiceOfYalahar.LastFight, 0) + Game.setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.LastFight, 0) end return true end @@ -56,7 +56,7 @@ end local inServiceYalaharLastFight = Action() function inServiceYalaharLastFight.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if Game.getStorageValue(GlobalStorage.InServiceOfYalahar.LastFight) == 1 then + if Game.getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.LastFight) == 1 then player:say("You have to wait some time before this globe charges.", TALKTYPE_MONSTER_SAY) return true end @@ -70,7 +70,7 @@ function inServiceYalaharLastFight.onUse(player, item, fromPosition, target, toP return true end - Game.setStorageValue(GlobalStorage.InServiceOfYalahar.LastFight, 1) + Game.setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.LastFight, 1) addEvent(Game.createMonster, 18 * 1000, "Azerus2", Position(32783, 31167, 10), false, true) --addEvent(Game.createMonster, 18 * 1000, "Azerus2", Position(32783, 31167, 10)) diff --git a/data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/matrix.lua b/data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_matrix.lua similarity index 57% rename from data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/matrix.lua rename to data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_matrix.lua index 968db120a9a..5b9f9a2f894 100644 --- a/data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/matrix.lua +++ b/data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_matrix.lua @@ -1,13 +1,13 @@ local inServiceYalaharMatrix = Action() function inServiceYalaharMatrix.onUse(player, item, fromPosition, target, toPosition, isHotkey) if table.contains({ 842, 843 }, target.itemid) and target.actionid == 100 then - if table.contains({ 8828, 8829 }, item.itemid) and player:getStorageValue(Storage.InServiceofYalahar.MatrixState) < 1 then - player:setStorageValue(Storage.InServiceofYalahar.MatrixState, 1) + if table.contains({ 8828, 8829 }, item.itemid) and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.MatrixState) < 1 then + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.MatrixState, 1) item:remove(1) toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) player:say("The machine was activated.", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 46) - player:setStorageValue(Storage.InServiceofYalahar.Mission08, 3) -- StorageValue for Questlog "Mission 08: Dangerous Machinations" + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 46) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission08, 3) -- StorageValue for Questlog "Mission 08: Dangerous Machinations" end end return true diff --git a/data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/mechanism.lua b/data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_mechanism.lua similarity index 94% rename from data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/mechanism.lua rename to data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_mechanism.lua index f04a0bf1d4b..692c5db16f8 100644 --- a/data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/mechanism.lua +++ b/data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_mechanism.lua @@ -21,7 +21,7 @@ local mechanisms2 = { local inServiceYalaharMechanism = Action() function inServiceYalaharMechanism.onUse(player, item, fromPosition, target, toPosition, isHotkey) if mechanisms[item.uid] then - if player:getStorageValue(Storage.InServiceofYalahar.Questline) >= mechanisms[item.uid].value then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) >= mechanisms[item.uid].value then player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:teleportTo(mechanisms[item.uid].pos) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) diff --git a/data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/morik_summon.lua b/data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_morik_summon.lua similarity index 60% rename from data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/morik_summon.lua rename to data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_morik_summon.lua index a0af87959d1..3170e659457 100644 --- a/data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/morik_summon.lua +++ b/data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_morik_summon.lua @@ -1,10 +1,10 @@ local inServiceYalaharMorik = Action() function inServiceYalaharMorik.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.uid == 1015 then - if player:getStorageValue(Storage.InServiceofYalahar.Questline) == 31 and player:getStorageValue(Storage.InServiceofYalahar.MorikSummon) < 1 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 31 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.MorikSummon) < 1 then local ret = Game.createMonster("Morik the Gladiator", fromPosition) ret:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - player:setStorageValue(Storage.InServiceofYalahar.MorikSummon, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.MorikSummon, 1) end end return true diff --git a/data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/mr_west_door.lua b/data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_mr_west_door.lua similarity index 59% rename from data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/mr_west_door.lua rename to data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_mr_west_door.lua index 29e3b7196de..0ee3e5e3078 100644 --- a/data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/mr_west_door.lua +++ b/data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_mr_west_door.lua @@ -1,19 +1,19 @@ local inServiceYalaharWest = Action() function inServiceYalaharWest.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.uid == 3081 then - if player:getStorageValue(Storage.InServiceofYalahar.Questline) >= 24 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) >= 24 then if item.itemid == 5287 then player:teleportTo(toPosition, true) item:transform(5288) - player:setStorageValue(Storage.InServiceofYalahar.MrWestDoor, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.MrWestDoor, 1) end end elseif item.uid == 3082 then - if player:getStorageValue(Storage.InServiceofYalahar.Questline) >= 24 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) >= 24 then if item.itemid == 6260 then player:teleportTo(toPosition, true) item:transform(6261) - player:setStorageValue(Storage.InServiceofYalahar.MrWestDoor, 2) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.MrWestDoor, 2) end end end diff --git a/data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/reward.lua b/data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_reward.lua similarity index 50% rename from data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/reward.lua rename to data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_reward.lua index bad7fcdf1cb..f40c5f1aedd 100644 --- a/data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/reward.lua +++ b/data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_reward.lua @@ -1,27 +1,27 @@ local inServiceYalaharReward = Action() function inServiceYalaharReward.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.uid == 3088 then - if player:getStorageValue(Storage.InServiceofYalahar.Questline) == 53 then - player:setStorageValue(Storage.InServiceofYalahar.Questline, 54) - player:setStorageValue(Storage.InServiceofYalahar.Mission10, 5) -- StorageValue for Questlog "Mission 10: The Final Battle" + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 53 then + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 54) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission10, 5) -- StorageValue for Questlog "Mission 10: The Final Battle" player:addItem(8862, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a yalahari armor.") else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The chest is empty.") end elseif item.uid == 3089 then - if player:getStorageValue(Storage.InServiceofYalahar.Questline) == 53 then - player:setStorageValue(Storage.InServiceofYalahar.Questline, 54) - player:setStorageValue(Storage.InServiceofYalahar.Mission10, 5) -- StorageValue for Questlog "Mission 10: The Final Battle" + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 53 then + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 54) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission10, 5) -- StorageValue for Questlog "Mission 10: The Final Battle" player:addItem(8864, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a yalahari mask.") else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The chest is empty.") end elseif item.uid == 3090 then - if player:getStorageValue(Storage.InServiceofYalahar.Questline) == 53 then - player:setStorageValue(Storage.InServiceofYalahar.Questline, 54) - player:setStorageValue(Storage.InServiceofYalahar.Mission10, 5) -- StorageValue for Questlog "Mission 10: The Final Battle" + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 53 then + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 54) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission10, 5) -- StorageValue for Questlog "Mission 10: The Final Battle" player:addItem(8863, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a yalahari leg piece.") else diff --git a/data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/yalahar_machine_war_golems.lua b/data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_yalahar_machine_war_golems.lua similarity index 91% rename from data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/yalahar_machine_war_golems.lua rename to data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_yalahar_machine_war_golems.lua index b735a7e4e54..427fa09e07c 100644 --- a/data-otservbr-global/scripts/actions/quests/in_service_of_yalahar/yalahar_machine_war_golems.lua +++ b/data-otservbr-global/scripts/quests/in_service_of_yalahar/actions_yalahar_machine_war_golems.lua @@ -1,6 +1,6 @@ local config = { [23700] = { - storage = GlobalStorage.InServiceOfYalahar.WarGolemsMachine1, + storage = Storage.Quest.U8_4.InServiceOfYalahar.WarGolemsMachine1, machines = { { x = 32882, y = 31323, z = 10 }, { x = 32882, y = 31320, z = 10 }, @@ -9,7 +9,7 @@ local config = { }, }, [23701] = { - storage = GlobalStorage.InServiceOfYalahar.WarGolemsMachine2, + storage = Storage.Quest.U8_4.InServiceOfYalahar.WarGolemsMachine2, machines = { { x = 32869, y = 31322, z = 10 }, { x = 32869, y = 31320, z = 10 }, diff --git a/data-otservbr-global/scripts/creaturescripts/quests/in_service_of_yalahar/azerus_kill.lua b/data-otservbr-global/scripts/quests/in_service_of_yalahar/creaturescritps_azerus_kill.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/in_service_of_yalahar/azerus_kill.lua rename to data-otservbr-global/scripts/quests/in_service_of_yalahar/creaturescritps_azerus_kill.lua diff --git a/data-otservbr-global/scripts/quests/in_service_of_yalahar/creaturescritps_diseased_trio_kill.lua b/data-otservbr-global/scripts/quests/in_service_of_yalahar/creaturescritps_diseased_trio_kill.lua new file mode 100644 index 00000000000..e12c79d32d0 --- /dev/null +++ b/data-otservbr-global/scripts/quests/in_service_of_yalahar/creaturescritps_diseased_trio_kill.lua @@ -0,0 +1,27 @@ +local diseasedTrio = { + ["diseased bill"] = Storage.Quest.U8_4.InServiceOfYalahar.DiseasedBill, + ["diseased dan"] = Storage.Quest.U8_4.InServiceOfYalahar.DiseasedDan, + ["diseased fred"] = Storage.Quest.U8_4.InServiceOfYalahar.DiseasedFred, +} + +local diseasedTrioKill = CreatureEvent("DiseasedTrioDeath") +function diseasedTrioKill.onDeath(creature) + local bossStorage = diseasedTrio[creature:getName():lower()] + if not bossStorage then + return true + end + + onDeathForDamagingPlayers(creature, function(creature, player) + if player:getStorageValue(bossStorage) < 1 then + player:setStorageValue(bossStorage, 1) + player:say("You slayed " .. creature:getName() .. ".", TALKTYPE_MONSTER_SAY) + end + + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.DiseasedDan) == 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.DiseasedBill) == 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.DiseasedFred) == 1 and player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.AlchemistFormula) ~= 1 then + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.AlchemistFormula, 0) + end + end) + return true +end + +diseasedTrioKill:register() diff --git a/data-otservbr-global/scripts/movements/quests/in_service_of_yalahar/demon_teleport.lua b/data-otservbr-global/scripts/quests/in_service_of_yalahar/movements_demon_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/in_service_of_yalahar/demon_teleport.lua rename to data-otservbr-global/scripts/quests/in_service_of_yalahar/movements_demon_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/in_service_of_yalahar/last_fight_teleport.lua b/data-otservbr-global/scripts/quests/in_service_of_yalahar/movements_last_fight_teleport.lua similarity index 77% rename from data-otservbr-global/scripts/movements/quests/in_service_of_yalahar/last_fight_teleport.lua rename to data-otservbr-global/scripts/quests/in_service_of_yalahar/movements_last_fight_teleport.lua index 775cd7968a6..0955593531b 100644 --- a/data-otservbr-global/scripts/movements/quests/in_service_of_yalahar/last_fight_teleport.lua +++ b/data-otservbr-global/scripts/quests/in_service_of_yalahar/movements_last_fight_teleport.lua @@ -7,8 +7,8 @@ function lastFightTeleport.onStepIn(creature, item, position, fromPosition) end if item.uid == 7809 then - if player:getStorageValue(Storage.InServiceofYalahar.Questline) == 51 then - if Game.getStorageValue(GlobalStorage.InServiceOfYalahar.LastFight) ~= 1 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 51 then + if Game.getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.LastFight) ~= 1 then player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:teleportTo(Position(32783, 31174, 10)) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) @@ -18,7 +18,7 @@ function lastFightTeleport.onStepIn(creature, item, position, fromPosition) player:teleportTo(fromPosition) end elseif item.uid == 7810 then - if Game.getStorageValue(GlobalStorage.InServiceOfYalahar.LastFight) ~= 1 then + if Game.getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.LastFight) ~= 1 then player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:teleportTo(Position(32784, 31178, 9)) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) diff --git a/data-otservbr-global/scripts/movements/quests/in_service_of_yalahar/morik.lua b/data-otservbr-global/scripts/quests/in_service_of_yalahar/movements_morik.lua similarity index 69% rename from data-otservbr-global/scripts/movements/quests/in_service_of_yalahar/morik.lua rename to data-otservbr-global/scripts/quests/in_service_of_yalahar/movements_morik.lua index bc810c3b126..8e0a3d13edc 100644 --- a/data-otservbr-global/scripts/movements/quests/in_service_of_yalahar/morik.lua +++ b/data-otservbr-global/scripts/quests/in_service_of_yalahar/movements_morik.lua @@ -6,10 +6,10 @@ function morik.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.InServiceofYalahar.Questline) == 51 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline) == 51 then -- StorageValue for Questlog 'Mission 10: The Final Battle' - player:setStorageValue(Storage.InServiceofYalahar.Mission10, 3) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 52) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission10, 3) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 52) player:say( "It seems by defeating Azerus you have stopped this army from entering your world! \z Better leave this ghastly place forever.", diff --git a/data-otservbr-global/scripts/movements/quests/in_service_of_yalahar/quara_vortex.lua b/data-otservbr-global/scripts/quests/in_service_of_yalahar/movements_quara_vortex.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/in_service_of_yalahar/quara_vortex.lua rename to data-otservbr-global/scripts/quests/in_service_of_yalahar/movements_quara_vortex.lua diff --git a/data-otservbr-global/scripts/movements/quests/in_service_of_yalahar/yalahar_machine_war_golems.lua b/data-otservbr-global/scripts/quests/in_service_of_yalahar/movements_yalahar_machine_war_golems.lua similarity index 89% rename from data-otservbr-global/scripts/movements/quests/in_service_of_yalahar/yalahar_machine_war_golems.lua rename to data-otservbr-global/scripts/quests/in_service_of_yalahar/movements_yalahar_machine_war_golems.lua index 13223bf913b..2cb8d26b139 100644 --- a/data-otservbr-global/scripts/movements/quests/in_service_of_yalahar/yalahar_machine_war_golems.lua +++ b/data-otservbr-global/scripts/quests/in_service_of_yalahar/movements_yalahar_machine_war_golems.lua @@ -1,10 +1,10 @@ local setting = { [23698] = { - storage = GlobalStorage.InServiceOfYalahar.WarGolemsMachine2, + storage = Storage.Quest.U8_4.InServiceOfYalahar.WarGolemsMachine2, destination = Position(32869, 31312, 11), }, [23699] = { - storage = GlobalStorage.InServiceOfYalahar.WarGolemsMachine1, + storage = Storage.Quest.U8_4.InServiceOfYalahar.WarGolemsMachine1, destination = Position(32881, 31312, 11), }, [23702] = { diff --git a/data-otservbr-global/scripts/creaturescripts/quests/in_service_of_yalahar/quara_leader_kill.lua b/data-otservbr-global/scripts/quests/in_service_of_yalahar/quara_leader_kill.lua similarity index 57% rename from data-otservbr-global/scripts/creaturescripts/quests/in_service_of_yalahar/quara_leader_kill.lua rename to data-otservbr-global/scripts/quests/in_service_of_yalahar/quara_leader_kill.lua index 91f2faeb951..b10b61227e6 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/in_service_of_yalahar/quara_leader_kill.lua +++ b/data-otservbr-global/scripts/quests/in_service_of_yalahar/quara_leader_kill.lua @@ -1,7 +1,7 @@ local quaraLeaders = { - ["inky"] = Storage.InServiceofYalahar.QuaraInky, - ["sharptooth"] = Storage.InServiceofYalahar.QuaraSharptooth, - ["splasher"] = Storage.InServiceofYalahar.QuaraSplasher, + ["inky"] = Storage.Quest.U8_4.InServiceOfYalahar.QuaraInky, + ["sharptooth"] = Storage.Quest.U8_4.InServiceOfYalahar.QuaraSharptooth, + ["splasher"] = Storage.Quest.U8_4.InServiceOfYalahar.QuaraSplasher, } local quaraLeadersKill = CreatureEvent("QuaraLeadersDeath") @@ -15,10 +15,10 @@ function quaraLeadersKill.onDeath(creature) if player:getStorageValue(bossStorage) < 1 then player:setStorageValue(bossStorage, 1) player:say("You slayed " .. creature:getName() .. ".", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.InServiceofYalahar.QuaraState, 2) - player:setStorageValue(Storage.InServiceofYalahar.Questline, 41) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.QuaraState, 2) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Questline, 41) -- StorageValue for Questlog 'Mission 07: A Fishy Mission' - player:setStorageValue(Storage.InServiceofYalahar.Mission07, 4) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission07, 4) end end) return true diff --git a/data-otservbr-global/scripts/creaturescripts/quests/killing_in_the_name_of/boss_kill.lua b/data-otservbr-global/scripts/quests/killing_in_the_name_of/creaturescripts_boss_kill.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/killing_in_the_name_of/boss_kill.lua rename to data-otservbr-global/scripts/quests/killing_in_the_name_of/creaturescripts_boss_kill.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/killing_in_the_name_of/monster_kill.lua b/data-otservbr-global/scripts/quests/killing_in_the_name_of/creaturescripts_monster_kill.lua similarity index 65% rename from data-otservbr-global/scripts/creaturescripts/quests/killing_in_the_name_of/monster_kill.lua rename to data-otservbr-global/scripts/quests/killing_in_the_name_of/creaturescripts_monster_kill.lua index f8f7ddc5c6b..c740ef12971 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/killing_in_the_name_of/monster_kill.lua +++ b/data-otservbr-global/scripts/quests/killing_in_the_name_of/creaturescripts_monster_kill.lua @@ -57,24 +57,24 @@ function deathEvent.onDeath(creature, _corpse, _lastHitKiller, mostDamageKiller) end end -- Minotaurs - killCheck(player, targetName, Storage.KillingInTheNameOf.BudrikMinos, 0, tasks.Budrik[1].creatures, Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.MinotaurCount, Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.MinotaurCount) + killCheck(player, targetName, Storage.Quest.U8_5.KillingInTheNameOf.BudrikMinos, 0, tasks.Budrik[1].creatures, Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.MinotaurCount, Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.MinotaurCount) -- Necromancers and Priestesses - killCheck(player, targetName, Storage.KillingInTheNameOf.LugriNecromancers, 0, tasks.Lugri[1].creatures, Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.NecromancerCount, Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.NecromancerCount) - killCheck(player, targetName, Storage.KillingInTheNameOf.LugriNecromancers, 3, tasks.Lugri[1].creatures, Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.NecromancerCount, Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.NecromancerCount) + killCheck(player, targetName, Storage.Quest.U8_5.KillingInTheNameOf.LugriNecromancers, 0, tasks.Lugri[1].creatures, Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.NecromancerCount, Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.NecromancerCount) + killCheck(player, targetName, Storage.Quest.U8_5.KillingInTheNameOf.LugriNecromancers, 3, tasks.Lugri[1].creatures, Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.NecromancerCount, Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.NecromancerCount) -- Green Djinns or Efreets - killCheck(player, targetName, Storage.KillingInTheNameOf.GreenDjinnTask, 0, tasks.Gabel[1].creatures, Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.GreenDjinnCount, Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.GreenDjinnCount) + killCheck(player, targetName, Storage.Quest.U8_5.KillingInTheNameOf.GreenDjinnTask, 0, tasks.Gabel[1].creatures, Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.GreenDjinnCount, Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.GreenDjinnCount) -- Blue Djinns or Marids - killCheck(player, targetName, Storage.KillingInTheNameOf.BlueDjinnTask, 0, tasks.Malor[1].creatures, Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.BlueDjinnCount, Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.BlueDjinnCount) + killCheck(player, targetName, Storage.Quest.U8_5.KillingInTheNameOf.BlueDjinnTask, 0, tasks.Malor[1].creatures, Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.BlueDjinnCount, Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.BlueDjinnCount) -- Pirates - killCheck(player, targetName, Storage.KillingInTheNameOf.PirateTask, 0, tasks.RaymondStriker[1].creatures, Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.PirateMarauderCount, Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.PirateCount) + killCheck(player, targetName, Storage.Quest.U8_5.KillingInTheNameOf.PirateTask, 0, tasks.RaymondStriker[1].creatures, Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.PirateMarauderCount, Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.PirateCount) -- Trolls - killCheck(player, targetName, Storage.KillingInTheNameOf.TrollTask, 0, tasks.DanielSteelsoul[1].creatures, Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.TrollCount, Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.TrollCount) + killCheck(player, targetName, Storage.Quest.U8_5.KillingInTheNameOf.TrollTask, 0, tasks.DanielSteelsoul[1].creatures, Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.TrollCount, Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.TrollCount) -- Goblins - killCheck(player, targetName, Storage.KillingInTheNameOf.GoblinTask, 0, tasks.DanielSteelsoul[2].creatures, Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.GoblinCount, Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.GoblinCount) + killCheck(player, targetName, Storage.Quest.U8_5.KillingInTheNameOf.GoblinTask, 0, tasks.DanielSteelsoul[2].creatures, Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.GoblinCount, Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.GoblinCount) -- Rotworms - killCheck(player, targetName, Storage.KillingInTheNameOf.RotwormTask, 0, tasks.DanielSteelsoul[3].creatures, Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.RotwormCount, Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.RotwormCount) + killCheck(player, targetName, Storage.Quest.U8_5.KillingInTheNameOf.RotwormTask, 0, tasks.DanielSteelsoul[3].creatures, Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.RotwormCount, Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.RotwormCount) -- Cyclops - killCheck(player, targetName, Storage.KillingInTheNameOf.CyclopsTask, 0, tasks.DanielSteelsoul[4].creatures, Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.CyclopsCount, Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.CyclopsCount) + killCheck(player, targetName, Storage.Quest.U8_5.KillingInTheNameOf.CyclopsTask, 0, tasks.DanielSteelsoul[4].creatures, Storage.Quest.U8_5.KillingInTheNameOf.AltKillCount.CyclopsCount, Storage.Quest.U8_5.KillingInTheNameOf.MonsterKillCount.CyclopsCount) end) return true end diff --git a/data-otservbr-global/scripts/movements/quests/killing_in_the_name_of/boss.lua b/data-otservbr-global/scripts/quests/killing_in_the_name_of/movements_boss.lua similarity index 96% rename from data-otservbr-global/scripts/movements/quests/killing_in_the_name_of/boss.lua rename to data-otservbr-global/scripts/quests/killing_in_the_name_of/movements_boss.lua index 531e3b53526..4220280abdc 100644 --- a/data-otservbr-global/scripts/movements/quests/killing_in_the_name_of/boss.lua +++ b/data-otservbr-global/scripts/quests/killing_in_the_name_of/movements_boss.lua @@ -309,7 +309,7 @@ local bosses = { }, { bossName = "tiquandas revenge", - storage = Storage.KillingInTheNameOf.MissionTiquandasRevenge, + storage = Storage.Quest.U8_5.KillingInTheNameOf.MissionTiquandasRevenge, teleportPosition = { x = 32877, y = 32583, z = 7 }, playerPosition = Position(32888, 32580, 4), bossPosition = Position(32888, 32586, 4), @@ -320,7 +320,7 @@ local bosses = { }, { bossName = "demodras", - storage = Storage.KillingInTheNameOf.MissionDemodras, + storage = Storage.Quest.U8_5.KillingInTheNameOf.MissionDemodras, teleportPosition = { x = 32769, y = 32290, z = 10 }, playerPosition = Position(32748, 32287, 10), bossPosition = Position(32747, 32294, 10), @@ -331,7 +331,7 @@ local bosses = { }, { bossName = "necropharus", - storage = Storage.KillingInTheNameOf.LugriNecromancers, + storage = Storage.Quest.U8_5.KillingInTheNameOf.LugriNecromancers, teleportPosition = { x = 33046, y = 32439, z = 11 }, playerPosition = Position(33028, 32426, 12), bossPosition = Position(33026, 32422, 12), @@ -342,7 +342,7 @@ local bosses = { }, { bossName = "the horned fox", - storage = Storage.KillingInTheNameOf.BudrikMinos, + storage = Storage.Quest.U8_5.KillingInTheNameOf.BudrikMinos, teleportPosition = { x = 32450, y = 31988, z = 9 }, playerPosition = Position(32458, 31994, 9), bossPosition = Position(32458, 32005, 9), @@ -353,7 +353,7 @@ local bosses = { }, { bossName = { "Brutus Bloodbeard", "Deadeye Devious", "lethal lissy", "Ron The Ripper" }, - storage = Storage.KillingInTheNameOf.PirateTask, + storage = Storage.Quest.U8_5.KillingInTheNameOf.PirateTask, teleportPosition = { x = 31978, y = 32853, z = 1 }, playerPosition = Position(31976, 32896, 0), bossPosition = Position(31983, 32897, 0), @@ -364,7 +364,7 @@ local bosses = { }, { bossName = "merikh the slaughterer", - storage = Storage.KillingInTheNameOf.GreenDjinnTask, + storage = Storage.Quest.U8_5.KillingInTheNameOf.GreenDjinnTask, teleportPosition = { x = 32870, y = 31112, z = 4 }, playerPosition = Position(32876, 31120, 8), bossPosition = Position(32875, 31112, 8), @@ -375,7 +375,7 @@ local bosses = { }, { bossName = "fahim the wise", - storage = Storage.KillingInTheNameOf.BlueDjinnTask, + storage = Storage.Quest.U8_5.KillingInTheNameOf.BlueDjinnTask, teleportPosition = { x = 32815, y = 31119, z = 3 }, playerPosition = Position(32811, 31121, 2), bossPosition = Position(32811, 31114, 2), diff --git a/data-otservbr-global/scripts/actions/quests/kilmaresh/augerfun.lua b/data-otservbr-global/scripts/quests/kilmaresh/actions_augerfun.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/kilmaresh/augerfun.lua rename to data-otservbr-global/scripts/quests/kilmaresh/actions_augerfun.lua diff --git a/data-otservbr-global/scripts/actions/quests/kilmaresh/basin.lua b/data-otservbr-global/scripts/quests/kilmaresh/actions_basin.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/kilmaresh/basin.lua rename to data-otservbr-global/scripts/quests/kilmaresh/actions_basin.lua diff --git a/data-otservbr-global/scripts/actions/quests/kilmaresh/books.lua b/data-otservbr-global/scripts/quests/kilmaresh/actions_books.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/kilmaresh/books.lua rename to data-otservbr-global/scripts/quests/kilmaresh/actions_books.lua diff --git a/data-otservbr-global/scripts/actions/quests/kilmaresh/cagekey.lua b/data-otservbr-global/scripts/quests/kilmaresh/actions_cagekey.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/kilmaresh/cagekey.lua rename to data-otservbr-global/scripts/quests/kilmaresh/actions_cagekey.lua diff --git a/data-otservbr-global/scripts/actions/quests/kilmaresh/coruja.lua b/data-otservbr-global/scripts/quests/kilmaresh/actions_coruja.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/kilmaresh/coruja.lua rename to data-otservbr-global/scripts/quests/kilmaresh/actions_coruja.lua diff --git a/data-otservbr-global/scripts/actions/quests/kilmaresh/glasshoneyfun.lua b/data-otservbr-global/scripts/quests/kilmaresh/actions_glasshoneyfun.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/kilmaresh/glasshoneyfun.lua rename to data-otservbr-global/scripts/quests/kilmaresh/actions_glasshoneyfun.lua diff --git a/data-otservbr-global/scripts/actions/quests/kilmaresh/lyre.lua b/data-otservbr-global/scripts/quests/kilmaresh/actions_lyre.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/kilmaresh/lyre.lua rename to data-otservbr-global/scripts/quests/kilmaresh/actions_lyre.lua diff --git a/data-otservbr-global/scripts/actions/quests/kilmaresh/peeler.lua b/data-otservbr-global/scripts/quests/kilmaresh/actions_peeler.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/kilmaresh/peeler.lua rename to data-otservbr-global/scripts/quests/kilmaresh/actions_peeler.lua diff --git a/data-otservbr-global/scripts/actions/quests/kilmaresh/peelerfun.lua b/data-otservbr-global/scripts/quests/kilmaresh/actions_peelerfun.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/kilmaresh/peelerfun.lua rename to data-otservbr-global/scripts/quests/kilmaresh/actions_peelerfun.lua diff --git a/data-otservbr-global/scripts/actions/quests/kilmaresh/pickenchanted.lua b/data-otservbr-global/scripts/quests/kilmaresh/actions_pickenchanted.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/kilmaresh/pickenchanted.lua rename to data-otservbr-global/scripts/quests/kilmaresh/actions_pickenchanted.lua diff --git a/data-otservbr-global/scripts/actions/quests/kilmaresh/portal_minis_kilmaresh.lua b/data-otservbr-global/scripts/quests/kilmaresh/actions_portal_minis_kilmaresh.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/kilmaresh/portal_minis_kilmaresh.lua rename to data-otservbr-global/scripts/quests/kilmaresh/actions_portal_minis_kilmaresh.lua diff --git a/data-otservbr-global/scripts/actions/quests/kilmaresh/sangra.lua b/data-otservbr-global/scripts/quests/kilmaresh/actions_sangra.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/kilmaresh/sangra.lua rename to data-otservbr-global/scripts/quests/kilmaresh/actions_sangra.lua diff --git a/data-otservbr-global/scripts/actions/quests/kilmaresh/scissors.lua b/data-otservbr-global/scripts/quests/kilmaresh/actions_scissors.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/kilmaresh/scissors.lua rename to data-otservbr-global/scripts/quests/kilmaresh/actions_scissors.lua diff --git a/data-otservbr-global/scripts/actions/quests/kilmaresh/scissorsfun.lua b/data-otservbr-global/scripts/quests/kilmaresh/actions_scissorsfun.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/kilmaresh/scissorsfun.lua rename to data-otservbr-global/scripts/quests/kilmaresh/actions_scissorsfun.lua diff --git a/data-otservbr-global/scripts/actions/quests/kilmaresh/tortoise.lua b/data-otservbr-global/scripts/quests/kilmaresh/actions_tortoise.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/kilmaresh/tortoise.lua rename to data-otservbr-global/scripts/quests/kilmaresh/actions_tortoise.lua diff --git a/data-otservbr-global/scripts/actions/quests/kilmaresh/tumulo.lua b/data-otservbr-global/scripts/quests/kilmaresh/actions_tumulo.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/kilmaresh/tumulo.lua rename to data-otservbr-global/scripts/quests/kilmaresh/actions_tumulo.lua diff --git a/data-otservbr-global/scripts/actions/quests/kilmaresh/tumuloerro.lua b/data-otservbr-global/scripts/quests/kilmaresh/actions_tumuloerro.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/kilmaresh/tumuloerro.lua rename to data-otservbr-global/scripts/quests/kilmaresh/actions_tumuloerro.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/kilmaresh/bragrumol.lua b/data-otservbr-global/scripts/quests/kilmaresh/creaturescripts_bragrumol.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/kilmaresh/bragrumol.lua rename to data-otservbr-global/scripts/quests/kilmaresh/creaturescripts_bragrumol.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/kilmaresh/fafnar.lua b/data-otservbr-global/scripts/quests/kilmaresh/creaturescripts_fafnar.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/kilmaresh/fafnar.lua rename to data-otservbr-global/scripts/quests/kilmaresh/creaturescripts_fafnar.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/kilmaresh/mozradek.lua b/data-otservbr-global/scripts/quests/kilmaresh/creaturescripts_mozradek.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/kilmaresh/mozradek.lua rename to data-otservbr-global/scripts/quests/kilmaresh/creaturescripts_mozradek.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/kilmaresh/xogixath.lua b/data-otservbr-global/scripts/quests/kilmaresh/creaturescripts_xogixath.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/kilmaresh/xogixath.lua rename to data-otservbr-global/scripts/quests/kilmaresh/creaturescripts_xogixath.lua diff --git a/data-otservbr-global/scripts/movements/quests/kilmaresh/firetp.lua b/data-otservbr-global/scripts/quests/kilmaresh/movements_firetp.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/kilmaresh/firetp.lua rename to data-otservbr-global/scripts/quests/kilmaresh/movements_firetp.lua diff --git a/data-otservbr-global/scripts/movements/quests/kilmaresh/steptile.lua b/data-otservbr-global/scripts/quests/kilmaresh/movements_steptile.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/kilmaresh/steptile.lua rename to data-otservbr-global/scripts/quests/kilmaresh/movements_steptile.lua diff --git a/data-otservbr-global/scripts/movements/quests/kilmaresh/tpvoc.lua b/data-otservbr-global/scripts/quests/kilmaresh/movements_tpvoc.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/kilmaresh/tpvoc.lua rename to data-otservbr-global/scripts/quests/kilmaresh/movements_tpvoc.lua diff --git a/data-otservbr-global/scripts/actions/quests/koshei_amulet/bag.lua b/data-otservbr-global/scripts/quests/koshei_the_deathless_quest/action_bag.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/koshei_amulet/bag.lua rename to data-otservbr-global/scripts/quests/koshei_the_deathless_quest/action_bag.lua diff --git a/data-otservbr-global/scripts/actions/quests/koshei_amulet/boss.lua b/data-otservbr-global/scripts/quests/koshei_the_deathless_quest/action_boss.lua similarity index 76% rename from data-otservbr-global/scripts/actions/quests/koshei_amulet/boss.lua rename to data-otservbr-global/scripts/quests/koshei_the_deathless_quest/action_boss.lua index f53d0b3c3cc..1c2e9adc59a 100644 --- a/data-otservbr-global/scripts/actions/quests/koshei_amulet/boss.lua +++ b/data-otservbr-global/scripts/quests/koshei_the_deathless_quest/action_boss.lua @@ -1,15 +1,17 @@ local kosheiBoss = Action() + function kosheiBoss.onUse(player, item, fromPosition, target, toPosition, isHotkey) if target.itemid ~= 7538 then return false end - if player:getStorageValue(Storage.SweetyCyclops.AmuletStatus) == 2 and player:getStorageValue(Storage.KosheiTheDeathless.RewardDoor) ~= 1 then + if player:getStorageValue(Storage.SweetyCyclops.AmuletStatus) == 2 and player:getStorageValue(Storage.Quest.U8_1.KosheiTheDeathless.RewardDoor) ~= 1 then player:removeItem(7532, 1) - player:setStorageValue(Storage.KosheiTheDeathless.RewardDoor, 1) + player:setStorageValue(Storage.Quest.U8_1.KosheiTheDeathless.RewardDoor, 1) toPosition:sendMagicEffect(CONST_ME_MAGIC_RED) player:say("At last.. I have it back, my precious amulet. I am glad you didn't use it! I allow you to ...ahh... enter door ...ahh", TALKTYPE_MONSTER_SAY, false, player, toPosition) end + return true end diff --git a/data-otservbr-global/scripts/actions/quests/koshei_amulet/switch.lua b/data-otservbr-global/scripts/quests/koshei_the_deathless_quest/action_switch.lua similarity index 99% rename from data-otservbr-global/scripts/actions/quests/koshei_amulet/switch.lua rename to data-otservbr-global/scripts/quests/koshei_the_deathless_quest/action_switch.lua index 12b5c26ccad..8e798af8335 100644 --- a/data-otservbr-global/scripts/actions/quests/koshei_amulet/switch.lua +++ b/data-otservbr-global/scripts/quests/koshei_the_deathless_quest/action_switch.lua @@ -16,6 +16,7 @@ local function revertCoffin() end local kosheiSwitch = Action() + function kosheiSwitch.onUse(player, item, fromPosition, target, toPosition, isHotkey) local statuesInOrder, statueItem = true, true for i = 1, #config do diff --git a/data-otservbr-global/scripts/movements/quests/krailos/access_depot.lua b/data-otservbr-global/scripts/quests/krailos/movements_access_depot.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/krailos/access_depot.lua rename to data-otservbr-global/scripts/quests/krailos/movements_access_depot.lua diff --git a/data-otservbr-global/scripts/actions/quests/lions_rock/lions_rock.lua b/data-otservbr-global/scripts/quests/lions_rock/actions_lions_rock.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/lions_rock/lions_rock.lua rename to data-otservbr-global/scripts/quests/lions_rock/actions_lions_rock.lua diff --git a/data-otservbr-global/scripts/movements/quests/lions_rock/lions_rock.lua b/data-otservbr-global/scripts/quests/lions_rock/movements_lions_rock.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/lions_rock/lions_rock.lua rename to data-otservbr-global/scripts/quests/lions_rock/movements_lions_rock.lua diff --git a/data-otservbr-global/scripts/actions/quests/liquid_black/chairteleport.lua b/data-otservbr-global/scripts/quests/liquid_black/actions_chairteleport.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/liquid_black/chairteleport.lua rename to data-otservbr-global/scripts/quests/liquid_black/actions_chairteleport.lua diff --git a/data-otservbr-global/scripts/actions/quests/liquid_black/notescoordinates.lua b/data-otservbr-global/scripts/quests/liquid_black/actions_notescoordinates.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/liquid_black/notescoordinates.lua rename to data-otservbr-global/scripts/quests/liquid_black/actions_notescoordinates.lua diff --git a/data-otservbr-global/scripts/actions/quests/liquid_black/seashell_key.lua b/data-otservbr-global/scripts/quests/liquid_black/actions_seashell_key.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/liquid_black/seashell_key.lua rename to data-otservbr-global/scripts/quests/liquid_black/actions_seashell_key.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/liquid_black/deepling_boss_kill.lua b/data-otservbr-global/scripts/quests/liquid_black/creaturescripts_deepling_boss_kill.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/liquid_black/deepling_boss_kill.lua rename to data-otservbr-global/scripts/quests/liquid_black/creaturescripts_deepling_boss_kill.lua diff --git a/data-otservbr-global/scripts/movements/quests/liquid_black/ladder.lua b/data-otservbr-global/scripts/quests/liquid_black/movements_ladder.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/liquid_black/ladder.lua rename to data-otservbr-global/scripts/quests/liquid_black/movements_ladder.lua diff --git a/data-otservbr-global/scripts/movements/quests/liquid_black/quick_access.lua b/data-otservbr-global/scripts/quests/liquid_black/movements_quick_access.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/liquid_black/quick_access.lua rename to data-otservbr-global/scripts/quests/liquid_black/movements_quick_access.lua diff --git a/data-otservbr-global/scripts/movements/quests/liquid_black/shortcut.lua b/data-otservbr-global/scripts/quests/liquid_black/movements_shortcut.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/liquid_black/shortcut.lua rename to data-otservbr-global/scripts/quests/liquid_black/movements_shortcut.lua diff --git a/data-otservbr-global/scripts/actions/quests/lower_roshamuul/bone.lua b/data-otservbr-global/scripts/quests/lower_roshamuul/actions_bone.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/lower_roshamuul/bone.lua rename to data-otservbr-global/scripts/quests/lower_roshamuul/actions_bone.lua diff --git a/data-otservbr-global/scripts/actions/quests/lower_roshamuul/chalk.lua b/data-otservbr-global/scripts/quests/lower_roshamuul/actions_chalk.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/lower_roshamuul/chalk.lua rename to data-otservbr-global/scripts/quests/lower_roshamuul/actions_chalk.lua diff --git a/data-otservbr-global/scripts/actions/quests/lower_roshamuul/gravel.lua b/data-otservbr-global/scripts/quests/lower_roshamuul/actions_gravel.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/lower_roshamuul/gravel.lua rename to data-otservbr-global/scripts/quests/lower_roshamuul/actions_gravel.lua diff --git a/data-otservbr-global/scripts/actions/quests/lower_roshamuul/mixture.lua b/data-otservbr-global/scripts/quests/lower_roshamuul/actions_mixture.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/lower_roshamuul/mixture.lua rename to data-otservbr-global/scripts/quests/lower_roshamuul/actions_mixture.lua diff --git a/data-otservbr-global/scripts/actions/quests/lower_roshamuul/mortar.lua b/data-otservbr-global/scripts/quests/lower_roshamuul/actions_mortar.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/lower_roshamuul/mortar.lua rename to data-otservbr-global/scripts/quests/lower_roshamuul/actions_mortar.lua diff --git a/data-otservbr-global/scripts/actions/quests/lower_roshamuul/resonance_chamber.lua b/data-otservbr-global/scripts/quests/lower_roshamuul/actions_resonance_chamber.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/lower_roshamuul/resonance_chamber.lua rename to data-otservbr-global/scripts/quests/lower_roshamuul/actions_resonance_chamber.lua diff --git a/data-otservbr-global/scripts/actions/quests/lower_roshamuul/trough.lua b/data-otservbr-global/scripts/quests/lower_roshamuul/actions_trough.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/lower_roshamuul/trough.lua rename to data-otservbr-global/scripts/quests/lower_roshamuul/actions_trough.lua diff --git a/data-otservbr-global/scripts/actions/quests/marapur/boss_timira_fight.lua b/data-otservbr-global/scripts/quests/marapur/actions_boss_timira_fight.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/marapur/boss_timira_fight.lua rename to data-otservbr-global/scripts/quests/marapur/actions_boss_timira_fight.lua diff --git a/data-otservbr-global/scripts/actions/quests/marapur/teleports_timira.lua b/data-otservbr-global/scripts/quests/marapur/actions_teleports_timira.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/marapur/teleports_timira.lua rename to data-otservbr-global/scripts/quests/marapur/actions_teleports_timira.lua diff --git a/data-otservbr-global/scripts/actions/quests/mintwallin_quest/devil_helmet_lever.lua b/data-otservbr-global/scripts/quests/mintwallin_quest/actions_devil_helmet_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/mintwallin_quest/devil_helmet_lever.lua rename to data-otservbr-global/scripts/quests/mintwallin_quest/actions_devil_helmet_lever.lua diff --git a/data-otservbr-global/scripts/actions/quests/mysterious_ornate/mysterious_metal_egg.lua b/data-otservbr-global/scripts/quests/mysterious_ornate/actions_mysterious_metal_egg.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/mysterious_ornate/mysterious_metal_egg.lua rename to data-otservbr-global/scripts/quests/mysterious_ornate/actions_mysterious_metal_egg.lua diff --git a/data-otservbr-global/scripts/actions/quests/oramond/glooth_fairy_lever.lua b/data-otservbr-global/scripts/quests/oramond/actions_glooth_fairy_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/oramond/glooth_fairy_lever.lua rename to data-otservbr-global/scripts/quests/oramond/actions_glooth_fairy_lever.lua diff --git a/data-otservbr-global/scripts/actions/quests/oramond/chavis_tasks/to_take_roots.lua b/data-otservbr-global/scripts/quests/oramond/chavis_tasks/actions_to_take_roots.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/oramond/chavis_tasks/to_take_roots.lua rename to data-otservbr-global/scripts/quests/oramond/chavis_tasks/actions_to_take_roots.lua diff --git a/data-otservbr-global/scripts/actions/quests/oramond/the_glooth_brothers_tasks/the_ancient_sewers.lua b/data-otservbr-global/scripts/quests/oramond/the_glooth_brothers_tasks/actions_the_ancient_sewers.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/oramond/the_glooth_brothers_tasks/the_ancient_sewers.lua rename to data-otservbr-global/scripts/quests/oramond/the_glooth_brothers_tasks/actions_the_ancient_sewers.lua diff --git a/data-otservbr-global/scripts/actions/quests/others/calassa_comb_door.lua b/data-otservbr-global/scripts/quests/others/actions_calassa_comb_door.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/others/calassa_comb_door.lua rename to data-otservbr-global/scripts/quests/others/actions_calassa_comb_door.lua diff --git a/data-otservbr-global/scripts/actions/quests/others/deeper_banuta_shortcut.lua b/data-otservbr-global/scripts/quests/others/actions_deeper_banuta_shortcut.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/others/deeper_banuta_shortcut.lua rename to data-otservbr-global/scripts/quests/others/actions_deeper_banuta_shortcut.lua diff --git a/data-otservbr-global/scripts/actions/quests/others/ectoplasm_container.lua b/data-otservbr-global/scripts/quests/others/actions_ectoplasm_container.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/others/ectoplasm_container.lua rename to data-otservbr-global/scripts/quests/others/actions_ectoplasm_container.lua diff --git a/data-otservbr-global/scripts/quests/others/actions_exterminator_flask.lua b/data-otservbr-global/scripts/quests/others/actions_exterminator_flask.lua new file mode 100644 index 00000000000..c02731008ef --- /dev/null +++ b/data-otservbr-global/scripts/quests/others/actions_exterminator_flask.lua @@ -0,0 +1,40 @@ +local config = { + [2127] = { text = "This mission stinks ... and now you do as well!", condition = true, transformId = 107 }, + [6065] = { text = "You carefully gather the quara ink", transformId = 9149 }, + [18230] = { text = "You carefully gather the stalker blood.", transformId = 125 }, +} + +local poisonField = Condition(CONDITION_OUTFIT) +poisonField:setTicks(8000) + +local exterminatorFlask = Action() + +function exterminatorFlask.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if target.actionid == 4207 then + if player:getStorageValue(Storage.TibiaTales.TheExterminator) ~= 1 then + return false + end + player:setStorageValue(Storage.TibiaTales.TheExterminator, 2) + item:transform(2874, 0) + toPosition:sendMagicEffect(CONST_ME_GREEN_RINGS) + return true + end + + -- What a Foolish Quest + local targetItem = config[target.itemid] + if not targetItem then + return false + end + + if targetItem.condition then + player:addCondition(poisonField) + end + + player:say(targetItem.text, TALKTYPE_MONSTER_SAY) + player:getPosition():sendMagicEffect(CONST_ME_HITBYPOISON) + item:transform(targetItem.transformId) + return true +end + +exterminatorFlask:id(135) +exterminatorFlask:register() diff --git a/data-otservbr-global/scripts/actions/quests/others/fire_bug.lua b/data-otservbr-global/scripts/quests/others/actions_fire_bug.lua similarity index 96% rename from data-otservbr-global/scripts/actions/quests/others/fire_bug.lua rename to data-otservbr-global/scripts/quests/others/actions_fire_bug.lua index 42c6b19e7fe..5e941bc89d7 100644 --- a/data-otservbr-global/scripts/actions/quests/others/fire_bug.lua +++ b/data-otservbr-global/scripts/quests/others/actions_fire_bug.lua @@ -92,9 +92,9 @@ function othersFireBug.onUse(player, item, fromPosition, target, toPosition, isH target:transform(2113) return true elseif target.actionid == 12550 or target.actionid == 12551 then -- Secret Service Quest - if player:getStorageValue(Storage.SecretService.TBIMission01) == 1 then + if player:getStorageValue(Storage.Quest.U8_1.SecretService.TBIMission01) == 1 then Game.createItem(2118, 1, Position(32893, 32012, 6)) - player:setStorageValue(Storage.SecretService.TBIMission01, 2) + player:setStorageValue(Storage.Quest.U8_1.SecretService.TBIMission01, 2) end end return true diff --git a/data-otservbr-global/scripts/actions/quests/others/gooey_mass.lua b/data-otservbr-global/scripts/quests/others/actions_gooey_mass.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/others/gooey_mass.lua rename to data-otservbr-global/scripts/quests/others/actions_gooey_mass.lua diff --git a/data-otservbr-global/scripts/actions/quests/others/hellgate_lever.lua b/data-otservbr-global/scripts/quests/others/actions_hellgate_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/others/hellgate_lever.lua rename to data-otservbr-global/scripts/quests/others/actions_hellgate_lever.lua diff --git a/data-otservbr-global/scripts/actions/quests/others/holy_water.lua b/data-otservbr-global/scripts/quests/others/actions_holy_water.lua similarity index 59% rename from data-otservbr-global/scripts/actions/quests/others/holy_water.lua rename to data-otservbr-global/scripts/quests/others/actions_holy_water.lua index 7e8c108089e..37dce9a342c 100644 --- a/data-otservbr-global/scripts/actions/quests/others/holy_water.lua +++ b/data-otservbr-global/scripts/quests/others/actions_holy_water.lua @@ -20,22 +20,22 @@ local function nexusMessage(player, message) end local storages = { - [4008] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave1, - [4009] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave2, - [4010] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave3, - [4011] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave4, - [4012] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave5, - [4013] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave6, - [4014] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave7, - [4015] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave8, - [4016] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave9, - [4017] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave10, - [4018] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave11, - [4019] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave12, - [4020] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave13, - [4021] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave14, - [4022] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave15, - [4023] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave16, + [4208] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave1, + [4209] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave2, + [4210] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave3, + [4211] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave4, + [4212] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave5, + [4213] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave6, + [4214] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave7, + [4215] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave8, + [4216] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave9, + [4217] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave10, + [4218] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave11, + [4219] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave12, + [4220] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave13, + [4221] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave14, + [4222] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave15, + [4223] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave16, } local config = { @@ -44,7 +44,9 @@ local config = { } local othersHolyWater = Action() + function othersHolyWater.onUse(player, item, fromPosition, target, toPosition, isHotkey) + -- Antler Talisman Transformation if target.itemid == config.antler_talisman then item:transform(config.sacred_antler_talisman) item:remove(1) @@ -52,29 +54,25 @@ function othersHolyWater.onUse(player, item, fromPosition, target, toPosition, i player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You besprinkle the antler talisman with holy water. It glittlers faintly") player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) return true - end - -- Eclipse - if target.actionid == 2000 then + -- Eclipse Quest + elseif target.actionid == 2000 then item:remove(1) toPosition:sendMagicEffect(CONST_ME_FIREAREA) - -- The Inquisition Questlog- 'Mission 2: Eclipse' - player:setStorageValue(Storage.TheInquisition.Mission02, 2) - player:setStorageValue(Storage.TheInquisition.Questline, 5) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission02, 2) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline, 5) return true - -- Haunted Ruin + -- Haunted Ruin Quest elseif target.actionid == 2003 then - if player:getStorageValue(Storage.TheInquisition.Questline) ~= 12 then + if player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) ~= 12 then return true end Game.createMonster("Pirate Ghost", toPosition) item:remove(1) - - -- The Inquisition Questlog- 'Mission 4: The Haunted Ruin' - player:setStorageValue(Storage.TheInquisition.Questline, 13) - player:setStorageValue(Storage.TheInquisition.Mission04, 2) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline, 13) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission04, 2) local doorItem = Tile(doorPosition):getItemById(7869) if doorItem then @@ -82,11 +80,12 @@ function othersHolyWater.onUse(player, item, fromPosition, target, toPosition, i end addEvent(revertItem, 10 * 1000, doorPosition, 7868, 7869) return true - end - if target.actionid == 4007 and target.actionid == 4024 then + -- Rest in Hallowed Ground Quest + elseif target.actionid >= 4208 and target.actionid <= 4223 then local graveStorage = storages[target.actionid] - if player:getStorageValue(graveStorage) == 1 or player:getStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline) ~= 3 then + local questline = player:getStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline) + if player:getStorageValue(graveStorage) == 1 or questline ~= 3 then return false end @@ -102,10 +101,10 @@ function othersHolyWater.onUse(player, item, fromPosition, target, toPosition, i end toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) - end + return true - -- Shadow Nexus - if table.contains({ 7925, 7927, 7929 }, target.itemid) then + -- Shadow Nexus Quest + elseif table.contains({ 7925, 7927, 7929 }, target.itemid) then if target.itemid == 7929 then Game.setStorageValue(GlobalStorage.Inquisition, math.random(4, 5)) end @@ -116,13 +115,14 @@ function othersHolyWater.onUse(player, item, fromPosition, target, toPosition, i end nexusMessage(player, player:getName() .. " damaged the shadow nexus! You can't damage it while it's burning.") toPosition:sendMagicEffect(CONST_ME_ENERGYHIT) + + -- Shadow Nexus Transformation elseif target.itemid == 7931 then if Game.getStorageValue(GlobalStorage.Inquisition) > 0 then Game.setStorageValue(GlobalStorage.Inquisition, (Game.getStorageValue(GlobalStorage.Inquisition) - 1)) - if player:getStorageValue(Storage.TheInquisition.Questline) < 22 then - -- The Inquisition Questlog- 'Mission 7: The Shadow Nexus' - player:setStorageValue(Storage.TheInquisition.Mission07, 2) - player:setStorageValue(Storage.TheInquisition.Questline, 22) + if player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) < 22 then + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission07, 2) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline, 22) end for i = 1, #effectPositions do effectPositions[i]:sendMagicEffect(CONST_ME_HOLYAREA) diff --git a/data-otservbr-global/scripts/actions/quests/others/orc_edron_lever.lua b/data-otservbr-global/scripts/quests/others/actions_orc_edron_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/others/orc_edron_lever.lua rename to data-otservbr-global/scripts/quests/others/actions_orc_edron_lever.lua diff --git a/data-otservbr-global/scripts/actions/quests/others/serpentine_tower_lever.lua b/data-otservbr-global/scripts/quests/others/actions_serpentine_tower_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/others/serpentine_tower_lever.lua rename to data-otservbr-global/scripts/quests/others/actions_serpentine_tower_lever.lua diff --git a/data-otservbr-global/scripts/actions/quests/others/serpentine_tower_torch.lua b/data-otservbr-global/scripts/quests/others/actions_serpentine_tower_torch.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/others/serpentine_tower_torch.lua rename to data-otservbr-global/scripts/quests/others/actions_serpentine_tower_torch.lua diff --git a/data-otservbr-global/scripts/actions/quests/others/steal_from_thieves.lua b/data-otservbr-global/scripts/quests/others/actions_steal_from_thieves.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/others/steal_from_thieves.lua rename to data-otservbr-global/scripts/quests/others/actions_steal_from_thieves.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/raging_mage_tower/energized_raging_mage_kill.lua b/data-otservbr-global/scripts/quests/raging_mage_tower/creaturescripts_energized_raging_mage_kill.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/raging_mage_tower/energized_raging_mage_kill.lua rename to data-otservbr-global/scripts/quests/raging_mage_tower/creaturescripts_energized_raging_mage_kill.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/raging_mage_tower/raging_mage_1.lua b/data-otservbr-global/scripts/quests/raging_mage_tower/creaturescripts_raging_mage_1.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/raging_mage_tower/raging_mage_1.lua rename to data-otservbr-global/scripts/quests/raging_mage_tower/creaturescripts_raging_mage_1.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/raging_mage_tower/raging_mage_2.lua b/data-otservbr-global/scripts/quests/raging_mage_tower/creaturescripts_raging_mage_2.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/raging_mage_tower/raging_mage_2.lua rename to data-otservbr-global/scripts/quests/raging_mage_tower/creaturescripts_raging_mage_2.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/raging_mage_tower/raging_mage_kill.lua b/data-otservbr-global/scripts/quests/raging_mage_tower/creaturescripts_raging_mage_kill.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/raging_mage_tower/raging_mage_kill.lua rename to data-otservbr-global/scripts/quests/raging_mage_tower/creaturescripts_raging_mage_kill.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/raging_mage_tower/yielothax_kill.lua b/data-otservbr-global/scripts/quests/raging_mage_tower/creaturescripts_yielothax_kill.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/raging_mage_tower/yielothax_kill.lua rename to data-otservbr-global/scripts/quests/raging_mage_tower/creaturescripts_yielothax_kill.lua diff --git a/data-otservbr-global/scripts/actions/quests/rottin_wood_and_married_men/broken_wall.lua b/data-otservbr-global/scripts/quests/rottin_wood_and_married_men/actions_broken_wall.lua similarity index 75% rename from data-otservbr-global/scripts/actions/quests/rottin_wood_and_married_men/broken_wall.lua rename to data-otservbr-global/scripts/quests/rottin_wood_and_married_men/actions_broken_wall.lua index 25569ea2d40..4a851283a2d 100644 --- a/data-otservbr-global/scripts/actions/quests/rottin_wood_and_married_men/broken_wall.lua +++ b/data-otservbr-global/scripts/quests/rottin_wood_and_married_men/actions_broken_wall.lua @@ -1,8 +1,8 @@ local rottinWoodBroken = Action() function rottinWoodBroken.onUse(player, item, fromPosition, itemEx, toPosition, isHotkey) local position = { x = 32655, y = 32205, z = 7 } --32655, 32205, 7 - if player:getStorageValue(Storage.RottinWoodAndMaried.RottinStart) < 6 then - player:setStorageValue(Storage.RottinWoodAndMaried.RottinStart, 6) + if player:getStorageValue(Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.RottinStart) < 6 then + player:setStorageValue(Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.RottinStart, 6) player:teleportTo(position) position:sendMagicEffect(CONST_ME_TELEPORT) player:say("There we go.", TALKTYPE_MONSTER_SAY) diff --git a/data-otservbr-global/scripts/actions/quests/rottin_wood_and_married_men/corpse.lua b/data-otservbr-global/scripts/quests/rottin_wood_and_married_men/actions_corpse.lua similarity index 60% rename from data-otservbr-global/scripts/actions/quests/rottin_wood_and_married_men/corpse.lua rename to data-otservbr-global/scripts/quests/rottin_wood_and_married_men/actions_corpse.lua index d6699dc7fd6..fd84e0fb0ac 100644 --- a/data-otservbr-global/scripts/actions/quests/rottin_wood_and_married_men/corpse.lua +++ b/data-otservbr-global/scripts/quests/rottin_wood_and_married_men/actions_corpse.lua @@ -2,14 +2,14 @@ local rottinWoodCorpse = Action() function rottinWoodCorpse.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 12189 then - local storageRottinWoodAndMariedCorpse = player:getStorageValue(Storage.RottinWoodAndMaried.Corpse) - if player:getStorageValue(Storage.RottinWoodAndMaried.Mission03) == 5 and storageRottinWoodAndMariedCorpse < 4 then + local storageRottinWoodAndMariedCorpse = player:getStorageValue(Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Corpse) + if player:getStorageValue(Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Mission03) == 5 and storageRottinWoodAndMariedCorpse < 4 then player:say("You take no more gold than you actually need and release the merchant who makes away the very second you remove the ropes.", TALKTYPE_MONSTER_SAY) - player:addItem(3031, 1) - player:setStorageValue(Storage.RottinWoodAndMaried.Corpse, storageRottinWoodAndMariedCorpse + 1) + player:setStorageValue(Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Corpse, storageRottinWoodAndMariedCorpse + 1) item:remove(1) end end + return true end diff --git a/data-otservbr-global/scripts/quests/rottin_wood_and_married_men/actions_trap.lua b/data-otservbr-global/scripts/quests/rottin_wood_and_married_men/actions_trap.lua new file mode 100644 index 00000000000..f35def8fe93 --- /dev/null +++ b/data-otservbr-global/scripts/quests/rottin_wood_and_married_men/actions_trap.lua @@ -0,0 +1,115 @@ +function removeMonster() + local TOP_LEFT_CORNER = { x = 32651, y = 32178, z = 7 } + local BOTTOM_RIGHT_CORNER = { x = 32668, y = 32190, z = 7 } + + -- Iterate over the area defined by TOP_LEFT_CORNER and BOTTOM_RIGHT_CORNER + for Py = TOP_LEFT_CORNER.y, BOTTOM_RIGHT_CORNER.y do + for Px = TOP_LEFT_CORNER.x, BOTTOM_RIGHT_CORNER.x do + local tile = Tile(Position({ x = Px, y = Py, z = 7 })) + if tile then + local monster = tile:getTopCreature() + -- Check if there is a "Travelling Merchant" monster on this tile + if monster and monster:isMonster() and monster:getName() == "Travelling Merchant" then + -- Apply visual effect + monster:getPosition():sendMagicEffect(CONST_ME_STONES) + + -- Remove the monster + monster:remove() + end + end + end + end + return true +end + +function removeTrap() + local TOP_LEFT_CORNER = { x = 32651, y = 32178, z = 7 } + local BOTTOM_RIGHT_CORNER = { x = 32668, y = 32190, z = 7 } + + -- Iterate over the area defined by TOP_LEFT_CORNER and BOTTOM_RIGHT_CORNER + for Py = TOP_LEFT_CORNER.y, BOTTOM_RIGHT_CORNER.y do + for Px = TOP_LEFT_CORNER.x, BOTTOM_RIGHT_CORNER.x do + local trap = getTileItemById({ x = Px, y = Py, z = 7 }, 12187) + if trap and trap.uid > 0 then + -- Update player's storage value + setPlayerStorageValue(cid, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Trap, -1) + + -- Remove the trap + doRemoveItem(trap.uid, 1) + + -- Create item 12189 at the position where the trap was removed + Game.createItem(12189, 1, { x = Px, y = Py, z = 7 }) + end + end + end + + -- Schedule the removal of items 12189 after a set time (e.g., 5 minutes) + addEvent(removeItems, 5 * 60 * 1000) + return true +end + +function removeItems() + local TOP_LEFT_CORNER = { x = 32651, y = 32178, z = 7 } + local BOTTOM_RIGHT_CORNER = { x = 32668, y = 32190, z = 7 } + + -- Iterate over the area defined by TOP_LEFT_CORNER and BOTTOM_RIGHT_CORNER + for Py = TOP_LEFT_CORNER.y, BOTTOM_RIGHT_CORNER.y do + for Px = TOP_LEFT_CORNER.x, BOTTOM_RIGHT_CORNER.x do + local item = getTileItemById({ x = Px, y = Py, z = 7 }, 12189) + if item and item.uid > 0 then + -- Remove item 12189 + doRemoveItem(item.uid, 1) + end + end + end + return true +end + +local rottinWoodtrap = Action() +function rottinWoodtrap.onUse(cid, item, fromPosition, itemEx, toPosition, isHotkey) + if item.itemid == 12186 then + if itemEx.itemid == 10480 then + -- Check the player's storage values to determine if the trap can be placed + if (getPlayerStorageValue(cid, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Mission03) == 5) and getPlayerStorageValue(cid, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Trap) < 3 then + doCreatureSay(cid, "You place the trap carefully on the ground. Between twigs and leaves it is almost invisible.", TALKTYPE_MONSTER_SAY) + + -- Remove the trap item from the player's inventory and place it on the ground + doRemoveItem(item.uid, 1) + Game.createItem(12187, 1, toPosition) + + -- Update the player's storage value to reflect the placement of the trap + setPlayerStorageValue(cid, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Trap, getPlayerStorageValue(cid, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Trap) + 1) + else + if getPlayerStorageValue(cid, Storage.Quest.U8_7.RottinWoodAndTheMarriedMen.Trap) == 3 then + doCreatureSay(cid, "It looks like the merchants are about to arrive, better hide somewhere where you can see what's going on in the area.", TALKTYPE_MONSTER_SAY) + + -- Remove the trap item and place it on the ground + doRemoveItem(item.uid, 1) + Game.createItem(12187, 1, toPosition) + + -- Teleport the player to a hiding spot and create a visual effect + doTeleportThing(cid, { x = 32660, y = 32193, z = 7 }) + Player(cid):getPosition():sendMagicEffect(CONST_ME_STONES) + + -- Place a small fir tree at the specified location + Game.createItem(2768, 1, { x = 32662, y = 32190, z = 7 }) -- small fir tree + + -- Summon the Travelling Merchant monsters in specified locations + doSummonCreature("Travelling Merchant", { x = 32656, y = 32182, z = 7 }) + doSummonCreature("Travelling Merchant", { x = 32660, y = 32181, z = 7 }) + doSummonCreature("Travelling Merchant", { x = 32661, y = 32184, z = 7 }) + doSummonCreature("Travelling Merchant", { x = 32662, y = 32181, z = 7 }) + doSummonCreature("Travelling Merchant", { x = 32657, y = 32185, z = 7 }) + + -- Schedule the removal of the monsters and traps after 5 minutes + addEvent(removeMonster, 5 * 60 * 1000) + addEvent(removeTrap, 5 * 60 * 1000) + end + end + end + end + return true +end + +rottinWoodtrap:id(12186) +rottinWoodtrap:register() diff --git a/data-otservbr-global/scripts/actions/quests/sea_of_light/sea_of_light.lua b/data-otservbr-global/scripts/quests/sea_of_light/actions_sea_of_light.lua similarity index 58% rename from data-otservbr-global/scripts/actions/quests/sea_of_light/sea_of_light.lua rename to data-otservbr-global/scripts/quests/sea_of_light/actions_sea_of_light.lua index 114a5990323..0e08b95fa43 100644 --- a/data-otservbr-global/scripts/actions/quests/sea_of_light/sea_of_light.lua +++ b/data-otservbr-global/scripts/quests/sea_of_light/actions_sea_of_light.lua @@ -2,13 +2,13 @@ local rareCrystal = Action() function rareCrystal.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.SeaOfLight.Questline) ~= 7 then + if player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) ~= 7 then return false end if toPosition == Position(32011, 31709, 7) then - player:setStorageValue(Storage.SeaOfLight.Questline, player:getStorageValue(Storage.SeaOfLight.Questline) + 1) - player:setStorageValue(Storage.SeaOfLight.Mission3, player:getStorageValue(Storage.SeaOfLight.Mission3) + 1) + player:setStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline, player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) + 1) + player:setStorageValue(Storage.Quest.U8_54.SeaOfLight.Mission3, player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Mission3) + 1) player:teleportTo({ x = 32017, y = 31730, z = 8 }) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) item:remove() @@ -28,13 +28,13 @@ function collectorCorpse.onUse(player, item, fromPosition, target, toPosition, i return false end - if player:getStorageValue(Storage.SeaOfLight.Questline) ~= 8 then + if player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) ~= 8 then return false end player:say("You carefully put the mirror crystal into the astronomers's device.", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.SeaOfLight.Questline, 9) - player:setStorageValue(Storage.SeaOfLight.Mission3, 3) + player:setStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline, 9) + player:setStorageValue(Storage.Quest.U8_54.SeaOfLight.Mission3, 3) item:transform(9699) end diff --git a/data-otservbr-global/scripts/actions/quests/secret_service/amazon_disguise_kit.lua b/data-otservbr-global/scripts/quests/secret_service/actions_amazon_disguise_kit.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/secret_service/amazon_disguise_kit.lua rename to data-otservbr-global/scripts/quests/secret_service/actions_amazon_disguise_kit.lua diff --git a/data-otservbr-global/scripts/actions/quests/secret_service/lever.lua b/data-otservbr-global/scripts/quests/secret_service/actions_lever.lua similarity index 99% rename from data-otservbr-global/scripts/actions/quests/secret_service/lever.lua rename to data-otservbr-global/scripts/quests/secret_service/actions_lever.lua index 49788978fa5..46e09c90490 100644 --- a/data-otservbr-global/scripts/actions/quests/secret_service/lever.lua +++ b/data-otservbr-global/scripts/quests/secret_service/actions_lever.lua @@ -21,6 +21,7 @@ local monsters = { } local secretServiceLever = Action() + function secretServiceLever.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 2772 then for i = 1, #monsters do diff --git a/data-otservbr-global/scripts/actions/quests/secret_service/ring.lua b/data-otservbr-global/scripts/quests/secret_service/actions_ring.lua similarity index 68% rename from data-otservbr-global/scripts/actions/quests/secret_service/ring.lua rename to data-otservbr-global/scripts/quests/secret_service/actions_ring.lua index 60c10a9a4f2..cb980d99b58 100644 --- a/data-otservbr-global/scripts/actions/quests/secret_service/ring.lua +++ b/data-otservbr-global/scripts/quests/secret_service/actions_ring.lua @@ -4,8 +4,8 @@ function secretServiceRing.onUse(player, item, fromPosition, target, toPosition, return false end - if player:getStorageValue(Storage.SecretService.TBIMission05) == 1 then - player:setStorageValue(Storage.SecretService.TBIMission05, 2) + if player:getStorageValue(Storage.Quest.U8_1.SecretService.TBIMission05) == 1 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.TBIMission05, 2) item:remove() player:say("You have placed the false evidence!", TALKTYPE_MONSTER_SAY) end diff --git a/data-otservbr-global/scripts/actions/quests/secret_service/rust_bugs.lua b/data-otservbr-global/scripts/quests/secret_service/actions_rust_bugs.lua similarity index 72% rename from data-otservbr-global/scripts/actions/quests/secret_service/rust_bugs.lua rename to data-otservbr-global/scripts/quests/secret_service/actions_rust_bugs.lua index 94467c6f844..c5d78ca6908 100644 --- a/data-otservbr-global/scripts/actions/quests/secret_service/rust_bugs.lua +++ b/data-otservbr-global/scripts/quests/secret_service/actions_rust_bugs.lua @@ -4,8 +4,8 @@ function secretServiceBugs.onUse(player, item, fromPosition, target, toPosition, return false end - if player:getStorageValue(Storage.SecretService.CGBMission03) == 1 then - player:setStorageValue(Storage.SecretService.CGBMission03, 2) + if player:getStorageValue(Storage.Quest.U8_1.SecretService.CGBMission03) == 1 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.CGBMission03, 2) item:remove() for i = 32909, 32912 do Game.createItem(1069, 1, Position(i, 32112, 7)) diff --git a/data-otservbr-global/scripts/actions/quests/secret_service/tools.lua b/data-otservbr-global/scripts/quests/secret_service/actions_tools.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/secret_service/tools.lua rename to data-otservbr-global/scripts/quests/secret_service/actions_tools.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/secret_service/black_knight_kill.lua b/data-otservbr-global/scripts/quests/secret_service/creaturescripts_black_knight_kill.lua similarity index 57% rename from data-otservbr-global/scripts/creaturescripts/quests/secret_service/black_knight_kill.lua rename to data-otservbr-global/scripts/quests/secret_service/creaturescripts_black_knight_kill.lua index d63dac6a194..d2a83b3dc32 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/secret_service/black_knight_kill.lua +++ b/data-otservbr-global/scripts/quests/secret_service/creaturescripts_black_knight_kill.lua @@ -1,10 +1,12 @@ local blackKnightKill = CreatureEvent("BlackKnightDeath") + function blackKnightKill.onDeath(creature) onDeathForDamagingPlayers(creature, function(creature, player) - if player:getStorageValue(Storage.SecretService.AVINMission04) == 1 then - player:setStorageValue(Storage.SecretService.AVINMission04, 2) + if player:getStorageValue(Storage.Quest.U8_1.SecretService.AVINMission04) == 1 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.AVINMission04, 2) end end) + return true end diff --git a/data-otservbr-global/scripts/movements/quests/secret_service/amazon.lua b/data-otservbr-global/scripts/quests/secret_service/movements_amazon.lua similarity index 73% rename from data-otservbr-global/scripts/movements/quests/secret_service/amazon.lua rename to data-otservbr-global/scripts/quests/secret_service/movements_amazon.lua index 482ed19b66d..f48ed74c9f8 100644 --- a/data-otservbr-global/scripts/movements/quests/secret_service/amazon.lua +++ b/data-otservbr-global/scripts/quests/secret_service/movements_amazon.lua @@ -6,8 +6,8 @@ function amazon.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.SecretService.AVINMission03) == 1 then - player:setStorageValue(Storage.SecretService.AVINMission03, 2) + if player:getStorageValue(Storage.Quest.U8_1.SecretService.AVINMission03) == 1 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.AVINMission03, 2) Game.createMonster("amazon", Position(32326, 31803, 8)) Game.createMonster("amazon", Position(32330, 31803, 8)) end diff --git a/data-otservbr-global/scripts/movements/quests/secret_service/pirate.lua b/data-otservbr-global/scripts/quests/secret_service/movements_pirate.lua similarity index 70% rename from data-otservbr-global/scripts/movements/quests/secret_service/pirate.lua rename to data-otservbr-global/scripts/quests/secret_service/movements_pirate.lua index 382fe985f3e..9ecf6eac7ea 100644 --- a/data-otservbr-global/scripts/movements/quests/secret_service/pirate.lua +++ b/data-otservbr-global/scripts/quests/secret_service/movements_pirate.lua @@ -6,8 +6,8 @@ function pirate.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.SecretService.TBIMission03) == 1 then - player:setStorageValue(Storage.SecretService.TBIMission03, 2) + if player:getStorageValue(Storage.Quest.U8_1.SecretService.TBIMission03) == 1 then + player:setStorageValue(Storage.Quest.U8_1.SecretService.TBIMission03, 2) Game.createMonster("pirate buccaneer", Position(32641, 32733, 7)) Game.createMonster("pirate buccaneer", Position(32642, 32733, 7)) end diff --git a/data-otservbr-global/scripts/actions/quests/soul_war/bosses_killed.lua b/data-otservbr-global/scripts/quests/soul_war/actions_bosses_killed.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/soul_war/bosses_killed.lua rename to data-otservbr-global/scripts/quests/soul_war/actions_bosses_killed.lua diff --git a/data-otservbr-global/scripts/actions/quests/soul_war/portal_megalomania.lua b/data-otservbr-global/scripts/quests/soul_war/actions_portal_megalomania.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/soul_war/portal_megalomania.lua rename to data-otservbr-global/scripts/quests/soul_war/actions_portal_megalomania.lua diff --git a/data-otservbr-global/scripts/actions/quests/soul_war/portal_reward_soulwar.lua b/data-otservbr-global/scripts/quests/soul_war/actions_portal_reward_soulwar.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/soul_war/portal_reward_soulwar.lua rename to data-otservbr-global/scripts/quests/soul_war/actions_portal_reward_soulwar.lua diff --git a/data-otservbr-global/scripts/actions/quests/soul_war/reward_soul_war.lua b/data-otservbr-global/scripts/quests/soul_war/actions_reward_soul_war.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/soul_war/reward_soul_war.lua rename to data-otservbr-global/scripts/quests/soul_war/actions_reward_soul_war.lua diff --git a/data-otservbr-global/scripts/actions/quests/soul_war/soulwar_entrances.lua b/data-otservbr-global/scripts/quests/soul_war/actions_soulwar_entrances.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/soul_war/soulwar_entrances.lua rename to data-otservbr-global/scripts/quests/soul_war/actions_soulwar_entrances.lua diff --git a/data-otservbr-global/scripts/actions/quests/spike_tasks/fertilizer.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_fertilizer.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/spike_tasks/fertilizer.lua rename to data-otservbr-global/scripts/quests/spike_tasks/actions_fertilizer.lua diff --git a/data-otservbr-global/scripts/actions/quests/spike_tasks/ghost_detector.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_ghost_detector.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/spike_tasks/ghost_detector.lua rename to data-otservbr-global/scripts/quests/spike_tasks/actions_ghost_detector.lua diff --git a/data-otservbr-global/scripts/actions/quests/spike_tasks/lode_stone.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_lode_stone.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/spike_tasks/lode_stone.lua rename to data-otservbr-global/scripts/quests/spike_tasks/actions_lode_stone.lua diff --git a/data-otservbr-global/scripts/actions/quests/spike_tasks/nests.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_nests.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/spike_tasks/nests.lua rename to data-otservbr-global/scripts/quests/spike_tasks/actions_nests.lua diff --git a/data-otservbr-global/scripts/actions/quests/spike_tasks/spirit_shovel.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_spirit_shovel.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/spike_tasks/spirit_shovel.lua rename to data-otservbr-global/scripts/quests/spike_tasks/actions_spirit_shovel.lua diff --git a/data-otservbr-global/scripts/actions/quests/spike_tasks/thermometer.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_thermometer.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/spike_tasks/thermometer.lua rename to data-otservbr-global/scripts/quests/spike_tasks/actions_thermometer.lua diff --git a/data-otservbr-global/scripts/actions/quests/spike_tasks/tuning_fork.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_tuning_fork.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/spike_tasks/tuning_fork.lua rename to data-otservbr-global/scripts/quests/spike_tasks/actions_tuning_fork.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/spike_tasks/lower_spike_kill.lua b/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_lower_spike_kill.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/spike_tasks/lower_spike_kill.lua rename to data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_lower_spike_kill.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/spike_tasks/middle_spike_kill.lua b/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_middle_spike_kill.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/spike_tasks/middle_spike_kill.lua rename to data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_middle_spike_kill.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/spike_tasks/upper_spike_kill.lua b/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_upper_spike_kill.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/spike_tasks/upper_spike_kill.lua rename to data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_upper_spike_kill.lua diff --git a/data-otservbr-global/scripts/actions/quests/spirit_hunters/magical_device.lua b/data-otservbr-global/scripts/quests/spirit_hunters/actions_magical_device.lua similarity index 67% rename from data-otservbr-global/scripts/actions/quests/spirit_hunters/magical_device.lua rename to data-otservbr-global/scripts/quests/spirit_hunters/actions_magical_device.lua index 36bad4ceecd..6bb6c4046c0 100644 --- a/data-otservbr-global/scripts/actions/quests/spirit_hunters/magical_device.lua +++ b/data-otservbr-global/scripts/quests/spirit_hunters/actions_magical_device.lua @@ -3,12 +3,12 @@ function spiritMagical.onUse(cid, item, fromPosition, itemEx, toPosition) local player = Player(cid) if item:getId() == 4049 then if itemEx.itemid == 1979 then - if player:getStorageValue(Storage.SpiritHunters.Mission01 == 1) then - qStorage = player:getStorageValue(Storage.SpiritHunters.TombUse) + if player:getStorageValue(Storage.Quest.U8_7.SpiritHunters.Mission01 == 1) then + qStorage = player:getStorageValue(Storage.Quest.U8_7.SpiritHunters.TombUse) if qStorage < 3 then position = player:getPosition() player:say("An incredibly slimy substance oozes out of every crack in the old gravestone. It seems to attack you.", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.SpiritHunters.TombUse, qStorage + 1) + player:setStorageValue(Storage.Quest.U8_7.SpiritHunters.TombUse, qStorage + 1) Game.createMonster("Squidgy Slime", Position(position.x + 1, position.y, position.z), false, false) elseif qStorage == 4 then player:say("You have used items in gravestone.", TALKTYPE_MONSTER_SAY) @@ -18,21 +18,21 @@ function spiritMagical.onUse(cid, item, fromPosition, itemEx, toPosition) elseif item:getId() == 4050 then if itemEx.itemid == 5993 then -- ghost player:say("As you open the device a bright light pours out of its interior and drags all remaining energy of the ghost into it.", TALKTYPE_MONSTER_SAY) - if player:getStorageValue(Storage.SpiritHunters.CharmUse) < 1 then - player:setStorageValue(Storage.SpiritHunters.CharmUse, 1) + if player:getStorageValue(Storage.Quest.U8_7.SpiritHunters.CharmUse) < 1 then + player:setStorageValue(Storage.Quest.U8_7.SpiritHunters.CharmUse, 1) else - player:setStorageValue(Storage.SpiritHunters.GhostUse, player:getStorageValue(Storage.SpiritHunters.GhostUse) + 1) + player:setStorageValue(Storage.Quest.U8_7.SpiritHunters.GhostUse, player:getStorageValue(Storage.Quest.U8_7.SpiritHunters.GhostUse) + 1) end itemEx:transform(itemEx:getType():getDecayId()) toPosition:sendMagicEffect(CONST_ME_MAGIC_GREEN) elseif itemEx.itemid == 11675 or itemEx.itemid == 11676 then -- souleater player:say("As you open the device a bright light pours out of its interior and drags all remaining energy of the souleater into it.", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.SpiritHunters.SouleaterUse, player:getStorageValue(Storage.SpiritHunters.SouleaterUse) + 1) + player:setStorageValue(Storage.Quest.U8_7.SpiritHunters.SouleaterUse, player:getStorageValue(Storage.Quest.U8_7.SpiritHunters.SouleaterUse) + 1) itemEx:transform(itemEx:getType():getDecayId()) toPosition:sendMagicEffect(CONST_ME_MAGIC_GREEN) elseif itemEx.itemid == 9001 or itemEx.itemid == 9002 then --nightstalker player:say("As you open the device a bright light pours out of its interior and drags all remaining energy of the nightstalker into it.", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.SpiritHunters.NightstalkerUse, player:getStorageValue(Storage.SpiritHunters.NightstalkerUse) + 1) + player:setStorageValue(Storage.Quest.U8_7.SpiritHunters.NightstalkerUse, player:getStorageValue(Storage.Quest.U8_7.SpiritHunters.NightstalkerUse) + 1) itemEx:transform(itemEx:getType():getDecayId()) toPosition:sendMagicEffect(CONST_ME_MAGIC_GREEN) end diff --git a/data-otservbr-global/scripts/creaturescripts/quests/svargrond_arena/arena_kill.lua b/data-otservbr-global/scripts/quests/svargrond_arena/creaturescripts_arena_kill.lua similarity index 85% rename from data-otservbr-global/scripts/creaturescripts/quests/svargrond_arena/arena_kill.lua rename to data-otservbr-global/scripts/quests/svargrond_arena/creaturescripts_arena_kill.lua index 674dc5d27d5..16eb4a2ce19 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/svargrond_arena/arena_kill.lua +++ b/data-otservbr-global/scripts/quests/svargrond_arena/creaturescripts_arena_kill.lua @@ -5,12 +5,12 @@ function deathEvent.onDeath(creature, _corpse, _lastHitKiller, mostDamageKiller) return true end - local pit = player:getStorageValue(Storage.SvargrondArena.PitDoor) + local pit = player:getStorageValue(Storage.Quest.U8_0.BarbarianArena.PitDoor) if pit < 1 or pit > 10 then return end - local arena = player:getStorageValue(Storage.SvargrondArena.Arena) + local arena = player:getStorageValue(Storage.Quest.U8_0.BarbarianArena.Arena) if arena < 1 then return end @@ -34,7 +34,7 @@ function deathEvent.onDeath(creature, _corpse, _lastHitKiller, mostDamageKiller) SvargrondArena.sendPillarEffect(pit) end end - player:setStorageValue(Storage.SvargrondArena.PitDoor, pit + 1) + player:setStorageValue(Storage.Quest.U8_0.BarbarianArena.PitDoor, pit + 1) player:say("Victory! Head through the new teleporter into the next room.", TALKTYPE_MONSTER_SAY) return true end diff --git a/data-otservbr-global/scripts/movements/quests/svargrond_arena/arena_enter.lua b/data-otservbr-global/scripts/quests/svargrond_arena/movements_arena_enter.lua similarity index 88% rename from data-otservbr-global/scripts/movements/quests/svargrond_arena/arena_enter.lua rename to data-otservbr-global/scripts/quests/svargrond_arena/movements_arena_enter.lua index a5cc3d83e29..cd2a0025aa3 100644 --- a/data-otservbr-global/scripts/movements/quests/svargrond_arena/arena_enter.lua +++ b/data-otservbr-global/scripts/quests/svargrond_arena/movements_arena_enter.lua @@ -6,14 +6,14 @@ function arenaEnter.onStepIn(creature, item, position, fromPosition) return true end - local pitId = player:getStorageValue(Storage.SvargrondArena.PitDoor) + local pitId = player:getStorageValue(Storage.Quest.U8_0.BarbarianArena.PitDoor) if pitId < 1 or pitId > 10 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You cannot enter without Halvar's permission.") player:teleportTo(fromPosition, true) return true end - local arenaId = player:getStorageValue(Storage.SvargrondArena.Arena) + local arenaId = player:getStorageValue(Storage.Quest.U8_0.BarbarianArena.Arena) if not (PITS[pitId] and ARENA[arenaId]) then player:teleportTo(fromPosition, true) return true diff --git a/data-otservbr-global/scripts/movements/quests/svargrond_arena/arena_pit.lua b/data-otservbr-global/scripts/quests/svargrond_arena/movements_arena_pit.lua similarity index 76% rename from data-otservbr-global/scripts/movements/quests/svargrond_arena/arena_pit.lua rename to data-otservbr-global/scripts/quests/svargrond_arena/movements_arena_pit.lua index 29de2459e0b..7cd7da2ae13 100644 --- a/data-otservbr-global/scripts/movements/quests/svargrond_arena/arena_pit.lua +++ b/data-otservbr-global/scripts/quests/svargrond_arena/movements_arena_pit.lua @@ -14,34 +14,34 @@ function arenaPit.onStepIn(creature, item, position, fromPosition) if item.actionid == 25300 then player:addCondition(condition) - player:setStorageValue(Storage.SvargrondArena.PitDoor, -1) + player:setStorageValue(Storage.Quest.U8_0.BarbarianArena.PitDoor, -1) player:teleportTo(SvargrondArena.kickPosition) player:say("Coward!", TALKTYPE_MONSTER_SAY) SvargrondArena.cancelEvents(playerId) return true end - local pitId = player:getStorageValue(Storage.SvargrondArena.PitDoor) - local arenaId = player:getStorageValue(Storage.SvargrondArena.Arena) + local pitId = player:getStorageValue(Storage.Quest.U8_0.BarbarianArena.PitDoor) + local arenaId = player:getStorageValue(Storage.Quest.U8_0.BarbarianArena.Arena) if pitId > 10 then player:teleportTo(SvargrondArena.rewardPosition) - player:setStorageValue(Storage.SvargrondArena.PitDoor, 0) + player:setStorageValue(Storage.Quest.U8_0.BarbarianArena.PitDoor, 0) if arenaId == 1 then SvargrondArena.rewardPosition:sendMagicEffect(CONST_ME_FIREWORK_BLUE) - player:setStorageValue(Storage.SvargrondArena.GreenhornDoor, 1) + player:setStorageValue(Storage.Quest.U8_0.BarbarianArena.GreenhornDoor, 1) player:say("Welcome back, little hero!", TALKTYPE_MONSTER_SAY) elseif arenaId == 2 then SvargrondArena.rewardPosition:sendMagicEffect(CONST_ME_FIREWORK_YELLOW) - player:setStorageValue(Storage.SvargrondArena.ScrapperDoor, 1) + player:setStorageValue(Storage.Quest.U8_0.BarbarianArena.ScrapperDoor, 1) player:say("Congratulations, brave warrior!", TALKTYPE_MONSTER_SAY) elseif arenaId == 3 then SvargrondArena.rewardPosition:sendMagicEffect(CONST_ME_FIREWORK_RED) - player:setStorageValue(Storage.SvargrondArena.WarlordDoor, 1) + player:setStorageValue(Storage.Quest.U8_0.BarbarianArena.WarlordDoor, 1) player:say("Respect and honour to you, champion!", TALKTYPE_MONSTER_SAY) end - player:setStorageValue(Storage.SvargrondArena.Arena, player:getStorageValue(Storage.SvargrondArena.Arena) + 1) + player:setStorageValue(Storage.Quest.U8_0.BarbarianArena.Arena, player:getStorageValue(Storage.Quest.U8_0.BarbarianArena.Arena) + 1) player:say("Congratulations! You completed " .. ARENA[arenaId].name .. " arena, you should take your reward now.") player:setStorageValue(ARENA[arenaId].questLog, 2) player:addAchievement(ARENA[arenaId].achievement) diff --git a/data-otservbr-global/scripts/movements/quests/svargrond_arena/arena_trophy.lua b/data-otservbr-global/scripts/quests/svargrond_arena/movements_arena_trophy.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/svargrond_arena/arena_trophy.lua rename to data-otservbr-global/scripts/quests/svargrond_arena/movements_arena_trophy.lua diff --git a/data-otservbr-global/scripts/actions/quests/thais_quest/life_ring_lever.lua b/data-otservbr-global/scripts/quests/thais_quest/actions_life_ring_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/thais_quest/life_ring_lever.lua rename to data-otservbr-global/scripts/quests/thais_quest/actions_life_ring_lever.lua diff --git a/data-otservbr-global/scripts/quests/the_ancient_tombs/actions_ruins_instruments.lua b/data-otservbr-global/scripts/quests/the_ancient_tombs/actions_ruins_instruments.lua index 247498616f2..b74fd2c9600 100644 --- a/data-otservbr-global/scripts/quests/the_ancient_tombs/actions_ruins_instruments.lua +++ b/data-otservbr-global/scripts/quests/the_ancient_tombs/actions_ruins_instruments.lua @@ -41,5 +41,5 @@ function theAncientRuinsInstru.onUse(player, item, fromPosition, target, toPosit return true end -theAncientRuinsInstru:aid(12105) +theAncientRuinsInstru:aid(12106) theAncientRuinsInstru:register() diff --git a/data-otservbr-global/scripts/actions/quests/the_cursed_crystal/MedusaOil.lua b/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_MedusaOil.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_cursed_crystal/MedusaOil.lua rename to data-otservbr-global/scripts/quests/the_cursed_crystal/actions_MedusaOil.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_cursed_crystal/Misc.lua b/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_Misc.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_cursed_crystal/Misc.lua rename to data-otservbr-global/scripts/quests/the_cursed_crystal/actions_Misc.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_cursed_crystal/Ointment.lua b/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_Ointment.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_cursed_crystal/Ointment.lua rename to data-otservbr-global/scripts/quests/the_cursed_crystal/actions_Ointment.lua diff --git a/data-otservbr-global/scripts/movements/quests/the_cursed_crystal/StepIn_CursedCrystal.lua b/data-otservbr-global/scripts/quests/the_cursed_crystal/movements_StepIn_CursedCrystal.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/the_cursed_crystal/StepIn_CursedCrystal.lua rename to data-otservbr-global/scripts/quests/the_cursed_crystal/movements_StepIn_CursedCrystal.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_dream_courts/bosses_killed.lua b/data-otservbr-global/scripts/quests/the_dream_courts/actions_bosses_killed.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_dream_courts/bosses_killed.lua rename to data-otservbr-global/scripts/quests/the_dream_courts/actions_bosses_killed.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_dream_courts/dream_courts_lever.lua b/data-otservbr-global/scripts/quests/the_dream_courts/actions_dream_courts_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_dream_courts/dream_courts_lever.lua rename to data-otservbr-global/scripts/quests/the_dream_courts/actions_dream_courts_lever.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_dream_courts/entrances_dream_courts.lua b/data-otservbr-global/scripts/quests/the_dream_courts/actions_entrances_dream_courts.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_dream_courts/entrances_dream_courts.lua rename to data-otservbr-global/scripts/quests/the_dream_courts/actions_entrances_dream_courts.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_dream_courts/portal_nightmare_beast.lua b/data-otservbr-global/scripts/quests/the_dream_courts/actions_portal_nightmare_beast.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_dream_courts/portal_nightmare_beast.lua rename to data-otservbr-global/scripts/quests/the_dream_courts/actions_portal_nightmare_beast.lua diff --git a/data-otservbr-global/scripts/movements/quests/the_dream_courts/faceless_bane_step_positions.lua b/data-otservbr-global/scripts/quests/the_dream_courts/movements_faceless_bane_step_positions.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/the_dream_courts/faceless_bane_step_positions.lua rename to data-otservbr-global/scripts/quests/the_dream_courts/movements_faceless_bane_step_positions.lua diff --git a/data-otservbr-global/scripts/movements/quests/the_dream_courts/teleport.lua b/data-otservbr-global/scripts/quests/the_dream_courts/movements_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/the_dream_courts/teleport.lua rename to data-otservbr-global/scripts/quests/the_dream_courts/movements_teleport.lua diff --git a/data-otservbr-global/scripts/actions/quests/first_dragon/lair_entrance.lua b/data-otservbr-global/scripts/quests/the_first_dragon/actions_lair_entrance.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/first_dragon/lair_entrance.lua rename to data-otservbr-global/scripts/quests/the_first_dragon/actions_lair_entrance.lua diff --git a/data-otservbr-global/scripts/actions/quests/first_dragon/lever.lua b/data-otservbr-global/scripts/quests/the_first_dragon/actions_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/first_dragon/lever.lua rename to data-otservbr-global/scripts/quests/the_first_dragon/actions_lever.lua diff --git a/data-otservbr-global/scripts/actions/quests/first_dragon/rewards.lua b/data-otservbr-global/scripts/quests/the_first_dragon/actions_rewards.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/first_dragon/rewards.lua rename to data-otservbr-global/scripts/quests/the_first_dragon/actions_rewards.lua diff --git a/data-otservbr-global/scripts/actions/quests/first_dragon/sacrifice_items.lua b/data-otservbr-global/scripts/quests/the_first_dragon/actions_sacrifice_items.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/first_dragon/sacrifice_items.lua rename to data-otservbr-global/scripts/quests/the_first_dragon/actions_sacrifice_items.lua diff --git a/data-otservbr-global/scripts/actions/quests/first_dragon/treasure_chest.lua b/data-otservbr-global/scripts/quests/the_first_dragon/actions_treasure_chest.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/first_dragon/treasure_chest.lua rename to data-otservbr-global/scripts/quests/the_first_dragon/actions_treasure_chest.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/the_first_dragon/death_angry_plant.lua b/data-otservbr-global/scripts/quests/the_first_dragon/creaturescripts_death_angry_plant.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/the_first_dragon/death_angry_plant.lua rename to data-otservbr-global/scripts/quests/the_first_dragon/creaturescripts_death_angry_plant.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/the_first_dragon/death_dragon_essence.lua b/data-otservbr-global/scripts/quests/the_first_dragon/creaturescripts_death_dragon_essence.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/the_first_dragon/death_dragon_essence.lua rename to data-otservbr-global/scripts/quests/the_first_dragon/creaturescripts_death_dragon_essence.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/the_first_dragon/death_fallen.lua b/data-otservbr-global/scripts/quests/the_first_dragon/creaturescripts_death_fallen.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/the_first_dragon/death_fallen.lua rename to data-otservbr-global/scripts/quests/the_first_dragon/creaturescripts_death_fallen.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/the_first_dragon/death_first_dragon.lua b/data-otservbr-global/scripts/quests/the_first_dragon/creaturescripts_death_first_dragon.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/the_first_dragon/death_first_dragon.lua rename to data-otservbr-global/scripts/quests/the_first_dragon/creaturescripts_death_first_dragon.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/the_first_dragon/death_somewhat_beatable.lua b/data-otservbr-global/scripts/quests/the_first_dragon/creaturescripts_death_somewhat_beatable.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/the_first_dragon/death_somewhat_beatable.lua rename to data-otservbr-global/scripts/quests/the_first_dragon/creaturescripts_death_somewhat_beatable.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/the_first_dragon/kill_dragon.lua b/data-otservbr-global/scripts/quests/the_first_dragon/creaturescripts_kill_dragon.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/the_first_dragon/kill_dragon.lua rename to data-otservbr-global/scripts/quests/the_first_dragon/creaturescripts_kill_dragon.lua diff --git a/data-otservbr-global/scripts/movements/quests/first_dragon/entrance_teleport.lua b/data-otservbr-global/scripts/quests/the_first_dragon/movements_entrance_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/first_dragon/entrance_teleport.lua rename to data-otservbr-global/scripts/quests/the_first_dragon/movements_entrance_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/first_dragon/exit_teleport.lua b/data-otservbr-global/scripts/quests/the_first_dragon/movements_exit_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/first_dragon/exit_teleport.lua rename to data-otservbr-global/scripts/quests/the_first_dragon/movements_exit_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/first_dragon/flower_bowl.lua b/data-otservbr-global/scripts/quests/the_first_dragon/movements_flower_bowl.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/first_dragon/flower_bowl.lua rename to data-otservbr-global/scripts/quests/the_first_dragon/movements_flower_bowl.lua diff --git a/data-otservbr-global/scripts/movements/quests/first_dragon/heaven_blossom.lua b/data-otservbr-global/scripts/quests/the_first_dragon/movements_heaven_blossom.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/first_dragon/heaven_blossom.lua rename to data-otservbr-global/scripts/quests/the_first_dragon/movements_heaven_blossom.lua diff --git a/data-otservbr-global/scripts/movements/quests/first_dragon/last_teleport.lua b/data-otservbr-global/scripts/quests/the_first_dragon/movements_last_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/first_dragon/last_teleport.lua rename to data-otservbr-global/scripts/quests/the_first_dragon/movements_last_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/first_dragon/zorvorax_secrets.lua b/data-otservbr-global/scripts/quests/the_first_dragon/movements_zorvorax_secrets.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/first_dragon/zorvorax_secrets.lua rename to data-otservbr-global/scripts/quests/the_first_dragon/movements_zorvorax_secrets.lua diff --git a/data-otservbr-global/scripts/movements/quests/the_gravedigger_of_drefia/dormitory_teleport.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_dormitory_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/the_gravedigger_of_drefia/dormitory_teleport.lua rename to data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_dormitory_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/the_gravedigger_of_drefia/necromancer_servant.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_necromancer_servant.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/the_gravedigger_of_drefia/necromancer_servant.lua rename to data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_necromancer_servant.lua diff --git a/data-otservbr-global/scripts/movements/quests/the_gravedigger_of_drefia/sacrifice_teleport.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_sacrifice_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/the_gravedigger_of_drefia/sacrifice_teleport.lua rename to data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_sacrifice_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/the_gravedigger_of_drefia/teleport.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/the_gravedigger_of_drefia/teleport.lua rename to data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_teleport.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_hidden_city_of_beregar/bargate_lever.lua b/data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/actions_bargate_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_hidden_city_of_beregar/bargate_lever.lua rename to data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/actions_bargate_lever.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_hidden_city_of_beregar/ladder.lua b/data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/actions_ladder.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_hidden_city_of_beregar/ladder.lua rename to data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/actions_ladder.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_hidden_city_of_beregar/levers.lua b/data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/actions_levers.lua similarity index 99% rename from data-otservbr-global/scripts/actions/quests/the_hidden_city_of_beregar/levers.lua rename to data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/actions_levers.lua index 23fa33de66e..d13c7f55585 100644 --- a/data-otservbr-global/scripts/actions/quests/the_hidden_city_of_beregar/levers.lua +++ b/data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/actions_levers.lua @@ -17,6 +17,7 @@ local config = { } local theHiddenWagonLevers = Action() + function theHiddenWagonLevers.onUse(player, item, fromPosition, target, toPosition, isHotkey) for i = 1, #config do local table = config[i] diff --git a/data-otservbr-global/scripts/actions/quests/the_hidden_city_of_beregar/ore wagon.lua b/data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/actions_ore_wagon.lua similarity index 95% rename from data-otservbr-global/scripts/actions/quests/the_hidden_city_of_beregar/ore wagon.lua rename to data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/actions_ore_wagon.lua index ad4bb8227f4..6b1d2c0fd01 100644 --- a/data-otservbr-global/scripts/actions/quests/the_hidden_city_of_beregar/ore wagon.lua +++ b/data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/actions_ore_wagon.lua @@ -70,7 +70,7 @@ function wagons.onUse(player, item, fromPosition, target, toPosition, isHotkey) }, --Beregar { - teleportPos = Position(32579, 31487, 9), + teleportPos = Position(32579, 31487, 9), -- The correct place would be 32638, 31960, 10, however this area does not yet exist on the Kazordoon map. railCheck = Tile(Position(32688, 31469, 13)):getItemById(7124) and Tile(Position(32690, 31465, 13)):getItemById(7125) and Tile(Position(32684, 31464, 13)):getItemById(7122) and Tile(Position(32682, 31455, 13)):getItemById(7124), }, --NPC Tehlim @@ -89,14 +89,14 @@ function wagons.onUse(player, item, fromPosition, target, toPosition, isHotkey) railCheck = Tile(Position(32688, 31469, 13)):getItemById(7123) and Tile(Position(32695, 31464, 13)):getItemById(7123), }, } - local getstory = player:getStorageValue(Storage.HiddenCityOfBeregar.RoyalRescue) - local story = Storage.HiddenCityOfBeregar.RoyalRescue + local getstory = player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.RoyalRescue) + local story = Storage.Quest.U8_4.TheHiddenCityOfBeregar.RoyalRescue local position = (Position(32571, 31508, 9)) local tile = Tile(position) local tile2 = Tile(Position(32619, 31514, 9)) for i = 1, #travel do local table = travel[i] - if fromPosition == table.wagon and player:getStorageValue(Storage.HiddenCityOfBeregar.OreWagon) == 1 then + if fromPosition == table.wagon and player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.OreWagon) == 1 then if travel[i] == travel[1] then local targetPosition = checkpoint[player:getStorageValue(story)] if not targetPosition then @@ -172,7 +172,7 @@ function wagons.onUse(player, item, fromPosition, target, toPosition, isHotkey) player:teleportTo(table.destination) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) end - if player:getStorageValue(Storage.HiddenCityOfBeregar.OreWagon) < 1 then + if player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.OreWagon) < 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You don't know how to use this yet.") return true end diff --git a/data-otservbr-global/scripts/creaturescripts/quests/firewalker_boots/pythius_the_rotten_kill.lua b/data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/creaturescripts_pythius_the_rotten_kill.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/firewalker_boots/pythius_the_rotten_kill.lua rename to data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/creaturescripts_pythius_the_rotten_kill.lua diff --git a/data-otservbr-global/scripts/movements/quests/the_hidden_city_of_beregar/bellow.lua b/data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/moviments_bellow.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/the_hidden_city_of_beregar/bellow.lua rename to data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/moviments_bellow.lua diff --git a/data-otservbr-global/scripts/movements/quests/the_hidden_city_of_beregar/elevator.lua b/data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/moviments_elevator.lua similarity index 88% rename from data-otservbr-global/scripts/movements/quests/the_hidden_city_of_beregar/elevator.lua rename to data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/moviments_elevator.lua index 9820a242d8d..4430651a261 100644 --- a/data-otservbr-global/scripts/movements/quests/the_hidden_city_of_beregar/elevator.lua +++ b/data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/moviments_elevator.lua @@ -16,7 +16,7 @@ function elevator.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.HiddenCityOfBeregar.GoingDown) == 2 then + if player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.GoingDown) == 2 then player:teleportTo(teleport) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) else diff --git a/data-otservbr-global/scripts/movements/quests/the_hidden_city_of_beregar/gap.lua b/data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/moviments_gap.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/the_hidden_city_of_beregar/gap.lua rename to data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/moviments_gap.lua diff --git a/data-otservbr-global/scripts/movements/quests/the_hidden_city_of_beregar/ore_wagon.lua b/data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/moviments_ore_wagon.lua similarity index 70% rename from data-otservbr-global/scripts/movements/quests/the_hidden_city_of_beregar/ore_wagon.lua rename to data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/moviments_ore_wagon.lua index eeda87e2de4..cc605d59039 100644 --- a/data-otservbr-global/scripts/movements/quests/the_hidden_city_of_beregar/ore_wagon.lua +++ b/data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/moviments_ore_wagon.lua @@ -6,8 +6,8 @@ function oreWagon.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.HiddenCityOfBeregar.OreWagon) ~= 1 then - player:setStorageValue(Storage.HiddenCityOfBeregar.OreWagon, 1) + if player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.OreWagon) ~= 1 then + player:setStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.OreWagon, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found the entrance to the hidden city of Beregar and may now use the ore wagon.") end return true diff --git a/data-otservbr-global/scripts/movements/quests/the_hidden_city_of_beregar/pythius_boss_teleport.lua b/data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/moviments_pythius_boss_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/the_hidden_city_of_beregar/pythius_boss_teleport.lua rename to data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/moviments_pythius_boss_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/the_hidden_city_of_beregar/pythius_teleport.lua b/data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/moviments_pythius_teleport.lua similarity index 87% rename from data-otservbr-global/scripts/movements/quests/the_hidden_city_of_beregar/pythius_teleport.lua rename to data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/moviments_pythius_teleport.lua index e6525ae25b7..e2a4b18012f 100644 --- a/data-otservbr-global/scripts/movements/quests/the_hidden_city_of_beregar/pythius_teleport.lua +++ b/data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/moviments_pythius_teleport.lua @@ -6,7 +6,7 @@ function pythiusTeleport.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.HiddenCityOfBeregar.PythiusTheRotten) < os.time() then + if player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.PythiusTheRotten) < os.time() then position.y = position.y + 4 player:teleportTo(position) player:say("OFFER ME SOMETHING IF YOU WANT TO PASS!", TALKTYPE_MONSTER_YELL, false, player, Position(32589, 31407, 15)) diff --git a/data-otservbr-global/scripts/movements/quests/the_hidden_city_of_beregar/tunnel.lua b/data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/moviments_tunnel.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/the_hidden_city_of_beregar/tunnel.lua rename to data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/moviments_tunnel.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_hunt_for_the_sea_serpent/bait.lua b/data-otservbr-global/scripts/quests/the_hunt_for_the_sea_serpent/actions_bait.lua similarity index 63% rename from data-otservbr-global/scripts/actions/quests/the_hunt_for_the_sea_serpent/bait.lua rename to data-otservbr-global/scripts/quests/the_hunt_for_the_sea_serpent/actions_bait.lua index 4289d8eee96..399cc02d8f5 100644 --- a/data-otservbr-global/scripts/actions/quests/the_hunt_for_the_sea_serpent/bait.lua +++ b/data-otservbr-global/scripts/quests/the_hunt_for_the_sea_serpent/actions_bait.lua @@ -2,14 +2,14 @@ local TheHuntForTheSeaSerpent = Storage.Quest.U8_2.TheHuntForTheSeaSerpent local bait = Action() function bait.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(TheHuntForTheSeaSerpent.QuestLine) == 1 then + if player:getStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.QuestLine) == 1 then if target.itemid == 3496 then -- crane - if player:getStorageValue(TheHuntForTheSeaSerpent.Bait) == 1 then + if player:getStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.Bait) == 1 then player:say("The bait is already set. Go up to the lookout and check the telescope!", TALKTYPE_MONSTER_SAY) else item:remove(1) toPosition:sendMagicEffect(CONST_ME_WATERSPLASH) - player:setStorageValue(TheHuntForTheSeaSerpent.Bait, 1) + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.Bait, 1) end end end @@ -35,20 +35,20 @@ local words = { local telescope = Action() function telescope.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(TheHuntForTheSeaSerpent.QuestLine) == 1 then + if player:getStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.QuestLine) == 1 then local randBait, randAppear, randPhase, randDirection, phase, direction randBait = math.random(2) -- 50% bait loss ratio - if player:getStorageValue(TheHuntForTheSeaSerpent.SuccessSwitch) == 1 then + if player:getStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.SuccessSwitch) == 1 then randAppear = math.random(10) -- 90%/10% nothing/success ratio else randAppear = math.random(9) -- always nothing end - if player:getStorageValue(TheHuntForTheSeaSerpent.Bait) < 1 then + if player:getStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.Bait) < 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You should set a new bait first.") - elseif player:getStorageValue(TheHuntForTheSeaSerpent.Direction) > 0 then + elseif player:getStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.Direction) > 0 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Oops! You lost it.") - player:setStorageValue(TheHuntForTheSeaSerpent.SuccessSwitch, 0) - player:setStorageValue(TheHuntForTheSeaSerpent.Direction, 0) + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.SuccessSwitch, 0) + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.Direction, 0) elseif randAppear <= 4 then -- 40% nothing player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You see water as far as the eye can reach. No sea serpent in sight.") else @@ -58,21 +58,21 @@ function telescope.onUse(player, item, fromPosition, target, toPosition, isHotke phase = words.phase[randPhase] direction = words.direction[randDirection] player:sendTextMessage(MESSAGE_EVENT_ADVANCE, string.format("You see %s under the surface%s.", phase, direction)) - player:setStorageValue(TheHuntForTheSeaSerpent.Direction, randDirection) + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.Direction, randDirection) if randBait == 2 then - player:setStorageValue(TheHuntForTheSeaSerpent.Bait, 0) + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.Bait, 0) end elseif randAppear == 9 then -- 10% nothing player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "It's getting away! You should tell the captain to gain speed!") - player:setStorageValue(TheHuntForTheSeaSerpent.Direction, 4) + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.Direction, 4) if randBait == 2 then - player:setStorageValue(TheHuntForTheSeaSerpent.Bait, 0) + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.Bait, 0) end elseif randAppear == 10 then -- 10% success player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "There are multiple shadows under the surface. This has to be the right location.") Position(31933, 31037, 7):sendMagicEffect(CONST_ME_WATERCREATURE) - player:setStorageValue(TheHuntForTheSeaSerpent.QuestLine, 2) - player:setStorageValue(TheHuntForTheSeaSerpent.Access, 1) + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.QuestLine, 2) + player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.Access, 1) end end end diff --git a/data-otservbr-global/scripts/movements/quests/the_hunt_for_the_sea_serpent/teleports.lua b/data-otservbr-global/scripts/quests/the_hunt_for_the_sea_serpent/movements_teleports.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/the_hunt_for_the_sea_serpent/teleports.lua rename to data-otservbr-global/scripts/quests/the_hunt_for_the_sea_serpent/movements_teleports.lua diff --git a/data-otservbr-global/scripts/actions/quests/ice_islands/anthill.lua b/data-otservbr-global/scripts/quests/the_ice_islands_quest/actions_anthill.lua similarity index 58% rename from data-otservbr-global/scripts/actions/quests/ice_islands/anthill.lua rename to data-otservbr-global/scripts/quests/the_ice_islands_quest/actions_anthill.lua index 57c2cc1799e..28b7848a004 100644 --- a/data-otservbr-global/scripts/actions/quests/ice_islands/anthill.lua +++ b/data-otservbr-global/scripts/quests/the_ice_islands_quest/actions_anthill.lua @@ -1,22 +1,25 @@ local iceAntHill = Action() + function iceAntHill.onUse(player, item, fromPosition, target, toPosition, isHotkey) local mast = { x = 32360, y = 31365, z = 7 } + if target.itemid == 1079 and item.itemid == 7243 then - if player:getStorageValue(Storage.TheIceIslands.Questline) == 6 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 6 then toPosition:sendMagicEffect(CONST_ME_GROUNDSHAKER) - player:setStorageValue(Storage.TheIceIslands.Mission03, 2) -- Questlog The Ice Islands Quest, Nibelor 2: Ecological Terrorism + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission03, 2) -- Questlog The Ice Islands Quest, Nibelor 2: Ecological Terrorism player:say("You fill the jug with ants.", TALKTYPE_MONSTER_SAY) item:transform(7244) end elseif target.itemid == 4940 and item.itemid == 7244 and toPosition.x == mast.x and toPosition.y == mast.y and toPosition.z == mast.z then - if player:getStorageValue(Storage.TheIceIslands.Questline) == 6 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 6 then toPosition:sendMagicEffect(CONST_ME_HITAREA) - player:setStorageValue(Storage.TheIceIslands.Questline, 7) - player:setStorageValue(Storage.TheIceIslands.Mission03, 3) -- Questlog The Ice Islands Quest, Nibelor 2: Ecological Terrorism + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 7) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission03, 3) -- Questlog The Ice Islands Quest, Nibelor 2: Ecological Terrorism player:say("You released ants on the hill.", TALKTYPE_MONSTER_SAY) player:removeItem(7243, 1) end end + return true end diff --git a/data-otservbr-global/scripts/quests/the_ice_islands_quest/actions_charm.lua b/data-otservbr-global/scripts/quests/the_ice_islands_quest/actions_charm.lua new file mode 100644 index 00000000000..5ad5d7fdeed --- /dev/null +++ b/data-otservbr-global/scripts/quests/the_ice_islands_quest/actions_charm.lua @@ -0,0 +1,50 @@ +local iceCharm = Action() + +function iceCharm.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if target.itemid ~= 1841 then + return false + end + + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) ~= 39 then + return true + end + + local obelisk1 = { x = 32138, y = 31113, z = 14 } + local obelisk2 = { x = 32119, y = 30992, z = 14 } + local obelisk3 = { x = 32180, y = 31069, z = 14 } + local obelisk4 = { x = 32210, y = 31027, z = 14 } + + if toPosition.x == obelisk1.x and toPosition.y == obelisk1.y and toPosition.z == obelisk1.z then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Obelisk01) < 5 then + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Obelisk01, 5) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission12, player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission12) + 1) -- Questlog The Ice Islands Quest, Formorgar Mines 4: Retaliation + toPosition:sendMagicEffect(CONST_ME_FIREWORK_BLUE) + player:say("You mark an obelisk with the frost charm.", TALKTYPE_MONSTER_SAY) + end + elseif toPosition.x == obelisk2.x and toPosition.y == obelisk2.y and toPosition.z == obelisk2.z then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Obelisk02) < 5 then + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Obelisk02, 5) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission12, player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission12) + 1) -- Questlog The Ice Islands Quest, Formorgar Mines 4: Retaliation + toPosition:sendMagicEffect(CONST_ME_FIREWORK_BLUE) + player:say("You mark an obelisk with the frost charm.", TALKTYPE_MONSTER_SAY) + end + elseif toPosition.x == obelisk3.x and toPosition.y == obelisk3.y and toPosition.z == obelisk3.z then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Obelisk03) < 5 then + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Obelisk03, 5) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission12, player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission12) + 1) -- Questlog The Ice Islands Quest, Formorgar Mines 4: Retaliation + toPosition:sendMagicEffect(CONST_ME_FIREWORK_BLUE) + player:say("You mark an obelisk with the frost charm.", TALKTYPE_MONSTER_SAY) + end + elseif toPosition.x == obelisk4.x and toPosition.y == obelisk4.y and toPosition.z == obelisk4.z then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Obelisk04) < 5 then + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Obelisk04, 5) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission12, player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission12) + 1) -- Questlog The Ice Islands Quest, Formorgar Mines 4: Retaliation + toPosition:sendMagicEffect(CONST_ME_FIREWORK_BLUE) + player:say("You mark an obelisk with the frost charm.", TALKTYPE_MONSTER_SAY) + end + end + return true +end + +iceCharm:id(7289) +iceCharm:register() diff --git a/data-otservbr-global/scripts/actions/quests/ice_islands/cure.lua b/data-otservbr-global/scripts/quests/the_ice_islands_quest/actions_cure.lua similarity index 81% rename from data-otservbr-global/scripts/actions/quests/ice_islands/cure.lua rename to data-otservbr-global/scripts/quests/the_ice_islands_quest/actions_cure.lua index 7df4a16168b..c229e2de121 100644 --- a/data-otservbr-global/scripts/actions/quests/ice_islands/cure.lua +++ b/data-otservbr-global/scripts/quests/the_ice_islands_quest/actions_cure.lua @@ -4,7 +4,7 @@ function iceCure.onUse(player, item, fromPosition, target, toPosition, isHotkey) return false end - if player:getStorageValue(Storage.TheIceIslands.Questline) >= 21 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) >= 21 then toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) player:say("You take some hot water from the geyser.", TALKTYPE_MONSTER_SAY) item:transform(7246) diff --git a/data-otservbr-global/scripts/actions/quests/ice_islands/paint.lua b/data-otservbr-global/scripts/quests/the_ice_islands_quest/actions_paint.lua similarity index 61% rename from data-otservbr-global/scripts/actions/quests/ice_islands/paint.lua rename to data-otservbr-global/scripts/quests/the_ice_islands_quest/actions_paint.lua index f7fd78ecd58..e14f4cc41ba 100644 --- a/data-otservbr-global/scripts/actions/quests/ice_islands/paint.lua +++ b/data-otservbr-global/scripts/quests/the_ice_islands_quest/actions_paint.lua @@ -12,12 +12,12 @@ function icePaint.onUse(player, item, fromPosition, target, toPosition, isHotkey return false end - if player:getStorageValue(Storage.TheIceIslands.Questline) == 8 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) == 8 then toPosition:sendMagicEffect(CONST_ME_GREEN_RINGS) - player:setStorageValue(Storage.TheIceIslands.PaintSeal, player:getStorageValue(Storage.TheIceIslands.PaintSeal) + 1) - if player:getStorageValue(Storage.TheIceIslands.PaintSeal) == 2 then - player:setStorageValue(Storage.TheIceIslands.Questline, 9) - player:setStorageValue(Storage.TheIceIslands.Mission04, 2) -- Questlog The Ice Islands Quest, Nibelor 3: Artful Sabotage + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.PaintSeal, player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.PaintSeal) + 1) + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.PaintSeal) == 2 then + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 9) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission04, 2) -- Questlog The Ice Islands Quest, Nibelor 3: Artful Sabotage player:removeItem(7253, 1) if player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.TortoiseEggNargorDoor) >= 2 then player:addAchievement("Animal Activist") diff --git a/data-otservbr-global/scripts/actions/quests/ice_islands/yakchal.lua b/data-otservbr-global/scripts/quests/the_ice_islands_quest/actions_yakchal.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/ice_islands/yakchal.lua rename to data-otservbr-global/scripts/quests/the_ice_islands_quest/actions_yakchal.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/the_ice_islands/husky_kill.lua b/data-otservbr-global/scripts/quests/the_ice_islands_quest/creaturescripts_husky_kill.lua similarity index 53% rename from data-otservbr-global/scripts/creaturescripts/quests/the_ice_islands/husky_kill.lua rename to data-otservbr-global/scripts/quests/the_ice_islands_quest/creaturescripts_husky_kill.lua index b5a3f4c4dff..6d9929b0b4f 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/the_ice_islands/husky_kill.lua +++ b/data-otservbr-global/scripts/quests/the_ice_islands_quest/creaturescripts_husky_kill.lua @@ -2,8 +2,8 @@ local huskyKill = CreatureEvent("HuskyDeath") function huskyKill.onDeath(creature) onDeathForDamagingPlayers(creature, function(creature, player) - local value = player:getStorageValue(Storage.TheIceIslands.HuskyKill) or 0 - player:setStorageValue(Storage.TheIceIslands.HuskyKill, value + 1) + local value = player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.HuskyKill) or 0 + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.HuskyKill, value + 1) end) return true end diff --git a/data-otservbr-global/scripts/movements/quests/the_ice_islands/helheim.lua b/data-otservbr-global/scripts/quests/the_ice_islands_quest/movements_helheim.lua similarity index 76% rename from data-otservbr-global/scripts/movements/quests/the_ice_islands/helheim.lua rename to data-otservbr-global/scripts/quests/the_ice_islands_quest/movements_helheim.lua index a1c524dfbcd..79a4f8dc942 100644 --- a/data-otservbr-global/scripts/movements/quests/the_ice_islands/helheim.lua +++ b/data-otservbr-global/scripts/quests/the_ice_islands_quest/movements_helheim.lua @@ -6,13 +6,13 @@ function helheim.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.TheIceIslands.Questline) ~= 30 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) ~= 30 then return true end -- Questlog The Ice Islands Quest, The Secret of Helheim - player:setStorageValue(Storage.TheIceIslands.Mission07, 3) - player:setStorageValue(Storage.TheIceIslands.Questline, 31) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission07, 3) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 31) player:say("You discovered the necromantic altar and should report about it.", TALKTYPE_MONSTER_SAY) position:sendMagicEffect(CONST_ME_MAGIC_RED) diff --git a/data-otservbr-global/scripts/movements/quests/the_ice_islands/nibelor_dog_led.lua b/data-otservbr-global/scripts/quests/the_ice_islands_quest/movements_nibelor_dog_led.lua similarity index 84% rename from data-otservbr-global/scripts/movements/quests/the_ice_islands/nibelor_dog_led.lua rename to data-otservbr-global/scripts/quests/the_ice_islands_quest/movements_nibelor_dog_led.lua index 7987c2b3eea..c01addda115 100644 --- a/data-otservbr-global/scripts/movements/quests/the_ice_islands/nibelor_dog_led.lua +++ b/data-otservbr-global/scripts/quests/the_ice_islands_quest/movements_nibelor_dog_led.lua @@ -3,25 +3,25 @@ local setting = { { sledPosition = Position(32367, 31058, 7), destination = Position(32407, 31067, 7), - storage = Storage.TheIceIslands.Mission06, + storage = Storage.Quest.U8_0.TheIceIslands.Mission06, value = 8, }, { sledPosition = Position(32409, 31066, 7), destination = Position(32365, 31059, 7), - storage = Storage.TheIceIslands.Mission06, + storage = Storage.Quest.U8_0.TheIceIslands.Mission06, value = 8, }, { sledPosition = Position(32303, 31081, 7), destination = Position(32329, 31045, 7), - storage = Storage.TheIceIslands.Mission03, + storage = Storage.Quest.U8_0.TheIceIslands.Mission03, value = 3, }, { sledPosition = Position(32327, 31045, 7), destination = Position(32301, 31080, 7), - storage = Storage.TheIceIslands.Mission03, + storage = Storage.Quest.U8_0.TheIceIslands.Mission03, value = 3, }, } diff --git a/data-otservbr-global/scripts/actions/quests/inquisition/brother_lever.lua b/data-otservbr-global/scripts/quests/the_inquisition_quest/actions_brother_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/inquisition/brother_lever.lua rename to data-otservbr-global/scripts/quests/the_inquisition_quest/actions_brother_lever.lua diff --git a/data-otservbr-global/scripts/actions/quests/inquisition/rewards.lua b/data-otservbr-global/scripts/quests/the_inquisition_quest/actions_rewards.lua similarity index 68% rename from data-otservbr-global/scripts/actions/quests/inquisition/rewards.lua rename to data-otservbr-global/scripts/quests/the_inquisition_quest/actions_rewards.lua index 84f128c9a2e..06ccc508c6a 100644 --- a/data-otservbr-global/scripts/actions/quests/inquisition/rewards.lua +++ b/data-otservbr-global/scripts/quests/the_inquisition_quest/actions_rewards.lua @@ -12,10 +12,10 @@ local rewards = { local inquisitionRewards = Action() function inquisitionRewards.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.TheInquisition.Reward) < 1 then - player:setStorageValue(Storage.TheInquisition.Reward, 1) - player:setStorageValue(Storage.TheInquisition.Questline, 25) - player:setStorageValue(Storage.TheInquisition.Mission07, 5) -- The Inquisition Questlog- "Mission 7: The Shadow Nexus" + if player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Reward) < 1 then + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Reward, 1) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline, 25) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission07, 5) -- The Inquisition Questlog- "Mission 7: The Shadow Nexus" player:addItem(rewards[item.uid], 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found " .. ItemType(rewards[item.uid]):getName() .. ".") player:addAchievement("Master of the Nexus") diff --git a/data-otservbr-global/scripts/actions/quests/inquisition/ungreez_door.lua b/data-otservbr-global/scripts/quests/the_inquisition_quest/actions_ungreez_door.lua similarity index 88% rename from data-otservbr-global/scripts/actions/quests/inquisition/ungreez_door.lua rename to data-otservbr-global/scripts/quests/the_inquisition_quest/actions_ungreez_door.lua index 95b21b0e5e3..d6da445265b 100644 --- a/data-otservbr-global/scripts/actions/quests/inquisition/ungreez_door.lua +++ b/data-otservbr-global/scripts/quests/the_inquisition_quest/actions_ungreez_door.lua @@ -1,6 +1,7 @@ local inquisitionUngreez = Action() + function inquisitionUngreez.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.TheInquisition.Questline) == 18 then + if player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 18 then if item.actionid == 1004 then if item.itemid == 5113 then player:teleportTo(toPosition, true) diff --git a/data-otservbr-global/scripts/actions/quests/inquisition/vampire_hunt.lua b/data-otservbr-global/scripts/quests/the_inquisition_quest/actions_vampire_hunt.lua similarity index 67% rename from data-otservbr-global/scripts/actions/quests/inquisition/vampire_hunt.lua rename to data-otservbr-global/scripts/quests/the_inquisition_quest/actions_vampire_hunt.lua index e3e78cc62f4..41f3086fa78 100644 --- a/data-otservbr-global/scripts/actions/quests/inquisition/vampire_hunt.lua +++ b/data-otservbr-global/scripts/quests/the_inquisition_quest/actions_vampire_hunt.lua @@ -5,10 +5,11 @@ local altars = { } local inquisitionVampire = Action() + function inquisitionVampire.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.TheInquisition.Questline) == 8 then - player:setStorageValue(Storage.TheInquisition.Questline, 9) - player:setStorageValue(Storage.TheInquisition.Mission03, 4) -- The Inquisition Questlog- "Mission 3: Vampire Hunt" + if player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 8 then + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline, 9) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission03, 4) -- The Inquisition Questlog- "Mission 3: Vampire Hunt" local k = {} for i = 1, #altars do local tmp = Tile(altars[i]):getItemById(3083) diff --git a/data-otservbr-global/scripts/creaturescripts/quests/inquisition/inquisition_boss.lua b/data-otservbr-global/scripts/quests/the_inquisition_quest/creaturescripts_inquisition_boss.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/inquisition/inquisition_boss.lua rename to data-otservbr-global/scripts/quests/the_inquisition_quest/creaturescripts_inquisition_boss.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/inquisition/inquisition_ungreez.lua b/data-otservbr-global/scripts/quests/the_inquisition_quest/creaturescripts_inquisition_ungreez.lua similarity index 56% rename from data-otservbr-global/scripts/creaturescripts/quests/inquisition/inquisition_ungreez.lua rename to data-otservbr-global/scripts/quests/the_inquisition_quest/creaturescripts_inquisition_ungreez.lua index 6859446d9d4..70f09b1c01e 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/inquisition/inquisition_ungreez.lua +++ b/data-otservbr-global/scripts/quests/the_inquisition_quest/creaturescripts_inquisition_ungreez.lua @@ -4,10 +4,10 @@ function ungreezKill.onDeath(creature, _corpse, _lastHitKiller, mostDamageKiller if not player then return true end - if player:getStorageValue(Storage.TheInquisition.Questline) == 18 then + if player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) == 18 then -- The Inquisition Questlog- 'Mission 6: The Demon Ungreez' - player:setStorageValue(Storage.TheInquisition.Mission06, 2) - player:setStorageValue(Storage.TheInquisition.Questline, 19) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission06, 2) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline, 19) end return true end diff --git a/data-otservbr-global/scripts/movements/quests/inquisition/entrance.lua b/data-otservbr-global/scripts/quests/the_inquisition_quest/movements_entrance.lua similarity index 59% rename from data-otservbr-global/scripts/movements/quests/inquisition/entrance.lua rename to data-otservbr-global/scripts/quests/the_inquisition_quest/movements_entrance.lua index 19f6914eb96..ad00337433b 100644 --- a/data-otservbr-global/scripts/movements/quests/inquisition/entrance.lua +++ b/data-otservbr-global/scripts/quests/the_inquisition_quest/movements_entrance.lua @@ -1,16 +1,17 @@ -local throneStorages = { - Storage.Quest.U7_9.ThePitsOfInferno.ThroneInfernatil, - Storage.Quest.U7_9.ThePitsOfInferno.ThroneTafariel, - Storage.Quest.U7_9.ThePitsOfInferno.ThroneVerminor, - Storage.Quest.U7_9.ThePitsOfInferno.ThroneApocalypse, - Storage.Quest.U7_9.ThePitsOfInferno.ThroneBazir, - Storage.Quest.U7_9.ThePitsOfInferno.ThroneAshfalor, - Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, +local throneConfig = { + { storage = Storage.Quest.U7_9.ThePitsOfInferno.ThroneInfernatil, value = 1 }, + { storage = Storage.Quest.U7_9.ThePitsOfInferno.ThroneTafariel, value = 1 }, + { storage = Storage.Quest.U7_9.ThePitsOfInferno.ThroneVerminor, value = 1 }, + { storage = Storage.Quest.U7_9.ThePitsOfInferno.ThroneApocalypse, value = 1 }, + { storage = Storage.Quest.U7_9.ThePitsOfInferno.ThroneBazir, value = 1 }, + { storage = Storage.Quest.U7_9.ThePitsOfInferno.ThroneAshfalor, value = 1 }, + { storage = Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, value = 10 }, } local function hasTouchedOneThrone(player) - for i = 1, #throneStorages do - if player:getStorageValue(throneStorages[i]) == 1 then + for i = 1, #throneConfig do + local config = throneConfig[i] + if player:getStorageValue(config.storage) == config.value then return true end end @@ -28,7 +29,7 @@ function entrance.onStepIn(creature, item, position, fromPosition) return true end - if hasTouchedOneThrone(player) and player:getLevel() >= 100 and player:getStorageValue(Storage.TheInquisition.Questline) >= 20 then + if hasTouchedOneThrone(player) and player:getLevel() >= 100 and player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) >= 20 then for i = 1, #config do local cfg = config[i] if Position(cfg.position.x, cfg.position.y, cfg.position.z) == player:getPosition() then diff --git a/data-otservbr-global/scripts/movements/quests/inquisition/reward_room_text.lua b/data-otservbr-global/scripts/quests/the_inquisition_quest/movements_reward_room_text.lua similarity index 72% rename from data-otservbr-global/scripts/movements/quests/inquisition/reward_room_text.lua rename to data-otservbr-global/scripts/quests/the_inquisition_quest/movements_reward_room_text.lua index ea494e5ee05..ee72b33f0a6 100644 --- a/data-otservbr-global/scripts/movements/quests/inquisition/reward_room_text.lua +++ b/data-otservbr-global/scripts/quests/the_inquisition_quest/movements_reward_room_text.lua @@ -8,11 +8,11 @@ local rewardRoomText = MoveEvent() function rewardRoomText.onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() - if not player or player:getStorageValue(Storage.TheInquisition.RewardRoomText) == 1 then + if not player or player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.RewardRoomText) == 1 then return true end - player:setStorageValue(Storage.TheInquisition.RewardRoomText, 1) + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.RewardRoomText, 1) player:say("You can choose exactly one of these chests. Choose wisely!", TALKTYPE_MONSTER_SAY) return true end diff --git a/data-otservbr-global/scripts/movements/quests/inquisition/teleport_main.lua b/data-otservbr-global/scripts/quests/the_inquisition_quest/movements_teleport_main.lua similarity index 90% rename from data-otservbr-global/scripts/movements/quests/inquisition/teleport_main.lua rename to data-otservbr-global/scripts/quests/the_inquisition_quest/movements_teleport_main.lua index bfbff379ef7..a0a70ca6e28 100644 --- a/data-otservbr-global/scripts/movements/quests/inquisition/teleport_main.lua +++ b/data-otservbr-global/scripts/quests/the_inquisition_quest/movements_teleport_main.lua @@ -184,14 +184,14 @@ function teleportMain.onStepIn(creature, item, position, fromPosition) end local teleport = teleports[item.uid] - if teleport.alwaysSetStorage and player:getStorageValue(Storage.TheInquisition.EnterTeleport) < teleport.storage then - player:setStorageValue(Storage.TheInquisition.EnterTeleport, teleport.storage) + if teleport.alwaysSetStorage and player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.EnterTeleport) < teleport.storage then + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.EnterTeleport, teleport.storage) end if teleport.bossStorage then if Game.getStorageValue(teleport.bossStorage) >= 2 then - if player:getStorageValue(Storage.TheInquisition.EnterTeleport) < teleport.storage then - player:setStorageValue(Storage.TheInquisition.EnterTeleport, teleport.storage) + if player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.EnterTeleport) < teleport.storage then + player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.EnterTeleport, teleport.storage) player:setStorageValue(teleport.bossStorage, 0) end else @@ -200,7 +200,7 @@ function teleportMain.onStepIn(creature, item, position, fromPosition) player:say("Escaping back to the Retreat.", TALKTYPE_MONSTER_SAY) return true end - elseif teleport.storage and player:getStorageValue(Storage.TheInquisition.EnterTeleport) < teleport.storage then + elseif teleport.storage and player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.EnterTeleport) < teleport.storage then player:teleportTo(fromPosition) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:say("You don't have enough energy to enter this portal", TALKTYPE_MONSTER_SAY) diff --git a/data-otservbr-global/scripts/actions/quests/the_lost_brother/asura_mirror.lua b/data-otservbr-global/scripts/quests/the_lost_brother/actions_asura_mirror.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_lost_brother/asura_mirror.lua rename to data-otservbr-global/scripts/quests/the_lost_brother/actions_asura_mirror.lua diff --git a/data-otservbr-global/scripts/quests/the_new_frontier/action-arena.lua b/data-otservbr-global/scripts/quests/the_new_frontier/action_arena.lua similarity index 100% rename from data-otservbr-global/scripts/quests/the_new_frontier/action-arena.lua rename to data-otservbr-global/scripts/quests/the_new_frontier/action_arena.lua diff --git a/data-otservbr-global/scripts/quests/the_new_frontier/action-beaver.lua b/data-otservbr-global/scripts/quests/the_new_frontier/action_beaver.lua similarity index 100% rename from data-otservbr-global/scripts/quests/the_new_frontier/action-beaver.lua rename to data-otservbr-global/scripts/quests/the_new_frontier/action_beaver.lua diff --git a/data-otservbr-global/scripts/quests/the_new_frontier/action-elevator.lua b/data-otservbr-global/scripts/quests/the_new_frontier/action_elevator.lua similarity index 100% rename from data-otservbr-global/scripts/quests/the_new_frontier/action-elevator.lua rename to data-otservbr-global/scripts/quests/the_new_frontier/action_elevator.lua diff --git a/data-otservbr-global/scripts/quests/the_new_frontier/action-hidden_note.lua b/data-otservbr-global/scripts/quests/the_new_frontier/action_hidden_note.lua similarity index 100% rename from data-otservbr-global/scripts/quests/the_new_frontier/action-hidden_note.lua rename to data-otservbr-global/scripts/quests/the_new_frontier/action_hidden_note.lua diff --git a/data-otservbr-global/scripts/quests/the_new_frontier/action-outfit.lua b/data-otservbr-global/scripts/quests/the_new_frontier/action_outfit.lua similarity index 100% rename from data-otservbr-global/scripts/quests/the_new_frontier/action-outfit.lua rename to data-otservbr-global/scripts/quests/the_new_frontier/action_outfit.lua diff --git a/data-otservbr-global/scripts/quests/the_new_frontier/action-prision_secret_door.lua b/data-otservbr-global/scripts/quests/the_new_frontier/action_prision_secret_door.lua similarity index 100% rename from data-otservbr-global/scripts/quests/the_new_frontier/action-prision_secret_door.lua rename to data-otservbr-global/scripts/quests/the_new_frontier/action_prision_secret_door.lua diff --git a/data-otservbr-global/scripts/quests/the_new_frontier/action-vine.lua b/data-otservbr-global/scripts/quests/the_new_frontier/action_vine.lua similarity index 100% rename from data-otservbr-global/scripts/quests/the_new_frontier/action-vine.lua rename to data-otservbr-global/scripts/quests/the_new_frontier/action_vine.lua diff --git a/data-otservbr-global/scripts/quests/the_new_frontier/shard_of_corruption_kill.lua b/data-otservbr-global/scripts/quests/the_new_frontier/creaturescripts_shard_of_corruption_kill.lua similarity index 100% rename from data-otservbr-global/scripts/quests/the_new_frontier/shard_of_corruption_kill.lua rename to data-otservbr-global/scripts/quests/the_new_frontier/creaturescripts_shard_of_corruption_kill.lua diff --git a/data-otservbr-global/scripts/quests/the_new_frontier/tirecz_kill.lua b/data-otservbr-global/scripts/quests/the_new_frontier/creaturescripts_tirecz_kill.lua similarity index 100% rename from data-otservbr-global/scripts/quests/the_new_frontier/tirecz_kill.lua rename to data-otservbr-global/scripts/quests/the_new_frontier/creaturescripts_tirecz_kill.lua diff --git a/data-otservbr-global/scripts/quests/the_new_frontier/corruption_hole.lua b/data-otservbr-global/scripts/quests/the_new_frontier/movement_corruption_hole.lua similarity index 100% rename from data-otservbr-global/scripts/quests/the_new_frontier/corruption_hole.lua rename to data-otservbr-global/scripts/quests/the_new_frontier/movement_corruption_hole.lua diff --git a/data-otservbr-global/scripts/quests/the_new_frontier/movement-jail_exit.lua b/data-otservbr-global/scripts/quests/the_new_frontier/movement_jail_exit.lua similarity index 100% rename from data-otservbr-global/scripts/quests/the_new_frontier/movement-jail_exit.lua rename to data-otservbr-global/scripts/quests/the_new_frontier/movement_jail_exit.lua diff --git a/data-otservbr-global/scripts/quests/the_new_frontier/movement-minotaur_boss.lua b/data-otservbr-global/scripts/quests/the_new_frontier/movement_minotaur_boss.lua similarity index 100% rename from data-otservbr-global/scripts/quests/the_new_frontier/movement-minotaur_boss.lua rename to data-otservbr-global/scripts/quests/the_new_frontier/movement_minotaur_boss.lua diff --git a/data-otservbr-global/scripts/quests/the_new_frontier/movement-prision_trap.lua b/data-otservbr-global/scripts/quests/the_new_frontier/movement_prision_trap.lua similarity index 100% rename from data-otservbr-global/scripts/quests/the_new_frontier/movement-prision_trap.lua rename to data-otservbr-global/scripts/quests/the_new_frontier/movement_prision_trap.lua diff --git a/data-otservbr-global/scripts/quests/the_new_frontier/movement-wayout.lua b/data-otservbr-global/scripts/quests/the_new_frontier/movement_wayout.lua similarity index 100% rename from data-otservbr-global/scripts/quests/the_new_frontier/movement-wayout.lua rename to data-otservbr-global/scripts/quests/the_new_frontier/movement_wayout.lua diff --git a/data-otservbr-global/scripts/quests/the_new_frontier/snake_head_teleport.lua b/data-otservbr-global/scripts/quests/the_new_frontier/movements_snake_head_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/quests/the_new_frontier/snake_head_teleport.lua rename to data-otservbr-global/scripts/quests/the_new_frontier/movements_snake_head_teleport.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/oven.lua b/data-otservbr-global/scripts/quests/the_outlaw_camp/actions_oven.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_outlaw_camp/oven.lua rename to data-otservbr-global/scripts/quests/the_outlaw_camp/actions_oven.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/power_burn.lua b/data-otservbr-global/scripts/quests/the_outlaw_camp/actions_power_burn.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_outlaw_camp/power_burn.lua rename to data-otservbr-global/scripts/quests/the_outlaw_camp/actions_power_burn.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/power_switch.lua b/data-otservbr-global/scripts/quests/the_outlaw_camp/actions_power_switch.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_outlaw_camp/power_switch.lua rename to data-otservbr-global/scripts/quests/the_outlaw_camp/actions_power_switch.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/the_outlaw_camp_quest.lua b/data-otservbr-global/scripts/quests/the_outlaw_camp/actions_the_outlaw_camp_quest.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_outlaw_camp/the_outlaw_camp_quest.lua rename to data-otservbr-global/scripts/quests/the_outlaw_camp/actions_the_outlaw_camp_quest.lua diff --git a/data-otservbr-global/scripts/movements/quests/the_outlaw_camp/entrance.lua b/data-otservbr-global/scripts/quests/the_outlaw_camp/movements_entrance.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/the_outlaw_camp/entrance.lua rename to data-otservbr-global/scripts/quests/the_outlaw_camp/movements_entrance.lua diff --git a/data-otservbr-global/scripts/globalevents/quests/pits_of_inferno_bosses.lua b/data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/globalevents_pits_of_inferno_bosses.lua similarity index 100% rename from data-otservbr-global/scripts/globalevents/quests/pits_of_inferno_bosses.lua rename to data-otservbr-global/scripts/quests/the_pits_of_inferno_quest/globalevents_pits_of_inferno_bosses.lua diff --git a/data-otservbr-global/scripts/actions/quests/postman/package.lua b/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_package.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/postman/package.lua rename to data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_package.lua diff --git a/data-otservbr-global/scripts/actions/quests/postman/present.lua b/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_present.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/postman/present.lua rename to data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_present.lua diff --git a/data-otservbr-global/scripts/actions/quests/postman/waldos_posthorn.lua b/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_waldos_posthorn.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/postman/waldos_posthorn.lua rename to data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_waldos_posthorn.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/the_primal_ordeal/magma_bubble_death.lua b/data-otservbr-global/scripts/quests/the_primal_ordeal/creaturescripts_magma_bubble_death.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/the_primal_ordeal/magma_bubble_death.lua rename to data-otservbr-global/scripts/quests/the_primal_ordeal/creaturescripts_magma_bubble_death.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/the_primal_ordeal/the_primal_menace_killed.lua b/data-otservbr-global/scripts/quests/the_primal_ordeal/creaturescripts_the_primal_menace_killed.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/the_primal_ordeal/the_primal_menace_killed.lua rename to data-otservbr-global/scripts/quests/the_primal_ordeal/creaturescripts_the_primal_menace_killed.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_secret_library/asura_mirror.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_asura_mirror.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_secret_library/asura_mirror.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_asura_mirror.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_secret_library/basinfire.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_basinfire.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_secret_library/basinfire.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_basinfire.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_secret_library/bastion_access.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_bastion_access.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_secret_library/bastion_access.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_bastion_access.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_secret_library/blacktp.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_blacktp.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_secret_library/blacktp.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_blacktp.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_secret_library/bluetp.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_bluetp.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_secret_library/bluetp.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_bluetp.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_secret_library/boattp.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_boattp.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_secret_library/boattp.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_boattp.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_secret_library/bone.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_bone.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_secret_library/bone.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_bone.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_secret_library/bonedoor.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_bonedoor.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_secret_library/bonedoor.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_bonedoor.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_secret_library/book.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_book.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_secret_library/book.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_book.lua diff --git a/data-otservbr-global/scripts/actions/quests/secret_library/bosses_killed.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_bosses_killed.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/secret_library/bosses_killed.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_bosses_killed.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_secret_library/corpse.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_corpse.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_secret_library/corpse.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_corpse.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_secret_library/energybasin.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_energybasin.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_secret_library/energybasin.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_energybasin.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_secret_library/enterlibrary.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_enterlibrary.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_secret_library/enterlibrary.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_enterlibrary.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_secret_library/eyekey.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_eyekey.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_secret_library/eyekey.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_eyekey.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_secret_library/fish.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_fish.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_secret_library/fish.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_fish.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_secret_library/greentp.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_greentp.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_secret_library/greentp.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_greentp.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_secret_library/leverdoor.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_leverdoor.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_secret_library/leverdoor.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_leverdoor.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_secret_library/leverruby.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_leverruby.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_secret_library/leverruby.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_leverruby.lua diff --git a/data-otservbr-global/scripts/actions/quests/secret_library/library_entrances.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_library_entrances.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/secret_library/library_entrances.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_library_entrances.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_secret_library/lotuskey.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_lotuskey.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_secret_library/lotuskey.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_lotuskey.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_secret_library/peacock.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_peacock.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_secret_library/peacock.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_peacock.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_secret_library/pinktp.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_pinktp.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_secret_library/pinktp.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_pinktp.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_secret_library/sealedbook.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_sealedbook.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_secret_library/sealedbook.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_sealedbook.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_secret_library/skullground.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_skullground.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_secret_library/skullground.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_skullground.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_secret_library/statuedeeplings.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_statuedeeplings.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_secret_library/statuedeeplings.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_statuedeeplings.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_secret_library/strandhair.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_strandhair.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_secret_library/strandhair.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_strandhair.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_secret_library/telescop.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/actions_telescop.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_secret_library/telescop.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/actions_telescop.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/the_secret_library/falcon_minibosses.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/creaturescripts_falcon_minibosses.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/the_secret_library/falcon_minibosses.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/creaturescripts_falcon_minibosses.lua diff --git a/data-otservbr-global/scripts/globalevents/quests/secret_library_grand_canon_dominus.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/globalevents_secret_library_grand_canon_dominus.lua similarity index 100% rename from data-otservbr-global/scripts/globalevents/quests/secret_library_grand_canon_dominus.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/globalevents_secret_library_grand_canon_dominus.lua diff --git a/data-otservbr-global/scripts/globalevents/quests/secret_library_grand_chaplain_gaunder.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/globalevents_secret_library_grand_chaplain_gaunder.lua similarity index 100% rename from data-otservbr-global/scripts/globalevents/quests/secret_library_grand_chaplain_gaunder.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/globalevents_secret_library_grand_chaplain_gaunder.lua diff --git a/data-otservbr-global/scripts/globalevents/quests/secret_library_grand_commander_soeren.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/globalevents_secret_library_grand_commander_soeren.lua similarity index 100% rename from data-otservbr-global/scripts/globalevents/quests/secret_library_grand_commander_soeren.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/globalevents_secret_library_grand_commander_soeren.lua diff --git a/data-otservbr-global/scripts/globalevents/quests/secret_library_preceptor_lazare.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/globalevents_secret_library_preceptor_lazare.lua similarity index 100% rename from data-otservbr-global/scripts/globalevents/quests/secret_library_preceptor_lazare.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/globalevents_secret_library_preceptor_lazare.lua diff --git a/data-otservbr-global/scripts/globalevents/quests/secret_library_spawn_damage.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/globalevents_secret_library_spawn_damage.lua similarity index 100% rename from data-otservbr-global/scripts/globalevents/quests/secret_library_spawn_damage.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/globalevents_secret_library_spawn_damage.lua diff --git a/data-otservbr-global/scripts/movements/quests/the_secret_library/boat.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/movements_boat.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/the_secret_library/boat.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/movements_boat.lua diff --git a/data-otservbr-global/scripts/movements/quests/the_secret_library/golem_teleport.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/movements_golem_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/the_secret_library/golem_teleport.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/movements_golem_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/the_secret_library/pink_teleport.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/movements_pink_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/the_secret_library/pink_teleport.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/movements_pink_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/the_secret_library/teleport.lua b/data-otservbr-global/scripts/quests/the_secret_library_quest/movements_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/the_secret_library/teleport.lua rename to data-otservbr-global/scripts/quests/the_secret_library_quest/movements_teleport.lua diff --git a/data-otservbr-global/scripts/movements/quests/the_spike_tasks/geomantic_charges.lua b/data-otservbr-global/scripts/quests/the_spike_tasks/movements_geomantic_charges.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/the_spike_tasks/geomantic_charges.lua rename to data-otservbr-global/scripts/quests/the_spike_tasks/movements_geomantic_charges.lua diff --git a/data-otservbr-global/scripts/movements/quests/the_spike_tasks/spike_teleport.lua b/data-otservbr-global/scripts/quests/the_spike_tasks/movements_spike_teleport.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/the_spike_tasks/spike_teleport.lua rename to data-otservbr-global/scripts/quests/the_spike_tasks/movements_spike_teleport.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_tainted_soul/star_herb.lua b/data-otservbr-global/scripts/quests/the_tainted_soul/actions_star_herb.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_tainted_soul/star_herb.lua rename to data-otservbr-global/scripts/quests/the_tainted_soul/actions_star_herb.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_thieves_guild/climbing_vine.lua b/data-otservbr-global/scripts/quests/the_thieves_guild_quest/actions_climbing_vine.lua similarity index 99% rename from data-otservbr-global/scripts/actions/quests/the_thieves_guild/climbing_vine.lua rename to data-otservbr-global/scripts/quests/the_thieves_guild_quest/actions_climbing_vine.lua index 7326710a105..74a3a080a43 100644 --- a/data-otservbr-global/scripts/actions/quests/the_thieves_guild/climbing_vine.lua +++ b/data-otservbr-global/scripts/quests/the_thieves_guild_quest/actions_climbing_vine.lua @@ -4,6 +4,7 @@ local config = { } local theThievesVine = Action() + function theThievesVine.onUse(player, item, fromPosition, target, toPosition, isHotkey) local targetPosition = config[item.actionid] if not targetPosition then diff --git a/data-otservbr-global/scripts/actions/quests/the_thieves_guild/dwarf_disguise_kit.lua b/data-otservbr-global/scripts/quests/the_thieves_guild_quest/actions_dwarf_disguise_kit.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/the_thieves_guild/dwarf_disguise_kit.lua rename to data-otservbr-global/scripts/quests/the_thieves_guild_quest/actions_dwarf_disguise_kit.lua diff --git a/data-otservbr-global/scripts/actions/quests/the_thieves_guild/fish_napping_door.lua b/data-otservbr-global/scripts/quests/the_thieves_guild_quest/actions_fish_napping_door.lua similarity index 77% rename from data-otservbr-global/scripts/actions/quests/the_thieves_guild/fish_napping_door.lua rename to data-otservbr-global/scripts/quests/the_thieves_guild_quest/actions_fish_napping_door.lua index 9cc51744294..647bf32593e 100644 --- a/data-otservbr-global/scripts/actions/quests/the_thieves_guild/fish_napping_door.lua +++ b/data-otservbr-global/scripts/quests/the_thieves_guild_quest/actions_fish_napping_door.lua @@ -1,6 +1,6 @@ local theThievesDoor = Action() function theThievesDoor.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.ThievesGuild.Mission06) == 3 then + if player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission06) == 3 then player:say("You slip through the door", TALKTYPE_MONSTER_SAY) player:teleportTo(Position(32359, 32786, 6)) end diff --git a/data-otservbr-global/scripts/actions/quests/the_thieves_guild/fish_napping_key.lua b/data-otservbr-global/scripts/quests/the_thieves_guild_quest/actions_fish_napping_key.lua similarity index 84% rename from data-otservbr-global/scripts/actions/quests/the_thieves_guild/fish_napping_key.lua rename to data-otservbr-global/scripts/quests/the_thieves_guild_quest/actions_fish_napping_key.lua index 23b22149583..ad06adecb1d 100644 --- a/data-otservbr-global/scripts/actions/quests/the_thieves_guild/fish_napping_key.lua +++ b/data-otservbr-global/scripts/quests/the_thieves_guild_quest/actions_fish_napping_key.lua @@ -2,7 +2,7 @@ local theThievesKey = Action() function theThievesKey.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.ThievesGuild.Mission06) == 2 then + if player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission06) == 2 then if target.actionid == 51394 and item.itemid == 7934 then player:removeItem(7934, 1) player:say("In your haste you break the key while slipping in.", TALKTYPE_MONSTER_SAY) diff --git a/data-otservbr-global/scripts/actions/quests/the_thieves_guild/note.lua b/data-otservbr-global/scripts/quests/the_thieves_guild_quest/actions_note.lua similarity index 76% rename from data-otservbr-global/scripts/actions/quests/the_thieves_guild/note.lua rename to data-otservbr-global/scripts/quests/the_thieves_guild_quest/actions_note.lua index d7bde87c275..829a9762e8e 100644 --- a/data-otservbr-global/scripts/actions/quests/the_thieves_guild/note.lua +++ b/data-otservbr-global/scripts/quests/the_thieves_guild_quest/actions_note.lua @@ -8,15 +8,16 @@ local function removeNote(position) end local theThievesNote = Action() + function theThievesNote.onUse(player, item, fromPosition, target, toPosition, isHotkey) if target.actionid ~= 12509 then return false end - if player:getStorageValue(Storage.ThievesGuild.Mission08) == 1 then + if player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission08) == 1 then player:removeItem(7873, 1) Game.createItem(7872, 1, notePos) - player:setStorageValue(Storage.ThievesGuild.Mission08, 2) + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission08, 2) addEvent(removeNote, 5 * 60 * 1000, notePos) end return true diff --git a/data-otservbr-global/scripts/actions/quests/the_travelling_trader/outlaw_camp_door.lua b/data-otservbr-global/scripts/quests/the_travelling_trader/actions_outlaw_camp_door.lua similarity index 82% rename from data-otservbr-global/scripts/actions/quests/the_travelling_trader/outlaw_camp_door.lua rename to data-otservbr-global/scripts/quests/the_travelling_trader/actions_outlaw_camp_door.lua index 50f2687748f..9f8acff2bc5 100644 --- a/data-otservbr-global/scripts/actions/quests/the_travelling_trader/outlaw_camp_door.lua +++ b/data-otservbr-global/scripts/quests/the_travelling_trader/actions_outlaw_camp_door.lua @@ -1,6 +1,6 @@ local outlawCamp = Action() function outlawCamp.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.TravellingTrader.Mission02) == 3 then + if player:getStorageValue(Storage.Quest.U8_1.TheTravellingTrader.Mission02) == 3 then if item.itemid == 1642 then player:teleportTo(toPosition, true) item:transform(item.itemid + 1) diff --git a/data-otservbr-global/scripts/actions/quests/their_master_voice/slime_gobbler.lua b/data-otservbr-global/scripts/quests/their_masters_voice/actions_slime_gobbler.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/their_master_voice/slime_gobbler.lua rename to data-otservbr-global/scripts/quests/their_masters_voice/actions_slime_gobbler.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/their_masters_voice/mage_death.lua b/data-otservbr-global/scripts/quests/their_masters_voice/creaturescripts_mage_death.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/their_masters_voice/mage_death.lua rename to data-otservbr-global/scripts/quests/their_masters_voice/creaturescripts_mage_death.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/their_masters_voice/servant_death.lua b/data-otservbr-global/scripts/quests/their_masters_voice/creaturescripts_servant_death.lua similarity index 100% rename from data-otservbr-global/scripts/creaturescripts/quests/their_masters_voice/servant_death.lua rename to data-otservbr-global/scripts/quests/their_masters_voice/creaturescripts_servant_death.lua diff --git a/data-otservbr-global/scripts/globalevents/quests/their_master_voice_mad_mage.lua b/data-otservbr-global/scripts/quests/their_masters_voice/globalevents_their_master_voice_mad_mage.lua similarity index 100% rename from data-otservbr-global/scripts/globalevents/quests/their_master_voice_mad_mage.lua rename to data-otservbr-global/scripts/quests/their_masters_voice/globalevents_their_master_voice_mad_mage.lua diff --git a/data-otservbr-global/scripts/movements/quests/their_master_voice/entrance.lua b/data-otservbr-global/scripts/quests/their_masters_voice/movements_entrance.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/their_master_voice/entrance.lua rename to data-otservbr-global/scripts/quests/their_masters_voice/movements_entrance.lua diff --git a/data-otservbr-global/scripts/creaturescripts/quests/thieves_guild/nomad_kill.lua b/data-otservbr-global/scripts/quests/thieves_guild/creaturescripts_nomad_kill.lua similarity index 59% rename from data-otservbr-global/scripts/creaturescripts/quests/thieves_guild/nomad_kill.lua rename to data-otservbr-global/scripts/quests/thieves_guild/creaturescripts_nomad_kill.lua index 6f9c3d32547..656a31a6011 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/thieves_guild/nomad_kill.lua +++ b/data-otservbr-global/scripts/quests/thieves_guild/creaturescripts_nomad_kill.lua @@ -1,8 +1,8 @@ local nomadKill = CreatureEvent("NomadDeath") function nomadKill.onDeath(creature, _corpse, _lastHitKiller, mostDamageKiller) onDeathForParty(creature, mostDamageKiller, function(creature, player) - if player:getStorageValue(Storage.ThievesGuild.Mission04) == 3 then - player:setStorageValue(Storage.ThievesGuild.Mission04, 4) + if player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission04) == 3 then + player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission04, 4) end end) return true diff --git a/data-otservbr-global/scripts/actions/quests/tibia_tales/ultimate_booze_beer_bottle.lua b/data-otservbr-global/scripts/quests/tibia_tales/actions_ultimate_booze_beer_bottle.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/tibia_tales/ultimate_booze_beer_bottle.lua rename to data-otservbr-global/scripts/quests/tibia_tales/actions_ultimate_booze_beer_bottle.lua diff --git a/data-otservbr-global/scripts/actions/quests/tinder_box/reward.lua b/data-otservbr-global/scripts/quests/tinder_box/actions_reward.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/tinder_box/reward.lua rename to data-otservbr-global/scripts/quests/tinder_box/actions_reward.lua diff --git a/data-otservbr-global/scripts/actions/quests/tinder_box/tinder_box.lua b/data-otservbr-global/scripts/quests/tinder_box/actions_tinder_box.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/tinder_box/tinder_box.lua rename to data-otservbr-global/scripts/quests/tinder_box/actions_tinder_box.lua diff --git a/data-otservbr-global/scripts/quests/to_blind_the_enemy_quest/mirror.lua b/data-otservbr-global/scripts/quests/to_blind_the_enemy_quest/mirror.lua new file mode 100644 index 00000000000..95da06446a5 --- /dev/null +++ b/data-otservbr-global/scripts/quests/to_blind_the_enemy_quest/mirror.lua @@ -0,0 +1,31 @@ +local mirror = Action() + +local function revertItem(position, itemId) + local item = Tile(position):getItemById(itemId) + if item then + item:transform(itemId) + end +end + +function mirror.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.Questline) == 1 then + if target:getActionId() == 4001 and target.itemid == 132 then + local itemToRemove = Tile(toPosition):getItemById(132) + if itemToRemove then + itemToRemove:remove() + toPosition:sendMagicEffect(CONST_ME_MAGIC_POWDER) + player:setStorageValue(Storage.TibiaTales.ToBlindTheEnemy.Questline, 2) + player:say("KABOOM !!", TALKTYPE_MONSTER_SAY, false, player, toPosition) + addEvent(revertItem, 60 * 1000, toPosition, 132) + item:remove(1) + end + + return true + end + end + + return onUseMirror(player, item, fromPosition, target, toPosition, isHotkey) +end + +mirror:id(3463) +mirror:register() diff --git a/data-otservbr-global/scripts/quests/tower_defence_quest/creaturescripts_goblin_leader_kill.lua b/data-otservbr-global/scripts/quests/tower_defence_quest/creaturescripts_goblin_leader_kill.lua new file mode 100644 index 00000000000..15358e22fb8 --- /dev/null +++ b/data-otservbr-global/scripts/quests/tower_defence_quest/creaturescripts_goblin_leader_kill.lua @@ -0,0 +1,13 @@ +local creaturescripts_goblin_leader_kill = CreatureEvent("GoblinLeaderDeath") + +function creaturescripts_goblin_leader_kill.onDeath(creature) + onDeathForDamagingPlayers(creature, function(creature, player) + if player:getStorageValue(Storage.Quest.U8_1.TowerDefenceQuest.Questline) == 2 then + player:setStorageValue(Storage.Quest.U8_1.TowerDefenceQuest.Questline, 3) + end + end) + + return true +end + +creaturescripts_goblin_leader_kill:register() diff --git a/data-otservbr-global/scripts/actions/quests/triangle_tower_quest/triangle_tower_lever.lua b/data-otservbr-global/scripts/quests/triangle_tower_quest/actions_triangle_tower_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/triangle_tower_quest/triangle_tower_lever.lua rename to data-otservbr-global/scripts/quests/triangle_tower_quest/actions_triangle_tower_lever.lua diff --git a/data-otservbr-global/scripts/movements/quests/troll_sabotage/teleport.lua b/data-otservbr-global/scripts/quests/troll_sabotage/movements_teleport.lua similarity index 92% rename from data-otservbr-global/scripts/movements/quests/troll_sabotage/teleport.lua rename to data-otservbr-global/scripts/quests/troll_sabotage/movements_teleport.lua index c3025ea8276..3f88e43a6c1 100644 --- a/data-otservbr-global/scripts/movements/quests/troll_sabotage/teleport.lua +++ b/data-otservbr-global/scripts/quests/troll_sabotage/movements_teleport.lua @@ -7,7 +7,7 @@ local function boots(player, item, fromPosition, position) end if bootsItem and bootsItem.itemid == 3079 then if fromPosition == config[4] then - if player:getStorageValue(Storage.Quest.U8_2.TrollSabotage.JumpTimer) < os.time() then + if player:getStorageValue(Storage.Quest.U8_2.TrollSabotageQuest.JumpTimer) < os.time() then player:teleportTo(position) player:say("You don't dare jump over the gap.", TALKTYPE_MONSTER_SAY) return true @@ -62,7 +62,7 @@ function teleport.onStepIn(player, item, fromPosition, position, target) return true end if fromPosition == Position(33231, 31765, 2) then - player:setStorageValue(Storage.Quest.U8_2.TrollSabotage.JumpTimer, os.time() + 1) + player:setStorageValue(Storage.Quest.U8_2.TrollSabotageQuest.JumpTimer, os.time() + 1) end for i = 1, #config do if fromPosition == config[i] and i < 4 then diff --git a/data-otservbr-global/scripts/actions/quests/unnatural_selection/mission5_ray_of_light.lua b/data-otservbr-global/scripts/quests/unnatural_selection/actions_mission5_ray_of_light.lua similarity index 54% rename from data-otservbr-global/scripts/actions/quests/unnatural_selection/mission5_ray_of_light.lua rename to data-otservbr-global/scripts/quests/unnatural_selection/actions_mission5_ray_of_light.lua index 680e8473e5b..df34bd30b2a 100644 --- a/data-otservbr-global/scripts/actions/quests/unnatural_selection/mission5_ray_of_light.lua +++ b/data-otservbr-global/scripts/quests/unnatural_selection/actions_mission5_ray_of_light.lua @@ -1,8 +1,8 @@ local unnatural = Action() function unnatural.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.UnnaturalSelection.Mission05) == 1 then - player:setStorageValue(Storage.UnnaturalSelection.Questline, 11) - player:setStorageValue(Storage.UnnaturalSelection.Mission05, 2) --Questlog, Unnatural Selection Quest "Mission 5: Ray of Light" + if player:getStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Mission05) == 1 then + player:setStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Questline, 11) + player:setStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Mission05, 2) --Questlog, Unnatural Selection Quest "Mission 5: Ray of Light" player:say("A ray of sunlight comes down from the heaven and hits the crystal. Wow. That probably means Fasuon is supporting.", TALKTYPE_MONSTER_SAY) toPosition:sendMagicEffect(CONST_ME_HOLYAREA) end diff --git a/data-otservbr-global/scripts/movements/quests/unnatural_selection/mission2_all_around_the_world.lua b/data-otservbr-global/scripts/quests/unnatural_selection/movements_mission2_all_around_the_world.lua similarity index 92% rename from data-otservbr-global/scripts/movements/quests/unnatural_selection/mission2_all_around_the_world.lua rename to data-otservbr-global/scripts/quests/unnatural_selection/movements_mission2_all_around_the_world.lua index 11a5cc6e653..194fe3c9250 100644 --- a/data-otservbr-global/scripts/movements/quests/unnatural_selection/mission2_all_around_the_world.lua +++ b/data-otservbr-global/scripts/quests/unnatural_selection/movements_mission2_all_around_the_world.lua @@ -76,13 +76,13 @@ function mission2AllAroundTheWorld.onStepIn(creature, item, position, fromPositi return true end - local targetValue = config[player:getStorageValue(Storage.UnnaturalSelection.Mission02)] + local targetValue = config[player:getStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Mission02)] if not targetValue then return true end if table.contains(targetValue.position, player:getPosition()) and player:getItemCount(10159) >= 1 then --Questlog, Unnatural Selection Quest "Mission 2: All Around the World" - player:setStorageValue(Storage.UnnaturalSelection.Mission02, player:getStorageValue(Storage.UnnaturalSelection.Mission02) + 1) + player:setStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Mission02, player:getStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Mission02) + 1) player:say(targetValue.text, TALKTYPE_MONSTER_SAY) end return true diff --git a/data-otservbr-global/scripts/movements/quests/unnatural_selection/mission3_dance_dance_evolution.lua b/data-otservbr-global/scripts/quests/unnatural_selection/movements_mission3_dance_dance_evolution.lua similarity index 67% rename from data-otservbr-global/scripts/movements/quests/unnatural_selection/mission3_dance_dance_evolution.lua rename to data-otservbr-global/scripts/quests/unnatural_selection/movements_mission3_dance_dance_evolution.lua index 41208f873f6..ace12727ff1 100644 --- a/data-otservbr-global/scripts/movements/quests/unnatural_selection/mission3_dance_dance_evolution.lua +++ b/data-otservbr-global/scripts/quests/unnatural_selection/movements_mission3_dance_dance_evolution.lua @@ -17,8 +17,6 @@ local config = { [16] = Position(32991, 31496, 1), } --- Missing: CONST_ME_CARNIPHILA effects when dancing (pattern unknown) - local mission3DanceDanceEvolution = MoveEvent() function mission3DanceDanceEvolution.onStepIn(creature, item, position, fromPosition) @@ -27,35 +25,37 @@ function mission3DanceDanceEvolution.onStepIn(creature, item, position, fromPosi return true end - local dancePosition = config[player:getStorageValue(Storage.UnnaturalSelection.DanceStatus)] + local dancePosition = config[player:getStorageValue(Storage.Quest.U8_54.UnnaturalSelection.DanceStatus)] if not dancePosition then return true end if position ~= dancePosition then - player:setStorageValue(Storage.UnnaturalSelection.DanceStatus, 1) + player:setStorageValue(Storage.Quest.U8_54.UnnaturalSelection.DanceStatus, 1) player:say("You did it wrong. now you have to start again.", TALKTYPE_MONSTER_SAY) config[1]:sendMagicEffect(CONST_ME_SMALLPLANTS) + config[1]:sendMagicEffect(CONST_ME_CARNIPHILA) -- Adicionando o efeito CARNIPHILA aqui return true end - local danceStatus = player:getStorageValue(Storage.UnnaturalSelection.DanceStatus) + local danceStatus = player:getStorageValue(Storage.Quest.U8_54.UnnaturalSelection.DanceStatus) if danceStatus == 1 then player:say("Dance for the mighty Krunus!", TALKTYPE_MONSTER_SAY) end --Questlog, Unnatural Selection Quest "Mission 2: All Around the World" - player:setStorageValue(Storage.UnnaturalSelection.DanceStatus, danceStatus + 1) + player:setStorageValue(Storage.Quest.U8_54.UnnaturalSelection.DanceStatus, danceStatus + 1) - local nextpos = config[player:getStorageValue(Storage.UnnaturalSelection.DanceStatus)] + local nextpos = config[player:getStorageValue(Storage.Quest.U8_54.UnnaturalSelection.DanceStatus)] if nextpos then nextpos:sendMagicEffect(CONST_ME_SMALLPLANTS) + nextpos:sendMagicEffect(CONST_ME_CARNIPHILA) end if danceStatus + 1 > #config then --Questlog, Unnatural Selection Quest "Mission 3: Dance Dance Evolution" - player:setStorageValue(Storage.UnnaturalSelection.Mission03, 3) - player:setStorageValue(Storage.UnnaturalSelection.Questline, 7) + player:setStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Mission03, 3) + player:setStorageValue(Storage.Quest.U8_54.UnnaturalSelection.Questline, 7) player:say("Krunus should be pleased.", TALKTYPE_MONSTER_SAY) player:addAchievement("Talented Dancer") end diff --git a/data-otservbr-global/scripts/movements/quests/waterfall/waterfall.lua b/data-otservbr-global/scripts/quests/waterfall/movements_waterfall.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/waterfall/waterfall.lua rename to data-otservbr-global/scripts/quests/waterfall/movements_waterfall.lua diff --git a/data-otservbr-global/scripts/actions/quests/what_a_foolish/cat_basket.lua b/data-otservbr-global/scripts/quests/what_a_foolish_quest/action_cat_basket.lua similarity index 81% rename from data-otservbr-global/scripts/actions/quests/what_a_foolish/cat_basket.lua rename to data-otservbr-global/scripts/quests/what_a_foolish_quest/action_cat_basket.lua index a86c72577d7..65c3e22ca3b 100644 --- a/data-otservbr-global/scripts/actions/quests/what_a_foolish/cat_basket.lua +++ b/data-otservbr-global/scripts/quests/what_a_foolish_quest/action_cat_basket.lua @@ -16,11 +16,11 @@ end local whatFoolishCat = Action() function whatFoolishCat.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.WhatAFoolish.Questline) ~= 19 or player:getStorageValue(Storage.WhatAFoolish.CatBasket) == 1 then + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline) ~= 19 or player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.CatBasket) == 1 then return false end - player:setStorageValue(Storage.WhatAFoolish.CatBasket, 1) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.CatBasket, 1) player:say("The queen's cat is not amused!", TALKTYPE_MONSTER_SAY) player:getPosition():sendMagicEffect(CONST_ME_DRAWBLOOD) player:say("Fchhhhh", TALKTYPE_MONSTER_SAY, false, player, effectPositions[1]) diff --git a/data-otservbr-global/scripts/actions/quests/what_a_foolish/contract.lua b/data-otservbr-global/scripts/quests/what_a_foolish_quest/action_contract.lua similarity index 83% rename from data-otservbr-global/scripts/actions/quests/what_a_foolish/contract.lua rename to data-otservbr-global/scripts/quests/what_a_foolish_quest/action_contract.lua index 281ee0bac6b..b239c212282 100644 --- a/data-otservbr-global/scripts/actions/quests/what_a_foolish/contract.lua +++ b/data-otservbr-global/scripts/quests/what_a_foolish_quest/action_contract.lua @@ -4,7 +4,7 @@ function whatFoolishContract.onUse(player, item, fromPosition, target, toPositio return false end - if player:getStorageValue(Storage.WhatAFoolish.Contract) ~= 1 then + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Contract) ~= 1 then return false end diff --git a/data-otservbr-global/scripts/actions/quests/what_a_foolish/crate.lua b/data-otservbr-global/scripts/quests/what_a_foolish_quest/action_crate.lua similarity index 85% rename from data-otservbr-global/scripts/actions/quests/what_a_foolish/crate.lua rename to data-otservbr-global/scripts/quests/what_a_foolish_quest/action_crate.lua index f38e278e3fa..cab5eba10fc 100644 --- a/data-otservbr-global/scripts/actions/quests/what_a_foolish/crate.lua +++ b/data-otservbr-global/scripts/quests/what_a_foolish_quest/action_crate.lua @@ -4,7 +4,7 @@ function whatFoolishCrate.onUse(player, item, fromPosition, target, toPosition, return false end - if player:getStorageValue(Storage.WhatAFoolish.Questline) ~= 8 then + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline) ~= 8 then return false end diff --git a/data-otservbr-global/scripts/actions/quests/what_a_foolish/cushion.lua b/data-otservbr-global/scripts/quests/what_a_foolish_quest/action_cushion.lua similarity index 65% rename from data-otservbr-global/scripts/actions/quests/what_a_foolish/cushion.lua rename to data-otservbr-global/scripts/quests/what_a_foolish_quest/action_cushion.lua index 0def0a0284b..e3e1db99dae 100644 --- a/data-otservbr-global/scripts/actions/quests/what_a_foolish/cushion.lua +++ b/data-otservbr-global/scripts/quests/what_a_foolish_quest/action_cushion.lua @@ -4,11 +4,11 @@ function whatFoolishCushion.onUse(player, item, fromPosition, target, toPosition return false end - if player:getStorageValue(Storage.WhatAFoolish.Questline) ~= 17 or player:getStorageValue(Storage.WhatAFoolish.WhoopeeCushion) == 1 then + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline) ~= 17 or player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.WhoopeeCushion) == 1 then return false end - player:setStorageValue(Storage.WhatAFoolish.WhoopeeCushion, 1) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.WhoopeeCushion, 1) player:say("*chuckles maniacally*", TALKTYPE_MONSTER_SAY) player:getPosition():sendMagicEffect(CONST_ME_POFF) player:say("Woooosh!", TALKTYPE_MONSTER_SAY, false, player, toPosition) diff --git a/data-otservbr-global/scripts/actions/quests/what_a_foolish/disguise.lua b/data-otservbr-global/scripts/quests/what_a_foolish_quest/action_disguise.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/what_a_foolish/disguise.lua rename to data-otservbr-global/scripts/quests/what_a_foolish_quest/action_disguise.lua diff --git a/data-otservbr-global/scripts/actions/quests/what_a_foolish/watch.lua b/data-otservbr-global/scripts/quests/what_a_foolish_quest/action_watch.lua similarity index 89% rename from data-otservbr-global/scripts/actions/quests/what_a_foolish/watch.lua rename to data-otservbr-global/scripts/quests/what_a_foolish_quest/action_watch.lua index 4a3c881af45..8083c89d056 100644 --- a/data-otservbr-global/scripts/actions/quests/what_a_foolish/watch.lua +++ b/data-otservbr-global/scripts/quests/what_a_foolish_quest/action_watch.lua @@ -5,7 +5,7 @@ local targetDestination = { local whatFoolishWatch = Action() function whatFoolishWatch.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.WhatAFoolish.Questline) ~= 11 then + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline) ~= 11 then return false end diff --git a/data-otservbr-global/scripts/quests/what_a_foolish_quest/action_worn_cloth.lua b/data-otservbr-global/scripts/quests/what_a_foolish_quest/action_worn_cloth.lua new file mode 100644 index 00000000000..dd820074f0a --- /dev/null +++ b/data-otservbr-global/scripts/quests/what_a_foolish_quest/action_worn_cloth.lua @@ -0,0 +1,20 @@ +local whatFoolishWorn = Action() + +function whatFoolishWorn.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if target.actionid == 4203 then + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline) ~= 34 or player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.OldWornCloth) == 1 then + return false + end + + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.OldWornCloth, 1) + player:say("Amazing! That was quite fast!", TALKTYPE_MONSTER_SAY) + toPosition:sendMagicEffect(CONST_ME_BLOCKHIT) + item:transform(143) + return true + else + return false + end +end + +whatFoolishWorn:id(142) +whatFoolishWorn:register() diff --git a/data-otservbr-global/scripts/movements/quests/what_a_foolish/destroy_pies.lua b/data-otservbr-global/scripts/quests/what_a_foolish_quest/movements_destroy_pies.lua similarity index 79% rename from data-otservbr-global/scripts/movements/quests/what_a_foolish/destroy_pies.lua rename to data-otservbr-global/scripts/quests/what_a_foolish_quest/movements_destroy_pies.lua index de5c10a185e..de93ef3d17d 100644 --- a/data-otservbr-global/scripts/movements/quests/what_a_foolish/destroy_pies.lua +++ b/data-otservbr-global/scripts/quests/what_a_foolish_quest/movements_destroy_pies.lua @@ -6,8 +6,8 @@ function destroyPies.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.WhatAFoolish.PieBoxTimer) > os.time() then - player:getStorageValue(Storage.WhatAFoolish.PieBoxTimer, 1) + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.PieBoxTimer) > os.time() then + player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.PieBoxTimer, 1) end local pieBox = player:getItemById(7484, true) diff --git a/data-otservbr-global/scripts/movements/quests/white_pearl/white_pearl.lua b/data-otservbr-global/scripts/quests/white_pearl/movements_white_pearl.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/white_pearl/white_pearl.lua rename to data-otservbr-global/scripts/quests/white_pearl/movements_white_pearl.lua diff --git a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission01_crate.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission01_crate.lua similarity index 87% rename from data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission01_crate.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission01_crate.lua index 1fc09485898..8f4fa8fc4f8 100644 --- a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission01_crate.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission01_crate.lua @@ -4,7 +4,7 @@ condition:setTicks(-1) local wrathEmperorMiss1Crate = Action() function wrathEmperorMiss1Crate.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 2 then + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 2 then player:say("You remove its top and pull the crate over yourself. Inside it is stifling and you can barely see a thing when looking outward.", TALKTYPE_MONSTER_SAY) player:addCondition(condition) player:getPosition():sendMagicEffect(CONST_ME_POFF) diff --git a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission01_lights.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission01_lights.lua similarity index 68% rename from data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission01_lights.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission01_lights.lua index 0aa09ce5f3b..bf38e4f8dd0 100644 --- a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission01_lights.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission01_lights.lua @@ -15,9 +15,9 @@ end local wrathEmperorMiss1Light = Action() function wrathEmperorMiss1Light.onUse(player, item, fromPosition, target, toPosition, isHotkey) if fromPosition == Position(positions[1]) then - if Game.getStorageValue(GlobalStorage.WrathOfTheEmperor.Light01) ~= 1 then - Game.setStorageValue(GlobalStorage.WrathOfTheEmperor.Light01, 1) - addEvent(Game.setStorageValue, 20 * 1000, GlobalStorage.WrathOfTheEmperor.Light01, 0) + if Game.getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Light01) ~= 1 then + Game.setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Light01, 1) + addEvent(Game.setStorageValue, 20 * 1000, Storage.Quest.U8_6.WrathOfTheEmperor.Light01, 0) local pos = { Position(33369, 31075, 8), Position(33372, 31075, 8), @@ -29,9 +29,9 @@ function wrathEmperorMiss1Light.onUse(player, item, fromPosition, target, toPosi end end elseif fromPosition == Position(positions[2]) then - if Game.getStorageValue(GlobalStorage.WrathOfTheEmperor.Light02) ~= 1 then - Game.setStorageValue(GlobalStorage.WrathOfTheEmperor.Light02, 1) - addEvent(Game.setStorageValue, 20 * 1000, GlobalStorage.WrathOfTheEmperor.Light02, 0) + if Game.getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Light02) ~= 1 then + Game.setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Light02, 1) + addEvent(Game.setStorageValue, 20 * 1000, Storage.Quest.U8_6.WrathOfTheEmperor.Light02, 0) local pos = { Position(33357, 31077, 8), Position(33360, 31079, 8), @@ -42,9 +42,9 @@ function wrathEmperorMiss1Light.onUse(player, item, fromPosition, target, toPosi end end elseif fromPosition == Position(positions[3]) then - if Game.getStorageValue(GlobalStorage.WrathOfTheEmperor.Light04) ~= 1 then - Game.setStorageValue(GlobalStorage.WrathOfTheEmperor.Light04, 1) - addEvent(Game.setStorageValue, 20 * 1000, GlobalStorage.WrathOfTheEmperor.Light04, 0) + if Game.getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Light04) ~= 1 then + Game.setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Light04, 1) + addEvent(Game.setStorageValue, 20 * 1000, Storage.Quest.U8_6.WrathOfTheEmperor.Light04, 0) local wallItem, pos for i = 1, 4 do pos = Position(33355, 31067 + i, 9) @@ -72,9 +72,9 @@ function wrathEmperorMiss1Light.onUse(player, item, fromPosition, target, toPosi end end elseif fromPosition == Position(positions[4]) then - if Game.getStorageValue(GlobalStorage.WrathOfTheEmperor.Light03) ~= 1 then - Game.setStorageValue(GlobalStorage.WrathOfTheEmperor.Light03, 1) - addEvent(Game.setStorageValue, 20 * 1000, GlobalStorage.WrathOfTheEmperor.Light03, 0) + if Game.getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Light03) ~= 1 then + Game.setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Light03, 1) + addEvent(Game.setStorageValue, 20 * 1000, Storage.Quest.U8_6.WrathOfTheEmperor.Light03, 0) local pos = Position(33346, 31074, 8) transformLamp(pos, 10493, 10478) addEvent(transformLamp, 20 * 1000, pos, 10478, 10493) diff --git a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission02_firstcontact_repair_teleport.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission02_firstcontact_repair_teleport.lua similarity index 87% rename from data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission02_firstcontact_repair_teleport.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission02_firstcontact_repair_teleport.lua index 2fd2d315621..ab5b28f8150 100644 --- a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission02_firstcontact_repair_teleport.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission02_firstcontact_repair_teleport.lua @@ -39,9 +39,9 @@ function wrathEmperorMiss2FirstContact.onUse(player, item, fromPosition, target, elseif item.itemid == 11334 and target.actionid == 8025 then player:say("As you give the coal into the pool the corrupted fluid begins to dissolve, leaving purified, refreshing water.", TALKTYPE_MONSTER_SAY) item:remove() - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 4 then - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 5) - player:setStorageValue(Storage.WrathoftheEmperor.Mission02, 2) --Questlog, Wrath of the Emperor "Mission 02: First Contact" + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 4 then + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 5) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission02, 2) --Questlog, Wrath of the Emperor "Mission 02: First Contact" end for i = 1, 4 do waterpos[i]:sendMagicEffect(CONST_ME_GREEN_RINGS) diff --git a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission03_the_keeper.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission03_the_keeper.lua similarity index 51% rename from data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission03_the_keeper.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission03_the_keeper.lua index ea8d7d09571..8dfb9c82da5 100644 --- a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission03_the_keeper.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission03_the_keeper.lua @@ -1,25 +1,25 @@ local function revertKeeperstorage() - Game.setStorageValue(Storage.WrathoftheEmperor.Mission03, 0) + Game.setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission03, 0) end local wrathEmperorMiss3Keeper = Action() function wrathEmperorMiss3Keeper.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 11364 and target.actionid == 8026 then - if Game.getStorageValue(Storage.WrathoftheEmperor.Mission03) < 5 then - Game.setStorageValue(Storage.WrathoftheEmperor.Mission03, math.max(0, Game.getStorageValue(Storage.WrathoftheEmperor.Mission03)) + 1) + if Game.getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission03) < 5 then + Game.setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission03, math.max(0, Game.getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission03)) + 1) player:say("The plant twines and twiggles even more than before, it almost looks as it would scream great pain.", TALKTYPE_MONSTER_SAY) - elseif Game.getStorageValue(Storage.WrathoftheEmperor.Mission03) == 5 then + elseif Game.getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission03) == 5 then player:removeItem(11364, 1) - Game.setStorageValue(Storage.WrathoftheEmperor.Mission03, 6) + Game.setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission03, 6) toPosition:sendMagicEffect(CONST_ME_YELLOW_RINGS) Game.createMonster("the keeper", { x = 33171, y = 31058, z = 11 }) Position({ x = 33171, y = 31058, z = 11 }):sendMagicEffect(CONST_ME_TELEPORT) addEvent(revertKeeperstorage, 60 * 1000) end elseif item.itemid == 11360 then - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 7 then - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 8) - player:setStorageValue(Storage.WrathoftheEmperor.Mission03, 2) --Questlog, Wrath of the Emperor "Mission 03: The Keeper" + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 7 then + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 8) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission03, 2) --Questlog, Wrath of the Emperor "Mission 03: The Keeper" player:addItem(11367, 1) end end diff --git a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission04_sacrament_of_the_snake_sceptre.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission04_sacrament_of_the_snake_sceptre.lua similarity index 67% rename from data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission04_sacrament_of_the_snake_sceptre.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission04_sacrament_of_the_snake_sceptre.lua index 8fcecb1769b..84f4d026569 100644 --- a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission04_sacrament_of_the_snake_sceptre.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission04_sacrament_of_the_snake_sceptre.lua @@ -1,13 +1,13 @@ local wrathEmperorMiss4Sacrament = Action() function wrathEmperorMiss4Sacrament.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getItemCount(11368) >= 1 and player:getItemCount(11369) >= 1 and player:getItemCount(11370) >= 1 and player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 10 then + if player:getItemCount(11368) >= 1 and player:getItemCount(11369) >= 1 and player:getItemCount(11370) >= 1 and player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 10 then player:removeItem(11368, 1) player:removeItem(11369, 1) player:removeItem(11370, 1) player:addItem(11371, 1) player:getPosition():sendMagicEffect(CONST_ME_HOLYAREA) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 11) - player:setStorageValue(Storage.WrathoftheEmperor.Mission04, 2) --Questlog, Wrath of the Emperor "Mission 04: Sacrament of the Snake" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 11) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission04, 2) --Questlog, Wrath of the Emperor "Mission 04: Sacrament of the Snake" end item:transform(item.itemid == 2772 and 2773 or 2772) return true diff --git a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission08_doors.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission08_doors.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission08_doors.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission08_doors.lua diff --git a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission08_uninvited_guests_lever.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission08_uninvited_guests_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission08_uninvited_guests_lever.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission08_uninvited_guests_lever.lua diff --git a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission09_the_sleeping_dragon_mixture.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission09_the_sleeping_dragon_mixture.lua similarity index 63% rename from data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission09_the_sleeping_dragon_mixture.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission09_the_sleeping_dragon_mixture.lua index 2b3d496a277..b1af0fa6c72 100644 --- a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission09_the_sleeping_dragon_mixture.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission09_the_sleeping_dragon_mixture.lua @@ -1,10 +1,10 @@ local wrathEmperorMiss9Sleeping = Action() function wrathEmperorMiss9Sleeping.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.WrathoftheEmperor.InterdimensionalPotion) == 1 then + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.InterdimensionalPotion) == 1 then return true end - player:setStorageValue(Storage.WrathoftheEmperor.InterdimensionalPotion, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.InterdimensionalPotion, 1) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) item:remove() diff --git a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission10_a_message_of_freedom_sceptre.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission10_a_message_of_freedom_sceptre.lua similarity index 54% rename from data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission10_a_message_of_freedom_sceptre.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission10_a_message_of_freedom_sceptre.lua index b4bb8b26500..806f7956398 100644 --- a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission10_a_message_of_freedom_sceptre.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission10_a_message_of_freedom_sceptre.lua @@ -13,34 +13,34 @@ function wrathEmperorMiss10Message.onUse(player, item, fromPosition, target, toP Game.setStorageValue(target.uid - 4, 1) elseif target.itemid == 11361 then if toPosition.x > 33034 and toPosition.x < 33071 and toPosition.y > 31079 and toPosition.y < 31102 then - if player:getStorageValue(Storage.WrathoftheEmperor.BossStatus) == 1 then - player:setStorageValue(Storage.WrathoftheEmperor.BossStatus, 2) - player:setStorageValue(Storage.WrathoftheEmperor.Mission10, 3) --Questlog, Wrath of the Emperor "Mission 10: A Message of Freedom" + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.BossStatus) == 1 then + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.BossStatus, 2) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission10, 3) --Questlog, Wrath of the Emperor "Mission 10: A Message of Freedom" player:say("The sceptre is almost torn from your hand as you banish the presence of the emperor.", TALKTYPE_MONSTER_SAY) end elseif toPosition.x > 33080 and toPosition.x < 33111 and toPosition.y > 31079 and toPosition.y < 31100 then - if player:getStorageValue(Storage.WrathoftheEmperor.BossStatus) == 2 then - player:setStorageValue(Storage.WrathoftheEmperor.BossStatus, 3) - player:setStorageValue(Storage.WrathoftheEmperor.Mission10, 4) --Questlog, Wrath of the Emperor "Mission 10: A Message of Freedom" + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.BossStatus) == 2 then + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.BossStatus, 3) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission10, 4) --Questlog, Wrath of the Emperor "Mission 10: A Message of Freedom" player:say("The sceptre is almost torn from your hand as you banish the presence of the emperor.", TALKTYPE_MONSTER_SAY) end elseif toPosition.x > 33078 and toPosition.x < 33112 and toPosition.y > 31106 and toPosition.y < 31127 then - if player:getStorageValue(Storage.WrathoftheEmperor.BossStatus) == 3 then - player:setStorageValue(Storage.WrathoftheEmperor.BossStatus, 4) - player:setStorageValue(Storage.WrathoftheEmperor.Mission10, 5) --Questlog, Wrath of the Emperor "Mission 10: A Message of Freedom" + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.BossStatus) == 3 then + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.BossStatus, 4) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission10, 5) --Questlog, Wrath of the Emperor "Mission 10: A Message of Freedom" player:say("The sceptre is almost torn from your hand as you banish the presence of the emperor.", TALKTYPE_MONSTER_SAY) end elseif toPosition.x > 33035 and toPosition.x < 33069 and toPosition.y > 31107 and toPosition.y < 31127 then - if player:getStorageValue(Storage.WrathoftheEmperor.BossStatus) == 4 then - player:setStorageValue(Storage.WrathoftheEmperor.BossStatus, 5) - player:setStorageValue(Storage.WrathoftheEmperor.Mission10, 6) --Questlog, Wrath of the Emperor "Mission 10: A Message of Freedom" + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.BossStatus) == 4 then + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.BossStatus, 5) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission10, 6) --Questlog, Wrath of the Emperor "Mission 10: A Message of Freedom" player:say("The sceptre is almost torn from your hand as you banish the presence of the emperor.", TALKTYPE_MONSTER_SAY) end end elseif target.itemid == 11429 then - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 31 then - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 32) - player:setStorageValue(Storage.WrathoftheEmperor.Mission11, 2) --Questlog, Wrath of the Emperor "Mission 11: Payback Time" + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 31 then + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 32) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission11, 2) --Questlog, Wrath of the Emperor "Mission 11: Payback Time" end player:say("NOOOoooooooo...!", TALKTYPE_MONSTER_SAY, false, player, toPosition) player:say("This should have dealt the deathblow to the snake things' ambitions.", TALKTYPE_MONSTER_SAY) diff --git a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission11_payback_time_lever.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission11_payback_time_lever.lua similarity index 85% rename from data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission11_payback_time_lever.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission11_payback_time_lever.lua index a32caefdea2..79a216a19aa 100644 --- a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission11_payback_time_lever.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission11_payback_time_lever.lua @@ -15,13 +15,13 @@ local config = { local wrathEmperorMiss11Payback = Action() function wrathEmperorMiss11Payback.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if Game.getStorageValue(Storage.WrathoftheEmperor.Mission11) == 1 then + if Game.getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission11) == 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The arena is already in use.") return true end - Game.setStorageValue(Storage.WrathoftheEmperor.Mission11, 1) - addEvent(Game.setStorageValue, 10 * 60000, Storage.WrathoftheEmperor.Mission11, 0) + Game.setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission11, 1) + addEvent(Game.setStorageValue, 10 * 60000, Storage.Quest.U8_6.WrathOfTheEmperor.Mission11, 0) local monsters = Game.getSpectators(config.arenaPosition, false, false, 10, 10, 10, 10) local spectator diff --git a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission12_just_rewards.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission12_just_rewards.lua similarity index 62% rename from data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission12_just_rewards.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission12_just_rewards.lua index b50531b6436..04650628430 100644 --- a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission12_just_rewards.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission12_just_rewards.lua @@ -1,14 +1,11 @@ local wrathEmperorMiss12Just = Action() + function wrathEmperorMiss12Just.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.WrathoftheEmperor.Mission12) == 0 then + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission12) == 0 then player:addOutfit(366, 0) player:addOutfit(367, 0) - player:addOutfit(366, 1) - player:addOutfit(367, 1) - player:addOutfit(366, 2) - player:addOutfit(367, 2) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found some clothes in wardrobe") - player:setStorageValue(Storage.WrathoftheEmperor.Mission12, 1) --Questlog, Wrath of the Emperor "Mission 12: Just Rewards" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission12, 1) --Questlog, Wrath of the Emperor "Mission 12: Just Rewards" player:setStorageValue(1150, 1) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The wardrobe is empty.") diff --git a/data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/bosses_kill.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_bosses_kill.lua similarity index 68% rename from data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/bosses_kill.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_bosses_kill.lua index 37a823a67ac..4bd0c94dbf0 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/bosses_kill.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_bosses_kill.lua @@ -1,23 +1,23 @@ local bosses = { ["fury of the emperor"] = { position = Position(33048, 31085, 15), - storage = GlobalStorage.WrathOfTheEmperor.Bosses.Fury, + storage = Storage.Quest.U8_6.WrathOfTheEmperor.Bosses.Fury, }, ["wrath of the emperor"] = { position = Position(33094, 31087, 15), - storage = GlobalStorage.WrathOfTheEmperor.Bosses.Wrath, + storage = Storage.Quest.U8_6.WrathOfTheEmperor.Bosses.Wrath, }, ["scorn of the emperor"] = { position = Position(33095, 31110, 15), - storage = GlobalStorage.WrathOfTheEmperor.Bosses.Scorn, + storage = Storage.Quest.U8_6.WrathOfTheEmperor.Bosses.Scorn, }, ["spite of the emperor"] = { position = Position(33048, 31111, 15), - storage = GlobalStorage.WrathOfTheEmperor.Bosses.Spite, + storage = Storage.Quest.U8_6.WrathOfTheEmperor.Bosses.Spite, }, } -local bossesKill = CreatureEvent("WrathOfTheEmperorBossDeat") +local bossesKill = CreatureEvent("WrathOfTheEmperorBossDeath") function bossesKill.onDeath(creature) local bossConfig = bosses[creature:getName():lower()] if not bossConfig then diff --git a/data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/keeper_kill.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_keeper_kill.lua similarity index 63% rename from data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/keeper_kill.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_keeper_kill.lua index 5be3f6f6dbe..0cff2eaf502 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/keeper_kill.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_keeper_kill.lua @@ -1,6 +1,6 @@ local keeperKill = CreatureEvent("TheKeeperDeath") function keeperKill.onDeath(creature) - Game.setStorageValue(Storage.WrathoftheEmperor.Mission03, 0) + Game.setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission03, 0) return true end diff --git a/data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/lizard_magistratus_kill.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_lizard_magistratus_kill.lua similarity index 56% rename from data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/lizard_magistratus_kill.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_lizard_magistratus_kill.lua index 8be99184fda..894eb1a5c8f 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/lizard_magistratus_kill.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_lizard_magistratus_kill.lua @@ -1,9 +1,9 @@ local lizardMagistratusKill = CreatureEvent("LizardMagistratusDeath") function lizardMagistratusKill.onDeath(creature, _corpse, _lastHitKiller, mostDamageKiller) onDeathForParty(creature, mostDamageKiller, function(creature, player) - local storage = player:getStorageValue(Storage.WrathoftheEmperor.Mission06) - if storage >= 0 and storage < 4 then - player:setStorageValue(Storage.WrathoftheEmperor.Mission06, math.max(1, storage) + 1) + local storage = player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission06) + if storage >= 0 and storage < 5 then + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission06, math.max(1, storage) + 1) end end) return true diff --git a/data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/lizard_noble_kill.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_lizard_noble_kill.lua similarity index 62% rename from data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/lizard_noble_kill.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_lizard_noble_kill.lua index 112feffa73f..5b3483a8137 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/lizard_noble_kill.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_lizard_noble_kill.lua @@ -1,9 +1,9 @@ local lizardNobleKill = CreatureEvent("LizardNobleDeath") function lizardNobleKill.onDeath(creature, _corpse, _lastHitKiller, mostDamageKiller) onDeathForParty(creature, mostDamageKiller, function(creature, player) - local storage = player:getStorageValue(Storage.WrathoftheEmperor.Mission07) + local storage = player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission07) if storage >= 0 and storage < 6 then - player:setStorageValue(Storage.WrathoftheEmperor.Mission07, math.max(1, storage) + 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission07, math.max(1, storage) + 1) end end) return true diff --git a/data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/zalamon_kill.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_zalamon_kill.lua similarity index 93% rename from data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/zalamon_kill.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_zalamon_kill.lua index 349c704ca64..db0f3e3e0f3 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/zalamon_kill.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_zalamon_kill.lua @@ -16,7 +16,7 @@ local bossForms = { local zalamonKill = CreatureEvent("ZalamonDeath") function zalamonKill.onDeath(creature) if creature:getName():lower() == "mutated zalamon" then - Game.setStorageValue(Storage.WrathoftheEmperor.Mission11, -1) + Game.setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission11, -1) return true end diff --git a/data-otservbr-global/scripts/quests/wrath_of_the_emperor/globalevents_crate.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/globalevents_crate.lua new file mode 100644 index 00000000000..03755606ca3 --- /dev/null +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/globalevents_crate.lua @@ -0,0 +1,40 @@ +local trapDoors = { + { Position(33385, 31139, 8) }, + { Position(33385, 31134, 8) }, + { Position(33385, 31126, 8) }, + { Position(33385, 31119, 8) }, + { Position(33385, 31118, 8) }, + { Position(33380, 31093, 8) }, + { Position(33380, 31085, 8) }, +} + +local itemIds = { 11257, 11258 } + +local toggleTrapDoors = GlobalEvent("toggleTrapDoors") + +function toggleTrapDoors.onThink(interval) + for _, position in ipairs(trapDoors) do + local tile = Tile(position[1]) + if tile then + local currentItem = nil + for _, item in ipairs(tile:getItems()) do + if item:getId() == 11257 or item:getId() == 11258 then + currentItem = item + break + end + end + + local newItemId = 11257 + if currentItem then + newItemId = (currentItem:getId() == 11257) and 11258 or 11257 + currentItem:transform(newItemId) + else + Game.createItem(newItemId, 1, position[1]) + end + end + end + return true +end + +toggleTrapDoors:interval(10000) -- 10 seconds +toggleTrapDoors:register() diff --git a/data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/boss_teleport.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_boss_teleport.lua similarity index 70% rename from data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/boss_teleport.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_boss_teleport.lua index a4056d81e83..900dda522f7 100644 --- a/data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/boss_teleport.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_boss_teleport.lua @@ -1,19 +1,19 @@ local teleports = { [3189] = { destination = Position(33041, 31086, 15), - storage = GlobalStorage.WrathOfTheEmperor.Bosses.Fury, + storage = Storage.Quest.U8_6.WrathOfTheEmperor.Bosses.Fury, }, [3190] = { destination = Position(33091, 31083, 15), - storage = GlobalStorage.WrathOfTheEmperor.Bosses.Wrath, + storage = Storage.Quest.U8_6.WrathOfTheEmperor.Bosses.Wrath, }, [3191] = { destination = Position(33094, 31118, 15), - storage = GlobalStorage.WrathOfTheEmperor.Bosses.Scorn, + storage = Storage.Quest.U8_6.WrathOfTheEmperor.Bosses.Scorn, }, [3192] = { destination = Position(33038, 31119, 15), - storage = GlobalStorage.WrathOfTheEmperor.Bosses.Spite, + storage = Storage.Quest.U8_6.WrathOfTheEmperor.Bosses.Spite, }, } @@ -29,12 +29,14 @@ function bossTeleport.onStepIn(creature, item, position, fromPosition) if not teleport then return true end - if player:getStorageValue(Storage.WrathoftheEmperor.TeleportAccess.Wote10) == 1 then + + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Wote10) == 1 then player:teleportTo(teleport.destination) teleport.destination:sendMagicEffect(CONST_ME_TELEPORT) return true end - if player:getStorageValue(Storage.WrathoftheEmperor.BossStatus) == 5 then + + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.BossStatus) == 5 then local destination = Position(33072, 31151, 15) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:teleportTo(destination) @@ -42,7 +44,9 @@ function bossTeleport.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.WrathoftheEmperor.BossStatus) ~= item.uid - 3188 then + local expectedStatus = item.uid - 3188 + + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.BossStatus) ~= expectedStatus then player:teleportTo(fromPosition, true) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Go to another Teleport or take mission with Zizzle.") return true @@ -54,6 +58,7 @@ function bossTeleport.onStepIn(creature, item, position, fromPosition) else player:teleportTo(teleport.destination) end + return true end diff --git a/data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/crate.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_crate.lua similarity index 95% rename from data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/crate.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_crate.lua index c078b0ccc1d..54ef675a36e 100644 --- a/data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/crate.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_crate.lua @@ -219,7 +219,7 @@ local positions = { function catchPlayer(player) player:removeCondition(CONDITION_OUTFIT) player:removeItem(11328, 1) - player:setStorageValue(Storage.WrathoftheEmperor.GuardcaughtYou, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.GuardcaughtYou, 1) player:teleportTo({ x = 33361, y = 31206, z = 8 }, false) player:say("The guards have spotted you. You were forcibly dragged into a small cell. It looks like you need to build another disguise.", TALKTYPE_MONSTER_SAY) return true @@ -257,9 +257,9 @@ function crate.onStepIn(creature, item, position, fromPosition, toPosition) end end elseif j >= 21 and j <= 25 then - if player:getPosition() == Position(positions[j]) and player:getStorageValue(Storage.WrathoftheEmperor.Message) ~= 1 then + if player:getPosition() == Position(positions[j]) and player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Message) ~= 1 then player:say("Guards heavily patrol this area. Try to stay hidden and do not draw any attention to yourself by trying to attack.", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.WrathoftheEmperor.Message, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Message, 1) end elseif j >= 26 and j <= 175 then if player:getPosition() == Position(positions[j]) then @@ -267,19 +267,19 @@ function crate.onStepIn(creature, item, position, fromPosition, toPosition) end elseif j >= 176 and j <= 183 then if player:getPosition() == Position(positions[j]) then - if Game.getStorageValue(GlobalStorage.WrathOfTheEmperor.Light01) ~= 1 then + if Game.getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Light01) ~= 1 then catchPlayer(player) end end elseif j >= 184 and j <= 197 then if player:getPosition() == Position(positions[j]) then - if Game.getStorageValue(GlobalStorage.WrathOfTheEmperor.Light02) ~= 1 then + if Game.getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Light02) ~= 1 then catchPlayer(player) end end elseif j >= 198 and j <= 204 then if player:getPosition() == Position(positions[j]) then - if Game.getStorageValue(GlobalStorage.WrathOfTheEmperor.Light03) ~= 1 then + if Game.getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Light03) ~= 1 then catchPlayer(player) end end diff --git a/data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/keeper.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_keeper.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/keeper.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_keeper.lua diff --git a/data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/prison.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_prison.lua similarity index 60% rename from data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/prison.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_prison.lua index 3e2b1d53958..9adb8c92079 100644 --- a/data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/prison.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_prison.lua @@ -2,7 +2,7 @@ local prison = MoveEvent() function prison.onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() - if not player or player:getStorageValue(Storage.WrathoftheEmperor.PrisonReleaseStatus) ~= 1 then + if not player or player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.PrisonReleaseStatus) ~= 1 then return true end @@ -10,13 +10,13 @@ function prison.onStepIn(creature, item, position, fromPosition) player:removeCondition(CONDITION_OUTFIT) end - player:setStorageValue(Storage.WrathoftheEmperor.PrisonReleaseStatus, 0) - player:setStorageValue(Storage.WrathoftheEmperor.GuardcaughtYou, -1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.PrisonReleaseStatus, 0) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.GuardcaughtYou, -1) local destination = Position(33359, 31183, 8) player:teleportTo(destination) position:sendMagicEffect(CONST_ME_TELEPORT) destination:sendMagicEffect(CONST_ME_TELEPORT) - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 2 then + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 2 then player:addItem(11328) end return true diff --git a/data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/teleports_access.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_teleports_access.lua similarity index 68% rename from data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/teleports_access.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_teleports_access.lua index 9b39cf1f5fc..069b90389c0 100644 --- a/data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/teleports_access.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_teleports_access.lua @@ -31,13 +31,13 @@ local positions = { } local config = { - { Access = Storage.WrathoftheEmperor.TeleportAccess.Rebel, teleportPos = Position(33136, 31248, 6), destinationA = Position(33211, 31065, 9), destinationB = Position(33138, 31248, 6) }, - { Access = Storage.WrathoftheEmperor.TeleportAccess.Zlak, teleportPos = Position(33216, 31067, 9), destinationA = Position(33078, 31219, 8), destinationB = Position(33216, 31069, 9) }, - { Access = Storage.WrathoftheEmperor.TeleportAccess.Zizzle, teleportPos = Position(33084, 31213, 8), destinationA = Position(33094, 31122, 12), destinationB = Position(33083, 31214, 8), itemPos = Position(33086, 31214, 8) }, - { Access = Storage.WrathoftheEmperor.TeleportAccess.SleepingDragon, teleportPos = Position(33111, 31123, 12), destinationA = Position(33240, 31247, 10), destinationB = Position(33109, 31122, 12), destinationC = Position(33028, 31086, 13) }, - { Access = Storage.WrathoftheEmperor.TeleportAccess.AwarnessEmperor, teleportPos = Position(33072, 31150, 15), destinationA = Position(33361, 31397, 9), destinationB = Position(33071, 31152, 15) }, - { Access = Storage.WrathoftheEmperor.TeleportAccess.BossRoom, teleportPos = Position(33136, 31249, 6), destinationA = Position(33360, 31397, 9), destinationB = Position(33138, 31249, 6) }, - { Access = Storage.WrathoftheEmperor.TeleportAccess.InnerSanctum, teleportPos = Position(33028, 31084, 13), destinationA = Position(33109, 31122, 12), destinationB = Position(33028, 31086, 13) }, + { Access = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Rebel, teleportPos = Position(33136, 31248, 6), destinationA = Position(33211, 31065, 9), destinationB = Position(33138, 31248, 6) }, + { Access = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Zlak, teleportPos = Position(33216, 31067, 9), destinationA = Position(33078, 31219, 8), destinationB = Position(33216, 31069, 9) }, + { Access = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Zizzle, teleportPos = Position(33084, 31213, 8), destinationA = Position(33094, 31122, 12), destinationB = Position(33083, 31214, 8), itemPos = Position(33086, 31214, 8) }, + { Access = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.SleepingDragon, teleportPos = Position(33111, 31123, 12), destinationA = Position(33240, 31247, 10), destinationB = Position(33109, 31122, 12), destinationC = Position(33028, 31086, 13) }, + { Access = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.AwarnessEmperor, teleportPos = Position(33072, 31150, 15), destinationA = Position(33361, 31397, 9), destinationB = Position(33071, 31152, 15) }, + { Access = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.BossRoom, teleportPos = Position(33136, 31249, 6), destinationA = Position(33360, 31397, 9), destinationB = Position(33138, 31249, 6) }, + { Access = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.InnerSanctum, teleportPos = Position(33028, 31084, 13), destinationA = Position(33109, 31122, 12), destinationB = Position(33028, 31086, 13) }, } local function tpX(i, player, position) diff --git a/data-otservbr-global/scripts/raids/bosses/battlemaster_zunzu.lua b/data-otservbr-global/scripts/raids/bosses/battlemaster_zunzu.lua new file mode 100644 index 00000000000..c07f69e4dd6 --- /dev/null +++ b/data-otservbr-global/scripts/raids/bosses/battlemaster_zunzu.lua @@ -0,0 +1,22 @@ +local zone = Zone("muggy_plains.battlemaster_zunzu") +zone:addArea(Position(33223, 31232, 7), Position(33277, 31257, 7)) + +local raid = Raid("muggy_plains.battlemaster_zunzu", { + zone = zone, + allowedDays = { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" }, + minActivePlayers = 3, + initialChance = 0.02, + targetChancePerDay = 0.02, + maxChancePerCheck = 0.8, +}) + +raid + :addSpawnMonsters({ + { + name = "Battlemaster Zunzu", + amount = 1, + }, + }) + :autoAdvance("24h") + +raid:register() diff --git a/data-otservbr-global/startup/tables/chest.lua b/data-otservbr-global/startup/tables/chest.lua index 42471d5a906..6c2033edb64 100644 --- a/data-otservbr-global/startup/tables/chest.lua +++ b/data-otservbr-global/startup/tables/chest.lua @@ -122,8 +122,8 @@ ChestUnique = { itemId = 2472, itemPos = { x = 32648, y = 31905, z = 3 }, container = 2853, - reward = { { 2970, 1 }, { 3598, 20 }, { 3598, 7 } }, - weight = 44, + reward = { { 2970, 1 }, { 3598, 27 } }, + weight = 12.00, storage = Storage.Quest.U6_1.EmperorsCookies.Rewards.Cookies, keyAction = Storage.Quest.Key.ID3801, }, @@ -156,7 +156,7 @@ ChestUnique = { itemPos = { x = 32201, y = 31571, z = 10 }, container = 2853, reward = { { 2970, 1 }, { 3031, 23 }, { 3147, 1 }, { 3298, 4 }, { 3384, 1 } }, - weight = 80, + weight = 80.00, storage = Storage.Quest.Key.ID4502, keyAction = Storage.Quest.Key.ID4502, }, @@ -453,7 +453,7 @@ ChestUnique = { itemPos = { x = 32803, y = 31582, z = 2 }, container = 2853, reward = { { 3284, 1 }, { 3297, 1 } }, -- bag with weapons - weight = 64, + weight = 64.00, questName = "draconia1", }, [6024] = { @@ -747,7 +747,7 @@ ChestUnique = { container = 2853, keyAction = Storage.Quest.Key.ID3702, reward = { { 2971, 1 }, { 3509, 1 }, { 3351, 1 }, { 3424, 1 }, { 2821, 1 }, { 3271, 1 }, { 3085, 1 }, { 3048, 1 } }, - weight = 194, + weight = 195.00, storage = Storage.Quest.PreU6_0.OrnamentedShield.Rewards.OrnamentedShield, }, [6063] = { @@ -756,7 +756,7 @@ ChestUnique = { itemPos = { x = 32769, y = 32302, z = 10 }, container = 2859, reward = { { 2949, 1 }, { 3059, 1 }, { 3083, 1 }, { 3035, 5 }, { 3053, 1 } }, - weight = 44, + weight = 44.00, questName = "ornamentedshield", }, --[6064] EMPTY @@ -766,7 +766,7 @@ ChestUnique = { itemPos = { x = 32644, y = 32131, z = 8 }, container = 2853, reward = { { 3033, 2 }, { 3050, 1 }, { 2953, 1 } }, - weight = 44, + weight = 18.00, questName = "panpipe", }, [6066] = { @@ -774,7 +774,7 @@ ChestUnique = { itemPos = { x = 33199, y = 31923, z = 11 }, container = 2853, reward = { { 3031, 98 }, { 3031, 77 }, { 3026, 3 } }, - weight = 27, + weight = 27.00, storage = Storage.Quest.U6_4.BerserkerTreasure.Rewards.WhitePearls, }, -- Fire axe quest @@ -784,7 +784,7 @@ ChestUnique = { itemPos = { x = 33078, y = 31656, z = 11 }, container = 2853, reward = { { 3098, 1 }, { 3085, 200 }, { 3028, 7 }, { 3320, 1 } }, -- Bag (Ring of Healing, Dragon Necklace, 7 Small Diamonds) - weight = 27, + weight = 56.00, questName = "fireaxe1", }, -- Poison daggers quest @@ -793,8 +793,8 @@ ChestUnique = { itemId = 2473, itemPos = { x = 33155, y = 31880, z = 11 }, container = 2854, - reward = { { 3448, 30 }, { 3299, 1 }, { 3299, 1 } }, -- Backpack (2 Poison Daggers, 30 Poison Arrows) - weight = 60, + reward = { { 3448, 30 }, { 3299, 1 } }, -- Backpack (2 Poison Daggers, 30 Poison Arrows) + weight = 51.00, questName = "poisondaggers", }, -- Shaman treasure quest @@ -804,7 +804,7 @@ ChestUnique = { itemPos = { x = 33127, y = 31885, z = 9 }, container = 2853, reward = { { 3147, 3 } }, -- Bag with 3 blank runes - weight = 15, + weight = 15.00, questName = "shamantreasure", }, -- Strong potions quest @@ -814,7 +814,7 @@ ChestUnique = { itemPos = { x = 33163, y = 31603, z = 15 }, container = 2857, reward = { { 237, 5 } }, - weight = 23, + weight = 23.00, storage = Storage.Quest.U8_1.StrongPotions.Reward, }, -- Vampire shield quest @@ -824,7 +824,7 @@ ChestUnique = { itemPos = { x = 33188, y = 31682, z = 14 }, container = 2853, reward = { { 3058, 1 }, { 3027, 1 }, { 3078, 1 } }, -- Bag (Strange Symbol, Black Pearl and Mysterious Fetish) - weight = 16, + weight = 16.00, questName = "vampireshield1", }, -- [6072] empty @@ -835,7 +835,7 @@ ChestUnique = { itemPos = { x = 33072, y = 32169, z = 2 }, container = 2854, reward = { { 268, 1 }, { 266, 1 }, { 3449, 30 }, { 3448, 60 } }, - weight = 80, + weight = 99.00, storage = Storage.Quest.U7_1.DragonTower.Rewards.Backpack1, }, -- Backpack 2 @@ -844,7 +844,7 @@ ChestUnique = { itemPos = { x = 33078, y = 32169, z = 2 }, container = 2854, reward = { { 3350, 1 }, { 3029, 2 } }, - weight = 50, + weight = 50.00, storage = Storage.Quest.U7_1.DragonTower.Rewards.Backpack2, }, -- Behemoth quest @@ -855,7 +855,7 @@ ChestUnique = { itemPos = { x = 33294, y = 31658, z = 13 }, container = 2853, reward = { { 3028, 3 }, { 3029, 4 }, { 3007, 1 }, { 3052, 1 }, { 3055, 1 } }, - weight = 50, + weight = 17.00, questName = "behemothquest1", }, -- Parchment room quest @@ -919,7 +919,7 @@ ChestUnique = { itemId = 2469, itemPos = { x = 32845, y = 31917, z = 6 }, container = 2853, - weight = 42, + weight = 31.00, reward = { { 3026, 1 }, { 3207, 1 } }, storage = Storage.Quest.U7_6.ExplorerSociety.SkullOfRatha.Bag1, }, @@ -928,7 +928,7 @@ ChestUnique = { itemId = 2469, itemPos = { x = 32847, y = 31917, z = 6 }, container = 2853, - weight = 42, + weight = 13.00, reward = { { 3012, 1 }, { 3097, 1 } }, storage = Storage.Quest.U7_6.ExplorerSociety.SkullOfRatha.Bag2, }, @@ -959,7 +959,7 @@ ChestUnique = { itemId = 2472, itemPos = { x = 33233, y = 31656, z = 13 }, container = 2856, - weight = 50, + weight = 50.00, reward = { { 3213, 1 } }, storage = Storage.Quest.U7_24.TheAnnihilator.Reward, }, @@ -1026,7 +1026,7 @@ ChestUnique = { itemId = 2472, itemPos = { x = 33057, y = 31029, z = 7 }, container = 2854, - weight = 14.90, + weight = 25.00, reward = { { 7439, 1 }, { 7440, 1 }, { 7443, 1 } }, storage = Storage.Quest.U8_54.TheNewFrontier.Reward.Potions, }, @@ -1150,6 +1150,7 @@ ChestUnique = { itemId = 2472, itemPos = { x = 32149, y = 32105, z = 11 }, container = 2854, -- backpack + weight = 35.00, reward = { { 2882, 1 }, { 2856, 1 }, { 2881, 1 }, { 2905, 1 } }, -- Jug, Present Box, Cup and Plate questName = "presentBox", }, @@ -1159,6 +1160,7 @@ ChestUnique = { itemId = 2472, itemPos = { x = 32146, y = 32097, z = 11 }, container = 2853, -- bag + weight = 21.00, reward = { { 3447, 12 }, { 3031, 40 } }, -- bag: 12 arrows, 40 gold coin questName = "bearChest1", }, @@ -1198,6 +1200,7 @@ ChestUnique = { itemId = 2472, itemPos = { x = 31973, y = 32209, z = 12 }, container = 2853, -- bag + weight = 37.00, reward = { { 3551, 1 }, { 1781, 5 }, { 3031, 50 } }, -- sandals, 5 small stones, 50 gold coins questName = "goblintemple", }, @@ -1206,6 +1209,7 @@ ChestUnique = { itemId = 2472, itemPos = { x = 31977, y = 32209, z = 12 }, container = 2853, -- bag + weight = 31.00, reward = { { 3466, 1 }, { 2992, 4 }, { 2874, 1 } }, -- pan, 4 snowballs, vial of milk questName = "goblintemple2", }, @@ -1222,6 +1226,7 @@ ChestUnique = { itemId = 2473, itemPos = { x = 32127, y = 32065, z = 12 }, container = 2853, -- bag + weight = 19.00, reward = { { 3447, 10 }, { 3448, 4 } }, -- 10 arrows, 4 poison arrow questName = "minohell2", }, @@ -1305,6 +1310,7 @@ ChestUnique = { itemId = 2469, itemPos = { x = 32443, y = 32238, z = 11 }, container = 2853, -- bag + weight = 18.00, reward = { { 3052, 1 }, { 3085, 200 } }, -- life ring , dragon necklace questName = "lifering", }, @@ -1329,6 +1335,7 @@ ChestUnique = { itemId = 2469, itemPos = { x = 32456, y = 32008, z = 13 }, container = 2853, -- bag + weight = 10.00, reward = { { 3029, 1 }, { 3028, 1 }, { 3097, 1 } }, -- small sapphire, small diamond, dwarven ring questName = "geomancer", }, @@ -1437,6 +1444,7 @@ ChestUnique = { itemId = 2472, itemPos = { x = 32651, y = 31969, z = 9 }, container = 2853, -- bag + weight = 40.00, reward = { { 3147, 3 }, { 2989, 1 }, { 3031, 76 }, { 3463, 1 } }, -- 3 blank rune, wooden doll, 76 gold coin, mirror questName = "longsword3", }, @@ -1454,6 +1462,7 @@ ChestUnique = { itemId = 2469, itemPos = { x = 33089, y = 32030, z = 9 }, container = 2853, -- bag + weight = 26.00, reward = { { 3046, 1 }, { 3092, 1 }, { 3147, 1 } }, -- magic light wand, axe ring, blank rune questName = "orcshaman", }, @@ -1478,6 +1487,7 @@ ChestUnique = { itemId = 2472, itemPos = { x = 32357, y = 32130, z = 9 }, container = 2853, -- bag + weight = 113.00, reward = { { 3377, 1 } }, -- scale armor questName = "scalearmor", }, @@ -1495,6 +1505,7 @@ ChestUnique = { itemId = 2476, itemPos = { x = 32775, y = 32006, z = 11 }, container = 2853, -- bag + weight = 10.00, reward = { { 3017, 1 }, { 3030, 2 }, { 3028, 3 } }, -- Silver Brooch, 2 Small Rubies, 3 Small Diamonds questName = "silverbrooch", }, @@ -1519,6 +1530,7 @@ ChestUnique = { itemId = 2472, itemPos = { x = 32675, y = 32069, z = 8 }, container = 2857, -- green bag + weight = 34.00, reward = { { 3084, 250 }, { 3098, 1 }, { 3046, 1 }, { 3077, 1 } }, -- protection amulet, ring of healing, magic light wand and anhk questName = "desert2", }, @@ -1536,6 +1548,7 @@ ChestUnique = { itemId = 2472, itemPos = { x = 32565, y = 32119, z = 3 }, container = 2853, -- bag + weight = 14.00, reward = { { 3083, 150 }, { 3029, 2 }, { 3097, 1 } }, -- garlick necklace, small sapphire, dwarven ring questName = "triangletower", }, @@ -1545,6 +1558,7 @@ ChestUnique = { itemId = 4025, itemPos = { x = 32179, y = 32224, z = 9 }, container = 2853, -- bag + weight = 102.00, reward = { { 3374, 1 }, { 3430, 1 } }, -- Copper Shield and Legion Helmet questName = "dragoncorpse", }, @@ -1598,6 +1612,7 @@ ChestUnique = { itemId = 4240, itemPos = { x = 32769, y = 32225, z = 7 }, container = 2854, + weight = 162.00, reward = { { 3123, 1 }, { 3155, 3 }, { 3361, 1 }, { 3353, 1 }, { 3285, 1 }, { 3506, 1 } }, -- worn leather boots, sudden death rune, leather armor, iron helmet, longsword, stamped letter questName = "ironhelmet", }, @@ -1607,6 +1622,7 @@ ChestUnique = { itemId = 4240, itemPos = { x = 32514, y = 32303, z = 10 }, container = 2853, + weight = 49.00, reward = { { 3350, 1 }, { 3448, 5 }, { 268, 1 }, { 266, 1 } }, -- bow, 5 poison arrows, mana potion, health potion questName = "deadarcher", }, @@ -1616,6 +1632,7 @@ ChestUnique = { itemId = 4240, itemPos = { x = 32816, y = 32279, z = 8 }, container = 2853, + weight = 24.00, reward = { { 3450, 5 }, { 3449, 12 } }, -- 5 power bolt, 12 burst arrow questName = "powerbolt1", }, @@ -1627,39 +1644,8 @@ ChestUnique = { reward = { { 3271, 1 } }, -- 5 power bolt, 12 burst arrow questName = "spikesword", }, - -- Elvenbane Quest - [6172] = { - useKV = true, - itemId = 2434, - itemPos = { x = 32588, y = 31644, z = 3 }, - container = 2853, - reward = { { 3031, 100 }, { 3028, 2 } }, -- 100 gold coin, 2 small diamond - questName = "elvebanequest1", - }, - [6173] = { - useKV = true, - itemId = 2434, - itemPos = { x = 32588, y = 31645, z = 3 }, - container = 2853, - reward = { { 3059, 1 }, { 3147, 1 }, { 237, 1 } }, -- spellbook, blank rune, strong mana potion - questName = "elvebanequest2", - }, - [6174] = { - useKV = true, - itemId = 2472, - itemPos = { x = 32590, y = 31647, z = 3 }, - reward = { { 3282, 1 } }, -- - questName = "elvebanequest3", - }, - [6175] = { - useKV = true, - itemId = 2472, - itemPos = { x = 32591, y = 31647, z = 3 }, - reward = { { 3425, 1 } }, -- - questName = "elvebanequest4", - }, -- Iron Hammer Quest - [6176] = { + [6172] = { useKV = true, itemId = 2473, itemPos = { x = 32434, y = 31938, z = 8 }, @@ -1667,7 +1653,7 @@ ChestUnique = { questName = "ironhamer", }, -- Plate Armor quest - [6177] = { + [6173] = { useKV = true, itemId = 2474, itemPos = { x = 33327, y = 32182, z = 7 }, @@ -1675,14 +1661,14 @@ ChestUnique = { questName = "platearmor", }, -- Stealth Ring Quest - [6178] = { + [6174] = { useKV = true, itemId = 1983, itemPos = { x = 33315, y = 32277, z = 11 }, reward = { { 3084, 250 } }, -- protection amulet questName = "stealhring1", }, - [6179] = { + [6175] = { useKV = true, itemId = 1983, itemPos = { x = 33315, y = 32282, z = 11 }, @@ -1690,28 +1676,28 @@ ChestUnique = { questName = "stealhring2", }, -- Steel Helmet Quest - [6180] = { + [6176] = { useKV = true, itemId = 2434, itemPos = { x = 32460, y = 31951, z = 5 }, reward = { { 3031, 56 } }, -- 56 gold coin questName = "steelhelmet1", }, - [6181] = { + [6177] = { useKV = true, itemId = 2469, itemPos = { x = 32464, y = 31957, z = 5 }, reward = { { 3031, 47 } }, -- 47 gold coin questName = "steelhelmet2", }, - [6182] = { + [6178] = { useKV = true, itemId = 2473, itemPos = { x = 32462, y = 31947, z = 4 }, reward = { { 3351, 1 } }, -- steel helmet questName = "steelhelmet3", }, - [6183] = { + [6179] = { useKV = true, itemId = 2472, itemPos = { x = 32467, y = 31962, z = 4 }, @@ -1719,7 +1705,7 @@ ChestUnique = { questName = "steelhelmet4", }, -- Battle Axe Quest - [6184] = { + [6180] = { useKV = true, itemId = 4285, itemPos = { x = 32305, y = 32254, z = 9 }, @@ -1727,7 +1713,7 @@ ChestUnique = { questName = "battleaxe", }, -- Doublet Quest - [6185] = { + [6181] = { useKV = true, itemId = 408, itemPos = { x = 32084, y = 32181, z = 8 }, @@ -1735,7 +1721,7 @@ ChestUnique = { questName = "doublet", }, -- Honey Flower Quest - [6186] = { + [6182] = { useKV = true, itemId = 9226, itemPos = { x = 32005, y = 32139, z = 3 }, @@ -1743,16 +1729,16 @@ ChestUnique = { questName = "honeyflower", }, -- The Medusa Quest - [6187] = { + [6183] = { itemId = 1983, itemPos = { x = 33049, y = 32399, z = 10 }, container = 2853, - weight = 105, + weight = 105.00, reward = { { 3436, 1 }, { 3567, 1 }, { 3324, 1 } }, storage = Storage.Quest.U7_3.TheMedusaQuest, }, -- Serpentine Tower Quest - [6188] = { + [6184] = { itemId = 2472, itemPos = { x = 33150, y = 32862, z = 7 }, weight = 0.20, @@ -1760,7 +1746,7 @@ ChestUnique = { storage = Storage.Quest.U7_3.SerpentineTower.WhitePearl, }, -- Elephant Tusk Quest - [6189] = { + [6185] = { itemId = 2472, itemPos = { x = 32922, y = 32755, z = 7 }, weight = 0.20, @@ -1768,14 +1754,14 @@ ChestUnique = { storage = Storage.Quest.U7_5.ElephantTusk, }, -- The Explorer Society - Books - [6190] = { + [6186] = { itemId = 2434, itemPos = { x = 32770, y = 32245, z = 8 }, weight = 13, reward = { { 2821, 1 } }, storage = Storage.Quest.U7_6.ExplorerSociety.Books.Cyclops, }, - [6191] = { + [6187] = { itemId = 2523, itemPos = { x = 32786, y = 32254, z = 8 }, weight = 13.00, @@ -1783,7 +1769,7 @@ ChestUnique = { storage = Storage.Quest.U7_6.ExplorerSociety.Books.Hengis, }, -- Witch House Quest - [6192] = { + [6188] = { itemId = 2472, itemPos = { x = 32867, y = 31909, z = 8 }, weight = 23.30, @@ -1792,7 +1778,7 @@ ChestUnique = { storage = Storage.QuestChests.WitchHouseQuest, }, -- Simon The Beggar's Favorite Staff - [6193] = { + [6189] = { itemId = 2482, itemPos = { x = 33167, y = 31600, z = 15 }, weight = 38.00, @@ -1800,7 +1786,7 @@ ChestUnique = { storage = Storage.QuestChests.SimonTheBeggarsFavoriteStaff, }, -- Druid Outfit Quest - Wolf Tooth Chain - [6194] = { + [6190] = { itemId = 2480, itemPos = { x = 32939, y = 31776, z = 9 }, weight = 3.30, @@ -1808,7 +1794,7 @@ ChestUnique = { storage = Storage.Quest.U7_8.DruidOutfits.WolfToothChain, }, -- Hunter Outfits Quest - Elane Crossbow - [6195] = { + [6191] = { itemId = 2472, itemPos = { x = 32369, y = 32795, z = 10 }, weight = 40.00, @@ -1816,7 +1802,7 @@ ChestUnique = { storage = Storage.Quest.U7_8.HunterOutfits.ElaneCrossbow, }, -- Knight Outfits Quest - Ramsay the Reckless Helmet - [6196] = { + [6192] = { itemId = 2472, itemPos = { x = 32860, y = 32516, z = 11 }, weight = 46.00, @@ -1824,7 +1810,7 @@ ChestUnique = { storage = Storage.Quest.U7_8.KnightOutfits.RamsaysHelmetChest, }, -- Oriental Outfits Quest - Chest - [6197] = { + [6193] = { itemId = 2472, itemPos = { x = 32088, y = 32780, z = 11 }, weight = 4.50, @@ -1832,7 +1818,7 @@ ChestUnique = { storage = Storage.Quest.U7_8.OrientalOutfits.CoralComb, }, -- The Shattered Isles Quest - Dragahs Spellbook - [6198] = { + [6194] = { itemId = 4240, itemPos = { x = 32093, y = 32574, z = 8 }, weight = 58.00, @@ -1840,7 +1826,7 @@ ChestUnique = { storage = Storage.Quest.U7_8.TheShatteredIsles.DragahsSpellbook, }, -- Dreamer's Challenge Quest - [6199] = { + [6195] = { itemId = 4240, itemPos = { x = 32860, y = 32249, z = 9 }, weight = 150.00, @@ -1848,14 +1834,14 @@ ChestUnique = { reward = { { 2816, 1 }, { 3285, 1 }, { 3352, 1 }, { 3558, 1 } }, storage = Storage.Quest.U7_9.DreamersChallenge.BPLongSword, }, - [6200] = { + [6196] = { itemId = 2472, itemPos = { x = 32850, y = 32285, z = 14 }, weight = 13.00, reward = { { 2821, 1 } }, storage = Storage.Quest.U7_9.DreamersChallenge.ChestBook, }, - [6201] = { + [6197] = { itemId = 2469, itemPos = { x = 32749, y = 32341, z = 14 }, weight = 15.30, @@ -1863,7 +1849,7 @@ ChestUnique = { reward = { { 6498, 1 }, { 2874, 1 }, { 3602, 1 } }, storage = Storage.Quest.U7_9.DreamersChallenge.ChestsWine, }, - [6202] = { + [6198] = { itemId = 2469, itemPos = { x = 32751, y = 32341, z = 14 }, weight = 15.30, @@ -1871,7 +1857,7 @@ ChestUnique = { reward = { { 6498, 1 }, { 2874, 1 }, { 3602, 1 } }, storage = Storage.Quest.U7_9.DreamersChallenge.ChestsWine, }, - [6203] = { + [6199] = { itemId = 2469, itemPos = { x = 32753, y = 32341, z = 14 }, weight = 15.30, @@ -1879,7 +1865,7 @@ ChestUnique = { reward = { { 6498, 1 }, { 2874, 1 }, { 3602, 1 } }, storage = Storage.Quest.U7_9.DreamersChallenge.ChestsWine, }, - [6204] = { + [6200] = { itemId = 2469, itemPos = { x = 32755, y = 32341, z = 14 }, weight = 15.30, @@ -1887,7 +1873,7 @@ ChestUnique = { reward = { { 6498, 1 }, { 2874, 1 }, { 3602, 1 } }, storage = Storage.Quest.U7_9.DreamersChallenge.ChestsWine, }, - [6205] = { + [6201] = { itemId = 2469, itemPos = { x = 32835, y = 32223, z = 14 }, weight = 0.30, @@ -1895,21 +1881,21 @@ ChestUnique = { storage = Storage.Quest.U7_9.DreamersChallenge.Chests3SmallDiamond, }, -- The Pits of Inferno - [6206] = { + [6202] = { itemId = 2472, itemPos = { x = 32828, y = 32340, z = 7 }, weight = 13.00, reward = { { 2836, 1 } }, storage = Storage.Quest.U7_9.ThePitsOfInferno.ChestTible, }, - [6207] = { + [6203] = { itemId = 5972, itemPos = { x = 32854, y = 32325, z = 11 }, weight = 13.00, reward = { { 2816, 1 } }, storage = Storage.Quest.U7_9.ThePitsOfInferno.CorpseBook, }, - [6208] = { + [6204] = { itemId = 5972, itemPos = { x = 32832, y = 32277, z = 10 }, weight = 40.90, @@ -1917,7 +1903,7 @@ ChestUnique = { reward = { { 6561, 1 }, { 6299, 1 }, { 3052, 1 }, { 5021, 3 }, { 3026, 5 }, { 3035, 11 }, { 5944, 2 }, { 3160, 3 }, { 3155, 2 }, { 3147, 1 }, { 238, 1 } }, storage = Storage.Quest.U7_9.ThePitsOfInferno.CorpsePirateBP, }, - [6209] = { + [6205] = { itemId = 2472, itemPos = { x = 32826, y = 32232, z = 11 }, weight = 20.70, @@ -1925,55 +1911,650 @@ ChestUnique = { reward = { { 11605, 1 }, { 11607, 1 }, { 11609, 1 }, { 11603, 1 } }, storage = Storage.Quest.U7_9.ThePitsOfInferno.RewardChestBP, }, - [6210] = { + [6206] = { itemId = 2472, itemPos = { x = 32824, y = 32232, z = 11 }, weight = 10.00, reward = { { 3035, 100 } }, storage = Storage.Quest.U7_9.ThePitsOfInferno.RewardChestPlatinumCoins, }, - [6211] = { + [6207] = { itemId = 2472, itemPos = { x = 32819, y = 32232, z = 11 }, weight = 10.00, reward = { { 3249, 1 } }, storage = Storage.Quest.U7_9.ThePitsOfInferno.RewardChestFrozenStarlight, }, - [6212] = { + [6208] = { itemId = 2472, itemPos = { x = 32814, y = 32232, z = 11 }, weight = 8.50, reward = { { 5791, 1 } }, storage = Storage.Quest.U7_9.ThePitsOfInferno.RewardChestStuffed, }, - [6213] = { + [6209] = { itemId = 2472, itemPos = { x = 32812, y = 32232, z = 11 }, weight = 8.00, reward = { { 6529, 1 } }, storage = Storage.Quest.U7_9.ThePitsOfInferno.RewardChestSoftBoots, }, - [6214] = { + [6210] = { itemId = 2472, itemPos = { x = 32804, y = 32229, z = 11 }, weight = 40.00, reward = { { 3341, 1 } }, storage = Storage.Quest.U7_9.ThePitsOfInferno.RewardChestStaffAvengerArbalest, }, - [6215] = { + [6211] = { itemId = 2472, itemPos = { x = 32806, y = 32229, z = 11 }, weight = 64.00, reward = { { 6527, 1 } }, storage = Storage.Quest.U7_9.ThePitsOfInferno.RewardChestStaffAvengerArbalest, }, - [6216] = { + [6212] = { itemId = 2472, itemPos = { x = 32808, y = 32229, z = 11 }, weight = 95.00, reward = { { 5803, 1 } }, storage = Storage.Quest.U7_9.ThePitsOfInferno.RewardChestStaffAvengerArbalest, }, + -- The Ice Island Quest - Skeleton - Formorgar Glacier + [6213] = { + itemId = 4024, + itemPos = { x = 32121, y = 31106, z = 12 }, + container = 2853, + reward = { { 3450, 20 }, { 3349, 1 }, { 7443, 1 }, { 3031, 100 }, { 7290, 1 } }, + weight = 97.00, + storage = Storage.Quest.U8_0.TheIceIslands.FormorgarGlacierSkeleton, + }, + [6214] = { + itemId = 2472, + itemPos = { x = 32027, y = 31104, z = 11 }, + reward = { { 2820, 1 } }, + weight = 0.50, + storage = Storage.Quest.U8_0.TheIceIslands.FormorgarGlacierChest, + }, + -- Shards of Ancient Winters Quest + [6215] = { + itemId = 2523, + itemPos = { x = 32483, y = 31110, z = 8 }, + container = 7343, + reward = { { 7158, 3 }, { 3031, 48 }, { 7290, 1 } }, + weight = 67.80, + storage = Storage.Quest.U8_0.ShardsofAncientWinters.Inukaya, + }, + [6216] = { + itemId = 2523, + itemPos = { x = 32431, y = 31235, z = 8 }, + container = 2853, + reward = { { 6525, 1 }, { 3031, 89 }, { 7290, 1 } }, + weight = 45.90, + storage = Storage.Quest.U8_0.ShardsofAncientWinters.Tyrsung, + }, + [6217] = { + itemId = 2473, + itemPos = { x = 32146, y = 31430, z = 8 }, + container = 2853, + reward = { { 7443, 1 }, { 3035, 10 }, { 7290, 1 } }, + weight = 45.90, + storage = Storage.Quest.U8_0.ShardsofAncientWinters.Okolnir, + }, + [6218] = { + itemId = 4024, + itemPos = { x = 32490, y = 31192, z = 10 }, + container = 2853, + reward = { { 7439, 1 }, { 3031, 200 }, { 6499, 3 }, { 7290, 1 } }, + weight = 52.00, + storage = Storage.Quest.U8_0.ShardsofAncientWinters.Helheim, + }, + [6219] = { + itemId = 2472, + itemPos = { x = 32154, y = 31116, z = 9 }, + container = 2853, + reward = { { 7400, 1 }, { 3035, 2 }, { 7290, 1 } }, + weight = 32.20, + storage = Storage.Quest.U8_0.ShardsofAncientWinters.FormorgarMines, + }, + -- Barbarian Arena Quest - Greenhorn + [6220] = { + itemId = 2472, + itemPos = { x = 32231, y = 31065, z = 7 }, + container = 2856, + reward = { { 2995, 1 }, { 6570, 1 }, { 6574, 1 }, { 6569, 10 }, { 7377, 1 } }, + weight = 25.10, + storage = Storage.Quest.U8_0.BarbarianArena.RewardGreenhornPresent, + }, + [6221] = { + itemId = 2480, + itemPos = { x = 32231, y = 31068, z = 7 }, + container = 7342, + reward = { { 7364, 100 }, { 7365, 100 } }, + weight = 158.00, + storage = Storage.Quest.U8_0.BarbarianArena.RewardGreenhornBP, + }, + [6222] = { + itemId = 2482, + itemPos = { x = 32235, y = 31068, z = 7 }, + reward = { { 7392, 1 } }, + weight = 54.00, + storage = Storage.Quest.U8_0.BarbarianArena.RewardGreenhornWeapons, + }, + [6223] = { + itemId = 2482, + itemPos = { x = 32235, y = 31066, z = 7 }, + reward = { { 7380, 1 } }, + weight = 45.00, + storage = Storage.Quest.U8_0.BarbarianArena.RewardGreenhornWeapons, + }, + [6224] = { + itemId = 2482, + itemPos = { x = 32235, y = 31064, z = 7 }, + reward = { { 7406, 1 } }, + weight = 59.00, + storage = Storage.Quest.U8_0.BarbarianArena.RewardGreenhornWeapons, + }, + -- Barbarian Arena Quest - Scrapper + [6225] = { + itemId = 2472, + itemPos = { x = 32231, y = 31058, z = 7 }, + container = 2856, + reward = { { 6569, 10 }, { 7375, 1 }, { 6574, 1 }, { 7183, 1 } }, + weight = 25.10, + storage = Storage.Quest.U8_0.BarbarianArena.RewardScrapperPresent, + }, + [6226] = { + itemId = 2480, + itemPos = { x = 32231, y = 31068, z = 7 }, + container = 7342, + reward = { { 7365, 100 }, { 3450, 200 }, { 11605, 1 }, { 11615, 1 } }, + weight = 270.40, + storage = Storage.Quest.U8_0.BarbarianArena.RewardScrapperBP, + }, + [6227] = { + itemId = 2482, + itemPos = { x = 32235, y = 31061, z = 7 }, + reward = { { 7415, 1 } }, + weight = 78.00, + storage = Storage.Quest.U8_0.BarbarianArena.RewardScrapperWeapons, + }, + [6228] = { + itemId = 2482, + itemPos = { x = 32235, y = 31059, z = 7 }, + reward = { { 7389, 1 } }, + weight = 61.00, + storage = Storage.Quest.U8_0.BarbarianArena.RewardScrapperWeapons, + }, + [6229] = { + itemId = 2482, + itemPos = { x = 32235, y = 31057, z = 7 }, + reward = { { 7384, 1 } }, + weight = 35.00, + storage = Storage.Quest.U8_0.BarbarianArena.RewardScrapperWeapons, + }, + -- Barbarian Arena Quest - Warlord + [6230] = { + itemId = 2472, + itemPos = { x = 32231, y = 31051, z = 7 }, + container = 2856, + reward = { { 6569, 10 }, { 6574, 1 }, { 7372, 1 }, { 5080, 1 } }, + weight = 13.60, + storage = Storage.Quest.U8_0.BarbarianArena.RewardWarlordPresent, + }, + [6231] = { + itemId = 2480, + itemPos = { x = 32231, y = 31054, z = 7 }, + container = 7342, + reward = { { 11603, 1 }, { 11609, 1 }, { 7443, 1 }, { 7440, 1 }, { 6528, 100 } }, + weight = 115.30, + storage = Storage.Quest.U8_0.BarbarianArena.RewardWarlordBP, + }, + [6232] = { + itemId = 2482, + itemPos = { x = 32235, y = 31054, z = 7 }, + reward = { { 7429, 1 } }, + weight = 39.00, + storage = Storage.Quest.U8_0.BarbarianArena.RewardWarlordWeapons, + }, + [6233] = { + itemId = 2482, + itemPos = { x = 32235, y = 31052, z = 7 }, + reward = { { 7434, 1 } }, + weight = 92.00, + storage = Storage.Quest.U8_0.BarbarianArena.RewardWarlordWeapons, + }, + [6234] = { + itemId = 2482, + itemPos = { x = 32235, y = 31050, z = 7 }, + reward = { { 7390, 1 } }, + weight = 50.00, + storage = Storage.Quest.U8_0.BarbarianArena.RewardWarlordWeapons, + }, + -- Fishing Box Quest + [6235] = { + itemId = 2473, + itemPos = { x = 32015, y = 31409, z = 7 }, + container = 2853, + reward = { { 3035, 5 }, { 7158, 3 }, { 7159, 3 } }, + weight = 68.50, + storage = Storage.Quest.U8_0.FishingBox, + }, + -- Koshei The Deathless Quest + [6236] = { + itemId = 2908, + itemPos = { x = 33193, y = 32459, z = 7 }, + reward = { { 7530, 1 } }, + weight = 1.00, + storage = Storage.Quest.U8_1.KosheiTheDeathless.KosheiAmuletPart1, + }, + [6237] = { + itemId = 1983, + itemPos = { x = 33305, y = 32277, z = 10 }, + reward = { { 7528, 1 } }, + weight = 1.00, + storage = Storage.Quest.U8_1.KosheiTheDeathless.KosheiAmuletPart2, + }, + [6238] = { + itemId = 231, + itemPos = { x = 33212, y = 32593, z = 7 }, + reward = { { 7531, 1 } }, + weight = 1.00, + storage = Storage.Quest.U8_1.KosheiTheDeathless.KosheiAmuletPart3, + }, + [6239] = { + itemId = 1983, + itemPos = { x = 33053, y = 32468, z = 11 }, + reward = { { 7529, 1 } }, + weight = 1.00, + storage = Storage.Quest.U8_1.KosheiTheDeathless.KosheiAmuletPart4, + }, + [6240] = { + itemId = 2472, + itemPos = { x = 33261, y = 32444, z = 12 }, + reward = { { 645, 1 } }, + weight = 18.00, + storage = Storage.Quest.U8_1.KosheiTheDeathless.KosheiTheDeathlessLegs, + }, + [6241] = { + itemId = 2480, + itemPos = { x = 33261, y = 32448, z = 12 }, + reward = { { 3035, 100 } }, + weight = 5.00, + storage = Storage.Quest.U8_1.KosheiTheDeathless.KosheiTheDeathlessPlatinum, + }, + [6242] = { + itemId = 2469, + itemPos = { x = 33273, y = 32470, z = 11 }, + reward = { { 3031, 100 } }, + weight = 10.00, + storage = Storage.Quest.U8_1.KosheiTheDeathless.KosheiTheDeathlessGold, + }, + -- Secret Service Quest + [6243] = { + itemId = 2433, + itemPos = { x = 32311, y = 32177, z = 5 }, + reward = { { 403, 1 } }, + weight = 13.00, + storage = Storage.Quest.U8_1.SecretService.AHX17L89, + }, + [6244] = { + itemId = 1983, + itemPos = { x = 32156, y = 31954, z = 13 }, + reward = { { 406, 1 } }, + weight = 0.80, + storage = Storage.Quest.U8_1.SecretService.FamilySignetRing, + }, + [6245] = { + itemId = 2433, + itemPos = { x = 33271, y = 31839, z = 3 }, + reward = { { 648, 1 } }, + weight = 58.00, + storage = Storage.Quest.U8_1.SecretService.MagicSpellbook, + }, + [6246] = { + itemId = 2473, + itemPos = { x = 32907, y = 32012, z = 6 }, + reward = { { 399, 1 } }, + weight = 1.00, + storage = Storage.Quest.U8_1.SecretService.BuildingPlans, + }, + [6247] = { + itemId = 2433, + itemPos = { x = 32598, y = 32380, z = 10 }, + reward = { { 400, 1 } }, + weight = 1.50, + storage = Storage.Quest.U8_1.SecretService.SuspiciousDocuments, + }, + [6248] = { + itemId = 2473, + itemPos = { x = 32180, y = 31930, z = 11 }, + reward = { { 401, 1 } }, + weight = 13.00, + storage = Storage.Quest.U8_1.SecretService.Book, + }, + [6249] = { + itemId = 3634, + itemPos = { x = 32876, y = 31958, z = 11 }, + reward = { { 652, 1 } }, + weight = 45.00, + storage = Storage.Quest.U8_1.SecretService.RottenHeartOfTree, + }, + [6250] = { + itemId = 2469, + itemPos = { x = 32872, y = 31958, z = 11 }, + reward = { { 5956, 1 } }, + weight = 1.20, + storage = Storage.Quest.U8_1.SecretService.LotteryTicket, + }, + [6251] = { + itemId = 2472, + itemPos = { x = 32643, y = 32733, z = 7 }, + reward = { { 5952, 1 } }, + weight = 1.20, + storage = Storage.Quest.U8_1.SecretService.PoemScroll, + }, + [6252] = { + itemId = 4240, + itemPos = { x = 32773, y = 31582, z = 11 }, + reward = { { 348, 1 } }, + weight = 1.20, + storage = Storage.Quest.U8_1.SecretService.IntelligenceReports, + }, + -- To Blind the Enemy Quest + [6253] = { + itemId = 2472, + itemPos = { x = 32591, y = 31647, z = 3 }, + reward = { { 3425, 1 } }, + weight = 55.00, + storage = Storage.TibiaTales.ToBlindTheEnemy.DwarvenShield, + }, + [6254] = { + itemId = 2472, + itemPos = { x = 32590, y = 31647, z = 3 }, + reward = { { 3282, 1 } }, + weight = 54.00, + storage = Storage.TibiaTales.ToBlindTheEnemy.MorningStar, + }, + [6255] = { + itemId = 2434, + itemPos = { x = 32588, y = 31645, z = 3 }, + container = 2853, + reward = { { 237, 1 }, { 3147, 1 }, { 3059, 1 } }, + weight = 31.00, + storage = Storage.TibiaTales.ToBlindTheEnemy.BP1, + }, + [6256] = { + itemId = 2434, + itemPos = { x = 32588, y = 31644, z = 3 }, + container = 2853, + reward = { { 3028, 2 }, { 3031, 100 } }, + weight = 18.20, + storage = Storage.TibiaTales.ToBlindTheEnemy.BP2, + }, + -- To Outfox a Fox Quest + [6257] = { + itemId = 2469, + itemPos = { x = 32467, y = 31970, z = 5 }, + reward = { { 139, 1 } }, + weight = 7.00, + storage = Storage.TibiaTales.ToOutfoxAFoxQuest.MiningHelmet, + }, + -- Waterfall Quest + [6258] = { + itemId = 2472, + itemPos = { x = 32970, y = 32646, z = 8 }, + container = 5926, + reward = { { 6096, 1 }, { 3097, 1 } }, + weight = 7.00, + storage = Storage.Quest.U8_1.WaterfallQuest, + }, + -- What a Foolish Quest + [6259] = { + itemId = 2469, + itemPos = { x = 32563, y = 32115, z = 4 }, + reward = { { 112, 1 } }, + weight = 0.50, + storage = Storage.Quest.U8_1.WhatAFoolishQuest.MagicalWatch, + }, + [6269] = { + itemId = 2472, + itemPos = { x = 32661, y = 31855, z = 13 }, + container = 2853, + reward = { { 3469, 1 }, { 2821, 1 } }, + weight = 22.00, + storage = Storage.Quest.U8_1.WhatAFoolishQuest.BagBookKnife, + }, + -- The Inquisition Quest + [6270] = { + itemId = 2472, + itemPos = { x = 32649, y = 31932, z = 1 }, + reward = { { 7874, 1 } }, + weight = 13.00, + storage = Storage.Quest.U8_2.TheInquisitionQuest.WitchesGrimoire, + }, + -- The Thieves Guild Quest + [6271] = { + itemId = 2473, + itemPos = { x = 33131, y = 32661, z = 7 }, + reward = { { 235, 1 } }, + weight = 8.00, + storage = Storage.Quest.U8_2.TheThievesGuildQuest.RewardOasis, + }, + [6272] = { + itemId = 2473, + itemPos = { x = 32367, y = 31781, z = 8 }, + reward = { { 8117, 1 } }, + weight = 13.00, + storage = Storage.Quest.U8_2.TheThievesGuildQuest.RewardBook, + }, + [6273] = { + itemId = 2469, + itemPos = { x = 32551, y = 32652, z = 10 }, + reward = { { 7369, 1 } }, + weight = 5.00, + storage = Storage.Quest.U8_2.TheThievesGuildQuest.GoldenGoblet, + }, + [6274] = { + itemId = 2433, + itemPos = { x = 32902, y = 32143, z = 4 }, + reward = { { 7935, 1 } }, + weight = 0.10, + storage = Storage.Quest.U8_2.TheThievesGuildQuest.CompromisingLetter, + }, + [6275] = { + itemId = 2434, + itemPos = { x = 32309, y = 32209, z = 8 }, + reward = { { 8021, 1 } }, + weight = 35.00, + storage = Storage.Quest.U8_2.TheThievesGuildQuest.RewardEnd, + }, + [6276] = { + itemId = 2434, + itemPos = { x = 32309, y = 32211, z = 8 }, + reward = { { 7404, 1 } }, + weight = 17.00, + storage = Storage.Quest.U8_2.TheThievesGuildQuest.RewardEnd, + }, + [6277] = { + itemId = 2434, + itemPos = { x = 32309, y = 32213, z = 8 }, + reward = { { 8073, 1 } }, + weight = 21.00, + storage = Storage.Quest.U8_2.TheThievesGuildQuest.RewardEnd, + }, + -- Vampire Hunter Quest + [6278] = { + itemId = 1986, + itemPos = { x = 32972, y = 31461, z = 10 }, + reward = { { 8532, 1 } }, + weight = 5.00, + storage = Storage.Quest.U8_2.VampireHunterQuest.BloodSkull, + }, + -- The Hidden City of Beregar Quest + [6279] = { + itemId = 4024, + itemPos = { x = 32601, y = 31386, z = 14 }, + reward = { { 9058, 1 } }, + weight = 18.00, + storage = Storage.Quest.U8_4.TheHiddenCityOfBeregar.CorpseGoldIngot, + }, + [6280] = { + itemId = 4240, + itemPos = { x = 32588, y = 31406, z = 14 }, + reward = { { 9057, 3 } }, + weight = 0.30, + storage = Storage.Quest.U8_4.TheHiddenCityOfBeregar.CorpseSmallTopazes, + }, + [6281] = { + itemId = 4024, + itemPos = { x = 32650, y = 31467, z = 15 }, + reward = { { 8895, 1 } }, + weight = 120.00, + storage = Storage.Quest.U8_4.TheHiddenCityOfBeregar.CorpseRustedArmor, + }, + [6282] = { + itemId = 2472, + itemPos = { x = 32754, y = 31462, z = 15 }, + reward = { { 9172, 1 } }, + weight = 1.00, + storage = Storage.Quest.U8_4.TheHiddenCityOfBeregar.PrisonCellKey, + }, + [6283] = { + itemId = 1983, + itemPos = { x = 32546, y = 31522, z = 11 }, + container = 2867, + reward = { { 3035, 13 }, { 3003, 1 }, { 3457, 1 }, { 268, 1 }, { 239, 2 } }, + weight = 82.00, + storage = Storage.Quest.U8_4.TheHiddenCityOfBeregar.BPTheUndeathStare, + }, + [6284] = { + itemId = 2472, + itemPos = { x = 32582, y = 31405, z = 15 }, + reward = { { 9019, 1 } }, + weight = 10.00, + storage = Storage.Quest.U8_4.TheHiddenCityOfBeregar.FirewalkerBoots, + }, + -- Darashia Dragon Quest + [6285] = { + itemId = 4286, + itemPos = { x = 33233, y = 32280, z = 12 }, + reward = { { 3052, 1 } }, + weight = 1.00, + storage = Storage.Quest.U8_5.DarashiaDragon, + }, + -- Lone Medusa Quest + [6286] = { + itemId = 3990, + itemPos = { x = 32406, y = 32764, z = 1 }, + reward = { { 3027, 4 } }, + weight = 1.00, + storage = Storage.Quest.U8_5.LoneMedusa, + }, + -- The New Frontier Quest + [6287] = { + itemId = 2472, + itemPos = { x = 33164, y = 31257, z = 10 }, + reward = { { 10217, 1 } }, + weight = 15.00, + storage = Storage.Quest.U8_54.TheNewFrontier.ChestTomeOfKnowledge1, + }, + [6288] = { + itemId = 2472, + itemPos = { x = 33057, y = 31019, z = 2 }, + reward = { { 10217, 1 } }, + weight = 15.00, + storage = Storage.Quest.U8_54.TheNewFrontier.ChestTomeOfKnowledge2, + }, + -- Children of the Revolution Quest + [6289] = { + itemId = 2472, + itemPos = { x = 33247, y = 31161, z = 6 }, + reward = { { 10217, 1 } }, + weight = 15.00, + storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.ChestTomeOfKnowledge1, + }, + [6290] = { + itemId = 1895, + itemPos = { x = 33327, y = 31410, z = 8 }, + reward = { { 10189, 1 } }, + weight = 2.00, + storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.FlaskOfExtraGreasyOil, + }, + [6291] = { + itemId = 2472, + itemPos = { x = 33264, y = 31130, z = 7 }, + reward = { { 10217, 1 } }, + weight = 15.00, + storage = Storage.Quest.U8_54.ChildrenOfTheRevolution.ChestTomeOfKnowledge2, + }, + -- Tomes of Knowledge Quest + [6292] = { + itemId = 2472, + itemPos = { x = 33009, y = 31251, z = 8 }, + reward = { { 10217, 1 } }, + weight = 15.00, + storage = Storage.Quest.U8_54.TomesOfKnowledge.ChestTomeOfKnowledge1, + }, + [6293] = { + itemId = 2472, + itemPos = { x = 32978, y = 31427, z = 2 }, + reward = { { 10217, 1 } }, + weight = 15.00, + storage = Storage.Quest.U8_54.TomesOfKnowledge.ChestTomeOfKnowledge2, + }, + [6294] = { + itemId = 2472, + itemPos = { x = 33306, y = 31125, z = 9 }, + reward = { { 10217, 1 } }, + weight = 15.00, + storage = Storage.Quest.U8_54.TomesOfKnowledge.ChestTomeOfKnowledge3, + }, + [6295] = { + itemId = 2480, + itemPos = { x = 33157, y = 31229, z = 15 }, + reward = { { 10217, 1 } }, + weight = 15.00, + storage = Storage.Quest.U8_54.TomesOfKnowledge.ChestTomeOfKnowledge4, + }, + -- An Interest In Botany Quest + [6296] = { + itemId = 2469, + itemPos = { x = 33004, y = 31530, z = 10 }, + reward = { { 11699, 1 } }, + weight = 15.00, + storage = Storage.TibiaTales.AnInterestInBotany.BotanyAlmanach, + }, + -- Wrath of the Emperor Quest + [6297] = { + itemId = 2469, + itemPos = { x = 33073, y = 31169, z = 8 }, + reward = { { 3035, 100 } }, + weight = 10.00, + storage = Storage.Quest.U8_6.WrathOfTheEmperor.Chest100PlatinumCoins, + }, + [6298] = { + itemId = 2472, + itemPos = { x = 33074, y = 31169, z = 8 }, + container = 2853, + reward = { { 11695, 1 }, { 10326, 1 }, { 5801, 1 }, { 3041, 1 }, { 3027, 10 }, { 9058, 5 }, { 5882, 10 }, { 3043, 10 } }, + weight = 151.00, + storage = Storage.Quest.U8_6.WrathOfTheEmperor.ChestBag, + }, + [6299] = { + itemId = 2473, + itemPos = { x = 33078, y = 31170, z = 8 }, + reward = { { 11686, 1 } }, + weight = 130.00, + storage = Storage.Quest.U8_6.WrathOfTheEmperor.ChestItems, + }, + [6300] = { + itemId = 2473, + itemPos = { x = 33080, y = 31170, z = 8 }, + reward = { { 11689, 1 } }, + weight = 43.00, + storage = Storage.Quest.U8_6.WrathOfTheEmperor.ChestItems, + }, -- Reward of others scrips files (varied rewards) -- The First dragon Quest -- Treasure chests (data\scripts\actions\quests\first_dragon\treasure_chests.lua) diff --git a/data-otservbr-global/startup/tables/corpse.lua b/data-otservbr-global/startup/tables/corpse.lua index a6ca06f7375..d883939842d 100644 --- a/data-otservbr-global/startup/tables/corpse.lua +++ b/data-otservbr-global/startup/tables/corpse.lua @@ -18,6 +18,11 @@ CorpseAction = { } CorpseUnique = { + -- The Ice Island Quest - Skeleton + [3112] = { + itemId = 4024, + itemPos = { x = 32258, y = 31098, z = 10 }, + }, -- Dark trails (Quandon corpse) -- Path: data\scripts\actions\quests\dark_trails\corpse.lua [20001] = { @@ -30,8 +35,14 @@ CorpseUnique = { itemId = 6082, itemPos = { x = 33146, y = 32341, z = 8 }, }, + -- The Ice Island Quest - Formorgar Mines Hoist - Skeleton [20003] = { itemId = 4285, itemPos = { x = 32211, y = 31273, z = 10 }, }, + -- Thais + [20004] = { + itemId = 4285, + itemPos = { x = 32305, y = 32254, z = 9 }, + }, } diff --git a/data-otservbr-global/startup/tables/door_quest.lua b/data-otservbr-global/startup/tables/door_quest.lua index 59c667944fa..de2e9854342 100644 --- a/data-otservbr-global/startup/tables/door_quest.lua +++ b/data-otservbr-global/startup/tables/door_quest.lua @@ -46,7 +46,7 @@ QuestDoorAction = { itemPos = { { x = 32455, y = 31967, z = 14 } }, }, -- To Outfox a Fox Quest, mining helmet door - [Storage.ToOutfoxAFoxQuest] = { + [Storage.TibiaTales.ToOutfoxAFoxQuest.Questline] = { itemId = false, itemPos = { { x = 32467, y = 31969, z = 5 } }, }, @@ -91,7 +91,7 @@ QuestDoorAction = { itemPos = { { x = 33344, y = 32120, z = 10 } }, }, -- Koshei the deathless quest door - [Storage.KosheiTheDeathless.RewardDoor] = { + [Storage.Quest.U8_1.KosheiTheDeathless.RewardDoor] = { itemId = false, itemPos = { { x = 33269, y = 32446, z = 12 } }, }, @@ -271,20 +271,20 @@ QuestDoorAction = { itemPos = { { x = 33470, y = 32786, z = 11 } }, }, -- Wrath of the emperor door - [Storage.WrathoftheEmperor.Mission02] = { + [Storage.Quest.U8_6.WrathOfTheEmperor.Mission02] = { itemId = false, itemPos = { { x = 33242, y = 31051, z = 10 } }, }, - [Storage.WrathoftheEmperor.Mission08] = { + [Storage.Quest.U8_6.WrathOfTheEmperor.Mission08] = { itemId = false, itemPos = { { x = 33080, y = 31164, z = 8 } }, }, - [Storage.WrathoftheEmperor.Mission12] = { + [Storage.Quest.U8_6.WrathOfTheEmperor.Mission12] = { itemId = false, itemPos = { { x = 33076, y = 31176, z = 8 } }, }, -- Unnatural selection door - [Storage.UnnaturalSelection.Mission01] = { + [Storage.Quest.U8_54.UnnaturalSelection.Mission01] = { itemId = false, itemPos = { { x = 33046, y = 31302, z = 7 } }, }, @@ -395,47 +395,47 @@ QuestDoorAction = { }, }, -- The inquisition door - [Storage.TheInquisition.Mission01] = { + [Storage.Quest.U8_2.TheInquisitionQuest.Mission01] = { itemId = false, itemPos = { { x = 32316, y = 32264, z = 8 } }, }, - [Storage.TheInquisition.RewardDoor] = { + [Storage.Quest.U8_2.TheInquisitionQuest.RewardDoor] = { itemId = false, itemPos = { { x = 32320, y = 32258, z = 9 } }, }, -- In service of yalahar door - [Storage.InServiceofYalahar.Mission03] = { + [Storage.Quest.U8_4.InServiceOfYalahar.Mission03] = { itemId = false, itemPos = { { x = 32801, y = 31220, z = 7 }, { x = 32803, y = 31220, z = 7 }, }, }, - [Storage.InServiceofYalahar.AlchemistFormula] = { + [Storage.Quest.U8_4.InServiceOfYalahar.AlchemistFormula] = { itemId = false, itemPos = { { x = 32693, y = 31085, z = 7 } }, }, - [Storage.InServiceofYalahar.TamerinStatus] = { + [Storage.Quest.U8_4.InServiceOfYalahar.TamerinStatus] = { itemId = false, itemPos = { { x = 32660, y = 31222, z = 8 } }, }, - [Storage.InServiceofYalahar.MorikSummon] = { + [Storage.Quest.U8_4.InServiceOfYalahar.MorikSummon] = { itemId = false, itemPos = { { x = 32690, y = 31241, z = 6 } }, }, - [Storage.InServiceofYalahar.MatrixReward] = { + [Storage.Quest.U8_4.InServiceOfYalahar.MatrixReward] = { itemId = false, itemPos = { { x = 32879, y = 31260, z = 8 } }, }, - [Storage.InServiceofYalahar.NotesPalimuth] = { + [Storage.Quest.U8_4.InServiceOfYalahar.NotesPalimuth] = { itemId = false, itemPos = { { x = 32797, y = 31226, z = 7 } }, }, - [Storage.InServiceofYalahar.DoorToAzerus] = { + [Storage.Quest.U8_4.InServiceOfYalahar.DoorToAzerus] = { itemId = false, itemPos = { { x = 32796, y = 31185, z = 7 } }, }, - [Storage.InServiceofYalahar.DoorToBog] = { + [Storage.Quest.U8_4.InServiceOfYalahar.DoorToBog] = { itemId = false, itemPos = { { x = 32673, y = 31121, z = 7 }, @@ -444,18 +444,18 @@ QuestDoorAction = { { x = 32709, y = 31186, z = 8 }, }, }, - [Storage.InServiceofYalahar.DoorToLastFight] = { + [Storage.Quest.U8_4.InServiceOfYalahar.DoorToLastFight] = { itemId = false, itemPos = { { x = 32783, y = 31193, z = 8 } }, }, - [Storage.InServiceofYalahar.DoorToMatrix] = { + [Storage.Quest.U8_4.InServiceOfYalahar.DoorToMatrix] = { itemId = false, itemPos = { { x = 32867, y = 31265, z = 10 }, { x = 32940, y = 31248, z = 9 }, }, }, - [Storage.InServiceofYalahar.DoorToQuara] = { + [Storage.Quest.U8_4.InServiceOfYalahar.DoorToQuara] = { itemId = false, itemPos = { { x = 32906, y = 31209, z = 14 }, @@ -463,7 +463,7 @@ QuestDoorAction = { { x = 32975, y = 31148, z = 14 }, }, }, - [Storage.InServiceofYalahar.DoorToReward] = { + [Storage.Quest.U8_4.InServiceOfYalahar.DoorToReward] = { itemId = false, itemPos = { { x = 32780, y = 31205, z = 7 }, @@ -471,12 +471,12 @@ QuestDoorAction = { }, }, -- Children of the revolution door - [Storage.ChildrenoftheRevolution.Mission03] = { + [Storage.Quest.U8_54.ChildrenOfTheRevolution.Mission03] = { itemId = false, itemPos = { { x = 33330, y = 31411, z = 8 } }, }, -- Unnatural selection door - [Storage.UnnaturalSelection.Mission05] = { + [Storage.Quest.U8_54.UnnaturalSelection.Mission05] = { itemId = false, itemPos = { { x = 32982, y = 31439, z = 3 } }, }, @@ -522,77 +522,77 @@ QuestDoorAction = { }, }, -- The thieves guild door - [Storage.ThievesGuild.Mission04] = { + [Storage.Quest.U8_2.TheThievesGuildQuest.Mission04] = { itemId = false, itemPos = { { x = 32359, y = 32787, z = 6 } }, }, - [Storage.ThievesGuild.Mission05] = { + [Storage.Quest.U8_2.TheThievesGuildQuest.Mission05] = { itemId = false, itemPos = { { x = 32550, y = 32652, z = 10 } }, }, - [Storage.ThievesGuild.Door] = { + [Storage.Quest.U8_2.TheThievesGuildQuest.Door] = { itemId = false, itemPos = { { x = 32314, y = 32210, z = 8 } }, }, - [Storage.ThievesGuild.TheatreScript] = { + [Storage.Quest.U8_2.TheThievesGuildQuest.TheatreScript] = { itemId = false, itemPos = { { x = 32367, y = 31782, z = 8 } }, }, -- Secret service door - [Storage.SecretService.CGBMission01] = { + [Storage.Quest.U8_1.SecretService.CGBMission01] = { itemId = false, itemPos = { { x = 33270, y = 31839, z = 3 } }, }, - [Storage.SecretService.TBIMission02] = { + [Storage.Quest.U8_1.SecretService.TBIMission02] = { itemId = false, itemPos = { { x = 32872, y = 31957, z = 11 } }, }, - [Storage.SecretService.AVINMission02] = { + [Storage.Quest.U8_1.SecretService.AVINMission02] = { itemId = false, itemPos = { { x = 32310, y = 32178, z = 5 } }, }, - [Storage.SecretService.CGBMission02] = { + [Storage.Quest.U8_1.SecretService.CGBMission02] = { itemId = false, itemPos = { { x = 32876, y = 31957, z = 11 } }, }, - [Storage.SecretService.TBIMission03] = { + [Storage.Quest.U8_1.SecretService.TBIMission03] = { itemId = false, itemPos = { { x = 32639, y = 32735, z = 7 } }, }, - [Storage.SecretService.TBIMission04] = { + [Storage.Quest.U8_1.SecretService.TBIMission04] = { itemId = false, itemPos = { { x = 32772, y = 31582, z = 11 } }, }, - [Storage.SecretService.CGBMission04] = { + [Storage.Quest.U8_1.SecretService.CGBMission04] = { itemId = false, itemPos = { { x = 32906, y = 32013, z = 6 } }, }, - [Storage.SecretService.AVINMission05] = { + [Storage.Quest.U8_1.SecretService.AVINMission05] = { itemId = false, itemPos = { { x = 32156, y = 31951, z = 13 } }, }, - [Storage.SecretService.CGBMission05] = { + [Storage.Quest.U8_1.SecretService.CGBMission05] = { itemId = false, itemPos = { { x = 32599, y = 32380, z = 10 } }, }, - [Storage.SecretService.Mission07] = { + [Storage.Quest.U8_1.SecretService.Mission07] = { itemId = false, itemPos = { { x = 32537, y = 31897, z = 13 } }, }, -- Hidden city of beregar door - [Storage.HiddenCityOfBeregar.DoorNorthMine] = { + [Storage.Quest.U8_4.TheHiddenCityOfBeregar.DoorNorthMine] = { itemId = false, itemPos = { { x = 32606, y = 31489, z = 14 } }, }, - [Storage.HiddenCityOfBeregar.DoorWestMine] = { + [Storage.Quest.U8_4.TheHiddenCityOfBeregar.DoorWestMine] = { itemId = false, itemPos = { { x = 32584, y = 31499, z = 14 } }, }, - [Storage.HiddenCityOfBeregar.DoorSouthMine] = { + [Storage.Quest.U8_4.TheHiddenCityOfBeregar.DoorSouthMine] = { itemId = false, itemPos = { { x = 32608, y = 31516, z = 14 } }, }, - [Storage.TibiaTales.AnInterestInBotanyChestDoor] = { + [Storage.TibiaTales.AnInterestInBotany.ChestDoor] = { itemId = false, itemPos = { { x = 33007, y = 31536, z = 10 } }, }, @@ -610,7 +610,7 @@ QuestDoorAction = { itemPos = { { x = 31978, y = 32856, z = 3 } }, }, -- Hot cuisine door - [Storage.HotCuisineQuest.CookbookDoor] = { + [Storage.Quest.U8_5.HotCuisineQuest.CookbookDoor] = { itemId = false, itemPos = { { x = 33065, y = 32529, z = 5 }, @@ -623,7 +623,7 @@ QuestDoorAction = { itemPos = { { x = 33216, y = 31671, z = 13 } }, }, -- Svargrond arena door - [Storage.SvargrondArena.PitDoor] = { + [Storage.Quest.U8_0.BarbarianArena.PitDoor] = { itemId = false, itemPos = { { x = 32233, y = 31098, z = 7 }, @@ -631,15 +631,15 @@ QuestDoorAction = { { x = 32233, y = 31100, z = 7 }, }, }, - [Storage.SvargrondArena.GreenhornDoor] = { + [Storage.Quest.U8_0.BarbarianArena.GreenhornDoor] = { itemId = false, itemPos = { { x = 32227, y = 31066, z = 7 } }, }, - [Storage.SvargrondArena.ScrapperDoor] = { + [Storage.Quest.U8_0.BarbarianArena.ScrapperDoor] = { itemId = false, itemPos = { { x = 32227, y = 31059, z = 7 } }, }, - [Storage.SvargrondArena.WarlordDoor] = { + [Storage.Quest.U8_0.BarbarianArena.WarlordDoor] = { itemId = false, itemPos = { { x = 32227, y = 31052, z = 7 } }, }, @@ -669,11 +669,11 @@ QuestDoorAction = { }, }, -- What a foolish door - [Storage.WhatAFoolish.TriangleTowerDoor] = { + [Storage.Quest.U8_1.WhatAFoolishQuest.TriangleTowerDoor] = { itemId = false, itemPos = { { x = 32563, y = 32116, z = 4 } }, }, - [Storage.WhatAFoolish.QueenEloiseCatDoor] = { + [Storage.Quest.U8_1.WhatAFoolishQuest.QueenEloiseCatDoor] = { itemId = false, itemPos = { { x = 32316, y = 31757, z = 9 } }, }, @@ -739,7 +739,7 @@ QuestDoorAction = { itemId = 1644, itemPos = { { x = 33001, y = 32047, z = 12 } }, }, - [Storage.SecretService.CGBMission06] = { + [Storage.Quest.U8_1.SecretService.CGBMission06] = { itemId = 6260, itemPos = { { x = 32180, y = 31933, z = 11 } }, }, @@ -758,7 +758,7 @@ QuestDoorAction = { itemId = false, itemPos = { { x = 33047, y = 31295, z = 7 } }, }, - [Storage.WrathoftheEmperor.Mission06] = { + [Storage.Quest.U8_6.WrathOfTheEmperor.Mission06] = { itemId = false, itemPos = { { x = 33080, y = 31215, z = 7 }, @@ -766,14 +766,14 @@ QuestDoorAction = { { x = 33090, y = 31190, z = 7 }, }, }, - [Storage.WrathoftheEmperor.Mission07] = { + [Storage.Quest.U8_6.WrathOfTheEmperor.Mission07] = { itemId = false, itemPos = { { x = 33073, y = 31170, z = 7 }, { x = 33074, y = 31170, z = 7 }, }, }, - [Storage.WrathoftheEmperor.Mission09] = { + [Storage.Quest.U8_6.WrathOfTheEmperor.Mission09] = { itemId = false, itemPos = { { x = 33083, y = 31216, z = 8 } }, }, @@ -933,6 +933,31 @@ QuestDoorAction = { { x = 32817, y = 32328, z = 8 }, }, }, + [Storage.Quest.U8_0.TheIceIslands.FormorgarMinesDoor] = { + itemId = false, + itemPos = { + { x = 32134, y = 31095, z = 6 }, + }, + }, + [Storage.Quest.U8_0.TheIceIslands.yakchalDoor] = { + itemId = false, + itemPos = { + { x = 32203, y = 31022, z = 14 }, + { x = 32204, y = 31022, z = 14 }, + }, + }, + [Storage.Quest.U8_1.TowerDefenceQuest.Door] = { + itemId = 6258, + itemPos = { + { x = 32600, y = 31758, z = 9 }, + }, + }, + [Storage.Quest.U8_2.VampireHunterQuest.Door] = { + itemId = 8259, + itemPos = { + { x = 32953, y = 31460, z = 9 }, + }, + }, } QuestDoorUnique = { diff --git a/data-otservbr-global/startup/tables/item.lua b/data-otservbr-global/startup/tables/item.lua index 3ae486a9b1b..790090f417b 100644 --- a/data-otservbr-global/startup/tables/item.lua +++ b/data-otservbr-global/startup/tables/item.lua @@ -1,6 +1,17 @@ -- Look README.md for see the reserved action/unique numbers ItemAction = { + [100] = { + itemId = false, + itemPos = { + -- In Service of Yalahar Quest + { x = 32776, y = 31062, z = 7 }, + { x = 32884, y = 31248, z = 8 }, + { x = 32885, y = 31248, z = 8 }, + -- Sea of Light Quest + { x = 32011, y = 31709, z = 7 }, + }, + }, --Parchment room quest -- data\scripts\quests\parchment_room\movement-parchment.lua [102] = { -- downFloor @@ -18,6 +29,41 @@ ItemAction = { itemId = 2819, itemPos = { { x = 33063, y = 31624, z = 15 } }, }, + -- The Inquisition Quest + [1004] = { + itemId = 5113, + itemPos = { + { x = 33146, y = 31639, z = 11 }, + }, + }, + -- The Travelling Trader Quest + [1108] = { + itemId = 1642, + itemPos = { { x = 32660, y = 32192, z = 8 } }, + }, + -- The Inquisition Quest + [2000] = { + itemId = false, + itemPos = { + { x = 32657, y = 31927, z = 1 }, + { x = 32658, y = 31927, z = 1 }, + { x = 32657, y = 31928, z = 1 }, + { x = 32658, y = 31928, z = 1 }, + }, + }, + [2002] = { + itemId = false, + itemPos = { + { x = 32779, y = 31979, z = 9 }, + { x = 32779, y = 31980, z = 9 }, + }, + }, + [2003] = { + itemId = 7867, + itemPos = { + { x = 32256, y = 32790, z = 7 }, + }, + }, -- The Pits of Inferno Quest [2023] = { itemId = 1982, @@ -54,6 +100,16 @@ ItemAction = { { x = 32822, y = 32332, z = 9 }, }, }, + -- Griffinclaw flower + [3152] = { + itemId = 5658, + itemPos = { x = 32024, y = 32830, z = 4 }, + }, + -- To Blind the Enemy Quest + [4001] = { + itemId = 132, + itemPos = { { x = 32592, y = 31645, z = 2 } }, + }, -- The Pits of Inferno Quest [4002] = { itemId = 353, @@ -61,10 +117,205 @@ ItemAction = { { x = 32854, y = 32326, z = 11 }, }, }, - -- Griffinclaw flower - [3152] = { - itemId = 5658, - itemPos = { x = 32024, y = 32830, z = 4 }, + -- What a Foolish Quest + [4200] = { + itemId = 3656, + itemPos = { { x = 32349, y = 32361, z = 7 } }, + }, + [4202] = { + itemId = 5916, + itemPos = { { x = 32312, y = 31754, z = 7 } }, + }, + [4203] = { + itemId = 3520, + itemPos = { { x = 33062, y = 32431, z = 2 } }, + }, + -- Into The Bone Pit Quest - ectoplasm container + [4205] = { + itemId = 103, + itemPos = { { x = 32408, y = 32107, z = 10 } }, + }, + -- The Exterminator Quest + [4207] = { + itemId = 622, + itemPos = { + { x = 32306, y = 31821, z = 9 }, + { x = 32306, y = 31822, z = 9 }, + }, + }, + -- Rest in Hallowed Ground Quest + [4208] = { + itemId = 1979, + itemPos = { { x = 33188, y = 31688, z = 6 } }, + }, + [4209] = { + itemId = 1979, + itemPos = { { x = 33190, y = 31691, z = 6 } }, + }, + [4210] = { + itemId = 1979, + itemPos = { { x = 33192, y = 31688, z = 6 } }, + }, + [4211] = { + itemId = 1979, + itemPos = { { x = 33196, y = 31691, z = 6 } }, + }, + [4212] = { + itemId = 1979, + itemPos = { { x = 33197, y = 31687, z = 6 } }, + }, + [4213] = { + itemId = 1979, + itemPos = { { x = 33202, y = 31689, z = 6 } }, + }, + [4214] = { + itemId = 1979, + itemPos = { { x = 33203, y = 31687, z = 6 } }, + }, + [4215] = { + itemId = 1979, + itemPos = { { x = 33204, y = 31688, z = 6 } }, + }, + [4216] = { + itemId = 1979, + itemPos = { { x = 33203, y = 31682, z = 6 } }, + }, + [4217] = { + itemId = 1979, + itemPos = { { x = 33205, y = 31680, z = 6 } }, + }, + [4218] = { + itemId = 1979, + itemPos = { { x = 33203, y = 31677, z = 6 } }, + }, + [4219] = { + itemId = 1979, + itemPos = { { x = 33210, y = 31670, z = 7 } }, + }, + [4220] = { + itemId = 1979, + itemPos = { { x = 33215, y = 31667, z = 7 } }, + }, + [4221] = { + itemId = 1979, + itemPos = { { x = 33219, y = 31671, z = 7 } }, + }, + [4222] = { + itemId = 1979, + itemPos = { { x = 33223, y = 31665, z = 7 } }, + }, + [4223] = { + itemId = 1979, + itemPos = { { x = 33217, y = 31661, z = 7 } }, + }, + -- In Service of Yalahar Quest + [7812] = { + itemId = 7804, + itemPos = { + { x = 32950, y = 31182, z = 6 }, + { x = 32951, y = 31182, z = 6 }, + { x = 32950, y = 31183, z = 6 }, + { x = 32951, y = 31183, z = 6 }, + }, + }, + -- Children of the Revolution Quest + [8009] = { + itemId = 10180, + itemPos = { + { x = 33229, y = 31157, z = 7 }, + { x = 33230, y = 31157, z = 7 }, + }, + }, + [8010] = { + itemId = 10180, + itemPos = { + { x = 33228, y = 31151, z = 8 }, + }, + }, + [8011] = { + itemId = 10180, + itemPos = { + { x = 33257, y = 31174, z = 7 }, + { x = 33258, y = 31174, z = 7 }, + }, + }, + [8012] = { + itemId = 10133, + itemPos = { + { x = 33290, y = 31123, z = 5 }, + { x = 33291, y = 31122, z = 5 }, + { x = 33291, y = 31123, z = 5 }, + { x = 33292, y = 31121, z = 5 }, + { x = 33292, y = 31122, z = 5 }, + { x = 33292, y = 31123, z = 5 }, + { x = 33293, y = 31121, z = 5 }, + { x = 33293, y = 31123, z = 5 }, + { x = 33294, y = 31121, z = 5 }, + { x = 33294, y = 31123, z = 5 }, + { x = 33290, y = 31125, z = 5 }, + { x = 33291, y = 31124, z = 5 }, + { x = 33291, y = 31125, z = 5 }, + { x = 33291, y = 31126, z = 5 }, + { x = 33292, y = 31124, z = 5 }, + { x = 33292, y = 31125, z = 5 }, + { x = 33293, y = 31122, z = 5 }, + }, + }, + -- Wrath of the Emperor Quest + [8024] = { + itemId = false, + itemPos = { + { x = 33250, y = 31067, z = 10 }, + { x = 33251, y = 31064, z = 10 }, + { x = 33251, y = 31066, z = 10 }, + { x = 33251, y = 31067, z = 10 }, + { x = 33252, y = 31065, z = 10 }, + { x = 33250, y = 31068, z = 10 }, + { x = 33251, y = 31065, z = 10 }, + { x = 33250, y = 31064, z = 10 }, + { x = 33250, y = 31065, z = 10 }, + { x = 33250, y = 31066, z = 10 }, + }, + }, + [8025] = { + itemId = false, + itemPos = { + { x = 33282, y = 31037, z = 10 }, + { x = 33282, y = 31036, z = 10 }, + { x = 33282, y = 31036, z = 10 }, + }, + }, + [8026] = { + itemId = false, + itemPos = { + { x = 33168, y = 31073, z = 11 }, + { x = 33179, y = 31072, z = 11 }, + { x = 33175, y = 31078, z = 11 }, + { x = 33181, y = 31078, z = 11 }, + { x = 33183, y = 31076, z = 11 }, + { x = 33176, y = 31082, z = 11 }, + { x = 33184, y = 31072, z = 11 }, + { x = 33161, y = 31061, z = 11 }, + { x = 33167, y = 31060, z = 11 }, + { x = 33161, y = 31066, z = 11 }, + { x = 33164, y = 31064, z = 11 }, + { x = 33165, y = 31067, z = 11 }, + { x = 33161, y = 31070, z = 11 }, + { x = 33182, y = 31059, z = 11 }, + { x = 33177, y = 31062, z = 11 }, + { x = 33180, y = 31063, z = 11 }, + { x = 33178, y = 31067, z = 11 }, + { x = 33182, y = 31066, z = 11 }, + { x = 33170, y = 31068, z = 11 }, + { x = 33176, y = 31070, z = 11 }, + { x = 33182, y = 31071, z = 11 }, + { x = 33183, y = 31069, z = 11 }, + { x = 33161, y = 31074, z = 11 }, + { x = 33167, y = 31075, z = 11 }, + { x = 33164, y = 31076, z = 11 }, + { x = 33166, y = 31081, z = 11 }, + { x = 33165, y = 31084, z = 11 }, + }, }, -- The Pits of Inferno Quest [8815] = { @@ -116,7 +367,7 @@ ItemAction = { }, }, -- The Ancient Tombs Quest - [12105] = { + [12106] = { itemId = false, itemPos = { { x = 33188, y = 32660, z = 15 }, @@ -143,6 +394,68 @@ ItemAction = { { x = 33122, y = 32765, z = 14 }, }, }, + -- Children of the Revolution Quest + [12141] = { + itemId = 7890, + itemPos = { + { x = 33187, y = 31205, z = 6 }, + }, + }, + [12142] = { + itemId = 8795, + itemPos = { + { x = 33187, y = 31205, z = 7 }, + }, + }, + -- Unnatural Selection Quest + [12333] = { + itemId = 10195, + itemPos = { + { x = 32990, y = 31496, z = 1 }, + { x = 32990, y = 31497, z = 1 }, + { x = 32990, y = 31498, z = 1 }, + { x = 32991, y = 31496, z = 1 }, + { x = 32991, y = 31497, z = 1 }, + { x = 32991, y = 31498, z = 1 }, + { x = 32992, y = 31496, z = 1 }, + { x = 32992, y = 31497, z = 1 }, + { x = 32992, y = 31498, z = 1 }, + }, + }, + -- The Thieves Guild Quest + [12501] = { + itemId = 7890, + itemPos = { { x = 32337, y = 31814, z = 7 } }, + }, + [12502] = { + itemId = 7891, + itemPos = { { x = 32337, y = 31814, z = 6 } }, + }, + [12503] = { + itemId = 7892, + itemPos = { { x = 32337, y = 31812, z = 6 } }, + }, + [12509] = { + itemId = 1451, + itemPos = { { x = 32598, y = 32381, z = 10 } }, + }, + -- Secret Service + [12550] = { + itemId = 16622, + itemPos = { { x = 32893, y = 32013, z = 6 } }, + }, + [12551] = { + itemId = 16485, + itemPos = { { x = 32894, y = 32013, z = 6 } }, + }, + [12563] = { + itemId = 6967, + itemPos = { { x = 32020, y = 31439, z = 1 } }, + }, + [12566] = { + itemId = 2525, + itemPos = { { x = 32205, y = 31153, z = 8 } }, + }, -- The Shattered Isles Quest [12585] = { itemId = 1949, @@ -163,13 +476,6 @@ ItemAction = { { x = 32741, y = 32382, z = 15 }, }, }, - -- Hunter Outfits Quest - piano - [33216] = { - itemId = 6123, - itemPos = { - { x = 32406, y = 32794, z = 9 }, - }, - }, -- The Pits of Inferno Quest [28810] = { itemId = 353, @@ -321,6 +627,13 @@ ItemAction = { { x = 32858, y = 32321, z = 9 }, }, }, + -- Hunter Outfits Quest - piano + [33216] = { + itemId = 6123, + itemPos = { + { x = 32406, y = 32794, z = 9 }, + }, + }, -- The Pits of Inferno [39511] = { itemId = 6433, @@ -670,6 +983,37 @@ ItemAction = { { x = 32862, y = 32495, z = 9 }, }, }, + -- Rottin Wood and the Married Men Quest + [42501] = { + itemId = 12183, + itemPos = { + { x = 32647, y = 32216, z = 7 }, + }, + }, + [42502] = { + itemId = 12183, + itemPos = { + { x = 32660, y = 32213, z = 7 }, + }, + }, + [42503] = { + itemId = 12185, + itemPos = { + { x = 32644, y = 32183, z = 6 }, + }, + }, + [42504] = { + itemId = 12184, + itemPos = { + { x = 32660, y = 32201, z = 7 }, + }, + }, + [42505] = { + itemId = 12185, + itemPos = { + { x = 32652, y = 32200, z = 5 }, + }, + }, -- The Pits of Inferno [50082] = { itemId = 2576, @@ -689,6 +1033,37 @@ ItemAction = { { x = 32732, y = 32264, z = 15 }, }, }, + -- The Hidden City of Beregar Quest + [50090] = { + itemId = 6298, + itemPos = { + { x = 32566, y = 31338, z = 9 }, + }, + }, + [50091] = { + itemId = 7739, + itemPos = { + { x = 32607, y = 31501, z = 13 }, + }, + }, + [50092] = { + itemId = 1949, + itemPos = { + { x = 32611, y = 31497, z = 14 }, + }, + }, + [50093] = { + itemId = 1949, + itemPos = { + { x = 32611, y = 31497, z = 15 }, + }, + }, + [50127] = { + itemId = 8425, + itemPos = { + { x = 32551, y = 31379, z = 15 }, + }, + }, -- Dreamers Challenge Quest [50149] = { itemId = 1949, @@ -702,9 +1077,33 @@ ItemAction = { { x = 32788, y = 32227, z = 14 }, }, }, + -- The Ice Islands Quest, Nibelor 1: Breaking the Ice + [60000] = { + itemId = 7185, + itemPos = { + { x = 32399, y = 31051, z = 7 }, + { x = 32394, y = 31062, z = 7 }, + { x = 32393, y = 31072, z = 7 }, + }, + }, } ItemUnique = { + -- The Demon Oak Quest + [1001] = { + itemId = 1979, + itemPos = { x = 32710, y = 32398, z = 7 }, + }, + -- In Service of Yalahar Quest + [1015] = { + itemId = 8821, + itemPos = { x = 32682, y = 31242, z = 6 }, + }, + -- The Ice Islands Quest + [1061] = { + itemId = 2576, + itemPos = { x = 32455, y = 31166, z = 12 }, + }, -- The Pits of Inferno Quest [2000] = { itemId = 599, @@ -774,6 +1173,131 @@ ItemUnique = { itemId = 1482, itemPos = { x = 32824, y = 32224, z = 12 }, }, + -- The Inquisition Quest + [2150] = { + itemId = 1949, + itemPos = { x = 33230, y = 31633, z = 12 }, + }, + [2151] = { + itemId = 1949, + itemPos = { x = 33157, y = 31728, z = 11 }, + }, + [2152] = { + itemId = 1949, + itemPos = { x = 33068, y = 31782, z = 13 }, + }, + [2153] = { + itemId = 1949, + itemPos = { x = 33169, y = 31705, z = 14 }, + }, + [2154] = { + itemId = 1949, + itemPos = { x = 33065, y = 31771, z = 10 }, + }, + [2155] = { + itemId = 1949, + itemPos = { x = 33168, y = 31755, z = 13 }, + }, + [2156] = { + itemId = 1949, + itemPos = { x = 33260, y = 31750, z = 13 }, + }, + [2157] = { + itemId = 1949, + itemPos = { x = 33123, y = 31692, z = 11 }, + }, + [2158] = { + itemId = 1949, + itemPos = { x = 33372, y = 31614, z = 14 }, + }, + [2159] = { + itemId = 1949, + itemPos = { x = 33175, y = 31709, z = 14 }, + }, + [2160] = { + itemId = 1949, + itemPos = { x = 33357, y = 31588, z = 12 }, + }, + [2161] = { + itemId = 1949, + itemPos = { x = 33365, y = 31613, z = 11 }, + }, + [2162] = { + itemId = 1949, + itemPos = { x = 33197, y = 31768, z = 11 }, + }, + [2163] = { + itemId = 1949, + itemPos = { x = 33152, y = 31782, z = 12 }, + }, + [2164] = { + itemId = 1949, + itemPos = { x = 33175, y = 31713, z = 14 }, + }, + [2165] = { + itemId = 1949, + itemPos = { x = 33234, y = 31758, z = 12 }, + }, + [2166] = { + itemId = 1949, + itemPos = { x = 33249, y = 31632, z = 13 }, + }, + [2167] = { + itemId = 1949, + itemPos = { x = 33339, y = 31632, z = 13 }, + }, + [2168] = { + itemId = 1949, + itemPos = { x = 33232, y = 31734, z = 11 }, + }, + [2169] = { + itemId = 1949, + itemPos = { x = 33038, y = 31752, z = 15 }, + }, + [2170] = { + itemId = 1949, + itemPos = { x = 33170, y = 31719, z = 14 }, + }, + [2171] = { + itemId = 1949, + itemPos = { x = 33187, y = 31759, z = 15 }, + }, + [2172] = { + itemId = 1949, + itemPos = { x = 33093, y = 31574, z = 11 }, + }, + [2173] = { + itemId = 1949, + itemPos = { x = 33137, y = 31671, z = 11 }, + }, + [2174] = { + itemId = 1949, + itemPos = { x = 33197, y = 31704, z = 11 }, + }, + [2175] = { + itemId = 1949, + itemPos = { x = 33199, y = 31687, z = 12 }, + }, + [2176] = { + itemId = 1949, + itemPos = { x = 33165, y = 31719, z = 14 }, + }, + [2177] = { + itemId = 1949, + itemPos = { x = 33225, y = 31607, z = 9 }, + }, + [2178] = { + itemId = 1949, + itemPos = { x = 33104, y = 31735, z = 11 }, + }, + [2179] = { + itemId = 1949, + itemPos = { x = 33110, y = 31681, z = 12 }, + }, + [2180] = { + itemId = 1949, + itemPos = { x = 33355, y = 31589, z = 11 }, + }, -- Dreamers Challenge Quest [2241] = { itemId = 353, @@ -862,6 +1386,151 @@ ItemUnique = { itemId = 1949, itemPos = { x = 32819, y = 32347, z = 4 }, }, + -- Koshei the Deathless Quest + [3070] = { + itemId = 7534, + itemPos = { x = 33281, y = 32447, z = 8 }, + }, + -- In Service of Yalahar Quest + [3071] = { + itemId = 8435, + itemPos = { x = 32823, y = 31161, z = 8 }, + }, + [3072] = { + itemId = 8615, + itemPos = { x = 32842, y = 31250, z = 8 }, + }, + [3073] = { + itemId = 5025, + itemPos = { x = 32795, y = 31152, z = 8 }, + }, + [3074] = { + itemId = 8431, + itemPos = { x = 32796, y = 31191, z = 8 }, + }, + [3081] = { + itemId = 5287, + itemPos = { x = 32786, y = 31286, z = 8 }, + }, + [3082] = { + itemId = 6260, + itemPos = { x = 32771, y = 31355, z = 5 }, + }, + [3086] = { + itemId = 8852, + itemPos = { x = 32783, y = 31166, z = 10 }, + }, + [3087] = { + itemId = 7739, + itemPos = { x = 32781, y = 31162, z = 14 }, + }, + [3091] = { + itemId = 8618, + itemPos = { x = 32743, y = 31164, z = 5 }, + }, + [3092] = { + itemId = 8618, + itemPos = { x = 32743, y = 31161, z = 5 }, + }, + [3095] = { + itemId = 8615, + itemPos = { x = 32734, y = 31199, z = 5 }, + }, + [3096] = { + itemId = 8615, + itemPos = { x = 32729, y = 31199, z = 5 }, + }, + [3097] = { + itemId = 8615, + itemPos = { x = 32775, y = 31145, z = 5 }, + }, + [3098] = { + itemId = 8615, + itemPos = { x = 32775, y = 31141, z = 5 }, + }, + [3099] = { + itemId = 8615, + itemPos = { x = 32869, y = 31203, z = 5 }, + }, + [3100] = { + itemId = 8615, + itemPos = { x = 32874, y = 31203, z = 5 }, + }, + [3101] = { + itemId = 8618, + itemPos = { x = 32857, y = 31248, z = 5 }, + }, + [3102] = { + itemId = 8618, + itemPos = { x = 32853, y = 31251, z = 5 }, + }, + -- Children of the Revolution Quest + [3162] = { + itemId = 10194, + itemPos = { x = 33281, y = 31219, z = 7 }, + }, + [3163] = { + itemId = 10180, + itemPos = { x = 33177, y = 31193, z = 7 }, + }, + [3169] = { + itemId = 8288, + itemPos = { x = 33265, y = 31116, z = 8 }, + }, + [3170] = { + itemId = 9874, + itemPos = { x = 33348, y = 31412, z = 8 }, + }, + -- Wrath of the Emperor Quest + [3189] = { + itemId = 1949, + itemPos = { x = 33052, y = 31083, z = 14 }, + }, + [3190] = { + itemId = 1949, + itemPos = { x = 33098, y = 31083, z = 14 }, + }, + [3191] = { + itemId = 1949, + itemPos = { x = 33101, y = 31118, z = 14 }, + }, + [3192] = { + itemId = 1949, + itemPos = { x = 33059, y = 31122, z = 14 }, + }, + [3193] = { + itemId = 11427, + itemPos = { x = 33048, y = 31085, z = 15 }, + }, + [3194] = { + itemId = 11427, + itemPos = { x = 33094, y = 31087, z = 15 }, + }, + [3195] = { + itemId = 11427, + itemPos = { x = 33095, y = 31110, z = 15 }, + }, + [3196] = { + itemId = 11427, + itemPos = { x = 33048, y = 31111, z = 15 }, + }, + [3200] = { + itemId = 11431, + itemPos = { x = 33073, y = 31173, z = 8 }, + }, + -- Barbarian Arena Quest + [3264] = { + itemId = 10145, + itemPos = { x = 32229, y = 31065, z = 7 }, + }, + [3265] = { + itemId = 10145, + itemPos = { x = 32229, y = 31058, z = 7 }, + }, + [3266] = { + itemId = 10145, + itemPos = { x = 32229, y = 31051, z = 7 }, + }, -- The Pits of Inferno Quest [3303] = { itemId = 431, @@ -901,6 +1570,20 @@ ItemUnique = { itemId = 2753, itemPos = { x = 32933, y = 32495, z = 7 }, }, + -- In Service of Yalahar Quest + [7809] = { + itemId = 1949, + itemPos = { x = 32784, y = 31177, z = 9 }, + }, + [7810] = { + itemId = 1949, + itemPos = { x = 32783, y = 31175, z = 10 }, + }, + -- The Demon Oak Quest + [9000] = { + itemId = 918, + itemPos = { x = 32716, y = 32344, z = 7 }, + }, -- Dreamers Challenge Quest [9030] = { itemId = 1949, @@ -1055,7 +1738,6 @@ ItemUnique = { itemId = 31484, itemPos = { x = 33395, y = 32660, z = 6 }, }, - -- Kilmaresh -- First mission -- data\scripts\quests\kilmaresh\1-fafnars-wrath\2-ambassadors-treason.lua @@ -1076,7 +1758,6 @@ ItemUnique = { itemId = 31269, itemPos = { x = 33879, y = 31490, z = 6 }, }, - [40033] = { -- Gryphon mask itemId = 31630, itemPos = { x = 33841, y = 31682, z = 3 }, @@ -1385,6 +2066,11 @@ ItemUnique = { itemId = 5662, itemPos = { x = 33024, y = 32672, z = 6 }, }, + -- The Hidden City of Beregar Quest + [50127] = { + itemId = 1949, + itemPos = { x = 32598, y = 31402, z = 15 }, + }, -- The Ancient Tombs Quest [50135] = { itemId = 1949, diff --git a/data-otservbr-global/startup/tables/lever.lua b/data-otservbr-global/startup/tables/lever.lua index 1c8f95fe246..3405b60769a 100644 --- a/data-otservbr-global/startup/tables/lever.lua +++ b/data-otservbr-global/startup/tables/lever.lua @@ -16,6 +16,17 @@ LeverAction = { { x = 32842, y = 32276, z = 9 }, }, }, + -- Children of the Revolution Quest + [8013] = { + itemId = 9125, + itemPos = { + { x = 33349, y = 31123, z = 5 }, + { x = 33349, y = 31124, z = 5 }, + { x = 33349, y = 31125, z = 5 }, + { x = 33349, y = 31126, z = 5 }, + { x = 33349, y = 31127, z = 5 }, + }, + }, -- Dreamer's Challenge Quest [8033] = { itemId = 2772, @@ -76,6 +87,13 @@ LeverAction = { { x = 32799, y = 32556, z = 11 }, }, }, + -- Secret Service + [12574] = { + itemId = 2772, + itemPos = { + { x = 32576, y = 31862, z = 14 }, + }, + }, -- Dawnport bridge lever -- Path: data\scripts\actions\dawnport\lever.lua [30001] = { @@ -155,6 +173,28 @@ LeverAction = { } LeverUnique = { + -- The Inquisiton Quest + [1006] = { + itemId = 2772, + itemPos = { x = 33240, y = 31722, z = 11 }, + }, + [1007] = { + itemId = 2772, + itemPos = { x = 33224, y = 31722, z = 11 }, + }, + [1008] = { + itemId = 2772, + itemPos = { x = 33224, y = 31734, z = 11 }, + }, + [1009] = { + itemId = 2772, + itemPos = { x = 33240, y = 31734, z = 11 }, + }, + -- Against the Spider Cult Quest + [1017] = { + itemId = 2772, + itemPos = { x = 33172, y = 31896, z = 8 }, + }, -- The Pits of Inferno [1037] = { itemId = 2772, @@ -169,6 +209,11 @@ LeverUnique = { itemId = 2772, itemPos = { x = 32862, y = 32555, z = 11 }, }, + -- Wrath of the Emperor Quest + [1053] = { + itemId = 2772, + itemPos = { x = 32801, y = 32640, z = 15 }, + }, -- Dreamers Challenge Quest [2004] = { itemId = 2772, @@ -289,6 +334,15 @@ LeverUnique = { itemId = 2772, itemPos = { x = 32833, y = 32224, z = 14 }, }, + -- Wrath of the Emperor Quest + [3184] = { + itemId = 2772, + itemPos = { x = 33078, y = 31079, z = 13 }, + }, + [3185] = { + itemId = 2772, + itemPos = { x = 33082, y = 31109, z = 2 }, + }, -- The Pits of Inferno Quest [3300] = { itemId = 2772, diff --git a/data-otservbr-global/startup/tables/teleport.lua b/data-otservbr-global/startup/tables/teleport.lua index 51a6bf3a85e..e746e98a028 100644 --- a/data-otservbr-global/startup/tables/teleport.lua +++ b/data-otservbr-global/startup/tables/teleport.lua @@ -9,6 +9,13 @@ TeleportAction = { { x = 32210, y = 32292, z = 6 }, }, }, + -- Barbarian Test - Temple Citizen Svargrond + [30032] = { + itemId = 1949, + itemPos = { + { x = 32208, y = 31134, z = 7 }, + }, + }, [35001] = { -- The Cursed Crystal teleports itemId = 19387, itemPos = { diff --git a/data-otservbr-global/startup/tables/teleport_item.lua b/data-otservbr-global/startup/tables/teleport_item.lua index 9ba767e8bec..c9595228a49 100644 --- a/data-otservbr-global/startup/tables/teleport_item.lua +++ b/data-otservbr-global/startup/tables/teleport_item.lua @@ -49,6 +49,19 @@ TeleportItemAction = { { x = 32172, y = 32439, z = 7 }, }, }, + -- Teleports Thais + [24873] = { + itemId = false, + itemPos = { + { x = 32325, y = 32087, z = 7 }, + { x = 32328, y = 32087, z = 7 }, + { x = 32331, y = 32087, z = 7 }, + { x = 32334, y = 32087, z = 7 }, + { x = 32337, y = 32087, z = 7 }, + { x = 32340, y = 32087, z = 7 }, + { x = 32332, y = 32094, z = 7 }, + }, + }, } TeleportItemUnique = { diff --git a/data-otservbr-global/startup/tables/writeable.lua b/data-otservbr-global/startup/tables/writeable.lua index 9b903cd1133..226fe46c3b7 100644 --- a/data-otservbr-global/startup/tables/writeable.lua +++ b/data-otservbr-global/startup/tables/writeable.lua @@ -855,10 +855,11 @@ Not mine! itemPos = { x = 33044, y = 32067, z = 12 }, text = "DO NOT ENTER!", }, - [16] = { - itemId = 12783, - itemPos = { x = 32205, y = 32883, z = 7 }, - text = "DANGER. Quara sighted below. Experienced adventurers only! Do not swim into a water channel unless you are prepared to meet your death!", + -- Barbarian Arena Quest + [27] = { + itemId = 2015, + itemPos = { x = 32221, y = 31088, z = 7 }, + text = "Exit", }, -- The Ancient Tombs Quest [17] = { diff --git a/data/libs/functions/player.lua b/data/libs/functions/player.lua index b0c74afeaa6..258708419e1 100644 --- a/data/libs/functions/player.lua +++ b/data/libs/functions/player.lua @@ -97,16 +97,16 @@ function Player.getCookiesDelivered(self) local storage, amount = { - Storage.WhatAFoolish.CookieDelivery.SimonTheBeggar, - Storage.WhatAFoolish.CookieDelivery.Markwin, - Storage.WhatAFoolish.CookieDelivery.Ariella, - Storage.WhatAFoolish.CookieDelivery.Hairycles, - Storage.WhatAFoolish.CookieDelivery.Djinn, - Storage.WhatAFoolish.CookieDelivery.AvarTar, - Storage.WhatAFoolish.CookieDelivery.OrcKing, - Storage.WhatAFoolish.CookieDelivery.Lorbas, - Storage.WhatAFoolish.CookieDelivery.Wyda, - Storage.WhatAFoolish.CookieDelivery.Hjaern, + Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.SimonTheBeggar, + Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.Markwin, + Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.Ariella, + Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.Hairycles, + Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.Djinn, + Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.AvarTar, + Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.OrcKing, + Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.Lorbas, + Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.Wyda, + Storage.Quest.U8_1.WhatAFoolishQuest.CookieDelivery.Hjaern, }, 0 for i = 1, #storage do if self:getStorageValue(storage[i]) == 1 then diff --git a/data/npclib/npc_system/modules.lua b/data/npclib/npc_system/modules.lua index f9177d9c96d..aca92804e80 100644 --- a/data/npclib/npc_system/modules.lua +++ b/data/npclib/npc_system/modules.lua @@ -243,10 +243,10 @@ if Modules == nil then player:addAchievementProgress("Ship's Kobold", 1250) -- What a foolish Quest - Mission 3 - if Storage.WhatAFoolish.PieBoxTimer ~= nil then - if player:getStorageValue(Storage.WhatAFoolish.PieBoxTimer) > os.time() then + if Storage.Quest.U8_1.WhatAFoolishQuest.PieBoxTimer ~= nil then + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.PieBoxTimer) > os.time() then if destination ~= Position(32660, 31957, 15) then -- kazordoon steamboat - player:setStorageValue(Storage.WhatAFoolish.PieBoxTimer, 1) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.PieBoxTimer, 1) end end end diff --git a/data/scripts/actions/tools/crowbar.lua b/data/scripts/actions/tools/crowbar.lua new file mode 100644 index 00000000000..c3352cdb976 --- /dev/null +++ b/data/scripts/actions/tools/crowbar.lua @@ -0,0 +1,8 @@ +local crowbar = Action() + +function crowbar.onUse(player, item, fromPosition, target, toPosition, isHotkey) + return onUseCrowbar(player, item, fromPosition, target, toPosition, isHotkey) +end + +crowbar:id(3304) +crowbar:register() diff --git a/data-otservbr-global/scripts/actions/tools/kitchen_knife.lua b/data/scripts/actions/tools/kitchen_knife.lua similarity index 100% rename from data-otservbr-global/scripts/actions/tools/kitchen_knife.lua rename to data/scripts/actions/tools/kitchen_knife.lua diff --git a/data/scripts/lib/register_actions.lua b/data/scripts/lib/register_actions.lua index e5d6688b167..6d5a05a4c98 100644 --- a/data/scripts/lib/register_actions.lua +++ b/data/scripts/lib/register_actions.lua @@ -410,7 +410,7 @@ function onUseRope(player, item, fromPosition, target, toPosition, isHotkey) if tile and tile:isRopeSpot() then player:teleportTo(toPosition:moveUpstairs()) if target.itemid == 7762 then - if player:getStorageValue(Storage.RookgaardTutorialIsland.TutorialHintsStorage) < 22 then + if player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.TutorialHintsStorage) < 22 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have successfully used your rope to climb out of the hole. Congratulations! Now continue to the east.") end end @@ -486,13 +486,13 @@ function onUseShovel(player, item, fromPosition, target, toPosition, isHotkey) Game.createMonster("Scarab", toPosition) end toPosition:sendMagicEffect(CONST_ME_POFF) - -- Rookgaard tutorial island - elseif target.itemid == 351 and target.actionid == 8024 then + -- Wrath of the Emperor Quest + elseif target.actionid == 8024 then player:addItem(11341, 1) player:say("You dig out a handful of earth from this sacred place.", TALKTYPE_MONSTER_SAY) - elseif target.itemid == 7749 and player:getStorageValue(Storage.RookgaardTutorialIsland.TutorialHintsStorage) < 20 then + elseif target.itemid == 7749 and player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.TutorialHintsStorage) < 20 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You dug a hole! Walk onto it as long as it is open to jump down into the forest cave.") - player:setStorageValue(Storage.RookgaardTutorialIsland.TutorialHintsStorage, 19) + player:setStorageValue(Storage.Quest.U8_2.TheBeginningQuest.TutorialHintsStorage, 19) Position(32070, 32266, 7):sendMagicEffect(CONST_ME_TUTORIALARROW) Position(32070, 32266, 7):sendMagicEffect(CONST_ME_TUTORIALSQUARE) target:transform(594) @@ -658,15 +658,15 @@ function onUsePick(player, item, fromPosition, target, toPosition, isHotkey) toPosition:sendMagicEffect(CONST_ME_HITAREA) elseif target.itemid == 7806 then -- Sea of light quest - if player:getStorageValue(Storage.SeaOfLight.Questline) ~= 4 then + if player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) ~= 4 then return false end if toPosition == Position(33031, 31758, 8) then if math.random(100) <= 30 then - if player:getStorageValue(Storage.SeaOfLight.Questline) == 4 then + if player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) == 4 then player:addItem(9697, 1) - player:setStorageValue(Storage.SeaOfLight.Questline, player:getStorageValue(Storage.SeaOfLight.Questline) + 1) + player:setStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline, player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) + 1) player:say("*crush*", TALKTYPE_MONSTER_SAY) end else @@ -701,22 +701,22 @@ function onUsePick(player, item, fromPosition, target, toPosition, isHotkey) Getting liquid silver out of the mountain needs concentration and a steady hand." ) end - elseif target.itemid == 7185 then + elseif target:getActionId() == 60000 then --The Ice Islands Quest, Nibelor 1: Breaking the Ice - local missionProgress = player:getStorageValue(Storage.TheIceIslands.Mission02) - local pickAmount = player:getStorageValue(Storage.TheIceIslands.PickAmount) - if missionProgress < 1 or pickAmount >= 3 or player:getStorageValue(Storage.TheIceIslands.Questline) ~= 3 then + local missionProgress = player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission02) + local pickAmount = player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.PickAmount) + if missionProgress < 1 or pickAmount >= 3 or player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) ~= 3 then return false end - player:setStorageValue(Storage.TheIceIslands.PickAmount, math.max(0, pickAmount) + 1) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.PickAmount, math.max(0, pickAmount) + 1) -- Questlog The Ice Islands Quest, Nibelor 1: Breaking the Ice - player:setStorageValue(Storage.TheIceIslands.Mission02, missionProgress + 1) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission02, missionProgress + 1) if pickAmount >= 2 then - player:setStorageValue(Storage.TheIceIslands.Questline, 4) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline, 4) -- Questlog The Ice Islands Quest, Nibelor 1: Breaking the Ice - player:setStorageValue(Storage.TheIceIslands.Mission02, 4) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission02, 4) end local crackItem = Tile(toPosition):getItemById(7185) @@ -781,7 +781,7 @@ function onUsePick(player, item, fromPosition, target, toPosition, isHotkey) toPosition:sendMagicEffect(CONST_ME_POFF) elseif target.actionid == 50090 then -- The Hidden City of Beregar Quest - if player:getStorageValue(Storage.hiddenCityOfBeregar.WayToBeregar) == 1 then + if player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.WayToBeregar) == 1 then player:teleportTo(Position(32566, 31338, 10)) end elseif target.actionid == 40028 then @@ -893,12 +893,12 @@ function onUseCrowbar(player, item, fromPosition, target, toPosition, isHotkey) if target.uid == 3071 then -- In service of yalahar quest - if player:getStorageValue(Storage.InServiceofYalahar.SewerPipe01) < 1 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SewerPipe01) < 0 then doSetMonsterOutfit(player, "skeleton", 3 * 1000) fromPosition:sendMagicEffect(CONST_ME_ENERGYHIT) - player:setStorageValue(Storage.InServiceofYalahar.SewerPipe01, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SewerPipe01, 1) -- StorageValue for Questlog "Mission 01: Something Rotten" - player:setStorageValue(Storage.InServiceofYalahar.Mission01, player:getStorageValue(Storage.InServiceofYalahar.Mission01) + 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission01, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission01) + 1) local position = player:getPosition() for x = -1, 1 do for y = -1, 1 do @@ -908,10 +908,10 @@ function onUseCrowbar(player, item, fromPosition, target, toPosition, isHotkey) end end elseif target.uid == 3072 then - if player:getStorageValue(Storage.InServiceofYalahar.SewerPipe02) < 1 then - player:setStorageValue(Storage.InServiceofYalahar.SewerPipe02, 1) + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SewerPipe02) < 1 then + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SewerPipe02, 1) -- StorageValue for Questlog "Mission 01: Something Rotten" - player:setStorageValue(Storage.InServiceofYalahar.Mission01, player:getStorageValue(Storage.InServiceofYalahar.Mission01) + 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission01, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission01) + 1) local position = player:getPosition() for x = -1, 1 do for y = -1, 1 do @@ -924,19 +924,19 @@ function onUseCrowbar(player, item, fromPosition, target, toPosition, isHotkey) end end elseif target.uid == 3073 then - if player:getStorageValue(Storage.InServiceofYalahar.SewerPipe03) < 1 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SewerPipe03) < 1 then player:say("You have used the crowbar on a grate.", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.InServiceofYalahar.SewerPipe03, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SewerPipe03, 1) -- StorageValue for Questlog "Mission 01: Something Rotten" - player:setStorageValue(Storage.InServiceofYalahar.Mission01, player:getStorageValue(Storage.InServiceofYalahar.Mission01) + 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission01, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission01) + 1) end elseif target.uid == 3074 then - if player:getStorageValue(Storage.InServiceofYalahar.SewerPipe04) < 1 then + if player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SewerPipe04) < 1 then doSetMonsterOutfit(player, "bog raider", 5 * 1000) player:say("You have used the crowbar on a knot.", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.InServiceofYalahar.SewerPipe04, 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.SewerPipe04, 1) -- StorageValue for Questlog "Mission 01: Something Rotten" - player:setStorageValue(Storage.InServiceofYalahar.Mission01, player:getStorageValue(Storage.InServiceofYalahar.Mission01) + 1) + player:setStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission01, player:getStorageValue(Storage.Quest.U8_4.InServiceOfYalahar.Mission01) + 1) end elseif target.actionid == 100 then if target.itemid == 3501 then @@ -945,22 +945,22 @@ function onUseCrowbar(player, item, fromPosition, target, toPosition, isHotkey) player:setStorageValue(Storage.Postman.Mission02, 2) toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) end - elseif target.itemid == 4848 then + elseif target:getActionId() == 40041 and target.itemid == 4848 then -- The ape city - mission 7 - local apeCityStorage = player:getStorageValue(Storage.TheApeCity.Casks) + local apeCityStorage = player:getStorageValue(Storage.Quest.U7_6.TheApeCity.Casks) if apeCityStorage < 3 then - player:setStorageValue(Storage.TheApeCity.Casks, math.max(0, apeCityStorage) + 1) + player:setStorageValue(Storage.Quest.U7_6.TheApeCity.Casks, math.max(0, apeCityStorage) + 1) target:transform(3134) toPosition:sendMagicEffect(CONST_ME_EXPLOSIONAREA) addEvent(revertCask, 3 * 60 * 1000, toPosition) end end - elseif target.actionid == 12566 and player:getStorageValue(Storage.SecretService.TBIMission06) == 1 then + elseif target.actionid == 12566 and player:getStorageValue(Storage.Quest.U8_1.SecretService.TBIMission06) == 1 then -- Secret service quest local yellPosition = Position(32204, 31157, 8) -- Amazon lookType if player:getOutfit().lookType == 137 then - player:setStorageValue(Storage.SecretService.TBIMission06, 2) + player:setStorageValue(Storage.Quest.U8_1.SecretService.TBIMission06, 2) Game.createMonster("barbarian skullhunter", yellPosition) player:say("Nooooo! What have you done??", TALKTYPE_MONSTER_SAY, false, 0, yellPosition) yellPosition.y = yellPosition.y - 1 @@ -973,40 +973,37 @@ function onUseCrowbar(player, item, fromPosition, target, toPosition, isHotkey) end function onUseSpoon(player, item, fromPosition, target, toPosition, isHotkey) - if target.itemid == 390 then - --The ice islands quest - if player:getStorageValue(Storage.TheIceIslands.Questline) >= 21 then - if player:getStorageValue(Storage.TheIceIslands.SulphurLava) < 1 then - -- Fine sulphur - player:addItem(7247, 1) - player:setStorageValue(Storage.TheIceIslands.SulphurLava, 1) - toPosition:sendMagicEffect(CONST_ME_YELLOW_RINGS) - player:say("You retrive a fine sulphur from a lava hole.", TALKTYPE_MONSTER_SAY) - end + local targetId = target:getId() + + if targetId == 3920 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.SporesMushroom) < 1 then + player:addItem(7251, 1) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.SporesMushroom, 1) + toPosition:sendMagicEffect(CONST_ME_MAGIC_RED) + player:say("You retrieve spores from a mushroom.", TALKTYPE_MONSTER_SAY) + return true end - elseif target.itemid == 3920 then - --The ice islands quest - if player:getStorageValue(Storage.TheIceIslands.Questline) >= 21 then - if player:getStorageValue(Storage.TheIceIslands.SporesMushroom) < 1 then - player:addItem(7251, 1) - player:setStorageValue(Storage.TheIceIslands.SporesMushroom, 1) - toPosition:sendMagicEffect(CONST_ME_MAGIC_GREEN) - player:say("You retrive spores from a mushroom.", TALKTYPE_MONSTER_SAY) + elseif targetId == 390 then + -- The Ice Islands Quest - Cure the Dogs + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) >= 21 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.SulphurLava) < 1 then + player:addItem(7247, 1) -- fine sulphur + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.SulphurLava, 1) + toPosition:sendMagicEffect(CONST_ME_MAGIC_RED) + player:say("You retrieve a fine sulphur from a lava hole.", TALKTYPE_MONSTER_SAY) end - end - elseif target.itemid == 7743 or target.itemid == 390 then - -- What a foolish quest - mission 8 (sulphur) - if player:getStorageValue(Storage.WhatAFoolishQuest.Questline) ~= 21 or player:getStorageValue(Storage.WhatAFoolishQuest.InflammableSulphur) == 1 then + -- What a Foolish Quest - Mission 8 (sulphur) + elseif player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline) == 21 then + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.InflammableSulphur) < 1 then + player:addItem(124, 1) -- Easily inflammable sulphur + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.InflammableSulphur, 1) + toPosition:sendMagicEffect(CONST_ME_YELLOW_RINGS) + end + else return false end - - player:setStorageValue(Storage.WhatAFoolishQuest.InflammableSulphur, 1) - -- Easily inflammable sulphur - player:addItem(124, 1) - toPosition:sendMagicEffect(CONST_ME_YELLOW_RINGS) - else - return false end + return true end @@ -1060,32 +1057,34 @@ function onUseKitchenKnife(player, item, fromPosition, target, toPosition, isHot return false end - -- The ice islands quest - if target.itemid == 7261 then - if player:getStorageValue(Storage.TheIceIslands.Questline) >= 21 then - if player:getStorageValue(Storage.TheIceIslands.FrostbiteHerb) < 1 then + local targetId = target:getId() + + --The Ice Islands Quest - Cure the Dogs + if targetId == 7261 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) >= 21 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.FrostbiteHerb) < 1 then player:addItem(7248, 1) - player:setStorageValue(Storage.TheIceIslands.FrostbiteHerb, 1) - toPosition:sendMagicEffect(CONST_ME_HITBYPOISON) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.FrostbiteHerb, 1) + toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) player:say("You cut a leaf from a frostbite herb.", TALKTYPE_MONSTER_SAY) end end - elseif target.itemid == 3647 then - if player:getStorageValue(Storage.TheIceIslands.Questline) >= 21 then - if player:getStorageValue(Storage.TheIceIslands.FlowerCactus) < 1 then + elseif targetId == 3647 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) >= 21 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.FlowerCactus) < 1 then player:addItem(7245, 1) - player:setStorageValue(Storage.TheIceIslands.FlowerCactus, 1) - target:transform(3637) - addEvent(revertItem, 60 * 1000, toPosition, 3637, 3647) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.FlowerCactus, 1) + target:transform(3646) + addEvent(revertItem, 60 * 1000, toPosition, 3646, 3647) toPosition:sendMagicEffect(CONST_ME_MAGIC_GREEN) player:say("You cut a flower from a cactus.", TALKTYPE_MONSTER_SAY) end end - elseif target.itemid == 3753 then - if player:getStorageValue(Storage.TheIceIslands.Questline) >= 21 then - if player:getStorageValue(Storage.TheIceIslands.FlowerBush) < 1 then + elseif targetId == 3753 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) >= 21 then + if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.FlowerBush) < 1 then player:addItem(7249, 1) - player:setStorageValue(Storage.TheIceIslands.FlowerBush, 1) + player:setStorageValue(Storage.Quest.U8_0.TheIceIslands.FlowerBush, 1) target:transform(3750) addEvent(revertItem, 60 * 1000, toPosition, 3750, 3753) toPosition:sendMagicEffect(CONST_ME_MAGIC_GREEN) @@ -1102,23 +1101,23 @@ function onUseKitchenKnife(player, item, fromPosition, target, toPosition, isHot player:say("This flower is too pathetic.", TALKTYPE_MONSTER_SAY, false, player, toPosition) end -- What a foolish quest (mission 5) - elseif target.itemid == 114 then - if player:getStorageValue(Storage.WhatAFoolishQuest.EmperorBeardShave) == 1 then + elseif targetId == 114 then + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.EmperorBeardShave) == 1 then player:say("God shave the emperor. Some fool already did it.", TALKTYPE_MONSTER_SAY) return true end - player:setStorageValue(Storage.WhatAFoolishQuest.EmperorBeardShave, 1) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.EmperorBeardShave, 1) player:say("This is probably the most foolish thing you've ever done!", TALKTYPE_MONSTER_SAY) player:addItem(113, 1) Game.createMonster("dwarf guard", Position(32656, 31853, 13)) -- What a foolish quest (mission 8) - elseif target.itemid == 3744 then - if player:getStorageValue(Storage.WhatAFoolishQuest.Questline) ~= 22 or player:getStorageValue(Storage.WhatAFoolishQuest.SpecialLeaves) == 1 then + elseif targetId == 3744 then + if player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline) ~= 22 or player:getStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.SpecialLeaves) == 1 then return false end - player:setStorageValue(Storage.WhatAFoolishQuest.SpecialLeaves, 1) + player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.SpecialLeaves, 1) player:addItem(3129, 1) toPosition:sendMagicEffect(CONST_ME_BLOCKHIT) elseif table.contains(fruits, target.itemid) and player:removeItem(6277, 1) then @@ -1128,6 +1127,7 @@ function onUseKitchenKnife(player, item, fromPosition, target, toPosition, isHot else return false end + return true end From bc852f24167bf4613de17080098f16d1c28eeb8d Mon Sep 17 00:00:00 2001 From: Pedro Cruz Date: Fri, 16 Aug 2024 19:44:07 -0300 Subject: [PATCH 24/24] feat: add new liquids 13.40 (#2814) --- data/items/items.xml | 42 +++++++++++++------------ src/items/functions/item/item_parse.hpp | 2 ++ src/utils/utils_definitions.hpp | 18 ++++++----- 3 files changed, 34 insertions(+), 28 deletions(-) diff --git a/data/items/items.xml b/data/items/items.xml index 9fdc89bbd8f..4978cf0bdc4 100644 --- a/data/items/items.xml +++ b/data/items/items.xml @@ -1,26 +1,28 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/items/functions/item/item_parse.hpp b/src/items/functions/item/item_parse.hpp index f63b6bc0689..e9f6133eb3a 100644 --- a/src/items/functions/item/item_parse.hpp +++ b/src/items/functions/item/item_parse.hpp @@ -213,6 +213,8 @@ const phmap::flat_hash_map FluidTypesMap = { { "tea", FLUID_TEA }, { "mead", FLUID_MEAD }, { "ink", FLUID_INK }, + { "candyfluid", FLUID_CANDY }, + { "chocolate", FLUID_CHOCOLATE }, }; const phmap::flat_hash_map WeaponTypesMap = { diff --git a/src/utils/utils_definitions.hpp b/src/utils/utils_definitions.hpp index abf690522d5..ce71bbf0c9b 100644 --- a/src/utils/utils_definitions.hpp +++ b/src/utils/utils_definitions.hpp @@ -348,23 +348,25 @@ enum Fluids_t : uint8_t { FLUID_NONE = 0, /* Blue */ FLUID_WATER = 1, /* Blue */ FLUID_WINE = 2, /* Purple */ - FLUID_BEER = 3, /* Brown */ - FLUID_MUD = 4, /* Brown */ + FLUID_BEER = 3, /* Orange */ + FLUID_MUD = 4, /* Orange */ FLUID_BLOOD = 5, /* Red */ FLUID_SLIME = 6, /* Green */ - FLUID_OIL = 7, /* Brown */ + FLUID_OIL = 7, /* Orange */ FLUID_URINE = 8, /* Yellow */ FLUID_MILK = 9, /* White */ FLUID_MANA = 10, /* Purple */ FLUID_LIFE = 11, /* Red */ FLUID_LEMONADE = 12, /* Yellow */ - FLUID_RUM = 13, /* Brown */ + FLUID_RUM = 13, /* Orange */ FLUID_FRUITJUICE = 14, /* Yellow */ FLUID_COCONUTMILK = 15, /* White */ - FLUID_MEAD = 16, /* Brown */ - FLUID_TEA = 17, /* Brown */ - FLUID_INK = 18 /* Black */ - // 12.85 last fluid is 18, 19+ is a loop from 0 to 18 over and over again + FLUID_MEAD = 16, /* Orange */ + FLUID_TEA = 17, /* Orange */ + FLUID_INK = 18, /* Black */ + FLUID_CANDY = 19, /* Red with white pieces */ + FLUID_CHOCOLATE = 20, /* Brown */ + // 13.40 last fluid is 20, 21+ is a loop from 0 to 20 over and over again }; enum SquareColor_t : uint8_t {